// @bun
var Wb4=Object.create;var{getPrototypeOf:Kb4,defineProperty:pG0,getOwnPropertyNames:Zb4}=Object;var Ub4=Object.prototype.hasOwnProperty;function Hb4($){return this[$]}var zb4,Vb4,U6=($,Y,X)=>{var G=$!=null&&typeof $==="object";if(G){var J=Y?zb4??=new WeakMap:Vb4??=new WeakMap,Q=J.get($);if(Q)return Q}X=$!=null?Wb4(Kb4($)):{};let W=Y||!$||!$.__esModule?pG0(X,"default",{value:$,enumerable:!0}):X;for(let K of Zb4($))if(!Ub4.call(W,K))pG0(W,K,{get:Hb4.bind($,K),enumerable:!0});if(G)J.set($,W);return W};var o=($,Y)=>()=>(Y||$((Y={exports:{}}).exports,Y),Y.exports);var Fb4=($)=>$;function Lb4($,Y){this[$]=Fb4.bind(null,Y)}var W8=($,Y)=>{for(var X in Y)pG0($,X,{get:Y[X],enumerable:!0,configurable:!0,set:Lb4.bind(Y,X)})};var V0=($,Y)=>()=>($&&(Y=$($=0)),Y);var A0=import.meta.require;class Nr0{constructor(){this.previous=new Map,this.current=new Map}#$;init($){if(this.#$=$.windowMs,this.interval)clearInterval(this.interval);if(this.interval=setInterval(()=>{this.clearExpired()},this.#$),this.interval.unref)this.interval.unref()}get($){return this.current.get($)??this.previous.get($)}increment($){let Y=this.getClient($),X=Date.now();if(Y.resetTime.getTime()<=X)this.resetClient(Y,X);return Y.totalHits++,Y}decrement($){let Y=this.getClient($);if(Y.totalHits>0)Y.totalHits--}resetKey($){this.current.delete($),this.previous.delete($)}resetAll(){this.current.clear(),this.previous.clear()}shutdown(){clearInterval(this.interval),this.resetAll()}resetClient($,Y=Date.now()){return $.totalHits=0,$.resetTime.setTime(Y+this.#$),$}getClient($){let Y=this.current.get($);if(Y)return Y;let X,G=this.previous.get($);if(G)X=G,this.previous.delete($);else X={totalHits:0,resetTime:new Date},this.resetClient(X);return this.current.set($,X),X}clearExpired(){this.previous=this.current,this.current=new Map}}function vb4($,Y){if(!kb4($))throw Error("The store is not correctly implemented!");if(typeof $.init==="function")$.init(Y)}function Ar0($){if("binding"in $&&$.binding!==void 0)return yb4($);return xb4($)}function xb4($){let{windowMs:Y=60000,limit:X=5,message:G="Too many requests, please try again later.",statusCode:J=429,standardHeaders:Q="draft-6",requestPropertyName:W="rateLimit",requestStorePropertyName:K="rateLimitStore",skipFailedRequests:Z=!1,skipSuccessfulRequests:H=!1,keyGenerator:z,skip:V=()=>!1,requestWasSuccessful:F=(A)=>A.res.status<400,handler:L=async(A,B,O)=>{A.status(O.statusCode);let E=typeof O.message==="function"?await O.message(A):O.message;if(typeof E==="string")return A.text(E);return A.json(E)},store:N=new Nr0}=$,D={windowMs:Y,limit:X,message:G,statusCode:J,standardHeaders:Q,requestPropertyName:W,requestStorePropertyName:K,skipFailedRequests:Z,skipSuccessfulRequests:H,keyGenerator:z,skip:V,requestWasSuccessful:F,handler:L,store:N};return vb4(N,D),async(A,B)=>{if(await V(A)){await B();return}let E=await z(A),{totalHits:M,resetTime:R}=await N.increment(E),_=await(typeof X==="function"?X(A):X),P={limit:_,used:M,remaining:Math.max(_-M,0),resetTime:R};if(A.set(W,P),A.set(K,{getKey:N.get?.bind(N),resetKey:N.resetKey.bind(N)}),Q&&!A.finalized)if(Q==="draft-7")Cb4(A,P,Y);else Ib4(A,P,Y);let w=!1,j=async()=>{if(!w)await N.decrement(E),w=!0},C=async()=>{if(Z||H){let k=await F(A);if(Z&&!k||H&&k)await j()}};if(M>_){if(Q)Sb4(A,P,Y);return await C(),L(A,B,D)}try{await B(),await C()}catch(k){if(Z)await j();throw k}}}function yb4($){let{message:Y="Too many requests, please try again later.",statusCode:X=429,binding:G,keyGenerator:J,skip:Q=()=>!1,handler:W=async(K,Z,H)=>{K.status(H.statusCode);let z=typeof H.message==="function"?await H.message(K):H.message;if(typeof z==="string")return K.text(z);return K.json(z)}}=$;return async(K,Z)=>{let H=G;if(typeof H==="function")H=H(K);let z={message:Y,statusCode:X,binding:H,keyGenerator:J,skip:Q,handler:W};if(await Q(K)){await Z();return}let F=await J(K),{success:L}=await H.limit({key:F});if(!L)return W(K,Z,z);await Z()}}var tG0=($,Y)=>{let X;if($){let G=Math.ceil(($.getTime()-Date.now())/1000);X=Math.max(0,G)}else if(Y)X=Math.ceil(Y/1000);return X},Ib4=($,Y,X)=>{if($.finalized)return;let G=Math.ceil(X/1000),J=tG0(Y.resetTime);if($.header("RateLimit-Policy",`${Y.limit};w=${G}`),$.header("RateLimit-Limit",Y.limit.toString()),$.header("RateLimit-Remaining",Y.remaining.toString()),J)$.header("RateLimit-Reset",J.toString())},Cb4=($,Y,X)=>{if($.finalized)return;let G=Math.ceil(X/1000),J=tG0(Y.resetTime,X);$.header("RateLimit-Policy",`${Y.limit};w=${G}`),$.header("RateLimit",`limit=${Y.limit}, remaining=${Y.remaining}, reset=${J}`)},Sb4=($,Y,X)=>{if($.finalized)return;let G=tG0(Y.resetTime,X);$.header("Retry-After",G?.toString())},kb4=($)=>!!$?.increment,Wf9;var Br0=V0(()=>{Wf9={increment:`
      local totalHits = redis.call("INCR", KEYS[1])
      local timeToExpire = redis.call("PTTL", KEYS[1])
      if timeToExpire <= 0 or ARGV[1] == "1"
      then
        redis.call("PEXPIRE", KEYS[1], tonumber(ARGV[2]))
        timeToExpire = tonumber(ARGV[2])
      end

      return { totalHits, timeToExpire }
		`.replaceAll(/^\s+/gm,"").trim(),get:`
      local totalHits = redis.call("GET", KEYS[1])
      local timeToExpire = redis.call("PTTL", KEYS[1])

      return { totalHits, timeToExpire }
		`.replaceAll(/^\s+/gm,"").trim()}});import{tracingChannel as tb4,channel as eb4}from"diagnostics_channel";var YX,QS,$h4,GJ0=()=>YX.hasSubscribers||QS.hasSubscribers,Sr0,Cr0,Yh4=($,Y,X,G)=>{typeof Cr0.emitWarning=="function"?Cr0.emitWarning($,Y,X,G):console.error(`[${X}] ${Y}: ${$}`)},Xh4=($)=>!Sr0.has($),$m9,bV=($)=>!!$&&$===Math.floor($)&&$>0&&isFinite($),kr0=($)=>bV($)?$<=Math.pow(2,8)?Uint8Array:$<=Math.pow(2,16)?Uint16Array:$<=Math.pow(2,32)?Uint32Array:$<=Number.MAX_SAFE_INTEGER?Ac:null:null,Ac,Gh4=class ${heap;length;static#$=!1;static create(Y){let X=kr0(Y);if(!X)return[];$.#$=!0;let G=new $(Y,X);return $.#$=!1,G}constructor(Y,X){if(!$.#$)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new X(Y),this.length=0}push(Y){this.heap[this.length++]=Y}pop(){return this.heap[--this.length]}},eW;var ON=V0(()=>{YX=eb4("lru-cache:metrics"),QS=tb4("lru-cache"),$h4=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Sr0=new Set,Cr0=typeof process=="object"&&process?process:{},$m9=Symbol("type"),Ac=class extends Array{constructor($){super($),this.fill(0)}},eW=class ${#$;#Y;#X;#J;#G;#Q;#U;#Z;get perf(){return this.#Z}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#W;#H;#F;#V;#K;#A;#O;#N;#B;#R;#D;#L;#w;#M;#P;#z;#v;#_;#g;static unsafeExposeInternals(Y){return{starts:Y.#w,ttls:Y.#M,autopurgeTimers:Y.#P,sizes:Y.#L,keyMap:Y.#F,keyList:Y.#V,valList:Y.#K,next:Y.#A,prev:Y.#O,get head(){return Y.#N},get tail(){return Y.#B},free:Y.#R,isBackgroundFetch:(X)=>Y.#I(X),backgroundFetch:(X,G,J,Q)=>Y.#l(X,G,J,Q),moveToTail:(X)=>Y.#d(X),indexes:(X)=>Y.#x(X),rindexes:(X)=>Y.#S(X),isStale:(X)=>Y.#T(X)}}get max(){return this.#$}get maxSize(){return this.#Y}get calculatedSize(){return this.#H}get size(){return this.#W}get fetchMethod(){return this.#Q}get memoMethod(){return this.#U}get dispose(){return this.#X}get onInsert(){return this.#J}get disposeAfter(){return this.#G}constructor(Y){let{max:X=0,ttl:G,ttlResolution:J=1,ttlAutopurge:Q,updateAgeOnGet:W,updateAgeOnHas:K,allowStale:Z,dispose:H,onInsert:z,disposeAfter:V,noDisposeOnSet:F,noUpdateTTL:L,maxSize:N=0,maxEntrySize:D=0,sizeCalculation:A,fetchMethod:B,memoMethod:O,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:M,allowStaleOnFetchRejection:R,allowStaleOnFetchAbort:q,ignoreFetchAbort:_,perf:P}=Y;if(P!==void 0&&typeof P?.now!="function")throw TypeError("perf option must have a now() method if specified");if(this.#Z=P??$h4,X!==0&&!bV(X))throw TypeError("max option must be a nonnegative integer");let w=X?kr0(X):Array;if(!w)throw Error("invalid max value: "+X);if(this.#$=X,this.#Y=N,this.maxEntrySize=D||this.#Y,this.sizeCalculation=A,this.sizeCalculation){if(!this.#Y&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw TypeError("sizeCalculation set to non-function")}if(O!==void 0&&typeof O!="function")throw TypeError("memoMethod must be a function if defined");if(this.#U=O,B!==void 0&&typeof B!="function")throw TypeError("fetchMethod must be a function if specified");if(this.#Q=B,this.#v=!!B,this.#F=new Map,this.#V=Array.from({length:X}).fill(void 0),this.#K=Array.from({length:X}).fill(void 0),this.#A=new w(X),this.#O=new w(X),this.#N=0,this.#B=0,this.#R=Gh4.create(X),this.#W=0,this.#H=0,typeof H=="function"&&(this.#X=H),typeof z=="function"&&(this.#J=z),typeof V=="function"?(this.#G=V,this.#D=[]):(this.#G=void 0,this.#D=void 0),this.#z=!!this.#X,this.#g=!!this.#J,this.#_=!!this.#G,this.noDisposeOnSet=!!F,this.noUpdateTTL=!!L,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!R,this.allowStaleOnFetchAbort=!!q,this.ignoreFetchAbort=!!_,this.maxEntrySize!==0){if(this.#Y!==0&&!bV(this.#Y))throw TypeError("maxSize must be a positive integer if specified");if(!bV(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#k()}if(this.allowStale=!!Z,this.noDeleteOnStaleGet=!!M,this.updateAgeOnGet=!!W,this.updateAgeOnHas=!!K,this.ttlResolution=bV(J)||J===0?J:1,this.ttlAutopurge=!!Q,this.ttl=G||0,this.ttl){if(!bV(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#E()}if(this.#$===0&&this.ttl===0&&this.#Y===0)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#$&&!this.#Y){let j="LRU_CACHE_UNBOUNDED";Xh4(j)&&(Sr0.add(j),Yh4("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",j,$))}}getRemainingTTL(Y){return this.#F.has(Y)?1/0:0}#E(){let Y=new Ac(this.#$),X=new Ac(this.#$);this.#M=Y,this.#w=X;let G=this.ttlAutopurge?Array.from({length:this.#$}):void 0;this.#P=G,this.#f=(K,Z,H=this.#Z.now())=>{X[K]=Z!==0?H:0,Y[K]=Z,J(K,Z)},this.#j=(K)=>{X[K]=Y[K]!==0?this.#Z.now():0,J(K,Y[K])};let J=this.ttlAutopurge?(K,Z)=>{if(G?.[K]&&(clearTimeout(G[K]),G[K]=void 0),Z&&Z!==0&&G){let H=setTimeout(()=>{this.#T(K)&&this.#m(this.#V[K],"expire")},Z+1);H.unref&&H.unref(),G[K]=H}}:()=>{};this.#h=(K,Z)=>{if(Y[Z]){let H=Y[Z],z=X[Z];if(!H||!z)return;K.ttl=H,K.start=z,K.now=Q||W();let V=K.now-z;K.remainingTTL=H-V}};let Q=0,W=()=>{let K=this.#Z.now();if(this.ttlResolution>0){Q=K;let Z=setTimeout(()=>Q=0,this.ttlResolution);Z.unref&&Z.unref()}return K};this.getRemainingTTL=(K)=>{let Z=this.#F.get(K);if(Z===void 0)return 0;let H=Y[Z],z=X[Z];if(!H||!z)return 1/0;let V=(Q||W())-z;return H-V},this.#T=(K)=>{let Z=X[K],H=Y[K];return!!H&&!!Z&&(Q||W())-Z>H}}#j=()=>{};#h=()=>{};#f=()=>{};#T=()=>!1;#k(){let Y=new Ac(this.#$);this.#H=0,this.#L=Y,this.#b=(X)=>{this.#H-=Y[X],Y[X]=0},this.#C=(X,G,J,Q)=>{if(this.#I(G))return 0;if(!bV(J))if(Q){if(typeof Q!="function")throw TypeError("sizeCalculation must be a function");if(J=Q(G,X),!bV(J))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return J},this.#q=(X,G,J)=>{if(Y[X]=G,this.#Y){let Q=this.#Y-Y[X];for(;this.#H>Q;)this.#c(!0)}this.#H+=Y[X],J&&(J.entrySize=G,J.totalCalculatedSize=this.#H)}}#b=(Y)=>{};#q=(Y,X,G)=>{};#C=(Y,X,G,J)=>{if(G||J)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#x({allowStale:Y=this.allowStale}={}){if(this.#W)for(let X=this.#B;this.#u(X)&&((Y||!this.#T(X))&&(yield X),X!==this.#N);)X=this.#O[X]}*#S({allowStale:Y=this.allowStale}={}){if(this.#W)for(let X=this.#N;this.#u(X)&&((Y||!this.#T(X))&&(yield X),X!==this.#B);)X=this.#A[X]}#u(Y){return Y!==void 0&&this.#F.get(this.#V[Y])===Y}*entries(){for(let Y of this.#x())this.#K[Y]!==void 0&&this.#V[Y]!==void 0&&!this.#I(this.#K[Y])&&(yield[this.#V[Y],this.#K[Y]])}*rentries(){for(let Y of this.#S())this.#K[Y]!==void 0&&this.#V[Y]!==void 0&&!this.#I(this.#K[Y])&&(yield[this.#V[Y],this.#K[Y]])}*keys(){for(let Y of this.#x()){let X=this.#V[Y];X!==void 0&&!this.#I(this.#K[Y])&&(yield X)}}*rkeys(){for(let Y of this.#S()){let X=this.#V[Y];X!==void 0&&!this.#I(this.#K[Y])&&(yield X)}}*values(){for(let Y of this.#x())this.#K[Y]!==void 0&&!this.#I(this.#K[Y])&&(yield this.#K[Y])}*rvalues(){for(let Y of this.#S())this.#K[Y]!==void 0&&!this.#I(this.#K[Y])&&(yield this.#K[Y])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(Y,X={}){for(let G of this.#x()){let J=this.#K[G],Q=this.#I(J)?J.__staleWhileFetching:J;if(Q!==void 0&&Y(Q,this.#V[G],this))return this.#p(this.#V[G],X)}}forEach(Y,X=this){for(let G of this.#x()){let J=this.#K[G],Q=this.#I(J)?J.__staleWhileFetching:J;Q!==void 0&&Y.call(X,Q,this.#V[G],this)}}rforEach(Y,X=this){for(let G of this.#S()){let J=this.#K[G],Q=this.#I(J)?J.__staleWhileFetching:J;Q!==void 0&&Y.call(X,Q,this.#V[G],this)}}purgeStale(){let Y=!1;for(let X of this.#S({allowStale:!0}))this.#T(X)&&(this.#m(this.#V[X],"expire"),Y=!0);return Y}info(Y){let X=this.#F.get(Y);if(X===void 0)return;let G=this.#K[X],J=this.#I(G)?G.__staleWhileFetching:G;if(J===void 0)return;let Q={value:J};if(this.#M&&this.#w){let W=this.#M[X],K=this.#w[X];if(W&&K){let Z=W-(this.#Z.now()-K);Q.ttl=Z,Q.start=Date.now()}}return this.#L&&(Q.size=this.#L[X]),Q}dump(){let Y=[];for(let X of this.#x({allowStale:!0})){let G=this.#V[X],J=this.#K[X],Q=this.#I(J)?J.__staleWhileFetching:J;if(Q===void 0||G===void 0)continue;let W={value:Q};if(this.#M&&this.#w){W.ttl=this.#M[X];let K=this.#Z.now()-this.#w[X];W.start=Math.floor(Date.now()-K)}this.#L&&(W.size=this.#L[X]),Y.unshift([G,W])}return Y}load(Y){this.clear();for(let[X,G]of Y){if(G.start){let J=Date.now()-G.start;G.start=this.#Z.now()-J}this.#y(X,G.value,G)}}set(Y,X,G={}){let{status:J=YX.hasSubscribers?{}:void 0}=G;G.status=J,J&&(J.op="set",J.key=Y,X!==void 0&&(J.value=X));let Q=this.#y(Y,X,G);return J&&YX.hasSubscribers&&YX.publish(J),Q}#y(Y,X,G={}){let{ttl:J=this.ttl,start:Q,noDisposeOnSet:W=this.noDisposeOnSet,sizeCalculation:K=this.sizeCalculation,status:Z}=G;if(X===void 0)return Z&&(Z.set="deleted"),this.delete(Y),this;let{noUpdateTTL:H=this.noUpdateTTL}=G;Z&&!this.#I(X)&&(Z.value=X);let z=this.#C(Y,X,G.size||0,K,Z);if(this.maxEntrySize&&z>this.maxEntrySize)return this.#m(Y,"set"),Z&&(Z.set="miss",Z.maxEntrySizeExceeded=!0),this;let V=this.#W===0?void 0:this.#F.get(Y);if(V===void 0)V=this.#W===0?this.#B:this.#R.length!==0?this.#R.pop():this.#W===this.#$?this.#c(!1):this.#W,this.#V[V]=Y,this.#K[V]=X,this.#F.set(Y,V),this.#A[this.#B]=V,this.#O[V]=this.#B,this.#B=V,this.#W++,this.#q(V,z,Z),Z&&(Z.set="add"),H=!1,this.#g&&this.#J?.(X,Y,"add");else{this.#d(V);let F=this.#K[V];if(X!==F){if(this.#v&&this.#I(F)){F.__abortController.abort(Error("replaced"));let{__staleWhileFetching:L}=F;L!==void 0&&!W&&(this.#z&&this.#X?.(L,Y,"set"),this.#_&&this.#D?.push([L,Y,"set"]))}else W||(this.#z&&this.#X?.(F,Y,"set"),this.#_&&this.#D?.push([F,Y,"set"]));if(this.#b(V),this.#q(V,z,Z),this.#K[V]=X,Z){Z.set="replace";let L=F&&this.#I(F)?F.__staleWhileFetching:F;L!==void 0&&(Z.oldValue=L)}}else Z&&(Z.set="update");this.#g&&this.onInsert?.(X,Y,X===F?"update":"replace")}if(J!==0&&!this.#M&&this.#E(),this.#M&&(H||this.#f(V,J,Q),Z&&this.#h(Z,V)),!W&&this.#_&&this.#D){let F=this.#D,L;for(;L=F?.shift();)this.#G?.(...L)}return this}pop(){try{for(;this.#W;){let Y=this.#K[this.#N];if(this.#c(!0),this.#I(Y)){if(Y.__staleWhileFetching)return Y.__staleWhileFetching}else if(Y!==void 0)return Y}}finally{if(this.#_&&this.#D){let Y=this.#D,X;for(;X=Y?.shift();)this.#G?.(...X)}}}#c(Y){let X=this.#N,G=this.#V[X],J=this.#K[X];return this.#v&&this.#I(J)?J.__abortController.abort(Error("evicted")):(this.#z||this.#_)&&(this.#z&&this.#X?.(J,G,"evict"),this.#_&&this.#D?.push([J,G,"evict"])),this.#b(X),this.#P?.[X]&&(clearTimeout(this.#P[X]),this.#P[X]=void 0),Y&&(this.#V[X]=void 0,this.#K[X]=void 0,this.#R.push(X)),this.#W===1?(this.#N=this.#B=0,this.#R.length=0):this.#N=this.#A[X],this.#F.delete(G),this.#W--,X}has(Y,X={}){let{status:G=YX.hasSubscribers?{}:void 0}=X;X.status=G,G&&(G.op="has",G.key=Y);let J=this.#a(Y,X);return YX.hasSubscribers&&YX.publish(G),J}#a(Y,X={}){let{updateAgeOnHas:G=this.updateAgeOnHas,status:J}=X,Q=this.#F.get(Y);if(Q!==void 0){let W=this.#K[Q];if(this.#I(W)&&W.__staleWhileFetching===void 0)return!1;if(this.#T(Q))J&&(J.has="stale",this.#h(J,Q));else return G&&this.#j(Q),J&&(J.has="hit",this.#h(J,Q)),!0}else J&&(J.has="miss");return!1}peek(Y,X={}){let{status:G=GJ0()?{}:void 0}=X;G&&(G.op="peek",G.key=Y),X.status=G;let J=this.#s(Y,X);return YX.hasSubscribers&&YX.publish(G),J}#s(Y,X){let{status:G,allowStale:J=this.allowStale}=X,Q=this.#F.get(Y);if(Q===void 0||!J&&this.#T(Q)){G&&(G.peek=Q===void 0?"miss":"stale");return}let W=this.#K[Q],K=this.#I(W)?W.__staleWhileFetching:W;return G&&(K!==void 0?(G.peek="hit",G.value=K):G.peek="miss"),K}#l(Y,X,G,J){let Q=X===void 0?void 0:this.#K[X];if(this.#I(Q))return Q;let W=new AbortController,{signal:K}=G;K?.addEventListener("abort",()=>W.abort(K.reason),{signal:W.signal});let Z={signal:W.signal,options:G,context:J},H=(D,A=!1)=>{let{aborted:B}=W.signal,O=G.ignoreFetchAbort&&D!==void 0,E=G.ignoreFetchAbort||!!(G.allowStaleOnFetchAbort&&D!==void 0);if(G.status&&(B&&!A?(G.status.fetchAborted=!0,G.status.fetchError=W.signal.reason,O&&(G.status.fetchAbortIgnored=!0)):G.status.fetchResolved=!0),B&&!O&&!A)return V(W.signal.reason,E);let M=L,R=this.#K[X];return(R===L||R===void 0&&O&&A)&&(D===void 0?M.__staleWhileFetching!==void 0?this.#K[X]=M.__staleWhileFetching:this.#m(Y,"fetch"):(G.status&&(G.status.fetchUpdated=!0),this.#y(Y,D,Z.options))),D},z=(D)=>(G.status&&(G.status.fetchRejected=!0,G.status.fetchError=D),V(D,!1)),V=(D,A)=>{let{aborted:B}=W.signal,O=B&&G.allowStaleOnFetchAbort,E=O||G.allowStaleOnFetchRejection,M=E||G.noDeleteOnFetchRejection,R=L;if(this.#K[X]===L&&(!M||!A&&R.__staleWhileFetching===void 0?this.#m(Y,"fetch"):O||(this.#K[X]=R.__staleWhileFetching)),E)return G.status&&R.__staleWhileFetching!==void 0&&(G.status.returnedStale=!0),R.__staleWhileFetching;if(R.__returned===R)throw D},F=(D,A)=>{let B=this.#Q?.(Y,Q,Z);B&&B instanceof Promise&&B.then((O)=>D(O===void 0?void 0:O),A),W.signal.addEventListener("abort",()=>{(!G.ignoreFetchAbort||G.allowStaleOnFetchAbort)&&(D(void 0),G.allowStaleOnFetchAbort&&(D=(O)=>H(O,!0)))})};G.status&&(G.status.fetchDispatched=!0);let L=new Promise(F).then(H,z),N=Object.assign(L,{__abortController:W,__staleWhileFetching:Q,__returned:void 0});return X===void 0?(this.#y(Y,N,{...Z.options,status:void 0}),X=this.#F.get(Y)):this.#K[X]=N,N}#I(Y){if(!this.#v)return!1;let X=Y;return!!X&&X instanceof Promise&&X.hasOwnProperty("__staleWhileFetching")&&X.__abortController instanceof AbortController}fetch(Y,X={}){let G=QS.hasSubscribers,{status:J=GJ0()?{}:void 0}=X;X.status=J,J&&X.context&&(J.context=X.context);let Q=this.#i(Y,X);return J&&G&&(J.trace=!0,QS.tracePromise(()=>Q,J).catch(()=>{})),Q}async#i(Y,X={}){let{allowStale:G=this.allowStale,updateAgeOnGet:J=this.updateAgeOnGet,noDeleteOnStaleGet:Q=this.noDeleteOnStaleGet,ttl:W=this.ttl,noDisposeOnSet:K=this.noDisposeOnSet,size:Z=0,sizeCalculation:H=this.sizeCalculation,noUpdateTTL:z=this.noUpdateTTL,noDeleteOnFetchRejection:V=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:F=this.allowStaleOnFetchRejection,ignoreFetchAbort:L=this.ignoreFetchAbort,allowStaleOnFetchAbort:N=this.allowStaleOnFetchAbort,context:D,forceRefresh:A=!1,status:B,signal:O}=X;if(B&&(B.op="fetch",B.key=Y,A&&(B.forceRefresh=!0)),!this.#v)return B&&(B.fetch="get"),this.#p(Y,{allowStale:G,updateAgeOnGet:J,noDeleteOnStaleGet:Q,status:B});let E={allowStale:G,updateAgeOnGet:J,noDeleteOnStaleGet:Q,ttl:W,noDisposeOnSet:K,size:Z,sizeCalculation:H,noUpdateTTL:z,noDeleteOnFetchRejection:V,allowStaleOnFetchRejection:F,allowStaleOnFetchAbort:N,ignoreFetchAbort:L,status:B,signal:O},M=this.#F.get(Y);if(M===void 0){B&&(B.fetch="miss");let R=this.#l(Y,M,E,D);return R.__returned=R}else{let R=this.#K[M];if(this.#I(R)){let w=G&&R.__staleWhileFetching!==void 0;return B&&(B.fetch="inflight",w&&(B.returnedStale=!0)),w?R.__staleWhileFetching:R.__returned=R}let q=this.#T(M);if(!A&&!q)return B&&(B.fetch="hit"),this.#d(M),J&&this.#j(M),B&&this.#h(B,M),R;let _=this.#l(Y,M,E,D),P=_.__staleWhileFetching!==void 0&&G;return B&&(B.fetch=q?"stale":"refresh",P&&q&&(B.returnedStale=!0)),P?_.__staleWhileFetching:_.__returned=_}}forceFetch(Y,X={}){let G=QS.hasSubscribers,{status:J=GJ0()?{}:void 0}=X;X.status=J,J&&X.context&&(J.context=X.context);let Q=this.#o(Y,X);return J&&G&&(J.trace=!0,QS.tracePromise(()=>Q,J).catch(()=>{})),Q}async#o(Y,X={}){let G=await this.#i(Y,X);if(G===void 0)throw Error("fetch() returned undefined");return G}memo(Y,X={}){let{status:G=YX.hasSubscribers?{}:void 0}=X;X.status=G,G&&(G.op="memo",G.key=Y,X.context&&(G.context=X.context));let J=this.#t(Y,X);return G&&(G.value=J),YX.hasSubscribers&&YX.publish(G),J}#t(Y,X={}){let G=this.#U;if(!G)throw Error("no memoMethod provided to constructor");let{context:J,status:Q,forceRefresh:W,...K}=X;Q&&W&&(Q.forceRefresh=!0);let Z=this.#p(Y,K),H=W||Z===void 0;if(Q&&(Q.memo=H?"miss":"hit",H||(Q.value=Z)),!H)return Z;let z=G(Y,Z,{options:K,context:J});return Q&&(Q.value=z),this.#y(Y,z,K),z}get(Y,X={}){let{status:G=YX.hasSubscribers?{}:void 0}=X;X.status=G,G&&(G.op="get",G.key=Y);let J=this.#p(Y,X);return G&&(J!==void 0&&(G.value=J),YX.hasSubscribers&&YX.publish(G)),J}#p(Y,X={}){let{allowStale:G=this.allowStale,updateAgeOnGet:J=this.updateAgeOnGet,noDeleteOnStaleGet:Q=this.noDeleteOnStaleGet,status:W}=X,K=this.#F.get(Y);if(K===void 0){W&&(W.get="miss");return}let Z=this.#K[K],H=this.#I(Z);return W&&this.#h(W,K),this.#T(K)?H?(W&&(W.get="stale-fetching"),G&&Z.__staleWhileFetching!==void 0?(W&&(W.returnedStale=!0),Z.__staleWhileFetching):void 0):(Q||this.#m(Y,"expire"),W&&(W.get="stale"),G?(W&&(W.returnedStale=!0),Z):void 0):(W&&(W.get=H?"fetching":"hit"),this.#d(K),J&&this.#j(K),H?Z.__staleWhileFetching:Z)}#n(Y,X){this.#O[X]=Y,this.#A[Y]=X}#d(Y){Y!==this.#B&&(Y===this.#N?this.#N=this.#A[Y]:this.#n(this.#O[Y],this.#A[Y]),this.#n(this.#B,Y),this.#B=Y)}delete(Y){return this.#m(Y,"delete")}#m(Y,X){YX.hasSubscribers&&YX.publish({op:"delete",delete:X,key:Y});let G=!1;if(this.#W!==0){let J=this.#F.get(Y);if(J!==void 0)if(this.#P?.[J]&&(clearTimeout(this.#P?.[J]),this.#P[J]=void 0),G=!0,this.#W===1)this.#r(X);else{this.#b(J);let Q=this.#K[J];if(this.#I(Q)?Q.__abortController.abort(Error("deleted")):(this.#z||this.#_)&&(this.#z&&this.#X?.(Q,Y,X),this.#_&&this.#D?.push([Q,Y,X])),this.#F.delete(Y),this.#V[J]=void 0,this.#K[J]=void 0,J===this.#B)this.#B=this.#O[J];else if(J===this.#N)this.#N=this.#A[J];else{let W=this.#O[J];this.#A[W]=this.#A[J];let K=this.#A[J];this.#O[K]=this.#O[J]}this.#W--,this.#R.push(J)}}if(this.#_&&this.#D?.length){let J=this.#D,Q;for(;Q=J?.shift();)this.#G?.(...Q)}return G}clear(){return this.#r("delete")}#r(Y){for(let X of this.#S({allowStale:!0})){let G=this.#K[X];if(this.#I(G))G.__abortController.abort(Error("deleted"));else{let J=this.#V[X];this.#z&&this.#X?.(G,J,Y),this.#_&&this.#D?.push([G,J,Y])}}if(this.#F.clear(),this.#K.fill(void 0),this.#V.fill(void 0),this.#M&&this.#w){this.#M.fill(0),this.#w.fill(0);for(let X of this.#P??[])X!==void 0&&clearTimeout(X);this.#P?.fill(void 0)}if(this.#L&&this.#L.fill(0),this.#N=0,this.#B=0,this.#R.length=0,this.#H=0,this.#W=0,this.#_&&this.#D){let X=this.#D,G;for(;G=X?.shift();)this.#G?.(...G)}}}});var Oa0=o((im9,Ba0)=>{var Aa0=()=>process.platform==="linux",qJ0=null,Ih4=()=>{if(!qJ0)qJ0=Aa0()&&process.report?process.report.getReport():{};return qJ0};Ba0.exports={isLinux:Aa0,getReport:Ih4}});var Ra0=o((nm9,Ma0)=>{var Ea0=A0("fs"),Ch4=($)=>Ea0.readFileSync($,"utf-8"),Sh4=($)=>new Promise((Y,X)=>{Ea0.readFile($,"utf-8",(G,J)=>{if(G)X(G);else Y(J)})});Ma0.exports={LDD_PATH:"/usr/bin/ldd",readFileSync:Ch4,readFile:Sh4}});var PJ0=o((rm9,fa0)=>{var Pa0=A0("child_process"),{isLinux:AR,getReport:wa0}=Oa0(),{LDD_PATH:Sc,readFile:_a0,readFileSync:ja0}=Ra0(),CU,SU,fV="",Ta0=()=>{if(!fV)return new Promise(($)=>{Pa0.exec("getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",(Y,X)=>{fV=Y?" ":X,$(fV)})});return fV},Ia0=()=>{if(!fV)try{fV=Pa0.execSync("getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",{encoding:"utf8"})}catch($){fV=" "}return fV},jH="glibc",Ca0=/GLIBC\s(\d+\.\d+)/,wN="musl",kh4=jH.toUpperCase(),vh4=wN.toLowerCase(),xh4=($)=>$.includes("libc.musl-")||$.includes("ld-musl-"),Sa0=()=>{let $=wa0();if($.header&&$.header.glibcVersionRuntime)return jH;if(Array.isArray($.sharedObjects)){if($.sharedObjects.some(xh4))return wN}return null},ka0=($)=>{let[Y,X]=$.split(/[\r\n]+/);if(Y&&Y.includes(jH))return jH;if(X&&X.includes(wN))return wN;return null},va0=($)=>{if($.includes(vh4))return wN;if($.includes(kh4))return jH;return null},yh4=async()=>{if(CU!==void 0)return CU;CU=null;try{let $=await _a0(Sc);CU=va0($)}catch($){}return CU},bh4=()=>{if(CU!==void 0)return CU;CU=null;try{let $=ja0(Sc);CU=va0($)}catch($){}return CU},xa0=async()=>{let $=null;if(AR()){if($=await yh4(),!$)$=Sa0();if(!$){let Y=await Ta0();$=ka0(Y)}}return $},ya0=()=>{let $=null;if(AR()){if($=bh4(),!$)$=Sa0();if(!$){let Y=Ia0();$=ka0(Y)}}return $},hh4=async()=>AR()&&await xa0()!==jH,fh4=()=>AR()&&ya0()!==jH,gh4=async()=>{if(SU!==void 0)return SU;SU=null;try{let Y=(await _a0(Sc)).match(Ca0);if(Y)SU=Y[1]}catch($){}return SU},mh4=()=>{if(SU!==void 0)return SU;SU=null;try{let Y=ja0(Sc).match(Ca0);if(Y)SU=Y[1]}catch($){}return SU},ba0=()=>{let $=wa0();if($.header&&$.header.glibcVersionRuntime)return $.header.glibcVersionRuntime;return null},qa0=($)=>$.trim().split(/\s+/)[1],ha0=($)=>{let[Y,X,G]=$.split(/[\r\n]+/);if(Y&&Y.includes(jH))return qa0(Y);if(X&&G&&X.includes(wN))return qa0(G);return null},uh4=async()=>{let $=null;if(AR()){if($=await gh4(),!$)$=ba0();if(!$){let Y=await Ta0();$=ha0(Y)}}return $},ph4=()=>{let $=null;if(AR()){if($=mh4(),!$)$=ba0();if(!$){let Y=Ia0();$=ha0(Y)}}return $};fa0.exports={GLIBC:jH,MUSL:wN,family:xa0,familySync:ya0,isNonGlibcLinux:hh4,isNonGlibcLinuxSync:fh4,version:uh4,versionSync:ph4}});var ta0=o((am9,oa0)=>{var dh4=A0("fs"),EK=A0("path"),ch4=A0("url"),ua0=A0("os"),pa0=typeof __webpack_require__==="function"?__non_webpack_require__:A0,lh4=process.config&&process.config.variables||{},ih4=!!process.env.PREBUILDS_ONLY,IJ0=process.versions,_J0=IJ0.modules;if(IJ0.deno||process.isBun)_J0="unsupported";var wJ0=ah4()?"electron":rh4()?"node-webkit":"node",kc=process.env.npm_config_arch||ua0.arch(),vc=process.env.npm_config_platform||ua0.platform(),da0=process.env.LIBC||(sh4(vc)?"musl":"glibc"),jJ0=process.env.ARM_VERSION||(kc==="arm64"?"8":lh4.arm_version)||"",ca0=(IJ0.uv||"").split(".")[0];oa0.exports=kU;function kU($){return pa0(kU.resolve($))}kU.resolve=kU.path=function($){$=EK.resolve($||".");var Y="",X;try{Y=pa0(EK.join($,"package.json")).name;var G=Y.toUpperCase().replace(/-/g,"_");if(process.env[G+"_PREBUILD"])$=process.env[G+"_PREBUILD"]}catch(D){X=D}if(!ih4){var J=ga0(EK.join($,"build/Release"),ma0);if(J)return J;var Q=ga0(EK.join($,"build/Debug"),ma0);if(Q)return Q}var W=L($);if(W)return W;var K=L(EK.dirname(process.execPath));if(K)return K;var Z=(Y[0]=="@"?"":"@"+Y+"/")+Y+"-"+vc+"-"+kc,H;try{var z=EK.dirname(A0("module").createRequire(ch4.pathToFileURL(EK.join($,"package.json"))).resolve(Z));return N(z)}catch(D){H=D}var V=["platform="+vc,"arch="+kc,"runtime="+wJ0,"abi="+_J0,"uv="+ca0,jJ0?"armv="+jJ0:"","libc="+da0,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"",typeof __webpack_require__==="function"?"webpack=true":""].filter(Boolean).join(" ");let F="No native build was found for "+V+`
    attempted loading from: `+$+" and package: "+Z+`
`;if(X)F+="Error finding package.json: "+X.message+`
`;if(H)F+="Error resolving package: "+H.message+`
`;throw Error(F);function L(D){var A=TJ0(EK.join(D,"prebuilds")).map(la0),B=A.filter(ia0(vc,kc)).sort(na0)[0];if(!B)return;return N(EK.join(D,"prebuilds",B.name))}function N(D){var A=TJ0(D).map(ra0),B=A.filter(aa0(wJ0,_J0)),O=B.sort(sa0(wJ0))[0];if(O)return EK.join(D,O.file)}};function TJ0($){try{return dh4.readdirSync($)}catch(Y){return[]}}function ga0($,Y){var X=TJ0($).filter(Y);return X[0]&&EK.join($,X[0])}function ma0($){return/\.node$/.test($)}function la0($){var Y=$.split("-");if(Y.length!==2)return;var X=Y[0],G=Y[1].split("+");if(!X)return;if(!G.length)return;if(!G.every(Boolean))return;return{name:$,platform:X,architectures:G}}function ia0($,Y){return function(X){if(X==null)return!1;if(X.platform!==$)return!1;return X.architectures.includes(Y)}}function na0($,Y){return $.architectures.length-Y.architectures.length}function ra0($){var Y=$.split("."),X=Y.pop(),G={file:$,specificity:0};if(X!=="node")return;for(var J=0;J<Y.length;J++){var Q=Y[J];if(Q==="node"||Q==="electron"||Q==="node-webkit")G.runtime=Q;else if(Q==="napi")G.napi=!0;else if(Q.slice(0,3)==="abi")G.abi=Q.slice(3);else if(Q.slice(0,2)==="uv")G.uv=Q.slice(2);else if(Q.slice(0,4)==="armv")G.armv=Q.slice(4);else if(Q==="glibc"||Q==="musl")G.libc=Q;else continue;G.specificity++}return G}function aa0($,Y){return function(X){if(X==null)return!1;if(X.runtime!==$&&!nh4(X))return!1;if(X.abi!==Y&&!X.napi)return!1;if(X.uv&&X.uv!==ca0)return!1;if(X.armv&&X.armv!==jJ0)return!1;if(X.libc&&X.libc!==da0)return!1;return!0}}function nh4($){return $.runtime==="node"&&$.napi}function sa0($){return function(Y,X){if(Y.runtime!==X.runtime)return Y.runtime===$?-1:1;else if(Y.abi!==X.abi)return Y.abi?-1:1;else if(Y.specificity!==X.specificity)return Y.specificity>X.specificity?-1:1;else return 0}}function rh4(){return!!(process.versions&&process.versions.nw)}function ah4(){if(process.versions&&process.versions.electron)return!0;if(process.env.ELECTRON_RUN_AS_NODE)return!0;return typeof window<"u"&&window.process&&window.process.type==="renderer"}function sh4($){if($!=="linux")return!1;let{familySync:Y,MUSL:X}=PJ0();return Y()===X}kU.parseTags=ra0;kU.matchTags=aa0;kU.compareTags=sa0;kU.parseTuple=la0;kU.matchTuple=ia0;kU.compareTuples=na0});var ea0=o((om9,SJ0)=>{var CJ0=typeof __webpack_require__==="function"?__non_webpack_require__:A0;if(typeof CJ0.addon==="function")SJ0.exports=CJ0.addon.bind(CJ0);else SJ0.exports=ta0()});var Ys0=o((em9,$s0)=>{var __dirname="/root/package_linux_2.0/node_modules/msgpackr-extract";$s0.exports=ea0()(__dirname)});function LS($){return Date.UTC($.y,$.m-1,$.d,$.h,$.i,$.s)}function GQ0($,Y){return $.y===Y.y&&$.m===Y.m&&$.d===Y.d&&$.h===Y.h&&$.i===Y.i&&$.s===Y.s}function Df4($,Y){let X=new Date(Date.parse($));if(isNaN(X))throw Error("Invalid ISO8601 passed to timezone parser.");let G=$.substring(9);return G.includes("Z")||G.includes("+")||G.includes("-")?QQ0(X.getUTCFullYear(),X.getUTCMonth()+1,X.getUTCDate(),X.getUTCHours(),X.getUTCMinutes(),X.getUTCSeconds(),"Etc/UTC"):QQ0(X.getFullYear(),X.getMonth()+1,X.getDate(),X.getHours(),X.getMinutes(),X.getSeconds(),Y)}function Is0($,Y,X){return ks0(Df4($,Y),X)}function ks0($,Y){let X=new Date(LS($)),G=DS(X,$.tz),J=LS($),Q=LS(G),W=J-Q,K=new Date(X.getTime()+W),Z=DS(K,$.tz);if(GQ0(Z,$)){let V=new Date(K.getTime()-3600000),F=DS(V,$.tz);return GQ0(F,$)?V:K}let H=new Date(K.getTime()+LS($)-LS(Z)),z=DS(H,$.tz);if(GQ0(z,$))return H;if(Y)throw Error("Invalid date passed to fromTZ()");return K.getTime()>H.getTime()?K:H}function DS($,Y){let X,G;try{X=new Intl.DateTimeFormat("en-US",{timeZone:Y,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}),G=X.formatToParts($)}catch(Q){let W=Q instanceof Error?Q.message:String(Q);throw RangeError(`toTZ: Invalid timezone '${Y}' or date. Please provide a valid IANA timezone (e.g., 'America/New_York', 'Europe/Stockholm'). Original error: ${W}`)}let J={year:0,month:0,day:0,hour:0,minute:0,second:0};for(let Q of G)(Q.type==="year"||Q.type==="month"||Q.type==="day"||Q.type==="hour"||Q.type==="minute"||Q.type==="second")&&(J[Q.type]=parseInt(Q.value,10));if(isNaN(J.year)||isNaN(J.month)||isNaN(J.day)||isNaN(J.hour)||isNaN(J.minute)||isNaN(J.second))throw Error(`toTZ: Failed to parse all date components from timezone '${Y}'. This may indicate an invalid date or timezone configuration. Parsed components: ${JSON.stringify(J)}`);return J.hour===24&&(J.hour=0),{y:J.year,m:J.month,d:J.day,h:J.hour,i:J.minute,s:J.second,tz:Y}}function QQ0($,Y,X,G,J,Q,W){return{y:$,m:Y,d:X,h:G,i:J,s:Q,tz:W}}function Nf4($){if($===void 0&&($={}),delete $.name,$.legacyMode!==void 0&&$.domAndDow===void 0?$.domAndDow=!$.legacyMode:$.domAndDow===void 0&&($.domAndDow=!1),$.legacyMode=!$.domAndDow,$.paused=$.paused===void 0?!1:$.paused,$.maxRuns=$.maxRuns===void 0?1/0:$.maxRuns,$.catch=$.catch===void 0?!1:$.catch,$.interval=$.interval===void 0?0:parseInt($.interval.toString(),10),$.utcOffset=$.utcOffset===void 0?void 0:parseInt($.utcOffset.toString(),10),$.dayOffset=$.dayOffset===void 0?0:parseInt($.dayOffset.toString(),10),$.unref=$.unref===void 0?!1:$.unref,$.mode=$.mode===void 0?"auto":$.mode,$.alternativeWeekdays=$.alternativeWeekdays===void 0?!1:$.alternativeWeekdays,$.sloppyRanges=$.sloppyRanges===void 0?!1:$.sloppyRanges,!["auto","5-part","6-part","7-part","5-or-6-parts","6-or-7-parts"].includes($.mode))throw Error("CronOptions: mode must be one of 'auto', '5-part', '6-part', '7-part', '5-or-6-parts', or '6-or-7-parts'.");if($.startAt&&($.startAt=new XX($.startAt,$.timezone)),$.stopAt&&($.stopAt=new XX($.stopAt,$.timezone)),$.interval!==null){if(isNaN($.interval))throw Error("CronOptions: Supplied value for interval is not a number");if($.interval<0)throw Error("CronOptions: Supplied value for interval can not be negative")}if($.utcOffset!==void 0){if(isNaN($.utcOffset))throw Error("CronOptions: Invalid value passed for utcOffset, should be number representing minutes offset from UTC.");if($.utcOffset<-870||$.utcOffset>870)throw Error("CronOptions: utcOffset out of bounds.");if($.utcOffset!==void 0&&$.timezone)throw Error("CronOptions: Combining 'utcOffset' with 'timezone' is not allowed.")}if($.unref!==!0&&$.unref!==!1)throw Error("CronOptions: Unref should be either true, false or undefined(false).");if($.dayOffset!==void 0&&$.dayOffset!==0&&isNaN($.dayOffset))throw Error("CronOptions: Invalid value passed for dayOffset, should be a number representing days to offset.");return $}function NS($){return Object.prototype.toString.call($)==="[object Function]"||typeof $=="function"||$ instanceof Function}function Af4($){return NS($)}function Bf4($){typeof Deno<"u"&&typeof Deno.unrefTimer<"u"?Deno.unrefTimer($):$&&typeof $.unref<"u"&&$.unref()}var vs0,Cs0=class{pattern;timezone;mode;alternativeWeekdays;sloppyRanges;second;minute;hour;day;month;dayOfWeek;year;lastDayOfMonth;lastWeekday;nearestWeekdays;starDOM;starDOW;starYear;useAndLogic;constructor($,Y,X){this.pattern=$,this.timezone=Y,this.mode=X?.mode??"auto",this.alternativeWeekdays=X?.alternativeWeekdays??!1,this.sloppyRanges=X?.sloppyRanges??!1,this.second=Array(60).fill(0),this.minute=Array(60).fill(0),this.hour=Array(24).fill(0),this.day=Array(31).fill(0),this.month=Array(12).fill(0),this.dayOfWeek=Array(7).fill(0),this.year=Array(1e4).fill(0),this.lastDayOfMonth=!1,this.lastWeekday=!1,this.nearestWeekdays=Array(31).fill(0),this.starDOM=!1,this.starDOW=!1,this.starYear=!1,this.useAndLogic=!1,this.parse()}parse(){if(!(typeof this.pattern=="string"||this.pattern instanceof String))throw TypeError("CronPattern: Pattern has to be of type string.");this.pattern.indexOf("@")>=0&&(this.pattern=this.handleNicknames(this.pattern).trim());let $=this.pattern.match(/\S+/g)||[""],Y=$.length;if($.length<5||$.length>7)throw TypeError("CronPattern: invalid configuration format ('"+this.pattern+"'), exactly five, six, or seven space separated parts are required.");if(this.mode!=="auto"){let G;switch(this.mode){case"5-part":G=5;break;case"6-part":G=6;break;case"7-part":G=7;break;case"5-or-6-parts":G=[5,6];break;case"6-or-7-parts":G=[6,7];break;default:G=0}if(!(Array.isArray(G)?G.includes(Y):Y===G)){let J=Array.isArray(G)?G.join(" or "):G.toString();throw TypeError(`CronPattern: mode '${this.mode}' requires exactly ${J} parts, but pattern '${this.pattern}' has ${Y} parts.`)}}if($.length===5&&$.unshift("0"),$.length===6&&$.push("*"),$[3].toUpperCase()==="LW"?(this.lastWeekday=!0,$[3]=""):$[3].toUpperCase().indexOf("L")>=0&&($[3]=$[3].replace(/L/gi,""),this.lastDayOfMonth=!0),$[3]=="*"&&(this.starDOM=!0),$[6]=="*"&&(this.starYear=!0),$[4].length>=3&&($[4]=this.replaceAlphaMonths($[4])),$[5].length>=3&&($[5]=this.alternativeWeekdays?this.replaceAlphaDaysQuartz($[5]):this.replaceAlphaDays($[5])),$[5].startsWith("+")&&(this.useAndLogic=!0,$[5]=$[5].substring(1),$[5]===""))throw TypeError("CronPattern: Day-of-week field cannot be empty after '+' modifier.");switch($[5]=="*"&&(this.starDOW=!0),this.pattern.indexOf("?")>=0&&($[0]=$[0].replace(/\?/g,"*"),$[1]=$[1].replace(/\?/g,"*"),$[2]=$[2].replace(/\?/g,"*"),$[3]=$[3].replace(/\?/g,"*"),$[4]=$[4].replace(/\?/g,"*"),$[5]=$[5].replace(/\?/g,"*"),$[6]&&($[6]=$[6].replace(/\?/g,"*"))),this.mode){case"5-part":$[0]="0",$[6]="*";break;case"6-part":$[6]="*";break;case"5-or-6-parts":$[6]="*";break;case"6-or-7-parts":break;case"7-part":case"auto":break}this.throwAtIllegalCharacters($),this.partToArray("second",$[0],0,1),this.partToArray("minute",$[1],0,1),this.partToArray("hour",$[2],0,1),this.partToArray("day",$[3],-1,1),this.partToArray("month",$[4],-1,1);let X=this.alternativeWeekdays?-1:0;this.partToArray("dayOfWeek",$[5],X,63),this.partToArray("year",$[6],0,1),!this.alternativeWeekdays&&this.dayOfWeek[7]&&(this.dayOfWeek[0]=this.dayOfWeek[7])}partToArray($,Y,X,G){let J=this[$],Q=$==="day"&&this.lastDayOfMonth,W=$==="day"&&this.lastWeekday;if(Y===""&&!Q&&!W)throw TypeError("CronPattern: configuration entry "+$+" ("+Y+") is empty, check for trailing spaces.");if(Y==="*")return J.fill(G);let K=Y.split(",");if(K.length>1)for(let Z=0;Z<K.length;Z++)this.partToArray($,K[Z],X,G);else Y.indexOf("-")!==-1&&Y.indexOf("/")!==-1?this.handleRangeWithStepping(Y,$,X,G):Y.indexOf("-")!==-1?this.handleRange(Y,$,X,G):Y.indexOf("/")!==-1?this.handleStepping(Y,$,X,G):Y!==""&&this.handleNumber(Y,$,X,G)}throwAtIllegalCharacters($){for(let Y=0;Y<$.length;Y++)if((Y===3?/[^/*0-9,\-WwLl]+/:Y===5?/[^/*0-9,\-#Ll]+/:/[^/*0-9,\-]+/).test($[Y]))throw TypeError("CronPattern: configuration entry "+Y+" ("+$[Y]+") contains illegal characters.")}handleNumber($,Y,X,G){let J=this.extractNth($,Y),Q=$.toUpperCase().includes("W");if(Y!=="day"&&Q)throw TypeError("CronPattern: Nearest weekday modifier (W) only allowed in day-of-month.");Q&&(Y="nearestWeekdays");let W=parseInt(J[0],10)+X;if(isNaN(W))throw TypeError("CronPattern: "+Y+" is not a number: '"+$+"'");this.setPart(Y,W,J[1]||G)}setPart($,Y,X){if(!Object.prototype.hasOwnProperty.call(this,$))throw TypeError("CronPattern: Invalid part specified: "+$);if($==="dayOfWeek"){if(Y===7&&(Y=0),Y<0||Y>6)throw RangeError("CronPattern: Invalid value for dayOfWeek: "+Y);this.setNthWeekdayOfMonth(Y,X);return}if($==="second"||$==="minute"){if(Y<0||Y>=60)throw RangeError("CronPattern: Invalid value for "+$+": "+Y)}else if($==="hour"){if(Y<0||Y>=24)throw RangeError("CronPattern: Invalid value for "+$+": "+Y)}else if($==="day"||$==="nearestWeekdays"){if(Y<0||Y>=31)throw RangeError("CronPattern: Invalid value for "+$+": "+Y)}else if($==="month"){if(Y<0||Y>=12)throw RangeError("CronPattern: Invalid value for "+$+": "+Y)}else if($==="year"&&(Y<1||Y>=1e4))throw RangeError("CronPattern: Invalid value for "+$+": "+Y+" (supported range: 1-9999)");this[$][Y]=X}validateNotNaN($,Y){if(isNaN($))throw TypeError(Y)}validateRange($,Y,X,G,J){if($>Y)throw TypeError("CronPattern: From value is larger than to value: '"+J+"'");if(X!==void 0){if(X===0)throw TypeError("CronPattern: Syntax error, illegal stepping: 0");if(X>this[G].length)throw TypeError("CronPattern: Syntax error, steps cannot be greater than maximum value of part ("+this[G].length+")")}}handleRangeWithStepping($,Y,X,G){if($.toUpperCase().includes("W"))throw TypeError("CronPattern: Syntax error, W is not allowed in ranges with stepping.");let J=this.extractNth($,Y),Q=J[0].match(/^(\d+)-(\d+)\/(\d+)$/);if(Q===null)throw TypeError("CronPattern: Syntax error, illegal range with stepping: '"+$+"'");let[,W,K,Z]=Q,H=parseInt(W,10)+X,z=parseInt(K,10)+X,V=parseInt(Z,10);this.validateNotNaN(H,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(z,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateNotNaN(V,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(H,z,V,Y,$);for(let F=H;F<=z;F+=V)this.setPart(Y,F,J[1]||G)}extractNth($,Y){let X=$,G;if(X.includes("#")){if(Y!=="dayOfWeek")throw Error("CronPattern: nth (#) only allowed in day-of-week field");G=X.split("#")[1],X=X.split("#")[0]}else if(X.toUpperCase().endsWith("L")){if(Y!=="dayOfWeek")throw Error("CronPattern: L modifier only allowed in day-of-week field (use L alone for day-of-month)");G="L",X=X.slice(0,-1)}return[X,G]}handleRange($,Y,X,G){if($.toUpperCase().includes("W"))throw TypeError("CronPattern: Syntax error, W is not allowed in a range.");let J=this.extractNth($,Y),Q=J[0].split("-");if(Q.length!==2)throw TypeError("CronPattern: Syntax error, illegal range: '"+$+"'");let W=parseInt(Q[0],10)+X,K=parseInt(Q[1],10)+X;this.validateNotNaN(W,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(K,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateRange(W,K,void 0,Y,$);for(let Z=W;Z<=K;Z++)this.setPart(Y,Z,J[1]||G)}handleStepping($,Y,X,G){if($.toUpperCase().includes("W"))throw TypeError("CronPattern: Syntax error, W is not allowed in parts with stepping.");let J=this.extractNth($,Y),Q=J[0].split("/");if(Q.length!==2)throw TypeError("CronPattern: Syntax error, illegal stepping: '"+$+"'");if(this.sloppyRanges)Q[0]===""&&(Q[0]="*");else{if(Q[0]==="")throw TypeError("CronPattern: Syntax error, stepping with missing prefix ('"+$+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.");if(Q[0]!=="*")throw TypeError("CronPattern: Syntax error, stepping with numeric prefix ('"+$+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.")}let W=0;Q[0]!=="*"&&(W=parseInt(Q[0],10)+X);let K=parseInt(Q[1],10);this.validateNotNaN(K,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(0,this[Y].length-1,K,Y,$);for(let Z=W;Z<this[Y].length;Z+=K)this.setPart(Y,Z,J[1]||G)}replaceAlphaDays($){return $.replace(/-sun/gi,"-7").replace(/sun/gi,"0").replace(/mon/gi,"1").replace(/tue/gi,"2").replace(/wed/gi,"3").replace(/thu/gi,"4").replace(/fri/gi,"5").replace(/sat/gi,"6")}replaceAlphaDaysQuartz($){return $.replace(/sun/gi,"1").replace(/mon/gi,"2").replace(/tue/gi,"3").replace(/wed/gi,"4").replace(/thu/gi,"5").replace(/fri/gi,"6").replace(/sat/gi,"7")}replaceAlphaMonths($){return $.replace(/jan/gi,"1").replace(/feb/gi,"2").replace(/mar/gi,"3").replace(/apr/gi,"4").replace(/may/gi,"5").replace(/jun/gi,"6").replace(/jul/gi,"7").replace(/aug/gi,"8").replace(/sep/gi,"9").replace(/oct/gi,"10").replace(/nov/gi,"11").replace(/dec/gi,"12")}handleNicknames($){let Y=$.trim().toLowerCase();if(Y==="@yearly"||Y==="@annually")return"0 0 1 1 *";if(Y==="@monthly")return"0 0 1 * *";if(Y==="@weekly")return"0 0 * * 0";if(Y==="@daily"||Y==="@midnight")return"0 0 * * *";if(Y==="@hourly")return"0 * * * *";if(Y==="@reboot")throw TypeError("CronPattern: @reboot is not supported in this environment. This is an event-based trigger that requires system startup detection.");return $}setNthWeekdayOfMonth($,Y){if(typeof Y!="number"&&Y.toUpperCase()==="L")this.dayOfWeek[$]=this.dayOfWeek[$]|32;else if(Y===63)this.dayOfWeek[$]=63;else if(Y<6&&Y>0)this.dayOfWeek[$]=this.dayOfWeek[$]|vs0[Y-1];else throw TypeError(`CronPattern: nth weekday out of range, should be 1-5 or L. Value: ${Y}, Type: ${typeof Y}`)}},JQ0,n5,XX=class ${tz;ms;second;minute;hour;day;month;year;constructor(Y,X){if(this.tz=X,Y&&Y instanceof Date)if(!isNaN(Y))this.fromDate(Y);else throw TypeError("CronDate: Invalid date passed to CronDate constructor");else if(Y==null)this.fromDate(new Date);else if(Y&&typeof Y=="string")this.fromString(Y);else if(Y instanceof $)this.fromCronDate(Y);else throw TypeError("CronDate: Invalid type ("+typeof Y+") passed to CronDate constructor")}getLastDayOfMonth(Y,X){return X!==1?JQ0[X]:new Date(Date.UTC(Y,X+1,0)).getUTCDate()}getLastWeekday(Y,X){let G=this.getLastDayOfMonth(Y,X),J=new Date(Date.UTC(Y,X,G)).getUTCDay();return J===0?G-2:J===6?G-1:G}getNearestWeekday(Y,X,G){let J=this.getLastDayOfMonth(Y,X);if(G>J)return-1;let Q=new Date(Date.UTC(Y,X,G)).getUTCDay();return Q===0?G===J?G-2:G+1:Q===6?G===1?G+2:G-1:G}isNthWeekdayOfMonth(Y,X,G,J){let Q=new Date(Date.UTC(Y,X,G)).getUTCDay(),W=0;for(let K=1;K<=G;K++)new Date(Date.UTC(Y,X,K)).getUTCDay()===Q&&W++;if(J&63&&vs0[W-1]&J)return!0;if(J&32){let K=this.getLastDayOfMonth(Y,X);for(let Z=G+1;Z<=K;Z++)if(new Date(Date.UTC(Y,X,Z)).getUTCDay()===Q)return!1;return!0}return!1}fromDate(Y){if(this.tz!==void 0)if(typeof this.tz=="number")this.ms=Y.getUTCMilliseconds(),this.second=Y.getUTCSeconds(),this.minute=Y.getUTCMinutes()+this.tz,this.hour=Y.getUTCHours(),this.day=Y.getUTCDate(),this.month=Y.getUTCMonth(),this.year=Y.getUTCFullYear(),this.apply();else try{let X=DS(Y,this.tz);this.ms=Y.getMilliseconds(),this.second=X.s,this.minute=X.i,this.hour=X.h,this.day=X.d,this.month=X.m-1,this.year=X.y}catch(X){let G=X instanceof Error?X.message:String(X);throw TypeError(`CronDate: Failed to convert date to timezone '${this.tz}'. This may happen with invalid timezone names or dates. Original error: ${G}`)}else this.ms=Y.getMilliseconds(),this.second=Y.getSeconds(),this.minute=Y.getMinutes(),this.hour=Y.getHours(),this.day=Y.getDate(),this.month=Y.getMonth(),this.year=Y.getFullYear()}fromCronDate(Y){this.tz=Y.tz,this.year=Y.year,this.month=Y.month,this.day=Y.day,this.hour=Y.hour,this.minute=Y.minute,this.second=Y.second,this.ms=Y.ms}apply(){if(this.month>11||this.month<0||this.day>JQ0[this.month]||this.day<1||this.hour>59||this.minute>59||this.second>59||this.hour<0||this.minute<0||this.second<0){let Y=new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms));return this.ms=Y.getUTCMilliseconds(),this.second=Y.getUTCSeconds(),this.minute=Y.getUTCMinutes(),this.hour=Y.getUTCHours(),this.day=Y.getUTCDate(),this.month=Y.getUTCMonth(),this.year=Y.getUTCFullYear(),!0}else return!1}fromString(Y){if(typeof this.tz=="number"){let X=Is0(Y);this.ms=X.getUTCMilliseconds(),this.second=X.getUTCSeconds(),this.minute=X.getUTCMinutes(),this.hour=X.getUTCHours(),this.day=X.getUTCDate(),this.month=X.getUTCMonth(),this.year=X.getUTCFullYear(),this.apply()}else return this.fromDate(Is0(Y,this.tz))}findNext(Y,X,G,J){return this._findMatch(Y,X,G,J,1)}_findMatch(Y,X,G,J,Q){let W=this[X],K;G.lastDayOfMonth&&(K=this.getLastDayOfMonth(this.year,this.month));let Z=!G.starDOW&&X=="day"?new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay():void 0,H=this[X]+J,z=Q===1?(V)=>V<G[X].length:(V)=>V>=0;for(let V=H;z(V);V+=Q){let F=G[X][V];if(X==="day"&&!F){for(let L=0;L<G.nearestWeekdays.length;L++)if(G.nearestWeekdays[L]){let N=this.getNearestWeekday(this.year,this.month,L-J);if(N===-1)continue;if(N===V-J){F=1;break}}}if(X==="day"&&G.lastWeekday){let L=this.getLastWeekday(this.year,this.month);V-J===L&&(F=1)}if(X==="day"&&G.lastDayOfMonth&&V-J==K&&(F=1),X==="day"&&!G.starDOW){let L=G.dayOfWeek[(Z+(V-J-1))%7];if(L&&L&63)L=this.isNthWeekdayOfMonth(this.year,this.month,V-J,L)?1:0;else if(L)throw Error(`CronDate: Invalid value for dayOfWeek encountered. ${L}`);G.useAndLogic?F=F&&L:!Y.domAndDow&&!G.starDOM?F=F||L:F=F&&L}if(F)return this[X]=V-J,W!==this[X]?2:1}return 3}recurse(Y,X,G){if(G===0&&!Y.starYear){if(this.year>=0&&this.year<Y.year.length&&Y.year[this.year]===0){let Q=-1;for(let W=this.year+1;W<Y.year.length&&W<1e4;W++)if(Y.year[W]===1){Q=W;break}if(Q===-1)return null;this.year=Q,this.month=0,this.day=1,this.hour=0,this.minute=0,this.second=0,this.ms=0}if(this.year>=1e4)return null}let J=this.findNext(X,n5[G][0],Y,n5[G][2]);if(J>1){let Q=G+1;for(;Q<n5.length;)this[n5[Q][0]]=-n5[Q][2],Q++;if(J===3){if(this[n5[G][1]]++,this[n5[G][0]]=-n5[G][2],this.apply(),G===0&&!Y.starYear){for(;this.year>=0&&this.year<Y.year.length&&Y.year[this.year]===0&&this.year<1e4;)this.year++;if(this.year>=1e4||this.year>=Y.year.length)return null}return this.recurse(Y,X,0)}else if(this.apply())return this.recurse(Y,X,G-1)}return G+=1,G>=n5.length?this:(Y.starYear?this.year>=3000:this.year>=1e4)?null:this.recurse(Y,X,G)}increment(Y,X,G){return this.second+=X.interval!==void 0&&X.interval>1&&G?X.interval:1,this.ms=0,this.apply(),this.recurse(Y,X,0)}decrement(Y,X){return this.second-=X.interval!==void 0&&X.interval>1?X.interval:1,this.ms=0,this.apply(),this.recurseBackward(Y,X,0,0)}recurseBackward(Y,X,G,J=0){if(J>1e4)return null;if(G===0&&!Y.starYear){if(this.year>=0&&this.year<Y.year.length&&Y.year[this.year]===0){let W=-1;for(let K=this.year-1;K>=0;K--)if(Y.year[K]===1){W=K;break}if(W===-1)return null;this.year=W,this.month=11,this.day=31,this.hour=23,this.minute=59,this.second=59,this.ms=0}if(this.year<0)return null}let Q=this.findPrevious(X,n5[G][0],Y,n5[G][2]);if(Q>1){let W=G+1;for(;W<n5.length;){let K=n5[W][0],Z=n5[W][2],H=this.getMaxPatternValue(K,Y,Z);this[K]=H,W++}if(Q===3){if(this[n5[G][1]]--,G===0){let z=this.getLastDayOfMonth(this.year,this.month);this.day>z&&(this.day=z)}if(G===1)if(this.day<=0)this.day=1;else{let z=this.year,V=this.month;for(;V<0;)V+=12,z--;for(;V>11;)V-=12,z++;let F=V!==1?JQ0[V]:new Date(Date.UTC(z,V+1,0)).getUTCDate();this.day>F&&(this.day=F)}this.apply();let K=n5[G][0],Z=n5[G][2],H=this.getMaxPatternValue(K,Y,Z);if(K==="day"){let z=this.getLastDayOfMonth(this.year,this.month);this[K]=Math.min(H,z)}else this[K]=H;if(this.apply(),G===0){let z=n5[1][2],V=this.getMaxPatternValue("day",Y,z),F=this.getLastDayOfMonth(this.year,this.month),L=Math.min(V,F);L!==this.day&&(this.day=L,this.hour=this.getMaxPatternValue("hour",Y,n5[2][2]),this.minute=this.getMaxPatternValue("minute",Y,n5[3][2]),this.second=this.getMaxPatternValue("second",Y,n5[4][2]))}if(G===0&&!Y.starYear){for(;this.year>=0&&this.year<Y.year.length&&Y.year[this.year]===0;)this.year--;if(this.year<0)return null}return this.recurseBackward(Y,X,0,J+1)}else if(this.apply())return this.recurseBackward(Y,X,G-1,J+1)}return G+=1,G>=n5.length?this:this.year<0?null:this.recurseBackward(Y,X,G,J+1)}getMaxPatternValue(Y,X,G){if(Y==="day"&&X.lastDayOfMonth)return this.getLastDayOfMonth(this.year,this.month);if(Y==="day"&&!X.starDOW)return this.getLastDayOfMonth(this.year,this.month);for(let J=X[Y].length-1;J>=0;J--)if(X[Y][J])return J-G;return X[Y].length-1-G}findPrevious(Y,X,G,J){return this._findMatch(Y,X,G,J,-1)}getDate(Y){return Y||this.tz===void 0?new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms):typeof this.tz=="number"?new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute-this.tz,this.second,this.ms)):ks0(QQ0(this.year,this.month+1,this.day,this.hour,this.minute,this.second,this.tz),!1)}getTime(){return this.getDate(!1).getTime()}match(Y,X){if(!Y.starYear&&(this.year<0||this.year>=Y.year.length||Y.year[this.year]===0))return!1;for(let G=0;G<n5.length;G++){let J=n5[G][0],Q=n5[G][2],W=this[J];if(W+Q<0||W+Q>=Y[J].length)return!1;let K=Y[J][W+Q];if(J==="day"){if(!K){for(let Z=0;Z<Y.nearestWeekdays.length;Z++)if(Y.nearestWeekdays[Z]){let H=this.getNearestWeekday(this.year,this.month,Z-Q);if(H!==-1&&H===W){K=1;break}}}if(Y.lastWeekday){let Z=this.getLastWeekday(this.year,this.month);W===Z&&(K=1)}if(Y.lastDayOfMonth){let Z=this.getLastDayOfMonth(this.year,this.month);W===Z&&(K=1)}if(!Y.starDOW){let Z=new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay(),H=Y.dayOfWeek[(Z+(W-1))%7];H&&H&63&&(H=this.isNthWeekdayOfMonth(this.year,this.month,W,H)?1:0),Y.useAndLogic?K=K&&H:!X.domAndDow&&!Y.starDOM?K=K||H:K=K&&H}}if(!K)return!1}return!0}},Ss0=30000,pc,AS=class{name;options;_states;fn;getTz(){return this.options.timezone||this.options.utcOffset}applyDayOffset($){if(this.options.dayOffset!==void 0&&this.options.dayOffset!==0){let Y=this.options.dayOffset*24*60*60*1000;return new Date($.getTime()+Y)}return $}constructor($,Y,X){let G,J;if(NS(Y))J=Y;else if(typeof Y=="object")G=Y;else if(Y!==void 0)throw Error("Cron: Invalid argument passed for optionsIn. Should be one of function, or object (options).");if(NS(X))J=X;else if(typeof X=="object")G=X;else if(X!==void 0)throw Error("Cron: Invalid argument passed for funcIn. Should be one of function, or object (options).");if(this.name=G?.name,this.options=Nf4(G),this._states={kill:!1,blocking:!1,previousRun:void 0,currentRun:void 0,once:void 0,currentTimeout:void 0,maxRuns:G?G.maxRuns:void 0,paused:G?G.paused:!1,pattern:new Cs0("* * * * *",void 0,{mode:"auto"})},$&&($ instanceof Date||typeof $=="string"&&$.indexOf(":")>0)?this._states.once=new XX($,this.getTz()):this._states.pattern=new Cs0($,this.options.timezone,{mode:this.options.mode,alternativeWeekdays:this.options.alternativeWeekdays,sloppyRanges:this.options.sloppyRanges}),this.name){if(pc.find((Q)=>Q.name===this.name))throw Error("Cron: Tried to initialize new named job '"+this.name+"', but name already taken.");pc.push(this)}return J!==void 0&&Af4(J)&&(this.fn=J,this.schedule()),this}nextRun($){let Y=this._next($);return Y?this.applyDayOffset(Y.getDate(!1)):null}nextRuns($,Y){this._states.maxRuns!==void 0&&$>this._states.maxRuns&&($=this._states.maxRuns);let X=Y||this._states.currentRun||void 0;return this._enumerateRuns($,X,"next")}previousRuns($,Y){return this._enumerateRuns($,Y||void 0,"previous")}_enumerateRuns($,Y,X){let G=[],J=Y?new XX(Y,this.getTz()):null,Q=X==="next"?this._next:this._previous;for(;$--;){let W=Q.call(this,J);if(!W)break;let K=W.getDate(!1);G.push(this.applyDayOffset(K)),J=W}return G}match($){if(this._states.once){let X=new XX($,this.getTz());X.ms=0;let G=new XX(this._states.once,this.getTz());return G.ms=0,X.getTime()===G.getTime()}let Y=new XX($,this.getTz());return Y.ms=0,Y.match(this._states.pattern,this.options)}getPattern(){if(!this._states.once)return this._states.pattern?this._states.pattern.pattern:void 0}getOnce(){return this._states.once?this._states.once.getDate():null}isRunning(){let $=this.nextRun(this._states.currentRun),Y=!this._states.paused,X=this.fn!==void 0,G=!this._states.kill;return Y&&X&&G&&$!==null}isStopped(){return this._states.kill}isBusy(){return this._states.blocking}currentRun(){return this._states.currentRun?this._states.currentRun.getDate():null}previousRun(){return this._states.previousRun?this._states.previousRun.getDate():null}msToNext($){let Y=this._next($);return Y?$ instanceof XX||$ instanceof Date?Y.getTime()-$.getTime():Y.getTime()-new XX($).getTime():null}stop(){this._states.kill=!0,this._states.currentTimeout&&clearTimeout(this._states.currentTimeout);let $=pc.indexOf(this);$>=0&&pc.splice($,1)}pause(){return this._states.paused=!0,!this._states.kill}resume(){return this._states.paused=!1,!this._states.kill}schedule($){if($&&this.fn)throw Error("Cron: It is not allowed to schedule two functions using the same Croner instance.");$&&(this.fn=$);let Y=this.msToNext(),X=this.nextRun(this._states.currentRun);return Y==null||isNaN(Y)||X===null?this:(Y>Ss0&&(Y=Ss0),this._states.currentTimeout=setTimeout(()=>this._checkTrigger(X),Y),this._states.currentTimeout&&this.options.unref&&Bf4(this._states.currentTimeout),this)}async _trigger($){this._states.blocking=!0,this._states.currentRun=new XX(void 0,this.getTz());try{if(this.options.catch)try{this.fn!==void 0&&await this.fn(this,this.options.context)}catch(Y){if(NS(this.options.catch))try{this.options.catch(Y,this)}catch{}}else this.fn!==void 0&&await this.fn(this,this.options.context)}finally{this._states.previousRun=new XX($,this.getTz()),this._states.blocking=!1}}async trigger(){await this._trigger()}runsLeft(){return this._states.maxRuns}_checkTrigger($){let Y=new Date,X=!this._states.paused&&Y.getTime()>=$.getTime(),G=this._states.blocking&&this.options.protect;X&&!G?(this._states.maxRuns!==void 0&&this._states.maxRuns--,this._trigger()):X&&G&&NS(this.options.protect)&&setTimeout(()=>this.options.protect(this),0),this.schedule()}_next($){let Y=!!($||this._states.currentRun),X=!1;!$&&this.options.startAt&&this.options.interval&&([$,Y]=this._calculatePreviousRun($,Y),X=!$),$=new XX($,this.getTz()),this.options.startAt&&$&&$.getTime()<this.options.startAt.getTime()&&($=this.options.startAt);let G=this._states.once||new XX($,this.getTz());return!X&&G!==this._states.once&&(G=G.increment(this._states.pattern,this.options,Y)),this._states.once&&this._states.once.getTime()<=$.getTime()||G===null||this._states.maxRuns!==void 0&&this._states.maxRuns<=0||this._states.kill||this.options.stopAt&&G.getTime()>=this.options.stopAt.getTime()?null:G}_previous($){let Y=new XX($,this.getTz());this.options.stopAt&&Y.getTime()>this.options.stopAt.getTime()&&(Y=this.options.stopAt);let X=new XX(Y,this.getTz());return this._states.once?this._states.once.getTime()<Y.getTime()?this._states.once:null:(X=X.decrement(this._states.pattern,this.options),X===null||this.options.startAt&&X.getTime()<this.options.startAt.getTime()?null:X)}_calculatePreviousRun($,Y){let X=new XX(void 0,this.getTz()),G=$;if(this.options.startAt.getTime()<=X.getTime()){G=this.options.startAt;let J=G.getTime()+this.options.interval*1000;for(;J<=X.getTime();)G=new XX(G,this.getTz()).increment(this._states.pattern,this.options,!0),J=G.getTime()+this.options.interval*1000;Y=!0}return G===null&&(G=void 0),[G,Y]}};var WQ0=V0(()=>{vs0=[1,2,4,8,16],JQ0=[31,28,31,30,31,30,31,31,30,31,30,31],n5=[["month","year",0],["day","month",-1],["hour","day",0],["minute","hour",0],["second","minute",0]];pc=[]});var xN=o((Or9,bW0)=>{var yW0=(()=>{var{defineProperty:$,getOwnPropertyDescriptor:Y,getOwnPropertyNames:X,getOwnPropertySymbols:G}=Object,J=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,W=(O,E,M)=>(E in O)?$(O,E,{enumerable:!0,configurable:!0,writable:!0,value:M}):O[E]=M,K=(O,E)=>{for(var M in E||(E={}))if(J.call(E,M))W(O,M,E[M]);if(G){for(var M of G(E))if(Q.call(E,M))W(O,M,E[M])}return O},Z=(O,E)=>{for(var M in E)$(O,M,{get:E[M],enumerable:!0})},H=(O,E,M,R)=>{if(E&&typeof E==="object"||typeof E==="function"){for(let q of X(E))if(!J.call(O,q)&&q!==M)$(O,q,{get:()=>E[q],enumerable:!(R=Y(E,q))||R.enumerable})}return O},z=(O)=>H($({},"__esModule",{value:!0}),O),V=(O,E,M)=>W(O,typeof E!=="symbol"?E+"":E,M),F={};Z(F,{DEFAULT_OPTIONS:()=>D,DEFAULT_UUID_LENGTH:()=>N,default:()=>B});var L="5.3.2",N=6,D={dictionary:"alphanum",shuffle:!0,debug:!1,length:N,counter:0},A=class{constructor(E={}){V(this,"counter"),V(this,"debug"),V(this,"dict"),V(this,"version"),V(this,"dictIndex",0),V(this,"dictRange",[]),V(this,"lowerBound",0),V(this,"upperBound",0),V(this,"dictLength",0),V(this,"uuidLength"),V(this,"_digit_first_ascii",48),V(this,"_digit_last_ascii",58),V(this,"_alpha_lower_first_ascii",97),V(this,"_alpha_lower_last_ascii",123),V(this,"_hex_last_ascii",103),V(this,"_alpha_upper_first_ascii",65),V(this,"_alpha_upper_last_ascii",91),V(this,"_number_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii]}),V(this,"_alpha_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),V(this,"_alpha_lower_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),V(this,"_alpha_upper_dict_ranges",{upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),V(this,"_alphanum_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),V(this,"_alphanum_lower_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),V(this,"_alphanum_upper_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),V(this,"_hex_dict_ranges",{decDigits:[this._digit_first_ascii,this._digit_last_ascii],alphaDigits:[this._alpha_lower_first_ascii,this._hex_last_ascii]}),V(this,"_dict_ranges",{_number_dict_ranges:this._number_dict_ranges,_alpha_dict_ranges:this._alpha_dict_ranges,_alpha_lower_dict_ranges:this._alpha_lower_dict_ranges,_alpha_upper_dict_ranges:this._alpha_upper_dict_ranges,_alphanum_dict_ranges:this._alphanum_dict_ranges,_alphanum_lower_dict_ranges:this._alphanum_lower_dict_ranges,_alphanum_upper_dict_ranges:this._alphanum_upper_dict_ranges,_hex_dict_ranges:this._hex_dict_ranges}),V(this,"log",(...w)=>{let j=[...w];if(j[0]="[short-unique-id] ".concat(w[0]),this.debug===!0){if(typeof console<"u"&&console!==null){console.log(...j);return}}}),V(this,"_normalizeDictionary",(w,j)=>{let C;if(w&&Array.isArray(w)&&w.length>1)C=w;else{C=[],this.dictIndex=0;let k="_".concat(w,"_dict_ranges"),S=this._dict_ranges[k],I=0;for(let[,x]of Object.entries(S)){let[y,d]=x;I+=Math.abs(d-y)}C=Array(I);let v=0;for(let[,x]of Object.entries(S)){this.dictRange=x,this.lowerBound=this.dictRange[0],this.upperBound=this.dictRange[1];let y=this.lowerBound<=this.upperBound,d=this.lowerBound,u=this.upperBound;if(y)for(let b=d;b<u;b++)C[v++]=String.fromCharCode(b),this.dictIndex=b;else for(let b=d;b>u;b--)C[v++]=String.fromCharCode(b),this.dictIndex=b}C.length=v}if(j){let k=C.length;for(let S=k-1;S>0;S--){let I=Math.floor(Math.random()*(S+1));[C[S],C[I]]=[C[I],C[S]]}}return C}),V(this,"setDictionary",(w,j)=>{this.dict=this._normalizeDictionary(w,j),this.dictLength=this.dict.length,this.setCounter(0)}),V(this,"seq",()=>{return this.sequentialUUID()}),V(this,"sequentialUUID",()=>{let w=this.dictLength,j=this.dict,C=this.counter,k=[];do{let I=C%w;C=Math.trunc(C/w),k.push(j[I])}while(C!==0);let S=k.join("");return this.counter+=1,S}),V(this,"rnd",(w=this.uuidLength||N)=>{return this.randomUUID(w)}),V(this,"randomUUID",(w=this.uuidLength||N)=>{if(w===null||typeof w>"u"||w<1)throw Error("Invalid UUID Length Provided");let j=Array(w),C=this.dictLength,k=this.dict;for(let S=0;S<w;S++){let I=Math.floor(Math.random()*C);j[S]=k[I]}return j.join("")}),V(this,"fmt",(w,j)=>{return this.formattedUUID(w,j)}),V(this,"formattedUUID",(w,j)=>{let C={$r:this.randomUUID,$s:this.sequentialUUID,$t:this.stamp};return w.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,(S)=>{let I=S.slice(0,2),v=Number.parseInt(S.slice(2),10);if(I==="$s")return C[I]().padStart(v,"0");if(I==="$t"&&j)return C[I](v,j);return C[I](v)})}),V(this,"availableUUIDs",(w=this.uuidLength)=>{return Number.parseFloat(([...new Set(this.dict)].length**w).toFixed(0))}),V(this,"_collisionCache",new Map),V(this,"approxMaxBeforeCollision",(w=this.availableUUIDs(this.uuidLength))=>{let j=w,C=this._collisionCache.get(j);if(C!==void 0)return C;let k=Number.parseFloat(Math.sqrt(Math.PI/2*w).toFixed(20));return this._collisionCache.set(j,k),k}),V(this,"collisionProbability",(w=this.availableUUIDs(this.uuidLength),j=this.uuidLength)=>{return Number.parseFloat((this.approxMaxBeforeCollision(w)/this.availableUUIDs(j)).toFixed(20))}),V(this,"uniqueness",(w=this.availableUUIDs(this.uuidLength))=>{let j=Number.parseFloat((1-this.approxMaxBeforeCollision(w)/w).toFixed(20));return j>1?1:j<0?0:j}),V(this,"getVersion",()=>{return this.version}),V(this,"stamp",(w,j)=>{let C=Math.floor(+(j||new Date)/1000).toString(16);if(typeof w==="number"&&w===0)return C;if(typeof w!=="number"||w<10)throw Error(["Param finalLength must be a number greater than or equal to 10,","or 0 if you want the raw hexadecimal timestamp"].join(`
`));let k=w-9,S=Math.round(Math.random()*(k>15?15:k)),I=this.randomUUID(k);return"".concat(I.substring(0,S)).concat(C).concat(I.substring(S)).concat(S.toString(16))}),V(this,"parseStamp",(w,j)=>{if(j&&!/t0|t[1-9]\d{1,}/.test(j))throw Error("Cannot extract date from a formated UUID with no timestamp in the format");let C=j?j.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,(S)=>{let I={$r:(y)=>[...Array(y)].map(()=>"r").join(""),$s:(y)=>[...Array(y)].map(()=>"s").join(""),$t:(y)=>[...Array(y)].map(()=>"t").join("")},v=S.slice(0,2),x=Number.parseInt(S.slice(2),10);return I[v](x)}).replace(/^(.*?)(t{8,})(.*)$/g,(S,I,v)=>{return w.substring(I.length,I.length+v.length)}):w;if(C.length===8)return new Date(Number.parseInt(C,16)*1000);if(C.length<10)throw Error("Stamp length invalid");let k=Number.parseInt(C.substring(C.length-1),16);return new Date(Number.parseInt(C.substring(k,k+8),16)*1000)}),V(this,"setCounter",(w)=>{this.counter=w}),V(this,"validate",(w,j)=>{let C=j?this._normalizeDictionary(j):this.dict;return w.split("").every((k)=>C.includes(k))});let M=K(K({},D),E);this.counter=0,this.debug=!1,this.dict=[],this.version=L;let{dictionary:R,shuffle:q,length:_,counter:P}=M;this.uuidLength=_,this.setDictionary(R,q),this.setCounter(P),this.debug=M.debug,this.log(this.dict),this.log("Generator instantiated with Dictionary Size ".concat(this.dictLength," and counter set to ").concat(this.counter)),this.log=this.log.bind(this),this.setDictionary=this.setDictionary.bind(this),this.setCounter=this.setCounter.bind(this),this.seq=this.seq.bind(this),this.sequentialUUID=this.sequentialUUID.bind(this),this.rnd=this.rnd.bind(this),this.randomUUID=this.randomUUID.bind(this),this.fmt=this.fmt.bind(this),this.formattedUUID=this.formattedUUID.bind(this),this.availableUUIDs=this.availableUUIDs.bind(this),this.approxMaxBeforeCollision=this.approxMaxBeforeCollision.bind(this),this.collisionProbability=this.collisionProbability.bind(this),this.uniqueness=this.uniqueness.bind(this),this.getVersion=this.getVersion.bind(this),this.stamp=this.stamp.bind(this),this.parseStamp=this.parseStamp.bind(this)}};V(A,"default",A);var B=A;return z(F)})();typeof bW0<"u"&&(bW0.exports=yW0.default),typeof window<"u"&&(yW0=yW0.default)});var fJ=o((I45,j61)=>{class O20 extends Error{constructor($){super(`Format functions must be synchronous taking a two arguments: (info, opts)
Found: ${$.toString().split(`
`)[0]}
`);Error.captureStackTrace(this,O20)}}j61.exports=($)=>{if($.length>2)throw new O20($);function Y(G={}){this.options=G}Y.prototype.transform=$;function X(G){return new Y(G)}return X.Format=Y,X}});var S61=o((C45,C61)=>{var I61={};C61.exports=I61;var T61={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(T61).forEach(function($){var Y=T61[$],X=I61[$]=[];X.open="\x1B["+Y[0]+"m",X.close="\x1B["+Y[1]+"m"})});var v61=o((S45,k61)=>{k61.exports=function($,Y){Y=Y||process.argv||[];var X=Y.indexOf("--"),G=/^-{1,2}/.test($)?"":"--",J=Y.indexOf(G+$);return J!==-1&&(X===-1?!0:J<X)}});var y61=o((k45,x61)=>{var sm4=A0("os"),IK=v61(),EG=process.env,hR=void 0;if(IK("no-color")||IK("no-colors")||IK("color=false"))hR=!1;else if(IK("color")||IK("colors")||IK("color=true")||IK("color=always"))hR=!0;if("FORCE_COLOR"in EG)hR=EG.FORCE_COLOR.length===0||parseInt(EG.FORCE_COLOR,10)!==0;function om4($){if($===0)return!1;return{level:$,hasBasic:!0,has256:$>=2,has16m:$>=3}}function tm4($){if(hR===!1)return 0;if(IK("color=16m")||IK("color=full")||IK("color=truecolor"))return 3;if(IK("color=256"))return 2;if($&&!$.isTTY&&hR!==!0)return 0;var Y=hR?1:0;if(process.platform==="win32"){var X=sm4.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(X[0])>=10&&Number(X[2])>=10586)return Number(X[2])>=14931?3:2;return 1}if("CI"in EG){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(J){return J in EG})||EG.CI_NAME==="codeship")return 1;return Y}if("TEAMCITY_VERSION"in EG)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(EG.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in EG){var G=parseInt((EG.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(EG.TERM_PROGRAM){case"iTerm.app":return G>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(EG.TERM))return 2;if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(EG.TERM))return 1;if("COLORTERM"in EG)return 1;if(EG.TERM==="dumb")return Y;return Y}function E20($){var Y=tm4($);return om4(Y)}x61.exports={supportsColor:E20,stdout:E20(process.stdout),stderr:E20(process.stderr)}});var h61=o((v45,b61)=>{b61.exports=function(Y,X){var G="";Y=Y||"Run the trap, drop the bass",Y=Y.split("");var J={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return Y.forEach(function(Q){Q=Q.toLowerCase();var W=J[Q]||[" "],K=Math.floor(Math.random()*W.length);if(typeof J[Q]<"u")G+=J[Q][K];else G+=Q}),G}});var g61=o((x45,f61)=>{f61.exports=function(Y,X){Y=Y||"   he is here   ";var G={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},J=[].concat(G.up,G.down,G.mid);function Q(Z){var H=Math.floor(Math.random()*Z);return H}function W(Z){var H=!1;return J.filter(function(z){H=z===Z}),H}function K(Z,H){var z="",V,F;H=H||{},H.up=typeof H.up<"u"?H.up:!0,H.mid=typeof H.mid<"u"?H.mid:!0,H.down=typeof H.down<"u"?H.down:!0,H.size=typeof H.size<"u"?H.size:"maxi",Z=Z.split("");for(F in Z){if(W(F))continue;switch(z=z+Z[F],V={up:0,down:0,mid:0},H.size){case"mini":V.up=Q(8),V.mid=Q(2),V.down=Q(8);break;case"maxi":V.up=Q(16)+3,V.mid=Q(4)+1,V.down=Q(64)+3;break;default:V.up=Q(8)+1,V.mid=Q(6)/2,V.down=Q(8)+1;break}var L=["up","mid","down"];for(var N in L){var D=L[N];for(var A=0;A<=V[D];A++)if(H[D])z=z+G[D][Q(G[D].length)]}}return z}return K(Y,X)}});var u61=o((y45,m61)=>{m61.exports=function($){return function(Y,X,G){if(Y===" ")return Y;switch(X%3){case 0:return $.red(Y);case 1:return $.white(Y);case 2:return $.blue(Y)}}}});var d61=o((b45,p61)=>{p61.exports=function($){return function(Y,X,G){return X%2===0?Y:$.inverse(Y)}}});var l61=o((h45,c61)=>{c61.exports=function($){var Y=["red","yellow","green","blue","magenta"];return function(X,G,J){if(X===" ")return X;else return $[Y[G++%Y.length]](X)}}});var n61=o((f45,i61)=>{i61.exports=function($){var Y=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(X,G,J){return X===" "?X:$[Y[Math.round(Math.random()*(Y.length-2))]](X)}}});var t61=o((m45,o61)=>{var K8={};o61.exports=K8;K8.themes={};var em4=A0("util"),sN=K8.styles=S61(),r61=Object.defineProperties,$u4=new RegExp(/[\r\n]+/g);K8.supportsColor=y61().supportsColor;if(typeof K8.enabled>"u")K8.enabled=K8.supportsColor()!==!1;K8.enable=function(){K8.enabled=!0};K8.disable=function(){K8.enabled=!1};K8.stripColors=K8.strip=function($){return(""+$).replace(/\x1B\[\d+m/g,"")};var g45=K8.stylize=function(Y,X){if(!K8.enabled)return Y+"";var G=sN[X];if(!G&&X in K8)return K8[X](Y);return G.open+Y+G.close},Yu4=/[|\\{}()[\]^$+*?.]/g,Xu4=function($){if(typeof $!=="string")throw TypeError("Expected a string");return $.replace(Yu4,"\\$&")};function a61($){var Y=function X(){return Ju4.apply(X,arguments)};return Y._styles=$,Y.__proto__=Gu4,Y}var s61=function(){var $={};return sN.grey=sN.gray,Object.keys(sN).forEach(function(Y){sN[Y].closeRe=new RegExp(Xu4(sN[Y].close),"g"),$[Y]={get:function(){return a61(this._styles.concat(Y))}}}),$}(),Gu4=r61(function(){},s61);function Ju4(){var $=Array.prototype.slice.call(arguments),Y=$.map(function(W){if(W!=null&&W.constructor===String)return W;else return em4.inspect(W)}).join(" ");if(!K8.enabled||!Y)return Y;var X=Y.indexOf(`
`)!=-1,G=this._styles,J=G.length;while(J--){var Q=sN[G[J]];if(Y=Q.open+Y.replace(Q.closeRe,Q.open)+Q.close,X)Y=Y.replace($u4,function(W){return Q.close+W+Q.open})}return Y}K8.setTheme=function($){if(typeof $==="string"){console.log("colors.setTheme now only accepts an object, not a string.  If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file.  The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var Y in $)(function(X){K8[X]=function(G){if(typeof $[X]==="object"){var J=G;for(var Q in $[X])J=K8[$[X][Q]](J);return J}return K8[$[X]](G)}})(Y)};function Qu4(){var $={};return Object.keys(s61).forEach(function(Y){$[Y]={get:function(){return a61([Y])}}}),$}var Wu4=function(Y,X){var G=X.split("");return G=G.map(Y),G.join("")};K8.trap=h61();K8.zalgo=g61();K8.maps={};K8.maps.america=u61()(K8);K8.maps.zebra=d61()(K8);K8.maps.rainbow=l61()(K8);K8.maps.random=n61()(K8);for(M20 in K8.maps)(function($){K8[$]=function(Y){return Wu4(K8.maps[$],Y)}})(M20);var M20;r61(K8,Qu4())});var R20=o((u45,e61)=>{var Ku4=t61();e61.exports=Ku4});var $81=o((Zu4)=>{Zu4.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};Zu4.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}});var Y81=o((zu4)=>{zu4.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};zu4.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}});var X81=o((Lu4)=>{Lu4.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};Lu4.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}});var G81=o((al)=>{Object.defineProperty(al,"cli",{value:$81()});Object.defineProperty(al,"npm",{value:Y81()});Object.defineProperty(al,"syslog",{value:X81()})});var L7=o((Gk)=>{Object.defineProperty(Gk,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(Gk,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(Gk,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(Gk,"configs",{value:G81()})});var ol=o((n45,sl)=>{var w20=R20(),{LEVEL:q20,MESSAGE:P20}=L7();w20.enabled=!0;var J81=/\s+/;class CK{constructor($={}){if($.colors)this.addColors($.colors);this.options=$}static addColors($){let Y=Object.keys($).reduce((X,G)=>{return X[G]=J81.test($[G])?$[G].split(J81):$[G],X},{});return CK.allColors=Object.assign({},CK.allColors||{},Y),CK.allColors}addColors($){return CK.addColors($)}colorize($,Y,X){if(typeof X>"u")X=Y;if(!Array.isArray(CK.allColors[$]))return w20[CK.allColors[$]](X);for(let G=0,J=CK.allColors[$].length;G<J;G++)X=w20[CK.allColors[$][G]](X);return X}transform($,Y){if(Y.all&&typeof $[P20]==="string")$[P20]=this.colorize($[q20],$.level,$[P20]);if(Y.level||Y.all||!Y.message)$.level=this.colorize($[q20],$.level);if(Y.all||Y.message)$.message=this.colorize($[q20],$.level,$.message);return $}}sl.exports=($)=>new CK($);sl.exports.Colorizer=sl.exports.Format=CK});var W81=o((r45,Q81)=>{var{Colorizer:Au4}=ol();Q81.exports=($)=>{return Au4.addColors($.colors||$),$}});var Z81=o((a45,K81)=>{var Bu4=fJ();K81.exports=Bu4(($)=>{return $.message=`	${$.message}`,$})});var z81=o((s45,H81)=>{var Ou4=fJ(),{LEVEL:U81,MESSAGE:_20}=L7();H81.exports=Ou4(($,{stack:Y,cause:X})=>{if($ instanceof Error){let J=Object.assign({},$,{level:$.level,[U81]:$[U81]||$.level,message:$.message,[_20]:$[_20]||$.message});if(Y)J.stack=$.stack;if(X)J.cause=$.cause;return J}if(!($.message instanceof Error))return $;let G=$.message;if(Object.assign($,G),$.message=G.message,$[_20]=G.message,Y)$.stack=G.stack;if(X)$.cause=G.cause;return $})});var T20=o((o45,tl)=>{var{configs:Eu4,LEVEL:V81,MESSAGE:j20}=L7();class fR{constructor($={levels:Eu4.npm.levels}){this.paddings=fR.paddingForLevels($.levels,$.filler),this.options=$}static getLongestLevel($){let Y=Object.keys($).map((X)=>X.length);return Math.max(...Y)}static paddingForLevel($,Y,X){let G=X+1-$.length,J=Math.floor(G/Y.length);return`${Y}${Y.repeat(J)}`.slice(0,G)}static paddingForLevels($,Y=" "){let X=fR.getLongestLevel($);return Object.keys($).reduce((G,J)=>{return G[J]=fR.paddingForLevel(J,Y,X),G},{})}transform($,Y){if($.message=`${this.paddings[$[V81]]}${$.message}`,$[j20])$[j20]=`${this.paddings[$[V81]]}${$[j20]}`;return $}}tl.exports=($)=>new fR($);tl.exports.Padder=tl.exports.Format=fR});var F81=o((t45,C20)=>{var{Colorizer:Mu4}=ol(),{Padder:Ru4}=T20(),{configs:qu4,MESSAGE:Pu4}=L7();class I20{constructor($={}){if(!$.levels)$.levels=qu4.cli.levels;this.colorizer=new Mu4($),this.padder=new Ru4($),this.options=$}transform($,Y){return this.colorizer.transform(this.padder.transform($,Y),Y),$[Pu4]=`${$.level}:${$.message}`,$}}C20.exports=($)=>new I20($);C20.exports.Format=I20});var D81=o((e45,S20)=>{var wu4=fJ();function L81($){if(!$.every(_u4))return;return(Y)=>{let X=Y;for(let G=0;G<$.length;G++)if(X=$[G].transform(X,$[G].options),!X)return!1;return X}}function _u4($){if(typeof $.transform!=="function")throw Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join(`
`));return!0}S20.exports=(...$)=>{let Y=wu4(L81($)),X=Y();return X.Format=Y.Format,X};S20.exports.cascade=L81});var Qk=o(($65,B81)=>{var{hasOwnProperty:Jk}=Object.prototype,tN=x20();tN.configure=x20;tN.stringify=tN;tN.default=tN;$65.stringify=tN;$65.configure=x20;B81.exports=tN;var ju4=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function eV($){if($.length<5000&&!ju4.test($))return`"${$}"`;return JSON.stringify($)}function k20($,Y){if($.length>200||Y)return $.sort(Y);for(let X=1;X<$.length;X++){let G=$[X],J=X;while(J!==0&&$[J-1]>G)$[J]=$[J-1],J--;$[J]=G}return $}var Tu4=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function v20($){return Tu4.call($)!==void 0&&$.length!==0}function N81($,Y,X){if($.length<X)X=$.length;let G=Y===","?"":" ",J=`"0":${G}${$[0]}`;for(let Q=1;Q<X;Q++)J+=`${Y}"${Q}":${G}${$[Q]}`;return J}function Iu4($){if(Jk.call($,"circularValue")){let Y=$.circularValue;if(typeof Y==="string")return`"${Y}"`;if(Y==null)return Y;if(Y===Error||Y===TypeError)return{toString(){throw TypeError("Converting circular structure to JSON")}};throw TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function Cu4($){let Y;if(Jk.call($,"deterministic")){if(Y=$.deterministic,typeof Y!=="boolean"&&typeof Y!=="function")throw TypeError('The "deterministic" argument must be of type boolean or comparator function')}return Y===void 0?!0:Y}function Su4($,Y){let X;if(Jk.call($,Y)){if(X=$[Y],typeof X!=="boolean")throw TypeError(`The "${Y}" argument must be of type boolean`)}return X===void 0?!0:X}function A81($,Y){let X;if(Jk.call($,Y)){if(X=$[Y],typeof X!=="number")throw TypeError(`The "${Y}" argument must be of type number`);if(!Number.isInteger(X))throw TypeError(`The "${Y}" argument must be an integer`);if(X<1)throw RangeError(`The "${Y}" argument must be >= 1`)}return X===void 0?1/0:X}function oN($){if($===1)return"1 item";return`${$} items`}function ku4($){let Y=new Set;for(let X of $)if(typeof X==="string"||typeof X==="number")Y.add(String(X));return Y}function vu4($){if(Jk.call($,"strict")){let Y=$.strict;if(typeof Y!=="boolean")throw TypeError('The "strict" argument must be of type boolean');if(Y)return(X)=>{let G=`Object can not safely be stringified. Received type ${typeof X}`;if(typeof X!=="function")G+=` (${X.toString()})`;throw Error(G)}}}function x20($){$={...$};let Y=vu4($);if(Y){if($.bigint===void 0)$.bigint=!1;if(!("circularValue"in $))$.circularValue=Error}let X=Iu4($),G=Su4($,"bigint"),J=Cu4($),Q=typeof J==="function"?J:void 0,W=A81($,"maximumDepth"),K=A81($,"maximumBreadth");function Z(L,N,D,A,B,O){let E=N[L];if(typeof E==="object"&&E!==null&&typeof E.toJSON==="function")E=E.toJSON(L);switch(E=A.call(N,L,E),typeof E){case"string":return eV(E);case"object":{if(E===null)return"null";if(D.indexOf(E)!==-1)return X;let M="",R=",",q=O;if(Array.isArray(E)){if(E.length===0)return"[]";if(W<D.length+1)return'"[Array]"';if(D.push(E),B!=="")O+=B,M+=`
${O}`,R=`,
${O}`;let k=Math.min(E.length,K),S=0;for(;S<k-1;S++){let v=Z(String(S),E,D,A,B,O);M+=v!==void 0?v:"null",M+=R}let I=Z(String(S),E,D,A,B,O);if(M+=I!==void 0?I:"null",E.length-1>K){let v=E.length-K-1;M+=`${R}"... ${oN(v)} not stringified"`}if(B!=="")M+=`
${q}`;return D.pop(),`[${M}]`}let _=Object.keys(E),P=_.length;if(P===0)return"{}";if(W<D.length+1)return'"[Object]"';let w="",j="";if(B!=="")O+=B,R=`,
${O}`,w=" ";let C=Math.min(P,K);if(J&&!v20(E))_=k20(_,Q);D.push(E);for(let k=0;k<C;k++){let S=_[k],I=Z(S,E,D,A,B,O);if(I!==void 0)M+=`${j}${eV(S)}:${w}${I}`,j=R}if(P>K){let k=P-K;M+=`${j}"...":${w}"${oN(k)} not stringified"`,j=R}if(B!==""&&j.length>1)M=`
${O}${M}
${q}`;return D.pop(),`{${M}}`}case"number":return isFinite(E)?String(E):Y?Y(E):"null";case"boolean":return E===!0?"true":"false";case"undefined":return;case"bigint":if(G)return String(E);default:return Y?Y(E):void 0}}function H(L,N,D,A,B,O){if(typeof N==="object"&&N!==null&&typeof N.toJSON==="function")N=N.toJSON(L);switch(typeof N){case"string":return eV(N);case"object":{if(N===null)return"null";if(D.indexOf(N)!==-1)return X;let E=O,M="",R=",";if(Array.isArray(N)){if(N.length===0)return"[]";if(W<D.length+1)return'"[Array]"';if(D.push(N),B!=="")O+=B,M+=`
${O}`,R=`,
${O}`;let P=Math.min(N.length,K),w=0;for(;w<P-1;w++){let C=H(String(w),N[w],D,A,B,O);M+=C!==void 0?C:"null",M+=R}let j=H(String(w),N[w],D,A,B,O);if(M+=j!==void 0?j:"null",N.length-1>K){let C=N.length-K-1;M+=`${R}"... ${oN(C)} not stringified"`}if(B!=="")M+=`
${E}`;return D.pop(),`[${M}]`}D.push(N);let q="";if(B!=="")O+=B,R=`,
${O}`,q=" ";let _="";for(let P of A){let w=H(P,N[P],D,A,B,O);if(w!==void 0)M+=`${_}${eV(P)}:${q}${w}`,_=R}if(B!==""&&_.length>1)M=`
${O}${M}
${E}`;return D.pop(),`{${M}}`}case"number":return isFinite(N)?String(N):Y?Y(N):"null";case"boolean":return N===!0?"true":"false";case"undefined":return;case"bigint":if(G)return String(N);default:return Y?Y(N):void 0}}function z(L,N,D,A,B){switch(typeof N){case"string":return eV(N);case"object":{if(N===null)return"null";if(typeof N.toJSON==="function"){if(N=N.toJSON(L),typeof N!=="object")return z(L,N,D,A,B);if(N===null)return"null"}if(D.indexOf(N)!==-1)return X;let O=B;if(Array.isArray(N)){if(N.length===0)return"[]";if(W<D.length+1)return'"[Array]"';D.push(N),B+=A;let w=`
${B}`,j=`,
${B}`,C=Math.min(N.length,K),k=0;for(;k<C-1;k++){let I=z(String(k),N[k],D,A,B);w+=I!==void 0?I:"null",w+=j}let S=z(String(k),N[k],D,A,B);if(w+=S!==void 0?S:"null",N.length-1>K){let I=N.length-K-1;w+=`${j}"... ${oN(I)} not stringified"`}return w+=`
${O}`,D.pop(),`[${w}]`}let E=Object.keys(N),M=E.length;if(M===0)return"{}";if(W<D.length+1)return'"[Object]"';B+=A;let R=`,
${B}`,q="",_="",P=Math.min(M,K);if(v20(N))q+=N81(N,R,K),E=E.slice(N.length),P-=N.length,_=R;if(J)E=k20(E,Q);D.push(N);for(let w=0;w<P;w++){let j=E[w],C=z(j,N[j],D,A,B);if(C!==void 0)q+=`${_}${eV(j)}: ${C}`,_=R}if(M>K){let w=M-K;q+=`${_}"...": "${oN(w)} not stringified"`,_=R}if(_!=="")q=`
${B}${q}
${O}`;return D.pop(),`{${q}}`}case"number":return isFinite(N)?String(N):Y?Y(N):"null";case"boolean":return N===!0?"true":"false";case"undefined":return;case"bigint":if(G)return String(N);default:return Y?Y(N):void 0}}function V(L,N,D){switch(typeof N){case"string":return eV(N);case"object":{if(N===null)return"null";if(typeof N.toJSON==="function"){if(N=N.toJSON(L),typeof N!=="object")return V(L,N,D);if(N===null)return"null"}if(D.indexOf(N)!==-1)return X;let A="",B=N.length!==void 0;if(B&&Array.isArray(N)){if(N.length===0)return"[]";if(W<D.length+1)return'"[Array]"';D.push(N);let q=Math.min(N.length,K),_=0;for(;_<q-1;_++){let w=V(String(_),N[_],D);A+=w!==void 0?w:"null",A+=","}let P=V(String(_),N[_],D);if(A+=P!==void 0?P:"null",N.length-1>K){let w=N.length-K-1;A+=`,"... ${oN(w)} not stringified"`}return D.pop(),`[${A}]`}let O=Object.keys(N),E=O.length;if(E===0)return"{}";if(W<D.length+1)return'"[Object]"';let M="",R=Math.min(E,K);if(B&&v20(N))A+=N81(N,",",K),O=O.slice(N.length),R-=N.length,M=",";if(J)O=k20(O,Q);D.push(N);for(let q=0;q<R;q++){let _=O[q],P=V(_,N[_],D);if(P!==void 0)A+=`${M}${eV(_)}:${P}`,M=","}if(E>K){let q=E-K;A+=`${M}"...":"${oN(q)} not stringified"`}return D.pop(),`{${A}}`}case"number":return isFinite(N)?String(N):Y?Y(N):"null";case"boolean":return N===!0?"true":"false";case"undefined":return;case"bigint":if(G)return String(N);default:return Y?Y(N):void 0}}function F(L,N,D){if(arguments.length>1){let A="";if(typeof D==="number")A=" ".repeat(Math.min(D,10));else if(typeof D==="string")A=D.slice(0,10);if(N!=null){if(typeof N==="function")return Z("",{"":L},[],N,A,"");if(Array.isArray(N))return H("",L,[],ku4(N),A,"")}if(A.length!==0)return z("",L,[],A,"")}return V("",L,[])}return F}});var y20=o((Y65,O81)=>{var bu4=fJ(),{MESSAGE:hu4}=L7(),fu4=Qk();function gu4($,Y){if(typeof Y==="bigint")return Y.toString();return Y}O81.exports=bu4(($,Y)=>{let X=fu4.configure(Y);return $[hu4]=X($,Y.replacer||gu4,Y.space),$})});var M81=o((X65,E81)=>{var mu4=fJ();E81.exports=mu4(($,Y)=>{if(Y.message)return $.message=`[${Y.label}] ${$.message}`,$;return $.label=Y.label,$})});var q81=o((G65,R81)=>{var uu4=fJ(),{MESSAGE:pu4}=L7(),du4=Qk();R81.exports=uu4(($)=>{let Y={};if($.message)Y["@message"]=$.message,delete $.message;if($.timestamp)Y["@timestamp"]=$.timestamp,delete $.timestamp;return Y["@fields"]=$,$[pu4]=du4(Y),$})});var w81=o((J65,P81)=>{var cu4=fJ();function lu4($,Y,X){let G=Y.reduce((Q,W)=>{return Q[W]=$[W],delete $[W],Q},{}),J=Object.keys($).reduce((Q,W)=>{return Q[W]=$[W],delete $[W],Q},{});return Object.assign($,G,{[X]:J}),$}function iu4($,Y,X){return $[X]=Y.reduce((G,J)=>{return G[J]=$[J],delete $[J],G},{}),$}P81.exports=cu4(($,Y={})=>{let X="metadata";if(Y.key)X=Y.key;let G=[];if(!Y.fillExcept&&!Y.fillWith)G.push("level"),G.push("message");if(Y.fillExcept)G=Y.fillExcept;if(G.length>0)return lu4($,G,X);if(Y.fillWith)return iu4($,Y.fillWith,X);return $})});var $i=o((Q65,_81)=>{var gR=1000,mR=gR*60,uR=mR*60,eN=uR*24,nu4=eN*7,ru4=eN*365.25;_81.exports=function($,Y){Y=Y||{};var X=typeof $;if(X==="string"&&$.length>0)return au4($);else if(X==="number"&&isFinite($))return Y.long?ou4($):su4($);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify($))};function au4($){if($=String($),$.length>100)return;var Y=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec($);if(!Y)return;var X=parseFloat(Y[1]),G=(Y[2]||"ms").toLowerCase();switch(G){case"years":case"year":case"yrs":case"yr":case"y":return X*ru4;case"weeks":case"week":case"w":return X*nu4;case"days":case"day":case"d":return X*eN;case"hours":case"hour":case"hrs":case"hr":case"h":return X*uR;case"minutes":case"minute":case"mins":case"min":case"m":return X*mR;case"seconds":case"second":case"secs":case"sec":case"s":return X*gR;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return X;default:return}}function su4($){var Y=Math.abs($);if(Y>=eN)return Math.round($/eN)+"d";if(Y>=uR)return Math.round($/uR)+"h";if(Y>=mR)return Math.round($/mR)+"m";if(Y>=gR)return Math.round($/gR)+"s";return $+"ms"}function ou4($){var Y=Math.abs($);if(Y>=eN)return el($,Y,eN,"day");if(Y>=uR)return el($,Y,uR,"hour");if(Y>=mR)return el($,Y,mR,"minute");if(Y>=gR)return el($,Y,gR,"second");return $+" ms"}function el($,Y,X,G){var J=Y>=X*1.5;return Math.round($/X)+" "+G+(J?"s":"")}});var T81=o((Wk,j81)=>{var tu4=fJ(),eu4=$i();j81.exports=tu4(($)=>{let Y=+new Date;return Wk.diff=Y-(Wk.prevTime||Y),Wk.prevTime=Y,$.ms=`+${eu4(Wk.diff)}`,$})});var S81=o((W65,C81)=>{var $p4=A0("util").inspect,Yp4=fJ(),{LEVEL:Xp4,MESSAGE:I81,SPLAT:Gp4}=L7();C81.exports=Yp4(($,Y={})=>{let X=Object.assign({},$);return delete X[Xp4],delete X[I81],delete X[Gp4],$[I81]=$p4(X,!1,Y.depth||null,Y.colorize),$})});var k81=o((K65,Yi)=>{var{MESSAGE:Jp4}=L7();class b20{constructor($){this.template=$}transform($){return $[Jp4]=this.template($),$}}Yi.exports=($)=>new b20($);Yi.exports.Printf=Yi.exports.Format=b20});var y81=o((Z65,x81)=>{var Qp4=fJ(),{MESSAGE:v81}=L7(),Wp4=Qk();x81.exports=Qp4(($)=>{let Y=Wp4(Object.assign({},$,{level:void 0,message:void 0,splat:void 0})),X=$.padding&&$.padding[$.level]||"";if(Y!=="{}")$[v81]=`${$.level}:${X} ${$.message} ${Y}`;else $[v81]=`${$.level}:${X} ${$.message}`;return $})});var g81=o((U65,f81)=>{var Kp4=A0("util"),{SPLAT:b81}=L7(),Zp4=/%[scdjifoO%]/g,Up4=/%%/g;class h81{constructor($){this.options=$}_splat($,Y){let X=$.message,G=$[b81]||$.splat||[],J=X.match(Up4),Q=J&&J.length||0,K=Y.length-Q-G.length,Z=K<0?G.splice(K,-1*K):[],H=Z.length;if(H)for(let z=0;z<H;z++)Object.assign($,Z[z]);return $.message=Kp4.format(X,...G),$}transform($){let Y=$.message,X=$[b81]||$.splat;if(!X||!X.length)return $;let G=Y&&Y.match&&Y.match(Zp4);if(!G&&(X||X.length)){let J=X.length>1?X.splice(0):X,Q=J.length;if(Q)for(let W=0;W<Q;W++)Object.assign($,J[W]);return $}if(G)return this._splat($,G);return $}}f81.exports=($)=>new h81($)});var u81=o((Xi,m81)=>{(function($,Y){typeof Xi==="object"&&typeof m81<"u"?Y(Xi):typeof define==="function"&&define.amd?define(["exports"],Y):Y($.fecha={})})(Xi,function($){var Y=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,X="\\d\\d?",G="\\d\\d",J="\\d{3}",Q="\\d{4}",W="[^\\s]+",K=/\[([^]*?)\]/gm;function Z(x,y){var d=[];for(var u=0,b=x.length;u<b;u++)d.push(x[u].substr(0,y));return d}var H=function(x){return function(y,d){var u=d[x].map(function(g){return g.toLowerCase()}),b=u.indexOf(y.toLowerCase());if(b>-1)return b;return null}};function z(x){var y=[];for(var d=1;d<arguments.length;d++)y[d-1]=arguments[d];for(var u=0,b=y;u<b.length;u++){var g=b[u];for(var p in g)x[p]=g[p]}return x}var V=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],F=["January","February","March","April","May","June","July","August","September","October","November","December"],L=Z(F,3),N=Z(V,3),D={dayNamesShort:N,dayNames:V,monthNamesShort:L,monthNames:F,amPm:["am","pm"],DoFn:function(x){return x+["th","st","nd","rd"][x%10>3?0:(x-x%10!==10?1:0)*x%10]}},A=z({},D),B=function(x){return A=z(A,x)},O=function(x){return x.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},E=function(x,y){if(y===void 0)y=2;x=String(x);while(x.length<y)x="0"+x;return x},M={D:function(x){return String(x.getDate())},DD:function(x){return E(x.getDate())},Do:function(x,y){return y.DoFn(x.getDate())},d:function(x){return String(x.getDay())},dd:function(x){return E(x.getDay())},ddd:function(x,y){return y.dayNamesShort[x.getDay()]},dddd:function(x,y){return y.dayNames[x.getDay()]},M:function(x){return String(x.getMonth()+1)},MM:function(x){return E(x.getMonth()+1)},MMM:function(x,y){return y.monthNamesShort[x.getMonth()]},MMMM:function(x,y){return y.monthNames[x.getMonth()]},YY:function(x){return E(String(x.getFullYear()),4).substr(2)},YYYY:function(x){return E(x.getFullYear(),4)},h:function(x){return String(x.getHours()%12||12)},hh:function(x){return E(x.getHours()%12||12)},H:function(x){return String(x.getHours())},HH:function(x){return E(x.getHours())},m:function(x){return String(x.getMinutes())},mm:function(x){return E(x.getMinutes())},s:function(x){return String(x.getSeconds())},ss:function(x){return E(x.getSeconds())},S:function(x){return String(Math.round(x.getMilliseconds()/100))},SS:function(x){return E(Math.round(x.getMilliseconds()/10),2)},SSS:function(x){return E(x.getMilliseconds(),3)},a:function(x,y){return x.getHours()<12?y.amPm[0]:y.amPm[1]},A:function(x,y){return x.getHours()<12?y.amPm[0].toUpperCase():y.amPm[1].toUpperCase()},ZZ:function(x){var y=x.getTimezoneOffset();return(y>0?"-":"+")+E(Math.floor(Math.abs(y)/60)*100+Math.abs(y)%60,4)},Z:function(x){var y=x.getTimezoneOffset();return(y>0?"-":"+")+E(Math.floor(Math.abs(y)/60),2)+":"+E(Math.abs(y)%60,2)}},R=function(x){return+x-1},q=[null,X],_=[null,W],P=["isPm",W,function(x,y){var d=x.toLowerCase();if(d===y.amPm[0])return 0;else if(d===y.amPm[1])return 1;return null}],w=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(x){var y=(x+"").match(/([+-]|\d\d)/gi);if(y){var d=+y[1]*60+parseInt(y[2],10);return y[0]==="+"?d:-d}return 0}],j={D:["day",X],DD:["day",G],Do:["day",X+W,function(x){return parseInt(x,10)}],M:["month",X,R],MM:["month",G,R],YY:["year",G,function(x){var y=new Date,d=+(""+y.getFullYear()).substr(0,2);return+(""+(+x>68?d-1:d)+x)}],h:["hour",X,void 0,"isPm"],hh:["hour",G,void 0,"isPm"],H:["hour",X],HH:["hour",G],m:["minute",X],mm:["minute",G],s:["second",X],ss:["second",G],YYYY:["year",Q],S:["millisecond","\\d",function(x){return+x*100}],SS:["millisecond",G,function(x){return+x*10}],SSS:["millisecond",J],d:q,dd:q,ddd:_,dddd:_,MMM:["month",W,H("monthNamesShort")],MMMM:["month",W,H("monthNames")],a:P,A:P,ZZ:w,Z:w},C={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},k=function(x){return z(C,x)},S=function(x,y,d){if(y===void 0)y=C.default;if(d===void 0)d={};if(typeof x==="number")x=new Date(x);if(Object.prototype.toString.call(x)!=="[object Date]"||isNaN(x.getTime()))throw Error("Invalid Date pass to format");y=C[y]||y;var u=[];y=y.replace(K,function(g,p){return u.push(p),"@@@"});var b=z(z({},A),d);return y=y.replace(Y,function(g){return M[g](x,b)}),y.replace(/@@@/g,function(){return u.shift()})};function I(x,y,d){if(d===void 0)d={};if(typeof y!=="string")throw Error("Invalid format in fecha parse");if(y=C[y]||y,x.length>1000)return null;var u=new Date,b={year:u.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},g=[],p=[],h=y.replace(K,function(F0,D0){return p.push(O(D0)),"@@@"}),n={},t={};h=O(h).replace(Y,function(F0){var D0=j[F0],O0=D0[0],R0=D0[1],P0=D0[3];if(n[O0])throw Error("Invalid format. "+O0+" specified twice in format");if(n[O0]=!0,P0)t[P0]=!0;return g.push(D0),"("+R0+")"}),Object.keys(t).forEach(function(F0){if(!n[F0])throw Error("Invalid format. "+F0+" is required in specified format")}),h=h.replace(/@@@/g,function(){return p.shift()});var s=x.match(new RegExp(h,"i"));if(!s)return null;var K0=z(z({},A),d);for(var X0=1;X0<s.length;X0++){var a=g[X0-1],Q0=a[0],e=a[2],m=e?e(s[X0],K0):+s[X0];if(m==null)return null;b[Q0]=m}if(b.isPm===1&&b.hour!=null&&+b.hour!==12)b.hour=+b.hour+12;else if(b.isPm===0&&+b.hour===12)b.hour=0;var $0;if(b.timezoneOffset==null){$0=new Date(b.year,b.month,b.day,b.hour,b.minute,b.second,b.millisecond);var Y0=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]];for(var X0=0,Z0=Y0.length;X0<Z0;X0++)if(n[Y0[X0][0]]&&b[Y0[X0][0]]!==$0[Y0[X0][1]]())return null}else if($0=new Date(Date.UTC(b.year,b.month,b.day,b.hour,b.minute-b.timezoneOffset,b.second,b.millisecond)),b.month>11||b.month<0||b.day>31||b.day<1||b.hour>23||b.hour<0||b.minute>59||b.minute<0||b.second>59||b.second<0)return null;return $0}var v={format:S,parse:I,defaultI18n:D,setGlobalDateI18n:B,setGlobalDateMasks:k};$.assign=z,$.default=v,$.format=S,$.parse=I,$.defaultI18n=D,$.setGlobalDateI18n=B,$.setGlobalDateMasks=k,Object.defineProperty($,"__esModule",{value:!0})})});var d81=o((H65,p81)=>{var Hp4=u81(),zp4=fJ();p81.exports=zp4(($,Y={})=>{if(Y.format)$.timestamp=typeof Y.format==="function"?Y.format():Hp4.format(new Date,Y.format);if(!$.timestamp)$.timestamp=new Date().toISOString();if(Y.alias)$[Y.alias]=$.timestamp;return $})});var l81=o((z65,c81)=>{var h20=R20(),Vp4=fJ(),{MESSAGE:f20}=L7();c81.exports=Vp4(($,Y)=>{if(Y.level!==!1)$.level=h20.strip($.level);if(Y.message!==!1)$.message=h20.strip(String($.message));if(Y.raw!==!1&&$[f20])$[f20]=h20.strip(String($[f20]));return $})});var g20=o((Lp4)=>{var Fp4=Lp4.format=fJ();Lp4.levels=W81();function JX($,Y){Object.defineProperty(Fp4,$,{get(){return Y()},configurable:!0})}JX("align",function(){return Z81()});JX("errors",function(){return z81()});JX("cli",function(){return F81()});JX("combine",function(){return D81()});JX("colorize",function(){return ol()});JX("json",function(){return y20()});JX("label",function(){return M81()});JX("logstash",function(){return q81()});JX("metadata",function(){return w81()});JX("ms",function(){return T81()});JX("padLevels",function(){return T20()});JX("prettyPrint",function(){return S81()});JX("printf",function(){return k81()});JX("simple",function(){return y81()});JX("splat",function(){return g81()});JX("timestamp",function(){return d81()});JX("uncolorize",function(){return l81()})});var u20=o((Np4)=>{var{format:i81}=A0("util");Np4.warn={deprecated($){return()=>{throw Error(i81("{ %s } was removed in winston@3.0.0.",$))}},useFormat($){return()=>{throw Error([i81("{ %s } was removed in winston@3.0.0.",$),"Use a custom winston.format = winston.format(function) instead."].join(`
`))}},forFunctions($,Y,X){X.forEach((G)=>{$[G]=Np4.warn[Y](G)})},forProperties($,Y,X){X.forEach((G)=>{let J=Np4.warn[Y](G);Object.defineProperty($,G,{get:J,set:J})})}}});var n81=o((D65,Ap4)=>{Ap4.exports={name:"winston",description:"A logger for just about everything.",version:"3.19.0",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.8","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.7.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.9.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^4.4.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.57.0",hock:"^1.4.1",jest:"^29.7.0",rimraf:"5.0.10",split2:"^4.1.0","std-mocks":"^2.0.0",through2:"^4.0.2","winston-compat":"^0.1.5"},main:"./lib/winston.js",browser:"./dist/winston",types:"./index.d.ts",scripts:{lint:"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",test:"jest","test:unit":"jest -c test/jest.config.unit.js","test:integration":"jest -c test/jest.config.integration.js","test:typescript":"npx --package typescript tsc --project test",build:"babel lib -d dist",prebuild:"rimraf dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"}});var a81=o((N65,r81)=>{r81.exports=A0("util").deprecate});var d20=o((A65,o81)=>{function Bp4($,Y){var X=this,G=this._readableState&&this._readableState.destroyed,J=this._writableState&&this._writableState.destroyed;if(G||J){if(Y)Y($);else if($){if(!this._writableState)process.nextTick(p20,this,$);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(p20,this,$)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy($||null,function(Q){if(!Y&&Q)if(!X._writableState)process.nextTick(s81,X,Q);else if(!X._writableState.errorEmitted)X._writableState.errorEmitted=!0,process.nextTick(s81,X,Q);else process.nextTick(Gi,X);else if(Y)process.nextTick(Gi,X),Y(Q);else process.nextTick(Gi,X)}),this}function s81($,Y){p20($,Y),Gi($)}function Gi($){if($._writableState&&!$._writableState.emitClose)return;if($._readableState&&!$._readableState.emitClose)return;$.emit("close")}function Op4(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function p20($,Y){$.emit("error",Y)}function Ep4($,Y){var{_readableState:X,_writableState:G}=$;if(X&&X.autoDestroy||G&&G.autoDestroy)$.destroy(Y);else $.emit("error",Y)}o81.exports={destroy:Bp4,undestroy:Op4,errorOrDestroy:Ep4}});var $F=o((Pp4,$91)=>{var e81={};function Z2($,Y,X){if(!X)X=Error;function G(Q,W,K){if(typeof Y==="string")return Y;else return Y(Q,W,K)}class J extends X{constructor(Q,W,K){super(G(Q,W,K))}}J.prototype.name=X.name,J.prototype.code=$,e81[$]=J}function t81($,Y){if(Array.isArray($)){let X=$.length;if($=$.map((G)=>String(G)),X>2)return`one of ${Y} ${$.slice(0,X-1).join(", ")}, or `+$[X-1];else if(X===2)return`one of ${Y} ${$[0]} or ${$[1]}`;else return`of ${Y} ${$[0]}`}else return`of ${Y} ${String($)}`}function Mp4($,Y,X){return $.substr(!X||X<0?0:+X,Y.length)===Y}function Rp4($,Y,X){if(X===void 0||X>$.length)X=$.length;return $.substring(X-Y.length,X)===Y}function qp4($,Y,X){if(typeof X!=="number")X=0;if(X+Y.length>$.length)return!1;else return $.indexOf(Y,X)!==-1}Z2("ERR_INVALID_OPT_VALUE",function($,Y){return'The value "'+Y+'" is invalid for option "'+$+'"'},TypeError);Z2("ERR_INVALID_ARG_TYPE",function($,Y,X){let G;if(typeof Y==="string"&&Mp4(Y,"not "))G="must not be",Y=Y.replace(/^not /,"");else G="must be";let J;if(Rp4($," argument"))J=`The ${$} ${G} ${t81(Y,"type")}`;else{let Q=qp4($,".")?"property":"argument";J=`The "${$}" ${Q} ${G} ${t81(Y,"type")}`}return J+=`. Received type ${typeof X}`,J},TypeError);Z2("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Z2("ERR_METHOD_NOT_IMPLEMENTED",function($){return"The "+$+" method is not implemented"});Z2("ERR_STREAM_PREMATURE_CLOSE","Premature close");Z2("ERR_STREAM_DESTROYED",function($){return"Cannot call "+$+" after a stream was destroyed"});Z2("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Z2("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Z2("ERR_STREAM_WRITE_AFTER_END","write after end");Z2("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Z2("ERR_UNKNOWN_ENCODING",function($){return"Unknown encoding: "+$},TypeError);Z2("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Pp4.codes=e81});var c20=o((B65,Y91)=>{var _p4=$F().codes.ERR_INVALID_OPT_VALUE;function jp4($,Y,X){return $.highWaterMark!=null?$.highWaterMark:Y?$[X]:null}function Tp4($,Y,X,G){var J=jp4(Y,G,X);if(J!=null){if(!(isFinite(J)&&Math.floor(J)===J)||J<0){var Q=G?X:"highWaterMark";throw new _p4(Q,J)}return Math.floor(J)}return $.objectMode?16:16384}Y91.exports={getHighWaterMark:Tp4}});var X91=o((O65,l20)=>{if(typeof Object.create==="function")l20.exports=function(Y,X){if(X)Y.super_=X,Y.prototype=Object.create(X.prototype,{constructor:{value:Y,enumerable:!1,writable:!0,configurable:!0}})};else l20.exports=function(Y,X){if(X){Y.super_=X;var G=function(){};G.prototype=X.prototype,Y.prototype=new G,Y.prototype.constructor=Y}}});var $A=o((E65,i20)=>{try{if(Ji=A0("util"),typeof Ji.inherits!=="function")throw"";i20.exports=Ji.inherits}catch($){i20.exports=X91()}var Ji});var Z91=o((M65,K91)=>{function G91($,Y){var X=Object.keys($);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols($);Y&&(G=G.filter(function(J){return Object.getOwnPropertyDescriptor($,J).enumerable})),X.push.apply(X,G)}return X}function J91($){for(var Y=1;Y<arguments.length;Y++){var X=arguments[Y]!=null?arguments[Y]:{};Y%2?G91(Object(X),!0).forEach(function(G){Ip4($,G,X[G])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(X)):G91(Object(X)).forEach(function(G){Object.defineProperty($,G,Object.getOwnPropertyDescriptor(X,G))})}return $}function Ip4($,Y,X){if(Y=W91(Y),Y in $)Object.defineProperty($,Y,{value:X,enumerable:!0,configurable:!0,writable:!0});else $[Y]=X;return $}function Cp4($,Y){if(!($ instanceof Y))throw TypeError("Cannot call a class as a function")}function Q91($,Y){for(var X=0;X<Y.length;X++){var G=Y[X];if(G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G)G.writable=!0;Object.defineProperty($,W91(G.key),G)}}function Sp4($,Y,X){if(Y)Q91($.prototype,Y);if(X)Q91($,X);return Object.defineProperty($,"prototype",{writable:!1}),$}function W91($){var Y=kp4($,"string");return typeof Y==="symbol"?Y:String(Y)}function kp4($,Y){if(typeof $!=="object"||$===null)return $;var X=$[Symbol.toPrimitive];if(X!==void 0){var G=X.call($,Y||"default");if(typeof G!=="object")return G;throw TypeError("@@toPrimitive must return a primitive value.")}return(Y==="string"?String:Number)($)}var vp4=A0("buffer"),Qi=vp4.Buffer,xp4=A0("util"),n20=xp4.inspect,yp4=n20&&n20.custom||"inspect";function bp4($,Y,X){Qi.prototype.copy.call($,Y,X)}K91.exports=function(){function $(){Cp4(this,$),this.head=null,this.tail=null,this.length=0}return Sp4($,[{key:"push",value:function(X){var G={data:X,next:null};if(this.length>0)this.tail.next=G;else this.head=G;this.tail=G,++this.length}},{key:"unshift",value:function(X){var G={data:X,next:this.head};if(this.length===0)this.tail=G;this.head=G,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var X=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,X}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(X){if(this.length===0)return"";var G=this.head,J=""+G.data;while(G=G.next)J+=X+G.data;return J}},{key:"concat",value:function(X){if(this.length===0)return Qi.alloc(0);var G=Qi.allocUnsafe(X>>>0),J=this.head,Q=0;while(J)bp4(J.data,G,Q),Q+=J.data.length,J=J.next;return G}},{key:"consume",value:function(X,G){var J;if(X<this.head.data.length)J=this.head.data.slice(0,X),this.head.data=this.head.data.slice(X);else if(X===this.head.data.length)J=this.shift();else J=G?this._getString(X):this._getBuffer(X);return J}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(X){var G=this.head,J=1,Q=G.data;X-=Q.length;while(G=G.next){var W=G.data,K=X>W.length?W.length:X;if(K===W.length)Q+=W;else Q+=W.slice(0,X);if(X-=K,X===0){if(K===W.length)if(++J,G.next)this.head=G.next;else this.head=this.tail=null;else this.head=G,G.data=W.slice(K);break}++J}return this.length-=J,Q}},{key:"_getBuffer",value:function(X){var G=Qi.allocUnsafe(X),J=this.head,Q=1;J.data.copy(G),X-=J.data.length;while(J=J.next){var W=J.data,K=X>W.length?W.length:X;if(W.copy(G,G.length-X,0,K),X-=K,X===0){if(K===W.length)if(++Q,J.next)this.head=J.next;else this.head=this.tail=null;else this.head=J,J.data=W.slice(K);break}++Q}return this.length-=Q,G}},{key:yp4,value:function(X,G){return n20(this,J91(J91({},G),{},{depth:0,customInspect:!1}))}}]),$}()});var z91=o((r20,H91)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Wi=A0("buffer"),hU=Wi.Buffer;function U91($,Y){for(var X in $)Y[X]=$[X]}if(hU.from&&hU.alloc&&hU.allocUnsafe&&hU.allocUnsafeSlow)H91.exports=Wi;else U91(Wi,r20),r20.Buffer=YA;function YA($,Y,X){return hU($,Y,X)}YA.prototype=Object.create(hU.prototype);U91(hU,YA);YA.from=function($,Y,X){if(typeof $==="number")throw TypeError("Argument must not be a number");return hU($,Y,X)};YA.alloc=function($,Y,X){if(typeof $!=="number")throw TypeError("Argument must be a number");var G=hU($);if(Y!==void 0)if(typeof X==="string")G.fill(Y,X);else G.fill(Y);else G.fill(0);return G};YA.allocUnsafe=function($){if(typeof $!=="number")throw TypeError("Argument must be a number");return hU($)};YA.allocUnsafeSlow=function($){if(typeof $!=="number")throw TypeError("Argument must be a number");return Wi.SlowBuffer($)}});var o20=o((sp4)=>{var s20=z91().Buffer,V91=s20.isEncoding||function($){switch($=""+$,$&&$.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function hp4($){if(!$)return"utf8";var Y;while(!0)switch($){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return $;default:if(Y)return;$=(""+$).toLowerCase(),Y=!0}}function fp4($){var Y=hp4($);if(typeof Y!=="string"&&(s20.isEncoding===V91||!V91($)))throw Error("Unknown encoding: "+$);return Y||$}sp4.StringDecoder=Kk;function Kk($){this.encoding=fp4($);var Y;switch(this.encoding){case"utf16le":this.text=cp4,this.end=lp4,Y=4;break;case"utf8":this.fillLast=up4,Y=4;break;case"base64":this.text=ip4,this.end=np4,Y=3;break;default:this.write=rp4,this.end=ap4;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=s20.allocUnsafe(Y)}Kk.prototype.write=function($){if($.length===0)return"";var Y,X;if(this.lastNeed){if(Y=this.fillLast($),Y===void 0)return"";X=this.lastNeed,this.lastNeed=0}else X=0;if(X<$.length)return Y?Y+this.text($,X):this.text($,X);return Y||""};Kk.prototype.end=dp4;Kk.prototype.text=pp4;Kk.prototype.fillLast=function($){if(this.lastNeed<=$.length)return $.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,this.lastTotal-this.lastNeed,0,$.length),this.lastNeed-=$.length};function a20($){if($<=127)return 0;else if($>>5===6)return 2;else if($>>4===14)return 3;else if($>>3===30)return 4;return $>>6===2?-1:-2}function gp4($,Y,X){var G=Y.length-1;if(G<X)return 0;var J=a20(Y[G]);if(J>=0){if(J>0)$.lastNeed=J-1;return J}if(--G<X||J===-2)return 0;if(J=a20(Y[G]),J>=0){if(J>0)$.lastNeed=J-2;return J}if(--G<X||J===-2)return 0;if(J=a20(Y[G]),J>=0){if(J>0)if(J===2)J=0;else $.lastNeed=J-3;return J}return 0}function mp4($,Y,X){if((Y[0]&192)!==128)return $.lastNeed=0,"\uFFFD";if($.lastNeed>1&&Y.length>1){if((Y[1]&192)!==128)return $.lastNeed=1,"\uFFFD";if($.lastNeed>2&&Y.length>2){if((Y[2]&192)!==128)return $.lastNeed=2,"\uFFFD"}}}function up4($){var Y=this.lastTotal-this.lastNeed,X=mp4(this,$,Y);if(X!==void 0)return X;if(this.lastNeed<=$.length)return $.copy(this.lastChar,Y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);$.copy(this.lastChar,Y,0,$.length),this.lastNeed-=$.length}function pp4($,Y){var X=gp4(this,$,Y);if(!this.lastNeed)return $.toString("utf8",Y);this.lastTotal=X;var G=$.length-(X-this.lastNeed);return $.copy(this.lastChar,0,G),$.toString("utf8",Y,G)}function dp4($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+"\uFFFD";return Y}function cp4($,Y){if(($.length-Y)%2===0){var X=$.toString("utf16le",Y);if(X){var G=X.charCodeAt(X.length-1);if(G>=55296&&G<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1],X.slice(0,-1)}return X}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=$[$.length-1],$.toString("utf16le",Y,$.length-1)}function lp4($){var Y=$&&$.length?this.write($):"";if(this.lastNeed){var X=this.lastTotal-this.lastNeed;return Y+this.lastChar.toString("utf16le",0,X)}return Y}function ip4($,Y){var X=($.length-Y)%3;if(X===0)return $.toString("base64",Y);if(this.lastNeed=3-X,this.lastTotal=3,X===1)this.lastChar[0]=$[$.length-1];else this.lastChar[0]=$[$.length-2],this.lastChar[1]=$[$.length-1];return $.toString("base64",Y,$.length-X)}function np4($){var Y=$&&$.length?this.write($):"";if(this.lastNeed)return Y+this.lastChar.toString("base64",0,3-this.lastNeed);return Y}function rp4($){return $.toString(this.encoding)}function ap4($){return $&&$.length?this.write($):""}});var Ki=o((q65,D91)=>{var F91=$F().codes.ERR_STREAM_PREMATURE_CLOSE;function tp4($){var Y=!1;return function(){if(Y)return;Y=!0;for(var X=arguments.length,G=Array(X),J=0;J<X;J++)G[J]=arguments[J];$.apply(this,G)}}function ep4(){}function $d4($){return $.setHeader&&typeof $.abort==="function"}function L91($,Y,X){if(typeof Y==="function")return L91($,null,Y);if(!Y)Y={};X=tp4(X||ep4);var G=Y.readable||Y.readable!==!1&&$.readable,J=Y.writable||Y.writable!==!1&&$.writable,Q=function(){if(!$.writable)K()},W=$._writableState&&$._writableState.finished,K=function(){if(J=!1,W=!0,!G)X.call($)},Z=$._readableState&&$._readableState.endEmitted,H=function(){if(G=!1,Z=!0,!J)X.call($)},z=function(N){X.call($,N)},V=function(){var N;if(G&&!Z){if(!$._readableState||!$._readableState.ended)N=new F91;return X.call($,N)}if(J&&!W){if(!$._writableState||!$._writableState.ended)N=new F91;return X.call($,N)}},F=function(){$.req.on("finish",K)};if($d4($))if($.on("complete",K),$.on("abort",V),$.req)F();else $.on("request",F);else if(J&&!$._writableState)$.on("end",Q),$.on("close",Q);if($.on("end",H),$.on("finish",K),Y.error!==!1)$.on("error",z);return $.on("close",V),function(){if($.removeListener("complete",K),$.removeListener("abort",V),$.removeListener("request",F),$.req)$.req.removeListener("finish",K);$.removeListener("end",Q),$.removeListener("close",Q),$.removeListener("finish",K),$.removeListener("end",H),$.removeListener("error",z),$.removeListener("close",V)}}D91.exports=L91});var A91=o((P65,N91)=>{var Zi;function YF($,Y,X){if(Y=Yd4(Y),Y in $)Object.defineProperty($,Y,{value:X,enumerable:!0,configurable:!0,writable:!0});else $[Y]=X;return $}function Yd4($){var Y=Xd4($,"string");return typeof Y==="symbol"?Y:String(Y)}function Xd4($,Y){if(typeof $!=="object"||$===null)return $;var X=$[Symbol.toPrimitive];if(X!==void 0){var G=X.call($,Y||"default");if(typeof G!=="object")return G;throw TypeError("@@toPrimitive must return a primitive value.")}return(Y==="string"?String:Number)($)}var Gd4=Ki(),XF=Symbol("lastResolve"),XA=Symbol("lastReject"),Zk=Symbol("error"),Ui=Symbol("ended"),GA=Symbol("lastPromise"),t20=Symbol("handlePromise"),JA=Symbol("stream");function GF($,Y){return{value:$,done:Y}}function Jd4($){var Y=$[XF];if(Y!==null){var X=$[JA].read();if(X!==null)$[GA]=null,$[XF]=null,$[XA]=null,Y(GF(X,!1))}}function Qd4($){process.nextTick(Jd4,$)}function Wd4($,Y){return function(X,G){$.then(function(){if(Y[Ui]){X(GF(void 0,!0));return}Y[t20](X,G)},G)}}var Kd4=Object.getPrototypeOf(function(){}),Zd4=Object.setPrototypeOf((Zi={get stream(){return this[JA]},next:function(){var Y=this,X=this[Zk];if(X!==null)return Promise.reject(X);if(this[Ui])return Promise.resolve(GF(void 0,!0));if(this[JA].destroyed)return new Promise(function(W,K){process.nextTick(function(){if(Y[Zk])K(Y[Zk]);else W(GF(void 0,!0))})});var G=this[GA],J;if(G)J=new Promise(Wd4(G,this));else{var Q=this[JA].read();if(Q!==null)return Promise.resolve(GF(Q,!1));J=new Promise(this[t20])}return this[GA]=J,J}},YF(Zi,Symbol.asyncIterator,function(){return this}),YF(Zi,"return",function(){var Y=this;return new Promise(function(X,G){Y[JA].destroy(null,function(J){if(J){G(J);return}X(GF(void 0,!0))})})}),Zi),Kd4),Ud4=function(Y){var X,G=Object.create(Zd4,(X={},YF(X,JA,{value:Y,writable:!0}),YF(X,XF,{value:null,writable:!0}),YF(X,XA,{value:null,writable:!0}),YF(X,Zk,{value:null,writable:!0}),YF(X,Ui,{value:Y._readableState.endEmitted,writable:!0}),YF(X,t20,{value:function(Q,W){var K=G[JA].read();if(K)G[GA]=null,G[XF]=null,G[XA]=null,Q(GF(K,!1));else G[XF]=Q,G[XA]=W},writable:!0}),X));return G[GA]=null,Gd4(Y,function(J){if(J&&J.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Q=G[XA];if(Q!==null)G[GA]=null,G[XF]=null,G[XA]=null,Q(J);G[Zk]=J;return}var W=G[XF];if(W!==null)G[GA]=null,G[XF]=null,G[XA]=null,W(GF(void 0,!0));G[Ui]=!0}),Y.on("readable",Qd4.bind(null,G)),G};N91.exports=Ud4});var M91=o((w65,E91)=>{function B91($,Y,X,G,J,Q,W){try{var K=$[Q](W),Z=K.value}catch(H){X(H);return}if(K.done)Y(Z);else Promise.resolve(Z).then(G,J)}function Hd4($){return function(){var Y=this,X=arguments;return new Promise(function(G,J){var Q=$.apply(Y,X);function W(Z){B91(Q,G,J,W,K,"next",Z)}function K(Z){B91(Q,G,J,W,K,"throw",Z)}W(void 0)})}}function O91($,Y){var X=Object.keys($);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols($);Y&&(G=G.filter(function(J){return Object.getOwnPropertyDescriptor($,J).enumerable})),X.push.apply(X,G)}return X}function zd4($){for(var Y=1;Y<arguments.length;Y++){var X=arguments[Y]!=null?arguments[Y]:{};Y%2?O91(Object(X),!0).forEach(function(G){Vd4($,G,X[G])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(X)):O91(Object(X)).forEach(function(G){Object.defineProperty($,G,Object.getOwnPropertyDescriptor(X,G))})}return $}function Vd4($,Y,X){if(Y=Fd4(Y),Y in $)Object.defineProperty($,Y,{value:X,enumerable:!0,configurable:!0,writable:!0});else $[Y]=X;return $}function Fd4($){var Y=Ld4($,"string");return typeof Y==="symbol"?Y:String(Y)}function Ld4($,Y){if(typeof $!=="object"||$===null)return $;var X=$[Symbol.toPrimitive];if(X!==void 0){var G=X.call($,Y||"default");if(typeof G!=="object")return G;throw TypeError("@@toPrimitive must return a primitive value.")}return(Y==="string"?String:Number)($)}var Dd4=$F().codes.ERR_INVALID_ARG_TYPE;function Nd4($,Y,X){var G;if(Y&&typeof Y.next==="function")G=Y;else if(Y&&Y[Symbol.asyncIterator])G=Y[Symbol.asyncIterator]();else if(Y&&Y[Symbol.iterator])G=Y[Symbol.iterator]();else throw new Dd4("iterable",["Iterable"],Y);var J=new $(zd4({objectMode:!0},X)),Q=!1;J._read=function(){if(!Q)Q=!0,W()};function W(){return K.apply(this,arguments)}function K(){return K=Hd4(function*(){try{var Z=yield G.next(),H=Z.value,z=Z.done;if(z)J.push(null);else if(J.push(yield H))W();else Q=!1}catch(V){J.destroy(V)}}),K.apply(this,arguments)}return J}E91.exports=Nd4});var ZK0=o((j65,S91)=>{S91.exports=d8;var pR;d8.ReadableState=w91;var _65=A0("events").EventEmitter,P91=function(Y,X){return Y.listeners(X).length},Hk=A0("stream"),Hi=A0("buffer").Buffer,Ad4=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Bd4($){return Hi.from($)}function Od4($){return Hi.isBuffer($)||$ instanceof Ad4}var e20=A0("util"),e6;if(e20&&e20.debuglog)e6=e20.debuglog("stream");else e6=function(){};var Ed4=Z91(),WK0=d20(),Md4=c20(),Rd4=Md4.getHighWaterMark,zi=$F().codes,qd4=zi.ERR_INVALID_ARG_TYPE,Pd4=zi.ERR_STREAM_PUSH_AFTER_EOF,wd4=zi.ERR_METHOD_NOT_IMPLEMENTED,_d4=zi.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,dR,$K0,YK0;$A()(d8,Hk);var Uk=WK0.errorOrDestroy,XK0=["error","close","destroy","pause","resume"];function jd4($,Y,X){if(typeof $.prependListener==="function")return $.prependListener(Y,X);if(!$._events||!$._events[Y])$.on(Y,X);else if(Array.isArray($._events[Y]))$._events[Y].unshift(X);else $._events[Y]=[X,$._events[Y]]}function w91($,Y,X){if(pR=pR||QA(),$=$||{},typeof X!=="boolean")X=Y instanceof pR;if(this.objectMode=!!$.objectMode,X)this.objectMode=this.objectMode||!!$.readableObjectMode;if(this.highWaterMark=Rd4(this,$,"readableHighWaterMark",X),this.buffer=new Ed4,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=$.emitClose!==!1,this.autoDestroy=!!$.autoDestroy,this.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding){if(!dR)dR=o20().StringDecoder;this.decoder=new dR($.encoding),this.encoding=$.encoding}}function d8($){if(pR=pR||QA(),!(this instanceof d8))return new d8($);var Y=this instanceof pR;if(this._readableState=new w91($,this,Y),this.readable=!0,$){if(typeof $.read==="function")this._read=$.read;if(typeof $.destroy==="function")this._destroy=$.destroy}Hk.call(this)}Object.defineProperty(d8.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(Y){if(!this._readableState)return;this._readableState.destroyed=Y}});d8.prototype.destroy=WK0.destroy;d8.prototype._undestroy=WK0.undestroy;d8.prototype._destroy=function($,Y){Y($)};d8.prototype.push=function($,Y){var X=this._readableState,G;if(!X.objectMode){if(typeof $==="string"){if(Y=Y||X.defaultEncoding,Y!==X.encoding)$=Hi.from($,Y),Y="";G=!0}}else G=!0;return _91(this,$,Y,!1,G)};d8.prototype.unshift=function($){return _91(this,$,null,!0,!1)};function _91($,Y,X,G,J){e6("readableAddChunk",Y);var Q=$._readableState;if(Y===null)Q.reading=!1,Cd4($,Q);else{var W;if(!J)W=Td4(Q,Y);if(W)Uk($,W);else if(Q.objectMode||Y&&Y.length>0){if(typeof Y!=="string"&&!Q.objectMode&&Object.getPrototypeOf(Y)!==Hi.prototype)Y=Bd4(Y);if(G)if(Q.endEmitted)Uk($,new _d4);else GK0($,Q,Y,!0);else if(Q.ended)Uk($,new Pd4);else if(Q.destroyed)return!1;else if(Q.reading=!1,Q.decoder&&!X)if(Y=Q.decoder.write(Y),Q.objectMode||Y.length!==0)GK0($,Q,Y,!1);else QK0($,Q);else GK0($,Q,Y,!1)}else if(!G)Q.reading=!1,QK0($,Q)}return!Q.ended&&(Q.length<Q.highWaterMark||Q.length===0)}function GK0($,Y,X,G){if(Y.flowing&&Y.length===0&&!Y.sync)Y.awaitDrain=0,$.emit("data",X);else{if(Y.length+=Y.objectMode?1:X.length,G)Y.buffer.unshift(X);else Y.buffer.push(X);if(Y.needReadable)Vi($)}QK0($,Y)}function Td4($,Y){var X;if(!Od4(Y)&&typeof Y!=="string"&&Y!==void 0&&!$.objectMode)X=new qd4("chunk",["string","Buffer","Uint8Array"],Y);return X}d8.prototype.isPaused=function(){return this._readableState.flowing===!1};d8.prototype.setEncoding=function($){if(!dR)dR=o20().StringDecoder;var Y=new dR($);this._readableState.decoder=Y,this._readableState.encoding=this._readableState.decoder.encoding;var X=this._readableState.buffer.head,G="";while(X!==null)G+=Y.write(X.data),X=X.next;if(this._readableState.buffer.clear(),G!=="")this._readableState.buffer.push(G);return this._readableState.length=G.length,this};var R91=1073741824;function Id4($){if($>=R91)$=R91;else $--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++;return $}function q91($,Y){if($<=0||Y.length===0&&Y.ended)return 0;if(Y.objectMode)return 1;if($!==$)if(Y.flowing&&Y.length)return Y.buffer.head.data.length;else return Y.length;if($>Y.highWaterMark)Y.highWaterMark=Id4($);if($<=Y.length)return $;if(!Y.ended)return Y.needReadable=!0,0;return Y.length}d8.prototype.read=function($){e6("read",$),$=parseInt($,10);var Y=this._readableState,X=$;if($!==0)Y.emittedReadable=!1;if($===0&&Y.needReadable&&((Y.highWaterMark!==0?Y.length>=Y.highWaterMark:Y.length>0)||Y.ended)){if(e6("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended)JK0(this);else Vi(this);return null}if($=q91($,Y),$===0&&Y.ended){if(Y.length===0)JK0(this);return null}var G=Y.needReadable;if(e6("need readable",G),Y.length===0||Y.length-$<Y.highWaterMark)G=!0,e6("length less than watermark",G);if(Y.ended||Y.reading)G=!1,e6("reading or ended",G);else if(G){if(e6("do read"),Y.reading=!0,Y.sync=!0,Y.length===0)Y.needReadable=!0;if(this._read(Y.highWaterMark),Y.sync=!1,!Y.reading)$=q91(X,Y)}var J;if($>0)J=I91($,Y);else J=null;if(J===null)Y.needReadable=Y.length<=Y.highWaterMark,$=0;else Y.length-=$,Y.awaitDrain=0;if(Y.length===0){if(!Y.ended)Y.needReadable=!0;if(X!==$&&Y.ended)JK0(this)}if(J!==null)this.emit("data",J);return J};function Cd4($,Y){if(e6("onEofChunk"),Y.ended)return;if(Y.decoder){var X=Y.decoder.end();if(X&&X.length)Y.buffer.push(X),Y.length+=Y.objectMode?1:X.length}if(Y.ended=!0,Y.sync)Vi($);else if(Y.needReadable=!1,!Y.emittedReadable)Y.emittedReadable=!0,j91($)}function Vi($){var Y=$._readableState;if(e6("emitReadable",Y.needReadable,Y.emittedReadable),Y.needReadable=!1,!Y.emittedReadable)e6("emitReadable",Y.flowing),Y.emittedReadable=!0,process.nextTick(j91,$)}function j91($){var Y=$._readableState;if(e6("emitReadable_",Y.destroyed,Y.length,Y.ended),!Y.destroyed&&(Y.length||Y.ended))$.emit("readable"),Y.emittedReadable=!1;Y.needReadable=!Y.flowing&&!Y.ended&&Y.length<=Y.highWaterMark,KK0($)}function QK0($,Y){if(!Y.readingMore)Y.readingMore=!0,process.nextTick(Sd4,$,Y)}function Sd4($,Y){while(!Y.reading&&!Y.ended&&(Y.length<Y.highWaterMark||Y.flowing&&Y.length===0)){var X=Y.length;if(e6("maybeReadMore read 0"),$.read(0),X===Y.length)break}Y.readingMore=!1}d8.prototype._read=function($){Uk(this,new wd4("_read()"))};d8.prototype.pipe=function($,Y){var X=this,G=this._readableState;switch(G.pipesCount){case 0:G.pipes=$;break;case 1:G.pipes=[G.pipes,$];break;default:G.pipes.push($);break}G.pipesCount+=1,e6("pipe count=%d opts=%j",G.pipesCount,Y);var J=(!Y||Y.end!==!1)&&$!==process.stdout&&$!==process.stderr,Q=J?K:D;if(G.endEmitted)process.nextTick(Q);else X.once("end",Q);$.on("unpipe",W);function W(A,B){if(e6("onunpipe"),A===X){if(B&&B.hasUnpiped===!1)B.hasUnpiped=!0,z()}}function K(){e6("onend"),$.end()}var Z=kd4(X);$.on("drain",Z);var H=!1;function z(){if(e6("cleanup"),$.removeListener("close",L),$.removeListener("finish",N),$.removeListener("drain",Z),$.removeListener("error",F),$.removeListener("unpipe",W),X.removeListener("end",K),X.removeListener("end",D),X.removeListener("data",V),H=!0,G.awaitDrain&&(!$._writableState||$._writableState.needDrain))Z()}X.on("data",V);function V(A){e6("ondata");var B=$.write(A);if(e6("dest.write",B),B===!1){if((G.pipesCount===1&&G.pipes===$||G.pipesCount>1&&C91(G.pipes,$)!==-1)&&!H)e6("false write response, pause",G.awaitDrain),G.awaitDrain++;X.pause()}}function F(A){if(e6("onerror",A),D(),$.removeListener("error",F),P91($,"error")===0)Uk($,A)}jd4($,"error",F);function L(){$.removeListener("finish",N),D()}$.once("close",L);function N(){e6("onfinish"),$.removeListener("close",L),D()}$.once("finish",N);function D(){e6("unpipe"),X.unpipe($)}if($.emit("pipe",X),!G.flowing)e6("pipe resume"),X.resume();return $};function kd4($){return function(){var X=$._readableState;if(e6("pipeOnDrain",X.awaitDrain),X.awaitDrain)X.awaitDrain--;if(X.awaitDrain===0&&P91($,"data"))X.flowing=!0,KK0($)}}d8.prototype.unpipe=function($){var Y=this._readableState,X={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1){if($&&$!==Y.pipes)return this;if(!$)$=Y.pipes;if(Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,$)$.emit("unpipe",this,X);return this}if(!$){var{pipes:G,pipesCount:J}=Y;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var Q=0;Q<J;Q++)G[Q].emit("unpipe",this,{hasUnpiped:!1});return this}var W=C91(Y.pipes,$);if(W===-1)return this;if(Y.pipes.splice(W,1),Y.pipesCount-=1,Y.pipesCount===1)Y.pipes=Y.pipes[0];return $.emit("unpipe",this,X),this};d8.prototype.on=function($,Y){var X=Hk.prototype.on.call(this,$,Y),G=this._readableState;if($==="data"){if(G.readableListening=this.listenerCount("readable")>0,G.flowing!==!1)this.resume()}else if($==="readable"){if(!G.endEmitted&&!G.readableListening){if(G.readableListening=G.needReadable=!0,G.flowing=!1,G.emittedReadable=!1,e6("on readable",G.length,G.reading),G.length)Vi(this);else if(!G.reading)process.nextTick(vd4,this)}}return X};d8.prototype.addListener=d8.prototype.on;d8.prototype.removeListener=function($,Y){var X=Hk.prototype.removeListener.call(this,$,Y);if($==="readable")process.nextTick(T91,this);return X};d8.prototype.removeAllListeners=function($){var Y=Hk.prototype.removeAllListeners.apply(this,arguments);if($==="readable"||$===void 0)process.nextTick(T91,this);return Y};function T91($){var Y=$._readableState;if(Y.readableListening=$.listenerCount("readable")>0,Y.resumeScheduled&&!Y.paused)Y.flowing=!0;else if($.listenerCount("data")>0)$.resume()}function vd4($){e6("readable nexttick read 0"),$.read(0)}d8.prototype.resume=function(){var $=this._readableState;if(!$.flowing)e6("resume"),$.flowing=!$.readableListening,xd4(this,$);return $.paused=!1,this};function xd4($,Y){if(!Y.resumeScheduled)Y.resumeScheduled=!0,process.nextTick(yd4,$,Y)}function yd4($,Y){if(e6("resume",Y.reading),!Y.reading)$.read(0);if(Y.resumeScheduled=!1,$.emit("resume"),KK0($),Y.flowing&&!Y.reading)$.read(0)}d8.prototype.pause=function(){if(e6("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)e6("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function KK0($){var Y=$._readableState;e6("flow",Y.flowing);while(Y.flowing&&$.read()!==null);}d8.prototype.wrap=function($){var Y=this,X=this._readableState,G=!1;$.on("end",function(){if(e6("wrapped end"),X.decoder&&!X.ended){var W=X.decoder.end();if(W&&W.length)Y.push(W)}Y.push(null)}),$.on("data",function(W){if(e6("wrapped data"),X.decoder)W=X.decoder.write(W);if(X.objectMode&&(W===null||W===void 0))return;else if(!X.objectMode&&(!W||!W.length))return;var K=Y.push(W);if(!K)G=!0,$.pause()});for(var J in $)if(this[J]===void 0&&typeof $[J]==="function")this[J]=function(K){return function(){return $[K].apply($,arguments)}}(J);for(var Q=0;Q<XK0.length;Q++)$.on(XK0[Q],this.emit.bind(this,XK0[Q]));return this._read=function(W){if(e6("wrapped _read",W),G)G=!1,$.resume()},this};if(typeof Symbol==="function")d8.prototype[Symbol.asyncIterator]=function(){if($K0===void 0)$K0=A91();return $K0(this)};Object.defineProperty(d8.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(d8.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(d8.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Y){if(this._readableState)this._readableState.flowing=Y}});d8._fromList=I91;Object.defineProperty(d8.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function I91($,Y){if(Y.length===0)return null;var X;if(Y.objectMode)X=Y.buffer.shift();else if(!$||$>=Y.length){if(Y.decoder)X=Y.buffer.join("");else if(Y.buffer.length===1)X=Y.buffer.first();else X=Y.buffer.concat(Y.length);Y.buffer.clear()}else X=Y.buffer.consume($,Y.decoder);return X}function JK0($){var Y=$._readableState;if(e6("endReadable",Y.endEmitted),!Y.endEmitted)Y.ended=!0,process.nextTick(bd4,Y,$)}function bd4($,Y){if(e6("endReadableNT",$.endEmitted,$.length),!$.endEmitted&&$.length===0){if($.endEmitted=!0,Y.readable=!1,Y.emit("end"),$.autoDestroy){var X=Y._writableState;if(!X||X.autoDestroy&&X.finished)Y.destroy()}}}if(typeof Symbol==="function")d8.from=function($,Y){if(YK0===void 0)YK0=M91();return YK0(d8,$,Y)};function C91($,Y){for(var X=0,G=$.length;X<G;X++)if($[X]===Y)return X;return-1}});var QA=o((T65,v91)=>{var hd4=Object.keys||function($){var Y=[];for(var X in $)Y.push(X);return Y};v91.exports=fU;var k91=ZK0(),UK0=Li();$A()(fU,k91);{Fi=hd4(UK0.prototype);for(zk=0;zk<Fi.length;zk++)if(Vk=Fi[zk],!fU.prototype[Vk])fU.prototype[Vk]=UK0.prototype[Vk]}var Fi,Vk,zk;function fU($){if(!(this instanceof fU))return new fU($);if(k91.call(this,$),UK0.call(this,$),this.allowHalfOpen=!0,$){if($.readable===!1)this.readable=!1;if($.writable===!1)this.writable=!1;if($.allowHalfOpen===!1)this.allowHalfOpen=!1,this.once("end",fd4)}}Object.defineProperty(fU.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(fU.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(fU.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function fd4(){if(this._writableState.ended)return;process.nextTick(gd4,this)}function gd4($){$.end()}Object.defineProperty(fU.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set:function(Y){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=Y,this._writableState.destroyed=Y}})});var Li=o((I65,g91)=>{g91.exports=i$;function y91($){var Y=this;this.next=null,this.entry=null,this.finish=function(){Vc4(Y,$)}}var cR;i$.WritableState=Lk;var md4={deprecate:a81()},b91=A0("stream"),Ni=A0("buffer").Buffer,ud4=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function pd4($){return Ni.from($)}function dd4($){return Ni.isBuffer($)||$ instanceof ud4}var zK0=d20(),cd4=c20(),ld4=cd4.getHighWaterMark,JF=$F().codes,id4=JF.ERR_INVALID_ARG_TYPE,nd4=JF.ERR_METHOD_NOT_IMPLEMENTED,rd4=JF.ERR_MULTIPLE_CALLBACK,ad4=JF.ERR_STREAM_CANNOT_PIPE,sd4=JF.ERR_STREAM_DESTROYED,od4=JF.ERR_STREAM_NULL_VALUES,td4=JF.ERR_STREAM_WRITE_AFTER_END,ed4=JF.ERR_UNKNOWN_ENCODING,lR=zK0.errorOrDestroy;$A()(i$,b91);function $c4(){}function Lk($,Y,X){if(cR=cR||QA(),$=$||{},typeof X!=="boolean")X=Y instanceof cR;if(this.objectMode=!!$.objectMode,X)this.objectMode=this.objectMode||!!$.writableObjectMode;this.highWaterMark=ld4(this,$,"writableHighWaterMark",X),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var G=$.decodeStrings===!1;this.decodeStrings=!G,this.defaultEncoding=$.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(J){Kc4(Y,J)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=$.emitClose!==!1,this.autoDestroy=!!$.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new y91(this)}Lk.prototype.getBuffer=function(){var Y=this.bufferedRequest,X=[];while(Y)X.push(Y),Y=Y.next;return X};(function(){try{Object.defineProperty(Lk.prototype,"buffer",{get:md4.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch($){}})();var Di;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")Di=Function.prototype[Symbol.hasInstance],Object.defineProperty(i$,Symbol.hasInstance,{value:function(Y){if(Di.call(this,Y))return!0;if(this!==i$)return!1;return Y&&Y._writableState instanceof Lk}});else Di=function(Y){return Y instanceof this};function i$($){cR=cR||QA();var Y=this instanceof cR;if(!Y&&!Di.call(i$,this))return new i$($);if(this._writableState=new Lk($,this,Y),this.writable=!0,$){if(typeof $.write==="function")this._write=$.write;if(typeof $.writev==="function")this._writev=$.writev;if(typeof $.destroy==="function")this._destroy=$.destroy;if(typeof $.final==="function")this._final=$.final}b91.call(this)}i$.prototype.pipe=function(){lR(this,new ad4)};function Yc4($,Y){var X=new td4;lR($,X),process.nextTick(Y,X)}function Xc4($,Y,X,G){var J;if(X===null)J=new od4;else if(typeof X!=="string"&&!Y.objectMode)J=new id4("chunk",["string","Buffer"],X);if(J)return lR($,J),process.nextTick(G,J),!1;return!0}i$.prototype.write=function($,Y,X){var G=this._writableState,J=!1,Q=!G.objectMode&&dd4($);if(Q&&!Ni.isBuffer($))$=pd4($);if(typeof Y==="function")X=Y,Y=null;if(Q)Y="buffer";else if(!Y)Y=G.defaultEncoding;if(typeof X!=="function")X=$c4;if(G.ending)Yc4(this,X);else if(Q||Xc4(this,G,$,X))G.pendingcb++,J=Jc4(this,G,Q,$,Y,X);return J};i$.prototype.cork=function(){this._writableState.corked++};i$.prototype.uncork=function(){var $=this._writableState;if($.corked){if($.corked--,!$.writing&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)h91(this,$)}};i$.prototype.setDefaultEncoding=function(Y){if(typeof Y==="string")Y=Y.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw new ed4(Y);return this._writableState.defaultEncoding=Y,this};Object.defineProperty(i$.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Gc4($,Y,X){if(!$.objectMode&&$.decodeStrings!==!1&&typeof Y==="string")Y=Ni.from(Y,X);return Y}Object.defineProperty(i$.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Jc4($,Y,X,G,J,Q){if(!X){var W=Gc4(Y,G,J);if(G!==W)X=!0,J="buffer",G=W}var K=Y.objectMode?1:G.length;Y.length+=K;var Z=Y.length<Y.highWaterMark;if(!Z)Y.needDrain=!0;if(Y.writing||Y.corked){var H=Y.lastBufferedRequest;if(Y.lastBufferedRequest={chunk:G,encoding:J,isBuf:X,callback:Q,next:null},H)H.next=Y.lastBufferedRequest;else Y.bufferedRequest=Y.lastBufferedRequest;Y.bufferedRequestCount+=1}else HK0($,Y,!1,K,G,J,Q);return Z}function HK0($,Y,X,G,J,Q,W){if(Y.writelen=G,Y.writecb=W,Y.writing=!0,Y.sync=!0,Y.destroyed)Y.onwrite(new sd4("write"));else if(X)$._writev(J,Y.onwrite);else $._write(J,Q,Y.onwrite);Y.sync=!1}function Qc4($,Y,X,G,J){if(--Y.pendingcb,X)process.nextTick(J,G),process.nextTick(Fk,$,Y),$._writableState.errorEmitted=!0,lR($,G);else J(G),$._writableState.errorEmitted=!0,lR($,G),Fk($,Y)}function Wc4($){$.writing=!1,$.writecb=null,$.length-=$.writelen,$.writelen=0}function Kc4($,Y){var X=$._writableState,G=X.sync,J=X.writecb;if(typeof J!=="function")throw new rd4;if(Wc4(X),Y)Qc4($,X,G,Y,J);else{var Q=f91(X)||$.destroyed;if(!Q&&!X.corked&&!X.bufferProcessing&&X.bufferedRequest)h91($,X);if(G)process.nextTick(x91,$,X,Q,J);else x91($,X,Q,J)}}function x91($,Y,X,G){if(!X)Zc4($,Y);Y.pendingcb--,G(),Fk($,Y)}function Zc4($,Y){if(Y.length===0&&Y.needDrain)Y.needDrain=!1,$.emit("drain")}function h91($,Y){Y.bufferProcessing=!0;var X=Y.bufferedRequest;if($._writev&&X&&X.next){var G=Y.bufferedRequestCount,J=Array(G),Q=Y.corkedRequestsFree;Q.entry=X;var W=0,K=!0;while(X){if(J[W]=X,!X.isBuf)K=!1;X=X.next,W+=1}if(J.allBuffers=K,HK0($,Y,!0,Y.length,J,"",Q.finish),Y.pendingcb++,Y.lastBufferedRequest=null,Q.next)Y.corkedRequestsFree=Q.next,Q.next=null;else Y.corkedRequestsFree=new y91(Y);Y.bufferedRequestCount=0}else{while(X){var{chunk:Z,encoding:H,callback:z}=X,V=Y.objectMode?1:Z.length;if(HK0($,Y,!1,V,Z,H,z),X=X.next,Y.bufferedRequestCount--,Y.writing)break}if(X===null)Y.lastBufferedRequest=null}Y.bufferedRequest=X,Y.bufferProcessing=!1}i$.prototype._write=function($,Y,X){X(new nd4("_write()"))};i$.prototype._writev=null;i$.prototype.end=function($,Y,X){var G=this._writableState;if(typeof $==="function")X=$,$=null,Y=null;else if(typeof Y==="function")X=Y,Y=null;if($!==null&&$!==void 0)this.write($,Y);if(G.corked)G.corked=1,this.uncork();if(!G.ending)zc4(this,G,X);return this};Object.defineProperty(i$.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function f91($){return $.ending&&$.length===0&&$.bufferedRequest===null&&!$.finished&&!$.writing}function Uc4($,Y){$._final(function(X){if(Y.pendingcb--,X)lR($,X);Y.prefinished=!0,$.emit("prefinish"),Fk($,Y)})}function Hc4($,Y){if(!Y.prefinished&&!Y.finalCalled)if(typeof $._final==="function"&&!Y.destroyed)Y.pendingcb++,Y.finalCalled=!0,process.nextTick(Uc4,$,Y);else Y.prefinished=!0,$.emit("prefinish")}function Fk($,Y){var X=f91(Y);if(X){if(Hc4($,Y),Y.pendingcb===0){if(Y.finished=!0,$.emit("finish"),Y.autoDestroy){var G=$._readableState;if(!G||G.autoDestroy&&G.endEmitted)$.destroy()}}}return X}function zc4($,Y,X){if(Y.ending=!0,Fk($,Y),X)if(Y.finished)process.nextTick(X);else $.once("finish",X);Y.ended=!0,$.writable=!1}function Vc4($,Y,X){var G=$.entry;$.entry=null;while(G){var J=G.callback;Y.pendingcb--,J(X),G=G.next}Y.corkedRequestsFree.next=$}Object.defineProperty(i$.prototype,"destroyed",{enumerable:!1,get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(Y){if(!this._writableState)return;this._writableState.destroyed=Y}});i$.prototype.destroy=zK0.destroy;i$.prototype._undestroy=zK0.undestroy;i$.prototype._destroy=function($,Y){Y($)}});var VK0=o((C65,p91)=>{var Fc4=A0("util"),m91=Li(),{LEVEL:u91}=L7(),Dk=p91.exports=function(Y={}){if(m91.call(this,{objectMode:!0,highWaterMark:Y.highWaterMark}),this.format=Y.format,this.level=Y.level,this.handleExceptions=Y.handleExceptions,this.handleRejections=Y.handleRejections,this.silent=Y.silent,Y.log)this.log=Y.log;if(Y.logv)this.logv=Y.logv;if(Y.close)this.close=Y.close;this.once("pipe",(X)=>{this.levels=X.levels,this.parent=X}),this.once("unpipe",(X)=>{if(X===this.parent){if(this.parent=null,this.close)this.close()}})};Fc4.inherits(Dk,m91);Dk.prototype._write=function(Y,X,G){if(this.silent||Y.exception===!0&&!this.handleExceptions)return G(null);let J=this.level||this.parent&&this.parent.level;if(!J||this.levels[J]>=this.levels[Y[u91]]){if(Y&&!this.format)return this.log(Y,G);let Q,W;try{W=this.format.transform(Object.assign({},Y),this.format.options)}catch(K){Q=K}if(Q||!W){if(G(),Q)throw Q;return}return this.log(W,G)}return this._writableState.sync=!1,G(null)};Dk.prototype._writev=function(Y,X){if(this.logv){let G=Y.filter(this._accept,this);if(!G.length)return X(null);return this.logv(G,X)}for(let G=0;G<Y.length;G++){if(!this._accept(Y[G]))continue;if(Y[G].chunk&&!this.format){this.log(Y[G].chunk,Y[G].callback);continue}let J,Q;try{Q=this.format.transform(Object.assign({},Y[G].chunk),this.format.options)}catch(W){J=W}if(J||!Q){if(Y[G].callback(),J)throw X(null),J}else this.log(Q,Y[G].callback)}return X(null)};Dk.prototype._accept=function(Y){let X=Y.chunk;if(this.silent)return!1;let G=this.level||this.parent&&this.parent.level;if(X.exception===!0||!G||this.levels[G]>=this.levels[X[u91]]){if(this.handleExceptions||X.exception!==!0)return!0}return!1};Dk.prototype._nop=function(){return}});var LK0=o((S65,c91)=>{var Lc4=A0("util"),{LEVEL:FK0}=L7(),d91=VK0(),Nk=c91.exports=function(Y={}){if(d91.call(this,Y),!Y.transport||typeof Y.transport.log!=="function")throw Error("Invalid transport, must be an object with a log method.");this.transport=Y.transport,this.level=this.level||Y.transport.level,this.handleExceptions=this.handleExceptions||Y.transport.handleExceptions,this._deprecated();function X(G){this.emit("error",G,this.transport)}if(!this.transport.__winstonError)this.transport.__winstonError=X.bind(this),this.transport.on("error",this.transport.__winstonError)};Lc4.inherits(Nk,d91);Nk.prototype._write=function(Y,X,G){if(this.silent||Y.exception===!0&&!this.handleExceptions)return G(null);if(!this.level||this.levels[this.level]>=this.levels[Y[FK0]])this.transport.log(Y[FK0],Y.message,Y,this._nop);G(null)};Nk.prototype._writev=function(Y,X){for(let G=0;G<Y.length;G++)if(this._accept(Y[G]))this.transport.log(Y[G].chunk[FK0],Y[G].chunk.message,Y[G].chunk,this._nop),Y[G].callback();return X(null)};Nk.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
`))};Nk.prototype.close=function(){if(this.transport.close)this.transport.close();if(this.transport.__winstonError)this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null}});var WA=o((k65,DK0)=>{DK0.exports=VK0();DK0.exports.LegacyTransportStream=LK0()});var n91=o((v65,i91)=>{var Dc4=A0("os"),{LEVEL:l91,MESSAGE:iR}=L7(),Nc4=WA();i91.exports=class extends Nc4{constructor(Y={}){super(Y);this.name=Y.name||"console",this.stderrLevels=this._stringArrayToSet(Y.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(Y.consoleWarnLevels),this.eol=typeof Y.eol==="string"?Y.eol:Dc4.EOL,this.forceConsole=Y.forceConsole||!1,this._consoleLog=console.log.bind(console),this._consoleWarn=console.warn.bind(console),this._consoleError=console.error.bind(console),this.setMaxListeners(30)}log(Y,X){if(setImmediate(()=>this.emit("logged",Y)),this.stderrLevels[Y[l91]]){if(console._stderr&&!this.forceConsole)console._stderr.write(`${Y[iR]}${this.eol}`);else this._consoleError(Y[iR]);if(X)X();return}else if(this.consoleWarnLevels[Y[l91]]){if(console._stderr&&!this.forceConsole)console._stderr.write(`${Y[iR]}${this.eol}`);else this._consoleWarn(Y[iR]);if(X)X();return}if(console._stdout&&!this.forceConsole)console._stdout.write(`${Y[iR]}${this.eol}`);else this._consoleLog(Y[iR]);if(X)X()}_stringArrayToSet(Y,X){if(!Y)return{};if(X=X||"Cannot make set from type other than Array of string elements",!Array.isArray(Y))throw Error(X);return Y.reduce((G,J)=>{if(typeof J!=="string")throw Error(X);return G[J]=!0,G},{})}}});var Ai=o((NK0,r91)=>{Object.defineProperty(NK0,"__esModule",{value:!0});NK0.default=Ac4;function Ac4($){return $&&typeof $.length==="number"&&$.length>=0&&$.length%1===0}r91.exports=NK0.default});var s91=o((AK0,a91)=>{Object.defineProperty(AK0,"__esModule",{value:!0});AK0.default=function($){return function(...Y){var X=Y.pop();return $.call(this,Y,X)}};a91.exports=AK0.default});var $51=o((e91)=>{Object.defineProperty(e91,"__esModule",{value:!0});e91.fallback=o91;e91.wrap=t91;var Ec4=e91.hasQueueMicrotask=typeof queueMicrotask==="function"&&queueMicrotask,Mc4=e91.hasSetImmediate=typeof setImmediate==="function"&&setImmediate,Rc4=e91.hasNextTick=typeof process==="object"&&typeof process.nextTick==="function";function o91($){setTimeout($,0)}function t91($){return(Y,...X)=>$(()=>Y(...X))}var Ak;if(Ec4)Ak=queueMicrotask;else if(Mc4)Ak=setImmediate;else if(Rc4)Ak=process.nextTick;else Ak=o91;e91.default=t91(Ak)});var Q51=o((BK0,J51)=>{Object.defineProperty(BK0,"__esModule",{value:!0});BK0.default=Sc4;var _c4=s91(),jc4=G51(_c4),Tc4=$51(),Ic4=G51(Tc4),Cc4=KA();function G51($){return $&&$.__esModule?$:{default:$}}function Sc4($){if((0,Cc4.isAsync)($))return function(...Y){let X=Y.pop(),G=$.apply(this,Y);return Y51(G,X)};return(0,jc4.default)(function(Y,X){var G;try{G=$.apply(this,Y)}catch(J){return X(J)}if(G&&typeof G.then==="function")return Y51(G,X);else X(null,G)})}function Y51($,Y){return $.then((X)=>{X51(Y,null,X)},(X)=>{X51(Y,X&&(X instanceof Error||X.message)?X:Error(X))})}function X51($,Y,X){try{$(Y,X)}catch(G){(0,Ic4.default)((J)=>{throw J},G)}}J51.exports=BK0.default});var KA=o((K51)=>{Object.defineProperty(K51,"__esModule",{value:!0});K51.isAsyncIterable=K51.isAsyncGenerator=K51.isAsync=void 0;var vc4=Q51(),xc4=yc4(vc4);function yc4($){return $&&$.__esModule?$:{default:$}}function W51($){return $[Symbol.toStringTag]==="AsyncFunction"}function bc4($){return $[Symbol.toStringTag]==="AsyncGenerator"}function hc4($){return typeof $[Symbol.asyncIterator]==="function"}function fc4($){if(typeof $!=="function")throw Error("expected a function");return W51($)?(0,xc4.default)($):$}K51.default=fc4;K51.isAsync=W51;K51.isAsyncGenerator=bc4;K51.isAsyncIterable=hc4});var nR=o((OK0,U51)=>{Object.defineProperty(OK0,"__esModule",{value:!0});OK0.default=pc4;function pc4($,Y){if(!Y)Y=$.length;if(!Y)throw Error("arity is undefined");function X(...G){if(typeof G[Y-1]==="function")return $.apply(this,G);return new Promise((J,Q)=>{G[Y-1]=(W,...K)=>{if(W)return Q(W);J(K.length>1?K:K[0])},$.apply(this,G)})}return X}U51.exports=OK0.default});var z51=o((MK0,H51)=>{Object.defineProperty(MK0,"__esModule",{value:!0});var cc4=Ai(),lc4=EK0(cc4),ic4=KA(),nc4=EK0(ic4),rc4=nR(),ac4=EK0(rc4);function EK0($){return $&&$.__esModule?$:{default:$}}MK0.default=(0,ac4.default)(($,Y,X)=>{var G=(0,lc4.default)(Y)?[]:{};$(Y,(J,Q,W)=>{(0,nc4.default)(J)((K,...Z)=>{if(Z.length<2)[Z]=Z;G[Q]=Z,W(K)})},(J)=>X(J,G))},3);H51.exports=MK0.default});var qK0=o((RK0,V51)=>{Object.defineProperty(RK0,"__esModule",{value:!0});RK0.default=oc4;function oc4($){function Y(...X){if($===null)return;var G=$;$=null,G.apply(this,X)}return Object.assign(Y,$),Y}V51.exports=RK0.default});var L51=o((PK0,F51)=>{Object.defineProperty(PK0,"__esModule",{value:!0});PK0.default=function($){return $[Symbol.iterator]&&$[Symbol.iterator]()};F51.exports=PK0.default});var A51=o((wK0,N51)=>{Object.defineProperty(wK0,"__esModule",{value:!0});wK0.default=Kl4;var $l4=Ai(),Yl4=D51($l4),Xl4=L51(),Gl4=D51(Xl4);function D51($){return $&&$.__esModule?$:{default:$}}function Jl4($){var Y=-1,X=$.length;return function(){return++Y<X?{value:$[Y],key:Y}:null}}function Ql4($){var Y=-1;return function(){var G=$.next();if(G.done)return null;return Y++,{value:G.value,key:Y}}}function Wl4($){var Y=$?Object.keys($):[],X=-1,G=Y.length;return function J(){var Q=Y[++X];if(Q==="__proto__")return J();return X<G?{value:$[Q],key:Q}:null}}function Kl4($){if((0,Yl4.default)($))return Jl4($);var Y=(0,Gl4.default)($);return Y?Ql4(Y):Wl4($)}N51.exports=wK0.default});var jK0=o((_K0,B51)=>{Object.defineProperty(_K0,"__esModule",{value:!0});_K0.default=Ul4;function Ul4($){return function(...Y){if($===null)throw Error("Callback was already called.");var X=$;$=null,X.apply(this,Y)}}B51.exports=_K0.default});var Bi=o((TK0,O51)=>{Object.defineProperty(TK0,"__esModule",{value:!0});var zl4={};TK0.default=zl4;O51.exports=TK0.default});var M51=o((IK0,E51)=>{Object.defineProperty(IK0,"__esModule",{value:!0});IK0.default=Nl4;var Fl4=Bi(),Ll4=Dl4(Fl4);function Dl4($){return $&&$.__esModule?$:{default:$}}function Nl4($,Y,X,G){let J=!1,Q=!1,W=!1,K=0,Z=0;function H(){if(K>=Y||W||J)return;W=!0,$.next().then(({value:F,done:L})=>{if(Q||J)return;if(W=!1,L){if(J=!0,K<=0)G(null);return}K++,X(F,Z,z),Z++,H()}).catch(V)}function z(F,L){if(K-=1,Q)return;if(F)return V(F);if(F===!1){J=!0,Q=!0;return}if(L===Ll4.default||J&&K<=0)return J=!0,G(null);H()}function V(F){if(Q)return;W=!1,J=!0,G(F)}H()}E51.exports=IK0.default});var w51=o((CK0,P51)=>{Object.defineProperty(CK0,"__esModule",{value:!0});var Bl4=qK0(),Ol4=Bk(Bl4),El4=A51(),Ml4=Bk(El4),Rl4=jK0(),ql4=Bk(Rl4),R51=KA(),Pl4=M51(),q51=Bk(Pl4),wl4=Bi(),_l4=Bk(wl4);function Bk($){return $&&$.__esModule?$:{default:$}}CK0.default=($)=>{return(Y,X,G)=>{if(G=(0,Ol4.default)(G),$<=0)throw RangeError("concurrency limit cannot be less than 1");if(!Y)return G(null);if((0,R51.isAsyncGenerator)(Y))return(0,q51.default)(Y,$,X,G);if((0,R51.isAsyncIterable)(Y))return(0,q51.default)(Y[Symbol.asyncIterator](),$,X,G);var J=(0,Ml4.default)(Y),Q=!1,W=!1,K=0,Z=!1;function H(V,F){if(W)return;if(K-=1,V)Q=!0,G(V);else if(V===!1)Q=!0,W=!0;else if(F===_l4.default||Q&&K<=0)return Q=!0,G(null);else if(!Z)z()}function z(){Z=!0;while(K<$&&!Q){var V=J();if(V===null){if(Q=!0,K<=0)G(null);return}K+=1,X(V.value,V.key,(0,ql4.default)(H))}Z=!1}z()}};P51.exports=CK0.default});var vK0=o((kK0,_51)=>{Object.defineProperty(kK0,"__esModule",{value:!0});var Tl4=w51(),Il4=SK0(Tl4),Cl4=KA(),Sl4=SK0(Cl4),kl4=nR(),vl4=SK0(kl4);function SK0($){return $&&$.__esModule?$:{default:$}}function xl4($,Y,X,G){return(0,Il4.default)(Y)($,(0,Sl4.default)(X),G)}kK0.default=(0,vl4.default)(xl4,4);_51.exports=kK0.default});var I51=o((xK0,T51)=>{Object.defineProperty(xK0,"__esModule",{value:!0});var bl4=vK0(),hl4=j51(bl4),fl4=nR(),gl4=j51(fl4);function j51($){return $&&$.__esModule?$:{default:$}}function ml4($,Y,X){return(0,hl4.default)($,1,Y,X)}xK0.default=(0,gl4.default)(ml4,3);T51.exports=xK0.default});var k51=o((yK0,S51)=>{Object.defineProperty(yK0,"__esModule",{value:!0});yK0.default=il4;var pl4=z51(),dl4=C51(pl4),cl4=I51(),ll4=C51(cl4);function C51($){return $&&$.__esModule?$:{default:$}}function il4($,Y){return(0,dl4.default)(ll4.default,$,Y)}S51.exports=yK0.default});var bK0=o((g65,x51)=>{x51.exports=bH;var Oi=$F().codes,rl4=Oi.ERR_METHOD_NOT_IMPLEMENTED,al4=Oi.ERR_MULTIPLE_CALLBACK,sl4=Oi.ERR_TRANSFORM_ALREADY_TRANSFORMING,ol4=Oi.ERR_TRANSFORM_WITH_LENGTH_0,Ei=QA();$A()(bH,Ei);function tl4($,Y){var X=this._transformState;X.transforming=!1;var G=X.writecb;if(G===null)return this.emit("error",new al4);if(X.writechunk=null,X.writecb=null,Y!=null)this.push(Y);G($);var J=this._readableState;if(J.reading=!1,J.needReadable||J.length<J.highWaterMark)this._read(J.highWaterMark)}function bH($){if(!(this instanceof bH))return new bH($);if(Ei.call(this,$),this._transformState={afterTransform:tl4.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,$){if(typeof $.transform==="function")this._transform=$.transform;if(typeof $.flush==="function")this._flush=$.flush}this.on("prefinish",el4)}function el4(){var $=this;if(typeof this._flush==="function"&&!this._readableState.destroyed)this._flush(function(Y,X){v51($,Y,X)});else v51(this,null,null)}bH.prototype.push=function($,Y){return this._transformState.needTransform=!1,Ei.prototype.push.call(this,$,Y)};bH.prototype._transform=function($,Y,X){X(new rl4("_transform()"))};bH.prototype._write=function($,Y,X){var G=this._transformState;if(G.writecb=X,G.writechunk=$,G.writeencoding=Y,!G.transforming){var J=this._readableState;if(G.needTransform||J.needReadable||J.length<J.highWaterMark)this._read(J.highWaterMark)}};bH.prototype._read=function($){var Y=this._transformState;if(Y.writechunk!==null&&!Y.transforming)Y.transforming=!0,this._transform(Y.writechunk,Y.writeencoding,Y.afterTransform);else Y.needTransform=!0};bH.prototype._destroy=function($,Y){Ei.prototype._destroy.call(this,$,function(X){Y(X)})};function v51($,Y,X){if(Y)return $.emit("error",Y);if(X!=null)$.push(X);if($._writableState.length)throw new ol4;if($._transformState.transforming)throw new sl4;return $.push(null)}});var h51=o((m65,b51)=>{b51.exports=Ok;var y51=bK0();$A()(Ok,y51);function Ok($){if(!(this instanceof Ok))return new Ok($);y51.call(this,$)}Ok.prototype._transform=function($,Y,X){X(null,$)}});var p51=o((u65,u51)=>{var hK0;function $i4($){var Y=!1;return function(){if(Y)return;Y=!0,$.apply(void 0,arguments)}}var m51=$F().codes,Yi4=m51.ERR_MISSING_ARGS,Xi4=m51.ERR_STREAM_DESTROYED;function f51($){if($)throw $}function Gi4($){return $.setHeader&&typeof $.abort==="function"}function Ji4($,Y,X,G){G=$i4(G);var J=!1;if($.on("close",function(){J=!0}),hK0===void 0)hK0=Ki();hK0($,{readable:Y,writable:X},function(W){if(W)return G(W);J=!0,G()});var Q=!1;return function(W){if(J)return;if(Q)return;if(Q=!0,Gi4($))return $.abort();if(typeof $.destroy==="function")return $.destroy();G(W||new Xi4("pipe"))}}function g51($){$()}function Qi4($,Y){return $.pipe(Y)}function Wi4($){if(!$.length)return f51;if(typeof $[$.length-1]!=="function")return f51;return $.pop()}function Ki4(){for(var $=arguments.length,Y=Array($),X=0;X<$;X++)Y[X]=arguments[X];var G=Wi4(Y);if(Array.isArray(Y[0]))Y=Y[0];if(Y.length<2)throw new Yi4("streams");var J,Q=Y.map(function(W,K){var Z=K<Y.length-1,H=K>0;return Ji4(W,Z,H,function(z){if(!J)J=z;if(z)Q.forEach(g51);if(Z)return;Q.forEach(g51),G(J)})});return Y.reduce(Qi4)}u51.exports=Ki4});var ZA=o((U2,Mk)=>{var Ek=A0("stream");if(process.env.READABLE_STREAM==="disable"&&Ek)Mk.exports=Ek.Readable,Object.assign(Mk.exports,Ek),Mk.exports.Stream=Ek;else U2=Mk.exports=ZK0(),U2.Stream=Ek||U2,U2.Readable=U2,U2.Writable=Li(),U2.Duplex=QA(),U2.Transform=bK0(),U2.PassThrough=h51(),U2.finished=Ki(),U2.pipeline=p51()});var l51=o((p65,c51)=>{var rR=[],Rk=[],fK0=function(){};function mK0($){if(~rR.indexOf($))return!1;return rR.push($),!0}function uK0($){fK0=$}function Zi4($){var Y=[];for(var X=0;X<rR.length;X++){if(rR[X].async){Y.push(rR[X]);continue}if(rR[X]($))return!0}if(!Y.length)return!1;return new Promise(function(J){Promise.all(Y.map(function(W){return W($)})).then(function(W){J(W.some(Boolean))})})}function pK0($){if(~Rk.indexOf($))return!1;return Rk.push($),!0}function gK0(){fK0.apply(fK0,arguments)}function d51($){for(var Y=0;Y<Rk.length;Y++)$=Rk[Y].apply(Rk[Y],arguments);return $}function dK0($,Y){var X=Object.prototype.hasOwnProperty;for(var G in Y)if(X.call(Y,G))$[G]=Y[G];return $}function Ui4($){return $.enabled=!1,$.modify=pK0,$.set=uK0,$.use=mK0,dK0(function(){return!1},$)}function Hi4($){function Y(){var X=Array.prototype.slice.call(arguments,0);return gK0.call(gK0,$,d51(X,$)),!0}return $.enabled=!0,$.modify=pK0,$.set=uK0,$.use=mK0,dK0(Y,$)}c51.exports=function(Y){return Y.introduce=dK0,Y.enabled=Zi4,Y.process=d51,Y.modify=pK0,Y.write=gK0,Y.nope=Ui4,Y.yep=Hi4,Y.set=uK0,Y.use=mK0,Y}});var qk=o((d65,i51)=>{var zi4=l51(),Vi4=zi4(function $(Y,X){if(X=X||{},X.namespace=Y,X.prod=!0,X.dev=!1,!(X.force||$.force))return $.nope(X);return $.yep(X)});i51.exports=Vi4});var r51=o((c65,n51)=>{var cK0=A0("fs"),{StringDecoder:Fi4}=A0("string_decoder"),{Stream:Li4}=ZA();function Di4(){}n51.exports=($,Y)=>{let X=Buffer.alloc(65536),G=new Fi4("utf8"),J=new Li4,Q="",W=0,K=0;if($.start===-1)delete $.start;if(J.readable=!0,J.destroy=()=>{J.destroyed=!0,J.emit("end"),J.emit("close")},cK0.open($.file,"a+","0644",(Z,H)=>{if(Z){if(!Y)J.emit("error",Z);else Y(Z);J.destroy();return}(function z(){if(J.destroyed){cK0.close(H,Di4);return}return cK0.read(H,X,0,X.length,W,(V,F)=>{if(V){if(!Y)J.emit("error",V);else Y(V);J.destroy();return}if(!F){if(Q){if($.start==null||K>$.start)if(!Y)J.emit("line",Q);else Y(null,Q);K++,Q=""}return setTimeout(z,1000)}let L=G.write(X.slice(0,F));if(!Y)J.emit("data",L);L=(Q+L).split(/\n+/);let N=L.length-1,D=0;for(;D<N;D++){if($.start==null||K>$.start)if(!Y)J.emit("line",L[D]);else Y(null,L[D]);K++}return Q=L[N],W+=F,z()})})()}),!Y)return J;return J.destroy}});var t51=o((l65,o51)=>{var gJ=A0("fs"),jY=A0("path"),a51=k51(),Ni4=A0("zlib"),{MESSAGE:Ai4}=L7(),{Stream:Bi4,PassThrough:s51}=ZA(),Oi4=WA(),SK=qk()("winston:file"),Ei4=A0("os"),Mi4=r51();o51.exports=class extends Oi4{constructor(Y={}){super(Y);this.name=Y.name||"file";function X(G,...J){J.slice(1).forEach((Q)=>{if(Y[Q])throw Error(`Cannot set ${Q} and ${G} together`)})}if(this._stream=new s51,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),Y.filename||Y.dirname)X("filename or dirname","stream"),this._basename=this.filename=Y.filename?jY.basename(Y.filename):"winston.log",this.dirname=Y.dirname||jY.dirname(Y.filename),this.options=Y.options||{flags:"a"};else if(Y.stream)console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),X("stream","filename","maxsize"),this._dest=this._stream.pipe(this._setupStream(Y.stream)),this.dirname=jY.dirname(this._dest.path);else throw Error("Cannot log to file without filename or stream.");if(this.maxsize=Y.maxsize||null,this.rotationFormat=Y.rotationFormat||!1,this.zippedArchive=Y.zippedArchive||!1,this.maxFiles=Y.maxFiles||null,this.eol=typeof Y.eol==="string"?Y.eol:Ei4.EOL,this.tailable=Y.tailable||!1,this.lazy=Y.lazy||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this._fileExist=!1,this.dirname)this._createLogDirIfNotExist(this.dirname);if(!this.lazy)this.open()}finishIfEnding(){if(this._ending)if(this._opening)this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())});else this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())}_final(Y){if(this._opening){this.once("open",()=>this._final(Y));return}if(this._stream.end(),!this._dest)return Y();if(this._dest.writableFinished)return Y();this._dest.once("finish",Y),this._dest.once("error",Y)}log(Y,X=()=>{}){if(this.silent)return X(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(Y,X)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(Y,X)});return}if(this.lazy){if(!this._fileExist){if(!this._opening)this.open();this.once("open",()=>{this._fileExist=!0,this.log(Y,X);return});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{if(!this._opening)this.open();this.once("open",()=>{this.log(Y,X);return});return});return}}let G=`${Y[Ai4]}${this.eol}`,J=Buffer.byteLength(G);function Q(){if(this._size+=J,this._pendingSize-=J,SK("logged %s %s",this._size,G),this.emit("logged",Y),this._rotate)return;if(this._opening)return;if(!this._needsNewFile())return;if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}if(this._pendingSize+=J,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize))this.rotatedWhileOpening=!0;let W=this._stream.write(G,Q.bind(this));if(!W)this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,X()});else X();return SK("written",W,this._drain),this.finishIfEnding(),W}query(Y,X){if(typeof Y==="function")X=Y,Y={};Y=V(Y);let G=jY.join(this.dirname,this.filename),J="",Q=[],W=0,K=gJ.createReadStream(G,{encoding:"utf8"});K.on("error",(F)=>{if(K.readable)K.destroy();if(!X)return;return F.code!=="ENOENT"?X(F):X(null,Q)}),K.on("data",(F)=>{F=(J+F).split(/\n+/);let L=F.length-1,N=0;for(;N<L;N++){if(!Y.start||W>=Y.start)Z(F[N]);W++}J=F[L]}),K.on("close",()=>{if(J)Z(J,!0);if(Y.order==="desc")Q=Q.reverse();if(X)X(null,Q)});function Z(F,L){try{let N=JSON.parse(F);if(z(N))H(N)}catch(N){if(!L)K.emit("error",N)}}function H(F){if(Y.rows&&Q.length>=Y.rows&&Y.order!=="desc"){if(K.readable)K.destroy();return}if(Y.fields)F=Y.fields.reduce((L,N)=>{return L[N]=F[N],L},{});if(Y.order==="desc"){if(Q.length>=Y.rows)Q.shift()}Q.push(F)}function z(F){if(!F)return;if(typeof F!=="object")return;let L=new Date(F.timestamp);if(Y.from&&L<Y.from||Y.until&&L>Y.until||Y.level&&Y.level!==F.level)return;return!0}function V(F){if(F=F||{},F.rows=F.rows||F.limit||10,F.start=F.start||0,F.until=F.until||new Date,typeof F.until!=="object")F.until=new Date(F.until);if(F.from=F.from||F.until-86400000,typeof F.from!=="object")F.from=new Date(F.from);return F.order=F.order||"desc",F}}stream(Y={}){let X=jY.join(this.dirname,this.filename),G=new Bi4,J={file:X,start:Y.start};return G.destroy=Mi4(J,(Q,W)=>{if(Q)return G.emit("error",Q);try{G.emit("data",W),W=JSON.parse(W),G.emit("log",W)}catch(K){G.emit("error",K)}}),G}open(){if(!this.filename)return;if(this._opening)return;this._opening=!0,this.stat((Y,X)=>{if(Y)return this.emit("error",Y);SK("stat done: %s { size: %s }",this.filename,X),this._size=X,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{if(!this._stream.emit("rotate"))this._rotate=!1})})}stat(Y){let X=this._getFile(),G=jY.join(this.dirname,X);gJ.stat(G,(J,Q)=>{if(J&&J.code==="ENOENT")return SK("ENOENT\xA0ok",G),this.filename=X,Y(null,0);if(J)return SK(`err ${J.code} ${G}`),Y(J);if(!Q||this._needsNewFile(Q.size))return this._incFile(()=>this.stat(Y));this.filename=X,Y(null,Q.size)})}close(Y){if(!this._stream)return;this._stream.end(()=>{if(Y)Y();this.emit("flush"),this.emit("closed")})}_needsNewFile(Y){return Y=Y||this._size,this.maxsize&&Y>=this.maxsize}_onError(Y){this.emit("error",Y)}_setupStream(Y){return Y.on("error",this._onError),Y}_cleanupStream(Y){return Y.removeListener("error",this._onError),Y.destroy(),Y}_rotateFile(){this._incFile(()=>this.open())}_endStream(Y=()=>{}){if(this._dest)this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),Y()});else Y()}_createStream(Y){let X=jY.join(this.dirname,this.filename);SK("create stream start",X,this.options);let G=gJ.createWriteStream(X,this.options).on("error",(J)=>SK(J)).on("close",()=>SK("close",G.path,G.bytesWritten)).on("open",()=>{if(SK("file open ok",X),this.emit("open",X),Y.pipe(G),this.rotatedWhileOpening)this._stream=new s51,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(G),Y.end()});return SK("create stream ok",X),G}_incFile(Y){SK("_incFile",this.filename);let X=jY.extname(this._basename),G=jY.basename(this._basename,X),J=[];if(this.zippedArchive)J.push(function(Q){let W=this._created>0&&!this.tailable?this._created:"";this._compressFile(jY.join(this.dirname,`${G}${W}${X}`),jY.join(this.dirname,`${G}${W}${X}.gz`),Q)}.bind(this));J.push(function(Q){if(!this.tailable)this._created+=1,this._checkMaxFilesIncrementing(X,G,Q);else this._checkMaxFilesTailable(X,G,Q)}.bind(this)),a51(J,Y)}_getFile(){let Y=jY.extname(this._basename),X=jY.basename(this._basename,Y),G=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${X}${G}${Y}`:`${X}${Y}`}_checkMaxFilesIncrementing(Y,X,G){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(G);let J=this._created-this.maxFiles,Q=J!==0?J:"",W=this.zippedArchive?".gz":"",K=`${X}${Q}${Y}${W}`,Z=jY.join(this.dirname,K);gJ.unlink(Z,G)}_checkMaxFilesTailable(Y,X,G){let J=[];if(!this.maxFiles)return;let Q=this.zippedArchive?".gz":"";for(let W=this.maxFiles-1;W>1;W--)J.push(function(K,Z){let H=`${X}${K-1}${Y}${Q}`,z=jY.join(this.dirname,H);gJ.exists(z,(V)=>{if(!V)return Z(null);H=`${X}${K}${Y}${Q}`,gJ.rename(z,jY.join(this.dirname,H),Z)})}.bind(this,W));a51(J,()=>{gJ.rename(jY.join(this.dirname,`${X}${Y}${Q}`),jY.join(this.dirname,`${X}1${Y}${Q}`),G)})}_compressFile(Y,X,G){gJ.access(Y,gJ.F_OK,(J)=>{if(J)return G();var Q=Ni4.createGzip(),W=gJ.createReadStream(Y),K=gJ.createWriteStream(X);K.on("finish",()=>{gJ.unlink(Y,G)}),W.pipe(Q).pipe(K)})}_createLogDirIfNotExist(Y){if(!gJ.existsSync(Y))gJ.mkdirSync(Y,{recursive:!0})}}});var $$1=o((i65,e51)=>{var Ri4=A0("http"),qi4=A0("https"),{Stream:Pi4}=ZA(),wi4=WA(),{configure:_i4}=Qk();e51.exports=class extends wi4{constructor(Y={}){super(Y);if(this.options=Y,this.name=Y.name||"http",this.ssl=!!Y.ssl,this.host=Y.host||"localhost",this.port=Y.port,this.auth=Y.auth,this.path=Y.path||"",this.maximumDepth=Y.maximumDepth,this.agent=Y.agent,this.headers=Y.headers||{},this.headers["content-type"]="application/json",this.batch=Y.batch||!1,this.batchInterval=Y.batchInterval||5000,this.batchCount=Y.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},!this.port)this.port=this.ssl?443:80}log(Y,X){if(this._request(Y,null,null,(G,J)=>{if(J&&J.statusCode!==200)G=Error(`Invalid HTTP Status Code: ${J.statusCode}`);if(G)this.emit("warn",G);else this.emit("logged",Y)}),X)setImmediate(X)}query(Y,X){if(typeof Y==="function")X=Y,Y={};Y={method:"query",params:this.normalizeQuery(Y)};let G=Y.params.auth||null;delete Y.params.auth;let J=Y.params.path||null;delete Y.params.path,this._request(Y,G,J,(Q,W,K)=>{if(W&&W.statusCode!==200)Q=Error(`Invalid HTTP Status Code: ${W.statusCode}`);if(Q)return X(Q);if(typeof K==="string")try{K=JSON.parse(K)}catch(Z){return X(Z)}X(null,K)})}stream(Y={}){let X=new Pi4;Y={method:"stream",params:Y};let G=Y.params.path||null;delete Y.params.path;let J=Y.params.auth||null;delete Y.params.auth;let Q="",W=this._request(Y,J,G);return X.destroy=()=>W.destroy(),W.on("data",(K)=>{K=(Q+K).split(/\n+/);let Z=K.length-1,H=0;for(;H<Z;H++)try{X.emit("log",JSON.parse(K[H]))}catch(z){X.emit("error",z)}Q=K[Z]}),W.on("error",(K)=>X.emit("error",K)),X}_request(Y,X,G,J){if(Y=Y||{},X=X||this.auth,G=G||this.path||"",this.batch)this._doBatch(Y,J,X,G);else this._doRequest(Y,J,X,G)}_doBatch(Y,X,G,J){if(this.batchOptions.push(Y),this.batchOptions.length===1){let Q=this;this.batchCallback=X,this.batchTimeoutID=setTimeout(function(){Q.batchTimeoutID=-1,Q._doBatchRequest(Q.batchCallback,G,J)},this.batchInterval)}if(this.batchOptions.length===this.batchCount)this._doBatchRequest(this.batchCallback,G,J)}_doBatchRequest(Y,X,G){if(this.batchTimeoutID>0)clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1;let J=this.batchOptions.slice();this.batchOptions=[],this._doRequest(J,Y,X,G)}_doRequest(Y,X,G,J){let Q=Object.assign({},this.headers);if(G&&G.bearer)Q.Authorization=`Bearer ${G.bearer}`;let W=(this.ssl?qi4:Ri4).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${J.replace(/^\//,"")}`,headers:Q,auth:G&&G.username&&G.password?`${G.username}:${G.password}`:"",agent:this.agent});W.on("error",X),W.on("response",(Z)=>Z.on("end",()=>X(null,Z)).resume());let K=_i4({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});W.end(Buffer.from(K(Y,this.options.replacer),"utf8"))}}});var lK0=o((n65,Y$1)=>{var gU=($)=>$!==null&&typeof $==="object"&&typeof $.pipe==="function";gU.writable=($)=>gU($)&&$.writable!==!1&&typeof $._write==="function"&&typeof $._writableState==="object";gU.readable=($)=>gU($)&&$.readable!==!1&&typeof $._read==="function"&&typeof $._readableState==="object";gU.duplex=($)=>gU.writable($)&&gU.readable($);gU.transform=($)=>gU.duplex($)&&typeof $._transform==="function";Y$1.exports=gU});var G$1=o((r65,X$1)=>{var ji4=lK0(),{MESSAGE:Ti4}=L7(),Ii4=A0("os"),Ci4=WA();X$1.exports=class extends Ci4{constructor(Y={}){super(Y);if(!Y.stream||!ji4(Y.stream))throw Error("options.stream is required.");this._stream=Y.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=Y.stream._writableState.objectMode,this.eol=typeof Y.eol==="string"?Y.eol:Ii4.EOL}log(Y,X){if(setImmediate(()=>this.emit("logged",Y)),this.isObjectMode){if(this._stream.write(Y),X)X();return}if(this._stream.write(`${Y[Ti4]}${this.eol}`),X)X();return}}});var J$1=o((Pk)=>{Object.defineProperty(Pk,"Console",{configurable:!0,enumerable:!0,get(){return n91()}});Object.defineProperty(Pk,"File",{configurable:!0,enumerable:!0,get(){return t51()}});Object.defineProperty(Pk,"Http",{configurable:!0,enumerable:!0,get(){return $$1()}});Object.defineProperty(Pk,"Stream",{configurable:!0,enumerable:!0,get(){return G$1()}})});var Ri=o((Si4)=>{var Mi=g20(),{configs:iK0}=L7();Si4.cli=Mi.levels(iK0.cli);Si4.npm=Mi.levels(iK0.npm);Si4.syslog=Mi.levels(iK0.syslog);Si4.addColors=Mi.levels});var W$1=o((nK0,Q$1)=>{Object.defineProperty(nK0,"__esModule",{value:!0});var bi4=Ai(),hi4=UA(bi4),fi4=Bi(),gi4=UA(fi4),mi4=vK0(),ui4=UA(mi4),pi4=qK0(),di4=UA(pi4),ci4=jK0(),li4=UA(ci4),ii4=KA(),ni4=UA(ii4),ri4=nR(),ai4=UA(ri4);function UA($){return $&&$.__esModule?$:{default:$}}function si4($,Y,X){X=(0,di4.default)(X);var G=0,J=0,{length:Q}=$,W=!1;if(Q===0)X(null);function K(Z,H){if(Z===!1)W=!0;if(W===!0)return;if(Z)X(Z);else if(++J===Q||H===gi4.default)X(null)}for(;G<Q;G++)Y($[G],G,(0,li4.default)(K))}function oi4($,Y,X){return(0,ui4.default)($,1/0,Y,X)}function ti4($,Y,X){var G=(0,hi4.default)($)?si4:oi4;return G($,(0,ni4.default)(Y),X)}nK0.default=(0,ai4.default)(ti4,3);Q$1.exports=nK0.default});var Z$1=o((rK0,K$1)=>{Object.defineProperty(rK0,"__esModule",{value:!0});rK0.default=$n4;function $n4($){return(Y,X,G)=>$(Y,G)}K$1.exports=rK0.default});var Pi=o((aK0,U$1)=>{Object.defineProperty(aK0,"__esModule",{value:!0});var Xn4=W$1(),Gn4=qi(Xn4),Jn4=Z$1(),Qn4=qi(Jn4),Wn4=KA(),Kn4=qi(Wn4),Zn4=nR(),Un4=qi(Zn4);function qi($){return $&&$.__esModule?$:{default:$}}function Hn4($,Y,X){return(0,Gn4.default)($,(0,Qn4.default)((0,Kn4.default)(Y)),X)}aK0.default=(0,Un4.default)(Hn4,3);U$1.exports=aK0.default});var z$1=o((o65,H$1)=>{var Vn4=Object.prototype.toString;H$1.exports=function(Y){if(typeof Y.displayName==="string"&&Y.constructor.name)return Y.displayName;else if(typeof Y.name==="string"&&Y.name)return Y.name;if(typeof Y==="object"&&Y.constructor&&typeof Y.constructor.name==="string")return Y.constructor.name;var X=Y.toString(),G=Vn4.call(Y).slice(8,-1);if(G==="Function")X=X.substring(X.indexOf("(")+1,X.indexOf(")"));else X=G;return X||"anonymous"}});var sK0=o((t65,V$1)=>{var Fn4=z$1();V$1.exports=function(Y){var X=0,G;function J(){if(X)return G;return X=1,G=Y.apply(this,arguments),Y=null,G}return J.displayName=Fn4(Y),J}});var oK0=o((Nn4)=>{Nn4.get=function($){var Y=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var X={},G=Error.prepareStackTrace;Error.prepareStackTrace=function(Q,W){return W},Error.captureStackTrace(X,$||Nn4.get);var J=X.stack;return Error.prepareStackTrace=G,Error.stackTraceLimit=Y,J};Nn4.parse=function($){if(!$.stack)return[];var Y=this,X=$.stack.split(`
`).slice(1);return X.map(function(G){if(G.match(/^\s*[-]{4,}$/))return Y._createParsedCallSite({fileName:G,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var J=G.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(!J)return;var Q=null,W=null,K=null,Z=null,H=null,z=J[5]==="native";if(J[1]){K=J[1];var V=K.lastIndexOf(".");if(K[V-1]==".")V--;if(V>0){Q=K.substr(0,V),W=K.substr(V+1);var F=Q.indexOf(".Module");if(F>0)K=K.substr(F+1),Q=Q.substr(0,F)}Z=null}if(W)Z=Q,H=W;if(W==="<anonymous>")H=null,K=null;var L={fileName:J[2]||null,lineNumber:parseInt(J[3],10)||null,functionName:K,typeName:Z,methodName:H,columnNumber:parseInt(J[4],10)||null,native:z};return Y._createParsedCallSite(L)}).filter(function(G){return!!G})};function wk($){for(var Y in $)this[Y]=$[Y]}var Ln4=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],Dn4=["topLevel","eval","native","constructor"];Ln4.forEach(function($){wk.prototype[$]=null,wk.prototype["get"+$[0].toUpperCase()+$.substr(1)]=function(){return this[$]}});Dn4.forEach(function($){wk.prototype[$]=!1,wk.prototype["is"+$[0].toUpperCase()+$.substr(1)]=function(){return this[$]}});Nn4._createParsedCallSite=function($){return new wk($)}});var D$1=o(($85,L$1)=>{var{Writable:On4}=ZA();L$1.exports=class extends On4{constructor(Y){super({objectMode:!0});if(!Y)throw Error("ExceptionStream requires a TransportStream instance.");this.handleExceptions=!0,this.transport=Y}_write(Y,X,G){if(Y.exception)return this.transport.log(Y,G);return G(),!0}}});var eK0=o((Y85,B$1)=>{var N$1=A0("os"),En4=Pi(),tK0=qk()("winston:exception"),Mn4=sK0(),A$1=oK0(),Rn4=D$1();B$1.exports=class{constructor(Y){if(!Y)throw Error("Logger is required to handle exceptions");this.logger=Y,this.handlers=new Map}handle(...Y){if(Y.forEach((X)=>{if(Array.isArray(X))return X.forEach((G)=>this._addHandler(G));this._addHandler(X)}),!this.catcher)this.catcher=this._uncaughtException.bind(this),process.on("uncaughtException",this.catcher)}unhandle(){if(this.catcher)process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((Y)=>this.logger.unpipe(Y))}getAllInfo(Y){let X=null;if(Y)X=typeof Y==="string"?Y:Y.message;return{error:Y,level:"error",message:[`uncaughtException: ${X||"(no error message)"}`,Y&&Y.stack||"  No stack trace"].join(`
`),stack:Y&&Y.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(Y)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:N$1.loadavg(),uptime:N$1.uptime()}}getTrace(Y){return(Y?A$1.parse(Y):A$1.get()).map((G)=>{return{column:G.getColumnNumber(),file:G.getFileName(),function:G.getFunctionName(),line:G.getLineNumber(),method:G.getMethodName(),native:G.isNative()}})}_addHandler(Y){if(!this.handlers.has(Y)){Y.handleExceptions=!0;let X=new Rn4(Y);this.handlers.set(Y,X),this.logger.pipe(X)}}_uncaughtException(Y){let X=this.getAllInfo(Y),G=this._getExceptionHandlers(),J=typeof this.logger.exitOnError==="function"?this.logger.exitOnError(Y):this.logger.exitOnError,Q;if(!G.length&&J)console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),J=!1;function W(){if(tK0("doExit",J),tK0("process._exiting",process._exiting),J&&!process._exiting){if(Q)clearTimeout(Q);process.exit(1)}}if(!G||G.length===0)return process.nextTick(W);if(En4(G,(K,Z)=>{let H=Mn4(Z),z=K.transport||K;function V(F){return()=>{tK0(F),H()}}z._ending=!0,z.once("finish",V("finished")),z.once("error",V("error"))},()=>J&&W()),this.logger.log(X),J)Q=setTimeout(W,3000)}_getExceptionHandlers(){return this.logger.transports.filter((Y)=>{return(Y.transport||Y).handleExceptions})}}});var E$1=o((X85,O$1)=>{var{Writable:qn4}=ZA();O$1.exports=class extends qn4{constructor(Y){super({objectMode:!0});if(!Y)throw Error("RejectionStream requires a TransportStream instance.");this.handleRejections=!0,this.transport=Y}_write(Y,X,G){if(Y.rejection)return this.transport.log(Y,G);return G(),!0}}});var YZ0=o((G85,q$1)=>{var M$1=A0("os"),Pn4=Pi(),$Z0=qk()("winston:rejection"),wn4=sK0(),R$1=oK0(),_n4=E$1();q$1.exports=class{constructor(Y){if(!Y)throw Error("Logger is required to handle rejections");this.logger=Y,this.handlers=new Map}handle(...Y){if(Y.forEach((X)=>{if(Array.isArray(X))return X.forEach((G)=>this._addHandler(G));this._addHandler(X)}),!this.catcher)this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher)}unhandle(){if(this.catcher)process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((Y)=>this.logger.unpipe(Y))}getAllInfo(Y){let X=null;if(Y)X=typeof Y==="string"?Y:Y.message;return{error:Y,level:"error",message:[`unhandledRejection: ${X||"(no error message)"}`,Y&&Y.stack||"  No stack trace"].join(`
`),stack:Y&&Y.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(Y)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:M$1.loadavg(),uptime:M$1.uptime()}}getTrace(Y){return(Y?R$1.parse(Y):R$1.get()).map((G)=>{return{column:G.getColumnNumber(),file:G.getFileName(),function:G.getFunctionName(),line:G.getLineNumber(),method:G.getMethodName(),native:G.isNative()}})}_addHandler(Y){if(!this.handlers.has(Y)){Y.handleRejections=!0;let X=new _n4(Y);this.handlers.set(Y,X),this.logger.pipe(X)}}_unhandledRejection(Y){let X=this.getAllInfo(Y),G=this._getRejectionHandlers(),J=typeof this.logger.exitOnError==="function"?this.logger.exitOnError(Y):this.logger.exitOnError,Q;if(!G.length&&J)console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),J=!1;function W(){if($Z0("doExit",J),$Z0("process._exiting",process._exiting),J&&!process._exiting){if(Q)clearTimeout(Q);process.exit(1)}}if(!G||G.length===0)return process.nextTick(W);if(Pn4(G,(K,Z)=>{let H=wn4(Z),z=K.transport||K;function V(F){return()=>{$Z0(F),H()}}z._ending=!0,z.once("finish",V("finished")),z.once("error",V("error"))},()=>J&&W()),this.logger.log(X),J)Q=setTimeout(W,3000)}_getRejectionHandlers(){return this.logger.transports.filter((Y)=>{return(Y.transport||Y).handleRejections})}}});var _$1=o((J85,w$1)=>{class P$1{constructor($){let Y=wi();if(typeof $!=="object"||Array.isArray($)||!($ instanceof Y))throw Error("Logger is required for profiling");else this.logger=$,this.start=Date.now()}done(...$){if(typeof $[$.length-1]==="function")console.warn("Callback function no longer supported as of winston@3.0.0"),$.pop();let Y=typeof $[$.length-1]==="object"?$.pop():{};return Y.level=Y.level||"info",Y.durationMs=Date.now()-this.start,this.logger.write(Y)}}w$1.exports=P$1});var wi=o((Q85,C$1)=>{var{Stream:jn4,Transform:Tn4}=ZA(),j$1=Pi(),{LEVEL:mU,SPLAT:T$1}=L7(),I$1=lK0(),In4=eK0(),Cn4=YZ0(),Sn4=LK0(),kn4=_$1(),{warn:vn4}=u20(),xn4=Ri(),yn4=/%[scdjifoO%]/g;class XZ0 extends Tn4{constructor($){super({objectMode:!0});this.configure($)}child($){let Y=this;return Object.create(Y,{write:{value:function(X){let G=Object.assign({},$,X);if(X instanceof Error)G.stack=X.stack,G.message=X.message,G.cause=X.cause;Y.write(G)}}})}configure({silent:$,format:Y,defaultMeta:X,levels:G,level:J="info",exitOnError:Q=!0,transports:W,colors:K,emitErrs:Z,formatters:H,padLevels:z,rewriters:V,stripColors:F,exceptionHandlers:L,rejectionHandlers:N}={}){if(this.transports.length)this.clear();if(this.silent=$,this.format=Y||this.format||y20()(),this.defaultMeta=X||null,this.levels=G||this.levels||xn4.npm.levels,this.level=J,this.exceptions)this.exceptions.unhandle();if(this.rejections)this.rejections.unhandle();if(this.exceptions=new In4(this),this.rejections=new Cn4(this),this.profilers={},this.exitOnError=Q,W)W=Array.isArray(W)?W:[W],W.forEach((D)=>this.add(D));if(K||Z||H||z||V||F)throw Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
`));if(L)this.exceptions.handle(L);if(N)this.rejections.handle(N)}getHighestLogLevel(){let $=_k(this.levels,this.level);if(!this.transports||this.transports.length===0)return $;return this.transports.reduce((Y,X)=>{let G=_k(this.levels,X.level);return G!==null&&G>Y?G:Y},$)}isLevelEnabled($){let Y=_k(this.levels,$);if(Y===null)return!1;let X=_k(this.levels,this.level);if(X===null)return!1;if(!this.transports||this.transports.length===0)return X>=Y;return this.transports.findIndex((J)=>{let Q=_k(this.levels,J.level);if(Q===null)Q=X;return Q>=Y})!==-1}log($,Y,...X){if(arguments.length===1)return $[mU]=$.level,this._addDefaultMeta($),this.write($),this;if(arguments.length===2){if(Y&&typeof Y==="object")return Y[mU]=Y.level=$,this._addDefaultMeta(Y),this.write(Y),this;return Y={[mU]:$,level:$,message:Y},this._addDefaultMeta(Y),this.write(Y),this}let[G]=X;if(typeof G==="object"&&G!==null){if(!(Y&&Y.match&&Y.match(yn4))){let Q=Object.assign({},this.defaultMeta,G,{[mU]:$,[T$1]:X,level:$,message:Y});if(G.message)Q.message=`${Q.message} ${G.message}`;if(G.stack)Q.stack=G.stack;if(G.cause)Q.cause=G.cause;return this.write(Q),this}}return this.write(Object.assign({},this.defaultMeta,{[mU]:$,[T$1]:X,level:$,message:Y})),this}_transform($,Y,X){if(this.silent)return X();if(!$[mU])$[mU]=$.level;if(!this.levels[$[mU]]&&this.levels[$[mU]]!==0)console.error("[winston] Unknown logger level: %s",$[mU]);if(!this._readableState.pipes)console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",$);try{this.push(this.format.transform($,this.format.options))}finally{this._writableState.sync=!1,X()}}_final($){let Y=this.transports.slice();j$1(Y,(X,G)=>{if(!X||X.finished)return setImmediate(G);X.once("finish",G),X.end()},$)}add($){let Y=!I$1($)||$.log.length>2?new Sn4({transport:$}):$;if(!Y._writableState||!Y._writableState.objectMode)throw Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");if(this._onEvent("error",Y),this._onEvent("warn",Y),this.pipe(Y),$.handleExceptions)this.exceptions.handle();if($.handleRejections)this.rejections.handle();return this}remove($){if(!$)return this;let Y=$;if(!I$1($)||$.log.length>2)Y=this.transports.filter((X)=>X.transport===$)[0];if(Y)this.unpipe(Y);return this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){vn4.deprecated("setLevels")}query($,Y){if(typeof $==="function")Y=$,$={};$=$||{};let X={},G=Object.assign({},$.query||{});function J(W,K){if($.query&&typeof W.formatQuery==="function")$.query=W.formatQuery(G);W.query($,(Z,H)=>{if(Z)return K(Z);if(typeof W.formatResults==="function")H=W.formatResults(H,$.format);K(null,H)})}function Q(W,K){J(W,(Z,H)=>{if(K){if(H=Z||H,H)X[W.name]=H;K()}K=null})}j$1(this.transports.filter((W)=>!!W.query),Q,()=>Y(null,X))}stream($={}){let Y=new jn4,X=[];return Y._streams=X,Y.destroy=()=>{let G=X.length;while(G--)X[G].destroy()},this.transports.filter((G)=>!!G.stream).forEach((G)=>{let J=G.stream($);if(!J)return;X.push(J),J.on("log",(Q)=>{Q.transport=Q.transport||[],Q.transport.push(G.name),Y.emit("log",Q)}),J.on("error",(Q)=>{Q.transport=Q.transport||[],Q.transport.push(G.name),Y.emit("error",Q)})}),Y}startTimer(){return new kn4(this)}profile($,...Y){let X=Date.now();if(this.profilers[$]){let G=this.profilers[$];if(delete this.profilers[$],typeof Y[Y.length-2]==="function")console.warn("Callback function no longer supported as of winston@3.0.0"),Y.pop();let J=typeof Y[Y.length-1]==="object"?Y.pop():{};return J.level=J.level||"info",J.durationMs=X-G,J.message=J.message||$,this.write(J)}return this.profilers[$]=X,this}handleExceptions(...$){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),this.exceptions.handle(...$)}unhandleExceptions(...$){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),this.exceptions.unhandle(...$)}cli(){throw Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
`))}_onEvent($,Y){function X(G){if($==="error"&&!this.transports.includes(Y))this.add(Y);this.emit($,G,Y)}if(!Y["__winston"+$])Y["__winston"+$]=X.bind(this),Y.on($,Y["__winston"+$])}_addDefaultMeta($){if(this.defaultMeta)Object.assign($,this.defaultMeta)}}function _k($,Y){let X=$[Y];if(!X&&X!==0)return null;return X}Object.defineProperty(XZ0.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:$}=this._readableState;return!Array.isArray($)?[$].filter(Boolean):$}});C$1.exports=XZ0});var GZ0=o((W85,S$1)=>{var{LEVEL:bn4}=L7(),hn4=Ri(),fn4=wi(),gn4=qk()("winston:create-logger");function mn4($){return"is"+$.charAt(0).toUpperCase()+$.slice(1)+"Enabled"}S$1.exports=function($={}){$.levels=$.levels||hn4.npm.levels;class Y extends fn4{constructor(G){super(G)}}let X=new Y($);return Object.keys($.levels).forEach(function(G){if(gn4('Define prototype method for "%s"',G),G==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}Y.prototype[G]=function(...J){let Q=this||X;if(J.length===1){let[W]=J,K=W&&W.message&&W||{message:W};return K.level=K[bn4]=G,Q._addDefaultMeta(K),Q.write(K),this||X}if(J.length===0)return Q.log(G,""),Q;return Q.log(G,...J)},Y.prototype[mn4(G)]=function(){return(this||X).isLevelEnabled(G)}}),X}});var v$1=o((K85,k$1)=>{var un4=GZ0();k$1.exports=class{constructor(Y={}){this.loggers=new Map,this.options=Y}add(Y,X){if(!this.loggers.has(Y)){X=Object.assign({},X||this.options);let G=X.transports||this.options.transports;if(G)X.transports=Array.isArray(G)?G.slice():[G];else X.transports=[];let J=un4(X);J.on("close",()=>this._delete(Y)),this.loggers.set(Y,J)}return this.loggers.get(Y)}get(Y,X){return this.add(Y,X)}has(Y){return!!this.loggers.has(Y)}close(Y){if(Y)return this._removeLogger(Y);this.loggers.forEach((X,G)=>this._removeLogger(G))}_removeLogger(Y){if(!this.loggers.has(Y))return;this.loggers.get(Y).close(),this._delete(Y)}_delete(Y){this.loggers.delete(Y)}}});var JZ0=o((H2)=>{var x$1=g20(),{warn:jk}=u20();H2.version=n81().version;H2.transports=J$1();H2.config=Ri();H2.addColors=x$1.levels;H2.format=x$1.format;H2.createLogger=GZ0();H2.Logger=wi();H2.ExceptionHandler=eK0();H2.RejectionHandler=YZ0();H2.Container=v$1();H2.Transport=WA();H2.loggers=new H2.Container;var uU=H2.createLogger();Object.keys(H2.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(($)=>H2[$]=(...Y)=>uU[$](...Y));Object.defineProperty(H2,"level",{get(){return uU.level},set($){uU.level=$}});Object.defineProperty(H2,"exceptions",{get(){return uU.exceptions}});Object.defineProperty(H2,"rejections",{get(){return uU.rejections}});["exitOnError"].forEach(($)=>{Object.defineProperty(H2,$,{get(){return uU[$]},set(Y){uU[$]=Y}})});Object.defineProperty(H2,"default",{get(){return{exceptionHandlers:uU.exceptionHandlers,rejectionHandlers:uU.rejectionHandlers,transports:uU.transports}}});jk.deprecated(H2,"setLevels");jk.forFunctions(H2,"useFormat",["cli"]);jk.forProperties(H2,"useFormat",["padLevels","stripColors"]);jk.forFunctions(H2,"deprecated",["addRewriter","addFilter","clone","extend"]);jk.forProperties(H2,"deprecated",["emitErrs","levelLength"])});var d$1=o((HA,p$1)=>{var QZ0=A0("crypto");HA=p$1.exports=Tk;function Tk($,Y){return Y=m$1($,Y),on4($,Y)}HA.sha1=function($){return Tk($)};HA.keys=function($){return Tk($,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})};HA.MD5=function($){return Tk($,{algorithm:"md5",encoding:"hex"})};HA.keysMD5=function($){return Tk($,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var aR=QZ0.getHashes?QZ0.getHashes().slice():["sha1","md5"];aR.push("passthrough");var f$1=["buffer","hex","binary","base64"];function m$1($,Y){Y=Y||{};var X={};if(X.algorithm=Y.algorithm||"sha1",X.encoding=Y.encoding||"hex",X.excludeValues=Y.excludeValues?!0:!1,X.algorithm=X.algorithm.toLowerCase(),X.encoding=X.encoding.toLowerCase(),X.ignoreUnknown=Y.ignoreUnknown!==!0?!1:!0,X.respectType=Y.respectType===!1?!1:!0,X.respectFunctionNames=Y.respectFunctionNames===!1?!1:!0,X.respectFunctionProperties=Y.respectFunctionProperties===!1?!1:!0,X.unorderedArrays=Y.unorderedArrays!==!0?!1:!0,X.unorderedSets=Y.unorderedSets===!1?!1:!0,X.unorderedObjects=Y.unorderedObjects===!1?!1:!0,X.replacer=Y.replacer||void 0,X.excludeKeys=Y.excludeKeys||void 0,typeof $>"u")throw Error("Object argument required.");for(var G=0;G<aR.length;++G)if(aR[G].toLowerCase()===X.algorithm.toLowerCase())X.algorithm=aR[G];if(aR.indexOf(X.algorithm)===-1)throw Error('Algorithm "'+X.algorithm+'"  not supported. supported values: '+aR.join(", "));if(f$1.indexOf(X.encoding)===-1&&X.algorithm!=="passthrough")throw Error('Encoding "'+X.encoding+'"  not supported. supported values: '+f$1.join(", "));return X}function g$1($){if(typeof $!=="function")return!1;var Y=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i;return Y.exec(Function.prototype.toString.call($))!=null}function on4($,Y){var X;if(Y.algorithm!=="passthrough")X=QZ0.createHash(Y.algorithm);else X=new u$1;if(typeof X.write>"u")X.write=X.update,X.end=X.update;var G=WZ0(Y,X);if(G.dispatch($),!X.update)X.end("");if(X.digest)return X.digest(Y.encoding==="buffer"?void 0:Y.encoding);var J=X.read();if(Y.encoding==="buffer")return J;return J.toString(Y.encoding)}HA.writeToStream=function($,Y,X){if(typeof X>"u")X=Y,Y={};return Y=m$1($,Y),WZ0(Y,X).dispatch($)};function WZ0($,Y,X){X=X||[];var G=function(J){if(Y.update)return Y.update(J,"utf8");else return Y.write(J,"utf8")};return{dispatch:function(J){if($.replacer)J=$.replacer(J);var Q=typeof J;if(J===null)Q="null";return this["_"+Q](J)},_object:function(J){var Q=/\[object (.*)\]/i,W=Object.prototype.toString.call(J),K=Q.exec(W);if(!K)K="unknown:["+W+"]";else K=K[1];K=K.toLowerCase();var Z=null;if((Z=X.indexOf(J))>=0)return this.dispatch("[CIRCULAR:"+Z+"]");else X.push(J);if(typeof Buffer<"u"&&Buffer.isBuffer&&Buffer.isBuffer(J))return G("buffer:"),G(J);if(K!=="object"&&K!=="function"&&K!=="asyncfunction")if(this["_"+K])this["_"+K](J);else if($.ignoreUnknown)return G("["+K+"]");else throw Error('Unknown object type "'+K+'"');else{var H=Object.keys(J);if($.unorderedObjects)H=H.sort();if($.respectType!==!1&&!g$1(J))H.splice(0,0,"prototype","__proto__","constructor");if($.excludeKeys)H=H.filter(function(V){return!$.excludeKeys(V)});G("object:"+H.length+":");var z=this;return H.forEach(function(V){if(z.dispatch(V),G(":"),!$.excludeValues)z.dispatch(J[V]);G(",")})}},_array:function(J,Q){Q=typeof Q<"u"?Q:$.unorderedArrays!==!1;var W=this;if(G("array:"+J.length+":"),!Q||J.length<=1)return J.forEach(function(H){return W.dispatch(H)});var K=[],Z=J.map(function(H){var z=new u$1,V=X.slice(),F=WZ0($,z,V);return F.dispatch(H),K=K.concat(V.slice(X.length)),z.read().toString()});return X=X.concat(K),Z.sort(),this._array(Z,!1)},_date:function(J){return G("date:"+J.toJSON())},_symbol:function(J){return G("symbol:"+J.toString())},_error:function(J){return G("error:"+J.toString())},_boolean:function(J){return G("bool:"+J.toString())},_string:function(J){G("string:"+J.length+":"),G(J.toString())},_function:function(J){if(G("fn:"),g$1(J))this.dispatch("[native]");else this.dispatch(J.toString());if($.respectFunctionNames!==!1)this.dispatch("function-name:"+String(J.name));if($.respectFunctionProperties)this._object(J)},_number:function(J){return G("number:"+J.toString())},_xml:function(J){return G("xml:"+J.toString())},_null:function(){return G("Null")},_undefined:function(){return G("Undefined")},_regexp:function(J){return G("regex:"+J.toString())},_uint8array:function(J){return G("uint8array:"),this.dispatch(Array.prototype.slice.call(J))},_uint8clampedarray:function(J){return G("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(J))},_int8array:function(J){return G("int8array:"),this.dispatch(Array.prototype.slice.call(J))},_uint16array:function(J){return G("uint16array:"),this.dispatch(Array.prototype.slice.call(J))},_int16array:function(J){return G("int16array:"),this.dispatch(Array.prototype.slice.call(J))},_uint32array:function(J){return G("uint32array:"),this.dispatch(Array.prototype.slice.call(J))},_int32array:function(J){return G("int32array:"),this.dispatch(Array.prototype.slice.call(J))},_float32array:function(J){return G("float32array:"),this.dispatch(Array.prototype.slice.call(J))},_float64array:function(J){return G("float64array:"),this.dispatch(Array.prototype.slice.call(J))},_arraybuffer:function(J){return G("arraybuffer:"),this.dispatch(new Uint8Array(J))},_url:function(J){return G("url:"+J.toString(),"utf8")},_map:function(J){G("map:");var Q=Array.from(J);return this._array(Q,$.unorderedSets!==!1)},_set:function(J){G("set:");var Q=Array.from(J);return this._array(Q,$.unorderedSets!==!1)},_file:function(J){return G("file:"),this.dispatch([J.name,J.size,J.type,J.lastModfied])},_blob:function(){if($.ignoreUnknown)return G("[blob]");throw Error(`Hashing Blob objects is currently not supported
(see https://github.com/puleos/object-hash/issues/26)
Use "options.replacer" or "options.ignoreUnknown"
`)},_domwindow:function(){return G("domwindow")},_bigint:function(J){return G("bigint:"+J.toString())},_process:function(){return G("process")},_timer:function(){return G("timer")},_pipe:function(){return G("pipe")},_tcp:function(){return G("tcp")},_udp:function(){return G("udp")},_tty:function(){return G("tty")},_statwatcher:function(){return G("statwatcher")},_securecontext:function(){return G("securecontext")},_connection:function(){return G("connection")},_zlib:function(){return G("zlib")},_context:function(){return G("context")},_nodescript:function(){return G("nodescript")},_httpparser:function(){return G("httpparser")},_dataview:function(){return G("dataview")},_signal:function(){return G("signal")},_fsevent:function(){return G("fsevent")},_tlswrap:function(){return G("tlswrap")}}}function u$1(){return{buf:"",write:function($){this.buf+=$},end:function($){this.buf+=$},read:function(){return this.buf}}}});var c$1=o((KZ0,sR)=>{//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
(function($,Y){typeof KZ0==="object"&&typeof sR<"u"?sR.exports=Y():typeof define==="function"&&define.amd?define(Y):$.moment=Y()})(KZ0,function(){var $;function Y(){return $.apply(null,arguments)}function X(f){$=f}function G(f){return f instanceof Array||Object.prototype.toString.call(f)==="[object Array]"}function J(f){return f!=null&&Object.prototype.toString.call(f)==="[object Object]"}function Q(f,i){return Object.prototype.hasOwnProperty.call(f,i)}function W(f){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(f).length===0;else{var i;for(i in f)if(Q(f,i))return!1;return!0}}function K(f){return f===void 0}function Z(f){return typeof f==="number"||Object.prototype.toString.call(f)==="[object Number]"}function H(f){return f instanceof Date||Object.prototype.toString.call(f)==="[object Date]"}function z(f,i){var W0=[],H0,L0=f.length;for(H0=0;H0<L0;++H0)W0.push(i(f[H0],H0));return W0}function V(f,i){for(var W0 in i)if(Q(i,W0))f[W0]=i[W0];if(Q(i,"toString"))f.toString=i.toString;if(Q(i,"valueOf"))f.valueOf=i.valueOf;return f}function F(f,i,W0,H0){return wn0(f,i,W0,H0,!0).utc()}function L(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function N(f){if(f._pf==null)f._pf=L();return f._pf}var D;if(Array.prototype.some)D=Array.prototype.some;else D=function(f){var i=Object(this),W0=i.length>>>0,H0;for(H0=0;H0<W0;H0++)if(H0 in i&&f.call(this,i[H0],H0,i))return!0;return!1};function A(f){var i=null,W0=!1,H0=f._d&&!isNaN(f._d.getTime());if(H0){if(i=N(f),W0=D.call(i.parsedDateParts,function(L0){return L0!=null}),H0=i.overflow<0&&!i.empty&&!i.invalidEra&&!i.invalidMonth&&!i.invalidWeekday&&!i.weekdayMismatch&&!i.nullInput&&!i.invalidFormat&&!i.userInvalidated&&(!i.meridiem||i.meridiem&&W0),f._strict)H0=H0&&i.charsLeftOver===0&&i.unusedTokens.length===0&&i.bigHour===void 0}if(Object.isFrozen==null||!Object.isFrozen(f))f._isValid=H0;else return H0;return f._isValid}function B(f){var i=F(NaN);if(f!=null)V(N(i),f);else N(i).userInvalidated=!0;return i}var O=Y.momentProperties=[],E=!1;function M(f,i){var W0,H0,L0,I0=O.length;if(!K(i._isAMomentObject))f._isAMomentObject=i._isAMomentObject;if(!K(i._i))f._i=i._i;if(!K(i._f))f._f=i._f;if(!K(i._l))f._l=i._l;if(!K(i._strict))f._strict=i._strict;if(!K(i._tzm))f._tzm=i._tzm;if(!K(i._isUTC))f._isUTC=i._isUTC;if(!K(i._offset))f._offset=i._offset;if(!K(i._pf))f._pf=N(i);if(!K(i._locale))f._locale=i._locale;if(I0>0){for(W0=0;W0<I0;W0++)if(H0=O[W0],L0=i[H0],!K(L0))f[H0]=L0}return f}function R(f){if(M(this,f),this._d=new Date(f._d!=null?f._d.getTime():NaN),!this.isValid())this._d=new Date(NaN);if(E===!1)E=!0,Y.updateOffset(this),E=!1}function q(f){return f instanceof R||f!=null&&f._isAMomentObject!=null}function _(f){if(Y.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn)console.warn("Deprecation warning: "+f)}function P(f,i){var W0=!0;return V(function(){if(Y.deprecationHandler!=null)Y.deprecationHandler(null,f);if(W0){var H0=[],L0,I0,s0,H4=arguments.length;for(I0=0;I0<H4;I0++){if(L0="",typeof arguments[I0]==="object"){L0+=`
[`+I0+"] ";for(s0 in arguments[0])if(Q(arguments[0],s0))L0+=s0+": "+arguments[0][s0]+", ";L0=L0.slice(0,-2)}else L0=arguments[I0];H0.push(L0)}_(f+`
Arguments: `+Array.prototype.slice.call(H0).join("")+`
`+Error().stack),W0=!1}return i.apply(this,arguments)},i)}var w={};function j(f,i){if(Y.deprecationHandler!=null)Y.deprecationHandler(f,i);if(!w[f])_(i),w[f]=!0}Y.suppressDeprecationWarnings=!1,Y.deprecationHandler=null;function C(f){return typeof Function<"u"&&f instanceof Function||Object.prototype.toString.call(f)==="[object Function]"}function k(f){var i,W0;for(W0 in f)if(Q(f,W0))if(i=f[W0],C(i))this[W0]=i;else this["_"+W0]=i;this._config=f,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function S(f,i){var W0=V({},f),H0;for(H0 in i)if(Q(i,H0))if(J(f[H0])&&J(i[H0]))W0[H0]={},V(W0[H0],f[H0]),V(W0[H0],i[H0]);else if(i[H0]!=null)W0[H0]=i[H0];else delete W0[H0];for(H0 in f)if(Q(f,H0)&&!Q(i,H0)&&J(f[H0]))W0[H0]=V({},W0[H0]);return W0}function I(f){if(f!=null)this.set(f)}var v;if(Object.keys)v=Object.keys;else v=function(f){var i,W0=[];for(i in f)if(Q(f,i))W0.push(i);return W0};var x={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function y(f,i,W0){var H0=this._calendar[f]||this._calendar.sameElse;return C(H0)?H0.call(i,W0):H0}function d(f,i,W0){var H0=""+Math.abs(f),L0=i-H0.length,I0=f>=0;return(I0?W0?"+":"":"-")+Math.pow(10,Math.max(0,L0)).toString().substr(1)+H0}var u=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,b=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,g={},p={};function h(f,i,W0,H0){var L0=H0;if(typeof H0==="string")L0=function(){return this[H0]()};if(f)p[f]=L0;if(i)p[i[0]]=function(){return d(L0.apply(this,arguments),i[1],i[2])};if(W0)p[W0]=function(){return this.localeData().ordinal(L0.apply(this,arguments),f)}}function n(f){if(f.match(/\[[\s\S]/))return f.replace(/^\[|\]$/g,"");return f.replace(/\\/g,"")}function t(f){var i=f.match(u),W0,H0;for(W0=0,H0=i.length;W0<H0;W0++)if(p[i[W0]])i[W0]=p[i[W0]];else i[W0]=n(i[W0]);return function(L0){var I0="",s0;for(s0=0;s0<H0;s0++)I0+=C(i[s0])?i[s0].call(L0,f):i[s0];return I0}}function s(f,i){if(!f.isValid())return f.localeData().invalidDate();return i=K0(i,f.localeData()),g[i]=g[i]||t(i),g[i](f)}function K0(f,i){var W0=5;function H0(L0){return i.longDateFormat(L0)||L0}b.lastIndex=0;while(W0>=0&&b.test(f))f=f.replace(b,H0),b.lastIndex=0,W0-=1;return f}var X0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function a(f){var i=this._longDateFormat[f],W0=this._longDateFormat[f.toUpperCase()];if(i||!W0)return i;return this._longDateFormat[f]=W0.match(u).map(function(H0){if(H0==="MMMM"||H0==="MM"||H0==="DD"||H0==="dddd")return H0.slice(1);return H0}).join(""),this._longDateFormat[f]}var Q0="Invalid date";function e(){return this._invalidDate}var m="%d",$0=/\d{1,2}/;function Y0(f){return this._ordinal.replace("%d",f)}var Z0={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function F0(f,i,W0,H0){var L0=this._relativeTime[W0];return C(L0)?L0(f,i,W0,H0):L0.replace(/%d/i,f)}function D0(f,i){var W0=this._relativeTime[f>0?"future":"past"];return C(W0)?W0(i):W0.replace(/%s/i,i)}var O0={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function R0(f){return typeof f==="string"?O0[f]||O0[f.toLowerCase()]:void 0}function P0(f){var i={},W0,H0;for(H0 in f)if(Q(f,H0)){if(W0=R0(H0),W0)i[W0]=f[H0]}return i}var f0={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function p0(f){var i=[],W0;for(W0 in f)if(Q(f,W0))i.push({unit:W0,priority:f0[W0]});return i.sort(function(H0,L0){return H0.priority-L0.priority}),i}var U4=/\d/,P1=/\d\d/,d1=/\d{3}/,C0=/\d{4}/,n0=/[+-]?\d{6}/,J0=/\d\d?/,B0=/\d\d\d\d?/,Y1=/\d\d\d\d\d\d?/,c1=/\d{1,3}/,C4=/\d{1,4}/,c4=/[+-]?\d{1,6}/,r4=/\d+/,T6=/[+-]?\d+/,p6=/Z|[+-]\d\d:?\d\d/gi,n6=/Z|[+-]\d\d(?::?\d\d)?/gi,Z1=/[+-]?\d+(\.\d{1,3})?/,J4=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,I6=/^[1-9]\d?/,t4=/^([1-9]\d|\d)/,a1;a1={};function F1(f,i,W0){a1[f]=C(i)?i:function(H0,L0){return H0&&W0?W0:i}}function I1(f,i){if(!Q(a1,f))return new RegExp(M4(f));return a1[f](i._strict,i._locale)}function M4(f){return w4(f.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(i,W0,H0,L0,I0){return W0||H0||L0||I0}))}function w4(f){return f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function z6(f){if(f<0)return Math.ceil(f)||0;else return Math.floor(f)}function K4(f){var i=+f,W0=0;if(i!==0&&isFinite(i))W0=z6(i);return W0}var b4={};function N0(f,i){var W0,H0=i,L0;if(typeof f==="string")f=[f];if(Z(i))H0=function(I0,s0){s0[i]=K4(I0)};L0=f.length;for(W0=0;W0<L0;W0++)b4[f[W0]]=H0}function h0(f,i){N0(f,function(W0,H0,L0,I0){L0._w=L0._w||{},i(W0,L0._w,L0,I0)})}function a0(f,i,W0){if(i!=null&&Q(b4,f))b4[f](i,W0._a,W0,f)}function c0(f){return f%4===0&&f%100!==0||f%400===0}var L1=0,E1=1,l4=2,Q1=3,C1=4,f4=5,A6=6,J9=7,o7=8;h("Y",0,0,function(){var f=this.year();return f<=9999?d(f,4):"+"+f}),h(0,["YY",2],0,function(){return this.year()%100}),h(0,["YYYY",4],0,"year"),h(0,["YYYYY",5],0,"year"),h(0,["YYYYYY",6,!0],0,"year"),F1("Y",T6),F1("YY",J0,P1),F1("YYYY",C4,C0),F1("YYYYY",c4,n0),F1("YYYYYY",c4,n0),N0(["YYYYY","YYYYYY"],L1),N0("YYYY",function(f,i){i[L1]=f.length===2?Y.parseTwoDigitYear(f):K4(f)}),N0("YY",function(f,i){i[L1]=Y.parseTwoDigitYear(f)}),N0("Y",function(f,i){i[L1]=parseInt(f,10)});function $4(f){return c0(f)?366:365}Y.parseTwoDigitYear=function(f){return K4(f)+(K4(f)>68?1900:2000)};var i4=R6("FullYear",!0);function C9(){return c0(this.year())}function R6(f,i){return function(W0){if(W0!=null)return y8(this,f,W0),Y.updateOffset(this,i),this;else return R4(this,f)}}function R4(f,i){if(!f.isValid())return NaN;var{_d:W0,_isUTC:H0}=f;switch(i){case"Milliseconds":return H0?W0.getUTCMilliseconds():W0.getMilliseconds();case"Seconds":return H0?W0.getUTCSeconds():W0.getSeconds();case"Minutes":return H0?W0.getUTCMinutes():W0.getMinutes();case"Hours":return H0?W0.getUTCHours():W0.getHours();case"Date":return H0?W0.getUTCDate():W0.getDate();case"Day":return H0?W0.getUTCDay():W0.getDay();case"Month":return H0?W0.getUTCMonth():W0.getMonth();case"FullYear":return H0?W0.getUTCFullYear():W0.getFullYear();default:return NaN}}function y8(f,i,W0){var H0,L0,I0,s0,H4;if(!f.isValid()||isNaN(W0))return;switch(H0=f._d,L0=f._isUTC,i){case"Milliseconds":return void(L0?H0.setUTCMilliseconds(W0):H0.setMilliseconds(W0));case"Seconds":return void(L0?H0.setUTCSeconds(W0):H0.setSeconds(W0));case"Minutes":return void(L0?H0.setUTCMinutes(W0):H0.setMinutes(W0));case"Hours":return void(L0?H0.setUTCHours(W0):H0.setHours(W0));case"Date":return void(L0?H0.setUTCDate(W0):H0.setDate(W0));case"FullYear":break;default:return}I0=W0,s0=f.month(),H4=f.date(),H4=H4===29&&s0===1&&!c0(I0)?28:H4,L0?H0.setUTCFullYear(I0,s0,H4):H0.setFullYear(I0,s0,H4)}function A5(f){if(f=R0(f),C(this[f]))return this[f]();return this}function X$(f,i){if(typeof f==="object"){f=P0(f);var W0=p0(f),H0,L0=W0.length;for(H0=0;H0<L0;H0++)this[W0[H0].unit](f[W0[H0].unit])}else if(f=R0(f),C(this[f]))return this[f](i);return this}function u$(f,i){return(f%i+i)%i}var t6;if(Array.prototype.indexOf)t6=Array.prototype.indexOf;else t6=function(f){var i;for(i=0;i<this.length;++i)if(this[i]===f)return i;return-1};function bX(f,i){if(isNaN(f)||isNaN(i))return NaN;var W0=u$(i,12);return f+=(i-W0)/12,W0===1?c0(f)?29:28:31-W0%7%2}h("M",["MM",2],"Mo",function(){return this.month()+1}),h("MMM",0,0,function(f){return this.localeData().monthsShort(this,f)}),h("MMMM",0,0,function(f){return this.localeData().months(this,f)}),F1("M",J0,I6),F1("MM",J0,P1),F1("MMM",function(f,i){return i.monthsShortRegex(f)}),F1("MMMM",function(f,i){return i.monthsRegex(f)}),N0(["M","MM"],function(f,i){i[E1]=K4(f)-1}),N0(["MMM","MMMM"],function(f,i,W0,H0){var L0=W0._locale.monthsParse(f,H0,W0._strict);if(L0!=null)i[E1]=L0;else N(W0).invalidMonth=f});var GR="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),LK="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),DK=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,O9=J4,tW=J4;function _U(f,i){if(!f)return G(this._months)?this._months:this._months.standalone;return G(this._months)?this._months[f.month()]:this._months[(this._months.isFormat||DK).test(i)?"format":"standalone"][f.month()]}function IV(f,i){if(!f)return G(this._monthsShort)?this._monthsShort:this._monthsShort.standalone;return G(this._monthsShort)?this._monthsShort[f.month()]:this._monthsShort[DK.test(i)?"format":"standalone"][f.month()]}function MY(f,i,W0){var H0,L0,I0,s0=f.toLocaleLowerCase();if(!this._monthsParse){this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[];for(H0=0;H0<12;++H0)I0=F([2000,H0]),this._shortMonthsParse[H0]=this.monthsShort(I0,"").toLocaleLowerCase(),this._longMonthsParse[H0]=this.months(I0,"").toLocaleLowerCase()}if(W0)if(i==="MMM")return L0=t6.call(this._shortMonthsParse,s0),L0!==-1?L0:null;else return L0=t6.call(this._longMonthsParse,s0),L0!==-1?L0:null;else if(i==="MMM"){if(L0=t6.call(this._shortMonthsParse,s0),L0!==-1)return L0;return L0=t6.call(this._longMonthsParse,s0),L0!==-1?L0:null}else{if(L0=t6.call(this._longMonthsParse,s0),L0!==-1)return L0;return L0=t6.call(this._shortMonthsParse,s0),L0!==-1?L0:null}}function ad(f,i,W0){var H0,L0,I0;if(this._monthsParseExact)return MY.call(this,f,i,W0);if(!this._monthsParse)this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[];for(H0=0;H0<12;H0++){if(L0=F([2000,H0]),W0&&!this._longMonthsParse[H0])this._longMonthsParse[H0]=new RegExp("^"+this.months(L0,"").replace(".","")+"$","i"),this._shortMonthsParse[H0]=new RegExp("^"+this.monthsShort(L0,"").replace(".","")+"$","i");if(!W0&&!this._monthsParse[H0])I0="^"+this.months(L0,"")+"|^"+this.monthsShort(L0,""),this._monthsParse[H0]=new RegExp(I0.replace(".",""),"i");if(W0&&i==="MMMM"&&this._longMonthsParse[H0].test(f))return H0;else if(W0&&i==="MMM"&&this._shortMonthsParse[H0].test(f))return H0;else if(!W0&&this._monthsParse[H0].test(f))return H0}}function lC(f,i){if(!f.isValid())return f;if(typeof i==="string"){if(/^\d+$/.test(i))i=K4(i);else if(i=f.localeData().monthsParse(i),!Z(i))return f}var W0=i,H0=f.date();return H0=H0<29?H0:Math.min(H0,bX(f.year(),W0)),f._isUTC?f._d.setUTCMonth(W0,H0):f._d.setMonth(W0,H0),f}function cQ(f){if(f!=null)return lC(this,f),Y.updateOffset(this,!0),this;else return R4(this,"Month")}function qG0(){return bX(this.year(),this.month())}function p4(f){if(this._monthsParseExact){if(!Q(this,"_monthsRegex"))CV.call(this);if(f)return this._monthsShortStrictRegex;else return this._monthsShortRegex}else{if(!Q(this,"_monthsShortRegex"))this._monthsShortRegex=O9;return this._monthsShortStrictRegex&&f?this._monthsShortStrictRegex:this._monthsShortRegex}}function k7(f){if(this._monthsParseExact){if(!Q(this,"_monthsRegex"))CV.call(this);if(f)return this._monthsStrictRegex;else return this._monthsRegex}else{if(!Q(this,"_monthsRegex"))this._monthsRegex=tW;return this._monthsStrictRegex&&f?this._monthsStrictRegex:this._monthsRegex}}function CV(){function f(V6,I8){return I8.length-V6.length}var i=[],W0=[],H0=[],L0,I0,s0,H4;for(L0=0;L0<12;L0++)I0=F([2000,L0]),s0=w4(this.monthsShort(I0,"")),H4=w4(this.months(I0,"")),i.push(s0),W0.push(H4),H0.push(H4),H0.push(s0);i.sort(f),W0.sort(f),H0.sort(f),this._monthsRegex=new RegExp("^("+H0.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+W0.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function DN(f,i,W0,H0,L0,I0,s0){var H4;if(f<100&&f>=0){if(H4=new Date(f+400,i,W0,H0,L0,I0,s0),isFinite(H4.getFullYear()))H4.setFullYear(f)}else H4=new Date(f,i,W0,H0,L0,I0,s0);return H4}function NK(f){var i,W0;if(f<100&&f>=0){if(W0=Array.prototype.slice.call(arguments),W0[0]=f+400,i=new Date(Date.UTC.apply(null,W0)),isFinite(i.getUTCFullYear()))i.setUTCFullYear(f)}else i=new Date(Date.UTC.apply(null,arguments));return i}function jU(f,i,W0){var H0=7+i-W0,L0=(7+NK(f,0,H0).getUTCDay()-i)%7;return-L0+H0-1}function SV(f,i,W0,H0,L0){var I0=(7+W0-H0)%7,s0=jU(f,H0,L0),H4=1+7*(i-1)+I0+s0,V6,I8;if(H4<=0)V6=f-1,I8=$4(V6)+H4;else if(H4>$4(f))V6=f+1,I8=H4-$4(f);else V6=f,I8=H4;return{year:V6,dayOfYear:I8}}function AK(f,i,W0){var H0=jU(f.year(),i,W0),L0=Math.floor((f.dayOfYear()-H0-1)/7)+1,I0,s0;if(L0<1)s0=f.year()-1,I0=L0+Q5(s0,i,W0);else if(L0>Q5(f.year(),i,W0))I0=L0-Q5(f.year(),i,W0),s0=f.year()+1;else s0=f.year(),I0=L0;return{week:I0,year:s0}}function Q5(f,i,W0){var H0=jU(f,i,W0),L0=jU(f+1,i,W0);return($4(f)-H0+L0)/7}h("w",["ww",2],"wo","week"),h("W",["WW",2],"Wo","isoWeek"),F1("w",J0,I6),F1("ww",J0,P1),F1("W",J0,I6),F1("WW",J0,P1),h0(["w","ww","W","WW"],function(f,i,W0,H0){i[H0.substr(0,1)]=K4(f)});function kV(f){return AK(f,this._week.dow,this._week.doy).week}var iC={dow:0,doy:6};function sd(){return this._week.dow}function PG0(){return this._week.doy}function t7(f){var i=this.localeData().week(this);return f==null?i:this.add((f-i)*7,"d")}function nC(f){var i=AK(this,1,4).week;return f==null?i:this.add((f-i)*7,"d")}h("d",0,"do","day"),h("dd",0,0,function(f){return this.localeData().weekdaysMin(this,f)}),h("ddd",0,0,function(f){return this.localeData().weekdaysShort(this,f)}),h("dddd",0,0,function(f){return this.localeData().weekdays(this,f)}),h("e",0,0,"weekday"),h("E",0,0,"isoWeekday"),F1("d",J0),F1("e",J0),F1("E",J0),F1("dd",function(f,i){return i.weekdaysMinRegex(f)}),F1("ddd",function(f,i){return i.weekdaysShortRegex(f)}),F1("dddd",function(f,i){return i.weekdaysRegex(f)}),h0(["dd","ddd","dddd"],function(f,i,W0,H0){var L0=W0._locale.weekdaysParse(f,H0,W0._strict);if(L0!=null)i.d=L0;else N(W0).invalidWeekday=f}),h0(["d","e","E"],function(f,i,W0,H0){i[H0]=K4(f)});function Nn0(f,i){if(typeof f!=="string")return f;if(!isNaN(f))return parseInt(f,10);if(f=i.weekdaysParse(f),typeof f==="number")return f;return null}function rC(f,i){if(typeof f==="string")return i.weekdaysParse(f)%7||7;return isNaN(f)?null:f}function wG0(f,i){return f.slice(i,7).concat(f.slice(0,i))}var Yv4="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),An0="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xv4="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Gv4=J4,Jv4=J4,Qv4=J4;function Wv4(f,i){var W0=G(this._weekdays)?this._weekdays:this._weekdays[f&&f!==!0&&this._weekdays.isFormat.test(i)?"format":"standalone"];return f===!0?wG0(W0,this._week.dow):f?W0[f.day()]:W0}function Kv4(f){return f===!0?wG0(this._weekdaysShort,this._week.dow):f?this._weekdaysShort[f.day()]:this._weekdaysShort}function Zv4(f){return f===!0?wG0(this._weekdaysMin,this._week.dow):f?this._weekdaysMin[f.day()]:this._weekdaysMin}function Uv4(f,i,W0){var H0,L0,I0,s0=f.toLocaleLowerCase();if(!this._weekdaysParse){this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[];for(H0=0;H0<7;++H0)I0=F([2000,1]).day(H0),this._minWeekdaysParse[H0]=this.weekdaysMin(I0,"").toLocaleLowerCase(),this._shortWeekdaysParse[H0]=this.weekdaysShort(I0,"").toLocaleLowerCase(),this._weekdaysParse[H0]=this.weekdays(I0,"").toLocaleLowerCase()}if(W0)if(i==="dddd")return L0=t6.call(this._weekdaysParse,s0),L0!==-1?L0:null;else if(i==="ddd")return L0=t6.call(this._shortWeekdaysParse,s0),L0!==-1?L0:null;else return L0=t6.call(this._minWeekdaysParse,s0),L0!==-1?L0:null;else if(i==="dddd"){if(L0=t6.call(this._weekdaysParse,s0),L0!==-1)return L0;if(L0=t6.call(this._shortWeekdaysParse,s0),L0!==-1)return L0;return L0=t6.call(this._minWeekdaysParse,s0),L0!==-1?L0:null}else if(i==="ddd"){if(L0=t6.call(this._shortWeekdaysParse,s0),L0!==-1)return L0;if(L0=t6.call(this._weekdaysParse,s0),L0!==-1)return L0;return L0=t6.call(this._minWeekdaysParse,s0),L0!==-1?L0:null}else{if(L0=t6.call(this._minWeekdaysParse,s0),L0!==-1)return L0;if(L0=t6.call(this._weekdaysParse,s0),L0!==-1)return L0;return L0=t6.call(this._shortWeekdaysParse,s0),L0!==-1?L0:null}}function Hv4(f,i,W0){var H0,L0,I0;if(this._weekdaysParseExact)return Uv4.call(this,f,i,W0);if(!this._weekdaysParse)this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[];for(H0=0;H0<7;H0++){if(L0=F([2000,1]).day(H0),W0&&!this._fullWeekdaysParse[H0])this._fullWeekdaysParse[H0]=new RegExp("^"+this.weekdays(L0,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[H0]=new RegExp("^"+this.weekdaysShort(L0,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[H0]=new RegExp("^"+this.weekdaysMin(L0,"").replace(".","\\.?")+"$","i");if(!this._weekdaysParse[H0])I0="^"+this.weekdays(L0,"")+"|^"+this.weekdaysShort(L0,"")+"|^"+this.weekdaysMin(L0,""),this._weekdaysParse[H0]=new RegExp(I0.replace(".",""),"i");if(W0&&i==="dddd"&&this._fullWeekdaysParse[H0].test(f))return H0;else if(W0&&i==="ddd"&&this._shortWeekdaysParse[H0].test(f))return H0;else if(W0&&i==="dd"&&this._minWeekdaysParse[H0].test(f))return H0;else if(!W0&&this._weekdaysParse[H0].test(f))return H0}}function zv4(f){if(!this.isValid())return f!=null?this:NaN;var i=R4(this,"Day");if(f!=null)return f=Nn0(f,this.localeData()),this.add(f-i,"d");else return i}function Vv4(f){if(!this.isValid())return f!=null?this:NaN;var i=(this.day()+7-this.localeData()._week.dow)%7;return f==null?i:this.add(f-i,"d")}function Fv4(f){if(!this.isValid())return f!=null?this:NaN;if(f!=null){var i=rC(f,this.localeData());return this.day(this.day()%7?i:i-7)}else return this.day()||7}function Lv4(f){if(this._weekdaysParseExact){if(!Q(this,"_weekdaysRegex"))_G0.call(this);if(f)return this._weekdaysStrictRegex;else return this._weekdaysRegex}else{if(!Q(this,"_weekdaysRegex"))this._weekdaysRegex=Gv4;return this._weekdaysStrictRegex&&f?this._weekdaysStrictRegex:this._weekdaysRegex}}function Dv4(f){if(this._weekdaysParseExact){if(!Q(this,"_weekdaysRegex"))_G0.call(this);if(f)return this._weekdaysShortStrictRegex;else return this._weekdaysShortRegex}else{if(!Q(this,"_weekdaysShortRegex"))this._weekdaysShortRegex=Jv4;return this._weekdaysShortStrictRegex&&f?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}}function Nv4(f){if(this._weekdaysParseExact){if(!Q(this,"_weekdaysRegex"))_G0.call(this);if(f)return this._weekdaysMinStrictRegex;else return this._weekdaysMinRegex}else{if(!Q(this,"_weekdaysMinRegex"))this._weekdaysMinRegex=Qv4;return this._weekdaysMinStrictRegex&&f?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}}function _G0(){function f(AG,qH){return qH.length-AG.length}var i=[],W0=[],H0=[],L0=[],I0,s0,H4,V6,I8;for(I0=0;I0<7;I0++)s0=F([2000,1]).day(I0),H4=w4(this.weekdaysMin(s0,"")),V6=w4(this.weekdaysShort(s0,"")),I8=w4(this.weekdays(s0,"")),i.push(H4),W0.push(V6),H0.push(I8),L0.push(H4),L0.push(V6),L0.push(I8);i.sort(f),W0.sort(f),H0.sort(f),L0.sort(f),this._weekdaysRegex=new RegExp("^("+L0.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+H0.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+W0.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function jG0(){return this.hours()%12||12}function Av4(){return this.hours()||24}h("H",["HH",2],0,"hour"),h("h",["hh",2],0,jG0),h("k",["kk",2],0,Av4),h("hmm",0,0,function(){return""+jG0.apply(this)+d(this.minutes(),2)}),h("hmmss",0,0,function(){return""+jG0.apply(this)+d(this.minutes(),2)+d(this.seconds(),2)}),h("Hmm",0,0,function(){return""+this.hours()+d(this.minutes(),2)}),h("Hmmss",0,0,function(){return""+this.hours()+d(this.minutes(),2)+d(this.seconds(),2)});function Bn0(f,i){h(f,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),i)})}Bn0("a",!0),Bn0("A",!1);function On0(f,i){return i._meridiemParse}F1("a",On0),F1("A",On0),F1("H",J0,t4),F1("h",J0,I6),F1("k",J0,I6),F1("HH",J0,P1),F1("hh",J0,P1),F1("kk",J0,P1),F1("hmm",B0),F1("hmmss",Y1),F1("Hmm",B0),F1("Hmmss",Y1),N0(["H","HH"],Q1),N0(["k","kk"],function(f,i,W0){var H0=K4(f);i[Q1]=H0===24?0:H0}),N0(["a","A"],function(f,i,W0){W0._isPm=W0._locale.isPM(f),W0._meridiem=f}),N0(["h","hh"],function(f,i,W0){i[Q1]=K4(f),N(W0).bigHour=!0}),N0("hmm",function(f,i,W0){var H0=f.length-2;i[Q1]=K4(f.substr(0,H0)),i[C1]=K4(f.substr(H0)),N(W0).bigHour=!0}),N0("hmmss",function(f,i,W0){var H0=f.length-4,L0=f.length-2;i[Q1]=K4(f.substr(0,H0)),i[C1]=K4(f.substr(H0,2)),i[f4]=K4(f.substr(L0)),N(W0).bigHour=!0}),N0("Hmm",function(f,i,W0){var H0=f.length-2;i[Q1]=K4(f.substr(0,H0)),i[C1]=K4(f.substr(H0))}),N0("Hmmss",function(f,i,W0){var H0=f.length-4,L0=f.length-2;i[Q1]=K4(f.substr(0,H0)),i[C1]=K4(f.substr(H0,2)),i[f4]=K4(f.substr(L0))});function Bv4(f){return(f+"").toLowerCase().charAt(0)==="p"}var Ov4=/[ap]\.?m?\.?/i,Ev4=R6("Hours",!0);function Mv4(f,i,W0){if(f>11)return W0?"pm":"PM";else return W0?"am":"AM"}var En0={calendar:x,longDateFormat:X0,invalidDate:Q0,ordinal:m,dayOfMonthOrdinalParse:$0,relativeTime:Z0,months:GR,monthsShort:LK,week:iC,weekdays:Yv4,weekdaysMin:Xv4,weekdaysShort:An0,meridiemParse:Ov4},G$={},aC={},sC;function Rv4(f,i){var W0,H0=Math.min(f.length,i.length);for(W0=0;W0<H0;W0+=1)if(f[W0]!==i[W0])return W0;return H0}function Mn0(f){return f?f.toLowerCase().replace("_","-"):f}function qv4(f){var i=0,W0,H0,L0,I0;while(i<f.length){I0=Mn0(f[i]).split("-"),W0=I0.length,H0=Mn0(f[i+1]),H0=H0?H0.split("-"):null;while(W0>0){if(L0=od(I0.slice(0,W0).join("-")),L0)return L0;if(H0&&H0.length>=W0&&Rv4(I0,H0)>=W0-1)break;W0--}i++}return sC}function Pv4(f){return!!(f&&f.match("^[^/\\\\]*$"))}function od(f){var i=null,W0;if(G$[f]===void 0&&typeof sR<"u"&&sR&&sR.exports&&Pv4(f))try{i=sC._abbr,W0=A0,W0("./locale/"+f),vV(i)}catch(H0){G$[f]=null}return G$[f]}function vV(f,i){var W0;if(f){if(K(i))W0=OH(f);else W0=TG0(f,i);if(W0)sC=W0;else if(typeof console<"u"&&console.warn)console.warn("Locale "+f+" not found. Did you forget to load it?")}return sC._abbr}function TG0(f,i){if(i!==null){var W0,H0=En0;if(i.abbr=f,G$[f]!=null)j("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),H0=G$[f]._config;else if(i.parentLocale!=null)if(G$[i.parentLocale]!=null)H0=G$[i.parentLocale]._config;else if(W0=od(i.parentLocale),W0!=null)H0=W0._config;else{if(!aC[i.parentLocale])aC[i.parentLocale]=[];return aC[i.parentLocale].push({name:f,config:i}),null}if(G$[f]=new I(S(H0,i)),aC[f])aC[f].forEach(function(L0){TG0(L0.name,L0.config)});return vV(f),G$[f]}else return delete G$[f],null}function wv4(f,i){if(i!=null){var W0,H0,L0=En0;if(G$[f]!=null&&G$[f].parentLocale!=null)G$[f].set(S(G$[f]._config,i));else{if(H0=od(f),H0!=null)L0=H0._config;if(i=S(L0,i),H0==null)i.abbr=f;W0=new I(i),W0.parentLocale=G$[f],G$[f]=W0}vV(f)}else if(G$[f]!=null){if(G$[f].parentLocale!=null){if(G$[f]=G$[f].parentLocale,f===vV())vV(f)}else if(G$[f]!=null)delete G$[f]}return G$[f]}function OH(f){var i;if(f&&f._locale&&f._locale._abbr)f=f._locale._abbr;if(!f)return sC;if(!G(f)){if(i=od(f),i)return i;f=[f]}return qv4(f)}function _v4(){return v(G$)}function IG0(f){var i,W0=f._a;if(W0&&N(f).overflow===-2){if(i=W0[E1]<0||W0[E1]>11?E1:W0[l4]<1||W0[l4]>bX(W0[L1],W0[E1])?l4:W0[Q1]<0||W0[Q1]>24||W0[Q1]===24&&(W0[C1]!==0||W0[f4]!==0||W0[A6]!==0)?Q1:W0[C1]<0||W0[C1]>59?C1:W0[f4]<0||W0[f4]>59?f4:W0[A6]<0||W0[A6]>999?A6:-1,N(f)._overflowDayOfYear&&(i<L1||i>l4))i=l4;if(N(f)._overflowWeeks&&i===-1)i=J9;if(N(f)._overflowWeekday&&i===-1)i=o7;N(f).overflow=i}return f}var jv4=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Tv4=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Iv4=/Z|[+-]\d\d(?::?\d\d)?/,td=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],CG0=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Cv4=/^\/?Date\((-?\d+)/i,Sv4=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,kv4={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Rn0(f){var i,W0,H0=f._i,L0=jv4.exec(H0)||Tv4.exec(H0),I0,s0,H4,V6,I8=td.length,AG=CG0.length;if(L0){N(f).iso=!0;for(i=0,W0=I8;i<W0;i++)if(td[i][1].exec(L0[1])){s0=td[i][0],I0=td[i][2]!==!1;break}if(s0==null){f._isValid=!1;return}if(L0[3]){for(i=0,W0=AG;i<W0;i++)if(CG0[i][1].exec(L0[3])){H4=(L0[2]||" ")+CG0[i][0];break}if(H4==null){f._isValid=!1;return}}if(!I0&&H4!=null){f._isValid=!1;return}if(L0[4])if(Iv4.exec(L0[4]))V6="Z";else{f._isValid=!1;return}f._f=s0+(H4||"")+(V6||""),kG0(f)}else f._isValid=!1}function vv4(f,i,W0,H0,L0,I0){var s0=[xv4(f),LK.indexOf(i),parseInt(W0,10),parseInt(H0,10),parseInt(L0,10)];if(I0)s0.push(parseInt(I0,10));return s0}function xv4(f){var i=parseInt(f,10);if(i<=49)return 2000+i;else if(i<=999)return 1900+i;return i}function yv4(f){return f.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function bv4(f,i,W0){if(f){var H0=An0.indexOf(f),L0=new Date(i[0],i[1],i[2]).getDay();if(H0!==L0)return N(W0).weekdayMismatch=!0,W0._isValid=!1,!1}return!0}function hv4(f,i,W0){if(f)return kv4[f];else if(i)return 0;else{var H0=parseInt(W0,10),L0=H0%100,I0=(H0-L0)/100;return I0*60+L0}}function qn0(f){var i=Sv4.exec(yv4(f._i)),W0;if(i){if(W0=vv4(i[4],i[3],i[2],i[5],i[6],i[7]),!bv4(i[1],W0,f))return;f._a=W0,f._tzm=hv4(i[8],i[9],i[10]),f._d=NK.apply(null,f._a),f._d.setUTCMinutes(f._d.getUTCMinutes()-f._tzm),N(f).rfc2822=!0}else f._isValid=!1}function fv4(f){var i=Cv4.exec(f._i);if(i!==null){f._d=new Date(+i[1]);return}if(Rn0(f),f._isValid===!1)delete f._isValid;else return;if(qn0(f),f._isValid===!1)delete f._isValid;else return;if(f._strict)f._isValid=!1;else Y.createFromInputFallback(f)}Y.createFromInputFallback=P("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(f){f._d=new Date(f._i+(f._useUTC?" UTC":""))});function JR(f,i,W0){if(f!=null)return f;if(i!=null)return i;return W0}function gv4(f){var i=new Date(Y.now());if(f._useUTC)return[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()];return[i.getFullYear(),i.getMonth(),i.getDate()]}function SG0(f){var i,W0,H0=[],L0,I0,s0;if(f._d)return;if(L0=gv4(f),f._w&&f._a[l4]==null&&f._a[E1]==null)mv4(f);if(f._dayOfYear!=null){if(s0=JR(f._a[L1],L0[L1]),f._dayOfYear>$4(s0)||f._dayOfYear===0)N(f)._overflowDayOfYear=!0;W0=NK(s0,0,f._dayOfYear),f._a[E1]=W0.getUTCMonth(),f._a[l4]=W0.getUTCDate()}for(i=0;i<3&&f._a[i]==null;++i)f._a[i]=H0[i]=L0[i];for(;i<7;i++)f._a[i]=H0[i]=f._a[i]==null?i===2?1:0:f._a[i];if(f._a[Q1]===24&&f._a[C1]===0&&f._a[f4]===0&&f._a[A6]===0)f._nextDay=!0,f._a[Q1]=0;if(f._d=(f._useUTC?NK:DN).apply(null,H0),I0=f._useUTC?f._d.getUTCDay():f._d.getDay(),f._tzm!=null)f._d.setUTCMinutes(f._d.getUTCMinutes()-f._tzm);if(f._nextDay)f._a[Q1]=24;if(f._w&&typeof f._w.d<"u"&&f._w.d!==I0)N(f).weekdayMismatch=!0}function mv4(f){var i,W0,H0,L0,I0,s0,H4,V6,I8;if(i=f._w,i.GG!=null||i.W!=null||i.E!=null){if(I0=1,s0=4,W0=JR(i.GG,f._a[L1],AK(i5(),1,4).year),H0=JR(i.W,1),L0=JR(i.E,1),L0<1||L0>7)V6=!0}else if(I0=f._locale._week.dow,s0=f._locale._week.doy,I8=AK(i5(),I0,s0),W0=JR(i.gg,f._a[L1],I8.year),H0=JR(i.w,I8.week),i.d!=null){if(L0=i.d,L0<0||L0>6)V6=!0}else if(i.e!=null){if(L0=i.e+I0,i.e<0||i.e>6)V6=!0}else L0=I0;if(H0<1||H0>Q5(W0,I0,s0))N(f)._overflowWeeks=!0;else if(V6!=null)N(f)._overflowWeekday=!0;else H4=SV(W0,H0,L0,I0,s0),f._a[L1]=H4.year,f._dayOfYear=H4.dayOfYear}Y.ISO_8601=function(){},Y.RFC_2822=function(){};function kG0(f){if(f._f===Y.ISO_8601){Rn0(f);return}if(f._f===Y.RFC_2822){qn0(f);return}f._a=[],N(f).empty=!0;var i=""+f._i,W0,H0,L0,I0,s0,H4=i.length,V6=0,I8,AG;L0=K0(f._f,f._locale).match(u)||[],AG=L0.length;for(W0=0;W0<AG;W0++){if(I0=L0[W0],H0=(i.match(I1(I0,f))||[])[0],H0){if(s0=i.substr(0,i.indexOf(H0)),s0.length>0)N(f).unusedInput.push(s0);i=i.slice(i.indexOf(H0)+H0.length),V6+=H0.length}if(p[I0]){if(H0)N(f).empty=!1;else N(f).unusedTokens.push(I0);a0(I0,H0,f)}else if(f._strict&&!H0)N(f).unusedTokens.push(I0)}if(N(f).charsLeftOver=H4-V6,i.length>0)N(f).unusedInput.push(i);if(f._a[Q1]<=12&&N(f).bigHour===!0&&f._a[Q1]>0)N(f).bigHour=void 0;if(N(f).parsedDateParts=f._a.slice(0),N(f).meridiem=f._meridiem,f._a[Q1]=uv4(f._locale,f._a[Q1],f._meridiem),I8=N(f).era,I8!==null)f._a[L1]=f._locale.erasConvertYear(I8,f._a[L1]);SG0(f),IG0(f)}function uv4(f,i,W0){var H0;if(W0==null)return i;if(f.meridiemHour!=null)return f.meridiemHour(i,W0);else if(f.isPM!=null){if(H0=f.isPM(W0),H0&&i<12)i+=12;if(!H0&&i===12)i=0;return i}else return i}function pv4(f){var i,W0,H0,L0,I0,s0,H4=!1,V6=f._f.length;if(V6===0){N(f).invalidFormat=!0,f._d=new Date(NaN);return}for(L0=0;L0<V6;L0++){if(I0=0,s0=!1,i=M({},f),f._useUTC!=null)i._useUTC=f._useUTC;if(i._f=f._f[L0],kG0(i),A(i))s0=!0;if(I0+=N(i).charsLeftOver,I0+=N(i).unusedTokens.length*10,N(i).score=I0,!H4){if(H0==null||I0<H0||s0){if(H0=I0,W0=i,s0)H4=!0}}else if(I0<H0)H0=I0,W0=i}V(f,W0||i)}function dv4(f){if(f._d)return;var i=P0(f._i),W0=i.day===void 0?i.date:i.day;f._a=z([i.year,i.month,W0,i.hour,i.minute,i.second,i.millisecond],function(H0){return H0&&parseInt(H0,10)}),SG0(f)}function cv4(f){var i=new R(IG0(Pn0(f)));if(i._nextDay)i.add(1,"d"),i._nextDay=void 0;return i}function Pn0(f){var{_i:i,_f:W0}=f;if(f._locale=f._locale||OH(f._l),i===null||W0===void 0&&i==="")return B({nullInput:!0});if(typeof i==="string")f._i=i=f._locale.preparse(i);if(q(i))return new R(IG0(i));else if(H(i))f._d=i;else if(G(W0))pv4(f);else if(W0)kG0(f);else lv4(f);if(!A(f))f._d=null;return f}function lv4(f){var i=f._i;if(K(i))f._d=new Date(Y.now());else if(H(i))f._d=new Date(i.valueOf());else if(typeof i==="string")fv4(f);else if(G(i))f._a=z(i.slice(0),function(W0){return parseInt(W0,10)}),SG0(f);else if(J(i))dv4(f);else if(Z(i))f._d=new Date(i);else Y.createFromInputFallback(f)}function wn0(f,i,W0,H0,L0){var I0={};if(i===!0||i===!1)H0=i,i=void 0;if(W0===!0||W0===!1)H0=W0,W0=void 0;if(J(f)&&W(f)||G(f)&&f.length===0)f=void 0;return I0._isAMomentObject=!0,I0._useUTC=I0._isUTC=L0,I0._l=W0,I0._i=f,I0._f=i,I0._strict=H0,cv4(I0)}function i5(f,i,W0,H0){return wn0(f,i,W0,H0,!1)}var iv4=P("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var f=i5.apply(null,arguments);if(this.isValid()&&f.isValid())return f<this?this:f;else return B()}),nv4=P("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var f=i5.apply(null,arguments);if(this.isValid()&&f.isValid())return f>this?this:f;else return B()});function _n0(f,i){var W0,H0;if(i.length===1&&G(i[0]))i=i[0];if(!i.length)return i5();W0=i[0];for(H0=1;H0<i.length;++H0)if(!i[H0].isValid()||i[H0][f](W0))W0=i[H0];return W0}function rv4(){var f=[].slice.call(arguments,0);return _n0("isBefore",f)}function av4(){var f=[].slice.call(arguments,0);return _n0("isAfter",f)}var sv4=function(){return Date.now?Date.now():+new Date},oC=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ov4(f){var i,W0=!1,H0,L0=oC.length;for(i in f)if(Q(f,i)&&!(t6.call(oC,i)!==-1&&(f[i]==null||!isNaN(f[i]))))return!1;for(H0=0;H0<L0;++H0)if(f[oC[H0]]){if(W0)return!1;if(parseFloat(f[oC[H0]])!==K4(f[oC[H0]]))W0=!0}return!0}function tv4(){return this._isValid}function ev4(){return BK(NaN)}function ed(f){var i=P0(f),W0=i.year||0,H0=i.quarter||0,L0=i.month||0,I0=i.week||i.isoWeek||0,s0=i.day||0,H4=i.hour||0,V6=i.minute||0,I8=i.second||0,AG=i.millisecond||0;this._isValid=ov4(i),this._milliseconds=+AG+I8*1000+V6*60000+H4*1000*60*60,this._days=+s0+I0*7,this._months=+L0+H0*3+W0*12,this._data={},this._locale=OH(),this._bubble()}function $c(f){return f instanceof ed}function vG0(f){if(f<0)return Math.round(-1*f)*-1;else return Math.round(f)}function $x4(f,i,W0){var H0=Math.min(f.length,i.length),L0=Math.abs(f.length-i.length),I0=0,s0;for(s0=0;s0<H0;s0++)if(W0&&f[s0]!==i[s0]||!W0&&K4(f[s0])!==K4(i[s0]))I0++;return I0+L0}function jn0(f,i){h(f,0,0,function(){var W0=this.utcOffset(),H0="+";if(W0<0)W0=-W0,H0="-";return H0+d(~~(W0/60),2)+i+d(~~W0%60,2)})}jn0("Z",":"),jn0("ZZ",""),F1("Z",n6),F1("ZZ",n6),N0(["Z","ZZ"],function(f,i,W0){W0._useUTC=!0,W0._tzm=xG0(n6,f)});var Yx4=/([\+\-]|\d\d)/gi;function xG0(f,i){var W0=(i||"").match(f),H0,L0,I0;if(W0===null)return null;return H0=W0[W0.length-1]||[],L0=(H0+"").match(Yx4)||["-",0,0],I0=+(L0[1]*60)+K4(L0[2]),I0===0?0:L0[0]==="+"?I0:-I0}function yG0(f,i){var W0,H0;if(i._isUTC)return W0=i.clone(),H0=(q(f)||H(f)?f.valueOf():i5(f).valueOf())-W0.valueOf(),W0._d.setTime(W0._d.valueOf()+H0),Y.updateOffset(W0,!1),W0;else return i5(f).local()}function bG0(f){return-Math.round(f._d.getTimezoneOffset())}Y.updateOffset=function(){};function Xx4(f,i,W0){var H0=this._offset||0,L0;if(!this.isValid())return f!=null?this:NaN;if(f!=null){if(typeof f==="string"){if(f=xG0(n6,f),f===null)return this}else if(Math.abs(f)<16&&!W0)f=f*60;if(!this._isUTC&&i)L0=bG0(this);if(this._offset=f,this._isUTC=!0,L0!=null)this.add(L0,"m");if(H0!==f){if(!i||this._changeInProgress)Sn0(this,BK(f-H0,"m"),1,!1);else if(!this._changeInProgress)this._changeInProgress=!0,Y.updateOffset(this,!0),this._changeInProgress=null}return this}else return this._isUTC?H0:bG0(this)}function Gx4(f,i){if(f!=null){if(typeof f!=="string")f=-f;return this.utcOffset(f,i),this}else return-this.utcOffset()}function Jx4(f){return this.utcOffset(0,f)}function Qx4(f){if(this._isUTC){if(this.utcOffset(0,f),this._isUTC=!1,f)this.subtract(bG0(this),"m")}return this}function Wx4(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i==="string"){var f=xG0(p6,this._i);if(f!=null)this.utcOffset(f);else this.utcOffset(0,!0)}return this}function Kx4(f){if(!this.isValid())return!1;return f=f?i5(f).utcOffset():0,(this.utcOffset()-f)%60===0}function Zx4(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ux4(){if(!K(this._isDSTShifted))return this._isDSTShifted;var f={},i;if(M(f,this),f=Pn0(f),f._a)i=f._isUTC?F(f._a):i5(f._a),this._isDSTShifted=this.isValid()&&$x4(f._a,i.toArray())>0;else this._isDSTShifted=!1;return this._isDSTShifted}function Hx4(){return this.isValid()?!this._isUTC:!1}function zx4(){return this.isValid()?this._isUTC:!1}function Tn0(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Vx4=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Fx4=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function BK(f,i){var W0=f,H0=null,L0,I0,s0;if($c(f))W0={ms:f._milliseconds,d:f._days,M:f._months};else if(Z(f)||!isNaN(+f))if(W0={},i)W0[i]=+f;else W0.milliseconds=+f;else if(H0=Vx4.exec(f))L0=H0[1]==="-"?-1:1,W0={y:0,d:K4(H0[l4])*L0,h:K4(H0[Q1])*L0,m:K4(H0[C1])*L0,s:K4(H0[f4])*L0,ms:K4(vG0(H0[A6]*1000))*L0};else if(H0=Fx4.exec(f))L0=H0[1]==="-"?-1:1,W0={y:NN(H0[2],L0),M:NN(H0[3],L0),w:NN(H0[4],L0),d:NN(H0[5],L0),h:NN(H0[6],L0),m:NN(H0[7],L0),s:NN(H0[8],L0)};else if(W0==null)W0={};else if(typeof W0==="object"&&(("from"in W0)||("to"in W0)))s0=Lx4(i5(W0.from),i5(W0.to)),W0={},W0.ms=s0.milliseconds,W0.M=s0.months;if(I0=new ed(W0),$c(f)&&Q(f,"_locale"))I0._locale=f._locale;if($c(f)&&Q(f,"_isValid"))I0._isValid=f._isValid;return I0}BK.fn=ed.prototype,BK.invalid=ev4;function NN(f,i){var W0=f&&parseFloat(f.replace(",","."));return(isNaN(W0)?0:W0)*i}function In0(f,i){var W0={};if(W0.months=i.month()-f.month()+(i.year()-f.year())*12,f.clone().add(W0.months,"M").isAfter(i))--W0.months;return W0.milliseconds=+i-+f.clone().add(W0.months,"M"),W0}function Lx4(f,i){var W0;if(!(f.isValid()&&i.isValid()))return{milliseconds:0,months:0};if(i=yG0(i,f),f.isBefore(i))W0=In0(f,i);else W0=In0(i,f),W0.milliseconds=-W0.milliseconds,W0.months=-W0.months;return W0}function Cn0(f,i){return function(W0,H0){var L0,I0;if(H0!==null&&!isNaN(+H0))j(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),I0=W0,W0=H0,H0=I0;return L0=BK(W0,H0),Sn0(this,L0,f),this}}function Sn0(f,i,W0,H0){var L0=i._milliseconds,I0=vG0(i._days),s0=vG0(i._months);if(!f.isValid())return;if(H0=H0==null?!0:H0,s0)lC(f,R4(f,"Month")+s0*W0);if(I0)y8(f,"Date",R4(f,"Date")+I0*W0);if(L0)f._d.setTime(f._d.valueOf()+L0*W0);if(H0)Y.updateOffset(f,I0||s0)}var Dx4=Cn0(1,"add"),Nx4=Cn0(-1,"subtract");function kn0(f){return typeof f==="string"||f instanceof String}function Ax4(f){return q(f)||H(f)||kn0(f)||Z(f)||Ox4(f)||Bx4(f)||f===null||f===void 0}function Bx4(f){var i=J(f)&&!W(f),W0=!1,H0=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],L0,I0,s0=H0.length;for(L0=0;L0<s0;L0+=1)I0=H0[L0],W0=W0||Q(f,I0);return i&&W0}function Ox4(f){var i=G(f),W0=!1;if(i)W0=f.filter(function(H0){return!Z(H0)&&kn0(f)}).length===0;return i&&W0}function Ex4(f){var i=J(f)&&!W(f),W0=!1,H0=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],L0,I0;for(L0=0;L0<H0.length;L0+=1)I0=H0[L0],W0=W0||Q(f,I0);return i&&W0}function Mx4(f,i){var W0=f.diff(i,"days",!0);return W0<-6?"sameElse":W0<-1?"lastWeek":W0<0?"lastDay":W0<1?"sameDay":W0<2?"nextDay":W0<7?"nextWeek":"sameElse"}function Rx4(f,i){if(arguments.length===1){if(!arguments[0])f=void 0,i=void 0;else if(Ax4(arguments[0]))f=arguments[0],i=void 0;else if(Ex4(arguments[0]))i=arguments[0],f=void 0}var W0=f||i5(),H0=yG0(W0,this).startOf("day"),L0=Y.calendarFormat(this,H0)||"sameElse",I0=i&&(C(i[L0])?i[L0].call(this,W0):i[L0]);return this.format(I0||this.localeData().calendar(L0,this,i5(W0)))}function qx4(){return new R(this)}function Px4(f,i){var W0=q(f)?f:i5(f);if(!(this.isValid()&&W0.isValid()))return!1;if(i=R0(i)||"millisecond",i==="millisecond")return this.valueOf()>W0.valueOf();else return W0.valueOf()<this.clone().startOf(i).valueOf()}function wx4(f,i){var W0=q(f)?f:i5(f);if(!(this.isValid()&&W0.isValid()))return!1;if(i=R0(i)||"millisecond",i==="millisecond")return this.valueOf()<W0.valueOf();else return this.clone().endOf(i).valueOf()<W0.valueOf()}function _x4(f,i,W0,H0){var L0=q(f)?f:i5(f),I0=q(i)?i:i5(i);if(!(this.isValid()&&L0.isValid()&&I0.isValid()))return!1;return H0=H0||"()",(H0[0]==="("?this.isAfter(L0,W0):!this.isBefore(L0,W0))&&(H0[1]===")"?this.isBefore(I0,W0):!this.isAfter(I0,W0))}function jx4(f,i){var W0=q(f)?f:i5(f),H0;if(!(this.isValid()&&W0.isValid()))return!1;if(i=R0(i)||"millisecond",i==="millisecond")return this.valueOf()===W0.valueOf();else return H0=W0.valueOf(),this.clone().startOf(i).valueOf()<=H0&&H0<=this.clone().endOf(i).valueOf()}function Tx4(f,i){return this.isSame(f,i)||this.isAfter(f,i)}function Ix4(f,i){return this.isSame(f,i)||this.isBefore(f,i)}function Cx4(f,i,W0){var H0,L0,I0;if(!this.isValid())return NaN;if(H0=yG0(f,this),!H0.isValid())return NaN;switch(L0=(H0.utcOffset()-this.utcOffset())*60000,i=R0(i),i){case"year":I0=Yc(this,H0)/12;break;case"month":I0=Yc(this,H0);break;case"quarter":I0=Yc(this,H0)/3;break;case"second":I0=(this-H0)/1000;break;case"minute":I0=(this-H0)/60000;break;case"hour":I0=(this-H0)/3600000;break;case"day":I0=(this-H0-L0)/86400000;break;case"week":I0=(this-H0-L0)/604800000;break;default:I0=this-H0}return W0?I0:z6(I0)}function Yc(f,i){if(f.date()<i.date())return-Yc(i,f);var W0=(i.year()-f.year())*12+(i.month()-f.month()),H0=f.clone().add(W0,"months"),L0,I0;if(i-H0<0)L0=f.clone().add(W0-1,"months"),I0=(i-H0)/(H0-L0);else L0=f.clone().add(W0+1,"months"),I0=(i-H0)/(L0-H0);return-(W0+I0)||0}Y.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",Y.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Sx4(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function kx4(f){if(!this.isValid())return null;var i=f!==!0,W0=i?this.clone().utc():this;if(W0.year()<0||W0.year()>9999)return s(W0,i?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ");if(C(Date.prototype.toISOString))if(i)return this.toDate().toISOString();else return new Date(this.valueOf()+this.utcOffset()*60*1000).toISOString().replace("Z",s(W0,"Z"));return s(W0,i?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function vx4(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var f="moment",i="",W0,H0,L0,I0;if(!this.isLocal())f=this.utcOffset()===0?"moment.utc":"moment.parseZone",i="Z";return W0="["+f+'("]',H0=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",L0="-MM-DD[T]HH:mm:ss.SSS",I0=i+'[")]',this.format(W0+H0+L0+I0)}function xx4(f){if(!f)f=this.isUtc()?Y.defaultFormatUtc:Y.defaultFormat;var i=s(this,f);return this.localeData().postformat(i)}function yx4(f,i){if(this.isValid()&&(q(f)&&f.isValid()||i5(f).isValid()))return BK({to:this,from:f}).locale(this.locale()).humanize(!i);else return this.localeData().invalidDate()}function bx4(f){return this.from(i5(),f)}function hx4(f,i){if(this.isValid()&&(q(f)&&f.isValid()||i5(f).isValid()))return BK({from:this,to:f}).locale(this.locale()).humanize(!i);else return this.localeData().invalidDate()}function fx4(f){return this.to(i5(),f)}function vn0(f){var i;if(f===void 0)return this._locale._abbr;else{if(i=OH(f),i!=null)this._locale=i;return this}}var xn0=P("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(f){if(f===void 0)return this.localeData();else return this.locale(f)});function yn0(){return this._locale}var Xc=1000,QR=60*Xc,Gc=60*QR,bn0=3506328*Gc;function WR(f,i){return(f%i+i)%i}function hn0(f,i,W0){if(f<100&&f>=0)return new Date(f+400,i,W0)-bn0;else return new Date(f,i,W0).valueOf()}function fn0(f,i,W0){if(f<100&&f>=0)return Date.UTC(f+400,i,W0)-bn0;else return Date.UTC(f,i,W0)}function gx4(f){var i,W0;if(f=R0(f),f===void 0||f==="millisecond"||!this.isValid())return this;switch(W0=this._isUTC?fn0:hn0,f){case"year":i=W0(this.year(),0,1);break;case"quarter":i=W0(this.year(),this.month()-this.month()%3,1);break;case"month":i=W0(this.year(),this.month(),1);break;case"week":i=W0(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":i=W0(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":i=W0(this.year(),this.month(),this.date());break;case"hour":i=this._d.valueOf(),i-=WR(i+(this._isUTC?0:this.utcOffset()*QR),Gc);break;case"minute":i=this._d.valueOf(),i-=WR(i,QR);break;case"second":i=this._d.valueOf(),i-=WR(i,Xc);break}return this._d.setTime(i),Y.updateOffset(this,!0),this}function mx4(f){var i,W0;if(f=R0(f),f===void 0||f==="millisecond"||!this.isValid())return this;switch(W0=this._isUTC?fn0:hn0,f){case"year":i=W0(this.year()+1,0,1)-1;break;case"quarter":i=W0(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":i=W0(this.year(),this.month()+1,1)-1;break;case"week":i=W0(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":i=W0(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":i=W0(this.year(),this.month(),this.date()+1)-1;break;case"hour":i=this._d.valueOf(),i+=Gc-WR(i+(this._isUTC?0:this.utcOffset()*QR),Gc)-1;break;case"minute":i=this._d.valueOf(),i+=QR-WR(i,QR)-1;break;case"second":i=this._d.valueOf(),i+=Xc-WR(i,Xc)-1;break}return this._d.setTime(i),Y.updateOffset(this,!0),this}function ux4(){return this._d.valueOf()-(this._offset||0)*60000}function px4(){return Math.floor(this.valueOf()/1000)}function dx4(){return new Date(this.valueOf())}function cx4(){var f=this;return[f.year(),f.month(),f.date(),f.hour(),f.minute(),f.second(),f.millisecond()]}function lx4(){var f=this;return{years:f.year(),months:f.month(),date:f.date(),hours:f.hours(),minutes:f.minutes(),seconds:f.seconds(),milliseconds:f.milliseconds()}}function ix4(){return this.isValid()?this.toISOString():null}function nx4(){return A(this)}function rx4(){return V({},N(this))}function ax4(){return N(this).overflow}function sx4(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}h("N",0,0,"eraAbbr"),h("NN",0,0,"eraAbbr"),h("NNN",0,0,"eraAbbr"),h("NNNN",0,0,"eraName"),h("NNNNN",0,0,"eraNarrow"),h("y",["y",1],"yo","eraYear"),h("y",["yy",2],0,"eraYear"),h("y",["yyy",3],0,"eraYear"),h("y",["yyyy",4],0,"eraYear"),F1("N",hG0),F1("NN",hG0),F1("NNN",hG0),F1("NNNN",Ky4),F1("NNNNN",Zy4),N0(["N","NN","NNN","NNNN","NNNNN"],function(f,i,W0,H0){var L0=W0._locale.erasParse(f,H0,W0._strict);if(L0)N(W0).era=L0;else N(W0).invalidEra=f}),F1("y",r4),F1("yy",r4),F1("yyy",r4),F1("yyyy",r4),F1("yo",Uy4),N0(["y","yy","yyy","yyyy"],L1),N0(["yo"],function(f,i,W0,H0){var L0;if(W0._locale._eraYearOrdinalRegex)L0=f.match(W0._locale._eraYearOrdinalRegex);if(W0._locale.eraYearOrdinalParse)i[L1]=W0._locale.eraYearOrdinalParse(f,L0);else i[L1]=parseInt(f,10)});function ox4(f,i){var W0,H0,L0,I0=this._eras||OH("en")._eras;for(W0=0,H0=I0.length;W0<H0;++W0){switch(typeof I0[W0].since){case"string":L0=Y(I0[W0].since).startOf("day"),I0[W0].since=L0.valueOf();break}switch(typeof I0[W0].until){case"undefined":I0[W0].until=1/0;break;case"string":L0=Y(I0[W0].until).startOf("day").valueOf(),I0[W0].until=L0.valueOf();break}}return I0}function tx4(f,i,W0){var H0,L0,I0=this.eras(),s0,H4,V6;f=f.toUpperCase();for(H0=0,L0=I0.length;H0<L0;++H0)if(s0=I0[H0].name.toUpperCase(),H4=I0[H0].abbr.toUpperCase(),V6=I0[H0].narrow.toUpperCase(),W0)switch(i){case"N":case"NN":case"NNN":if(H4===f)return I0[H0];break;case"NNNN":if(s0===f)return I0[H0];break;case"NNNNN":if(V6===f)return I0[H0];break}else if([s0,H4,V6].indexOf(f)>=0)return I0[H0]}function ex4(f,i){var W0=f.since<=f.until?1:-1;if(i===void 0)return Y(f.since).year();else return Y(f.since).year()+(i-f.offset)*W0}function $y4(){var f,i,W0,H0=this.localeData().eras();for(f=0,i=H0.length;f<i;++f){if(W0=this.clone().startOf("day").valueOf(),H0[f].since<=W0&&W0<=H0[f].until)return H0[f].name;if(H0[f].until<=W0&&W0<=H0[f].since)return H0[f].name}return""}function Yy4(){var f,i,W0,H0=this.localeData().eras();for(f=0,i=H0.length;f<i;++f){if(W0=this.clone().startOf("day").valueOf(),H0[f].since<=W0&&W0<=H0[f].until)return H0[f].narrow;if(H0[f].until<=W0&&W0<=H0[f].since)return H0[f].narrow}return""}function Xy4(){var f,i,W0,H0=this.localeData().eras();for(f=0,i=H0.length;f<i;++f){if(W0=this.clone().startOf("day").valueOf(),H0[f].since<=W0&&W0<=H0[f].until)return H0[f].abbr;if(H0[f].until<=W0&&W0<=H0[f].since)return H0[f].abbr}return""}function Gy4(){var f,i,W0,H0,L0=this.localeData().eras();for(f=0,i=L0.length;f<i;++f)if(W0=L0[f].since<=L0[f].until?1:-1,H0=this.clone().startOf("day").valueOf(),L0[f].since<=H0&&H0<=L0[f].until||L0[f].until<=H0&&H0<=L0[f].since)return(this.year()-Y(L0[f].since).year())*W0+L0[f].offset;return this.year()}function Jy4(f){if(!Q(this,"_erasNameRegex"))fG0.call(this);return f?this._erasNameRegex:this._erasRegex}function Qy4(f){if(!Q(this,"_erasAbbrRegex"))fG0.call(this);return f?this._erasAbbrRegex:this._erasRegex}function Wy4(f){if(!Q(this,"_erasNarrowRegex"))fG0.call(this);return f?this._erasNarrowRegex:this._erasRegex}function hG0(f,i){return i.erasAbbrRegex(f)}function Ky4(f,i){return i.erasNameRegex(f)}function Zy4(f,i){return i.erasNarrowRegex(f)}function Uy4(f,i){return i._eraYearOrdinalRegex||r4}function fG0(){var f=[],i=[],W0=[],H0=[],L0,I0,s0,H4,V6,I8=this.eras();for(L0=0,I0=I8.length;L0<I0;++L0)s0=w4(I8[L0].name),H4=w4(I8[L0].abbr),V6=w4(I8[L0].narrow),i.push(s0),f.push(H4),W0.push(V6),H0.push(s0),H0.push(H4),H0.push(V6);this._erasRegex=new RegExp("^("+H0.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+f.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+W0.join("|")+")","i")}h(0,["gg",2],0,function(){return this.weekYear()%100}),h(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Jc(f,i){h(0,[f,f.length],0,i)}Jc("gggg","weekYear"),Jc("ggggg","weekYear"),Jc("GGGG","isoWeekYear"),Jc("GGGGG","isoWeekYear"),F1("G",T6),F1("g",T6),F1("GG",J0,P1),F1("gg",J0,P1),F1("GGGG",C4,C0),F1("gggg",C4,C0),F1("GGGGG",c4,n0),F1("ggggg",c4,n0),h0(["gggg","ggggg","GGGG","GGGGG"],function(f,i,W0,H0){i[H0.substr(0,2)]=K4(f)}),h0(["gg","GG"],function(f,i,W0,H0){i[H0]=Y.parseTwoDigitYear(f)});function Hy4(f){return gn0.call(this,f,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function zy4(f){return gn0.call(this,f,this.isoWeek(),this.isoWeekday(),1,4)}function Vy4(){return Q5(this.year(),1,4)}function Fy4(){return Q5(this.isoWeekYear(),1,4)}function Ly4(){var f=this.localeData()._week;return Q5(this.year(),f.dow,f.doy)}function Dy4(){var f=this.localeData()._week;return Q5(this.weekYear(),f.dow,f.doy)}function gn0(f,i,W0,H0,L0){var I0;if(f==null)return AK(this,H0,L0).year;else{if(I0=Q5(f,H0,L0),i>I0)i=I0;return Ny4.call(this,f,i,W0,H0,L0)}}function Ny4(f,i,W0,H0,L0){var I0=SV(f,i,W0,H0,L0),s0=NK(I0.year,0,I0.dayOfYear);return this.year(s0.getUTCFullYear()),this.month(s0.getUTCMonth()),this.date(s0.getUTCDate()),this}h("Q",0,"Qo","quarter"),F1("Q",U4),N0("Q",function(f,i){i[E1]=(K4(f)-1)*3});function Ay4(f){return f==null?Math.ceil((this.month()+1)/3):this.month((f-1)*3+this.month()%3)}h("D",["DD",2],"Do","date"),F1("D",J0,I6),F1("DD",J0,P1),F1("Do",function(f,i){return f?i._dayOfMonthOrdinalParse||i._ordinalParse:i._dayOfMonthOrdinalParseLenient}),N0(["D","DD"],l4),N0("Do",function(f,i){i[l4]=K4(f.match(J0)[0])});var mn0=R6("Date",!0);h("DDD",["DDDD",3],"DDDo","dayOfYear"),F1("DDD",c1),F1("DDDD",d1),N0(["DDD","DDDD"],function(f,i,W0){W0._dayOfYear=K4(f)});function By4(f){var i=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/86400000)+1;return f==null?i:this.add(f-i,"d")}h("m",["mm",2],0,"minute"),F1("m",J0,t4),F1("mm",J0,P1),N0(["m","mm"],C1);var Oy4=R6("Minutes",!1);h("s",["ss",2],0,"second"),F1("s",J0,t4),F1("ss",J0,P1),N0(["s","ss"],f4);var Ey4=R6("Seconds",!1);h("S",0,0,function(){return~~(this.millisecond()/100)}),h(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),h(0,["SSS",3],0,"millisecond"),h(0,["SSSS",4],0,function(){return this.millisecond()*10}),h(0,["SSSSS",5],0,function(){return this.millisecond()*100}),h(0,["SSSSSS",6],0,function(){return this.millisecond()*1000}),h(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),h(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),h(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),F1("S",c1,U4),F1("SS",c1,P1),F1("SSS",c1,d1);var xV,un0;for(xV="SSSS";xV.length<=9;xV+="S")F1(xV,r4);function My4(f,i){i[A6]=K4(("0."+f)*1000)}for(xV="S";xV.length<=9;xV+="S")N0(xV,My4);un0=R6("Milliseconds",!1),h("z",0,0,"zoneAbbr"),h("zz",0,0,"zoneName");function Ry4(){return this._isUTC?"UTC":""}function qy4(){return this._isUTC?"Coordinated Universal Time":""}var w1=R.prototype;if(w1.add=Dx4,w1.calendar=Rx4,w1.clone=qx4,w1.diff=Cx4,w1.endOf=mx4,w1.format=xx4,w1.from=yx4,w1.fromNow=bx4,w1.to=hx4,w1.toNow=fx4,w1.get=A5,w1.invalidAt=ax4,w1.isAfter=Px4,w1.isBefore=wx4,w1.isBetween=_x4,w1.isSame=jx4,w1.isSameOrAfter=Tx4,w1.isSameOrBefore=Ix4,w1.isValid=nx4,w1.lang=xn0,w1.locale=vn0,w1.localeData=yn0,w1.max=nv4,w1.min=iv4,w1.parsingFlags=rx4,w1.set=X$,w1.startOf=gx4,w1.subtract=Nx4,w1.toArray=cx4,w1.toObject=lx4,w1.toDate=dx4,w1.toISOString=kx4,w1.inspect=vx4,typeof Symbol<"u"&&Symbol.for!=null)w1[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"};w1.toJSON=ix4,w1.toString=Sx4,w1.unix=px4,w1.valueOf=ux4,w1.creationData=sx4,w1.eraName=$y4,w1.eraNarrow=Yy4,w1.eraAbbr=Xy4,w1.eraYear=Gy4,w1.year=i4,w1.isLeapYear=C9,w1.weekYear=Hy4,w1.isoWeekYear=zy4,w1.quarter=w1.quarters=Ay4,w1.month=cQ,w1.daysInMonth=qG0,w1.week=w1.weeks=t7,w1.isoWeek=w1.isoWeeks=nC,w1.weeksInYear=Ly4,w1.weeksInWeekYear=Dy4,w1.isoWeeksInYear=Vy4,w1.isoWeeksInISOWeekYear=Fy4,w1.date=mn0,w1.day=w1.days=zv4,w1.weekday=Vv4,w1.isoWeekday=Fv4,w1.dayOfYear=By4,w1.hour=w1.hours=Ev4,w1.minute=w1.minutes=Oy4,w1.second=w1.seconds=Ey4,w1.millisecond=w1.milliseconds=un0,w1.utcOffset=Xx4,w1.utc=Jx4,w1.local=Qx4,w1.parseZone=Wx4,w1.hasAlignedHourOffset=Kx4,w1.isDST=Zx4,w1.isLocal=Hx4,w1.isUtcOffset=zx4,w1.isUtc=Tn0,w1.isUTC=Tn0,w1.zoneAbbr=Ry4,w1.zoneName=qy4,w1.dates=P("dates accessor is deprecated. Use date instead.",mn0),w1.months=P("months accessor is deprecated. Use month instead",cQ),w1.years=P("years accessor is deprecated. Use year instead",i4),w1.zone=P("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Gx4),w1.isDSTShifted=P("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ux4);function Py4(f){return i5(f*1000)}function wy4(){return i5.apply(null,arguments).parseZone()}function pn0(f){return f}var r8=I.prototype;r8.calendar=y,r8.longDateFormat=a,r8.invalidDate=e,r8.ordinal=Y0,r8.preparse=pn0,r8.postformat=pn0,r8.relativeTime=F0,r8.pastFuture=D0,r8.set=k,r8.eras=ox4,r8.erasParse=tx4,r8.erasConvertYear=ex4,r8.erasAbbrRegex=Qy4,r8.erasNameRegex=Jy4,r8.erasNarrowRegex=Wy4,r8.months=_U,r8.monthsShort=IV,r8.monthsParse=ad,r8.monthsRegex=k7,r8.monthsShortRegex=p4,r8.week=kV,r8.firstDayOfYear=PG0,r8.firstDayOfWeek=sd,r8.weekdays=Wv4,r8.weekdaysMin=Zv4,r8.weekdaysShort=Kv4,r8.weekdaysParse=Hv4,r8.weekdaysRegex=Lv4,r8.weekdaysShortRegex=Dv4,r8.weekdaysMinRegex=Nv4,r8.isPM=Bv4,r8.meridiem=Mv4;function Qc(f,i,W0,H0){var L0=OH(),I0=F().set(H0,i);return L0[W0](I0,f)}function dn0(f,i,W0){if(Z(f))i=f,f=void 0;if(f=f||"",i!=null)return Qc(f,i,W0,"month");var H0,L0=[];for(H0=0;H0<12;H0++)L0[H0]=Qc(f,H0,W0,"month");return L0}function gG0(f,i,W0,H0){if(typeof f==="boolean"){if(Z(i))W0=i,i=void 0;i=i||""}else{if(i=f,W0=i,f=!1,Z(i))W0=i,i=void 0;i=i||""}var L0=OH(),I0=f?L0._week.dow:0,s0,H4=[];if(W0!=null)return Qc(i,(W0+I0)%7,H0,"day");for(s0=0;s0<7;s0++)H4[s0]=Qc(i,(s0+I0)%7,H0,"day");return H4}function _y4(f,i){return dn0(f,i,"months")}function jy4(f,i){return dn0(f,i,"monthsShort")}function Ty4(f,i,W0){return gG0(f,i,W0,"weekdays")}function Iy4(f,i,W0){return gG0(f,i,W0,"weekdaysShort")}function Cy4(f,i,W0){return gG0(f,i,W0,"weekdaysMin")}vV("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(f){var i=f%10,W0=K4(f%100/10)===1?"th":i===1?"st":i===2?"nd":i===3?"rd":"th";return f+W0}}),Y.lang=P("moment.lang is deprecated. Use moment.locale instead.",vV),Y.langData=P("moment.langData is deprecated. Use moment.localeData instead.",OH);var EH=Math.abs;function Sy4(){var f=this._data;return this._milliseconds=EH(this._milliseconds),this._days=EH(this._days),this._months=EH(this._months),f.milliseconds=EH(f.milliseconds),f.seconds=EH(f.seconds),f.minutes=EH(f.minutes),f.hours=EH(f.hours),f.months=EH(f.months),f.years=EH(f.years),this}function cn0(f,i,W0,H0){var L0=BK(i,W0);return f._milliseconds+=H0*L0._milliseconds,f._days+=H0*L0._days,f._months+=H0*L0._months,f._bubble()}function ky4(f,i){return cn0(this,f,i,1)}function vy4(f,i){return cn0(this,f,i,-1)}function ln0(f){if(f<0)return Math.floor(f);else return Math.ceil(f)}function xy4(){var f=this._milliseconds,i=this._days,W0=this._months,H0=this._data,L0,I0,s0,H4,V6;if(!(f>=0&&i>=0&&W0>=0||f<=0&&i<=0&&W0<=0))f+=ln0(mG0(W0)+i)*86400000,i=0,W0=0;return H0.milliseconds=f%1000,L0=z6(f/1000),H0.seconds=L0%60,I0=z6(L0/60),H0.minutes=I0%60,s0=z6(I0/60),H0.hours=s0%24,i+=z6(s0/24),V6=z6(in0(i)),W0+=V6,i-=ln0(mG0(V6)),H4=z6(W0/12),W0%=12,H0.days=i,H0.months=W0,H0.years=H4,this}function in0(f){return f*4800/146097}function mG0(f){return f*146097/4800}function yy4(f){if(!this.isValid())return NaN;var i,W0,H0=this._milliseconds;if(f=R0(f),f==="month"||f==="quarter"||f==="year")switch(i=this._days+H0/86400000,W0=this._months+in0(i),f){case"month":return W0;case"quarter":return W0/3;case"year":return W0/12}else switch(i=this._days+Math.round(mG0(this._months)),f){case"week":return i/7+H0/604800000;case"day":return i+H0/86400000;case"hour":return i*24+H0/3600000;case"minute":return i*1440+H0/60000;case"second":return i*86400+H0/1000;case"millisecond":return Math.floor(i*86400000)+H0;default:throw Error("Unknown unit "+f)}}function MH(f){return function(){return this.as(f)}}var nn0=MH("ms"),by4=MH("s"),hy4=MH("m"),fy4=MH("h"),gy4=MH("d"),my4=MH("w"),uy4=MH("M"),py4=MH("Q"),dy4=MH("y"),cy4=nn0;function ly4(){return BK(this)}function iy4(f){return f=R0(f),this.isValid()?this[f+"s"]():NaN}function AN(f){return function(){return this.isValid()?this._data[f]:NaN}}var ny4=AN("milliseconds"),ry4=AN("seconds"),ay4=AN("minutes"),sy4=AN("hours"),oy4=AN("days"),ty4=AN("months"),ey4=AN("years");function $b4(){return z6(this.days()/7)}var RH=Math.round,KR={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Yb4(f,i,W0,H0,L0){return L0.relativeTime(i||1,!!W0,f,H0)}function Xb4(f,i,W0,H0){var L0=BK(f).abs(),I0=RH(L0.as("s")),s0=RH(L0.as("m")),H4=RH(L0.as("h")),V6=RH(L0.as("d")),I8=RH(L0.as("M")),AG=RH(L0.as("w")),qH=RH(L0.as("y")),yV=I0<=W0.ss&&["s",I0]||I0<W0.s&&["ss",I0]||s0<=1&&["m"]||s0<W0.m&&["mm",s0]||H4<=1&&["h"]||H4<W0.h&&["hh",H4]||V6<=1&&["d"]||V6<W0.d&&["dd",V6];if(W0.w!=null)yV=yV||AG<=1&&["w"]||AG<W0.w&&["ww",AG];return yV=yV||I8<=1&&["M"]||I8<W0.M&&["MM",I8]||qH<=1&&["y"]||["yy",qH],yV[2]=i,yV[3]=+f>0,yV[4]=H0,Yb4.apply(null,yV)}function Gb4(f){if(f===void 0)return RH;if(typeof f==="function")return RH=f,!0;return!1}function Jb4(f,i){if(KR[f]===void 0)return!1;if(i===void 0)return KR[f];if(KR[f]=i,f==="s")KR.ss=i-1;return!0}function Qb4(f,i){if(!this.isValid())return this.localeData().invalidDate();var W0=!1,H0=KR,L0,I0;if(typeof f==="object")i=f,f=!1;if(typeof f==="boolean")W0=f;if(typeof i==="object"){if(H0=Object.assign({},KR,i),i.s!=null&&i.ss==null)H0.ss=i.s-1}if(L0=this.localeData(),I0=Xb4(this,!W0,H0,L0),W0)I0=L0.pastFuture(+this,I0);return L0.postformat(I0)}var uG0=Math.abs;function ZR(f){return(f>0)-(f<0)||+f}function Wc(){if(!this.isValid())return this.localeData().invalidDate();var f=uG0(this._milliseconds)/1000,i=uG0(this._days),W0=uG0(this._months),H0,L0,I0,s0,H4=this.asSeconds(),V6,I8,AG,qH;if(!H4)return"P0D";return H0=z6(f/60),L0=z6(H0/60),f%=60,H0%=60,I0=z6(W0/12),W0%=12,s0=f?f.toFixed(3).replace(/\.?0+$/,""):"",V6=H4<0?"-":"",I8=ZR(this._months)!==ZR(H4)?"-":"",AG=ZR(this._days)!==ZR(H4)?"-":"",qH=ZR(this._milliseconds)!==ZR(H4)?"-":"",V6+"P"+(I0?I8+I0+"Y":"")+(W0?I8+W0+"M":"")+(i?AG+i+"D":"")+(L0||H0||f?"T":"")+(L0?qH+L0+"H":"")+(H0?qH+H0+"M":"")+(f?qH+s0+"S":"")}var b8=ed.prototype;b8.isValid=tv4,b8.abs=Sy4,b8.add=ky4,b8.subtract=vy4,b8.as=yy4,b8.asMilliseconds=nn0,b8.asSeconds=by4,b8.asMinutes=hy4,b8.asHours=fy4,b8.asDays=gy4,b8.asWeeks=my4,b8.asMonths=uy4,b8.asQuarters=py4,b8.asYears=dy4,b8.valueOf=cy4,b8._bubble=xy4,b8.clone=ly4,b8.get=iy4,b8.milliseconds=ny4,b8.seconds=ry4,b8.minutes=ay4,b8.hours=sy4,b8.days=oy4,b8.weeks=$b4,b8.months=ty4,b8.years=ey4,b8.humanize=Qb4,b8.toISOString=Wc,b8.toString=Wc,b8.toJSON=Wc,b8.locale=vn0,b8.localeData=yn0,b8.toIsoString=P("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Wc),b8.lang=xn0,h("X",0,0,"unix"),h("x",0,0,"valueOf"),F1("x",T6),F1("X",Z1),N0("X",function(f,i,W0){W0._d=new Date(parseFloat(f)*1000)}),N0("x",function(f,i,W0){W0._d=new Date(K4(f))});//! moment.js
return Y.version="2.30.1",X(i5),Y.fn=w1,Y.min=rv4,Y.max=av4,Y.now=sv4,Y.utc=F,Y.unix=Py4,Y.months=_y4,Y.isDate=H,Y.locale=vV,Y.invalid=B,Y.duration=BK,Y.isMoment=q,Y.weekdays=Ty4,Y.parseZone=wy4,Y.localeData=OH,Y.isDuration=$c,Y.monthsShort=jy4,Y.weekdaysMin=Cy4,Y.defineLocale=TG0,Y.updateLocale=wv4,Y.locales=_v4,Y.weekdaysShort=Iy4,Y.normalizeUnits=R0,Y.relativeTimeRounding=Gb4,Y.relativeTimeThreshold=Jb4,Y.calendarFormat=Mx4,Y.prototype=w1,Y.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},Y})});var s$1=o((H85,a$1)=>{/*!
 * FileStreamRotator
 * Copyright(c) 2012-2017 Holiday Extras.
 * Copyright(c) 2017 Roger C.
 * MIT Licensed
 */var v7=A0("fs"),QF=A0("path"),zA=c$1(),i$1=A0("crypto"),tn4=A0("events"),pU={};a$1.exports=pU;var n$1=["daily","test","m","h","custom"],r$1="YYYYMMDDHHmm",en4=function($,Y){if(typeof Y=="number"){switch($){case"m":if(Y<0||Y>60)return!1;break;case"h":if(Y<0||Y>24)return!1;break}return{type:$,digit:Y}}},$r4=function($){switch($){case"custom":case"daily":return{type:$,digit:void 0};case"test":return{type:$,digit:0}}return!1};pU.getFrequency=function($){var Y=$.toLowerCase().match(/^(\d+)([mh])$/);if(Y)return en4(Y[2],parseInt(Y[1]));var X=$r4($);if(X)return X;return!1};pU.parseFileSize=function($){if($&&typeof $=="string"){var Y=$.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/);if(Y)switch(Y[2]){case"k":return Y[1]*1024;case"m":return Y[1]*1024*1024;case"g":return Y[1]*1024*1024*1024}}return null};pU.getDate=function($,Y,X){Y=Y||r$1;let G=X?zA.utc():zA().local();if($&&n$1.indexOf($.type)!==-1)switch($.type){case"m":var J=Math.floor(G.minutes()/$.digit)*$.digit;return G.minutes(J).format(Y);case"h":var Q=Math.floor(G.hour()/$.digit)*$.digit;return G.hour(Q).format(Y);case"daily":case"custom":case"test":return G.format(Y)}return G.format(Y)};pU.setAuditLog=function($,Y,X){var G=null;if($){var J=$.toString().substr(-1),Q=$.toString().match(/^(\d+)/);if(Number(Q[1])>0){var W=QF.dirname(X.replace(/%DATE%.+/,"_filename"));try{if(Y){var K=QF.resolve(Y);G=JSON.parse(v7.readFileSync(K,{encoding:"utf-8"}))}else{var K=QF.resolve(W+"/.audit.json");G=JSON.parse(v7.readFileSync(K,{encoding:"utf-8"}))}}catch(Z){if(Z.code!=="ENOENT")return null;G={keep:{days:!1,amount:Number(Q[1])},auditLog:Y||W+"/.audit.json",files:[]}}G.keep={days:J==="d",amount:Number(Q[1])}}}return G};pU.writeAuditLog=function($,Y){try{UZ0($.auditLog),v7.writeFileSync($.auditLog,JSON.stringify($,null,4))}catch(X){if(Y)console.error(new Date,"[FileStreamRotator] Failed to store log audit at:",$.auditLog,"Error:",X)}};function l$1($,Y){if($.hash===i$1.createHash($.hashType).update($.name+"LOG_FILE"+$.date).digest("hex"))try{if(v7.existsSync($.name))v7.unlinkSync($.name)}catch(X){if(Y)console.error(new Date,"[FileStreamRotator] Could not remove old log file: ",$.name)}}function Yr4($,Y,X){let G=Y||"current.log",J=QF.dirname($),Q=QF.basename($),W=J+"/"+G;try{if(v7.lstatSync(W).isSymbolicLink())v7.unlinkSync(W),v7.symlinkSync(Q,W)}catch(K){if(K&&K.code=="ENOENT")try{v7.symlinkSync(Q,W)}catch(Z){if(X)console.error(new Date,"[FileStreamRotator] Could not create symlink file: ",W," -> ",Q)}}}function Xr4($,Y,X){if(!$)return null;try{let G=v7.lstatSync($);return v7.watch($,function(J,Q){if(J=="rename")try{let W=v7.lstatSync($)}catch(W){X(W,$)}})}catch(G){if(Y)console.log(new Date,"[FileStreamRotator] Could not add watcher for "+$)}}pU.addLogToAudit=function($,Y,X,G){if(Y&&Y.files){var J=Y.files.findIndex(function(H){return H.name===$});if(J!==-1)return Y;var Q=Date.now();if(Y.files.push({date:Q,name:$,hash:i$1.createHash(Y.hashType).update($+"LOG_FILE"+Q).digest("hex")}),Y.keep.days){var W=zA().subtract(Y.keep.amount,"days").valueOf(),K=Y.files.filter(function(H){if(H.date>W)return!0;return H.hashType=Y.hashType,l$1(H,G),X.emit("logRemoved",H),!1});Y.files=K}else{var Z=Y.files.splice(-Y.keep.amount);if(Y.files.length>0)Y.files.filter(function(H){return H.hashType=Y.hashType,l$1(H,G),X.emit("logRemoved",H),!1});Y.files=Z}pU.writeAuditLog(Y,G)}return Y};pU.getStream=function($){var Y=null,X=null,G=this;if(!$.filename)return console.error(new Date,"[FileStreamRotator] No filename supplied. Defaulting to STDOUT"),process.stdout;if($.frequency)Y=G.getFrequency($.frequency);let J=G.setAuditLog($.max_logs,$.audit_file,$.filename);if(J!=null)J.hashType=$.audit_hash_type!==void 0?$.audit_hash_type:"md5";G.verbose=$.verbose!==void 0?$.verbose:!0;var Q=null,W=0,K=0;if($.size)Q=pU.parseFileSize($.size);var Z=$.date_format||r$1;if(Y&&Y.type=="daily"){if(!$.date_format)Z="YYYY-MM-DD";if(zA().format(Z)!=zA().endOf("day").format(Z)||zA().format(Z)==zA().add(1,"day").format(Z)){if(G.verbose)console.log(new Date,"[FileStreamRotator] Changing type to custom as date format changes more often than once a day or not every day");Y.type="custom"}}if(Y)X=$.frequency?G.getDate(Y,Z,$.utc):"";$.create_symlink=$.create_symlink||!1,$.extension=$.extension||"";var H=$.filename,z=null,V=H+(X?"."+X:"");if(H.match(/%DATE%/))V=H.replace(/%DATE%/g,X?X:G.getDate(null,Z,$.utc));if(Q){var F=null,L=V,N=null;if(J&&J.files&&J.files instanceof Array&&J.files.length>0){var D=J.files[J.files.length-1].name;if(D.match(L)){var A=D.match(L+"\\.(\\d+)");if(A)L=D,W=A[1]}}if(W==0&&L==V)L+=$.extension;while(N=v7.existsSync(L))F=L,W++,L=V+"."+W+$.extension;if(F){var B=v7.statSync(F);if(B.size<Q)L=F,W--,K=B.size}V=L}else V+=$.extension;if(G.verbose)console.log(new Date,"[FileStreamRotator] Logging to: ",V);UZ0(V);var O=$.file_options||{flags:"a"},E=v7.createWriteStream(V,O);if(X&&Y&&n$1.indexOf(Y.type)>-1||Q>0){if(G.verbose)console.log(new Date,"[FileStreamRotator] Rotating file: ",Y?Y.type:"",Q?"size: "+Q:"");var M=new tn4;M.auditLog=J,M.end=function(){E.end.apply(E,arguments)},ZZ0(E,M),M.on("close",function(){if(R)R.close()}),M.on("new",function(q){if(M.auditLog=G.addLogToAudit(q,M.auditLog,M,G.verbose),$.create_symlink)Yr4(q,$.symlink_name,G.verbose);if($.watch_log)M.emit("addWatcher",q)});var R;return M.on("addWatcher",function(q){if(R)R.close();if(!$.watch_log)return;R=Xr4(q,G.verbose,function(_,P){M.emit("createLog",P)})}),M.on("createLog",function(q){try{let _=v7.lstatSync(q)}catch(_){if(E&&E.end=="function")E.end();E=v7.createWriteStream(q,O),M.emit("new",q),ZZ0(E,M)}}),M.write=function(q,_){var P=Y?this.getDate(Y,Z,$.utc):X;if(P!=X||Q&&K>Q){var w=H+(X&&Y?"."+P:"");if(H.match(/%DATE%/)&&X)w=H.replace(/%DATE%/g,P);if(Q&&K>Q)W++,w+="."+W+$.extension;else W=0,w+=$.extension;if(K=0,G.verbose)console.log(new Date,A0("util").format("[FileStreamRotator] Changing logs from %s to %s",V,w));if(X=P,z=V,V=w,$.end_stream===!0)E.end();else E.destroy();UZ0(V),E=v7.createWriteStream(w,O),M.emit("new",w),M.emit("rotate",z,w),ZZ0(E,M)}E.write(q,_),K+=Buffer.byteLength(q,_)}.bind(this),process.nextTick(function(){M.emit("new",V)}),M.emit("new",V),M}else{if(G.verbose)console.log(new Date,"[FileStreamRotator] File won't be rotated: ",$.frequency,$.size);return process.nextTick(function(){E.emit("new",V)}),E}};var UZ0=function($){var Y=QF.dirname($);Y.split(QF.sep).reduce(function(X,G){if(X+=G+QF.sep,!v7.existsSync(X))try{v7.mkdirSync(X)}catch(J){if(J.code!=="EEXIST")throw J}return X},"")},ZZ0=function(Y,X){Y.on("close",function(){X.emit("close")}),Y.on("finish",function(){X.emit("finish")}),Y.on("error",function(G){X.emit("error",G)}),Y.on("open",function(G){X.emit("open",G)})}});var Y71=o((z85,$71)=>{var hH=A0("fs"),Gr4=A0("os"),oR=A0("path"),Jr4=A0("util"),o$1=A0("zlib"),Qr4=d$1(),Wr4=L7().MESSAGE,t$1=A0("stream").PassThrough,e$1=WA(),Kr4={json:!1,colorize:!1,eol:Gr4.EOL,logstash:null,prettyPrint:!1,label:null,stringify:!1,depth:null,showLevel:!0,timestamp:()=>{return new Date().toISOString()}},tR=function($){$=$||{},e$1.call(this,$);function Y(Q){Array.prototype.slice.call(arguments,1).forEach((W)=>{if($[W])throw Error("Cannot set "+W+" and "+Q+" together")})}function X(Q){if(Q&&typeof Q==="string"){if(Q.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/))return Q}else if(Q&&Number.isInteger(Q)){let W=Math.round(Q/1024);return W===0?"1k":W+"k"}return null}function G(Q){return!/["<>|:*?\\/\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(Q)}function J(Q){return!/["<>|\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(Q)}if(this.options=Object.assign({},Kr4,$),$.stream)Y("stream","filename","maxsize"),this.logStream=new t$1,this.logStream.pipe($.stream);else{if(this.filename=$.filename?oR.basename($.filename):"winston.log",this.dirname=$.dirname||oR.dirname($.filename),!G(this.filename)||!J(this.dirname))throw Error("Your path or filename contain an invalid character.");if(this.logStream=s$1().getStream({filename:oR.join(this.dirname,this.filename),frequency:$.frequency?$.frequency:"custom",date_format:$.datePattern?$.datePattern:"YYYY-MM-DD",verbose:!1,size:X($.maxSize),max_logs:$.maxFiles,end_stream:!0,audit_file:$.auditFile?$.auditFile:oR.join(this.dirname,"."+Qr4($)+"-audit.json"),file_options:$.options?$.options:{flags:"a"},utc:$.utc?$.utc:!1,extension:$.extension?$.extension:"",create_symlink:$.createSymlink?$.createSymlink:!1,symlink_name:$.symlinkName?$.symlinkName:"current.log",watch_log:$.watchLog?$.watchLog:!1,audit_hash_type:$.auditHashType?$.auditHashType:"sha256"}),this.logStream.on("new",(Q)=>{this.emit("new",Q)}),this.logStream.on("rotate",(Q,W)=>{this.emit("rotate",Q,W)}),this.logStream.on("logRemoved",(Q)=>{if($.zippedArchive){let W=Q.name+".gz";try{hH.unlinkSync(W)}catch(K){if(K.code!=="ENOENT"){K.message=`Error occurred while removing ${W}: ${K.message}`,this.emit("error",K);return}}this.emit("logRemoved",W);return}this.emit("logRemoved",Q.name)}),$.zippedArchive)this.logStream.on("rotate",(Q)=>{try{if(!hH.existsSync(Q))return}catch(H){H.message=`Error occurred while checking existence of ${Q}: ${H.message}`,this.emit("error",H);return}try{if(hH.existsSync(`${Q}.gz`))return}catch(H){H.message=`Error occurred while checking existence of ${Q}.gz: ${H.message}`,this.emit("error",H);return}let W=o$1.createGzip(),K=hH.createReadStream(Q);K.on("error",(H)=>{H.message=`Error occurred while reading ${Q}: ${H.message}`,this.emit("error",H)});let Z=hH.createWriteStream(Q+".gz");Z.on("error",(H)=>{H.message=`Error occurred while writing ${Q}.gz: ${H.message}`,this.emit("error",H)}),K.pipe(W).pipe(Z).on("finish",()=>{try{hH.unlinkSync(Q)}catch(H){if(H.code!=="ENOENT"){H.message=`Error occurred while removing ${Q}: ${H.message}`,this.emit("error",H);return}}this.emit("archive",Q+".gz")})});if($.watchLog)this.logStream.on("addWatcher",(Q)=>{this.emit("addWatcher",Q)})}};$71.exports=tR;Jr4.inherits(tR,e$1);tR.prototype.name="dailyRotateFile";var Zr4=function(){};tR.prototype.log=function($,Y){Y=Y||Zr4,this.logStream.write($[Wr4]+this.options.eol),this.emit("logged",$),Y(null,!0)};tR.prototype.close=function(){if(this.logStream)this.logStream.end(()=>{this.emit("finish")})};tR.prototype.query=function($,Y){if(typeof $==="function")Y=$,$={};if(!this.options.json)throw Error("query() may not be used without the json option being set to true");if(!this.filename)throw Error("query() may not be used when initializing with a stream");let X=[];if($=$||{},$.rows=$.rows||$.limit||10,$.start=$.start||0,$.until=$.until||new Date,typeof $.until!=="object")$.until=new Date($.until);if($.from=$.from||$.until-86400000,typeof $.from!=="object")$.from=new Date($.from);$.order=$.order||"desc";let G=(()=>{let Q=new RegExp(this.filename.replace("%DATE%",".*"),"i");return hH.readdirSync(this.dirname).filter((W)=>oR.basename(W).match(Q))})();if(G.length===0&&Y)Y(null,X);let J=(Q)=>{if(!Q)return;let W=oR.join(this.dirname,Q),K="",Z;if(Q.endsWith(".gz")){Z=new t$1;let z=hH.createReadStream(W);z.on("error",(V)=>{V.message=`Error occurred while reading ${W}: ${V.message}`,Z.emit("error",V)}),z.pipe(o$1.createGunzip()).pipe(Z)}else Z=hH.createReadStream(W,{encoding:"utf8"});Z.on("error",(z)=>{if(Z.readable)Z.destroy();if(!Y)return;return z.code==="ENOENT"?Y(null,X):Y(z)}),Z.on("data",(z)=>{z=(K+z).split(/\n+/);let V=z.length-1;for(let F=0;F<V;F++)H(z[F]);K=z[V]}),Z.on("end",()=>{if(K)H(K,!0);if(G.length)J(G.shift());else if(Y){if(X.sort((F,L)=>{let N=new Date(F.timestamp).getTime(),D=new Date(L.timestamp).getTime();return N>D?1:N<D?-1:0}),$.order==="desc")X=X.reverse();let z=$.start||0,V=$.limit||X.length;if(X=X.slice(z,z+V),$.fields)X=X.map((F)=>{let L={};return $.fields.forEach((N)=>{L[N]=F[N]}),L});Y(null,X)}});function H(z,V){try{let F=JSON.parse(z);if(!F||typeof F!=="object")return;let L=new Date(F.timestamp);if($.from&&L<$.from||$.until&&L>$.until||$.level&&$.level!==F.level)return;X.push(F)}catch(F){if(!V)Z.emit("error",F)}}};J(G.shift())}});var J71=o((V85,G71)=>{var Ur4=JZ0(),X71=Y71();Ur4.transports.DailyRotateFile=X71;G71.exports=X71});var R8=o((Ci,E71)=>{(function($,Y){if(typeof Ci==="object")E71.exports=Ci=Y();else if(typeof define==="function"&&define.amd)define([],Y);else $.CryptoJS=Y()})(Ci,function(){var $=$||function(Y,X){var G;if(typeof window<"u"&&window.crypto)G=window.crypto;if(typeof self<"u"&&self.crypto)G=self.crypto;if(typeof globalThis<"u"&&globalThis.crypto)G=globalThis.crypto;if(!G&&typeof window<"u"&&window.msCrypto)G=window.msCrypto;if(!G&&typeof global<"u"&&global.crypto)G=global.crypto;if(!G)try{G=A0("crypto")}catch(B){}var J=function(){if(G){if(typeof G.getRandomValues==="function")try{return G.getRandomValues(new Uint32Array(1))[0]}catch(B){}if(typeof G.randomBytes==="function")try{return G.randomBytes(4).readInt32LE()}catch(B){}}throw Error("Native crypto module could not be used to get secure random number.")},Q=Object.create||function(){function B(){}return function(O){var E;return B.prototype=O,E=new B,B.prototype=null,E}}(),W={},K=W.lib={},Z=K.Base=function(){return{extend:function(B){var O=Q(this);if(B)O.mixIn(B);if(!O.hasOwnProperty("init")||this.init===O.init)O.init=function(){O.$super.init.apply(this,arguments)};return O.init.prototype=O,O.$super=this,O},create:function(){var B=this.extend();return B.init.apply(B,arguments),B},init:function(){},mixIn:function(B){for(var O in B)if(B.hasOwnProperty(O))this[O]=B[O];if(B.hasOwnProperty("toString"))this.toString=B.toString},clone:function(){return this.init.prototype.extend(this)}}}(),H=K.WordArray=Z.extend({init:function(B,O){if(B=this.words=B||[],O!=X)this.sigBytes=O;else this.sigBytes=B.length*4},toString:function(B){return(B||V).stringify(this)},concat:function(B){var O=this.words,E=B.words,M=this.sigBytes,R=B.sigBytes;if(this.clamp(),M%4)for(var q=0;q<R;q++){var _=E[q>>>2]>>>24-q%4*8&255;O[M+q>>>2]|=_<<24-(M+q)%4*8}else for(var P=0;P<R;P+=4)O[M+P>>>2]=E[P>>>2];return this.sigBytes+=R,this},clamp:function(){var B=this.words,O=this.sigBytes;B[O>>>2]&=4294967295<<32-O%4*8,B.length=Y.ceil(O/4)},clone:function(){var B=Z.clone.call(this);return B.words=this.words.slice(0),B},random:function(B){var O=[];for(var E=0;E<B;E+=4)O.push(J());return new H.init(O,B)}}),z=W.enc={},V=z.Hex={stringify:function(B){var{words:O,sigBytes:E}=B,M=[];for(var R=0;R<E;R++){var q=O[R>>>2]>>>24-R%4*8&255;M.push((q>>>4).toString(16)),M.push((q&15).toString(16))}return M.join("")},parse:function(B){var O=B.length,E=[];for(var M=0;M<O;M+=2)E[M>>>3]|=parseInt(B.substr(M,2),16)<<24-M%8*4;return new H.init(E,O/2)}},F=z.Latin1={stringify:function(B){var{words:O,sigBytes:E}=B,M=[];for(var R=0;R<E;R++){var q=O[R>>>2]>>>24-R%4*8&255;M.push(String.fromCharCode(q))}return M.join("")},parse:function(B){var O=B.length,E=[];for(var M=0;M<O;M++)E[M>>>2]|=(B.charCodeAt(M)&255)<<24-M%4*8;return new H.init(E,O)}},L=z.Utf8={stringify:function(B){try{return decodeURIComponent(escape(F.stringify(B)))}catch(O){throw Error("Malformed UTF-8 data")}},parse:function(B){return F.parse(unescape(encodeURIComponent(B)))}},N=K.BufferedBlockAlgorithm=Z.extend({reset:function(){this._data=new H.init,this._nDataBytes=0},_append:function(B){if(typeof B=="string")B=L.parse(B);this._data.concat(B),this._nDataBytes+=B.sigBytes},_process:function(B){var O,E=this._data,M=E.words,R=E.sigBytes,q=this.blockSize,_=q*4,P=R/_;if(B)P=Y.ceil(P);else P=Y.max((P|0)-this._minBufferSize,0);var w=P*q,j=Y.min(w*4,R);if(w){for(var C=0;C<w;C+=q)this._doProcessBlock(M,C);O=M.splice(0,w),E.sigBytes-=j}return new H.init(O,j)},clone:function(){var B=Z.clone.call(this);return B._data=this._data.clone(),B},_minBufferSize:0}),D=K.Hasher=N.extend({cfg:Z.extend(),init:function(B){this.cfg=this.cfg.extend(B),this.reset()},reset:function(){N.reset.call(this),this._doReset()},update:function(B){return this._append(B),this._process(),this},finalize:function(B){if(B)this._append(B);var O=this._doFinalize();return O},blockSize:16,_createHelper:function(B){return function(O,E){return new B.init(E).finalize(O)}},_createHmacHelper:function(B){return function(O,E){return new A.HMAC.init(B,E).finalize(O)}}}),A=W.algo={};return W}(Math);return $})});var Ck=o((Si,M71)=>{(function($,Y){if(typeof Si==="object")M71.exports=Si=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(Si,function($){return function(Y){var X=$,G=X.lib,J=G.Base,Q=G.WordArray,W=X.x64={},K=W.Word=J.extend({init:function(H,z){this.high=H,this.low=z}}),Z=W.WordArray=J.extend({init:function(H,z){if(H=this.words=H||[],z!=Y)this.sigBytes=z;else this.sigBytes=H.length*8},toX32:function(){var H=this.words,z=H.length,V=[];for(var F=0;F<z;F++){var L=H[F];V.push(L.high),V.push(L.low)}return Q.create(V,this.sigBytes)},clone:function(){var H=J.clone.call(this),z=H.words=this.words.slice(0),V=z.length;for(var F=0;F<V;F++)z[F]=z[F].clone();return H}})}(),$})});var q71=o((ki,R71)=>{(function($,Y){if(typeof ki==="object")R71.exports=ki=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(ki,function($){return function(){if(typeof ArrayBuffer!="function")return;var Y=$,X=Y.lib,G=X.WordArray,J=G.init,Q=G.init=function(W){if(W instanceof ArrayBuffer)W=new Uint8Array(W);if(W instanceof Int8Array||typeof Uint8ClampedArray<"u"&&W instanceof Uint8ClampedArray||W instanceof Int16Array||W instanceof Uint16Array||W instanceof Int32Array||W instanceof Uint32Array||W instanceof Float32Array||W instanceof Float64Array)W=new Uint8Array(W.buffer,W.byteOffset,W.byteLength);if(W instanceof Uint8Array){var K=W.byteLength,Z=[];for(var H=0;H<K;H++)Z[H>>>2]|=W[H]<<24-H%4*8;J.call(this,Z,K)}else J.apply(this,arguments)};Q.prototype=G}(),$.lib.WordArray})});var w71=o((vi,P71)=>{(function($,Y){if(typeof vi==="object")P71.exports=vi=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(vi,function($){return function(){var Y=$,X=Y.lib,G=X.WordArray,J=Y.enc,Q=J.Utf16=J.Utf16BE={stringify:function(K){var{words:Z,sigBytes:H}=K,z=[];for(var V=0;V<H;V+=2){var F=Z[V>>>2]>>>16-V%4*8&65535;z.push(String.fromCharCode(F))}return z.join("")},parse:function(K){var Z=K.length,H=[];for(var z=0;z<Z;z++)H[z>>>1]|=K.charCodeAt(z)<<16-z%2*16;return G.create(H,Z*2)}};J.Utf16LE={stringify:function(K){var{words:Z,sigBytes:H}=K,z=[];for(var V=0;V<H;V+=2){var F=W(Z[V>>>2]>>>16-V%4*8&65535);z.push(String.fromCharCode(F))}return z.join("")},parse:function(K){var Z=K.length,H=[];for(var z=0;z<Z;z++)H[z>>>1]|=W(K.charCodeAt(z)<<16-z%2*16);return G.create(H,Z*2)}};function W(K){return K<<8&4278255360|K>>>8&16711935}}(),$.enc.Utf16})});var ZF=o((xi,_71)=>{(function($,Y){if(typeof xi==="object")_71.exports=xi=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(xi,function($){return function(){var Y=$,X=Y.lib,G=X.WordArray,J=Y.enc,Q=J.Base64={stringify:function(K){var{words:Z,sigBytes:H}=K,z=this._map;K.clamp();var V=[];for(var F=0;F<H;F+=3){var L=Z[F>>>2]>>>24-F%4*8&255,N=Z[F+1>>>2]>>>24-(F+1)%4*8&255,D=Z[F+2>>>2]>>>24-(F+2)%4*8&255,A=L<<16|N<<8|D;for(var B=0;B<4&&F+B*0.75<H;B++)V.push(z.charAt(A>>>6*(3-B)&63))}var O=z.charAt(64);if(O)while(V.length%4)V.push(O);return V.join("")},parse:function(K){var Z=K.length,H=this._map,z=this._reverseMap;if(!z){z=this._reverseMap=[];for(var V=0;V<H.length;V++)z[H.charCodeAt(V)]=V}var F=H.charAt(64);if(F){var L=K.indexOf(F);if(L!==-1)Z=L}return W(K,Z,z)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function W(K,Z,H){var z=[],V=0;for(var F=0;F<Z;F++)if(F%4){var L=H[K.charCodeAt(F-1)]<<F%4*2,N=H[K.charCodeAt(F)]>>>6-F%4*2,D=L|N;z[V>>>2]|=D<<24-V%4*8,V++}return G.create(z,V)}}(),$.enc.Base64})});var T71=o((yi,j71)=>{(function($,Y){if(typeof yi==="object")j71.exports=yi=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(yi,function($){return function(){var Y=$,X=Y.lib,G=X.WordArray,J=Y.enc,Q=J.Base64url={stringify:function(K,Z){if(Z===void 0)Z=!0;var{words:H,sigBytes:z}=K,V=Z?this._safe_map:this._map;K.clamp();var F=[];for(var L=0;L<z;L+=3){var N=H[L>>>2]>>>24-L%4*8&255,D=H[L+1>>>2]>>>24-(L+1)%4*8&255,A=H[L+2>>>2]>>>24-(L+2)%4*8&255,B=N<<16|D<<8|A;for(var O=0;O<4&&L+O*0.75<z;O++)F.push(V.charAt(B>>>6*(3-O)&63))}var E=V.charAt(64);if(E)while(F.length%4)F.push(E);return F.join("")},parse:function(K,Z){if(Z===void 0)Z=!0;var H=K.length,z=Z?this._safe_map:this._map,V=this._reverseMap;if(!V){V=this._reverseMap=[];for(var F=0;F<z.length;F++)V[z.charCodeAt(F)]=F}var L=z.charAt(64);if(L){var N=K.indexOf(L);if(N!==-1)H=N}return W(K,H,V)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function W(K,Z,H){var z=[],V=0;for(var F=0;F<Z;F++)if(F%4){var L=H[K.charCodeAt(F-1)]<<F%4*2,N=H[K.charCodeAt(F)]>>>6-F%4*2,D=L|N;z[V>>>2]|=D<<24-V%4*8,V++}return G.create(z,V)}}(),$.enc.Base64url})});var UF=o((bi,I71)=>{(function($,Y){if(typeof bi==="object")I71.exports=bi=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(bi,function($){return function(Y){var X=$,G=X.lib,J=G.WordArray,Q=G.Hasher,W=X.algo,K=[];(function(){for(var L=0;L<64;L++)K[L]=Y.abs(Y.sin(L+1))*4294967296|0})();var Z=W.MD5=Q.extend({_doReset:function(){this._hash=new J.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(L,N){for(var D=0;D<16;D++){var A=N+D,B=L[A];L[A]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360}var O=this._hash.words,E=L[N+0],M=L[N+1],R=L[N+2],q=L[N+3],_=L[N+4],P=L[N+5],w=L[N+6],j=L[N+7],C=L[N+8],k=L[N+9],S=L[N+10],I=L[N+11],v=L[N+12],x=L[N+13],y=L[N+14],d=L[N+15],u=O[0],b=O[1],g=O[2],p=O[3];u=H(u,b,g,p,E,7,K[0]),p=H(p,u,b,g,M,12,K[1]),g=H(g,p,u,b,R,17,K[2]),b=H(b,g,p,u,q,22,K[3]),u=H(u,b,g,p,_,7,K[4]),p=H(p,u,b,g,P,12,K[5]),g=H(g,p,u,b,w,17,K[6]),b=H(b,g,p,u,j,22,K[7]),u=H(u,b,g,p,C,7,K[8]),p=H(p,u,b,g,k,12,K[9]),g=H(g,p,u,b,S,17,K[10]),b=H(b,g,p,u,I,22,K[11]),u=H(u,b,g,p,v,7,K[12]),p=H(p,u,b,g,x,12,K[13]),g=H(g,p,u,b,y,17,K[14]),b=H(b,g,p,u,d,22,K[15]),u=z(u,b,g,p,M,5,K[16]),p=z(p,u,b,g,w,9,K[17]),g=z(g,p,u,b,I,14,K[18]),b=z(b,g,p,u,E,20,K[19]),u=z(u,b,g,p,P,5,K[20]),p=z(p,u,b,g,S,9,K[21]),g=z(g,p,u,b,d,14,K[22]),b=z(b,g,p,u,_,20,K[23]),u=z(u,b,g,p,k,5,K[24]),p=z(p,u,b,g,y,9,K[25]),g=z(g,p,u,b,q,14,K[26]),b=z(b,g,p,u,C,20,K[27]),u=z(u,b,g,p,x,5,K[28]),p=z(p,u,b,g,R,9,K[29]),g=z(g,p,u,b,j,14,K[30]),b=z(b,g,p,u,v,20,K[31]),u=V(u,b,g,p,P,4,K[32]),p=V(p,u,b,g,C,11,K[33]),g=V(g,p,u,b,I,16,K[34]),b=V(b,g,p,u,y,23,K[35]),u=V(u,b,g,p,M,4,K[36]),p=V(p,u,b,g,_,11,K[37]),g=V(g,p,u,b,j,16,K[38]),b=V(b,g,p,u,S,23,K[39]),u=V(u,b,g,p,x,4,K[40]),p=V(p,u,b,g,E,11,K[41]),g=V(g,p,u,b,q,16,K[42]),b=V(b,g,p,u,w,23,K[43]),u=V(u,b,g,p,k,4,K[44]),p=V(p,u,b,g,v,11,K[45]),g=V(g,p,u,b,d,16,K[46]),b=V(b,g,p,u,R,23,K[47]),u=F(u,b,g,p,E,6,K[48]),p=F(p,u,b,g,j,10,K[49]),g=F(g,p,u,b,y,15,K[50]),b=F(b,g,p,u,P,21,K[51]),u=F(u,b,g,p,v,6,K[52]),p=F(p,u,b,g,q,10,K[53]),g=F(g,p,u,b,S,15,K[54]),b=F(b,g,p,u,M,21,K[55]),u=F(u,b,g,p,C,6,K[56]),p=F(p,u,b,g,d,10,K[57]),g=F(g,p,u,b,w,15,K[58]),b=F(b,g,p,u,x,21,K[59]),u=F(u,b,g,p,_,6,K[60]),p=F(p,u,b,g,I,10,K[61]),g=F(g,p,u,b,R,15,K[62]),b=F(b,g,p,u,k,21,K[63]),O[0]=O[0]+u|0,O[1]=O[1]+b|0,O[2]=O[2]+g|0,O[3]=O[3]+p|0},_doFinalize:function(){var L=this._data,N=L.words,D=this._nDataBytes*8,A=L.sigBytes*8;N[A>>>5]|=128<<24-A%32;var B=Y.floor(D/4294967296),O=D;N[(A+64>>>9<<4)+15]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,N[(A+64>>>9<<4)+14]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,L.sigBytes=(N.length+1)*4,this._process();var E=this._hash,M=E.words;for(var R=0;R<4;R++){var q=M[R];M[R]=(q<<8|q>>>24)&16711935|(q<<24|q>>>8)&4278255360}return E},clone:function(){var L=Q.clone.call(this);return L._hash=this._hash.clone(),L}});function H(L,N,D,A,B,O,E){var M=L+(N&D|~N&A)+B+E;return(M<<O|M>>>32-O)+N}function z(L,N,D,A,B,O,E){var M=L+(N&A|D&~A)+B+E;return(M<<O|M>>>32-O)+N}function V(L,N,D,A,B,O,E){var M=L+(N^D^A)+B+E;return(M<<O|M>>>32-O)+N}function F(L,N,D,A,B,O,E){var M=L+(D^(N|~A))+B+E;return(M<<O|M>>>32-O)+N}X.MD5=Q._createHelper(Z),X.HmacMD5=Q._createHmacHelper(Z)}(Math),$.MD5})});var VZ0=o((hi,C71)=>{(function($,Y){if(typeof hi==="object")C71.exports=hi=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(hi,function($){return function(){var Y=$,X=Y.lib,G=X.WordArray,J=X.Hasher,Q=Y.algo,W=[],K=Q.SHA1=J.extend({_doReset:function(){this._hash=new G.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(Z,H){var z=this._hash.words,V=z[0],F=z[1],L=z[2],N=z[3],D=z[4];for(var A=0;A<80;A++){if(A<16)W[A]=Z[H+A]|0;else{var B=W[A-3]^W[A-8]^W[A-14]^W[A-16];W[A]=B<<1|B>>>31}var O=(V<<5|V>>>27)+D+W[A];if(A<20)O+=(F&L|~F&N)+1518500249;else if(A<40)O+=(F^L^N)+1859775393;else if(A<60)O+=(F&L|F&N|L&N)-1894007588;else O+=(F^L^N)-899497514;D=N,N=L,L=F<<30|F>>>2,F=V,V=O}z[0]=z[0]+V|0,z[1]=z[1]+F|0,z[2]=z[2]+L|0,z[3]=z[3]+N|0,z[4]=z[4]+D|0},_doFinalize:function(){var Z=this._data,H=Z.words,z=this._nDataBytes*8,V=Z.sigBytes*8;return H[V>>>5]|=128<<24-V%32,H[(V+64>>>9<<4)+14]=Math.floor(z/4294967296),H[(V+64>>>9<<4)+15]=z,Z.sigBytes=H.length*4,this._process(),this._hash},clone:function(){var Z=J.clone.call(this);return Z._hash=this._hash.clone(),Z}});Y.SHA1=J._createHelper(K),Y.HmacSHA1=J._createHmacHelper(K)}(),$.SHA1})});var gi=o((fi,S71)=>{(function($,Y){if(typeof fi==="object")S71.exports=fi=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(fi,function($){return function(Y){var X=$,G=X.lib,J=G.WordArray,Q=G.Hasher,W=X.algo,K=[],Z=[];(function(){function V(D){var A=Y.sqrt(D);for(var B=2;B<=A;B++)if(!(D%B))return!1;return!0}function F(D){return(D-(D|0))*4294967296|0}var L=2,N=0;while(N<64){if(V(L)){if(N<8)K[N]=F(Y.pow(L,0.5));Z[N]=F(Y.pow(L,0.3333333333333333)),N++}L++}})();var H=[],z=W.SHA256=Q.extend({_doReset:function(){this._hash=new J.init(K.slice(0))},_doProcessBlock:function(V,F){var L=this._hash.words,N=L[0],D=L[1],A=L[2],B=L[3],O=L[4],E=L[5],M=L[6],R=L[7];for(var q=0;q<64;q++){if(q<16)H[q]=V[F+q]|0;else{var _=H[q-15],P=(_<<25|_>>>7)^(_<<14|_>>>18)^_>>>3,w=H[q-2],j=(w<<15|w>>>17)^(w<<13|w>>>19)^w>>>10;H[q]=P+H[q-7]+j+H[q-16]}var C=O&E^~O&M,k=N&D^N&A^D&A,S=(N<<30|N>>>2)^(N<<19|N>>>13)^(N<<10|N>>>22),I=(O<<26|O>>>6)^(O<<21|O>>>11)^(O<<7|O>>>25),v=R+I+C+Z[q]+H[q],x=S+k;R=M,M=E,E=O,O=B+v|0,B=A,A=D,D=N,N=v+x|0}L[0]=L[0]+N|0,L[1]=L[1]+D|0,L[2]=L[2]+A|0,L[3]=L[3]+B|0,L[4]=L[4]+O|0,L[5]=L[5]+E|0,L[6]=L[6]+M|0,L[7]=L[7]+R|0},_doFinalize:function(){var V=this._data,F=V.words,L=this._nDataBytes*8,N=V.sigBytes*8;return F[N>>>5]|=128<<24-N%32,F[(N+64>>>9<<4)+14]=Y.floor(L/4294967296),F[(N+64>>>9<<4)+15]=L,V.sigBytes=F.length*4,this._process(),this._hash},clone:function(){var V=Q.clone.call(this);return V._hash=this._hash.clone(),V}});X.SHA256=Q._createHelper(z),X.HmacSHA256=Q._createHmacHelper(z)}(Math),$.SHA256})});var v71=o((mi,k71)=>{(function($,Y,X){if(typeof mi==="object")k71.exports=mi=Y(R8(),gi());else if(typeof define==="function"&&define.amd)define(["./core","./sha256"],Y);else Y($.CryptoJS)})(mi,function($){return function(){var Y=$,X=Y.lib,G=X.WordArray,J=Y.algo,Q=J.SHA256,W=J.SHA224=Q.extend({_doReset:function(){this._hash=new G.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var K=Q._doFinalize.call(this);return K.sigBytes-=4,K}});Y.SHA224=Q._createHelper(W),Y.HmacSHA224=Q._createHmacHelper(W)}(),$.SHA224})});var FZ0=o((ui,x71)=>{(function($,Y,X){if(typeof ui==="object")x71.exports=ui=Y(R8(),Ck());else if(typeof define==="function"&&define.amd)define(["./core","./x64-core"],Y);else Y($.CryptoJS)})(ui,function($){return function(){var Y=$,X=Y.lib,G=X.Hasher,J=Y.x64,Q=J.Word,W=J.WordArray,K=Y.algo;function Z(){return Q.create.apply(Q,arguments)}var H=[Z(1116352408,3609767458),Z(1899447441,602891725),Z(3049323471,3964484399),Z(3921009573,2173295548),Z(961987163,4081628472),Z(1508970993,3053834265),Z(2453635748,2937671579),Z(2870763221,3664609560),Z(3624381080,2734883394),Z(310598401,1164996542),Z(607225278,1323610764),Z(1426881987,3590304994),Z(1925078388,4068182383),Z(2162078206,991336113),Z(2614888103,633803317),Z(3248222580,3479774868),Z(3835390401,2666613458),Z(4022224774,944711139),Z(264347078,2341262773),Z(604807628,2007800933),Z(770255983,1495990901),Z(1249150122,1856431235),Z(1555081692,3175218132),Z(1996064986,2198950837),Z(2554220882,3999719339),Z(2821834349,766784016),Z(2952996808,2566594879),Z(3210313671,3203337956),Z(3336571891,1034457026),Z(3584528711,2466948901),Z(113926993,3758326383),Z(338241895,168717936),Z(666307205,1188179964),Z(773529912,1546045734),Z(1294757372,1522805485),Z(1396182291,2643833823),Z(1695183700,2343527390),Z(1986661051,1014477480),Z(2177026350,1206759142),Z(2456956037,344077627),Z(2730485921,1290863460),Z(2820302411,3158454273),Z(3259730800,3505952657),Z(3345764771,106217008),Z(3516065817,3606008344),Z(3600352804,1432725776),Z(4094571909,1467031594),Z(275423344,851169720),Z(430227734,3100823752),Z(506948616,1363258195),Z(659060556,3750685593),Z(883997877,3785050280),Z(958139571,3318307427),Z(1322822218,3812723403),Z(1537002063,2003034995),Z(1747873779,3602036899),Z(1955562222,1575990012),Z(2024104815,1125592928),Z(2227730452,2716904306),Z(2361852424,442776044),Z(2428436474,593698344),Z(2756734187,3733110249),Z(3204031479,2999351573),Z(3329325298,3815920427),Z(3391569614,3928383900),Z(3515267271,566280711),Z(3940187606,3454069534),Z(4118630271,4000239992),Z(116418474,1914138554),Z(174292421,2731055270),Z(289380356,3203993006),Z(460393269,320620315),Z(685471733,587496836),Z(852142971,1086792851),Z(1017036298,365543100),Z(1126000580,2618297676),Z(1288033470,3409855158),Z(1501505948,4234509866),Z(1607167915,987167468),Z(1816402316,1246189591)],z=[];(function(){for(var F=0;F<80;F++)z[F]=Z()})();var V=K.SHA512=G.extend({_doReset:function(){this._hash=new W.init([new Q.init(1779033703,4089235720),new Q.init(3144134277,2227873595),new Q.init(1013904242,4271175723),new Q.init(2773480762,1595750129),new Q.init(1359893119,2917565137),new Q.init(2600822924,725511199),new Q.init(528734635,4215389547),new Q.init(1541459225,327033209)])},_doProcessBlock:function(F,L){var N=this._hash.words,D=N[0],A=N[1],B=N[2],O=N[3],E=N[4],M=N[5],R=N[6],q=N[7],_=D.high,P=D.low,w=A.high,j=A.low,C=B.high,k=B.low,S=O.high,I=O.low,v=E.high,x=E.low,y=M.high,d=M.low,u=R.high,b=R.low,g=q.high,p=q.low,h=_,n=P,t=w,s=j,K0=C,X0=k,a=S,Q0=I,e=v,m=x,$0=y,Y0=d,Z0=u,F0=b,D0=g,O0=p;for(var R0=0;R0<80;R0++){var P0,f0,p0=z[R0];if(R0<16)f0=p0.high=F[L+R0*2]|0,P0=p0.low=F[L+R0*2+1]|0;else{var U4=z[R0-15],P1=U4.high,d1=U4.low,C0=(P1>>>1|d1<<31)^(P1>>>8|d1<<24)^P1>>>7,n0=(d1>>>1|P1<<31)^(d1>>>8|P1<<24)^(d1>>>7|P1<<25),J0=z[R0-2],B0=J0.high,Y1=J0.low,c1=(B0>>>19|Y1<<13)^(B0<<3|Y1>>>29)^B0>>>6,C4=(Y1>>>19|B0<<13)^(Y1<<3|B0>>>29)^(Y1>>>6|B0<<26),c4=z[R0-7],r4=c4.high,T6=c4.low,p6=z[R0-16],n6=p6.high,Z1=p6.low;P0=n0+T6,f0=C0+r4+(P0>>>0<n0>>>0?1:0),P0=P0+C4,f0=f0+c1+(P0>>>0<C4>>>0?1:0),P0=P0+Z1,f0=f0+n6+(P0>>>0<Z1>>>0?1:0),p0.high=f0,p0.low=P0}var J4=e&$0^~e&Z0,I6=m&Y0^~m&F0,t4=h&t^h&K0^t&K0,a1=n&s^n&X0^s&X0,F1=(h>>>28|n<<4)^(h<<30|n>>>2)^(h<<25|n>>>7),I1=(n>>>28|h<<4)^(n<<30|h>>>2)^(n<<25|h>>>7),M4=(e>>>14|m<<18)^(e>>>18|m<<14)^(e<<23|m>>>9),w4=(m>>>14|e<<18)^(m>>>18|e<<14)^(m<<23|e>>>9),z6=H[R0],K4=z6.high,b4=z6.low,N0=O0+w4,h0=D0+M4+(N0>>>0<O0>>>0?1:0),N0=N0+I6,h0=h0+J4+(N0>>>0<I6>>>0?1:0),N0=N0+b4,h0=h0+K4+(N0>>>0<b4>>>0?1:0),N0=N0+P0,h0=h0+f0+(N0>>>0<P0>>>0?1:0),a0=I1+a1,c0=F1+t4+(a0>>>0<I1>>>0?1:0);D0=Z0,O0=F0,Z0=$0,F0=Y0,$0=e,Y0=m,m=Q0+N0|0,e=a+h0+(m>>>0<Q0>>>0?1:0)|0,a=K0,Q0=X0,K0=t,X0=s,t=h,s=n,n=N0+a0|0,h=h0+c0+(n>>>0<N0>>>0?1:0)|0}P=D.low=P+n,D.high=_+h+(P>>>0<n>>>0?1:0),j=A.low=j+s,A.high=w+t+(j>>>0<s>>>0?1:0),k=B.low=k+X0,B.high=C+K0+(k>>>0<X0>>>0?1:0),I=O.low=I+Q0,O.high=S+a+(I>>>0<Q0>>>0?1:0),x=E.low=x+m,E.high=v+e+(x>>>0<m>>>0?1:0),d=M.low=d+Y0,M.high=y+$0+(d>>>0<Y0>>>0?1:0),b=R.low=b+F0,R.high=u+Z0+(b>>>0<F0>>>0?1:0),p=q.low=p+O0,q.high=g+D0+(p>>>0<O0>>>0?1:0)},_doFinalize:function(){var F=this._data,L=F.words,N=this._nDataBytes*8,D=F.sigBytes*8;L[D>>>5]|=128<<24-D%32,L[(D+128>>>10<<5)+30]=Math.floor(N/4294967296),L[(D+128>>>10<<5)+31]=N,F.sigBytes=L.length*4,this._process();var A=this._hash.toX32();return A},clone:function(){var F=G.clone.call(this);return F._hash=this._hash.clone(),F},blockSize:32});Y.SHA512=G._createHelper(V),Y.HmacSHA512=G._createHmacHelper(V)}(),$.SHA512})});var b71=o((pi,y71)=>{(function($,Y,X){if(typeof pi==="object")y71.exports=pi=Y(R8(),Ck(),FZ0());else if(typeof define==="function"&&define.amd)define(["./core","./x64-core","./sha512"],Y);else Y($.CryptoJS)})(pi,function($){return function(){var Y=$,X=Y.x64,G=X.Word,J=X.WordArray,Q=Y.algo,W=Q.SHA512,K=Q.SHA384=W.extend({_doReset:function(){this._hash=new J.init([new G.init(3418070365,3238371032),new G.init(1654270250,914150663),new G.init(2438529370,812702999),new G.init(355462360,4144912697),new G.init(1731405415,4290775857),new G.init(2394180231,1750603025),new G.init(3675008525,1694076839),new G.init(1203062813,3204075428)])},_doFinalize:function(){var Z=W._doFinalize.call(this);return Z.sigBytes-=16,Z}});Y.SHA384=W._createHelper(K),Y.HmacSHA384=W._createHmacHelper(K)}(),$.SHA384})});var f71=o((di,h71)=>{(function($,Y,X){if(typeof di==="object")h71.exports=di=Y(R8(),Ck());else if(typeof define==="function"&&define.amd)define(["./core","./x64-core"],Y);else Y($.CryptoJS)})(di,function($){return function(Y){var X=$,G=X.lib,J=G.WordArray,Q=G.Hasher,W=X.x64,K=W.Word,Z=X.algo,H=[],z=[],V=[];(function(){var N=1,D=0;for(var A=0;A<24;A++){H[N+5*D]=(A+1)*(A+2)/2%64;var B=D%5,O=(2*N+3*D)%5;N=B,D=O}for(var N=0;N<5;N++)for(var D=0;D<5;D++)z[N+5*D]=D+(2*N+3*D)%5*5;var E=1;for(var M=0;M<24;M++){var R=0,q=0;for(var _=0;_<7;_++){if(E&1){var P=(1<<_)-1;if(P<32)q^=1<<P;else R^=1<<P-32}if(E&128)E=E<<1^113;else E<<=1}V[M]=K.create(R,q)}})();var F=[];(function(){for(var N=0;N<25;N++)F[N]=K.create()})();var L=Z.SHA3=Q.extend({cfg:Q.cfg.extend({outputLength:512}),_doReset:function(){var N=this._state=[];for(var D=0;D<25;D++)N[D]=new K.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(N,D){var A=this._state,B=this.blockSize/2;for(var O=0;O<B;O++){var E=N[D+2*O],M=N[D+2*O+1];E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,M=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360;var R=A[O];R.high^=M,R.low^=E}for(var q=0;q<24;q++){for(var _=0;_<5;_++){var P=0,w=0;for(var j=0;j<5;j++){var R=A[_+5*j];P^=R.high,w^=R.low}var C=F[_];C.high=P,C.low=w}for(var _=0;_<5;_++){var k=F[(_+4)%5],S=F[(_+1)%5],I=S.high,v=S.low,P=k.high^(I<<1|v>>>31),w=k.low^(v<<1|I>>>31);for(var j=0;j<5;j++){var R=A[_+5*j];R.high^=P,R.low^=w}}for(var x=1;x<25;x++){var P,w,R=A[x],y=R.high,d=R.low,u=H[x];if(u<32)P=y<<u|d>>>32-u,w=d<<u|y>>>32-u;else P=d<<u-32|y>>>64-u,w=y<<u-32|d>>>64-u;var b=F[z[x]];b.high=P,b.low=w}var g=F[0],p=A[0];g.high=p.high,g.low=p.low;for(var _=0;_<5;_++)for(var j=0;j<5;j++){var x=_+5*j,R=A[x],h=F[x],n=F[(_+1)%5+5*j],t=F[(_+2)%5+5*j];R.high=h.high^~n.high&t.high,R.low=h.low^~n.low&t.low}var R=A[0],s=V[q];R.high^=s.high,R.low^=s.low}},_doFinalize:function(){var N=this._data,D=N.words,A=this._nDataBytes*8,B=N.sigBytes*8,O=this.blockSize*32;D[B>>>5]|=1<<24-B%32,D[(Y.ceil((B+1)/O)*O>>>5)-1]|=128,N.sigBytes=D.length*4,this._process();var E=this._state,M=this.cfg.outputLength/8,R=M/8,q=[];for(var _=0;_<R;_++){var P=E[_],w=P.high,j=P.low;w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,j=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360,q.push(j),q.push(w)}return new J.init(q,M)},clone:function(){var N=Q.clone.call(this),D=N._state=this._state.slice(0);for(var A=0;A<25;A++)D[A]=D[A].clone();return N}});X.SHA3=Q._createHelper(L),X.HmacSHA3=Q._createHmacHelper(L)}(Math),$.SHA3})});var m71=o((ci,g71)=>{(function($,Y){if(typeof ci==="object")g71.exports=ci=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(ci,function($){return function(Y){var X=$,G=X.lib,J=G.WordArray,Q=G.Hasher,W=X.algo,K=J.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),Z=J.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),H=J.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),z=J.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),V=J.create([0,1518500249,1859775393,2400959708,2840853838]),F=J.create([1352829926,1548603684,1836072691,2053994217,0]),L=W.RIPEMD160=Q.extend({_doReset:function(){this._hash=J.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(M,R){for(var q=0;q<16;q++){var _=R+q,P=M[_];M[_]=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360}var w=this._hash.words,j=V.words,C=F.words,k=K.words,S=Z.words,I=H.words,v=z.words,x,y,d,u,b,g,p,h,n,t;g=x=w[0],p=y=w[1],h=d=w[2],n=u=w[3],t=b=w[4];var s;for(var q=0;q<80;q+=1){if(s=x+M[R+k[q]]|0,q<16)s+=N(y,d,u)+j[0];else if(q<32)s+=D(y,d,u)+j[1];else if(q<48)s+=A(y,d,u)+j[2];else if(q<64)s+=B(y,d,u)+j[3];else s+=O(y,d,u)+j[4];if(s=s|0,s=E(s,I[q]),s=s+b|0,x=b,b=u,u=E(d,10),d=y,y=s,s=g+M[R+S[q]]|0,q<16)s+=O(p,h,n)+C[0];else if(q<32)s+=B(p,h,n)+C[1];else if(q<48)s+=A(p,h,n)+C[2];else if(q<64)s+=D(p,h,n)+C[3];else s+=N(p,h,n)+C[4];s=s|0,s=E(s,v[q]),s=s+t|0,g=t,t=n,n=E(h,10),h=p,p=s}s=w[1]+d+n|0,w[1]=w[2]+u+t|0,w[2]=w[3]+b+g|0,w[3]=w[4]+x+p|0,w[4]=w[0]+y+h|0,w[0]=s},_doFinalize:function(){var M=this._data,R=M.words,q=this._nDataBytes*8,_=M.sigBytes*8;R[_>>>5]|=128<<24-_%32,R[(_+64>>>9<<4)+14]=(q<<8|q>>>24)&16711935|(q<<24|q>>>8)&4278255360,M.sigBytes=(R.length+1)*4,this._process();var P=this._hash,w=P.words;for(var j=0;j<5;j++){var C=w[j];w[j]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}return P},clone:function(){var M=Q.clone.call(this);return M._hash=this._hash.clone(),M}});function N(M,R,q){return M^R^q}function D(M,R,q){return M&R|~M&q}function A(M,R,q){return(M|~R)^q}function B(M,R,q){return M&q|R&~q}function O(M,R,q){return M^(R|~q)}function E(M,R){return M<<R|M>>>32-R}X.RIPEMD160=Q._createHelper(L),X.HmacRIPEMD160=Q._createHmacHelper(L)}(Math),$.RIPEMD160})});var ii=o((li,u71)=>{(function($,Y){if(typeof li==="object")u71.exports=li=Y(R8());else if(typeof define==="function"&&define.amd)define(["./core"],Y);else Y($.CryptoJS)})(li,function($){(function(){var Y=$,X=Y.lib,G=X.Base,J=Y.enc,Q=J.Utf8,W=Y.algo,K=W.HMAC=G.extend({init:function(Z,H){if(Z=this._hasher=new Z.init,typeof H=="string")H=Q.parse(H);var z=Z.blockSize,V=z*4;if(H.sigBytes>V)H=Z.finalize(H);H.clamp();var F=this._oKey=H.clone(),L=this._iKey=H.clone(),N=F.words,D=L.words;for(var A=0;A<z;A++)N[A]^=1549556828,D[A]^=909522486;F.sigBytes=L.sigBytes=V,this.reset()},reset:function(){var Z=this._hasher;Z.reset(),Z.update(this._iKey)},update:function(Z){return this._hasher.update(Z),this},finalize:function(Z){var H=this._hasher,z=H.finalize(Z);H.reset();var V=H.finalize(this._oKey.clone().concat(z));return V}})})()})});var d71=o((ni,p71)=>{(function($,Y,X){if(typeof ni==="object")p71.exports=ni=Y(R8(),gi(),ii());else if(typeof define==="function"&&define.amd)define(["./core","./sha256","./hmac"],Y);else Y($.CryptoJS)})(ni,function($){return function(){var Y=$,X=Y.lib,G=X.Base,J=X.WordArray,Q=Y.algo,W=Q.SHA256,K=Q.HMAC,Z=Q.PBKDF2=G.extend({cfg:G.extend({keySize:4,hasher:W,iterations:250000}),init:function(H){this.cfg=this.cfg.extend(H)},compute:function(H,z){var V=this.cfg,F=K.create(V.hasher,H),L=J.create(),N=J.create([1]),D=L.words,A=N.words,B=V.keySize,O=V.iterations;while(D.length<B){var E=F.update(z).finalize(N);F.reset();var M=E.words,R=M.length,q=E;for(var _=1;_<O;_++){q=F.finalize(q),F.reset();var P=q.words;for(var w=0;w<R;w++)M[w]^=P[w]}L.concat(E),A[0]++}return L.sigBytes=B*4,L}});Y.PBKDF2=function(H,z,V){return Z.create(V).compute(H,z)}}(),$.PBKDF2})});var fH=o((ri,c71)=>{(function($,Y,X){if(typeof ri==="object")c71.exports=ri=Y(R8(),VZ0(),ii());else if(typeof define==="function"&&define.amd)define(["./core","./sha1","./hmac"],Y);else Y($.CryptoJS)})(ri,function($){return function(){var Y=$,X=Y.lib,G=X.Base,J=X.WordArray,Q=Y.algo,W=Q.MD5,K=Q.EvpKDF=G.extend({cfg:G.extend({keySize:4,hasher:W,iterations:1}),init:function(Z){this.cfg=this.cfg.extend(Z)},compute:function(Z,H){var z,V=this.cfg,F=V.hasher.create(),L=J.create(),N=L.words,D=V.keySize,A=V.iterations;while(N.length<D){if(z)F.update(z);z=F.update(Z).finalize(H),F.reset();for(var B=1;B<A;B++)z=F.finalize(z),F.reset();L.concat(z)}return L.sigBytes=D*4,L}});Y.EvpKDF=function(Z,H,z){return K.create(z).compute(Z,H)}}(),$.EvpKDF})});var XY=o((ai,l71)=>{(function($,Y,X){if(typeof ai==="object")l71.exports=ai=Y(R8(),fH());else if(typeof define==="function"&&define.amd)define(["./core","./evpkdf"],Y);else Y($.CryptoJS)})(ai,function($){$.lib.Cipher||function(Y){var X=$,G=X.lib,J=G.Base,Q=G.WordArray,W=G.BufferedBlockAlgorithm,K=X.enc,Z=K.Utf8,H=K.Base64,z=X.algo,V=z.EvpKDF,F=G.Cipher=W.extend({cfg:J.extend(),createEncryptor:function(C,k){return this.create(this._ENC_XFORM_MODE,C,k)},createDecryptor:function(C,k){return this.create(this._DEC_XFORM_MODE,C,k)},init:function(C,k,S){this.cfg=this.cfg.extend(S),this._xformMode=C,this._key=k,this.reset()},reset:function(){W.reset.call(this),this._doReset()},process:function(C){return this._append(C),this._process()},finalize:function(C){if(C)this._append(C);var k=this._doFinalize();return k},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function C(k){if(typeof k=="string")return j;else return _}return function(k){return{encrypt:function(S,I,v){return C(I).encrypt(k,S,I,v)},decrypt:function(S,I,v){return C(I).decrypt(k,S,I,v)}}}}()}),L=G.StreamCipher=F.extend({_doFinalize:function(){var C=this._process(!0);return C},blockSize:1}),N=X.mode={},D=G.BlockCipherMode=J.extend({createEncryptor:function(C,k){return this.Encryptor.create(C,k)},createDecryptor:function(C,k){return this.Decryptor.create(C,k)},init:function(C,k){this._cipher=C,this._iv=k}}),A=N.CBC=function(){var C=D.extend();C.Encryptor=C.extend({processBlock:function(S,I){var v=this._cipher,x=v.blockSize;k.call(this,S,I,x),v.encryptBlock(S,I),this._prevBlock=S.slice(I,I+x)}}),C.Decryptor=C.extend({processBlock:function(S,I){var v=this._cipher,x=v.blockSize,y=S.slice(I,I+x);v.decryptBlock(S,I),k.call(this,S,I,x),this._prevBlock=y}});function k(S,I,v){var x,y=this._iv;if(y)x=y,this._iv=Y;else x=this._prevBlock;for(var d=0;d<v;d++)S[I+d]^=x[d]}return C}(),B=X.pad={},O=B.Pkcs7={pad:function(C,k){var S=k*4,I=S-C.sigBytes%S,v=I<<24|I<<16|I<<8|I,x=[];for(var y=0;y<I;y+=4)x.push(v);var d=Q.create(x,I);C.concat(d)},unpad:function(C){var k=C.words[C.sigBytes-1>>>2]&255;C.sigBytes-=k}},E=G.BlockCipher=F.extend({cfg:F.cfg.extend({mode:A,padding:O}),reset:function(){var C;F.reset.call(this);var k=this.cfg,S=k.iv,I=k.mode;if(this._xformMode==this._ENC_XFORM_MODE)C=I.createEncryptor;else C=I.createDecryptor,this._minBufferSize=1;if(this._mode&&this._mode.__creator==C)this._mode.init(this,S&&S.words);else this._mode=C.call(I,this,S&&S.words),this._mode.__creator=C},_doProcessBlock:function(C,k){this._mode.processBlock(C,k)},_doFinalize:function(){var C,k=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE)k.pad(this._data,this.blockSize),C=this._process(!0);else C=this._process(!0),k.unpad(C);return C},blockSize:4}),M=G.CipherParams=J.extend({init:function(C){this.mixIn(C)},toString:function(C){return(C||this.formatter).stringify(this)}}),R=X.format={},q=R.OpenSSL={stringify:function(C){var k,S=C.ciphertext,I=C.salt;if(I)k=Q.create([1398893684,1701076831]).concat(I).concat(S);else k=S;return k.toString(H)},parse:function(C){var k,S=H.parse(C),I=S.words;if(I[0]==1398893684&&I[1]==1701076831)k=Q.create(I.slice(2,4)),I.splice(0,4),S.sigBytes-=16;return M.create({ciphertext:S,salt:k})}},_=G.SerializableCipher=J.extend({cfg:J.extend({format:q}),encrypt:function(C,k,S,I){I=this.cfg.extend(I);var v=C.createEncryptor(S,I),x=v.finalize(k),y=v.cfg;return M.create({ciphertext:x,key:S,iv:y.iv,algorithm:C,mode:y.mode,padding:y.padding,blockSize:C.blockSize,formatter:I.format})},decrypt:function(C,k,S,I){I=this.cfg.extend(I),k=this._parse(k,I.format);var v=C.createDecryptor(S,I).finalize(k.ciphertext);return v},_parse:function(C,k){if(typeof C=="string")return k.parse(C,this);else return C}}),P=X.kdf={},w=P.OpenSSL={execute:function(C,k,S,I,v){if(!I)I=Q.random(8);if(!v)var x=V.create({keySize:k+S}).compute(C,I);else var x=V.create({keySize:k+S,hasher:v}).compute(C,I);var y=Q.create(x.words.slice(k),S*4);return x.sigBytes=k*4,M.create({key:x,iv:y,salt:I})}},j=G.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:w}),encrypt:function(C,k,S,I){I=this.cfg.extend(I);var v=I.kdf.execute(S,C.keySize,C.ivSize,I.salt,I.hasher);I.iv=v.iv;var x=_.encrypt.call(this,C,k,v.key,I);return x.mixIn(v),x},decrypt:function(C,k,S,I){I=this.cfg.extend(I),k=this._parse(k,I.format);var v=I.kdf.execute(S,C.keySize,C.ivSize,k.salt,I.hasher);I.iv=v.iv;var x=_.decrypt.call(this,C,k,v.key,I);return x}})}()})});var n71=o((si,i71)=>{(function($,Y,X){if(typeof si==="object")i71.exports=si=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(si,function($){return $.mode.CFB=function(){var Y=$.lib.BlockCipherMode.extend();Y.Encryptor=Y.extend({processBlock:function(G,J){var Q=this._cipher,W=Q.blockSize;X.call(this,G,J,W,Q),this._prevBlock=G.slice(J,J+W)}}),Y.Decryptor=Y.extend({processBlock:function(G,J){var Q=this._cipher,W=Q.blockSize,K=G.slice(J,J+W);X.call(this,G,J,W,Q),this._prevBlock=K}});function X(G,J,Q,W){var K,Z=this._iv;if(Z)K=Z.slice(0),this._iv=void 0;else K=this._prevBlock;W.encryptBlock(K,0);for(var H=0;H<Q;H++)G[J+H]^=K[H]}return Y}(),$.mode.CFB})});var a71=o((oi,r71)=>{(function($,Y,X){if(typeof oi==="object")r71.exports=oi=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(oi,function($){return $.mode.CTR=function(){var Y=$.lib.BlockCipherMode.extend(),X=Y.Encryptor=Y.extend({processBlock:function(G,J){var Q=this._cipher,W=Q.blockSize,K=this._iv,Z=this._counter;if(K)Z=this._counter=K.slice(0),this._iv=void 0;var H=Z.slice(0);Q.encryptBlock(H,0),Z[W-1]=Z[W-1]+1|0;for(var z=0;z<W;z++)G[J+z]^=H[z]}});return Y.Decryptor=X,Y}(),$.mode.CTR})});var o71=o((ti,s71)=>{(function($,Y,X){if(typeof ti==="object")s71.exports=ti=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(ti,function($){return $.mode.CTRGladman=function(){var Y=$.lib.BlockCipherMode.extend();function X(Q){if((Q>>24&255)===255){var W=Q>>16&255,K=Q>>8&255,Z=Q&255;if(W===255)if(W=0,K===255)if(K=0,Z===255)Z=0;else++Z;else++K;else++W;Q=0,Q+=W<<16,Q+=K<<8,Q+=Z}else Q+=16777216;return Q}function G(Q){if((Q[0]=X(Q[0]))===0)Q[1]=X(Q[1]);return Q}var J=Y.Encryptor=Y.extend({processBlock:function(Q,W){var K=this._cipher,Z=K.blockSize,H=this._iv,z=this._counter;if(H)z=this._counter=H.slice(0),this._iv=void 0;G(z);var V=z.slice(0);K.encryptBlock(V,0);for(var F=0;F<Z;F++)Q[W+F]^=V[F]}});return Y.Decryptor=J,Y}(),$.mode.CTRGladman})});var e71=o((ei,t71)=>{(function($,Y,X){if(typeof ei==="object")t71.exports=ei=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(ei,function($){return $.mode.OFB=function(){var Y=$.lib.BlockCipherMode.extend(),X=Y.Encryptor=Y.extend({processBlock:function(G,J){var Q=this._cipher,W=Q.blockSize,K=this._iv,Z=this._keystream;if(K)Z=this._keystream=K.slice(0),this._iv=void 0;Q.encryptBlock(Z,0);for(var H=0;H<W;H++)G[J+H]^=Z[H]}});return Y.Decryptor=X,Y}(),$.mode.OFB})});var YY1=o(($n,$Y1)=>{(function($,Y,X){if(typeof $n==="object")$Y1.exports=$n=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})($n,function($){return $.mode.ECB=function(){var Y=$.lib.BlockCipherMode.extend();return Y.Encryptor=Y.extend({processBlock:function(X,G){this._cipher.encryptBlock(X,G)}}),Y.Decryptor=Y.extend({processBlock:function(X,G){this._cipher.decryptBlock(X,G)}}),Y}(),$.mode.ECB})});var GY1=o((Yn,XY1)=>{(function($,Y,X){if(typeof Yn==="object")XY1.exports=Yn=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(Yn,function($){return $.pad.AnsiX923={pad:function(Y,X){var G=Y.sigBytes,J=X*4,Q=J-G%J,W=G+Q-1;Y.clamp(),Y.words[W>>>2]|=Q<<24-W%4*8,Y.sigBytes+=Q},unpad:function(Y){var X=Y.words[Y.sigBytes-1>>>2]&255;Y.sigBytes-=X}},$.pad.Ansix923})});var QY1=o((Xn,JY1)=>{(function($,Y,X){if(typeof Xn==="object")JY1.exports=Xn=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(Xn,function($){return $.pad.Iso10126={pad:function(Y,X){var G=X*4,J=G-Y.sigBytes%G;Y.concat($.lib.WordArray.random(J-1)).concat($.lib.WordArray.create([J<<24],1))},unpad:function(Y){var X=Y.words[Y.sigBytes-1>>>2]&255;Y.sigBytes-=X}},$.pad.Iso10126})});var KY1=o((Gn,WY1)=>{(function($,Y,X){if(typeof Gn==="object")WY1.exports=Gn=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(Gn,function($){return $.pad.Iso97971={pad:function(Y,X){Y.concat($.lib.WordArray.create([2147483648],1)),$.pad.ZeroPadding.pad(Y,X)},unpad:function(Y){$.pad.ZeroPadding.unpad(Y),Y.sigBytes--}},$.pad.Iso97971})});var UY1=o((Jn,ZY1)=>{(function($,Y,X){if(typeof Jn==="object")ZY1.exports=Jn=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(Jn,function($){return $.pad.ZeroPadding={pad:function(Y,X){var G=X*4;Y.clamp(),Y.sigBytes+=G-(Y.sigBytes%G||G)},unpad:function(Y){var X=Y.words,G=Y.sigBytes-1;for(var G=Y.sigBytes-1;G>=0;G--)if(X[G>>>2]>>>24-G%4*8&255){Y.sigBytes=G+1;break}}},$.pad.ZeroPadding})});var zY1=o((Qn,HY1)=>{(function($,Y,X){if(typeof Qn==="object")HY1.exports=Qn=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(Qn,function($){return $.pad.NoPadding={pad:function(){},unpad:function(){}},$.pad.NoPadding})});var FY1=o((Wn,VY1)=>{(function($,Y,X){if(typeof Wn==="object")VY1.exports=Wn=Y(R8(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./cipher-core"],Y);else Y($.CryptoJS)})(Wn,function($){return function(Y){var X=$,G=X.lib,J=G.CipherParams,Q=X.enc,W=Q.Hex,K=X.format,Z=K.Hex={stringify:function(H){return H.ciphertext.toString(W)},parse:function(H){var z=W.parse(H);return J.create({ciphertext:z})}}}(),$.format.Hex})});var DY1=o((Kn,LY1)=>{(function($,Y,X){if(typeof Kn==="object")LY1.exports=Kn=Y(R8(),ZF(),UF(),fH(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],Y);else Y($.CryptoJS)})(Kn,function($){return function(){var Y=$,X=Y.lib,G=X.BlockCipher,J=Y.algo,Q=[],W=[],K=[],Z=[],H=[],z=[],V=[],F=[],L=[],N=[];(function(){var B=[];for(var O=0;O<256;O++)if(O<128)B[O]=O<<1;else B[O]=O<<1^283;var E=0,M=0;for(var O=0;O<256;O++){var R=M^M<<1^M<<2^M<<3^M<<4;R=R>>>8^R&255^99,Q[E]=R,W[R]=E;var q=B[E],_=B[q],P=B[_],w=B[R]*257^R*16843008;K[E]=w<<24|w>>>8,Z[E]=w<<16|w>>>16,H[E]=w<<8|w>>>24,z[E]=w;var w=P*16843009^_*65537^q*257^E*16843008;if(V[R]=w<<24|w>>>8,F[R]=w<<16|w>>>16,L[R]=w<<8|w>>>24,N[R]=w,!E)E=M=1;else E=q^B[B[B[P^q]]],M^=B[B[M]]}})();var D=[0,1,2,4,8,16,32,64,128,27,54],A=J.AES=G.extend({_doReset:function(){var B;if(this._nRounds&&this._keyPriorReset===this._key)return;var O=this._keyPriorReset=this._key,E=O.words,M=O.sigBytes/4,R=this._nRounds=M+6,q=(R+1)*4,_=this._keySchedule=[];for(var P=0;P<q;P++)if(P<M)_[P]=E[P];else{if(B=_[P-1],!(P%M))B=B<<8|B>>>24,B=Q[B>>>24]<<24|Q[B>>>16&255]<<16|Q[B>>>8&255]<<8|Q[B&255],B^=D[P/M|0]<<24;else if(M>6&&P%M==4)B=Q[B>>>24]<<24|Q[B>>>16&255]<<16|Q[B>>>8&255]<<8|Q[B&255];_[P]=_[P-M]^B}var w=this._invKeySchedule=[];for(var j=0;j<q;j++){var P=q-j;if(j%4)var B=_[P];else var B=_[P-4];if(j<4||P<=4)w[j]=B;else w[j]=V[Q[B>>>24]]^F[Q[B>>>16&255]]^L[Q[B>>>8&255]]^N[Q[B&255]]}},encryptBlock:function(B,O){this._doCryptBlock(B,O,this._keySchedule,K,Z,H,z,Q)},decryptBlock:function(B,O){var E=B[O+1];B[O+1]=B[O+3],B[O+3]=E,this._doCryptBlock(B,O,this._invKeySchedule,V,F,L,N,W);var E=B[O+1];B[O+1]=B[O+3],B[O+3]=E},_doCryptBlock:function(B,O,E,M,R,q,_,P){var w=this._nRounds,j=B[O]^E[0],C=B[O+1]^E[1],k=B[O+2]^E[2],S=B[O+3]^E[3],I=4;for(var v=1;v<w;v++){var x=M[j>>>24]^R[C>>>16&255]^q[k>>>8&255]^_[S&255]^E[I++],y=M[C>>>24]^R[k>>>16&255]^q[S>>>8&255]^_[j&255]^E[I++],d=M[k>>>24]^R[S>>>16&255]^q[j>>>8&255]^_[C&255]^E[I++],u=M[S>>>24]^R[j>>>16&255]^q[C>>>8&255]^_[k&255]^E[I++];j=x,C=y,k=d,S=u}var x=(P[j>>>24]<<24|P[C>>>16&255]<<16|P[k>>>8&255]<<8|P[S&255])^E[I++],y=(P[C>>>24]<<24|P[k>>>16&255]<<16|P[S>>>8&255]<<8|P[j&255])^E[I++],d=(P[k>>>24]<<24|P[S>>>16&255]<<16|P[j>>>8&255]<<8|P[C&255])^E[I++],u=(P[S>>>24]<<24|P[j>>>16&255]<<16|P[C>>>8&255]<<8|P[k&255])^E[I++];B[O]=x,B[O+1]=y,B[O+2]=d,B[O+3]=u},keySize:8});Y.AES=G._createHelper(A)}(),$.AES})});var AY1=o((Zn,NY1)=>{(function($,Y,X){if(typeof Zn==="object")NY1.exports=Zn=Y(R8(),ZF(),UF(),fH(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],Y);else Y($.CryptoJS)})(Zn,function($){return function(){var Y=$,X=Y.lib,G=X.WordArray,J=X.BlockCipher,Q=Y.algo,W=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],K=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],Z=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],H=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],z=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],V=Q.DES=J.extend({_doReset:function(){var D=this._key,A=D.words,B=[];for(var O=0;O<56;O++){var E=W[O]-1;B[O]=A[E>>>5]>>>31-E%32&1}var M=this._subKeys=[];for(var R=0;R<16;R++){var q=M[R]=[],_=Z[R];for(var O=0;O<24;O++)q[O/6|0]|=B[(K[O]-1+_)%28]<<31-O%6,q[4+(O/6|0)]|=B[28+(K[O+24]-1+_)%28]<<31-O%6;q[0]=q[0]<<1|q[0]>>>31;for(var O=1;O<7;O++)q[O]=q[O]>>>(O-1)*4+3;q[7]=q[7]<<5|q[7]>>>27}var P=this._invSubKeys=[];for(var O=0;O<16;O++)P[O]=M[15-O]},encryptBlock:function(D,A){this._doCryptBlock(D,A,this._subKeys)},decryptBlock:function(D,A){this._doCryptBlock(D,A,this._invSubKeys)},_doCryptBlock:function(D,A,B){this._lBlock=D[A],this._rBlock=D[A+1],F.call(this,4,252645135),F.call(this,16,65535),L.call(this,2,858993459),L.call(this,8,16711935),F.call(this,1,1431655765);for(var O=0;O<16;O++){var E=B[O],M=this._lBlock,R=this._rBlock,q=0;for(var _=0;_<8;_++)q|=H[_][((R^E[_])&z[_])>>>0];this._lBlock=R,this._rBlock=M^q}var P=this._lBlock;this._lBlock=this._rBlock,this._rBlock=P,F.call(this,1,1431655765),L.call(this,8,16711935),L.call(this,2,858993459),F.call(this,16,65535),F.call(this,4,252645135),D[A]=this._lBlock,D[A+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function F(D,A){var B=(this._lBlock>>>D^this._rBlock)&A;this._rBlock^=B,this._lBlock^=B<<D}function L(D,A){var B=(this._rBlock>>>D^this._lBlock)&A;this._lBlock^=B,this._rBlock^=B<<D}Y.DES=J._createHelper(V);var N=Q.TripleDES=J.extend({_doReset:function(){var D=this._key,A=D.words;if(A.length!==2&&A.length!==4&&A.length<6)throw Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var B=A.slice(0,2),O=A.length<4?A.slice(0,2):A.slice(2,4),E=A.length<6?A.slice(0,2):A.slice(4,6);this._des1=V.createEncryptor(G.create(B)),this._des2=V.createEncryptor(G.create(O)),this._des3=V.createEncryptor(G.create(E))},encryptBlock:function(D,A){this._des1.encryptBlock(D,A),this._des2.decryptBlock(D,A),this._des3.encryptBlock(D,A)},decryptBlock:function(D,A){this._des3.decryptBlock(D,A),this._des2.encryptBlock(D,A),this._des1.decryptBlock(D,A)},keySize:6,ivSize:2,blockSize:2});Y.TripleDES=J._createHelper(N)}(),$.TripleDES})});var OY1=o((Un,BY1)=>{(function($,Y,X){if(typeof Un==="object")BY1.exports=Un=Y(R8(),ZF(),UF(),fH(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],Y);else Y($.CryptoJS)})(Un,function($){return function(){var Y=$,X=Y.lib,G=X.StreamCipher,J=Y.algo,Q=J.RC4=G.extend({_doReset:function(){var Z=this._key,H=Z.words,z=Z.sigBytes,V=this._S=[];for(var F=0;F<256;F++)V[F]=F;for(var F=0,L=0;F<256;F++){var N=F%z,D=H[N>>>2]>>>24-N%4*8&255;L=(L+V[F]+D)%256;var A=V[F];V[F]=V[L],V[L]=A}this._i=this._j=0},_doProcessBlock:function(Z,H){Z[H]^=W.call(this)},keySize:8,ivSize:0});function W(){var Z=this._S,H=this._i,z=this._j,V=0;for(var F=0;F<4;F++){H=(H+1)%256,z=(z+Z[H])%256;var L=Z[H];Z[H]=Z[z],Z[z]=L,V|=Z[(Z[H]+Z[z])%256]<<24-F*8}return this._i=H,this._j=z,V}Y.RC4=G._createHelper(Q);var K=J.RC4Drop=Q.extend({cfg:Q.cfg.extend({drop:192}),_doReset:function(){Q._doReset.call(this);for(var Z=this.cfg.drop;Z>0;Z--)W.call(this)}});Y.RC4Drop=G._createHelper(K)}(),$.RC4})});var MY1=o((Hn,EY1)=>{(function($,Y,X){if(typeof Hn==="object")EY1.exports=Hn=Y(R8(),ZF(),UF(),fH(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],Y);else Y($.CryptoJS)})(Hn,function($){return function(){var Y=$,X=Y.lib,G=X.StreamCipher,J=Y.algo,Q=[],W=[],K=[],Z=J.Rabbit=G.extend({_doReset:function(){var z=this._key.words,V=this.cfg.iv;for(var F=0;F<4;F++)z[F]=(z[F]<<8|z[F]>>>24)&16711935|(z[F]<<24|z[F]>>>8)&4278255360;var L=this._X=[z[0],z[3]<<16|z[2]>>>16,z[1],z[0]<<16|z[3]>>>16,z[2],z[1]<<16|z[0]>>>16,z[3],z[2]<<16|z[1]>>>16],N=this._C=[z[2]<<16|z[2]>>>16,z[0]&4294901760|z[1]&65535,z[3]<<16|z[3]>>>16,z[1]&4294901760|z[2]&65535,z[0]<<16|z[0]>>>16,z[2]&4294901760|z[3]&65535,z[1]<<16|z[1]>>>16,z[3]&4294901760|z[0]&65535];this._b=0;for(var F=0;F<4;F++)H.call(this);for(var F=0;F<8;F++)N[F]^=L[F+4&7];if(V){var D=V.words,A=D[0],B=D[1],O=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,E=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,M=O>>>16|E&4294901760,R=E<<16|O&65535;N[0]^=O,N[1]^=M,N[2]^=E,N[3]^=R,N[4]^=O,N[5]^=M,N[6]^=E,N[7]^=R;for(var F=0;F<4;F++)H.call(this)}},_doProcessBlock:function(z,V){var F=this._X;H.call(this),Q[0]=F[0]^F[5]>>>16^F[3]<<16,Q[1]=F[2]^F[7]>>>16^F[5]<<16,Q[2]=F[4]^F[1]>>>16^F[7]<<16,Q[3]=F[6]^F[3]>>>16^F[1]<<16;for(var L=0;L<4;L++)Q[L]=(Q[L]<<8|Q[L]>>>24)&16711935|(Q[L]<<24|Q[L]>>>8)&4278255360,z[V+L]^=Q[L]},blockSize:4,ivSize:2});function H(){var z=this._X,V=this._C;for(var F=0;F<8;F++)W[F]=V[F];V[0]=V[0]+1295307597+this._b|0,V[1]=V[1]+3545052371+(V[0]>>>0<W[0]>>>0?1:0)|0,V[2]=V[2]+886263092+(V[1]>>>0<W[1]>>>0?1:0)|0,V[3]=V[3]+1295307597+(V[2]>>>0<W[2]>>>0?1:0)|0,V[4]=V[4]+3545052371+(V[3]>>>0<W[3]>>>0?1:0)|0,V[5]=V[5]+886263092+(V[4]>>>0<W[4]>>>0?1:0)|0,V[6]=V[6]+1295307597+(V[5]>>>0<W[5]>>>0?1:0)|0,V[7]=V[7]+3545052371+(V[6]>>>0<W[6]>>>0?1:0)|0,this._b=V[7]>>>0<W[7]>>>0?1:0;for(var F=0;F<8;F++){var L=z[F]+V[F],N=L&65535,D=L>>>16,A=((N*N>>>17)+N*D>>>15)+D*D,B=((L&4294901760)*L|0)+((L&65535)*L|0);K[F]=A^B}z[0]=K[0]+(K[7]<<16|K[7]>>>16)+(K[6]<<16|K[6]>>>16)|0,z[1]=K[1]+(K[0]<<8|K[0]>>>24)+K[7]|0,z[2]=K[2]+(K[1]<<16|K[1]>>>16)+(K[0]<<16|K[0]>>>16)|0,z[3]=K[3]+(K[2]<<8|K[2]>>>24)+K[1]|0,z[4]=K[4]+(K[3]<<16|K[3]>>>16)+(K[2]<<16|K[2]>>>16)|0,z[5]=K[5]+(K[4]<<8|K[4]>>>24)+K[3]|0,z[6]=K[6]+(K[5]<<16|K[5]>>>16)+(K[4]<<16|K[4]>>>16)|0,z[7]=K[7]+(K[6]<<8|K[6]>>>24)+K[5]|0}Y.Rabbit=G._createHelper(Z)}(),$.Rabbit})});var qY1=o((zn,RY1)=>{(function($,Y,X){if(typeof zn==="object")RY1.exports=zn=Y(R8(),ZF(),UF(),fH(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],Y);else Y($.CryptoJS)})(zn,function($){return function(){var Y=$,X=Y.lib,G=X.StreamCipher,J=Y.algo,Q=[],W=[],K=[],Z=J.RabbitLegacy=G.extend({_doReset:function(){var z=this._key.words,V=this.cfg.iv,F=this._X=[z[0],z[3]<<16|z[2]>>>16,z[1],z[0]<<16|z[3]>>>16,z[2],z[1]<<16|z[0]>>>16,z[3],z[2]<<16|z[1]>>>16],L=this._C=[z[2]<<16|z[2]>>>16,z[0]&4294901760|z[1]&65535,z[3]<<16|z[3]>>>16,z[1]&4294901760|z[2]&65535,z[0]<<16|z[0]>>>16,z[2]&4294901760|z[3]&65535,z[1]<<16|z[1]>>>16,z[3]&4294901760|z[0]&65535];this._b=0;for(var N=0;N<4;N++)H.call(this);for(var N=0;N<8;N++)L[N]^=F[N+4&7];if(V){var D=V.words,A=D[0],B=D[1],O=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,E=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,M=O>>>16|E&4294901760,R=E<<16|O&65535;L[0]^=O,L[1]^=M,L[2]^=E,L[3]^=R,L[4]^=O,L[5]^=M,L[6]^=E,L[7]^=R;for(var N=0;N<4;N++)H.call(this)}},_doProcessBlock:function(z,V){var F=this._X;H.call(this),Q[0]=F[0]^F[5]>>>16^F[3]<<16,Q[1]=F[2]^F[7]>>>16^F[5]<<16,Q[2]=F[4]^F[1]>>>16^F[7]<<16,Q[3]=F[6]^F[3]>>>16^F[1]<<16;for(var L=0;L<4;L++)Q[L]=(Q[L]<<8|Q[L]>>>24)&16711935|(Q[L]<<24|Q[L]>>>8)&4278255360,z[V+L]^=Q[L]},blockSize:4,ivSize:2});function H(){var z=this._X,V=this._C;for(var F=0;F<8;F++)W[F]=V[F];V[0]=V[0]+1295307597+this._b|0,V[1]=V[1]+3545052371+(V[0]>>>0<W[0]>>>0?1:0)|0,V[2]=V[2]+886263092+(V[1]>>>0<W[1]>>>0?1:0)|0,V[3]=V[3]+1295307597+(V[2]>>>0<W[2]>>>0?1:0)|0,V[4]=V[4]+3545052371+(V[3]>>>0<W[3]>>>0?1:0)|0,V[5]=V[5]+886263092+(V[4]>>>0<W[4]>>>0?1:0)|0,V[6]=V[6]+1295307597+(V[5]>>>0<W[5]>>>0?1:0)|0,V[7]=V[7]+3545052371+(V[6]>>>0<W[6]>>>0?1:0)|0,this._b=V[7]>>>0<W[7]>>>0?1:0;for(var F=0;F<8;F++){var L=z[F]+V[F],N=L&65535,D=L>>>16,A=((N*N>>>17)+N*D>>>15)+D*D,B=((L&4294901760)*L|0)+((L&65535)*L|0);K[F]=A^B}z[0]=K[0]+(K[7]<<16|K[7]>>>16)+(K[6]<<16|K[6]>>>16)|0,z[1]=K[1]+(K[0]<<8|K[0]>>>24)+K[7]|0,z[2]=K[2]+(K[1]<<16|K[1]>>>16)+(K[0]<<16|K[0]>>>16)|0,z[3]=K[3]+(K[2]<<8|K[2]>>>24)+K[1]|0,z[4]=K[4]+(K[3]<<16|K[3]>>>16)+(K[2]<<16|K[2]>>>16)|0,z[5]=K[5]+(K[4]<<8|K[4]>>>24)+K[3]|0,z[6]=K[6]+(K[5]<<16|K[5]>>>16)+(K[4]<<16|K[4]>>>16)|0,z[7]=K[7]+(K[6]<<8|K[6]>>>24)+K[5]|0}Y.RabbitLegacy=G._createHelper(Z)}(),$.RabbitLegacy})});var wY1=o((Vn,PY1)=>{(function($,Y,X){if(typeof Vn==="object")PY1.exports=Vn=Y(R8(),ZF(),UF(),fH(),XY());else if(typeof define==="function"&&define.amd)define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],Y);else Y($.CryptoJS)})(Vn,function($){return function(){var Y=$,X=Y.lib,G=X.BlockCipher,J=Y.algo;let Q=16,W=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],K=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,2909710000,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409000,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var Z={pbox:[],sbox:[]};function H(N,D){let A=D>>24&255,B=D>>16&255,O=D>>8&255,E=D&255,M=N.sbox[0][A]+N.sbox[1][B];return M=M^N.sbox[2][O],M=M+N.sbox[3][E],M}function z(N,D,A){let B=D,O=A,E;for(let M=0;M<Q;++M)B=B^N.pbox[M],O=H(N,B)^O,E=B,B=O,O=E;return E=B,B=O,O=E,O=O^N.pbox[Q],B=B^N.pbox[Q+1],{left:B,right:O}}function V(N,D,A){let B=D,O=A,E;for(let M=Q+1;M>1;--M)B=B^N.pbox[M],O=H(N,B)^O,E=B,B=O,O=E;return E=B,B=O,O=E,O=O^N.pbox[1],B=B^N.pbox[0],{left:B,right:O}}function F(N,D,A){for(let R=0;R<4;R++){N.sbox[R]=[];for(let q=0;q<256;q++)N.sbox[R][q]=K[R][q]}let B=0;for(let R=0;R<Q+2;R++)if(N.pbox[R]=W[R]^D[B],B++,B>=A)B=0;let O=0,E=0,M=0;for(let R=0;R<Q+2;R+=2)M=z(N,O,E),O=M.left,E=M.right,N.pbox[R]=O,N.pbox[R+1]=E;for(let R=0;R<4;R++)for(let q=0;q<256;q+=2)M=z(N,O,E),O=M.left,E=M.right,N.sbox[R][q]=O,N.sbox[R][q+1]=E;return!0}var L=J.Blowfish=G.extend({_doReset:function(){if(this._keyPriorReset===this._key)return;var N=this._keyPriorReset=this._key,D=N.words,A=N.sigBytes/4;F(Z,D,A)},encryptBlock:function(N,D){var A=z(Z,N[D],N[D+1]);N[D]=A.left,N[D+1]=A.right},decryptBlock:function(N,D){var A=V(Z,N[D],N[D+1]);N[D]=A.left,N[D+1]=A.right},blockSize:2,keySize:4,ivSize:2});Y.Blowfish=G._createHelper(L)}(),$.Blowfish})});var jY1=o((Fn,_Y1)=>{(function($,Y,X){if(typeof Fn==="object")_Y1.exports=Fn=Y(R8(),Ck(),q71(),w71(),ZF(),T71(),UF(),VZ0(),gi(),v71(),FZ0(),b71(),f71(),m71(),ii(),d71(),fH(),XY(),n71(),a71(),o71(),e71(),YY1(),GY1(),QY1(),KY1(),UY1(),zY1(),FY1(),DY1(),AY1(),OY1(),MY1(),qY1(),wY1());else if(typeof define==="function"&&define.amd)define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./enc-base64url","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy","./blowfish"],Y);else $.CryptoJS=Y($.CryptoJS)})(Fn,function($){return $})});var ok=o((XJ1)=>{Object.defineProperty(XJ1,"__esModule",{value:!0});XJ1.raw=XJ1.format=XJ1.escape=XJ1.arrayToList=XJ1.bufferToString=XJ1.objectToValues=XJ1.escapeId=XJ1.dateToString=void 0;var QU0=A0("buffer"),MF={backtick:/`/g,dot:/\./g,timezone:/([+\-\s])(\d\d):?(\d\d)?/,escapeChars:/[\0\b\t\n\r\x1a"'\\]/g},ao4={"\x00":"\\0","\b":"\\b","\t":"\\t","\n":"\\n","\r":"\\r","\x1A":"\\Z",'"':"\\\"","'":"\\'","\\":"\\\\"},P5={singleQuote:39,backtick:96,backslash:92,dash:45,slash:47,asterisk:42,questionMark:63,newline:10,space:32,tab:9,carriageReturn:13},tG1=($)=>typeof $==="object"&&$!==null&&!Array.isArray($),sG1=($)=>$>=65&&$<=90||$>=97&&$<=122||$>=48&&$<=57||$===95,so4=($)=>$===P5.space||$===P5.tab||$===P5.newline||$===P5.carriageReturn,oo4=($,Y,X)=>{if(Y>=X)return!0;for(let G=Y;G<X;G++){let J=$.charCodeAt(G);if(J!==P5.space&&J!==P5.tab&&J!==P5.newline&&J!==P5.carriageReturn)return!1}return!0},to4=($)=>$|32,GU0=($,Y,X,G)=>{for(let J=0;J<X.length;J++)if(to4($.charCodeAt(Y+J))!==X.charCodeAt(J))return!1;return(Y===0||!sG1($.charCodeAt(Y-1)))&&(Y+X.length>=G||!sG1($.charCodeAt(Y+X.length)))},eG1=($,Y)=>{let X=$.charCodeAt(Y),G=$.charCodeAt(Y+1);if(X===P5.singleQuote){for(let J=Y+1;J<$.length;J++)if($.charCodeAt(J)===P5.backslash)J++;else if($.charCodeAt(J)===P5.singleQuote)return J+1;return $.length}if(X===P5.backtick){let J=$.length;for(let Q=Y+1;Q<J;Q++){if($.charCodeAt(Q)!==P5.backtick)continue;if($.charCodeAt(Q+1)===P5.backtick){Q++;continue}return Q+1}return J}if(X===P5.dash&&G===P5.dash){let J=$.indexOf(`
`,Y+2);return J===-1?$.length:J+1}if(X===P5.slash&&G===P5.asterisk){let J=$.indexOf("*/",Y+2);return J===-1?$.length:J+2}return-1},JU0=($,Y)=>{let X=$.length;for(let G=Y;G<X;G++){let J=$.charCodeAt(G);if(J===P5.questionMark)return G;if(J===P5.singleQuote||J===P5.backtick||J===P5.dash||J===P5.slash){let Q=eG1($,G);if(Q!==-1)G=Q-1}}return-1},oG1=($,Y=0)=>{let X=$.length;for(let G=Y;G<X;G++){let J=$.charCodeAt(G),Q=J|32;if(J===P5.singleQuote||J===P5.backtick||J===P5.dash||J===P5.slash){let W=eG1($,G);if(W!==-1){G=W-1;continue}}if(Q===115&&GU0($,G,"set",X))return G+3;if(Q===107&&GU0($,G,"key",X)){let W=G+3;while(W<X&&so4($.charCodeAt(W)))W++;if(GU0($,W,"update",X))return W+6}}return-1},$J1=($)=>Object.prototype.toString.call($)==="[object Date]",YJ1=($)=>typeof $==="object"&&$!==null&&("toSqlString"in $)&&typeof $.toSqlString==="function",Aq=($)=>{MF.escapeChars.lastIndex=0;let Y=0,X="",G;for(G=MF.escapeChars.exec($);G!==null;G=MF.escapeChars.exec($))X+=$.slice(Y,G.index),X+=ao4[G[0]],Y=MF.escapeChars.lastIndex;if(Y===0)return`'${$}'`;if(Y<$.length)return`'${X}${$.slice(Y)}'`;return`'${X}'`},ak=($)=>$<10?"0"+$:""+$,eo4=($)=>$<10?"00"+$:$<100?"0"+$:""+$,$t4=($)=>$<10?"000"+$:$<100?"00"+$:$<1000?"0"+$:""+$,Yt4=($)=>{if($==="Z")return 0;let Y=$.match(MF.timezone);if(Y)return(Y[1]==="-"?-1:1)*(Number.parseInt(Y[2],10)+(Y[3]?Number.parseInt(Y[3],10):0)/60)*60;return!1},Xt4=($,Y)=>{if(Number.isNaN($.getTime()))return"NULL";let X,G,J,Q,W,K,Z;if(Y==="local")X=$.getFullYear(),G=$.getMonth()+1,J=$.getDate(),Q=$.getHours(),W=$.getMinutes(),K=$.getSeconds(),Z=$.getMilliseconds();else{let H=Yt4(Y),z=$.getTime();if(H!==!1&&H!==0)z+=H*60000;let V=new Date(z);X=V.getUTCFullYear(),G=V.getUTCMonth()+1,J=V.getUTCDate(),Q=V.getUTCHours(),W=V.getUTCMinutes(),K=V.getUTCSeconds(),Z=V.getUTCMilliseconds()}return Aq($t4(X)+"-"+ak(G)+"-"+ak(J)+" "+ak(Q)+":"+ak(W)+":"+ak(K)+"."+eo4(Z))};XJ1.dateToString=Xt4;var Gt4=($,Y)=>{if(Array.isArray($)){let J=$.length,Q=Array(J);for(let W=0;W<J;W++)Q[W]=XJ1.escapeId($[W],Y);return Q.join(", ")}let X=String($),G=X.indexOf("->")!==-1;if(Y||G){if(X.indexOf("`")===-1)return`\`${X}\``;return`\`${X.replace(MF.backtick,"``")}\``}if(X.indexOf("`")===-1&&X.indexOf(".")===-1)return`\`${X}\``;return`\`${X.replace(MF.backtick,"``").replace(MF.dot,"`.`")}\``};XJ1.escapeId=Gt4;var Jt4=($,Y)=>{let X=Object.keys($),G=X.length;if(G===0)return"";let J="";for(let Q=0;Q<G;Q++){let W=X[Q],K=$[W];if(typeof K==="function")continue;if(J.length>0)J+=", ";J+=XJ1.escapeId(W),J+=" = ",J+=XJ1.escape(K,!0,Y)}return J};XJ1.objectToValues=Jt4;var Qt4=($)=>`X${Aq($.toString("hex"))}`;XJ1.bufferToString=Qt4;var Wt4=($,Y)=>{let X=$.length,G=Array(X);for(let J=0;J<X;J++){let Q=$[J];if(Array.isArray(Q))G[J]=`(${XJ1.arrayToList(Q,Y)})`;else G[J]=XJ1.escape(Q,!0,Y)}return G.join(", ")};XJ1.arrayToList=Wt4;var Kt4=($,Y,X)=>{if($===void 0||$===null)return"NULL";switch(typeof $){case"boolean":return $?"true":"false";case"number":case"bigint":return $+"";case"object":{if($J1($))return XJ1.dateToString($,X||"local");if(Array.isArray($))return XJ1.arrayToList($,X);if(QU0.Buffer.isBuffer($))return XJ1.bufferToString($);if($ instanceof Uint8Array)return XJ1.bufferToString(QU0.Buffer.from($));if(YJ1($))return String($.toSqlString());if(!(Y===void 0||Y===null))return Aq(String($));if(tG1($))return XJ1.objectToValues($,X);return Aq(String($))}case"string":return Aq($);default:return Aq(String($))}};XJ1.escape=Kt4;var Zt4=($,Y,X,G)=>{if(Y===void 0||Y===null)return $;let J=Array.isArray(Y)?Y:[Y],Q=J.length,W=-2,K="",Z=0,H=0,z=JU0($,0);while(H<Q&&z!==-1){let V=z+1,F;while($.charCodeAt(V)===63)V++;let L=V-z,N=J[H];if(L>2){z=JU0($,V);continue}if(L===2)F=XJ1.escapeId(N);else if(typeof N==="number")F=`${N}`;else if(typeof N==="object"&&N!==null&&!X){if(W===-2)W=oG1($);if(W!==-1&&W<=z&&oo4($,W,z)&&!YJ1(N)&&!Array.isArray(N)&&!QU0.Buffer.isBuffer(N)&&!(N instanceof Uint8Array)&&!$J1(N)&&tG1(N))F=XJ1.objectToValues(N,G),W=oG1($,V);else F=XJ1.escape(N,!0,G)}else F=XJ1.escape(N,X,G);K+=$.slice(Z,z),K+=F,Z=V,H++,z=JU0($,V)}if(Z===0)return $;if(Z<$.length)return K+$.slice(Z);return K};XJ1.format=Zt4;var Ut4=($)=>{if(typeof $!=="string")throw TypeError("argument sql must be a string");return{toSqlString:()=>$}};XJ1.raw=Ut4});var bK=o((zt4)=>{zt4.LONG_PASSWORD=1;zt4.FOUND_ROWS=2;zt4.LONG_FLAG=4;zt4.CONNECT_WITH_DB=8;zt4.NO_SCHEMA=16;zt4.COMPRESS=32;zt4.ODBC=64;zt4.LOCAL_FILES=128;zt4.IGNORE_SPACE=256;zt4.PROTOCOL_41=512;zt4.INTERACTIVE=1024;zt4.SSL=2048;zt4.IGNORE_SIGPIPE=4096;zt4.TRANSACTIONS=8192;zt4.RESERVED=16384;zt4.SECURE_CONNECTION=32768;zt4.MULTI_STATEMENTS=65536;zt4.MULTI_RESULTS=131072;zt4.PS_MULTI_RESULTS=262144;zt4.PLUGIN_AUTH=524288;zt4.CONNECT_ATTRS=1048576;zt4.PLUGIN_AUTH_LENENC_CLIENT_DATA=2097152;zt4.CAN_HANDLE_EXPIRED_PASSWORDS=4194304;zt4.SESSION_TRACK=8388608;zt4.CLIENT_QUERY_ATTRIBUTES=134217728;zt4.SSL_VERIFY_SERVER_CERT=1073741824;zt4.REMEMBER_OPTIONS=2147483648;zt4.MULTI_FACTOR_AUTHENTICATION=268435456});var RF=o((mt4)=>{mt4.BIG5_CHINESE_CI=1;mt4.LATIN2_CZECH_CS=2;mt4.DEC8_SWEDISH_CI=3;mt4.CP850_GENERAL_CI=4;mt4.LATIN1_GERMAN1_CI=5;mt4.HP8_ENGLISH_CI=6;mt4.KOI8R_GENERAL_CI=7;mt4.LATIN1_SWEDISH_CI=8;mt4.LATIN2_GENERAL_CI=9;mt4.SWE7_SWEDISH_CI=10;mt4.ASCII_GENERAL_CI=11;mt4.UJIS_JAPANESE_CI=12;mt4.SJIS_JAPANESE_CI=13;mt4.CP1251_BULGARIAN_CI=14;mt4.LATIN1_DANISH_CI=15;mt4.HEBREW_GENERAL_CI=16;mt4.TIS620_THAI_CI=18;mt4.EUCKR_KOREAN_CI=19;mt4.LATIN7_ESTONIAN_CS=20;mt4.LATIN2_HUNGARIAN_CI=21;mt4.KOI8U_GENERAL_CI=22;mt4.CP1251_UKRAINIAN_CI=23;mt4.GB2312_CHINESE_CI=24;mt4.GREEK_GENERAL_CI=25;mt4.CP1250_GENERAL_CI=26;mt4.LATIN2_CROATIAN_CI=27;mt4.GBK_CHINESE_CI=28;mt4.CP1257_LITHUANIAN_CI=29;mt4.LATIN5_TURKISH_CI=30;mt4.LATIN1_GERMAN2_CI=31;mt4.ARMSCII8_GENERAL_CI=32;mt4.UTF8_GENERAL_CI=33;mt4.CP1250_CZECH_CS=34;mt4.UCS2_GENERAL_CI=35;mt4.CP866_GENERAL_CI=36;mt4.KEYBCS2_GENERAL_CI=37;mt4.MACCE_GENERAL_CI=38;mt4.MACROMAN_GENERAL_CI=39;mt4.CP852_GENERAL_CI=40;mt4.LATIN7_GENERAL_CI=41;mt4.LATIN7_GENERAL_CS=42;mt4.MACCE_BIN=43;mt4.CP1250_CROATIAN_CI=44;mt4.UTF8MB4_GENERAL_CI=45;mt4.UTF8MB4_BIN=46;mt4.LATIN1_BIN=47;mt4.LATIN1_GENERAL_CI=48;mt4.LATIN1_GENERAL_CS=49;mt4.CP1251_BIN=50;mt4.CP1251_GENERAL_CI=51;mt4.CP1251_GENERAL_CS=52;mt4.MACROMAN_BIN=53;mt4.UTF16_GENERAL_CI=54;mt4.UTF16_BIN=55;mt4.UTF16LE_GENERAL_CI=56;mt4.CP1256_GENERAL_CI=57;mt4.CP1257_BIN=58;mt4.CP1257_GENERAL_CI=59;mt4.UTF32_GENERAL_CI=60;mt4.UTF32_BIN=61;mt4.UTF16LE_BIN=62;mt4.BINARY=63;mt4.ARMSCII8_BIN=64;mt4.ASCII_BIN=65;mt4.CP1250_BIN=66;mt4.CP1256_BIN=67;mt4.CP866_BIN=68;mt4.DEC8_BIN=69;mt4.GREEK_BIN=70;mt4.HEBREW_BIN=71;mt4.HP8_BIN=72;mt4.KEYBCS2_BIN=73;mt4.KOI8R_BIN=74;mt4.KOI8U_BIN=75;mt4.UTF8_TOLOWER_CI=76;mt4.LATIN2_BIN=77;mt4.LATIN5_BIN=78;mt4.LATIN7_BIN=79;mt4.CP850_BIN=80;mt4.CP852_BIN=81;mt4.SWE7_BIN=82;mt4.UTF8_BIN=83;mt4.BIG5_BIN=84;mt4.EUCKR_BIN=85;mt4.GB2312_BIN=86;mt4.GBK_BIN=87;mt4.SJIS_BIN=88;mt4.TIS620_BIN=89;mt4.UCS2_BIN=90;mt4.UJIS_BIN=91;mt4.GEOSTD8_GENERAL_CI=92;mt4.GEOSTD8_BIN=93;mt4.LATIN1_SPANISH_CI=94;mt4.CP932_JAPANESE_CI=95;mt4.CP932_BIN=96;mt4.EUCJPMS_JAPANESE_CI=97;mt4.EUCJPMS_BIN=98;mt4.CP1250_POLISH_CI=99;mt4.UTF16_UNICODE_CI=101;mt4.UTF16_ICELANDIC_CI=102;mt4.UTF16_LATVIAN_CI=103;mt4.UTF16_ROMANIAN_CI=104;mt4.UTF16_SLOVENIAN_CI=105;mt4.UTF16_POLISH_CI=106;mt4.UTF16_ESTONIAN_CI=107;mt4.UTF16_SPANISH_CI=108;mt4.UTF16_SWEDISH_CI=109;mt4.UTF16_TURKISH_CI=110;mt4.UTF16_CZECH_CI=111;mt4.UTF16_DANISH_CI=112;mt4.UTF16_LITHUANIAN_CI=113;mt4.UTF16_SLOVAK_CI=114;mt4.UTF16_SPANISH2_CI=115;mt4.UTF16_ROMAN_CI=116;mt4.UTF16_PERSIAN_CI=117;mt4.UTF16_ESPERANTO_CI=118;mt4.UTF16_HUNGARIAN_CI=119;mt4.UTF16_SINHALA_CI=120;mt4.UTF16_GERMAN2_CI=121;mt4.UTF16_CROATIAN_CI=122;mt4.UTF16_UNICODE_520_CI=123;mt4.UTF16_VIETNAMESE_CI=124;mt4.UCS2_UNICODE_CI=128;mt4.UCS2_ICELANDIC_CI=129;mt4.UCS2_LATVIAN_CI=130;mt4.UCS2_ROMANIAN_CI=131;mt4.UCS2_SLOVENIAN_CI=132;mt4.UCS2_POLISH_CI=133;mt4.UCS2_ESTONIAN_CI=134;mt4.UCS2_SPANISH_CI=135;mt4.UCS2_SWEDISH_CI=136;mt4.UCS2_TURKISH_CI=137;mt4.UCS2_CZECH_CI=138;mt4.UCS2_DANISH_CI=139;mt4.UCS2_LITHUANIAN_CI=140;mt4.UCS2_SLOVAK_CI=141;mt4.UCS2_SPANISH2_CI=142;mt4.UCS2_ROMAN_CI=143;mt4.UCS2_PERSIAN_CI=144;mt4.UCS2_ESPERANTO_CI=145;mt4.UCS2_HUNGARIAN_CI=146;mt4.UCS2_SINHALA_CI=147;mt4.UCS2_GERMAN2_CI=148;mt4.UCS2_CROATIAN_CI=149;mt4.UCS2_UNICODE_520_CI=150;mt4.UCS2_VIETNAMESE_CI=151;mt4.UCS2_GENERAL_MYSQL500_CI=159;mt4.UTF32_UNICODE_CI=160;mt4.UTF32_ICELANDIC_CI=161;mt4.UTF32_LATVIAN_CI=162;mt4.UTF32_ROMANIAN_CI=163;mt4.UTF32_SLOVENIAN_CI=164;mt4.UTF32_POLISH_CI=165;mt4.UTF32_ESTONIAN_CI=166;mt4.UTF32_SPANISH_CI=167;mt4.UTF32_SWEDISH_CI=168;mt4.UTF32_TURKISH_CI=169;mt4.UTF32_CZECH_CI=170;mt4.UTF32_DANISH_CI=171;mt4.UTF32_LITHUANIAN_CI=172;mt4.UTF32_SLOVAK_CI=173;mt4.UTF32_SPANISH2_CI=174;mt4.UTF32_ROMAN_CI=175;mt4.UTF32_PERSIAN_CI=176;mt4.UTF32_ESPERANTO_CI=177;mt4.UTF32_HUNGARIAN_CI=178;mt4.UTF32_SINHALA_CI=179;mt4.UTF32_GERMAN2_CI=180;mt4.UTF32_CROATIAN_CI=181;mt4.UTF32_UNICODE_520_CI=182;mt4.UTF32_VIETNAMESE_CI=183;mt4.UTF8_UNICODE_CI=192;mt4.UTF8_ICELANDIC_CI=193;mt4.UTF8_LATVIAN_CI=194;mt4.UTF8_ROMANIAN_CI=195;mt4.UTF8_SLOVENIAN_CI=196;mt4.UTF8_POLISH_CI=197;mt4.UTF8_ESTONIAN_CI=198;mt4.UTF8_SPANISH_CI=199;mt4.UTF8_SWEDISH_CI=200;mt4.UTF8_TURKISH_CI=201;mt4.UTF8_CZECH_CI=202;mt4.UTF8_DANISH_CI=203;mt4.UTF8_LITHUANIAN_CI=204;mt4.UTF8_SLOVAK_CI=205;mt4.UTF8_SPANISH2_CI=206;mt4.UTF8_ROMAN_CI=207;mt4.UTF8_PERSIAN_CI=208;mt4.UTF8_ESPERANTO_CI=209;mt4.UTF8_HUNGARIAN_CI=210;mt4.UTF8_SINHALA_CI=211;mt4.UTF8_GERMAN2_CI=212;mt4.UTF8_CROATIAN_CI=213;mt4.UTF8_UNICODE_520_CI=214;mt4.UTF8_VIETNAMESE_CI=215;mt4.UTF8_GENERAL_MYSQL500_CI=223;mt4.UTF8MB4_UNICODE_CI=224;mt4.UTF8MB4_ICELANDIC_CI=225;mt4.UTF8MB4_LATVIAN_CI=226;mt4.UTF8MB4_ROMANIAN_CI=227;mt4.UTF8MB4_SLOVENIAN_CI=228;mt4.UTF8MB4_POLISH_CI=229;mt4.UTF8MB4_ESTONIAN_CI=230;mt4.UTF8MB4_SPANISH_CI=231;mt4.UTF8MB4_SWEDISH_CI=232;mt4.UTF8MB4_TURKISH_CI=233;mt4.UTF8MB4_CZECH_CI=234;mt4.UTF8MB4_DANISH_CI=235;mt4.UTF8MB4_LITHUANIAN_CI=236;mt4.UTF8MB4_SLOVAK_CI=237;mt4.UTF8MB4_SPANISH2_CI=238;mt4.UTF8MB4_ROMAN_CI=239;mt4.UTF8MB4_PERSIAN_CI=240;mt4.UTF8MB4_ESPERANTO_CI=241;mt4.UTF8MB4_HUNGARIAN_CI=242;mt4.UTF8MB4_SINHALA_CI=243;mt4.UTF8MB4_GERMAN2_CI=244;mt4.UTF8MB4_CROATIAN_CI=245;mt4.UTF8MB4_UNICODE_520_CI=246;mt4.UTF8MB4_VIETNAMESE_CI=247;mt4.GB18030_CHINESE_CI=248;mt4.GB18030_BIN=249;mt4.GB18030_UNICODE_520_CI=250;mt4.UTF8_GENERAL50_CI=253;mt4.UTF8MB4_0900_AI_CI=255;mt4.UTF8MB4_DE_PB_0900_AI_CI=256;mt4.UTF8MB4_IS_0900_AI_CI=257;mt4.UTF8MB4_LV_0900_AI_CI=258;mt4.UTF8MB4_RO_0900_AI_CI=259;mt4.UTF8MB4_SL_0900_AI_CI=260;mt4.UTF8MB4_PL_0900_AI_CI=261;mt4.UTF8MB4_ET_0900_AI_CI=262;mt4.UTF8MB4_ES_0900_AI_CI=263;mt4.UTF8MB4_SV_0900_AI_CI=264;mt4.UTF8MB4_TR_0900_AI_CI=265;mt4.UTF8MB4_CS_0900_AI_CI=266;mt4.UTF8MB4_DA_0900_AI_CI=267;mt4.UTF8MB4_LT_0900_AI_CI=268;mt4.UTF8MB4_SK_0900_AI_CI=269;mt4.UTF8MB4_ES_TRAD_0900_AI_CI=270;mt4.UTF8MB4_LA_0900_AI_CI=271;mt4.UTF8MB4_EO_0900_AI_CI=273;mt4.UTF8MB4_HU_0900_AI_CI=274;mt4.UTF8MB4_HR_0900_AI_CI=275;mt4.UTF8MB4_VI_0900_AI_CI=277;mt4.UTF8MB4_0900_AS_CS=278;mt4.UTF8MB4_DE_PB_0900_AS_CS=279;mt4.UTF8MB4_IS_0900_AS_CS=280;mt4.UTF8MB4_LV_0900_AS_CS=281;mt4.UTF8MB4_RO_0900_AS_CS=282;mt4.UTF8MB4_SL_0900_AS_CS=283;mt4.UTF8MB4_PL_0900_AS_CS=284;mt4.UTF8MB4_ET_0900_AS_CS=285;mt4.UTF8MB4_ES_0900_AS_CS=286;mt4.UTF8MB4_SV_0900_AS_CS=287;mt4.UTF8MB4_TR_0900_AS_CS=288;mt4.UTF8MB4_CS_0900_AS_CS=289;mt4.UTF8MB4_DA_0900_AS_CS=290;mt4.UTF8MB4_LT_0900_AS_CS=291;mt4.UTF8MB4_SK_0900_AS_CS=292;mt4.UTF8MB4_ES_TRAD_0900_AS_CS=293;mt4.UTF8MB4_LA_0900_AS_CS=294;mt4.UTF8MB4_EO_0900_AS_CS=296;mt4.UTF8MB4_HU_0900_AS_CS=297;mt4.UTF8MB4_HR_0900_AS_CS=298;mt4.UTF8MB4_VI_0900_AS_CS=300;mt4.UTF8MB4_JA_0900_AS_CS=303;mt4.UTF8MB4_JA_0900_AS_CS_KS=304;mt4.UTF8MB4_0900_AS_CI=305;mt4.UTF8MB4_RU_0900_AI_CI=306;mt4.UTF8MB4_RU_0900_AS_CS=307;mt4.UTF8MB4_ZH_0900_AS_CS=308;mt4.UTF8MB4_0900_BIN=309;mt4.BIG5=mt4.BIG5_CHINESE_CI;mt4.DEC8=mt4.DEC8_SWEDISH_CI;mt4.CP850=mt4.CP850_GENERAL_CI;mt4.HP8=mt4.HP8_ENGLISH_CI;mt4.KOI8R=mt4.KOI8R_GENERAL_CI;mt4.LATIN1=mt4.LATIN1_SWEDISH_CI;mt4.LATIN2=mt4.LATIN2_GENERAL_CI;mt4.SWE7=mt4.SWE7_SWEDISH_CI;mt4.ASCII=mt4.ASCII_GENERAL_CI;mt4.UJIS=mt4.UJIS_JAPANESE_CI;mt4.SJIS=mt4.SJIS_JAPANESE_CI;mt4.HEBREW=mt4.HEBREW_GENERAL_CI;mt4.TIS620=mt4.TIS620_THAI_CI;mt4.EUCKR=mt4.EUCKR_KOREAN_CI;mt4.KOI8U=mt4.KOI8U_GENERAL_CI;mt4.GB2312=mt4.GB2312_CHINESE_CI;mt4.GREEK=mt4.GREEK_GENERAL_CI;mt4.CP1250=mt4.CP1250_GENERAL_CI;mt4.GBK=mt4.GBK_CHINESE_CI;mt4.LATIN5=mt4.LATIN5_TURKISH_CI;mt4.ARMSCII8=mt4.ARMSCII8_GENERAL_CI;mt4.UTF8=mt4.UTF8_GENERAL_CI;mt4.UCS2=mt4.UCS2_GENERAL_CI;mt4.CP866=mt4.CP866_GENERAL_CI;mt4.KEYBCS2=mt4.KEYBCS2_GENERAL_CI;mt4.MACCE=mt4.MACCE_GENERAL_CI;mt4.MACROMAN=mt4.MACROMAN_GENERAL_CI;mt4.CP852=mt4.CP852_GENERAL_CI;mt4.LATIN7=mt4.LATIN7_GENERAL_CI;mt4.UTF8MB4=mt4.UTF8MB4_GENERAL_CI;mt4.CP1251=mt4.CP1251_GENERAL_CI;mt4.UTF16=mt4.UTF16_GENERAL_CI;mt4.UTF16LE=mt4.UTF16LE_GENERAL_CI;mt4.CP1256=mt4.CP1256_GENERAL_CI;mt4.CP1257=mt4.CP1257_GENERAL_CI;mt4.UTF32=mt4.UTF32_GENERAL_CI;mt4.CP932=mt4.CP932_JAPANESE_CI;mt4.EUCJPMS=mt4.EUCJPMS_JAPANESE_CI;mt4.GB18030=mt4.GB18030_CHINESE_CI;mt4.GEOSTD8=mt4.GEOSTD8_GENERAL_CI});var lJ1=o((Fz5,c66)=>{c66.exports={name:"mysql2",version:"3.22.3",description:"fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS",main:"index.js",typings:"typings/mysql/index",type:"commonjs",scripts:{lint:"eslint . && prettier --check .","lint:fix":"eslint . --fix && prettier --write .",test:"poku","test:bun":"bun poku","test:deno":"deno run -A npm:poku","test:docker:up":"docker compose -f test/docker-compose.yml up --abort-on-container-exit --remove-orphans","test:docker:down":"docker compose -f test/docker-compose.yml down","test:docker:node":"npm run test:docker:up -- node && npm run test:docker:down","test:docker:bun":"npm run test:docker:up -- bun && npm run test:docker:down","test:docker:deno":"npm run test:docker:up -- deno && npm run test:docker:down","test:docker:coverage":"npm run test:docker:up -- coverage && npm run test:docker:down","test:coverage":"c8 npm test","test:build":"rollup -c",typecheck:'cd "test/tsc-build" && tsc -p "tsconfig.json" && cd .. && tsc -p "tsconfig.json" --noEmit',benchmark:"node ./benchmarks/benchmark.js","wait-port":"wait-on"},repository:{type:"git",url:"git+https://github.com/sidorares/node-mysql2.git"},homepage:"https://sidorares.github.io/node-mysql2/docs",keywords:["mysql","client","server"],files:["lib","typings/mysql","index.js","index.d.ts","promise.js","promise.d.ts"],exports:{".":"./index.js","./package.json":"./package.json","./promise":"./promise.js","./promise.js":"./promise.js"},engines:{node:">= 8.0"},author:"Andrey Sidorov <andrey.sidorov@gmail.com>",license:"MIT",dependencies:{"aws-ssl-profiles":"^1.1.2",denque:"^2.1.0","generate-function":"^2.3.1","iconv-lite":"^0.7.2",long:"^5.3.2","lru.min":"^1.1.4","named-placeholders":"^1.1.6","sql-escaper":"^1.3.3"},peerDependencies:{"@types/node":">= 8"},devDependencies:{"@eslint/eslintrc":"^3.3.3","@eslint/js":"^9.39.2","@eslint/markdown":"^8.0.1","@ianvs/prettier-plugin-sort-imports":"^4.7.1","@pokujs/multi-suite":"^1.0.0","@rollup/plugin-commonjs":"^29.0.2","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^16.0.3","@types/node":"^25.3.0","@typescript-eslint/eslint-plugin":"^8.56.0","@typescript-eslint/parser":"^8.56.0","assert-diff":"^3.0.4",benchmark:"^2.1.4",c8:"^11.0.0","error-stack-parser":"^2.1.4","eslint-config-prettier":"^10.1.8","eslint-plugin-async-await":"^0.0.0","eslint-plugin-prettier":"^5.5.5",globals:"^17.3.0",poku:"^4.1.0",portfinder:"^1.0.38",prettier:"^3.8.1",rollup:"^4.59.0",tsx:"^4.21.0",typescript:"^5.9.3"}}});var rJ1=o((iJ1)=>{Object.defineProperty(iJ1,"__esModule",{value:!0});iJ1.defaults=void 0;iJ1.defaults=[`-----BEGIN CERTIFICATE-----
MIIEEjCCAvqgAwIBAgIJAM2ZN/+nPi27MA0GCSqGSIb3DQEBCwUAMIGVMQswCQYD
VQQGEwJVUzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEi
MCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1h
em9uIFJEUzEmMCQGA1UEAwwdQW1hem9uIFJEUyBhZi1zb3V0aC0xIFJvb3QgQ0Ew
HhcNMTkxMDI4MTgwNTU4WhcNMjQxMDI2MTgwNTU4WjCBlTELMAkGA1UEBhMCVVMx
EDAOBgNVBAcMB1NlYXR0bGUxEzARBgNVBAgMCldhc2hpbmd0b24xIjAgBgNVBAoM
GUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4xEzARBgNVBAsMCkFtYXpvbiBSRFMx
JjAkBgNVBAMMHUFtYXpvbiBSRFMgYWYtc291dGgtMSBSb290IENBMIIBIjANBgkq
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwR2351uPMZaJk2gMGT+1sk8HE9MQh2rc
/sCnbxGn2p1c7Oi9aBbd/GiFijeJb2BXvHU+TOq3d3Jjqepq8tapXVt4ojbTJNyC
J5E7r7KjTktKdLxtBE1MK25aY+IRJjtdU6vG3KiPKUT1naO3xs3yt0F76WVuFivd
9OHv2a+KHvPkRUWIxpmAHuMY9SIIMmEZtVE7YZGx5ah0iO4JzItHcbVR0y0PBH55
arpFBddpIVHCacp1FUPxSEWkOpI7q0AaU4xfX0fe1BV5HZYRKpBOIp1TtZWvJD+X
jGUtL1BEsT5vN5g9MkqdtYrC+3SNpAk4VtpvJrdjraI/hhvfeXNnAwIDAQABo2Mw
YTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUEEi/
WWMcBJsoGXg+EZwkQ0MscZQwHwYDVR0jBBgwFoAUEEi/WWMcBJsoGXg+EZwkQ0Ms
cZQwDQYJKoZIhvcNAQELBQADggEBAGDZ5js5Pc/gC58LJrwMPXFhJDBS8QuDm23C
FFUdlqucskwOS3907ErK1ZkmVJCIqFLArHqskFXMAkRZ2PNR7RjWLqBs+0znG5yH
hRKb4DXzhUFQ18UBRcvT6V6zN97HTRsEEaNhM/7k8YLe7P8vfNZ28VIoJIGGgv9D
wQBBvkxQ71oOmAG0AwaGD0ORGUfbYry9Dz4a4IcUsZyRWRMADixgrFv6VuETp26s
/+z+iqNaGWlELBKh3iQCT6Y/1UnkPLO42bxrCSyOvshdkYN58Q2gMTE1SVTqyo8G
Lw8lLAz9bnvUSgHzB3jRrSx6ggF/WRMRYlR++y6LXP4SAsSAaC0=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEEjCCAvqgAwIBAgIJAJYM4LxvTZA6MA0GCSqGSIb3DQEBCwUAMIGVMQswCQYD
VQQGEwJVUzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEi
MCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1h
em9uIFJEUzEmMCQGA1UEAwwdQW1hem9uIFJEUyBldS1zb3V0aC0xIFJvb3QgQ0Ew
HhcNMTkxMDMwMjAyMDM2WhcNMjQxMDI4MjAyMDM2WjCBlTELMAkGA1UEBhMCVVMx
EDAOBgNVBAcMB1NlYXR0bGUxEzARBgNVBAgMCldhc2hpbmd0b24xIjAgBgNVBAoM
GUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4xEzARBgNVBAsMCkFtYXpvbiBSRFMx
JjAkBgNVBAMMHUFtYXpvbiBSRFMgZXUtc291dGgtMSBSb290IENBMIIBIjANBgkq
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqM921jXCXeqpRNCS9CBPOe5N7gMaEt+D
s5uR3riZbqzRlHGiF1jZihkXfHAIQewDwy+Yz+Oec1aEZCQMhUHxZJPusuX0cJfj
b+UluFqHIijL2TfXJ3D0PVLLoNTQJZ8+GAPECyojAaNuoHbdVqxhOcznMsXIXVFq
yVLKDGvyKkJjai/iSPDrQMXufg3kWt0ISjNLvsG5IFXgP4gttsM8i0yvRd4QcHoo
DjvH7V3cS+CQqW5SnDrGnHToB0RLskE1ET+oNOfeN9PWOxQprMOX/zmJhnJQlTqD
QP7jcf7SddxrKFjuziFiouskJJyNDsMjt1Lf60+oHZhed2ogTeifGwIDAQABo2Mw
YTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUFBAF
cgJe/BBuZiGeZ8STfpkgRYQwHwYDVR0jBBgwFoAUFBAFcgJe/BBuZiGeZ8STfpkg
RYQwDQYJKoZIhvcNAQELBQADggEBAKAYUtlvDuX2UpZW9i1QgsjFuy/ErbW0dLHU
e/IcFtju2z6RLZ+uF+5A8Kme7IKG1hgt8s+w9TRVQS/7ukQzoK3TaN6XKXRosjtc
o9Rm4gYWM8bmglzY1TPNaiI4HC7546hSwJhubjN0bXCuj/0sHD6w2DkiGuwKNAef
yTu5vZhPkeNyXLykxkzz7bNp2/PtMBnzIp+WpS7uUDmWyScGPohKMq5PqvL59z+L
ZI3CYeMZrJ5VpXUg3fNNIz/83N3G0sk7wr0ohs/kHTP7xPOYB0zD7Ku4HA0Q9Swf
WX0qr6UQgTPMjfYDLffI7aEId0gxKw1eGYc6Cq5JAZ3ipi/cBFc=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEEjCCAvqgAwIBAgIJANew34ehz5l8MA0GCSqGSIb3DQEBCwUAMIGVMQswCQYD
VQQGEwJVUzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEi
MCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1h
em9uIFJEUzEmMCQGA1UEAwwdQW1hem9uIFJEUyBtZS1zb3V0aC0xIFJvb3QgQ0Ew
HhcNMTkwNTEwMjE0ODI3WhcNMjQwNTA4MjE0ODI3WjCBlTELMAkGA1UEBhMCVVMx
EDAOBgNVBAcMB1NlYXR0bGUxEzARBgNVBAgMCldhc2hpbmd0b24xIjAgBgNVBAoM
GUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4xEzARBgNVBAsMCkFtYXpvbiBSRFMx
JjAkBgNVBAMMHUFtYXpvbiBSRFMgbWUtc291dGgtMSBSb290IENBMIIBIjANBgkq
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAp7BYV88MukcY+rq0r79+C8UzkT30fEfT
aPXbx1d6M7uheGN4FMaoYmL+JE1NZPaMRIPTHhFtLSdPccInvenRDIatcXX+jgOk
UA6lnHQ98pwN0pfDUyz/Vph4jBR9LcVkBbe0zdoKKp+HGbMPRU0N2yNrog9gM5O8
gkU/3O2csJ/OFQNnj4c2NQloGMUpEmedwJMOyQQfcUyt9CvZDfIPNnheUS29jGSw
ERpJe/AENu8Pxyc72jaXQuD+FEi2Ck6lBkSlWYQFhTottAeGvVFNCzKszCntrtqd
rdYUwurYsLTXDHv9nW2hfDUQa0mhXf9gNDOBIVAZugR9NqNRNyYLHQIDAQABo2Mw
YTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU54cf
DjgwBx4ycBH8+/r8WXdaiqYwHwYDVR0jBBgwFoAU54cfDjgwBx4ycBH8+/r8WXda
iqYwDQYJKoZIhvcNAQELBQADggEBAIIMTSPx/dR7jlcxggr+O6OyY49Rlap2laKA
eC/XI4ySP3vQkIFlP822U9Kh8a9s46eR0uiwV4AGLabcu0iKYfXjPkIprVCqeXV7
ny9oDtrbflyj7NcGdZLvuzSwgl9SYTJp7PVCZtZutsPYlbJrBPHwFABvAkMvRtDB
hitIg4AESDGPoCl94sYHpfDfjpUDMSrAMDUyO6DyBdZH5ryRMAs3lGtsmkkNUrso
aTW6R05681Z0mvkRdb+cdXtKOSuDZPoe2wJJIaz3IlNQNSrB5TImMYgmt6iAsFhv
3vfTSTKrZDNTJn4ybG6pq1zWExoXsktZPylJly6R3RBwV6nwqBM=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBjCCAu6gAwIBAgIJAMc0ZzaSUK51MA0GCSqGSIb3DQEBCwUAMIGPMQswCQYD
VQQGEwJVUzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEi
MCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1h
em9uIFJEUzEgMB4GA1UEAwwXQW1hem9uIFJEUyBSb290IDIwMTkgQ0EwHhcNMTkw
ODIyMTcwODUwWhcNMjQwODIyMTcwODUwWjCBjzELMAkGA1UEBhMCVVMxEDAOBgNV
BAcMB1NlYXR0bGUxEzARBgNVBAgMCldhc2hpbmd0b24xIjAgBgNVBAoMGUFtYXpv
biBXZWIgU2VydmljZXMsIEluYy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxIDAeBgNV
BAMMF0FtYXpvbiBSRFMgUm9vdCAyMDE5IENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEArXnF/E6/Qh+ku3hQTSKPMhQQlCpoWvnIthzX6MK3p5a0eXKZ
oWIjYcNNG6UwJjp4fUXl6glp53Jobn+tWNX88dNH2n8DVbppSwScVE2LpuL+94vY
0EYE/XxN7svKea8YvlrqkUBKyxLxTjh+U/KrGOaHxz9v0l6ZNlDbuaZw3qIWdD/I
6aNbGeRUVtpM6P+bWIoxVl/caQylQS6CEYUk+CpVyJSkopwJlzXT07tMoDL5WgX9
O08KVgDNz9qP/IGtAcRduRcNioH3E9v981QO1zt/Gpb2f8NqAjUUCUZzOnij6mx9
McZ+9cWX88CRzR0vQODWuZscgI08NvM69Fn2SQIDAQABo2MwYTAOBgNVHQ8BAf8E
BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUc19g2LzLA5j0Kxc0LjZa
pmD/vB8wHwYDVR0jBBgwFoAUc19g2LzLA5j0Kxc0LjZapmD/vB8wDQYJKoZIhvcN
AQELBQADggEBAHAG7WTmyjzPRIM85rVj+fWHsLIvqpw6DObIjMWokpliCeMINZFV
ynfgBKsf1ExwbvJNzYFXW6dihnguDG9VMPpi2up/ctQTN8tm9nDKOy08uNZoofMc
NUZxKCEkVKZv+IL4oHoeayt8egtv3ujJM6V14AstMQ6SwvwvA93EP/Ug2e4WAXHu
cbI1NAbUgVDqp+DRdfvZkgYKryjTWd/0+1fS8X1bBZVWzl7eirNVnHbSH2ZDpNuY
0SBd8dj5F6ld3t58ydZbrTHze7JJOd8ijySAp4/kiu9UfZWuTPABzDa/DSdz9Dk/
zPW4CXXvhLmE02TA9/HeCw3KEHIwicNuEfw=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEEDCCAvigAwIBAgIJAKFMXyltvuRdMA0GCSqGSIb3DQEBCwUAMIGUMQswCQYD
VQQGEwJVUzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEi
MCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1h
em9uIFJEUzElMCMGA1UEAwwcQW1hem9uIFJEUyBCZXRhIFJvb3QgMjAxOSBDQTAe
Fw0xOTA4MTkxNzM4MjZaFw0yNDA4MTkxNzM4MjZaMIGUMQswCQYDVQQGEwJVUzEQ
MA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEiMCAGA1UECgwZ
QW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEl
MCMGA1UEAwwcQW1hem9uIFJEUyBCZXRhIFJvb3QgMjAxOSBDQTCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAMkZdnIH9ndatGAcFo+DppGJ1HUt4x+zeO+0
ZZ29m0sfGetVulmTlv2d5b66e+QXZFWpcPQMouSxxYTW08TbrQiZngKr40JNXftA
atvzBqIImD4II0ZX5UEVj2h98qe/ypW5xaDN7fEa5e8FkYB1TEemPaWIbNXqchcL
tV7IJPr3Cd7Z5gZJlmujIVDPpMuSiNaal9/6nT9oqN+JSM1fx5SzrU5ssg1Vp1vv
5Xab64uOg7wCJRB9R2GC9XD04odX6VcxUAGrZo6LR64ZSifupo3l+R5sVOc5i8NH
skdboTzU9H7+oSdqoAyhIU717PcqeDum23DYlPE2nGBWckE+eT8CAwEAAaNjMGEw
DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFK2hDBWl
sbHzt/EHd0QYOooqcFPhMB8GA1UdIwQYMBaAFK2hDBWlsbHzt/EHd0QYOooqcFPh
MA0GCSqGSIb3DQEBCwUAA4IBAQAO/718k8EnOqJDx6wweUscGTGL/QdKXUzTVRAx
JUsjNUv49mH2HQVEW7oxszfH6cPCaupNAddMhQc4C/af6GHX8HnqfPDk27/yBQI+
yBBvIanGgxv9c9wBbmcIaCEWJcsLp3HzXSYHmjiqkViXwCpYfkoV3Ns2m8bp+KCO
y9XmcCKRaXkt237qmoxoh2sGmBHk2UlQtOsMC0aUQ4d7teAJG0q6pbyZEiPyKZY1
XR/UVxMJL0Q4iVpcRS1kaNCMfqS2smbLJeNdsan8pkw1dvPhcaVTb7CvjhJtjztF
YfDzAI5794qMlWxwilKMmUvDlPPOTen8NNHkLwWvyFCH7Doh
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEFjCCAv6gAwIBAgIJAMzYZJ+R9NBVMA0GCSqGSIb3DQEBCwUAMIGXMQswCQYD
VQQGEwJVUzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEi
MCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1h
em9uIFJEUzEoMCYGA1UEAwwfQW1hem9uIFJEUyBQcmV2aWV3IFJvb3QgMjAxOSBD
QTAeFw0xOTA4MjEyMjI5NDlaFw0yNDA4MjEyMjI5NDlaMIGXMQswCQYDVQQGEwJV
UzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEiMCAGA1UE
CgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJE
UzEoMCYGA1UEAwwfQW1hem9uIFJEUyBQcmV2aWV3IFJvb3QgMjAxOSBDQTCCASIw
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM7kkS6vjgKKQTPynC2NjdN5aPPV
O71G0JJS/2ARVBVJd93JLiGovVJilfWYfwZCs4gTRSSjrUD4D4HyqCd6A+eEEtJq
M0DEC7i0dC+9WNTsPszuB206Jy2IUmxZMIKJAA1NHSbIMjB+b6/JhbSUi7nKdbR/
brj83bF+RoSA+ogrgX7mQbxhmFcoZN9OGaJgYKsKWUt5Wqv627KkGodUK8mDepgD
S3ZfoRQRx3iceETpcmHJvaIge6+vyDX3d9Z22jmvQ4AKv3py2CmU2UwuhOltFDwB
0ddtb39vgwrJxaGfiMRHpEP1DfNLWHAnA69/pgZPwIggidS+iBPUhgucMp8CAwEA
AaNjMGEwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
FGnTGpQuQ2H/DZlXMQijZEhjs7TdMB8GA1UdIwQYMBaAFGnTGpQuQ2H/DZlXMQij
ZEhjs7TdMA0GCSqGSIb3DQEBCwUAA4IBAQC3xz1vQvcXAfpcZlngiRWeqU8zQAMQ
LZPCFNv7PVk4pmqX+ZiIRo4f9Zy7TrOVcboCnqmP/b/mNq0gVF4O+88jwXJZD+f8
/RnABMZcnGU+vK0YmxsAtYU6TIb1uhRFmbF8K80HHbj9vSjBGIQdPCbvmR2zY6VJ
BYM+w9U9hp6H4DVMLKXPc1bFlKA5OBTgUtgkDibWJKFOEPW3UOYwp9uq6pFoN0AO
xMTldqWFsOF3bJIlvOY0c/1EFZXu3Ns6/oCP//Ap9vumldYMUZWmbK+gK33FPOXV
8BQ6jNC29icv7lLDpRPwjibJBXX+peDR5UK4FdYcswWEB1Tix5X8dYu6
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwgZUxCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSYwJAYDVQQDDB1BbWF6b24gUkRTIGFmLXNvdXRoLTEgUm9vdCBDQTAeFw0xOTEw
MjgxODA2NTNaFw0yNDEwMjgxODA2NTNaMIGQMQswCQYDVQQGEwJVUzETMBEGA1UE
CAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9u
IFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEhMB8GA1UE
AwwYQW1hem9uIFJEUyBhZi1zb3V0aC0xIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEAvtV1OqmFa8zCVQSKOvPUJERLVFtd4rZmDpImc5rIoeBk7w/P
9lcKUJjO8R/w1a2lJXx3oQ81tiY0Piw6TpT62YWVRMWrOw8+Vxq1dNaDSFp9I8d0
UHillSSbOk6FOrPDp+R6AwbGFqUDebbN5LFFoDKbhNmH1BVS0a6YNKpGigLRqhka
cClPslWtPqtjbaP3Jbxl26zWzLo7OtZl98dR225pq8aApNBwmtgA7Gh60HK/cX0t
32W94n8D+GKSg6R4MKredVFqRTi9hCCNUu0sxYPoELuM+mHiqB5NPjtm92EzCWs+
+vgWhMc6GxG+82QSWx1Vj8sgLqtE/vLrWddf5QIDAQABo2YwZDAOBgNVHQ8BAf8E
BAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUuLB4gYVJrSKJj/Gz
pqc6yeA+RcAwHwYDVR0jBBgwFoAUEEi/WWMcBJsoGXg+EZwkQ0MscZQwDQYJKoZI
hvcNAQELBQADggEBABauYOZxUhe9/RhzGJ8MsWCz8eKcyDVd4FCnY6Qh+9wcmYNT
LtnD88LACtJKb/b81qYzcB0Em6+zVJ3Z9jznfr6buItE6es9wAoja22Xgv44BTHL
rimbgMwpTt3uEMXDffaS0Ww6YWb3pSE0XYI2ISMWz+xRERRf+QqktSaL39zuiaW5
tfZMre+YhohRa/F0ZQl3RCd6yFcLx4UoSPqQsUl97WhYzwAxZZfwvLJXOc4ATt3u
VlCUylNDkaZztDJc/yN5XQoK9W5nOt2cLu513MGYKbuarQr8f+gYU8S+qOyuSRSP
NRITzwCRVnsJE+2JmcRInn/NcanB7uOGqTvJ9+c=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwgZUxCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSYwJAYDVQQDDB1BbWF6b24gUkRTIGV1LXNvdXRoLTEgUm9vdCBDQTAeFw0xOTEw
MzAyMDIxMzBaFw0yNDEwMzAyMDIxMzBaMIGQMQswCQYDVQQGEwJVUzETMBEGA1UE
CAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9u
IFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEhMB8GA1UE
AwwYQW1hem9uIFJEUyBldS1zb3V0aC0xIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEAtEyjYcajx6xImJn8Vz1zjdmL4ANPgQXwF7+tF7xccmNAZETb
bzb3I9i5fZlmrRaVznX+9biXVaGxYzIUIR3huQ3Q283KsDYnVuGa3mk690vhvJbB
QIPgKa5mVwJppnuJm78KqaSpi0vxyCPe3h8h6LLFawVyWrYNZ4okli1/U582eef8
RzJp/Ear3KgHOLIiCdPDF0rjOdCG1MOlDLixVnPn9IYOciqO+VivXBg+jtfc5J+L
AaPm0/Yx4uELt1tkbWkm4BvTU/gBOODnYziITZM0l6Fgwvbwgq5duAtKW+h031lC
37rEvrclqcp4wrsUYcLAWX79ZyKIlRxcAdvEhQIDAQABo2YwZDAOBgNVHQ8BAf8E
BAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQU7zPyc0azQxnBCe7D
b9KAadH1QSEwHwYDVR0jBBgwFoAUFBAFcgJe/BBuZiGeZ8STfpkgRYQwDQYJKoZI
hvcNAQELBQADggEBAFGaNiYxg7yC/xauXPlaqLCtwbm2dKyK9nIFbF/7be8mk7Q3
MOA0of1vGHPLVQLr6bJJpD9MAbUcm4cPAwWaxwcNpxOjYOFDaq10PCK4eRAxZWwF
NJRIRmGsl8NEsMNTMCy8X+Kyw5EzH4vWFl5Uf2bGKOeFg0zt43jWQVOX6C+aL3Cd
pRS5MhmYpxMG8irrNOxf4NVFE2zpJOCm3bn0STLhkDcV/ww4zMzObTJhiIb5wSWn
EXKKWhUXuRt7A2y1KJtXpTbSRHQxE++69Go1tWhXtRiULCJtf7wF2Ksm0RR/AdXT
1uR1vKyH5KBJPX3ppYkQDukoHTFR0CpB+G84NLo=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwgZUxCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSYwJAYDVQQDDB1BbWF6b24gUkRTIG1lLXNvdXRoLTEgUm9vdCBDQTAeFw0xOTA1
MTAyMTU4NDNaFw0yNTA2MDExMjAwMDBaMIGQMQswCQYDVQQGEwJVUzETMBEGA1UE
CAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9u
IFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEhMB8GA1UE
AwwYQW1hem9uIFJEUyBtZS1zb3V0aC0xIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEAudOYPZH+ihJAo6hNYMB5izPVBe3TYhnZm8+X3IoaaYiKtsp1
JJhkTT0CEejYIQ58Fh4QrMUyWvU8qsdK3diNyQRoYLbctsBPgxBR1u07eUJDv38/
C1JlqgHmMnMi4y68Iy7ymv50QgAMuaBqgEBRI1R6Lfbyrb2YvH5txjJyTVMwuCfd
YPAtZVouRz0JxmnfsHyxjE+So56uOKTDuw++Ho4HhZ7Qveej7XB8b+PIPuroknd3
FQB5RVbXRvt5ZcVD4F2fbEdBniF7FAF4dEiofVCQGQ2nynT7dZdEIPfPdH3n7ZmE
lAOmwHQ6G83OsiHRBLnbp+QZRgOsjkHJxT20bQIDAQABo2YwZDAOBgNVHQ8BAf8E
BAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUOEVDM7VomRH4HVdA
QvIMNq2tXOcwHwYDVR0jBBgwFoAU54cfDjgwBx4ycBH8+/r8WXdaiqYwDQYJKoZI
hvcNAQELBQADggEBAHhvMssj+Th8IpNePU6RH0BiL6o9c437R3Q4IEJeFdYL+nZz
PW/rELDPvLRUNMfKM+KzduLZ+l29HahxefejYPXtvXBlq/E/9czFDD4fWXg+zVou
uDXhyrV4kNmP4S0eqsAP/jQHPOZAMFA4yVwO9hlqmePhyDnszCh9c1PfJSBh49+b
4w7i/L3VBOMt8j3EKYvqz0gVfpeqhJwL4Hey8UbVfJRFJMJzfNHpePqtDRAY7yjV
PYquRaV2ab/E+/7VFkWMM4tazYz/qsYA2jSH+4xDHvYk8LnsbcrF9iuidQmEc5sb
FgcWaSKG4DJjcI5k7AJLWcXyTDt21Ci43LE+I9Q=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECDCCAvCgAwIBAgICVIYwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MDQxNzEz
MDRaFw0yNDA4MjIxNzA4NTBaMIGVMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEmMCQGA1UEAwwdQW1h
em9uIFJEUyBhcC1zb3V0aC0xIDIwMTkgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQDUYOz1hGL42yUCrcsMSOoU8AeD/3KgZ4q7gP+vAz1WnY9K/kim
eWN/2Qqzlo3+mxSFQFyD4MyV3+CnCPnBl9Sh1G/F6kThNiJ7dEWSWBQGAB6HMDbC
BaAsmUc1UIz8sLTL3fO+S9wYhA63Wun0Fbm/Rn2yk/4WnJAaMZcEtYf6e0KNa0LM
p/kN/70/8cD3iz3dDR8zOZFpHoCtf0ek80QqTich0A9n3JLxR6g6tpwoYviVg89e
qCjQ4axxOkWWeusLeTJCcY6CkVyFvDAKvcUl1ytM5AiaUkXblE7zDFXRM4qMMRdt
lPm8d3pFxh0fRYk8bIKnpmtOpz3RIctDrZZxAgMBAAGjZjBkMA4GA1UdDwEB/wQE
AwIBBjASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQWBBT99wKJftD3jb4sHoHG
i3uGlH6W6TAfBgNVHSMEGDAWgBRzX2DYvMsDmPQrFzQuNlqmYP+8HzANBgkqhkiG
9w0BAQsFAAOCAQEAZ17hhr3dII3hUfuHQ1hPWGrpJOX/G9dLzkprEIcCidkmRYl+
hu1Pe3caRMh/17+qsoEErmnVq5jNY9X1GZL04IZH8YbHc7iRHw3HcWAdhN8633+K
jYEB2LbJ3vluCGnCejq9djDb6alOugdLMJzxOkHDhMZ6/gYbECOot+ph1tQuZXzD
tZ7prRsrcuPBChHlPjmGy8M9z8u+kF196iNSUGC4lM8vLkHM7ycc1/ZOwRq9aaTe
iOghbQQyAEe03MWCyDGtSmDfr0qEk+CHN+6hPiaL8qKt4s+V9P7DeK4iW08ny8Ox
AVS7u0OK/5+jKMAMrKwpYrBydOjTUTHScocyNw==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBzCCAu+gAwIBAgICQ2QwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MDUxODQ2
MjlaFw0yNDA4MjIxNzA4NTBaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzElMCMGA1UEAwwcQW1h
em9uIFJEUyBzYS1lYXN0LTEgMjAxOSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAMMvR+ReRnOzqJzoaPipNTt1Z2VA968jlN1+SYKUrYM3No+Vpz0H
M6Tn0oYB66ByVsXiGc28ulsqX1HbHsxqDPwvQTKvO7SrmDokoAkjJgLocOLUAeld
5AwvUjxGRP6yY90NV7X786MpnYb2Il9DIIaV9HjCmPt+rjy2CZjS0UjPjCKNfB8J
bFjgW6GGscjeyGb/zFwcom5p4j0rLydbNaOr9wOyQrtt3ZQWLYGY9Zees/b8pmcc
Jt+7jstZ2UMV32OO/kIsJ4rMUn2r/uxccPwAc1IDeRSSxOrnFKhW3Cu69iB3bHp7
JbawY12g7zshE4I14sHjv3QoXASoXjx4xgMCAwEAAaNmMGQwDgYDVR0PAQH/BAQD
AgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFI1Fc/Ql2jx+oJPgBVYq
ccgP0pQ8MB8GA1UdIwQYMBaAFHNfYNi8ywOY9CsXNC42WqZg/7wfMA0GCSqGSIb3
DQEBCwUAA4IBAQB4VVVabVp70myuYuZ3vltQIWqSUMhkaTzehMgGcHjMf9iLoZ/I
93KiFUSGnek5cRePyS9wcpp0fcBT3FvkjpUdCjVtdttJgZFhBxgTd8y26ImdDDMR
4+BUuhI5msvjL08f+Vkkpu1GQcGmyFVPFOy/UY8iefu+QyUuiBUnUuEDd49Hw0Fn
/kIPII6Vj82a2mWV/Q8e+rgN8dIRksRjKI03DEoP8lhPlsOkhdwU6Uz9Vu6NOB2Q
Ls1kbcxAc7cFSyRVJEhh12Sz9d0q/CQSTFsVJKOjSNQBQfVnLz1GwO/IieUEAr4C
jkTntH0r1LX5b/GwN4R887LvjAEdTbg1his7
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECDCCAvCgAwIBAgIDAIkHMA0GCSqGSIb3DQEBCwUAMIGPMQswCQYDVQQGEwJV
UzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEiMCAGA1UE
CgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJE
UzEgMB4GA1UEAwwXQW1hem9uIFJEUyBSb290IDIwMTkgQ0EwHhcNMTkwOTA2MTc0
MDIxWhcNMjQwODIyMTcwODUwWjCBlDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldh
c2hpbmd0b24xEDAOBgNVBAcMB1NlYXR0bGUxIjAgBgNVBAoMGUFtYXpvbiBXZWIg
U2VydmljZXMsIEluYy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxJTAjBgNVBAMMHEFt
YXpvbiBSRFMgdXMtd2VzdC0xIDIwMTkgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQDD2yzbbAl77OofTghDMEf624OvU0eS9O+lsdO0QlbfUfWa1Kd6
0WkgjkLZGfSRxEHMCnrv4UPBSK/Qwn6FTjkDLgemhqBtAnplN4VsoDL+BkRX4Wwq
/dSQJE2b+0hm9w9UMVGFDEq1TMotGGTD2B71eh9HEKzKhGzqiNeGsiX4VV+LJzdH
uM23eGisNqmd4iJV0zcAZ+Gbh2zK6fqTOCvXtm7Idccv8vZZnyk1FiWl3NR4WAgK
AkvWTIoFU3Mt7dIXKKClVmvssG8WHCkd3Xcb4FHy/G756UZcq67gMMTX/9fOFM/v
l5C0+CHl33Yig1vIDZd+fXV1KZD84dEJfEvHAgMBAAGjZjBkMA4GA1UdDwEB/wQE
AwIBBjASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQWBBR+ap20kO/6A7pPxo3+
T3CfqZpQWjAfBgNVHSMEGDAWgBRzX2DYvMsDmPQrFzQuNlqmYP+8HzANBgkqhkiG
9w0BAQsFAAOCAQEAHCJky2tPjPttlDM/RIqExupBkNrnSYnOK4kr9xJ3sl8UF2DA
PAnYsjXp3rfcjN/k/FVOhxwzi3cXJF/2Tjj39Bm/OEfYTOJDNYtBwB0VVH4ffa/6
tZl87jaIkrxJcreeeHqYMnIxeN0b/kliyA+a5L2Yb0VPjt9INq34QDc1v74FNZ17
4z8nr1nzg4xsOWu0Dbjo966lm4nOYIGBRGOKEkHZRZ4mEiMgr3YLkv8gSmeitx57
Z6dVemNtUic/LVo5Iqw4n3TBS0iF2C1Q1xT/s3h+0SXZlfOWttzSluDvoMv5PvCd
pFjNn+aXLAALoihL1MJSsxydtsLjOBro5eK0Vw==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEDDCCAvSgAwIBAgICOFAwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTAxNzQ2
MjFaFw0yNDA4MjIxNzA4NTBaMIGZMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEqMCgGA1UEAwwhQW1h
em9uIFJEUyBhcC1ub3J0aGVhc3QtMiAyMDE5IENBMIIBIjANBgkqhkiG9w0BAQEF
AAOCAQ8AMIIBCgKCAQEAzU72e6XbaJbi4HjJoRNjKxzUEuChKQIt7k3CWzNnmjc5
8I1MjCpa2W1iw1BYVysXSNSsLOtUsfvBZxi/1uyMn5ZCaf9aeoA9UsSkFSZBjOCN
DpKPCmfV1zcEOvJz26+1m8WDg+8Oa60QV0ou2AU1tYcw98fOQjcAES0JXXB80P2s
3UfkNcnDz+l4k7j4SllhFPhH6BQ4lD2NiFAP4HwoG6FeJUn45EPjzrydxjq6v5Fc
cQ8rGuHADVXotDbEhaYhNjIrsPL+puhjWfhJjheEw8c4whRZNp6gJ/b6WEes/ZhZ
h32DwsDsZw0BfRDUMgUn8TdecNexHUw8vQWeC181hwIDAQABo2YwZDAOBgNVHQ8B
Af8EBAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUwW9bWgkWkr0U
lrOsq2kvIdrECDgwHwYDVR0jBBgwFoAUc19g2LzLA5j0Kxc0LjZapmD/vB8wDQYJ
KoZIhvcNAQELBQADggEBAEugF0Gj7HVhX0ehPZoGRYRt3PBuI2YjfrrJRTZ9X5wc
9T8oHmw07mHmNy1qqWvooNJg09bDGfB0k5goC2emDiIiGfc/kvMLI7u+eQOoMKj6
mkfCncyRN3ty08Po45vTLBFZGUvtQmjM6yKewc4sXiASSBmQUpsMbiHRCL72M5qV
obcJOjGcIdDTmV1BHdWT+XcjynsGjUqOvQWWhhLPrn4jWe6Xuxll75qlrpn3IrIx
CRBv/5r7qbcQJPOgwQsyK4kv9Ly8g7YT1/vYBlR3cRsYQjccw5ceWUj2DrMVWhJ4
prf+E3Aa4vYmLLOUUvKnDQ1k3RGNu56V0tonsQbfsaM=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECjCCAvKgAwIBAgICEzUwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTAyMDUy
MjVaFw0yNDA4MjIxNzA4NTBaMIGXMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEoMCYGA1UEAwwfQW1h
em9uIFJEUyBjYS1jZW50cmFsLTEgMjAxOSBDQTCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBAOxHqdcPSA2uBjsCP4DLSlqSoPuQ/X1kkJLusVRKiQE2zayB
viuCBt4VB9Qsh2rW3iYGM+usDjltGnI1iUWA5KHcvHszSMkWAOYWLiMNKTlg6LCp
XnE89tvj5dIH6U8WlDvXLdjB/h30gW9JEX7S8supsBSci2GxEzb5mRdKaDuuF/0O
qvz4YE04pua3iZ9QwmMFuTAOYzD1M72aOpj+7Ac+YLMM61qOtU+AU6MndnQkKoQi
qmUN2A9IFaqHFzRlSdXwKCKUA4otzmz+/N3vFwjb5F4DSsbsrMfjeHMo6o/nb6Nh
YDb0VJxxPee6TxSuN7CQJ2FxMlFUezcoXqwqXD0CAwEAAaNmMGQwDgYDVR0PAQH/
BAQDAgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFDGGpon9WfIpsggE
CxHq8hZ7E2ESMB8GA1UdIwQYMBaAFHNfYNi8ywOY9CsXNC42WqZg/7wfMA0GCSqG
SIb3DQEBCwUAA4IBAQAvpeQYEGZvoTVLgV9rd2+StPYykMsmFjWQcyn3dBTZRXC2
lKq7QhQczMAOhEaaN29ZprjQzsA2X/UauKzLR2Uyqc2qOeO9/YOl0H3qauo8C/W9
r8xqPbOCDLEXlOQ19fidXyyEPHEq5WFp8j+fTh+s8WOx2M7IuC0ANEetIZURYhSp
xl9XOPRCJxOhj7JdelhpweX0BJDNHeUFi0ClnFOws8oKQ7sQEv66d5ddxqqZ3NVv
RbCvCtEutQMOUMIuaygDlMn1anSM8N7Wndx8G6+Uy67AnhjGx7jw/0YPPxopEj6x
JXP8j0sJbcT9K/9/fPVLNT25RvQ/93T2+IQL4Ca2
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBzCCAu+gAwIBAgICYpgwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTExNzMx
NDhaFw0yNDA4MjIxNzA4NTBaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzElMCMGA1UEAwwcQW1h
em9uIFJEUyBldS13ZXN0LTEgMjAxOSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAMk3YdSZ64iAYp6MyyKtYJtNzv7zFSnnNf6vv0FB4VnfITTMmOyZ
LXqKAT2ahZ00hXi34ewqJElgU6eUZT/QlzdIu359TEZyLVPwURflL6SWgdG01Q5X
O++7fSGcBRyIeuQWs9FJNIIqK8daF6qw0Rl5TXfu7P9dBc3zkgDXZm2DHmxGDD69
7liQUiXzoE1q2Z9cA8+jirDioJxN9av8hQt12pskLQumhlArsMIhjhHRgF03HOh5
tvi+RCfihVOxELyIRTRpTNiIwAqfZxxTWFTgfn+gijTmd0/1DseAe82aYic8JbuS
EMbrDduAWsqrnJ4GPzxHKLXX0JasCUcWyMECAwEAAaNmMGQwDgYDVR0PAQH/BAQD
AgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFPLtsq1NrwJXO13C9eHt
sLY11AGwMB8GA1UdIwQYMBaAFHNfYNi8ywOY9CsXNC42WqZg/7wfMA0GCSqGSIb3
DQEBCwUAA4IBAQAnWBKj5xV1A1mYd0kIgDdkjCwQkiKF5bjIbGkT3YEFFbXoJlSP
0lZZ/hDaOHI8wbLT44SzOvPEEmWF9EE7SJzkvSdQrUAWR9FwDLaU427ALI3ngNHy
lGJ2hse1fvSRNbmg8Sc9GBv8oqNIBPVuw+AJzHTacZ1OkyLZrz1c1QvwvwN2a+Jd
vH0V0YIhv66llKcYDMUQJAQi4+8nbRxXWv6Gq3pvrFoorzsnkr42V3JpbhnYiK+9
nRKd4uWl62KRZjGkfMbmsqZpj2fdSWMY1UGyN1k+kDmCSWYdrTRDP0xjtIocwg+A
J116n4hV/5mbA0BaPiS2krtv17YAeHABZcvz
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECjCCAvKgAwIBAgICV2YwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTExOTM2
MjBaFw0yNDA4MjIxNzA4NTBaMIGXMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEoMCYGA1UEAwwfQW1h
em9uIFJEUyBldS1jZW50cmFsLTEgMjAxOSBDQTCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBAMEx54X2pHVv86APA0RWqxxRNmdkhAyp2R1cFWumKQRofoFv
n+SPXdkpIINpMuEIGJANozdiEz7SPsrAf8WHyD93j/ZxrdQftRcIGH41xasetKGl
I67uans8d+pgJgBKGb/Z+B5m+UsIuEVekpvgpwKtmmaLFC/NCGuSsJoFsRqoa6Gh
m34W6yJoY87UatddCqLY4IIXaBFsgK9Q/wYzYLbnWM6ZZvhJ52VMtdhcdzeTHNW0
5LGuXJOF7Ahb4JkEhoo6TS2c0NxB4l4MBfBPgti+O7WjR3FfZHpt18A6Zkq6A2u6
D/oTSL6c9/3sAaFTFgMyL3wHb2YlW0BPiljZIqECAwEAAaNmMGQwDgYDVR0PAQH/
BAQDAgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFOcAToAc6skWffJa
TnreaswAfrbcMB8GA1UdIwQYMBaAFHNfYNi8ywOY9CsXNC42WqZg/7wfMA0GCSqG
SIb3DQEBCwUAA4IBAQA1d0Whc1QtspK496mFWfFEQNegLh0a9GWYlJm+Htcj5Nxt
DAIGXb+8xrtOZFHmYP7VLCT5Zd2C+XytqseK/+s07iAr0/EPF+O2qcyQWMN5KhgE
cXw2SwuP9FPV3i+YAm11PBVeenrmzuk9NrdHQ7TxU4v7VGhcsd2C++0EisrmquWH
mgIfmVDGxphwoES52cY6t3fbnXmTkvENvR+h3rj+fUiSz0aSo+XZUGHPgvuEKM/W
CBD9Smc9CBoBgvy7BgHRgRUmwtABZHFUIEjHI5rIr7ZvYn+6A0O6sogRfvVYtWFc
qpyrW1YX8mD0VlJ8fGKM3G+aCOsiiPKDV/Uafrm+
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECDCCAvCgAwIBAgICGAcwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTIxODE5
NDRaFw0yNDA4MjIxNzA4NTBaMIGVMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEmMCQGA1UEAwwdQW1h
em9uIFJEUyBldS1ub3J0aC0xIDIwMTkgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQCiIYnhe4UNBbdBb/nQxl5giM0XoVHWNrYV5nB0YukA98+TPn9v
Aoj1RGYmtryjhrf01Kuv8SWO+Eom95L3zquoTFcE2gmxCfk7bp6qJJ3eHOJB+QUO
XsNRh76fwDzEF1yTeZWH49oeL2xO13EAx4PbZuZpZBttBM5zAxgZkqu4uWQczFEs
JXfla7z2fvWmGcTagX10O5C18XaFroV0ubvSyIi75ue9ykg/nlFAeB7O0Wxae88e
uhiBEFAuLYdqWnsg3459NfV8Yi1GnaitTym6VI3tHKIFiUvkSiy0DAlAGV2iiyJE
q+DsVEO4/hSINJEtII4TMtysOsYPpINqeEzRAgMBAAGjZjBkMA4GA1UdDwEB/wQE
AwIBBjASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQWBBRR0UpnbQyjnHChgmOc
hnlc0PogzTAfBgNVHSMEGDAWgBRzX2DYvMsDmPQrFzQuNlqmYP+8HzANBgkqhkiG
9w0BAQsFAAOCAQEAKJD4xVzSf4zSGTBJrmamo86jl1NHQxXUApAZuBZEc8tqC6TI
T5CeoSr9CMuVC8grYyBjXblC4OsM5NMvmsrXl/u5C9dEwtBFjo8mm53rOOIm1fxl
I1oYB/9mtO9ANWjkykuLzWeBlqDT/i7ckaKwalhLODsRDO73vRhYNjsIUGloNsKe
pxw3dzHwAZx4upSdEVG4RGCZ1D0LJ4Gw40OfD69hfkDfRVVxKGrbEzqxXRvovmDc
tKLdYZO/6REoca36v4BlgIs1CbUXJGLSXUwtg7YXGLSVBJ/U0+22iGJmBSNcoyUN
cjPFD9JQEhDDIYYKSGzIYpvslvGc4T5ISXFiuQ==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBzCCAu+gAwIBAgICZIEwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTIyMTMy
MzJaFw0yNDA4MjIxNzA4NTBaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzElMCMGA1UEAwwcQW1h
em9uIFJEUyBldS13ZXN0LTIgMjAxOSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBALGiwqjiF7xIjT0Sx7zB3764K2T2a1DHnAxEOr+/EIftWKxWzT3u
PFwS2eEZcnKqSdRQ+vRzonLBeNLO4z8aLjQnNbkizZMBuXGm4BqRm1Kgq3nlLDQn
7YqdijOq54SpShvR/8zsO4sgMDMmHIYAJJOJqBdaus2smRt0NobIKc0liy7759KB
6kmQ47Gg+kfIwxrQA5zlvPLeQImxSoPi9LdbRoKvu7Iot7SOa+jGhVBh3VdqndJX
7tm/saj4NE375csmMETFLAOXjat7zViMRwVorX4V6AzEg1vkzxXpA9N7qywWIT5Y
fYaq5M8i6vvLg0CzrH9fHORtnkdjdu1y+0MCAwEAAaNmMGQwDgYDVR0PAQH/BAQD
AgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFFOhOx1yt3Z7mvGB9jBv
2ymdZwiOMB8GA1UdIwQYMBaAFHNfYNi8ywOY9CsXNC42WqZg/7wfMA0GCSqGSIb3
DQEBCwUAA4IBAQBehqY36UGDvPVU9+vtaYGr38dBbp+LzkjZzHwKT1XJSSUc2wqM
hnCIQKilonrTIvP1vmkQi8qHPvDRtBZKqvz/AErW/ZwQdZzqYNFd+BmOXaeZWV0Q
oHtDzXmcwtP8aUQpxN0e1xkWb1E80qoy+0uuRqb/50b/R4Q5qqSfJhkn6z8nwB10
7RjLtJPrK8igxdpr3tGUzfAOyiPrIDncY7UJaL84GFp7WWAkH0WG3H8Y8DRcRXOU
mqDxDLUP3rNuow3jnGxiUY+gGX5OqaZg4f4P6QzOSmeQYs6nLpH0PiN00+oS1BbD
bpWdZEttILPI+vAYkU4QuBKKDjJL6HbSd+cn
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECDCCAvCgAwIBAgIDAIVCMA0GCSqGSIb3DQEBCwUAMIGPMQswCQYDVQQGEwJV
UzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEiMCAGA1UE
CgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJE
UzEgMB4GA1UEAwwXQW1hem9uIFJEUyBSb290IDIwMTkgQ0EwHhcNMTkwOTEzMTcw
NjQxWhcNMjQwODIyMTcwODUwWjCBlDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldh
c2hpbmd0b24xEDAOBgNVBAcMB1NlYXR0bGUxIjAgBgNVBAoMGUFtYXpvbiBXZWIg
U2VydmljZXMsIEluYy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxJTAjBgNVBAMMHEFt
YXpvbiBSRFMgdXMtZWFzdC0yIDIwMTkgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQDE+T2xYjUbxOp+pv+gRA3FO24+1zCWgXTDF1DHrh1lsPg5k7ht
2KPYzNc+Vg4E+jgPiW0BQnA6jStX5EqVh8BU60zELlxMNvpg4KumniMCZ3krtMUC
au1NF9rM7HBh+O+DYMBLK5eSIVt6lZosOb7bCi3V6wMLA8YqWSWqabkxwN4w0vXI
8lu5uXXFRemHnlNf+yA/4YtN4uaAyd0ami9+klwdkZfkrDOaiy59haOeBGL8EB/c
dbJJlguHH5CpCscs3RKtOOjEonXnKXldxarFdkMzi+aIIjQ8GyUOSAXHtQHb3gZ4
nS6Ey0CMlwkB8vUObZU9fnjKJcL5QCQqOfwvAgMBAAGjZjBkMA4GA1UdDwEB/wQE
AwIBBjASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQWBBQUPuRHohPxx4VjykmH
6usGrLL1ETAfBgNVHSMEGDAWgBRzX2DYvMsDmPQrFzQuNlqmYP+8HzANBgkqhkiG
9w0BAQsFAAOCAQEAUdR9Vb3y33Yj6X6KGtuthZ08SwjImVQPtknzpajNE5jOJAh8
quvQnU9nlnMO85fVDU1Dz3lLHGJ/YG1pt1Cqq2QQ200JcWCvBRgdvH6MjHoDQpqZ
HvQ3vLgOGqCLNQKFuet9BdpsHzsctKvCVaeBqbGpeCtt3Hh/26tgx0rorPLw90A2
V8QSkZJjlcKkLa58N5CMM8Xz8KLWg3MZeT4DmlUXVCukqK2RGuP2L+aME8dOxqNv
OnOz1zrL5mR2iJoDpk8+VE/eBDmJX40IJk6jBjWoxAO/RXq+vBozuF5YHN1ujE92
tO8HItgTp37XT8bJBAiAnt5mxw+NLSqtxk2QdQ==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEDDCCAvSgAwIBAgICY4kwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTMyMDEx
NDJaFw0yNDA4MjIxNzA4NTBaMIGZMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEqMCgGA1UEAwwhQW1h
em9uIFJEUyBhcC1zb3V0aGVhc3QtMSAyMDE5IENBMIIBIjANBgkqhkiG9w0BAQEF
AAOCAQ8AMIIBCgKCAQEAr5u9OuLL/OF/fBNUX2kINJLzFl4DnmrhnLuSeSnBPgbb
qddjf5EFFJBfv7IYiIWEFPDbDG5hoBwgMup5bZDbas+ZTJTotnnxVJTQ6wlhTmns
eHECcg2pqGIKGrxZfbQhlj08/4nNAPvyYCTS0bEcmQ1emuDPyvJBYDDLDU6AbCB5
6Z7YKFQPTiCBblvvNzchjLWF9IpkqiTsPHiEt21sAdABxj9ityStV3ja/W9BfgxH
wzABSTAQT6FbDwmQMo7dcFOPRX+hewQSic2Rn1XYjmNYzgEHisdUsH7eeXREAcTw
61TRvaLH8AiOWBnTEJXPAe6wYfrcSd1pD0MXpoB62wIDAQABo2YwZDAOBgNVHQ8B
Af8EBAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUytwMiomQOgX5
Ichd+2lDWRUhkikwHwYDVR0jBBgwFoAUc19g2LzLA5j0Kxc0LjZapmD/vB8wDQYJ
KoZIhvcNAQELBQADggEBACf6lRDpfCD7BFRqiWM45hqIzffIaysmVfr+Jr+fBTjP
uYe/ba1omSrNGG23bOcT9LJ8hkQJ9d+FxUwYyICQNWOy6ejicm4z0C3VhphbTPqj
yjpt9nG56IAcV8BcRJh4o/2IfLNzC/dVuYJV8wj7XzwlvjysenwdrJCoLadkTr1h
eIdG6Le07sB9IxrGJL9e04afk37h7c8ESGSE4E+oS4JQEi3ATq8ne1B9DQ9SasXi
IRmhNAaISDzOPdyLXi9N9V9Lwe/DHcja7hgLGYx3UqfjhLhOKwp8HtoZORixAmOI
HfILgNmwyugAbuZoCazSKKBhQ0wgO0WZ66ZKTMG8Oho=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBzCCAu+gAwIBAgICUYkwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTYxODIx
MTVaFw0yNDA4MjIxNzA4NTBaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzElMCMGA1UEAwwcQW1h
em9uIFJEUyB1cy13ZXN0LTIgMjAxOSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBANCEZBZyu6yJQFZBJmSUZfSZd3Ui2gitczMKC4FLr0QzkbxY+cLa
uVONIOrPt4Rwi+3h/UdnUg917xao3S53XDf1TDMFEYp4U8EFPXqCn/GXBIWlU86P
PvBN+gzw3nS+aco7WXb+woTouvFVkk8FGU7J532llW8o/9ydQyDIMtdIkKTuMfho
OiNHSaNc+QXQ32TgvM9A/6q7ksUoNXGCP8hDOkSZ/YOLiI5TcdLh/aWj00ziL5bj
pvytiMZkilnc9dLY9QhRNr0vGqL0xjmWdoEXz9/OwjmCihHqJq+20MJPsvFm7D6a
2NKybR9U+ddrjb8/iyLOjURUZnj5O+2+OPcCAwEAAaNmMGQwDgYDVR0PAQH/BAQD
AgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFEBxMBdv81xuzqcK5TVu
pHj+Aor8MB8GA1UdIwQYMBaAFHNfYNi8ywOY9CsXNC42WqZg/7wfMA0GCSqGSIb3
DQEBCwUAA4IBAQBZkfiVqGoJjBI37aTlLOSjLcjI75L5wBrwO39q+B4cwcmpj58P
3sivv+jhYfAGEbQnGRzjuFoyPzWnZ1DesRExX+wrmHsLLQbF2kVjLZhEJMHF9eB7
GZlTPdTzHErcnuXkwA/OqyXMpj9aghcQFuhCNguEfnROY9sAoK2PTfnTz9NJHL+Q
UpDLEJEUfc0GZMVWYhahc0x38ZnSY2SKacIPECQrTI0KpqZv/P+ijCEcMD9xmYEb
jL4en+XKS1uJpw5fIU5Sj0MxhdGstH6S84iAE5J3GM3XHklGSFwwqPYvuTXvANH6
uboynxRgSae59jIlAK6Jrr6GWMwQRbgcaAlW
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEDDCCAvSgAwIBAgICEkYwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTYxOTUz
NDdaFw0yNDA4MjIxNzA4NTBaMIGZMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEqMCgGA1UEAwwhQW1h
em9uIFJEUyBhcC1zb3V0aGVhc3QtMiAyMDE5IENBMIIBIjANBgkqhkiG9w0BAQEF
AAOCAQ8AMIIBCgKCAQEAufodI2Flker8q7PXZG0P0vmFSlhQDw907A6eJuF/WeMo
GHnll3b4S6nC3oRS3nGeRMHbyU2KKXDwXNb3Mheu+ox+n5eb/BJ17eoj9HbQR1cd
gEkIciiAltf8gpMMQH4anP7TD+HNFlZnP7ii3geEJB2GGXSxgSWvUzH4etL67Zmn
TpGDWQMB0T8lK2ziLCMF4XAC/8xDELN/buHCNuhDpxpPebhct0T+f6Arzsiswt2j
7OeNeLLZwIZvVwAKF7zUFjC6m7/VmTQC8nidVY559D6l0UhhU0Co/txgq3HVsMOH
PbxmQUwJEKAzQXoIi+4uZzHFZrvov/nDTNJUhC6DqwIDAQABo2YwZDAOBgNVHQ8B
Af8EBAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUwaZpaCme+EiV
M5gcjeHZSTgOn4owHwYDVR0jBBgwFoAUc19g2LzLA5j0Kxc0LjZapmD/vB8wDQYJ
KoZIhvcNAQELBQADggEBAAR6a2meCZuXO2TF9bGqKGtZmaah4pH2ETcEVUjkvXVz
sl+ZKbYjrun+VkcMGGKLUjS812e7eDF726ptoku9/PZZIxlJB0isC/0OyixI8N4M
NsEyvp52XN9QundTjkl362bomPnHAApeU0mRbMDRR2JdT70u6yAzGLGsUwMkoNnw
1VR4XKhXHYGWo7KMvFrZ1KcjWhubxLHxZWXRulPVtGmyWg/MvE6KF+2XMLhojhUL
+9jB3Fpn53s6KMx5tVq1x8PukHmowcZuAF8k+W4gk8Y68wIwynrdZrKRyRv6CVtR
FZ8DeJgoNZT3y/GT254VqMxxfuy2Ccb/RInd16tEvVk=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEDDCCAvSgAwIBAgICOYIwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTcyMDA1
MjlaFw0yNDA4MjIxNzA4NTBaMIGZMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEqMCgGA1UEAwwhQW1h
em9uIFJEUyBhcC1ub3J0aGVhc3QtMyAyMDE5IENBMIIBIjANBgkqhkiG9w0BAQEF
AAOCAQ8AMIIBCgKCAQEA4dMak8W+XW8y/2F6nRiytFiA4XLwePadqWebGtlIgyCS
kbug8Jv5w7nlMkuxOxoUeD4WhI6A9EkAn3r0REM/2f0aYnd2KPxeqS2MrtdxxHw1
xoOxk2x0piNSlOz6yog1idsKR5Wurf94fvM9FdTrMYPPrDabbGqiBMsZZmoHLvA3
Z+57HEV2tU0Ei3vWeGIqnNjIekS+E06KhASxrkNU5vi611UsnYZlSi0VtJsH4UGV
LhnHl53aZL0YFO5mn/fzuNG/51qgk/6EFMMhaWInXX49Dia9FnnuWXwVwi6uX1Wn
7kjoHi5VtmC8ZlGEHroxX2DxEr6bhJTEpcLMnoQMqwIDAQABo2YwZDAOBgNVHQ8B
Af8EBAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUsUI5Cb3SWB8+
gv1YLN/ABPMdxSAwHwYDVR0jBBgwFoAUc19g2LzLA5j0Kxc0LjZapmD/vB8wDQYJ
KoZIhvcNAQELBQADggEBAJAF3E9PM1uzVL8YNdzb6fwJrxxqI2shvaMVmC1mXS+w
G0zh4v2hBZOf91l1EO0rwFD7+fxoI6hzQfMxIczh875T6vUXePKVOCOKI5wCrDad
zQbVqbFbdhsBjF4aUilOdtw2qjjs9JwPuB0VXN4/jY7m21oKEOcnpe36+7OiSPjN
xngYewCXKrSRqoj3mw+0w/+exYj3Wsush7uFssX18av78G+ehKPIVDXptOCP/N7W
8iKVNeQ2QGTnu2fzWsGUSvMGyM7yqT+h1ILaT//yQS8er511aHMLc142bD4D9VSy
DgactwPDTShK/PXqhvNey9v/sKXm4XatZvwcc8KYlW4=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEDDCCAvSgAwIBAgICcEUwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTgxNjU2
MjBaFw0yNDA4MjIxNzA4NTBaMIGZMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzEqMCgGA1UEAwwhQW1h
em9uIFJEUyBhcC1ub3J0aGVhc3QtMSAyMDE5IENBMIIBIjANBgkqhkiG9w0BAQEF
AAOCAQ8AMIIBCgKCAQEAndtkldmHtk4TVQAyqhAvtEHSMb6pLhyKrIFved1WO3S7
+I+bWwv9b2W/ljJxLq9kdT43bhvzonNtI4a1LAohS6bqyirmk8sFfsWT3akb+4Sx
1sjc8Ovc9eqIWJCrUiSvv7+cS7ZTA9AgM1PxvHcsqrcUXiK3Jd/Dax9jdZE1e15s
BEhb2OEPE+tClFZ+soj8h8Pl2Clo5OAppEzYI4LmFKtp1X/BOf62k4jviXuCSst3
UnRJzE/CXtjmN6oZySVWSe0rQYuyqRl6//9nK40cfGKyxVnimB8XrrcxUN743Vud
QQVU0Esm8OVTX013mXWQXJHP2c0aKkog8LOga0vobQIDAQABo2YwZDAOBgNVHQ8B
Af8EBAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQULmoOS1mFSjj+
snUPx4DgS3SkLFYwHwYDVR0jBBgwFoAUc19g2LzLA5j0Kxc0LjZapmD/vB8wDQYJ
KoZIhvcNAQELBQADggEBAAkVL2P1M2/G9GM3DANVAqYOwmX0Xk58YBHQu6iiQg4j
b4Ky/qsZIsgT7YBsZA4AOcPKQFgGTWhe9pvhmXqoN3RYltN8Vn7TbUm/ZVDoMsrM
gwv0+TKxW1/u7s8cXYfHPiTzVSJuOogHx99kBW6b2f99GbP7O1Sv3sLq4j6lVvBX
Fiacf5LAWC925nvlTzLlBgIc3O9xDtFeAGtZcEtxZJ4fnGXiqEnN4539+nqzIyYq
nvlgCzyvcfRAxwltrJHuuRu6Maw5AGcd2Y0saMhqOVq9KYKFKuD/927BTrbd2JVf
2sGWyuPZPCk3gq+5pCjbD0c6DkhcMGI6WwxvM5V/zSM=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBzCCAu+gAwIBAgICJDQwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTgxNzAz
MTVaFw0yNDA4MjIxNzA4NTBaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzElMCMGA1UEAwwcQW1h
em9uIFJEUyBldS13ZXN0LTMgMjAxOSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAL9bL7KE0n02DLVtlZ2PL+g/BuHpMYFq2JnE2RgompGurDIZdjmh
1pxfL3nT+QIVMubuAOy8InRfkRxfpxyjKYdfLJTPJG+jDVL+wDcPpACFVqoV7Prg
pVYEV0lc5aoYw4bSeYFhdzgim6F8iyjoPnObjll9mo4XsHzSoqJLCd0QC+VG9Fw2
q+GDRZrLRmVM2oNGDRbGpGIFg77aRxRapFZa8SnUgs2AqzuzKiprVH5i0S0M6dWr
i+kk5epmTtkiDHceX+dP/0R1NcnkCPoQ9TglyXyPdUdTPPRfKCq12dftqll+u4mV
ARdN6WFjovxax8EAP2OAUTi1afY+1JFMj+sCAwEAAaNmMGQwDgYDVR0PAQH/BAQD
AgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFLfhrbrO5exkCVgxW0x3
Y2mAi8lNMB8GA1UdIwQYMBaAFHNfYNi8ywOY9CsXNC42WqZg/7wfMA0GCSqGSIb3
DQEBCwUAA4IBAQAigQ5VBNGyw+OZFXwxeJEAUYaXVoP/qrhTOJ6mCE2DXUVEoJeV
SxScy/TlFA9tJXqmit8JH8VQ/xDL4ubBfeMFAIAo4WzNWDVoeVMqphVEcDWBHsI1
AETWzfsapRS9yQekOMmxg63d/nV8xewIl8aNVTHdHYXMqhhik47VrmaVEok1UQb3
O971RadLXIEbVd9tjY5bMEHm89JsZDnDEw1hQXBb67Elu64OOxoKaHBgUH8AZn/2
zFsL1ynNUjOhCSAA15pgd1vjwc0YsBbAEBPcHBWYBEyME6NLNarjOzBl4FMtATSF
wWCKRGkvqN8oxYhwR2jf2rR5Mu4DWkK5Q8Ep
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBzCCAu+gAwIBAgICJVUwDQYJKoZIhvcNAQELBQAwgY8xCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSAwHgYDVQQDDBdBbWF6b24gUkRTIFJvb3QgMjAxOSBDQTAeFw0xOTA5MTkxODE2
NTNaFw0yNDA4MjIxNzA4NTBaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECAwKV2Fz
aGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEiMCAGA1UECgwZQW1hem9uIFdlYiBT
ZXJ2aWNlcywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzElMCMGA1UEAwwcQW1h
em9uIFJEUyB1cy1lYXN0LTEgMjAxOSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAM3i/k2u6cqbMdcISGRvh+m+L0yaSIoOXjtpNEoIftAipTUYoMhL
InXGlQBVA4shkekxp1N7HXe1Y/iMaPEyb3n+16pf3vdjKl7kaSkIhjdUz3oVUEYt
i8Z/XeJJ9H2aEGuiZh3kHixQcZczn8cg3dA9aeeyLSEnTkl/npzLf//669Ammyhs
XcAo58yvT0D4E0D/EEHf2N7HRX7j/TlyWvw/39SW0usiCrHPKDLxByLojxLdHzso
QIp/S04m+eWn6rmD+uUiRteN1hI5ncQiA3wo4G37mHnUEKo6TtTUh+sd/ku6a8HK
glMBcgqudDI90s1OpuIAWmuWpY//8xEG2YECAwEAAaNmMGQwDgYDVR0PAQH/BAQD
AgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFPqhoWZcrVY9mU7tuemR
RBnQIj1jMB8GA1UdIwQYMBaAFHNfYNi8ywOY9CsXNC42WqZg/7wfMA0GCSqGSIb3
DQEBCwUAA4IBAQB6zOLZ+YINEs72heHIWlPZ8c6WY8MDU+Be5w1M+BK2kpcVhCUK
PJO4nMXpgamEX8DIiaO7emsunwJzMSvavSPRnxXXTKIc0i/g1EbiDjnYX9d85DkC
E1LaAUCmCZBVi9fIe0H2r9whIh4uLWZA41oMnJx/MOmo3XyMfQoWcqaSFlMqfZM4
0rNoB/tdHLNuV4eIdaw2mlHxdWDtF4oH+HFm+2cVBUVC1jXKrFv/euRVtsTT+A6i
h2XBHKxQ1Y4HgAn0jACP2QSPEmuoQEIa57bEKEcZsBR8SDY6ZdTd2HLRIApcCOSF
MRM8CKLeF658I0XgF8D5EsYoKPsA+74Z+jDH
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEETCCAvmgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwgZQxCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSUwIwYDVQQDDBxBbWF6b24gUkRTIEJldGEgUm9vdCAyMDE5IENBMB4XDTE5MDgy
MDE3MTAwN1oXDTI0MDgxOTE3MzgyNlowgZkxCzAJBgNVBAYTAlVTMRMwEQYDVQQI
DApXYXNoaW5ndG9uMRAwDgYDVQQHDAdTZWF0dGxlMSIwIAYDVQQKDBlBbWF6b24g
V2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMSowKAYDVQQD
DCFBbWF6b24gUkRTIEJldGEgdXMtZWFzdC0xIDIwMTkgQ0EwggEiMA0GCSqGSIb3
DQEBAQUAA4IBDwAwggEKAoIBAQDTNCOlotQcLP8TP82U2+nk0bExVuuMVOgFeVMx
vbUHZQeIj9ikjk+jm6eTDnnkhoZcmJiJgRy+5Jt69QcRbb3y3SAU7VoHgtraVbxF
QDh7JEHI9tqEEVOA5OvRrDRcyeEYBoTDgh76ROco2lR+/9uCvGtHVrMCtG7BP7ZB
sSVNAr1IIRZZqKLv2skKT/7mzZR2ivcw9UeBBTUf8xsfiYVBvMGoEsXEycjYdf6w
WV+7XS7teNOc9UgsFNN+9AhIBc1jvee5E//72/4F8pAttAg/+mmPUyIKtekNJ4gj
OAR2VAzGx1ybzWPwIgOudZFHXFduxvq4f1hIRPH0KbQ/gkRrAgMBAAGjZjBkMA4G
A1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQWBBTkvpCD
6C43rar9TtJoXr7q8dkrrjAfBgNVHSMEGDAWgBStoQwVpbGx87fxB3dEGDqKKnBT
4TANBgkqhkiG9w0BAQsFAAOCAQEAJd9fOSkwB3uVdsS+puj6gCER8jqmhd3g/J5V
Zjk9cKS8H0e8pq/tMxeJ8kpurPAzUk5RkCspGt2l0BSwmf3ahr8aJRviMX6AuW3/
g8aKplTvq/WMNGKLXONa3Sq8591J+ce8gtOX/1rDKmFI4wQ/gUzOSYiT991m7QKS
Fr6HMgFuz7RNJbb3Fy5cnurh8eYWA7mMv7laiLwTNsaro5qsqErD5uXuot6o9beT
a+GiKinEur35tNxAr47ax4IRubuIzyfCrezjfKc5raVV2NURJDyKP0m0CCaffAxE
qn2dNfYc3v1D8ypg3XjHlOzRo32RB04o8ALHMD9LSwsYDLpMag==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEFzCCAv+gAwIBAgICFSUwDQYJKoZIhvcNAQELBQAwgZcxCzAJBgNVBAYTAlVT
MRAwDgYDVQQHDAdTZWF0dGxlMRMwEQYDVQQIDApXYXNoaW5ndG9uMSIwIAYDVQQK
DBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRT
MSgwJgYDVQQDDB9BbWF6b24gUkRTIFByZXZpZXcgUm9vdCAyMDE5IENBMB4XDTE5
MDgyMTIyMzk0N1oXDTI0MDgyMTIyMjk0OVowgZwxCzAJBgNVBAYTAlVTMRMwEQYD
VQQIDApXYXNoaW5ndG9uMRAwDgYDVQQHDAdTZWF0dGxlMSIwIAYDVQQKDBlBbWF6
b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMS0wKwYD
VQQDDCRBbWF6b24gUkRTIFByZXZpZXcgdXMtZWFzdC0yIDIwMTkgQ0EwggEiMA0G
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQD0dB/U7qRnSf05wOi7m10Pa2uPMTJv
r6U/3Y17a5prq5Zr4++CnSUYarG51YuIf355dKs+7Lpzs782PIwCmLpzAHKWzix6
pOaTQ+WZ0+vUMTxyqgqWbsBgSCyP7pVBiyqnmLC/L4az9XnscrbAX4pNaoJxsuQe
mzBo6yofjQaAzCX69DuqxFkVTRQnVy7LCFkVaZtjNAftnAHJjVgQw7lIhdGZp9q9
IafRt2gteihYfpn+EAQ/t/E4MnhrYs4CPLfS7BaYXBycEKC5Muj1l4GijNNQ0Efo
xG8LSZz7SNgUvfVwiNTaqfLP3AtEAWiqxyMyh3VO+1HpCjT7uNBFtmF3AgMBAAGj
ZjBkMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQW
BBQtinkdrj+0B2+qdXngV2tgHnPIujAfBgNVHSMEGDAWgBRp0xqULkNh/w2ZVzEI
o2RIY7O03TANBgkqhkiG9w0BAQsFAAOCAQEAtJdqbCxDeMc8VN1/RzCabw9BIL/z
73Auh8eFTww/sup26yn8NWUkfbckeDYr1BrXa+rPyLfHpg06kwR8rBKyrs5mHwJx
bvOzXD/5WTdgreB+2Fb7mXNvWhenYuji1MF+q1R2DXV3I05zWHteKX6Dajmx+Uuq
Yq78oaCBSV48hMxWlp8fm40ANCL1+gzQ122xweMFN09FmNYFhwuW+Ao+Vv90ZfQG
PYwTvN4n/gegw2TYcifGZC2PNX74q3DH03DXe5fvNgRW5plgz/7f+9mS+YHd5qa9
tYTPUvoRbi169ou6jicsMKUKPORHWhiTpSCWR1FMMIbsAcsyrvtIsuaGCQ==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID/jCCAuagAwIBAgIQdOCSuA9psBpQd8EI368/0DANBgkqhkiG9w0BAQsFADCB
lzELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdB
bWF6b24gUkRTIHNhLWVhc3QtMSBSb290IENBIFJTQTIwNDggRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjEwNTE5MTgwNjI2WhgPMjA2MTA1MTkxOTA2MjZaMIGXMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpv
biBSRFMgc2EtZWFzdC0xIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN6ftL6w8v3dB2yW
LjCxSP1D7ZsOTeLZOSCz1Zv0Gkd0XLhil5MdHOHBvwH/DrXqFU2oGzCRuAy+aZis
DardJU6ChyIQIciXCO37f0K23edhtpXuruTLLwUwzeEPdcnLPCX+sWEn9Y5FPnVm
pCd6J8edH2IfSGoa9LdErkpuESXdidLym/w0tWG/O2By4TabkNSmpdrCL00cqI+c
prA8Bx1jX8/9sY0gpAovtuFaRN+Ivg3PAnWuhqiSYyQ5nC2qDparOWuDiOhpY56E
EgmTvjwqMMjNtExfYx6Rv2Ndu50TriiNKEZBzEtkekwXInTupmYTvc7U83P/959V
UiQ+WSMCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU4uYHdH0+
bUeh81Eq2l5/RJbW+vswDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4IB
AQBhxcExJ+w74bvDknrPZDRgTeMLYgbVJjx2ExH7/Ac5FZZWcpUpFwWMIJJxtewI
AnhryzM3tQYYd4CG9O+Iu0+h/VVfW7e4O3joWVkxNMb820kQSEwvZfA78aItGwOY
WSaFNVRyloVicZRNJSyb1UL9EiJ9ldhxm4LTT0ax+4ontI7zTx6n6h8Sr6r/UOvX
d9T5aUUENWeo6M9jGupHNn3BobtL7BZm2oS8wX8IVYj4tl0q5T89zDi2x0MxbsIV
5ZjwqBQ5JWKv7ASGPb+z286RjPA9R2knF4lJVZrYuNV90rHvI/ECyt/JrDqeljGL
BLl1W/UsvZo6ldLIpoMbbrb5
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBDCCAuygAwIBAgIQUfVbqapkLYpUqcLajpTJWzANBgkqhkiG9w0BAQsFADCB
mjELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTMwMQYDVQQDDCpB
bWF6b24gUkRTIG1lLWNlbnRyYWwtMSBSb290IENBIFJTQTIwNDggRzExEDAOBgNV
BAcMB1NlYXR0bGUwIBcNMjIwNTA2MjMyMDA5WhgPMjA2MjA1MDcwMDIwMDlaMIGa
MQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5j
LjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMzAxBgNVBAMMKkFt
YXpvbiBSRFMgbWUtY2VudHJhbC0xIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4GA1UE
BwwHU2VhdHRsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJIeovu3
ewI9FVitXMQzvkh34aQ6WyI4NO3YepfJaePiv3cnyFGYHN2S1cR3UQcLWgypP5va
j6bfroqwGbCbZZcb+6cyOB4ceKO9Ws1UkcaGHnNDcy5gXR7aCW2OGTUfinUuhd2d
5bOGgV7JsPbpw0bwJ156+MwfOK40OLCWVbzy8B1kITs4RUPNa/ZJnvIbiMu9rdj4
8y7GSFJLnKCjlOFUkNI5LcaYvI1+ybuNgphT3nuu5ZirvTswGakGUT/Q0J3dxP0J
pDfg5Sj/2G4gXiaM0LppVOoU5yEwVewhQ250l0eQAqSrwPqAkdTg9ng360zqCFPE
JPPcgI1tdGUgneECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU
/2AJVxWdZxc8eJgdpbwpW7b0f7IwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB
CwUAA4IBAQBYm63jTu2qYKJ94gKnqc+oUgqmb1mTXmgmp/lXDbxonjszJDOXFbri
3CCO7xB2sg9bd5YWY8sGKHaWmENj3FZpCmoefbUx++8D7Mny95Cz8R32rNcwsPTl
ebpd9A/Oaw5ug6M0x/cNr0qzF8Wk9Dx+nFEimp8RYQdKvLDfNFZHjPa1itnTiD8M
TorAqj+VwnUGHOYBsT/0NY12tnwXdD+ATWfpEHdOXV+kTMqFFwDyhfgRVNpTc+os
ygr8SwhnSCpJPB/EYl2S7r+tgAbJOkuwUvGT4pTqrzDQEhwE7swgepnHC87zhf6l
qN6mVpSnQKQLm6Ob5TeCEFgcyElsF5bH
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrjCCAjSgAwIBAgIRAOxu0I1QuMAhIeszB3fJIlkwCgYIKoZIzj0EAwMwgZYx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEvMC0GA1UEAwwmQW1h
em9uIFJEUyB1cy13ZXN0LTIgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTI0MjIwNjU5WhgPMjEyMTA1MjQyMzA2NTlaMIGWMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExLzAtBgNVBAMMJkFtYXpvbiBS
RFMgdXMtd2VzdC0yIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdTZWF0dGxl
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEz4bylRcGqqDWdP7gQIIoTHdBK6FNtKH1
4SkEIXRXkYDmRvL9Bci1MuGrwuvrka5TDj4b7e+csY0llEzHpKfq6nJPFljoYYP9
uqHFkv77nOpJJ633KOr8IxmeHW5RXgrZo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0G
A1UdDgQWBBQQikVz8wmjd9eDFRXzBIU8OseiGzAOBgNVHQ8BAf8EBAMCAYYwCgYI
KoZIzj0EAwMDaAAwZQIwf06Mcrpw1O0EBLBBrp84m37NYtOkE/0Z0O+C7D41wnXi
EQdn6PXUVgdD23Gj82SrAjEAklhKs+liO1PtN15yeZR1Io98nFve+lLptaLakZcH
+hfFuUtCqMbaI8CdvJlKnPqT
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGCTCCA/GgAwIBAgIRALyWMTyCebLZOGcZZQmkmfcwDQYJKoZIhvcNAQEMBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1ub3J0aGVhc3QtMyBSb290IENBIFJTQTQwOTYgRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNTI0MjAyODAzWhgPMjEyMTA1MjQyMTI4MDNa
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtbm9ydGhlYXN0LTMgUm9vdCBDQSBSU0E0MDk2IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA
wGFiyDyCrGqgdn4fXG12cxKAAfVvhMea1mw5h9CVRoavkPqhzQpAitSOuMB9DeiP
wQyqcsiGl/cTEau4L+AUBG8b9v26RlY48exUYBXj8CieYntOT9iNw5WtdYJa3kF/
JxgI+HDMzE9cmHDs5DOO3S0uwZVyra/xE1ymfSlpOeUIOTpHRJv97CBUEpaZMUW5
Sr6GruuOwFVpO5FX3A/jQlcS+UN4GjSRgDUJuqg6RRQldEZGCVCCmodbByvI2fGm
reGpsPJD54KkmAX08nOR8e5hkGoHxq0m2DLD4SrOFmt65vG47qnuwplWJjtk9B3Z
9wDoopwZLBOtlkPIkUllWm1P8EuHC1IKOA+wSP6XdT7cy8S77wgyHzR0ynxv7q/l
vlZtH30wnNqFI0y9FeogD0TGMCHcnGqfBSicJXPy9T4fU6f0r1HwqKwPp2GArwe7
dnqLTj2D7M9MyVtFjEs6gfGWXmu1y5uDrf+CszurE8Cycoma+OfjjuVQgWOCy7Nd
jJswPxAroTzVfpgoxXza4ShUY10woZu0/J+HmNmqK7lh4NS75q1tz75in8uTZDkV
be7GK+SEusTrRgcf3tlgPjSTWG3veNzFDF2Vn1GLJXmuZfhdlVQDBNXW4MNREExS
dG57kJjICpT+r8X+si+5j51gRzkSnMYs7VHulpxfcwECAwEAAaNCMEAwDwYDVR0T
AQH/BAUwAwEB/zAdBgNVHQ4EFgQU4JWOpDBmUBuWKvGPZelw87ezhL8wDgYDVR0P
AQH/BAQDAgGGMA0GCSqGSIb3DQEBDAUAA4ICAQBRNLMql7itvXSEFQRAnyOjivHz
l5IlWVQjAbOUr6ogZcwvK6YpxNAFW5zQr8F+fdkiypLz1kk5irx9TIpff0BWC9hQ
/odMPO8Gxn8+COlSvc+dLsF2Dax3Hvz0zLeKMo+cYisJOzpdR/eKd0/AmFdkvQoM
AOK9n0yYvVJU2IrSgeJBiiCarpKSeAktEVQ4rvyacQGr+QAPkkjRwm+5LHZKK43W
nNnggRli9N/27qYtc5bgr3AaQEhEXMI4RxPRXCLsod0ehMGWyRRK728a+6PMMJAJ
WHOU0x7LCEMPP/bvpLj3BdvSGqNor4ZtyXEbwREry1uzsgODeRRns5acPwTM6ff+
CmxO2NZ0OktIUSYRmf6H/ZFlZrIhV8uWaIwEJDz71qvj7buhQ+RFDZ9CNL64C0X6
mf0zJGEpddjANHaaVky+F4gYMtEy2K2Lcm4JGTdyIzUoIe+atzCnRp0QeIcuWtF+
s8AjDYCVFNypcMmqbRmNpITSnOoCHSRuVkY3gutVoYyMLbp8Jm9SJnCIlEWTA6Rm
wADOMGZJVn5/XRTRuetVOB3KlQDjs9OO01XN5NzGSZO2KT9ngAUfh9Eqhf1iRWSP
nZlRbQ2NRCuY/oJ5N59mLGxnNJSE7giEKEBRhTQ/XEPIUYAUPD5fca0arKRJwbol
l9Se1Hsq0ZU5f+OZKQ==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGATCCA+mgAwIBAgIRAK7vlRrGVEePJpW1VHMXdlIwDQYJKoZIhvcNAQEMBQAw
gZgxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwo
QW1hem9uIFJEUyBhZi1zb3V0aC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UE
BwwHU2VhdHRsZTAgFw0yMTA1MTkxOTI4NDNaGA8yMTIxMDUxOTIwMjg0M1owgZgx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwoQW1h
em9uIFJEUyBhZi1zb3V0aC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwH
U2VhdHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMZiHOQC6x4o
eC7vVOMCGiN5EuLqPYHdceFPm4h5k/ZejXTf7kryk6aoKZKsDIYihkaZwXVS7Y/y
7Ig1F1ABi2jD+CYprj7WxXbhpysmN+CKG7YC3uE4jSvfvUnpzionkQbjJsRJcrPO
cZJM4FVaVp3mlHHtvnM+K3T+ni4a38nAd8xrv1na4+B8ZzZwWZXarfg8lJoGskSn
ou+3rbGQ0r+XlUP03zWujHoNlVK85qUIQvDfTB7n3O4s1XNGvkfv3GNBhYRWJYlB
4p8T+PFN8wG+UOByp1gV7BD64RnpuZ8V3dRAlO6YVAmINyG5UGrPzkIbLtErUNHO
4iSp4UqYvztDqJWWHR/rA84ef+I9RVwwZ8FQbjKq96OTnPrsr63A5mXTC9dXKtbw
XNJPQY//FEdyM3K8sqM0IdCzxCA1MXZ8+QapWVjwyTjUwFvL69HYky9H8eAER59K
5I7u/CWWeCy2R1SYUBINc3xxLr0CGGukcWPEZW2aPo5ibW5kepU1P/pzdMTaTfao
F42jSFXbc7gplLcSqUgWwzBnn35HLTbiZOFBPKf6vRRu8aRX9atgHw/EjCebi2xP
xIYr5Ub8u0QVHIqcnF1/hVzO/Xz0chj3E6VF/yTXnsakm+W1aM2QkZbFGpga+LMy
mFCtdPrELjea2CfxgibaJX1Q4rdEpc8DAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMB
Af8wHQYDVR0OBBYEFDSaycEyuspo/NOuzlzblui8KotFMA4GA1UdDwEB/wQEAwIB
hjANBgkqhkiG9w0BAQwFAAOCAgEAbosemjeTRsL9o4v0KadBUNS3V7gdAH+X4vH2
Ee1Jc91VOGLdd/s1L9UX6bhe37b9WjUD69ur657wDW0RzxMYgQdZ27SUl0tEgGGp
cCmVs1ky3zEN+Hwnhkz+OTmIg1ufq0W2hJgJiluAx2r1ib1GB+YI3Mo3rXSaBYUk
bgQuujYPctf0PA153RkeICE5GI3OaJ7u6j0caYEixBS3PDHt2MJWexITvXGwHWwc
CcrC05RIrTUNOJaetQw8smVKYOfRImEzLLPZ5kf/H3Cbj8BNAFNsa10wgvlPuGOW
XLXqzNXzrG4V3sjQU5YtisDMagwYaN3a6bBf1wFwFIHQoAPIgt8q5zaQ9WI+SBns
Il6rd4zfvjq/BPmt0uI7rVg/cgbaEg/JDL2neuM9CJAzmKxYxLQuHSX2i3Fy4Y1B
cnxnRQETCRZNPGd00ADyxPKVoYBC45/t+yVusArFt+2SVLEGiFBr23eG2CEZu+HS
nDEgIfQ4V3YOTUNa86wvbAss1gbbnT/v1XCnNGClEWCWNCSRjwV2ZmQ/IVTmNHPo
7axTTBBJbKJbKzFndCnuxnDXyytdYRgFU7Ly3sa27WS2KFyFEDebLFRHQEfoYqCu
IupSqBSbXsR3U10OTjc9z6EPo1nuV6bdz+gEDthmxKa1NI+Qb1kvyliXQHL2lfhr
5zT5+Bs=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIF/zCCA+egAwIBAgIRAOLV6zZcL4IV2xmEneN1GwswDQYJKoZIhvcNAQEMBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyB1cy13ZXN0LTEgUm9vdCBDQSBSU0E0MDk2IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUxOTE5MDg1OFoYDzIxMjEwNTE5MjAwODU4WjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIHVzLXdlc3QtMSBSb290IENBIFJTQTQwOTYgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC7koAKGXXlLixN
fVjhuqvz0WxDeTQfhthPK60ekRpftkfE5QtnYGzeovaUAiS58MYVzqnnTACDwcJs
IGTFE6Wd7sB6r8eI/3CwI1pyJfxepubiQNVAQG0zJETOVkoYKe/5KnteKtnEER3X
tCBRdV/rfbxEDG9ZAsYfMl6zzhEWKF88G6xhs2+VZpDqwJNNALvQuzmTx8BNbl5W
RUWGq9CQ9GK9GPF570YPCuURW7kl35skofudE9bhURNz51pNoNtk2Z3aEeRx3ouT
ifFJlzh+xGJRHqBG7nt5NhX8xbg+vw4xHCeq1aAe6aVFJ3Uf9E2HzLB4SfIT9bRp
P7c9c0ySGt+3n+KLSHFf/iQ3E4nft75JdPjeSt0dnyChi1sEKDi0tnWGiXaIg+J+
r1ZtcHiyYpCB7l29QYMAdD0TjfDwwPayLmq//c20cPmnSzw271VwqjUT0jYdrNAm
gV+JfW9t4ixtE3xF2jaUh/NzL3bAmN5v8+9k/aqPXlU1BgE3uPwMCjrfn7V0I7I1
WLpHyd9jF3U/Ysci6H6i8YKgaPiOfySimQiDu1idmPld659qerutUSemQWmPD3bE
dcjZolmzS9U0Ujq/jDF1YayN3G3xvry1qWkTci0qMRMu2dZu30Herugh9vsdTYkf
00EqngPbqtIVLDrDjEQLqPcb8QvWFQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/
MB0GA1UdDgQWBBQBqg8Za/L0YMHURGExHfvPyfLbOTAOBgNVHQ8BAf8EBAMCAYYw
DQYJKoZIhvcNAQEMBQADggIBACAGPMa1QL7P/FIO7jEtMelJ0hQlQepKnGtbKz4r
Xq1bUX1jnLvnAieR9KZmeQVuKi3g3CDU6b0mDgygS+FL1KDDcGRCSPh238Ou8KcG
HIxtt3CMwMHMa9gmdcMlR5fJF9vhR0C56KM2zvyelUY51B/HJqHwGvWuexryXUKa
wq1/iK2/d9mNeOcjDvEIj0RCMI8dFQCJv3PRCTC36XS36Tzr6F47TcTw1c3mgKcs
xpcwt7ezrXMUunzHS4qWAA5OGdzhYlcv+P5GW7iAA7TDNrBF+3W4a/6s9v2nQAnX
UvXd9ul0ob71377UhZbJ6SOMY56+I9cJOOfF5QvaL83Sz29Ij1EKYw/s8TYdVqAq
+dCyQZBkMSnDFLVe3J1KH2SUSfm3O98jdPORQrUlORQVYCHPls19l2F6lCmU7ICK
hRt8EVSpXm4sAIA7zcnR2nU00UH8YmMQLnx5ok9YGhuh3Ehk6QlTQLJux6LYLskd
9YHOLGW/t6knVtV78DgPqDeEx/Wu/5A8R0q7HunpWxr8LCPBK6hksZnOoUhhb8IP
vl46Ve5Tv/FlkyYr1RTVjETmg7lb16a8J0At14iLtpZWmwmuv4agss/1iBVMXfFk
+ZGtx5vytWU5XJmsfKA51KLsMQnhrLxb3X3zC+JRCyJoyc8++F3YEcRi2pkRYE3q
Hing
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgIRANxgyBbnxgTEOpDul2ZnC0UwDQYJKoZIhvcNAQELBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1zb3V0aGVhc3QtMyBSb290IENBIFJTQTIwNDggRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNjEwMTgxOTA3WhgPMjA2MTA2MTAxOTE5MDda
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtc291dGhlYXN0LTMgUm9vdCBDQSBSU0EyMDQ4IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
xnwSDAChrMkfk5TA4Dk8hKzStDlSlONzmd3fTG0Wqr5+x3EmFT6Ksiu/WIwEl9J2
K98UI7vYyuZfCxUKb1iMPeBdVGqk0zb92GpURd+Iz/+K1ps9ZLeGBkzR8mBmAi1S
OfpwKiTBzIv6E8twhEn4IUpHsdcuX/2Y78uESpJyM8O5CpkG0JaV9FNEbDkJeBUQ
Ao2qqNcH4R0Qcr5pyeqA9Zto1RswgL06BQMI9dTpfwSP5VvkvcNUaLl7Zv5WzLQE
JzORWePvdPzzvWEkY/3FPjxBypuYwssKaERW0fkPDmPtykktP9W/oJolKUFI6pXp
y+Y6p6/AVdnQD2zZjW5FhQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
DgQWBBT+jEKs96LC+/X4BZkUYUkzPfXdqTAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZI
hvcNAQELBQADggEBAIGQqgqcQ6XSGkmNebzR6DhadTbfDmbYeN5N0Vuzv+Tdmufb
tMGjdjnYMg4B+IVnTKQb+Ox3pL9gbX6KglGK8HupobmIRtwKVth+gYYz3m0SL/Nk
haWPYzOm0x3tJm8jSdufJcEob4/ATce9JwseLl76pSWdl5A4lLjnhPPKudUDfH+1
BLNUi3lxpp6GkC8aWUPtupnhZuXddolTLOuA3GwTZySI44NfaFRm+o83N1jp+EwD
6e94M4cTRzjUv6J3MZmSbdtQP/Tk1uz2K4bQZGP0PZC3bVpqiesdE/xr+wbu8uHr
cM1JXH0AmXf1yIkTgyWzmvt0k1/vgcw5ixAqvvE=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEATCCAumgAwIBAgIRAMhw98EQU18mIji+unM2YH8wDQYJKoZIhvcNAQELBQAw
gZgxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwo
QW1hem9uIFJEUyBhcC1zb3V0aC0yIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4GA1UE
BwwHU2VhdHRsZTAgFw0yMjA2MDYyMTQyMjJaGA8yMDYyMDYwNjIyNDIyMlowgZgx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwoQW1h
em9uIFJEUyBhcC1zb3V0aC0yIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4GA1UEBwwH
U2VhdHRsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAIeeRoLfTm+7
vqm7ZlFSx+1/CGYHyYrOOryM4/Z3dqYVHFMgWTR7V3ziO8RZ6yUanrRcWVX3PZbF
AfX0KFE8OgLsXEZIX8odSrq86+/Th5eZOchB2fDBsUB7GuN2rvFBbM8lTI9ivVOU
lbuTnYyb55nOXN7TpmH2bK+z5c1y9RVC5iQsNAl6IJNvSN8VCqXh31eK5MlKB4DT
+Y3OivCrSGsjM+UR59uZmwuFB1h+icE+U0p9Ct3Mjq3MzSX5tQb6ElTNGlfmyGpW
Kh7GQ5XU1KaKNZXoJ37H53woNSlq56bpVrKI4uv7ATpdpFubOnSLtpsKlpLdR3sy
Ws245200pC8CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUp0ki
6+eWvsnBjQhMxwMW5pwn7DgwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUA
A4IBAQB2V8lv0aqbYQpj/bmVv/83QfE4vOxKCJAHv7DQ35cJsTyBdF+8pBczzi3t
3VNL5IUgW6WkyuUOWnE0eqAFOUVj0yTS1jSAtfl3vOOzGJZmWBbqm9BKEdu1D8O6
sB8bnomwiab2tNDHPmUslpdDqdabbkWwNWzLJ97oGFZ7KNODMEPXWKWNxg33iHfS
/nlmnrTVI3XgaNK9qLZiUrxu9Yz5gxi/1K+sG9/Dajd32ZxjRwDipOLiZbiXQrsd
qzIMY4GcWf3g1gHL5mCTfk7dG22h/rhPyGV0svaDnsb+hOt6sv1McMN6Y3Ou0mtM
/UaAXojREmJmTSCNvs2aBny3/2sy
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrjCCAjSgAwIBAgIRAMnRxsKLYscJV8Qv5pWbL7swCgYIKoZIzj0EAwMwgZYx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEvMC0GA1UEAwwmQW1h
em9uIFJEUyBzYS1lYXN0LTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTE5MTgxNjAxWhgPMjEyMTA1MTkxOTE2MDFaMIGWMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExLzAtBgNVBAMMJkFtYXpvbiBS
RFMgc2EtZWFzdC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdTZWF0dGxl
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEjFOCZgTNVKxLKhUxffiDEvTLFhrmIqdO
dKqVdgDoELEzIHWDdC+19aDPitbCYtBVHl65ITu/9pn6mMUl5hhUNtfZuc6A+Iw1
sBe0v0qI3y9Q9HdQYrGgeHDh8M5P7E2ho0IwQDAPBgNVHRMBAf8EBTADAQH/MB0G
A1UdDgQWBBS5L7/8M0TzoBZk39Ps7BkfTB4yJTAOBgNVHQ8BAf8EBAMCAYYwCgYI
KoZIzj0EAwMDaAAwZQIwI43O0NtWKTgnVv9z0LO5UMZYgSve7GvGTwqktZYCMObE
rUI4QerXM9D6JwLy09mqAjEAypfkdLyVWtaElVDUyHFkihAS1I1oUxaaDrynLNQK
Ou/Ay+ns+J+GyvyDUjBpVVW1
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIF/jCCA+agAwIBAgIQR71Z8lTO5Sj+as2jB7IWXzANBgkqhkiG9w0BAQwFADCB
lzELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdB
bWF6b24gUkRTIHVzLXdlc3QtMiBSb290IENBIFJTQTQwOTYgRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjEwNTI0MjIwMzIwWhgPMjEyMTA1MjQyMzAzMjBaMIGXMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpv
biBSRFMgdXMtd2VzdC0yIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAM977bHIs1WJijrS
XQMfUOhmlJjr2v0K0UjPl52sE1TJ76H8umo1yR4T7Whkd9IwBHNGKXCJtJmMr9zp
fB38eLTu+5ydUAXdFuZpRMKBWwPVe37AdJRKqn5beS8HQjd3JXAgGKUNNuE92iqF
qi2fIqFMpnJXWo0FIW6s2Dl2zkORd7tH0DygcRi7lgVxCsw1BJQhFJon3y+IV8/F
bnbUXSNSDUnDW2EhvWSD8L+t4eiXYsozhDAzhBvojpxhPH9OB7vqFYw5qxFx+G0t
lSLX5iWi1jzzc3XyGnB6WInZDVbvnvJ4BGZ+dTRpOCvsoMIn9bz4EQTvu243c7aU
HbS/kvnCASNt+zk7C6lbmaq0AGNztwNj85Opn2enFciWZVnnJ/4OeefUWQxD0EPp
SjEd9Cn2IHzkBZrHCg+lWZJQBKbUVS0lLIMSsLQQ6WvR38jY7D2nxM1A93xWxwpt
ZtQnYRCVXH6zt2OwDAFePInWwxUjR5t/wu3XxPgpSfrmTi3WYtr1wFypAJ811e/P
yBtswWUQ6BNJQvy+KnOEeGfOwmtdDFYR+GOCfvCihzrKJrxOtHIieehR5Iw3cbXG
sm4pDzfMUVvDDz6C2M6PRlJhhClbatHCjik9hxFYEsAlqtVVK9pxaz9i8hOqSFQq
kJSQsgWw+oM/B2CyjcSqkSQEu8RLAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8w
HQYDVR0OBBYEFPmrdxpRRgu3IcaB5BTqlprcKdTsMA4GA1UdDwEB/wQEAwIBhjAN
BgkqhkiG9w0BAQwFAAOCAgEAVdlxWjPvVKky3kn8ZizeM4D+EsLw9dWLau2UD/ls
zwDCFoT6euagVeCknrn+YEl7g20CRYT9iaonGoMUPuMR/cdtPL1W/Rf40PSrGf9q
QuxavWiHLEXOQTCtCaVZMokkvjuuLNDXyZnstgECuiZECTwhexUF4oiuhyGk9o01
QMaiz4HX4lgk0ozALUvEzaNd9gWEwD2qe+rq9cQMTVq3IArUkvTIftZUaVUMzr0O
ed1+zAsNa9nJhURJ/6anJPJjbQgb5qA1asFcp9UaMT1ku36U3gnR1T/BdgG2jX3X
Um0UcaGNVPrH1ukInWW743pxWQb7/2sumEEMVh+jWbB18SAyLI4WIh4lkurdifzS
IuTFp8TEx+MouISFhz/vJDWZ84tqoLVjkEcP6oDypq9lFoEzHDJv3V1CYcIgOusT
k1jm9P7BXdTG7TYzUaTb9USb6bkqkD9EwJAOSs7DI94aE6rsSws2yAHavjAMfuMZ
sDAZvkqS2Qg2Z2+CI6wUZn7mzkJXbZoqRjDvChDXEB1mIhzVXhiNW/CR5WKVDvlj
9v1sdGByh2pbxcLQtVaq/5coM4ANgphoNz3pOYUPWHS+JUrIivBZ+JobjXcxr3SN
9iDzcu5/FVVNbq7+KN/nvPMngT+gduEN5m+EBjm8GukJymFG0m6BENRA0QSDqZ7k
zDY=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgIRAK5EYG3iHserxMqgg+0EFjgwDQYJKoZIhvcNAQELBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1ub3J0aGVhc3QtMyBSb290IENBIFJTQTIwNDggRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNTI0MjAyMzE2WhgPMjA2MTA1MjQyMTIzMTZa
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtbm9ydGhlYXN0LTMgUm9vdCBDQSBSU0EyMDQ4IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
s1L6TtB84LGraLHVC+rGPhLBW2P0oN/91Rq3AnYwqDOuTom7agANwEjvLq7dSRG/
sIfZsSV/ABTgArZ5sCmLjHFZAo8Kd45yA9byx20RcYtAG8IZl+q1Cri+s0XefzyO
U6mlfXZkVe6lzjlfXBkrlE/+5ifVbJK4dqOS1t9cWIpgKqv5fbE6Qbq4LVT+5/WM
Vd2BOljuBMGMzdZubqFKFq4mzTuIYfnBm7SmHlZfTdfBYPP1ScNuhpjuzw4n3NCR
EdU6dQv04Q6th4r7eiOCwbWI9LkmVbvBe3ylhH63lApC7MiiPYLlB13xBubVHVhV
q1NHoNTi+zA3MN9HWicRxQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
DgQWBBSuxoqm0/wjNiZLvqv+JlQwsDvTPDAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZI
hvcNAQELBQADggEBAFfTK/j5kv90uIbM8VaFdVbr/6weKTwehafT0pAk1bfLVX+7
uf8oHgYiyKTTl0DFQicXejghXTeyzwoEkWSR8c6XkhD5vYG3oESqmt/RGvvoxz11
rHHy7yHYu7RIUc3VQG60c4qxXv/1mWySGwVwJrnuyNT9KZXPevu3jVaWOVHEILaK
HvzQ2YEcWBPmde/zEseO2QeeGF8FL45Q1d66wqIP4nNUd2pCjeTS5SpB0MMx7yi9
ki1OH1pv8tOuIdimtZ7wkdB8+JSZoaJ81b8sRrydRwJyvB88rftuI3YB4WwGuONT
ZezUPsmaoK69B0RChB0ofDpAaviF9V3xOWvVZfo=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGDzCCA/egAwIBAgIRAI0sMNG2XhaBMRN3zD7ZyoEwDQYJKoZIhvcNAQEMBQAw
gZ8xCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE4MDYGA1UEAwwv
QW1hem9uIFJEUyBQcmV2aWV3IHVzLWVhc3QtMiBSb290IENBIFJTQTQwOTYgRzEx
EDAOBgNVBAcMB1NlYXR0bGUwIBcNMjEwNTE4MjA1NzUwWhgPMjEyMTA1MTgyMTU3
NTBaMIGfMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNl
cywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExODA2BgNV
BAMML0FtYXpvbiBSRFMgUHJldmlldyB1cy1lYXN0LTIgUm9vdCBDQSBSU0E0MDk2
IEcxMRAwDgYDVQQHDAdTZWF0dGxlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC
CgKCAgEAh/otSiCu4Uw3hu7OJm0PKgLsLRqBmUS6jihcrkxfN2SHmp2zuRflkweU
BhMkebzL+xnNvC8okzbgPWtUxSmDnIRhE8J7bvSKFlqs/tmEdiI/LMqe/YIKcdsI
20UYmvyLIjtDaJIh598SHHlF9P8DB5jD8snJfhxWY+9AZRN+YVTltgQAAgayxkWp
M1BbvxpOnz4CC00rE0eqkguXIUSuobb1vKqdKIenlYBNxm2AmtgvQfpsBIQ0SB+8
8Zip8Ef5rtjSw5J3s2Rq0aYvZPfCVIsKYepIboVwXtD7E9J31UkB5onLBQlaHaA6
XlH4srsMmrew5d2XejQGy/lGZ1nVWNsKO0x/Az2QzY5Kjd6AlXZ8kq6H68hscA5i
OMbNlXzeEQsZH0YkId3+UsEns35AAjZv4qfFoLOu8vDotWhgVNT5DfdbIWZW3ZL8
qbmra3JnCHuaTwXMnc25QeKgVq7/rG00YB69tCIDwcf1P+tFJWxvaGtV0g2NthtB
a+Xo09eC0L53gfZZ3hZw1pa3SIF5dIZ6RFRUQ+lFOux3Q/I3u+rYstYw7Zxc4Zeo
Y8JiedpQXEAnbw2ECHix/L6mVWgiWCiDzBnNLLdbmXjJRnafNSndSfFtHCnY1SiP
aCrNpzwZIJejoV1zDlWAMO+gyS28EqzuIq3WJK/TFE7acHkdKIcCAwEAAaNCMEAw
DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUrmV1YASnuudfmqAZP4sKGTvScaEw
DgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBDAUAA4ICAQBGpEKeQoPvE85tN/25
qHFkys9oHDl93DZ62EnOqAUKLd6v0JpCyEiop4nlrJe+4KrBYVBPyKOJDcIqE2Sp
3cvgJXLhY4i46VM3Qxe8yuYF1ElqBpg3jJVj/sCQnYz9dwoAMWIJFaDWOvmU2E7M
MRaKx+sPXFkIjiDA6Bv0m+VHef7aedSYIY7IDltEQHuXoqNacGrYo3I50R+fZs88
/mB3e/V7967e99D6565yf9Lcjw4oQf2Hy7kl/6P9AuMz0LODnGITwh2TKk/Zo3RU
Vgq25RDrT4xJK6nFHyjUF6+4cOBxVpimmFw/VP1zaXT8DN5r4HyJ9p4YuSK8ha5N
2pJc/exvU8Nv2+vS/efcDZWyuEdZ7eh1IJWQZlOZKIAONfRDRTpeQHJ3zzv3QVYy
t78pYp/eWBHyVIfEE8p2lFKD4279WYe+Uvdb8c4Jm4TJwqkSJV8ifID7Ub80Lsir
lPAU3OCVTBeVRFPXT2zpC4PB4W6KBSuj6OOcEu2y/HgWcoi7Cnjvp0vFTUhDFdus
Wz3ucmJjfVsrkEO6avDKu4SwdbVHsk30TVAwPd6srIdi9U6MOeOQSOSE4EsrrS7l
SVmu2QIDUVFpm8QAHYplkyWIyGkupyl3ashH9mokQhixIU/Pzir0byePxHLHrwLu
1axqeKpI0F5SBUPsaVNYY2uNFg==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECDCCAvCgAwIBAgIQCREfzzVyDTMcNME+gWnTCTANBgkqhkiG9w0BAQsFADCB
nDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTUwMwYDVQQDDCxB
bWF6b24gUkRTIGFwLXNvdXRoZWFzdC0yIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4G
A1UEBwwHU2VhdHRsZTAgFw0yMTA1MjQyMDQyMzNaGA8yMDYxMDUyNDIxNDIzM1ow
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1zb3V0aGVhc3QtMiBSb290IENBIFJTQTIwNDggRzExEDAO
BgNVBAcMB1NlYXR0bGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDL
1MT6br3L/4Pq87DPXtcjlXN3cnbNk2YqRAZHJayStTz8VtsFcGPJOpk14geRVeVk
e9uKFHRbcyr/RM4owrJTj5X4qcEuATYZbo6ou/rW2kYzuWFZpFp7lqm0vasV4Z9F
fChlhwkNks0UbM3G+psCSMNSoF19ERunj7w2c4E62LwujkeYLvKGNepjnaH10TJL
2krpERd+ZQ4jIpObtRcMH++bTrvklc+ei8W9lqrVOJL+89v2piN3Ecdd389uphst
qQdb1BBVXbhUrtuGHgVf7zKqN1SkCoktoWxVuOprVWhSvr7akaWeq0UmlvbEsujU
vADqxGMcJFyCzxx3CkJjAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O
BBYEFFk8UJmlhoxFT3PP12PvhvazHjT4MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG
9w0BAQsFAAOCAQEAfFtr2lGoWVXmWAsIo2NYre7kzL8Xb9Tx7desKxCCz5HOOvIr
8JMB1YK6A7IOvQsLJQ/f1UnKRh3X3mJZjKIywfrMSh0FiDf+rjcEzXxw2dGtUem4
A+WMvIA3jwxnJ90OQj5rQ8bg3iPtE6eojzo9vWQGw/Vu48Dtw1DJo9210Lq/6hze
hPhNkFh8fMXNT7Q1Wz/TJqJElyAQGNOXhyGpHKeb0jHMMhsy5UNoW5hLeMS5ffao
TBFWEJ1gVfxIU9QRxSh+62m46JIg+dwDlWv8Aww14KgepspRbMqDuaM2cinoejv6
t3dyOyHHrsOyv3ffZUKtQhQbQr+sUcL89lARsg==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID/zCCAuegAwIBAgIRAIJLTMpzGNxqHZ4t+c1MlCIwDQYJKoZIhvcNAQELBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyBhcC1lYXN0LTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyNTIxMzAzM1oYDzIwNjEwNTI1MjIzMDMzWjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGFwLWVhc3QtMSBSb290IENBIFJTQTIwNDggRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDtdHut0ZhJ9Nn2
MpVafFcwHdoEzx06okmmhjJsNy4l9QYVeh0UUoek0SufRNMRF4d5ibzpgZol0Y92
/qKWNe0jNxhEj6sXyHsHPeYtNBPuDMzThfbvsLK8z7pBP7vVyGPGuppqW/6m4ZBB
lcc9fsf7xpZ689iSgoyjiT6J5wlVgmCx8hFYc/uvcRtfd8jAHvheug7QJ3zZmIye
V4htOW+fRVWnBjf40Q+7uTv790UAqs0Zboj4Yil+hER0ibG62y1g71XcCyvcVpto
2/XW7Y9NCgMNqQ7fGN3wR1gjtSYPd7DO32LTzYhutyvfbpAZjsAHnoObmoljcgXI
QjfBcCFpAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJI3aWLg
CS5xqU5WYVaeT5s8lpO0MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOC
AQEAUwATpJOcGVOs3hZAgJwznWOoTzOVJKfrqBum7lvkVH1vBwxBl9CahaKj3ZOt
YYp2qJzhDUWludL164DL4ZjS6eRedLRviyy5cRy0581l1MxPWTThs27z+lCC14RL
PJZNVYYdl7Jy9Q5NsQ0RBINUKYlRY6OqGDySWyuMPgno2GPbE8aynMdKP+f6G/uE
YHOf08gFDqTsbyfa70ztgVEJaRooVf5JJq4UQtpDvVswW2reT96qi6tXPKHN5qp3
3wI0I1Mp4ePmiBKku2dwYzPfrJK/pQlvu0Gu5lKOQ65QdotwLAAoaFqrf9za1yYs
INUkHLWIxDds+4OHNYcerGp5Dw==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGCTCCA/GgAwIBAgIRAIO6ldra1KZvNWJ0TA1ihXEwDQYJKoZIhvcNAQEMBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1zb3V0aGVhc3QtMSBSb290IENBIFJTQTQwOTYgRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNTIxMjE0NTA1WhgPMjEyMTA1MjEyMjQ1MDVa
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtc291dGhlYXN0LTEgUm9vdCBDQSBSU0E0MDk2IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA
sDN52Si9pFSyZ1ruh3xAN0nVqEs960o2IK5CPu/ZfshFmzAwnx/MM8EHt/jMeZtj
SM58LADAsNDL01ELpFZATjgZQ6xNAyXRXE7RiTRUvNkK7O3o2qAGbLnJq/UqF7Sw
LRnB8V6hYOv+2EjVnohtGCn9SUFGZtYDjWXsLd4ML4Zpxv0a5LK7oEC7AHzbUR7R
jsjkrXqSv7GE7bvhSOhMkmgxgj1F3J0b0jdQdtyyj109aO0ATUmIvf+Bzadg5AI2
A9UA+TUcGeebhpHu8AP1Hf56XIlzPpaQv3ZJ4vzoLaVNUC7XKzAl1dlvCl7Klg/C
84qmbD/tjZ6GHtzpLKgg7kQEV7mRoXq8X4wDX2AFPPQl2fv+Kbe+JODqm5ZjGegm
uskABBi8IFv1hYx9jEulZPxC6uD/09W2+niFm3pirnlWS83BwVDTUBzF+CooUIMT
jhWkIIZGDDgMJTzouBHfoSJtS1KpUZi99m2WyVs21MNKHeWAbs+zmI6TO5iiMC+T
uB8spaOiHFO1573Fmeer4sy3YA6qVoqVl6jjTQqOdy3frAMbCkwH22/crV8YA+08
hLeHXrMK+6XUvU+EtHAM3VzcrLbuYJUI2XJbzTj5g0Eb8I8JWsHvWHR5K7Z7gceR
78AzxQmoGEfV6KABNWKsgoCQnfb1BidDJIe3BsI0A6UCAwEAAaNCMEAwDwYDVR0T
AQH/BAUwAwEB/zAdBgNVHQ4EFgQUABp0MlB14MSHgAcuNSOhs3MOlUcwDgYDVR0P
AQH/BAQDAgGGMA0GCSqGSIb3DQEBDAUAA4ICAQCv4CIOBSQi/QR9NxdRgVAG/pAh
tFJhV7OWb/wqwsNKFDtg6tTxwaahdCfWpGWId15OUe7G9LoPiKiwM9C92n0ZeHRz
4ewbrQVo7Eu1JI1wf0rnZJISL72hVYKmlvaWaacHhWxvsbKLrB7vt6Cknxa+S993
Kf8i2Psw8j5886gaxhiUtzMTBwoDWak8ZaK7m3Y6C6hXQk08+3pnIornVSFJ9dlS
PAqt5UPwWmrEfF+0uIDORlT+cvrAwgSp7nUF1q8iasledycZ/BxFgQqzNwnkBDwQ
Z/aM52ArGsTzfMhkZRz9HIEhz1/0mJw8gZtDVQroD8778h8zsx2SrIz7eWQ6uWsD
QEeSWXpcheiUtEfzkDImjr2DLbwbA23c9LoexUD10nwohhoiQQg77LmvBVxeu7WU
E63JqaYUlOLOzEmNJp85zekIgR8UTkO7Gc+5BD7P4noYscI7pPOL5rP7YLg15ZFi
ega+G53NTckRXz4metsd8XFWloDjZJJq4FfD60VuxgXzoMNT9wpFTNSH42PR2s9L
I1vcl3w8yNccs9se2utM2nLsItZ3J0m/+QSRiw9hbrTYTcM9sXki0DtH2kyIOwYf
lOrGJDiYOIrXSQK36H0gQ+8omlrUTvUj4msvkXuQjlfgx6sgp2duOAfnGxE7uHnc
UhnJzzoe6M+LfGHkVQ==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICuDCCAj2gAwIBAgIQSAG6j2WHtWUUuLGJTPb1nTAKBggqhkjOPQQDAzCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLW5vcnRoZWFzdC0yIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyMDE2MzgyNloYDzIxMjEwNTIwMTczODI2WjCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLW5vcnRoZWFzdC0yIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE2eqwU4FOzW8RV1W381Bd
olhDOrqoMqzWli21oDUt7y8OnXM/lmAuOS6sr8Nt61BLVbONdbr+jgCYw75KabrK
ZGg3siqvMOgabIKkKuXO14wtrGyGDt7dnKXg5ERGYOZlo0IwQDAPBgNVHRMBAf8E
BTADAQH/MB0GA1UdDgQWBBS1Acp2WYxOcblv5ikZ3ZIbRCCW+zAOBgNVHQ8BAf8E
BAMCAYYwCgYIKoZIzj0EAwMDaQAwZgIxAJL84J08PBprxmsAKPTotBuVI3MyW1r8
xQ0i8lgCQUf8GcmYjQ0jI4oZyv+TuYJAcwIxAP9Xpzq0Docxb+4N1qVhpiOfWt1O
FnemFiy9m1l+wv6p3riQMPV7mBVpklmijkIv3Q==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgIRALZLcqCVIJ25maDPE3sbPCIwDQYJKoZIhvcNAQELBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1zb3V0aGVhc3QtMSBSb290IENBIFJTQTIwNDggRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNTIxMjEzOTM5WhgPMjA2MTA1MjEyMjM5Mzla
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtc291dGhlYXN0LTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
ypKc+6FfGx6Gl6fQ78WYS29QoKgQiur58oxR3zltWeg5fqh9Z85K5S3UbRSTqWWu
Xcfnkz0/FS07qHX+nWAGU27JiQb4YYqhjZNOAq8q0+ptFHJ6V7lyOqXBq5xOzO8f
+0DlbJSsy7GEtJp7d7QCM3M5KVY9dENVZUKeJwa8PC5StvwPx4jcLeZRJC2rAVDG
SW7NAInbATvr9ssSh03JqjXb+HDyywiqoQ7EVLtmtXWimX+0b3/2vhqcH5jgcKC9
IGFydrjPbv4kwMrKnm6XlPZ9L0/3FMzanXPGd64LQVy51SI4d5Xymn0Mw2kMX8s6
Nf05OsWcDzJ1n6/Q1qHSxQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
DgQWBBRmaIc8eNwGP7i6P7AJrNQuK6OpFzAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZI
hvcNAQELBQADggEBAIBeHfGwz3S2zwIUIpqEEI5/sMySDeS+3nJR+woWAHeO0C8i
BJdDh+kzzkP0JkWpr/4NWz84/IdYo1lqASd1Kopz9aT1+iROXaWr43CtbzjXb7/X
Zv7eZZFC8/lS5SROq42pPWl4ekbR0w8XGQElmHYcWS41LBfKeHCUwv83ATF0XQ6I
4t+9YSqZHzj4vvedrvcRInzmwWJaal9s7Z6GuwTGmnMsN3LkhZ+/GD6oW3pU/Pyh
EtWqffjsLhfcdCs3gG8x9BbkcJPH5aPAVkPn4wc8wuXg6xxb9YGsQuY930GWTYRf
schbgjsuqznW4HHakq4WNhs1UdTSTKkRdZz7FUQ=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEDzCCAvegAwIBAgIRAM2zAbhyckaqRim63b+Tib8wDQYJKoZIhvcNAQELBQAw
gZ8xCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE4MDYGA1UEAwwv
QW1hem9uIFJEUyBQcmV2aWV3IHVzLWVhc3QtMiBSb290IENBIFJTQTIwNDggRzEx
EDAOBgNVBAcMB1NlYXR0bGUwIBcNMjEwNTE4MjA0OTQ1WhgPMjA2MTA1MTgyMTQ5
NDVaMIGfMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNl
cywgSW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExODA2BgNV
BAMML0FtYXpvbiBSRFMgUHJldmlldyB1cy1lYXN0LTIgUm9vdCBDQSBSU0EyMDQ4
IEcxMRAwDgYDVQQHDAdTZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
CgKCAQEA1ybjQMH1MkbvfKsWJaCTXeCSN1SG5UYid+Twe+TjuSqaXWonyp4WRR5z
tlkqq+L2MWUeQQAX3S17ivo/t84mpZ3Rla0cx39SJtP3BiA2BwfUKRjhPwOjmk7j
3zrcJjV5k1vSeLNOfFFSlwyDiVyLAE61lO6onBx+cRjelu0egMGq6WyFVidTdCmT
Q9Zw3W6LTrnPvPmEyjHy2yCHzH3E50KSd/5k4MliV4QTujnxYexI2eR8F8YQC4m3
DYjXt/MicbqA366SOoJA50JbgpuVv62+LSBu56FpzY12wubmDZsdn4lsfYKiWxUy
uc83a2fRXsJZ1d3whxrl20VFtLFHFQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/
MB0GA1UdDgQWBBRC0ytKmDYbfz0Bz0Psd4lRQV3aNTAOBgNVHQ8BAf8EBAMCAYYw
DQYJKoZIhvcNAQELBQADggEBAGv8qZu4uaeoF6zsbumauz6ea6tdcWt+hGFuwGrb
tRbI85ucAmVSX06x59DJClsb4MPhL1XmqO3RxVMIVVfRwRHWOsZQPnXm8OYQ2sny
rYuFln1COOz1U/KflZjgJmxbn8x4lYiTPZRLarG0V/OsCmnLkQLPtEl/spMu8Un7
r3K8SkbWN80gg17Q8EV5mnFwycUx9xsTAaFItuG0en9bGsMgMmy+ZsDmTRbL+lcX
Fq8r4LT4QjrFz0shrzCwuuM4GmcYtBSxlacl+HxYEtAs5k10tmzRf6OYlY33tGf6
1tkYvKryxDPF/EDgGp/LiBwx6ixYMBfISoYASt4V/ylAlHA=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICtTCCAjqgAwIBAgIRAK9BSZU6nIe6jqfODmuVctYwCgYIKoZIzj0EAwMwgZkx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEyMDAGA1UEAwwpQW1h
em9uIFJEUyBjYS1jZW50cmFsLTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjEwNTIxMjIxMzA5WhgPMjEyMTA1MjEyMzEzMDlaMIGZMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMjAwBgNVBAMMKUFtYXpv
biBSRFMgY2EtY2VudHJhbC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEUkEERcgxneT5H+P+fERcbGmf
bVx+M7rNWtgWUr6w+OBENebQA9ozTkeSg4c4M+qdYSObFqjxITdYxT1z/nHz1gyx
OKAhLjWu+nkbRefqy3RwXaWT680uUaAP6ccnkZOMo0IwQDAPBgNVHRMBAf8EBTAD
AQH/MB0GA1UdDgQWBBSN6fxlg0s5Wny08uRBYZcQ3TUoyzAOBgNVHQ8BAf8EBAMC
AYYwCgYIKoZIzj0EAwMDaQAwZgIxAORaz+MBVoFBTmZ93j2G2vYTwA6T5hWzBWrx
CrI54pKn5g6At56DBrkjrwZF5T1enAIxAJe/LZ9xpDkAdxDgGJFN8gZYLRWc0NRy
Rb4hihy5vj9L+w9uKc9VfEBIFuhT7Z3ljg==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEADCCAuigAwIBAgIQB/57HSuaqUkLaasdjxUdPjANBgkqhkiG9w0BAQsFADCB
mDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChB
bWF6b24gUkRTIGFwLXNvdXRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUxOTE3NDAzNFoYDzIwNjEwNTE5MTg0MDM0WjCBmDEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChBbWF6
b24gUkRTIGFwLXNvdXRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtbkaoVsUS76o
TgLFmcnaB8cswBk1M3Bf4IVRcwWT3a1HeJSnaJUqWHCJ+u3ip/zGVOYl0gN1MgBb
MuQRIJiB95zGVcIa6HZtx00VezDTr3jgGWRHmRjNVCCHGmxOZWvJjsIE1xavT/1j
QYV/ph4EZEIZ/qPq7e3rHohJaHDe23Z7QM9kbyqp2hANG2JtU/iUhCxqgqUHNozV
Zd0l5K6KnltZQoBhhekKgyiHqdTrH8fWajYl5seD71bs0Axowb+Oh0rwmrws3Db2
Dh+oc2PwREnjHeca9/1C6J2vhY+V0LGaJmnnIuOANrslx2+bgMlyhf9j0Bv8AwSi
dSWsobOhNQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQb7vJT
VciLN72yJGhaRKLn6Krn2TAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQAD
ggEBAAxEj8N9GslReAQnNOBpGl8SLgCMTejQ6AW/bapQvzxrZrfVOZOYwp/5oV0f
9S1jcGysDM+DrmfUJNzWxq2Y586R94WtpH4UpJDGqZp+FuOVJL313te4609kopzO
lDdmd+8z61+0Au93wB1rMiEfnIMkOEyt7D2eTFJfJRKNmnPrd8RjimRDlFgcLWJA
3E8wca67Lz/G0eAeLhRHIXv429y8RRXDtKNNz0wA2RwURWIxyPjn1fHjA9SPDkeW
E1Bq7gZj+tBnrqz+ra3yjZ2blss6Ds3/uRY6NYqseFTZWmQWT7FolZEnT9vMUitW
I0VynUbShVpGf6946e0vgaaKw20=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID/jCCAuagAwIBAgIQGyUVTaVjYJvWhroVEiHPpDANBgkqhkiG9w0BAQsFADCB
lzELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdB
bWF6b24gUkRTIHVzLXdlc3QtMSBSb290IENBIFJTQTIwNDggRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjEwNTE5MTkwNDA2WhgPMjA2MTA1MTkyMDA0MDZaMIGXMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpv
biBSRFMgdXMtd2VzdC0xIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANhyXpJ0t4nigRDZ
EwNtFOem1rM1k8k5XmziHKDvDk831p7QsX9ZOxl/BT59Pu/P+6W6SvasIyKls1sW
FJIjFF+6xRQcpoE5L5evMgN/JXahpKGeQJPOX9UEXVW5B8yi+/dyUitFT7YK5LZA
MqWBN/LtHVPa8UmE88RCDLiKkqiv229tmwZtWT7nlMTTCqiAHMFcryZHx0pf9VPh
x/iPV8p2gBJnuPwcz7z1kRKNmJ8/cWaY+9w4q7AYlAMaq/rzEqDaN2XXevdpsYAK
TMMj2kji4x1oZO50+VPNfBl5ZgJc92qz1ocF95SAwMfOUsP8AIRZkf0CILJYlgzk
/6u6qZECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm5jfcS9o
+LwL517HpB6hG+PmpBswDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4IB
AQAcQ6lsqxi63MtpGk9XK8mCxGRLCad51+MF6gcNz6i6PAqhPOoKCoFqdj4cEQTF
F8dCfa3pvfJhxV6RIh+t5FCk/y6bWT8Ls/fYKVo6FhHj57bcemWsw/Z0XnROdVfK
Yqbc7zvjCPmwPHEqYBhjU34NcY4UF9yPmlLOL8uO1JKXa3CAR0htIoW4Pbmo6sA4
6P0co/clW+3zzsQ92yUCjYmRNeSbdXbPfz3K/RtFfZ8jMtriRGuO7KNxp8MqrUho
HK8O0mlSUxGXBZMNicfo7qY8FD21GIPH9w5fp5oiAl7lqFzt3E3sCLD3IiVJmxbf
fUwpGd1XZBBSdIxysRLM6j48
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrTCCAjOgAwIBAgIQU+PAILXGkpoTcpF200VD/jAKBggqhkjOPQQDAzCBljEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMS8wLQYDVQQDDCZBbWF6
b24gUkRTIGFwLWVhc3QtMSBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTAgFw0yMTA1MjUyMTQ1MTFaGA8yMTIxMDUyNTIyNDUxMVowgZYxCzAJBgNV
BAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYD
VQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEvMC0GA1UEAwwmQW1hem9uIFJE
UyBhcC1lYXN0LTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1NlYXR0bGUw
djAQBgcqhkjOPQIBBgUrgQQAIgNiAAT3tFKE8Kw1sGQAvNLlLhd8OcGhlc7MiW/s
NXm3pOiCT4vZpawKvHBzD76Kcv+ZZzHRxQEmG1/muDzZGlKR32h8AAj+NNO2Wy3d
CKTtYMiVF6Z2zjtuSkZQdjuQbe4eQ7qjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD
VR0OBBYEFAiSQOp16Vv0Ohpvqcbd2j5RmhYNMA4GA1UdDwEB/wQEAwIBhjAKBggq
hkjOPQQDAwNoADBlAjBVsi+5Ape0kOhMt/WFkANkslD4qXA5uqhrfAtH29Xzz2NV
tR7akiA771OaIGB/6xsCMQCZt2egCtbX7J0WkuZ2KivTh66jecJr5DHvAP4X2xtS
F/5pS+AUhcKTEGjI9jDH3ew=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICuDCCAj2gAwIBAgIQT5mGlavQzFHsB7hV6Mmy6TAKBggqhkjOPQQDAzCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLXNvdXRoZWFzdC0yIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyNDIwNTAxNVoYDzIxMjEwNTI0MjE1MDE1WjCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLXNvdXRoZWFzdC0yIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEcm4BBBjYK7clwm0HJRWS
flt3iYwoJbIXiXn9c1y3E+Vb7bmuyKhS4eO8mwO4GefUcXObRfoHY2TZLhMJLVBQ
7MN2xDc0RtZNj07BbGD3VAIFRTDX0mH9UNYd0JQM3t/Oo0IwQDAPBgNVHRMBAf8E
BTADAQH/MB0GA1UdDgQWBBRrd5ITedfAwrGo4FA9UaDaGFK3rjAOBgNVHQ8BAf8E
BAMCAYYwCgYIKoZIzj0EAwMDaQAwZgIxAPBNqmVv1IIA3EZyQ6XuVf4gj79/DMO8
bkicNS1EcBpUqbSuU4Zwt2BYc8c/t7KVOQIxAOHoWkoKZPiKyCxfMtJpCZySUG+n
sXgB/LOyWE5BJcXUfm+T1ckeNoWeUUMOLmnJjg==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgIRAJcDeinvdNrDQBeJ8+t38WQwDQYJKoZIhvcNAQELBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1zb3V0aGVhc3QtNCBSb290IENBIFJTQTIwNDggRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjIwNTI1MTY0OTE2WhgPMjA2MjA1MjUxNzQ5MTZa
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtc291dGhlYXN0LTQgUm9vdCBDQSBSU0EyMDQ4IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
k8DBNkr9tMoIM0NHoFiO7cQfSX0cOMhEuk/CHt0fFx95IBytx7GHCnNzpM27O5z6
x6iRhfNnx+B6CrGyCzOjxvPizneY+h+9zfvNz9jj7L1I2uYMuiNyOKR6FkHR46CT
1CiArfVLLPaTqgD/rQjS0GL2sLHS/0dmYipzynnZcs613XT0rAWdYDYgxDq7r/Yi
Xge5AkWQFkMUq3nOYDLCyGGfQqWKkwv6lZUHLCDKf+Y0Uvsrj8YGCI1O8mF0qPCQ
lmlfaDvbuBu1AV+aabmkvyFj3b8KRIlNLEtQ4N8KGYR2Jdb82S4YUGIOAt4wuuFt
1B7AUDLk3V/u+HTWiwfoLQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
DgQWBBSNpcjz6ArWBtAA+Gz6kyyZxrrgdDAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZI
hvcNAQELBQADggEBAGJEd7UgOzHYIcQRSF7nSYyjLROyalaIV9AX4WXW/Cqlul1c
MblP5etDZm7A/thliZIWAuyqv2bNicmS3xKvNy6/QYi1YgxZyy/qwJ3NdFl067W0
t8nGo29B+EVK94IPjzFHWShuoktIgp+dmpijB7wkTIk8SmIoe9yuY4+hzgqk+bo4
ms2SOXSN1DoQ75Xv+YmztbnZM8MuWhL1T7hA4AMorzTQLJ9Pof8SpSdMHeDsHp0R
01jogNFkwy25nw7cL62nufSuH2fPYGWXyNDg+y42wKsKWYXLRgUQuDVEJ2OmTFMB
T0Vf7VuNijfIA9hkN2d3K53m/9z5WjGPSdOjGhg=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID/jCCAuagAwIBAgIQRiwspKyrO0xoxDgSkqLZczANBgkqhkiG9w0BAQsFADCB
lzELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdB
bWF6b24gUkRTIHVzLXdlc3QtMiBSb290IENBIFJTQTIwNDggRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjEwNTI0MjE1OTAwWhgPMjA2MTA1MjQyMjU5MDBaMIGXMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpv
biBSRFMgdXMtd2VzdC0yIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL53Jk3GsKiu+4bx
jDfsevWbwPCNJ3H08Zp7GWhvI3Tgi39opfHYv2ku2BKFjK8N2L6RvNPSR8yplv5j
Y0tK0U+XVNl8o0ibhqRDhbTuh6KL8CFINWYzAajuxFS+CF0U6c1Q3tXLBdALxA7l
FlXJ71QrP06W31kRe7kvgrvO7qWU3/OzUf9qYw4LSiR1/VkvvRCTqcVNw09clw/M
Jbw6FSgweN65M9j7zPbjGAXSHkXyxH1Erin2fa+B9PE4ZDgX9cp2C1DHewYJQL/g
SepwwcudVNRN1ibKH7kpMrgPnaNIVNx5sXVsTjk6q2ZqYw3SVHegltJpLy/cZReP
mlivF2kCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUmTcQd6o1
CuS65MjBrMwQ9JJjmBwwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4IB
AQAKSDSIzl956wVddPThf2VAzI8syw9ngSwsEHZvxVGHBvu5gg618rDyguVCYX9L
4Kw/xJrk6S3qxOS2ZDyBcOpsrBskgahDFIunzoRP3a18ARQVq55LVgfwSDQiunch
Bd05cnFGLoiLkR5rrkgYaP2ftn3gRBRaf0y0S3JXZ2XB3sMZxGxavYq9mfiEcwB0
LMTMQ1NYzahIeG6Jm3LqRqR8HkzP/Ztq4dT2AtSLvFebbNMiWqeqT7OcYp94HTYT
zqrtaVdUg9bwyAUCDgy0GV9RHDIdNAOInU/4LEETovrtuBU7Z1q4tcHXvN6Hd1H8
gMb0mCG5I393qW5hFsA/diFb
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgIRAPQAvihfjBg/JDbj6U64K98wDQYJKoZIhvcNAQELBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1ub3J0aGVhc3QtMiBSb290IENBIFJTQTIwNDggRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNTIwMTYyODQxWhgPMjA2MTA1MjAxNzI4NDFa
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtbm9ydGhlYXN0LTIgUm9vdCBDQSBSU0EyMDQ4IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
vJ9lgyksCxkBlY40qOzI1TCj/Q0FVGuPL/Z1Mw2YN0l+41BDv0FHApjTUkIKOeIP
nwDwpXTa3NjYbk3cOZ/fpH2rYJ++Fte6PNDGPgKppVCUh6x3jiVZ1L7wOgnTdK1Q
Trw8440IDS5eLykRHvz8OmwvYDl0iIrt832V0QyOlHTGt6ZJ/aTQKl12Fy3QBLv7
stClPzvHTrgWqVU6uidSYoDtzHbU7Vda7YH0wD9IUoMBf7Tu0rqcE4uH47s2XYkc
SdLEoOg/Ngs7Y9B1y1GCyj3Ux7hnyvCoRTw014QyNB7dTatFMDvYlrRDGG14KeiU
UL7Vo/+EejWI31eXNLw84wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
DgQWBBQkgTWFsNg6wA3HbbihDQ4vpt1E2zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZI
hvcNAQELBQADggEBAGz1Asiw7hn5WYUj8RpOCzpE0h/oBZcnxP8wulzZ5Xd0YxWO
0jYUcUk3tTQy1QvoY+Q5aCjg6vFv+oFBAxkib/SmZzp4xLisZIGlzpJQuAgRkwWA
6BVMgRS+AaOMQ6wKPgz1x4v6T0cIELZEPq3piGxvvqkcLZKdCaeC3wCS6sxuafzZ
4qA3zMwWuLOzRftgX2hQto7d/2YkRXga7jSvQl3id/EI+xrYoH6zIWgjdU1AUaNq
NGT7DIo47vVMfnd9HFZNhREsd4GJE83I+JhTqIxiKPNxrKgESzyADmNPt0gXDnHo
tbV1pMZz5HpJtjnP/qVZhEK5oB0tqlKPv9yx074=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICuTCCAj6gAwIBAgIRAKp1Rn3aL/g/6oiHVIXtCq8wCgYIKoZIzj0EAwMwgZsx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE0MDIGA1UEAwwrQW1h
em9uIFJEUyBhcC1ub3J0aGVhc3QtMyBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UE
BwwHU2VhdHRsZTAgFw0yMTA1MjQyMDMyMTdaGA8yMTIxMDUyNDIxMzIxN1owgZsx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE0MDIGA1UEAwwrQW1h
em9uIFJEUyBhcC1ub3J0aGVhc3QtMyBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UE
BwwHU2VhdHRsZTB2MBAGByqGSM49AgEGBSuBBAAiA2IABGTYWPILeBJXfcL3Dz4z
EWMUq78xB1HpjBwHoTURYfcMd5r96BTVG6yaUBWnAVCMeeD6yTG9a1eVGNhG14Hk
ZAEjgLiNB7RRbEG5JZ/XV7W/vODh09WCst2y9SLKsdgeAaNCMEAwDwYDVR0TAQH/
BAUwAwEB/zAdBgNVHQ4EFgQUoE0qZHmDCDB+Bnm8GUa/evpfPwgwDgYDVR0PAQH/
BAQDAgGGMAoGCCqGSM49BAMDA2kAMGYCMQCnil5MMwhY3qoXv0xvcKZGxGPaBV15
0CCssCKn0oVtdJQfJQ3Jrf3RSaEyijXIJsoCMQC35iJi4cWoNX3N/qfgnHohW52O
B5dg0DYMqy5cNZ40+UcAanRMyqNQ6P7fy3umGco=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICtzCCAj2gAwIBAgIQPXnDTPegvJrI98qz8WxrMjAKBggqhkjOPQQDAzCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIEJldGEgdXMtZWFzdC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUxODIxNDAxMloYDzIxMjEwNTE4MjI0MDEyWjCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIEJldGEgdXMtZWFzdC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEI0sR7gwutK5AB46hM761
gcLTGBIYlURSEoM1jcBwy56CL+3CJKZwLLyJ7qoOKfWbu5GsVLUTWS8MV6Nw33cx
2KQD2svb694wi+Px2f4n9+XHkEFQw8BbiodDD7RZA70fo0IwQDAPBgNVHRMBAf8E
BTADAQH/MB0GA1UdDgQWBBTQSioOvnVLEMXwNSDg+zgln/vAkjAOBgNVHQ8BAf8E
BAMCAYYwCgYIKoZIzj0EAwMDaAAwZQIxAMwu1hqm5Bc98uE/E0B5iMYbBQ4kpMxO
tP8FTfz5UR37HUn26nXE0puj6S/Ffj4oJgIwXI7s2c26tFQeqzq6u3lrNJHp5jC9
Uxlo/hEJOLoDj5jnpxo8dMAtCNoQPaHdfL0P
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrjCCAjWgAwIBAgIQGKVv+5VuzEZEBzJ+bVfx2zAKBggqhkjOPQQDAzCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGFwLXNvdXRoLTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTE5MTc1MDU5WhgPMjEyMTA1MTkxODUwNTlaMIGXMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpvbiBS
RFMgYXAtc291dGgtMSBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwHU2VhdHRs
ZTB2MBAGByqGSM49AgEGBSuBBAAiA2IABMqdLJ0tZF/DGFZTKZDrGRJZID8ivC2I
JRCYTWweZKCKSCAzoiuGGHzJhr5RlLHQf/QgmFcgXsdmO2n3CggzhA4tOD9Ip7Lk
P05eHd2UPInyPCHRgmGjGb0Z+RdQ6zkitKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAd
BgNVHQ4EFgQUC1yhRgVqU5bR8cGzOUCIxRpl4EYwDgYDVR0PAQH/BAQDAgGGMAoG
CCqGSM49BAMDA2cAMGQCMG0c/zLGECRPzGKJvYCkpFTCUvdP4J74YP0v/dPvKojL
t/BrR1Tg4xlfhaib7hPc7wIwFvgqHes20CubQnZmswbTKLUrgSUW4/lcKFpouFd2
t2/ewfi/0VhkeUW+IiHhOMdU
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGCTCCA/GgAwIBAgIRAOXxJuyXVkbfhZCkS/dOpfEwDQYJKoZIhvcNAQEMBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1ub3J0aGVhc3QtMSBSb290IENBIFJTQTQwOTYgRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNTI1MjE1OTEwWhgPMjEyMTA1MjUyMjU5MTBa
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtbm9ydGhlYXN0LTEgUm9vdCBDQSBSU0E0MDk2IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA
xiP4RDYm4tIS12hGgn1csfO8onQDmK5SZDswUpl0HIKXOUVVWkHNlINkVxbdqpqH
FhbyZmNN6F/EWopotMDKe1B+NLrjNQf4zefv2vyKvPHJXhxoKmfyuTd5Wk8k1F7I
lNwLQzznB+ElhrLIDJl9Ro8t31YBBNFRGAGEnxyACFGcdkjlsa52UwfYrwreEg2l
gW5AzqHgjFfj9QRLydeU/n4bHm0F1adMsV7P3rVwilcUlqsENDwXnWyPEyv3sw6F
wNemLEs1129mB77fwvySb+lLNGsnzr8w4wdioZ74co+T9z2ca+eUiP+EQccVw1Is
D4Fh57IjPa6Wuc4mwiUYKkKY63+38aCfEWb0Qoi+zW+mE9nek6MOQ914cN12u5LX
dBoYopphRO5YmubSN4xcBy405nIdSdbrAVWwxXnVVyjqjknmNeqQsPZaxAhdoKhV
AqxNr8AUAdOAO6Sz3MslmcLlDXFihrEEOeUbpg/m1mSUUHGbu966ajTG1FuEHHwS
7WB52yxoJo/tHvt9nAWnh3uH5BHmS8zn6s6CGweWKbX5yICnZ1QFR1e4pogxX39v
XD6YcNOO+Vn+HY4nXmjgSYVC7l+eeP8eduMg1xJujzjrbmrXU+d+cBObgdTOAlpa
JFHaGwYw1osAwPCo9cZ2f04yitBfj9aPFia8ASKldakCAwEAAaNCMEAwDwYDVR0T
AQH/BAUwAwEB/zAdBgNVHQ4EFgQUqKS+ltlior0SyZKYAkJ/efv55towDgYDVR0P
AQH/BAQDAgGGMA0GCSqGSIb3DQEBDAUAA4ICAQAdElvp8bW4B+Cv+1WSN87dg6TN
wGyIjJ14/QYURgyrZiYpUmZpj+/pJmprSWXu4KNyqHftmaidu7cdjL5nCAvAfnY5
/6eDDbX4j8Gt9fb/6H9y0O0dn3mUPSEKG0crR+JRFAtPhn/2FNvst2P82yguWLv0
pHjHVUVcq+HqDMtUIJsTPYjSh9Iy77Q6TOZKln9dyDOWJpCSkiUWQtMAKbCSlvzd
zTs/ahqpT+zLfGR1SR+T3snZHgQnbnemmz/XtlKl52NxccARwfcEEKaCRQyGq/pR
0PVZasyJS9JY4JfQs4YOdeOt4UMZ8BmW1+BQWGSkkb0QIRl8CszoKofucAlqdPcO
IT/ZaMVhI580LFGWiQIizWFskX6lqbCyHqJB3LDl8gJISB5vNTHOHpvpMOMs5PYt
cRl5Mrksx5MKMqG7y5R734nMlZxQIHjL5FOoOxTBp9KeWIL/Ib89T2QDaLw1SQ+w
ihqWBJ4ZdrIMWYpP3WqM+MXWk7WAem+xsFJdR+MDgOOuobVQTy5dGBlPks/6gpjm
rO9TjfQ36ppJ3b7LdKUPeRfnYmlR5RU4oyYJ//uLbClI443RZAgxaCXX/nyc12lr
eVLUMNF2abLX4/VF63m2/Z9ACgMRfqGshPssn1NN33OonrotQoj4S3N9ZrjvzKt8
iHcaqd60QKpfiH2A3A==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICuDCCAj2gAwIBAgIQPaVGRuu86nh/ylZVCLB0MzAKBggqhkjOPQQDAzCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLW5vcnRoZWFzdC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyNTIyMDMxNloYDzIxMjEwNTI1MjMwMzE2WjCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLW5vcnRoZWFzdC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEexNURoB9KE93MEtEAlJG
obz4LS/pD2hc8Gczix1WhVvpJ8bN5zCDXaKdnDMCebetyRQsmQ2LYlfmCwpZwSDu
0zowB11Pt3I5Avu2EEcuKTlKIDMBeZ1WWuOd3Tf7MEAMo0IwQDAPBgNVHRMBAf8E
BTADAQH/MB0GA1UdDgQWBBSaYbZPBvFLikSAjpa8mRJvyArMxzAOBgNVHQ8BAf8E
BAMCAYYwCgYIKoZIzj0EAwMDaQAwZgIxAOEJkuh3Zjb7Ih/zuNRd1RBqmIYcnyw0
nwUZczKXry+9XebYj3VQxSRNadrarPWVqgIxAMg1dyGoDAYjY/L/9YElyMnvHltO
PwpJShmqHvCLc/mXMgjjYb/akK7yGthvW6j/uQ==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGCDCCA/CgAwIBAgIQChu3v5W1Doil3v6pgRIcVzANBgkqhkiG9w0BAQwFADCB
nDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTUwMwYDVQQDDCxB
bWF6b24gUkRTIEJldGEgdXMtZWFzdC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4G
A1UEBwwHU2VhdHRsZTAgFw0yMTA1MTgyMTM0MTVaGA8yMTIxMDUxODIyMzQxNVow
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBCZXRhIHVzLWVhc3QtMSBSb290IENBIFJTQTQwOTYgRzExEDAO
BgNVBAcMB1NlYXR0bGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC1
FUGQ5tf3OwpDR6hGBxhUcrkwKZhaXP+1St1lSOQvjG8wXT3RkKzRGMvb7Ee0kzqI
mzKKe4ASIhtV3UUWdlNmP0EA3XKnif6N79MismTeGkDj75Yzp5A6tSvqByCgxIjK
JqpJrch3Dszoyn8+XhwDxMZtkUa5nQVdJgPzJ6ltsQ8E4SWLyLtTu0S63jJDkqYY
S7cQblk7y7fel+Vn+LS5dGTdRRhMvSzEnb6mkVBaVzRyVX90FNUED06e8q+gU8Ob
htvQlf9/kRzHwRAdls2YBhH40ZeyhpUC7vdtPwlmIyvW5CZ/QiG0yglixnL6xahL
pbmTuTSA/Oqz4UGQZv2WzHe1lD2gRHhtFX2poQZeNQX8wO9IcUhrH5XurW/G9Xwl
Sat9CMPERQn4KC3HSkat4ir2xaEUrjfg6c4XsGyh2Pk/LZ0gLKum0dyWYpWP4JmM
RQNjrInXPbMhzQObozCyFT7jYegS/3cppdyy+K1K7434wzQGLU1gYXDKFnXwkX8R
bRKgx2pHNbH5lUddjnNt75+e8m83ygSq/ZNBUz2Ur6W2s0pl6aBjwaDES4VfWYlI
jokcmrGvJNDfQWygb1k00eF2bzNeNCHwgWsuo3HSxVgc/WGsbcGrTlDKfz+g3ich
bXUeUidPhRiv5UQIVCLIHpHuin3bj9lQO/0t6p+tAQIDAQABo0IwQDAPBgNVHRMB
Af8EBTADAQH/MB0GA1UdDgQWBBSFmMBgm5IsRv3hLrvDPIhcPweXYTAOBgNVHQ8B
Af8EBAMCAYYwDQYJKoZIhvcNAQEMBQADggIBAAa2EuozymOsQDJlEi7TqnyA2OhT
GXPfYqCyMJVkfrqNgcnsNpCAiNEiZbb+8sIPXnT8Ay8hrwJYEObJ5b7MHXpLuyft
z0Pu1oFLKnQxKjNxrIsCvaB4CRRdYjm1q7EqGhMGv76se9stOxkOqO9it31w/LoU
ENDk7GLsSqsV1OzYLhaH8t+MaNP6rZTSNuPrHwbV3CtBFl2TAZ7iKgKOhdFz1Hh9
Pez0lG+oKi4mHZ7ajov6PD0W7njn5KqzCAkJR6OYmlNVPjir+c/vUtEs0j+owsMl
g7KE5g4ZpTRShyh5BjCFRK2tv0tkqafzNtxrKC5XNpEkqqVTCnLcKG+OplIEadtr
C7UWf4HyhCiR+xIyxFyR05p3uY/QQU/5uza7GlK0J+U1sBUytx7BZ+Fo8KQfPPqV
CqDCaYUksoJcnJE/KeoksyqNQys7sDGJhkd0NeUGDrFLKHSLhIwAMbEWnqGxvhli
E7sP2E5rI/I9Y9zTbLIiI8pfeZlFF8DBdoP/Hzg8pqsiE/yiXSFTKByDwKzGwNqz
F0VoFdIZcIbLdDbzlQitgGpJtvEL7HseB0WH7B2PMMD8KPJlYvPveO3/6OLzCsav
+CAkvk47NQViKMsUTKOA0JDCW+u981YRozxa3K081snhSiSe83zIPBz1ikldXxO9
6YYLNPRrj3mi9T/f
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrjCCAjSgAwIBAgIRAMkvdFnVDb0mWWFiXqnKH68wCgYIKoZIzj0EAwMwgZYx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEvMC0GA1UEAwwmQW1h
em9uIFJEUyB1cy13ZXN0LTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTE5MTkxMzI0WhgPMjEyMTA1MTkyMDEzMjRaMIGWMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExLzAtBgNVBAMMJkFtYXpvbiBS
RFMgdXMtd2VzdC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdTZWF0dGxl
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEy86DB+9th/0A5VcWqMSWDxIUblWTt/R0
ao6Z2l3vf2YDF2wt1A2NIOGpfQ5+WAOJO/IQmnV9LhYo+kacB8sOnXdQa6biZZkR
IyouUfikVQAKWEJnh1Cuo5YMM4E2sUt5o0IwQDAPBgNVHRMBAf8EBTADAQH/MB0G
A1UdDgQWBBQ8u3OnecANmG8OoT7KLWDuFzZwBTAOBgNVHQ8BAf8EBAMCAYYwCgYI
KoZIzj0EAwMDaAAwZQIwQ817qkb7mWJFnieRAN+m9W3E0FLVKaV3zC5aYJUk2fcZ
TaUx3oLp3jPLGvY5+wgeAjEA6wAicAki4ZiDfxvAIuYiIe1OS/7H5RA++R8BH6qG
iRzUBM/FItFpnkus7u/eTkvo
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrzCCAjWgAwIBAgIQS/+Ryfgb/IOVEa1pWoe8oTAKBggqhkjOPQQDAzCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGFwLXNvdXRoLTIgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjIwNjA2MjE1NDQyWhgPMjEyMjA2MDYyMjU0NDJaMIGXMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpvbiBS
RFMgYXAtc291dGgtMiBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwHU2VhdHRs
ZTB2MBAGByqGSM49AgEGBSuBBAAiA2IABDsX6fhdUWBQpYTdseBD/P3s96Dtw2Iw
OrXKNToCnmX5nMkUGdRn9qKNiz1pw3EPzaPxShbYwQ7LYP09ENK/JN4QQjxMihxC
jLFxS85nhBQQQGRCWikDAe38mD8fSvREQKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAd
BgNVHQ4EFgQUIh1xZiseQYFjPYKJmGbruAgRH+AwDgYDVR0PAQH/BAQDAgGGMAoG
CCqGSM49BAMDA2gAMGUCMFudS4zLy+UUGrtgNLtRMcu/DZ9BUzV4NdHxo0bkG44O
thnjl4+wTKI6VbyAbj2rkgIxAOHps8NMITU5DpyiMnKTxV8ubb/WGHrLl0BjB8Lw
ETVJk5DNuZvsIIcm7ykk6iL4Tw==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGBDCCA+ygAwIBAgIQDcEmNIAVrDpUw5cH5ynutDANBgkqhkiG9w0BAQwFADCB
mjELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTMwMQYDVQQDDCpB
bWF6b24gUkRTIG1lLWNlbnRyYWwtMSBSb290IENBIFJTQTQwOTYgRzExEDAOBgNV
BAcMB1NlYXR0bGUwIBcNMjIwNTA3MDA0MDIzWhgPMjEyMjA1MDcwMTQwMjNaMIGa
MQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5j
LjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMzAxBgNVBAMMKkFt
YXpvbiBSRFMgbWUtY2VudHJhbC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UE
BwwHU2VhdHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKvADk8t
Fl9bFlU5sajLPPDSOUpPAkKs6iPlz+27o1GJC88THcOvf3x0nVAcu9WYe9Qaas+4
j4a0vv51agqyODRD/SNi2HnqW7DbtLPAm6KBHe4twl28ItB/JD5g7u1oPAHFoXMS
cH1CZEAs5RtlZGzJhcBXLFsHNv/7+SCLyZ7+2XFh9OrtgU4wMzkHoRNndhfwV5bu
17bPTwuH+VxH37zXf1mQ/KjhuJos0C9dL0FpjYBAuyZTAWhZKs8dpSe4DI544z4w
gkwUB4bC2nA1TBzsywEAHyNuZ/xRjNpWvx0ToWAA2iFJqC3VO3iKcnBplMvaUuMt
jwzVSNBnKcoabXCZL2XDLt4YTZR8FSwz05IvsmwcPB7uNTBXq3T9sjejW8QQK3vT
tzyfLq4jKmQE7PoS6cqYm+hEPm2hDaC/WP9bp3FdEJxZlPH26fq1b7BWYWhQ9pBA
Nv9zTnzdR1xohTyOJBUFQ81ybEzabqXqVXUIANqIOaNcTB09/sLJ7+zuMhp3mwBu
LtjfJv8PLuT1r63bU3seROhKA98b5KfzjvbvPSg3vws78JQyoYGbqNyDfyjVjg3U
v//AdVuPie6PNtdrW3upZY4Qti5IjP9e3kimaJ+KAtTgMRG56W0WxD3SP7+YGGbG
KhntDOkKsN39hLpn9UOafTIqFu7kIaueEy/NAgMBAAGjQjBAMA8GA1UdEwEB/wQF
MAMBAf8wHQYDVR0OBBYEFHAems86dTwdZbLe8AaPy3kfIUVoMA4GA1UdDwEB/wQE
AwIBhjANBgkqhkiG9w0BAQwFAAOCAgEAOBHpp0ICx81kmeoBcZTrMdJs2gnhcd85
FoSCjXx9H5XE5rmN/lQcxxOgj8hr3uPuLdLHu+i6THAyzjrl2NA1FWiqpfeECGmy
0jm7iZsYORgGQYp/VKnDrwnKNSqlZvOuRr0kfUexwFlr34Y4VmupvEOK/RdGsd3S
+3hiemcHse9ST/sJLHx962AWMkN86UHPscJEe4+eT3f2Wyzg6La8ARwdWZSNS+WH
ZfybrncMmuiXuUdHv9XspPsqhKgtHhcYeXOGUtrwQPLe3+VJZ0LVxhlTWr9951GZ
GfmWwTV/9VsyKVaCFIXeQ6L+gjcKyEzYF8wpMtQlSc7FFqwgC4bKxvMBSaRy88Nr
lV2+tJD/fr8zGUeBK44Emon0HKDBWGX+/Hq1ZIv0Da0S+j6LbA4fusWxtGfuGha+
luhHgVInCpALIOamiBEdGhILkoTtx7JrYppt3/Raqg9gUNCOOYlCvGhqX7DXeEfL
DGabooiY2FNWot6h04JE9nqGj5QqT8D6t/TL1nzxhRPzbcSDIHUd/b5R+a0bAA+7
YTU6JqzEVCWKEIEynYmqikgLMGB/OzWsgyEL6822QW6hJAQ78XpbNeCzrICF4+GC
7KShLnwuWoWpAb26268lvOEvCTFM47VC6jNQl97md+2SA9Ma81C9wflid2M83Wle
cuLMVcQZceE=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEADCCAuigAwIBAgIQAhAteLRCvizAElaWORFU2zANBgkqhkiG9w0BAQsFADCB
mDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChB
bWF6b24gUkRTIG1lLXNvdXRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyMDE3MDkxNloYDzIwNjEwNTIwMTgwOTE2WjCBmDEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChBbWF6
b24gUkRTIG1lLXNvdXRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA+qg7JAcOVKjh
N83SACnBFZPyB63EusfDr/0V9ZdL8lKcmZX9sv/CqoBo3N0EvBqHQqUUX6JvFb7F
XrMUZ740kr28gSRALfXTFgNODjXeDsCtEkKRTkac/UM8xXHn+hR7UFRPHS3e0GzI
iLiwQWDkr0Op74W8aM0CfaVKvh2bp4BI1jJbdDnQ9OKXpOxNHGUf0ZGb7TkNPkgI
b2CBAc8J5o3H9lfw4uiyvl6Fz5JoP+A+zPELAioYBXDrbE7wJeqQDJrETWqR9VEK
BXURCkVnHeaJy123MpAX2ozf4pqk0V0LOEOZRS29I+USF5DcWr7QIXR/w2I8ws1Q
7ys+qbE+kQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQFJ16n
1EcCMOIhoZs/F9sR+Jy++zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQAD
ggEBAOc5nXbT3XTDEZsxX2iD15YrQvmL5m13B3ImZWpx/pqmObsgx3/dg75rF2nQ
qS+Vl+f/HLh516pj2BPP/yWCq12TRYigGav8UH0qdT3CAClYy2o+zAzUJHm84oiB
ud+6pFVGkbqpsY+QMpJUbZWu52KViBpJMYsUEy+9cnPSFRVuRAHjYynSiLk2ZEjb
Wkdc4x0nOZR5tP0FgrX0Ve2KcjFwVQJVZLgOUqmFYQ/G0TIIGTNh9tcmR7yp+xJR
A2tbPV2Z6m9Yxx4E8lLEPNuoeouJ/GR4CkMEmF8cLwM310t174o3lKKUXJ4Vs2HO
Wj2uN6R9oI+jGLMSswTzCNV1vgc=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICuDCCAj6gAwIBAgIRAOocLeZWjYkG/EbHmscuy8gwCgYIKoZIzj0EAwMwgZsx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE0MDIGA1UEAwwrQW1h
em9uIFJEUyBhcC1zb3V0aGVhc3QtMSBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UE
BwwHU2VhdHRsZTAgFw0yMTA1MjEyMTUwMDFaGA8yMTIxMDUyMTIyNTAwMVowgZsx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE0MDIGA1UEAwwrQW1h
em9uIFJEUyBhcC1zb3V0aGVhc3QtMSBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UE
BwwHU2VhdHRsZTB2MBAGByqGSM49AgEGBSuBBAAiA2IABCEr3jq1KtRncnZfK5cq
btY0nW6ZG3FMbh7XwBIR6Ca0f8llGZ4vJEC1pXgiM/4Dh045B9ZIzNrR54rYOIfa
2NcYZ7mk06DjIQML64hbAxbQzOAuNzLPx268MrlL2uW2XaNCMEAwDwYDVR0TAQH/
BAUwAwEB/zAdBgNVHQ4EFgQUln75pChychwN4RfHl+tOinMrfVowDgYDVR0PAQH/
BAQDAgGGMAoGCCqGSM49BAMDA2gAMGUCMGiyPINRU1mwZ4Crw01vpuPvxZxb2IOr
yX3RNlOIu4We1H+5dQk5tIvH8KGYFbWEpAIxAO9NZ6/j9osMhLgZ0yj0WVjb+uZx
YlZR9fyFisY/jNfX7QhSk+nrc3SFLRUNtpXrng==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBTCCAu2gAwIBAgIRAKiaRZatN8eiz9p0s0lu0rQwDQYJKoZIhvcNAQELBQAw
gZoxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEzMDEGA1UEAwwq
QW1hem9uIFJEUyBjYS1jZW50cmFsLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYD
VQQHDAdTZWF0dGxlMCAXDTIxMDUyMTIyMDIzNVoYDzIwNjEwNTIxMjMwMjM1WjCB
mjELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTMwMQYDVQQDDCpB
bWF6b24gUkRTIGNhLWNlbnRyYWwtMSBSb290IENBIFJTQTIwNDggRzExEDAOBgNV
BAcMB1NlYXR0bGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCygVMf
qB865IR9qYRBRFHn4eAqGJOCFx+UbraQZmjr/mnRqSkY+nhbM7Pn/DWOrRnxoh+w
q5F9ZxdZ5D5T1v6kljVwxyfFgHItyyyIL0YS7e2h7cRRscCM+75kMedAP7icb4YN
LfWBqfKHbHIOqvvQK8T6+Emu/QlG2B5LvuErrop9K0KinhITekpVIO4HCN61cuOe
CADBKF/5uUJHwS9pWw3uUbpGUwsLBuhJzCY/OpJlDqC8Y9aToi2Ivl5u3/Q/sKjr
6AZb9lx4q3J2z7tJDrm5MHYwV74elGSXoeoG8nODUqjgklIWAPrt6lQ3WJpO2kug
8RhCdSbWkcXHfX95AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
FOIxhqTPkKVqKBZvMWtKewKWDvDBMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0B
AQsFAAOCAQEAqoItII89lOl4TKvg0I1EinxafZLXIheLcdGCxpjRxlZ9QMQUN3yb
y/8uFKBL0otbQgJEoGhxm4h0tp54g28M6TN1U0332dwkjYxUNwvzrMaV5Na55I2Z
1hq4GB3NMXW+PvdtsgVOZbEN+zOyOZ5MvJHEQVkT3YRnf6avsdntltcRzHJ16pJc
Y8rR7yWwPXh1lPaPkxddrCtwayyGxNbNmRybjR48uHRhwu7v2WuAMdChL8H8bp89
TQLMrMHgSbZfee9hKhO4Zebelf1/cslRSrhkG0ESq6G5MUINj6lMg2g6F0F7Xz2v
ncD/vuRN5P+vT8th/oZ0Q2Gc68Pun0cn/g==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID/zCCAuegAwIBAgIRAJYlnmkGRj4ju/2jBQsnXJYwDQYJKoZIhvcNAQELBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyB1cy1lYXN0LTIgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyMTIzMDQ0NFoYDzIwNjEwNTIyMDAwNDQ0WjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIHVzLWVhc3QtMiBSb290IENBIFJTQTIwNDggRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC74V3eigv+pCj5
nqDBqplY0Jp16pTeNB06IKbzb4MOTvNde6QjsZxrE1xUmprT8LxQqN9tI3aDYEYk
b9v4F99WtQVgCv3Y34tYKX9NwWQgwS1vQwnIR8zOFBYqsAsHEkeJuSqAB12AYUSd
Zv2RVFjiFmYJho2X30IrSLQfS/IE3KV7fCyMMm154+/K1Z2IJlcissydEAwgsUHw
edrE6CxJVkkJ3EvIgG4ugK/suxd8eEMztaQYJwSdN8TdfT59LFuSPl7zmF3fIBdJ
//WexcQmGabaJ7Xnx+6o2HTfkP8Zzzzaq8fvjAcvA7gyFH5EP26G2ZqMG+0y4pTx
SPVTrQEXAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFIWWuNEF
sUMOC82XlfJeqazzrkPDMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOC
AQEAgClmxcJaQTGpEZmjElL8G2Zc8lGc+ylGjiNlSIw8X25/bcLRptbDA90nuP+q
zXAMhEf0ccbdpwxG/P5a8JipmHgqQLHfpkvaXx+0CuP++3k+chAJ3Gk5XtY587jX
+MJfrPgjFt7vmMaKmynndf+NaIJAYczjhJj6xjPWmGrjM3MlTa9XesmelMwP3jep
bApIWAvCYVjGndbK9byyMq1nyj0TUzB8oJZQooaR3MMjHTmADuVBylWzkRMxbKPl
4Nlsk4Ef1JvIWBCzsMt+X17nuKfEatRfp3c9tbpGlAE/DSP0W2/Lnayxr4RpE9ds
ICF35uSis/7ZlsftODUe8wtpkQ==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIF/zCCA+egAwIBAgIRAPvvd+MCcp8E36lHziv0xhMwDQYJKoZIhvcNAQEMBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyB1cy1lYXN0LTIgUm9vdCBDQSBSU0E0MDk2IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyMTIzMTEwNloYDzIxMjEwNTIyMDAxMTA2WjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIHVzLWVhc3QtMiBSb290IENBIFJTQTQwOTYgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDbvwekKIKGcV/s
lDU96a71ZdN2pTYkev1X2e2/ICb765fw/i1jP9MwCzs8/xHBEQBJSxdfO4hPeNx3
ENi0zbM+TrMKliS1kFVe1trTTEaHYjF8BMK9yTY0VgSpWiGxGwg4tshezIA5lpu8
sF6XMRxosCEVCxD/44CFqGZTzZaREIvvFPDTXKJ6yOYnuEkhH3OcoOajHN2GEMMQ
ShuyRFDQvYkqOC/Q5icqFbKg7eGwfl4PmimdV7gOVsxSlw2s/0EeeIILXtHx22z3
8QBhX25Lrq2rMuaGcD3IOMBeBo2d//YuEtd9J+LGXL9AeOXHAwpvInywJKAtXTMq
Wsy3LjhuANFrzMlzjR2YdjkGVzeQVx3dKUzJ2//Qf7IXPSPaEGmcgbxuatxjnvfT
H85oeKr3udKnXm0Kh7CLXeqJB5ITsvxI+Qq2iXtYCc+goHNR01QJwtGDSzuIMj3K
f+YMrqBXZgYBwU2J/kCNTH31nfw96WTbOfNGwLwmVRDgguzFa+QzmQsJW4FTDMwc
7cIjwdElQQVA+Gqa67uWmyDKAnoTkudmgAP+OTBkhnmc6NJuZDcy6f/iWUdl0X0u
/tsfgXXR6ZovnHonM13ANiN7VmEVqFlEMa0VVmc09m+2FYjjlk8F9sC7Rc4wt214
7u5YvCiCsFZwx44baP5viyRZgkJVpQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/
MB0GA1UdDgQWBBQgCZCsc34nVTRbWsniXBPjnUTQ2DAOBgNVHQ8BAf8EBAMCAYYw
DQYJKoZIhvcNAQEMBQADggIBAAQas3x1G6OpsIvQeMS9BbiHG3+kU9P/ba6Rrg+E
lUz8TmL04Bcd+I+R0IyMBww4NznT+K60cFdk+1iSmT8Q55bpqRekyhcdWda1Qu0r
JiTi7zz+3w2v66akofOnGevDpo/ilXGvCUJiLOBnHIF0izUqzvfczaMZGJT6xzKq
PcEVRyAN1IHHf5KnGzUlVFv9SGy47xJ9I1vTk24JU0LWkSLzMMoxiUudVmHSqJtN
u0h+n/x3Q6XguZi1/C1KOntH56ewRh8n5AF7c+9LJJSRM9wunb0Dzl7BEy21Xe9q
03xRYjf5wn8eDELB8FZPa1PrNKXIOLYM9egdctbKEcpSsse060+tkyBrl507+SJT
04lvJ4tcKjZFqxn+bUkDQvXYj0D3WK+iJ7a8kZJPRvz8BDHfIqancY8Tgw+69SUn
WqIb+HNZqFuRs16WFSzlMksqzXv6wcDSyI7aZOmCGGEcYW9NHk8EuOnOQ+1UMT9C
Qb1GJcipjRzry3M4KN/t5vN3hIetB+/PhmgTO4gKhBETTEyPC3HC1QbdVfRndB6e
U/NF2U/t8U2GvD26TTFLK4pScW7gyw4FQyXWs8g8FS8f+R2yWajhtS9++VDJQKom
fAUISoCH+PlPRJpu/nHd1Zrddeiiis53rBaLbXu2J1Q3VqjWOmtj0HjxJJxWnYmz
Pqj2
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGATCCA+mgAwIBAgIRAI/U4z6+GF8/znpHM8Dq8G0wDQYJKoZIhvcNAQEMBQAw
gZgxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwo
QW1hem9uIFJEUyBhcC1zb3V0aC0yIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UE
BwwHU2VhdHRsZTAgFw0yMjA2MDYyMTQ4MThaGA8yMTIyMDYwNjIyNDgxOFowgZgx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwoQW1h
em9uIFJEUyBhcC1zb3V0aC0yIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwH
U2VhdHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK5WqMvyq888
3uuOtEj1FcP6iZhqO5kJurdJF59Otp2WCg+zv6I+QwaAspEWHQsKD405XfFsTGKV
SKTCwoMxwBniuChSmyhlagQGKSnRY9+znOWq0v7hgmJRwp6FqclTbubmr+K6lzPy
hs86mEp68O5TcOTYWUlPZDqfKwfNTbtCl5YDRr8Gxb5buHmkp6gUSgDkRsXiZ5VV
b3GBmXRqbnwo5ZRNAzQeM6ylXCn4jKs310lQGUrFbrJqlyxUdfxzqdlaIRn2X+HY
xRSYbHox3LVNPpJxYSBRvpQVFSy9xbX8d1v6OM8+xluB31cbLBtm08KqPFuqx+cO
I2H5F0CYqYzhyOSKJsiOEJT6/uH4ewryskZzncx9ae62SC+bB5n3aJLmOSTkKLFY
YS5IsmDT2m3iMgzsJNUKVoCx2zihAzgBanFFBsG+Xmoq0aKseZUI6vd2qpd5tUST
/wS1sNk0Ph7teWB2ACgbFE6etnJ6stwjHFZOj/iTYhlnR2zDRU8akunFdGb6CB4/
hMxGJxaqXSJeGtHm7FpadlUTf+2ESbYcVW+ui/F8sdBJseQdKZf3VdZZMgM0bcaX
NE47cauDTy72WdU9YJX/YXKYMLDE0iFHTnGpfVGsuWGPYhlwZ3dFIO07mWnCRM6X
u5JXRB1oy5n5HRluMsmpSN/R92MeBxKFAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMB
Af8wHQYDVR0OBBYEFNtH0F0xfijSLHEyIkRGD9gW6NazMA4GA1UdDwEB/wQEAwIB
hjANBgkqhkiG9w0BAQwFAAOCAgEACo+5jFeY3ygxoDDzL3xpfe5M0U1WxdKk+az4
/OfjZvkoma7WfChi3IIMtwtKLYC2/seKWA4KjlB3rlTsCVNPnK6D+gAnybcfTKk/
IRSPk92zagwQkSUWtAk80HpVfWJzpkSU16ejiajhedzOBRtg6BwsbSqLCDXb8hXr
eXWC1S9ZceGc+LcKRHewGWPu31JDhHE9bNcl9BFSAS0lYVZqxIRWxivZ+45j5uQv
wPrC8ggqsdU3K8quV6dblUQzzA8gKbXJpCzXZihkPrYpQHTH0szvXvgebh+CNUAG
rUxm8+yTS0NFI3U+RLbcLFVzSvjMOnEwCX0SPj5XZRYYXs5ajtQCoZhTUkkwpDV8
RxXk8qGKiXwUxDO8GRvmvM82IOiXz5w2jy/h7b7soyIgdYiUydMq4Ja4ogB/xPZa
gf4y0o+bremO15HFf1MkaU2UxPK5FFVUds05pKvpSIaQWbF5lw4LHHj4ZtVup7zF
CLjPWs4Hs/oUkxLMqQDw0FBwlqa4uot8ItT8uq5BFpz196ZZ+4WXw5PVzfSxZibI
C/nwcj0AS6qharXOs8yPnPFLPSZ7BbmWzFDgo3tpglRqo3LbSPsiZR+sLeivqydr
0w4RK1btRda5Ws88uZMmW7+2aufposMKcbAdrApDEAVzHijbB/nolS5nsnFPHZoA
KDPtFEk=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICtzCCAj2gAwIBAgIQVZ5Y/KqjR4XLou8MCD5pOjAKBggqhkjOPQQDAzCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLXNvdXRoZWFzdC00IFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIyMDUyNTE2NTgzM1oYDzIxMjIwNTI1MTc1ODMzWjCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLXNvdXRoZWFzdC00IFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEbo473OmpD5vkckdJajXg
brhmNFyoSa0WCY1njuZC2zMFp3zP6rX4I1r3imrYnJd9pFH/aSiV/r6L5ACE5RPx
4qdg5SQ7JJUaZc3DWsTOiOed7BCZSzM+KTYK/2QzDMApo0IwQDAPBgNVHRMBAf8E
BTADAQH/MB0GA1UdDgQWBBTmogc06+1knsej1ltKUOdWFvwgsjAOBgNVHQ8BAf8E
BAMCAYYwCgYIKoZIzj0EAwMDaAAwZQIxAIs7TlLMbGTWNXpGiKf9DxaM07d/iDHe
F/Vv/wyWSTGdobxBL6iArQNVXz0Gr4dvPAIwd0rsoa6R0x5mtvhdRPtM37FYrbHJ
pbV+OMusQqcSLseunLBoCHenvJW0QOCQ8EDY
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICvTCCAkOgAwIBAgIQCIY7E/bFvFN2lK9Kckb0dTAKBggqhkjOPQQDAzCBnjEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTcwNQYDVQQDDC5BbWF6
b24gUkRTIFByZXZpZXcgdXMtZWFzdC0yIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYD
VQQHDAdTZWF0dGxlMCAXDTIxMDUxODIxMDUxMFoYDzIxMjEwNTE4MjIwNTEwWjCB
njELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTcwNQYDVQQDDC5B
bWF6b24gUkRTIFByZXZpZXcgdXMtZWFzdC0yIFJvb3QgQ0EgRUNDMzg0IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEMI0hzf1JCEOI
Eue4+DmcNnSs2i2UaJxHMrNGGfU7b42a7vwP53F7045ffHPBGP4jb9q02/bStZzd
VHqfcgqkSRI7beBKjD2mfz82hF/wJSITTgCLs+NRpS6zKMFOFHUNo0IwQDAPBgNV
HRMBAf8EBTADAQH/MB0GA1UdDgQWBBS8uF/6hk5mPLH4qaWv9NVZaMmyTjAOBgNV
HQ8BAf8EBAMCAYYwCgYIKoZIzj0EAwMDaAAwZQIxAO7Pu9wzLyM0X7Q08uLIL+vL
qaxe3UFuzFTWjM16MLJHbzLf1i9IDFKz+Q4hXCSiJwIwClMBsqT49BPUxVsJnjGr
EbyEk6aOOVfY1p2yQL649zh3M4h8okLnwf+bYIb1YpeU
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEADCCAuigAwIBAgIQY+JhwFEQTe36qyRlUlF8ozANBgkqhkiG9w0BAQsFADCB
mDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChB
bWF6b24gUkRTIGFmLXNvdXRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUxOTE5MjQxNloYDzIwNjEwNTE5MjAyNDE2WjCBmDEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChBbWF6
b24gUkRTIGFmLXNvdXRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnIye77j6ev40
8wRPyN2OdKFSUfI9jB20Or2RLO+RDoL43+USXdrze0Wv4HMRLqaen9BcmCfaKMp0
E4SFo47bXK/O17r6G8eyq1sqnHE+v288mWtYH9lAlSamNFRF6YwA7zncmE/iKL8J
0vePHMHP/B6svw8LULZCk+nZk3tgxQn2+r0B4FOz+RmpkoVddfqqUPMbKUxhM2wf
fO7F6bJaUXDNMBPhCn/3ayKCjYr49ErmnpYV2ZVs1i34S+LFq39J7kyv6zAgbHv9
+/MtRMoRB1CjpqW0jIOZkHBdYcd1o9p1zFn591Do1wPkmMsWdjIYj+6e7UXcHvOB
2+ScIRAcnwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQGtq2W
YSyMMxpdQ3IZvcGE+nyZqTAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQAD
ggEBAEgoP3ixJsKSD5FN8dQ01RNHERl/IFbA7TRXfwC+L1yFocKnQh4Mp/msPRSV
+OeHIvemPW/wtZDJzLTOFJ6eTolGekHK1GRTQ6ZqsWiU2fmiOP8ks4oSpI+tQ9Lw
VrfZqTiEcS5wEIqyfUAZZfKDo7W1xp+dQWzfczSBuZJZwI5iaha7+ILM0r8Ckden
TVTapc5pLSoO15v0ziRuQ2bT3V3nwu/U0MRK44z+VWOJdSiKxdnOYDs8hFNnKhfe
klbTZF7kW7WbiNYB43OaAQBJ6BALZsIskEaqfeZT8FD71uN928TcEQyBDXdZpRN+
iGQZDGhht0r0URGMDSs9waJtTfA=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIF/jCCA+agAwIBAgIQXY/dmS+72lZPranO2JM9jjANBgkqhkiG9w0BAQwFADCB
lzELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdB
bWF6b24gUkRTIGFwLWVhc3QtMSBSb290IENBIFJTQTQwOTYgRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjEwNTI1MjEzNDUxWhgPMjEyMTA1MjUyMjM0NTFaMIGXMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpv
biBSRFMgYXAtZWFzdC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMyW9kBJjD/hx8e8
b5E1sF42bp8TXsz1htSYE3Tl3T1Aq379DfEhB+xa/ASDZxt7/vwa81BkNo4M6HYq
okYIXeE7cu5SnSgjWXqcERhgPevtAwgmhdE3yREe8oz2DyOi2qKKZqah+1gpPaIQ
fK0uAqoeQlyHosye3KZZKkDHBatjBsQ5kf8lhuf7wVulEZVRHY2bP2X7N98PfbpL
QdH7mWXzDtJJ0LiwFwds47BrkgK1pkHx2p1mTo+HMkfX0P6Fq1atkVC2RHHtbB/X
iYyH7paaHBzviFrhr679zNqwXIOKlbf74w3mS11P76rFn9rS1BAH2Qm6eY5S/Fxe
HEKXm4kjPN63Zy0p3yE5EjPt54yPkvumOnT+RqDGJ2HCI9k8Ehcbve0ogfdRKNqQ
VHWYTy8V33ndQRHZlx/CuU1yN61TH4WSoMly1+q1ihTX9sApmlQ14B2pJi/9DnKW
cwECrPy1jAowC2UJ45RtC8UC05CbP9yrIy/7Noj8gQDiDOepm+6w1g6aNlWoiuQS
kyI6nzz1983GcnOHya73ga7otXo0Qfg9jPghlYiMomrgshlSLDHZG0Ib/3hb8cnR
1OcN9FpzNmVK2Ll1SmTMLrIhuCkyNYX9O/bOknbcf706XeESxGduSkHEjIw/k1+2
Atteoq5dT6cwjnJ9hyhiueVlVkiDAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8w
HQYDVR0OBBYEFLUI+DD7RJs+0nRnjcwIVWzzYSsFMA4GA1UdDwEB/wQEAwIBhjAN
BgkqhkiG9w0BAQwFAAOCAgEAb1mcCHv4qMQetLGTBH9IxsB2YUUhr5dda0D2BcHr
UtDbfd0VQs4tux6h/6iKwHPx0Ew8fuuYj99WknG0ffgJfNc5/fMspxR/pc1jpdyU
5zMQ+B9wi0lOZPO9uH7/pr+d2odcNEy8zAwqdv/ihsTwLmGP54is9fVbsgzNW1cm
HKAVL2t/Ope+3QnRiRilKCN1lzhav4HHdLlN401TcWRWKbEuxF/FgxSO2Hmx86pj
e726lweCTMmnq/cTsPOVY0WMjs0or3eHDVlyLgVeV5ldyN+ptg3Oit60T05SRa58
AJPTaVKIcGQ/gKkKZConpu7GDofT67P/ox0YNY57LRbhsx9r5UY4ROgz7WMQ1yoS
Y+19xizm+mBm2PyjMUbfwZUyCxsdKMwVdOq5/UmTmdms+TR8+m1uBHPOTQ2vKR0s
Pd/THSzPuu+d3dbzRyDSLQbHFFneG760CUlD/ZmzFlQjJ89/HmAmz8IyENq+Sjhx
Jgzy+FjVZb8aRUoYLlnffpUpej1n87Ynlr1GrvC4GsRpNpOHlwuf6WD4W0qUTsC/
C9JO+fBzUj/aWlJzNcLEW6pte1SB+EdkR2sZvWH+F88TxemeDrV0jKJw5R89CDf8
ZQNfkxJYjhns+YeV0moYjqQdc7tq4i04uggEQEtVzEhRLU5PE83nlh/K2NZZm8Kj
dIA=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID/zCCAuegAwIBAgIRAPVSMfFitmM5PhmbaOFoGfUwDQYJKoZIhvcNAQELBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyB1cy1lYXN0LTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyNTIyMzQ1N1oYDzIwNjEwNTI1MjMzNDU3WjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIHVzLWVhc3QtMSBSb290IENBIFJTQTIwNDggRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDu9H7TBeGoDzMr
dxN6H8COntJX4IR6dbyhnj5qMD4xl/IWvp50lt0VpmMd+z2PNZzx8RazeGC5IniV
5nrLg0AKWRQ2A/lGGXbUrGXCSe09brMQCxWBSIYe1WZZ1iU1IJ/6Bp4D2YEHpXrW
bPkOq5x3YPcsoitgm1Xh8ygz6vb7PsvJvPbvRMnkDg5IqEThapPjmKb8ZJWyEFEE
QRrkCIRueB1EqQtJw0fvP4PKDlCJAKBEs/y049FoOqYpT3pRy0WKqPhWve+hScMd
6obq8kxTFy1IHACjHc51nrGII5Bt76/MpTWhnJIJrCnq1/Uc3Qs8IVeb+sLaFC8K
DI69Sw6bAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFE7PCopt
lyOgtXX0Y1lObBUxuKaCMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOC
AQEAFj+bX8gLmMNefr5jRJfHjrL3iuZCjf7YEZgn89pS4z8408mjj9z6Q5D1H7yS
jNETVV8QaJip1qyhh5gRzRaArgGAYvi2/r0zPsy+Tgf7v1KGL5Lh8NT8iCEGGXwF
g3Ir+Nl3e+9XUp0eyyzBIjHtjLBm6yy8rGk9p6OtFDQnKF5OxwbAgip42CD75r/q
p421maEDDvvRFR4D+99JZxgAYDBGqRRceUoe16qDzbMvlz0A9paCZFclxeftAxv6
QlR5rItMz/XdzpBJUpYhdzM0gCzAzdQuVO5tjJxmXhkSMcDP+8Q+Uv6FA9k2VpUV
E/O5jgpqUJJ2Hc/5rs9VkAPXeA==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrzCCAjWgAwIBAgIQW0yuFCle3uj4vWiGU0SaGzAKBggqhkjOPQQDAzCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGFmLXNvdXRoLTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTE5MTkzNTE2WhgPMjEyMTA1MTkyMDM1MTZaMIGXMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpvbiBS
RFMgYWYtc291dGgtMSBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwHU2VhdHRs
ZTB2MBAGByqGSM49AgEGBSuBBAAiA2IABDPiKNZSaXs3Un/J/v+LTsFDANHpi7en
oL2qh0u0DoqNzEBTbBjvO23bLN3k599zh6CY3HKW0r2k1yaIdbWqt4upMCRCcUFi
I4iedAmubgzh56wJdoMZztjXZRwDthTkJKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAd
BgNVHQ4EFgQUWbYkcrvVSnAWPR5PJhIzppcAnZIwDgYDVR0PAQH/BAQDAgGGMAoG
CCqGSM49BAMDA2gAMGUCMCESGqpat93CjrSEjE7z+Hbvz0psZTHwqaxuiH64GKUm
mYynIiwpKHyBrzjKBmeDoQIxANGrjIo6/b8Jl6sdIZQI18V0pAyLfLiZjlHVOnhM
MOTVgr82ZuPoEHTX78MxeMnYlw==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgIRAIbsx8XOl0sgTNiCN4O+18QwDQYJKoZIhvcNAQELBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1ub3J0aGVhc3QtMSBSb290IENBIFJTQTIwNDggRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNTI1MjE1NDU4WhgPMjA2MTA1MjUyMjU0NTha
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtbm9ydGhlYXN0LTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
tROxwXWCgn5R9gI/2Ivjzaxc0g95ysBjoJsnhPdJEHQb7w3y2kWrVWU3Y9fOitgb
CEsnEC3PrhRnzNVW0fPsK6kbvOeCmjvY30rdbxbc8h+bjXfGmIOgAkmoULEr6Hc7
G1Q/+tvv4lEwIs7bEaf+abSZxRJbZ0MBxhbHn7UHHDiMZYvzK+SV1MGCxx7JVhrm
xWu3GC1zZCsGDhB9YqY9eR6PmjbqA5wy8vqbC57dZZa1QVtWIQn3JaRXn+faIzHx
nLMN5CEWihsdmHBXhnRboXprE/OS4MFv1UrQF/XM/h5RBeCywpHePpC+Oe1T3LNC
iP8KzRFrjC1MX/WXJnmOVQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
DgQWBBS33XbXAUMs1znyZo4B0+B3D68WFTAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZI
hvcNAQELBQADggEBADuadd2EmlpueY2VlrIIPC30QkoA1EOSoCmZgN6124apkoY1
HiV4r+QNPljN4WP8gmcARnNkS7ZeR4fvWi8xPh5AxQCpiaBMw4gcbTMCuKDV68Pw
P2dZCTMspvR3CDfM35oXCufdtFnxyU6PAyINUqF/wyTHguO3owRFPz64+sk3r2pT
WHmJjG9E7V+KOh0s6REgD17Gqn6C5ijLchSrPUHB0wOIkeLJZndHxN/76h7+zhMt
fFeNxPWHY2MfpcaLjz4UREzZPSB2U9k+y3pW1omCIcl6MQU9itGx/LpQE+H3ZeX2
M2bdYd5L+ow+bdbGtsVKOuN+R9Dm17YpswF+vyQ=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGATCCA+mgAwIBAgIRAKlQ+3JX9yHXyjP/Ja6kZhkwDQYJKoZIhvcNAQEMBQAw
gZgxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwo
QW1hem9uIFJEUyBhcC1zb3V0aC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UE
BwwHU2VhdHRsZTAgFw0yMTA1MTkxNzQ1MjBaGA8yMTIxMDUxOTE4NDUyMFowgZgx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwoQW1h
em9uIFJEUyBhcC1zb3V0aC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwH
U2VhdHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKtahBrpUjQ6
H2mni05BAKU6Z5USPZeSKmBBJN3YgD17rJ93ikJxSgzJ+CupGy5rvYQ0xznJyiV0
91QeQN4P+G2MjGQR0RGeUuZcfcZitJro7iAg3UBvw8WIGkcDUg+MGVpRv/B7ry88
7E4OxKb8CPNoa+a9j6ABjOaaxaI22Bb7j3OJ+JyMICs6CU2bgkJaj3VUV9FCNUOc
h9PxD4jzT9yyGYm/sK9BAT1WOTPG8XQUkpcFqy/IerZDfiQkf1koiSd4s5VhBkUn
aQHOdri/stldT7a+HJFVyz2AXDGPDj+UBMOuLq0K6GAT6ThpkXCb2RIf4mdTy7ox
N5BaJ+ih+Ro3ZwPkok60egnt/RN98jgbm+WstgjJWuLqSNInnMUgkuqjyBWwePqX
Kib+wdpyx/LOzhKPEFpeMIvHQ3A0sjlulIjnh+j+itezD+dp0UNxMERlW4Bn/IlS
sYQVNfYutWkRPRLErXOZXtlxxkI98JWQtLjvGzQr+jywxTiw644FSLWdhKa6DtfU
2JWBHqQPJicMElfZpmfaHZjtXuCZNdZQXWg7onZYohe281ZrdFPOqC4rUq7gYamL
T+ZB+2P+YCPOLJ60bj/XSvcB7mesAdg8P0DNddPhHUFWx2dFqOs1HxIVB4FZVA9U
Ppbv4a484yxjTgG7zFZNqXHKTqze6rBBAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMB
Af8wHQYDVR0OBBYEFCEAqjighncv/UnWzBjqu1Ka2Yb4MA4GA1UdDwEB/wQEAwIB
hjANBgkqhkiG9w0BAQwFAAOCAgEAYyvumblckIXlohzi3QiShkZhqFzZultbFIu9
GhA5CDar1IFMhJ9vJpO9nUK/camKs1VQRs8ZsBbXa0GFUM2p8y2cgUfLwFULAiC/
sWETyW5lcX/xc4Pyf6dONhqFJt/ovVBxNZtcmMEWv/1D6Tf0nLeEb0P2i/pnSRR4
Oq99LVFjossXtyvtaq06OSiUUZ1zLPvV6AQINg8dWeBOWRcQYhYcEcC2wQ06KShZ
0ahuu7ar5Gym3vuLK6nH+eQrkUievVomN/LpASrYhK32joQ5ypIJej3sICIgJUEP
UoeswJ+Z16f3ECoL1OSnq4A0riiLj1ZGmVHNhM6m/gotKaHNMxsK9zsbqmuU6IT/
P6cR0S+vdigQG8ZNFf5vEyVNXhl8KcaJn6lMD/gMB2rY0qpaeTg4gPfU5wcg8S4Y
C9V//tw3hv0f2n+8kGNmqZrylOQDQWSSo8j8M2SRSXiwOHDoTASd1fyBEIqBAwzn
LvXVg8wQd1WlmM3b0Vrsbzltyh6y4SuKSkmgufYYvC07NknQO5vqvZcNoYbLNea3
76NkFaMHUekSbwVejZgG5HGwbaYBgNdJEdpbWlA3X4yGRVxknQSUyt4dZRnw/HrX
k8x6/wvtw7wht0/DOqz1li7baSsMazqxx+jDdSr1h9xML416Q4loFCLgqQhil8Jq
Em4Hy3A=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGBTCCA+2gAwIBAgIRAJfKe4Zh4aWNt3bv6ZjQwogwDQYJKoZIhvcNAQEMBQAw
gZoxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEzMDEGA1UEAwwq
QW1hem9uIFJEUyBjYS1jZW50cmFsLTEgUm9vdCBDQSBSU0E0MDk2IEcxMRAwDgYD
VQQHDAdTZWF0dGxlMCAXDTIxMDUyMTIyMDg1M1oYDzIxMjEwNTIxMjMwODUzWjCB
mjELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTMwMQYDVQQDDCpB
bWF6b24gUkRTIGNhLWNlbnRyYWwtMSBSb290IENBIFJTQTQwOTYgRzExEDAOBgNV
BAcMB1NlYXR0bGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCpgUH6
Crzd8cOw9prAh2rkQqAOx2vtuI7xX4tmBG4I/um28eBjyVmgwQ1fpq0Zg2nCKS54
Nn0pCmT7f3h6Bvopxn0J45AzXEtajFqXf92NQ3iPth95GVfAJSD7gk2LWMhpmID9
JGQyoGuDPg+hYyr292X6d0madzEktVVGO4mKTF989qEg+tY8+oN0U2fRTrqa2tZp
iYsmg350ynNopvntsJAfpCO/srwpsqHHLNFZ9jvhTU8uW90wgaKO9i31j/mHggCE
+CAOaJCM3g+L8DPl/2QKsb6UkBgaaIwKyRgKSj1IlgrK+OdCBCOgM9jjId4Tqo2j
ZIrrPBGl6fbn1+etZX+2/tf6tegz+yV0HHQRAcKCpaH8AXF44bny9andslBoNjGx
H6R/3ib4FhPrnBMElzZ5i4+eM/cuPC2huZMBXb/jKgRC/QN1Wm3/nah5FWq+yn+N
tiAF10Ga0BYzVhHDEwZzN7gn38bcY5yi/CjDUNpY0OzEe2+dpaBKPlXTaFfn9Nba
CBmXPRF0lLGGtPeTAgjcju+NEcVa82Ht1pqxyu2sDtbu3J5bxp4RKtj+ShwN8nut
Tkf5Ea9rSmHEY13fzgibZlQhXaiFSKA2ASUwgJP19Putm0XKlBCNSGCoECemewxL
+7Y8FszS4Uu4eaIwvXVqUEE2yf+4ex0hqQ1acQIDAQABo0IwQDAPBgNVHRMBAf8E
BTADAQH/MB0GA1UdDgQWBBSeUnXIRxNbYsZLtKomIz4Y1nOZEzAOBgNVHQ8BAf8E
BAMCAYYwDQYJKoZIhvcNAQEMBQADggIBAIpRvxVS0dzoosBh/qw65ghPUGSbP2D4
dm6oYCv5g/zJr4fR7NzEbHOXX5aOQnHbQL4M/7veuOCLNPOW1uXwywMg6gY+dbKe
YtPVA1as8G9sUyadeXyGh2uXGsziMFXyaESwiAXZyiYyKChS3+g26/7jwECFo5vC
XGhWpIO7Hp35Yglp8AnwnEAo/PnuXgyt2nvyTSrxlEYa0jus6GZEZd77pa82U1JH
qFhIgmKPWWdvELA3+ra1nKnvpWM/xX0pnMznMej5B3RT3Y+k61+kWghJE81Ix78T
+tG4jSotgbaL53BhtQWBD1yzbbilqsGE1/DXPXzHVf9yD73fwh2tGWSaVInKYinr
a4tcrB3KDN/PFq0/w5/21lpZjVFyu/eiPj6DmWDuHW73XnRwZpHo/2OFkei5R7cT
rn/YdDD6c1dYtSw5YNnS6hdCQ3sOiB/xbPRN9VWJa6se79uZ9NLz6RMOr73DNnb2
bhIR9Gf7XAA5lYKqQk+A+stoKbIT0F65RnkxrXi/6vSiXfCh/bV6B41cf7MY/6YW
ehserSdjhQamv35rTFdM+foJwUKz1QN9n9KZhPxeRmwqPitAV79PloksOnX25ElN
SlyxdndIoA1wia1HRd26EFm2pqfZ2vtD2EjU3wD42CXX4H8fKVDna30nNFSYF0yn
jGKc3k6UNxpg
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIF/jCCA+agAwIBAgIQaRHaEqqacXN20e8zZJtmDDANBgkqhkiG9w0BAQwFADCB
lzELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdB
bWF6b24gUkRTIHVzLWVhc3QtMSBSb290IENBIFJTQTQwOTYgRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjEwNTI1MjIzODM1WhgPMjEyMTA1MjUyMzM4MzVaMIGXMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpv
biBSRFMgdXMtZWFzdC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAInfBCaHuvj6Rb5c
L5Wmn1jv2PHtEGMHm+7Z8dYosdwouG8VG2A+BCYCZfij9lIGszrTXkY4O7vnXgru
JUNdxh0Q3M83p4X+bg+gODUs3jf+Z3Oeq7nTOk/2UYvQLcxP4FEXILxDInbQFcIx
yen1ESHggGrjEodgn6nbKQNRfIhjhW+TKYaewfsVWH7EF2pfj+cjbJ6njjgZ0/M9
VZifJFBgat6XUTOf3jwHwkCBh7T6rDpgy19A61laImJCQhdTnHKvzTpxcxiLRh69
ZObypR7W04OAUmFS88V7IotlPmCL8xf7kwxG+gQfvx31+A9IDMsiTqJ1Cc4fYEKg
bL+Vo+2Ii4W2esCTGVYmHm73drznfeKwL+kmIC/Bq+DrZ+veTqKFYwSkpHRyJCEe
U4Zym6POqQ/4LBSKwDUhWLJIlq99bjKX+hNTJykB+Lbcx0ScOP4IAZQoxmDxGWxN
S+lQj+Cx2pwU3S/7+OxlRndZAX/FKgk7xSMkg88HykUZaZ/ozIiqJqSnGpgXCtED
oQ4OJw5ozAr+/wudOawaMwUWQl5asD8fuy/hl5S1nv9XxIc842QJOtJFxhyeMIXt
LVECVw/dPekhMjS3Zo3wwRgYbnKG7YXXT5WMxJEnHu8+cYpMiRClzq2BEP6/MtI2
AZQQUFu2yFjRGL2OZA6IYjxnXYiRAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8w
HQYDVR0OBBYEFADCcQCPX2HmkqQcmuHfiQ2jjqnrMA4GA1UdDwEB/wQEAwIBhjAN
BgkqhkiG9w0BAQwFAAOCAgEASXkGQ2eUmudIKPeOIF7RBryCoPmMOsqP0+1qxF8l
pGkwmrgNDGpmd9s0ArfIVBTc1jmpgB3oiRW9c6n2OmwBKL4UPuQ8O3KwSP0iD2sZ
KMXoMEyphCEzW1I2GRvYDugL3Z9MWrnHkoaoH2l8YyTYvszTvdgxBPpM2x4pSkp+
76d4/eRpJ5mVuQ93nC+YG0wXCxSq63hX4kyZgPxgCdAA+qgFfKIGyNqUIqWgeyTP
n5OgKaboYk2141Rf2hGMD3/hsGm0rrJh7g3C0ZirPws3eeJfulvAOIy2IZzqHUSY
jkFzraz6LEH3IlArT3jUPvWKqvh2lJWnnp56aqxBR7qHH5voD49UpJWY1K0BjGnS
OHcurpp0Yt/BIs4VZeWdCZwI7JaSeDcPMaMDBvND3Ia5Fga0thgYQTG6dE+N5fgF
z+hRaujXO2nb0LmddVyvE8prYlWRMuYFv+Co8hcMdJ0lEZlfVNu0jbm9/GmwAZ+l
9umeYO9yz/uC7edC8XJBglMAKUmVK9wNtOckUWAcCfnPWYLbYa/PqtXBYcxrso5j
iaS/A7iEW51uteHBGrViCy1afGG+hiUWwFlesli+Rq4dNstX3h6h2baWABaAxEVJ
y1RnTQSz6mROT1VmZSgSVO37rgIyY0Hf0872ogcTS+FfvXgBxCxsNWEbiQ/XXva4
0Ws=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICtDCCAjqgAwIBAgIRAMyaTlVLN0ndGp4ffwKAfoMwCgYIKoZIzj0EAwMwgZkx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEyMDAGA1UEAwwpQW1h
em9uIFJEUyBtZS1jZW50cmFsLTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjIwNTA3MDA0NDM3WhgPMjEyMjA1MDcwMTQ0MzdaMIGZMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMjAwBgNVBAMMKUFtYXpv
biBSRFMgbWUtY2VudHJhbC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE19nCV1nsI6CohSor13+B25cr
zg+IHdi9Y3L7ziQnHWI6yjBazvnKD+oC71aRRlR8b5YXsYGUQxWzPLHN7EGPcSGv
bzA9SLG1KQYCJaQ0m9Eg/iGrwKWOgylbhVw0bCxoo0IwQDAPBgNVHRMBAf8EBTAD
AQH/MB0GA1UdDgQWBBS4KsknsJXM9+QPEkBdZxUPaLr11zAOBgNVHQ8BAf8EBAMC
AYYwCgYIKoZIzj0EAwMDaAAwZQIxAJaRgrYIEfXQMZQQDxMTYS0azpyWSseQooXo
L3nYq4OHGBgYyQ9gVjvRYWU85PXbfgIwdi82DtANQFkCu+j+BU0JBY/uRKPEeYzo
JG92igKIcXPqCoxIJ7lJbbzmuf73gQu5
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGATCCA+mgAwIBAgIRAJwCobx0Os8F7ihbJngxrR8wDQYJKoZIhvcNAQEMBQAw
gZgxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwo
QW1hem9uIFJEUyBtZS1zb3V0aC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UE
BwwHU2VhdHRsZTAgFw0yMTA1MjAxNzE1MzNaGA8yMTIxMDUyMDE4MTUzM1owgZgx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwoQW1h
em9uIFJEUyBtZS1zb3V0aC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwH
U2VhdHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANukKwlm+ZaI
Y5MkWGbEVLApEyLmlrHLEg8PfiiEa9ts7jssQcin3bzEPdTqGr5jo91ONoZ3ccWq
xJgg1W3bLu5CAO2CqIOXTXHRyCO/u0Ch1FGgWB8xETPSi3UHt/Vn1ltdO6DYdbDU
mYgwzYrvLBdRCwxsb9o+BuYQHVFzUYonqk/y9ujz3gotzFq7r55UwDTA1ita3vb4
eDKjIb4b1M4Wr81M23WHonpje+9qkkrAkdQcHrkgvSCV046xsq/6NctzwCUUNsgF
7Q1a8ut5qJEYpz5ta8vI1rqFqAMBqCbFjRYlmAoTTpFPOmzAVxV+YoqTrW5A16su
/2SXlMYfJ/n/ad/QfBNPPAAQMpyOr2RCL/YiL/PFZPs7NxYjnZHNWxMLSPgFyI+/
t2klnn5jR76KJK2qimmaXedB90EtFsMRUU1e4NxH9gDuyrihKPJ3aVnZ35mSipvR
/1KB8t8gtFXp/VQaz2sg8+uxPMKB81O37fL4zz6Mg5K8+aq3ejBiyHucpFGnsnVB
3kQWeD36ONkybngmgWoyPceuSWm1hQ0Z7VRAQX+KlxxSaHmSaIk1XxZu9h9riQHx
fMuev6KXjRn/CjCoUTn+7eFrt0dT5GryQEIZP+nA0oq0LKxogigHNZlwAT4flrqb
JUfZJrqgoce5HjZSXl10APbtPjJi0fW9AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMB
Af8wHQYDVR0OBBYEFEfV+LztI29OVDRm0tqClP3NrmEWMA4GA1UdDwEB/wQEAwIB
hjANBgkqhkiG9w0BAQwFAAOCAgEAvSNe+0wuk53KhWlRlRf2x/97H2Q76X3anzF0
5fOSVm022ldALzXMzqOfdnoKIhAu2oVKiHHKs7mMas+T6TL+Mkphx0CYEVxFE3PG
061q3CqJU+wMm9W9xsB79oB2XG47r1fIEywZZ3GaRsatAbjcNOT8uBaATPQAfJFN
zjFe4XyN+rA4cFrYNvfHTeu5ftrYmvks7JlRaJgEGWsz+qXux7uvaEEVPqEumd2H
uYeaRNOZ2V23R009X5lbgBFx9tq5VDTnKhQiTQ2SeT0rc1W3Dz5ik6SbQQNP3nSR
0Ywy7r/sZ3fcDyfFiqnrVY4Ympfvb4YW2PZ6OsQJbzH6xjdnTG2HtzEU30ngxdp1
WUEF4zt6rjJCp7QBUqXgdlHvJqYu6949qtWjEPiFN9uSsRV2i1YDjJqN52dLjAPn
AipJKo8x1PHTwUzuITqnB9BdP+5TlTl8biJfkEf/+08eWDTLlDHr2VrZLOLompTh
bS5OrhDmqA2Q+O+EWrTIhMflwwlCpR9QYM/Xwvlbad9H0FUHbJsCVNaru3wGOgWo
tt3dNSK9Lqnv/Ej9K9v6CRr36in4ylJKivhJ5B9E7ABHg7EpBJ1xi7O5eNDkNoJG
+pFyphJq3AkBR2U4ni2tUaTAtSW2tks7IaiDV+UMtqZyGabT5ISQfWLLtLHSWn2F
Tspdjbg=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgIRAJZFh4s9aZGzKaTMLrSb4acwDQYJKoZIhvcNAQELBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBCZXRhIHVzLWVhc3QtMSBSb290IENBIFJTQTIwNDggRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNTE4MjEyODQxWhgPMjA2MTA1MTgyMjI4NDFa
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgQmV0YSB1cy1lYXN0LTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
17i2yoU6diep+WrqxIn2CrDEO2NdJVwWTSckx4WMZlLpkQDoymSmkNHjq9ADIApD
A31Cx+843apL7wub8QkFZD0Tk7/ThdHWJOzcAM3ov98QBPQfOC1W5zYIIRP2F+vQ
TRETHQnLcW3rLv0NMk5oQvIKpJoC9ett6aeVrzu+4cU4DZVWYlJUoC/ljWzCluau
8blfW0Vwin6OB7s0HCG5/wijQWJBU5SrP/KAIPeQi1GqG5efbqAXDr/ple0Ipwyo
Xjjl73LenGUgqpANlC9EAT4i7FkJcllLPeK3NcOHjuUG0AccLv1lGsHAxZLgjk/x
z9ZcnVV9UFWZiyJTKxeKPwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
DgQWBBRWyMuZUo4gxCR3Luf9/bd2AqZ7CjAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZI
hvcNAQELBQADggEBAIqN2DlIKlvDFPO0QUZQVFbsi/tLdYM98/vvzBpttlTGVMyD
gJuQeHVz+MnhGIwoCGOlGU3OOUoIlLAut0+WG74qYczn43oA2gbMd7HoD7oL/IGg
njorBwJVcuuLv2G//SqM3nxGcLRtkRnQ+lvqPxMz9+0fKFUn6QcIDuF0QSfthLs2
WSiGEPKO9c9RSXdRQ4pXA7c3hXng8P4A2ZmdciPne5Nu4I4qLDGZYRrRLRkNTrOi
TyS6r2HNGUfgF7eOSeKt3NWL+mNChcYj71/Vycf5edeczpUgfnWy9WbPrK1svKyl
aAs2xg+X6O8qB+Mnj2dNBzm+lZIS3sIlm+nO9sg=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrjCCAjSgAwIBAgIRAPAlEk8VJPmEzVRRaWvTh2AwCgYIKoZIzj0EAwMwgZYx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEvMC0GA1UEAwwmQW1h
em9uIFJEUyB1cy1lYXN0LTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTI1MjI0MTU1WhgPMjEyMTA1MjUyMzQxNTVaMIGWMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExLzAtBgNVBAMMJkFtYXpvbiBS
RFMgdXMtZWFzdC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdTZWF0dGxl
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEx5xjrup8II4HOJw15NTnS3H5yMrQGlbj
EDA5MMGnE9DmHp5dACIxmPXPMe/99nO7wNdl7G71OYPCgEvWm0FhdvVUeTb3LVnV
BnaXt32Ek7/oxGk1T+Df03C+W0vmuJ+wo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0G
A1UdDgQWBBTGXmqBWN/1tkSea4pNw0oHrjk2UDAOBgNVHQ8BAf8EBAMCAYYwCgYI
KoZIzj0EAwMDaAAwZQIxAIqqZWCSrIkZ7zsv/FygtAusW6yvlL935YAWYPVXU30m
jkMFLM+/RJ9GMvnO8jHfCgIwB+whlkcItzE9CRQ6CsMo/d5cEHDUu/QW6jSIh9BR
OGh9pTYPVkUbBiKPA7lVVhre
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIF/zCCA+egAwIBAgIRAJGY9kZITwfSRaAS/bSBOw8wDQYJKoZIhvcNAQEMBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyBzYS1lYXN0LTEgUm9vdCBDQSBSU0E0MDk2IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUxOTE4MTEyMFoYDzIxMjEwNTE5MTkxMTIwWjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIHNhLWVhc3QtMSBSb290IENBIFJTQTQwOTYgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDe2vlDp6Eo4WQi
Wi32YJOgdXHhxTFrLjB9SRy22DYoMaWfginJIwJcSR8yse8ZDQuoNhERB9LRggAE
eng23mhrfvtL1yQkMlZfBu4vG1nOb22XiPFzk7X2wqz/WigdYNBCqa1kK3jrLqPx
YUy7jk2oZle4GLVRTNGuMfcid6S2hs3UCdXfkJuM2z2wc3WUlvHoVNk37v2/jzR/
hSCHZv5YHAtzL/kLb/e64QkqxKll5QmKhyI6d7vt6Lr1C0zb+DmwxUoJhseAS0hI
dRk5DklMb4Aqpj6KN0ss0HAYqYERGRIQM7KKA4+hxDMUkJmt8KqWKZkAlCZgflzl
m8NZ31o2cvBzf6g+VFHx+6iVrSkohVQydkCxx7NJ743iPKsh8BytSM4qU7xx4OnD
H2yNXcypu+D5bZnVZr4Pywq0w0WqbTM2bpYthG9IC4JeVUvZ2mDc01lqOlbMeyfT
og5BRPLDXdZK8lapo7se2teh64cIfXtCmM2lDSwm1wnH2iSK+AWZVIM3iE45WSGc
vZ+drHfVgjJJ5u1YrMCWNL5C2utFbyF9Obw9ZAwm61MSbPQL9JwznhNlCh7F2ANW
ZHWQPNcOAJqzE4uVcJB1ZeVl28ORYY1668lx+s9yYeMXk3QQdj4xmdnvoBFggqRB
ZR6Z0D7ZohADXe024RzEo1TukrQgKQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/
MB0GA1UdDgQWBBT7Vs4Y5uG/9aXnYGNMEs6ycPUT3jAOBgNVHQ8BAf8EBAMCAYYw
DQYJKoZIhvcNAQEMBQADggIBACN4Htp2PvGcQA0/sAS+qUVWWJoAXSsu8Pgc6Gar
7tKVlNJ/4W/a6pUV2Xo/Tz3msg4yiE8sMESp2k+USosD5n9Alai5s5qpWDQjrqrh
76AGyF2nzve4kIN19GArYhm4Mz/EKEG1QHYvBDGgXi3kNvL/a2Zbybp+3LevG+q7
xtx4Sz9yIyMzuT/6Y7ijtiMZ9XbuxGf5wab8UtwT3Xq1UradJy0KCkzRJAz/Wy/X
HbTkEvKSaYKExH6sLo0jqdIjV/d2Io31gt4e0Ly1ER2wPyFa+pc/swu7HCzrN+iz
A2ZM4+KX9nBvFyfkHLix4rALg+WTYJa/dIsObXkdZ3z8qPf5A9PXlULiaa1mcP4+
rokw74IyLEYooQ8iSOjxumXhnkTS69MAdGzXYE5gnHokABtGD+BB5qLhtLt4fqAp
8AyHpQWMyV42M9SJLzQ+iOz7kAgJOBOaVtJI3FV/iAg/eqWVm3yLuUTWDxSHrKuL
N19+pSjF6TNvUSFXwEa2LJkfDqIOCE32iOuy85QY//3NsgrSQF6UkSPa95eJrSGI
3hTRYYh3Up2GhBGl1KUy7/o0k3KRZTk4s38fylY8bZ3TakUOH5iIGoHyFVVcp361
Pyy25SzFSmNalWoQd9wZVc/Cps2ldxhcttM+WLkFNzprd0VJa8qTz8vYtHP0ouDN
nWS0
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGCTCCA/GgAwIBAgIRAOY7gfcBZgR2tqfBzMbFQCUwDQYJKoZIhvcNAQEMBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1zb3V0aGVhc3QtNCBSb290IENBIFJTQTQwOTYgRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjIwNTI1MTY1NDU5WhgPMjEyMjA1MjUxNzU0NTla
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtc291dGhlYXN0LTQgUm9vdCBDQSBSU0E0MDk2IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA
lfxER43FuLRdL08bddF0YhbCP+XXKj1A/TFMXmd2My8XDei8rPXFYyyjMig9+xZw
uAsIxLwz8uiA26CKA8bCZKg5VG2kTeOJAfvBJaLv1CZefs3Z4Uf1Sjvm6MF2yqEj
GoORfyfL9HiZFTDuF/hcjWoKYCfMuG6M/wO8IbdICrX3n+BiYQJu/pFO660Mg3h/
8YBBWYDbHoCiH/vkqqJugQ5BM3OI5nsElW51P1icEEqti4AZ7JmtSv9t7fIFBVyR
oaEyOgpp0sm193F/cDJQdssvjoOnaubsSYm1ep3awZAUyGN/X8MBrPY95d0hLhfH
Ehc5Icyg+hsosBljlAyksmt4hFQ9iBnWIz/ZTfGMck+6p3HVL9RDgvluez+rWv59
8q7omUGsiPApy5PDdwI/Wt/KtC34/2sjslIJfvgifdAtkRPkhff1WEwER00ADrN9
eGGInaCpJfb1Rq8cV2n00jxg7DcEd65VR3dmIRb0bL+jWK62ni/WdEyomAOMfmGj
aWf78S/4rasHllWJ+QwnaUYY3u6N8Cgio0/ep4i34FxMXqMV3V0/qXdfhyabi/LM
wCxNo1Dwt+s6OtPJbwO92JL+829QAxydfmaMTeHBsgMPkG7RwAekeuatKGHNsc2Z
x2Q4C2wVvOGAhcHwxfM8JfZs3nDSZJndtVVnFlUY0UECAwEAAaNCMEAwDwYDVR0T
AQH/BAUwAwEB/zAdBgNVHQ4EFgQUpnG7mWazy6k97/tb5iduRB3RXgQwDgYDVR0P
AQH/BAQDAgGGMA0GCSqGSIb3DQEBDAUAA4ICAQCDLqq1Wwa9Tkuv7vxBnIeVvvFF
ecTn+P+wJxl9Qa2ortzqTHZsBDyJO62d04AgBwiDXkJ9a+bthgG0H1J7Xee8xqv1
xyX2yKj24ygHjspLotKP4eDMdDi5TYq+gdkbPmm9Q69B1+W6e049JVGXvWG8/7kU
igxeuCYwtCCdUPRLf6D8y+1XMGgVv3/DSOHWvTg3MJ1wJ3n3+eve3rjGdRYWZeJu
k21HLSZYzVrCtUsh2YAeLnUbSxVuT2Xr4JehYe9zW5HEQ8Je/OUfnCy9vzoN/ITw
osAH+EBJQey7RxEDqMwCaRefH0yeHFcnOll0OXg/urnQmwbEYzQ1uutJaBPsjU0J
Qf06sMxI7GiB5nPE+CnI2sM6A9AW9kvwexGXpNJiLxF8dvPQthpOKGcYu6BFvRmt
6ctfXd9b7JJoVqMWuf5cCY6ihpk1e9JTlAqu4Eb/7JNyGiGCR40iSLvV28un9wiE
plrdYxwcNYq851BEu3r3AyYWw/UW1AKJ5tM+/Gtok+AphMC9ywT66o/Kfu44mOWm
L3nSLSWEcgfUVgrikpnyGbUnGtgCmHiMlUtNVexcE7OtCIZoVAlCGKNu7tyuJf10
Qlk8oIIzfSIlcbHpOYoN79FkLoDNc2er4Gd+7w1oPQmdAB0jBJnA6t0OUBPKdDdE
Ufff2jrbfbzECn1ELg==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGCDCCA/CgAwIBAgIQIuO1A8LOnmc7zZ/vMm3TrDANBgkqhkiG9w0BAQwFADCB
nDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTUwMwYDVQQDDCxB
bWF6b24gUkRTIGFwLXNvdXRoZWFzdC0yIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4G
A1UEBwwHU2VhdHRsZTAgFw0yMTA1MjQyMDQ2MThaGA8yMTIxMDUyNDIxNDYxOFow
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1zb3V0aGVhc3QtMiBSb290IENBIFJTQTQwOTYgRzExEDAO
BgNVBAcMB1NlYXR0bGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDq
qRHKbG8ZK6/GkGm2cenznEF06yHwI1gD5sdsHjTgekDZ2Dl9RwtDmUH2zFuIQwGj
SeC7E2iKwrJRA5wYzL9/Vk8NOILEKQOP8OIKUHbc7q8rEtjs401KcU6pFBBEdO9G
CTiRhogq+8mhC13AM/UriZJbKhwgM2UaDOzAneGMhQAGjH8z83NsNcPxpYVE7tqM
sch5yLtIJLkJRusrmQQTeHUev16YNqyUa+LuFclFL0FzFCimkcxUhXlbfEKXbssS
yPzjiv8wokGyo7+gA0SueceMO2UjfGfute3HlXZDcNvBbkSY+ver41jPydyRD6Qq
oEkh0tyIbPoa3oU74kwipJtz6KBEA3u3iq61OUR0ENhR2NeP7CSKrC24SnQJZ/92
qxusrbyV/0w+U4m62ug/o4hWNK1lUcc2AqiBOvCSJ7qpdteTFxcEIzDwYfERDx6a
d9+3IPvzMb0ZCxBIIUFMxLTF7yAxI9s6KZBBXSZ6tDcCCYIgEysEPRWMRAcG+ye/
fZVn9Vnzsj4/2wchC2eQrYpb1QvG4eMXA4M5tFHKi+/8cOPiUzJRgwS222J8YuDj
yEBval874OzXk8H8Mj0JXJ/jH66WuxcBbh5K7Rp5oJn7yju9yqX6qubY8gVeMZ1i
u4oXCopefDqa35JplQNUXbWwSebi0qJ4EK0V8F9Q+QIDAQABo0IwQDAPBgNVHRMB
Af8EBTADAQH/MB0GA1UdDgQWBBT4ysqCxaPe7y+g1KUIAenqu8PAgzAOBgNVHQ8B
Af8EBAMCAYYwDQYJKoZIhvcNAQEMBQADggIBALU8WN35KAjPZEX65tobtCDQFkIO
uJjv0alD7qLB0i9eY80C+kD87HKqdMDJv50a5fZdqOta8BrHutgFtDm+xo5F/1M3
u5/Vva5lV4xy5DqPajcF4Mw52czYBmeiLRTnyPJsU93EQIC2Bp4Egvb6LI4cMOgm
4pY2hL8DojOC5PXt4B1/7c1DNcJX3CMzHDm4SMwiv2MAxSuC/cbHXcWMk+qXdrVx
+ayLUSh8acaAOy3KLs1MVExJ6j9iFIGsDVsO4vr4ZNsYQiyHjp+L8ops6YVBO5AT
k/pI+axHIVsO5qiD4cFWvkGqmZ0gsVtgGUchZaacboyFsVmo6QPrl28l6LwxkIEv
GGJYvIBW8sfqtGRspjfX5TlNy5IgW/VOwGBdHHsvg/xpRo31PR3HOFw7uPBi7cAr
FiZRLJut7af98EB2UvovZnOh7uIEGPeecQWeOTQfJeWet2FqTzFYd0NUMgqPuJx1
vLKferP+ajAZLJvVnW1J7Vccx/pm0rMiUJEf0LRb/6XFxx7T2RGjJTi0EzXODTYI
gnLfBBjnolQqw+emf4pJ4pAtly0Gq1KoxTG2QN+wTd4lsCMjnelklFDjejwnl7Uy
vtxzRBAu/hi/AqDkDFf94m6j+edIrjbi9/JDFtQ9EDlyeqPgw0qwi2fwtJyMD45V
fejbXelUSJSzDIdY
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGCTCCA/GgAwIBAgIRAN7Y9G9i4I+ZaslPobE7VL4wDQYJKoZIhvcNAQEMBQAw
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1ub3J0aGVhc3QtMiBSb290IENBIFJTQTQwOTYgRzExEDAO
BgNVBAcMB1NlYXR0bGUwIBcNMjEwNTIwMTYzMzIzWhgPMjEyMTA1MjAxNzMzMjNa
MIGcMQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywg
SW5jLjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExNTAzBgNVBAMM
LEFtYXpvbiBSRFMgYXAtbm9ydGhlYXN0LTIgUm9vdCBDQSBSU0E0MDk2IEcxMRAw
DgYDVQQHDAdTZWF0dGxlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA
4BEPCiIfiK66Q/qa8k+eqf1Q3qsa6Xuu/fPkpuStXVBShhtXd3eqrM0iT4Xxs420
Va0vSB3oZ7l86P9zYfa60n6PzRxdYFckYX330aI7L/oFIdaodB/C9szvROI0oLG+
6RwmIF2zcprH0cTby8MiM7G3v9ykpq27g4WhDC1if2j8giOQL3oHpUaByekZNIHF
dIllsI3RkXmR3xmmxoOxJM1B9MZi7e1CvuVtTGOnSGpNCQiqofehTGwxCN2wFSK8
xysaWlw48G0VzZs7cbxoXMH9QbMpb4tpk0d+T8JfAPu6uWO9UwCLWWydf0CkmA/+
D50/xd1t33X9P4FEaPSg5lYbHXzSLWn7oLbrN2UqMLaQrkoEBg/VGvzmfN0mbflw
+T87bJ/VEOVNlG+gepyCTf89qIQVWOjuYMox4sK0PjzZGsYEuYiq1+OUT3vk/e5K
ag1fCcq2Isy4/iwB2xcXrsQ6ljwdk1fc+EmOnjGKrhuOHJY3S+RFv4ToQBsVyYhC
XGaC3EkqIX0xaCpDimxYhFjWhpDXAjG/zJ+hRLDAMCMhl/LPGRk/D1kzSbPmdjpl
lEMK5695PeBvEBTQdBQdOiYgOU3vWU6tzwwHfiM2/wgvess/q0FDAHfJhppbgbb9
3vgsIUcsvoC5o29JvMsUxsDRvsAfEmMSDGkJoA/X6GECAwEAAaNCMEAwDwYDVR0T
AQH/BAUwAwEB/zAdBgNVHQ4EFgQUgEWm1mZCbGD6ytbwk2UU1aLaOUUwDgYDVR0P
AQH/BAQDAgGGMA0GCSqGSIb3DQEBDAUAA4ICAQBb4+ABTGBGwxK1U/q4g8JDqTQM
1Wh8Oz8yAk4XtPJMAmCctxbd81cRnSnePWw/hxViLVtkZ/GsemvXfqAQyOn1coN7
QeYSw+ZOlu0j2jEJVynmgsR7nIRqE7QkCyZAU+d2FTJUfmee+IiBiGyFGgxz9n7A
JhBZ/eahBbiuoOik/APW2JWLh0xp0W0GznfJ8lAlaQTyDa8iDXmVtbJg9P9qzkvl
FgPXQttzEOyooF8Pb2LCZO4kUz+1sbU7tHdr2YE+SXxt6D3SBv+Yf0FlvyWLiqVk
GDEOlPPTDSjAWgKnqST8UJ0RDcZK/v1ixs7ayqQJU0GUQm1I7LGTErWXHMnCuHKe
UKYuiSZwmTcJ06NgdhcCnGZgPq13ryMDqxPeltQc3n5eO7f1cL9ERYLDLOzm6A9P
oQ3MfcVOsbHgGHZWaPSeNrQRN9xefqBXH0ZPasgcH9WJdsLlEjVUXoultaHOKx3b
UCCb+d3EfqF6pRT488ippOL6bk7zNubwhRa/+y4wjZtwe3kAX78ACJVcjPobH9jZ
ErySads5zdQeaoee5wRKdp3TOfvuCe4bwLRdhOLCHWzEcXzY3g/6+ppLvNom8o+h
Bh5X26G6KSfr9tqhQ3O9IcbARjnuPbvtJnoPY0gz3EHHGPhy0RNW8i2gl3nUp0ah
PtjwbKW0hYAhIttT0Q==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICtzCCAj2gAwIBAgIQQRBQTs6Y3H1DDbpHGta3lzAKBggqhkjOPQQDAzCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLXNvdXRoZWFzdC0zIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDYxMTAwMTI0M1oYDzIxMjEwNjExMDExMjQzWjCBmzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTQwMgYDVQQDDCtBbWF6
b24gUkRTIGFwLXNvdXRoZWFzdC0zIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEs0942Xj4m/gKA+WA6F5h
AHYuek9eGpzTRoLJddM4rEV1T3eSueytMVKOSlS3Ub9IhyQrH2D8EHsLYk9ktnGR
pATk0kCYTqFbB7onNo070lmMJmGT/Q7NgwC8cySChFxbo0IwQDAPBgNVHRMBAf8E
BTADAQH/MB0GA1UdDgQWBBQ20iKBKiNkcbIZRu0y1uoF1yJTEzAOBgNVHQ8BAf8E
BAMCAYYwCgYIKoZIzj0EAwMDaAAwZQIwYv0wTSrpQTaPaarfLN8Xcqrqu3hzl07n
FrESIoRw6Cx77ZscFi2/MV6AFyjCV/TlAjEAhpwJ3tpzPXpThRML8DMJYZ3YgMh3
CMuLqhPpla3cL0PhybrD27hJWl29C4el6aMO
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrDCCAjOgAwIBAgIQGcztRyV40pyMKbNeSN+vXTAKBggqhkjOPQQDAzCBljEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMS8wLQYDVQQDDCZBbWF6
b24gUkRTIHVzLWVhc3QtMiBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTAgFw0yMTA1MjEyMzE1NTZaGA8yMTIxMDUyMjAwMTU1NlowgZYxCzAJBgNV
BAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYD
VQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEvMC0GA1UEAwwmQW1hem9uIFJE
UyB1cy1lYXN0LTIgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1NlYXR0bGUw
djAQBgcqhkjOPQIBBgUrgQQAIgNiAAQfDcv+GGRESD9wT+I5YIPRsD3L+/jsiIis
Tr7t9RSbFl+gYpO7ZbDXvNbV5UGOC5lMJo/SnqFRTC6vL06NF7qOHfig3XO8QnQz
6T5uhhrhnX2RSY3/10d2kTyHq3ZZg3+jQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD
VR0OBBYEFLDyD3PRyNXpvKHPYYxjHXWOgfPnMA4GA1UdDwEB/wQEAwIBhjAKBggq
hkjOPQQDAwNnADBkAjB20HQp6YL7CqYD82KaLGzgw305aUKw2aMrdkBR29J183jY
6Ocj9+Wcif9xnRMS+7oCMAvrt03rbh4SU9BohpRUcQ2Pjkh7RoY0jDR4Xq4qzjNr
5UFr3BXpFvACxXF51BksGQ==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrjCCAjWgAwIBAgIQeKbS5zvtqDvRtwr5H48cAjAKBggqhkjOPQQDAzCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIG1lLXNvdXRoLTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTIwMTcxOTU1WhgPMjEyMTA1MjAxODE5NTVaMIGXMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpvbiBS
RFMgbWUtc291dGgtMSBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwHU2VhdHRs
ZTB2MBAGByqGSM49AgEGBSuBBAAiA2IABEKjgUaAPmUlRMEQdBC7BScAGosJ1zRV
LDd38qTBjzgmwBfQJ5ZfGIvyEK5unB09MB4e/3qqK5I/L6Qn5Px/n5g4dq0c7MQZ
u7G9GBYm90U3WRJBf7lQrPStXaRnS4A/O6NCMEAwDwYDVR0TAQH/BAUwAwEB/zAd
BgNVHQ4EFgQUNKcAbGEIn03/vkwd8g6jNyiRdD4wDgYDVR0PAQH/BAQDAgGGMAoG
CCqGSM49BAMDA2cAMGQCMHIeTrjenCSYuGC6txuBt/0ZwnM/ciO9kHGWVCoK8QLs
jGghb5/YSFGZbmQ6qpGlSAIwVOQgdFfTpEfe5i+Vs9frLJ4QKAfc27cTNYzRIM0I
E+AJgK4C4+DiyyMzOpiCfmvq
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGCDCCA/CgAwIBAgIQSFkEUzu9FYgC5dW+5lnTgjANBgkqhkiG9w0BAQwFADCB
nDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTUwMwYDVQQDDCxB
bWF6b24gUkRTIGFwLXNvdXRoZWFzdC0zIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4G
A1UEBwwHU2VhdHRsZTAgFw0yMTA2MTEwMDA4MzZaGA8yMTIxMDYxMTAxMDgzNlow
gZwxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTE1MDMGA1UEAwws
QW1hem9uIFJEUyBhcC1zb3V0aGVhc3QtMyBSb290IENBIFJTQTQwOTYgRzExEDAO
BgNVBAcMB1NlYXR0bGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDx
my5Qmd8zdwaI/KOKV9Xar9oNbhJP5ED0JCiigkuvCkg5qM36klszE8JhsUj40xpp
vQw9wkYW4y+C8twBpzKGBvakqMnoaVUV7lOCKx0RofrnNwkZCboTBB4X/GCZ3fIl
YTybS7Ehi1UuiaZspIT5A2jidoA8HiBPk+mTg1UUkoWS9h+MEAPa8L4DY6fGf4pO
J1Gk2cdePuNzzIrpm2yPto+I8MRROwZ3ha7ooyymOXKtz2c7jEHHJ314boCXAv9G
cdo27WiebewZkHHH7Zx9iTIVuuk2abyVSzvLVeGv7Nuy4lmSqa5clWYqWsGXxvZ2
0fZC5Gd+BDUMW1eSpW7QDTk3top6x/coNoWuLSfXiC5ZrJkIKimSp9iguULgpK7G
abMMN4PR+O+vhcB8E879hcwmS2yd3IwcPTl3QXxufqeSV58/h2ibkqb/W4Bvggf6
5JMHQPlPHOqMCVFIHP1IffIo+Of7clb30g9FD2j3F4qgV3OLwEDNg/zuO1DiAvH1
L+OnmGHkfbtYz+AVApkAZrxMWwoYrwpauyBusvSzwRE24vLTd2i80ZDH422QBLXG
rN7Zas8rwIiBKacJLYtBYETw8mfsNt8gb72aIQX6cZOsphqp6hUtKaiMTVgGazl7
tBXqbB+sIv3S9X6bM4cZJKkMJOXbnyCCLZFYv8TurwIDAQABo0IwQDAPBgNVHRMB
Af8EBTADAQH/MB0GA1UdDgQWBBTOVtaS1b/lz6yJDvNk65vEastbQTAOBgNVHQ8B
Af8EBAMCAYYwDQYJKoZIhvcNAQEMBQADggIBABEONg+TmMZM/PrYGNAfB4S41zp1
3CVjslZswh/pC4kgXSf8cPJiUOzMwUevuFQj7tCqxQtJEygJM2IFg4ViInIah2kh
xlRakEGGw2dEVlxZAmmLWxlL1s1lN1565t5kgVwM0GVfwYM2xEvUaby6KDVJIkD3
aM6sFDBshvVA70qOggM6kU6mwTbivOROzfoIQDnVaT+LQjHqY/T+ok6IN0YXXCWl
Favai8RDjzLDFwXSRvgIK+1c49vlFFY4W9Efp7Z9tPSZU1TvWUcKdAtV8P2fPHAS
vAZ+g9JuNfeawhEibjXkwg6Z/yFUueQCQOs9TRXYogzp5CMMkfdNJF8byKYqHscs
UosIcETnHwqwban99u35sWcoDZPr6aBIrz7LGKTJrL8Nis8qHqnqQBXu/fsQEN8u
zJ2LBi8sievnzd0qI0kaWmg8GzZmYH1JCt1GXSqOFkI8FMy2bahP7TUQR1LBUKQ3
hrOSqldkhN+cSAOnvbQcFzLr+iEYEk34+NhcMIFVE+51KJ1n6+zISOinr6mI3ckX
6p2tmiCD4Shk2Xx/VTY/KGvQWKFcQApWezBSvDNlGe0yV71LtLf3dr1pr4ofo7cE
rYucCJ40bfxEU/fmzYdBF32xP7AOD9U0FbOR3Mcthc6Z6w20WFC+zru8FGY08gPf
WT1QcNdw7ntUJP/w
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrzCCAjWgAwIBAgIQARky6+5PNFRkFVOp3Ob1CTAKBggqhkjOPQQDAzCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGV1LXNvdXRoLTIgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjIwNTIzMTg0MTI4WhgPMjEyMjA1MjMxOTQxMjdaMIGXMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpvbiBS
RFMgZXUtc291dGgtMiBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwHU2VhdHRs
ZTB2MBAGByqGSM49AgEGBSuBBAAiA2IABNVGL5oF7cfIBxKyWd2PVK/S5yQfaJY3
QFHWvEdt6951n9JhiiPrHzfVHsxZp1CBjILRMzjgRbYWmc8qRoLkgGE7htGdwudJ
Fa/WuKzO574Prv4iZXUnVGTboC7JdvKbh6NCMEAwDwYDVR0TAQH/BAUwAwEB/zAd
BgNVHQ4EFgQUgDeIIEKynwUbNXApdIPnmRWieZwwDgYDVR0PAQH/BAQDAgGGMAoG
CCqGSM49BAMDA2gAMGUCMEOOJfucrST+FxuqJkMZyCM3gWGZaB+/w6+XUAJC6hFM
uSTY0F44/bERkA4XhH+YGAIxAIpJQBakCA1/mXjsTnQ+0El9ty+LODp8ibkn031c
8DKDS7pR9UK7ZYdR6zFg3ZCjQw==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrjCCAjOgAwIBAgIQJvkWUcYLbnxtuwnyjMmntDAKBggqhkjOPQQDAzCBljEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMS8wLQYDVQQDDCZBbWF6
b24gUkRTIGV1LXdlc3QtMyBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTAgFw0yMTA1MjUyMjI2MTJaGA8yMTIxMDUyNTIzMjYxMlowgZYxCzAJBgNV
BAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMwEQYD
VQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEvMC0GA1UEAwwmQW1hem9uIFJE
UyBldS13ZXN0LTMgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1NlYXR0bGUw
djAQBgcqhkjOPQIBBgUrgQQAIgNiAARENn8uHCyjn1dFax4OeXxvbV861qsXFD9G
DshumTmFzWWHN/69WN/AOsxy9XN5S7Cgad4gQgeYYYgZ5taw+tFo/jQvCLY//uR5
uihcLuLJ78opvRPvD9kbWZ6oXfBtFkWjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD
VR0OBBYEFKiK3LpoF+gDnqPldGSwChBPCYciMA4GA1UdDwEB/wQEAwIBhjAKBggq
hkjOPQQDAwNpADBmAjEA+7qfvRlnvF1Aosyp9HzxxCbN7VKu+QXXPhLEBWa5oeWW
UOcifunf/IVLC4/FGCsLAjEAte1AYp+iJyOHDB8UYkhBE/1sxnFaTiEPbvQBU0wZ
SuwWVLhu2wWDuSW+K7tTuL8p
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID/zCCAuegAwIBAgIRAKeDpqX5WFCGNo94M4v69sUwDQYJKoZIhvcNAQELBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyBldS13ZXN0LTMgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyNTIyMTgzM1oYDzIwNjEwNTI1MjMxODMzWjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGV1LXdlc3QtMyBSb290IENBIFJTQTIwNDggRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCcKOTEMTfzvs4H
WtJR8gI7GXN6xesulWtZPv21oT+fLGwJ+9Bv8ADCGDDrDxfeH/HxJmzG9hgVAzVn
4g97Bn7q07tGZM5pVi96/aNp11velZT7spOJKfJDZTlGns6DPdHmx48whpdO+dOb
6+eR0VwCIv+Vl1fWXgoACXYCoKjhxJs+R+fwY//0JJ1YG8yjZ+ghLCJmvlkOJmE1
TCPUyIENaEONd6T+FHGLVYRRxC2cPO65Jc4yQjsXvvQypoGgx7FwD5voNJnFMdyY
754JGPOOe/SZdepN7Tz7UEq8kn7NQSbhmCsgA/Hkjkchz96qN/YJ+H/okiQUTNB0
eG9ogiVFAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFFjayw9Y
MjbxfF14XAhMM2VPl0PfMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOC
AQEAAtmx6d9+9CWlMoU0JCirtp4dSS41bBfb9Oor6GQ8WIr2LdfZLL6uES/ubJPE
1Sh5Vu/Zon5/MbqLMVrfniv3UpQIof37jKXsjZJFE1JVD/qQfRzG8AlBkYgHNEiS
VtD4lFxERmaCkY1tjKB4Dbd5hfhdrDy29618ZjbSP7NwAfnwb96jobCmMKgxVGiH
UqsLSiEBZ33b2hI7PJ6iTJnYBWGuiDnsWzKRmheA4nxwbmcQSfjbrNwa93w3caL2
v/4u54Kcasvcu3yFsUwJygt8z43jsGAemNZsS7GWESxVVlW93MJRn6M+MMakkl9L
tWaXdHZ+KUV7LhfYLb0ajvb40w==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBDCCAuygAwIBAgIQJ5oxPEjefCsaESSwrxk68DANBgkqhkiG9w0BAQsFADCB
mjELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTMwMQYDVQQDDCpB
bWF6b24gUkRTIGV1LWNlbnRyYWwtMiBSb290IENBIFJTQTIwNDggRzExEDAOBgNV
BAcMB1NlYXR0bGUwIBcNMjIwNjA2MjExNzA1WhgPMjA2MjA2MDYyMjE3MDVaMIGa
MQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5j
LjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMzAxBgNVBAMMKkFt
YXpvbiBSRFMgZXUtY2VudHJhbC0yIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4GA1UE
BwwHU2VhdHRsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALTQt5eX
g+VP3BjO9VBkWJhE0GfLrU/QIk32I6WvrnejayTrlup9H1z4QWlXF7GNJrqScRMY
KhJHlcP05aPsx1lYco6pdFOf42ybXyWHHJdShj4A5glU81GTT+VrXGzHSarLmtua
eozkQgPpDsSlPt0RefyTyel7r3Cq+5K/4vyjCTcIqbfgaGwTU36ffjM1LaPCuE4O
nINMeD6YuImt2hU/mFl20FZ+IZQUIFZZU7pxGLqTRz/PWcH8tDDxnkYg7tNuXOeN
JbTpXrw7St50/E9ZQ0llGS+MxJD8jGRAa/oL4G/cwnV8P2OEPVVkgN9xDDQeieo0
3xkzolkDkmeKOnUCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU
bwu8635iQGQMRanekesORM8Hkm4wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB
CwUAA4IBAQAgN6LE9mUgjsj6xGCX1afYE69fnmCjjb0rC6eEe1mb/QZNcyw4XBIW
6+zTXo4mjZ4ffoxb//R0/+vdTE7IvaLgfAZgFsLKJCtYDDstXZj8ujQnGR9Pig3R
W+LpNacvOOSJSawNQq0Xrlcu55AU4buyD5VjcICnfF1dqBMnGTnh27m/scd/ZMx/
kapHZ/fMoK2mAgSX/NvUKF3UkhT85vSSM2BTtET33DzCPDQTZQYxFBa4rFRmFi4c
BLlmIReiCGyh3eJhuUUuYAbK6wLaRyPsyEcIOLMQmZe1+gAFm1+1/q5Ke9ugBmjf
PbTWjsi/lfZ5CdVAhc5lmZj/l5aKqwaS
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrjCCAjSgAwIBAgIRAKKPTYKln9L4NTx9dpZGUjowCgYIKoZIzj0EAwMwgZYx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEvMC0GA1UEAwwmQW1h
em9uIFJEUyBldS13ZXN0LTIgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTIxMjI1NTIxWhgPMjEyMTA1MjEyMzU1MjFaMIGWMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExLzAtBgNVBAMMJkFtYXpvbiBS
RFMgZXUtd2VzdC0yIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdTZWF0dGxl
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE/owTReDvaRqdmbtTzXbyRmEpKCETNj6O
hZMKH0F8oU9Tmn8RU7kQQj6xUKEyjLPrFBN7c+26TvrVO1KmJAvbc8bVliiJZMbc
C0yV5PtJTalvlMZA1NnciZuhxaxrzlK1o0IwQDAPBgNVHRMBAf8EBTADAQH/MB0G
A1UdDgQWBBT4i5HaoHtrs7Mi8auLhMbKM1XevDAOBgNVHQ8BAf8EBAMCAYYwCgYI
KoZIzj0EAwMDaAAwZQIxAK9A+8/lFdX4XJKgfP+ZLy5ySXC2E0Spoy12Gv2GdUEZ
p1G7c1KbWVlyb1d6subzkQIwKyH0Naf/3usWfftkmq8SzagicKz5cGcEUaULq4tO
GzA/AMpr63IDBAqkZbMDTCmH
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrzCCAjWgAwIBAgIQTgIvwTDuNWQo0Oe1sOPQEzAKBggqhkjOPQQDAzCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGV1LW5vcnRoLTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTI0MjEwNjM4WhgPMjEyMTA1MjQyMjA2MzhaMIGXMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpvbiBS
RFMgZXUtbm9ydGgtMSBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwHU2VhdHRs
ZTB2MBAGByqGSM49AgEGBSuBBAAiA2IABJuzXLU8q6WwSKXBvx8BbdIi3mPhb7Xo
rNJBfuMW1XRj5BcKH1ZoGaDGw+BIIwyBJg8qNmCK8kqIb4cH8/Hbo3Y+xBJyoXq/
cuk8aPrxiNoRsKWwiDHCsVxaK9L7GhHHAqNCMEAwDwYDVR0TAQH/BAUwAwEB/zAd
BgNVHQ4EFgQUYgcsdU4fm5xtuqLNppkfTHM2QMYwDgYDVR0PAQH/BAQDAgGGMAoG
CCqGSM49BAMDA2gAMGUCMQDz/Rm89+QJOWJecYAmYcBWCcETASyoK1kbr4vw7Hsg
7Ew3LpLeq4IRmTyuiTMl0gMCMAa0QSjfAnxBKGhAnYxcNJSntUyyMpaXzur43ec0
3D8npJghwC4DuICtKEkQiI5cSg==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGATCCA+mgAwIBAgIRAORIGqQXLTcbbYT2upIsSnQwDQYJKoZIhvcNAQEMBQAw
gZgxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwo
QW1hem9uIFJEUyBldS1zb3V0aC0yIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UE
BwwHU2VhdHRsZTAgFw0yMjA1MjMxODM0MjJaGA8yMTIyMDUyMzE5MzQyMlowgZgx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwoQW1h
em9uIFJEUyBldS1zb3V0aC0yIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwH
U2VhdHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAPKukwsW2s/h
1k+Hf65pOP0knVBnOnMQyT1mopp2XHGdXznj9xS49S30jYoUnWccyXgD983A1bzu
w4fuJRHg4MFdz/NWTgXvy+zy0Roe83OPIJjUmXnnzwUHQcBa9vl6XUO65iQ3pbSi
fQfNDFXD8cvuXbkezeADoy+iFAlzhXTzV9MD44GTuo9Z3qAXNGHQCrgRSCL7uRYt
t1nfwboCbsVRnElopn2cTigyVXE62HzBUmAw1GTbAZeFAqCn5giBWYAfHwTUldRL
6eEa6atfsS2oPNus4ZENa1iQxXq7ft+pMdNt0qKXTCZiiCZjmLkY0V9kWwHTRRF8
r+75oSL//3di43QnuSCgjwMRIeWNtMud5jf3eQzSBci+9njb6DrrSUbx7blP0srg
94/C/fYOp/0/EHH34w99Th14VVuGWgDgKahT9/COychLOubXUT6vD1As47S9KxTv
yYleVKwJnF9cVjepODN72fNlEf74BwzgSIhUmhksmZSeJBabrjSUj3pdyo/iRZN/
CiYz9YPQ29eXHPQjBZVIUqWbOVfdwsx0/Xu5T1e7yyXByQ3/oDulahtcoKPAFQ3J
ee6NJK655MdS7pM9hJnU2Rzu3qZ/GkM6YK7xTlMXVouPUZov/VbiaCKbqYDs8Dg+
UKdeNXAT6+BMleGQzly1X7vjhgeA8ugVAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMB
Af8wHQYDVR0OBBYEFJdaPwpCf78UolFTEn6GO85/QwUIMA4GA1UdDwEB/wQEAwIB
hjANBgkqhkiG9w0BAQwFAAOCAgEAWkxHIT3mers5YnZRSVjmpxCLivGj1jMB9VYC
iKqTAeIvD0940L0YaZgivQll5pue8UUcQ6M2uCdVVAsNJdmQ5XHIYiGOknYPtxzO
aO+bnZp7VIZw/vJ49hvH6RreA2bbxYMZO/ossYdcWsWbOKHFrRmAw0AhtK/my51g
obV7eQg+WmlE5Iqc75ycUsoZdc3NimkjBi7LQoNP1HMvlLHlF71UZhQDdq+/WdV7
0zmg+epkki1LjgMmuPyb+xWuYkFKT1/faX+Xs62hIm5BY+aI4if4RuQ+J//0pOSs
UajrjTo+jLGB8A96jAe8HaFQenbwMjlaHRDAF0wvbkYrMr5a6EbneAB37V05QD0Y
Rh4L4RrSs9DX2hbSmS6iLDuPEjanHKzglF5ePEvnItbRvGGkynqDVlwF+Bqfnw8l
0i8Hr1f1/LP1c075UjkvsHlUnGgPbLqA0rDdcxF8Fdlv1BunUjX0pVlz10Ha5M6P
AdyWUOneOfaA5G7jjv7i9qg3r99JNs1/Lmyg/tV++gnWTAsSPFSSEte81kmPhlK3
2UtAO47nOdTtk+q4VIRAwY1MaOR7wTFZPfer1mWs4RhKNu/odp8urEY87iIzbMWT
QYO/4I6BGj9rEWNGncvR5XTowwIthMCj2KWKM3Z/JxvjVFylSf+s+FFfO1bNIm6h
u3UBpZI=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICtDCCAjmgAwIBAgIQenQbcP/Zbj9JxvZ+jXbRnTAKBggqhkjOPQQDAzCBmTEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTIwMAYDVQQDDClBbWF6
b24gUkRTIGV1LWNlbnRyYWwtMSBSb290IENBIEVDQzM4NCBHMTEQMA4GA1UEBwwH
U2VhdHRsZTAgFw0yMTA1MjEyMjMzMjRaGA8yMTIxMDUyMTIzMzMyNFowgZkxCzAJ
BgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMuMRMw
EQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEyMDAGA1UEAwwpQW1hem9u
IFJEUyBldS1jZW50cmFsLTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAATlBHiEM9LoEb1Hdnd5j2VpCDOU
5nGuFoBD8ROUCkFLFh5mHrHfPXwBc63heW9WrP3qnDEm+UZEUvW7ROvtWCTPZdLz
Z4XaqgAlSqeE2VfUyZOZzBSgUUJk7OlznXfkCMOjQjBAMA8GA1UdEwEB/wQFMAMB
Af8wHQYDVR0OBBYEFDT/ThjQZl42Nv/4Z/7JYaPNMly2MA4GA1UdDwEB/wQEAwIB
hjAKBggqhkjOPQQDAwNpADBmAjEAnZWmSgpEbmq+oiCa13l5aGmxSlfp9h12Orvw
Dq/W5cENJz891QD0ufOsic5oGq1JAjEAp5kSJj0MxJBTHQze1Aa9gG4sjHBxXn98
4MP1VGsQuhfndNHQb4V0Au7OWnOeiobq
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID/zCCAuegAwIBAgIRAMgnyikWz46xY6yRgiYwZ3swDQYJKoZIhvcNAQELBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyBldS13ZXN0LTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyMDE2NDkxMloYDzIwNjEwNTIwMTc0OTEyWjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGV1LXdlc3QtMSBSb290IENBIFJTQTIwNDggRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCi8JYOc9cYSgZH
gYPxLk6Xcc7HqzamvsnjYU98Dcb98y6iDqS46Ra2Ne02MITtU5MDL+qjxb8WGDZV
RUA9ZS69tkTO3gldW8QdiSh3J6hVNJQW81F0M7ZWgV0gB3n76WCmfT4IWos0AXHM
5v7M/M4tqVmCPViQnZb2kdVlM3/Xc9GInfSMCgNfwHPTXl+PXX+xCdNBePaP/A5C
5S0oK3HiXaKGQAy3K7VnaQaYdiv32XUatlM4K2WS4AMKt+2cw3hTCjlmqKRHvYFQ
veWCXAuc+U5PQDJ9SuxB1buFJZhT4VP3JagOuZbh5NWpIbOTxlAJOb5pGEDuJTKi
1gQQQVEFAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNXm+N87
OFxK9Af/bjSxDCiulGUzMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOC
AQEAkqIbkgZ45spvrgRQ6n9VKzDLvNg+WciLtmVrqyohwwJbj4pYvWwnKQCkVc7c
hUOSBmlSBa5REAPbH5o8bdt00FPRrD6BdXLXhaECKgjsHe1WW08nsequRKD8xVmc
8bEX6sw/utBeBV3mB+3Zv7ejYAbDFM4vnRsWtO+XqgReOgrl+cwdA6SNQT9oW3e5
rSQ+VaXgJtl9NhkiIysq9BeYigxqS/A13pHQp0COMwS8nz+kBPHhJTsajHCDc8F4
HfLi6cgs9G0gaRhT8FCH66OdGSqn196sE7Y3bPFFFs/3U+vxvmQgoZC6jegQXAg5
Prxd+VNXtNI/azitTysQPumH7A==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEBTCCAu2gAwIBAgIRAO8bekN7rUReuNPG8pSTKtEwDQYJKoZIhvcNAQELBQAw
gZoxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEzMDEGA1UEAwwq
QW1hem9uIFJEUyBldS1jZW50cmFsLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYD
VQQHDAdTZWF0dGxlMCAXDTIxMDUyMTIyMjM0N1oYDzIwNjEwNTIxMjMyMzQ3WjCB
mjELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTMwMQYDVQQDDCpB
bWF6b24gUkRTIGV1LWNlbnRyYWwtMSBSb290IENBIFJTQTIwNDggRzExEDAOBgNV
BAcMB1NlYXR0bGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCTTYds
Tray+Q9VA5j5jTh5TunHKFQzn68ZbOzdqaoi/Rq4ohfC0xdLrxCpfqn2TGDHN6Zi
2qGK1tWJZEd1H0trhzd9d1CtGK+3cjabUmz/TjSW/qBar7e9MA67/iJ74Gc+Ww43
A0xPNIWcL4aLrHaLm7sHgAO2UCKsrBUpxErOAACERScVYwPAfu79xeFcX7DmcX+e
lIqY16pQAvK2RIzrekSYfLFxwFq2hnlgKHaVgZ3keKP+nmXcXmRSHQYUUr72oYNZ
HcNYl2+gxCc9ccPEHM7xncVEKmb5cWEWvVoaysgQ+osi5f5aQdzgC2X2g2daKbyA
XL/z5FM9GHpS5BJjAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
FBDAiJ7Py9/A9etNa/ebOnx5l5MGMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0B
AQsFAAOCAQEALMh/+81fFPdJV/RrJUeoUvFCGMp8iaANu97NpeJyKitNOv7RoeVP
WjivS0KcCqZaDBs+p6IZ0sLI5ZH098LDzzytcfZg0PsGqUAb8a0MiU/LfgDCI9Ee
jsOiwaFB8k0tfUJK32NPcIoQYApTMT2e26lPzYORSkfuntme2PTHUnuC7ikiQrZk
P+SZjWgRuMcp09JfRXyAYWIuix4Gy0eZ4rpRuaTK6mjAb1/LYoNK/iZ/gTeIqrNt
l70OWRsWW8jEmSyNTIubGK/gGGyfuZGSyqoRX6OKHESkP6SSulbIZHyJ5VZkgtXo
2XvyRyJ7w5pFyoofrL3Wv0UF8yt/GDszmg==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIF/zCCA+egAwIBAgIRAMDk/F+rrhdn42SfE+ghPC8wDQYJKoZIhvcNAQEMBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyBldS13ZXN0LTIgUm9vdCBDQSBSU0E0MDk2IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyMTIyNTEyMloYDzIxMjEwNTIxMjM1MTIyWjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGV1LXdlc3QtMiBSb290IENBIFJTQTQwOTYgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2twMALVg9vRVu
VNqsr6N8thmp3Dy8jEGTsm3GCQ+C5P2YcGlD/T/5icfWW84uF7Sx3ezcGlvsqFMf
Ukj9sQyqtz7qfFFugyy7pa/eH9f48kWFHLbQYm9GEgbYBIrWMp1cy3vyxuMCwQN4
DCncqU+yNpy0CprQJEha3PzY+3yJOjDQtc3zr99lyECCFJTDUucxHzyQvX89eL74
uh8la0lKH3v9wPpnEoftbrwmm5jHNFdzj7uXUHUJ41N7af7z7QUfghIRhlBDiKtx
5lYZemPCXajTc3ryDKUZC/b+B6ViXZmAeMdmQoPE0jwyEp/uaUcdp+FlUQwCfsBk
ayPFEApTWgPiku2isjdeTVmEgL8bJTDUZ6FYFR7ZHcYAsDzcwHgIu3GGEMVRS3Uf
ILmioiyly9vcK4Sa01ondARmsi/I0s7pWpKflaekyv5boJKD/xqwz9lGejmJHelf
8Od2TyqJScMpB7Q8c2ROxBwqwB72jMCEvYigB+Wnbb8RipliqNflIGx938FRCzKL
UQUBmNAznR/yRRL0wHf9UAE/8v9a09uZABeiznzOFAl/frHpgdAbC00LkFlnwwgX
g8YfEFlkp4fLx5B7LtoO6uVNFVimLxtwirpyKoj3G4M/kvSTux8bTw0heBCmWmKR
57MS6k7ODzbv+Kpeht2hqVZCNFMxoQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/
MB0GA1UdDgQWBBRuMnDhJjoj7DcKALj+HbxEqj3r6jAOBgNVHQ8BAf8EBAMCAYYw
DQYJKoZIhvcNAQEMBQADggIBALSnXfx72C3ldhBP5kY4Mo2DDaGQ8FGpTOOiD95d
0rf7I9LrsBGVqu/Nir+kqqP80PB70+Jy9fHFFigXwcPBX3MpKGxK8Cel7kVf8t1B
4YD6A6bqlzP+OUL0uGWfZpdpDxwMDI2Flt4NEldHgXWPjvN1VblEKs0+kPnKowyg
jhRMgBbD/y+8yg0fIcjXUDTAw/+INcp21gWaMukKQr/8HswqC1yoqW9in2ijQkpK
2RB9vcQ0/gXR0oJUbZQx0jn0OH8Agt7yfMAnJAdnHO4M3gjvlJLzIC5/4aGrRXZl
JoZKfJ2fZRnrFMi0nhAYDeInoS+Rwx+QzaBk6fX5VPyCj8foZ0nmqvuYoydzD8W5
mMlycgxFqS+DUmO+liWllQC4/MnVBlHGB1Cu3wTj5kgOvNs/k+FW3GXGzD3+rpv0
QTLuwSbMr+MbEThxrSZRSXTCQzKfehyC+WZejgLb+8ylLJUA10e62o7H9PvCrwj+
ZDVmN7qj6amzvndCP98sZfX7CFZPLfcBd4wVIjHsFjSNEwWHOiFyLPPG7cdolGKA
lOFvonvo4A1uRc13/zFeP0Xi5n5OZ2go8aOOeGYdI2vB2sgH9R2IASH/jHmr0gvY
0dfBCcfXNgrS0toq0LX/y+5KkKOxh52vEYsJLdhqrveuZhQnsFEm/mFwjRXkyO7c
2jpC
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGADCCA+igAwIBAgIQYe0HgSuFFP9ivYM2vONTrTANBgkqhkiG9w0BAQwFADCB
mDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChB
bWF6b24gUkRTIGV1LXNvdXRoLTEgUm9vdCBDQSBSU0E0MDk2IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUxOTE4MzMyMVoYDzIxMjEwNTE5MTkzMzIxWjCBmDEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChBbWF6
b24gUkRTIGV1LXNvdXRoLTEgUm9vdCBDQSBSU0E0MDk2IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAuO7QPKfPMTo2
POQWvzDLwi5f++X98hGjORI1zkN9kotCYH5pAzSBwBPoMNaIfedgmsIxGHj2fq5G
4oXagNhNuGP79Zl6uKW5H7S74W7aWM8C0s8zuxMOI4GZy5h2IfQk3m/3AzZEX5w8
UtNPkzo2feDVOkerHT+j+vjXgAxZ4wHnuMDcRT+K4r9EXlAH6X9b/RO0JlfEwmNz
xlqqGxocq9qRC66N6W0HF2fNEAKP84n8H80xcZBOBthQORRi8HSmKcPdmrvwCuPz
M+L+j18q6RAVaA0ABbD0jMWcTf0UvjUfBStn5mvu/wGlLjmmRkZsppUTRukfwqXK
yltUsTq0tOIgCIpne5zA4v+MebbR5JBnsvd4gdh5BI01QH470yB7BkUefZ9bobOm
OseAAVXcYFJKe4DAA6uLDrqOfFSxV+CzVvEp3IhLRaik4G5MwI/h2c/jEYDqkg2J
HMflxc2gcSMdk7E5ByLz5f6QrFfSDFk02ZJTs4ssbbUEYohht9znPMQEaWVqATWE
3n0VspqZyoBNkH/agE5GiGZ/k/QyeqzMNj+c9kr43Upu8DpLrz8v2uAp5xNj3YVg
ihaeD6GW8+PQoEjZ3mrCmH7uGLmHxh7Am59LfEyNrDn+8Rq95WvkmbyHSVxZnBmo
h/6O3Jk+0/QhIXZ2hryMflPcYWeRGH0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB
/zAdBgNVHQ4EFgQU2eFK7+R3x/me8roIBNxBrplkM6EwDgYDVR0PAQH/BAQDAgGG
MA0GCSqGSIb3DQEBDAUAA4ICAQB5gWFe5s7ObQFj1fTO9L6gYgtFhnwdmxU0q8Ke
HWCrdFmyXdC39qdAFOwM5/7fa9zKmiMrZvy9HNvCXEp4Z7z9mHhBmuqPZQx0qPgU
uLdP8wGRuWryzp3g2oqkX9t31Z0JnkbIdp7kfRT6ME4I4VQsaY5Y3mh+hIHOUvcy
p+98i3UuEIcwJnVAV9wTTzrWusZl9iaQ1nSYbmkX9bBssJ2GmtW+T+VS/1hJ/Q4f
AlE3dOQkLFoPPb3YRWBHr2n1LPIqMVwDNAuWavRA2dSfaLl+kzbn/dua7HTQU5D4
b2Fu2vLhGirwRJe+V7zdef+tI7sngXqjgObyOeG5O2BY3s+um6D4fS0Th3QchMO7
0+GwcIgSgcjIjlrt6/xJwJLE8cRkUUieYKq1C4McpZWTF30WnzOPUzRzLHkcNzNA
0A7sKMK6QoYWo5Rmo8zewUxUqzc9oQSrYADP7PEwGncLtFe+dlRFx+PA1a+lcIgo
1ZGfXigYtQ3VKkcknyYlJ+hN4eCMBHtD81xDy9iP2MLE41JhLnoB2rVEtewO5diF
7o95Mwl84VMkLhhHPeGKSKzEbBtYYBifHNct+Bst8dru8UumTltgfX6urH3DN+/8
JF+5h3U8oR2LL5y76cyeb+GWDXXy9zoQe2QvTyTy88LwZq1JzujYi2k8QiLLhFIf
FEv9Bg==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICsDCCAjagAwIBAgIRAMgApnfGYPpK/fD0dbN2U4YwCgYIKoZIzj0EAwMwgZcx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwnQW1h
em9uIFJEUyBldS1zb3V0aC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMCAXDTIxMDUxOTE4MzgxMVoYDzIxMjEwNTE5MTkzODExWjCBlzELMAkG
A1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4xEzAR
BgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6b24g
UkRTIGV1LXNvdXRoLTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1NlYXR0
bGUwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQfEWl6d4qSuIoECdZPp+39LaKsfsX7
THs3/RrtT0+h/jl3bjZ7Qc68k16x+HGcHbaayHfqD0LPdzH/kKtNSfQKqemdxDQh
Z4pwkixJu8T1VpXZ5zzCvBXCl75UqgEFS92jQjBAMA8GA1UdEwEB/wQFMAMBAf8w
HQYDVR0OBBYEFFPrSNtWS5JU+Tvi6ABV231XbjbEMA4GA1UdDwEB/wQEAwIBhjAK
BggqhkjOPQQDAwNoADBlAjEA+a7hF1IrNkBd2N/l7IQYAQw8chnRZDzh4wiGsZsC
6A83maaKFWUKIb3qZYXFSi02AjAbp3wxH3myAmF8WekDHhKcC2zDvyOiKLkg9Y6v
ZVmyMR043dscQbcsVoacOYv198c=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICtDCCAjqgAwIBAgIRAPhVkIsQ51JFhD2kjFK5uAkwCgYIKoZIzj0EAwMwgZkx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEyMDAGA1UEAwwpQW1h
em9uIFJEUyBldS1jZW50cmFsLTIgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjIwNjA2MjEyOTE3WhgPMjEyMjA2MDYyMjI5MTdaMIGZMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMjAwBgNVBAMMKUFtYXpv
biBSRFMgZXUtY2VudHJhbC0yIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEA5xnIEBtG5b2nmbj49UEwQza
yX0844fXjccYzZ8xCDUe9dS2XOUi0aZlGblgSe/3lwjg8fMcKXLObGGQfgIx1+5h
AIBjORis/dlyN5q/yH4U5sjS8tcR0GDGVHrsRUZCo0IwQDAPBgNVHRMBAf8EBTAD
AQH/MB0GA1UdDgQWBBRK+lSGutXf4DkTjR3WNfv4+KeNFTAOBgNVHQ8BAf8EBAMC
AYYwCgYIKoZIzj0EAwMDaAAwZQIxAJ4NxQ1Gerqr70ZrnUqc62Vl8NNqTzInamCG
Kce3FTsMWbS9qkgrjZkO9QqOcGIw/gIwSLrwUT+PKr9+H9eHyGvpq9/3AIYSnFkb
Cf3dyWPiLKoAtLFwjzB/CkJlsAS1c8dS
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIF/jCCA+agAwIBAgIQGZH12Q7x41qIh9vDu9ikTjANBgkqhkiG9w0BAQwFADCB
lzELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdB
bWF6b24gUkRTIGV1LXdlc3QtMyBSb290IENBIFJTQTQwOTYgRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjEwNTI1MjIyMjMzWhgPMjEyMTA1MjUyMzIyMzNaMIGXMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpv
biBSRFMgZXUtd2VzdC0zIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMqE47sHXWzdpuqj
JHb+6jM9tDbQLDFnYjDWpq4VpLPZhb7xPNh9gnYYTPKG4avG421EblAHqzy9D2pN
1z90yKbIfUb/Sy2MhQbmZomsObhONEra06fJ0Dydyjswf1iYRp2kwpx5AgkVoNo7
3dlws73zFjD7ImKvUx2C7B75bhnw2pJWkFnGcswl8fZt9B5Yt95sFOKEz2MSJE91
kZlHtya19OUxZ/cSGci4MlOySzqzbGwUqGxEIDlY8I39VMwXaYQ8uXUN4G780VcL
u46FeyRGxZGz2n3hMc805WAA1V5uir87vuirTvoSVREET97HVRGVVNJJ/FM6GXr1
VKtptybbo81nefYJg9KBysxAa2Ao2x2ry/2ZxwhS6VZ6v1+90bpZA1BIYFEDXXn/
dW07HSCFnYSlgPtSc+Muh15mdr94LspYeDqNIierK9i4tB6ep7llJAnq0BU91fM2
JPeqyoTtc3m06QhLf68ccSxO4l8Hmq9kLSHO7UXgtdjfRVaffngopTNk8qK7bIb7
LrgkqhiQw/PRCZjUdyXL153/fUcsj9nFNe25gM4vcFYwH6c5trd2tUl31NTi1MfG
Mgp3d2dqxQBIYANkEjtBDMy3SqQLIo9EymqmVP8xx2A/gCBgaxvMAsI6FSWRoC7+
hqJ8XH4mFnXSHKtYMe6WPY+/XZgtAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8w
HQYDVR0OBBYEFIkXqTnllT/VJnI2NqipA4XV8rh1MA4GA1UdDwEB/wQEAwIBhjAN
BgkqhkiG9w0BAQwFAAOCAgEAKjSle8eenGeHgT8pltWCw/HzWyQruVKhfYIBfKJd
MhV4EnH5BK7LxBIvpXGsFUrb0ThzSw0fn0zoA9jBs3i/Sj6KyeZ9qUF6b8ycDXd+
wHonmJiQ7nk7UuMefaYAfs06vosgl1rI7eBHC0itexIQmKh0aX+821l4GEgEoSMf
loMFTLXv2w36fPHHCsZ67ODldgcZbKNnpCTX0YrCwEYO3Pz/L398btiRcWGrewrK
jdxAAyietra8DRno1Zl87685tfqc6HsL9v8rVw58clAo9XAQvT+fmSOFw/PogRZ7
OMHUat3gu/uQ1M5S64nkLLFsKu7jzudBuoNmcJysPlzIbqJ7vYc82OUGe9ucF3wi
3tbKQ983hdJiTExVRBLX/fYjPsGbG3JtPTv89eg2tjWHlPhCDMMxyRKl6isu2RTq
6VT489Z2zQrC33MYF8ZqO1NKjtyMAMIZwxVu4cGLkVsqFmEV2ScDHa5RadDyD3Ok
m+mqybhvEVm5tPgY6p0ILPMN3yvJsMSPSvuBXhO/X5ppNnpw9gnxpwbjQKNhkFaG
M5pkADZ14uRguOLM4VthSwUSEAr5VQYCFZhEwK+UOyJAGiB/nJz6IxL5XBNUXmRM
Hl8Xvz4riq48LMQbjcVQj0XvH941yPh+P8xOi00SGaQRaWp55Vyr4YKGbV0mEDz1
r1o=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIF/zCCA+egAwIBAgIRAKwYju1QWxUZpn6D1gOtwgQwDQYJKoZIhvcNAQEMBQAw
gZcxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEwMC4GA1UEAwwn
QW1hem9uIFJEUyBldS13ZXN0LTEgUm9vdCBDQSBSU0E0MDk2IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyMDE2NTM1NFoYDzIxMjEwNTIwMTc1MzU0WjCBlzEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdBbWF6
b24gUkRTIGV1LXdlc3QtMSBSb290IENBIFJTQTQwOTYgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCKdBP1U4lqWWkc
Cb25/BKRTsvNVnISiKocva8GAzJyKfcGRa85gmgu41U+Hz6+39K+XkRfM0YS4BvQ
F1XxWT0bNyypuvwCvmYShSTjN1TY0ltncDddahTajE/4MdSOZb/c98u0yt03cH+G
hVwRyT50h0v/UEol50VfwcVAEZEgcQQYhf1IFUFlIvKpmDOqLuFakOnc7c9akK+i
ivST+JO1tgowbnNkn2iLlSSgUWgb1gjaOsNfysagv1RXdlyPw3EyfwkFifAQvF2P
Q0ayYZfYS640cccv7efM1MSVyFHR9PrrDsF/zr2S2sGPbeHr7R/HwLl+S5J/l9N9
y0rk6IHAWV4dEkOvgpnuJKURwA48iu1Hhi9e4moNS6eqoK2KmY3VFpuiyWcA73nH
GSmyaH+YuMrF7Fnuu7GEHZL/o6+F5cL3mj2SJJhL7sz0ryf5Cs5R4yN9BIEj/f49
wh84pM6nexoI0Q4wiSFCxWiBpjSmOK6h7z6+2utaB5p20XDZHhxAlmlx4vMuWtjh
XckgRFxc+ZpVMU3cAHUpVEoO49e/+qKEpPzp8Xg4cToKw2+AfTk3cmyyXQfGwXMQ
ZUHNZ3w9ILMWihGCM2aGUsLcGDRennvNmnmin/SENsOQ8Ku0/a3teEzwV9cmmdYz
5iYs1YtgPvKFobY6+T2RXXh+A5kprwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/
MB0GA1UdDgQWBBSyUrsQVnKmA8z6/2Ech0rCvqpNmTAOBgNVHQ8BAf8EBAMCAYYw
DQYJKoZIhvcNAQEMBQADggIBAFlj3IFmgiFz5lvTzFTRizhVofhTJsGr14Yfkuc7
UrXPuXOwJomd4uot2d/VIeGJpfnuS84qGdmQyGewGTJ9inatHsGZgHl9NHNWRwKZ
lTKTbBiq7aqgtUSFa06v202wpzU+1kadxJJePrbABxiXVfOmIW/a1a4hPNcT3syH
FIEg1+CGsp71UNjBuwg3JTKWna0sLSKcxLOSOvX1fzxK5djzVpEsvQMB4PSAzXca
vENgg2ErTwgTA+4s6rRtiBF9pAusN1QVuBahYP3ftrY6f3ycS4K65GnqscyfvKt5
YgjtEKO3ZeeX8NpubMbzC+0Z6tVKfPFk/9TXuJtwvVeqow0YMrLLyRiYvK7EzJ97
rrkxoKnHYQSZ+rH2tZ5SE392/rfk1PJL0cdHnkpDkUDO+8cKsFjjYKAQSNC52sKX
74AVh6wMwxYwVZZJf2/2XxkjMWWhKNejsZhUkTISSmiLs+qPe3L67IM7GyKm9/m6
R3r8x6NGjhTsKH64iYJg7AeKeax4b2e4hBb6GXFftyOs7unpEOIVkJJgM6gh3mwn
R7v4gwFbLKADKt1vHuerSZMiTuNTGhSfCeDM53XI/mjZl2HeuCKP1mCDLlaO+gZR
Q/G+E0sBKgEX4xTkAc3kgkuQGfExdGtnN2U2ehF80lBHB8+2y2E+xWWXih/ZyIcW
wOx+
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGBDCCA+ygAwIBAgIQM4C8g5iFRucSWdC8EdqHeDANBgkqhkiG9w0BAQwFADCB
mjELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTMwMQYDVQQDDCpB
bWF6b24gUkRTIGV1LWNlbnRyYWwtMSBSb290IENBIFJTQTQwOTYgRzExEDAOBgNV
BAcMB1NlYXR0bGUwIBcNMjEwNTIxMjIyODI2WhgPMjEyMTA1MjEyMzI4MjZaMIGa
MQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5j
LjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMzAxBgNVBAMMKkFt
YXpvbiBSRFMgZXUtY2VudHJhbC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UE
BwwHU2VhdHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANeTsD/u
6saPiY4Sg0GlJlMXMBltnrcGAEkwq34OKQ0bCXqcoNJ2rcAMmuFC5x9Ho1Y3YzB7
NO2GpIh6bZaO76GzSv4cnimcv9n/sQSYXsGbPD+bAtnN/RvNW1avt4C0q0/ghgF1
VFS8JihIrgPYIArAmDtGNEdl5PUrdi9y6QGggbRfidMDdxlRdZBe1C18ZdgERSEv
UgSTPRlVczONG5qcQkUGCH83MMqL5MKQiby/Br5ZyPq6rxQMwRnQ7tROuElzyYzL
7d6kke+PNzG1mYy4cbYdjebwANCtZ2qYRSUHAQsOgybRcSoarv2xqcjO9cEsDiRU
l97ToadGYa4VVERuTaNZxQwrld4mvzpyKuirqZltOqg0eoy8VUsaRPL3dc5aChR0
dSrBgRYmSAClcR2/2ZCWpXemikwgt031Dsc0A/+TmVurrsqszwbr0e5xqMow9LzO
MI/JtLd0VFtoOkL/7GG2tN8a+7gnLFxpv+AQ0DH5n4k/BY/IyS+H1erqSJhOTQ11
vDOFTM5YplB9hWV9fp5PRs54ILlHTlZLpWGs3I2BrJwzRtg/rOlvsosqcge9ryai
AKm2j+JBg5wJ19R8oxRy8cfrNTftZePpISaLTyV2B16w/GsSjqixjTQe9LRN2DHk
cC+HPqYyzW2a3pUVyTGHhW6a7YsPBs9yzt6hAgMBAAGjQjBAMA8GA1UdEwEB/wQF
MAMBAf8wHQYDVR0OBBYEFIqA8QkOs2cSirOpCuKuOh9VDfJfMA4GA1UdDwEB/wQE
AwIBhjANBgkqhkiG9w0BAQwFAAOCAgEAOUI90mEIsa+vNJku0iUwdBMnHiO4gm7E
5JloP7JG0xUr7d0hypDorMM3zVDAL+aZRHsq8n934Cywj7qEp1304UF6538ByGdz
tkfacJsUSYfdlNJE9KbA4T+U+7SNhj9jvePpVjdQbhgzxITE9f8CxY/eM40yluJJ
PhbaWvOiRagzo74wttlcDerzLT6Y/JrVpWhnB7IY8HvzK+BwAdaCsBUPC3HF+kth
CIqLq7J3YArTToejWZAp5OOI6DLPM1MEudyoejL02w0jq0CChmZ5i55ElEMnapRX
7GQTARHmjgAOqa95FjbHEZzRPqZ72AtZAWKFcYFNk+grXSeWiDgPFOsq6mDg8DDB
0kfbYwKLFFCC9YFmYzR2YrWw2NxAScccUc2chOWAoSNHiqBbHR8ofrlJSWrtmKqd
YRCXzn8wqXnTS3NNHNccqJ6dN+iMr9NGnytw8zwwSchiev53Fpc1mGrJ7BKTWH0t
ZrA6m32wzpMymtKozlOPYoE5mtZEzrzHEXfa44Rns7XIHxVQSXVWyBHLtIsZOrvW
U5F41rQaFEpEeUQ7sQvqUoISfTUVRNDn6GK6YaccEhCji14APLFIvhRQUDyYMIiM
4vll0F/xgVRHTgDVQ8b8sxdhSYlqB4Wc2Ym41YRz+X2yPqk3typEZBpc4P5Tt1/N
89cEIGdbjsA=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEADCCAuigAwIBAgIQYjbPSg4+RNRD3zNxO1fuKDANBgkqhkiG9w0BAQsFADCB
mDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChB
bWF6b24gUkRTIGV1LW5vcnRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUyNDIwNTkyMVoYDzIwNjEwNTI0MjE1OTIxWjCBmDEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChBbWF6
b24gUkRTIGV1LW5vcnRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA179eQHxcV0YL
XMkqEmhSBazHhnRVd8yICbMq82PitE3BZcnv1Z5Zs/oOgNmMkOKae4tCXO/41JCX
wAgbs/eWWi+nnCfpQ/FqbLPg0h3dqzAgeszQyNl9IzTzX4Nd7JFRBVJXPIIKzlRf
+GmFsAhi3rYgDgO27pz3ciahVSN+CuACIRYnA0K0s9lhYdddmrW/SYeWyoB7jPa2
LmWpAs7bDOgS4LlP2H3eFepBPgNufRytSQUVA8f58lsE5w25vNiUSnrdlvDrIU5n
Qwzc7NIZCx4qJpRbSKWrUtbyJriWfAkGU7i0IoainHLn0eHp9bWkwb9D+C/tMk1X
ERZw2PDGkwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSFmR7s
dAblusFN+xhf1ae0KUqhWTAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQAD
ggEBAHsXOpjPMyH9lDhPM61zYdja1ebcMVgfUvsDvt+w0xKMKPhBzYDMs/cFOi1N
Q8LV79VNNfI2NuvFmGygcvTIR+4h0pqqZ+wjWl3Kk5jVxCrbHg3RBX02QLumKd/i
kwGcEtTUvTssn3SM8bgM0/1BDXgImZPC567ciLvWDo0s/Fe9dJJC3E0G7d/4s09n
OMdextcxFuWBZrBm/KK3QF0ByA8MG3//VXaGO9OIeeOJCpWn1G1PjT1UklYhkg61
EbsTiZVA2DLd1BGzfU4o4M5mo68l0msse/ndR1nEY6IywwpgIFue7+rEleDh6b9d
PYkG1rHVw2I0XDG4o17aOn5E94I=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEADCCAuigAwIBAgIQC6W4HFghUkkgyQw14a6JljANBgkqhkiG9w0BAQsFADCB
mDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChB
bWF6b24gUkRTIGV1LXNvdXRoLTIgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIyMDUyMzE4MTYzMloYDzIwNjIwNTIzMTkxNjMyWjCBmDEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChBbWF6
b24gUkRTIGV1LXNvdXRoLTIgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiM/t4FV2R9Nx
UQG203UY83jInTa/6TMq0SPyg617FqYZxvz2kkx09x3dmxepUg9ttGMlPgjsRZM5
LCFEi1FWk+hxHzt7vAdhHES5tdjwds3aIkgNEillmRDVrUsbrDwufLaa+MMDO2E1
wQ/JYFXw16WBCCi2g1EtyQ2Xp+tZDX5IWOTnvhZpW8vVDptZ2AcJ5rMhfOYO3OsK
5EF0GGA5ldzuezP+BkrBYGJ4wVKGxeaq9+5AT8iVZrypjwRkD7Y5CurywK3+aBwm
s9Q5Nd8t45JCOUzYp92rFKsCriD86n/JnEvgDfdP6Hvtm0/DkwXK40Wz2q0Zrd0k
mjP054NRPwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRR7yqd
SfKcX2Q8GzhcVucReIpewTAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQAD
ggEBAEszBRDwXcZyNm07VcFwI1Im94oKwKccuKYeJEsizTBsVon8VpEiMwDs+yGu
3p8kBhvkLwWybkD/vv6McH7T5b9jDX2DoOudqYnnaYeypsPH/00Vh3LvKagqzQza
orWLx+0tLo8xW4BtU+Wrn3JId8LvAhxyYXTn9bm+EwPcStp8xGLwu53OPD1RXYuy
uu+3ps/2piP7GVfou7H6PRaqbFHNfiGg6Y+WA0HGHiJzn8uLmrRJ5YRdIOOG9/xi
qTmAZloUNM7VNuurcMM2hWF494tQpsQ6ysg2qPjbBqzlGoOt3GfBTOZmqmwmqtam
K7juWM/mdMQAJ3SMlE5wI8nVdx4=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIICrjCCAjSgAwIBAgIRAL9SdzVPcpq7GOpvdGoM80IwCgYIKoZIzj0EAwMwgZYx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTEvMC0GA1UEAwwmQW1h
em9uIFJEUyBldS13ZXN0LTEgUm9vdCBDQSBFQ0MzODQgRzExEDAOBgNVBAcMB1Nl
YXR0bGUwIBcNMjEwNTIwMTY1ODA3WhgPMjEyMTA1MjAxNzU4MDdaMIGWMQswCQYD
VQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjETMBEG
A1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExLzAtBgNVBAMMJkFtYXpvbiBS
RFMgZXUtd2VzdC0xIFJvb3QgQ0EgRUNDMzg0IEcxMRAwDgYDVQQHDAdTZWF0dGxl
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEJWDgXebvwjR+Ce+hxKOLbnsfN5W5dOlP
Zn8kwWnD+SLkU81Eac/BDJsXGrMk6jFD1vg16PEkoSevsuYWlC8xR6FmT6F6pmeh
fsMGOyJpfK4fyoEPhKeQoT23lFIc5Orjo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0G
A1UdDgQWBBSVNAN1CHAz0eZ77qz2adeqjm31TzAOBgNVHQ8BAf8EBAMCAYYwCgYI
KoZIzj0EAwMDaAAwZQIxAMlQeHbcjor49jqmcJ9gRLWdEWpXG8thIf6zfYQ/OEAg
d7GDh4fR/OUk0VfjsBUN/gIwZB0bGdXvK38s6AAE/9IT051cz/wMe9GIrX1MnL1T
1F5OqnXJdiwfZRRTHsRQ/L00
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGBDCCA+ygAwIBAgIQalr16vDfX4Rsr+gfQ4iVFDANBgkqhkiG9w0BAQwFADCB
mjELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTMwMQYDVQQDDCpB
bWF6b24gUkRTIGV1LWNlbnRyYWwtMiBSb290IENBIFJTQTQwOTYgRzExEDAOBgNV
BAcMB1NlYXR0bGUwIBcNMjIwNjA2MjEyNTIzWhgPMjEyMjA2MDYyMjI1MjNaMIGa
MQswCQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5j
LjETMBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMzAxBgNVBAMMKkFt
YXpvbiBSRFMgZXUtY2VudHJhbC0yIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UE
BwwHU2VhdHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANbHbFg7
2VhZor1YNtez0VlNFaobS3PwOMcEn45BE3y7HONnElIIWXGQa0811M8V2FnyqnE8
Z5aO1EuvijvWf/3D8DPZkdmAkIfh5hlZYY6Aatr65kEOckwIAm7ZZzrwFogYuaFC
z/q0CW+8gxNK+98H/zeFx+IxiVoPPPX6UlrLvn+R6XYNERyHMLNgoZbbS5gGHk43
KhENVv3AWCCcCc85O4rVd+DGb2vMVt6IzXdTQt6Kih28+RGph+WDwYmf+3txTYr8
xMcCBt1+whyCPlMbC+Yn/ivtCO4LRf0MPZDRQrqTTrFf0h/V0BGEUmMGwuKgmzf5
Kl9ILdWv6S956ioZin2WgAxhcn7+z//sN++zkqLreSf90Vgv+A7xPRqIpTdJ/nWG
JaAOUofBfsDsk4X4SUFE7xJa1FZAiu2lqB/E+y7jnWOvFRalzxVJ2Y+D/ZfUfrnK
4pfKtyD1C6ni1celrZrAwLrJ3PoXPSg4aJKh8+CHex477SRsGj8KP19FG8r0P5AG
8lS1V+enFCNvT5KqEBpDZ/Y5SQAhAYFUX+zH4/n4ql0l/emS+x23kSRrF+yMkB9q
lhC/fMk6Pi3tICBjrDQ8XAxv56hfud9w6+/ljYB2uQ1iUYtlE3JdIiuE+3ws26O8
i7PLMD9zQmo+sVi12pLHfBHQ6RRHtdVRXbXRAgMBAAGjQjBAMA8GA1UdEwEB/wQF
MAMBAf8wHQYDVR0OBBYEFBFot08ipEL9ZUXCG4lagmF53C0/MA4GA1UdDwEB/wQE
AwIBhjANBgkqhkiG9w0BAQwFAAOCAgEAi2mcZi6cpaeqJ10xzMY0F3L2eOKYnlEQ
h6QyhmNKCUF05q5u+cok5KtznzqMwy7TFOZtbVHl8uUX+xvgq/MQCxqFAnuStBXm
gr2dg1h509ZwvTdk7TDxGdftvPCfnPNJBFbMSq4CZtNcOFBg9Rj8c3Yj+Qvwd56V
zWs65BUkDNJrXmxdvhJZjUkMa9vi/oFN+M84xXeZTaC5YDYNZZeW9706QqDbAVES
5ulvKLavB8waLI/lhRBK5/k0YykCMl0A8Togt8D1QsQ0eWWbIM8/HYJMPVFhJ8Wj
vT1p/YVeDA3Bo1iKDOttgC5vILf5Rw1ZEeDxjf/r8A7VS13D3OLjBmc31zxRTs3n
XvHKP9MieQHn9GE44tEYPjK3/yC6BDFzCBlvccYHmqGb+jvDEXEBXKzimdC9mcDl
f4BBQWGJBH5jkbU9p6iti19L/zHhz7qU6UJWbxY40w92L9jS9Utljh4A0LCTjlnR
NQUgjnGC6K+jkw8hj0LTC5Ip87oqoT9w7Av5EJ3VJ4hcnmNMXJJ1DkWYdnytcGpO
DMVITQzzDZRwhbitCVPHagTN2wdi9TEuYE33J0VmFeTc6FSI50wP2aOAZ0Q1/8Aj
bxeM5jS25eaHc2CQAuhrc/7GLnxOcPwdWQb2XWT8eHudhMnoRikVv/KSK3mf6om4
1YfpdH2jp30=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID/jCCAuagAwIBAgIQTDc+UgTRtYO7ZGTQ8UWKDDANBgkqhkiG9w0BAQsFADCB
lzELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTAwLgYDVQQDDCdB
bWF6b24gUkRTIGV1LXdlc3QtMiBSb290IENBIFJTQTIwNDggRzExEDAOBgNVBAcM
B1NlYXR0bGUwIBcNMjEwNTIxMjI0NjI0WhgPMjA2MTA1MjEyMzQ2MjRaMIGXMQsw
CQYDVQQGEwJVUzEiMCAGA1UECgwZQW1hem9uIFdlYiBTZXJ2aWNlcywgSW5jLjET
MBEGA1UECwwKQW1hem9uIFJEUzELMAkGA1UECAwCV0ExMDAuBgNVBAMMJ0FtYXpv
biBSRFMgZXUtd2VzdC0yIFJvb3QgQ0EgUlNBMjA0OCBHMTEQMA4GA1UEBwwHU2Vh
dHRsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM1oGtthQ1YiVIC2
i4u4swMAGxAjc/BZp0yq0eP5ZQFaxnxs7zFAPabEWsrjeDzrRhdVO0h7zskrertP
gblGhfD20JfjvCHdP1RUhy/nzG+T+hn6Takan/GIgs8grlBMRHMgBYHW7tklhjaH
3F7LujhceAHhhgp6IOrpb6YTaTTaJbF3GTmkqxSJ3l1LtEoWz8Al/nL/Ftzxrtez
Vs6ebpvd7sw37sxmXBWX2OlvUrPCTmladw9OrllGXtCFw4YyLe3zozBlZ3cHzQ0q
lINhpRcajTMfZrsiGCkQtoJT+AqVJPS2sHjqsEH8yiySW9Jbq4zyMbM1yqQ2vnnx
MJgoYMcCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUaQG88UnV
JPTI+Pcti1P+q3H7pGYwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4IB
AQBAkgr75V0sEJimC6QRiTVWEuj2Khy7unjSfudbM6zumhXEU2/sUaVLiYy6cA/x
3v0laDle6T07x9g64j5YastE/4jbzrGgIINFlY0JnaYmR3KZEjgi1s1fkRRf3llL
PJm9u4Q1mbwAMQK/ZjLuuRcL3uRIHJek18nRqT5h43GB26qXyvJqeYYpYfIjL9+/
YiZAbSRRZG+Li23cmPWrbA1CJY121SB+WybCbysbOXzhD3Sl2KSZRwSw4p2HrFtV
1Prk0dOBtZxCG9luf87ultuDZpfS0w6oNBAMXocgswk24ylcADkkFxBWW+7BETn1
EpK+t1Lm37mU4sxtuha00XAi
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIEADCCAuigAwIBAgIQcY44/8NUvBwr6LlHfRy7KjANBgkqhkiG9w0BAQsFADCB
mDELMAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIElu
Yy4xEzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChB
bWF6b24gUkRTIGV1LXNvdXRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQH
DAdTZWF0dGxlMCAXDTIxMDUxOTE4MjcxOFoYDzIwNjEwNTE5MTkyNzE4WjCBmDEL
MAkGA1UEBhMCVVMxIjAgBgNVBAoMGUFtYXpvbiBXZWIgU2VydmljZXMsIEluYy4x
EzARBgNVBAsMCkFtYXpvbiBSRFMxCzAJBgNVBAgMAldBMTEwLwYDVQQDDChBbWF6
b24gUkRTIGV1LXNvdXRoLTEgUm9vdCBDQSBSU0EyMDQ4IEcxMRAwDgYDVQQHDAdT
ZWF0dGxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0UaBeC+Usalu
EtXnV7+PnH+gi7/71tI/jkKVGKuhD2JDVvqLVoqbMHRh3+wGMvqKCjbHPcC2XMWv
566fpAj4UZ9CLB5fVzss+QVNTl+FH2XhEzigopp+872ajsNzcZxrMkifxGb4i0U+
t0Zi+UrbL5tsfP2JonKR1crOrbS6/DlzHBjIiJazGOQcMsJjNuTOItLbMohLpraA
/nApa3kOvI7Ufool1/34MG0+wL3UUA4YkZ6oBJVxjZvvs6tI7Lzz/SnhK2widGdc
snbLqBpHNIZQSorVoiwcFaRBGYX/uzYkiw44Yfa4cK2V/B5zgu1Fbr0gbI2am4eh
yVYyg4jPawIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBS9gM1m
IIjyh9O5H/7Vj0R/akI7UzAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQAD
ggEBAF0Sm9HC2AUyedBVnwgkVXMibnYChOzz7T+0Y+fOLXYAEXex2s8oqGeZdGYX
JHkjBn7JXu7LM+TpTbPbFFDoc1sgMguD/ls+8XsqAl1CssW+amryIL+jfcfbgQ+P
ICwEUD9hGdjBgJ5WcuS+qqxHsEIlFNci3HxcxfBa9VsWs5TjI7Vsl4meL5lf7ZyL
wDV7dHRuU+cImqG1MIvPRIlvPnT7EghrCYi2VCPhP2pM/UvShuwVnkz4MJ29ebIk
WR9kpblFxFdE92D5UUvMCjC2kmtgzNiErvTcwIvOO9YCbBHzRB1fFiWrXUHhJWq9
IkaxR5icb/IpAV0A1lYZEWMVsfQ=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIGATCCA+mgAwIBAgIRAMa0TPL+QgbWfUPpYXQkf8wwDQYJKoZIhvcNAQEMBQAw
gZgxCzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJ
bmMuMRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwo
QW1hem9uIFJEUyBldS1ub3J0aC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UE
BwwHU2VhdHRsZTAgFw0yMTA1MjQyMTAzMjBaGA8yMTIxMDUyNDIyMDMyMFowgZgx
CzAJBgNVBAYTAlVTMSIwIAYDVQQKDBlBbWF6b24gV2ViIFNlcnZpY2VzLCBJbmMu
MRMwEQYDVQQLDApBbWF6b24gUkRTMQswCQYDVQQIDAJXQTExMC8GA1UEAwwoQW1h
em9uIFJEUyBldS1ub3J0aC0xIFJvb3QgQ0EgUlNBNDA5NiBHMTEQMA4GA1UEBwwH
U2VhdHRsZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANhS9LJVJyWp
6Rudy9t47y6kzvgnFYDrvJVtgEK0vFn5ifdlHE7xqMz4LZqWBFTnS+3oidwVRqo7
tqsuuElsouStO8m315/YUzKZEPmkw8h5ufWt/lg3NTCoUZNkB4p4skr7TspyMUwE
VdlKQuWTCOLtofwmWT+BnFF3To6xTh3XPlT3ssancw27Gob8kJegD7E0TSMVsecP
B8je65+3b8CGwcD3QB3kCTGLy87tXuS2+07pncHvjMRMBdDQQQqhXWsRSeUNg0IP
xdHTWcuwMldYPWK5zus9M4dCNBDlmZjKdcZZVUOKeBBAm7Uo7CbJCk8r/Fvfr6mw
nXXDtuWhqn/WhJiI/y0QU27M+Hy5CQMxBwFsfAjJkByBpdXmyYxUgTmMpLf43p7H
oWfH1xN0cT0OQEVmAQjMakauow4AQLNkilV+X6uAAu3STQVFRSrpvMen9Xx3EPC3
G9flHueTa71bU65Xe8ZmEmFhGeFYHY0GrNPAFhq9RThPRY0IPyCZe0Th8uGejkek
jQjm0FHPOqs5jc8CD8eJs4jSEFt9lasFLVDcAhx0FkacLKQjGHvKAnnbRwhN/dF3
xt4oL8Z4JGPCLau056gKnYaEyviN7PgO+IFIVOVIdKEBu2ASGE8/+QJB5bcHefNj
04hEkDW0UYJbSfPpVbGAR0gFI/QpycKnAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMB
Af8wHQYDVR0OBBYEFFMXvvjoaGGUcul8GA3FT05DLbZcMA4GA1UdDwEB/wQEAwIB
hjANBgkqhkiG9w0BAQwFAAOCAgEAQLwFhd2JKn4K/6salLyIA4mP58qbA/9BTB/r
D9l0bEwDlVPSdY7R3gZCe6v7SWLfA9RjE5tdWDrQMi5IU6W2OVrVsZS/yGJfwnwe
a/9iUAYprA5QYKDg37h12XhVsDKlYCekHdC+qa5WwB1SL3YUprDLPWeaIQdg+Uh2
+LxvpZGoxoEbca0fc7flwq9ke/3sXt/3V4wJDyY6AL2YNdjFzC+FtYjHHx8rYxHs
aesP7yunuN17KcfOZBBnSFRrx96k+Xm95VReTEEpwiBqAECqEpMbd+R0mFAayMb1
cE77GaK5yeC2f67NLYGpkpIoPbO9p9rzoXLE5GpSizMjimnz6QCbXPFAFBDfSzim
u6azp40kEUO6kWd7rBhqRwLc43D3TtNWQYxMve5mTRG4Od+eMKwYZmQz89BQCeqm
aZiJP9y9uwJw4p/A5V3lYHTDQqzmbOyhGUk6OdpdE8HXs/1ep1xTT20QDYOx3Ekt
r4mmNYfH/8v9nHNRlYJOqFhmoh1i85IUl5IHhg6OT5ZTTwsGTSxvgQQXrmmHVrgZ
rZIqyBKllCgVeB9sMEsntn4bGLig7CS/N1y2mYdW/745yCLZv2gj0NXhPqgEIdVV
f9DhFD4ohE1C63XP0kOQee+LYg/MY5vH8swpCSWxQgX5icv5jVDz8YTdCKgUc5u8
rM2p0kk=
-----END CERTIFICATE-----
`]});var oJ1=o((aJ1)=>{Object.defineProperty(aJ1,"__esModule",{value:!0});aJ1.proxies=void 0;aJ1.proxies=[`-----BEGIN CERTIFICATE-----
MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsF
ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6
b24gUm9vdCBDQSAxMB4XDTE1MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTEL
MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv
b3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4gHHKeNXj
ca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgHFzZM
9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qw
IFAGbHrQgLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6
VOujw5H5SNz/0egwLX0tdHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L
93FcXmn/6pUCyziKrlA4b9v7LWIbxcceVOF34GfID5yHI9Y/QCB/IIDEgEw+OyQm
jgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
AYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3DQEBCwUA
A4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDI
U5PMCCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUs
N+gDS63pYaACbvXy8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vv
o/ufQJVtMVT8QtPHRh8jrdkPSHCa2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU
5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2xJNDd2ZhwLnoQdeXeGADbkpy
rqXRfboQnoZsG4q5WTP468SQvvG5
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIFQTCCAymgAwIBAgITBmyf0pY1hp8KD+WGePhbJruKNzANBgkqhkiG9w0BAQwF
ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6
b24gUm9vdCBDQSAyMB4XDTE1MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTEL
MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv
b3QgQ0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK2Wny2cSkxK
gXlRmeyKy2tgURO8TW0G/LAIjd0ZEGrHJgw12MBvIITplLGbhQPDW9tK6Mj4kHbZ
W0/jTOgGNk3Mmqw9DJArktQGGWCsN0R5hYGCrVo34A3MnaZMUnbqQ523BNFQ9lXg
1dKmSYXpN+nKfq5clU1Imj+uIFptiJXZNLhSGkOQsL9sBbm2eLfq0OQ6PBJTYv9K
8nu+NQWpEjTj82R0Yiw9AElaKP4yRLuH3WUnAnE72kr3H9rN9yFVkE8P7K6C4Z9r
2UXTu/Bfh+08LDmG2j/e7HJV63mjrdvdfLC6HM783k81ds8P+HgfajZRRidhW+me
z/CiVX18JYpvL7TFz4QuK/0NURBs+18bvBt+xa47mAExkv8LV/SasrlX6avvDXbR
8O70zoan4G7ptGmh32n2M8ZpLpcTnqWHsFcQgTfJU7O7f/aS0ZzQGPSSbtqDT6Zj
mUyl+17vIWR6IF9sZIUVyzfpYgwLKhbcAS4y2j5L9Z469hdAlO+ekQiG+r5jqFoz
7Mt0Q5X5bGlSNscpb/xVA1wf+5+9R+vnSUeVC06JIglJ4PVhHvG/LopyboBZ/1c6
+XUyo05f7O0oYtlNc/LMgRdg7c3r3NunysV+Ar3yVAhU/bQtCSwXVEqY0VThUWcI
0u1ufm8/0i2BWSlmy5A5lREedCf+3euvAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMB
Af8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSwDPBMMPQFWAJI/TPlUq9LhONm
UjANBgkqhkiG9w0BAQwFAAOCAgEAqqiAjw54o+Ci1M3m9Zh6O+oAA7CXDpO8Wqj2
LIxyh6mx/H9z/WNxeKWHWc8w4Q0QshNabYL1auaAn6AFC2jkR2vHat+2/XcycuUY
+gn0oJMsXdKMdYV2ZZAMA3m3MSNjrXiDCYZohMr/+c8mmpJ5581LxedhpxfL86kS
k5Nrp+gvU5LEYFiwzAJRGFuFjWJZY7attN6a+yb3ACfAXVU3dJnJUH/jWS5E4ywl
7uxMMne0nxrpS10gxdr9HIcWxkPo1LsmmkVwXqkLN1PiRnsn/eBG8om3zEK2yygm
btmlyTrIQRNg91CMFa6ybRoVGld45pIq2WWQgj9sAq+uEjonljYE1x2igGOpm/Hl
urR8FLBOybEfdF849lHqm/osohHUqS0nGkWxr7JOcQ3AWEbWaQbLU8uz/mtBzUF+
fUwPfHJ5elnNXkoOrJupmHN5fLT0zLm4BwyydFy4x2+IoZCn9Kr5v2c69BoVYh63
n749sSmvZ6ES8lgQGVMDMBu4Gon2nL2XA46jCfMdiyHxtN/kHNGfZQIG6lzWE7OE
76KlXIx3KadowGuuQNKotOrN8I1LOJwZmhsoVLiJkO/KdYE+HvJkJMcYr07/R54H
9jVlpNMKVv/1F2Rs76giJUmTtt8AF9pYfl3uxRuw0dFfIRDH+fO6AgonB8Xx1sfT
4PsJYGw=
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIBtjCCAVugAwIBAgITBmyf1XSXNmY/Owua2eiedgPySjAKBggqhkjOPQQDAjA5
MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24g
Um9vdCBDQSAzMB4XDTE1MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkG
A1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJvb3Qg
Q0EgMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCmXp8ZBf8ANm+gBG1bG8lKl
ui2yEujSLtf6ycXYqm0fc4E7O5hrOXwzpcVOho6AF2hiRVd9RFgdszflZwjrZt6j
QjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSr
ttvXBp43rDCGB5Fwx5zEGbF4wDAKBggqhkjOPQQDAgNJADBGAiEA4IWSoxe3jfkr
BqWTrBqYaGFy+uGh0PsceGCmQ5nFuMQCIQCcAu/xlJyzlvnrxir4tiz+OpAUFteM
YyRIHN8wfdVoOw==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5
MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24g
Um9vdCBDQSA0MB4XDTE1MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkG
A1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJvb3Qg
Q0EgNDB2MBAGByqGSM49AgEGBSuBBAAiA2IABNKrijdPo1MN/sGKe0uoe0ZLY7Bi
9i0b2whxIdIA6GO9mif78DluXeo9pcmBqqNbIJhFXRbb/egQbeOc4OO9X4Ri83Bk
M6DLJC9wuoihKqB1+IGuYgbEgds5bimwHvouXKNCMEAwDwYDVR0TAQH/BAUwAwEB
/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFNPsxzplbszh2naaVvuc84ZtV+WB
MAoGCCqGSM49BAMDA2gAMGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlw
CkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1AE47xDqUEpHJWEadIRNyp4iciuRMStuW
1KyLa2tJElMzrdfkviT8tQp21KW8EA==
-----END CERTIFICATE-----
`,`-----BEGIN CERTIFICATE-----
MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMx
EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT
HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVs
ZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5
MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNVBAYTAlVTMRAwDgYD
VQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFy
ZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2Vy
dmljZXMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20p
OsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm2
8xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4PahHQUw2eeBGg6345AWh1K
Ts9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLPLJGmpufe
hRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk
6mFBrMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAw
DwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+q
AdcwKziIorhtSpzyEZGDMA0GCSqGSIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMI
bw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPPE95Dz+I0swSdHynVv/heyNXB
ve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTyxQGjhdByPq1z
qwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd
iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn
0q23KXB56jzaYyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCN
sSi6
-----END CERTIFICATE-----
`]});var YQ1=o(($Q1,Jr)=>{Object.defineProperty($Q1,"__esModule",{value:!0});var l66=rJ1(),tJ1=oJ1(),i66={ca:tJ1.proxies},eJ1={ca:[...l66.defaults,...tJ1.proxies]};Jr.exports=eJ1;Jr.exports.proxyBundle=i66;Jr.exports.default=eJ1});var XQ1=o((r66)=>{var n66=YQ1();r66["Amazon RDS"]={ca:n66.ca}});var Bq=o((Az5,QQ1)=>{var{URL:s66}=A0("url"),GQ1=bK(),JQ1=RF(),{version:o66}=lJ1(),UU0=null,t66={authPlugins:1,authSwitchHandler:1,bigNumberStrings:1,charset:1,charsetNumber:1,compress:1,connectAttributes:1,connectTimeout:1,database:1,dateStrings:1,debug:1,decimalNumbers:1,enableKeepAlive:1,flags:1,host:1,insecureAuth:1,infileStreamFactory:1,isServer:1,keepAliveInitialDelay:1,localAddress:1,maxPreparedStatements:1,multipleStatements:1,namedPlaceholders:1,nestTables:1,password:1,password1:1,password2:1,password3:1,passwordSha1:1,pool:1,port:1,queryFormat:1,rowsAsArray:1,socketPath:1,ssl:1,stream:1,stringifyObjects:1,supportBigNumbers:1,timezone:1,trace:1,typeCast:1,uri:1,user:1,disableEval:1,enableCleartextPlugin:1,connectionLimit:1,maxIdle:1,idleTimeout:1,Promise:1,queueLimit:1,resetOnRelease:1,waitForConnections:1,jsonStrings:1,gracefulEnd:1};class qF{constructor($){if(typeof $==="string")$=qF.parseUrl($);else if($&&$.uri){let X=qF.parseUrl($.uri);for(let G in X){if(!Object.prototype.hasOwnProperty.call(X,G))continue;if($[G])continue;$[G]=X[G]}}for(let X in $){if(!Object.prototype.hasOwnProperty.call($,X))continue;if(t66[X]!==1)console.error(`Ignoring invalid configuration option passed to Connection: ${X}. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration option to a Connection`)}if(this.isServer=$.isServer,this.stream=$.stream,this.host=$.host||"localhost",this.port=(typeof $.port==="string"?parseInt($.port,10):$.port)||3306,this.localAddress=$.localAddress,this.socketPath=$.socketPath,this.user=$.user||void 0,this.password=$.password||$.password1||void 0,this.password2=$.password2||void 0,this.password3=$.password3||void 0,this.passwordSha1=$.passwordSha1||void 0,this.database=$.database,this.connectTimeout=isNaN($.connectTimeout)?1e4:$.connectTimeout,this.insecureAuth=$.insecureAuth||!1,this.infileStreamFactory=$.infileStreamFactory||void 0,this.supportBigNumbers=$.supportBigNumbers||!1,this.bigNumberStrings=$.bigNumberStrings||!1,this.decimalNumbers=$.decimalNumbers||!1,this.dateStrings=$.dateStrings||!1,this.debug=$.debug,this.trace=$.trace!==!1,this.stringifyObjects=$.stringifyObjects||!1,this.enableKeepAlive=$.enableKeepAlive!==!1,this.keepAliveInitialDelay=$.keepAliveInitialDelay,$.timezone&&!/^(?:local|Z|[ +-]\d\d:\d\d)$/.test($.timezone))console.error(`Ignoring invalid timezone passed to Connection: ${$.timezone}. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration option to a Connection`),this.timezone="Z";else this.timezone=$.timezone||"local";if(this.queryFormat=$.queryFormat,this.pool=$.pool||void 0,this.ssl=typeof $.ssl==="string"?qF.getSSLProfile($.ssl):$.ssl||!1,this.multipleStatements=$.multipleStatements||!1,this.rowsAsArray=$.rowsAsArray||!1,this.namedPlaceholders=$.namedPlaceholders||!1,this.nestTables=$.nestTables===void 0?void 0:$.nestTables,this.typeCast=$.typeCast===void 0?!0:$.typeCast,this.disableEval=Boolean($.disableEval),this.enableCleartextPlugin=Boolean($.enableCleartextPlugin),this.timezone[0]===" ")this.timezone=`+${this.timezone.slice(1)}`;if(this.ssl){if(typeof this.ssl!=="object")throw TypeError(`SSL profile must be an object, instead it's a ${typeof this.ssl}`);this.ssl.rejectUnauthorized=this.ssl.rejectUnauthorized!==!1}this.maxPacketSize=0,this.charsetNumber=$.charset?qF.getCharsetNumber($.charset):$.charsetNumber||JQ1.UTF8MB4_UNICODE_CI,this.compress=$.compress||!1,this.authPlugins=$.authPlugins,this.authSwitchHandler=$.authSwitchHandler,this.clientFlags=qF.mergeFlags(qF.getDefaultFlags($),$.flags||"");let Y={_client_name:"Node-MySQL-2",_client_version:o66};this.connectAttributes={...Y,...$.connectAttributes||{}},this.maxPreparedStatements=$.maxPreparedStatements||16000,this.jsonStrings=$.jsonStrings||!1,this.gracefulEnd=$.gracefulEnd||!1}static mergeFlags($,Y){let X=0,G;if(!Array.isArray(Y))Y=String(Y||"").toUpperCase().split(/\s*,+\s*/);for(G in $){if(Y.indexOf(`-${$[G]}`)>=0)continue;X|=GQ1[$[G]]||0}for(G in Y){if(Y[G][0]==="-")continue;if($.indexOf(Y[G])>=0)continue;X|=GQ1[Y[G]]||0}return X}static getDefaultFlags($){let Y=["LONG_PASSWORD","FOUND_ROWS","LONG_FLAG","CONNECT_WITH_DB","ODBC","LOCAL_FILES","IGNORE_SPACE","PROTOCOL_41","IGNORE_SIGPIPE","TRANSACTIONS","RESERVED","SECURE_CONNECTION","MULTI_RESULTS","TRANSACTIONS","SESSION_TRACK","CONNECT_ATTRS","CLIENT_QUERY_ATTRIBUTES"];if($&&$.multipleStatements)Y.push("MULTI_STATEMENTS");return Y.push("PLUGIN_AUTH"),Y.push("PLUGIN_AUTH_LENENC_CLIENT_DATA"),Y}static getCharsetNumber($){let Y=JQ1[$.toUpperCase()];if(Y===void 0)throw TypeError(`Unknown charset '${$}'`);return Y}static getSSLProfile($){if(!UU0)UU0=XQ1();let Y=UU0[$];if(Y===void 0)throw TypeError(`Unknown SSL profile '${$}'`);return Y}static parseUrl($){let Y=new s66($),X={host:decodeURIComponent(Y.hostname),port:parseInt(Y.port,10),database:decodeURIComponent(Y.pathname.slice(1)),user:decodeURIComponent(Y.username),password:decodeURIComponent(Y.password)};for(let[G,J]of Y.searchParams){if(G in X)continue;try{X[G]=JSON.parse(J)}catch{X[G]=J}}return X}}QQ1.exports=qF});var tk=o((WQ1)=>{Object.defineProperty(WQ1,"__esModule",{value:!0});WQ1.createLRU=void 0;var e66=($)=>{let{max:Y}=$;if(!(Number.isInteger(Y)&&Y>0))throw TypeError("`max` must be a positive integer");let X=0,G=0,J=0,Q=[],{onEviction:W}=$,K=new Map,Z=Array(Y).fill(void 0),H=Array(Y).fill(void 0),z=Array(Y).fill(0),V=Array(Y).fill(0),F=(A)=>{z[J]=A,V[A]=J,z[A]=0,J=A},L=(A)=>{if(A===J)return;let B=z[A],O=V[A];if(A===G)G=B;else z[O]=B;V[B]=O,F(A)},N=(A)=>{let B=J,O=Math.min(X,A),E=X-O,M=Array(O),R=Array(O);for(let q=0;q<E;q++){let _=Z[G];W===null||W===void 0||W(_,H[G]),K.delete(_),G=z[G]}for(let q=O-1;q>=0;q--)M[q]=Z[B],R[q]=H[B],K.set(Z[B],q),B=V[B];G=0,J=O-1,X=O,Z.length=A,H.length=A,z.length=A,V.length=A;for(let q=0;q<O;q++)Z[q]=M[q],H[q]=R[q],z[q]=q+1,V[q]=q-1;Q=[];for(let q=O;q<A;q++)Q.push(q)},D=(A)=>{Z.length=A,H.length=A,z.length=A,V.length=A,Z.fill(void 0,Y),H.fill(void 0,Y),z.fill(0,Y),V.fill(0,Y)};return{set(A,B){if(A===void 0)return;let O=K.get(A);if(O===void 0){if(X===Y){O=G;let E=Z[O];W===null||W===void 0||W(E,H[O]),K.delete(E),G=z[O],V[G]=0}else O=Q.length>0?Q.pop():X,X++;if(K.set(A,O),Z[O]=A,H[O]=B,X===1)G=J=O;else F(O)}else W===null||W===void 0||W(A,H[O]),H[O]=B,L(O)},get(A){let B=K.get(A);if(B===void 0)return;if(B!==J)L(B);return H[B]},peek:(A)=>{let B=K.get(A);return B!==void 0?H[B]:void 0},has:(A)=>K.has(A),*keys(){let A=J;for(let B=0;B<X;B++)yield Z[A],A=V[A]},*values(){let A=J;for(let B=0;B<X;B++)yield H[A],A=V[A]},*entries(){let A=J;for(let B=0;B<X;B++)yield[Z[A],H[A]],A=V[A]},forEach:(A)=>{let B=J;for(let O=0;O<X;O++){let E=Z[B],M=H[B];A(M,E),B=V[B]}},delete(A){let B=K.get(A);if(B===void 0)return!1;W===null||W===void 0||W(A,H[B]),K.delete(A),Q.push(B),Z[B]=void 0,H[B]=void 0;let O=V[B],E=z[B];if(B===G)G=E;else z[O]=E;if(B===J)J=O;else V[E]=O;return X--,!0},evict:(A)=>{let B=Math.min(A,X);while(B>0){let O=G,E=Z[O];W===null||W===void 0||W(E,H[O]),K.delete(E),Z[O]=void 0,H[O]=void 0,G=z[O],V[G]=0,X--,Q.push(O),B--}if(X===0)G=J=0},clear(){if(W){let A=G;for(let B=0;B<X;B++)W(Z[A],H[A]),A=z[A]}K.clear(),Z.fill(void 0),H.fill(void 0),Q=[],X=0,G=J=0},resize:(A)=>{if(!(Number.isInteger(A)&&A>0))throw TypeError("`max` must be a positive integer");if(A===Y)return;if(A<Y)N(A);else D(A);Y=A},get max(){return Y},get size(){return X},get available(){return Y-X}}};WQ1.createLRU=e66});var ek=o((Oz5,UQ1)=>{var{createLRU:$86}=tk(),Qr=$86({max:15000});function ZQ1($,Y,X,G){let J=[$,typeof X.nestTables,X.nestTables,Boolean(X.rowsAsArray),Boolean(X.supportBigNumbers||G.supportBigNumbers),Boolean(X.bigNumberStrings||G.bigNumberStrings),typeof X.typeCast==="boolean"?X.typeCast:typeof X.typeCast,X.timezone||G.timezone,Boolean(X.decimalNumbers),X.dateStrings];for(let Q=0;Q<Y.length;++Q){let W=Y[Q];J.push([W.name,W.columnType,W.length,W.schema,W.table,W.flags,W.characterSet])}return JSON.stringify(J,null,0)}function Y86($,Y,X,G,J){let Q=ZQ1($,Y,X,G),W=Qr.get(Q);if(W)return W;return W=J(Y,X,G),Qr.set(Q,W),W}function X86($){Qr.resize($)}function G86(){Qr.clear()}UQ1.exports={getParser:Y86,setMaxCache:X86,clearCache:G86,_keyFromFields:ZQ1}});var HU0=o((Ez5,HQ1)=>{function P$($,X){var X=X||{};if(this._capacity=X.capacity,this._head=0,this._tail=0,Array.isArray($))this._fromArray($);else this._capacityMask=3,this._list=[,,,,]}P$.prototype.peekAt=function(Y){var X=Y;if(X!==(X|0))return;var G=this.size();if(X>=G||X<-G)return;if(X<0)X+=G;return X=this._head+X&this._capacityMask,this._list[X]};P$.prototype.get=function(Y){return this.peekAt(Y)};P$.prototype.peek=function(){if(this._head===this._tail)return;return this._list[this._head]};P$.prototype.peekFront=function(){return this.peek()};P$.prototype.peekBack=function(){return this.peekAt(-1)};Object.defineProperty(P$.prototype,"length",{get:function(){return this.size()}});P$.prototype.size=function(){if(this._head===this._tail)return 0;if(this._head<this._tail)return this._tail-this._head;else return this._capacityMask+1-(this._head-this._tail)};P$.prototype.unshift=function(Y){if(arguments.length===0)return this.size();var X=this._list.length;if(this._head=this._head-1+X&this._capacityMask,this._list[this._head]=Y,this._tail===this._head)this._growArray();if(this._capacity&&this.size()>this._capacity)this.pop();if(this._head<this._tail)return this._tail-this._head;else return this._capacityMask+1-(this._head-this._tail)};P$.prototype.shift=function(){var Y=this._head;if(Y===this._tail)return;var X=this._list[Y];if(this._list[Y]=void 0,this._head=Y+1&this._capacityMask,Y<2&&this._tail>1e4&&this._tail<=this._list.length>>>2)this._shrinkArray();return X};P$.prototype.push=function(Y){if(arguments.length===0)return this.size();var X=this._tail;if(this._list[X]=Y,this._tail=X+1&this._capacityMask,this._tail===this._head)this._growArray();if(this._capacity&&this.size()>this._capacity)this.shift();if(this._head<this._tail)return this._tail-this._head;else return this._capacityMask+1-(this._head-this._tail)};P$.prototype.pop=function(){var Y=this._tail;if(Y===this._head)return;var X=this._list.length;this._tail=Y-1+X&this._capacityMask;var G=this._list[this._tail];if(this._list[this._tail]=void 0,this._head<2&&Y>1e4&&Y<=X>>>2)this._shrinkArray();return G};P$.prototype.removeOne=function(Y){var X=Y;if(X!==(X|0))return;if(this._head===this._tail)return;var G=this.size(),J=this._list.length;if(X>=G||X<-G)return;if(X<0)X+=G;X=this._head+X&this._capacityMask;var Q=this._list[X],W;if(Y<G/2){for(W=Y;W>0;W--)this._list[X]=this._list[X=X-1+J&this._capacityMask];this._list[X]=void 0,this._head=this._head+1+J&this._capacityMask}else{for(W=G-1-Y;W>0;W--)this._list[X]=this._list[X=X+1+J&this._capacityMask];this._list[X]=void 0,this._tail=this._tail-1+J&this._capacityMask}return Q};P$.prototype.remove=function(Y,X){var G=Y,J,Q=X;if(G!==(G|0))return;if(this._head===this._tail)return;var W=this.size(),K=this._list.length;if(G>=W||G<-W||X<1)return;if(G<0)G+=W;if(X===1||!X)return J=[,],J[0]=this.removeOne(G),J;if(G===0&&G+X>=W)return J=this.toArray(),this.clear(),J;if(G+X>W)X=W-G;var Z;J=Array(X);for(Z=0;Z<X;Z++)J[Z]=this._list[this._head+G+Z&this._capacityMask];if(G=this._head+G&this._capacityMask,Y+X===W){this._tail=this._tail-X+K&this._capacityMask;for(Z=X;Z>0;Z--)this._list[G=G+1+K&this._capacityMask]=void 0;return J}if(Y===0){this._head=this._head+X+K&this._capacityMask;for(Z=X-1;Z>0;Z--)this._list[G=G+1+K&this._capacityMask]=void 0;return J}if(G<W/2){this._head=this._head+Y+X+K&this._capacityMask;for(Z=Y;Z>0;Z--)this.unshift(this._list[G=G-1+K&this._capacityMask]);G=this._head-1+K&this._capacityMask;while(Q>0)this._list[G=G-1+K&this._capacityMask]=void 0,Q--;if(Y<0)this._tail=G}else{this._tail=G,G=G+X+K&this._capacityMask;for(Z=W-(X+Y);Z>0;Z--)this.push(this._list[G++]);G=this._tail;while(Q>0)this._list[G=G+1+K&this._capacityMask]=void 0,Q--}if(this._head<2&&this._tail>1e4&&this._tail<=K>>>2)this._shrinkArray();return J};P$.prototype.splice=function(Y,X){var G=Y;if(G!==(G|0))return;var J=this.size();if(G<0)G+=J;if(G>J)return;if(arguments.length>2){var Q,W,K,Z=arguments.length,H=this._list.length,z=2;if(!J||G<J/2){W=Array(G);for(Q=0;Q<G;Q++)W[Q]=this._list[this._head+Q&this._capacityMask];if(X===0){if(K=[],G>0)this._head=this._head+G+H&this._capacityMask}else K=this.remove(G,X),this._head=this._head+G+H&this._capacityMask;while(Z>z)this.unshift(arguments[--Z]);for(Q=G;Q>0;Q--)this.unshift(W[Q-1])}else{W=Array(J-(G+X));var V=W.length;for(Q=0;Q<V;Q++)W[Q]=this._list[this._head+G+X+Q&this._capacityMask];if(X===0){if(K=[],G!=J)this._tail=this._head+G+H&this._capacityMask}else K=this.remove(G,X),this._tail=this._tail-V+H&this._capacityMask;while(z<Z)this.push(arguments[z++]);for(Q=0;Q<V;Q++)this.push(W[Q])}return K}else return this.remove(G,X)};P$.prototype.clear=function(){this._list=Array(this._list.length),this._head=0,this._tail=0};P$.prototype.isEmpty=function(){return this._head===this._tail};P$.prototype.toArray=function(){return this._copyArray(!1)};P$.prototype._fromArray=function(Y){var X=Y.length,G=this._nextPowerOf2(X);this._list=Array(G),this._capacityMask=G-1,this._tail=X;for(var J=0;J<X;J++)this._list[J]=Y[J]};P$.prototype._copyArray=function(Y,X){var G=this._list,J=G.length,Q=this.length;if(X=X|Q,X==Q&&this._head<this._tail)return this._list.slice(this._head,this._tail);var W=Array(X),K=0,Z;if(Y||this._head>this._tail){for(Z=this._head;Z<J;Z++)W[K++]=G[Z];for(Z=0;Z<this._tail;Z++)W[K++]=G[Z]}else for(Z=this._head;Z<this._tail;Z++)W[K++]=G[Z];return W};P$.prototype._growArray=function(){if(this._head!=0){var Y=this._copyArray(!0,this._list.length<<1);this._tail=this._list.length,this._head=0,this._list=Y}else this._tail=this._list.length,this._list.length<<=1;this._capacityMask=this._capacityMask<<1|1};P$.prototype._shrinkArray=function(){this._list.length>>>=1,this._capacityMask>>>=1};P$.prototype._nextPowerOf2=function(Y){var X=Math.log(Y)/Math.log(2),G=1<<X+1;return Math.max(G,4)};HQ1.exports=P$});var Wr=o((T)=>{T.EE_CANTCREATEFILE=1;T.EE_READ=2;T.EE_WRITE=3;T.EE_BADCLOSE=4;T.EE_OUTOFMEMORY=5;T.EE_DELETE=6;T.EE_LINK=7;T.EE_EOFERR=9;T.EE_CANTLOCK=10;T.EE_CANTUNLOCK=11;T.EE_DIR=12;T.EE_STAT=13;T.EE_CANT_CHSIZE=14;T.EE_CANT_OPEN_STREAM=15;T.EE_GETWD=16;T.EE_SETWD=17;T.EE_LINK_WARNING=18;T.EE_OPEN_WARNING=19;T.EE_DISK_FULL=20;T.EE_CANT_MKDIR=21;T.EE_UNKNOWN_CHARSET=22;T.EE_OUT_OF_FILERESOURCES=23;T.EE_CANT_READLINK=24;T.EE_CANT_SYMLINK=25;T.EE_REALPATH=26;T.EE_SYNC=27;T.EE_UNKNOWN_COLLATION=28;T.EE_FILENOTFOUND=29;T.EE_FILE_NOT_CLOSED=30;T.EE_CHANGE_OWNERSHIP=31;T.EE_CHANGE_PERMISSIONS=32;T.EE_CANT_SEEK=33;T.EE_CAPACITY_EXCEEDED=34;T.EE_DISK_FULL_WITH_RETRY_MSG=35;T.EE_FAILED_TO_CREATE_TIMER=36;T.EE_FAILED_TO_DELETE_TIMER=37;T.EE_FAILED_TO_CREATE_TIMER_QUEUE=38;T.EE_FAILED_TO_START_TIMER_NOTIFY_THREAD=39;T.EE_FAILED_TO_CREATE_TIMER_NOTIFY_THREAD_INTERRUPT_EVENT=40;T.EE_EXITING_TIMER_NOTIFY_THREAD=41;T.EE_WIN_LIBRARY_LOAD_FAILED=42;T.EE_WIN_RUN_TIME_ERROR_CHECK=43;T.EE_FAILED_TO_DETERMINE_LARGE_PAGE_SIZE=44;T.EE_FAILED_TO_KILL_ALL_THREADS=45;T.EE_FAILED_TO_CREATE_IO_COMPLETION_PORT=46;T.EE_FAILED_TO_OPEN_DEFAULTS_FILE=47;T.EE_FAILED_TO_HANDLE_DEFAULTS_FILE=48;T.EE_WRONG_DIRECTIVE_IN_CONFIG_FILE=49;T.EE_SKIPPING_DIRECTIVE_DUE_TO_MAX_INCLUDE_RECURSION=50;T.EE_INCORRECT_GRP_DEFINITION_IN_CONFIG_FILE=51;T.EE_OPTION_WITHOUT_GRP_IN_CONFIG_FILE=52;T.EE_CONFIG_FILE_PERMISSION_ERROR=53;T.EE_IGNORE_WORLD_WRITABLE_CONFIG_FILE=54;T.EE_USING_DISABLED_OPTION=55;T.EE_USING_DISABLED_SHORT_OPTION=56;T.EE_USING_PASSWORD_ON_CLI_IS_INSECURE=57;T.EE_UNKNOWN_SUFFIX_FOR_VARIABLE=58;T.EE_SSL_ERROR_FROM_FILE=59;T.EE_SSL_ERROR=60;T.EE_NET_SEND_ERROR_IN_BOOTSTRAP=61;T.EE_PACKETS_OUT_OF_ORDER=62;T.EE_UNKNOWN_PROTOCOL_OPTION=63;T.EE_FAILED_TO_LOCATE_SERVER_PUBLIC_KEY=64;T.EE_PUBLIC_KEY_NOT_IN_PEM_FORMAT=65;T.EE_DEBUG_INFO=66;T.EE_UNKNOWN_VARIABLE=67;T.EE_UNKNOWN_OPTION=68;T.EE_UNKNOWN_SHORT_OPTION=69;T.EE_OPTION_WITHOUT_ARGUMENT=70;T.EE_OPTION_REQUIRES_ARGUMENT=71;T.EE_SHORT_OPTION_REQUIRES_ARGUMENT=72;T.EE_OPTION_IGNORED_DUE_TO_INVALID_VALUE=73;T.EE_OPTION_WITH_EMPTY_VALUE=74;T.EE_FAILED_TO_ASSIGN_MAX_VALUE_TO_OPTION=75;T.EE_INCORRECT_BOOLEAN_VALUE_FOR_OPTION=76;T.EE_FAILED_TO_SET_OPTION_VALUE=77;T.EE_INCORRECT_INT_VALUE_FOR_OPTION=78;T.EE_INCORRECT_UINT_VALUE_FOR_OPTION=79;T.EE_ADJUSTED_SIGNED_VALUE_FOR_OPTION=80;T.EE_ADJUSTED_UNSIGNED_VALUE_FOR_OPTION=81;T.EE_ADJUSTED_ULONGLONG_VALUE_FOR_OPTION=82;T.EE_ADJUSTED_DOUBLE_VALUE_FOR_OPTION=83;T.EE_INVALID_DECIMAL_VALUE_FOR_OPTION=84;T.EE_COLLATION_PARSER_ERROR=85;T.EE_FAILED_TO_RESET_BEFORE_PRIMARY_IGNORABLE_CHAR=86;T.EE_FAILED_TO_RESET_BEFORE_TERTIARY_IGNORABLE_CHAR=87;T.EE_SHIFT_CHAR_OUT_OF_RANGE=88;T.EE_RESET_CHAR_OUT_OF_RANGE=89;T.EE_UNKNOWN_LDML_TAG=90;T.EE_FAILED_TO_RESET_BEFORE_SECONDARY_IGNORABLE_CHAR=91;T.EE_FAILED_PROCESSING_DIRECTIVE=92;T.EE_PTHREAD_KILL_FAILED=93;T.HA_ERR_KEY_NOT_FOUND=120;T.HA_ERR_FOUND_DUPP_KEY=121;T.HA_ERR_INTERNAL_ERROR=122;T.HA_ERR_RECORD_CHANGED=123;T.HA_ERR_WRONG_INDEX=124;T.HA_ERR_ROLLED_BACK=125;T.HA_ERR_CRASHED=126;T.HA_ERR_WRONG_IN_RECORD=127;T.HA_ERR_OUT_OF_MEM=128;T.HA_ERR_NOT_A_TABLE=130;T.HA_ERR_WRONG_COMMAND=131;T.HA_ERR_OLD_FILE=132;T.HA_ERR_NO_ACTIVE_RECORD=133;T.HA_ERR_RECORD_DELETED=134;T.HA_ERR_RECORD_FILE_FULL=135;T.HA_ERR_INDEX_FILE_FULL=136;T.HA_ERR_END_OF_FILE=137;T.HA_ERR_UNSUPPORTED=138;T.HA_ERR_TOO_BIG_ROW=139;T.HA_WRONG_CREATE_OPTION=140;T.HA_ERR_FOUND_DUPP_UNIQUE=141;T.HA_ERR_UNKNOWN_CHARSET=142;T.HA_ERR_WRONG_MRG_TABLE_DEF=143;T.HA_ERR_CRASHED_ON_REPAIR=144;T.HA_ERR_CRASHED_ON_USAGE=145;T.HA_ERR_LOCK_WAIT_TIMEOUT=146;T.HA_ERR_LOCK_TABLE_FULL=147;T.HA_ERR_READ_ONLY_TRANSACTION=148;T.HA_ERR_LOCK_DEADLOCK=149;T.HA_ERR_CANNOT_ADD_FOREIGN=150;T.HA_ERR_NO_REFERENCED_ROW=151;T.HA_ERR_ROW_IS_REFERENCED=152;T.HA_ERR_NO_SAVEPOINT=153;T.HA_ERR_NON_UNIQUE_BLOCK_SIZE=154;T.HA_ERR_NO_SUCH_TABLE=155;T.HA_ERR_TABLE_EXIST=156;T.HA_ERR_NO_CONNECTION=157;T.HA_ERR_NULL_IN_SPATIAL=158;T.HA_ERR_TABLE_DEF_CHANGED=159;T.HA_ERR_NO_PARTITION_FOUND=160;T.HA_ERR_RBR_LOGGING_FAILED=161;T.HA_ERR_DROP_INDEX_FK=162;T.HA_ERR_FOREIGN_DUPLICATE_KEY=163;T.HA_ERR_TABLE_NEEDS_UPGRADE=164;T.HA_ERR_TABLE_READONLY=165;T.HA_ERR_AUTOINC_READ_FAILED=166;T.HA_ERR_AUTOINC_ERANGE=167;T.HA_ERR_GENERIC=168;T.HA_ERR_RECORD_IS_THE_SAME=169;T.HA_ERR_LOGGING_IMPOSSIBLE=170;T.HA_ERR_CORRUPT_EVENT=171;T.HA_ERR_NEW_FILE=172;T.HA_ERR_ROWS_EVENT_APPLY=173;T.HA_ERR_INITIALIZATION=174;T.HA_ERR_FILE_TOO_SHORT=175;T.HA_ERR_WRONG_CRC=176;T.HA_ERR_TOO_MANY_CONCURRENT_TRXS=177;T.HA_ERR_NOT_IN_LOCK_PARTITIONS=178;T.HA_ERR_INDEX_COL_TOO_LONG=179;T.HA_ERR_INDEX_CORRUPT=180;T.HA_ERR_UNDO_REC_TOO_BIG=181;T.HA_FTS_INVALID_DOCID=182;T.HA_ERR_TABLE_IN_FK_CHECK=183;T.HA_ERR_TABLESPACE_EXISTS=184;T.HA_ERR_TOO_MANY_FIELDS=185;T.HA_ERR_ROW_IN_WRONG_PARTITION=186;T.HA_ERR_INNODB_READ_ONLY=187;T.HA_ERR_FTS_EXCEED_RESULT_CACHE_LIMIT=188;T.HA_ERR_TEMP_FILE_WRITE_FAILURE=189;T.HA_ERR_INNODB_FORCED_RECOVERY=190;T.HA_ERR_FTS_TOO_MANY_WORDS_IN_PHRASE=191;T.HA_ERR_FK_DEPTH_EXCEEDED=192;T.HA_MISSING_CREATE_OPTION=193;T.HA_ERR_SE_OUT_OF_MEMORY=194;T.HA_ERR_TABLE_CORRUPT=195;T.HA_ERR_QUERY_INTERRUPTED=196;T.HA_ERR_TABLESPACE_MISSING=197;T.HA_ERR_TABLESPACE_IS_NOT_EMPTY=198;T.HA_ERR_WRONG_FILE_NAME=199;T.HA_ERR_NOT_ALLOWED_COMMAND=200;T.HA_ERR_COMPUTE_FAILED=201;T.HA_ERR_ROW_FORMAT_CHANGED=202;T.HA_ERR_NO_WAIT_LOCK=203;T.HA_ERR_DISK_FULL_NOWAIT=204;T.HA_ERR_NO_SESSION_TEMP=205;T.HA_ERR_WRONG_TABLE_NAME=206;T.HA_ERR_TOO_LONG_PATH=207;T.HA_ERR_SAMPLING_INIT_FAILED=208;T.HA_ERR_FTS_TOO_MANY_NESTED_EXP=209;T.ER_HASHCHK=1000;T.ER_NISAMCHK=1001;T.ER_NO=1002;T.ER_YES=1003;T.ER_CANT_CREATE_FILE=1004;T.ER_CANT_CREATE_TABLE=1005;T.ER_CANT_CREATE_DB=1006;T.ER_DB_CREATE_EXISTS=1007;T.ER_DB_DROP_EXISTS=1008;T.ER_DB_DROP_DELETE=1009;T.ER_DB_DROP_RMDIR=1010;T.ER_CANT_DELETE_FILE=1011;T.ER_CANT_FIND_SYSTEM_REC=1012;T.ER_CANT_GET_STAT=1013;T.ER_CANT_GET_WD=1014;T.ER_CANT_LOCK=1015;T.ER_CANT_OPEN_FILE=1016;T.ER_FILE_NOT_FOUND=1017;T.ER_CANT_READ_DIR=1018;T.ER_CANT_SET_WD=1019;T.ER_CHECKREAD=1020;T.ER_DISK_FULL=1021;T.ER_DUP_KEY=1022;T.ER_ERROR_ON_CLOSE=1023;T.ER_ERROR_ON_READ=1024;T.ER_ERROR_ON_RENAME=1025;T.ER_ERROR_ON_WRITE=1026;T.ER_FILE_USED=1027;T.ER_FILSORT_ABORT=1028;T.ER_FORM_NOT_FOUND=1029;T.ER_GET_ERRNO=1030;T.ER_ILLEGAL_HA=1031;T.ER_KEY_NOT_FOUND=1032;T.ER_NOT_FORM_FILE=1033;T.ER_NOT_KEYFILE=1034;T.ER_OLD_KEYFILE=1035;T.ER_OPEN_AS_READONLY=1036;T.ER_OUTOFMEMORY=1037;T.ER_OUT_OF_SORTMEMORY=1038;T.ER_UNEXPECTED_EOF=1039;T.ER_CON_COUNT_ERROR=1040;T.ER_OUT_OF_RESOURCES=1041;T.ER_BAD_HOST_ERROR=1042;T.ER_HANDSHAKE_ERROR=1043;T.ER_DBACCESS_DENIED_ERROR=1044;T.ER_ACCESS_DENIED_ERROR=1045;T.ER_NO_DB_ERROR=1046;T.ER_UNKNOWN_COM_ERROR=1047;T.ER_BAD_NULL_ERROR=1048;T.ER_BAD_DB_ERROR=1049;T.ER_TABLE_EXISTS_ERROR=1050;T.ER_BAD_TABLE_ERROR=1051;T.ER_NON_UNIQ_ERROR=1052;T.ER_SERVER_SHUTDOWN=1053;T.ER_BAD_FIELD_ERROR=1054;T.ER_WRONG_FIELD_WITH_GROUP=1055;T.ER_WRONG_GROUP_FIELD=1056;T.ER_WRONG_SUM_SELECT=1057;T.ER_WRONG_VALUE_COUNT=1058;T.ER_TOO_LONG_IDENT=1059;T.ER_DUP_FIELDNAME=1060;T.ER_DUP_KEYNAME=1061;T.ER_DUP_ENTRY=1062;T.ER_WRONG_FIELD_SPEC=1063;T.ER_PARSE_ERROR=1064;T.ER_EMPTY_QUERY=1065;T.ER_NONUNIQ_TABLE=1066;T.ER_INVALID_DEFAULT=1067;T.ER_MULTIPLE_PRI_KEY=1068;T.ER_TOO_MANY_KEYS=1069;T.ER_TOO_MANY_KEY_PARTS=1070;T.ER_TOO_LONG_KEY=1071;T.ER_KEY_COLUMN_DOES_NOT_EXITS=1072;T.ER_BLOB_USED_AS_KEY=1073;T.ER_TOO_BIG_FIELDLENGTH=1074;T.ER_WRONG_AUTO_KEY=1075;T.ER_READY=1076;T.ER_NORMAL_SHUTDOWN=1077;T.ER_GOT_SIGNAL=1078;T.ER_SHUTDOWN_COMPLETE=1079;T.ER_FORCING_CLOSE=1080;T.ER_IPSOCK_ERROR=1081;T.ER_NO_SUCH_INDEX=1082;T.ER_WRONG_FIELD_TERMINATORS=1083;T.ER_BLOBS_AND_NO_TERMINATED=1084;T.ER_TEXTFILE_NOT_READABLE=1085;T.ER_FILE_EXISTS_ERROR=1086;T.ER_LOAD_INFO=1087;T.ER_ALTER_INFO=1088;T.ER_WRONG_SUB_KEY=1089;T.ER_CANT_REMOVE_ALL_FIELDS=1090;T.ER_CANT_DROP_FIELD_OR_KEY=1091;T.ER_INSERT_INFO=1092;T.ER_UPDATE_TABLE_USED=1093;T.ER_NO_SUCH_THREAD=1094;T.ER_KILL_DENIED_ERROR=1095;T.ER_NO_TABLES_USED=1096;T.ER_TOO_BIG_SET=1097;T.ER_NO_UNIQUE_LOGFILE=1098;T.ER_TABLE_NOT_LOCKED_FOR_WRITE=1099;T.ER_TABLE_NOT_LOCKED=1100;T.ER_BLOB_CANT_HAVE_DEFAULT=1101;T.ER_WRONG_DB_NAME=1102;T.ER_WRONG_TABLE_NAME=1103;T.ER_TOO_BIG_SELECT=1104;T.ER_UNKNOWN_ERROR=1105;T.ER_UNKNOWN_PROCEDURE=1106;T.ER_WRONG_PARAMCOUNT_TO_PROCEDURE=1107;T.ER_WRONG_PARAMETERS_TO_PROCEDURE=1108;T.ER_UNKNOWN_TABLE=1109;T.ER_FIELD_SPECIFIED_TWICE=1110;T.ER_INVALID_GROUP_FUNC_USE=1111;T.ER_UNSUPPORTED_EXTENSION=1112;T.ER_TABLE_MUST_HAVE_COLUMNS=1113;T.ER_RECORD_FILE_FULL=1114;T.ER_UNKNOWN_CHARACTER_SET=1115;T.ER_TOO_MANY_TABLES=1116;T.ER_TOO_MANY_FIELDS=1117;T.ER_TOO_BIG_ROWSIZE=1118;T.ER_STACK_OVERRUN=1119;T.ER_WRONG_OUTER_JOIN=1120;T.ER_NULL_COLUMN_IN_INDEX=1121;T.ER_CANT_FIND_UDF=1122;T.ER_CANT_INITIALIZE_UDF=1123;T.ER_UDF_NO_PATHS=1124;T.ER_UDF_EXISTS=1125;T.ER_CANT_OPEN_LIBRARY=1126;T.ER_CANT_FIND_DL_ENTRY=1127;T.ER_FUNCTION_NOT_DEFINED=1128;T.ER_HOST_IS_BLOCKED=1129;T.ER_HOST_NOT_PRIVILEGED=1130;T.ER_PASSWORD_ANONYMOUS_USER=1131;T.ER_PASSWORD_NOT_ALLOWED=1132;T.ER_PASSWORD_NO_MATCH=1133;T.ER_UPDATE_INFO=1134;T.ER_CANT_CREATE_THREAD=1135;T.ER_WRONG_VALUE_COUNT_ON_ROW=1136;T.ER_CANT_REOPEN_TABLE=1137;T.ER_INVALID_USE_OF_NULL=1138;T.ER_REGEXP_ERROR=1139;T.ER_MIX_OF_GROUP_FUNC_AND_FIELDS=1140;T.ER_NONEXISTING_GRANT=1141;T.ER_TABLEACCESS_DENIED_ERROR=1142;T.ER_COLUMNACCESS_DENIED_ERROR=1143;T.ER_ILLEGAL_GRANT_FOR_TABLE=1144;T.ER_GRANT_WRONG_HOST_OR_USER=1145;T.ER_NO_SUCH_TABLE=1146;T.ER_NONEXISTING_TABLE_GRANT=1147;T.ER_NOT_ALLOWED_COMMAND=1148;T.ER_SYNTAX_ERROR=1149;T.ER_UNUSED1=1150;T.ER_UNUSED2=1151;T.ER_ABORTING_CONNECTION=1152;T.ER_NET_PACKET_TOO_LARGE=1153;T.ER_NET_READ_ERROR_FROM_PIPE=1154;T.ER_NET_FCNTL_ERROR=1155;T.ER_NET_PACKETS_OUT_OF_ORDER=1156;T.ER_NET_UNCOMPRESS_ERROR=1157;T.ER_NET_READ_ERROR=1158;T.ER_NET_READ_INTERRUPTED=1159;T.ER_NET_ERROR_ON_WRITE=1160;T.ER_NET_WRITE_INTERRUPTED=1161;T.ER_TOO_LONG_STRING=1162;T.ER_TABLE_CANT_HANDLE_BLOB=1163;T.ER_TABLE_CANT_HANDLE_AUTO_INCREMENT=1164;T.ER_UNUSED3=1165;T.ER_WRONG_COLUMN_NAME=1166;T.ER_WRONG_KEY_COLUMN=1167;T.ER_WRONG_MRG_TABLE=1168;T.ER_DUP_UNIQUE=1169;T.ER_BLOB_KEY_WITHOUT_LENGTH=1170;T.ER_PRIMARY_CANT_HAVE_NULL=1171;T.ER_TOO_MANY_ROWS=1172;T.ER_REQUIRES_PRIMARY_KEY=1173;T.ER_NO_RAID_COMPILED=1174;T.ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE=1175;T.ER_KEY_DOES_NOT_EXITS=1176;T.ER_CHECK_NO_SUCH_TABLE=1177;T.ER_CHECK_NOT_IMPLEMENTED=1178;T.ER_CANT_DO_THIS_DURING_AN_TRANSACTION=1179;T.ER_ERROR_DURING_COMMIT=1180;T.ER_ERROR_DURING_ROLLBACK=1181;T.ER_ERROR_DURING_FLUSH_LOGS=1182;T.ER_ERROR_DURING_CHECKPOINT=1183;T.ER_NEW_ABORTING_CONNECTION=1184;T.ER_DUMP_NOT_IMPLEMENTED=1185;T.ER_FLUSH_MASTER_BINLOG_CLOSED=1186;T.ER_INDEX_REBUILD=1187;T.ER_SOURCE=1188;T.ER_SOURCE_NET_READ=1189;T.ER_SOURCE_NET_WRITE=1190;T.ER_FT_MATCHING_KEY_NOT_FOUND=1191;T.ER_LOCK_OR_ACTIVE_TRANSACTION=1192;T.ER_UNKNOWN_SYSTEM_VARIABLE=1193;T.ER_CRASHED_ON_USAGE=1194;T.ER_CRASHED_ON_REPAIR=1195;T.ER_WARNING_NOT_COMPLETE_ROLLBACK=1196;T.ER_TRANS_CACHE_FULL=1197;T.ER_SLAVE_MUST_STOP=1198;T.ER_REPLICA_NOT_RUNNING=1199;T.ER_BAD_REPLICA=1200;T.ER_CONNECTION_METADATA=1201;T.ER_REPLICA_THREAD=1202;T.ER_TOO_MANY_USER_CONNECTIONS=1203;T.ER_SET_CONSTANTS_ONLY=1204;T.ER_LOCK_WAIT_TIMEOUT=1205;T.ER_LOCK_TABLE_FULL=1206;T.ER_READ_ONLY_TRANSACTION=1207;T.ER_DROP_DB_WITH_READ_LOCK=1208;T.ER_CREATE_DB_WITH_READ_LOCK=1209;T.ER_WRONG_ARGUMENTS=1210;T.ER_NO_PERMISSION_TO_CREATE_USER=1211;T.ER_UNION_TABLES_IN_DIFFERENT_DIR=1212;T.ER_LOCK_DEADLOCK=1213;T.ER_TABLE_CANT_HANDLE_FT=1214;T.ER_CANNOT_ADD_FOREIGN=1215;T.ER_NO_REFERENCED_ROW=1216;T.ER_ROW_IS_REFERENCED=1217;T.ER_CONNECT_TO_SOURCE=1218;T.ER_QUERY_ON_MASTER=1219;T.ER_ERROR_WHEN_EXECUTING_COMMAND=1220;T.ER_WRONG_USAGE=1221;T.ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT=1222;T.ER_CANT_UPDATE_WITH_READLOCK=1223;T.ER_MIXING_NOT_ALLOWED=1224;T.ER_DUP_ARGUMENT=1225;T.ER_USER_LIMIT_REACHED=1226;T.ER_SPECIFIC_ACCESS_DENIED_ERROR=1227;T.ER_LOCAL_VARIABLE=1228;T.ER_GLOBAL_VARIABLE=1229;T.ER_NO_DEFAULT=1230;T.ER_WRONG_VALUE_FOR_VAR=1231;T.ER_WRONG_TYPE_FOR_VAR=1232;T.ER_VAR_CANT_BE_READ=1233;T.ER_CANT_USE_OPTION_HERE=1234;T.ER_NOT_SUPPORTED_YET=1235;T.ER_SOURCE_FATAL_ERROR_READING_BINLOG=1236;T.ER_REPLICA_IGNORED_TABLE=1237;T.ER_INCORRECT_GLOBAL_LOCAL_VAR=1238;T.ER_WRONG_FK_DEF=1239;T.ER_KEY_REF_DO_NOT_MATCH_TABLE_REF=1240;T.ER_OPERAND_COLUMNS=1241;T.ER_SUBQUERY_NO_1_ROW=1242;T.ER_UNKNOWN_STMT_HANDLER=1243;T.ER_CORRUPT_HELP_DB=1244;T.ER_CYCLIC_REFERENCE=1245;T.ER_AUTO_CONVERT=1246;T.ER_ILLEGAL_REFERENCE=1247;T.ER_DERIVED_MUST_HAVE_ALIAS=1248;T.ER_SELECT_REDUCED=1249;T.ER_TABLENAME_NOT_ALLOWED_HERE=1250;T.ER_NOT_SUPPORTED_AUTH_MODE=1251;T.ER_SPATIAL_CANT_HAVE_NULL=1252;T.ER_COLLATION_CHARSET_MISMATCH=1253;T.ER_SLAVE_WAS_RUNNING=1254;T.ER_SLAVE_WAS_NOT_RUNNING=1255;T.ER_TOO_BIG_FOR_UNCOMPRESS=1256;T.ER_ZLIB_Z_MEM_ERROR=1257;T.ER_ZLIB_Z_BUF_ERROR=1258;T.ER_ZLIB_Z_DATA_ERROR=1259;T.ER_CUT_VALUE_GROUP_CONCAT=1260;T.ER_WARN_TOO_FEW_RECORDS=1261;T.ER_WARN_TOO_MANY_RECORDS=1262;T.ER_WARN_NULL_TO_NOTNULL=1263;T.ER_WARN_DATA_OUT_OF_RANGE=1264;T.WARN_DATA_TRUNCATED=1265;T.ER_WARN_USING_OTHER_HANDLER=1266;T.ER_CANT_AGGREGATE_2COLLATIONS=1267;T.ER_DROP_USER=1268;T.ER_REVOKE_GRANTS=1269;T.ER_CANT_AGGREGATE_3COLLATIONS=1270;T.ER_CANT_AGGREGATE_NCOLLATIONS=1271;T.ER_VARIABLE_IS_NOT_STRUCT=1272;T.ER_UNKNOWN_COLLATION=1273;T.ER_REPLICA_IGNORED_SSL_PARAMS=1274;T.ER_SERVER_IS_IN_SECURE_AUTH_MODE=1275;T.ER_WARN_FIELD_RESOLVED=1276;T.ER_BAD_REPLICA_UNTIL_COND=1277;T.ER_MISSING_SKIP_REPLICA=1278;T.ER_UNTIL_COND_IGNORED=1279;T.ER_WRONG_NAME_FOR_INDEX=1280;T.ER_WRONG_NAME_FOR_CATALOG=1281;T.ER_WARN_QC_RESIZE=1282;T.ER_BAD_FT_COLUMN=1283;T.ER_UNKNOWN_KEY_CACHE=1284;T.ER_WARN_HOSTNAME_WONT_WORK=1285;T.ER_UNKNOWN_STORAGE_ENGINE=1286;T.ER_WARN_DEPRECATED_SYNTAX=1287;T.ER_NON_UPDATABLE_TABLE=1288;T.ER_FEATURE_DISABLED=1289;T.ER_OPTION_PREVENTS_STATEMENT=1290;T.ER_DUPLICATED_VALUE_IN_TYPE=1291;T.ER_TRUNCATED_WRONG_VALUE=1292;T.ER_TOO_MUCH_AUTO_TIMESTAMP_COLS=1293;T.ER_INVALID_ON_UPDATE=1294;T.ER_UNSUPPORTED_PS=1295;T.ER_GET_ERRMSG=1296;T.ER_GET_TEMPORARY_ERRMSG=1297;T.ER_UNKNOWN_TIME_ZONE=1298;T.ER_WARN_INVALID_TIMESTAMP=1299;T.ER_INVALID_CHARACTER_STRING=1300;T.ER_WARN_ALLOWED_PACKET_OVERFLOWED=1301;T.ER_CONFLICTING_DECLARATIONS=1302;T.ER_SP_NO_RECURSIVE_CREATE=1303;T.ER_SP_ALREADY_EXISTS=1304;T.ER_SP_DOES_NOT_EXIST=1305;T.ER_SP_DROP_FAILED=1306;T.ER_SP_STORE_FAILED=1307;T.ER_SP_LILABEL_MISMATCH=1308;T.ER_SP_LABEL_REDEFINE=1309;T.ER_SP_LABEL_MISMATCH=1310;T.ER_SP_UNINIT_VAR=1311;T.ER_SP_BADSELECT=1312;T.ER_SP_BADRETURN=1313;T.ER_SP_BADSTATEMENT=1314;T.ER_UPDATE_LOG_DEPRECATED_IGNORED=1315;T.ER_UPDATE_LOG_DEPRECATED_TRANSLATED=1316;T.ER_QUERY_INTERRUPTED=1317;T.ER_SP_WRONG_NO_OF_ARGS=1318;T.ER_SP_COND_MISMATCH=1319;T.ER_SP_NORETURN=1320;T.ER_SP_NORETURNEND=1321;T.ER_SP_BAD_CURSOR_QUERY=1322;T.ER_SP_BAD_CURSOR_SELECT=1323;T.ER_SP_CURSOR_MISMATCH=1324;T.ER_SP_CURSOR_ALREADY_OPEN=1325;T.ER_SP_CURSOR_NOT_OPEN=1326;T.ER_SP_UNDECLARED_VAR=1327;T.ER_SP_WRONG_NO_OF_FETCH_ARGS=1328;T.ER_SP_FETCH_NO_DATA=1329;T.ER_SP_DUP_PARAM=1330;T.ER_SP_DUP_VAR=1331;T.ER_SP_DUP_COND=1332;T.ER_SP_DUP_CURS=1333;T.ER_SP_CANT_ALTER=1334;T.ER_SP_SUBSELECT_NYI=1335;T.ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG=1336;T.ER_SP_VARCOND_AFTER_CURSHNDLR=1337;T.ER_SP_CURSOR_AFTER_HANDLER=1338;T.ER_SP_CASE_NOT_FOUND=1339;T.ER_FPARSER_TOO_BIG_FILE=1340;T.ER_FPARSER_BAD_HEADER=1341;T.ER_FPARSER_EOF_IN_COMMENT=1342;T.ER_FPARSER_ERROR_IN_PARAMETER=1343;T.ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER=1344;T.ER_VIEW_NO_EXPLAIN=1345;T.ER_FRM_UNKNOWN_TYPE=1346;T.ER_WRONG_OBJECT=1347;T.ER_NONUPDATEABLE_COLUMN=1348;T.ER_VIEW_SELECT_DERIVED=1349;T.ER_VIEW_SELECT_CLAUSE=1350;T.ER_VIEW_SELECT_VARIABLE=1351;T.ER_VIEW_SELECT_TMPTABLE=1352;T.ER_VIEW_WRONG_LIST=1353;T.ER_WARN_VIEW_MERGE=1354;T.ER_WARN_VIEW_WITHOUT_KEY=1355;T.ER_VIEW_INVALID=1356;T.ER_SP_NO_DROP_SP=1357;T.ER_SP_GOTO_IN_HNDLR=1358;T.ER_TRG_ALREADY_EXISTS=1359;T.ER_TRG_DOES_NOT_EXIST=1360;T.ER_TRG_ON_VIEW_OR_TEMP_TABLE=1361;T.ER_TRG_CANT_CHANGE_ROW=1362;T.ER_TRG_NO_SUCH_ROW_IN_TRG=1363;T.ER_NO_DEFAULT_FOR_FIELD=1364;T.ER_DIVISION_BY_ZERO=1365;T.ER_TRUNCATED_WRONG_VALUE_FOR_FIELD=1366;T.ER_ILLEGAL_VALUE_FOR_TYPE=1367;T.ER_VIEW_NONUPD_CHECK=1368;T.ER_VIEW_CHECK_FAILED=1369;T.ER_PROCACCESS_DENIED_ERROR=1370;T.ER_RELAY_LOG_FAIL=1371;T.ER_PASSWD_LENGTH=1372;T.ER_UNKNOWN_TARGET_BINLOG=1373;T.ER_IO_ERR_LOG_INDEX_READ=1374;T.ER_BINLOG_PURGE_PROHIBITED=1375;T.ER_FSEEK_FAIL=1376;T.ER_BINLOG_PURGE_FATAL_ERR=1377;T.ER_LOG_IN_USE=1378;T.ER_LOG_PURGE_UNKNOWN_ERR=1379;T.ER_RELAY_LOG_INIT=1380;T.ER_NO_BINARY_LOGGING=1381;T.ER_RESERVED_SYNTAX=1382;T.ER_WSAS_FAILED=1383;T.ER_DIFF_GROUPS_PROC=1384;T.ER_NO_GROUP_FOR_PROC=1385;T.ER_ORDER_WITH_PROC=1386;T.ER_LOGGING_PROHIBIT_CHANGING_OF=1387;T.ER_NO_FILE_MAPPING=1388;T.ER_WRONG_MAGIC=1389;T.ER_PS_MANY_PARAM=1390;T.ER_KEY_PART_0=1391;T.ER_VIEW_CHECKSUM=1392;T.ER_VIEW_MULTIUPDATE=1393;T.ER_VIEW_NO_INSERT_FIELD_LIST=1394;T.ER_VIEW_DELETE_MERGE_VIEW=1395;T.ER_CANNOT_USER=1396;T.ER_XAER_NOTA=1397;T.ER_XAER_INVAL=1398;T.ER_XAER_RMFAIL=1399;T.ER_XAER_OUTSIDE=1400;T.ER_XAER_RMERR=1401;T.ER_XA_RBROLLBACK=1402;T.ER_NONEXISTING_PROC_GRANT=1403;T.ER_PROC_AUTO_GRANT_FAIL=1404;T.ER_PROC_AUTO_REVOKE_FAIL=1405;T.ER_DATA_TOO_LONG=1406;T.ER_SP_BAD_SQLSTATE=1407;T.ER_STARTUP=1408;T.ER_LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR=1409;T.ER_CANT_CREATE_USER_WITH_GRANT=1410;T.ER_WRONG_VALUE_FOR_TYPE=1411;T.ER_TABLE_DEF_CHANGED=1412;T.ER_SP_DUP_HANDLER=1413;T.ER_SP_NOT_VAR_ARG=1414;T.ER_SP_NO_RETSET=1415;T.ER_CANT_CREATE_GEOMETRY_OBJECT=1416;T.ER_FAILED_ROUTINE_BREAK_BINLOG=1417;T.ER_BINLOG_UNSAFE_ROUTINE=1418;T.ER_BINLOG_CREATE_ROUTINE_NEED_SUPER=1419;T.ER_EXEC_STMT_WITH_OPEN_CURSOR=1420;T.ER_STMT_HAS_NO_OPEN_CURSOR=1421;T.ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG=1422;T.ER_NO_DEFAULT_FOR_VIEW_FIELD=1423;T.ER_SP_NO_RECURSION=1424;T.ER_TOO_BIG_SCALE=1425;T.ER_TOO_BIG_PRECISION=1426;T.ER_M_BIGGER_THAN_D=1427;T.ER_WRONG_LOCK_OF_SYSTEM_TABLE=1428;T.ER_CONNECT_TO_FOREIGN_DATA_SOURCE=1429;T.ER_QUERY_ON_FOREIGN_DATA_SOURCE=1430;T.ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST=1431;T.ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE=1432;T.ER_FOREIGN_DATA_STRING_INVALID=1433;T.ER_CANT_CREATE_FEDERATED_TABLE=1434;T.ER_TRG_IN_WRONG_SCHEMA=1435;T.ER_STACK_OVERRUN_NEED_MORE=1436;T.ER_TOO_LONG_BODY=1437;T.ER_WARN_CANT_DROP_DEFAULT_KEYCACHE=1438;T.ER_TOO_BIG_DISPLAYWIDTH=1439;T.ER_XAER_DUPID=1440;T.ER_DATETIME_FUNCTION_OVERFLOW=1441;T.ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG=1442;T.ER_VIEW_PREVENT_UPDATE=1443;T.ER_PS_NO_RECURSION=1444;T.ER_SP_CANT_SET_AUTOCOMMIT=1445;T.ER_MALFORMED_DEFINER=1446;T.ER_VIEW_FRM_NO_USER=1447;T.ER_VIEW_OTHER_USER=1448;T.ER_NO_SUCH_USER=1449;T.ER_FORBID_SCHEMA_CHANGE=1450;T.ER_ROW_IS_REFERENCED_2=1451;T.ER_NO_REFERENCED_ROW_2=1452;T.ER_SP_BAD_VAR_SHADOW=1453;T.ER_TRG_NO_DEFINER=1454;T.ER_OLD_FILE_FORMAT=1455;T.ER_SP_RECURSION_LIMIT=1456;T.ER_SP_PROC_TABLE_CORRUPT=1457;T.ER_SP_WRONG_NAME=1458;T.ER_TABLE_NEEDS_UPGRADE=1459;T.ER_SP_NO_AGGREGATE=1460;T.ER_MAX_PREPARED_STMT_COUNT_REACHED=1461;T.ER_VIEW_RECURSIVE=1462;T.ER_NON_GROUPING_FIELD_USED=1463;T.ER_TABLE_CANT_HANDLE_SPKEYS=1464;T.ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA=1465;T.ER_REMOVED_SPACES=1466;T.ER_AUTOINC_READ_FAILED=1467;T.ER_USERNAME=1468;T.ER_HOSTNAME=1469;T.ER_WRONG_STRING_LENGTH=1470;T.ER_NON_INSERTABLE_TABLE=1471;T.ER_ADMIN_WRONG_MRG_TABLE=1472;T.ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT=1473;T.ER_NAME_BECOMES_EMPTY=1474;T.ER_AMBIGUOUS_FIELD_TERM=1475;T.ER_FOREIGN_SERVER_EXISTS=1476;T.ER_FOREIGN_SERVER_DOESNT_EXIST=1477;T.ER_ILLEGAL_HA_CREATE_OPTION=1478;T.ER_PARTITION_REQUIRES_VALUES_ERROR=1479;T.ER_PARTITION_WRONG_VALUES_ERROR=1480;T.ER_PARTITION_MAXVALUE_ERROR=1481;T.ER_PARTITION_SUBPARTITION_ERROR=1482;T.ER_PARTITION_SUBPART_MIX_ERROR=1483;T.ER_PARTITION_WRONG_NO_PART_ERROR=1484;T.ER_PARTITION_WRONG_NO_SUBPART_ERROR=1485;T.ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR=1486;T.ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR=1487;T.ER_FIELD_NOT_FOUND_PART_ERROR=1488;T.ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR=1489;T.ER_INCONSISTENT_PARTITION_INFO_ERROR=1490;T.ER_PARTITION_FUNC_NOT_ALLOWED_ERROR=1491;T.ER_PARTITIONS_MUST_BE_DEFINED_ERROR=1492;T.ER_RANGE_NOT_INCREASING_ERROR=1493;T.ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR=1494;T.ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR=1495;T.ER_PARTITION_ENTRY_ERROR=1496;T.ER_MIX_HANDLER_ERROR=1497;T.ER_PARTITION_NOT_DEFINED_ERROR=1498;T.ER_TOO_MANY_PARTITIONS_ERROR=1499;T.ER_SUBPARTITION_ERROR=1500;T.ER_CANT_CREATE_HANDLER_FILE=1501;T.ER_BLOB_FIELD_IN_PART_FUNC_ERROR=1502;T.ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF=1503;T.ER_NO_PARTS_ERROR=1504;T.ER_PARTITION_MGMT_ON_NONPARTITIONED=1505;T.ER_FOREIGN_KEY_ON_PARTITIONED=1506;T.ER_DROP_PARTITION_NON_EXISTENT=1507;T.ER_DROP_LAST_PARTITION=1508;T.ER_COALESCE_ONLY_ON_HASH_PARTITION=1509;T.ER_REORG_HASH_ONLY_ON_SAME_NO=1510;T.ER_REORG_NO_PARAM_ERROR=1511;T.ER_ONLY_ON_RANGE_LIST_PARTITION=1512;T.ER_ADD_PARTITION_SUBPART_ERROR=1513;T.ER_ADD_PARTITION_NO_NEW_PARTITION=1514;T.ER_COALESCE_PARTITION_NO_PARTITION=1515;T.ER_REORG_PARTITION_NOT_EXIST=1516;T.ER_SAME_NAME_PARTITION=1517;T.ER_NO_BINLOG_ERROR=1518;T.ER_CONSECUTIVE_REORG_PARTITIONS=1519;T.ER_REORG_OUTSIDE_RANGE=1520;T.ER_PARTITION_FUNCTION_FAILURE=1521;T.ER_PART_STATE_ERROR=1522;T.ER_LIMITED_PART_RANGE=1523;T.ER_PLUGIN_IS_NOT_LOADED=1524;T.ER_WRONG_VALUE=1525;T.ER_NO_PARTITION_FOR_GIVEN_VALUE=1526;T.ER_FILEGROUP_OPTION_ONLY_ONCE=1527;T.ER_CREATE_FILEGROUP_FAILED=1528;T.ER_DROP_FILEGROUP_FAILED=1529;T.ER_TABLESPACE_AUTO_EXTEND_ERROR=1530;T.ER_WRONG_SIZE_NUMBER=1531;T.ER_SIZE_OVERFLOW_ERROR=1532;T.ER_ALTER_FILEGROUP_FAILED=1533;T.ER_BINLOG_ROW_LOGGING_FAILED=1534;T.ER_BINLOG_ROW_WRONG_TABLE_DEF=1535;T.ER_BINLOG_ROW_RBR_TO_SBR=1536;T.ER_EVENT_ALREADY_EXISTS=1537;T.ER_EVENT_STORE_FAILED=1538;T.ER_EVENT_DOES_NOT_EXIST=1539;T.ER_EVENT_CANT_ALTER=1540;T.ER_EVENT_DROP_FAILED=1541;T.ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG=1542;T.ER_EVENT_ENDS_BEFORE_STARTS=1543;T.ER_EVENT_EXEC_TIME_IN_THE_PAST=1544;T.ER_EVENT_OPEN_TABLE_FAILED=1545;T.ER_EVENT_NEITHER_M_EXPR_NOR_M_AT=1546;T.ER_COL_COUNT_DOESNT_MATCH_CORRUPTED=1547;T.ER_CANNOT_LOAD_FROM_TABLE=1548;T.ER_EVENT_CANNOT_DELETE=1549;T.ER_EVENT_COMPILE_ERROR=1550;T.ER_EVENT_SAME_NAME=1551;T.ER_EVENT_DATA_TOO_LONG=1552;T.ER_DROP_INDEX_FK=1553;T.ER_WARN_DEPRECATED_SYNTAX_WITH_VER=1554;T.ER_CANT_WRITE_LOCK_LOG_TABLE=1555;T.ER_CANT_LOCK_LOG_TABLE=1556;T.ER_FOREIGN_DUPLICATE_KEY=1557;T.ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE=1558;T.ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR=1559;T.ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT=1560;T.ER_NDB_CANT_SWITCH_BINLOG_FORMAT=1561;T.ER_PARTITION_NO_TEMPORARY=1562;T.ER_PARTITION_CONST_DOMAIN_ERROR=1563;T.ER_PARTITION_FUNCTION_IS_NOT_ALLOWED=1564;T.ER_DDL_LOG_ERROR=1565;T.ER_NULL_IN_VALUES_LESS_THAN=1566;T.ER_WRONG_PARTITION_NAME=1567;T.ER_CANT_CHANGE_TX_CHARACTERISTICS=1568;T.ER_DUP_ENTRY_AUTOINCREMENT_CASE=1569;T.ER_EVENT_MODIFY_QUEUE_ERROR=1570;T.ER_EVENT_SET_VAR_ERROR=1571;T.ER_PARTITION_MERGE_ERROR=1572;T.ER_CANT_ACTIVATE_LOG=1573;T.ER_RBR_NOT_AVAILABLE=1574;T.ER_BASE64_DECODE_ERROR=1575;T.ER_EVENT_RECURSION_FORBIDDEN=1576;T.ER_EVENTS_DB_ERROR=1577;T.ER_ONLY_INTEGERS_ALLOWED=1578;T.ER_UNSUPORTED_LOG_ENGINE=1579;T.ER_BAD_LOG_STATEMENT=1580;T.ER_CANT_RENAME_LOG_TABLE=1581;T.ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT=1582;T.ER_WRONG_PARAMETERS_TO_NATIVE_FCT=1583;T.ER_WRONG_PARAMETERS_TO_STORED_FCT=1584;T.ER_NATIVE_FCT_NAME_COLLISION=1585;T.ER_DUP_ENTRY_WITH_KEY_NAME=1586;T.ER_BINLOG_PURGE_EMFILE=1587;T.ER_EVENT_CANNOT_CREATE_IN_THE_PAST=1588;T.ER_EVENT_CANNOT_ALTER_IN_THE_PAST=1589;T.ER_SLAVE_INCIDENT=1590;T.ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT=1591;T.ER_BINLOG_UNSAFE_STATEMENT=1592;T.ER_BINLOG_FATAL_ERROR=1593;T.ER_SLAVE_RELAY_LOG_READ_FAILURE=1594;T.ER_SLAVE_RELAY_LOG_WRITE_FAILURE=1595;T.ER_SLAVE_CREATE_EVENT_FAILURE=1596;T.ER_SLAVE_MASTER_COM_FAILURE=1597;T.ER_BINLOG_LOGGING_IMPOSSIBLE=1598;T.ER_VIEW_NO_CREATION_CTX=1599;T.ER_VIEW_INVALID_CREATION_CTX=1600;T.ER_SR_INVALID_CREATION_CTX=1601;T.ER_TRG_CORRUPTED_FILE=1602;T.ER_TRG_NO_CREATION_CTX=1603;T.ER_TRG_INVALID_CREATION_CTX=1604;T.ER_EVENT_INVALID_CREATION_CTX=1605;T.ER_TRG_CANT_OPEN_TABLE=1606;T.ER_CANT_CREATE_SROUTINE=1607;T.ER_NEVER_USED=1608;T.ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT=1609;T.ER_REPLICA_CORRUPT_EVENT=1610;T.ER_LOAD_DATA_INVALID_COLUMN=1611;T.ER_LOG_PURGE_NO_FILE=1612;T.ER_XA_RBTIMEOUT=1613;T.ER_XA_RBDEADLOCK=1614;T.ER_NEED_REPREPARE=1615;T.ER_DELAYED_NOT_SUPPORTED=1616;T.WARN_NO_CONNECTION_METADATA=1617;T.WARN_OPTION_IGNORED=1618;T.ER_PLUGIN_DELETE_BUILTIN=1619;T.WARN_PLUGIN_BUSY=1620;T.ER_VARIABLE_IS_READONLY=1621;T.ER_WARN_ENGINE_TRANSACTION_ROLLBACK=1622;T.ER_SLAVE_HEARTBEAT_FAILURE=1623;T.ER_REPLICA_HEARTBEAT_VALUE_OUT_OF_RANGE=1624;T.ER_NDB_REPLICATION_SCHEMA_ERROR=1625;T.ER_CONFLICT_FN_PARSE_ERROR=1626;T.ER_EXCEPTIONS_WRITE_ERROR=1627;T.ER_TOO_LONG_TABLE_COMMENT=1628;T.ER_TOO_LONG_FIELD_COMMENT=1629;T.ER_FUNC_INEXISTENT_NAME_COLLISION=1630;T.ER_DATABASE_NAME=1631;T.ER_TABLE_NAME=1632;T.ER_PARTITION_NAME=1633;T.ER_SUBPARTITION_NAME=1634;T.ER_TEMPORARY_NAME=1635;T.ER_RENAMED_NAME=1636;T.ER_TOO_MANY_CONCURRENT_TRXS=1637;T.WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED=1638;T.ER_DEBUG_SYNC_TIMEOUT=1639;T.ER_DEBUG_SYNC_HIT_LIMIT=1640;T.ER_DUP_SIGNAL_SET=1641;T.ER_SIGNAL_WARN=1642;T.ER_SIGNAL_NOT_FOUND=1643;T.ER_SIGNAL_EXCEPTION=1644;T.ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER=1645;T.ER_SIGNAL_BAD_CONDITION_TYPE=1646;T.WARN_COND_ITEM_TRUNCATED=1647;T.ER_COND_ITEM_TOO_LONG=1648;T.ER_UNKNOWN_LOCALE=1649;T.ER_REPLICA_IGNORE_SERVER_IDS=1650;T.ER_QUERY_CACHE_DISABLED=1651;T.ER_SAME_NAME_PARTITION_FIELD=1652;T.ER_PARTITION_COLUMN_LIST_ERROR=1653;T.ER_WRONG_TYPE_COLUMN_VALUE_ERROR=1654;T.ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR=1655;T.ER_MAXVALUE_IN_VALUES_IN=1656;T.ER_TOO_MANY_VALUES_ERROR=1657;T.ER_ROW_SINGLE_PARTITION_FIELD_ERROR=1658;T.ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD=1659;T.ER_PARTITION_FIELDS_TOO_LONG=1660;T.ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE=1661;T.ER_BINLOG_ROW_MODE_AND_STMT_ENGINE=1662;T.ER_BINLOG_UNSAFE_AND_STMT_ENGINE=1663;T.ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE=1664;T.ER_BINLOG_STMT_MODE_AND_ROW_ENGINE=1665;T.ER_BINLOG_ROW_INJECTION_AND_STMT_MODE=1666;T.ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE=1667;T.ER_BINLOG_UNSAFE_LIMIT=1668;T.ER_UNUSED4=1669;T.ER_BINLOG_UNSAFE_SYSTEM_TABLE=1670;T.ER_BINLOG_UNSAFE_AUTOINC_COLUMNS=1671;T.ER_BINLOG_UNSAFE_UDF=1672;T.ER_BINLOG_UNSAFE_SYSTEM_VARIABLE=1673;T.ER_BINLOG_UNSAFE_SYSTEM_FUNCTION=1674;T.ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS=1675;T.ER_MESSAGE_AND_STATEMENT=1676;T.ER_SLAVE_CONVERSION_FAILED=1677;T.ER_REPLICA_CANT_CREATE_CONVERSION=1678;T.ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT=1679;T.ER_PATH_LENGTH=1680;T.ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT=1681;T.ER_WRONG_NATIVE_TABLE_STRUCTURE=1682;T.ER_WRONG_PERFSCHEMA_USAGE=1683;T.ER_WARN_I_S_SKIPPED_TABLE=1684;T.ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT=1685;T.ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT=1686;T.ER_SPATIAL_MUST_HAVE_GEOM_COL=1687;T.ER_TOO_LONG_INDEX_COMMENT=1688;T.ER_LOCK_ABORTED=1689;T.ER_DATA_OUT_OF_RANGE=1690;T.ER_WRONG_SPVAR_TYPE_IN_LIMIT=1691;T.ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE=1692;T.ER_BINLOG_UNSAFE_MIXED_STATEMENT=1693;T.ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SQL_LOG_BIN=1694;T.ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN=1695;T.ER_FAILED_READ_FROM_PAR_FILE=1696;T.ER_VALUES_IS_NOT_INT_TYPE_ERROR=1697;T.ER_ACCESS_DENIED_NO_PASSWORD_ERROR=1698;T.ER_SET_PASSWORD_AUTH_PLUGIN=1699;T.ER_GRANT_PLUGIN_USER_EXISTS=1700;T.ER_TRUNCATE_ILLEGAL_FK=1701;T.ER_PLUGIN_IS_PERMANENT=1702;T.ER_REPLICA_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN=1703;T.ER_REPLICA_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX=1704;T.ER_STMT_CACHE_FULL=1705;T.ER_MULTI_UPDATE_KEY_CONFLICT=1706;T.ER_TABLE_NEEDS_REBUILD=1707;T.WARN_OPTION_BELOW_LIMIT=1708;T.ER_INDEX_COLUMN_TOO_LONG=1709;T.ER_ERROR_IN_TRIGGER_BODY=1710;T.ER_ERROR_IN_UNKNOWN_TRIGGER_BODY=1711;T.ER_INDEX_CORRUPT=1712;T.ER_UNDO_RECORD_TOO_BIG=1713;T.ER_BINLOG_UNSAFE_INSERT_IGNORE_SELECT=1714;T.ER_BINLOG_UNSAFE_INSERT_SELECT_UPDATE=1715;T.ER_BINLOG_UNSAFE_REPLACE_SELECT=1716;T.ER_BINLOG_UNSAFE_CREATE_IGNORE_SELECT=1717;T.ER_BINLOG_UNSAFE_CREATE_REPLACE_SELECT=1718;T.ER_BINLOG_UNSAFE_UPDATE_IGNORE=1719;T.ER_PLUGIN_NO_UNINSTALL=1720;T.ER_PLUGIN_NO_INSTALL=1721;T.ER_BINLOG_UNSAFE_WRITE_AUTOINC_SELECT=1722;T.ER_BINLOG_UNSAFE_CREATE_SELECT_AUTOINC=1723;T.ER_BINLOG_UNSAFE_INSERT_TWO_KEYS=1724;T.ER_TABLE_IN_FK_CHECK=1725;T.ER_UNSUPPORTED_ENGINE=1726;T.ER_BINLOG_UNSAFE_AUTOINC_NOT_FIRST=1727;T.ER_CANNOT_LOAD_FROM_TABLE_V2=1728;T.ER_SOURCE_DELAY_VALUE_OUT_OF_RANGE=1729;T.ER_ONLY_FD_AND_RBR_EVENTS_ALLOWED_IN_BINLOG_STATEMENT=1730;T.ER_PARTITION_EXCHANGE_DIFFERENT_OPTION=1731;T.ER_PARTITION_EXCHANGE_PART_TABLE=1732;T.ER_PARTITION_EXCHANGE_TEMP_TABLE=1733;T.ER_PARTITION_INSTEAD_OF_SUBPARTITION=1734;T.ER_UNKNOWN_PARTITION=1735;T.ER_TABLES_DIFFERENT_METADATA=1736;T.ER_ROW_DOES_NOT_MATCH_PARTITION=1737;T.ER_BINLOG_CACHE_SIZE_GREATER_THAN_MAX=1738;T.ER_WARN_INDEX_NOT_APPLICABLE=1739;T.ER_PARTITION_EXCHANGE_FOREIGN_KEY=1740;T.ER_NO_SUCH_KEY_VALUE=1741;T.ER_RPL_INFO_DATA_TOO_LONG=1742;T.ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE=1743;T.ER_BINLOG_READ_EVENT_CHECKSUM_FAILURE=1744;T.ER_BINLOG_STMT_CACHE_SIZE_GREATER_THAN_MAX=1745;T.ER_CANT_UPDATE_TABLE_IN_CREATE_TABLE_SELECT=1746;T.ER_PARTITION_CLAUSE_ON_NONPARTITIONED=1747;T.ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET=1748;T.ER_NO_SUCH_PARTITION=1749;T.ER_CHANGE_RPL_INFO_REPOSITORY_FAILURE=1750;T.ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_CREATED_TEMP_TABLE=1751;T.ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_DROPPED_TEMP_TABLE=1752;T.ER_MTA_FEATURE_IS_NOT_SUPPORTED=1753;T.ER_MTA_UPDATED_DBS_GREATER_MAX=1754;T.ER_MTA_CANT_PARALLEL=1755;T.ER_MTA_INCONSISTENT_DATA=1756;T.ER_FULLTEXT_NOT_SUPPORTED_WITH_PARTITIONING=1757;T.ER_DA_INVALID_CONDITION_NUMBER=1758;T.ER_INSECURE_PLAIN_TEXT=1759;T.ER_INSECURE_CHANGE_SOURCE=1760;T.ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO=1761;T.ER_FOREIGN_DUPLICATE_KEY_WITHOUT_CHILD_INFO=1762;T.ER_SQLTHREAD_WITH_SECURE_REPLICA=1763;T.ER_TABLE_HAS_NO_FT=1764;T.ER_VARIABLE_NOT_SETTABLE_IN_SF_OR_TRIGGER=1765;T.ER_VARIABLE_NOT_SETTABLE_IN_TRANSACTION=1766;T.ER_GTID_NEXT_IS_NOT_IN_GTID_NEXT_LIST=1767;T.ER_CANT_CHANGE_GTID_NEXT_IN_TRANSACTION=1768;T.ER_SET_STATEMENT_CANNOT_INVOKE_FUNCTION=1769;T.ER_GTID_NEXT_CANT_BE_AUTOMATIC_IF_GTID_NEXT_LIST_IS_NON_NULL=1770;T.ER_SKIPPING_LOGGED_TRANSACTION=1771;T.ER_MALFORMED_GTID_SET_SPECIFICATION=1772;T.ER_MALFORMED_GTID_SET_ENCODING=1773;T.ER_MALFORMED_GTID_SPECIFICATION=1774;T.ER_GNO_EXHAUSTED=1775;T.ER_BAD_REPLICA_AUTO_POSITION=1776;T.ER_AUTO_POSITION_REQUIRES_GTID_MODE_NOT_OFF=1777;T.ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET=1778;T.ER_GTID_MODE_ON_REQUIRES_ENFORCE_GTID_CONSISTENCY_ON=1779;T.ER_GTID_MODE_REQUIRES_BINLOG=1780;T.ER_CANT_SET_GTID_NEXT_TO_GTID_WHEN_GTID_MODE_IS_OFF=1781;T.ER_CANT_SET_GTID_NEXT_TO_ANONYMOUS_WHEN_GTID_MODE_IS_ON=1782;T.ER_CANT_SET_GTID_NEXT_LIST_TO_NON_NULL_WHEN_GTID_MODE_IS_OFF=1783;T.ER_FOUND_GTID_EVENT_WHEN_GTID_MODE_IS_OFF=1784;T.ER_GTID_UNSAFE_NON_TRANSACTIONAL_TABLE=1785;T.ER_GTID_UNSAFE_CREATE_SELECT=1786;T.ER_GTID_UNSAFE_CREATE_DROP_TEMP_TABLE_IN_TRANSACTION=1787;T.ER_GTID_MODE_CAN_ONLY_CHANGE_ONE_STEP_AT_A_TIME=1788;T.ER_SOURCE_HAS_PURGED_REQUIRED_GTIDS=1789;T.ER_CANT_SET_GTID_NEXT_WHEN_OWNING_GTID=1790;T.ER_UNKNOWN_EXPLAIN_FORMAT=1791;T.ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION=1792;T.ER_TOO_LONG_TABLE_PARTITION_COMMENT=1793;T.ER_REPLICA_CONFIGURATION=1794;T.ER_INNODB_FT_LIMIT=1795;T.ER_INNODB_NO_FT_TEMP_TABLE=1796;T.ER_INNODB_FT_WRONG_DOCID_COLUMN=1797;T.ER_INNODB_FT_WRONG_DOCID_INDEX=1798;T.ER_INNODB_ONLINE_LOG_TOO_BIG=1799;T.ER_UNKNOWN_ALTER_ALGORITHM=1800;T.ER_UNKNOWN_ALTER_LOCK=1801;T.ER_MTA_CHANGE_SOURCE_CANT_RUN_WITH_GAPS=1802;T.ER_MTA_RECOVERY_FAILURE=1803;T.ER_MTA_RESET_WORKERS=1804;T.ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2=1805;T.ER_REPLICA_SILENT_RETRY_TRANSACTION=1806;T.ER_DISCARD_FK_CHECKS_RUNNING=1807;T.ER_TABLE_SCHEMA_MISMATCH=1808;T.ER_TABLE_IN_SYSTEM_TABLESPACE=1809;T.ER_IO_READ_ERROR=1810;T.ER_IO_WRITE_ERROR=1811;T.ER_TABLESPACE_MISSING=1812;T.ER_TABLESPACE_EXISTS=1813;T.ER_TABLESPACE_DISCARDED=1814;T.ER_INTERNAL_ERROR=1815;T.ER_INNODB_IMPORT_ERROR=1816;T.ER_INNODB_INDEX_CORRUPT=1817;T.ER_INVALID_YEAR_COLUMN_LENGTH=1818;T.ER_NOT_VALID_PASSWORD=1819;T.ER_MUST_CHANGE_PASSWORD=1820;T.ER_FK_NO_INDEX_CHILD=1821;T.ER_FK_NO_INDEX_PARENT=1822;T.ER_FK_FAIL_ADD_SYSTEM=1823;T.ER_FK_CANNOT_OPEN_PARENT=1824;T.ER_FK_INCORRECT_OPTION=1825;T.ER_FK_DUP_NAME=1826;T.ER_PASSWORD_FORMAT=1827;T.ER_FK_COLUMN_CANNOT_DROP=1828;T.ER_FK_COLUMN_CANNOT_DROP_CHILD=1829;T.ER_FK_COLUMN_NOT_NULL=1830;T.ER_DUP_INDEX=1831;T.ER_FK_COLUMN_CANNOT_CHANGE=1832;T.ER_FK_COLUMN_CANNOT_CHANGE_CHILD=1833;T.ER_UNUSED5=1834;T.ER_MALFORMED_PACKET=1835;T.ER_READ_ONLY_MODE=1836;T.ER_GTID_NEXT_TYPE_UNDEFINED_GTID=1837;T.ER_VARIABLE_NOT_SETTABLE_IN_SP=1838;T.ER_CANT_SET_GTID_PURGED_WHEN_GTID_MODE_IS_OFF=1839;T.ER_CANT_SET_GTID_PURGED_WHEN_GTID_EXECUTED_IS_NOT_EMPTY=1840;T.ER_CANT_SET_GTID_PURGED_WHEN_OWNED_GTIDS_IS_NOT_EMPTY=1841;T.ER_GTID_PURGED_WAS_CHANGED=1842;T.ER_GTID_EXECUTED_WAS_CHANGED=1843;T.ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES=1844;T.ER_ALTER_OPERATION_NOT_SUPPORTED=1845;T.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON=1846;T.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COPY=1847;T.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_PARTITION=1848;T.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_RENAME=1849;T.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE=1850;T.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_CHECK=1851;T.ER_UNUSED6=1852;T.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOPK=1853;T.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_AUTOINC=1854;T.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_HIDDEN_FTS=1855;T.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_CHANGE_FTS=1856;T.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FTS=1857;T.ER_SQL_REPLICA_SKIP_COUNTER_NOT_SETTABLE_IN_GTID_MODE=1858;T.ER_DUP_UNKNOWN_IN_INDEX=1859;T.ER_IDENT_CAUSES_TOO_LONG_PATH=1860;T.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOT_NULL=1861;T.ER_MUST_CHANGE_PASSWORD_LOGIN=1862;T.ER_ROW_IN_WRONG_PARTITION=1863;T.ER_MTA_EVENT_BIGGER_PENDING_JOBS_SIZE_MAX=1864;T.ER_INNODB_NO_FT_USES_PARSER=1865;T.ER_BINLOG_LOGICAL_CORRUPTION=1866;T.ER_WARN_PURGE_LOG_IN_USE=1867;T.ER_WARN_PURGE_LOG_IS_ACTIVE=1868;T.ER_AUTO_INCREMENT_CONFLICT=1869;T.WARN_ON_BLOCKHOLE_IN_RBR=1870;T.ER_REPLICA_CM_INIT_REPOSITORY=1871;T.ER_REPLICA_AM_INIT_REPOSITORY=1872;T.ER_ACCESS_DENIED_CHANGE_USER_ERROR=1873;T.ER_INNODB_READ_ONLY=1874;T.ER_STOP_REPLICA_SQL_THREAD_TIMEOUT=1875;T.ER_STOP_REPLICA_IO_THREAD_TIMEOUT=1876;T.ER_TABLE_CORRUPT=1877;T.ER_TEMP_FILE_WRITE_FAILURE=1878;T.ER_INNODB_FT_AUX_NOT_HEX_ID=1879;T.ER_OLD_TEMPORALS_UPGRADED=1880;T.ER_INNODB_FORCED_RECOVERY=1881;T.ER_AES_INVALID_IV=1882;T.ER_PLUGIN_CANNOT_BE_UNINSTALLED=1883;T.ER_GTID_UNSAFE_BINLOG_SPLITTABLE_STATEMENT_AND_ASSIGNED_GTID=1884;T.ER_REPLICA_HAS_MORE_GTIDS_THAN_SOURCE=1885;T.ER_MISSING_KEY=1886;T.WARN_NAMED_PIPE_ACCESS_EVERYONE=1887;T.ER_FILE_CORRUPT=3000;T.ER_ERROR_ON_SOURCE=3001;T.ER_INCONSISTENT_ERROR=3002;T.ER_STORAGE_ENGINE_NOT_LOADED=3003;T.ER_GET_STACKED_DA_WITHOUT_ACTIVE_HANDLER=3004;T.ER_WARN_LEGACY_SYNTAX_CONVERTED=3005;T.ER_BINLOG_UNSAFE_FULLTEXT_PLUGIN=3006;T.ER_CANNOT_DISCARD_TEMPORARY_TABLE=3007;T.ER_FK_DEPTH_EXCEEDED=3008;T.ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE_V2=3009;T.ER_WARN_TRIGGER_DOESNT_HAVE_CREATED=3010;T.ER_REFERENCED_TRG_DOES_NOT_EXIST=3011;T.ER_EXPLAIN_NOT_SUPPORTED=3012;T.ER_INVALID_FIELD_SIZE=3013;T.ER_MISSING_HA_CREATE_OPTION=3014;T.ER_ENGINE_OUT_OF_MEMORY=3015;T.ER_PASSWORD_EXPIRE_ANONYMOUS_USER=3016;T.ER_REPLICA_SQL_THREAD_MUST_STOP=3017;T.ER_NO_FT_MATERIALIZED_SUBQUERY=3018;T.ER_INNODB_UNDO_LOG_FULL=3019;T.ER_INVALID_ARGUMENT_FOR_LOGARITHM=3020;T.ER_REPLICA_CHANNEL_IO_THREAD_MUST_STOP=3021;T.ER_WARN_OPEN_TEMP_TABLES_MUST_BE_ZERO=3022;T.ER_WARN_ONLY_SOURCE_LOG_FILE_NO_POS=3023;T.ER_QUERY_TIMEOUT=3024;T.ER_NON_RO_SELECT_DISABLE_TIMER=3025;T.ER_DUP_LIST_ENTRY=3026;T.ER_SQL_MODE_NO_EFFECT=3027;T.ER_AGGREGATE_ORDER_FOR_UNION=3028;T.ER_AGGREGATE_ORDER_NON_AGG_QUERY=3029;T.ER_REPLICA_WORKER_STOPPED_PREVIOUS_THD_ERROR=3030;T.ER_DONT_SUPPORT_REPLICA_PRESERVE_COMMIT_ORDER=3031;T.ER_SERVER_OFFLINE_MODE=3032;T.ER_GIS_DIFFERENT_SRIDS=3033;T.ER_GIS_UNSUPPORTED_ARGUMENT=3034;T.ER_GIS_UNKNOWN_ERROR=3035;T.ER_GIS_UNKNOWN_EXCEPTION=3036;T.ER_GIS_INVALID_DATA=3037;T.ER_BOOST_GEOMETRY_EMPTY_INPUT_EXCEPTION=3038;T.ER_BOOST_GEOMETRY_CENTROID_EXCEPTION=3039;T.ER_BOOST_GEOMETRY_OVERLAY_INVALID_INPUT_EXCEPTION=3040;T.ER_BOOST_GEOMETRY_TURN_INFO_EXCEPTION=3041;T.ER_BOOST_GEOMETRY_SELF_INTERSECTION_POINT_EXCEPTION=3042;T.ER_BOOST_GEOMETRY_UNKNOWN_EXCEPTION=3043;T.ER_STD_BAD_ALLOC_ERROR=3044;T.ER_STD_DOMAIN_ERROR=3045;T.ER_STD_LENGTH_ERROR=3046;T.ER_STD_INVALID_ARGUMENT=3047;T.ER_STD_OUT_OF_RANGE_ERROR=3048;T.ER_STD_OVERFLOW_ERROR=3049;T.ER_STD_RANGE_ERROR=3050;T.ER_STD_UNDERFLOW_ERROR=3051;T.ER_STD_LOGIC_ERROR=3052;T.ER_STD_RUNTIME_ERROR=3053;T.ER_STD_UNKNOWN_EXCEPTION=3054;T.ER_GIS_DATA_WRONG_ENDIANESS=3055;T.ER_CHANGE_SOURCE_PASSWORD_LENGTH=3056;T.ER_USER_LOCK_WRONG_NAME=3057;T.ER_USER_LOCK_DEADLOCK=3058;T.ER_REPLACE_INACCESSIBLE_ROWS=3059;T.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_GIS=3060;T.ER_ILLEGAL_USER_VAR=3061;T.ER_GTID_MODE_OFF=3062;T.ER_UNSUPPORTED_BY_REPLICATION_THREAD=3063;T.ER_INCORRECT_TYPE=3064;T.ER_FIELD_IN_ORDER_NOT_SELECT=3065;T.ER_AGGREGATE_IN_ORDER_NOT_SELECT=3066;T.ER_INVALID_RPL_WILD_TABLE_FILTER_PATTERN=3067;T.ER_NET_OK_PACKET_TOO_LARGE=3068;T.ER_INVALID_JSON_DATA=3069;T.ER_INVALID_GEOJSON_MISSING_MEMBER=3070;T.ER_INVALID_GEOJSON_WRONG_TYPE=3071;T.ER_INVALID_GEOJSON_UNSPECIFIED=3072;T.ER_DIMENSION_UNSUPPORTED=3073;T.ER_REPLICA_CHANNEL_DOES_NOT_EXIST=3074;T.ER_SLAVE_MULTIPLE_CHANNELS_HOST_PORT=3075;T.ER_REPLICA_CHANNEL_NAME_INVALID_OR_TOO_LONG=3076;T.ER_REPLICA_NEW_CHANNEL_WRONG_REPOSITORY=3077;T.ER_SLAVE_CHANNEL_DELETE=3078;T.ER_REPLICA_MULTIPLE_CHANNELS_CMD=3079;T.ER_REPLICA_MAX_CHANNELS_EXCEEDED=3080;T.ER_REPLICA_CHANNEL_MUST_STOP=3081;T.ER_REPLICA_CHANNEL_NOT_RUNNING=3082;T.ER_REPLICA_CHANNEL_WAS_RUNNING=3083;T.ER_REPLICA_CHANNEL_WAS_NOT_RUNNING=3084;T.ER_REPLICA_CHANNEL_SQL_THREAD_MUST_STOP=3085;T.ER_REPLICA_CHANNEL_SQL_SKIP_COUNTER=3086;T.ER_WRONG_FIELD_WITH_GROUP_V2=3087;T.ER_MIX_OF_GROUP_FUNC_AND_FIELDS_V2=3088;T.ER_WARN_DEPRECATED_SYSVAR_UPDATE=3089;T.ER_WARN_DEPRECATED_SQLMODE=3090;T.ER_CANNOT_LOG_PARTIAL_DROP_DATABASE_WITH_GTID=3091;T.ER_GROUP_REPLICATION_CONFIGURATION=3092;T.ER_GROUP_REPLICATION_RUNNING=3093;T.ER_GROUP_REPLICATION_APPLIER_INIT_ERROR=3094;T.ER_GROUP_REPLICATION_STOP_APPLIER_THREAD_TIMEOUT=3095;T.ER_GROUP_REPLICATION_COMMUNICATION_LAYER_SESSION_ERROR=3096;T.ER_GROUP_REPLICATION_COMMUNICATION_LAYER_JOIN_ERROR=3097;T.ER_BEFORE_DML_VALIDATION_ERROR=3098;T.ER_PREVENTS_VARIABLE_WITHOUT_RBR=3099;T.ER_RUN_HOOK_ERROR=3100;T.ER_TRANSACTION_ROLLBACK_DURING_COMMIT=3101;T.ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED=3102;T.ER_UNSUPPORTED_ALTER_INPLACE_ON_VIRTUAL_COLUMN=3103;T.ER_WRONG_FK_OPTION_FOR_GENERATED_COLUMN=3104;T.ER_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN=3105;T.ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN=3106;T.ER_GENERATED_COLUMN_NON_PRIOR=3107;T.ER_DEPENDENT_BY_GENERATED_COLUMN=3108;T.ER_GENERATED_COLUMN_REF_AUTO_INC=3109;T.ER_FEATURE_NOT_AVAILABLE=3110;T.ER_CANT_SET_GTID_MODE=3111;T.ER_CANT_USE_AUTO_POSITION_WITH_GTID_MODE_OFF=3112;T.ER_CANT_REPLICATE_ANONYMOUS_WITH_AUTO_POSITION=3113;T.ER_CANT_REPLICATE_ANONYMOUS_WITH_GTID_MODE_ON=3114;T.ER_CANT_REPLICATE_GTID_WITH_GTID_MODE_OFF=3115;T.ER_CANT_ENFORCE_GTID_CONSISTENCY_WITH_ONGOING_GTID_VIOLATING_TX=3116;T.ER_ENFORCE_GTID_CONSISTENCY_WARN_WITH_ONGOING_GTID_VIOLATING_TX=3117;T.ER_ACCOUNT_HAS_BEEN_LOCKED=3118;T.ER_WRONG_TABLESPACE_NAME=3119;T.ER_TABLESPACE_IS_NOT_EMPTY=3120;T.ER_WRONG_FILE_NAME=3121;T.ER_BOOST_GEOMETRY_INCONSISTENT_TURNS_EXCEPTION=3122;T.ER_WARN_OPTIMIZER_HINT_SYNTAX_ERROR=3123;T.ER_WARN_BAD_MAX_EXECUTION_TIME=3124;T.ER_WARN_UNSUPPORTED_MAX_EXECUTION_TIME=3125;T.ER_WARN_CONFLICTING_HINT=3126;T.ER_WARN_UNKNOWN_QB_NAME=3127;T.ER_UNRESOLVED_HINT_NAME=3128;T.ER_WARN_ON_MODIFYING_GTID_EXECUTED_TABLE=3129;T.ER_PLUGGABLE_PROTOCOL_COMMAND_NOT_SUPPORTED=3130;T.ER_LOCKING_SERVICE_WRONG_NAME=3131;T.ER_LOCKING_SERVICE_DEADLOCK=3132;T.ER_LOCKING_SERVICE_TIMEOUT=3133;T.ER_GIS_MAX_POINTS_IN_GEOMETRY_OVERFLOWED=3134;T.ER_SQL_MODE_MERGED=3135;T.ER_VTOKEN_PLUGIN_TOKEN_MISMATCH=3136;T.ER_VTOKEN_PLUGIN_TOKEN_NOT_FOUND=3137;T.ER_CANT_SET_VARIABLE_WHEN_OWNING_GTID=3138;T.ER_REPLICA_CHANNEL_OPERATION_NOT_ALLOWED=3139;T.ER_INVALID_JSON_TEXT=3140;T.ER_INVALID_JSON_TEXT_IN_PARAM=3141;T.ER_INVALID_JSON_BINARY_DATA=3142;T.ER_INVALID_JSON_PATH=3143;T.ER_INVALID_JSON_CHARSET=3144;T.ER_INVALID_JSON_CHARSET_IN_FUNCTION=3145;T.ER_INVALID_TYPE_FOR_JSON=3146;T.ER_INVALID_CAST_TO_JSON=3147;T.ER_INVALID_JSON_PATH_CHARSET=3148;T.ER_INVALID_JSON_PATH_WILDCARD=3149;T.ER_JSON_VALUE_TOO_BIG=3150;T.ER_JSON_KEY_TOO_BIG=3151;T.ER_JSON_USED_AS_KEY=3152;T.ER_JSON_VACUOUS_PATH=3153;T.ER_JSON_BAD_ONE_OR_ALL_ARG=3154;T.ER_NUMERIC_JSON_VALUE_OUT_OF_RANGE=3155;T.ER_INVALID_JSON_VALUE_FOR_CAST=3156;T.ER_JSON_DOCUMENT_TOO_DEEP=3157;T.ER_JSON_DOCUMENT_NULL_KEY=3158;T.ER_SECURE_TRANSPORT_REQUIRED=3159;T.ER_NO_SECURE_TRANSPORTS_CONFIGURED=3160;T.ER_DISABLED_STORAGE_ENGINE=3161;T.ER_USER_DOES_NOT_EXIST=3162;T.ER_USER_ALREADY_EXISTS=3163;T.ER_AUDIT_API_ABORT=3164;T.ER_INVALID_JSON_PATH_ARRAY_CELL=3165;T.ER_BUFPOOL_RESIZE_INPROGRESS=3166;T.ER_FEATURE_DISABLED_SEE_DOC=3167;T.ER_SERVER_ISNT_AVAILABLE=3168;T.ER_SESSION_WAS_KILLED=3169;T.ER_CAPACITY_EXCEEDED=3170;T.ER_CAPACITY_EXCEEDED_IN_RANGE_OPTIMIZER=3171;T.ER_TABLE_NEEDS_UPG_PART=3172;T.ER_CANT_WAIT_FOR_EXECUTED_GTID_SET_WHILE_OWNING_A_GTID=3173;T.ER_CANNOT_ADD_FOREIGN_BASE_COL_VIRTUAL=3174;T.ER_CANNOT_CREATE_VIRTUAL_INDEX_CONSTRAINT=3175;T.ER_ERROR_ON_MODIFYING_GTID_EXECUTED_TABLE=3176;T.ER_LOCK_REFUSED_BY_ENGINE=3177;T.ER_UNSUPPORTED_ALTER_ONLINE_ON_VIRTUAL_COLUMN=3178;T.ER_MASTER_KEY_ROTATION_NOT_SUPPORTED_BY_SE=3179;T.ER_MASTER_KEY_ROTATION_ERROR_BY_SE=3180;T.ER_MASTER_KEY_ROTATION_BINLOG_FAILED=3181;T.ER_MASTER_KEY_ROTATION_SE_UNAVAILABLE=3182;T.ER_TABLESPACE_CANNOT_ENCRYPT=3183;T.ER_INVALID_ENCRYPTION_OPTION=3184;T.ER_CANNOT_FIND_KEY_IN_KEYRING=3185;T.ER_CAPACITY_EXCEEDED_IN_PARSER=3186;T.ER_UNSUPPORTED_ALTER_ENCRYPTION_INPLACE=3187;T.ER_KEYRING_UDF_KEYRING_SERVICE_ERROR=3188;T.ER_USER_COLUMN_OLD_LENGTH=3189;T.ER_CANT_RESET_SOURCE=3190;T.ER_GROUP_REPLICATION_MAX_GROUP_SIZE=3191;T.ER_CANNOT_ADD_FOREIGN_BASE_COL_STORED=3192;T.ER_TABLE_REFERENCED=3193;T.ER_PARTITION_ENGINE_DEPRECATED_FOR_TABLE=3194;T.ER_WARN_USING_GEOMFROMWKB_TO_SET_SRID_ZERO=3195;T.ER_WARN_USING_GEOMFROMWKB_TO_SET_SRID=3196;T.ER_XA_RETRY=3197;T.ER_KEYRING_AWS_UDF_AWS_KMS_ERROR=3198;T.ER_BINLOG_UNSAFE_XA=3199;T.ER_UDF_ERROR=3200;T.ER_KEYRING_MIGRATION_FAILURE=3201;T.ER_KEYRING_ACCESS_DENIED_ERROR=3202;T.ER_KEYRING_MIGRATION_STATUS=3203;T.ER_PLUGIN_FAILED_TO_OPEN_TABLES=3204;T.ER_PLUGIN_FAILED_TO_OPEN_TABLE=3205;T.ER_AUDIT_LOG_NO_KEYRING_PLUGIN_INSTALLED=3206;T.ER_AUDIT_LOG_ENCRYPTION_PASSWORD_HAS_NOT_BEEN_SET=3207;T.ER_AUDIT_LOG_COULD_NOT_CREATE_AES_KEY=3208;T.ER_AUDIT_LOG_ENCRYPTION_PASSWORD_CANNOT_BE_FETCHED=3209;T.ER_AUDIT_LOG_JSON_FILTERING_NOT_ENABLED=3210;T.ER_AUDIT_LOG_UDF_INSUFFICIENT_PRIVILEGE=3211;T.ER_AUDIT_LOG_SUPER_PRIVILEGE_REQUIRED=3212;T.ER_COULD_NOT_REINITIALIZE_AUDIT_LOG_FILTERS=3213;T.ER_AUDIT_LOG_UDF_INVALID_ARGUMENT_TYPE=3214;T.ER_AUDIT_LOG_UDF_INVALID_ARGUMENT_COUNT=3215;T.ER_AUDIT_LOG_HAS_NOT_BEEN_INSTALLED=3216;T.ER_AUDIT_LOG_UDF_READ_INVALID_MAX_ARRAY_LENGTH_ARG_TYPE=3217;T.ER_AUDIT_LOG_UDF_READ_INVALID_MAX_ARRAY_LENGTH_ARG_VALUE=3218;T.ER_AUDIT_LOG_JSON_FILTER_PARSING_ERROR=3219;T.ER_AUDIT_LOG_JSON_FILTER_NAME_CANNOT_BE_EMPTY=3220;T.ER_AUDIT_LOG_JSON_USER_NAME_CANNOT_BE_EMPTY=3221;T.ER_AUDIT_LOG_JSON_FILTER_DOES_NOT_EXISTS=3222;T.ER_AUDIT_LOG_USER_FIRST_CHARACTER_MUST_BE_ALPHANUMERIC=3223;T.ER_AUDIT_LOG_USER_NAME_INVALID_CHARACTER=3224;T.ER_AUDIT_LOG_HOST_NAME_INVALID_CHARACTER=3225;T.WARN_DEPRECATED_MAXDB_SQL_MODE_FOR_TIMESTAMP=3226;T.ER_XA_REPLICATION_FILTERS=3227;T.ER_CANT_OPEN_ERROR_LOG=3228;T.ER_GROUPING_ON_TIMESTAMP_IN_DST=3229;T.ER_CANT_START_SERVER_NAMED_PIPE=3230;T.ER_WRITE_SET_EXCEEDS_LIMIT=3231;T.ER_DEPRECATED_TLS_VERSION_SESSION_57=3232;T.ER_WARN_DEPRECATED_TLS_VERSION_57=3233;T.ER_WARN_WRONG_NATIVE_TABLE_STRUCTURE=3234;T.ER_AES_INVALID_KDF_NAME=3235;T.ER_AES_INVALID_KDF_ITERATIONS=3236;T.WARN_AES_KEY_SIZE=3237;T.ER_AES_INVALID_KDF_OPTION_SIZE=3238;T.ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE=3500;T.ER_ACL_OPERATION_FAILED=3501;T.ER_UNSUPPORTED_INDEX_ALGORITHM=3502;T.ER_NO_SUCH_DB=3503;T.ER_TOO_BIG_ENUM=3504;T.ER_TOO_LONG_SET_ENUM_VALUE=3505;T.ER_INVALID_DD_OBJECT=3506;T.ER_UPDATING_DD_TABLE=3507;T.ER_INVALID_DD_OBJECT_ID=3508;T.ER_INVALID_DD_OBJECT_NAME=3509;T.ER_TABLESPACE_MISSING_WITH_NAME=3510;T.ER_TOO_LONG_ROUTINE_COMMENT=3511;T.ER_SP_LOAD_FAILED=3512;T.ER_INVALID_BITWISE_OPERANDS_SIZE=3513;T.ER_INVALID_BITWISE_AGGREGATE_OPERANDS_SIZE=3514;T.ER_WARN_UNSUPPORTED_HINT=3515;T.ER_UNEXPECTED_GEOMETRY_TYPE=3516;T.ER_SRS_PARSE_ERROR=3517;T.ER_SRS_PROJ_PARAMETER_MISSING=3518;T.ER_WARN_SRS_NOT_FOUND=3519;T.ER_SRS_NOT_CARTESIAN=3520;T.ER_SRS_NOT_CARTESIAN_UNDEFINED=3521;T.ER_PK_INDEX_CANT_BE_INVISIBLE=3522;T.ER_UNKNOWN_AUTHID=3523;T.ER_FAILED_ROLE_GRANT=3524;T.ER_OPEN_ROLE_TABLES=3525;T.ER_FAILED_DEFAULT_ROLES=3526;T.ER_COMPONENTS_NO_SCHEME=3527;T.ER_COMPONENTS_NO_SCHEME_SERVICE=3528;T.ER_COMPONENTS_CANT_LOAD=3529;T.ER_ROLE_NOT_GRANTED=3530;T.ER_FAILED_REVOKE_ROLE=3531;T.ER_RENAME_ROLE=3532;T.ER_COMPONENTS_CANT_ACQUIRE_SERVICE_IMPLEMENTATION=3533;T.ER_COMPONENTS_CANT_SATISFY_DEPENDENCY=3534;T.ER_COMPONENTS_LOAD_CANT_REGISTER_SERVICE_IMPLEMENTATION=3535;T.ER_COMPONENTS_LOAD_CANT_INITIALIZE=3536;T.ER_COMPONENTS_UNLOAD_NOT_LOADED=3537;T.ER_COMPONENTS_UNLOAD_CANT_DEINITIALIZE=3538;T.ER_COMPONENTS_CANT_RELEASE_SERVICE=3539;T.ER_COMPONENTS_UNLOAD_CANT_UNREGISTER_SERVICE=3540;T.ER_COMPONENTS_CANT_UNLOAD=3541;T.ER_WARN_UNLOAD_THE_NOT_PERSISTED=3542;T.ER_COMPONENT_TABLE_INCORRECT=3543;T.ER_COMPONENT_MANIPULATE_ROW_FAILED=3544;T.ER_COMPONENTS_UNLOAD_DUPLICATE_IN_GROUP=3545;T.ER_CANT_SET_GTID_PURGED_DUE_SETS_CONSTRAINTS=3546;T.ER_CANNOT_LOCK_USER_MANAGEMENT_CACHES=3547;T.ER_SRS_NOT_FOUND=3548;T.ER_VARIABLE_NOT_PERSISTED=3549;T.ER_IS_QUERY_INVALID_CLAUSE=3550;T.ER_UNABLE_TO_STORE_STATISTICS=3551;T.ER_NO_SYSTEM_SCHEMA_ACCESS=3552;T.ER_NO_SYSTEM_TABLESPACE_ACCESS=3553;T.ER_NO_SYSTEM_TABLE_ACCESS=3554;T.ER_NO_SYSTEM_TABLE_ACCESS_FOR_DICTIONARY_TABLE=3555;T.ER_NO_SYSTEM_TABLE_ACCESS_FOR_SYSTEM_TABLE=3556;T.ER_NO_SYSTEM_TABLE_ACCESS_FOR_TABLE=3557;T.ER_INVALID_OPTION_KEY=3558;T.ER_INVALID_OPTION_VALUE=3559;T.ER_INVALID_OPTION_KEY_VALUE_PAIR=3560;T.ER_INVALID_OPTION_START_CHARACTER=3561;T.ER_INVALID_OPTION_END_CHARACTER=3562;T.ER_INVALID_OPTION_CHARACTERS=3563;T.ER_DUPLICATE_OPTION_KEY=3564;T.ER_WARN_SRS_NOT_FOUND_AXIS_ORDER=3565;T.ER_NO_ACCESS_TO_NATIVE_FCT=3566;T.ER_RESET_SOURCE_TO_VALUE_OUT_OF_RANGE=3567;T.ER_UNRESOLVED_TABLE_LOCK=3568;T.ER_DUPLICATE_TABLE_LOCK=3569;T.ER_BINLOG_UNSAFE_SKIP_LOCKED=3570;T.ER_BINLOG_UNSAFE_NOWAIT=3571;T.ER_LOCK_NOWAIT=3572;T.ER_CTE_RECURSIVE_REQUIRES_UNION=3573;T.ER_CTE_RECURSIVE_REQUIRES_NONRECURSIVE_FIRST=3574;T.ER_CTE_RECURSIVE_FORBIDS_AGGREGATION=3575;T.ER_CTE_RECURSIVE_FORBIDDEN_JOIN_ORDER=3576;T.ER_CTE_RECURSIVE_REQUIRES_SINGLE_REFERENCE=3577;T.ER_SWITCH_TMP_ENGINE=3578;T.ER_WINDOW_NO_SUCH_WINDOW=3579;T.ER_WINDOW_CIRCULARITY_IN_WINDOW_GRAPH=3580;T.ER_WINDOW_NO_CHILD_PARTITIONING=3581;T.ER_WINDOW_NO_INHERIT_FRAME=3582;T.ER_WINDOW_NO_REDEFINE_ORDER_BY=3583;T.ER_WINDOW_FRAME_START_ILLEGAL=3584;T.ER_WINDOW_FRAME_END_ILLEGAL=3585;T.ER_WINDOW_FRAME_ILLEGAL=3586;T.ER_WINDOW_RANGE_FRAME_ORDER_TYPE=3587;T.ER_WINDOW_RANGE_FRAME_TEMPORAL_TYPE=3588;T.ER_WINDOW_RANGE_FRAME_NUMERIC_TYPE=3589;T.ER_WINDOW_RANGE_BOUND_NOT_CONSTANT=3590;T.ER_WINDOW_DUPLICATE_NAME=3591;T.ER_WINDOW_ILLEGAL_ORDER_BY=3592;T.ER_WINDOW_INVALID_WINDOW_FUNC_USE=3593;T.ER_WINDOW_INVALID_WINDOW_FUNC_ALIAS_USE=3594;T.ER_WINDOW_NESTED_WINDOW_FUNC_USE_IN_WINDOW_SPEC=3595;T.ER_WINDOW_ROWS_INTERVAL_USE=3596;T.ER_WINDOW_NO_GROUP_ORDER=3597;T.ER_WINDOW_EXPLAIN_JSON=3598;T.ER_WINDOW_FUNCTION_IGNORES_FRAME=3599;T.ER_WL9236_NOW=3600;T.ER_INVALID_NO_OF_ARGS=3601;T.ER_FIELD_IN_GROUPING_NOT_GROUP_BY=3602;T.ER_TOO_LONG_TABLESPACE_COMMENT=3603;T.ER_ENGINE_CANT_DROP_TABLE=3604;T.ER_ENGINE_CANT_DROP_MISSING_TABLE=3605;T.ER_TABLESPACE_DUP_FILENAME=3606;T.ER_DB_DROP_RMDIR2=3607;T.ER_IMP_NO_FILES_MATCHED=3608;T.ER_IMP_SCHEMA_DOES_NOT_EXIST=3609;T.ER_IMP_TABLE_ALREADY_EXISTS=3610;T.ER_IMP_INCOMPATIBLE_MYSQLD_VERSION=3611;T.ER_IMP_INCOMPATIBLE_DD_VERSION=3612;T.ER_IMP_INCOMPATIBLE_SDI_VERSION=3613;T.ER_WARN_INVALID_HINT=3614;T.ER_VAR_DOES_NOT_EXIST=3615;T.ER_LONGITUDE_OUT_OF_RANGE=3616;T.ER_LATITUDE_OUT_OF_RANGE=3617;T.ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS=3618;T.ER_ILLEGAL_PRIVILEGE_LEVEL=3619;T.ER_NO_SYSTEM_VIEW_ACCESS=3620;T.ER_COMPONENT_FILTER_FLABBERGASTED=3621;T.ER_PART_EXPR_TOO_LONG=3622;T.ER_UDF_DROP_DYNAMICALLY_REGISTERED=3623;T.ER_UNABLE_TO_STORE_COLUMN_STATISTICS=3624;T.ER_UNABLE_TO_UPDATE_COLUMN_STATISTICS=3625;T.ER_UNABLE_TO_DROP_COLUMN_STATISTICS=3626;T.ER_UNABLE_TO_BUILD_HISTOGRAM=3627;T.ER_MANDATORY_ROLE=3628;T.ER_MISSING_TABLESPACE_FILE=3629;T.ER_PERSIST_ONLY_ACCESS_DENIED_ERROR=3630;T.ER_CMD_NEED_SUPER=3631;T.ER_PATH_IN_DATADIR=3632;T.ER_CLONE_DDL_IN_PROGRESS=3633;T.ER_CLONE_TOO_MANY_CONCURRENT_CLONES=3634;T.ER_APPLIER_LOG_EVENT_VALIDATION_ERROR=3635;T.ER_CTE_MAX_RECURSION_DEPTH=3636;T.ER_NOT_HINT_UPDATABLE_VARIABLE=3637;T.ER_CREDENTIALS_CONTRADICT_TO_HISTORY=3638;T.ER_WARNING_PASSWORD_HISTORY_CLAUSES_VOID=3639;T.ER_CLIENT_DOES_NOT_SUPPORT=3640;T.ER_I_S_SKIPPED_TABLESPACE=3641;T.ER_TABLESPACE_ENGINE_MISMATCH=3642;T.ER_WRONG_SRID_FOR_COLUMN=3643;T.ER_CANNOT_ALTER_SRID_DUE_TO_INDEX=3644;T.ER_WARN_BINLOG_PARTIAL_UPDATES_DISABLED=3645;T.ER_WARN_BINLOG_V1_ROW_EVENTS_DISABLED=3646;T.ER_WARN_BINLOG_PARTIAL_UPDATES_SUGGESTS_PARTIAL_IMAGES=3647;T.ER_COULD_NOT_APPLY_JSON_DIFF=3648;T.ER_CORRUPTED_JSON_DIFF=3649;T.ER_RESOURCE_GROUP_EXISTS=3650;T.ER_RESOURCE_GROUP_NOT_EXISTS=3651;T.ER_INVALID_VCPU_ID=3652;T.ER_INVALID_VCPU_RANGE=3653;T.ER_INVALID_THREAD_PRIORITY=3654;T.ER_DISALLOWED_OPERATION=3655;T.ER_RESOURCE_GROUP_BUSY=3656;T.ER_RESOURCE_GROUP_DISABLED=3657;T.ER_FEATURE_UNSUPPORTED=3658;T.ER_ATTRIBUTE_IGNORED=3659;T.ER_INVALID_THREAD_ID=3660;T.ER_RESOURCE_GROUP_BIND_FAILED=3661;T.ER_INVALID_USE_OF_FORCE_OPTION=3662;T.ER_GROUP_REPLICATION_COMMAND_FAILURE=3663;T.ER_SDI_OPERATION_FAILED=3664;T.ER_MISSING_JSON_TABLE_VALUE=3665;T.ER_WRONG_JSON_TABLE_VALUE=3666;T.ER_TF_MUST_HAVE_ALIAS=3667;T.ER_TF_FORBIDDEN_JOIN_TYPE=3668;T.ER_JT_VALUE_OUT_OF_RANGE=3669;T.ER_JT_MAX_NESTED_PATH=3670;T.ER_PASSWORD_EXPIRATION_NOT_SUPPORTED_BY_AUTH_METHOD=3671;T.ER_INVALID_GEOJSON_CRS_NOT_TOP_LEVEL=3672;T.ER_BAD_NULL_ERROR_NOT_IGNORED=3673;T.WARN_USELESS_SPATIAL_INDEX=3674;T.ER_DISK_FULL_NOWAIT=3675;T.ER_PARSE_ERROR_IN_DIGEST_FN=3676;T.ER_UNDISCLOSED_PARSE_ERROR_IN_DIGEST_FN=3677;T.ER_SCHEMA_DIR_EXISTS=3678;T.ER_SCHEMA_DIR_MISSING=3679;T.ER_SCHEMA_DIR_CREATE_FAILED=3680;T.ER_SCHEMA_DIR_UNKNOWN=3681;T.ER_ONLY_IMPLEMENTED_FOR_SRID_0_AND_4326=3682;T.ER_BINLOG_EXPIRE_LOG_DAYS_AND_SECS_USED_TOGETHER=3683;T.ER_REGEXP_BUFFER_OVERFLOW=3684;T.ER_REGEXP_ILLEGAL_ARGUMENT=3685;T.ER_REGEXP_INDEX_OUTOFBOUNDS_ERROR=3686;T.ER_REGEXP_INTERNAL_ERROR=3687;T.ER_REGEXP_RULE_SYNTAX=3688;T.ER_REGEXP_BAD_ESCAPE_SEQUENCE=3689;T.ER_REGEXP_UNIMPLEMENTED=3690;T.ER_REGEXP_MISMATCHED_PAREN=3691;T.ER_REGEXP_BAD_INTERVAL=3692;T.ER_REGEXP_MAX_LT_MIN=3693;T.ER_REGEXP_INVALID_BACK_REF=3694;T.ER_REGEXP_LOOK_BEHIND_LIMIT=3695;T.ER_REGEXP_MISSING_CLOSE_BRACKET=3696;T.ER_REGEXP_INVALID_RANGE=3697;T.ER_REGEXP_STACK_OVERFLOW=3698;T.ER_REGEXP_TIME_OUT=3699;T.ER_REGEXP_PATTERN_TOO_BIG=3700;T.ER_CANT_SET_ERROR_LOG_SERVICE=3701;T.ER_EMPTY_PIPELINE_FOR_ERROR_LOG_SERVICE=3702;T.ER_COMPONENT_FILTER_DIAGNOSTICS=3703;T.ER_NOT_IMPLEMENTED_FOR_CARTESIAN_SRS=3704;T.ER_NOT_IMPLEMENTED_FOR_PROJECTED_SRS=3705;T.ER_NONPOSITIVE_RADIUS=3706;T.ER_RESTART_SERVER_FAILED=3707;T.ER_SRS_MISSING_MANDATORY_ATTRIBUTE=3708;T.ER_SRS_MULTIPLE_ATTRIBUTE_DEFINITIONS=3709;T.ER_SRS_NAME_CANT_BE_EMPTY_OR_WHITESPACE=3710;T.ER_SRS_ORGANIZATION_CANT_BE_EMPTY_OR_WHITESPACE=3711;T.ER_SRS_ID_ALREADY_EXISTS=3712;T.ER_WARN_SRS_ID_ALREADY_EXISTS=3713;T.ER_CANT_MODIFY_SRID_0=3714;T.ER_WARN_RESERVED_SRID_RANGE=3715;T.ER_CANT_MODIFY_SRS_USED_BY_COLUMN=3716;T.ER_SRS_INVALID_CHARACTER_IN_ATTRIBUTE=3717;T.ER_SRS_ATTRIBUTE_STRING_TOO_LONG=3718;T.ER_DEPRECATED_UTF8_ALIAS=3719;T.ER_DEPRECATED_NATIONAL=3720;T.ER_INVALID_DEFAULT_UTF8MB4_COLLATION=3721;T.ER_UNABLE_TO_COLLECT_LOG_STATUS=3722;T.ER_RESERVED_TABLESPACE_NAME=3723;T.ER_UNABLE_TO_SET_OPTION=3724;T.ER_REPLICA_POSSIBLY_DIVERGED_AFTER_DDL=3725;T.ER_SRS_NOT_GEOGRAPHIC=3726;T.ER_POLYGON_TOO_LARGE=3727;T.ER_SPATIAL_UNIQUE_INDEX=3728;T.ER_INDEX_TYPE_NOT_SUPPORTED_FOR_SPATIAL_INDEX=3729;T.ER_FK_CANNOT_DROP_PARENT=3730;T.ER_GEOMETRY_PARAM_LONGITUDE_OUT_OF_RANGE=3731;T.ER_GEOMETRY_PARAM_LATITUDE_OUT_OF_RANGE=3732;T.ER_FK_CANNOT_USE_VIRTUAL_COLUMN=3733;T.ER_FK_NO_COLUMN_PARENT=3734;T.ER_CANT_SET_ERROR_SUPPRESSION_LIST=3735;T.ER_SRS_GEOGCS_INVALID_AXES=3736;T.ER_SRS_INVALID_SEMI_MAJOR_AXIS=3737;T.ER_SRS_INVALID_INVERSE_FLATTENING=3738;T.ER_SRS_INVALID_ANGULAR_UNIT=3739;T.ER_SRS_INVALID_PRIME_MERIDIAN=3740;T.ER_TRANSFORM_SOURCE_SRS_NOT_SUPPORTED=3741;T.ER_TRANSFORM_TARGET_SRS_NOT_SUPPORTED=3742;T.ER_TRANSFORM_SOURCE_SRS_MISSING_TOWGS84=3743;T.ER_TRANSFORM_TARGET_SRS_MISSING_TOWGS84=3744;T.ER_TEMP_TABLE_PREVENTS_SWITCH_SESSION_BINLOG_FORMAT=3745;T.ER_TEMP_TABLE_PREVENTS_SWITCH_GLOBAL_BINLOG_FORMAT=3746;T.ER_RUNNING_APPLIER_PREVENTS_SWITCH_GLOBAL_BINLOG_FORMAT=3747;T.ER_CLIENT_GTID_UNSAFE_CREATE_DROP_TEMP_TABLE_IN_TRX_IN_SBR=3748;T.ER_XA_CANT_CREATE_MDL_BACKUP=3749;T.ER_TABLE_WITHOUT_PK=3750;T.ER_WARN_DATA_TRUNCATED_FUNCTIONAL_INDEX=3751;T.ER_WARN_DATA_OUT_OF_RANGE_FUNCTIONAL_INDEX=3752;T.ER_FUNCTIONAL_INDEX_ON_JSON_OR_GEOMETRY_FUNCTION=3753;T.ER_FUNCTIONAL_INDEX_REF_AUTO_INCREMENT=3754;T.ER_CANNOT_DROP_COLUMN_FUNCTIONAL_INDEX=3755;T.ER_FUNCTIONAL_INDEX_PRIMARY_KEY=3756;T.ER_FUNCTIONAL_INDEX_ON_LOB=3757;T.ER_FUNCTIONAL_INDEX_FUNCTION_IS_NOT_ALLOWED=3758;T.ER_FULLTEXT_FUNCTIONAL_INDEX=3759;T.ER_SPATIAL_FUNCTIONAL_INDEX=3760;T.ER_WRONG_KEY_COLUMN_FUNCTIONAL_INDEX=3761;T.ER_FUNCTIONAL_INDEX_ON_FIELD=3762;T.ER_GENERATED_COLUMN_NAMED_FUNCTION_IS_NOT_ALLOWED=3763;T.ER_GENERATED_COLUMN_ROW_VALUE=3764;T.ER_GENERATED_COLUMN_VARIABLES=3765;T.ER_DEPENDENT_BY_DEFAULT_GENERATED_VALUE=3766;T.ER_DEFAULT_VAL_GENERATED_NON_PRIOR=3767;T.ER_DEFAULT_VAL_GENERATED_REF_AUTO_INC=3768;T.ER_DEFAULT_VAL_GENERATED_FUNCTION_IS_NOT_ALLOWED=3769;T.ER_DEFAULT_VAL_GENERATED_NAMED_FUNCTION_IS_NOT_ALLOWED=3770;T.ER_DEFAULT_VAL_GENERATED_ROW_VALUE=3771;T.ER_DEFAULT_VAL_GENERATED_VARIABLES=3772;T.ER_DEFAULT_AS_VAL_GENERATED=3773;T.ER_UNSUPPORTED_ACTION_ON_DEFAULT_VAL_GENERATED=3774;T.ER_GTID_UNSAFE_ALTER_ADD_COL_WITH_DEFAULT_EXPRESSION=3775;T.ER_FK_CANNOT_CHANGE_ENGINE=3776;T.ER_WARN_DEPRECATED_USER_SET_EXPR=3777;T.ER_WARN_DEPRECATED_UTF8MB3_COLLATION=3778;T.ER_WARN_DEPRECATED_NESTED_COMMENT_SYNTAX=3779;T.ER_FK_INCOMPATIBLE_COLUMNS=3780;T.ER_GR_HOLD_WAIT_TIMEOUT=3781;T.ER_GR_HOLD_KILLED=3782;T.ER_GR_HOLD_MEMBER_STATUS_ERROR=3783;T.ER_RPL_ENCRYPTION_FAILED_TO_FETCH_KEY=3784;T.ER_RPL_ENCRYPTION_KEY_NOT_FOUND=3785;T.ER_RPL_ENCRYPTION_KEYRING_INVALID_KEY=3786;T.ER_RPL_ENCRYPTION_HEADER_ERROR=3787;T.ER_RPL_ENCRYPTION_FAILED_TO_ROTATE_LOGS=3788;T.ER_RPL_ENCRYPTION_KEY_EXISTS_UNEXPECTED=3789;T.ER_RPL_ENCRYPTION_FAILED_TO_GENERATE_KEY=3790;T.ER_RPL_ENCRYPTION_FAILED_TO_STORE_KEY=3791;T.ER_RPL_ENCRYPTION_FAILED_TO_REMOVE_KEY=3792;T.ER_RPL_ENCRYPTION_UNABLE_TO_CHANGE_OPTION=3793;T.ER_RPL_ENCRYPTION_MASTER_KEY_RECOVERY_FAILED=3794;T.ER_SLOW_LOG_MODE_IGNORED_WHEN_NOT_LOGGING_TO_FILE=3795;T.ER_GRP_TRX_CONSISTENCY_NOT_ALLOWED=3796;T.ER_GRP_TRX_CONSISTENCY_BEFORE=3797;T.ER_GRP_TRX_CONSISTENCY_AFTER_ON_TRX_BEGIN=3798;T.ER_GRP_TRX_CONSISTENCY_BEGIN_NOT_ALLOWED=3799;T.ER_FUNCTIONAL_INDEX_ROW_VALUE_IS_NOT_ALLOWED=3800;T.ER_RPL_ENCRYPTION_FAILED_TO_ENCRYPT=3801;T.ER_PAGE_TRACKING_NOT_STARTED=3802;T.ER_PAGE_TRACKING_RANGE_NOT_TRACKED=3803;T.ER_PAGE_TRACKING_CANNOT_PURGE=3804;T.ER_RPL_ENCRYPTION_CANNOT_ROTATE_BINLOG_MASTER_KEY=3805;T.ER_BINLOG_MASTER_KEY_RECOVERY_OUT_OF_COMBINATION=3806;T.ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_OPERATE_KEY=3807;T.ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_ROTATE_LOGS=3808;T.ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_REENCRYPT_LOG=3809;T.ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_CLEANUP_UNUSED_KEYS=3810;T.ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_CLEANUP_AUX_KEY=3811;T.ER_NON_BOOLEAN_EXPR_FOR_CHECK_CONSTRAINT=3812;T.ER_COLUMN_CHECK_CONSTRAINT_REFERENCES_OTHER_COLUMN=3813;T.ER_CHECK_CONSTRAINT_NAMED_FUNCTION_IS_NOT_ALLOWED=3814;T.ER_CHECK_CONSTRAINT_FUNCTION_IS_NOT_ALLOWED=3815;T.ER_CHECK_CONSTRAINT_VARIABLES=3816;T.ER_CHECK_CONSTRAINT_ROW_VALUE=3817;T.ER_CHECK_CONSTRAINT_REFERS_AUTO_INCREMENT_COLUMN=3818;T.ER_CHECK_CONSTRAINT_VIOLATED=3819;T.ER_CHECK_CONSTRAINT_REFERS_UNKNOWN_COLUMN=3820;T.ER_CHECK_CONSTRAINT_NOT_FOUND=3821;T.ER_CHECK_CONSTRAINT_DUP_NAME=3822;T.ER_CHECK_CONSTRAINT_CLAUSE_USING_FK_REFER_ACTION_COLUMN=3823;T.WARN_UNENCRYPTED_TABLE_IN_ENCRYPTED_DB=3824;T.ER_INVALID_ENCRYPTION_REQUEST=3825;T.ER_CANNOT_SET_TABLE_ENCRYPTION=3826;T.ER_CANNOT_SET_DATABASE_ENCRYPTION=3827;T.ER_CANNOT_SET_TABLESPACE_ENCRYPTION=3828;T.ER_TABLESPACE_CANNOT_BE_ENCRYPTED=3829;T.ER_TABLESPACE_CANNOT_BE_DECRYPTED=3830;T.ER_TABLESPACE_TYPE_UNKNOWN=3831;T.ER_TARGET_TABLESPACE_UNENCRYPTED=3832;T.ER_CANNOT_USE_ENCRYPTION_CLAUSE=3833;T.ER_INVALID_MULTIPLE_CLAUSES=3834;T.ER_UNSUPPORTED_USE_OF_GRANT_AS=3835;T.ER_UKNOWN_AUTH_ID_OR_ACCESS_DENIED_FOR_GRANT_AS=3836;T.ER_DEPENDENT_BY_FUNCTIONAL_INDEX=3837;T.ER_PLUGIN_NOT_EARLY=3838;T.ER_INNODB_REDO_LOG_ARCHIVE_START_SUBDIR_PATH=3839;T.ER_INNODB_REDO_LOG_ARCHIVE_START_TIMEOUT=3840;T.ER_INNODB_REDO_LOG_ARCHIVE_DIRS_INVALID=3841;T.ER_INNODB_REDO_LOG_ARCHIVE_LABEL_NOT_FOUND=3842;T.ER_INNODB_REDO_LOG_ARCHIVE_DIR_EMPTY=3843;T.ER_INNODB_REDO_LOG_ARCHIVE_NO_SUCH_DIR=3844;T.ER_INNODB_REDO_LOG_ARCHIVE_DIR_CLASH=3845;T.ER_INNODB_REDO_LOG_ARCHIVE_DIR_PERMISSIONS=3846;T.ER_INNODB_REDO_LOG_ARCHIVE_FILE_CREATE=3847;T.ER_INNODB_REDO_LOG_ARCHIVE_ACTIVE=3848;T.ER_INNODB_REDO_LOG_ARCHIVE_INACTIVE=3849;T.ER_INNODB_REDO_LOG_ARCHIVE_FAILED=3850;T.ER_INNODB_REDO_LOG_ARCHIVE_SESSION=3851;T.ER_STD_REGEX_ERROR=3852;T.ER_INVALID_JSON_TYPE=3853;T.ER_CANNOT_CONVERT_STRING=3854;T.ER_DEPENDENT_BY_PARTITION_FUNC=3855;T.ER_WARN_DEPRECATED_FLOAT_AUTO_INCREMENT=3856;T.ER_RPL_CANT_STOP_REPLICA_WHILE_LOCKED_BACKUP=3857;T.ER_WARN_DEPRECATED_FLOAT_DIGITS=3858;T.ER_WARN_DEPRECATED_FLOAT_UNSIGNED=3859;T.ER_WARN_DEPRECATED_INTEGER_DISPLAY_WIDTH=3860;T.ER_WARN_DEPRECATED_ZEROFILL=3861;T.ER_CLONE_DONOR=3862;T.ER_CLONE_PROTOCOL=3863;T.ER_CLONE_DONOR_VERSION=3864;T.ER_CLONE_OS=3865;T.ER_CLONE_PLATFORM=3866;T.ER_CLONE_CHARSET=3867;T.ER_CLONE_CONFIG=3868;T.ER_CLONE_SYS_CONFIG=3869;T.ER_CLONE_PLUGIN_MATCH=3870;T.ER_CLONE_LOOPBACK=3871;T.ER_CLONE_ENCRYPTION=3872;T.ER_CLONE_DISK_SPACE=3873;T.ER_CLONE_IN_PROGRESS=3874;T.ER_CLONE_DISALLOWED=3875;T.ER_CANNOT_GRANT_ROLES_TO_ANONYMOUS_USER=3876;T.ER_SECONDARY_ENGINE_PLUGIN=3877;T.ER_SECOND_PASSWORD_CANNOT_BE_EMPTY=3878;T.ER_DB_ACCESS_DENIED=3879;T.ER_DA_AUTH_ID_WITH_SYSTEM_USER_PRIV_IN_MANDATORY_ROLES=3880;T.ER_DA_RPL_GTID_TABLE_CANNOT_OPEN=3881;T.ER_GEOMETRY_IN_UNKNOWN_LENGTH_UNIT=3882;T.ER_DA_PLUGIN_INSTALL_ERROR=3883;T.ER_NO_SESSION_TEMP=3884;T.ER_DA_UNKNOWN_ERROR_NUMBER=3885;T.ER_COLUMN_CHANGE_SIZE=3886;T.ER_REGEXP_INVALID_CAPTURE_GROUP_NAME=3887;T.ER_DA_SSL_LIBRARY_ERROR=3888;T.ER_SECONDARY_ENGINE=3889;T.ER_SECONDARY_ENGINE_DDL=3890;T.ER_INCORRECT_CURRENT_PASSWORD=3891;T.ER_MISSING_CURRENT_PASSWORD=3892;T.ER_CURRENT_PASSWORD_NOT_REQUIRED=3893;T.ER_PASSWORD_CANNOT_BE_RETAINED_ON_PLUGIN_CHANGE=3894;T.ER_CURRENT_PASSWORD_CANNOT_BE_RETAINED=3895;T.ER_PARTIAL_REVOKES_EXIST=3896;T.ER_CANNOT_GRANT_SYSTEM_PRIV_TO_MANDATORY_ROLE=3897;T.ER_XA_REPLICATION_FILTERS=3898;T.ER_UNSUPPORTED_SQL_MODE=3899;T.ER_REGEXP_INVALID_FLAG=3900;T.ER_PARTIAL_REVOKE_AND_DB_GRANT_BOTH_EXISTS=3901;T.ER_UNIT_NOT_FOUND=3902;T.ER_INVALID_JSON_VALUE_FOR_FUNC_INDEX=3903;T.ER_JSON_VALUE_OUT_OF_RANGE_FOR_FUNC_INDEX=3904;T.ER_EXCEEDED_MV_KEYS_NUM=3905;T.ER_EXCEEDED_MV_KEYS_SPACE=3906;T.ER_FUNCTIONAL_INDEX_DATA_IS_TOO_LONG=3907;T.ER_WRONG_MVI_VALUE=3908;T.ER_WARN_FUNC_INDEX_NOT_APPLICABLE=3909;T.ER_GRP_RPL_UDF_ERROR=3910;T.ER_UPDATE_GTID_PURGED_WITH_GR=3911;T.ER_GROUPING_ON_TIMESTAMP_IN_DST=3912;T.ER_TABLE_NAME_CAUSES_TOO_LONG_PATH=3913;T.ER_AUDIT_LOG_INSUFFICIENT_PRIVILEGE=3914;T.ER_AUDIT_LOG_PASSWORD_HAS_BEEN_COPIED=3915;T.ER_DA_GRP_RPL_STARTED_AUTO_REJOIN=3916;T.ER_SYSVAR_CHANGE_DURING_QUERY=3917;T.ER_GLOBSTAT_CHANGE_DURING_QUERY=3918;T.ER_GRP_RPL_MESSAGE_SERVICE_INIT_FAILURE=3919;T.ER_CHANGE_SOURCE_WRONG_COMPRESSION_ALGORITHM_CLIENT=3920;T.ER_CHANGE_SOURCE_WRONG_COMPRESSION_LEVEL_CLIENT=3921;T.ER_WRONG_COMPRESSION_ALGORITHM_CLIENT=3922;T.ER_WRONG_COMPRESSION_LEVEL_CLIENT=3923;T.ER_CHANGE_SOURCE_WRONG_COMPRESSION_ALGORITHM_LIST_CLIENT=3924;T.ER_CLIENT_PRIVILEGE_CHECKS_USER_CANNOT_BE_ANONYMOUS=3925;T.ER_CLIENT_PRIVILEGE_CHECKS_USER_DOES_NOT_EXIST=3926;T.ER_CLIENT_PRIVILEGE_CHECKS_USER_CORRUPT=3927;T.ER_CLIENT_PRIVILEGE_CHECKS_USER_NEEDS_RPL_APPLIER_PRIV=3928;T.ER_WARN_DA_PRIVILEGE_NOT_REGISTERED=3929;T.ER_CLIENT_KEYRING_UDF_KEY_INVALID=3930;T.ER_CLIENT_KEYRING_UDF_KEY_TYPE_INVALID=3931;T.ER_CLIENT_KEYRING_UDF_KEY_TOO_LONG=3932;T.ER_CLIENT_KEYRING_UDF_KEY_TYPE_TOO_LONG=3933;T.ER_JSON_SCHEMA_VALIDATION_ERROR_WITH_DETAILED_REPORT=3934;T.ER_DA_UDF_INVALID_CHARSET_SPECIFIED=3935;T.ER_DA_UDF_INVALID_CHARSET=3936;T.ER_DA_UDF_INVALID_COLLATION=3937;T.ER_DA_UDF_INVALID_EXTENSION_ARGUMENT_TYPE=3938;T.ER_MULTIPLE_CONSTRAINTS_WITH_SAME_NAME=3939;T.ER_CONSTRAINT_NOT_FOUND=3940;T.ER_ALTER_CONSTRAINT_ENFORCEMENT_NOT_SUPPORTED=3941;T.ER_TABLE_VALUE_CONSTRUCTOR_MUST_HAVE_COLUMNS=3942;T.ER_TABLE_VALUE_CONSTRUCTOR_CANNOT_HAVE_DEFAULT=3943;T.ER_CLIENT_QUERY_FAILURE_INVALID_NON_ROW_FORMAT=3944;T.ER_REQUIRE_ROW_FORMAT_INVALID_VALUE=3945;T.ER_FAILED_TO_DETERMINE_IF_ROLE_IS_MANDATORY=3946;T.ER_FAILED_TO_FETCH_MANDATORY_ROLE_LIST=3947;T.ER_CLIENT_LOCAL_FILES_DISABLED=3948;T.ER_IMP_INCOMPATIBLE_CFG_VERSION=3949;T.ER_DA_OOM=3950;T.ER_DA_UDF_INVALID_ARGUMENT_TO_SET_CHARSET=3951;T.ER_DA_UDF_INVALID_RETURN_TYPE_TO_SET_CHARSET=3952;T.ER_MULTIPLE_INTO_CLAUSES=3953;T.ER_MISPLACED_INTO=3954;T.ER_USER_ACCESS_DENIED_FOR_USER_ACCOUNT_BLOCKED_BY_PASSWORD_LOCK=3955;T.ER_WARN_DEPRECATED_YEAR_UNSIGNED=3956;T.ER_CLONE_NETWORK_PACKET=3957;T.ER_SDI_OPERATION_FAILED_MISSING_RECORD=3958;T.ER_DEPENDENT_BY_CHECK_CONSTRAINT=3959;T.ER_GRP_OPERATION_NOT_ALLOWED_GR_MUST_STOP=3960;T.ER_WARN_DEPRECATED_JSON_TABLE_ON_ERROR_ON_EMPTY=3961;T.ER_WARN_DEPRECATED_INNER_INTO=3962;T.ER_WARN_DEPRECATED_VALUES_FUNCTION_ALWAYS_NULL=3963;T.ER_WARN_DEPRECATED_SQL_CALC_FOUND_ROWS=3964;T.ER_WARN_DEPRECATED_FOUND_ROWS=3965;T.ER_MISSING_JSON_VALUE=3966;T.ER_MULTIPLE_JSON_VALUES=3967;T.ER_HOSTNAME_TOO_LONG=3968;T.ER_WARN_CLIENT_DEPRECATED_PARTITION_PREFIX_KEY=3969;T.ER_GROUP_REPLICATION_USER_EMPTY_MSG=3970;T.ER_GROUP_REPLICATION_USER_MANDATORY_MSG=3971;T.ER_GROUP_REPLICATION_PASSWORD_LENGTH=3972;T.ER_SUBQUERY_TRANSFORM_REJECTED=3973;T.ER_DA_GRP_RPL_RECOVERY_ENDPOINT_FORMAT=3974;T.ER_DA_GRP_RPL_RECOVERY_ENDPOINT_INVALID=3975;T.ER_WRONG_VALUE_FOR_VAR_PLUS_ACTIONABLE_PART=3976;T.ER_STATEMENT_NOT_ALLOWED_AFTER_START_TRANSACTION=3977;T.ER_FOREIGN_KEY_WITH_ATOMIC_CREATE_SELECT=3978;T.ER_NOT_ALLOWED_WITH_START_TRANSACTION=3979;T.ER_INVALID_JSON_ATTRIBUTE=3980;T.ER_ENGINE_ATTRIBUTE_NOT_SUPPORTED=3981;T.ER_INVALID_USER_ATTRIBUTE_JSON=3982;T.ER_INNODB_REDO_DISABLED=3983;T.ER_INNODB_REDO_ARCHIVING_ENABLED=3984;T.ER_MDL_OUT_OF_RESOURCES=3985;T.ER_IMPLICIT_COMPARISON_FOR_JSON=3986;T.ER_FUNCTION_DOES_NOT_SUPPORT_CHARACTER_SET=3987;T.ER_IMPOSSIBLE_STRING_CONVERSION=3988;T.ER_SCHEMA_READ_ONLY=3989;T.ER_RPL_ASYNC_RECONNECT_GTID_MODE_OFF=3990;T.ER_RPL_ASYNC_RECONNECT_AUTO_POSITION_OFF=3991;T.ER_DISABLE_GTID_MODE_REQUIRES_ASYNC_RECONNECT_OFF=3992;T.ER_DISABLE_AUTO_POSITION_REQUIRES_ASYNC_RECONNECT_OFF=3993;T.ER_INVALID_PARAMETER_USE=3994;T.ER_CHARACTER_SET_MISMATCH=3995;T.ER_WARN_VAR_VALUE_CHANGE_NOT_SUPPORTED=3996;T.ER_INVALID_TIME_ZONE_INTERVAL=3997;T.ER_INVALID_CAST=3998;T.ER_HYPERGRAPH_NOT_SUPPORTED_YET=3999;T.ER_WARN_HYPERGRAPH_EXPERIMENTAL=4000;T.ER_DA_NO_ERROR_LOG_PARSER_CONFIGURED=4001;T.ER_DA_ERROR_LOG_TABLE_DISABLED=4002;T.ER_DA_ERROR_LOG_MULTIPLE_FILTERS=4003;T.ER_DA_CANT_OPEN_ERROR_LOG=4004;T.ER_USER_REFERENCED_AS_DEFINER=4005;T.ER_CANNOT_USER_REFERENCED_AS_DEFINER=4006;T.ER_REGEX_NUMBER_TOO_BIG=4007;T.ER_SPVAR_NONINTEGER_TYPE=4008;T.WARN_UNSUPPORTED_ACL_TABLES_READ=4009;T.ER_BINLOG_UNSAFE_ACL_TABLE_READ_IN_DML_DDL=4010;T.ER_STOP_REPLICA_MONITOR_IO_THREAD_TIMEOUT=4011;T.ER_STARTING_REPLICA_MONITOR_IO_THREAD=4012;T.ER_CANT_USE_ANONYMOUS_TO_GTID_WITH_GTID_MODE_NOT_ON=4013;T.ER_CANT_COMBINE_ANONYMOUS_TO_GTID_AND_AUTOPOSITION=4014;T.ER_ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS_REQUIRES_GTID_MODE_ON=4015;T.ER_SQL_REPLICA_SKIP_COUNTER_USED_WITH_GTID_MODE_ON=4016;T.ER_USING_ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS_AS_LOCAL_OR_UUID=4017;T.ER_CANT_SET_ANONYMOUS_TO_GTID_AND_WAIT_UNTIL_SQL_THD_AFTER_GTIDS=4018;T.ER_CANT_SET_SQL_AFTER_OR_BEFORE_GTIDS_WITH_ANONYMOUS_TO_GTID=4019;T.ER_ANONYMOUS_TO_GTID_UUID_SAME_AS_GROUP_NAME=4020;T.ER_CANT_USE_SAME_UUID_AS_GROUP_NAME=4021;T.ER_GRP_RPL_RECOVERY_CHANNEL_STILL_RUNNING=4022;T.ER_INNODB_INVALID_AUTOEXTEND_SIZE_VALUE=4023;T.ER_INNODB_INCOMPATIBLE_WITH_TABLESPACE=4024;T.ER_INNODB_AUTOEXTEND_SIZE_OUT_OF_RANGE=4025;T.ER_CANNOT_USE_AUTOEXTEND_SIZE_CLAUSE=4026;T.ER_ROLE_GRANTED_TO_ITSELF=4027;T.ER_TABLE_MUST_HAVE_A_VISIBLE_COLUMN=4028;T.ER_INNODB_COMPRESSION_FAILURE=4029;T.ER_WARN_ASYNC_CONN_FAILOVER_NETWORK_NAMESPACE=4030;T.ER_CLIENT_INTERACTION_TIMEOUT=4031;T.ER_INVALID_CAST_TO_GEOMETRY=4032;T.ER_INVALID_CAST_POLYGON_RING_DIRECTION=4033;T.ER_GIS_DIFFERENT_SRIDS_AGGREGATION=4034;T.ER_RELOAD_KEYRING_FAILURE=4035;T.ER_SDI_GET_KEYS_INVALID_TABLESPACE=4036;T.ER_CHANGE_RPL_SRC_WRONG_COMPRESSION_ALGORITHM_SIZE=4037;T.ER_WARN_DEPRECATED_TLS_VERSION_FOR_CHANNEL_CLI=4038;T.ER_CANT_USE_SAME_UUID_AS_VIEW_CHANGE_UUID=4039;T.ER_ANONYMOUS_TO_GTID_UUID_SAME_AS_VIEW_CHANGE_UUID=4040;T.ER_GRP_RPL_VIEW_CHANGE_UUID_FAIL_GET_VARIABLE=4041;T.ER_WARN_ADUIT_LOG_MAX_SIZE_AND_PRUNE_SECONDS=4042;T.ER_WARN_ADUIT_LOG_MAX_SIZE_CLOSE_TO_ROTATE_ON_SIZE=4043;T.ER_KERBEROS_CREATE_USER=4044;T.ER_INSTALL_PLUGIN_CONFLICT_CLIENT=4045;T.ER_DA_ERROR_LOG_COMPONENT_FLUSH_FAILED=4046;T.ER_WARN_SQL_AFTER_MTS_GAPS_GAP_NOT_CALCULATED=4047;T.ER_INVALID_ASSIGNMENT_TARGET=4048;T.ER_OPERATION_NOT_ALLOWED_ON_GR_SECONDARY=4049;T.ER_GRP_RPL_FAILOVER_CHANNEL_STATUS_PROPAGATION=4050;T.ER_WARN_AUDIT_LOG_FORMAT_UNIX_TIMESTAMP_ONLY_WHEN_JSON=4051;T.ER_INVALID_MFA_PLUGIN_SPECIFIED=4052;T.ER_IDENTIFIED_BY_UNSUPPORTED=4053;T.ER_INVALID_PLUGIN_FOR_REGISTRATION=4054;T.ER_PLUGIN_REQUIRES_REGISTRATION=4055;T.ER_MFA_METHOD_EXISTS=4056;T.ER_MFA_METHOD_NOT_EXISTS=4057;T.ER_AUTHENTICATION_POLICY_MISMATCH=4058;T.ER_PLUGIN_REGISTRATION_DONE=4059;T.ER_INVALID_USER_FOR_REGISTRATION=4060;T.ER_USER_REGISTRATION_FAILED=4061;T.ER_MFA_METHODS_INVALID_ORDER=4062;T.ER_MFA_METHODS_IDENTICAL=4063;T.ER_INVALID_MFA_OPERATIONS_FOR_PASSWORDLESS_USER=4064;T.ER_CHANGE_REPLICATION_SOURCE_NO_OPTIONS_FOR_GTID_ONLY=4065;T.ER_CHANGE_REP_SOURCE_CANT_DISABLE_REQ_ROW_FORMAT_WITH_GTID_ONLY=4066;T.ER_CHANGE_REP_SOURCE_CANT_DISABLE_AUTO_POSITION_WITH_GTID_ONLY=4067;T.ER_CHANGE_REP_SOURCE_CANT_DISABLE_GTID_ONLY_WITHOUT_POSITIONS=4068;T.ER_CHANGE_REP_SOURCE_CANT_DISABLE_AUTO_POS_WITHOUT_POSITIONS=4069;T.ER_CHANGE_REP_SOURCE_GR_CHANNEL_WITH_GTID_MODE_NOT_ON=4070;T.ER_CANT_USE_GTID_ONLY_WITH_GTID_MODE_NOT_ON=4071;T.ER_WARN_C_DISABLE_GTID_ONLY_WITH_SOURCE_AUTO_POS_INVALID_POS=4072;T.ER_DA_SSL_FIPS_MODE_ERROR=4073;T.ER_VALUE_OUT_OF_RANGE=4074;T.ER_FULLTEXT_WITH_ROLLUP=4075;T.ER_REGEXP_MISSING_RESOURCE=4076;T.ER_WARN_REGEXP_USING_DEFAULT=4077;T.ER_REGEXP_MISSING_FILE=4078;T.ER_WARN_DEPRECATED_COLLATION=4079;T.ER_CONCURRENT_PROCEDURE_USAGE=4080;T.ER_DA_GLOBAL_CONN_LIMIT=4081;T.ER_DA_CONN_LIMIT=4082;T.ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE_INSTANT=4083;T.ER_WARN_SF_UDF_NAME_COLLISION=4084;T.ER_CANNOT_PURGE_BINLOG_WITH_BACKUP_LOCK=4085;T.ER_TOO_MANY_WINDOWS=4086;T.ER_MYSQLBACKUP_CLIENT_MSG=4087;T.ER_COMMENT_CONTAINS_INVALID_STRING=4088;T.ER_DEFINITION_CONTAINS_INVALID_STRING=4089;T.ER_CANT_EXECUTE_COMMAND_WITH_ASSIGNED_GTID_NEXT=4090;T.ER_XA_TEMP_TABLE=4091;T.ER_INNODB_MAX_ROW_VERSION=4092;T.ER_INNODB_INSTANT_ADD_NOT_SUPPORTED_MAX_SIZE=4093;T.ER_OPERATION_NOT_ALLOWED_WHILE_PRIMARY_CHANGE_IS_RUNNING=4094;T.ER_WARN_DEPRECATED_DATETIME_DELIMITER=4095;T.ER_WARN_DEPRECATED_SUPERFLUOUS_DELIMITER=4096;T.ER_CANNOT_PERSIST_SENSITIVE_VARIABLES=4097;T.ER_WARN_CANNOT_SECURELY_PERSIST_SENSITIVE_VARIABLES=4098;T.ER_WARN_TRG_ALREADY_EXISTS=4099;T.ER_IF_NOT_EXISTS_UNSUPPORTED_TRG_EXISTS_ON_DIFFERENT_TABLE=4100;T.ER_IF_NOT_EXISTS_UNSUPPORTED_UDF_NATIVE_FCT_NAME_COLLISION=4101;T.ER_SET_PASSWORD_AUTH_PLUGIN_ERROR=4102;T.ER_REDUCED_DBLWR_FILE_CORRUPTED=4103;T.ER_REDUCED_DBLWR_PAGE_FOUND=4104;T.ER_SRS_INVALID_LATITUDE_OF_ORIGIN=4105;T.ER_SRS_INVALID_LONGITUDE_OF_ORIGIN=4106;T.ER_SRS_UNUSED_PROJ_PARAMETER_PRESENT=4107;T.ER_GIPK_COLUMN_EXISTS=4108;T.ER_GIPK_FAILED_AUTOINC_COLUMN_EXISTS=4109;T.ER_GIPK_COLUMN_ALTER_NOT_ALLOWED=4110;T.ER_DROP_PK_COLUMN_TO_DROP_GIPK=4111;T.ER_CREATE_SELECT_WITH_GIPK_DISALLOWED_IN_SBR=4112;T.ER_DA_EXPIRE_LOGS_DAYS_IGNORED=4113;T.ER_CTE_RECURSIVE_NOT_UNION=4114;T.ER_COMMAND_BACKEND_FAILED_TO_FETCH_SECURITY_CTX=4115;T.ER_COMMAND_SERVICE_BACKEND_FAILED=4116;T.ER_CLIENT_FILE_PRIVILEGE_FOR_REPLICATION_CHECKS=4117;T.ER_GROUP_REPLICATION_FORCE_MEMBERS_COMMAND_FAILURE=4118;T.ER_WARN_DEPRECATED_IDENT=4119;T.ER_INTERSECT_ALL_MAX_DUPLICATES_EXCEEDED=4120;T.ER_TP_QUERY_THRS_PER_GRP_EXCEEDS_TXN_THR_LIMIT=4121;T.ER_BAD_TIMESTAMP_FORMAT=4122;T.ER_SHAPE_PRIDICTION_UDF=4123;T.ER_SRS_INVALID_HEIGHT=4124;T.ER_SRS_INVALID_SCALING=4125;T.ER_SRS_INVALID_ZONE_WIDTH=4126;T.ER_SRS_INVALID_LATITUDE_POLAR_STERE_VAR_A=4127;T.ER_WARN_DEPRECATED_CLIENT_NO_SCHEMA_OPTION=4128;T.ER_TABLE_NOT_EMPTY=4129;T.ER_TABLE_NO_PRIMARY_KEY=4130;T.ER_TABLE_IN_SHARED_TABLESPACE=4131;T.ER_INDEX_OTHER_THAN_PK=4132;T.ER_LOAD_BULK_DATA_UNSORTED=4133;T.ER_BULK_EXECUTOR_ERROR=4134;T.ER_BULK_READER_LIBCURL_INIT_FAILED=4135;T.ER_BULK_READER_LIBCURL_ERROR=4136;T.ER_BULK_READER_SERVER_ERROR=4137;T.ER_BULK_READER_COMMUNICATION_ERROR=4138;T.ER_BULK_LOAD_DATA_FAILED=4139;T.ER_BULK_LOADER_COLUMN_TOO_BIG_FOR_LEFTOVER_BUFFER=4140;T.ER_BULK_LOADER_COMPONENT_ERROR=4141;T.ER_BULK_LOADER_FILE_CONTAINS_LESS_LINES_THAN_IGNORE_CLAUSE=4142;T.ER_BULK_PARSER_MISSING_ENCLOSED_BY=4143;T.ER_BULK_PARSER_ROW_BUFFER_MAX_TOTAL_COLS_EXCEEDED=4144;T.ER_BULK_PARSER_COPY_BUFFER_SIZE_EXCEEDED=4145;T.ER_BULK_PARSER_UNEXPECTED_END_OF_INPUT=4146;T.ER_BULK_PARSER_UNEXPECTED_ROW_TERMINATOR=4147;T.ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_ENDING_ENCLOSED_BY=4148;T.ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_NULL_ESCAPE=4149;T.ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_COLUMN_TERMINATOR=4150;T.ER_BULK_PARSER_INCOMPLETE_ESCAPE_SEQUENCE=4151;T.ER_LOAD_BULK_DATA_FAILED=4152;T.ER_LOAD_BULK_DATA_WRONG_VALUE_FOR_FIELD=4153;T.ER_LOAD_BULK_DATA_WARN_NULL_TO_NOTNULL=4154;T.ER_REQUIRE_TABLE_PRIMARY_KEY_CHECK_GENERATE_WITH_GR=4155;T.ER_CANT_CHANGE_SYS_VAR_IN_READ_ONLY_MODE=4156;T.ER_INNODB_INSTANT_ADD_DROP_NOT_SUPPORTED_MAX_SIZE=4157;T.ER_INNODB_INSTANT_ADD_NOT_SUPPORTED_MAX_FIELDS=4158;T.ER_CANT_SET_PERSISTED=4159;T.ER_INSTALL_COMPONENT_SET_NULL_VALUE=4160;T.ER_INSTALL_COMPONENT_SET_UNUSED_VALUE=4161;T.ER_WARN_DEPRECATED_USER_DEFINED_COLLATIONS=4162;T[1]="EE_CANTCREATEFILE";T[2]="EE_READ";T[3]="EE_WRITE";T[4]="EE_BADCLOSE";T[5]="EE_OUTOFMEMORY";T[6]="EE_DELETE";T[7]="EE_LINK";T[9]="EE_EOFERR";T[10]="EE_CANTLOCK";T[11]="EE_CANTUNLOCK";T[12]="EE_DIR";T[13]="EE_STAT";T[14]="EE_CANT_CHSIZE";T[15]="EE_CANT_OPEN_STREAM";T[16]="EE_GETWD";T[17]="EE_SETWD";T[18]="EE_LINK_WARNING";T[19]="EE_OPEN_WARNING";T[20]="EE_DISK_FULL";T[21]="EE_CANT_MKDIR";T[22]="EE_UNKNOWN_CHARSET";T[23]="EE_OUT_OF_FILERESOURCES";T[24]="EE_CANT_READLINK";T[25]="EE_CANT_SYMLINK";T[26]="EE_REALPATH";T[27]="EE_SYNC";T[28]="EE_UNKNOWN_COLLATION";T[29]="EE_FILENOTFOUND";T[30]="EE_FILE_NOT_CLOSED";T[31]="EE_CHANGE_OWNERSHIP";T[32]="EE_CHANGE_PERMISSIONS";T[33]="EE_CANT_SEEK";T[34]="EE_CAPACITY_EXCEEDED";T[35]="EE_DISK_FULL_WITH_RETRY_MSG";T[36]="EE_FAILED_TO_CREATE_TIMER";T[37]="EE_FAILED_TO_DELETE_TIMER";T[38]="EE_FAILED_TO_CREATE_TIMER_QUEUE";T[39]="EE_FAILED_TO_START_TIMER_NOTIFY_THREAD";T[40]="EE_FAILED_TO_CREATE_TIMER_NOTIFY_THREAD_INTERRUPT_EVENT";T[41]="EE_EXITING_TIMER_NOTIFY_THREAD";T[42]="EE_WIN_LIBRARY_LOAD_FAILED";T[43]="EE_WIN_RUN_TIME_ERROR_CHECK";T[44]="EE_FAILED_TO_DETERMINE_LARGE_PAGE_SIZE";T[45]="EE_FAILED_TO_KILL_ALL_THREADS";T[46]="EE_FAILED_TO_CREATE_IO_COMPLETION_PORT";T[47]="EE_FAILED_TO_OPEN_DEFAULTS_FILE";T[48]="EE_FAILED_TO_HANDLE_DEFAULTS_FILE";T[49]="EE_WRONG_DIRECTIVE_IN_CONFIG_FILE";T[50]="EE_SKIPPING_DIRECTIVE_DUE_TO_MAX_INCLUDE_RECURSION";T[51]="EE_INCORRECT_GRP_DEFINITION_IN_CONFIG_FILE";T[52]="EE_OPTION_WITHOUT_GRP_IN_CONFIG_FILE";T[53]="EE_CONFIG_FILE_PERMISSION_ERROR";T[54]="EE_IGNORE_WORLD_WRITABLE_CONFIG_FILE";T[55]="EE_USING_DISABLED_OPTION";T[56]="EE_USING_DISABLED_SHORT_OPTION";T[57]="EE_USING_PASSWORD_ON_CLI_IS_INSECURE";T[58]="EE_UNKNOWN_SUFFIX_FOR_VARIABLE";T[59]="EE_SSL_ERROR_FROM_FILE";T[60]="EE_SSL_ERROR";T[61]="EE_NET_SEND_ERROR_IN_BOOTSTRAP";T[62]="EE_PACKETS_OUT_OF_ORDER";T[63]="EE_UNKNOWN_PROTOCOL_OPTION";T[64]="EE_FAILED_TO_LOCATE_SERVER_PUBLIC_KEY";T[65]="EE_PUBLIC_KEY_NOT_IN_PEM_FORMAT";T[66]="EE_DEBUG_INFO";T[67]="EE_UNKNOWN_VARIABLE";T[68]="EE_UNKNOWN_OPTION";T[69]="EE_UNKNOWN_SHORT_OPTION";T[70]="EE_OPTION_WITHOUT_ARGUMENT";T[71]="EE_OPTION_REQUIRES_ARGUMENT";T[72]="EE_SHORT_OPTION_REQUIRES_ARGUMENT";T[73]="EE_OPTION_IGNORED_DUE_TO_INVALID_VALUE";T[74]="EE_OPTION_WITH_EMPTY_VALUE";T[75]="EE_FAILED_TO_ASSIGN_MAX_VALUE_TO_OPTION";T[76]="EE_INCORRECT_BOOLEAN_VALUE_FOR_OPTION";T[77]="EE_FAILED_TO_SET_OPTION_VALUE";T[78]="EE_INCORRECT_INT_VALUE_FOR_OPTION";T[79]="EE_INCORRECT_UINT_VALUE_FOR_OPTION";T[80]="EE_ADJUSTED_SIGNED_VALUE_FOR_OPTION";T[81]="EE_ADJUSTED_UNSIGNED_VALUE_FOR_OPTION";T[82]="EE_ADJUSTED_ULONGLONG_VALUE_FOR_OPTION";T[83]="EE_ADJUSTED_DOUBLE_VALUE_FOR_OPTION";T[84]="EE_INVALID_DECIMAL_VALUE_FOR_OPTION";T[85]="EE_COLLATION_PARSER_ERROR";T[86]="EE_FAILED_TO_RESET_BEFORE_PRIMARY_IGNORABLE_CHAR";T[87]="EE_FAILED_TO_RESET_BEFORE_TERTIARY_IGNORABLE_CHAR";T[88]="EE_SHIFT_CHAR_OUT_OF_RANGE";T[89]="EE_RESET_CHAR_OUT_OF_RANGE";T[90]="EE_UNKNOWN_LDML_TAG";T[91]="EE_FAILED_TO_RESET_BEFORE_SECONDARY_IGNORABLE_CHAR";T[92]="EE_FAILED_PROCESSING_DIRECTIVE";T[93]="EE_PTHREAD_KILL_FAILED";T[120]="HA_ERR_KEY_NOT_FOUND";T[121]="HA_ERR_FOUND_DUPP_KEY";T[122]="HA_ERR_INTERNAL_ERROR";T[123]="HA_ERR_RECORD_CHANGED";T[124]="HA_ERR_WRONG_INDEX";T[125]="HA_ERR_ROLLED_BACK";T[126]="HA_ERR_CRASHED";T[127]="HA_ERR_WRONG_IN_RECORD";T[128]="HA_ERR_OUT_OF_MEM";T[130]="HA_ERR_NOT_A_TABLE";T[131]="HA_ERR_WRONG_COMMAND";T[132]="HA_ERR_OLD_FILE";T[133]="HA_ERR_NO_ACTIVE_RECORD";T[134]="HA_ERR_RECORD_DELETED";T[135]="HA_ERR_RECORD_FILE_FULL";T[136]="HA_ERR_INDEX_FILE_FULL";T[137]="HA_ERR_END_OF_FILE";T[138]="HA_ERR_UNSUPPORTED";T[139]="HA_ERR_TOO_BIG_ROW";T[140]="HA_WRONG_CREATE_OPTION";T[141]="HA_ERR_FOUND_DUPP_UNIQUE";T[142]="HA_ERR_UNKNOWN_CHARSET";T[143]="HA_ERR_WRONG_MRG_TABLE_DEF";T[144]="HA_ERR_CRASHED_ON_REPAIR";T[145]="HA_ERR_CRASHED_ON_USAGE";T[146]="HA_ERR_LOCK_WAIT_TIMEOUT";T[147]="HA_ERR_LOCK_TABLE_FULL";T[148]="HA_ERR_READ_ONLY_TRANSACTION";T[149]="HA_ERR_LOCK_DEADLOCK";T[150]="HA_ERR_CANNOT_ADD_FOREIGN";T[151]="HA_ERR_NO_REFERENCED_ROW";T[152]="HA_ERR_ROW_IS_REFERENCED";T[153]="HA_ERR_NO_SAVEPOINT";T[154]="HA_ERR_NON_UNIQUE_BLOCK_SIZE";T[155]="HA_ERR_NO_SUCH_TABLE";T[156]="HA_ERR_TABLE_EXIST";T[157]="HA_ERR_NO_CONNECTION";T[158]="HA_ERR_NULL_IN_SPATIAL";T[159]="HA_ERR_TABLE_DEF_CHANGED";T[160]="HA_ERR_NO_PARTITION_FOUND";T[161]="HA_ERR_RBR_LOGGING_FAILED";T[162]="HA_ERR_DROP_INDEX_FK";T[163]="HA_ERR_FOREIGN_DUPLICATE_KEY";T[164]="HA_ERR_TABLE_NEEDS_UPGRADE";T[165]="HA_ERR_TABLE_READONLY";T[166]="HA_ERR_AUTOINC_READ_FAILED";T[167]="HA_ERR_AUTOINC_ERANGE";T[168]="HA_ERR_GENERIC";T[169]="HA_ERR_RECORD_IS_THE_SAME";T[170]="HA_ERR_LOGGING_IMPOSSIBLE";T[171]="HA_ERR_CORRUPT_EVENT";T[172]="HA_ERR_NEW_FILE";T[173]="HA_ERR_ROWS_EVENT_APPLY";T[174]="HA_ERR_INITIALIZATION";T[175]="HA_ERR_FILE_TOO_SHORT";T[176]="HA_ERR_WRONG_CRC";T[177]="HA_ERR_TOO_MANY_CONCURRENT_TRXS";T[178]="HA_ERR_NOT_IN_LOCK_PARTITIONS";T[179]="HA_ERR_INDEX_COL_TOO_LONG";T[180]="HA_ERR_INDEX_CORRUPT";T[181]="HA_ERR_UNDO_REC_TOO_BIG";T[182]="HA_FTS_INVALID_DOCID";T[183]="HA_ERR_TABLE_IN_FK_CHECK";T[184]="HA_ERR_TABLESPACE_EXISTS";T[185]="HA_ERR_TOO_MANY_FIELDS";T[186]="HA_ERR_ROW_IN_WRONG_PARTITION";T[187]="HA_ERR_INNODB_READ_ONLY";T[188]="HA_ERR_FTS_EXCEED_RESULT_CACHE_LIMIT";T[189]="HA_ERR_TEMP_FILE_WRITE_FAILURE";T[190]="HA_ERR_INNODB_FORCED_RECOVERY";T[191]="HA_ERR_FTS_TOO_MANY_WORDS_IN_PHRASE";T[192]="HA_ERR_FK_DEPTH_EXCEEDED";T[193]="HA_MISSING_CREATE_OPTION";T[194]="HA_ERR_SE_OUT_OF_MEMORY";T[195]="HA_ERR_TABLE_CORRUPT";T[196]="HA_ERR_QUERY_INTERRUPTED";T[197]="HA_ERR_TABLESPACE_MISSING";T[198]="HA_ERR_TABLESPACE_IS_NOT_EMPTY";T[199]="HA_ERR_WRONG_FILE_NAME";T[200]="HA_ERR_NOT_ALLOWED_COMMAND";T[201]="HA_ERR_COMPUTE_FAILED";T[202]="HA_ERR_ROW_FORMAT_CHANGED";T[203]="HA_ERR_NO_WAIT_LOCK";T[204]="HA_ERR_DISK_FULL_NOWAIT";T[205]="HA_ERR_NO_SESSION_TEMP";T[206]="HA_ERR_WRONG_TABLE_NAME";T[207]="HA_ERR_TOO_LONG_PATH";T[208]="HA_ERR_SAMPLING_INIT_FAILED";T[209]="HA_ERR_FTS_TOO_MANY_NESTED_EXP";T[1000]="ER_HASHCHK";T[1001]="ER_NISAMCHK";T[1002]="ER_NO";T[1003]="ER_YES";T[1004]="ER_CANT_CREATE_FILE";T[1005]="ER_CANT_CREATE_TABLE";T[1006]="ER_CANT_CREATE_DB";T[1007]="ER_DB_CREATE_EXISTS";T[1008]="ER_DB_DROP_EXISTS";T[1009]="ER_DB_DROP_DELETE";T[1010]="ER_DB_DROP_RMDIR";T[1011]="ER_CANT_DELETE_FILE";T[1012]="ER_CANT_FIND_SYSTEM_REC";T[1013]="ER_CANT_GET_STAT";T[1014]="ER_CANT_GET_WD";T[1015]="ER_CANT_LOCK";T[1016]="ER_CANT_OPEN_FILE";T[1017]="ER_FILE_NOT_FOUND";T[1018]="ER_CANT_READ_DIR";T[1019]="ER_CANT_SET_WD";T[1020]="ER_CHECKREAD";T[1021]="ER_DISK_FULL";T[1022]="ER_DUP_KEY";T[1023]="ER_ERROR_ON_CLOSE";T[1024]="ER_ERROR_ON_READ";T[1025]="ER_ERROR_ON_RENAME";T[1026]="ER_ERROR_ON_WRITE";T[1027]="ER_FILE_USED";T[1028]="ER_FILSORT_ABORT";T[1029]="ER_FORM_NOT_FOUND";T[1030]="ER_GET_ERRNO";T[1031]="ER_ILLEGAL_HA";T[1032]="ER_KEY_NOT_FOUND";T[1033]="ER_NOT_FORM_FILE";T[1034]="ER_NOT_KEYFILE";T[1035]="ER_OLD_KEYFILE";T[1036]="ER_OPEN_AS_READONLY";T[1037]="ER_OUTOFMEMORY";T[1038]="ER_OUT_OF_SORTMEMORY";T[1039]="ER_UNEXPECTED_EOF";T[1040]="ER_CON_COUNT_ERROR";T[1041]="ER_OUT_OF_RESOURCES";T[1042]="ER_BAD_HOST_ERROR";T[1043]="ER_HANDSHAKE_ERROR";T[1044]="ER_DBACCESS_DENIED_ERROR";T[1045]="ER_ACCESS_DENIED_ERROR";T[1046]="ER_NO_DB_ERROR";T[1047]="ER_UNKNOWN_COM_ERROR";T[1048]="ER_BAD_NULL_ERROR";T[1049]="ER_BAD_DB_ERROR";T[1050]="ER_TABLE_EXISTS_ERROR";T[1051]="ER_BAD_TABLE_ERROR";T[1052]="ER_NON_UNIQ_ERROR";T[1053]="ER_SERVER_SHUTDOWN";T[1054]="ER_BAD_FIELD_ERROR";T[1055]="ER_WRONG_FIELD_WITH_GROUP";T[1056]="ER_WRONG_GROUP_FIELD";T[1057]="ER_WRONG_SUM_SELECT";T[1058]="ER_WRONG_VALUE_COUNT";T[1059]="ER_TOO_LONG_IDENT";T[1060]="ER_DUP_FIELDNAME";T[1061]="ER_DUP_KEYNAME";T[1062]="ER_DUP_ENTRY";T[1063]="ER_WRONG_FIELD_SPEC";T[1064]="ER_PARSE_ERROR";T[1065]="ER_EMPTY_QUERY";T[1066]="ER_NONUNIQ_TABLE";T[1067]="ER_INVALID_DEFAULT";T[1068]="ER_MULTIPLE_PRI_KEY";T[1069]="ER_TOO_MANY_KEYS";T[1070]="ER_TOO_MANY_KEY_PARTS";T[1071]="ER_TOO_LONG_KEY";T[1072]="ER_KEY_COLUMN_DOES_NOT_EXITS";T[1073]="ER_BLOB_USED_AS_KEY";T[1074]="ER_TOO_BIG_FIELDLENGTH";T[1075]="ER_WRONG_AUTO_KEY";T[1076]="ER_READY";T[1077]="ER_NORMAL_SHUTDOWN";T[1078]="ER_GOT_SIGNAL";T[1079]="ER_SHUTDOWN_COMPLETE";T[1080]="ER_FORCING_CLOSE";T[1081]="ER_IPSOCK_ERROR";T[1082]="ER_NO_SUCH_INDEX";T[1083]="ER_WRONG_FIELD_TERMINATORS";T[1084]="ER_BLOBS_AND_NO_TERMINATED";T[1085]="ER_TEXTFILE_NOT_READABLE";T[1086]="ER_FILE_EXISTS_ERROR";T[1087]="ER_LOAD_INFO";T[1088]="ER_ALTER_INFO";T[1089]="ER_WRONG_SUB_KEY";T[1090]="ER_CANT_REMOVE_ALL_FIELDS";T[1091]="ER_CANT_DROP_FIELD_OR_KEY";T[1092]="ER_INSERT_INFO";T[1093]="ER_UPDATE_TABLE_USED";T[1094]="ER_NO_SUCH_THREAD";T[1095]="ER_KILL_DENIED_ERROR";T[1096]="ER_NO_TABLES_USED";T[1097]="ER_TOO_BIG_SET";T[1098]="ER_NO_UNIQUE_LOGFILE";T[1099]="ER_TABLE_NOT_LOCKED_FOR_WRITE";T[1100]="ER_TABLE_NOT_LOCKED";T[1101]="ER_BLOB_CANT_HAVE_DEFAULT";T[1102]="ER_WRONG_DB_NAME";T[1103]="ER_WRONG_TABLE_NAME";T[1104]="ER_TOO_BIG_SELECT";T[1105]="ER_UNKNOWN_ERROR";T[1106]="ER_UNKNOWN_PROCEDURE";T[1107]="ER_WRONG_PARAMCOUNT_TO_PROCEDURE";T[1108]="ER_WRONG_PARAMETERS_TO_PROCEDURE";T[1109]="ER_UNKNOWN_TABLE";T[1110]="ER_FIELD_SPECIFIED_TWICE";T[1111]="ER_INVALID_GROUP_FUNC_USE";T[1112]="ER_UNSUPPORTED_EXTENSION";T[1113]="ER_TABLE_MUST_HAVE_COLUMNS";T[1114]="ER_RECORD_FILE_FULL";T[1115]="ER_UNKNOWN_CHARACTER_SET";T[1116]="ER_TOO_MANY_TABLES";T[1117]="ER_TOO_MANY_FIELDS";T[1118]="ER_TOO_BIG_ROWSIZE";T[1119]="ER_STACK_OVERRUN";T[1120]="ER_WRONG_OUTER_JOIN";T[1121]="ER_NULL_COLUMN_IN_INDEX";T[1122]="ER_CANT_FIND_UDF";T[1123]="ER_CANT_INITIALIZE_UDF";T[1124]="ER_UDF_NO_PATHS";T[1125]="ER_UDF_EXISTS";T[1126]="ER_CANT_OPEN_LIBRARY";T[1127]="ER_CANT_FIND_DL_ENTRY";T[1128]="ER_FUNCTION_NOT_DEFINED";T[1129]="ER_HOST_IS_BLOCKED";T[1130]="ER_HOST_NOT_PRIVILEGED";T[1131]="ER_PASSWORD_ANONYMOUS_USER";T[1132]="ER_PASSWORD_NOT_ALLOWED";T[1133]="ER_PASSWORD_NO_MATCH";T[1134]="ER_UPDATE_INFO";T[1135]="ER_CANT_CREATE_THREAD";T[1136]="ER_WRONG_VALUE_COUNT_ON_ROW";T[1137]="ER_CANT_REOPEN_TABLE";T[1138]="ER_INVALID_USE_OF_NULL";T[1139]="ER_REGEXP_ERROR";T[1140]="ER_MIX_OF_GROUP_FUNC_AND_FIELDS";T[1141]="ER_NONEXISTING_GRANT";T[1142]="ER_TABLEACCESS_DENIED_ERROR";T[1143]="ER_COLUMNACCESS_DENIED_ERROR";T[1144]="ER_ILLEGAL_GRANT_FOR_TABLE";T[1145]="ER_GRANT_WRONG_HOST_OR_USER";T[1146]="ER_NO_SUCH_TABLE";T[1147]="ER_NONEXISTING_TABLE_GRANT";T[1148]="ER_NOT_ALLOWED_COMMAND";T[1149]="ER_SYNTAX_ERROR";T[1150]="ER_UNUSED1";T[1151]="ER_UNUSED2";T[1152]="ER_ABORTING_CONNECTION";T[1153]="ER_NET_PACKET_TOO_LARGE";T[1154]="ER_NET_READ_ERROR_FROM_PIPE";T[1155]="ER_NET_FCNTL_ERROR";T[1156]="ER_NET_PACKETS_OUT_OF_ORDER";T[1157]="ER_NET_UNCOMPRESS_ERROR";T[1158]="ER_NET_READ_ERROR";T[1159]="ER_NET_READ_INTERRUPTED";T[1160]="ER_NET_ERROR_ON_WRITE";T[1161]="ER_NET_WRITE_INTERRUPTED";T[1162]="ER_TOO_LONG_STRING";T[1163]="ER_TABLE_CANT_HANDLE_BLOB";T[1164]="ER_TABLE_CANT_HANDLE_AUTO_INCREMENT";T[1165]="ER_UNUSED3";T[1166]="ER_WRONG_COLUMN_NAME";T[1167]="ER_WRONG_KEY_COLUMN";T[1168]="ER_WRONG_MRG_TABLE";T[1169]="ER_DUP_UNIQUE";T[1170]="ER_BLOB_KEY_WITHOUT_LENGTH";T[1171]="ER_PRIMARY_CANT_HAVE_NULL";T[1172]="ER_TOO_MANY_ROWS";T[1173]="ER_REQUIRES_PRIMARY_KEY";T[1174]="ER_NO_RAID_COMPILED";T[1175]="ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE";T[1176]="ER_KEY_DOES_NOT_EXITS";T[1177]="ER_CHECK_NO_SUCH_TABLE";T[1178]="ER_CHECK_NOT_IMPLEMENTED";T[1179]="ER_CANT_DO_THIS_DURING_AN_TRANSACTION";T[1180]="ER_ERROR_DURING_COMMIT";T[1181]="ER_ERROR_DURING_ROLLBACK";T[1182]="ER_ERROR_DURING_FLUSH_LOGS";T[1183]="ER_ERROR_DURING_CHECKPOINT";T[1184]="ER_NEW_ABORTING_CONNECTION";T[1185]="ER_DUMP_NOT_IMPLEMENTED";T[1186]="ER_FLUSH_MASTER_BINLOG_CLOSED";T[1187]="ER_INDEX_REBUILD";T[1188]="ER_SOURCE";T[1189]="ER_SOURCE_NET_READ";T[1190]="ER_SOURCE_NET_WRITE";T[1191]="ER_FT_MATCHING_KEY_NOT_FOUND";T[1192]="ER_LOCK_OR_ACTIVE_TRANSACTION";T[1193]="ER_UNKNOWN_SYSTEM_VARIABLE";T[1194]="ER_CRASHED_ON_USAGE";T[1195]="ER_CRASHED_ON_REPAIR";T[1196]="ER_WARNING_NOT_COMPLETE_ROLLBACK";T[1197]="ER_TRANS_CACHE_FULL";T[1198]="ER_SLAVE_MUST_STOP";T[1199]="ER_REPLICA_NOT_RUNNING";T[1200]="ER_BAD_REPLICA";T[1201]="ER_CONNECTION_METADATA";T[1202]="ER_REPLICA_THREAD";T[1203]="ER_TOO_MANY_USER_CONNECTIONS";T[1204]="ER_SET_CONSTANTS_ONLY";T[1205]="ER_LOCK_WAIT_TIMEOUT";T[1206]="ER_LOCK_TABLE_FULL";T[1207]="ER_READ_ONLY_TRANSACTION";T[1208]="ER_DROP_DB_WITH_READ_LOCK";T[1209]="ER_CREATE_DB_WITH_READ_LOCK";T[1210]="ER_WRONG_ARGUMENTS";T[1211]="ER_NO_PERMISSION_TO_CREATE_USER";T[1212]="ER_UNION_TABLES_IN_DIFFERENT_DIR";T[1213]="ER_LOCK_DEADLOCK";T[1214]="ER_TABLE_CANT_HANDLE_FT";T[1215]="ER_CANNOT_ADD_FOREIGN";T[1216]="ER_NO_REFERENCED_ROW";T[1217]="ER_ROW_IS_REFERENCED";T[1218]="ER_CONNECT_TO_SOURCE";T[1219]="ER_QUERY_ON_MASTER";T[1220]="ER_ERROR_WHEN_EXECUTING_COMMAND";T[1221]="ER_WRONG_USAGE";T[1222]="ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT";T[1223]="ER_CANT_UPDATE_WITH_READLOCK";T[1224]="ER_MIXING_NOT_ALLOWED";T[1225]="ER_DUP_ARGUMENT";T[1226]="ER_USER_LIMIT_REACHED";T[1227]="ER_SPECIFIC_ACCESS_DENIED_ERROR";T[1228]="ER_LOCAL_VARIABLE";T[1229]="ER_GLOBAL_VARIABLE";T[1230]="ER_NO_DEFAULT";T[1231]="ER_WRONG_VALUE_FOR_VAR";T[1232]="ER_WRONG_TYPE_FOR_VAR";T[1233]="ER_VAR_CANT_BE_READ";T[1234]="ER_CANT_USE_OPTION_HERE";T[1235]="ER_NOT_SUPPORTED_YET";T[1236]="ER_SOURCE_FATAL_ERROR_READING_BINLOG";T[1237]="ER_REPLICA_IGNORED_TABLE";T[1238]="ER_INCORRECT_GLOBAL_LOCAL_VAR";T[1239]="ER_WRONG_FK_DEF";T[1240]="ER_KEY_REF_DO_NOT_MATCH_TABLE_REF";T[1241]="ER_OPERAND_COLUMNS";T[1242]="ER_SUBQUERY_NO_1_ROW";T[1243]="ER_UNKNOWN_STMT_HANDLER";T[1244]="ER_CORRUPT_HELP_DB";T[1245]="ER_CYCLIC_REFERENCE";T[1246]="ER_AUTO_CONVERT";T[1247]="ER_ILLEGAL_REFERENCE";T[1248]="ER_DERIVED_MUST_HAVE_ALIAS";T[1249]="ER_SELECT_REDUCED";T[1250]="ER_TABLENAME_NOT_ALLOWED_HERE";T[1251]="ER_NOT_SUPPORTED_AUTH_MODE";T[1252]="ER_SPATIAL_CANT_HAVE_NULL";T[1253]="ER_COLLATION_CHARSET_MISMATCH";T[1254]="ER_SLAVE_WAS_RUNNING";T[1255]="ER_SLAVE_WAS_NOT_RUNNING";T[1256]="ER_TOO_BIG_FOR_UNCOMPRESS";T[1257]="ER_ZLIB_Z_MEM_ERROR";T[1258]="ER_ZLIB_Z_BUF_ERROR";T[1259]="ER_ZLIB_Z_DATA_ERROR";T[1260]="ER_CUT_VALUE_GROUP_CONCAT";T[1261]="ER_WARN_TOO_FEW_RECORDS";T[1262]="ER_WARN_TOO_MANY_RECORDS";T[1263]="ER_WARN_NULL_TO_NOTNULL";T[1264]="ER_WARN_DATA_OUT_OF_RANGE";T[1265]="WARN_DATA_TRUNCATED";T[1266]="ER_WARN_USING_OTHER_HANDLER";T[1267]="ER_CANT_AGGREGATE_2COLLATIONS";T[1268]="ER_DROP_USER";T[1269]="ER_REVOKE_GRANTS";T[1270]="ER_CANT_AGGREGATE_3COLLATIONS";T[1271]="ER_CANT_AGGREGATE_NCOLLATIONS";T[1272]="ER_VARIABLE_IS_NOT_STRUCT";T[1273]="ER_UNKNOWN_COLLATION";T[1274]="ER_REPLICA_IGNORED_SSL_PARAMS";T[1275]="ER_SERVER_IS_IN_SECURE_AUTH_MODE";T[1276]="ER_WARN_FIELD_RESOLVED";T[1277]="ER_BAD_REPLICA_UNTIL_COND";T[1278]="ER_MISSING_SKIP_REPLICA";T[1279]="ER_UNTIL_COND_IGNORED";T[1280]="ER_WRONG_NAME_FOR_INDEX";T[1281]="ER_WRONG_NAME_FOR_CATALOG";T[1282]="ER_WARN_QC_RESIZE";T[1283]="ER_BAD_FT_COLUMN";T[1284]="ER_UNKNOWN_KEY_CACHE";T[1285]="ER_WARN_HOSTNAME_WONT_WORK";T[1286]="ER_UNKNOWN_STORAGE_ENGINE";T[1287]="ER_WARN_DEPRECATED_SYNTAX";T[1288]="ER_NON_UPDATABLE_TABLE";T[1289]="ER_FEATURE_DISABLED";T[1290]="ER_OPTION_PREVENTS_STATEMENT";T[1291]="ER_DUPLICATED_VALUE_IN_TYPE";T[1292]="ER_TRUNCATED_WRONG_VALUE";T[1293]="ER_TOO_MUCH_AUTO_TIMESTAMP_COLS";T[1294]="ER_INVALID_ON_UPDATE";T[1295]="ER_UNSUPPORTED_PS";T[1296]="ER_GET_ERRMSG";T[1297]="ER_GET_TEMPORARY_ERRMSG";T[1298]="ER_UNKNOWN_TIME_ZONE";T[1299]="ER_WARN_INVALID_TIMESTAMP";T[1300]="ER_INVALID_CHARACTER_STRING";T[1301]="ER_WARN_ALLOWED_PACKET_OVERFLOWED";T[1302]="ER_CONFLICTING_DECLARATIONS";T[1303]="ER_SP_NO_RECURSIVE_CREATE";T[1304]="ER_SP_ALREADY_EXISTS";T[1305]="ER_SP_DOES_NOT_EXIST";T[1306]="ER_SP_DROP_FAILED";T[1307]="ER_SP_STORE_FAILED";T[1308]="ER_SP_LILABEL_MISMATCH";T[1309]="ER_SP_LABEL_REDEFINE";T[1310]="ER_SP_LABEL_MISMATCH";T[1311]="ER_SP_UNINIT_VAR";T[1312]="ER_SP_BADSELECT";T[1313]="ER_SP_BADRETURN";T[1314]="ER_SP_BADSTATEMENT";T[1315]="ER_UPDATE_LOG_DEPRECATED_IGNORED";T[1316]="ER_UPDATE_LOG_DEPRECATED_TRANSLATED";T[1317]="ER_QUERY_INTERRUPTED";T[1318]="ER_SP_WRONG_NO_OF_ARGS";T[1319]="ER_SP_COND_MISMATCH";T[1320]="ER_SP_NORETURN";T[1321]="ER_SP_NORETURNEND";T[1322]="ER_SP_BAD_CURSOR_QUERY";T[1323]="ER_SP_BAD_CURSOR_SELECT";T[1324]="ER_SP_CURSOR_MISMATCH";T[1325]="ER_SP_CURSOR_ALREADY_OPEN";T[1326]="ER_SP_CURSOR_NOT_OPEN";T[1327]="ER_SP_UNDECLARED_VAR";T[1328]="ER_SP_WRONG_NO_OF_FETCH_ARGS";T[1329]="ER_SP_FETCH_NO_DATA";T[1330]="ER_SP_DUP_PARAM";T[1331]="ER_SP_DUP_VAR";T[1332]="ER_SP_DUP_COND";T[1333]="ER_SP_DUP_CURS";T[1334]="ER_SP_CANT_ALTER";T[1335]="ER_SP_SUBSELECT_NYI";T[1336]="ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG";T[1337]="ER_SP_VARCOND_AFTER_CURSHNDLR";T[1338]="ER_SP_CURSOR_AFTER_HANDLER";T[1339]="ER_SP_CASE_NOT_FOUND";T[1340]="ER_FPARSER_TOO_BIG_FILE";T[1341]="ER_FPARSER_BAD_HEADER";T[1342]="ER_FPARSER_EOF_IN_COMMENT";T[1343]="ER_FPARSER_ERROR_IN_PARAMETER";T[1344]="ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER";T[1345]="ER_VIEW_NO_EXPLAIN";T[1346]="ER_FRM_UNKNOWN_TYPE";T[1347]="ER_WRONG_OBJECT";T[1348]="ER_NONUPDATEABLE_COLUMN";T[1349]="ER_VIEW_SELECT_DERIVED";T[1350]="ER_VIEW_SELECT_CLAUSE";T[1351]="ER_VIEW_SELECT_VARIABLE";T[1352]="ER_VIEW_SELECT_TMPTABLE";T[1353]="ER_VIEW_WRONG_LIST";T[1354]="ER_WARN_VIEW_MERGE";T[1355]="ER_WARN_VIEW_WITHOUT_KEY";T[1356]="ER_VIEW_INVALID";T[1357]="ER_SP_NO_DROP_SP";T[1358]="ER_SP_GOTO_IN_HNDLR";T[1359]="ER_TRG_ALREADY_EXISTS";T[1360]="ER_TRG_DOES_NOT_EXIST";T[1361]="ER_TRG_ON_VIEW_OR_TEMP_TABLE";T[1362]="ER_TRG_CANT_CHANGE_ROW";T[1363]="ER_TRG_NO_SUCH_ROW_IN_TRG";T[1364]="ER_NO_DEFAULT_FOR_FIELD";T[1365]="ER_DIVISION_BY_ZERO";T[1366]="ER_TRUNCATED_WRONG_VALUE_FOR_FIELD";T[1367]="ER_ILLEGAL_VALUE_FOR_TYPE";T[1368]="ER_VIEW_NONUPD_CHECK";T[1369]="ER_VIEW_CHECK_FAILED";T[1370]="ER_PROCACCESS_DENIED_ERROR";T[1371]="ER_RELAY_LOG_FAIL";T[1372]="ER_PASSWD_LENGTH";T[1373]="ER_UNKNOWN_TARGET_BINLOG";T[1374]="ER_IO_ERR_LOG_INDEX_READ";T[1375]="ER_BINLOG_PURGE_PROHIBITED";T[1376]="ER_FSEEK_FAIL";T[1377]="ER_BINLOG_PURGE_FATAL_ERR";T[1378]="ER_LOG_IN_USE";T[1379]="ER_LOG_PURGE_UNKNOWN_ERR";T[1380]="ER_RELAY_LOG_INIT";T[1381]="ER_NO_BINARY_LOGGING";T[1382]="ER_RESERVED_SYNTAX";T[1383]="ER_WSAS_FAILED";T[1384]="ER_DIFF_GROUPS_PROC";T[1385]="ER_NO_GROUP_FOR_PROC";T[1386]="ER_ORDER_WITH_PROC";T[1387]="ER_LOGGING_PROHIBIT_CHANGING_OF";T[1388]="ER_NO_FILE_MAPPING";T[1389]="ER_WRONG_MAGIC";T[1390]="ER_PS_MANY_PARAM";T[1391]="ER_KEY_PART_0";T[1392]="ER_VIEW_CHECKSUM";T[1393]="ER_VIEW_MULTIUPDATE";T[1394]="ER_VIEW_NO_INSERT_FIELD_LIST";T[1395]="ER_VIEW_DELETE_MERGE_VIEW";T[1396]="ER_CANNOT_USER";T[1397]="ER_XAER_NOTA";T[1398]="ER_XAER_INVAL";T[1399]="ER_XAER_RMFAIL";T[1400]="ER_XAER_OUTSIDE";T[1401]="ER_XAER_RMERR";T[1402]="ER_XA_RBROLLBACK";T[1403]="ER_NONEXISTING_PROC_GRANT";T[1404]="ER_PROC_AUTO_GRANT_FAIL";T[1405]="ER_PROC_AUTO_REVOKE_FAIL";T[1406]="ER_DATA_TOO_LONG";T[1407]="ER_SP_BAD_SQLSTATE";T[1408]="ER_STARTUP";T[1409]="ER_LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR";T[1410]="ER_CANT_CREATE_USER_WITH_GRANT";T[1411]="ER_WRONG_VALUE_FOR_TYPE";T[1412]="ER_TABLE_DEF_CHANGED";T[1413]="ER_SP_DUP_HANDLER";T[1414]="ER_SP_NOT_VAR_ARG";T[1415]="ER_SP_NO_RETSET";T[1416]="ER_CANT_CREATE_GEOMETRY_OBJECT";T[1417]="ER_FAILED_ROUTINE_BREAK_BINLOG";T[1418]="ER_BINLOG_UNSAFE_ROUTINE";T[1419]="ER_BINLOG_CREATE_ROUTINE_NEED_SUPER";T[1420]="ER_EXEC_STMT_WITH_OPEN_CURSOR";T[1421]="ER_STMT_HAS_NO_OPEN_CURSOR";T[1422]="ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG";T[1423]="ER_NO_DEFAULT_FOR_VIEW_FIELD";T[1424]="ER_SP_NO_RECURSION";T[1425]="ER_TOO_BIG_SCALE";T[1426]="ER_TOO_BIG_PRECISION";T[1427]="ER_M_BIGGER_THAN_D";T[1428]="ER_WRONG_LOCK_OF_SYSTEM_TABLE";T[1429]="ER_CONNECT_TO_FOREIGN_DATA_SOURCE";T[1430]="ER_QUERY_ON_FOREIGN_DATA_SOURCE";T[1431]="ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST";T[1432]="ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE";T[1433]="ER_FOREIGN_DATA_STRING_INVALID";T[1434]="ER_CANT_CREATE_FEDERATED_TABLE";T[1435]="ER_TRG_IN_WRONG_SCHEMA";T[1436]="ER_STACK_OVERRUN_NEED_MORE";T[1437]="ER_TOO_LONG_BODY";T[1438]="ER_WARN_CANT_DROP_DEFAULT_KEYCACHE";T[1439]="ER_TOO_BIG_DISPLAYWIDTH";T[1440]="ER_XAER_DUPID";T[1441]="ER_DATETIME_FUNCTION_OVERFLOW";T[1442]="ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG";T[1443]="ER_VIEW_PREVENT_UPDATE";T[1444]="ER_PS_NO_RECURSION";T[1445]="ER_SP_CANT_SET_AUTOCOMMIT";T[1446]="ER_MALFORMED_DEFINER";T[1447]="ER_VIEW_FRM_NO_USER";T[1448]="ER_VIEW_OTHER_USER";T[1449]="ER_NO_SUCH_USER";T[1450]="ER_FORBID_SCHEMA_CHANGE";T[1451]="ER_ROW_IS_REFERENCED_2";T[1452]="ER_NO_REFERENCED_ROW_2";T[1453]="ER_SP_BAD_VAR_SHADOW";T[1454]="ER_TRG_NO_DEFINER";T[1455]="ER_OLD_FILE_FORMAT";T[1456]="ER_SP_RECURSION_LIMIT";T[1457]="ER_SP_PROC_TABLE_CORRUPT";T[1458]="ER_SP_WRONG_NAME";T[1459]="ER_TABLE_NEEDS_UPGRADE";T[1460]="ER_SP_NO_AGGREGATE";T[1461]="ER_MAX_PREPARED_STMT_COUNT_REACHED";T[1462]="ER_VIEW_RECURSIVE";T[1463]="ER_NON_GROUPING_FIELD_USED";T[1464]="ER_TABLE_CANT_HANDLE_SPKEYS";T[1465]="ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA";T[1466]="ER_REMOVED_SPACES";T[1467]="ER_AUTOINC_READ_FAILED";T[1468]="ER_USERNAME";T[1469]="ER_HOSTNAME";T[1470]="ER_WRONG_STRING_LENGTH";T[1471]="ER_NON_INSERTABLE_TABLE";T[1472]="ER_ADMIN_WRONG_MRG_TABLE";T[1473]="ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT";T[1474]="ER_NAME_BECOMES_EMPTY";T[1475]="ER_AMBIGUOUS_FIELD_TERM";T[1476]="ER_FOREIGN_SERVER_EXISTS";T[1477]="ER_FOREIGN_SERVER_DOESNT_EXIST";T[1478]="ER_ILLEGAL_HA_CREATE_OPTION";T[1479]="ER_PARTITION_REQUIRES_VALUES_ERROR";T[1480]="ER_PARTITION_WRONG_VALUES_ERROR";T[1481]="ER_PARTITION_MAXVALUE_ERROR";T[1482]="ER_PARTITION_SUBPARTITION_ERROR";T[1483]="ER_PARTITION_SUBPART_MIX_ERROR";T[1484]="ER_PARTITION_WRONG_NO_PART_ERROR";T[1485]="ER_PARTITION_WRONG_NO_SUBPART_ERROR";T[1486]="ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR";T[1487]="ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR";T[1488]="ER_FIELD_NOT_FOUND_PART_ERROR";T[1489]="ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR";T[1490]="ER_INCONSISTENT_PARTITION_INFO_ERROR";T[1491]="ER_PARTITION_FUNC_NOT_ALLOWED_ERROR";T[1492]="ER_PARTITIONS_MUST_BE_DEFINED_ERROR";T[1493]="ER_RANGE_NOT_INCREASING_ERROR";T[1494]="ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR";T[1495]="ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR";T[1496]="ER_PARTITION_ENTRY_ERROR";T[1497]="ER_MIX_HANDLER_ERROR";T[1498]="ER_PARTITION_NOT_DEFINED_ERROR";T[1499]="ER_TOO_MANY_PARTITIONS_ERROR";T[1500]="ER_SUBPARTITION_ERROR";T[1501]="ER_CANT_CREATE_HANDLER_FILE";T[1502]="ER_BLOB_FIELD_IN_PART_FUNC_ERROR";T[1503]="ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF";T[1504]="ER_NO_PARTS_ERROR";T[1505]="ER_PARTITION_MGMT_ON_NONPARTITIONED";T[1506]="ER_FOREIGN_KEY_ON_PARTITIONED";T[1507]="ER_DROP_PARTITION_NON_EXISTENT";T[1508]="ER_DROP_LAST_PARTITION";T[1509]="ER_COALESCE_ONLY_ON_HASH_PARTITION";T[1510]="ER_REORG_HASH_ONLY_ON_SAME_NO";T[1511]="ER_REORG_NO_PARAM_ERROR";T[1512]="ER_ONLY_ON_RANGE_LIST_PARTITION";T[1513]="ER_ADD_PARTITION_SUBPART_ERROR";T[1514]="ER_ADD_PARTITION_NO_NEW_PARTITION";T[1515]="ER_COALESCE_PARTITION_NO_PARTITION";T[1516]="ER_REORG_PARTITION_NOT_EXIST";T[1517]="ER_SAME_NAME_PARTITION";T[1518]="ER_NO_BINLOG_ERROR";T[1519]="ER_CONSECUTIVE_REORG_PARTITIONS";T[1520]="ER_REORG_OUTSIDE_RANGE";T[1521]="ER_PARTITION_FUNCTION_FAILURE";T[1522]="ER_PART_STATE_ERROR";T[1523]="ER_LIMITED_PART_RANGE";T[1524]="ER_PLUGIN_IS_NOT_LOADED";T[1525]="ER_WRONG_VALUE";T[1526]="ER_NO_PARTITION_FOR_GIVEN_VALUE";T[1527]="ER_FILEGROUP_OPTION_ONLY_ONCE";T[1528]="ER_CREATE_FILEGROUP_FAILED";T[1529]="ER_DROP_FILEGROUP_FAILED";T[1530]="ER_TABLESPACE_AUTO_EXTEND_ERROR";T[1531]="ER_WRONG_SIZE_NUMBER";T[1532]="ER_SIZE_OVERFLOW_ERROR";T[1533]="ER_ALTER_FILEGROUP_FAILED";T[1534]="ER_BINLOG_ROW_LOGGING_FAILED";T[1535]="ER_BINLOG_ROW_WRONG_TABLE_DEF";T[1536]="ER_BINLOG_ROW_RBR_TO_SBR";T[1537]="ER_EVENT_ALREADY_EXISTS";T[1538]="ER_EVENT_STORE_FAILED";T[1539]="ER_EVENT_DOES_NOT_EXIST";T[1540]="ER_EVENT_CANT_ALTER";T[1541]="ER_EVENT_DROP_FAILED";T[1542]="ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG";T[1543]="ER_EVENT_ENDS_BEFORE_STARTS";T[1544]="ER_EVENT_EXEC_TIME_IN_THE_PAST";T[1545]="ER_EVENT_OPEN_TABLE_FAILED";T[1546]="ER_EVENT_NEITHER_M_EXPR_NOR_M_AT";T[1547]="ER_COL_COUNT_DOESNT_MATCH_CORRUPTED";T[1548]="ER_CANNOT_LOAD_FROM_TABLE";T[1549]="ER_EVENT_CANNOT_DELETE";T[1550]="ER_EVENT_COMPILE_ERROR";T[1551]="ER_EVENT_SAME_NAME";T[1552]="ER_EVENT_DATA_TOO_LONG";T[1553]="ER_DROP_INDEX_FK";T[1554]="ER_WARN_DEPRECATED_SYNTAX_WITH_VER";T[1555]="ER_CANT_WRITE_LOCK_LOG_TABLE";T[1556]="ER_CANT_LOCK_LOG_TABLE";T[1557]="ER_FOREIGN_DUPLICATE_KEY";T[1558]="ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE";T[1559]="ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR";T[1560]="ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT";T[1561]="ER_NDB_CANT_SWITCH_BINLOG_FORMAT";T[1562]="ER_PARTITION_NO_TEMPORARY";T[1563]="ER_PARTITION_CONST_DOMAIN_ERROR";T[1564]="ER_PARTITION_FUNCTION_IS_NOT_ALLOWED";T[1565]="ER_DDL_LOG_ERROR";T[1566]="ER_NULL_IN_VALUES_LESS_THAN";T[1567]="ER_WRONG_PARTITION_NAME";T[1568]="ER_CANT_CHANGE_TX_CHARACTERISTICS";T[1569]="ER_DUP_ENTRY_AUTOINCREMENT_CASE";T[1570]="ER_EVENT_MODIFY_QUEUE_ERROR";T[1571]="ER_EVENT_SET_VAR_ERROR";T[1572]="ER_PARTITION_MERGE_ERROR";T[1573]="ER_CANT_ACTIVATE_LOG";T[1574]="ER_RBR_NOT_AVAILABLE";T[1575]="ER_BASE64_DECODE_ERROR";T[1576]="ER_EVENT_RECURSION_FORBIDDEN";T[1577]="ER_EVENTS_DB_ERROR";T[1578]="ER_ONLY_INTEGERS_ALLOWED";T[1579]="ER_UNSUPORTED_LOG_ENGINE";T[1580]="ER_BAD_LOG_STATEMENT";T[1581]="ER_CANT_RENAME_LOG_TABLE";T[1582]="ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT";T[1583]="ER_WRONG_PARAMETERS_TO_NATIVE_FCT";T[1584]="ER_WRONG_PARAMETERS_TO_STORED_FCT";T[1585]="ER_NATIVE_FCT_NAME_COLLISION";T[1586]="ER_DUP_ENTRY_WITH_KEY_NAME";T[1587]="ER_BINLOG_PURGE_EMFILE";T[1588]="ER_EVENT_CANNOT_CREATE_IN_THE_PAST";T[1589]="ER_EVENT_CANNOT_ALTER_IN_THE_PAST";T[1590]="ER_SLAVE_INCIDENT";T[1591]="ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT";T[1592]="ER_BINLOG_UNSAFE_STATEMENT";T[1593]="ER_BINLOG_FATAL_ERROR";T[1594]="ER_SLAVE_RELAY_LOG_READ_FAILURE";T[1595]="ER_SLAVE_RELAY_LOG_WRITE_FAILURE";T[1596]="ER_SLAVE_CREATE_EVENT_FAILURE";T[1597]="ER_SLAVE_MASTER_COM_FAILURE";T[1598]="ER_BINLOG_LOGGING_IMPOSSIBLE";T[1599]="ER_VIEW_NO_CREATION_CTX";T[1600]="ER_VIEW_INVALID_CREATION_CTX";T[1601]="ER_SR_INVALID_CREATION_CTX";T[1602]="ER_TRG_CORRUPTED_FILE";T[1603]="ER_TRG_NO_CREATION_CTX";T[1604]="ER_TRG_INVALID_CREATION_CTX";T[1605]="ER_EVENT_INVALID_CREATION_CTX";T[1606]="ER_TRG_CANT_OPEN_TABLE";T[1607]="ER_CANT_CREATE_SROUTINE";T[1608]="ER_NEVER_USED";T[1609]="ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT";T[1610]="ER_REPLICA_CORRUPT_EVENT";T[1611]="ER_LOAD_DATA_INVALID_COLUMN";T[1612]="ER_LOG_PURGE_NO_FILE";T[1613]="ER_XA_RBTIMEOUT";T[1614]="ER_XA_RBDEADLOCK";T[1615]="ER_NEED_REPREPARE";T[1616]="ER_DELAYED_NOT_SUPPORTED";T[1617]="WARN_NO_CONNECTION_METADATA";T[1618]="WARN_OPTION_IGNORED";T[1619]="ER_PLUGIN_DELETE_BUILTIN";T[1620]="WARN_PLUGIN_BUSY";T[1621]="ER_VARIABLE_IS_READONLY";T[1622]="ER_WARN_ENGINE_TRANSACTION_ROLLBACK";T[1623]="ER_SLAVE_HEARTBEAT_FAILURE";T[1624]="ER_REPLICA_HEARTBEAT_VALUE_OUT_OF_RANGE";T[1625]="ER_NDB_REPLICATION_SCHEMA_ERROR";T[1626]="ER_CONFLICT_FN_PARSE_ERROR";T[1627]="ER_EXCEPTIONS_WRITE_ERROR";T[1628]="ER_TOO_LONG_TABLE_COMMENT";T[1629]="ER_TOO_LONG_FIELD_COMMENT";T[1630]="ER_FUNC_INEXISTENT_NAME_COLLISION";T[1631]="ER_DATABASE_NAME";T[1632]="ER_TABLE_NAME";T[1633]="ER_PARTITION_NAME";T[1634]="ER_SUBPARTITION_NAME";T[1635]="ER_TEMPORARY_NAME";T[1636]="ER_RENAMED_NAME";T[1637]="ER_TOO_MANY_CONCURRENT_TRXS";T[1638]="WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED";T[1639]="ER_DEBUG_SYNC_TIMEOUT";T[1640]="ER_DEBUG_SYNC_HIT_LIMIT";T[1641]="ER_DUP_SIGNAL_SET";T[1642]="ER_SIGNAL_WARN";T[1643]="ER_SIGNAL_NOT_FOUND";T[1644]="ER_SIGNAL_EXCEPTION";T[1645]="ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER";T[1646]="ER_SIGNAL_BAD_CONDITION_TYPE";T[1647]="WARN_COND_ITEM_TRUNCATED";T[1648]="ER_COND_ITEM_TOO_LONG";T[1649]="ER_UNKNOWN_LOCALE";T[1650]="ER_REPLICA_IGNORE_SERVER_IDS";T[1651]="ER_QUERY_CACHE_DISABLED";T[1652]="ER_SAME_NAME_PARTITION_FIELD";T[1653]="ER_PARTITION_COLUMN_LIST_ERROR";T[1654]="ER_WRONG_TYPE_COLUMN_VALUE_ERROR";T[1655]="ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR";T[1656]="ER_MAXVALUE_IN_VALUES_IN";T[1657]="ER_TOO_MANY_VALUES_ERROR";T[1658]="ER_ROW_SINGLE_PARTITION_FIELD_ERROR";T[1659]="ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD";T[1660]="ER_PARTITION_FIELDS_TOO_LONG";T[1661]="ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE";T[1662]="ER_BINLOG_ROW_MODE_AND_STMT_ENGINE";T[1663]="ER_BINLOG_UNSAFE_AND_STMT_ENGINE";T[1664]="ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE";T[1665]="ER_BINLOG_STMT_MODE_AND_ROW_ENGINE";T[1666]="ER_BINLOG_ROW_INJECTION_AND_STMT_MODE";T[1667]="ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE";T[1668]="ER_BINLOG_UNSAFE_LIMIT";T[1669]="ER_UNUSED4";T[1670]="ER_BINLOG_UNSAFE_SYSTEM_TABLE";T[1671]="ER_BINLOG_UNSAFE_AUTOINC_COLUMNS";T[1672]="ER_BINLOG_UNSAFE_UDF";T[1673]="ER_BINLOG_UNSAFE_SYSTEM_VARIABLE";T[1674]="ER_BINLOG_UNSAFE_SYSTEM_FUNCTION";T[1675]="ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS";T[1676]="ER_MESSAGE_AND_STATEMENT";T[1677]="ER_SLAVE_CONVERSION_FAILED";T[1678]="ER_REPLICA_CANT_CREATE_CONVERSION";T[1679]="ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT";T[1680]="ER_PATH_LENGTH";T[1681]="ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT";T[1682]="ER_WRONG_NATIVE_TABLE_STRUCTURE";T[1683]="ER_WRONG_PERFSCHEMA_USAGE";T[1684]="ER_WARN_I_S_SKIPPED_TABLE";T[1685]="ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT";T[1686]="ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT";T[1687]="ER_SPATIAL_MUST_HAVE_GEOM_COL";T[1688]="ER_TOO_LONG_INDEX_COMMENT";T[1689]="ER_LOCK_ABORTED";T[1690]="ER_DATA_OUT_OF_RANGE";T[1691]="ER_WRONG_SPVAR_TYPE_IN_LIMIT";T[1692]="ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE";T[1693]="ER_BINLOG_UNSAFE_MIXED_STATEMENT";T[1694]="ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SQL_LOG_BIN";T[1695]="ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN";T[1696]="ER_FAILED_READ_FROM_PAR_FILE";T[1697]="ER_VALUES_IS_NOT_INT_TYPE_ERROR";T[1698]="ER_ACCESS_DENIED_NO_PASSWORD_ERROR";T[1699]="ER_SET_PASSWORD_AUTH_PLUGIN";T[1700]="ER_GRANT_PLUGIN_USER_EXISTS";T[1701]="ER_TRUNCATE_ILLEGAL_FK";T[1702]="ER_PLUGIN_IS_PERMANENT";T[1703]="ER_REPLICA_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN";T[1704]="ER_REPLICA_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX";T[1705]="ER_STMT_CACHE_FULL";T[1706]="ER_MULTI_UPDATE_KEY_CONFLICT";T[1707]="ER_TABLE_NEEDS_REBUILD";T[1708]="WARN_OPTION_BELOW_LIMIT";T[1709]="ER_INDEX_COLUMN_TOO_LONG";T[1710]="ER_ERROR_IN_TRIGGER_BODY";T[1711]="ER_ERROR_IN_UNKNOWN_TRIGGER_BODY";T[1712]="ER_INDEX_CORRUPT";T[1713]="ER_UNDO_RECORD_TOO_BIG";T[1714]="ER_BINLOG_UNSAFE_INSERT_IGNORE_SELECT";T[1715]="ER_BINLOG_UNSAFE_INSERT_SELECT_UPDATE";T[1716]="ER_BINLOG_UNSAFE_REPLACE_SELECT";T[1717]="ER_BINLOG_UNSAFE_CREATE_IGNORE_SELECT";T[1718]="ER_BINLOG_UNSAFE_CREATE_REPLACE_SELECT";T[1719]="ER_BINLOG_UNSAFE_UPDATE_IGNORE";T[1720]="ER_PLUGIN_NO_UNINSTALL";T[1721]="ER_PLUGIN_NO_INSTALL";T[1722]="ER_BINLOG_UNSAFE_WRITE_AUTOINC_SELECT";T[1723]="ER_BINLOG_UNSAFE_CREATE_SELECT_AUTOINC";T[1724]="ER_BINLOG_UNSAFE_INSERT_TWO_KEYS";T[1725]="ER_TABLE_IN_FK_CHECK";T[1726]="ER_UNSUPPORTED_ENGINE";T[1727]="ER_BINLOG_UNSAFE_AUTOINC_NOT_FIRST";T[1728]="ER_CANNOT_LOAD_FROM_TABLE_V2";T[1729]="ER_SOURCE_DELAY_VALUE_OUT_OF_RANGE";T[1730]="ER_ONLY_FD_AND_RBR_EVENTS_ALLOWED_IN_BINLOG_STATEMENT";T[1731]="ER_PARTITION_EXCHANGE_DIFFERENT_OPTION";T[1732]="ER_PARTITION_EXCHANGE_PART_TABLE";T[1733]="ER_PARTITION_EXCHANGE_TEMP_TABLE";T[1734]="ER_PARTITION_INSTEAD_OF_SUBPARTITION";T[1735]="ER_UNKNOWN_PARTITION";T[1736]="ER_TABLES_DIFFERENT_METADATA";T[1737]="ER_ROW_DOES_NOT_MATCH_PARTITION";T[1738]="ER_BINLOG_CACHE_SIZE_GREATER_THAN_MAX";T[1739]="ER_WARN_INDEX_NOT_APPLICABLE";T[1740]="ER_PARTITION_EXCHANGE_FOREIGN_KEY";T[1741]="ER_NO_SUCH_KEY_VALUE";T[1742]="ER_RPL_INFO_DATA_TOO_LONG";T[1743]="ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE";T[1744]="ER_BINLOG_READ_EVENT_CHECKSUM_FAILURE";T[1745]="ER_BINLOG_STMT_CACHE_SIZE_GREATER_THAN_MAX";T[1746]="ER_CANT_UPDATE_TABLE_IN_CREATE_TABLE_SELECT";T[1747]="ER_PARTITION_CLAUSE_ON_NONPARTITIONED";T[1748]="ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET";T[1749]="ER_NO_SUCH_PARTITION";T[1750]="ER_CHANGE_RPL_INFO_REPOSITORY_FAILURE";T[1751]="ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_CREATED_TEMP_TABLE";T[1752]="ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_DROPPED_TEMP_TABLE";T[1753]="ER_MTA_FEATURE_IS_NOT_SUPPORTED";T[1754]="ER_MTA_UPDATED_DBS_GREATER_MAX";T[1755]="ER_MTA_CANT_PARALLEL";T[1756]="ER_MTA_INCONSISTENT_DATA";T[1757]="ER_FULLTEXT_NOT_SUPPORTED_WITH_PARTITIONING";T[1758]="ER_DA_INVALID_CONDITION_NUMBER";T[1759]="ER_INSECURE_PLAIN_TEXT";T[1760]="ER_INSECURE_CHANGE_SOURCE";T[1761]="ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO";T[1762]="ER_FOREIGN_DUPLICATE_KEY_WITHOUT_CHILD_INFO";T[1763]="ER_SQLTHREAD_WITH_SECURE_REPLICA";T[1764]="ER_TABLE_HAS_NO_FT";T[1765]="ER_VARIABLE_NOT_SETTABLE_IN_SF_OR_TRIGGER";T[1766]="ER_VARIABLE_NOT_SETTABLE_IN_TRANSACTION";T[1767]="ER_GTID_NEXT_IS_NOT_IN_GTID_NEXT_LIST";T[1768]="ER_CANT_CHANGE_GTID_NEXT_IN_TRANSACTION";T[1769]="ER_SET_STATEMENT_CANNOT_INVOKE_FUNCTION";T[1770]="ER_GTID_NEXT_CANT_BE_AUTOMATIC_IF_GTID_NEXT_LIST_IS_NON_NULL";T[1771]="ER_SKIPPING_LOGGED_TRANSACTION";T[1772]="ER_MALFORMED_GTID_SET_SPECIFICATION";T[1773]="ER_MALFORMED_GTID_SET_ENCODING";T[1774]="ER_MALFORMED_GTID_SPECIFICATION";T[1775]="ER_GNO_EXHAUSTED";T[1776]="ER_BAD_REPLICA_AUTO_POSITION";T[1777]="ER_AUTO_POSITION_REQUIRES_GTID_MODE_NOT_OFF";T[1778]="ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET";T[1779]="ER_GTID_MODE_ON_REQUIRES_ENFORCE_GTID_CONSISTENCY_ON";T[1780]="ER_GTID_MODE_REQUIRES_BINLOG";T[1781]="ER_CANT_SET_GTID_NEXT_TO_GTID_WHEN_GTID_MODE_IS_OFF";T[1782]="ER_CANT_SET_GTID_NEXT_TO_ANONYMOUS_WHEN_GTID_MODE_IS_ON";T[1783]="ER_CANT_SET_GTID_NEXT_LIST_TO_NON_NULL_WHEN_GTID_MODE_IS_OFF";T[1784]="ER_FOUND_GTID_EVENT_WHEN_GTID_MODE_IS_OFF";T[1785]="ER_GTID_UNSAFE_NON_TRANSACTIONAL_TABLE";T[1786]="ER_GTID_UNSAFE_CREATE_SELECT";T[1787]="ER_GTID_UNSAFE_CREATE_DROP_TEMP_TABLE_IN_TRANSACTION";T[1788]="ER_GTID_MODE_CAN_ONLY_CHANGE_ONE_STEP_AT_A_TIME";T[1789]="ER_SOURCE_HAS_PURGED_REQUIRED_GTIDS";T[1790]="ER_CANT_SET_GTID_NEXT_WHEN_OWNING_GTID";T[1791]="ER_UNKNOWN_EXPLAIN_FORMAT";T[1792]="ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION";T[1793]="ER_TOO_LONG_TABLE_PARTITION_COMMENT";T[1794]="ER_REPLICA_CONFIGURATION";T[1795]="ER_INNODB_FT_LIMIT";T[1796]="ER_INNODB_NO_FT_TEMP_TABLE";T[1797]="ER_INNODB_FT_WRONG_DOCID_COLUMN";T[1798]="ER_INNODB_FT_WRONG_DOCID_INDEX";T[1799]="ER_INNODB_ONLINE_LOG_TOO_BIG";T[1800]="ER_UNKNOWN_ALTER_ALGORITHM";T[1801]="ER_UNKNOWN_ALTER_LOCK";T[1802]="ER_MTA_CHANGE_SOURCE_CANT_RUN_WITH_GAPS";T[1803]="ER_MTA_RECOVERY_FAILURE";T[1804]="ER_MTA_RESET_WORKERS";T[1805]="ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2";T[1806]="ER_REPLICA_SILENT_RETRY_TRANSACTION";T[1807]="ER_DISCARD_FK_CHECKS_RUNNING";T[1808]="ER_TABLE_SCHEMA_MISMATCH";T[1809]="ER_TABLE_IN_SYSTEM_TABLESPACE";T[1810]="ER_IO_READ_ERROR";T[1811]="ER_IO_WRITE_ERROR";T[1812]="ER_TABLESPACE_MISSING";T[1813]="ER_TABLESPACE_EXISTS";T[1814]="ER_TABLESPACE_DISCARDED";T[1815]="ER_INTERNAL_ERROR";T[1816]="ER_INNODB_IMPORT_ERROR";T[1817]="ER_INNODB_INDEX_CORRUPT";T[1818]="ER_INVALID_YEAR_COLUMN_LENGTH";T[1819]="ER_NOT_VALID_PASSWORD";T[1820]="ER_MUST_CHANGE_PASSWORD";T[1821]="ER_FK_NO_INDEX_CHILD";T[1822]="ER_FK_NO_INDEX_PARENT";T[1823]="ER_FK_FAIL_ADD_SYSTEM";T[1824]="ER_FK_CANNOT_OPEN_PARENT";T[1825]="ER_FK_INCORRECT_OPTION";T[1826]="ER_FK_DUP_NAME";T[1827]="ER_PASSWORD_FORMAT";T[1828]="ER_FK_COLUMN_CANNOT_DROP";T[1829]="ER_FK_COLUMN_CANNOT_DROP_CHILD";T[1830]="ER_FK_COLUMN_NOT_NULL";T[1831]="ER_DUP_INDEX";T[1832]="ER_FK_COLUMN_CANNOT_CHANGE";T[1833]="ER_FK_COLUMN_CANNOT_CHANGE_CHILD";T[1834]="ER_UNUSED5";T[1835]="ER_MALFORMED_PACKET";T[1836]="ER_READ_ONLY_MODE";T[1837]="ER_GTID_NEXT_TYPE_UNDEFINED_GTID";T[1838]="ER_VARIABLE_NOT_SETTABLE_IN_SP";T[1839]="ER_CANT_SET_GTID_PURGED_WHEN_GTID_MODE_IS_OFF";T[1840]="ER_CANT_SET_GTID_PURGED_WHEN_GTID_EXECUTED_IS_NOT_EMPTY";T[1841]="ER_CANT_SET_GTID_PURGED_WHEN_OWNED_GTIDS_IS_NOT_EMPTY";T[1842]="ER_GTID_PURGED_WAS_CHANGED";T[1843]="ER_GTID_EXECUTED_WAS_CHANGED";T[1844]="ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES";T[1845]="ER_ALTER_OPERATION_NOT_SUPPORTED";T[1846]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON";T[1847]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COPY";T[1848]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_PARTITION";T[1849]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_RENAME";T[1850]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE";T[1851]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_CHECK";T[1852]="ER_UNUSED6";T[1853]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOPK";T[1854]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_AUTOINC";T[1855]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_HIDDEN_FTS";T[1856]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_CHANGE_FTS";T[1857]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FTS";T[1858]="ER_SQL_REPLICA_SKIP_COUNTER_NOT_SETTABLE_IN_GTID_MODE";T[1859]="ER_DUP_UNKNOWN_IN_INDEX";T[1860]="ER_IDENT_CAUSES_TOO_LONG_PATH";T[1861]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOT_NULL";T[1862]="ER_MUST_CHANGE_PASSWORD_LOGIN";T[1863]="ER_ROW_IN_WRONG_PARTITION";T[1864]="ER_MTA_EVENT_BIGGER_PENDING_JOBS_SIZE_MAX";T[1865]="ER_INNODB_NO_FT_USES_PARSER";T[1866]="ER_BINLOG_LOGICAL_CORRUPTION";T[1867]="ER_WARN_PURGE_LOG_IN_USE";T[1868]="ER_WARN_PURGE_LOG_IS_ACTIVE";T[1869]="ER_AUTO_INCREMENT_CONFLICT";T[1870]="WARN_ON_BLOCKHOLE_IN_RBR";T[1871]="ER_REPLICA_CM_INIT_REPOSITORY";T[1872]="ER_REPLICA_AM_INIT_REPOSITORY";T[1873]="ER_ACCESS_DENIED_CHANGE_USER_ERROR";T[1874]="ER_INNODB_READ_ONLY";T[1875]="ER_STOP_REPLICA_SQL_THREAD_TIMEOUT";T[1876]="ER_STOP_REPLICA_IO_THREAD_TIMEOUT";T[1877]="ER_TABLE_CORRUPT";T[1878]="ER_TEMP_FILE_WRITE_FAILURE";T[1879]="ER_INNODB_FT_AUX_NOT_HEX_ID";T[1880]="ER_OLD_TEMPORALS_UPGRADED";T[1881]="ER_INNODB_FORCED_RECOVERY";T[1882]="ER_AES_INVALID_IV";T[1883]="ER_PLUGIN_CANNOT_BE_UNINSTALLED";T[1884]="ER_GTID_UNSAFE_BINLOG_SPLITTABLE_STATEMENT_AND_ASSIGNED_GTID";T[1885]="ER_REPLICA_HAS_MORE_GTIDS_THAN_SOURCE";T[1886]="ER_MISSING_KEY";T[1887]="WARN_NAMED_PIPE_ACCESS_EVERYONE";T[3000]="ER_FILE_CORRUPT";T[3001]="ER_ERROR_ON_SOURCE";T[3002]="ER_INCONSISTENT_ERROR";T[3003]="ER_STORAGE_ENGINE_NOT_LOADED";T[3004]="ER_GET_STACKED_DA_WITHOUT_ACTIVE_HANDLER";T[3005]="ER_WARN_LEGACY_SYNTAX_CONVERTED";T[3006]="ER_BINLOG_UNSAFE_FULLTEXT_PLUGIN";T[3007]="ER_CANNOT_DISCARD_TEMPORARY_TABLE";T[3008]="ER_FK_DEPTH_EXCEEDED";T[3009]="ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE_V2";T[3010]="ER_WARN_TRIGGER_DOESNT_HAVE_CREATED";T[3011]="ER_REFERENCED_TRG_DOES_NOT_EXIST";T[3012]="ER_EXPLAIN_NOT_SUPPORTED";T[3013]="ER_INVALID_FIELD_SIZE";T[3014]="ER_MISSING_HA_CREATE_OPTION";T[3015]="ER_ENGINE_OUT_OF_MEMORY";T[3016]="ER_PASSWORD_EXPIRE_ANONYMOUS_USER";T[3017]="ER_REPLICA_SQL_THREAD_MUST_STOP";T[3018]="ER_NO_FT_MATERIALIZED_SUBQUERY";T[3019]="ER_INNODB_UNDO_LOG_FULL";T[3020]="ER_INVALID_ARGUMENT_FOR_LOGARITHM";T[3021]="ER_REPLICA_CHANNEL_IO_THREAD_MUST_STOP";T[3022]="ER_WARN_OPEN_TEMP_TABLES_MUST_BE_ZERO";T[3023]="ER_WARN_ONLY_SOURCE_LOG_FILE_NO_POS";T[3024]="ER_QUERY_TIMEOUT";T[3025]="ER_NON_RO_SELECT_DISABLE_TIMER";T[3026]="ER_DUP_LIST_ENTRY";T[3027]="ER_SQL_MODE_NO_EFFECT";T[3028]="ER_AGGREGATE_ORDER_FOR_UNION";T[3029]="ER_AGGREGATE_ORDER_NON_AGG_QUERY";T[3030]="ER_REPLICA_WORKER_STOPPED_PREVIOUS_THD_ERROR";T[3031]="ER_DONT_SUPPORT_REPLICA_PRESERVE_COMMIT_ORDER";T[3032]="ER_SERVER_OFFLINE_MODE";T[3033]="ER_GIS_DIFFERENT_SRIDS";T[3034]="ER_GIS_UNSUPPORTED_ARGUMENT";T[3035]="ER_GIS_UNKNOWN_ERROR";T[3036]="ER_GIS_UNKNOWN_EXCEPTION";T[3037]="ER_GIS_INVALID_DATA";T[3038]="ER_BOOST_GEOMETRY_EMPTY_INPUT_EXCEPTION";T[3039]="ER_BOOST_GEOMETRY_CENTROID_EXCEPTION";T[3040]="ER_BOOST_GEOMETRY_OVERLAY_INVALID_INPUT_EXCEPTION";T[3041]="ER_BOOST_GEOMETRY_TURN_INFO_EXCEPTION";T[3042]="ER_BOOST_GEOMETRY_SELF_INTERSECTION_POINT_EXCEPTION";T[3043]="ER_BOOST_GEOMETRY_UNKNOWN_EXCEPTION";T[3044]="ER_STD_BAD_ALLOC_ERROR";T[3045]="ER_STD_DOMAIN_ERROR";T[3046]="ER_STD_LENGTH_ERROR";T[3047]="ER_STD_INVALID_ARGUMENT";T[3048]="ER_STD_OUT_OF_RANGE_ERROR";T[3049]="ER_STD_OVERFLOW_ERROR";T[3050]="ER_STD_RANGE_ERROR";T[3051]="ER_STD_UNDERFLOW_ERROR";T[3052]="ER_STD_LOGIC_ERROR";T[3053]="ER_STD_RUNTIME_ERROR";T[3054]="ER_STD_UNKNOWN_EXCEPTION";T[3055]="ER_GIS_DATA_WRONG_ENDIANESS";T[3056]="ER_CHANGE_SOURCE_PASSWORD_LENGTH";T[3057]="ER_USER_LOCK_WRONG_NAME";T[3058]="ER_USER_LOCK_DEADLOCK";T[3059]="ER_REPLACE_INACCESSIBLE_ROWS";T[3060]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_GIS";T[3061]="ER_ILLEGAL_USER_VAR";T[3062]="ER_GTID_MODE_OFF";T[3063]="ER_UNSUPPORTED_BY_REPLICATION_THREAD";T[3064]="ER_INCORRECT_TYPE";T[3065]="ER_FIELD_IN_ORDER_NOT_SELECT";T[3066]="ER_AGGREGATE_IN_ORDER_NOT_SELECT";T[3067]="ER_INVALID_RPL_WILD_TABLE_FILTER_PATTERN";T[3068]="ER_NET_OK_PACKET_TOO_LARGE";T[3069]="ER_INVALID_JSON_DATA";T[3070]="ER_INVALID_GEOJSON_MISSING_MEMBER";T[3071]="ER_INVALID_GEOJSON_WRONG_TYPE";T[3072]="ER_INVALID_GEOJSON_UNSPECIFIED";T[3073]="ER_DIMENSION_UNSUPPORTED";T[3074]="ER_REPLICA_CHANNEL_DOES_NOT_EXIST";T[3075]="ER_SLAVE_MULTIPLE_CHANNELS_HOST_PORT";T[3076]="ER_REPLICA_CHANNEL_NAME_INVALID_OR_TOO_LONG";T[3077]="ER_REPLICA_NEW_CHANNEL_WRONG_REPOSITORY";T[3078]="ER_SLAVE_CHANNEL_DELETE";T[3079]="ER_REPLICA_MULTIPLE_CHANNELS_CMD";T[3080]="ER_REPLICA_MAX_CHANNELS_EXCEEDED";T[3081]="ER_REPLICA_CHANNEL_MUST_STOP";T[3082]="ER_REPLICA_CHANNEL_NOT_RUNNING";T[3083]="ER_REPLICA_CHANNEL_WAS_RUNNING";T[3084]="ER_REPLICA_CHANNEL_WAS_NOT_RUNNING";T[3085]="ER_REPLICA_CHANNEL_SQL_THREAD_MUST_STOP";T[3086]="ER_REPLICA_CHANNEL_SQL_SKIP_COUNTER";T[3087]="ER_WRONG_FIELD_WITH_GROUP_V2";T[3088]="ER_MIX_OF_GROUP_FUNC_AND_FIELDS_V2";T[3089]="ER_WARN_DEPRECATED_SYSVAR_UPDATE";T[3090]="ER_WARN_DEPRECATED_SQLMODE";T[3091]="ER_CANNOT_LOG_PARTIAL_DROP_DATABASE_WITH_GTID";T[3092]="ER_GROUP_REPLICATION_CONFIGURATION";T[3093]="ER_GROUP_REPLICATION_RUNNING";T[3094]="ER_GROUP_REPLICATION_APPLIER_INIT_ERROR";T[3095]="ER_GROUP_REPLICATION_STOP_APPLIER_THREAD_TIMEOUT";T[3096]="ER_GROUP_REPLICATION_COMMUNICATION_LAYER_SESSION_ERROR";T[3097]="ER_GROUP_REPLICATION_COMMUNICATION_LAYER_JOIN_ERROR";T[3098]="ER_BEFORE_DML_VALIDATION_ERROR";T[3099]="ER_PREVENTS_VARIABLE_WITHOUT_RBR";T[3100]="ER_RUN_HOOK_ERROR";T[3101]="ER_TRANSACTION_ROLLBACK_DURING_COMMIT";T[3102]="ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED";T[3103]="ER_UNSUPPORTED_ALTER_INPLACE_ON_VIRTUAL_COLUMN";T[3104]="ER_WRONG_FK_OPTION_FOR_GENERATED_COLUMN";T[3105]="ER_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN";T[3106]="ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN";T[3107]="ER_GENERATED_COLUMN_NON_PRIOR";T[3108]="ER_DEPENDENT_BY_GENERATED_COLUMN";T[3109]="ER_GENERATED_COLUMN_REF_AUTO_INC";T[3110]="ER_FEATURE_NOT_AVAILABLE";T[3111]="ER_CANT_SET_GTID_MODE";T[3112]="ER_CANT_USE_AUTO_POSITION_WITH_GTID_MODE_OFF";T[3113]="ER_CANT_REPLICATE_ANONYMOUS_WITH_AUTO_POSITION";T[3114]="ER_CANT_REPLICATE_ANONYMOUS_WITH_GTID_MODE_ON";T[3115]="ER_CANT_REPLICATE_GTID_WITH_GTID_MODE_OFF";T[3116]="ER_CANT_ENFORCE_GTID_CONSISTENCY_WITH_ONGOING_GTID_VIOLATING_TX";T[3117]="ER_ENFORCE_GTID_CONSISTENCY_WARN_WITH_ONGOING_GTID_VIOLATING_TX";T[3118]="ER_ACCOUNT_HAS_BEEN_LOCKED";T[3119]="ER_WRONG_TABLESPACE_NAME";T[3120]="ER_TABLESPACE_IS_NOT_EMPTY";T[3121]="ER_WRONG_FILE_NAME";T[3122]="ER_BOOST_GEOMETRY_INCONSISTENT_TURNS_EXCEPTION";T[3123]="ER_WARN_OPTIMIZER_HINT_SYNTAX_ERROR";T[3124]="ER_WARN_BAD_MAX_EXECUTION_TIME";T[3125]="ER_WARN_UNSUPPORTED_MAX_EXECUTION_TIME";T[3126]="ER_WARN_CONFLICTING_HINT";T[3127]="ER_WARN_UNKNOWN_QB_NAME";T[3128]="ER_UNRESOLVED_HINT_NAME";T[3129]="ER_WARN_ON_MODIFYING_GTID_EXECUTED_TABLE";T[3130]="ER_PLUGGABLE_PROTOCOL_COMMAND_NOT_SUPPORTED";T[3131]="ER_LOCKING_SERVICE_WRONG_NAME";T[3132]="ER_LOCKING_SERVICE_DEADLOCK";T[3133]="ER_LOCKING_SERVICE_TIMEOUT";T[3134]="ER_GIS_MAX_POINTS_IN_GEOMETRY_OVERFLOWED";T[3135]="ER_SQL_MODE_MERGED";T[3136]="ER_VTOKEN_PLUGIN_TOKEN_MISMATCH";T[3137]="ER_VTOKEN_PLUGIN_TOKEN_NOT_FOUND";T[3138]="ER_CANT_SET_VARIABLE_WHEN_OWNING_GTID";T[3139]="ER_REPLICA_CHANNEL_OPERATION_NOT_ALLOWED";T[3140]="ER_INVALID_JSON_TEXT";T[3141]="ER_INVALID_JSON_TEXT_IN_PARAM";T[3142]="ER_INVALID_JSON_BINARY_DATA";T[3143]="ER_INVALID_JSON_PATH";T[3144]="ER_INVALID_JSON_CHARSET";T[3145]="ER_INVALID_JSON_CHARSET_IN_FUNCTION";T[3146]="ER_INVALID_TYPE_FOR_JSON";T[3147]="ER_INVALID_CAST_TO_JSON";T[3148]="ER_INVALID_JSON_PATH_CHARSET";T[3149]="ER_INVALID_JSON_PATH_WILDCARD";T[3150]="ER_JSON_VALUE_TOO_BIG";T[3151]="ER_JSON_KEY_TOO_BIG";T[3152]="ER_JSON_USED_AS_KEY";T[3153]="ER_JSON_VACUOUS_PATH";T[3154]="ER_JSON_BAD_ONE_OR_ALL_ARG";T[3155]="ER_NUMERIC_JSON_VALUE_OUT_OF_RANGE";T[3156]="ER_INVALID_JSON_VALUE_FOR_CAST";T[3157]="ER_JSON_DOCUMENT_TOO_DEEP";T[3158]="ER_JSON_DOCUMENT_NULL_KEY";T[3159]="ER_SECURE_TRANSPORT_REQUIRED";T[3160]="ER_NO_SECURE_TRANSPORTS_CONFIGURED";T[3161]="ER_DISABLED_STORAGE_ENGINE";T[3162]="ER_USER_DOES_NOT_EXIST";T[3163]="ER_USER_ALREADY_EXISTS";T[3164]="ER_AUDIT_API_ABORT";T[3165]="ER_INVALID_JSON_PATH_ARRAY_CELL";T[3166]="ER_BUFPOOL_RESIZE_INPROGRESS";T[3167]="ER_FEATURE_DISABLED_SEE_DOC";T[3168]="ER_SERVER_ISNT_AVAILABLE";T[3169]="ER_SESSION_WAS_KILLED";T[3170]="ER_CAPACITY_EXCEEDED";T[3171]="ER_CAPACITY_EXCEEDED_IN_RANGE_OPTIMIZER";T[3172]="ER_TABLE_NEEDS_UPG_PART";T[3173]="ER_CANT_WAIT_FOR_EXECUTED_GTID_SET_WHILE_OWNING_A_GTID";T[3174]="ER_CANNOT_ADD_FOREIGN_BASE_COL_VIRTUAL";T[3175]="ER_CANNOT_CREATE_VIRTUAL_INDEX_CONSTRAINT";T[3176]="ER_ERROR_ON_MODIFYING_GTID_EXECUTED_TABLE";T[3177]="ER_LOCK_REFUSED_BY_ENGINE";T[3178]="ER_UNSUPPORTED_ALTER_ONLINE_ON_VIRTUAL_COLUMN";T[3179]="ER_MASTER_KEY_ROTATION_NOT_SUPPORTED_BY_SE";T[3180]="ER_MASTER_KEY_ROTATION_ERROR_BY_SE";T[3181]="ER_MASTER_KEY_ROTATION_BINLOG_FAILED";T[3182]="ER_MASTER_KEY_ROTATION_SE_UNAVAILABLE";T[3183]="ER_TABLESPACE_CANNOT_ENCRYPT";T[3184]="ER_INVALID_ENCRYPTION_OPTION";T[3185]="ER_CANNOT_FIND_KEY_IN_KEYRING";T[3186]="ER_CAPACITY_EXCEEDED_IN_PARSER";T[3187]="ER_UNSUPPORTED_ALTER_ENCRYPTION_INPLACE";T[3188]="ER_KEYRING_UDF_KEYRING_SERVICE_ERROR";T[3189]="ER_USER_COLUMN_OLD_LENGTH";T[3190]="ER_CANT_RESET_SOURCE";T[3191]="ER_GROUP_REPLICATION_MAX_GROUP_SIZE";T[3192]="ER_CANNOT_ADD_FOREIGN_BASE_COL_STORED";T[3193]="ER_TABLE_REFERENCED";T[3194]="ER_PARTITION_ENGINE_DEPRECATED_FOR_TABLE";T[3195]="ER_WARN_USING_GEOMFROMWKB_TO_SET_SRID_ZERO";T[3196]="ER_WARN_USING_GEOMFROMWKB_TO_SET_SRID";T[3197]="ER_XA_RETRY";T[3198]="ER_KEYRING_AWS_UDF_AWS_KMS_ERROR";T[3199]="ER_BINLOG_UNSAFE_XA";T[3200]="ER_UDF_ERROR";T[3201]="ER_KEYRING_MIGRATION_FAILURE";T[3202]="ER_KEYRING_ACCESS_DENIED_ERROR";T[3203]="ER_KEYRING_MIGRATION_STATUS";T[3204]="ER_PLUGIN_FAILED_TO_OPEN_TABLES";T[3205]="ER_PLUGIN_FAILED_TO_OPEN_TABLE";T[3206]="ER_AUDIT_LOG_NO_KEYRING_PLUGIN_INSTALLED";T[3207]="ER_AUDIT_LOG_ENCRYPTION_PASSWORD_HAS_NOT_BEEN_SET";T[3208]="ER_AUDIT_LOG_COULD_NOT_CREATE_AES_KEY";T[3209]="ER_AUDIT_LOG_ENCRYPTION_PASSWORD_CANNOT_BE_FETCHED";T[3210]="ER_AUDIT_LOG_JSON_FILTERING_NOT_ENABLED";T[3211]="ER_AUDIT_LOG_UDF_INSUFFICIENT_PRIVILEGE";T[3212]="ER_AUDIT_LOG_SUPER_PRIVILEGE_REQUIRED";T[3213]="ER_COULD_NOT_REINITIALIZE_AUDIT_LOG_FILTERS";T[3214]="ER_AUDIT_LOG_UDF_INVALID_ARGUMENT_TYPE";T[3215]="ER_AUDIT_LOG_UDF_INVALID_ARGUMENT_COUNT";T[3216]="ER_AUDIT_LOG_HAS_NOT_BEEN_INSTALLED";T[3217]="ER_AUDIT_LOG_UDF_READ_INVALID_MAX_ARRAY_LENGTH_ARG_TYPE";T[3218]="ER_AUDIT_LOG_UDF_READ_INVALID_MAX_ARRAY_LENGTH_ARG_VALUE";T[3219]="ER_AUDIT_LOG_JSON_FILTER_PARSING_ERROR";T[3220]="ER_AUDIT_LOG_JSON_FILTER_NAME_CANNOT_BE_EMPTY";T[3221]="ER_AUDIT_LOG_JSON_USER_NAME_CANNOT_BE_EMPTY";T[3222]="ER_AUDIT_LOG_JSON_FILTER_DOES_NOT_EXISTS";T[3223]="ER_AUDIT_LOG_USER_FIRST_CHARACTER_MUST_BE_ALPHANUMERIC";T[3224]="ER_AUDIT_LOG_USER_NAME_INVALID_CHARACTER";T[3225]="ER_AUDIT_LOG_HOST_NAME_INVALID_CHARACTER";T[3226]="WARN_DEPRECATED_MAXDB_SQL_MODE_FOR_TIMESTAMP";T[3227]="ER_XA_REPLICATION_FILTERS";T[3228]="ER_CANT_OPEN_ERROR_LOG";T[3229]="ER_GROUPING_ON_TIMESTAMP_IN_DST";T[3230]="ER_CANT_START_SERVER_NAMED_PIPE";T[3231]="ER_WRITE_SET_EXCEEDS_LIMIT";T[3232]="ER_DEPRECATED_TLS_VERSION_SESSION_57";T[3233]="ER_WARN_DEPRECATED_TLS_VERSION_57";T[3234]="ER_WARN_WRONG_NATIVE_TABLE_STRUCTURE";T[3235]="ER_AES_INVALID_KDF_NAME";T[3236]="ER_AES_INVALID_KDF_ITERATIONS";T[3237]="WARN_AES_KEY_SIZE";T[3238]="ER_AES_INVALID_KDF_OPTION_SIZE";T[3500]="ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE";T[3501]="ER_ACL_OPERATION_FAILED";T[3502]="ER_UNSUPPORTED_INDEX_ALGORITHM";T[3503]="ER_NO_SUCH_DB";T[3504]="ER_TOO_BIG_ENUM";T[3505]="ER_TOO_LONG_SET_ENUM_VALUE";T[3506]="ER_INVALID_DD_OBJECT";T[3507]="ER_UPDATING_DD_TABLE";T[3508]="ER_INVALID_DD_OBJECT_ID";T[3509]="ER_INVALID_DD_OBJECT_NAME";T[3510]="ER_TABLESPACE_MISSING_WITH_NAME";T[3511]="ER_TOO_LONG_ROUTINE_COMMENT";T[3512]="ER_SP_LOAD_FAILED";T[3513]="ER_INVALID_BITWISE_OPERANDS_SIZE";T[3514]="ER_INVALID_BITWISE_AGGREGATE_OPERANDS_SIZE";T[3515]="ER_WARN_UNSUPPORTED_HINT";T[3516]="ER_UNEXPECTED_GEOMETRY_TYPE";T[3517]="ER_SRS_PARSE_ERROR";T[3518]="ER_SRS_PROJ_PARAMETER_MISSING";T[3519]="ER_WARN_SRS_NOT_FOUND";T[3520]="ER_SRS_NOT_CARTESIAN";T[3521]="ER_SRS_NOT_CARTESIAN_UNDEFINED";T[3522]="ER_PK_INDEX_CANT_BE_INVISIBLE";T[3523]="ER_UNKNOWN_AUTHID";T[3524]="ER_FAILED_ROLE_GRANT";T[3525]="ER_OPEN_ROLE_TABLES";T[3526]="ER_FAILED_DEFAULT_ROLES";T[3527]="ER_COMPONENTS_NO_SCHEME";T[3528]="ER_COMPONENTS_NO_SCHEME_SERVICE";T[3529]="ER_COMPONENTS_CANT_LOAD";T[3530]="ER_ROLE_NOT_GRANTED";T[3531]="ER_FAILED_REVOKE_ROLE";T[3532]="ER_RENAME_ROLE";T[3533]="ER_COMPONENTS_CANT_ACQUIRE_SERVICE_IMPLEMENTATION";T[3534]="ER_COMPONENTS_CANT_SATISFY_DEPENDENCY";T[3535]="ER_COMPONENTS_LOAD_CANT_REGISTER_SERVICE_IMPLEMENTATION";T[3536]="ER_COMPONENTS_LOAD_CANT_INITIALIZE";T[3537]="ER_COMPONENTS_UNLOAD_NOT_LOADED";T[3538]="ER_COMPONENTS_UNLOAD_CANT_DEINITIALIZE";T[3539]="ER_COMPONENTS_CANT_RELEASE_SERVICE";T[3540]="ER_COMPONENTS_UNLOAD_CANT_UNREGISTER_SERVICE";T[3541]="ER_COMPONENTS_CANT_UNLOAD";T[3542]="ER_WARN_UNLOAD_THE_NOT_PERSISTED";T[3543]="ER_COMPONENT_TABLE_INCORRECT";T[3544]="ER_COMPONENT_MANIPULATE_ROW_FAILED";T[3545]="ER_COMPONENTS_UNLOAD_DUPLICATE_IN_GROUP";T[3546]="ER_CANT_SET_GTID_PURGED_DUE_SETS_CONSTRAINTS";T[3547]="ER_CANNOT_LOCK_USER_MANAGEMENT_CACHES";T[3548]="ER_SRS_NOT_FOUND";T[3549]="ER_VARIABLE_NOT_PERSISTED";T[3550]="ER_IS_QUERY_INVALID_CLAUSE";T[3551]="ER_UNABLE_TO_STORE_STATISTICS";T[3552]="ER_NO_SYSTEM_SCHEMA_ACCESS";T[3553]="ER_NO_SYSTEM_TABLESPACE_ACCESS";T[3554]="ER_NO_SYSTEM_TABLE_ACCESS";T[3555]="ER_NO_SYSTEM_TABLE_ACCESS_FOR_DICTIONARY_TABLE";T[3556]="ER_NO_SYSTEM_TABLE_ACCESS_FOR_SYSTEM_TABLE";T[3557]="ER_NO_SYSTEM_TABLE_ACCESS_FOR_TABLE";T[3558]="ER_INVALID_OPTION_KEY";T[3559]="ER_INVALID_OPTION_VALUE";T[3560]="ER_INVALID_OPTION_KEY_VALUE_PAIR";T[3561]="ER_INVALID_OPTION_START_CHARACTER";T[3562]="ER_INVALID_OPTION_END_CHARACTER";T[3563]="ER_INVALID_OPTION_CHARACTERS";T[3564]="ER_DUPLICATE_OPTION_KEY";T[3565]="ER_WARN_SRS_NOT_FOUND_AXIS_ORDER";T[3566]="ER_NO_ACCESS_TO_NATIVE_FCT";T[3567]="ER_RESET_SOURCE_TO_VALUE_OUT_OF_RANGE";T[3568]="ER_UNRESOLVED_TABLE_LOCK";T[3569]="ER_DUPLICATE_TABLE_LOCK";T[3570]="ER_BINLOG_UNSAFE_SKIP_LOCKED";T[3571]="ER_BINLOG_UNSAFE_NOWAIT";T[3572]="ER_LOCK_NOWAIT";T[3573]="ER_CTE_RECURSIVE_REQUIRES_UNION";T[3574]="ER_CTE_RECURSIVE_REQUIRES_NONRECURSIVE_FIRST";T[3575]="ER_CTE_RECURSIVE_FORBIDS_AGGREGATION";T[3576]="ER_CTE_RECURSIVE_FORBIDDEN_JOIN_ORDER";T[3577]="ER_CTE_RECURSIVE_REQUIRES_SINGLE_REFERENCE";T[3578]="ER_SWITCH_TMP_ENGINE";T[3579]="ER_WINDOW_NO_SUCH_WINDOW";T[3580]="ER_WINDOW_CIRCULARITY_IN_WINDOW_GRAPH";T[3581]="ER_WINDOW_NO_CHILD_PARTITIONING";T[3582]="ER_WINDOW_NO_INHERIT_FRAME";T[3583]="ER_WINDOW_NO_REDEFINE_ORDER_BY";T[3584]="ER_WINDOW_FRAME_START_ILLEGAL";T[3585]="ER_WINDOW_FRAME_END_ILLEGAL";T[3586]="ER_WINDOW_FRAME_ILLEGAL";T[3587]="ER_WINDOW_RANGE_FRAME_ORDER_TYPE";T[3588]="ER_WINDOW_RANGE_FRAME_TEMPORAL_TYPE";T[3589]="ER_WINDOW_RANGE_FRAME_NUMERIC_TYPE";T[3590]="ER_WINDOW_RANGE_BOUND_NOT_CONSTANT";T[3591]="ER_WINDOW_DUPLICATE_NAME";T[3592]="ER_WINDOW_ILLEGAL_ORDER_BY";T[3593]="ER_WINDOW_INVALID_WINDOW_FUNC_USE";T[3594]="ER_WINDOW_INVALID_WINDOW_FUNC_ALIAS_USE";T[3595]="ER_WINDOW_NESTED_WINDOW_FUNC_USE_IN_WINDOW_SPEC";T[3596]="ER_WINDOW_ROWS_INTERVAL_USE";T[3597]="ER_WINDOW_NO_GROUP_ORDER";T[3598]="ER_WINDOW_EXPLAIN_JSON";T[3599]="ER_WINDOW_FUNCTION_IGNORES_FRAME";T[3600]="ER_WL9236_NOW";T[3601]="ER_INVALID_NO_OF_ARGS";T[3602]="ER_FIELD_IN_GROUPING_NOT_GROUP_BY";T[3603]="ER_TOO_LONG_TABLESPACE_COMMENT";T[3604]="ER_ENGINE_CANT_DROP_TABLE";T[3605]="ER_ENGINE_CANT_DROP_MISSING_TABLE";T[3606]="ER_TABLESPACE_DUP_FILENAME";T[3607]="ER_DB_DROP_RMDIR2";T[3608]="ER_IMP_NO_FILES_MATCHED";T[3609]="ER_IMP_SCHEMA_DOES_NOT_EXIST";T[3610]="ER_IMP_TABLE_ALREADY_EXISTS";T[3611]="ER_IMP_INCOMPATIBLE_MYSQLD_VERSION";T[3612]="ER_IMP_INCOMPATIBLE_DD_VERSION";T[3613]="ER_IMP_INCOMPATIBLE_SDI_VERSION";T[3614]="ER_WARN_INVALID_HINT";T[3615]="ER_VAR_DOES_NOT_EXIST";T[3616]="ER_LONGITUDE_OUT_OF_RANGE";T[3617]="ER_LATITUDE_OUT_OF_RANGE";T[3618]="ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS";T[3619]="ER_ILLEGAL_PRIVILEGE_LEVEL";T[3620]="ER_NO_SYSTEM_VIEW_ACCESS";T[3621]="ER_COMPONENT_FILTER_FLABBERGASTED";T[3622]="ER_PART_EXPR_TOO_LONG";T[3623]="ER_UDF_DROP_DYNAMICALLY_REGISTERED";T[3624]="ER_UNABLE_TO_STORE_COLUMN_STATISTICS";T[3625]="ER_UNABLE_TO_UPDATE_COLUMN_STATISTICS";T[3626]="ER_UNABLE_TO_DROP_COLUMN_STATISTICS";T[3627]="ER_UNABLE_TO_BUILD_HISTOGRAM";T[3628]="ER_MANDATORY_ROLE";T[3629]="ER_MISSING_TABLESPACE_FILE";T[3630]="ER_PERSIST_ONLY_ACCESS_DENIED_ERROR";T[3631]="ER_CMD_NEED_SUPER";T[3632]="ER_PATH_IN_DATADIR";T[3633]="ER_CLONE_DDL_IN_PROGRESS";T[3634]="ER_CLONE_TOO_MANY_CONCURRENT_CLONES";T[3635]="ER_APPLIER_LOG_EVENT_VALIDATION_ERROR";T[3636]="ER_CTE_MAX_RECURSION_DEPTH";T[3637]="ER_NOT_HINT_UPDATABLE_VARIABLE";T[3638]="ER_CREDENTIALS_CONTRADICT_TO_HISTORY";T[3639]="ER_WARNING_PASSWORD_HISTORY_CLAUSES_VOID";T[3640]="ER_CLIENT_DOES_NOT_SUPPORT";T[3641]="ER_I_S_SKIPPED_TABLESPACE";T[3642]="ER_TABLESPACE_ENGINE_MISMATCH";T[3643]="ER_WRONG_SRID_FOR_COLUMN";T[3644]="ER_CANNOT_ALTER_SRID_DUE_TO_INDEX";T[3645]="ER_WARN_BINLOG_PARTIAL_UPDATES_DISABLED";T[3646]="ER_WARN_BINLOG_V1_ROW_EVENTS_DISABLED";T[3647]="ER_WARN_BINLOG_PARTIAL_UPDATES_SUGGESTS_PARTIAL_IMAGES";T[3648]="ER_COULD_NOT_APPLY_JSON_DIFF";T[3649]="ER_CORRUPTED_JSON_DIFF";T[3650]="ER_RESOURCE_GROUP_EXISTS";T[3651]="ER_RESOURCE_GROUP_NOT_EXISTS";T[3652]="ER_INVALID_VCPU_ID";T[3653]="ER_INVALID_VCPU_RANGE";T[3654]="ER_INVALID_THREAD_PRIORITY";T[3655]="ER_DISALLOWED_OPERATION";T[3656]="ER_RESOURCE_GROUP_BUSY";T[3657]="ER_RESOURCE_GROUP_DISABLED";T[3658]="ER_FEATURE_UNSUPPORTED";T[3659]="ER_ATTRIBUTE_IGNORED";T[3660]="ER_INVALID_THREAD_ID";T[3661]="ER_RESOURCE_GROUP_BIND_FAILED";T[3662]="ER_INVALID_USE_OF_FORCE_OPTION";T[3663]="ER_GROUP_REPLICATION_COMMAND_FAILURE";T[3664]="ER_SDI_OPERATION_FAILED";T[3665]="ER_MISSING_JSON_TABLE_VALUE";T[3666]="ER_WRONG_JSON_TABLE_VALUE";T[3667]="ER_TF_MUST_HAVE_ALIAS";T[3668]="ER_TF_FORBIDDEN_JOIN_TYPE";T[3669]="ER_JT_VALUE_OUT_OF_RANGE";T[3670]="ER_JT_MAX_NESTED_PATH";T[3671]="ER_PASSWORD_EXPIRATION_NOT_SUPPORTED_BY_AUTH_METHOD";T[3672]="ER_INVALID_GEOJSON_CRS_NOT_TOP_LEVEL";T[3673]="ER_BAD_NULL_ERROR_NOT_IGNORED";T[3674]="WARN_USELESS_SPATIAL_INDEX";T[3675]="ER_DISK_FULL_NOWAIT";T[3676]="ER_PARSE_ERROR_IN_DIGEST_FN";T[3677]="ER_UNDISCLOSED_PARSE_ERROR_IN_DIGEST_FN";T[3678]="ER_SCHEMA_DIR_EXISTS";T[3679]="ER_SCHEMA_DIR_MISSING";T[3680]="ER_SCHEMA_DIR_CREATE_FAILED";T[3681]="ER_SCHEMA_DIR_UNKNOWN";T[3682]="ER_ONLY_IMPLEMENTED_FOR_SRID_0_AND_4326";T[3683]="ER_BINLOG_EXPIRE_LOG_DAYS_AND_SECS_USED_TOGETHER";T[3684]="ER_REGEXP_BUFFER_OVERFLOW";T[3685]="ER_REGEXP_ILLEGAL_ARGUMENT";T[3686]="ER_REGEXP_INDEX_OUTOFBOUNDS_ERROR";T[3687]="ER_REGEXP_INTERNAL_ERROR";T[3688]="ER_REGEXP_RULE_SYNTAX";T[3689]="ER_REGEXP_BAD_ESCAPE_SEQUENCE";T[3690]="ER_REGEXP_UNIMPLEMENTED";T[3691]="ER_REGEXP_MISMATCHED_PAREN";T[3692]="ER_REGEXP_BAD_INTERVAL";T[3693]="ER_REGEXP_MAX_LT_MIN";T[3694]="ER_REGEXP_INVALID_BACK_REF";T[3695]="ER_REGEXP_LOOK_BEHIND_LIMIT";T[3696]="ER_REGEXP_MISSING_CLOSE_BRACKET";T[3697]="ER_REGEXP_INVALID_RANGE";T[3698]="ER_REGEXP_STACK_OVERFLOW";T[3699]="ER_REGEXP_TIME_OUT";T[3700]="ER_REGEXP_PATTERN_TOO_BIG";T[3701]="ER_CANT_SET_ERROR_LOG_SERVICE";T[3702]="ER_EMPTY_PIPELINE_FOR_ERROR_LOG_SERVICE";T[3703]="ER_COMPONENT_FILTER_DIAGNOSTICS";T[3704]="ER_NOT_IMPLEMENTED_FOR_CARTESIAN_SRS";T[3705]="ER_NOT_IMPLEMENTED_FOR_PROJECTED_SRS";T[3706]="ER_NONPOSITIVE_RADIUS";T[3707]="ER_RESTART_SERVER_FAILED";T[3708]="ER_SRS_MISSING_MANDATORY_ATTRIBUTE";T[3709]="ER_SRS_MULTIPLE_ATTRIBUTE_DEFINITIONS";T[3710]="ER_SRS_NAME_CANT_BE_EMPTY_OR_WHITESPACE";T[3711]="ER_SRS_ORGANIZATION_CANT_BE_EMPTY_OR_WHITESPACE";T[3712]="ER_SRS_ID_ALREADY_EXISTS";T[3713]="ER_WARN_SRS_ID_ALREADY_EXISTS";T[3714]="ER_CANT_MODIFY_SRID_0";T[3715]="ER_WARN_RESERVED_SRID_RANGE";T[3716]="ER_CANT_MODIFY_SRS_USED_BY_COLUMN";T[3717]="ER_SRS_INVALID_CHARACTER_IN_ATTRIBUTE";T[3718]="ER_SRS_ATTRIBUTE_STRING_TOO_LONG";T[3719]="ER_DEPRECATED_UTF8_ALIAS";T[3720]="ER_DEPRECATED_NATIONAL";T[3721]="ER_INVALID_DEFAULT_UTF8MB4_COLLATION";T[3722]="ER_UNABLE_TO_COLLECT_LOG_STATUS";T[3723]="ER_RESERVED_TABLESPACE_NAME";T[3724]="ER_UNABLE_TO_SET_OPTION";T[3725]="ER_REPLICA_POSSIBLY_DIVERGED_AFTER_DDL";T[3726]="ER_SRS_NOT_GEOGRAPHIC";T[3727]="ER_POLYGON_TOO_LARGE";T[3728]="ER_SPATIAL_UNIQUE_INDEX";T[3729]="ER_INDEX_TYPE_NOT_SUPPORTED_FOR_SPATIAL_INDEX";T[3730]="ER_FK_CANNOT_DROP_PARENT";T[3731]="ER_GEOMETRY_PARAM_LONGITUDE_OUT_OF_RANGE";T[3732]="ER_GEOMETRY_PARAM_LATITUDE_OUT_OF_RANGE";T[3733]="ER_FK_CANNOT_USE_VIRTUAL_COLUMN";T[3734]="ER_FK_NO_COLUMN_PARENT";T[3735]="ER_CANT_SET_ERROR_SUPPRESSION_LIST";T[3736]="ER_SRS_GEOGCS_INVALID_AXES";T[3737]="ER_SRS_INVALID_SEMI_MAJOR_AXIS";T[3738]="ER_SRS_INVALID_INVERSE_FLATTENING";T[3739]="ER_SRS_INVALID_ANGULAR_UNIT";T[3740]="ER_SRS_INVALID_PRIME_MERIDIAN";T[3741]="ER_TRANSFORM_SOURCE_SRS_NOT_SUPPORTED";T[3742]="ER_TRANSFORM_TARGET_SRS_NOT_SUPPORTED";T[3743]="ER_TRANSFORM_SOURCE_SRS_MISSING_TOWGS84";T[3744]="ER_TRANSFORM_TARGET_SRS_MISSING_TOWGS84";T[3745]="ER_TEMP_TABLE_PREVENTS_SWITCH_SESSION_BINLOG_FORMAT";T[3746]="ER_TEMP_TABLE_PREVENTS_SWITCH_GLOBAL_BINLOG_FORMAT";T[3747]="ER_RUNNING_APPLIER_PREVENTS_SWITCH_GLOBAL_BINLOG_FORMAT";T[3748]="ER_CLIENT_GTID_UNSAFE_CREATE_DROP_TEMP_TABLE_IN_TRX_IN_SBR";T[3749]="ER_XA_CANT_CREATE_MDL_BACKUP";T[3750]="ER_TABLE_WITHOUT_PK";T[3751]="ER_WARN_DATA_TRUNCATED_FUNCTIONAL_INDEX";T[3752]="ER_WARN_DATA_OUT_OF_RANGE_FUNCTIONAL_INDEX";T[3753]="ER_FUNCTIONAL_INDEX_ON_JSON_OR_GEOMETRY_FUNCTION";T[3754]="ER_FUNCTIONAL_INDEX_REF_AUTO_INCREMENT";T[3755]="ER_CANNOT_DROP_COLUMN_FUNCTIONAL_INDEX";T[3756]="ER_FUNCTIONAL_INDEX_PRIMARY_KEY";T[3757]="ER_FUNCTIONAL_INDEX_ON_LOB";T[3758]="ER_FUNCTIONAL_INDEX_FUNCTION_IS_NOT_ALLOWED";T[3759]="ER_FULLTEXT_FUNCTIONAL_INDEX";T[3760]="ER_SPATIAL_FUNCTIONAL_INDEX";T[3761]="ER_WRONG_KEY_COLUMN_FUNCTIONAL_INDEX";T[3762]="ER_FUNCTIONAL_INDEX_ON_FIELD";T[3763]="ER_GENERATED_COLUMN_NAMED_FUNCTION_IS_NOT_ALLOWED";T[3764]="ER_GENERATED_COLUMN_ROW_VALUE";T[3765]="ER_GENERATED_COLUMN_VARIABLES";T[3766]="ER_DEPENDENT_BY_DEFAULT_GENERATED_VALUE";T[3767]="ER_DEFAULT_VAL_GENERATED_NON_PRIOR";T[3768]="ER_DEFAULT_VAL_GENERATED_REF_AUTO_INC";T[3769]="ER_DEFAULT_VAL_GENERATED_FUNCTION_IS_NOT_ALLOWED";T[3770]="ER_DEFAULT_VAL_GENERATED_NAMED_FUNCTION_IS_NOT_ALLOWED";T[3771]="ER_DEFAULT_VAL_GENERATED_ROW_VALUE";T[3772]="ER_DEFAULT_VAL_GENERATED_VARIABLES";T[3773]="ER_DEFAULT_AS_VAL_GENERATED";T[3774]="ER_UNSUPPORTED_ACTION_ON_DEFAULT_VAL_GENERATED";T[3775]="ER_GTID_UNSAFE_ALTER_ADD_COL_WITH_DEFAULT_EXPRESSION";T[3776]="ER_FK_CANNOT_CHANGE_ENGINE";T[3777]="ER_WARN_DEPRECATED_USER_SET_EXPR";T[3778]="ER_WARN_DEPRECATED_UTF8MB3_COLLATION";T[3779]="ER_WARN_DEPRECATED_NESTED_COMMENT_SYNTAX";T[3780]="ER_FK_INCOMPATIBLE_COLUMNS";T[3781]="ER_GR_HOLD_WAIT_TIMEOUT";T[3782]="ER_GR_HOLD_KILLED";T[3783]="ER_GR_HOLD_MEMBER_STATUS_ERROR";T[3784]="ER_RPL_ENCRYPTION_FAILED_TO_FETCH_KEY";T[3785]="ER_RPL_ENCRYPTION_KEY_NOT_FOUND";T[3786]="ER_RPL_ENCRYPTION_KEYRING_INVALID_KEY";T[3787]="ER_RPL_ENCRYPTION_HEADER_ERROR";T[3788]="ER_RPL_ENCRYPTION_FAILED_TO_ROTATE_LOGS";T[3789]="ER_RPL_ENCRYPTION_KEY_EXISTS_UNEXPECTED";T[3790]="ER_RPL_ENCRYPTION_FAILED_TO_GENERATE_KEY";T[3791]="ER_RPL_ENCRYPTION_FAILED_TO_STORE_KEY";T[3792]="ER_RPL_ENCRYPTION_FAILED_TO_REMOVE_KEY";T[3793]="ER_RPL_ENCRYPTION_UNABLE_TO_CHANGE_OPTION";T[3794]="ER_RPL_ENCRYPTION_MASTER_KEY_RECOVERY_FAILED";T[3795]="ER_SLOW_LOG_MODE_IGNORED_WHEN_NOT_LOGGING_TO_FILE";T[3796]="ER_GRP_TRX_CONSISTENCY_NOT_ALLOWED";T[3797]="ER_GRP_TRX_CONSISTENCY_BEFORE";T[3798]="ER_GRP_TRX_CONSISTENCY_AFTER_ON_TRX_BEGIN";T[3799]="ER_GRP_TRX_CONSISTENCY_BEGIN_NOT_ALLOWED";T[3800]="ER_FUNCTIONAL_INDEX_ROW_VALUE_IS_NOT_ALLOWED";T[3801]="ER_RPL_ENCRYPTION_FAILED_TO_ENCRYPT";T[3802]="ER_PAGE_TRACKING_NOT_STARTED";T[3803]="ER_PAGE_TRACKING_RANGE_NOT_TRACKED";T[3804]="ER_PAGE_TRACKING_CANNOT_PURGE";T[3805]="ER_RPL_ENCRYPTION_CANNOT_ROTATE_BINLOG_MASTER_KEY";T[3806]="ER_BINLOG_MASTER_KEY_RECOVERY_OUT_OF_COMBINATION";T[3807]="ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_OPERATE_KEY";T[3808]="ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_ROTATE_LOGS";T[3809]="ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_REENCRYPT_LOG";T[3810]="ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_CLEANUP_UNUSED_KEYS";T[3811]="ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_CLEANUP_AUX_KEY";T[3812]="ER_NON_BOOLEAN_EXPR_FOR_CHECK_CONSTRAINT";T[3813]="ER_COLUMN_CHECK_CONSTRAINT_REFERENCES_OTHER_COLUMN";T[3814]="ER_CHECK_CONSTRAINT_NAMED_FUNCTION_IS_NOT_ALLOWED";T[3815]="ER_CHECK_CONSTRAINT_FUNCTION_IS_NOT_ALLOWED";T[3816]="ER_CHECK_CONSTRAINT_VARIABLES";T[3817]="ER_CHECK_CONSTRAINT_ROW_VALUE";T[3818]="ER_CHECK_CONSTRAINT_REFERS_AUTO_INCREMENT_COLUMN";T[3819]="ER_CHECK_CONSTRAINT_VIOLATED";T[3820]="ER_CHECK_CONSTRAINT_REFERS_UNKNOWN_COLUMN";T[3821]="ER_CHECK_CONSTRAINT_NOT_FOUND";T[3822]="ER_CHECK_CONSTRAINT_DUP_NAME";T[3823]="ER_CHECK_CONSTRAINT_CLAUSE_USING_FK_REFER_ACTION_COLUMN";T[3824]="WARN_UNENCRYPTED_TABLE_IN_ENCRYPTED_DB";T[3825]="ER_INVALID_ENCRYPTION_REQUEST";T[3826]="ER_CANNOT_SET_TABLE_ENCRYPTION";T[3827]="ER_CANNOT_SET_DATABASE_ENCRYPTION";T[3828]="ER_CANNOT_SET_TABLESPACE_ENCRYPTION";T[3829]="ER_TABLESPACE_CANNOT_BE_ENCRYPTED";T[3830]="ER_TABLESPACE_CANNOT_BE_DECRYPTED";T[3831]="ER_TABLESPACE_TYPE_UNKNOWN";T[3832]="ER_TARGET_TABLESPACE_UNENCRYPTED";T[3833]="ER_CANNOT_USE_ENCRYPTION_CLAUSE";T[3834]="ER_INVALID_MULTIPLE_CLAUSES";T[3835]="ER_UNSUPPORTED_USE_OF_GRANT_AS";T[3836]="ER_UKNOWN_AUTH_ID_OR_ACCESS_DENIED_FOR_GRANT_AS";T[3837]="ER_DEPENDENT_BY_FUNCTIONAL_INDEX";T[3838]="ER_PLUGIN_NOT_EARLY";T[3839]="ER_INNODB_REDO_LOG_ARCHIVE_START_SUBDIR_PATH";T[3840]="ER_INNODB_REDO_LOG_ARCHIVE_START_TIMEOUT";T[3841]="ER_INNODB_REDO_LOG_ARCHIVE_DIRS_INVALID";T[3842]="ER_INNODB_REDO_LOG_ARCHIVE_LABEL_NOT_FOUND";T[3843]="ER_INNODB_REDO_LOG_ARCHIVE_DIR_EMPTY";T[3844]="ER_INNODB_REDO_LOG_ARCHIVE_NO_SUCH_DIR";T[3845]="ER_INNODB_REDO_LOG_ARCHIVE_DIR_CLASH";T[3846]="ER_INNODB_REDO_LOG_ARCHIVE_DIR_PERMISSIONS";T[3847]="ER_INNODB_REDO_LOG_ARCHIVE_FILE_CREATE";T[3848]="ER_INNODB_REDO_LOG_ARCHIVE_ACTIVE";T[3849]="ER_INNODB_REDO_LOG_ARCHIVE_INACTIVE";T[3850]="ER_INNODB_REDO_LOG_ARCHIVE_FAILED";T[3851]="ER_INNODB_REDO_LOG_ARCHIVE_SESSION";T[3852]="ER_STD_REGEX_ERROR";T[3853]="ER_INVALID_JSON_TYPE";T[3854]="ER_CANNOT_CONVERT_STRING";T[3855]="ER_DEPENDENT_BY_PARTITION_FUNC";T[3856]="ER_WARN_DEPRECATED_FLOAT_AUTO_INCREMENT";T[3857]="ER_RPL_CANT_STOP_REPLICA_WHILE_LOCKED_BACKUP";T[3858]="ER_WARN_DEPRECATED_FLOAT_DIGITS";T[3859]="ER_WARN_DEPRECATED_FLOAT_UNSIGNED";T[3860]="ER_WARN_DEPRECATED_INTEGER_DISPLAY_WIDTH";T[3861]="ER_WARN_DEPRECATED_ZEROFILL";T[3862]="ER_CLONE_DONOR";T[3863]="ER_CLONE_PROTOCOL";T[3864]="ER_CLONE_DONOR_VERSION";T[3865]="ER_CLONE_OS";T[3866]="ER_CLONE_PLATFORM";T[3867]="ER_CLONE_CHARSET";T[3868]="ER_CLONE_CONFIG";T[3869]="ER_CLONE_SYS_CONFIG";T[3870]="ER_CLONE_PLUGIN_MATCH";T[3871]="ER_CLONE_LOOPBACK";T[3872]="ER_CLONE_ENCRYPTION";T[3873]="ER_CLONE_DISK_SPACE";T[3874]="ER_CLONE_IN_PROGRESS";T[3875]="ER_CLONE_DISALLOWED";T[3876]="ER_CANNOT_GRANT_ROLES_TO_ANONYMOUS_USER";T[3877]="ER_SECONDARY_ENGINE_PLUGIN";T[3878]="ER_SECOND_PASSWORD_CANNOT_BE_EMPTY";T[3879]="ER_DB_ACCESS_DENIED";T[3880]="ER_DA_AUTH_ID_WITH_SYSTEM_USER_PRIV_IN_MANDATORY_ROLES";T[3881]="ER_DA_RPL_GTID_TABLE_CANNOT_OPEN";T[3882]="ER_GEOMETRY_IN_UNKNOWN_LENGTH_UNIT";T[3883]="ER_DA_PLUGIN_INSTALL_ERROR";T[3884]="ER_NO_SESSION_TEMP";T[3885]="ER_DA_UNKNOWN_ERROR_NUMBER";T[3886]="ER_COLUMN_CHANGE_SIZE";T[3887]="ER_REGEXP_INVALID_CAPTURE_GROUP_NAME";T[3888]="ER_DA_SSL_LIBRARY_ERROR";T[3889]="ER_SECONDARY_ENGINE";T[3890]="ER_SECONDARY_ENGINE_DDL";T[3891]="ER_INCORRECT_CURRENT_PASSWORD";T[3892]="ER_MISSING_CURRENT_PASSWORD";T[3893]="ER_CURRENT_PASSWORD_NOT_REQUIRED";T[3894]="ER_PASSWORD_CANNOT_BE_RETAINED_ON_PLUGIN_CHANGE";T[3895]="ER_CURRENT_PASSWORD_CANNOT_BE_RETAINED";T[3896]="ER_PARTIAL_REVOKES_EXIST";T[3897]="ER_CANNOT_GRANT_SYSTEM_PRIV_TO_MANDATORY_ROLE";T[3898]="ER_XA_REPLICATION_FILTERS";T[3899]="ER_UNSUPPORTED_SQL_MODE";T[3900]="ER_REGEXP_INVALID_FLAG";T[3901]="ER_PARTIAL_REVOKE_AND_DB_GRANT_BOTH_EXISTS";T[3902]="ER_UNIT_NOT_FOUND";T[3903]="ER_INVALID_JSON_VALUE_FOR_FUNC_INDEX";T[3904]="ER_JSON_VALUE_OUT_OF_RANGE_FOR_FUNC_INDEX";T[3905]="ER_EXCEEDED_MV_KEYS_NUM";T[3906]="ER_EXCEEDED_MV_KEYS_SPACE";T[3907]="ER_FUNCTIONAL_INDEX_DATA_IS_TOO_LONG";T[3908]="ER_WRONG_MVI_VALUE";T[3909]="ER_WARN_FUNC_INDEX_NOT_APPLICABLE";T[3910]="ER_GRP_RPL_UDF_ERROR";T[3911]="ER_UPDATE_GTID_PURGED_WITH_GR";T[3912]="ER_GROUPING_ON_TIMESTAMP_IN_DST";T[3913]="ER_TABLE_NAME_CAUSES_TOO_LONG_PATH";T[3914]="ER_AUDIT_LOG_INSUFFICIENT_PRIVILEGE";T[3915]="ER_AUDIT_LOG_PASSWORD_HAS_BEEN_COPIED";T[3916]="ER_DA_GRP_RPL_STARTED_AUTO_REJOIN";T[3917]="ER_SYSVAR_CHANGE_DURING_QUERY";T[3918]="ER_GLOBSTAT_CHANGE_DURING_QUERY";T[3919]="ER_GRP_RPL_MESSAGE_SERVICE_INIT_FAILURE";T[3920]="ER_CHANGE_SOURCE_WRONG_COMPRESSION_ALGORITHM_CLIENT";T[3921]="ER_CHANGE_SOURCE_WRONG_COMPRESSION_LEVEL_CLIENT";T[3922]="ER_WRONG_COMPRESSION_ALGORITHM_CLIENT";T[3923]="ER_WRONG_COMPRESSION_LEVEL_CLIENT";T[3924]="ER_CHANGE_SOURCE_WRONG_COMPRESSION_ALGORITHM_LIST_CLIENT";T[3925]="ER_CLIENT_PRIVILEGE_CHECKS_USER_CANNOT_BE_ANONYMOUS";T[3926]="ER_CLIENT_PRIVILEGE_CHECKS_USER_DOES_NOT_EXIST";T[3927]="ER_CLIENT_PRIVILEGE_CHECKS_USER_CORRUPT";T[3928]="ER_CLIENT_PRIVILEGE_CHECKS_USER_NEEDS_RPL_APPLIER_PRIV";T[3929]="ER_WARN_DA_PRIVILEGE_NOT_REGISTERED";T[3930]="ER_CLIENT_KEYRING_UDF_KEY_INVALID";T[3931]="ER_CLIENT_KEYRING_UDF_KEY_TYPE_INVALID";T[3932]="ER_CLIENT_KEYRING_UDF_KEY_TOO_LONG";T[3933]="ER_CLIENT_KEYRING_UDF_KEY_TYPE_TOO_LONG";T[3934]="ER_JSON_SCHEMA_VALIDATION_ERROR_WITH_DETAILED_REPORT";T[3935]="ER_DA_UDF_INVALID_CHARSET_SPECIFIED";T[3936]="ER_DA_UDF_INVALID_CHARSET";T[3937]="ER_DA_UDF_INVALID_COLLATION";T[3938]="ER_DA_UDF_INVALID_EXTENSION_ARGUMENT_TYPE";T[3939]="ER_MULTIPLE_CONSTRAINTS_WITH_SAME_NAME";T[3940]="ER_CONSTRAINT_NOT_FOUND";T[3941]="ER_ALTER_CONSTRAINT_ENFORCEMENT_NOT_SUPPORTED";T[3942]="ER_TABLE_VALUE_CONSTRUCTOR_MUST_HAVE_COLUMNS";T[3943]="ER_TABLE_VALUE_CONSTRUCTOR_CANNOT_HAVE_DEFAULT";T[3944]="ER_CLIENT_QUERY_FAILURE_INVALID_NON_ROW_FORMAT";T[3945]="ER_REQUIRE_ROW_FORMAT_INVALID_VALUE";T[3946]="ER_FAILED_TO_DETERMINE_IF_ROLE_IS_MANDATORY";T[3947]="ER_FAILED_TO_FETCH_MANDATORY_ROLE_LIST";T[3948]="ER_CLIENT_LOCAL_FILES_DISABLED";T[3949]="ER_IMP_INCOMPATIBLE_CFG_VERSION";T[3950]="ER_DA_OOM";T[3951]="ER_DA_UDF_INVALID_ARGUMENT_TO_SET_CHARSET";T[3952]="ER_DA_UDF_INVALID_RETURN_TYPE_TO_SET_CHARSET";T[3953]="ER_MULTIPLE_INTO_CLAUSES";T[3954]="ER_MISPLACED_INTO";T[3955]="ER_USER_ACCESS_DENIED_FOR_USER_ACCOUNT_BLOCKED_BY_PASSWORD_LOCK";T[3956]="ER_WARN_DEPRECATED_YEAR_UNSIGNED";T[3957]="ER_CLONE_NETWORK_PACKET";T[3958]="ER_SDI_OPERATION_FAILED_MISSING_RECORD";T[3959]="ER_DEPENDENT_BY_CHECK_CONSTRAINT";T[3960]="ER_GRP_OPERATION_NOT_ALLOWED_GR_MUST_STOP";T[3961]="ER_WARN_DEPRECATED_JSON_TABLE_ON_ERROR_ON_EMPTY";T[3962]="ER_WARN_DEPRECATED_INNER_INTO";T[3963]="ER_WARN_DEPRECATED_VALUES_FUNCTION_ALWAYS_NULL";T[3964]="ER_WARN_DEPRECATED_SQL_CALC_FOUND_ROWS";T[3965]="ER_WARN_DEPRECATED_FOUND_ROWS";T[3966]="ER_MISSING_JSON_VALUE";T[3967]="ER_MULTIPLE_JSON_VALUES";T[3968]="ER_HOSTNAME_TOO_LONG";T[3969]="ER_WARN_CLIENT_DEPRECATED_PARTITION_PREFIX_KEY";T[3970]="ER_GROUP_REPLICATION_USER_EMPTY_MSG";T[3971]="ER_GROUP_REPLICATION_USER_MANDATORY_MSG";T[3972]="ER_GROUP_REPLICATION_PASSWORD_LENGTH";T[3973]="ER_SUBQUERY_TRANSFORM_REJECTED";T[3974]="ER_DA_GRP_RPL_RECOVERY_ENDPOINT_FORMAT";T[3975]="ER_DA_GRP_RPL_RECOVERY_ENDPOINT_INVALID";T[3976]="ER_WRONG_VALUE_FOR_VAR_PLUS_ACTIONABLE_PART";T[3977]="ER_STATEMENT_NOT_ALLOWED_AFTER_START_TRANSACTION";T[3978]="ER_FOREIGN_KEY_WITH_ATOMIC_CREATE_SELECT";T[3979]="ER_NOT_ALLOWED_WITH_START_TRANSACTION";T[3980]="ER_INVALID_JSON_ATTRIBUTE";T[3981]="ER_ENGINE_ATTRIBUTE_NOT_SUPPORTED";T[3982]="ER_INVALID_USER_ATTRIBUTE_JSON";T[3983]="ER_INNODB_REDO_DISABLED";T[3984]="ER_INNODB_REDO_ARCHIVING_ENABLED";T[3985]="ER_MDL_OUT_OF_RESOURCES";T[3986]="ER_IMPLICIT_COMPARISON_FOR_JSON";T[3987]="ER_FUNCTION_DOES_NOT_SUPPORT_CHARACTER_SET";T[3988]="ER_IMPOSSIBLE_STRING_CONVERSION";T[3989]="ER_SCHEMA_READ_ONLY";T[3990]="ER_RPL_ASYNC_RECONNECT_GTID_MODE_OFF";T[3991]="ER_RPL_ASYNC_RECONNECT_AUTO_POSITION_OFF";T[3992]="ER_DISABLE_GTID_MODE_REQUIRES_ASYNC_RECONNECT_OFF";T[3993]="ER_DISABLE_AUTO_POSITION_REQUIRES_ASYNC_RECONNECT_OFF";T[3994]="ER_INVALID_PARAMETER_USE";T[3995]="ER_CHARACTER_SET_MISMATCH";T[3996]="ER_WARN_VAR_VALUE_CHANGE_NOT_SUPPORTED";T[3997]="ER_INVALID_TIME_ZONE_INTERVAL";T[3998]="ER_INVALID_CAST";T[3999]="ER_HYPERGRAPH_NOT_SUPPORTED_YET";T[4000]="ER_WARN_HYPERGRAPH_EXPERIMENTAL";T[4001]="ER_DA_NO_ERROR_LOG_PARSER_CONFIGURED";T[4002]="ER_DA_ERROR_LOG_TABLE_DISABLED";T[4003]="ER_DA_ERROR_LOG_MULTIPLE_FILTERS";T[4004]="ER_DA_CANT_OPEN_ERROR_LOG";T[4005]="ER_USER_REFERENCED_AS_DEFINER";T[4006]="ER_CANNOT_USER_REFERENCED_AS_DEFINER";T[4007]="ER_REGEX_NUMBER_TOO_BIG";T[4008]="ER_SPVAR_NONINTEGER_TYPE";T[4009]="WARN_UNSUPPORTED_ACL_TABLES_READ";T[4010]="ER_BINLOG_UNSAFE_ACL_TABLE_READ_IN_DML_DDL";T[4011]="ER_STOP_REPLICA_MONITOR_IO_THREAD_TIMEOUT";T[4012]="ER_STARTING_REPLICA_MONITOR_IO_THREAD";T[4013]="ER_CANT_USE_ANONYMOUS_TO_GTID_WITH_GTID_MODE_NOT_ON";T[4014]="ER_CANT_COMBINE_ANONYMOUS_TO_GTID_AND_AUTOPOSITION";T[4015]="ER_ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS_REQUIRES_GTID_MODE_ON";T[4016]="ER_SQL_REPLICA_SKIP_COUNTER_USED_WITH_GTID_MODE_ON";T[4017]="ER_USING_ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS_AS_LOCAL_OR_UUID";T[4018]="ER_CANT_SET_ANONYMOUS_TO_GTID_AND_WAIT_UNTIL_SQL_THD_AFTER_GTIDS";T[4019]="ER_CANT_SET_SQL_AFTER_OR_BEFORE_GTIDS_WITH_ANONYMOUS_TO_GTID";T[4020]="ER_ANONYMOUS_TO_GTID_UUID_SAME_AS_GROUP_NAME";T[4021]="ER_CANT_USE_SAME_UUID_AS_GROUP_NAME";T[4022]="ER_GRP_RPL_RECOVERY_CHANNEL_STILL_RUNNING";T[4023]="ER_INNODB_INVALID_AUTOEXTEND_SIZE_VALUE";T[4024]="ER_INNODB_INCOMPATIBLE_WITH_TABLESPACE";T[4025]="ER_INNODB_AUTOEXTEND_SIZE_OUT_OF_RANGE";T[4026]="ER_CANNOT_USE_AUTOEXTEND_SIZE_CLAUSE";T[4027]="ER_ROLE_GRANTED_TO_ITSELF";T[4028]="ER_TABLE_MUST_HAVE_A_VISIBLE_COLUMN";T[4029]="ER_INNODB_COMPRESSION_FAILURE";T[4030]="ER_WARN_ASYNC_CONN_FAILOVER_NETWORK_NAMESPACE";T[4031]="ER_CLIENT_INTERACTION_TIMEOUT";T[4032]="ER_INVALID_CAST_TO_GEOMETRY";T[4033]="ER_INVALID_CAST_POLYGON_RING_DIRECTION";T[4034]="ER_GIS_DIFFERENT_SRIDS_AGGREGATION";T[4035]="ER_RELOAD_KEYRING_FAILURE";T[4036]="ER_SDI_GET_KEYS_INVALID_TABLESPACE";T[4037]="ER_CHANGE_RPL_SRC_WRONG_COMPRESSION_ALGORITHM_SIZE";T[4038]="ER_WARN_DEPRECATED_TLS_VERSION_FOR_CHANNEL_CLI";T[4039]="ER_CANT_USE_SAME_UUID_AS_VIEW_CHANGE_UUID";T[4040]="ER_ANONYMOUS_TO_GTID_UUID_SAME_AS_VIEW_CHANGE_UUID";T[4041]="ER_GRP_RPL_VIEW_CHANGE_UUID_FAIL_GET_VARIABLE";T[4042]="ER_WARN_ADUIT_LOG_MAX_SIZE_AND_PRUNE_SECONDS";T[4043]="ER_WARN_ADUIT_LOG_MAX_SIZE_CLOSE_TO_ROTATE_ON_SIZE";T[4044]="ER_KERBEROS_CREATE_USER";T[4045]="ER_INSTALL_PLUGIN_CONFLICT_CLIENT";T[4046]="ER_DA_ERROR_LOG_COMPONENT_FLUSH_FAILED";T[4047]="ER_WARN_SQL_AFTER_MTS_GAPS_GAP_NOT_CALCULATED";T[4048]="ER_INVALID_ASSIGNMENT_TARGET";T[4049]="ER_OPERATION_NOT_ALLOWED_ON_GR_SECONDARY";T[4050]="ER_GRP_RPL_FAILOVER_CHANNEL_STATUS_PROPAGATION";T[4051]="ER_WARN_AUDIT_LOG_FORMAT_UNIX_TIMESTAMP_ONLY_WHEN_JSON";T[4052]="ER_INVALID_MFA_PLUGIN_SPECIFIED";T[4053]="ER_IDENTIFIED_BY_UNSUPPORTED";T[4054]="ER_INVALID_PLUGIN_FOR_REGISTRATION";T[4055]="ER_PLUGIN_REQUIRES_REGISTRATION";T[4056]="ER_MFA_METHOD_EXISTS";T[4057]="ER_MFA_METHOD_NOT_EXISTS";T[4058]="ER_AUTHENTICATION_POLICY_MISMATCH";T[4059]="ER_PLUGIN_REGISTRATION_DONE";T[4060]="ER_INVALID_USER_FOR_REGISTRATION";T[4061]="ER_USER_REGISTRATION_FAILED";T[4062]="ER_MFA_METHODS_INVALID_ORDER";T[4063]="ER_MFA_METHODS_IDENTICAL";T[4064]="ER_INVALID_MFA_OPERATIONS_FOR_PASSWORDLESS_USER";T[4065]="ER_CHANGE_REPLICATION_SOURCE_NO_OPTIONS_FOR_GTID_ONLY";T[4066]="ER_CHANGE_REP_SOURCE_CANT_DISABLE_REQ_ROW_FORMAT_WITH_GTID_ONLY";T[4067]="ER_CHANGE_REP_SOURCE_CANT_DISABLE_AUTO_POSITION_WITH_GTID_ONLY";T[4068]="ER_CHANGE_REP_SOURCE_CANT_DISABLE_GTID_ONLY_WITHOUT_POSITIONS";T[4069]="ER_CHANGE_REP_SOURCE_CANT_DISABLE_AUTO_POS_WITHOUT_POSITIONS";T[4070]="ER_CHANGE_REP_SOURCE_GR_CHANNEL_WITH_GTID_MODE_NOT_ON";T[4071]="ER_CANT_USE_GTID_ONLY_WITH_GTID_MODE_NOT_ON";T[4072]="ER_WARN_C_DISABLE_GTID_ONLY_WITH_SOURCE_AUTO_POS_INVALID_POS";T[4073]="ER_DA_SSL_FIPS_MODE_ERROR";T[4074]="ER_VALUE_OUT_OF_RANGE";T[4075]="ER_FULLTEXT_WITH_ROLLUP";T[4076]="ER_REGEXP_MISSING_RESOURCE";T[4077]="ER_WARN_REGEXP_USING_DEFAULT";T[4078]="ER_REGEXP_MISSING_FILE";T[4079]="ER_WARN_DEPRECATED_COLLATION";T[4080]="ER_CONCURRENT_PROCEDURE_USAGE";T[4081]="ER_DA_GLOBAL_CONN_LIMIT";T[4082]="ER_DA_CONN_LIMIT";T[4083]="ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE_INSTANT";T[4084]="ER_WARN_SF_UDF_NAME_COLLISION";T[4085]="ER_CANNOT_PURGE_BINLOG_WITH_BACKUP_LOCK";T[4086]="ER_TOO_MANY_WINDOWS";T[4087]="ER_MYSQLBACKUP_CLIENT_MSG";T[4088]="ER_COMMENT_CONTAINS_INVALID_STRING";T[4089]="ER_DEFINITION_CONTAINS_INVALID_STRING";T[4090]="ER_CANT_EXECUTE_COMMAND_WITH_ASSIGNED_GTID_NEXT";T[4091]="ER_XA_TEMP_TABLE";T[4092]="ER_INNODB_MAX_ROW_VERSION";T[4093]="ER_INNODB_INSTANT_ADD_NOT_SUPPORTED_MAX_SIZE";T[4094]="ER_OPERATION_NOT_ALLOWED_WHILE_PRIMARY_CHANGE_IS_RUNNING";T[4095]="ER_WARN_DEPRECATED_DATETIME_DELIMITER";T[4096]="ER_WARN_DEPRECATED_SUPERFLUOUS_DELIMITER";T[4097]="ER_CANNOT_PERSIST_SENSITIVE_VARIABLES";T[4098]="ER_WARN_CANNOT_SECURELY_PERSIST_SENSITIVE_VARIABLES";T[4099]="ER_WARN_TRG_ALREADY_EXISTS";T[4100]="ER_IF_NOT_EXISTS_UNSUPPORTED_TRG_EXISTS_ON_DIFFERENT_TABLE";T[4101]="ER_IF_NOT_EXISTS_UNSUPPORTED_UDF_NATIVE_FCT_NAME_COLLISION";T[4102]="ER_SET_PASSWORD_AUTH_PLUGIN_ERROR";T[4103]="ER_REDUCED_DBLWR_FILE_CORRUPTED";T[4104]="ER_REDUCED_DBLWR_PAGE_FOUND";T[4105]="ER_SRS_INVALID_LATITUDE_OF_ORIGIN";T[4106]="ER_SRS_INVALID_LONGITUDE_OF_ORIGIN";T[4107]="ER_SRS_UNUSED_PROJ_PARAMETER_PRESENT";T[4108]="ER_GIPK_COLUMN_EXISTS";T[4109]="ER_GIPK_FAILED_AUTOINC_COLUMN_EXISTS";T[4110]="ER_GIPK_COLUMN_ALTER_NOT_ALLOWED";T[4111]="ER_DROP_PK_COLUMN_TO_DROP_GIPK";T[4112]="ER_CREATE_SELECT_WITH_GIPK_DISALLOWED_IN_SBR";T[4113]="ER_DA_EXPIRE_LOGS_DAYS_IGNORED";T[4114]="ER_CTE_RECURSIVE_NOT_UNION";T[4115]="ER_COMMAND_BACKEND_FAILED_TO_FETCH_SECURITY_CTX";T[4116]="ER_COMMAND_SERVICE_BACKEND_FAILED";T[4117]="ER_CLIENT_FILE_PRIVILEGE_FOR_REPLICATION_CHECKS";T[4118]="ER_GROUP_REPLICATION_FORCE_MEMBERS_COMMAND_FAILURE";T[4119]="ER_WARN_DEPRECATED_IDENT";T[4120]="ER_INTERSECT_ALL_MAX_DUPLICATES_EXCEEDED";T[4121]="ER_TP_QUERY_THRS_PER_GRP_EXCEEDS_TXN_THR_LIMIT";T[4122]="ER_BAD_TIMESTAMP_FORMAT";T[4123]="ER_SHAPE_PRIDICTION_UDF";T[4124]="ER_SRS_INVALID_HEIGHT";T[4125]="ER_SRS_INVALID_SCALING";T[4126]="ER_SRS_INVALID_ZONE_WIDTH";T[4127]="ER_SRS_INVALID_LATITUDE_POLAR_STERE_VAR_A";T[4128]="ER_WARN_DEPRECATED_CLIENT_NO_SCHEMA_OPTION";T[4129]="ER_TABLE_NOT_EMPTY";T[4130]="ER_TABLE_NO_PRIMARY_KEY";T[4131]="ER_TABLE_IN_SHARED_TABLESPACE";T[4132]="ER_INDEX_OTHER_THAN_PK";T[4133]="ER_LOAD_BULK_DATA_UNSORTED";T[4134]="ER_BULK_EXECUTOR_ERROR";T[4135]="ER_BULK_READER_LIBCURL_INIT_FAILED";T[4136]="ER_BULK_READER_LIBCURL_ERROR";T[4137]="ER_BULK_READER_SERVER_ERROR";T[4138]="ER_BULK_READER_COMMUNICATION_ERROR";T[4139]="ER_BULK_LOAD_DATA_FAILED";T[4140]="ER_BULK_LOADER_COLUMN_TOO_BIG_FOR_LEFTOVER_BUFFER";T[4141]="ER_BULK_LOADER_COMPONENT_ERROR";T[4142]="ER_BULK_LOADER_FILE_CONTAINS_LESS_LINES_THAN_IGNORE_CLAUSE";T[4143]="ER_BULK_PARSER_MISSING_ENCLOSED_BY";T[4144]="ER_BULK_PARSER_ROW_BUFFER_MAX_TOTAL_COLS_EXCEEDED";T[4145]="ER_BULK_PARSER_COPY_BUFFER_SIZE_EXCEEDED";T[4146]="ER_BULK_PARSER_UNEXPECTED_END_OF_INPUT";T[4147]="ER_BULK_PARSER_UNEXPECTED_ROW_TERMINATOR";T[4148]="ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_ENDING_ENCLOSED_BY";T[4149]="ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_NULL_ESCAPE";T[4150]="ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_COLUMN_TERMINATOR";T[4151]="ER_BULK_PARSER_INCOMPLETE_ESCAPE_SEQUENCE";T[4152]="ER_LOAD_BULK_DATA_FAILED";T[4153]="ER_LOAD_BULK_DATA_WRONG_VALUE_FOR_FIELD";T[4154]="ER_LOAD_BULK_DATA_WARN_NULL_TO_NOTNULL";T[4155]="ER_REQUIRE_TABLE_PRIMARY_KEY_CHECK_GENERATE_WITH_GR";T[4156]="ER_CANT_CHANGE_SYS_VAR_IN_READ_ONLY_MODE";T[4157]="ER_INNODB_INSTANT_ADD_DROP_NOT_SUPPORTED_MAX_SIZE";T[4158]="ER_INNODB_INSTANT_ADD_NOT_SUPPORTED_MAX_FIELDS";T[4159]="ER_CANT_SET_PERSISTED";T[4160]="ER_INSTALL_COMPONENT_SET_NULL_VALUE";T[4161]="ER_INSTALL_COMPONENT_SET_UNUSED_VALUE";T[4162]="ER_WARN_DEPRECATED_USER_DEFINED_COLLATIONS"});var FQ1=o(($v,zU0)=>{(function($,Y){function X(G){return G.default||G}if(typeof define==="function"&&define.amd)define([],function(){var G={};return Y(G),X(G)});else if(typeof $v==="object"){if(Y($v),typeof zU0==="object")zU0.exports=X($v)}else(function(){var G={};Y(G),$.Long=X(G)})()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:$v,function($){Object.defineProperty($,"__esModule",{value:!0}),$.default=void 0;var Y=null;try{Y=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function X(S,I,v){this.low=S|0,this.high=I|0,this.unsigned=!!v}X.prototype.__isLong__,Object.defineProperty(X.prototype,"__isLong__",{value:!0});function G(S){return(S&&S.__isLong__)===!0}function J(S){var I=Math.clz32(S&-S);return S?31-I:I}X.isLong=G;var Q={},W={};function K(S,I){var v,x,y;if(I){if(S>>>=0,y=0<=S&&S<256){if(x=W[S],x)return x}if(v=H(S,0,!0),y)W[S]=v;return v}else{if(S|=0,y=-128<=S&&S<128){if(x=Q[S],x)return x}if(v=H(S,S<0?-1:0,!1),y)Q[S]=v;return v}}X.fromInt=K;function Z(S,I){if(isNaN(S))return I?M:E;if(I){if(S<0)return M;if(S>=A)return w}else{if(S<=-B)return j;if(S+1>=B)return P}if(S<0)return Z(-S,I).neg();return H(S%D|0,S/D|0,I)}X.fromNumber=Z;function H(S,I,v){return new X(S,I,v)}X.fromBits=H;var z=Math.pow;function V(S,I,v){if(S.length===0)throw Error("empty string");if(typeof I==="number")v=I,I=!1;else I=!!I;if(S==="NaN"||S==="Infinity"||S==="+Infinity"||S==="-Infinity")return I?M:E;if(v=v||10,v<2||36<v)throw RangeError("radix");var x;if((x=S.indexOf("-"))>0)throw Error("interior hyphen");else if(x===0)return V(S.substring(1),I,v).neg();var y=Z(z(v,8)),d=E;for(var u=0;u<S.length;u+=8){var b=Math.min(8,S.length-u),g=parseInt(S.substring(u,u+b),v);if(b<8){var p=Z(z(v,b));d=d.mul(p).add(Z(g))}else d=d.mul(y),d=d.add(Z(g))}return d.unsigned=I,d}X.fromString=V;function F(S,I){if(typeof S==="number")return Z(S,I);if(typeof S==="string")return V(S,I);return H(S.low,S.high,typeof I==="boolean"?I:S.unsigned)}X.fromValue=F;var L=65536,N=16777216,D=L*L,A=D*D,B=A/2,O=K(N),E=K(0);X.ZERO=E;var M=K(0,!0);X.UZERO=M;var R=K(1);X.ONE=R;var q=K(1,!0);X.UONE=q;var _=K(-1);X.NEG_ONE=_;var P=H(-1,2147483647,!1);X.MAX_VALUE=P;var w=H(-1,-1,!0);X.MAX_UNSIGNED_VALUE=w;var j=H(0,-2147483648,!1);X.MIN_VALUE=j;var C=X.prototype;if(C.toInt=function(){return this.unsigned?this.low>>>0:this.low},C.toNumber=function(){if(this.unsigned)return(this.high>>>0)*D+(this.low>>>0);return this.high*D+(this.low>>>0)},C.toString=function(I){if(I=I||10,I<2||36<I)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(j)){var v=Z(I),x=this.div(v),y=x.mul(v).sub(this);return x.toString(I)+y.toInt().toString(I)}else return"-"+this.neg().toString(I);var d=Z(z(I,6),this.unsigned),u=this,b="";while(!0){var g=u.div(d),p=u.sub(g.mul(d)).toInt()>>>0,h=p.toString(I);if(u=g,u.isZero())return h+b;else{while(h.length<6)h="0"+h;b=""+h+b}}},C.getHighBits=function(){return this.high},C.getHighBitsUnsigned=function(){return this.high>>>0},C.getLowBits=function(){return this.low},C.getLowBitsUnsigned=function(){return this.low>>>0},C.getNumBitsAbs=function(){if(this.isNegative())return this.eq(j)?64:this.neg().getNumBitsAbs();var I=this.high!=0?this.high:this.low;for(var v=31;v>0;v--)if((I&1<<v)!=0)break;return this.high!=0?v+33:v+1},C.isSafeInteger=function(){var I=this.high>>21;if(!I)return!0;if(this.unsigned)return!1;return I===-1&&!(this.low===0&&this.high===-2097152)},C.isZero=function(){return this.high===0&&this.low===0},C.eqz=C.isZero,C.isNegative=function(){return!this.unsigned&&this.high<0},C.isPositive=function(){return this.unsigned||this.high>=0},C.isOdd=function(){return(this.low&1)===1},C.isEven=function(){return(this.low&1)===0},C.equals=function(I){if(!G(I))I=F(I);if(this.unsigned!==I.unsigned&&this.high>>>31===1&&I.high>>>31===1)return!1;return this.high===I.high&&this.low===I.low},C.eq=C.equals,C.notEquals=function(I){return!this.eq(I)},C.neq=C.notEquals,C.ne=C.notEquals,C.lessThan=function(I){return this.comp(I)<0},C.lt=C.lessThan,C.lessThanOrEqual=function(I){return this.comp(I)<=0},C.lte=C.lessThanOrEqual,C.le=C.lessThanOrEqual,C.greaterThan=function(I){return this.comp(I)>0},C.gt=C.greaterThan,C.greaterThanOrEqual=function(I){return this.comp(I)>=0},C.gte=C.greaterThanOrEqual,C.ge=C.greaterThanOrEqual,C.compare=function(I){if(!G(I))I=F(I);if(this.eq(I))return 0;var v=this.isNegative(),x=I.isNegative();if(v&&!x)return-1;if(!v&&x)return 1;if(!this.unsigned)return this.sub(I).isNegative()?-1:1;return I.high>>>0>this.high>>>0||I.high===this.high&&I.low>>>0>this.low>>>0?-1:1},C.comp=C.compare,C.negate=function(){if(!this.unsigned&&this.eq(j))return j;return this.not().add(R)},C.neg=C.negate,C.add=function(I){if(!G(I))I=F(I);var v=this.high>>>16,x=this.high&65535,y=this.low>>>16,d=this.low&65535,u=I.high>>>16,b=I.high&65535,g=I.low>>>16,p=I.low&65535,h=0,n=0,t=0,s=0;return s+=d+p,t+=s>>>16,s&=65535,t+=y+g,n+=t>>>16,t&=65535,n+=x+b,h+=n>>>16,n&=65535,h+=v+u,h&=65535,H(t<<16|s,h<<16|n,this.unsigned)},C.subtract=function(I){if(!G(I))I=F(I);return this.add(I.neg())},C.sub=C.subtract,C.multiply=function(I){if(this.isZero())return this;if(!G(I))I=F(I);if(Y){var v=Y.mul(this.low,this.high,I.low,I.high);return H(v,Y.get_high(),this.unsigned)}if(I.isZero())return this.unsigned?M:E;if(this.eq(j))return I.isOdd()?j:E;if(I.eq(j))return this.isOdd()?j:E;if(this.isNegative())if(I.isNegative())return this.neg().mul(I.neg());else return this.neg().mul(I).neg();else if(I.isNegative())return this.mul(I.neg()).neg();if(this.lt(O)&&I.lt(O))return Z(this.toNumber()*I.toNumber(),this.unsigned);var x=this.high>>>16,y=this.high&65535,d=this.low>>>16,u=this.low&65535,b=I.high>>>16,g=I.high&65535,p=I.low>>>16,h=I.low&65535,n=0,t=0,s=0,K0=0;return K0+=u*h,s+=K0>>>16,K0&=65535,s+=d*h,t+=s>>>16,s&=65535,s+=u*p,t+=s>>>16,s&=65535,t+=y*h,n+=t>>>16,t&=65535,t+=d*p,n+=t>>>16,t&=65535,t+=u*g,n+=t>>>16,t&=65535,n+=x*h+y*p+d*g+u*b,n&=65535,H(s<<16|K0,n<<16|t,this.unsigned)},C.mul=C.multiply,C.divide=function(I){if(!G(I))I=F(I);if(I.isZero())throw Error("division by zero");if(Y){if(!this.unsigned&&this.high===-2147483648&&I.low===-1&&I.high===-1)return this;var v=(this.unsigned?Y.div_u:Y.div_s)(this.low,this.high,I.low,I.high);return H(v,Y.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?M:E;var x,y,d;if(!this.unsigned){if(this.eq(j))if(I.eq(R)||I.eq(_))return j;else if(I.eq(j))return R;else{var u=this.shr(1);if(x=u.div(I).shl(1),x.eq(E))return I.isNegative()?R:_;else return y=this.sub(I.mul(x)),d=x.add(y.div(I)),d}else if(I.eq(j))return this.unsigned?M:E;if(this.isNegative()){if(I.isNegative())return this.neg().div(I.neg());return this.neg().div(I).neg()}else if(I.isNegative())return this.div(I.neg()).neg();d=E}else{if(!I.unsigned)I=I.toUnsigned();if(I.gt(this))return M;if(I.gt(this.shru(1)))return q;d=M}y=this;while(y.gte(I)){x=Math.max(1,Math.floor(y.toNumber()/I.toNumber()));var b=Math.ceil(Math.log(x)/Math.LN2),g=b<=48?1:z(2,b-48),p=Z(x),h=p.mul(I);while(h.isNegative()||h.gt(y))x-=g,p=Z(x,this.unsigned),h=p.mul(I);if(p.isZero())p=R;d=d.add(p),y=y.sub(h)}return d},C.div=C.divide,C.modulo=function(I){if(!G(I))I=F(I);if(Y){var v=(this.unsigned?Y.rem_u:Y.rem_s)(this.low,this.high,I.low,I.high);return H(v,Y.get_high(),this.unsigned)}return this.sub(this.div(I).mul(I))},C.mod=C.modulo,C.rem=C.modulo,C.not=function(){return H(~this.low,~this.high,this.unsigned)},C.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},C.clz=C.countLeadingZeros,C.countTrailingZeros=function(){return this.low?J(this.low):J(this.high)+32},C.ctz=C.countTrailingZeros,C.and=function(I){if(!G(I))I=F(I);return H(this.low&I.low,this.high&I.high,this.unsigned)},C.or=function(I){if(!G(I))I=F(I);return H(this.low|I.low,this.high|I.high,this.unsigned)},C.xor=function(I){if(!G(I))I=F(I);return H(this.low^I.low,this.high^I.high,this.unsigned)},C.shiftLeft=function(I){if(G(I))I=I.toInt();if((I&=63)===0)return this;else if(I<32)return H(this.low<<I,this.high<<I|this.low>>>32-I,this.unsigned);else return H(0,this.low<<I-32,this.unsigned)},C.shl=C.shiftLeft,C.shiftRight=function(I){if(G(I))I=I.toInt();if((I&=63)===0)return this;else if(I<32)return H(this.low>>>I|this.high<<32-I,this.high>>I,this.unsigned);else return H(this.high>>I-32,this.high>=0?0:-1,this.unsigned)},C.shr=C.shiftRight,C.shiftRightUnsigned=function(I){if(G(I))I=I.toInt();if((I&=63)===0)return this;if(I<32)return H(this.low>>>I|this.high<<32-I,this.high>>>I,this.unsigned);if(I===32)return H(this.high,0,this.unsigned);return H(this.high>>>I-32,0,this.unsigned)},C.shru=C.shiftRightUnsigned,C.shr_u=C.shiftRightUnsigned,C.rotateLeft=function(I){var v;if(G(I))I=I.toInt();if((I&=63)===0)return this;if(I===32)return H(this.high,this.low,this.unsigned);if(I<32)return v=32-I,H(this.low<<I|this.high>>>v,this.high<<I|this.low>>>v,this.unsigned);return I-=32,v=32-I,H(this.high<<I|this.low>>>v,this.low<<I|this.high>>>v,this.unsigned)},C.rotl=C.rotateLeft,C.rotateRight=function(I){var v;if(G(I))I=I.toInt();if((I&=63)===0)return this;if(I===32)return H(this.high,this.low,this.unsigned);if(I<32)return v=32-I,H(this.high<<v|this.low>>>I,this.low<<v|this.high>>>I,this.unsigned);return I-=32,v=32-I,H(this.low<<v|this.high>>>I,this.high<<v|this.low>>>I,this.unsigned)},C.rotr=C.rotateRight,C.toSigned=function(){if(!this.unsigned)return this;return H(this.low,this.high,!1)},C.toUnsigned=function(){if(this.unsigned)return this;return H(this.low,this.high,!0)},C.toBytes=function(I){return I?this.toBytesLE():this.toBytesBE()},C.toBytesLE=function(){var I=this.high,v=this.low;return[v&255,v>>>8&255,v>>>16&255,v>>>24,I&255,I>>>8&255,I>>>16&255,I>>>24]},C.toBytesBE=function(){var I=this.high,v=this.low;return[I>>>24,I>>>16&255,I>>>8&255,I&255,v>>>24,v>>>16&255,v>>>8&255,v&255]},X.fromBytes=function(I,v,x){return x?X.fromBytesLE(I,v):X.fromBytesBE(I,v)},X.fromBytesLE=function(I,v){return new X(I[0]|I[1]<<8|I[2]<<16|I[3]<<24,I[4]|I[5]<<8|I[6]<<16|I[7]<<24,v)},X.fromBytesBE=function(I,v){return new X(I[4]<<24|I[5]<<16|I[6]<<8|I[7],I[0]<<24|I[1]<<16|I[2]<<8|I[3],v)},typeof BigInt==="function")X.fromBigInt=function(I,v){var x=Number(BigInt.asIntN(32,I)),y=Number(BigInt.asIntN(32,I>>BigInt(32)));return H(x,y,v)},X.fromValue=function(I,v){if(typeof I==="bigint")return X.fromBigInt(I,v);return F(I,v)},C.toBigInt=function(){var I=BigInt(this.low>>>0),v=BigInt(this.unsigned?this.high>>>0:this.high);return v<<BigInt(32)|I};var k=$.default=X})});var qG=o((Rz5,LQ1)=>{var Kr=A0("buffer"),Oq=Kr.Buffer,D2={},N2;for(N2 in Kr){if(!Kr.hasOwnProperty(N2))continue;if(N2==="SlowBuffer"||N2==="Buffer")continue;D2[N2]=Kr[N2]}var Eq=D2.Buffer={};for(N2 in Oq){if(!Oq.hasOwnProperty(N2))continue;if(N2==="allocUnsafe"||N2==="allocUnsafeSlow")continue;Eq[N2]=Oq[N2]}D2.Buffer.prototype=Oq.prototype;if(!Eq.from||Eq.from===Uint8Array.from)Eq.from=function($,Y,X){if(typeof $==="number")throw TypeError('The "value" argument must not be of type number. Received type '+typeof $);if($&&typeof $.length>"u")throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $);return Oq($,Y,X)};if(!Eq.alloc)Eq.alloc=function($,Y,X){if(typeof $!=="number")throw TypeError('The "size" argument must be of type number. Received type '+typeof $);if($<0||$>=2147483648)throw RangeError('The value "'+$+'" is invalid for option "size"');var G=Oq($);if(!Y||Y.length===0)G.fill(0);else if(typeof X==="string")G.fill(Y,X);else G.fill(Y);return G};if(!D2.kStringMaxLength)try{D2.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch($){}if(!D2.constants){if(D2.constants={MAX_LENGTH:D2.kMaxLength},D2.kStringMaxLength)D2.constants.MAX_STRING_LENGTH=D2.kStringMaxLength}LQ1.exports=D2});var NQ1=o((jC6)=>{var DQ1="\uFEFF";jC6.PrependBOM=VU0;function VU0($,Y){this.encoder=$,this.addBOM=!0}VU0.prototype.write=function($){if(this.addBOM)$=DQ1+$,this.addBOM=!1;return this.encoder.write($)};VU0.prototype.end=function(){return this.encoder.end()};jC6.StripBOM=FU0;function FU0($,Y){this.decoder=$,this.pass=!1,this.options=Y||{}}FU0.prototype.write=function($){var Y=this.decoder.write($);if(this.pass||!Y)return Y;if(Y[0]===DQ1){if(Y=Y.slice(1),typeof this.options.stripBOM==="function")this.options.stripBOM()}return this.pass=!0,Y};FU0.prototype.end=function(){return this.decoder.end()}});var LU0=o((Pz5,AQ1)=>{var CC6=typeof Object.hasOwn>"u"?Function.call.bind(Object.prototype.hasOwnProperty):Object.hasOwn;function SC6($,Y){for(var X in Y)if(CC6(Y,X))$[X]=Y[X]}AQ1.exports=SC6});var OQ1=o((wz5,BQ1)=>{var lH=qG().Buffer;BQ1.exports={utf8:{type:"_internal",bomAware:!0},cesu8:{type:"_internal",bomAware:!0},unicode11utf8:"utf8",ucs2:{type:"_internal",bomAware:!0},utf16le:"ucs2",binary:{type:"_internal"},base64:{type:"_internal"},hex:{type:"_internal"},_internal:DU0};function DU0($,Y){if(this.enc=$.encodingName,this.bomAware=$.bomAware,this.enc==="base64")this.encoder=BU0;else if(this.enc==="utf8")this.encoder=MU0;else if(this.enc==="cesu8"){if(this.enc="utf8",this.encoder=OU0,lH.from("eda0bdedb2a9","hex").toString()!=="\uD83D\uDCA9")this.decoder=EU0,this.defaultCharUnicode=Y.defaultCharUnicode}}DU0.prototype.encoder=AU0;DU0.prototype.decoder=NU0;var kC6=A0("string_decoder").StringDecoder;function NU0($,Y){this.decoder=new kC6(Y.enc)}NU0.prototype.write=function($){if(!lH.isBuffer($))$=lH.from($);return this.decoder.write($)};NU0.prototype.end=function(){return this.decoder.end()};function AU0($,Y){this.enc=Y.enc}AU0.prototype.write=function($){return lH.from($,this.enc)};AU0.prototype.end=function(){};function BU0($,Y){this.prevStr=""}BU0.prototype.write=function($){$=this.prevStr+$;var Y=$.length-$.length%4;return this.prevStr=$.slice(Y),$=$.slice(0,Y),lH.from($,"base64")};BU0.prototype.end=function(){return lH.from(this.prevStr,"base64")};function OU0($,Y){}OU0.prototype.write=function($){var Y=lH.alloc($.length*3),X=0;for(var G=0;G<$.length;G++){var J=$.charCodeAt(G);if(J<128)Y[X++]=J;else if(J<2048)Y[X++]=192+(J>>>6),Y[X++]=128+(J&63);else Y[X++]=224+(J>>>12),Y[X++]=128+(J>>>6&63),Y[X++]=128+(J&63)}return Y.slice(0,X)};OU0.prototype.end=function(){};function EU0($,Y){this.acc=0,this.contBytes=0,this.accBytes=0,this.defaultCharUnicode=Y.defaultCharUnicode}EU0.prototype.write=function($){var Y=this.acc,X=this.contBytes,G=this.accBytes,J="";for(var Q=0;Q<$.length;Q++){var W=$[Q];if((W&192)!==128){if(X>0)J+=this.defaultCharUnicode,X=0;if(W<128)J+=String.fromCharCode(W);else if(W<224)Y=W&31,X=1,G=1;else if(W<240)Y=W&15,X=2,G=1;else J+=this.defaultCharUnicode}else if(X>0){if(Y=Y<<6|W&63,X--,G++,X===0)if(G===2&&Y<128&&Y>0)J+=this.defaultCharUnicode;else if(G===3&&Y<2048)J+=this.defaultCharUnicode;else J+=String.fromCharCode(Y)}else J+=this.defaultCharUnicode}return this.acc=Y,this.contBytes=X,this.accBytes=G,J};EU0.prototype.end=function(){var $=0;if(this.contBytes>0)$+=this.defaultCharUnicode;return $};function MU0($,Y){this.highSurrogate=""}MU0.prototype.write=function($){if(this.highSurrogate)$=this.highSurrogate+$,this.highSurrogate="";if($.length>0){var Y=$.charCodeAt($.length-1);if(Y>=55296&&Y<56320)this.highSurrogate=$[$.length-1],$=$.slice(0,$.length-1)}return lH.from($,this.enc)};MU0.prototype.end=function(){if(this.highSurrogate){var $=this.highSurrogate;return this.highSurrogate="",lH.from($,this.enc)}}});var RQ1=o((vC6)=>{var Zr=qG().Buffer;vC6._utf32=RU0;function RU0($,Y){this.iconv=Y,this.bomAware=!0,this.isLE=$.isLE}vC6.utf32le={type:"_utf32",isLE:!0};vC6.utf32be={type:"_utf32",isLE:!1};vC6.ucs4le="utf32le";vC6.ucs4be="utf32be";RU0.prototype.encoder=qU0;RU0.prototype.decoder=PU0;function qU0($,Y){this.isLE=Y.isLE,this.highSurrogate=0}qU0.prototype.write=function($){var Y=Zr.from($,"ucs2"),X=Zr.alloc(Y.length*2),G=this.isLE?X.writeUInt32LE:X.writeUInt32BE,J=0;for(var Q=0;Q<Y.length;Q+=2){var W=Y.readUInt16LE(Q),K=W>=55296&&W<56320,Z=W>=56320&&W<57344;if(this.highSurrogate)if(K||!Z)G.call(X,this.highSurrogate,J),J+=4;else{var H=(this.highSurrogate-55296<<10|W-56320)+65536;G.call(X,H,J),J+=4,this.highSurrogate=0;continue}if(K)this.highSurrogate=W;else G.call(X,W,J),J+=4,this.highSurrogate=0}if(J<X.length)X=X.slice(0,J);return X};qU0.prototype.end=function(){if(!this.highSurrogate)return;var $=Zr.alloc(4);if(this.isLE)$.writeUInt32LE(this.highSurrogate,0);else $.writeUInt32BE(this.highSurrogate,0);return this.highSurrogate=0,$};function PU0($,Y){this.isLE=Y.isLE,this.badChar=Y.iconv.defaultCharUnicode.charCodeAt(0),this.overflow=[]}PU0.prototype.write=function($){if($.length===0)return"";var Y=0,X=0,G=Zr.alloc($.length+4),J=0,Q=this.isLE,W=this.overflow,K=this.badChar;if(W.length>0){for(;Y<$.length&&W.length<4;Y++)W.push($[Y]);if(W.length===4){if(Q)X=W[Y]|W[Y+1]<<8|W[Y+2]<<16|W[Y+3]<<24;else X=W[Y+3]|W[Y+2]<<8|W[Y+1]<<16|W[Y]<<24;W.length=0,J=EQ1(G,J,X,K)}}for(;Y<$.length-3;Y+=4){if(Q)X=$[Y]|$[Y+1]<<8|$[Y+2]<<16|$[Y+3]<<24;else X=$[Y+3]|$[Y+2]<<8|$[Y+1]<<16|$[Y]<<24;J=EQ1(G,J,X,K)}for(;Y<$.length;Y++)W.push($[Y]);return G.slice(0,J).toString("ucs2")};function EQ1($,Y,X,G){if(X<0||X>1114111)X=G;if(X>=65536){X-=65536;var J=55296|X>>10;$[Y++]=J&255,$[Y++]=J>>8;var X=56320|X&1023}return $[Y++]=X&255,$[Y++]=X>>8,Y}PU0.prototype.end=function(){this.overflow.length=0};vC6.utf32=wU0;vC6.ucs4="utf32";function wU0($,Y){this.iconv=Y}wU0.prototype.encoder=_U0;wU0.prototype.decoder=jU0;function _U0($,Y){if($=$||{},$.addBOM===void 0)$.addBOM=!0;this.encoder=Y.iconv.getEncoder($.defaultEncoding||"utf-32le",$)}_U0.prototype.write=function($){return this.encoder.write($)};_U0.prototype.end=function(){return this.encoder.end()};function jU0($,Y){this.decoder=null,this.initialBufs=[],this.initialBufsLen=0,this.options=$||{},this.iconv=Y.iconv}jU0.prototype.write=function($){if(!this.decoder){if(this.initialBufs.push($),this.initialBufsLen+=$.length,this.initialBufsLen<32)return"";var Y=MQ1(this.initialBufs,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(Y,this.options);var X="";for(var G=0;G<this.initialBufs.length;G++)X+=this.decoder.write(this.initialBufs[G]);return this.initialBufs.length=this.initialBufsLen=0,X}return this.decoder.write($)};jU0.prototype.end=function(){if(!this.decoder){var $=MQ1(this.initialBufs,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder($,this.options);var Y="";for(var X=0;X<this.initialBufs.length;X++)Y+=this.decoder.write(this.initialBufs[X]);var G=this.decoder.end();if(G)Y+=G;return this.initialBufs.length=this.initialBufsLen=0,Y}return this.decoder.end()};function MQ1($,Y){var X=[],G=0,J=0,Q=0,W=0,K=0;$:for(var Z=0;Z<$.length;Z++){var H=$[Z];for(var z=0;z<H.length;z++)if(X.push(H[z]),X.length===4){if(G===0){if(X[0]===255&&X[1]===254&&X[2]===0&&X[3]===0)return"utf-32le";if(X[0]===0&&X[1]===0&&X[2]===254&&X[3]===255)return"utf-32be"}if(X[0]!==0||X[1]>16)Q++;if(X[3]!==0||X[2]>16)J++;if(X[0]===0&&X[1]===0&&(X[2]!==0||X[3]!==0))K++;if((X[0]!==0||X[1]!==0)&&X[2]===0&&X[3]===0)W++;if(X.length=0,G++,G>=100)break $}}if(K-Q>W-J)return"utf-32be";if(K-Q<W-J)return"utf-32le";return Y||"utf-32le"}});var wQ1=o((uC6)=>{var qQ1=qG().Buffer;uC6.utf16be=Ur;function Ur(){}Ur.prototype.encoder=TU0;Ur.prototype.decoder=IU0;Ur.prototype.bomAware=!0;function TU0(){}TU0.prototype.write=function($){var Y=qQ1.from($,"ucs2");for(var X=0;X<Y.length;X+=2){var G=Y[X];Y[X]=Y[X+1],Y[X+1]=G}return Y};TU0.prototype.end=function(){};function IU0(){this.overflowByte=-1}IU0.prototype.write=function($){if($.length==0)return"";var Y=qQ1.alloc($.length+1),X=0,G=0;if(this.overflowByte!==-1)Y[0]=$[0],Y[1]=this.overflowByte,X=1,G=2;for(;X<$.length-1;X+=2,G+=2)Y[G]=$[X+1],Y[G+1]=$[X];return this.overflowByte=X==$.length-1?$[$.length-1]:-1,Y.slice(0,G).toString("ucs2")};IU0.prototype.end=function(){this.overflowByte=-1};uC6.utf16=CU0;function CU0($,Y){this.iconv=Y}CU0.prototype.encoder=SU0;CU0.prototype.decoder=kU0;function SU0($,Y){if($=$||{},$.addBOM===void 0)$.addBOM=!0;this.encoder=Y.iconv.getEncoder("utf-16le",$)}SU0.prototype.write=function($){return this.encoder.write($)};SU0.prototype.end=function(){return this.encoder.end()};function kU0($,Y){this.decoder=null,this.initialBufs=[],this.initialBufsLen=0,this.options=$||{},this.iconv=Y.iconv}kU0.prototype.write=function($){if(!this.decoder){if(this.initialBufs.push($),this.initialBufsLen+=$.length,this.initialBufsLen<16)return"";var Y=PQ1(this.initialBufs,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(Y,this.options);var X="";for(var G=0;G<this.initialBufs.length;G++)X+=this.decoder.write(this.initialBufs[G]);return this.initialBufs.length=this.initialBufsLen=0,X}return this.decoder.write($)};kU0.prototype.end=function(){if(!this.decoder){var $=PQ1(this.initialBufs,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder($,this.options);var Y="";for(var X=0;X<this.initialBufs.length;X++)Y+=this.decoder.write(this.initialBufs[X]);var G=this.decoder.end();if(G)Y+=G;return this.initialBufs.length=this.initialBufsLen=0,Y}return this.decoder.end()};function PQ1($,Y){var X=[],G=0,J=0,Q=0;$:for(var W=0;W<$.length;W++){var K=$[W];for(var Z=0;Z<K.length;Z++)if(X.push(K[Z]),X.length===2){if(G===0){if(X[0]===255&&X[1]===254)return"utf-16le";if(X[0]===254&&X[1]===255)return"utf-16be"}if(X[0]===0&&X[1]!==0)Q++;if(X[0]!==0&&X[1]===0)J++;if(X.length=0,G++,G>=100)break $}}if(Q>J)return"utf-16be";if(Q<J)return"utf-16le";return Y||"utf-16le"}});var jQ1=o((nC6)=>{var nU=qG().Buffer;nC6.utf7=Hr;nC6.unicode11utf7="utf7";function Hr($,Y){this.iconv=Y}Hr.prototype.encoder=xU0;Hr.prototype.decoder=yU0;Hr.prototype.bomAware=!0;var cC6=/[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g;function xU0($,Y){this.iconv=Y.iconv}xU0.prototype.write=function($){return nU.from($.replace(cC6,function(Y){return"+"+(Y==="+"?"":this.iconv.encode(Y,"utf16-be").toString("base64").replace(/=+$/,""))+"-"}.bind(this)))};xU0.prototype.end=function(){};function yU0($,Y){this.iconv=Y.iconv,this.inBase64=!1,this.base64Accum=""}var lC6=/[A-Za-z0-9\/+]/,bU0=[];for(Mq=0;Mq<256;Mq++)bU0[Mq]=lC6.test(String.fromCharCode(Mq));var Mq,iC6=43,qA=45,vU0=38;yU0.prototype.write=function($){var Y="",X=0,G=this.inBase64,J=this.base64Accum;for(var Q=0;Q<$.length;Q++)if(!G){if($[Q]==iC6)Y+=this.iconv.decode($.slice(X,Q),"ascii"),X=Q+1,G=!0}else if(!bU0[$[Q]]){if(Q==X&&$[Q]==qA)Y+="+";else{var W=J+this.iconv.decode($.slice(X,Q),"ascii");Y+=this.iconv.decode(nU.from(W,"base64"),"utf16-be")}if($[Q]!=qA)Q--;X=Q+1,G=!1,J=""}if(!G)Y+=this.iconv.decode($.slice(X),"ascii");else{var W=J+this.iconv.decode($.slice(X),"ascii"),K=W.length-W.length%8;J=W.slice(K),W=W.slice(0,K),Y+=this.iconv.decode(nU.from(W,"base64"),"utf16-be")}return this.inBase64=G,this.base64Accum=J,Y};yU0.prototype.end=function(){var $="";if(this.inBase64&&this.base64Accum.length>0)$=this.iconv.decode(nU.from(this.base64Accum,"base64"),"utf16-be");return this.inBase64=!1,this.base64Accum="",$};nC6.utf7imap=zr;function zr($,Y){this.iconv=Y}zr.prototype.encoder=hU0;zr.prototype.decoder=fU0;zr.prototype.bomAware=!0;function hU0($,Y){this.iconv=Y.iconv,this.inBase64=!1,this.base64Accum=nU.alloc(6),this.base64AccumIdx=0}hU0.prototype.write=function($){var Y=this.inBase64,X=this.base64Accum,G=this.base64AccumIdx,J=nU.alloc($.length*5+10),Q=0;for(var W=0;W<$.length;W++){var K=$.charCodeAt(W);if(K>=32&&K<=126){if(Y){if(G>0)Q+=J.write(X.slice(0,G).toString("base64").replace(/\//g,",").replace(/=+$/,""),Q),G=0;J[Q++]=qA,Y=!1}if(!Y){if(J[Q++]=K,K===vU0)J[Q++]=qA}}else{if(!Y)J[Q++]=vU0,Y=!0;if(Y){if(X[G++]=K>>8,X[G++]=K&255,G==X.length)Q+=J.write(X.toString("base64").replace(/\//g,","),Q),G=0}}}return this.inBase64=Y,this.base64AccumIdx=G,J.slice(0,Q)};hU0.prototype.end=function(){var $=nU.alloc(10),Y=0;if(this.inBase64){if(this.base64AccumIdx>0)Y+=$.write(this.base64Accum.slice(0,this.base64AccumIdx).toString("base64").replace(/\//g,",").replace(/=+$/,""),Y),this.base64AccumIdx=0;$[Y++]=qA,this.inBase64=!1}return $.slice(0,Y)};function fU0($,Y){this.iconv=Y.iconv,this.inBase64=!1,this.base64Accum=""}var _Q1=bU0.slice();_Q1[44]=!0;fU0.prototype.write=function($){var Y="",X=0,G=this.inBase64,J=this.base64Accum;for(var Q=0;Q<$.length;Q++)if(!G){if($[Q]==vU0)Y+=this.iconv.decode($.slice(X,Q),"ascii"),X=Q+1,G=!0}else if(!_Q1[$[Q]]){if(Q==X&&$[Q]==qA)Y+="&";else{var W=J+this.iconv.decode($.slice(X,Q),"ascii").replace(/,/g,"/");Y+=this.iconv.decode(nU.from(W,"base64"),"utf16-be")}if($[Q]!=qA)Q--;X=Q+1,G=!1,J=""}if(!G)Y+=this.iconv.decode($.slice(X),"ascii");else{var W=J+this.iconv.decode($.slice(X),"ascii").replace(/,/g,"/"),K=W.length-W.length%8;J=W.slice(K),W=W.slice(0,K),Y+=this.iconv.decode(nU.from(W,"base64"),"utf16-be")}return this.inBase64=G,this.base64Accum=J,Y};fU0.prototype.end=function(){var $="";if(this.inBase64&&this.base64Accum.length>0)$=this.iconv.decode(nU.from(this.base64Accum,"base64"),"utf16-be");return this.inBase64=!1,this.base64Accum="",$}});var TQ1=o((oC6)=>{var Vr=qG().Buffer;oC6._sbcs=gU0;function gU0($,Y){if(!$)throw Error("SBCS codec is called without the data.");if(!$.chars||$.chars.length!==128&&$.chars.length!==256)throw Error("Encoding '"+$.type+"' has incorrect 'chars' (must be of len 128 or 256)");if($.chars.length===128){var X="";for(var G=0;G<128;G++)X+=String.fromCharCode(G);$.chars=X+$.chars}this.decodeBuf=Vr.from($.chars,"ucs2");var J=Vr.alloc(65536,Y.defaultCharSingleByte.charCodeAt(0));for(var G=0;G<$.chars.length;G++)J[$.chars.charCodeAt(G)]=G;this.encodeBuf=J}gU0.prototype.encoder=mU0;gU0.prototype.decoder=uU0;function mU0($,Y){this.encodeBuf=Y.encodeBuf}mU0.prototype.write=function($){var Y=Vr.alloc($.length);for(var X=0;X<$.length;X++)Y[X]=this.encodeBuf[$.charCodeAt(X)];return Y};mU0.prototype.end=function(){};function uU0($,Y){this.decodeBuf=Y.decodeBuf}uU0.prototype.write=function($){var Y=this.decodeBuf,X=Vr.alloc($.length*2),G=0,J=0;for(var Q=0;Q<$.length;Q++)G=$[Q]*2,J=Q*2,X[J]=Y[G],X[J+1]=Y[G+1];return X.toString("ucs2")};uU0.prototype.end=function(){}});var CQ1=o((Cz5,IQ1)=>{IQ1.exports={10029:"maccenteuro",maccenteuro:{type:"_sbcs",chars:"\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026\xA0\u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7"},808:"cp808",ibm808:"cp808",cp808:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0404\u0454\u0407\u0457\u040E\u045E\xB0\u2219\xB7\u221A\u2116\u20AC\u25A0\xA0"},mik:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2514\u2534\u252C\u251C\u2500\u253C\u2563\u2551\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2510\u2591\u2592\u2593\u2502\u2524\u2116\xA7\u2557\u255D\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},cp720:{type:"_sbcs",chars:"\x80\x81\xE9\xE2\x84\xE0\x86\xE7\xEA\xEB\xE8\xEF\xEE\x8D\x8E\x8F\x90\u0651\u0652\xF4\xA4\u0640\xFB\xF9\u0621\u0622\u0623\u0624\xA3\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0636\u0637\u0638\u0639\u063A\u0641\xB5\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u2261\u064B\u064C\u064D\u064E\u064F\u0650\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ascii8bit:"ascii",usascii:"ascii",ansix34:"ascii",ansix341968:"ascii",ansix341986:"ascii",csascii:"ascii",cp367:"ascii",ibm367:"ascii",isoir6:"ascii",iso646us:"ascii",iso646irv:"ascii",us:"ascii",latin1:"iso88591",latin2:"iso88592",latin3:"iso88593",latin4:"iso88594",latin5:"iso88599",latin6:"iso885910",latin7:"iso885913",latin8:"iso885914",latin9:"iso885915",latin10:"iso885916",csisolatin1:"iso88591",csisolatin2:"iso88592",csisolatin3:"iso88593",csisolatin4:"iso88594",csisolatincyrillic:"iso88595",csisolatinarabic:"iso88596",csisolatingreek:"iso88597",csisolatinhebrew:"iso88598",csisolatin5:"iso88599",csisolatin6:"iso885910",l1:"iso88591",l2:"iso88592",l3:"iso88593",l4:"iso88594",l5:"iso88599",l6:"iso885910",l7:"iso885913",l8:"iso885914",l9:"iso885915",l10:"iso885916",isoir14:"iso646jp",isoir57:"iso646cn",isoir100:"iso88591",isoir101:"iso88592",isoir109:"iso88593",isoir110:"iso88594",isoir144:"iso88595",isoir127:"iso88596",isoir126:"iso88597",isoir138:"iso88598",isoir148:"iso88599",isoir157:"iso885910",isoir166:"tis620",isoir179:"iso885913",isoir199:"iso885914",isoir203:"iso885915",isoir226:"iso885916",cp819:"iso88591",ibm819:"iso88591",cyrillic:"iso88595",arabic:"iso88596",arabic8:"iso88596",ecma114:"iso88596",asmo708:"iso88596",greek:"iso88597",greek8:"iso88597",ecma118:"iso88597",elot928:"iso88597",hebrew:"iso88598",hebrew8:"iso88598",turkish:"iso88599",turkish8:"iso88599",thai:"iso885911",thai8:"iso885911",celtic:"iso885914",celtic8:"iso885914",isoceltic:"iso885914",tis6200:"tis620",tis62025291:"tis620",tis62025330:"tis620",1e4:"macroman",10006:"macgreek",10007:"maccyrillic",10079:"maciceland",10081:"macturkish",cspc8codepage437:"cp437",cspc775baltic:"cp775",cspc850multilingual:"cp850",cspcp852:"cp852",cspc862latinhebrew:"cp862",cpgr:"cp869",msee:"cp1250",mscyrl:"cp1251",msansi:"cp1252",msgreek:"cp1253",msturk:"cp1254",mshebr:"cp1255",msarab:"cp1256",winbaltrim:"cp1257",cp20866:"koi8r",20866:"koi8r",ibm878:"koi8r",cskoi8r:"koi8r",cp21866:"koi8u",21866:"koi8u",ibm1168:"koi8u",strk10482002:"rk1048",tcvn5712:"tcvn",tcvn57121:"tcvn",gb198880:"iso646cn",cn:"iso646cn",csiso14jisc6220ro:"iso646jp",jisc62201969ro:"iso646jp",jp:"iso646jp",cshproman8:"hproman8",r8:"hproman8",roman8:"hproman8",xroman8:"hproman8",ibm1051:"hproman8",mac:"macintosh",csmacintosh:"macintosh"}});var kQ1=o((Sz5,SQ1)=>{SQ1.exports={"437":"cp437","737":"cp737","775":"cp775","850":"cp850","852":"cp852","855":"cp855","856":"cp856","857":"cp857","858":"cp858","860":"cp860","861":"cp861","862":"cp862","863":"cp863","864":"cp864","865":"cp865","866":"cp866","869":"cp869","874":"windows874","922":"cp922","1046":"cp1046","1124":"cp1124","1125":"cp1125","1129":"cp1129","1133":"cp1133","1161":"cp1161","1162":"cp1162","1163":"cp1163","1250":"windows1250","1251":"windows1251","1252":"windows1252","1253":"windows1253","1254":"windows1254","1255":"windows1255","1256":"windows1256","1257":"windows1257","1258":"windows1258","28591":"iso88591","28592":"iso88592","28593":"iso88593","28594":"iso88594","28595":"iso88595","28596":"iso88596","28597":"iso88597","28598":"iso88598","28599":"iso88599","28600":"iso885910","28601":"iso885911","28603":"iso885913","28604":"iso885914","28605":"iso885915","28606":"iso885916",windows874:{type:"_sbcs",chars:"\u20AC\uFFFD\uFFFD\uFFFD\uFFFD\u2026\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"},win874:"windows874",cp874:"windows874",windows1250:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\uFFFD\u201E\u2026\u2020\u2021\uFFFD\u2030\u0160\u2039\u015A\u0164\u017D\u0179\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0161\u203A\u015B\u0165\u017E\u017A\xA0\u02C7\u02D8\u0141\xA4\u0104\xA6\xA7\xA8\xA9\u015E\xAB\xAC\xAD\xAE\u017B\xB0\xB1\u02DB\u0142\xB4\xB5\xB6\xB7\xB8\u0105\u015F\xBB\u013D\u02DD\u013E\u017C\u0154\xC1\xC2\u0102\xC4\u0139\u0106\xC7\u010C\xC9\u0118\xCB\u011A\xCD\xCE\u010E\u0110\u0143\u0147\xD3\xD4\u0150\xD6\xD7\u0158\u016E\xDA\u0170\xDC\xDD\u0162\xDF\u0155\xE1\xE2\u0103\xE4\u013A\u0107\xE7\u010D\xE9\u0119\xEB\u011B\xED\xEE\u010F\u0111\u0144\u0148\xF3\xF4\u0151\xF6\xF7\u0159\u016F\xFA\u0171\xFC\xFD\u0163\u02D9"},win1250:"windows1250",cp1250:"windows1250",windows1251:{type:"_sbcs",chars:"\u0402\u0403\u201A\u0453\u201E\u2026\u2020\u2021\u20AC\u2030\u0409\u2039\u040A\u040C\u040B\u040F\u0452\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0459\u203A\u045A\u045C\u045B\u045F\xA0\u040E\u045E\u0408\xA4\u0490\xA6\xA7\u0401\xA9\u0404\xAB\xAC\xAD\xAE\u0407\xB0\xB1\u0406\u0456\u0491\xB5\xB6\xB7\u0451\u2116\u0454\xBB\u0458\u0405\u0455\u0457\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F"},win1251:"windows1251",cp1251:"windows1251",windows1252:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\uFFFD\u017D\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\uFFFD\u017E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},win1252:"windows1252",cp1252:"windows1252",windows1253:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\uFFFD\u2030\uFFFD\u2039\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\xA0\u0385\u0386\xA3\xA4\xA5\xA6\xA7\xA8\xA9\uFFFD\xAB\xAC\xAD\xAE\u2015\xB0\xB1\xB2\xB3\u0384\xB5\xB6\xB7\u0388\u0389\u038A\xBB\u038C\xBD\u038E\u038F\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\uFFFD\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03AA\u03AB\u03AC\u03AD\u03AE\u03AF\u03B0\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u03CA\u03CB\u03CC\u03CD\u03CE\uFFFD"},win1253:"windows1253",cp1253:"windows1253",windows1254:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\uFFFD\uFFFD\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u011E\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u0130\u015E\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u011F\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u0131\u015F\xFF"},win1254:"windows1254",cp1254:"windows1254",windows1255:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\uFFFD\u2039\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\xA0\xA1\xA2\xA3\u20AA\xA5\xA6\xA7\xA8\xA9\xD7\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xF7\xBB\xBC\xBD\xBE\xBF\u05B0\u05B1\u05B2\u05B3\u05B4\u05B5\u05B6\u05B7\u05B8\u05B9\u05BA\u05BB\u05BC\u05BD\u05BE\u05BF\u05C0\u05C1\u05C2\u05C3\u05F0\u05F1\u05F2\u05F3\u05F4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\uFFFD\u200E\u200F\uFFFD"},win1255:"windows1255",cp1255:"windows1255",windows1256:{type:"_sbcs",chars:"\u20AC\u067E\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0679\u2039\u0152\u0686\u0698\u0688\u06AF\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u06A9\u2122\u0691\u203A\u0153\u200C\u200D\u06BA\xA0\u060C\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\u06BE\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\u061B\xBB\xBC\xBD\xBE\u061F\u06C1\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\xD7\u0637\u0638\u0639\u063A\u0640\u0641\u0642\u0643\xE0\u0644\xE2\u0645\u0646\u0647\u0648\xE7\xE8\xE9\xEA\xEB\u0649\u064A\xEE\xEF\u064B\u064C\u064D\u064E\xF4\u064F\u0650\xF7\u0651\xF9\u0652\xFB\xFC\u200E\u200F\u06D2"},win1256:"windows1256",cp1256:"windows1256",windows1257:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\uFFFD\u201E\u2026\u2020\u2021\uFFFD\u2030\uFFFD\u2039\uFFFD\xA8\u02C7\xB8\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\xAF\u02DB\uFFFD\xA0\uFFFD\xA2\xA3\xA4\uFFFD\xA6\xA7\xD8\xA9\u0156\xAB\xAC\xAD\xAE\xC6\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xF8\xB9\u0157\xBB\xBC\xBD\xBE\xE6\u0104\u012E\u0100\u0106\xC4\xC5\u0118\u0112\u010C\xC9\u0179\u0116\u0122\u0136\u012A\u013B\u0160\u0143\u0145\xD3\u014C\xD5\xD6\xD7\u0172\u0141\u015A\u016A\xDC\u017B\u017D\xDF\u0105\u012F\u0101\u0107\xE4\xE5\u0119\u0113\u010D\xE9\u017A\u0117\u0123\u0137\u012B\u013C\u0161\u0144\u0146\xF3\u014D\xF5\xF6\xF7\u0173\u0142\u015B\u016B\xFC\u017C\u017E\u02D9"},win1257:"windows1257",cp1257:"windows1257",windows1258:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\uFFFD\u2039\u0152\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\uFFFD\u203A\u0153\uFFFD\uFFFD\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF"},win1258:"windows1258",cp1258:"windows1258",iso88591:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},cp28591:"iso88591",iso88592:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u02D8\u0141\xA4\u013D\u015A\xA7\xA8\u0160\u015E\u0164\u0179\xAD\u017D\u017B\xB0\u0105\u02DB\u0142\xB4\u013E\u015B\u02C7\xB8\u0161\u015F\u0165\u017A\u02DD\u017E\u017C\u0154\xC1\xC2\u0102\xC4\u0139\u0106\xC7\u010C\xC9\u0118\xCB\u011A\xCD\xCE\u010E\u0110\u0143\u0147\xD3\xD4\u0150\xD6\xD7\u0158\u016E\xDA\u0170\xDC\xDD\u0162\xDF\u0155\xE1\xE2\u0103\xE4\u013A\u0107\xE7\u010D\xE9\u0119\xEB\u011B\xED\xEE\u010F\u0111\u0144\u0148\xF3\xF4\u0151\xF6\xF7\u0159\u016F\xFA\u0171\xFC\xFD\u0163\u02D9"},cp28592:"iso88592",iso88593:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0126\u02D8\xA3\xA4\uFFFD\u0124\xA7\xA8\u0130\u015E\u011E\u0134\xAD\uFFFD\u017B\xB0\u0127\xB2\xB3\xB4\xB5\u0125\xB7\xB8\u0131\u015F\u011F\u0135\xBD\uFFFD\u017C\xC0\xC1\xC2\uFFFD\xC4\u010A\u0108\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\uFFFD\xD1\xD2\xD3\xD4\u0120\xD6\xD7\u011C\xD9\xDA\xDB\xDC\u016C\u015C\xDF\xE0\xE1\xE2\uFFFD\xE4\u010B\u0109\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\uFFFD\xF1\xF2\xF3\xF4\u0121\xF6\xF7\u011D\xF9\xFA\xFB\xFC\u016D\u015D\u02D9"},cp28593:"iso88593",iso88594:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0138\u0156\xA4\u0128\u013B\xA7\xA8\u0160\u0112\u0122\u0166\xAD\u017D\xAF\xB0\u0105\u02DB\u0157\xB4\u0129\u013C\u02C7\xB8\u0161\u0113\u0123\u0167\u014A\u017E\u014B\u0100\xC1\xC2\xC3\xC4\xC5\xC6\u012E\u010C\xC9\u0118\xCB\u0116\xCD\xCE\u012A\u0110\u0145\u014C\u0136\xD4\xD5\xD6\xD7\xD8\u0172\xDA\xDB\xDC\u0168\u016A\xDF\u0101\xE1\xE2\xE3\xE4\xE5\xE6\u012F\u010D\xE9\u0119\xEB\u0117\xED\xEE\u012B\u0111\u0146\u014D\u0137\xF4\xF5\xF6\xF7\xF8\u0173\xFA\xFB\xFC\u0169\u016B\u02D9"},cp28594:"iso88594",iso88595:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0401\u0402\u0403\u0404\u0405\u0406\u0407\u0408\u0409\u040A\u040B\u040C\xAD\u040E\u040F\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2116\u0451\u0452\u0453\u0454\u0455\u0456\u0457\u0458\u0459\u045A\u045B\u045C\xA7\u045E\u045F"},cp28595:"iso88595",iso88596:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\uFFFD\uFFFD\xA4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u060C\xAD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u061B\uFFFD\uFFFD\uFFFD\u061F\uFFFD\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"},cp28596:"iso88596",iso88597:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u2018\u2019\xA3\u20AC\u20AF\xA6\xA7\xA8\xA9\u037A\xAB\xAC\xAD\uFFFD\u2015\xB0\xB1\xB2\xB3\u0384\u0385\u0386\xB7\u0388\u0389\u038A\xBB\u038C\xBD\u038E\u038F\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\uFFFD\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03AA\u03AB\u03AC\u03AD\u03AE\u03AF\u03B0\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u03CA\u03CB\u03CC\u03CD\u03CE\uFFFD"},cp28597:"iso88597",iso88598:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xD7\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xF7\xBB\xBC\xBD\xBE\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2017\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\uFFFD\u200E\u200F\uFFFD"},cp28598:"iso88598",iso88599:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u011E\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u0130\u015E\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u011F\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u0131\u015F\xFF"},cp28599:"iso88599",iso885910:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0112\u0122\u012A\u0128\u0136\xA7\u013B\u0110\u0160\u0166\u017D\xAD\u016A\u014A\xB0\u0105\u0113\u0123\u012B\u0129\u0137\xB7\u013C\u0111\u0161\u0167\u017E\u2015\u016B\u014B\u0100\xC1\xC2\xC3\xC4\xC5\xC6\u012E\u010C\xC9\u0118\xCB\u0116\xCD\xCE\xCF\xD0\u0145\u014C\xD3\xD4\xD5\xD6\u0168\xD8\u0172\xDA\xDB\xDC\xDD\xDE\xDF\u0101\xE1\xE2\xE3\xE4\xE5\xE6\u012F\u010D\xE9\u0119\xEB\u0117\xED\xEE\xEF\xF0\u0146\u014D\xF3\xF4\xF5\xF6\u0169\xF8\u0173\xFA\xFB\xFC\xFD\xFE\u0138"},cp28600:"iso885910",iso885911:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"},cp28601:"iso885911",iso885913:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u201D\xA2\xA3\xA4\u201E\xA6\xA7\xD8\xA9\u0156\xAB\xAC\xAD\xAE\xC6\xB0\xB1\xB2\xB3\u201C\xB5\xB6\xB7\xF8\xB9\u0157\xBB\xBC\xBD\xBE\xE6\u0104\u012E\u0100\u0106\xC4\xC5\u0118\u0112\u010C\xC9\u0179\u0116\u0122\u0136\u012A\u013B\u0160\u0143\u0145\xD3\u014C\xD5\xD6\xD7\u0172\u0141\u015A\u016A\xDC\u017B\u017D\xDF\u0105\u012F\u0101\u0107\xE4\xE5\u0119\u0113\u010D\xE9\u017A\u0117\u0123\u0137\u012B\u013C\u0161\u0144\u0146\xF3\u014D\xF5\xF6\xF7\u0173\u0142\u015B\u016B\xFC\u017C\u017E\u2019"},cp28603:"iso885913",iso885914:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u1E02\u1E03\xA3\u010A\u010B\u1E0A\xA7\u1E80\xA9\u1E82\u1E0B\u1EF2\xAD\xAE\u0178\u1E1E\u1E1F\u0120\u0121\u1E40\u1E41\xB6\u1E56\u1E81\u1E57\u1E83\u1E60\u1EF3\u1E84\u1E85\u1E61\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0174\xD1\xD2\xD3\xD4\xD5\xD6\u1E6A\xD8\xD9\xDA\xDB\xDC\xDD\u0176\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0175\xF1\xF2\xF3\xF4\xF5\xF6\u1E6B\xF8\xF9\xFA\xFB\xFC\xFD\u0177\xFF"},cp28604:"iso885914",iso885915:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\u20AC\xA5\u0160\xA7\u0161\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u017D\xB5\xB6\xB7\u017E\xB9\xBA\xBB\u0152\u0153\u0178\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},cp28605:"iso885915",iso885916:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0105\u0141\u20AC\u201E\u0160\xA7\u0161\xA9\u0218\xAB\u0179\xAD\u017A\u017B\xB0\xB1\u010C\u0142\u017D\u201D\xB6\xB7\u017E\u010D\u0219\xBB\u0152\u0153\u0178\u017C\xC0\xC1\xC2\u0102\xC4\u0106\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0110\u0143\xD2\xD3\xD4\u0150\xD6\u015A\u0170\xD9\xDA\xDB\xDC\u0118\u021A\xDF\xE0\xE1\xE2\u0103\xE4\u0107\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0111\u0144\xF2\xF3\xF4\u0151\xF6\u015B\u0171\xF9\xFA\xFB\xFC\u0119\u021B\xFF"},cp28606:"iso885916",cp437:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm437:"cp437",csibm437:"cp437",cp737:{type:"_sbcs",chars:"\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C2\u03C4\u03C5\u03C6\u03C7\u03C8\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03C9\u03AC\u03AD\u03AE\u03CA\u03AF\u03CC\u03CD\u03CB\u03CE\u0386\u0388\u0389\u038A\u038C\u038E\u038F\xB1\u2265\u2264\u03AA\u03AB\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm737:"cp737",csibm737:"cp737",cp775:{type:"_sbcs",chars:"\u0106\xFC\xE9\u0101\xE4\u0123\xE5\u0107\u0142\u0113\u0156\u0157\u012B\u0179\xC4\xC5\xC9\xE6\xC6\u014D\xF6\u0122\xA2\u015A\u015B\xD6\xDC\xF8\xA3\xD8\xD7\xA4\u0100\u012A\xF3\u017B\u017C\u017A\u201D\xA6\xA9\xAE\xAC\xBD\xBC\u0141\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u0104\u010C\u0118\u0116\u2563\u2551\u2557\u255D\u012E\u0160\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u0172\u016A\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u017D\u0105\u010D\u0119\u0117\u012F\u0161\u0173\u016B\u017E\u2518\u250C\u2588\u2584\u258C\u2590\u2580\xD3\xDF\u014C\u0143\xF5\xD5\xB5\u0144\u0136\u0137\u013B\u013C\u0146\u0112\u0145\u2019\xAD\xB1\u201C\xBE\xB6\xA7\xF7\u201E\xB0\u2219\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm775:"cp775",csibm775:"cp775",cp850:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\xD7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xF0\xD0\xCA\xCB\xC8\u0131\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\xFE\xDE\xDA\xDB\xD9\xFD\xDD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm850:"cp850",csibm850:"cp850",cp852:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\u016F\u0107\xE7\u0142\xEB\u0150\u0151\xEE\u0179\xC4\u0106\xC9\u0139\u013A\xF4\xF6\u013D\u013E\u015A\u015B\xD6\xDC\u0164\u0165\u0141\xD7\u010D\xE1\xED\xF3\xFA\u0104\u0105\u017D\u017E\u0118\u0119\xAC\u017A\u010C\u015F\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\u011A\u015E\u2563\u2551\u2557\u255D\u017B\u017C\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u0102\u0103\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\u0111\u0110\u010E\xCB\u010F\u0147\xCD\xCE\u011B\u2518\u250C\u2588\u2584\u0162\u016E\u2580\xD3\xDF\xD4\u0143\u0144\u0148\u0160\u0161\u0154\xDA\u0155\u0170\xFD\xDD\u0163\xB4\xAD\u02DD\u02DB\u02C7\u02D8\xA7\xF7\xB8\xB0\xA8\u02D9\u0171\u0158\u0159\u25A0\xA0"},ibm852:"cp852",csibm852:"cp852",cp855:{type:"_sbcs",chars:"\u0452\u0402\u0453\u0403\u0451\u0401\u0454\u0404\u0455\u0405\u0456\u0406\u0457\u0407\u0458\u0408\u0459\u0409\u045A\u040A\u045B\u040B\u045C\u040C\u045E\u040E\u045F\u040F\u044E\u042E\u044A\u042A\u0430\u0410\u0431\u0411\u0446\u0426\u0434\u0414\u0435\u0415\u0444\u0424\u0433\u0413\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u0445\u0425\u0438\u0418\u2563\u2551\u2557\u255D\u0439\u0419\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u043A\u041A\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\u043B\u041B\u043C\u041C\u043D\u041D\u043E\u041E\u043F\u2518\u250C\u2588\u2584\u041F\u044F\u2580\u042F\u0440\u0420\u0441\u0421\u0442\u0422\u0443\u0423\u0436\u0416\u0432\u0412\u044C\u042C\u2116\xAD\u044B\u042B\u0437\u0417\u0448\u0428\u044D\u042D\u0449\u0429\u0447\u0427\xA7\u25A0\xA0"},ibm855:"cp855",csibm855:"cp855",cp856:{type:"_sbcs",chars:"\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\xA3\uFFFD\xD7\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xAE\xAC\xBD\xBC\uFFFD\xAB\xBB\u2591\u2592\u2593\u2502\u2524\uFFFD\uFFFD\uFFFD\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\uFFFD\uFFFD\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2518\u250C\u2588\u2584\xA6\uFFFD\u2580\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xB5\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm856:"cp856",csibm856:"cp856",cp857:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\u0131\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\u0130\xD6\xDC\xF8\xA3\xD8\u015E\u015F\xE1\xED\xF3\xFA\xF1\xD1\u011E\u011F\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xBA\xAA\xCA\xCB\xC8\uFFFD\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\uFFFD\xD7\xDA\xDB\xD9\xEC\xFF\xAF\xB4\xAD\xB1\uFFFD\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm857:"cp857",csibm857:"cp857",cp858:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\xD7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xF0\xD0\xCA\xCB\xC8\u20AC\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\xFE\xDE\xDA\xDB\xD9\xFD\xDD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm858:"cp858",csibm858:"cp858",cp860:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE3\xE0\xC1\xE7\xEA\xCA\xE8\xCD\xD4\xEC\xC3\xC2\xC9\xC0\xC8\xF4\xF5\xF2\xDA\xF9\xCC\xD5\xDC\xA2\xA3\xD9\u20A7\xD3\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xD2\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm860:"cp860",csibm860:"cp860",cp861:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xD0\xF0\xDE\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xFE\xFB\xDD\xFD\xD6\xDC\xF8\xA3\xD8\u20A7\u0192\xE1\xED\xF3\xFA\xC1\xCD\xD3\xDA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm861:"cp861",csibm861:"cp861",cp862:{type:"_sbcs",chars:"\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm862:"cp862",csibm862:"cp862",cp863:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xC2\xE0\xB6\xE7\xEA\xEB\xE8\xEF\xEE\u2017\xC0\xA7\xC9\xC8\xCA\xF4\xCB\xCF\xFB\xF9\xA4\xD4\xDC\xA2\xA3\xD9\xDB\u0192\xA6\xB4\xF3\xFA\xA8\xB8\xB3\xAF\xCE\u2310\xAC\xBD\xBC\xBE\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm863:"cp863",csibm863:"cp863",cp864:{type:"_sbcs",chars:`\x00\x01\x02\x03\x04\x05\x06\x07\b	
\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#$\u066A&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\xB0\xB7\u2219\u221A\u2592\u2500\u2502\u253C\u2524\u252C\u251C\u2534\u2510\u250C\u2514\u2518\u03B2\u221E\u03C6\xB1\xBD\xBC\u2248\xAB\xBB\uFEF7\uFEF8\uFFFD\uFFFD\uFEFB\uFEFC\uFFFD\xA0\xAD\uFE82\xA3\xA4\uFE84\uFFFD\uFFFD\uFE8E\uFE8F\uFE95\uFE99\u060C\uFE9D\uFEA1\uFEA5\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\uFED1\u061B\uFEB1\uFEB5\uFEB9\u061F\xA2\uFE80\uFE81\uFE83\uFE85\uFECA\uFE8B\uFE8D\uFE91\uFE93\uFE97\uFE9B\uFE9F\uFEA3\uFEA7\uFEA9\uFEAB\uFEAD\uFEAF\uFEB3\uFEB7\uFEBB\uFEBF\uFEC1\uFEC5\uFECB\uFECF\xA6\xAC\xF7\xD7\uFEC9\u0640\uFED3\uFED7\uFEDB\uFEDF\uFEE3\uFEE7\uFEEB\uFEED\uFEEF\uFEF3\uFEBD\uFECC\uFECE\uFECD\uFEE1\uFE7D\u0651\uFEE5\uFEE9\uFEEC\uFEF0\uFEF2\uFED0\uFED5\uFEF5\uFEF6\uFEDD\uFED9\uFEF1\u25A0\uFFFD`},ibm864:"cp864",csibm864:"cp864",cp865:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xA4\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm865:"cp865",csibm865:"cp865",cp866:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0404\u0454\u0407\u0457\u040E\u045E\xB0\u2219\xB7\u221A\u2116\xA4\u25A0\xA0"},ibm866:"cp866",csibm866:"cp866",cp869:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0386\uFFFD\xB7\xAC\xA6\u2018\u2019\u0388\u2015\u0389\u038A\u03AA\u038C\uFFFD\uFFFD\u038E\u03AB\xA9\u038F\xB2\xB3\u03AC\xA3\u03AD\u03AE\u03AF\u03CA\u0390\u03CC\u03CD\u0391\u0392\u0393\u0394\u0395\u0396\u0397\xBD\u0398\u0399\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u039A\u039B\u039C\u039D\u2563\u2551\u2557\u255D\u039E\u039F\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u03A0\u03A1\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B1\u03B2\u03B3\u2518\u250C\u2588\u2584\u03B4\u03B5\u2580\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C2\u03C4\u0384\xAD\xB1\u03C5\u03C6\u03C7\xA7\u03C8\u0385\xB0\xA8\u03C9\u03CB\u03B0\u03CE\u25A0\xA0"},ibm869:"cp869",csibm869:"cp869",cp922:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\u203E\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0160\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\u017D\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0161\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\u017E\xFF"},ibm922:"cp922",csibm922:"cp922",cp1046:{type:"_sbcs",chars:"\uFE88\xD7\xF7\uF8F6\uF8F5\uF8F4\uF8F7\uFE71\x88\u25A0\u2502\u2500\u2510\u250C\u2514\u2518\uFE79\uFE7B\uFE7D\uFE7F\uFE77\uFE8A\uFEF0\uFEF3\uFEF2\uFECE\uFECF\uFED0\uFEF6\uFEF8\uFEFA\uFEFC\xA0\uF8FA\uF8F9\uF8F8\xA4\uF8FB\uFE8B\uFE91\uFE97\uFE9B\uFE9F\uFEA3\u060C\xAD\uFEA7\uFEB3\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\uFEB7\u061B\uFEBB\uFEBF\uFECA\u061F\uFECB\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\uFEC7\u0639\u063A\uFECC\uFE82\uFE84\uFE8E\uFED3\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\uFED7\uFEDB\uFEDF\uF8FC\uFEF5\uFEF7\uFEF9\uFEFB\uFEE3\uFEE7\uFEEC\uFEE9\uFFFD"},ibm1046:"cp1046",csibm1046:"cp1046",cp1124:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0401\u0402\u0490\u0404\u0405\u0406\u0407\u0408\u0409\u040A\u040B\u040C\xAD\u040E\u040F\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2116\u0451\u0452\u0491\u0454\u0455\u0456\u0457\u0458\u0459\u045A\u045B\u045C\xA7\u045E\u045F"},ibm1124:"cp1124",csibm1124:"cp1124",cp1125:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0490\u0491\u0404\u0454\u0406\u0456\u0407\u0457\xB7\u221A\u2116\xA4\u25A0\xA0"},ibm1125:"cp1125",csibm1125:"cp1125",cp1129:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\u0153\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u0178\xB5\xB6\xB7\u0152\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF"},ibm1129:"cp1129",csibm1129:"cp1129",cp1133:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E81\u0E82\u0E84\u0E87\u0E88\u0EAA\u0E8A\u0E8D\u0E94\u0E95\u0E96\u0E97\u0E99\u0E9A\u0E9B\u0E9C\u0E9D\u0E9E\u0E9F\u0EA1\u0EA2\u0EA3\u0EA5\u0EA7\u0EAB\u0EAD\u0EAE\uFFFD\uFFFD\uFFFD\u0EAF\u0EB0\u0EB2\u0EB3\u0EB4\u0EB5\u0EB6\u0EB7\u0EB8\u0EB9\u0EBC\u0EB1\u0EBB\u0EBD\uFFFD\uFFFD\uFFFD\u0EC0\u0EC1\u0EC2\u0EC3\u0EC4\u0EC8\u0EC9\u0ECA\u0ECB\u0ECC\u0ECD\u0EC6\uFFFD\u0EDC\u0EDD\u20AD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0ED0\u0ED1\u0ED2\u0ED3\u0ED4\u0ED5\u0ED6\u0ED7\u0ED8\u0ED9\uFFFD\uFFFD\xA2\xAC\xA6\uFFFD"},ibm1133:"cp1133",csibm1133:"cp1133",cp1161:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0E48\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\u0E49\u0E4A\u0E4B\u20AC\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\xA2\xAC\xA6\xA0"},ibm1161:"cp1161",csibm1161:"cp1161",cp1162:{type:"_sbcs",chars:"\u20AC\x81\x82\x83\x84\u2026\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"},ibm1162:"cp1162",csibm1162:"cp1162",cp1163:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\u20AC\xA5\xA6\xA7\u0153\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u0178\xB5\xB6\xB7\u0152\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF"},ibm1163:"cp1163",csibm1163:"cp1163",maccroatian:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\u0160\u2122\xB4\xA8\u2260\u017D\xD8\u221E\xB1\u2264\u2265\u2206\xB5\u2202\u2211\u220F\u0161\u222B\xAA\xBA\u2126\u017E\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u0106\xAB\u010C\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\uFFFD\xA9\u2044\xA4\u2039\u203A\xC6\xBB\u2013\xB7\u201A\u201E\u2030\xC2\u0107\xC1\u010D\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u0111\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u03C0\xCB\u02DA\xB8\xCA\xE6\u02C7"},maccyrillic:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\xA2\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u2202\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\xA4"},macgreek:{type:"_sbcs",chars:"\xC4\xB9\xB2\xC9\xB3\xD6\xDC\u0385\xE0\xE2\xE4\u0384\xA8\xE7\xE9\xE8\xEA\xEB\xA3\u2122\xEE\xEF\u2022\xBD\u2030\xF4\xF6\xA6\xAD\xF9\xFB\xFC\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xDF\xAE\xA9\u03A3\u03AA\xA7\u2260\xB0\u0387\u0391\xB1\u2264\u2265\xA5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xAC\u039F\u03A1\u2248\u03A4\xAB\xBB\u2026\xA0\u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xF7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\uFFFD"},maciceland:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\xDD\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\xD0\xF0\xDE\xFE\xFD\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macroman:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macromania:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\u0102\u015E\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\u0103\u015F\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\u0162\u0163\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macthai:{type:"_sbcs",chars:"\xAB\xBB\u2026\uF88C\uF88F\uF892\uF895\uF898\uF88B\uF88E\uF891\uF894\uF897\u201C\u201D\uF899\uFFFD\u2022\uF884\uF889\uF885\uF886\uF887\uF888\uF88A\uF88D\uF890\uF893\uF896\u2018\u2019\uFFFD\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFEFF\u200B\u2013\u2014\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u2122\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\xAE\xA9\uFFFD\uFFFD\uFFFD\uFFFD"},macturkish:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\uFFFD\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macukraine:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\u0490\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\xA4"},koi8r:{type:"_sbcs",chars:"\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u2553\u2554\u2555\u2556\u2557\u2558\u2559\u255A\u255B\u255C\u255D\u255E\u255F\u2560\u2561\u0401\u2562\u2563\u2564\u2565\u2566\u2567\u2568\u2569\u256A\u256B\u256C\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},koi8u:{type:"_sbcs",chars:"\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255A\u255B\u0491\u255D\u255E\u255F\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256A\u0490\u256C\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},koi8ru:{type:"_sbcs",chars:"\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255A\u255B\u0491\u045E\u255E\u255F\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256A\u0490\u040E\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},koi8t:{type:"_sbcs",chars:"\u049B\u0493\u201A\u0492\u201E\u2026\u2020\u2021\uFFFD\u2030\u04B3\u2039\u04B2\u04B7\u04B6\uFFFD\u049A\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u04EF\u04EE\u0451\xA4\u04E3\xA6\xA7\uFFFD\uFFFD\uFFFD\xAB\xAC\xAD\xAE\uFFFD\xB0\xB1\xB2\u0401\uFFFD\u04E2\xB6\xB7\uFFFD\u2116\uFFFD\xBB\uFFFD\uFFFD\uFFFD\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},armscii8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\u0587\u0589)(\xBB\xAB\u2014.\u055D,-\u058A\u2026\u055C\u055B\u055E\u0531\u0561\u0532\u0562\u0533\u0563\u0534\u0564\u0535\u0565\u0536\u0566\u0537\u0567\u0538\u0568\u0539\u0569\u053A\u056A\u053B\u056B\u053C\u056C\u053D\u056D\u053E\u056E\u053F\u056F\u0540\u0570\u0541\u0571\u0542\u0572\u0543\u0573\u0544\u0574\u0545\u0575\u0546\u0576\u0547\u0577\u0548\u0578\u0549\u0579\u054A\u057A\u054B\u057B\u054C\u057C\u054D\u057D\u054E\u057E\u054F\u057F\u0550\u0580\u0551\u0581\u0552\u0582\u0553\u0583\u0554\u0584\u0555\u0585\u0556\u0586\u055A\uFFFD"},rk1048:{type:"_sbcs",chars:"\u0402\u0403\u201A\u0453\u201E\u2026\u2020\u2021\u20AC\u2030\u0409\u2039\u040A\u049A\u04BA\u040F\u0452\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0459\u203A\u045A\u049B\u04BB\u045F\xA0\u04B0\u04B1\u04D8\xA4\u04E8\xA6\xA7\u0401\xA9\u0492\xAB\xAC\xAD\xAE\u04AE\xB0\xB1\u0406\u0456\u04E9\xB5\xB6\xB7\u0451\u2116\u0493\xBB\u04D9\u04A2\u04A3\u04AF\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F"},tcvn:{type:"_sbcs",chars:`\x00\xDA\u1EE4\x03\u1EEA\u1EEC\u1EEE\x07\b	
\v\f\r\x0E\x0F\x10\u1EE8\u1EF0\u1EF2\u1EF6\u1EF8\xDD\u1EF4\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\xC0\u1EA2\xC3\xC1\u1EA0\u1EB6\u1EAC\xC8\u1EBA\u1EBC\xC9\u1EB8\u1EC6\xCC\u1EC8\u0128\xCD\u1ECA\xD2\u1ECE\xD5\xD3\u1ECC\u1ED8\u1EDC\u1EDE\u1EE0\u1EDA\u1EE2\xD9\u1EE6\u0168\xA0\u0102\xC2\xCA\xD4\u01A0\u01AF\u0110\u0103\xE2\xEA\xF4\u01A1\u01B0\u0111\u1EB0\u0300\u0309\u0303\u0301\u0323\xE0\u1EA3\xE3\xE1\u1EA1\u1EB2\u1EB1\u1EB3\u1EB5\u1EAF\u1EB4\u1EAE\u1EA6\u1EA8\u1EAA\u1EA4\u1EC0\u1EB7\u1EA7\u1EA9\u1EAB\u1EA5\u1EAD\xE8\u1EC2\u1EBB\u1EBD\xE9\u1EB9\u1EC1\u1EC3\u1EC5\u1EBF\u1EC7\xEC\u1EC9\u1EC4\u1EBE\u1ED2\u0129\xED\u1ECB\xF2\u1ED4\u1ECF\xF5\xF3\u1ECD\u1ED3\u1ED5\u1ED7\u1ED1\u1ED9\u1EDD\u1EDF\u1EE1\u1EDB\u1EE3\xF9\u1ED6\u1EE7\u0169\xFA\u1EE5\u1EEB\u1EED\u1EEF\u1EE9\u1EF1\u1EF3\u1EF7\u1EF9\xFD\u1EF5\u1ED0`},georgianacademy:{type:"_sbcs",chars:"\x80\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\x9E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10D7\u10D8\u10D9\u10DA\u10DB\u10DC\u10DD\u10DE\u10DF\u10E0\u10E1\u10E2\u10E3\u10E4\u10E5\u10E6\u10E7\u10E8\u10E9\u10EA\u10EB\u10EC\u10ED\u10EE\u10EF\u10F0\u10F1\u10F2\u10F3\u10F4\u10F5\u10F6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},georgianps:{type:"_sbcs",chars:"\x80\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\x9E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10F1\u10D7\u10D8\u10D9\u10DA\u10DB\u10DC\u10F2\u10DD\u10DE\u10DF\u10E0\u10E1\u10E2\u10F3\u10E3\u10E4\u10E5\u10E6\u10E7\u10E8\u10E9\u10EA\u10EB\u10EC\u10ED\u10EE\u10F4\u10EF\u10F0\u10F5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},pt154:{type:"_sbcs",chars:"\u0496\u0492\u04EE\u0493\u201E\u2026\u04B6\u04AE\u04B2\u04AF\u04A0\u04E2\u04A2\u049A\u04BA\u04B8\u0497\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u04B3\u04B7\u04A1\u04E3\u04A3\u049B\u04BB\u04B9\xA0\u040E\u045E\u0408\u04E8\u0498\u04B0\xA7\u0401\xA9\u04D8\xAB\xAC\u04EF\xAE\u049C\xB0\u04B1\u0406\u0456\u0499\u04E9\xB6\xB7\u0451\u2116\u04D9\xBB\u0458\u04AA\u04AB\u049D\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F"},viscii:{type:"_sbcs",chars:`\x00\x01\u1EB2\x03\x04\u1EB4\u1EAA\x07\b	
\v\f\r\x0E\x0F\x10\x11\x12\x13\u1EF6\x15\x16\x17\x18\u1EF8\x1A\x1B\x1C\x1D\u1EF4\x1F !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\u1EA0\u1EAE\u1EB0\u1EB6\u1EA4\u1EA6\u1EA8\u1EAC\u1EBC\u1EB8\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EE2\u1EDA\u1EDC\u1EDE\u1ECA\u1ECE\u1ECC\u1EC8\u1EE6\u0168\u1EE4\u1EF2\xD5\u1EAF\u1EB1\u1EB7\u1EA5\u1EA7\u1EA9\u1EAD\u1EBD\u1EB9\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1ED1\u1ED3\u1ED5\u1ED7\u1EE0\u01A0\u1ED9\u1EDD\u1EDF\u1ECB\u1EF0\u1EE8\u1EEA\u1EEC\u01A1\u1EDB\u01AF\xC0\xC1\xC2\xC3\u1EA2\u0102\u1EB3\u1EB5\xC8\xC9\xCA\u1EBA\xCC\xCD\u0128\u1EF3\u0110\u1EE9\xD2\xD3\xD4\u1EA1\u1EF7\u1EEB\u1EED\xD9\xDA\u1EF9\u1EF5\xDD\u1EE1\u01B0\xE0\xE1\xE2\xE3\u1EA3\u0103\u1EEF\u1EAB\xE8\xE9\xEA\u1EBB\xEC\xED\u0129\u1EC9\u0111\u1EF1\xF2\xF3\xF4\xF5\u1ECF\u1ECD\u1EE5\xF9\xFA\u0169\u1EE7\xFD\u1EE3\u1EEE`},iso646cn:{type:"_sbcs",chars:`\x00\x01\x02\x03\x04\x05\x06\x07\b	
\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#\xA5%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD`},iso646jp:{type:"_sbcs",chars:`\x00\x01\x02\x03\x04\x05\x06\x07\b	
\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\xA5]^_\`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD`},hproman8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xC0\xC2\xC8\xCA\xCB\xCE\xCF\xB4\u02CB\u02C6\xA8\u02DC\xD9\xDB\u20A4\xAF\xDD\xFD\xB0\xC7\xE7\xD1\xF1\xA1\xBF\xA4\xA3\xA5\xA7\u0192\xA2\xE2\xEA\xF4\xFB\xE1\xE9\xF3\xFA\xE0\xE8\xF2\xF9\xE4\xEB\xF6\xFC\xC5\xEE\xD8\xC6\xE5\xED\xF8\xE6\xC4\xEC\xD6\xDC\xC9\xEF\xDF\xD4\xC1\xC3\xE3\xD0\xF0\xCD\xCC\xD3\xD2\xD5\xF5\u0160\u0161\xDA\u0178\xFF\xDE\xFE\xB7\xB5\xB6\xBE\u2014\xBC\xBD\xAA\xBA\xAB\u25A0\xBB\xB1\uFFFD"},macintosh:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},ascii:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"},tis620:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"}}});var xQ1=o((eC6)=>{var pU0=qG().Buffer;eC6._dbcs=iH;var ZX=-1,vQ1=-2,A2=-10,PG=-1000,Rq=Array(256),Xv=-1;for(Yv=0;Yv<256;Yv++)Rq[Yv]=ZX;var Yv;function iH($,Y){if(this.encodingName=$.encodingName,!$)throw Error("DBCS codec is called without the data.");if(!$.table)throw Error("Encoding '"+this.encodingName+"' has no data.");var X=$.table();this.decodeTables=[],this.decodeTables[0]=Rq.slice(0),this.decodeTableSeq=[];for(var G=0;G<X.length;G++)this._addDecodeChunk(X[G]);if(typeof $.gb18030==="function"){this.gb18030=$.gb18030();var J=this.decodeTables.length;this.decodeTables.push(Rq.slice(0));var Q=this.decodeTables.length;this.decodeTables.push(Rq.slice(0));var W=this.decodeTables[0];for(var G=129;G<=254;G++){var K=this.decodeTables[PG-W[G]];for(var Z=48;Z<=57;Z++){if(K[Z]===ZX)K[Z]=PG-J;else if(K[Z]>PG)throw Error("gb18030 decode tables conflict at byte 2");var H=this.decodeTables[PG-K[Z]];for(var z=129;z<=254;z++){if(H[z]===ZX)H[z]=PG-Q;else if(H[z]===PG-Q)continue;else if(H[z]>PG)throw Error("gb18030 decode tables conflict at byte 3");var V=this.decodeTables[PG-H[z]];for(var F=48;F<=57;F++)if(V[F]===ZX)V[F]=vQ1}}}}this.defaultCharUnicode=Y.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var L={};if($.encodeSkipVals)for(var G=0;G<$.encodeSkipVals.length;G++){var N=$.encodeSkipVals[G];if(typeof N==="number")L[N]=!0;else for(var Z=N.from;Z<=N.to;Z++)L[Z]=!0}if(this._fillEncodeTable(0,0,L),$.encodeAdd){for(var D in $.encodeAdd)if(Object.prototype.hasOwnProperty.call($.encodeAdd,D))this._setEncodeChar(D.charCodeAt(0),$.encodeAdd[D])}if(this.defCharSB=this.encodeTable[0][Y.defaultCharSingleByte.charCodeAt(0)],this.defCharSB===ZX)this.defCharSB=this.encodeTable[0]["?"];if(this.defCharSB===ZX)this.defCharSB=63}iH.prototype.encoder=Fr;iH.prototype.decoder=dU0;iH.prototype._getDecodeTrieNode=function($){var Y=[];for(;$>0;$>>>=8)Y.push($&255);if(Y.length==0)Y.push(0);var X=this.decodeTables[0];for(var G=Y.length-1;G>0;G--){var J=X[Y[G]];if(J==ZX)X[Y[G]]=PG-this.decodeTables.length,this.decodeTables.push(X=Rq.slice(0));else if(J<=PG)X=this.decodeTables[PG-J];else throw Error("Overwrite byte in "+this.encodingName+", addr: "+$.toString(16))}return X};iH.prototype._addDecodeChunk=function($){var Y=parseInt($[0],16),X=this._getDecodeTrieNode(Y);Y=Y&255;for(var G=1;G<$.length;G++){var J=$[G];if(typeof J==="string")for(var Q=0;Q<J.length;){var W=J.charCodeAt(Q++);if(W>=55296&&W<56320){var K=J.charCodeAt(Q++);if(K>=56320&&K<57344)X[Y++]=65536+(W-55296)*1024+(K-56320);else throw Error("Incorrect surrogate pair in "+this.encodingName+" at chunk "+$[0])}else if(W>4080&&W<=4095){var Z=4095-W+2,H=[];for(var z=0;z<Z;z++)H.push(J.charCodeAt(Q++));X[Y++]=A2-this.decodeTableSeq.length,this.decodeTableSeq.push(H)}else X[Y++]=W}else if(typeof J==="number"){var V=X[Y-1]+1;for(var Q=0;Q<J;Q++)X[Y++]=V++}else throw Error("Incorrect type '"+typeof J+"' given in "+this.encodingName+" at chunk "+$[0])}if(Y>255)throw Error("Incorrect chunk in "+this.encodingName+" at addr "+$[0]+": too long"+Y)};iH.prototype._getEncodeBucket=function($){var Y=$>>8;if(this.encodeTable[Y]===void 0)this.encodeTable[Y]=Rq.slice(0);return this.encodeTable[Y]};iH.prototype._setEncodeChar=function($,Y){var X=this._getEncodeBucket($),G=$&255;if(X[G]<=A2)this.encodeTableSeq[A2-X[G]][Xv]=Y;else if(X[G]==ZX)X[G]=Y};iH.prototype._setEncodeSequence=function($,Y){var X=$[0],G=this._getEncodeBucket(X),J=X&255,Q;if(G[J]<=A2)Q=this.encodeTableSeq[A2-G[J]];else{if(Q={},G[J]!==ZX)Q[Xv]=G[J];G[J]=A2-this.encodeTableSeq.length,this.encodeTableSeq.push(Q)}for(var W=1;W<$.length-1;W++){var K=Q[X];if(typeof K==="object")Q=K;else if(Q=Q[X]={},K!==void 0)Q[Xv]=K}X=$[$.length-1],Q[X]=Y};iH.prototype._fillEncodeTable=function($,Y,X){var G=this.decodeTables[$],J=!1,Q={};for(var W=0;W<256;W++){var K=G[W],Z=Y+W;if(X[Z])continue;if(K>=0)this._setEncodeChar(K,Z),J=!0;else if(K<=PG){var H=PG-K;if(!Q[H]){var z=Z<<8>>>0;if(this._fillEncodeTable(H,z,X))J=!0;else Q[H]=!0}}else if(K<=A2)this._setEncodeSequence(this.decodeTableSeq[A2-K],Z),J=!0}return J};function Fr($,Y){this.leadSurrogate=-1,this.seqObj=void 0,this.encodeTable=Y.encodeTable,this.encodeTableSeq=Y.encodeTableSeq,this.defaultCharSingleByte=Y.defCharSB,this.gb18030=Y.gb18030}Fr.prototype.write=function($){var Y=pU0.alloc($.length*(this.gb18030?4:3)),X=this.leadSurrogate,G=this.seqObj,J=-1,Q=0,W=0;while(!0){if(J===-1){if(Q==$.length)break;var K=$.charCodeAt(Q++)}else{var K=J;J=-1}if(K>=55296&&K<57344)if(K<56320)if(X===-1){X=K;continue}else X=K,K=ZX;else if(X!==-1)K=65536+(X-55296)*1024+(K-56320),X=-1;else K=ZX;else if(X!==-1)J=K,K=ZX,X=-1;var Z=ZX;if(G!==void 0&&K!=ZX){var H=G[K];if(typeof H==="object"){G=H;continue}else if(typeof H==="number")Z=H;else if(H==null){if(H=G[Xv],H!==void 0)Z=H,J=K}G=void 0}else if(K>=0){var z=this.encodeTable[K>>8];if(z!==void 0)Z=z[K&255];if(Z<=A2){G=this.encodeTableSeq[A2-Z];continue}if(Z==ZX&&this.gb18030){var V=cU0(this.gb18030.uChars,K);if(V!=-1){var Z=this.gb18030.gbChars[V]+(K-this.gb18030.uChars[V]);Y[W++]=129+Math.floor(Z/12600),Z=Z%12600,Y[W++]=48+Math.floor(Z/1260),Z=Z%1260,Y[W++]=129+Math.floor(Z/10),Z=Z%10,Y[W++]=48+Z;continue}}}if(Z===ZX)Z=this.defaultCharSingleByte;if(Z<256)Y[W++]=Z;else if(Z<65536)Y[W++]=Z>>8,Y[W++]=Z&255;else if(Z<16777216)Y[W++]=Z>>16,Y[W++]=Z>>8&255,Y[W++]=Z&255;else Y[W++]=Z>>>24,Y[W++]=Z>>>16&255,Y[W++]=Z>>>8&255,Y[W++]=Z&255}return this.seqObj=G,this.leadSurrogate=X,Y.slice(0,W)};Fr.prototype.end=function(){if(this.leadSurrogate===-1&&this.seqObj===void 0)return;var $=pU0.alloc(10),Y=0;if(this.seqObj){var X=this.seqObj[Xv];if(X!==void 0)if(X<256)$[Y++]=X;else $[Y++]=X>>8,$[Y++]=X&255;this.seqObj=void 0}if(this.leadSurrogate!==-1)$[Y++]=this.defaultCharSingleByte,this.leadSurrogate=-1;return $.slice(0,Y)};Fr.prototype.findIdx=cU0;function dU0($,Y){this.nodeIdx=0,this.prevBytes=[],this.decodeTables=Y.decodeTables,this.decodeTableSeq=Y.decodeTableSeq,this.defaultCharUnicode=Y.defaultCharUnicode,this.gb18030=Y.gb18030}dU0.prototype.write=function($){var Y=pU0.alloc($.length*2),X=this.nodeIdx,G=this.prevBytes,J=this.prevBytes.length,Q=-this.prevBytes.length,W;for(var K=0,Z=0;K<$.length;K++){var H=K>=0?$[K]:G[K+J],W=this.decodeTables[X][H];if(W>=0);else if(W===ZX)W=this.defaultCharUnicode.charCodeAt(0),K=Q;else if(W===vQ1){if(K>=3)var z=($[K-3]-129)*12600+($[K-2]-48)*1260+($[K-1]-129)*10+(H-48);else var z=(G[K-3+J]-129)*12600+((K-2>=0?$[K-2]:G[K-2+J])-48)*1260+((K-1>=0?$[K-1]:G[K-1+J])-129)*10+(H-48);var V=cU0(this.gb18030.gbChars,z);W=this.gb18030.uChars[V]+z-this.gb18030.gbChars[V]}else if(W<=PG){X=PG-W;continue}else if(W<=A2){var F=this.decodeTableSeq[A2-W];for(var L=0;L<F.length-1;L++)W=F[L],Y[Z++]=W&255,Y[Z++]=W>>8;W=F[F.length-1]}else throw Error("iconv-lite internal error: invalid decoding table value "+W+" at "+X+"/"+H);if(W>=65536){W-=65536;var N=55296|W>>10;Y[Z++]=N&255,Y[Z++]=N>>8,W=56320|W&1023}Y[Z++]=W&255,Y[Z++]=W>>8,X=0,Q=K+1}return this.nodeIdx=X,this.prevBytes=Q>=0?Array.prototype.slice.call($,Q):G.slice(Q+J).concat(Array.prototype.slice.call($)),Y.slice(0,Z).toString("ucs2")};dU0.prototype.end=function(){var $="";while(this.prevBytes.length>0){$+=this.defaultCharUnicode;var Y=this.prevBytes.slice(1);if(this.prevBytes=[],this.nodeIdx=0,Y.length>0)$+=this.write(Y)}return this.prevBytes=[],this.nodeIdx=0,$};function cU0($,Y){if($[0]>Y)return-1;var X=0,G=$.length;while(X<G-1){var J=X+(G-X+1>>1);if($[J]<=Y)X=J;else G=J}return X}});var yQ1=o((vz5,YS6)=>{YS6.exports=[["0","\x00",128],["a1","\uFF61",62],["8140","\u3000\u3001\u3002\uFF0C\uFF0E\u30FB\uFF1A\uFF1B\uFF1F\uFF01\u309B\u309C\xB4\uFF40\xA8\uFF3E\uFFE3\uFF3F\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\u2015\u2010\uFF0F\uFF3C\uFF5E\u2225\uFF5C\u2026\u2025\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\uFF3B\uFF3D\uFF5B\uFF5D\u3008",9,"\uFF0B\uFF0D\xB1\xD7"],["8180","\xF7\uFF1D\u2260\uFF1C\uFF1E\u2266\u2267\u221E\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFFE5\uFF04\uFFE0\uFFE1\uFF05\uFF03\uFF06\uFF0A\uFF20\xA7\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u203B\u3012\u2192\u2190\u2191\u2193\u3013"],["81b8","\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229"],["81c8","\u2227\u2228\uFFE2\u21D2\u21D4\u2200\u2203"],["81da","\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C"],["81f0","\u212B\u2030\u266F\u266D\u266A\u2020\u2021\xB6"],["81fc","\u25EF"],["824f","\uFF10",9],["8260","\uFF21",25],["8281","\uFF41",25],["829f","\u3041",82],["8340","\u30A1",62],["8380","\u30E0",22],["839f","\u0391",16,"\u03A3",6],["83bf","\u03B1",16,"\u03C3",6],["8440","\u0410",5,"\u0401\u0416",25],["8470","\u0430",5,"\u0451\u0436",7],["8480","\u043E",17],["849f","\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542"],["8740","\u2460",19,"\u2160",9],["875f","\u3349\u3314\u3322\u334D\u3318\u3327\u3303\u3336\u3351\u3357\u330D\u3326\u3323\u332B\u334A\u333B\u339C\u339D\u339E\u338E\u338F\u33C4\u33A1"],["877e","\u337B"],["8780","\u301D\u301F\u2116\u33CD\u2121\u32A4",4,"\u3231\u3232\u3239\u337E\u337D\u337C\u2252\u2261\u222B\u222E\u2211\u221A\u22A5\u2220\u221F\u22BF\u2235\u2229\u222A"],["889f","\u4E9C\u5516\u5A03\u963F\u54C0\u611B\u6328\u59F6\u9022\u8475\u831C\u7A50\u60AA\u63E1\u6E25\u65ED\u8466\u82A6\u9BF5\u6893\u5727\u65A1\u6271\u5B9B\u59D0\u867B\u98F4\u7D62\u7DBE\u9B8E\u6216\u7C9F\u88B7\u5B89\u5EB5\u6309\u6697\u6848\u95C7\u978D\u674F\u4EE5\u4F0A\u4F4D\u4F9D\u5049\u56F2\u5937\u59D4\u5A01\u5C09\u60DF\u610F\u6170\u6613\u6905\u70BA\u754F\u7570\u79FB\u7DAD\u7DEF\u80C3\u840E\u8863\u8B02\u9055\u907A\u533B\u4E95\u4EA5\u57DF\u80B2\u90C1\u78EF\u4E00\u58F1\u6EA2\u9038\u7A32\u8328\u828B\u9C2F\u5141\u5370\u54BD\u54E1\u56E0\u59FB\u5F15\u98F2\u6DEB\u80E4\u852D"],["8940","\u9662\u9670\u96A0\u97FB\u540B\u53F3\u5B87\u70CF\u7FBD\u8FC2\u96E8\u536F\u9D5C\u7ABA\u4E11\u7893\u81FC\u6E26\u5618\u5504\u6B1D\u851A\u9C3B\u59E5\u53A9\u6D66\u74DC\u958F\u5642\u4E91\u904B\u96F2\u834F\u990C\u53E1\u55B6\u5B30\u5F71\u6620\u66F3\u6804\u6C38\u6CF3\u6D29\u745B\u76C8\u7A4E\u9834\u82F1\u885B\u8A60\u92ED\u6DB2\u75AB\u76CA\u99C5\u60A6\u8B01\u8D8A\u95B2\u698E\u53AD\u5186"],["8980","\u5712\u5830\u5944\u5BB4\u5EF6\u6028\u63A9\u63F4\u6CBF\u6F14\u708E\u7114\u7159\u71D5\u733F\u7E01\u8276\u82D1\u8597\u9060\u925B\u9D1B\u5869\u65BC\u6C5A\u7525\u51F9\u592E\u5965\u5F80\u5FDC\u62BC\u65FA\u6A2A\u6B27\u6BB4\u738B\u7FC1\u8956\u9D2C\u9D0E\u9EC4\u5CA1\u6C96\u837B\u5104\u5C4B\u61B6\u81C6\u6876\u7261\u4E59\u4FFA\u5378\u6069\u6E29\u7A4F\u97F3\u4E0B\u5316\u4EEE\u4F55\u4F3D\u4FA1\u4F73\u52A0\u53EF\u5609\u590F\u5AC1\u5BB6\u5BE1\u79D1\u6687\u679C\u67B6\u6B4C\u6CB3\u706B\u73C2\u798D\u79BE\u7A3C\u7B87\u82B1\u82DB\u8304\u8377\u83EF\u83D3\u8766\u8AB2\u5629\u8CA8\u8FE6\u904E\u971E\u868A\u4FC4\u5CE8\u6211\u7259\u753B\u81E5\u82BD\u86FE\u8CC0\u96C5\u9913\u99D5\u4ECB\u4F1A\u89E3\u56DE\u584A\u58CA\u5EFB\u5FEB\u602A\u6094\u6062\u61D0\u6212\u62D0\u6539"],["8a40","\u9B41\u6666\u68B0\u6D77\u7070\u754C\u7686\u7D75\u82A5\u87F9\u958B\u968E\u8C9D\u51F1\u52BE\u5916\u54B3\u5BB3\u5D16\u6168\u6982\u6DAF\u788D\u84CB\u8857\u8A72\u93A7\u9AB8\u6D6C\u99A8\u86D9\u57A3\u67FF\u86CE\u920E\u5283\u5687\u5404\u5ED3\u62E1\u64B9\u683C\u6838\u6BBB\u7372\u78BA\u7A6B\u899A\u89D2\u8D6B\u8F03\u90ED\u95A3\u9694\u9769\u5B66\u5CB3\u697D\u984D\u984E\u639B\u7B20\u6A2B"],["8a80","\u6A7F\u68B6\u9C0D\u6F5F\u5272\u559D\u6070\u62EC\u6D3B\u6E07\u6ED1\u845B\u8910\u8F44\u4E14\u9C39\u53F6\u691B\u6A3A\u9784\u682A\u515C\u7AC3\u84B2\u91DC\u938C\u565B\u9D28\u6822\u8305\u8431\u7CA5\u5208\u82C5\u74E6\u4E7E\u4F83\u51A0\u5BD2\u520A\u52D8\u52E7\u5DFB\u559A\u582A\u59E6\u5B8C\u5B98\u5BDB\u5E72\u5E79\u60A3\u611F\u6163\u61BE\u63DB\u6562\u67D1\u6853\u68FA\u6B3E\u6B53\u6C57\u6F22\u6F97\u6F45\u74B0\u7518\u76E3\u770B\u7AFF\u7BA1\u7C21\u7DE9\u7F36\u7FF0\u809D\u8266\u839E\u89B3\u8ACC\u8CAB\u9084\u9451\u9593\u9591\u95A2\u9665\u97D3\u9928\u8218\u4E38\u542B\u5CB8\u5DCC\u73A9\u764C\u773C\u5CA9\u7FEB\u8D0B\u96C1\u9811\u9854\u9858\u4F01\u4F0E\u5371\u559C\u5668\u57FA\u5947\u5B09\u5BC4\u5C90\u5E0C\u5E7E\u5FCC\u63EE\u673A\u65D7\u65E2\u671F\u68CB\u68C4"],["8b40","\u6A5F\u5E30\u6BC5\u6C17\u6C7D\u757F\u7948\u5B63\u7A00\u7D00\u5FBD\u898F\u8A18\u8CB4\u8D77\u8ECC\u8F1D\u98E2\u9A0E\u9B3C\u4E80\u507D\u5100\u5993\u5B9C\u622F\u6280\u64EC\u6B3A\u72A0\u7591\u7947\u7FA9\u87FB\u8ABC\u8B70\u63AC\u83CA\u97A0\u5409\u5403\u55AB\u6854\u6A58\u8A70\u7827\u6775\u9ECD\u5374\u5BA2\u811A\u8650\u9006\u4E18\u4E45\u4EC7\u4F11\u53CA\u5438\u5BAE\u5F13\u6025\u6551"],["8b80","\u673D\u6C42\u6C72\u6CE3\u7078\u7403\u7A76\u7AAE\u7B08\u7D1A\u7CFE\u7D66\u65E7\u725B\u53BB\u5C45\u5DE8\u62D2\u62E0\u6319\u6E20\u865A\u8A31\u8DDD\u92F8\u6F01\u79A6\u9B5A\u4EA8\u4EAB\u4EAC\u4F9B\u4FA0\u50D1\u5147\u7AF6\u5171\u51F6\u5354\u5321\u537F\u53EB\u55AC\u5883\u5CE1\u5F37\u5F4A\u602F\u6050\u606D\u631F\u6559\u6A4B\u6CC1\u72C2\u72ED\u77EF\u80F8\u8105\u8208\u854E\u90F7\u93E1\u97FF\u9957\u9A5A\u4EF0\u51DD\u5C2D\u6681\u696D\u5C40\u66F2\u6975\u7389\u6850\u7C81\u50C5\u52E4\u5747\u5DFE\u9326\u65A4\u6B23\u6B3D\u7434\u7981\u79BD\u7B4B\u7DCA\u82B9\u83CC\u887F\u895F\u8B39\u8FD1\u91D1\u541F\u9280\u4E5D\u5036\u53E5\u533A\u72D7\u7396\u77E9\u82E6\u8EAF\u99C6\u99C8\u99D2\u5177\u611A\u865E\u55B0\u7A7A\u5076\u5BD3\u9047\u9685\u4E32\u6ADB\u91E7\u5C51\u5C48"],["8c40","\u6398\u7A9F\u6C93\u9774\u8F61\u7AAA\u718A\u9688\u7C82\u6817\u7E70\u6851\u936C\u52F2\u541B\u85AB\u8A13\u7FA4\u8ECD\u90E1\u5366\u8888\u7941\u4FC2\u50BE\u5211\u5144\u5553\u572D\u73EA\u578B\u5951\u5F62\u5F84\u6075\u6176\u6167\u61A9\u63B2\u643A\u656C\u666F\u6842\u6E13\u7566\u7A3D\u7CFB\u7D4C\u7D99\u7E4B\u7F6B\u830E\u834A\u86CD\u8A08\u8A63\u8B66\u8EFD\u981A\u9D8F\u82B8\u8FCE\u9BE8"],["8c80","\u5287\u621F\u6483\u6FC0\u9699\u6841\u5091\u6B20\u6C7A\u6F54\u7A74\u7D50\u8840\u8A23\u6708\u4EF6\u5039\u5026\u5065\u517C\u5238\u5263\u55A7\u570F\u5805\u5ACC\u5EFA\u61B2\u61F8\u62F3\u6372\u691C\u6A29\u727D\u72AC\u732E\u7814\u786F\u7D79\u770C\u80A9\u898B\u8B19\u8CE2\u8ED2\u9063\u9375\u967A\u9855\u9A13\u9E78\u5143\u539F\u53B3\u5E7B\u5F26\u6E1B\u6E90\u7384\u73FE\u7D43\u8237\u8A00\u8AFA\u9650\u4E4E\u500B\u53E4\u547C\u56FA\u59D1\u5B64\u5DF1\u5EAB\u5F27\u6238\u6545\u67AF\u6E56\u72D0\u7CCA\u88B4\u80A1\u80E1\u83F0\u864E\u8A87\u8DE8\u9237\u96C7\u9867\u9F13\u4E94\u4E92\u4F0D\u5348\u5449\u543E\u5A2F\u5F8C\u5FA1\u609F\u68A7\u6A8E\u745A\u7881\u8A9E\u8AA4\u8B77\u9190\u4E5E\u9BC9\u4EA4\u4F7C\u4FAF\u5019\u5016\u5149\u516C\u529F\u52B9\u52FE\u539A\u53E3\u5411"],["8d40","\u540E\u5589\u5751\u57A2\u597D\u5B54\u5B5D\u5B8F\u5DE5\u5DE7\u5DF7\u5E78\u5E83\u5E9A\u5EB7\u5F18\u6052\u614C\u6297\u62D8\u63A7\u653B\u6602\u6643\u66F4\u676D\u6821\u6897\u69CB\u6C5F\u6D2A\u6D69\u6E2F\u6E9D\u7532\u7687\u786C\u7A3F\u7CE0\u7D05\u7D18\u7D5E\u7DB1\u8015\u8003\u80AF\u80B1\u8154\u818F\u822A\u8352\u884C\u8861\u8B1B\u8CA2\u8CFC\u90CA\u9175\u9271\u783F\u92FC\u95A4\u964D"],["8d80","\u9805\u9999\u9AD8\u9D3B\u525B\u52AB\u53F7\u5408\u58D5\u62F7\u6FE0\u8C6A\u8F5F\u9EB9\u514B\u523B\u544A\u56FD\u7A40\u9177\u9D60\u9ED2\u7344\u6F09\u8170\u7511\u5FFD\u60DA\u9AA8\u72DB\u8FBC\u6B64\u9803\u4ECA\u56F0\u5764\u58BE\u5A5A\u6068\u61C7\u660F\u6606\u6839\u68B1\u6DF7\u75D5\u7D3A\u826E\u9B42\u4E9B\u4F50\u53C9\u5506\u5D6F\u5DE6\u5DEE\u67FB\u6C99\u7473\u7802\u8A50\u9396\u88DF\u5750\u5EA7\u632B\u50B5\u50AC\u518D\u6700\u54C9\u585E\u59BB\u5BB0\u5F69\u624D\u63A1\u683D\u6B73\u6E08\u707D\u91C7\u7280\u7815\u7826\u796D\u658E\u7D30\u83DC\u88C1\u8F09\u969B\u5264\u5728\u6750\u7F6A\u8CA1\u51B4\u5742\u962A\u583A\u698A\u80B4\u54B2\u5D0E\u57FC\u7895\u9DFA\u4F5C\u524A\u548B\u643E\u6628\u6714\u67F5\u7A84\u7B56\u7D22\u932F\u685C\u9BAD\u7B39\u5319\u518A\u5237"],["8e40","\u5BDF\u62F6\u64AE\u64E6\u672D\u6BBA\u85A9\u96D1\u7690\u9BD6\u634C\u9306\u9BAB\u76BF\u6652\u4E09\u5098\u53C2\u5C71\u60E8\u6492\u6563\u685F\u71E6\u73CA\u7523\u7B97\u7E82\u8695\u8B83\u8CDB\u9178\u9910\u65AC\u66AB\u6B8B\u4ED5\u4ED4\u4F3A\u4F7F\u523A\u53F8\u53F2\u55E3\u56DB\u58EB\u59CB\u59C9\u59FF\u5B50\u5C4D\u5E02\u5E2B\u5FD7\u601D\u6307\u652F\u5B5C\u65AF\u65BD\u65E8\u679D\u6B62"],["8e80","\u6B7B\u6C0F\u7345\u7949\u79C1\u7CF8\u7D19\u7D2B\u80A2\u8102\u81F3\u8996\u8A5E\u8A69\u8A66\u8A8C\u8AEE\u8CC7\u8CDC\u96CC\u98FC\u6B6F\u4E8B\u4F3C\u4F8D\u5150\u5B57\u5BFA\u6148\u6301\u6642\u6B21\u6ECB\u6CBB\u723E\u74BD\u75D4\u78C1\u793A\u800C\u8033\u81EA\u8494\u8F9E\u6C50\u9E7F\u5F0F\u8B58\u9D2B\u7AFA\u8EF8\u5B8D\u96EB\u4E03\u53F1\u57F7\u5931\u5AC9\u5BA4\u6089\u6E7F\u6F06\u75BE\u8CEA\u5B9F\u8500\u7BE0\u5072\u67F4\u829D\u5C61\u854A\u7E1E\u820E\u5199\u5C04\u6368\u8D66\u659C\u716E\u793E\u7D17\u8005\u8B1D\u8ECA\u906E\u86C7\u90AA\u501F\u52FA\u5C3A\u6753\u707C\u7235\u914C\u91C8\u932B\u82E5\u5BC2\u5F31\u60F9\u4E3B\u53D6\u5B88\u624B\u6731\u6B8A\u72E9\u73E0\u7A2E\u816B\u8DA3\u9152\u9996\u5112\u53D7\u546A\u5BFF\u6388\u6A39\u7DAC\u9700\u56DA\u53CE\u5468"],["8f40","\u5B97\u5C31\u5DDE\u4FEE\u6101\u62FE\u6D32\u79C0\u79CB\u7D42\u7E4D\u7FD2\u81ED\u821F\u8490\u8846\u8972\u8B90\u8E74\u8F2F\u9031\u914B\u916C\u96C6\u919C\u4EC0\u4F4F\u5145\u5341\u5F93\u620E\u67D4\u6C41\u6E0B\u7363\u7E26\u91CD\u9283\u53D4\u5919\u5BBF\u6DD1\u795D\u7E2E\u7C9B\u587E\u719F\u51FA\u8853\u8FF0\u4FCA\u5CFB\u6625\u77AC\u7AE3\u821C\u99FF\u51C6\u5FAA\u65EC\u696F\u6B89\u6DF3"],["8f80","\u6E96\u6F64\u76FE\u7D14\u5DE1\u9075\u9187\u9806\u51E6\u521D\u6240\u6691\u66D9\u6E1A\u5EB6\u7DD2\u7F72\u66F8\u85AF\u85F7\u8AF8\u52A9\u53D9\u5973\u5E8F\u5F90\u6055\u92E4\u9664\u50B7\u511F\u52DD\u5320\u5347\u53EC\u54E8\u5546\u5531\u5617\u5968\u59BE\u5A3C\u5BB5\u5C06\u5C0F\u5C11\u5C1A\u5E84\u5E8A\u5EE0\u5F70\u627F\u6284\u62DB\u638C\u6377\u6607\u660C\u662D\u6676\u677E\u68A2\u6A1F\u6A35\u6CBC\u6D88\u6E09\u6E58\u713C\u7126\u7167\u75C7\u7701\u785D\u7901\u7965\u79F0\u7AE0\u7B11\u7CA7\u7D39\u8096\u83D6\u848B\u8549\u885D\u88F3\u8A1F\u8A3C\u8A54\u8A73\u8C61\u8CDE\u91A4\u9266\u937E\u9418\u969C\u9798\u4E0A\u4E08\u4E1E\u4E57\u5197\u5270\u57CE\u5834\u58CC\u5B22\u5E38\u60C5\u64FE\u6761\u6756\u6D44\u72B6\u7573\u7A63\u84B8\u8B72\u91B8\u9320\u5631\u57F4\u98FE"],["9040","\u62ED\u690D\u6B96\u71ED\u7E54\u8077\u8272\u89E6\u98DF\u8755\u8FB1\u5C3B\u4F38\u4FE1\u4FB5\u5507\u5A20\u5BDD\u5BE9\u5FC3\u614E\u632F\u65B0\u664B\u68EE\u699B\u6D78\u6DF1\u7533\u75B9\u771F\u795E\u79E6\u7D33\u81E3\u82AF\u85AA\u89AA\u8A3A\u8EAB\u8F9B\u9032\u91DD\u9707\u4EBA\u4EC1\u5203\u5875\u58EC\u5C0B\u751A\u5C3D\u814E\u8A0A\u8FC5\u9663\u976D\u7B25\u8ACF\u9808\u9162\u56F3\u53A8"],["9080","\u9017\u5439\u5782\u5E25\u63A8\u6C34\u708A\u7761\u7C8B\u7FE0\u8870\u9042\u9154\u9310\u9318\u968F\u745E\u9AC4\u5D07\u5D69\u6570\u67A2\u8DA8\u96DB\u636E\u6749\u6919\u83C5\u9817\u96C0\u88FE\u6F84\u647A\u5BF8\u4E16\u702C\u755D\u662F\u51C4\u5236\u52E2\u59D3\u5F81\u6027\u6210\u653F\u6574\u661F\u6674\u68F2\u6816\u6B63\u6E05\u7272\u751F\u76DB\u7CBE\u8056\u58F0\u88FD\u897F\u8AA0\u8A93\u8ACB\u901D\u9192\u9752\u9759\u6589\u7A0E\u8106\u96BB\u5E2D\u60DC\u621A\u65A5\u6614\u6790\u77F3\u7A4D\u7C4D\u7E3E\u810A\u8CAC\u8D64\u8DE1\u8E5F\u78A9\u5207\u62D9\u63A5\u6442\u6298\u8A2D\u7A83\u7BC0\u8AAC\u96EA\u7D76\u820C\u8749\u4ED9\u5148\u5343\u5360\u5BA3\u5C02\u5C16\u5DDD\u6226\u6247\u64B0\u6813\u6834\u6CC9\u6D45\u6D17\u67D3\u6F5C\u714E\u717D\u65CB\u7A7F\u7BAD\u7DDA"],["9140","\u7E4A\u7FA8\u817A\u821B\u8239\u85A6\u8A6E\u8CCE\u8DF5\u9078\u9077\u92AD\u9291\u9583\u9BAE\u524D\u5584\u6F38\u7136\u5168\u7985\u7E55\u81B3\u7CCE\u564C\u5851\u5CA8\u63AA\u66FE\u66FD\u695A\u72D9\u758F\u758E\u790E\u7956\u79DF\u7C97\u7D20\u7D44\u8607\u8A34\u963B\u9061\u9F20\u50E7\u5275\u53CC\u53E2\u5009\u55AA\u58EE\u594F\u723D\u5B8B\u5C64\u531D\u60E3\u60F3\u635C\u6383\u633F\u63BB"],["9180","\u64CD\u65E9\u66F9\u5DE3\u69CD\u69FD\u6F15\u71E5\u4E89\u75E9\u76F8\u7A93\u7CDF\u7DCF\u7D9C\u8061\u8349\u8358\u846C\u84BC\u85FB\u88C5\u8D70\u9001\u906D\u9397\u971C\u9A12\u50CF\u5897\u618E\u81D3\u8535\u8D08\u9020\u4FC3\u5074\u5247\u5373\u606F\u6349\u675F\u6E2C\u8DB3\u901F\u4FD7\u5C5E\u8CCA\u65CF\u7D9A\u5352\u8896\u5176\u63C3\u5B58\u5B6B\u5C0A\u640D\u6751\u905C\u4ED6\u591A\u592A\u6C70\u8A51\u553E\u5815\u59A5\u60F0\u6253\u67C1\u8235\u6955\u9640\u99C4\u9A28\u4F53\u5806\u5BFE\u8010\u5CB1\u5E2F\u5F85\u6020\u614B\u6234\u66FF\u6CF0\u6EDE\u80CE\u817F\u82D4\u888B\u8CB8\u9000\u902E\u968A\u9EDB\u9BDB\u4EE3\u53F0\u5927\u7B2C\u918D\u984C\u9DF9\u6EDD\u7027\u5353\u5544\u5B85\u6258\u629E\u62D3\u6CA2\u6FEF\u7422\u8A17\u9438\u6FC1\u8AFE\u8338\u51E7\u86F8\u53EA"],["9240","\u53E9\u4F46\u9054\u8FB0\u596A\u8131\u5DFD\u7AEA\u8FBF\u68DA\u8C37\u72F8\u9C48\u6A3D\u8AB0\u4E39\u5358\u5606\u5766\u62C5\u63A2\u65E6\u6B4E\u6DE1\u6E5B\u70AD\u77ED\u7AEF\u7BAA\u7DBB\u803D\u80C6\u86CB\u8A95\u935B\u56E3\u58C7\u5F3E\u65AD\u6696\u6A80\u6BB5\u7537\u8AC7\u5024\u77E5\u5730\u5F1B\u6065\u667A\u6C60\u75F4\u7A1A\u7F6E\u81F4\u8718\u9045\u99B3\u7BC9\u755C\u7AF9\u7B51\u84C4"],["9280","\u9010\u79E9\u7A92\u8336\u5AE1\u7740\u4E2D\u4EF2\u5B99\u5FE0\u62BD\u663C\u67F1\u6CE8\u866B\u8877\u8A3B\u914E\u92F3\u99D0\u6A17\u7026\u732A\u82E7\u8457\u8CAF\u4E01\u5146\u51CB\u558B\u5BF5\u5E16\u5E33\u5E81\u5F14\u5F35\u5F6B\u5FB4\u61F2\u6311\u66A2\u671D\u6F6E\u7252\u753A\u773A\u8074\u8139\u8178\u8776\u8ABF\u8ADC\u8D85\u8DF3\u929A\u9577\u9802\u9CE5\u52C5\u6357\u76F4\u6715\u6C88\u73CD\u8CC3\u93AE\u9673\u6D25\u589C\u690E\u69CC\u8FFD\u939A\u75DB\u901A\u585A\u6802\u63B4\u69FB\u4F43\u6F2C\u67D8\u8FBB\u8526\u7DB4\u9354\u693F\u6F70\u576A\u58F7\u5B2C\u7D2C\u722A\u540A\u91E3\u9DB4\u4EAD\u4F4E\u505C\u5075\u5243\u8C9E\u5448\u5824\u5B9A\u5E1D\u5E95\u5EAD\u5EF7\u5F1F\u608C\u62B5\u633A\u63D0\u68AF\u6C40\u7887\u798E\u7A0B\u7DE0\u8247\u8A02\u8AE6\u8E44\u9013"],["9340","\u90B8\u912D\u91D8\u9F0E\u6CE5\u6458\u64E2\u6575\u6EF4\u7684\u7B1B\u9069\u93D1\u6EBA\u54F2\u5FB9\u64A4\u8F4D\u8FED\u9244\u5178\u586B\u5929\u5C55\u5E97\u6DFB\u7E8F\u751C\u8CBC\u8EE2\u985B\u70B9\u4F1D\u6BBF\u6FB1\u7530\u96FB\u514E\u5410\u5835\u5857\u59AC\u5C60\u5F92\u6597\u675C\u6E21\u767B\u83DF\u8CED\u9014\u90FD\u934D\u7825\u783A\u52AA\u5EA6\u571F\u5974\u6012\u5012\u515A\u51AC"],["9380","\u51CD\u5200\u5510\u5854\u5858\u5957\u5B95\u5CF6\u5D8B\u60BC\u6295\u642D\u6771\u6843\u68BC\u68DF\u76D7\u6DD8\u6E6F\u6D9B\u706F\u71C8\u5F53\u75D8\u7977\u7B49\u7B54\u7B52\u7CD6\u7D71\u5230\u8463\u8569\u85E4\u8A0E\u8B04\u8C46\u8E0F\u9003\u900F\u9419\u9676\u982D\u9A30\u95D8\u50CD\u52D5\u540C\u5802\u5C0E\u61A7\u649E\u6D1E\u77B3\u7AE5\u80F4\u8404\u9053\u9285\u5CE0\u9D07\u533F\u5F97\u5FB3\u6D9C\u7279\u7763\u79BF\u7BE4\u6BD2\u72EC\u8AAD\u6803\u6A61\u51F8\u7A81\u6934\u5C4A\u9CF6\u82EB\u5BC5\u9149\u701E\u5678\u5C6F\u60C7\u6566\u6C8C\u8C5A\u9041\u9813\u5451\u66C7\u920D\u5948\u90A3\u5185\u4E4D\u51EA\u8599\u8B0E\u7058\u637A\u934B\u6962\u99B4\u7E04\u7577\u5357\u6960\u8EDF\u96E3\u6C5D\u4E8C\u5C3C\u5F10\u8FE9\u5302\u8CD1\u8089\u8679\u5EFF\u65E5\u4E73\u5165"],["9440","\u5982\u5C3F\u97EE\u4EFB\u598A\u5FCD\u8A8D\u6FE1\u79B0\u7962\u5BE7\u8471\u732B\u71B1\u5E74\u5FF5\u637B\u649A\u71C3\u7C98\u4E43\u5EFC\u4E4B\u57DC\u56A2\u60A9\u6FC3\u7D0D\u80FD\u8133\u81BF\u8FB2\u8997\u86A4\u5DF4\u628A\u64AD\u8987\u6777\u6CE2\u6D3E\u7436\u7834\u5A46\u7F75\u82AD\u99AC\u4FF3\u5EC3\u62DD\u6392\u6557\u676F\u76C3\u724C\u80CC\u80BA\u8F29\u914D\u500D\u57F9\u5A92\u6885"],["9480","\u6973\u7164\u72FD\u8CB7\u58F2\u8CE0\u966A\u9019\u877F\u79E4\u77E7\u8429\u4F2F\u5265\u535A\u62CD\u67CF\u6CCA\u767D\u7B94\u7C95\u8236\u8584\u8FEB\u66DD\u6F20\u7206\u7E1B\u83AB\u99C1\u9EA6\u51FD\u7BB1\u7872\u7BB8\u8087\u7B48\u6AE8\u5E61\u808C\u7551\u7560\u516B\u9262\u6E8C\u767A\u9197\u9AEA\u4F10\u7F70\u629C\u7B4F\u95A5\u9CE9\u567A\u5859\u86E4\u96BC\u4F34\u5224\u534A\u53CD\u53DB\u5E06\u642C\u6591\u677F\u6C3E\u6C4E\u7248\u72AF\u73ED\u7554\u7E41\u822C\u85E9\u8CA9\u7BC4\u91C6\u7169\u9812\u98EF\u633D\u6669\u756A\u76E4\u78D0\u8543\u86EE\u532A\u5351\u5426\u5983\u5E87\u5F7C\u60B2\u6249\u6279\u62AB\u6590\u6BD4\u6CCC\u75B2\u76AE\u7891\u79D8\u7DCB\u7F77\u80A5\u88AB\u8AB9\u8CBB\u907F\u975E\u98DB\u6A0B\u7C38\u5099\u5C3E\u5FAE\u6787\u6BD8\u7435\u7709\u7F8E"],["9540","\u9F3B\u67CA\u7A17\u5339\u758B\u9AED\u5F66\u819D\u83F1\u8098\u5F3C\u5FC5\u7562\u7B46\u903C\u6867\u59EB\u5A9B\u7D10\u767E\u8B2C\u4FF5\u5F6A\u6A19\u6C37\u6F02\u74E2\u7968\u8868\u8A55\u8C79\u5EDF\u63CF\u75C5\u79D2\u82D7\u9328\u92F2\u849C\u86ED\u9C2D\u54C1\u5F6C\u658C\u6D5C\u7015\u8CA7\u8CD3\u983B\u654F\u74F6\u4E0D\u4ED8\u57E0\u592B\u5A66\u5BCC\u51A8\u5E03\u5E9C\u6016\u6276\u6577"],["9580","\u65A7\u666E\u6D6E\u7236\u7B26\u8150\u819A\u8299\u8B5C\u8CA0\u8CE6\u8D74\u961C\u9644\u4FAE\u64AB\u6B66\u821E\u8461\u856A\u90E8\u5C01\u6953\u98A8\u847A\u8557\u4F0F\u526F\u5FA9\u5E45\u670D\u798F\u8179\u8907\u8986\u6DF5\u5F17\u6255\u6CB8\u4ECF\u7269\u9B92\u5206\u543B\u5674\u58B3\u61A4\u626E\u711A\u596E\u7C89\u7CDE\u7D1B\u96F0\u6587\u805E\u4E19\u4F75\u5175\u5840\u5E63\u5E73\u5F0A\u67C4\u4E26\u853D\u9589\u965B\u7C73\u9801\u50FB\u58C1\u7656\u78A7\u5225\u77A5\u8511\u7B86\u504F\u5909\u7247\u7BC7\u7DE8\u8FBA\u8FD4\u904D\u4FBF\u52C9\u5A29\u5F01\u97AD\u4FDD\u8217\u92EA\u5703\u6355\u6B69\u752B\u88DC\u8F14\u7A42\u52DF\u5893\u6155\u620A\u66AE\u6BCD\u7C3F\u83E9\u5023\u4FF8\u5305\u5446\u5831\u5949\u5B9D\u5CF0\u5CEF\u5D29\u5E96\u62B1\u6367\u653E\u65B9\u670B"],["9640","\u6CD5\u6CE1\u70F9\u7832\u7E2B\u80DE\u82B3\u840C\u84EC\u8702\u8912\u8A2A\u8C4A\u90A6\u92D2\u98FD\u9CF3\u9D6C\u4E4F\u4EA1\u508D\u5256\u574A\u59A8\u5E3D\u5FD8\u5FD9\u623F\u66B4\u671B\u67D0\u68D2\u5192\u7D21\u80AA\u81A8\u8B00\u8C8C\u8CBF\u927E\u9632\u5420\u982C\u5317\u50D5\u535C\u58A8\u64B2\u6734\u7267\u7766\u7A46\u91E6\u52C3\u6CA1\u6B86\u5800\u5E4C\u5954\u672C\u7FFB\u51E1\u76C6"],["9680","\u6469\u78E8\u9B54\u9EBB\u57CB\u59B9\u6627\u679A\u6BCE\u54E9\u69D9\u5E55\u819C\u6795\u9BAA\u67FE\u9C52\u685D\u4EA6\u4FE3\u53C8\u62B9\u672B\u6CAB\u8FC4\u4FAD\u7E6D\u9EBF\u4E07\u6162\u6E80\u6F2B\u8513\u5473\u672A\u9B45\u5DF3\u7B95\u5CAC\u5BC6\u871C\u6E4A\u84D1\u7A14\u8108\u5999\u7C8D\u6C11\u7720\u52D9\u5922\u7121\u725F\u77DB\u9727\u9D61\u690B\u5A7F\u5A18\u51A5\u540D\u547D\u660E\u76DF\u8FF7\u9298\u9CF4\u59EA\u725D\u6EC5\u514D\u68C9\u7DBF\u7DEC\u9762\u9EBA\u6478\u6A21\u8302\u5984\u5B5F\u6BDB\u731B\u76F2\u7DB2\u8017\u8499\u5132\u6728\u9ED9\u76EE\u6762\u52FF\u9905\u5C24\u623B\u7C7E\u8CB0\u554F\u60B6\u7D0B\u9580\u5301\u4E5F\u51B6\u591C\u723A\u8036\u91CE\u5F25\u77E2\u5384\u5F79\u7D04\u85AC\u8A33\u8E8D\u9756\u67F3\u85AE\u9453\u6109\u6108\u6CB9\u7652"],["9740","\u8AED\u8F38\u552F\u4F51\u512A\u52C7\u53CB\u5BA5\u5E7D\u60A0\u6182\u63D6\u6709\u67DA\u6E67\u6D8C\u7336\u7337\u7531\u7950\u88D5\u8A98\u904A\u9091\u90F5\u96C4\u878D\u5915\u4E88\u4F59\u4E0E\u8A89\u8F3F\u9810\u50AD\u5E7C\u5996\u5BB9\u5EB8\u63DA\u63FA\u64C1\u66DC\u694A\u69D8\u6D0B\u6EB6\u7194\u7528\u7AAF\u7F8A\u8000\u8449\u84C9\u8981\u8B21\u8E0A\u9065\u967D\u990A\u617E\u6291\u6B32"],["9780","\u6C83\u6D74\u7FCC\u7FFC\u6DC0\u7F85\u87BA\u88F8\u6765\u83B1\u983C\u96F7\u6D1B\u7D61\u843D\u916A\u4E71\u5375\u5D50\u6B04\u6FEB\u85CD\u862D\u89A7\u5229\u540F\u5C65\u674E\u68A8\u7406\u7483\u75E2\u88CF\u88E1\u91CC\u96E2\u9678\u5F8B\u7387\u7ACB\u844E\u63A0\u7565\u5289\u6D41\u6E9C\u7409\u7559\u786B\u7C92\u9686\u7ADC\u9F8D\u4FB6\u616E\u65C5\u865C\u4E86\u4EAE\u50DA\u4E21\u51CC\u5BEE\u6599\u6881\u6DBC\u731F\u7642\u77AD\u7A1C\u7CE7\u826F\u8AD2\u907C\u91CF\u9675\u9818\u529B\u7DD1\u502B\u5398\u6797\u6DCB\u71D0\u7433\u81E8\u8F2A\u96A3\u9C57\u9E9F\u7460\u5841\u6D99\u7D2F\u985E\u4EE4\u4F36\u4F8B\u51B7\u52B1\u5DBA\u601C\u73B2\u793C\u82D3\u9234\u96B7\u96F6\u970A\u9E97\u9F62\u66A6\u6B74\u5217\u52A3\u70C8\u88C2\u5EC9\u604B\u6190\u6F23\u7149\u7C3E\u7DF4\u806F"],["9840","\u84EE\u9023\u932C\u5442\u9B6F\u6AD3\u7089\u8CC2\u8DEF\u9732\u52B4\u5A41\u5ECA\u5F04\u6717\u697C\u6994\u6D6A\u6F0F\u7262\u72FC\u7BED\u8001\u807E\u874B\u90CE\u516D\u9E93\u7984\u808B\u9332\u8AD6\u502D\u548C\u8A71\u6B6A\u8CC4\u8107\u60D1\u67A0\u9DF2\u4E99\u4E98\u9C10\u8A6B\u85C1\u8568\u6900\u6E7E\u7897\u8155"],["989f","\u5F0C\u4E10\u4E15\u4E2A\u4E31\u4E36\u4E3C\u4E3F\u4E42\u4E56\u4E58\u4E82\u4E85\u8C6B\u4E8A\u8212\u5F0D\u4E8E\u4E9E\u4E9F\u4EA0\u4EA2\u4EB0\u4EB3\u4EB6\u4ECE\u4ECD\u4EC4\u4EC6\u4EC2\u4ED7\u4EDE\u4EED\u4EDF\u4EF7\u4F09\u4F5A\u4F30\u4F5B\u4F5D\u4F57\u4F47\u4F76\u4F88\u4F8F\u4F98\u4F7B\u4F69\u4F70\u4F91\u4F6F\u4F86\u4F96\u5118\u4FD4\u4FDF\u4FCE\u4FD8\u4FDB\u4FD1\u4FDA\u4FD0\u4FE4\u4FE5\u501A\u5028\u5014\u502A\u5025\u5005\u4F1C\u4FF6\u5021\u5029\u502C\u4FFE\u4FEF\u5011\u5006\u5043\u5047\u6703\u5055\u5050\u5048\u505A\u5056\u506C\u5078\u5080\u509A\u5085\u50B4\u50B2"],["9940","\u50C9\u50CA\u50B3\u50C2\u50D6\u50DE\u50E5\u50ED\u50E3\u50EE\u50F9\u50F5\u5109\u5101\u5102\u5116\u5115\u5114\u511A\u5121\u513A\u5137\u513C\u513B\u513F\u5140\u5152\u514C\u5154\u5162\u7AF8\u5169\u516A\u516E\u5180\u5182\u56D8\u518C\u5189\u518F\u5191\u5193\u5195\u5196\u51A4\u51A6\u51A2\u51A9\u51AA\u51AB\u51B3\u51B1\u51B2\u51B0\u51B5\u51BD\u51C5\u51C9\u51DB\u51E0\u8655\u51E9\u51ED"],["9980","\u51F0\u51F5\u51FE\u5204\u520B\u5214\u520E\u5227\u522A\u522E\u5233\u5239\u524F\u5244\u524B\u524C\u525E\u5254\u526A\u5274\u5269\u5273\u527F\u527D\u528D\u5294\u5292\u5271\u5288\u5291\u8FA8\u8FA7\u52AC\u52AD\u52BC\u52B5\u52C1\u52CD\u52D7\u52DE\u52E3\u52E6\u98ED\u52E0\u52F3\u52F5\u52F8\u52F9\u5306\u5308\u7538\u530D\u5310\u530F\u5315\u531A\u5323\u532F\u5331\u5333\u5338\u5340\u5346\u5345\u4E17\u5349\u534D\u51D6\u535E\u5369\u536E\u5918\u537B\u5377\u5382\u5396\u53A0\u53A6\u53A5\u53AE\u53B0\u53B6\u53C3\u7C12\u96D9\u53DF\u66FC\u71EE\u53EE\u53E8\u53ED\u53FA\u5401\u543D\u5440\u542C\u542D\u543C\u542E\u5436\u5429\u541D\u544E\u548F\u5475\u548E\u545F\u5471\u5477\u5470\u5492\u547B\u5480\u5476\u5484\u5490\u5486\u54C7\u54A2\u54B8\u54A5\u54AC\u54C4\u54C8\u54A8"],["9a40","\u54AB\u54C2\u54A4\u54BE\u54BC\u54D8\u54E5\u54E6\u550F\u5514\u54FD\u54EE\u54ED\u54FA\u54E2\u5539\u5540\u5563\u554C\u552E\u555C\u5545\u5556\u5557\u5538\u5533\u555D\u5599\u5580\u54AF\u558A\u559F\u557B\u557E\u5598\u559E\u55AE\u557C\u5583\u55A9\u5587\u55A8\u55DA\u55C5\u55DF\u55C4\u55DC\u55E4\u55D4\u5614\u55F7\u5616\u55FE\u55FD\u561B\u55F9\u564E\u5650\u71DF\u5634\u5636\u5632\u5638"],["9a80","\u566B\u5664\u562F\u566C\u566A\u5686\u5680\u568A\u56A0\u5694\u568F\u56A5\u56AE\u56B6\u56B4\u56C2\u56BC\u56C1\u56C3\u56C0\u56C8\u56CE\u56D1\u56D3\u56D7\u56EE\u56F9\u5700\u56FF\u5704\u5709\u5708\u570B\u570D\u5713\u5718\u5716\u55C7\u571C\u5726\u5737\u5738\u574E\u573B\u5740\u574F\u5769\u57C0\u5788\u5761\u577F\u5789\u5793\u57A0\u57B3\u57A4\u57AA\u57B0\u57C3\u57C6\u57D4\u57D2\u57D3\u580A\u57D6\u57E3\u580B\u5819\u581D\u5872\u5821\u5862\u584B\u5870\u6BC0\u5852\u583D\u5879\u5885\u58B9\u589F\u58AB\u58BA\u58DE\u58BB\u58B8\u58AE\u58C5\u58D3\u58D1\u58D7\u58D9\u58D8\u58E5\u58DC\u58E4\u58DF\u58EF\u58FA\u58F9\u58FB\u58FC\u58FD\u5902\u590A\u5910\u591B\u68A6\u5925\u592C\u592D\u5932\u5938\u593E\u7AD2\u5955\u5950\u594E\u595A\u5958\u5962\u5960\u5967\u596C\u5969"],["9b40","\u5978\u5981\u599D\u4F5E\u4FAB\u59A3\u59B2\u59C6\u59E8\u59DC\u598D\u59D9\u59DA\u5A25\u5A1F\u5A11\u5A1C\u5A09\u5A1A\u5A40\u5A6C\u5A49\u5A35\u5A36\u5A62\u5A6A\u5A9A\u5ABC\u5ABE\u5ACB\u5AC2\u5ABD\u5AE3\u5AD7\u5AE6\u5AE9\u5AD6\u5AFA\u5AFB\u5B0C\u5B0B\u5B16\u5B32\u5AD0\u5B2A\u5B36\u5B3E\u5B43\u5B45\u5B40\u5B51\u5B55\u5B5A\u5B5B\u5B65\u5B69\u5B70\u5B73\u5B75\u5B78\u6588\u5B7A\u5B80"],["9b80","\u5B83\u5BA6\u5BB8\u5BC3\u5BC7\u5BC9\u5BD4\u5BD0\u5BE4\u5BE6\u5BE2\u5BDE\u5BE5\u5BEB\u5BF0\u5BF6\u5BF3\u5C05\u5C07\u5C08\u5C0D\u5C13\u5C20\u5C22\u5C28\u5C38\u5C39\u5C41\u5C46\u5C4E\u5C53\u5C50\u5C4F\u5B71\u5C6C\u5C6E\u4E62\u5C76\u5C79\u5C8C\u5C91\u5C94\u599B\u5CAB\u5CBB\u5CB6\u5CBC\u5CB7\u5CC5\u5CBE\u5CC7\u5CD9\u5CE9\u5CFD\u5CFA\u5CED\u5D8C\u5CEA\u5D0B\u5D15\u5D17\u5D5C\u5D1F\u5D1B\u5D11\u5D14\u5D22\u5D1A\u5D19\u5D18\u5D4C\u5D52\u5D4E\u5D4B\u5D6C\u5D73\u5D76\u5D87\u5D84\u5D82\u5DA2\u5D9D\u5DAC\u5DAE\u5DBD\u5D90\u5DB7\u5DBC\u5DC9\u5DCD\u5DD3\u5DD2\u5DD6\u5DDB\u5DEB\u5DF2\u5DF5\u5E0B\u5E1A\u5E19\u5E11\u5E1B\u5E36\u5E37\u5E44\u5E43\u5E40\u5E4E\u5E57\u5E54\u5E5F\u5E62\u5E64\u5E47\u5E75\u5E76\u5E7A\u9EBC\u5E7F\u5EA0\u5EC1\u5EC2\u5EC8\u5ED0\u5ECF"],["9c40","\u5ED6\u5EE3\u5EDD\u5EDA\u5EDB\u5EE2\u5EE1\u5EE8\u5EE9\u5EEC\u5EF1\u5EF3\u5EF0\u5EF4\u5EF8\u5EFE\u5F03\u5F09\u5F5D\u5F5C\u5F0B\u5F11\u5F16\u5F29\u5F2D\u5F38\u5F41\u5F48\u5F4C\u5F4E\u5F2F\u5F51\u5F56\u5F57\u5F59\u5F61\u5F6D\u5F73\u5F77\u5F83\u5F82\u5F7F\u5F8A\u5F88\u5F91\u5F87\u5F9E\u5F99\u5F98\u5FA0\u5FA8\u5FAD\u5FBC\u5FD6\u5FFB\u5FE4\u5FF8\u5FF1\u5FDD\u60B3\u5FFF\u6021\u6060"],["9c80","\u6019\u6010\u6029\u600E\u6031\u601B\u6015\u602B\u6026\u600F\u603A\u605A\u6041\u606A\u6077\u605F\u604A\u6046\u604D\u6063\u6043\u6064\u6042\u606C\u606B\u6059\u6081\u608D\u60E7\u6083\u609A\u6084\u609B\u6096\u6097\u6092\u60A7\u608B\u60E1\u60B8\u60E0\u60D3\u60B4\u5FF0\u60BD\u60C6\u60B5\u60D8\u614D\u6115\u6106\u60F6\u60F7\u6100\u60F4\u60FA\u6103\u6121\u60FB\u60F1\u610D\u610E\u6147\u613E\u6128\u6127\u614A\u613F\u613C\u612C\u6134\u613D\u6142\u6144\u6173\u6177\u6158\u6159\u615A\u616B\u6174\u616F\u6165\u6171\u615F\u615D\u6153\u6175\u6199\u6196\u6187\u61AC\u6194\u619A\u618A\u6191\u61AB\u61AE\u61CC\u61CA\u61C9\u61F7\u61C8\u61C3\u61C6\u61BA\u61CB\u7F79\u61CD\u61E6\u61E3\u61F6\u61FA\u61F4\u61FF\u61FD\u61FC\u61FE\u6200\u6208\u6209\u620D\u620C\u6214\u621B"],["9d40","\u621E\u6221\u622A\u622E\u6230\u6232\u6233\u6241\u624E\u625E\u6263\u625B\u6260\u6268\u627C\u6282\u6289\u627E\u6292\u6293\u6296\u62D4\u6283\u6294\u62D7\u62D1\u62BB\u62CF\u62FF\u62C6\u64D4\u62C8\u62DC\u62CC\u62CA\u62C2\u62C7\u629B\u62C9\u630C\u62EE\u62F1\u6327\u6302\u6308\u62EF\u62F5\u6350\u633E\u634D\u641C\u634F\u6396\u638E\u6380\u63AB\u6376\u63A3\u638F\u6389\u639F\u63B5\u636B"],["9d80","\u6369\u63BE\u63E9\u63C0\u63C6\u63E3\u63C9\u63D2\u63F6\u63C4\u6416\u6434\u6406\u6413\u6426\u6436\u651D\u6417\u6428\u640F\u6467\u646F\u6476\u644E\u652A\u6495\u6493\u64A5\u64A9\u6488\u64BC\u64DA\u64D2\u64C5\u64C7\u64BB\u64D8\u64C2\u64F1\u64E7\u8209\u64E0\u64E1\u62AC\u64E3\u64EF\u652C\u64F6\u64F4\u64F2\u64FA\u6500\u64FD\u6518\u651C\u6505\u6524\u6523\u652B\u6534\u6535\u6537\u6536\u6538\u754B\u6548\u6556\u6555\u654D\u6558\u655E\u655D\u6572\u6578\u6582\u6583\u8B8A\u659B\u659F\u65AB\u65B7\u65C3\u65C6\u65C1\u65C4\u65CC\u65D2\u65DB\u65D9\u65E0\u65E1\u65F1\u6772\u660A\u6603\u65FB\u6773\u6635\u6636\u6634\u661C\u664F\u6644\u6649\u6641\u665E\u665D\u6664\u6667\u6668\u665F\u6662\u6670\u6683\u6688\u668E\u6689\u6684\u6698\u669D\u66C1\u66B9\u66C9\u66BE\u66BC"],["9e40","\u66C4\u66B8\u66D6\u66DA\u66E0\u663F\u66E6\u66E9\u66F0\u66F5\u66F7\u670F\u6716\u671E\u6726\u6727\u9738\u672E\u673F\u6736\u6741\u6738\u6737\u6746\u675E\u6760\u6759\u6763\u6764\u6789\u6770\u67A9\u677C\u676A\u678C\u678B\u67A6\u67A1\u6785\u67B7\u67EF\u67B4\u67EC\u67B3\u67E9\u67B8\u67E4\u67DE\u67DD\u67E2\u67EE\u67B9\u67CE\u67C6\u67E7\u6A9C\u681E\u6846\u6829\u6840\u684D\u6832\u684E"],["9e80","\u68B3\u682B\u6859\u6863\u6877\u687F\u689F\u688F\u68AD\u6894\u689D\u689B\u6883\u6AAE\u68B9\u6874\u68B5\u68A0\u68BA\u690F\u688D\u687E\u6901\u68CA\u6908\u68D8\u6922\u6926\u68E1\u690C\u68CD\u68D4\u68E7\u68D5\u6936\u6912\u6904\u68D7\u68E3\u6925\u68F9\u68E0\u68EF\u6928\u692A\u691A\u6923\u6921\u68C6\u6979\u6977\u695C\u6978\u696B\u6954\u697E\u696E\u6939\u6974\u693D\u6959\u6930\u6961\u695E\u695D\u6981\u696A\u69B2\u69AE\u69D0\u69BF\u69C1\u69D3\u69BE\u69CE\u5BE8\u69CA\u69DD\u69BB\u69C3\u69A7\u6A2E\u6991\u69A0\u699C\u6995\u69B4\u69DE\u69E8\u6A02\u6A1B\u69FF\u6B0A\u69F9\u69F2\u69E7\u6A05\u69B1\u6A1E\u69ED\u6A14\u69EB\u6A0A\u6A12\u6AC1\u6A23\u6A13\u6A44\u6A0C\u6A72\u6A36\u6A78\u6A47\u6A62\u6A59\u6A66\u6A48\u6A38\u6A22\u6A90\u6A8D\u6AA0\u6A84\u6AA2\u6AA3"],["9f40","\u6A97\u8617\u6ABB\u6AC3\u6AC2\u6AB8\u6AB3\u6AAC\u6ADE\u6AD1\u6ADF\u6AAA\u6ADA\u6AEA\u6AFB\u6B05\u8616\u6AFA\u6B12\u6B16\u9B31\u6B1F\u6B38\u6B37\u76DC\u6B39\u98EE\u6B47\u6B43\u6B49\u6B50\u6B59\u6B54\u6B5B\u6B5F\u6B61\u6B78\u6B79\u6B7F\u6B80\u6B84\u6B83\u6B8D\u6B98\u6B95\u6B9E\u6BA4\u6BAA\u6BAB\u6BAF\u6BB2\u6BB1\u6BB3\u6BB7\u6BBC\u6BC6\u6BCB\u6BD3\u6BDF\u6BEC\u6BEB\u6BF3\u6BEF"],["9f80","\u9EBE\u6C08\u6C13\u6C14\u6C1B\u6C24\u6C23\u6C5E\u6C55\u6C62\u6C6A\u6C82\u6C8D\u6C9A\u6C81\u6C9B\u6C7E\u6C68\u6C73\u6C92\u6C90\u6CC4\u6CF1\u6CD3\u6CBD\u6CD7\u6CC5\u6CDD\u6CAE\u6CB1\u6CBE\u6CBA\u6CDB\u6CEF\u6CD9\u6CEA\u6D1F\u884D\u6D36\u6D2B\u6D3D\u6D38\u6D19\u6D35\u6D33\u6D12\u6D0C\u6D63\u6D93\u6D64\u6D5A\u6D79\u6D59\u6D8E\u6D95\u6FE4\u6D85\u6DF9\u6E15\u6E0A\u6DB5\u6DC7\u6DE6\u6DB8\u6DC6\u6DEC\u6DDE\u6DCC\u6DE8\u6DD2\u6DC5\u6DFA\u6DD9\u6DE4\u6DD5\u6DEA\u6DEE\u6E2D\u6E6E\u6E2E\u6E19\u6E72\u6E5F\u6E3E\u6E23\u6E6B\u6E2B\u6E76\u6E4D\u6E1F\u6E43\u6E3A\u6E4E\u6E24\u6EFF\u6E1D\u6E38\u6E82\u6EAA\u6E98\u6EC9\u6EB7\u6ED3\u6EBD\u6EAF\u6EC4\u6EB2\u6ED4\u6ED5\u6E8F\u6EA5\u6EC2\u6E9F\u6F41\u6F11\u704C\u6EEC\u6EF8\u6EFE\u6F3F\u6EF2\u6F31\u6EEF\u6F32\u6ECC"],["e040","\u6F3E\u6F13\u6EF7\u6F86\u6F7A\u6F78\u6F81\u6F80\u6F6F\u6F5B\u6FF3\u6F6D\u6F82\u6F7C\u6F58\u6F8E\u6F91\u6FC2\u6F66\u6FB3\u6FA3\u6FA1\u6FA4\u6FB9\u6FC6\u6FAA\u6FDF\u6FD5\u6FEC\u6FD4\u6FD8\u6FF1\u6FEE\u6FDB\u7009\u700B\u6FFA\u7011\u7001\u700F\u6FFE\u701B\u701A\u6F74\u701D\u7018\u701F\u7030\u703E\u7032\u7051\u7063\u7099\u7092\u70AF\u70F1\u70AC\u70B8\u70B3\u70AE\u70DF\u70CB\u70DD"],["e080","\u70D9\u7109\u70FD\u711C\u7119\u7165\u7155\u7188\u7166\u7162\u714C\u7156\u716C\u718F\u71FB\u7184\u7195\u71A8\u71AC\u71D7\u71B9\u71BE\u71D2\u71C9\u71D4\u71CE\u71E0\u71EC\u71E7\u71F5\u71FC\u71F9\u71FF\u720D\u7210\u721B\u7228\u722D\u722C\u7230\u7232\u723B\u723C\u723F\u7240\u7246\u724B\u7258\u7274\u727E\u7282\u7281\u7287\u7292\u7296\u72A2\u72A7\u72B9\u72B2\u72C3\u72C6\u72C4\u72CE\u72D2\u72E2\u72E0\u72E1\u72F9\u72F7\u500F\u7317\u730A\u731C\u7316\u731D\u7334\u732F\u7329\u7325\u733E\u734E\u734F\u9ED8\u7357\u736A\u7368\u7370\u7378\u7375\u737B\u737A\u73C8\u73B3\u73CE\u73BB\u73C0\u73E5\u73EE\u73DE\u74A2\u7405\u746F\u7425\u73F8\u7432\u743A\u7455\u743F\u745F\u7459\u7441\u745C\u7469\u7470\u7463\u746A\u7476\u747E\u748B\u749E\u74A7\u74CA\u74CF\u74D4\u73F1"],["e140","\u74E0\u74E3\u74E7\u74E9\u74EE\u74F2\u74F0\u74F1\u74F8\u74F7\u7504\u7503\u7505\u750C\u750E\u750D\u7515\u7513\u751E\u7526\u752C\u753C\u7544\u754D\u754A\u7549\u755B\u7546\u755A\u7569\u7564\u7567\u756B\u756D\u7578\u7576\u7586\u7587\u7574\u758A\u7589\u7582\u7594\u759A\u759D\u75A5\u75A3\u75C2\u75B3\u75C3\u75B5\u75BD\u75B8\u75BC\u75B1\u75CD\u75CA\u75D2\u75D9\u75E3\u75DE\u75FE\u75FF"],["e180","\u75FC\u7601\u75F0\u75FA\u75F2\u75F3\u760B\u760D\u7609\u761F\u7627\u7620\u7621\u7622\u7624\u7634\u7630\u763B\u7647\u7648\u7646\u765C\u7658\u7661\u7662\u7668\u7669\u766A\u7667\u766C\u7670\u7672\u7676\u7678\u767C\u7680\u7683\u7688\u768B\u768E\u7696\u7693\u7699\u769A\u76B0\u76B4\u76B8\u76B9\u76BA\u76C2\u76CD\u76D6\u76D2\u76DE\u76E1\u76E5\u76E7\u76EA\u862F\u76FB\u7708\u7707\u7704\u7729\u7724\u771E\u7725\u7726\u771B\u7737\u7738\u7747\u775A\u7768\u776B\u775B\u7765\u777F\u777E\u7779\u778E\u778B\u7791\u77A0\u779E\u77B0\u77B6\u77B9\u77BF\u77BC\u77BD\u77BB\u77C7\u77CD\u77D7\u77DA\u77DC\u77E3\u77EE\u77FC\u780C\u7812\u7926\u7820\u792A\u7845\u788E\u7874\u7886\u787C\u789A\u788C\u78A3\u78B5\u78AA\u78AF\u78D1\u78C6\u78CB\u78D4\u78BE\u78BC\u78C5\u78CA\u78EC"],["e240","\u78E7\u78DA\u78FD\u78F4\u7907\u7912\u7911\u7919\u792C\u792B\u7940\u7960\u7957\u795F\u795A\u7955\u7953\u797A\u797F\u798A\u799D\u79A7\u9F4B\u79AA\u79AE\u79B3\u79B9\u79BA\u79C9\u79D5\u79E7\u79EC\u79E1\u79E3\u7A08\u7A0D\u7A18\u7A19\u7A20\u7A1F\u7980\u7A31\u7A3B\u7A3E\u7A37\u7A43\u7A57\u7A49\u7A61\u7A62\u7A69\u9F9D\u7A70\u7A79\u7A7D\u7A88\u7A97\u7A95\u7A98\u7A96\u7AA9\u7AC8\u7AB0"],["e280","\u7AB6\u7AC5\u7AC4\u7ABF\u9083\u7AC7\u7ACA\u7ACD\u7ACF\u7AD5\u7AD3\u7AD9\u7ADA\u7ADD\u7AE1\u7AE2\u7AE6\u7AED\u7AF0\u7B02\u7B0F\u7B0A\u7B06\u7B33\u7B18\u7B19\u7B1E\u7B35\u7B28\u7B36\u7B50\u7B7A\u7B04\u7B4D\u7B0B\u7B4C\u7B45\u7B75\u7B65\u7B74\u7B67\u7B70\u7B71\u7B6C\u7B6E\u7B9D\u7B98\u7B9F\u7B8D\u7B9C\u7B9A\u7B8B\u7B92\u7B8F\u7B5D\u7B99\u7BCB\u7BC1\u7BCC\u7BCF\u7BB4\u7BC6\u7BDD\u7BE9\u7C11\u7C14\u7BE6\u7BE5\u7C60\u7C00\u7C07\u7C13\u7BF3\u7BF7\u7C17\u7C0D\u7BF6\u7C23\u7C27\u7C2A\u7C1F\u7C37\u7C2B\u7C3D\u7C4C\u7C43\u7C54\u7C4F\u7C40\u7C50\u7C58\u7C5F\u7C64\u7C56\u7C65\u7C6C\u7C75\u7C83\u7C90\u7CA4\u7CAD\u7CA2\u7CAB\u7CA1\u7CA8\u7CB3\u7CB2\u7CB1\u7CAE\u7CB9\u7CBD\u7CC0\u7CC5\u7CC2\u7CD8\u7CD2\u7CDC\u7CE2\u9B3B\u7CEF\u7CF2\u7CF4\u7CF6\u7CFA\u7D06"],["e340","\u7D02\u7D1C\u7D15\u7D0A\u7D45\u7D4B\u7D2E\u7D32\u7D3F\u7D35\u7D46\u7D73\u7D56\u7D4E\u7D72\u7D68\u7D6E\u7D4F\u7D63\u7D93\u7D89\u7D5B\u7D8F\u7D7D\u7D9B\u7DBA\u7DAE\u7DA3\u7DB5\u7DC7\u7DBD\u7DAB\u7E3D\u7DA2\u7DAF\u7DDC\u7DB8\u7D9F\u7DB0\u7DD8\u7DDD\u7DE4\u7DDE\u7DFB\u7DF2\u7DE1\u7E05\u7E0A\u7E23\u7E21\u7E12\u7E31\u7E1F\u7E09\u7E0B\u7E22\u7E46\u7E66\u7E3B\u7E35\u7E39\u7E43\u7E37"],["e380","\u7E32\u7E3A\u7E67\u7E5D\u7E56\u7E5E\u7E59\u7E5A\u7E79\u7E6A\u7E69\u7E7C\u7E7B\u7E83\u7DD5\u7E7D\u8FAE\u7E7F\u7E88\u7E89\u7E8C\u7E92\u7E90\u7E93\u7E94\u7E96\u7E8E\u7E9B\u7E9C\u7F38\u7F3A\u7F45\u7F4C\u7F4D\u7F4E\u7F50\u7F51\u7F55\u7F54\u7F58\u7F5F\u7F60\u7F68\u7F69\u7F67\u7F78\u7F82\u7F86\u7F83\u7F88\u7F87\u7F8C\u7F94\u7F9E\u7F9D\u7F9A\u7FA3\u7FAF\u7FB2\u7FB9\u7FAE\u7FB6\u7FB8\u8B71\u7FC5\u7FC6\u7FCA\u7FD5\u7FD4\u7FE1\u7FE6\u7FE9\u7FF3\u7FF9\u98DC\u8006\u8004\u800B\u8012\u8018\u8019\u801C\u8021\u8028\u803F\u803B\u804A\u8046\u8052\u8058\u805A\u805F\u8062\u8068\u8073\u8072\u8070\u8076\u8079\u807D\u807F\u8084\u8086\u8085\u809B\u8093\u809A\u80AD\u5190\u80AC\u80DB\u80E5\u80D9\u80DD\u80C4\u80DA\u80D6\u8109\u80EF\u80F1\u811B\u8129\u8123\u812F\u814B"],["e440","\u968B\u8146\u813E\u8153\u8151\u80FC\u8171\u816E\u8165\u8166\u8174\u8183\u8188\u818A\u8180\u8182\u81A0\u8195\u81A4\u81A3\u815F\u8193\u81A9\u81B0\u81B5\u81BE\u81B8\u81BD\u81C0\u81C2\u81BA\u81C9\u81CD\u81D1\u81D9\u81D8\u81C8\u81DA\u81DF\u81E0\u81E7\u81FA\u81FB\u81FE\u8201\u8202\u8205\u8207\u820A\u820D\u8210\u8216\u8229\u822B\u8238\u8233\u8240\u8259\u8258\u825D\u825A\u825F\u8264"],["e480","\u8262\u8268\u826A\u826B\u822E\u8271\u8277\u8278\u827E\u828D\u8292\u82AB\u829F\u82BB\u82AC\u82E1\u82E3\u82DF\u82D2\u82F4\u82F3\u82FA\u8393\u8303\u82FB\u82F9\u82DE\u8306\u82DC\u8309\u82D9\u8335\u8334\u8316\u8332\u8331\u8340\u8339\u8350\u8345\u832F\u832B\u8317\u8318\u8385\u839A\u83AA\u839F\u83A2\u8396\u8323\u838E\u8387\u838A\u837C\u83B5\u8373\u8375\u83A0\u8389\u83A8\u83F4\u8413\u83EB\u83CE\u83FD\u8403\u83D8\u840B\u83C1\u83F7\u8407\u83E0\u83F2\u840D\u8422\u8420\u83BD\u8438\u8506\u83FB\u846D\u842A\u843C\u855A\u8484\u8477\u846B\u84AD\u846E\u8482\u8469\u8446\u842C\u846F\u8479\u8435\u84CA\u8462\u84B9\u84BF\u849F\u84D9\u84CD\u84BB\u84DA\u84D0\u84C1\u84C6\u84D6\u84A1\u8521\u84FF\u84F4\u8517\u8518\u852C\u851F\u8515\u8514\u84FC\u8540\u8563\u8558\u8548"],["e540","\u8541\u8602\u854B\u8555\u8580\u85A4\u8588\u8591\u858A\u85A8\u856D\u8594\u859B\u85EA\u8587\u859C\u8577\u857E\u8590\u85C9\u85BA\u85CF\u85B9\u85D0\u85D5\u85DD\u85E5\u85DC\u85F9\u860A\u8613\u860B\u85FE\u85FA\u8606\u8622\u861A\u8630\u863F\u864D\u4E55\u8654\u865F\u8667\u8671\u8693\u86A3\u86A9\u86AA\u868B\u868C\u86B6\u86AF\u86C4\u86C6\u86B0\u86C9\u8823\u86AB\u86D4\u86DE\u86E9\u86EC"],["e580","\u86DF\u86DB\u86EF\u8712\u8706\u8708\u8700\u8703\u86FB\u8711\u8709\u870D\u86F9\u870A\u8734\u873F\u8737\u873B\u8725\u8729\u871A\u8760\u875F\u8778\u874C\u874E\u8774\u8757\u8768\u876E\u8759\u8753\u8763\u876A\u8805\u87A2\u879F\u8782\u87AF\u87CB\u87BD\u87C0\u87D0\u96D6\u87AB\u87C4\u87B3\u87C7\u87C6\u87BB\u87EF\u87F2\u87E0\u880F\u880D\u87FE\u87F6\u87F7\u880E\u87D2\u8811\u8816\u8815\u8822\u8821\u8831\u8836\u8839\u8827\u883B\u8844\u8842\u8852\u8859\u885E\u8862\u886B\u8881\u887E\u889E\u8875\u887D\u88B5\u8872\u8882\u8897\u8892\u88AE\u8899\u88A2\u888D\u88A4\u88B0\u88BF\u88B1\u88C3\u88C4\u88D4\u88D8\u88D9\u88DD\u88F9\u8902\u88FC\u88F4\u88E8\u88F2\u8904\u890C\u890A\u8913\u8943\u891E\u8925\u892A\u892B\u8941\u8944\u893B\u8936\u8938\u894C\u891D\u8960\u895E"],["e640","\u8966\u8964\u896D\u896A\u896F\u8974\u8977\u897E\u8983\u8988\u898A\u8993\u8998\u89A1\u89A9\u89A6\u89AC\u89AF\u89B2\u89BA\u89BD\u89BF\u89C0\u89DA\u89DC\u89DD\u89E7\u89F4\u89F8\u8A03\u8A16\u8A10\u8A0C\u8A1B\u8A1D\u8A25\u8A36\u8A41\u8A5B\u8A52\u8A46\u8A48\u8A7C\u8A6D\u8A6C\u8A62\u8A85\u8A82\u8A84\u8AA8\u8AA1\u8A91\u8AA5\u8AA6\u8A9A\u8AA3\u8AC4\u8ACD\u8AC2\u8ADA\u8AEB\u8AF3\u8AE7"],["e680","\u8AE4\u8AF1\u8B14\u8AE0\u8AE2\u8AF7\u8ADE\u8ADB\u8B0C\u8B07\u8B1A\u8AE1\u8B16\u8B10\u8B17\u8B20\u8B33\u97AB\u8B26\u8B2B\u8B3E\u8B28\u8B41\u8B4C\u8B4F\u8B4E\u8B49\u8B56\u8B5B\u8B5A\u8B6B\u8B5F\u8B6C\u8B6F\u8B74\u8B7D\u8B80\u8B8C\u8B8E\u8B92\u8B93\u8B96\u8B99\u8B9A\u8C3A\u8C41\u8C3F\u8C48\u8C4C\u8C4E\u8C50\u8C55\u8C62\u8C6C\u8C78\u8C7A\u8C82\u8C89\u8C85\u8C8A\u8C8D\u8C8E\u8C94\u8C7C\u8C98\u621D\u8CAD\u8CAA\u8CBD\u8CB2\u8CB3\u8CAE\u8CB6\u8CC8\u8CC1\u8CE4\u8CE3\u8CDA\u8CFD\u8CFA\u8CFB\u8D04\u8D05\u8D0A\u8D07\u8D0F\u8D0D\u8D10\u9F4E\u8D13\u8CCD\u8D14\u8D16\u8D67\u8D6D\u8D71\u8D73\u8D81\u8D99\u8DC2\u8DBE\u8DBA\u8DCF\u8DDA\u8DD6\u8DCC\u8DDB\u8DCB\u8DEA\u8DEB\u8DDF\u8DE3\u8DFC\u8E08\u8E09\u8DFF\u8E1D\u8E1E\u8E10\u8E1F\u8E42\u8E35\u8E30\u8E34\u8E4A"],["e740","\u8E47\u8E49\u8E4C\u8E50\u8E48\u8E59\u8E64\u8E60\u8E2A\u8E63\u8E55\u8E76\u8E72\u8E7C\u8E81\u8E87\u8E85\u8E84\u8E8B\u8E8A\u8E93\u8E91\u8E94\u8E99\u8EAA\u8EA1\u8EAC\u8EB0\u8EC6\u8EB1\u8EBE\u8EC5\u8EC8\u8ECB\u8EDB\u8EE3\u8EFC\u8EFB\u8EEB\u8EFE\u8F0A\u8F05\u8F15\u8F12\u8F19\u8F13\u8F1C\u8F1F\u8F1B\u8F0C\u8F26\u8F33\u8F3B\u8F39\u8F45\u8F42\u8F3E\u8F4C\u8F49\u8F46\u8F4E\u8F57\u8F5C"],["e780","\u8F62\u8F63\u8F64\u8F9C\u8F9F\u8FA3\u8FAD\u8FAF\u8FB7\u8FDA\u8FE5\u8FE2\u8FEA\u8FEF\u9087\u8FF4\u9005\u8FF9\u8FFA\u9011\u9015\u9021\u900D\u901E\u9016\u900B\u9027\u9036\u9035\u9039\u8FF8\u904F\u9050\u9051\u9052\u900E\u9049\u903E\u9056\u9058\u905E\u9068\u906F\u9076\u96A8\u9072\u9082\u907D\u9081\u9080\u908A\u9089\u908F\u90A8\u90AF\u90B1\u90B5\u90E2\u90E4\u6248\u90DB\u9102\u9112\u9119\u9132\u9130\u914A\u9156\u9158\u9163\u9165\u9169\u9173\u9172\u918B\u9189\u9182\u91A2\u91AB\u91AF\u91AA\u91B5\u91B4\u91BA\u91C0\u91C1\u91C9\u91CB\u91D0\u91D6\u91DF\u91E1\u91DB\u91FC\u91F5\u91F6\u921E\u91FF\u9214\u922C\u9215\u9211\u925E\u9257\u9245\u9249\u9264\u9248\u9295\u923F\u924B\u9250\u929C\u9296\u9293\u929B\u925A\u92CF\u92B9\u92B7\u92E9\u930F\u92FA\u9344\u932E"],["e840","\u9319\u9322\u931A\u9323\u933A\u9335\u933B\u935C\u9360\u937C\u936E\u9356\u93B0\u93AC\u93AD\u9394\u93B9\u93D6\u93D7\u93E8\u93E5\u93D8\u93C3\u93DD\u93D0\u93C8\u93E4\u941A\u9414\u9413\u9403\u9407\u9410\u9436\u942B\u9435\u9421\u943A\u9441\u9452\u9444\u945B\u9460\u9462\u945E\u946A\u9229\u9470\u9475\u9477\u947D\u945A\u947C\u947E\u9481\u947F\u9582\u9587\u958A\u9594\u9596\u9598\u9599"],["e880","\u95A0\u95A8\u95A7\u95AD\u95BC\u95BB\u95B9\u95BE\u95CA\u6FF6\u95C3\u95CD\u95CC\u95D5\u95D4\u95D6\u95DC\u95E1\u95E5\u95E2\u9621\u9628\u962E\u962F\u9642\u964C\u964F\u964B\u9677\u965C\u965E\u965D\u965F\u9666\u9672\u966C\u968D\u9698\u9695\u9697\u96AA\u96A7\u96B1\u96B2\u96B0\u96B4\u96B6\u96B8\u96B9\u96CE\u96CB\u96C9\u96CD\u894D\u96DC\u970D\u96D5\u96F9\u9704\u9706\u9708\u9713\u970E\u9711\u970F\u9716\u9719\u9724\u972A\u9730\u9739\u973D\u973E\u9744\u9746\u9748\u9742\u9749\u975C\u9760\u9764\u9766\u9768\u52D2\u976B\u9771\u9779\u9785\u977C\u9781\u977A\u9786\u978B\u978F\u9790\u979C\u97A8\u97A6\u97A3\u97B3\u97B4\u97C3\u97C6\u97C8\u97CB\u97DC\u97ED\u9F4F\u97F2\u7ADF\u97F6\u97F5\u980F\u980C\u9838\u9824\u9821\u9837\u983D\u9846\u984F\u984B\u986B\u986F\u9870"],["e940","\u9871\u9874\u9873\u98AA\u98AF\u98B1\u98B6\u98C4\u98C3\u98C6\u98E9\u98EB\u9903\u9909\u9912\u9914\u9918\u9921\u991D\u991E\u9924\u9920\u992C\u992E\u993D\u993E\u9942\u9949\u9945\u9950\u994B\u9951\u9952\u994C\u9955\u9997\u9998\u99A5\u99AD\u99AE\u99BC\u99DF\u99DB\u99DD\u99D8\u99D1\u99ED\u99EE\u99F1\u99F2\u99FB\u99F8\u9A01\u9A0F\u9A05\u99E2\u9A19\u9A2B\u9A37\u9A45\u9A42\u9A40\u9A43"],["e980","\u9A3E\u9A55\u9A4D\u9A5B\u9A57\u9A5F\u9A62\u9A65\u9A64\u9A69\u9A6B\u9A6A\u9AAD\u9AB0\u9ABC\u9AC0\u9ACF\u9AD1\u9AD3\u9AD4\u9ADE\u9ADF\u9AE2\u9AE3\u9AE6\u9AEF\u9AEB\u9AEE\u9AF4\u9AF1\u9AF7\u9AFB\u9B06\u9B18\u9B1A\u9B1F\u9B22\u9B23\u9B25\u9B27\u9B28\u9B29\u9B2A\u9B2E\u9B2F\u9B32\u9B44\u9B43\u9B4F\u9B4D\u9B4E\u9B51\u9B58\u9B74\u9B93\u9B83\u9B91\u9B96\u9B97\u9B9F\u9BA0\u9BA8\u9BB4\u9BC0\u9BCA\u9BB9\u9BC6\u9BCF\u9BD1\u9BD2\u9BE3\u9BE2\u9BE4\u9BD4\u9BE1\u9C3A\u9BF2\u9BF1\u9BF0\u9C15\u9C14\u9C09\u9C13\u9C0C\u9C06\u9C08\u9C12\u9C0A\u9C04\u9C2E\u9C1B\u9C25\u9C24\u9C21\u9C30\u9C47\u9C32\u9C46\u9C3E\u9C5A\u9C60\u9C67\u9C76\u9C78\u9CE7\u9CEC\u9CF0\u9D09\u9D08\u9CEB\u9D03\u9D06\u9D2A\u9D26\u9DAF\u9D23\u9D1F\u9D44\u9D15\u9D12\u9D41\u9D3F\u9D3E\u9D46\u9D48"],["ea40","\u9D5D\u9D5E\u9D64\u9D51\u9D50\u9D59\u9D72\u9D89\u9D87\u9DAB\u9D6F\u9D7A\u9D9A\u9DA4\u9DA9\u9DB2\u9DC4\u9DC1\u9DBB\u9DB8\u9DBA\u9DC6\u9DCF\u9DC2\u9DD9\u9DD3\u9DF8\u9DE6\u9DED\u9DEF\u9DFD\u9E1A\u9E1B\u9E1E\u9E75\u9E79\u9E7D\u9E81\u9E88\u9E8B\u9E8C\u9E92\u9E95\u9E91\u9E9D\u9EA5\u9EA9\u9EB8\u9EAA\u9EAD\u9761\u9ECC\u9ECE\u9ECF\u9ED0\u9ED4\u9EDC\u9EDE\u9EDD\u9EE0\u9EE5\u9EE8\u9EEF"],["ea80","\u9EF4\u9EF6\u9EF7\u9EF9\u9EFB\u9EFC\u9EFD\u9F07\u9F08\u76B7\u9F15\u9F21\u9F2C\u9F3E\u9F4A\u9F52\u9F54\u9F63\u9F5F\u9F60\u9F61\u9F66\u9F67\u9F6C\u9F6A\u9F77\u9F72\u9F76\u9F95\u9F9C\u9FA0\u582F\u69C7\u9059\u7464\u51DC\u7199"],["ed40","\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F"],["ed80","\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1"],["ee40","\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559"],["ee80","\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"],["eeef","\u2170",9,"\uFFE2\uFFE4\uFF07\uFF02"],["f040","\uE000",62],["f080","\uE03F",124],["f140","\uE0BC",62],["f180","\uE0FB",124],["f240","\uE178",62],["f280","\uE1B7",124],["f340","\uE234",62],["f380","\uE273",124],["f440","\uE2F0",62],["f480","\uE32F",124],["f540","\uE3AC",62],["f580","\uE3EB",124],["f640","\uE468",62],["f680","\uE4A7",124],["f740","\uE524",62],["f780","\uE563",124],["f840","\uE5E0",62],["f880","\uE61F",124],["f940","\uE69C"],["fa40","\u2170",9,"\u2160",9,"\uFFE2\uFFE4\uFF07\uFF02\u3231\u2116\u2121\u2235\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A"],["fa80","\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F"],["fb40","\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19"],["fb80","\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9"],["fc40","\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"]]});var bQ1=o((xz5,XS6)=>{XS6.exports=[["0","\x00",127],["8ea1","\uFF61",62],["a1a1","\u3000\u3001\u3002\uFF0C\uFF0E\u30FB\uFF1A\uFF1B\uFF1F\uFF01\u309B\u309C\xB4\uFF40\xA8\uFF3E\uFFE3\uFF3F\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\u2015\u2010\uFF0F\uFF3C\uFF5E\u2225\uFF5C\u2026\u2025\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\uFF3B\uFF3D\uFF5B\uFF5D\u3008",9,"\uFF0B\uFF0D\xB1\xD7\xF7\uFF1D\u2260\uFF1C\uFF1E\u2266\u2267\u221E\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFFE5\uFF04\uFFE0\uFFE1\uFF05\uFF03\uFF06\uFF0A\uFF20\xA7\u2606\u2605\u25CB\u25CF\u25CE\u25C7"],["a2a1","\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u203B\u3012\u2192\u2190\u2191\u2193\u3013"],["a2ba","\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229"],["a2ca","\u2227\u2228\uFFE2\u21D2\u21D4\u2200\u2203"],["a2dc","\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C"],["a2f2","\u212B\u2030\u266F\u266D\u266A\u2020\u2021\xB6"],["a2fe","\u25EF"],["a3b0","\uFF10",9],["a3c1","\uFF21",25],["a3e1","\uFF41",25],["a4a1","\u3041",82],["a5a1","\u30A1",85],["a6a1","\u0391",16,"\u03A3",6],["a6c1","\u03B1",16,"\u03C3",6],["a7a1","\u0410",5,"\u0401\u0416",25],["a7d1","\u0430",5,"\u0451\u0436",25],["a8a1","\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542"],["ada1","\u2460",19,"\u2160",9],["adc0","\u3349\u3314\u3322\u334D\u3318\u3327\u3303\u3336\u3351\u3357\u330D\u3326\u3323\u332B\u334A\u333B\u339C\u339D\u339E\u338E\u338F\u33C4\u33A1"],["addf","\u337B\u301D\u301F\u2116\u33CD\u2121\u32A4",4,"\u3231\u3232\u3239\u337E\u337D\u337C\u2252\u2261\u222B\u222E\u2211\u221A\u22A5\u2220\u221F\u22BF\u2235\u2229\u222A"],["b0a1","\u4E9C\u5516\u5A03\u963F\u54C0\u611B\u6328\u59F6\u9022\u8475\u831C\u7A50\u60AA\u63E1\u6E25\u65ED\u8466\u82A6\u9BF5\u6893\u5727\u65A1\u6271\u5B9B\u59D0\u867B\u98F4\u7D62\u7DBE\u9B8E\u6216\u7C9F\u88B7\u5B89\u5EB5\u6309\u6697\u6848\u95C7\u978D\u674F\u4EE5\u4F0A\u4F4D\u4F9D\u5049\u56F2\u5937\u59D4\u5A01\u5C09\u60DF\u610F\u6170\u6613\u6905\u70BA\u754F\u7570\u79FB\u7DAD\u7DEF\u80C3\u840E\u8863\u8B02\u9055\u907A\u533B\u4E95\u4EA5\u57DF\u80B2\u90C1\u78EF\u4E00\u58F1\u6EA2\u9038\u7A32\u8328\u828B\u9C2F\u5141\u5370\u54BD\u54E1\u56E0\u59FB\u5F15\u98F2\u6DEB\u80E4\u852D"],["b1a1","\u9662\u9670\u96A0\u97FB\u540B\u53F3\u5B87\u70CF\u7FBD\u8FC2\u96E8\u536F\u9D5C\u7ABA\u4E11\u7893\u81FC\u6E26\u5618\u5504\u6B1D\u851A\u9C3B\u59E5\u53A9\u6D66\u74DC\u958F\u5642\u4E91\u904B\u96F2\u834F\u990C\u53E1\u55B6\u5B30\u5F71\u6620\u66F3\u6804\u6C38\u6CF3\u6D29\u745B\u76C8\u7A4E\u9834\u82F1\u885B\u8A60\u92ED\u6DB2\u75AB\u76CA\u99C5\u60A6\u8B01\u8D8A\u95B2\u698E\u53AD\u5186\u5712\u5830\u5944\u5BB4\u5EF6\u6028\u63A9\u63F4\u6CBF\u6F14\u708E\u7114\u7159\u71D5\u733F\u7E01\u8276\u82D1\u8597\u9060\u925B\u9D1B\u5869\u65BC\u6C5A\u7525\u51F9\u592E\u5965\u5F80\u5FDC"],["b2a1","\u62BC\u65FA\u6A2A\u6B27\u6BB4\u738B\u7FC1\u8956\u9D2C\u9D0E\u9EC4\u5CA1\u6C96\u837B\u5104\u5C4B\u61B6\u81C6\u6876\u7261\u4E59\u4FFA\u5378\u6069\u6E29\u7A4F\u97F3\u4E0B\u5316\u4EEE\u4F55\u4F3D\u4FA1\u4F73\u52A0\u53EF\u5609\u590F\u5AC1\u5BB6\u5BE1\u79D1\u6687\u679C\u67B6\u6B4C\u6CB3\u706B\u73C2\u798D\u79BE\u7A3C\u7B87\u82B1\u82DB\u8304\u8377\u83EF\u83D3\u8766\u8AB2\u5629\u8CA8\u8FE6\u904E\u971E\u868A\u4FC4\u5CE8\u6211\u7259\u753B\u81E5\u82BD\u86FE\u8CC0\u96C5\u9913\u99D5\u4ECB\u4F1A\u89E3\u56DE\u584A\u58CA\u5EFB\u5FEB\u602A\u6094\u6062\u61D0\u6212\u62D0\u6539"],["b3a1","\u9B41\u6666\u68B0\u6D77\u7070\u754C\u7686\u7D75\u82A5\u87F9\u958B\u968E\u8C9D\u51F1\u52BE\u5916\u54B3\u5BB3\u5D16\u6168\u6982\u6DAF\u788D\u84CB\u8857\u8A72\u93A7\u9AB8\u6D6C\u99A8\u86D9\u57A3\u67FF\u86CE\u920E\u5283\u5687\u5404\u5ED3\u62E1\u64B9\u683C\u6838\u6BBB\u7372\u78BA\u7A6B\u899A\u89D2\u8D6B\u8F03\u90ED\u95A3\u9694\u9769\u5B66\u5CB3\u697D\u984D\u984E\u639B\u7B20\u6A2B\u6A7F\u68B6\u9C0D\u6F5F\u5272\u559D\u6070\u62EC\u6D3B\u6E07\u6ED1\u845B\u8910\u8F44\u4E14\u9C39\u53F6\u691B\u6A3A\u9784\u682A\u515C\u7AC3\u84B2\u91DC\u938C\u565B\u9D28\u6822\u8305\u8431"],["b4a1","\u7CA5\u5208\u82C5\u74E6\u4E7E\u4F83\u51A0\u5BD2\u520A\u52D8\u52E7\u5DFB\u559A\u582A\u59E6\u5B8C\u5B98\u5BDB\u5E72\u5E79\u60A3\u611F\u6163\u61BE\u63DB\u6562\u67D1\u6853\u68FA\u6B3E\u6B53\u6C57\u6F22\u6F97\u6F45\u74B0\u7518\u76E3\u770B\u7AFF\u7BA1\u7C21\u7DE9\u7F36\u7FF0\u809D\u8266\u839E\u89B3\u8ACC\u8CAB\u9084\u9451\u9593\u9591\u95A2\u9665\u97D3\u9928\u8218\u4E38\u542B\u5CB8\u5DCC\u73A9\u764C\u773C\u5CA9\u7FEB\u8D0B\u96C1\u9811\u9854\u9858\u4F01\u4F0E\u5371\u559C\u5668\u57FA\u5947\u5B09\u5BC4\u5C90\u5E0C\u5E7E\u5FCC\u63EE\u673A\u65D7\u65E2\u671F\u68CB\u68C4"],["b5a1","\u6A5F\u5E30\u6BC5\u6C17\u6C7D\u757F\u7948\u5B63\u7A00\u7D00\u5FBD\u898F\u8A18\u8CB4\u8D77\u8ECC\u8F1D\u98E2\u9A0E\u9B3C\u4E80\u507D\u5100\u5993\u5B9C\u622F\u6280\u64EC\u6B3A\u72A0\u7591\u7947\u7FA9\u87FB\u8ABC\u8B70\u63AC\u83CA\u97A0\u5409\u5403\u55AB\u6854\u6A58\u8A70\u7827\u6775\u9ECD\u5374\u5BA2\u811A\u8650\u9006\u4E18\u4E45\u4EC7\u4F11\u53CA\u5438\u5BAE\u5F13\u6025\u6551\u673D\u6C42\u6C72\u6CE3\u7078\u7403\u7A76\u7AAE\u7B08\u7D1A\u7CFE\u7D66\u65E7\u725B\u53BB\u5C45\u5DE8\u62D2\u62E0\u6319\u6E20\u865A\u8A31\u8DDD\u92F8\u6F01\u79A6\u9B5A\u4EA8\u4EAB\u4EAC"],["b6a1","\u4F9B\u4FA0\u50D1\u5147\u7AF6\u5171\u51F6\u5354\u5321\u537F\u53EB\u55AC\u5883\u5CE1\u5F37\u5F4A\u602F\u6050\u606D\u631F\u6559\u6A4B\u6CC1\u72C2\u72ED\u77EF\u80F8\u8105\u8208\u854E\u90F7\u93E1\u97FF\u9957\u9A5A\u4EF0\u51DD\u5C2D\u6681\u696D\u5C40\u66F2\u6975\u7389\u6850\u7C81\u50C5\u52E4\u5747\u5DFE\u9326\u65A4\u6B23\u6B3D\u7434\u7981\u79BD\u7B4B\u7DCA\u82B9\u83CC\u887F\u895F\u8B39\u8FD1\u91D1\u541F\u9280\u4E5D\u5036\u53E5\u533A\u72D7\u7396\u77E9\u82E6\u8EAF\u99C6\u99C8\u99D2\u5177\u611A\u865E\u55B0\u7A7A\u5076\u5BD3\u9047\u9685\u4E32\u6ADB\u91E7\u5C51\u5C48"],["b7a1","\u6398\u7A9F\u6C93\u9774\u8F61\u7AAA\u718A\u9688\u7C82\u6817\u7E70\u6851\u936C\u52F2\u541B\u85AB\u8A13\u7FA4\u8ECD\u90E1\u5366\u8888\u7941\u4FC2\u50BE\u5211\u5144\u5553\u572D\u73EA\u578B\u5951\u5F62\u5F84\u6075\u6176\u6167\u61A9\u63B2\u643A\u656C\u666F\u6842\u6E13\u7566\u7A3D\u7CFB\u7D4C\u7D99\u7E4B\u7F6B\u830E\u834A\u86CD\u8A08\u8A63\u8B66\u8EFD\u981A\u9D8F\u82B8\u8FCE\u9BE8\u5287\u621F\u6483\u6FC0\u9699\u6841\u5091\u6B20\u6C7A\u6F54\u7A74\u7D50\u8840\u8A23\u6708\u4EF6\u5039\u5026\u5065\u517C\u5238\u5263\u55A7\u570F\u5805\u5ACC\u5EFA\u61B2\u61F8\u62F3\u6372"],["b8a1","\u691C\u6A29\u727D\u72AC\u732E\u7814\u786F\u7D79\u770C\u80A9\u898B\u8B19\u8CE2\u8ED2\u9063\u9375\u967A\u9855\u9A13\u9E78\u5143\u539F\u53B3\u5E7B\u5F26\u6E1B\u6E90\u7384\u73FE\u7D43\u8237\u8A00\u8AFA\u9650\u4E4E\u500B\u53E4\u547C\u56FA\u59D1\u5B64\u5DF1\u5EAB\u5F27\u6238\u6545\u67AF\u6E56\u72D0\u7CCA\u88B4\u80A1\u80E1\u83F0\u864E\u8A87\u8DE8\u9237\u96C7\u9867\u9F13\u4E94\u4E92\u4F0D\u5348\u5449\u543E\u5A2F\u5F8C\u5FA1\u609F\u68A7\u6A8E\u745A\u7881\u8A9E\u8AA4\u8B77\u9190\u4E5E\u9BC9\u4EA4\u4F7C\u4FAF\u5019\u5016\u5149\u516C\u529F\u52B9\u52FE\u539A\u53E3\u5411"],["b9a1","\u540E\u5589\u5751\u57A2\u597D\u5B54\u5B5D\u5B8F\u5DE5\u5DE7\u5DF7\u5E78\u5E83\u5E9A\u5EB7\u5F18\u6052\u614C\u6297\u62D8\u63A7\u653B\u6602\u6643\u66F4\u676D\u6821\u6897\u69CB\u6C5F\u6D2A\u6D69\u6E2F\u6E9D\u7532\u7687\u786C\u7A3F\u7CE0\u7D05\u7D18\u7D5E\u7DB1\u8015\u8003\u80AF\u80B1\u8154\u818F\u822A\u8352\u884C\u8861\u8B1B\u8CA2\u8CFC\u90CA\u9175\u9271\u783F\u92FC\u95A4\u964D\u9805\u9999\u9AD8\u9D3B\u525B\u52AB\u53F7\u5408\u58D5\u62F7\u6FE0\u8C6A\u8F5F\u9EB9\u514B\u523B\u544A\u56FD\u7A40\u9177\u9D60\u9ED2\u7344\u6F09\u8170\u7511\u5FFD\u60DA\u9AA8\u72DB\u8FBC"],["baa1","\u6B64\u9803\u4ECA\u56F0\u5764\u58BE\u5A5A\u6068\u61C7\u660F\u6606\u6839\u68B1\u6DF7\u75D5\u7D3A\u826E\u9B42\u4E9B\u4F50\u53C9\u5506\u5D6F\u5DE6\u5DEE\u67FB\u6C99\u7473\u7802\u8A50\u9396\u88DF\u5750\u5EA7\u632B\u50B5\u50AC\u518D\u6700\u54C9\u585E\u59BB\u5BB0\u5F69\u624D\u63A1\u683D\u6B73\u6E08\u707D\u91C7\u7280\u7815\u7826\u796D\u658E\u7D30\u83DC\u88C1\u8F09\u969B\u5264\u5728\u6750\u7F6A\u8CA1\u51B4\u5742\u962A\u583A\u698A\u80B4\u54B2\u5D0E\u57FC\u7895\u9DFA\u4F5C\u524A\u548B\u643E\u6628\u6714\u67F5\u7A84\u7B56\u7D22\u932F\u685C\u9BAD\u7B39\u5319\u518A\u5237"],["bba1","\u5BDF\u62F6\u64AE\u64E6\u672D\u6BBA\u85A9\u96D1\u7690\u9BD6\u634C\u9306\u9BAB\u76BF\u6652\u4E09\u5098\u53C2\u5C71\u60E8\u6492\u6563\u685F\u71E6\u73CA\u7523\u7B97\u7E82\u8695\u8B83\u8CDB\u9178\u9910\u65AC\u66AB\u6B8B\u4ED5\u4ED4\u4F3A\u4F7F\u523A\u53F8\u53F2\u55E3\u56DB\u58EB\u59CB\u59C9\u59FF\u5B50\u5C4D\u5E02\u5E2B\u5FD7\u601D\u6307\u652F\u5B5C\u65AF\u65BD\u65E8\u679D\u6B62\u6B7B\u6C0F\u7345\u7949\u79C1\u7CF8\u7D19\u7D2B\u80A2\u8102\u81F3\u8996\u8A5E\u8A69\u8A66\u8A8C\u8AEE\u8CC7\u8CDC\u96CC\u98FC\u6B6F\u4E8B\u4F3C\u4F8D\u5150\u5B57\u5BFA\u6148\u6301\u6642"],["bca1","\u6B21\u6ECB\u6CBB\u723E\u74BD\u75D4\u78C1\u793A\u800C\u8033\u81EA\u8494\u8F9E\u6C50\u9E7F\u5F0F\u8B58\u9D2B\u7AFA\u8EF8\u5B8D\u96EB\u4E03\u53F1\u57F7\u5931\u5AC9\u5BA4\u6089\u6E7F\u6F06\u75BE\u8CEA\u5B9F\u8500\u7BE0\u5072\u67F4\u829D\u5C61\u854A\u7E1E\u820E\u5199\u5C04\u6368\u8D66\u659C\u716E\u793E\u7D17\u8005\u8B1D\u8ECA\u906E\u86C7\u90AA\u501F\u52FA\u5C3A\u6753\u707C\u7235\u914C\u91C8\u932B\u82E5\u5BC2\u5F31\u60F9\u4E3B\u53D6\u5B88\u624B\u6731\u6B8A\u72E9\u73E0\u7A2E\u816B\u8DA3\u9152\u9996\u5112\u53D7\u546A\u5BFF\u6388\u6A39\u7DAC\u9700\u56DA\u53CE\u5468"],["bda1","\u5B97\u5C31\u5DDE\u4FEE\u6101\u62FE\u6D32\u79C0\u79CB\u7D42\u7E4D\u7FD2\u81ED\u821F\u8490\u8846\u8972\u8B90\u8E74\u8F2F\u9031\u914B\u916C\u96C6\u919C\u4EC0\u4F4F\u5145\u5341\u5F93\u620E\u67D4\u6C41\u6E0B\u7363\u7E26\u91CD\u9283\u53D4\u5919\u5BBF\u6DD1\u795D\u7E2E\u7C9B\u587E\u719F\u51FA\u8853\u8FF0\u4FCA\u5CFB\u6625\u77AC\u7AE3\u821C\u99FF\u51C6\u5FAA\u65EC\u696F\u6B89\u6DF3\u6E96\u6F64\u76FE\u7D14\u5DE1\u9075\u9187\u9806\u51E6\u521D\u6240\u6691\u66D9\u6E1A\u5EB6\u7DD2\u7F72\u66F8\u85AF\u85F7\u8AF8\u52A9\u53D9\u5973\u5E8F\u5F90\u6055\u92E4\u9664\u50B7\u511F"],["bea1","\u52DD\u5320\u5347\u53EC\u54E8\u5546\u5531\u5617\u5968\u59BE\u5A3C\u5BB5\u5C06\u5C0F\u5C11\u5C1A\u5E84\u5E8A\u5EE0\u5F70\u627F\u6284\u62DB\u638C\u6377\u6607\u660C\u662D\u6676\u677E\u68A2\u6A1F\u6A35\u6CBC\u6D88\u6E09\u6E58\u713C\u7126\u7167\u75C7\u7701\u785D\u7901\u7965\u79F0\u7AE0\u7B11\u7CA7\u7D39\u8096\u83D6\u848B\u8549\u885D\u88F3\u8A1F\u8A3C\u8A54\u8A73\u8C61\u8CDE\u91A4\u9266\u937E\u9418\u969C\u9798\u4E0A\u4E08\u4E1E\u4E57\u5197\u5270\u57CE\u5834\u58CC\u5B22\u5E38\u60C5\u64FE\u6761\u6756\u6D44\u72B6\u7573\u7A63\u84B8\u8B72\u91B8\u9320\u5631\u57F4\u98FE"],["bfa1","\u62ED\u690D\u6B96\u71ED\u7E54\u8077\u8272\u89E6\u98DF\u8755\u8FB1\u5C3B\u4F38\u4FE1\u4FB5\u5507\u5A20\u5BDD\u5BE9\u5FC3\u614E\u632F\u65B0\u664B\u68EE\u699B\u6D78\u6DF1\u7533\u75B9\u771F\u795E\u79E6\u7D33\u81E3\u82AF\u85AA\u89AA\u8A3A\u8EAB\u8F9B\u9032\u91DD\u9707\u4EBA\u4EC1\u5203\u5875\u58EC\u5C0B\u751A\u5C3D\u814E\u8A0A\u8FC5\u9663\u976D\u7B25\u8ACF\u9808\u9162\u56F3\u53A8\u9017\u5439\u5782\u5E25\u63A8\u6C34\u708A\u7761\u7C8B\u7FE0\u8870\u9042\u9154\u9310\u9318\u968F\u745E\u9AC4\u5D07\u5D69\u6570\u67A2\u8DA8\u96DB\u636E\u6749\u6919\u83C5\u9817\u96C0\u88FE"],["c0a1","\u6F84\u647A\u5BF8\u4E16\u702C\u755D\u662F\u51C4\u5236\u52E2\u59D3\u5F81\u6027\u6210\u653F\u6574\u661F\u6674\u68F2\u6816\u6B63\u6E05\u7272\u751F\u76DB\u7CBE\u8056\u58F0\u88FD\u897F\u8AA0\u8A93\u8ACB\u901D\u9192\u9752\u9759\u6589\u7A0E\u8106\u96BB\u5E2D\u60DC\u621A\u65A5\u6614\u6790\u77F3\u7A4D\u7C4D\u7E3E\u810A\u8CAC\u8D64\u8DE1\u8E5F\u78A9\u5207\u62D9\u63A5\u6442\u6298\u8A2D\u7A83\u7BC0\u8AAC\u96EA\u7D76\u820C\u8749\u4ED9\u5148\u5343\u5360\u5BA3\u5C02\u5C16\u5DDD\u6226\u6247\u64B0\u6813\u6834\u6CC9\u6D45\u6D17\u67D3\u6F5C\u714E\u717D\u65CB\u7A7F\u7BAD\u7DDA"],["c1a1","\u7E4A\u7FA8\u817A\u821B\u8239\u85A6\u8A6E\u8CCE\u8DF5\u9078\u9077\u92AD\u9291\u9583\u9BAE\u524D\u5584\u6F38\u7136\u5168\u7985\u7E55\u81B3\u7CCE\u564C\u5851\u5CA8\u63AA\u66FE\u66FD\u695A\u72D9\u758F\u758E\u790E\u7956\u79DF\u7C97\u7D20\u7D44\u8607\u8A34\u963B\u9061\u9F20\u50E7\u5275\u53CC\u53E2\u5009\u55AA\u58EE\u594F\u723D\u5B8B\u5C64\u531D\u60E3\u60F3\u635C\u6383\u633F\u63BB\u64CD\u65E9\u66F9\u5DE3\u69CD\u69FD\u6F15\u71E5\u4E89\u75E9\u76F8\u7A93\u7CDF\u7DCF\u7D9C\u8061\u8349\u8358\u846C\u84BC\u85FB\u88C5\u8D70\u9001\u906D\u9397\u971C\u9A12\u50CF\u5897\u618E"],["c2a1","\u81D3\u8535\u8D08\u9020\u4FC3\u5074\u5247\u5373\u606F\u6349\u675F\u6E2C\u8DB3\u901F\u4FD7\u5C5E\u8CCA\u65CF\u7D9A\u5352\u8896\u5176\u63C3\u5B58\u5B6B\u5C0A\u640D\u6751\u905C\u4ED6\u591A\u592A\u6C70\u8A51\u553E\u5815\u59A5\u60F0\u6253\u67C1\u8235\u6955\u9640\u99C4\u9A28\u4F53\u5806\u5BFE\u8010\u5CB1\u5E2F\u5F85\u6020\u614B\u6234\u66FF\u6CF0\u6EDE\u80CE\u817F\u82D4\u888B\u8CB8\u9000\u902E\u968A\u9EDB\u9BDB\u4EE3\u53F0\u5927\u7B2C\u918D\u984C\u9DF9\u6EDD\u7027\u5353\u5544\u5B85\u6258\u629E\u62D3\u6CA2\u6FEF\u7422\u8A17\u9438\u6FC1\u8AFE\u8338\u51E7\u86F8\u53EA"],["c3a1","\u53E9\u4F46\u9054\u8FB0\u596A\u8131\u5DFD\u7AEA\u8FBF\u68DA\u8C37\u72F8\u9C48\u6A3D\u8AB0\u4E39\u5358\u5606\u5766\u62C5\u63A2\u65E6\u6B4E\u6DE1\u6E5B\u70AD\u77ED\u7AEF\u7BAA\u7DBB\u803D\u80C6\u86CB\u8A95\u935B\u56E3\u58C7\u5F3E\u65AD\u6696\u6A80\u6BB5\u7537\u8AC7\u5024\u77E5\u5730\u5F1B\u6065\u667A\u6C60\u75F4\u7A1A\u7F6E\u81F4\u8718\u9045\u99B3\u7BC9\u755C\u7AF9\u7B51\u84C4\u9010\u79E9\u7A92\u8336\u5AE1\u7740\u4E2D\u4EF2\u5B99\u5FE0\u62BD\u663C\u67F1\u6CE8\u866B\u8877\u8A3B\u914E\u92F3\u99D0\u6A17\u7026\u732A\u82E7\u8457\u8CAF\u4E01\u5146\u51CB\u558B\u5BF5"],["c4a1","\u5E16\u5E33\u5E81\u5F14\u5F35\u5F6B\u5FB4\u61F2\u6311\u66A2\u671D\u6F6E\u7252\u753A\u773A\u8074\u8139\u8178\u8776\u8ABF\u8ADC\u8D85\u8DF3\u929A\u9577\u9802\u9CE5\u52C5\u6357\u76F4\u6715\u6C88\u73CD\u8CC3\u93AE\u9673\u6D25\u589C\u690E\u69CC\u8FFD\u939A\u75DB\u901A\u585A\u6802\u63B4\u69FB\u4F43\u6F2C\u67D8\u8FBB\u8526\u7DB4\u9354\u693F\u6F70\u576A\u58F7\u5B2C\u7D2C\u722A\u540A\u91E3\u9DB4\u4EAD\u4F4E\u505C\u5075\u5243\u8C9E\u5448\u5824\u5B9A\u5E1D\u5E95\u5EAD\u5EF7\u5F1F\u608C\u62B5\u633A\u63D0\u68AF\u6C40\u7887\u798E\u7A0B\u7DE0\u8247\u8A02\u8AE6\u8E44\u9013"],["c5a1","\u90B8\u912D\u91D8\u9F0E\u6CE5\u6458\u64E2\u6575\u6EF4\u7684\u7B1B\u9069\u93D1\u6EBA\u54F2\u5FB9\u64A4\u8F4D\u8FED\u9244\u5178\u586B\u5929\u5C55\u5E97\u6DFB\u7E8F\u751C\u8CBC\u8EE2\u985B\u70B9\u4F1D\u6BBF\u6FB1\u7530\u96FB\u514E\u5410\u5835\u5857\u59AC\u5C60\u5F92\u6597\u675C\u6E21\u767B\u83DF\u8CED\u9014\u90FD\u934D\u7825\u783A\u52AA\u5EA6\u571F\u5974\u6012\u5012\u515A\u51AC\u51CD\u5200\u5510\u5854\u5858\u5957\u5B95\u5CF6\u5D8B\u60BC\u6295\u642D\u6771\u6843\u68BC\u68DF\u76D7\u6DD8\u6E6F\u6D9B\u706F\u71C8\u5F53\u75D8\u7977\u7B49\u7B54\u7B52\u7CD6\u7D71\u5230"],["c6a1","\u8463\u8569\u85E4\u8A0E\u8B04\u8C46\u8E0F\u9003\u900F\u9419\u9676\u982D\u9A30\u95D8\u50CD\u52D5\u540C\u5802\u5C0E\u61A7\u649E\u6D1E\u77B3\u7AE5\u80F4\u8404\u9053\u9285\u5CE0\u9D07\u533F\u5F97\u5FB3\u6D9C\u7279\u7763\u79BF\u7BE4\u6BD2\u72EC\u8AAD\u6803\u6A61\u51F8\u7A81\u6934\u5C4A\u9CF6\u82EB\u5BC5\u9149\u701E\u5678\u5C6F\u60C7\u6566\u6C8C\u8C5A\u9041\u9813\u5451\u66C7\u920D\u5948\u90A3\u5185\u4E4D\u51EA\u8599\u8B0E\u7058\u637A\u934B\u6962\u99B4\u7E04\u7577\u5357\u6960\u8EDF\u96E3\u6C5D\u4E8C\u5C3C\u5F10\u8FE9\u5302\u8CD1\u8089\u8679\u5EFF\u65E5\u4E73\u5165"],["c7a1","\u5982\u5C3F\u97EE\u4EFB\u598A\u5FCD\u8A8D\u6FE1\u79B0\u7962\u5BE7\u8471\u732B\u71B1\u5E74\u5FF5\u637B\u649A\u71C3\u7C98\u4E43\u5EFC\u4E4B\u57DC\u56A2\u60A9\u6FC3\u7D0D\u80FD\u8133\u81BF\u8FB2\u8997\u86A4\u5DF4\u628A\u64AD\u8987\u6777\u6CE2\u6D3E\u7436\u7834\u5A46\u7F75\u82AD\u99AC\u4FF3\u5EC3\u62DD\u6392\u6557\u676F\u76C3\u724C\u80CC\u80BA\u8F29\u914D\u500D\u57F9\u5A92\u6885\u6973\u7164\u72FD\u8CB7\u58F2\u8CE0\u966A\u9019\u877F\u79E4\u77E7\u8429\u4F2F\u5265\u535A\u62CD\u67CF\u6CCA\u767D\u7B94\u7C95\u8236\u8584\u8FEB\u66DD\u6F20\u7206\u7E1B\u83AB\u99C1\u9EA6"],["c8a1","\u51FD\u7BB1\u7872\u7BB8\u8087\u7B48\u6AE8\u5E61\u808C\u7551\u7560\u516B\u9262\u6E8C\u767A\u9197\u9AEA\u4F10\u7F70\u629C\u7B4F\u95A5\u9CE9\u567A\u5859\u86E4\u96BC\u4F34\u5224\u534A\u53CD\u53DB\u5E06\u642C\u6591\u677F\u6C3E\u6C4E\u7248\u72AF\u73ED\u7554\u7E41\u822C\u85E9\u8CA9\u7BC4\u91C6\u7169\u9812\u98EF\u633D\u6669\u756A\u76E4\u78D0\u8543\u86EE\u532A\u5351\u5426\u5983\u5E87\u5F7C\u60B2\u6249\u6279\u62AB\u6590\u6BD4\u6CCC\u75B2\u76AE\u7891\u79D8\u7DCB\u7F77\u80A5\u88AB\u8AB9\u8CBB\u907F\u975E\u98DB\u6A0B\u7C38\u5099\u5C3E\u5FAE\u6787\u6BD8\u7435\u7709\u7F8E"],["c9a1","\u9F3B\u67CA\u7A17\u5339\u758B\u9AED\u5F66\u819D\u83F1\u8098\u5F3C\u5FC5\u7562\u7B46\u903C\u6867\u59EB\u5A9B\u7D10\u767E\u8B2C\u4FF5\u5F6A\u6A19\u6C37\u6F02\u74E2\u7968\u8868\u8A55\u8C79\u5EDF\u63CF\u75C5\u79D2\u82D7\u9328\u92F2\u849C\u86ED\u9C2D\u54C1\u5F6C\u658C\u6D5C\u7015\u8CA7\u8CD3\u983B\u654F\u74F6\u4E0D\u4ED8\u57E0\u592B\u5A66\u5BCC\u51A8\u5E03\u5E9C\u6016\u6276\u6577\u65A7\u666E\u6D6E\u7236\u7B26\u8150\u819A\u8299\u8B5C\u8CA0\u8CE6\u8D74\u961C\u9644\u4FAE\u64AB\u6B66\u821E\u8461\u856A\u90E8\u5C01\u6953\u98A8\u847A\u8557\u4F0F\u526F\u5FA9\u5E45\u670D"],["caa1","\u798F\u8179\u8907\u8986\u6DF5\u5F17\u6255\u6CB8\u4ECF\u7269\u9B92\u5206\u543B\u5674\u58B3\u61A4\u626E\u711A\u596E\u7C89\u7CDE\u7D1B\u96F0\u6587\u805E\u4E19\u4F75\u5175\u5840\u5E63\u5E73\u5F0A\u67C4\u4E26\u853D\u9589\u965B\u7C73\u9801\u50FB\u58C1\u7656\u78A7\u5225\u77A5\u8511\u7B86\u504F\u5909\u7247\u7BC7\u7DE8\u8FBA\u8FD4\u904D\u4FBF\u52C9\u5A29\u5F01\u97AD\u4FDD\u8217\u92EA\u5703\u6355\u6B69\u752B\u88DC\u8F14\u7A42\u52DF\u5893\u6155\u620A\u66AE\u6BCD\u7C3F\u83E9\u5023\u4FF8\u5305\u5446\u5831\u5949\u5B9D\u5CF0\u5CEF\u5D29\u5E96\u62B1\u6367\u653E\u65B9\u670B"],["cba1","\u6CD5\u6CE1\u70F9\u7832\u7E2B\u80DE\u82B3\u840C\u84EC\u8702\u8912\u8A2A\u8C4A\u90A6\u92D2\u98FD\u9CF3\u9D6C\u4E4F\u4EA1\u508D\u5256\u574A\u59A8\u5E3D\u5FD8\u5FD9\u623F\u66B4\u671B\u67D0\u68D2\u5192\u7D21\u80AA\u81A8\u8B00\u8C8C\u8CBF\u927E\u9632\u5420\u982C\u5317\u50D5\u535C\u58A8\u64B2\u6734\u7267\u7766\u7A46\u91E6\u52C3\u6CA1\u6B86\u5800\u5E4C\u5954\u672C\u7FFB\u51E1\u76C6\u6469\u78E8\u9B54\u9EBB\u57CB\u59B9\u6627\u679A\u6BCE\u54E9\u69D9\u5E55\u819C\u6795\u9BAA\u67FE\u9C52\u685D\u4EA6\u4FE3\u53C8\u62B9\u672B\u6CAB\u8FC4\u4FAD\u7E6D\u9EBF\u4E07\u6162\u6E80"],["cca1","\u6F2B\u8513\u5473\u672A\u9B45\u5DF3\u7B95\u5CAC\u5BC6\u871C\u6E4A\u84D1\u7A14\u8108\u5999\u7C8D\u6C11\u7720\u52D9\u5922\u7121\u725F\u77DB\u9727\u9D61\u690B\u5A7F\u5A18\u51A5\u540D\u547D\u660E\u76DF\u8FF7\u9298\u9CF4\u59EA\u725D\u6EC5\u514D\u68C9\u7DBF\u7DEC\u9762\u9EBA\u6478\u6A21\u8302\u5984\u5B5F\u6BDB\u731B\u76F2\u7DB2\u8017\u8499\u5132\u6728\u9ED9\u76EE\u6762\u52FF\u9905\u5C24\u623B\u7C7E\u8CB0\u554F\u60B6\u7D0B\u9580\u5301\u4E5F\u51B6\u591C\u723A\u8036\u91CE\u5F25\u77E2\u5384\u5F79\u7D04\u85AC\u8A33\u8E8D\u9756\u67F3\u85AE\u9453\u6109\u6108\u6CB9\u7652"],["cda1","\u8AED\u8F38\u552F\u4F51\u512A\u52C7\u53CB\u5BA5\u5E7D\u60A0\u6182\u63D6\u6709\u67DA\u6E67\u6D8C\u7336\u7337\u7531\u7950\u88D5\u8A98\u904A\u9091\u90F5\u96C4\u878D\u5915\u4E88\u4F59\u4E0E\u8A89\u8F3F\u9810\u50AD\u5E7C\u5996\u5BB9\u5EB8\u63DA\u63FA\u64C1\u66DC\u694A\u69D8\u6D0B\u6EB6\u7194\u7528\u7AAF\u7F8A\u8000\u8449\u84C9\u8981\u8B21\u8E0A\u9065\u967D\u990A\u617E\u6291\u6B32\u6C83\u6D74\u7FCC\u7FFC\u6DC0\u7F85\u87BA\u88F8\u6765\u83B1\u983C\u96F7\u6D1B\u7D61\u843D\u916A\u4E71\u5375\u5D50\u6B04\u6FEB\u85CD\u862D\u89A7\u5229\u540F\u5C65\u674E\u68A8\u7406\u7483"],["cea1","\u75E2\u88CF\u88E1\u91CC\u96E2\u9678\u5F8B\u7387\u7ACB\u844E\u63A0\u7565\u5289\u6D41\u6E9C\u7409\u7559\u786B\u7C92\u9686\u7ADC\u9F8D\u4FB6\u616E\u65C5\u865C\u4E86\u4EAE\u50DA\u4E21\u51CC\u5BEE\u6599\u6881\u6DBC\u731F\u7642\u77AD\u7A1C\u7CE7\u826F\u8AD2\u907C\u91CF\u9675\u9818\u529B\u7DD1\u502B\u5398\u6797\u6DCB\u71D0\u7433\u81E8\u8F2A\u96A3\u9C57\u9E9F\u7460\u5841\u6D99\u7D2F\u985E\u4EE4\u4F36\u4F8B\u51B7\u52B1\u5DBA\u601C\u73B2\u793C\u82D3\u9234\u96B7\u96F6\u970A\u9E97\u9F62\u66A6\u6B74\u5217\u52A3\u70C8\u88C2\u5EC9\u604B\u6190\u6F23\u7149\u7C3E\u7DF4\u806F"],["cfa1","\u84EE\u9023\u932C\u5442\u9B6F\u6AD3\u7089\u8CC2\u8DEF\u9732\u52B4\u5A41\u5ECA\u5F04\u6717\u697C\u6994\u6D6A\u6F0F\u7262\u72FC\u7BED\u8001\u807E\u874B\u90CE\u516D\u9E93\u7984\u808B\u9332\u8AD6\u502D\u548C\u8A71\u6B6A\u8CC4\u8107\u60D1\u67A0\u9DF2\u4E99\u4E98\u9C10\u8A6B\u85C1\u8568\u6900\u6E7E\u7897\u8155"],["d0a1","\u5F0C\u4E10\u4E15\u4E2A\u4E31\u4E36\u4E3C\u4E3F\u4E42\u4E56\u4E58\u4E82\u4E85\u8C6B\u4E8A\u8212\u5F0D\u4E8E\u4E9E\u4E9F\u4EA0\u4EA2\u4EB0\u4EB3\u4EB6\u4ECE\u4ECD\u4EC4\u4EC6\u4EC2\u4ED7\u4EDE\u4EED\u4EDF\u4EF7\u4F09\u4F5A\u4F30\u4F5B\u4F5D\u4F57\u4F47\u4F76\u4F88\u4F8F\u4F98\u4F7B\u4F69\u4F70\u4F91\u4F6F\u4F86\u4F96\u5118\u4FD4\u4FDF\u4FCE\u4FD8\u4FDB\u4FD1\u4FDA\u4FD0\u4FE4\u4FE5\u501A\u5028\u5014\u502A\u5025\u5005\u4F1C\u4FF6\u5021\u5029\u502C\u4FFE\u4FEF\u5011\u5006\u5043\u5047\u6703\u5055\u5050\u5048\u505A\u5056\u506C\u5078\u5080\u509A\u5085\u50B4\u50B2"],["d1a1","\u50C9\u50CA\u50B3\u50C2\u50D6\u50DE\u50E5\u50ED\u50E3\u50EE\u50F9\u50F5\u5109\u5101\u5102\u5116\u5115\u5114\u511A\u5121\u513A\u5137\u513C\u513B\u513F\u5140\u5152\u514C\u5154\u5162\u7AF8\u5169\u516A\u516E\u5180\u5182\u56D8\u518C\u5189\u518F\u5191\u5193\u5195\u5196\u51A4\u51A6\u51A2\u51A9\u51AA\u51AB\u51B3\u51B1\u51B2\u51B0\u51B5\u51BD\u51C5\u51C9\u51DB\u51E0\u8655\u51E9\u51ED\u51F0\u51F5\u51FE\u5204\u520B\u5214\u520E\u5227\u522A\u522E\u5233\u5239\u524F\u5244\u524B\u524C\u525E\u5254\u526A\u5274\u5269\u5273\u527F\u527D\u528D\u5294\u5292\u5271\u5288\u5291\u8FA8"],["d2a1","\u8FA7\u52AC\u52AD\u52BC\u52B5\u52C1\u52CD\u52D7\u52DE\u52E3\u52E6\u98ED\u52E0\u52F3\u52F5\u52F8\u52F9\u5306\u5308\u7538\u530D\u5310\u530F\u5315\u531A\u5323\u532F\u5331\u5333\u5338\u5340\u5346\u5345\u4E17\u5349\u534D\u51D6\u535E\u5369\u536E\u5918\u537B\u5377\u5382\u5396\u53A0\u53A6\u53A5\u53AE\u53B0\u53B6\u53C3\u7C12\u96D9\u53DF\u66FC\u71EE\u53EE\u53E8\u53ED\u53FA\u5401\u543D\u5440\u542C\u542D\u543C\u542E\u5436\u5429\u541D\u544E\u548F\u5475\u548E\u545F\u5471\u5477\u5470\u5492\u547B\u5480\u5476\u5484\u5490\u5486\u54C7\u54A2\u54B8\u54A5\u54AC\u54C4\u54C8\u54A8"],["d3a1","\u54AB\u54C2\u54A4\u54BE\u54BC\u54D8\u54E5\u54E6\u550F\u5514\u54FD\u54EE\u54ED\u54FA\u54E2\u5539\u5540\u5563\u554C\u552E\u555C\u5545\u5556\u5557\u5538\u5533\u555D\u5599\u5580\u54AF\u558A\u559F\u557B\u557E\u5598\u559E\u55AE\u557C\u5583\u55A9\u5587\u55A8\u55DA\u55C5\u55DF\u55C4\u55DC\u55E4\u55D4\u5614\u55F7\u5616\u55FE\u55FD\u561B\u55F9\u564E\u5650\u71DF\u5634\u5636\u5632\u5638\u566B\u5664\u562F\u566C\u566A\u5686\u5680\u568A\u56A0\u5694\u568F\u56A5\u56AE\u56B6\u56B4\u56C2\u56BC\u56C1\u56C3\u56C0\u56C8\u56CE\u56D1\u56D3\u56D7\u56EE\u56F9\u5700\u56FF\u5704\u5709"],["d4a1","\u5708\u570B\u570D\u5713\u5718\u5716\u55C7\u571C\u5726\u5737\u5738\u574E\u573B\u5740\u574F\u5769\u57C0\u5788\u5761\u577F\u5789\u5793\u57A0\u57B3\u57A4\u57AA\u57B0\u57C3\u57C6\u57D4\u57D2\u57D3\u580A\u57D6\u57E3\u580B\u5819\u581D\u5872\u5821\u5862\u584B\u5870\u6BC0\u5852\u583D\u5879\u5885\u58B9\u589F\u58AB\u58BA\u58DE\u58BB\u58B8\u58AE\u58C5\u58D3\u58D1\u58D7\u58D9\u58D8\u58E5\u58DC\u58E4\u58DF\u58EF\u58FA\u58F9\u58FB\u58FC\u58FD\u5902\u590A\u5910\u591B\u68A6\u5925\u592C\u592D\u5932\u5938\u593E\u7AD2\u5955\u5950\u594E\u595A\u5958\u5962\u5960\u5967\u596C\u5969"],["d5a1","\u5978\u5981\u599D\u4F5E\u4FAB\u59A3\u59B2\u59C6\u59E8\u59DC\u598D\u59D9\u59DA\u5A25\u5A1F\u5A11\u5A1C\u5A09\u5A1A\u5A40\u5A6C\u5A49\u5A35\u5A36\u5A62\u5A6A\u5A9A\u5ABC\u5ABE\u5ACB\u5AC2\u5ABD\u5AE3\u5AD7\u5AE6\u5AE9\u5AD6\u5AFA\u5AFB\u5B0C\u5B0B\u5B16\u5B32\u5AD0\u5B2A\u5B36\u5B3E\u5B43\u5B45\u5B40\u5B51\u5B55\u5B5A\u5B5B\u5B65\u5B69\u5B70\u5B73\u5B75\u5B78\u6588\u5B7A\u5B80\u5B83\u5BA6\u5BB8\u5BC3\u5BC7\u5BC9\u5BD4\u5BD0\u5BE4\u5BE6\u5BE2\u5BDE\u5BE5\u5BEB\u5BF0\u5BF6\u5BF3\u5C05\u5C07\u5C08\u5C0D\u5C13\u5C20\u5C22\u5C28\u5C38\u5C39\u5C41\u5C46\u5C4E\u5C53"],["d6a1","\u5C50\u5C4F\u5B71\u5C6C\u5C6E\u4E62\u5C76\u5C79\u5C8C\u5C91\u5C94\u599B\u5CAB\u5CBB\u5CB6\u5CBC\u5CB7\u5CC5\u5CBE\u5CC7\u5CD9\u5CE9\u5CFD\u5CFA\u5CED\u5D8C\u5CEA\u5D0B\u5D15\u5D17\u5D5C\u5D1F\u5D1B\u5D11\u5D14\u5D22\u5D1A\u5D19\u5D18\u5D4C\u5D52\u5D4E\u5D4B\u5D6C\u5D73\u5D76\u5D87\u5D84\u5D82\u5DA2\u5D9D\u5DAC\u5DAE\u5DBD\u5D90\u5DB7\u5DBC\u5DC9\u5DCD\u5DD3\u5DD2\u5DD6\u5DDB\u5DEB\u5DF2\u5DF5\u5E0B\u5E1A\u5E19\u5E11\u5E1B\u5E36\u5E37\u5E44\u5E43\u5E40\u5E4E\u5E57\u5E54\u5E5F\u5E62\u5E64\u5E47\u5E75\u5E76\u5E7A\u9EBC\u5E7F\u5EA0\u5EC1\u5EC2\u5EC8\u5ED0\u5ECF"],["d7a1","\u5ED6\u5EE3\u5EDD\u5EDA\u5EDB\u5EE2\u5EE1\u5EE8\u5EE9\u5EEC\u5EF1\u5EF3\u5EF0\u5EF4\u5EF8\u5EFE\u5F03\u5F09\u5F5D\u5F5C\u5F0B\u5F11\u5F16\u5F29\u5F2D\u5F38\u5F41\u5F48\u5F4C\u5F4E\u5F2F\u5F51\u5F56\u5F57\u5F59\u5F61\u5F6D\u5F73\u5F77\u5F83\u5F82\u5F7F\u5F8A\u5F88\u5F91\u5F87\u5F9E\u5F99\u5F98\u5FA0\u5FA8\u5FAD\u5FBC\u5FD6\u5FFB\u5FE4\u5FF8\u5FF1\u5FDD\u60B3\u5FFF\u6021\u6060\u6019\u6010\u6029\u600E\u6031\u601B\u6015\u602B\u6026\u600F\u603A\u605A\u6041\u606A\u6077\u605F\u604A\u6046\u604D\u6063\u6043\u6064\u6042\u606C\u606B\u6059\u6081\u608D\u60E7\u6083\u609A"],["d8a1","\u6084\u609B\u6096\u6097\u6092\u60A7\u608B\u60E1\u60B8\u60E0\u60D3\u60B4\u5FF0\u60BD\u60C6\u60B5\u60D8\u614D\u6115\u6106\u60F6\u60F7\u6100\u60F4\u60FA\u6103\u6121\u60FB\u60F1\u610D\u610E\u6147\u613E\u6128\u6127\u614A\u613F\u613C\u612C\u6134\u613D\u6142\u6144\u6173\u6177\u6158\u6159\u615A\u616B\u6174\u616F\u6165\u6171\u615F\u615D\u6153\u6175\u6199\u6196\u6187\u61AC\u6194\u619A\u618A\u6191\u61AB\u61AE\u61CC\u61CA\u61C9\u61F7\u61C8\u61C3\u61C6\u61BA\u61CB\u7F79\u61CD\u61E6\u61E3\u61F6\u61FA\u61F4\u61FF\u61FD\u61FC\u61FE\u6200\u6208\u6209\u620D\u620C\u6214\u621B"],["d9a1","\u621E\u6221\u622A\u622E\u6230\u6232\u6233\u6241\u624E\u625E\u6263\u625B\u6260\u6268\u627C\u6282\u6289\u627E\u6292\u6293\u6296\u62D4\u6283\u6294\u62D7\u62D1\u62BB\u62CF\u62FF\u62C6\u64D4\u62C8\u62DC\u62CC\u62CA\u62C2\u62C7\u629B\u62C9\u630C\u62EE\u62F1\u6327\u6302\u6308\u62EF\u62F5\u6350\u633E\u634D\u641C\u634F\u6396\u638E\u6380\u63AB\u6376\u63A3\u638F\u6389\u639F\u63B5\u636B\u6369\u63BE\u63E9\u63C0\u63C6\u63E3\u63C9\u63D2\u63F6\u63C4\u6416\u6434\u6406\u6413\u6426\u6436\u651D\u6417\u6428\u640F\u6467\u646F\u6476\u644E\u652A\u6495\u6493\u64A5\u64A9\u6488\u64BC"],["daa1","\u64DA\u64D2\u64C5\u64C7\u64BB\u64D8\u64C2\u64F1\u64E7\u8209\u64E0\u64E1\u62AC\u64E3\u64EF\u652C\u64F6\u64F4\u64F2\u64FA\u6500\u64FD\u6518\u651C\u6505\u6524\u6523\u652B\u6534\u6535\u6537\u6536\u6538\u754B\u6548\u6556\u6555\u654D\u6558\u655E\u655D\u6572\u6578\u6582\u6583\u8B8A\u659B\u659F\u65AB\u65B7\u65C3\u65C6\u65C1\u65C4\u65CC\u65D2\u65DB\u65D9\u65E0\u65E1\u65F1\u6772\u660A\u6603\u65FB\u6773\u6635\u6636\u6634\u661C\u664F\u6644\u6649\u6641\u665E\u665D\u6664\u6667\u6668\u665F\u6662\u6670\u6683\u6688\u668E\u6689\u6684\u6698\u669D\u66C1\u66B9\u66C9\u66BE\u66BC"],["dba1","\u66C4\u66B8\u66D6\u66DA\u66E0\u663F\u66E6\u66E9\u66F0\u66F5\u66F7\u670F\u6716\u671E\u6726\u6727\u9738\u672E\u673F\u6736\u6741\u6738\u6737\u6746\u675E\u6760\u6759\u6763\u6764\u6789\u6770\u67A9\u677C\u676A\u678C\u678B\u67A6\u67A1\u6785\u67B7\u67EF\u67B4\u67EC\u67B3\u67E9\u67B8\u67E4\u67DE\u67DD\u67E2\u67EE\u67B9\u67CE\u67C6\u67E7\u6A9C\u681E\u6846\u6829\u6840\u684D\u6832\u684E\u68B3\u682B\u6859\u6863\u6877\u687F\u689F\u688F\u68AD\u6894\u689D\u689B\u6883\u6AAE\u68B9\u6874\u68B5\u68A0\u68BA\u690F\u688D\u687E\u6901\u68CA\u6908\u68D8\u6922\u6926\u68E1\u690C\u68CD"],["dca1","\u68D4\u68E7\u68D5\u6936\u6912\u6904\u68D7\u68E3\u6925\u68F9\u68E0\u68EF\u6928\u692A\u691A\u6923\u6921\u68C6\u6979\u6977\u695C\u6978\u696B\u6954\u697E\u696E\u6939\u6974\u693D\u6959\u6930\u6961\u695E\u695D\u6981\u696A\u69B2\u69AE\u69D0\u69BF\u69C1\u69D3\u69BE\u69CE\u5BE8\u69CA\u69DD\u69BB\u69C3\u69A7\u6A2E\u6991\u69A0\u699C\u6995\u69B4\u69DE\u69E8\u6A02\u6A1B\u69FF\u6B0A\u69F9\u69F2\u69E7\u6A05\u69B1\u6A1E\u69ED\u6A14\u69EB\u6A0A\u6A12\u6AC1\u6A23\u6A13\u6A44\u6A0C\u6A72\u6A36\u6A78\u6A47\u6A62\u6A59\u6A66\u6A48\u6A38\u6A22\u6A90\u6A8D\u6AA0\u6A84\u6AA2\u6AA3"],["dda1","\u6A97\u8617\u6ABB\u6AC3\u6AC2\u6AB8\u6AB3\u6AAC\u6ADE\u6AD1\u6ADF\u6AAA\u6ADA\u6AEA\u6AFB\u6B05\u8616\u6AFA\u6B12\u6B16\u9B31\u6B1F\u6B38\u6B37\u76DC\u6B39\u98EE\u6B47\u6B43\u6B49\u6B50\u6B59\u6B54\u6B5B\u6B5F\u6B61\u6B78\u6B79\u6B7F\u6B80\u6B84\u6B83\u6B8D\u6B98\u6B95\u6B9E\u6BA4\u6BAA\u6BAB\u6BAF\u6BB2\u6BB1\u6BB3\u6BB7\u6BBC\u6BC6\u6BCB\u6BD3\u6BDF\u6BEC\u6BEB\u6BF3\u6BEF\u9EBE\u6C08\u6C13\u6C14\u6C1B\u6C24\u6C23\u6C5E\u6C55\u6C62\u6C6A\u6C82\u6C8D\u6C9A\u6C81\u6C9B\u6C7E\u6C68\u6C73\u6C92\u6C90\u6CC4\u6CF1\u6CD3\u6CBD\u6CD7\u6CC5\u6CDD\u6CAE\u6CB1\u6CBE"],["dea1","\u6CBA\u6CDB\u6CEF\u6CD9\u6CEA\u6D1F\u884D\u6D36\u6D2B\u6D3D\u6D38\u6D19\u6D35\u6D33\u6D12\u6D0C\u6D63\u6D93\u6D64\u6D5A\u6D79\u6D59\u6D8E\u6D95\u6FE4\u6D85\u6DF9\u6E15\u6E0A\u6DB5\u6DC7\u6DE6\u6DB8\u6DC6\u6DEC\u6DDE\u6DCC\u6DE8\u6DD2\u6DC5\u6DFA\u6DD9\u6DE4\u6DD5\u6DEA\u6DEE\u6E2D\u6E6E\u6E2E\u6E19\u6E72\u6E5F\u6E3E\u6E23\u6E6B\u6E2B\u6E76\u6E4D\u6E1F\u6E43\u6E3A\u6E4E\u6E24\u6EFF\u6E1D\u6E38\u6E82\u6EAA\u6E98\u6EC9\u6EB7\u6ED3\u6EBD\u6EAF\u6EC4\u6EB2\u6ED4\u6ED5\u6E8F\u6EA5\u6EC2\u6E9F\u6F41\u6F11\u704C\u6EEC\u6EF8\u6EFE\u6F3F\u6EF2\u6F31\u6EEF\u6F32\u6ECC"],["dfa1","\u6F3E\u6F13\u6EF7\u6F86\u6F7A\u6F78\u6F81\u6F80\u6F6F\u6F5B\u6FF3\u6F6D\u6F82\u6F7C\u6F58\u6F8E\u6F91\u6FC2\u6F66\u6FB3\u6FA3\u6FA1\u6FA4\u6FB9\u6FC6\u6FAA\u6FDF\u6FD5\u6FEC\u6FD4\u6FD8\u6FF1\u6FEE\u6FDB\u7009\u700B\u6FFA\u7011\u7001\u700F\u6FFE\u701B\u701A\u6F74\u701D\u7018\u701F\u7030\u703E\u7032\u7051\u7063\u7099\u7092\u70AF\u70F1\u70AC\u70B8\u70B3\u70AE\u70DF\u70CB\u70DD\u70D9\u7109\u70FD\u711C\u7119\u7165\u7155\u7188\u7166\u7162\u714C\u7156\u716C\u718F\u71FB\u7184\u7195\u71A8\u71AC\u71D7\u71B9\u71BE\u71D2\u71C9\u71D4\u71CE\u71E0\u71EC\u71E7\u71F5\u71FC"],["e0a1","\u71F9\u71FF\u720D\u7210\u721B\u7228\u722D\u722C\u7230\u7232\u723B\u723C\u723F\u7240\u7246\u724B\u7258\u7274\u727E\u7282\u7281\u7287\u7292\u7296\u72A2\u72A7\u72B9\u72B2\u72C3\u72C6\u72C4\u72CE\u72D2\u72E2\u72E0\u72E1\u72F9\u72F7\u500F\u7317\u730A\u731C\u7316\u731D\u7334\u732F\u7329\u7325\u733E\u734E\u734F\u9ED8\u7357\u736A\u7368\u7370\u7378\u7375\u737B\u737A\u73C8\u73B3\u73CE\u73BB\u73C0\u73E5\u73EE\u73DE\u74A2\u7405\u746F\u7425\u73F8\u7432\u743A\u7455\u743F\u745F\u7459\u7441\u745C\u7469\u7470\u7463\u746A\u7476\u747E\u748B\u749E\u74A7\u74CA\u74CF\u74D4\u73F1"],["e1a1","\u74E0\u74E3\u74E7\u74E9\u74EE\u74F2\u74F0\u74F1\u74F8\u74F7\u7504\u7503\u7505\u750C\u750E\u750D\u7515\u7513\u751E\u7526\u752C\u753C\u7544\u754D\u754A\u7549\u755B\u7546\u755A\u7569\u7564\u7567\u756B\u756D\u7578\u7576\u7586\u7587\u7574\u758A\u7589\u7582\u7594\u759A\u759D\u75A5\u75A3\u75C2\u75B3\u75C3\u75B5\u75BD\u75B8\u75BC\u75B1\u75CD\u75CA\u75D2\u75D9\u75E3\u75DE\u75FE\u75FF\u75FC\u7601\u75F0\u75FA\u75F2\u75F3\u760B\u760D\u7609\u761F\u7627\u7620\u7621\u7622\u7624\u7634\u7630\u763B\u7647\u7648\u7646\u765C\u7658\u7661\u7662\u7668\u7669\u766A\u7667\u766C\u7670"],["e2a1","\u7672\u7676\u7678\u767C\u7680\u7683\u7688\u768B\u768E\u7696\u7693\u7699\u769A\u76B0\u76B4\u76B8\u76B9\u76BA\u76C2\u76CD\u76D6\u76D2\u76DE\u76E1\u76E5\u76E7\u76EA\u862F\u76FB\u7708\u7707\u7704\u7729\u7724\u771E\u7725\u7726\u771B\u7737\u7738\u7747\u775A\u7768\u776B\u775B\u7765\u777F\u777E\u7779\u778E\u778B\u7791\u77A0\u779E\u77B0\u77B6\u77B9\u77BF\u77BC\u77BD\u77BB\u77C7\u77CD\u77D7\u77DA\u77DC\u77E3\u77EE\u77FC\u780C\u7812\u7926\u7820\u792A\u7845\u788E\u7874\u7886\u787C\u789A\u788C\u78A3\u78B5\u78AA\u78AF\u78D1\u78C6\u78CB\u78D4\u78BE\u78BC\u78C5\u78CA\u78EC"],["e3a1","\u78E7\u78DA\u78FD\u78F4\u7907\u7912\u7911\u7919\u792C\u792B\u7940\u7960\u7957\u795F\u795A\u7955\u7953\u797A\u797F\u798A\u799D\u79A7\u9F4B\u79AA\u79AE\u79B3\u79B9\u79BA\u79C9\u79D5\u79E7\u79EC\u79E1\u79E3\u7A08\u7A0D\u7A18\u7A19\u7A20\u7A1F\u7980\u7A31\u7A3B\u7A3E\u7A37\u7A43\u7A57\u7A49\u7A61\u7A62\u7A69\u9F9D\u7A70\u7A79\u7A7D\u7A88\u7A97\u7A95\u7A98\u7A96\u7AA9\u7AC8\u7AB0\u7AB6\u7AC5\u7AC4\u7ABF\u9083\u7AC7\u7ACA\u7ACD\u7ACF\u7AD5\u7AD3\u7AD9\u7ADA\u7ADD\u7AE1\u7AE2\u7AE6\u7AED\u7AF0\u7B02\u7B0F\u7B0A\u7B06\u7B33\u7B18\u7B19\u7B1E\u7B35\u7B28\u7B36\u7B50"],["e4a1","\u7B7A\u7B04\u7B4D\u7B0B\u7B4C\u7B45\u7B75\u7B65\u7B74\u7B67\u7B70\u7B71\u7B6C\u7B6E\u7B9D\u7B98\u7B9F\u7B8D\u7B9C\u7B9A\u7B8B\u7B92\u7B8F\u7B5D\u7B99\u7BCB\u7BC1\u7BCC\u7BCF\u7BB4\u7BC6\u7BDD\u7BE9\u7C11\u7C14\u7BE6\u7BE5\u7C60\u7C00\u7C07\u7C13\u7BF3\u7BF7\u7C17\u7C0D\u7BF6\u7C23\u7C27\u7C2A\u7C1F\u7C37\u7C2B\u7C3D\u7C4C\u7C43\u7C54\u7C4F\u7C40\u7C50\u7C58\u7C5F\u7C64\u7C56\u7C65\u7C6C\u7C75\u7C83\u7C90\u7CA4\u7CAD\u7CA2\u7CAB\u7CA1\u7CA8\u7CB3\u7CB2\u7CB1\u7CAE\u7CB9\u7CBD\u7CC0\u7CC5\u7CC2\u7CD8\u7CD2\u7CDC\u7CE2\u9B3B\u7CEF\u7CF2\u7CF4\u7CF6\u7CFA\u7D06"],["e5a1","\u7D02\u7D1C\u7D15\u7D0A\u7D45\u7D4B\u7D2E\u7D32\u7D3F\u7D35\u7D46\u7D73\u7D56\u7D4E\u7D72\u7D68\u7D6E\u7D4F\u7D63\u7D93\u7D89\u7D5B\u7D8F\u7D7D\u7D9B\u7DBA\u7DAE\u7DA3\u7DB5\u7DC7\u7DBD\u7DAB\u7E3D\u7DA2\u7DAF\u7DDC\u7DB8\u7D9F\u7DB0\u7DD8\u7DDD\u7DE4\u7DDE\u7DFB\u7DF2\u7DE1\u7E05\u7E0A\u7E23\u7E21\u7E12\u7E31\u7E1F\u7E09\u7E0B\u7E22\u7E46\u7E66\u7E3B\u7E35\u7E39\u7E43\u7E37\u7E32\u7E3A\u7E67\u7E5D\u7E56\u7E5E\u7E59\u7E5A\u7E79\u7E6A\u7E69\u7E7C\u7E7B\u7E83\u7DD5\u7E7D\u8FAE\u7E7F\u7E88\u7E89\u7E8C\u7E92\u7E90\u7E93\u7E94\u7E96\u7E8E\u7E9B\u7E9C\u7F38\u7F3A"],["e6a1","\u7F45\u7F4C\u7F4D\u7F4E\u7F50\u7F51\u7F55\u7F54\u7F58\u7F5F\u7F60\u7F68\u7F69\u7F67\u7F78\u7F82\u7F86\u7F83\u7F88\u7F87\u7F8C\u7F94\u7F9E\u7F9D\u7F9A\u7FA3\u7FAF\u7FB2\u7FB9\u7FAE\u7FB6\u7FB8\u8B71\u7FC5\u7FC6\u7FCA\u7FD5\u7FD4\u7FE1\u7FE6\u7FE9\u7FF3\u7FF9\u98DC\u8006\u8004\u800B\u8012\u8018\u8019\u801C\u8021\u8028\u803F\u803B\u804A\u8046\u8052\u8058\u805A\u805F\u8062\u8068\u8073\u8072\u8070\u8076\u8079\u807D\u807F\u8084\u8086\u8085\u809B\u8093\u809A\u80AD\u5190\u80AC\u80DB\u80E5\u80D9\u80DD\u80C4\u80DA\u80D6\u8109\u80EF\u80F1\u811B\u8129\u8123\u812F\u814B"],["e7a1","\u968B\u8146\u813E\u8153\u8151\u80FC\u8171\u816E\u8165\u8166\u8174\u8183\u8188\u818A\u8180\u8182\u81A0\u8195\u81A4\u81A3\u815F\u8193\u81A9\u81B0\u81B5\u81BE\u81B8\u81BD\u81C0\u81C2\u81BA\u81C9\u81CD\u81D1\u81D9\u81D8\u81C8\u81DA\u81DF\u81E0\u81E7\u81FA\u81FB\u81FE\u8201\u8202\u8205\u8207\u820A\u820D\u8210\u8216\u8229\u822B\u8238\u8233\u8240\u8259\u8258\u825D\u825A\u825F\u8264\u8262\u8268\u826A\u826B\u822E\u8271\u8277\u8278\u827E\u828D\u8292\u82AB\u829F\u82BB\u82AC\u82E1\u82E3\u82DF\u82D2\u82F4\u82F3\u82FA\u8393\u8303\u82FB\u82F9\u82DE\u8306\u82DC\u8309\u82D9"],["e8a1","\u8335\u8334\u8316\u8332\u8331\u8340\u8339\u8350\u8345\u832F\u832B\u8317\u8318\u8385\u839A\u83AA\u839F\u83A2\u8396\u8323\u838E\u8387\u838A\u837C\u83B5\u8373\u8375\u83A0\u8389\u83A8\u83F4\u8413\u83EB\u83CE\u83FD\u8403\u83D8\u840B\u83C1\u83F7\u8407\u83E0\u83F2\u840D\u8422\u8420\u83BD\u8438\u8506\u83FB\u846D\u842A\u843C\u855A\u8484\u8477\u846B\u84AD\u846E\u8482\u8469\u8446\u842C\u846F\u8479\u8435\u84CA\u8462\u84B9\u84BF\u849F\u84D9\u84CD\u84BB\u84DA\u84D0\u84C1\u84C6\u84D6\u84A1\u8521\u84FF\u84F4\u8517\u8518\u852C\u851F\u8515\u8514\u84FC\u8540\u8563\u8558\u8548"],["e9a1","\u8541\u8602\u854B\u8555\u8580\u85A4\u8588\u8591\u858A\u85A8\u856D\u8594\u859B\u85EA\u8587\u859C\u8577\u857E\u8590\u85C9\u85BA\u85CF\u85B9\u85D0\u85D5\u85DD\u85E5\u85DC\u85F9\u860A\u8613\u860B\u85FE\u85FA\u8606\u8622\u861A\u8630\u863F\u864D\u4E55\u8654\u865F\u8667\u8671\u8693\u86A3\u86A9\u86AA\u868B\u868C\u86B6\u86AF\u86C4\u86C6\u86B0\u86C9\u8823\u86AB\u86D4\u86DE\u86E9\u86EC\u86DF\u86DB\u86EF\u8712\u8706\u8708\u8700\u8703\u86FB\u8711\u8709\u870D\u86F9\u870A\u8734\u873F\u8737\u873B\u8725\u8729\u871A\u8760\u875F\u8778\u874C\u874E\u8774\u8757\u8768\u876E\u8759"],["eaa1","\u8753\u8763\u876A\u8805\u87A2\u879F\u8782\u87AF\u87CB\u87BD\u87C0\u87D0\u96D6\u87AB\u87C4\u87B3\u87C7\u87C6\u87BB\u87EF\u87F2\u87E0\u880F\u880D\u87FE\u87F6\u87F7\u880E\u87D2\u8811\u8816\u8815\u8822\u8821\u8831\u8836\u8839\u8827\u883B\u8844\u8842\u8852\u8859\u885E\u8862\u886B\u8881\u887E\u889E\u8875\u887D\u88B5\u8872\u8882\u8897\u8892\u88AE\u8899\u88A2\u888D\u88A4\u88B0\u88BF\u88B1\u88C3\u88C4\u88D4\u88D8\u88D9\u88DD\u88F9\u8902\u88FC\u88F4\u88E8\u88F2\u8904\u890C\u890A\u8913\u8943\u891E\u8925\u892A\u892B\u8941\u8944\u893B\u8936\u8938\u894C\u891D\u8960\u895E"],["eba1","\u8966\u8964\u896D\u896A\u896F\u8974\u8977\u897E\u8983\u8988\u898A\u8993\u8998\u89A1\u89A9\u89A6\u89AC\u89AF\u89B2\u89BA\u89BD\u89BF\u89C0\u89DA\u89DC\u89DD\u89E7\u89F4\u89F8\u8A03\u8A16\u8A10\u8A0C\u8A1B\u8A1D\u8A25\u8A36\u8A41\u8A5B\u8A52\u8A46\u8A48\u8A7C\u8A6D\u8A6C\u8A62\u8A85\u8A82\u8A84\u8AA8\u8AA1\u8A91\u8AA5\u8AA6\u8A9A\u8AA3\u8AC4\u8ACD\u8AC2\u8ADA\u8AEB\u8AF3\u8AE7\u8AE4\u8AF1\u8B14\u8AE0\u8AE2\u8AF7\u8ADE\u8ADB\u8B0C\u8B07\u8B1A\u8AE1\u8B16\u8B10\u8B17\u8B20\u8B33\u97AB\u8B26\u8B2B\u8B3E\u8B28\u8B41\u8B4C\u8B4F\u8B4E\u8B49\u8B56\u8B5B\u8B5A\u8B6B"],["eca1","\u8B5F\u8B6C\u8B6F\u8B74\u8B7D\u8B80\u8B8C\u8B8E\u8B92\u8B93\u8B96\u8B99\u8B9A\u8C3A\u8C41\u8C3F\u8C48\u8C4C\u8C4E\u8C50\u8C55\u8C62\u8C6C\u8C78\u8C7A\u8C82\u8C89\u8C85\u8C8A\u8C8D\u8C8E\u8C94\u8C7C\u8C98\u621D\u8CAD\u8CAA\u8CBD\u8CB2\u8CB3\u8CAE\u8CB6\u8CC8\u8CC1\u8CE4\u8CE3\u8CDA\u8CFD\u8CFA\u8CFB\u8D04\u8D05\u8D0A\u8D07\u8D0F\u8D0D\u8D10\u9F4E\u8D13\u8CCD\u8D14\u8D16\u8D67\u8D6D\u8D71\u8D73\u8D81\u8D99\u8DC2\u8DBE\u8DBA\u8DCF\u8DDA\u8DD6\u8DCC\u8DDB\u8DCB\u8DEA\u8DEB\u8DDF\u8DE3\u8DFC\u8E08\u8E09\u8DFF\u8E1D\u8E1E\u8E10\u8E1F\u8E42\u8E35\u8E30\u8E34\u8E4A"],["eda1","\u8E47\u8E49\u8E4C\u8E50\u8E48\u8E59\u8E64\u8E60\u8E2A\u8E63\u8E55\u8E76\u8E72\u8E7C\u8E81\u8E87\u8E85\u8E84\u8E8B\u8E8A\u8E93\u8E91\u8E94\u8E99\u8EAA\u8EA1\u8EAC\u8EB0\u8EC6\u8EB1\u8EBE\u8EC5\u8EC8\u8ECB\u8EDB\u8EE3\u8EFC\u8EFB\u8EEB\u8EFE\u8F0A\u8F05\u8F15\u8F12\u8F19\u8F13\u8F1C\u8F1F\u8F1B\u8F0C\u8F26\u8F33\u8F3B\u8F39\u8F45\u8F42\u8F3E\u8F4C\u8F49\u8F46\u8F4E\u8F57\u8F5C\u8F62\u8F63\u8F64\u8F9C\u8F9F\u8FA3\u8FAD\u8FAF\u8FB7\u8FDA\u8FE5\u8FE2\u8FEA\u8FEF\u9087\u8FF4\u9005\u8FF9\u8FFA\u9011\u9015\u9021\u900D\u901E\u9016\u900B\u9027\u9036\u9035\u9039\u8FF8"],["eea1","\u904F\u9050\u9051\u9052\u900E\u9049\u903E\u9056\u9058\u905E\u9068\u906F\u9076\u96A8\u9072\u9082\u907D\u9081\u9080\u908A\u9089\u908F\u90A8\u90AF\u90B1\u90B5\u90E2\u90E4\u6248\u90DB\u9102\u9112\u9119\u9132\u9130\u914A\u9156\u9158\u9163\u9165\u9169\u9173\u9172\u918B\u9189\u9182\u91A2\u91AB\u91AF\u91AA\u91B5\u91B4\u91BA\u91C0\u91C1\u91C9\u91CB\u91D0\u91D6\u91DF\u91E1\u91DB\u91FC\u91F5\u91F6\u921E\u91FF\u9214\u922C\u9215\u9211\u925E\u9257\u9245\u9249\u9264\u9248\u9295\u923F\u924B\u9250\u929C\u9296\u9293\u929B\u925A\u92CF\u92B9\u92B7\u92E9\u930F\u92FA\u9344\u932E"],["efa1","\u9319\u9322\u931A\u9323\u933A\u9335\u933B\u935C\u9360\u937C\u936E\u9356\u93B0\u93AC\u93AD\u9394\u93B9\u93D6\u93D7\u93E8\u93E5\u93D8\u93C3\u93DD\u93D0\u93C8\u93E4\u941A\u9414\u9413\u9403\u9407\u9410\u9436\u942B\u9435\u9421\u943A\u9441\u9452\u9444\u945B\u9460\u9462\u945E\u946A\u9229\u9470\u9475\u9477\u947D\u945A\u947C\u947E\u9481\u947F\u9582\u9587\u958A\u9594\u9596\u9598\u9599\u95A0\u95A8\u95A7\u95AD\u95BC\u95BB\u95B9\u95BE\u95CA\u6FF6\u95C3\u95CD\u95CC\u95D5\u95D4\u95D6\u95DC\u95E1\u95E5\u95E2\u9621\u9628\u962E\u962F\u9642\u964C\u964F\u964B\u9677\u965C\u965E"],["f0a1","\u965D\u965F\u9666\u9672\u966C\u968D\u9698\u9695\u9697\u96AA\u96A7\u96B1\u96B2\u96B0\u96B4\u96B6\u96B8\u96B9\u96CE\u96CB\u96C9\u96CD\u894D\u96DC\u970D\u96D5\u96F9\u9704\u9706\u9708\u9713\u970E\u9711\u970F\u9716\u9719\u9724\u972A\u9730\u9739\u973D\u973E\u9744\u9746\u9748\u9742\u9749\u975C\u9760\u9764\u9766\u9768\u52D2\u976B\u9771\u9779\u9785\u977C\u9781\u977A\u9786\u978B\u978F\u9790\u979C\u97A8\u97A6\u97A3\u97B3\u97B4\u97C3\u97C6\u97C8\u97CB\u97DC\u97ED\u9F4F\u97F2\u7ADF\u97F6\u97F5\u980F\u980C\u9838\u9824\u9821\u9837\u983D\u9846\u984F\u984B\u986B\u986F\u9870"],["f1a1","\u9871\u9874\u9873\u98AA\u98AF\u98B1\u98B6\u98C4\u98C3\u98C6\u98E9\u98EB\u9903\u9909\u9912\u9914\u9918\u9921\u991D\u991E\u9924\u9920\u992C\u992E\u993D\u993E\u9942\u9949\u9945\u9950\u994B\u9951\u9952\u994C\u9955\u9997\u9998\u99A5\u99AD\u99AE\u99BC\u99DF\u99DB\u99DD\u99D8\u99D1\u99ED\u99EE\u99F1\u99F2\u99FB\u99F8\u9A01\u9A0F\u9A05\u99E2\u9A19\u9A2B\u9A37\u9A45\u9A42\u9A40\u9A43\u9A3E\u9A55\u9A4D\u9A5B\u9A57\u9A5F\u9A62\u9A65\u9A64\u9A69\u9A6B\u9A6A\u9AAD\u9AB0\u9ABC\u9AC0\u9ACF\u9AD1\u9AD3\u9AD4\u9ADE\u9ADF\u9AE2\u9AE3\u9AE6\u9AEF\u9AEB\u9AEE\u9AF4\u9AF1\u9AF7"],["f2a1","\u9AFB\u9B06\u9B18\u9B1A\u9B1F\u9B22\u9B23\u9B25\u9B27\u9B28\u9B29\u9B2A\u9B2E\u9B2F\u9B32\u9B44\u9B43\u9B4F\u9B4D\u9B4E\u9B51\u9B58\u9B74\u9B93\u9B83\u9B91\u9B96\u9B97\u9B9F\u9BA0\u9BA8\u9BB4\u9BC0\u9BCA\u9BB9\u9BC6\u9BCF\u9BD1\u9BD2\u9BE3\u9BE2\u9BE4\u9BD4\u9BE1\u9C3A\u9BF2\u9BF1\u9BF0\u9C15\u9C14\u9C09\u9C13\u9C0C\u9C06\u9C08\u9C12\u9C0A\u9C04\u9C2E\u9C1B\u9C25\u9C24\u9C21\u9C30\u9C47\u9C32\u9C46\u9C3E\u9C5A\u9C60\u9C67\u9C76\u9C78\u9CE7\u9CEC\u9CF0\u9D09\u9D08\u9CEB\u9D03\u9D06\u9D2A\u9D26\u9DAF\u9D23\u9D1F\u9D44\u9D15\u9D12\u9D41\u9D3F\u9D3E\u9D46\u9D48"],["f3a1","\u9D5D\u9D5E\u9D64\u9D51\u9D50\u9D59\u9D72\u9D89\u9D87\u9DAB\u9D6F\u9D7A\u9D9A\u9DA4\u9DA9\u9DB2\u9DC4\u9DC1\u9DBB\u9DB8\u9DBA\u9DC6\u9DCF\u9DC2\u9DD9\u9DD3\u9DF8\u9DE6\u9DED\u9DEF\u9DFD\u9E1A\u9E1B\u9E1E\u9E75\u9E79\u9E7D\u9E81\u9E88\u9E8B\u9E8C\u9E92\u9E95\u9E91\u9E9D\u9EA5\u9EA9\u9EB8\u9EAA\u9EAD\u9761\u9ECC\u9ECE\u9ECF\u9ED0\u9ED4\u9EDC\u9EDE\u9EDD\u9EE0\u9EE5\u9EE8\u9EEF\u9EF4\u9EF6\u9EF7\u9EF9\u9EFB\u9EFC\u9EFD\u9F07\u9F08\u76B7\u9F15\u9F21\u9F2C\u9F3E\u9F4A\u9F52\u9F54\u9F63\u9F5F\u9F60\u9F61\u9F66\u9F67\u9F6C\u9F6A\u9F77\u9F72\u9F76\u9F95\u9F9C\u9FA0"],["f4a1","\u582F\u69C7\u9059\u7464\u51DC\u7199"],["f9a1","\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7"],["faa1","\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1"],["fba1","\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA"],["fca1","\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"],["fcf1","\u2170",9,"\uFFE2\uFFE4\uFF07\uFF02"],["8fa2af","\u02D8\u02C7\xB8\u02D9\u02DD\xAF\u02DB\u02DA\uFF5E\u0384\u0385"],["8fa2c2","\xA1\xA6\xBF"],["8fa2eb","\xBA\xAA\xA9\xAE\u2122\xA4\u2116"],["8fa6e1","\u0386\u0388\u0389\u038A\u03AA"],["8fa6e7","\u038C"],["8fa6e9","\u038E\u03AB"],["8fa6ec","\u038F"],["8fa6f1","\u03AC\u03AD\u03AE\u03AF\u03CA\u0390\u03CC\u03C2\u03CD\u03CB\u03B0\u03CE"],["8fa7c2","\u0402",10,"\u040E\u040F"],["8fa7f2","\u0452",10,"\u045E\u045F"],["8fa9a1","\xC6\u0110"],["8fa9a4","\u0126"],["8fa9a6","\u0132"],["8fa9a8","\u0141\u013F"],["8fa9ab","\u014A\xD8\u0152"],["8fa9af","\u0166\xDE"],["8fa9c1","\xE6\u0111\xF0\u0127\u0131\u0133\u0138\u0142\u0140\u0149\u014B\xF8\u0153\xDF\u0167\xFE"],["8faaa1","\xC1\xC0\xC4\xC2\u0102\u01CD\u0100\u0104\xC5\xC3\u0106\u0108\u010C\xC7\u010A\u010E\xC9\xC8\xCB\xCA\u011A\u0116\u0112\u0118"],["8faaba","\u011C\u011E\u0122\u0120\u0124\xCD\xCC\xCF\xCE\u01CF\u0130\u012A\u012E\u0128\u0134\u0136\u0139\u013D\u013B\u0143\u0147\u0145\xD1\xD3\xD2\xD6\xD4\u01D1\u0150\u014C\xD5\u0154\u0158\u0156\u015A\u015C\u0160\u015E\u0164\u0162\xDA\xD9\xDC\xDB\u016C\u01D3\u0170\u016A\u0172\u016E\u0168\u01D7\u01DB\u01D9\u01D5\u0174\xDD\u0178\u0176\u0179\u017D\u017B"],["8faba1","\xE1\xE0\xE4\xE2\u0103\u01CE\u0101\u0105\xE5\xE3\u0107\u0109\u010D\xE7\u010B\u010F\xE9\xE8\xEB\xEA\u011B\u0117\u0113\u0119\u01F5\u011D\u011F"],["8fabbd","\u0121\u0125\xED\xEC\xEF\xEE\u01D0"],["8fabc5","\u012B\u012F\u0129\u0135\u0137\u013A\u013E\u013C\u0144\u0148\u0146\xF1\xF3\xF2\xF6\xF4\u01D2\u0151\u014D\xF5\u0155\u0159\u0157\u015B\u015D\u0161\u015F\u0165\u0163\xFA\xF9\xFC\xFB\u016D\u01D4\u0171\u016B\u0173\u016F\u0169\u01D8\u01DC\u01DA\u01D6\u0175\xFD\xFF\u0177\u017A\u017E\u017C"],["8fb0a1","\u4E02\u4E04\u4E05\u4E0C\u4E12\u4E1F\u4E23\u4E24\u4E28\u4E2B\u4E2E\u4E2F\u4E30\u4E35\u4E40\u4E41\u4E44\u4E47\u4E51\u4E5A\u4E5C\u4E63\u4E68\u4E69\u4E74\u4E75\u4E79\u4E7F\u4E8D\u4E96\u4E97\u4E9D\u4EAF\u4EB9\u4EC3\u4ED0\u4EDA\u4EDB\u4EE0\u4EE1\u4EE2\u4EE8\u4EEF\u4EF1\u4EF3\u4EF5\u4EFD\u4EFE\u4EFF\u4F00\u4F02\u4F03\u4F08\u4F0B\u4F0C\u4F12\u4F15\u4F16\u4F17\u4F19\u4F2E\u4F31\u4F60\u4F33\u4F35\u4F37\u4F39\u4F3B\u4F3E\u4F40\u4F42\u4F48\u4F49\u4F4B\u4F4C\u4F52\u4F54\u4F56\u4F58\u4F5F\u4F63\u4F6A\u4F6C\u4F6E\u4F71\u4F77\u4F78\u4F79\u4F7A\u4F7D\u4F7E\u4F81\u4F82\u4F84"],["8fb1a1","\u4F85\u4F89\u4F8A\u4F8C\u4F8E\u4F90\u4F92\u4F93\u4F94\u4F97\u4F99\u4F9A\u4F9E\u4F9F\u4FB2\u4FB7\u4FB9\u4FBB\u4FBC\u4FBD\u4FBE\u4FC0\u4FC1\u4FC5\u4FC6\u4FC8\u4FC9\u4FCB\u4FCC\u4FCD\u4FCF\u4FD2\u4FDC\u4FE0\u4FE2\u4FF0\u4FF2\u4FFC\u4FFD\u4FFF\u5000\u5001\u5004\u5007\u500A\u500C\u500E\u5010\u5013\u5017\u5018\u501B\u501C\u501D\u501E\u5022\u5027\u502E\u5030\u5032\u5033\u5035\u5040\u5041\u5042\u5045\u5046\u504A\u504C\u504E\u5051\u5052\u5053\u5057\u5059\u505F\u5060\u5062\u5063\u5066\u5067\u506A\u506D\u5070\u5071\u503B\u5081\u5083\u5084\u5086\u508A\u508E\u508F\u5090"],["8fb2a1","\u5092\u5093\u5094\u5096\u509B\u509C\u509E",4,"\u50AA\u50AF\u50B0\u50B9\u50BA\u50BD\u50C0\u50C3\u50C4\u50C7\u50CC\u50CE\u50D0\u50D3\u50D4\u50D8\u50DC\u50DD\u50DF\u50E2\u50E4\u50E6\u50E8\u50E9\u50EF\u50F1\u50F6\u50FA\u50FE\u5103\u5106\u5107\u5108\u510B\u510C\u510D\u510E\u50F2\u5110\u5117\u5119\u511B\u511C\u511D\u511E\u5123\u5127\u5128\u512C\u512D\u512F\u5131\u5133\u5134\u5135\u5138\u5139\u5142\u514A\u514F\u5153\u5155\u5157\u5158\u515F\u5164\u5166\u517E\u5183\u5184\u518B\u518E\u5198\u519D\u51A1\u51A3\u51AD\u51B8\u51BA\u51BC\u51BE\u51BF\u51C2"],["8fb3a1","\u51C8\u51CF\u51D1\u51D2\u51D3\u51D5\u51D8\u51DE\u51E2\u51E5\u51EE\u51F2\u51F3\u51F4\u51F7\u5201\u5202\u5205\u5212\u5213\u5215\u5216\u5218\u5222\u5228\u5231\u5232\u5235\u523C\u5245\u5249\u5255\u5257\u5258\u525A\u525C\u525F\u5260\u5261\u5266\u526E\u5277\u5278\u5279\u5280\u5282\u5285\u528A\u528C\u5293\u5295\u5296\u5297\u5298\u529A\u529C\u52A4\u52A5\u52A6\u52A7\u52AF\u52B0\u52B6\u52B7\u52B8\u52BA\u52BB\u52BD\u52C0\u52C4\u52C6\u52C8\u52CC\u52CF\u52D1\u52D4\u52D6\u52DB\u52DC\u52E1\u52E5\u52E8\u52E9\u52EA\u52EC\u52F0\u52F1\u52F4\u52F6\u52F7\u5300\u5303\u530A\u530B"],["8fb4a1","\u530C\u5311\u5313\u5318\u531B\u531C\u531E\u531F\u5325\u5327\u5328\u5329\u532B\u532C\u532D\u5330\u5332\u5335\u533C\u533D\u533E\u5342\u534C\u534B\u5359\u535B\u5361\u5363\u5365\u536C\u536D\u5372\u5379\u537E\u5383\u5387\u5388\u538E\u5393\u5394\u5399\u539D\u53A1\u53A4\u53AA\u53AB\u53AF\u53B2\u53B4\u53B5\u53B7\u53B8\u53BA\u53BD\u53C0\u53C5\u53CF\u53D2\u53D3\u53D5\u53DA\u53DD\u53DE\u53E0\u53E6\u53E7\u53F5\u5402\u5413\u541A\u5421\u5427\u5428\u542A\u542F\u5431\u5434\u5435\u5443\u5444\u5447\u544D\u544F\u545E\u5462\u5464\u5466\u5467\u5469\u546B\u546D\u546E\u5474\u547F"],["8fb5a1","\u5481\u5483\u5485\u5488\u5489\u548D\u5491\u5495\u5496\u549C\u549F\u54A1\u54A6\u54A7\u54A9\u54AA\u54AD\u54AE\u54B1\u54B7\u54B9\u54BA\u54BB\u54BF\u54C6\u54CA\u54CD\u54CE\u54E0\u54EA\u54EC\u54EF\u54F6\u54FC\u54FE\u54FF\u5500\u5501\u5505\u5508\u5509\u550C\u550D\u550E\u5515\u552A\u552B\u5532\u5535\u5536\u553B\u553C\u553D\u5541\u5547\u5549\u554A\u554D\u5550\u5551\u5558\u555A\u555B\u555E\u5560\u5561\u5564\u5566\u557F\u5581\u5582\u5586\u5588\u558E\u558F\u5591\u5592\u5593\u5594\u5597\u55A3\u55A4\u55AD\u55B2\u55BF\u55C1\u55C3\u55C6\u55C9\u55CB\u55CC\u55CE\u55D1\u55D2"],["8fb6a1","\u55D3\u55D7\u55D8\u55DB\u55DE\u55E2\u55E9\u55F6\u55FF\u5605\u5608\u560A\u560D",5,"\u5619\u562C\u5630\u5633\u5635\u5637\u5639\u563B\u563C\u563D\u563F\u5640\u5641\u5643\u5644\u5646\u5649\u564B\u564D\u564F\u5654\u565E\u5660\u5661\u5662\u5663\u5666\u5669\u566D\u566F\u5671\u5672\u5675\u5684\u5685\u5688\u568B\u568C\u5695\u5699\u569A\u569D\u569E\u569F\u56A6\u56A7\u56A8\u56A9\u56AB\u56AC\u56AD\u56B1\u56B3\u56B7\u56BE\u56C5\u56C9\u56CA\u56CB\u56CF\u56D0\u56CC\u56CD\u56D9\u56DC\u56DD\u56DF\u56E1\u56E4",4,"\u56F1\u56EB\u56ED"],["8fb7a1","\u56F6\u56F7\u5701\u5702\u5707\u570A\u570C\u5711\u5715\u571A\u571B\u571D\u5720\u5722\u5723\u5724\u5725\u5729\u572A\u572C\u572E\u572F\u5733\u5734\u573D\u573E\u573F\u5745\u5746\u574C\u574D\u5752\u5762\u5765\u5767\u5768\u576B\u576D",4,"\u5773\u5774\u5775\u5777\u5779\u577A\u577B\u577C\u577E\u5781\u5783\u578C\u5794\u5797\u5799\u579A\u579C\u579D\u579E\u579F\u57A1\u5795\u57A7\u57A8\u57A9\u57AC\u57B8\u57BD\u57C7\u57C8\u57CC\u57CF\u57D5\u57DD\u57DE\u57E4\u57E6\u57E7\u57E9\u57ED\u57F0\u57F5\u57F6\u57F8\u57FD\u57FE\u57FF\u5803\u5804\u5808\u5809\u57E1"],["8fb8a1","\u580C\u580D\u581B\u581E\u581F\u5820\u5826\u5827\u582D\u5832\u5839\u583F\u5849\u584C\u584D\u584F\u5850\u5855\u585F\u5861\u5864\u5867\u5868\u5878\u587C\u587F\u5880\u5881\u5887\u5888\u5889\u588A\u588C\u588D\u588F\u5890\u5894\u5896\u589D\u58A0\u58A1\u58A2\u58A6\u58A9\u58B1\u58B2\u58C4\u58BC\u58C2\u58C8\u58CD\u58CE\u58D0\u58D2\u58D4\u58D6\u58DA\u58DD\u58E1\u58E2\u58E9\u58F3\u5905\u5906\u590B\u590C\u5912\u5913\u5914\u8641\u591D\u5921\u5923\u5924\u5928\u592F\u5930\u5933\u5935\u5936\u593F\u5943\u5946\u5952\u5953\u5959\u595B\u595D\u595E\u595F\u5961\u5963\u596B\u596D"],["8fb9a1","\u596F\u5972\u5975\u5976\u5979\u597B\u597C\u598B\u598C\u598E\u5992\u5995\u5997\u599F\u59A4\u59A7\u59AD\u59AE\u59AF\u59B0\u59B3\u59B7\u59BA\u59BC\u59C1\u59C3\u59C4\u59C8\u59CA\u59CD\u59D2\u59DD\u59DE\u59DF\u59E3\u59E4\u59E7\u59EE\u59EF\u59F1\u59F2\u59F4\u59F7\u5A00\u5A04\u5A0C\u5A0D\u5A0E\u5A12\u5A13\u5A1E\u5A23\u5A24\u5A27\u5A28\u5A2A\u5A2D\u5A30\u5A44\u5A45\u5A47\u5A48\u5A4C\u5A50\u5A55\u5A5E\u5A63\u5A65\u5A67\u5A6D\u5A77\u5A7A\u5A7B\u5A7E\u5A8B\u5A90\u5A93\u5A96\u5A99\u5A9C\u5A9E\u5A9F\u5AA0\u5AA2\u5AA7\u5AAC\u5AB1\u5AB2\u5AB3\u5AB5\u5AB8\u5ABA\u5ABB\u5ABF"],["8fbaa1","\u5AC4\u5AC6\u5AC8\u5ACF\u5ADA\u5ADC\u5AE0\u5AE5\u5AEA\u5AEE\u5AF5\u5AF6\u5AFD\u5B00\u5B01\u5B08\u5B17\u5B34\u5B19\u5B1B\u5B1D\u5B21\u5B25\u5B2D\u5B38\u5B41\u5B4B\u5B4C\u5B52\u5B56\u5B5E\u5B68\u5B6E\u5B6F\u5B7C\u5B7D\u5B7E\u5B7F\u5B81\u5B84\u5B86\u5B8A\u5B8E\u5B90\u5B91\u5B93\u5B94\u5B96\u5BA8\u5BA9\u5BAC\u5BAD\u5BAF\u5BB1\u5BB2\u5BB7\u5BBA\u5BBC\u5BC0\u5BC1\u5BCD\u5BCF\u5BD6",4,"\u5BE0\u5BEF\u5BF1\u5BF4\u5BFD\u5C0C\u5C17\u5C1E\u5C1F\u5C23\u5C26\u5C29\u5C2B\u5C2C\u5C2E\u5C30\u5C32\u5C35\u5C36\u5C59\u5C5A\u5C5C\u5C62\u5C63\u5C67\u5C68\u5C69"],["8fbba1","\u5C6D\u5C70\u5C74\u5C75\u5C7A\u5C7B\u5C7C\u5C7D\u5C87\u5C88\u5C8A\u5C8F\u5C92\u5C9D\u5C9F\u5CA0\u5CA2\u5CA3\u5CA6\u5CAA\u5CB2\u5CB4\u5CB5\u5CBA\u5CC9\u5CCB\u5CD2\u5CDD\u5CD7\u5CEE\u5CF1\u5CF2\u5CF4\u5D01\u5D06\u5D0D\u5D12\u5D2B\u5D23\u5D24\u5D26\u5D27\u5D31\u5D34\u5D39\u5D3D\u5D3F\u5D42\u5D43\u5D46\u5D48\u5D55\u5D51\u5D59\u5D4A\u5D5F\u5D60\u5D61\u5D62\u5D64\u5D6A\u5D6D\u5D70\u5D79\u5D7A\u5D7E\u5D7F\u5D81\u5D83\u5D88\u5D8A\u5D92\u5D93\u5D94\u5D95\u5D99\u5D9B\u5D9F\u5DA0\u5DA7\u5DAB\u5DB0\u5DB4\u5DB8\u5DB9\u5DC3\u5DC7\u5DCB\u5DD0\u5DCE\u5DD8\u5DD9\u5DE0\u5DE4"],["8fbca1","\u5DE9\u5DF8\u5DF9\u5E00\u5E07\u5E0D\u5E12\u5E14\u5E15\u5E18\u5E1F\u5E20\u5E2E\u5E28\u5E32\u5E35\u5E3E\u5E4B\u5E50\u5E49\u5E51\u5E56\u5E58\u5E5B\u5E5C\u5E5E\u5E68\u5E6A",4,"\u5E70\u5E80\u5E8B\u5E8E\u5EA2\u5EA4\u5EA5\u5EA8\u5EAA\u5EAC\u5EB1\u5EB3\u5EBD\u5EBE\u5EBF\u5EC6\u5ECC\u5ECB\u5ECE\u5ED1\u5ED2\u5ED4\u5ED5\u5EDC\u5EDE\u5EE5\u5EEB\u5F02\u5F06\u5F07\u5F08\u5F0E\u5F19\u5F1C\u5F1D\u5F21\u5F22\u5F23\u5F24\u5F28\u5F2B\u5F2C\u5F2E\u5F30\u5F34\u5F36\u5F3B\u5F3D\u5F3F\u5F40\u5F44\u5F45\u5F47\u5F4D\u5F50\u5F54\u5F58\u5F5B\u5F60\u5F63\u5F64\u5F67"],["8fbda1","\u5F6F\u5F72\u5F74\u5F75\u5F78\u5F7A\u5F7D\u5F7E\u5F89\u5F8D\u5F8F\u5F96\u5F9C\u5F9D\u5FA2\u5FA7\u5FAB\u5FA4\u5FAC\u5FAF\u5FB0\u5FB1\u5FB8\u5FC4\u5FC7\u5FC8\u5FC9\u5FCB\u5FD0",4,"\u5FDE\u5FE1\u5FE2\u5FE8\u5FE9\u5FEA\u5FEC\u5FED\u5FEE\u5FEF\u5FF2\u5FF3\u5FF6\u5FFA\u5FFC\u6007\u600A\u600D\u6013\u6014\u6017\u6018\u601A\u601F\u6024\u602D\u6033\u6035\u6040\u6047\u6048\u6049\u604C\u6051\u6054\u6056\u6057\u605D\u6061\u6067\u6071\u607E\u607F\u6082\u6086\u6088\u608A\u608E\u6091\u6093\u6095\u6098\u609D\u609E\u60A2\u60A4\u60A5\u60A8\u60B0\u60B1\u60B7"],["8fbea1","\u60BB\u60BE\u60C2\u60C4\u60C8\u60C9\u60CA\u60CB\u60CE\u60CF\u60D4\u60D5\u60D9\u60DB\u60DD\u60DE\u60E2\u60E5\u60F2\u60F5\u60F8\u60FC\u60FD\u6102\u6107\u610A\u610C\u6110",4,"\u6116\u6117\u6119\u611C\u611E\u6122\u612A\u612B\u6130\u6131\u6135\u6136\u6137\u6139\u6141\u6145\u6146\u6149\u615E\u6160\u616C\u6172\u6178\u617B\u617C\u617F\u6180\u6181\u6183\u6184\u618B\u618D\u6192\u6193\u6197\u6198\u619C\u619D\u619F\u61A0\u61A5\u61A8\u61AA\u61AD\u61B8\u61B9\u61BC\u61C0\u61C1\u61C2\u61CE\u61CF\u61D5\u61DC\u61DD\u61DE\u61DF\u61E1\u61E2\u61E7\u61E9\u61E5"],["8fbfa1","\u61EC\u61ED\u61EF\u6201\u6203\u6204\u6207\u6213\u6215\u621C\u6220\u6222\u6223\u6227\u6229\u622B\u6239\u623D\u6242\u6243\u6244\u6246\u624C\u6250\u6251\u6252\u6254\u6256\u625A\u625C\u6264\u626D\u626F\u6273\u627A\u627D\u628D\u628E\u628F\u6290\u62A6\u62A8\u62B3\u62B6\u62B7\u62BA\u62BE\u62BF\u62C4\u62CE\u62D5\u62D6\u62DA\u62EA\u62F2\u62F4\u62FC\u62FD\u6303\u6304\u630A\u630B\u630D\u6310\u6313\u6316\u6318\u6329\u632A\u632D\u6335\u6336\u6339\u633C\u6341\u6342\u6343\u6344\u6346\u634A\u634B\u634E\u6352\u6353\u6354\u6358\u635B\u6365\u6366\u636C\u636D\u6371\u6374\u6375"],["8fc0a1","\u6378\u637C\u637D\u637F\u6382\u6384\u6387\u638A\u6390\u6394\u6395\u6399\u639A\u639E\u63A4\u63A6\u63AD\u63AE\u63AF\u63BD\u63C1\u63C5\u63C8\u63CE\u63D1\u63D3\u63D4\u63D5\u63DC\u63E0\u63E5\u63EA\u63EC\u63F2\u63F3\u63F5\u63F8\u63F9\u6409\u640A\u6410\u6412\u6414\u6418\u641E\u6420\u6422\u6424\u6425\u6429\u642A\u642F\u6430\u6435\u643D\u643F\u644B\u644F\u6451\u6452\u6453\u6454\u645A\u645B\u645C\u645D\u645F\u6460\u6461\u6463\u646D\u6473\u6474\u647B\u647D\u6485\u6487\u648F\u6490\u6491\u6498\u6499\u649B\u649D\u649F\u64A1\u64A3\u64A6\u64A8\u64AC\u64B3\u64BD\u64BE\u64BF"],["8fc1a1","\u64C4\u64C9\u64CA\u64CB\u64CC\u64CE\u64D0\u64D1\u64D5\u64D7\u64E4\u64E5\u64E9\u64EA\u64ED\u64F0\u64F5\u64F7\u64FB\u64FF\u6501\u6504\u6508\u6509\u650A\u650F\u6513\u6514\u6516\u6519\u651B\u651E\u651F\u6522\u6526\u6529\u652E\u6531\u653A\u653C\u653D\u6543\u6547\u6549\u6550\u6552\u6554\u655F\u6560\u6567\u656B\u657A\u657D\u6581\u6585\u658A\u6592\u6595\u6598\u659D\u65A0\u65A3\u65A6\u65AE\u65B2\u65B3\u65B4\u65BF\u65C2\u65C8\u65C9\u65CE\u65D0\u65D4\u65D6\u65D8\u65DF\u65F0\u65F2\u65F4\u65F5\u65F9\u65FE\u65FF\u6600\u6604\u6608\u6609\u660D\u6611\u6612\u6615\u6616\u661D"],["8fc2a1","\u661E\u6621\u6622\u6623\u6624\u6626\u6629\u662A\u662B\u662C\u662E\u6630\u6631\u6633\u6639\u6637\u6640\u6645\u6646\u664A\u664C\u6651\u664E\u6657\u6658\u6659\u665B\u665C\u6660\u6661\u66FB\u666A\u666B\u666C\u667E\u6673\u6675\u667F\u6677\u6678\u6679\u667B\u6680\u667C\u668B\u668C\u668D\u6690\u6692\u6699\u669A\u669B\u669C\u669F\u66A0\u66A4\u66AD\u66B1\u66B2\u66B5\u66BB\u66BF\u66C0\u66C2\u66C3\u66C8\u66CC\u66CE\u66CF\u66D4\u66DB\u66DF\u66E8\u66EB\u66EC\u66EE\u66FA\u6705\u6707\u670E\u6713\u6719\u671C\u6720\u6722\u6733\u673E\u6745\u6747\u6748\u674C\u6754\u6755\u675D"],["8fc3a1","\u6766\u676C\u676E\u6774\u6776\u677B\u6781\u6784\u678E\u678F\u6791\u6793\u6796\u6798\u6799\u679B\u67B0\u67B1\u67B2\u67B5\u67BB\u67BC\u67BD\u67F9\u67C0\u67C2\u67C3\u67C5\u67C8\u67C9\u67D2\u67D7\u67D9\u67DC\u67E1\u67E6\u67F0\u67F2\u67F6\u67F7\u6852\u6814\u6819\u681D\u681F\u6828\u6827\u682C\u682D\u682F\u6830\u6831\u6833\u683B\u683F\u6844\u6845\u684A\u684C\u6855\u6857\u6858\u685B\u686B\u686E",4,"\u6875\u6879\u687A\u687B\u687C\u6882\u6884\u6886\u6888\u6896\u6898\u689A\u689C\u68A1\u68A3\u68A5\u68A9\u68AA\u68AE\u68B2\u68BB\u68C5\u68C8\u68CC\u68CF"],["8fc4a1","\u68D0\u68D1\u68D3\u68D6\u68D9\u68DC\u68DD\u68E5\u68E8\u68EA\u68EB\u68EC\u68ED\u68F0\u68F1\u68F5\u68F6\u68FB\u68FC\u68FD\u6906\u6909\u690A\u6910\u6911\u6913\u6916\u6917\u6931\u6933\u6935\u6938\u693B\u6942\u6945\u6949\u694E\u6957\u695B\u6963\u6964\u6965\u6966\u6968\u6969\u696C\u6970\u6971\u6972\u697A\u697B\u697F\u6980\u698D\u6992\u6996\u6998\u69A1\u69A5\u69A6\u69A8\u69AB\u69AD\u69AF\u69B7\u69B8\u69BA\u69BC\u69C5\u69C8\u69D1\u69D6\u69D7\u69E2\u69E5\u69EE\u69EF\u69F1\u69F3\u69F5\u69FE\u6A00\u6A01\u6A03\u6A0F\u6A11\u6A15\u6A1A\u6A1D\u6A20\u6A24\u6A28\u6A30\u6A32"],["8fc5a1","\u6A34\u6A37\u6A3B\u6A3E\u6A3F\u6A45\u6A46\u6A49\u6A4A\u6A4E\u6A50\u6A51\u6A52\u6A55\u6A56\u6A5B\u6A64\u6A67\u6A6A\u6A71\u6A73\u6A7E\u6A81\u6A83\u6A86\u6A87\u6A89\u6A8B\u6A91\u6A9B\u6A9D\u6A9E\u6A9F\u6AA5\u6AAB\u6AAF\u6AB0\u6AB1\u6AB4\u6ABD\u6ABE\u6ABF\u6AC6\u6AC9\u6AC8\u6ACC\u6AD0\u6AD4\u6AD5\u6AD6\u6ADC\u6ADD\u6AE4\u6AE7\u6AEC\u6AF0\u6AF1\u6AF2\u6AFC\u6AFD\u6B02\u6B03\u6B06\u6B07\u6B09\u6B0F\u6B10\u6B11\u6B17\u6B1B\u6B1E\u6B24\u6B28\u6B2B\u6B2C\u6B2F\u6B35\u6B36\u6B3B\u6B3F\u6B46\u6B4A\u6B4D\u6B52\u6B56\u6B58\u6B5D\u6B60\u6B67\u6B6B\u6B6E\u6B70\u6B75\u6B7D"],["8fc6a1","\u6B7E\u6B82\u6B85\u6B97\u6B9B\u6B9F\u6BA0\u6BA2\u6BA3\u6BA8\u6BA9\u6BAC\u6BAD\u6BAE\u6BB0\u6BB8\u6BB9\u6BBD\u6BBE\u6BC3\u6BC4\u6BC9\u6BCC\u6BD6\u6BDA\u6BE1\u6BE3\u6BE6\u6BE7\u6BEE\u6BF1\u6BF7\u6BF9\u6BFF\u6C02\u6C04\u6C05\u6C09\u6C0D\u6C0E\u6C10\u6C12\u6C19\u6C1F\u6C26\u6C27\u6C28\u6C2C\u6C2E\u6C33\u6C35\u6C36\u6C3A\u6C3B\u6C3F\u6C4A\u6C4B\u6C4D\u6C4F\u6C52\u6C54\u6C59\u6C5B\u6C5C\u6C6B\u6C6D\u6C6F\u6C74\u6C76\u6C78\u6C79\u6C7B\u6C85\u6C86\u6C87\u6C89\u6C94\u6C95\u6C97\u6C98\u6C9C\u6C9F\u6CB0\u6CB2\u6CB4\u6CC2\u6CC6\u6CCD\u6CCF\u6CD0\u6CD1\u6CD2\u6CD4\u6CD6"],["8fc7a1","\u6CDA\u6CDC\u6CE0\u6CE7\u6CE9\u6CEB\u6CEC\u6CEE\u6CF2\u6CF4\u6D04\u6D07\u6D0A\u6D0E\u6D0F\u6D11\u6D13\u6D1A\u6D26\u6D27\u6D28\u6C67\u6D2E\u6D2F\u6D31\u6D39\u6D3C\u6D3F\u6D57\u6D5E\u6D5F\u6D61\u6D65\u6D67\u6D6F\u6D70\u6D7C\u6D82\u6D87\u6D91\u6D92\u6D94\u6D96\u6D97\u6D98\u6DAA\u6DAC\u6DB4\u6DB7\u6DB9\u6DBD\u6DBF\u6DC4\u6DC8\u6DCA\u6DCE\u6DCF\u6DD6\u6DDB\u6DDD\u6DDF\u6DE0\u6DE2\u6DE5\u6DE9\u6DEF\u6DF0\u6DF4\u6DF6\u6DFC\u6E00\u6E04\u6E1E\u6E22\u6E27\u6E32\u6E36\u6E39\u6E3B\u6E3C\u6E44\u6E45\u6E48\u6E49\u6E4B\u6E4F\u6E51\u6E52\u6E53\u6E54\u6E57\u6E5C\u6E5D\u6E5E"],["8fc8a1","\u6E62\u6E63\u6E68\u6E73\u6E7B\u6E7D\u6E8D\u6E93\u6E99\u6EA0\u6EA7\u6EAD\u6EAE\u6EB1\u6EB3\u6EBB\u6EBF\u6EC0\u6EC1\u6EC3\u6EC7\u6EC8\u6ECA\u6ECD\u6ECE\u6ECF\u6EEB\u6EED\u6EEE\u6EF9\u6EFB\u6EFD\u6F04\u6F08\u6F0A\u6F0C\u6F0D\u6F16\u6F18\u6F1A\u6F1B\u6F26\u6F29\u6F2A\u6F2F\u6F30\u6F33\u6F36\u6F3B\u6F3C\u6F2D\u6F4F\u6F51\u6F52\u6F53\u6F57\u6F59\u6F5A\u6F5D\u6F5E\u6F61\u6F62\u6F68\u6F6C\u6F7D\u6F7E\u6F83\u6F87\u6F88\u6F8B\u6F8C\u6F8D\u6F90\u6F92\u6F93\u6F94\u6F96\u6F9A\u6F9F\u6FA0\u6FA5\u6FA6\u6FA7\u6FA8\u6FAE\u6FAF\u6FB0\u6FB5\u6FB6\u6FBC\u6FC5\u6FC7\u6FC8\u6FCA"],["8fc9a1","\u6FDA\u6FDE\u6FE8\u6FE9\u6FF0\u6FF5\u6FF9\u6FFC\u6FFD\u7000\u7005\u7006\u7007\u700D\u7017\u7020\u7023\u702F\u7034\u7037\u7039\u703C\u7043\u7044\u7048\u7049\u704A\u704B\u7054\u7055\u705D\u705E\u704E\u7064\u7065\u706C\u706E\u7075\u7076\u707E\u7081\u7085\u7086\u7094",4,"\u709B\u70A4\u70AB\u70B0\u70B1\u70B4\u70B7\u70CA\u70D1\u70D3\u70D4\u70D5\u70D6\u70D8\u70DC\u70E4\u70FA\u7103",4,"\u710B\u710C\u710F\u711E\u7120\u712B\u712D\u712F\u7130\u7131\u7138\u7141\u7145\u7146\u7147\u714A\u714B\u7150\u7152\u7157\u715A\u715C\u715E\u7160"],["8fcaa1","\u7168\u7179\u7180\u7185\u7187\u718C\u7192\u719A\u719B\u71A0\u71A2\u71AF\u71B0\u71B2\u71B3\u71BA\u71BF\u71C0\u71C1\u71C4\u71CB\u71CC\u71D3\u71D6\u71D9\u71DA\u71DC\u71F8\u71FE\u7200\u7207\u7208\u7209\u7213\u7217\u721A\u721D\u721F\u7224\u722B\u722F\u7234\u7238\u7239\u7241\u7242\u7243\u7245\u724E\u724F\u7250\u7253\u7255\u7256\u725A\u725C\u725E\u7260\u7263\u7268\u726B\u726E\u726F\u7271\u7277\u7278\u727B\u727C\u727F\u7284\u7289\u728D\u728E\u7293\u729B\u72A8\u72AD\u72AE\u72B1\u72B4\u72BE\u72C1\u72C7\u72C9\u72CC\u72D5\u72D6\u72D8\u72DF\u72E5\u72F3\u72F4\u72FA\u72FB"],["8fcba1","\u72FE\u7302\u7304\u7305\u7307\u730B\u730D\u7312\u7313\u7318\u7319\u731E\u7322\u7324\u7327\u7328\u732C\u7331\u7332\u7335\u733A\u733B\u733D\u7343\u734D\u7350\u7352\u7356\u7358\u735D\u735E\u735F\u7360\u7366\u7367\u7369\u736B\u736C\u736E\u736F\u7371\u7377\u7379\u737C\u7380\u7381\u7383\u7385\u7386\u738E\u7390\u7393\u7395\u7397\u7398\u739C\u739E\u739F\u73A0\u73A2\u73A5\u73A6\u73AA\u73AB\u73AD\u73B5\u73B7\u73B9\u73BC\u73BD\u73BF\u73C5\u73C6\u73C9\u73CB\u73CC\u73CF\u73D2\u73D3\u73D6\u73D9\u73DD\u73E1\u73E3\u73E6\u73E7\u73E9\u73F4\u73F5\u73F7\u73F9\u73FA\u73FB\u73FD"],["8fcca1","\u73FF\u7400\u7401\u7404\u7407\u740A\u7411\u741A\u741B\u7424\u7426\u7428",9,"\u7439\u7440\u7443\u7444\u7446\u7447\u744B\u744D\u7451\u7452\u7457\u745D\u7462\u7466\u7467\u7468\u746B\u746D\u746E\u7471\u7472\u7480\u7481\u7485\u7486\u7487\u7489\u748F\u7490\u7491\u7492\u7498\u7499\u749A\u749C\u749F\u74A0\u74A1\u74A3\u74A6\u74A8\u74A9\u74AA\u74AB\u74AE\u74AF\u74B1\u74B2\u74B5\u74B9\u74BB\u74BF\u74C8\u74C9\u74CC\u74D0\u74D3\u74D8\u74DA\u74DB\u74DE\u74DF\u74E4\u74E8\u74EA\u74EB\u74EF\u74F4\u74FA\u74FB\u74FC\u74FF\u7506"],["8fcda1","\u7512\u7516\u7517\u7520\u7521\u7524\u7527\u7529\u752A\u752F\u7536\u7539\u753D\u753E\u753F\u7540\u7543\u7547\u7548\u754E\u7550\u7552\u7557\u755E\u755F\u7561\u756F\u7571\u7579",5,"\u7581\u7585\u7590\u7592\u7593\u7595\u7599\u759C\u75A2\u75A4\u75B4\u75BA\u75BF\u75C0\u75C1\u75C4\u75C6\u75CC\u75CE\u75CF\u75D7\u75DC\u75DF\u75E0\u75E1\u75E4\u75E7\u75EC\u75EE\u75EF\u75F1\u75F9\u7600\u7602\u7603\u7604\u7607\u7608\u760A\u760C\u760F\u7612\u7613\u7615\u7616\u7619\u761B\u761C\u761D\u761E\u7623\u7625\u7626\u7629\u762D\u7632\u7633\u7635\u7638\u7639"],["8fcea1","\u763A\u763C\u764A\u7640\u7641\u7643\u7644\u7645\u7649\u764B\u7655\u7659\u765F\u7664\u7665\u766D\u766E\u766F\u7671\u7674\u7681\u7685\u768C\u768D\u7695\u769B\u769C\u769D\u769F\u76A0\u76A2",6,"\u76AA\u76AD\u76BD\u76C1\u76C5\u76C9\u76CB\u76CC\u76CE\u76D4\u76D9\u76E0\u76E6\u76E8\u76EC\u76F0\u76F1\u76F6\u76F9\u76FC\u7700\u7706\u770A\u770E\u7712\u7714\u7715\u7717\u7719\u771A\u771C\u7722\u7728\u772D\u772E\u772F\u7734\u7735\u7736\u7739\u773D\u773E\u7742\u7745\u7746\u774A\u774D\u774E\u774F\u7752\u7756\u7757\u775C\u775E\u775F\u7760\u7762"],["8fcfa1","\u7764\u7767\u776A\u776C\u7770\u7772\u7773\u7774\u777A\u777D\u7780\u7784\u778C\u778D\u7794\u7795\u7796\u779A\u779F\u77A2\u77A7\u77AA\u77AE\u77AF\u77B1\u77B5\u77BE\u77C3\u77C9\u77D1\u77D2\u77D5\u77D9\u77DE\u77DF\u77E0\u77E4\u77E6\u77EA\u77EC\u77F0\u77F1\u77F4\u77F8\u77FB\u7805\u7806\u7809\u780D\u780E\u7811\u781D\u7821\u7822\u7823\u782D\u782E\u7830\u7835\u7837\u7843\u7844\u7847\u7848\u784C\u784E\u7852\u785C\u785E\u7860\u7861\u7863\u7864\u7868\u786A\u786E\u787A\u787E\u788A\u788F\u7894\u7898\u78A1\u789D\u789E\u789F\u78A4\u78A8\u78AC\u78AD\u78B0\u78B1\u78B2\u78B3"],["8fd0a1","\u78BB\u78BD\u78BF\u78C7\u78C8\u78C9\u78CC\u78CE\u78D2\u78D3\u78D5\u78D6\u78E4\u78DB\u78DF\u78E0\u78E1\u78E6\u78EA\u78F2\u78F3\u7900\u78F6\u78F7\u78FA\u78FB\u78FF\u7906\u790C\u7910\u791A\u791C\u791E\u791F\u7920\u7925\u7927\u7929\u792D\u7931\u7934\u7935\u793B\u793D\u793F\u7944\u7945\u7946\u794A\u794B\u794F\u7951\u7954\u7958\u795B\u795C\u7967\u7969\u796B\u7972\u7979\u797B\u797C\u797E\u798B\u798C\u7991\u7993\u7994\u7995\u7996\u7998\u799B\u799C\u79A1\u79A8\u79A9\u79AB\u79AF\u79B1\u79B4\u79B8\u79BB\u79C2\u79C4\u79C7\u79C8\u79CA\u79CF\u79D4\u79D6\u79DA\u79DD\u79DE"],["8fd1a1","\u79E0\u79E2\u79E5\u79EA\u79EB\u79ED\u79F1\u79F8\u79FC\u7A02\u7A03\u7A07\u7A09\u7A0A\u7A0C\u7A11\u7A15\u7A1B\u7A1E\u7A21\u7A27\u7A2B\u7A2D\u7A2F\u7A30\u7A34\u7A35\u7A38\u7A39\u7A3A\u7A44\u7A45\u7A47\u7A48\u7A4C\u7A55\u7A56\u7A59\u7A5C\u7A5D\u7A5F\u7A60\u7A65\u7A67\u7A6A\u7A6D\u7A75\u7A78\u7A7E\u7A80\u7A82\u7A85\u7A86\u7A8A\u7A8B\u7A90\u7A91\u7A94\u7A9E\u7AA0\u7AA3\u7AAC\u7AB3\u7AB5\u7AB9\u7ABB\u7ABC\u7AC6\u7AC9\u7ACC\u7ACE\u7AD1\u7ADB\u7AE8\u7AE9\u7AEB\u7AEC\u7AF1\u7AF4\u7AFB\u7AFD\u7AFE\u7B07\u7B14\u7B1F\u7B23\u7B27\u7B29\u7B2A\u7B2B\u7B2D\u7B2E\u7B2F\u7B30"],["8fd2a1","\u7B31\u7B34\u7B3D\u7B3F\u7B40\u7B41\u7B47\u7B4E\u7B55\u7B60\u7B64\u7B66\u7B69\u7B6A\u7B6D\u7B6F\u7B72\u7B73\u7B77\u7B84\u7B89\u7B8E\u7B90\u7B91\u7B96\u7B9B\u7B9E\u7BA0\u7BA5\u7BAC\u7BAF\u7BB0\u7BB2\u7BB5\u7BB6\u7BBA\u7BBB\u7BBC\u7BBD\u7BC2\u7BC5\u7BC8\u7BCA\u7BD4\u7BD6\u7BD7\u7BD9\u7BDA\u7BDB\u7BE8\u7BEA\u7BF2\u7BF4\u7BF5\u7BF8\u7BF9\u7BFA\u7BFC\u7BFE\u7C01\u7C02\u7C03\u7C04\u7C06\u7C09\u7C0B\u7C0C\u7C0E\u7C0F\u7C19\u7C1B\u7C20\u7C25\u7C26\u7C28\u7C2C\u7C31\u7C33\u7C34\u7C36\u7C39\u7C3A\u7C46\u7C4A\u7C55\u7C51\u7C52\u7C53\u7C59",5],["8fd3a1","\u7C61\u7C63\u7C67\u7C69\u7C6D\u7C6E\u7C70\u7C72\u7C79\u7C7C\u7C7D\u7C86\u7C87\u7C8F\u7C94\u7C9E\u7CA0\u7CA6\u7CB0\u7CB6\u7CB7\u7CBA\u7CBB\u7CBC\u7CBF\u7CC4\u7CC7\u7CC8\u7CC9\u7CCD\u7CCF\u7CD3\u7CD4\u7CD5\u7CD7\u7CD9\u7CDA\u7CDD\u7CE6\u7CE9\u7CEB\u7CF5\u7D03\u7D07\u7D08\u7D09\u7D0F\u7D11\u7D12\u7D13\u7D16\u7D1D\u7D1E\u7D23\u7D26\u7D2A\u7D2D\u7D31\u7D3C\u7D3D\u7D3E\u7D40\u7D41\u7D47\u7D48\u7D4D\u7D51\u7D53\u7D57\u7D59\u7D5A\u7D5C\u7D5D\u7D65\u7D67\u7D6A\u7D70\u7D78\u7D7A\u7D7B\u7D7F\u7D81\u7D82\u7D83\u7D85\u7D86\u7D88\u7D8B\u7D8C\u7D8D\u7D91\u7D96\u7D97\u7D9D"],["8fd4a1","\u7D9E\u7DA6\u7DA7\u7DAA\u7DB3\u7DB6\u7DB7\u7DB9\u7DC2",4,"\u7DCC\u7DCD\u7DCE\u7DD7\u7DD9\u7E00\u7DE2\u7DE5\u7DE6\u7DEA\u7DEB\u7DED\u7DF1\u7DF5\u7DF6\u7DF9\u7DFA\u7E08\u7E10\u7E11\u7E15\u7E17\u7E1C\u7E1D\u7E20\u7E27\u7E28\u7E2C\u7E2D\u7E2F\u7E33\u7E36\u7E3F\u7E44\u7E45\u7E47\u7E4E\u7E50\u7E52\u7E58\u7E5F\u7E61\u7E62\u7E65\u7E6B\u7E6E\u7E6F\u7E73\u7E78\u7E7E\u7E81\u7E86\u7E87\u7E8A\u7E8D\u7E91\u7E95\u7E98\u7E9A\u7E9D\u7E9E\u7F3C\u7F3B\u7F3D\u7F3E\u7F3F\u7F43\u7F44\u7F47\u7F4F\u7F52\u7F53\u7F5B\u7F5C\u7F5D\u7F61\u7F63\u7F64\u7F65\u7F66\u7F6D"],["8fd5a1","\u7F71\u7F7D\u7F7E\u7F7F\u7F80\u7F8B\u7F8D\u7F8F\u7F90\u7F91\u7F96\u7F97\u7F9C\u7FA1\u7FA2\u7FA6\u7FAA\u7FAD\u7FB4\u7FBC\u7FBF\u7FC0\u7FC3\u7FC8\u7FCE\u7FCF\u7FDB\u7FDF\u7FE3\u7FE5\u7FE8\u7FEC\u7FEE\u7FEF\u7FF2\u7FFA\u7FFD\u7FFE\u7FFF\u8007\u8008\u800A\u800D\u800E\u800F\u8011\u8013\u8014\u8016\u801D\u801E\u801F\u8020\u8024\u8026\u802C\u802E\u8030\u8034\u8035\u8037\u8039\u803A\u803C\u803E\u8040\u8044\u8060\u8064\u8066\u806D\u8071\u8075\u8081\u8088\u808E\u809C\u809E\u80A6\u80A7\u80AB\u80B8\u80B9\u80C8\u80CD\u80CF\u80D2\u80D4\u80D5\u80D7\u80D8\u80E0\u80ED\u80EE"],["8fd6a1","\u80F0\u80F2\u80F3\u80F6\u80F9\u80FA\u80FE\u8103\u810B\u8116\u8117\u8118\u811C\u811E\u8120\u8124\u8127\u812C\u8130\u8135\u813A\u813C\u8145\u8147\u814A\u814C\u8152\u8157\u8160\u8161\u8167\u8168\u8169\u816D\u816F\u8177\u8181\u8190\u8184\u8185\u8186\u818B\u818E\u8196\u8198\u819B\u819E\u81A2\u81AE\u81B2\u81B4\u81BB\u81CB\u81C3\u81C5\u81CA\u81CE\u81CF\u81D5\u81D7\u81DB\u81DD\u81DE\u81E1\u81E4\u81EB\u81EC\u81F0\u81F1\u81F2\u81F5\u81F6\u81F8\u81F9\u81FD\u81FF\u8200\u8203\u820F\u8213\u8214\u8219\u821A\u821D\u8221\u8222\u8228\u8232\u8234\u823A\u8243\u8244\u8245\u8246"],["8fd7a1","\u824B\u824E\u824F\u8251\u8256\u825C\u8260\u8263\u8267\u826D\u8274\u827B\u827D\u827F\u8280\u8281\u8283\u8284\u8287\u8289\u828A\u828E\u8291\u8294\u8296\u8298\u829A\u829B\u82A0\u82A1\u82A3\u82A4\u82A7\u82A8\u82A9\u82AA\u82AE\u82B0\u82B2\u82B4\u82B7\u82BA\u82BC\u82BE\u82BF\u82C6\u82D0\u82D5\u82DA\u82E0\u82E2\u82E4\u82E8\u82EA\u82ED\u82EF\u82F6\u82F7\u82FD\u82FE\u8300\u8301\u8307\u8308\u830A\u830B\u8354\u831B\u831D\u831E\u831F\u8321\u8322\u832C\u832D\u832E\u8330\u8333\u8337\u833A\u833C\u833D\u8342\u8343\u8344\u8347\u834D\u834E\u8351\u8355\u8356\u8357\u8370\u8378"],["8fd8a1","\u837D\u837F\u8380\u8382\u8384\u8386\u838D\u8392\u8394\u8395\u8398\u8399\u839B\u839C\u839D\u83A6\u83A7\u83A9\u83AC\u83BE\u83BF\u83C0\u83C7\u83C9\u83CF\u83D0\u83D1\u83D4\u83DD\u8353\u83E8\u83EA\u83F6\u83F8\u83F9\u83FC\u8401\u8406\u840A\u840F\u8411\u8415\u8419\u83AD\u842F\u8439\u8445\u8447\u8448\u844A\u844D\u844F\u8451\u8452\u8456\u8458\u8459\u845A\u845C\u8460\u8464\u8465\u8467\u846A\u8470\u8473\u8474\u8476\u8478\u847C\u847D\u8481\u8485\u8492\u8493\u8495\u849E\u84A6\u84A8\u84A9\u84AA\u84AF\u84B1\u84B4\u84BA\u84BD\u84BE\u84C0\u84C2\u84C7\u84C8\u84CC\u84CF\u84D3"],["8fd9a1","\u84DC\u84E7\u84EA\u84EF\u84F0\u84F1\u84F2\u84F7\u8532\u84FA\u84FB\u84FD\u8502\u8503\u8507\u850C\u850E\u8510\u851C\u851E\u8522\u8523\u8524\u8525\u8527\u852A\u852B\u852F\u8533\u8534\u8536\u853F\u8546\u854F",4,"\u8556\u8559\u855C",6,"\u8564\u856B\u856F\u8579\u857A\u857B\u857D\u857F\u8581\u8585\u8586\u8589\u858B\u858C\u858F\u8593\u8598\u859D\u859F\u85A0\u85A2\u85A5\u85A7\u85B4\u85B6\u85B7\u85B8\u85BC\u85BD\u85BE\u85BF\u85C2\u85C7\u85CA\u85CB\u85CE\u85AD\u85D8\u85DA\u85DF\u85E0\u85E6\u85E8\u85ED\u85F3\u85F6\u85FC"],["8fdaa1","\u85FF\u8600\u8604\u8605\u860D\u860E\u8610\u8611\u8612\u8618\u8619\u861B\u861E\u8621\u8627\u8629\u8636\u8638\u863A\u863C\u863D\u8640\u8642\u8646\u8652\u8653\u8656\u8657\u8658\u8659\u865D\u8660",4,"\u8669\u866C\u866F\u8675\u8676\u8677\u867A\u868D\u8691\u8696\u8698\u869A\u869C\u86A1\u86A6\u86A7\u86A8\u86AD\u86B1\u86B3\u86B4\u86B5\u86B7\u86B8\u86B9\u86BF\u86C0\u86C1\u86C3\u86C5\u86D1\u86D2\u86D5\u86D7\u86DA\u86DC\u86E0\u86E3\u86E5\u86E7\u8688\u86FA\u86FC\u86FD\u8704\u8705\u8707\u870B\u870E\u870F\u8710\u8713\u8714\u8719\u871E\u871F\u8721\u8723"],["8fdba1","\u8728\u872E\u872F\u8731\u8732\u8739\u873A\u873C\u873D\u873E\u8740\u8743\u8745\u874D\u8758\u875D\u8761\u8764\u8765\u876F\u8771\u8772\u877B\u8783",6,"\u878B\u878C\u8790\u8793\u8795\u8797\u8798\u8799\u879E\u87A0\u87A3\u87A7\u87AC\u87AD\u87AE\u87B1\u87B5\u87BE\u87BF\u87C1\u87C8\u87C9\u87CA\u87CE\u87D5\u87D6\u87D9\u87DA\u87DC\u87DF\u87E2\u87E3\u87E4\u87EA\u87EB\u87ED\u87F1\u87F3\u87F8\u87FA\u87FF\u8801\u8803\u8806\u8809\u880A\u880B\u8810\u8819\u8812\u8813\u8814\u8818\u881A\u881B\u881C\u881E\u881F\u8828\u882D\u882E\u8830\u8832\u8835"],["8fdca1","\u883A\u883C\u8841\u8843\u8845\u8848\u8849\u884A\u884B\u884E\u8851\u8855\u8856\u8858\u885A\u885C\u885F\u8860\u8864\u8869\u8871\u8879\u887B\u8880\u8898\u889A\u889B\u889C\u889F\u88A0\u88A8\u88AA\u88BA\u88BD\u88BE\u88C0\u88CA",4,"\u88D1\u88D2\u88D3\u88DB\u88DE\u88E7\u88EF\u88F0\u88F1\u88F5\u88F7\u8901\u8906\u890D\u890E\u890F\u8915\u8916\u8918\u8919\u891A\u891C\u8920\u8926\u8927\u8928\u8930\u8931\u8932\u8935\u8939\u893A\u893E\u8940\u8942\u8945\u8946\u8949\u894F\u8952\u8957\u895A\u895B\u895C\u8961\u8962\u8963\u896B\u896E\u8970\u8973\u8975\u897A"],["8fdda1","\u897B\u897C\u897D\u8989\u898D\u8990\u8994\u8995\u899B\u899C\u899F\u89A0\u89A5\u89B0\u89B4\u89B5\u89B6\u89B7\u89BC\u89D4",4,"\u89E5\u89E9\u89EB\u89ED\u89F1\u89F3\u89F6\u89F9\u89FD\u89FF\u8A04\u8A05\u8A07\u8A0F\u8A11\u8A12\u8A14\u8A15\u8A1E\u8A20\u8A22\u8A24\u8A26\u8A2B\u8A2C\u8A2F\u8A35\u8A37\u8A3D\u8A3E\u8A40\u8A43\u8A45\u8A47\u8A49\u8A4D\u8A4E\u8A53\u8A56\u8A57\u8A58\u8A5C\u8A5D\u8A61\u8A65\u8A67\u8A75\u8A76\u8A77\u8A79\u8A7A\u8A7B\u8A7E\u8A7F\u8A80\u8A83\u8A86\u8A8B\u8A8F\u8A90\u8A92\u8A96\u8A97\u8A99\u8A9F\u8AA7\u8AA9\u8AAE\u8AAF\u8AB3"],["8fdea1","\u8AB6\u8AB7\u8ABB\u8ABE\u8AC3\u8AC6\u8AC8\u8AC9\u8ACA\u8AD1\u8AD3\u8AD4\u8AD5\u8AD7\u8ADD\u8ADF\u8AEC\u8AF0\u8AF4\u8AF5\u8AF6\u8AFC\u8AFF\u8B05\u8B06\u8B0B\u8B11\u8B1C\u8B1E\u8B1F\u8B0A\u8B2D\u8B30\u8B37\u8B3C\u8B42",4,"\u8B48\u8B52\u8B53\u8B54\u8B59\u8B4D\u8B5E\u8B63\u8B6D\u8B76\u8B78\u8B79\u8B7C\u8B7E\u8B81\u8B84\u8B85\u8B8B\u8B8D\u8B8F\u8B94\u8B95\u8B9C\u8B9E\u8B9F\u8C38\u8C39\u8C3D\u8C3E\u8C45\u8C47\u8C49\u8C4B\u8C4F\u8C51\u8C53\u8C54\u8C57\u8C58\u8C5B\u8C5D\u8C59\u8C63\u8C64\u8C66\u8C68\u8C69\u8C6D\u8C73\u8C75\u8C76\u8C7B\u8C7E\u8C86"],["8fdfa1","\u8C87\u8C8B\u8C90\u8C92\u8C93\u8C99\u8C9B\u8C9C\u8CA4\u8CB9\u8CBA\u8CC5\u8CC6\u8CC9\u8CCB\u8CCF\u8CD6\u8CD5\u8CD9\u8CDD\u8CE1\u8CE8\u8CEC\u8CEF\u8CF0\u8CF2\u8CF5\u8CF7\u8CF8\u8CFE\u8CFF\u8D01\u8D03\u8D09\u8D12\u8D17\u8D1B\u8D65\u8D69\u8D6C\u8D6E\u8D7F\u8D82\u8D84\u8D88\u8D8D\u8D90\u8D91\u8D95\u8D9E\u8D9F\u8DA0\u8DA6\u8DAB\u8DAC\u8DAF\u8DB2\u8DB5\u8DB7\u8DB9\u8DBB\u8DC0\u8DC5\u8DC6\u8DC7\u8DC8\u8DCA\u8DCE\u8DD1\u8DD4\u8DD5\u8DD7\u8DD9\u8DE4\u8DE5\u8DE7\u8DEC\u8DF0\u8DBC\u8DF1\u8DF2\u8DF4\u8DFD\u8E01\u8E04\u8E05\u8E06\u8E0B\u8E11\u8E14\u8E16\u8E20\u8E21\u8E22"],["8fe0a1","\u8E23\u8E26\u8E27\u8E31\u8E33\u8E36\u8E37\u8E38\u8E39\u8E3D\u8E40\u8E41\u8E4B\u8E4D\u8E4E\u8E4F\u8E54\u8E5B\u8E5C\u8E5D\u8E5E\u8E61\u8E62\u8E69\u8E6C\u8E6D\u8E6F\u8E70\u8E71\u8E79\u8E7A\u8E7B\u8E82\u8E83\u8E89\u8E90\u8E92\u8E95\u8E9A\u8E9B\u8E9D\u8E9E\u8EA2\u8EA7\u8EA9\u8EAD\u8EAE\u8EB3\u8EB5\u8EBA\u8EBB\u8EC0\u8EC1\u8EC3\u8EC4\u8EC7\u8ECF\u8ED1\u8ED4\u8EDC\u8EE8\u8EEE\u8EF0\u8EF1\u8EF7\u8EF9\u8EFA\u8EED\u8F00\u8F02\u8F07\u8F08\u8F0F\u8F10\u8F16\u8F17\u8F18\u8F1E\u8F20\u8F21\u8F23\u8F25\u8F27\u8F28\u8F2C\u8F2D\u8F2E\u8F34\u8F35\u8F36\u8F37\u8F3A\u8F40\u8F41"],["8fe1a1","\u8F43\u8F47\u8F4F\u8F51",4,"\u8F58\u8F5D\u8F5E\u8F65\u8F9D\u8FA0\u8FA1\u8FA4\u8FA5\u8FA6\u8FB5\u8FB6\u8FB8\u8FBE\u8FC0\u8FC1\u8FC6\u8FCA\u8FCB\u8FCD\u8FD0\u8FD2\u8FD3\u8FD5\u8FE0\u8FE3\u8FE4\u8FE8\u8FEE\u8FF1\u8FF5\u8FF6\u8FFB\u8FFE\u9002\u9004\u9008\u900C\u9018\u901B\u9028\u9029\u902F\u902A\u902C\u902D\u9033\u9034\u9037\u903F\u9043\u9044\u904C\u905B\u905D\u9062\u9066\u9067\u906C\u9070\u9074\u9079\u9085\u9088\u908B\u908C\u908E\u9090\u9095\u9097\u9098\u9099\u909B\u90A0\u90A1\u90A2\u90A5\u90B0\u90B2\u90B3\u90B4\u90B6\u90BD\u90CC\u90BE\u90C3"],["8fe2a1","\u90C4\u90C5\u90C7\u90C8\u90D5\u90D7\u90D8\u90D9\u90DC\u90DD\u90DF\u90E5\u90D2\u90F6\u90EB\u90EF\u90F0\u90F4\u90FE\u90FF\u9100\u9104\u9105\u9106\u9108\u910D\u9110\u9114\u9116\u9117\u9118\u911A\u911C\u911E\u9120\u9125\u9122\u9123\u9127\u9129\u912E\u912F\u9131\u9134\u9136\u9137\u9139\u913A\u913C\u913D\u9143\u9147\u9148\u914F\u9153\u9157\u9159\u915A\u915B\u9161\u9164\u9167\u916D\u9174\u9179\u917A\u917B\u9181\u9183\u9185\u9186\u918A\u918E\u9191\u9193\u9194\u9195\u9198\u919E\u91A1\u91A6\u91A8\u91AC\u91AD\u91AE\u91B0\u91B1\u91B2\u91B3\u91B6\u91BB\u91BC\u91BD\u91BF"],["8fe3a1","\u91C2\u91C3\u91C5\u91D3\u91D4\u91D7\u91D9\u91DA\u91DE\u91E4\u91E5\u91E9\u91EA\u91EC",5,"\u91F7\u91F9\u91FB\u91FD\u9200\u9201\u9204\u9205\u9206\u9207\u9209\u920A\u920C\u9210\u9212\u9213\u9216\u9218\u921C\u921D\u9223\u9224\u9225\u9226\u9228\u922E\u922F\u9230\u9233\u9235\u9236\u9238\u9239\u923A\u923C\u923E\u9240\u9242\u9243\u9246\u9247\u924A\u924D\u924E\u924F\u9251\u9258\u9259\u925C\u925D\u9260\u9261\u9265\u9267\u9268\u9269\u926E\u926F\u9270\u9275",4,"\u927B\u927C\u927D\u927F\u9288\u9289\u928A\u928D\u928E\u9292\u9297"],["8fe4a1","\u9299\u929F\u92A0\u92A4\u92A5\u92A7\u92A8\u92AB\u92AF\u92B2\u92B6\u92B8\u92BA\u92BB\u92BC\u92BD\u92BF",4,"\u92C5\u92C6\u92C7\u92C8\u92CB\u92CC\u92CD\u92CE\u92D0\u92D3\u92D5\u92D7\u92D8\u92D9\u92DC\u92DD\u92DF\u92E0\u92E1\u92E3\u92E5\u92E7\u92E8\u92EC\u92EE\u92F0\u92F9\u92FB\u92FF\u9300\u9302\u9308\u930D\u9311\u9314\u9315\u931C\u931D\u931E\u931F\u9321\u9324\u9325\u9327\u9329\u932A\u9333\u9334\u9336\u9337\u9347\u9348\u9349\u9350\u9351\u9352\u9355\u9357\u9358\u935A\u935E\u9364\u9365\u9367\u9369\u936A\u936D\u936F\u9370\u9371\u9373\u9374\u9376"],["8fe5a1","\u937A\u937D\u937F\u9380\u9381\u9382\u9388\u938A\u938B\u938D\u938F\u9392\u9395\u9398\u939B\u939E\u93A1\u93A3\u93A4\u93A6\u93A8\u93AB\u93B4\u93B5\u93B6\u93BA\u93A9\u93C1\u93C4\u93C5\u93C6\u93C7\u93C9",4,"\u93D3\u93D9\u93DC\u93DE\u93DF\u93E2\u93E6\u93E7\u93F9\u93F7\u93F8\u93FA\u93FB\u93FD\u9401\u9402\u9404\u9408\u9409\u940D\u940E\u940F\u9415\u9416\u9417\u941F\u942E\u942F\u9431\u9432\u9433\u9434\u943B\u943F\u943D\u9443\u9445\u9448\u944A\u944C\u9455\u9459\u945C\u945F\u9461\u9463\u9468\u946B\u946D\u946E\u946F\u9471\u9472\u9484\u9483\u9578\u9579"],["8fe6a1","\u957E\u9584\u9588\u958C\u958D\u958E\u959D\u959E\u959F\u95A1\u95A6\u95A9\u95AB\u95AC\u95B4\u95B6\u95BA\u95BD\u95BF\u95C6\u95C8\u95C9\u95CB\u95D0\u95D1\u95D2\u95D3\u95D9\u95DA\u95DD\u95DE\u95DF\u95E0\u95E4\u95E6\u961D\u961E\u9622\u9624\u9625\u9626\u962C\u9631\u9633\u9637\u9638\u9639\u963A\u963C\u963D\u9641\u9652\u9654\u9656\u9657\u9658\u9661\u966E\u9674\u967B\u967C\u967E\u967F\u9681\u9682\u9683\u9684\u9689\u9691\u9696\u969A\u969D\u969F\u96A4\u96A5\u96A6\u96A9\u96AE\u96AF\u96B3\u96BA\u96CA\u96D2\u5DB2\u96D8\u96DA\u96DD\u96DE\u96DF\u96E9\u96EF\u96F1\u96FA\u9702"],["8fe7a1","\u9703\u9705\u9709\u971A\u971B\u971D\u9721\u9722\u9723\u9728\u9731\u9733\u9741\u9743\u974A\u974E\u974F\u9755\u9757\u9758\u975A\u975B\u9763\u9767\u976A\u976E\u9773\u9776\u9777\u9778\u977B\u977D\u977F\u9780\u9789\u9795\u9796\u9797\u9799\u979A\u979E\u979F\u97A2\u97AC\u97AE\u97B1\u97B2\u97B5\u97B6\u97B8\u97B9\u97BA\u97BC\u97BE\u97BF\u97C1\u97C4\u97C5\u97C7\u97C9\u97CA\u97CC\u97CD\u97CE\u97D0\u97D1\u97D4\u97D7\u97D8\u97D9\u97DD\u97DE\u97E0\u97DB\u97E1\u97E4\u97EF\u97F1\u97F4\u97F7\u97F8\u97FA\u9807\u980A\u9819\u980D\u980E\u9814\u9816\u981C\u981E\u9820\u9823\u9826"],["8fe8a1","\u982B\u982E\u982F\u9830\u9832\u9833\u9835\u9825\u983E\u9844\u9847\u984A\u9851\u9852\u9853\u9856\u9857\u9859\u985A\u9862\u9863\u9865\u9866\u986A\u986C\u98AB\u98AD\u98AE\u98B0\u98B4\u98B7\u98B8\u98BA\u98BB\u98BF\u98C2\u98C5\u98C8\u98CC\u98E1\u98E3\u98E5\u98E6\u98E7\u98EA\u98F3\u98F6\u9902\u9907\u9908\u9911\u9915\u9916\u9917\u991A\u991B\u991C\u991F\u9922\u9926\u9927\u992B\u9931",4,"\u9939\u993A\u993B\u993C\u9940\u9941\u9946\u9947\u9948\u994D\u994E\u9954\u9958\u9959\u995B\u995C\u995E\u995F\u9960\u999B\u999D\u999F\u99A6\u99B0\u99B1\u99B2\u99B5"],["8fe9a1","\u99B9\u99BA\u99BD\u99BF\u99C3\u99C9\u99D3\u99D4\u99D9\u99DA\u99DC\u99DE\u99E7\u99EA\u99EB\u99EC\u99F0\u99F4\u99F5\u99F9\u99FD\u99FE\u9A02\u9A03\u9A04\u9A0B\u9A0C\u9A10\u9A11\u9A16\u9A1E\u9A20\u9A22\u9A23\u9A24\u9A27\u9A2D\u9A2E\u9A33\u9A35\u9A36\u9A38\u9A47\u9A41\u9A44\u9A4A\u9A4B\u9A4C\u9A4E\u9A51\u9A54\u9A56\u9A5D\u9AAA\u9AAC\u9AAE\u9AAF\u9AB2\u9AB4\u9AB5\u9AB6\u9AB9\u9ABB\u9ABE\u9ABF\u9AC1\u9AC3\u9AC6\u9AC8\u9ACE\u9AD0\u9AD2\u9AD5\u9AD6\u9AD7\u9ADB\u9ADC\u9AE0\u9AE4\u9AE5\u9AE7\u9AE9\u9AEC\u9AF2\u9AF3\u9AF5\u9AF9\u9AFA\u9AFD\u9AFF",4],["8feaa1","\u9B04\u9B05\u9B08\u9B09\u9B0B\u9B0C\u9B0D\u9B0E\u9B10\u9B12\u9B16\u9B19\u9B1B\u9B1C\u9B20\u9B26\u9B2B\u9B2D\u9B33\u9B34\u9B35\u9B37\u9B39\u9B3A\u9B3D\u9B48\u9B4B\u9B4C\u9B55\u9B56\u9B57\u9B5B\u9B5E\u9B61\u9B63\u9B65\u9B66\u9B68\u9B6A",4,"\u9B73\u9B75\u9B77\u9B78\u9B79\u9B7F\u9B80\u9B84\u9B85\u9B86\u9B87\u9B89\u9B8A\u9B8B\u9B8D\u9B8F\u9B90\u9B94\u9B9A\u9B9D\u9B9E\u9BA6\u9BA7\u9BA9\u9BAC\u9BB0\u9BB1\u9BB2\u9BB7\u9BB8\u9BBB\u9BBC\u9BBE\u9BBF\u9BC1\u9BC7\u9BC8\u9BCE\u9BD0\u9BD7\u9BD8\u9BDD\u9BDF\u9BE5\u9BE7\u9BEA\u9BEB\u9BEF\u9BF3\u9BF7\u9BF8"],["8feba1","\u9BF9\u9BFA\u9BFD\u9BFF\u9C00\u9C02\u9C0B\u9C0F\u9C11\u9C16\u9C18\u9C19\u9C1A\u9C1C\u9C1E\u9C22\u9C23\u9C26",4,"\u9C31\u9C35\u9C36\u9C37\u9C3D\u9C41\u9C43\u9C44\u9C45\u9C49\u9C4A\u9C4E\u9C4F\u9C50\u9C53\u9C54\u9C56\u9C58\u9C5B\u9C5D\u9C5E\u9C5F\u9C63\u9C69\u9C6A\u9C5C\u9C6B\u9C68\u9C6E\u9C70\u9C72\u9C75\u9C77\u9C7B\u9CE6\u9CF2\u9CF7\u9CF9\u9D0B\u9D02\u9D11\u9D17\u9D18\u9D1C\u9D1D\u9D1E\u9D2F\u9D30\u9D32\u9D33\u9D34\u9D3A\u9D3C\u9D45\u9D3D\u9D42\u9D43\u9D47\u9D4A\u9D53\u9D54\u9D5F\u9D63\u9D62\u9D65\u9D69\u9D6A\u9D6B\u9D70\u9D76\u9D77\u9D7B"],["8feca1","\u9D7C\u9D7E\u9D83\u9D84\u9D86\u9D8A\u9D8D\u9D8E\u9D92\u9D93\u9D95\u9D96\u9D97\u9D98\u9DA1\u9DAA\u9DAC\u9DAE\u9DB1\u9DB5\u9DB9\u9DBC\u9DBF\u9DC3\u9DC7\u9DC9\u9DCA\u9DD4\u9DD5\u9DD6\u9DD7\u9DDA\u9DDE\u9DDF\u9DE0\u9DE5\u9DE7\u9DE9\u9DEB\u9DEE\u9DF0\u9DF3\u9DF4\u9DFE\u9E0A\u9E02\u9E07\u9E0E\u9E10\u9E11\u9E12\u9E15\u9E16\u9E19\u9E1C\u9E1D\u9E7A\u9E7B\u9E7C\u9E80\u9E82\u9E83\u9E84\u9E85\u9E87\u9E8E\u9E8F\u9E96\u9E98\u9E9B\u9E9E\u9EA4\u9EA8\u9EAC\u9EAE\u9EAF\u9EB0\u9EB3\u9EB4\u9EB5\u9EC6\u9EC8\u9ECB\u9ED5\u9EDF\u9EE4\u9EE7\u9EEC\u9EED\u9EEE\u9EF0\u9EF1\u9EF2\u9EF5"],["8feda1","\u9EF8\u9EFF\u9F02\u9F03\u9F09\u9F0F\u9F10\u9F11\u9F12\u9F14\u9F16\u9F17\u9F19\u9F1A\u9F1B\u9F1F\u9F22\u9F26\u9F2A\u9F2B\u9F2F\u9F31\u9F32\u9F34\u9F37\u9F39\u9F3A\u9F3C\u9F3D\u9F3F\u9F41\u9F43",4,"\u9F53\u9F55\u9F56\u9F57\u9F58\u9F5A\u9F5D\u9F5E\u9F68\u9F69\u9F6D",4,"\u9F73\u9F75\u9F7A\u9F7D\u9F8F\u9F90\u9F91\u9F92\u9F94\u9F96\u9F97\u9F9E\u9FA1\u9FA2\u9FA3\u9FA5"]]});var Lr=o((yz5,GS6)=>{GS6.exports=[["0","\x00",127,"\u20AC"],["8140","\u4E02\u4E04\u4E05\u4E06\u4E0F\u4E12\u4E17\u4E1F\u4E20\u4E21\u4E23\u4E26\u4E29\u4E2E\u4E2F\u4E31\u4E33\u4E35\u4E37\u4E3C\u4E40\u4E41\u4E42\u4E44\u4E46\u4E4A\u4E51\u4E55\u4E57\u4E5A\u4E5B\u4E62\u4E63\u4E64\u4E65\u4E67\u4E68\u4E6A",5,"\u4E72\u4E74",9,"\u4E7F",6,"\u4E87\u4E8A"],["8180","\u4E90\u4E96\u4E97\u4E99\u4E9C\u4E9D\u4E9E\u4EA3\u4EAA\u4EAF\u4EB0\u4EB1\u4EB4\u4EB6\u4EB7\u4EB8\u4EB9\u4EBC\u4EBD\u4EBE\u4EC8\u4ECC\u4ECF\u4ED0\u4ED2\u4EDA\u4EDB\u4EDC\u4EE0\u4EE2\u4EE6\u4EE7\u4EE9\u4EED\u4EEE\u4EEF\u4EF1\u4EF4\u4EF8\u4EF9\u4EFA\u4EFC\u4EFE\u4F00\u4F02",6,"\u4F0B\u4F0C\u4F12",4,"\u4F1C\u4F1D\u4F21\u4F23\u4F28\u4F29\u4F2C\u4F2D\u4F2E\u4F31\u4F33\u4F35\u4F37\u4F39\u4F3B\u4F3E",4,"\u4F44\u4F45\u4F47",5,"\u4F52\u4F54\u4F56\u4F61\u4F62\u4F66\u4F68\u4F6A\u4F6B\u4F6D\u4F6E\u4F71\u4F72\u4F75\u4F77\u4F78\u4F79\u4F7A\u4F7D\u4F80\u4F81\u4F82\u4F85\u4F86\u4F87\u4F8A\u4F8C\u4F8E\u4F90\u4F92\u4F93\u4F95\u4F96\u4F98\u4F99\u4F9A\u4F9C\u4F9E\u4F9F\u4FA1\u4FA2"],["8240","\u4FA4\u4FAB\u4FAD\u4FB0",4,"\u4FB6",8,"\u4FC0\u4FC1\u4FC2\u4FC6\u4FC7\u4FC8\u4FC9\u4FCB\u4FCC\u4FCD\u4FD2",4,"\u4FD9\u4FDB\u4FE0\u4FE2\u4FE4\u4FE5\u4FE7\u4FEB\u4FEC\u4FF0\u4FF2\u4FF4\u4FF5\u4FF6\u4FF7\u4FF9\u4FFB\u4FFC\u4FFD\u4FFF",11],["8280","\u500B\u500E\u5010\u5011\u5013\u5015\u5016\u5017\u501B\u501D\u501E\u5020\u5022\u5023\u5024\u5027\u502B\u502F",10,"\u503B\u503D\u503F\u5040\u5041\u5042\u5044\u5045\u5046\u5049\u504A\u504B\u504D\u5050",4,"\u5056\u5057\u5058\u5059\u505B\u505D",7,"\u5066",5,"\u506D",8,"\u5078\u5079\u507A\u507C\u507D\u5081\u5082\u5083\u5084\u5086\u5087\u5089\u508A\u508B\u508C\u508E",20,"\u50A4\u50A6\u50AA\u50AB\u50AD",4,"\u50B3",6,"\u50BC"],["8340","\u50BD",17,"\u50D0",5,"\u50D7\u50D8\u50D9\u50DB",10,"\u50E8\u50E9\u50EA\u50EB\u50EF\u50F0\u50F1\u50F2\u50F4\u50F6",4,"\u50FC",9,"\u5108"],["8380","\u5109\u510A\u510C",5,"\u5113",13,"\u5122",28,"\u5142\u5147\u514A\u514C\u514E\u514F\u5150\u5152\u5153\u5157\u5158\u5159\u515B\u515D",4,"\u5163\u5164\u5166\u5167\u5169\u516A\u516F\u5172\u517A\u517E\u517F\u5183\u5184\u5186\u5187\u518A\u518B\u518E\u518F\u5190\u5191\u5193\u5194\u5198\u519A\u519D\u519E\u519F\u51A1\u51A3\u51A6",4,"\u51AD\u51AE\u51B4\u51B8\u51B9\u51BA\u51BE\u51BF\u51C1\u51C2\u51C3\u51C5\u51C8\u51CA\u51CD\u51CE\u51D0\u51D2",5],["8440","\u51D8\u51D9\u51DA\u51DC\u51DE\u51DF\u51E2\u51E3\u51E5",5,"\u51EC\u51EE\u51F1\u51F2\u51F4\u51F7\u51FE\u5204\u5205\u5209\u520B\u520C\u520F\u5210\u5213\u5214\u5215\u521C\u521E\u521F\u5221\u5222\u5223\u5225\u5226\u5227\u522A\u522C\u522F\u5231\u5232\u5234\u5235\u523C\u523E\u5244",5,"\u524B\u524E\u524F\u5252\u5253\u5255\u5257\u5258"],["8480","\u5259\u525A\u525B\u525D\u525F\u5260\u5262\u5263\u5264\u5266\u5268\u526B\u526C\u526D\u526E\u5270\u5271\u5273",9,"\u527E\u5280\u5283",4,"\u5289",6,"\u5291\u5292\u5294",6,"\u529C\u52A4\u52A5\u52A6\u52A7\u52AE\u52AF\u52B0\u52B4",9,"\u52C0\u52C1\u52C2\u52C4\u52C5\u52C6\u52C8\u52CA\u52CC\u52CD\u52CE\u52CF\u52D1\u52D3\u52D4\u52D5\u52D7\u52D9",5,"\u52E0\u52E1\u52E2\u52E3\u52E5",10,"\u52F1",7,"\u52FB\u52FC\u52FD\u5301\u5302\u5303\u5304\u5307\u5309\u530A\u530B\u530C\u530E"],["8540","\u5311\u5312\u5313\u5314\u5318\u531B\u531C\u531E\u531F\u5322\u5324\u5325\u5327\u5328\u5329\u532B\u532C\u532D\u532F",9,"\u533C\u533D\u5340\u5342\u5344\u5346\u534B\u534C\u534D\u5350\u5354\u5358\u5359\u535B\u535D\u5365\u5368\u536A\u536C\u536D\u5372\u5376\u5379\u537B\u537C\u537D\u537E\u5380\u5381\u5383\u5387\u5388\u538A\u538E\u538F"],["8580","\u5390",4,"\u5396\u5397\u5399\u539B\u539C\u539E\u53A0\u53A1\u53A4\u53A7\u53AA\u53AB\u53AC\u53AD\u53AF",6,"\u53B7\u53B8\u53B9\u53BA\u53BC\u53BD\u53BE\u53C0\u53C3",4,"\u53CE\u53CF\u53D0\u53D2\u53D3\u53D5\u53DA\u53DC\u53DD\u53DE\u53E1\u53E2\u53E7\u53F4\u53FA\u53FE\u53FF\u5400\u5402\u5405\u5407\u540B\u5414\u5418\u5419\u541A\u541C\u5422\u5424\u5425\u542A\u5430\u5433\u5436\u5437\u543A\u543D\u543F\u5441\u5442\u5444\u5445\u5447\u5449\u544C\u544D\u544E\u544F\u5451\u545A\u545D",4,"\u5463\u5465\u5467\u5469",7,"\u5474\u5479\u547A\u547E\u547F\u5481\u5483\u5485\u5487\u5488\u5489\u548A\u548D\u5491\u5493\u5497\u5498\u549C\u549E\u549F\u54A0\u54A1"],["8640","\u54A2\u54A5\u54AE\u54B0\u54B2\u54B5\u54B6\u54B7\u54B9\u54BA\u54BC\u54BE\u54C3\u54C5\u54CA\u54CB\u54D6\u54D8\u54DB\u54E0",4,"\u54EB\u54EC\u54EF\u54F0\u54F1\u54F4",5,"\u54FB\u54FE\u5500\u5502\u5503\u5504\u5505\u5508\u550A",4,"\u5512\u5513\u5515",5,"\u551C\u551D\u551E\u551F\u5521\u5525\u5526"],["8680","\u5528\u5529\u552B\u552D\u5532\u5534\u5535\u5536\u5538\u5539\u553A\u553B\u553D\u5540\u5542\u5545\u5547\u5548\u554B",4,"\u5551\u5552\u5553\u5554\u5557",4,"\u555D\u555E\u555F\u5560\u5562\u5563\u5568\u5569\u556B\u556F",5,"\u5579\u557A\u557D\u557F\u5585\u5586\u558C\u558D\u558E\u5590\u5592\u5593\u5595\u5596\u5597\u559A\u559B\u559E\u55A0",6,"\u55A8",8,"\u55B2\u55B4\u55B6\u55B8\u55BA\u55BC\u55BF",4,"\u55C6\u55C7\u55C8\u55CA\u55CB\u55CE\u55CF\u55D0\u55D5\u55D7",4,"\u55DE\u55E0\u55E2\u55E7\u55E9\u55ED\u55EE\u55F0\u55F1\u55F4\u55F6\u55F8",4,"\u55FF\u5602\u5603\u5604\u5605"],["8740","\u5606\u5607\u560A\u560B\u560D\u5610",7,"\u5619\u561A\u561C\u561D\u5620\u5621\u5622\u5625\u5626\u5628\u5629\u562A\u562B\u562E\u562F\u5630\u5633\u5635\u5637\u5638\u563A\u563C\u563D\u563E\u5640",11,"\u564F",4,"\u5655\u5656\u565A\u565B\u565D",4],["8780","\u5663\u5665\u5666\u5667\u566D\u566E\u566F\u5670\u5672\u5673\u5674\u5675\u5677\u5678\u5679\u567A\u567D",7,"\u5687",6,"\u5690\u5691\u5692\u5694",14,"\u56A4",10,"\u56B0",6,"\u56B8\u56B9\u56BA\u56BB\u56BD",12,"\u56CB",8,"\u56D5\u56D6\u56D8\u56D9\u56DC\u56E3\u56E5",5,"\u56EC\u56EE\u56EF\u56F2\u56F3\u56F6\u56F7\u56F8\u56FB\u56FC\u5700\u5701\u5702\u5705\u5707\u570B",6],["8840","\u5712",9,"\u571D\u571E\u5720\u5721\u5722\u5724\u5725\u5726\u5727\u572B\u5731\u5732\u5734",4,"\u573C\u573D\u573F\u5741\u5743\u5744\u5745\u5746\u5748\u5749\u574B\u5752",4,"\u5758\u5759\u5762\u5763\u5765\u5767\u576C\u576E\u5770\u5771\u5772\u5774\u5775\u5778\u5779\u577A\u577D\u577E\u577F\u5780"],["8880","\u5781\u5787\u5788\u5789\u578A\u578D",4,"\u5794",6,"\u579C\u579D\u579E\u579F\u57A5\u57A8\u57AA\u57AC\u57AF\u57B0\u57B1\u57B3\u57B5\u57B6\u57B7\u57B9",8,"\u57C4",6,"\u57CC\u57CD\u57D0\u57D1\u57D3\u57D6\u57D7\u57DB\u57DC\u57DE\u57E1\u57E2\u57E3\u57E5",7,"\u57EE\u57F0\u57F1\u57F2\u57F3\u57F5\u57F6\u57F7\u57FB\u57FC\u57FE\u57FF\u5801\u5803\u5804\u5805\u5808\u5809\u580A\u580C\u580E\u580F\u5810\u5812\u5813\u5814\u5816\u5817\u5818\u581A\u581B\u581C\u581D\u581F\u5822\u5823\u5825",4,"\u582B",4,"\u5831\u5832\u5833\u5834\u5836",7],["8940","\u583E",5,"\u5845",6,"\u584E\u584F\u5850\u5852\u5853\u5855\u5856\u5857\u5859",4,"\u585F",5,"\u5866",4,"\u586D",16,"\u587F\u5882\u5884\u5886\u5887\u5888\u588A\u588B\u588C"],["8980","\u588D",4,"\u5894",4,"\u589B\u589C\u589D\u58A0",7,"\u58AA",17,"\u58BD\u58BE\u58BF\u58C0\u58C2\u58C3\u58C4\u58C6",10,"\u58D2\u58D3\u58D4\u58D6",13,"\u58E5",5,"\u58ED\u58EF\u58F1\u58F2\u58F4\u58F5\u58F7\u58F8\u58FA",7,"\u5903\u5905\u5906\u5908",4,"\u590E\u5910\u5911\u5912\u5913\u5917\u5918\u591B\u591D\u591E\u5920\u5921\u5922\u5923\u5926\u5928\u592C\u5930\u5932\u5933\u5935\u5936\u593B"],["8a40","\u593D\u593E\u593F\u5940\u5943\u5945\u5946\u594A\u594C\u594D\u5950\u5952\u5953\u5959\u595B",4,"\u5961\u5963\u5964\u5966",12,"\u5975\u5977\u597A\u597B\u597C\u597E\u597F\u5980\u5985\u5989\u598B\u598C\u598E\u598F\u5990\u5991\u5994\u5995\u5998\u599A\u599B\u599C\u599D\u599F\u59A0\u59A1\u59A2\u59A6"],["8a80","\u59A7\u59AC\u59AD\u59B0\u59B1\u59B3",5,"\u59BA\u59BC\u59BD\u59BF",6,"\u59C7\u59C8\u59C9\u59CC\u59CD\u59CE\u59CF\u59D5\u59D6\u59D9\u59DB\u59DE",4,"\u59E4\u59E6\u59E7\u59E9\u59EA\u59EB\u59ED",11,"\u59FA\u59FC\u59FD\u59FE\u5A00\u5A02\u5A0A\u5A0B\u5A0D\u5A0E\u5A0F\u5A10\u5A12\u5A14\u5A15\u5A16\u5A17\u5A19\u5A1A\u5A1B\u5A1D\u5A1E\u5A21\u5A22\u5A24\u5A26\u5A27\u5A28\u5A2A",6,"\u5A33\u5A35\u5A37",4,"\u5A3D\u5A3E\u5A3F\u5A41",4,"\u5A47\u5A48\u5A4B",9,"\u5A56\u5A57\u5A58\u5A59\u5A5B",5],["8b40","\u5A61\u5A63\u5A64\u5A65\u5A66\u5A68\u5A69\u5A6B",8,"\u5A78\u5A79\u5A7B\u5A7C\u5A7D\u5A7E\u5A80",17,"\u5A93",6,"\u5A9C",13,"\u5AAB\u5AAC"],["8b80","\u5AAD",4,"\u5AB4\u5AB6\u5AB7\u5AB9",4,"\u5ABF\u5AC0\u5AC3",5,"\u5ACA\u5ACB\u5ACD",4,"\u5AD3\u5AD5\u5AD7\u5AD9\u5ADA\u5ADB\u5ADD\u5ADE\u5ADF\u5AE2\u5AE4\u5AE5\u5AE7\u5AE8\u5AEA\u5AEC",4,"\u5AF2",22,"\u5B0A",11,"\u5B18",25,"\u5B33\u5B35\u5B36\u5B38",7,"\u5B41",6],["8c40","\u5B48",7,"\u5B52\u5B56\u5B5E\u5B60\u5B61\u5B67\u5B68\u5B6B\u5B6D\u5B6E\u5B6F\u5B72\u5B74\u5B76\u5B77\u5B78\u5B79\u5B7B\u5B7C\u5B7E\u5B7F\u5B82\u5B86\u5B8A\u5B8D\u5B8E\u5B90\u5B91\u5B92\u5B94\u5B96\u5B9F\u5BA7\u5BA8\u5BA9\u5BAC\u5BAD\u5BAE\u5BAF\u5BB1\u5BB2\u5BB7\u5BBA\u5BBB\u5BBC\u5BC0\u5BC1\u5BC3\u5BC8\u5BC9\u5BCA\u5BCB\u5BCD\u5BCE\u5BCF"],["8c80","\u5BD1\u5BD4",8,"\u5BE0\u5BE2\u5BE3\u5BE6\u5BE7\u5BE9",4,"\u5BEF\u5BF1",6,"\u5BFD\u5BFE\u5C00\u5C02\u5C03\u5C05\u5C07\u5C08\u5C0B\u5C0C\u5C0D\u5C0E\u5C10\u5C12\u5C13\u5C17\u5C19\u5C1B\u5C1E\u5C1F\u5C20\u5C21\u5C23\u5C26\u5C28\u5C29\u5C2A\u5C2B\u5C2D\u5C2E\u5C2F\u5C30\u5C32\u5C33\u5C35\u5C36\u5C37\u5C43\u5C44\u5C46\u5C47\u5C4C\u5C4D\u5C52\u5C53\u5C54\u5C56\u5C57\u5C58\u5C5A\u5C5B\u5C5C\u5C5D\u5C5F\u5C62\u5C64\u5C67",6,"\u5C70\u5C72",6,"\u5C7B\u5C7C\u5C7D\u5C7E\u5C80\u5C83",4,"\u5C89\u5C8A\u5C8B\u5C8E\u5C8F\u5C92\u5C93\u5C95\u5C9D",4,"\u5CA4",4],["8d40","\u5CAA\u5CAE\u5CAF\u5CB0\u5CB2\u5CB4\u5CB6\u5CB9\u5CBA\u5CBB\u5CBC\u5CBE\u5CC0\u5CC2\u5CC3\u5CC5",5,"\u5CCC",5,"\u5CD3",5,"\u5CDA",6,"\u5CE2\u5CE3\u5CE7\u5CE9\u5CEB\u5CEC\u5CEE\u5CEF\u5CF1",9,"\u5CFC",4],["8d80","\u5D01\u5D04\u5D05\u5D08",5,"\u5D0F",4,"\u5D15\u5D17\u5D18\u5D19\u5D1A\u5D1C\u5D1D\u5D1F",4,"\u5D25\u5D28\u5D2A\u5D2B\u5D2C\u5D2F",4,"\u5D35",7,"\u5D3F",7,"\u5D48\u5D49\u5D4D",10,"\u5D59\u5D5A\u5D5C\u5D5E",10,"\u5D6A\u5D6D\u5D6E\u5D70\u5D71\u5D72\u5D73\u5D75",12,"\u5D83",21,"\u5D9A\u5D9B\u5D9C\u5D9E\u5D9F\u5DA0"],["8e40","\u5DA1",21,"\u5DB8",12,"\u5DC6",6,"\u5DCE",12,"\u5DDC\u5DDF\u5DE0\u5DE3\u5DE4\u5DEA\u5DEC\u5DED"],["8e80","\u5DF0\u5DF5\u5DF6\u5DF8",4,"\u5DFF\u5E00\u5E04\u5E07\u5E09\u5E0A\u5E0B\u5E0D\u5E0E\u5E12\u5E13\u5E17\u5E1E",7,"\u5E28",4,"\u5E2F\u5E30\u5E32",4,"\u5E39\u5E3A\u5E3E\u5E3F\u5E40\u5E41\u5E43\u5E46",5,"\u5E4D",6,"\u5E56",4,"\u5E5C\u5E5D\u5E5F\u5E60\u5E63",14,"\u5E75\u5E77\u5E79\u5E7E\u5E81\u5E82\u5E83\u5E85\u5E88\u5E89\u5E8C\u5E8D\u5E8E\u5E92\u5E98\u5E9B\u5E9D\u5EA1\u5EA2\u5EA3\u5EA4\u5EA8",4,"\u5EAE",4,"\u5EB4\u5EBA\u5EBB\u5EBC\u5EBD\u5EBF",6],["8f40","\u5EC6\u5EC7\u5EC8\u5ECB",5,"\u5ED4\u5ED5\u5ED7\u5ED8\u5ED9\u5EDA\u5EDC",11,"\u5EE9\u5EEB",8,"\u5EF5\u5EF8\u5EF9\u5EFB\u5EFC\u5EFD\u5F05\u5F06\u5F07\u5F09\u5F0C\u5F0D\u5F0E\u5F10\u5F12\u5F14\u5F16\u5F19\u5F1A\u5F1C\u5F1D\u5F1E\u5F21\u5F22\u5F23\u5F24"],["8f80","\u5F28\u5F2B\u5F2C\u5F2E\u5F30\u5F32",6,"\u5F3B\u5F3D\u5F3E\u5F3F\u5F41",14,"\u5F51\u5F54\u5F59\u5F5A\u5F5B\u5F5C\u5F5E\u5F5F\u5F60\u5F63\u5F65\u5F67\u5F68\u5F6B\u5F6E\u5F6F\u5F72\u5F74\u5F75\u5F76\u5F78\u5F7A\u5F7D\u5F7E\u5F7F\u5F83\u5F86\u5F8D\u5F8E\u5F8F\u5F91\u5F93\u5F94\u5F96\u5F9A\u5F9B\u5F9D\u5F9E\u5F9F\u5FA0\u5FA2",5,"\u5FA9\u5FAB\u5FAC\u5FAF",5,"\u5FB6\u5FB8\u5FB9\u5FBA\u5FBB\u5FBE",4,"\u5FC7\u5FC8\u5FCA\u5FCB\u5FCE\u5FD3\u5FD4\u5FD5\u5FDA\u5FDB\u5FDC\u5FDE\u5FDF\u5FE2\u5FE3\u5FE5\u5FE6\u5FE8\u5FE9\u5FEC\u5FEF\u5FF0\u5FF2\u5FF3\u5FF4\u5FF6\u5FF7\u5FF9\u5FFA\u5FFC\u6007"],["9040","\u6008\u6009\u600B\u600C\u6010\u6011\u6013\u6017\u6018\u601A\u601E\u601F\u6022\u6023\u6024\u602C\u602D\u602E\u6030",4,"\u6036",4,"\u603D\u603E\u6040\u6044",6,"\u604C\u604E\u604F\u6051\u6053\u6054\u6056\u6057\u6058\u605B\u605C\u605E\u605F\u6060\u6061\u6065\u6066\u606E\u6071\u6072\u6074\u6075\u6077\u607E\u6080"],["9080","\u6081\u6082\u6085\u6086\u6087\u6088\u608A\u608B\u608E\u608F\u6090\u6091\u6093\u6095\u6097\u6098\u6099\u609C\u609E\u60A1\u60A2\u60A4\u60A5\u60A7\u60A9\u60AA\u60AE\u60B0\u60B3\u60B5\u60B6\u60B7\u60B9\u60BA\u60BD",7,"\u60C7\u60C8\u60C9\u60CC",4,"\u60D2\u60D3\u60D4\u60D6\u60D7\u60D9\u60DB\u60DE\u60E1",4,"\u60EA\u60F1\u60F2\u60F5\u60F7\u60F8\u60FB",4,"\u6102\u6103\u6104\u6105\u6107\u610A\u610B\u610C\u6110",4,"\u6116\u6117\u6118\u6119\u611B\u611C\u611D\u611E\u6121\u6122\u6125\u6128\u6129\u612A\u612C",18,"\u6140",6],["9140","\u6147\u6149\u614B\u614D\u614F\u6150\u6152\u6153\u6154\u6156",6,"\u615E\u615F\u6160\u6161\u6163\u6164\u6165\u6166\u6169",6,"\u6171\u6172\u6173\u6174\u6176\u6178",18,"\u618C\u618D\u618F",4,"\u6195"],["9180","\u6196",6,"\u619E",8,"\u61AA\u61AB\u61AD",9,"\u61B8",5,"\u61BF\u61C0\u61C1\u61C3",4,"\u61C9\u61CC",4,"\u61D3\u61D5",16,"\u61E7",13,"\u61F6",8,"\u6200",5,"\u6207\u6209\u6213\u6214\u6219\u621C\u621D\u621E\u6220\u6223\u6226\u6227\u6228\u6229\u622B\u622D\u622F\u6230\u6231\u6232\u6235\u6236\u6238",4,"\u6242\u6244\u6245\u6246\u624A"],["9240","\u624F\u6250\u6255\u6256\u6257\u6259\u625A\u625C",6,"\u6264\u6265\u6268\u6271\u6272\u6274\u6275\u6277\u6278\u627A\u627B\u627D\u6281\u6282\u6283\u6285\u6286\u6287\u6288\u628B",5,"\u6294\u6299\u629C\u629D\u629E\u62A3\u62A6\u62A7\u62A9\u62AA\u62AD\u62AE\u62AF\u62B0\u62B2\u62B3\u62B4\u62B6\u62B7\u62B8\u62BA\u62BE\u62C0\u62C1"],["9280","\u62C3\u62CB\u62CF\u62D1\u62D5\u62DD\u62DE\u62E0\u62E1\u62E4\u62EA\u62EB\u62F0\u62F2\u62F5\u62F8\u62F9\u62FA\u62FB\u6300\u6303\u6304\u6305\u6306\u630A\u630B\u630C\u630D\u630F\u6310\u6312\u6313\u6314\u6315\u6317\u6318\u6319\u631C\u6326\u6327\u6329\u632C\u632D\u632E\u6330\u6331\u6333",5,"\u633B\u633C\u633E\u633F\u6340\u6341\u6344\u6347\u6348\u634A\u6351\u6352\u6353\u6354\u6356",7,"\u6360\u6364\u6365\u6366\u6368\u636A\u636B\u636C\u636F\u6370\u6372\u6373\u6374\u6375\u6378\u6379\u637C\u637D\u637E\u637F\u6381\u6383\u6384\u6385\u6386\u638B\u638D\u6391\u6393\u6394\u6395\u6397\u6399",6,"\u63A1\u63A4\u63A6\u63AB\u63AF\u63B1\u63B2\u63B5\u63B6\u63B9\u63BB\u63BD\u63BF\u63C0"],["9340","\u63C1\u63C2\u63C3\u63C5\u63C7\u63C8\u63CA\u63CB\u63CC\u63D1\u63D3\u63D4\u63D5\u63D7",6,"\u63DF\u63E2\u63E4",4,"\u63EB\u63EC\u63EE\u63EF\u63F0\u63F1\u63F3\u63F5\u63F7\u63F9\u63FA\u63FB\u63FC\u63FE\u6403\u6404\u6406",4,"\u640D\u640E\u6411\u6412\u6415",5,"\u641D\u641F\u6422\u6423\u6424"],["9380","\u6425\u6427\u6428\u6429\u642B\u642E",5,"\u6435",4,"\u643B\u643C\u643E\u6440\u6442\u6443\u6449\u644B",6,"\u6453\u6455\u6456\u6457\u6459",4,"\u645F",7,"\u6468\u646A\u646B\u646C\u646E",9,"\u647B",6,"\u6483\u6486\u6488",8,"\u6493\u6494\u6497\u6498\u649A\u649B\u649C\u649D\u649F",4,"\u64A5\u64A6\u64A7\u64A8\u64AA\u64AB\u64AF\u64B1\u64B2\u64B3\u64B4\u64B6\u64B9\u64BB\u64BD\u64BE\u64BF\u64C1\u64C3\u64C4\u64C6",6,"\u64CF\u64D1\u64D3\u64D4\u64D5\u64D6\u64D9\u64DA"],["9440","\u64DB\u64DC\u64DD\u64DF\u64E0\u64E1\u64E3\u64E5\u64E7",24,"\u6501",7,"\u650A",7,"\u6513",4,"\u6519",8],["9480","\u6522\u6523\u6524\u6526",4,"\u652C\u652D\u6530\u6531\u6532\u6533\u6537\u653A\u653C\u653D\u6540",4,"\u6546\u6547\u654A\u654B\u654D\u654E\u6550\u6552\u6553\u6554\u6557\u6558\u655A\u655C\u655F\u6560\u6561\u6564\u6565\u6567\u6568\u6569\u656A\u656D\u656E\u656F\u6571\u6573\u6575\u6576\u6578",14,"\u6588\u6589\u658A\u658D\u658E\u658F\u6592\u6594\u6595\u6596\u6598\u659A\u659D\u659E\u65A0\u65A2\u65A3\u65A6\u65A8\u65AA\u65AC\u65AE\u65B1",7,"\u65BA\u65BB\u65BE\u65BF\u65C0\u65C2\u65C7\u65C8\u65C9\u65CA\u65CD\u65D0\u65D1\u65D3\u65D4\u65D5\u65D8",7,"\u65E1\u65E3\u65E4\u65EA\u65EB"],["9540","\u65F2\u65F3\u65F4\u65F5\u65F8\u65F9\u65FB",4,"\u6601\u6604\u6605\u6607\u6608\u6609\u660B\u660D\u6610\u6611\u6612\u6616\u6617\u6618\u661A\u661B\u661C\u661E\u6621\u6622\u6623\u6624\u6626\u6629\u662A\u662B\u662C\u662E\u6630\u6632\u6633\u6637",4,"\u663D\u663F\u6640\u6642\u6644",6,"\u664D\u664E\u6650\u6651\u6658"],["9580","\u6659\u665B\u665C\u665D\u665E\u6660\u6662\u6663\u6665\u6667\u6669",4,"\u6671\u6672\u6673\u6675\u6678\u6679\u667B\u667C\u667D\u667F\u6680\u6681\u6683\u6685\u6686\u6688\u6689\u668A\u668B\u668D\u668E\u668F\u6690\u6692\u6693\u6694\u6695\u6698",4,"\u669E",8,"\u66A9",4,"\u66AF",4,"\u66B5\u66B6\u66B7\u66B8\u66BA\u66BB\u66BC\u66BD\u66BF",25,"\u66DA\u66DE",7,"\u66E7\u66E8\u66EA",5,"\u66F1\u66F5\u66F6\u66F8\u66FA\u66FB\u66FD\u6701\u6702\u6703"],["9640","\u6704\u6705\u6706\u6707\u670C\u670E\u670F\u6711\u6712\u6713\u6716\u6718\u6719\u671A\u671C\u671E\u6720",5,"\u6727\u6729\u672E\u6730\u6732\u6733\u6736\u6737\u6738\u6739\u673B\u673C\u673E\u673F\u6741\u6744\u6745\u6747\u674A\u674B\u674D\u6752\u6754\u6755\u6757",4,"\u675D\u6762\u6763\u6764\u6766\u6767\u676B\u676C\u676E\u6771\u6774\u6776"],["9680","\u6778\u6779\u677A\u677B\u677D\u6780\u6782\u6783\u6785\u6786\u6788\u678A\u678C\u678D\u678E\u678F\u6791\u6792\u6793\u6794\u6796\u6799\u679B\u679F\u67A0\u67A1\u67A4\u67A6\u67A9\u67AC\u67AE\u67B1\u67B2\u67B4\u67B9",7,"\u67C2\u67C5",9,"\u67D5\u67D6\u67D7\u67DB\u67DF\u67E1\u67E3\u67E4\u67E6\u67E7\u67E8\u67EA\u67EB\u67ED\u67EE\u67F2\u67F5",7,"\u67FE\u6801\u6802\u6803\u6804\u6806\u680D\u6810\u6812\u6814\u6815\u6818",4,"\u681E\u681F\u6820\u6822",6,"\u682B",6,"\u6834\u6835\u6836\u683A\u683B\u683F\u6847\u684B\u684D\u684F\u6852\u6856",5],["9740","\u685C\u685D\u685E\u685F\u686A\u686C",7,"\u6875\u6878",8,"\u6882\u6884\u6887",7,"\u6890\u6891\u6892\u6894\u6895\u6896\u6898",9,"\u68A3\u68A4\u68A5\u68A9\u68AA\u68AB\u68AC\u68AE\u68B1\u68B2\u68B4\u68B6\u68B7\u68B8"],["9780","\u68B9",6,"\u68C1\u68C3",5,"\u68CA\u68CC\u68CE\u68CF\u68D0\u68D1\u68D3\u68D4\u68D6\u68D7\u68D9\u68DB",4,"\u68E1\u68E2\u68E4",9,"\u68EF\u68F2\u68F3\u68F4\u68F6\u68F7\u68F8\u68FB\u68FD\u68FE\u68FF\u6900\u6902\u6903\u6904\u6906",4,"\u690C\u690F\u6911\u6913",11,"\u6921\u6922\u6923\u6925",7,"\u692E\u692F\u6931\u6932\u6933\u6935\u6936\u6937\u6938\u693A\u693B\u693C\u693E\u6940\u6941\u6943",16,"\u6955\u6956\u6958\u6959\u695B\u695C\u695F"],["9840","\u6961\u6962\u6964\u6965\u6967\u6968\u6969\u696A\u696C\u696D\u696F\u6970\u6972",4,"\u697A\u697B\u697D\u697E\u697F\u6981\u6983\u6985\u698A\u698B\u698C\u698E",5,"\u6996\u6997\u6999\u699A\u699D",9,"\u69A9\u69AA\u69AC\u69AE\u69AF\u69B0\u69B2\u69B3\u69B5\u69B6\u69B8\u69B9\u69BA\u69BC\u69BD"],["9880","\u69BE\u69BF\u69C0\u69C2",7,"\u69CB\u69CD\u69CF\u69D1\u69D2\u69D3\u69D5",5,"\u69DC\u69DD\u69DE\u69E1",11,"\u69EE\u69EF\u69F0\u69F1\u69F3",9,"\u69FE\u6A00",9,"\u6A0B",11,"\u6A19",5,"\u6A20\u6A22",5,"\u6A29\u6A2B\u6A2C\u6A2D\u6A2E\u6A30\u6A32\u6A33\u6A34\u6A36",6,"\u6A3F",4,"\u6A45\u6A46\u6A48",7,"\u6A51",6,"\u6A5A"],["9940","\u6A5C",4,"\u6A62\u6A63\u6A64\u6A66",10,"\u6A72",6,"\u6A7A\u6A7B\u6A7D\u6A7E\u6A7F\u6A81\u6A82\u6A83\u6A85",8,"\u6A8F\u6A92",4,"\u6A98",7,"\u6AA1",5],["9980","\u6AA7\u6AA8\u6AAA\u6AAD",114,"\u6B25\u6B26\u6B28",6],["9a40","\u6B2F\u6B30\u6B31\u6B33\u6B34\u6B35\u6B36\u6B38\u6B3B\u6B3C\u6B3D\u6B3F\u6B40\u6B41\u6B42\u6B44\u6B45\u6B48\u6B4A\u6B4B\u6B4D",11,"\u6B5A",7,"\u6B68\u6B69\u6B6B",13,"\u6B7A\u6B7D\u6B7E\u6B7F\u6B80\u6B85\u6B88"],["9a80","\u6B8C\u6B8E\u6B8F\u6B90\u6B91\u6B94\u6B95\u6B97\u6B98\u6B99\u6B9C",4,"\u6BA2",7,"\u6BAB",7,"\u6BB6\u6BB8",6,"\u6BC0\u6BC3\u6BC4\u6BC6",4,"\u6BCC\u6BCE\u6BD0\u6BD1\u6BD8\u6BDA\u6BDC",4,"\u6BE2",7,"\u6BEC\u6BED\u6BEE\u6BF0\u6BF1\u6BF2\u6BF4\u6BF6\u6BF7\u6BF8\u6BFA\u6BFB\u6BFC\u6BFE",6,"\u6C08",4,"\u6C0E\u6C12\u6C17\u6C1C\u6C1D\u6C1E\u6C20\u6C23\u6C25\u6C2B\u6C2C\u6C2D\u6C31\u6C33\u6C36\u6C37\u6C39\u6C3A\u6C3B\u6C3C\u6C3E\u6C3F\u6C43\u6C44\u6C45\u6C48\u6C4B",4,"\u6C51\u6C52\u6C53\u6C56\u6C58"],["9b40","\u6C59\u6C5A\u6C62\u6C63\u6C65\u6C66\u6C67\u6C6B",4,"\u6C71\u6C73\u6C75\u6C77\u6C78\u6C7A\u6C7B\u6C7C\u6C7F\u6C80\u6C84\u6C87\u6C8A\u6C8B\u6C8D\u6C8E\u6C91\u6C92\u6C95\u6C96\u6C97\u6C98\u6C9A\u6C9C\u6C9D\u6C9E\u6CA0\u6CA2\u6CA8\u6CAC\u6CAF\u6CB0\u6CB4\u6CB5\u6CB6\u6CB7\u6CBA\u6CC0\u6CC1\u6CC2\u6CC3\u6CC6\u6CC7\u6CC8\u6CCB\u6CCD\u6CCE\u6CCF\u6CD1\u6CD2\u6CD8"],["9b80","\u6CD9\u6CDA\u6CDC\u6CDD\u6CDF\u6CE4\u6CE6\u6CE7\u6CE9\u6CEC\u6CED\u6CF2\u6CF4\u6CF9\u6CFF\u6D00\u6D02\u6D03\u6D05\u6D06\u6D08\u6D09\u6D0A\u6D0D\u6D0F\u6D10\u6D11\u6D13\u6D14\u6D15\u6D16\u6D18\u6D1C\u6D1D\u6D1F",5,"\u6D26\u6D28\u6D29\u6D2C\u6D2D\u6D2F\u6D30\u6D34\u6D36\u6D37\u6D38\u6D3A\u6D3F\u6D40\u6D42\u6D44\u6D49\u6D4C\u6D50\u6D55\u6D56\u6D57\u6D58\u6D5B\u6D5D\u6D5F\u6D61\u6D62\u6D64\u6D65\u6D67\u6D68\u6D6B\u6D6C\u6D6D\u6D70\u6D71\u6D72\u6D73\u6D75\u6D76\u6D79\u6D7A\u6D7B\u6D7D",4,"\u6D83\u6D84\u6D86\u6D87\u6D8A\u6D8B\u6D8D\u6D8F\u6D90\u6D92\u6D96",4,"\u6D9C\u6DA2\u6DA5\u6DAC\u6DAD\u6DB0\u6DB1\u6DB3\u6DB4\u6DB6\u6DB7\u6DB9",5,"\u6DC1\u6DC2\u6DC3\u6DC8\u6DC9\u6DCA"],["9c40","\u6DCD\u6DCE\u6DCF\u6DD0\u6DD2\u6DD3\u6DD4\u6DD5\u6DD7\u6DDA\u6DDB\u6DDC\u6DDF\u6DE2\u6DE3\u6DE5\u6DE7\u6DE8\u6DE9\u6DEA\u6DED\u6DEF\u6DF0\u6DF2\u6DF4\u6DF5\u6DF6\u6DF8\u6DFA\u6DFD",7,"\u6E06\u6E07\u6E08\u6E09\u6E0B\u6E0F\u6E12\u6E13\u6E15\u6E18\u6E19\u6E1B\u6E1C\u6E1E\u6E1F\u6E22\u6E26\u6E27\u6E28\u6E2A\u6E2C\u6E2E\u6E30\u6E31\u6E33\u6E35"],["9c80","\u6E36\u6E37\u6E39\u6E3B",7,"\u6E45",7,"\u6E4F\u6E50\u6E51\u6E52\u6E55\u6E57\u6E59\u6E5A\u6E5C\u6E5D\u6E5E\u6E60",10,"\u6E6C\u6E6D\u6E6F",14,"\u6E80\u6E81\u6E82\u6E84\u6E87\u6E88\u6E8A",4,"\u6E91",6,"\u6E99\u6E9A\u6E9B\u6E9D\u6E9E\u6EA0\u6EA1\u6EA3\u6EA4\u6EA6\u6EA8\u6EA9\u6EAB\u6EAC\u6EAD\u6EAE\u6EB0\u6EB3\u6EB5\u6EB8\u6EB9\u6EBC\u6EBE\u6EBF\u6EC0\u6EC3\u6EC4\u6EC5\u6EC6\u6EC8\u6EC9\u6ECA\u6ECC\u6ECD\u6ECE\u6ED0\u6ED2\u6ED6\u6ED8\u6ED9\u6EDB\u6EDC\u6EDD\u6EE3\u6EE7\u6EEA",5],["9d40","\u6EF0\u6EF1\u6EF2\u6EF3\u6EF5\u6EF6\u6EF7\u6EF8\u6EFA",7,"\u6F03\u6F04\u6F05\u6F07\u6F08\u6F0A",4,"\u6F10\u6F11\u6F12\u6F16",9,"\u6F21\u6F22\u6F23\u6F25\u6F26\u6F27\u6F28\u6F2C\u6F2E\u6F30\u6F32\u6F34\u6F35\u6F37",6,"\u6F3F\u6F40\u6F41\u6F42"],["9d80","\u6F43\u6F44\u6F45\u6F48\u6F49\u6F4A\u6F4C\u6F4E",9,"\u6F59\u6F5A\u6F5B\u6F5D\u6F5F\u6F60\u6F61\u6F63\u6F64\u6F65\u6F67",5,"\u6F6F\u6F70\u6F71\u6F73\u6F75\u6F76\u6F77\u6F79\u6F7B\u6F7D",6,"\u6F85\u6F86\u6F87\u6F8A\u6F8B\u6F8F",12,"\u6F9D\u6F9E\u6F9F\u6FA0\u6FA2",4,"\u6FA8",10,"\u6FB4\u6FB5\u6FB7\u6FB8\u6FBA",5,"\u6FC1\u6FC3",5,"\u6FCA",6,"\u6FD3",10,"\u6FDF\u6FE2\u6FE3\u6FE4\u6FE5"],["9e40","\u6FE6",7,"\u6FF0",32,"\u7012",7,"\u701C",6,"\u7024",6],["9e80","\u702B",9,"\u7036\u7037\u7038\u703A",17,"\u704D\u704E\u7050",13,"\u705F",11,"\u706E\u7071\u7072\u7073\u7074\u7077\u7079\u707A\u707B\u707D\u7081\u7082\u7083\u7084\u7086\u7087\u7088\u708B\u708C\u708D\u708F\u7090\u7091\u7093\u7097\u7098\u709A\u709B\u709E",12,"\u70B0\u70B2\u70B4\u70B5\u70B6\u70BA\u70BE\u70BF\u70C4\u70C5\u70C6\u70C7\u70C9\u70CB",12,"\u70DA"],["9f40","\u70DC\u70DD\u70DE\u70E0\u70E1\u70E2\u70E3\u70E5\u70EA\u70EE\u70F0",6,"\u70F8\u70FA\u70FB\u70FC\u70FE",10,"\u710B",4,"\u7111\u7112\u7114\u7117\u711B",10,"\u7127",7,"\u7132\u7133\u7134"],["9f80","\u7135\u7137",13,"\u7146\u7147\u7148\u7149\u714B\u714D\u714F",12,"\u715D\u715F",4,"\u7165\u7169",4,"\u716F\u7170\u7171\u7174\u7175\u7176\u7177\u7179\u717B\u717C\u717E",5,"\u7185",4,"\u718B\u718C\u718D\u718E\u7190\u7191\u7192\u7193\u7195\u7196\u7197\u719A",4,"\u71A1",6,"\u71A9\u71AA\u71AB\u71AD",5,"\u71B4\u71B6\u71B7\u71B8\u71BA",8,"\u71C4",9,"\u71CF",4],["a040","\u71D6",9,"\u71E1\u71E2\u71E3\u71E4\u71E6\u71E8",5,"\u71EF",9,"\u71FA",11,"\u7207",19],["a080","\u721B\u721C\u721E",9,"\u7229\u722B\u722D\u722E\u722F\u7232\u7233\u7234\u723A\u723C\u723E\u7240",6,"\u7249\u724A\u724B\u724E\u724F\u7250\u7251\u7253\u7254\u7255\u7257\u7258\u725A\u725C\u725E\u7260\u7263\u7264\u7265\u7268\u726A\u726B\u726C\u726D\u7270\u7271\u7273\u7274\u7276\u7277\u7278\u727B\u727C\u727D\u7282\u7283\u7285",4,"\u728C\u728E\u7290\u7291\u7293",11,"\u72A0",11,"\u72AE\u72B1\u72B2\u72B3\u72B5\u72BA",6,"\u72C5\u72C6\u72C7\u72C9\u72CA\u72CB\u72CC\u72CF\u72D1\u72D3\u72D4\u72D5\u72D6\u72D8\u72DA\u72DB"],["a1a1","\u3000\u3001\u3002\xB7\u02C9\u02C7\xA8\u3003\u3005\u2014\uFF5E\u2016\u2026\u2018\u2019\u201C\u201D\u3014\u3015\u3008",7,"\u3016\u3017\u3010\u3011\xB1\xD7\xF7\u2236\u2227\u2228\u2211\u220F\u222A\u2229\u2208\u2237\u221A\u22A5\u2225\u2220\u2312\u2299\u222B\u222E\u2261\u224C\u2248\u223D\u221D\u2260\u226E\u226F\u2264\u2265\u221E\u2235\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFF04\xA4\uFFE0\uFFE1\u2030\xA7\u2116\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u203B\u2192\u2190\u2191\u2193\u3013"],["a2a1","\u2170",9],["a2b1","\u2488",19,"\u2474",19,"\u2460",9],["a2e5","\u3220",9],["a2f1","\u2160",11],["a3a1","\uFF01\uFF02\uFF03\uFFE5\uFF05",88,"\uFFE3"],["a4a1","\u3041",82],["a5a1","\u30A1",85],["a6a1","\u0391",16,"\u03A3",6],["a6c1","\u03B1",16,"\u03C3",6],["a6e0","\uFE35\uFE36\uFE39\uFE3A\uFE3F\uFE40\uFE3D\uFE3E\uFE41\uFE42\uFE43\uFE44"],["a6ee","\uFE3B\uFE3C\uFE37\uFE38\uFE31"],["a6f4","\uFE33\uFE34"],["a7a1","\u0410",5,"\u0401\u0416",25],["a7d1","\u0430",5,"\u0451\u0436",25],["a840","\u02CA\u02CB\u02D9\u2013\u2015\u2025\u2035\u2105\u2109\u2196\u2197\u2198\u2199\u2215\u221F\u2223\u2252\u2266\u2267\u22BF\u2550",35,"\u2581",6],["a880","\u2588",7,"\u2593\u2594\u2595\u25BC\u25BD\u25E2\u25E3\u25E4\u25E5\u2609\u2295\u3012\u301D\u301E"],["a8a1","\u0101\xE1\u01CE\xE0\u0113\xE9\u011B\xE8\u012B\xED\u01D0\xEC\u014D\xF3\u01D2\xF2\u016B\xFA\u01D4\xF9\u01D6\u01D8\u01DA\u01DC\xFC\xEA\u0251"],["a8bd","\u0144\u0148"],["a8c0","\u0261"],["a8c5","\u3105",36],["a940","\u3021",8,"\u32A3\u338E\u338F\u339C\u339D\u339E\u33A1\u33C4\u33CE\u33D1\u33D2\u33D5\uFE30\uFFE2\uFFE4"],["a959","\u2121\u3231"],["a95c","\u2010"],["a960","\u30FC\u309B\u309C\u30FD\u30FE\u3006\u309D\u309E\uFE49",9,"\uFE54\uFE55\uFE56\uFE57\uFE59",8],["a980","\uFE62",4,"\uFE68\uFE69\uFE6A\uFE6B"],["a996","\u3007"],["a9a4","\u2500",75],["aa40","\u72DC\u72DD\u72DF\u72E2",5,"\u72EA\u72EB\u72F5\u72F6\u72F9\u72FD\u72FE\u72FF\u7300\u7302\u7304",5,"\u730B\u730C\u730D\u730F\u7310\u7311\u7312\u7314\u7318\u7319\u731A\u731F\u7320\u7323\u7324\u7326\u7327\u7328\u732D\u732F\u7330\u7332\u7333\u7335\u7336\u733A\u733B\u733C\u733D\u7340",8],["aa80","\u7349\u734A\u734B\u734C\u734E\u734F\u7351\u7353\u7354\u7355\u7356\u7358",7,"\u7361",10,"\u736E\u7370\u7371"],["ab40","\u7372",11,"\u737F",4,"\u7385\u7386\u7388\u738A\u738C\u738D\u738F\u7390\u7392\u7393\u7394\u7395\u7397\u7398\u7399\u739A\u739C\u739D\u739E\u73A0\u73A1\u73A3",5,"\u73AA\u73AC\u73AD\u73B1\u73B4\u73B5\u73B6\u73B8\u73B9\u73BC\u73BD\u73BE\u73BF\u73C1\u73C3",4],["ab80","\u73CB\u73CC\u73CE\u73D2",6,"\u73DA\u73DB\u73DC\u73DD\u73DF\u73E1\u73E2\u73E3\u73E4\u73E6\u73E8\u73EA\u73EB\u73EC\u73EE\u73EF\u73F0\u73F1\u73F3",4],["ac40","\u73F8",10,"\u7404\u7407\u7408\u740B\u740C\u740D\u740E\u7411",8,"\u741C",5,"\u7423\u7424\u7427\u7429\u742B\u742D\u742F\u7431\u7432\u7437",4,"\u743D\u743E\u743F\u7440\u7442",11],["ac80","\u744E",6,"\u7456\u7458\u745D\u7460",12,"\u746E\u746F\u7471",4,"\u7478\u7479\u747A"],["ad40","\u747B\u747C\u747D\u747F\u7482\u7484\u7485\u7486\u7488\u7489\u748A\u748C\u748D\u748F\u7491",10,"\u749D\u749F",7,"\u74AA",15,"\u74BB",12],["ad80","\u74C8",9,"\u74D3",8,"\u74DD\u74DF\u74E1\u74E5\u74E7",6,"\u74F0\u74F1\u74F2"],["ae40","\u74F3\u74F5\u74F8",6,"\u7500\u7501\u7502\u7503\u7505",7,"\u750E\u7510\u7512\u7514\u7515\u7516\u7517\u751B\u751D\u751E\u7520",4,"\u7526\u7527\u752A\u752E\u7534\u7536\u7539\u753C\u753D\u753F\u7541\u7542\u7543\u7544\u7546\u7547\u7549\u754A\u754D\u7550\u7551\u7552\u7553\u7555\u7556\u7557\u7558"],["ae80","\u755D",7,"\u7567\u7568\u7569\u756B",6,"\u7573\u7575\u7576\u7577\u757A",4,"\u7580\u7581\u7582\u7584\u7585\u7587"],["af40","\u7588\u7589\u758A\u758C\u758D\u758E\u7590\u7593\u7595\u7598\u759B\u759C\u759E\u75A2\u75A6",4,"\u75AD\u75B6\u75B7\u75BA\u75BB\u75BF\u75C0\u75C1\u75C6\u75CB\u75CC\u75CE\u75CF\u75D0\u75D1\u75D3\u75D7\u75D9\u75DA\u75DC\u75DD\u75DF\u75E0\u75E1\u75E5\u75E9\u75EC\u75ED\u75EE\u75EF\u75F2\u75F3\u75F5\u75F6\u75F7\u75F8\u75FA\u75FB\u75FD\u75FE\u7602\u7604\u7606\u7607"],["af80","\u7608\u7609\u760B\u760D\u760E\u760F\u7611\u7612\u7613\u7614\u7616\u761A\u761C\u761D\u761E\u7621\u7623\u7627\u7628\u762C\u762E\u762F\u7631\u7632\u7636\u7637\u7639\u763A\u763B\u763D\u7641\u7642\u7644"],["b040","\u7645",6,"\u764E",5,"\u7655\u7657",4,"\u765D\u765F\u7660\u7661\u7662\u7664",6,"\u766C\u766D\u766E\u7670",7,"\u7679\u767A\u767C\u767F\u7680\u7681\u7683\u7685\u7689\u768A\u768C\u768D\u768F\u7690\u7692\u7694\u7695\u7697\u7698\u769A\u769B"],["b080","\u769C",7,"\u76A5",8,"\u76AF\u76B0\u76B3\u76B5",9,"\u76C0\u76C1\u76C3\u554A\u963F\u57C3\u6328\u54CE\u5509\u54C0\u7691\u764C\u853C\u77EE\u827E\u788D\u7231\u9698\u978D\u6C28\u5B89\u4FFA\u6309\u6697\u5CB8\u80FA\u6848\u80AE\u6602\u76CE\u51F9\u6556\u71AC\u7FF1\u8884\u50B2\u5965\u61CA\u6FB3\u82AD\u634C\u6252\u53ED\u5427\u7B06\u516B\u75A4\u5DF4\u62D4\u8DCB\u9776\u628A\u8019\u575D\u9738\u7F62\u7238\u767D\u67CF\u767E\u6446\u4F70\u8D25\u62DC\u7A17\u6591\u73ED\u642C\u6273\u822C\u9881\u677F\u7248\u626E\u62CC\u4F34\u74E3\u534A\u529E\u7ECA\u90A6\u5E2E\u6886\u699C\u8180\u7ED1\u68D2\u78C5\u868C\u9551\u508D\u8C24\u82DE\u80DE\u5305\u8912\u5265"],["b140","\u76C4\u76C7\u76C9\u76CB\u76CC\u76D3\u76D5\u76D9\u76DA\u76DC\u76DD\u76DE\u76E0",4,"\u76E6",7,"\u76F0\u76F3\u76F5\u76F6\u76F7\u76FA\u76FB\u76FD\u76FF\u7700\u7702\u7703\u7705\u7706\u770A\u770C\u770E",10,"\u771B\u771C\u771D\u771E\u7721\u7723\u7724\u7725\u7727\u772A\u772B"],["b180","\u772C\u772E\u7730",4,"\u7739\u773B\u773D\u773E\u773F\u7742\u7744\u7745\u7746\u7748",7,"\u7752",7,"\u775C\u8584\u96F9\u4FDD\u5821\u9971\u5B9D\u62B1\u62A5\u66B4\u8C79\u9C8D\u7206\u676F\u7891\u60B2\u5351\u5317\u8F88\u80CC\u8D1D\u94A1\u500D\u72C8\u5907\u60EB\u7119\u88AB\u5954\u82EF\u672C\u7B28\u5D29\u7EF7\u752D\u6CF5\u8E66\u8FF8\u903C\u9F3B\u6BD4\u9119\u7B14\u5F7C\u78A7\u84D6\u853D\u6BD5\u6BD9\u6BD6\u5E01\u5E87\u75F9\u95ED\u655D\u5F0A\u5FC5\u8F9F\u58C1\u81C2\u907F\u965B\u97AD\u8FB9\u7F16\u8D2C\u6241\u4FBF\u53D8\u535E\u8FA8\u8FA9\u8FAB\u904D\u6807\u5F6A\u8198\u8868\u9CD6\u618B\u522B\u762A\u5F6C\u658C\u6FD2\u6EE8\u5BBE\u6448\u5175\u51B0\u67C4\u4E19\u79C9\u997C\u70B3"],["b240","\u775D\u775E\u775F\u7760\u7764\u7767\u7769\u776A\u776D",11,"\u777A\u777B\u777C\u7781\u7782\u7783\u7786",5,"\u778F\u7790\u7793",11,"\u77A1\u77A3\u77A4\u77A6\u77A8\u77AB\u77AD\u77AE\u77AF\u77B1\u77B2\u77B4\u77B6",4],["b280","\u77BC\u77BE\u77C0",12,"\u77CE",8,"\u77D8\u77D9\u77DA\u77DD",4,"\u77E4\u75C5\u5E76\u73BB\u83E0\u64AD\u62E8\u94B5\u6CE2\u535A\u52C3\u640F\u94C2\u7B94\u4F2F\u5E1B\u8236\u8116\u818A\u6E24\u6CCA\u9A73\u6355\u535C\u54FA\u8865\u57E0\u4E0D\u5E03\u6B65\u7C3F\u90E8\u6016\u64E6\u731C\u88C1\u6750\u624D\u8D22\u776C\u8E29\u91C7\u5F69\u83DC\u8521\u9910\u53C2\u8695\u6B8B\u60ED\u60E8\u707F\u82CD\u8231\u4ED3\u6CA7\u85CF\u64CD\u7CD9\u69FD\u66F9\u8349\u5395\u7B56\u4FA7\u518C\u6D4B\u5C42\u8E6D\u63D2\u53C9\u832C\u8336\u67E5\u78B4\u643D\u5BDF\u5C94\u5DEE\u8BE7\u62C6\u67F4\u8C7A\u6400\u63BA\u8749\u998B\u8C17\u7F20\u94F2\u4EA7\u9610\u98A4\u660C\u7316"],["b340","\u77E6\u77E8\u77EA\u77EF\u77F0\u77F1\u77F2\u77F4\u77F5\u77F7\u77F9\u77FA\u77FB\u77FC\u7803",5,"\u780A\u780B\u780E\u780F\u7810\u7813\u7815\u7819\u781B\u781E\u7820\u7821\u7822\u7824\u7828\u782A\u782B\u782E\u782F\u7831\u7832\u7833\u7835\u7836\u783D\u783F\u7841\u7842\u7843\u7844\u7846\u7848\u7849\u784A\u784B\u784D\u784F\u7851\u7853\u7854\u7858\u7859\u785A"],["b380","\u785B\u785C\u785E",11,"\u786F",7,"\u7878\u7879\u787A\u787B\u787D",6,"\u573A\u5C1D\u5E38\u957F\u507F\u80A0\u5382\u655E\u7545\u5531\u5021\u8D85\u6284\u949E\u671D\u5632\u6F6E\u5DE2\u5435\u7092\u8F66\u626F\u64A4\u63A3\u5F7B\u6F88\u90F4\u81E3\u8FB0\u5C18\u6668\u5FF1\u6C89\u9648\u8D81\u886C\u6491\u79F0\u57CE\u6A59\u6210\u5448\u4E58\u7A0B\u60E9\u6F84\u8BDA\u627F\u901E\u9A8B\u79E4\u5403\u75F4\u6301\u5319\u6C60\u8FDF\u5F1B\u9A70\u803B\u9F7F\u4F88\u5C3A\u8D64\u7FC5\u65A5\u70BD\u5145\u51B2\u866B\u5D07\u5BA0\u62BD\u916C\u7574\u8E0C\u7A20\u6101\u7B79\u4EC7\u7EF8\u7785\u4E11\u81ED\u521D\u51FA\u6A71\u53A8\u8E87\u9504\u96CF\u6EC1\u9664\u695A"],["b440","\u7884\u7885\u7886\u7888\u788A\u788B\u788F\u7890\u7892\u7894\u7895\u7896\u7899\u789D\u789E\u78A0\u78A2\u78A4\u78A6\u78A8",7,"\u78B5\u78B6\u78B7\u78B8\u78BA\u78BB\u78BC\u78BD\u78BF\u78C0\u78C2\u78C3\u78C4\u78C6\u78C7\u78C8\u78CC\u78CD\u78CE\u78CF\u78D1\u78D2\u78D3\u78D6\u78D7\u78D8\u78DA",9],["b480","\u78E4\u78E5\u78E6\u78E7\u78E9\u78EA\u78EB\u78ED",4,"\u78F3\u78F5\u78F6\u78F8\u78F9\u78FB",5,"\u7902\u7903\u7904\u7906",6,"\u7840\u50A8\u77D7\u6410\u89E6\u5904\u63E3\u5DDD\u7A7F\u693D\u4F20\u8239\u5598\u4E32\u75AE\u7A97\u5E62\u5E8A\u95EF\u521B\u5439\u708A\u6376\u9524\u5782\u6625\u693F\u9187\u5507\u6DF3\u7EAF\u8822\u6233\u7EF0\u75B5\u8328\u78C1\u96CC\u8F9E\u6148\u74F7\u8BCD\u6B64\u523A\u8D50\u6B21\u806A\u8471\u56F1\u5306\u4ECE\u4E1B\u51D1\u7C97\u918B\u7C07\u4FC3\u8E7F\u7BE1\u7A9C\u6467\u5D14\u50AC\u8106\u7601\u7CB9\u6DEC\u7FE0\u6751\u5B58\u5BF8\u78CB\u64AE\u6413\u63AA\u632B\u9519\u642D\u8FBE\u7B54\u7629\u6253\u5927\u5446\u6B79\u50A3\u6234\u5E26\u6B86\u4EE3\u8D37\u888B\u5F85\u902E"],["b540","\u790D",5,"\u7914",9,"\u791F",4,"\u7925",14,"\u7935",4,"\u793D\u793F\u7942\u7943\u7944\u7945\u7947\u794A",8,"\u7954\u7955\u7958\u7959\u7961\u7963"],["b580","\u7964\u7966\u7969\u796A\u796B\u796C\u796E\u7970",6,"\u7979\u797B",4,"\u7982\u7983\u7986\u7987\u7988\u7989\u798B\u798C\u798D\u798E\u7990\u7991\u7992\u6020\u803D\u62C5\u4E39\u5355\u90F8\u63B8\u80C6\u65E6\u6C2E\u4F46\u60EE\u6DE1\u8BDE\u5F39\u86CB\u5F53\u6321\u515A\u8361\u6863\u5200\u6363\u8E48\u5012\u5C9B\u7977\u5BFC\u5230\u7A3B\u60BC\u9053\u76D7\u5FB7\u5F97\u7684\u8E6C\u706F\u767B\u7B49\u77AA\u51F3\u9093\u5824\u4F4E\u6EF4\u8FEA\u654C\u7B1B\u72C4\u6DA4\u7FDF\u5AE1\u62B5\u5E95\u5730\u8482\u7B2C\u5E1D\u5F1F\u9012\u7F14\u98A0\u6382\u6EC7\u7898\u70B9\u5178\u975B\u57AB\u7535\u4F43\u7538\u5E97\u60E6\u5960\u6DC0\u6BBF\u7889\u53FC\u96D5\u51CB\u5201\u6389\u540A\u9493\u8C03\u8DCC\u7239\u789F\u8776\u8FED\u8C0D\u53E0"],["b640","\u7993",6,"\u799B",11,"\u79A8",10,"\u79B4",4,"\u79BC\u79BF\u79C2\u79C4\u79C5\u79C7\u79C8\u79CA\u79CC\u79CE\u79CF\u79D0\u79D3\u79D4\u79D6\u79D7\u79D9",5,"\u79E0\u79E1\u79E2\u79E5\u79E8\u79EA"],["b680","\u79EC\u79EE\u79F1",6,"\u79F9\u79FA\u79FC\u79FE\u79FF\u7A01\u7A04\u7A05\u7A07\u7A08\u7A09\u7A0A\u7A0C\u7A0F",4,"\u7A15\u7A16\u7A18\u7A19\u7A1B\u7A1C\u4E01\u76EF\u53EE\u9489\u9876\u9F0E\u952D\u5B9A\u8BA2\u4E22\u4E1C\u51AC\u8463\u61C2\u52A8\u680B\u4F97\u606B\u51BB\u6D1E\u515C\u6296\u6597\u9661\u8C46\u9017\u75D8\u90FD\u7763\u6BD2\u728A\u72EC\u8BFB\u5835\u7779\u8D4C\u675C\u9540\u809A\u5EA6\u6E21\u5992\u7AEF\u77ED\u953B\u6BB5\u65AD\u7F0E\u5806\u5151\u961F\u5BF9\u58A9\u5428\u8E72\u6566\u987F\u56E4\u949D\u76FE\u9041\u6387\u54C6\u591A\u593A\u579B\u8EB2\u6735\u8DFA\u8235\u5241\u60F0\u5815\u86FE\u5CE8\u9E45\u4FC4\u989D\u8BB9\u5A25\u6076\u5384\u627C\u904F\u9102\u997F\u6069\u800C\u513F\u8033\u5C14\u9975\u6D31\u4E8C"],["b740","\u7A1D\u7A1F\u7A21\u7A22\u7A24",14,"\u7A34\u7A35\u7A36\u7A38\u7A3A\u7A3E\u7A40",5,"\u7A47",9,"\u7A52",4,"\u7A58",16],["b780","\u7A69",6,"\u7A71\u7A72\u7A73\u7A75\u7A7B\u7A7C\u7A7D\u7A7E\u7A82\u7A85\u7A87\u7A89\u7A8A\u7A8B\u7A8C\u7A8E\u7A8F\u7A90\u7A93\u7A94\u7A99\u7A9A\u7A9B\u7A9E\u7AA1\u7AA2\u8D30\u53D1\u7F5A\u7B4F\u4F10\u4E4F\u9600\u6CD5\u73D0\u85E9\u5E06\u756A\u7FFB\u6A0A\u77FE\u9492\u7E41\u51E1\u70E6\u53CD\u8FD4\u8303\u8D29\u72AF\u996D\u6CDB\u574A\u82B3\u65B9\u80AA\u623F\u9632\u59A8\u4EFF\u8BBF\u7EBA\u653E\u83F2\u975E\u5561\u98DE\u80A5\u532A\u8BFD\u5420\u80BA\u5E9F\u6CB8\u8D39\u82AC\u915A\u5429\u6C1B\u5206\u7EB7\u575F\u711A\u6C7E\u7C89\u594B\u4EFD\u5FFF\u6124\u7CAA\u4E30\u5C01\u67AB\u8702\u5CF0\u950B\u98CE\u75AF\u70FD\u9022\u51AF\u7F1D\u8BBD\u5949\u51E4\u4F5B\u5426\u592B\u6577\u80A4\u5B75\u6276\u62C2\u8F90\u5E45\u6C1F\u7B26\u4F0F\u4FD8\u670D"],["b840","\u7AA3\u7AA4\u7AA7\u7AA9\u7AAA\u7AAB\u7AAE",4,"\u7AB4",10,"\u7AC0",10,"\u7ACC",9,"\u7AD7\u7AD8\u7ADA\u7ADB\u7ADC\u7ADD\u7AE1\u7AE2\u7AE4\u7AE7",5,"\u7AEE\u7AF0\u7AF1\u7AF2\u7AF3"],["b880","\u7AF4",4,"\u7AFB\u7AFC\u7AFE\u7B00\u7B01\u7B02\u7B05\u7B07\u7B09\u7B0C\u7B0D\u7B0E\u7B10\u7B12\u7B13\u7B16\u7B17\u7B18\u7B1A\u7B1C\u7B1D\u7B1F\u7B21\u7B22\u7B23\u7B27\u7B29\u7B2D\u6D6E\u6DAA\u798F\u88B1\u5F17\u752B\u629A\u8F85\u4FEF\u91DC\u65A7\u812F\u8151\u5E9C\u8150\u8D74\u526F\u8986\u8D4B\u590D\u5085\u4ED8\u961C\u7236\u8179\u8D1F\u5BCC\u8BA3\u9644\u5987\u7F1A\u5490\u5676\u560E\u8BE5\u6539\u6982\u9499\u76D6\u6E89\u5E72\u7518\u6746\u67D1\u7AFF\u809D\u8D76\u611F\u79C6\u6562\u8D63\u5188\u521A\u94A2\u7F38\u809B\u7EB2\u5C97\u6E2F\u6760\u7BD9\u768B\u9AD8\u818F\u7F94\u7CD5\u641E\u9550\u7A3F\u544A\u54E5\u6B4C\u6401\u6208\u9E3D\u80F3\u7599\u5272\u9769\u845B\u683C\u86E4\u9601\u9694\u94EC\u4E2A\u5404\u7ED9\u6839\u8DDF\u8015\u66F4\u5E9A\u7FB9"],["b940","\u7B2F\u7B30\u7B32\u7B34\u7B35\u7B36\u7B37\u7B39\u7B3B\u7B3D\u7B3F",5,"\u7B46\u7B48\u7B4A\u7B4D\u7B4E\u7B53\u7B55\u7B57\u7B59\u7B5C\u7B5E\u7B5F\u7B61\u7B63",10,"\u7B6F\u7B70\u7B73\u7B74\u7B76\u7B78\u7B7A\u7B7C\u7B7D\u7B7F\u7B81\u7B82\u7B83\u7B84\u7B86",6,"\u7B8E\u7B8F"],["b980","\u7B91\u7B92\u7B93\u7B96\u7B98\u7B99\u7B9A\u7B9B\u7B9E\u7B9F\u7BA0\u7BA3\u7BA4\u7BA5\u7BAE\u7BAF\u7BB0\u7BB2\u7BB3\u7BB5\u7BB6\u7BB7\u7BB9",7,"\u7BC2\u7BC3\u7BC4\u57C2\u803F\u6897\u5DE5\u653B\u529F\u606D\u9F9A\u4F9B\u8EAC\u516C\u5BAB\u5F13\u5DE9\u6C5E\u62F1\u8D21\u5171\u94A9\u52FE\u6C9F\u82DF\u72D7\u57A2\u6784\u8D2D\u591F\u8F9C\u83C7\u5495\u7B8D\u4F30\u6CBD\u5B64\u59D1\u9F13\u53E4\u86CA\u9AA8\u8C37\u80A1\u6545\u987E\u56FA\u96C7\u522E\u74DC\u5250\u5BE1\u6302\u8902\u4E56\u62D0\u602A\u68FA\u5173\u5B98\u51A0\u89C2\u7BA1\u9986\u7F50\u60EF\u704C\u8D2F\u5149\u5E7F\u901B\u7470\u89C4\u572D\u7845\u5F52\u9F9F\u95FA\u8F68\u9B3C\u8BE1\u7678\u6842\u67DC\u8DEA\u8D35\u523D\u8F8A\u6EDA\u68CD\u9505\u90ED\u56FD\u679C\u88F9\u8FC7\u54C8"],["ba40","\u7BC5\u7BC8\u7BC9\u7BCA\u7BCB\u7BCD\u7BCE\u7BCF\u7BD0\u7BD2\u7BD4",4,"\u7BDB\u7BDC\u7BDE\u7BDF\u7BE0\u7BE2\u7BE3\u7BE4\u7BE7\u7BE8\u7BE9\u7BEB\u7BEC\u7BED\u7BEF\u7BF0\u7BF2",4,"\u7BF8\u7BF9\u7BFA\u7BFB\u7BFD\u7BFF",7,"\u7C08\u7C09\u7C0A\u7C0D\u7C0E\u7C10",5,"\u7C17\u7C18\u7C19"],["ba80","\u7C1A",4,"\u7C20",5,"\u7C28\u7C29\u7C2B",12,"\u7C39",5,"\u7C42\u9AB8\u5B69\u6D77\u6C26\u4EA5\u5BB3\u9A87\u9163\u61A8\u90AF\u97E9\u542B\u6DB5\u5BD2\u51FD\u558A\u7F55\u7FF0\u64BC\u634D\u65F1\u61BE\u608D\u710A\u6C57\u6C49\u592F\u676D\u822A\u58D5\u568E\u8C6A\u6BEB\u90DD\u597D\u8017\u53F7\u6D69\u5475\u559D\u8377\u83CF\u6838\u79BE\u548C\u4F55\u5408\u76D2\u8C89\u9602\u6CB3\u6DB8\u8D6B\u8910\u9E64\u8D3A\u563F\u9ED1\u75D5\u5F88\u72E0\u6068\u54FC\u4EA8\u6A2A\u8861\u6052\u8F70\u54C4\u70D8\u8679\u9E3F\u6D2A\u5B8F\u5F18\u7EA2\u5589\u4FAF\u7334\u543C\u539A\u5019\u540E\u547C\u4E4E\u5FFD\u745A\u58F6\u846B\u80E1\u8774\u72D0\u7CCA\u6E56"],["bb40","\u7C43",9,"\u7C4E",36,"\u7C75",5,"\u7C7E",9],["bb80","\u7C88\u7C8A",6,"\u7C93\u7C94\u7C96\u7C99\u7C9A\u7C9B\u7CA0\u7CA1\u7CA3\u7CA6\u7CA7\u7CA8\u7CA9\u7CAB\u7CAC\u7CAD\u7CAF\u7CB0\u7CB4",4,"\u7CBA\u7CBB\u5F27\u864E\u552C\u62A4\u4E92\u6CAA\u6237\u82B1\u54D7\u534E\u733E\u6ED1\u753B\u5212\u5316\u8BDD\u69D0\u5F8A\u6000\u6DEE\u574F\u6B22\u73AF\u6853\u8FD8\u7F13\u6362\u60A3\u5524\u75EA\u8C62\u7115\u6DA3\u5BA6\u5E7B\u8352\u614C\u9EC4\u78FA\u8757\u7C27\u7687\u51F0\u60F6\u714C\u6643\u5E4C\u604D\u8C0E\u7070\u6325\u8F89\u5FBD\u6062\u86D4\u56DE\u6BC1\u6094\u6167\u5349\u60E0\u6666\u8D3F\u79FD\u4F1A\u70E9\u6C47\u8BB3\u8BF2\u7ED8\u8364\u660F\u5A5A\u9B42\u6D51\u6DF7\u8C41\u6D3B\u4F19\u706B\u83B7\u6216\u60D1\u970D\u8D27\u7978\u51FB\u573E\u57FA\u673A\u7578\u7A3D\u79EF\u7B95"],["bc40","\u7CBF\u7CC0\u7CC2\u7CC3\u7CC4\u7CC6\u7CC9\u7CCB\u7CCE",6,"\u7CD8\u7CDA\u7CDB\u7CDD\u7CDE\u7CE1",6,"\u7CE9",5,"\u7CF0",7,"\u7CF9\u7CFA\u7CFC",13,"\u7D0B",5],["bc80","\u7D11",14,"\u7D21\u7D23\u7D24\u7D25\u7D26\u7D28\u7D29\u7D2A\u7D2C\u7D2D\u7D2E\u7D30",6,"\u808C\u9965\u8FF9\u6FC0\u8BA5\u9E21\u59EC\u7EE9\u7F09\u5409\u6781\u68D8\u8F91\u7C4D\u96C6\u53CA\u6025\u75BE\u6C72\u5373\u5AC9\u7EA7\u6324\u51E0\u810A\u5DF1\u84DF\u6280\u5180\u5B63\u4F0E\u796D\u5242\u60B8\u6D4E\u5BC4\u5BC2\u8BA1\u8BB0\u65E2\u5FCC\u9645\u5993\u7EE7\u7EAA\u5609\u67B7\u5939\u4F73\u5BB6\u52A0\u835A\u988A\u8D3E\u7532\u94BE\u5047\u7A3C\u4EF7\u67B6\u9A7E\u5AC1\u6B7C\u76D1\u575A\u5C16\u7B3A\u95F4\u714E\u517C\u80A9\u8270\u5978\u7F04\u8327\u68C0\u67EC\u78B1\u7877\u62E3\u6361\u7B80\u4FED\u526A\u51CF\u8350\u69DB\u9274\u8DF5\u8D31\u89C1\u952E\u7BAD\u4EF6"],["bd40","\u7D37",54,"\u7D6F",7],["bd80","\u7D78",32,"\u5065\u8230\u5251\u996F\u6E10\u6E85\u6DA7\u5EFA\u50F5\u59DC\u5C06\u6D46\u6C5F\u7586\u848B\u6868\u5956\u8BB2\u5320\u9171\u964D\u8549\u6912\u7901\u7126\u80F6\u4EA4\u90CA\u6D47\u9A84\u5A07\u56BC\u6405\u94F0\u77EB\u4FA5\u811A\u72E1\u89D2\u997A\u7F34\u7EDE\u527F\u6559\u9175\u8F7F\u8F83\u53EB\u7A96\u63ED\u63A5\u7686\u79F8\u8857\u9636\u622A\u52AB\u8282\u6854\u6770\u6377\u776B\u7AED\u6D01\u7ED3\u89E3\u59D0\u6212\u85C9\u82A5\u754C\u501F\u4ECB\u75A5\u8BEB\u5C4A\u5DFE\u7B4B\u65A4\u91D1\u4ECA\u6D25\u895F\u7D27\u9526\u4EC5\u8C28\u8FDB\u9773\u664B\u7981\u8FD1\u70EC\u6D78"],["be40","\u7D99",12,"\u7DA7",6,"\u7DAF",42],["be80","\u7DDA",32,"\u5C3D\u52B2\u8346\u5162\u830E\u775B\u6676\u9CB8\u4EAC\u60CA\u7CBE\u7CB3\u7ECF\u4E95\u8B66\u666F\u9888\u9759\u5883\u656C\u955C\u5F84\u75C9\u9756\u7ADF\u7ADE\u51C0\u70AF\u7A98\u63EA\u7A76\u7EA0\u7396\u97ED\u4E45\u7078\u4E5D\u9152\u53A9\u6551\u65E7\u81FC\u8205\u548E\u5C31\u759A\u97A0\u62D8\u72D9\u75BD\u5C45\u9A79\u83CA\u5C40\u5480\u77E9\u4E3E\u6CAE\u805A\u62D2\u636E\u5DE8\u5177\u8DDD\u8E1E\u952F\u4FF1\u53E5\u60E7\u70AC\u5267\u6350\u9E43\u5A1F\u5026\u7737\u5377\u7EE2\u6485\u652B\u6289\u6398\u5014\u7235\u89C9\u51B3\u8BC0\u7EDD\u5747\u83CC\u94A7\u519B\u541B\u5CFB"],["bf40","\u7DFB",62],["bf80","\u7E3A\u7E3C",4,"\u7E42",4,"\u7E48",21,"\u4FCA\u7AE3\u6D5A\u90E1\u9A8F\u5580\u5496\u5361\u54AF\u5F00\u63E9\u6977\u51EF\u6168\u520A\u582A\u52D8\u574E\u780D\u770B\u5EB7\u6177\u7CE0\u625B\u6297\u4EA2\u7095\u8003\u62F7\u70E4\u9760\u5777\u82DB\u67EF\u68F5\u78D5\u9897\u79D1\u58F3\u54B3\u53EF\u6E34\u514B\u523B\u5BA2\u8BFE\u80AF\u5543\u57A6\u6073\u5751\u542D\u7A7A\u6050\u5B54\u63A7\u62A0\u53E3\u6263\u5BC7\u67AF\u54ED\u7A9F\u82E6\u9177\u5E93\u88E4\u5938\u57AE\u630E\u8DE8\u80EF\u5757\u7B77\u4FA9\u5FEB\u5BBD\u6B3E\u5321\u7B50\u72C2\u6846\u77FF\u7736\u65F7\u51B5\u4E8F\u76D4\u5CBF\u7AA5\u8475\u594E\u9B41\u5080"],["c040","\u7E5E",35,"\u7E83",23,"\u7E9C\u7E9D\u7E9E"],["c080","\u7EAE\u7EB4\u7EBB\u7EBC\u7ED6\u7EE4\u7EEC\u7EF9\u7F0A\u7F10\u7F1E\u7F37\u7F39\u7F3B",6,"\u7F43\u7F46",9,"\u7F52\u7F53\u9988\u6127\u6E83\u5764\u6606\u6346\u56F0\u62EC\u6269\u5ED3\u9614\u5783\u62C9\u5587\u8721\u814A\u8FA3\u5566\u83B1\u6765\u8D56\u84DD\u5A6A\u680F\u62E6\u7BEE\u9611\u5170\u6F9C\u8C30\u63FD\u89C8\u61D2\u7F06\u70C2\u6EE5\u7405\u6994\u72FC\u5ECA\u90CE\u6717\u6D6A\u635E\u52B3\u7262\u8001\u4F6C\u59E5\u916A\u70D9\u6D9D\u52D2\u4E50\u96F7\u956D\u857E\u78CA\u7D2F\u5121\u5792\u64C2\u808B\u7C7B\u6CEA\u68F1\u695E\u51B7\u5398\u68A8\u7281\u9ECE\u7BF1\u72F8\u79BB\u6F13\u7406\u674E\u91CC\u9CA4\u793C\u8389\u8354\u540F\u6817\u4E3D\u5389\u52B1\u783E\u5386\u5229\u5088\u4F8B\u4FD0"],["c140","\u7F56\u7F59\u7F5B\u7F5C\u7F5D\u7F5E\u7F60\u7F63",4,"\u7F6B\u7F6C\u7F6D\u7F6F\u7F70\u7F73\u7F75\u7F76\u7F77\u7F78\u7F7A\u7F7B\u7F7C\u7F7D\u7F7F\u7F80\u7F82",7,"\u7F8B\u7F8D\u7F8F",4,"\u7F95",4,"\u7F9B\u7F9C\u7FA0\u7FA2\u7FA3\u7FA5\u7FA6\u7FA8",6,"\u7FB1"],["c180","\u7FB3",4,"\u7FBA\u7FBB\u7FBE\u7FC0\u7FC2\u7FC3\u7FC4\u7FC6\u7FC7\u7FC8\u7FC9\u7FCB\u7FCD\u7FCF",4,"\u7FD6\u7FD7\u7FD9",5,"\u7FE2\u7FE3\u75E2\u7ACB\u7C92\u6CA5\u96B6\u529B\u7483\u54E9\u4FE9\u8054\u83B2\u8FDE\u9570\u5EC9\u601C\u6D9F\u5E18\u655B\u8138\u94FE\u604B\u70BC\u7EC3\u7CAE\u51C9\u6881\u7CB1\u826F\u4E24\u8F86\u91CF\u667E\u4EAE\u8C05\u64A9\u804A\u50DA\u7597\u71CE\u5BE5\u8FBD\u6F66\u4E86\u6482\u9563\u5ED6\u6599\u5217\u88C2\u70C8\u52A3\u730E\u7433\u6797\u78F7\u9716\u4E34\u90BB\u9CDE\u6DCB\u51DB\u8D41\u541D\u62CE\u73B2\u83F1\u96F6\u9F84\u94C3\u4F36\u7F9A\u51CC\u7075\u9675\u5CAD\u9886\u53E6\u4EE4\u6E9C\u7409\u69B4\u786B\u998F\u7559\u5218\u7624\u6D41\u67F3\u516D\u9F99\u804B\u5499\u7B3C\u7ABF"],["c240","\u7FE4\u7FE7\u7FE8\u7FEA\u7FEB\u7FEC\u7FED\u7FEF\u7FF2\u7FF4",6,"\u7FFD\u7FFE\u7FFF\u8002\u8007\u8008\u8009\u800A\u800E\u800F\u8011\u8013\u801A\u801B\u801D\u801E\u801F\u8021\u8023\u8024\u802B",5,"\u8032\u8034\u8039\u803A\u803C\u803E\u8040\u8041\u8044\u8045\u8047\u8048\u8049\u804E\u804F\u8050\u8051\u8053\u8055\u8056\u8057"],["c280","\u8059\u805B",13,"\u806B",5,"\u8072",11,"\u9686\u5784\u62E2\u9647\u697C\u5A04\u6402\u7BD3\u6F0F\u964B\u82A6\u5362\u9885\u5E90\u7089\u63B3\u5364\u864F\u9C81\u9E93\u788C\u9732\u8DEF\u8D42\u9E7F\u6F5E\u7984\u5F55\u9646\u622E\u9A74\u5415\u94DD\u4FA3\u65C5\u5C65\u5C61\u7F15\u8651\u6C2F\u5F8B\u7387\u6EE4\u7EFF\u5CE6\u631B\u5B6A\u6EE6\u5375\u4E71\u63A0\u7565\u62A1\u8F6E\u4F26\u4ED1\u6CA6\u7EB6\u8BBA\u841D\u87BA\u7F57\u903B\u9523\u7BA9\u9AA1\u88F8\u843D\u6D1B\u9A86\u7EDC\u5988\u9EBB\u739B\u7801\u8682\u9A6C\u9A82\u561B\u5417\u57CB\u4E70\u9EA6\u5356\u8FC8\u8109\u7792\u9992\u86EE\u6EE1\u8513\u66FC\u6162\u6F2B"],["c340","\u807E\u8081\u8082\u8085\u8088\u808A\u808D",5,"\u8094\u8095\u8097\u8099\u809E\u80A3\u80A6\u80A7\u80A8\u80AC\u80B0\u80B3\u80B5\u80B6\u80B8\u80B9\u80BB\u80C5\u80C7",4,"\u80CF",6,"\u80D8\u80DF\u80E0\u80E2\u80E3\u80E6\u80EE\u80F5\u80F7\u80F9\u80FB\u80FE\u80FF\u8100\u8101\u8103\u8104\u8105\u8107\u8108\u810B"],["c380","\u810C\u8115\u8117\u8119\u811B\u811C\u811D\u811F",12,"\u812D\u812E\u8130\u8133\u8134\u8135\u8137\u8139",4,"\u813F\u8C29\u8292\u832B\u76F2\u6C13\u5FD9\u83BD\u732B\u8305\u951A\u6BDB\u77DB\u94C6\u536F\u8302\u5192\u5E3D\u8C8C\u8D38\u4E48\u73AB\u679A\u6885\u9176\u9709\u7164\u6CA1\u7709\u5A92\u9541\u6BCF\u7F8E\u6627\u5BD0\u59B9\u5A9A\u95E8\u95F7\u4EEC\u840C\u8499\u6AAC\u76DF\u9530\u731B\u68A6\u5B5F\u772F\u919A\u9761\u7CDC\u8FF7\u8C1C\u5F25\u7C73\u79D8\u89C5\u6CCC\u871C\u5BC6\u5E42\u68C9\u7720\u7EF5\u5195\u514D\u52C9\u5A29\u7F05\u9762\u82D7\u63CF\u7784\u85D0\u79D2\u6E3A\u5E99\u5999\u8511\u706D\u6C11\u62BF\u76BF\u654F\u60AF\u95FD\u660E\u879F\u9E23\u94ED\u540D\u547D\u8C2C\u6478"],["c440","\u8140",5,"\u8147\u8149\u814D\u814E\u814F\u8152\u8156\u8157\u8158\u815B",4,"\u8161\u8162\u8163\u8164\u8166\u8168\u816A\u816B\u816C\u816F\u8172\u8173\u8175\u8176\u8177\u8178\u8181\u8183",4,"\u8189\u818B\u818C\u818D\u818E\u8190\u8192",5,"\u8199\u819A\u819E",4,"\u81A4\u81A5"],["c480","\u81A7\u81A9\u81AB",7,"\u81B4",5,"\u81BC\u81BD\u81BE\u81BF\u81C4\u81C5\u81C7\u81C8\u81C9\u81CB\u81CD",6,"\u6479\u8611\u6A21\u819C\u78E8\u6469\u9B54\u62B9\u672B\u83AB\u58A8\u9ED8\u6CAB\u6F20\u5BDE\u964C\u8C0B\u725F\u67D0\u62C7\u7261\u4EA9\u59C6\u6BCD\u5893\u66AE\u5E55\u52DF\u6155\u6728\u76EE\u7766\u7267\u7A46\u62FF\u54EA\u5450\u94A0\u90A3\u5A1C\u7EB3\u6C16\u4E43\u5976\u8010\u5948\u5357\u7537\u96BE\u56CA\u6320\u8111\u607C\u95F9\u6DD6\u5462\u9981\u5185\u5AE9\u80FD\u59AE\u9713\u502A\u6CE5\u5C3C\u62DF\u4F60\u533F\u817B\u9006\u6EBA\u852B\u62C8\u5E74\u78BE\u64B5\u637B\u5FF5\u5A18\u917F\u9E1F\u5C3F\u634F\u8042\u5B7D\u556E\u954A\u954D\u6D85\u60A8\u67E0\u72DE\u51DD\u5B81"],["c540","\u81D4",14,"\u81E4\u81E5\u81E6\u81E8\u81E9\u81EB\u81EE",4,"\u81F5",5,"\u81FD\u81FF\u8203\u8207",4,"\u820E\u820F\u8211\u8213\u8215",5,"\u821D\u8220\u8224\u8225\u8226\u8227\u8229\u822E\u8232\u823A\u823C\u823D\u823F"],["c580","\u8240\u8241\u8242\u8243\u8245\u8246\u8248\u824A\u824C\u824D\u824E\u8250",7,"\u8259\u825B\u825C\u825D\u825E\u8260",7,"\u8269\u62E7\u6CDE\u725B\u626D\u94AE\u7EBD\u8113\u6D53\u519C\u5F04\u5974\u52AA\u6012\u5973\u6696\u8650\u759F\u632A\u61E6\u7CEF\u8BFA\u54E6\u6B27\u9E25\u6BB4\u85D5\u5455\u5076\u6CA4\u556A\u8DB4\u722C\u5E15\u6015\u7436\u62CD\u6392\u724C\u5F98\u6E43\u6D3E\u6500\u6F58\u76D8\u78D0\u76FC\u7554\u5224\u53DB\u4E53\u5E9E\u65C1\u802A\u80D6\u629B\u5486\u5228\u70AE\u888D\u8DD1\u6CE1\u5478\u80DA\u57F9\u88F4\u8D54\u966A\u914D\u4F69\u6C9B\u55B7\u76C6\u7830\u62A8\u70F9\u6F8E\u5F6D\u84EC\u68DA\u787C\u7BF7\u81A8\u670B\u9E4F\u6367\u78B0\u576F\u7812\u9739\u6279\u62AB\u5288\u7435\u6BD7"],["c640","\u826A\u826B\u826C\u826D\u8271\u8275\u8276\u8277\u8278\u827B\u827C\u8280\u8281\u8283\u8285\u8286\u8287\u8289\u828C\u8290\u8293\u8294\u8295\u8296\u829A\u829B\u829E\u82A0\u82A2\u82A3\u82A7\u82B2\u82B5\u82B6\u82BA\u82BB\u82BC\u82BF\u82C0\u82C2\u82C3\u82C5\u82C6\u82C9\u82D0\u82D6\u82D9\u82DA\u82DD\u82E2\u82E7\u82E8\u82E9\u82EA\u82EC\u82ED\u82EE\u82F0\u82F2\u82F3\u82F5\u82F6\u82F8"],["c680","\u82FA\u82FC",4,"\u830A\u830B\u830D\u8310\u8312\u8313\u8316\u8318\u8319\u831D",9,"\u8329\u832A\u832E\u8330\u8332\u8337\u833B\u833D\u5564\u813E\u75B2\u76AE\u5339\u75DE\u50FB\u5C41\u8B6C\u7BC7\u504F\u7247\u9A97\u98D8\u6F02\u74E2\u7968\u6487\u77A5\u62FC\u9891\u8D2B\u54C1\u8058\u4E52\u576A\u82F9\u840D\u5E73\u51ED\u74F6\u8BC4\u5C4F\u5761\u6CFC\u9887\u5A46\u7834\u9B44\u8FEB\u7C95\u5256\u6251\u94FA\u4EC6\u8386\u8461\u83E9\u84B2\u57D4\u6734\u5703\u666E\u6D66\u8C31\u66DD\u7011\u671F\u6B3A\u6816\u621A\u59BB\u4E03\u51C4\u6F06\u67D2\u6C8F\u5176\u68CB\u5947\u6B67\u7566\u5D0E\u8110\u9F50\u65D7\u7948\u7941\u9A91\u8D77\u5C82\u4E5E\u4F01\u542F\u5951\u780C\u5668\u6C14\u8FC4\u5F03\u6C7D\u6CE3\u8BAB\u6390"],["c740","\u833E\u833F\u8341\u8342\u8344\u8345\u8348\u834A",4,"\u8353\u8355",4,"\u835D\u8362\u8370",6,"\u8379\u837A\u837E",6,"\u8387\u8388\u838A\u838B\u838C\u838D\u838F\u8390\u8391\u8394\u8395\u8396\u8397\u8399\u839A\u839D\u839F\u83A1",6,"\u83AC\u83AD\u83AE"],["c780","\u83AF\u83B5\u83BB\u83BE\u83BF\u83C2\u83C3\u83C4\u83C6\u83C8\u83C9\u83CB\u83CD\u83CE\u83D0\u83D1\u83D2\u83D3\u83D5\u83D7\u83D9\u83DA\u83DB\u83DE\u83E2\u83E3\u83E4\u83E6\u83E7\u83E8\u83EB\u83EC\u83ED\u6070\u6D3D\u7275\u6266\u948E\u94C5\u5343\u8FC1\u7B7E\u4EDF\u8C26\u4E7E\u9ED4\u94B1\u94B3\u524D\u6F5C\u9063\u6D45\u8C34\u5811\u5D4C\u6B20\u6B49\u67AA\u545B\u8154\u7F8C\u5899\u8537\u5F3A\u62A2\u6A47\u9539\u6572\u6084\u6865\u77A7\u4E54\u4FA8\u5DE7\u9798\u64AC\u7FD8\u5CED\u4FCF\u7A8D\u5207\u8304\u4E14\u602F\u7A83\u94A6\u4FB5\u4EB2\u79E6\u7434\u52E4\u82B9\u64D2\u79BD\u5BDD\u6C81\u9752\u8F7B\u6C22\u503E\u537F\u6E05\u64CE\u6674\u6C30\u60C5\u9877\u8BF7\u5E86\u743C\u7A77\u79CB\u4E18\u90B1\u7403\u6C42\u56DA\u914B\u6CC5\u8D8B\u533A\u86C6\u66F2\u8EAF\u5C48\u9A71\u6E20"],["c840","\u83EE\u83EF\u83F3",4,"\u83FA\u83FB\u83FC\u83FE\u83FF\u8400\u8402\u8405\u8407\u8408\u8409\u840A\u8410\u8412",5,"\u8419\u841A\u841B\u841E",5,"\u8429",7,"\u8432",5,"\u8439\u843A\u843B\u843E",7,"\u8447\u8448\u8449"],["c880","\u844A",6,"\u8452",4,"\u8458\u845D\u845E\u845F\u8460\u8462\u8464",4,"\u846A\u846E\u846F\u8470\u8472\u8474\u8477\u8479\u847B\u847C\u53D6\u5A36\u9F8B\u8DA3\u53BB\u5708\u98A7\u6743\u919B\u6CC9\u5168\u75CA\u62F3\u72AC\u5238\u529D\u7F3A\u7094\u7638\u5374\u9E4A\u69B7\u786E\u96C0\u88D9\u7FA4\u7136\u71C3\u5189\u67D3\u74E4\u58E4\u6518\u56B7\u8BA9\u9976\u6270\u7ED5\u60F9\u70ED\u58EC\u4EC1\u4EBA\u5FCD\u97E7\u4EFB\u8BA4\u5203\u598A\u7EAB\u6254\u4ECD\u65E5\u620E\u8338\u84C9\u8363\u878D\u7194\u6EB6\u5BB9\u7ED2\u5197\u63C9\u67D4\u8089\u8339\u8815\u5112\u5B7A\u5982\u8FB1\u4E73\u6C5D\u5165\u8925\u8F6F\u962E\u854A\u745E\u9510\u95F0\u6DA6\u82E5\u5F31\u6492\u6D12\u8428\u816E\u9CC3\u585E\u8D5B\u4E09\u53C1"],["c940","\u847D",4,"\u8483\u8484\u8485\u8486\u848A\u848D\u848F",7,"\u8498\u849A\u849B\u849D\u849E\u849F\u84A0\u84A2",12,"\u84B0\u84B1\u84B3\u84B5\u84B6\u84B7\u84BB\u84BC\u84BE\u84C0\u84C2\u84C3\u84C5\u84C6\u84C7\u84C8\u84CB\u84CC\u84CE\u84CF\u84D2\u84D4\u84D5\u84D7"],["c980","\u84D8",4,"\u84DE\u84E1\u84E2\u84E4\u84E7",4,"\u84ED\u84EE\u84EF\u84F1",10,"\u84FD\u84FE\u8500\u8501\u8502\u4F1E\u6563\u6851\u55D3\u4E27\u6414\u9A9A\u626B\u5AC2\u745F\u8272\u6DA9\u68EE\u50E7\u838E\u7802\u6740\u5239\u6C99\u7EB1\u50BB\u5565\u715E\u7B5B\u6652\u73CA\u82EB\u6749\u5C71\u5220\u717D\u886B\u95EA\u9655\u64C5\u8D61\u81B3\u5584\u6C55\u6247\u7F2E\u5892\u4F24\u5546\u8D4F\u664C\u4E0A\u5C1A\u88F3\u68A2\u634E\u7A0D\u70E7\u828D\u52FA\u97F6\u5C11\u54E8\u90B5\u7ECD\u5962\u8D4A\u86C7\u820C\u820D\u8D66\u6444\u5C04\u6151\u6D89\u793E\u8BBE\u7837\u7533\u547B\u4F38\u8EAB\u6DF1\u5A20\u7EC5\u795E\u6C88\u5BA1\u5A76\u751A\u80BE\u614E\u6E17\u58F0\u751F\u7525\u7272\u5347\u7EF3"],["ca40","\u8503",8,"\u850D\u850E\u850F\u8510\u8512\u8514\u8515\u8516\u8518\u8519\u851B\u851C\u851D\u851E\u8520\u8522",8,"\u852D",9,"\u853E",4,"\u8544\u8545\u8546\u8547\u854B",10],["ca80","\u8557\u8558\u855A\u855B\u855C\u855D\u855F",4,"\u8565\u8566\u8567\u8569",8,"\u8573\u8575\u8576\u8577\u8578\u857C\u857D\u857F\u8580\u8581\u7701\u76DB\u5269\u80DC\u5723\u5E08\u5931\u72EE\u65BD\u6E7F\u8BD7\u5C38\u8671\u5341\u77F3\u62FE\u65F6\u4EC0\u98DF\u8680\u5B9E\u8BC6\u53F2\u77E2\u4F7F\u5C4E\u9A76\u59CB\u5F0F\u793A\u58EB\u4E16\u67FF\u4E8B\u62ED\u8A93\u901D\u52BF\u662F\u55DC\u566C\u9002\u4ED5\u4F8D\u91CA\u9970\u6C0F\u5E02\u6043\u5BA4\u89C6\u8BD5\u6536\u624B\u9996\u5B88\u5BFF\u6388\u552E\u53D7\u7626\u517D\u852C\u67A2\u68B3\u6B8A\u6292\u8F93\u53D4\u8212\u6DD1\u758F\u4E66\u8D4E\u5B70\u719F\u85AF\u6691\u66D9\u7F72\u8700\u9ECD\u9F20\u5C5E\u672F\u8FF0\u6811\u675F\u620D\u7AD6\u5885\u5EB6\u6570\u6F31"],["cb40","\u8582\u8583\u8586\u8588",6,"\u8590",10,"\u859D",6,"\u85A5\u85A6\u85A7\u85A9\u85AB\u85AC\u85AD\u85B1",5,"\u85B8\u85BA",6,"\u85C2",6,"\u85CA",4,"\u85D1\u85D2"],["cb80","\u85D4\u85D6",5,"\u85DD",6,"\u85E5\u85E6\u85E7\u85E8\u85EA",14,"\u6055\u5237\u800D\u6454\u8870\u7529\u5E05\u6813\u62F4\u971C\u53CC\u723D\u8C01\u6C34\u7761\u7A0E\u542E\u77AC\u987A\u821C\u8BF4\u7855\u6714\u70C1\u65AF\u6495\u5636\u601D\u79C1\u53F8\u4E1D\u6B7B\u8086\u5BFA\u55E3\u56DB\u4F3A\u4F3C\u9972\u5DF3\u677E\u8038\u6002\u9882\u9001\u5B8B\u8BBC\u8BF5\u641C\u8258\u64DE\u55FD\u82CF\u9165\u4FD7\u7D20\u901F\u7C9F\u50F3\u5851\u6EAF\u5BBF\u8BC9\u8083\u9178\u849C\u7B97\u867D\u968B\u968F\u7EE5\u9AD3\u788E\u5C81\u7A57\u9042\u96A7\u795F\u5B59\u635F\u7B0B\u84D1\u68AD\u5506\u7F29\u7410\u7D22\u9501\u6240\u584C\u4ED6\u5B83\u5979\u5854"],["cc40","\u85F9\u85FA\u85FC\u85FD\u85FE\u8600",4,"\u8606",10,"\u8612\u8613\u8614\u8615\u8617",15,"\u8628\u862A",13,"\u8639\u863A\u863B\u863D\u863E\u863F\u8640"],["cc80","\u8641",11,"\u8652\u8653\u8655",4,"\u865B\u865C\u865D\u865F\u8660\u8661\u8663",7,"\u736D\u631E\u8E4B\u8E0F\u80CE\u82D4\u62AC\u53F0\u6CF0\u915E\u592A\u6001\u6C70\u574D\u644A\u8D2A\u762B\u6EE9\u575B\u6A80\u75F0\u6F6D\u8C2D\u8C08\u5766\u6BEF\u8892\u78B3\u63A2\u53F9\u70AD\u6C64\u5858\u642A\u5802\u68E0\u819B\u5510\u7CD6\u5018\u8EBA\u6DCC\u8D9F\u70EB\u638F\u6D9B\u6ED4\u7EE6\u8404\u6843\u9003\u6DD8\u9676\u8BA8\u5957\u7279\u85E4\u817E\u75BC\u8A8A\u68AF\u5254\u8E22\u9511\u63D0\u9898\u8E44\u557C\u4F53\u66FF\u568F\u60D5\u6D95\u5243\u5C49\u5929\u6DFB\u586B\u7530\u751C\u606C\u8214\u8146\u6311\u6761\u8FE2\u773A\u8DF3\u8D34\u94C1\u5E16\u5385\u542C\u70C3"],["cd40","\u866D\u866F\u8670\u8672",6,"\u8683",6,"\u868E",4,"\u8694\u8696",5,"\u869E",4,"\u86A5\u86A6\u86AB\u86AD\u86AE\u86B2\u86B3\u86B7\u86B8\u86B9\u86BB",4,"\u86C1\u86C2\u86C3\u86C5\u86C8\u86CC\u86CD\u86D2\u86D3\u86D5\u86D6\u86D7\u86DA\u86DC"],["cd80","\u86DD\u86E0\u86E1\u86E2\u86E3\u86E5\u86E6\u86E7\u86E8\u86EA\u86EB\u86EC\u86EF\u86F5\u86F6\u86F7\u86FA\u86FB\u86FC\u86FD\u86FF\u8701\u8704\u8705\u8706\u870B\u870C\u870E\u870F\u8710\u8711\u8714\u8716\u6C40\u5EF7\u505C\u4EAD\u5EAD\u633A\u8247\u901A\u6850\u916E\u77B3\u540C\u94DC\u5F64\u7AE5\u6876\u6345\u7B52\u7EDF\u75DB\u5077\u6295\u5934\u900F\u51F8\u79C3\u7A81\u56FE\u5F92\u9014\u6D82\u5C60\u571F\u5410\u5154\u6E4D\u56E2\u63A8\u9893\u817F\u8715\u892A\u9000\u541E\u5C6F\u81C0\u62D6\u6258\u8131\u9E35\u9640\u9A6E\u9A7C\u692D\u59A5\u62D3\u553E\u6316\u54C7\u86D9\u6D3C\u5A03\u74E6\u889C\u6B6A\u5916\u8C4C\u5F2F\u6E7E\u73A9\u987D\u4E38\u70F7\u5B8C\u7897\u633D\u665A\u7696\u60CB\u5B9B\u5A49\u4E07\u8155\u6C6A\u738B\u4EA1\u6789\u7F51\u5F80\u65FA\u671B\u5FD8\u5984\u5A01"],["ce40","\u8719\u871B\u871D\u871F\u8720\u8724\u8726\u8727\u8728\u872A\u872B\u872C\u872D\u872F\u8730\u8732\u8733\u8735\u8736\u8738\u8739\u873A\u873C\u873D\u8740",6,"\u874A\u874B\u874D\u874F\u8750\u8751\u8752\u8754\u8755\u8756\u8758\u875A",5,"\u8761\u8762\u8766",7,"\u876F\u8771\u8772\u8773\u8775"],["ce80","\u8777\u8778\u8779\u877A\u877F\u8780\u8781\u8784\u8786\u8787\u8789\u878A\u878C\u878E",4,"\u8794\u8795\u8796\u8798",6,"\u87A0",4,"\u5DCD\u5FAE\u5371\u97E6\u8FDD\u6845\u56F4\u552F\u60DF\u4E3A\u6F4D\u7EF4\u82C7\u840E\u59D4\u4F1F\u4F2A\u5C3E\u7EAC\u672A\u851A\u5473\u754F\u80C3\u5582\u9B4F\u4F4D\u6E2D\u8C13\u5C09\u6170\u536B\u761F\u6E29\u868A\u6587\u95FB\u7EB9\u543B\u7A33\u7D0A\u95EE\u55E1\u7FC1\u74EE\u631D\u8717\u6DA1\u7A9D\u6211\u65A1\u5367\u63E1\u6C83\u5DEB\u545C\u94A8\u4E4C\u6C61\u8BEC\u5C4B\u65E0\u829C\u68A7\u543E\u5434\u6BCB\u6B66\u4E94\u6342\u5348\u821E\u4F0D\u4FAE\u575E\u620A\u96FE\u6664\u7269\u52FF\u52A1\u609F\u8BEF\u6614\u7199\u6790\u897F\u7852\u77FD\u6670\u563B\u5438\u9521\u727A"],["cf40","\u87A5\u87A6\u87A7\u87A9\u87AA\u87AE\u87B0\u87B1\u87B2\u87B4\u87B6\u87B7\u87B8\u87B9\u87BB\u87BC\u87BE\u87BF\u87C1",4,"\u87C7\u87C8\u87C9\u87CC",4,"\u87D4",6,"\u87DC\u87DD\u87DE\u87DF\u87E1\u87E2\u87E3\u87E4\u87E6\u87E7\u87E8\u87E9\u87EB\u87EC\u87ED\u87EF",9],["cf80","\u87FA\u87FB\u87FC\u87FD\u87FF\u8800\u8801\u8802\u8804",5,"\u880B",7,"\u8814\u8817\u8818\u8819\u881A\u881C",4,"\u8823\u7A00\u606F\u5E0C\u6089\u819D\u5915\u60DC\u7184\u70EF\u6EAA\u6C50\u7280\u6A84\u88AD\u5E2D\u4E60\u5AB3\u559C\u94E3\u6D17\u7CFB\u9699\u620F\u7EC6\u778E\u867E\u5323\u971E\u8F96\u6687\u5CE1\u4FA0\u72ED\u4E0B\u53A6\u590F\u5413\u6380\u9528\u5148\u4ED9\u9C9C\u7EA4\u54B8\u8D24\u8854\u8237\u95F2\u6D8E\u5F26\u5ACC\u663E\u9669\u73B0\u732E\u53BF\u817A\u9985\u7FA1\u5BAA\u9677\u9650\u7EBF\u76F8\u53A2\u9576\u9999\u7BB1\u8944\u6E58\u4E61\u7FD4\u7965\u8BE6\u60F3\u54CD\u4EAB\u9879\u5DF7\u6A61\u50CF\u5411\u8C61\u8427\u785D\u9704\u524A\u54EE\u56A3\u9500\u6D88\u5BB5\u6DC6\u6653"],["d040","\u8824",13,"\u8833",5,"\u883A\u883B\u883D\u883E\u883F\u8841\u8842\u8843\u8846",5,"\u884E",5,"\u8855\u8856\u8858\u885A",6,"\u8866\u8867\u886A\u886D\u886F\u8871\u8873\u8874\u8875\u8876\u8878\u8879\u887A"],["d080","\u887B\u887C\u8880\u8883\u8886\u8887\u8889\u888A\u888C\u888E\u888F\u8890\u8891\u8893\u8894\u8895\u8897",4,"\u889D",4,"\u88A3\u88A5",5,"\u5C0F\u5B5D\u6821\u8096\u5578\u7B11\u6548\u6954\u4E9B\u6B47\u874E\u978B\u534F\u631F\u643A\u90AA\u659C\u80C1\u8C10\u5199\u68B0\u5378\u87F9\u61C8\u6CC4\u6CFB\u8C22\u5C51\u85AA\u82AF\u950C\u6B23\u8F9B\u65B0\u5FFB\u5FC3\u4FE1\u8845\u661F\u8165\u7329\u60FA\u5174\u5211\u578B\u5F62\u90A2\u884C\u9192\u5E78\u674F\u6027\u59D3\u5144\u51F6\u80F8\u5308\u6C79\u96C4\u718A\u4F11\u4FEE\u7F9E\u673D\u55C5\u9508\u79C0\u8896\u7EE3\u589F\u620C\u9700\u865A\u5618\u987B\u5F90\u8BB8\u84C4\u9157\u53D9\u65ED\u5E8F\u755C\u6064\u7D6E\u5A7F\u7EEA\u7EED\u8F69\u55A7\u5BA3\u60AC\u65CB\u7384"],["d140","\u88AC\u88AE\u88AF\u88B0\u88B2",4,"\u88B8\u88B9\u88BA\u88BB\u88BD\u88BE\u88BF\u88C0\u88C3\u88C4\u88C7\u88C8\u88CA\u88CB\u88CC\u88CD\u88CF\u88D0\u88D1\u88D3\u88D6\u88D7\u88DA",4,"\u88E0\u88E1\u88E6\u88E7\u88E9",6,"\u88F2\u88F5\u88F6\u88F7\u88FA\u88FB\u88FD\u88FF\u8900\u8901\u8903",5],["d180","\u8909\u890B",4,"\u8911\u8914",4,"\u891C",4,"\u8922\u8923\u8924\u8926\u8927\u8928\u8929\u892C\u892D\u892E\u892F\u8931\u8932\u8933\u8935\u8937\u9009\u7663\u7729\u7EDA\u9774\u859B\u5B66\u7A74\u96EA\u8840\u52CB\u718F\u5FAA\u65EC\u8BE2\u5BFB\u9A6F\u5DE1\u6B89\u6C5B\u8BAD\u8BAF\u900A\u8FC5\u538B\u62BC\u9E26\u9E2D\u5440\u4E2B\u82BD\u7259\u869C\u5D16\u8859\u6DAF\u96C5\u54D1\u4E9A\u8BB6\u7109\u54BD\u9609\u70DF\u6DF9\u76D0\u4E25\u7814\u8712\u5CA9\u5EF6\u8A00\u989C\u960E\u708E\u6CBF\u5944\u63A9\u773C\u884D\u6F14\u8273\u5830\u71D5\u538C\u781A\u96C1\u5501\u5F66\u7130\u5BB4\u8C1A\u9A8C\u6B83\u592E\u9E2F\u79E7\u6768\u626C\u4F6F\u75A1\u7F8A\u6D0B\u9633\u6C27\u4EF0\u75D2\u517B\u6837\u6F3E\u9080\u8170\u5996\u7476"],["d240","\u8938",8,"\u8942\u8943\u8945",24,"\u8960",5,"\u8967",19,"\u897C"],["d280","\u897D\u897E\u8980\u8982\u8984\u8985\u8987",26,"\u6447\u5C27\u9065\u7A91\u8C23\u59DA\u54AC\u8200\u836F\u8981\u8000\u6930\u564E\u8036\u7237\u91CE\u51B6\u4E5F\u9875\u6396\u4E1A\u53F6\u66F3\u814B\u591C\u6DB2\u4E00\u58F9\u533B\u63D6\u94F1\u4F9D\u4F0A\u8863\u9890\u5937\u9057\u79FB\u4EEA\u80F0\u7591\u6C82\u5B9C\u59E8\u5F5D\u6905\u8681\u501A\u5DF2\u4E59\u77E3\u4EE5\u827A\u6291\u6613\u9091\u5C79\u4EBF\u5F79\u81C6\u9038\u8084\u75AB\u4EA6\u88D4\u610F\u6BC5\u5FC6\u4E49\u76CA\u6EA2\u8BE3\u8BAE\u8C0A\u8BD1\u5F02\u7FFC\u7FCC\u7ECE\u8335\u836B\u56E0\u6BB7\u97F3\u9634\u59FB\u541F\u94F6\u6DEB\u5BC5\u996E\u5C39\u5F15\u9690"],["d340","\u89A2",30,"\u89C3\u89CD\u89D3\u89D4\u89D5\u89D7\u89D8\u89D9\u89DB\u89DD\u89DF\u89E0\u89E1\u89E2\u89E4\u89E7\u89E8\u89E9\u89EA\u89EC\u89ED\u89EE\u89F0\u89F1\u89F2\u89F4",6],["d380","\u89FB",4,"\u8A01",5,"\u8A08",21,"\u5370\u82F1\u6A31\u5A74\u9E70\u5E94\u7F28\u83B9\u8424\u8425\u8367\u8747\u8FCE\u8D62\u76C8\u5F71\u9896\u786C\u6620\u54DF\u62E5\u4F63\u81C3\u75C8\u5EB8\u96CD\u8E0A\u86F9\u548F\u6CF3\u6D8C\u6C38\u607F\u52C7\u7528\u5E7D\u4F18\u60A0\u5FE7\u5C24\u7531\u90AE\u94C0\u72B9\u6CB9\u6E38\u9149\u6709\u53CB\u53F3\u4F51\u91C9\u8BF1\u53C8\u5E7C\u8FC2\u6DE4\u4E8E\u76C2\u6986\u865E\u611A\u8206\u4F59\u4FDE\u903E\u9C7C\u6109\u6E1D\u6E14\u9685\u4E88\u5A31\u96E8\u4E0E\u5C7F\u79B9\u5B87\u8BED\u7FBD\u7389\u57DF\u828B\u90C1\u5401\u9047\u55BB\u5CEA\u5FA1\u6108\u6B32\u72F1\u80B2\u8A89"],["d440","\u8A1E",31,"\u8A3F",8,"\u8A49",21],["d480","\u8A5F",25,"\u8A7A",6,"\u6D74\u5BD3\u88D5\u9884\u8C6B\u9A6D\u9E33\u6E0A\u51A4\u5143\u57A3\u8881\u539F\u63F4\u8F95\u56ED\u5458\u5706\u733F\u6E90\u7F18\u8FDC\u82D1\u613F\u6028\u9662\u66F0\u7EA6\u8D8A\u8DC3\u94A5\u5CB3\u7CA4\u6708\u60A6\u9605\u8018\u4E91\u90E7\u5300\u9668\u5141\u8FD0\u8574\u915D\u6655\u97F5\u5B55\u531D\u7838\u6742\u683D\u54C9\u707E\u5BB0\u8F7D\u518D\u5728\u54B1\u6512\u6682\u8D5E\u8D43\u810F\u846C\u906D\u7CDF\u51FF\u85FB\u67A3\u65E9\u6FA1\u86A4\u8E81\u566A\u9020\u7682\u7076\u71E5\u8D23\u62E9\u5219\u6CFD\u8D3C\u600E\u589E\u618E\u66FE\u8D60\u624E\u55B3\u6E23\u672D\u8F67"],["d540","\u8A81",7,"\u8A8B",7,"\u8A94",46],["d580","\u8AC3",32,"\u94E1\u95F8\u7728\u6805\u69A8\u548B\u4E4D\u70B8\u8BC8\u6458\u658B\u5B85\u7A84\u503A\u5BE8\u77BB\u6BE1\u8A79\u7C98\u6CBE\u76CF\u65A9\u8F97\u5D2D\u5C55\u8638\u6808\u5360\u6218\u7AD9\u6E5B\u7EFD\u6A1F\u7AE0\u5F70\u6F33\u5F20\u638C\u6DA8\u6756\u4E08\u5E10\u8D26\u4ED7\u80C0\u7634\u969C\u62DB\u662D\u627E\u6CBC\u8D75\u7167\u7F69\u5146\u8087\u53EC\u906E\u6298\u54F2\u86F0\u8F99\u8005\u9517\u8517\u8FD9\u6D59\u73CD\u659F\u771F\u7504\u7827\u81FB\u8D1E\u9488\u4FA6\u6795\u75B9\u8BCA\u9707\u632F\u9547\u9635\u84B8\u6323\u7741\u5F81\u72F0\u4E89\u6014\u6574\u62EF\u6B63\u653F"],["d640","\u8AE4",34,"\u8B08",27],["d680","\u8B24\u8B25\u8B27",30,"\u5E27\u75C7\u90D1\u8BC1\u829D\u679D\u652F\u5431\u8718\u77E5\u80A2\u8102\u6C41\u4E4B\u7EC7\u804C\u76F4\u690D\u6B96\u6267\u503C\u4F84\u5740\u6307\u6B62\u8DBE\u53EA\u65E8\u7EB8\u5FD7\u631A\u63B7\u81F3\u81F4\u7F6E\u5E1C\u5CD9\u5236\u667A\u79E9\u7A1A\u8D28\u7099\u75D4\u6EDE\u6CBB\u7A92\u4E2D\u76C5\u5FE0\u949F\u8877\u7EC8\u79CD\u80BF\u91CD\u4EF2\u4F17\u821F\u5468\u5DDE\u6D32\u8BCC\u7CA5\u8F74\u8098\u5E1A\u5492\u76B1\u5B99\u663C\u9AA4\u73E0\u682A\u86DB\u6731\u732A\u8BF8\u8BDB\u9010\u7AF9\u70DB\u716E\u62C4\u77A9\u5631\u4E3B\u8457\u67F1\u52A9\u86C0\u8D2E\u94F8\u7B51"],["d740","\u8B46",31,"\u8B67",4,"\u8B6D",25],["d780","\u8B87",24,"\u8BAC\u8BB1\u8BBB\u8BC7\u8BD0\u8BEA\u8C09\u8C1E\u4F4F\u6CE8\u795D\u9A7B\u6293\u722A\u62FD\u4E13\u7816\u8F6C\u64B0\u8D5A\u7BC6\u6869\u5E84\u88C5\u5986\u649E\u58EE\u72B6\u690E\u9525\u8FFD\u8D58\u5760\u7F00\u8C06\u51C6\u6349\u62D9\u5353\u684C\u7422\u8301\u914C\u5544\u7740\u707C\u6D4A\u5179\u54A8\u8D44\u59FF\u6ECB\u6DC4\u5B5C\u7D2B\u4ED4\u7C7D\u6ED3\u5B50\u81EA\u6E0D\u5B57\u9B03\u68D5\u8E2A\u5B97\u7EFC\u603B\u7EB5\u90B9\u8D70\u594F\u63CD\u79DF\u8DB3\u5352\u65CF\u7956\u8BC5\u963B\u7EC4\u94BB\u7E82\u5634\u9189\u6700\u7F6A\u5C0A\u9075\u6628\u5DE6\u4F50\u67DE\u505A\u4F5C\u5750\u5EA7"],["d840","\u8C38",8,"\u8C42\u8C43\u8C44\u8C45\u8C48\u8C4A\u8C4B\u8C4D",7,"\u8C56\u8C57\u8C58\u8C59\u8C5B",5,"\u8C63",6,"\u8C6C",6,"\u8C74\u8C75\u8C76\u8C77\u8C7B",6,"\u8C83\u8C84\u8C86\u8C87"],["d880","\u8C88\u8C8B\u8C8D",6,"\u8C95\u8C96\u8C97\u8C99",20,"\u4E8D\u4E0C\u5140\u4E10\u5EFF\u5345\u4E15\u4E98\u4E1E\u9B32\u5B6C\u5669\u4E28\u79BA\u4E3F\u5315\u4E47\u592D\u723B\u536E\u6C10\u56DF\u80E4\u9997\u6BD3\u777E\u9F17\u4E36\u4E9F\u9F10\u4E5C\u4E69\u4E93\u8288\u5B5B\u556C\u560F\u4EC4\u538D\u539D\u53A3\u53A5\u53AE\u9765\u8D5D\u531A\u53F5\u5326\u532E\u533E\u8D5C\u5366\u5363\u5202\u5208\u520E\u522D\u5233\u523F\u5240\u524C\u525E\u5261\u525C\u84AF\u527D\u5282\u5281\u5290\u5293\u5182\u7F54\u4EBB\u4EC3\u4EC9\u4EC2\u4EE8\u4EE1\u4EEB\u4EDE\u4F1B\u4EF3\u4F22\u4F64\u4EF5\u4F25\u4F27\u4F09\u4F2B\u4F5E\u4F67\u6538\u4F5A\u4F5D"],["d940","\u8CAE",62],["d980","\u8CED",32,"\u4F5F\u4F57\u4F32\u4F3D\u4F76\u4F74\u4F91\u4F89\u4F83\u4F8F\u4F7E\u4F7B\u4FAA\u4F7C\u4FAC\u4F94\u4FE6\u4FE8\u4FEA\u4FC5\u4FDA\u4FE3\u4FDC\u4FD1\u4FDF\u4FF8\u5029\u504C\u4FF3\u502C\u500F\u502E\u502D\u4FFE\u501C\u500C\u5025\u5028\u507E\u5043\u5055\u5048\u504E\u506C\u507B\u50A5\u50A7\u50A9\u50BA\u50D6\u5106\u50ED\u50EC\u50E6\u50EE\u5107\u510B\u4EDD\u6C3D\u4F58\u4F65\u4FCE\u9FA0\u6C46\u7C74\u516E\u5DFD\u9EC9\u9998\u5181\u5914\u52F9\u530D\u8A07\u5310\u51EB\u5919\u5155\u4EA0\u5156\u4EB3\u886E\u88A4\u4EB5\u8114\u88D2\u7980\u5B34\u8803\u7FB8\u51AB\u51B1\u51BD\u51BC"],["da40","\u8D0E",14,"\u8D20\u8D51\u8D52\u8D57\u8D5F\u8D65\u8D68\u8D69\u8D6A\u8D6C\u8D6E\u8D6F\u8D71\u8D72\u8D78",8,"\u8D82\u8D83\u8D86\u8D87\u8D88\u8D89\u8D8C",4,"\u8D92\u8D93\u8D95",9,"\u8DA0\u8DA1"],["da80","\u8DA2\u8DA4",12,"\u8DB2\u8DB6\u8DB7\u8DB9\u8DBB\u8DBD\u8DC0\u8DC1\u8DC2\u8DC5\u8DC7\u8DC8\u8DC9\u8DCA\u8DCD\u8DD0\u8DD2\u8DD3\u8DD4\u51C7\u5196\u51A2\u51A5\u8BA0\u8BA6\u8BA7\u8BAA\u8BB4\u8BB5\u8BB7\u8BC2\u8BC3\u8BCB\u8BCF\u8BCE\u8BD2\u8BD3\u8BD4\u8BD6\u8BD8\u8BD9\u8BDC\u8BDF\u8BE0\u8BE4\u8BE8\u8BE9\u8BEE\u8BF0\u8BF3\u8BF6\u8BF9\u8BFC\u8BFF\u8C00\u8C02\u8C04\u8C07\u8C0C\u8C0F\u8C11\u8C12\u8C14\u8C15\u8C16\u8C19\u8C1B\u8C18\u8C1D\u8C1F\u8C20\u8C21\u8C25\u8C27\u8C2A\u8C2B\u8C2E\u8C2F\u8C32\u8C33\u8C35\u8C36\u5369\u537A\u961D\u9622\u9621\u9631\u962A\u963D\u963C\u9642\u9649\u9654\u965F\u9667\u966C\u9672\u9674\u9688\u968D\u9697\u96B0\u9097\u909B\u909D\u9099\u90AC\u90A1\u90B4\u90B3\u90B6\u90BA"],["db40","\u8DD5\u8DD8\u8DD9\u8DDC\u8DE0\u8DE1\u8DE2\u8DE5\u8DE6\u8DE7\u8DE9\u8DED\u8DEE\u8DF0\u8DF1\u8DF2\u8DF4\u8DF6\u8DFC\u8DFE",6,"\u8E06\u8E07\u8E08\u8E0B\u8E0D\u8E0E\u8E10\u8E11\u8E12\u8E13\u8E15",7,"\u8E20\u8E21\u8E24",4,"\u8E2B\u8E2D\u8E30\u8E32\u8E33\u8E34\u8E36\u8E37\u8E38\u8E3B\u8E3C\u8E3E"],["db80","\u8E3F\u8E43\u8E45\u8E46\u8E4C",4,"\u8E53",5,"\u8E5A",11,"\u8E67\u8E68\u8E6A\u8E6B\u8E6E\u8E71\u90B8\u90B0\u90CF\u90C5\u90BE\u90D0\u90C4\u90C7\u90D3\u90E6\u90E2\u90DC\u90D7\u90DB\u90EB\u90EF\u90FE\u9104\u9122\u911E\u9123\u9131\u912F\u9139\u9143\u9146\u520D\u5942\u52A2\u52AC\u52AD\u52BE\u54FF\u52D0\u52D6\u52F0\u53DF\u71EE\u77CD\u5EF4\u51F5\u51FC\u9B2F\u53B6\u5F01\u755A\u5DEF\u574C\u57A9\u57A1\u587E\u58BC\u58C5\u58D1\u5729\u572C\u572A\u5733\u5739\u572E\u572F\u575C\u573B\u5742\u5769\u5785\u576B\u5786\u577C\u577B\u5768\u576D\u5776\u5773\u57AD\u57A4\u578C\u57B2\u57CF\u57A7\u57B4\u5793\u57A0\u57D5\u57D8\u57DA\u57D9\u57D2\u57B8\u57F4\u57EF\u57F8\u57E4\u57DD"],["dc40","\u8E73\u8E75\u8E77",4,"\u8E7D\u8E7E\u8E80\u8E82\u8E83\u8E84\u8E86\u8E88",6,"\u8E91\u8E92\u8E93\u8E95",6,"\u8E9D\u8E9F",11,"\u8EAD\u8EAE\u8EB0\u8EB1\u8EB3",6,"\u8EBB",7],["dc80","\u8EC3",10,"\u8ECF",21,"\u580B\u580D\u57FD\u57ED\u5800\u581E\u5819\u5844\u5820\u5865\u586C\u5881\u5889\u589A\u5880\u99A8\u9F19\u61FF\u8279\u827D\u827F\u828F\u828A\u82A8\u8284\u828E\u8291\u8297\u8299\u82AB\u82B8\u82BE\u82B0\u82C8\u82CA\u82E3\u8298\u82B7\u82AE\u82CB\u82CC\u82C1\u82A9\u82B4\u82A1\u82AA\u829F\u82C4\u82CE\u82A4\u82E1\u8309\u82F7\u82E4\u830F\u8307\u82DC\u82F4\u82D2\u82D8\u830C\u82FB\u82D3\u8311\u831A\u8306\u8314\u8315\u82E0\u82D5\u831C\u8351\u835B\u835C\u8308\u8392\u833C\u8334\u8331\u839B\u835E\u832F\u834F\u8347\u8343\u835F\u8340\u8317\u8360\u832D\u833A\u8333\u8366\u8365"],["dd40","\u8EE5",62],["dd80","\u8F24",32,"\u8368\u831B\u8369\u836C\u836A\u836D\u836E\u83B0\u8378\u83B3\u83B4\u83A0\u83AA\u8393\u839C\u8385\u837C\u83B6\u83A9\u837D\u83B8\u837B\u8398\u839E\u83A8\u83BA\u83BC\u83C1\u8401\u83E5\u83D8\u5807\u8418\u840B\u83DD\u83FD\u83D6\u841C\u8438\u8411\u8406\u83D4\u83DF\u840F\u8403\u83F8\u83F9\u83EA\u83C5\u83C0\u8426\u83F0\u83E1\u845C\u8451\u845A\u8459\u8473\u8487\u8488\u847A\u8489\u8478\u843C\u8446\u8469\u8476\u848C\u848E\u8431\u846D\u84C1\u84CD\u84D0\u84E6\u84BD\u84D3\u84CA\u84BF\u84BA\u84E0\u84A1\u84B9\u84B4\u8497\u84E5\u84E3\u850C\u750D\u8538\u84F0\u8539\u851F\u853A"],["de40","\u8F45",32,"\u8F6A\u8F80\u8F8C\u8F92\u8F9D\u8FA0\u8FA1\u8FA2\u8FA4\u8FA5\u8FA6\u8FA7\u8FAA\u8FAC\u8FAD\u8FAE\u8FAF\u8FB2\u8FB3\u8FB4\u8FB5\u8FB7\u8FB8\u8FBA\u8FBB\u8FBC\u8FBF\u8FC0\u8FC3\u8FC6"],["de80","\u8FC9",4,"\u8FCF\u8FD2\u8FD6\u8FD7\u8FDA\u8FE0\u8FE1\u8FE3\u8FE7\u8FEC\u8FEF\u8FF1\u8FF2\u8FF4\u8FF5\u8FF6\u8FFA\u8FFB\u8FFC\u8FFE\u8FFF\u9007\u9008\u900C\u900E\u9013\u9015\u9018\u8556\u853B\u84FF\u84FC\u8559\u8548\u8568\u8564\u855E\u857A\u77A2\u8543\u8572\u857B\u85A4\u85A8\u8587\u858F\u8579\u85AE\u859C\u8585\u85B9\u85B7\u85B0\u85D3\u85C1\u85DC\u85FF\u8627\u8605\u8629\u8616\u863C\u5EFE\u5F08\u593C\u5941\u8037\u5955\u595A\u5958\u530F\u5C22\u5C25\u5C2C\u5C34\u624C\u626A\u629F\u62BB\u62CA\u62DA\u62D7\u62EE\u6322\u62F6\u6339\u634B\u6343\u63AD\u63F6\u6371\u637A\u638E\u63B4\u636D\u63AC\u638A\u6369\u63AE\u63BC\u63F2\u63F8\u63E0\u63FF\u63C4\u63DE\u63CE\u6452\u63C6\u63BE\u6445\u6441\u640B\u641B\u6420\u640C\u6426\u6421\u645E\u6484\u646D\u6496"],["df40","\u9019\u901C\u9023\u9024\u9025\u9027",5,"\u9030",4,"\u9037\u9039\u903A\u903D\u903F\u9040\u9043\u9045\u9046\u9048",4,"\u904E\u9054\u9055\u9056\u9059\u905A\u905C",5,"\u9064\u9066\u9067\u9069\u906A\u906B\u906C\u906F",4,"\u9076",6,"\u907E\u9081"],["df80","\u9084\u9085\u9086\u9087\u9089\u908A\u908C",4,"\u9092\u9094\u9096\u9098\u909A\u909C\u909E\u909F\u90A0\u90A4\u90A5\u90A7\u90A8\u90A9\u90AB\u90AD\u90B2\u90B7\u90BC\u90BD\u90BF\u90C0\u647A\u64B7\u64B8\u6499\u64BA\u64C0\u64D0\u64D7\u64E4\u64E2\u6509\u6525\u652E\u5F0B\u5FD2\u7519\u5F11\u535F\u53F1\u53FD\u53E9\u53E8\u53FB\u5412\u5416\u5406\u544B\u5452\u5453\u5454\u5456\u5443\u5421\u5457\u5459\u5423\u5432\u5482\u5494\u5477\u5471\u5464\u549A\u549B\u5484\u5476\u5466\u549D\u54D0\u54AD\u54C2\u54B4\u54D2\u54A7\u54A6\u54D3\u54D4\u5472\u54A3\u54D5\u54BB\u54BF\u54CC\u54D9\u54DA\u54DC\u54A9\u54AA\u54A4\u54DD\u54CF\u54DE\u551B\u54E7\u5520\u54FD\u5514\u54F3\u5522\u5523\u550F\u5511\u5527\u552A\u5567\u558F\u55B5\u5549\u556D\u5541\u5555\u553F\u5550\u553C"],["e040","\u90C2\u90C3\u90C6\u90C8\u90C9\u90CB\u90CC\u90CD\u90D2\u90D4\u90D5\u90D6\u90D8\u90D9\u90DA\u90DE\u90DF\u90E0\u90E3\u90E4\u90E5\u90E9\u90EA\u90EC\u90EE\u90F0\u90F1\u90F2\u90F3\u90F5\u90F6\u90F7\u90F9\u90FA\u90FB\u90FC\u90FF\u9100\u9101\u9103\u9105",19,"\u911A\u911B\u911C"],["e080","\u911D\u911F\u9120\u9121\u9124",10,"\u9130\u9132",6,"\u913A",8,"\u9144\u5537\u5556\u5575\u5576\u5577\u5533\u5530\u555C\u558B\u55D2\u5583\u55B1\u55B9\u5588\u5581\u559F\u557E\u55D6\u5591\u557B\u55DF\u55BD\u55BE\u5594\u5599\u55EA\u55F7\u55C9\u561F\u55D1\u55EB\u55EC\u55D4\u55E6\u55DD\u55C4\u55EF\u55E5\u55F2\u55F3\u55CC\u55CD\u55E8\u55F5\u55E4\u8F94\u561E\u5608\u560C\u5601\u5624\u5623\u55FE\u5600\u5627\u562D\u5658\u5639\u5657\u562C\u564D\u5662\u5659\u565C\u564C\u5654\u5686\u5664\u5671\u566B\u567B\u567C\u5685\u5693\u56AF\u56D4\u56D7\u56DD\u56E1\u56F5\u56EB\u56F9\u56FF\u5704\u570A\u5709\u571C\u5E0F\u5E19\u5E14\u5E11\u5E31\u5E3B\u5E3C"],["e140","\u9145\u9147\u9148\u9151\u9153\u9154\u9155\u9156\u9158\u9159\u915B\u915C\u915F\u9160\u9166\u9167\u9168\u916B\u916D\u9173\u917A\u917B\u917C\u9180",4,"\u9186\u9188\u918A\u918E\u918F\u9193",6,"\u919C",5,"\u91A4",5,"\u91AB\u91AC\u91B0\u91B1\u91B2\u91B3\u91B6\u91B7\u91B8\u91B9\u91BB"],["e180","\u91BC",10,"\u91C8\u91CB\u91D0\u91D2",9,"\u91DD",8,"\u5E37\u5E44\u5E54\u5E5B\u5E5E\u5E61\u5C8C\u5C7A\u5C8D\u5C90\u5C96\u5C88\u5C98\u5C99\u5C91\u5C9A\u5C9C\u5CB5\u5CA2\u5CBD\u5CAC\u5CAB\u5CB1\u5CA3\u5CC1\u5CB7\u5CC4\u5CD2\u5CE4\u5CCB\u5CE5\u5D02\u5D03\u5D27\u5D26\u5D2E\u5D24\u5D1E\u5D06\u5D1B\u5D58\u5D3E\u5D34\u5D3D\u5D6C\u5D5B\u5D6F\u5D5D\u5D6B\u5D4B\u5D4A\u5D69\u5D74\u5D82\u5D99\u5D9D\u8C73\u5DB7\u5DC5\u5F73\u5F77\u5F82\u5F87\u5F89\u5F8C\u5F95\u5F99\u5F9C\u5FA8\u5FAD\u5FB5\u5FBC\u8862\u5F61\u72AD\u72B0\u72B4\u72B7\u72B8\u72C3\u72C1\u72CE\u72CD\u72D2\u72E8\u72EF\u72E9\u72F2\u72F4\u72F7\u7301\u72F3\u7303\u72FA"],["e240","\u91E6",62],["e280","\u9225",32,"\u72FB\u7317\u7313\u7321\u730A\u731E\u731D\u7315\u7322\u7339\u7325\u732C\u7338\u7331\u7350\u734D\u7357\u7360\u736C\u736F\u737E\u821B\u5925\u98E7\u5924\u5902\u9963\u9967",5,"\u9974\u9977\u997D\u9980\u9984\u9987\u998A\u998D\u9990\u9991\u9993\u9994\u9995\u5E80\u5E91\u5E8B\u5E96\u5EA5\u5EA0\u5EB9\u5EB5\u5EBE\u5EB3\u8D53\u5ED2\u5ED1\u5EDB\u5EE8\u5EEA\u81BA\u5FC4\u5FC9\u5FD6\u5FCF\u6003\u5FEE\u6004\u5FE1\u5FE4\u5FFE\u6005\u6006\u5FEA\u5FED\u5FF8\u6019\u6035\u6026\u601B\u600F\u600D\u6029\u602B\u600A\u603F\u6021\u6078\u6079\u607B\u607A\u6042"],["e340","\u9246",45,"\u9275",16],["e380","\u9286",7,"\u928F",24,"\u606A\u607D\u6096\u609A\u60AD\u609D\u6083\u6092\u608C\u609B\u60EC\u60BB\u60B1\u60DD\u60D8\u60C6\u60DA\u60B4\u6120\u6126\u6115\u6123\u60F4\u6100\u610E\u612B\u614A\u6175\u61AC\u6194\u61A7\u61B7\u61D4\u61F5\u5FDD\u96B3\u95E9\u95EB\u95F1\u95F3\u95F5\u95F6\u95FC\u95FE\u9603\u9604\u9606\u9608\u960A\u960B\u960C\u960D\u960F\u9612\u9615\u9616\u9617\u9619\u961A\u4E2C\u723F\u6215\u6C35\u6C54\u6C5C\u6C4A\u6CA3\u6C85\u6C90\u6C94\u6C8C\u6C68\u6C69\u6C74\u6C76\u6C86\u6CA9\u6CD0\u6CD4\u6CAD\u6CF7\u6CF8\u6CF1\u6CD7\u6CB2\u6CE0\u6CD6\u6CFA\u6CEB\u6CEE\u6CB1\u6CD3\u6CEF\u6CFE"],["e440","\u92A8",5,"\u92AF",24,"\u92C9",31],["e480","\u92E9",32,"\u6D39\u6D27\u6D0C\u6D43\u6D48\u6D07\u6D04\u6D19\u6D0E\u6D2B\u6D4D\u6D2E\u6D35\u6D1A\u6D4F\u6D52\u6D54\u6D33\u6D91\u6D6F\u6D9E\u6DA0\u6D5E\u6D93\u6D94\u6D5C\u6D60\u6D7C\u6D63\u6E1A\u6DC7\u6DC5\u6DDE\u6E0E\u6DBF\u6DE0\u6E11\u6DE6\u6DDD\u6DD9\u6E16\u6DAB\u6E0C\u6DAE\u6E2B\u6E6E\u6E4E\u6E6B\u6EB2\u6E5F\u6E86\u6E53\u6E54\u6E32\u6E25\u6E44\u6EDF\u6EB1\u6E98\u6EE0\u6F2D\u6EE2\u6EA5\u6EA7\u6EBD\u6EBB\u6EB7\u6ED7\u6EB4\u6ECF\u6E8F\u6EC2\u6E9F\u6F62\u6F46\u6F47\u6F24\u6F15\u6EF9\u6F2F\u6F36\u6F4B\u6F74\u6F2A\u6F09\u6F29\u6F89\u6F8D\u6F8C\u6F78\u6F72\u6F7C\u6F7A\u6FD1"],["e540","\u930A",51,"\u933F",10],["e580","\u934A",31,"\u936B\u6FC9\u6FA7\u6FB9\u6FB6\u6FC2\u6FE1\u6FEE\u6FDE\u6FE0\u6FEF\u701A\u7023\u701B\u7039\u7035\u704F\u705E\u5B80\u5B84\u5B95\u5B93\u5BA5\u5BB8\u752F\u9A9E\u6434\u5BE4\u5BEE\u8930\u5BF0\u8E47\u8B07\u8FB6\u8FD3\u8FD5\u8FE5\u8FEE\u8FE4\u8FE9\u8FE6\u8FF3\u8FE8\u9005\u9004\u900B\u9026\u9011\u900D\u9016\u9021\u9035\u9036\u902D\u902F\u9044\u9051\u9052\u9050\u9068\u9058\u9062\u905B\u66B9\u9074\u907D\u9082\u9088\u9083\u908B\u5F50\u5F57\u5F56\u5F58\u5C3B\u54AB\u5C50\u5C59\u5B71\u5C63\u5C66\u7FBC\u5F2A\u5F29\u5F2D\u8274\u5F3C\u9B3B\u5C6E\u5981\u5983\u598D\u59A9\u59AA\u59A3"],["e640","\u936C",34,"\u9390",27],["e680","\u93AC",29,"\u93CB\u93CC\u93CD\u5997\u59CA\u59AB\u599E\u59A4\u59D2\u59B2\u59AF\u59D7\u59BE\u5A05\u5A06\u59DD\u5A08\u59E3\u59D8\u59F9\u5A0C\u5A09\u5A32\u5A34\u5A11\u5A23\u5A13\u5A40\u5A67\u5A4A\u5A55\u5A3C\u5A62\u5A75\u80EC\u5AAA\u5A9B\u5A77\u5A7A\u5ABE\u5AEB\u5AB2\u5AD2\u5AD4\u5AB8\u5AE0\u5AE3\u5AF1\u5AD6\u5AE6\u5AD8\u5ADC\u5B09\u5B17\u5B16\u5B32\u5B37\u5B40\u5C15\u5C1C\u5B5A\u5B65\u5B73\u5B51\u5B53\u5B62\u9A75\u9A77\u9A78\u9A7A\u9A7F\u9A7D\u9A80\u9A81\u9A85\u9A88\u9A8A\u9A90\u9A92\u9A93\u9A96\u9A98\u9A9B\u9A9C\u9A9D\u9A9F\u9AA0\u9AA2\u9AA3\u9AA5\u9AA7\u7E9F\u7EA1\u7EA3\u7EA5\u7EA8\u7EA9"],["e740","\u93CE",7,"\u93D7",54],["e780","\u940E",32,"\u7EAD\u7EB0\u7EBE\u7EC0\u7EC1\u7EC2\u7EC9\u7ECB\u7ECC\u7ED0\u7ED4\u7ED7\u7EDB\u7EE0\u7EE1\u7EE8\u7EEB\u7EEE\u7EEF\u7EF1\u7EF2\u7F0D\u7EF6\u7EFA\u7EFB\u7EFE\u7F01\u7F02\u7F03\u7F07\u7F08\u7F0B\u7F0C\u7F0F\u7F11\u7F12\u7F17\u7F19\u7F1C\u7F1B\u7F1F\u7F21",6,"\u7F2A\u7F2B\u7F2C\u7F2D\u7F2F",4,"\u7F35\u5E7A\u757F\u5DDB\u753E\u9095\u738E\u7391\u73AE\u73A2\u739F\u73CF\u73C2\u73D1\u73B7\u73B3\u73C0\u73C9\u73C8\u73E5\u73D9\u987C\u740A\u73E9\u73E7\u73DE\u73BA\u73F2\u740F\u742A\u745B\u7426\u7425\u7428\u7430\u742E\u742C"],["e840","\u942F",14,"\u943F",43,"\u946C\u946D\u946E\u946F"],["e880","\u9470",20,"\u9491\u9496\u9498\u94C7\u94CF\u94D3\u94D4\u94DA\u94E6\u94FB\u951C\u9520\u741B\u741A\u7441\u745C\u7457\u7455\u7459\u7477\u746D\u747E\u749C\u748E\u7480\u7481\u7487\u748B\u749E\u74A8\u74A9\u7490\u74A7\u74D2\u74BA\u97EA\u97EB\u97EC\u674C\u6753\u675E\u6748\u6769\u67A5\u6787\u676A\u6773\u6798\u67A7\u6775\u67A8\u679E\u67AD\u678B\u6777\u677C\u67F0\u6809\u67D8\u680A\u67E9\u67B0\u680C\u67D9\u67B5\u67DA\u67B3\u67DD\u6800\u67C3\u67B8\u67E2\u680E\u67C1\u67FD\u6832\u6833\u6860\u6861\u684E\u6862\u6844\u6864\u6883\u681D\u6855\u6866\u6841\u6867\u6840\u683E\u684A\u6849\u6829\u68B5\u688F\u6874\u6877\u6893\u686B\u68C2\u696E\u68FC\u691F\u6920\u68F9"],["e940","\u9527\u9533\u953D\u9543\u9548\u954B\u9555\u955A\u9560\u956E\u9574\u9575\u9577",7,"\u9580",42],["e980","\u95AB",32,"\u6924\u68F0\u690B\u6901\u6957\u68E3\u6910\u6971\u6939\u6960\u6942\u695D\u6984\u696B\u6980\u6998\u6978\u6934\u69CC\u6987\u6988\u69CE\u6989\u6966\u6963\u6979\u699B\u69A7\u69BB\u69AB\u69AD\u69D4\u69B1\u69C1\u69CA\u69DF\u6995\u69E0\u698D\u69FF\u6A2F\u69ED\u6A17\u6A18\u6A65\u69F2\u6A44\u6A3E\u6AA0\u6A50\u6A5B\u6A35\u6A8E\u6A79\u6A3D\u6A28\u6A58\u6A7C\u6A91\u6A90\u6AA9\u6A97\u6AAB\u7337\u7352\u6B81\u6B82\u6B87\u6B84\u6B92\u6B93\u6B8D\u6B9A\u6B9B\u6BA1\u6BAA\u8F6B\u8F6D\u8F71\u8F72\u8F73\u8F75\u8F76\u8F78\u8F77\u8F79\u8F7A\u8F7C\u8F7E\u8F81\u8F82\u8F84\u8F87\u8F8B"],["ea40","\u95CC",27,"\u95EC\u95FF\u9607\u9613\u9618\u961B\u961E\u9620\u9623",6,"\u962B\u962C\u962D\u962F\u9630\u9637\u9638\u9639\u963A\u963E\u9641\u9643\u964A\u964E\u964F\u9651\u9652\u9653\u9656\u9657"],["ea80","\u9658\u9659\u965A\u965C\u965D\u965E\u9660\u9663\u9665\u9666\u966B\u966D",4,"\u9673\u9678",12,"\u9687\u9689\u968A\u8F8D\u8F8E\u8F8F\u8F98\u8F9A\u8ECE\u620B\u6217\u621B\u621F\u6222\u6221\u6225\u6224\u622C\u81E7\u74EF\u74F4\u74FF\u750F\u7511\u7513\u6534\u65EE\u65EF\u65F0\u660A\u6619\u6772\u6603\u6615\u6600\u7085\u66F7\u661D\u6634\u6631\u6636\u6635\u8006\u665F\u6654\u6641\u664F\u6656\u6661\u6657\u6677\u6684\u668C\u66A7\u669D\u66BE\u66DB\u66DC\u66E6\u66E9\u8D32\u8D33\u8D36\u8D3B\u8D3D\u8D40\u8D45\u8D46\u8D48\u8D49\u8D47\u8D4D\u8D55\u8D59\u89C7\u89CA\u89CB\u89CC\u89CE\u89CF\u89D0\u89D1\u726E\u729F\u725D\u7266\u726F\u727E\u727F\u7284\u728B\u728D\u728F\u7292\u6308\u6332\u63B0"],["eb40","\u968C\u968E\u9691\u9692\u9693\u9695\u9696\u969A\u969B\u969D",9,"\u96A8",7,"\u96B1\u96B2\u96B4\u96B5\u96B7\u96B8\u96BA\u96BB\u96BF\u96C2\u96C3\u96C8\u96CA\u96CB\u96D0\u96D1\u96D3\u96D4\u96D6",9,"\u96E1",6,"\u96EB"],["eb80","\u96EC\u96ED\u96EE\u96F0\u96F1\u96F2\u96F4\u96F5\u96F8\u96FA\u96FB\u96FC\u96FD\u96FF\u9702\u9703\u9705\u970A\u970B\u970C\u9710\u9711\u9712\u9714\u9715\u9717",4,"\u971D\u971F\u9720\u643F\u64D8\u8004\u6BEA\u6BF3\u6BFD\u6BF5\u6BF9\u6C05\u6C07\u6C06\u6C0D\u6C15\u6C18\u6C19\u6C1A\u6C21\u6C29\u6C24\u6C2A\u6C32\u6535\u6555\u656B\u724D\u7252\u7256\u7230\u8662\u5216\u809F\u809C\u8093\u80BC\u670A\u80BD\u80B1\u80AB\u80AD\u80B4\u80B7\u80E7\u80E8\u80E9\u80EA\u80DB\u80C2\u80C4\u80D9\u80CD\u80D7\u6710\u80DD\u80EB\u80F1\u80F4\u80ED\u810D\u810E\u80F2\u80FC\u6715\u8112\u8C5A\u8136\u811E\u812C\u8118\u8132\u8148\u814C\u8153\u8174\u8159\u815A\u8171\u8160\u8169\u817C\u817D\u816D\u8167\u584D\u5AB5\u8188\u8182\u8191\u6ED5\u81A3\u81AA\u81CC\u6726\u81CA\u81BB"],["ec40","\u9721",8,"\u972B\u972C\u972E\u972F\u9731\u9733",4,"\u973A\u973B\u973C\u973D\u973F",18,"\u9754\u9755\u9757\u9758\u975A\u975C\u975D\u975F\u9763\u9764\u9766\u9767\u9768\u976A",7],["ec80","\u9772\u9775\u9777",4,"\u977D",7,"\u9786",4,"\u978C\u978E\u978F\u9790\u9793\u9795\u9796\u9797\u9799",4,"\u81C1\u81A6\u6B24\u6B37\u6B39\u6B43\u6B46\u6B59\u98D1\u98D2\u98D3\u98D5\u98D9\u98DA\u6BB3\u5F40\u6BC2\u89F3\u6590\u9F51\u6593\u65BC\u65C6\u65C4\u65C3\u65CC\u65CE\u65D2\u65D6\u7080\u709C\u7096\u709D\u70BB\u70C0\u70B7\u70AB\u70B1\u70E8\u70CA\u7110\u7113\u7116\u712F\u7131\u7173\u715C\u7168\u7145\u7172\u714A\u7178\u717A\u7198\u71B3\u71B5\u71A8\u71A0\u71E0\u71D4\u71E7\u71F9\u721D\u7228\u706C\u7118\u7166\u71B9\u623E\u623D\u6243\u6248\u6249\u793B\u7940\u7946\u7949\u795B\u795C\u7953\u795A\u7962\u7957\u7960\u796F\u7967\u797A\u7985\u798A\u799A\u79A7\u79B3\u5FD1\u5FD0"],["ed40","\u979E\u979F\u97A1\u97A2\u97A4",6,"\u97AC\u97AE\u97B0\u97B1\u97B3\u97B5",46],["ed80","\u97E4\u97E5\u97E8\u97EE",4,"\u97F4\u97F7",23,"\u603C\u605D\u605A\u6067\u6041\u6059\u6063\u60AB\u6106\u610D\u615D\u61A9\u619D\u61CB\u61D1\u6206\u8080\u807F\u6C93\u6CF6\u6DFC\u77F6\u77F8\u7800\u7809\u7817\u7818\u7811\u65AB\u782D\u781C\u781D\u7839\u783A\u783B\u781F\u783C\u7825\u782C\u7823\u7829\u784E\u786D\u7856\u7857\u7826\u7850\u7847\u784C\u786A\u789B\u7893\u789A\u7887\u789C\u78A1\u78A3\u78B2\u78B9\u78A5\u78D4\u78D9\u78C9\u78EC\u78F2\u7905\u78F4\u7913\u7924\u791E\u7934\u9F9B\u9EF9\u9EFB\u9EFC\u76F1\u7704\u770D\u76F9\u7707\u7708\u771A\u7722\u7719\u772D\u7726\u7735\u7738\u7750\u7751\u7747\u7743\u775A\u7768"],["ee40","\u980F",62],["ee80","\u984E",32,"\u7762\u7765\u777F\u778D\u777D\u7780\u778C\u7791\u779F\u77A0\u77B0\u77B5\u77BD\u753A\u7540\u754E\u754B\u7548\u755B\u7572\u7579\u7583\u7F58\u7F61\u7F5F\u8A48\u7F68\u7F74\u7F71\u7F79\u7F81\u7F7E\u76CD\u76E5\u8832\u9485\u9486\u9487\u948B\u948A\u948C\u948D\u948F\u9490\u9494\u9497\u9495\u949A\u949B\u949C\u94A3\u94A4\u94AB\u94AA\u94AD\u94AC\u94AF\u94B0\u94B2\u94B4\u94B6",4,"\u94BC\u94BD\u94BF\u94C4\u94C8",6,"\u94D0\u94D1\u94D2\u94D5\u94D6\u94D7\u94D9\u94D8\u94DB\u94DE\u94DF\u94E0\u94E2\u94E4\u94E5\u94E7\u94E8\u94EA"],["ef40","\u986F",5,"\u988B\u988E\u9892\u9895\u9899\u98A3\u98A8",37,"\u98CF\u98D0\u98D4\u98D6\u98D7\u98DB\u98DC\u98DD\u98E0",4],["ef80","\u98E5\u98E6\u98E9",30,"\u94E9\u94EB\u94EE\u94EF\u94F3\u94F4\u94F5\u94F7\u94F9\u94FC\u94FD\u94FF\u9503\u9502\u9506\u9507\u9509\u950A\u950D\u950E\u950F\u9512",4,"\u9518\u951B\u951D\u951E\u951F\u9522\u952A\u952B\u9529\u952C\u9531\u9532\u9534\u9536\u9537\u9538\u953C\u953E\u953F\u9542\u9535\u9544\u9545\u9546\u9549\u954C\u954E\u954F\u9552\u9553\u9554\u9556\u9557\u9558\u9559\u955B\u955E\u955F\u955D\u9561\u9562\u9564",8,"\u956F\u9571\u9572\u9573\u953A\u77E7\u77EC\u96C9\u79D5\u79ED\u79E3\u79EB\u7A06\u5D47\u7A03\u7A02\u7A1E\u7A14"],["f040","\u9908",4,"\u990E\u990F\u9911",28,"\u992F",26],["f080","\u994A",9,"\u9956",12,"\u9964\u9966\u9973\u9978\u9979\u997B\u997E\u9982\u9983\u9989\u7A39\u7A37\u7A51\u9ECF\u99A5\u7A70\u7688\u768E\u7693\u7699\u76A4\u74DE\u74E0\u752C\u9E20\u9E22\u9E28",4,"\u9E32\u9E31\u9E36\u9E38\u9E37\u9E39\u9E3A\u9E3E\u9E41\u9E42\u9E44\u9E46\u9E47\u9E48\u9E49\u9E4B\u9E4C\u9E4E\u9E51\u9E55\u9E57\u9E5A\u9E5B\u9E5C\u9E5E\u9E63\u9E66",6,"\u9E71\u9E6D\u9E73\u7592\u7594\u7596\u75A0\u759D\u75AC\u75A3\u75B3\u75B4\u75B8\u75C4\u75B1\u75B0\u75C3\u75C2\u75D6\u75CD\u75E3\u75E8\u75E6\u75E4\u75EB\u75E7\u7603\u75F1\u75FC\u75FF\u7610\u7600\u7605\u760C\u7617\u760A\u7625\u7618\u7615\u7619"],["f140","\u998C\u998E\u999A",10,"\u99A6\u99A7\u99A9",47],["f180","\u99D9",32,"\u761B\u763C\u7622\u7620\u7640\u762D\u7630\u763F\u7635\u7643\u763E\u7633\u764D\u765E\u7654\u765C\u7656\u766B\u766F\u7FCA\u7AE6\u7A78\u7A79\u7A80\u7A86\u7A88\u7A95\u7AA6\u7AA0\u7AAC\u7AA8\u7AAD\u7AB3\u8864\u8869\u8872\u887D\u887F\u8882\u88A2\u88C6\u88B7\u88BC\u88C9\u88E2\u88CE\u88E3\u88E5\u88F1\u891A\u88FC\u88E8\u88FE\u88F0\u8921\u8919\u8913\u891B\u890A\u8934\u892B\u8936\u8941\u8966\u897B\u758B\u80E5\u76B2\u76B4\u77DC\u8012\u8014\u8016\u801C\u8020\u8022\u8025\u8026\u8027\u8029\u8028\u8031\u800B\u8035\u8043\u8046\u804D\u8052\u8069\u8071\u8983\u9878\u9880\u9883"],["f240","\u99FA",62],["f280","\u9A39",32,"\u9889\u988C\u988D\u988F\u9894\u989A\u989B\u989E\u989F\u98A1\u98A2\u98A5\u98A6\u864D\u8654\u866C\u866E\u867F\u867A\u867C\u867B\u86A8\u868D\u868B\u86AC\u869D\u86A7\u86A3\u86AA\u8693\u86A9\u86B6\u86C4\u86B5\u86CE\u86B0\u86BA\u86B1\u86AF\u86C9\u86CF\u86B4\u86E9\u86F1\u86F2\u86ED\u86F3\u86D0\u8713\u86DE\u86F4\u86DF\u86D8\u86D1\u8703\u8707\u86F8\u8708\u870A\u870D\u8709\u8723\u873B\u871E\u8725\u872E\u871A\u873E\u8748\u8734\u8731\u8729\u8737\u873F\u8782\u8722\u877D\u877E\u877B\u8760\u8770\u874C\u876E\u878B\u8753\u8763\u877C\u8764\u8759\u8765\u8793\u87AF\u87A8\u87D2"],["f340","\u9A5A",17,"\u9A72\u9A83\u9A89\u9A8D\u9A8E\u9A94\u9A95\u9A99\u9AA6\u9AA9",6,"\u9AB2\u9AB3\u9AB4\u9AB5\u9AB9\u9ABB\u9ABD\u9ABE\u9ABF\u9AC3\u9AC4\u9AC6",4,"\u9ACD\u9ACE\u9ACF\u9AD0\u9AD2\u9AD4\u9AD5\u9AD6\u9AD7\u9AD9\u9ADA\u9ADB\u9ADC"],["f380","\u9ADD\u9ADE\u9AE0\u9AE2\u9AE3\u9AE4\u9AE5\u9AE7\u9AE8\u9AE9\u9AEA\u9AEC\u9AEE\u9AF0",8,"\u9AFA\u9AFC",6,"\u9B04\u9B05\u9B06\u87C6\u8788\u8785\u87AD\u8797\u8783\u87AB\u87E5\u87AC\u87B5\u87B3\u87CB\u87D3\u87BD\u87D1\u87C0\u87CA\u87DB\u87EA\u87E0\u87EE\u8816\u8813\u87FE\u880A\u881B\u8821\u8839\u883C\u7F36\u7F42\u7F44\u7F45\u8210\u7AFA\u7AFD\u7B08\u7B03\u7B04\u7B15\u7B0A\u7B2B\u7B0F\u7B47\u7B38\u7B2A\u7B19\u7B2E\u7B31\u7B20\u7B25\u7B24\u7B33\u7B3E\u7B1E\u7B58\u7B5A\u7B45\u7B75\u7B4C\u7B5D\u7B60\u7B6E\u7B7B\u7B62\u7B72\u7B71\u7B90\u7BA6\u7BA7\u7BB8\u7BAC\u7B9D\u7BA8\u7B85\u7BAA\u7B9C\u7BA2\u7BAB\u7BB4\u7BD1\u7BC1\u7BCC\u7BDD\u7BDA\u7BE5\u7BE6\u7BEA\u7C0C\u7BFE\u7BFC\u7C0F\u7C16\u7C0B"],["f440","\u9B07\u9B09",5,"\u9B10\u9B11\u9B12\u9B14",10,"\u9B20\u9B21\u9B22\u9B24",10,"\u9B30\u9B31\u9B33",7,"\u9B3D\u9B3E\u9B3F\u9B40\u9B46\u9B4A\u9B4B\u9B4C\u9B4E\u9B50\u9B52\u9B53\u9B55",5],["f480","\u9B5B",32,"\u7C1F\u7C2A\u7C26\u7C38\u7C41\u7C40\u81FE\u8201\u8202\u8204\u81EC\u8844\u8221\u8222\u8223\u822D\u822F\u8228\u822B\u8238\u823B\u8233\u8234\u823E\u8244\u8249\u824B\u824F\u825A\u825F\u8268\u887E\u8885\u8888\u88D8\u88DF\u895E\u7F9D\u7F9F\u7FA7\u7FAF\u7FB0\u7FB2\u7C7C\u6549\u7C91\u7C9D\u7C9C\u7C9E\u7CA2\u7CB2\u7CBC\u7CBD\u7CC1\u7CC7\u7CCC\u7CCD\u7CC8\u7CC5\u7CD7\u7CE8\u826E\u66A8\u7FBF\u7FCE\u7FD5\u7FE5\u7FE1\u7FE6\u7FE9\u7FEE\u7FF3\u7CF8\u7D77\u7DA6\u7DAE\u7E47\u7E9B\u9EB8\u9EB4\u8D73\u8D84\u8D94\u8D91\u8DB1\u8D67\u8D6D\u8C47\u8C49\u914A\u9150\u914E\u914F\u9164"],["f540","\u9B7C",62],["f580","\u9BBB",32,"\u9162\u9161\u9170\u9169\u916F\u917D\u917E\u9172\u9174\u9179\u918C\u9185\u9190\u918D\u9191\u91A2\u91A3\u91AA\u91AD\u91AE\u91AF\u91B5\u91B4\u91BA\u8C55\u9E7E\u8DB8\u8DEB\u8E05\u8E59\u8E69\u8DB5\u8DBF\u8DBC\u8DBA\u8DC4\u8DD6\u8DD7\u8DDA\u8DDE\u8DCE\u8DCF\u8DDB\u8DC6\u8DEC\u8DF7\u8DF8\u8DE3\u8DF9\u8DFB\u8DE4\u8E09\u8DFD\u8E14\u8E1D\u8E1F\u8E2C\u8E2E\u8E23\u8E2F\u8E3A\u8E40\u8E39\u8E35\u8E3D\u8E31\u8E49\u8E41\u8E42\u8E51\u8E52\u8E4A\u8E70\u8E76\u8E7C\u8E6F\u8E74\u8E85\u8E8F\u8E94\u8E90\u8E9C\u8E9E\u8C78\u8C82\u8C8A\u8C85\u8C98\u8C94\u659B\u89D6\u89DE\u89DA\u89DC"],["f640","\u9BDC",62],["f680","\u9C1B",32,"\u89E5\u89EB\u89EF\u8A3E\u8B26\u9753\u96E9\u96F3\u96EF\u9706\u9701\u9708\u970F\u970E\u972A\u972D\u9730\u973E\u9F80\u9F83\u9F85",5,"\u9F8C\u9EFE\u9F0B\u9F0D\u96B9\u96BC\u96BD\u96CE\u96D2\u77BF\u96E0\u928E\u92AE\u92C8\u933E\u936A\u93CA\u938F\u943E\u946B\u9C7F\u9C82\u9C85\u9C86\u9C87\u9C88\u7A23\u9C8B\u9C8E\u9C90\u9C91\u9C92\u9C94\u9C95\u9C9A\u9C9B\u9C9E",5,"\u9CA5",4,"\u9CAB\u9CAD\u9CAE\u9CB0",7,"\u9CBA\u9CBB\u9CBC\u9CBD\u9CC4\u9CC5\u9CC6\u9CC7\u9CCA\u9CCB"],["f740","\u9C3C",62],["f780","\u9C7B\u9C7D\u9C7E\u9C80\u9C83\u9C84\u9C89\u9C8A\u9C8C\u9C8F\u9C93\u9C96\u9C97\u9C98\u9C99\u9C9D\u9CAA\u9CAC\u9CAF\u9CB9\u9CBE",4,"\u9CC8\u9CC9\u9CD1\u9CD2\u9CDA\u9CDB\u9CE0\u9CE1\u9CCC",4,"\u9CD3\u9CD4\u9CD5\u9CD7\u9CD8\u9CD9\u9CDC\u9CDD\u9CDF\u9CE2\u977C\u9785\u9791\u9792\u9794\u97AF\u97AB\u97A3\u97B2\u97B4\u9AB1\u9AB0\u9AB7\u9E58\u9AB6\u9ABA\u9ABC\u9AC1\u9AC0\u9AC5\u9AC2\u9ACB\u9ACC\u9AD1\u9B45\u9B43\u9B47\u9B49\u9B48\u9B4D\u9B51\u98E8\u990D\u992E\u9955\u9954\u9ADF\u9AE1\u9AE6\u9AEF\u9AEB\u9AFB\u9AED\u9AF9\u9B08\u9B0F\u9B13\u9B1F\u9B23\u9EBD\u9EBE\u7E3B\u9E82\u9E87\u9E88\u9E8B\u9E92\u93D6\u9E9D\u9E9F\u9EDB\u9EDC\u9EDD\u9EE0\u9EDF\u9EE2\u9EE9\u9EE7\u9EE5\u9EEA\u9EEF\u9F22\u9F2C\u9F2F\u9F39\u9F37\u9F3D\u9F3E\u9F44"],["f840","\u9CE3",62],["f880","\u9D22",32],["f940","\u9D43",62],["f980","\u9D82",32],["fa40","\u9DA3",62],["fa80","\u9DE2",32],["fb40","\u9E03",27,"\u9E24\u9E27\u9E2E\u9E30\u9E34\u9E3B\u9E3C\u9E40\u9E4D\u9E50\u9E52\u9E53\u9E54\u9E56\u9E59\u9E5D\u9E5F\u9E60\u9E61\u9E62\u9E65\u9E6E\u9E6F\u9E72\u9E74",9,"\u9E80"],["fb80","\u9E81\u9E83\u9E84\u9E85\u9E86\u9E89\u9E8A\u9E8C",5,"\u9E94",8,"\u9E9E\u9EA0",5,"\u9EA7\u9EA8\u9EA9\u9EAA"],["fc40","\u9EAB",8,"\u9EB5\u9EB6\u9EB7\u9EB9\u9EBA\u9EBC\u9EBF",4,"\u9EC5\u9EC6\u9EC7\u9EC8\u9ECA\u9ECB\u9ECC\u9ED0\u9ED2\u9ED3\u9ED5\u9ED6\u9ED7\u9ED9\u9EDA\u9EDE\u9EE1\u9EE3\u9EE4\u9EE6\u9EE8\u9EEB\u9EEC\u9EED\u9EEE\u9EF0",8,"\u9EFA\u9EFD\u9EFF",6],["fc80","\u9F06",4,"\u9F0C\u9F0F\u9F11\u9F12\u9F14\u9F15\u9F16\u9F18\u9F1A",5,"\u9F21\u9F23",8,"\u9F2D\u9F2E\u9F30\u9F31"],["fd40","\u9F32",4,"\u9F38\u9F3A\u9F3C\u9F3F",4,"\u9F45",10,"\u9F52",38],["fd80","\u9F79",5,"\u9F81\u9F82\u9F8D",11,"\u9F9C\u9F9D\u9F9E\u9FA1",4,"\uF92C\uF979\uF995\uF9E7\uF9F1"],["fe40","\uFA0C\uFA0D\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA18\uFA1F\uFA20\uFA21\uFA23\uFA24\uFA27\uFA28\uFA29"]]});var lU0=o((bz5,JS6)=>{JS6.exports=[["a140","\uE4C6",62],["a180","\uE505",32],["a240","\uE526",62],["a280","\uE565",32],["a2ab","\uE766",5],["a2e3","\u20AC\uE76D"],["a2ef","\uE76E\uE76F"],["a2fd","\uE770\uE771"],["a340","\uE586",62],["a380","\uE5C5",31,"\u3000"],["a440","\uE5E6",62],["a480","\uE625",32],["a4f4","\uE772",10],["a540","\uE646",62],["a580","\uE685",32],["a5f7","\uE77D",7],["a640","\uE6A6",62],["a680","\uE6E5",32],["a6b9","\uE785",7],["a6d9","\uE78D",6],["a6ec","\uE794\uE795"],["a6f3","\uE796"],["a6f6","\uE797",8],["a740","\uE706",62],["a780","\uE745",32],["a7c2","\uE7A0",14],["a7f2","\uE7AF",12],["a896","\uE7BC",10],["a8bc","\u1E3F"],["a8bf","\u01F9"],["a8c1","\uE7C9\uE7CA\uE7CB\uE7CC"],["a8ea","\uE7CD",20],["a958","\uE7E2"],["a95b","\uE7E3"],["a95d","\uE7E4\uE7E5\uE7E6"],["a989","\u303E\u2FF0",11],["a997","\uE7F4",12],["a9f0","\uE801",14],["aaa1","\uE000",93],["aba1","\uE05E",93],["aca1","\uE0BC",93],["ada1","\uE11A",93],["aea1","\uE178",93],["afa1","\uE1D6",93],["d7fa","\uE810",4],["f8a1","\uE234",93],["f9a1","\uE292",93],["faa1","\uE2F0",93],["fba1","\uE34E",93],["fca1","\uE3AC",93],["fda1","\uE40A",93],["fe50","\u2E81\uE816\uE817\uE818\u2E84\u3473\u3447\u2E88\u2E8B\uE81E\u359E\u361A\u360E\u2E8C\u2E97\u396E\u3918\uE826\u39CF\u39DF\u3A73\u39D0\uE82B\uE82C\u3B4E\u3C6E\u3CE0\u2EA7\uE831\uE832\u2EAA\u4056\u415F\u2EAE\u4337\u2EB3\u2EB6\u2EB7\uE83B\u43B1\u43AC\u2EBB\u43DD\u44D6\u4661\u464C\uE843"],["fe80","\u4723\u4729\u477C\u478D\u2ECA\u4947\u497A\u497D\u4982\u4983\u4985\u4986\u499F\u499B\u49B7\u49B6\uE854\uE855\u4CA3\u4C9F\u4CA0\u4CA1\u4C77\u4CA2\u4D13",6,"\u4DAE\uE864\uE468",93],["8135f437","\uE7C7"]]});var hQ1=o((hz5,QS6)=>{QS6.exports={uChars:[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],gbChars:[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]}});var fQ1=o((fz5,WS6)=>{WS6.exports=[["0","\x00",127],["8141","\uAC02\uAC03\uAC05\uAC06\uAC0B",4,"\uAC18\uAC1E\uAC1F\uAC21\uAC22\uAC23\uAC25",6,"\uAC2E\uAC32\uAC33\uAC34"],["8161","\uAC35\uAC36\uAC37\uAC3A\uAC3B\uAC3D\uAC3E\uAC3F\uAC41",9,"\uAC4C\uAC4E",5,"\uAC55"],["8181","\uAC56\uAC57\uAC59\uAC5A\uAC5B\uAC5D",18,"\uAC72\uAC73\uAC75\uAC76\uAC79\uAC7B",4,"\uAC82\uAC87\uAC88\uAC8D\uAC8E\uAC8F\uAC91\uAC92\uAC93\uAC95",6,"\uAC9E\uACA2",5,"\uACAB\uACAD\uACAE\uACB1",6,"\uACBA\uACBE\uACBF\uACC0\uACC2\uACC3\uACC5\uACC6\uACC7\uACC9\uACCA\uACCB\uACCD",7,"\uACD6\uACD8",7,"\uACE2\uACE3\uACE5\uACE6\uACE9\uACEB\uACED\uACEE\uACF2\uACF4\uACF7",4,"\uACFE\uACFF\uAD01\uAD02\uAD03\uAD05\uAD07",4,"\uAD0E\uAD10\uAD12\uAD13"],["8241","\uAD14\uAD15\uAD16\uAD17\uAD19\uAD1A\uAD1B\uAD1D\uAD1E\uAD1F\uAD21",7,"\uAD2A\uAD2B\uAD2E",5],["8261","\uAD36\uAD37\uAD39\uAD3A\uAD3B\uAD3D",6,"\uAD46\uAD48\uAD4A",5,"\uAD51\uAD52\uAD53\uAD55\uAD56\uAD57"],["8281","\uAD59",7,"\uAD62\uAD64",7,"\uAD6E\uAD6F\uAD71\uAD72\uAD77\uAD78\uAD79\uAD7A\uAD7E\uAD80\uAD83",4,"\uAD8A\uAD8B\uAD8D\uAD8E\uAD8F\uAD91",10,"\uAD9E",5,"\uADA5",17,"\uADB8",7,"\uADC2\uADC3\uADC5\uADC6\uADC7\uADC9",6,"\uADD2\uADD4",7,"\uADDD\uADDE\uADDF\uADE1\uADE2\uADE3\uADE5",18],["8341","\uADFA\uADFB\uADFD\uADFE\uAE02",5,"\uAE0A\uAE0C\uAE0E",5,"\uAE15",7],["8361","\uAE1D",18,"\uAE32\uAE33\uAE35\uAE36\uAE39\uAE3B\uAE3C"],["8381","\uAE3D\uAE3E\uAE3F\uAE42\uAE44\uAE47\uAE48\uAE49\uAE4B\uAE4F\uAE51\uAE52\uAE53\uAE55\uAE57",4,"\uAE5E\uAE62\uAE63\uAE64\uAE66\uAE67\uAE6A\uAE6B\uAE6D\uAE6E\uAE6F\uAE71",6,"\uAE7A\uAE7E",5,"\uAE86",5,"\uAE8D",46,"\uAEBF\uAEC1\uAEC2\uAEC3\uAEC5",6,"\uAECE\uAED2",5,"\uAEDA\uAEDB\uAEDD",8],["8441","\uAEE6\uAEE7\uAEE9\uAEEA\uAEEC\uAEEE",5,"\uAEF5\uAEF6\uAEF7\uAEF9\uAEFA\uAEFB\uAEFD",8],["8461","\uAF06\uAF09\uAF0A\uAF0B\uAF0C\uAF0E\uAF0F\uAF11",18],["8481","\uAF24",7,"\uAF2E\uAF2F\uAF31\uAF33\uAF35",6,"\uAF3E\uAF40\uAF44\uAF45\uAF46\uAF47\uAF4A",5,"\uAF51",10,"\uAF5E",5,"\uAF66",18,"\uAF7A",5,"\uAF81\uAF82\uAF83\uAF85\uAF86\uAF87\uAF89",6,"\uAF92\uAF93\uAF94\uAF96",5,"\uAF9D",26,"\uAFBA\uAFBB\uAFBD\uAFBE"],["8541","\uAFBF\uAFC1",5,"\uAFCA\uAFCC\uAFCF",4,"\uAFD5",6,"\uAFDD",4],["8561","\uAFE2",5,"\uAFEA",5,"\uAFF2\uAFF3\uAFF5\uAFF6\uAFF7\uAFF9",6,"\uB002\uB003"],["8581","\uB005",6,"\uB00D\uB00E\uB00F\uB011\uB012\uB013\uB015",6,"\uB01E",9,"\uB029",26,"\uB046\uB047\uB049\uB04B\uB04D\uB04F\uB050\uB051\uB052\uB056\uB058\uB05A\uB05B\uB05C\uB05E",29,"\uB07E\uB07F\uB081\uB082\uB083\uB085",6,"\uB08E\uB090\uB092",5,"\uB09B\uB09D\uB09E\uB0A3\uB0A4"],["8641","\uB0A5\uB0A6\uB0A7\uB0AA\uB0B0\uB0B2\uB0B6\uB0B7\uB0B9\uB0BA\uB0BB\uB0BD",6,"\uB0C6\uB0CA",5,"\uB0D2"],["8661","\uB0D3\uB0D5\uB0D6\uB0D7\uB0D9",6,"\uB0E1\uB0E2\uB0E3\uB0E4\uB0E6",10],["8681","\uB0F1",22,"\uB10A\uB10D\uB10E\uB10F\uB111\uB114\uB115\uB116\uB117\uB11A\uB11E",4,"\uB126\uB127\uB129\uB12A\uB12B\uB12D",6,"\uB136\uB13A",5,"\uB142\uB143\uB145\uB146\uB147\uB149",6,"\uB152\uB153\uB156\uB157\uB159\uB15A\uB15B\uB15D\uB15E\uB15F\uB161",22,"\uB17A\uB17B\uB17D\uB17E\uB17F\uB181\uB183",4,"\uB18A\uB18C\uB18E\uB18F\uB190\uB191\uB195\uB196\uB197\uB199\uB19A\uB19B\uB19D"],["8741","\uB19E",9,"\uB1A9",15],["8761","\uB1B9",18,"\uB1CD\uB1CE\uB1CF\uB1D1\uB1D2\uB1D3\uB1D5"],["8781","\uB1D6",5,"\uB1DE\uB1E0",7,"\uB1EA\uB1EB\uB1ED\uB1EE\uB1EF\uB1F1",7,"\uB1FA\uB1FC\uB1FE",5,"\uB206\uB207\uB209\uB20A\uB20D",6,"\uB216\uB218\uB21A",5,"\uB221",18,"\uB235",6,"\uB23D",26,"\uB259\uB25A\uB25B\uB25D\uB25E\uB25F\uB261",6,"\uB26A",4],["8841","\uB26F",4,"\uB276",5,"\uB27D",6,"\uB286\uB287\uB288\uB28A",4],["8861","\uB28F\uB292\uB293\uB295\uB296\uB297\uB29B",4,"\uB2A2\uB2A4\uB2A7\uB2A8\uB2A9\uB2AB\uB2AD\uB2AE\uB2AF\uB2B1\uB2B2\uB2B3\uB2B5\uB2B6\uB2B7"],["8881","\uB2B8",15,"\uB2CA\uB2CB\uB2CD\uB2CE\uB2CF\uB2D1\uB2D3",4,"\uB2DA\uB2DC\uB2DE\uB2DF\uB2E0\uB2E1\uB2E3\uB2E7\uB2E9\uB2EA\uB2F0\uB2F1\uB2F2\uB2F6\uB2FC\uB2FD\uB2FE\uB302\uB303\uB305\uB306\uB307\uB309",6,"\uB312\uB316",5,"\uB31D",54,"\uB357\uB359\uB35A\uB35D\uB360\uB361\uB362\uB363"],["8941","\uB366\uB368\uB36A\uB36C\uB36D\uB36F\uB372\uB373\uB375\uB376\uB377\uB379",6,"\uB382\uB386",5,"\uB38D"],["8961","\uB38E\uB38F\uB391\uB392\uB393\uB395",10,"\uB3A2",5,"\uB3A9\uB3AA\uB3AB\uB3AD"],["8981","\uB3AE",21,"\uB3C6\uB3C7\uB3C9\uB3CA\uB3CD\uB3CF\uB3D1\uB3D2\uB3D3\uB3D6\uB3D8\uB3DA\uB3DC\uB3DE\uB3DF\uB3E1\uB3E2\uB3E3\uB3E5\uB3E6\uB3E7\uB3E9",18,"\uB3FD",18,"\uB411",6,"\uB419\uB41A\uB41B\uB41D\uB41E\uB41F\uB421",6,"\uB42A\uB42C",7,"\uB435",15],["8a41","\uB445",10,"\uB452\uB453\uB455\uB456\uB457\uB459",6,"\uB462\uB464\uB466"],["8a61","\uB467",4,"\uB46D",18,"\uB481\uB482"],["8a81","\uB483",4,"\uB489",19,"\uB49E",5,"\uB4A5\uB4A6\uB4A7\uB4A9\uB4AA\uB4AB\uB4AD",7,"\uB4B6\uB4B8\uB4BA",5,"\uB4C1\uB4C2\uB4C3\uB4C5\uB4C6\uB4C7\uB4C9",6,"\uB4D1\uB4D2\uB4D3\uB4D4\uB4D6",5,"\uB4DE\uB4DF\uB4E1\uB4E2\uB4E5\uB4E7",4,"\uB4EE\uB4F0\uB4F2",5,"\uB4F9",26,"\uB516\uB517\uB519\uB51A\uB51D"],["8b41","\uB51E",5,"\uB526\uB52B",4,"\uB532\uB533\uB535\uB536\uB537\uB539",6,"\uB542\uB546"],["8b61","\uB547\uB548\uB549\uB54A\uB54E\uB54F\uB551\uB552\uB553\uB555",6,"\uB55E\uB562",8],["8b81","\uB56B",52,"\uB5A2\uB5A3\uB5A5\uB5A6\uB5A7\uB5A9\uB5AC\uB5AD\uB5AE\uB5AF\uB5B2\uB5B6",4,"\uB5BE\uB5BF\uB5C1\uB5C2\uB5C3\uB5C5",6,"\uB5CE\uB5D2",5,"\uB5D9",18,"\uB5ED",18],["8c41","\uB600",15,"\uB612\uB613\uB615\uB616\uB617\uB619",4],["8c61","\uB61E",6,"\uB626",5,"\uB62D",6,"\uB635",5],["8c81","\uB63B",12,"\uB649",26,"\uB665\uB666\uB667\uB669",50,"\uB69E\uB69F\uB6A1\uB6A2\uB6A3\uB6A5",5,"\uB6AD\uB6AE\uB6AF\uB6B0\uB6B2",16],["8d41","\uB6C3",16,"\uB6D5",8],["8d61","\uB6DE",17,"\uB6F1\uB6F2\uB6F3\uB6F5\uB6F6\uB6F7\uB6F9\uB6FA"],["8d81","\uB6FB",4,"\uB702\uB703\uB704\uB706",33,"\uB72A\uB72B\uB72D\uB72E\uB731",6,"\uB73A\uB73C",7,"\uB745\uB746\uB747\uB749\uB74A\uB74B\uB74D",6,"\uB756",9,"\uB761\uB762\uB763\uB765\uB766\uB767\uB769",6,"\uB772\uB774\uB776",5,"\uB77E\uB77F\uB781\uB782\uB783\uB785",6,"\uB78E\uB793\uB794\uB795\uB79A\uB79B\uB79D\uB79E"],["8e41","\uB79F\uB7A1",6,"\uB7AA\uB7AE",5,"\uB7B6\uB7B7\uB7B9",8],["8e61","\uB7C2",4,"\uB7C8\uB7CA",19],["8e81","\uB7DE",13,"\uB7EE\uB7EF\uB7F1\uB7F2\uB7F3\uB7F5",6,"\uB7FE\uB802",4,"\uB80A\uB80B\uB80D\uB80E\uB80F\uB811",6,"\uB81A\uB81C\uB81E",5,"\uB826\uB827\uB829\uB82A\uB82B\uB82D",6,"\uB836\uB83A",5,"\uB841\uB842\uB843\uB845",11,"\uB852\uB854",7,"\uB85E\uB85F\uB861\uB862\uB863\uB865",6,"\uB86E\uB870\uB872",5,"\uB879\uB87A\uB87B\uB87D",7],["8f41","\uB885",7,"\uB88E",17],["8f61","\uB8A0",7,"\uB8A9",6,"\uB8B1\uB8B2\uB8B3\uB8B5\uB8B6\uB8B7\uB8B9",4],["8f81","\uB8BE\uB8BF\uB8C2\uB8C4\uB8C6",5,"\uB8CD\uB8CE\uB8CF\uB8D1\uB8D2\uB8D3\uB8D5",7,"\uB8DE\uB8E0\uB8E2",5,"\uB8EA\uB8EB\uB8ED\uB8EE\uB8EF\uB8F1",6,"\uB8FA\uB8FC\uB8FE",5,"\uB905",18,"\uB919",6,"\uB921",26,"\uB93E\uB93F\uB941\uB942\uB943\uB945",6,"\uB94D\uB94E\uB950\uB952",5],["9041","\uB95A\uB95B\uB95D\uB95E\uB95F\uB961",6,"\uB96A\uB96C\uB96E",5,"\uB976\uB977\uB979\uB97A\uB97B\uB97D"],["9061","\uB97E",5,"\uB986\uB988\uB98B\uB98C\uB98F",15],["9081","\uB99F",12,"\uB9AE\uB9AF\uB9B1\uB9B2\uB9B3\uB9B5",6,"\uB9BE\uB9C0\uB9C2",5,"\uB9CA\uB9CB\uB9CD\uB9D3",4,"\uB9DA\uB9DC\uB9DF\uB9E0\uB9E2\uB9E6\uB9E7\uB9E9\uB9EA\uB9EB\uB9ED",6,"\uB9F6\uB9FB",4,"\uBA02",5,"\uBA09",11,"\uBA16",33,"\uBA3A\uBA3B\uBA3D\uBA3E\uBA3F\uBA41\uBA43\uBA44\uBA45\uBA46"],["9141","\uBA47\uBA4A\uBA4C\uBA4F\uBA50\uBA51\uBA52\uBA56\uBA57\uBA59\uBA5A\uBA5B\uBA5D",6,"\uBA66\uBA6A",5],["9161","\uBA72\uBA73\uBA75\uBA76\uBA77\uBA79",9,"\uBA86\uBA88\uBA89\uBA8A\uBA8B\uBA8D",5],["9181","\uBA93",20,"\uBAAA\uBAAD\uBAAE\uBAAF\uBAB1\uBAB3",4,"\uBABA\uBABC\uBABE",5,"\uBAC5\uBAC6\uBAC7\uBAC9",14,"\uBADA",33,"\uBAFD\uBAFE\uBAFF\uBB01\uBB02\uBB03\uBB05",7,"\uBB0E\uBB10\uBB12",5,"\uBB19\uBB1A\uBB1B\uBB1D\uBB1E\uBB1F\uBB21",6],["9241","\uBB28\uBB2A\uBB2C",7,"\uBB37\uBB39\uBB3A\uBB3F",4,"\uBB46\uBB48\uBB4A\uBB4B\uBB4C\uBB4E\uBB51\uBB52"],["9261","\uBB53\uBB55\uBB56\uBB57\uBB59",7,"\uBB62\uBB64",7,"\uBB6D",4],["9281","\uBB72",21,"\uBB89\uBB8A\uBB8B\uBB8D\uBB8E\uBB8F\uBB91",18,"\uBBA5\uBBA6\uBBA7\uBBA9\uBBAA\uBBAB\uBBAD",6,"\uBBB5\uBBB6\uBBB8",7,"\uBBC1\uBBC2\uBBC3\uBBC5\uBBC6\uBBC7\uBBC9",6,"\uBBD1\uBBD2\uBBD4",35,"\uBBFA\uBBFB\uBBFD\uBBFE\uBC01"],["9341","\uBC03",4,"\uBC0A\uBC0E\uBC10\uBC12\uBC13\uBC19\uBC1A\uBC20\uBC21\uBC22\uBC23\uBC26\uBC28\uBC2A\uBC2B\uBC2C\uBC2E\uBC2F\uBC32\uBC33\uBC35"],["9361","\uBC36\uBC37\uBC39",6,"\uBC42\uBC46\uBC47\uBC48\uBC4A\uBC4B\uBC4E\uBC4F\uBC51",8],["9381","\uBC5A\uBC5B\uBC5C\uBC5E",37,"\uBC86\uBC87\uBC89\uBC8A\uBC8D\uBC8F",4,"\uBC96\uBC98\uBC9B",4,"\uBCA2\uBCA3\uBCA5\uBCA6\uBCA9",6,"\uBCB2\uBCB6",5,"\uBCBE\uBCBF\uBCC1\uBCC2\uBCC3\uBCC5",7,"\uBCCE\uBCD2\uBCD3\uBCD4\uBCD6\uBCD7\uBCD9\uBCDA\uBCDB\uBCDD",22,"\uBCF7\uBCF9\uBCFA\uBCFB\uBCFD"],["9441","\uBCFE",5,"\uBD06\uBD08\uBD0A",5,"\uBD11\uBD12\uBD13\uBD15",8],["9461","\uBD1E",5,"\uBD25",6,"\uBD2D",12],["9481","\uBD3A",5,"\uBD41",6,"\uBD4A\uBD4B\uBD4D\uBD4E\uBD4F\uBD51",6,"\uBD5A",9,"\uBD65\uBD66\uBD67\uBD69",22,"\uBD82\uBD83\uBD85\uBD86\uBD8B",4,"\uBD92\uBD94\uBD96\uBD97\uBD98\uBD9B\uBD9D",6,"\uBDA5",10,"\uBDB1",6,"\uBDB9",24],["9541","\uBDD2\uBDD3\uBDD6\uBDD7\uBDD9\uBDDA\uBDDB\uBDDD",11,"\uBDEA",5,"\uBDF1"],["9561","\uBDF2\uBDF3\uBDF5\uBDF6\uBDF7\uBDF9",6,"\uBE01\uBE02\uBE04\uBE06",5,"\uBE0E\uBE0F\uBE11\uBE12\uBE13"],["9581","\uBE15",6,"\uBE1E\uBE20",35,"\uBE46\uBE47\uBE49\uBE4A\uBE4B\uBE4D\uBE4F",4,"\uBE56\uBE58\uBE5C\uBE5D\uBE5E\uBE5F\uBE62\uBE63\uBE65\uBE66\uBE67\uBE69\uBE6B",4,"\uBE72\uBE76",4,"\uBE7E\uBE7F\uBE81\uBE82\uBE83\uBE85",6,"\uBE8E\uBE92",5,"\uBE9A",13,"\uBEA9",14],["9641","\uBEB8",23,"\uBED2\uBED3"],["9661","\uBED5\uBED6\uBED9",6,"\uBEE1\uBEE2\uBEE6",5,"\uBEED",8],["9681","\uBEF6",10,"\uBF02",5,"\uBF0A",13,"\uBF1A\uBF1E",33,"\uBF42\uBF43\uBF45\uBF46\uBF47\uBF49",6,"\uBF52\uBF53\uBF54\uBF56",44],["9741","\uBF83",16,"\uBF95",8],["9761","\uBF9E",17,"\uBFB1",7],["9781","\uBFB9",11,"\uBFC6",5,"\uBFCE\uBFCF\uBFD1\uBFD2\uBFD3\uBFD5",6,"\uBFDD\uBFDE\uBFE0\uBFE2",89,"\uC03D\uC03E\uC03F"],["9841","\uC040",16,"\uC052",5,"\uC059\uC05A\uC05B"],["9861","\uC05D\uC05E\uC05F\uC061",6,"\uC06A",15],["9881","\uC07A",21,"\uC092\uC093\uC095\uC096\uC097\uC099",6,"\uC0A2\uC0A4\uC0A6",5,"\uC0AE\uC0B1\uC0B2\uC0B7",4,"\uC0BE\uC0C2\uC0C3\uC0C4\uC0C6\uC0C7\uC0CA\uC0CB\uC0CD\uC0CE\uC0CF\uC0D1",6,"\uC0DA\uC0DE",5,"\uC0E6\uC0E7\uC0E9\uC0EA\uC0EB\uC0ED",6,"\uC0F6\uC0F8\uC0FA",5,"\uC101\uC102\uC103\uC105\uC106\uC107\uC109",6,"\uC111\uC112\uC113\uC114\uC116",5,"\uC121\uC122\uC125\uC128\uC129\uC12A\uC12B\uC12E"],["9941","\uC132\uC133\uC134\uC135\uC137\uC13A\uC13B\uC13D\uC13E\uC13F\uC141",6,"\uC14A\uC14E",5,"\uC156\uC157"],["9961","\uC159\uC15A\uC15B\uC15D",6,"\uC166\uC16A",5,"\uC171\uC172\uC173\uC175\uC176\uC177\uC179\uC17A\uC17B"],["9981","\uC17C",8,"\uC186",5,"\uC18F\uC191\uC192\uC193\uC195\uC197",4,"\uC19E\uC1A0\uC1A2\uC1A3\uC1A4\uC1A6\uC1A7\uC1AA\uC1AB\uC1AD\uC1AE\uC1AF\uC1B1",11,"\uC1BE",5,"\uC1C5\uC1C6\uC1C7\uC1C9\uC1CA\uC1CB\uC1CD",6,"\uC1D5\uC1D6\uC1D9",6,"\uC1E1\uC1E2\uC1E3\uC1E5\uC1E6\uC1E7\uC1E9",6,"\uC1F2\uC1F4",7,"\uC1FE\uC1FF\uC201\uC202\uC203\uC205",6,"\uC20E\uC210\uC212",5,"\uC21A\uC21B\uC21D\uC21E\uC221\uC222\uC223"],["9a41","\uC224\uC225\uC226\uC227\uC22A\uC22C\uC22E\uC230\uC233\uC235",16],["9a61","\uC246\uC247\uC249",6,"\uC252\uC253\uC255\uC256\uC257\uC259",6,"\uC261\uC262\uC263\uC264\uC266"],["9a81","\uC267",4,"\uC26E\uC26F\uC271\uC272\uC273\uC275",6,"\uC27E\uC280\uC282",5,"\uC28A",5,"\uC291",6,"\uC299\uC29A\uC29C\uC29E",5,"\uC2A6\uC2A7\uC2A9\uC2AA\uC2AB\uC2AE",5,"\uC2B6\uC2B8\uC2BA",33,"\uC2DE\uC2DF\uC2E1\uC2E2\uC2E5",5,"\uC2EE\uC2F0\uC2F2\uC2F3\uC2F4\uC2F5\uC2F7\uC2FA\uC2FD\uC2FE\uC2FF\uC301",6,"\uC30A\uC30B\uC30E\uC30F"],["9b41","\uC310\uC311\uC312\uC316\uC317\uC319\uC31A\uC31B\uC31D",6,"\uC326\uC327\uC32A",8],["9b61","\uC333",17,"\uC346",7],["9b81","\uC34E",25,"\uC36A\uC36B\uC36D\uC36E\uC36F\uC371\uC373",4,"\uC37A\uC37B\uC37E",5,"\uC385\uC386\uC387\uC389\uC38A\uC38B\uC38D",50,"\uC3C1",22,"\uC3DA"],["9c41","\uC3DB\uC3DD\uC3DE\uC3E1\uC3E3",4,"\uC3EA\uC3EB\uC3EC\uC3EE",5,"\uC3F6\uC3F7\uC3F9",5],["9c61","\uC3FF",8,"\uC409",6,"\uC411",9],["9c81","\uC41B",8,"\uC425",6,"\uC42D\uC42E\uC42F\uC431\uC432\uC433\uC435",6,"\uC43E",9,"\uC449",26,"\uC466\uC467\uC469\uC46A\uC46B\uC46D",6,"\uC476\uC477\uC478\uC47A",5,"\uC481",18,"\uC495",6,"\uC49D",12],["9d41","\uC4AA",13,"\uC4B9\uC4BA\uC4BB\uC4BD",8],["9d61","\uC4C6",25],["9d81","\uC4E0",8,"\uC4EA",5,"\uC4F2\uC4F3\uC4F5\uC4F6\uC4F7\uC4F9\uC4FB\uC4FC\uC4FD\uC4FE\uC502",9,"\uC50D\uC50E\uC50F\uC511\uC512\uC513\uC515",6,"\uC51D",10,"\uC52A\uC52B\uC52D\uC52E\uC52F\uC531",6,"\uC53A\uC53C\uC53E",5,"\uC546\uC547\uC54B\uC54F\uC550\uC551\uC552\uC556\uC55A\uC55B\uC55C\uC55F\uC562\uC563\uC565\uC566\uC567\uC569",6,"\uC572\uC576",5,"\uC57E\uC57F\uC581\uC582\uC583\uC585\uC586\uC588\uC589\uC58A\uC58B\uC58E\uC590\uC592\uC593\uC594"],["9e41","\uC596\uC599\uC59A\uC59B\uC59D\uC59E\uC59F\uC5A1",7,"\uC5AA",9,"\uC5B6"],["9e61","\uC5B7\uC5BA\uC5BF",4,"\uC5CB\uC5CD\uC5CF\uC5D2\uC5D3\uC5D5\uC5D6\uC5D7\uC5D9",6,"\uC5E2\uC5E4\uC5E6\uC5E7"],["9e81","\uC5E8\uC5E9\uC5EA\uC5EB\uC5EF\uC5F1\uC5F2\uC5F3\uC5F5\uC5F8\uC5F9\uC5FA\uC5FB\uC602\uC603\uC604\uC609\uC60A\uC60B\uC60D\uC60E\uC60F\uC611",6,"\uC61A\uC61D",6,"\uC626\uC627\uC629\uC62A\uC62B\uC62F\uC631\uC632\uC636\uC638\uC63A\uC63C\uC63D\uC63E\uC63F\uC642\uC643\uC645\uC646\uC647\uC649",6,"\uC652\uC656",5,"\uC65E\uC65F\uC661",10,"\uC66D\uC66E\uC670\uC672",5,"\uC67A\uC67B\uC67D\uC67E\uC67F\uC681",6,"\uC68A\uC68C\uC68E",5,"\uC696\uC697\uC699\uC69A\uC69B\uC69D",6,"\uC6A6"],["9f41","\uC6A8\uC6AA",5,"\uC6B2\uC6B3\uC6B5\uC6B6\uC6B7\uC6BB",4,"\uC6C2\uC6C4\uC6C6",5,"\uC6CE"],["9f61","\uC6CF\uC6D1\uC6D2\uC6D3\uC6D5",6,"\uC6DE\uC6DF\uC6E2",5,"\uC6EA\uC6EB\uC6ED\uC6EE\uC6EF\uC6F1\uC6F2"],["9f81","\uC6F3",4,"\uC6FA\uC6FB\uC6FC\uC6FE",5,"\uC706\uC707\uC709\uC70A\uC70B\uC70D",6,"\uC716\uC718\uC71A",5,"\uC722\uC723\uC725\uC726\uC727\uC729",6,"\uC732\uC734\uC736\uC738\uC739\uC73A\uC73B\uC73E\uC73F\uC741\uC742\uC743\uC745",4,"\uC74B\uC74E\uC750\uC759\uC75A\uC75B\uC75D\uC75E\uC75F\uC761",6,"\uC769\uC76A\uC76C",7,"\uC776\uC777\uC779\uC77A\uC77B\uC77F\uC780\uC781\uC782\uC786\uC78B\uC78C\uC78D\uC78F\uC792\uC793\uC795\uC799\uC79B",4,"\uC7A2\uC7A7",4,"\uC7AE\uC7AF\uC7B1\uC7B2\uC7B3\uC7B5\uC7B6\uC7B7"],["a041","\uC7B8\uC7B9\uC7BA\uC7BB\uC7BE\uC7C2",5,"\uC7CA\uC7CB\uC7CD\uC7CF\uC7D1",6,"\uC7D9\uC7DA\uC7DB\uC7DC"],["a061","\uC7DE",5,"\uC7E5\uC7E6\uC7E7\uC7E9\uC7EA\uC7EB\uC7ED",13],["a081","\uC7FB",4,"\uC802\uC803\uC805\uC806\uC807\uC809\uC80B",4,"\uC812\uC814\uC817",4,"\uC81E\uC81F\uC821\uC822\uC823\uC825",6,"\uC82E\uC830\uC832",5,"\uC839\uC83A\uC83B\uC83D\uC83E\uC83F\uC841",6,"\uC84A\uC84B\uC84E",5,"\uC855",26,"\uC872\uC873\uC875\uC876\uC877\uC879\uC87B",4,"\uC882\uC884\uC888\uC889\uC88A\uC88E",5,"\uC895",7,"\uC89E\uC8A0\uC8A2\uC8A3\uC8A4"],["a141","\uC8A5\uC8A6\uC8A7\uC8A9",18,"\uC8BE\uC8BF\uC8C0\uC8C1"],["a161","\uC8C2\uC8C3\uC8C5\uC8C6\uC8C7\uC8C9\uC8CA\uC8CB\uC8CD",6,"\uC8D6\uC8D8\uC8DA",5,"\uC8E2\uC8E3\uC8E5"],["a181","\uC8E6",14,"\uC8F6",5,"\uC8FE\uC8FF\uC901\uC902\uC903\uC907",4,"\uC90E\u3000\u3001\u3002\xB7\u2025\u2026\xA8\u3003\xAD\u2015\u2225\uFF3C\u223C\u2018\u2019\u201C\u201D\u3014\u3015\u3008",9,"\xB1\xD7\xF7\u2260\u2264\u2265\u221E\u2234\xB0\u2032\u2033\u2103\u212B\uFFE0\uFFE1\uFFE5\u2642\u2640\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\xA7\u203B\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u2192\u2190\u2191\u2193\u2194\u3013\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229\u2227\u2228\uFFE2"],["a241","\uC910\uC912",5,"\uC919",18],["a261","\uC92D",6,"\uC935",18],["a281","\uC948",7,"\uC952\uC953\uC955\uC956\uC957\uC959",6,"\uC962\uC964",7,"\uC96D\uC96E\uC96F\u21D2\u21D4\u2200\u2203\xB4\uFF5E\u02C7\u02D8\u02DD\u02DA\u02D9\xB8\u02DB\xA1\xBF\u02D0\u222E\u2211\u220F\xA4\u2109\u2030\u25C1\u25C0\u25B7\u25B6\u2664\u2660\u2661\u2665\u2667\u2663\u2299\u25C8\u25A3\u25D0\u25D1\u2592\u25A4\u25A5\u25A8\u25A7\u25A6\u25A9\u2668\u260F\u260E\u261C\u261E\xB6\u2020\u2021\u2195\u2197\u2199\u2196\u2198\u266D\u2669\u266A\u266C\u327F\u321C\u2116\u33C7\u2122\u33C2\u33D8\u2121\u20AC\xAE"],["a341","\uC971\uC972\uC973\uC975",6,"\uC97D",10,"\uC98A\uC98B\uC98D\uC98E\uC98F"],["a361","\uC991",6,"\uC99A\uC99C\uC99E",16],["a381","\uC9AF",16,"\uC9C2\uC9C3\uC9C5\uC9C6\uC9C9\uC9CB",4,"\uC9D2\uC9D4\uC9D7\uC9D8\uC9DB\uFF01",58,"\uFFE6\uFF3D",32,"\uFFE3"],["a441","\uC9DE\uC9DF\uC9E1\uC9E3\uC9E5\uC9E6\uC9E8\uC9E9\uC9EA\uC9EB\uC9EE\uC9F2",5,"\uC9FA\uC9FB\uC9FD\uC9FE\uC9FF\uCA01\uCA02\uCA03\uCA04"],["a461","\uCA05\uCA06\uCA07\uCA0A\uCA0E",5,"\uCA15\uCA16\uCA17\uCA19",12],["a481","\uCA26\uCA27\uCA28\uCA2A",28,"\u3131",93],["a541","\uCA47",4,"\uCA4E\uCA4F\uCA51\uCA52\uCA53\uCA55",6,"\uCA5E\uCA62",5,"\uCA69\uCA6A"],["a561","\uCA6B",17,"\uCA7E",5,"\uCA85\uCA86"],["a581","\uCA87",16,"\uCA99",14,"\u2170",9],["a5b0","\u2160",9],["a5c1","\u0391",16,"\u03A3",6],["a5e1","\u03B1",16,"\u03C3",6],["a641","\uCAA8",19,"\uCABE\uCABF\uCAC1\uCAC2\uCAC3\uCAC5"],["a661","\uCAC6",5,"\uCACE\uCAD0\uCAD2\uCAD4\uCAD5\uCAD6\uCAD7\uCADA",5,"\uCAE1",6],["a681","\uCAE8\uCAE9\uCAEA\uCAEB\uCAED",6,"\uCAF5",18,"\uCB09\uCB0A\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542\u2512\u2511\u251A\u2519\u2516\u2515\u250E\u250D\u251E\u251F\u2521\u2522\u2526\u2527\u2529\u252A\u252D\u252E\u2531\u2532\u2535\u2536\u2539\u253A\u253D\u253E\u2540\u2541\u2543",7],["a741","\uCB0B",4,"\uCB11\uCB12\uCB13\uCB15\uCB16\uCB17\uCB19",6,"\uCB22",7],["a761","\uCB2A",22,"\uCB42\uCB43\uCB44"],["a781","\uCB45\uCB46\uCB47\uCB4A\uCB4B\uCB4D\uCB4E\uCB4F\uCB51",6,"\uCB5A\uCB5B\uCB5C\uCB5E",5,"\uCB65",7,"\u3395\u3396\u3397\u2113\u3398\u33C4\u33A3\u33A4\u33A5\u33A6\u3399",9,"\u33CA\u338D\u338E\u338F\u33CF\u3388\u3389\u33C8\u33A7\u33A8\u33B0",9,"\u3380",4,"\u33BA",5,"\u3390",4,"\u2126\u33C0\u33C1\u338A\u338B\u338C\u33D6\u33C5\u33AD\u33AE\u33AF\u33DB\u33A9\u33AA\u33AB\u33AC\u33DD\u33D0\u33D3\u33C3\u33C9\u33DC\u33C6"],["a841","\uCB6D",10,"\uCB7A",14],["a861","\uCB89",18,"\uCB9D",6],["a881","\uCBA4",19,"\uCBB9",11,"\xC6\xD0\xAA\u0126"],["a8a6","\u0132"],["a8a8","\u013F\u0141\xD8\u0152\xBA\xDE\u0166\u014A"],["a8b1","\u3260",27,"\u24D0",25,"\u2460",14,"\xBD\u2153\u2154\xBC\xBE\u215B\u215C\u215D\u215E"],["a941","\uCBC5",14,"\uCBD5",10],["a961","\uCBE0\uCBE1\uCBE2\uCBE3\uCBE5\uCBE6\uCBE8\uCBEA",18],["a981","\uCBFD",14,"\uCC0E\uCC0F\uCC11\uCC12\uCC13\uCC15",6,"\uCC1E\uCC1F\uCC20\uCC23\uCC24\xE6\u0111\xF0\u0127\u0131\u0133\u0138\u0140\u0142\xF8\u0153\xDF\xFE\u0167\u014B\u0149\u3200",27,"\u249C",25,"\u2474",14,"\xB9\xB2\xB3\u2074\u207F\u2081\u2082\u2083\u2084"],["aa41","\uCC25\uCC26\uCC2A\uCC2B\uCC2D\uCC2F\uCC31",6,"\uCC3A\uCC3F",4,"\uCC46\uCC47\uCC49\uCC4A\uCC4B\uCC4D\uCC4E"],["aa61","\uCC4F",4,"\uCC56\uCC5A",5,"\uCC61\uCC62\uCC63\uCC65\uCC67\uCC69",6,"\uCC71\uCC72"],["aa81","\uCC73\uCC74\uCC76",29,"\u3041",82],["ab41","\uCC94\uCC95\uCC96\uCC97\uCC9A\uCC9B\uCC9D\uCC9E\uCC9F\uCCA1",6,"\uCCAA\uCCAE",5,"\uCCB6\uCCB7\uCCB9"],["ab61","\uCCBA\uCCBB\uCCBD",6,"\uCCC6\uCCC8\uCCCA",5,"\uCCD1\uCCD2\uCCD3\uCCD5",5],["ab81","\uCCDB",8,"\uCCE5",6,"\uCCED\uCCEE\uCCEF\uCCF1",12,"\u30A1",85],["ac41","\uCCFE\uCCFF\uCD00\uCD02",5,"\uCD0A\uCD0B\uCD0D\uCD0E\uCD0F\uCD11",6,"\uCD1A\uCD1C\uCD1E\uCD1F\uCD20"],["ac61","\uCD21\uCD22\uCD23\uCD25\uCD26\uCD27\uCD29\uCD2A\uCD2B\uCD2D",11,"\uCD3A",4],["ac81","\uCD3F",28,"\uCD5D\uCD5E\uCD5F\u0410",5,"\u0401\u0416",25],["acd1","\u0430",5,"\u0451\u0436",25],["ad41","\uCD61\uCD62\uCD63\uCD65",6,"\uCD6E\uCD70\uCD72",5,"\uCD79",7],["ad61","\uCD81",6,"\uCD89",10,"\uCD96\uCD97\uCD99\uCD9A\uCD9B\uCD9D\uCD9E\uCD9F"],["ad81","\uCDA0\uCDA1\uCDA2\uCDA3\uCDA6\uCDA8\uCDAA",5,"\uCDB1",18,"\uCDC5"],["ae41","\uCDC6",5,"\uCDCD\uCDCE\uCDCF\uCDD1",16],["ae61","\uCDE2",5,"\uCDE9\uCDEA\uCDEB\uCDED\uCDEE\uCDEF\uCDF1",6,"\uCDFA\uCDFC\uCDFE",4],["ae81","\uCE03\uCE05\uCE06\uCE07\uCE09\uCE0A\uCE0B\uCE0D",6,"\uCE15\uCE16\uCE17\uCE18\uCE1A",5,"\uCE22\uCE23\uCE25\uCE26\uCE27\uCE29\uCE2A\uCE2B"],["af41","\uCE2C\uCE2D\uCE2E\uCE2F\uCE32\uCE34\uCE36",19],["af61","\uCE4A",13,"\uCE5A\uCE5B\uCE5D\uCE5E\uCE62",5,"\uCE6A\uCE6C"],["af81","\uCE6E",5,"\uCE76\uCE77\uCE79\uCE7A\uCE7B\uCE7D",6,"\uCE86\uCE88\uCE8A",5,"\uCE92\uCE93\uCE95\uCE96\uCE97\uCE99"],["b041","\uCE9A",5,"\uCEA2\uCEA6",5,"\uCEAE",12],["b061","\uCEBB",5,"\uCEC2",19],["b081","\uCED6",13,"\uCEE6\uCEE7\uCEE9\uCEEA\uCEED",6,"\uCEF6\uCEFA",5,"\uAC00\uAC01\uAC04\uAC07\uAC08\uAC09\uAC0A\uAC10",7,"\uAC19",4,"\uAC20\uAC24\uAC2C\uAC2D\uAC2F\uAC30\uAC31\uAC38\uAC39\uAC3C\uAC40\uAC4B\uAC4D\uAC54\uAC58\uAC5C\uAC70\uAC71\uAC74\uAC77\uAC78\uAC7A\uAC80\uAC81\uAC83\uAC84\uAC85\uAC86\uAC89\uAC8A\uAC8B\uAC8C\uAC90\uAC94\uAC9C\uAC9D\uAC9F\uACA0\uACA1\uACA8\uACA9\uACAA\uACAC\uACAF\uACB0\uACB8\uACB9\uACBB\uACBC\uACBD\uACC1\uACC4\uACC8\uACCC\uACD5\uACD7\uACE0\uACE1\uACE4\uACE7\uACE8\uACEA\uACEC\uACEF\uACF0\uACF1\uACF3\uACF5\uACF6\uACFC\uACFD\uAD00\uAD04\uAD06"],["b141","\uCF02\uCF03\uCF05\uCF06\uCF07\uCF09",6,"\uCF12\uCF14\uCF16",5,"\uCF1D\uCF1E\uCF1F\uCF21\uCF22\uCF23"],["b161","\uCF25",6,"\uCF2E\uCF32",5,"\uCF39",11],["b181","\uCF45",14,"\uCF56\uCF57\uCF59\uCF5A\uCF5B\uCF5D",6,"\uCF66\uCF68\uCF6A\uCF6B\uCF6C\uAD0C\uAD0D\uAD0F\uAD11\uAD18\uAD1C\uAD20\uAD29\uAD2C\uAD2D\uAD34\uAD35\uAD38\uAD3C\uAD44\uAD45\uAD47\uAD49\uAD50\uAD54\uAD58\uAD61\uAD63\uAD6C\uAD6D\uAD70\uAD73\uAD74\uAD75\uAD76\uAD7B\uAD7C\uAD7D\uAD7F\uAD81\uAD82\uAD88\uAD89\uAD8C\uAD90\uAD9C\uAD9D\uADA4\uADB7\uADC0\uADC1\uADC4\uADC8\uADD0\uADD1\uADD3\uADDC\uADE0\uADE4\uADF8\uADF9\uADFC\uADFF\uAE00\uAE01\uAE08\uAE09\uAE0B\uAE0D\uAE14\uAE30\uAE31\uAE34\uAE37\uAE38\uAE3A\uAE40\uAE41\uAE43\uAE45\uAE46\uAE4A\uAE4C\uAE4D\uAE4E\uAE50\uAE54\uAE56\uAE5C\uAE5D\uAE5F\uAE60\uAE61\uAE65\uAE68\uAE69\uAE6C\uAE70\uAE78"],["b241","\uCF6D\uCF6E\uCF6F\uCF72\uCF73\uCF75\uCF76\uCF77\uCF79",6,"\uCF81\uCF82\uCF83\uCF84\uCF86",5,"\uCF8D"],["b261","\uCF8E",18,"\uCFA2",5,"\uCFA9"],["b281","\uCFAA",5,"\uCFB1",18,"\uCFC5",6,"\uAE79\uAE7B\uAE7C\uAE7D\uAE84\uAE85\uAE8C\uAEBC\uAEBD\uAEBE\uAEC0\uAEC4\uAECC\uAECD\uAECF\uAED0\uAED1\uAED8\uAED9\uAEDC\uAEE8\uAEEB\uAEED\uAEF4\uAEF8\uAEFC\uAF07\uAF08\uAF0D\uAF10\uAF2C\uAF2D\uAF30\uAF32\uAF34\uAF3C\uAF3D\uAF3F\uAF41\uAF42\uAF43\uAF48\uAF49\uAF50\uAF5C\uAF5D\uAF64\uAF65\uAF79\uAF80\uAF84\uAF88\uAF90\uAF91\uAF95\uAF9C\uAFB8\uAFB9\uAFBC\uAFC0\uAFC7\uAFC8\uAFC9\uAFCB\uAFCD\uAFCE\uAFD4\uAFDC\uAFE8\uAFE9\uAFF0\uAFF1\uAFF4\uAFF8\uB000\uB001\uB004\uB00C\uB010\uB014\uB01C\uB01D\uB028\uB044\uB045\uB048\uB04A\uB04C\uB04E\uB053\uB054\uB055\uB057\uB059"],["b341","\uCFCC",19,"\uCFE2\uCFE3\uCFE5\uCFE6\uCFE7\uCFE9"],["b361","\uCFEA",5,"\uCFF2\uCFF4\uCFF6",5,"\uCFFD\uCFFE\uCFFF\uD001\uD002\uD003\uD005",5],["b381","\uD00B",5,"\uD012",5,"\uD019",19,"\uB05D\uB07C\uB07D\uB080\uB084\uB08C\uB08D\uB08F\uB091\uB098\uB099\uB09A\uB09C\uB09F\uB0A0\uB0A1\uB0A2\uB0A8\uB0A9\uB0AB",4,"\uB0B1\uB0B3\uB0B4\uB0B5\uB0B8\uB0BC\uB0C4\uB0C5\uB0C7\uB0C8\uB0C9\uB0D0\uB0D1\uB0D4\uB0D8\uB0E0\uB0E5\uB108\uB109\uB10B\uB10C\uB110\uB112\uB113\uB118\uB119\uB11B\uB11C\uB11D\uB123\uB124\uB125\uB128\uB12C\uB134\uB135\uB137\uB138\uB139\uB140\uB141\uB144\uB148\uB150\uB151\uB154\uB155\uB158\uB15C\uB160\uB178\uB179\uB17C\uB180\uB182\uB188\uB189\uB18B\uB18D\uB192\uB193\uB194\uB198\uB19C\uB1A8\uB1CC\uB1D0\uB1D4\uB1DC\uB1DD"],["b441","\uD02E",5,"\uD036\uD037\uD039\uD03A\uD03B\uD03D",6,"\uD046\uD048\uD04A",5],["b461","\uD051\uD052\uD053\uD055\uD056\uD057\uD059",6,"\uD061",10,"\uD06E\uD06F"],["b481","\uD071\uD072\uD073\uD075",6,"\uD07E\uD07F\uD080\uD082",18,"\uB1DF\uB1E8\uB1E9\uB1EC\uB1F0\uB1F9\uB1FB\uB1FD\uB204\uB205\uB208\uB20B\uB20C\uB214\uB215\uB217\uB219\uB220\uB234\uB23C\uB258\uB25C\uB260\uB268\uB269\uB274\uB275\uB27C\uB284\uB285\uB289\uB290\uB291\uB294\uB298\uB299\uB29A\uB2A0\uB2A1\uB2A3\uB2A5\uB2A6\uB2AA\uB2AC\uB2B0\uB2B4\uB2C8\uB2C9\uB2CC\uB2D0\uB2D2\uB2D8\uB2D9\uB2DB\uB2DD\uB2E2\uB2E4\uB2E5\uB2E6\uB2E8\uB2EB",4,"\uB2F3\uB2F4\uB2F5\uB2F7",4,"\uB2FF\uB300\uB301\uB304\uB308\uB310\uB311\uB313\uB314\uB315\uB31C\uB354\uB355\uB356\uB358\uB35B\uB35C\uB35E\uB35F\uB364\uB365"],["b541","\uD095",14,"\uD0A6\uD0A7\uD0A9\uD0AA\uD0AB\uD0AD",5],["b561","\uD0B3\uD0B6\uD0B8\uD0BA",5,"\uD0C2\uD0C3\uD0C5\uD0C6\uD0C7\uD0CA",5,"\uD0D2\uD0D6",4],["b581","\uD0DB\uD0DE\uD0DF\uD0E1\uD0E2\uD0E3\uD0E5",6,"\uD0EE\uD0F2",5,"\uD0F9",11,"\uB367\uB369\uB36B\uB36E\uB370\uB371\uB374\uB378\uB380\uB381\uB383\uB384\uB385\uB38C\uB390\uB394\uB3A0\uB3A1\uB3A8\uB3AC\uB3C4\uB3C5\uB3C8\uB3CB\uB3CC\uB3CE\uB3D0\uB3D4\uB3D5\uB3D7\uB3D9\uB3DB\uB3DD\uB3E0\uB3E4\uB3E8\uB3FC\uB410\uB418\uB41C\uB420\uB428\uB429\uB42B\uB434\uB450\uB451\uB454\uB458\uB460\uB461\uB463\uB465\uB46C\uB480\uB488\uB49D\uB4A4\uB4A8\uB4AC\uB4B5\uB4B7\uB4B9\uB4C0\uB4C4\uB4C8\uB4D0\uB4D5\uB4DC\uB4DD\uB4E0\uB4E3\uB4E4\uB4E6\uB4EC\uB4ED\uB4EF\uB4F1\uB4F8\uB514\uB515\uB518\uB51B\uB51C\uB524\uB525\uB527\uB528\uB529\uB52A\uB530\uB531\uB534\uB538"],["b641","\uD105",7,"\uD10E",17],["b661","\uD120",15,"\uD132\uD133\uD135\uD136\uD137\uD139\uD13B\uD13C\uD13D\uD13E"],["b681","\uD13F\uD142\uD146",5,"\uD14E\uD14F\uD151\uD152\uD153\uD155",6,"\uD15E\uD160\uD162",5,"\uD169\uD16A\uD16B\uD16D\uB540\uB541\uB543\uB544\uB545\uB54B\uB54C\uB54D\uB550\uB554\uB55C\uB55D\uB55F\uB560\uB561\uB5A0\uB5A1\uB5A4\uB5A8\uB5AA\uB5AB\uB5B0\uB5B1\uB5B3\uB5B4\uB5B5\uB5BB\uB5BC\uB5BD\uB5C0\uB5C4\uB5CC\uB5CD\uB5CF\uB5D0\uB5D1\uB5D8\uB5EC\uB610\uB611\uB614\uB618\uB625\uB62C\uB634\uB648\uB664\uB668\uB69C\uB69D\uB6A0\uB6A4\uB6AB\uB6AC\uB6B1\uB6D4\uB6F0\uB6F4\uB6F8\uB700\uB701\uB705\uB728\uB729\uB72C\uB72F\uB730\uB738\uB739\uB73B\uB744\uB748\uB74C\uB754\uB755\uB760\uB764\uB768\uB770\uB771\uB773\uB775\uB77C\uB77D\uB780\uB784\uB78C\uB78D\uB78F\uB790\uB791\uB792\uB796\uB797"],["b741","\uD16E",13,"\uD17D",6,"\uD185\uD186\uD187\uD189\uD18A"],["b761","\uD18B",20,"\uD1A2\uD1A3\uD1A5\uD1A6\uD1A7"],["b781","\uD1A9",6,"\uD1B2\uD1B4\uD1B6\uD1B7\uD1B8\uD1B9\uD1BB\uD1BD\uD1BE\uD1BF\uD1C1",14,"\uB798\uB799\uB79C\uB7A0\uB7A8\uB7A9\uB7AB\uB7AC\uB7AD\uB7B4\uB7B5\uB7B8\uB7C7\uB7C9\uB7EC\uB7ED\uB7F0\uB7F4\uB7FC\uB7FD\uB7FF\uB800\uB801\uB807\uB808\uB809\uB80C\uB810\uB818\uB819\uB81B\uB81D\uB824\uB825\uB828\uB82C\uB834\uB835\uB837\uB838\uB839\uB840\uB844\uB851\uB853\uB85C\uB85D\uB860\uB864\uB86C\uB86D\uB86F\uB871\uB878\uB87C\uB88D\uB8A8\uB8B0\uB8B4\uB8B8\uB8C0\uB8C1\uB8C3\uB8C5\uB8CC\uB8D0\uB8D4\uB8DD\uB8DF\uB8E1\uB8E8\uB8E9\uB8EC\uB8F0\uB8F8\uB8F9\uB8FB\uB8FD\uB904\uB918\uB920\uB93C\uB93D\uB940\uB944\uB94C\uB94F\uB951\uB958\uB959\uB95C\uB960\uB968\uB969"],["b841","\uD1D0",7,"\uD1D9",17],["b861","\uD1EB",8,"\uD1F5\uD1F6\uD1F7\uD1F9",13],["b881","\uD208\uD20A",5,"\uD211",24,"\uB96B\uB96D\uB974\uB975\uB978\uB97C\uB984\uB985\uB987\uB989\uB98A\uB98D\uB98E\uB9AC\uB9AD\uB9B0\uB9B4\uB9BC\uB9BD\uB9BF\uB9C1\uB9C8\uB9C9\uB9CC\uB9CE",4,"\uB9D8\uB9D9\uB9DB\uB9DD\uB9DE\uB9E1\uB9E3\uB9E4\uB9E5\uB9E8\uB9EC\uB9F4\uB9F5\uB9F7\uB9F8\uB9F9\uB9FA\uBA00\uBA01\uBA08\uBA15\uBA38\uBA39\uBA3C\uBA40\uBA42\uBA48\uBA49\uBA4B\uBA4D\uBA4E\uBA53\uBA54\uBA55\uBA58\uBA5C\uBA64\uBA65\uBA67\uBA68\uBA69\uBA70\uBA71\uBA74\uBA78\uBA83\uBA84\uBA85\uBA87\uBA8C\uBAA8\uBAA9\uBAAB\uBAAC\uBAB0\uBAB2\uBAB8\uBAB9\uBABB\uBABD\uBAC4\uBAC8\uBAD8\uBAD9\uBAFC"],["b941","\uD22A\uD22B\uD22E\uD22F\uD231\uD232\uD233\uD235",6,"\uD23E\uD240\uD242",5,"\uD249\uD24A\uD24B\uD24C"],["b961","\uD24D",14,"\uD25D",6,"\uD265\uD266\uD267\uD268"],["b981","\uD269",22,"\uD282\uD283\uD285\uD286\uD287\uD289\uD28A\uD28B\uD28C\uBB00\uBB04\uBB0D\uBB0F\uBB11\uBB18\uBB1C\uBB20\uBB29\uBB2B\uBB34\uBB35\uBB36\uBB38\uBB3B\uBB3C\uBB3D\uBB3E\uBB44\uBB45\uBB47\uBB49\uBB4D\uBB4F\uBB50\uBB54\uBB58\uBB61\uBB63\uBB6C\uBB88\uBB8C\uBB90\uBBA4\uBBA8\uBBAC\uBBB4\uBBB7\uBBC0\uBBC4\uBBC8\uBBD0\uBBD3\uBBF8\uBBF9\uBBFC\uBBFF\uBC00\uBC02\uBC08\uBC09\uBC0B\uBC0C\uBC0D\uBC0F\uBC11\uBC14",4,"\uBC1B",4,"\uBC24\uBC25\uBC27\uBC29\uBC2D\uBC30\uBC31\uBC34\uBC38\uBC40\uBC41\uBC43\uBC44\uBC45\uBC49\uBC4C\uBC4D\uBC50\uBC5D\uBC84\uBC85\uBC88\uBC8B\uBC8C\uBC8E\uBC94\uBC95\uBC97"],["ba41","\uD28D\uD28E\uD28F\uD292\uD293\uD294\uD296",5,"\uD29D\uD29E\uD29F\uD2A1\uD2A2\uD2A3\uD2A5",6,"\uD2AD"],["ba61","\uD2AE\uD2AF\uD2B0\uD2B2",5,"\uD2BA\uD2BB\uD2BD\uD2BE\uD2C1\uD2C3",4,"\uD2CA\uD2CC",5],["ba81","\uD2D2\uD2D3\uD2D5\uD2D6\uD2D7\uD2D9\uD2DA\uD2DB\uD2DD",6,"\uD2E6",9,"\uD2F2\uD2F3\uD2F5\uD2F6\uD2F7\uD2F9\uD2FA\uBC99\uBC9A\uBCA0\uBCA1\uBCA4\uBCA7\uBCA8\uBCB0\uBCB1\uBCB3\uBCB4\uBCB5\uBCBC\uBCBD\uBCC0\uBCC4\uBCCD\uBCCF\uBCD0\uBCD1\uBCD5\uBCD8\uBCDC\uBCF4\uBCF5\uBCF6\uBCF8\uBCFC\uBD04\uBD05\uBD07\uBD09\uBD10\uBD14\uBD24\uBD2C\uBD40\uBD48\uBD49\uBD4C\uBD50\uBD58\uBD59\uBD64\uBD68\uBD80\uBD81\uBD84\uBD87\uBD88\uBD89\uBD8A\uBD90\uBD91\uBD93\uBD95\uBD99\uBD9A\uBD9C\uBDA4\uBDB0\uBDB8\uBDD4\uBDD5\uBDD8\uBDDC\uBDE9\uBDF0\uBDF4\uBDF8\uBE00\uBE03\uBE05\uBE0C\uBE0D\uBE10\uBE14\uBE1C\uBE1D\uBE1F\uBE44\uBE45\uBE48\uBE4C\uBE4E\uBE54\uBE55\uBE57\uBE59\uBE5A\uBE5B\uBE60\uBE61\uBE64"],["bb41","\uD2FB",4,"\uD302\uD304\uD306",5,"\uD30F\uD311\uD312\uD313\uD315\uD317",4,"\uD31E\uD322\uD323"],["bb61","\uD324\uD326\uD327\uD32A\uD32B\uD32D\uD32E\uD32F\uD331",6,"\uD33A\uD33E",5,"\uD346\uD347\uD348\uD349"],["bb81","\uD34A",31,"\uBE68\uBE6A\uBE70\uBE71\uBE73\uBE74\uBE75\uBE7B\uBE7C\uBE7D\uBE80\uBE84\uBE8C\uBE8D\uBE8F\uBE90\uBE91\uBE98\uBE99\uBEA8\uBED0\uBED1\uBED4\uBED7\uBED8\uBEE0\uBEE3\uBEE4\uBEE5\uBEEC\uBF01\uBF08\uBF09\uBF18\uBF19\uBF1B\uBF1C\uBF1D\uBF40\uBF41\uBF44\uBF48\uBF50\uBF51\uBF55\uBF94\uBFB0\uBFC5\uBFCC\uBFCD\uBFD0\uBFD4\uBFDC\uBFDF\uBFE1\uC03C\uC051\uC058\uC05C\uC060\uC068\uC069\uC090\uC091\uC094\uC098\uC0A0\uC0A1\uC0A3\uC0A5\uC0AC\uC0AD\uC0AF\uC0B0\uC0B3\uC0B4\uC0B5\uC0B6\uC0BC\uC0BD\uC0BF\uC0C0\uC0C1\uC0C5\uC0C8\uC0C9\uC0CC\uC0D0\uC0D8\uC0D9\uC0DB\uC0DC\uC0DD\uC0E4"],["bc41","\uD36A",17,"\uD37E\uD37F\uD381\uD382\uD383\uD385\uD386\uD387"],["bc61","\uD388\uD389\uD38A\uD38B\uD38E\uD392",5,"\uD39A\uD39B\uD39D\uD39E\uD39F\uD3A1",6,"\uD3AA\uD3AC\uD3AE"],["bc81","\uD3AF",4,"\uD3B5\uD3B6\uD3B7\uD3B9\uD3BA\uD3BB\uD3BD",6,"\uD3C6\uD3C7\uD3CA",5,"\uD3D1",5,"\uC0E5\uC0E8\uC0EC\uC0F4\uC0F5\uC0F7\uC0F9\uC100\uC104\uC108\uC110\uC115\uC11C",4,"\uC123\uC124\uC126\uC127\uC12C\uC12D\uC12F\uC130\uC131\uC136\uC138\uC139\uC13C\uC140\uC148\uC149\uC14B\uC14C\uC14D\uC154\uC155\uC158\uC15C\uC164\uC165\uC167\uC168\uC169\uC170\uC174\uC178\uC185\uC18C\uC18D\uC18E\uC190\uC194\uC196\uC19C\uC19D\uC19F\uC1A1\uC1A5\uC1A8\uC1A9\uC1AC\uC1B0\uC1BD\uC1C4\uC1C8\uC1CC\uC1D4\uC1D7\uC1D8\uC1E0\uC1E4\uC1E8\uC1F0\uC1F1\uC1F3\uC1FC\uC1FD\uC200\uC204\uC20C\uC20D\uC20F\uC211\uC218\uC219\uC21C\uC21F\uC220\uC228\uC229\uC22B\uC22D"],["bd41","\uD3D7\uD3D9",7,"\uD3E2\uD3E4",7,"\uD3EE\uD3EF\uD3F1\uD3F2\uD3F3\uD3F5\uD3F6\uD3F7"],["bd61","\uD3F8\uD3F9\uD3FA\uD3FB\uD3FE\uD400\uD402",5,"\uD409",13],["bd81","\uD417",5,"\uD41E",25,"\uC22F\uC231\uC232\uC234\uC248\uC250\uC251\uC254\uC258\uC260\uC265\uC26C\uC26D\uC270\uC274\uC27C\uC27D\uC27F\uC281\uC288\uC289\uC290\uC298\uC29B\uC29D\uC2A4\uC2A5\uC2A8\uC2AC\uC2AD\uC2B4\uC2B5\uC2B7\uC2B9\uC2DC\uC2DD\uC2E0\uC2E3\uC2E4\uC2EB\uC2EC\uC2ED\uC2EF\uC2F1\uC2F6\uC2F8\uC2F9\uC2FB\uC2FC\uC300\uC308\uC309\uC30C\uC30D\uC313\uC314\uC315\uC318\uC31C\uC324\uC325\uC328\uC329\uC345\uC368\uC369\uC36C\uC370\uC372\uC378\uC379\uC37C\uC37D\uC384\uC388\uC38C\uC3C0\uC3D8\uC3D9\uC3DC\uC3DF\uC3E0\uC3E2\uC3E8\uC3E9\uC3ED\uC3F4\uC3F5\uC3F8\uC408\uC410\uC424\uC42C\uC430"],["be41","\uD438",7,"\uD441\uD442\uD443\uD445",14],["be61","\uD454",7,"\uD45D\uD45E\uD45F\uD461\uD462\uD463\uD465",7,"\uD46E\uD470\uD471\uD472"],["be81","\uD473",4,"\uD47A\uD47B\uD47D\uD47E\uD481\uD483",4,"\uD48A\uD48C\uD48E",5,"\uD495",8,"\uC434\uC43C\uC43D\uC448\uC464\uC465\uC468\uC46C\uC474\uC475\uC479\uC480\uC494\uC49C\uC4B8\uC4BC\uC4E9\uC4F0\uC4F1\uC4F4\uC4F8\uC4FA\uC4FF\uC500\uC501\uC50C\uC510\uC514\uC51C\uC528\uC529\uC52C\uC530\uC538\uC539\uC53B\uC53D\uC544\uC545\uC548\uC549\uC54A\uC54C\uC54D\uC54E\uC553\uC554\uC555\uC557\uC558\uC559\uC55D\uC55E\uC560\uC561\uC564\uC568\uC570\uC571\uC573\uC574\uC575\uC57C\uC57D\uC580\uC584\uC587\uC58C\uC58D\uC58F\uC591\uC595\uC597\uC598\uC59C\uC5A0\uC5A9\uC5B4\uC5B5\uC5B8\uC5B9\uC5BB\uC5BC\uC5BD\uC5BE\uC5C4",6,"\uC5CC\uC5CE"],["bf41","\uD49E",10,"\uD4AA",14],["bf61","\uD4B9",18,"\uD4CD\uD4CE\uD4CF\uD4D1\uD4D2\uD4D3\uD4D5"],["bf81","\uD4D6",5,"\uD4DD\uD4DE\uD4E0",7,"\uD4E9\uD4EA\uD4EB\uD4ED\uD4EE\uD4EF\uD4F1",6,"\uD4F9\uD4FA\uD4FC\uC5D0\uC5D1\uC5D4\uC5D8\uC5E0\uC5E1\uC5E3\uC5E5\uC5EC\uC5ED\uC5EE\uC5F0\uC5F4\uC5F6\uC5F7\uC5FC",5,"\uC605\uC606\uC607\uC608\uC60C\uC610\uC618\uC619\uC61B\uC61C\uC624\uC625\uC628\uC62C\uC62D\uC62E\uC630\uC633\uC634\uC635\uC637\uC639\uC63B\uC640\uC641\uC644\uC648\uC650\uC651\uC653\uC654\uC655\uC65C\uC65D\uC660\uC66C\uC66F\uC671\uC678\uC679\uC67C\uC680\uC688\uC689\uC68B\uC68D\uC694\uC695\uC698\uC69C\uC6A4\uC6A5\uC6A7\uC6A9\uC6B0\uC6B1\uC6B4\uC6B8\uC6B9\uC6BA\uC6C0\uC6C1\uC6C3\uC6C5\uC6CC\uC6CD\uC6D0\uC6D4\uC6DC\uC6DD\uC6E0\uC6E1\uC6E8"],["c041","\uD4FE",5,"\uD505\uD506\uD507\uD509\uD50A\uD50B\uD50D",6,"\uD516\uD518",5],["c061","\uD51E",25],["c081","\uD538\uD539\uD53A\uD53B\uD53E\uD53F\uD541\uD542\uD543\uD545",6,"\uD54E\uD550\uD552",5,"\uD55A\uD55B\uD55D\uD55E\uD55F\uD561\uD562\uD563\uC6E9\uC6EC\uC6F0\uC6F8\uC6F9\uC6FD\uC704\uC705\uC708\uC70C\uC714\uC715\uC717\uC719\uC720\uC721\uC724\uC728\uC730\uC731\uC733\uC735\uC737\uC73C\uC73D\uC740\uC744\uC74A\uC74C\uC74D\uC74F\uC751",7,"\uC75C\uC760\uC768\uC76B\uC774\uC775\uC778\uC77C\uC77D\uC77E\uC783\uC784\uC785\uC787\uC788\uC789\uC78A\uC78E\uC790\uC791\uC794\uC796\uC797\uC798\uC79A\uC7A0\uC7A1\uC7A3\uC7A4\uC7A5\uC7A6\uC7AC\uC7AD\uC7B0\uC7B4\uC7BC\uC7BD\uC7BF\uC7C0\uC7C1\uC7C8\uC7C9\uC7CC\uC7CE\uC7D0\uC7D8\uC7DD\uC7E4\uC7E8\uC7EC\uC800\uC801\uC804\uC808\uC80A"],["c141","\uD564\uD566\uD567\uD56A\uD56C\uD56E",5,"\uD576\uD577\uD579\uD57A\uD57B\uD57D",6,"\uD586\uD58A\uD58B"],["c161","\uD58C\uD58D\uD58E\uD58F\uD591",19,"\uD5A6\uD5A7"],["c181","\uD5A8",31,"\uC810\uC811\uC813\uC815\uC816\uC81C\uC81D\uC820\uC824\uC82C\uC82D\uC82F\uC831\uC838\uC83C\uC840\uC848\uC849\uC84C\uC84D\uC854\uC870\uC871\uC874\uC878\uC87A\uC880\uC881\uC883\uC885\uC886\uC887\uC88B\uC88C\uC88D\uC894\uC89D\uC89F\uC8A1\uC8A8\uC8BC\uC8BD\uC8C4\uC8C8\uC8CC\uC8D4\uC8D5\uC8D7\uC8D9\uC8E0\uC8E1\uC8E4\uC8F5\uC8FC\uC8FD\uC900\uC904\uC905\uC906\uC90C\uC90D\uC90F\uC911\uC918\uC92C\uC934\uC950\uC951\uC954\uC958\uC960\uC961\uC963\uC96C\uC970\uC974\uC97C\uC988\uC989\uC98C\uC990\uC998\uC999\uC99B\uC99D\uC9C0\uC9C1\uC9C4\uC9C7\uC9C8\uC9CA\uC9D0\uC9D1\uC9D3"],["c241","\uD5CA\uD5CB\uD5CD\uD5CE\uD5CF\uD5D1\uD5D3",4,"\uD5DA\uD5DC\uD5DE",5,"\uD5E6\uD5E7\uD5E9\uD5EA\uD5EB\uD5ED\uD5EE"],["c261","\uD5EF",4,"\uD5F6\uD5F8\uD5FA",5,"\uD602\uD603\uD605\uD606\uD607\uD609",6,"\uD612"],["c281","\uD616",5,"\uD61D\uD61E\uD61F\uD621\uD622\uD623\uD625",7,"\uD62E",9,"\uD63A\uD63B\uC9D5\uC9D6\uC9D9\uC9DA\uC9DC\uC9DD\uC9E0\uC9E2\uC9E4\uC9E7\uC9EC\uC9ED\uC9EF\uC9F0\uC9F1\uC9F8\uC9F9\uC9FC\uCA00\uCA08\uCA09\uCA0B\uCA0C\uCA0D\uCA14\uCA18\uCA29\uCA4C\uCA4D\uCA50\uCA54\uCA5C\uCA5D\uCA5F\uCA60\uCA61\uCA68\uCA7D\uCA84\uCA98\uCABC\uCABD\uCAC0\uCAC4\uCACC\uCACD\uCACF\uCAD1\uCAD3\uCAD8\uCAD9\uCAE0\uCAEC\uCAF4\uCB08\uCB10\uCB14\uCB18\uCB20\uCB21\uCB41\uCB48\uCB49\uCB4C\uCB50\uCB58\uCB59\uCB5D\uCB64\uCB78\uCB79\uCB9C\uCBB8\uCBD4\uCBE4\uCBE7\uCBE9\uCC0C\uCC0D\uCC10\uCC14\uCC1C\uCC1D\uCC21\uCC22\uCC27\uCC28\uCC29\uCC2C\uCC2E\uCC30\uCC38\uCC39\uCC3B"],["c341","\uD63D\uD63E\uD63F\uD641\uD642\uD643\uD644\uD646\uD647\uD64A\uD64C\uD64E\uD64F\uD650\uD652\uD653\uD656\uD657\uD659\uD65A\uD65B\uD65D",4],["c361","\uD662",4,"\uD668\uD66A",5,"\uD672\uD673\uD675",11],["c381","\uD681\uD682\uD684\uD686",5,"\uD68E\uD68F\uD691\uD692\uD693\uD695",7,"\uD69E\uD6A0\uD6A2",5,"\uD6A9\uD6AA\uCC3C\uCC3D\uCC3E\uCC44\uCC45\uCC48\uCC4C\uCC54\uCC55\uCC57\uCC58\uCC59\uCC60\uCC64\uCC66\uCC68\uCC70\uCC75\uCC98\uCC99\uCC9C\uCCA0\uCCA8\uCCA9\uCCAB\uCCAC\uCCAD\uCCB4\uCCB5\uCCB8\uCCBC\uCCC4\uCCC5\uCCC7\uCCC9\uCCD0\uCCD4\uCCE4\uCCEC\uCCF0\uCD01\uCD08\uCD09\uCD0C\uCD10\uCD18\uCD19\uCD1B\uCD1D\uCD24\uCD28\uCD2C\uCD39\uCD5C\uCD60\uCD64\uCD6C\uCD6D\uCD6F\uCD71\uCD78\uCD88\uCD94\uCD95\uCD98\uCD9C\uCDA4\uCDA5\uCDA7\uCDA9\uCDB0\uCDC4\uCDCC\uCDD0\uCDE8\uCDEC\uCDF0\uCDF8\uCDF9\uCDFB\uCDFD\uCE04\uCE08\uCE0C\uCE14\uCE19\uCE20\uCE21\uCE24\uCE28\uCE30\uCE31\uCE33\uCE35"],["c441","\uD6AB\uD6AD\uD6AE\uD6AF\uD6B1",7,"\uD6BA\uD6BC",7,"\uD6C6\uD6C7\uD6C9\uD6CA\uD6CB"],["c461","\uD6CD\uD6CE\uD6CF\uD6D0\uD6D2\uD6D3\uD6D5\uD6D6\uD6D8\uD6DA",5,"\uD6E1\uD6E2\uD6E3\uD6E5\uD6E6\uD6E7\uD6E9",4],["c481","\uD6EE\uD6EF\uD6F1\uD6F2\uD6F3\uD6F4\uD6F6",5,"\uD6FE\uD6FF\uD701\uD702\uD703\uD705",11,"\uD712\uD713\uD714\uCE58\uCE59\uCE5C\uCE5F\uCE60\uCE61\uCE68\uCE69\uCE6B\uCE6D\uCE74\uCE75\uCE78\uCE7C\uCE84\uCE85\uCE87\uCE89\uCE90\uCE91\uCE94\uCE98\uCEA0\uCEA1\uCEA3\uCEA4\uCEA5\uCEAC\uCEAD\uCEC1\uCEE4\uCEE5\uCEE8\uCEEB\uCEEC\uCEF4\uCEF5\uCEF7\uCEF8\uCEF9\uCF00\uCF01\uCF04\uCF08\uCF10\uCF11\uCF13\uCF15\uCF1C\uCF20\uCF24\uCF2C\uCF2D\uCF2F\uCF30\uCF31\uCF38\uCF54\uCF55\uCF58\uCF5C\uCF64\uCF65\uCF67\uCF69\uCF70\uCF71\uCF74\uCF78\uCF80\uCF85\uCF8C\uCFA1\uCFA8\uCFB0\uCFC4\uCFE0\uCFE1\uCFE4\uCFE8\uCFF0\uCFF1\uCFF3\uCFF5\uCFFC\uD000\uD004\uD011\uD018\uD02D\uD034\uD035\uD038\uD03C"],["c541","\uD715\uD716\uD717\uD71A\uD71B\uD71D\uD71E\uD71F\uD721",6,"\uD72A\uD72C\uD72E",5,"\uD736\uD737\uD739"],["c561","\uD73A\uD73B\uD73D",6,"\uD745\uD746\uD748\uD74A",5,"\uD752\uD753\uD755\uD75A",4],["c581","\uD75F\uD762\uD764\uD766\uD767\uD768\uD76A\uD76B\uD76D\uD76E\uD76F\uD771\uD772\uD773\uD775",6,"\uD77E\uD77F\uD780\uD782",5,"\uD78A\uD78B\uD044\uD045\uD047\uD049\uD050\uD054\uD058\uD060\uD06C\uD06D\uD070\uD074\uD07C\uD07D\uD081\uD0A4\uD0A5\uD0A8\uD0AC\uD0B4\uD0B5\uD0B7\uD0B9\uD0C0\uD0C1\uD0C4\uD0C8\uD0C9\uD0D0\uD0D1\uD0D3\uD0D4\uD0D5\uD0DC\uD0DD\uD0E0\uD0E4\uD0EC\uD0ED\uD0EF\uD0F0\uD0F1\uD0F8\uD10D\uD130\uD131\uD134\uD138\uD13A\uD140\uD141\uD143\uD144\uD145\uD14C\uD14D\uD150\uD154\uD15C\uD15D\uD15F\uD161\uD168\uD16C\uD17C\uD184\uD188\uD1A0\uD1A1\uD1A4\uD1A8\uD1B0\uD1B1\uD1B3\uD1B5\uD1BA\uD1BC\uD1C0\uD1D8\uD1F4\uD1F8\uD207\uD209\uD210\uD22C\uD22D\uD230\uD234\uD23C\uD23D\uD23F\uD241\uD248\uD25C"],["c641","\uD78D\uD78E\uD78F\uD791",6,"\uD79A\uD79C\uD79E",5],["c6a1","\uD264\uD280\uD281\uD284\uD288\uD290\uD291\uD295\uD29C\uD2A0\uD2A4\uD2AC\uD2B1\uD2B8\uD2B9\uD2BC\uD2BF\uD2C0\uD2C2\uD2C8\uD2C9\uD2CB\uD2D4\uD2D8\uD2DC\uD2E4\uD2E5\uD2F0\uD2F1\uD2F4\uD2F8\uD300\uD301\uD303\uD305\uD30C\uD30D\uD30E\uD310\uD314\uD316\uD31C\uD31D\uD31F\uD320\uD321\uD325\uD328\uD329\uD32C\uD330\uD338\uD339\uD33B\uD33C\uD33D\uD344\uD345\uD37C\uD37D\uD380\uD384\uD38C\uD38D\uD38F\uD390\uD391\uD398\uD399\uD39C\uD3A0\uD3A8\uD3A9\uD3AB\uD3AD\uD3B4\uD3B8\uD3BC\uD3C4\uD3C5\uD3C8\uD3C9\uD3D0\uD3D8\uD3E1\uD3E3\uD3EC\uD3ED\uD3F0\uD3F4\uD3FC\uD3FD\uD3FF\uD401"],["c7a1","\uD408\uD41D\uD440\uD444\uD45C\uD460\uD464\uD46D\uD46F\uD478\uD479\uD47C\uD47F\uD480\uD482\uD488\uD489\uD48B\uD48D\uD494\uD4A9\uD4CC\uD4D0\uD4D4\uD4DC\uD4DF\uD4E8\uD4EC\uD4F0\uD4F8\uD4FB\uD4FD\uD504\uD508\uD50C\uD514\uD515\uD517\uD53C\uD53D\uD540\uD544\uD54C\uD54D\uD54F\uD551\uD558\uD559\uD55C\uD560\uD565\uD568\uD569\uD56B\uD56D\uD574\uD575\uD578\uD57C\uD584\uD585\uD587\uD588\uD589\uD590\uD5A5\uD5C8\uD5C9\uD5CC\uD5D0\uD5D2\uD5D8\uD5D9\uD5DB\uD5DD\uD5E4\uD5E5\uD5E8\uD5EC\uD5F4\uD5F5\uD5F7\uD5F9\uD600\uD601\uD604\uD608\uD610\uD611\uD613\uD614\uD615\uD61C\uD620"],["c8a1","\uD624\uD62D\uD638\uD639\uD63C\uD640\uD645\uD648\uD649\uD64B\uD64D\uD651\uD654\uD655\uD658\uD65C\uD667\uD669\uD670\uD671\uD674\uD683\uD685\uD68C\uD68D\uD690\uD694\uD69D\uD69F\uD6A1\uD6A8\uD6AC\uD6B0\uD6B9\uD6BB\uD6C4\uD6C5\uD6C8\uD6CC\uD6D1\uD6D4\uD6D7\uD6D9\uD6E0\uD6E4\uD6E8\uD6F0\uD6F5\uD6FC\uD6FD\uD700\uD704\uD711\uD718\uD719\uD71C\uD720\uD728\uD729\uD72B\uD72D\uD734\uD735\uD738\uD73C\uD744\uD747\uD749\uD750\uD751\uD754\uD756\uD757\uD758\uD759\uD760\uD761\uD763\uD765\uD769\uD76C\uD770\uD774\uD77C\uD77D\uD781\uD788\uD789\uD78C\uD790\uD798\uD799\uD79B\uD79D"],["caa1","\u4F3D\u4F73\u5047\u50F9\u52A0\u53EF\u5475\u54E5\u5609\u5AC1\u5BB6\u6687\u67B6\u67B7\u67EF\u6B4C\u73C2\u75C2\u7A3C\u82DB\u8304\u8857\u8888\u8A36\u8CC8\u8DCF\u8EFB\u8FE6\u99D5\u523B\u5374\u5404\u606A\u6164\u6BBC\u73CF\u811A\u89BA\u89D2\u95A3\u4F83\u520A\u58BE\u5978\u59E6\u5E72\u5E79\u61C7\u63C0\u6746\u67EC\u687F\u6F97\u764E\u770B\u78F5\u7A08\u7AFF\u7C21\u809D\u826E\u8271\u8AEB\u9593\u4E6B\u559D\u66F7\u6E34\u78A3\u7AED\u845B\u8910\u874E\u97A8\u52D8\u574E\u582A\u5D4C\u611F\u61BE\u6221\u6562\u67D1\u6A44\u6E1B\u7518\u75B3\u76E3\u77B0\u7D3A\u90AF\u9451\u9452\u9F95"],["cba1","\u5323\u5CAC\u7532\u80DB\u9240\u9598\u525B\u5808\u59DC\u5CA1\u5D17\u5EB7\u5F3A\u5F4A\u6177\u6C5F\u757A\u7586\u7CE0\u7D73\u7DB1\u7F8C\u8154\u8221\u8591\u8941\u8B1B\u92FC\u964D\u9C47\u4ECB\u4EF7\u500B\u51F1\u584F\u6137\u613E\u6168\u6539\u69EA\u6F11\u75A5\u7686\u76D6\u7B87\u82A5\u84CB\uF900\u93A7\u958B\u5580\u5BA2\u5751\uF901\u7CB3\u7FB9\u91B5\u5028\u53BB\u5C45\u5DE8\u62D2\u636E\u64DA\u64E7\u6E20\u70AC\u795B\u8DDD\u8E1E\uF902\u907D\u9245\u92F8\u4E7E\u4EF6\u5065\u5DFE\u5EFA\u6106\u6957\u8171\u8654\u8E47\u9375\u9A2B\u4E5E\u5091\u6770\u6840\u5109\u528D\u5292\u6AA2"],["cca1","\u77BC\u9210\u9ED4\u52AB\u602F\u8FF2\u5048\u61A9\u63ED\u64CA\u683C\u6A84\u6FC0\u8188\u89A1\u9694\u5805\u727D\u72AC\u7504\u7D79\u7E6D\u80A9\u898B\u8B74\u9063\u9D51\u6289\u6C7A\u6F54\u7D50\u7F3A\u8A23\u517C\u614A\u7B9D\u8B19\u9257\u938C\u4EAC\u4FD3\u501E\u50BE\u5106\u52C1\u52CD\u537F\u5770\u5883\u5E9A\u5F91\u6176\u61AC\u64CE\u656C\u666F\u66BB\u66F4\u6897\u6D87\u7085\u70F1\u749F\u74A5\u74CA\u75D9\u786C\u78EC\u7ADF\u7AF6\u7D45\u7D93\u8015\u803F\u811B\u8396\u8B66\u8F15\u9015\u93E1\u9803\u9838\u9A5A\u9BE8\u4FC2\u5553\u583A\u5951\u5B63\u5C46\u60B8\u6212\u6842\u68B0"],["cda1","\u68E8\u6EAA\u754C\u7678\u78CE\u7A3D\u7CFB\u7E6B\u7E7C\u8A08\u8AA1\u8C3F\u968E\u9DC4\u53E4\u53E9\u544A\u5471\u56FA\u59D1\u5B64\u5C3B\u5EAB\u62F7\u6537\u6545\u6572\u66A0\u67AF\u69C1\u6CBD\u75FC\u7690\u777E\u7A3F\u7F94\u8003\u80A1\u818F\u82E6\u82FD\u83F0\u85C1\u8831\u88B4\u8AA5\uF903\u8F9C\u932E\u96C7\u9867\u9AD8\u9F13\u54ED\u659B\u66F2\u688F\u7A40\u8C37\u9D60\u56F0\u5764\u5D11\u6606\u68B1\u68CD\u6EFE\u7428\u889E\u9BE4\u6C68\uF904\u9AA8\u4F9B\u516C\u5171\u529F\u5B54\u5DE5\u6050\u606D\u62F1\u63A7\u653B\u73D9\u7A7A\u86A3\u8CA2\u978F\u4E32\u5BE1\u6208\u679C\u74DC"],["cea1","\u79D1\u83D3\u8A87\u8AB2\u8DE8\u904E\u934B\u9846\u5ED3\u69E8\u85FF\u90ED\uF905\u51A0\u5B98\u5BEC\u6163\u68FA\u6B3E\u704C\u742F\u74D8\u7BA1\u7F50\u83C5\u89C0\u8CAB\u95DC\u9928\u522E\u605D\u62EC\u9002\u4F8A\u5149\u5321\u58D9\u5EE3\u66E0\u6D38\u709A\u72C2\u73D6\u7B50\u80F1\u945B\u5366\u639B\u7F6B\u4E56\u5080\u584A\u58DE\u602A\u6127\u62D0\u69D0\u9B41\u5B8F\u7D18\u80B1\u8F5F\u4EA4\u50D1\u54AC\u55AC\u5B0C\u5DA0\u5DE7\u652A\u654E\u6821\u6A4B\u72E1\u768E\u77EF\u7D5E\u7FF9\u81A0\u854E\u86DF\u8F03\u8F4E\u90CA\u9903\u9A55\u9BAB\u4E18\u4E45\u4E5D\u4EC7\u4FF1\u5177\u52FE"],["cfa1","\u5340\u53E3\u53E5\u548E\u5614\u5775\u57A2\u5BC7\u5D87\u5ED0\u61FC\u62D8\u6551\u67B8\u67E9\u69CB\u6B50\u6BC6\u6BEC\u6C42\u6E9D\u7078\u72D7\u7396\u7403\u77BF\u77E9\u7A76\u7D7F\u8009\u81FC\u8205\u820A\u82DF\u8862\u8B33\u8CFC\u8EC0\u9011\u90B1\u9264\u92B6\u99D2\u9A45\u9CE9\u9DD7\u9F9C\u570B\u5C40\u83CA\u97A0\u97AB\u9EB4\u541B\u7A98\u7FA4\u88D9\u8ECD\u90E1\u5800\u5C48\u6398\u7A9F\u5BAE\u5F13\u7A79\u7AAE\u828E\u8EAC\u5026\u5238\u52F8\u5377\u5708\u62F3\u6372\u6B0A\u6DC3\u7737\u53A5\u7357\u8568\u8E76\u95D5\u673A\u6AC3\u6F70\u8A6D\u8ECC\u994B\uF906\u6677\u6B78\u8CB4"],["d0a1","\u9B3C\uF907\u53EB\u572D\u594E\u63C6\u69FB\u73EA\u7845\u7ABA\u7AC5\u7CFE\u8475\u898F\u8D73\u9035\u95A8\u52FB\u5747\u7547\u7B60\u83CC\u921E\uF908\u6A58\u514B\u524B\u5287\u621F\u68D8\u6975\u9699\u50C5\u52A4\u52E4\u61C3\u65A4\u6839\u69FF\u747E\u7B4B\u82B9\u83EB\u89B2\u8B39\u8FD1\u9949\uF909\u4ECA\u5997\u64D2\u6611\u6A8E\u7434\u7981\u79BD\u82A9\u887E\u887F\u895F\uF90A\u9326\u4F0B\u53CA\u6025\u6271\u6C72\u7D1A\u7D66\u4E98\u5162\u77DC\u80AF\u4F01\u4F0E\u5176\u5180\u55DC\u5668\u573B\u57FA\u57FC\u5914\u5947\u5993\u5BC4\u5C90\u5D0E\u5DF1\u5E7E\u5FCC\u6280\u65D7\u65E3"],["d1a1","\u671E\u671F\u675E\u68CB\u68C4\u6A5F\u6B3A\u6C23\u6C7D\u6C82\u6DC7\u7398\u7426\u742A\u7482\u74A3\u7578\u757F\u7881\u78EF\u7941\u7947\u7948\u797A\u7B95\u7D00\u7DBA\u7F88\u8006\u802D\u808C\u8A18\u8B4F\u8C48\u8D77\u9321\u9324\u98E2\u9951\u9A0E\u9A0F\u9A65\u9E92\u7DCA\u4F76\u5409\u62EE\u6854\u91D1\u55AB\u513A\uF90B\uF90C\u5A1C\u61E6\uF90D\u62CF\u62FF\uF90E",5,"\u90A3\uF914",4,"\u8AFE\uF919\uF91A\uF91B\uF91C\u6696\uF91D\u7156\uF91E\uF91F\u96E3\uF920\u634F\u637A\u5357\uF921\u678F\u6960\u6E73\uF922\u7537\uF923\uF924\uF925"],["d2a1","\u7D0D\uF926\uF927\u8872\u56CA\u5A18\uF928",4,"\u4E43\uF92D\u5167\u5948\u67F0\u8010\uF92E\u5973\u5E74\u649A\u79CA\u5FF5\u606C\u62C8\u637B\u5BE7\u5BD7\u52AA\uF92F\u5974\u5F29\u6012\uF930\uF931\uF932\u7459\uF933",5,"\u99D1\uF939",10,"\u6FC3\uF944\uF945\u81BF\u8FB2\u60F1\uF946\uF947\u8166\uF948\uF949\u5C3F\uF94A",7,"\u5AE9\u8A25\u677B\u7D10\uF952",5,"\u80FD\uF958\uF959\u5C3C\u6CE5\u533F\u6EBA\u591A\u8336"],["d3a1","\u4E39\u4EB6\u4F46\u55AE\u5718\u58C7\u5F56\u65B7\u65E6\u6A80\u6BB5\u6E4D\u77ED\u7AEF\u7C1E\u7DDE\u86CB\u8892\u9132\u935B\u64BB\u6FBE\u737A\u75B8\u9054\u5556\u574D\u61BA\u64D4\u66C7\u6DE1\u6E5B\u6F6D\u6FB9\u75F0\u8043\u81BD\u8541\u8983\u8AC7\u8B5A\u931F\u6C93\u7553\u7B54\u8E0F\u905D\u5510\u5802\u5858\u5E62\u6207\u649E\u68E0\u7576\u7CD6\u87B3\u9EE8\u4EE3\u5788\u576E\u5927\u5C0D\u5CB1\u5E36\u5F85\u6234\u64E1\u73B3\u81FA\u888B\u8CB8\u968A\u9EDB\u5B85\u5FB7\u60B3\u5012\u5200\u5230\u5716\u5835\u5857\u5C0E\u5C60\u5CF6\u5D8B\u5EA6\u5F92\u60BC\u6311\u6389\u6417\u6843"],["d4a1","\u68F9\u6AC2\u6DD8\u6E21\u6ED4\u6FE4\u71FE\u76DC\u7779\u79B1\u7A3B\u8404\u89A9\u8CED\u8DF3\u8E48\u9003\u9014\u9053\u90FD\u934D\u9676\u97DC\u6BD2\u7006\u7258\u72A2\u7368\u7763\u79BF\u7BE4\u7E9B\u8B80\u58A9\u60C7\u6566\u65FD\u66BE\u6C8C\u711E\u71C9\u8C5A\u9813\u4E6D\u7A81\u4EDD\u51AC\u51CD\u52D5\u540C\u61A7\u6771\u6850\u68DF\u6D1E\u6F7C\u75BC\u77B3\u7AE5\u80F4\u8463\u9285\u515C\u6597\u675C\u6793\u75D8\u7AC7\u8373\uF95A\u8C46\u9017\u982D\u5C6F\u81C0\u829A\u9041\u906F\u920D\u5F97\u5D9D\u6A59\u71C8\u767B\u7B49\u85E4\u8B04\u9127\u9A30\u5587\u61F6\uF95B\u7669\u7F85"],["d5a1","\u863F\u87BA\u88F8\u908F\uF95C\u6D1B\u70D9\u73DE\u7D61\u843D\uF95D\u916A\u99F1\uF95E\u4E82\u5375\u6B04\u6B12\u703E\u721B\u862D\u9E1E\u524C\u8FA3\u5D50\u64E5\u652C\u6B16\u6FEB\u7C43\u7E9C\u85CD\u8964\u89BD\u62C9\u81D8\u881F\u5ECA\u6717\u6D6A\u72FC\u7405\u746F\u8782\u90DE\u4F86\u5D0D\u5FA0\u840A\u51B7\u63A0\u7565\u4EAE\u5006\u5169\u51C9\u6881\u6A11\u7CAE\u7CB1\u7CE7\u826F\u8AD2\u8F1B\u91CF\u4FB6\u5137\u52F5\u5442\u5EEC\u616E\u623E\u65C5\u6ADA\u6FFE\u792A\u85DC\u8823\u95AD\u9A62\u9A6A\u9E97\u9ECE\u529B\u66C6\u6B77\u701D\u792B\u8F62\u9742\u6190\u6200\u6523\u6F23"],["d6a1","\u7149\u7489\u7DF4\u806F\u84EE\u8F26\u9023\u934A\u51BD\u5217\u52A3\u6D0C\u70C8\u88C2\u5EC9\u6582\u6BAE\u6FC2\u7C3E\u7375\u4EE4\u4F36\u56F9\uF95F\u5CBA\u5DBA\u601C\u73B2\u7B2D\u7F9A\u7FCE\u8046\u901E\u9234\u96F6\u9748\u9818\u9F61\u4F8B\u6FA7\u79AE\u91B4\u96B7\u52DE\uF960\u6488\u64C4\u6AD3\u6F5E\u7018\u7210\u76E7\u8001\u8606\u865C\u8DEF\u8F05\u9732\u9B6F\u9DFA\u9E75\u788C\u797F\u7DA0\u83C9\u9304\u9E7F\u9E93\u8AD6\u58DF\u5F04\u6727\u7027\u74CF\u7C60\u807E\u5121\u7028\u7262\u78CA\u8CC2\u8CDA\u8CF4\u96F7\u4E86\u50DA\u5BEE\u5ED6\u6599\u71CE\u7642\u77AD\u804A\u84FC"],["d7a1","\u907C\u9B27\u9F8D\u58D8\u5A41\u5C62\u6A13\u6DDA\u6F0F\u763B\u7D2F\u7E37\u851E\u8938\u93E4\u964B\u5289\u65D2\u67F3\u69B4\u6D41\u6E9C\u700F\u7409\u7460\u7559\u7624\u786B\u8B2C\u985E\u516D\u622E\u9678\u4F96\u502B\u5D19\u6DEA\u7DB8\u8F2A\u5F8B\u6144\u6817\uF961\u9686\u52D2\u808B\u51DC\u51CC\u695E\u7A1C\u7DBE\u83F1\u9675\u4FDA\u5229\u5398\u540F\u550E\u5C65\u60A7\u674E\u68A8\u6D6C\u7281\u72F8\u7406\u7483\uF962\u75E2\u7C6C\u7F79\u7FB8\u8389\u88CF\u88E1\u91CC\u91D0\u96E2\u9BC9\u541D\u6F7E\u71D0\u7498\u85FA\u8EAA\u96A3\u9C57\u9E9F\u6797\u6DCB\u7433\u81E8\u9716\u782C"],["d8a1","\u7ACB\u7B20\u7C92\u6469\u746A\u75F2\u78BC\u78E8\u99AC\u9B54\u9EBB\u5BDE\u5E55\u6F20\u819C\u83AB\u9088\u4E07\u534D\u5A29\u5DD2\u5F4E\u6162\u633D\u6669\u66FC\u6EFF\u6F2B\u7063\u779E\u842C\u8513\u883B\u8F13\u9945\u9C3B\u551C\u62B9\u672B\u6CAB\u8309\u896A\u977A\u4EA1\u5984\u5FD8\u5FD9\u671B\u7DB2\u7F54\u8292\u832B\u83BD\u8F1E\u9099\u57CB\u59B9\u5A92\u5BD0\u6627\u679A\u6885\u6BCF\u7164\u7F75\u8CB7\u8CE3\u9081\u9B45\u8108\u8C8A\u964C\u9A40\u9EA5\u5B5F\u6C13\u731B\u76F2\u76DF\u840C\u51AA\u8993\u514D\u5195\u52C9\u68C9\u6C94\u7704\u7720\u7DBF\u7DEC\u9762\u9EB5\u6EC5"],["d9a1","\u8511\u51A5\u540D\u547D\u660E\u669D\u6927\u6E9F\u76BF\u7791\u8317\u84C2\u879F\u9169\u9298\u9CF4\u8882\u4FAE\u5192\u52DF\u59C6\u5E3D\u6155\u6478\u6479\u66AE\u67D0\u6A21\u6BCD\u6BDB\u725F\u7261\u7441\u7738\u77DB\u8017\u82BC\u8305\u8B00\u8B28\u8C8C\u6728\u6C90\u7267\u76EE\u7766\u7A46\u9DA9\u6B7F\u6C92\u5922\u6726\u8499\u536F\u5893\u5999\u5EDF\u63CF\u6634\u6773\u6E3A\u732B\u7AD7\u82D7\u9328\u52D9\u5DEB\u61AE\u61CB\u620A\u62C7\u64AB\u65E0\u6959\u6B66\u6BCB\u7121\u73F7\u755D\u7E46\u821E\u8302\u856A\u8AA3\u8CBF\u9727\u9D61\u58A8\u9ED8\u5011\u520E\u543B\u554F\u6587"],["daa1","\u6C76\u7D0A\u7D0B\u805E\u868A\u9580\u96EF\u52FF\u6C95\u7269\u5473\u5A9A\u5C3E\u5D4B\u5F4C\u5FAE\u672A\u68B6\u6963\u6E3C\u6E44\u7709\u7C73\u7F8E\u8587\u8B0E\u8FF7\u9761\u9EF4\u5CB7\u60B6\u610D\u61AB\u654F\u65FB\u65FC\u6C11\u6CEF\u739F\u73C9\u7DE1\u9594\u5BC6\u871C\u8B10\u525D\u535A\u62CD\u640F\u64B2\u6734\u6A38\u6CCA\u73C0\u749E\u7B94\u7C95\u7E1B\u818A\u8236\u8584\u8FEB\u96F9\u99C1\u4F34\u534A\u53CD\u53DB\u62CC\u642C\u6500\u6591\u69C3\u6CEE\u6F58\u73ED\u7554\u7622\u76E4\u76FC\u78D0\u78FB\u792C\u7D46\u822C\u87E0\u8FD4\u9812\u98EF\u52C3\u62D4\u64A5\u6E24\u6F51"],["dba1","\u767C\u8DCB\u91B1\u9262\u9AEE\u9B43\u5023\u508D\u574A\u59A8\u5C28\u5E47\u5F77\u623F\u653E\u65B9\u65C1\u6609\u678B\u699C\u6EC2\u78C5\u7D21\u80AA\u8180\u822B\u82B3\u84A1\u868C\u8A2A\u8B17\u90A6\u9632\u9F90\u500D\u4FF3\uF963\u57F9\u5F98\u62DC\u6392\u676F\u6E43\u7119\u76C3\u80CC\u80DA\u88F4\u88F5\u8919\u8CE0\u8F29\u914D\u966A\u4F2F\u4F70\u5E1B\u67CF\u6822\u767D\u767E\u9B44\u5E61\u6A0A\u7169\u71D4\u756A\uF964\u7E41\u8543\u85E9\u98DC\u4F10\u7B4F\u7F70\u95A5\u51E1\u5E06\u68B5\u6C3E\u6C4E\u6CDB\u72AF\u7BC4\u8303\u6CD5\u743A\u50FB\u5288\u58C1\u64D8\u6A97\u74A7\u7656"],["dca1","\u78A7\u8617\u95E2\u9739\uF965\u535E\u5F01\u8B8A\u8FA8\u8FAF\u908A\u5225\u77A5\u9C49\u9F08\u4E19\u5002\u5175\u5C5B\u5E77\u661E\u663A\u67C4\u68C5\u70B3\u7501\u75C5\u79C9\u7ADD\u8F27\u9920\u9A08\u4FDD\u5821\u5831\u5BF6\u666E\u6B65\u6D11\u6E7A\u6F7D\u73E4\u752B\u83E9\u88DC\u8913\u8B5C\u8F14\u4F0F\u50D5\u5310\u535C\u5B93\u5FA9\u670D\u798F\u8179\u832F\u8514\u8907\u8986\u8F39\u8F3B\u99A5\u9C12\u672C\u4E76\u4FF8\u5949\u5C01\u5CEF\u5CF0\u6367\u68D2\u70FD\u71A2\u742B\u7E2B\u84EC\u8702\u9022\u92D2\u9CF3\u4E0D\u4ED8\u4FEF\u5085\u5256\u526F\u5426\u5490\u57E0\u592B\u5A66"],["dda1","\u5B5A\u5B75\u5BCC\u5E9C\uF966\u6276\u6577\u65A7\u6D6E\u6EA5\u7236\u7B26\u7C3F\u7F36\u8150\u8151\u819A\u8240\u8299\u83A9\u8A03\u8CA0\u8CE6\u8CFB\u8D74\u8DBA\u90E8\u91DC\u961C\u9644\u99D9\u9CE7\u5317\u5206\u5429\u5674\u58B3\u5954\u596E\u5FFF\u61A4\u626E\u6610\u6C7E\u711A\u76C6\u7C89\u7CDE\u7D1B\u82AC\u8CC1\u96F0\uF967\u4F5B\u5F17\u5F7F\u62C2\u5D29\u670B\u68DA\u787C\u7E43\u9D6C\u4E15\u5099\u5315\u532A\u5351\u5983\u5A62\u5E87\u60B2\u618A\u6249\u6279\u6590\u6787\u69A7\u6BD4\u6BD6\u6BD7\u6BD8\u6CB8\uF968\u7435\u75FA\u7812\u7891\u79D5\u79D8\u7C83\u7DCB\u7FE1\u80A5"],["dea1","\u813E\u81C2\u83F2\u871A\u88E8\u8AB9\u8B6C\u8CBB\u9119\u975E\u98DB\u9F3B\u56AC\u5B2A\u5F6C\u658C\u6AB3\u6BAF\u6D5C\u6FF1\u7015\u725D\u73AD\u8CA7\u8CD3\u983B\u6191\u6C37\u8058\u9A01\u4E4D\u4E8B\u4E9B\u4ED5\u4F3A\u4F3C\u4F7F\u4FDF\u50FF\u53F2\u53F8\u5506\u55E3\u56DB\u58EB\u5962\u5A11\u5BEB\u5BFA\u5C04\u5DF3\u5E2B\u5F99\u601D\u6368\u659C\u65AF\u67F6\u67FB\u68AD\u6B7B\u6C99\u6CD7\u6E23\u7009\u7345\u7802\u793E\u7940\u7960\u79C1\u7BE9\u7D17\u7D72\u8086\u820D\u838E\u84D1\u86C7\u88DF\u8A50\u8A5E\u8B1D\u8CDC\u8D66\u8FAD\u90AA\u98FC\u99DF\u9E9D\u524A\uF969\u6714\uF96A"],["dfa1","\u5098\u522A\u5C71\u6563\u6C55\u73CA\u7523\u759D\u7B97\u849C\u9178\u9730\u4E77\u6492\u6BBA\u715E\u85A9\u4E09\uF96B\u6749\u68EE\u6E17\u829F\u8518\u886B\u63F7\u6F81\u9212\u98AF\u4E0A\u50B7\u50CF\u511F\u5546\u55AA\u5617\u5B40\u5C19\u5CE0\u5E38\u5E8A\u5EA0\u5EC2\u60F3\u6851\u6A61\u6E58\u723D\u7240\u72C0\u76F8\u7965\u7BB1\u7FD4\u88F3\u89F4\u8A73\u8C61\u8CDE\u971C\u585E\u74BD\u8CFD\u55C7\uF96C\u7A61\u7D22\u8272\u7272\u751F\u7525\uF96D\u7B19\u5885\u58FB\u5DBC\u5E8F\u5EB6\u5F90\u6055\u6292\u637F\u654D\u6691\u66D9\u66F8\u6816\u68F2\u7280\u745E\u7B6E\u7D6E\u7DD6\u7F72"],["e0a1","\u80E5\u8212\u85AF\u897F\u8A93\u901D\u92E4\u9ECD\u9F20\u5915\u596D\u5E2D\u60DC\u6614\u6673\u6790\u6C50\u6DC5\u6F5F\u77F3\u78A9\u84C6\u91CB\u932B\u4ED9\u50CA\u5148\u5584\u5B0B\u5BA3\u6247\u657E\u65CB\u6E32\u717D\u7401\u7444\u7487\u74BF\u766C\u79AA\u7DDA\u7E55\u7FA8\u817A\u81B3\u8239\u861A\u87EC\u8A75\u8DE3\u9078\u9291\u9425\u994D\u9BAE\u5368\u5C51\u6954\u6CC4\u6D29\u6E2B\u820C\u859B\u893B\u8A2D\u8AAA\u96EA\u9F67\u5261\u66B9\u6BB2\u7E96\u87FE\u8D0D\u9583\u965D\u651D\u6D89\u71EE\uF96E\u57CE\u59D3\u5BAC\u6027\u60FA\u6210\u661F\u665F\u7329\u73F9\u76DB\u7701\u7B6C"],["e1a1","\u8056\u8072\u8165\u8AA0\u9192\u4E16\u52E2\u6B72\u6D17\u7A05\u7B39\u7D30\uF96F\u8CB0\u53EC\u562F\u5851\u5BB5\u5C0F\u5C11\u5DE2\u6240\u6383\u6414\u662D\u68B3\u6CBC\u6D88\u6EAF\u701F\u70A4\u71D2\u7526\u758F\u758E\u7619\u7B11\u7BE0\u7C2B\u7D20\u7D39\u852C\u856D\u8607\u8A34\u900D\u9061\u90B5\u92B7\u97F6\u9A37\u4FD7\u5C6C\u675F\u6D91\u7C9F\u7E8C\u8B16\u8D16\u901F\u5B6B\u5DFD\u640D\u84C0\u905C\u98E1\u7387\u5B8B\u609A\u677E\u6DDE\u8A1F\u8AA6\u9001\u980C\u5237\uF970\u7051\u788E\u9396\u8870\u91D7\u4FEE\u53D7\u55FD\u56DA\u5782\u58FD\u5AC2\u5B88\u5CAB\u5CC0\u5E25\u6101"],["e2a1","\u620D\u624B\u6388\u641C\u6536\u6578\u6A39\u6B8A\u6C34\u6D19\u6F31\u71E7\u72E9\u7378\u7407\u74B2\u7626\u7761\u79C0\u7A57\u7AEA\u7CB9\u7D8F\u7DAC\u7E61\u7F9E\u8129\u8331\u8490\u84DA\u85EA\u8896\u8AB0\u8B90\u8F38\u9042\u9083\u916C\u9296\u92B9\u968B\u96A7\u96A8\u96D6\u9700\u9808\u9996\u9AD3\u9B1A\u53D4\u587E\u5919\u5B70\u5BBF\u6DD1\u6F5A\u719F\u7421\u74B9\u8085\u83FD\u5DE1\u5F87\u5FAA\u6042\u65EC\u6812\u696F\u6A53\u6B89\u6D35\u6DF3\u73E3\u76FE\u77AC\u7B4D\u7D14\u8123\u821C\u8340\u84F4\u8563\u8A62\u8AC4\u9187\u931E\u9806\u99B4\u620C\u8853\u8FF0\u9265\u5D07\u5D27"],["e3a1","\u5D69\u745F\u819D\u8768\u6FD5\u62FE\u7FD2\u8936\u8972\u4E1E\u4E58\u50E7\u52DD\u5347\u627F\u6607\u7E69\u8805\u965E\u4F8D\u5319\u5636\u59CB\u5AA4\u5C38\u5C4E\u5C4D\u5E02\u5F11\u6043\u65BD\u662F\u6642\u67BE\u67F4\u731C\u77E2\u793A\u7FC5\u8494\u84CD\u8996\u8A66\u8A69\u8AE1\u8C55\u8C7A\u57F4\u5BD4\u5F0F\u606F\u62ED\u690D\u6B96\u6E5C\u7184\u7BD2\u8755\u8B58\u8EFE\u98DF\u98FE\u4F38\u4F81\u4FE1\u547B\u5A20\u5BB8\u613C\u65B0\u6668\u71FC\u7533\u795E\u7D33\u814E\u81E3\u8398\u85AA\u85CE\u8703\u8A0A\u8EAB\u8F9B\uF971\u8FC5\u5931\u5BA4\u5BE6\u6089\u5BE9\u5C0B\u5FC3\u6C81"],["e4a1","\uF972\u6DF1\u700B\u751A\u82AF\u8AF6\u4EC0\u5341\uF973\u96D9\u6C0F\u4E9E\u4FC4\u5152\u555E\u5A25\u5CE8\u6211\u7259\u82BD\u83AA\u86FE\u8859\u8A1D\u963F\u96C5\u9913\u9D09\u9D5D\u580A\u5CB3\u5DBD\u5E44\u60E1\u6115\u63E1\u6A02\u6E25\u9102\u9354\u984E\u9C10\u9F77\u5B89\u5CB8\u6309\u664F\u6848\u773C\u96C1\u978D\u9854\u9B9F\u65A1\u8B01\u8ECB\u95BC\u5535\u5CA9\u5DD6\u5EB5\u6697\u764C\u83F4\u95C7\u58D3\u62BC\u72CE\u9D28\u4EF0\u592E\u600F\u663B\u6B83\u79E7\u9D26\u5393\u54C0\u57C3\u5D16\u611B\u66D6\u6DAF\u788D\u827E\u9698\u9744\u5384\u627C\u6396\u6DB2\u7E0A\u814B\u984D"],["e5a1","\u6AFB\u7F4C\u9DAF\u9E1A\u4E5F\u503B\u51B6\u591C\u60F9\u63F6\u6930\u723A\u8036\uF974\u91CE\u5F31\uF975\uF976\u7D04\u82E5\u846F\u84BB\u85E5\u8E8D\uF977\u4F6F\uF978\uF979\u58E4\u5B43\u6059\u63DA\u6518\u656D\u6698\uF97A\u694A\u6A23\u6D0B\u7001\u716C\u75D2\u760D\u79B3\u7A70\uF97B\u7F8A\uF97C\u8944\uF97D\u8B93\u91C0\u967D\uF97E\u990A\u5704\u5FA1\u65BC\u6F01\u7600\u79A6\u8A9E\u99AD\u9B5A\u9F6C\u5104\u61B6\u6291\u6A8D\u81C6\u5043\u5830\u5F66\u7109\u8A00\u8AFA\u5B7C\u8616\u4FFA\u513C\u56B4\u5944\u63A9\u6DF9\u5DAA\u696D\u5186\u4E88\u4F59\uF97F\uF980\uF981\u5982\uF982"],["e6a1","\uF983\u6B5F\u6C5D\uF984\u74B5\u7916\uF985\u8207\u8245\u8339\u8F3F\u8F5D\uF986\u9918\uF987\uF988\uF989\u4EA6\uF98A\u57DF\u5F79\u6613\uF98B\uF98C\u75AB\u7E79\u8B6F\uF98D\u9006\u9A5B\u56A5\u5827\u59F8\u5A1F\u5BB4\uF98E\u5EF6\uF98F\uF990\u6350\u633B\uF991\u693D\u6C87\u6CBF\u6D8E\u6D93\u6DF5\u6F14\uF992\u70DF\u7136\u7159\uF993\u71C3\u71D5\uF994\u784F\u786F\uF995\u7B75\u7DE3\uF996\u7E2F\uF997\u884D\u8EDF\uF998\uF999\uF99A\u925B\uF99B\u9CF6\uF99C\uF99D\uF99E\u6085\u6D85\uF99F\u71B1\uF9A0\uF9A1\u95B1\u53AD\uF9A2\uF9A3\uF9A4\u67D3\uF9A5\u708E\u7130\u7430\u8276\u82D2"],["e7a1","\uF9A6\u95BB\u9AE5\u9E7D\u66C4\uF9A7\u71C1\u8449\uF9A8\uF9A9\u584B\uF9AA\uF9AB\u5DB8\u5F71\uF9AC\u6620\u668E\u6979\u69AE\u6C38\u6CF3\u6E36\u6F41\u6FDA\u701B\u702F\u7150\u71DF\u7370\uF9AD\u745B\uF9AE\u74D4\u76C8\u7A4E\u7E93\uF9AF\uF9B0\u82F1\u8A60\u8FCE\uF9B1\u9348\uF9B2\u9719\uF9B3\uF9B4\u4E42\u502A\uF9B5\u5208\u53E1\u66F3\u6C6D\u6FCA\u730A\u777F\u7A62\u82AE\u85DD\u8602\uF9B6\u88D4\u8A63\u8B7D\u8C6B\uF9B7\u92B3\uF9B8\u9713\u9810\u4E94\u4F0D\u4FC9\u50B2\u5348\u543E\u5433\u55DA\u5862\u58BA\u5967\u5A1B\u5BE4\u609F\uF9B9\u61CA\u6556\u65FF\u6664\u68A7\u6C5A\u6FB3"],["e8a1","\u70CF\u71AC\u7352\u7B7D\u8708\u8AA4\u9C32\u9F07\u5C4B\u6C83\u7344\u7389\u923A\u6EAB\u7465\u761F\u7A69\u7E15\u860A\u5140\u58C5\u64C1\u74EE\u7515\u7670\u7FC1\u9095\u96CD\u9954\u6E26\u74E6\u7AA9\u7AAA\u81E5\u86D9\u8778\u8A1B\u5A49\u5B8C\u5B9B\u68A1\u6900\u6D63\u73A9\u7413\u742C\u7897\u7DE9\u7FEB\u8118\u8155\u839E\u8C4C\u962E\u9811\u66F0\u5F80\u65FA\u6789\u6C6A\u738B\u502D\u5A03\u6B6A\u77EE\u5916\u5D6C\u5DCD\u7325\u754F\uF9BA\uF9BB\u50E5\u51F9\u582F\u592D\u5996\u59DA\u5BE5\uF9BC\uF9BD\u5DA2\u62D7\u6416\u6493\u64FE\uF9BE\u66DC\uF9BF\u6A48\uF9C0\u71FF\u7464\uF9C1"],["e9a1","\u7A88\u7AAF\u7E47\u7E5E\u8000\u8170\uF9C2\u87EF\u8981\u8B20\u9059\uF9C3\u9080\u9952\u617E\u6B32\u6D74\u7E1F\u8925\u8FB1\u4FD1\u50AD\u5197\u52C7\u57C7\u5889\u5BB9\u5EB8\u6142\u6995\u6D8C\u6E67\u6EB6\u7194\u7462\u7528\u752C\u8073\u8338\u84C9\u8E0A\u9394\u93DE\uF9C4\u4E8E\u4F51\u5076\u512A\u53C8\u53CB\u53F3\u5B87\u5BD3\u5C24\u611A\u6182\u65F4\u725B\u7397\u7440\u76C2\u7950\u7991\u79B9\u7D06\u7FBD\u828B\u85D5\u865E\u8FC2\u9047\u90F5\u91EA\u9685\u96E8\u96E9\u52D6\u5F67\u65ED\u6631\u682F\u715C\u7A36\u90C1\u980A\u4E91\uF9C5\u6A52\u6B9E\u6F90\u7189\u8018\u82B8\u8553"],["eaa1","\u904B\u9695\u96F2\u97FB\u851A\u9B31\u4E90\u718A\u96C4\u5143\u539F\u54E1\u5713\u5712\u57A3\u5A9B\u5AC4\u5BC3\u6028\u613F\u63F4\u6C85\u6D39\u6E72\u6E90\u7230\u733F\u7457\u82D1\u8881\u8F45\u9060\uF9C6\u9662\u9858\u9D1B\u6708\u8D8A\u925E\u4F4D\u5049\u50DE\u5371\u570D\u59D4\u5A01\u5C09\u6170\u6690\u6E2D\u7232\u744B\u7DEF\u80C3\u840E\u8466\u853F\u875F\u885B\u8918\u8B02\u9055\u97CB\u9B4F\u4E73\u4F91\u5112\u516A\uF9C7\u552F\u55A9\u5B7A\u5BA5\u5E7C\u5E7D\u5EBE\u60A0\u60DF\u6108\u6109\u63C4\u6538\u6709\uF9C8\u67D4\u67DA\uF9C9\u6961\u6962\u6CB9\u6D27\uF9CA\u6E38\uF9CB"],["eba1","\u6FE1\u7336\u7337\uF9CC\u745C\u7531\uF9CD\u7652\uF9CE\uF9CF\u7DAD\u81FE\u8438\u88D5\u8A98\u8ADB\u8AED\u8E30\u8E42\u904A\u903E\u907A\u9149\u91C9\u936E\uF9D0\uF9D1\u5809\uF9D2\u6BD3\u8089\u80B2\uF9D3\uF9D4\u5141\u596B\u5C39\uF9D5\uF9D6\u6F64\u73A7\u80E4\u8D07\uF9D7\u9217\u958F\uF9D8\uF9D9\uF9DA\uF9DB\u807F\u620E\u701C\u7D68\u878D\uF9DC\u57A0\u6069\u6147\u6BB7\u8ABE\u9280\u96B1\u4E59\u541F\u6DEB\u852D\u9670\u97F3\u98EE\u63D6\u6CE3\u9091\u51DD\u61C9\u81BA\u9DF9\u4F9D\u501A\u5100\u5B9C\u610F\u61FF\u64EC\u6905\u6BC5\u7591\u77E3\u7FA9\u8264\u858F\u87FB\u8863\u8ABC"],["eca1","\u8B70\u91AB\u4E8C\u4EE5\u4F0A\uF9DD\uF9DE\u5937\u59E8\uF9DF\u5DF2\u5F1B\u5F5B\u6021\uF9E0\uF9E1\uF9E2\uF9E3\u723E\u73E5\uF9E4\u7570\u75CD\uF9E5\u79FB\uF9E6\u800C\u8033\u8084\u82E1\u8351\uF9E7\uF9E8\u8CBD\u8CB3\u9087\uF9E9\uF9EA\u98F4\u990C\uF9EB\uF9EC\u7037\u76CA\u7FCA\u7FCC\u7FFC\u8B1A\u4EBA\u4EC1\u5203\u5370\uF9ED\u54BD\u56E0\u59FB\u5BC5\u5F15\u5FCD\u6E6E\uF9EE\uF9EF\u7D6A\u8335\uF9F0\u8693\u8A8D\uF9F1\u976D\u9777\uF9F2\uF9F3\u4E00\u4F5A\u4F7E\u58F9\u65E5\u6EA2\u9038\u93B0\u99B9\u4EFB\u58EC\u598A\u59D9\u6041\uF9F4\uF9F5\u7A14\uF9F6\u834F\u8CC3\u5165\u5344"],["eda1","\uF9F7\uF9F8\uF9F9\u4ECD\u5269\u5B55\u82BF\u4ED4\u523A\u54A8\u59C9\u59FF\u5B50\u5B57\u5B5C\u6063\u6148\u6ECB\u7099\u716E\u7386\u74F7\u75B5\u78C1\u7D2B\u8005\u81EA\u8328\u8517\u85C9\u8AEE\u8CC7\u96CC\u4F5C\u52FA\u56BC\u65AB\u6628\u707C\u70B8\u7235\u7DBD\u828D\u914C\u96C0\u9D72\u5B71\u68E7\u6B98\u6F7A\u76DE\u5C91\u66AB\u6F5B\u7BB4\u7C2A\u8836\u96DC\u4E08\u4ED7\u5320\u5834\u58BB\u58EF\u596C\u5C07\u5E33\u5E84\u5F35\u638C\u66B2\u6756\u6A1F\u6AA3\u6B0C\u6F3F\u7246\uF9FA\u7350\u748B\u7AE0\u7CA7\u8178\u81DF\u81E7\u838A\u846C\u8523\u8594\u85CF\u88DD\u8D13\u91AC\u9577"],["eea1","\u969C\u518D\u54C9\u5728\u5BB0\u624D\u6750\u683D\u6893\u6E3D\u6ED3\u707D\u7E21\u88C1\u8CA1\u8F09\u9F4B\u9F4E\u722D\u7B8F\u8ACD\u931A\u4F47\u4F4E\u5132\u5480\u59D0\u5E95\u62B5\u6775\u696E\u6A17\u6CAE\u6E1A\u72D9\u732A\u75BD\u7BB8\u7D35\u82E7\u83F9\u8457\u85F7\u8A5B\u8CAF\u8E87\u9019\u90B8\u96CE\u9F5F\u52E3\u540A\u5AE1\u5BC2\u6458\u6575\u6EF4\u72C4\uF9FB\u7684\u7A4D\u7B1B\u7C4D\u7E3E\u7FDF\u837B\u8B2B\u8CCA\u8D64\u8DE1\u8E5F\u8FEA\u8FF9\u9069\u93D1\u4F43\u4F7A\u50B3\u5168\u5178\u524D\u526A\u5861\u587C\u5960\u5C08\u5C55\u5EDB\u609B\u6230\u6813\u6BBF\u6C08\u6FB1"],["efa1","\u714E\u7420\u7530\u7538\u7551\u7672\u7B4C\u7B8B\u7BAD\u7BC6\u7E8F\u8A6E\u8F3E\u8F49\u923F\u9293\u9322\u942B\u96FB\u985A\u986B\u991E\u5207\u622A\u6298\u6D59\u7664\u7ACA\u7BC0\u7D76\u5360\u5CBE\u5E97\u6F38\u70B9\u7C98\u9711\u9B8E\u9EDE\u63A5\u647A\u8776\u4E01\u4E95\u4EAD\u505C\u5075\u5448\u59C3\u5B9A\u5E40\u5EAD\u5EF7\u5F81\u60C5\u633A\u653F\u6574\u65CC\u6676\u6678\u67FE\u6968\u6A89\u6B63\u6C40\u6DC0\u6DE8\u6E1F\u6E5E\u701E\u70A1\u738E\u73FD\u753A\u775B\u7887\u798E\u7A0B\u7A7D\u7CBE\u7D8E\u8247\u8A02\u8AEA\u8C9E\u912D\u914A\u91D8\u9266\u92CC\u9320\u9706\u9756"],["f0a1","\u975C\u9802\u9F0E\u5236\u5291\u557C\u5824\u5E1D\u5F1F\u608C\u63D0\u68AF\u6FDF\u796D\u7B2C\u81CD\u85BA\u88FD\u8AF8\u8E44\u918D\u9664\u969B\u973D\u984C\u9F4A\u4FCE\u5146\u51CB\u52A9\u5632\u5F14\u5F6B\u63AA\u64CD\u65E9\u6641\u66FA\u66F9\u671D\u689D\u68D7\u69FD\u6F15\u6F6E\u7167\u71E5\u722A\u74AA\u773A\u7956\u795A\u79DF\u7A20\u7A95\u7C97\u7CDF\u7D44\u7E70\u8087\u85FB\u86A4\u8A54\u8ABF\u8D99\u8E81\u9020\u906D\u91E3\u963B\u96D5\u9CE5\u65CF\u7C07\u8DB3\u93C3\u5B58\u5C0A\u5352\u62D9\u731D\u5027\u5B97\u5F9E\u60B0\u616B\u68D5\u6DD9\u742E\u7A2E\u7D42\u7D9C\u7E31\u816B"],["f1a1","\u8E2A\u8E35\u937E\u9418\u4F50\u5750\u5DE6\u5EA7\u632B\u7F6A\u4E3B\u4F4F\u4F8F\u505A\u59DD\u80C4\u546A\u5468\u55FE\u594F\u5B99\u5DDE\u5EDA\u665D\u6731\u67F1\u682A\u6CE8\u6D32\u6E4A\u6F8D\u70B7\u73E0\u7587\u7C4C\u7D02\u7D2C\u7DA2\u821F\u86DB\u8A3B\u8A85\u8D70\u8E8A\u8F33\u9031\u914E\u9152\u9444\u99D0\u7AF9\u7CA5\u4FCA\u5101\u51C6\u57C8\u5BEF\u5CFB\u6659\u6A3D\u6D5A\u6E96\u6FEC\u710C\u756F\u7AE3\u8822\u9021\u9075\u96CB\u99FF\u8301\u4E2D\u4EF2\u8846\u91CD\u537D\u6ADB\u696B\u6C41\u847A\u589E\u618E\u66FE\u62EF\u70DD\u7511\u75C7\u7E52\u84B8\u8B49\u8D08\u4E4B\u53EA"],["f2a1","\u54AB\u5730\u5740\u5FD7\u6301\u6307\u646F\u652F\u65E8\u667A\u679D\u67B3\u6B62\u6C60\u6C9A\u6F2C\u77E5\u7825\u7949\u7957\u7D19\u80A2\u8102\u81F3\u829D\u82B7\u8718\u8A8C\uF9FC\u8D04\u8DBE\u9072\u76F4\u7A19\u7A37\u7E54\u8077\u5507\u55D4\u5875\u632F\u6422\u6649\u664B\u686D\u699B\u6B84\u6D25\u6EB1\u73CD\u7468\u74A1\u755B\u75B9\u76E1\u771E\u778B\u79E6\u7E09\u7E1D\u81FB\u852F\u8897\u8A3A\u8CD1\u8EEB\u8FB0\u9032\u93AD\u9663\u9673\u9707\u4F84\u53F1\u59EA\u5AC9\u5E19\u684E\u74C6\u75BE\u79E9\u7A92\u81A3\u86ED\u8CEA\u8DCC\u8FED\u659F\u6715\uF9FD\u57F7\u6F57\u7DDD\u8F2F"],["f3a1","\u93F6\u96C6\u5FB5\u61F2\u6F84\u4E14\u4F98\u501F\u53C9\u55DF\u5D6F\u5DEE\u6B21\u6B64\u78CB\u7B9A\uF9FE\u8E49\u8ECA\u906E\u6349\u643E\u7740\u7A84\u932F\u947F\u9F6A\u64B0\u6FAF\u71E6\u74A8\u74DA\u7AC4\u7C12\u7E82\u7CB2\u7E98\u8B9A\u8D0A\u947D\u9910\u994C\u5239\u5BDF\u64E6\u672D\u7D2E\u50ED\u53C3\u5879\u6158\u6159\u61FA\u65AC\u7AD9\u8B92\u8B96\u5009\u5021\u5275\u5531\u5A3C\u5EE0\u5F70\u6134\u655E\u660C\u6636\u66A2\u69CD\u6EC4\u6F32\u7316\u7621\u7A93\u8139\u8259\u83D6\u84BC\u50B5\u57F0\u5BC0\u5BE8\u5F69\u63A1\u7826\u7DB5\u83DC\u8521\u91C7\u91F5\u518A\u67F5\u7B56"],["f4a1","\u8CAC\u51C4\u59BB\u60BD\u8655\u501C\uF9FF\u5254\u5C3A\u617D\u621A\u62D3\u64F2\u65A5\u6ECC\u7620\u810A\u8E60\u965F\u96BB\u4EDF\u5343\u5598\u5929\u5DDD\u64C5\u6CC9\u6DFA\u7394\u7A7F\u821B\u85A6\u8CE4\u8E10\u9077\u91E7\u95E1\u9621\u97C6\u51F8\u54F2\u5586\u5FB9\u64A4\u6F88\u7DB4\u8F1F\u8F4D\u9435\u50C9\u5C16\u6CBE\u6DFB\u751B\u77BB\u7C3D\u7C64\u8A79\u8AC2\u581E\u59BE\u5E16\u6377\u7252\u758A\u776B\u8ADC\u8CBC\u8F12\u5EF3\u6674\u6DF8\u807D\u83C1\u8ACB\u9751\u9BD6\uFA00\u5243\u66FF\u6D95\u6EEF\u7DE0\u8AE6\u902E\u905E\u9AD4\u521D\u527F\u54E8\u6194\u6284\u62DB\u68A2"],["f5a1","\u6912\u695A\u6A35\u7092\u7126\u785D\u7901\u790E\u79D2\u7A0D\u8096\u8278\u82D5\u8349\u8549\u8C82\u8D85\u9162\u918B\u91AE\u4FC3\u56D1\u71ED\u77D7\u8700\u89F8\u5BF8\u5FD6\u6751\u90A8\u53E2\u585A\u5BF5\u60A4\u6181\u6460\u7E3D\u8070\u8525\u9283\u64AE\u50AC\u5D14\u6700\u589C\u62BD\u63A8\u690E\u6978\u6A1E\u6E6B\u76BA\u79CB\u82BB\u8429\u8ACF\u8DA8\u8FFD\u9112\u914B\u919C\u9310\u9318\u939A\u96DB\u9A36\u9C0D\u4E11\u755C\u795D\u7AFA\u7B51\u7BC9\u7E2E\u84C4\u8E59\u8E74\u8EF8\u9010\u6625\u693F\u7443\u51FA\u672E\u9EDC\u5145\u5FE0\u6C96\u87F2\u885D\u8877\u60B4\u81B5\u8403"],["f6a1","\u8D05\u53D6\u5439\u5634\u5A36\u5C31\u708A\u7FE0\u805A\u8106\u81ED\u8DA3\u9189\u9A5F\u9DF2\u5074\u4EC4\u53A0\u60FB\u6E2C\u5C64\u4F88\u5024\u55E4\u5CD9\u5E5F\u6065\u6894\u6CBB\u6DC4\u71BE\u75D4\u75F4\u7661\u7A1A\u7A49\u7DC7\u7DFB\u7F6E\u81F4\u86A9\u8F1C\u96C9\u99B3\u9F52\u5247\u52C5\u98ED\u89AA\u4E03\u67D2\u6F06\u4FB5\u5BE2\u6795\u6C88\u6D78\u741B\u7827\u91DD\u937C\u87C4\u79E4\u7A31\u5FEB\u4ED6\u54A4\u553E\u58AE\u59A5\u60F0\u6253\u62D6\u6736\u6955\u8235\u9640\u99B1\u99DD\u502C\u5353\u5544\u577C\uFA01\u6258\uFA02\u64E2\u666B\u67DD\u6FC1\u6FEF\u7422\u7438\u8A17"],["f7a1","\u9438\u5451\u5606\u5766\u5F48\u619A\u6B4E\u7058\u70AD\u7DBB\u8A95\u596A\u812B\u63A2\u7708\u803D\u8CAA\u5854\u642D\u69BB\u5B95\u5E11\u6E6F\uFA03\u8569\u514C\u53F0\u592A\u6020\u614B\u6B86\u6C70\u6CF0\u7B1E\u80CE\u82D4\u8DC6\u90B0\u98B1\uFA04\u64C7\u6FA4\u6491\u6504\u514E\u5410\u571F\u8A0E\u615F\u6876\uFA05\u75DB\u7B52\u7D71\u901A\u5806\u69CC\u817F\u892A\u9000\u9839\u5078\u5957\u59AC\u6295\u900F\u9B2A\u615D\u7279\u95D6\u5761\u5A46\u5DF4\u628A\u64AD\u64FA\u6777\u6CE2\u6D3E\u722C\u7436\u7834\u7F77\u82AD\u8DDB\u9817\u5224\u5742\u677F\u7248\u74E3\u8CA9\u8FA6\u9211"],["f8a1","\u962A\u516B\u53ED\u634C\u4F69\u5504\u6096\u6557\u6C9B\u6D7F\u724C\u72FD\u7A17\u8987\u8C9D\u5F6D\u6F8E\u70F9\u81A8\u610E\u4FBF\u504F\u6241\u7247\u7BC7\u7DE8\u7FE9\u904D\u97AD\u9A19\u8CB6\u576A\u5E73\u67B0\u840D\u8A55\u5420\u5B16\u5E63\u5EE2\u5F0A\u6583\u80BA\u853D\u9589\u965B\u4F48\u5305\u530D\u530F\u5486\u54FA\u5703\u5E03\u6016\u629B\u62B1\u6355\uFA06\u6CE1\u6D66\u75B1\u7832\u80DE\u812F\u82DE\u8461\u84B2\u888D\u8912\u900B\u92EA\u98FD\u9B91\u5E45\u66B4\u66DD\u7011\u7206\uFA07\u4FF5\u527D\u5F6A\u6153\u6753\u6A19\u6F02\u74E2\u7968\u8868\u8C79\u98C7\u98C4\u9A43"],["f9a1","\u54C1\u7A1F\u6953\u8AF7\u8C4A\u98A8\u99AE\u5F7C\u62AB\u75B2\u76AE\u88AB\u907F\u9642\u5339\u5F3C\u5FC5\u6CCC\u73CC\u7562\u758B\u7B46\u82FE\u999D\u4E4F\u903C\u4E0B\u4F55\u53A6\u590F\u5EC8\u6630\u6CB3\u7455\u8377\u8766\u8CC0\u9050\u971E\u9C15\u58D1\u5B78\u8650\u8B14\u9DB4\u5BD2\u6068\u608D\u65F1\u6C57\u6F22\u6FA3\u701A\u7F55\u7FF0\u9591\u9592\u9650\u97D3\u5272\u8F44\u51FD\u542B\u54B8\u5563\u558A\u6ABB\u6DB5\u7DD8\u8266\u929C\u9677\u9E79\u5408\u54C8\u76D2\u86E4\u95A4\u95D4\u965C\u4EA2\u4F09\u59EE\u5AE6\u5DF7\u6052\u6297\u676D\u6841\u6C86\u6E2F\u7F38\u809B\u822A"],["faa1","\uFA08\uFA09\u9805\u4EA5\u5055\u54B3\u5793\u595A\u5B69\u5BB3\u61C8\u6977\u6D77\u7023\u87F9\u89E3\u8A72\u8AE7\u9082\u99ED\u9AB8\u52BE\u6838\u5016\u5E78\u674F\u8347\u884C\u4EAB\u5411\u56AE\u73E6\u9115\u97FF\u9909\u9957\u9999\u5653\u589F\u865B\u8A31\u61B2\u6AF6\u737B\u8ED2\u6B47\u96AA\u9A57\u5955\u7200\u8D6B\u9769\u4FD4\u5CF4\u5F26\u61F8\u665B\u6CEB\u70AB\u7384\u73B9\u73FE\u7729\u774D\u7D43\u7D62\u7E23\u8237\u8852\uFA0A\u8CE2\u9249\u986F\u5B51\u7A74\u8840\u9801\u5ACC\u4FE0\u5354\u593E\u5CFD\u633E\u6D79\u72F9\u8105\u8107\u83A2\u92CF\u9830\u4EA8\u5144\u5211\u578B"],["fba1","\u5F62\u6CC2\u6ECE\u7005\u7050\u70AF\u7192\u73E9\u7469\u834A\u87A2\u8861\u9008\u90A2\u93A3\u99A8\u516E\u5F57\u60E0\u6167\u66B3\u8559\u8E4A\u91AF\u978B\u4E4E\u4E92\u547C\u58D5\u58FA\u597D\u5CB5\u5F27\u6236\u6248\u660A\u6667\u6BEB\u6D69\u6DCF\u6E56\u6EF8\u6F94\u6FE0\u6FE9\u705D\u72D0\u7425\u745A\u74E0\u7693\u795C\u7CCA\u7E1E\u80E1\u82A6\u846B\u84BF\u864E\u865F\u8774\u8B77\u8C6A\u93AC\u9800\u9865\u60D1\u6216\u9177\u5A5A\u660F\u6DF7\u6E3E\u743F\u9B42\u5FFD\u60DA\u7B0F\u54C4\u5F18\u6C5E\u6CD3\u6D2A\u70D8\u7D05\u8679\u8A0C\u9D3B\u5316\u548C\u5B05\u6A3A\u706B\u7575"],["fca1","\u798D\u79BE\u82B1\u83EF\u8A71\u8B41\u8CA8\u9774\uFA0B\u64F4\u652B\u78BA\u78BB\u7A6B\u4E38\u559A\u5950\u5BA6\u5E7B\u60A3\u63DB\u6B61\u6665\u6853\u6E19\u7165\u74B0\u7D08\u9084\u9A69\u9C25\u6D3B\u6ED1\u733E\u8C41\u95CA\u51F0\u5E4C\u5FA8\u604D\u60F6\u6130\u614C\u6643\u6644\u69A5\u6CC1\u6E5F\u6EC9\u6F62\u714C\u749C\u7687\u7BC1\u7C27\u8352\u8757\u9051\u968D\u9EC3\u532F\u56DE\u5EFB\u5F8A\u6062\u6094\u61F7\u6666\u6703\u6A9C\u6DEE\u6FAE\u7070\u736A\u7E6A\u81BE\u8334\u86D4\u8AA8\u8CC4\u5283\u7372\u5B96\u6A6B\u9404\u54EE\u5686\u5B5D\u6548\u6585\u66C9\u689F\u6D8D\u6DC6"],["fda1","\u723B\u80B4\u9175\u9A4D\u4FAF\u5019\u539A\u540E\u543C\u5589\u55C5\u5E3F\u5F8C\u673D\u7166\u73DD\u9005\u52DB\u52F3\u5864\u58CE\u7104\u718F\u71FB\u85B0\u8A13\u6688\u85A8\u55A7\u6684\u714A\u8431\u5349\u5599\u6BC1\u5F59\u5FBD\u63EE\u6689\u7147\u8AF1\u8F1D\u9EBE\u4F11\u643A\u70CB\u7566\u8667\u6064\u8B4E\u9DF8\u5147\u51F6\u5308\u6D36\u80F8\u9ED1\u6615\u6B23\u7098\u75D5\u5403\u5C79\u7D07\u8A16\u6B20\u6B3D\u6B46\u5438\u6070\u6D3D\u7FD5\u8208\u50D6\u51DE\u559C\u566B\u56CD\u59EC\u5B09\u5E0C\u6199\u6198\u6231\u665E\u66E6\u7199\u71B9\u71BA\u72A7\u79A7\u7A00\u7FB2\u8A70"]]});var iU0=o((gz5,KS6)=>{KS6.exports=[["0","\x00",127],["a140","\u3000\uFF0C\u3001\u3002\uFF0E\u2027\uFF1B\uFF1A\uFF1F\uFF01\uFE30\u2026\u2025\uFE50\uFE51\uFE52\xB7\uFE54\uFE55\uFE56\uFE57\uFF5C\u2013\uFE31\u2014\uFE33\u2574\uFE34\uFE4F\uFF08\uFF09\uFE35\uFE36\uFF5B\uFF5D\uFE37\uFE38\u3014\u3015\uFE39\uFE3A\u3010\u3011\uFE3B\uFE3C\u300A\u300B\uFE3D\uFE3E\u3008\u3009\uFE3F\uFE40\u300C\u300D\uFE41\uFE42\u300E\u300F\uFE43\uFE44\uFE59\uFE5A"],["a1a1","\uFE5B\uFE5C\uFE5D\uFE5E\u2018\u2019\u201C\u201D\u301D\u301E\u2035\u2032\uFF03\uFF06\uFF0A\u203B\xA7\u3003\u25CB\u25CF\u25B3\u25B2\u25CE\u2606\u2605\u25C7\u25C6\u25A1\u25A0\u25BD\u25BC\u32A3\u2105\xAF\uFFE3\uFF3F\u02CD\uFE49\uFE4A\uFE4D\uFE4E\uFE4B\uFE4C\uFE5F\uFE60\uFE61\uFF0B\uFF0D\xD7\xF7\xB1\u221A\uFF1C\uFF1E\uFF1D\u2266\u2267\u2260\u221E\u2252\u2261\uFE62",4,"\uFF5E\u2229\u222A\u22A5\u2220\u221F\u22BF\u33D2\u33D1\u222B\u222E\u2235\u2234\u2640\u2642\u2295\u2299\u2191\u2193\u2190\u2192\u2196\u2197\u2199\u2198\u2225\u2223\uFF0F"],["a240","\uFF3C\u2215\uFE68\uFF04\uFFE5\u3012\uFFE0\uFFE1\uFF05\uFF20\u2103\u2109\uFE69\uFE6A\uFE6B\u33D5\u339C\u339D\u339E\u33CE\u33A1\u338E\u338F\u33C4\xB0\u5159\u515B\u515E\u515D\u5161\u5163\u55E7\u74E9\u7CCE\u2581",7,"\u258F\u258E\u258D\u258C\u258B\u258A\u2589\u253C\u2534\u252C\u2524\u251C\u2594\u2500\u2502\u2595\u250C\u2510\u2514\u2518\u256D"],["a2a1","\u256E\u2570\u256F\u2550\u255E\u256A\u2561\u25E2\u25E3\u25E5\u25E4\u2571\u2572\u2573\uFF10",9,"\u2160",9,"\u3021",8,"\u5341\u5344\u5345\uFF21",25,"\uFF41",21],["a340","\uFF57\uFF58\uFF59\uFF5A\u0391",16,"\u03A3",6,"\u03B1",16,"\u03C3",6,"\u3105",10],["a3a1","\u3110",25,"\u02D9\u02C9\u02CA\u02C7\u02CB"],["a3e1","\u20AC"],["a440","\u4E00\u4E59\u4E01\u4E03\u4E43\u4E5D\u4E86\u4E8C\u4EBA\u513F\u5165\u516B\u51E0\u5200\u5201\u529B\u5315\u5341\u535C\u53C8\u4E09\u4E0B\u4E08\u4E0A\u4E2B\u4E38\u51E1\u4E45\u4E48\u4E5F\u4E5E\u4E8E\u4EA1\u5140\u5203\u52FA\u5343\u53C9\u53E3\u571F\u58EB\u5915\u5927\u5973\u5B50\u5B51\u5B53\u5BF8\u5C0F\u5C22\u5C38\u5C71\u5DDD\u5DE5\u5DF1\u5DF2\u5DF3\u5DFE\u5E72\u5EFE\u5F0B\u5F13\u624D"],["a4a1","\u4E11\u4E10\u4E0D\u4E2D\u4E30\u4E39\u4E4B\u5C39\u4E88\u4E91\u4E95\u4E92\u4E94\u4EA2\u4EC1\u4EC0\u4EC3\u4EC6\u4EC7\u4ECD\u4ECA\u4ECB\u4EC4\u5143\u5141\u5167\u516D\u516E\u516C\u5197\u51F6\u5206\u5207\u5208\u52FB\u52FE\u52FF\u5316\u5339\u5348\u5347\u5345\u535E\u5384\u53CB\u53CA\u53CD\u58EC\u5929\u592B\u592A\u592D\u5B54\u5C11\u5C24\u5C3A\u5C6F\u5DF4\u5E7B\u5EFF\u5F14\u5F15\u5FC3\u6208\u6236\u624B\u624E\u652F\u6587\u6597\u65A4\u65B9\u65E5\u66F0\u6708\u6728\u6B20\u6B62\u6B79\u6BCB\u6BD4\u6BDB\u6C0F\u6C34\u706B\u722A\u7236\u723B\u7247\u7259\u725B\u72AC\u738B\u4E19"],["a540","\u4E16\u4E15\u4E14\u4E18\u4E3B\u4E4D\u4E4F\u4E4E\u4EE5\u4ED8\u4ED4\u4ED5\u4ED6\u4ED7\u4EE3\u4EE4\u4ED9\u4EDE\u5145\u5144\u5189\u518A\u51AC\u51F9\u51FA\u51F8\u520A\u52A0\u529F\u5305\u5306\u5317\u531D\u4EDF\u534A\u5349\u5361\u5360\u536F\u536E\u53BB\u53EF\u53E4\u53F3\u53EC\u53EE\u53E9\u53E8\u53FC\u53F8\u53F5\u53EB\u53E6\u53EA\u53F2\u53F1\u53F0\u53E5\u53ED\u53FB\u56DB\u56DA\u5916"],["a5a1","\u592E\u5931\u5974\u5976\u5B55\u5B83\u5C3C\u5DE8\u5DE7\u5DE6\u5E02\u5E03\u5E73\u5E7C\u5F01\u5F18\u5F17\u5FC5\u620A\u6253\u6254\u6252\u6251\u65A5\u65E6\u672E\u672C\u672A\u672B\u672D\u6B63\u6BCD\u6C11\u6C10\u6C38\u6C41\u6C40\u6C3E\u72AF\u7384\u7389\u74DC\u74E6\u7518\u751F\u7528\u7529\u7530\u7531\u7532\u7533\u758B\u767D\u76AE\u76BF\u76EE\u77DB\u77E2\u77F3\u793A\u79BE\u7A74\u7ACB\u4E1E\u4E1F\u4E52\u4E53\u4E69\u4E99\u4EA4\u4EA6\u4EA5\u4EFF\u4F09\u4F19\u4F0A\u4F15\u4F0D\u4F10\u4F11\u4F0F\u4EF2\u4EF6\u4EFB\u4EF0\u4EF3\u4EFD\u4F01\u4F0B\u5149\u5147\u5146\u5148\u5168"],["a640","\u5171\u518D\u51B0\u5217\u5211\u5212\u520E\u5216\u52A3\u5308\u5321\u5320\u5370\u5371\u5409\u540F\u540C\u540A\u5410\u5401\u540B\u5404\u5411\u540D\u5408\u5403\u540E\u5406\u5412\u56E0\u56DE\u56DD\u5733\u5730\u5728\u572D\u572C\u572F\u5729\u5919\u591A\u5937\u5938\u5984\u5978\u5983\u597D\u5979\u5982\u5981\u5B57\u5B58\u5B87\u5B88\u5B85\u5B89\u5BFA\u5C16\u5C79\u5DDE\u5E06\u5E76\u5E74"],["a6a1","\u5F0F\u5F1B\u5FD9\u5FD6\u620E\u620C\u620D\u6210\u6263\u625B\u6258\u6536\u65E9\u65E8\u65EC\u65ED\u66F2\u66F3\u6709\u673D\u6734\u6731\u6735\u6B21\u6B64\u6B7B\u6C16\u6C5D\u6C57\u6C59\u6C5F\u6C60\u6C50\u6C55\u6C61\u6C5B\u6C4D\u6C4E\u7070\u725F\u725D\u767E\u7AF9\u7C73\u7CF8\u7F36\u7F8A\u7FBD\u8001\u8003\u800C\u8012\u8033\u807F\u8089\u808B\u808C\u81E3\u81EA\u81F3\u81FC\u820C\u821B\u821F\u826E\u8272\u827E\u866B\u8840\u884C\u8863\u897F\u9621\u4E32\u4EA8\u4F4D\u4F4F\u4F47\u4F57\u4F5E\u4F34\u4F5B\u4F55\u4F30\u4F50\u4F51\u4F3D\u4F3A\u4F38\u4F43\u4F54\u4F3C\u4F46\u4F63"],["a740","\u4F5C\u4F60\u4F2F\u4F4E\u4F36\u4F59\u4F5D\u4F48\u4F5A\u514C\u514B\u514D\u5175\u51B6\u51B7\u5225\u5224\u5229\u522A\u5228\u52AB\u52A9\u52AA\u52AC\u5323\u5373\u5375\u541D\u542D\u541E\u543E\u5426\u544E\u5427\u5446\u5443\u5433\u5448\u5442\u541B\u5429\u544A\u5439\u543B\u5438\u542E\u5435\u5436\u5420\u543C\u5440\u5431\u542B\u541F\u542C\u56EA\u56F0\u56E4\u56EB\u574A\u5751\u5740\u574D"],["a7a1","\u5747\u574E\u573E\u5750\u574F\u573B\u58EF\u593E\u599D\u5992\u59A8\u599E\u59A3\u5999\u5996\u598D\u59A4\u5993\u598A\u59A5\u5B5D\u5B5C\u5B5A\u5B5B\u5B8C\u5B8B\u5B8F\u5C2C\u5C40\u5C41\u5C3F\u5C3E\u5C90\u5C91\u5C94\u5C8C\u5DEB\u5E0C\u5E8F\u5E87\u5E8A\u5EF7\u5F04\u5F1F\u5F64\u5F62\u5F77\u5F79\u5FD8\u5FCC\u5FD7\u5FCD\u5FF1\u5FEB\u5FF8\u5FEA\u6212\u6211\u6284\u6297\u6296\u6280\u6276\u6289\u626D\u628A\u627C\u627E\u6279\u6273\u6292\u626F\u6298\u626E\u6295\u6293\u6291\u6286\u6539\u653B\u6538\u65F1\u66F4\u675F\u674E\u674F\u6750\u6751\u675C\u6756\u675E\u6749\u6746\u6760"],["a840","\u6753\u6757\u6B65\u6BCF\u6C42\u6C5E\u6C99\u6C81\u6C88\u6C89\u6C85\u6C9B\u6C6A\u6C7A\u6C90\u6C70\u6C8C\u6C68\u6C96\u6C92\u6C7D\u6C83\u6C72\u6C7E\u6C74\u6C86\u6C76\u6C8D\u6C94\u6C98\u6C82\u7076\u707C\u707D\u7078\u7262\u7261\u7260\u72C4\u72C2\u7396\u752C\u752B\u7537\u7538\u7682\u76EF\u77E3\u79C1\u79C0\u79BF\u7A76\u7CFB\u7F55\u8096\u8093\u809D\u8098\u809B\u809A\u80B2\u826F\u8292"],["a8a1","\u828B\u828D\u898B\u89D2\u8A00\u8C37\u8C46\u8C55\u8C9D\u8D64\u8D70\u8DB3\u8EAB\u8ECA\u8F9B\u8FB0\u8FC2\u8FC6\u8FC5\u8FC4\u5DE1\u9091\u90A2\u90AA\u90A6\u90A3\u9149\u91C6\u91CC\u9632\u962E\u9631\u962A\u962C\u4E26\u4E56\u4E73\u4E8B\u4E9B\u4E9E\u4EAB\u4EAC\u4F6F\u4F9D\u4F8D\u4F73\u4F7F\u4F6C\u4F9B\u4F8B\u4F86\u4F83\u4F70\u4F75\u4F88\u4F69\u4F7B\u4F96\u4F7E\u4F8F\u4F91\u4F7A\u5154\u5152\u5155\u5169\u5177\u5176\u5178\u51BD\u51FD\u523B\u5238\u5237\u523A\u5230\u522E\u5236\u5241\u52BE\u52BB\u5352\u5354\u5353\u5351\u5366\u5377\u5378\u5379\u53D6\u53D4\u53D7\u5473\u5475"],["a940","\u5496\u5478\u5495\u5480\u547B\u5477\u5484\u5492\u5486\u547C\u5490\u5471\u5476\u548C\u549A\u5462\u5468\u548B\u547D\u548E\u56FA\u5783\u5777\u576A\u5769\u5761\u5766\u5764\u577C\u591C\u5949\u5947\u5948\u5944\u5954\u59BE\u59BB\u59D4\u59B9\u59AE\u59D1\u59C6\u59D0\u59CD\u59CB\u59D3\u59CA\u59AF\u59B3\u59D2\u59C5\u5B5F\u5B64\u5B63\u5B97\u5B9A\u5B98\u5B9C\u5B99\u5B9B\u5C1A\u5C48\u5C45"],["a9a1","\u5C46\u5CB7\u5CA1\u5CB8\u5CA9\u5CAB\u5CB1\u5CB3\u5E18\u5E1A\u5E16\u5E15\u5E1B\u5E11\u5E78\u5E9A\u5E97\u5E9C\u5E95\u5E96\u5EF6\u5F26\u5F27\u5F29\u5F80\u5F81\u5F7F\u5F7C\u5FDD\u5FE0\u5FFD\u5FF5\u5FFF\u600F\u6014\u602F\u6035\u6016\u602A\u6015\u6021\u6027\u6029\u602B\u601B\u6216\u6215\u623F\u623E\u6240\u627F\u62C9\u62CC\u62C4\u62BF\u62C2\u62B9\u62D2\u62DB\u62AB\u62D3\u62D4\u62CB\u62C8\u62A8\u62BD\u62BC\u62D0\u62D9\u62C7\u62CD\u62B5\u62DA\u62B1\u62D8\u62D6\u62D7\u62C6\u62AC\u62CE\u653E\u65A7\u65BC\u65FA\u6614\u6613\u660C\u6606\u6602\u660E\u6600\u660F\u6615\u660A"],["aa40","\u6607\u670D\u670B\u676D\u678B\u6795\u6771\u679C\u6773\u6777\u6787\u679D\u6797\u676F\u6770\u677F\u6789\u677E\u6790\u6775\u679A\u6793\u677C\u676A\u6772\u6B23\u6B66\u6B67\u6B7F\u6C13\u6C1B\u6CE3\u6CE8\u6CF3\u6CB1\u6CCC\u6CE5\u6CB3\u6CBD\u6CBE\u6CBC\u6CE2\u6CAB\u6CD5\u6CD3\u6CB8\u6CC4\u6CB9\u6CC1\u6CAE\u6CD7\u6CC5\u6CF1\u6CBF\u6CBB\u6CE1\u6CDB\u6CCA\u6CAC\u6CEF\u6CDC\u6CD6\u6CE0"],["aaa1","\u7095\u708E\u7092\u708A\u7099\u722C\u722D\u7238\u7248\u7267\u7269\u72C0\u72CE\u72D9\u72D7\u72D0\u73A9\u73A8\u739F\u73AB\u73A5\u753D\u759D\u7599\u759A\u7684\u76C2\u76F2\u76F4\u77E5\u77FD\u793E\u7940\u7941\u79C9\u79C8\u7A7A\u7A79\u7AFA\u7CFE\u7F54\u7F8C\u7F8B\u8005\u80BA\u80A5\u80A2\u80B1\u80A1\u80AB\u80A9\u80B4\u80AA\u80AF\u81E5\u81FE\u820D\u82B3\u829D\u8299\u82AD\u82BD\u829F\u82B9\u82B1\u82AC\u82A5\u82AF\u82B8\u82A3\u82B0\u82BE\u82B7\u864E\u8671\u521D\u8868\u8ECB\u8FCE\u8FD4\u8FD1\u90B5\u90B8\u90B1\u90B6\u91C7\u91D1\u9577\u9580\u961C\u9640\u963F\u963B\u9644"],["ab40","\u9642\u96B9\u96E8\u9752\u975E\u4E9F\u4EAD\u4EAE\u4FE1\u4FB5\u4FAF\u4FBF\u4FE0\u4FD1\u4FCF\u4FDD\u4FC3\u4FB6\u4FD8\u4FDF\u4FCA\u4FD7\u4FAE\u4FD0\u4FC4\u4FC2\u4FDA\u4FCE\u4FDE\u4FB7\u5157\u5192\u5191\u51A0\u524E\u5243\u524A\u524D\u524C\u524B\u5247\u52C7\u52C9\u52C3\u52C1\u530D\u5357\u537B\u539A\u53DB\u54AC\u54C0\u54A8\u54CE\u54C9\u54B8\u54A6\u54B3\u54C7\u54C2\u54BD\u54AA\u54C1"],["aba1","\u54C4\u54C8\u54AF\u54AB\u54B1\u54BB\u54A9\u54A7\u54BF\u56FF\u5782\u578B\u57A0\u57A3\u57A2\u57CE\u57AE\u5793\u5955\u5951\u594F\u594E\u5950\u59DC\u59D8\u59FF\u59E3\u59E8\u5A03\u59E5\u59EA\u59DA\u59E6\u5A01\u59FB\u5B69\u5BA3\u5BA6\u5BA4\u5BA2\u5BA5\u5C01\u5C4E\u5C4F\u5C4D\u5C4B\u5CD9\u5CD2\u5DF7\u5E1D\u5E25\u5E1F\u5E7D\u5EA0\u5EA6\u5EFA\u5F08\u5F2D\u5F65\u5F88\u5F85\u5F8A\u5F8B\u5F87\u5F8C\u5F89\u6012\u601D\u6020\u6025\u600E\u6028\u604D\u6070\u6068\u6062\u6046\u6043\u606C\u606B\u606A\u6064\u6241\u62DC\u6316\u6309\u62FC\u62ED\u6301\u62EE\u62FD\u6307\u62F1\u62F7"],["ac40","\u62EF\u62EC\u62FE\u62F4\u6311\u6302\u653F\u6545\u65AB\u65BD\u65E2\u6625\u662D\u6620\u6627\u662F\u661F\u6628\u6631\u6624\u66F7\u67FF\u67D3\u67F1\u67D4\u67D0\u67EC\u67B6\u67AF\u67F5\u67E9\u67EF\u67C4\u67D1\u67B4\u67DA\u67E5\u67B8\u67CF\u67DE\u67F3\u67B0\u67D9\u67E2\u67DD\u67D2\u6B6A\u6B83\u6B86\u6BB5\u6BD2\u6BD7\u6C1F\u6CC9\u6D0B\u6D32\u6D2A\u6D41\u6D25\u6D0C\u6D31\u6D1E\u6D17"],["aca1","\u6D3B\u6D3D\u6D3E\u6D36\u6D1B\u6CF5\u6D39\u6D27\u6D38\u6D29\u6D2E\u6D35\u6D0E\u6D2B\u70AB\u70BA\u70B3\u70AC\u70AF\u70AD\u70B8\u70AE\u70A4\u7230\u7272\u726F\u7274\u72E9\u72E0\u72E1\u73B7\u73CA\u73BB\u73B2\u73CD\u73C0\u73B3\u751A\u752D\u754F\u754C\u754E\u754B\u75AB\u75A4\u75A5\u75A2\u75A3\u7678\u7686\u7687\u7688\u76C8\u76C6\u76C3\u76C5\u7701\u76F9\u76F8\u7709\u770B\u76FE\u76FC\u7707\u77DC\u7802\u7814\u780C\u780D\u7946\u7949\u7948\u7947\u79B9\u79BA\u79D1\u79D2\u79CB\u7A7F\u7A81\u7AFF\u7AFD\u7C7D\u7D02\u7D05\u7D00\u7D09\u7D07\u7D04\u7D06\u7F38\u7F8E\u7FBF\u8004"],["ad40","\u8010\u800D\u8011\u8036\u80D6\u80E5\u80DA\u80C3\u80C4\u80CC\u80E1\u80DB\u80CE\u80DE\u80E4\u80DD\u81F4\u8222\u82E7\u8303\u8305\u82E3\u82DB\u82E6\u8304\u82E5\u8302\u8309\u82D2\u82D7\u82F1\u8301\u82DC\u82D4\u82D1\u82DE\u82D3\u82DF\u82EF\u8306\u8650\u8679\u867B\u867A\u884D\u886B\u8981\u89D4\u8A08\u8A02\u8A03\u8C9E\u8CA0\u8D74\u8D73\u8DB4\u8ECD\u8ECC\u8FF0\u8FE6\u8FE2\u8FEA\u8FE5"],["ada1","\u8FED\u8FEB\u8FE4\u8FE8\u90CA\u90CE\u90C1\u90C3\u914B\u914A\u91CD\u9582\u9650\u964B\u964C\u964D\u9762\u9769\u97CB\u97ED\u97F3\u9801\u98A8\u98DB\u98DF\u9996\u9999\u4E58\u4EB3\u500C\u500D\u5023\u4FEF\u5026\u5025\u4FF8\u5029\u5016\u5006\u503C\u501F\u501A\u5012\u5011\u4FFA\u5000\u5014\u5028\u4FF1\u5021\u500B\u5019\u5018\u4FF3\u4FEE\u502D\u502A\u4FFE\u502B\u5009\u517C\u51A4\u51A5\u51A2\u51CD\u51CC\u51C6\u51CB\u5256\u525C\u5254\u525B\u525D\u532A\u537F\u539F\u539D\u53DF\u54E8\u5510\u5501\u5537\u54FC\u54E5\u54F2\u5506\u54FA\u5514\u54E9\u54ED\u54E1\u5509\u54EE\u54EA"],["ae40","\u54E6\u5527\u5507\u54FD\u550F\u5703\u5704\u57C2\u57D4\u57CB\u57C3\u5809\u590F\u5957\u5958\u595A\u5A11\u5A18\u5A1C\u5A1F\u5A1B\u5A13\u59EC\u5A20\u5A23\u5A29\u5A25\u5A0C\u5A09\u5B6B\u5C58\u5BB0\u5BB3\u5BB6\u5BB4\u5BAE\u5BB5\u5BB9\u5BB8\u5C04\u5C51\u5C55\u5C50\u5CED\u5CFD\u5CFB\u5CEA\u5CE8\u5CF0\u5CF6\u5D01\u5CF4\u5DEE\u5E2D\u5E2B\u5EAB\u5EAD\u5EA7\u5F31\u5F92\u5F91\u5F90\u6059"],["aea1","\u6063\u6065\u6050\u6055\u606D\u6069\u606F\u6084\u609F\u609A\u608D\u6094\u608C\u6085\u6096\u6247\u62F3\u6308\u62FF\u634E\u633E\u632F\u6355\u6342\u6346\u634F\u6349\u633A\u6350\u633D\u632A\u632B\u6328\u634D\u634C\u6548\u6549\u6599\u65C1\u65C5\u6642\u6649\u664F\u6643\u6652\u664C\u6645\u6641\u66F8\u6714\u6715\u6717\u6821\u6838\u6848\u6846\u6853\u6839\u6842\u6854\u6829\u68B3\u6817\u684C\u6851\u683D\u67F4\u6850\u6840\u683C\u6843\u682A\u6845\u6813\u6818\u6841\u6B8A\u6B89\u6BB7\u6C23\u6C27\u6C28\u6C26\u6C24\u6CF0\u6D6A\u6D95\u6D88\u6D87\u6D66\u6D78\u6D77\u6D59\u6D93"],["af40","\u6D6C\u6D89\u6D6E\u6D5A\u6D74\u6D69\u6D8C\u6D8A\u6D79\u6D85\u6D65\u6D94\u70CA\u70D8\u70E4\u70D9\u70C8\u70CF\u7239\u7279\u72FC\u72F9\u72FD\u72F8\u72F7\u7386\u73ED\u7409\u73EE\u73E0\u73EA\u73DE\u7554\u755D\u755C\u755A\u7559\u75BE\u75C5\u75C7\u75B2\u75B3\u75BD\u75BC\u75B9\u75C2\u75B8\u768B\u76B0\u76CA\u76CD\u76CE\u7729\u771F\u7720\u7728\u77E9\u7830\u7827\u7838\u781D\u7834\u7837"],["afa1","\u7825\u782D\u7820\u781F\u7832\u7955\u7950\u7960\u795F\u7956\u795E\u795D\u7957\u795A\u79E4\u79E3\u79E7\u79DF\u79E6\u79E9\u79D8\u7A84\u7A88\u7AD9\u7B06\u7B11\u7C89\u7D21\u7D17\u7D0B\u7D0A\u7D20\u7D22\u7D14\u7D10\u7D15\u7D1A\u7D1C\u7D0D\u7D19\u7D1B\u7F3A\u7F5F\u7F94\u7FC5\u7FC1\u8006\u8018\u8015\u8019\u8017\u803D\u803F\u80F1\u8102\u80F0\u8105\u80ED\u80F4\u8106\u80F8\u80F3\u8108\u80FD\u810A\u80FC\u80EF\u81ED\u81EC\u8200\u8210\u822A\u822B\u8228\u822C\u82BB\u832B\u8352\u8354\u834A\u8338\u8350\u8349\u8335\u8334\u834F\u8332\u8339\u8336\u8317\u8340\u8331\u8328\u8343"],["b040","\u8654\u868A\u86AA\u8693\u86A4\u86A9\u868C\u86A3\u869C\u8870\u8877\u8881\u8882\u887D\u8879\u8A18\u8A10\u8A0E\u8A0C\u8A15\u8A0A\u8A17\u8A13\u8A16\u8A0F\u8A11\u8C48\u8C7A\u8C79\u8CA1\u8CA2\u8D77\u8EAC\u8ED2\u8ED4\u8ECF\u8FB1\u9001\u9006\u8FF7\u9000\u8FFA\u8FF4\u9003\u8FFD\u9005\u8FF8\u9095\u90E1\u90DD\u90E2\u9152\u914D\u914C\u91D8\u91DD\u91D7\u91DC\u91D9\u9583\u9662\u9663\u9661"],["b0a1","\u965B\u965D\u9664\u9658\u965E\u96BB\u98E2\u99AC\u9AA8\u9AD8\u9B25\u9B32\u9B3C\u4E7E\u507A\u507D\u505C\u5047\u5043\u504C\u505A\u5049\u5065\u5076\u504E\u5055\u5075\u5074\u5077\u504F\u500F\u506F\u506D\u515C\u5195\u51F0\u526A\u526F\u52D2\u52D9\u52D8\u52D5\u5310\u530F\u5319\u533F\u5340\u533E\u53C3\u66FC\u5546\u556A\u5566\u5544\u555E\u5561\u5543\u554A\u5531\u5556\u554F\u5555\u552F\u5564\u5538\u552E\u555C\u552C\u5563\u5533\u5541\u5557\u5708\u570B\u5709\u57DF\u5805\u580A\u5806\u57E0\u57E4\u57FA\u5802\u5835\u57F7\u57F9\u5920\u5962\u5A36\u5A41\u5A49\u5A66\u5A6A\u5A40"],["b140","\u5A3C\u5A62\u5A5A\u5A46\u5A4A\u5B70\u5BC7\u5BC5\u5BC4\u5BC2\u5BBF\u5BC6\u5C09\u5C08\u5C07\u5C60\u5C5C\u5C5D\u5D07\u5D06\u5D0E\u5D1B\u5D16\u5D22\u5D11\u5D29\u5D14\u5D19\u5D24\u5D27\u5D17\u5DE2\u5E38\u5E36\u5E33\u5E37\u5EB7\u5EB8\u5EB6\u5EB5\u5EBE\u5F35\u5F37\u5F57\u5F6C\u5F69\u5F6B\u5F97\u5F99\u5F9E\u5F98\u5FA1\u5FA0\u5F9C\u607F\u60A3\u6089\u60A0\u60A8\u60CB\u60B4\u60E6\u60BD"],["b1a1","\u60C5\u60BB\u60B5\u60DC\u60BC\u60D8\u60D5\u60C6\u60DF\u60B8\u60DA\u60C7\u621A\u621B\u6248\u63A0\u63A7\u6372\u6396\u63A2\u63A5\u6377\u6367\u6398\u63AA\u6371\u63A9\u6389\u6383\u639B\u636B\u63A8\u6384\u6388\u6399\u63A1\u63AC\u6392\u638F\u6380\u637B\u6369\u6368\u637A\u655D\u6556\u6551\u6559\u6557\u555F\u654F\u6558\u6555\u6554\u659C\u659B\u65AC\u65CF\u65CB\u65CC\u65CE\u665D\u665A\u6664\u6668\u6666\u665E\u66F9\u52D7\u671B\u6881\u68AF\u68A2\u6893\u68B5\u687F\u6876\u68B1\u68A7\u6897\u68B0\u6883\u68C4\u68AD\u6886\u6885\u6894\u689D\u68A8\u689F\u68A1\u6882\u6B32\u6BBA"],["b240","\u6BEB\u6BEC\u6C2B\u6D8E\u6DBC\u6DF3\u6DD9\u6DB2\u6DE1\u6DCC\u6DE4\u6DFB\u6DFA\u6E05\u6DC7\u6DCB\u6DAF\u6DD1\u6DAE\u6DDE\u6DF9\u6DB8\u6DF7\u6DF5\u6DC5\u6DD2\u6E1A\u6DB5\u6DDA\u6DEB\u6DD8\u6DEA\u6DF1\u6DEE\u6DE8\u6DC6\u6DC4\u6DAA\u6DEC\u6DBF\u6DE6\u70F9\u7109\u710A\u70FD\u70EF\u723D\u727D\u7281\u731C\u731B\u7316\u7313\u7319\u7387\u7405\u740A\u7403\u7406\u73FE\u740D\u74E0\u74F6"],["b2a1","\u74F7\u751C\u7522\u7565\u7566\u7562\u7570\u758F\u75D4\u75D5\u75B5\u75CA\u75CD\u768E\u76D4\u76D2\u76DB\u7737\u773E\u773C\u7736\u7738\u773A\u786B\u7843\u784E\u7965\u7968\u796D\u79FB\u7A92\u7A95\u7B20\u7B28\u7B1B\u7B2C\u7B26\u7B19\u7B1E\u7B2E\u7C92\u7C97\u7C95\u7D46\u7D43\u7D71\u7D2E\u7D39\u7D3C\u7D40\u7D30\u7D33\u7D44\u7D2F\u7D42\u7D32\u7D31\u7F3D\u7F9E\u7F9A\u7FCC\u7FCE\u7FD2\u801C\u804A\u8046\u812F\u8116\u8123\u812B\u8129\u8130\u8124\u8202\u8235\u8237\u8236\u8239\u838E\u839E\u8398\u8378\u83A2\u8396\u83BD\u83AB\u8392\u838A\u8393\u8389\u83A0\u8377\u837B\u837C"],["b340","\u8386\u83A7\u8655\u5F6A\u86C7\u86C0\u86B6\u86C4\u86B5\u86C6\u86CB\u86B1\u86AF\u86C9\u8853\u889E\u8888\u88AB\u8892\u8896\u888D\u888B\u8993\u898F\u8A2A\u8A1D\u8A23\u8A25\u8A31\u8A2D\u8A1F\u8A1B\u8A22\u8C49\u8C5A\u8CA9\u8CAC\u8CAB\u8CA8\u8CAA\u8CA7\u8D67\u8D66\u8DBE\u8DBA\u8EDB\u8EDF\u9019\u900D\u901A\u9017\u9023\u901F\u901D\u9010\u9015\u901E\u9020\u900F\u9022\u9016\u901B\u9014"],["b3a1","\u90E8\u90ED\u90FD\u9157\u91CE\u91F5\u91E6\u91E3\u91E7\u91ED\u91E9\u9589\u966A\u9675\u9673\u9678\u9670\u9674\u9676\u9677\u966C\u96C0\u96EA\u96E9\u7AE0\u7ADF\u9802\u9803\u9B5A\u9CE5\u9E75\u9E7F\u9EA5\u9EBB\u50A2\u508D\u5085\u5099\u5091\u5080\u5096\u5098\u509A\u6700\u51F1\u5272\u5274\u5275\u5269\u52DE\u52DD\u52DB\u535A\u53A5\u557B\u5580\u55A7\u557C\u558A\u559D\u5598\u5582\u559C\u55AA\u5594\u5587\u558B\u5583\u55B3\u55AE\u559F\u553E\u55B2\u559A\u55BB\u55AC\u55B1\u557E\u5589\u55AB\u5599\u570D\u582F\u582A\u5834\u5824\u5830\u5831\u5821\u581D\u5820\u58F9\u58FA\u5960"],["b440","\u5A77\u5A9A\u5A7F\u5A92\u5A9B\u5AA7\u5B73\u5B71\u5BD2\u5BCC\u5BD3\u5BD0\u5C0A\u5C0B\u5C31\u5D4C\u5D50\u5D34\u5D47\u5DFD\u5E45\u5E3D\u5E40\u5E43\u5E7E\u5ECA\u5EC1\u5EC2\u5EC4\u5F3C\u5F6D\u5FA9\u5FAA\u5FA8\u60D1\u60E1\u60B2\u60B6\u60E0\u611C\u6123\u60FA\u6115\u60F0\u60FB\u60F4\u6168\u60F1\u610E\u60F6\u6109\u6100\u6112\u621F\u6249\u63A3\u638C\u63CF\u63C0\u63E9\u63C9\u63C6\u63CD"],["b4a1","\u63D2\u63E3\u63D0\u63E1\u63D6\u63ED\u63EE\u6376\u63F4\u63EA\u63DB\u6452\u63DA\u63F9\u655E\u6566\u6562\u6563\u6591\u6590\u65AF\u666E\u6670\u6674\u6676\u666F\u6691\u667A\u667E\u6677\u66FE\u66FF\u671F\u671D\u68FA\u68D5\u68E0\u68D8\u68D7\u6905\u68DF\u68F5\u68EE\u68E7\u68F9\u68D2\u68F2\u68E3\u68CB\u68CD\u690D\u6912\u690E\u68C9\u68DA\u696E\u68FB\u6B3E\u6B3A\u6B3D\u6B98\u6B96\u6BBC\u6BEF\u6C2E\u6C2F\u6C2C\u6E2F\u6E38\u6E54\u6E21\u6E32\u6E67\u6E4A\u6E20\u6E25\u6E23\u6E1B\u6E5B\u6E58\u6E24\u6E56\u6E6E\u6E2D\u6E26\u6E6F\u6E34\u6E4D\u6E3A\u6E2C\u6E43\u6E1D\u6E3E\u6ECB"],["b540","\u6E89\u6E19\u6E4E\u6E63\u6E44\u6E72\u6E69\u6E5F\u7119\u711A\u7126\u7130\u7121\u7136\u716E\u711C\u724C\u7284\u7280\u7336\u7325\u7334\u7329\u743A\u742A\u7433\u7422\u7425\u7435\u7436\u7434\u742F\u741B\u7426\u7428\u7525\u7526\u756B\u756A\u75E2\u75DB\u75E3\u75D9\u75D8\u75DE\u75E0\u767B\u767C\u7696\u7693\u76B4\u76DC\u774F\u77ED\u785D\u786C\u786F\u7A0D\u7A08\u7A0B\u7A05\u7A00\u7A98"],["b5a1","\u7A97\u7A96\u7AE5\u7AE3\u7B49\u7B56\u7B46\u7B50\u7B52\u7B54\u7B4D\u7B4B\u7B4F\u7B51\u7C9F\u7CA5\u7D5E\u7D50\u7D68\u7D55\u7D2B\u7D6E\u7D72\u7D61\u7D66\u7D62\u7D70\u7D73\u5584\u7FD4\u7FD5\u800B\u8052\u8085\u8155\u8154\u814B\u8151\u814E\u8139\u8146\u813E\u814C\u8153\u8174\u8212\u821C\u83E9\u8403\u83F8\u840D\u83E0\u83C5\u840B\u83C1\u83EF\u83F1\u83F4\u8457\u840A\u83F0\u840C\u83CC\u83FD\u83F2\u83CA\u8438\u840E\u8404\u83DC\u8407\u83D4\u83DF\u865B\u86DF\u86D9\u86ED\u86D4\u86DB\u86E4\u86D0\u86DE\u8857\u88C1\u88C2\u88B1\u8983\u8996\u8A3B\u8A60\u8A55\u8A5E\u8A3C\u8A41"],["b640","\u8A54\u8A5B\u8A50\u8A46\u8A34\u8A3A\u8A36\u8A56\u8C61\u8C82\u8CAF\u8CBC\u8CB3\u8CBD\u8CC1\u8CBB\u8CC0\u8CB4\u8CB7\u8CB6\u8CBF\u8CB8\u8D8A\u8D85\u8D81\u8DCE\u8DDD\u8DCB\u8DDA\u8DD1\u8DCC\u8DDB\u8DC6\u8EFB\u8EF8\u8EFC\u8F9C\u902E\u9035\u9031\u9038\u9032\u9036\u9102\u90F5\u9109\u90FE\u9163\u9165\u91CF\u9214\u9215\u9223\u9209\u921E\u920D\u9210\u9207\u9211\u9594\u958F\u958B\u9591"],["b6a1","\u9593\u9592\u958E\u968A\u968E\u968B\u967D\u9685\u9686\u968D\u9672\u9684\u96C1\u96C5\u96C4\u96C6\u96C7\u96EF\u96F2\u97CC\u9805\u9806\u9808\u98E7\u98EA\u98EF\u98E9\u98F2\u98ED\u99AE\u99AD\u9EC3\u9ECD\u9ED1\u4E82\u50AD\u50B5\u50B2\u50B3\u50C5\u50BE\u50AC\u50B7\u50BB\u50AF\u50C7\u527F\u5277\u527D\u52DF\u52E6\u52E4\u52E2\u52E3\u532F\u55DF\u55E8\u55D3\u55E6\u55CE\u55DC\u55C7\u55D1\u55E3\u55E4\u55EF\u55DA\u55E1\u55C5\u55C6\u55E5\u55C9\u5712\u5713\u585E\u5851\u5858\u5857\u585A\u5854\u586B\u584C\u586D\u584A\u5862\u5852\u584B\u5967\u5AC1\u5AC9\u5ACC\u5ABE\u5ABD\u5ABC"],["b740","\u5AB3\u5AC2\u5AB2\u5D69\u5D6F\u5E4C\u5E79\u5EC9\u5EC8\u5F12\u5F59\u5FAC\u5FAE\u611A\u610F\u6148\u611F\u60F3\u611B\u60F9\u6101\u6108\u614E\u614C\u6144\u614D\u613E\u6134\u6127\u610D\u6106\u6137\u6221\u6222\u6413\u643E\u641E\u642A\u642D\u643D\u642C\u640F\u641C\u6414\u640D\u6436\u6416\u6417\u6406\u656C\u659F\u65B0\u6697\u6689\u6687\u6688\u6696\u6684\u6698\u668D\u6703\u6994\u696D"],["b7a1","\u695A\u6977\u6960\u6954\u6975\u6930\u6982\u694A\u6968\u696B\u695E\u6953\u6979\u6986\u695D\u6963\u695B\u6B47\u6B72\u6BC0\u6BBF\u6BD3\u6BFD\u6EA2\u6EAF\u6ED3\u6EB6\u6EC2\u6E90\u6E9D\u6EC7\u6EC5\u6EA5\u6E98\u6EBC\u6EBA\u6EAB\u6ED1\u6E96\u6E9C\u6EC4\u6ED4\u6EAA\u6EA7\u6EB4\u714E\u7159\u7169\u7164\u7149\u7167\u715C\u716C\u7166\u714C\u7165\u715E\u7146\u7168\u7156\u723A\u7252\u7337\u7345\u733F\u733E\u746F\u745A\u7455\u745F\u745E\u7441\u743F\u7459\u745B\u745C\u7576\u7578\u7600\u75F0\u7601\u75F2\u75F1\u75FA\u75FF\u75F4\u75F3\u76DE\u76DF\u775B\u776B\u7766\u775E\u7763"],["b840","\u7779\u776A\u776C\u775C\u7765\u7768\u7762\u77EE\u788E\u78B0\u7897\u7898\u788C\u7889\u787C\u7891\u7893\u787F\u797A\u797F\u7981\u842C\u79BD\u7A1C\u7A1A\u7A20\u7A14\u7A1F\u7A1E\u7A9F\u7AA0\u7B77\u7BC0\u7B60\u7B6E\u7B67\u7CB1\u7CB3\u7CB5\u7D93\u7D79\u7D91\u7D81\u7D8F\u7D5B\u7F6E\u7F69\u7F6A\u7F72\u7FA9\u7FA8\u7FA4\u8056\u8058\u8086\u8084\u8171\u8170\u8178\u8165\u816E\u8173\u816B"],["b8a1","\u8179\u817A\u8166\u8205\u8247\u8482\u8477\u843D\u8431\u8475\u8466\u846B\u8449\u846C\u845B\u843C\u8435\u8461\u8463\u8469\u846D\u8446\u865E\u865C\u865F\u86F9\u8713\u8708\u8707\u8700\u86FE\u86FB\u8702\u8703\u8706\u870A\u8859\u88DF\u88D4\u88D9\u88DC\u88D8\u88DD\u88E1\u88CA\u88D5\u88D2\u899C\u89E3\u8A6B\u8A72\u8A73\u8A66\u8A69\u8A70\u8A87\u8A7C\u8A63\u8AA0\u8A71\u8A85\u8A6D\u8A62\u8A6E\u8A6C\u8A79\u8A7B\u8A3E\u8A68\u8C62\u8C8A\u8C89\u8CCA\u8CC7\u8CC8\u8CC4\u8CB2\u8CC3\u8CC2\u8CC5\u8DE1\u8DDF\u8DE8\u8DEF\u8DF3\u8DFA\u8DEA\u8DE4\u8DE6\u8EB2\u8F03\u8F09\u8EFE\u8F0A"],["b940","\u8F9F\u8FB2\u904B\u904A\u9053\u9042\u9054\u903C\u9055\u9050\u9047\u904F\u904E\u904D\u9051\u903E\u9041\u9112\u9117\u916C\u916A\u9169\u91C9\u9237\u9257\u9238\u923D\u9240\u923E\u925B\u924B\u9264\u9251\u9234\u9249\u924D\u9245\u9239\u923F\u925A\u9598\u9698\u9694\u9695\u96CD\u96CB\u96C9\u96CA\u96F7\u96FB\u96F9\u96F6\u9756\u9774\u9776\u9810\u9811\u9813\u980A\u9812\u980C\u98FC\u98F4"],["b9a1","\u98FD\u98FE\u99B3\u99B1\u99B4\u9AE1\u9CE9\u9E82\u9F0E\u9F13\u9F20\u50E7\u50EE\u50E5\u50D6\u50ED\u50DA\u50D5\u50CF\u50D1\u50F1\u50CE\u50E9\u5162\u51F3\u5283\u5282\u5331\u53AD\u55FE\u5600\u561B\u5617\u55FD\u5614\u5606\u5609\u560D\u560E\u55F7\u5616\u561F\u5608\u5610\u55F6\u5718\u5716\u5875\u587E\u5883\u5893\u588A\u5879\u5885\u587D\u58FD\u5925\u5922\u5924\u596A\u5969\u5AE1\u5AE6\u5AE9\u5AD7\u5AD6\u5AD8\u5AE3\u5B75\u5BDE\u5BE7\u5BE1\u5BE5\u5BE6\u5BE8\u5BE2\u5BE4\u5BDF\u5C0D\u5C62\u5D84\u5D87\u5E5B\u5E63\u5E55\u5E57\u5E54\u5ED3\u5ED6\u5F0A\u5F46\u5F70\u5FB9\u6147"],["ba40","\u613F\u614B\u6177\u6162\u6163\u615F\u615A\u6158\u6175\u622A\u6487\u6458\u6454\u64A4\u6478\u645F\u647A\u6451\u6467\u6434\u646D\u647B\u6572\u65A1\u65D7\u65D6\u66A2\u66A8\u669D\u699C\u69A8\u6995\u69C1\u69AE\u69D3\u69CB\u699B\u69B7\u69BB\u69AB\u69B4\u69D0\u69CD\u69AD\u69CC\u69A6\u69C3\u69A3\u6B49\u6B4C\u6C33\u6F33\u6F14\u6EFE\u6F13\u6EF4\u6F29\u6F3E\u6F20\u6F2C\u6F0F\u6F02\u6F22"],["baa1","\u6EFF\u6EEF\u6F06\u6F31\u6F38\u6F32\u6F23\u6F15\u6F2B\u6F2F\u6F88\u6F2A\u6EEC\u6F01\u6EF2\u6ECC\u6EF7\u7194\u7199\u717D\u718A\u7184\u7192\u723E\u7292\u7296\u7344\u7350\u7464\u7463\u746A\u7470\u746D\u7504\u7591\u7627\u760D\u760B\u7609\u7613\u76E1\u76E3\u7784\u777D\u777F\u7761\u78C1\u789F\u78A7\u78B3\u78A9\u78A3\u798E\u798F\u798D\u7A2E\u7A31\u7AAA\u7AA9\u7AED\u7AEF\u7BA1\u7B95\u7B8B\u7B75\u7B97\u7B9D\u7B94\u7B8F\u7BB8\u7B87\u7B84\u7CB9\u7CBD\u7CBE\u7DBB\u7DB0\u7D9C\u7DBD\u7DBE\u7DA0\u7DCA\u7DB4\u7DB2\u7DB1\u7DBA\u7DA2\u7DBF\u7DB5\u7DB8\u7DAD\u7DD2\u7DC7\u7DAC"],["bb40","\u7F70\u7FE0\u7FE1\u7FDF\u805E\u805A\u8087\u8150\u8180\u818F\u8188\u818A\u817F\u8182\u81E7\u81FA\u8207\u8214\u821E\u824B\u84C9\u84BF\u84C6\u84C4\u8499\u849E\u84B2\u849C\u84CB\u84B8\u84C0\u84D3\u8490\u84BC\u84D1\u84CA\u873F\u871C\u873B\u8722\u8725\u8734\u8718\u8755\u8737\u8729\u88F3\u8902\u88F4\u88F9\u88F8\u88FD\u88E8\u891A\u88EF\u8AA6\u8A8C\u8A9E\u8AA3\u8A8D\u8AA1\u8A93\u8AA4"],["bba1","\u8AAA\u8AA5\u8AA8\u8A98\u8A91\u8A9A\u8AA7\u8C6A\u8C8D\u8C8C\u8CD3\u8CD1\u8CD2\u8D6B\u8D99\u8D95\u8DFC\u8F14\u8F12\u8F15\u8F13\u8FA3\u9060\u9058\u905C\u9063\u9059\u905E\u9062\u905D\u905B\u9119\u9118\u911E\u9175\u9178\u9177\u9174\u9278\u9280\u9285\u9298\u9296\u927B\u9293\u929C\u92A8\u927C\u9291\u95A1\u95A8\u95A9\u95A3\u95A5\u95A4\u9699\u969C\u969B\u96CC\u96D2\u9700\u977C\u9785\u97F6\u9817\u9818\u98AF\u98B1\u9903\u9905\u990C\u9909\u99C1\u9AAF\u9AB0\u9AE6\u9B41\u9B42\u9CF4\u9CF6\u9CF3\u9EBC\u9F3B\u9F4A\u5104\u5100\u50FB\u50F5\u50F9\u5102\u5108\u5109\u5105\u51DC"],["bc40","\u5287\u5288\u5289\u528D\u528A\u52F0\u53B2\u562E\u563B\u5639\u5632\u563F\u5634\u5629\u5653\u564E\u5657\u5674\u5636\u562F\u5630\u5880\u589F\u589E\u58B3\u589C\u58AE\u58A9\u58A6\u596D\u5B09\u5AFB\u5B0B\u5AF5\u5B0C\u5B08\u5BEE\u5BEC\u5BE9\u5BEB\u5C64\u5C65\u5D9D\u5D94\u5E62\u5E5F\u5E61\u5EE2\u5EDA\u5EDF\u5EDD\u5EE3\u5EE0\u5F48\u5F71\u5FB7\u5FB5\u6176\u6167\u616E\u615D\u6155\u6182"],["bca1","\u617C\u6170\u616B\u617E\u61A7\u6190\u61AB\u618E\u61AC\u619A\u61A4\u6194\u61AE\u622E\u6469\u646F\u6479\u649E\u64B2\u6488\u6490\u64B0\u64A5\u6493\u6495\u64A9\u6492\u64AE\u64AD\u64AB\u649A\u64AC\u6499\u64A2\u64B3\u6575\u6577\u6578\u66AE\u66AB\u66B4\u66B1\u6A23\u6A1F\u69E8\u6A01\u6A1E\u6A19\u69FD\u6A21\u6A13\u6A0A\u69F3\u6A02\u6A05\u69ED\u6A11\u6B50\u6B4E\u6BA4\u6BC5\u6BC6\u6F3F\u6F7C\u6F84\u6F51\u6F66\u6F54\u6F86\u6F6D\u6F5B\u6F78\u6F6E\u6F8E\u6F7A\u6F70\u6F64\u6F97\u6F58\u6ED5\u6F6F\u6F60\u6F5F\u719F\u71AC\u71B1\u71A8\u7256\u729B\u734E\u7357\u7469\u748B\u7483"],["bd40","\u747E\u7480\u757F\u7620\u7629\u761F\u7624\u7626\u7621\u7622\u769A\u76BA\u76E4\u778E\u7787\u778C\u7791\u778B\u78CB\u78C5\u78BA\u78CA\u78BE\u78D5\u78BC\u78D0\u7A3F\u7A3C\u7A40\u7A3D\u7A37\u7A3B\u7AAF\u7AAE\u7BAD\u7BB1\u7BC4\u7BB4\u7BC6\u7BC7\u7BC1\u7BA0\u7BCC\u7CCA\u7DE0\u7DF4\u7DEF\u7DFB\u7DD8\u7DEC\u7DDD\u7DE8\u7DE3\u7DDA\u7DDE\u7DE9\u7D9E\u7DD9\u7DF2\u7DF9\u7F75\u7F77\u7FAF"],["bda1","\u7FE9\u8026\u819B\u819C\u819D\u81A0\u819A\u8198\u8517\u853D\u851A\u84EE\u852C\u852D\u8513\u8511\u8523\u8521\u8514\u84EC\u8525\u84FF\u8506\u8782\u8774\u8776\u8760\u8766\u8778\u8768\u8759\u8757\u874C\u8753\u885B\u885D\u8910\u8907\u8912\u8913\u8915\u890A\u8ABC\u8AD2\u8AC7\u8AC4\u8A95\u8ACB\u8AF8\u8AB2\u8AC9\u8AC2\u8ABF\u8AB0\u8AD6\u8ACD\u8AB6\u8AB9\u8ADB\u8C4C\u8C4E\u8C6C\u8CE0\u8CDE\u8CE6\u8CE4\u8CEC\u8CED\u8CE2\u8CE3\u8CDC\u8CEA\u8CE1\u8D6D\u8D9F\u8DA3\u8E2B\u8E10\u8E1D\u8E22\u8E0F\u8E29\u8E1F\u8E21\u8E1E\u8EBA\u8F1D\u8F1B\u8F1F\u8F29\u8F26\u8F2A\u8F1C\u8F1E"],["be40","\u8F25\u9069\u906E\u9068\u906D\u9077\u9130\u912D\u9127\u9131\u9187\u9189\u918B\u9183\u92C5\u92BB\u92B7\u92EA\u92AC\u92E4\u92C1\u92B3\u92BC\u92D2\u92C7\u92F0\u92B2\u95AD\u95B1\u9704\u9706\u9707\u9709\u9760\u978D\u978B\u978F\u9821\u982B\u981C\u98B3\u990A\u9913\u9912\u9918\u99DD\u99D0\u99DF\u99DB\u99D1\u99D5\u99D2\u99D9\u9AB7\u9AEE\u9AEF\u9B27\u9B45\u9B44\u9B77\u9B6F\u9D06\u9D09"],["bea1","\u9D03\u9EA9\u9EBE\u9ECE\u58A8\u9F52\u5112\u5118\u5114\u5110\u5115\u5180\u51AA\u51DD\u5291\u5293\u52F3\u5659\u566B\u5679\u5669\u5664\u5678\u566A\u5668\u5665\u5671\u566F\u566C\u5662\u5676\u58C1\u58BE\u58C7\u58C5\u596E\u5B1D\u5B34\u5B78\u5BF0\u5C0E\u5F4A\u61B2\u6191\u61A9\u618A\u61CD\u61B6\u61BE\u61CA\u61C8\u6230\u64C5\u64C1\u64CB\u64BB\u64BC\u64DA\u64C4\u64C7\u64C2\u64CD\u64BF\u64D2\u64D4\u64BE\u6574\u66C6\u66C9\u66B9\u66C4\u66C7\u66B8\u6A3D\u6A38\u6A3A\u6A59\u6A6B\u6A58\u6A39\u6A44\u6A62\u6A61\u6A4B\u6A47\u6A35\u6A5F\u6A48\u6B59\u6B77\u6C05\u6FC2\u6FB1\u6FA1"],["bf40","\u6FC3\u6FA4\u6FC1\u6FA7\u6FB3\u6FC0\u6FB9\u6FB6\u6FA6\u6FA0\u6FB4\u71BE\u71C9\u71D0\u71D2\u71C8\u71D5\u71B9\u71CE\u71D9\u71DC\u71C3\u71C4\u7368\u749C\u74A3\u7498\u749F\u749E\u74E2\u750C\u750D\u7634\u7638\u763A\u76E7\u76E5\u77A0\u779E\u779F\u77A5\u78E8\u78DA\u78EC\u78E7\u79A6\u7A4D\u7A4E\u7A46\u7A4C\u7A4B\u7ABA\u7BD9\u7C11\u7BC9\u7BE4\u7BDB\u7BE1\u7BE9\u7BE6\u7CD5\u7CD6\u7E0A"],["bfa1","\u7E11\u7E08\u7E1B\u7E23\u7E1E\u7E1D\u7E09\u7E10\u7F79\u7FB2\u7FF0\u7FF1\u7FEE\u8028\u81B3\u81A9\u81A8\u81FB\u8208\u8258\u8259\u854A\u8559\u8548\u8568\u8569\u8543\u8549\u856D\u856A\u855E\u8783\u879F\u879E\u87A2\u878D\u8861\u892A\u8932\u8925\u892B\u8921\u89AA\u89A6\u8AE6\u8AFA\u8AEB\u8AF1\u8B00\u8ADC\u8AE7\u8AEE\u8AFE\u8B01\u8B02\u8AF7\u8AED\u8AF3\u8AF6\u8AFC\u8C6B\u8C6D\u8C93\u8CF4\u8E44\u8E31\u8E34\u8E42\u8E39\u8E35\u8F3B\u8F2F\u8F38\u8F33\u8FA8\u8FA6\u9075\u9074\u9078\u9072\u907C\u907A\u9134\u9192\u9320\u9336\u92F8\u9333\u932F\u9322\u92FC\u932B\u9304\u931A"],["c040","\u9310\u9326\u9321\u9315\u932E\u9319\u95BB\u96A7\u96A8\u96AA\u96D5\u970E\u9711\u9716\u970D\u9713\u970F\u975B\u975C\u9766\u9798\u9830\u9838\u983B\u9837\u982D\u9839\u9824\u9910\u9928\u991E\u991B\u9921\u991A\u99ED\u99E2\u99F1\u9AB8\u9ABC\u9AFB\u9AED\u9B28\u9B91\u9D15\u9D23\u9D26\u9D28\u9D12\u9D1B\u9ED8\u9ED4\u9F8D\u9F9C\u512A\u511F\u5121\u5132\u52F5\u568E\u5680\u5690\u5685\u5687"],["c0a1","\u568F\u58D5\u58D3\u58D1\u58CE\u5B30\u5B2A\u5B24\u5B7A\u5C37\u5C68\u5DBC\u5DBA\u5DBD\u5DB8\u5E6B\u5F4C\u5FBD\u61C9\u61C2\u61C7\u61E6\u61CB\u6232\u6234\u64CE\u64CA\u64D8\u64E0\u64F0\u64E6\u64EC\u64F1\u64E2\u64ED\u6582\u6583\u66D9\u66D6\u6A80\u6A94\u6A84\u6AA2\u6A9C\u6ADB\u6AA3\u6A7E\u6A97\u6A90\u6AA0\u6B5C\u6BAE\u6BDA\u6C08\u6FD8\u6FF1\u6FDF\u6FE0\u6FDB\u6FE4\u6FEB\u6FEF\u6F80\u6FEC\u6FE1\u6FE9\u6FD5\u6FEE\u6FF0\u71E7\u71DF\u71EE\u71E6\u71E5\u71ED\u71EC\u71F4\u71E0\u7235\u7246\u7370\u7372\u74A9\u74B0\u74A6\u74A8\u7646\u7642\u764C\u76EA\u77B3\u77AA\u77B0\u77AC"],["c140","\u77A7\u77AD\u77EF\u78F7\u78FA\u78F4\u78EF\u7901\u79A7\u79AA\u7A57\u7ABF\u7C07\u7C0D\u7BFE\u7BF7\u7C0C\u7BE0\u7CE0\u7CDC\u7CDE\u7CE2\u7CDF\u7CD9\u7CDD\u7E2E\u7E3E\u7E46\u7E37\u7E32\u7E43\u7E2B\u7E3D\u7E31\u7E45\u7E41\u7E34\u7E39\u7E48\u7E35\u7E3F\u7E2F\u7F44\u7FF3\u7FFC\u8071\u8072\u8070\u806F\u8073\u81C6\u81C3\u81BA\u81C2\u81C0\u81BF\u81BD\u81C9\u81BE\u81E8\u8209\u8271\u85AA"],["c1a1","\u8584\u857E\u859C\u8591\u8594\u85AF\u859B\u8587\u85A8\u858A\u8667\u87C0\u87D1\u87B3\u87D2\u87C6\u87AB\u87BB\u87BA\u87C8\u87CB\u893B\u8936\u8944\u8938\u893D\u89AC\u8B0E\u8B17\u8B19\u8B1B\u8B0A\u8B20\u8B1D\u8B04\u8B10\u8C41\u8C3F\u8C73\u8CFA\u8CFD\u8CFC\u8CF8\u8CFB\u8DA8\u8E49\u8E4B\u8E48\u8E4A\u8F44\u8F3E\u8F42\u8F45\u8F3F\u907F\u907D\u9084\u9081\u9082\u9080\u9139\u91A3\u919E\u919C\u934D\u9382\u9328\u9375\u934A\u9365\u934B\u9318\u937E\u936C\u935B\u9370\u935A\u9354\u95CA\u95CB\u95CC\u95C8\u95C6\u96B1\u96B8\u96D6\u971C\u971E\u97A0\u97D3\u9846\u98B6\u9935\u9A01"],["c240","\u99FF\u9BAE\u9BAB\u9BAA\u9BAD\u9D3B\u9D3F\u9E8B\u9ECF\u9EDE\u9EDC\u9EDD\u9EDB\u9F3E\u9F4B\u53E2\u5695\u56AE\u58D9\u58D8\u5B38\u5F5D\u61E3\u6233\u64F4\u64F2\u64FE\u6506\u64FA\u64FB\u64F7\u65B7\u66DC\u6726\u6AB3\u6AAC\u6AC3\u6ABB\u6AB8\u6AC2\u6AAE\u6AAF\u6B5F\u6B78\u6BAF\u7009\u700B\u6FFE\u7006\u6FFA\u7011\u700F\u71FB\u71FC\u71FE\u71F8\u7377\u7375\u74A7\u74BF\u7515\u7656\u7658"],["c2a1","\u7652\u77BD\u77BF\u77BB\u77BC\u790E\u79AE\u7A61\u7A62\u7A60\u7AC4\u7AC5\u7C2B\u7C27\u7C2A\u7C1E\u7C23\u7C21\u7CE7\u7E54\u7E55\u7E5E\u7E5A\u7E61\u7E52\u7E59\u7F48\u7FF9\u7FFB\u8077\u8076\u81CD\u81CF\u820A\u85CF\u85A9\u85CD\u85D0\u85C9\u85B0\u85BA\u85B9\u85A6\u87EF\u87EC\u87F2\u87E0\u8986\u89B2\u89F4\u8B28\u8B39\u8B2C\u8B2B\u8C50\u8D05\u8E59\u8E63\u8E66\u8E64\u8E5F\u8E55\u8EC0\u8F49\u8F4D\u9087\u9083\u9088\u91AB\u91AC\u91D0\u9394\u938A\u9396\u93A2\u93B3\u93AE\u93AC\u93B0\u9398\u939A\u9397\u95D4\u95D6\u95D0\u95D5\u96E2\u96DC\u96D9\u96DB\u96DE\u9724\u97A3\u97A6"],["c340","\u97AD\u97F9\u984D\u984F\u984C\u984E\u9853\u98BA\u993E\u993F\u993D\u992E\u99A5\u9A0E\u9AC1\u9B03\u9B06\u9B4F\u9B4E\u9B4D\u9BCA\u9BC9\u9BFD\u9BC8\u9BC0\u9D51\u9D5D\u9D60\u9EE0\u9F15\u9F2C\u5133\u56A5\u58DE\u58DF\u58E2\u5BF5\u9F90\u5EEC\u61F2\u61F7\u61F6\u61F5\u6500\u650F\u66E0\u66DD\u6AE5\u6ADD\u6ADA\u6AD3\u701B\u701F\u7028\u701A\u701D\u7015\u7018\u7206\u720D\u7258\u72A2\u7378"],["c3a1","\u737A\u74BD\u74CA\u74E3\u7587\u7586\u765F\u7661\u77C7\u7919\u79B1\u7A6B\u7A69\u7C3E\u7C3F\u7C38\u7C3D\u7C37\u7C40\u7E6B\u7E6D\u7E79\u7E69\u7E6A\u7F85\u7E73\u7FB6\u7FB9\u7FB8\u81D8\u85E9\u85DD\u85EA\u85D5\u85E4\u85E5\u85F7\u87FB\u8805\u880D\u87F9\u87FE\u8960\u895F\u8956\u895E\u8B41\u8B5C\u8B58\u8B49\u8B5A\u8B4E\u8B4F\u8B46\u8B59\u8D08\u8D0A\u8E7C\u8E72\u8E87\u8E76\u8E6C\u8E7A\u8E74\u8F54\u8F4E\u8FAD\u908A\u908B\u91B1\u91AE\u93E1\u93D1\u93DF\u93C3\u93C8\u93DC\u93DD\u93D6\u93E2\u93CD\u93D8\u93E4\u93D7\u93E8\u95DC\u96B4\u96E3\u972A\u9727\u9761\u97DC\u97FB\u985E"],["c440","\u9858\u985B\u98BC\u9945\u9949\u9A16\u9A19\u9B0D\u9BE8\u9BE7\u9BD6\u9BDB\u9D89\u9D61\u9D72\u9D6A\u9D6C\u9E92\u9E97\u9E93\u9EB4\u52F8\u56A8\u56B7\u56B6\u56B4\u56BC\u58E4\u5B40\u5B43\u5B7D\u5BF6\u5DC9\u61F8\u61FA\u6518\u6514\u6519\u66E6\u6727\u6AEC\u703E\u7030\u7032\u7210\u737B\u74CF\u7662\u7665\u7926\u792A\u792C\u792B\u7AC7\u7AF6\u7C4C\u7C43\u7C4D\u7CEF\u7CF0\u8FAE\u7E7D\u7E7C"],["c4a1","\u7E82\u7F4C\u8000\u81DA\u8266\u85FB\u85F9\u8611\u85FA\u8606\u860B\u8607\u860A\u8814\u8815\u8964\u89BA\u89F8\u8B70\u8B6C\u8B66\u8B6F\u8B5F\u8B6B\u8D0F\u8D0D\u8E89\u8E81\u8E85\u8E82\u91B4\u91CB\u9418\u9403\u93FD\u95E1\u9730\u98C4\u9952\u9951\u99A8\u9A2B\u9A30\u9A37\u9A35\u9C13\u9C0D\u9E79\u9EB5\u9EE8\u9F2F\u9F5F\u9F63\u9F61\u5137\u5138\u56C1\u56C0\u56C2\u5914\u5C6C\u5DCD\u61FC\u61FE\u651D\u651C\u6595\u66E9\u6AFB\u6B04\u6AFA\u6BB2\u704C\u721B\u72A7\u74D6\u74D4\u7669\u77D3\u7C50\u7E8F\u7E8C\u7FBC\u8617\u862D\u861A\u8823\u8822\u8821\u881F\u896A\u896C\u89BD\u8B74"],["c540","\u8B77\u8B7D\u8D13\u8E8A\u8E8D\u8E8B\u8F5F\u8FAF\u91BA\u942E\u9433\u9435\u943A\u9438\u9432\u942B\u95E2\u9738\u9739\u9732\u97FF\u9867\u9865\u9957\u9A45\u9A43\u9A40\u9A3E\u9ACF\u9B54\u9B51\u9C2D\u9C25\u9DAF\u9DB4\u9DC2\u9DB8\u9E9D\u9EEF\u9F19\u9F5C\u9F66\u9F67\u513C\u513B\u56C8\u56CA\u56C9\u5B7F\u5DD4\u5DD2\u5F4E\u61FF\u6524\u6B0A\u6B61\u7051\u7058\u7380\u74E4\u758A\u766E\u766C"],["c5a1","\u79B3\u7C60\u7C5F\u807E\u807D\u81DF\u8972\u896F\u89FC\u8B80\u8D16\u8D17\u8E91\u8E93\u8F61\u9148\u9444\u9451\u9452\u973D\u973E\u97C3\u97C1\u986B\u9955\u9A55\u9A4D\u9AD2\u9B1A\u9C49\u9C31\u9C3E\u9C3B\u9DD3\u9DD7\u9F34\u9F6C\u9F6A\u9F94\u56CC\u5DD6\u6200\u6523\u652B\u652A\u66EC\u6B10\u74DA\u7ACA\u7C64\u7C63\u7C65\u7E93\u7E96\u7E94\u81E2\u8638\u863F\u8831\u8B8A\u9090\u908F\u9463\u9460\u9464\u9768\u986F\u995C\u9A5A\u9A5B\u9A57\u9AD3\u9AD4\u9AD1\u9C54\u9C57\u9C56\u9DE5\u9E9F\u9EF4\u56D1\u58E9\u652C\u705E\u7671\u7672\u77D7\u7F50\u7F88\u8836\u8839\u8862\u8B93\u8B92"],["c640","\u8B96\u8277\u8D1B\u91C0\u946A\u9742\u9748\u9744\u97C6\u9870\u9A5F\u9B22\u9B58\u9C5F\u9DF9\u9DFA\u9E7C\u9E7D\u9F07\u9F77\u9F72\u5EF3\u6B16\u7063\u7C6C\u7C6E\u883B\u89C0\u8EA1\u91C1\u9472\u9470\u9871\u995E\u9AD6\u9B23\u9ECC\u7064\u77DA\u8B9A\u9477\u97C9\u9A62\u9A65\u7E9C\u8B9C\u8EAA\u91C5\u947D\u947E\u947C\u9C77\u9C78\u9EF7\u8C54\u947F\u9E1A\u7228\u9A6A\u9B31\u9E1B\u9E1E\u7C72"],["c940","\u4E42\u4E5C\u51F5\u531A\u5382\u4E07\u4E0C\u4E47\u4E8D\u56D7\uFA0C\u5C6E\u5F73\u4E0F\u5187\u4E0E\u4E2E\u4E93\u4EC2\u4EC9\u4EC8\u5198\u52FC\u536C\u53B9\u5720\u5903\u592C\u5C10\u5DFF\u65E1\u6BB3\u6BCC\u6C14\u723F\u4E31\u4E3C\u4EE8\u4EDC\u4EE9\u4EE1\u4EDD\u4EDA\u520C\u531C\u534C\u5722\u5723\u5917\u592F\u5B81\u5B84\u5C12\u5C3B\u5C74\u5C73\u5E04\u5E80\u5E82\u5FC9\u6209\u6250\u6C15"],["c9a1","\u6C36\u6C43\u6C3F\u6C3B\u72AE\u72B0\u738A\u79B8\u808A\u961E\u4F0E\u4F18\u4F2C\u4EF5\u4F14\u4EF1\u4F00\u4EF7\u4F08\u4F1D\u4F02\u4F05\u4F22\u4F13\u4F04\u4EF4\u4F12\u51B1\u5213\u5209\u5210\u52A6\u5322\u531F\u534D\u538A\u5407\u56E1\u56DF\u572E\u572A\u5734\u593C\u5980\u597C\u5985\u597B\u597E\u5977\u597F\u5B56\u5C15\u5C25\u5C7C\u5C7A\u5C7B\u5C7E\u5DDF\u5E75\u5E84\u5F02\u5F1A\u5F74\u5FD5\u5FD4\u5FCF\u625C\u625E\u6264\u6261\u6266\u6262\u6259\u6260\u625A\u6265\u65EF\u65EE\u673E\u6739\u6738\u673B\u673A\u673F\u673C\u6733\u6C18\u6C46\u6C52\u6C5C\u6C4F\u6C4A\u6C54\u6C4B"],["ca40","\u6C4C\u7071\u725E\u72B4\u72B5\u738E\u752A\u767F\u7A75\u7F51\u8278\u827C\u8280\u827D\u827F\u864D\u897E\u9099\u9097\u9098\u909B\u9094\u9622\u9624\u9620\u9623\u4F56\u4F3B\u4F62\u4F49\u4F53\u4F64\u4F3E\u4F67\u4F52\u4F5F\u4F41\u4F58\u4F2D\u4F33\u4F3F\u4F61\u518F\u51B9\u521C\u521E\u5221\u52AD\u52AE\u5309\u5363\u5372\u538E\u538F\u5430\u5437\u542A\u5454\u5445\u5419\u541C\u5425\u5418"],["caa1","\u543D\u544F\u5441\u5428\u5424\u5447\u56EE\u56E7\u56E5\u5741\u5745\u574C\u5749\u574B\u5752\u5906\u5940\u59A6\u5998\u59A0\u5997\u598E\u59A2\u5990\u598F\u59A7\u59A1\u5B8E\u5B92\u5C28\u5C2A\u5C8D\u5C8F\u5C88\u5C8B\u5C89\u5C92\u5C8A\u5C86\u5C93\u5C95\u5DE0\u5E0A\u5E0E\u5E8B\u5E89\u5E8C\u5E88\u5E8D\u5F05\u5F1D\u5F78\u5F76\u5FD2\u5FD1\u5FD0\u5FED\u5FE8\u5FEE\u5FF3\u5FE1\u5FE4\u5FE3\u5FFA\u5FEF\u5FF7\u5FFB\u6000\u5FF4\u623A\u6283\u628C\u628E\u628F\u6294\u6287\u6271\u627B\u627A\u6270\u6281\u6288\u6277\u627D\u6272\u6274\u6537\u65F0\u65F4\u65F3\u65F2\u65F5\u6745\u6747"],["cb40","\u6759\u6755\u674C\u6748\u675D\u674D\u675A\u674B\u6BD0\u6C19\u6C1A\u6C78\u6C67\u6C6B\u6C84\u6C8B\u6C8F\u6C71\u6C6F\u6C69\u6C9A\u6C6D\u6C87\u6C95\u6C9C\u6C66\u6C73\u6C65\u6C7B\u6C8E\u7074\u707A\u7263\u72BF\u72BD\u72C3\u72C6\u72C1\u72BA\u72C5\u7395\u7397\u7393\u7394\u7392\u753A\u7539\u7594\u7595\u7681\u793D\u8034\u8095\u8099\u8090\u8092\u809C\u8290\u828F\u8285\u828E\u8291\u8293"],["cba1","\u828A\u8283\u8284\u8C78\u8FC9\u8FBF\u909F\u90A1\u90A5\u909E\u90A7\u90A0\u9630\u9628\u962F\u962D\u4E33\u4F98\u4F7C\u4F85\u4F7D\u4F80\u4F87\u4F76\u4F74\u4F89\u4F84\u4F77\u4F4C\u4F97\u4F6A\u4F9A\u4F79\u4F81\u4F78\u4F90\u4F9C\u4F94\u4F9E\u4F92\u4F82\u4F95\u4F6B\u4F6E\u519E\u51BC\u51BE\u5235\u5232\u5233\u5246\u5231\u52BC\u530A\u530B\u533C\u5392\u5394\u5487\u547F\u5481\u5491\u5482\u5488\u546B\u547A\u547E\u5465\u546C\u5474\u5466\u548D\u546F\u5461\u5460\u5498\u5463\u5467\u5464\u56F7\u56F9\u576F\u5772\u576D\u576B\u5771\u5770\u5776\u5780\u5775\u577B\u5773\u5774\u5762"],["cc40","\u5768\u577D\u590C\u5945\u59B5\u59BA\u59CF\u59CE\u59B2\u59CC\u59C1\u59B6\u59BC\u59C3\u59D6\u59B1\u59BD\u59C0\u59C8\u59B4\u59C7\u5B62\u5B65\u5B93\u5B95\u5C44\u5C47\u5CAE\u5CA4\u5CA0\u5CB5\u5CAF\u5CA8\u5CAC\u5C9F\u5CA3\u5CAD\u5CA2\u5CAA\u5CA7\u5C9D\u5CA5\u5CB6\u5CB0\u5CA6\u5E17\u5E14\u5E19\u5F28\u5F22\u5F23\u5F24\u5F54\u5F82\u5F7E\u5F7D\u5FDE\u5FE5\u602D\u6026\u6019\u6032\u600B"],["cca1","\u6034\u600A\u6017\u6033\u601A\u601E\u602C\u6022\u600D\u6010\u602E\u6013\u6011\u600C\u6009\u601C\u6214\u623D\u62AD\u62B4\u62D1\u62BE\u62AA\u62B6\u62CA\u62AE\u62B3\u62AF\u62BB\u62A9\u62B0\u62B8\u653D\u65A8\u65BB\u6609\u65FC\u6604\u6612\u6608\u65FB\u6603\u660B\u660D\u6605\u65FD\u6611\u6610\u66F6\u670A\u6785\u676C\u678E\u6792\u6776\u677B\u6798\u6786\u6784\u6774\u678D\u678C\u677A\u679F\u6791\u6799\u6783\u677D\u6781\u6778\u6779\u6794\u6B25\u6B80\u6B7E\u6BDE\u6C1D\u6C93\u6CEC\u6CEB\u6CEE\u6CD9\u6CB6\u6CD4\u6CAD\u6CE7\u6CB7\u6CD0\u6CC2\u6CBA\u6CC3\u6CC6\u6CED\u6CF2"],["cd40","\u6CD2\u6CDD\u6CB4\u6C8A\u6C9D\u6C80\u6CDE\u6CC0\u6D30\u6CCD\u6CC7\u6CB0\u6CF9\u6CCF\u6CE9\u6CD1\u7094\u7098\u7085\u7093\u7086\u7084\u7091\u7096\u7082\u709A\u7083\u726A\u72D6\u72CB\u72D8\u72C9\u72DC\u72D2\u72D4\u72DA\u72CC\u72D1\u73A4\u73A1\u73AD\u73A6\u73A2\u73A0\u73AC\u739D\u74DD\u74E8\u753F\u7540\u753E\u758C\u7598\u76AF\u76F3\u76F1\u76F0\u76F5\u77F8\u77FC\u77F9\u77FB\u77FA"],["cda1","\u77F7\u7942\u793F\u79C5\u7A78\u7A7B\u7AFB\u7C75\u7CFD\u8035\u808F\u80AE\u80A3\u80B8\u80B5\u80AD\u8220\u82A0\u82C0\u82AB\u829A\u8298\u829B\u82B5\u82A7\u82AE\u82BC\u829E\u82BA\u82B4\u82A8\u82A1\u82A9\u82C2\u82A4\u82C3\u82B6\u82A2\u8670\u866F\u866D\u866E\u8C56\u8FD2\u8FCB\u8FD3\u8FCD\u8FD6\u8FD5\u8FD7\u90B2\u90B4\u90AF\u90B3\u90B0\u9639\u963D\u963C\u963A\u9643\u4FCD\u4FC5\u4FD3\u4FB2\u4FC9\u4FCB\u4FC1\u4FD4\u4FDC\u4FD9\u4FBB\u4FB3\u4FDB\u4FC7\u4FD6\u4FBA\u4FC0\u4FB9\u4FEC\u5244\u5249\u52C0\u52C2\u533D\u537C\u5397\u5396\u5399\u5398\u54BA\u54A1\u54AD\u54A5\u54CF"],["ce40","\u54C3\u830D\u54B7\u54AE\u54D6\u54B6\u54C5\u54C6\u54A0\u5470\u54BC\u54A2\u54BE\u5472\u54DE\u54B0\u57B5\u579E\u579F\u57A4\u578C\u5797\u579D\u579B\u5794\u5798\u578F\u5799\u57A5\u579A\u5795\u58F4\u590D\u5953\u59E1\u59DE\u59EE\u5A00\u59F1\u59DD\u59FA\u59FD\u59FC\u59F6\u59E4\u59F2\u59F7\u59DB\u59E9\u59F3\u59F5\u59E0\u59FE\u59F4\u59ED\u5BA8\u5C4C\u5CD0\u5CD8\u5CCC\u5CD7\u5CCB\u5CDB"],["cea1","\u5CDE\u5CDA\u5CC9\u5CC7\u5CCA\u5CD6\u5CD3\u5CD4\u5CCF\u5CC8\u5CC6\u5CCE\u5CDF\u5CF8\u5DF9\u5E21\u5E22\u5E23\u5E20\u5E24\u5EB0\u5EA4\u5EA2\u5E9B\u5EA3\u5EA5\u5F07\u5F2E\u5F56\u5F86\u6037\u6039\u6054\u6072\u605E\u6045\u6053\u6047\u6049\u605B\u604C\u6040\u6042\u605F\u6024\u6044\u6058\u6066\u606E\u6242\u6243\u62CF\u630D\u630B\u62F5\u630E\u6303\u62EB\u62F9\u630F\u630C\u62F8\u62F6\u6300\u6313\u6314\u62FA\u6315\u62FB\u62F0\u6541\u6543\u65AA\u65BF\u6636\u6621\u6632\u6635\u661C\u6626\u6622\u6633\u662B\u663A\u661D\u6634\u6639\u662E\u670F\u6710\u67C1\u67F2\u67C8\u67BA"],["cf40","\u67DC\u67BB\u67F8\u67D8\u67C0\u67B7\u67C5\u67EB\u67E4\u67DF\u67B5\u67CD\u67B3\u67F7\u67F6\u67EE\u67E3\u67C2\u67B9\u67CE\u67E7\u67F0\u67B2\u67FC\u67C6\u67ED\u67CC\u67AE\u67E6\u67DB\u67FA\u67C9\u67CA\u67C3\u67EA\u67CB\u6B28\u6B82\u6B84\u6BB6\u6BD6\u6BD8\u6BE0\u6C20\u6C21\u6D28\u6D34\u6D2D\u6D1F\u6D3C\u6D3F\u6D12\u6D0A\u6CDA\u6D33\u6D04\u6D19\u6D3A\u6D1A\u6D11\u6D00\u6D1D\u6D42"],["cfa1","\u6D01\u6D18\u6D37\u6D03\u6D0F\u6D40\u6D07\u6D20\u6D2C\u6D08\u6D22\u6D09\u6D10\u70B7\u709F\u70BE\u70B1\u70B0\u70A1\u70B4\u70B5\u70A9\u7241\u7249\u724A\u726C\u7270\u7273\u726E\u72CA\u72E4\u72E8\u72EB\u72DF\u72EA\u72E6\u72E3\u7385\u73CC\u73C2\u73C8\u73C5\u73B9\u73B6\u73B5\u73B4\u73EB\u73BF\u73C7\u73BE\u73C3\u73C6\u73B8\u73CB\u74EC\u74EE\u752E\u7547\u7548\u75A7\u75AA\u7679\u76C4\u7708\u7703\u7704\u7705\u770A\u76F7\u76FB\u76FA\u77E7\u77E8\u7806\u7811\u7812\u7805\u7810\u780F\u780E\u7809\u7803\u7813\u794A\u794C\u794B\u7945\u7944\u79D5\u79CD\u79CF\u79D6\u79CE\u7A80"],["d040","\u7A7E\u7AD1\u7B00\u7B01\u7C7A\u7C78\u7C79\u7C7F\u7C80\u7C81\u7D03\u7D08\u7D01\u7F58\u7F91\u7F8D\u7FBE\u8007\u800E\u800F\u8014\u8037\u80D8\u80C7\u80E0\u80D1\u80C8\u80C2\u80D0\u80C5\u80E3\u80D9\u80DC\u80CA\u80D5\u80C9\u80CF\u80D7\u80E6\u80CD\u81FF\u8221\u8294\u82D9\u82FE\u82F9\u8307\u82E8\u8300\u82D5\u833A\u82EB\u82D6\u82F4\u82EC\u82E1\u82F2\u82F5\u830C\u82FB\u82F6\u82F0\u82EA"],["d0a1","\u82E4\u82E0\u82FA\u82F3\u82ED\u8677\u8674\u867C\u8673\u8841\u884E\u8867\u886A\u8869\u89D3\u8A04\u8A07\u8D72\u8FE3\u8FE1\u8FEE\u8FE0\u90F1\u90BD\u90BF\u90D5\u90C5\u90BE\u90C7\u90CB\u90C8\u91D4\u91D3\u9654\u964F\u9651\u9653\u964A\u964E\u501E\u5005\u5007\u5013\u5022\u5030\u501B\u4FF5\u4FF4\u5033\u5037\u502C\u4FF6\u4FF7\u5017\u501C\u5020\u5027\u5035\u502F\u5031\u500E\u515A\u5194\u5193\u51CA\u51C4\u51C5\u51C8\u51CE\u5261\u525A\u5252\u525E\u525F\u5255\u5262\u52CD\u530E\u539E\u5526\u54E2\u5517\u5512\u54E7\u54F3\u54E4\u551A\u54FF\u5504\u5508\u54EB\u5511\u5505\u54F1"],["d140","\u550A\u54FB\u54F7\u54F8\u54E0\u550E\u5503\u550B\u5701\u5702\u57CC\u5832\u57D5\u57D2\u57BA\u57C6\u57BD\u57BC\u57B8\u57B6\u57BF\u57C7\u57D0\u57B9\u57C1\u590E\u594A\u5A19\u5A16\u5A2D\u5A2E\u5A15\u5A0F\u5A17\u5A0A\u5A1E\u5A33\u5B6C\u5BA7\u5BAD\u5BAC\u5C03\u5C56\u5C54\u5CEC\u5CFF\u5CEE\u5CF1\u5CF7\u5D00\u5CF9\u5E29\u5E28\u5EA8\u5EAE\u5EAA\u5EAC\u5F33\u5F30\u5F67\u605D\u605A\u6067"],["d1a1","\u6041\u60A2\u6088\u6080\u6092\u6081\u609D\u6083\u6095\u609B\u6097\u6087\u609C\u608E\u6219\u6246\u62F2\u6310\u6356\u632C\u6344\u6345\u6336\u6343\u63E4\u6339\u634B\u634A\u633C\u6329\u6341\u6334\u6358\u6354\u6359\u632D\u6347\u6333\u635A\u6351\u6338\u6357\u6340\u6348\u654A\u6546\u65C6\u65C3\u65C4\u65C2\u664A\u665F\u6647\u6651\u6712\u6713\u681F\u681A\u6849\u6832\u6833\u683B\u684B\u684F\u6816\u6831\u681C\u6835\u682B\u682D\u682F\u684E\u6844\u6834\u681D\u6812\u6814\u6826\u6828\u682E\u684D\u683A\u6825\u6820\u6B2C\u6B2F\u6B2D\u6B31\u6B34\u6B6D\u8082\u6B88\u6BE6\u6BE4"],["d240","\u6BE8\u6BE3\u6BE2\u6BE7\u6C25\u6D7A\u6D63\u6D64\u6D76\u6D0D\u6D61\u6D92\u6D58\u6D62\u6D6D\u6D6F\u6D91\u6D8D\u6DEF\u6D7F\u6D86\u6D5E\u6D67\u6D60\u6D97\u6D70\u6D7C\u6D5F\u6D82\u6D98\u6D2F\u6D68\u6D8B\u6D7E\u6D80\u6D84\u6D16\u6D83\u6D7B\u6D7D\u6D75\u6D90\u70DC\u70D3\u70D1\u70DD\u70CB\u7F39\u70E2\u70D7\u70D2\u70DE\u70E0\u70D4\u70CD\u70C5\u70C6\u70C7\u70DA\u70CE\u70E1\u7242\u7278"],["d2a1","\u7277\u7276\u7300\u72FA\u72F4\u72FE\u72F6\u72F3\u72FB\u7301\u73D3\u73D9\u73E5\u73D6\u73BC\u73E7\u73E3\u73E9\u73DC\u73D2\u73DB\u73D4\u73DD\u73DA\u73D7\u73D8\u73E8\u74DE\u74DF\u74F4\u74F5\u7521\u755B\u755F\u75B0\u75C1\u75BB\u75C4\u75C0\u75BF\u75B6\u75BA\u768A\u76C9\u771D\u771B\u7710\u7713\u7712\u7723\u7711\u7715\u7719\u771A\u7722\u7727\u7823\u782C\u7822\u7835\u782F\u7828\u782E\u782B\u7821\u7829\u7833\u782A\u7831\u7954\u795B\u794F\u795C\u7953\u7952\u7951\u79EB\u79EC\u79E0\u79EE\u79ED\u79EA\u79DC\u79DE\u79DD\u7A86\u7A89\u7A85\u7A8B\u7A8C\u7A8A\u7A87\u7AD8\u7B10"],["d340","\u7B04\u7B13\u7B05\u7B0F\u7B08\u7B0A\u7B0E\u7B09\u7B12\u7C84\u7C91\u7C8A\u7C8C\u7C88\u7C8D\u7C85\u7D1E\u7D1D\u7D11\u7D0E\u7D18\u7D16\u7D13\u7D1F\u7D12\u7D0F\u7D0C\u7F5C\u7F61\u7F5E\u7F60\u7F5D\u7F5B\u7F96\u7F92\u7FC3\u7FC2\u7FC0\u8016\u803E\u8039\u80FA\u80F2\u80F9\u80F5\u8101\u80FB\u8100\u8201\u822F\u8225\u8333\u832D\u8344\u8319\u8351\u8325\u8356\u833F\u8341\u8326\u831C\u8322"],["d3a1","\u8342\u834E\u831B\u832A\u8308\u833C\u834D\u8316\u8324\u8320\u8337\u832F\u8329\u8347\u8345\u834C\u8353\u831E\u832C\u834B\u8327\u8348\u8653\u8652\u86A2\u86A8\u8696\u868D\u8691\u869E\u8687\u8697\u8686\u868B\u869A\u8685\u86A5\u8699\u86A1\u86A7\u8695\u8698\u868E\u869D\u8690\u8694\u8843\u8844\u886D\u8875\u8876\u8872\u8880\u8871\u887F\u886F\u8883\u887E\u8874\u887C\u8A12\u8C47\u8C57\u8C7B\u8CA4\u8CA3\u8D76\u8D78\u8DB5\u8DB7\u8DB6\u8ED1\u8ED3\u8FFE\u8FF5\u9002\u8FFF\u8FFB\u9004\u8FFC\u8FF6\u90D6\u90E0\u90D9\u90DA\u90E3\u90DF\u90E5\u90D8\u90DB\u90D7\u90DC\u90E4\u9150"],["d440","\u914E\u914F\u91D5\u91E2\u91DA\u965C\u965F\u96BC\u98E3\u9ADF\u9B2F\u4E7F\u5070\u506A\u5061\u505E\u5060\u5053\u504B\u505D\u5072\u5048\u504D\u5041\u505B\u504A\u5062\u5015\u5045\u505F\u5069\u506B\u5063\u5064\u5046\u5040\u506E\u5073\u5057\u5051\u51D0\u526B\u526D\u526C\u526E\u52D6\u52D3\u532D\u539C\u5575\u5576\u553C\u554D\u5550\u5534\u552A\u5551\u5562\u5536\u5535\u5530\u5552\u5545"],["d4a1","\u550C\u5532\u5565\u554E\u5539\u5548\u552D\u553B\u5540\u554B\u570A\u5707\u57FB\u5814\u57E2\u57F6\u57DC\u57F4\u5800\u57ED\u57FD\u5808\u57F8\u580B\u57F3\u57CF\u5807\u57EE\u57E3\u57F2\u57E5\u57EC\u57E1\u580E\u57FC\u5810\u57E7\u5801\u580C\u57F1\u57E9\u57F0\u580D\u5804\u595C\u5A60\u5A58\u5A55\u5A67\u5A5E\u5A38\u5A35\u5A6D\u5A50\u5A5F\u5A65\u5A6C\u5A53\u5A64\u5A57\u5A43\u5A5D\u5A52\u5A44\u5A5B\u5A48\u5A8E\u5A3E\u5A4D\u5A39\u5A4C\u5A70\u5A69\u5A47\u5A51\u5A56\u5A42\u5A5C\u5B72\u5B6E\u5BC1\u5BC0\u5C59\u5D1E\u5D0B\u5D1D\u5D1A\u5D20\u5D0C\u5D28\u5D0D\u5D26\u5D25\u5D0F"],["d540","\u5D30\u5D12\u5D23\u5D1F\u5D2E\u5E3E\u5E34\u5EB1\u5EB4\u5EB9\u5EB2\u5EB3\u5F36\u5F38\u5F9B\u5F96\u5F9F\u608A\u6090\u6086\u60BE\u60B0\u60BA\u60D3\u60D4\u60CF\u60E4\u60D9\u60DD\u60C8\u60B1\u60DB\u60B7\u60CA\u60BF\u60C3\u60CD\u60C0\u6332\u6365\u638A\u6382\u637D\u63BD\u639E\u63AD\u639D\u6397\u63AB\u638E\u636F\u6387\u6390\u636E\u63AF\u6375\u639C\u636D\u63AE\u637C\u63A4\u633B\u639F"],["d5a1","\u6378\u6385\u6381\u6391\u638D\u6370\u6553\u65CD\u6665\u6661\u665B\u6659\u665C\u6662\u6718\u6879\u6887\u6890\u689C\u686D\u686E\u68AE\u68AB\u6956\u686F\u68A3\u68AC\u68A9\u6875\u6874\u68B2\u688F\u6877\u6892\u687C\u686B\u6872\u68AA\u6880\u6871\u687E\u689B\u6896\u688B\u68A0\u6889\u68A4\u6878\u687B\u6891\u688C\u688A\u687D\u6B36\u6B33\u6B37\u6B38\u6B91\u6B8F\u6B8D\u6B8E\u6B8C\u6C2A\u6DC0\u6DAB\u6DB4\u6DB3\u6E74\u6DAC\u6DE9\u6DE2\u6DB7\u6DF6\u6DD4\u6E00\u6DC8\u6DE0\u6DDF\u6DD6\u6DBE\u6DE5\u6DDC\u6DDD\u6DDB\u6DF4\u6DCA\u6DBD\u6DED\u6DF0\u6DBA\u6DD5\u6DC2\u6DCF\u6DC9"],["d640","\u6DD0\u6DF2\u6DD3\u6DFD\u6DD7\u6DCD\u6DE3\u6DBB\u70FA\u710D\u70F7\u7117\u70F4\u710C\u70F0\u7104\u70F3\u7110\u70FC\u70FF\u7106\u7113\u7100\u70F8\u70F6\u710B\u7102\u710E\u727E\u727B\u727C\u727F\u731D\u7317\u7307\u7311\u7318\u730A\u7308\u72FF\u730F\u731E\u7388\u73F6\u73F8\u73F5\u7404\u7401\u73FD\u7407\u7400\u73FA\u73FC\u73FF\u740C\u740B\u73F4\u7408\u7564\u7563\u75CE\u75D2\u75CF"],["d6a1","\u75CB\u75CC\u75D1\u75D0\u768F\u7689\u76D3\u7739\u772F\u772D\u7731\u7732\u7734\u7733\u773D\u7725\u773B\u7735\u7848\u7852\u7849\u784D\u784A\u784C\u7826\u7845\u7850\u7964\u7967\u7969\u796A\u7963\u796B\u7961\u79BB\u79FA\u79F8\u79F6\u79F7\u7A8F\u7A94\u7A90\u7B35\u7B47\u7B34\u7B25\u7B30\u7B22\u7B24\u7B33\u7B18\u7B2A\u7B1D\u7B31\u7B2B\u7B2D\u7B2F\u7B32\u7B38\u7B1A\u7B23\u7C94\u7C98\u7C96\u7CA3\u7D35\u7D3D\u7D38\u7D36\u7D3A\u7D45\u7D2C\u7D29\u7D41\u7D47\u7D3E\u7D3F\u7D4A\u7D3B\u7D28\u7F63\u7F95\u7F9C\u7F9D\u7F9B\u7FCA\u7FCB\u7FCD\u7FD0\u7FD1\u7FC7\u7FCF\u7FC9\u801F"],["d740","\u801E\u801B\u8047\u8043\u8048\u8118\u8125\u8119\u811B\u812D\u811F\u812C\u811E\u8121\u8115\u8127\u811D\u8122\u8211\u8238\u8233\u823A\u8234\u8232\u8274\u8390\u83A3\u83A8\u838D\u837A\u8373\u83A4\u8374\u838F\u8381\u8395\u8399\u8375\u8394\u83A9\u837D\u8383\u838C\u839D\u839B\u83AA\u838B\u837E\u83A5\u83AF\u8388\u8397\u83B0\u837F\u83A6\u8387\u83AE\u8376\u839A\u8659\u8656\u86BF\u86B7"],["d7a1","\u86C2\u86C1\u86C5\u86BA\u86B0\u86C8\u86B9\u86B3\u86B8\u86CC\u86B4\u86BB\u86BC\u86C3\u86BD\u86BE\u8852\u8889\u8895\u88A8\u88A2\u88AA\u889A\u8891\u88A1\u889F\u8898\u88A7\u8899\u889B\u8897\u88A4\u88AC\u888C\u8893\u888E\u8982\u89D6\u89D9\u89D5\u8A30\u8A27\u8A2C\u8A1E\u8C39\u8C3B\u8C5C\u8C5D\u8C7D\u8CA5\u8D7D\u8D7B\u8D79\u8DBC\u8DC2\u8DB9\u8DBF\u8DC1\u8ED8\u8EDE\u8EDD\u8EDC\u8ED7\u8EE0\u8EE1\u9024\u900B\u9011\u901C\u900C\u9021\u90EF\u90EA\u90F0\u90F4\u90F2\u90F3\u90D4\u90EB\u90EC\u90E9\u9156\u9158\u915A\u9153\u9155\u91EC\u91F4\u91F1\u91F3\u91F8\u91E4\u91F9\u91EA"],["d840","\u91EB\u91F7\u91E8\u91EE\u957A\u9586\u9588\u967C\u966D\u966B\u9671\u966F\u96BF\u976A\u9804\u98E5\u9997\u509B\u5095\u5094\u509E\u508B\u50A3\u5083\u508C\u508E\u509D\u5068\u509C\u5092\u5082\u5087\u515F\u51D4\u5312\u5311\u53A4\u53A7\u5591\u55A8\u55A5\u55AD\u5577\u5645\u55A2\u5593\u5588\u558F\u55B5\u5581\u55A3\u5592\u55A4\u557D\u558C\u55A6\u557F\u5595\u55A1\u558E\u570C\u5829\u5837"],["d8a1","\u5819\u581E\u5827\u5823\u5828\u57F5\u5848\u5825\u581C\u581B\u5833\u583F\u5836\u582E\u5839\u5838\u582D\u582C\u583B\u5961\u5AAF\u5A94\u5A9F\u5A7A\u5AA2\u5A9E\u5A78\u5AA6\u5A7C\u5AA5\u5AAC\u5A95\u5AAE\u5A37\u5A84\u5A8A\u5A97\u5A83\u5A8B\u5AA9\u5A7B\u5A7D\u5A8C\u5A9C\u5A8F\u5A93\u5A9D\u5BEA\u5BCD\u5BCB\u5BD4\u5BD1\u5BCA\u5BCE\u5C0C\u5C30\u5D37\u5D43\u5D6B\u5D41\u5D4B\u5D3F\u5D35\u5D51\u5D4E\u5D55\u5D33\u5D3A\u5D52\u5D3D\u5D31\u5D59\u5D42\u5D39\u5D49\u5D38\u5D3C\u5D32\u5D36\u5D40\u5D45\u5E44\u5E41\u5F58\u5FA6\u5FA5\u5FAB\u60C9\u60B9\u60CC\u60E2\u60CE\u60C4\u6114"],["d940","\u60F2\u610A\u6116\u6105\u60F5\u6113\u60F8\u60FC\u60FE\u60C1\u6103\u6118\u611D\u6110\u60FF\u6104\u610B\u624A\u6394\u63B1\u63B0\u63CE\u63E5\u63E8\u63EF\u63C3\u649D\u63F3\u63CA\u63E0\u63F6\u63D5\u63F2\u63F5\u6461\u63DF\u63BE\u63DD\u63DC\u63C4\u63D8\u63D3\u63C2\u63C7\u63CC\u63CB\u63C8\u63F0\u63D7\u63D9\u6532\u6567\u656A\u6564\u655C\u6568\u6565\u658C\u659D\u659E\u65AE\u65D0\u65D2"],["d9a1","\u667C\u666C\u667B\u6680\u6671\u6679\u666A\u6672\u6701\u690C\u68D3\u6904\u68DC\u692A\u68EC\u68EA\u68F1\u690F\u68D6\u68F7\u68EB\u68E4\u68F6\u6913\u6910\u68F3\u68E1\u6907\u68CC\u6908\u6970\u68B4\u6911\u68EF\u68C6\u6914\u68F8\u68D0\u68FD\u68FC\u68E8\u690B\u690A\u6917\u68CE\u68C8\u68DD\u68DE\u68E6\u68F4\u68D1\u6906\u68D4\u68E9\u6915\u6925\u68C7\u6B39\u6B3B\u6B3F\u6B3C\u6B94\u6B97\u6B99\u6B95\u6BBD\u6BF0\u6BF2\u6BF3\u6C30\u6DFC\u6E46\u6E47\u6E1F\u6E49\u6E88\u6E3C\u6E3D\u6E45\u6E62\u6E2B\u6E3F\u6E41\u6E5D\u6E73\u6E1C\u6E33\u6E4B\u6E40\u6E51\u6E3B\u6E03\u6E2E\u6E5E"],["da40","\u6E68\u6E5C\u6E61\u6E31\u6E28\u6E60\u6E71\u6E6B\u6E39\u6E22\u6E30\u6E53\u6E65\u6E27\u6E78\u6E64\u6E77\u6E55\u6E79\u6E52\u6E66\u6E35\u6E36\u6E5A\u7120\u711E\u712F\u70FB\u712E\u7131\u7123\u7125\u7122\u7132\u711F\u7128\u713A\u711B\u724B\u725A\u7288\u7289\u7286\u7285\u728B\u7312\u730B\u7330\u7322\u7331\u7333\u7327\u7332\u732D\u7326\u7323\u7335\u730C\u742E\u742C\u7430\u742B\u7416"],["daa1","\u741A\u7421\u742D\u7431\u7424\u7423\u741D\u7429\u7420\u7432\u74FB\u752F\u756F\u756C\u75E7\u75DA\u75E1\u75E6\u75DD\u75DF\u75E4\u75D7\u7695\u7692\u76DA\u7746\u7747\u7744\u774D\u7745\u774A\u774E\u774B\u774C\u77DE\u77EC\u7860\u7864\u7865\u785C\u786D\u7871\u786A\u786E\u7870\u7869\u7868\u785E\u7862\u7974\u7973\u7972\u7970\u7A02\u7A0A\u7A03\u7A0C\u7A04\u7A99\u7AE6\u7AE4\u7B4A\u7B3B\u7B44\u7B48\u7B4C\u7B4E\u7B40\u7B58\u7B45\u7CA2\u7C9E\u7CA8\u7CA1\u7D58\u7D6F\u7D63\u7D53\u7D56\u7D67\u7D6A\u7D4F\u7D6D\u7D5C\u7D6B\u7D52\u7D54\u7D69\u7D51\u7D5F\u7D4E\u7F3E\u7F3F\u7F65"],["db40","\u7F66\u7FA2\u7FA0\u7FA1\u7FD7\u8051\u804F\u8050\u80FE\u80D4\u8143\u814A\u8152\u814F\u8147\u813D\u814D\u813A\u81E6\u81EE\u81F7\u81F8\u81F9\u8204\u823C\u823D\u823F\u8275\u833B\u83CF\u83F9\u8423\u83C0\u83E8\u8412\u83E7\u83E4\u83FC\u83F6\u8410\u83C6\u83C8\u83EB\u83E3\u83BF\u8401\u83DD\u83E5\u83D8\u83FF\u83E1\u83CB\u83CE\u83D6\u83F5\u83C9\u8409\u840F\u83DE\u8411\u8406\u83C2\u83F3"],["dba1","\u83D5\u83FA\u83C7\u83D1\u83EA\u8413\u83C3\u83EC\u83EE\u83C4\u83FB\u83D7\u83E2\u841B\u83DB\u83FE\u86D8\u86E2\u86E6\u86D3\u86E3\u86DA\u86EA\u86DD\u86EB\u86DC\u86EC\u86E9\u86D7\u86E8\u86D1\u8848\u8856\u8855\u88BA\u88D7\u88B9\u88B8\u88C0\u88BE\u88B6\u88BC\u88B7\u88BD\u88B2\u8901\u88C9\u8995\u8998\u8997\u89DD\u89DA\u89DB\u8A4E\u8A4D\u8A39\u8A59\u8A40\u8A57\u8A58\u8A44\u8A45\u8A52\u8A48\u8A51\u8A4A\u8A4C\u8A4F\u8C5F\u8C81\u8C80\u8CBA\u8CBE\u8CB0\u8CB9\u8CB5\u8D84\u8D80\u8D89\u8DD8\u8DD3\u8DCD\u8DC7\u8DD6\u8DDC\u8DCF\u8DD5\u8DD9\u8DC8\u8DD7\u8DC5\u8EEF\u8EF7\u8EFA"],["dc40","\u8EF9\u8EE6\u8EEE\u8EE5\u8EF5\u8EE7\u8EE8\u8EF6\u8EEB\u8EF1\u8EEC\u8EF4\u8EE9\u902D\u9034\u902F\u9106\u912C\u9104\u90FF\u90FC\u9108\u90F9\u90FB\u9101\u9100\u9107\u9105\u9103\u9161\u9164\u915F\u9162\u9160\u9201\u920A\u9225\u9203\u921A\u9226\u920F\u920C\u9200\u9212\u91FF\u91FD\u9206\u9204\u9227\u9202\u921C\u9224\u9219\u9217\u9205\u9216\u957B\u958D\u958C\u9590\u9687\u967E\u9688"],["dca1","\u9689\u9683\u9680\u96C2\u96C8\u96C3\u96F1\u96F0\u976C\u9770\u976E\u9807\u98A9\u98EB\u9CE6\u9EF9\u4E83\u4E84\u4EB6\u50BD\u50BF\u50C6\u50AE\u50C4\u50CA\u50B4\u50C8\u50C2\u50B0\u50C1\u50BA\u50B1\u50CB\u50C9\u50B6\u50B8\u51D7\u527A\u5278\u527B\u527C\u55C3\u55DB\u55CC\u55D0\u55CB\u55CA\u55DD\u55C0\u55D4\u55C4\u55E9\u55BF\u55D2\u558D\u55CF\u55D5\u55E2\u55D6\u55C8\u55F2\u55CD\u55D9\u55C2\u5714\u5853\u5868\u5864\u584F\u584D\u5849\u586F\u5855\u584E\u585D\u5859\u5865\u585B\u583D\u5863\u5871\u58FC\u5AC7\u5AC4\u5ACB\u5ABA\u5AB8\u5AB1\u5AB5\u5AB0\u5ABF\u5AC8\u5ABB\u5AC6"],["dd40","\u5AB7\u5AC0\u5ACA\u5AB4\u5AB6\u5ACD\u5AB9\u5A90\u5BD6\u5BD8\u5BD9\u5C1F\u5C33\u5D71\u5D63\u5D4A\u5D65\u5D72\u5D6C\u5D5E\u5D68\u5D67\u5D62\u5DF0\u5E4F\u5E4E\u5E4A\u5E4D\u5E4B\u5EC5\u5ECC\u5EC6\u5ECB\u5EC7\u5F40\u5FAF\u5FAD\u60F7\u6149\u614A\u612B\u6145\u6136\u6132\u612E\u6146\u612F\u614F\u6129\u6140\u6220\u9168\u6223\u6225\u6224\u63C5\u63F1\u63EB\u6410\u6412\u6409\u6420\u6424"],["dda1","\u6433\u6443\u641F\u6415\u6418\u6439\u6437\u6422\u6423\u640C\u6426\u6430\u6428\u6441\u6435\u642F\u640A\u641A\u6440\u6425\u6427\u640B\u63E7\u641B\u642E\u6421\u640E\u656F\u6592\u65D3\u6686\u668C\u6695\u6690\u668B\u668A\u6699\u6694\u6678\u6720\u6966\u695F\u6938\u694E\u6962\u6971\u693F\u6945\u696A\u6939\u6942\u6957\u6959\u697A\u6948\u6949\u6935\u696C\u6933\u693D\u6965\u68F0\u6978\u6934\u6969\u6940\u696F\u6944\u6976\u6958\u6941\u6974\u694C\u693B\u694B\u6937\u695C\u694F\u6951\u6932\u6952\u692F\u697B\u693C\u6B46\u6B45\u6B43\u6B42\u6B48\u6B41\u6B9B\uFA0D\u6BFB\u6BFC"],["de40","\u6BF9\u6BF7\u6BF8\u6E9B\u6ED6\u6EC8\u6E8F\u6EC0\u6E9F\u6E93\u6E94\u6EA0\u6EB1\u6EB9\u6EC6\u6ED2\u6EBD\u6EC1\u6E9E\u6EC9\u6EB7\u6EB0\u6ECD\u6EA6\u6ECF\u6EB2\u6EBE\u6EC3\u6EDC\u6ED8\u6E99\u6E92\u6E8E\u6E8D\u6EA4\u6EA1\u6EBF\u6EB3\u6ED0\u6ECA\u6E97\u6EAE\u6EA3\u7147\u7154\u7152\u7163\u7160\u7141\u715D\u7162\u7172\u7178\u716A\u7161\u7142\u7158\u7143\u714B\u7170\u715F\u7150\u7153"],["dea1","\u7144\u714D\u715A\u724F\u728D\u728C\u7291\u7290\u728E\u733C\u7342\u733B\u733A\u7340\u734A\u7349\u7444\u744A\u744B\u7452\u7451\u7457\u7440\u744F\u7450\u744E\u7442\u7446\u744D\u7454\u74E1\u74FF\u74FE\u74FD\u751D\u7579\u7577\u6983\u75EF\u760F\u7603\u75F7\u75FE\u75FC\u75F9\u75F8\u7610\u75FB\u75F6\u75ED\u75F5\u75FD\u7699\u76B5\u76DD\u7755\u775F\u7760\u7752\u7756\u775A\u7769\u7767\u7754\u7759\u776D\u77E0\u7887\u789A\u7894\u788F\u7884\u7895\u7885\u7886\u78A1\u7883\u7879\u7899\u7880\u7896\u787B\u797C\u7982\u797D\u7979\u7A11\u7A18\u7A19\u7A12\u7A17\u7A15\u7A22\u7A13"],["df40","\u7A1B\u7A10\u7AA3\u7AA2\u7A9E\u7AEB\u7B66\u7B64\u7B6D\u7B74\u7B69\u7B72\u7B65\u7B73\u7B71\u7B70\u7B61\u7B78\u7B76\u7B63\u7CB2\u7CB4\u7CAF\u7D88\u7D86\u7D80\u7D8D\u7D7F\u7D85\u7D7A\u7D8E\u7D7B\u7D83\u7D7C\u7D8C\u7D94\u7D84\u7D7D\u7D92\u7F6D\u7F6B\u7F67\u7F68\u7F6C\u7FA6\u7FA5\u7FA7\u7FDB\u7FDC\u8021\u8164\u8160\u8177\u815C\u8169\u815B\u8162\u8172\u6721\u815E\u8176\u8167\u816F"],["dfa1","\u8144\u8161\u821D\u8249\u8244\u8240\u8242\u8245\u84F1\u843F\u8456\u8476\u8479\u848F\u848D\u8465\u8451\u8440\u8486\u8467\u8430\u844D\u847D\u845A\u8459\u8474\u8473\u845D\u8507\u845E\u8437\u843A\u8434\u847A\u8443\u8478\u8432\u8445\u8429\u83D9\u844B\u842F\u8442\u842D\u845F\u8470\u8439\u844E\u844C\u8452\u846F\u84C5\u848E\u843B\u8447\u8436\u8433\u8468\u847E\u8444\u842B\u8460\u8454\u846E\u8450\u870B\u8704\u86F7\u870C\u86FA\u86D6\u86F5\u874D\u86F8\u870E\u8709\u8701\u86F6\u870D\u8705\u88D6\u88CB\u88CD\u88CE\u88DE\u88DB\u88DA\u88CC\u88D0\u8985\u899B\u89DF\u89E5\u89E4"],["e040","\u89E1\u89E0\u89E2\u89DC\u89E6\u8A76\u8A86\u8A7F\u8A61\u8A3F\u8A77\u8A82\u8A84\u8A75\u8A83\u8A81\u8A74\u8A7A\u8C3C\u8C4B\u8C4A\u8C65\u8C64\u8C66\u8C86\u8C84\u8C85\u8CCC\u8D68\u8D69\u8D91\u8D8C\u8D8E\u8D8F\u8D8D\u8D93\u8D94\u8D90\u8D92\u8DF0\u8DE0\u8DEC\u8DF1\u8DEE\u8DD0\u8DE9\u8DE3\u8DE2\u8DE7\u8DF2\u8DEB\u8DF4\u8F06\u8EFF\u8F01\u8F00\u8F05\u8F07\u8F08\u8F02\u8F0B\u9052\u903F"],["e0a1","\u9044\u9049\u903D\u9110\u910D\u910F\u9111\u9116\u9114\u910B\u910E\u916E\u916F\u9248\u9252\u9230\u923A\u9266\u9233\u9265\u925E\u9283\u922E\u924A\u9246\u926D\u926C\u924F\u9260\u9267\u926F\u9236\u9261\u9270\u9231\u9254\u9263\u9250\u9272\u924E\u9253\u924C\u9256\u9232\u959F\u959C\u959E\u959B\u9692\u9693\u9691\u9697\u96CE\u96FA\u96FD\u96F8\u96F5\u9773\u9777\u9778\u9772\u980F\u980D\u980E\u98AC\u98F6\u98F9\u99AF\u99B2\u99B0\u99B5\u9AAD\u9AAB\u9B5B\u9CEA\u9CED\u9CE7\u9E80\u9EFD\u50E6\u50D4\u50D7\u50E8\u50F3\u50DB\u50EA\u50DD\u50E4\u50D3\u50EC\u50F0\u50EF\u50E3\u50E0"],["e140","\u51D8\u5280\u5281\u52E9\u52EB\u5330\u53AC\u5627\u5615\u560C\u5612\u55FC\u560F\u561C\u5601\u5613\u5602\u55FA\u561D\u5604\u55FF\u55F9\u5889\u587C\u5890\u5898\u5886\u5881\u587F\u5874\u588B\u587A\u5887\u5891\u588E\u5876\u5882\u5888\u587B\u5894\u588F\u58FE\u596B\u5ADC\u5AEE\u5AE5\u5AD5\u5AEA\u5ADA\u5AED\u5AEB\u5AF3\u5AE2\u5AE0\u5ADB\u5AEC\u5ADE\u5ADD\u5AD9\u5AE8\u5ADF\u5B77\u5BE0"],["e1a1","\u5BE3\u5C63\u5D82\u5D80\u5D7D\u5D86\u5D7A\u5D81\u5D77\u5D8A\u5D89\u5D88\u5D7E\u5D7C\u5D8D\u5D79\u5D7F\u5E58\u5E59\u5E53\u5ED8\u5ED1\u5ED7\u5ECE\u5EDC\u5ED5\u5ED9\u5ED2\u5ED4\u5F44\u5F43\u5F6F\u5FB6\u612C\u6128\u6141\u615E\u6171\u6173\u6152\u6153\u6172\u616C\u6180\u6174\u6154\u617A\u615B\u6165\u613B\u616A\u6161\u6156\u6229\u6227\u622B\u642B\u644D\u645B\u645D\u6474\u6476\u6472\u6473\u647D\u6475\u6466\u64A6\u644E\u6482\u645E\u645C\u644B\u6453\u6460\u6450\u647F\u643F\u646C\u646B\u6459\u6465\u6477\u6573\u65A0\u66A1\u66A0\u669F\u6705\u6704\u6722\u69B1\u69B6\u69C9"],["e240","\u69A0\u69CE\u6996\u69B0\u69AC\u69BC\u6991\u6999\u698E\u69A7\u698D\u69A9\u69BE\u69AF\u69BF\u69C4\u69BD\u69A4\u69D4\u69B9\u69CA\u699A\u69CF\u69B3\u6993\u69AA\u69A1\u699E\u69D9\u6997\u6990\u69C2\u69B5\u69A5\u69C6\u6B4A\u6B4D\u6B4B\u6B9E\u6B9F\u6BA0\u6BC3\u6BC4\u6BFE\u6ECE\u6EF5\u6EF1\u6F03\u6F25\u6EF8\u6F37\u6EFB\u6F2E\u6F09\u6F4E\u6F19\u6F1A\u6F27\u6F18\u6F3B\u6F12\u6EED\u6F0A"],["e2a1","\u6F36\u6F73\u6EF9\u6EEE\u6F2D\u6F40\u6F30\u6F3C\u6F35\u6EEB\u6F07\u6F0E\u6F43\u6F05\u6EFD\u6EF6\u6F39\u6F1C\u6EFC\u6F3A\u6F1F\u6F0D\u6F1E\u6F08\u6F21\u7187\u7190\u7189\u7180\u7185\u7182\u718F\u717B\u7186\u7181\u7197\u7244\u7253\u7297\u7295\u7293\u7343\u734D\u7351\u734C\u7462\u7473\u7471\u7475\u7472\u7467\u746E\u7500\u7502\u7503\u757D\u7590\u7616\u7608\u760C\u7615\u7611\u760A\u7614\u76B8\u7781\u777C\u7785\u7782\u776E\u7780\u776F\u777E\u7783\u78B2\u78AA\u78B4\u78AD\u78A8\u787E\u78AB\u789E\u78A5\u78A0\u78AC\u78A2\u78A4\u7998\u798A\u798B\u7996\u7995\u7994\u7993"],["e340","\u7997\u7988\u7992\u7990\u7A2B\u7A4A\u7A30\u7A2F\u7A28\u7A26\u7AA8\u7AAB\u7AAC\u7AEE\u7B88\u7B9C\u7B8A\u7B91\u7B90\u7B96\u7B8D\u7B8C\u7B9B\u7B8E\u7B85\u7B98\u5284\u7B99\u7BA4\u7B82\u7CBB\u7CBF\u7CBC\u7CBA\u7DA7\u7DB7\u7DC2\u7DA3\u7DAA\u7DC1\u7DC0\u7DC5\u7D9D\u7DCE\u7DC4\u7DC6\u7DCB\u7DCC\u7DAF\u7DB9\u7D96\u7DBC\u7D9F\u7DA6\u7DAE\u7DA9\u7DA1\u7DC9\u7F73\u7FE2\u7FE3\u7FE5\u7FDE"],["e3a1","\u8024\u805D\u805C\u8189\u8186\u8183\u8187\u818D\u818C\u818B\u8215\u8497\u84A4\u84A1\u849F\u84BA\u84CE\u84C2\u84AC\u84AE\u84AB\u84B9\u84B4\u84C1\u84CD\u84AA\u849A\u84B1\u84D0\u849D\u84A7\u84BB\u84A2\u8494\u84C7\u84CC\u849B\u84A9\u84AF\u84A8\u84D6\u8498\u84B6\u84CF\u84A0\u84D7\u84D4\u84D2\u84DB\u84B0\u8491\u8661\u8733\u8723\u8728\u876B\u8740\u872E\u871E\u8721\u8719\u871B\u8743\u872C\u8741\u873E\u8746\u8720\u8732\u872A\u872D\u873C\u8712\u873A\u8731\u8735\u8742\u8726\u8727\u8738\u8724\u871A\u8730\u8711\u88F7\u88E7\u88F1\u88F2\u88FA\u88FE\u88EE\u88FC\u88F6\u88FB"],["e440","\u88F0\u88EC\u88EB\u899D\u89A1\u899F\u899E\u89E9\u89EB\u89E8\u8AAB\u8A99\u8A8B\u8A92\u8A8F\u8A96\u8C3D\u8C68\u8C69\u8CD5\u8CCF\u8CD7\u8D96\u8E09\u8E02\u8DFF\u8E0D\u8DFD\u8E0A\u8E03\u8E07\u8E06\u8E05\u8DFE\u8E00\u8E04\u8F10\u8F11\u8F0E\u8F0D\u9123\u911C\u9120\u9122\u911F\u911D\u911A\u9124\u9121\u911B\u917A\u9172\u9179\u9173\u92A5\u92A4\u9276\u929B\u927A\u92A0\u9294\u92AA\u928D"],["e4a1","\u92A6\u929A\u92AB\u9279\u9297\u927F\u92A3\u92EE\u928E\u9282\u9295\u92A2\u927D\u9288\u92A1\u928A\u9286\u928C\u9299\u92A7\u927E\u9287\u92A9\u929D\u928B\u922D\u969E\u96A1\u96FF\u9758\u977D\u977A\u977E\u9783\u9780\u9782\u977B\u9784\u9781\u977F\u97CE\u97CD\u9816\u98AD\u98AE\u9902\u9900\u9907\u999D\u999C\u99C3\u99B9\u99BB\u99BA\u99C2\u99BD\u99C7\u9AB1\u9AE3\u9AE7\u9B3E\u9B3F\u9B60\u9B61\u9B5F\u9CF1\u9CF2\u9CF5\u9EA7\u50FF\u5103\u5130\u50F8\u5106\u5107\u50F6\u50FE\u510B\u510C\u50FD\u510A\u528B\u528C\u52F1\u52EF\u5648\u5642\u564C\u5635\u5641\u564A\u5649\u5646\u5658"],["e540","\u565A\u5640\u5633\u563D\u562C\u563E\u5638\u562A\u563A\u571A\u58AB\u589D\u58B1\u58A0\u58A3\u58AF\u58AC\u58A5\u58A1\u58FF\u5AFF\u5AF4\u5AFD\u5AF7\u5AF6\u5B03\u5AF8\u5B02\u5AF9\u5B01\u5B07\u5B05\u5B0F\u5C67\u5D99\u5D97\u5D9F\u5D92\u5DA2\u5D93\u5D95\u5DA0\u5D9C\u5DA1\u5D9A\u5D9E\u5E69\u5E5D\u5E60\u5E5C\u7DF3\u5EDB\u5EDE\u5EE1\u5F49\u5FB2\u618B\u6183\u6179\u61B1\u61B0\u61A2\u6189"],["e5a1","\u619B\u6193\u61AF\u61AD\u619F\u6192\u61AA\u61A1\u618D\u6166\u61B3\u622D\u646E\u6470\u6496\u64A0\u6485\u6497\u649C\u648F\u648B\u648A\u648C\u64A3\u649F\u6468\u64B1\u6498\u6576\u657A\u6579\u657B\u65B2\u65B3\u66B5\u66B0\u66A9\u66B2\u66B7\u66AA\u66AF\u6A00\u6A06\u6A17\u69E5\u69F8\u6A15\u69F1\u69E4\u6A20\u69FF\u69EC\u69E2\u6A1B\u6A1D\u69FE\u6A27\u69F2\u69EE\u6A14\u69F7\u69E7\u6A40\u6A08\u69E6\u69FB\u6A0D\u69FC\u69EB\u6A09\u6A04\u6A18\u6A25\u6A0F\u69F6\u6A26\u6A07\u69F4\u6A16\u6B51\u6BA5\u6BA3\u6BA2\u6BA6\u6C01\u6C00\u6BFF\u6C02\u6F41\u6F26\u6F7E\u6F87\u6FC6\u6F92"],["e640","\u6F8D\u6F89\u6F8C\u6F62\u6F4F\u6F85\u6F5A\u6F96\u6F76\u6F6C\u6F82\u6F55\u6F72\u6F52\u6F50\u6F57\u6F94\u6F93\u6F5D\u6F00\u6F61\u6F6B\u6F7D\u6F67\u6F90\u6F53\u6F8B\u6F69\u6F7F\u6F95\u6F63\u6F77\u6F6A\u6F7B\u71B2\u71AF\u719B\u71B0\u71A0\u719A\u71A9\u71B5\u719D\u71A5\u719E\u71A4\u71A1\u71AA\u719C\u71A7\u71B3\u7298\u729A\u7358\u7352\u735E\u735F\u7360\u735D\u735B\u7361\u735A\u7359"],["e6a1","\u7362\u7487\u7489\u748A\u7486\u7481\u747D\u7485\u7488\u747C\u7479\u7508\u7507\u757E\u7625\u761E\u7619\u761D\u761C\u7623\u761A\u7628\u761B\u769C\u769D\u769E\u769B\u778D\u778F\u7789\u7788\u78CD\u78BB\u78CF\u78CC\u78D1\u78CE\u78D4\u78C8\u78C3\u78C4\u78C9\u799A\u79A1\u79A0\u799C\u79A2\u799B\u6B76\u7A39\u7AB2\u7AB4\u7AB3\u7BB7\u7BCB\u7BBE\u7BAC\u7BCE\u7BAF\u7BB9\u7BCA\u7BB5\u7CC5\u7CC8\u7CCC\u7CCB\u7DF7\u7DDB\u7DEA\u7DE7\u7DD7\u7DE1\u7E03\u7DFA\u7DE6\u7DF6\u7DF1\u7DF0\u7DEE\u7DDF\u7F76\u7FAC\u7FB0\u7FAD\u7FED\u7FEB\u7FEA\u7FEC\u7FE6\u7FE8\u8064\u8067\u81A3\u819F"],["e740","\u819E\u8195\u81A2\u8199\u8197\u8216\u824F\u8253\u8252\u8250\u824E\u8251\u8524\u853B\u850F\u8500\u8529\u850E\u8509\u850D\u851F\u850A\u8527\u851C\u84FB\u852B\u84FA\u8508\u850C\u84F4\u852A\u84F2\u8515\u84F7\u84EB\u84F3\u84FC\u8512\u84EA\u84E9\u8516\u84FE\u8528\u851D\u852E\u8502\u84FD\u851E\u84F6\u8531\u8526\u84E7\u84E8\u84F0\u84EF\u84F9\u8518\u8520\u8530\u850B\u8519\u852F\u8662"],["e7a1","\u8756\u8763\u8764\u8777\u87E1\u8773\u8758\u8754\u875B\u8752\u8761\u875A\u8751\u875E\u876D\u876A\u8750\u874E\u875F\u875D\u876F\u876C\u877A\u876E\u875C\u8765\u874F\u877B\u8775\u8762\u8767\u8769\u885A\u8905\u890C\u8914\u890B\u8917\u8918\u8919\u8906\u8916\u8911\u890E\u8909\u89A2\u89A4\u89A3\u89ED\u89F0\u89EC\u8ACF\u8AC6\u8AB8\u8AD3\u8AD1\u8AD4\u8AD5\u8ABB\u8AD7\u8ABE\u8AC0\u8AC5\u8AD8\u8AC3\u8ABA\u8ABD\u8AD9\u8C3E\u8C4D\u8C8F\u8CE5\u8CDF\u8CD9\u8CE8\u8CDA\u8CDD\u8CE7\u8DA0\u8D9C\u8DA1\u8D9B\u8E20\u8E23\u8E25\u8E24\u8E2E\u8E15\u8E1B\u8E16\u8E11\u8E19\u8E26\u8E27"],["e840","\u8E14\u8E12\u8E18\u8E13\u8E1C\u8E17\u8E1A\u8F2C\u8F24\u8F18\u8F1A\u8F20\u8F23\u8F16\u8F17\u9073\u9070\u906F\u9067\u906B\u912F\u912B\u9129\u912A\u9132\u9126\u912E\u9185\u9186\u918A\u9181\u9182\u9184\u9180\u92D0\u92C3\u92C4\u92C0\u92D9\u92B6\u92CF\u92F1\u92DF\u92D8\u92E9\u92D7\u92DD\u92CC\u92EF\u92C2\u92E8\u92CA\u92C8\u92CE\u92E6\u92CD\u92D5\u92C9\u92E0\u92DE\u92E7\u92D1\u92D3"],["e8a1","\u92B5\u92E1\u92C6\u92B4\u957C\u95AC\u95AB\u95AE\u95B0\u96A4\u96A2\u96D3\u9705\u9708\u9702\u975A\u978A\u978E\u9788\u97D0\u97CF\u981E\u981D\u9826\u9829\u9828\u9820\u981B\u9827\u98B2\u9908\u98FA\u9911\u9914\u9916\u9917\u9915\u99DC\u99CD\u99CF\u99D3\u99D4\u99CE\u99C9\u99D6\u99D8\u99CB\u99D7\u99CC\u9AB3\u9AEC\u9AEB\u9AF3\u9AF2\u9AF1\u9B46\u9B43\u9B67\u9B74\u9B71\u9B66\u9B76\u9B75\u9B70\u9B68\u9B64\u9B6C\u9CFC\u9CFA\u9CFD\u9CFF\u9CF7\u9D07\u9D00\u9CF9\u9CFB\u9D08\u9D05\u9D04\u9E83\u9ED3\u9F0F\u9F10\u511C\u5113\u5117\u511A\u5111\u51DE\u5334\u53E1\u5670\u5660\u566E"],["e940","\u5673\u5666\u5663\u566D\u5672\u565E\u5677\u571C\u571B\u58C8\u58BD\u58C9\u58BF\u58BA\u58C2\u58BC\u58C6\u5B17\u5B19\u5B1B\u5B21\u5B14\u5B13\u5B10\u5B16\u5B28\u5B1A\u5B20\u5B1E\u5BEF\u5DAC\u5DB1\u5DA9\u5DA7\u5DB5\u5DB0\u5DAE\u5DAA\u5DA8\u5DB2\u5DAD\u5DAF\u5DB4\u5E67\u5E68\u5E66\u5E6F\u5EE9\u5EE7\u5EE6\u5EE8\u5EE5\u5F4B\u5FBC\u619D\u61A8\u6196\u61C5\u61B4\u61C6\u61C1\u61CC\u61BA"],["e9a1","\u61BF\u61B8\u618C\u64D7\u64D6\u64D0\u64CF\u64C9\u64BD\u6489\u64C3\u64DB\u64F3\u64D9\u6533\u657F\u657C\u65A2\u66C8\u66BE\u66C0\u66CA\u66CB\u66CF\u66BD\u66BB\u66BA\u66CC\u6723\u6A34\u6A66\u6A49\u6A67\u6A32\u6A68\u6A3E\u6A5D\u6A6D\u6A76\u6A5B\u6A51\u6A28\u6A5A\u6A3B\u6A3F\u6A41\u6A6A\u6A64\u6A50\u6A4F\u6A54\u6A6F\u6A69\u6A60\u6A3C\u6A5E\u6A56\u6A55\u6A4D\u6A4E\u6A46\u6B55\u6B54\u6B56\u6BA7\u6BAA\u6BAB\u6BC8\u6BC7\u6C04\u6C03\u6C06\u6FAD\u6FCB\u6FA3\u6FC7\u6FBC\u6FCE\u6FC8\u6F5E\u6FC4\u6FBD\u6F9E\u6FCA\u6FA8\u7004\u6FA5\u6FAE\u6FBA\u6FAC\u6FAA\u6FCF\u6FBF\u6FB8"],["ea40","\u6FA2\u6FC9\u6FAB\u6FCD\u6FAF\u6FB2\u6FB0\u71C5\u71C2\u71BF\u71B8\u71D6\u71C0\u71C1\u71CB\u71D4\u71CA\u71C7\u71CF\u71BD\u71D8\u71BC\u71C6\u71DA\u71DB\u729D\u729E\u7369\u7366\u7367\u736C\u7365\u736B\u736A\u747F\u749A\u74A0\u7494\u7492\u7495\u74A1\u750B\u7580\u762F\u762D\u7631\u763D\u7633\u763C\u7635\u7632\u7630\u76BB\u76E6\u779A\u779D\u77A1\u779C\u779B\u77A2\u77A3\u7795\u7799"],["eaa1","\u7797\u78DD\u78E9\u78E5\u78EA\u78DE\u78E3\u78DB\u78E1\u78E2\u78ED\u78DF\u78E0\u79A4\u7A44\u7A48\u7A47\u7AB6\u7AB8\u7AB5\u7AB1\u7AB7\u7BDE\u7BE3\u7BE7\u7BDD\u7BD5\u7BE5\u7BDA\u7BE8\u7BF9\u7BD4\u7BEA\u7BE2\u7BDC\u7BEB\u7BD8\u7BDF\u7CD2\u7CD4\u7CD7\u7CD0\u7CD1\u7E12\u7E21\u7E17\u7E0C\u7E1F\u7E20\u7E13\u7E0E\u7E1C\u7E15\u7E1A\u7E22\u7E0B\u7E0F\u7E16\u7E0D\u7E14\u7E25\u7E24\u7F43\u7F7B\u7F7C\u7F7A\u7FB1\u7FEF\u802A\u8029\u806C\u81B1\u81A6\u81AE\u81B9\u81B5\u81AB\u81B0\u81AC\u81B4\u81B2\u81B7\u81A7\u81F2\u8255\u8256\u8257\u8556\u8545\u856B\u854D\u8553\u8561\u8558"],["eb40","\u8540\u8546\u8564\u8541\u8562\u8544\u8551\u8547\u8563\u853E\u855B\u8571\u854E\u856E\u8575\u8555\u8567\u8560\u858C\u8566\u855D\u8554\u8565\u856C\u8663\u8665\u8664\u879B\u878F\u8797\u8793\u8792\u8788\u8781\u8796\u8798\u8779\u8787\u87A3\u8785\u8790\u8791\u879D\u8784\u8794\u879C\u879A\u8789\u891E\u8926\u8930\u892D\u892E\u8927\u8931\u8922\u8929\u8923\u892F\u892C\u891F\u89F1\u8AE0"],["eba1","\u8AE2\u8AF2\u8AF4\u8AF5\u8ADD\u8B14\u8AE4\u8ADF\u8AF0\u8AC8\u8ADE\u8AE1\u8AE8\u8AFF\u8AEF\u8AFB\u8C91\u8C92\u8C90\u8CF5\u8CEE\u8CF1\u8CF0\u8CF3\u8D6C\u8D6E\u8DA5\u8DA7\u8E33\u8E3E\u8E38\u8E40\u8E45\u8E36\u8E3C\u8E3D\u8E41\u8E30\u8E3F\u8EBD\u8F36\u8F2E\u8F35\u8F32\u8F39\u8F37\u8F34\u9076\u9079\u907B\u9086\u90FA\u9133\u9135\u9136\u9193\u9190\u9191\u918D\u918F\u9327\u931E\u9308\u931F\u9306\u930F\u937A\u9338\u933C\u931B\u9323\u9312\u9301\u9346\u932D\u930E\u930D\u92CB\u931D\u92FA\u9325\u9313\u92F9\u92F7\u9334\u9302\u9324\u92FF\u9329\u9339\u9335\u932A\u9314\u930C"],["ec40","\u930B\u92FE\u9309\u9300\u92FB\u9316\u95BC\u95CD\u95BE\u95B9\u95BA\u95B6\u95BF\u95B5\u95BD\u96A9\u96D4\u970B\u9712\u9710\u9799\u9797\u9794\u97F0\u97F8\u9835\u982F\u9832\u9924\u991F\u9927\u9929\u999E\u99EE\u99EC\u99E5\u99E4\u99F0\u99E3\u99EA\u99E9\u99E7\u9AB9\u9ABF\u9AB4\u9ABB\u9AF6\u9AFA\u9AF9\u9AF7\u9B33\u9B80\u9B85\u9B87\u9B7C\u9B7E\u9B7B\u9B82\u9B93\u9B92\u9B90\u9B7A\u9B95"],["eca1","\u9B7D\u9B88\u9D25\u9D17\u9D20\u9D1E\u9D14\u9D29\u9D1D\u9D18\u9D22\u9D10\u9D19\u9D1F\u9E88\u9E86\u9E87\u9EAE\u9EAD\u9ED5\u9ED6\u9EFA\u9F12\u9F3D\u5126\u5125\u5122\u5124\u5120\u5129\u52F4\u5693\u568C\u568D\u5686\u5684\u5683\u567E\u5682\u567F\u5681\u58D6\u58D4\u58CF\u58D2\u5B2D\u5B25\u5B32\u5B23\u5B2C\u5B27\u5B26\u5B2F\u5B2E\u5B7B\u5BF1\u5BF2\u5DB7\u5E6C\u5E6A\u5FBE\u5FBB\u61C3\u61B5\u61BC\u61E7\u61E0\u61E5\u61E4\u61E8\u61DE\u64EF\u64E9\u64E3\u64EB\u64E4\u64E8\u6581\u6580\u65B6\u65DA\u66D2\u6A8D\u6A96\u6A81\u6AA5\u6A89\u6A9F\u6A9B\u6AA1\u6A9E\u6A87\u6A93\u6A8E"],["ed40","\u6A95\u6A83\u6AA8\u6AA4\u6A91\u6A7F\u6AA6\u6A9A\u6A85\u6A8C\u6A92\u6B5B\u6BAD\u6C09\u6FCC\u6FA9\u6FF4\u6FD4\u6FE3\u6FDC\u6FED\u6FE7\u6FE6\u6FDE\u6FF2\u6FDD\u6FE2\u6FE8\u71E1\u71F1\u71E8\u71F2\u71E4\u71F0\u71E2\u7373\u736E\u736F\u7497\u74B2\u74AB\u7490\u74AA\u74AD\u74B1\u74A5\u74AF\u7510\u7511\u7512\u750F\u7584\u7643\u7648\u7649\u7647\u76A4\u76E9\u77B5\u77AB\u77B2\u77B7\u77B6"],["eda1","\u77B4\u77B1\u77A8\u77F0\u78F3\u78FD\u7902\u78FB\u78FC\u78F2\u7905\u78F9\u78FE\u7904\u79AB\u79A8\u7A5C\u7A5B\u7A56\u7A58\u7A54\u7A5A\u7ABE\u7AC0\u7AC1\u7C05\u7C0F\u7BF2\u7C00\u7BFF\u7BFB\u7C0E\u7BF4\u7C0B\u7BF3\u7C02\u7C09\u7C03\u7C01\u7BF8\u7BFD\u7C06\u7BF0\u7BF1\u7C10\u7C0A\u7CE8\u7E2D\u7E3C\u7E42\u7E33\u9848\u7E38\u7E2A\u7E49\u7E40\u7E47\u7E29\u7E4C\u7E30\u7E3B\u7E36\u7E44\u7E3A\u7F45\u7F7F\u7F7E\u7F7D\u7FF4\u7FF2\u802C\u81BB\u81C4\u81CC\u81CA\u81C5\u81C7\u81BC\u81E9\u825B\u825A\u825C\u8583\u8580\u858F\u85A7\u8595\u85A0\u858B\u85A3\u857B\u85A4\u859A\u859E"],["ee40","\u8577\u857C\u8589\u85A1\u857A\u8578\u8557\u858E\u8596\u8586\u858D\u8599\u859D\u8581\u85A2\u8582\u8588\u8585\u8579\u8576\u8598\u8590\u859F\u8668\u87BE\u87AA\u87AD\u87C5\u87B0\u87AC\u87B9\u87B5\u87BC\u87AE\u87C9\u87C3\u87C2\u87CC\u87B7\u87AF\u87C4\u87CA\u87B4\u87B6\u87BF\u87B8\u87BD\u87DE\u87B2\u8935\u8933\u893C\u893E\u8941\u8952\u8937\u8942\u89AD\u89AF\u89AE\u89F2\u89F3\u8B1E"],["eea1","\u8B18\u8B16\u8B11\u8B05\u8B0B\u8B22\u8B0F\u8B12\u8B15\u8B07\u8B0D\u8B08\u8B06\u8B1C\u8B13\u8B1A\u8C4F\u8C70\u8C72\u8C71\u8C6F\u8C95\u8C94\u8CF9\u8D6F\u8E4E\u8E4D\u8E53\u8E50\u8E4C\u8E47\u8F43\u8F40\u9085\u907E\u9138\u919A\u91A2\u919B\u9199\u919F\u91A1\u919D\u91A0\u93A1\u9383\u93AF\u9364\u9356\u9347\u937C\u9358\u935C\u9376\u9349\u9350\u9351\u9360\u936D\u938F\u934C\u936A\u9379\u9357\u9355\u9352\u934F\u9371\u9377\u937B\u9361\u935E\u9363\u9367\u9380\u934E\u9359\u95C7\u95C0\u95C9\u95C3\u95C5\u95B7\u96AE\u96B0\u96AC\u9720\u971F\u9718\u971D\u9719\u979A\u97A1\u979C"],["ef40","\u979E\u979D\u97D5\u97D4\u97F1\u9841\u9844\u984A\u9849\u9845\u9843\u9925\u992B\u992C\u992A\u9933\u9932\u992F\u992D\u9931\u9930\u9998\u99A3\u99A1\u9A02\u99FA\u99F4\u99F7\u99F9\u99F8\u99F6\u99FB\u99FD\u99FE\u99FC\u9A03\u9ABE\u9AFE\u9AFD\u9B01\u9AFC\u9B48\u9B9A\u9BA8\u9B9E\u9B9B\u9BA6\u9BA1\u9BA5\u9BA4\u9B86\u9BA2\u9BA0\u9BAF\u9D33\u9D41\u9D67\u9D36\u9D2E\u9D2F\u9D31\u9D38\u9D30"],["efa1","\u9D45\u9D42\u9D43\u9D3E\u9D37\u9D40\u9D3D\u7FF5\u9D2D\u9E8A\u9E89\u9E8D\u9EB0\u9EC8\u9EDA\u9EFB\u9EFF\u9F24\u9F23\u9F22\u9F54\u9FA0\u5131\u512D\u512E\u5698\u569C\u5697\u569A\u569D\u5699\u5970\u5B3C\u5C69\u5C6A\u5DC0\u5E6D\u5E6E\u61D8\u61DF\u61ED\u61EE\u61F1\u61EA\u61F0\u61EB\u61D6\u61E9\u64FF\u6504\u64FD\u64F8\u6501\u6503\u64FC\u6594\u65DB\u66DA\u66DB\u66D8\u6AC5\u6AB9\u6ABD\u6AE1\u6AC6\u6ABA\u6AB6\u6AB7\u6AC7\u6AB4\u6AAD\u6B5E\u6BC9\u6C0B\u7007\u700C\u700D\u7001\u7005\u7014\u700E\u6FFF\u7000\u6FFB\u7026\u6FFC\u6FF7\u700A\u7201\u71FF\u71F9\u7203\u71FD\u7376"],["f040","\u74B8\u74C0\u74B5\u74C1\u74BE\u74B6\u74BB\u74C2\u7514\u7513\u765C\u7664\u7659\u7650\u7653\u7657\u765A\u76A6\u76BD\u76EC\u77C2\u77BA\u78FF\u790C\u7913\u7914\u7909\u7910\u7912\u7911\u79AD\u79AC\u7A5F\u7C1C\u7C29\u7C19\u7C20\u7C1F\u7C2D\u7C1D\u7C26\u7C28\u7C22\u7C25\u7C30\u7E5C\u7E50\u7E56\u7E63\u7E58\u7E62\u7E5F\u7E51\u7E60\u7E57\u7E53\u7FB5\u7FB3\u7FF7\u7FF8\u8075\u81D1\u81D2"],["f0a1","\u81D0\u825F\u825E\u85B4\u85C6\u85C0\u85C3\u85C2\u85B3\u85B5\u85BD\u85C7\u85C4\u85BF\u85CB\u85CE\u85C8\u85C5\u85B1\u85B6\u85D2\u8624\u85B8\u85B7\u85BE\u8669\u87E7\u87E6\u87E2\u87DB\u87EB\u87EA\u87E5\u87DF\u87F3\u87E4\u87D4\u87DC\u87D3\u87ED\u87D8\u87E3\u87A4\u87D7\u87D9\u8801\u87F4\u87E8\u87DD\u8953\u894B\u894F\u894C\u8946\u8950\u8951\u8949\u8B2A\u8B27\u8B23\u8B33\u8B30\u8B35\u8B47\u8B2F\u8B3C\u8B3E\u8B31\u8B25\u8B37\u8B26\u8B36\u8B2E\u8B24\u8B3B\u8B3D\u8B3A\u8C42\u8C75\u8C99\u8C98\u8C97\u8CFE\u8D04\u8D02\u8D00\u8E5C\u8E62\u8E60\u8E57\u8E56\u8E5E\u8E65\u8E67"],["f140","\u8E5B\u8E5A\u8E61\u8E5D\u8E69\u8E54\u8F46\u8F47\u8F48\u8F4B\u9128\u913A\u913B\u913E\u91A8\u91A5\u91A7\u91AF\u91AA\u93B5\u938C\u9392\u93B7\u939B\u939D\u9389\u93A7\u938E\u93AA\u939E\u93A6\u9395\u9388\u9399\u939F\u938D\u93B1\u9391\u93B2\u93A4\u93A8\u93B4\u93A3\u93A5\u95D2\u95D3\u95D1\u96B3\u96D7\u96DA\u5DC2\u96DF\u96D8\u96DD\u9723\u9722\u9725\u97AC\u97AE\u97A8\u97AB\u97A4\u97AA"],["f1a1","\u97A2\u97A5\u97D7\u97D9\u97D6\u97D8\u97FA\u9850\u9851\u9852\u98B8\u9941\u993C\u993A\u9A0F\u9A0B\u9A09\u9A0D\u9A04\u9A11\u9A0A\u9A05\u9A07\u9A06\u9AC0\u9ADC\u9B08\u9B04\u9B05\u9B29\u9B35\u9B4A\u9B4C\u9B4B\u9BC7\u9BC6\u9BC3\u9BBF\u9BC1\u9BB5\u9BB8\u9BD3\u9BB6\u9BC4\u9BB9\u9BBD\u9D5C\u9D53\u9D4F\u9D4A\u9D5B\u9D4B\u9D59\u9D56\u9D4C\u9D57\u9D52\u9D54\u9D5F\u9D58\u9D5A\u9E8E\u9E8C\u9EDF\u9F01\u9F00\u9F16\u9F25\u9F2B\u9F2A\u9F29\u9F28\u9F4C\u9F55\u5134\u5135\u5296\u52F7\u53B4\u56AB\u56AD\u56A6\u56A7\u56AA\u56AC\u58DA\u58DD\u58DB\u5912\u5B3D\u5B3E\u5B3F\u5DC3\u5E70"],["f240","\u5FBF\u61FB\u6507\u6510\u650D\u6509\u650C\u650E\u6584\u65DE\u65DD\u66DE\u6AE7\u6AE0\u6ACC\u6AD1\u6AD9\u6ACB\u6ADF\u6ADC\u6AD0\u6AEB\u6ACF\u6ACD\u6ADE\u6B60\u6BB0\u6C0C\u7019\u7027\u7020\u7016\u702B\u7021\u7022\u7023\u7029\u7017\u7024\u701C\u702A\u720C\u720A\u7207\u7202\u7205\u72A5\u72A6\u72A4\u72A3\u72A1\u74CB\u74C5\u74B7\u74C3\u7516\u7660\u77C9\u77CA\u77C4\u77F1\u791D\u791B"],["f2a1","\u7921\u791C\u7917\u791E\u79B0\u7A67\u7A68\u7C33\u7C3C\u7C39\u7C2C\u7C3B\u7CEC\u7CEA\u7E76\u7E75\u7E78\u7E70\u7E77\u7E6F\u7E7A\u7E72\u7E74\u7E68\u7F4B\u7F4A\u7F83\u7F86\u7FB7\u7FFD\u7FFE\u8078\u81D7\u81D5\u8264\u8261\u8263\u85EB\u85F1\u85ED\u85D9\u85E1\u85E8\u85DA\u85D7\u85EC\u85F2\u85F8\u85D8\u85DF\u85E3\u85DC\u85D1\u85F0\u85E6\u85EF\u85DE\u85E2\u8800\u87FA\u8803\u87F6\u87F7\u8809\u880C\u880B\u8806\u87FC\u8808\u87FF\u880A\u8802\u8962\u895A\u895B\u8957\u8961\u895C\u8958\u895D\u8959\u8988\u89B7\u89B6\u89F6\u8B50\u8B48\u8B4A\u8B40\u8B53\u8B56\u8B54\u8B4B\u8B55"],["f340","\u8B51\u8B42\u8B52\u8B57\u8C43\u8C77\u8C76\u8C9A\u8D06\u8D07\u8D09\u8DAC\u8DAA\u8DAD\u8DAB\u8E6D\u8E78\u8E73\u8E6A\u8E6F\u8E7B\u8EC2\u8F52\u8F51\u8F4F\u8F50\u8F53\u8FB4\u9140\u913F\u91B0\u91AD\u93DE\u93C7\u93CF\u93C2\u93DA\u93D0\u93F9\u93EC\u93CC\u93D9\u93A9\u93E6\u93CA\u93D4\u93EE\u93E3\u93D5\u93C4\u93CE\u93C0\u93D2\u93E7\u957D\u95DA\u95DB\u96E1\u9729\u972B\u972C\u9728\u9726"],["f3a1","\u97B3\u97B7\u97B6\u97DD\u97DE\u97DF\u985C\u9859\u985D\u9857\u98BF\u98BD\u98BB\u98BE\u9948\u9947\u9943\u99A6\u99A7\u9A1A\u9A15\u9A25\u9A1D\u9A24\u9A1B\u9A22\u9A20\u9A27\u9A23\u9A1E\u9A1C\u9A14\u9AC2\u9B0B\u9B0A\u9B0E\u9B0C\u9B37\u9BEA\u9BEB\u9BE0\u9BDE\u9BE4\u9BE6\u9BE2\u9BF0\u9BD4\u9BD7\u9BEC\u9BDC\u9BD9\u9BE5\u9BD5\u9BE1\u9BDA\u9D77\u9D81\u9D8A\u9D84\u9D88\u9D71\u9D80\u9D78\u9D86\u9D8B\u9D8C\u9D7D\u9D6B\u9D74\u9D75\u9D70\u9D69\u9D85\u9D73\u9D7B\u9D82\u9D6F\u9D79\u9D7F\u9D87\u9D68\u9E94\u9E91\u9EC0\u9EFC\u9F2D\u9F40\u9F41\u9F4D\u9F56\u9F57\u9F58\u5337\u56B2"],["f440","\u56B5\u56B3\u58E3\u5B45\u5DC6\u5DC7\u5EEE\u5EEF\u5FC0\u5FC1\u61F9\u6517\u6516\u6515\u6513\u65DF\u66E8\u66E3\u66E4\u6AF3\u6AF0\u6AEA\u6AE8\u6AF9\u6AF1\u6AEE\u6AEF\u703C\u7035\u702F\u7037\u7034\u7031\u7042\u7038\u703F\u703A\u7039\u7040\u703B\u7033\u7041\u7213\u7214\u72A8\u737D\u737C\u74BA\u76AB\u76AA\u76BE\u76ED\u77CC\u77CE\u77CF\u77CD\u77F2\u7925\u7923\u7927\u7928\u7924\u7929"],["f4a1","\u79B2\u7A6E\u7A6C\u7A6D\u7AF7\u7C49\u7C48\u7C4A\u7C47\u7C45\u7CEE\u7E7B\u7E7E\u7E81\u7E80\u7FBA\u7FFF\u8079\u81DB\u81D9\u820B\u8268\u8269\u8622\u85FF\u8601\u85FE\u861B\u8600\u85F6\u8604\u8609\u8605\u860C\u85FD\u8819\u8810\u8811\u8817\u8813\u8816\u8963\u8966\u89B9\u89F7\u8B60\u8B6A\u8B5D\u8B68\u8B63\u8B65\u8B67\u8B6D\u8DAE\u8E86\u8E88\u8E84\u8F59\u8F56\u8F57\u8F55\u8F58\u8F5A\u908D\u9143\u9141\u91B7\u91B5\u91B2\u91B3\u940B\u9413\u93FB\u9420\u940F\u9414\u93FE\u9415\u9410\u9428\u9419\u940D\u93F5\u9400\u93F7\u9407\u940E\u9416\u9412\u93FA\u9409\u93F8\u940A\u93FF"],["f540","\u93FC\u940C\u93F6\u9411\u9406\u95DE\u95E0\u95DF\u972E\u972F\u97B9\u97BB\u97FD\u97FE\u9860\u9862\u9863\u985F\u98C1\u98C2\u9950\u994E\u9959\u994C\u994B\u9953\u9A32\u9A34\u9A31\u9A2C\u9A2A\u9A36\u9A29\u9A2E\u9A38\u9A2D\u9AC7\u9ACA\u9AC6\u9B10\u9B12\u9B11\u9C0B\u9C08\u9BF7\u9C05\u9C12\u9BF8\u9C40\u9C07\u9C0E\u9C06\u9C17\u9C14\u9C09\u9D9F\u9D99\u9DA4\u9D9D\u9D92\u9D98\u9D90\u9D9B"],["f5a1","\u9DA0\u9D94\u9D9C\u9DAA\u9D97\u9DA1\u9D9A\u9DA2\u9DA8\u9D9E\u9DA3\u9DBF\u9DA9\u9D96\u9DA6\u9DA7\u9E99\u9E9B\u9E9A\u9EE5\u9EE4\u9EE7\u9EE6\u9F30\u9F2E\u9F5B\u9F60\u9F5E\u9F5D\u9F59\u9F91\u513A\u5139\u5298\u5297\u56C3\u56BD\u56BE\u5B48\u5B47\u5DCB\u5DCF\u5EF1\u61FD\u651B\u6B02\u6AFC\u6B03\u6AF8\u6B00\u7043\u7044\u704A\u7048\u7049\u7045\u7046\u721D\u721A\u7219\u737E\u7517\u766A\u77D0\u792D\u7931\u792F\u7C54\u7C53\u7CF2\u7E8A\u7E87\u7E88\u7E8B\u7E86\u7E8D\u7F4D\u7FBB\u8030\u81DD\u8618\u862A\u8626\u861F\u8623\u861C\u8619\u8627\u862E\u8621\u8620\u8629\u861E\u8625"],["f640","\u8829\u881D\u881B\u8820\u8824\u881C\u882B\u884A\u896D\u8969\u896E\u896B\u89FA\u8B79\u8B78\u8B45\u8B7A\u8B7B\u8D10\u8D14\u8DAF\u8E8E\u8E8C\u8F5E\u8F5B\u8F5D\u9146\u9144\u9145\u91B9\u943F\u943B\u9436\u9429\u943D\u943C\u9430\u9439\u942A\u9437\u942C\u9440\u9431\u95E5\u95E4\u95E3\u9735\u973A\u97BF\u97E1\u9864\u98C9\u98C6\u98C0\u9958\u9956\u9A39\u9A3D\u9A46\u9A44\u9A42\u9A41\u9A3A"],["f6a1","\u9A3F\u9ACD\u9B15\u9B17\u9B18\u9B16\u9B3A\u9B52\u9C2B\u9C1D\u9C1C\u9C2C\u9C23\u9C28\u9C29\u9C24\u9C21\u9DB7\u9DB6\u9DBC\u9DC1\u9DC7\u9DCA\u9DCF\u9DBE\u9DC5\u9DC3\u9DBB\u9DB5\u9DCE\u9DB9\u9DBA\u9DAC\u9DC8\u9DB1\u9DAD\u9DCC\u9DB3\u9DCD\u9DB2\u9E7A\u9E9C\u9EEB\u9EEE\u9EED\u9F1B\u9F18\u9F1A\u9F31\u9F4E\u9F65\u9F64\u9F92\u4EB9\u56C6\u56C5\u56CB\u5971\u5B4B\u5B4C\u5DD5\u5DD1\u5EF2\u6521\u6520\u6526\u6522\u6B0B\u6B08\u6B09\u6C0D\u7055\u7056\u7057\u7052\u721E\u721F\u72A9\u737F\u74D8\u74D5\u74D9\u74D7\u766D\u76AD\u7935\u79B4\u7A70\u7A71\u7C57\u7C5C\u7C59\u7C5B\u7C5A"],["f740","\u7CF4\u7CF1\u7E91\u7F4F\u7F87\u81DE\u826B\u8634\u8635\u8633\u862C\u8632\u8636\u882C\u8828\u8826\u882A\u8825\u8971\u89BF\u89BE\u89FB\u8B7E\u8B84\u8B82\u8B86\u8B85\u8B7F\u8D15\u8E95\u8E94\u8E9A\u8E92\u8E90\u8E96\u8E97\u8F60\u8F62\u9147\u944C\u9450\u944A\u944B\u944F\u9447\u9445\u9448\u9449\u9446\u973F\u97E3\u986A\u9869\u98CB\u9954\u995B\u9A4E\u9A53\u9A54\u9A4C\u9A4F\u9A48\u9A4A"],["f7a1","\u9A49\u9A52\u9A50\u9AD0\u9B19\u9B2B\u9B3B\u9B56\u9B55\u9C46\u9C48\u9C3F\u9C44\u9C39\u9C33\u9C41\u9C3C\u9C37\u9C34\u9C32\u9C3D\u9C36\u9DDB\u9DD2\u9DDE\u9DDA\u9DCB\u9DD0\u9DDC\u9DD1\u9DDF\u9DE9\u9DD9\u9DD8\u9DD6\u9DF5\u9DD5\u9DDD\u9EB6\u9EF0\u9F35\u9F33\u9F32\u9F42\u9F6B\u9F95\u9FA2\u513D\u5299\u58E8\u58E7\u5972\u5B4D\u5DD8\u882F\u5F4F\u6201\u6203\u6204\u6529\u6525\u6596\u66EB\u6B11\u6B12\u6B0F\u6BCA\u705B\u705A\u7222\u7382\u7381\u7383\u7670\u77D4\u7C67\u7C66\u7E95\u826C\u863A\u8640\u8639\u863C\u8631\u863B\u863E\u8830\u8832\u882E\u8833\u8976\u8974\u8973\u89FE"],["f840","\u8B8C\u8B8E\u8B8B\u8B88\u8C45\u8D19\u8E98\u8F64\u8F63\u91BC\u9462\u9455\u945D\u9457\u945E\u97C4\u97C5\u9800\u9A56\u9A59\u9B1E\u9B1F\u9B20\u9C52\u9C58\u9C50\u9C4A\u9C4D\u9C4B\u9C55\u9C59\u9C4C\u9C4E\u9DFB\u9DF7\u9DEF\u9DE3\u9DEB\u9DF8\u9DE4\u9DF6\u9DE1\u9DEE\u9DE6\u9DF2\u9DF0\u9DE2\u9DEC\u9DF4\u9DF3\u9DE8\u9DED\u9EC2\u9ED0\u9EF2\u9EF3\u9F06\u9F1C\u9F38\u9F37\u9F36\u9F43\u9F4F"],["f8a1","\u9F71\u9F70\u9F6E\u9F6F\u56D3\u56CD\u5B4E\u5C6D\u652D\u66ED\u66EE\u6B13\u705F\u7061\u705D\u7060\u7223\u74DB\u74E5\u77D5\u7938\u79B7\u79B6\u7C6A\u7E97\u7F89\u826D\u8643\u8838\u8837\u8835\u884B\u8B94\u8B95\u8E9E\u8E9F\u8EA0\u8E9D\u91BE\u91BD\u91C2\u946B\u9468\u9469\u96E5\u9746\u9743\u9747\u97C7\u97E5\u9A5E\u9AD5\u9B59\u9C63\u9C67\u9C66\u9C62\u9C5E\u9C60\u9E02\u9DFE\u9E07\u9E03\u9E06\u9E05\u9E00\u9E01\u9E09\u9DFF\u9DFD\u9E04\u9EA0\u9F1E\u9F46\u9F74\u9F75\u9F76\u56D4\u652E\u65B8\u6B18\u6B19\u6B17\u6B1A\u7062\u7226\u72AA\u77D8\u77D9\u7939\u7C69\u7C6B\u7CF6\u7E9A"],["f940","\u7E98\u7E9B\u7E99\u81E0\u81E1\u8646\u8647\u8648\u8979\u897A\u897C\u897B\u89FF\u8B98\u8B99\u8EA5\u8EA4\u8EA3\u946E\u946D\u946F\u9471\u9473\u9749\u9872\u995F\u9C68\u9C6E\u9C6D\u9E0B\u9E0D\u9E10\u9E0F\u9E12\u9E11\u9EA1\u9EF5\u9F09\u9F47\u9F78\u9F7B\u9F7A\u9F79\u571E\u7066\u7C6F\u883C\u8DB2\u8EA6\u91C3\u9474\u9478\u9476\u9475\u9A60\u9C74\u9C73\u9C71\u9C75\u9E14\u9E13\u9EF6\u9F0A"],["f9a1","\u9FA4\u7068\u7065\u7CF7\u866A\u883E\u883D\u883F\u8B9E\u8C9C\u8EA9\u8EC9\u974B\u9873\u9874\u98CC\u9961\u99AB\u9A64\u9A66\u9A67\u9B24\u9E15\u9E17\u9F48\u6207\u6B1E\u7227\u864C\u8EA8\u9482\u9480\u9481\u9A69\u9A68\u9B2E\u9E19\u7229\u864B\u8B9F\u9483\u9C79\u9EB7\u7675\u9A6B\u9C7A\u9E1D\u7069\u706A\u9EA4\u9F7E\u9F49\u9F98\u7881\u92B9\u88CF\u58BB\u6052\u7CA7\u5AFA\u2554\u2566\u2557\u2560\u256C\u2563\u255A\u2569\u255D\u2552\u2564\u2555\u255E\u256A\u2561\u2558\u2567\u255B\u2553\u2565\u2556\u255F\u256B\u2562\u2559\u2568\u255C\u2551\u2550\u256D\u256E\u2570\u256F\u2593"]]});var gQ1=o((mz5,ZS6)=>{ZS6.exports=[["8740","\u43F0\u4C32\u4603\u45A6\u4578\uD85C\uDE67\u4D77\u45B3\uD85F\uDCB1\u4CE2\uD85F\uDCC5\u3B95\u4736\u4744\u4C47\u4C40\uD850\uDEBF\uD84D\uDE17\uD85C\uDF52\uD85B\uDE8B\uD85C\uDCD2\u4C57\uD868\uDF51\u474F\u45DA\u4C85\uD85F\uDC6C\u4D07\u4AA4\u46A1\uD85A\uDF23\u7225\uD856\uDE54\uD846\uDE63\uD84F\uDE06\uD84F\uDF61\u664D\u56FB"],["8767","\u7D95\u591D\uD862\uDFB9\u3DF4\u9734\uD85E\uDFEF\u5BDB\uD847\uDD5E\u5AA4\u3625\uD867\uDEB0\u5AD1\u5BB7\u5CFC\u676E\u8593\uD866\uDD45\u7461\u749D\u3875\uD847\uDD53\uD84D\uDE9E\uD858\uDC21\u3EEC"],["87a1","\uD856\uDCDE\u3AF5\u7AFC\u9F97\uD850\uDD61\uD862\uDD0D\uD84C\uDDEA\uD842\uDE8A\uD84C\uDE5E\u430A\u8484\u9F96\u942F\u4930\u8613\u5896\u974A\u9218\u79D0\u7A32\u6660\u6A29\u889D\u744C\u7BC5\u6782\u7A2C\u524F\u9046\u34E6\u73C4\uD857\uDDB9\u74C6\u9FC7\u57B3\u492F\u544C\u4131\uD84D\uDE8E\u5818\u7A72\uD85E\uDF65\u8B8F\u46AE\uD85B\uDE88\u4181\uD857\uDD99\u7BAE\uD849\uDCBC\u9FC8\uD849\uDCC1\uD849\uDCC9\uD849\uDCCC\u9FC9\u8504\uD84D\uDDBB\u40B4\u9FCA\u44E1\uD86B\uDDFF\u62C1\u706E\u9FCB"],["8840","\u31C0",4,"\uD840\uDD0C\u31C5\uD840\uDCD1\uD840\uDCCD\u31C6\u31C7\uD840\uDCCB\uD847\uDFE8\u31C8\uD840\uDCCA\u31C9\u31CA\u31CB\u31CC\uD840\uDD0E\u31CD\u31CE\u0100\xC1\u01CD\xC0\u0112\xC9\u011A\xC8\u014C\xD3\u01D1\xD2\u0FFF\xCA\u0304\u1EBE\u0FFF\xCA\u030C\u1EC0\xCA\u0101\xE1\u01CE\xE0\u0251\u0113\xE9\u011B\xE8\u012B\xED\u01D0\xEC\u014D\xF3\u01D2\xF2\u016B\xFA\u01D4\xF9\u01D6\u01D8\u01DA"],["88a1","\u01DC\xFC\u0FFF\xEA\u0304\u1EBF\u0FFF\xEA\u030C\u1EC1\xEA\u0261\u23DA\u23DB"],["8940","\uD868\uDFA9\uD844\uDD45"],["8943","\u650A"],["8946","\u4E3D\u6EDD\u9D4E\u91DF"],["894c","\uD85D\uDF35\u6491\u4F1A\u4F28\u4FA8\u5156\u5174\u519C\u51E4\u52A1\u52A8\u533B\u534E\u53D1\u53D8\u56E2\u58F0\u5904\u5907\u5932\u5934\u5B66\u5B9E\u5B9F\u5C9A\u5E86\u603B\u6589\u67FE\u6804\u6865\u6D4E\u70BC\u7535\u7EA4\u7EAC\u7EBA\u7EC7\u7ECF\u7EDF\u7F06\u7F37\u827A\u82CF\u836F\u89C6\u8BBE\u8BE2\u8F66\u8F67\u8F6E"],["89a1","\u7411\u7CFC\u7DCD\u6946\u7AC9\u5227"],["89ab","\u918C\u78B8\u915E\u80BC"],["89b0","\u8D0B\u80F6\uD842\uDDE7"],["89b5","\u809F\u9EC7\u4CCD\u9DC9\u9E0C\u4C3E\uD867\uDDF6\uD85C\uDC0E\u9E0A\uD868\uDD33\u35C1"],["89c1","\u6E9A\u823E\u7519"],["89c5","\u4911\u9A6C\u9A8F\u9F99\u7987\uD861\uDC6C\uD847\uDDCA\uD841\uDDD0\uD84A\uDEE6\u4E24\u4E81\u4E80\u4E87\u4EBF\u4EEB\u4F37\u344C\u4FBD\u3E48\u5003\u5088\u347D\u3493\u34A5\u5186\u5905\u51DB\u51FC\u5205\u4E89\u5279\u5290\u5327\u35C7\u53A9\u3551\u53B0\u3553\u53C2\u5423\u356D\u3572\u3681\u5493\u54A3\u54B4\u54B9\u54D0\u54EF\u5518\u5523\u5528\u3598\u553F\u35A5\u35BF\u55D7\u35C5"],["8a40","\uD85F\uDD84\u5525"],["8a43","\uD843\uDC42\uD843\uDD15\uD854\uDD2B\u5590\uD84B\uDCC6\u39EC\uD840\uDF41\u8E46\uD853\uDDB8\uD865\uDCE5\u4053\uD860\uDCBE\u777A\uD84B\uDC38\u3A34\u47D5\uD860\uDD5D\uD85A\uDDF2\uD853\uDDEA\u64DD\uD843\uDD7C\uD843\uDFB4\uD843\uDCD5\uD844\uDCF4\u648D\u8E7E\uD843\uDE96\uD843\uDC0B\uD843\uDF64\uD84B\uDCA9\uD860\uDE56\uD851\uDCD3"],["8a64","\uD843\uDD46\uD866\uDE4D\uD860\uDCE9\u47F4\uD853\uDEA7\uD84B\uDCC2\u9AB2\u3A67\uD865\uDDF4\u3FED\u3506\uD854\uDEC7\uD865\uDFD4\uD85E\uDCC8\uD84B\uDD44\u9D6E\u9815"],["8a76","\u43D9\uD858\uDCA5\u64B4\u54E3\uD84B\uDD4C\uD84A\uDFCA\uD844\uDC77\u39FB\uD844\uDC6F"],["8aa1","\uD859\uDEDA\uD859\uDF16\uD85E\uDDA0\u64EA\uD854\uDC52\uD843\uDC43\u8E68\uD848\uDDA1\uD862\uDF4C\uD841\uDF31"],["8aac","\u480B\uD840\uDDA9\u3FFA\u5873\uD84B\uDD8D"],["8ab2","\uD851\uDDC8\uD841\uDCFC\uD858\uDC97\uD843\uDF4C\uD843\uDD96\u5579\u40BB\u43BA"],["8abb","\u4AB4\uD84A\uDE66\uD844\uDC9D\u81AA\u98F5\uD843\uDD9C\u6379\u39FE\uD849\uDF75\u8DC0\u56A1\u647C\u3E43"],["8ac9","\uD869\uDE01\uD843\uDE09\uD84A\uDECF\uD84B\uDCC9"],["8ace","\uD844\uDCC8\uD84E\uDDC2\u3992\u3A06\uD860\uDE9B\u3578\uD857\uDE49\uD848\uDCC7\u5652\uD843\uDF31\uD84B\uDCB2\uD865\uDF20\u34BC\u6C3D\uD853\uDE3B"],["8adf","\uD85D\uDD74\uD84B\uDE8B\uD848\uDE08\uD869\uDE5B\uD863\uDCCD\uD843\uDE7A\uD843\uDC34\uD85A\uDC1C\u7F93\uD844\uDCCF\uD84A\uDC03\uD84A\uDD39\u35FB\uD854\uDDE3\uD843\uDE8C\uD843\uDF8D\uD843\uDEAA\u3F93\uD843\uDF30\uD843\uDD47\uD844\uDD4F\uD843\uDE4C"],["8af6","\uD843\uDEAB\uD842\uDFA9\uD843\uDD48\uD844\uDCC0\uD844\uDD3D\u3FF9\uD849\uDE96\u6432\uD843\uDFAD"],["8b40","\uD84C\uDFF4\uD85D\uDE39\uD84A\uDFCE\uD843\uDD7E\uD843\uDD7F\uD84B\uDC51\uD84B\uDC55\u3A18\uD843\uDE98\uD844\uDCC7\uD843\uDF2E\uD869\uDE32\uD85A\uDF50\uD863\uDCD2\uD863\uDD99\uD863\uDCCA\u95AA\u54CC\u82C4\u55B9"],["8b55","\uD867\uDEC3\u9C26\u9AB6\uD85D\uDF5E\uD84B\uDDEE\u7140\u816D\u80EC\u5C1C\uD859\uDD72\u8134\u3797\u535F\uD860\uDCBD\u91B6\uD843\uDEFA\uD843\uDE0F\uD843\uDE77\uD843\uDEFB\u35DD\uD853\uDDEB\u3609\uD843\uDCD6\u56AF\uD849\uDFB5\uD844\uDCC9\uD843\uDE10\uD843\uDE78\uD844\uDC78\uD844\uDD48\uD860\uDE07\uD845\uDC55\uD843\uDE79\uD853\uDE50\uD84B\uDDA4\u5A54\uD844\uDC1D\uD844\uDC1E\uD844\uDCF5\uD844\uDCF6\u579C\uD843\uDE11"],["8ba1","\uD85D\uDE94\uD860\uDECD\uD843\uDFB5\uD843\uDE7B\uD854\uDD7E\u3703\uD843\uDFB6\uD844\uDD80\uD854\uDED8\uD868\uDEBD\uD852\uDDDA\uD846\uDC3A\uD850\uDD77\uD860\uDE7C\u5899\u5268\u361A\uD855\uDF3D\u7BB2\u5B68\u4800\u4B2C\u9F27\u49E7\u9C1F\u9B8D\uD856\uDF74\uD84C\uDD3D\u55FB\u35F2\u5689\u4E28\u5902\uD846\uDFC1\uD87E\uDC78\u9751\uD840\uDC86\u4E5B\u4EBB\u353E\u5C23\u5F51\u5FC4\u38FA\u624C\u6535\u6B7A\u6C35\u6C3A\u706C\u722B\u4E2C\u72AD\uD852\uDCE9\u7F52\u793B\u7CF9\u7F53\uD858\uDE6A\u34C1"],["8bde","\uD858\uDF4B\u8002\u8080\uD859\uDE12\uD85A\uDD51\u535D\u8864\u89C1\uD85E\uDCB2\u8BA0\u8D1D\u9485\u9578\u957F\u95E8\uD863\uDE0F\u97E6\u9875\u98CE\u98DE\u9963\uD866\uDC10\u9C7C\u9E1F\u9EC4\u6B6F\uF907\u4E37\uD840\uDC87\u961D\u6237\u94A2"],["8c40","\u503B\u6DFE\uD867\uDC73\u9FA6\u3DC9\u888F\uD850\uDD4E\u7077\u5CF5\u4B20\uD854\uDDCD\u3559\uD857\uDD30\u6122\uD862\uDE32\u8FA7\u91F6\u7191\u6719\u73BA\uD84C\uDE81\uD868\uDD07\u3C8B\uD846\uDD80\u4B10\u78E4\u7402\u51AE\uD861\uDF0F\u4009\u6A63\uD868\uDEBA\u4223\u860F\uD842\uDE6F\u7A2A\uD866\uDD47\uD862\uDEEA\u9755\u704D\u5324\uD848\uDC7E\u93F4\u76D9\uD862\uDDE3\u9FA7\u77DD\u4EA3\u4FF0\u50BC\u4E2F\u4F17\u9FA8\u5434\u7D8B\u5892\u58D0\uD847\uDDB6\u5E92\u5E99\u5FC2\uD849\uDF12\u658B"],["8ca1","\uD84C\uDFF9\u6919\u6A43\uD84F\uDC63\u6CFF"],["8ca7","\u7200\uD851\uDD05\u738C\u3EDB\uD852\uDE13\u5B15\u74B9\u8B83\uD857\uDCA4\uD855\uDE95\u7A93\u7BEC\u7CC3\u7E6C\u82F8\u8597\u9FA9\u8890\u9FAA\u8EB9\u9FAB\u8FCF\u855F\u99E0\u9221\u9FAC\uD863\uDDB9\uD845\uDC3F\u4071\u42A2\u5A1A"],["8cc9","\u9868\u676B\u4276\u573D"],["8cce","\u85D6\uD852\uDD7B\u82BF\uD85C\uDD0D\u4C81\uD85B\uDD74\u5D7B\uD85A\uDF15\uD85B\uDFBE\u9FAD\u9FAE\u5B96\u9FAF\u66E7\u7E5B\u6E57\u79CA\u3D88\u44C3\uD84C\uDE56\uD849\uDF96\u439A\u4536"],["8ce6","\u5CD5\uD84E\uDF1A\u8AF9\u5C78\u3D12\uD84D\uDD51\u5D78\u9FB2\u7157\u4558\uD850\uDCEC\uD847\uDE23\u4C77\u3978\u344A\uD840\uDDA4\uD85B\uDC41\u8ACC\u4FB4\uD840\uDE39\u59BF\u816C\u9856\uD866\uDCFA\u5F3B"],["8d40","\uD842\uDF9F"],["8d42","\uD848\uDDC1\uD862\uDD6D\u4102\u46BB\uD864\uDC79\u3F07\u9FB3\uD868\uDDB5\u40F8\u37D6\u46F7\uD85B\uDC46\u417C\uD861\uDEB2\uD85C\uDFFF\u456D\u38D4\uD855\uDC9A\u4561\u451B\u4D89\u4C7B\u4D76\u45EA\u3FC8\uD852\uDF0F\u3661\u44DE\u44BD\u41ED\u5D3E\u5D48\u5D56\u3DFC\u380F\u5DA4\u5DB9\u3820\u3838\u5E42\u5EBD\u5F25\u5F83\u3908\u3914\u393F\u394D\u60D7\u613D\u5CE5\u3989\u61B7\u61B9\u61CF\u39B8\u622C\u6290\u62E5\u6318\u39F8\u56B1"],["8da1","\u3A03\u63E2\u63FB\u6407\u645A\u3A4B\u64C0\u5D15\u5621\u9F9F\u3A97\u6586\u3ABD\u65FF\u6653\u3AF2\u6692\u3B22\u6716\u3B42\u67A4\u6800\u3B58\u684A\u6884\u3B72\u3B71\u3B7B\u6909\u6943\u725C\u6964\u699F\u6985\u3BBC\u69D6\u3BDD\u6A65\u6A74\u6A71\u6A82\u3BEC\u6A99\u3BF2\u6AAB\u6AB5\u6AD4\u6AF6\u6B81\u6BC1\u6BEA\u6C75\u6CAA\u3CCB\u6D02\u6D06\u6D26\u6D81\u3CEF\u6DA4\u6DB1\u6E15\u6E18\u6E29\u6E86\uD862\uDDC0\u6EBB\u6EE2\u6EDA\u9F7F\u6EE8\u6EE9\u6F24\u6F34\u3D46\uD84F\uDF41\u6F81\u6FBE\u3D6A\u3D75\u71B7\u5C99\u3D8A\u702C\u3D91\u7050\u7054\u706F\u707F\u7089\uD840\uDF25\u43C1\u35F1\uD843\uDED8"],["8e40","\uD84F\uDED7\u57BE\uD85B\uDED3\u713E\uD855\uDFE0\u364E\u69A2\uD862\uDFE9\u5B74\u7A49\uD856\uDCE1\uD865\uDCD9\u7A65\u7A7D\uD856\uDDAC\u7ABB\u7AB0\u7AC2\u7AC3\u71D1\uD859\uDC8D\u41CA\u7ADA\u7ADD\u7AEA\u41EF\u54B2\uD857\uDC01\u7B0B\u7B55\u7B29\uD854\uDF0E\uD857\uDCFE\u7BA2\u7B6F\u839C\uD856\uDFB4\uD85B\uDC7F\u7BD0\u8421\u7B92\u7BB8\uD857\uDD20\u3DAD\uD857\uDC65\u8492\u7BFA\u7C06\u7C35\uD857\uDCC1\u7C44\u7C83\uD852\uDC82\u7CA6\u667D\uD851\uDD78\u7CC9\u7CC7\u7CE6\u7C74\u7CF3\u7CF5\u7CCE"],["8ea1","\u7E67\u451D\uD85B\uDE44\u7D5D\uD85B\uDED6\u748D\u7D89\u7DAB\u7135\u7DB3\u7DD2\uD850\uDC57\uD858\uDC29\u7DE4\u3D13\u7DF5\uD845\uDFF9\u7DE5\uD860\uDF6D\u7E1D\uD858\uDD21\uD858\uDD5A\u7E6E\u7E92\u432B\u946C\u7E27\u7F40\u7F41\u7F47\u7936\uD858\uDED0\u99E1\u7F97\uD858\uDF51\u7FA3\uD845\uDE61\uD840\uDC68\u455C\uD84D\uDF66\u4503\uD860\uDF3A\u7FFA\uD859\uDC89\u8005\u8008\u801D\u8028\u802F\uD868\uDC87\uD85B\uDCC3\u803B\u803C\u8061\uD849\uDF14\u4989\uD859\uDE26\uD84F\uDDE3\uD859\uDEE8\u6725\u80A7\uD862\uDE48\u8107\u811A\u58B0\uD849\uDEF6\u6C7F\uD859\uDC98\uD853\uDFB8\u64E7\uD845\uDC8A\u8218\uD846\uDC5E\u6A53\uD852\uDE65\uD852\uDE95\u447A\u8229\uD842\uDF0D\uD85A\uDE52\uD84F\uDD7E\u4FF9\uD845\uDCFD\u84E2\u8362\uD85A\uDF0A\uD852\uDDA7\uD84D\uDD30\uD845\uDF73\uD84F\uDDF8\u82AA\u691B\uD87E\uDD94\u41DB"],["8f40","\u854B\u82D0\u831A\uD843\uDE16\uD845\uDFB4\u36C1\uD84C\uDD7D\uD84D\uDD5A\u827B\u82E2\u8318\uD84F\uDE8B\uD85B\uDDA3\uD85A\uDF05\uD85A\uDF97\uD84D\uDDCE\u3DBF\u831D\u55EC\u8385\u450B\uD85B\uDDA5\u83AC\u83C1\u83D3\u347E\uD85B\uDED4\u6A57\u855A\u3496\uD85B\uDE42\uD84B\uDEEF\u8458\uD856\uDFE4\u8471\u3DD3\u44E4\u6AA7\u844A\uD84F\uDCB5\u7958\u84A8\uD85A\uDF96\uD85B\uDE77\uD85B\uDE43\u84DE\u840F\u8391\u44A0\u8493\u84E4\uD857\uDC91\u4240\uD857\uDCC0\u4543\u8534\u5AF2\uD85B\uDE99\u4527\u8573\u4516\u67BF\u8616"],["8fa1","\uD861\uDE25\uD861\uDE3B\u85C1\uD85C\uDC88\u8602\uD845\uDD82\uD85C\uDCCD\uD87E\uDDB2\u456A\u8628\u3648\uD846\uDCA2\u53F7\uD85C\uDF9A\u867E\u8771\uD868\uDCF8\u87EE\uD84B\uDC27\u87B1\u87DA\u880F\u5661\u866C\u6856\u460F\u8845\u8846\uD85D\uDDE0\uD84F\uDDB9\uD85D\uDDE4\u885E\u889C\u465B\u88B4\u88B5\u63C1\u88C5\u7777\uD85D\uDF0F\u8987\u898A\u89A6\u89A9\u89A7\u89BC\uD862\uDE25\u89E7\uD85E\uDD24\uD85E\uDEBD\u8A9C\u7793\u91FE\u8A90\uD85E\uDE59\u7AE9\uD85E\uDF3A\uD84F\uDF8F\u4713\uD85E\uDF38\u717C\u8B0C\u8B1F\uD855\uDC30\uD855\uDD65\u8B3F\u8B4C\u8B4D\u8AA9\uD852\uDE7A\u8B90\u8B9B\u8AAF\uD845\uDEDF\u4615\u884F\u8C9B\uD85F\uDD54\uD85F\uDD8F\uD87E\uDDD4\u3725\uD85F\uDD53\u8CD6\uD85F\uDD98\uD85F\uDDBD\u8D12\u8D03\uD846\uDD10\u8CDB\u705C\u8D11\uD853\uDCC9\u3ED0\u8D77"],["9040","\u8DA9\uD860\uDC02\uD844\uDC14\uD852\uDD8A\u3B7C\uD860\uDDBC\uD85C\uDD0C\u7AE7\u8EAD\u8EB6\u8EC3\u92D4\u8F19\u8F2D\uD860\uDF65\uD861\uDC12\u8FA5\u9303\uD868\uDE9F\uD842\uDE50\u8FB3\u492A\uD862\uDDDE\uD861\uDD3D\uD84F\uDDBB\u5EF8\uD84C\uDE62\u8FF9\uD868\uDC14\uD861\uDEBC\uD861\uDD01\uD848\uDF25\u3980\uD85B\uDED7\u9037\uD861\uDD3C\uD85E\uDEBE\u9061\uD861\uDD6C\uD861\uDE0B\u90A8\uD861\uDF13\u90C4\uD861\uDEE6\u90AE\u90FD\u9167\u3AF0\u91A9\u91C4\u7CAC\uD862\uDD33\uD847\uDE89\u920E\u6C9F\u9241\u9262\uD855\uDDB9\u92B9\uD862\uDEC6\uD84F\uDC9B\uD862\uDF0C\uD855\uDDDB"],["90a1","\uD843\uDD31\u932C\u936B\uD862\uDEE1\uD862\uDFEB\u708F\u5AC3\uD862\uDEE2\uD862\uDEE5\u4965\u9244\uD862\uDFEC\uD863\uDC39\uD862\uDFFF\u9373\u945B\u8EBC\u9585\u95A6\u9426\u95A0\u6FF6\u42B9\uD849\uDE7A\uD861\uDED8\uD844\uDE7C\uD84F\uDE2E\u49DF\u6C1C\u967B\u9696\u416C\u96A3\uD85B\uDED5\u61DA\u96B6\u78F5\uD862\uDEE0\u96BD\u53CC\u49A1\uD85B\uDCB8\uD840\uDE74\uD859\uDC10\uD864\uDCAF\uD864\uDCE5\uD852\uDED1\uD846\uDD15\uD84C\uDF0A\u9731\u8642\u9736\u4A0F\u453D\u4585\uD852\uDEE9\u7075\u5B41\u971B\u975C\uD864\uDDD5\u9757\u5B4A\uD864\uDDEB\u975F\u9425\u50D0\uD84C\uDCB7\uD84C\uDCBC\u9789\u979F\u97B1\u97BE\u97C0\u97D2\u97E0\uD855\uDC6C\u97EE\u741C\uD865\uDC33\u97FF\u97F5\uD865\uDC1D\uD85E\uDD7A\u4AD1\u9834\u9833\u984B\u9866\u3B0E\uD85C\uDD75\u3D51\uD841\uDE30\uD850\uDD5C"],["9140","\uD855\uDF06\u98CA\u98B7\u98C8\u98C7\u4AFF\uD85B\uDD27\uD845\uDED3\u55B0\u98E1\u98E6\u98EC\u9378\u9939\uD852\uDE29\u4B72\uD866\uDC57\uD866\uDD05\u99F5\u9A0C\u9A3B\u9A10\u9A58\uD855\uDF25\u36C4\uD864\uDCB1\uD866\uDFD5\u9AE0\u9AE2\uD866\uDF05\u9AF4\u4C0E\u9B14\u9B2D\uD861\uDE00\u5034\u9B34\uD85A\uDDA8\u38C3\uD84C\uDC7D\u9B50\u9B40\uD867\uDD3E\u5A45\uD846\uDC63\u9B8E\uD850\uDE4B\u9C02\u9BFF\u9C0C\uD867\uDE68\u9DD4\uD867\uDFB7\uD868\uDD92\uD868\uDDAB\uD868\uDCE1\uD868\uDD23\uD868\uDDDF\u9D7E\u9D83\uD868\uDD34\u9E0E\u6888"],["91a1","\u9DC4\uD848\uDD5B\uD868\uDD93\uD868\uDE20\uD846\uDD3B\uD868\uDE33\u9D39\uD868\uDCB9\uD868\uDEB4\u9E90\u9E95\u9E9E\u9EA2\u4D34\u9EAA\u9EAF\uD850\uDF64\u9EC1\u3B60\u39E5\u3D1D\u4F32\u37BE\uD863\uDC2B\u9F02\u9F08\u4B96\u9424\uD85B\uDDA2\u9F17\u9F16\u9F39\u569F\u568A\u9F45\u99B8\uD864\uDC8B\u97F2\u847F\u9F62\u9F69\u7ADC\u9F8E\u7216\u4BBE\uD852\uDD75\uD852\uDDBB\u7177\uD852\uDDF8\uD850\uDF48\uD852\uDE51\u739E\uD862\uDFDA\uD846\uDCFA\u799F\uD862\uDD7E\uD863\uDE36\u9369\u93F3\uD862\uDE44\u92EC\u9381\u93CB\uD862\uDD6C\uD851\uDCB9\u7217\u3EEB\u7772\u7A43\u70D0\uD851\uDC73\uD850\uDFF8\u717E\uD845\uDFEF\u70A3\uD846\uDCBE\uD84D\uDD99\u3EC7\uD846\uDC85\uD855\uDC2F\uD845\uDFF8\u3722\uD845\uDEFB\uD846\uDC39\u36E1\uD845\uDF74\uD846\uDCD1\uD857\uDF4B\u3723\uD845\uDEC0\u575B\uD852\uDE25\uD844\uDFFE\uD844\uDEA8"],["9240","\uD844\uDFC6\uD845\uDCB6\u8503\uD84D\uDEA6\u8503\u8455\uD852\uDD94\uD85C\uDD65\uD84F\uDE31\uD855\uDD5C\uD84F\uDEFB\uD85C\uDC52\u44F4\uD84D\uDEEE\uD866\uDD9D\uD85B\uDF26\u67F9\u3733\u3C15\u3DE7\u586C\uD846\uDD22\u6810\u4057\uD84D\uDF3F\uD850\uDCE1\uD850\uDC8B\uD850\uDD0F\uD85B\uDC21\u54CB\u569E\uD859\uDEB1\u5692\uD843\uDFDF\uD842\uDFA8\uD843\uDE0D\u93C6\uD862\uDF13\u939C\u4EF8\u512B\u3819\uD851\uDC36\u4EBC\uD841\uDC65\uD840\uDF7F\u4F4B\u4F8A\uD855\uDE51\u5A68\uD840\uDDAB\uD840\uDFCB\u3999\uD840\uDF0A\uD841\uDC14\u3435\u4F29\uD840\uDEC0\uD863\uDEB3\uD840\uDE75\u8ADA\uD840\uDE0C\u4E98"],["92a1","\u50CD\u510D\u4FA2\u4F03\uD852\uDE0E\uD84F\uDE8A\u4F42\u502E\u506C\u5081\u4FCC\u4FE5\u5058\u50FC\u5159\u515B\u515D\u515E\u6E76\uD84D\uDD95\uD84F\uDE39\uD84F\uDEBF\u6D72\uD846\uDC84\uD84F\uDE89\u51A8\u51C3\uD841\uDDE0\u44DD\uD841\uDCA3\uD841\uDC92\uD841\uDC91\u8D7A\uD862\uDE9C\uD841\uDF0E\u5259\u52A4\uD842\uDC73\u52E1\u936E\u467A\u718C\uD850\uDF8C\uD843\uDC20\uD852\uDDAC\uD844\uDCE4\u69D1\uD843\uDE1D\u7479\u3EDE\u7499\u7414\u7456\u7398\u4B8E\uD852\uDEBC\uD850\uDC8D\u53D0\u3584\u720F\uD850\uDCC9\u55B4\uD840\uDF45\u54CD\uD842\uDFC6\u571D\u925D\u96F4\u9366\u57DD\u578D\u577F\u363E\u58CB\u5A99\uD862\uDE46\uD845\uDEFA\uD845\uDF6F\uD845\uDF10\u5A2C\u59B8\u928F\u5A7E\u5ACF\u5A12\uD856\uDD46\uD846\uDDF3\uD846\uDC61\uD850\uDE95\u36F5\u6D05\u7443\u5A21\uD857\uDE83"],["9340","\u5A81\uD862\uDFD7\uD841\uDC13\u93E0\u748C\uD844\uDF03\u7105\u4972\u9408\uD862\uDDFB\u93BD\u37A0\u5C1E\u5C9E\u5E5E\u5E48\uD846\uDD96\uD846\uDD7C\uD84E\uDEEE\u5ECD\u5B4F\uD846\uDD03\uD846\uDD04\u3701\uD846\uDCA0\u36DD\uD845\uDEFE\u36D3\u812A\uD862\uDE47\uD847\uDDBA\uD84D\uDC72\uD862\uDDA8\u5F0C\u5F0E\uD846\uDD27\uD845\uDFAB\u5A6B\uD845\uDF3B\u5B44\u8614\uD85D\uDDFD\u8860\u607E\uD84A\uDC60\uD849\uDE2B\u5FDB\u3EB8\uD849\uDDAF\uD849\uDDBE\uD864\uDC88\uD85B\uDF73\u61C0\uD840\uDC3E\uD840\uDC46\uD849\uDE1B\u6199\u6198\u6075\uD84B\uDC9B\uD84B\uDD07\uD851\uDED4\uD864\uDD4D"],["93a1","\u6471\uD851\uDE65\uD84A\uDF6A\u3A29\uD84A\uDF22\uD84D\uDC50\uD866\uDCEA\uD84B\uDE78\u6337\uD869\uDC5B\u64B6\u6331\u63D1\uD852\uDDE3\uD84B\uDD67\u62A4\uD84B\uDCA1\u643B\u656B\u6972\u3BF4\uD84C\uDC8E\uD84C\uDEAD\uD852\uDD89\uD84C\uDEAB\u550D\uD84C\uDEE0\uD846\uDCD9\uD865\uDC3F\u66CE\uD84C\uDE89\uD84C\uDDB3\u3AE0\u4190\uD855\uDD84\uD862\uDF22\uD855\uDD8F\uD845\uDEFC\uD855\uDD5B\uD855\uDC25\u78EE\uD84C\uDD03\uD846\uDC2A\uD84C\uDE34\u3464\uD84C\uDE0F\uD84C\uDD82\uD850\uDEC9\u668E\uD85B\uDD24\u666B\u4B93\u6630\uD85E\uDC70\uD847\uDDEB\u6663\uD84C\uDED2\uD84C\uDEE1\u661E\uD856\uDC72\u38D1\uD84E\uDC3A\uD84D\uDFBC\u3B99\uD84D\uDFA2\uD84C\uDFFE\u74D0\u3B96\u678F\uD851\uDE2A\u68B6\u681E\u3BC4\u6ABE\u3863\uD84D\uDFD5\uD851\uDC87\u6A33\u6A52\u6AC9\u6B05\uD846\uDD12\u6511\u6898\u6A4C\u3BD7\u6A7A\u6B57\uD84F\uDFC0\uD84F\uDC9A\u93A0\u92F2\uD862\uDFEA\uD862\uDECB"],["9440","\u9289\uD860\uDC1E\uD862\uDDDC\u9467\u6DA5\u6F0B\uD852\uDDEC\u6D67\uD84F\uDF7F\u3D8F\u6E04\uD850\uDC3C\u5A3D\u6E0A\u5847\u6D24\u7842\u713B\uD850\uDF1A\uD850\uDE76\u70F1\u7250\u7287\u7294\uD851\uDF8F\uD851\uDF25\u5179\uD852\uDEA4\uD841\uDDEB\u747A\uD84F\uDEF8\uD84D\uDE5F\uD852\uDE4A\uD852\uDD17\uD857\uDFE1\u3F06\u3EB1\uD852\uDEDF\uD863\uDC23\uD84F\uDF35\u60A7\u3EF3\u74CC\u743C\u9387\u7437\u449F\uD85B\uDDEA\u4551\u7583\u3F63\uD853\uDCD9\uD853\uDD06\u3F58\u7555\u7673\uD869\uDDC6\u3B19\u7468\uD862\uDECC\uD852\uDDAB\uD852\uDD8E\u3AFB"],["94a1","\u3DCD\uD852\uDE4E\u3EFF\uD852\uDDC5\uD852\uDCF3\u91FA\u5732\u9342\uD862\uDEE3\uD846\uDC64\u50DF\uD854\uDE21\uD854\uDDE7\u7778\uD84C\uDE32\u770E\u770F\u777B\uD851\uDE97\uD84D\uDF81\u3A5E\uD852\uDCF0\u7438\u749B\u3EBF\uD852\uDEBA\uD852\uDEC7\u40C8\uD852\uDE96\uD858\uDDAE\u9307\uD855\uDD81\u781E\u788D\u7888\u78D2\u73D0\u7959\uD85D\uDF41\uD855\uDEE3\u410E\u799B\u8496\u79A5\u6A2D\uD84F\uDEFA\u7A3A\u79F4\u416E\uD845\uDEE6\u4132\u9235\u79F1\uD843\uDD4C\uD852\uDD8C\uD840\uDE99\uD84F\uDDBA\uD845\uDF6E\u3597\u556B\u3570\u36AA\uD840\uDDD4\uD843\uDC0D\u7AE2\u5A59\uD849\uDEF5\uD856\uDEAF\uD856\uDE9C\u5A0D\uD840\uDE5B\u78F0\u5A2A\uD856\uDFC6\u7AFE\u41F9\u7C5D\u7C6D\u4211\uD856\uDFB3\uD857\uDEBC\uD857\uDEA6\u7CCD\uD852\uDDF9\uD845\uDFB0\u7C8E\u7C7C\u7CAE\u6AB2\u7DDC\u7E07\u7DD3\u7F4E\uD858\uDE61"],["9540","\uD858\uDD5C\uD85E\uDF48\u7D97\uD857\uDE82\u426A\uD85A\uDF75\uD842\uDD16\u67D6\uD840\uDC4E\uD84D\uDDCF\u57C4\uD859\uDC12\uD858\uDFF8\uD852\uDD62\u7FDD\u7B27\uD842\uDC2C\uD856\uDEE9\uD857\uDD43\u7B0C\uD857\uDE0E\u99E6\u8645\u9A63\u6A1C\uD84D\uDC3F\u39E2\uD852\uDDF7\uD859\uDDAD\u9A1F\uD859\uDDA0\u8480\uD85C\uDD27\uD85B\uDCD1\u44EA\u8137\u4402\u80C6\u8109\u8142\uD859\uDFB4\u98C3\uD85A\uDE42\u8262\u8265\uD85A\uDE51\u8453\uD85B\uDDA7\u8610\uD85C\uDE1B\u5A86\u417F\uD846\uDC40\u5B2B\uD846\uDCA1\u5AE4\uD846\uDCD8\u86A0\uD87E\uDDBC\uD84F\uDD8F\u882D\uD85D\uDC22\u5A02"],["95a1","\u886E\u4F45\u8887\u88BF\u88E6\u8965\u894D\uD855\uDE83\u8954\uD85D\uDF85\uD85D\uDF84\uD862\uDFF5\uD862\uDFD9\uD862\uDF9C\uD862\uDDF9\u3EAD\u84A3\u46F5\u46CF\u37F2\u8A3D\u8A1C\uD865\uDC48\u5F4D\u922B\uD850\uDE84\u65D4\u7129\u70C4\uD846\uDC45\u9D6D\u8C9F\u8CE9\uD85F\uDDDC\u599A\u77C3\u59F0\u436E\u36D4\u8E2A\u8EA7\uD853\uDC09\u8F30\u8F4A\u42F4\u6C58\u6FBB\uD848\uDF21\u489B\u6F79\u6E8B\uD845\uDFDA\u9BE9\u36B5\uD852\uDD2F\u90BB\u9097\u5571\u4906\u91BB\u9404\uD862\uDE4B\u4062\uD862\uDEFC\u9427\uD863\uDC1D\uD863\uDC3B\u84E5\u8A2B\u9599\u95A7\u9597\u9596\uD863\uDD34\u7445\u3EC2\uD852\uDCFF\uD852\uDE42\uD850\uDFEA\u3EE7\uD84C\uDE25\u968F\uD863\uDEE7\uD863\uDE66\uD863\uDE65\u3ECC\uD852\uDDED\uD852\uDE78\uD84F\uDFEE\u7412\u746B\u3EFC\u9741\uD864\uDCB0"],["9640","\u6847\u4A1D\uD864\uDC93\uD855\uDFDF\u975D\u9368\uD862\uDD89\uD863\uDC26\uD862\uDF2F\uD858\uDFBE\u92BA\u5B11\u8B69\u493C\u73F9\uD850\uDE1B\u979B\u9771\u9938\uD843\uDF26\u5DC1\uD862\uDFC5\uD852\uDEB2\u981F\uD865\uDCDA\u92F6\uD865\uDDD7\u91E5\u44C0\uD862\uDF50\uD852\uDE67\uD862\uDF64\u98DC\uD862\uDE45\u3F00\u922A\u4925\u8414\u993B\u994D\uD85E\uDF06\u3DFD\u999B\u4B6F\u99AA\u9A5C\uD862\uDF65\uD856\uDCC8\u6A8F\u9A21\u5AFE\u9A2F\uD866\uDCF1\u4B90\uD866\uDD48\u99BC\u4BBD\u4B97\u937D\u5872\uD844\uDF02\u5822\uD852\uDDB8"],["96a1","\uD845\uDCE8\u7844\uD849\uDF1F\uD84F\uDDB8\u68C5\u3D7D\u9458\u3927\u6150\uD849\uDF81\uD84A\uDD6B\u6107\u9C4F\u9C53\u9C7B\u9C35\u9C10\u9B7F\u9BCF\uD867\uDE2D\u9B9F\uD868\uDDF5\uD868\uDCFE\u9D21\u4CAE\uD850\uDD04\u9E18\u4CB0\u9D0C\uD868\uDDB4\uD868\uDCED\uD868\uDCF3\uD866\uDD2F\u9DA5\u84BD\uD85B\uDE12\uD85B\uDFDF\uD85A\uDF82\u85FC\u4533\uD85B\uDDA4\uD85B\uDE84\uD85B\uDDF0\u8420\u85EE\uD85B\uDE00\uD84D\uDFD7\uD858\uDC64\u79E2\uD84D\uDD9C\uD84D\uDE40\u492D\uD852\uDDDE\u3D62\u93DB\u92BE\u9348\uD840\uDEBF\u78B9\u9277\u944D\u4FE4\u3440\u9064\uD855\uDD5D\u783D\u7854\u78B6\u784B\uD845\uDF57\uD84C\uDDC9\uD852\uDD41\u369A\u4F72\u6FDA\u6FD9\u701E\u701E\u5414\uD850\uDDB5\u57BB\u58F3\u578A\u9D16\u57D7\u7134\u34AF\uD850\uDDAC\u71EB\uD85B\uDC40\uD853\uDF97\u5B28\uD845\uDFB5\uD862\uDE49"],["9740","\u610C\u5ACE\u5A0B\u42BC\uD851\uDC88\u372C\u4B7B\uD862\uDDFC\u93BB\u93B8\uD846\uDCD6\uD843\uDF1D\u8472\uD85B\uDCC0\uD845\uDC13\uD850\uDEFA\uD84B\uDC26\uD850\uDFC1\u5994\uD84F\uDDB7\uD859\uDF41\u7DA8\uD858\uDD5B\uD858\uDCA4\uD852\uDDB9\uD852\uDD8B\uD862\uDDFA\u92E5\u73E2\u3EE9\u74B4\uD862\uDF63\uD846\uDC9F\u3EE1\uD852\uDEB3\u6AD8\u73F3\u73FB\u3ED6\uD852\uDE3E\uD852\uDE94\uD845\uDFD9\uD852\uDE66\uD840\uDFA7\uD845\uDC24\uD852\uDDE5\u7448\uD852\uDD16\u70A5\uD852\uDD76\u9284\u73E6\u935F\uD841\uDCFE\u9331\uD862\uDECE\uD862\uDE16\u9386\uD862\uDFE7\uD855\uDDD5\u4935\uD862\uDE82\u716B"],["97a1","\uD852\uDD43\uD843\uDCFF\u56A4\uD841\uDE1A\uD842\uDFEB\uD843\uDCB8\u5502\u79C4\uD845\uDFFA\u7DFE\uD845\uDEC2\uD852\uDE50\uD846\uDC52\u452E\u9401\u370A\uD862\uDEC0\uD852\uDDAD\u59B0\uD846\uDCBF\uD846\uDC83\uD85D\uDC84\u5AA1\u36E2\uD84F\uDD5B\u36B0\u925F\u5A79\uD862\uDE81\uD846\uDC62\u9374\u3CCD\uD842\uDEB4\u4A96\u398A\u50F4\u3D69\u3D4C\uD844\uDF9C\u7175\u42FB\uD860\uDE18\u6E0F\uD864\uDCE4\u44EB\u6D57\uD85F\uDE4F\u7067\u6CAF\u3CD6\uD84F\uDFED\uD84F\uDE2D\u6E02\u6F0C\u3D6F\uD840\uDFF5\u7551\u36BC\u34C8\u4680\u3EDA\u4871\u59C4\u926E\u493E\u8F41\uD863\uDC1C\uD85A\uDFC0\u5812\u57C8\u36D6\uD845\uDC52\u70FE\uD850\uDF62\uD852\uDE71\uD84B\uDFE3\uD844\uDEB0\uD848\uDFBD\u68B9\u6967\uD844\uDF98\uD84D\uDCE5\uD85E\uDFF4\uD84D\uDEDF\uD862\uDE83\uD84D\uDFD6\uD84C\uDFFA\uD853\uDC9F\u6A1A\uD84D\uDEAD\uD85B\uDCB7\u843E\u44DF\u44CE"],["9840","\uD85B\uDD26\uD85B\uDD51\uD85B\uDC82\uD85B\uDFDE\u6F17\uD85C\uDD09\u833D\uD845\uDF3A\u83ED\uD85B\uDC80\uD85C\uDC53\uD845\uDFDB\u5989\u5A82\uD845\uDFB3\u5A61\u5A71\uD846\uDD05\uD850\uDDFC\u372D\u59EF\uD845\uDF3C\u36C7\u718E\u9390\u669A\uD850\uDEA5\u5A6E\u5A2B\uD850\uDE93\u6A2B\uD84F\uDEF9\uD85D\uDF36\uD851\uDC5B\uD850\uDECA\u711D\uD850\uDE59\uD862\uDDE1\u4FB0\uD85B\uDD28\u5CC2\uD851\uDCCE\uD85F\uDE4D\uD850\uDFBD\u6A0C\uD850\uDE56\uD844\uDF04\u70A6\u7133\uD850\uDFE9\u3DA5\u6CDF\uD87E\uDC25\uD852\uDE4F\u7E65\u59EB\u5D2F\u3DF3\u5F5C\uD852\uDE5D\uD845\uDFDF\u7DA4\u8426"],["98a1","\u5485\uD84E\uDEFA\uD84C\uDF00\uD840\uDE14\u577E\uD842\uDCD5\uD841\uDE19\u3FE5\uD847\uDF9E\uD868\uDEB6\u7003\uD864\uDD5B\u5D70\u738F\u7CD3\uD862\uDE59\uD865\uDC20\u4FC8\u7FE7\u72CD\u7310\uD85E\uDEF4\u7338\u7339\uD855\uDEF6\u7341\u7348\u3EA9\uD85E\uDF18\u906C\u71F5\uD852\uDCF2\u73E1\u81F6\u3ECA\u770C\u3ED1\u6CA2\u56FD\u7419\u741E\u741F\u3EE2\u3EF0\u3EF4\u3EFA\u74D3\u3F0E\u3F53\u7542\u756D\u7572\u758D\u3F7C\u75C8\u75DC\u3FC0\u764D\u3FD7\u7674\u3FDC\u767A\uD853\uDF5C\u7188\u5623\u8980\u5869\u401D\u7743\u4039\u6761\u4045\u35DB\u7798\u406A\u406F\u5C5E\u77BE\u77CB\u58F2\u7818\u70B9\u781C\u40A8\u7839\u7847\u7851\u7866\u8448\uD855\uDD35\u7933\u6803\u7932\u4103"],["9940","\u4109\u7991\u7999\u8FBB\u7A06\u8FBC\u4167\u7A91\u41B2\u7ABC\u8279\u41C4\u7ACF\u7ADB\u41CF\u4E21\u7B62\u7B6C\u7B7B\u7C12\u7C1B\u4260\u427A\u7C7B\u7C9C\u428C\u7CB8\u4294\u7CED\u8F93\u70C0\uD843\uDCCF\u7DCF\u7DD4\u7DD0\u7DFD\u7FAE\u7FB4\u729F\u4397\u8020\u8025\u7B39\u802E\u8031\u8054\u3DCC\u57B4\u70A0\u80B7\u80E9\u43ED\u810C\u732A\u810E\u8112\u7560\u8114\u4401\u3B39\u8156\u8159\u815A"],["99a1","\u4413\u583A\u817C\u8184\u4425\u8193\u442D\u81A5\u57EF\u81C1\u81E4\u8254\u448F\u82A6\u8276\u82CA\u82D8\u82FF\u44B0\u8357\u9669\u698A\u8405\u70F5\u8464\u60E3\u8488\u4504\u84BE\u84E1\u84F8\u8510\u8538\u8552\u453B\u856F\u8570\u85E0\u4577\u8672\u8692\u86B2\u86EF\u9645\u878B\u4606\u4617\u88AE\u88FF\u8924\u8947\u8991\uD85E\uDD67\u8A29\u8A38\u8A94\u8AB4\u8C51\u8CD4\u8CF2\u8D1C\u4798\u585F\u8DC3\u47ED\u4EEE\u8E3A\u55D8\u5754\u8E71\u55F5\u8EB0\u4837\u8ECE\u8EE2\u8EE4\u8EED\u8EF2\u8FB7\u8FC1\u8FCA\u8FCC\u9033\u99C4\u48AD\u98E0\u9213\u491E\u9228\u9258\u926B\u92B1\u92AE\u92BF"],["9a40","\u92E3\u92EB\u92F3\u92F4\u92FD\u9343\u9384\u93AD\u4945\u4951\u9EBF\u9417\u5301\u941D\u942D\u943E\u496A\u9454\u9479\u952D\u95A2\u49A7\u95F4\u9633\u49E5\u67A0\u4A24\u9740\u4A35\u97B2\u97C2\u5654\u4AE4\u60E8\u98B9\u4B19\u98F1\u5844\u990E\u9919\u51B4\u991C\u9937\u9942\u995D\u9962\u4B70\u99C5\u4B9D\u9A3C\u9B0F\u7A83\u9B69\u9B81\u9BDD\u9BF1\u9BF4\u4C6D\u9C20\u376F\uD846\uDFC2\u9D49\u9C3A"],["9aa1","\u9EFE\u5650\u9D93\u9DBD\u9DC0\u9DFC\u94F6\u8FB6\u9E7B\u9EAC\u9EB1\u9EBD\u9EC6\u94DC\u9EE2\u9EF1\u9EF8\u7AC8\u9F44\uD840\uDC94\uD840\uDEB7\uD840\uDFA0\u691A\u94C3\u59AC\uD841\uDCD7\u5840\u94C1\u37B9\uD841\uDDD5\uD841\uDE15\uD841\uDE76\uD845\uDEBA\u5757\u7173\uD842\uDEC2\uD842\uDECD\uD842\uDFBF\u546A\uD87E\uDC3B\uD842\uDFCB\u549E\uD842\uDFFB\uD843\uDC3B\uD843\uDC53\uD843\uDC65\uD843\uDC7C\u60E7\uD843\uDC8D\u567A\uD843\uDCB5\uD843\uDCDD\uD843\uDCED\uD843\uDD6F\uD843\uDDB2\uD843\uDDC8\u6955\u9C2F\u87A5\uD843\uDE04\uD843\uDE0E\uD843\uDED7\uD843\uDF90\uD843\uDF2D\uD843\uDE73\u5C20\uD843\uDFBC\u5E0B\uD844\uDC5C\uD844\uDC4F\uD844\uDC76\u671E\uD844\uDC7B\uD844\uDC88\uD844\uDC96\u3647\uD844\uDCBF\uD844\uDCD3\uD844\uDD2F\uD844\uDD3B\u5364\u84AD\uD844\uDEE3\uD844\uDF75\uD844\uDF36\u8B81\uD845\uDD77\uD845\uDE19\uD845\uDFC3\uD845\uDFC7\u4E78\u70BB\uD846\uDC2D\uD846\uDD6A"],["9b40","\uD846\uDE2D\uD846\uDE45\uD847\uDC2A\uD847\uDC70\uD847\uDCAC\uD847\uDEC8\u62C3\uD847\uDED5\uD847\uDF15\u7198\u6855\uD848\uDC45\u69E9\u36C8\uD848\uDE7C\uD848\uDFD7\uD848\uDFFA\uD849\uDF2A\uD84A\uDC71\uD84A\uDD4F\u82FD\uD84A\uDD67\uD84A\uDD93\uD84A\uDED5\u89A5\uD84A\uDEE8\u8FA0\uD84A\uDF0E\u97B8\uD84A\uDF3F\u9847\u9ABD\uD84B\uDC4C"],["9b62","\uD84B\uDC88\uD84B\uDCB7\uD856\uDFE8\uD84B\uDD08\uD84B\uDD12\uD84B\uDDB7\uD84B\uDD95\uD84B\uDE42\uD84B\uDF74\uD84B\uDFCC\uD84C\uDC33\uD84C\uDC66\uD84C\uDF1F\uD84C\uDFDE\u5FB1\u6648\u66BF\uD85E\uDE79\uD84D\uDD67\uD84D\uDDF3\u7201\uD852\uDDBA\u77D7\uD84D\uDE1A\uD84D\uDF16\u7E87\uD840\uDF46\u58B5\u670E"],["9ba1","\u6918\uD84E\uDEA7\uD85D\uDE57\uD857\uDFE2\uD84F\uDE11\uD84F\uDEB9\uD85D\uDDFE\uD848\uDC9A\u48D0\u4AB8\uD850\uDD19\uD862\uDE9A\uD850\uDEEE\uD850\uDF0D\uD850\uDC3B\uD850\uDF34\uD850\uDF96\uD852\uDE45\uD841\uDDCA\u51D2\uD841\uDE11\u599F\uD847\uDEA8\u3BBE\uD84F\uDCFF\uD851\uDC04\uD851\uDCD6\u5788\uD851\uDE74\u399B\uD851\uDF2F\uD861\uDDE8\uD866\uDDC9\u3762\uD848\uDDC3\u8B5E\uD862\uDF4E\u99D6\uD852\uDC12\uD852\uDCFB\uD852\uDE15\u7209\uD852\uDEC0\uD843\uDC78\u5965\uD853\uDEA5\uD853\uDF86\uD841\uDF79\u8EDA\uD854\uDC2C\u528F\u573F\u7171\uD854\uDE99\uD855\uDC19\uD84F\uDF4A\uD852\uDEA7\u55BC\uD855\uDC46\uD855\uDC6E\uD85A\uDF52\u91D4\u3473\uD855\uDD3F\uD85D\uDE32\uD855\uDD5E\u4718\uD855\uDD62\uD855\uDD66\uD855\uDFC7\uD852\uDD3F\uD856\uDC5D\u5066\u34FB\uD84C\uDFCC\u60DE\uD856\uDD03\u477C\uD862\uDD48\uD856\uDEAE\uD856\uDF89\uD857\uDC06\uD847\uDD90\u57A1\u7151\u6FB6\uD858\uDD02\uD85F\uDC12\u9056\uD858\uDDB2\uD853\uDF9A\u8B62\uD859\uDC02\uD859\uDC4A"],["9c40","\u5D5B\uD85A\uDFF7\u8F36\uD859\uDC84\uD846\uDD1C\u8AEA\uD852\uDDF6\uD859\uDC88\uD84F\uDFEF\uD859\uDD12\u4BC0\uD859\uDDBF\uD859\uDEB5\uD849\uDF1B\u9465\uD855\uDFE1\u6195\u5A27\uD87E\uDCCD\u4FBB\u56B9\uD851\uDD21\uD859\uDEFC\u4E6A\uD852\uDD34\u9656\u6D8F\uD85B\uDCBD\u3618\u8977\uD859\uDF99\uD85A\uDC6E\uD859\uDC11\uD85A\uDC5E\u71DF\uD85A\uDCC7\u7B42\uD864\uDCC0\uD842\uDE11\uD85A\uDD26\u9104\uD85A\uDD39\u7A45\u9DF0\uD85A\uDDFA\u9A26\uD85A\uDE2D\u365F\uD859\uDC69\uD840\uDC21\u7983\uD85A\uDE34\uD85A\uDF5B\u5D2C\uD84D\uDD19\u83CF\uD85A\uDF9D\u46D0\uD85B\uDCA4\u753B\u8865\uD85B\uDDAE\u58B6"],["9ca1","\u371C\uD849\uDD8D\uD85C\uDC4B\uD85C\uDDCD\u3C54\uD85C\uDE80\uD85C\uDE85\u9281\uD848\uDD7A\uD85C\uDE8B\u9330\uD85C\uDEE6\uD852\uDDD0\u6C39\u949F\uD85D\uDC50\uD843\uDEF8\u8827\u88F5\uD84A\uDD26\uD861\uDC73\uD845\uDFB1\u6EB8\uD852\uDE2A\uD846\uDC20\u39A4\u36B9\u5C10\u79E3\u453F\u66B6\uD867\uDCAD\uD866\uDCA4\u8943\uD85D\uDFCC\uD85E\uDC58\u56D6\u40DF\uD845\uDE0A\u39A1\uD84D\uDF2F\uD860\uDCE8\uD844\uDFC5\u71AD\u8366\uD85E\uDDDD\uD864\uDDA8\u5A67\u4CB7\uD85C\uDCAF\uD862\uDDAB\uD85E\uDDFD\uD85E\uDE0A\uD85E\uDF0B\uD85F\uDD66\uD850\uDD7A\u7B43\u797E\uD860\uDC09\u6FB5\uD868\uDEDF\u6A03\uD860\uDF18\u53A2\uD85B\uDE07\u93BF\u6836\u975D\uD860\uDD6F\uD860\uDC23\uD85A\uDDB5\uD844\uDFED\uD84C\uDE2F\uD860\uDC48\u5D85\uD863\uDC30\uD860\uDC83\u5715\u9823\uD862\uDD49\u5DAB\uD852\uDD88\u65BE\u69D5\u53D2\uD852\uDEA5\uD84F\uDF81\u3C11\u6736\uD860\uDC90\uD860\uDCF4\uD860\uDD2E\uD847\uDFA1\uD860\uDD4F"],["9d40","\uD860\uDD89\uD860\uDDAF\uD860\uDE1A\uD860\uDF06\uD860\uDF2F\uD860\uDF8A\u35CA\uD861\uDC68\uD861\uDEAA\u48FA\u63E6\uD862\uDD56\u7808\u9255\uD862\uDDB8\u43F2\uD862\uDDE7\u43DF\uD862\uDDE8\uD862\uDF46\uD862\uDFD4\u59F8\uD863\uDC09\u8F0B\uD863\uDFC5\uD864\uDCEC\u7B51\uD864\uDD10\uD864\uDD3C\u3DF7\uD864\uDD5E\uD852\uDECA\u8FD0\u728F\u568B\uD865\uDCE7\uD865\uDDE9\uD865\uDDB0\uD865\uDDB8\uD865\uDF32\uD866\uDCD1\uD866\uDD49\uD866\uDD6A\uD866\uDDC3\uD866\uDE28\uD866\uDF0E\uD867\uDD5A\uD867\uDD9B\u7E9F\uD867\uDEF8\uD867\uDF23\u4CA4\u9547\uD868\uDE93\u71A2\uD868\uDEFF\u4D91\u9012\uD869\uDDCB\u4D9C\uD843\uDC9C\u8FBE\u55C1"],["9da1","\u8FBA\uD849\uDCB0\u8FB9\uD852\uDE93\u4509\u7E7F\u6F56\u6AB1\u4EEA\u34E4\uD862\uDF2C\uD85E\uDC9D\u373A\u8E80\uD845\uDFF5\uD860\uDC24\uD862\uDF6C\uD862\uDF99\uD85E\uDE3E\uD859\uDEAF\u3DEB\uD85D\uDE55\uD84F\uDCB7\uD855\uDE35\uD856\uDD56\u4E9A\uD857\uDE81\uD858\uDE58\u56BF\uD843\uDE6D\u8E0E\u5B6D\uD84F\uDE88\uD853\uDC9E\u63DE\u62D0\uD845\uDFF6\uD846\uDC7B\u6530\u562D\uD857\uDC4A\u541A\uD854\uDF11\u3DC6\uD867\uDD98\u4C7D\u5622\u561E\u7F49\uD857\uDED8\u5975\uD84F\uDD40\u8770\u4E1C\uD843\uDFEA\uD843\uDD49\uD84D\uDEBA\u8117\u9D5E\u8D18\u763B\u9C45\u764E\u77B9\u9345\u5432\u8148\u82F7\u5625\u8132\u8418\u80BD\u55EA\u7962\u5643\u5416\uD843\uDE9D\u35CE\u5605\u55F1\u66F1\uD860\uDEE2\u362D\u7534\u55F0\u55BA\u5497\u5572\uD843\uDC41\uD843\uDC96\u5ED0\uD854\uDD48\uD843\uDE76\uD84B\uDC62"],["9e40","\uD843\uDEA2\u9EAB\u7D5A\u55DE\uD844\uDC75\u629D\u976D\u5494\u8CCD\u71F6\u9176\u63FC\u63B9\u63FE\u5569\uD84A\uDF43\u9C72\uD84B\uDEB3\u519A\u34DF\uD843\uDDA7\u51A7\u544D\u551E\u5513\u7666\u8E2D\uD85A\uDC8A\u75B1\u80B6\u8804\u8786\u88C7\u81B6\u841C\uD844\uDCC1\u44EC\u7304\uD851\uDF06\u5B90\u830B\uD85A\uDC93\u567B\uD849\uDEF4\uD85F\uDD2F\uD850\uDDA3\uD85F\uDD73\uD85B\uDED0\uD85C\uDEB6\u9170\uD844\uDDD9\u9208\uD84F\uDCFC\uD869\uDEA9\uD843\uDEAC\uD843\uDEF9\u7266\uD847\uDCA2\u474E\uD853\uDFC2\uD85F\uDFF9\uD843\uDFEB\u40FA"],["9ea1","\u9C5D\u651F\uD84B\uDDA0\u48F3\uD851\uDFE0\uD867\uDD7C\uD843\uDFEC\uD843\uDE0A\u6062\uD85D\uDDA3\uD843\uDFED"],["9ead","\uD858\uDC48\uD844\uDD87\u71A3\u7E8E\u9D50\u4E1A\u4E04\u3577\u5B0D\u6CB2\u5367\u36AC\u39DC\u537D\u36A5\uD851\uDE18\u589A\uD852\uDF6E\u822D\u544B\u57AA\uD856\uDE95\uD842\uDD79"],["9ec5","\u3A52\uD849\uDC65\u7374\uD867\uDEAC\u4D09\u9BED\uD84F\uDCFE\uD867\uDF30\u4C5B\uD853\uDFA9\uD865\uDD9E\uD867\uDFDE\u845C\uD84F\uDDB6\uD85C\uDEB2\uD859\uDFB3\uD84D\uDF20\u632E\u7D25\uD84F\uDEF7\uD84F\uDE2C\u3A2A\u9008\u52CC\u3E74\u367A\u45E9\uD841\uDC8E\u7640\u5AF0\uD843\uDEB6\u787A\uD85F\uDF2E\u58A7\u40BF\u567C\u9B8B\u5D74\u7654\uD869\uDC34\u9E85\u4CE1\u75F9\u37FB\u6119\uD84C\uDCDA\uD850\uDFF2"],["9ef5","\u565D\uD844\uDEA9\u57A7\uD852\uDD63\uD867\uDE06\u5234\uD85C\uDCAE\u35AD\u6C4A\u9D7C"],["9f40","\u7C56\u9B39\u57DE\uD845\uDF6C\u5C53\u64D3\uD865\uDCD0\uD858\uDF35\uD85C\uDD64\u86AD\uD843\uDD28\uD85B\uDD22\uD852\uDEE2\uD843\uDD71"],["9f4f","\u51FE\uD847\uDF0F\u5D8E\u9703\uD847\uDDD1\u9E81\u904C\u7B1F\u9B02\u5CD1\u7BA3\u6268\u6335\u9AFF\u7BCF\u9B2A\u7C7E\u9B2E\u7C42\u7C86\u9C15\u7BFC\u9B09\u9F17\u9C1B\uD852\uDD3E\u9F5A\u5573\u5BC3\u4FFD\u9E98\u4FF2\u5260\u3E06\u52D1\u5767\u5056\u59B7\u5E12\u97C8\u9DAB\u8F5C\u5469\u97B4\u9940\u97BA\u532C\u6130"],["9fa1","\u692C\u53DA\u9C0A\u9D02\u4C3B\u9641\u6980\u50A6\u7546\uD845\uDF6D\u99DA\u5273"],["9fae","\u9159\u9681\u915C"],["9fb2","\u9151\uD863\uDE97\u637F\uD85B\uDD23\u6ACA\u5611\u918E\u757A\u6285\uD840\uDFFC\u734F\u7C70\uD857\uDC21\uD84F\uDCFD"],["9fc1","\uD852\uDD19\u76D6\u9B9D\u4E2A\uD843\uDCD4\u83BE\u8842"],["9fc9","\u5C4A\u69C0\u50ED\u577A\u521F\u5DF5\u4ECE\u6C31\uD840\uDDF2\u4F39\u549C\u54DA\u529A\u8D82\u35FE\u5F0C\u35F3"],["9fdb","\u6B52\u917C\u9FA5\u9B97\u982E\u98B4\u9ABA\u9EA8\u9E84\u717A\u7B14"],["9fe7","\u6BFA\u8818\u7F78"],["9feb","\u5620\uD869\uDE4A\u8E77\u9F53"],["9ff0","\u8DD4\u8E4F\u9E1C\u8E01\u6282\uD860\uDF7D\u8E28\u8E75\u7AD3\uD852\uDE77\u7A3E\u78D8\u6CEA\u8A67\u7607"],["a040","\uD862\uDE5A\u9F26\u6CCE\u87D6\u75C3\uD868\uDEB2\u7853\uD87E\uDC40\u8D0C\u72E2\u7371\u8B2D\u7302\u74F1\u8CEB\uD852\uDEBB\u862F\u5FBA\u88A0\u44B7"],["a055","\uD846\uDC3B\uD85B\uDE05"],["a058","\u8A7E\uD849\uDD1B"],["a05b","\u60FD\u7667\u9AD7\u9D44\u936E\u9B8F\u87F5"],["a063","\u880F\u8CF7\u732C\u9721\u9BB0\u35D6\u72B2\u4C07\u7C51\u994A\uD858\uDD59\u6159\u4C04\u9E96\u617D"],["a073","\u575F\u616F\u62A6\u6239\u62CE\u3A5C\u61E2\u53AA\uD84C\uDFF5\u6364\u6802\u35D2"],["a0a1","\u5D57\uD862\uDFC2\u8FDA\uD863\uDE39"],["a0a6","\u50D9\uD847\uDD46\u7906\u5332\u9638\uD843\uDF3B\u4065"],["a0ae","\u77FE"],["a0b0","\u7CC2\uD857\uDF1A\u7CDA\u7A2D\u8066\u8063\u7D4D\u7505\u74F2\u8994\u821A\u670C\u8062\uD85D\uDC86\u805B\u74F0\u8103\u7724\u8989\uD859\uDFCC\u7553\uD85B\uDED1\u87A9\u87CE\u81C8\u878C\u8A49\u8CAD\u8B43\u772B\u74F8\u84DA\u3635\u69B2\u8DA6"],["a0d4","\u89A9\u7468\u6DB9\u87C1\uD850\uDC11\u74E7\u3DDB\u7176\u60A4\u619C\u3CD1\u7162\u6077"],["a0e2","\u7F71\uD862\uDF2D\u7250\u60E9\u4B7E\u5220\u3C18\uD84F\uDCC7\uD857\uDED7\uD85D\uDE56\uD855\uDD31\uD846\uDD44\uD844\uDEFE\uD866\uDD03\uD85B\uDDDC\uD85C\uDCAD\u5CC1\uD858\uDDAD\uD862\uDE0F\uD84D\uDE77\uD840\uDCEE\uD85A\uDC46\uD853\uDF0E\u4562\u5B1F\uD858\uDF4C\u9F50\u9EA6\uD858\uDE6B"],["a3c0","\u2400",31,"\u2421"],["c6a1","\u2460",9,"\u2474",9,"\u2170",9,"\u4E36\u4E3F\u4E85\u4EA0\u5182\u5196\u51AB\u52F9\u5338\u5369\u53B6\u590A\u5B80\u5DDB\u2F33\u5E7F\u5EF4\u5F50\u5F61\u6534\u65E0\u7592\u7676\u8FB5\u96B6\xA8\u02C6\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\uFF3B\uFF3D\u273D\u3041",23],["c740","\u3059",58,"\u30A1\u30A2\u30A3\u30A4"],["c7a1","\u30A5",81,"\u0410",5,"\u0401\u0416",4],["c840","\u041B",26,"\u0451\u0436",25,"\u21E7\u21B8\u21B9\u31CF\uD840\uDCCC\u4E5A\uD840\uDC8A\u5202\u4491"],["c8a1","\u9FB0\u5188\u9FB1\uD85D\uDE07"],["c8cd","\uFFE2\uFFE4\uFF07\uFF02\u3231\u2116\u2121\u309B\u309C\u2E80\u2E84\u2E86\u2E87\u2E88\u2E8A\u2E8C\u2E8D\u2E95\u2E9C\u2E9D\u2EA5\u2EA7\u2EAA\u2EAC\u2EAE\u2EB6\u2EBC\u2EBE\u2EC6\u2ECA\u2ECC\u2ECD\u2ECF\u2ED6\u2ED7\u2EDE\u2EE3"],["c8f5","\u0283\u0250\u025B\u0254\u0275\u0153\xF8\u014B\u028A\u026A"],["f9fe","\uFFED"],["fa40","\uD841\uDD47\u92DB\uD841\uDDDF\uD84F\uDFC5\u854C\u42B5\u73EF\u51B5\u3649\uD852\uDD42\uD862\uDDE4\u9344\uD846\uDDDB\u82EE\uD84F\uDCC8\u783C\u6744\u62DF\uD852\uDD33\uD862\uDDAA\uD840\uDEA0\uD85A\uDFB3\uD844\uDF05\u4FAB\uD849\uDCED\u5008\uD85B\uDD29\uD85E\uDE84\uD84D\uDE00\uD852\uDEB1\uD849\uDD13\u5029\uD840\uDF7E\u5FA4\uD840\uDF80\uD840\uDF47\u6EDB\uD841\uDC1F\u507D\u5101\u347A\u510E\u986C\u3743\u8416\uD852\uDDA4\uD841\uDC87\u5160\uD84C\uDFB4\u516A\uD842\uDFFF\uD848\uDCFC\uD840\uDEE5\uD849\uDD30\uD841\uDD8E\uD84C\uDE33\uD846\uDD83\u5B82\u877D\uD841\uDDB3\uD84F\uDC99\u51B2\u51B8"],["faa1","\u9D34\u51C9\u51CF\u51D1\u3CDC\u51D3\uD852\uDEA6\u51B3\u51E2\u5342\u51ED\u83CD\u693E\uD84D\uDF2D\u5F7B\u520B\u5226\u523C\u52B5\u5257\u5294\u52B9\u52C5\u7C15\u8542\u52E0\u860D\uD85A\uDF13\u5305\uD862\uDEDE\u5549\u6ED9\uD84F\uDF80\uD842\uDD54\uD84F\uDFEC\u5333\u5344\uD842\uDFE2\u6CCB\uD845\uDF26\u681B\u73D5\u604A\u3EAA\u38CC\uD845\uDEE8\u71DD\u44A2\u536D\u5374\uD861\uDEAB\u537E\u537F\uD845\uDD96\uD845\uDE13\u77E6\u5393\uD862\uDE9B\u53A0\u53AB\u53AE\u73A7\uD855\uDF72\u3F59\u739C\u53C1\u53C5\u6C49\u4E49\u57FE\u53D9\u3AAB\uD842\uDF8F\u53E0\uD84F\uDFEB\uD84B\uDDA3\u53F6\uD843\uDC77\u5413\u7079\u552B\u6657\u6D5B\u546D\uD85A\uDF53\uD843\uDD74\u555D\u548F\u54A4\u47A6\uD845\uDF0D\uD843\uDEDD\u3DB4\uD843\uDD4D"],["fb40","\uD862\uDDBC\uD849\uDE98\u5547\u4CED\u542F\u7417\u5586\u55A9\u5605\uD846\uDCD7\uD850\uDC3A\u4552\uD851\uDC35\u66B3\uD844\uDCB4\u5637\u66CD\uD84C\uDE8A\u66A4\u66AD\u564D\u564F\u78F1\u56F1\u9787\u53FE\u5700\u56EF\u56ED\uD862\uDF66\u3623\uD844\uDE4F\u5746\uD850\uDDA5\u6C6E\u708B\u5742\u36B1\uD85B\uDC7E\u57E6\uD845\uDC16\u5803\uD845\uDC54\uD850\uDF63\u5826\uD852\uDFF5\u585C\u58AA\u3561\u58E0\u58DC\uD844\uDE3C\u58FB\u5BFF\u5743\uD868\uDD50\uD850\uDE78\u93D3\u35A1\u591F\u68A6\u36C3\u6E59"],["fba1","\uD845\uDE3E\u5A24\u5553\uD845\uDE92\u8505\u59C9\uD843\uDD4E\uD85B\uDC81\uD85B\uDD2A\uD845\uDFDC\u59D9\uD845\uDFFB\uD845\uDFB2\uD85B\uDDA6\u6D71\uD846\uDC28\uD845\uDED5\u59F9\uD85B\uDE45\u5AAB\u5A63\u36E6\uD852\uDDA9\u5A77\u3708\u5A96\u7465\u5AD3\uD85B\uDFA1\uD849\uDD54\u3D85\uD846\uDD11\u3732\uD845\uDEB8\u5E83\u52D0\u5B76\u6588\u5B7C\uD85E\uDE0E\u4004\u485D\uD840\uDE04\u5BD5\u6160\uD846\uDE34\uD856\uDDCC\uD841\uDDA5\u5BF3\u5B9D\u4D10\u5C05\uD846\uDF44\u5C13\u73CE\u5C14\uD847\uDCA5\uD85A\uDF28\u5C49\u48DD\u5C85\u5CE9\u5CEF\u5D8B\uD847\uDDF9\uD847\uDE37\u5D10\u5D18\u5D46\uD847\uDEA4\u5CBA\u5DD7\u82FC\u382D\uD852\uDD01\uD848\uDC49\uD848\uDD73\u8287\u3836\u3BC2\u5E2E\u6A8A\u5E75\u5E7A\uD851\uDCBC\uD843\uDCD3\u53A6\u4EB7\u5ED0\u53A8\uD845\uDF71\u5E09\u5EF4\uD861\uDC82"],["fc40","\u5EF9\u5EFB\u38A0\u5EFC\u683E\u941B\u5F0D\uD840\uDDC1\uD87E\uDC94\u3ADE\u48AE\uD844\uDF3A\u5F3A\uD85A\uDC88\uD848\uDFD0\u5F58\uD849\uDC71\u5F63\u97BD\uD85B\uDE6E\u5F72\u9340\uD862\uDE36\u5FA7\u5DB6\u3D5F\uD854\uDE50\uD847\uDF6A\uD85C\uDCF8\uD849\uDE68\u91D6\uD840\uDE9E\uD862\uDE29\u6031\u6685\uD846\uDC77\u3963\u3DC7\u3639\u5790\uD849\uDFB4\u7971\u3E40\u609E\u60A4\u60B3\uD852\uDD82\uD852\uDD8F\uD85E\uDE53\u74A4\u50E1\u5AA0\u6164\u8424\u6142\uD87E\uDCA6\uD85B\uDED2\u6181\u51F4\uD841\uDE56\u6187\u5BAA\uD84F\uDFB7"],["fca1","\uD84A\uDC5F\u61D3\uD862\uDF9D\uD866\uDD5D\u61D0\u3932\uD84A\uDD80\uD84A\uDCC1\u6023\u615C\u651E\u638B\uD840\uDD18\u62C5\uD845\uDF70\u62D5\uD84B\uDE0D\u636C\uD852\uDDDF\u3A17\u6438\u63F8\uD844\uDF8E\uD845\uDFFC\u6490\u6F8A\uD84B\uDE36\u9814\uD850\uDC8C\uD855\uDF1D\u64E1\u64E5\u947B\u3A66\u643A\u3A57\u654D\u6F16\uD852\uDE28\uD852\uDE23\u6585\u656D\u655F\uD84C\uDC7E\u65B5\uD852\uDD40\u4B37\u65D1\u40D8\uD846\uDC29\u65E0\u65E3\u5FDF\uD84D\uDC00\u6618\uD84C\uDDF7\uD84C\uDDF8\u6644\uD84C\uDDA4\uD84C\uDDA5\u664B\uD843\uDE75\u6667\uD854\uDDE6\u6673\u6674\uD847\uDE3D\uD84C\uDE31\uD861\uDDF4\uD84C\uDDC8\uD854\uDF13\u77C5\uD84A\uDCF7\u99A4\u6702\uD850\uDF9C\uD852\uDE21\u3B2B\u69FA\uD84D\uDFC2\u675E\u6767\u6762\uD850\uDDCD\uD864\uDCED\u67D7\u44E9\u6822\u6E50\u923C\u6801\uD84C\uDFE6\uD85B\uDDA0\u685D"],["fd40","\uD84D\uDC6F\u69E1\u6A0B\uD862\uDEDF\u6973\u68C3\uD84D\uDDCD\u6901\u6900\u3D32\u3A01\uD84D\uDE3C\u3B80\u67AC\u6961\uD862\uDE4A\u42FC\u6936\u6998\u3BA1\uD840\uDFC9\u8363\u5090\u69F9\uD84D\uDE59\uD848\uDD2A\u6A45\uD84D\uDF03\u6A9D\u3BF3\u67B1\u6AC8\uD864\uDD9C\u3C0D\u6B1D\uD842\uDD23\u60DE\u6B35\u6B74\uD849\uDFCD\u6EB5\uD84E\uDEDB\uD840\uDFB5\uD846\uDD58\u3740\u5421\uD84E\uDF5A\u6BE1\uD84F\uDEFC\u6BDC\u6C37\uD849\uDC8B\uD852\uDCF1\uD85A\uDF51\u6C5A\u8226\u6C79\uD84F\uDDBC\u44C5\uD84F\uDDBD\uD850\uDDA4\uD852\uDD0C\uD852\uDD00"],["fda1","\uD84F\uDCC9\u36E5\u3CEB\uD843\uDD32\u9B83\uD84C\uDDF9\uD849\uDC91\u7F8F\u6837\uD85B\uDD25\uD85B\uDDA1\uD85B\uDDEB\u6D96\u6D5C\u6E7C\u6F04\uD852\uDD7F\uD850\uDC85\uD85B\uDE72\u8533\uD85B\uDF74\u51C7\u6C9C\u6E1D\u842E\uD862\uDF21\u6E2F\uD84F\uDE2F\u7453\uD84F\uDF82\u79CC\u6E4F\u5A91\uD84C\uDC4B\u6FF8\u370D\u6F9D\uD84F\uDE30\u6EFA\uD845\uDC97\uD850\uDC3D\u4555\u93F0\u6F44\u6F5C\u3D4E\u6F74\uD864\uDD70\u3D3B\u6F9F\uD850\uDD44\u6FD3\uD850\uDC91\uD850\uDD55\uD850\uDC39\uD84F\uDFF0\uD84F\uDFB4\uD850\uDD3F\u51DF\uD850\uDD56\uD850\uDD57\uD850\uDD40\uD858\uDDDD\u704B\u707E\u70A7\u7081\u70CC\u70D5\u70D6\u70DF\u4104\u3DE8\u71B4\u7196\uD850\uDE77\u712B\u7145\u5A88\u714A\u716E\u5C9C\uD850\uDF65\u714F\u9362\uD850\uDEC1\u712C\uD851\uDC5A\uD852\uDE27\uD852\uDE22\u71BA\uD862\uDFE8\u70BD\u720E"],["fe40","\u9442\u7215\u5911\u9443\u7224\u9341\uD855\uDE05\u722E\u7240\uD852\uDD74\u68BD\u7255\u7257\u3E55\uD84C\uDC44\u680D\u6F3D\u7282\u732A\u732B\uD852\uDC23\uD862\uDC2B\u48ED\uD862\uDC04\u7328\u732E\u73CF\u73AA\uD843\uDC3A\uD85A\uDE2E\u73C9\u7449\uD850\uDDE2\uD845\uDEE7\uD852\uDE24\u6623\u36C5\uD852\uDDB7\uD852\uDD8D\uD852\uDDFB\u73F7\u7415\u6903\uD852\uDE26\u7439\uD841\uDDC3\u3ED7\u745C\uD84A\uDCAD\u7460\uD863\uDEB2\u7447\u73E4\u7476\u83B9\u746C\u3730\u7474\u93F1\u6A2C\u7482\u4953\uD852\uDE8C"],["fea1","\uD850\uDD5F\uD852\uDE79\uD862\uDF8F\u5B46\uD863\uDC03\uD846\uDC9E\u74C8\uD846\uDD88\u750E\u74E9\u751E\uD863\uDED9\uD846\uDE4B\u5BD7\uD863\uDEAC\u9385\u754D\u754A\u7567\u756E\uD853\uDF82\u3F04\uD853\uDD13\u758E\u745D\u759E\u75B4\u7602\u762C\u7651\u764F\u766F\u7676\uD858\uDFF5\u7690\u81EF\u37F8\uD85A\uDD11\uD85A\uDD0E\u76A1\u76A5\u76B7\u76CC\uD85B\uDF9F\u8462\uD854\uDC9D\uD854\uDD7D\uD847\uDE1C\u771E\u7726\u7740\u64AF\uD854\uDE20\u7758\uD84C\uDEAC\u77AF\uD862\uDD64\uD862\uDD68\uD845\uDEC1\u77F4\u7809\uD844\uDF76\uD852\uDE12\u68CA\u78AF\u78C7\u78D3\u96A5\u792E\uD855\uDDE0\u78D7\u7934\u78B1\uD85D\uDE0C\u8FB8\u8884\uD862\uDF2B\uD858\uDC83\uD849\uDE1C\u7986\u8900\u6902\u7980\uD856\uDC57\u799D\uD85E\uDF39\u793C\u79A9\u6E2A\uD85C\uDD26\u3EA8\u79C6\uD864\uDD0D\u79D4"]]});var uQ1=o((uz5,mQ1)=>{mQ1.exports={shiftjis:{type:"_dbcs",table:function(){return yQ1()},encodeAdd:{"\xA5":92,"\u203E":126},encodeSkipVals:[{from:60736,to:63808}]},csshiftjis:"shiftjis",mskanji:"shiftjis",sjis:"shiftjis",windows31j:"shiftjis",ms31j:"shiftjis",xsjis:"shiftjis",windows932:"shiftjis",ms932:"shiftjis",932:"shiftjis",cp932:"shiftjis",eucjp:{type:"_dbcs",table:function(){return bQ1()},encodeAdd:{"\xA5":92,"\u203E":126}},gb2312:"cp936",gb231280:"cp936",gb23121980:"cp936",csgb2312:"cp936",csiso58gb231280:"cp936",euccn:"cp936",windows936:"cp936",ms936:"cp936",936:"cp936",cp936:{type:"_dbcs",table:function(){return Lr()}},gbk:{type:"_dbcs",table:function(){return Lr().concat(lU0())}},xgbk:"gbk",isoir58:"gbk",gb18030:{type:"_dbcs",table:function(){return Lr().concat(lU0())},gb18030:function(){return hQ1()},encodeSkipVals:[128],encodeAdd:{"\u20AC":41699}},chinese:"gb18030",windows949:"cp949",ms949:"cp949",949:"cp949",cp949:{type:"_dbcs",table:function(){return fQ1()}},cseuckr:"cp949",csksc56011987:"cp949",euckr:"cp949",isoir149:"cp949",korean:"cp949",ksc56011987:"cp949",ksc56011989:"cp949",ksc5601:"cp949",windows950:"cp950",ms950:"cp950",950:"cp950",cp950:{type:"_dbcs",table:function(){return iU0()}},big5:"big5hkscs",big5hkscs:{type:"_dbcs",table:function(){return iU0().concat(gQ1())},encodeSkipVals:[36457,36463,36478,36523,36532,36557,36560,36695,36713,36718,36811,36862,36973,36986,37060,37084,37105,37311,37551,37552,37553,37554,37585,37959,38090,38361,38652,39285,39798,39800,39803,39878,39902,39916,39926,40002,40019,40034,40040,40043,40055,40124,40125,40144,40279,40282,40388,40431,40443,40617,40687,40701,40800,40907,41079,41180,41183,36812,37576,38468,38637,41636,41637,41639,41638,41676,41678]},cnbig5:"big5hkscs",csbig5:"big5hkscs",xxbig5:"big5hkscs"}});var cQ1=o((dQ1,Jv)=>{var US6=LU0(),pQ1=[OQ1(),RQ1(),wQ1(),jQ1(),TQ1(),CQ1(),kQ1(),xQ1(),uQ1()];for(Gv=0;Gv<pQ1.length;Gv++)Jv=pQ1[Gv],US6(dQ1,Jv);var Jv,Gv});var nQ1=o((pz5,iQ1)=>{var lQ1=qG().Buffer;iQ1.exports=function($){var Y=$.Transform;function X(J,Q){this.conv=J,Q=Q||{},Q.decodeStrings=!1,Y.call(this,Q)}X.prototype=Object.create(Y.prototype,{constructor:{value:X}}),X.prototype._transform=function(J,Q,W){if(typeof J!=="string")return W(Error("Iconv encoding stream needs strings as its input."));try{var K=this.conv.write(J);if(K&&K.length)this.push(K);W()}catch(Z){W(Z)}},X.prototype._flush=function(J){try{var Q=this.conv.end();if(Q&&Q.length)this.push(Q);J()}catch(W){J(W)}},X.prototype.collect=function(J){var Q=[];return this.on("error",J),this.on("data",function(W){Q.push(W)}),this.on("end",function(){J(null,lQ1.concat(Q))}),this};function G(J,Q){this.conv=J,Q=Q||{},Q.encoding=this.encoding="utf8",Y.call(this,Q)}return G.prototype=Object.create(Y.prototype,{constructor:{value:G}}),G.prototype._transform=function(J,Q,W){if(!lQ1.isBuffer(J)&&!(J instanceof Uint8Array))return W(Error("Iconv decoding stream needs buffers as its input."));try{var K=this.conv.write(J);if(K&&K.length)this.push(K,this.encoding);W()}catch(Z){W(Z)}},G.prototype._flush=function(J){try{var Q=this.conv.end();if(Q&&Q.length)this.push(Q,this.encoding);J()}catch(W){J(W)}},G.prototype.collect=function(J){var Q="";return this.on("error",J),this.on("data",function(W){Q+=W}),this.on("end",function(){J(null,Q)}),this},{IconvLiteEncoderStream:X,IconvLiteDecoderStream:G}}});var rU0=o((DS6,O6)=>{var rQ1=qG().Buffer,aQ1=NQ1(),LS6=LU0();DS6.encodings=null;DS6.defaultCharUnicode="\uFFFD";DS6.defaultCharSingleByte="?";DS6.encode=function(Y,X,G){Y=""+(Y||"");var J=DS6.getEncoder(X,G),Q=J.write(Y),W=J.end();return W&&W.length>0?rQ1.concat([Q,W]):Q};DS6.decode=function(Y,X,G){if(typeof Y==="string"){if(!DS6.skipDecodeWarning)console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding"),DS6.skipDecodeWarning=!0;Y=rQ1.from(""+(Y||""),"binary")}var J=DS6.getDecoder(X,G),Q=J.write(Y),W=J.end();return W?Q+W:Q};DS6.encodingExists=function(Y){try{return DS6.getCodec(Y),!0}catch(X){return!1}};DS6.toEncoding=DS6.encode;DS6.fromEncoding=DS6.decode;DS6._codecDataCache={__proto__:null};DS6.getCodec=function(Y){if(!DS6.encodings){var X=cQ1();DS6.encodings={__proto__:null},LS6(DS6.encodings,X)}var G=DS6._canonicalizeEncoding(Y),J={};while(!0){var Q=DS6._codecDataCache[G];if(Q)return Q;var W=DS6.encodings[G];switch(typeof W){case"string":G=W;break;case"object":for(var K in W)J[K]=W[K];if(!J.encodingName)J.encodingName=G;G=W.type;break;case"function":if(!J.encodingName)J.encodingName=G;return Q=new W(J,DS6),DS6._codecDataCache[J.encodingName]=Q,Q;default:throw Error("Encoding not recognized: '"+Y+"' (searched as: '"+G+"')")}}};DS6._canonicalizeEncoding=function($){return(""+$).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g,"")};DS6.getEncoder=function(Y,X){var G=DS6.getCodec(Y),J=new G.encoder(X,G);if(G.bomAware&&X&&X.addBOM)J=new aQ1.PrependBOM(J,X);return J};DS6.getDecoder=function(Y,X){var G=DS6.getCodec(Y),J=new G.decoder(X,G);if(G.bomAware&&!(X&&X.stripBOM===!1))J=new aQ1.StripBOM(J,X);return J};DS6.enableStreamingAPI=function(Y){if(DS6.supportsStreams)return;var X=nQ1()(Y);DS6.IconvLiteEncoderStream=X.IconvLiteEncoderStream,DS6.IconvLiteDecoderStream=X.IconvLiteDecoderStream,DS6.encodeStream=function(J,Q){return new DS6.IconvLiteEncoderStream(DS6.getEncoder(J,Q),Q)},DS6.decodeStream=function(J,Q){return new DS6.IconvLiteDecoderStream(DS6.getDecoder(J,Q),Q)},DS6.supportsStreams=!0};var Dr;try{Dr=A0("stream")}catch($){}if(Dr&&Dr.Transform)DS6.enableStreamingAPI(Dr);else DS6.encodeStream=DS6.decodeStream=function(){throw Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.")}});var Wv=o((wS6)=>{var aU0=rU0(),{createLRU:PS6}=tk(),Ar=PS6({max:500});wS6.decode=function($,Y,X,G,J){if(Buffer.isEncoding(Y))return $.toString(Y,X,G);let Q;if(!J){if(Q=Ar.get(Y),!Q)Q=aU0.getDecoder(Y),Ar.set(Y,Q)}else{let Z={encoding:Y,options:J},H=JSON.stringify(Z);if(Q=Ar.get(H),!Q)Q=aU0.getDecoder(Z.encoding,Z.options),Ar.set(H,Q)}let W=Q.write($.slice(X,G)),K=Q.end();return K?W+K:W};wS6.encode=function($,Y,X){if(Buffer.isEncoding(Y))return Buffer.from($,Y);let G=aU0.getEncoder(Y,X||{}),J=G.write($),Q=G.end();return Q&&Q.length>0?Buffer.concat([J,Q]):J}});var tQ=o((cz5,W9)=>{W9.exports={0:"DECIMAL",1:"TINY",2:"SHORT",3:"LONG",4:"FLOAT",5:"DOUBLE",6:"NULL",7:"TIMESTAMP",8:"LONGLONG",9:"INT24",10:"DATE",11:"TIME",12:"DATETIME",13:"YEAR",14:"NEWDATE",15:"VARCHAR",16:"BIT",245:"JSON",246:"NEWDECIMAL",247:"ENUM",248:"SET",249:"TINY_BLOB",250:"MEDIUM_BLOB",251:"LONG_BLOB",252:"BLOB",253:"VAR_STRING",254:"STRING",255:"GEOMETRY"};W9.exports.DECIMAL=0;W9.exports.TINY=1;W9.exports.SHORT=2;W9.exports.LONG=3;W9.exports.FLOAT=4;W9.exports.DOUBLE=5;W9.exports.NULL=6;W9.exports.TIMESTAMP=7;W9.exports.LONGLONG=8;W9.exports.INT24=9;W9.exports.DATE=10;W9.exports.TIME=11;W9.exports.DATETIME=12;W9.exports.YEAR=13;W9.exports.NEWDATE=14;W9.exports.VARCHAR=15;W9.exports.BIT=16;W9.exports.VECTOR=242;W9.exports.JSON=245;W9.exports.NEWDECIMAL=246;W9.exports.ENUM=247;W9.exports.SET=248;W9.exports.TINY_BLOB=249;W9.exports.MEDIUM_BLOB=250;W9.exports.LONG_BLOB=251;W9.exports.BLOB=252;W9.exports.VAR_STRING=253;W9.exports.STRING=254;W9.exports.GEOMETRY=255});var r5=o((lz5,XW1)=>{var TS6=Wr(),IS6=A0("buffer").Buffer,PA=FQ1(),wA=Wv(),CS6=tQ(),YW1=new Date(NaN);function eQ($,Y){let X=Y.toString();if(X.length>=$)return X;return("000000000000"+X).slice(-$)}var sU0=45,oU0=43,SS6=46,kS6=101,vS6=69;class Br{constructor($,Y,X,G){this.sequenceId=$,this.numPackets=1,this.buffer=Y,this.start=X,this.offset=X+4,this.end=G}reset(){this.offset=this.start+4}length(){return this.end-this.start}slice(){return this.buffer.slice(this.start,this.end)}dump(){console.log([this.buffer.asciiSlice(this.start,this.end)],this.buffer.slice(this.start,this.end),this.length(),this.sequenceId)}haveMoreData(){return this.end>this.offset}skip($){this.offset+=$}readInt8(){return this.buffer[this.offset++]}readInt16(){return this.offset+=2,this.buffer.readUInt16LE(this.offset-2)}readInt24(){return this.readInt16()+(this.readInt8()<<16)}readInt32(){return this.offset+=4,this.buffer.readUInt32LE(this.offset-4)}readSInt8(){return this.buffer.readInt8(this.offset++)}readSInt16(){return this.offset+=2,this.buffer.readInt16LE(this.offset-2)}readSInt32(){return this.offset+=4,this.buffer.readInt32LE(this.offset-4)}readInt64JSNumber(){let $=this.readInt32(),Y=this.readInt32();return new PA($,Y,!0).toNumber()}readSInt64JSNumber(){let $=this.readInt32(),Y=this.readInt32();if(!(Y&2147483648))return $+4294967296*Y;return new PA($,Y,!1).toNumber()}readInt64String(){let $=this.readInt32(),Y=this.readInt32();return new PA($,Y,!0).toString()}readSInt64String(){let $=this.readInt32(),Y=this.readInt32();return new PA($,Y,!1).toString()}readInt64(){let $=this.readInt32(),Y=this.readInt32(),X=new PA($,Y,!0),G=X.toNumber();return Number.isSafeInteger(G)?G:X.toString()}readSInt64(){let $=this.readInt32(),Y=this.readInt32(),X=new PA($,Y,!1),G=X.toNumber();return Number.isSafeInteger(G)?G:X.toString()}isEOF(){return this.buffer[this.offset]===254&&this.length()<13}eofStatusFlags(){return this.buffer.readInt16LE(this.offset+3)}eofWarningCount(){return this.buffer.readInt16LE(this.offset+1)}readLengthCodedNumber($,Y){let X=this.buffer[this.offset++];if(X<251)return X;return this.readLengthCodedNumberExt(X,$,Y)}readLengthCodedNumberSigned($){return this.readLengthCodedNumber($,!0)}readLengthCodedNumberExt($,Y,X){let G,J,Q;if($===251)return null;if($===252)return this.readInt8()+(this.readInt8()<<8);if($===253)return this.readInt8()+(this.readInt8()<<8)+(this.readInt8()<<16);if($===254){if(G=this.readInt32(),J=this.readInt32(),J===0)return G;if(J<2097152)return J*4294967296+G;Q=new PA(G,J,!X);let W=Q.toNumber(),K=Q.toString();if(Y||!Number.isSafeInteger(W))return K;return W}throw console.trace(),Error(`Should not reach here: ${$}`)}readFloat(){let $=this.buffer.readFloatLE(this.offset);return this.offset+=4,$}readDouble(){let $=this.buffer.readDoubleLE(this.offset);return this.offset+=8,$}readBuffer($){if(typeof $>"u")$=this.end-this.offset;return this.offset+=$,this.buffer.slice(this.offset-$,this.offset)}readDateTime($){if(!$||$==="Z"||$==="local"){let X=this.readInt8();if(X===251)return null;let G=0,J=0,Q=0,W=0,K=0,Z=0,H=0;if(X>3)G=this.readInt16(),J=this.readInt8(),Q=this.readInt8();if(X>6)W=this.readInt8(),K=this.readInt8(),Z=this.readInt8();if(X>10)H=this.readInt32()/1000;if(G+J+Q+W+K+Z+H===0)return YW1;if($==="Z")return new Date(Date.UTC(G,J-1,Q,W,K,Z,H));return new Date(G,J-1,Q,W,K,Z,H)}let Y=this.readDateTimeString(6,"T",null);if(!Y)return YW1;if(Y.length===10)Y+="T00:00:00";return new Date(Y+$)}readDateTimeString($,Y,X){let G=this.readInt8(),J=0,Q=0,W=0,K=0,Z=0,H=0,z=0,V;if(G>3)J=this.readInt16(),Q=this.readInt8(),W=this.readInt8(),V=[eQ(4,J),eQ(2,Q),eQ(2,W)].join("-");if(G>6)K=this.readInt8(),Z=this.readInt8(),H=this.readInt8(),V+=`${Y||" "}${[eQ(2,K),eQ(2,Z),eQ(2,H)].join(":")}`;else if(X===CS6.DATETIME)V+=" 00:00:00";if(G>10){if(z=this.readInt32(),V+=".",$){if(z=eQ(6,z),z.length>$)z=z.substring(0,$)}V+=z}return V}readTimeString($){let Y=this.readInt8();if(Y===0)return"00:00:00";let X=this.readInt8()?-1:1,G=0,J=0,Q=0,W=0,K=0;if(Y>6)G=this.readInt32(),J=this.readInt8(),Q=this.readInt8(),W=this.readInt8();if(Y>10)K=this.readInt32();if($)return J+=G*24,Q+=J*60,W+=Q*60,K+=W*1000,K*=X,K;return(X===-1?"-":"")+[eQ(2,G*24+J),eQ(2,Q),eQ(2,W)].join(":")+(K?`.${K}`.replace(/0+$/,""):"")}readLengthCodedString($){let Y=this.readLengthCodedNumber();if(Y===null)return null;return this.offset+=Y,wA.decode(this.buffer,$,this.offset-Y,this.offset)}readLengthCodedBuffer(){let $=this.readLengthCodedNumber();if($===null)return null;return this.readBuffer($)}readNullTerminatedString($){let Y=this.offset,X=this.offset;while(X<this.end&&this.buffer[X]!==0)X=X+1;return this.offset=X+1,wA.decode(this.buffer,$,Y,X)}readString($,Y){if(typeof $==="string"&&typeof Y>"u")Y=$,$=void 0;if(typeof $>"u")$=this.end-this.offset;return this.offset+=$,wA.decode(this.buffer,Y,this.offset-$,this.offset)}parseInt($,Y){if($===null)return null;if($>=14&&!Y){let H=this.buffer.toString("ascii",this.offset,this.offset+$);return this.offset+=$,Number(H)}let X=0,G=this.offset,J=this.offset+$,Q=1;if($===0)return 0;if(this.buffer[this.offset]===sU0)this.offset++,Q=-1;let W,K=J-this.offset;if(Y){if(K>=15){if(W=this.readString(J-this.offset,"binary"),X=parseInt(W,10),Number.isSafeInteger(Q*X))return Q*X;return Q===-1?`-${W}`:W}if(K>16)return W=this.readString(J-this.offset),Q===-1?`-${W}`:W}if(this.buffer[this.offset]===oU0)this.offset++;while(this.offset<J)X*=10,X+=this.buffer[this.offset]-48,this.offset++;let Z=X*Q;if(!Y)return Z;if(Number.isSafeInteger(Z))return Z;return this.buffer.toString("ascii",G,J)}parseIntNoBigCheck($){if($===null)return null;let Y=0,X=this.offset+$,G=1;if($===0)return 0;if(this.buffer[this.offset]===sU0)this.offset++,G=-1;if(this.buffer[this.offset]===oU0)this.offset++;while(this.offset<X)Y*=10,Y+=this.buffer[this.offset]-48,this.offset++;return Y*G}parseGeometryValue(){let $=this.readLengthCodedBuffer(),Y=4;if($===null||!$.length)return null;let X=$.length;function G(){let J,Q,W,K,Z,H,z,V,F=null;if(Y+5>X)return null;let L=$.readUInt8(Y);Y+=1;let N=L?$.readUInt32LE(Y):$.readUInt32BE(Y);switch(Y+=4,N){case 1:if(Y+16>X)return null;J=L?$.readDoubleLE(Y):$.readDoubleBE(Y),Y+=8,Q=L?$.readDoubleLE(Y):$.readDoubleBE(Y),Y+=8,F={x:J,y:Q};break;case 2:if(Y+4>X)return null;if(Z=L?$.readUInt32LE(Y):$.readUInt32BE(Y),Y+=4,Z>(X-Y)/16)return null;F=[];for(W=Z;W>0;W--){if(Y+16>X)break;J=L?$.readDoubleLE(Y):$.readDoubleBE(Y),Y+=8,Q=L?$.readDoubleLE(Y):$.readDoubleBE(Y),Y+=8,F.push({x:J,y:Q})}break;case 3:if(Y+4>X)return null;if(H=L?$.readUInt32LE(Y):$.readUInt32BE(Y),Y+=4,H>(X-Y)/4)return null;F=[];for(W=H;W>0;W--){if(Y+4>X)break;Z=L?$.readUInt32LE(Y):$.readUInt32BE(Y),Y+=4,V=[];for(K=Z;K>0;K--){if(Y+16>X)break;J=L?$.readDoubleLE(Y):$.readDoubleBE(Y),Y+=8,Q=L?$.readDoubleLE(Y):$.readDoubleBE(Y),Y+=8,V.push({x:J,y:Q})}F.push(V)}break;case 4:case 5:case 6:case 7:if(Y+4>X)return null;if(z=L?$.readUInt32LE(Y):$.readUInt32BE(Y),Y+=4,z>(X-Y)/9)return null;F=[];for(W=z;W>0;W--)F.push(G());break}return F}return G()}parseVector(){let $=this.readLengthCodedNumber(),Y=this.offset+$,X=[];while(this.offset<Y&&this.offset<this.end)X.push(this.readFloat());return X}parseDate($){let Y=this.readLengthCodedNumber();if(Y===null)return null;if(Y!==10)return new Date(NaN);let X=this.parseInt(4);this.offset++;let G=this.parseInt(2);this.offset++;let J=this.parseInt(2);if(!$||$==="local")return new Date(X,G-1,J);if($==="Z")return new Date(Date.UTC(X,G-1,J));return new Date(`${eQ(4,X)}-${eQ(2,G)}-${eQ(2,J)}T00:00:00${$}`)}parseDateTime($){let Y=this.readLengthCodedString("binary");if(Y===null)return null;if(!$||$==="local")return new Date(Y);return new Date(`${Y}${$}`)}parseFloat($){if($===null)return null;if($===0)return 0;if($>17){let W=this.buffer.toString("utf8",this.offset,this.offset+$);return this.offset+=$,Number.parseFloat(W)}let Y=0,X=this.offset+$,G=1,J=!1,Q=0;if(this.buffer[this.offset]===sU0)this.offset++,G=-1;if(this.buffer[this.offset]===oU0)this.offset++;while(this.offset<X)if(Q=this.buffer[this.offset],Q===SS6)J=!0,this.offset++;else if(Q===kS6||Q===vS6){let W=X-$,K=this.buffer.toString("utf8",W,X);return this.offset=X,Number.parseFloat(K)}else if(Y*=10,Y+=this.buffer[this.offset]-48,this.offset++,J)G=G*10;return Y/G}parseLengthCodedIntNoBigCheck(){return this.parseIntNoBigCheck(this.readLengthCodedNumber())}parseLengthCodedInt($){return this.parseInt(this.readLengthCodedNumber(),$)}parseLengthCodedIntString(){return this.readLengthCodedString("binary")}parseLengthCodedFloat(){return this.parseFloat(this.readLengthCodedNumber())}peekByte(){return this.buffer[this.offset]}isAlt(){return this.peekByte()===254}isError(){return this.peekByte()===255}asError($){this.reset(),this.readInt8();let Y=this.readInt16(),X="";if(this.buffer[this.offset]===35)this.skip(1),X=this.readBuffer(5).toString();let G=this.readString(void 0,$),J=Error(G);return J.code=TS6[Y],J.errno=Y,J.sqlState=X,J.sqlMessage=G,J}writeInt32($){this.buffer.writeUInt32LE($,this.offset),this.offset+=4}writeInt24($){this.writeInt8($&255),this.writeInt16($>>8)}writeInt16($){this.buffer.writeUInt16LE($,this.offset),this.offset+=2}writeInt8($){this.buffer.writeUInt8($,this.offset),this.offset++}writeDouble($){this.buffer.writeDoubleLE($,this.offset),this.offset+=8}writeBuffer($){$.copy(this.buffer,this.offset),this.offset+=$.length}writeNull(){this.buffer[this.offset]=251,this.offset++}writeNullTerminatedString($,Y){let X=wA.encode($,Y);this.buffer.length&&X.copy(this.buffer,this.offset),this.offset+=X.length,this.writeInt8(0)}writeString($,Y){if($===null){this.writeInt8(251);return}if($.length===0)return;let X=wA.encode($,Y);this.buffer.length&&X.copy(this.buffer,this.offset),this.offset+=X.length}writeLengthCodedString($,Y){let X=wA.encode($,Y);this.writeLengthCodedNumber(X.length),this.buffer.length&&X.copy(this.buffer,this.offset),this.offset+=X.length}writeLengthCodedBuffer($){this.writeLengthCodedNumber($.length),$.copy(this.buffer,this.offset),this.offset+=$.length}writeLengthCodedNumber($){if($<251)return this.writeInt8($);if($<65535)return this.writeInt8(252),this.writeInt16($);if($<16777215)return this.writeInt8(253),this.writeInt24($);if($===null)return this.writeInt8(251);return this.writeInt8(254),this.buffer.writeUInt32LE($>>>0,this.offset),this.offset+=4,this.buffer.writeUInt32LE(Math.floor($/4294967296),this.offset),this.offset+=4,this.offset}writeDate($,Y){if(this.buffer.writeUInt8(11,this.offset),!Y||Y==="local")this.buffer.writeUInt16LE($.getFullYear(),this.offset+1),this.buffer.writeUInt8($.getMonth()+1,this.offset+3),this.buffer.writeUInt8($.getDate(),this.offset+4),this.buffer.writeUInt8($.getHours(),this.offset+5),this.buffer.writeUInt8($.getMinutes(),this.offset+6),this.buffer.writeUInt8($.getSeconds(),this.offset+7),this.buffer.writeUInt32LE($.getMilliseconds()*1000,this.offset+8);else{if(Y!=="Z"){let X=(Y[0]==="-"?-1:1)*(parseInt(Y.substring(1,3),10)*60+parseInt(Y.substring(4),10));if(X!==0)$=new Date($.getTime()+60000*X)}this.buffer.writeUInt16LE($.getUTCFullYear(),this.offset+1),this.buffer.writeUInt8($.getUTCMonth()+1,this.offset+3),this.buffer.writeUInt8($.getUTCDate(),this.offset+4),this.buffer.writeUInt8($.getUTCHours(),this.offset+5),this.buffer.writeUInt8($.getUTCMinutes(),this.offset+6),this.buffer.writeUInt8($.getUTCSeconds(),this.offset+7),this.buffer.writeUInt32LE($.getUTCMilliseconds()*1000,this.offset+8)}this.offset+=12}writeHeader($){let Y=this.offset;this.offset=0,this.writeInt24(this.buffer.length-4),this.writeInt8($),this.offset=Y}clone(){return new Br(this.sequenceId,this.buffer,this.start,this.end)}type(){if(this.isEOF())return"EOF";if(this.isError())return"Error";if(this.buffer[this.offset]===0)return"maybeOK";return""}static lengthCodedNumberLength($){if($<251)return 1;if($<65535)return 3;if($<16777215)return 5;return 9}static lengthCodedStringLength($,Y){let G=wA.encode($,Y).length;return Br.lengthCodedNumberLength(G)+G}static MockBuffer(){let $=function(){},Y=Buffer.alloc(0);for(let X in IS6.prototype)if(typeof Y[X]==="function")Y[X]=$;return Y}}XW1.exports=Br});var tU0=o((iz5,GW1)=>{var Or=r5();function xS6($,Y){let X=$[Y],G=$[Y+1],J=$[Y+2];if(G+J===0)return X;return X+(G<<8)+(J<<16)}class rU{constructor($,Y){if(typeof Y>"u")Y=4;this.buffer=[],this.bufferLength=0,this.packetHeaderLength=Y,this.headerLen=0,this.length=0,this.largePacketParts=[],this.firstPacketSequenceId=0,this.onPacket=$,this.execute=rU.prototype.executeStart,this._flushLargePacket=Y===7?this._flushLargePacket7:this._flushLargePacket4}_flushLargePacket4(){let $=this.largePacketParts.length;this.largePacketParts.unshift(Buffer.from([0,0,0,0]));let Y=Buffer.concat(this.largePacketParts),X=new Or(this.firstPacketSequenceId,Y,0,Y.length);this.largePacketParts.length=0,X.numPackets=$,this.onPacket(X)}_flushLargePacket7(){let $=this.largePacketParts.length;this.largePacketParts.unshift(Buffer.from([0,0,0,0,0,0,0]));let Y=Buffer.concat(this.largePacketParts);this.largePacketParts.length=0;let X=new Or(this.firstPacketSequenceId,Y,0,Y.length);X.numPackets=$,this.onPacket(X)}executeStart($){let Y=0,X=$.length;while(X-Y>=3)if(this.length=xS6($,Y),X-Y>=this.length+this.packetHeaderLength){let G=$[Y+3];if(this.length<16777215&&this.largePacketParts.length===0)this.onPacket(new Or(G,$,Y,Y+this.packetHeaderLength+this.length));else{if(this.largePacketParts.length===0)this.firstPacketSequenceId=G;if(this.largePacketParts.push($.slice(Y+this.packetHeaderLength,Y+this.packetHeaderLength+this.length)),this.length<16777215)this._flushLargePacket()}Y+=this.packetHeaderLength+this.length}else{this.buffer=[$.slice(Y+3,X)],this.bufferLength=X-Y-3,this.execute=rU.prototype.executePayload;return}if(X-Y>0)if(this.headerLen=X-Y,this.length=$[Y],this.headerLen===2)this.length=$[Y]+($[Y+1]<<8),this.execute=rU.prototype.executeHeader3;else this.execute=rU.prototype.executeHeader2}executePayload($){let Y=0,X=$.length,G=this.length-this.bufferLength+this.packetHeaderLength-3;if(X-Y>=G){let J=Buffer.allocUnsafe(this.length+this.packetHeaderLength),Q=3;for(let K=0;K<this.buffer.length;++K)this.buffer[K].copy(J,Q),Q+=this.buffer[K].length;$.copy(J,Q,Y,Y+G);let W=J[3];if(this.length<16777215&&this.largePacketParts.length===0)this.onPacket(new Or(W,J,0,this.length+this.packetHeaderLength));else{if(this.largePacketParts.length===0)this.firstPacketSequenceId=W;if(this.largePacketParts.push(J.slice(this.packetHeaderLength,this.packetHeaderLength+this.length)),this.length<16777215)this._flushLargePacket()}if(this.buffer=[],this.bufferLength=0,this.execute=rU.prototype.executeStart,Y+=G,X-Y>0)return this.execute($.slice(Y,X))}else this.buffer.push($),this.bufferLength+=$.length;return null}executeHeader2($){if(this.length+=$[0]<<8,$.length>1)return this.length+=$[1]<<16,this.execute=rU.prototype.executePayload,this.executePayload($.slice(2));return this.execute=rU.prototype.executeHeader3,null}executeHeader3($){return this.length+=$[0]<<16,this.execute=rU.prototype.executePayload,this.executePayload($.slice(1))}}GW1.exports=rU});var QW1=o((nz5,JW1)=>{var yS6=r5();class eU0{constructor($){this.pluginName=$.pluginName,this.pluginData=$.pluginData}toPacket($){let Y=6+this.pluginName.length+this.pluginData.length,X=Buffer.allocUnsafe(Y),G=new yS6(0,X,0,Y);return G.offset=4,G.writeInt8(2),G.writeNullTerminatedString(this.pluginName,$),G.writeBuffer(this.pluginData),G}static fromPacket($,Y){$.readInt8();let X=$.readNullTerminatedString(Y),G=$.readBuffer();return new eU0({pluginName:X,pluginData:G})}}JW1.exports=eU0});var KW1=o((rz5,WW1)=>{var bS6=r5();class $30{constructor($){this.pluginName=$.pluginName,this.pluginData=$.pluginData}toPacket(){let $=6+this.pluginName.length+this.pluginData.length,Y=Buffer.allocUnsafe($),X=new bS6(0,Y,0,$);return X.offset=4,X.writeInt8(254),X.writeNullTerminatedString(this.pluginName,"cesu8"),X.writeBuffer(this.pluginData),X}static fromPacket($){$.readInt8();let Y=$.readNullTerminatedString("cesu8"),X=$.readBuffer();return new $30({pluginName:Y,pluginData:X})}}WW1.exports=$30});var UW1=o((az5,ZW1)=>{var hS6=r5();class Y30{constructor($){this.data=$}toPacket(){let $=5+this.data.length,Y=Buffer.allocUnsafe($),X=new hS6(0,Y,0,$);return X.offset=4,X.writeInt8(1),X.writeBuffer(this.data),X}static fromPacket($){$.readInt8();let Y=$.readBuffer();return new Y30(Y)}static verifyMarker($){return $.peekByte()===1}}ZW1.exports=Y30});var zW1=o((sz5,HW1)=>{var fS6=r5();class X30{constructor($){if(!Buffer.isBuffer($))$=Buffer.from($);this.data=$}toPacket(){let $=4+this.data.length,Y=Buffer.allocUnsafe($),X=new fS6(0,Y,0,$);return X.offset=4,X.writeBuffer(this.data),X}static fromPacket($){let Y=$.readBuffer();return new X30(Y)}}HW1.exports=X30});var FW1=o((oz5,VW1)=>{var G30=tQ(),UX=r5(),mX=Array(256);class J30{constructor($){this.columns=$||[]}static toPacket($,Y){let G=0;$.forEach((Z)=>{if(Z===null||typeof Z>"u"){++G;return}G+=UX.lengthCodedStringLength(Z.toString(10),Y)}),G=G+2;let J=Buffer.allocUnsafe(G+4),Q=new UX(0,J,0,G+4);Q.offset=4,Q.writeInt8(0);let W=0,K=1;if($.forEach((Z)=>{if(Z.type===G30.NULL)W+=K;if(K*=2,K===256)Q.writeInt8(W),W=0,K=1}),K!==1)Q.writeInt8(W);return $.forEach((Z)=>{if(Z===null){Q.writeNull();return}if(typeof Z>"u"){Q.writeInt8(0);return}Q.writeLengthCodedString(Z.toString(10),Y)}),Q}static fromPacket($,Y){let X=Array($.length);Y.readInt8();let G=Math.floor(($.length+7+2)/8);Y.skip(G);for(let J=0;J<X.length;++J)X[J]=mX[$[J].columnType].apply(Y);return new J30(X)}}mX[G30.DECIMAL]=UX.prototype.readLengthCodedString;mX[1]=UX.prototype.readInt8;mX[2]=UX.prototype.readInt16;mX[3]=UX.prototype.readInt32;mX[4]=UX.prototype.readFloat;mX[5]=UX.prototype.readDouble;mX[6]=UX.prototype.assertInvalid;mX[7]=UX.prototype.readTimestamp;mX[8]=UX.prototype.readInt64;mX[9]=UX.prototype.readInt32;mX[10]=UX.prototype.readTimestamp;mX[11]=UX.prototype.readTime;mX[12]=UX.prototype.readDateTime;mX[13]=UX.prototype.readInt16;mX[G30.VAR_STRING]=UX.prototype.readLengthCodedString;VW1.exports=J30});var B2=o((tz5,LW1)=>{LW1.exports={SLEEP:0,QUIT:1,INIT_DB:2,QUERY:3,FIELD_LIST:4,CREATE_DB:5,DROP_DB:6,REFRESH:7,SHUTDOWN:8,STATISTICS:9,PROCESS_INFO:10,CONNECT:11,PROCESS_KILL:12,DEBUG:13,PING:14,TIME:15,DELAYED_INSERT:16,CHANGE_USER:17,BINLOG_DUMP:18,TABLE_DUMP:19,CONNECT_OUT:20,REGISTER_SLAVE:21,STMT_PREPARE:22,STMT_EXECUTE:23,STMT_SEND_LONG_DATA:24,STMT_CLOSE:25,STMT_RESET:26,SET_OPTION:27,STMT_FETCH:28,DAEMON:29,BINLOG_DUMP_GTID:30,RESET_CONNECTION:31,UNKNOWN:255}});var AW1=o((ez5,NW1)=>{var gS6=r5(),mS6=B2();class DW1{constructor($){this.binlogPos=$.binlogPos||0,this.serverId=$.serverId||0,this.flags=$.flags||0,this.filename=$.filename||""}toPacket(){let $=15+Buffer.byteLength(this.filename,"utf8"),Y=Buffer.allocUnsafe($),X=new gS6(0,Y,0,$);return X.offset=4,X.writeInt8(mS6.BINLOG_DUMP),X.writeInt32(this.binlogPos),X.writeInt16(this.flags),X.writeInt32(this.serverId),X.writeString(this.filename),X}}NW1.exports=DW1});var jA=o((cS6)=>{var uS6=A0("crypto");function _A($,Y,X){let G=uS6.createHash("sha1");if(G.update($),Y)G.update(Y);if(X)G.update(X);return G.digest()}function Q30($,Y){let X=Buffer.allocUnsafe($.length);for(let G=0;G<$.length;G++)X[G]=$[G]^Y[G];return X}cS6.xor=Q30;function pS6($,Y,X){if(!$)return Buffer.alloc(0);let G=_A($);return cS6.calculateTokenFromPasswordSha(G,Y,X)}cS6.calculateTokenFromPasswordSha=function($,Y,X){let G=Y.slice(0,8),J=X.slice(0,12),Q=_A($),W=_A(G,J,Q);return Q30(W,$)};cS6.calculateToken=pS6;cS6.verifyToken=function($,Y,X,G){let J=Q30(X,_A($,Y,G));return _A(J).compare(G)===0};cS6.doubleSha1=function($){return _A(_A($))};function dS6($,Y){let X=Buffer.allocUnsafe($.length),G=Y.length;for(let J=0;J<$.length;J++)X[J]=$[J]^Y[J%G];return X}cS6.xorRotating=dS6});var O2=o((YV5,BW1)=>{BW1.exports=["utf8","big5","latin2","dec8","cp850","latin1","hp8","koi8r","latin1","latin2","swe7","ascii","eucjp","sjis","cp1251","latin1","hebrew","utf8","tis620","euckr","latin7","latin2","koi8u","cp1251","gb2312","greek","cp1250","latin2","gbk","cp1257","latin5","latin1","armscii8","cesu8","cp1250","ucs2","cp866","keybcs2","macintosh","macroman","cp852","latin7","latin7","macintosh","cp1250","utf8","utf8","latin1","latin1","latin1","cp1251","cp1251","cp1251","macroman","utf16","utf16","utf16-le","cp1256","cp1257","cp1257","utf32","utf32","utf16-le","binary","armscii8","ascii","cp1250","cp1256","cp866","dec8","greek","hebrew","hp8","keybcs2","koi8r","koi8u","cesu8","latin2","latin5","latin7","cp850","cp852","swe7","cesu8","big5","euckr","gb2312","gbk","sjis","tis620","ucs2","eucjp","geostd8","geostd8","latin1","cp932","cp932","eucjpms","eucjpms","cp1250","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf16","utf8","utf8","utf8","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","ucs2","utf8","utf8","utf8","utf8","utf8","utf8","utf8","ucs2","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf32","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","cesu8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","cesu8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","gb18030","gb18030","gb18030","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8","utf8"]});var RW1=o((XV5,MW1)=>{var oS6=B2(),tS6=bK(),Er=r5(),OW1=jA(),eS6=O2();class EW1{constructor($){this.flags=$.flags,this.user=$.user||"",this.database=$.database||"",this.password=$.password||"",this.passwordSha1=$.passwordSha1,this.authPluginData1=$.authPluginData1,this.authPluginData2=$.authPluginData2,this.connectAttributes=$.connectAttrinutes||{};let Y;if(this.passwordSha1)Y=OW1.calculateTokenFromPasswordSha(this.passwordSha1,this.authPluginData1,this.authPluginData2);else Y=OW1.calculateToken(this.password,this.authPluginData1,this.authPluginData2);this.authToken=Y,this.charsetNumber=$.charsetNumber}serializeToBuffer($){let Y=(J)=>this.flags&tS6[J],X=new Er(0,$,0,$.length);X.offset=4;let G=eS6[this.charsetNumber];if(X.writeInt8(oS6.CHANGE_USER),X.writeNullTerminatedString(this.user,G),Y("SECURE_CONNECTION"))X.writeInt8(this.authToken.length),X.writeBuffer(this.authToken);else X.writeBuffer(this.authToken),X.writeInt8(0);if(X.writeNullTerminatedString(this.database,G),X.writeInt16(this.charsetNumber),Y("PLUGIN_AUTH"))X.writeNullTerminatedString("mysql_native_password","latin1");if(Y("CONNECT_ATTRS")){let J=this.connectAttributes,Q=Object.keys(J),W=0;for(let K=0;K<Q.length;++K)W+=Er.lengthCodedStringLength(Q[K],G),W+=Er.lengthCodedStringLength(J[Q[K]],G);X.writeLengthCodedNumber(W);for(let K=0;K<Q.length;++K)X.writeLengthCodedString(Q[K],G),X.writeLengthCodedString(J[Q[K]],G)}return X}toPacket(){if(typeof this.user!=="string")throw Error('"user" connection config property must be a string');if(typeof this.database!=="string")throw Error('"database" connection config property must be a string');let $=this.serializeToBuffer(Er.MockBuffer());return this.serializeToBuffer(Buffer.allocUnsafe($.offset))}}MW1.exports=EW1});var wW1=o((GV5,PW1)=>{var $k6=r5(),Yk6=B2();class qW1{constructor($){this.id=$}toPacket(){let $=new $k6(0,Buffer.allocUnsafe(9),0,9);return $.offset=4,$.writeInt8(Yk6.STMT_CLOSE),$.writeInt32(this.id),$}}PW1.exports=qW1});var Mr=o((Xk6)=>{Xk6.NOT_NULL=1;Xk6.PRI_KEY=2;Xk6.UNIQUE_KEY=4;Xk6.MULTIPLE_KEY=8;Xk6.BLOB=16;Xk6.UNSIGNED=32;Xk6.ZEROFILL=64;Xk6.BINARY=128;Xk6.ENUM=256;Xk6.AUTO_INCREMENT=512;Xk6.TIMESTAMP=1024;Xk6.SET=2048;Xk6.NO_DEFAULT_VALUE=4096;Xk6.ON_UPDATE_NOW=8192;Xk6.NUM=32768});var CW1=o((QV5,IW1)=>{var _W1=r5(),TW1=Wv(),W30=O2(),jW1=["catalog","schema","table","orgTable","name","orgName"];class K30{constructor($,Y){this._buf=$.buffer,this._clientEncoding=Y,this._catalogLength=$.readLengthCodedNumber(),this._catalogStart=$.offset,$.offset+=this._catalogLength,this._schemaLength=$.readLengthCodedNumber(),this._schemaStart=$.offset,$.offset+=this._schemaLength,this._tableLength=$.readLengthCodedNumber(),this._tableStart=$.offset,$.offset+=this._tableLength,this._orgTableLength=$.readLengthCodedNumber(),this._orgTableStart=$.offset,$.offset+=this._orgTableLength;let X=$.readLengthCodedNumber(),G=$.offset;$.offset+=X,this._orgNameLength=$.readLengthCodedNumber(),this._orgNameStart=$.offset,$.offset+=this._orgNameLength,$.skip(1),this.characterSet=$.readInt16(),this.encoding=W30[this.characterSet],this.name=TW1.decode(this._buf,this.encoding==="binary"?this._clientEncoding:this.encoding,G,G+X),this.columnLength=$.readInt32(),this.columnType=$.readInt8(),this.type=this.columnType,this.flags=$.readInt16(),this.decimals=$.readInt8()}inspect(){return{catalog:this.catalog,schema:this.schema,name:this.name,orgName:this.orgName,table:this.table,orgTable:this.orgTable,characterSet:this.characterSet,encoding:this.encoding,columnLength:this.columnLength,type:this.columnType,flags:this.flags,decimals:this.decimals}}[Symbol.for("nodejs.util.inspect.custom")]($,Y,X){let G=tQ(),J=[];for(let z in G)J[G[z]]=z;let Q=Mr(),W=[],K=this.flags;for(let z in Q)if(K&Q[z])if(z==="PRI_KEY")W.push("PRIMARY KEY");else if(z==="NOT_NULL")W.push("NOT NULL");else if(z==="BINARY");else if(z==="MULTIPLE_KEY");else if(z==="NO_DEFAULT_VALUE");else if(z==="BLOB");else if(z==="UNSIGNED");else if(z==="TIMESTAMP");else if(z==="ON_UPDATE_NOW")W.push("ON UPDATE CURRENT_TIMESTAMP");else W.push(z);if($>1)return X({...this.inspect(),typeName:J[this.columnType],flags:W});let Z=this.flags&Q.UNSIGNED,H=J[this.columnType];if(H==="BLOB")if(this.columnLength===4294967295)H="LONGTEXT";else if(this.columnLength===67108860)H="MEDIUMTEXT";else if(this.columnLength===262140)H="TEXT";else if(this.columnLength===1020)H="TINYTEXT";else H=`BLOB(${this.columnLength})`;else if(H==="VAR_STRING")H=`VARCHAR(${Math.ceil(this.columnLength/4)})`;else if(H==="TINY")if(this.columnLength===3&&Z||this.columnLength===4&&!Z)H="TINYINT";else H=`TINYINT(${this.columnLength})`;else if(H==="LONGLONG")if(this.columnLength===20)H="BIGINT";else H=`BIGINT(${this.columnLength})`;else if(H==="SHORT")if(Z&&this.columnLength===5)H="SMALLINT";else if(!Z&&this.columnLength===6)H="SMALLINT";else H=`SMALLINT(${this.columnLength})`;else if(H==="LONG")if(Z&&this.columnLength===10)H="INT";else if(!Z&&this.columnLength===11)H="INT";else H=`INT(${this.columnLength})`;else if(H==="INT24")if(Z&&this.columnLength===8)H="MEDIUMINT";else if(!Z&&this.columnLength===9)H="MEDIUMINT";else H=`MEDIUMINT(${this.columnLength})`;else if(H==="DOUBLE")if(this.columnLength===22&&this.decimals===31)H="DOUBLE";else H=`DOUBLE(${this.columnLength},${this.decimals})`;else if(H==="FLOAT")if(this.columnLength===12&&this.decimals===31)H="FLOAT";else H=`FLOAT(${this.columnLength},${this.decimals})`;else if(H==="NEWDECIMAL")if(this.columnLength===11&&this.decimals===0)H="DECIMAL";else if(this.decimals===0)if(Z)H=`DECIMAL(${this.columnLength})`;else H=`DECIMAL(${this.columnLength-1})`;else H=`DECIMAL(${this.columnLength-2},${this.decimals})`;else H=`${J[this.columnType]}(${this.columnLength})`;if(Z)H+=" UNSIGNED";return`\`${this.name}\` ${[H,...W].join(" ")}`}static toPacket($,Y){let X=17;jW1.forEach((W)=>{X+=_W1.lengthCodedStringLength($[W],W30[$.characterSet])});let G=Buffer.allocUnsafe(X),J=new _W1(Y,G,0,X);function Q(W){J.writeLengthCodedString($[W],W30[$.characterSet])}return J.offset=4,jW1.forEach(Q),J.writeInt8(12),J.writeInt16($.characterSet),J.writeInt32($.columnLength),J.writeInt8($.columnType),J.writeInt16($.flags),J.writeInt8($.decimals),J.writeInt16(0),J}get db(){return this.schema}}var Kv=function($){Object.defineProperty(K30.prototype,$,{get:function(){let Y=this[`_${$}Start`],X=Y+this[`_${$}Length`],G=TW1.decode(this._buf,this.encoding==="binary"?this._clientEncoding:this.encoding,Y,X);return Object.defineProperty(this,$,{value:G,writable:!1,configurable:!1,enumerable:!1}),G}})};Kv("catalog");Kv("schema");Kv("table");Kv("orgTable");Kv("orgName");IW1.exports=K30});var kW1=o((WV5,SW1)=>{SW1.exports={NO_CURSOR:0,READ_ONLY:1,FOR_UPDATE:2,SCROLLABLE:3,PARAMETER_COUNT_AVAILABLE:8}});var Z30=o((KV5,xW1)=>{var qq=tQ(),TA=r5();function vW1($){return Array.isArray($)||$.constructor===Object||typeof $.toJSON==="function"&&!Buffer.isBuffer($)}function Bk6($,Y,X){let G=qq.VAR_STRING,J,Q=function(W){return TA.prototype.writeLengthCodedString.call(this,W,Y)};if($!==null)switch(typeof $){case"undefined":throw TypeError("Bind parameters must not contain undefined");case"number":G=qq.DOUBLE,J=8,Q=TA.prototype.writeDouble;break;case"boolean":$=$|0,G=qq.TINY,J=1,Q=TA.prototype.writeInt8;break;case"object":if(Object.prototype.toString.call($)==="[object Date]")G=qq.DATETIME,J=12,Q=function(W){return TA.prototype.writeDate.call(this,W,X)};else if(vW1($))$=JSON.stringify($),G=qq.JSON;else if(Buffer.isBuffer($))J=TA.lengthCodedNumberLength($.length)+$.length,Q=TA.prototype.writeLengthCodedBuffer;break;default:$=$.toString()}else $="",G=qq.NULL;if(!J)J=TA.lengthCodedStringLength($,Y);return{value:$,type:G,length:J,writer:Q}}xW1.exports={toParameter:Bk6,isJSON:vW1}});var mW1=o((ZV5,gW1)=>{var yW1=kW1(),Ok6=B2(),Ek6=bK(),x7=tQ(),bW1=r5(),Mk6=O2(),{toParameter:hW1}=Z30();class fW1{constructor($,Y,X,G,J,Q){this.id=$,this.parameters=Y,this.encoding=Mk6[X],this.timezone=G,this.attributes=J,this.clientFlags=Q||0}static fromPacket($,Y){let X=$.readInt32(),G=$.readInt8(),J=$.readInt32(),Q=$.offset;while(Q<$.end-1){if(($.buffer[Q+1]===x7.VAR_STRING||$.buffer[Q+1]===x7.NULL||$.buffer[Q+1]===x7.DOUBLE||$.buffer[Q+1]===x7.TINY||$.buffer[Q+1]===x7.DATETIME||$.buffer[Q+1]===x7.JSON)&&$.buffer[Q]===1&&$.buffer[Q+2]===0)break;else $.readInt8();Q++}let W=[];for(let Z=$.offset+1;Z<$.end-1;Z++)if(($.buffer[Z]===x7.VAR_STRING||$.buffer[Z]===x7.NULL||$.buffer[Z]===x7.DOUBLE||$.buffer[Z]===x7.TINY||$.buffer[Z]===x7.DATETIME||$.buffer[Z]===x7.JSON)&&$.buffer[Z+1]===0)W.push($.buffer[Z]),$.skip(2);$.skip(1);let K=[];for(let Z=0;Z<W.length;Z++){if(W[Z]===x7.VAR_STRING)K.push($.readLengthCodedString(Y));else if(W[Z]===x7.DOUBLE)K.push($.readDouble());else if(W[Z]===x7.TINY)K.push($.readInt8());else if(W[Z]===x7.DATETIME)K.push($.readDateTime());else if(W[Z]===x7.JSON)K.push(JSON.parse($.readLengthCodedString(Y)));if(W[Z]===x7.NULL)K.push(null)}return{stmtId:X,flags:G,iterationCount:J,values:K}}_serializeToBuffer($){let Y=this.clientFlags&Ek6.CLIENT_QUERY_ATTRIBUTES,X=Y&&this.attributes?Object.keys(this.attributes):[],G=this.parameters?this.parameters.length:0,J=X.length,Q=G+J,W=new bW1(0,$,0,$.length);W.offset=4,W.writeInt8(Ok6.STMT_EXECUTE),W.writeInt32(this.id);let K=yW1.NO_CURSOR;if(Y)K|=yW1.PARAMETER_COUNT_AVAILABLE;if(W.writeInt8(K),W.writeInt32(1),Y)W.writeLengthCodedNumber(Q);if(Q>0){let Z=G>0?this.parameters.map((L)=>hW1(L,this.encoding,this.timezone)):[],H=X.map((L)=>hW1(this.attributes[L],this.encoding,this.timezone)),z=Z.concat(H),V=0,F=1;if(z.forEach((L)=>{if(L.type===x7.NULL)V+=F;if(F*=2,F===256)W.writeInt8(V),V=0,F=1}),F!==1)W.writeInt8(V);W.writeInt8(1);for(let L=0;L<z.length;L++)if(W.writeInt8(z[L].type),W.writeInt8(0),Y){let N=L<G?"":X[L-G];W.writeLengthCodedString(N,this.encoding)}z.forEach((L)=>{if(L.type!==x7.NULL)L.writer.call(W,L.value)})}return W}toPacket(){let $=this._serializeToBuffer(bW1.MockBuffer());return this._serializeToBuffer(Buffer.allocUnsafe($.offset))}}gW1.exports=fW1});var pW1=o((UV5,uW1)=>{var Rk6=r5(),U30=bK();class H30{constructor($){this.protocolVersion=$.protocolVersion,this.serverVersion=$.serverVersion,this.capabilityFlags=$.capabilityFlags,this.connectionId=$.connectionId,this.authPluginData1=$.authPluginData1,this.authPluginData2=$.authPluginData2,this.characterSet=$.characterSet,this.statusFlags=$.statusFlags,this.authPluginName=$.authPluginName}setScrambleData($){A0("crypto").randomBytes(20,(Y,X)=>{if(Y){$(Y);return}this.authPluginData1=X.slice(0,8),this.authPluginData2=X.slice(8,20),$()})}toPacket($){let Y=68+Buffer.byteLength(this.serverVersion,"utf8"),X=Buffer.alloc(Y+4,0),G=new Rk6($,X,0,Y+4);G.offset=4,G.writeInt8(this.protocolVersion),G.writeString(this.serverVersion,"cesu8"),G.writeInt8(0),G.writeInt32(this.connectionId),G.writeBuffer(this.authPluginData1),G.writeInt8(0);let J=Buffer.allocUnsafe(4);return J.writeUInt32LE(this.capabilityFlags,0),G.writeBuffer(J.slice(0,2)),G.writeInt8(this.characterSet),G.writeInt16(this.statusFlags),G.writeBuffer(J.slice(2,4)),G.writeInt8(21),G.skip(10),G.writeBuffer(this.authPluginData2),G.writeInt8(0),G.writeString("mysql_native_password","latin1"),G.writeInt8(0),G}static fromPacket($){let Y={};Y.protocolVersion=$.readInt8(),Y.serverVersion=$.readNullTerminatedString("cesu8"),Y.connectionId=$.readInt32(),Y.authPluginData1=$.readBuffer(8),$.skip(1);let X=Buffer.allocUnsafe(4);if(X[0]=$.readInt8(),X[1]=$.readInt8(),$.haveMoreData()){if(Y.characterSet=$.readInt8(),Y.statusFlags=$.readInt16(),X[2]=$.readInt8(),X[3]=$.readInt8(),Y.capabilityFlags=X.readUInt32LE(0),Y.capabilityFlags&U30.PLUGIN_AUTH)Y.authPluginDataLength=$.readInt8();else Y.authPluginDataLength=0,$.skip(1);$.skip(10)}else Y.capabilityFlags=X.readUInt16LE(0);if(Y.capabilityFlags&U30.SECURE_CONNECTION){let J=Y.authPluginDataLength;if(J===0)Y.authPluginDataLength=20,Y.authPluginData2=$.readBuffer(12),$.skip(1);else{let Q=Math.max(13,J-8);Y.authPluginData2=$.readBuffer(Q)}}if(Y.capabilityFlags&U30.PLUGIN_AUTH)Y.authPluginName=$.readNullTerminatedString("ascii");return new H30(Y)}}uW1.exports=H30});var rW1=o((HV5,nW1)=>{var dW1=bK(),cW1=O2(),Rr=r5(),lW1=jA();class iW1{constructor($){if(this.user=$.user||"",this.database=$.database||"",this.password=$.password||"",this.passwordSha1=$.passwordSha1,this.authPluginData1=$.authPluginData1,this.authPluginData2=$.authPluginData2,this.compress=$.compress,this.clientFlags=$.flags,$.authToken!==void 0&&$.authPluginName!==void 0){if(!Buffer.isBuffer($.authToken))throw TypeError("HandshakeResponse authToken must be a Buffer when provided");if(typeof $.authPluginName!=="string")throw TypeError("HandshakeResponse authPluginName must be a string when provided");this.authToken=$.authToken,this.authPluginName=$.authPluginName}else{let Y;if(this.passwordSha1)Y=lW1.calculateTokenFromPasswordSha(this.passwordSha1,this.authPluginData1,this.authPluginData2);else Y=lW1.calculateToken(this.password,this.authPluginData1,this.authPluginData2);this.authToken=Y,this.authPluginName="mysql_native_password"}this.charsetNumber=$.charsetNumber,this.encoding=cW1[$.charsetNumber],this.connectAttributes=$.connectAttributes}serializeResponse($){let Y=(Q)=>this.clientFlags&dW1[Q],X=new Rr(0,$,0,$.length);X.offset=4,X.writeInt32(this.clientFlags),X.writeInt32(0),X.writeInt8(this.charsetNumber),X.skip(23);let G=this.encoding;X.writeNullTerminatedString(this.user,G);let J;if(Y("PLUGIN_AUTH_LENENC_CLIENT_DATA"))X.writeLengthCodedNumber(this.authToken.length),X.writeBuffer(this.authToken);else if(Y("SECURE_CONNECTION"))X.writeInt8(this.authToken.length),X.writeBuffer(this.authToken);else X.writeBuffer(this.authToken),X.writeInt8(0);if(Y("CONNECT_WITH_DB"))X.writeNullTerminatedString(this.database,G);if(Y("PLUGIN_AUTH"))X.writeNullTerminatedString(this.authPluginName||"mysql_native_password","latin1");if(Y("CONNECT_ATTRS")){let Q=this.connectAttributes||{},W=Object.keys(Q),K=0;for(J=0;J<W.length;++J)K+=Rr.lengthCodedStringLength(W[J],G),K+=Rr.lengthCodedStringLength(Q[W[J]],G);X.writeLengthCodedNumber(K);for(J=0;J<W.length;++J)X.writeLengthCodedString(W[J],G),X.writeLengthCodedString(Q[W[J]],G)}return X}toPacket(){if(typeof this.user!=="string")throw Error('"user" connection config property must be a string');if(typeof this.database!=="string")throw Error('"database" connection config property must be a string');let $=this.serializeResponse(Rr.MockBuffer());return this.serializeResponse(Buffer.alloc($.offset))}static fromPacket($,Y=4294967295){let X={};X.clientFlags=$.readInt32();function G(W){return X.clientFlags&Y&dW1[W]}X.maxPacketSize=$.readInt32(),X.charsetNumber=$.readInt8();let J=cW1[X.charsetNumber];X.encoding=J,$.skip(23),X.user=$.readNullTerminatedString(J);let Q;if(G("PLUGIN_AUTH_LENENC_CLIENT_DATA"))Q=$.readLengthCodedNumber(J),X.authToken=$.readBuffer(Q);else if(G("SECURE_CONNECTION"))Q=$.readInt8(),X.authToken=$.readBuffer(Q);else X.authToken=$.readNullTerminatedString(J);if(G("CONNECT_WITH_DB"))X.database=$.readNullTerminatedString(J);if(G("PLUGIN_AUTH"))X.authPluginName=$.readNullTerminatedString(J);if(G("CONNECT_ATTRS")){let W=$.readLengthCodedNumber(J),K=$.offset+W,Z={};while($.offset<K)Z[$.readLengthCodedString(J)]=$.readLengthCodedString(J);X.connectAttributes=Z}return X}}nW1.exports=iW1});var oW1=o((zV5,sW1)=>{var qk6=r5(),Pk6=B2(),wk6=Wv(),_k6=O2();class aW1{constructor($,Y){this.query=$,this.charsetNumber=Y,this.encoding=_k6[Y]}toPacket(){let $=wk6.encode(this.query,this.encoding),Y=5+$.length,X=Buffer.allocUnsafe(Y),G=new qk6(0,X,0,Y);return G.offset=4,G.writeInt8(Pk6.STMT_PREPARE),G.writeBuffer($),G}}sW1.exports=aW1});var $21=o((VV5,eW1)=>{class tW1{constructor($){$.skip(1),this.id=$.readInt32(),this.fieldCount=$.readInt16(),this.parameterCount=$.readInt16(),$.skip(1),this.warningCount=$.readInt16()}}eW1.exports=tW1});var K21=o((FV5,W21)=>{var z30=r5(),Y21=B2(),X21=Wv(),jk6=O2(),G21=bK(),J21=tQ(),{toParameter:Tk6}=Z30();class Q21{constructor($,Y,X,G){this.query=$,this.charsetNumber=Y,this.encoding=jk6[Y],this.attributes=X,this.clientFlags=G||0}serializeToBuffer($){let Y=this.clientFlags&G21.CLIENT_QUERY_ATTRIBUTES,X=X21.encode(this.query,this.encoding),G=new z30(0,$,0,$.length);if(G.offset=4,G.writeInt8(Y21.QUERY),Y){let J=this.attributes,Q=J?Object.keys(J):[],W=Q.length;if(G.writeLengthCodedNumber(W),G.writeLengthCodedNumber(1),W>0){let K=Q.map((z)=>Tk6(J[z],this.encoding,"local")),Z=0,H=1;if(K.forEach((z)=>{if(z.type===J21.NULL)Z+=H;if(H*=2,H===256)G.writeInt8(Z),Z=0,H=1}),H!==1)G.writeInt8(Z);G.writeInt8(1);for(let z=0;z<W;z++)G.writeInt8(K[z].type),G.writeInt8(0),G.writeLengthCodedString(Q[z],this.encoding);K.forEach((z)=>{if(z.type!==J21.NULL)z.writer.call(G,z.value)})}}return G.writeBuffer(X),G}toPacket(){if(!(this.clientFlags&G21.CLIENT_QUERY_ATTRIBUTES)){let X=X21.encode(this.query,this.encoding),G=5+X.length,J=Buffer.allocUnsafe(G),Q=new z30(0,J,0,G);return Q.offset=4,Q.writeInt8(Y21.QUERY),Q.writeBuffer(X),Q}let Y=this.serializeToBuffer(z30.MockBuffer());return this.serializeToBuffer(Buffer.allocUnsafe(Y.offset))}}W21.exports=Q21});var H21=o((LV5,U21)=>{var Ik6=r5(),Ck6=B2();class Z21{constructor($){this.serverId=$.serverId||0,this.slaveHostname=$.slaveHostname||"",this.slaveUser=$.slaveUser||"",this.slavePassword=$.slavePassword||"",this.slavePort=$.slavePort||0,this.replicationRank=$.replicationRank||0,this.masterId=$.masterId||0}toPacket(){let $=15+Buffer.byteLength(this.slaveHostname,"utf8")+Buffer.byteLength(this.slaveUser,"utf8")+Buffer.byteLength(this.slavePassword,"utf8")+3+4,Y=Buffer.allocUnsafe($),X=new Ik6(0,Y,0,$);return X.offset=4,X.writeInt8(Ck6.REGISTER_SLAVE),X.writeInt32(this.serverId),X.writeInt8(Buffer.byteLength(this.slaveHostname,"utf8")),X.writeString(this.slaveHostname),X.writeInt8(Buffer.byteLength(this.slaveUser,"utf8")),X.writeString(this.slaveUser),X.writeInt8(Buffer.byteLength(this.slavePassword,"utf8")),X.writeString(this.slavePassword),X.writeInt16(this.slavePort),X.writeInt32(this.replicationRank),X.writeInt32(this.masterId),X}}U21.exports=Z21});var F21=o((DV5,V21)=>{var Sk6=r5(),kk6=B2();class z21{constructor(){}toPacket(){let $=new Sk6(0,Buffer.alloc(5),0,5);return $.offset=4,$.writeInt8(kk6.RESET_CONNECTION),$}}V21.exports=z21});var V30=o((vk6)=>{vk6.SERVER_STATUS_IN_TRANS=1;vk6.SERVER_STATUS_AUTOCOMMIT=2;vk6.SERVER_MORE_RESULTS_EXISTS=8;vk6.SERVER_QUERY_NO_GOOD_INDEX_USED=16;vk6.SERVER_QUERY_NO_INDEX_USED=32;vk6.SERVER_STATUS_CURSOR_EXISTS=64;vk6.SERVER_STATUS_LAST_ROW_SENT=128;vk6.SERVER_STATUS_DB_DROPPED=256;vk6.SERVER_STATUS_NO_BACKSLASH_ESCAPES=512;vk6.SERVER_STATUS_METADATA_CHANGED=1024;vk6.SERVER_QUERY_WAS_SLOW=2048;vk6.SERVER_PS_OUT_PARAMS=4096;vk6.SERVER_STATUS_IN_TRANS_READONLY=8192;vk6.SERVER_SESSION_STATE_CHANGED=16384});var D21=o((AV5,L21)=>{L21.exports={big5:1,latin2:2,dec8:3,cp850:4,latin1:5,hp8:6,koi8r:7,swe7:10,ascii:11,eucjp:12,sjis:13,cp1251:14,hebrew:16,tis620:18,euckr:19,latin7:20,koi8u:22,gb2312:24,greek:25,cp1250:26,gbk:28,cp1257:29,latin5:30,armscii8:32,cesu8:33,ucs2:35,cp866:36,keybcs2:37,macintosh:38,macroman:39,cp852:40,utf8:45,utf8mb4:45,utf16:54,utf16le:56,cp1256:57,utf32:60,binary:63,geostd8:92,cp932:95,eucjpms:97,gb18030:248,utf8mb3:192}});var B21=o((rk6)=>{rk6.SYSTEM_VARIABLES=0;rk6.SCHEMA=1;rk6.STATE_CHANGE=2;rk6.STATE_GTIDS=3;rk6.TRANSACTION_CHARACTERISTICS=4;rk6.TRANSACTION_STATE=5;rk6.FIRST_KEY=rk6.SYSTEM_VARIABLES;rk6.LAST_KEY=rk6.TRANSACTION_STATE});var M21=o((OV5,E21)=>{var F30=r5(),Yv6=bK(),Xv6=V30(),Gv6=D21(),qr=B21();class O21{constructor($,Y){let X=Y.config.bigNumberStrings,G=Y.serverEncoding,J=Y._handshakePacket.capabilityFlags,Q=function(Z){return J&Yv6[Z]};if($.buffer[$.offset]!==0){if(this.fieldCount=$.readLengthCodedNumber(),this.fieldCount===null)this.infileName=$.readString(void 0,G);return}if(this.fieldCount=$.readInt8(),this.affectedRows=$.readLengthCodedNumber(X),this.insertId=$.readLengthCodedNumberSigned(X),this.info="",Q("PROTOCOL_41"))this.serverStatus=$.readInt16(),this.warningStatus=$.readInt16();else if(Q("TRANSACTIONS"))this.serverStatus=$.readInt16();let W=null;if(Q("SESSION_TRACK")&&$.offset<$.end){if(this.info=$.readLengthCodedString(G),this.serverStatus&Xv6.SERVER_SESSION_STATE_CHANGED){let Z=$.offset<$.end?$.readLengthCodedNumber():0,H=$.offset+Z,z,V,F;if(Z>0)W={systemVariables:{},schema:null,gtids:[],trackStateChange:null};while($.offset<H){if(z=$.readInt8(),Z=$.readLengthCodedNumber(),F=$.offset+Z,z===qr.SYSTEM_VARIABLES){V=$.readLengthCodedString(G);let L=$.readLengthCodedString(G);if(W.systemVariables[V]=L,V==="character_set_client"){let N=Gv6[L];if(typeof N<"u")Y.config.charsetNumber=N}}else if(z===qr.SCHEMA)V=$.readLengthCodedString(G),W.schema=V;else if(z===qr.STATE_CHANGE)W.trackStateChange=$.readLengthCodedString(G);else if(z===qr.STATE_GTIDS){let L=$.readLengthCodedString(G),N=$.readLengthCodedString(G);W.gtids=N.split(",")}$.offset=F}}}else this.info=$.readString(void 0,G);if(W)this.stateChanges=W;let K=this.info.match(/\schanged:\s*(\d+)/i);if(K!==null)this.changedRows=parseInt(K[1],10);else this.changedRows=0}static toPacket($,Y){let X=4+F30.lengthCodedNumberLength($);if(typeof Y<"u")X+=F30.lengthCodedNumberLength(Y);let G=Buffer.allocUnsafe(X),J=new F30(0,G,0,X);if(J.offset=4,J.writeLengthCodedNumber($),typeof Y<"u")J.writeLengthCodedNumber(Y);return J}}E21.exports=O21});var P21=o((EV5,q21)=>{var Jv6=bK(),Qv6=r5();class R21{constructor($,Y){this.clientFlags=$|Jv6.SSL,this.charset=Y}toPacket(){let Y=Buffer.allocUnsafe(36),X=new Qv6(0,Y,0,36);return Y.fill(0),X.offset=4,X.writeInt32(this.clientFlags),X.writeInt32(0),X.writeInt8(this.charset),X}}q21.exports=R21});var j21=o((MV5,_21)=>{var w21=r5();class L30{constructor($){this.columns=$||[]}static fromPacket($){let Y=[];while($.haveMoreData())Y.push($.readLengthCodedString());return new L30(Y)}static toPacket($,Y){let G=0;$.forEach((W)=>{if(W===null||typeof W>"u"){++G;return}G+=w21.lengthCodedStringLength(W.toString(10),Y)});let J=Buffer.allocUnsafe(G+4),Q=new w21(0,J,0,G+4);return Q.offset=4,$.forEach((W)=>{if(W===null){Q.writeNull();return}if(typeof W>"u"){Q.writeInt8(0);return}Q.writeLengthCodedString(W.toString(10),Y)}),Q}}_21.exports=L30});var $W=o((Tv6,C21)=>{var Wv6=A0("process"),Kv6=QW1(),Zv6=KW1(),Uv6=UW1(),Hv6=zW1(),zv6=FW1(),Vv6=AW1(),Fv6=RW1(),Lv6=wW1(),Dv6=CW1(),Nv6=mW1(),Av6=pW1(),Bv6=rW1(),Ov6=oW1(),Ev6=$21(),Mv6=K21(),Rv6=H21(),qv6=F21(),Pv6=M21(),wv6=P21(),_v6=j21(),jv6={AuthNextFactor:Kv6,AuthSwitchRequest:Zv6,AuthSwitchRequestMoreData:Uv6,AuthSwitchResponse:Hv6,BinaryRow:zv6,BinlogDump:Vv6,ChangeUser:Fv6,CloseStatement:Lv6,ColumnDefinition:Dv6,Execute:Nv6,Handshake:Av6,HandshakeResponse:Bv6,PrepareStatement:Ov6,PreparedStatementHeader:Ev6,Query:Mv6,RegisterSlave:Rv6,ResetConnection:qv6,ResultSetHeader:Pv6,SSLRequest:wv6,TextRow:_v6};Object.entries(jv6).forEach(([$,Y])=>{if(Tv6[$]=Y,Wv6.env.NODE_DEBUG){if(Y.prototype.toPacket){let X=Y.prototype.toPacket;Y.prototype.toPacket=function(){let G=X.call(this);return G._name=$,G}}}});var Pq=r5();Tv6.Packet=Pq;class T21{static toPacket($,Y){$=$||{};let X=$.affectedRows||0,G=$.insertId||0,J=$.serverStatus||0,Q=$.warningCount||0,W=$.message||"",K=9+Pq.lengthCodedNumberLength(X);K+=Pq.lengthCodedNumberLength(G);let Z=Buffer.allocUnsafe(K),H=new Pq(0,Z,0,K);return H.offset=4,H.writeInt8(0),H.writeLengthCodedNumber(X),H.writeLengthCodedNumber(G),H.writeInt16(J),H.writeInt16(Q),H.writeString(W,Y),H._name="OK",H}}Tv6.OK=T21;class I21{static toPacket($,Y){if(typeof $>"u")$=0;if(typeof Y>"u")Y=0;let X=new Pq(0,Buffer.allocUnsafe(9),0,9);return X.offset=4,X.writeInt8(254),X.writeInt16($),X.writeInt16(Y),X._name="EOF",X}}Tv6.EOF=I21;class D30{static toPacket($,Y){let X=13+Buffer.byteLength($.message,"utf8"),G=new Pq(0,Buffer.allocUnsafe(X),0,X);return G.offset=4,G.writeInt8(255),G.writeInt16($.code),G.writeString("#_____",Y),G.writeString($.message,Y),G._name="Error",G}static fromPacket($){$.readInt8();let Y=$.readInt16();$.readString(1,"ascii"),$.readString(5,"ascii");let X=$.readNullTerminatedString("utf8"),G=new D30;return G.message=X,G.code=Y,G}}Tv6.Error=D30});var YW=o((RV5,k21)=>{var vv6=A0("events").EventEmitter,xv6=A0("timers");class S21 extends vv6{constructor(){super();this.next=null}stateName(){let $=this.next;for(let Y in this)if(this[Y]===$&&Y!=="next")return Y;return"unknown name"}execute($,Y){if(!this.next)this.next=this.start,Y._resetSequenceId();if($&&$.isError()){let X=$.asError(Y.clientEncoding);if(X.sql=this.sql||this.query,this.queryTimeout)xv6.clearTimeout(this.queryTimeout),this.queryTimeout=null;if(this.onResult)this.onResult(X),this.emit("end");else this.emit("error",X),this.emit("end");return!0}if(this.next=this.next($,Y),this.next)return!1;return this.emit("end"),!0}}k21.exports=S21});var N30=o((qV5,v21)=>{var yv6=A0("crypto"),{xorRotating:bv6}=jA(),hv6=A0("tls"),fv6=Buffer.from([1]);function gv6($,Y,X){let G=bv6(Buffer.from(`${$}\x00`,"utf8"),Y);return yv6.publicEncrypt({key:X,oaepHash:"sha1"},G)}v21.exports=($={})=>({connection:Y})=>{let X=0,G=null,J=Y.config.password,Q=(W)=>{let K=gv6(J,G,W);return X=-1,K};return(W)=>{switch(X){case 0:if(Y.stream instanceof hv6.TLSSocket&&Y.stream.encrypted===!0)return Buffer.from(`${J}\x00`,"utf8");if(G=W.slice(0,20),$.serverPublicKey)return Q($.serverPublicKey);return X=1,fv6;case 1:if($.onServerPublicKey)$.onServerPublicKey(W);return Q(W);case-1:throw Error("Unexpected data in AuthMoreData packet received by sha256_password plugin in STATE_FINAL state.")}throw Error(`Unexpected data in AuthMoreData packet received by sha256_password plugin in state ${X}`)}}});var Pr=o((PV5,O30)=>{var B30=A0("crypto"),{xor:mv6,xorRotating:uv6}=jA(),pv6=Buffer.from([2]),dv6=Buffer.from([3]),cv6=Buffer.from([4]);function A30($){let Y=B30.createHash("sha256");return Y.update($),Y.digest()}function x21($,Y){if(!$)return Buffer.alloc(0);let X=A30(Buffer.from($)),G=A30(X),J=A30(Buffer.concat([G,Y]));return mv6(X,J)}function lv6($,Y,X){let G=uv6(Buffer.from(`${$}\x00`,"utf8"),Y);return B30.publicEncrypt({key:X,oaepHash:"sha1",padding:B30.constants.RSA_PKCS1_OAEP_PADDING},G)}var iv6=($={})=>({connection:Y})=>{let X=0,G=null,J=Y.config.password,Q=(W)=>{let K=lv6(J,G,W);return X=-1,K};return(W)=>{switch(X){case 0:return G=W.slice(0,20),X=1,x21(J,G);case 1:if(dv6.equals(W))return X=-1,null;if(cv6.equals(W)){if(typeof $.overrideIsSecure>"u"?Y.config.ssl||Y.config.socketPath:$.overrideIsSecure)return X=-1,Buffer.from(`${J}\x00`,"utf8");if($.serverPublicKey)return Q($.serverPublicKey);return X=2,pv6}throw Error("Invalid AuthMoreData packet received by caching_sha2_password plugin in STATE_TOKEN_SENT state.");case 2:if($.onServerPublicKey)$.onServerPublicKey(W);return Q(W);case-1:throw Error("Unexpected data in AuthMoreData packet received by caching_sha2_password plugin in STATE_FINAL state.")}throw Error(`Unexpected data in AuthMoreData packet received by caching_sha2_password plugin in state ${X}`)}};O30.exports=iv6;O30.exports.calculateToken=x21});var E30=o((wV5,b21)=>{var y21=jA();b21.exports=($)=>({connection:Y,command:X})=>{let G=X.password||$.password||Y.config.password,J=X.passwordSha1||$.passwordSha1||Y.config.passwordSha1;return(Q)=>{let W=Q.slice(0,8),K=Q.slice(8,20),Z;if(J)Z=y21.calculateTokenFromPasswordSha(J,W,K);else Z=y21.calculateToken(G,W,K);return Z}}});var M30=o((_V5,h21)=>{function nv6($){return Buffer.from(`${$}\x00`)}var rv6=($)=>function({connection:X,command:G}){let J=G.password||$.password||X.config.password;return function(){return nv6(J)}};h21.exports=rv6});var R30=o((jV5,u21)=>{var wq=$W(),av6=N30(),sv6=Pr(),ov6=E30(),tv6=M30(),f21=Object.assign(Object.create(null),{sha256_password:av6({}),caching_sha2_password:sv6({}),mysql_native_password:ov6({}),mysql_clear_password:tv6({})});function g21($,Y){let X=Y.config.authPlugins;if(X&&Object.prototype.hasOwnProperty.call(X,$))return X[$];return f21[$]}function m21(){console.warn("WARNING! authSwitchHandler api is deprecated, please use new authPlugins api")}function wr($,Y){$.code="AUTH_SWITCH_PLUGIN_ERROR",$.fatal=!0,Y.emit("error",$)}function ev6($,Y,X){let{pluginName:G,pluginData:J}=wq.AuthSwitchRequest.fromPacket($);if(Y.config.authSwitchHandler&&G!=="mysql_native_password"){let W=Y.config.authSwitchHandler;m21(),W({pluginName:G,pluginData:J},(K,Z)=>{if(K)return wr(K,X);Y.writePacket(new wq.AuthSwitchResponse(Z).toPacket())});return}if(G==="mysql_clear_password"){if(!(Y.config.authPlugins&&Object.prototype.hasOwnProperty.call(Y.config.authPlugins,"mysql_clear_password"))&&!Y.config.enableCleartextPlugin){let K=Error("Server requested authentication using mysql_clear_password, which sends the password in plaintext over the network and is disabled by default. To enable it, set the `enableCleartextPlugin` option to `true` in your connection configuration, or provide a custom `mysql_clear_password` auth plugin via the `authPlugins` option. Only use this over a secure connection (TLS/SSL).");throw K.code="MYSQL_CLEAR_PASSWORD_NOT_ENABLED",K.fatal=!0,K}}let Q=g21(G,Y);if(!Q)throw Error(`Server requests authentication using unknown plugin ${G}. See TODO: add plugins doco here on how to configure or author authentication plugins.`);Y._authPlugin=Q({connection:Y,command:X}),Promise.resolve(Y._authPlugin(J)).then((W)=>{if(W)Y.writePacket(new wq.AuthSwitchResponse(W).toPacket())}).catch((W)=>{wr(W,X)})}function $x6($,Y,X){let{data:G}=wq.AuthSwitchRequestMoreData.fromPacket($);if(Y.config.authSwitchHandler){let J=Y.config.authSwitchHandler;m21(),J({pluginData:G},(Q,W)=>{if(Q)return wr(Q,X);Y.writePacket(new wq.AuthSwitchResponse(W).toPacket())});return}if(!Y._authPlugin)throw Error("AuthPluginMoreData received but no auth plugin instance found");Promise.resolve(Y._authPlugin(G)).then((J)=>{if(J)Y.writePacket(new wq.AuthSwitchResponse(J).toPacket())}).catch((J)=>{wr(J,X)})}u21.exports={authSwitchRequest:ev6,authSwitchRequestMoreData:$x6,getAuthPlugin:g21,standardAuthPlugins:f21}});var i21=o((TV5,l21)=>{var d21=A0("zlib"),p21=tU0();class _r{constructor(){this._queue=[],this._running=!1}push($){if(this._queue.push($),!this._running)this._running=!0,process.nextTick(()=>this._next())}_next(){let $=this._queue.shift();if(!$){this._running=!1;return}$({done:()=>process.nextTick(()=>this._next())})}}function Yx6($){let Y=this,X=$.readInt24(),G=$.readBuffer();if(X!==0)Y.inflateQueue.push((J)=>{d21.inflate(G,(Q,W)=>{if(Q){Y._handleNetworkError(Q);return}Y._bumpCompressedSequenceId($.numPackets),Y._inflatedPacketsParser.execute(W),J.done()})});else Y.inflateQueue.push((J)=>{Y._bumpCompressedSequenceId($.numPackets),Y._inflatedPacketsParser.execute(G),J.done()})}function c21($){let X;if($.length>16777210){for(X=0;X<$.length;X+=16777210)c21.call(this,$.slice(X,X+16777210));return}let G=this,J=$.length,Q=Buffer.allocUnsafe(7);(function(W){G.deflateQueue.push((K)=>{d21.deflate($,(Z,H)=>{if(Z){G._handleFatalError(Z);return}let z=H.length;if(z<J)Q.writeUInt8(z&255,0),Q.writeUInt16LE(z>>8,1),Q.writeUInt8(W,3),Q.writeUInt8(J&255,4),Q.writeUInt16LE(J>>8,5),G.writeUncompressed(Q),G.writeUncompressed(H);else z=J,J=0,Q.writeUInt8(z&255,0),Q.writeUInt16LE(z>>8,1),Q.writeUInt8(W,3),Q.writeUInt8(J&255,4),Q.writeUInt16LE(J>>8,5),G.writeUncompressed(Q),G.writeUncompressed($);K.done()})})})(G.compressedSequenceId),G._bumpCompressedSequenceId(1)}function Xx6($){$._lastWrittenPacketId=0,$._lastReceivedPacketId=0,$._handleCompressedPacket=Yx6,$._inflatedPacketsParser=new p21((Y)=>{$.handlePacket(Y)},4),$._inflatedPacketsParser._lastPacket=0,$.packetParser=new p21((Y)=>{$._handleCompressedPacket(Y)},7),$.writeUncompressed=$.write,$.write=c21,$.inflateQueue=new _r,$.deflateQueue=new _r}l21.exports={enableCompression:Xx6,Queue:_r}});var P30=o((IV5,a21)=>{var Gx6=YW(),q30=$W(),_q=bK(),Jx6=O2(),n21=jA(),{getAuthPlugin:Qx6}=R30(),{calculateToken:Wx6}=Pr();function r21($){let Y=[];for(let X in _q)if($&_q[X])Y.push(X.replace(/_/g," ").toLowerCase());return Y}class Zv extends Gx6{constructor($){super();this.handshake=null,this.clientFlags=$,this.authenticationFactor=0}start(){return Zv.prototype.handshakeInit}sendSSLRequest($){let Y=new q30.SSLRequest(this.clientFlags,$.config.charsetNumber);$.writePacket(Y.toPacket())}sendCredentials($){if($.config.debug)console.log("Sending handshake packet: flags:%d=(%s)",this.clientFlags,r21(this.clientFlags).join(", "));this.user=$.config.user,this.password=$.config.password,this.password1=$.config.password,this.password2=$.config.password2,this.password3=$.config.password3,this.passwordSha1=$.config.passwordSha1,this.database=$.config.database,this.authPluginName=this.handshake.authPluginName;let Y=this.handshake.authPluginName,X=$.config.ssl||$.config.socketPath,G=this.handshake.authPluginData1&&this.handshake.authPluginData2?Buffer.concat([this.handshake.authPluginData1,this.handshake.authPluginData2]).slice(0,20):Buffer.alloc(20),J=$.config.authPlugins&&Object.prototype.hasOwnProperty.call($.config.authPlugins,Y),Q=typeof $.config.authSwitchHandler==="function",K=!J&&!Q&&this.canUseAuthMethodDirectly(Y,X)&&(Y!=="mysql_clear_password"||$.config.enableCleartextPlugin)?Y:"mysql_native_password",Z=this.calculateAuthToken(K,this.password,G);if($.config.debug)console.log("Server auth method: %s, Using auth method: %s",Y,K);let H=new q30.HandshakeResponse({flags:this.clientFlags,user:this.user,database:this.database,password:this.password,passwordSha1:this.passwordSha1,charsetNumber:$.config.charsetNumber,authPluginData1:this.handshake.authPluginData1,authPluginData2:this.handshake.authPluginData2,compress:$.config.compress,connectAttributes:$.config.connectAttributes,authToken:Z,authPluginName:K});if($.writePacket(H.toPacket()),K!=="mysql_native_password")this.initializeAuthPlugin(K,G,$)}calculateNativePasswordAuthToken($){let Y=$.slice(0,8),X=$.slice(8,20),G;if(this.passwordSha1)G=n21.calculateTokenFromPasswordSha(this.passwordSha1,Y,X);else G=n21.calculateToken(this.password,Y,X);return G}calculateSha256Token($,Y){return Wx6($,Y)}calculateAuthToken($,Y,X){switch($){case"mysql_native_password":return this.calculateNativePasswordAuthToken(X);case"caching_sha2_password":return this.calculateSha256Token(Y,X);case"sha256_password":case"mysql_clear_password":return Y?Buffer.from(`${Y}\x00`,"utf8"):Buffer.alloc(0);default:return this.calculateNativePasswordAuthToken(X)}}canUseAuthMethodDirectly($,Y){switch($){case"mysql_native_password":case"caching_sha2_password":return!0;case"sha256_password":case"mysql_clear_password":return Y;default:return!1}}initializeAuthPlugin($,Y,X){let G=Qx6($,X);if(!G)return;let J=G({connection:X,command:this});X._authPlugin=J;try{Promise.resolve(J(Y)).catch((Q)=>{if(X.config.debug)console.log("Auth plugin initialization:",Q.message)})}catch(Q){if(X.config.debug)console.log("Auth plugin initialization error:",Q.message)}}handshakeInit($,Y){if(this.on("error",(J)=>{Y._fatalError=J,Y._protocolError=J}),this.handshake=q30.Handshake.fromPacket($),Y.config.debug)console.log("Server hello packet: capability flags:%d=(%s)",this.handshake.capabilityFlags,r21(this.handshake.capabilityFlags).join(", "));Y.serverCapabilityFlags=this.handshake.capabilityFlags,Y.serverEncoding=Jx6[this.handshake.characterSet],Y.connectionId=this.handshake.connectionId;let X=this.handshake.capabilityFlags&_q.SSL,G=this.handshake.capabilityFlags&_q.MULTI_FACTOR_AUTHENTICATION;if(this.clientFlags=this.clientFlags|G,Y.config.compress=Y.config.compress&&this.handshake.capabilityFlags&_q.COMPRESS,this.clientFlags=this.clientFlags|Y.config.compress,Y.config.ssl){if(!X){let J=Error("Server does not support secure connection");return J.code="HANDSHAKE_NO_SSL_SUPPORT",J.fatal=!0,this.emit("error",J),!1}this.clientFlags|=_q.SSL,this.sendSSLRequest(Y),Y.startTLS((J)=>{if(J){J.code="HANDSHAKE_SSL_ERROR",J.fatal=!0,this.emit("error",J);return}this.sendCredentials(Y)})}else this.sendCredentials(Y);if(G)this.authenticationFactor=1;return Zv.prototype.handshakeResult}handshakeResult($,Y){let X=$.peekByte();if(X===254||X===1||X===2){let G=R30();try{if(X===1)G.authSwitchRequestMoreData($,Y,this);else{if(this.authenticationFactor!==0)Y.config.password=this[`password${this.authenticationFactor}`],this.authenticationFactor+=1;G.authSwitchRequest($,Y,this)}return Zv.prototype.handshakeResult}catch(J){if(!J.code)J.code="AUTH_SWITCH_PLUGIN_ERROR";if(J.fatal=!0,this.onResult)this.onResult(J);else this.emit("error",J);return null}}if(X!==0){let G=Error("Unexpected packet during handshake phase");if(G.code="HANDSHAKE_UNKNOWN_ERROR",G.fatal=!0,this.onResult)this.onResult(G);else this.emit("error",G);return null}if(!Y.authorized){if(Y.authorized=!0,Y.config.compress){let G=i21().enableCompression;G(Y)}}if(this.onResult)this.onResult(null);return null}}a21.exports=Zv});var o21=o((CV5,s21)=>{var IA=B2(),jr=Wr(),Kx6=YW(),w30=$W();class Uv extends Kx6{constructor($){super();this.args=$}start($,Y){let X=new w30.Handshake(this.args);return this.serverHello=X,X.setScrambleData((G)=>{if(G){Y.emit("error",Error("Error generating random bytes"));return}Y.writePacket(X.toPacket(0))}),Uv.prototype.readClientReply}readClientReply($,Y){let X=w30.HandshakeResponse.fromPacket($,this.args.capabilityFlags);if(Y.clientHelloReply=X,this.args.authCallback)this.args.authCallback({user:X.user,database:X.database,address:Y.stream.remoteAddress,authPluginData1:this.serverHello.authPluginData1,authPluginData2:this.serverHello.authPluginData2,authToken:X.authToken},(G,J)=>{if(!J)Y.writeOk();else Y.writeError({message:J.message||"",code:J.code||1045}),Y.close()});else Y.writeOk();return Uv.prototype.dispatchCommands}_isStatement($,Y){return $.split(" ")[0].toUpperCase()===Y}dispatchCommands($,Y){let X=!0,G=Y.clientHelloReply.encoding,J=$.readInt8();switch(J){case IA.STMT_PREPARE:if(Y.listeners("stmt_prepare").length){let Q=$.readString(void 0,G);Y.emit("stmt_prepare",Q)}else Y.writeError({code:jr.HA_ERR_INTERNAL_ERROR,message:"No query handler for prepared statements."});break;case IA.STMT_EXECUTE:if(Y.listeners("stmt_execute").length){let{stmtId:Q,flags:W,iterationCount:K,values:Z}=w30.Execute.fromPacket($,G);Y.emit("stmt_execute",Q,W,K,Z)}else Y.writeError({code:jr.HA_ERR_INTERNAL_ERROR,message:"No query handler for execute statements."});break;case IA.QUIT:if(Y.listeners("quit").length)Y.emit("quit");else Y.stream.end();break;case IA.INIT_DB:if(Y.listeners("init_db").length){let Q=$.readString(void 0,G);Y.emit("init_db",Q)}else Y.writeOk();break;case IA.QUERY:if(Y.listeners("query").length){let Q=$.readString(void 0,G);if(this._isStatement(Q,"PREPARE")||this._isStatement(Q,"SET"))Y.emit("stmt_prepare",Q);else if(this._isStatement(Q,"EXECUTE"))Y.emit("stmt_execute",null,null,null,null,Q);else Y.emit("query",Q)}else Y.writeError({code:jr.HA_ERR_INTERNAL_ERROR,message:"No query handler"});break;case IA.FIELD_LIST:if(Y.listeners("field_list").length){let Q=$.readNullTerminatedString(G),W=$.readString(void 0,G);Y.emit("field_list",Q,W)}else Y.writeError({code:jr.ER_WARN_DEPRECATED_SYNTAX,message:"As of MySQL 5.7.11, COM_FIELD_LIST is deprecated and will be removed in a future version of MySQL."});break;case IA.PING:if(Y.listeners("ping").length)Y.emit("ping");else Y.writeOk();break;default:X=!1}if(Y.listeners("packet").length)Y.emit("packet",$.clone(),X,J);else if(!X)console.log("Unknown command:",J);return Uv.prototype.dispatchCommands}}s21.exports=Uv});var Hv=o((zx6)=>{function e21($){return JSON.stringify({[$]:1}).slice(1,-3)}zx6.srcEscape=e21;var _30,t21=!1;try{_30=(()=>{throw new Error("Cannot require module "+"cardinal");})().highlight}catch{_30=($)=>{if(!t21)console.log("For nicer debug output consider install cardinal@^2.0.0"),t21=!0;return $}}function Zx6($,Y){console.log(`

${$}:
`),console.log(`${_30(Y)}
`)}zx6.printDebugWithCode=Zx6;function Ux6($,Y,X){if(Array.isArray(Y))return Y.some((G)=>$===X[G]);return!!Y}zx6.typeMatch=Ux6;var $K1=new Set(["__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","__proto__"]);zx6.privateObjectProps=$K1;var Hx6=($,Y=!0)=>{if($K1.has($))throw Error(`The field name (${$}) can't be the same as an object's private property.`);return Y?e21($):$};zx6.fieldEscape=Hx6});var XK1=o((kV5,YK1)=>{function Ax6($){return/^[$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc][$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19d9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]*$/.test($)}YK1.exports=Ax6});var j30=o((vV5,zK1)=>{var GK1=A0("util"),KK1=XK1(),JK1=/[\{\[]/,QK1=/[\}\]]/,WK1=["do","if","in","for","let","new","try","var","case","else","enum","eval","null","this","true","void","with","await","break","catch","class","const","false","super","throw","while","yield","delete","export","import","public","return","static","switch","typeof","default","extends","finally","package","private","continue","debugger","function","arguments","interface","protected","implements","instanceof","NaN","undefined"],ZK1={};for(zv=0;zv<WK1.length;zv++)ZK1[WK1[zv]]=!0;var zv,Bx6=function($){return KK1($)&&!ZK1.hasOwnProperty($)},UK1={s:function($){return""+$},d:function($){return""+Number($)},o:function($){return JSON.stringify($)}},HK1=function(){var $=[],Y=0,X={},G=function(W){var K="";while(K.length<Y*2)K+="  ";$.push(K+W)},J=function(W){if(QK1.test(W.trim()[0])&&JK1.test(W[W.length-1])){Y--,G(W),Y++;return}if(JK1.test(W[W.length-1])){G(W),Y++;return}if(QK1.test(W.trim()[0])){Y--,G(W);return}G(W)},Q=function(W){if(!W)return Q;if(arguments.length===1&&W.indexOf(`
`)>-1){var K=W.trim().split(`
`);for(var Z=0;Z<K.length;Z++)J(K[Z].trim())}else J(GK1.format.apply(GK1,arguments));return Q};if(Q.scope={},Q.formats=UK1,Q.sym=function(W){if(!W||!Bx6(W))W="tmp";if(!X[W])X[W]=0;return W+(X[W]++||"")},Q.property=function(W,K){if(arguments.length===1)K=W,W="";if(K=K+"",KK1(K))return W?W+"."+K:K;return W?W+"["+JSON.stringify(K)+"]":JSON.stringify(K)},Q.toString=function(){return $.join(`
`)},Q.toFunction=function(W){if(!W)W={};var K="return ("+Q.toString()+")";Object.keys(Q.scope).forEach(function(z){if(!W[z])W[z]=Q.scope[z]});var Z=Object.keys(W).map(function(z){return z}),H=Z.map(function(z){return W[z]});return Function.apply(null,Z.concat(K)).apply(null,H)},arguments.length)Q.apply(null,arguments);return Q};HK1.formats=UK1;zK1.exports=HK1});var LK1=o((xV5,FK1)=>{var w$=tQ(),Ox6=RF(),nH=Hv(),Ex6=j30(),Mx6=ek(),VK1=[];for(let $ in w$)VK1[w$[$]]=$;function Rx6($,Y,X,G,J){let Q=Boolean(J.supportBigNumbers||G.supportBigNumbers),W=Boolean(J.bigNumberStrings||G.bigNumberStrings),K=J.timezone||G.timezone,Z=J.dateStrings||G.dateStrings;switch($){case w$.TINY:case w$.SHORT:case w$.LONG:case w$.INT24:case w$.YEAR:return"packet.parseLengthCodedIntNoBigCheck()";case w$.LONGLONG:if(Q&&W)return"packet.parseLengthCodedIntString()";return`packet.parseLengthCodedInt(${Q})`;case w$.FLOAT:case w$.DOUBLE:return"packet.parseLengthCodedFloat()";case w$.NULL:return"packet.readLengthCodedNumber()";case w$.DECIMAL:case w$.NEWDECIMAL:if(G.decimalNumbers)return"packet.parseLengthCodedFloat()";return'packet.readLengthCodedString("ascii")';case w$.DATE:if(nH.typeMatch($,Z,w$))return'packet.readLengthCodedString("ascii")';return`packet.parseDate(${nH.srcEscape(K)})`;case w$.DATETIME:case w$.TIMESTAMP:if(nH.typeMatch($,Z,w$))return'packet.readLengthCodedString("ascii")';return`packet.parseDateTime(${nH.srcEscape(K)})`;case w$.TIME:return'packet.readLengthCodedString("ascii")';case w$.GEOMETRY:return"packet.parseGeometryValue()";case w$.VECTOR:return"packet.parseVector()";case w$.JSON:return G.jsonStrings?'packet.readLengthCodedString("utf8")':'JSON.parse(packet.readLengthCodedString("utf8"))';default:if(Y===Ox6.BINARY)return"packet.readLengthCodedBuffer()";return`packet.readLengthCodedString(${X})`}}function qx6($,Y,X){if(typeof X.typeCast==="function"&&typeof Y.typeCast!=="function")Y.typeCast=X.typeCast;function G(z,V){return{type:VK1[z.columnType],length:z.columnLength,db:z.schema,table:z.table,name:z.name,string:function(F=z.encoding){if(z.columnType===w$.JSON&&F===z.encoding)console.warn(`typeCast: JSON column "${z.name}" is interpreted as BINARY by default, recommended to manually set utf8 encoding: \`field.string("utf8")\``);return V.packet.readLengthCodedString(F)},buffer:function(){return V.packet.readLengthCodedBuffer()},geometry:function(){return V.packet.parseGeometryValue()}}}let J=Ex6();if(J("(function () {")("return class TextRow {"),J("constructor(fields) {"),typeof Y.typeCast==="function")J("const _this = this;"),J("for(let i=0; i<fields.length; ++i) {"),J("this[`wrap${i}`] = wrap(fields[i], _this);"),J("}");if(J("}"),J("next(packet, fields, options) {"),J("this.packet = packet;"),Y.rowsAsArray)J(`const result = new Array(${$.length});`);else J("const result = {};");let Q={},W=[];if(Y.nestTables===!0){for(let z=0;z<$.length;z++)Q[$[z].table]=1;W=Object.keys(Q);for(let z=0;z<W.length;z++)J(`result[${nH.fieldEscape(W[z])}] = {};`)}let K="",Z="",H="";for(let z=0;z<$.length;z++){if(Z=nH.fieldEscape($[z].name),typeof Y.nestTables==="string")K=`result[${nH.fieldEscape($[z].table+Y.nestTables+$[z].name)}]`;else if(Y.nestTables===!0)H=nH.fieldEscape($[z].table),J(`if (!result[${H}]) result[${H}] = {};`),K=`result[${H}][${Z}]`;else if(Y.rowsAsArray)K=`result[${z.toString(10)}]`;else K=`result[${Z}]`;if(Y.typeCast===!1)J(`${K} = packet.readLengthCodedBuffer();`);else{let V=`fields[${z}].encoding`,F=Rx6($[z].columnType,$[z].characterSet,V,X,Y);if(typeof Y.typeCast==="function")J(`${K} = options.typeCast(this.wrap${z}, function() { return ${F} });`);else J(`${K} = ${F};`)}}if(J("return result;"),J("}"),J("};")("})()"),X.debug)nH.printDebugWithCode("Compiled text protocol row parser",J.toString());if(typeof Y.typeCast==="function")return J.toFunction({wrap:G});return J.toFunction()}function Px6($,Y,X){return Mx6.getParser("text",$,Y,X,qx6)}FK1.exports=Px6});var AK1=o((yV5,NK1)=>{var _$=tQ(),wx6=RF(),CA=Hv(),DK1=[];for(let $ in _$)DK1[_$[$]]=$;function _x6({packet:$,type:Y,charset:X,encoding:G,config:J,options:Q}){let W=Boolean(Q.supportBigNumbers||J.supportBigNumbers),K=Boolean(Q.bigNumberStrings||J.bigNumberStrings),Z=Q.timezone||J.timezone,H=Q.dateStrings||J.dateStrings;switch(Y){case _$.TINY:case _$.SHORT:case _$.LONG:case _$.INT24:case _$.YEAR:return $.parseLengthCodedIntNoBigCheck();case _$.LONGLONG:if(W&&K)return $.parseLengthCodedIntString();return $.parseLengthCodedInt(W);case _$.FLOAT:case _$.DOUBLE:return $.parseLengthCodedFloat();case _$.NULL:case _$.DECIMAL:case _$.NEWDECIMAL:if(J.decimalNumbers)return $.parseLengthCodedFloat();return $.readLengthCodedString("ascii");case _$.DATE:if(CA.typeMatch(Y,H,_$))return $.readLengthCodedString("ascii");return $.parseDate(Z);case _$.DATETIME:case _$.TIMESTAMP:if(CA.typeMatch(Y,H,_$))return $.readLengthCodedString("ascii");return $.parseDateTime(Z);case _$.TIME:return $.readLengthCodedString("ascii");case _$.GEOMETRY:return $.parseGeometryValue();case _$.VECTOR:return $.parseVector();case _$.JSON:return J.jsonStrings?$.readLengthCodedString("utf8"):JSON.parse($.readLengthCodedString("utf8"));default:if(X===wx6.BINARY)return $.readLengthCodedBuffer();return $.readLengthCodedString(G)}}function jx6($,Y){return{type:DK1[$.columnType],length:$.columnLength,db:$.schema,table:$.table,name:$.name,string:function(X=$.encoding){if($.columnType===_$.JSON&&X===$.encoding)console.warn(`typeCast: JSON column "${$.name}" is interpreted as BINARY by default, recommended to manually set utf8 encoding: \`field.string("utf8")\``);return Y.readLengthCodedString(X)},buffer:function(){return Y.readLengthCodedBuffer()},geometry:function(){return Y.parseGeometryValue()}}}function Tx6($,Y,X){return{next(G,J,Q){let W=Q.rowsAsArray?[]:{};for(let K=0;K<J.length;K++){let Z=J[K],H=Q.typeCast?Q.typeCast:X.typeCast,z=()=>_x6({packet:G,type:Z.columnType,encoding:Z.encoding,charset:Z.characterSet,config:X,options:Q}),V;if(Q.typeCast===!1)V=G.readLengthCodedBuffer();else if(typeof H==="function")V=H(jx6(Z,G),z);else V=z();if(Q.rowsAsArray)W.push(V);else if(typeof Q.nestTables==="string")W[`${CA.fieldEscape(Z.table,!1)}${Q.nestTables}${CA.fieldEscape(Z.name,!1)}`]=V;else if(Q.nestTables){let F=CA.fieldEscape(Z.table,!1);if(!W[F])W[F]={};W[F][CA.fieldEscape(Z.name,!1)]=V}else W[CA.fieldEscape(Z.name,!1)]=V}return W}}}NK1.exports=Tx6});var C30=o((bV5,EK1)=>{var BK1=A0("process"),T30=A0("timers"),Ix6=A0("stream").Readable,Cx6=YW(),jq=$W(),Sx6=LK1(),kx6=AK1(),OK1=V30(),I30=new jq.Packet(0,Buffer.allocUnsafe(4),0,4);class rH extends Cx6{constructor($,Y){super();this.sql=$.sql,this.values=$.values,this._queryOptions=$,this.namedPlaceholders=$.namedPlaceholders||!1,this.onResult=Y,this.timeout=$.timeout,this.queryTimeout=null,this._fieldCount=0,this._rowParser=null,this._fields=[],this._rows=[],this._receivedFieldsCount=0,this._resultIndex=0,this._localStream=null,this._unpipeStream=function(){},this._streamFactory=$.infileStreamFactory,this._connection=null}then(){throw console.log("You have tried to call .then(), .catch(), or invoked await on the result of query that is not a promise, which is a programming error. Try calling con.promise().query(), or require('mysql2/promise') instead of 'mysql2' for a promise-compatible version of the query interface. To learn how to use async/await or Promises check out documentation at https://sidorares.github.io/node-mysql2/docs#using-promise-wrapper, or the mysql2 documentation at https://sidorares.github.io/node-mysql2/docs/documentation/promise-wrapper"),Error("You have tried to call .then(), .catch(), or invoked await on the result of query that is not a promise, which is a programming error. Try calling con.promise().query(), or require('mysql2/promise') instead of 'mysql2' for a promise-compatible version of the query interface. To learn how to use async/await or Promises check out documentation at https://sidorares.github.io/node-mysql2/docs#using-promise-wrapper, or the mysql2 documentation at https://sidorares.github.io/node-mysql2/docs/documentation/promise-wrapper")}start($,Y){if(Y.config.debug)console.log("        Sending query command: %s",this.sql);this._connection=Y,this.options=Object.assign({},Y.config,this._queryOptions),this._setTimeout();let X=Y.config.clientFlags&(Y.serverCapabilityFlags||0),G=new jq.Query(this.sql,Y.config.charsetNumber,this._queryOptions.attributes,X);return Y.writePacket(G.toPacket(1)),rH.prototype.resultsetHeader}done(){if(this._unpipeStream(),this.timeout&&!this.queryTimeout)return null;if(this.queryTimeout)T30.clearTimeout(this.queryTimeout),this.queryTimeout=null;if(this.onResult){let $,Y;if(this._resultIndex===0)$=this._rows[0],Y=this._fields[0];else $=this._rows,Y=this._fields;if(Y)BK1.nextTick(()=>{this.onResult(null,$,Y)});else BK1.nextTick(()=>{this.onResult(null,$)})}return null}doneInsert($){if(this._localStreamError){if(this.onResult)this.onResult(this._localStreamError,$);else this.emit("error",this._localStreamError);return null}if(this._rows.push($),this._fields.push(void 0),this.emit("fields",void 0),this.emit("result",$),$.serverStatus&OK1.SERVER_MORE_RESULTS_EXISTS)return this._resultIndex++,this.resultsetHeader;return this.done()}resultsetHeader($,Y){let X=new jq.ResultSetHeader($,Y);if(this._fieldCount=X.fieldCount,Y.config.debug)console.log(`        Resultset header received, expecting ${X.fieldCount} column definition packets`);if(this._fieldCount===0)return this.doneInsert(X);if(this._fieldCount===null)return this._streamLocalInfile(Y,X.infileName);return this._receivedFieldsCount=0,this._rows.push([]),this._fields.push([]),this.readField}_streamLocalInfile($,Y){if(this._streamFactory)this._localStream=this._streamFactory(Y);else return this._localStreamError=Error(`As a result of LOCAL INFILE command server wants to read ${Y} file, but as of v2.0 you must provide streamFactory option returning ReadStream.`),$.writePacket(I30),this.infileOk;let X=()=>{this._unpipeStream()},G=()=>{this._localStream.resume()},J=()=>{this._localStream.pause()},Q=function(Z){let H=Buffer.allocUnsafe(Z.length+4);Z.copy(H,4),$.writePacket(new jq.Packet(0,H,0,H.length))},W=()=>{$.removeListener("error",X),$.writePacket(I30)},K=(Z)=>{this._localStreamError=Z,$.removeListener("error",X),$.writePacket(I30)};return this._unpipeStream=()=>{$.stream.removeListener("pause",J),$.stream.removeListener("drain",G),this._localStream.removeListener("data",Q),this._localStream.removeListener("end",W),this._localStream.removeListener("error",K)},$.stream.on("pause",J),$.stream.on("drain",G),this._localStream.on("data",Q),this._localStream.on("end",W),this._localStream.on("error",K),$.once("error",X),this.infileOk}readField($,Y){if(this._receivedFieldsCount++,this._fields[this._resultIndex].length!==this._fieldCount){let X=new jq.ColumnDefinition($,Y.clientEncoding);if(this._fields[this._resultIndex].push(X),Y.config.debug)console.log("        Column definition:"),console.log(`          name: ${X.name}`),console.log(`          type: ${X.columnType}`),console.log(`         flags: ${X.flags}`)}if(this._receivedFieldsCount===this._fieldCount){let X=this._fields[this._resultIndex];if(this.emit("fields",X),this.options.disableEval)this._rowParser=kx6(X,this.options,Y.config);else this._rowParser=new(Sx6(X,this.options,Y.config))(X);return rH.prototype.fieldsEOF}return rH.prototype.readField}fieldsEOF($,Y){if(!$.isEOF())return Y.protocolError("Expected EOF packet");return this.row}row($,Y){if($.isEOF()){if($.eofStatusFlags()&OK1.SERVER_MORE_RESULTS_EXISTS)return this._resultIndex++,rH.prototype.resultsetHeader;return this.done()}let X;try{X=this._rowParser.next($,this._fields[this._resultIndex],this.options)}catch(G){return this._localStreamError=G,this.doneInsert(null)}if(this.onResult)this._rows[this._resultIndex].push(X);else this.emit("result",X,this._resultIndex);return rH.prototype.row}infileOk($,Y){let X=new jq.ResultSetHeader($,Y);return this.doneInsert(X)}stream($){$=$||Object.create(null),$.objectMode=!0;let Y=new Ix6({...$,emitClose:!0,autoDestroy:!0,read:()=>{this._connection&&this._connection.resume()}});Y.once("close",()=>{if(!Y.readableEnded)Y.emit("end")});let X=(W,K)=>{if(Y.destroyed)return;if(!Y.push(W))this._connection&&this._connection.pause();Y.emit("result",W,K)},G=(W)=>{if(Y.destroyed)return;Y.emit("fields",W)},J=()=>{if(Y.destroyed)return;Y.push(null)},Q=(W)=>{Y.destroy(W)};return Y._destroy=(W,K)=>{this._connection&&this._connection.resume(),this.removeListener("result",X),this.removeListener("fields",G),this.removeListener("end",J),this.removeListener("error",Q),K(W)},this.on("result",X),this.on("fields",G),this.on("end",J),this.on("error",Q),Y}_setTimeout(){if(this.timeout){let $=this._handleTimeoutError.bind(this);this.queryTimeout=T30.setTimeout($,this.timeout)}}_handleTimeoutError(){if(this.queryTimeout)T30.clearTimeout(this.queryTimeout),this.queryTimeout=null;let $=Error("Query inactivity timeout");if($.errorno="PROTOCOL_SEQUENCE_TIMEOUT",$.code="PROTOCOL_SEQUENCE_TIMEOUT",$.syscall="query",this.onResult)this.onResult($);else this.emit("error",$)}}rH.prototype.catch=rH.prototype.then;EK1.exports=rH});var S30=o((hV5,RK1)=>{var vx6=YW(),xx6=$W();class MK1 extends vx6{constructor($){super();this.id=$}start($,Y){return Y.writePacket(new xx6.CloseStatement(this.id).toPacket(1)),null}}RK1.exports=MK1});var _K1=o((fV5,wK1)=>{var qK1=Mr(),yx6=RF(),k9=tQ(),Tq=Hv(),bx6=j30(),hx6=ek(),PK1=[];for(let $ in k9)PK1[k9[$]]=$;function fx6($,Y,X,G){let J=Boolean(X.supportBigNumbers||Y.supportBigNumbers),Q=Boolean(X.bigNumberStrings||Y.bigNumberStrings),W=X.timezone||Y.timezone,K=X.dateStrings||Y.dateStrings,Z=$.flags&qK1.UNSIGNED;switch($.columnType){case k9.TINY:return Z?"packet.readInt8();":"packet.readSInt8();";case k9.SHORT:return Z?"packet.readInt16();":"packet.readSInt16();";case k9.LONG:case k9.INT24:return Z?"packet.readInt32();":"packet.readSInt32();";case k9.YEAR:return"packet.readInt16()";case k9.FLOAT:return"packet.readFloat();";case k9.DOUBLE:return"packet.readDouble();";case k9.NULL:return"null;";case k9.DATE:case k9.DATETIME:case k9.TIMESTAMP:case k9.NEWDATE:if(Tq.typeMatch($.columnType,K,k9))return`packet.readDateTimeString(${parseInt($.decimals,10)}, null, ${$.columnType});`;return`packet.readDateTime(${Tq.srcEscape(W)});`;case k9.TIME:return"packet.readTimeString()";case k9.DECIMAL:case k9.NEWDECIMAL:if(Y.decimalNumbers)return"packet.parseLengthCodedFloat();";return'packet.readLengthCodedString("ascii");';case k9.GEOMETRY:return"packet.parseGeometryValue();";case k9.VECTOR:return"packet.parseVector()";case k9.JSON:return Y.jsonStrings?'packet.readLengthCodedString("utf8")':'JSON.parse(packet.readLengthCodedString("utf8"));';case k9.LONGLONG:if(!J)return Z?"packet.readInt64JSNumber();":"packet.readSInt64JSNumber();";if(Q)return Z?"packet.readInt64String();":"packet.readSInt64String();";return Z?"packet.readInt64();":"packet.readSInt64();";default:if($.characterSet===yx6.BINARY)return"packet.readLengthCodedBuffer();";return`packet.readLengthCodedString(fields[${G}].encoding)`}}function gx6($,Y,X){let G=bx6(),J=Math.floor(($.length+7+2)/8);function Q(V,F){return{type:PK1[V.columnType],length:V.columnLength,db:V.schema,table:V.table,name:V.name,string:function(L=V.encoding){if(V.columnType===k9.JSON&&L===V.encoding)console.warn(`typeCast: JSON column "${V.name}" is interpreted as BINARY by default, recommended to manually set utf8 encoding: \`field.string("utf8")\``);if([k9.DATETIME,k9.NEWDATE,k9.TIMESTAMP,k9.DATE].includes(V.columnType))return F.readDateTimeString(parseInt(V.decimals,10)," ",V.columnType);if(V.columnType===k9.TINY){let N=V.flags&qK1.UNSIGNED;return String(N?F.readInt8():F.readSInt8())}if(V.columnType===k9.TIME)return F.readTimeString();return F.readLengthCodedString(L)},buffer:function(){return F.readLengthCodedBuffer()},geometry:function(){return F.parseGeometryValue()}}}if(G("(function(){"),G("return class BinaryRow {"),G("constructor() {"),G("}"),G("next(packet, fields, options) {"),Y.rowsAsArray)G(`const result = new Array(${$.length});`);else G("const result = {};");if(typeof X.typeCast==="function"&&typeof Y.typeCast!=="function")Y.typeCast=X.typeCast;G("packet.readInt8();");for(let V=0;V<J;++V)G(`const nullBitmaskByte${V} = packet.readInt8();`);let W="",K=4,Z=0,H="",z="";for(let V=0;V<$.length;V++){if(H=Tq.fieldEscape($[V].name),typeof Y.nestTables==="string")W=`result[${Tq.fieldEscape($[V].table+Y.nestTables+$[V].name)}]`;else if(Y.nestTables===!0)z=Tq.fieldEscape($[V].table),G(`if (!result[${z}]) result[${z}] = {};`),W=`result[${z}][${H}]`;else if(Y.rowsAsArray)W=`result[${V.toString(10)}]`;else W=`result[${H}]`;if(G(`if (nullBitmaskByte${Z} & ${K}) `),G(`${W} = null;`),G("else {"),Y.typeCast===!1)G(`${W} = packet.readLengthCodedBuffer();`);else{let F=`fieldWrapper${V}`;G(`const ${F} = wrap(fields[${V}], packet);`);let L=fx6($[V],X,Y,V);if(typeof Y.typeCast==="function")G(`${W} = options.typeCast(${F}, function() { return ${L} });`);else G(`${W} = ${L};`)}if(G("}"),K*=2,K===256)K=1,Z++}if(G("return result;"),G("}"),G("};")("})()"),X.debug)Tq.printDebugWithCode("Compiled binary protocol row parser",G.toString());return G.toFunction({wrap:Q})}function mx6($,Y,X){return hx6.getParser("binary",$,Y,X,gx6)}wK1.exports=mx6});var CK1=o((gV5,IK1)=>{var jK1=Mr(),ux6=RF(),v9=tQ(),Vv=Hv(),TK1=[];for(let $ in v9)TK1[v9[$]]=$;function px6($,Y,X){function G(J,Q,W,K,Z){let H=Boolean(W.supportBigNumbers||Q.supportBigNumbers),z=Boolean(W.bigNumberStrings||Q.bigNumberStrings),V=W.timezone||Q.timezone,F=W.dateStrings||Q.dateStrings,L=J.flags&jK1.UNSIGNED;switch(J.columnType){case v9.TINY:return L?Z.readInt8():Z.readSInt8();case v9.SHORT:return L?Z.readInt16():Z.readSInt16();case v9.LONG:case v9.INT24:return L?Z.readInt32():Z.readSInt32();case v9.YEAR:return Z.readInt16();case v9.FLOAT:return Z.readFloat();case v9.DOUBLE:return Z.readDouble();case v9.NULL:return null;case v9.DATE:case v9.DATETIME:case v9.TIMESTAMP:case v9.NEWDATE:return Vv.typeMatch(J.columnType,F,v9)?Z.readDateTimeString(parseInt(J.decimals,10),null,J.columnType):Z.readDateTime(V);case v9.TIME:return Z.readTimeString();case v9.DECIMAL:case v9.NEWDECIMAL:return Q.decimalNumbers?Z.parseLengthCodedFloat():Z.readLengthCodedString("ascii");case v9.GEOMETRY:return Z.parseGeometryValue();case v9.VECTOR:return Z.parseVector();case v9.JSON:return Q.jsonStrings?Z.readLengthCodedString("utf8"):JSON.parse(Z.readLengthCodedString("utf8"));case v9.LONGLONG:if(!H)return L?Z.readInt64JSNumber():Z.readSInt64JSNumber();return z?L?Z.readInt64String():Z.readSInt64String():L?Z.readInt64():Z.readSInt64();default:return J.characterSet===ux6.BINARY?Z.readLengthCodedBuffer():Z.readLengthCodedString($[K].encoding)}}return class{constructor(){}next(Q,W,K){Q.readInt8();let Z=Math.floor((W.length+7+2)/8),H=Array(Z);for(let L=0;L<Z;L++)H[L]=Q.readInt8();let z=K.rowsAsArray?Array(W.length):{},V=4,F=0;for(let L=0;L<W.length;L++){let N=W[L],D=K.typeCast!==void 0?K.typeCast:X.typeCast,A;if(H[F]&V)A=null;else if(K.typeCast===!1)A=Q.readLengthCodedBuffer();else{let B=()=>G(N,X,K,L,Q);A=typeof D==="function"?D({type:TK1[N.columnType],length:N.columnLength,db:N.schema,table:N.table,name:N.name,string:function(O=N.encoding){if(N.columnType===v9.JSON&&O===N.encoding)console.warn(`typeCast: JSON column "${N.name}" is interpreted as BINARY by default, recommended to manually set utf8 encoding: \`field.string("utf8")\``);if([v9.DATETIME,v9.NEWDATE,v9.TIMESTAMP,v9.DATE].includes(N.columnType))return Q.readDateTimeString(parseInt(N.decimals,10)," ",N.columnType);if(N.columnType===v9.TINY){let E=N.flags&jK1.UNSIGNED;return String(E?Q.readInt8():Q.readSInt8())}if(N.columnType===v9.TIME)return Q.readTimeString();return Q.readLengthCodedString(O)},buffer:function(){return Q.readLengthCodedBuffer()},geometry:function(){return Q.parseGeometryValue()}},B):B()}if(K.rowsAsArray)z[L]=A;else if(typeof K.nestTables==="string"){let B=Vv.fieldEscape(N.table+K.nestTables+N.name,!1);z[B]=A}else if(K.nestTables===!0){let B=Vv.fieldEscape(N.table,!1);if(!z[B])z[B]={};let O=Vv.fieldEscape(N.name,!1);z[B][O]=A}else{let B=Vv.fieldEscape(N.name,!1);z[B]=A}if(V*=2,V===256)V=1,F++}return z}}}IK1.exports=px6});var k30=o((mV5,kK1)=>{var dx6=YW(),aH=C30(),SK1=$W(),cx6=_K1(),lx6=CK1();class wG extends dx6{constructor($,Y){super();this.statement=$.statement,this.sql=$.sql,this.values=$.values,this.onResult=Y,this.parameters=$.values,this.insertId=0,this.timeout=$.timeout,this.queryTimeout=null,this._rows=[],this._fields=[],this._result=[],this._fieldCount=0,this._rowParser=null,this._executeOptions=$,this._resultIndex=0,this._localStream=null,this._unpipeStream=function(){},this._streamFactory=$.infileStreamFactory,this._connection=null}buildParserFromFields($,Y){if(this.options.disableEval)return lx6($,this.options,Y.config);return cx6($,this.options,Y.config)}start($,Y){this._connection=Y,this.options=Object.assign({},Y.config,this._executeOptions),this._setTimeout();let X=Y.config.clientFlags&(Y.serverCapabilityFlags||0),G=new SK1.Execute(this.statement.id,this.parameters,Y.config.charsetNumber,Y.config.timezone,this._executeOptions.attributes,X);try{Y.writePacket(G.toPacket(1))}catch(J){this.onResult(J)}return wG.prototype.resultsetHeader}readField($,Y){let X,G=new SK1.ColumnDefinition($,Y.clientEncoding);if(this._receivedFieldsCount++,this._fields[this._resultIndex].push(G),this._receivedFieldsCount===this._fieldCount)return X=this._fields[this._resultIndex],this.emit("fields",X,this._resultIndex),wG.prototype.fieldsEOF;return wG.prototype.readField}fieldsEOF($,Y){if(!$.isEOF())return Y.protocolError("Expected EOF packet");return this._rowParser=new(this.buildParserFromFields(this._fields[this._resultIndex],Y)),wG.prototype.row}}wG.prototype.done=aH.prototype.done;wG.prototype.doneInsert=aH.prototype.doneInsert;wG.prototype.resultsetHeader=aH.prototype.resultsetHeader;wG.prototype._findOrCreateReadStream=aH.prototype._findOrCreateReadStream;wG.prototype._streamLocalInfile=aH.prototype._streamLocalInfile;wG.prototype._setTimeout=aH.prototype._setTimeout;wG.prototype._handleTimeoutError=aH.prototype._handleTimeoutError;wG.prototype.row=aH.prototype.row;wG.prototype.stream=aH.prototype.stream;kK1.exports=wG});var yK1=o((uV5,xK1)=>{var Tr=$W(),ix6=YW(),nx6=S30(),rx6=k30();class vK1{constructor($,Y,X,G,J){this.query=$,this.id=Y,this.columns=X,this.parameters=G,this.rowParser=null,this._connection=J}close(){return this._connection.addCommand(new nx6(this.id))}execute($,Y){if(typeof $==="function")Y=$,$=[];return this._connection.addCommand(new rx6({statement:this,values:$},Y))}}class aU extends ix6{constructor($,Y){super();this.query=$.sql,this.onResult=Y,this.id=0,this.fieldCount=0,this.parameterCount=0,this.fields=[],this.parameterDefinitions=[],this.options=$}start($,Y){let X=Y.constructor;this.key=X.statementKey(this.options);let G=Y._statements.get(this.key);if(G){if(this.onResult)this.onResult(null,G);return null}let J=new Tr.PrepareStatement(this.query,Y.config.charsetNumber,this.options.values);return Y.writePacket(J.toPacket(1)),aU.prototype.prepareHeader}prepareHeader($,Y){let X=new Tr.PreparedStatementHeader($);if(this.id=X.id,this.fieldCount=X.fieldCount,this.parameterCount=X.parameterCount,this.parameterCount>0)return aU.prototype.readParameter;if(this.fieldCount>0)return aU.prototype.readField;return this.prepareDone(Y)}readParameter($,Y){if($.isEOF()){if(this.fieldCount>0)return aU.prototype.readField;return this.prepareDone(Y)}let X=new Tr.ColumnDefinition($,Y.clientEncoding);if(this.parameterDefinitions.push(X),this.parameterDefinitions.length===this.parameterCount)return aU.prototype.parametersEOF;return this.readParameter}readField($,Y){if($.isEOF())return this.prepareDone(Y);let X=new Tr.ColumnDefinition($,Y.clientEncoding);if(this.fields.push(X),this.fields.length===this.fieldCount)return aU.prototype.fieldsEOF;return aU.prototype.readField}parametersEOF($,Y){if(!$.isEOF())return Y.protocolError("Expected EOF packet after parameters");if(this.fieldCount>0)return aU.prototype.readField;return this.prepareDone(Y)}fieldsEOF($,Y){if(!$.isEOF())return Y.protocolError("Expected EOF packet after fields");return this.prepareDone(Y)}prepareDone($){let Y=new vK1(this.query,this.id,this.fields,this.parameterDefinitions,$);if($._statements.set(this.key,Y),this.onResult)this.onResult(null,Y);return null}}xK1.exports=aU});var hK1=o((pV5,bK1)=>{var ax6=YW(),sx6=B2(),ox6=r5();class v30 extends ax6{constructor($){super();this.onResult=$}start($,Y){let X=new ox6(0,Buffer.from([1,0,0,0,sx6.PING]),0,5);return Y.writePacket(X),v30.prototype.pingResponse}pingResponse(){if(this.onResult)process.nextTick(this.onResult.bind(this));return null}}bK1.exports=v30});var gK1=o((dV5,fK1)=>{var tx6=YW(),ex6=$W();class x30 extends tx6{constructor($,Y){super();this.onResult=Y,this.opts=$}start($,Y){let X=new ex6.RegisterSlave(this.opts);return Y.writePacket(X.toPacket(1)),x30.prototype.registerResponse}registerResponse(){if(this.onResult)process.nextTick(this.onResult.bind(this));return null}}fK1.exports=x30});var uK1=o((cV5,mK1)=>{var XW={FLAGS2:0,SQL_MODE:1,CATALOG:2,AUTO_INCREMENT:3,CHARSET:4,TIME_ZONE:5,CATALOG_NZ:6,LC_TIME_NAMES:7,CHARSET_DATABASE:8,TABLE_MAP_FOR_UPDATE:9,MASTER_DATA_WRITTEN:10,INVOKERS:11,UPDATED_DB_NAMES:12,MICROSECONDS:3};mK1.exports=function(Y){let X={},G=0,J,Q,W;while(G<Y.length)switch(J=Y[G++],J){case XW.FLAGS2:X.flags=Y.readUInt32LE(G),G+=4;break;case XW.SQL_MODE:X.sqlMode=Y.readUInt32LE(G),G+=8;break;case XW.CATALOG:Q=Y[G++],X.catalog=Y.toString("utf8",G,G+Q),G+=Q+1;break;case XW.CHARSET:X.clientCharset=Y.readUInt16LE(G),X.connectionCollation=Y.readUInt16LE(G+2),X.serverCharset=Y.readUInt16LE(G+4),G+=6;break;case XW.TIME_ZONE:Q=Y[G++],X.timeZone=Y.toString("utf8",G,G+Q),G+=Q;break;case XW.CATALOG_NZ:Q=Y[G++],X.catalogNz=Y.toString("utf8",G,G+Q),G+=Q;break;case XW.LC_TIME_NAMES:X.lcTimeNames=Y.readUInt16LE(G),G+=2;break;case XW.CHARSET_DATABASE:X.schemaCharset=Y.readUInt16LE(G),G+=2;break;case XW.TABLE_MAP_FOR_UPDATE:X.mapForUpdate1=Y.readUInt32LE(G),X.mapForUpdate2=Y.readUInt32LE(G+4),G+=8;break;case XW.MASTER_DATA_WRITTEN:X.masterDataWritten=Y.readUInt32LE(G),G+=4;break;case XW.INVOKERS:Q=Y[G++],X.invokerUsername=Y.toString("utf8",G,G+Q),G+=Q,Q=Y[G++],X.invokerHostname=Y.toString("utf8",G,G+Q),G+=Q;break;case XW.UPDATED_DB_NAMES:Q=Y[G++],X.updatedDBs=[];for(;Q;--Q){W=G;while(Y[G++]&&G<Y.length);X.updatedDBs.push(Y.toString("utf8",W,G-1))}break;case XW.MICROSECONDS:X.microseconds=Y.readInt16LE(G)+(Y[G+2]<<16),G+=3}return X}});var rK1=o((lV5,nK1)=>{var $y6=YW(),Yy6=$W(),Fv=[];class pK1{constructor($){this.timestamp=$.readInt32(),this.eventType=$.readInt8(),this.serverId=$.readInt32(),this.eventSize=$.readInt32(),this.logPos=$.readInt32(),this.flags=$.readInt16()}}class Ir extends $y6{constructor($){super();this.opts=$}start($,Y){let X=new Yy6.BinlogDump(this.opts);return Y.writePacket(X.toPacket(1)),Ir.prototype.binlogData}binlogData($){if($.isEOF())return this.emit("eof"),null;$.readInt8();let Y=new pK1($),X=Fv[Y.eventType],G;if(X)G=new X($);else G={name:"UNKNOWN"};return G.header=Y,this.emit("event",G),Ir.prototype.binlogData}}class dK1{constructor($){this.pposition=$.readInt32(),$.readInt32(),this.nextBinlog=$.readString(),this.name="RotateEvent"}}class cK1{constructor($){this.binlogVersion=$.readInt16(),this.serverVersion=$.readString(50).replace(/\u0000.*/,""),this.createTimestamp=$.readInt32(),this.eventHeaderLength=$.readInt8(),this.eventsLength=$.readBuffer(),this.name="FormatDescriptionEvent"}}class lK1{constructor($){let Y=uK1();this.slaveProxyId=$.readInt32(),this.executionTime=$.readInt32();let X=$.readInt8();this.errorCode=$.readInt16();let G=$.readInt16(),J=$.readBuffer(G);this.schema=$.readString(X),$.readInt8(),this.statusVars=Y(J),this.query=$.readString(),this.name="QueryEvent"}}class iK1{constructor($){this.binlogVersion=$.readInt16(),this.xid=$.readInt64(),this.name="XidEvent"}}Fv[2]=lK1;Fv[4]=dK1;Fv[15]=cK1;Fv[16]=iK1;nK1.exports=Ir});var oK1=o((iV5,sK1)=>{var Xy6=YW(),Gy6=$W(),Jy6=bK(),aK1=P30(),Qy6=O2();class Lv extends Xy6{constructor($,Y){super();this.onResult=Y,this.user=$.user,this.password=$.password,this.password1=$.password,this.password2=$.password2,this.password3=$.password3,this.database=$.database,this.passwordSha1=$.passwordSha1,this.charsetNumber=$.charsetNumber,this.currentConfig=$.currentConfig,this.authenticationFactor=0}start($,Y){let X=new Gy6.ChangeUser({flags:Y.config.clientFlags,user:this.user,database:this.database,charsetNumber:this.charsetNumber,password:this.password,passwordSha1:this.passwordSha1,authPluginData1:Y._handshakePacket.authPluginData1,authPluginData2:Y._handshakePacket.authPluginData2});if(this.currentConfig.user=this.user,this.currentConfig.password=this.password,this.currentConfig.database=this.database,this.currentConfig.charsetNumber=this.charsetNumber,Y.clientEncoding=Qy6[this.charsetNumber],Y._statements.clear(),Y.writePacket(X.toPacket()),Y.serverCapabilityFlags&Jy6.MULTI_FACTOR_AUTHENTICATION)this.authenticationFactor=1;return Lv.prototype.handshakeResult}}Lv.prototype.handshakeResult=aK1.prototype.handshakeResult;Lv.prototype.calculateNativePasswordAuthToken=aK1.prototype.calculateNativePasswordAuthToken;sK1.exports=Lv});var eK1=o((nV5,tK1)=>{var Wy6=YW(),Ky6=$W();class y30 extends Wy6{constructor($){super();this.onResult=$}start($,Y){let X=new Ky6.ResetConnection;return Y.writePacket(X.toPacket()),y30.prototype.resetConnectionResponse}resetConnectionResponse($,Y){if(Y._statements)Y._statements.clear();if(this.onResult)process.nextTick(this.onResult.bind(this,null));return null}}tK1.exports=y30});var XZ1=o((rV5,YZ1)=>{var Zy6=YW(),Uy6=B2(),Hy6=r5();class $Z1 extends Zy6{constructor($){super();this.onResult=$}start($,Y){Y._closing=!0;let X=new Hy6(0,Buffer.from([1,0,0,0,Uy6.QUIT]),0,5);if(this.onResult)this.onResult();return Y.writePacket(X),null}}YZ1.exports=$Z1});var JZ1=o((aV5,GZ1)=>{var zy6=P30(),Vy6=o21(),Fy6=C30(),Ly6=yK1(),Dy6=S30(),Ny6=k30(),Ay6=hK1(),By6=gK1(),Oy6=rK1(),Ey6=oK1(),My6=eK1(),Ry6=XZ1();GZ1.exports={ClientHandshake:zy6,ServerHandshake:Vy6,Query:Fy6,Prepare:Ly6,CloseStatement:Dy6,Execute:Ny6,Ping:Ay6,RegisterSlave:By6,BinlogDump:Oy6,ChangeUser:Ey6,ResetConnection:My6,Quit:Ry6}});var h30=o((sV5,WZ1)=>{var QZ1=A0("process"),Iq=(()=>{try{return"getBuiltinModule"in QZ1?QZ1.getBuiltinModule("node:diagnostics_channel"):A0("diagnostics_channel")}catch{return}})(),Dv=typeof Iq?.tracingChannel==="function",qy6=Dv?Iq.tracingChannel("mysql2:query"):void 0,Py6=Dv?Iq.tracingChannel("mysql2:execute"):void 0,wy6=Dv?Iq.tracingChannel("mysql2:connect"):void 0,_y6=Dv?Iq.tracingChannel("mysql2:pool:connect"):void 0;function jy6($){if($.socketPath)return{serverAddress:$.socketPath,serverPort:void 0};return{serverAddress:$.host||"localhost",serverPort:$.port||3306}}function b30($){if($===void 0||$===null)return!1;return $.hasSubscribers??$.start?.hasSubscribers??!1}function Ty6($,Y,X,G,J,...Q){if(b30($))return $.traceCallback(Y,X,G(),J,...Q);return Y.apply(J,Q)}function Iy6($,Y,X){if(b30($))return $.tracePromise(Y,X());return Y()}WZ1.exports={dc:Iq,hasTracingChannel:Dv,shouldTrace:b30,queryChannel:qy6,executeChannel:Py6,connectChannel:wy6,poolConnectChannel:_y6,getServerContext:jy6,traceCallback:Ty6,tracePromise:Iy6}});var ZZ1=o((oV5,g30)=>{var KZ1=/(?:\?)|(?::(\d+|(?:[a-zA-Z][a-zA-Z0-9_]*)))/g;function f30($){let Y=KZ1.exec($),X=0,G=0,J,Q=[],W=!1,K=!1,Z,H=[],z=0,V=0,F;if(Y){do{for(F=X,J=Y.index;F<J;++F){let L=$.charCodeAt(F);if(L===92)K=!K;else{if(K){K=!1;continue}if(W&&L===Z){if($.charCodeAt(F+1)===Z){++F;continue}W=!1}else if(!W&&(L===34||L===39))W=!0,Z=L}}if(!W)Q.push($.substring(G,J)),H.push(Y[0].length===1?z++:Y[1]),G=J+Y[0].length,V=G;X=J+Y[0].length}while(Y=KZ1.exec($));if(H.length){if(X<$.length)Q.push($.substring(V));return[Q,H]}}return[$]}function Cy6($){if(!$)$={};if(!$.placeholder)$.placeholder="?";let Y=100,X;if(typeof $.cache==="number")Y=$.cache;if(typeof $.cache==="object")X=$.cache;if($.cache!==!1&&!X)X=tk().createLRU({max:Y});function G(K,Z){let H=[];if(K.length===1)return[K[0],[]];if(typeof Z>"u")throw Error("Named query contains placeholders, but parameters object is undefined");let z=K[1];for(let V=0;V<z.length;++V)H.push(Z[z[V]]);return[K[0],H]}function J(K){if(K.slice(-1)===":")return K.slice(0,-1);return K}function Q(K){if(K.length===1)return K;let Z=J(K[0][0]);for(let z=1;z<K[0].length;++z){if(K[0][z-1].slice(-1)===":")Z+=$.placeholder;Z+=$.placeholder,Z+=J(K[0][z])}let H=K[0][K[0].length-1];if(K[0].length===K[1].length){if(H.slice(-1)===":")Z+=$.placeholder;Z+=$.placeholder}return[Z,K[1]]}function W(K,Z){let H;if(X&&(H=X.get(K)))return G(H,Z);if(H=Q(f30(K)),X)X.set(K,H);return G(H,Z)}return W.parse=f30,W}function Sy6($,Y){let X=f30($),G=[];if(X.length===1)return[X[0],G];let J={},Q=0,W="",K,Z=[];for(let H=0;H<X[0].length;++H){if(K=J[X[1][H]],!K)K=++Q,J[X[1][H]]=K;if(X[1][H])Z[K-1]=X[1][H],W+=`${X[0][H]}$${K}`;else W+=X[0][H]}return[W,Z.map((H)=>Y[H])]}g30.exports=Cy6;g30.exports.toNumbered=Sy6});var vr=o((tV5,LZ1)=>{var m30=A0("net"),Cr=A0("tls"),Cq=A0("timers"),UZ1=A0("events").EventEmitter,ky6=A0("stream").Readable,HZ1=HU0(),Sr=ok(),{createLRU:vy6}=tk(),xy6=tU0(),PF=$W(),cJ=JZ1(),yy6=Bq(),zZ1=O2(),{traceCallback:VZ1,tracePromise:u30,getServerContext:Nv,shouldTrace:p30,queryChannel:d30,executeChannel:c30,connectChannel:FZ1}=h30(),by6=0,l30=null;class kr extends UZ1{constructor($){super();if(this.config=$.config,!$.config.stream)if($.config.socketPath)this.stream=m30.connect($.config.socketPath);else{if(this.stream=m30.connect($.config.port,$.config.host),this.config.enableKeepAlive)this.stream.on("connect",()=>{this.stream.setKeepAlive(!0,this.config.keepAliveInitialDelay)});this.stream.setNoDelay(!0)}else if(typeof $.config.stream==="function")this.stream=$.config.stream($);else this.stream=$.config.stream;this._internalId=by6++,this._commands=new HZ1,this._command=null,this._paused=!1,this._paused_packets=new HZ1,this._statements=vy6({max:this.config.maxPreparedStatements,onEviction:function(X,G){G.close()}}),this.serverCapabilityFlags=0,this.authorized=!1,this.sequenceId=0,this.compressedSequenceId=0,this.threadId=null,this._handshakePacket=null,this._fatalError=null,this._protocolError=null,this._outOfOrderPackets=[],this.clientEncoding=zZ1[this.config.charsetNumber],this.stream.on("error",this._handleNetworkError.bind(this)),this.packetParser=new xy6((X)=>{this.handlePacket(X)}),this.stream.on("data",(X)=>{if(this.connectTimeout)Cq.clearTimeout(this.connectTimeout),this.connectTimeout=null;this.packetParser.execute(X)}),this.stream.on("end",()=>{this.emit("end")}),this.stream.on("close",()=>{if(this._closing)return;if(!this._protocolError)this._protocolError=Error("Connection lost: The server closed the connection."),this._protocolError.fatal=!0,this._protocolError.code="PROTOCOL_CONNECTION_LOST";this._notifyError(this._protocolError)});let Y;if(!this.config.isServer){if(Y=new cJ.ClientHandshake(this.config.clientFlags),Y.on("end",()=>{if(!Y.handshake||this._fatalError||this._protocolError)return;this._handshakePacket=Y.handshake,this.threadId=Y.handshake.connectionId,this.emit("connect",Y.handshake)}),Y.on("error",(X)=>{this._closing=!0,this._notifyError(X)}),this.addCommand(Y),p30(FZ1)){let X=this.config;u30(FZ1,()=>new Promise((G,J)=>{let Q,W;Q=(K)=>{this.removeListener("error",W),G(K)},W=(K)=>{this.removeListener("connect",Q),J(K)},this.once("connect",Q),this.once("error",W)}),()=>{let G=Nv(X);return{database:X.database||"",serverAddress:G.serverAddress,serverPort:G.serverPort,user:X.user||""}}).catch(()=>{})}}if(this.serverEncoding="utf8",this.config.connectTimeout){let X=this._handleTimeoutError.bind(this);this.connectTimeout=Cq.setTimeout(X,this.config.connectTimeout)}}_addCommandClosedState($){let Y=Error("Can't add new command when connection is in closed state");if(Y.fatal=!0,$.onResult)$.onResult(Y);else this.emit("error",Y)}_handleFatalError($){$.fatal=!0,this.stream.removeAllListeners("data"),this.addCommand=this._addCommandClosedState,this.write=()=>{this.emit("error",Error("Can't write in closed state"))},this._notifyError($),this._fatalError=$}_handleNetworkError($){if(this.connectTimeout)Cq.clearTimeout(this.connectTimeout),this.connectTimeout=null;if($.code==="ECONNRESET"&&this._closing)return;this._handleFatalError($)}_handleTimeoutError(){if(this.connectTimeout)Cq.clearTimeout(this.connectTimeout),this.connectTimeout=null;this.stream.destroy&&this.stream.destroy();let $=Error("connect ETIMEDOUT");$.errorno="ETIMEDOUT",$.code="ETIMEDOUT",$.syscall="connect",this._handleNetworkError($)}_notifyError($){if(this.connectTimeout)Cq.clearTimeout(this.connectTimeout),this.connectTimeout=null;if(this._fatalError)return;let Y,X=!this._command;if(this._command&&this._command.onResult)this._command.onResult($),this._command=null;else if(!(this._command&&this._command.constructor===cJ.ClientHandshake&&this._commands.length>0))X=!0;while(Y=this._commands.shift())if(Y.onResult)Y.onResult($);else X=!0;if(X||this._pool)this.emit("error",$);if($.fatal)this.close()}write($){if(!this.stream.write($,(X)=>{if(X)this._handleNetworkError(X)}))this.stream.emit("pause")}_resetSequenceId(){this.sequenceId=0,this.compressedSequenceId=0}_bumpCompressedSequenceId($){this.compressedSequenceId+=$,this.compressedSequenceId%=256}_bumpSequenceId($){this.sequenceId+=$,this.sequenceId%=256}writePacket($){let X=$.length(),G,J,Q;if(X<16777215){if($.writeHeader(this.sequenceId),this.config.debug)console.log(`${this._internalId} ${this.connectionId} <== ${this._command._commandName}#${this._command.stateName()}(${[this.sequenceId,$._name,$.length()].join(",")})`),console.log(`${this._internalId} ${this.connectionId} <== ${$.buffer.toString("hex")}`);this._bumpSequenceId(1),this.write($.buffer)}else{if(this.config.debug)console.log(`${this._internalId} ${this.connectionId} <== Writing large packet, raw content not written:`),console.log(`${this._internalId} ${this.connectionId} <== ${this._command._commandName}#${this._command.stateName()}(${[this.sequenceId,$._name,$.length()].join(",")})`);for(J=4;J<4+X;J+=16777215){if(G=$.buffer.slice(J,J+16777215),G.length===16777215)Q=Buffer.from([255,255,255,this.sequenceId]);else Q=Buffer.from([G.length&255,G.length>>8&255,G.length>>16&255,this.sequenceId]);this._bumpSequenceId(1),this.write(Q),this.write(G)}}}startTLS($){if(this.config.debug)console.log("Upgrading connection to TLS");let Y=Cr.createSecureContext({ca:this.config.ssl.ca,cert:this.config.ssl.cert,ciphers:this.config.ssl.ciphers,key:this.config.ssl.key,passphrase:this.config.ssl.passphrase,minVersion:this.config.ssl.minVersion,maxVersion:this.config.ssl.maxVersion}),X=this.config.ssl.rejectUnauthorized,G=this.config.ssl.verifyIdentity,J=m30.isIP(this.config.host)?void 0:this.config.host,Q=!1;this.stream.removeAllListeners("data");let W=Cr.connect({rejectUnauthorized:X,requestCert:X,checkServerIdentity:G?Cr.checkServerIdentity:function(){return},secureContext:Y,isServer:!1,socket:this.stream,servername:J},()=>{if(Q=!0,X){if(typeof J==="string"&&G){let K=W.getPeerCertificate(!0),Z=Cr.checkServerIdentity(J,K);if(Z){$(Z);return}}}$()});W.on("error",(K)=>{if(Q)this._handleNetworkError(K);else $(K)}),W.on("data",(K)=>{this.packetParser.execute(K)}),this.stream=W}protocolError($,Y){if(this._closing)return;let X=Error($);X.fatal=!0,X.code=Y||"PROTOCOL_ERROR",this.emit("error",X)}get state(){if(this._fatalError||this._protocolError)return"error";if(this._closing||this.stream&&this.stream.destroyed)return"disconnected";if(this.authorized)return"authenticated";if(this._handshakePacket)return"connected";if(this.stream&&!this.stream.destroyed)return"protocol_handshake";return"disconnected"}get fatalError(){return this._fatalError}handlePacket($){if(this._paused){this._paused_packets.push($);return}if(this.config.debug){if($){console.log(` raw: ${$.buffer.slice($.offset,$.offset+$.length()).toString("hex")}`),console.trace();let Y=this._command?this._command._commandName:"(no command)",X=this._command?this._command.stateName():"(no command)";console.log(`${this._internalId} ${this.connectionId} ==> ${Y}#${X}(${[$.sequenceId,$.type(),$.length()].join(",")})`)}}if(!this._command){if($.peekByte()===255){let X=PF.Error.fromPacket($);this.protocolError(X.message,X.code)}else this.protocolError("Unexpected packet while no commands in the queue","PROTOCOL_UNEXPECTED_PACKET");this.close();return}if($){if(this.sequenceId!==$.sequenceId){let Y=Error(`Warning: got packets out of order. Expected ${this.sequenceId} but received ${$.sequenceId}`);Y.expected=this.sequenceId,Y.received=$.sequenceId,this.emit("warn",Y),console.error(Y.message)}this._bumpSequenceId($.numPackets)}try{if(this._fatalError)return;if(this._command.execute($,this)){if(this._command=this._commands.shift(),this._command)this.sequenceId=0,this.compressedSequenceId=0,this.handlePacket()}}catch(Y){this._handleFatalError(Y),this.stream.destroy()}}addCommand($){if(this.config.debug){let Y=$.constructor.name;console.log(`Add command: ${Y}`),$._commandName=Y}if(!this._command)this._command=$,this.handlePacket();else this._commands.push($);return $}format($,Y){if(typeof this.config.queryFormat==="function")return this.config.queryFormat.call(this,$,Y,this.config.timezone);let X={sql:$,values:Y};return this._resolveNamedPlaceholders(X),Sr.format(X.sql,X.values,this.config.stringifyObjects,this.config.timezone)}escape($){return Sr.escape($,!1,this.config.timezone)}escapeId($){return Sr.escapeId($,!1)}raw($){return Sr.raw($)}_resolveNamedPlaceholders($){let Y;if(this.config.namedPlaceholders||$.namedPlaceholders){if(Array.isArray($.values))return;if(l30===null)l30=ZZ1()();Y=l30($.sql,$.values),$.sql=Y[0],$.values=Y[1]}}query($,Y,X){let G;if($.constructor===cJ.Query)G=$;else G=kr.createQuery($,Y,X,this.config);this._resolveNamedPlaceholders(G);let J=this.format(G.sql,G.values!==void 0?G.values:[]);if(G.sql=J,G.onResult)VZ1(d30,(Q)=>{G.onResult=Q,this.addCommand(G)},0,()=>{let Q=Nv(this.config);return{query:G.sql,values:G.values,database:this.config.database||"",serverAddress:Q.serverAddress,serverPort:Q.serverPort}},null,G.onResult);else if(p30(d30))u30(d30,()=>new Promise((Q,W)=>{G.once("error",W),G.once("end",()=>Q()),this.addCommand(G)}),()=>{let Q=Nv(this.config);return{query:G.sql,values:G.values,database:this.config.database||"",serverAddress:Q.serverAddress,serverPort:Q.serverPort}}).catch(()=>{});else this.addCommand(G);return G}pause(){this._paused=!0,this.stream.pause()}resume(){let $;this._paused=!1;while($=this._paused_packets.shift())if(this.handlePacket($),this._paused)return;this.stream.resume()}prepare($,Y){if(typeof $==="string")$={sql:$};return this.addCommand(new cJ.Prepare($,Y))}unprepare($){let Y={};if(typeof $==="object")Y=$;else Y.sql=$;let X=kr.statementKey(Y),G=this._statements.get(X);if(G)this._statements.delete(X),G.close();return G}execute($,Y,X){let G={infileStreamFactory:this.config.infileStreamFactory};if(typeof $==="object")if(G={...G,...$,sql:$.sql,values:$.values},typeof Y==="function")X=Y;else G.values=G.values||Y;else if(typeof Y==="function")X=Y,G.sql=$,G.values=void 0;else G.sql=$,G.values=Y;if(this._resolveNamedPlaceholders(G),G.values){if(!Array.isArray(G.values))throw TypeError("Bind parameters must be array if namedPlaceholders parameter is not enabled");G.values.forEach((W)=>{if(!Array.isArray(G.values))throw TypeError("Bind parameters must be array if namedPlaceholders parameter is not enabled");if(W===void 0)throw TypeError("Bind parameters must not contain undefined. To pass SQL NULL specify JS null");if(typeof W==="function")throw TypeError("Bind parameters must not contain function(s). To pass the body of a function as a string call .toString() first")})}let J=new cJ.Execute(G,X),Q=(W)=>{let K=new cJ.Prepare(G,(Z,H)=>{if(Z){J.start=function(){return null},W(Z),J.emit("end");return}J.statement=H});this.addCommand(K),this.addCommand(J)};if(J.onResult){let W=J.onResult;VZ1(c30,(K)=>{J.onResult=K,Q(K)},0,()=>{let K=Nv(this.config);return{query:G.sql,values:G.values,database:this.config.database||"",serverAddress:K.serverAddress,serverPort:K.serverPort}},null,W)}else if(p30(c30))u30(c30,()=>new Promise((W,K)=>{Q((Z)=>{J.emit("error",Z)}),J.once("error",K),J.once("end",()=>W())}),()=>{let W=Nv(this.config);return{query:G.sql,values:G.values,database:this.config.database||"",serverAddress:W.serverAddress,serverPort:W.serverPort}}).catch(()=>{});else Q((W)=>{J.emit("error",W)});return J}changeUser($,Y){if(!Y&&typeof $==="function")Y=$,$={};let X=$.charset?yy6.getCharsetNumber($.charset):this.config.charsetNumber;return this.addCommand(new cJ.ChangeUser({user:$.user||this.config.user,password:$.password||$.password1||this.config.password||this.config.password1,password2:$.password2||this.config.password2,password3:$.password3||this.config.password3,passwordSha1:$.passwordSha1||this.config.passwordSha1,database:$.database||this.config.database,timeout:$.timeout,charsetNumber:X,currentConfig:this.config},(G)=>{if(G)G.fatal=!0;if(Y)Y(G)}))}beginTransaction($){return this.query("START TRANSACTION",$)}commit($){return this.query("COMMIT",$)}rollback($){return this.query("ROLLBACK",$)}ping($){return this.addCommand(new cJ.Ping($))}reset($){return this.addCommand(new cJ.ResetConnection($))}_registerSlave($,Y){return this.addCommand(new cJ.RegisterSlave($,Y))}_binlogDump($,Y){return this.addCommand(new cJ.BinlogDump($,Y))}destroy(){this.close()}close(){if(this.connectTimeout)Cq.clearTimeout(this.connectTimeout),this.connectTimeout=null;this._closing=!0,this.stream.end(),this.addCommand=this._addCommandClosedState}createBinlogStream($){let Y=1,X=new ky6({objectMode:!0});return X._read=function(){return{data:Y++}},this._registerSlave($,()=>{let G=this._binlogDump($);G.on("event",(J)=>{X.push(J)}),G.on("eof",()=>{if(X.push(null),$.flags&&$.flags&1)this.close()})}),X}connect($){if(!$)return;if(this._fatalError||this._protocolError)return $(this._fatalError||this._protocolError);if(this._handshakePacket)return $(null,this);let Y,X;Y=(G)=>{this.removeListener("connect",X),$(G)},X=(G)=>{this.removeListener("error",Y),$(null,G)},this.once("error",Y),this.once("connect",X)}writeColumns($){this.writePacket(PF.ResultSetHeader.toPacket($.length)),$.forEach((Y)=>{this.writePacket(PF.ColumnDefinition.toPacket(Y,this.serverConfig.encoding))}),this.writeEof()}writeTextRow($){this.writePacket(PF.TextRow.toPacket($,this.serverConfig.encoding))}writeBinaryRow($){this.writePacket(PF.BinaryRow.toPacket($,this.serverConfig.encoding))}writeTextResult($,Y,X=!1){this.writeColumns(Y),$.forEach((G)=>{let J=Array(Y.length);if(Y.forEach((Q)=>{J.push(G[Q.name])}),X)this.writeBinaryRow(J);else this.writeTextRow(J)}),this.writeEof()}writeEof($,Y){this.writePacket(PF.EOF.toPacket($,Y))}writeOk($){if(!$)$={affectedRows:0};this.writePacket(PF.OK.toPacket($,this.serverConfig.encoding))}writeError($){let Y=this.serverConfig?this.serverConfig.encoding:"cesu8";this.writePacket(PF.Error.toPacket($,Y))}serverHandshake($){return this.serverConfig=$,this.serverConfig.encoding=zZ1[this.serverConfig.characterSet],this.addCommand(new cJ.ServerHandshake($))}[Symbol.dispose](){if(!this._closing)this.end()}end($){if(this.config.isServer){this._closing=!0;let X=new UZ1;return setImmediate(()=>{this.stream.end(),X.emit("end")}),X}let Y=this.addCommand(new cJ.Quit($));return this.addCommand=this._addCommandClosedState,Y}static createQuery($,Y,X,G){let J={rowsAsArray:G.rowsAsArray,infileStreamFactory:G.infileStreamFactory};if(typeof $==="object"){if(J={...J,...$,sql:$.sql,values:$.values},typeof Y==="function")X=Y;else if(Y!==void 0)J.values=Y}else if(typeof Y==="function")X=Y,J.sql=$,J.values=void 0;else J.sql=$,J.values=Y;return new cJ.Query(J,X)}static statementKey($){return`${typeof $.nestTables}/${$.nestTables}/${$.rowsAsArray}${$.sql}`}}LZ1.exports=kr});var SA=o((eV5,DZ1)=>{function hy6($){let Y={};return Error.captureStackTrace(Y,$),Y}function fy6($,Y){let X=Y&&Y.stack;if(typeof X!=="string"||!X)return;let G=X.split(`
`);G[0]=`${$.name}: ${$.message}`,$.stack=G.join(`
`)}DZ1.exports={captureStackHolder:hy6,applyCapturedStack:fy6}});var Sq=o(($F5,NZ1)=>{var{applyCapturedStack:gy6}=SA();function my6($,Y,X){return function(G,J,Q){if(G)gy6(G,X),Y(G);else $([J,Q])}}NZ1.exports=my6});var BZ1=o((YF5,AZ1)=>{var{captureStackHolder:uy6}=SA(),py6=Sq();class i30{constructor($,Y){this.statement=$,this.Promise=Y}execute($){let Y=this.statement,X=uy6(i30.prototype.execute);return new this.Promise((G,J)=>{let Q=py6(G,J,X);if($)Y.execute($,Q);else Y.execute(Q)})}close(){return new this.Promise(($)=>{this.statement.close(),$()})}}AZ1.exports=i30});var xr=o((XF5,OZ1)=>{function dy6($,Y,X){let G={};Y.on("newListener",(J)=>{if(X.indexOf(J)>=0&&!Y.listenerCount(J))$.on(J,G[J]=function(){let Q=[].slice.call(arguments);Q.unshift(J),Y.emit.apply(Y,Q)})}).on("removeListener",(J)=>{if(X.indexOf(J)>=0&&!Y.listenerCount(J))$.removeListener(J,G[J]),delete G[J]})}OZ1.exports=dy6});var yr=o((GF5,MZ1)=>{var cy6=A0("events").EventEmitter,ly6=BZ1(),{captureStackHolder:sU,applyCapturedStack:Av}=SA(),Bv=Sq(),iy6=xr(),EZ1=vr();class lJ extends cy6{constructor($,Y){super();this.connection=$,this.Promise=Y||Promise,iy6($,this,["error","drain","connect","end","enqueue"])}release(){this.connection.release()}query($,Y){let X=this.connection,G=sU(lJ.prototype.query);if(typeof Y==="function")throw Error("Callback function is not available with promise clients.");return new this.Promise((J,Q)=>{let W=Bv(J,Q,G);if(Y!==void 0)X.query($,Y,W);else X.query($,W)})}execute($,Y){let X=this.connection,G=sU(lJ.prototype.execute);if(typeof Y==="function")throw Error("Callback function is not available with promise clients.");return new this.Promise((J,Q)=>{let W=Bv(J,Q,G);if(Y!==void 0)X.execute($,Y,W);else X.execute($,W)})}end(){return new this.Promise(($)=>{this.connection.end($)})}async[Symbol.asyncDispose](){if(!this.connection._closing)await this.end()}beginTransaction(){let $=this.connection,Y=sU(lJ.prototype.beginTransaction);return new this.Promise((X,G)=>{let J=Bv(X,G,Y);$.beginTransaction(J)})}commit(){let $=this.connection,Y=sU(lJ.prototype.commit);return new this.Promise((X,G)=>{let J=Bv(X,G,Y);$.commit(J)})}rollback(){let $=this.connection,Y=sU(lJ.prototype.rollback);return new this.Promise((X,G)=>{let J=Bv(X,G,Y);$.rollback(J)})}ping(){let $=this.connection,Y=sU(lJ.prototype.ping);return new this.Promise((X,G)=>{$.ping((J)=>{if(J)Av(J,Y),G(J);else X(!0)})})}reset(){let $=this.connection,Y=sU(lJ.prototype.reset);return new this.Promise((X,G)=>{$.reset((J)=>{if(J)Av(J,Y),G(J);else X()})})}connect(){let $=this.connection,Y=sU(lJ.prototype.connect);return new this.Promise((X,G)=>{$.connect((J,Q)=>{if(J)Av(J,Y),G(J);else X(Q)})})}prepare($){let Y=this.connection,X=this.Promise,G=sU(lJ.prototype.prepare);return new this.Promise((J,Q)=>{Y.prepare($,(W,K)=>{if(W)Av(W,G),Q(W);else{let Z=new ly6(K,X);J(Z)}})})}changeUser($){let Y=this.connection,X=sU(lJ.prototype.changeUser);return new this.Promise((G,J)=>{Y.changeUser($,(Q)=>{if(Q)Av(Q,X),J(Q);else G()})})}get config(){return this.connection.config}get threadId(){return this.connection.threadId}}(function($){for(let Y=0;$&&Y<$.length;Y++){let X=$[Y];if(typeof EZ1.prototype[X]==="function"&&lJ.prototype[X]===void 0)lJ.prototype[X]=function(J){return function(){return EZ1.prototype[J].apply(this.connection,arguments)}}(X)}})(["close","createBinlogStream","destroy","escape","escapeId","format","pause","pipe","resume","unprepare"]);MZ1.exports=lJ});var kq=o((JF5,qZ1)=>{var ny6=vr();class RZ1 extends ny6{promise($){return new(yr())(this,$)}}qZ1.exports=RZ1});var n30=o((QF5,PZ1)=>{var ry6=kq(),ay6=Bq();function sy6($){return new ry6({config:new ay6($)})}PZ1.exports=sy6});var Ov=o((WF5,_Z1)=>{var oy6=yr();class wZ1 extends oy6{constructor($,Y){super($,Y)}destroy(){return this.connection.destroy()}async[Symbol.asyncDispose](){this.release()}}_Z1.exports=wZ1});var a30=o((KF5,jZ1)=>{var r30=kq();class br extends r30{constructor($,Y){super(Y);this._pool=$,this._released=!1,this.lastActiveTime=Date.now(),this.once("end",()=>{this._removeFromPool()}),this.once("error",()=>{this._removeFromPool()})}release(){if(this._released)return;if(!this._pool||this._pool._closed)return;this._released=!0,this.lastActiveTime=Date.now(),this._pool.releaseConnection(this)}[Symbol.dispose](){this.release()}end($){if(this.config.gracefulEnd){this._removeFromPool(),super.end($);return}let Y=Error("Calling conn.end() to release a pooled connection is deprecated. In next version calling conn.end() will be restored to default conn.end() behavior. Use conn.release() instead.");if(this.emit("warn",Y),console.warn(Y.message),this.release(),typeof $==="function")$()}destroy(){this._removeFromPool(),super.destroy()}_removeFromPool(){if(!this._pool||this._pool._closed)return;let $=this._pool;this._pool=null,$._removeConnection(this)}promise($){return new(Ov())(this,$)}}br.statementKey=r30.statementKey;jZ1.exports=br;br.prototype._realEnd=r30.prototype.end});var $H0=o((ZF5,CZ1)=>{var vq=A0("process"),s30=ok(),ty6=A0("events").EventEmitter,ey6=a30(),o30=HU0(),$b6=vr(),t30=Wr(),{traceCallback:Yb6,getServerContext:Xb6,poolConnectChannel:Gb6}=h30();function TZ1($){if(!$||!$.errno)return!1;return $.errno===t30.ER_OPTION_PREVENTS_STATEMENT||$.errno===t30.ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION||$.errno===t30.ER_READ_ONLY_MODE}function e30($,Y){let X=$.length;for(let G=0;G<X;G++)if($.get(G)===Y){$.removeOne(G);break}}class IZ1 extends ty6{constructor($){super();if(this.config=$.config,this.config.connectionConfig.pool=this,this._allConnections=new o30,this._freeConnections=new o30,this._connectionQueue=new o30,this._closed=!1,this.config.maxIdle<this.config.connectionLimit)this._removeIdleTimeoutConnections()}getConnection($){let Y=(G)=>{if(this._closed)return vq.nextTick(()=>G(Error("Pool is closed.")));let J;if(this._freeConnections.length>0)return J=this._freeConnections.pop(),this.emit("acquire",J),vq.nextTick(()=>{J._released=!1,G(null,J)});if(this.config.connectionLimit===0||this._allConnections.length<this.config.connectionLimit)return J=new ey6(this,{config:this.config.connectionConfig}),this._allConnections.push(J),J.connect((Q)=>{if(this._closed)return G(Error("Pool is closed."));if(Q)return G(Q);return this.emit("connection",J),this.emit("acquire",J),G(null,J)});if(!this.config.waitForConnections)return vq.nextTick(()=>G(Error("No connections available.")));if(this.config.queueLimit&&this._connectionQueue.length>=this.config.queueLimit)return G(Error("Queue limit reached."));return this.emit("enqueue"),this._connectionQueue.push(G)},X=this.config.connectionConfig;Yb6(Gb6,Y,0,()=>{let G=Xb6(X);return{database:X.database||"",serverAddress:G.serverAddress,serverPort:G.serverPort}},null,$)}releaseConnection($){let Y;if(!$._pool){if(this._connectionQueue.length)Y=this._connectionQueue.shift(),vq.nextTick(this.getConnection.bind(this,Y));return}if(this.config.resetOnRelease&&$.reset)$.reset((X)=>{if(X){if($._pool=null,e30(this._allConnections,$),$.destroy(),this._connectionQueue.length)Y=this._connectionQueue.shift(),vq.nextTick(this.getConnection.bind(this,Y));return}this._handleSuccessfulRelease($)});else this._handleSuccessfulRelease($)}_handleSuccessfulRelease($){let Y;if(this._connectionQueue.length)Y=this._connectionQueue.shift(),vq.nextTick(()=>{$._released=!1,Y(null,$)});else this._freeConnections.push($),this.emit("release",$)}[Symbol.dispose](){if(!this._closed)this.end()}end($){if(this._closed=!0,clearTimeout(this._removeIdleTimeoutConnectionsTimer),typeof $!=="function")$=function(Q){if(Q)throw Q};let Y=!1,X=0,G,J=function(Q){if(Y)return;if(Q||++X>=this._allConnections.length){Y=!0,$(Q);return}}.bind(this);if(this._allConnections.length===0){J();return}for(let Q=0;Q<this._allConnections.length;Q++)G=this._allConnections.get(Q),G._realEnd(J)}query($,Y,X){let G=$b6.createQuery($,Y,X,this.config.connectionConfig);if(typeof G.namedPlaceholders>"u")G.namedPlaceholders=this.config.connectionConfig.namedPlaceholders;return this.getConnection((J,Q)=>{if(J){if(typeof G.onResult==="function")G.onResult(J);else G.emit("error",J);return}try{let W=null,K=G.onResult;if(K)G.onResult=function(Z,H,z){W=Z||null,K(Z,H,z)};else G.once("error",(Z)=>{W=Z});Q.query(G).once("end",()=>{if(TZ1(W))Q.destroy();else Q.release()})}catch(W){throw Q.release(),W}}),G}execute($,Y,X){if(typeof Y==="function")X=Y,Y=[];this.getConnection((G,J)=>{if(G)return X(G);try{J.execute($,Y,(Q,W,K)=>{if(TZ1(Q))J.destroy();X(Q,W,K)}).once("end",()=>{J.release()})}catch(Q){return J.release(),X(Q)}})}_removeConnection($){e30(this._allConnections,$),e30(this._freeConnections,$),this.releaseConnection($)}_removeIdleTimeoutConnections(){if(this._removeIdleTimeoutConnectionsTimer)clearTimeout(this._removeIdleTimeoutConnectionsTimer);this._removeIdleTimeoutConnectionsTimer=setTimeout(()=>{try{while(this._freeConnections.length>this.config.maxIdle||this._freeConnections.length>0&&Date.now()-this._freeConnections.get(0).lastActiveTime>this.config.idleTimeout)if(this.config.connectionConfig.gracefulEnd)this._freeConnections.get(0).end();else this._freeConnections.get(0).destroy()}finally{this._removeIdleTimeoutConnections()}},1000)}format($,Y){return s30.format($,Y,this.config.connectionConfig.stringifyObjects,this.config.connectionConfig.timezone)}escape($){return s30.escape($,this.config.connectionConfig.stringifyObjects,this.config.connectionConfig.timezone)}escapeId($){return s30.escapeId($,!1)}}CZ1.exports=IZ1});var XH0=o((UF5,xZ1)=>{var Jb6=A0("events").EventEmitter,{captureStackHolder:YH0,applyCapturedStack:Qb6}=SA(),SZ1=Sq(),kZ1=Ov(),Wb6=xr(),vZ1=$H0();class kA extends Jb6{constructor($,Y){super();this.pool=$,this.Promise=Y||Promise,Wb6($,this,["acquire","connection","enqueue","release"])}getConnection(){let $=this.pool;return new this.Promise((Y,X)=>{$.getConnection((G,J)=>{if(G)X(G);else Y(new kZ1(J,this.Promise))})})}releaseConnection($){if($ instanceof kZ1)$.release()}query($,Y){let X=this.pool,G=YH0(kA.prototype.query);if(typeof Y==="function")throw Error("Callback function is not available with promise clients.");return new this.Promise((J,Q)=>{let W=SZ1(J,Q,G);if(Y!==void 0)X.query($,Y,W);else X.query($,W)})}execute($,Y){let X=this.pool,G=YH0(kA.prototype.execute);if(typeof Y==="function")throw Error("Callback function is not available with promise clients.");return new this.Promise((J,Q)=>{let W=SZ1(J,Q,G);if(Y)X.execute($,Y,W);else X.execute($,W)})}end(){let $=this.pool,Y=YH0(kA.prototype.end);return new this.Promise((X,G)=>{$.end((J)=>{if(J)Qb6(J,Y),G(J);else X()})})}async[Symbol.asyncDispose](){if(!this.pool._closed)await this.end()}}(function($){for(let Y=0;$&&Y<$.length;Y++){let X=$[Y];if(typeof vZ1.prototype[X]==="function"&&kA.prototype[X]===void 0)kA.prototype[X]=function(J){return function(){return vZ1.prototype[J].apply(this.pool,arguments)}}(X)}})(["escape","escapeId","format"]);xZ1.exports=kA});var hr=o((HF5,bZ1)=>{var Kb6=$H0();class yZ1 extends Kb6{promise($){return new(XH0())(this,$)}}bZ1.exports=yZ1});var GH0=o((zF5,gZ1)=>{var hZ1=Bq();class fZ1{constructor($){if(typeof $==="string")$=hZ1.parseUrl($);this.connectionConfig=new hZ1($),this.waitForConnections=$.waitForConnections===void 0?!0:Boolean($.waitForConnections),this.connectionLimit=isNaN($.connectionLimit)?10:Number($.connectionLimit),this.maxIdle=isNaN($.maxIdle)?this.connectionLimit:Number($.maxIdle),this.idleTimeout=isNaN($.idleTimeout)?60000:Number($.idleTimeout),this.queueLimit=isNaN($.queueLimit)?0:Number($.queueLimit),this.resetOnRelease=$.resetOnRelease===void 0?!1:Boolean($.resetOnRelease)}}gZ1.exports=fZ1});var fr=o((VF5,cZ1)=>{var Ev=A0("process"),Zb6=hr(),Ub6=GH0(),Hb6=kq(),zb6=A0("events").EventEmitter,uZ1={RR(){let $=0;return(Y)=>Y[$++%Y.length]},RANDOM(){return($)=>$[Math.floor(Math.random()*$.length)]},ORDER(){return($)=>$[0]}},mZ1=function(){let $;if(typeof Ev.hrtime==="function")$=Ev.hrtime(),$=$[0]*1000+$[1]*0.000001;else $=Ev.uptime()*1000;return Math.floor($)},Vb6=function($){if($ instanceof RegExp)return $;let Y=$.replace(/([.+?^=!:${}()|[\]/\\])/g,"\\$1").replace(/\*/g,".*");return new RegExp(`^${Y}$`)};class pZ1{constructor($,Y,X){this._cluster=$,this._pattern=Y,this._selector=uZ1[X]()}getConnection($){let Y=this._getClusterNode();if(Y===null){let X=Error("Pool does Not exist.");if(X.code="POOL_NOEXIST",this._cluster._findNodeIds(this._pattern,!0).length!==0)X=Error("Pool does Not have online node."),X.code="POOL_NONEONLINE";return $(X)}return this._cluster._getConnection(Y,(X,G)=>{if(X){if(this._cluster._canRetry&&this._cluster._findNodeIds(this._pattern).length!==0)return this._cluster.emit("warn",X),this.getConnection($);return $(X)}return $(null,G)})}query($,Y,X){let G=Hb6.createQuery($,Y,X,{});return this.getConnection((J,Q)=>{if(J){if(typeof G.onResult==="function")G.onResult(J);else G.emit("error",J);return}try{Q.query(G).once("end",()=>{Q.release()})}catch(W){throw Q.release(),W}}),G}execute($,Y,X){if(typeof Y==="function")X=Y,Y=[];this.getConnection((G,J)=>{if(G)return X(G);try{J.execute($,Y,X).once("end",()=>{J.release()})}catch(Q){throw J.release(),Q}})}_getClusterNode(){let $=this._cluster._findNodeIds(this._pattern);if($.length===0)return null;let Y=$.length===1?$[0]:this._selector($);return this._cluster._getNode(Y)}}class dZ1 extends zb6{constructor($){super();$=$||{},this._canRetry=typeof $.canRetry>"u"?!0:$.canRetry,this._removeNodeErrorCount=$.removeNodeErrorCount||5,this._restoreNodeTimeout=$.restoreNodeTimeout||0,this._defaultSelector=$.defaultSelector||"RR",this._closed=!1,this._lastId=0,this._nodes={},this._serviceableNodeIds=[],this._namespaces={},this._findCaches={}}of($,Y){if($=$||"*",Y=Y||this._defaultSelector,Y=Y.toUpperCase(),!uZ1[Y]==="undefined")Y=this._defaultSelector;let X=$+Y;if(typeof this._namespaces[X]>"u")this._namespaces[X]=new pZ1(this,$,Y);return this._namespaces[X]}add($,Y){if(typeof $==="object")Y=$,$=`CLUSTER::${++this._lastId}`;if(typeof this._nodes[$]>"u")this._nodes[$]={id:$,errorCount:0,pool:new Zb6({config:new Ub6(Y)}),_offlineUntil:0},this._serviceableNodeIds.push($),this._clearFindCaches()}remove($){let Y=this._findNodeIds($,!0);for(let X=0;X<Y.length;X++){let G=this._getNode(Y[X]);if(G)this._removeNode(G)}}getConnection($,Y,X){let G;if(typeof $==="function")X=$,G=this.of();else{if(typeof Y==="function")X=Y,Y=this._defaultSelector;G=this.of($,Y)}G.getConnection(X)}[Symbol.dispose](){if(!this._closed)this.end()}end($){let Y=$!==void 0?$:(Q)=>{if(Q)throw Q};if(this._closed){Ev.nextTick(Y);return}this._closed=!0;let X=!1,G=0,J=(Q)=>{if(!X&&(Q||--G<=0))return X=!0,Y(Q)};for(let Q in this._nodes)G++,this._nodes[Q].pool.end(J);if(G===0)Ev.nextTick(J)}_findNodeIds($,Y){let X=0,G=this._findCaches[$];if(G===void 0){let J=Vb6($);G=this._serviceableNodeIds.filter((Q)=>Q.match(J))}if(this._findCaches[$]=G,Y)return G;return G.filter((J)=>{let Q=this._getNode(J);if(!Q._offlineUntil)return!0;if(!X)X=mZ1();return Q._offlineUntil<=X})}_getNode($){return this._nodes[$]||null}_increaseErrorCount($){let Y=++$.errorCount;if(this._removeNodeErrorCount>Y)return;if(this._restoreNodeTimeout>0){$._offlineUntil=mZ1()+this._restoreNodeTimeout,this.emit("offline",$.id);return}this._removeNode($),this.emit("remove",$.id)}_decreaseErrorCount($){let Y=$.errorCount;if(Y>this._removeNodeErrorCount)Y=this._removeNodeErrorCount;if(Y<1)Y=1;if($.errorCount=Y-1,$._offlineUntil)$._offlineUntil=0,this.emit("online",$.id)}_getConnection($,Y){$.pool.getConnection((X,G)=>{if(X)return this._increaseErrorCount($),Y(X);return this._decreaseErrorCount($),G._clusterId=$.id,Y(null,G)})}_removeNode($){let Y=this._serviceableNodeIds.indexOf($.id);if(Y!==-1)this._serviceableNodeIds.splice(Y,1),delete this._nodes[$.id],this._clearFindCaches(),$.pool.end()}_clearFindCaches(){this._findCaches={}}}cZ1.exports=dZ1});var JH0=o((FF5,lZ1)=>{var Fb6=hr(),Lb6=GH0();function Db6($){return new Fb6({config:new Lb6($)})}lZ1.exports=Db6});var QH0=o((LF5,iZ1)=>{var Nb6=fr();function Ab6($){return new Nb6($)}iZ1.exports=Ab6});var aZ1=o((DF5,rZ1)=>{var Bb6=A0("net"),Ob6=A0("events").EventEmitter,Eb6=kq(),Mb6=Bq();class nZ1 extends Ob6{constructor(){super();this.connections=[],this._server=Bb6.createServer(this._handleConnection.bind(this))}_handleConnection($){let Y=new Mb6({stream:$,isServer:!0}),X=new Eb6({config:Y});this.emit("connection",X)}listen($){return this._port=$,this._server.listen.apply(this._server,arguments),this}close($){this._server.close($)}}rZ1.exports=nZ1});var oZ1=o((NF5,sZ1)=>{sZ1.exports={caching_sha2_password:Pr(),mysql_clear_password:M30(),mysql_native_password:E30(),sha256_password:N30()}});var YU1=o((AF5,$U1)=>{var{captureStackHolder:tZ1}=SA(),Rb6=Ov(),eZ1=Sq();class gr{constructor($,Y){this.poolNamespace=$,this.Promise=Y||Promise}getConnection(){let $=this.poolNamespace;return new this.Promise((Y,X)=>{$.getConnection((G,J)=>{if(G)X(G);else Y(new Rb6(J,this.Promise))})})}query($,Y){let X=this.poolNamespace,G=tZ1(gr.prototype.query);if(typeof Y==="function")throw Error("Callback function is not available with promise clients.");return new this.Promise((J,Q)=>{let W=eZ1(J,Q,G);X.query($,Y,W)})}execute($,Y){let X=this.poolNamespace,G=tZ1(gr.prototype.execute);if(typeof Y==="function")throw Error("Callback function is not available with promise clients.");return new this.Promise((J,Q)=>{let W=eZ1(J,Q,G);X.execute($,Y,W)})}}$U1.exports=gr});var Mv=o((Sb6)=>{var ur=ok(),qb6=A0("events").EventEmitter,JU1=ek(),XU1=fr(),Pb6=n30(),wb6=JH0(),_b6=QH0(),WH0=yr(),QU1=XH0(),{captureStackHolder:mr,applyCapturedStack:WU1}=SA(),GU1=Sq(),KH0=Ov(),jb6=xr(),Tb6=YU1();function KU1($){let Y=Pb6($),X=mr(KU1),G=$.Promise||Promise;if(!G)throw Error("no Promise implementation available.Use promise-enabled node version or pass userland Promise implementation as parameter, for example: { Promise: require('bluebird') }");return new G((J,Q)=>{Y.once("connect",()=>{J(new WH0(Y,G))}),Y.once("error",(W)=>{WU1(W,X),Q(W)})})}function Ib6($){let Y=wb6($),X=$.Promise||Promise;if(!X)throw Error("no Promise implementation available.Use promise-enabled node version or pass userland Promise implementation as parameter, for example: { Promise: require('bluebird') }");return new QU1(Y,X)}class vA extends qb6{constructor($,Y){super();this.poolCluster=$,this.Promise=Y||Promise,jb6($,this,["warn","remove","online","offline"])}getConnection($,Y){let X=this.poolCluster;return new this.Promise((G,J)=>{X.getConnection($,Y,(Q,W)=>{if(Q)J(Q);else G(new KH0(W,this.Promise))})})}query($,Y){let X=this.poolCluster,G=mr(vA.prototype.query);if(typeof Y==="function")throw Error("Callback function is not available with promise clients.");return new this.Promise((J,Q)=>{let W=GU1(J,Q,G);X.query($,Y,W)})}execute($,Y){let X=this.poolCluster,G=mr(vA.prototype.execute);if(typeof Y==="function")throw Error("Callback function is not available with promise clients.");return new this.Promise((J,Q)=>{let W=GU1(J,Q,G);X.execute($,Y,W)})}of($,Y){return new Tb6(this.poolCluster.of($,Y),this.Promise)}end(){let $=this.poolCluster,Y=mr(vA.prototype.end);return new this.Promise((X,G)=>{$.end((J)=>{if(J)WU1(J,Y),G(J);else X()})})}async[Symbol.asyncDispose](){if(!this.poolCluster._closed)await this.end()}}(function($){for(let Y=0;$&&Y<$.length;Y++){let X=$[Y];if(typeof XU1.prototype[X]==="function"&&vA.prototype[X]===void 0)vA.prototype[X]=function(J){return function(){return XU1.prototype[J].apply(this.poolCluster,arguments)}}(X)}})(["add","remove"]);function Cb6($){let Y=_b6($),X=$&&$.Promise||Promise;if(!X)throw Error("no Promise implementation available.Use promise-enabled node version or pass userland Promise implementation as parameter, for example: { Promise: require('bluebird') }");return new vA(Y,X)}Sb6.createConnection=KU1;Sb6.createPool=Ib6;Sb6.createPoolCluster=Cb6;Sb6.escape=ur.escape;Sb6.escapeId=ur.escapeId;Sb6.format=ur.format;Sb6.raw=ur.raw;Sb6.Connection=WH0;Sb6.PoolConnection=KH0;Sb6.PromisePool=QU1;Sb6.PromiseConnection=WH0;Sb6.PromisePoolConnection=KH0;Sb6.__defineGetter__("Types",()=>tQ());Sb6.__defineGetter__("Charsets",()=>RF());Sb6.__defineGetter__("CharsetToEncoding",()=>O2());Sb6.setMaxParserCache=function($){JU1.setMaxCache($)};Sb6.clearParserCache=function(){JU1.clearCache()}});var ZH0=o((ob6)=>{var pr=ok(),ib6=Bq(),UU1=ek(),HU1=kq();ob6.createConnection=n30();ob6.connect=ob6.createConnection;ob6.Connection=HU1;ob6.ConnectionConfig=ib6;var nb6=hr(),rb6=fr(),ab6=JH0(),sb6=QH0();ob6.createPool=ab6;ob6.createPoolCluster=sb6;ob6.createQuery=HU1.createQuery;ob6.Pool=nb6;ob6.PoolCluster=rb6;ob6.createServer=function($){let X=new(aZ1());if($)X.on("connection",$);return X};ob6.PoolConnection=a30();ob6.authPlugins=oZ1();ob6.escape=pr.escape;ob6.escapeId=pr.escapeId;ob6.format=pr.format;ob6.raw=pr.raw;ob6.__defineGetter__("createConnectionPromise",()=>Mv().createConnection);ob6.__defineGetter__("createPoolPromise",()=>Mv().createPool);ob6.__defineGetter__("createPoolClusterPromise",()=>Mv().createPoolCluster);ob6.__defineGetter__("Types",()=>tQ());ob6.__defineGetter__("Charsets",()=>RF());ob6.__defineGetter__("CharsetToEncoding",()=>O2());ob6.setMaxParserCache=function($){UU1.setMaxCache($)};ob6.clearParserCache=function(){UU1.clearCache()}});var qH0=o((Ih6)=>{Ih6.parse=function($,Y){return new RH0($,Y).parse()};class RH0{constructor($,Y){this.source=$,this.transform=Y||Th6,this.position=0,this.entries=[],this.recorded=[],this.dimension=0}isEof(){return this.position>=this.source.length}nextCharacter(){var $=this.source[this.position++];if($==="\\")return{value:this.source[this.position++],escaped:!0};return{value:$,escaped:!1}}record($){this.recorded.push($)}newEntry($){var Y;if(this.recorded.length>0||$){if(Y=this.recorded.join(""),Y==="NULL"&&!$)Y=null;if(Y!==null)Y=this.transform(Y);this.entries.push(Y),this.recorded=[]}}consumeDimensions(){if(this.source[0]==="[")while(!this.isEof()){var $=this.nextCharacter();if($.value==="=")break}}parse($){var Y,X,G;this.consumeDimensions();while(!this.isEof())if(Y=this.nextCharacter(),Y.value==="{"&&!G){if(this.dimension++,this.dimension>1)X=new RH0(this.source.substr(this.position-1),this.transform),this.entries.push(X.parse(!0)),this.position+=X.position-2}else if(Y.value==="}"&&!G){if(this.dimension--,!this.dimension){if(this.newEntry(),$)return this.entries}}else if(Y.value==='"'&&!Y.escaped){if(G)this.newEntry(!0);G=!G}else if(Y.value===","&&!G)this.newEntry();else this.record(Y.value);if(this.dimension!==0)throw Error("array dimension not balanced");return this.entries}}function Th6($){return $}});var PH0=o((QB5,g31)=>{var Sh6=qH0();g31.exports={create:function($,Y){return{parse:function(){return Sh6.parse($,Y)}}}}});var p31=o((WB5,u31)=>{var kh6=/(\d{1,})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(\.\d{1,})?.*?( BC)?$/,vh6=/^(\d{1,})-(\d{2})-(\d{2})( BC)?$/,xh6=/([Z+-])(\d{2})?:?(\d{2})?:?(\d{2})?/,yh6=/^-?infinity$/;u31.exports=function(Y){if(yh6.test(Y))return Number(Y.replace("i","I"));var X=kh6.exec(Y);if(!X)return bh6(Y)||null;var G=!!X[8],J=parseInt(X[1],10);if(G)J=m31(J);var Q=parseInt(X[2],10)-1,W=X[3],K=parseInt(X[4],10),Z=parseInt(X[5],10),H=parseInt(X[6],10),z=X[7];z=z?1000*parseFloat(z):0;var V,F=hh6(Y);if(F!=null){if(V=new Date(Date.UTC(J,Q,W,K,Z,H,z)),wH0(J))V.setUTCFullYear(J);if(F!==0)V.setTime(V.getTime()-F)}else if(V=new Date(J,Q,W,K,Z,H,z),wH0(J))V.setFullYear(J);return V};function bh6($){var Y=vh6.exec($);if(!Y)return;var X=parseInt(Y[1],10),G=!!Y[4];if(G)X=m31(X);var J=parseInt(Y[2],10)-1,Q=Y[3],W=new Date(X,J,Q);if(wH0(X))W.setFullYear(X);return W}function hh6($){if($.endsWith("+00"))return 0;var Y=xh6.exec($.split(" ")[1]);if(!Y)return;var X=Y[1];if(X==="Z")return 0;var G=X==="-"?-1:1,J=parseInt(Y[2],10)*3600+parseInt(Y[3]||0,10)*60+parseInt(Y[4]||0,10);return J*G*1000}function m31($){return-($-1)}function wH0($){return $>=0&&$<100}});var c31=o((KB5,d31)=>{d31.exports=gh6;var fh6=Object.prototype.hasOwnProperty;function gh6($){for(var Y=1;Y<arguments.length;Y++){var X=arguments[Y];for(var G in X)if(fh6.call(X,G))$[G]=X[G]}return $}});var n31=o((ZB5,i31)=>{var mh6=c31();i31.exports=yq;function yq($){if(!(this instanceof yq))return new yq($);mh6(this,th6($))}var uh6=["seconds","minutes","hours","days","months","years"];yq.prototype.toPostgres=function(){var $=uh6.filter(this.hasOwnProperty,this);if(this.milliseconds&&$.indexOf("seconds")<0)$.push("seconds");if($.length===0)return"0";return $.map(function(Y){var X=this[Y]||0;if(Y==="seconds"&&this.milliseconds)X=(X+this.milliseconds/1000).toFixed(6).replace(/\.?0+$/,"");return X+" "+Y},this).join(" ")};var ph6={years:"Y",months:"M",days:"D",hours:"H",minutes:"M",seconds:"S"},dh6=["years","months","days"],ch6=["hours","minutes","seconds"];yq.prototype.toISOString=yq.prototype.toISO=function(){var $=dh6.map(X,this).join(""),Y=ch6.map(X,this).join("");return"P"+$+"T"+Y;function X(G){var J=this[G]||0;if(G==="seconds"&&this.milliseconds)J=(J+this.milliseconds/1000).toFixed(6).replace(/0+$/,"");return J+ph6[G]}};var _H0="([+-]?\\d+)",lh6=_H0+"\\s+years?",ih6=_H0+"\\s+mons?",nh6=_H0+"\\s+days?",rh6="([+-])?([\\d]*):(\\d\\d):(\\d\\d)\\.?(\\d{1,6})?",ah6=new RegExp([lh6,ih6,nh6,rh6].map(function($){return"("+$+")?"}).join("\\s*")),l31={years:2,months:4,days:6,hours:9,minutes:10,seconds:11,milliseconds:12},sh6=["hours","minutes","seconds","milliseconds"];function oh6($){var Y=$+"000000".slice($.length);return parseInt(Y,10)/1000}function th6($){if(!$)return{};var Y=ah6.exec($),X=Y[8]==="-";return Object.keys(l31).reduce(function(G,J){var Q=l31[J],W=Y[Q];if(!W)return G;if(W=J==="milliseconds"?oh6(W):parseInt(W,10),!W)return G;if(X&&~sh6.indexOf(J))W*=-1;return G[J]=W,G},{})}});var s31=o((UB5,a31)=>{var r31=Buffer.from||Buffer;a31.exports=function(Y){if(/^\\x/.test(Y))return r31(Y.substr(2),"hex");var X="",G=0;while(G<Y.length)if(Y[G]!=="\\")X+=Y[G],++G;else if(/[0-7]{3}/.test(Y.substr(G+1,3)))X+=String.fromCharCode(parseInt(Y.substr(G+1,3),8)),G+=4;else{var J=1;while(G+J<Y.length&&Y[G+J]==="\\")J++;for(var Q=0;Q<Math.floor(J/2);++Q)X+="\\";G+=Math.floor(J/2)*2}return r31(X,"binary")}});var GH1=o((HB5,XH1)=>{var $x=qH0(),Yx=PH0(),tr=p31(),t31=n31(),e31=s31();function er($){return function(X){if(X===null)return X;return $(X)}}function $H1($){if($===null)return $;return $==="TRUE"||$==="t"||$==="true"||$==="y"||$==="yes"||$==="on"||$==="1"}function eh6($){if(!$)return null;return $x.parse($,$H1)}function $f6($){return parseInt($,10)}function jH0($){if(!$)return null;return $x.parse($,er($f6))}function Yf6($){if(!$)return null;return $x.parse($,er(function(Y){return YH1(Y).trim()}))}var Xf6=function($){if(!$)return null;var Y=Yx.create($,function(X){if(X!==null)X=SH0(X);return X});return Y.parse()},TH0=function($){if(!$)return null;var Y=Yx.create($,function(X){if(X!==null)X=parseFloat(X);return X});return Y.parse()},M2=function($){if(!$)return null;var Y=Yx.create($);return Y.parse()},IH0=function($){if(!$)return null;var Y=Yx.create($,function(X){if(X!==null)X=tr(X);return X});return Y.parse()},Gf6=function($){if(!$)return null;var Y=Yx.create($,function(X){if(X!==null)X=t31(X);return X});return Y.parse()},Jf6=function($){if(!$)return null;return $x.parse($,er(e31))},CH0=function($){return parseInt($,10)},YH1=function($){var Y=String($);if(/^\d+$/.test(Y))return Y;return $},o31=function($){if(!$)return null;return $x.parse($,er(JSON.parse))},SH0=function($){if($[0]!=="(")return null;return $=$.substring(1,$.length-1).split(","),{x:parseFloat($[0]),y:parseFloat($[1])}},Qf6=function($){if($[0]!=="<"&&$[1]!=="(")return null;var Y="(",X="",G=!1;for(var J=2;J<$.length-1;J++){if(!G)Y+=$[J];if($[J]===")"){G=!0;continue}else if(!G)continue;if($[J]===",")continue;X+=$[J]}var Q=SH0(Y);return Q.radius=parseFloat(X),Q},Wf6=function($){$(20,YH1),$(21,CH0),$(23,CH0),$(26,CH0),$(700,parseFloat),$(701,parseFloat),$(16,$H1),$(1082,tr),$(1114,tr),$(1184,tr),$(600,SH0),$(651,M2),$(718,Qf6),$(1000,eh6),$(1001,Jf6),$(1005,jH0),$(1007,jH0),$(1028,jH0),$(1016,Yf6),$(1017,Xf6),$(1021,TH0),$(1022,TH0),$(1231,TH0),$(1014,M2),$(1015,M2),$(1008,M2),$(1009,M2),$(1040,M2),$(1041,M2),$(1115,IH0),$(1182,IH0),$(1185,IH0),$(1186,t31),$(1187,Gf6),$(17,e31),$(114,JSON.parse.bind(JSON)),$(3802,JSON.parse.bind(JSON)),$(199,o31),$(3807,o31),$(3907,M2),$(2951,M2),$(791,M2),$(1183,M2),$(1270,M2)};XH1.exports={init:Wf6}});var QH1=o((zB5,JH1)=>{var iJ=1e6;function Kf6($){var Y=$.readInt32BE(0),X=$.readUInt32BE(4),G="";if(Y<0)Y=~Y+(X===0),X=~X+1>>>0,G="-";var J="",Q,W,K,Z,H,z;{if(Q=Y%iJ,Y=Y/iJ>>>0,W=4294967296*Q+X,X=W/iJ>>>0,K=""+(W-iJ*X),X===0&&Y===0)return G+K+J;Z="",H=6-K.length;for(z=0;z<H;z++)Z+="0";J=Z+K+J}{if(Q=Y%iJ,Y=Y/iJ>>>0,W=4294967296*Q+X,X=W/iJ>>>0,K=""+(W-iJ*X),X===0&&Y===0)return G+K+J;Z="",H=6-K.length;for(z=0;z<H;z++)Z+="0";J=Z+K+J}{if(Q=Y%iJ,Y=Y/iJ>>>0,W=4294967296*Q+X,X=W/iJ>>>0,K=""+(W-iJ*X),X===0&&Y===0)return G+K+J;Z="",H=6-K.length;for(z=0;z<H;z++)Z+="0";J=Z+K+J}return Q=Y%iJ,W=4294967296*Q+X,K=""+W%iJ,G+K+J}JH1.exports=Kf6});var HH1=o((VB5,UH1)=>{var Zf6=QH1(),j$=function($,Y,X,G,J){X=X||0,G=G||!1,J=J||function(L,N,D){return L*Math.pow(2,D)+N};var Q=X>>3,W=function(L){if(G)return~L&255;return L},K=255,Z=8-X%8;if(Y<Z)K=255<<8-Y&255,Z=Y;if(X)K=K>>X%8;var H=0;if(X%8+Y>=8)H=J(0,W($[Q])&K,Z);var z=Y+X>>3;for(var V=Q+1;V<z;V++)H=J(H,W($[V]),8);var F=(Y+X)%8;if(F>0)H=J(H,W($[z])>>8-F,F);return H},ZH1=function($,Y,X){var G=Math.pow(2,X-1)-1,J=j$($,1),Q=j$($,X,1);if(Q===0)return 0;var W=1,K=function(H,z,V){if(H===0)H=1;for(var F=1;F<=V;F++)if(W/=2,(z&1<<V-F)>0)H+=W;return H},Z=j$($,Y,X+1,!1,K);if(Q==Math.pow(2,X+1)-1){if(Z===0)return J===0?1/0:-1/0;return NaN}return(J===0?1:-1)*Math.pow(2,Q-G)*Z},Uf6=function($){if(j$($,1)==1)return-1*(j$($,15,1,!0)+1);return j$($,15,1)},WH1=function($){if(j$($,1)==1)return-1*(j$($,31,1,!0)+1);return j$($,31,1)},Hf6=function($){return ZH1($,23,8)},zf6=function($){return ZH1($,52,11)},Vf6=function($){var Y=j$($,16,32);if(Y==49152)return NaN;var X=Math.pow(1e4,j$($,16,16)),G=0,J=[],Q=j$($,16);for(var W=0;W<Q;W++)G+=j$($,16,64+16*W)*X,X/=1e4;var K=Math.pow(10,j$($,16,48));return(Y===0?1:-1)*Math.round(G*K)/K},KH1=function($,Y){var X=j$(Y,1),G=j$(Y,63,1),J=new Date((X===0?1:-1)*G/1000+946684800000);if(!$)J.setTime(J.getTime()+J.getTimezoneOffset()*60000);return J.usec=G%1000,J.getMicroSeconds=function(){return this.usec},J.setMicroSeconds=function(Q){this.usec=Q},J.getUTCMicroSeconds=function(){return this.usec},J},Xx=function($){var Y=j$($,32),X=j$($,32,32),G=j$($,32,64),J=96,Q=[];for(var W=0;W<Y;W++)Q[W]=j$($,32,J),J+=32,J+=32;var K=function(H){var z=j$($,32,J);if(J+=32,z==4294967295)return null;var V;if(H==23||H==20)return V=j$($,z*8,J),J+=z*8,V;else if(H==25)return V=$.toString(this.encoding,J>>3,(J+=z<<3)>>3),V;else console.log("ERROR: ElementType not implemented: "+H)},Z=function(H,z){var V=[],F;if(H.length>1){var L=H.shift();for(F=0;F<L;F++)V[F]=Z(H,z);H.unshift(L)}else for(F=0;F<H[0];F++)V[F]=K(z);return V};return Z(Q,G)},Ff6=function($){return $.toString("utf8")},Lf6=function($){if($===null)return null;return j$($,8)>0},Df6=function($){$(20,Zf6),$(21,Uf6),$(23,WH1),$(26,WH1),$(1700,Vf6),$(700,Hf6),$(701,zf6),$(16,Lf6),$(1114,KH1.bind(null,!1)),$(1184,KH1.bind(null,!0)),$(1000,Xx),$(1007,Xx),$(1016,Xx),$(1008,Xx),$(1009,Xx),$(25,Ff6)};UH1.exports={init:Df6}});var VH1=o((FB5,zH1)=>{zH1.exports={BOOL:16,BYTEA:17,CHAR:18,INT8:20,INT2:21,INT4:23,REGPROC:24,TEXT:25,OID:26,TID:27,XID:28,CID:29,JSON:114,XML:142,PG_NODE_TREE:194,SMGR:210,PATH:602,POLYGON:604,CIDR:650,FLOAT4:700,FLOAT8:701,ABSTIME:702,RELTIME:703,TINTERVAL:704,CIRCLE:718,MACADDR8:774,MONEY:790,MACADDR:829,INET:869,ACLITEM:1033,BPCHAR:1042,VARCHAR:1043,DATE:1082,TIME:1083,TIMESTAMP:1114,TIMESTAMPTZ:1184,INTERVAL:1186,TIMETZ:1266,BIT:1560,VARBIT:1562,NUMERIC:1700,REFCURSOR:1790,REGPROCEDURE:2202,REGOPER:2203,REGOPERATOR:2204,REGCLASS:2205,REGTYPE:2206,UUID:2950,TXID_SNAPSHOT:2970,PG_LSN:3220,PG_NDISTINCT:3361,PG_DEPENDENCIES:3402,TSVECTOR:3614,TSQUERY:3615,GTSVECTOR:3642,REGCONFIG:3734,REGDICTIONARY:3769,JSONB:3802,REGNAMESPACE:4089,REGROLE:4096}});var Jx=o((Rf6)=>{var Nf6=GH1(),Af6=HH1(),Bf6=PH0(),Of6=VH1();Rf6.getTypeParser=Ef6;Rf6.setTypeParser=Mf6;Rf6.arrayParser=Bf6;Rf6.builtins=Of6;var Gx={text:{},binary:{}};function FH1($){return String($)}function Ef6($,Y){if(Y=Y||"text",!Gx[Y])return FH1;return Gx[Y][$]||FH1}function Mf6($,Y,X){if(typeof Y=="function")X=Y,Y="text";Gx[Y][$]=X}Nf6.init(function($,Y){Gx.text[$]=Y});Af6.init(function($,Y){Gx.binary[$]=Y})});var Qx=o((DB5,kH0)=>{var LH1;try{LH1=process.platform==="win32"?process.env.USERNAME:process.env.USER}catch{}kH0.exports={host:"localhost",user:LH1,database:void 0,password:null,connectionString:void 0,port:5432,rows:0,binary:!1,max:10,idleTimeoutMillis:30000,client_encoding:"",ssl:!1,application_name:void 0,fallback_application_name:void 0,options:void 0,parseInputDatesAsUTC:!1,statement_timeout:!1,lock_timeout:!1,idle_in_transaction_session_timeout:!1,query_timeout:!1,connect_timeout:0,keepalives:1,keepalives_idle:0};var bq=Jx(),jf6=bq.getTypeParser(20,"text"),Tf6=bq.getTypeParser(1016,"text");kH0.exports.__defineSetter__("parseInt8",function($){bq.setTypeParser(20,"text",$?bq.getTypeParser(23,"text"):jf6),bq.setTypeParser(1016,"text",$?bq.getTypeParser(1007,"text"):Tf6)})});var hq=o((NB5,AH1)=>{var If6=Qx(),DH1=A0("util"),{isDate:Cf6}=DH1.types||DH1;function Sf6($){return'"'+$.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")+'"'}function NH1($){let Y="{";for(let X=0;X<$.length;X++){if(X>0)Y=Y+",";if($[X]===null||typeof $[X]>"u")Y=Y+"NULL";else if(Array.isArray($[X]))Y=Y+NH1($[X]);else if(ArrayBuffer.isView($[X])){let G=$[X];if(!(G instanceof Buffer)){let J=Buffer.from(G.buffer,G.byteOffset,G.byteLength);if(J.length===G.byteLength)G=J;else G=J.slice(G.byteOffset,G.byteOffset+G.byteLength)}Y+="\\\\x"+G.toString("hex")}else Y+=Sf6($a($[X]))}return Y=Y+"}",Y}var $a=function($,Y){if($==null)return null;if(typeof $==="object"){if($ instanceof Buffer)return $;if(ArrayBuffer.isView($)){let X=Buffer.from($.buffer,$.byteOffset,$.byteLength);if(X.length===$.byteLength)return X;return X.slice($.byteOffset,$.byteOffset+$.byteLength)}if(Cf6($))if(If6.parseInputDatesAsUTC)return xf6($);else return vf6($);if(Array.isArray($))return NH1($);return kf6($,Y)}return $.toString()};function kf6($,Y){if($&&typeof $.toPostgres==="function"){if(Y=Y||[],Y.indexOf($)!==-1)throw Error('circular reference detected while preparing "'+$+'" for query');return Y.push($),$a($.toPostgres($a),Y)}return JSON.stringify($)}function vf6($){let Y=-$.getTimezoneOffset(),X=$.getFullYear(),G=X<1;if(G)X=Math.abs(X)+1;let J=String(X).padStart(4,"0")+"-"+String($.getMonth()+1).padStart(2,"0")+"-"+String($.getDate()).padStart(2,"0")+"T"+String($.getHours()).padStart(2,"0")+":"+String($.getMinutes()).padStart(2,"0")+":"+String($.getSeconds()).padStart(2,"0")+"."+String($.getMilliseconds()).padStart(3,"0");if(Y<0)J+="-",Y*=-1;else J+="+";if(J+=String(Math.floor(Y/60)).padStart(2,"0")+":"+String(Y%60).padStart(2,"0"),G)J+=" BC";return J}function xf6($){let Y=$.getUTCFullYear(),X=Y<1;if(X)Y=Math.abs(Y)+1;let G=String(Y).padStart(4,"0")+"-"+String($.getUTCMonth()+1).padStart(2,"0")+"-"+String($.getUTCDate()).padStart(2,"0")+"T"+String($.getUTCHours()).padStart(2,"0")+":"+String($.getUTCMinutes()).padStart(2,"0")+":"+String($.getUTCSeconds()).padStart(2,"0")+"."+String($.getUTCMilliseconds()).padStart(3,"0");if(G+="+00:00",X)G+=" BC";return G}function yf6($,Y,X){if($=typeof $==="string"?{text:$}:$,Y)if(typeof Y==="function")$.callback=Y;else $.values=Y;if(X)$.callback=X;return $}var bf6=function($){return'"'+$.replace(/"/g,'""')+'"'},hf6=function($){let Y=!1,X="'";if($==null)return"''";if(typeof $!=="string")return"''";for(let G=0;G<$.length;G++){let J=$[G];if(J==="'")X+=J+J;else if(J==="\\")X+=J+J,Y=!0;else X+=J}if(X+="'",Y===!0)X=" E"+X;return X};AH1.exports={prepareValue:function(Y){return $a(Y)},normalizeQueryConfig:yf6,escapeIdentifier:bf6,escapeLiteral:hf6}});var OH1=o((AB5,BH1)=>{var fq=A0("crypto");function vH0($){return fq.createHash("md5").update($,"utf-8").digest("hex")}function ff6($,Y,X){let G=vH0(Y+$);return"md5"+vH0(Buffer.concat([Buffer.from(G),X]))}function gf6($){return fq.createHash("sha256").update($).digest()}function mf6($,Y){return $=$.replace(/(\D)-/,"$1"),fq.createHash($).update(Y).digest()}function uf6($,Y){return fq.createHmac("sha256",$).update(Y).digest()}async function pf6($,Y,X){return fq.pbkdf2Sync($,Y,X,32,"sha256")}BH1.exports={postgresMd5PasswordHash:ff6,randomBytes:fq.randomBytes,deriveKey:pf6,sha256:gf6,hashByName:mf6,hmacSha256:uf6,md5:vH0}});var qH1=o((BB5,RH1)=>{var EH1=A0("crypto");RH1.exports={postgresMd5PasswordHash:cf6,randomBytes:df6,deriveKey:rf6,sha256:lf6,hashByName:if6,hmacSha256:nf6,md5:xH0};var MH1=EH1.webcrypto||globalThis.crypto,hA=MH1.subtle,yH0=new TextEncoder;function df6($){return MH1.getRandomValues(Buffer.alloc($))}async function xH0($){try{return EH1.createHash("md5").update($,"utf-8").digest("hex")}catch(Y){let X=typeof $==="string"?yH0.encode($):$,G=await hA.digest("MD5",X);return Array.from(new Uint8Array(G)).map((J)=>J.toString(16).padStart(2,"0")).join("")}}async function cf6($,Y,X){let G=await xH0(Y+$);return"md5"+await xH0(Buffer.concat([Buffer.from(G),X]))}async function lf6($){return await hA.digest("SHA-256",$)}async function if6($,Y){return await hA.digest($,Y)}async function nf6($,Y){let X=await hA.importKey("raw",$,{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return await hA.sign("HMAC",X,yH0.encode(Y))}async function rf6($,Y,X){let G=await hA.importKey("raw",yH0.encode($),"PBKDF2",!1,["deriveBits"]),J={name:"PBKDF2",hash:"SHA-256",salt:Y,iterations:X};return await hA.deriveBits(J,G,256,["deriveBits"])}});var hH0=o((OB5,bH0)=>{var af6=parseInt(process.versions&&process.versions.node&&process.versions.node.split(".")[0])<15;if(af6)bH0.exports=OH1();else bH0.exports=qH1()});var _H1=o((EB5,wH1)=>{function fA($,Y){return Error("SASL channel binding: "+$+" when parsing public certificate "+Y.toString("base64"))}function fH0($,Y){let X=$[Y++];if(X<128)return{length:X,index:Y};let G=X&127;if(G>4)throw fA("bad length",$);X=0;for(let J=0;J<G;J++)X=X<<8|$[Y++];return{length:X,index:Y}}function PH1($,Y){if($[Y++]!==6)throw fA("non-OID data",$);let{length:X,index:G}=fH0($,Y);Y=G;let J=Y+X,Q=$[Y++],W=(Q/40>>0)+"."+Q%40;while(Y<J){let K=0;while(Y<J){let Z=$[Y++];if(K=K<<7|Z&127,Z<128)break}W+="."+K}return{oid:W,index:Y}}function Wx($,Y){if($[Y++]!==48)throw fA("non-sequence data",$);return fH0($,Y)}function sf6($,Y){if(Y===void 0)Y=0;Y=Wx($,Y).index;let{length:X,index:G}=Wx($,Y);Y=G+X,Y=Wx($,Y).index;let{oid:J,index:Q}=PH1($,Y);switch(J){case"1.2.840.113549.1.1.4":return"MD5";case"1.2.840.113549.1.1.5":return"SHA-1";case"1.2.840.113549.1.1.11":return"SHA-256";case"1.2.840.113549.1.1.12":return"SHA-384";case"1.2.840.113549.1.1.13":return"SHA-512";case"1.2.840.113549.1.1.14":return"SHA-224";case"1.2.840.113549.1.1.15":return"SHA512-224";case"1.2.840.113549.1.1.16":return"SHA512-256";case"1.2.840.10045.4.1":return"SHA-1";case"1.2.840.10045.4.3.1":return"SHA-224";case"1.2.840.10045.4.3.2":return"SHA-256";case"1.2.840.10045.4.3.3":return"SHA-384";case"1.2.840.10045.4.3.4":return"SHA-512";case"1.2.840.113549.1.1.10":{if(Y=Q,Y=Wx($,Y).index,$[Y++]!==160)throw fA("non-tag data",$);Y=fH0($,Y).index,Y=Wx($,Y).index;let{oid:W}=PH1($,Y);switch(W){case"1.2.840.113549.2.5":return"MD5";case"1.3.14.3.2.26":return"SHA-1";case"2.16.840.1.101.3.4.2.1":return"SHA-256";case"2.16.840.1.101.3.4.2.2":return"SHA-384";case"2.16.840.1.101.3.4.2.3":return"SHA-512"}throw fA("unknown hash OID "+W,$)}case"1.3.101.110":case"1.3.101.112":return"SHA-512";case"1.3.101.111":case"1.3.101.113":throw fA("Ed448 certificate channel binding is not currently supported by Postgres")}throw fA("unknown OID "+J,$)}wH1.exports={signatureAlgorithmHashFromCertificate:sf6}});var CH1=o((MB5,IH1)=>{var _F=hH0(),{signatureAlgorithmHashFromCertificate:of6}=_H1();function tf6($,Y){let X=["SCRAM-SHA-256"];if(Y)X.unshift("SCRAM-SHA-256-PLUS");let G=X.find((W)=>$.includes(W));if(!G)throw Error("SASL: Only mechanism(s) "+X.join(" and ")+" are supported");if(G==="SCRAM-SHA-256-PLUS"&&typeof Y.getPeerCertificate!=="function")throw Error("SASL: Mechanism SCRAM-SHA-256-PLUS requires a certificate");let J=_F.randomBytes(18).toString("base64");return{mechanism:G,clientNonce:J,response:(G==="SCRAM-SHA-256-PLUS"?"p=tls-server-end-point":Y?"y":"n")+",,n=*,r="+J,message:"SASLInitialResponse"}}async function ef6($,Y,X,G){if($.message!=="SASLInitialResponse")throw Error("SASL: Last message was not SASLInitialResponse");if(typeof Y!=="string")throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string");if(Y==="")throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a non-empty string");if(typeof X!=="string")throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: serverData must be a string");let J=Xg6(X);if(!J.nonce.startsWith($.clientNonce))throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce does not start with client nonce");else if(J.nonce.length===$.clientNonce.length)throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce is too short");let Q="n=*,r="+$.clientNonce,W="r="+J.nonce+",s="+J.salt+",i="+J.iteration,K=G?"eSws":"biws";if($.mechanism==="SCRAM-SHA-256-PLUS"){let O=G.getPeerCertificate().raw,E=of6(O);if(E==="MD5"||E==="SHA-1")E="SHA-256";let M=await _F.hashByName(E,O);K=Buffer.concat([Buffer.from("p=tls-server-end-point,,"),Buffer.from(M)]).toString("base64")}let Z="c="+K+",r="+J.nonce,H=Q+","+W+","+Z,z=Buffer.from(J.salt,"base64"),V=await _F.deriveKey(Y,z,J.iteration),F=await _F.hmacSha256(V,"Client Key"),L=await _F.sha256(F),N=await _F.hmacSha256(L,H),D=Jg6(Buffer.from(F),Buffer.from(N)).toString("base64"),A=await _F.hmacSha256(V,"Server Key"),B=await _F.hmacSha256(A,H);$.message="SASLResponse",$.serverSignature=Buffer.from(B).toString("base64"),$.response=Z+",p="+D}function $g6($,Y){if($.message!=="SASLResponse")throw Error("SASL: Last message was not SASLResponse");if(typeof Y!=="string")throw Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: serverData must be a string");let{serverSignature:X}=Gg6(Y);if(X!==$.serverSignature)throw Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature does not match")}function Yg6($){if(typeof $!=="string")throw TypeError("SASL: text must be a string");return $.split("").map((Y,X)=>$.charCodeAt(X)).every((Y)=>Y>=33&&Y<=43||Y>=45&&Y<=126)}function jH1($){return/^(?:[a-zA-Z0-9+/]{4})*(?:[a-zA-Z0-9+/]{2}==|[a-zA-Z0-9+/]{3}=)?$/.test($)}function TH1($){if(typeof $!=="string")throw TypeError("SASL: attribute pairs text must be a string");return new Map($.split(",").map((Y)=>{if(!/^.=/.test(Y))throw Error("SASL: Invalid attribute pair entry");let X=Y[0],G=Y.substring(2);return[X,G]}))}function Xg6($){let Y=TH1($),X=Y.get("r");if(!X)throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce missing");else if(!Yg6(X))throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce must only contain printable characters");let G=Y.get("s");if(!G)throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: salt missing");else if(!jH1(G))throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: salt must be base64");let J=Y.get("i");if(!J)throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: iteration missing");else if(!/^[1-9][0-9]*$/.test(J))throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: invalid iteration count");let Q=parseInt(J,10);return{nonce:X,salt:G,iteration:Q}}function Gg6($){let X=TH1($).get("v");if(!X)throw Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature is missing");else if(!jH1(X))throw Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature must be base64");return{serverSignature:X}}function Jg6($,Y){if(!Buffer.isBuffer($))throw TypeError("first argument must be a Buffer");if(!Buffer.isBuffer(Y))throw TypeError("second argument must be a Buffer");if($.length!==Y.length)throw Error("Buffer lengths must match");if($.length===0)throw Error("Buffers cannot be empty");return Buffer.from($.map((X,G)=>$[G]^Y[G]))}IH1.exports={startSession:tf6,continueSession:ef6,finalizeSession:$g6}});var Xa=o((RB5,SH1)=>{var Qg6=Jx();function Ya($){this._types=$||Qg6,this.text={},this.binary={}}Ya.prototype.getOverrides=function($){switch($){case"text":return this.text;case"binary":return this.binary;default:return{}}};Ya.prototype.setTypeParser=function($,Y,X){if(typeof Y==="function")X=Y,Y="text";this.getOverrides(Y)[$]=X};Ya.prototype.getTypeParser=function($,Y){return Y=Y||"text",this.getOverrides(Y)[$]||this._types.getTypeParser($,Y)};SH1.exports=Ya});var xH1=o((qB5,vH1)=>{function gq($,Y={}){if($.charAt(0)==="/"){let Z=$.split(" ");return{host:Z[0],database:Z[1]}}let X={},G,J=!1;if(/ |%[^a-f0-9]|%[a-f0-9][^a-f0-9]/i.test($))$=encodeURI($).replace(/%25(\d\d)/g,"%$1");try{try{G=new URL($,"postgres://base")}catch(Z){G=new URL($.replace("@/","@___DUMMY___/"),"postgres://base"),J=!0}}catch(Z){throw Z.input&&(Z.input="*****REDACTED*****"),Z}for(let Z of G.searchParams.entries())X[Z[0]]=Z[1];if(X.user=X.user||decodeURIComponent(G.username),X.password=X.password||decodeURIComponent(G.password),G.protocol=="socket:")return X.host=decodeURI(G.pathname),X.database=G.searchParams.get("db"),X.client_encoding=G.searchParams.get("encoding"),X;let Q=J?"":G.hostname;if(!X.host)X.host=decodeURIComponent(Q);else if(Q&&/^%2f/i.test(Q))G.pathname=Q+G.pathname;if(!X.port)X.port=G.port;let W=G.pathname.slice(1)||null;if(X.database=W?decodeURI(W):null,X.ssl==="true"||X.ssl==="1")X.ssl=!0;if(X.ssl==="0")X.ssl=!1;if(X.sslcert||X.sslkey||X.sslrootcert||X.sslmode)X.ssl={};let K=X.sslcert||X.sslkey||X.sslrootcert?A0("fs"):null;if(X.sslcert)X.ssl.cert=K.readFileSync(X.sslcert).toString();if(X.sslkey)X.ssl.key=K.readFileSync(X.sslkey).toString();if(X.sslrootcert)X.ssl.ca=K.readFileSync(X.sslrootcert).toString();if(Y.useLibpqCompat&&X.uselibpqcompat)throw Error("Both useLibpqCompat and uselibpqcompat are set. Please use only one of them.");if(X.uselibpqcompat==="true"||Y.useLibpqCompat)switch(X.sslmode){case"disable":{X.ssl=!1;break}case"prefer":{X.ssl.rejectUnauthorized=!1;break}case"require":{if(X.sslrootcert)X.ssl.checkServerIdentity=function(){};else X.ssl.rejectUnauthorized=!1;break}case"verify-ca":{if(!X.ssl.ca)throw Error("SECURITY WARNING: Using sslmode=verify-ca requires specifying a CA with sslrootcert. If a public CA is used, verify-ca allows connections to a server that somebody else may have registered with the CA, making you vulnerable to Man-in-the-Middle attacks. Either specify a custom CA certificate with sslrootcert parameter or use sslmode=verify-full for proper security.");X.ssl.checkServerIdentity=function(){};break}case"verify-full":break}else switch(X.sslmode){case"disable":{X.ssl=!1;break}case"prefer":case"require":case"verify-ca":case"verify-full":{if(X.sslmode!=="verify-full")gH0(X.sslmode);break}case"no-verify":{X.ssl.rejectUnauthorized=!1;break}}return X}function Wg6($){return Object.entries($).reduce((X,[G,J])=>{if(J!==void 0&&J!==null)X[G]=J;return X},{})}function kH1($){return Object.entries($).reduce((X,[G,J])=>{if(G==="ssl"){let Q=J;if(typeof Q==="boolean")X[G]=Q;if(typeof Q==="object")X[G]=Wg6(Q)}else if(J!==void 0&&J!==null)if(G==="port"){if(J!==""){let Q=parseInt(J,10);if(isNaN(Q))throw Error(`Invalid ${G}: ${J}`);X[G]=Q}}else X[G]=J;return X},{})}function Kg6($){return kH1(gq($))}function gH0($){if(!gH0.warned&&typeof process<"u"&&process.emitWarning)gH0.warned=!0,process.emitWarning(`SECURITY WARNING: The SSL modes 'prefer', 'require', and 'verify-ca' are treated as aliases for 'verify-full'.
In the next major version (pg-connection-string v3.0.0 and pg v9.0.0), these modes will adopt standard libpq semantics, which have weaker security guarantees.

To prepare for this change:
- If you want the current behavior, explicitly use 'sslmode=verify-full'
- If you want libpq compatibility now, use 'uselibpqcompat=true&sslmode=${$}'

See https://www.postgresql.org/docs/current/libpq-ssl.html for libpq SSL mode definitions.`)}vH1.exports=gq;gq.parse=gq;gq.toClientConfig=kH1;gq.parseIntoClientConfig=Kg6});var mH0=o((PB5,fH1)=>{var Zg6=A0("dns"),bH1=Qx(),yH1=xH1().parse,jG=function($,Y,X){if(Y[$])return Y[$];if(X===void 0)X=process.env["PG"+$.toUpperCase()];else if(X===!1);else X=process.env[X];return X||bH1[$]},Ug6=function(){switch(process.env.PGSSLMODE){case"disable":return!1;case"prefer":case"require":case"verify-ca":case"verify-full":return!0;case"no-verify":return{rejectUnauthorized:!1}}return bH1.ssl},mq=function($){return"'"+(""+$).replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"},R2=function($,Y,X){let G=Y[X];if(G!==void 0&&G!==null)$.push(X+"="+mq(G))};class hH1{constructor($){if($=typeof $==="string"?yH1($):$||{},$.connectionString)$=Object.assign({},$,yH1($.connectionString));if(this.user=jG("user",$),this.database=jG("database",$),this.database===void 0)this.database=this.user;if(this.port=parseInt(jG("port",$),10),this.host=jG("host",$),Object.defineProperty(this,"password",{configurable:!0,enumerable:!1,writable:!0,value:jG("password",$)}),this.binary=jG("binary",$),this.options=jG("options",$),this.ssl=typeof $.ssl>"u"?Ug6():$.ssl,typeof this.ssl==="string"){if(this.ssl==="true")this.ssl=!0}if(this.ssl==="no-verify")this.ssl={rejectUnauthorized:!1};if(this.ssl&&this.ssl.key)Object.defineProperty(this.ssl,"key",{enumerable:!1});if(this.client_encoding=jG("client_encoding",$),this.replication=jG("replication",$),this.isDomainSocket=!(this.host||"").indexOf("/"),this.application_name=jG("application_name",$,"PGAPPNAME"),this.fallback_application_name=jG("fallback_application_name",$,!1),this.statement_timeout=jG("statement_timeout",$,!1),this.lock_timeout=jG("lock_timeout",$,!1),this.idle_in_transaction_session_timeout=jG("idle_in_transaction_session_timeout",$,!1),this.query_timeout=jG("query_timeout",$,!1),$.connectionTimeoutMillis===void 0)this.connect_timeout=process.env.PGCONNECT_TIMEOUT||0;else this.connect_timeout=Math.floor($.connectionTimeoutMillis/1000);if($.keepAlive===!1)this.keepalives=0;else if($.keepAlive===!0)this.keepalives=1;if(typeof $.keepAliveInitialDelayMillis==="number")this.keepalives_idle=Math.floor($.keepAliveInitialDelayMillis/1000)}getLibpqConnectionString($){let Y=[];R2(Y,this,"user"),R2(Y,this,"password"),R2(Y,this,"port"),R2(Y,this,"application_name"),R2(Y,this,"fallback_application_name"),R2(Y,this,"connect_timeout"),R2(Y,this,"options");let X=typeof this.ssl==="object"?this.ssl:this.ssl?{sslmode:this.ssl}:{};if(R2(Y,X,"sslmode"),R2(Y,X,"sslca"),R2(Y,X,"sslkey"),R2(Y,X,"sslcert"),R2(Y,X,"sslrootcert"),this.database)Y.push("dbname="+mq(this.database));if(this.replication)Y.push("replication="+mq(this.replication));if(this.host)Y.push("host="+mq(this.host));if(this.isDomainSocket)return $(null,Y.join(" "));if(this.client_encoding)Y.push("client_encoding="+mq(this.client_encoding));Zg6.lookup(this.host,function(G,J){if(G)return $(G,null);return Y.push("hostaddr="+mq(J)),$(null,Y.join(" "))})}}fH1.exports=hH1});var uH0=o((wB5,uH1)=>{var Hg6=Jx(),gH1=/^([A-Za-z]+)(?: (\d+))?(?: (\d+))?/;class mH1{constructor($,Y){if(this.command=null,this.rowCount=null,this.oid=null,this.rows=[],this.fields=[],this._parsers=void 0,this._types=Y,this.RowCtor=null,this.rowAsArray=$==="array",this.rowAsArray)this.parseRow=this._parseRowAsArray;this._prebuiltEmptyResultObject=null}addCommandComplete($){let Y;if($.text)Y=gH1.exec($.text);else Y=gH1.exec($.command);if(Y){if(this.command=Y[1],Y[3])this.oid=parseInt(Y[2],10),this.rowCount=parseInt(Y[3],10);else if(Y[2])this.rowCount=parseInt(Y[2],10)}}_parseRowAsArray($){let Y=Array($.length);for(let X=0,G=$.length;X<G;X++){let J=$[X];if(J!==null)Y[X]=this._parsers[X](J);else Y[X]=null}return Y}parseRow($){let Y={...this._prebuiltEmptyResultObject};for(let X=0,G=$.length;X<G;X++){let J=$[X],Q=this.fields[X].name;if(J!==null){let W=this.fields[X].format==="binary"?Buffer.from(J):J;Y[Q]=this._parsers[X](W)}else Y[Q]=null}return Y}addRow($){this.rows.push($)}addFields($){if(this.fields=$,this.fields.length)this._parsers=Array($.length);let Y={};for(let X=0;X<$.length;X++){let G=$[X];if(Y[G.name]=null,this._types)this._parsers[X]=this._types.getTypeParser(G.dataTypeID,G.format||"text");else this._parsers[X]=Hg6.getTypeParser(G.dataTypeID,G.format||"text")}this._prebuiltEmptyResultObject={...Y}}}uH1.exports=mH1});var iH1=o((_B5,lH1)=>{var{EventEmitter:zg6}=A0("events"),pH1=uH0(),dH1=hq();class cH1 extends zg6{constructor($,Y,X){super();if($=dH1.normalizeQueryConfig($,Y,X),this.text=$.text,this.values=$.values,this.rows=$.rows,this.types=$.types,this.name=$.name,this.queryMode=$.queryMode,this.binary=$.binary,this.portal=$.portal||"",this.callback=$.callback,this._rowMode=$.rowMode,process.domain&&$.callback)this.callback=process.domain.bind($.callback);this._result=new pH1(this._rowMode,this.types),this._results=this._result,this._canceledDueToError=!1}requiresPreparation(){if(this.queryMode==="extended")return!0;if(this.name)return!0;if(this.rows)return!0;if(!this.text)return!1;if(!this.values)return!1;return this.values.length>0}_checkForMultirow(){if(this._result.command){if(!Array.isArray(this._results))this._results=[this._result];this._result=new pH1(this._rowMode,this._result._types),this._results.push(this._result)}}handleRowDescription($){this._checkForMultirow(),this._result.addFields($.fields),this._accumulateRows=this.callback||!this.listeners("row").length}handleDataRow($){let Y;if(this._canceledDueToError)return;try{Y=this._result.parseRow($.fields)}catch(X){this._canceledDueToError=X;return}if(this.emit("row",Y,this._result),this._accumulateRows)this._result.addRow(Y)}handleCommandComplete($,Y){if(this._checkForMultirow(),this._result.addCommandComplete($),this.rows)Y.sync()}handleEmptyQuery($){if(this.rows)$.sync()}handleError($,Y){if(this._canceledDueToError)$=this._canceledDueToError,this._canceledDueToError=!1;if(this.callback)return this.callback($);this.emit("error",$)}handleReadyForQuery($){if(this._canceledDueToError)return this.handleError(this._canceledDueToError,$);if(this.callback)try{this.callback(null,this._results)}catch(Y){process.nextTick(()=>{throw Y})}this.emit("end",this._results)}submit($){if(typeof this.text!=="string"&&typeof this.name!=="string")return Error("A query must have either text or a name. Supplying neither is unsupported.");let Y=$.parsedStatements[this.name];if(this.text&&Y&&this.text!==Y)return Error(`Prepared statements must be unique - '${this.name}' was used for a different statement`);if(this.values&&!Array.isArray(this.values))return Error("Query values must be an array");if(this.requiresPreparation()){$.stream.cork&&$.stream.cork();try{this.prepare($)}finally{$.stream.uncork&&$.stream.uncork()}}else $.query(this.text);return null}hasBeenParsed($){return this.name&&$.parsedStatements[this.name]}handlePortalSuspended($){this._getRows($,this.rows)}_getRows($,Y){if($.execute({portal:this.portal,rows:Y}),!Y)$.sync();else $.flush()}prepare($){if(!this.hasBeenParsed($))$.parse({text:this.text,name:this.name,types:this.types});try{$.bind({portal:this.portal,statement:this.name,values:this.values,binary:this.binary,valueMapper:dH1.prepareValue})}catch(Y){this.handleError(Y,$);return}$.describe({type:"P",name:this.portal||""}),this._getRows($,this.rows)}handleCopyInResponse($){$.sendCopyFail("No source stream defined")}handleCopyData($,Y){}}lH1.exports=cH1});var pH0=o((Kz1)=>{Object.defineProperty(Kz1,"__esModule",{value:!0});Kz1.NoticeMessage=Kz1.DataRowMessage=Kz1.CommandCompleteMessage=Kz1.ReadyForQueryMessage=Kz1.NotificationResponseMessage=Kz1.BackendKeyDataMessage=Kz1.AuthenticationMD5Password=Kz1.ParameterStatusMessage=Kz1.ParameterDescriptionMessage=Kz1.RowDescriptionMessage=Kz1.Field=Kz1.CopyResponse=Kz1.CopyDataMessage=Kz1.DatabaseError=Kz1.copyDone=Kz1.emptyQuery=Kz1.replicationStart=Kz1.portalSuspended=Kz1.noData=Kz1.closeComplete=Kz1.bindComplete=Kz1.parseComplete=void 0;Kz1.parseComplete={name:"parseComplete",length:5};Kz1.bindComplete={name:"bindComplete",length:5};Kz1.closeComplete={name:"closeComplete",length:5};Kz1.noData={name:"noData",length:5};Kz1.portalSuspended={name:"portalSuspended",length:5};Kz1.replicationStart={name:"replicationStart",length:4};Kz1.emptyQuery={name:"emptyQuery",length:4};Kz1.copyDone={name:"copyDone",length:4};class nH1 extends Error{constructor($,Y,X){super($);this.length=Y,this.name=X}}Kz1.DatabaseError=nH1;class rH1{constructor($,Y){this.length=$,this.chunk=Y,this.name="copyData"}}Kz1.CopyDataMessage=rH1;class aH1{constructor($,Y,X,G){this.length=$,this.name=Y,this.binary=X,this.columnTypes=Array(G)}}Kz1.CopyResponse=aH1;class sH1{constructor($,Y,X,G,J,Q,W){this.name=$,this.tableID=Y,this.columnID=X,this.dataTypeID=G,this.dataTypeSize=J,this.dataTypeModifier=Q,this.format=W}}Kz1.Field=sH1;class oH1{constructor($,Y){this.length=$,this.fieldCount=Y,this.name="rowDescription",this.fields=Array(this.fieldCount)}}Kz1.RowDescriptionMessage=oH1;class tH1{constructor($,Y){this.length=$,this.parameterCount=Y,this.name="parameterDescription",this.dataTypeIDs=Array(this.parameterCount)}}Kz1.ParameterDescriptionMessage=tH1;class eH1{constructor($,Y,X){this.length=$,this.parameterName=Y,this.parameterValue=X,this.name="parameterStatus"}}Kz1.ParameterStatusMessage=eH1;class $z1{constructor($,Y){this.length=$,this.salt=Y,this.name="authenticationMD5Password"}}Kz1.AuthenticationMD5Password=$z1;class Yz1{constructor($,Y,X){this.length=$,this.processID=Y,this.secretKey=X,this.name="backendKeyData"}}Kz1.BackendKeyDataMessage=Yz1;class Xz1{constructor($,Y,X,G){this.length=$,this.processId=Y,this.channel=X,this.payload=G,this.name="notification"}}Kz1.NotificationResponseMessage=Xz1;class Gz1{constructor($,Y){this.length=$,this.status=Y,this.name="readyForQuery"}}Kz1.ReadyForQueryMessage=Gz1;class Jz1{constructor($,Y){this.length=$,this.text=Y,this.name="commandComplete"}}Kz1.CommandCompleteMessage=Jz1;class Qz1{constructor($,Y){this.length=$,this.fields=Y,this.name="dataRow",this.fieldCount=Y.length}}Kz1.DataRowMessage=Qz1;class Wz1{constructor($,Y){this.length=$,this.message=Y,this.name="notice"}}Kz1.NoticeMessage=Wz1});var Vz1=o((Hz1)=>{Object.defineProperty(Hz1,"__esModule",{value:!0});Hz1.Writer=void 0;class Uz1{constructor($=256){this.size=$,this.offset=5,this.headerPosition=0,this.buffer=Buffer.allocUnsafe($)}ensure($){if(this.buffer.length-this.offset<$){let X=this.buffer,G=X.length+(X.length>>1)+$;this.buffer=Buffer.allocUnsafe(G),X.copy(this.buffer)}}addInt32($){return this.ensure(4),this.buffer[this.offset++]=$>>>24&255,this.buffer[this.offset++]=$>>>16&255,this.buffer[this.offset++]=$>>>8&255,this.buffer[this.offset++]=$>>>0&255,this}addInt16($){return this.ensure(2),this.buffer[this.offset++]=$>>>8&255,this.buffer[this.offset++]=$>>>0&255,this}addCString($){if(!$)this.ensure(1);else{let Y=Buffer.byteLength($);this.ensure(Y+1),this.buffer.write($,this.offset,"utf-8"),this.offset+=Y}return this.buffer[this.offset++]=0,this}addString($=""){let Y=Buffer.byteLength($);return this.ensure(Y),this.buffer.write($,this.offset),this.offset+=Y,this}add($){return this.ensure($.length),$.copy(this.buffer,this.offset),this.offset+=$.length,this}join($){if($){this.buffer[this.headerPosition]=$;let Y=this.offset-(this.headerPosition+1);this.buffer.writeInt32BE(Y,this.headerPosition+1)}return this.buffer.slice($?0:5,this.offset)}flush($){let Y=this.join($);return this.offset=5,this.headerPosition=0,this.buffer=Buffer.allocUnsafe(this.size),Y}}Hz1.Writer=Uz1});var Nz1=o((Lz1)=>{Object.defineProperty(Lz1,"__esModule",{value:!0});Lz1.serialize=void 0;var dH0=Vz1(),U$=new dH0.Writer,vg6=($)=>{U$.addInt16(3).addInt16(0);for(let G of Object.keys($))U$.addCString(G).addCString($[G]);U$.addCString("client_encoding").addCString("UTF8");let Y=U$.addCString("").flush(),X=Y.length+4;return new dH0.Writer().addInt32(X).add(Y).flush()},xg6=()=>{let $=Buffer.allocUnsafe(8);return $.writeInt32BE(8,0),$.writeInt32BE(80877103,4),$},yg6=($)=>{return U$.addCString($).flush(112)},bg6=function($,Y){return U$.addCString($).addInt32(Buffer.byteLength(Y)).addString(Y),U$.flush(112)},hg6=function($){return U$.addString($).flush(112)},fg6=($)=>{return U$.addCString($).flush(81)},Fz1=[],gg6=($)=>{let Y=$.name||"";if(Y.length>63)console.error("Warning! Postgres only supports 63 characters for query names."),console.error("You supplied %s (%s)",Y,Y.length),console.error("This can cause conflicts and silent errors executing queries");let X=$.types||Fz1,G=X.length,J=U$.addCString(Y).addCString($.text).addInt16(G);for(let Q=0;Q<G;Q++)J.addInt32(X[Q]);return U$.flush(80)},uq=new dH0.Writer,mg6=function($,Y){for(let X=0;X<$.length;X++){let G=Y?Y($[X],X):$[X];if(G==null)U$.addInt16(0),uq.addInt32(-1);else if(G instanceof Buffer)U$.addInt16(1),uq.addInt32(G.length),uq.add(G);else U$.addInt16(0),uq.addInt32(Buffer.byteLength(G)),uq.addString(G)}},ug6=($={})=>{let Y=$.portal||"",X=$.statement||"",G=$.binary||!1,J=$.values||Fz1,Q=J.length;return U$.addCString(Y).addCString(X),U$.addInt16(Q),mg6(J,$.valueMapper),U$.addInt16(Q),U$.add(uq.flush()),U$.addInt16(1),U$.addInt16(G?1:0),U$.flush(66)},pg6=Buffer.from([69,0,0,0,9,0,0,0,0,0]),dg6=($)=>{if(!$||!$.portal&&!$.rows)return pg6;let Y=$.portal||"",X=$.rows||0,G=Buffer.byteLength(Y),J=4+G+1+4,Q=Buffer.allocUnsafe(1+J);return Q[0]=69,Q.writeInt32BE(J,1),Q.write(Y,5,"utf-8"),Q[G+5]=0,Q.writeUInt32BE(X,Q.length-4),Q},cg6=($,Y)=>{let X=Buffer.allocUnsafe(16);return X.writeInt32BE(16,0),X.writeInt16BE(1234,4),X.writeInt16BE(5678,6),X.writeInt32BE($,8),X.writeInt32BE(Y,12),X},cH0=($,Y)=>{let G=4+Buffer.byteLength(Y)+1,J=Buffer.allocUnsafe(1+G);return J[0]=$,J.writeInt32BE(G,1),J.write(Y,5,"utf-8"),J[G]=0,J},lg6=U$.addCString("P").flush(68),ig6=U$.addCString("S").flush(68),ng6=($)=>{return $.name?cH0(68,`${$.type}${$.name||""}`):$.type==="P"?lg6:ig6},rg6=($)=>{let Y=`${$.type}${$.name||""}`;return cH0(67,Y)},ag6=($)=>{return U$.add($).flush(100)},sg6=($)=>{return cH0(102,$)},Ga=($)=>Buffer.from([$,0,0,0,4]),og6=Ga(72),tg6=Ga(83),eg6=Ga(88),$m6=Ga(99),Ym6={startup:vg6,password:yg6,requestSsl:xg6,sendSASLInitialResponseMessage:bg6,sendSCRAMClientFinalMessage:hg6,query:fg6,parse:gg6,bind:ug6,execute:dg6,describe:ng6,close:rg6,flush:()=>og6,sync:()=>tg6,end:()=>eg6,copyData:ag6,copyDone:()=>$m6,copyFail:sg6,cancel:cg6};Lz1.serialize=Ym6});var Ez1=o((Bz1)=>{Object.defineProperty(Bz1,"__esModule",{value:!0});Bz1.BufferReader=void 0;class Az1{constructor($=0){this.offset=$,this.buffer=Buffer.allocUnsafe(0),this.encoding="utf-8"}setBuffer($,Y){this.offset=$,this.buffer=Y}int16(){let $=this.buffer.readInt16BE(this.offset);return this.offset+=2,$}byte(){let $=this.buffer[this.offset];return this.offset++,$}int32(){let $=this.buffer.readInt32BE(this.offset);return this.offset+=4,$}uint32(){let $=this.buffer.readUInt32BE(this.offset);return this.offset+=4,$}string($){let Y=this.buffer.toString(this.encoding,this.offset,this.offset+$);return this.offset+=$,Y}cstring(){let $=this.offset,Y=$;while(this.buffer[Y++]!==0);return this.offset=Y,this.buffer.toString(this.encoding,$,Y-1)}bytes($){let Y=this.buffer.slice(this.offset,this.offset+$);return this.offset+=$,Y}}Bz1.BufferReader=Az1});var jz1=o((wz1)=>{Object.defineProperty(wz1,"__esModule",{value:!0});wz1.Parser=void 0;var T$=pH0(),Xm6=Ez1(),iH0=1,Gm6=4,Mz1=iH0+Gm6,GW=-1,lH0=Buffer.allocUnsafe(0);class qz1{constructor($){if(this.buffer=lH0,this.bufferLength=0,this.bufferOffset=0,this.reader=new Xm6.BufferReader,($===null||$===void 0?void 0:$.mode)==="binary")throw Error("Binary mode not supported yet");this.mode=($===null||$===void 0?void 0:$.mode)||"text"}parse($,Y){this.mergeBuffer($);let X=this.bufferOffset+this.bufferLength,G=this.bufferOffset;while(G+Mz1<=X){let J=this.buffer[G],Q=this.buffer.readUInt32BE(G+iH0),W=iH0+Q;if(W+G<=X){let K=this.handlePacket(G+Mz1,J,Q,this.buffer);Y(K),G+=W}else break}if(G===X)this.buffer=lH0,this.bufferLength=0,this.bufferOffset=0;else this.bufferLength=X-G,this.bufferOffset=G}mergeBuffer($){if(this.bufferLength>0){let Y=this.bufferLength+$.byteLength;if(Y+this.bufferOffset>this.buffer.byteLength){let G;if(Y<=this.buffer.byteLength&&this.bufferOffset>=this.bufferLength)G=this.buffer;else{let J=this.buffer.byteLength*2;while(Y>=J)J*=2;G=Buffer.allocUnsafe(J)}this.buffer.copy(G,0,this.bufferOffset,this.bufferOffset+this.bufferLength),this.buffer=G,this.bufferOffset=0}$.copy(this.buffer,this.bufferOffset+this.bufferLength),this.bufferLength=Y}else this.buffer=$,this.bufferOffset=0,this.bufferLength=$.byteLength}handlePacket($,Y,X,G){let{reader:J}=this;J.setBuffer($,G);let Q;switch(Y){case 50:Q=T$.bindComplete;break;case 49:Q=T$.parseComplete;break;case 51:Q=T$.closeComplete;break;case 110:Q=T$.noData;break;case 115:Q=T$.portalSuspended;break;case 99:Q=T$.copyDone;break;case 87:Q=T$.replicationStart;break;case 73:Q=T$.emptyQuery;break;case 68:Q=Fm6(J);break;case 67:Q=Qm6(J);break;case 90:Q=Jm6(J);break;case 65:Q=Um6(J);break;case 82:Q=Nm6(J,X);break;case 83:Q=Lm6(J);break;case 75:Q=Dm6(J);break;case 69:Q=Rz1(J,"error");break;case 78:Q=Rz1(J,"notice");break;case 84:Q=Hm6(J);break;case 116:Q=Vm6(J);break;case 71:Q=Km6(J);break;case 72:Q=Zm6(J);break;case 100:Q=Wm6(J,X);break;default:return new T$.DatabaseError("received invalid response: "+Y.toString(16),X,"error")}return J.setBuffer(0,lH0),Q.length=X,Q}}wz1.Parser=qz1;var Jm6=($)=>{let Y=$.string(1);return new T$.ReadyForQueryMessage(GW,Y)},Qm6=($)=>{let Y=$.cstring();return new T$.CommandCompleteMessage(GW,Y)},Wm6=($,Y)=>{let X=$.bytes(Y-4);return new T$.CopyDataMessage(GW,X)},Km6=($)=>Pz1($,"copyInResponse"),Zm6=($)=>Pz1($,"copyOutResponse"),Pz1=($,Y)=>{let X=$.byte()!==0,G=$.int16(),J=new T$.CopyResponse(GW,Y,X,G);for(let Q=0;Q<G;Q++)J.columnTypes[Q]=$.int16();return J},Um6=($)=>{let Y=$.int32(),X=$.cstring(),G=$.cstring();return new T$.NotificationResponseMessage(GW,Y,X,G)},Hm6=($)=>{let Y=$.int16(),X=new T$.RowDescriptionMessage(GW,Y);for(let G=0;G<Y;G++)X.fields[G]=zm6($);return X},zm6=($)=>{let Y=$.cstring(),X=$.uint32(),G=$.int16(),J=$.uint32(),Q=$.int16(),W=$.int32(),K=$.int16()===0?"text":"binary";return new T$.Field(Y,X,G,J,Q,W,K)},Vm6=($)=>{let Y=$.int16(),X=new T$.ParameterDescriptionMessage(GW,Y);for(let G=0;G<Y;G++)X.dataTypeIDs[G]=$.int32();return X},Fm6=($)=>{let Y=$.int16(),X=Array(Y);for(let G=0;G<Y;G++){let J=$.int32();X[G]=J===-1?null:$.string(J)}return new T$.DataRowMessage(GW,X)},Lm6=($)=>{let Y=$.cstring(),X=$.cstring();return new T$.ParameterStatusMessage(GW,Y,X)},Dm6=($)=>{let Y=$.int32(),X=$.int32();return new T$.BackendKeyDataMessage(GW,Y,X)},Nm6=($,Y)=>{let X=$.int32(),G={name:"authenticationOk",length:Y};switch(X){case 0:break;case 3:if(G.length===8)G.name="authenticationCleartextPassword";break;case 5:if(G.length===12){G.name="authenticationMD5Password";let J=$.bytes(4);return new T$.AuthenticationMD5Password(GW,J)}break;case 10:{G.name="authenticationSASL",G.mechanisms=[];let J;do if(J=$.cstring(),J)G.mechanisms.push(J);while(J)}break;case 11:G.name="authenticationSASLContinue",G.data=$.string(Y-8);break;case 12:G.name="authenticationSASLFinal",G.data=$.string(Y-8);break;default:throw Error("Unknown authenticationOk message type "+X)}return G},Rz1=($,Y)=>{let X={},G=$.string(1);while(G!=="\x00")X[G]=$.cstring(),G=$.string(1);let J=X.M,Q=Y==="notice"?new T$.NoticeMessage(GW,J):new T$.DatabaseError(J,GW,Y);return Q.severity=X.S,Q.code=X.C,Q.detail=X.D,Q.hint=X.H,Q.position=X.P,Q.internalPosition=X.p,Q.internalQuery=X.q,Q.where=X.W,Q.schema=X.s,Q.table=X.t,Q.column=X.c,Q.dataType=X.d,Q.constraint=X.n,Q.file=X.F,Q.line=X.L,Q.routine=X.R,Q}});var nH0=o((Ja)=>{Object.defineProperty(Ja,"__esModule",{value:!0});Ja.DatabaseError=Ja.serialize=Ja.parse=void 0;var Am6=pH0();Object.defineProperty(Ja,"DatabaseError",{enumerable:!0,get:function(){return Am6.DatabaseError}});var Bm6=Nz1();Object.defineProperty(Ja,"serialize",{enumerable:!0,get:function(){return Bm6.serialize}});var Om6=jz1();function Em6($,Y){let X=new Om6.Parser;return $.on("data",(G)=>X.parse(G,Y)),new Promise((G)=>$.on("end",()=>G()))}Ja.parse=Em6});var Iz1=o((Tz1)=>{Object.defineProperty(Tz1,"__esModule",{value:!0});Tz1.default={}});var Sz1=o((yB5,Cz1)=>{var{getStream:Pm6,getSecureStream:wm6}=Im6();Cz1.exports={getStream:Pm6,getSecureStream:wm6};function _m6(){function $(X){return new(A0("net")).Socket}function Y(X){return A0("tls").connect(X)}return{getStream:$,getSecureStream:Y}}function jm6(){function $(X){let{CloudflareSocket:G}=Iz1();return new G(X)}function Y(X){return X.socket.startTls(X),X.socket}return{getStream:$,getSecureStream:Y}}function Tm6(){if(typeof navigator==="object"&&navigator!==null&&typeof navigator.userAgent==="string")return navigator.userAgent==="Cloudflare-Workers";if(typeof Response==="function"){let $=new Response(null,{cf:{thing:!0}});if(typeof $.cf==="object"&&$.cf!==null&&$.cf.thing)return!0}return!1}function Im6(){if(Tm6())return jm6();return _m6()}});var rH0=o((bB5,vz1)=>{var Cm6=A0("events").EventEmitter,{parse:Sm6,serialize:CY}=nH0(),{getStream:km6,getSecureStream:vm6}=Sz1(),xm6=CY.flush(),ym6=CY.sync(),bm6=CY.end();class kz1 extends Cm6{constructor($){super();if($=$||{},this.stream=$.stream||km6($.ssl),typeof this.stream==="function")this.stream=this.stream($);this._keepAlive=$.keepAlive,this._keepAliveInitialDelayMillis=$.keepAliveInitialDelayMillis,this.parsedStatements={},this.ssl=$.ssl||!1,this._ending=!1,this._emitMessage=!1;let Y=this;this.on("newListener",function(X){if(X==="message")Y._emitMessage=!0})}connect($,Y){let X=this;this._connecting=!0,this.stream.setNoDelay(!0),this.stream.connect($,Y),this.stream.once("connect",function(){if(X._keepAlive)X.stream.setKeepAlive(!0,X._keepAliveInitialDelayMillis);X.emit("connect")});let G=function(J){if(X._ending&&(J.code==="ECONNRESET"||J.code==="EPIPE"))return;X.emit("error",J)};if(this.stream.on("error",G),this.stream.on("close",function(){X.emit("end")}),!this.ssl)return this.attachListeners(this.stream);this.stream.once("data",function(J){switch(J.toString("utf8")){case"S":break;case"N":return X.stream.end(),X.emit("error",Error("The server does not support SSL connections"));default:return X.stream.end(),X.emit("error",Error("There was an error establishing an SSL connection"))}let W={socket:X.stream};if(X.ssl!==!0){if(Object.assign(W,X.ssl),"key"in X.ssl)W.key=X.ssl.key}let K=A0("net");if(K.isIP&&K.isIP(Y)===0)W.servername=Y;try{X.stream=vm6(W)}catch(Z){return X.emit("error",Z)}X.attachListeners(X.stream),X.stream.on("error",G),X.emit("sslconnect")})}attachListeners($){Sm6($,(Y)=>{let X=Y.name==="error"?"errorMessage":Y.name;if(this._emitMessage)this.emit("message",Y);this.emit(X,Y)})}requestSsl(){this.stream.write(CY.requestSsl())}startup($){this.stream.write(CY.startup($))}cancel($,Y){this._send(CY.cancel($,Y))}password($){this._send(CY.password($))}sendSASLInitialResponseMessage($,Y){this._send(CY.sendSASLInitialResponseMessage($,Y))}sendSCRAMClientFinalMessage($){this._send(CY.sendSCRAMClientFinalMessage($))}_send($){if(!this.stream.writable)return!1;return this.stream.write($)}query($){this._send(CY.query($))}parse($){this._send(CY.parse($))}bind($){this._send(CY.bind($))}execute($){this._send(CY.execute($))}flush(){if(this.stream.writable)this.stream.write(xm6)}sync(){this._ending=!0,this._send(ym6)}ref(){this.stream.ref()}unref(){this.stream.unref()}end(){if(this._ending=!0,!this._connecting||!this.stream.writable){this.stream.end();return}return this.stream.write(bm6,()=>{this.stream.end()})}close($){this._send(CY.close($))}describe($){this._send(CY.describe($))}sendCopyFromChunk($){this._send(CY.copyData($))}endCopyFrom(){this._send(CY.copyDone())}sendCopyFail($){this._send(CY.copyFail($))}}vz1.exports=kz1});var hz1=o((hB5,bz1)=>{var{Transform:hm6}=A0("stream"),{StringDecoder:fm6}=A0("string_decoder"),jF=Symbol("last"),Qa=Symbol("decoder");function gm6($,Y,X){let G;if(this.overflow){if(G=this[Qa].write($).split(this.matcher),G.length===1)return X();G.shift(),this.overflow=!1}else this[jF]+=this[Qa].write($),G=this[jF].split(this.matcher);this[jF]=G.pop();for(let J=0;J<G.length;J++)try{yz1(this,this.mapper(G[J]))}catch(Q){return X(Q)}if(this.overflow=this[jF].length>this.maxLength,this.overflow&&!this.skipOverflow){X(Error("maximum buffer reached"));return}X()}function mm6($){if(this[jF]+=this[Qa].end(),this[jF])try{yz1(this,this.mapper(this[jF]))}catch(Y){return $(Y)}$()}function yz1($,Y){if(Y!==void 0)$.push(Y)}function xz1($){return $}function um6($,Y,X){switch($=$||/\r?\n/,Y=Y||xz1,X=X||{},arguments.length){case 1:if(typeof $==="function")Y=$,$=/\r?\n/;else if(typeof $==="object"&&!($ instanceof RegExp)&&!$[Symbol.split])X=$,$=/\r?\n/;break;case 2:if(typeof $==="function")X=Y,Y=$,$=/\r?\n/;else if(typeof Y==="object")X=Y,Y=xz1}X=Object.assign({},X),X.autoDestroy=!0,X.transform=gm6,X.flush=mm6,X.readableObjectMode=!0;let G=new hm6(X);return G[jF]="",G[Qa]=new fm6("utf8"),G.matcher=$,G.mapper=Y,G.maxLength=X.maxLength,G.skipOverflow=X.skipOverflow||!1,G.overflow=!1,G._destroy=function(J,Q){this._writableState.errorEmitted=!1,Q(J)},G}bz1.exports=um6});var mz1=o(($u6,oH)=>{var fz1=A0("path"),pm6=A0("stream").Stream,dm6=hz1(),gz1=A0("util"),cm6=5432,Wa=process.platform==="win32",Kx=process.stderr,lm6=56,im6=7,nm6=61440,rm6=32768;function am6($){return($&nm6)==rm6}var pq=["host","port","database","user","password"],aH0=pq.length,sm6=pq[aH0-1];function sH0(){var $=Kx instanceof pm6&&Kx.writable===!0;if($){var Y=Array.prototype.slice.call(arguments).concat(`
`);Kx.write(gz1.format.apply(gz1,Y))}}Object.defineProperty($u6,"isWin",{get:function(){return Wa},set:function($){Wa=$}});$u6.warnTo=function($){var Y=Kx;return Kx=$,Y};$u6.getFileName=function($){var Y=$||process.env,X=Y.PGPASSFILE||(Wa?fz1.join(Y.APPDATA||"./","postgresql","pgpass.conf"):fz1.join(Y.HOME||"./",".pgpass"));return X};$u6.usePgPass=function($,Y){if(Object.prototype.hasOwnProperty.call(process.env,"PGPASSWORD"))return!1;if(Wa)return!0;if(Y=Y||"<unkn>",!am6($.mode))return sH0('WARNING: password file "%s" is not a plain file',Y),!1;if($.mode&(lm6|im6))return sH0('WARNING: password file "%s" has group or world access; permissions should be u=rw (0600) or less',Y),!1;return!0};var om6=$u6.match=function($,Y){return pq.slice(0,-1).reduce(function(X,G,J){if(J==1){if(Number($[G]||cm6)===Number(Y[G]))return X&&!0}return X&&(Y[G]==="*"||Y[G]===$[G])},!0)};$u6.getPassword=function($,Y,X){var G,J=Y.pipe(dm6());function Q(Z){var H=tm6(Z);if(H&&em6(H)&&om6($,H))G=H[sm6],J.end()}var W=function(){Y.destroy(),X(G)},K=function(Z){Y.destroy(),sH0("WARNING: error on reading file: %s",Z),X(void 0)};Y.on("error",K),J.on("data",Q).on("end",W).on("error",K)};var tm6=$u6.parseLine=function($){if($.length<11||$.match(/^\s+#/))return null;var Y="",X="",G=0,J=0,Q=0,W={},K=!1,Z=function(z,V,F){var L=$.substring(V,F);if(!Object.hasOwnProperty.call(process.env,"PGPASS_NO_DEESCAPE"))L=L.replace(/\\([:\\])/g,"$1");W[pq[z]]=L};for(var H=0;H<$.length-1;H+=1){if(Y=$.charAt(H+1),X=$.charAt(H),K=G==aH0-1,K){Z(G,J);break}if(H>=0&&Y==":"&&X!=="\\")Z(G,J,H+1),J=H+2,G+=1}return W=Object.keys(W).length===aH0?W:null,W},em6=$u6.isValidEntry=function($){var Y={0:function(W){return W.length>0},1:function(W){if(W==="*")return!0;return W=Number(W),isFinite(W)&&W>0&&W<9007199254740992&&Math.floor(W)===W},2:function(W){return W.length>0},3:function(W){return W.length>0},4:function(W){return W.length>0}};for(var X=0;X<pq.length;X+=1){var G=Y[X],J=$[pq[X]]||"",Q=G(J);if(!Q)return!1}return!0}});var pz1=o((pB5,oH0)=>{var uB5=A0("path"),uz1=A0("fs"),Ka=mz1();oH0.exports=function($,Y){var X=Ka.getFileName();uz1.stat(X,function(G,J){if(G||!Ka.usePgPass(J,X))return Y(void 0);var Q=uz1.createReadStream(X);Ka.getPassword($,Q,Y)})};oH0.exports.warnTo=Ka.warnTo});var nz1=o((dB5,iz1)=>{var Qu6=A0("events").EventEmitter,dz1=hq(),Zx=A0("util"),tH0=CH1(),Wu6=Xa(),Ku6=mH0(),lz1=iH1(),Zu6=Qx(),Uu6=rH0(),Hu6=hH0(),cz1=Zx.deprecate(()=>{},"Client.activeQuery is deprecated and will be removed in pg@9.0"),zu6=Zx.deprecate(()=>{},"Client.queryQueue is deprecated and will be removed in pg@9.0."),Vu6=Zx.deprecate(()=>{},"pgpass support is deprecated and will be removed in pg@9.0. You can provide an async function as the password property to the Client/Pool constructor that returns a password instead. Within this function you can call the pgpass module in your own code."),Fu6=Zx.deprecate(()=>{},"Passing a custom Promise implementation to the Client/Pool constructor is deprecated and will be removed in pg@9.0."),Lu6=Zx.deprecate(()=>{},"Calling client.query() when the client is already executing a query is deprecated and will be removed in pg@9.0. Use async/await or an external async flow control mechanism instead.");class eH0 extends Qu6{constructor($){super();this.connectionParameters=new Ku6($),this.user=this.connectionParameters.user,this.database=this.connectionParameters.database,this.port=this.connectionParameters.port,this.host=this.connectionParameters.host,Object.defineProperty(this,"password",{configurable:!0,enumerable:!1,writable:!0,value:this.connectionParameters.password}),this.replication=this.connectionParameters.replication;let Y=$||{};if(Y.Promise)Fu6();if(this._Promise=Y.Promise||global.Promise,this._types=new Wu6(Y.types),this._ending=!1,this._ended=!1,this._connecting=!1,this._connected=!1,this._connectionError=!1,this._queryable=!0,this._activeQuery=null,this.enableChannelBinding=Boolean(Y.enableChannelBinding),this.connection=Y.connection||new Uu6({stream:Y.stream,ssl:this.connectionParameters.ssl,keepAlive:Y.keepAlive||!1,keepAliveInitialDelayMillis:Y.keepAliveInitialDelayMillis||0,encoding:this.connectionParameters.client_encoding||"utf8"}),this._queryQueue=[],this.binary=Y.binary||Zu6.binary,this.processID=null,this.secretKey=null,this.ssl=this.connectionParameters.ssl||!1,this.ssl&&this.ssl.key)Object.defineProperty(this.ssl,"key",{enumerable:!1});this._connectionTimeoutMillis=Y.connectionTimeoutMillis||0}get activeQuery(){return cz1(),this._activeQuery}set activeQuery($){cz1(),this._activeQuery=$}_getActiveQuery(){return this._activeQuery}_errorAllQueries($){let Y=(G)=>{process.nextTick(()=>{G.handleError($,this.connection)})},X=this._getActiveQuery();if(X)Y(X),this._activeQuery=null;this._queryQueue.forEach(Y),this._queryQueue.length=0}_connect($){let Y=this,X=this.connection;if(this._connectionCallback=$,this._connecting||this._connected){let G=Error("Client has already been connected. You cannot reuse a client.");process.nextTick(()=>{$(G)});return}if(this._connecting=!0,this._connectionTimeoutMillis>0){if(this.connectionTimeoutHandle=setTimeout(()=>{X._ending=!0,X.stream.destroy(Error("timeout expired"))},this._connectionTimeoutMillis),this.connectionTimeoutHandle.unref)this.connectionTimeoutHandle.unref()}if(this.host&&this.host.indexOf("/")===0)X.connect(this.host+"/.s.PGSQL."+this.port);else X.connect(this.port,this.host);X.on("connect",function(){if(Y.ssl)X.requestSsl();else X.startup(Y.getStartupConf())}),X.on("sslconnect",function(){X.startup(Y.getStartupConf())}),this._attachListeners(X),X.once("end",()=>{let G=this._ending?Error("Connection terminated"):Error("Connection terminated unexpectedly");if(clearTimeout(this.connectionTimeoutHandle),this._errorAllQueries(G),this._ended=!0,!this._ending){if(this._connecting&&!this._connectionError)if(this._connectionCallback)this._connectionCallback(G);else this._handleErrorEvent(G);else if(!this._connectionError)this._handleErrorEvent(G)}process.nextTick(()=>{this.emit("end")})})}connect($){if($){this._connect($);return}return new this._Promise((Y,X)=>{this._connect((G)=>{if(G)X(G);else Y(this)})})}_attachListeners($){$.on("authenticationCleartextPassword",this._handleAuthCleartextPassword.bind(this)),$.on("authenticationMD5Password",this._handleAuthMD5Password.bind(this)),$.on("authenticationSASL",this._handleAuthSASL.bind(this)),$.on("authenticationSASLContinue",this._handleAuthSASLContinue.bind(this)),$.on("authenticationSASLFinal",this._handleAuthSASLFinal.bind(this)),$.on("backendKeyData",this._handleBackendKeyData.bind(this)),$.on("error",this._handleErrorEvent.bind(this)),$.on("errorMessage",this._handleErrorMessage.bind(this)),$.on("readyForQuery",this._handleReadyForQuery.bind(this)),$.on("notice",this._handleNotice.bind(this)),$.on("rowDescription",this._handleRowDescription.bind(this)),$.on("dataRow",this._handleDataRow.bind(this)),$.on("portalSuspended",this._handlePortalSuspended.bind(this)),$.on("emptyQuery",this._handleEmptyQuery.bind(this)),$.on("commandComplete",this._handleCommandComplete.bind(this)),$.on("parseComplete",this._handleParseComplete.bind(this)),$.on("copyInResponse",this._handleCopyInResponse.bind(this)),$.on("copyData",this._handleCopyData.bind(this)),$.on("notification",this._handleNotification.bind(this))}_getPassword($){let Y=this.connection;if(typeof this.password==="function")this._Promise.resolve().then(()=>this.password(this.connectionParameters)).then((X)=>{if(X!==void 0){if(typeof X!=="string"){Y.emit("error",TypeError("Password must be a string"));return}this.connectionParameters.password=this.password=X}else this.connectionParameters.password=this.password=null;$()}).catch((X)=>{Y.emit("error",X)});else if(this.password!==null)$();else try{pz1()(this.connectionParameters,(G)=>{if(G!==void 0)Vu6(),this.connectionParameters.password=this.password=G;$()})}catch(X){this.emit("error",X)}}_handleAuthCleartextPassword($){this._getPassword(()=>{this.connection.password(this.password)})}_handleAuthMD5Password($){this._getPassword(async()=>{try{let Y=await Hu6.postgresMd5PasswordHash(this.user,this.password,$.salt);this.connection.password(Y)}catch(Y){this.emit("error",Y)}})}_handleAuthSASL($){this._getPassword(()=>{try{this.saslSession=tH0.startSession($.mechanisms,this.enableChannelBinding&&this.connection.stream),this.connection.sendSASLInitialResponseMessage(this.saslSession.mechanism,this.saslSession.response)}catch(Y){this.connection.emit("error",Y)}})}async _handleAuthSASLContinue($){try{await tH0.continueSession(this.saslSession,this.password,$.data,this.enableChannelBinding&&this.connection.stream),this.connection.sendSCRAMClientFinalMessage(this.saslSession.response)}catch(Y){this.connection.emit("error",Y)}}_handleAuthSASLFinal($){try{tH0.finalizeSession(this.saslSession,$.data),this.saslSession=null}catch(Y){this.connection.emit("error",Y)}}_handleBackendKeyData($){this.processID=$.processID,this.secretKey=$.secretKey}_handleReadyForQuery($){if(this._connecting){if(this._connecting=!1,this._connected=!0,clearTimeout(this.connectionTimeoutHandle),this._connectionCallback)this._connectionCallback(null,this),this._connectionCallback=null;this.emit("connect")}let Y=this._getActiveQuery();if(this._activeQuery=null,this.readyForQuery=!0,Y)Y.handleReadyForQuery(this.connection);this._pulseQueryQueue()}_handleErrorWhileConnecting($){if(this._connectionError)return;if(this._connectionError=!0,clearTimeout(this.connectionTimeoutHandle),this._connectionCallback)return this._connectionCallback($);this.emit("error",$)}_handleErrorEvent($){if(this._connecting)return this._handleErrorWhileConnecting($);this._queryable=!1,this._errorAllQueries($),this.emit("error",$)}_handleErrorMessage($){if(this._connecting)return this._handleErrorWhileConnecting($);let Y=this._getActiveQuery();if(!Y){this._handleErrorEvent($);return}this._activeQuery=null,Y.handleError($,this.connection)}_handleRowDescription($){let Y=this._getActiveQuery();if(Y==null){let X=Error("Received unexpected rowDescription message from backend.");this._handleErrorEvent(X);return}Y.handleRowDescription($)}_handleDataRow($){let Y=this._getActiveQuery();if(Y==null){let X=Error("Received unexpected dataRow message from backend.");this._handleErrorEvent(X);return}Y.handleDataRow($)}_handlePortalSuspended($){let Y=this._getActiveQuery();if(Y==null){let X=Error("Received unexpected portalSuspended message from backend.");this._handleErrorEvent(X);return}Y.handlePortalSuspended(this.connection)}_handleEmptyQuery($){let Y=this._getActiveQuery();if(Y==null){let X=Error("Received unexpected emptyQuery message from backend.");this._handleErrorEvent(X);return}Y.handleEmptyQuery(this.connection)}_handleCommandComplete($){let Y=this._getActiveQuery();if(Y==null){let X=Error("Received unexpected commandComplete message from backend.");this._handleErrorEvent(X);return}Y.handleCommandComplete($,this.connection)}_handleParseComplete(){let $=this._getActiveQuery();if($==null){let Y=Error("Received unexpected parseComplete message from backend.");this._handleErrorEvent(Y);return}if($.name)this.connection.parsedStatements[$.name]=$.text}_handleCopyInResponse($){let Y=this._getActiveQuery();if(Y==null){let X=Error("Received unexpected copyInResponse message from backend.");this._handleErrorEvent(X);return}Y.handleCopyInResponse(this.connection)}_handleCopyData($){let Y=this._getActiveQuery();if(Y==null){let X=Error("Received unexpected copyData message from backend.");this._handleErrorEvent(X);return}Y.handleCopyData($,this.connection)}_handleNotification($){this.emit("notification",$)}_handleNotice($){this.emit("notice",$)}getStartupConf(){let $=this.connectionParameters,Y={user:$.user,database:$.database},X=$.application_name||$.fallback_application_name;if(X)Y.application_name=X;if($.replication)Y.replication=""+$.replication;if($.statement_timeout)Y.statement_timeout=String(parseInt($.statement_timeout,10));if($.lock_timeout)Y.lock_timeout=String(parseInt($.lock_timeout,10));if($.idle_in_transaction_session_timeout)Y.idle_in_transaction_session_timeout=String(parseInt($.idle_in_transaction_session_timeout,10));if($.options)Y.options=$.options;return Y}cancel($,Y){if($.activeQuery===Y){let X=this.connection;if(this.host&&this.host.indexOf("/")===0)X.connect(this.host+"/.s.PGSQL."+this.port);else X.connect(this.port,this.host);X.on("connect",function(){X.cancel($.processID,$.secretKey)})}else if($._queryQueue.indexOf(Y)!==-1)$._queryQueue.splice($._queryQueue.indexOf(Y),1)}setTypeParser($,Y,X){return this._types.setTypeParser($,Y,X)}getTypeParser($,Y){return this._types.getTypeParser($,Y)}escapeIdentifier($){return dz1.escapeIdentifier($)}escapeLiteral($){return dz1.escapeLiteral($)}_pulseQueryQueue(){if(this.readyForQuery===!0){this._activeQuery=this._queryQueue.shift();let $=this._getActiveQuery();if($){this.readyForQuery=!1,this.hasExecuted=!0;let Y=$.submit(this.connection);if(Y)process.nextTick(()=>{$.handleError(Y,this.connection),this.readyForQuery=!0,this._pulseQueryQueue()})}else if(this.hasExecuted)this._activeQuery=null,this.emit("drain")}}query($,Y,X){let G,J,Q,W,K;if($===null||$===void 0)throw TypeError("Client was passed a null or undefined query");else if(typeof $.submit==="function"){if(Q=$.query_timeout||this.connectionParameters.query_timeout,J=G=$,!G.callback){if(typeof Y==="function")G.callback=Y;else if(X)G.callback=X}}else if(Q=$.query_timeout||this.connectionParameters.query_timeout,G=new lz1($,Y,X),!G.callback)J=new this._Promise((Z,H)=>{G.callback=(z,V)=>z?H(z):Z(V)}).catch((Z)=>{throw Error.captureStackTrace(Z),Z});if(Q)K=G.callback||(()=>{}),W=setTimeout(()=>{let Z=Error("Query read timeout");process.nextTick(()=>{G.handleError(Z,this.connection)}),K(Z),G.callback=()=>{};let H=this._queryQueue.indexOf(G);if(H>-1)this._queryQueue.splice(H,1);this._pulseQueryQueue()},Q),G.callback=(Z,H)=>{clearTimeout(W),K(Z,H)};if(this.binary&&!G.binary)G.binary=!0;if(G._result&&!G._result._types)G._result._types=this._types;if(!this._queryable)return process.nextTick(()=>{G.handleError(Error("Client has encountered a connection error and is not queryable"),this.connection)}),J;if(this._ending)return process.nextTick(()=>{G.handleError(Error("Client was closed and is not queryable"),this.connection)}),J;if(this._queryQueue.length>0)Lu6();return this._queryQueue.push(G),this._pulseQueryQueue(),J}ref(){this.connection.ref()}unref(){this.connection.unref()}end($){if(this._ending=!0,!this.connection._connecting||this._ended)if($)$();else return this._Promise.resolve();if(this._getActiveQuery()||!this._queryable)this.connection.stream.destroy();else this.connection.end();if($)this.connection.once("end",$);else return new this._Promise((Y)=>{this.connection.once("end",Y)})}get queryQueue(){return zu6(),this._queryQueue}}eH0.Query=lz1;iz1.exports=eH0});var tz1=o((cB5,oz1)=>{var Du6=A0("events").EventEmitter,$z0=function(){},rz1=($,Y)=>{let X=$.findIndex(Y);return X===-1?void 0:$.splice(X,1)[0]};class az1{constructor($,Y,X){this.client=$,this.idleListener=Y,this.timeoutId=X}}class Ux{constructor($){this.callback=$}}function Nu6(){throw Error("Release called on client which has already been released to the pool.")}function Za($,Y){if(Y)return{callback:Y,result:void 0};let X,G,J=function(W,K){W?X(W):G(K)},Q=new $(function(W,K){G=W,X=K}).catch((W)=>{throw Error.captureStackTrace(W),W});return{callback:J,result:Q}}function Au6($,Y){return function X(G){G.client=Y,Y.removeListener("error",X),Y.on("error",()=>{$.log("additional client error after disconnection due to error",G)}),$._remove(Y),$.emit("error",G,Y)}}class sz1 extends Du6{constructor($,Y){super();if(this.options=Object.assign({},$),$!=null&&"password"in $)Object.defineProperty(this.options,"password",{configurable:!0,enumerable:!1,writable:!0,value:$.password});if($!=null&&$.ssl&&$.ssl.key)Object.defineProperty(this.options.ssl,"key",{enumerable:!1});if(this.options.max=this.options.max||this.options.poolSize||10,this.options.min=this.options.min||0,this.options.maxUses=this.options.maxUses||1/0,this.options.allowExitOnIdle=this.options.allowExitOnIdle||!1,this.options.maxLifetimeSeconds=this.options.maxLifetimeSeconds||0,this.log=this.options.log||function(){},this.Client=this.options.Client||Y||Yz0().Client,this.Promise=this.options.Promise||global.Promise,typeof this.options.idleTimeoutMillis>"u")this.options.idleTimeoutMillis=1e4;this._clients=[],this._idle=[],this._expired=new WeakSet,this._pendingQueue=[],this._endCallback=void 0,this.ending=!1,this.ended=!1}_promiseTry($){let Y=this.Promise;if(typeof Y.try==="function")return Y.try($);return new Y((X)=>X($()))}_isFull(){return this._clients.length>=this.options.max}_isAboveMin(){return this._clients.length>this.options.min}_pulseQueue(){if(this.log("pulse queue"),this.ended){this.log("pulse queue ended");return}if(this.ending){if(this.log("pulse queue on ending"),this._idle.length)this._idle.slice().map((Y)=>{this._remove(Y.client)});if(!this._clients.length)this.ended=!0,this._endCallback();return}if(!this._pendingQueue.length){this.log("no queued requests");return}if(!this._idle.length&&this._isFull())return;let $=this._pendingQueue.shift();if(this._idle.length){let Y=this._idle.pop();clearTimeout(Y.timeoutId);let X=Y.client;X.ref&&X.ref();let G=Y.idleListener;return this._acquireClient(X,$,G,!1)}if(!this._isFull())return this.newClient($);throw Error("unexpected condition")}_remove($,Y){let X=rz1(this._idle,(J)=>J.client===$);if(X!==void 0)clearTimeout(X.timeoutId);this._clients=this._clients.filter((J)=>J!==$);let G=this;$.end(()=>{if(G.emit("remove",$),typeof Y==="function")Y()})}connect($){if(this.ending){let G=Error("Cannot use a pool after calling end on the pool");return $?$(G):this.Promise.reject(G)}let Y=Za(this.Promise,$),X=Y.result;if(this._isFull()||this._idle.length){if(this._idle.length)process.nextTick(()=>this._pulseQueue());if(!this.options.connectionTimeoutMillis)return this._pendingQueue.push(new Ux(Y.callback)),X;let G=(W,K,Z)=>{clearTimeout(Q),Y.callback(W,K,Z)},J=new Ux(G),Q=setTimeout(()=>{rz1(this._pendingQueue,(W)=>W.callback===G),J.timedOut=!0,Y.callback(Error("timeout exceeded when trying to connect"))},this.options.connectionTimeoutMillis);if(Q.unref)Q.unref();return this._pendingQueue.push(J),X}return this.newClient(new Ux(Y.callback)),X}newClient($){let Y=new this.Client(this.options);this._clients.push(Y);let X=Au6(this,Y);this.log("checking client timeout");let G,J=!1;if(this.options.connectionTimeoutMillis)G=setTimeout(()=>{if(Y.connection)this.log("ending client due to timeout"),J=!0,Y.connection.stream.destroy();else if(!Y.isConnected())this.log("ending client due to timeout"),J=!0,Y.end()},this.options.connectionTimeoutMillis);this.log("connecting new client"),Y.connect((Q)=>{if(G)clearTimeout(G);if(Y.on("error",X),Q){if(this.log("client failed to connect",Q),this._clients=this._clients.filter((W)=>W!==Y),J)Q=Error("Connection terminated due to connection timeout",{cause:Q});if(this._pulseQueue(),!$.timedOut)$.callback(Q,void 0,$z0)}else{if(this.log("new client connected"),this.options.onConnect){this._promiseTry(()=>this.options.onConnect(Y)).then(()=>{this._afterConnect(Y,$,X)},(W)=>{this._clients=this._clients.filter((K)=>K!==Y),Y.end(()=>{if(this._pulseQueue(),!$.timedOut)$.callback(W,void 0,$z0)})});return}return this._afterConnect(Y,$,X)}})}_afterConnect($,Y,X){if(this.options.maxLifetimeSeconds!==0){let G=setTimeout(()=>{if(this.log("ending client due to expired lifetime"),this._expired.add($),this._idle.findIndex((Q)=>Q.client===$)!==-1)this._acquireClient($,new Ux((Q,W,K)=>K()),X,!1)},this.options.maxLifetimeSeconds*1000);G.unref(),$.once("end",()=>clearTimeout(G))}return this._acquireClient($,Y,X,!0)}_acquireClient($,Y,X,G){if(G)this.emit("connect",$);if(this.emit("acquire",$),$.release=this._releaseOnce($,X),$.removeListener("error",X),!Y.timedOut)if(G&&this.options.verify)this.options.verify($,(J)=>{if(J)return $.release(J),Y.callback(J,void 0,$z0);Y.callback(void 0,$,$.release)});else Y.callback(void 0,$,$.release);else if(G&&this.options.verify)this.options.verify($,$.release);else $.release()}_releaseOnce($,Y){let X=!1;return(G)=>{if(X)Nu6();X=!0,this._release($,Y,G)}}_release($,Y,X){if($.on("error",Y),$._poolUseCount=($._poolUseCount||0)+1,this.emit("release",X,$),X||this.ending||!$._queryable||$._ending||$._poolUseCount>=this.options.maxUses){if($._poolUseCount>=this.options.maxUses)this.log("remove expended client");return this._remove($,this._pulseQueue.bind(this))}if(this._expired.has($))return this.log("remove expired client"),this._expired.delete($),this._remove($,this._pulseQueue.bind(this));let J;if(this.options.idleTimeoutMillis&&this._isAboveMin()){if(J=setTimeout(()=>{if(this._isAboveMin())this.log("remove idle client"),this._remove($,this._pulseQueue.bind(this))},this.options.idleTimeoutMillis),this.options.allowExitOnIdle)J.unref()}if(this.options.allowExitOnIdle)$.unref();this._idle.push(new az1($,Y,J)),this._pulseQueue()}query($,Y,X){if(typeof $==="function"){let J=Za(this.Promise,$);return setImmediate(function(){return J.callback(Error("Passing a function as the first parameter to pool.query is not supported"))}),J.result}if(typeof Y==="function")X=Y,Y=void 0;let G=Za(this.Promise,X);return X=G.callback,this.connect((J,Q)=>{if(J)return X(J);let W=!1,K=(Z)=>{if(W)return;W=!0,Q.release(Z),X(Z)};Q.once("error",K),this.log("dispatching query");try{Q.query($,Y,(Z,H)=>{if(this.log("query dispatched"),Q.removeListener("error",K),W)return;if(W=!0,Q.release(Z),Z)return X(Z);return X(void 0,H)})}catch(Z){return Q.release(Z),X(Z)}}),G.result}end($){if(this.log("ending"),this.ending){let X=Error("Called end on pool more than once");return $?$(X):this.Promise.reject(X)}this.ending=!0;let Y=Za(this.Promise,$);return this._endCallback=Y.callback,this._pulseQueue(),Y.result}get waitingCount(){return this._pendingQueue.length}get idleCount(){return this._idle.length}get expiredCount(){return this._clients.reduce(($,Y)=>$+(this._expired.has(Y)?1:0),0)}get totalCount(){return this._clients.length}}oz1.exports=sz1});var YV1=o((lB5,$V1)=>{var ez1=A0("events").EventEmitter,Bu6=A0("util"),Xz0=hq(),dq=$V1.exports=function($,Y,X){ez1.call(this),$=Xz0.normalizeQueryConfig($,Y,X),this.text=$.text,this.values=$.values,this.name=$.name,this.queryMode=$.queryMode,this.callback=$.callback,this.state="new",this._arrayMode=$.rowMode==="array",this._emitRowEvents=!1,this.on("newListener",function(G){if(G==="row")this._emitRowEvents=!0}.bind(this))};Bu6.inherits(dq,ez1);var Ou6={sqlState:"code",statementPosition:"position",messagePrimary:"message",context:"where",schemaName:"schema",tableName:"table",columnName:"column",dataTypeName:"dataType",constraintName:"constraint",sourceFile:"file",sourceLine:"line",sourceFunction:"routine"};dq.prototype.handleError=function($){let Y=this.native.pq.resultErrorFields();if(Y)for(let X in Y){let G=Ou6[X]||X;$[G]=Y[X]}if(this.callback)this.callback($);else this.emit("error",$);this.state="error"};dq.prototype.then=function($,Y){return this._getPromise().then($,Y)};dq.prototype.catch=function($){return this._getPromise().catch($)};dq.prototype._getPromise=function(){if(this._promise)return this._promise;return this._promise=new Promise(function($,Y){this._once("end",$),this._once("error",Y)}.bind(this)),this._promise};dq.prototype.submit=function($){this.state="running";let Y=this;this.native=$.native,$.native.arrayMode=this._arrayMode;let X=function(G,J,Q){if($.native.arrayMode=!1,setImmediate(function(){Y.emit("_done")}),G)return Y.handleError(G);if(Y._emitRowEvents)if(Q.length>1)J.forEach((W,K)=>{W.forEach((Z)=>{Y.emit("row",Z,Q[K])})});else J.forEach(function(W){Y.emit("row",W,Q)});if(Y.state="end",Y.emit("end",Q),Y.callback)Y.callback(null,Q)};if(process.domain)X=process.domain.bind(X);if(this.name){if(this.name.length>63)console.error("Warning! Postgres only supports 63 characters for query names."),console.error("You supplied %s (%s)",this.name,this.name.length),console.error("This can cause conflicts and silent errors executing queries");let G=(this.values||[]).map(Xz0.prepareValue);if($.namedQueries[this.name]){if(this.text&&$.namedQueries[this.name]!==this.text){let J=Error(`Prepared statements must be unique - '${this.name}' was used for a different statement`);return X(J)}return $.native.execute(this.name,G,X)}return $.native.prepare(this.name,this.text,G.length,function(J){if(J)return X(J);return $.namedQueries[Y.name]=Y.text,Y.native.execute(Y.name,G,X)})}else if(this.values){if(!Array.isArray(this.values)){let J=Error("Query values must be an array");return X(J)}let G=this.values.map(Xz0.prepareValue);$.native.query(this.text,G,X)}else if(this.queryMode==="extended")$.native.query(this.text,[],X);else $.native.query(this.text,X)}});var Gz0=o((iB5,QV1)=>{var Eu6=A0("util"),XV1;try{XV1=(()=>{throw new Error("Cannot require module "+"pg-native");})()}catch($){throw $}var Mu6=Xa(),GV1=A0("events").EventEmitter,Ru6=A0("util"),qu6=mH0(),JV1=YV1(),Pu6=Eu6.deprecate(()=>{},"Calling client.query() when the client is already executing a query is deprecated and will be removed in pg@9.0. Use async/await or an external async flow control mechanism instead."),TG=QV1.exports=function($){GV1.call(this),$=$||{},this._Promise=$.Promise||global.Promise,this._types=new Mu6($.types),this.native=new XV1({types:this._types}),this._queryQueue=[],this._ending=!1,this._connecting=!1,this._connected=!1,this._queryable=!0;let Y=this.connectionParameters=new qu6($);if($.nativeConnectionString)Y.nativeConnectionString=$.nativeConnectionString;this.user=Y.user,Object.defineProperty(this,"password",{configurable:!0,enumerable:!1,writable:!0,value:Y.password}),this.database=Y.database,this.host=Y.host,this.port=Y.port,this.namedQueries={}};TG.Query=JV1;Ru6.inherits(TG,GV1);TG.prototype._errorAllQueries=function($){let Y=(X)=>{process.nextTick(()=>{X.native=this.native,X.handleError($)})};if(this._hasActiveQuery())Y(this._activeQuery),this._activeQuery=null;this._queryQueue.forEach(Y),this._queryQueue.length=0};TG.prototype._connect=function($){let Y=this;if(this._connecting){process.nextTick(()=>$(Error("Client has already been connected. You cannot reuse a client.")));return}this._connecting=!0,this.connectionParameters.getLibpqConnectionString(function(X,G){if(Y.connectionParameters.nativeConnectionString)G=Y.connectionParameters.nativeConnectionString;if(X)return $(X);Y.native.connect(G,function(J){if(J)return Y.native.end(),$(J);Y._connected=!0,Y.native.on("error",function(Q){Y._queryable=!1,Y._errorAllQueries(Q),Y.emit("error",Q)}),Y.native.on("notification",function(Q){Y.emit("notification",{channel:Q.relname,payload:Q.extra})}),Y.emit("connect"),Y._pulseQueryQueue(!0),$(null,this)})})};TG.prototype.connect=function($){if($){this._connect($);return}return new this._Promise((Y,X)=>{this._connect((G)=>{if(G)X(G);else Y(this)})})};TG.prototype.query=function($,Y,X){let G,J,Q,W,K;if($===null||$===void 0)throw TypeError("Client was passed a null or undefined query");else if(typeof $.submit==="function"){if(Q=$.query_timeout||this.connectionParameters.query_timeout,J=G=$,typeof Y==="function")$.callback=Y}else if(Q=$.query_timeout||this.connectionParameters.query_timeout,G=new JV1($,Y,X),!G.callback){let Z,H;J=new this._Promise((z,V)=>{Z=z,H=V}).catch((z)=>{throw Error.captureStackTrace(z),z}),G.callback=(z,V)=>z?H(z):Z(V)}if(Q)K=G.callback||(()=>{}),W=setTimeout(()=>{let Z=Error("Query read timeout");process.nextTick(()=>{G.handleError(Z,this.connection)}),K(Z),G.callback=()=>{};let H=this._queryQueue.indexOf(G);if(H>-1)this._queryQueue.splice(H,1);this._pulseQueryQueue()},Q),G.callback=(Z,H)=>{clearTimeout(W),K(Z,H)};if(!this._queryable)return G.native=this.native,process.nextTick(()=>{G.handleError(Error("Client has encountered a connection error and is not queryable"))}),J;if(this._ending)return G.native=this.native,process.nextTick(()=>{G.handleError(Error("Client was closed and is not queryable"))}),J;if(this._queryQueue.length>0)Pu6();return this._queryQueue.push(G),this._pulseQueryQueue(),J};TG.prototype.end=function($){let Y=this;if(this._ending=!0,!this._connected)this.once("connect",this.end.bind(this,$));let X;if(!$)X=new this._Promise(function(G,J){$=(Q)=>Q?J(Q):G()});return this.native.end(function(){Y._connected=!1,Y._errorAllQueries(Error("Connection terminated")),process.nextTick(()=>{if(Y.emit("end"),$)$()})}),X};TG.prototype._hasActiveQuery=function(){return this._activeQuery&&this._activeQuery.state!=="error"&&this._activeQuery.state!=="end"};TG.prototype._pulseQueryQueue=function($){if(!this._connected)return;if(this._hasActiveQuery())return;let Y=this._queryQueue.shift();if(!Y){if(!$)this.emit("drain");return}this._activeQuery=Y,Y.submit(this);let X=this;Y.once("_done",function(){X._pulseQueryQueue()})};TG.prototype.cancel=function($){if(this._activeQuery===$)this.native.cancel(function(){});else if(this._queryQueue.indexOf($)!==-1)this._queryQueue.splice(this._queryQueue.indexOf($),1)};TG.prototype.ref=function(){};TG.prototype.unref=function(){};TG.prototype.setTypeParser=function($,Y,X){return this._types.setTypeParser($,Y,X)};TG.prototype.getTypeParser=function($,Y){return this._types.getTypeParser($,Y)};TG.prototype.isConnected=function(){return this._connected}});var Yz0=o((nB5,Ua)=>{var wu6=nz1(),_u6=Qx(),ju6=rH0(),Tu6=uH0(),Iu6=hq(),Cu6=tz1(),Su6=Xa(),{DatabaseError:ku6}=nH0(),{escapeIdentifier:vu6,escapeLiteral:xu6}=hq(),yu6=($)=>{return class extends Cu6{constructor(X){super(X,$)}}},WV1=function($){this.defaults=_u6,this.Client=$,this.Query=this.Client.Query,this.Pool=yu6(this.Client),this._pools=[],this.Connection=ju6,this.types=Jx(),this.DatabaseError=ku6,this.TypeOverrides=Su6,this.escapeIdentifier=vu6,this.escapeLiteral=xu6,this.Result=Tu6,this.utils=Iu6},KV1=wu6,ZV1=!1;try{ZV1=!!process.env.NODE_PG_FORCE_NATIVE}catch{}if(ZV1)KV1=Gz0();Ua.exports=new WV1(KV1);Object.defineProperty(Ua.exports,"native",{configurable:!0,enumerable:!1,get(){let $=null;try{$=new WV1(Gz0())}catch(Y){if(Y.code!=="MODULE_NOT_FOUND")throw Y}return Object.defineProperty(Ua.exports,"native",{value:$}),$}})});var UV1={};W8(UV1,{types:()=>fu6,escapeLiteral:()=>pu6,escapeIdentifier:()=>uu6,defaults:()=>lu6,default:()=>gA,TypeOverrides:()=>cu6,Result:()=>du6,Query:()=>gu6,Pool:()=>Jz0,DatabaseError:()=>mu6,Connection:()=>hu6,Client:()=>bu6});var JW,bu6,Jz0,hu6,fu6,gu6,mu6,uu6,pu6,du6,cu6,lu6,gA;var Hx=V0(()=>{JW=U6(Yz0(),1),bu6=JW.default.Client,Jz0=JW.default.Pool,hu6=JW.default.Connection,fu6=JW.default.types,gu6=JW.default.Query,mu6=JW.default.DatabaseError,uu6=JW.default.escapeIdentifier,pu6=JW.default.escapeLiteral,du6=JW.default.Result,cu6=JW.default.TypeOverrides,lu6=JW.default.defaults,gA=JW.default});var kV1=o((lM5,SV1)=>{SV1.exports={VERSION_MAJOR:6,VERSION_MINOR:10,VERSION_PATCH:0,VERSION_SUFFIX:""}});var SY=o((iM5,xV1)=>{var CF=kV1(),vV1=CF.VERSION_MAJOR+"."+CF.VERSION_MINOR+"."+CF.VERSION_PATCH+CF.VERSION_SUFFIX;xV1.exports={VERSION_MAJOR:CF.VERSION_MAJOR,VERSION_MINOR:CF.VERSION_MINOR,VERSION_PATCH:CF.VERSION_PATCH,VERSION_SUFFIX:CF.VERSION_SUFFIX,VERSION_STRING:vV1,DEFAULT_DRIVER_NAME:"node-oracledb : "+vV1,DEFAULT_ERROR_URL:"https://node-oracledb.readthedocs.io/en/latest/user_guide/installation.html",DEFAULT_MAX_SIZE_FOR_OUT_BINDS:200,CSFRM_IMPLICIT:1,CSFRM_NCHAR:2,CQN_OPCODE_ALL_OPS:0,CQN_OPCODE_ALL_ROWS:1,CQN_OPCODE_ALTER:16,CQN_OPCODE_DELETE:8,CQN_OPCODE_DROP:32,CQN_OPCODE_INSERT:2,CQN_OPCODE_UPDATE:4,DEFAULT:0,STMT_TYPE_UNKNOWN:0,STMT_TYPE_SELECT:1,STMT_TYPE_UPDATE:2,STMT_TYPE_DELETE:3,STMT_TYPE_INSERT:4,STMT_TYPE_CREATE:5,STMT_TYPE_DROP:6,STMT_TYPE_ALTER:7,STMT_TYPE_BEGIN:8,STMT_TYPE_DECLARE:9,STMT_TYPE_CALL:10,STMT_TYPE_EXPLAIN_PLAN:15,STMT_TYPE_MERGE:16,STMT_TYPE_ROLLBACK:17,STMT_TYPE_COMMIT:21,SHUTDOWN_MODE_DEFAULT:0,SHUTDOWN_MODE_TRANSACTIONAL:1,SHUTDOWN_MODE_TRANSACTIONAL_LOCAL:2,SHUTDOWN_MODE_IMMEDIATE:3,SHUTDOWN_MODE_ABORT:4,SHUTDOWN_MODE_FINAL:5,STARTUP_MODE_DEFAULT:0,STARTUP_MODE_FORCE:1,STARTUP_MODE_RESTRICT:2,SUBSCR_EVENT_TYPE_SHUTDOWN:2,SUBSCR_EVENT_TYPE_SHUTDOWN_ANY:3,SUBSCR_EVENT_TYPE_STARTUP:1,SUBSCR_EVENT_TYPE_DEREG:5,SUBSCR_EVENT_TYPE_OBJ_CHANGE:6,SUBSCR_EVENT_TYPE_QUERY_CHANGE:7,SUBSCR_EVENT_TYPE_AQ:100,SUBSCR_GROUPING_CLASS_TIME:1,SUBSCR_GROUPING_TYPE_SUMMARY:1,SUBSCR_GROUPING_TYPE_LAST:2,SUBSCR_NAMESPACE_AQ:1,SUBSCR_NAMESPACE_DBCHANGE:2,SUBSCR_QOS_BEST_EFFORT:16,SUBSCR_QOS_DEREG_NFY:2,SUBSCR_QOS_QUERY:8,SUBSCR_QOS_RELIABLE:1,SUBSCR_QOS_ROWIDS:4,SYSASM:32768,SYSBACKUP:131072,SYSDBA:2,SYSDG:262144,SYSKM:524288,SYSOPER:4,SYSPRELIM:8,SYSRAC:1048576,BIND_IN:3001,BIND_INOUT:3002,BIND_OUT:3003,OUT_FORMAT_ARRAY:4001,OUT_FORMAT_OBJECT:4002,SODA_COLL_MAP_MODE:5001,POOL_STATUS_OPEN:6000,POOL_STATUS_DRAINING:6001,POOL_STATUS_CLOSED:6002,POOL_STATUS_RECONFIGURING:6003,PURITY_DEFAULT:0,PURITY_NEW:1,PURITY_SELF:2,AQ_DEQ_NO_WAIT:0,AQ_DEQ_WAIT_FOREVER:4294967295,AQ_DEQ_MODE_BROWSE:1,AQ_DEQ_MODE_LOCKED:2,AQ_DEQ_MODE_REMOVE:3,AQ_DEQ_MODE_REMOVE_NO_DATA:4,AQ_DEQ_NAV_FIRST_MSG:1,AQ_DEQ_NAV_NEXT_TRANSACTION:2,AQ_DEQ_NAV_NEXT_MSG:3,AQ_MSG_DELIV_MODE_PERSISTENT:1,AQ_MSG_DELIV_MODE_BUFFERED:2,AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED:3,AQ_MSG_STATE_READY:0,AQ_MSG_STATE_WAITING:1,AQ_MSG_STATE_PROCESSED:2,AQ_MSG_STATE_EXPIRED:3,AQ_VISIBILITY_IMMEDIATE:1,AQ_VISIBILITY_ON_COMMIT:2,TPC_BEGIN_JOIN:2,TPC_BEGIN_NEW:1,TPC_BEGIN_PROMOTE:8,TPC_BEGIN_RESUME:4,TPC_END_NORMAL:0,TPC_END_SUSPEND:1048576,VECTOR_FORMAT_FLOAT32:2,VECTOR_FORMAT_FLOAT64:3,VECTOR_FORMAT_INT8:4,VECTOR_FORMAT_BINARY:5}});var kY=o((nM5,mV1)=>{var eH=SY(),Z9=O4(),Jp6=A0("util"),yV1=new Map,bV1=new Map,pA=new Map,Qp6=Math.pow(2,32)-1;class s8{constructor($,Y,X,G){this.num=$,this.name=Y,this.columnTypeName=X,this._bufferSizeFactor=G.bufferSizeFactor||0,this._oraTypeNum=G.oraTypeNum||0,this._csfrm=G.csfrm||0,yV1.set($,this);let J=this._csfrm*256+this._oraTypeNum;bV1.set(J,this),pA.set(X,this)}[Symbol.toPrimitive]($){switch($){case"number":return this.num;default:return this.toString()}}[Jp6.inspect.custom](){return this.toString()}toString(){return`[DbType ${this.name}]`}}function Wp6($){let Y=pA.get($);if(!Y)Z9.throwErr(Z9.ERR_UNKNOWN_COLUMN_TYPE_NAME,$);return Y}function Kp6($){let Y=yV1.get($);if(!Y)Z9.throwErr(Z9.ERR_INVALID_TYPE_NUM,$);return Y}function Zp6($,Y){let X=(Y||0)*256+$,G=bV1.get(X);if(!G)Z9.throwErr(Z9.ERR_INVALID_ORACLE_TYPE_NUM,$,Y);return G}var Oz0=new s8(2020,"DB_TYPE_BFILE","BFILE",{oraTypeNum:114,bufferSizeFactor:4000}),Oa=new s8(2008,"DB_TYPE_BINARY_DOUBLE","BINARY_DOUBLE",{oraTypeNum:101,bufferSizeFactor:8}),Ea=new s8(2007,"DB_TYPE_BINARY_FLOAT","BINARY_FLOAT",{oraTypeNum:100,bufferSizeFactor:4}),Nx=new s8(2009,"DB_TYPE_BINARY_INTEGER","BINARY_INTEGER",{oraTypeNum:3,bufferSizeFactor:22}),Ma=new s8(2019,"DB_TYPE_BLOB","BLOB",{oraTypeNum:113,bufferSizeFactor:112}),Ra=new s8(2022,"DB_TYPE_BOOLEAN","BOOLEAN",{oraTypeNum:252,bufferSizeFactor:4}),iq=new s8(2003,"DB_TYPE_CHAR","CHAR",{oraTypeNum:96,csfrm:eH.CSFRM_IMPLICIT,bufferSizeFactor:4}),nq=new s8(2017,"DB_TYPE_CLOB","CLOB",{oraTypeNum:112,csfrm:eH.CSFRM_IMPLICIT,bufferSizeFactor:112}),Ez0=new s8(2021,"DB_TYPE_CURSOR","CURSOR",{oraTypeNum:102,bufferSizeFactor:4}),qa=new s8(2011,"DB_TYPE_DATE","DATE",{oraTypeNum:12,bufferSizeFactor:7}),Mz0=new s8(2015,"DB_TYPE_INTERVAL_DS","INTERVAL DAY TO SECOND",{oraTypeNum:183,bufferSizeFactor:11}),Rz0=new s8(2016,"DB_TYPE_INTERVAL_YM","INTERVAL YEAR TO MONTH",{oraTypeNum:182,bufferSizeFactor:5}),Pa=new s8(2027,"DB_TYPE_JSON","JSON",{oraTypeNum:119}),P2=new s8(2024,"DB_TYPE_LONG","LONG",{oraTypeNum:8,csfrm:eH.CSFRM_IMPLICIT,bufferSizeFactor:2147483647}),SF=new s8(2031,"DB_TYPE_LONG_NVARCHAR","LONG",{oraTypeNum:8,csfrm:eH.CSFRM_NCHAR,bufferSizeFactor:2147483647}),kF=new s8(2025,"DB_TYPE_LONG_RAW","LONG RAW",{oraTypeNum:24,bufferSizeFactor:2147483647}),vF=new s8(2004,"DB_TYPE_NCHAR","NCHAR",{oraTypeNum:96,csfrm:eH.CSFRM_NCHAR,bufferSizeFactor:4}),wa=new s8(2018,"DB_TYPE_NCLOB","NCLOB",{oraTypeNum:112,csfrm:eH.CSFRM_NCHAR,bufferSizeFactor:112}),_a=new s8(2010,"DB_TYPE_NUMBER","NUMBER",{oraTypeNum:2,bufferSizeFactor:22}),tH=new s8(2002,"DB_TYPE_NVARCHAR","NVARCHAR2",{oraTypeNum:1,csfrm:eH.CSFRM_NCHAR,bufferSizeFactor:4}),qz0=new s8(2023,"DB_TYPE_OBJECT","OBJECT",{oraTypeNum:109}),rq=new s8(2006,"DB_TYPE_RAW","RAW",{oraTypeNum:23,bufferSizeFactor:1}),aq=new s8(2005,"DB_TYPE_ROWID","ROWID",{oraTypeNum:11,bufferSizeFactor:18}),ja=new s8(2012,"DB_TYPE_TIMESTAMP","TIMESTAMP",{oraTypeNum:180,bufferSizeFactor:11}),tU=new s8(2014,"DB_TYPE_TIMESTAMP_LTZ","TIMESTAMP WITH LOCAL TIME ZONE",{oraTypeNum:231,bufferSizeFactor:11}),xF=new s8(2013,"DB_TYPE_TIMESTAMP_TZ","TIMESTAMP WITH TIME ZONE",{oraTypeNum:181,bufferSizeFactor:13}),Ta=new s8(2030,"DB_TYPE_UROWID","UROWID",{oraTypeNum:208}),K9=new s8(2001,"DB_TYPE_VARCHAR","VARCHAR2",{oraTypeNum:1,csfrm:eH.CSFRM_IMPLICIT,bufferSizeFactor:4}),Pz0=new s8(2032,"DB_TYPE_XMLTYPE","XMLTYPE",{oraTypeNum:109,csfrm:eH.CSFRM_IMPLICIT,bufferSizeFactor:2147483647}),Ia=new s8(2033,"DB_TYPE_VECTOR","VECTOR",{oraTypeNum:127}),Up6=new Map([[Oa,new Map([[K9,K9]])],[Ea,new Map([[K9,K9]])],[Ma,new Map([[rq,kF],[kF,kF]])],[iq,new Map([[K9,K9]])],[nq,new Map([[K9,P2],[P2,P2]])],[qa,new Map([[K9,K9],[tU,tU]])],[Pa,new Map([[K9,K9]])],[P2,new Map([[K9,P2]])],[kF,new Map([[rq,kF]])],[vF,new Map([[iq,vF],[K9,tH],[tH,tH]])],[wa,new Map([[K9,SF],[tH,SF],[P2,SF],[SF,SF]])],[_a,new Map([[K9,K9]])],[tH,new Map([[iq,vF],[vF,vF],[K9,tH]])],[rq,new Map([[K9,K9]])],[aq,new Map([[K9,aq]])],[ja,new Map([[K9,K9],[tU,tU]])],[tU,new Map([[K9,K9],[xF,xF]])],[xF,new Map([[K9,K9],[tU,tU]])],[Ta,new Map([[K9,aq]])],[Ia,new Map([[K9,P2],[P2,P2],[nq,nq]])]]),Hp6=new Map([[Oz0,Oz0],[Oa,Oa],[Ea,Ea],[Nx,Nx],[Ma,Ma],[Ra,Ra],[iq,iq],[nq,nq],[Ez0,Ez0],[qa,qa],[Mz0,Mz0],[Rz0,Rz0],[Pa,Pa],[P2,P2],[SF,SF],[kF,kF],[vF,vF],[wa,wa],[_a,_a],[tH,tH],[qz0,qz0],[rq,rq],[aq,aq],[ja,ja],[tU,xF],[xF,xF],[Ta,Ta],[K9,K9],[Pz0,Pz0],[Ia,Ia]]);pA.set("PL/SQL BOOLEAN",Ra);pA.set("PL/SQL BINARY INTEGER",Nx);pA.set("PL/SQL PLS INTEGER",Nx);pA.set("TIMESTAMP WITH LOCAL TZ",tU);pA.set("TIMESTAMP WITH TZ",xF);class hV1 extends Uint8Array{toJSON(){return Buffer.from(this.buffer).toString("hex")}}class Ca{constructor($){if(this._indices=new Uint32Array(0),this._values=new Float64Array(0),this._numDimensions=0,!$)return;if(typeof $==="object"&&"numDimensions"in $&&"indices"in $&&"values"in $)this._fromObject($);else if(typeof $==="string")this._fromString($);else if(this._validDenseArray($))this._fromDense($);else Z9.throwErr(Z9.ERR_VECTOR_SPARSE_INVALID_INPUT)}_validDenseArray($){return $ instanceof Float32Array||$ instanceof Float64Array||$ instanceof Int8Array||Object.getPrototypeOf($)===Uint8Array.prototype||Array.isArray($)}static _validateLengths($,Y){if($.length!==Y.length){if(!(Y instanceof Uint8Array))Z9.throwErr(Z9.ERR_VECTOR_SPARSE_INDICES_VALUES_NOT_EQUAL)}}_updateProperties($,Y,X){if(!this._validDenseArray(X))Z9.throwErr(Z9.ERR_VECTOR_SPARSE_VALUES_IS_NOT_ARRAY);if(!(Y instanceof Uint32Array)&&!Array.isArray(Y))Z9.throwErr(Z9.ERR_VECTOR_SPARSE_INDICES_IS_NOT_ARRAY);if(Ca._validateLengths(Y,X),!(typeof $==="number"&&Number.isInteger($)&&$>0))Z9.throwErr(Z9.ERR_VECTOR_SPARSE_DIMS_IS_NOT_INTEGER);this._numDimensions=$,this._indices=Y,this._values=X,this._convertToTypedArrays()}_fromObject($){this._updateProperties($.numDimensions,$.indices,$.values)}_convertToTypedArrays(){if(!(this._indices instanceof Uint32Array)){let $=new Uint32Array(this._indices.map((Y,X)=>{if(typeof Y!=="number"||!Number.isInteger(Y))Z9.throwErr(Z9.ERR_VECTOR_SPARSE_INDICES_ELEM_IS_NOT_VALID,X);if(Y<0||Y>Qp6||Y>this.numDimensions-1)Z9.throwErr(Z9.ERR_VECTOR_SPARSE_INDICES_ELEM_IS_NOT_VALID,X);return Y}));this._indices=$}this._values=Array.isArray(this._values)?new Float64Array(this._values):this._values}_fromDense($){this._indices=[],this._values=[];for(let Y=0;Y<$.length;Y++)if($[Y]!==0)this._indices.push(Y),this._values.push($[Y]);this._numDimensions=$.length,this._convertToTypedArrays()}_fromString($){let Y;try{Y=JSON.parse($)}catch(Q){Z9.throwErr(Z9.ERR_VECTOR_SPARSE_INVALID_JSON)}if(!Array.isArray(Y)||Y.length!==3)Z9.throwErr(Z9.ERR_VECTOR_SPARSE_INVALID_STRING);let[X,G,J]=Y;this._updateProperties(X,G,J)}static create($){Ca._validateLengths($.indices,$.values);let Y=Object.create(this.prototype);return Y._numDimensions=$.numDimensions,Y._indices=$.indices,Y._values=$.values,Y}get indices(){return this._indices}get values(){return this._values}get numDimensions(){return this._numDimensions}toJSON(){return{numDimensions:this._numDimensions,indices:this._indices,values:this._values}}_createEmptyArray($,Y){if(Array.isArray($))return new Float64Array(Y);else return new $.constructor(Y)}dense(){if(this._numDimensions===0)return null;let $=this._createEmptyArray(this._values,this._numDimensions);return this._indices.forEach((Y,X)=>{$[Y]=this._values[X]}),$}}class fV1{constructor($){if($)Z9.assertParamPropInt($,1,"years"),Z9.assertParamPropInt($,1,"months");this.months=$?.months||0,this.years=$?.years||0}}class gV1{constructor($){if($)Z9.assertParamPropInt($,1,"days"),Z9.assertParamPropInt($,1,"hours"),Z9.assertParamPropInt($,1,"minutes"),Z9.assertParamPropInt($,1,"seconds"),Z9.assertParamPropInt($,1,"fseconds");this.fseconds=$?.fseconds||0,this.seconds=$?.seconds||0,this.minutes=$?.minutes||0,this.hours=$?.hours||0,this.days=$?.days||0}}mV1.exports={DbType:s8,DB_TYPE_BFILE:Oz0,DB_TYPE_BINARY_DOUBLE:Oa,DB_TYPE_BINARY_FLOAT:Ea,DB_TYPE_BINARY_INTEGER:Nx,DB_TYPE_BLOB:Ma,DB_TYPE_BOOLEAN:Ra,DB_TYPE_CHAR:iq,DB_TYPE_CLOB:nq,DB_TYPE_CURSOR:Ez0,DB_TYPE_DATE:qa,DB_TYPE_INTERVAL_DS:Mz0,DB_TYPE_INTERVAL_YM:Rz0,DB_TYPE_JSON:Pa,DB_TYPE_LONG:P2,DB_TYPE_LONG_NVARCHAR:SF,DB_TYPE_LONG_RAW:kF,DB_TYPE_NCHAR:vF,DB_TYPE_NCLOB:wa,DB_TYPE_NUMBER:_a,DB_TYPE_NVARCHAR:tH,DB_TYPE_OBJECT:qz0,DB_TYPE_RAW:rq,DB_TYPE_ROWID:aq,DB_TYPE_TIMESTAMP:ja,DB_TYPE_TIMESTAMP_LTZ:tU,DB_TYPE_TIMESTAMP_TZ:xF,DB_TYPE_UROWID:Ta,DB_TYPE_VARCHAR:K9,DB_TYPE_VECTOR:Ia,DB_TYPE_CONVERSION_MAP:Up6,DB_TYPE_FETCH_TYPE_MAP:Hp6,DB_TYPE_XMLTYPE:Pz0,getTypeByColumnTypeName:Wp6,getTypeByNum:Kp6,getTypeByOraTypeNum:Zp6,JsonId:hV1,SparseVector:Ca,IntervalYM:fV1,IntervalDS:gV1}});var Bx=o((rM5,uV1)=>{var Ax=SY();uV1.exports={TNS_VECTOR_MAGIC_BYTE:219,TNS_VECTOR_VERSION_BASE:0,TNS_VECTOR_VERSION_WITH_BINARY:1,TNS_VECTOR_VERSION_WITH_SPARSE:2,TNS_VECTOR_FLAG_NORMSRC:16,TNS_VECTOR_FLAG_NORM:2,TNS_VECTOR_FLAG_SPARSE:32,TNS_JSON_MAGIC_BYTE_1:255,TNS_JSON_MAGIC_BYTE_2:74,TNS_JSON_MAGIC_BYTE_3:90,TNS_JSON_VERSION_MAX_FNAME_255:1,TNS_JSON_VERSION_MAX_FNAME_65535:3,TNS_JSON_FLAG_HASH_ID_UINT8:256,TNS_JSON_FLAG_HASH_ID_UINT16:512,TNS_JSON_FLAG_NUM_FNAMES_UINT16:1024,TNS_JSON_FLAG_FNAMES_SEG_UINT32:2048,TNS_JSON_FLAG_TINY_NODES_STAT:8192,TNS_JSON_FLAG_TREE_SEG_UINT32:4096,TNS_JSON_FLAG_REL_OFFSET_MODE:1,TNS_JSON_FLAG_INLINE_LEAF:2,TNS_JSON_FLAG_LEN_IN_PCODE:4,TNS_JSON_FLAG_NUM_FNAMES_UINT32:8,TNS_JSON_FLAG_IS_SCALAR:16,TNS_JSON_FLAG_SEC_FNAMES_SEG_UINT16:256,TNS_JSON_TYPE_NULL:48,TNS_JSON_TYPE_TRUE:49,TNS_JSON_TYPE_FALSE:50,TNS_JSON_TYPE_STRING_LENGTH_UINT8:51,TNS_JSON_TYPE_NUMBER_LENGTH_UINT8:52,TNS_JSON_TYPE_BINARY_DOUBLE:54,TNS_JSON_TYPE_STRING_LENGTH_UINT16:55,TNS_JSON_TYPE_STRING_LENGTH_UINT32:56,TNS_JSON_TYPE_TIMESTAMP:57,TNS_JSON_TYPE_BINARY_LENGTH_UINT16:58,TNS_JSON_TYPE_BINARY_LENGTH_UINT32:59,TNS_JSON_TYPE_DATE:60,TNS_JSON_TYPE_INTERVAL_YM:61,TNS_JSON_TYPE_INTERVAL_DS:62,TNS_JSON_TYPE_TIMESTAMP_TZ:124,TNS_JSON_TYPE_TIMESTAMP7:125,TNS_JSON_TYPE_BINARY_FLOAT:127,TNS_JSON_TYPE_OBJECT:132,TNS_JSON_TYPE_ARRAY:192,TNS_JSON_TYPE_EXTENDED:123,TNS_JSON_TYPE_VECTOR:1,TNS_JSON_TYPE_ID:126,TZ_HOUR_OFFSET:20,TZ_MINUTE_OFFSET:60,TNS_MAX_SHORT_LENGTH:252,TNS_DURATION_MID:2147483648,TNS_DURATION_OFFSET:60,TNS_CHUNK_SIZE:32767,TNS_HAS_REGION_ID:128,NUMBER_MAX_DIGITS:40,BUFFER_CHUNK_SIZE:65536,CSFRM_IMPLICIT:Ax.CSFRM_IMPLICIT,VECTOR_FORMAT_FLOAT32:Ax.VECTOR_FORMAT_FLOAT32,VECTOR_FORMAT_FLOAT64:Ax.VECTOR_FORMAT_FLOAT64,VECTOR_FORMAT_INT8:Ax.VECTOR_FORMAT_INT8,VECTOR_FORMAT_BINARY:Ax.VECTOR_FORMAT_BINARY,TNS_NULL_LENGTH_INDICATOR:255,TNS_LONG_LENGTH_INDICATOR:254}});var sq=o((aM5,dV1)=>{var{Buffer:eU}=A0("buffer"),y5=Bx(),nJ=O4(),Sa=kY(),zp6=GY();class wz0{constructor($){if(typeof $==="number")this.buf=eU.alloc($),this.size=0,this.maxSize=$;else if($)this.buf=$,this.size=this.maxSize=$.length;this.pos=0}_grow($){nJ.throwErr(nJ.ERR_BUFFER_LENGTH_INSUFFICIENT,this.numBytesLeft(),$)}_readBytesWithLength($){return this.readBytes($)}_readInteger($,Y,X){let G=!1,J=this.readUInt8();if(J===0)return 0;else if(J&128){if(!Y)nJ.throwErr(nJ.ERR_UNEXPECTED_NEGATIVE_INTEGER,this.pos,this.packetNum);G=!0,J=J&127}if(J>$)nJ.throwErr(nJ.ERR_INTEGER_TOO_LARGE,J,$,this.pos,this.packetNum);if(X)this.skipBytes(J);else{let W=this.readBytes(J).readUIntBE(0,J);return G?-W:W}}numBytesLeft(){return this.size-this.pos}parseBinaryDouble($){if($=eU.from($),$[0]&128)$[0]&=127;else $[0]^=255,$[1]^=255,$[2]^=255,$[3]^=255,$[4]^=255,$[5]^=255,$[6]^=255,$[7]^=255;return $.readDoubleBE()}parseBinaryFloat($){if($=eU.from($),$[0]&128)$[0]&=127;else $[0]^=255,$[1]^=255,$[2]^=255,$[3]^=255;return $.readFloatBE()}parseOracleDate($,Y=!0){let X=0;if($.length>=11)X=Math.floor($.readUInt32BE(7)/1e6);let G=($[0]-100)*100+$[1]-100;return zp6.makeDate(Y,G,$[2],$[3],$[4]-1,$[5]-1,$[6]-1,X,0)}parseOracleIntervalYM($){let Y=$.readUInt32BE()-y5.TNS_DURATION_MID,X=$[4]-y5.TNS_DURATION_OFFSET;return new Sa.IntervalYM({years:Y,months:X})}parseOracleIntervalDS($){let Y=$.readUInt32BE()-y5.TNS_DURATION_MID,X=$.readUInt32BE(7)-y5.TNS_DURATION_MID,G=$[4]-y5.TNS_DURATION_OFFSET,J=$[5]-y5.TNS_DURATION_OFFSET,Q=$[6]-y5.TNS_DURATION_OFFSET;return new Sa.IntervalDS({days:Y,hours:G,minutes:J,seconds:Q,fseconds:X})}parseOracleNumber($){let Y=$[0],X=Boolean(Y&128);if(!X)Y=Y^255;Y-=193;let G=Y*2+2;if($.length===1){if(X)return"0";return"-1e126"}let J=$.length;if(!X&&$[$.length-1]===102)J-=1;let Q,W=[];for(let Z=1;Z<J;Z++){if(X)Q=$[Z]-1;else Q=101-$[Z];let H=Math.floor(Q/10);if(H===0&&Z===1)G-=1;else if(H===10)W.push("1"),W.push("0"),G+=1;else if(H!==0||Z>1)W.push(H.toString());if(H=Q%10,H!==0||Z<J-1)W.push(H.toString())}let K=[];if(!X)K.push("-");if(G<=0){if(K.push("."),G<0)K.push("0".repeat(-G))}for(let Z=0;Z<W.length;Z++){if(Z>0&&Z===G)K.push(".");K.push(W[Z])}if(G>W.length)for(let Z=W.length;Z<G;Z++)K.push("0");return K.join("")}readBinaryDouble(){let $=this.readBytesWithLength();if(!$)return null;return this.parseBinaryDouble($)}readBinaryFloat(){let $=this.readBytesWithLength();if(!$)return null;return this.parseBinaryFloat($)}readBinaryInteger(){let $=this.readBytesWithLength();if(!$)return 0;if($.length>4)nJ.throwErr(nJ.ERR_INTEGER_TOO_LARGE,$.length,4,this.pos,this.packetNum);return $.readIntBE(0,$.length)}readBool(){let $=this.readBytesWithLength();if(!$)return null;return $[$.length-1]===1}readBytes($){let Y=this.numBytesLeft();if($>Y)nJ.throwErr(nJ.ERR_UNEXPECTED_END_OF_DATA,$,Y);let X=this.buf.subarray(this.pos,this.pos+$);return this.pos+=$,X}readBytesAndLength(){if(this.readUB4()>0)return this.readBytesWithLength()}readBytesWithLength(){let $=this.readUInt8();if($===0||$===y5.TNS_NULL_LENGTH_INDICATOR)return null;return this._readBytesWithLength($)}readDbObject(){let $={},Y=this.readUB4();if(Y>0)$.toid=eU.from(this.readBytesWithLength());if(Y=this.readUB4(),Y>0)$.oid=eU.from(this.readBytesWithLength());if(Y=this.readUB4(),Y>0)$.snapshot=eU.from(this.readBytesWithLength());if(this.skipUB2(),Y=this.readUB4(),this.skipUB2(),Y>0)$.packedData=eU.from(this.readBytesWithLength());return $}readInt8(){return this.readBytes(1).readInt8()}readOracleDate($){let Y=this.readBytesWithLength();if(!Y)return null;return this.parseOracleDate(Y,$)}readOracleIntervalYM(){let $=this.readBytesWithLength();if(!$)return null;return this.parseOracleIntervalYM($)}readOracleIntervalDS(){let $=this.readBytesWithLength();if(!$)return null;return this.parseOracleIntervalDS($)}readOracleNumber(){let $=this.readBytesWithLength();if(!$)return null;return this.parseOracleNumber($)}readSB2(){return this._readInteger(2,!0,!1)}readSB4(){return this._readInteger(4,!0,!1)}readSB8(){return this._readInteger(8,!0,!1)}readStr($){let Y=this.readBytesWithLength();if(!Y)return null;if($===y5.CSFRM_IMPLICIT)return Y.toString();return eU.from(Y).swap16().toString("utf16le")}readStrAndLength(){let $=this.readBytesAndLength();return $?$.toString():null}readUB2(){return this._readInteger(2,!1,!1)}readUB4(){return this._readInteger(4,!1,!1)}readUB8(){return this._readInteger(8,!1,!1)}readUInt8(){return this.readBytes(1)[0]}readUInt16BE(){return this.readBytes(2).readUInt16BE()}readUInt16LE(){return this.readBytes(2).readUInt16LE()}readUInt32BE(){return this.readBytes(4).readUInt32BE()}reserveBytes($){if($>this.numBytesLeft())this._grow(this.pos+$);let Y=this.pos;return this.pos+=$,Y}skipBytes($){if($>this.numBytesLeft())nJ.throwErr(nJ.ERR_UNEXPECTED_END_OF_DATA);this.pos+=$}skipSB4(){return this._readInteger(4,!0,!0)}skipUB1(){this.skipBytes(1)}skipUB2(){return this._readInteger(2,!1,!0)}skipUB4(){return this._readInteger(4,!1,!0)}skipUB8(){return this._readInteger(8,!1,!0)}writeBinaryDouble($,Y){if(!Y)Y=this.reserveBytes(8);if(this.buf.writeDoubleBE($,Y),(this.buf[Y]&128)===0)this.buf[Y]|=128;else this.buf[Y]^=255,this.buf[Y+1]^=255,this.buf[Y+2]^=255,this.buf[Y+3]^=255,this.buf[Y+4]^=255,this.buf[Y+5]^=255,this.buf[Y+6]^=255,this.buf[Y+7]^=255}writeBinaryFloat($,Y){if(!Y)Y=this.reserveBytes(4);if(this.buf.writeFloatBE($,Y),(this.buf[Y]&128)===0)this.buf[Y]|=128;else this.buf[Y]^=255,this.buf[Y+1]^=255,this.buf[Y+2]^=255,this.buf[Y+3]^=255}writeBytes($){let Y=0,X=$.length;while(X>0){let G=this.numBytesLeft();if(G===0)this._grow(this.pos+X);let J=Math.min(G,X);$.copy(this.buf,this.pos,Y,Y+J),this.pos+=J,Y+=J,X-=J}}_writeRawBytesAndLength($,Y){if(Y<=y5.TNS_MAX_SHORT_LENGTH){if(this.writeUInt8(Y),Y>0)this.writeBytes($)}else{let X=0;this.writeUInt8(y5.TNS_LONG_LENGTH_INDICATOR);while(Y>0){let G=Math.min(Y,y5.BUFFER_CHUNK_SIZE);this.writeUB4(G),this.writeBytes($.subarray(X,X+G)),Y-=G,X+=G}this.writeUB4(0)}}writeBytesWithLength($){let Y=$.length;this._writeRawBytesAndLength($,Y)}writeDbObject($){if(this.writeUB4($.toid.length),this.writeBytesWithLength($.toid),$.oid)this.writeUB4($.oid.length),this.writeBytesWithLength($.oid);else this.writeUB4(0);this.writeUB4(0),this.writeUB4(0);let Y=$._getPackedData();this.writeUB4(Y.length),this.writeUB4($.flags),this.writeBytesWithLength(Y)}writeOracleDate($,Y,X=!0){let G,J=Y._bufferSizeFactor;if(J>7){if(G=$.getUTCMilliseconds()*1000*1000,G===0&&J<=11)J=7}if(X)this.writeUInt8(J);let Q=this.reserveBytes(J);if(Y===Sa.DB_TYPE_DATE||Y==Sa.DB_TYPE_TIMESTAMP){let W=$.getFullYear();this.buf[Q]=Math.trunc(W/100)+100,this.buf[Q+1]=W%100+100,this.buf[Q+2]=$.getMonth()+1,this.buf[Q+3]=$.getDate(),this.buf[Q+4]=$.getHours()+1,this.buf[Q+5]=$.getMinutes()+1,this.buf[Q+6]=$.getSeconds()+1}else{let W=$.getUTCFullYear();this.buf[Q]=Math.trunc(W/100)+100,this.buf[Q+1]=W%100+100,this.buf[Q+2]=$.getUTCMonth()+1,this.buf[Q+3]=$.getUTCDate(),this.buf[Q+4]=$.getUTCHours()+1,this.buf[Q+5]=$.getUTCMinutes()+1,this.buf[Q+6]=$.getUTCSeconds()+1}if(J>7){if(this.buf.writeInt32BE(G,Q+7),J>11)this.buf[Q+11]=y5.TZ_HOUR_OFFSET,this.buf[Q+12]=y5.TZ_MINUTE_OFFSET}}writeOracleIntervalYM($,Y=!0){if(Y)this.writeUInt8(5);this.writeUInt32BE($.years+y5.TNS_DURATION_MID),this.writeUInt8($.months+y5.TNS_DURATION_OFFSET)}writeOracleIntervalDS($,Y=!0){if(Y)this.writeUInt8(11);this.writeUInt32BE($.days+y5.TNS_DURATION_MID),this.writeUInt8($.hours+y5.TNS_DURATION_OFFSET),this.writeUInt8($.minutes+y5.TNS_DURATION_OFFSET),this.writeUInt8($.seconds+y5.TNS_DURATION_OFFSET),this.writeUInt32BE($.fseconds+y5.TNS_DURATION_MID)}writeOracleNumber($){let Y=!1;if($[0]==="-")Y=!0,$=$.substring(1);let X=0,G=$.indexOf("e");if(G>0)X=Number($.substring(G+1)),$=$.substring(0,G);let J=$.indexOf(".");if(J>0)X-=$.length-J-1,$=$.substring(0,J)+$.substring(J+1);if($[0]==="0")$=$.replace(/^0+/,"");if($.length>0&&$[$.length-1]==="0"){let H=$.replace(/0+$/,"");X+=$.length-H.length,$=H}if($.length>y5.NUMBER_MAX_DIGITS||X>=126||X<=-131)nJ.throwErr(nJ.ERR_ORACLE_NUMBER_NO_REPR);if(X>0&&X%2===1||X<0&&X%2===-1)X--,$+="0";if($.length%2===1)$="0"+$;let Q=Y&&$.length<y5.NUMBER_MAX_DIGITS,W=$.length/2,K=(X+$.length)/2+192;if(Y)K=K^255;else if($.length===0&&X===0)K=128;let Z=this.reserveBytes(W+2+Q);this.buf[Z++]=W+1+Q,this.buf[Z++]=K;for(let H=0;H<$.length;H+=2){let z=Number($.substring(H,H+2));if(Y)this.buf[Z++]=101-z;else this.buf[Z++]=z+1}if(Q)this.buf[Z]=102}writeStr($){this.writeBytes(eU.from($))}writeInt32BE($){let Y=this.reserveBytes(4);this.buf.writeInt32BE($,Y)}writeSB4($){let Y=0;if($<0)$=-$,Y=128;if($===0)this.writeUInt8(0);else if($<=255)this.writeUInt8(1|Y),this.writeUInt8($);else if($<=65535)this.writeUInt8(2|Y),this.writeUInt16BE($);else this.writeUInt8(4|Y),this.writeUInt32BE($)}writeUB4($){if($===0)this.writeUInt8(0);else if($<=255)this.writeUInt8(1),this.writeUInt8($);else if($<=65535)this.writeUInt8(2),this.writeUInt16BE($);else this.writeUInt8(4),this.writeUInt32BE($)}writeUB2($){if($===0)this.writeUInt8(0);else if($<=255)this.writeUInt8(1),this.writeUInt8($);else this.writeUInt8(2),this.writeUInt16BE($)}writeUB8($){if($===0)this.writeUInt8(0);else if($<=255)this.writeUInt8(1),this.writeUInt8($);else if($<=65535)this.writeUInt8(2),this.writeUInt16BE($);else if($<=4294967295)this.writeUInt8(4),this.writeUInt32BE($);else this.writeUInt8(8),this.writeUInt64BE($)}writeUInt8($){let Y=this.reserveBytes(1);this.buf[Y]=$}writeSB1($){let Y=this.reserveBytes(1);this.buf[Y]=$}writeUInt16BE($){let Y=this.reserveBytes(2);this.buf.writeUInt16BE($,Y)}writeUInt32BE($){let Y=this.reserveBytes(4);this.buf.writeUInt32BE($,Y)}writeUInt64BE($){let Y=this.reserveBytes(8);this.buf.writeUInt32BE(0,Y),this.buf.writeUInt32BE($,Y+4)}writeUInt16LE($){let Y=this.reserveBytes(2);this.buf.writeUInt16LE($,Y)}}class pV1 extends wz0{constructor($){if($)super($);else{super(y5.BUFFER_CHUNK_SIZE);this.size=this.maxSize}}_grow($){let Y=$%y5.BUFFER_CHUNK_SIZE;if(Y>0)$+=y5.BUFFER_CHUNK_SIZE-Y;let X=eU.allocUnsafe($);this.buf.copy(X),this.buf=X,this.maxSize=this.size=$}}dV1.exports={BaseBuffer:wz0,GrowableBuffer:pV1}});var ka=o((sM5,iV1)=>{var{BaseBuffer:Vp6,GrowableBuffer:Fp6}=sq(),{Buffer:Lp6}=A0("buffer"),I$=Bx(),oq=O4(),_z0=kY();class cV1 extends Vp6{decode(){let $=this.readUInt8();if($!=I$.TNS_VECTOR_MAGIC_BYTE)oq.throwErr(oq.ERR_UNEXPECTED_DATA,Lp6.from([$]).toString("hex"));let Y=this.readUInt8();if(Y>I$.TNS_VECTOR_VERSION_WITH_SPARSE)oq.throwErr(oq.ERR_VECTOR_VERSION_NOT_SUPPORTED,Y);let X=this.readUInt16BE(),G=this.readUInt8(),J=this.readUInt32BE(),Q,W,K;if(G===I$.VECTOR_FORMAT_BINARY||X&I$.TNS_VECTOR_FLAG_NORM)this.skipBytes(8);let Z;if(X&I$.TNS_VECTOR_FLAG_SPARSE){Z=!0,K={},K.numDimensions=J,J=this.readUInt16BE(),K.indices=new Uint32Array(J);for(let z=0;z<J;z++)K.indices[z]=this.readUInt32BE()}if(G===I$.VECTOR_FORMAT_FLOAT32)Q=4,W=new Float32Array(J);else if(G===I$.VECTOR_FORMAT_FLOAT64)Q=8,W=new Float64Array(J);else if(G===I$.VECTOR_FORMAT_INT8)Q=1,W=new Int8Array(J);else if(G===I$.VECTOR_FORMAT_BINARY)Q=1,J=J/8,W=new Uint8Array(J);else oq.throwErr(oq.ERR_VECTOR_FORMAT_NOT_SUPPORTED,G);if(Z)K.values=W;let H;for(let z=0;z<J;z++){let V=this.readBytes(Q);if(G===I$.VECTOR_FORMAT_FLOAT32)H=this.parseBinaryFloat(V);else if(G===I$.VECTOR_FORMAT_FLOAT64)H=this.parseBinaryDouble(V);else H=V[0];W[z]=H}return Z?_z0.SparseVector.create(K):W}}class lV1 extends Fp6{_updateVectorHeader($,Y){let X=I$.TNS_VECTOR_FLAG_NORMSRC|I$.TNS_VECTOR_FLAG_NORM,G=$.length,J=I$.TNS_VECTOR_VERSION_BASE,Q=I$.VECTOR_FORMAT_FLOAT32,W=this.writeBinaryFloat.bind(this);if(Array.isArray($)||$ instanceof Float64Array)Q=I$.VECTOR_FORMAT_FLOAT64,W=this.writeBinaryDouble.bind(this);else if($ instanceof Int8Array)Q=I$.VECTOR_FORMAT_INT8,W=this.writeSB1.bind(this);else if($.constructor.name==="Uint8Array")Q=I$.VECTOR_FORMAT_BINARY,G=G*8,J=I$.TNS_VECTOR_VERSION_WITH_BINARY,X=I$.TNS_VECTOR_FLAG_NORMSRC,W=this.writeUInt8.bind(this);if(Y&&Y instanceof _z0.SparseVector)J=I$.TNS_VECTOR_VERSION_WITH_SPARSE,G=Y.numDimensions,X|=I$.TNS_VECTOR_FLAG_SPARSE;return this.writeUInt8(I$.TNS_VECTOR_MAGIC_BYTE),this.writeUInt8(J),this.writeUInt16BE(X),this.writeUInt8(Q),this.writeUInt32BE(G),this.reserveBytes(8),W}encode($){let Y;if($ instanceof _z0.SparseVector){Y=this._updateVectorHeader($.values,$);let X=$.indices.length;this.writeUInt16BE(X),$.indices.forEach((G)=>{this.writeUInt32BE(G)}),$=$.values}else Y=this._updateVectorHeader($);return $.forEach((X)=>{Y(X)}),this.buf.subarray(0,this.pos)}}iV1.exports={VectorDecoder:cV1,VectorEncoder:lV1}});var w2=o((oM5,aV1)=>{var Dp6=SY(),va=O4(),b6=kY(),Np6=GY(),nV1=ka();class rV1{constructor(){this.autoCommit=!1,this.connectionClass="",this.dbObjectAsPojo=!1,this.edition="",this.errorOnConcurrentExecute=!1,this.events=!1,this.externalAuth=!1,this.fetchArraySize=100,this.fetchAsBuffer=[],this.fetchAsString=[],this.lobPrefetchSize=16384,this.maxRows=0,this.outFormat=Dp6.OUT_FORMAT_ARRAY,this.poolIncrement=1,this.poolMax=4,this.poolMaxPerShard=0,this.poolMin=0,this.poolPingInterval=60,this.poolPingTimeout=5000,this.poolTimeout=60,this.prefetchRows=2,this.queueTimeout=60000,this.queueMax=500,this.stmtCacheSize=30,this.configProviderCacheTimeout=86400,this.thin=!0,this.thinDriverInitialized=!1,this.createFetchTypeMap(this.fetchAsString,this.fetchAsBuffer),this.fetchTypeHandler=void 0,this.dbObjectTypeHandler=void 0,this._JsonId=b6.JsonId,this._SparseVector=b6.SparseVector,this._IntervalYM=b6.IntervalYM,this._IntervalDS=b6.IntervalDS}_getDateComponents($,Y){if($)return[Y.getFullYear(),Y.getMonth()+1,Y.getDate(),Y.getHours(),Y.getMinutes(),Y.getSeconds(),Y.getMilliseconds()*1000*1000];else return[Y.getUTCFullYear(),Y.getUTCMonth()+1,Y.getUTCDate(),Y.getUTCHours(),Y.getUTCMinutes(),Y.getUTCSeconds(),Y.getUTCMilliseconds()*1000*1000]}_makeDate($,Y,X,G,J,Q,W,K,Z){return Np6.makeDate($,Y,X,G,J,Q,W,K,Z)}_decodeVector($){return new nV1.VectorDecoder($).decode()}_encodeVector($){return new nV1.VectorEncoder().encode($)}addToOptions($){for(let Y=1;Y<arguments.length;Y++){let X=arguments[Y];if($[X]===void 0)$[X]=this[X]}}createFetchTypeMap($,Y){let X=new Map(b6.DB_TYPE_FETCH_TYPE_MAP);for(let G of $)switch(G){case b6.DB_TYPE_NUMBER:X.set(b6.DB_TYPE_BINARY_DOUBLE,b6.DB_TYPE_VARCHAR),X.set(b6.DB_TYPE_BINARY_FLOAT,b6.DB_TYPE_VARCHAR),X.set(b6.DB_TYPE_BINARY_INTEGER,b6.DB_TYPE_VARCHAR),X.set(b6.DB_TYPE_NUMBER,b6.DB_TYPE_VARCHAR);break;case b6.DB_TYPE_TIMESTAMP:X.set(b6.DB_TYPE_DATE,b6.DB_TYPE_VARCHAR),X.set(b6.DB_TYPE_TIMESTAMP,b6.DB_TYPE_VARCHAR),X.set(b6.DB_TYPE_TIMESTAMP_TZ,b6.DB_TYPE_VARCHAR),X.set(b6.DB_TYPE_TIMESTAMP_LTZ,b6.DB_TYPE_VARCHAR);break;case b6.DB_TYPE_CLOB:case b6.DB_TYPE_NCLOB:X.set(b6.DB_TYPE_CLOB,b6.DB_TYPE_LONG),X.set(b6.DB_TYPE_NCLOB,b6.DB_TYPE_LONG_NVARCHAR);break;case b6.DB_TYPE_VECTOR:X.set(b6.DB_TYPE_VECTOR,b6.DB_TYPE_LONG);break;case b6.DB_TYPE_RAW:X.set(b6.DB_TYPE_RAW,b6.DB_TYPE_VARCHAR);break;case b6.DB_TYPE_JSON:X.set(b6.DB_TYPE_JSON,b6.DB_TYPE_VARCHAR);break;default:va.throwErr(va.ERR_INVALID_TYPE_FOR_CONVERSION)}for(let G of Y)switch(G){case b6.DB_TYPE_BLOB:X.set(b6.DB_TYPE_BLOB,b6.DB_TYPE_LONG_RAW);break;default:va.throwErr(va.ERR_INVALID_TYPE_FOR_CONVERSION)}this.fetchTypeMap=X}}aV1.exports=new rV1});var O4=o((tM5,sV1)=>{var Ap6=A0("util"),Bp6=[1,1400,1438,2290,2291,2292,21525,40479],L6=new Map;L6.set("DPI-1010",3);L6.set("DPI-1024",[132,"at index ([0-9]+) does"]);L6.set("DPI-1044",115);L6.set("DPI-1055",105);L6.set("DPI-1063",95);L6.set("DPI-1067",[123,"call timeout of ([0-9]+) ms"]);L6.set("DPI-1080",500);L6.set("OCI-22303",[129,'type "([^"]*"."[^"]*)"']);L6.set("OCI-22164",133);L6.set("OCI-22165",[131,/index \[([0-9]+)\] must be in the range of \[([0-9]+)\] to \[([0-9]+)\]/]);L6.set("ORA-00022",500);L6.set("ORA-00028",500);L6.set("ORA-00031",500);L6.set("ORA-00045",500);L6.set("ORA-00378",500);L6.set("ORA-00600",500);L6.set("ORA-00602",500);L6.set("ORA-00603",500);L6.set("ORA-00609",500);L6.set("ORA-01012",500);L6.set("ORA-01041",500);L6.set("ORA-01043",500);L6.set("ORA-01089",500);L6.set("ORA-01092",500);L6.set("ORA-02396",500);L6.set("ORA-03113",500);L6.set("ORA-03114",500);L6.set("ORA-03122",500);L6.set("ORA-03135",500);L6.set("ORA-12153",500);L6.set("ORA-12537",500);L6.set("ORA-12547",500);L6.set("ORA-12570",500);L6.set("ORA-12583",500);L6.set("ORA-27146",500);L6.set("ORA-28511",500);L6.set("ORA-56600",500);L6.set("ORA-24338",107);L6.set("ORA-25708",87);L6.set("ORA-24344",700);L6.set("ORA-26202",172);L6.set("ORA-26211",170);L6.set("ORA-26216",171);L6.set("DPI-1071",174);var u0=new Map;u0.set(2,"invalid pool");u0.set(3,"invalid or closed connection");u0.set(4,'invalid value for property "%s"');u0.set(5,"invalid value for parameter %d");u0.set(7,'invalid value for "%s" in parameter %d');u0.set(9,"invalid number of function parameters: %d provided but expected between %d and %d");u0.set(10,"unsupported data type %d in column %d");u0.set(11,"encountered bind value and type mismatch");u0.set(12,"encountered invalid bind data type in parameter %d");u0.set(13,"invalid bind direction");u0.set(15,"type was not specified for conversion");u0.set(16,"buffer is too small for OUT binds");u0.set(17,"concurrent operations on ResultSet are not allowed");u0.set(18,"invalid ResultSet");u0.set(19,"ResultSet cannot be returned for non-query statements");u0.set(21,"invalid type for conversion specified");u0.set(22,"invalid Lob");u0.set(23,"concurrent operations on a Lob are not allowed");u0.set(24,"memory allocation failed");u0.set(34,"data type is unsupported for array bind");u0.set(35,"maxArraySize is required for IN OUT array bind");u0.set(36,'length of given array is greater than "maxArraySize"');u0.set(37,'invalid data type at array index %d for bind ":%s"');u0.set(40,'connection request timeout. Request exceeded "queueTimeout" of %d');u0.set(41,"cannot convert ResultSet to QueryStream after invoking methods");u0.set(42,"cannot invoke ResultSet methods after converting to QueryStream");u0.set(43,"ResultSet already converted to QueryStream");u0.set(44,'bind object must contain one of the following attributes: "dir", "type", "maxSize", or "val"');u0.set(45,"cannot load a node-oracledb Thick mode binary for Node.js. Please try using Thin mode. %s");u0.set(46,'pool alias "%s" already exists in the connection pool cache');u0.set(47,'pool alias "%s" not found in connection pool cache');u0.set(52,"invalid data type at array index %d for bind position %d");u0.set(55,"binding by position and name cannot be mixed");u0.set(56,"maxSize for bind position %d must be specified and be greater than zero");u0.set(57,'maxSize for bind "%s" must be specified and greater than zero');u0.set(58,"maxSize of %d is too small for value of length %d in row %d");u0.set(59,"type must be specified for bind position %d");u0.set(60,'type must be specified for bind "%s"');u0.set(61,"invalid subscription");u0.set(62,"subscription notification callback missing");u0.set(63,"subscription notification SQL missing");u0.set(64,"connection pool is closing");u0.set(65,"connection pool was closed");u0.set(66,"invalid SODA document cursor");u0.set(67,"a pre-built node-oracledb Thick mode binary was not found for %s");u0.set(68,"invalid error number %d supplied");u0.set(69,"node-oracledb %s requires Node.js %s or later");u0.set(70,"message must be a string, buffer, database object or an object containing a payload property which itself is a string, buffer or database object");u0.set(75,'only one of "connectString" and "connectionString" can be used');u0.set(76,'connection request rejected. Pool queue length "queueMax" %d reached');u0.set(78,"unsupported data type %d in JSON value");u0.set(80,'only one of "user" and "username" can be used');u0.set(81,"concurrent operations on a connection are disabled");u0.set(82,"connection pool is being reconfigured");u0.set(83,"pool statistics are not enabled");u0.set(84,"invalid access token");u0.set(85,'invalid connection pool configuration with token-based authentication. The "homogeneous" and "externalAuth" attributes must be set to true');u0.set(86,'invalid standalone configuration with token-based authentication. The "externalAuth" attribute must be set to true');u0.set(87,"access token has expired");u0.set(89,"%s is not supported by node-oracledb in Thin mode");u0.set(90,"initOracleClient() was already called with different arguments");u0.set(91,"file %s is missing");u0.set(92,'"poolMax" %d must be greater than or equal to "poolMin" %d');u0.set(95,'setting "batchErrors" or "dmlRowCounts" to true is only permitted for DML statements');u0.set(97,'no bind placeholder named ":%s" was found in the statement text');u0.set(98,"%d bind placeholders were used in the SQL statement but %d bind values were provided");u0.set(99,"internal error: buffer of length %d insufficient to hold %d bytes");u0.set(100,"national character set id %d is not supported by node-oracledb in Thin mode");u0.set(101,"no credentials specified");u0.set(102,"unexpected end of data: want %d bytes but only %d bytes are available");u0.set(103,"unexpected message type %d received at position %d of packet %d");u0.set(104,"connection pool cannot be closed because connections are busy");u0.set(105,"value is not a number (NaN) and cannot be used in Oracle Database numbers");u0.set(106,"internal error: %s");u0.set(107,"invalid cursor");u0.set(109,"invalid type number %d");u0.set(110,"invalid Oracle type number %d [csfrm: %d]");u0.set(111,"internal error: read a negative integer when expecting a positive integer at position %d of packet %d");u0.set(112,"internal error: read integer of length %d when expecting integer of no more than length %d at position %d of packet %d");u0.set(113,"unexpected data received: %s");u0.set(114,"OSON field names may not exceed %d UTF-8 encoded bytes");u0.set(115,"value cannot be represented as an Oracle Database number");u0.set(116,"password verifier type 0x%s is not supported by node-oracledb in Thin mode");u0.set(118,"node-oracledb Thick mode cannot be enabled because a Thin mode connection has already been created");u0.set(119,"conversion from type %s to type %s is not supported");u0.set(120,"fetchTypeHandler return value must be an object");u0.set(121,'fetchTypeHandler return value attribute "type" must be a valid database type');u0.set(122,'fetchTypeHandler return value attribute "converter" must be a function');u0.set(123,"call timeout of %d ms exceeded");u0.set(125,'"connectString" cannot be empty or undefined. Bequeath connections are not supported in Thin mode');u0.set(126,"OSON version %s is not supported");u0.set(127,"internal error: unknown server side piggyback opcode %s");u0.set(128,'internal error: unknown column type name "%s"');u0.set(129,'invalid object type name: "%s"');u0.set(130,"Oracle TDS data type %d is not supported");u0.set(131,"given index [%d] must be in the range of [%d] to [%d]");u0.set(132,"element at index %d does not exist");u0.set(133,"cannot delete elements of a VARRAY");u0.set(134,"value is of wrong type for attribute %s of object %s");u0.set(135,"value is of wrong type for an element of object %s");u0.set(136,"user name and password cannot be set when using external authentication");u0.set(137,'a bind variable replacement value for placeholder ":%s" was not provided');u0.set(138,"connections to this database server version are not supported by node-oracledb in Thin mode");u0.set(139,"unexpected XML type with flag %d");u0.set(140,"user name must be enclosed in [] when using external authentication with a proxy user");u0.set(141,"the number of batch errors from executemany() exceeds 65535");u0.set(142,"value too large for attribute %s of object %s (actual: %d, maximum: %d)");u0.set(143,"value too large for element %d of object %s (actual: %d, maximum: %d)");u0.set(144,"VECTOR format %d is not supported");u0.set(145,"VECTOR version %d is not supported");u0.set(146,"object %s is not a collection");u0.set(147,"cursor has been closed by the database");u0.set(149,'the bind variable placeholder "%s" cannot be used both before and after the RETURNING clause in a DML RETURNING statement');u0.set(150,"invalid flags for tpcBegin() in Two Phase Commit");u0.set(151,"invalid flags for tpcEnd() in Two Phase Commit");u0.set(152,"internal error: unknown transaction state {state} in Two Phase Commit");u0.set(153,"size of the transaction ID must be non-zero and must not exceed 64. Its current size is %d.");u0.set(154,"size of the branch ID is %d and cannot exceed 64");u0.set(155,"operation is not supported on BFILE LOBs");u0.set(156,"operation is only supported on BFILE LOBs");u0.set(157,"executeMany() cannot be used with SELECT statement or WITH SQL clause");u0.set(158,"SPARSE VECTOR indices is not Uint32Array or an Array");u0.set(159,"SPARSE VECTOR values is not an Array");u0.set(160,"SPARSE VECTOR dimensions is not an Positive Integer");u0.set(161,"SPARSE VECTOR indices and values must be of same length");u0.set(162,"SPARSE VECTOR string data is not valid JSON");u0.set(163,"SPARSE VECTOR string data Array should have exactly 3 elements");u0.set(164,"SPARSE VECTOR Invalid Input Data");u0.set(165,"SPARSE VECTOR indices element at index %d is not valid");u0.set(166,'DBFetchTypeHandler return value attribute "converter" must be a function');u0.set(167,"DBFetchTypeHandler return value must be an object");u0.set(168,"access token function failed.");u0.set(169,"External function call failed.");u0.set(170,"Different ways to start or suspend sessionless transactions are being used(server procedures and client APIs)");u0.set(171,"Suspend, commit or rollback the currently active sessionless transaction before beginning or resuming another one.");u0.set(172,"No sessionless transaction is active");u0.set(173,"Invalid server response to connection request");u0.set(174,"Payload cannot be enqueued since it does not match the payload type supported by the queue");u0.set(500,"connection to Oracle Database was closed or broken");u0.set(501,`connection to host %s port %d terminated unexpectedly. (CONNECTION_ID=%s)
%s`);u0.set(503,`connection to host %s port %d could not be established. (CONNECTION_ID=%s)
%s`);u0.set(504,`connection establishment through a web proxy at host %s port %d failed. (CONNECTION_ID=%s)
%s`);u0.set(505,`unable to initiate TLS connection. Please check if wallet credentials are valid
%s`);u0.set(506,`connection to host %s port %d encountered TLS handshake failure. (CONNECTION_ID=%s)
%s`);u0.set(507,"TLS detected an invalid certificate. Server DN in certificate does not match the specified DN");u0.set(508,"TLS detected an invalid certificate. %s not present in certificate");u0.set(509,"internal error: invalid packet type or malformed packet received");u0.set(510,'connection to host %s port %d timed out. Request exceeded "%s" of %d seconds. (CONNECTION_ID=%s)');u0.set(511,`connection to listener at host %s port %d was refused. (CONNECTION_ID=%s)
Cause: %s`);u0.set(512,`invalid connection string parameters.
%s`);u0.set(513,"error received through in-band notification: %s");u0.set(514,"syntax error in connection string");u0.set(515,"error in Easy Connect connection string: %s: %s");u0.set(516,"no configuration directory set or available to search for tnsnames.ora");u0.set(517,'cannot connect to Oracle Database. Unable to find "%s" in "%s"');u0.set(518,'cannot connect to Oracle Database. Service "%s" is not registered with the listener at host %s port %s. (CONNECTION_ID=%s)');u0.set(519,'cannot connect to Oracle Database. SID "%s" is not registered with the listener at host %s port %s. (CONNECTION_ID=%s)');u0.set(520,"cannot connect to Oracle Database. File tnsnames.ora not found in %s");u0.set(521,"connection to host %s port %d received end-of-file on communication channel. (CONNECTION_ID=%s)");u0.set(523,`Failed to retrieve configuration from Centralized Configuration Provider:
 %s`);u0.set(524,"%s Configuration provider plugin not registered. Please register the hook function for the same");u0.set(529,"Invalid wallet content format. Supported format is PEM");u0.set(530,"The host addresses or URLs provided by the connect string are incorrect or unresolvable in your network.");u0.set(531,"Error in Advanced Networking Option packet received from the server");u0.set(532,"%s service recieved status failure");u0.set(533,`Advanced Networking Option service negotiation failed. Native Network Encryption and DataIntegrity only supported in node-oracledb thick mode.
Cause: ORA-%s`);u0.set(534,`Error during data compression/decompression: %s
`);u0.set(535,`Parameter does not have a valid type: %s
`);u0.set(700,"creation succeeded with compilation errors");function Ox($){if(!$){let Y=Array.prototype.slice.call(arguments,1);jz0(...Y)}}function Op6($,Y,X){Ox($.length>=Y&&$.length<=X,9,$.length,Y,X)}function Ep6($,Y,X){if($[X]!==void 0)dA(typeof $[X]==="boolean",Y,X)}function Mp6($,Y,X){if($[X]!==void 0)dA(typeof $[X]==="function",Y,X)}function Rp6($,Y,X){if($[X]!==void 0)dA(Number.isInteger($[X]),Y,X)}function qp6($,Y,X){if($[X]!==void 0)dA(Number.isInteger($[X])&&$[X]>=0,Y,X)}function Pp6($,Y,X){if($[X]!==void 0)dA(Number.isInteger($[X])&&$[X]>0,Y,X)}function wp6($,Y,X){if($[X]!==void 0)dA(typeof $[X]==="string",Y,X)}function dA($,Y,X){Ox($,7,X,Y)}function _p6($,Y){Ox($,5,Y)}function jp6($,Y){Ox($,4,Y)}function tq($){let Y=u0.get($),X=[...arguments];if(!Y)X=[void 0,$],$=68,Y=u0.get($);let J=`NJS-${$.toString().padStart(3,"0")}`;X[0]=`${J}: ${Y}`;let Q=Error(Ap6.format(...X));return Q.code=J,Q.isRecoverable=$===500,Error.captureStackTrace(Q,tq),Q}function jz0(){throw tq(...arguments)}function Tp6(){let $=tq(...arguments),Y=$.message.indexOf("ORA-"),X=$.message.substring(Y+4,Y+9);throw $.message=$.message+`
Help: https://docs.oracle.com/error-help/db/ora-`+X,$}function Ip6($){jz0(89,$)}function Cp6($,Y){if(!$.code){let X=$.message.indexOf(":");if(X>0){$.code=$.message.substr(0,X);let G=w2();if($.errorNum&&G.thin)$.message+=`
Help: https://docs.oracle.com/error-help/db/ora-${$.errorNum.toString().padStart(5,"0")}/`;if(L6.has($.code)){let J=[],Q,W=L6.get($.code);if(typeof W==="number")Q=W;else{Q=W[0];let Z=W[1],H=$.message.match(Z);if(H)J=H.slice(1)}let K=tq(Q,...J);$.code=K.code,$.message=K.message+`
`+$.message}}}if($.requiresStackCapture)delete $.requiresStackCapture,Error.captureStackTrace($,Y);return $}function Sp6($,Y){let X=tq(Y);throw X.stack=$.stack,X}sV1.exports={ERR_INTEGRITY_ERROR_CODES:Bp6,ERR_INVALID_POOL:2,ERR_INVALID_CONNECTION:3,ERR_INVALID_PROPERTY_VALUE:4,ERR_INVALID_PARAMETER_VALUE:5,ERR_INVALID_PROPERTY_VALUE_IN_PARAM:7,ERR_INVALID_NUMBER_OF_PARAMETERS:9,ERR_UNSUPPORTED_DATA_TYPE:10,ERR_BIND_VALUE_AND_TYPE_MISMATCH:11,ERR_INVALID_BIND_DATA_TYPE:12,ERR_INVALID_BIND_DIRECTION:13,ERR_NO_TYPE_FOR_CONVERSION:15,ERR_INSUFFICIENT_BUFFER_FOR_BINDS:16,ERR_BUSY_RS:17,ERR_INVALID_RS:18,ERR_NOT_A_QUERY:19,ERR_INVALID_TYPE_FOR_CONVERSION:21,ERR_INVALID_LOB:22,ERR_BUSY_LOB:23,ERR_INSUFFICIENT_MEMORY:24,ERR_INVALID_TYPE_FOR_ARRAY_BIND:34,ERR_REQUIRED_MAX_ARRAY_SIZE:35,ERR_INVALID_ARRAY_SIZE:36,ERR_INCOMPATIBLE_TYPE_ARRAY_BIND:37,ERR_CONN_REQUEST_TIMEOUT:40,ERR_CANNOT_CONVERT_RS_TO_STREAM:41,ERR_CANNOT_INVOKE_RS_METHODS:42,ERR_RS_ALREADY_CONVERTED:43,ERR_INVALID_BIND_UNIT:44,ERR_CANNOT_LOAD_BINARY:45,ERR_POOL_WITH_ALIAS_ALREADY_EXISTS:46,ERR_POOL_WITH_ALIAS_NOT_FOUND:47,ERR_INCOMPATIBLE_TYPE_ARRAY_INDEX_BIND:52,ERR_MIXED_BIND:55,ERR_MISSING_MAX_SIZE_BY_POS:56,ERR_MISSING_MAX_SIZE_BY_NAME:57,ERR_MAX_SIZE_TOO_SMALL:58,ERR_MISSING_TYPE_BY_POS:59,ERR_MISSING_TYPE_BY_NAME:60,ERR_INVALID_SUBSCR:61,ERR_MISSING_SUBSCR_CALLBACK:62,ERR_MISSING_SUBSCR_SQL:63,ERR_POOL_CLOSING:64,ERR_POOL_CLOSED:65,ERR_INVALID_SODA_DOC_CURSOR:66,ERR_NO_BINARY_AVAILABLE:67,ERR_INVALID_ERR_NUM:68,ERR_NODE_TOO_OLD:69,ERR_INVALID_AQ_MESSAGE:70,ERR_DBL_CONNECT_STRING:75,ERR_QUEUE_MAX_EXCEEDED:76,ERR_UNSUPPORTED_DATA_TYPE_IN_JSON:78,ERR_DBL_USER:80,ERR_CONCURRENT_OPS:81,ERR_POOL_RECONFIGURING:82,ERR_POOL_STATISTICS_DISABLED:83,ERR_TOKEN_BASED_AUTH:84,ERR_POOL_TOKEN_BASED_AUTH:85,ERR_CONN_TOKEN_BASED_AUTH:86,ERR_TOKEN_HAS_EXPIRED:87,ERR_NOT_IMPLEMENTED:89,ERR_INIT_ORACLE_CLIENT_ARGS:90,ERR_MISSING_FILE:91,ERR_INVALID_NUMBER_OF_CONNECTIONS:92,ERR_EXEC_MODE_ONLY_FOR_DML:95,ERR_CONNECTION_CLOSED:500,ERR_CONNECTION_LOSTCONTACT:501,ERR_CONNECTION_INCOMPLETE:503,ERR_PROXY_CONNECTION_FAILURE:504,ERR_TLS_INIT_FAILURE:505,ERR_TLS_AUTH_FAILURE:506,ERR_TLS_DNMATCH_FAILURE:507,ERR_TLS_HOSTMATCH_FAILURE:508,ERR_INVALID_PACKET:509,ERR_CONNECTION_TIMEDOUT:510,ERR_CONNECTION_REFUSED:511,ERR_INVALID_CONNECT_STRING_PARAMETERS:512,ERR_CONNECTION_INBAND:513,ERR_INVALID_CONNECT_STRING_SYNTAX:514,ERR_INVALID_EZCONNECT_SYNTAX:515,ERR_NO_CONFIG_DIR:516,ERR_TNS_ENTRY_NOT_FOUND:517,ERR_CONNECTION_EOF:521,ERR_CONFIG_PROVIDER_FAILED_TO_RETRIEVE_CONFIG:523,ERR_CONFIG_PROVIDER_PARAM_TYPE:535,ERR_REGISTER_HOOKFN_CONFIGPROVIDER:524,ERR_DATA_COMPRESSION:534,ERR_WALLET_TYPE_NOT_SUPPORTED:529,ERR_HOST_NOT_FOUND:530,ERR_ANO_PACKET:531,ERR_ANO_STATUS:532,ERR_ANO_NEGOTIATION:533,ERR_INVALID_BIND_NAME:97,ERR_WRONG_NUMBER_OF_BINDS:98,ERR_BUFFER_LENGTH_INSUFFICIENT:99,ERR_NCHAR_CS_NOT_SUPPORTED:100,ERR_MISSING_CREDENTIALS:101,ERR_UNEXPECTED_END_OF_DATA:102,ERR_UNEXPECTED_MESSAGE_TYPE:103,ERR_POOL_HAS_BUSY_CONNECTIONS:104,ERR_INTERNAL:106,ERR_INVALID_REF_CURSOR:107,ERR_UNSUPPORTED_VERIFIER_TYPE:116,ERR_NAN_VALUE:105,ERR_ORACLE_NUMBER_NO_REPR:115,ERR_INVALID_SERVICE_NAME:518,ERR_INVALID_SID:519,ERR_TNS_NAMES_FILE_MISSING:520,ERR_INVALID_TYPE_NUM:109,ERR_INVALID_ORACLE_TYPE_NUM:110,ERR_UNEXPECTED_NEGATIVE_INTEGER:111,ERR_INTEGER_TOO_LARGE:112,ERR_UNEXPECTED_DATA:113,ERR_OSON_FIELD_NAME_LIMITATION:114,ERR_OSON_VERSION_NOT_SUPPORTED:126,ERR_THIN_CONNECTION_ALREADY_CREATED:118,ERR_UNSUPPORTED_CONVERSION:119,ERR_FETCH_TYPE_HANDLER_RETURN_VALUE:120,ERR_FETCH_TYPE_HANDLER_TYPE:121,ERR_FETCH_TYPE_HANDLER_CONVERTER:122,ERR_CALL_TIMEOUT_EXCEEDED:123,ERR_EMPTY_CONNECT_STRING:125,ERR_UNKOWN_SERVER_SIDE_PIGGYBACK:127,ERR_UNKNOWN_COLUMN_TYPE_NAME:128,ERR_INVALID_OBJECT_TYPE_NAME:129,ERR_TDS_TYPE_NOT_SUPPORTED:130,ERR_INVALID_COLL_INDEX_SET:131,ERR_INVALID_COLL_INDEX_GET:132,ERR_DELETE_ELEMENTS_OF_VARRAY:133,ERR_WRONG_VALUE_FOR_DBOBJECT_ATTR:134,ERR_WRONG_VALUE_FOR_DBOBJECT_ELEM:135,ERR_WRONG_CRED_FOR_EXTAUTH:136,ERR_MISSING_BIND_VALUE:137,ERR_SERVER_VERSION_NOT_SUPPORTED:138,ERR_UNEXPECTED_XML_TYPE:139,ERR_WRONG_USER_FORMAT_EXTAUTH_PROXY:140,ERR_TOO_MANY_BATCH_ERRORS:141,ERR_WRONG_LENGTH_FOR_DBOBJECT_ATTR:142,ERR_WRONG_LENGTH_FOR_DBOBJECT_ELEM:143,ERR_VECTOR_FORMAT_NOT_SUPPORTED:144,ERR_VECTOR_VERSION_NOT_SUPPORTED:145,ERR_OBJECT_IS_NOT_A_COLLECTION:146,ERR_CURSOR_HAS_BEEN_CLOSED:147,ERR_DML_RETURNING_DUP_BINDS:149,ERR_INVALID_TPC_BEGIN_FLAGS:150,ERR_INVALID_TPC_END_FLAGS:151,ERR_UNKNOWN_TRANSACTION_STATE:152,ERR_INVALID_TRANSACTION_SIZE:153,ERR_INVALID_BRANCH_SIZE:154,ERR_SESSIONLESS_DIFFERING_METHODS:170,ERR_SESSIONLESS_ALREADY_ACTIVE:171,ERR_SESSIONLESS_INACTIVE:172,ERR_INVALID_SERVER_RESPONSE:173,ERR_PAYLOAD_CANNOT_BE_ENQUEUED:174,ERR_CONNECTION_CLOSED_CODE:"NJS-500",ERR_OPERATION_NOT_SUPPORTED_ON_BFILE:155,ERR_OPERATION_ONLY_SUPPORTED_ON_BFILE:156,ERR_EXECMANY_NOT_ALLOWED_ON_QUERIES:157,ERR_VECTOR_SPARSE_INDICES_IS_NOT_ARRAY:158,ERR_VECTOR_SPARSE_VALUES_IS_NOT_ARRAY:159,ERR_VECTOR_SPARSE_DIMS_IS_NOT_INTEGER:160,ERR_VECTOR_SPARSE_INDICES_VALUES_NOT_EQUAL:161,ERR_VECTOR_SPARSE_INVALID_JSON:162,ERR_VECTOR_SPARSE_INVALID_STRING:163,ERR_VECTOR_SPARSE_INVALID_INPUT:164,ERR_VECTOR_SPARSE_INDICES_ELEM_IS_NOT_VALID:165,ERR_DB_FETCH_TYPE_HANDLER_CONVERTER:166,ERR_DB_FETCH_TYPE_HANDLER_RETURN_VALUE:167,ERR_ACCESS_TOKEN:168,ERR_CALLOUT_FN:169,WRN_COMPILATION_CREATE:700,assert:Ox,assertArgCount:Op6,assertParamPropBool:Ep6,assertParamPropFunction:Mp6,assertParamPropInt:Rp6,assertParamPropString:wp6,assertParamPropUnsignedInt:qp6,assertParamPropUnsignedIntNonZero:Pp6,assertParamPropValue:dA,assertParamValue:_p6,assertPropValue:jp6,getErr:tq,throwErr:jz0,throwErrWithORAError:Tp6,throwNotImplemented:Ip6,transformErr:Cp6,throwWrapErr:Sp6}});var xa=o((eM5,tV1)=>{class oV1{constructor(){this._config={}}isEnabled(){return this._config.enable}enable(){this._config.enable=!0}disable(){this._config.enable=!1}onEnterFn(){}onExitFn(){}onBeginRoundTrip(){}onEndRoundTrip(){}}var Tz0;function kp6($){Tz0=$}function vp6(){return Tz0}function xp6(){return Tz0?.isEnabled()}tV1.exports={TraceHandlerBase:oV1,setTraceInstance:kp6,getTraceInstance:vp6,isEnabled:xp6}});var eV1=o(($R5,yp6)=>{yp6.exports={name:"oracledb",version:"6.10.0",description:"A Node.js module for Oracle Database access from JavaScript and TypeScript",license:"(Apache-2.0 OR UPL-1.0)",homepage:"http://oracle.github.io/node-oracledb/",keywords:["Oracle","Database","official","DB","SQL","JSON","PL/SQL","SODA","OCI","API","client","library","driver","add-on","extension","binding","interface","adapter","module"],repository:{type:"git",url:"git://github.com/oracle/node-oracledb.git"},scripts:{install:"node package/install.js",prune:"node package/prunebinaries.js"},engines:{node:">=14.17"},maintainers:[{name:"Oracle Corp."}],bugs:{url:"https://github.com/oracle/node-oracledb/issues"},main:"./index.js"}});var GY=o((YR5,ZF1)=>{var{Buffer:$3}=A0("buffer"),H$=O4(),rJ=A0("process"),bp6=A0("util"),$F1=kY(),$z=SY(),Ex=xa(),hp6=A0("crypto"),fp6=["-----BEGIN CERTIFICATE-----","-----BEGIN PUBLIC KEY-----","-----BEGIN PRIVATE KEY-----","-----BEGIN RSA PRIVATE KEY-----","-----BEGIN DSA PRIVATE KEY-----","-----BEGIN EC PRIVATE KEY-----","-----BEGIN ENCRYPTED PRIVATE KEY-----"],gp6=["-----END CERTIFICATE-----","-----END PUBLIC KEY-----","-----END PRIVATE KEY-----","-----END RSA PRIVATE KEY-----","-----END DSA PRIVATE KEY-----","-----END EC PRIVATE KEY-----","-----END ENCRYPTED PRIVATE KEY-----"],mp6=new Set(["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","<",">","/","\\",",",".",":",";","'",'"',"-","_","$","+","*","#","&","!","%","?","@"]),YF1;try{YF1=eV1()}catch($){H$.throwErr(H$.ERR_MISSING_FILE,"package.json")}var XF1=YF1.version,up6="build/Release",pp6="oracledb-"+XF1+"-"+rJ.platform+"-"+rJ.arch+".node",dp6="oracledb.node",cp6="package/Staging";function lp6($,Y,X){H$.assertParamPropString($,Y,X);let G=KF1($[X]);H$.assertParamPropValue($[X]===G,Y,X)}function GF1(){return"Node-oracledb installation instructions: https://node-oracledb.readthedocs.io/en/latest/user_guide/installation.html"}function ip6($){return $=$.trim(),fp6.some((Y)=>$.includes(Y))&&gp6.some((Y)=>$.endsWith(Y))}function np6(){let $,Y,X=GF1()+`
`;if(rJ.platform==="linux"){if(rJ.arch==="x64")Y=`https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html
`,$="64-bit";else if(rJ.arch==="x32")Y=`https://www.oracle.com/database/technologies/instant-client/linux-x86-32-downloads.html
`,$="32-bit";else Y=`https://www.oracle.com/database/technologies/instant-client.html
`,$=rJ.arch;X+="You must have Linux "+$+` Oracle Client libraries configured with ldconfig, or in LD_LIBRARY_PATH.
`,X+=`If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from 
`,X+=Y}else if(rJ.platform==="darwin"){if(rJ.arch==="x64")Y=`https://www.oracle.com/database/technologies/instant-client/macos-intel-x86-downloads.html
`,$="64-bit";else Y=`https://www.oracle.com/database/technologies/instant-client.html
`,$=rJ.arch;X+="You must have macOS "+$+` Oracle Instant Client Basic or Basic Light package libraries in
`,X+=`/usr/local/lib or set by calling oracledb.initOracleClient({libDir: "/my/instant_client_directory"}).
`,X+="Oracle Instant Client can be downloaded from "+Y}else if(rJ.platform==="win32"){if(rJ.arch==="x64")Y=`https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html
`,$="64-bit";else if(rJ.arch==="x32")Y=`https://www.oracle.com/database/technologies/instant-client/microsoft-windows-32-downloads.html
`,$="32-bit";else Y=`https://www.oracle.com/database/technologies/instant-client.html
`,$=rJ.arch;X+="You must have Windows "+$+` Oracle Client libraries in your PATH environment variable.
`,X+=`If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from
`,X+=Y,X+=`A Microsoft Visual Studio Redistributable suitable for your Oracle client library version must be available.
`}else Y=`https://www.oracle.com/database/technologies/instant-client.html
`,X+="You must have "+rJ.arch+` Oracle Client libraries in your operating system library search path.
`,X+=`If you do not have Oracle Database on this computer, then install an Instant Client Basic or Basic Light package from: 
`,X+=Y;return X}function rp6($){return`${this.constructor.name==="Object"?"oracledb":`oracledb.${this.constructor.name}`}.${$}`}function ap6($){if(!Ex.isEnabled())return;if(this._impl)this._impl._callLevelTraceData={};$.additionalConfig={},$.additionalConfig.self=this,$.additionalConfig.args=$.args,$.operation=rp6.call(this,$.fn.name),$.connectLevelConfig=this._impl?._getConnectTraceConfig(),Ex.getTraceInstance().onEnterFn($)}function sp6($,Y,X){if(!Ex.isEnabled())return;if($.error=X,$.additionalConfig.result=Y,this._impl)$.callLevelConfig=this._impl._callLevelTraceData;if(["oracledb.getConnection","oracledb.createPool"].includes($.operation))if(X){if($.args&&$.args.length>=1){let J={},Q=$.args[0];J.user=Q.user||Q.username,J.connectString=Q.connectString||Q.connectionString,$.connectLevelConfig=J}}else $.connectLevelConfig=Y._impl._getConnectTraceConfig();else if($.operation==="oracledb.Pool.getConnection"){if(!X)$.connectLevelConfig=Y._impl._getConnectTraceConfig()}if(Ex.getTraceInstance().onExitFn($),this._impl)this._impl._callLevelTraceData=void 0}function JF1($){let Y=function(){if(typeof arguments[arguments.length-1]!=="function")return $.apply(this,arguments);let X=Array.prototype.slice.call(arguments,0,arguments.length-1),G=arguments[arguments.length-1];$.apply(this,X).then(function(J){G(null,J)},G)};if($.name)Object.defineProperty(Y,"name",{value:$.name});return Y}function QF1($,Y,X){let G=async function J(){let Q,W=Ex.isEnabled(),K={fn:$,args:arguments};if(X){if(this._isActive)H$.throwErr(X);this._isActive=!0}if(Y&&this._impl)Q=this._impl._getConnImpl(),await Q._acquireLock();let Z,H;try{if(W)ap6.call(this,K);return Z=await K.fn.apply(this,arguments),Z}catch(z){throw H=H$.transformErr(z,J),H}finally{if(Q)Q._releaseLock();if(X)this._isActive=!1;if(W)sp6.call(this,K,Z,H)}};if($.name)Object.defineProperty(G,"name",{value:$.name});return G}function op6($){let Y=1,X=!0,G;if(typeof arguments[1]==="number")Y++,G=arguments[1];else if(typeof arguments[1]==="boolean")Y++,X=arguments[1];for(let J=Y;J<arguments.length;J++){let Q=arguments[J],W=$[Q];$[Q]=JF1(QF1(W,X,G))}}function tp6($){if(!Array.isArray($))return!1;for(let Y=0;Y<$.length;Y++)if(typeof $[Y]!=="string")return!1;return!0}function WF1($){return $!==null&&typeof $==="object"}function ep6($){return $!==null&&typeof $==="object"||Array.isArray($)}function $d6($){if($&$z.SYSPRELIM)$=$^$z.SYSPRELIM;return $===$z.SYSASM||$===$z.SYSBACKUP||$===$z.SYSDBA||$===$z.SYSDG||$===$z.SYSKM||$===$z.SYSOPER||$===$z.SYSRAC}function Yd6($){if(!Array.isArray($))return!1;for(let Y=0;Y<$.length;Y++){let X=$[Y];if(!(typeof X==="string"||typeof X==="number"||$3.isBuffer(X)||bp6.types.isDate(X)))return!1}return!0}function Xd6($){if(!Array.isArray($))return!1;for(let Y=0;Y<$.length;Y++){let X=$[Y];if(!Array.isArray(X)||X.length!==3)return!1;for(let G=0;G<3;G++)if(typeof X[G]!=="string")return!1}return!0}function Gd6($){return WF1($)&&Number.isInteger($.formatId)&&($3.isBuffer($.globalTransactionId)||typeof $.globalTransactionId==="string")&&($3.isBuffer($.branchQualifier)||typeof $.branchQualifier==="string")}function Jd6($){let Y;if($3.isBuffer($.globalTransactionId)&&$3.isBuffer($.branchQualifier))Y=$;else{if(Y={formatId:$.formatId,globalTransactionId:$.globalTransactionId,branchQualifier:$.branchQualifier},typeof $.globalTransactionId==="string")Y.globalTransactionId=$3.from($.globalTransactionId);if(typeof $.branchQualifier==="string")Y.branchQualifier=$3.from($.branchQualifier)}if(Y.globalTransactionId.length>64)H$.throwErr(H$.ERR_INVALID_TRANSACTION_SIZE,Y.globalTransactionId.length);if(Y.branchQualifier.length>64)H$.throwErr(H$.ERR_INVALID_BRANCH_SIZE,Y.branchQualifier.length);return Y}function Qd6($){return $3.isBuffer($)||typeof $==="string"}function Wd6($){let Y=$;if(Y===void 0)Y=hp6.randomUUID();if(typeof Y==="string"){Y=$3.from(Y);let X=Y.length;if(X===0||X>64)H$.throwErr(H$.ERR_INVALID_TRANSACTION_SIZE,X)}return Y}function Iz0($){if(H$.assert(typeof $==="string",H$.ERR_TOKEN_BASED_AUTH),$.split(".")[1]===void 0)H$.throwErr(H$.ERR_TOKEN_BASED_AUTH);let X=$.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),J=$3.from(X,"base64").toString("ascii"),Q=JSON.parse(J).exp;return H$.assert(Q!=null,H$.ERR_TOKEN_BASED_AUTH),Q=Q*1000,new Date().getTime()>Q}function Kd6($){switch(typeof $){case"string":if($==="")H$.throwErr(H$.ERR_TOKEN_BASED_AUTH);return!Iz0($);case"object":if($.token===void 0||$.token===""||$.privateKey===void 0||$.privateKey==="")H$.throwErr(H$.ERR_TOKEN_BASED_AUTH);return!Iz0($.token);default:H$.throwErr(H$.ERR_TOKEN_BASED_AUTH)}}function Zd6($){return $=$.replace(/\n/g,""),$=$.replace("-----BEGIN PRIVATE KEY-----",""),$=$.replace("-----END PRIVATE KEY-----",""),$}function Ud6($,Y){let X=Y+"Class",G=Y+"Name",J=$[X],Q=$[Y];if(typeof Q==="number")Q=$[Y]=$F1.getTypeByNum(Q);if(J)$[G]=J.prototype.fqn;else if(Q)$[G]=Q.columnTypeName}function Hd6($){return $ instanceof Float32Array||$ instanceof Float64Array||$ instanceof Int8Array||Object.getPrototypeOf($)===Uint8Array.prototype||$ instanceof $F1.SparseVector}function zd6($,Y,X,G,J,Q,W,K,Z){if($)return new Date(Y,X-1,G,J,Q,W,K);return new Date(Date.UTC(Y,X-1,G,J,Q,W,K)-Z*60000)}function KF1($){let Y=$.split("");if(Y[0]==="'"||Y[0]==='"')Y=Y.splice(1);if(Y[Y.length-1]==="'"||Y[Y.length-1]==='"')Y.pop();for(let X=0;X<Y.length;X++)if(!mp6.has(Y[X]))Y[X]="?";if(Y[Y.length-1]==="\\")Y[Y.length-1]="?";return Y.join("")}ZF1.exports={BINARY_FILE:pp6,BUILD_FILE:dp6,PACKAGE_JSON_VERSION:XF1,RELEASE_DIR:up6,STAGING_DIR:cp6,addTypeProperties:Ud6,assertParamPropNetworkName:lp6,callbackify:JF1,denormalizePrivateKey:Zd6,getInstallURL:GF1,getInstallHelp:np6,isArrayOfStrings:tp6,isObject:WF1,isObjectOrArray:ep6,isPrivilege:$d6,isShardingKey:Yd6,isAppContext:Xd6,isTokenExpired:Iz0,isTokenValid:Kd6,isTransactionId:Qd6,isVectorValue:Hd6,isXid:Gd6,normalizeTransactionId:Wd6,normalizeXid:Jd6,makeDate:zd6,sanitize:KF1,wrapFn:QF1,wrapFns:op6,isPemFile:ip6}});var zF1=o((XR5,HF1)=>{var JY=O4();class UF1{getCondition(){JY.throwNotImplemented("getting condition (dequeue options)")}getConsumerName(){JY.throwNotImplemented("getting consumer name (dequeue options)")}getCorrelation(){JY.throwNotImplemented("getting correlation (dequeue options)")}getMode(){JY.throwNotImplemented("getting mode (dequeue options)")}getMsgId(){JY.throwNotImplemented("getting message id (dequeue options)")}getNavigation(){JY.throwNotImplemented("getting navigation (dequeue options)")}getTransformation(){JY.throwNotImplemented("getting transformation (dequeue options)")}getVisibility(){JY.throwNotImplemented("getting visibility (dequeue options)")}getWait(){JY.throwNotImplemented("getting wait (dequeue options)")}setCondition(){JY.throwNotImplemented("setting condition (dequeue options)")}setConsumerName(){JY.throwNotImplemented("setting consumer name (dequeue options)")}setCorrelation(){JY.throwNotImplemented("setting correlation (dequeue options)")}setDeliveryMode(){JY.throwNotImplemented("setting deliveryMode (dequeue options)")}setMode(){JY.throwNotImplemented("setting mode (dequeue options)")}setMsgId(){JY.throwNotImplemented("setting message id (dequeue options)")}setNavigation(){JY.throwNotImplemented("setting navigation (dequeue options)")}setTransformation(){JY.throwNotImplemented("setting transformation (dequeue options)")}setVisibility(){JY.throwNotImplemented("setting visibility (dequeue options)")}setWait(){JY.throwNotImplemented("setting wait (dequeue options)")}}HF1.exports=UF1});var LF1=o((GR5,FF1)=>{var eq=O4();class VF1{getDeliveryMode(){eq.throwNotImplemented("getting delivery mode (enqueue options)")}getTransformation(){eq.throwNotImplemented("getting transformation (enqueue options)")}getVisibility(){eq.throwNotImplemented("getting visibility (enqueue options)")}setDeliveryMode(){eq.throwNotImplemented("setting delivery mode (enqueue options)")}setTransformation(){eq.throwNotImplemented("setting transformation (enqueue options)")}setVisibility(){eq.throwNotImplemented("setting visibility (enqueue options)")}}FF1.exports=VF1});var AF1=o((JR5,NF1)=>{var mK=O4();class DF1{getCorrelation(){mK.throwNotImplemented("getting correlation (message)")}getDelay(){mK.throwNotImplemented("getting delay (message)")}getDeliveryMode(){mK.throwNotImplemented("getting delivery mode (message)")}getExceptionQueue(){mK.throwNotImplemented("getting exception queue (message)")}getExpiration(){mK.throwNotImplemented("getting expiration (message)")}getMsgId(){mK.throwNotImplemented("getting message id (message)")}getNumAttempts(){mK.throwNotImplemented("getting number of attempts (message)")}getOriginalMsgId(){mK.throwNotImplemented("getting original message id (message)")}getPayload(){mK.throwNotImplemented("getting payload (message)")}getPriority(){mK.throwNotImplemented("getting priority (message)")}getState(){mK.throwNotImplemented("getting state (message)")}}NF1.exports=DF1});var yF=o((QR5,OF1)=>{class BF1{_getConnectTraceConfig(){let $=this._getConnImpl();if($)return $._getConnectTraceConfig()}}OF1.exports=BF1});var RF1=o((WR5,MF1)=>{var ya=O4(),Vd6=yF();class EF1 extends Vd6{_getConnImpl(){return this._connection}deqMany(){ya.throwNotImplemented("dequeuing multiple items from a queue")}deqOne(){ya.throwNotImplemented("dequeuing a single item from a queue")}enqMany(){ya.throwNotImplemented("enqueuing multiple items from a queue")}enqOne(){ya.throwNotImplemented("enqueuing a single item from a queue")}}MF1.exports=EF1});var ba=o((KR5,PF1)=>{var QW=O4();class qF1{constructor($){this._objType=$}append(){QW.throwNotImplemented("appending element to collection")}copy(){QW.throwNotImplemented("copying an object")}deleteElement(){QW.throwNotImplemented("deleting an element from a collection")}getElement(){QW.throwNotImplemented("getting an element from a collection")}getFirstIndex(){QW.throwNotImplemented("getting the first index in a collection")}getKeys(){QW.throwNotImplemented("returning the keys of a collection")}getLastIndex(){QW.throwNotImplemented("getting the last index in a collection")}getNextIndex(){QW.throwNotImplemented("getting the next index in a collection")}getPrevIndex(){QW.throwNotImplemented("getting the previous index in a collection")}getValues(){QW.throwNotImplemented("getting the values in a collection")}hasElement(){QW.throwNotImplemented("getting if value exists in a collection")}setElement(){QW.throwNotImplemented("setting an element in a collection")}trim(){QW.throwNotImplemented("trimming elements from a collection")}}PF1.exports=qF1});var ha=o((ZR5,jF1)=>{var wF1=w2(),x4=O4(),Fd6=A0("util");class _F1{constructor(){this._inProgress=!1,this._dbObjectTypes=new Map,this._requestQueue=[],this._osonMaxFieldNameSize=255}async _acquireLock(){if(this._inProgress){if(wF1.errorOnConcurrentExecute)x4.throwErr(x4.ERR_CONCURRENT_OPS);await new Promise(($,Y)=>{let X={resolve:$,reject:Y};this._requestQueue.push(X)})}this._inProgress=!0}_getConnImpl(){return this}_getConnectTraceConfig(){let $;if(this._pool)$=this._pool._getConnectTraceConfig();else $={connectString:this._connectString,user:this._user};if($.serviceName=this.getServiceName(),$.instanceName=this.getInstanceName(),$.pdbName=this.getDbName(),wF1.thin)$.hostName=this.getHostName(),$.port=this.getPort(),$.protocol=this.getProtocol();return $}_getDbObjectType($,Y,X,G){let J;if(G){if(J=this._dbObjectTypes.get(G),J)return J}let Q=X?`${$}.${X}.${Y}`:`${$}.${Y}`;if(J=this._dbObjectTypes.get(Q),!J)J={oid:G,fqn:Q,schema:$,name:Y,packageName:X,partial:!0,isXmlType:$==="SYS"&&Y==="XMLTYPE"},this._dbObjectTypes.set(Q,J);if(G&&!J.oid)J.oid=G,this._dbObjectTypes.set(G,J);return J}_isDate($){return Fd6.types.isDate($)}_releaseLock(){if(this._requestQueue.length>0)this._requestQueue.shift().resolve();else this._inProgress=!1}breakExecution(){x4.throwNotImplemented("getting Oracle Server version number")}changePassword(){x4.throwNotImplemented("changing the password")}close(){x4.throwNotImplemented("closing the connection")}commit(){x4.throwNotImplemented("committing the transaction")}createLob(){x4.throwNotImplemented("creating a temporary LOB")}execute(){x4.throwNotImplemented("executing a SQL statement")}executeMany(){x4.throwNotImplemented("executing a SQL statement multiple times")}getCallTimeout(){x4.throwNotImplemented("getting call timeout")}getCurrentSchema(){x4.throwNotImplemented("getting current schema")}getDbDomain(){x4.throwNotImplemented("getting db domain")}getDbName(){x4.throwNotImplemented("getting db name")}getDbObjectClass(){x4.throwNotImplemented("getting a database object class")}getExternalName(){x4.throwNotImplemented("getting the external name")}getInstanceName(){x4.throwNotImplemented("getting the Oracle Database instance name.")}getInternalName(){x4.throwNotImplemented("getting the internal name")}getLTXID(){x4.throwNotImplemented("getting the logical transaction id")}getMaxIdentifierLength(){x4.throwNotImplemented("getting the maximum identifier length")}getMaxOpenCursors(){x4.throwNotImplemented("getting max open cursors")}getOracleServerVersion(){x4.throwNotImplemented("getting Oracle Server version number")}getOracleServerVersionString(){x4.throwNotImplemented("getting Oracle Server version as a string")}getQueue(){x4.throwNotImplemented("getting a queue")}getServiceName(){x4.throwNotImplemented("getting service name")}getSodaDatabase(){x4.throwNotImplemented("getting a SODA database")}getStatementInfo(){x4.throwNotImplemented("getting information about a statement")}getStmtCacheSize(){x4.throwNotImplemented("getting the statement cache size")}getTag(){x4.throwNotImplemented("getting the tag for the connection")}getTransactionInProgress(){x4.throwNotImplemented("getting the status of an active transaction on the connection")}getWarning(){x4.throwNotImplemented("getting information about warning")}isHealthy(){x4.throwNotImplemented("getting the health of the connection")}isCompressionEnabled(){x4.throwNotImplemented("getting the data compression status on the connection")}ping(){x4.throwNotImplemented("sending a ping to the database")}rollback(){x4.throwNotImplemented("rolling back a transaction")}setAction(){x4.throwNotImplemented("setting end-to-end attribute 'action'")}setCallTimeout(){x4.throwNotImplemented("setting call timeout")}setClientId(){x4.throwNotImplemented("setting end-to-end attribute 'clientId'")}setClientInfo(){x4.throwNotImplemented("setting end-to-end attribute 'clientInfo'")}setCurrentSchema(){x4.throwNotImplemented("setting the current schema")}setDbOp(){x4.throwNotImplemented("setting end-to-end attribute 'dbOp'")}setECID(){x4.throwNotImplemented("setting end-to-end attribute 'ecid'")}setExternalName(){x4.throwNotImplemented("setting the external name")}setInternalName(){x4.throwNotImplemented("setting the internal name")}setStmtCacheSize(){x4.throwNotImplemented("setting the size of the statement cache")}setModule(){x4.throwNotImplemented("setting end-to-end attribute 'module'")}setTag(){x4.throwNotImplemented("setting the tag for the connection")}shutdown(){x4.throwNotImplemented("shutting down the database instance")}startup(){x4.throwNotImplemented("starting up the database instance")}subscribe(){x4.throwNotImplemented("subscribing to events in the database")}tpcBegin(){x4.throwNotImplemented("starting a two-phase transaction")}tpcCommit(){x4.throwNotImplemented("committing a two-phase transaction")}tpcEnd(){x4.throwNotImplemented("ending a two-phase transaction")}tpcForget(){x4.throwNotImplemented("forgetting a two-phase transaction")}tpcPrepare(){x4.throwNotImplemented("preparing a two-phase transaction")}tpcRollback(){x4.throwNotImplemented("rolling back a two-phase transaction")}unsubscribe(){x4.throwNotImplemented("unsubscribing from events")}getHostName(){x4.throwNotImplemented("getting HostName")}getPort(){x4.throwNotImplemented("getting Port")}getProtocol(){x4.throwNotImplemented("getting Protocol")}}jF1.exports=_F1});var Cz0=o((UR5,IF1)=>{var Ld6=ha(),cA=O4(),Dd6=yF();class TF1 extends Dd6{_getConnImpl(){let $=this._parentObj;while(!($ instanceof Ld6))$=$._parentObj;return $}close(){cA.throwNotImplemented("closing a LOB")}fileExists(){cA.throwNotImplemented("check if BFILE exists")}getData(){cA.throwNotImplemented("getting all of the data from a LOB")}getDirFileName(){cA.throwNotImplemented("getting directory and filename of LOB(BFILE)")}read(){cA.throwNotImplemented("reading from a LOB")}setDirFileName(){cA.throwNotImplemented("setting directory and filename of LOB(BFILE)")}write(){cA.throwNotImplemented("writing to a LOB")}}IF1.exports=TF1});var Sz0=o((HR5,kF1)=>{var QY=O4(),CF1=GY();class SF1{async _accessTokenHandler($,Y,X,G){let J;try{let Q=$(X,G);if(Q instanceof Promise)Q=await Q;if(!CF1.isTokenValid(Q))QY.throwErr(QY.ERR_TOKEN_HAS_EXPIRED);if(typeof Q==="object"&&Q.privateKey!==void 0)Q.privateKey=CF1.denormalizePrivateKey(Q.privateKey);J=Q}finally{this.returnAccessToken(Y,J)}}close(){QY.throwNotImplemented("closing the pool")}create(){QY.throwNotImplemented("creating the pool")}getConnection(){QY.throwNotImplemented("getting a connection from the pool")}getConnectionsInUse(){QY.throwNotImplemented("getting num connection in use")}getConnectionsOpen(){QY.throwNotImplemented("getting num connection open")}getPoolIncrement(){QY.throwNotImplemented("getting the pool increment")}getPoolMax(){QY.throwNotImplemented("getting the pool max")}getPoolMaxPerShard(){QY.throwNotImplemented("getting the pool max per shard")}getPoolMin(){QY.throwNotImplemented("getting the pool min")}getPoolPingInterval(){QY.throwNotImplemented("getting the pool ping interval")}getPoolPingTimeout(){QY.throwNotImplemented("getting the pool ping Timeout")}getPoolTimeout(){QY.throwNotImplemented("getting the pool timeout")}getMaxLifetimeSession(){QY.throwNotImplemented("getting the pool max lifetime")}getStmtCacheSize(){QY.throwNotImplemented("getting the pool statement cache size")}_getConnectTraceConfig(){return{connectString:this._connectString,user:this._user,poolMin:this.getPoolMin(),poolMax:this.getPoolMax(),poolIncrement:this.getPoolIncrement()}}getSodaMetaDataCache(){QY.throwNotImplemented("getting the SODA metadata cache flag")}reconfigure(){QY.throwNotImplemented("reconfiguring the pool")}setAccessToken(){QY.throwNotImplemented("sets the access token")}}kF1.exports=SF1});var kz0=o((zR5,xF1)=>{var Nd6=O4();class vF1{constructor(){this._featureFlags={},this._featureFlags.oldJsonColumnAsObj=!1}get oldJsonColumnAsObj(){return this._featureFlags.oldJsonColumnAsObj}set oldJsonColumnAsObj($){Nd6.assertPropValue(typeof $==="boolean","oldJsonColumnAsObj"),this._featureFlags.oldJsonColumnAsObj=$}}xF1.exports=new vF1});var iA=o((VR5,bF1)=>{var{Buffer:vz0}=A0("buffer"),{Duplex:Ad6}=A0("stream"),yF1=SY(),b5=O4(),ga=GY(),fa=kY();class lA extends Ad6{constructor(){super({decodeStrings:!1});this.offset=1,this._isActive=!1,this.once("finish",function(){if(this._autoCloseLob)this.destroy()})}_checkIsBfile(){if(this.type!==fa.DB_TYPE_BFILE)b5.throwErr(b5.ERR_OPERATION_ONLY_SUPPORTED_ON_BFILE)}_checkNotBfile(){if(this.type===fa.DB_TYPE_BFILE)b5.throwErr(b5.ERR_OPERATION_NOT_SUPPORTED_ON_BFILE)}async _destroy($,Y){if($&&$.message.startsWith("NJS-003:"))delete this._impl;if(this._impl){let X=this._impl;delete this._impl;try{await X.close()}catch(G){Y(G);return}}Y($)}async _read(){try{let $=await this._serializedRead(this.offset);if($)this.offset+=$.length,this.push($);else if(this.push(null),this._autoCloseLob)this.destroy()}catch($){if(this._autoCloseLob)this.destroy($);throw $}}async _readData($){b5.assert(this._impl,b5.ERR_INVALID_LOB);try{return await this._impl.read($)}catch(Y){throw b5.transformErr(Y,this._readData)}}_setup($,Y){if(this._impl=$,this.type!==fa.DB_TYPE_BFILE)this._chunkSize=$.getChunkSize();if(this._pieceSize=$.getPieceSize(),this._length=$.getLength(),this._type=$.getType(),typeof this._type==="number")this._type=fa.getTypeByNum(this._type);this._autoCloseLob=Y}async _write($,Y,X){if(this.type==yF1.DB_TYPE_BLOB&&!vz0.isBuffer($))$=vz0.from($);else if(this.type==yF1.DB_TYPE_CLOB&&vz0.isBuffer($))$=$.toString();try{await this._serializedWrite(this.offset,$)}catch(G){if(this._autoCloseLob)this.destroy(G);X(G);return}this.offset+=$.length,X(null)}async _writeData($,Y){b5.assert(this._impl,b5.ERR_INVALID_LOB);try{await this._impl.write($,Y)}catch(X){throw b5.transformErr(X,this._writeData)}}get chunkSize(){return this._checkNotBfile(),this._chunkSize}async close(){if(b5.assertArgCount(arguments,0,0),this._impl){let $=this._impl;delete this._impl;try{await $.close(),this.emit("close")}catch(Y){this.destroy(Y)}}}async getData($,Y){if(b5.assertArgCount(arguments,0,2),$===void 0)$=1;else b5.assertParamValue(Number.isInteger($)&&$>0,1);if(Y===void 0)Y=0;else b5.assertParamValue(Number.isInteger(Y)&&Y>0,2);return b5.assert(this._impl,b5.ERR_INVALID_LOB),await this._impl.getData($,Y)}getDirFileName(){return this._checkIsBfile(),this._impl.getDirFileName()}setDirFileName($){this._checkIsBfile(),b5.assertArgCount(arguments,1,1),b5.assertParamValue(ga.isObject($),1),b5.assertParamValue(Object.hasOwn($,"dirName"),1),b5.assertParamValue(Object.hasOwn($,"fileName"),1),b5.assertPropValue($.dirName!=""&&$.dirName!=null,"dirName"),b5.assertPropValue($.fileName!=""&&$.fileName!=null,"fileName"),this._impl.setDirFileName($)}async fileExists(){return this._checkIsBfile(),await this._impl.fileExists()}get length(){return this._length}get pieceSize(){return this._pieceSize}set pieceSize($){b5.assertPropValue(Number.isInteger($)&&$>=0,"pieceSize"),b5.assert(this._impl,b5.ERR_INVALID_LOB),this._impl.setPieceSize($),this._pieceSize=$}get type(){return this._type}}ga.wrapFns(lA.prototype,b5.ERR_BUSY_LOB,"close","fileExists","getData");lA.prototype._serializedRead=ga.wrapFn(lA.prototype._readData,!0);lA.prototype._serializedWrite=ga.wrapFn(lA.prototype._writeData,!0);bF1.exports=lA});var Mx=o((FR5,pF1)=>{var{BaseBuffer:Bd6,GrowableBuffer:yz0}=sq(),{Buffer:YP}=A0("buffer"),N4=Bx(),bF=O4(),$P=kY(),Od6=A0("util"),hF1=ka(),Ed6=GY();class fF1 extends Bd6{_decodeContainerNode($){let Y,X,G,J=this.pos-this.treeSegPos-1,Q=this._getNumChildren($),W=($&64)===0;if(Q===void 0){let K=this._getOffset($);X=this.pos,this.pos=this.treeSegPos+K;let Z=this.readUInt8();Q=this._getNumChildren(Z),Y=W?{}:Array(Q),G=this.pos}else if(W)Y={},G=this.pos,X=this.pos+this.fieldIdLength*Q;else Y=Array(Q),X=this.pos;for(let K=0;K<Q;K++){let Z;if(W){let z;if(this.fieldIdLength===1)z=this.buf[G];else if(this.fieldIdLength==2)z=this.buf.readUInt16BE(G);else z=this.buf.readUInt32BE(G);Z=this.fieldNames[z-1],G+=this.fieldIdLength}this.pos=X;let H=this._getOffset($);if(this.relativeOffsets)H+=J;if(X=this.pos,this.pos=this.treeSegPos+H,W)Y[Z]=this._decodeNode();else Y[K]=this._decodeNode()}return Y}_decodeNode(){let $=this.readUInt8();if($&128)return this._decodeContainerNode($);if($===N4.TNS_JSON_TYPE_NULL)return null;else if($===N4.TNS_JSON_TYPE_TRUE)return!0;else if($===N4.TNS_JSON_TYPE_FALSE)return!1;else if($===N4.TNS_JSON_TYPE_DATE||$===N4.TNS_JSON_TYPE_TIMESTAMP7)return this.parseOracleDate(this.readBytes(7));else if($===N4.TNS_JSON_TYPE_TIMESTAMP)return this.parseOracleDate(this.readBytes(11));else if($===N4.TNS_JSON_TYPE_TIMESTAMP_TZ)return this.parseOracleDate(this.readBytes(13));else if($===N4.TNS_JSON_TYPE_BINARY_FLOAT)return this.parseBinaryFloat(this.readBytes(4));else if($===N4.TNS_JSON_TYPE_BINARY_DOUBLE)return this.parseBinaryDouble(this.readBytes(8));else if($===N4.TNS_JSON_TYPE_INTERVAL_YM)return this.parseOracleIntervalYM(this.readBytes(5));else if($===N4.TNS_JSON_TYPE_INTERVAL_DS)return this.parseOracleIntervalDS(this.readBytes(11));else if($===N4.TNS_JSON_TYPE_STRING_LENGTH_UINT8)return this.readBytes(this.readUInt8()).toString();else if($===N4.TNS_JSON_TYPE_STRING_LENGTH_UINT16)return this.readBytes(this.readUInt16BE()).toString();else if($===N4.TNS_JSON_TYPE_STRING_LENGTH_UINT32)return this.readBytes(this.readUInt32BE()).toString();else if($===N4.TNS_JSON_TYPE_NUMBER_LENGTH_UINT8)return parseFloat(this.readOracleNumber());else if($===N4.TNS_JSON_TYPE_ID){let X=this.readBytes(this.readUInt8()),G=new $P.JsonId(X.length);return X.copy(G),G}else if($===N4.TNS_JSON_TYPE_BINARY_LENGTH_UINT16)return YP.from(this.readBytes(this.readUInt16BE()));else if($===N4.TNS_JSON_TYPE_BINARY_LENGTH_UINT32)return YP.from(this.readBytes(this.readUInt32BE()));else if($===N4.TNS_JSON_TYPE_EXTENDED){if($=this.readUInt8(),$===N4.TNS_JSON_TYPE_VECTOR){let X=this.readBytes(this.readUInt32BE());return new hF1.VectorDecoder(X).decode()}}let Y=$&240;if(Y===32||Y===96){let X=$&15;return parseFloat(this.parseOracleNumber(this.readBytes(X+1)))}else if(Y===64||Y===80){let X=$&15;return parseFloat(this.parseOracleNumber(this.readBytes(X)))}else if(($&224)==0){if($===0)return"";return this.readBytes($).toString()}bF.throwErr(bF.ERR_UNSUPPORTED_DATA_TYPE_IN_JSON,$)}_getNumChildren($){let Y=$&24;if(Y===0)return this.readUInt8();else if(Y===8)return this.readUInt16BE();else if(Y===16)return this.readUInt32BE()}_getOffset($){if($&32)return this.readUInt32BE();else return this.readUInt16BE()}_getFieldNames($,Y,X,G,J){this.skipBytes(Y*J);let Q=this.pos;this.skipBytes(Y*X);let W=this.readBytes(G),K=this.pos;this.pos=Q;let Z;for(let H=$;H<$+Y;H++){if(X===2)Z=this.readUInt16BE();else Z=this.readUInt32BE();let z;if(J===1)z=W.readUInt8(Z);else z=W.readUInt16BE(Z);this.fieldNames[H]=W.subarray(Z+J,Z+z+J).toString()}this.pos=K}decode(){let $=this.readBytes(3);if($[0]!==N4.TNS_JSON_MAGIC_BYTE_1||$[1]!==N4.TNS_JSON_MAGIC_BYTE_2||$[2]!==N4.TNS_JSON_MAGIC_BYTE_3)bF.throwErr(bF.ERR_UNEXPECTED_DATA,$.toString("hex"));let Y=this.readUInt8();if(Y!==N4.TNS_JSON_VERSION_MAX_FNAME_255&&Y!==N4.TNS_JSON_VERSION_MAX_FNAME_65535)bF.throwErr(bF.ERR_OSON_VERSION_NOT_SUPPORTED,Y);let X=this.readUInt16BE();if(this.relativeOffsets=X&N4.TNS_JSON_FLAG_REL_OFFSET_MODE,X&N4.TNS_JSON_FLAG_IS_SCALAR){if(X&N4.TNS_JSON_FLAG_TREE_SEG_UINT32)this.skipBytes(4);else this.skipBytes(2);return this._decodeNode()}let G;if(X&N4.TNS_JSON_FLAG_NUM_FNAMES_UINT32)G=this.readUInt32BE(),this.fieldIdLength=4;else if(X&N4.TNS_JSON_FLAG_NUM_FNAMES_UINT16)G=this.readUInt16BE(),this.fieldIdLength=2;else G=this.readUInt8(),this.fieldIdLength=1;let J,Q;if(X&N4.TNS_JSON_FLAG_FNAMES_SEG_UINT32)J=4,Q=this.readUInt32BE();else J=2,Q=this.readUInt16BE();let W,K,Z=0;if(Y===N4.TNS_JSON_VERSION_MAX_FNAME_65535){if(this.readUInt16BE()&N4.TNS_JSON_FLAG_SEC_FNAMES_SEG_UINT16)W=2;else W=4;Z=this.readUInt32BE(),K=this.readUInt32BE()}if(X&N4.TNS_JSON_FLAG_TREE_SEG_UINT32)this.skipBytes(4);else this.skipBytes(2);if(this.skipBytes(2),this.fieldNames=Array(G+Z),G>0)this._getFieldNames(0,G,J,Q,1);if(Z>0)this._getFieldNames(G,Z,W,K,2);return this.treeSegPos=this.pos,this._decodeNode()}}class gF1{constructor($,Y){if(this.name=$,this.nameBytes=YP.from($),this.nameBytes.length>Y)bF.throwErr(bF.ERR_OSON_FIELD_NAME_LIMITATION,Y);let X=0x811C9DC5n,G=16777619n,J=0xffffffffn;this.hashId=X;for(let Q=0;Q<this.nameBytes.length;Q++){let W=BigInt(this.nameBytes[Q]);this.hashId=(this.hashId^W)*G&J}this.hashId=Number(this.hashId)&255}}class xz0 extends yz0{constructor(){super();this.fieldNames=[]}addName($){if($.offset=this.pos,$.nameBytes.length<=255)this.writeUInt8($.nameBytes.length);else this.writeUInt16BE($.nameBytes.length);this.writeBytes($.nameBytes),this.fieldNames.push($)}_processFieldNames($){this.fieldNames.sort((Y,X)=>{if(Y.hashId<X.hashId)return-1;if(Y.hashId>X.hashId)return 1;if(Y.nameBytes.length<X.nameBytes.length)return-1;if(Y.nameBytes.length>X.nameBytes.length)return 1;if(Y.name<X.name)return-1;if(Y.name>X.name)return 1;return 0});for(let Y=0;Y<this.fieldNames.length;Y++)this.fieldNames[Y].fieldId=$+Y+1;if(this.fieldNames.length<256)this.fieldIdSize=1;else if(this.fieldNames.length<65536)this.fieldIdSize=2;else this.fieldIdSize=4}}class mF1 extends yz0{_encodeArray($,Y){this._encodeContainer(N4.TNS_JSON_TYPE_ARRAY,$.length);let X=$.length*4,J=this.reserveBytes(X);for(let Q of $)this.buf.writeUInt32BE(this.pos,J),J+=4,this.encodeNode(Q,Y)}_encodeContainer($,Y){if($|=32,Y>65535)$|=16;else if(Y>255)$|=8;if(this.writeUInt8($),Y<256)this.writeUInt8(Y);else if(Y<65536)this.writeUInt16BE(Y);else this.writeUInt32BE(Y)}_encodeObject($,Y){let X=$.values.length;this._encodeContainer(N4.TNS_JSON_TYPE_OBJECT,X);let G=this.pos,J=this.pos+X*Y.fieldIdSize,Q=J+X*4;this.reserveBytes(Q-this.pos);for(let W=0;W<$.fields.length;W++){let K=Y.fieldNamesMap.get($.fields[W]);if(Y.fieldIdSize==1)this.buf[G]=K.fieldId;else if(Y.fieldIdSize==2)this.buf.writeUInt16BE(K.fieldId,G);else this.buf.writeUInt32BE(K.fieldId,G);this.buf.writeUInt32BE(this.pos,J),G+=Y.fieldIdSize,J+=4,this.encodeNode($.values[W],Y)}}encodeNode($,Y){if($===void 0||$===null)this.writeUInt8(N4.TNS_JSON_TYPE_NULL);else if(typeof $==="boolean")if($)this.writeUInt8(N4.TNS_JSON_TYPE_TRUE);else this.writeUInt8(N4.TNS_JSON_TYPE_FALSE);else if(typeof $==="number")if(Number.isNaN($))this.writeUInt8(N4.TNS_JSON_TYPE_BINARY_DOUBLE),this.writeBinaryDouble($);else this.writeUInt8(N4.TNS_JSON_TYPE_NUMBER_LENGTH_UINT8),this.writeOracleNumber($.toString());else if(typeof $==="string"){let X=YP.from($);if(X.length<256)this.writeUInt8(N4.TNS_JSON_TYPE_STRING_LENGTH_UINT8),this.writeUInt8(X.length);else if(X.length<65536)this.writeUInt8(N4.TNS_JSON_TYPE_STRING_LENGTH_UINT16),this.writeUInt16BE(X.length);else this.writeUInt8(N4.TNS_JSON_TYPE_STRING_LENGTH_UINT32),this.writeUInt32BE(X.length);if(X.length>0)this.writeBytes(X)}else if(Od6.types.isDate($))if($.getUTCMilliseconds()===0)this.writeUInt8(N4.TNS_JSON_TYPE_TIMESTAMP7),this.writeOracleDate($,$P.DB_TYPE_DATE,!1);else this.writeUInt8(N4.TNS_JSON_TYPE_TIMESTAMP),this.writeOracleDate($,$P.DB_TYPE_TIMESTAMP,!1);else if($ instanceof $P.IntervalYM)this.writeUInt8(N4.TNS_JSON_TYPE_INTERVAL_YM),this.writeOracleIntervalYM($,!1);else if($ instanceof $P.IntervalDS)this.writeUInt8(N4.TNS_JSON_TYPE_INTERVAL_DS),this.writeOracleIntervalDS($,!1);else if(YP.isBuffer($)){if($.length<65536)this.writeUInt8(N4.TNS_JSON_TYPE_BINARY_LENGTH_UINT16),this.writeUInt16BE($.length);else this.writeUInt8(N4.TNS_JSON_TYPE_BINARY_LENGTH_UINT32),this.writeUInt32BE($.length);this.writeBytes($)}else if(Array.isArray($))this._encodeArray($,Y);else if(Ed6.isVectorValue($)){this.writeUInt8(N4.TNS_JSON_TYPE_EXTENDED),this.writeUInt8(N4.TNS_JSON_TYPE_VECTOR);let G=new hF1.VectorEncoder().encode($);this.writeUInt32BE(G.length),this.writeBytes(G)}else if($ instanceof $P.JsonId)this.writeUInt8(N4.TNS_JSON_TYPE_ID),this.writeUInt8($.length),this.writeBytes(YP.from($.buffer));else this._encodeObject($,Y)}}class uF1 extends yz0{_addFieldName($){let Y=new gF1($,this.maxFieldNameSize);if(this.fieldNamesMap.set($,Y),Y.nameBytes.length<=255)this.shortFieldNamesSeg.addName(Y);else{if(!this.longFieldNamesSeg)this.longFieldNamesSeg=new xz0;this.longFieldNamesSeg.addName(Y)}}_examineNode($){if(Array.isArray($))for(let Y of $)this._examineNode(Y);else if($&&Array.isArray($.fields))for(let Y=0;Y<$.fields.length;Y++){let X=$.fields[Y],G=$.values[Y];if(!this.fieldNamesMap.has(X))this._addFieldName(X);this._examineNode(G)}}_writeExtendedHeader(){if(this.fieldIdSize===1)this.writeUInt8(this.shortFieldNamesSeg.fieldNames.length);else if(this.fieldIdSize===2)this.writeUInt16BE(this.shortFieldNamesSeg.fieldNames.length);else this.writeUInt32BE(this.shortFieldNamesSeg.fieldNames.length);if(this.shortFieldNamesSeg.pos<65536)this.writeUInt16BE(this.shortFieldNamesSeg.pos);else this.writeUInt32BE(this.shortFieldNamesSeg.pos);if(this.longFieldNamesSeg){let $=0;if(this.longFieldNamesSeg.pos<65536)$=N4.TNS_JSON_FLAG_SEC_FNAMES_SEG_UINT16;this.writeUInt16BE($),this.writeUInt32BE(this.longFieldNamesSeg.fieldNames.length),this.writeUInt32BE(this.longFieldNamesSeg.pos)}}_writeFieldNamesSeg($){for(let Y of $.fieldNames)if(Y.nameBytes.length<=255)this.writeUInt8(Y.hashId);else this.writeUInt16BE(Y.hashId);for(let Y of $.fieldNames)if($.pos<65536)this.writeUInt16BE(Y.offset);else this.writeUInt32BE(Y.offset);if($.pos>0)this.writeBytes($.buf.subarray(0,$.pos))}encode($,Y){this.maxFieldNameSize=Y;let X=N4.TNS_JSON_FLAG_INLINE_LEAF;if(Array.isArray($)||$&&Array.isArray($.fields)){this.fieldNamesMap=new Map,this.shortFieldNamesSeg=new xz0,this._examineNode($);let J=0;if(this.shortFieldNamesSeg)this.shortFieldNamesSeg._processFieldNames(0),J+=this.shortFieldNamesSeg.fieldNames.length;if(this.longFieldNamesSeg)this.longFieldNamesSeg._processFieldNames(J),J+=this.longFieldNamesSeg.fieldNames.length;if(X|=N4.TNS_JSON_FLAG_HASH_ID_UINT8|N4.TNS_JSON_FLAG_TINY_NODES_STAT,J>65535)X|=N4.TNS_JSON_FLAG_NUM_FNAMES_UINT32,this.fieldIdSize=4;else if(J>255)X|=N4.TNS_JSON_FLAG_NUM_FNAMES_UINT16,this.fieldIdSize=2;else this.fieldIdSize=1;if(this.shortFieldNamesSeg.pos>65535)X|=N4.TNS_JSON_FLAG_FNAMES_SEG_UINT32}else X|=N4.TNS_JSON_FLAG_IS_SCALAR;let G=new mF1;if(G.encodeNode($,this),G.pos>65535)X|=N4.TNS_JSON_FLAG_TREE_SEG_UINT32;if(this.writeUInt8(N4.TNS_JSON_MAGIC_BYTE_1),this.writeUInt8(N4.TNS_JSON_MAGIC_BYTE_2),this.writeUInt8(N4.TNS_JSON_MAGIC_BYTE_3),this.longFieldNamesSeg)this.writeUInt8(N4.TNS_JSON_VERSION_MAX_FNAME_65535);else this.writeUInt8(N4.TNS_JSON_VERSION_MAX_FNAME_255);if(this.writeUInt16BE(X),this.shortFieldNamesSeg)this._writeExtendedHeader();if(G.pos<65536)this.writeUInt16BE(G.pos);else this.writeUInt32BE(G.pos);if(this.shortFieldNamesSeg){if(this.writeUInt16BE(0),this._writeFieldNamesSeg(this.shortFieldNamesSeg),this.longFieldNamesSeg)this._writeFieldNamesSeg(this.longFieldNamesSeg)}return this.writeBytes(G.buf.subarray(0,G.pos)),this.buf.subarray(0,this.pos)}}pF1.exports={OsonDecoder:fF1,OsonEncoder:uF1}});var bz0=o((LR5,iF1)=>{var Md6=SY(),Y3=O4(),Rd6=GY(),dF1=w2(),qd6=kz0(),O7=kY(),cF1=iA(),Pd6=Mx(),wd6=yF();class lF1 extends wd6{_determineFetchType($,Y,X){if(delete $.fetchType,delete $.converter,Y.fetchTypeHandler){let Q=Y.fetchTypeHandler($,X);if(Q!==void 0){if(Y3.assert(typeof Q==="object",Y3.ERR_FETCH_TYPE_HANDLER_RETURN_VALUE),Q.type!==void 0)Y3.assert(Q.type instanceof O7.DbType,Y3.ERR_FETCH_TYPE_HANDLER_TYPE);if(Q.converter!==void 0)Y3.assert(typeof Q.converter==="function",Y3.ERR_FETCH_TYPE_HANDLER_CONVERTER);$.fetchType=Q.type,$.converter=Q.converter}}if(!$.fetchType)if(Y.fetchTypeMap&&Y.fetchTypeMap.has($.name)){if($.fetchType=Y.fetchTypeMap.get($.name),$.fetchType===Md6.DEFAULT)$.fetchType=O7.DB_TYPE_FETCH_TYPE_MAP.get($.dbType)}else $.fetchType=dF1.fetchTypeMap.get($.dbType);if($.fetchType!==$.dbType){let Q=O7.DB_TYPE_CONVERSION_MAP.get($.dbType),W=Q&&Q.get($.fetchType);if(!W)Y3.throwErr(Y3.ERR_UNSUPPORTED_CONVERSION,$.dbType.name,$.fetchType.name);$.fetchType=W}let G,J=$.converter;if($.dbType!==O7.DB_TYPE_JSON&&qd6.oldJsonColumnAsObj&&J===void 0){let Q;if($.isOson)Q=async function(W){if(!W)return W;let K=W;if(W instanceof cF1)K=await W.getData();return new Pd6.OsonDecoder(K).decode()},G=Q;else if($.isJson)Q=async function(W){if(!W)return W;let K=W;if(W instanceof cF1)K=await W.getData();if(K instanceof Buffer)K=K.toString();return K=JSON.parse(K),K},G=Q}if(dF1.thin){if($.dbType===O7.DB_TYPE_NUMBER&&$.fetchType===O7.DB_TYPE_NUMBER)G=(Q)=>Q===null?null:parseFloat(Q);else if($.fetchType===O7.DB_TYPE_VARCHAR){if($.dbType===O7.DB_TYPE_BINARY_DOUBLE||$.dbType===O7.DB_TYPE_BINARY_FLOAT||$.dbType===O7.DB_TYPE_DATE||$.dbType===O7.DB_TYPE_TIMESTAMP||$.dbType===O7.DB_TYPE_TIMESTAMP_LTZ||$.dbType===O7.DB_TYPE_TIMESTAMP_TZ)G=(Q)=>Q===null?null:Q.toString();else if($.dbType===O7.DB_TYPE_RAW)G=(Q)=>Q===null?null:Q.toString("hex").toUpperCase()}else if($.dbType===O7.DB_TYPE_XMLTYPE)G=async function(W){if(!W)return W;if(typeof W==="string")return W;return await W.getData()};if(J&&G){let Q=G;G=(W)=>J(Q(W))}}if(G)$.converter=G}_getConnImpl(){return this._parentObj}_setup($,Y){this._parentObj=$.connection._impl,this.metaData=Y,this.lobIndices=[],this.dbObjectIndices=[],this.nestedCursorIndices=[],this.converterIndices=[],this.outFormat=$.outFormat,this.fetchArraySize=$.fetchArraySize,this.dbObjectAsPojo=$.dbObjectAsPojo,this.maxRows=$.maxRows;let X=new Map;for(let G=0;G<Y.length;G++){let J=Y[G].name;if(!X.has(J))X.set(J,G)}for(let G=0;G<Y.length;G++){let J=Y[G];if(J.dbTypeClass){let W=$.connection._getDbObjectClass(J.dbTypeClass);J.dbTypeClass=W}if(Rd6.addTypeProperties(J,"dbType"),this._determineFetchType(J,$,Y),J.fetchType===O7.DB_TYPE_CURSOR)this.nestedCursorIndices.push(G);else if(J.fetchType===O7.DB_TYPE_CLOB||J.fetchType===O7.DB_TYPE_NCLOB||J.fetchType===O7.DB_TYPE_BLOB||J.fetchType===O7.DB_TYPE_BFILE)this.lobIndices.push(G);else if(J.fetchType===O7.DB_TYPE_OBJECT)this.dbObjectIndices.push(G);if(J.converter)this.converterIndices.push(G);let Q=J.name;if(X.get(Q)!==G){let W=0;while(X.has(Q))W=W+1,Q=`${J.name}_${W}`;X.set(Q,G),J.name=Q}}}close(){Y3.throwNotImplemented("closing a result set")}getRows(){Y3.throwNotImplemented("getting rows")}async _getAllRows(){let Y=[];while(!0){let X=await this.getRows(100,{});if(X)await this._processRows(X,!1),Y=Y.concat(X);if(X.length<100)break}return Y}}iF1.exports=lF1});var aF1=o((DR5,rF1)=>{var aJ=O4(),_d6=yF();class nF1 extends _d6{_getConnImpl(){return this._database._connection}createIndex(){aJ.throwNotImplemented("creating an index on a SODA collection")}drop(){aJ.throwNotImplemented("dropping a SODA collection")}dropIndex(){aJ.throwNotImplemented("dropping an index on a SODA collection")}find(){aJ.throwNotImplemented("creating a SODA operation")}getDataGuide(){aJ.throwNotImplemented("getting the data guide for the collection")}getMetaData(){aJ.throwNotImplemented("getting the metadata for the collection")}getName(){aJ.throwNotImplemented("getting the name of the collection")}insertMany(){aJ.throwNotImplemented("inserting multiple docs into a collection")}insertManyAndGet(){aJ.throwNotImplemented("insert/return many docs in a collection")}insertOne(){aJ.throwNotImplemented("inserting a single doc into a collection")}insertOneAndGet(){aJ.throwNotImplemented("insert/return a single doc in a collection")}save(){aJ.throwNotImplemented("saving a single doc in a collection")}saveAndGet(){aJ.throwNotImplemented("saving a single doc in a collection")}truncate(){aJ.throwNotImplemented("removing all docs from a collection")}}rF1.exports=nF1});var tF1=o((NR5,oF1)=>{var ma=O4(),jd6=yF();class sF1 extends jd6{_getConnImpl(){return this._connection}createCollection(){ma.throwNotImplemented("creating a SODA collection")}createDocument(){ma.throwNotImplemented("creating a SODA document")}getCollectionNames(){ma.throwNotImplemented("getting a list of SODA collection names")}openCollection(){ma.throwNotImplemented("getting a list of SODA collection names")}}oF1.exports=sF1});var XL1=o((AR5,YL1)=>{var eF1=O4(),Td6=yF();class $L1 extends Td6{_getConnImpl(){return this._operation._getConnImpl()}close(){eF1.throwNotImplemented("closing a SODA document cursor")}getNext(){eF1.throwNotImplemented("getting a document from a SODA doc cursor")}}YL1.exports=$L1});var QL1=o((BR5,JL1)=>{var XP=O4();class GL1{getContent(){XP.throwNotImplemented("getting doc content")}getCreatedOn(){XP.throwNotImplemented("getting the created date of a document")}getKey(){XP.throwNotImplemented("getting the key of a document")}getLastModified(){XP.throwNotImplemented("getting the last modified date of a doc")}getMediaType(){XP.throwNotImplemented("getting the media type of a document")}getVersion(){XP.throwNotImplemented("getting the version of a document")}}JL1.exports=GL1});var ZL1=o((OR5,KL1)=>{var nA=O4(),Id6=yF();class WL1 extends Id6{_getConnImpl(){return this._collection._database._connection}count(){nA.throwNotImplemented("getting a count of documents")}getCursor(){nA.throwNotImplemented("getting a cursor for documents")}getDocuments(){nA.throwNotImplemented("getting a cursor for documents")}getOne(){nA.throwNotImplemented("getting a single document")}remove(){nA.throwNotImplemented("removing documents from a collection")}replaceOne(){nA.throwNotImplemented("replacing a single document")}replaceOneAndGet(){nA.throwNotImplemented("replacing/returning a single document")}}KL1.exports=WL1});var GP=o((ER5,UL1)=>{var Cd6=zF1(),Sd6=LF1(),kd6=AF1(),vd6=RF1(),xd6=ba(),yd6=ha(),bd6=Cz0(),hd6=Sz0(),fd6=bz0(),gd6=aF1(),md6=tF1(),ud6=XL1(),pd6=QL1(),dd6=ZL1();UL1.exports={AqDeqOptionsImpl:Cd6,AqEnqOptionsImpl:Sd6,AqMessageImpl:kd6,AqQueueImpl:vd6,DbObjectImpl:xd6,ConnectionImpl:yd6,LobImpl:bd6,PoolImpl:hd6,ResultSetImpl:fd6,SodaCollectionImpl:gd6,SodaDatabaseImpl:md6,SodaDocCursorImpl:ud6,SodaDocumentImpl:pd6,SodaOperationImpl:dd6}});var hz0=o((MR5,zL1)=>{var{Buffer:cd6}=A0("buffer"),_2=SY(),X3=O4();class HL1{get condition(){return this._impl.getCondition()}set condition($){X3.assertPropValue(typeof $==="string","condition"),this._impl.setCondition($)}get consumerName(){return this._impl.getConsumerName()}set consumerName($){X3.assertPropValue(typeof $==="string","consumerName"),this._impl.setConsumerName($)}get correlation(){return this._impl.getCorrelation()}set correlation($){X3.assertPropValue(typeof $==="string","correlation"),this._impl.setCorrelation($)}get deliveryMode(){return null}set deliveryMode($){X3.assertPropValue($===_2.AQ_MSG_DELIV_MODE_PERSISTENT||$===_2.AQ_MSG_DELIV_MODE_BUFFERED||$===_2.AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED,"deliveryMode"),this._impl.setDeliveryMode($)}get mode(){return this._impl.getMode()}set mode($){X3.assertPropValue($===_2.AQ_DEQ_MODE_BROWSE||$===_2.AQ_DEQ_MODE_LOCKED||$===_2.AQ_DEQ_MODE_REMOVE||$===_2.AQ_DEQ_MODE_REMOVE_NO_DATA,"mode"),this._impl.setMode($)}get msgId(){return this._impl.getMsgId()}set msgId($){X3.assertPropValue(cd6.isBuffer($),"msgId"),this._impl.setMsgId($)}get navigation(){return this._impl.getNavigation()}set navigation($){X3.assertPropValue($===_2.AQ_DEQ_NAV_FIRST_MSG||$===_2.AQ_DEQ_NAV_NEXT_TRANSACTION||$===_2.AQ_DEQ_NAV_NEXT_MSG,"navigation"),this._impl.setNavigation($)}get transformation(){return this._impl.getTransformation()}set transformation($){X3.assertPropValue(typeof $==="string","transformation"),this._impl.setTransformation($)}get visibility(){return this._impl.getVisibility()}set visibility($){X3.assertPropValue($===_2.AQ_VISIBILITY_IMMEDIATE||$===_2.AQ_VISIBILITY_ON_COMMIT,"visibility"),this._impl.setVisibility($)}get wait(){return this._impl.getWait()}set wait($){X3.assertPropValue(Number.isInteger($)&&$>=0,"wait"),this._impl.setWait($)}}zL1.exports=HL1});var gz0=o((RR5,FL1)=>{var Rx=SY(),fz0=O4();class VL1{get deliveryMode(){return this._impl.getDeliveryMode()}set deliveryMode($){fz0.assertPropValue($===Rx.AQ_MSG_DELIV_MODE_PERSISTENT||$===Rx.AQ_MSG_DELIV_MODE_BUFFERED||$===Rx.AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED,"deliveryMode"),this._impl.setDeliveryMode($)}get transformation(){return this._impl.getTransformation()}set transformation($){fz0.assertPropValue(typeof $==="string","transformation"),this._impl.setTransformation($)}get visibility(){return this._impl.getVisibility()}set visibility($){fz0.assertPropValue($===Rx.AQ_VISIBILITY_IMMEDIATE||$===Rx.AQ_VISIBILITY_ON_COMMIT,"visibility"),this._impl.setVisibility($)}}FL1.exports=VL1});var mz0=o((qR5,DL1)=>{var ld6=ba();class LL1{get correlation(){return this._impl.getCorrelation()}get delay(){return this._impl.getDelay()}get enqTime(){return this._impl.getEnqTime()}get deliveryMode(){return this._impl.getDeliveryMode()}get exceptionQueue(){return this._impl.getExceptionQueue()}get expiration(){return this._impl.getExpiration()}get msgId(){return this._impl.getMsgId()}get numAttempts(){return this._impl.getNumAttempts()}get originalMsgId(){return this._impl.getOriginalMsgId()}get payload(){let $=this._impl.getPayload();if($ instanceof ld6){let Y=Object.create(this._payloadTypeClass.prototype);return Y._impl=$,Y}return $}get priority(){return this._impl.getPriority()}get state(){return this._impl.getState()}}DL1.exports=LL1});var E9=o((PR5,BL1)=>{var{Buffer:NL1}=A0("buffer"),n$=SY(),AL1=Bx();BL1.exports={BIND_IN:n$.BIND_IN,BIND_INOUT:n$.BIND_INOUT,BIND_OUT:n$.BIND_OUT,CLIENT_VERSION:n$.VERSION_MAJOR<<24|n$.VERSION_MINOR<<20|n$.VERSION_PATCH<<12,CSFRM_IMPLICIT:n$.CSFRM_IMPLICIT,CSFRM_NCHAR:n$.CSFRM_NCHAR,DRIVER_NAME:n$.DEFAULT_DRIVER_NAME+" thn",PURITY_DEFAULT:n$.PURITY_DEFAULT,PURITY_NEW:n$.PURITY_NEW,PURITY_SELF:n$.PURITY_SELF,SYSASM:n$.SYSASM,SYSBKP:n$.SYSBACKUP,SYSDBA:n$.SYSDBA,SYSDG:n$.SYSDG,SYSKM:n$.SYSKM,SYSOPER:n$.SYSOPER,SYSRAC:n$.SYSRAC,AUTH_MODE_DEFAULT:0,AUTH_MODE_PRELIM:8,AUTH_MODE_SYSASM:32768,AUTH_MODE_SYSBKP:131072,AUTH_MODE_SYSDBA:2,AUTH_MODE_SYSDGD:262144,AUTH_MODE_SYSKMT:524288,AUTH_MODE_SYSOPER:4,AUTH_MODE_SYSRAC:1048576,TNS_AUTH_MODE_LOGON:1,TNS_AUTH_MODE_CHANGE_PASSWORD:2,TNS_AUTH_MODE_SYSDBA:32,TNS_AUTH_MODE_SYSOPER:64,TNS_AUTH_MODE_PRELIM:128,TNS_AUTH_MODE_WITH_PASSWORD:256,TNS_AUTH_MODE_SYSASM:4194304,TNS_AUTH_MODE_SYSBKP:16777216,TNS_AUTH_MODE_SYSDGD:33554432,TNS_AUTH_MODE_SYSKMT:67108864,TNS_AUTH_MODE_SYSRAC:134217728,TNS_AUTH_MODE_IAM_TOKEN:536870912,TNS_PACKET_TYPE_CONNECT:1,TNS_PACKET_TYPE_ACCEPT:2,TNS_PACKET_TYPE_REFUSE:4,TNS_PACKET_TYPE_REDIRECT:5,TNS_PACKET_TYPE_DATA:6,TNS_PACKET_TYPE_RESEND:11,TNS_PACKET_TYPE_MARKER:12,TNS_PACKET_TYPE_CONTROL:14,TNS_DATA_TYPE_DEFAULT:0,TNS_DATA_TYPE_VARCHAR:1,TNS_DATA_TYPE_NUMBER:2,TNS_DATA_TYPE_BINARY_INTEGER:3,TNS_DATA_TYPE_FLOAT:4,TNS_DATA_TYPE_STR:5,TNS_DATA_TYPE_VNU:6,TNS_DATA_TYPE_PDN:7,TNS_DATA_TYPE_LONG:8,TNS_DATA_TYPE_VCS:9,TNS_DATA_TYPE_TIDDEF:10,TNS_DATA_TYPE_ROWID:11,TNS_DATA_TYPE_DATE:12,TNS_DATA_TYPE_VBI:15,TNS_DATA_TYPE_RAW:23,TNS_DATA_TYPE_LONG_RAW:24,TNS_DATA_TYPE_UB2:25,TNS_DATA_TYPE_UB4:26,TNS_DATA_TYPE_SB1:27,TNS_DATA_TYPE_SB2:28,TNS_DATA_TYPE_SB4:29,TNS_DATA_TYPE_SWORD:30,TNS_DATA_TYPE_UWORD:31,TNS_DATA_TYPE_PTRB:32,TNS_DATA_TYPE_PTRW:33,TNS_DATA_TYPE_OER8:290,TNS_DATA_TYPE_FUN:291,TNS_DATA_TYPE_AUA:292,TNS_DATA_TYPE_RXH7:293,TNS_DATA_TYPE_NA6:294,TNS_DATA_TYPE_OAC9:39,TNS_DATA_TYPE_AMS:40,TNS_DATA_TYPE_BRN:41,TNS_DATA_TYPE_BRP:298,TNS_DATA_TYPE_BRV:299,TNS_DATA_TYPE_KVA:300,TNS_DATA_TYPE_CLS:301,TNS_DATA_TYPE_CUI:302,TNS_DATA_TYPE_DFN:303,TNS_DATA_TYPE_DQR:304,TNS_DATA_TYPE_DSC:305,TNS_DATA_TYPE_EXE:306,TNS_DATA_TYPE_FCH:307,TNS_DATA_TYPE_GBV:308,TNS_DATA_TYPE_GEM:309,TNS_DATA_TYPE_GIV:310,TNS_DATA_TYPE_OKG:311,TNS_DATA_TYPE_HMI:312,TNS_DATA_TYPE_INO:313,TNS_DATA_TYPE_LNF:315,TNS_DATA_TYPE_ONT:316,TNS_DATA_TYPE_OPE:317,TNS_DATA_TYPE_OSQ:318,TNS_DATA_TYPE_SFE:319,TNS_DATA_TYPE_SPF:320,TNS_DATA_TYPE_VSN:321,TNS_DATA_TYPE_UD7:322,TNS_DATA_TYPE_DSA:323,TNS_DATA_TYPE_UIN:68,TNS_DATA_TYPE_PIN:327,TNS_DATA_TYPE_PFN:328,TNS_DATA_TYPE_PPT:329,TNS_DATA_TYPE_STO:331,TNS_DATA_TYPE_ARC:333,TNS_DATA_TYPE_MRS:334,TNS_DATA_TYPE_MRT:335,TNS_DATA_TYPE_MRG:336,TNS_DATA_TYPE_MRR:337,TNS_DATA_TYPE_MRC:338,TNS_DATA_TYPE_VER:339,TNS_DATA_TYPE_LON2:340,TNS_DATA_TYPE_INO2:341,TNS_DATA_TYPE_ALL:342,TNS_DATA_TYPE_UDB:343,TNS_DATA_TYPE_AQI:344,TNS_DATA_TYPE_ULB:345,TNS_DATA_TYPE_ULD:346,TNS_DATA_TYPE_SLS:91,TNS_DATA_TYPE_SID:348,TNS_DATA_TYPE_NA7:349,TNS_DATA_TYPE_LVC:94,TNS_DATA_TYPE_LVB:95,TNS_DATA_TYPE_CHAR:96,TNS_DATA_TYPE_AVC:97,TNS_DATA_TYPE_AL7:354,TNS_DATA_TYPE_K2RPC:355,TNS_DATA_TYPE_BINARY_FLOAT:100,TNS_DATA_TYPE_BINARY_DOUBLE:101,TNS_DATA_TYPE_CURSOR:102,TNS_DATA_TYPE_RDD:104,TNS_DATA_TYPE_XDP:359,TNS_DATA_TYPE_OSL:106,TNS_DATA_TYPE_OKO8:363,TNS_DATA_TYPE_EXT_NAMED:108,TNS_DATA_TYPE_INT_NAMED:109,TNS_DATA_TYPE_EXT_REF:110,TNS_DATA_TYPE_INT_REF:111,TNS_DATA_TYPE_CLOB:112,TNS_DATA_TYPE_BLOB:113,TNS_DATA_TYPE_BFILE:114,TNS_DATA_TYPE_CFILE:115,TNS_DATA_TYPE_RSET:116,TNS_DATA_TYPE_CWD:117,TNS_DATA_TYPE_JSON:119,TNS_DATA_TYPE_OAC122:120,TNS_DATA_TYPE_UD12:380,TNS_DATA_TYPE_AL8:381,TNS_DATA_TYPE_LFOP:382,TNS_DATA_TYPE_VECTOR:127,TNS_DATA_TYPE_FCRT:383,TNS_DATA_TYPE_DNY:384,TNS_DATA_TYPE_OPR:385,TNS_DATA_TYPE_PLS:386,TNS_DATA_TYPE_XID:387,TNS_DATA_TYPE_TXN:388,TNS_DATA_TYPE_DCB:389,TNS_DATA_TYPE_CCA:390,TNS_DATA_TYPE_WRN:391,TNS_DATA_TYPE_TLH:393,TNS_DATA_TYPE_TOH:394,TNS_DATA_TYPE_FOI:395,TNS_DATA_TYPE_SID2:396,TNS_DATA_TYPE_TCH:397,TNS_DATA_TYPE_PII:398,TNS_DATA_TYPE_PFI:399,TNS_DATA_TYPE_PPU:400,TNS_DATA_TYPE_PTE:401,TNS_DATA_TYPE_CLV:146,TNS_DATA_TYPE_RXH8:404,TNS_DATA_TYPE_N12:405,TNS_DATA_TYPE_AUTH:406,TNS_DATA_TYPE_KVAL:407,TNS_DATA_TYPE_DTR:152,TNS_DATA_TYPE_DUN:153,TNS_DATA_TYPE_DOP:154,TNS_DATA_TYPE_VST:155,TNS_DATA_TYPE_ODT:156,TNS_DATA_TYPE_FGI:413,TNS_DATA_TYPE_DSY:414,TNS_DATA_TYPE_DSYR8:415,TNS_DATA_TYPE_DSYH8:416,TNS_DATA_TYPE_DSYL:417,TNS_DATA_TYPE_DSYT8:418,TNS_DATA_TYPE_DSYV8:419,TNS_DATA_TYPE_DSYP:420,TNS_DATA_TYPE_DSYF:421,TNS_DATA_TYPE_DSYK:422,TNS_DATA_TYPE_DSYY:423,TNS_DATA_TYPE_DSYQ:424,TNS_DATA_TYPE_DSYC:425,TNS_DATA_TYPE_DSYA:426,TNS_DATA_TYPE_OT8:427,TNS_DATA_TYPE_DOL:172,TNS_DATA_TYPE_DSYTY:429,TNS_DATA_TYPE_AQE:430,TNS_DATA_TYPE_KV:431,TNS_DATA_TYPE_AQD:432,TNS_DATA_TYPE_AQ8:433,TNS_DATA_TYPE_TIME:178,TNS_DATA_TYPE_TIME_TZ:179,TNS_DATA_TYPE_TIMESTAMP:180,TNS_DATA_TYPE_TIMESTAMP_TZ:181,TNS_DATA_TYPE_INTERVAL_YM:182,TNS_DATA_TYPE_INTERVAL_DS:183,TNS_DATA_TYPE_EDATE:184,TNS_DATA_TYPE_ETIME:185,TNS_DATA_TYPE_ETTZ:186,TNS_DATA_TYPE_ESTAMP:187,TNS_DATA_TYPE_ESTZ:188,TNS_DATA_TYPE_EIYM:189,TNS_DATA_TYPE_EIDS:190,TNS_DATA_TYPE_RFS:449,TNS_DATA_TYPE_RXH10:450,TNS_DATA_TYPE_DCLOB:195,TNS_DATA_TYPE_DBLOB:196,TNS_DATA_TYPE_DBFILE:197,TNS_DATA_TYPE_DJSON:198,TNS_DATA_TYPE_KPN:454,TNS_DATA_TYPE_KPDNR:455,TNS_DATA_TYPE_DSYD:456,TNS_DATA_TYPE_DSYS:457,TNS_DATA_TYPE_DSYR:458,TNS_DATA_TYPE_DSYH:459,TNS_DATA_TYPE_DSYT:460,TNS_DATA_TYPE_DSYV:461,TNS_DATA_TYPE_AQM:462,TNS_DATA_TYPE_OER11:463,TNS_DATA_TYPE_UROWID:208,TNS_DATA_TYPE_AQL:466,TNS_DATA_TYPE_OTC:467,TNS_DATA_TYPE_KFNO:468,TNS_DATA_TYPE_KFNP:469,TNS_DATA_TYPE_KGT8:470,TNS_DATA_TYPE_RASB4:471,TNS_DATA_TYPE_RAUB2:472,TNS_DATA_TYPE_RAUB1:473,TNS_DATA_TYPE_RATXT:474,TNS_DATA_TYPE_RSSB4:475,TNS_DATA_TYPE_RSUB2:476,TNS_DATA_TYPE_RSUB1:477,TNS_DATA_TYPE_RSTXT:478,TNS_DATA_TYPE_RIDL:479,TNS_DATA_TYPE_GLRDD:480,TNS_DATA_TYPE_GLRDG:481,TNS_DATA_TYPE_GLRDC:482,TNS_DATA_TYPE_OKO:483,TNS_DATA_TYPE_DPP:484,TNS_DATA_TYPE_DPLS:485,TNS_DATA_TYPE_DPMOP:486,TNS_DATA_TYPE_TIMESTAMP_LTZ:231,TNS_DATA_TYPE_ESITZ:232,TNS_DATA_TYPE_UB8:233,TNS_DATA_TYPE_STAT:490,TNS_DATA_TYPE_RFX:491,TNS_DATA_TYPE_FAL:492,TNS_DATA_TYPE_CKV:493,TNS_DATA_TYPE_DRCX:494,TNS_DATA_TYPE_KGH:495,TNS_DATA_TYPE_AQO:496,TNS_DATA_TYPE_PNTY:241,TNS_DATA_TYPE_OKGT:498,TNS_DATA_TYPE_KPFC:499,TNS_DATA_TYPE_FE2:500,TNS_DATA_TYPE_SPFP:501,TNS_DATA_TYPE_DPULS:502,TNS_DATA_TYPE_BOOLEAN:252,TNS_DATA_TYPE_AQA:509,TNS_DATA_TYPE_KPBF:510,TNS_DATA_TYPE_TSM:513,TNS_DATA_TYPE_MSS:514,TNS_DATA_TYPE_KPC:516,TNS_DATA_TYPE_CRS:517,TNS_DATA_TYPE_KKS:518,TNS_DATA_TYPE_KSP:519,TNS_DATA_TYPE_KSPTOP:520,TNS_DATA_TYPE_KSPVAL:521,TNS_DATA_TYPE_PSS:522,TNS_DATA_TYPE_NLS:523,TNS_DATA_TYPE_ALS:524,TNS_DATA_TYPE_KSDEVTVAL:525,TNS_DATA_TYPE_KSDEVTTOP:526,TNS_DATA_TYPE_KPSPP:527,TNS_DATA_TYPE_KOL:528,TNS_DATA_TYPE_LST:529,TNS_DATA_TYPE_ACX:530,TNS_DATA_TYPE_SCS:531,TNS_DATA_TYPE_RXH:532,TNS_DATA_TYPE_KPDNS:533,TNS_DATA_TYPE_KPDCN:534,TNS_DATA_TYPE_KPNNS:535,TNS_DATA_TYPE_KPNCN:536,TNS_DATA_TYPE_KPS:537,TNS_DATA_TYPE_APINF:538,TNS_DATA_TYPE_TEN:539,TNS_DATA_TYPE_XSSCS:540,TNS_DATA_TYPE_XSSSO:541,TNS_DATA_TYPE_XSSAO:542,TNS_DATA_TYPE_KSRPC:543,TNS_DATA_TYPE_KVL:560,TNS_DATA_TYPE_SESSGET:563,TNS_DATA_TYPE_SESSREL:564,TNS_DATA_TYPE_XSSDEF:565,TNS_DATA_TYPE_PDQCINV:572,TNS_DATA_TYPE_PDQIDC:573,TNS_DATA_TYPE_KPDQCSTA:574,TNS_DATA_TYPE_KPRS:575,TNS_DATA_TYPE_KPDQIDC:576,TNS_DATA_TYPE_RTSTRM:578,TNS_DATA_TYPE_SESSRET:579,TNS_DATA_TYPE_SCN6:580,TNS_DATA_TYPE_KECPA:581,TNS_DATA_TYPE_KECPP:582,TNS_DATA_TYPE_SXA:583,TNS_DATA_TYPE_KVARR:584,TNS_DATA_TYPE_KPNGN:585,TNS_DATA_TYPE_XSNSOP:590,TNS_DATA_TYPE_XSATTR:591,TNS_DATA_TYPE_XSNS:592,TNS_DATA_TYPE_TXT:593,TNS_DATA_TYPE_XSSESSNS:594,TNS_DATA_TYPE_XSATTOP:595,TNS_DATA_TYPE_XSCREOP:596,TNS_DATA_TYPE_XSDETOP:597,TNS_DATA_TYPE_XSDESOP:598,TNS_DATA_TYPE_XSSETSP:599,TNS_DATA_TYPE_XSSIDP:600,TNS_DATA_TYPE_XSPRIN:601,TNS_DATA_TYPE_XSKVL:602,TNS_DATA_TYPE_XSSSDEF2:603,TNS_DATA_TYPE_XSNSOP2:604,TNS_DATA_TYPE_XSNS2:605,TNS_DATA_TYPE_IMPLRES:611,TNS_DATA_TYPE_OER19:612,TNS_DATA_TYPE_UB1ARRAY:613,TNS_DATA_TYPE_SESSSTATE:614,TNS_DATA_TYPE_AC_REPLAY:615,TNS_DATA_TYPE_AC_CONT:616,TNS_DATA_TYPE_KPDNREQ:622,TNS_DATA_TYPE_KPDNRNF:623,TNS_DATA_TYPE_KPNGNC:624,TNS_DATA_TYPE_KPNRI:625,TNS_DATA_TYPE_AQENQ:626,TNS_DATA_TYPE_AQDEQ:627,TNS_DATA_TYPE_AQJMS:628,TNS_DATA_TYPE_KPDNRPAY:629,TNS_DATA_TYPE_KPDNRACK:630,TNS_DATA_TYPE_KPDNRMP:631,TNS_DATA_TYPE_KPDNRDQ:632,TNS_DATA_TYPE_CHUNKINFO:636,TNS_DATA_TYPE_SCN:637,TNS_DATA_TYPE_SCN8:638,TNS_DATA_TYPE_UD21:639,TNS_DATA_TYPE_TNP:640,TNS_DATA_TYPE_OAC:646,TNS_DATA_TYPE_SESSSIGN:647,TNS_DATA_TYPE_OER:652,TNS_DATA_TYPE_UDS:663,TNS_TYPE_REP_NATIVE:0,TNS_TYPE_REP_UNIVERSAL:1,TNS_TYPE_REP_ORACLE:10,TNS_MSG_TYPE_PROTOCOL:1,TNS_MSG_TYPE_DATA_TYPES:2,TNS_MSG_TYPE_FUNCTION:3,TNS_MSG_TYPE_ERROR:4,TNS_MSG_TYPE_ROW_HEADER:6,TNS_MSG_TYPE_ROW_DATA:7,TNS_MSG_TYPE_PARAMETER:8,TNS_MSG_TYPE_STATUS:9,TNS_MSG_TYPE_IO_VECTOR:11,TNS_MSG_TYPE_LOB_DATA:14,TNS_MSG_TYPE_WARNING:15,TNS_MSG_TYPE_DESCRIBE_INFO:16,TNS_MSG_TYPE_PIGGYBACK:17,TNS_MSG_TYPE_FLUSH_OUT_BINDS:19,TNS_MSG_TYPE_BIT_VECTOR:21,TNS_MSG_TYPE_SERVER_SIDE_PIGGYBACK:23,TNS_MSG_TYPE_ONEWAY_FN:26,TNS_MSG_TYPE_IMPLICIT_RESULTSET:27,TNS_MSG_TYPE_RENEGOTIATE:28,TNS_MSG_TYPE_END_OF_REQUEST:29,TNS_MSG_TYPE_FAST_AUTH:34,TNS_KEYWORD_NUM_CURRENT_SCHEMA:168,TNS_KEYWORD_NUM_EDITION:172,TNS_KEYWORD_NUM_TRANSACTION_ID:201,TNS_BIND_USE_INDICATORS:1,TNS_BIND_USE_LENGTH:2,TNS_BIND_ARRAY:64,TNS_BIND_DIR_OUTPUT:16,TNS_BIND_DIR_INPUT:32,TNS_BIND_DIR_INPUT_OUTPUT:48,TNS_EXEC_OPTION_PARSE:1,TNS_EXEC_OPTION_BIND:8,TNS_EXEC_OPTION_DEFINE:16,TNS_EXEC_OPTION_EXECUTE:32,TNS_EXEC_OPTION_FETCH:64,TNS_EXEC_OPTION_COMMIT:256,TNS_EXEC_OPTION_COMMIT_REEXECUTE:1,TNS_EXEC_OPTION_PLSQL_BIND:1024,TNS_EXEC_OPTION_DML_ROWCOUNTS:16384,TNS_EXEC_OPTION_NOT_PLSQL:32768,TNS_EXEC_OPTION_IMPLICIT_RESULTSET:32768,TNS_EXEC_OPTION_DESCRIBE:131072,TNS_EXEC_OPTION_NO_COMPRESSED_FETCH:262144,TNS_EXEC_OPTION_BATCH_ERRORS:524288,TNS_EXEC_OPTION_NO_IMPL_REL:2097152,TNS_SERVER_PIGGYBACK_QUERY_CACHE_INVALIDATION:1,TNS_SERVER_PIGGYBACK_OS_PID_MTS:2,TNS_SERVER_PIGGYBACK_TRACE_EVENT:3,TNS_SERVER_PIGGYBACK_SESS_RET:4,TNS_SERVER_PIGGYBACK_SYNC:5,TNS_SERVER_PIGGYBACK_LTXID:7,TNS_SERVER_PIGGYBACK_AC_REPLAY_CONTEXT:8,TNS_SERVER_PIGGYBACK_EXT_SYNC:9,TNS_SERVER_PIGGYBACK_SESS_SIGNATURE:10,TNS_SESSGET_SESSION_CHANGED:4,TNS_LOB_OP_GET_LENGTH:1,TNS_LOB_OP_READ:2,TNS_LOB_OP_TRIM:32,TNS_LOB_OP_WRITE:64,TNS_LOB_OP_GET_CHUNK_SIZE:16384,TNS_LOB_OP_CREATE_TEMP:272,TNS_LOB_OP_FREE_TEMP:273,TNS_LOB_OP_OPEN:32768,TNS_LOB_OP_CLOSE:65536,TNS_LOB_OP_IS_OPEN:69632,TNS_LOB_OP_ARRAY:524288,TNS_LOB_OP_FILE_OPEN:256,TNS_LOB_OP_FILE_CLOSE:512,TNS_LOB_OP_FILE_ISOPEN:1024,TNS_LOB_OP_FILE_EXISTS:2048,TNS_LOB_LOC_OFFSET_FLAG_1:4,TNS_LOB_LOC_OFFSET_FLAG_3:6,TNS_LOB_LOC_OFFSET_FLAG_4:7,TNS_LOB_QLOCATOR_VERSION:4,TNS_LOB_LOC_FIXED_OFFSET:16,TNS_LOB_LOC_FLAGS_BLOB:1,TNS_LOB_LOC_FLAGS_VALUE_BASED:32,TNS_LOB_LOC_FLAGS_ABSTRACT:64,TNS_LOB_LOC_FLAGS_INIT:8,TNS_LOB_LOC_FLAGS_TEMP:1,TNS_LOB_LOC_FLAGS_VAR_LENGTH_CHARSET:128,TNS_LOB_OPEN_READ_WRITE:2,TNS_LOB_OPEN_READ_ONLY:11,TNS_LOB_PREFETCH_FLAG:33554432,TNS_JSON_MAX_LENGTH:33554432,TNS_END_TO_END_ACTION:16,TNS_END_TO_END_CLIENT_IDENTIFIER:1,TNS_END_TO_END_CLIENT_INFO:256,TNS_END_TO_END_DBOP:512,TNS_END_TO_END_MODULE:8,TNS_VERSION_MIN_ACCEPTED:315,TNS_VERSION_MIN_LARGE_SDU:315,TNS_FUNC_AUTH_PHASE_ONE:118,TNS_FUNC_AUTH_PHASE_TWO:115,TNS_FUNC_CLOSE_CURSORS:105,TNS_FUNC_COMMIT:14,TNS_FUNC_EXECUTE:94,TNS_FUNC_FETCH:5,TNS_FUNC_LOB_OP:96,TNS_FUNC_LOGOFF:9,TNS_FUNC_PING:147,TNS_FUNC_ROLLBACK:15,TNS_FUNC_SET_END_TO_END_ATTR:135,TNS_FUNC_REEXECUTE:4,TNS_FUNC_REEXECUTE_AND_FETCH:78,TNS_FUNC_SET_SCHEMA:152,TNS_FUNC_SESSION_GET:162,TNS_FUNC_SESSION_RELEASE:163,TNS_FUNC_SESSION_STATE:176,TNS_FUNC_CANCEL_ALL:120,TNS_FUNC_TPC_TXN_SWITCH:103,TNS_FUNC_TPC_TXN_CHANGE_STATE:104,TNS_FUNC_AQ_ENQ:121,TNS_FUNC_AQ_DEQ:122,TNS_FUNC_ARRAY_AQ:145,TNS_CHARSET_UTF8:873,TNS_CHARSET_UTF16:2000,TNS_ENCODING_UTF8:"UTF-8",TNS_ENCODING_UTF16:"UTF-16LE",TNS_ENCODING_MULTI_BYTE:1,TNS_ENCODING_CONV_LENGTH:2,TNS_CCAP_SQL_VERSION:0,TNS_CCAP_LOGON_TYPES:4,TNS_CCAP_CTB_FEATURE_BACKPORT:5,TNS_CCAP_FIELD_VERSION:7,TNS_CCAP_SERVER_DEFINE_CONV:8,TNS_CCAP_DEQUEUE_WITH_SELECTOR:9,TNS_CCAP_TTC1:15,TNS_CCAP_OCI1:16,TNS_CCAP_TDS_VERSION:17,TNS_CCAP_RPC_VERSION:18,TNS_CCAP_RPC_SIG:19,TNS_CCAP_DBF_VERSION:21,TNS_CCAP_LOB:23,TNS_CCAP_TTC2:26,TNS_CCAP_UB2_DTY:27,TNS_CCAP_OCI2:31,TNS_CCAP_CLIENT_FN:34,TNS_CCAP_OCI3:35,TNS_CCAP_TTC3:37,TNS_CCAP_SESS_SIGNATURE_VERSION:39,TNS_CCAP_TTC4:40,TNS_CCAP_LOB2:42,TNS_CCAP_TTC5:44,TNS_CCAP_VECTOR_FEATURES:52,TNS_CCAP_MAX:53,TNS_CCAP_SQL_VERSION_MAX:6,TNS_CCAP_FIELD_VERSION_11_2:6,TNS_CCAP_FIELD_VERSION_12_1:7,TNS_CCAP_FIELD_VERSION_12_2:8,TNS_CCAP_FIELD_VERSION_12_2_EXT1:9,TNS_CCAP_FIELD_VERSION_18_1:10,TNS_CCAP_FIELD_VERSION_18_1_EXT_1:11,TNS_CCAP_FIELD_VERSION_19_1:12,TNS_CCAP_FIELD_VERSION_19_1_EXT_1:13,TNS_CCAP_FIELD_VERSION_20_1:14,TNS_CCAP_FIELD_VERSION_20_1_EXT_1:15,TNS_CCAP_FIELD_VERSION_21_1:16,TNS_CCAP_FIELD_VERSION_23_1:17,TNS_CCAP_FIELD_VERSION_23_1_EXT_1:18,TNS_CCAP_FIELD_VERSION_23_1_EXT_2:19,TNS_CCAP_FIELD_VERSION_23_1_EXT_3:20,TNS_CCAP_FIELD_VERSION_23_1_EXT_4:21,TNS_CCAP_FIELD_VERSION_23_1_EXT_5:22,TNS_CCAP_FIELD_VERSION_23_1_EXT_6:23,TNS_CCAP_FIELD_VERSION_23_4:24,TNS_CCAP_FIELD_VERSION_MAX:24,TNS_CCAP_O5LOGON:8,TNS_CCAP_O5LOGON_NP:2,TNS_CCAP_O7LOGON:32,TNS_CCAP_O8LOGON_LONG_IDENTIFIER:64,TNS_CCAP_O9LOGON_LONG_PASSWORD:128,TNS_CCAP_END_OF_CALL_STATUS:1,TNS_CCAP_IND_RCD:8,TNS_CCAP_FAST_BVEC:32,TNS_CCAP_FAST_SESSION_PROPAGATE:16,TNS_CCAP_APP_CTX_PIGGYBACK:128,TNS_CCAP_TDS_VERSION_MAX:3,TNS_CCAP_RPC_VERSION_MAX:7,TNS_CCAP_RPC_SIG_VALUE:3,TNS_CCAP_DBF_VERSION_MAX:1,TNS_CCAP_LTXID:8,TNS_CCAP_IMPLICIT_RESULTS:16,TNS_CCAP_BIG_CHUNK_CLR:32,TNS_CCAP_KEEP_OUT_ORDER:128,TNS_CCAP_LOB_UB8_SIZE:1,TNS_CCAP_LOB_ENCS:2,TNS_CCAP_LOB_PREFETCH_DATA:4,TNS_CCAP_LOB_TEMP_SIZE:8,TNS_CCAP_LOB_PREFETCH:64,TNS_CCAP_LOB_12C:128,TNS_CCAP_DRCP:16,TNS_CCAP_ZLNP:4,TNS_CCAP_INBAND_NOTIFICATION:4,TNS_CCAP_END_OF_REQUEST:32,TNS_CCAP_CLIENT_FN_MAX:12,TNS_CCAP_LOB2_QUASI:1,TNS_CCAP_LOB2_2GB_PREFETCH:4,TNS_CCAP_CTB_IMPLICIT_POOL:8,TNS_CCAP_CTB_OAUTH_MSG_ON_ERR:16,TNS_CCAP_VECTOR_SUPPORT:8,TNS_CCAP_VECTOR_FEATURE_BINARY:1,TNS_CCAP_VECTOR_FEATURE_SPARSE:2,TNS_CCAP_TTC5_SESSIONLESS_TXNS:32,TNS_CCAP_OCI3_OCSSYNC:32,TNS_RCAP_COMPAT:0,TNS_RCAP_TTC:6,TNS_RCAP_MAX:7,TNS_RCAP_COMPAT_81:2,TNS_RCAP_TTC_ZERO_COPY:1,TNS_RCAP_TTC_32K:4,TNS_VERIFIER_TYPE_11G_1:45394,TNS_VERIFIER_TYPE_11G_2:6949,TNS_VERIFIER_TYPE_12C:18453,TNS_UDS_FLAGS_IS_JSON:256,TNS_UDS_FLAGS_IS_OSON:2048,TNS_EOCS_FLAGS_TXN_IN_PROGRESS:2,TNS_EOCS_FLAGS_SESS_RELEASE:32768,TNS_TPC_TXN_START:1,TNS_TPC_TXN_DETACH:2,TNS_TPC_TXN_POST_DETACH:4,TNS_TPC_TXN_COMMIT:1,TNS_TPC_TXN_ABORT:2,TNS_TPC_TXN_PREPARE:3,TNS_TPC_TXN_FORGET:4,TNS_TPC_TXN_STATE_PREPARE:0,TNS_TPC_TXN_STATE_REQUIRES_COMMIT:1,TNS_TPC_TXN_STATE_COMMITTED:2,TNS_TPC_TXN_STATE_ABORTED:3,TNS_TPC_TXN_STATE_READ_ONLY:4,TNS_TPC_TXN_STATE_FORGOTTEN:5,TNS_TPC_TRANS_SESSIONLESS:16,TNS_TPC_TRANS_SESSIONLESS_FORMAT:5135422,TNS_TPC_TRANS_TRANSACTION_ID_SYNC_VERSION_1:1,TNS_TPC_TRANS_TRANSACTION_ID_SYNC_SET:64,TNS_TPC_TRANS_TRANSACTION_ID_SYNC_UNSET:128,TNS_TPC_TRANS_TRANSACTION_ID_SYNC_SERVER:1,TNS_TPC_TRANS_TRANSACTION_ID_SYNC_CLIENT:2,TNS_TPC_TRANS_TRANSACTION_ID_SYNC_TXEND_XA:3,TNS_AQ_MSG_PERSISTENT:n$.AQ_MSG_DELIV_MODE_PERSISTENT,TNS_AQ_MSG_BUFFERED:n$.AQ_MSG_DELIV_MODE_BUFFERED,TNS_AQ_MSG_PERSISTENT_OR_BUFFERED:n$.AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED,TNS_AQ_DEQ_BROWSE:1,TNS_AQ_DEQ_LOCKED:2,TNS_AQ_DEQ_REMOVE:3,TNS_AQ_DEQ_REMOVE_NODATA:4,TNS_AQ_DEQ_FIRST_MSG:1,TNS_AQ_DEQ_NEXT_MSG:3,TNS_AQ_DEQ_NEXT_TRANSACTION:2,TNS_AQ_DEQ_IMMEDIATE:1,TNS_AQ_DEQ_ON_COMMIT:2,TNS_AQ_DEQ_NO_WAIT:0,TNS_AQ_DEQ_WAIT_FOREVER:4294967295,TNS_AQ_ENQ_IMMEDIATE:1,TNS_AQ_ENQ_ON_COMMIT:2,TNS_AQ_MSG_EXPIRED:3,TNS_AQ_MSG_PROCESSED:2,TNS_AQ_MSG_READY:0,TNS_AQ_MSG_WAITING:1,TNS_AQ_MSG_NO_DELAY:0,TNS_AQ_MSG_NO_EXPIRATION:-1,TNS_AQ_ARRAY_ENQ:1,TNS_AQ_ARRAY_DEQ:2,TNS_AQ_ARRAY_FLAGS_RETURN_MESSAGE_ID:1,TNS_TTC_ENQ_STREAMING_ENABLED:1,TNS_TTC_ENQ_STREAMING_DISABLED:0,TNS_KPD_AQ_BUFMSG:2,TNS_KPD_AQ_EITHER:16,TNS_AQ_MESSAGE_ID_LENGTH:16,TNS_AQ_MESSAGE_VERSION:1,TNS_AQ_EXT_KEYWORD_AGENT_NAME:64,TNS_AQ_EXT_KEYWORD_AGENT_ADDRESS:65,TNS_AQ_EXT_KEYWORD_AGENT_PROTOCOL:66,TNS_AQ_EXT_KEYWORD_ORIGINAL_MSGID:69,TNS_ESCAPE_CHAR:253,TNS_LONG_LENGTH_INDICATOR:AL1.TNS_LONG_LENGTH_INDICATOR,TNS_NULL_LENGTH_INDICATOR:AL1.TNS_NULL_LENGTH_INDICATOR,TNS_MAX_ROWID_LENGTH:18,TNS_DURATION_SESSION:10,TNS_MAX_LONG_LENGTH:2147483647,TNS_SDU:8192,TNS_TDU:65535,TNS_MAX_CONNECT_DATA:230,TNS_MAX_UROWID_LENGTH:3950,TNS_SERVER_CONVERTS_CHARS:1,DRCP_DEAUTHENTICATE:2,TNS_OBJ_IS_VERSION_81:128,TNS_OBJ_IS_DEGENERATE:16,TNS_OBJ_IS_COLLECTION:8,TNS_OBJ_NO_PREFIX_SEG:4,TNS_OBJ_IMAGE_VERSION:1,TNS_OBJ_MAX_SHORT_LENGTH:245,TNS_OBJ_ATOMIC_NULL:253,TNS_OBJ_NON_NULL_OID:2,TNS_OBJ_HAS_EXTENT_OID:8,TNS_OBJ_TOP_LEVEL:1,TNS_OBJ_HAS_INDEXES:16,TNS_OBJ_PLSQL_INDEX_TABLE:1,TNS_OBJ_NESTED_TABLE:2,TNS_OBJ_VARRAY:3,TNS_OBJ_TDS_TYPE_CHAR:1,TNS_OBJ_TDS_TYPE_DATE:2,TNS_OBJ_TDS_TYPE_FLOAT:5,TNS_OBJ_TDS_TYPE_NUMBER:6,TNS_OBJ_TDS_TYPE_VARCHAR:7,TNS_OBJ_TDS_TYPE_BOOLEAN:8,TNS_OBJ_TDS_TYPE_RAW:19,TNS_OBJ_TDS_TYPE_TIMESTAMP:21,TNS_OBJ_TDS_TYPE_TIMESTAMP_TZ:23,TNS_OBJ_TDS_TYPE_OBJ:27,TNS_OBJ_TDS_TYPE_COLL:28,TNS_OBJ_TDS_TYPE_CLOB:29,TNS_OBJ_TDS_TYPE_BLOB:30,TNS_OBJ_TDS_TYPE_TIMESTAMP_LTZ:33,TNS_OBJ_TDS_TYPE_BINARY_FLOAT:37,TNS_OBJ_TDS_TYPE_START_EMBED_ADT:39,TNS_OBJ_TDS_TYPE_END_EMBED_ADT:40,TNS_OBJ_TDS_TYPE_SUBTYPE_MARKER:43,TNS_OBJ_TDS_TYPE_EMBED_ADT_INFO:44,TNS_OBJ_TDS_TYPE_BINARY_DOUBLE:45,TNS_XML_TYPE_LOB:1,TNS_XML_TYPE_STRING:4,TNS_XML_TYPE_FLAG_SKIP_NEXT_4:1048576,TNS_ERR_INCONSISTENT_DATA_TYPES:932,TNS_ERR_VAR_NOT_IN_SELECT_LIST:1007,TNS_ERR_INBAND_MESSAGE:12573,TNS_ERR_INVALID_SERVICE_NAME:12514,TNS_ERR_INVALID_SID:12505,TNS_ERR_NO_DATA_FOUND:1403,TNS_ERR_SESSION_SHUTDOWN:12572,TNS_ERR_NO_MESSAGES_FOUND:25228,TNS_WARN_COMPILATION_CREATE:32,TNS_VECTOR_MAX_LENGTH:1048576,VECTOR_FORMAT_FLEX:0,VECTOR_META_FLAG_FLEXIBLE_DIM:1,VECTOR_META_FLAG_SPARSE:2,PACKET_HEADER_SIZE:8,NUMBER_AS_TEXT_CHARS:172,CHUNKED_BYTES_CHUNK_SIZE:65536,TNS_DATA_FLAGS_END_OF_REQUEST:8192,TNS_BASE64_ALPHABET_ARRAY:NL1.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),TNS_EXTENT_OID:NL1.from("00000000000000000000000000010001","hex")}});var JP=o((wR5,ML1)=>{var{Buffer:uz0}=A0("buffer"),OL1=E9(),id6=A0("crypto");class EL1 extends Error{}function ua($,Y,X,G){for(let J=0;J<X;J++)$[G+X-J-1]=OL1.TNS_BASE64_ALPHABET_ARRAY[Y&63],Y=Y>>6;return G+X}function nd6($){let Y=0;if($.rba!==0||$.partitionID!==0||$.blockNum!==0||$.slotNum!=0){let X=uz0.allocUnsafe(OL1.TNS_MAX_ROWID_LENGTH);return Y=ua(X,$.rba,6,Y),Y=ua(X,$.partitionID,3,Y),Y=ua(X,$.blockNum,6,Y),ua(X,$.slotNum,3,Y),X.toString("utf8")}}function rd6($){let Y=uz0.from($),X=id6.randomBytes(Y.length);for(let G=0;G<Y.length;G++)Y[G]=X[G]^Y[G];return{obfuscatedValue:X,value:Y}}function ad6($,Y){let X=uz0.from($);for(let J=0;J<$.length;J++)X[J]=$[J]^Y[J];let G=X.toString();return X.fill(0),G}ML1.exports={encodeRowID:nd6,getDeobfuscatedValue:ad6,OutOfPacketsError:EL1,setObfuscatedValue:rd6}});var pz0=o((_R5,qL1)=>{var sd6=A0("process"),{Readable:od6}=A0("stream");class RL1 extends od6{constructor($){super({objectMode:!0});if(this._fetching=!1,this._numRows=0,$)sd6.nextTick(()=>{this._open($)})}async _destroy($,Y){if(this._resultSet){let X=this._resultSet;if(this._resultSet=null,this._fetching)await new Promise((G)=>this.once("_doneFetching",G));try{await X._impl.close()}catch(G){Y(G);return}}Y($)}_open($){this._resultSet=$,this.emit("open"),this.emit("metadata",$.metaData)}async _read(){if(!this._resultSet){this.once("open",this._read);return}try{this._fetching=!0,this._resultSet._allowGetRowCall=!0;let $=await this._resultSet.getRow();if($)this.push($);else this.push(null)}catch($){this.destroy($)}finally{if(this._fetching=!1,this._resultSet)this._resultSet._allowGetRowCall=!1;else this.emit("_doneFetching")}}}qL1.exports=RL1});var da=o((jR5,PL1)=>{var td6=pz0(),ed6=QP(),$c6=GY(),Yc6=SY(),Xc6=iA(),r$=O4();class pa{constructor(){this._rowCache=[],this._processingStarted=!1,this._convertedToStream=!1,this._allowGetRowCall=!1,this._isActive=!1}async _getAllRows(){try{let $=this._impl.maxRows,Y=this._impl.fetchArraySize,X=[];while(!0){if($>0&&Y>=$)Y=$;let G=await this._getRows(Y);if(G)await this._processRows(G,!0),X=X.concat(G);if(G.length==$||G.length<Y)break;if($>0)$-=G.length}return X}finally{await this._impl.close(),delete this._impl}}async _getRows($){let Y={};if(this._impl.nestedCursorIndices.length>0)Y={connection:this._connection,outFormat:this._impl.outFormat,fetchArraySize:this._impl.fetchArraySize,dbObjectAsPojo:this._impl.dbObjectAsPojo,maxRows:this._impl.maxRows,fetchTypeMap:this._impl.fetchTypeMap};return await this._impl.getRows($,Y)}async _processRows($,Y){for(let X of this._impl.nestedCursorIndices)for(let G=0;G<$.length;G++){let J=$[G][X];if(J){let Q=new pa;if(Q._setup(this._connection,J),this._impl.metaData[X].metaData=J.metaData,Y)$[G][X]=await Q._getAllRows();else $[G][X]=Q}}for(let X of this._impl.lobIndices)for(let G=0;G<$.length;G++){let J=$[G][X];if(J)($[G][X]=new Xc6)._setup(J,!0)}for(let X of this._impl.dbObjectIndices){let G=this._impl.metaData[X].dbTypeClass;for(let J=0;J<$.length;J++){let Q=$[J][X];if(Q){let W=$[J][X]=Object.create(G.prototype);if(W._impl=Q,this._impl.dbObjectAsPojo)$[J][X]=W._toPojo();else if(W.isCollection)$[J][X]=new Proxy(W,ed6._collectionProxyHandler)}}}for(let X of this._impl.converterIndices){let G=this._impl.metaData[X].converter;this._connection._impl._inProgress=!1;try{for(let J=0;J<$.length;J++){let Q=G($[J][X]);if(Q instanceof Promise)Q=await Q;$[J][X]=Q}}finally{this._connection._impl._inProgress=!0}}if(this._impl.outFormat===Yc6.OUT_FORMAT_OBJECT)for(let X=0;X<$.length;X++){let G=$[X],J=$[X]={},Q=this._impl.metaData;for(let W=0;W<Q.length;W++)J[Q[W].name]=G[W]}}_setup($,Y){this._connection=$,this._impl=Y}async close(){if(r$.assertArgCount(arguments,0,0),r$.assert(this._impl&&this._connection._impl,r$.ERR_INVALID_RS),this._convertedToStream)r$.throwErr(r$.ERR_CANNOT_INVOKE_RS_METHODS);this._processingStarted=!0;let $=this._impl;delete this._impl,await $.close()}async getRow(){if(r$.assertArgCount(arguments,0,0),r$.assert(this._impl&&this._connection._impl,r$.ERR_INVALID_RS),this._convertedToStream&&!this._allowGetRowCall)r$.throwErr(r$.ERR_CANNOT_INVOKE_RS_METHODS);if(this._allowGetRowCall=!1,this._processingStarted=!0,this._rowCache.length==0){let $=await this._getRows(this._impl.fetchArraySize);await this._processRows($,!1),this._rowCache=$}return this._rowCache.shift()}async getRows($){let Y;if(r$.assertArgCount(arguments,0,1),r$.assert(this._impl&&this._connection._impl,r$.ERR_INVALID_RS),arguments.length==0)$=0;else r$.assertParamValue(Number.isInteger($)&&$>=0,1);if(this._convertedToStream)r$.throwErr(r$.ERR_CANNOT_INVOKE_RS_METHODS);this._processingStarted=!0;let X;if($==0){X=this._rowCache;let G=this._impl.fetchArraySize;while(!0){let J=await this._getRows(G);if(J)await this._processRows(J,!1),X=X.concat(J);if(J.length<G)break}return X}if(this._rowCache.length===0)X=await this._getRows($),await this._processRows(X,!1);else if(Y=$-this._rowCache.length,Y<=0)X=this._rowCache.splice(0,$);else{let G=await this._getRows(Y);await this._processRows(G,!1),X=this._rowCache.concat(G),this._rowCache=[]}return X}get metaData(){if(this._impl)return this._impl.metaData;return}toQueryStream(){if(r$.assertArgCount(arguments,0,0),this._processingStarted)r$.throwErr(r$.ERR_CANNOT_CONVERT_RS_TO_STREAM);if(this._convertedToStream)r$.throwErr(r$.ERR_RS_ALREADY_CONVERTED);return this._convertedToStream=!0,new td6(this)}[Symbol.asyncIterator](){let $=this;return{async next(){let Y=await $.getRow();return{value:Y,done:Y===void 0}},return(){return{done:!0}}}}}$c6.wrapFns(pa.prototype,r$.ERR_BUSY_RS,"close","getRow","getRows");PL1.exports=pa});var qx=o((TR5,TL1)=>{var dz0=QP(),{Buffer:cz0}=A0("buffer"),Gc6=iA(),Jc6=da(),Qc6=SY(),a$=O4(),wL1=A0("util"),h8=kY(),_L1=GY();function j2($,Y){if($.type===void 0&&arguments.length>2)$.type=arguments[2];else{let X=!1;for(let G=2;G<arguments.length;G++)if($.type===arguments[G]){X=!0;break}if(!X)if($.attrName)a$.throwErr(a$.ERR_WRONG_VALUE_FOR_DBOBJECT_ATTR,$.attrName,$.fqn);else if($.fqn)a$.throwErr(a$.ERR_WRONG_VALUE_FOR_DBOBJECT_ELEM,$.fqn);else if($.isArray&&$.name)a$.throwErr(a$.ERR_INCOMPATIBLE_TYPE_ARRAY_BIND,Y.pos,$.name);else if($.isArray)a$.throwErr(a$.ERR_INCOMPATIBLE_TYPE_ARRAY_INDEX_BIND,Y.pos,$.pos);else a$.throwErr(a$.ERR_BIND_VALUE_AND_TYPE_MISMATCH)}}function ca($){if($===void 0||$===null||typeof $==="number"||typeof $==="string"||typeof $==="boolean"||cz0.isBuffer($)||wL1.types.isDate($)||_L1.isVectorValue($)||$ instanceof h8.IntervalYM||$ instanceof h8.IntervalDS)return $;if(Array.isArray($)){let X=Array($.length);for(let G=0;G<$.length;G++)X[G]=ca($[G]);return X}if($ instanceof dz0)return{fields:[],values:[]};if($ instanceof h8.JsonId)return $;let Y={};Y.fields=Object.getOwnPropertyNames($),Y.values=Array(Y.fields.length);for(let X=0;X<Y.fields.length;X++)Y.values[X]=ca($[Y.fields[X]]);return Y}function jL1($,Y,X){if(Y===void 0||Y===null)return;if($.type===h8.DB_TYPE_OBJECT){let G=Y;if(!(Y instanceof dz0))G=new $.typeClass(Y);return G._impl}else if($.type===h8.DB_TYPE_JSON)return ca(Y);else if(typeof Y==="string"){if(j2($,X,h8.DB_TYPE_VARCHAR,h8.DB_TYPE_NVARCHAR,h8.DB_TYPE_CHAR,h8.DB_TYPE_NCHAR,h8.DB_TYPE_CLOB,h8.DB_TYPE_NCLOB),$.type!==h8.DB_TYPE_CLOB&&$.type!==h8.DB_TYPE_NCLOB){let G=cz0.byteLength(Y);if($.maxSize===void 0||G>$.maxSize){if($.checkSize)a$.throwErr(a$.ERR_MAX_SIZE_TOO_SMALL,$.maxSize,G,X.pos);$.maxSize=G}}return Y}else if(typeof Y==="number"||typeof Y==="bigint"){if(j2($,X,h8.DB_TYPE_NUMBER,h8.DB_TYPE_BINARY_INTEGER,h8.DB_TYPE_BINARY_FLOAT,h8.DB_TYPE_BINARY_DOUBLE),Number.isNaN(Y)&&$.type===h8.DB_TYPE_NUMBER)a$.throwErr(a$.ERR_NAN_VALUE);return Y}else if(typeof Y==="boolean")return j2($,X,h8.DB_TYPE_BOOLEAN),Y;else if(wL1.types.isDate(Y))return j2($,X,h8.DB_TYPE_TIMESTAMP,h8.DB_TYPE_TIMESTAMP_TZ,h8.DB_TYPE_TIMESTAMP_LTZ,h8.DB_TYPE_DATE),Y;else if(Y instanceof h8.IntervalYM)return j2($,X,h8.DB_TYPE_INTERVAL_YM),Y;else if(Y instanceof h8.IntervalDS)return j2($,X,h8.DB_TYPE_INTERVAL_DS),Y;else if(cz0.isBuffer(Y)){if(j2($,X,h8.DB_TYPE_RAW,h8.DB_TYPE_BLOB),$.type===h8.DB_TYPE_RAW&&($.maxSize===void 0||Y.length>$.maxSize)){if($.checkSize)a$.throwErr(a$.ERR_MAX_SIZE_TOO_SMALL,$.maxSize,Y.length,X.pos);$.maxSize=Y.length}return Y}else if(Y instanceof Jc6)return j2($,X,h8.DB_TYPE_CURSOR),Y._impl;else if(Y instanceof Gc6)return j2($,X,Y.type),Y._impl;else if(Y instanceof dz0)return j2($,X,h8.DB_TYPE_OBJECT),Y._impl;else if(_L1.isVectorValue(Y))return j2($,X,h8.DB_TYPE_VECTOR),Y;else if($.type===h8.DB_TYPE_VECTOR&&Array.isArray(Y))return new Float64Array(Y);else if(X.allowArray&&Array.isArray(Y)){if($.isArray=!0,$.dir===Qc6.BIND_IN)$.maxArraySize=Y.length||1;else if($.maxArraySize===void 0)a$.throwErr(a$.ERR_REQUIRED_MAX_ARRAY_SIZE);else if(Y.length>$.maxArraySize)a$.throwErr(a$.ERR_INVALID_ARRAY_SIZE);X.allowArray=!1;let G=Array(Y.length);for(let J=0;J<Y.length;J++)X.pos=J,G[J]=jL1($,Y[J],X);return G}if($.type===void 0)a$.throwErr(a$.ERR_INVALID_BIND_DATA_TYPE,2);j2($,X)}TL1.exports={transformJsonValue:ca,transformValueIn:jL1}});var QP=o((IR5,CL1)=>{var Wc6=iA(),IL1=GP(),x9=O4(),WP=kY(),lz0=A0("util");function iz0($,Y,X,G){let J,Q=!1;if(X){switch(Y.type){case WP.DB_TYPE_VARCHAR:case WP.DB_TYPE_NVARCHAR:case WP.DB_TYPE_NCHAR:case WP.DB_TYPE_CHAR:if(J=Buffer.byteLength(X),J>Y.maxSize)Q=!0;break;case WP.DB_TYPE_RAW:if(J=X.length,J>Y.maxSize)Q=!0;break;default:break}if(Q)if(G!==void 0)x9.throwErr(x9.ERR_WRONG_LENGTH_FOR_DBOBJECT_ELEM,G,$.fqn,J,Y.maxSize);else x9.throwErr(x9.ERR_WRONG_LENGTH_FOR_DBOBJECT_ATTR,Y.name,$.fqn,J,Y.maxSize)}}class rA{_ensureCollection(){if(!this.isCollection)x9.throwErr(x9.ERR_OBJECT_IS_NOT_A_COLLECTION,this.name)}_getAttrValue($){let Y=this._impl.getAttrValue($);return this._transformValueOut(Y,$.typeClass,$)}_setAttrValue($,Y){let X={fqn:this._objType.fqn,attrName:$.name,type:$.type,typeClass:$.typeClass},G={allowArray:!1};Y=nz0.transformValueIn(X,Y,G),iz0(this._objType,$,Y),this._impl.setAttrValue($,Y)}_toPojo(){if(this.isCollection){let Y=this.getValues();if(this.elementType===WP.DB_TYPE_OBJECT)for(let X=0;X<Y.length;X++)Y[X]=Y[X]._toPojo();return Y}let $={};for(let Y in this.attributes){let X=this[Y];if(X instanceof rA)X=X._toPojo();$[Y]=X}return $}_transformValueOut($,Y,X){let G=$;if($ instanceof IL1.LobImpl)G=new Wc6,G._setup($,!0);else{if($ instanceof IL1.DbObjectImpl){if(G=Object.create(Y.prototype),G._impl=$,G.isCollection)G=new Proxy(G,rA._collectionProxyHandler)}if(X.converter)G=X.converter(G)}return G}append($){x9.assertArgCount(arguments,1,1),this._ensureCollection();let Y={fqn:this._objType.fqn,type:this._objType.elementType,typeClass:this._objType.elementTypeClass},X={allowArray:!1};$=nz0.transformValueIn(Y,$,X);let G=this._impl.getLastIndex();if(G)G=G+1;else G=0;iz0(this._objType,this._objType.elementTypeInfo,$,G),this._impl.append($)}get attributes(){if(!this._attributes){let $=this._objType.attributes||[],Y={};for(let X=0;X<$.length;X++){let G=$[X],J={type:G.type,typeName:G.typeName};if(G.typeClass)J.typeClass=G.typeClass;if(G.precision!=null)J.precision=G.precision;if(G.scale!=null)J.scale=G.scale;if(G.maxSize!=null)J.maxSize=G.maxSize;Y[G.name]=J}this._attributes=Y}return this._attributes}copy(){x9.assertArgCount(arguments,0,0);let $=Object.create(this);if($._impl=this._impl.copy(),this.isCollection)return new Proxy($,rA._collectionProxyHandler);return $}deleteElement($){return x9.assertArgCount(arguments,1,1),this._ensureCollection(),x9.assertParamValue(Number.isInteger($),1),this._impl.deleteElement($)}get elementType(){return this._objType.elementType}get elementTypeClass(){return this._objType.elementTypeClass}get elementTypeName(){return this._objType.elementTypeName}get fqn(){return this._objType.fqn}get length(){if(this.isCollection)return this._impl.getLength();return}getElement($){x9.assertArgCount(arguments,1,1),this._ensureCollection(),x9.assertParamValue(Number.isInteger($),1);let Y=this._impl.getElement($);return this._transformValueOut(Y,this.elementTypeClass,this._objType.elementTypeInfo)}getKeys(){return x9.assertArgCount(arguments,0,0),this._ensureCollection(),this._impl.getKeys()}getFirstIndex(){return x9.assertArgCount(arguments,0,0),this._ensureCollection(),this._impl.getFirstIndex()}getLastIndex(){return x9.assertArgCount(arguments,0,0),this._ensureCollection(),this._impl.getLastIndex()}getNextIndex($){return x9.assertArgCount(arguments,1,1),this._ensureCollection(),x9.assertParamValue(Number.isInteger($),1),this._impl.getNextIndex($)}getPrevIndex($){return x9.assertArgCount(arguments,1,1),this._ensureCollection(),x9.assertParamValue(Number.isInteger($),1),this._impl.getPrevIndex($)}getValues(){x9.assertArgCount(arguments,0,0),this._ensureCollection();let $=this._impl.getValues();for(let Y=0;Y<$.length;Y++)$[Y]=this._transformValueOut($[Y],this.elementTypeClass,this._objType.elementTypeInfo);return $}hasElement($){return x9.assertArgCount(arguments,1,1),this._ensureCollection(),x9.assertParamValue(Number.isInteger($),1),this._impl.hasElement($)}get isCollection(){return this._objType.isCollection}get name(){return this._objType.name}get schema(){return this._objType.schema}get packageName(){return this._objType.packageName}setElement($,Y){x9.assertArgCount(arguments,2,2),this._ensureCollection(),x9.assertParamValue(Number.isInteger($),1);let X={fqn:this._objType.fqn,type:this._objType.elementType,typeClass:this._objType.elementTypeClass},G={allowArray:!1};Y=nz0.transformValueIn(X,Y,G),iz0(this._objType,this._objType.elementTypeInfo,Y,$),this._impl.setElement($,Y)}trim($){x9.assertArgCount(arguments,1,1),this._ensureCollection(),x9.assertParamValue(Number.isInteger($)&&$>=0,1),this._impl.trim($)}[lz0.inspect.custom]($,Y){return"["+this.fqn+"] "+lz0.inspect(this._toPojo(),Y)}[Symbol.iterator](){if(this.isCollection)return this.getValues()[Symbol.iterator]();throw TypeError("obj is not iterable")}[Symbol.toPrimitive]($){switch($){case"number":return NaN;default:return"["+this.fqn+"] "+lz0.inspect(this._toPojo(),{})}}get[Symbol.toStringTag](){return this.fqn}toJSON(){return this._toPojo()}toMap(){x9.assertArgCount(arguments,0,0),this._ensureCollection();let $=new Map;return this.getKeys().forEach((Y)=>{$.set(Y,this.getElement(Y))}),$}}function Kc6($){return function(){try{return $.apply(this,arguments)}catch(Y){throw x9.transformErr(Y,x9.transformErr)}}}function Zc6($){for(let Y=1;Y<arguments.length;Y++){let X=arguments[Y];$[X]=Kc6($[X])}}Zc6(rA.prototype,"_getAttrValue","_setAttrValue","append","copy","deleteElement","getElement","getKeys","getFirstIndex","getLastIndex","getNextIndex","getPrevIndex","getValues","toMap","hasElement","setElement","trim");rA._collectionProxyHandler={deleteProperty($,Y){if(typeof Y==="string"){let X=+Y;if(!isNaN(X))return $.deleteElement(X)}return delete $[Y]},get($,Y){if(typeof Y==="string"){let G=+Y;if(!isNaN(G))return $.getElement(G)}let X=$[Y];if(typeof X==="function")return X.bind($);return X},set($,Y,X){if(typeof Y==="string"){let G=+Y;if(!isNaN(G))return $.setElement(G,X),!0}return $[Y]=X,!0}};CL1.exports=rA;var nz0=qx()});var tz0=o((CR5,SL1)=>{var{Buffer:rz0}=A0("buffer"),WY=O4(),sz0=GY(),Uc6=hz0(),Hc6=gz0(),zc6=mz0(),az0=QP(),Vc6=qx(),KP=kY();class oz0{_isPayload($){return typeof $==="string"||rz0.isBuffer($)||$ instanceof az0}_makeMessage($){let Y=new zc6;return Y._impl=$,Y._payloadTypeClass=this._payloadTypeClass,Y}_verifyMessage($){let Y;if(this._isPayload($))Y=$,$={};else if($={...$},this._isJson||this._isPayload($.payload))Y=$.payload;else if(this._payloadTypeClass)Y=new this._payloadTypeClass($.payload);else WY.throwErr(WY.ERR_INVALID_AQ_MESSAGE);if(this._isJson)$.payload=Vc6.transformJsonValue(Y);else if(typeof Y==="string"||rz0.isBuffer(Y))$.payload=rz0.from(Y);else if(this._payloadType==KP.DB_TYPE_OBJECT){if(!(Y instanceof az0)||this._payloadTypeName!==Y._impl._objType.name)WY.throwErr(WY.ERR_PAYLOAD_CANNOT_BE_ENQUEUED);$.payload=Y._impl}else WY.throwErr(WY.ERR_PAYLOAD_CANNOT_BE_ENQUEUED);if($.correlation!==void 0)WY.assertParamPropValue(typeof $.correlation==="string",1,"correlation");if($.delay!==void 0)WY.assertParamPropValue(Number.isInteger($.delay),1,"delay");if($.exceptionQueue!==void 0)WY.assertParamPropValue(typeof $.exceptionQueue==="string",1,"exceptionQueue");if($.expiration!==void 0)WY.assertParamPropValue(Number.isInteger($.expiration),1,"expiration");if($.priority!==void 0)WY.assertParamPropValue(Number.isInteger($.priority),1,"priority");if($.recipients!==void 0)WY.assertParamPropValue(sz0.isArrayOfStrings($.recipients),1,"recipients");return $}async create($,Y,X){if(X.payloadType===KP.DB_TYPE_JSON)this._isJson=!0,this._payloadType=KP.DB_TYPE_JSON,this._payloadTypeName="JSON";else if(X.payloadType===void 0||X.payloadType===KP.DB_TYPE_RAW)this._payloadType=KP.DB_TYPE_RAW,this._payloadTypeName="RAW";else{if(typeof X.payloadType==="string"){let G=await $._getDbObjectClassForName(X.payloadType);this._payloadTypeClass=G,X.payloadType=G}else WY.assertParamPropValue(sz0.isObject(X.payloadType)&&X.payloadType.prototype instanceof az0,2,"payloadType"),this._payloadTypeClass=X.payloadType;this._payloadType=KP.DB_TYPE_OBJECT,this._payloadTypeName=this._payloadTypeClass.prototype.name}this._name=Y,this._impl=await $._impl.getQueue(Y,this._payloadTypeClass,this._payloadType)}async deqMany($){return WY.assertArgCount(arguments,1,1),WY.assertParamValue(Number.isInteger($)&&$>0,1),(await this._impl.deq($)).map((X)=>this._makeMessage(X))}async deqOne(){WY.assertArgCount(arguments,0,0);let $=await this._impl.deq(1);if($.length>0)return this._makeMessage($[0])}get deqOptions(){if(!this._deqOptions){let $=new Uc6;$._impl=this._impl.deqOptions,this._deqOptions=$}return this._deqOptions}async enqMany($){WY.assertArgCount(arguments,1,1),WY.assertParamValue(Array.isArray($)&&$.length>0,1);let Y=Array($.length);for(let G=0;G<$.length;G++)Y[G]=this._verifyMessage($[G]);return(await this._impl.enq(Y)).map((G)=>this._makeMessage(G))}async enqOne($){WY.assertArgCount(arguments,1,1),$=this._verifyMessage($);let Y=await this._impl.enq([$]);return this._makeMessage(Y[0])}get enqOptions(){if(!this._enqOptions){let $=new Hc6;$._impl=this._impl.enqOptions,this._enqOptions=$}return this._enqOptions}get name(){return this._name}get payloadType(){return this._payloadType}get payloadTypeName(){return this._payloadTypeName}get payloadTypeClass(){return this._payloadTypeClass}}sz0.wrapFns(oz0.prototype,"deqOne","deqMany","enqOne","enqMany");SL1.exports=oz0});var ZP=o((SR5,kL1)=>{class ez0{get createdOn(){return this._impl.getCreatedOn()}getContent(){let $=this._impl.getContent();if(typeof $==="string"&&this.mediaType==="application/json")return JSON.parse($);return $}getContentAsBuffer(){let $=this._impl.getContent();if(Buffer.isBuffer($))return $;else if(typeof $=="string")return Buffer.from($);return Buffer.from(JSON.stringify($))}getContentAsString(){let $=this._impl.getContent();if(typeof $==="string")return $;else if(Buffer.isBuffer($))return $.toString();return JSON.stringify($)}get key(){return this._impl.getKey()}get lastModified(){return this._impl.getLastModified()}get mediaType(){return this._impl.getMediaType()}get version(){return this._impl.getVersion()}}ez0.prototype._sodaDocumentMarker=!0;kL1.exports=ez0});var YV0=o((kR5,vL1)=>{var UP=O4(),Fc6=GY(),Lc6=ZP();class $V0{async close(){UP.assertArgCount(arguments,0,0),UP.assert(this._impl,UP.ERR_INVALID_SODA_DOC_CURSOR),await this._impl.close(),delete this._impl}async getNext(){UP.assertArgCount(arguments,0,0),UP.assert(this._impl,UP.ERR_INVALID_SODA_DOC_CURSOR);let $=await this._impl.getNext();if($){let Y=new Lc6;return Y._impl=$,Y}}[Symbol.asyncIterator](){let $=this;return{async next(){let Y=await $.getNext();return{value:Y,done:Y===void 0}},return(){return{done:!0}}}}}Fc6.wrapFns($V0.prototype,"close","getNext");vL1.exports=$V0});var JV0=o((vR5,bL1)=>{var Dc6=YV0(),XV0=ZP(),a5=O4(),yL1=GY(),xL1=w2();class GV0{constructor($){this._options={autoCommit:xL1.autoCommit,fetchArraySize:xL1.fetchArraySize},this._sodaDb=$}async count(){return a5.assertArgCount(arguments,0,0),await this._impl.count(this._options)}async getCursor(){a5.assertArgCount(arguments,0,0);let $=new Dc6;return $._impl=await this._impl.getCursor(this._options),$}async getDocuments(){a5.assertArgCount(arguments,0,0);let $=await this._impl.getDocuments(this._options),Y=Array($.length);for(let X=0;X<$.length;X++)Y[X]=new XV0,Y[X]._impl=$[X];return Y}async getOne(){a5.assertArgCount(arguments,0,0);let $=await this._impl.getOne(this._options);if($){let Y=new XV0;return Y._impl=$,Y}}lock(){return a5.assertArgCount(arguments,0,0),this._options.lock=!0,this}async replaceOne($){return a5.assertArgCount(arguments,1,1),$=this._sodaDb._verifySodaDoc($),await this._impl.replaceOne(this._options,$)}async replaceOneAndGet($){a5.assertArgCount(arguments,1,1),$=this._sodaDb._verifySodaDoc($);let Y=await this._impl.replaceOneAndGet(this._options,$);if(Y){let X=new XV0;return X._impl=Y,X}}async remove(){return a5.assertArgCount(arguments,0,0),await this._impl.remove(this._options)}fetchArraySize($){return a5.assertArgCount(arguments,1,1),a5.assertParamValue(Number.isInteger($)&&$>=0,1),this._options.fetchArraySize=$,this}filter($){return a5.assertArgCount(arguments,1,1),a5.assertParamValue(yL1.isObject($),1),this._options.filter=JSON.stringify($),this}hint($){return a5.assertArgCount(arguments,1,1),a5.assertParamValue(typeof $==="string",1),this._options.hint=$,this}key($){return a5.assertArgCount(arguments,1,1),a5.assertParamValue(typeof $==="string",1),this._options.key=$,this._options.keys=void 0,this}keys($){a5.assertArgCount(arguments,1,1),a5.assertParamValue(Array.isArray($),1);for(let Y=0;Y<$.length;Y++)a5.assertParamValue(typeof $[Y]==="string",1);return this._options.keys=$,this._options.key=void 0,this}limit($){return a5.assertArgCount(arguments,1,1),a5.assertParamValue(Number.isInteger($)&&$>0,1),this._options.limit=$,this}skip($){return a5.assertArgCount(arguments,1,1),a5.assertParamValue(Number.isInteger($)&&$>=0,1),this._options.skip=$,this}version($){return a5.assertArgCount(arguments,1,1),a5.assertParamValue(typeof $==="string",1),this._options.version=$,this}}yL1.wrapFns(GV0.prototype,"count","getCursor","getDocuments","getOne","remove","replaceOne","replaceOneAndGet");bL1.exports=GV0});var WV0=o((xR5,hL1)=>{var la=ZP(),Nc6=JV0(),z$=O4(),Px=GY(),Yz=w2();class QV0{constructor($){this._sodaDb=$}async createIndex($){z$.assertArgCount(arguments,1,1),z$.assertParamValue(Px.isObject($),1);let Y={autoCommit:Yz.autoCommit};return await this._impl.createIndex(JSON.stringify($),Y)}async drop(){z$.assertArgCount(arguments,0,0);let $={autoCommit:Yz.autoCommit};return await this._impl.drop($)}async dropIndex($,Y){let X={autoCommit:Yz.autoCommit};if(z$.assertArgCount(arguments,1,2),z$.assertParamValue(typeof $==="string",1),arguments.length==2){if(z$.assertParamValue(typeof Y==="object",2),Y.force!==void 0)z$.assertParamPropValue(typeof Y.force==="boolean",2,"force"),X.force=Y.force}return await this._impl.dropIndex($,X)}find(){z$.assertArgCount(arguments,0,0);let $=new Nc6(this._sodaDb);return $._impl=this._impl.find(),$}async getDataGuide(){z$.assertArgCount(arguments,0,0);let $=new la;return $._impl=await this._impl.getDataGuide(),$}async insertMany($){z$.assertArgCount(arguments,1,1),z$.assertParamValue(Array.isArray($)&&$.length>0,1);let Y=Array($.length);for(let G=0;G<$.length;G++)Y[G]=this._sodaDb._verifySodaDoc($[G]);let X={autoCommit:Yz.autoCommit};await this._impl.insertMany(Y,X)}async insertManyAndGet($,Y){let X={autoCommit:Yz.autoCommit};if(z$.assertArgCount(arguments,1,2),z$.assertParamValue(Array.isArray($)&&$.length>0,1),arguments.length==2){if(z$.assertParamValue(Px.isObject(Y),2),Y.hint!==void 0)z$.assertParamPropValue(typeof Y.hint==="string",2,"hint"),X.hint=Y.hint}let G=Array($.length);for(let Q=0;Q<$.length;Q++)G[Q]=this._sodaDb._verifySodaDoc($[Q]);let J=await this._impl.insertManyAndGet(G,X);for(let Q=0;Q<$.length;Q++){let W=G[Q]=new la;W._impl=J[Q]}return G}async insertOne($){z$.assertArgCount(arguments,1,1),$=this._sodaDb._verifySodaDoc($);let Y={autoCommit:Yz.autoCommit};await this._impl.insertOne($,Y)}async insertOneAndGet($,Y){let X={autoCommit:Yz.autoCommit};if(z$.assertArgCount(arguments,1,2),$=this._sodaDb._verifySodaDoc($),arguments.length==2){if(z$.assertParamValue(Px.isObject(Y),2),Y.hint!==void 0)z$.assertParamPropValue(typeof Y.hint==="string",2,"hint"),X.hint=Y.hint}let G=new la;return G._impl=await this._impl.insertOneAndGet($,X),G}async listIndexes(){return(await this._impl.listIndexes()).map((Y)=>JSON.parse(Y))}get metaData(){return JSON.parse(this._impl.getMetaData())}get name(){return this._impl.getName()}async save($){z$.assertArgCount(arguments,1,1),$=this._sodaDb._verifySodaDoc($);let Y={autoCommit:Yz.autoCommit};await this._impl.save($,Y)}async saveAndGet($,Y){z$.assertArgCount(arguments,1,2),$=this._sodaDb._verifySodaDoc($);let X={autoCommit:Yz.autoCommit};if(arguments.length==2){if(z$.assertParamValue(Px.isObject(Y),2),Y.hint!==void 0)z$.assertParamPropValue(typeof Y.hint==="string",2,"hint"),X.hint=Y.hint}let G=new la;return G._impl=await this._impl.saveAndGet($,X),G}async truncate(){z$.assertArgCount(arguments,0,0),await this._impl.truncate()}}Px.wrapFns(QV0.prototype,"createIndex","drop","dropIndex","getDataGuide","insertMany","insertManyAndGet","insertOne","insertOneAndGet","listIndexes","save","saveAndGet","truncate");hL1.exports=QV0});var ZV0=o((yR5,uL1)=>{var{Buffer:wx}=A0("buffer"),fL1=WV0(),Ac6=ZP(),HX=O4(),aA=GY(),gL1=w2(),mL1=qx();class KV0{_getConnection(){return this._connection}async createCollection($,Y){let X={autoCommit:gL1.autoCommit};if(HX.assertArgCount(arguments,1,2),HX.assertParamValue(typeof $==="string",1),arguments.length==2){if(HX.assertParamValue(aA.isObject(Y),2),Y.mode!==void 0)HX.assertParamPropValue(Number.isInteger(Y.mode)&&Y.mode>0,2,"mode"),X.mode=Y.mode;if(Y.metaData!==void 0)HX.assertParamPropValue(aA.isObject(Y.metaData),2,"metaData"),X.metaData=JSON.stringify(Y.metaData)}let G=new fL1(this);return G._impl=await this._impl.createCollection($,X),G}createDocument($,Y){let X={},G;if(HX.assertArgCount(arguments,1,2),HX.assertParamValue(wx.isBuffer($)||typeof $==="string"||aA.isObject($),1),arguments.length>1)HX.assertParamValue(aA.isObject(Y),2),X=Y,HX.assertParamPropString(X,2,"key"),HX.assertParamPropString(X,2,"mediaType");if(this._impl.supportsJson&&(!X.mediaType||X.mediaType==="application/json"))G=mL1.transformJsonValue($);else if(wx.isBuffer($))G=$;else if(typeof $==="string")G=wx.from($);else G=wx.from(JSON.stringify($));let J=new Ac6;return J._impl=this._impl.createDocument(G,X),J}async getCollectionNames($){let Y={};if(HX.assertArgCount(arguments,0,1),arguments.length==1){if(HX.assertParamValue(aA.isObject($),1),Y=$,Y.startsWith!==void 0)HX.assertParamPropValue(typeof Y.startsWith==="string",1,"startsWith");if(Y.limit!==void 0)HX.assertParamPropValue(Number.isInteger(Y.limit),1,"limit")}return await this._impl.getCollectionNames(Y)}async openCollection($){HX.assertArgCount(arguments,1,1),HX.assertParamValue(typeof $==="string",1);let Y={autoCommit:gL1.autoCommit},X=await this._impl.openCollection($,Y);if(X){let G=new fL1(this);return G._impl=X,G}}_verifySodaDoc($){if($!=null&&$._sodaDocumentMarker)return $._impl;if(HX.assertParamValue(aA.isObject($),1),this._impl._supportsJson)return mL1.transformJsonValue($);return wx.from(JSON.stringify($))}}aA.wrapFns(KV0.prototype,"createCollection","getCollectionNames","openCollection");uL1.exports=KV0});var HV0=o((bR5,iL1)=>{var Bc6=tz0(),HP=QP(),{Buffer:pL1}=A0("buffer"),UV0=iA(),ia=da(),Oc6=ZV0(),Ec6=A0("events"),Mc6=pz0(),j0=O4(),Y8=GY(),na=GP(),Rc6=A0("process"),qc6=A0("util"),w5=SY(),ra=w2(),dL1=qx(),l8=kY(),cL1=Mx(),_x=new Map,Pc6=($)=>$===null?null:parseFloat($);function lL1($,Y){if(delete $.converter,Y.dbObjectTypeHandler){let X=Y.dbObjectTypeHandler($);if(X!==void 0){if(j0.assert(typeof X==="object",j0.ERR_DB_FETCH_TYPE_HANDLER_RETURN_VALUE),X.converter!==void 0)j0.assert(typeof X.converter==="function",j0.ERR_DB_FETCH_TYPE_HANDLER_CONVERTER);if([l8.DB_TYPE_CLOB,l8.DB_TYPE_NCLOB,l8.DB_TYPE_BLOB,l8.DB_TYPE_BFILE].includes($.type))return j0.throwErr(j0.ERR_NOT_IMPLEMENTED,"DbObjConverter for LOBs");$.converter=X.converter}}if($.type===l8.DB_TYPE_NUMBER&&!$.converter)$.converter=Pc6}class Xz extends Ec6{constructor(){super();this._dbObjectClasses=new Map,this._closing=!1}_addDefaultsToExecOpts($){if($.connection=this,$.keepInStmtCache===void 0)$.keepInStmtCache=!0;if($.suspendOnSuccess===void 0)$.suspendOnSuccess=!1;ra.addToOptions($,"autoCommit","dbObjectAsPojo","fetchArraySize","fetchTypeHandler","maxRows","outFormat","prefetchRows")}_buildDbObjectClass($){let Y=function(G){if(this._impl=new na.DbObjectImpl($),this.isCollection){let J=new Proxy(this,HP._collectionProxyHandler);if(G!==void 0)for(let Q=0;Q<G.length;Q++)this.append(G[Q]);return J}else if(G!==void 0)for(let J of $.attributes){let Q=G[J.name];if(Q!==void 0)this._setAttrValue(J,Q)}};if(Y.prototype=Object.create(HP.prototype),Y.prototype.constructor=Y,Y.prototype._objType=$,$.elementTypeClass){let G=this._getDbObjectClass($.elementTypeClass);$.elementTypeClass=G}let X={dbObjectTypeHandler:ra.dbObjectTypeHandler};if($.isCollection)Y8.addTypeProperties($,"elementType"),$.elementTypeInfo.type=$.elementType,lL1($.elementTypeInfo,X);if($.attributes){let G={};for(let J of $.attributes){if(J.typeClass)J.typeClass=this._getDbObjectClass(J.typeClass);Y8.addTypeProperties(J,"type");let Q={get(){return this._getAttrValue(J)},set(W){this._setAttrValue(J,W)}};G[J.name]=Q,lL1(J,X)}Object.defineProperties(Y.prototype,G)}return Y.toString=function(){return"DbObjectClass ["+$.fqn+"]"},Y}_getDbObjectClass($){if($.prototype instanceof HP)return $;let Y=this._dbObjectClasses.get($);if(!Y)Y=this._buildDbObjectClass($),Y._connection=this,Y._objType=$,$._connection=this._impl,this._dbObjectClasses.set($,Y);return Y}async _getDbObjectClassForName($){let Y=this._dbObjectClasses.get($);if(!Y){let X=await this._impl.getDbObjectClass($);Y=this._getDbObjectClass(X),this._dbObjectClasses.set($,Y)}return Y}_isBindDir($){return $===w5.BIND_IN||$===w5.BIND_OUT||$===w5.BIND_INOUT}_isBindValue($){return $===null||$===void 0||typeof $==="number"||typeof $==="string"||typeof $==="boolean"||typeof $==="bigint"||Array.isArray($)||Y8.isVectorValue($)||pL1.isBuffer($)||qc6.types.isDate($)||$ instanceof UV0||$ instanceof ia||$ instanceof HP}async _processBindUnit($,Y,X){let G=!1;if(Y.dir===void 0)$.dir=w5.BIND_IN;else j0.assert(this._isBindDir(Y.dir),j0.ERR_INVALID_BIND_DIRECTION),$.dir=Y.dir,G=!0;if(Y.type!==void 0){if(typeof Y.type==="string")$.type=l8.DB_TYPE_OBJECT,$.typeClass=await this._getDbObjectClassForName(Y.type),$.objType=$.typeClass._objType;else if(Y.type.prototype instanceof HP)$.type=l8.DB_TYPE_OBJECT,$.typeClass=Y.type,$.objType=$.typeClass._objType;else j0.assert(Y.type instanceof l8.DbType,j0.ERR_INVALID_BIND_DATA_TYPE,2),$.type=Y.type;G=!0}else if(X){if($.name)j0.throwErr(j0.ERR_MISSING_TYPE_BY_NAME,$.name);j0.throwErr(j0.ERR_MISSING_TYPE_BY_POS,$.pos)}if($.dir!==w5.BIND_IN||X)if(Y.maxSize!==void 0)j0.assertParamPropValue(Number.isInteger(Y.maxSize)&&Y.maxSize>0,2,"maxSize"),$.maxSize=Y.maxSize,$.checkSize=!0,G=!0;else if(X){if($.type===l8.DB_TYPE_VARCHAR||$.type===l8.DB_TYPE_RAW){if($.name)j0.throwErr(j0.ERR_MISSING_MAX_SIZE_BY_NAME,$.name);j0.throwErr(j0.ERR_MISSING_MAX_SIZE_BY_POS,$.pos)}}else $.maxSize=w5.DEFAULT_MAX_SIZE_FOR_OUT_BINDS;if($.isArray=!1,!X){if(Y.maxArraySize!==void 0)j0.assertParamPropValue(Number.isInteger(Y.maxArraySize)&&Y.maxArraySize>0,2,"maxArraySize"),$.maxArraySize=Y.maxArraySize,$.isArray=!0}if(!X&&Y.val!==void 0)return Y.val;if(!G)j0.throwErr(j0.ERR_INVALID_BIND_UNIT)}async _processBindValue($,Y,X){let G=dL1.transformValueIn($,Y,X);if($.isArray)$.values=G.concat($.values.slice(G.length));else $.values[X.pos]=G;if($.type===l8.DB_TYPE_OBJECT&&$.typeClass===void 0)$.typeClass=await this._getDbObjectClass(Y._objType),$.objType=$.typeClass._objType}async _processExecuteBind($,Y){$.isArray=!1;let X;if(this._isBindValue(Y))$.dir=w5.BIND_IN,X=Y;else X=await this._processBindUnit($,Y,!1);if($.dir!==w5.BIND_OUT){let G={pos:0,allowArray:!0};await this._processBindValue($,X,G)}if($.type===void 0){if($.type=l8.DB_TYPE_VARCHAR,$.maxSize===void 0)$.maxSize=1}if($.isArray&&$.type!==l8.DB_TYPE_VARCHAR&&$.type!==l8.DB_TYPE_NVARCHAR&&$.type!==l8.DB_TYPE_CHAR&&$.type!==l8.DB_TYPE_NCHAR&&$.type!==l8.DB_TYPE_NUMBER&&$.type!==l8.DB_TYPE_BINARY_FLOAT&&$.type!==l8.DB_TYPE_BINARY_DOUBLE&&$.type!==l8.DB_TYPE_DATE&&$.type!==l8.DB_TYPE_TIMESTAMP&&$.type!==l8.DB_TYPE_TIMESTAMP_LTZ&&$.type!==l8.DB_TYPE_TIMESTAMP_TZ&&$.type!==l8.DB_TYPE_RAW&&$.type!==l8.DB_TYPE_INTERVAL_YM&&$.type!==l8.DB_TYPE_INTERVAL_DS)j0.throwErr(j0.ERR_INVALID_TYPE_FOR_ARRAY_BIND)}async _processExecuteBinds($){let Y=[];if(Array.isArray($))for(let X=0;X<$.length;X++){let G=Y[X]={pos:X+1,values:[]};await this._processExecuteBind(G,$[X])}else{j0.assertParamValue(Y8.isObject($),2);let X=Object.getOwnPropertyNames($);for(let G=0;G<X.length;G++){let J=Y[G]={name:X[G],values:[]};await this._processExecuteBind(J,$[X[G]])}}return Y}async _processExecuteManyBinds($,Y){let X=[],G;if(Y!==void 0)if(Array.isArray(Y)){G=!0;for(let J=0;J<Y.length;J++){let Q=X[J]={pos:J+1,values:[]};await this._processBindUnit(Q,Y[J],!0)}}else{G=!1;let J=Object.getOwnPropertyNames(Y);for(let Q=0;Q<J.length;Q++){let W=X[Q]={name:J[Q],values:[]};await this._processBindUnit(W,Y[J[Q]],!0)}}else{let J=$[0];if(j0.assertParamValue(Y8.isObjectOrArray(J),2),Array.isArray(J)){G=!0;for(let Q=0;Q<J.length;Q++)X[Q]={pos:Q+1}}else{G=!1;let Q=Object.getOwnPropertyNames(J);for(let W=0;W<Q.length;W++)X[W]={name:Q[W]}}for(let Q=0;Q<X.length;Q++)X[Q].dir=w5.BIND_IN,X[Q].isArray=!1,X[Q].values=[]}for(let J=0;J<$.length;J++){let Q=$[J],W={pos:J,allowArray:!1};j0.assert(G&&Array.isArray(Q)||!G&&Y8.isObject(Q),j0.ERR_MIXED_BIND);for(let K=0;K<X.length;K++){let Z=X[K],H=G?Q[K]:Q[Z.name];await this._processBindValue(Z,H,W)}}for(let J=0;J<X.length;J++){let Q=X[J];if(Q.type===void 0)Q.type=l8.DB_TYPE_VARCHAR,Q.maxSize=1}return X}_transformOutBind($,Y){let X=$;if(Array.isArray($)){X=[];for(let G=0;G<$.length;G++)X.push(this._transformOutBind($[G],Y))}else if($ instanceof na.ResultSetImpl)X=new ia,X._setup(this,$);else if($ instanceof na.LobImpl)X=new UV0,X._setup($,!0);else if($ instanceof na.DbObjectImpl){let G=this._dbObjectClasses.get($._objType);if(X=Object.create(G.prototype),X._impl=$,Y.dbObjectAsPojo)X=X._toPojo();else if(X.isCollection)X=new Proxy(X,HP._collectionProxyHandler)}return X}_verifyExecOpts($,Y){let X={};if(j0.assertParamValue(Y8.isObject($),3),$.autoCommit!==void 0)j0.assertParamPropValue(typeof $.autoCommit==="boolean",3,"autoCommit"),X.autoCommit=$.autoCommit;if($.dbObjectAsPojo!==void 0)j0.assertParamPropValue(typeof $.dbObjectAsPojo==="boolean",3,"dbObjectAsPojo"),X.dbObjectAsPojo=$.dbObjectAsPojo;if($.keepInStmtCache!==void 0)j0.assertParamPropValue(typeof $.keepInStmtCache==="boolean",3,"keepInStmtCache"),X.keepInStmtCache=$.keepInStmtCache;if($.suspendOnSuccess!==void 0)j0.assertParamPropBool($,2,"suspendOnSucess"),X.suspendOnSuccess=$.suspendOnSuccess;if(Y){if($.bindDefs!==void 0)j0.assertParamPropValue(Y8.isObjectOrArray($.bindDefs),3,"bindDefs"),X.bindDefs=$.bindDefs;if($.batchErrors!==void 0)j0.assertParamPropValue(typeof $.batchErrors==="boolean",3,"batchErrors"),X.batchErrors=$.batchErrors;if($.dmlRowCounts!==void 0)j0.assertParamPropValue(typeof $.dmlRowCounts==="boolean",3,"dmlRowCounts"),X.dmlRowCounts=$.dmlRowCounts}else{if(j0.assertParamPropUnsignedIntNonZero($,3,"fetchArraySize"),X.fetchArraySize=$.fetchArraySize,$.fetchInfo!==void 0){j0.assertParamPropValue(Y8.isObject($.fetchInfo),3,"fetchInfo");let G=Object.getOwnPropertyNames($.fetchInfo),J=new Map(ra.fetchTypeMap);for(let Q of G){let W=$.fetchInfo[Q];if(W.type===void 0)j0.throwErr(j0.ERR_NO_TYPE_FOR_CONVERSION);if(W.type!==w5.DEFAULT&&W.type!==l8.DB_TYPE_VARCHAR&&W.type!==l8.DB_TYPE_RAW)j0.throwErr(j0.ERR_INVALID_TYPE_FOR_CONVERSION);J.set(Q,W.type)}X.fetchTypeMap=J}if($.fetchTypeHandler!==void 0){let G=typeof $.fetchTypeHandler;j0.assertParamPropValue(G==="function",3,"fetchTypeHandler"),X.fetchTypeHandler=$.fetchTypeHandler}if($.maxRows!==void 0)j0.assertParamPropValue(Number.isInteger($.maxRows)&&$.maxRows>=0,3,"maxRows"),X.maxRows=$.maxRows;if($.outFormat!==void 0)j0.assertParamPropValue($.outFormat===w5.OUT_FORMAT_ARRAY||$.outFormat===w5.OUT_FORMAT_OBJECT,3,"outFormat"),X.outFormat=$.outFormat;if($.prefetchRows!==void 0)j0.assertParamPropValue(Number.isInteger($.prefetchRows)&&$.prefetchRows>=0,3,"prefetchRows"),X.prefetchRows=$.prefetchRows;if($.resultSet!==void 0)j0.assertParamPropValue(typeof $.resultSet==="boolean",3,"resultSet"),X.resultSet=$.resultSet}return X}get action(){return null}set action($){j0.assertPropValue(typeof $==="string","action"),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),this._impl.setAction($)}async beginSessionlessTransaction($={}){if(j0.assertArgCount(arguments,0,1),j0.assertParamValue(Y8.isObject($),1),$.transactionId!==void 0)j0.assertParamPropValue(Y8.isTransactionId($.transactionId),1,"transactionId");j0.assertParamPropUnsignedIntNonZero($,1,"timeout"),j0.assertParamPropBool($,1,"deferRoundTrip");let Y=Y8.normalizeTransactionId($.transactionId),{timeout:X=60,deferRoundTrip:G=!1}=$;return await this._impl.startSessionlessTransaction(Y,X,w5.TPC_BEGIN_NEW,G),Y}async breakExecution(){j0.assertArgCount(arguments,0,0),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),await this._impl.breakExecution()}get callTimeout(){if(this._impl)return this._impl.getCallTimeout();return}set callTimeout($){j0.assertPropValue(Number.isInteger($)&&$>=0,"callTimeout"),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),this._impl.setCallTimeout($)}async changePassword($,Y,X){j0.assertArgCount(arguments,3,3),j0.assertParamValue(typeof $==="string",1),j0.assertParamValue(typeof Y==="string",2),j0.assertParamValue(typeof X==="string",3),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),await this._impl.changePassword($,Y,X)}get clientId(){return null}set clientId($){j0.assertPropValue(typeof $==="string","clientId"),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),this._impl.setClientId($)}get clientInfo(){return null}set clientInfo($){j0.assertPropValue(typeof $==="string","clientInfo"),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),this._impl.setClientInfo($)}async close($){let Y={};if(j0.assertArgCount(arguments,0,1),arguments.length==1)j0.assertParamValue(Y8.isObject($),1),Y=$,j0.assertParamPropBool(Y,1,"drop");j0.assert(this._impl&&!this._closing,j0.ERR_INVALID_CONNECTION),this._closing=!0;try{if(this._pool)await this._pool._release(this._impl,Y);else await this._impl.close(Y)}finally{this._closing=!1}if(delete this._impl,!this.thin)for(let X of this._dbObjectClasses.values())X._objType.refCleanup();this._dbObjectClasses.clear()}async commit(){j0.assertArgCount(arguments,0,0),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),await this._impl.commit()}async createLob($){j0.assertArgCount(arguments,1,1),j0.assertParamValue($===l8.DB_TYPE_CLOB||$===l8.DB_TYPE_BLOB||$===l8.DB_TYPE_NCLOB,1),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION);let Y=new UV0;return Y._setup(await this._impl.createLob($),!1),Y}get currentSchema(){if(this._impl)return this._impl.getCurrentSchema();return}set currentSchema($){j0.assertPropValue(typeof $==="string","currentSchema"),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),this._impl.setCurrentSchema($)}get dbOp(){return null}set dbOp($){j0.assertPropValue(typeof $==="string","dbOp"),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),this._impl.setDbOp($)}get thin(){return ra.thin}get ecid(){return null}set ecid($){j0.assertPropValue(typeof $==="string","ecid"),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),this._impl.setECID($)}decodeOSON($){return j0.assertArgCount(arguments,1,1),j0.assertParamValue(pL1.isBuffer($),1),new cL1.OsonDecoder($).decode()}encodeOSON($){return new cL1.OsonEncoder().encode(dL1.transformJsonValue($),this._impl._osonMaxFieldNameSize)}async execute($,Y,X){let J=[],Q={};if(j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),Y8.isObject($)&&typeof $.statement==="string"){if(j0.assertArgCount(arguments,1,2),$.values){if(this._impl._callLevelTraceData)this._impl._callLevelTraceData.values=$.values;J=await this._processExecuteBinds($.values)}if($=$.statement,arguments.length==2)Q=this._verifyExecOpts(Y,!1)}else{if(j0.assertArgCount(arguments,1,3),j0.assertParamValue(typeof $==="string",1),arguments.length>=2){if(this._impl._callLevelTraceData)this._impl._callLevelTraceData.values=Y;J=await this._processExecuteBinds(Y)}if(arguments.length==3)Q=this._verifyExecOpts(X,!1)}this._addDefaultsToExecOpts(Q);let W;try{if(this._impl._callLevelTraceData)this._impl._callLevelTraceData.statement=$;W=await this._impl.execute($,1,J,Q,!1)}catch(K){if(K.errorNum===1406)j0.throwErr(j0.ERR_INSUFFICIENT_BUFFER_FOR_BINDS);throw K}if(W.warning)W.warning=j0.transformErr(W.warning);if(W.resultSet!==void 0){let K=new ia;if(K._setup(this,W.resultSet),W.metaData=K._impl.metaData,Q.resultSet)W.resultSet=K;else W.rows=await K._getAllRows(),delete W.resultSet}if(W.outBinds!==void 0)for(let[K,Z]of Object.entries(W.outBinds)){let H=this._transformOutBind(Z,Q);W.outBinds[K]=H}if(W.implicitResults)for(let[K,Z]of Object.entries(W.implicitResults)){let H=new ia;if(H._setup(this,Z),Q.resultSet)W.implicitResults[K]=H;else W.implicitResults[K]=await H._getAllRows()}return W}async executeMany($,Y,X){let G={},J=[],Q;if(j0.assertArgCount(arguments,2,3),j0.assertParamValue(typeof $==="string",1),arguments.length==3)G=this._verifyExecOpts(X,!0);if(this._addDefaultsToExecOpts(G),typeof Y==="number"){if(j0.assertParamValue(Number.isInteger(Y)&&Y>0,2),Q=Y,G.bindDefs!==void 0)J=await this._processExecuteManyBinds([],G.bindDefs)}else j0.assertParamValue(Array.isArray(Y)&&Y.length>0,2),Q=Y.length,J=await this._processExecuteManyBinds(Y,G.bindDefs);j0.assert(this._impl,j0.ERR_INVALID_CONNECTION);let W=await this._impl.execute($,Q,J,G,!0);if(W.warning)W.warning=j0.transformErr(W.warning);if(W.outBinds!==void 0)for(let K=0;K<W.outBinds.length;K++){let Z=W.outBinds[K];for(let[H,z]of Object.entries(Z))Z[H]=this._transformOutBind(z,G)}return W}get externalName(){if(this._impl)return this._impl.getExternalName();return}set externalName($){j0.assertPropValue(typeof $==="string","externalName"),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),this._impl.setExternalName($)}get dbDomain(){return this._impl&&this._impl.getDbDomain()}get dbName(){return this._impl&&this._impl.getDbName()}get hostName(){return this._impl&&this._impl.getHostName()}get port(){return this._impl&&this._impl.getPort()}get protocol(){return this._impl&&this._impl.getProtocol()}get connectString(){return this._impl&&this._impl._connectString}get user(){if(this.currentSchema.length)return this.currentSchema;return this._impl&&this._impl._user}get connectTraceConfig(){return this._impl&&this._impl._getConnectTraceConfig()}async getDbObjectClass($){return j0.assertArgCount(arguments,1,1),j0.assertParamValue(typeof $==="string",1),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),await this._getDbObjectClassForName($)}async getQueue($,Y){let X={};if(j0.assertArgCount(arguments,1,2),j0.assertParamValue(typeof $==="string",1),arguments.length==2)j0.assertParamValue(Y8.isObject(Y),2),X={...Y};j0.assert(this._impl,j0.ERR_INVALID_CONNECTION);let G=new Bc6;return await G.create(this,$,X),G}getSodaDatabase(){j0.assertArgCount(arguments,0,0),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION);let $=new Oc6;return $._impl=this._impl.getSodaDatabase(),$}async getStatementInfo($){j0.assertArgCount(arguments,1,1),j0.assertParamValue(typeof $==="string",1),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION);let Y=await this._impl.getStatementInfo($);if(Y.metaData)for(let X=0;X<Y.metaData.length;X++){let G=Y.metaData[X];Y8.addTypeProperties(G,"dbType"),G.fetchType=l8.DB_TYPE_FETCH_TYPE_MAP.get(G.dbType)}return Y}get instanceName(){if(this._impl)return this._impl.getInstanceName();return}get internalName(){if(this._impl)return this._impl.getInternalName();return}set internalName($){j0.assertPropValue(typeof $==="string","internalName"),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),this._impl.setInternalName($)}get ltxid(){if(this._impl)return this._impl.getLTXID();return}isHealthy(){return this._impl!==void 0&&!this._closing&&this._impl.isHealthy()}isCompressionEnabled(){return this._impl&&this._impl.isCompressionEnabled()}get maxIdentifierLength(){return this._impl&&this._impl.getMaxIdentifierLength()}get maxOpenCursors(){return this._impl&&this._impl.getMaxOpenCursors()}get warning(){let $=this._impl.getWarning();if($)$=j0.transformErr($);return this._impl&&$}get module(){return null}set module($){j0.assertPropValue(typeof $==="string","module"),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),this._impl.setModule($)}get oracleServerVersion(){if(this._impl)return this._impl.getOracleServerVersion();return}get oracleServerVersionString(){if(this._impl)return this._impl.getOracleServerVersionString();return}get serviceName(){return this._impl&&this._impl.getServiceName()}get transactionInProgress(){return this._impl&&this._impl.getTransactionInProgress()}async ping(){j0.assertArgCount(arguments,0,0),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),await this._impl.ping()}queryStream($,Y,X){if(j0.assertArgCount(arguments,1,3),j0.assertParamValue(typeof $==="string",1),arguments.length==3)j0.assertParamValue(Y8.isObject(X),3),X={...X};else X={};X.resultSet=!0;let G=new Mc6;return Rc6.nextTick(async()=>{try{let J=await this.execute($,Y||[],X);if(!J.resultSet)j0.throwErr(j0.ERR_NOT_A_QUERY);G._open(J.resultSet)}catch(J){G.destroy(J);return}}),G}async resumeSessionlessTransaction($,Y={}){j0.assertArgCount(arguments,1,2),j0.assertParamValue(Y8.isTransactionId($),1),j0.assertParamValue(Y8.isObject(Y),2),j0.assertParamPropUnsignedInt(Y,2,"timeout"),j0.assertParamPropBool(Y,2,"deferRoundTrip");let X=Y8.normalizeTransactionId($),{timeout:G=60,deferRoundTrip:J=!1}=Y;return await this._impl.startSessionlessTransaction(X,G,w5.TPC_BEGIN_RESUME,J),X}async rollback(){j0.assertArgCount(arguments,0,0),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),await this._impl.rollback()}async shutdown($){let Y=w5.SHUTDOWN_MODE_DEFAULT;if(j0.assertArgCount(arguments,0,1),$!==void 0)j0.assertParamValue(typeof Y==="number",1),Y=$;j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),await this._impl.shutdown(Y)}async startup($){let Y={};if(j0.assertArgCount(arguments,0,1),arguments.length==1)j0.assertParamValue(typeof Y==="object",1),Y=$,j0.assertParamPropBool(Y,1,"force"),j0.assertParamPropBool(Y,1,"restrict"),j0.assertParamPropString(Y,1,"pfile");j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),await this._impl.startup(Y)}get stmtCacheSize(){if(this._impl)return this._impl.getStmtCacheSize();return}set stmtCacheSize($){j0.assertPropValue(Number.isInteger($)&&$>=0,"stmtCacheSize"),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),this._impl.setStmtCacheSize($)}async subscribe($,Y){if(j0.assertArgCount(arguments,2,2),j0.assertParamValue(typeof $==="string",1),j0.assertParamValue(Y8.isObject(Y),2),Y={name:$,...Y},j0.assertParamPropUnsignedInt(Y,2,"namespace"),Y.namespace===void 0)Y.namespace=w5.SUBSCR_NAMESPACE_DBCHANGE;if(j0.assertParamPropString(Y,2,"ipAddress"),j0.assertParamPropUnsignedInt(Y,2,"port"),j0.assertParamPropUnsignedInt(Y,2,"timeout"),j0.assertParamPropUnsignedInt(Y,2,"operations"),j0.assertParamPropUnsignedInt(Y,2,"qos"),j0.assertParamPropUnsignedInt(Y,2,"groupingClass"),j0.assertParamPropUnsignedInt(Y,2,"groupingValue"),j0.assertParamPropUnsignedInt(Y,2,"groupingType"),j0.assertParamPropBool(Y,2,"clientInitiated"),j0.assertParamPropFunction(Y,2,"callback"),j0.assert(Y.callback,j0.ERR_MISSING_SUBSCR_CALLBACK),Y.namespace===w5.SUBSCR_NAMESPACE_DBCHANGE){if(j0.assertParamPropString(Y,2,"sql"),j0.assert(Y.sql&&Y.sql.length>0,j0.ERR_MISSING_SUBSCR_SQL),Y.binds!==void 0)Y.binds=await this._processExecuteBinds(Y.binds)}j0.assert(this._impl,j0.ERR_INVALID_CONNECTION);let X=_x.get($),G=await this._impl.subscribe(X,Y),J;if(Y.namespace===w5.SUBSCR_NAMESPACE_DBCHANGE)J=G.subscription,delete G.subscription;else J=G;return _x.set($,J),G}async suspendSessionlessTransaction(){j0.assertArgCount(arguments,0,0),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),await this._impl.suspendSessionlessTransaction()}get tag(){if(this._impl)return this._impl.getTag();return}set tag($){j0.assertPropValue(typeof $==="string","tag"),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),this._impl.setTag($)}async tpcBegin($,Y,X){j0.assertArgCount(arguments,1,3),j0.assertParamValue(Y8.isXid($),1);let G=Y8.normalizeXid($);if(arguments.length<3)X=60;else j0.assertParamValue(typeof X==="number",3);if(arguments.length<2)Y=w5.TPC_BEGIN_NEW;else if(j0.assertParamValue(typeof Y==="number",2),[w5.TPC_BEGIN_NEW,w5.TPC_BEGIN_JOIN,w5.TPC_BEGIN_RESUME,w5.TPC_BEGIN_PROMOTE].indexOf(Y)<0)j0.throwErr(j0.ERR_INVALID_TPC_BEGIN_FLAGS);j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),await this._impl.tpcBegin(G,Y,X)}async tpcCommit($,Y){if(j0.assertArgCount(arguments,0,2),arguments.length<2)Y=!1;else j0.assertParamValue(typeof Y==="boolean",2);let X;if(arguments.length>=1)j0.assertParamValue(Y8.isXid($),1),X=Y8.normalizeXid($);j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),await this._impl.tpcCommit(X,Y)}async tpcEnd($,Y){if(j0.assertArgCount(arguments,0,2),arguments.length<2)Y=w5.TPC_END_NORMAL;else if(j0.assertParamValue(typeof Y==="number",2),![w5.TPC_END_NORMAL,w5.TPC_END_SUSPEND].includes(Y))j0.throwErr(j0.ERR_INVALID_TPC_END_FLAGS);let X;if(arguments.length>=1)j0.assertParamValue(Y8.isXid($),1),X=Y8.normalizeXid($);j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),await this._impl.tpcEnd(X,Y)}async tpcForget($){j0.assertArgCount(arguments,1,1),j0.assertParamValue(Y8.isXid($),1);let Y=Y8.normalizeXid($);j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),await this._impl.tpcForget(Y)}async tpcPrepare($){j0.assertArgCount(arguments,0,1);let Y;if(arguments.length>=1)j0.assertParamValue(Y8.isXid($),1),Y=Y8.normalizeXid($);return j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),await this._impl.tpcPrepare(Y)}async tpcRecover($){if(j0.assertArgCount(arguments,0,1),arguments.length==1)j0.assertParamValue(typeof $==="boolean",1);else $=!0;let Y=`
      SELECT
          formatid as "formatId",
          UTL_RAW.CAST_TO_VARCHAR2(globalid) as "globalTransactionId",
          UTL_RAW.CAST_TO_VARCHAR2(branchid) as "branchQualifier"
      FROM DBA_PENDING_TRANSACTIONS`,X=`
      SELECT
          formatid as "formatId",
          globalid as "globalTransactionId",
          branchid as "branchQualifier"
      FROM DBA_PENDING_TRANSACTIONS`,G={outFormat:w5.OUT_FORMAT_OBJECT,resultSet:!1};return(await this.execute($?Y:X,{},G)).rows}async tpcRollback($){j0.assertArgCount(arguments,0,1);let Y;if(arguments.length==1)j0.assertParamValue(Y8.isXid($),1),Y=Y8.normalizeXid($);j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),await this._impl.tpcRollback(Y)}async unsubscribe($){j0.assertArgCount(arguments,1,1),j0.assertParamValue(typeof $==="string",1),j0.assert(this._impl,j0.ERR_INVALID_CONNECTION),j0.assert(_x.has($),j0.ERR_INVALID_SUBSCR),await this._impl.unsubscribe(_x.get($)),setTimeout(()=>{_x.delete($)},0)}}Xz.prototype.break=Y8.callbackify(Y8.wrapFn(Xz.prototype.breakExecution));Xz.prototype.tpcRecover=Y8.callbackify(Y8.wrapFn(Xz.prototype.tpcRecover));Y8.wrapFns(Xz.prototype,"beginSessionlessTransaction","changePassword","close","commit","createLob","execute","executeMany","getDbObjectClass","getQueue","getStatementInfo","ping","resumeSessionlessTransaction","rollback","shutdown","startup","subscribe","suspendSessionlessTransaction","tpcBegin","tpcCommit","tpcEnd","tpcForget","tpcPrepare","tpcRollback","unsubscribe");Xz.prototype.release=Xz.prototype.close;iL1.exports=Xz});var zV0=o((hR5,rL1)=>{var wc6=A0("process"),_c6=w2();class nL1{constructor($){let Y=0;if($._totalRequestsEnqueued!==0)Y=Math.round($._totalTimeInQueue/$._totalRequestsEnqueued);this.gatheredDate=Date.now(),this.upTime=this.gatheredDate-$._createdDate,this.upTimeSinceReset=this.gatheredDate-$._timeOfReset,this.connectionRequests=$._totalConnectionRequests,this.requestsEnqueued=$._totalRequestsEnqueued,this.requestsDequeued=$._totalRequestsDequeued,this.failedRequests=$._totalFailedRequests,this.rejectedRequests=$._totalRequestsRejected,this.requestTimeouts=$._totalRequestTimeouts,this.maximumQueueLength=$._maximumQueueLength,this.currentQueueLength=$._pendingRequestQueue.size,this.timeInQueue=$._totalTimeInQueue,this.minimumTimeInQueue=$._minTimeInQueue,this.maximumTimeInQueue=$._maxTimeInQueue,this.averageTimeInQueue=Y,this.connectionsInUse=$.connectionsInUse,this.connectionsOpen=$.connectionsOpen,this.connectString=$.connectString,this.edition=$.edition,this.events=$.events,this.externalAuth=$.externalAuth,this.homogeneous=$.homogeneous,this.poolAlias=$.poolAlias,this.poolIncrement=$.poolIncrement,this.poolMax=$.poolMax,this.poolMaxPerShard=$.poolMaxPerShard,this.poolMin=$.poolMin,this.poolPingInterval=$.poolPingInterval,this.poolPingTimeout=$.poolPingTimeout,this.poolTimeout=$.poolTimeout,this.maxLifetimeSession=$.maxLifetimeSession,this.queueMax=$.queueMax,this.queueTimeout=$.queueTimeout,this.sodaMetaDataCache=$.sodaMetaDataCache,this.stmtCacheSize=$.stmtCacheSize,this.user=$.user,this.threadPoolSize=wc6.env.UV_THREADPOOL_SIZE,this.thin=_c6.thin}logStatistics(){console.log(`
Driver:`),console.log("...thin mode:",this.thin),console.log("Pool statistics:"),console.log("...gathered at:",new Date(this.gatheredDate).toISOString()),console.log("...up time (milliseconds):",this.upTime),console.log("...up time from last reset (milliseconds)",this.upTimeSinceReset),console.log("...connection requests:",this.connectionRequests),console.log("...requests enqueued:",this.requestsEnqueued),console.log("...requests dequeued:",this.requestsDequeued),console.log("...requests failed:",this.failedRequests),console.log("...requests exceeding queueMax:",this.rejectedRequests),console.log("...requests exceeding queueTimeout:",this.requestTimeouts),console.log("...current queue length:",this.currentQueueLength),console.log("...maximum queue length:",this.maximumQueueLength),console.log("...sum of time in queue (milliseconds):",this.timeInQueue),console.log("...minimum time in queue (milliseconds):",this.minimumTimeInQueue),console.log("...maximum time in queue (milliseconds):",this.maximumTimeInQueue),console.log("...average time in queue (milliseconds):",this.averageTimeInQueue),console.log("...pool connections in use:",this.connectionsInUse),console.log("...pool connections open:",this.connectionsOpen),console.log("Pool attributes:"),console.log("...connectString:",this.connectString),console.log("...edition:",this.edition),console.log("...events:",this.events),console.log("...externalAuth:",this.externalAuth),console.log("...homogeneous:",this.homogeneous),console.log("...poolAlias:",this.poolAlias),console.log("...poolIncrement:",this.poolIncrement),console.log("...poolMax:",this.poolMax),console.log("...poolMaxPerShard:",this.poolMaxPerShard),console.log("...poolMin:",this.poolMin),console.log("...poolPingInterval (seconds):",this.poolPingInterval),console.log("...poolPingTimeout (milliseconds):",this.poolPingTimeout),console.log("...poolTimeout (seconds):",this.poolTimeout),console.log("...maxLifetimeSession (seconds):",this.maxLifetimeSession),console.log("...queueMax:",this.queueMax),console.log("...queueTimeout (milliseconds):",this.queueTimeout),console.log("...sessionCallback:",this.sessionCallback),console.log("...sodaMetaDataCache:",this.sodaMetaDataCache),console.log("...stmtCacheSize:",this.stmtCacheSize),console.log("...user:",this.user),console.log("Related environment variables:"),console.log("...UV_THREADPOOL_SIZE:",this.threadPoolSize)}}rL1.exports=nL1});var oL1=o((fR5,sL1)=>{var jc6=HV0(),Tc6=A0("events"),uK=SY(),h4=O4(),aL1=w2(),sA=GY(),Ic6=GP(),Cc6=zV0();class oA extends Tc6{constructor(){super();this._impl=new Ic6.PoolImpl,this._queueMax=0,this._queueTimeout=0,this._enableStatistics=!1,this._timeOfReset=this._createdDate=Date.now(),this._sessionCallback=void 0,this._pendingRequestQueue=new Set,this._connectionClass=aL1.connectionClass,this._bgRequestWaiter=null,this._bgRequestId=0,this._processing=0,this._ensureNoPendingRequests=null}_checkPoolOpen($){if(this.status===uK.POOL_STATUS_DRAINING)h4.throwErr(h4.ERR_POOL_CLOSING);else if(this.status===uK.POOL_STATUS_CLOSED)h4.throwErr(h4.ERR_POOL_CLOSED);else if(!$){if(this.status===uK.POOL_STATUS_RECONFIGURING)h4.throwErr(h4.ERR_POOL_RECONFIGURING)}}get _enableStats(){return this._enableStatistics}_resetStatistics(){this._timeOfReset=Date.now(),this._totalConnectionRequests=0,this._totalRequestsEnqueued=0,this._totalRequestsDequeued=0,this._totalFailedRequests=0,this._totalRequestsRejected=0,this._totalRequestTimeouts=0,this._maximumQueueLength=this._pendingRequestQueue.size,this._totalTimeInQueue=0,this._minTimeInQueue=0,this._maxTimeInQueue=0}_setup($,Y){this._queueTimeout=$.queueTimeout,this._queueMax=$.queueMax,this._enableStatistics=$.enableStatistics,this._edition=$.edition,this._eventsFlag=$.events,this._externalAuth=$.externalAuth,this._homogeneous=$.homogeneous,this._user=$.user,this._connectString=$.connectString,this._status=uK.POOL_STATUS_OPEN,this._connectionsOut=0,this._poolAlias=Y,this._bgRequestHandler(),this._resetStatistics()}_updateWaitStatistics($){let Y=Date.now()-$.enqueuedTime;if(this._totalTimeInQueue+=Y,this._minTimeInQueue===0)this._minTimeInQueue=Y;else this._minTimeInQueue=Math.min(this._minTimeInQueue,Y);this._maxTimeInQueue=Math.max(this._maxTimeInQueue,Y)}_verifyGetConnectionOptions($){let Y={};if($.user!==void 0)h4.assertParamPropValue(typeof $.user==="string",1,"user"),Y.user=$.user;if($.username!==void 0)h4.assert(Y.user===void 0,h4.ERR_DBL_USER),h4.assertParamPropValue(typeof $.username==="string",1,"username"),Y.user=$.username;if(this.externalAuth&&Y.user&&(Y.user[0]!=="["||Y.user.slice(-1)!=="]"))h4.throwErr(h4.ERR_WRONG_USER_FORMAT_EXTAUTH_PROXY);if($.password!==void 0){if(h4.assertParamPropValue(typeof $.password==="string",1,"password"),this.externalAuth)h4.throwErr(h4.ERR_WRONG_CRED_FOR_EXTAUTH);Y.password=$.password}if($.tag!==void 0)h4.assertParamPropValue(typeof $.tag==="string",1,"tag"),Y.tag=$.tag;if($.matchAnyTag!==void 0)h4.assertParamPropValue(typeof $.matchAnyTag==="boolean",1,"matchAnyTag"),Y.matchAnyTag=$.matchAnyTag;if($.shardingKey!==void 0){let X=$.shardingKey;h4.assertParamPropValue(sA.isShardingKey(X),1,"shardingKey"),Y.shardingKey=$.shardingKey}if($.superShardingKey!==void 0){let X=$.superShardingKey;h4.assertParamPropValue(sA.isShardingKey(X),1,"superShardingKey"),Y.superShardingKey=$.superShardingKey}if($.privilege!==void 0)h4.assertParamPropValue(sA.isPrivilege($.privilege),1,"privilege"),Y.privilege=$.privilege;return Y}async close($){let Y=0,X=!1;if(h4.assertArgCount(arguments,0,1),arguments.length==1){if(h4.assertParamValue(typeof $==="number",1),$<0||isNaN($)||$>2147483648)h4.throwErr(h4.ERR_INVALID_PARAMETER_VALUE,1);if(X=!0,this._connectionsOut>0)Y=$*1000}if(this._checkPoolOpen(!1),X)this._status=uK.POOL_STATUS_DRAINING;if(Y>0)await new Promise((G)=>{let J=setTimeout(()=>{this.removeAllListeners("_allCheckedIn"),G()},Y);this.once("_allCheckedIn",()=>{clearTimeout(J),G()})});if(!X&&this._connectionsOut>0)h4.throwErr(h4.ERR_POOL_HAS_BUSY_CONNECTIONS);if(this._processing!=0)await new Promise((G)=>this._ensureNoPendingRequests=G);if(await this._impl.close(),this._status=uK.POOL_STATUS_CLOSED,this._bgRequestWaiter)this._bgRequestWaiter();this.emit("_afterPoolClose")}get connectionsInUse(){return this._impl.getConnectionsInUse()}get connectionsOpen(){return this._impl.getConnectionsOpen()}get connectString(){return this._connectString}get thin(){return aL1.thin}get edition(){return this._edition}get enableStatistics(){return this._enableStatistics}get events(){return this._eventsFlag}get externalAuth(){return this._externalAuth}async getConnection($){let Y={};if(h4.assertArgCount(arguments,0,1),arguments.length==1)h4.assertParamValue(sA.isObject($),1),Y=this._verifyGetConnectionOptions($);if(Y.connectionClass=this._connectionClass,this._checkPoolOpen(!0),this._enableStatistics)this._totalConnectionRequests+=1;if(this._bgRequestId==Number.MAX_SAFE_INTEGER)this._bgRequestId=0;let X={id:this._bgRequestId++,options:Y,conn:null,isWaiting:!0,error:null,timeoutHandle:null,enqueuedTime:Date.now(),wasQueued:!1},G=new Promise((Q,W)=>{if(X.resolve=Q,X.reject=W,this._connectionsOut<this.poolMax)this._processRequest(X);else{if(this._pendingRequestQueue.size==this._queueMax){if(this._enableStatistics)this._totalRequestsRejected+=1;return W(h4.getErr(h4.ERR_QUEUE_MAX_EXCEEDED,this._queueMax))}if(X.wasQueued=!0,this._pendingRequestQueue.add(X),this._enableStatistics)this._totalRequestsEnqueued+=1,this._maximumQueueLength=Math.max(this._maximumQueueLength,this._pendingRequestQueue.size)}}),J=new Promise((Q,W)=>{if(this._queueTimeout>0)X.timeoutHandle=setTimeout(()=>{if(X.isWaiting=!1,this._pendingRequestQueue.delete(X),this.enableStatistics)this._totalRequestTimeouts+=1;W(h4.getErr(h4.ERR_CONN_REQUEST_TIMEOUT,this._queueTimeout))},this._queueTimeout)});try{await Promise.race([G,J])}catch(Q){X.error=Q}if(clearTimeout(X.timeoutHandle),this._enableStatistics&&X.wasQueued)this._updateWaitStatistics(X);if(X.error)throw X.error;return X.conn}async _bgRequestHandler(){while(this.status!=uK.POOL_STATUS_DRAINING||this.status!=uK.POOL_STATUS_CLOSED){let $=this._pendingRequestQueue.values().next().value;if($&&this._connectionsOut<this.poolMax)this._processRequest($);else await new Promise((Y)=>{this._bgRequestWaiter=Y}),this._bgRequestWaiter=null}for(let $ of this._pendingRequestQueue)$.reject(h4.throwErr(h4.ERR_POOL_CLOSED))}async _processRequest($){let Y=new jc6;try{if(this._processing+=1,this._connectionsOut+=1,this._pendingRequestQueue.delete($),Y._impl=await this._impl.getConnection($.options),Y._pool=this,await this._tagFixup(Y,$.options.tag),$.isWaiting)$.conn=Y;else await Y.close({});$.resolve()}catch(X){if($.isWaiting){if(this._enableStatistics)this._totalFailedRequests+=1;$.reject(X)}this._release(Y._impl,$.options)}finally{if(this._processing-=1,this.status==uK.POOL_STATUS_DRAINING&&this._processing==0&&this._ensureNoPendingRequests)this._ensureNoPendingRequests()}}async _tagFixup($,Y){let X=Y||"";if(typeof this.sessionCallback==="function"&&($._impl._newSession||$.tag!=X))try{await new Promise((G,J)=>{this.sessionCallback($,X,function(Q){if(Q)J(Q);else G()})})}catch(G){throw await $.close({drop:!0}),G}}async _release($,Y){this._connectionsOut-=1;try{if($)await $.close(Y)}finally{if(this._connectionsOut==0)this.emit("_allCheckedIn");setImmediate(()=>{if(this._pendingRequestQueue.size>0&&this._bgRequestWaiter)this._bgRequestWaiter()})}}getStatistics(){if(this._checkPoolOpen(!1),this._enableStatistics!==!0)return null;return new Cc6(this)}get homogeneous(){return this._homogeneous}logStatistics(){let $=this.getStatistics();if($===null)h4.throwErr(h4.ERR_POOL_STATISTICS_DISABLED);$.logStatistics()}get poolAlias(){return this._poolAlias}get poolIncrement(){return this._impl.getPoolIncrement()}get poolMax(){return this._impl.getPoolMax()}get poolMaxPerShard(){return this._impl.getPoolMaxPerShard()}get poolMin(){return this._impl.getPoolMin()}get poolPingInterval(){return this._impl.getPoolPingInterval()}get poolPingTimeout(){return this._impl.getPoolPingTimeout()}get poolTimeout(){return this._impl.getPoolTimeout()}get maxLifetimeSession(){return this._impl.getMaxLifetimeSession()}get queueMax(){return this._queueMax}get queueTimeout(){return this._queueTimeout}async reconfigure($){if(h4.assertArgCount(arguments,1,1),h4.assertParamValue(sA.isObject($)),h4.assertParamPropUnsignedInt($,1,"queueMax"),h4.assertParamPropUnsignedInt($,1,"queueTimeout"),h4.assertParamPropBool($,1,"enableStatistics"),h4.assertParamPropBool($,1,"resetStatistics"),h4.assertParamPropUnsignedInt($,1,"poolMin"),h4.assertParamPropUnsignedIntNonZero($,1,"poolMax"),h4.assertParamPropUnsignedInt($,1,"poolMaxPerShard"),h4.assertParamPropUnsignedInt($,1,"poolIncrement"),h4.assertParamPropInt($,1,"poolPingInterval"),h4.assertParamPropUnsignedInt($,1,"poolTimeout"),h4.assertParamPropUnsignedInt($,1,"maxLifetimeSession"),h4.assertParamPropUnsignedInt($,1,"stmtCacheSize"),h4.assertParamPropBool($,1,"sodaMetaDataCache"),$.poolMin>$.poolMax)h4.throwErr(h4.ERR_INVALID_NUMBER_OF_CONNECTIONS,$.poolMax,$.poolMin);this._checkPoolOpen(!1),this._status=uK.POOL_STATUS_RECONFIGURING;try{if(await this._impl.reconfigure($),$.resetStatistics==!0||$.enableStatistics==!0&&this._enableStatistics==!1)this._resetStatistics();if($.queueMax!==void 0)this._queueMax=$.queueMax;if($.queueTimeout!==void 0)this._queueTimeout=$.queueTimeout;if($.enableStatistics!==void 0)this._enableStatistics=$.enableStatistics}finally{this._status=uK.POOL_STATUS_OPEN}}get sessionCallback(){return this._sessionCallback}async setAccessToken($){h4.assertArgCount(arguments,1,1),h4.assertParamValue(sA.isObject($),1),h4.assertParamPropString($,1,"token"),h4.assertParamPropString($,1,"privateKey"),await this._impl.setAccessToken($)}get sodaMetaDataCache(){return this._impl.getSodaMetaDataCache()}get status(){return this._status}get stmtCacheSize(){return this._impl.getStmtCacheSize()}get user(){return this._user}get connectTraceConfig(){return this._impl&&this._impl._getConnectTraceConfig()}}sA.wrapFns(oA.prototype,!1,"close","getConnection","reconfigure","setAccessToken");oA.prototype.terminate=oA.prototype.close;oA.prototype._logStats=oA.prototype.logStatistics;sL1.exports=oA});var CG=o((gR5,eL1)=>{var{Buffer:aa}=A0("buffer"),X6=E9(),pK=O4(),Sc6=new Set([28,31,376,603,1012,1033,1034,1089,1090,1092,1115,2396,3113,3114,3135,12153,12514,12537,12547,12570,12571,12583,12757,16456]);class tL1{constructor($){this.errorInfo={},this.connection=$,this.messageType=X6.TNS_MSG_TYPE_FUNCTION,this.functionCode=0,this.callStatus=0,this.flushOutBinds=!1,this.endOfResponse=!1,this.endToEndSeqNum=0,this.errorOccurred=!1,this.warning=void 0}preProcess(){}async postProcess(){}writeFunctionHeader($){if(this.writePiggybacks($),$.writeUInt8(this.messageType),$.writeUInt8(this.functionCode),$.writeSeqNum(),$.caps.ttcFieldVersion>=X6.TNS_CCAP_FIELD_VERSION_23_1_EXT_1)$.writeUB8(0)}processErrorInfo($){this.callStatus=$.readUB4(),$.skipUB2(),$.skipUB4(),$.skipUB2(),$.skipUB2(),$.skipUB2(),this.errorInfo.cursorId=$.readUB2();let Y=$.readSB2();if($.skipUB1(),$.skipUB1(),$.skipUB1(),$.skipUB1(),$.skipUB1(),$.readUInt8()&X6.TNS_WARN_COMPILATION_CREATE)this.warning=pK.getErr(pK.WRN_COMPILATION_CREATE);if(this.errorInfo.rowID=$.readRowID(),$.skipUB4(),$.skipUB1(),$.skipUB1(),$.skipUB2(),$.skipUB4(),$.readUB4()>0)$.skipBytesChunked();let J=$.readUB2();if(J>0){this.errorInfo.batchErrors=[];let K=$.readUInt8();for(let Z=0;Z<J;Z++){if(K===X6.TNS_LONG_LENGTH_INDICATOR)$.skipUB4();let H=$.readUB2();this.errorInfo.batchErrors.push(Error(H))}if(K===X6.TNS_LONG_LENGTH_INDICATOR)$.skipBytes(1)}let Q=$.readUB4();if(Q>0){if(Q>65535)pK.throwErr(pK.ERR_TOO_MANY_BATCH_ERRORS);let K=$.readUInt8(),Z;for(let H=0;H<Q;H++){if(K===X6.TNS_LONG_LENGTH_INDICATOR)$.skipUB4();if(Z=$.readUB4(),H<J)this.errorInfo.batchErrors[H].offset=Z}if(K===X6.TNS_LONG_LENGTH_INDICATOR)$.skipBytes(1)}let W=$.readUB2();if(W>0){$.skipBytes(1);for(let K=0;K<W;K++)$.skipUB2(),this.errorInfo.batchErrors[K].message=$.readStr(X6.CSFRM_IMPLICIT),$.skipBytes(2)}if(this.errorInfo.num=$.readUB4(),this.errorInfo.rowCount=$.readUB8(),$.caps.ttcFieldVersion>=X6.TNS_CCAP_FIELD_VERSION_20_1)$.skipUB4(),$.skipUB4();if(this.errorInfo.num!==0){if(this.errorOccurred=!0,Y>=0)this.errorInfo.pos=Y;this.errorInfo.message=$.readStr(X6.CSFRM_IMPLICIT),this.errorInfo.message=this.errorInfo.message.trim()}this.errorInfo.isRecoverable=Sc6.has(this.errorInfo.num),this.endOfResponse=!this.connection.nscon.endOfRequestSupport}processReturnParameter(){}processWarningInfo($){let Y=$.readUB2(),X=$.readUB2();if($.skipUB2(),Y!=0&&X>0){let G=$.readStr(X6.CSFRM_IMPLICIT).trim();this.warning=Error(G),this.warning.errorNum=Y}}decode($){this.process($)}process($){this.endOfResponse=!1,this.flushOutBinds=!1;do{this.savePoint($);let Y=$.readUInt8();this.processMessage($,Y)}while(!this.endOfResponse)}savePoint($){$.savePoint()}processMessage($,Y){if(Y===X6.TNS_MSG_TYPE_ERROR)this.processErrorInfo($);else if(Y===X6.TNS_MSG_TYPE_WARNING)this.processWarningInfo($);else if(Y===X6.TNS_MSG_TYPE_STATUS)this.callStatus=$.readUB4(),this.endToEndSeqNum=$.readUB2(),this.endOfResponse=!this.connection.nscon.endOfRequestSupport;else if(Y===X6.TNS_MSG_TYPE_PARAMETER)this.processReturnParameter($);else if(Y===X6.TNS_MSG_TYPE_SERVER_SIDE_PIGGYBACK)this.processServerSidePiggyBack($);else if(Y===X6.TNS_MSG_TYPE_END_OF_REQUEST)this.endOfResponse=!0;else pK.throwErr(pK.ERR_UNEXPECTED_MESSAGE_TYPE,Y,$.pos,$.packetNum)}processServerSidePiggyBack($){let Y=$.readUInt8();if(Y===X6.TNS_SERVER_PIGGYBACK_LTXID){if($.readUB4()>0)this.connection._ltxid=aa.from($.readBytesWithLength())}else if(Y===X6.TNS_SERVER_PIGGYBACK_QUERY_CACHE_INVALIDATION||Y===X6.TNS_SERVER_PIGGYBACK_TRACE_EVENT);else if(Y===X6.TNS_SERVER_PIGGYBACK_OS_PID_MTS){let X=$.readUB2();$.skipUB1(),$.skipBytes(X)}else if(Y===X6.TNS_SERVER_PIGGYBACK_SYNC){$.skipUB2(),$.skipUB1();let X=$.readUB4();$.skipBytes(1);for(let G=0;G<X;G++){let J=$.readUB2(),Q,W;if(J>0)Q=$.readStr(X6.CSFRM_IMPLICIT);if(J=$.readUB2(),J>0)W=$.readBytesWithLength();let K=$.readUB2();if(K==X6.TNS_KEYWORD_NUM_TRANSACTION_ID)this._updateSessionlessTxnState(W);else if(K===X6.TNS_KEYWORD_NUM_CURRENT_SCHEMA)this.connection.currentSchema=Q;else if(K===X6.TNS_KEYWORD_NUM_EDITION)this.connection._edition=Q}$.skipUB4()}else if(Y===X6.TNS_SERVER_PIGGYBACK_EXT_SYNC)$.skipUB2(),$.skipUB1();else if(Y===X6.TNS_SERVER_PIGGYBACK_AC_REPLAY_CONTEXT){if($.skipUB2(),$.skipUB1(),$.skipUB4(),$.skipUB4(),$.skipUB1(),$.readUB4()>0)$.skipBytesChunked()}else if(Y===X6.TNS_SERVER_PIGGYBACK_SESS_RET){$.skipUB2(),$.skipUB1();let X=$.readUB2();if(X>0){$.skipUB1();for(let J=0;J<X;++J){let Q=$.readUB2();if(Q>0)$.skipBytesChunked();if(Q=$.readUB2(),Q>0)$.skipBytesChunked();$.skipUB2()}}if($.readUB4()&X6.TNS_SESSGET_SESSION_CHANGED){if(this.connection._drcpEstablishSession)this.connection.statementCache.clearCursors()}this.connection._drcpEstablishSession=!1,$.skipUB4(),$.skipUB2()}else if(Y===X6.TNS_SERVER_PIGGYBACK_SESS_SIGNATURE)$.skipUB2(),$.skipUB1(),$.skipUB8(),$.skipUB8(),$.skipUB8();else pK.throwErr(pK.ERR_UNKOWN_SERVER_SIDE_PIGGYBACK,Y)}writePiggybacks($){if(this.connection._protocol.connInProgress)return;if(this.connection._currentSchemaModified)this._writeCurrentSchemaPiggyback($);if(this.connection.statementCache._cursorsToClose.size>0&&!this.connection._drcpEstablishSession)this.writeCloseCursorsPiggyBack($);if(this.connection._actionModified||this.connection._clientIdentifierModified||this.connection._dbopModified||this.connection._clientInfoModified||this.connection._moduleModified)this._writeEndToEndPiggybacks($);if(this.connection._tempLobsTotalSize>0)this.writeCloseTempLobsPiggyback($);if(this.connection._sessionlessData?.pending)this.connection._sessionlessData.pending=!1,this.connection._sessionlessData.piggyback.encode($),this.connection._sessionlessData.piggyback=null}writePiggybackHeader($,Y){if($.writeUInt8(X6.TNS_MSG_TYPE_PIGGYBACK),$.writeUInt8(Y),$.writeSeqNum(),$.caps.ttcFieldVersion>=X6.TNS_CCAP_FIELD_VERSION_23_1_EXT_1)$.writeUB8(0)}writeCloseCursorsPiggyBack($){this.writePiggybackHeader($,X6.TNS_FUNC_CLOSE_CURSORS),$.writeUInt8(1),this.connection.statementCache.writeCursorsToClose($)}writeCloseTempLobsPiggyback($){let Y=this.connection._tempLobsToClose,X=X6.TNS_LOB_OP_FREE_TEMP|X6.TNS_LOB_OP_ARRAY;this.writePiggybackHeader($,X6.TNS_FUNC_LOB_OP),$.writeUInt8(1),$.writeUB4(this.connection._tempLobsTotalSize),$.writeUInt8(0),$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUInt8(0),$.writeUInt8(0),$.writeUInt8(0),$.writeUB4(X),$.writeUInt8(0),$.writeUB4(0),$.writeUB8(0),$.writeUB8(0),$.writeUInt8(0),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0);for(let G of Y)$.writeBytes(G);this.connection._tempLobsToClose=[],this.connection._tempLobsTotalSize=0}_writeCurrentSchemaPiggyback($){this.writePiggybackHeader($,X6.TNS_FUNC_SET_SCHEMA),$.writeUInt8(1);let Y=aa.byteLength(this.connection.currentSchema);$.writeUB4(Y),$.writeBytesWithLength(aa.from(this.connection.currentSchema))}_writeEndToEndPiggybacks($){let Y=0;if(this.connection._actionModified)Y|=X6.TNS_END_TO_END_ACTION;if(this.connection._clientIdentifierModified)Y|=X6.TNS_END_TO_END_CLIENT_IDENTIFIER;if(this.connection._clientInfoModified)Y|=X6.TNS_END_TO_END_CLIENT_INFO;if(this.connection._moduleModified)Y|=X6.TNS_END_TO_END_MODULE;if(this.connection._dbOpModified)Y|=X6.TNS_END_TO_END_DBOP;this.writePiggybackHeader($,X6.TNS_FUNC_SET_END_TO_END_ATTR),$.writeUInt8(0),$.writeUInt8(0),$.writeUB4(Y);let X=this.writeEndEndTraceValue($,this.connection._clientIdentifier,this.connection._clientIdentifierModified),G=this.writeEndEndTraceValue($,this.connection._module,this.connection._moduleModified),J=this.writeEndEndTraceValue($,this.connection._action,this.connection._actionModified);$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0);let Q=this.writeEndEndTraceValue($,this.connection._clientInfo,this.connection._clientInfoModified);$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0);let W=this.writeEndEndTraceValue($,this.connection._dbOp,this.connection._dbOpModified);if(this.connection._clientIdentifierModified&&this.connection._clientIdentifier)$.writeBytesWithLength(X);if(this.connection._moduleModified&&this.connection._module)$.writeBytesWithLength(G);if(this.connection._actionModified&&this.connection._action)$.writeBytesWithLength(J);if(this.connection._clientInfoModified&&this.connection._clientInfo)$.writeBytesWithLength(Q);if(this.connection._dbOpModified&&this.connection._dbOp)$.writeBytesWithLength(W);this.connection._actionModified=!1,this.connection._action="",this.connection._clientIdentifierModified=!1,this.connection._clientIdentifier="",this.connection._clientInfoModified=!1,this.connection._clientInfo="",this.connection._dbOpModified=!1,this.connection._dbOp="",this.connection._moduleModified=!1,this.connection._module=""}writeEndEndTraceValue($,Y,X){let G;if(X)if($.writeUInt8(1),Y)G=aa.from(Y),$.writeUB4(G.length);else $.writeUB4(0);else $.writeUInt8(0),$.writeUB4(0);return G}saveDeferredErr(){if(!this.deferredErr)this.deferredErr=pK.getErr(...arguments)}_updateSessionlessTxnState($){let Y=$.length,X=$.readUInt8(Y-2),G=$.readUInt8(Y-1),J;if(G==X6.TNS_TPC_TRANS_TRANSACTION_ID_SYNC_VERSION_1){if(X&X6.TNS_TPC_TRANS_TRANSACTION_ID_SYNC_UNSET)this.connection._sessionlessData=null,this.connection._protocol.txnInProgress=!1;else if(X&X6.TNS_TPC_TRANS_TRANSACTION_ID_SYNC_SET){if(X&X6.TNS_TPC_TRANS_TRANSACTION_ID_SYNC_SERVER)J=!0;else if(X&X6.TNS_TPC_TRANS_TRANSACTION_ID_SYNC_CLIENT)J=!1;this.connection._sessionlessData={startedOnServer:J},this.connection._protocol.txnInProgress=!0}}else pK.throwErr(pK.ERR_INTERNAL,"Unexpected TransactionId sync version in session sync piggyback.")}}eL1.exports=tL1});var VV0=o((mR5,YD1)=>{var{Buffer:jx}=A0("buffer"),s$=E9(),kc6=CG();class $D1 extends kc6{constructor($,Y){super($);if(this.sourceLobImpl=Y.sourceLobImpl||null,this.operation=Y.operation,this.sourceOffset=Y.sourceOffset||0,this.destOffset=Y.destOffset||0,this.boolFlag=!1,Y.data)this.data=Y.data;this.functionCode=s$.TNS_FUNC_LOB_OP,this.sendAmount=Y.sendAmount,this.amount=Y.amount||0,this.destLength=Y.destLength||0}encode($){if(this.writeFunctionHeader($),this.sourceLobImpl===null)$.writeUInt8(0),$.writeUB4(0);else $.writeUInt8(1),$.writeUB4(this.sourceLobImpl._locator.length);if($.writeUInt8(0),$.writeUB4(this.destLength),$.writeUB4(0),$.writeUB4(0),this.operation===s$.TNS_LOB_OP_CREATE_TEMP)$.writeUInt8(1);else $.writeUInt8(0);if($.writeUInt8(0),[s$.TNS_LOB_OP_CREATE_TEMP,s$.TNS_LOB_OP_IS_OPEN,s$.TNS_LOB_OP_FILE_EXISTS,s$.TNS_LOB_OP_FILE_ISOPEN].includes(this.operation))$.writeUInt8(1);else $.writeUInt8(0);if($.writeUB4(this.operation),$.writeUInt8(0),$.writeUInt8(0),$.writeUB8(this.sourceOffset),$.writeUB8(this.destOffset),this.sendAmount)$.writeUInt8(1);else $.writeUInt8(0);for(let X=0;X<3;X++)$.writeUInt16BE(0);if(this.sourceLobImpl)$.writeBytes(this.sourceLobImpl._locator);if(this.operation===s$.TNS_LOB_OP_CREATE_TEMP)if(this.sourceLobImpl.dbType._csfrm===s$.CSFRM_NCHAR)$.caps.checkNCharsetId(),$.writeUB4(s$.TNS_CHARSET_UTF16);else $.writeUB4(s$.TNS_CHARSET_UTF8);if(this.data){let X;if($.writeUInt8(s$.TNS_MSG_TYPE_LOB_DATA),this.sourceLobImpl.dbType._oraTypeNum===s$.TNS_DATA_TYPE_BLOB)X=this.data;else if(this.sourceLobImpl.getCsfrm()===s$.CSFRM_NCHAR){if(X=this.data,jx.isBuffer(this.data))X=X.toString();X=jx.from(X,s$.TNS_ENCODING_UTF16).swap16()}else X=jx.from(this.data);$.writeBytesWithLength(X)}if(this.sendAmount)$.writeUB8(this.amount)}processMessage($,Y){if(Y===s$.TNS_MSG_TYPE_LOB_DATA){let X=this.sourceLobImpl.dbType._oraTypeNum,G=$.readBytesWithLength();if(G!==null)if(X===s$.TNS_DATA_TYPE_BLOB||X===s$.TNS_DATA_TYPE_BFILE)G=jx.from(G);else if(this.sourceLobImpl.getCsfrm()===s$.CSFRM_NCHAR)G=jx.from(G).swap16().toString("utf16le");else G=G.toString();this.data=G}else super.processMessage($,Y)}processReturnParameter($){let Y,X,G,J;if(this.sourceLobImpl!==null)J=this.sourceLobImpl._locator.length,Y=$.readBytes(J),X=Y.slice(0,J),X.copy(this.sourceLobImpl._locator);if(this.operation===s$.TNS_LOB_OP_CREATE_TEMP)$.skipUB2(),$.skipUB1();else if(this.sendAmount)this.amount=$.readSB8();if(this.operation===s$.TNS_LOB_OP_IS_OPEN||this.operation===s$.TNS_LOB_OP_FILE_EXISTS||this.operation===s$.TNS_LOB_OP_FILE_ISOPEN)G=$.readUInt8(),this.boolFlag=G>0}}YD1.exports=$D1});var Tx=o((uR5,JD1)=>{var{Buffer:sa}=A0("buffer"),vc6=Cz0(),y9=E9(),xc6=VV0(),XD1=O4(),yc6=kY();class GD1 extends vc6{_getConnImpl(){return this.conn}async _sendMessage($){let Y=new xc6(this.conn,$);if(await this.conn._protocol._processMessage(Y),$.operation===y9.TNS_LOB_OP_READ)return Y.data?Y.data:null;else if($.operation===y9.TNS_LOB_OP_FILE_EXISTS||$.operation===y9.TNS_LOB_OP_FILE_ISOPEN)return Y.boolFlag;else return Y.amount}getChunkSize(){return this._chunkSize}async _getChunkSizeAsync(){this.checkConn();let $={operation:y9.TNS_LOB_OP_GET_CHUNK_SIZE,sourceLobImpl:this,sendAmount:!0};this._chunkSize=this._pieceSize=await this._sendMessage($)}getLength(){return this._length}getPieceSize(){return this._pieceSize}setPieceSize($){this._pieceSize=$}getType(){return this.dbType}async getData($=1,Y=this._length){let X=!1;if(!Y)Y=this._length;if(this.dbType===yc6.DB_TYPE_BFILE){if(!await this.isFileOpen())X=!0,await this.openFile()}let G;try{G=await this.read($,Y)}finally{if(X)await this.closeFile()}return G}async read($,Y){this.checkConn();let X={operation:y9.TNS_LOB_OP_READ,sourceLobImpl:this,sourceOffset:$,sendAmount:!0,amount:Y||this._pieceSize};return await this._sendMessage(X)}async write($,Y){this.checkConn();let X={operation:y9.TNS_LOB_OP_WRITE,sourceLobImpl:this,sourceOffset:$,data:Y};await this._sendMessage(X),this._length+=Y.length}getCsfrm(){if(this.dbType._csfrm!==y9.CSFRM_NCHAR){if(this._locator[y9.TNS_LOB_LOC_OFFSET_FLAG_3]&y9.TNS_LOB_LOC_FLAGS_VAR_LENGTH_CHARSET)return y9.CSFRM_NCHAR}return this.dbType._csfrm}async create($,Y){this.dirtyLength=!1,this.conn=$,this.dbType=Y,this._locator=sa.alloc(40),this._isTempLob=!0,this._length=0;let X={operation:y9.TNS_LOB_OP_CREATE_TEMP,sourceLobImpl:this,destOffset:Y._oraTypeNum,sourceOffset:Y._csfrm,destLength:y9.TNS_DURATION_SESSION};await this._sendMessage(X),await this._getChunkSizeAsync()}async fileExists(){this.checkConn();let $={operation:y9.TNS_LOB_OP_FILE_EXISTS,sourceLobImpl:this};return await this._sendMessage($)}getDirFileName(){let $=y9.TNS_LOB_LOC_FIXED_OFFSET+2,Y=this._locator.readUInt16BE(y9.TNS_LOB_LOC_FIXED_OFFSET),X=y9.TNS_LOB_LOC_FIXED_OFFSET+Y+4,G=this._locator.readUInt16BE($+Y),J=this._locator.slice($,$+Y).toString(),Q=this._locator.slice(X,X+G).toString();return{dirName:J,fileName:Q}}checkConn(){if(!this.conn.nscon.connected)XD1.throwErr(XD1.ERR_INVALID_CONNECTION)}close(){if(this.checkConn(),this._isTempLob)this.conn._tempLobsToClose.push(this._locator),this.conn._tempLobsTotalSize+=this._locator.length}async closeFile(){this.checkConn();let $={operation:y9.TNS_LOB_OP_FILE_CLOSE,sourceLobImpl:this};await this._sendMessage($)}init($,Y,X,G,J){if(this.dirtyLength=!1,this.conn=$,this._locator=Y,this._isTempLob=!1,this._locator[y9.TNS_LOB_LOC_OFFSET_FLAG_4]&y9.TNS_LOB_LOC_FLAGS_TEMP===y9.TNS_LOB_LOC_FLAGS_TEMP||this._locator[y9.TNS_LOB_LOC_OFFSET_FLAG_1]&y9.TNS_LOB_LOC_FLAGS_ABSTRACT===y9.TNS_LOB_LOC_FLAGS_ABSTRACT)this._isTempLob=!0;this.dbType=X,this._length=G,this._chunkSize=J,this._pieceSize=J}async isFileOpen(){let $={operation:y9.TNS_LOB_OP_FILE_ISOPEN,sourceLobImpl:this};await this._sendMessage($)}async openFile(){this.checkConn();let $={operation:y9.TNS_LOB_OP_FILE_OPEN,sourceLobImpl:this,amount:y9.TNS_LOB_OPEN_READ_ONLY,sendAmount:!0};return await this._sendMessage($)}setDirFileName($){let Y=sa.byteLength($.dirName),X=y9.TNS_LOB_LOC_FIXED_OFFSET+2,G=X+Y+2,J=sa.byteLength($.fileName),Q=G+J,W=sa.allocUnsafe(Q);this._locator.copy(W,0,0,y9.TNS_LOB_LOC_FIXED_OFFSET+1),W.writeUInt16BE(Y,y9.TNS_LOB_LOC_FIXED_OFFSET),W.write($.dirName,X),W.writeInt16BE(J,X+Y),W.write($.fileName,G),this._locator=W}}JD1.exports=GD1});var ea=o((pR5,WD1)=>{var{Buffer:tA}=A0("buffer"),b9=E9(),sJ=O4(),o8=kY(),bc6=ba(),{GrowableBuffer:hc6}=sq(),fc6=Tx();class oa extends hc6{_readBytesWithLength($){if($===b9.TNS_LONG_LENGTH_INDICATOR)$=this.readUInt32BE();return this.readBytes($)}getIsAtomicNull($){let Y=this.readUInt8();if(Y===b9.TNS_OBJ_ATOMIC_NULL||$&&Y===b9.TNS_NULL_LENGTH_INDICATOR)return!0;return this.pos-=1,!1}readHeader($){if($.imageFlags=this.readUInt8(),$.imageVersion=this.readUInt8(),this.readLength(),($.imageFlags&b9.TNS_OBJ_NO_PREFIX_SEG)===0){let Y=this.readLength();this.skipBytes(Y)}}readLength(){let $=this.readUInt8();if($!==b9.TNS_LONG_LENGTH_INDICATOR)return $;return this.readUInt32BE()}writeHeader($){if(this.writeUInt8($.imageFlags),this.writeUInt8($.imageVersion),this.writeUInt8(b9.TNS_LONG_LENGTH_INDICATOR),this.writeUInt32BE(0),$._objType.isCollection)this.writeUInt8(1),this.writeUInt8(1)}writeLength($){if($<=b9.TNS_OBJ_MAX_SHORT_LENGTH)this.writeUInt8($);else this.writeUInt8(b9.TNS_LONG_LENGTH_INDICATOR),this.writeUInt32BE($)}_writeRawBytesAndLength($,Y){this.writeLength(Y),this.writeBytes($)}}class ta extends bc6{constructor($,Y){if(typeof $==="function")$=$.prototype._objType;super($);if(this.packedData=Y,this.unpackedAttrs=new Map,Y)this.unpackedAssocArray=new Map,this.unpackedAssocKeys=void 0;else if($){let X=tA.from([0,34,b9.TNS_OBJ_NON_NULL_OID,b9.TNS_OBJ_HAS_EXTENT_OID]);if(this.toid=tA.concat([X,$.oid,b9.TNS_EXTENT_OID]),this.flags=b9.TNS_OBJ_TOP_LEVEL,this.imageFlags=b9.TNS_OBJ_IS_VERSION_81,this.imageVersion=b9.TNS_OBJ_IMAGE_VERSION,$.isCollection)if(this.imageFlags|=b9.TNS_OBJ_IS_COLLECTION,$.collectionType===b9.TNS_OBJ_PLSQL_INDEX_TABLE)this.unpackedAssocArray=new Map;else this.unpackedArray=[];else this.imageFlags|=b9.TNS_OBJ_NO_PREFIX_SEG}}_ensureAssocKeys(){if(!this.unpackedAssocKeys)this.unpackedAssocKeys=[...this.unpackedAssocArray.keys()].sort(($,Y)=>$-Y)}_ensureUnpacked(){if(this.packedData)this._unpackData()}_getPackedData(){if(this.packedData)return this.packedData;let $=new oa;$.writeHeader(this),this._packData($);let Y=$.pos;return $.pos=3,$.writeUInt32BE(Y),$.buf.subarray(0,Y)}_packData($){let Y=this._objType;if(Y.isCollection)if($.writeUInt8(Y.collectionFlags),Y.collectionType===b9.TNS_OBJ_PLSQL_INDEX_TABLE){this._ensureAssocKeys(),$.writeLength(this.unpackedAssocKeys.length);for(let X of this.unpackedAssocKeys)$.writeInt32BE(X),this._packValue($,Y.elementType,Y.elementTypeClass,this.unpackedAssocArray.get(X))}else{$.writeLength(this.unpackedArray.length);for(let X of this.unpackedArray)this._packValue($,Y.elementType,Y.elementTypeClass,X)}else for(let X of Y.attributes)this._packValue($,X.type,X.typeClass,this.unpackedAttrs.get(X.name))}_packValue($,Y,X,G){if(G===null||G===void 0)if(X&&!X.prototype.isCollection)$.writeUInt8(b9.TNS_OBJ_ATOMIC_NULL);else $.writeUInt8(b9.TNS_NULL_LENGTH_INDICATOR);else switch(Y){case o8.DB_TYPE_CHAR:case o8.DB_TYPE_VARCHAR:$.writeBytesWithLength(tA.from(G));break;case o8.DB_TYPE_NCHAR:case o8.DB_TYPE_NVARCHAR:$.writeBytesWithLength(tA.from(G,"utf16le").swap16());break;case o8.DB_TYPE_NUMBER:$.writeOracleNumber(G.toString());break;case o8.DB_TYPE_BINARY_INTEGER:case o8.DB_TYPE_BOOLEAN:$.writeUInt8(4),$.writeUInt32BE(G);break;case o8.DB_TYPE_RAW:$.writeBytesWithLength(G);break;case o8.DB_TYPE_BINARY_DOUBLE:$.writeUInt8(8),$.writeBinaryDouble(G);break;case o8.DB_TYPE_BINARY_FLOAT:$.writeUInt8(4),$.writeBinaryFloat(G);break;case o8.DB_TYPE_DATE:case o8.DB_TYPE_TIMESTAMP:case o8.DB_TYPE_TIMESTAMP_LTZ:case o8.DB_TYPE_TIMESTAMP_TZ:$.writeOracleDate(G,Y);break;case o8.DB_TYPE_OBJECT:if(this._objType.isCollection||G._objType.isCollection)$.writeBytesWithLength(G._getPackedData());else G._packData($);break;default:sJ.throwErr(sJ.ERR_NOT_IMPLEMENTED,Y)}}_unpackData(){let $=new oa(this.packedData);$.readHeader(this),this._unpackDataFromBuf($),this.packedData=void 0}_unpackDataFromBuf($){let Y,X,G,J,Q=this._objType;if(Q.isCollection){if(Q.collectionType===b9.TNS_OBJ_PLSQL_INDEX_TABLE)X=new Map;else Y=[];this.collectionFlags=$.readUInt8();let W=$.readLength();for(let K=0;K<W;K++){if(Q.collectionType===b9.TNS_OBJ_PLSQL_INDEX_TABLE)G=$.readUInt32BE();let Z=this._unpackValue($,Q.elementType,Q.elementTypeClass);if(Q.collectionType===b9.TNS_OBJ_PLSQL_INDEX_TABLE)X.set(G,Z);else Y.push(Z)}}else{J=new Map;for(let W of Q.attributes){let K=this._unpackValue($,W.type,W.typeClass);J.set(W.name,K)}}this.unpackedAttrs=J,this.unpackedArray=Y,this.unpackedAssocArray=X}_unpackValue($,Y,X){let G,J,Q,W;switch(Y){case o8.DB_TYPE_NUMBER:return $.readOracleNumber();case o8.DB_TYPE_BINARY_INTEGER:return $.readBinaryInteger();case o8.DB_TYPE_VARCHAR:case o8.DB_TYPE_CHAR:return $.readStr(b9.CSFRM_IMPLICIT);case o8.DB_TYPE_NVARCHAR:case o8.DB_TYPE_NCHAR:return $.readStr(b9.CSFRM_NCHAR);case o8.DB_TYPE_RAW:if(Q=$.readBytesWithLength(),Q!==null)Q=tA.from(Q);return Q;case o8.DB_TYPE_BINARY_DOUBLE:return $.readBinaryDouble();case o8.DB_TYPE_BINARY_FLOAT:return $.readBinaryFloat();case o8.DB_TYPE_DATE:case o8.DB_TYPE_TIMESTAMP:return $.readOracleDate(!0);case o8.DB_TYPE_TIMESTAMP_LTZ:case o8.DB_TYPE_TIMESTAMP_TZ:return $.readOracleDate(!1);case o8.DB_TYPE_BOOLEAN:return $.readBool();case o8.DB_TYPE_OBJECT:case o8.DB_TYPE_XMLTYPE:if(J=new ta(X),W=J._objType.isCollection||this._objType.isCollection,G=$.getIsAtomicNull(W),G)return null;if(J._objType.isXmlType)return QD1(J._objType._connection,$.readBytesWithLength());if(W)J.packedData=tA.from($.readBytesWithLength());else J._unpackDataFromBuf($);return J;default:sJ.throwErr(sJ.ERR_NOT_IMPLEMENTED,Y)}}append($){if(this._ensureUnpacked(),this.unpackedArray){let Y=this._objType;if(Y.maxNumElements>0&&this.unpackedArray.length>=Y.maxNumElements)sJ.throwErr(sJ.ERR_INVALID_COLL_INDEX_SET,this.unpackedArray.length,0,Y.maxNumElements-1);this.unpackedArray.push($)}else{this._ensureAssocKeys();let Y;if(this.unpackedAssocKeys.length===0)Y=0;else{let X=this.unpackedAssocKeys.length-1;Y=this.unpackedAssocKeys[X]+1}this.unpackedAssocArray.set(Y,$),this.unpackedAssocKeys.push(Y)}}copy(){let $=new ta(this._objType,this._getPackedData());return $.toid=this.toid,$.flags=this.flags,$.imageFlags=this.imageFlags,$.imageVersion=this.imageVersion,$}deleteElement($){if(this._ensureUnpacked(),this.unpackedArray){if(this._objType.collectionType==b9.TNS_OBJ_VARRAY)sJ.throwErr(sJ.ERR_DELETE_ELEMENTS_OF_VARRAY);this.unpackedArray.splice($,1)}else this.unpackedAssocKeys=void 0,this.unpackedAssocArray.delete($)}getAttrValue($){this._ensureUnpacked();let Y=this.unpackedAttrs.get($.name);if(Y===void 0)return null;return Y}getElement($){let Y;if(this._ensureUnpacked(),this.unpackedArray)Y=this.unpackedArray[$];else Y=this.unpackedAssocArray.get($);if(Y===void 0)sJ.throwErr(sJ.ERR_INVALID_COLL_INDEX_GET,$);return Y}getFirstIndex(){if(this._ensureUnpacked(),this.unpackedArray)return 0;else if(this.unpackedAssocArray)return this._ensureAssocKeys(),this.unpackedAssocKeys[0]}getKeys(){if(this._ensureUnpacked(),this.unpackedArray)return Array.from(this.unpackedArray.keys());else if(this.unpackedAssocArray)return this._ensureAssocKeys(),Array.from(this.unpackedAssocKeys);return[]}getLastIndex(){if(this._ensureUnpacked(),this.unpackedArray){if(this.unpackedArray.length>0)return this.unpackedArray.length-1}else if(this.unpackedAssocArray)return this._ensureAssocKeys(),this.unpackedAssocKeys[this.unpackedAssocKeys.length-1]}getNextIndex($){if(this._ensureUnpacked(),this.unpackedArray){if($+1<this.unpackedArray.length)return $+1}else if(this.unpackedAssocArray){this._ensureAssocKeys();for(let Y of this.unpackedAssocKeys)if(Y>$)return Y}}getPrevIndex($){if(this._ensureUnpacked(),this.unpackedArray){if($>0)return $-1}else if(this.unpackedAssocArray){this._ensureAssocKeys();let Y;for(let X of this.unpackedAssocKeys){if(X>=$)return Y;Y=X}}}getValues(){let $=[];if(this._ensureUnpacked(),this.unpackedArray)return Array.from(this.unpackedArray);else if(this.unpackedAssocArray){this._ensureAssocKeys();for(let Y of this.unpackedAssocKeys)$.push(this.unpackedAssocArray.get(Y))}return $}getLength(){if(this._ensureUnpacked(),this.unpackedArray)return this.unpackedArray.length;if(this.unpackedAssocArray)return this.unpackedAssocArray.size}hasElement($){if(this._ensureUnpacked(),this.unpackedArray)return $>=0&&$<this.unpackedArray.length;return this.unpackedAssocArray.has($)}setAttrValue($,Y){this._ensureUnpacked(),this.unpackedAttrs.set($.name,Y)}setElement($,Y){if(this._ensureUnpacked(),this.unpackedArray){let X=Math.max(this.unpackedArray.length-1,0);if($>X)sJ.throwErr(sJ.ERR_INVALID_COLL_INDEX_SET,$,0,X);this.unpackedArray[$]=Y}else{if(!this.unpackedAssocArray.has($))this.unpackedAssocKeys=void 0;this.unpackedAssocArray.set($,Y)}}trim($){if(this._ensureUnpacked(),$>0)this.unpackedArray=this.unpackedArray.slice(0,this.unpackedArray.length-$)}}function QD1($,Y){let X,G=new oa(Y),J={};G.readHeader(J),G.skipBytes(1);let Q=G.readUInt32BE();if(Q&b9.TNS_XML_TYPE_FLAG_SKIP_NEXT_4)G.skipBytes(4);let W=G.numBytesLeft(),K=G.readBytes(W);if(Q&b9.TNS_XML_TYPE_STRING)X=K.toString();else if(Q&b9.TNS_XML_TYPE_LOB){let Z=new fc6,H=tA.from(K);Z.init($,H,o8.DB_TYPE_CLOB,0,0),X=Z}else sJ.throwErr(sJ.ERR_UNEXPECTED_XML_TYPE,Q);return X}WD1.exports={ThinDbObjectImpl:ta,readXML:QD1}});var FV0=o((dR5,HD1)=>{var{Buffer:hF}=A0("buffer"),KD1=JP(),o0=E9(),gc6=CG(),{ThinDbObjectImpl:mc6,readXML:uc6}=ea(),pc6=Tx(),fF=O4(),s5=kY();class UD1 extends gc6{constructor($,Y=null,X=null){super($);this.statement=Y,this.options=X,this.offset=0,this.numExecs=1,this.arrayDmlRowCounts=!1,this.requiresDefine=!1,this.rowIndex=Y.bufferRowCount||0,this.dmlRowCounts=[],this.batchErrors=!1,this.outVariables=[],this.inFetch=!1,this.parseOnly=!1,this.resultSetsToSetup=[],this.deferredErr=null}processMessage($,Y){if(Y===o0.TNS_MSG_TYPE_DESCRIBE_INFO){$.skipBytesChunked();let X=this.statement.queryVars;this.statement.numQueryVars=0,this.statement.bufferRowCount=0,this.statement.bufferRowIndex=0,this.processDescribeInfo($,this.resultSet,X),this.outVariables=this.statement.queryVars}else if(Y===o0.TNS_MSG_TYPE_ROW_HEADER)this.processRowHeader($);else if(Y===o0.TNS_MSG_TYPE_ROW_DATA)this.processRowData($);else if(Y===o0.TNS_MSG_TYPE_IMPLICIT_RESULTSET)this.processImplicitResultSet($);else if(Y===o0.TNS_MSG_TYPE_BIT_VECTOR)this.processBitVector($);else if(Y===o0.TNS_MSG_TYPE_IO_VECTOR)this.processIOVector($);else if(Y===o0.TNS_MSG_TYPE_FLUSH_OUT_BINDS)this.flushOutBinds=!0,this.endOfResponse=!0;else if(Y===o0.TNS_MSG_TYPE_ERROR)this.processErrorInfo($);else super.processMessage($,Y)}processErrorInfo($){if(super.processErrorInfo($),this.errorInfo.cursorId!==0)this.statement.cursorId=this.errorInfo.cursorId;if(!this.statement.isPlSql)this.statement.rowCount=this.errorInfo.rowCount;if(this.errorInfo.rowCount>0)this.statement.lastRowid=KD1.encodeRowID(this.errorInfo.rowID);if(this.options.batchErrors=this.errorInfo.batchErrors,this.batchErrors&&this.options.batchErrors===null)this.options.batchErrors=[];if(this.errorInfo.num===o0.TNS_ERR_NO_DATA_FOUND&&this.statement.isQuery)this.errorInfo.num=0,this.errorOccurred=!1,this.statement.moreRowsToFetch=!1;else if(this.retry)this.retry=!1;else if(this.statement.isQuery&&(this.errorInfo.num===o0.TNS_ERR_VAR_NOT_IN_SELECT_LIST||this.errorInfo.num===o0.TNS_ERR_INCONSISTENT_DATA_TYPES))this.retry=!0,this.connection.statementCache.clearCursor(this.statement);else if(this.errorInfo.num!==0&&this.errorInfo.cursorId!==0){if(!fF.ERR_INTEGRITY_ERROR_CODES.includes(this.errorInfo.num))this.connection.statementCache.clearCursor(this.statement),this.statement.returnToCache=!1}if(this.errorInfo.batchErrors)this.errorOccurred=!1}_adjustFetchType($,Y){if(Y.fetchInfo.dbType._oraTypeNum===o0.TNS_DATA_TYPE_CLOB&&$.fetchInfo.fetchType._oraTypeNum===o0.TNS_DATA_TYPE_LONG||Y.fetchInfo.dbType._oraTypeNum===o0.TNS_DATA_TYPE_BLOB&&$.fetchInfo.fetchType._oraTypeNum===o0.TNS_DATA_TYPE_LONG_RAW||Y.fetchInfo.dbType._oraTypeNum===o0.TNS_DATA_TYPE_JSON&&$.fetchInfo.fetchType._oraTypeNum===o0.TNS_DATA_TYPE_VARCHAR||Y.fetchInfo.dbType._oraTypeNum===o0.TNS_DATA_TYPE_VECTOR&&$.fetchInfo.fetchType._oraTypeNum===o0.TNS_DATA_TYPE_LONG)Y.type=$.fetchInfo.fetchType,Y.maxSize=$.maxSize}processDescribeInfo($,Y,X){let G=Y.statement;if($.skipUB4(),G.numQueryVars=$.readUB4(),G.numQueryVars>0)$.skipUB1();let J=[],Q=[];for(let K=0;K<G.numQueryVars;K++){let Z=this.processColumnInfo($,K+1);if(X&&K<X.length)this._adjustFetchType(X[K],Z);Q.push(Z),J.push(Z.fetchInfo)}let W=$.readUB4();if(W>0)$.skipBytesChunked();if($.skipUB4(),$.skipUB4(),$.skipUB4(),$.skipUB4(),W=$.readUB4(),W>0)$.skipBytesChunked();Y.metaData=J,G.queryVars=Q,this.resultSetsToSetup.push(Y)}processColumnInfo($,Y){let X=$.readUInt8();$.skipUB1();let G=$.readInt8(),J=$.readInt8(),Q=$.readUB4();$.skipUB4(),$.skipUB8();let W,K=$.readUB4();if(K>0)W=hF.from($.readBytesWithLength());$.skipUB2(),$.skipUB2();let Z=$.readUInt8(),H=$.readUB4();if(X===o0.TNS_DATA_TYPE_RAW)H=Q;if($.caps.ttcFieldVersion>=o0.TNS_CCAP_FIELD_VERSION_12_2)$.skipUB4();let z=Boolean($.readUInt8());$.skipUB1();let V;if(K=$.readUB4(),K>0)V=$.readStr(o0.CSFRM_IMPLICIT);let F;if(K=$.readUB4(),K>0)F=$.readStr(o0.CSFRM_IMPLICIT);K=$.readUB4();let L;if(K>0)L=$.readStr(o0.CSFRM_IMPLICIT);$.skipUB2();let N=$.readUB4(),D={name:V,dbColumnName:V,dbType:s5.getTypeByOraTypeNum(X,Z),nullable:z};if(D.isJson=Boolean(N&o0.TNS_UDS_FLAGS_IS_JSON),D.isOson=Boolean(N&o0.TNS_UDS_FLAGS_IS_OSON),$.caps.ttcFieldVersion>=o0.TNS_CCAP_FIELD_VERSION_23_1){if(K=$.readUB4(),K>0)D.domainSchema=$.readStr(o0.CSFRM_IMPLICIT);if(K=$.readUB4(),K>0)D.domainName=$.readStr(o0.CSFRM_IMPLICIT)}if($.caps.ttcFieldVersion>=o0.TNS_CCAP_FIELD_VERSION_23_1_EXT_3){if($.readUB4()>0){D.annotations={},$.skipUB1();let A=$.readUB4();$.skipUB1();let B,O;for(let E=0;E<A;E++){if($.skipUB4(),O="",B=$.readStr(o0.CSFRM_IMPLICIT),K=$.readUB4(),K>0)O=$.readStr(o0.CSFRM_IMPLICIT);D.annotations[B]=O,$.skipUB4()}$.skipUB4()}}if($.caps.ttcFieldVersion>=o0.TNS_CCAP_FIELD_VERSION_23_4){let A=$.readUB4(),B=$.readUInt8(),O=$.readUInt8();if(D.dbType===s5.DB_TYPE_VECTOR){if(!(O&o0.VECTOR_META_FLAG_FLEXIBLE_DIM))D.vectorDimensions=A;if(D.isSparseVector=Boolean(O&o0.VECTOR_META_FLAG_SPARSE),B!==o0.VECTOR_FORMAT_FLEX)D.vectorFormat=B}}switch(D.dbType){case s5.DB_TYPE_VARCHAR:case s5.DB_TYPE_NVARCHAR:case s5.DB_TYPE_CHAR:case s5.DB_TYPE_NCHAR:case s5.DB_TYPE_RAW:D.byteSize=H;break;case s5.DB_TYPE_NUMBER:D.precision=G;break;case s5.DB_TYPE_TIMESTAMP:case s5.DB_TYPE_TIMESTAMP_TZ:case s5.DB_TYPE_TIMESTAMP_LTZ:D.precision=J;break;case s5.DB_TYPE_OBJECT:if(D.dbTypeClass=this.connection._getDbObjectType(F,L,void 0,W),D.dbTypeClass.partial)this.connection._partialDbObjectTypes.push(D.dbTypeClass);if(D.dbTypeClass.isXmlType)D.dbType=s5.DB_TYPE_XMLTYPE;break;default:break}if(D.dbType===s5.DB_TYPE_NUMBER)D.scale=J;return{fetchInfo:D,type:D.dbType,maxSize:Q,columnNum:Y,values:Array(this.options.fetchArraySize)}}processRowHeader($){$.skipUB1(),$.skipUB2(),$.skipUB4(),$.skipUB4(),$.skipUB2();let Y=$.readUB4();if(Y>0)this.bitVector=hF.from($.readBytesWithLength());if(Y=$.readUB4(),Y>0)$.skipBytesChunked()}isDuplicateData($){if(!this.bitVector)return!1;let Y=Math.floor($/8),X=$%8;return(this.bitVector[Y]&1<<X)===0}processRowData($){let Y;for(let[X,G]of this.outVariables.entries())if(G.isArray){G.numElementsInArray=$.readUB4();let J=Array(G.numElementsInArray).fill(null);for(let Q=0;Q<G.numElementsInArray;Q++)Y=this.processColumnData($,G,Q),J[Q]=Y;G.values[this.rowIndex]=J}else if(this.statement.isReturning){let J=$.readUB4(),Q=Array(J).fill(null);for(let W=0;W<J;W++)Q[W]=this.processColumnData($,G,W);G.values[this.rowIndex]=Q}else if(this.isDuplicateData(X)){if(this.rowIndex===0&&G.outConverter)Y=G.lastRawValue;else Y=G.values[this.statement.lastRowIndex];G.values[this.rowIndex]=Y}else Y=this.processColumnData($,G,this.rowIndex),G.values[this.rowIndex]=Y;if(this.rowIndex++,this.inFetch)this.statement.lastRowIndex=this.rowIndex-1,this.statement.bufferRowCount++,this.bitVector=null}processIOVector($){let Y;$.skipUB1();let X=$.readUB2(),J=$.readUB4()*256+X;if($.skipUB4(),$.skipUB2(),Y=$.readUB2(),Y>0)$.skipBytes(Y);if(Y=$.readUB2(),Y>0)$.skipBytes(Y);this.outVariables=[];for(let Q=0;Q<J;Q++){let W=this.statement.bindInfoList[Q];if(W.bindDir=$.readUInt8(),W.bindDir===o0.TNS_BIND_DIR_INPUT)continue;this.outVariables.push(W.bindVar)}}processColumnData($,Y){let X=Y.type,G=X._oraTypeNum,J=X._csfrm,Q=Y.maxSize,W=null;if(Q===0&&G!==o0.TNS_DATA_TYPE_LONG&&G!==o0.TNS_DATA_TYPE_LONG_RAW&&G!==o0.TNS_DATA_TYPE_UROWID)W=null;else if(G===o0.TNS_DATA_TYPE_VARCHAR||G===o0.TNS_DATA_TYPE_CHAR||G===o0.TNS_DATA_TYPE_LONG){if(J===o0.CSFRM_NCHAR)$.caps.checkNCharsetId();W=$.readStr(J)}else if(G===o0.TNS_DATA_TYPE_RAW||G===o0.TNS_DATA_TYPE_LONG_RAW){if(W=$.readBytesWithLength(),W!==null)W=hF.from(W)}else if(G===o0.TNS_DATA_TYPE_NUMBER){if(W=$.readOracleNumber(),!this.inFetch&&W!==null)W=parseFloat(W)}else if(G===o0.TNS_DATA_TYPE_DATE||G===o0.TNS_DATA_TYPE_TIMESTAMP||G===o0.TNS_DATA_TYPE_TIMESTAMP_LTZ||G===o0.TNS_DATA_TYPE_TIMESTAMP_TZ){let K=G===o0.TNS_DATA_TYPE_DATE||G===o0.TNS_DATA_TYPE_TIMESTAMP;W=$.readOracleDate(K)}else if(G===o0.TNS_DATA_TYPE_ROWID)if(!this.inFetch)W=$.readStr(o0.CSFRM_IMPLICIT);else{let K=$.readUInt8();if(ZD1(K))W=null;else{let Z=$.readRowID();W=KD1.encodeRowID(Z)}}else if(G===o0.TNS_DATA_TYPE_UROWID)if(!this.inFetch)W=$.readStr(o0.CSFRM_IMPLICIT);else W=$.readURowID();else if(G===o0.TNS_DATA_TYPE_BINARY_DOUBLE)W=$.readBinaryDouble();else if(G===o0.TNS_DATA_TYPE_BINARY_FLOAT)W=$.readBinaryFloat();else if(G===o0.TNS_DATA_TYPE_BINARY_INTEGER){if(W=$.readOracleNumber(),W!==null)W=parseFloat(W)}else if(G===o0.TNS_DATA_TYPE_CURSOR){let K=$.readUInt8();if(ZD1(K))W=null;else if(W=this.createCursorFromDescribe($),W.statement.cursorId=$.readUB2(),W.statement.cursorId===0&&Y.dir!==o0.BIND_IN)if(this.options.nullifyInvalidCursor)W=null;else fF.throwErr(fF.ERR_INVALID_REF_CURSOR)}else if(G===o0.TNS_DATA_TYPE_BOOLEAN)W=$.readBool();else if(G===o0.TNS_DATA_TYPE_INTERVAL_YM)W=$.readOracleIntervalYM();else if(G===o0.TNS_DATA_TYPE_INTERVAL_DS)W=$.readOracleIntervalDS();else if(G===o0.TNS_DATA_TYPE_CLOB||G===o0.TNS_DATA_TYPE_BLOB||G===o0.TNS_DATA_TYPE_BFILE){let K=0,Z=0;if($.readUB4()>0){if(W=new pc6,G!==o0.TNS_DATA_TYPE_BFILE)K=$.readUB8(),Z=$.readUB4();let z=hF.from($.readBytesWithLength());W.init(this.connection,z,X,K,Z)}}else if(G===o0.TNS_DATA_TYPE_JSON)W=$.readOson();else if(G===o0.TNS_DATA_TYPE_VECTOR)W=$.readVector();else if(G===o0.TNS_DATA_TYPE_INT_NAMED){let K=$.readDbObject();if(K.packedData){let Z=Y.fetchInfo?Y.fetchInfo.dbTypeClass:Y.typeClass;if(Y.type===s5.DB_TYPE_XMLTYPE)W=uc6(this.connection,K.packedData);else W=new mc6(Z,K.packedData),W.toid=K.toid,W.oid=K.oid}}else fF.throwErr(fF.ERR_UNSUPPORTED_DATA_TYPE,X.num,Y.columnNum);if(!this.inFetch){let K=$.readSB4();if(K<0&&G===o0.TNS_DATA_TYPE_BOOLEAN)W=null;else if(K!==0&&W!==null&&G!==o0.TNS_DATA_TYPE_INT_NAMED)this.saveDeferredErr(fF.ERR_INSUFFICIENT_BUFFER_FOR_BINDS)}else if(G===o0.TNS_DATA_TYPE_LONG||G===o0.TNS_DATA_TYPE_LONG_RAW||Y.maxSize>$.caps.maxStringSize)$.skipSB4(),$.skipUB4();return W}processReturnParameter($){let Y=0,X,G=$.readUB2();for(let Q=0;Q<G;Q++)$.skipUB4();let J=$.readUB2();if(J>0)$.skipBytes(J);G=$.readUB2();for(let Q=0;Q<G;Q++){if(J=$.readUB2(),J>0)X=$.readStr(o0.CSFRM_IMPLICIT);if(J=$.readUB2(),J>0)$.skipBytesChunked();if(Y=$.readUB2(),Y===o0.TNS_KEYWORD_NUM_CURRENT_SCHEMA)this.connection.currentSchema=X;else if(Y===o0.TNS_KEYWORD_NUM_EDITION)this.connection._edition=X}if(J=$.readUB2(),J>0)$.skip(J);if(this.arrayDmlRowCounts){let Q=$.readUB4(),W=this.options.dmlRowCounts=[];for(let K=0;K<Q;K++){let Z=$.readUB8();W.push(Z)}}}async postProcess(){if(this.deferredErr)throw this.deferredErr;if(this.outVariables){for(let $ of this.outVariables)if($.isArray){if($.outConverter)for(let Y=0;Y<$.numElementsInArray;Y++)$.values[0][Y]=await $.outConverter($.values[0][Y])}else if($.outConverter)$.values[0]=await $.outConverter($.values[0])}await this.connection._populatePartialDbObjectTypes();for(let $ of this.resultSetsToSetup){$._setup(this.options,$.metaData);for(let Y of $.statement.queryVars)if(Y.type===s5.DB_TYPE_CLOB||Y.type===s5.DB_TYPE_NCLOB||Y.type===s5.DB_TYPE_BLOB||Y.type===s5.DB_TYPE_JSON||Y.type===s5.DB_TYPE_VECTOR){if(Y.type!==Y.fetchInfo.fetchType)Y.type=Y.fetchInfo.fetchType,Y.maxSize=o0.TNS_MAX_LONG_LENGTH;if(!$.statement.noPrefetch)$.statement.requiresDefine=!0,$.statement.noPrefetch=!0}}}preProcess(){if(this.statement.isReturning&&!this.parseOnly){this.outVariables=[];for(let $ of this.statement.bindInfoList)if($.isReturnBind)this.outVariables.push($.bindVar)}if(this.statement.isQuery){if(this.inFetch=!0,this.statement.queryVars){this.outVariables=[];for(let $=0;$<this.statement.queryVars.length;$++)this.outVariables.push(this.statement.queryVars[$])}}}processBitVector($){this.numColumnsSent=$.readUB2();let Y=Math.floor(this.statement.numQueryVars/8);if(this.statement.numQueryVars%8>0)Y+=1;this.bitVector=hF.from($.readBytes(Y))}processBindParams($,Y){let X=[],G=[];for(let J of Y){if(!J.isReturnBind)G.push(J);X.push(J.bindVar)}return this.writeColumnMetadata($,X),G}writeColumnMetadata($,Y){for(let X of Y){let G=X.type._oraTypeNum,J=X.maxSize||X.type._bufferSizeFactor,Q=0;if(X.type._csfrm===o0.CSFRM_NCHAR)J=Math.min(J*X.type._bufferSizeFactor,o0.TNS_MAX_LONG_LENGTH);if([o0.TNS_DATA_TYPE_ROWID,o0.TNS_DATA_TYPE_UROWID].includes(G))G=o0.TNS_DATA_TYPE_VARCHAR,J=o0.TNS_MAX_UROWID_LENGTH;let W=o0.TNS_BIND_USE_INDICATORS;if(X.isArray)W|=o0.TNS_BIND_ARRAY;let K=0;if(X.type===s5.DB_TYPE_BLOB||X.type===s5.DB_TYPE_CLOB||X.type===s5.DB_TYPE_NCLOB)K=o0.TNS_LOB_PREFETCH_FLAG;else if(X.type===s5.DB_TYPE_JSON)K=o0.TNS_LOB_PREFETCH_FLAG,J=Q=o0.TNS_JSON_MAX_LENGTH;else if(X.type===s5.DB_TYPE_VECTOR)K=o0.TNS_LOB_PREFETCH_FLAG,J=Q=o0.TNS_VECTOR_MAX_LENGTH;if($.writeUInt8(G),$.writeUInt8(W),$.writeUInt8(0),$.writeUInt8(0),$.writeUB4(J),X.isArray)$.writeUB4(X.maxArraySize);else $.writeUB4(0);if($.writeUB4(K),X.objType){let Z=X.objType;$.writeUB4(Z.oid.length),$.writeBytesWithLength(Z.oid),$.writeUB2(Z.version)}else $.writeUB4(0),$.writeUB2(0);if(X.type._csfrm!==0)$.writeUB2(o0.TNS_CHARSET_UTF8);else $.writeUB2(0);if($.writeUInt8(X.type._csfrm),$.writeUB4(Q),$.caps.ttcFieldVersion>=o0.TNS_CCAP_FIELD_VERSION_12_2)$.writeUB4(0)}}writeBindParamsRow($,Y,X){let G=this.offset,J=!1;for(let Q of Y){if(Q.isReturnBind)continue;let W=Q.bindVar;if(W.isArray){let K=W.values.length;$.writeUB4(K);for(let Z=0;Z<K;Z++)this.writeBindParamsColumn($,W,W.values[Z])}else if(!this.statement.isPlSql&&W.maxSize>$.caps.maxStringSize)J=!0;else this.writeBindParamsColumn($,W,W.values[X+G])}if(J)for(let Q of Y){if(Q.isReturnBind)continue;let W=Q.bindVar;if(W.maxSize>$.caps.maxStringSize)this.writeBindParamsColumn($,W,W.values[X+G])}}writeBindParamsColumn($,Y,X){let G=Y.type._oraTypeNum,J;if((X===void 0||X===null)&&G!==o0.TNS_DATA_TYPE_CURSOR&&G!==o0.TNS_DATA_TYPE_JSON)if(G===o0.TNS_DATA_TYPE_BOOLEAN)$.writeUInt8(o0.TNS_ESCAPE_CHAR),$.writeUInt8(1);else if(G===o0.TNS_DATA_TYPE_INT_NAMED)$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUB4(o0.TNS_OBJ_TOP_LEVEL);else $.writeUInt8(0);else if(G===o0.TNS_DATA_TYPE_NUMBER||G===o0.TNS_DATA_TYPE_BINARY_INTEGER){if(typeof X==="boolean")J=X?"1":"0";else J=X.toString();$.writeOracleNumber(J)}else if(G===o0.TNS_DATA_TYPE_VARCHAR||G===o0.TNS_DATA_TYPE_CHAR||G===o0.TNS_DATA_TYPE_LONG||G===o0.TNS_DATA_TYPE_RAW||G===o0.TNS_DATA_TYPE_LONG_RAW){if(Y.type._csfrm===o0.CSFRM_NCHAR)$.caps.checkNCharsetId(),X=hF.from(X,o0.TNS_ENCODING_UTF16).swap16();else X=hF.from(X);$.writeBytesWithLength(X)}else if(G===o0.TNS_DATA_TYPE_DATE||G===o0.TNS_DATA_TYPE_TIMESTAMP||G===o0.TNS_DATA_TYPE_TIMESTAMP_TZ||G===o0.TNS_DATA_TYPE_TIMESTAMP_LTZ)$.writeOracleDate(X,Y.type);else if(G===o0.TNS_DATA_TYPE_BINARY_DOUBLE)$.writeUInt8(8),$.writeBinaryDouble(X);else if(G===o0.TNS_DATA_TYPE_BINARY_FLOAT)$.writeUInt8(4),$.writeBinaryFloat(X);else if(G===o0.TNS_DATA_TYPE_CURSOR){let Q=X;if(!X)Q=this.connection._createResultSet();if(Q.statement.cursorId===0)$.writeUInt8(1),$.writeUInt8(0);else $.writeUB4(1),$.writeUB4(Q.statement.cursorId)}else if(G===o0.TNS_DATA_TYPE_BOOLEAN)if(X)$.writeUInt8(2),$.writeUInt16BE(257);else $.writeUInt16BE(256);else if(G===o0.TNS_DATA_TYPE_INTERVAL_YM)$.writeOracleIntervalYM(X);else if(G===o0.TNS_DATA_TYPE_INTERVAL_DS)$.writeOracleIntervalDS(X);else if(G===o0.TNS_DATA_TYPE_CLOB||G===o0.TNS_DATA_TYPE_BLOB||G===o0.TNS_DATA_TYPE_BFILE)$.writeUB4(X._locator.length),$.writeBytesWithLength(X._locator);else if([o0.TNS_DATA_TYPE_ROWID,o0.TNS_DATA_TYPE_UROWID].includes(G))$.writeBytesWithLength(hF.from(X));else if(G===o0.TNS_DATA_TYPE_JSON)$.writeOson(X,this.connection._osonMaxFieldNameSize);else if(G===o0.TNS_DATA_TYPE_VECTOR)$.writeVector(X);else if(G===o0.TNS_DATA_TYPE_INT_NAMED)$.writeDbObject(X);else{let Q=`Binding data of type ${Y.type}`;fF.throwErr(fF.ERR_NOT_IMPLEMENTED,Q)}}createCursorFromDescribe($){let Y=this.connection._createResultSet(this.options);return Y.options.moreRowsToFetch=!0,Y.statement.isQuery=!0,Y.statement.requiresFullExecute=!0,this.processDescribeInfo($,Y),Y}processImplicitResultSet($){this.options.implicitResultSet=[];let Y=$.readUB4();for(let X=0;X<Y;X++){let G=$.readUInt8();$.skipBytes(G);let J=this.createCursorFromDescribe($);J.statement.cursorId=$.readUB2(),this.options.implicitResultSet.push(J)}}}var ZD1=($)=>{return $===0||$===o0.TNS_NULL_LENGTH_INDICATOR};HD1.exports=UD1});var LV0=o((cR5,FD1)=>{var dc6=CG(),cc6=E9(),zD1=O4();class VD1 extends dc6{constructor($){super($);if(this.functionCode=cc6.TNS_FUNC_TPC_TXN_SWITCH,this.applicationValue=0,this.internalName=$.internalName,this.internalName)this.internalName=Buffer.from(this.internalName);if(this.externalName=$.externalName,this.externalName)this.externalName=Buffer.from(this.externalName)}processReturnParameter($){if(this.applicationValue=$.readUB4(),this.contextLen=$.readUB2(),this.contextLen>0)this.context=Buffer.from($.readBytes(this.contextLen))}encode($){if(this.connection._sessionlessData?.pending)zD1.throwErr(zD1.ERR_SESSIONLESS_ALREADY_ACTIVE);let Y;if(this.xid){if(Y=Buffer.alloc(128),this.xid.globalTransactionId.copy(Y),this.xid.branchQualifier)this.xid.branchQualifier.copy(Y,this.xid.globalTransactionId.length)}if(this.writeFunctionHeader($),$.writeUB4(this.operation),this.context)$.writeUInt8(1),$.writeUB4(this.context.length);else $.writeUInt8(0),$.writeUB4(0);if(this.xid)$.writeUB4(this.xid.formatId),$.writeUB4(this.xid.globalTransactionId.length),$.writeUB4(this.xid.branchQualifier.length),$.writeUInt8(1),$.writeUB4(Y.length);else $.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0);if($.writeUB4(this.flags),$.writeUB4(this.timeout?this.timeout:0),$.writeUInt8(1),$.writeUInt8(1),$.writeUInt8(1),this.internalName)$.writeUInt8(1),$.writeUB4(this.internalName.length);else $.writeUInt8(0),$.writeUB4(0);if(this.externalName)$.writeUInt8(1),$.writeUB4(this.externalName.length);else $.writeUInt8(0),$.writeUB4(0);if(this.context)$.writeBytes(this.context);if(this.xid)$.writeBytes(Y);if($.writeUB4(this.applicationValue),this.internalName)$.writeBytes(this.internalName);if(this.externalName)$.writeBytes(this.externalName)}}FD1.exports=VD1});var DV0=o((lR5,DD1)=>{var lc6=FV0(),M9=E9(),$s=O4(),ic6=LV0();class LD1 extends lc6{constructor($,Y,X,G){super($,Y,X);if(!G&&Y.isQuery)G=$._createResultSet(X,Y);this.resultSet=G,this.functionCode=M9.TNS_FUNC_EXECUTE,this.bindParams=void 0,this.currentRow=0}writeExecuteMessage($){let Y=0,X=0,G=0,J=1,Q=this.statement,W=Q.bindInfoList;if(this.noImplicitRelease)X|=M9.TNS_EXEC_OPTION_NO_IMPL_REL;if(!Q.requiresDefine&&!this.parseOnly&&W)G=W.length;if(Q.requiresDefine)Y|=M9.TNS_EXEC_OPTION_DEFINE;else if(!this.parseOnly&&Q.sql)X|=M9.TNS_EXEC_OPTION_IMPLICIT_RESULTSET,Y|=M9.TNS_EXEC_OPTION_EXECUTE;if(Q.cursorId===0||Q.isDdl)Y|=M9.TNS_EXEC_OPTION_PARSE;if(Q.isQuery)if(this.parseOnly)Y|=M9.TNS_EXEC_OPTION_DESCRIBE;else{if(Q.cursorId===0||Q.requiresDefine)J=this.options.prefetchRows;else J=this.options.fetchArraySize;if(J>0&&!Q.noPrefetch)Y|=M9.TNS_EXEC_OPTION_FETCH}if(!Q.isPlSql&&!this.parseOnly)Y|=M9.TNS_EXEC_OPTION_NOT_PLSQL;else if(Q.isPlSql&&G>0)Y|=M9.TNS_EXEC_OPTION_PLSQL_BIND;if(G>0)Y|=M9.TNS_EXEC_OPTION_BIND;if(this.batchErrors)Y|=M9.TNS_EXEC_OPTION_BATCH_ERRORS;if(this.arrayDmlRowCounts)X|=M9.TNS_EXEC_OPTION_DML_ROWCOUNTS;if(this.options.autoCommit)Y|=M9.TNS_EXEC_OPTION_COMMIT;if(this.options.suspendOnSuccess)this._handleSuspendSessionless();if(this.writeFunctionHeader($),$.writeUB4(Y),$.writeUB4(Q.cursorId),Q.cursorId===0||Q.isDdl)$.writeUInt8(1),$.writeUB4(Q.sqlLength);else $.writeUInt8(0),$.writeUB4(0);if($.writeUInt8(1),$.writeUB4(13),$.writeUInt8(0),$.writeUInt8(0),$.writeUInt8(0),$.writeUB4(J),$.writeUB4(M9.TNS_MAX_LONG_LENGTH),G===0)$.writeUInt8(0),$.writeUB4(0);else $.writeUInt8(1),$.writeUB4(G);if($.writeUInt8(0),$.writeUInt8(0),$.writeUInt8(0),$.writeUInt8(0),$.writeUInt8(0),Q.requiresDefine)$.writeUInt8(1),$.writeUB4(this.statement.queryVars.length);else $.writeUInt8(0),$.writeUB4(0);if($.writeUB4(0),$.writeUInt8(0),$.writeUInt8(1),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0),$.writeUB4(0),this.arrayDmlRowCounts)$.writeUInt8(1),$.writeUB4(this.numExecs),$.writeUInt8(1);else $.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0);if($.caps.ttcFieldVersion>=M9.TNS_CCAP_FIELD_VERSION_12_2){if($.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.caps.ttcFieldVersion>=M9.TNS_CCAP_FIELD_VERSION_12_2_EXT1)$.writeUInt8(0),$.writeUB4(0)}if(Q.cursorId===0||Q.isDdl)if(Q.sql)$.writeBytesWithLength(Q.sqlBytes),$.writeUB4(1);else $s.throwErr($s.ERR_INVALID_REF_CURSOR);else $.writeUB4(0);if(Q.isQuery)if(Q.cursorId===0)$.writeUB4(0);else $.writeUB4(J);else $.writeUB4(this.numExecs);if($.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUB4(Q.isQuery?1:0),$.writeUB4(0),$.writeUB4(X),$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),Q.requiresDefine)this.writeColumnMetadata($,this.statement.queryVars);else if(G>0)return this.processBindParams($,W)}writeReExecuteMessage($){let Y=this.statement,X=Y.bindInfoList,G=0,J=0,Q;if(X!==void 0){if(!Y.isQuery)this.outVariables=[],X.forEach((K)=>{if(K.bindDir!==M9.TNS_BIND_DIR_INPUT)this.outVariables.push(K.bindVar)});let W=[];X.forEach((K)=>{if(K.bindDir!==M9.TNS_BIND_DIR_OUTPUT&&!K.isReturnBind)W.push(K)}),X=W}if(this.functionCode===M9.TNS_FUNC_REEXECUTE_AND_FETCH)G|=M9.TNS_EXEC_OPTION_EXECUTE,Q=this.options.prefetchRows;else{if(this.options.autoCommit)J|=M9.TNS_EXEC_OPTION_COMMIT_REEXECUTE;Q=this.numExecs}if(this.options.suspendOnSuccess)this._handleSuspendSessionless();return this.writeFunctionHeader($),$.writeUB4(Y.cursorId),$.writeUB4(Q),$.writeUB4(G),$.writeUB4(J),X}_handleSuspendSessionless(){let $=this.connection._sessionlessData;if(this.connection._validateSessionlessState(),!$)$s.throwErr($s.ERR_SESSIONLESS_INACTIVE);if($.piggyback)$.piggyback.operation|=M9.TNS_TPC_TXN_POST_DETACH;else{let Y=new ic6(this.connection);Y.operation=M9.TNS_TPC_TXN_POST_DETACH,Y.flags=M9.TNS_TPC_TRANS_SESSIONLESS,Y.messageType=M9.TNS_MSG_TYPE_PIGGYBACK,$.piggyback=Y,$.pending=!0}}encode($){if(this.currentRow===0){let Y=this.statement;if(Y.cursorId!==0&&!Y.requiresFullExecute&&!this.parseOnly&&!Y.requiresDefine&&!Y.noPrefetch&&!Y.isDdl&&!this.batchErrors){if(Y.isQuery&&this.options.prefetchRows>0)this.functionCode=M9.TNS_FUNC_REEXECUTE_AND_FETCH;else this.functionCode=M9.TNS_FUNC_REEXECUTE;this.bindParams=this.writeReExecuteMessage($)}else this.functionCode=M9.TNS_FUNC_EXECUTE,this.bindParams=this.writeExecuteMessage($)}if(this.bindParams&&this.bindParams.length>0){let Y=$.nsi.ntAdapter;while(this.currentRow<this.numExecs)if($.writeUInt8(M9.TNS_MSG_TYPE_ROW_DATA),this.writeBindParamsRow($,this.bindParams,this.currentRow),this.currentRow++,this.currentRow<this.numExecs&&Y.shouldPauseWrite())return!0}this.currentRow=0,this.bindParams=void 0}}DD1.exports=LD1});var NV0=o((iR5,BD1)=>{var nc6=E9(),rc6=FV0(),ND1=O4();class AD1 extends rc6{constructor($,Y,X,G){super($,Y,X);this.resultSet=G,this.functionCode=nc6.TNS_FUNC_FETCH}encode($){if(this.writeFunctionHeader($),this.statement.cursorId===0)ND1.throwErr(ND1.ERR_CURSOR_HAS_BEEN_CLOSED);$.writeUB4(this.statement.cursorId),$.writeUB4(this.options.fetchArraySize)}}BD1.exports=AD1});var AV0=o((nR5,ED1)=>{var ac6=bz0(),sc6=DV0(),oc6=NV0();class OD1 extends ac6{async _fetchMoreRows($){let X=new(this.statement.requiresFullExecute?sc6:oc6)(this.connection,this.statement,$,this);await this.connection._protocol._processMessage(X),this.statement.requiresFullExecute=!1}_resultSetNew($,Y,X){this.connection=$,this.statement=Y,this._nestedCursorIndices=[],this.options=X,this.prefetchRowsProcessed=!1,this.statement.bufferRowIndex=0}close(){this.connection._returnStatement(this.statement)}_processRows($){let Y=[],X=this.statement.bufferRowIndex;for(let G=X;G<X+$;G++){let J=[];for(let Q=0;Q<this.statement.numQueryVars;Q++)J.push(this.statement.queryVars[Q].values[G]);Y.push(J)}if(this.statement.bufferRowIndex+=$,this.statement.bufferRowIndex===this.statement.bufferRowCount)this.statement.bufferRowCount=0,this.statement.bufferRowIndex=0;return Y}async getRows($,Y){if(Y.fetchArraySize=$||this.options.fetchArraySize,Y.prefetchRows=this.options.prefetchRows,this.statement.bufferRowCount-this.statement.bufferRowIndex>=Y.fetchArraySize)return this._processRows(Y.fetchArraySize);else{Y.fetchArraySize=Y.fetchArraySize-(this.statement.bufferRowCount-this.statement.bufferRowIndex);let G=this.statement.bufferRowCount;if(this.statement.moreRowsToFetch&&Y.fetchArraySize>0)await this._fetchMoreRows(Y);if(Y.fetchArraySize=$||this.options.fetchArraySize,G===this.statement.bufferRowCount){let J=this.statement.bufferRowCount-this.statement.bufferRowIndex;if(this.statement.bufferRowCount=0,J>0)return this._processRows(J);return[]}}let X=this.statement.bufferRowCount-this.statement.bufferRowIndex;return this._processRows(X)}}ED1.exports=OD1});var wD1=o((rR5,PD1)=>{var{Buffer:MD1}=A0("buffer"),u1=E9(),RD1=O4();class qD1{constructor($){this.protocolVersion=$.sAtts.version,this.ttcFieldVersion=u1.TNS_CCAP_FIELD_VERSION_MAX,this.supports12cLogon=!0,this.supportsOob=!1,this.nCharsetId=u1.TNS_CHARSET_UTF16,this.compileCaps=MD1.alloc(u1.TNS_CCAP_MAX),this.runtimeCaps=MD1.alloc(u1.TNS_RCAP_MAX),this.initCompileCaps($),this.initRuntimeCaps(),this.maxStringSize=0}adjustForServerCompileCaps($,Y){if($[u1.TNS_CCAP_FIELD_VERSION]<this.ttcFieldVersion)this.ttcFieldVersion=$[u1.TNS_CCAP_FIELD_VERSION],this.compileCaps[u1.TNS_CCAP_FIELD_VERSION]=this.ttcFieldVersion;if(this.ttcFieldVersion<u1.TNS_CCAP_FIELD_VERSION_23_4&&Y.endOfRequestSupport)this.compileCaps[u1.TNS_CCAP_TTC4]^=u1.TNS_CCAP_END_OF_REQUEST,Y.endOfRequestSupport=!1}adjustForServerRuntimeCaps($){if($[u1.TNS_RCAP_TTC]&u1.TNS_RCAP_TTC_32K)this.maxStringSize=32767;else this.maxStringSize=4000}initCompileCaps($){if(this.compileCaps[u1.TNS_CCAP_SQL_VERSION]=u1.TNS_CCAP_SQL_VERSION_MAX,this.compileCaps[u1.TNS_CCAP_LOGON_TYPES]=u1.TNS_CCAP_O5LOGON|u1.TNS_CCAP_O5LOGON_NP|u1.TNS_CCAP_O7LOGON|u1.TNS_CCAP_O8LOGON_LONG_IDENTIFIER|u1.TNS_CCAP_O9LOGON_LONG_PASSWORD,this.compileCaps[u1.TNS_CCAP_FIELD_VERSION]=this.ttcFieldVersion,this.compileCaps[u1.TNS_CCAP_SERVER_DEFINE_CONV]=1,this.compileCaps[u1.TNS_CCAP_DEQUEUE_WITH_SELECTOR]=1,this.compileCaps[u1.TNS_CCAP_TTC1]=u1.TNS_CCAP_FAST_BVEC|u1.TNS_CCAP_END_OF_CALL_STATUS|u1.TNS_CCAP_IND_RCD,this.compileCaps[u1.TNS_CCAP_OCI1]=u1.TNS_CCAP_FAST_SESSION_PROPAGATE|u1.TNS_CCAP_APP_CTX_PIGGYBACK,this.compileCaps[u1.TNS_CCAP_TDS_VERSION]=u1.TNS_CCAP_TDS_VERSION_MAX,this.compileCaps[u1.TNS_CCAP_RPC_VERSION]=u1.TNS_CCAP_RPC_VERSION_MAX,this.compileCaps[u1.TNS_CCAP_RPC_SIG]=u1.TNS_CCAP_RPC_SIG_VALUE,this.compileCaps[u1.TNS_CCAP_DBF_VERSION]=u1.TNS_CCAP_DBF_VERSION_MAX,this.compileCaps[u1.TNS_CCAP_LOB]=u1.TNS_CCAP_LOB_UB8_SIZE|u1.TNS_CCAP_LOB_ENCS|u1.TNS_CCAP_LOB_PREFETCH|u1.TNS_CCAP_LOB_TEMP_SIZE|u1.TNS_CCAP_LOB_12C|u1.TNS_CCAP_LOB_PREFETCH_DATA,this.compileCaps[u1.TNS_CCAP_UB2_DTY]=1,this.compileCaps[u1.TNS_CCAP_LOB2]=u1.TNS_CCAP_LOB2_QUASI|u1.TNS_CCAP_LOB2_2GB_PREFETCH,this.compileCaps[u1.TNS_CCAP_TTC3]=u1.TNS_CCAP_IMPLICIT_RESULTS|u1.TNS_CCAP_BIG_CHUNK_CLR|u1.TNS_CCAP_KEEP_OUT_ORDER|u1.TNS_CCAP_LTXID,this.compileCaps[u1.TNS_CCAP_OCI3]=u1.TNS_CCAP_OCI3_OCSSYNC,this.compileCaps[u1.TNS_CCAP_TTC2]=u1.TNS_CCAP_ZLNP,this.compileCaps[u1.TNS_CCAP_OCI2]=u1.TNS_CCAP_DRCP,this.compileCaps[u1.TNS_CCAP_CLIENT_FN]=u1.TNS_CCAP_CLIENT_FN_MAX,this.compileCaps[u1.TNS_CCAP_SESS_SIGNATURE_VERSION]=u1.TNS_CCAP_FIELD_VERSION_12_2,this.compileCaps[u1.TNS_CCAP_TTC4]=u1.TNS_CCAP_INBAND_NOTIFICATION,$.endOfRequestSupport)this.compileCaps[u1.TNS_CCAP_TTC4]|=u1.TNS_CCAP_END_OF_REQUEST;this.compileCaps[u1.TNS_CCAP_CTB_FEATURE_BACKPORT]=u1.TNS_CCAP_CTB_IMPLICIT_POOL|u1.TNS_CCAP_CTB_OAUTH_MSG_ON_ERR,this.compileCaps[u1.TNS_CCAP_TTC5]=u1.TNS_CCAP_VECTOR_SUPPORT|u1.TNS_CCAP_TTC5_SESSIONLESS_TXNS,this.compileCaps[u1.TNS_CCAP_VECTOR_FEATURES]=u1.TNS_CCAP_VECTOR_FEATURE_BINARY|u1.TNS_CCAP_VECTOR_FEATURE_SPARSE}initRuntimeCaps(){this.runtimeCaps[u1.TNS_RCAP_COMPAT]=u1.TNS_RCAP_COMPAT_81,this.runtimeCaps[u1.TNS_RCAP_TTC]=u1.TNS_RCAP_TTC_ZERO_COPY|u1.TNS_RCAP_TTC_32K}checkNCharsetId(){if(this.nCharsetId!==u1.TNS_CHARSET_UTF16)RD1.throwErr(RD1.ERR_NCHAR_CS_NOT_SUPPORTED,this.nCharsetId)}}PD1.exports=qD1});var xD1=o((aR5,vD1)=>{var{BaseBuffer:jD1}=sq(),{Buffer:G3}=A0("buffer"),vY=E9(),TD1=Mx(),_D1=JP(),ID1=ka(),Ys=O4(),zP=G3.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/","utf8");class BV0{constructor($){this.allocLen=$;let Y=$%vY.CHUNKED_BYTES_CHUNK_SIZE;if(Y>0)this.allocLen+=vY.CHUNKED_BYTES_CHUNK_SIZE-Y;this.buf=G3.allocUnsafe(this.allocLen),this.actualLen=0}}class CD1{constructor(){this.chunks=[]}endChunkedRead(){if(this.chunks.length>1){let Y=0;for(let J of this.chunks)Y+=J.actualLen;let X=0,G=new BV0(Y);for(let J of this.chunks)J.buf.copy(G.buf,X,0,J.actualLen),X+=J.actualLen;G.actualLen=Y,this.chunks=[G]}let $=this.chunks[0];return $.buf.subarray(0,$.actualLen)}getBuf($){let Y;if(this.chunks.length>0){if(Y=this.chunks[this.chunks.length-1],Y.allocLen-Y.actualLen<$)Y=void 0}if(!Y)Y=new BV0($),this.chunks.push(Y);let X=Y.buf.subarray(Y.actualLen,Y.actualLen+$);return Y.actualLen+=$,X}startChunkedRead(){if(this.chunks.length>0)this.chunks=this.chunks.splice(0,1),this.chunks[0].actualLen=0}}class SD1 extends jD1{constructor($,Y){super();this.nsi=$,this.caps=Y,this.chunkedBytesBuf=new CD1}_readBytesWithLength($){if($!==vY.TNS_LONG_LENGTH_INDICATOR)return this.readBytes($);this.chunkedBytesBuf.startChunkedRead();while(!0){let Y=this.readUB4();if(Y===0)break;this.readBytes(Y,!0)}return this.chunkedBytesBuf.endChunkedRead()}skipBytes($){if(this.pos===this.size)this.receivePacket();let Y=this.numBytesLeft();if($<=Y){this.pos+=$;return}$-=Y;while($>0){this.receivePacket();let X=Math.min($,this.size-this.pos);this.pos+=X,$-=X}}readBytes($,Y=!1){if(this.pos===this.size)this.receivePacket();let X=this.numBytesLeft();if($<=X){let Q;if(Y)Q=this.chunkedBytesBuf.getBuf($),this.buf.copy(Q,0,this.pos,this.pos+$);else Q=this.buf.subarray(this.pos,this.pos+$);return this.pos+=$,Q}let G;if(Y)G=this.chunkedBytesBuf.getBuf($);else G=G3.allocUnsafe($);let J=0;this.buf.copy(G,J,this.pos,this.pos+X),J+=X,$-=X;while($>0){this.receivePacket();let Q=Math.min($,this.size-this.pos);this.buf.copy(G,J,this.pos,this.pos+Q),this.pos+=Q,J+=Q,$-=Q}return G}receivePacket(){if(this.savedPacketPos===this.savedPackets.length){let $=this.nsi.syncRecvPacket();if(!$||this.nsi.isBreak)throw new _D1.OutOfPacketsError;this.savedPackets.push($)}this.startPacket(this.savedPackets[this.savedPacketPos++])}restorePoint(){this.savedPacketPos=0,this.startPacket(this.savedPackets[this.savedPacketPos++]),this.pos=this.savedPos}savePoint(){if(this.savedPackets)this.savedPackets=this.savedPackets.splice(this.savedPacketPos-1);else this.savedPackets=[this.packet];this.savedPacketPos=1,this.savedPos=this.pos}startPacket($){this.packet=$,this.buf=$.buf,this.pos=10,this.size=$.buf.length,this.packetNum=$.num}async waitForPackets($=!1){let Y=await this.nsi.recvPacket();if(!this.savedPackets)this.savedPackets=[Y],this.savedPacketPos=0;else this.savedPackets.push(Y);if($&&this.nsi.endOfRequestSupport)while(Y.type===vY.TNS_PACKET_TYPE_DATA){if(Y.buf.readUInt16BE(8)&vY.TNS_DATA_FLAGS_END_OF_REQUEST)break;if(Y.buf.length===11&&Y.buf[10]===vY.TNS_MSG_TYPE_END_OF_REQUEST)break;Y=await this.nsi.recvPacket(),this.savedPackets.push(Y)}this.startPacket(this.savedPackets[this.savedPacketPos++])}readOson(){if(this.readUB4()===0)return null;this.skipUB8(),this.skipUB4();let Y=new TD1.OsonDecoder(this.readBytesWithLength());return this.skipBytesChunked(),Y.decode()}readURowID(){let $=0,Y=1,X=this.readBytesWithLength();if(X===null)return null;X=this.readBytesWithLength();let G=X.length;if(X&&X[0]===1){let K=X.readUInt32BE(1),Z=X.readUInt16BE(5),H=X.readUInt32BE(7),z=X.readUInt16BE(11);return _D1.encodeRowID({rba:K,partitionID:Z,blockNum:H,slotNum:z})}let J=Math.floor(G/3)*4,Q=G%3;if(Q===1)J+=1;else if(Q===2)J+=3;let W=G3.allocUnsafe(J);G-=1,W[0]=42,$+=1;while(G>0){let K=X[Y]>>2;if(W[$]=zP[K],$+=1,K=(X[Y]&3)<<4,G==1){W[$]=zP[K];break}if(Y+=1,K|=(X[Y]&240)>>4,W[$]=zP[K],$+=1,K=(X[Y]&15)<<2,G==2){W[$]=zP[K];break}Y+=1,K|=(X[Y]&192)>>6,W[$]=zP[K],$+=1,K=X[Y]&63,W[$]=zP[K],$+=1,Y+=1,G-=3}return W.toString("utf-8")}readRowID(){let $=this.readUB4(),Y=this.readUB2();this.skipUB1();let X=this.readUB4(),G=this.readUB2();return{rba:$,partitionID:Y,blockNum:X,slotNum:G}}readVector(){if(this.readUB4()===0)return null;this.skipUB8(),this.skipUB4();let Y=new ID1.VectorDecoder(this.readBytesWithLength());return this.skipBytesChunked(),Y.decode()}skipBytesChunked(){let $=this.readUInt8();if($===0||$===vY.TNS_NULL_LENGTH_INDICATOR)return;if($!==vY.TNS_LONG_LENGTH_INDICATOR)this.skipBytes($);else while(!0){let Y=this.readUB4();if(Y===0)break;this.skipBytes(Y)}}readNullTerminatedBytes($=50){let Y=0,X=G3.allocUnsafe($);while(Y<$){if(X[Y]=this.readUInt8(),X[Y]===0)break;Y=Y+1}if(Y===$){let G=`Byte Arrray Exceeded MaxSize ${$}`;Ys.throwErr(Ys.ERR_INTERNAL,G)}return X.subarray(0,Y+1)}}class kD1 extends jD1{constructor($,Y,X){super($.sAtts.sdu);this.size=this.maxSize,this.isLargeSDU=$.sAtts.version>=vY.TNS_VERSION_MIN_LARGE_SDU,this.protocol=X,this.packetType=vY.TNS_PACKET_TYPE_DATA,this.caps=Y,this.nsi=$}_grow(){this._sendPacket()}_sendPacket($=!1){let Y=this.pos;if(this.pos=0,this.isLargeSDU)this.writeUInt32BE(Y);else this.writeUInt16BE(Y),this.writeUInt16BE(0);this.writeUInt8(this.packetType),this.writeUInt8(0),this.writeUInt16BE(0);let X=this.buf.subarray(0,Y);if(!$)X=G3.from(X),this.startPacket();else this.buf.writeUInt16BE(2048,8);if(!this.nsi.ntAdapter)Ys.throwErr(Ys.ERR_INVALID_CONNECTION);this.nsi.sendPacket(X)}startPacket($=0){if(this.pos=vY.PACKET_HEADER_SIZE,this.packetType===vY.TNS_PACKET_TYPE_DATA)this.writeUInt16BE($)}startRequest($,Y=0){this.packetType=$,this.startPacket(Y)}endRequest(){if(this.pos>vY.PACKET_HEADER_SIZE)this._sendPacket(!0)}writeKeyValue($,Y,X=0){let G=G3.byteLength($),J=G3.byteLength(Y);if(this.writeUB4(G),this.writeBytesWithLength(G3.from($)),this.writeUB4(J),J>0)this.writeBytesWithLength(G3.from(Y));this.writeUB4(X)}writeOson($,Y,X=!0){let J=new TD1.OsonEncoder().encode($,Y);this.writeQLocator(J.length,X),this.writeBytesWithLength(J)}writeSeqNum(){this.writeUInt8(this.protocol.sequenceId),this.protocol.sequenceId=(this.protocol.sequenceId+1)%256}writeVector($){let X=new ID1.VectorEncoder().encode($);this.writeQLocator(X.length),this.writeBytesWithLength(X)}writeQLocator($,Y=!0){if(this.writeUB4(40),Y)this.writeUInt8(40);this.writeUInt16BE(38),this.writeUInt16BE(vY.TNS_LOB_QLOCATOR_VERSION),this.writeUInt8(vY.TNS_LOB_LOC_FLAGS_VALUE_BASED|vY.TNS_LOB_LOC_FLAGS_BLOB|vY.TNS_LOB_LOC_FLAGS_ABSTRACT),this.writeUInt8(vY.TNS_LOB_LOC_FLAGS_INIT),this.writeUInt16BE(0),this.writeUInt16BE(1),this.writeUInt64BE($),this.writeUInt16BE(0),this.writeUInt16BE(0),this.writeUInt16BE(0),this.writeUInt64BE(0),this.writeUInt64BE(0)}}vD1.exports={ReadPacket:SD1,WritePacket:kD1}});var fD1=o((sR5,hD1)=>{var eA=E9(),tc6=wD1(),{WritePacket:ec6,ReadPacket:$l6}=xD1(),$B=O4(),Yl6=JP(),yD1=xa();class bD1{constructor($){this._breakInProgress=!1,this.txnInProgress=!1,this.connInProgress=!0,this.nsi=$.nscon,this.sequenceId=1,this.caps=new tc6($.nscon),this.writeBuf=new ec6($.nscon,this.caps,this),this.readBuf=new $l6($.nscon,this.caps),this.callTimeout=0}async _decodeMessage($){$.preProcess(),await this.readBuf.waitForPackets(!0);while(!0){if(this.nsi.isBreak)await this.resetMessage(),delete this.readBuf.savedPackets,await this.readBuf.waitForPackets();try{$.decode(this.readBuf);break}catch(Y){if(Y instanceof Yl6.OutOfPacketsError){if(!this.nsi.isBreak)await this.readBuf.waitForPackets(),this.readBuf.restorePoint();continue}throw Y}}await $.postProcess()}async _encodeMessage($){let Y=this.nsi.ntAdapter;this.writeBuf.startRequest(eA.TNS_PACKET_TYPE_DATA);while($.encode(this.writeBuf))await Y.pauseWrite();this.writeBuf.endRequest()}async _recoverFromError($,Y){try{this.breakMessage(),this._breakInProgress=!1,await this.resetMessage(),await this.readBuf.waitForPackets(),Y.decode(this.readBuf)}catch(X){this.nsi.disconnect();let G=$B.getErr($B.ERR_CONNECTION_CLOSED);throw $.message=G.message+`
Error recovery failed: `+X.message+`
Original error: `+$.message,$}}async _processMessage($){let Y,X=!1,G,J,Q=yD1.isEnabled();if(Q)J={additionalConfig:{}},G=yD1.getTraceInstance();try{if(this.callTimeout>0)Y=setTimeout(()=>{X=!0,this.breakMessage()},this.callTimeout);if(Q)J.operation=`oracledb.${$.constructor.name}`,G.onBeginRoundTrip(J);if(await this._encodeMessage($),$.messageType!==eA.TNS_MSG_TYPE_ONEWAY_FN)await this._decodeMessage($)}catch(W){if(!this.connInProgress&&W.code!==$B.ERR_CONNECTION_CLOSED_CODE)await this._recoverFromError(W,$);if(Q)J.error=W;throw W}finally{if(clearTimeout(Y),Q){if(J.callLevelConfig=$.connection._callLevelTraceData,J.connectLevelConfig=$.connection._getConnectTraceConfig(),$.callStatus&eA.TNS_EOCS_FLAGS_SESS_RELEASE)J.additionalConfig.implicitRelease=!0;G.onEndRoundTrip(J)}}if($.flushOutBinds)await this.flushOutBindMessage($);if(this.txnInProgress=Boolean($.callStatus&eA.TNS_EOCS_FLAGS_TXN_IN_PROGRESS),$.callStatus&eA.TNS_EOCS_FLAGS_SESS_RELEASE)$.connection.statementCache.clearCursors();if($.errorOccurred){if(X)$B.throwErr($B.ERR_CALL_TIMEOUT_EXCEEDED,this.callTimeout);if($.retry)return $.errorOccurred=!1,await this._processMessage($);let W=Error($.errorInfo.message);if(W.offset=$.errorInfo.pos,W.errorNum=$.errorInfo.num,W.isRecoverable=$.errorInfo.isRecoverable,W=$B.transformErr(W),W.code===$B.ERR_CONNECTION_CLOSED_CODE)this.nsi.disconnect();throw W}}async flushOutBindMessage($){this.writeBuf.startRequest(eA.TNS_PACKET_TYPE_DATA),this.writeBuf.writeUInt8(eA.TNS_MSG_TYPE_FLUSH_OUT_BINDS),this.writeBuf.endRequest(),await this._decodeMessage($)}breakMessage(){this._breakInProgress=!0,this.nsi.sendBreak()}async resetMessage(){await this.nsi.reset()}}hD1.exports=bD1});var gF=o((oR5,gD1)=>{gD1.exports={NSPTCN:1,NSPTAC:2,NSPTAK:3,NSPTRF:4,NSPTRD:5,NSPTDA:6,NSPTNL:7,NSPTAB:9,NSPTRS:11,NSPTMK:12,NSPTAT:13,NSPTCNL:14,NSPTDD:15,NSPTHI:19,NSPHDLEN:0,NSPHDPSM:2,NSPHDTYP:4,NSPHDFLGS:5,NSPHDHSM:6,NSPSIZHD:8,NSPFSID:1,NSPFRDS:2,NSPFRDR:4,NSPFLSD:32,NO_HEADER_FLAGS:0,NSPFSRN:8,NSPCNVSN:8,NSPCNLOV:10,NSPCNOPT:12,NSPCNSDU:14,NSPCNTDU:16,NSPCNNTC:18,NSPCNTNA:20,NSPCNONE:22,NSPCNLEN:24,NSPCNOFF:26,NSPCNMXC:28,NSPCNFL0:32,NSPCNFL1:33,NSPCNTMO:50,NSPCNTCK:52,NSPCNADL:54,NSPCNAOF:56,NSPCNLSD:58,NSPCNLTD:62,NSPCNCFL:66,NSPCNCFL2:70,NSPCNDAT:74,NSPMXCDATA:230,NSINAWANTED:1,NSINAINTCHG:2,NSINADISABLEDFORCONNECTION:4,NSINANOSERVICES:8,NSINAREQUIRED:16,NSINAAUTHWANTED:32,NSISUPSECRENEG:128,NSGDONTCARE:1,NSGHDX:2,NSGFDX:4,NSGHDRCHKSUM:8,NSGPAKCHKSUM:16,NSGBROKEN:32,NSGUSEVIO:64,NSGOSAUTHOK:128,NSGSENDATTN:512,NSGRECVATTN:1024,NSGNOATTNPR:2048,NSGRAW:4096,TNS_VERSION_DESIRED:319,TNS_VERSION_MINIMUM:300,TNS_VERSION_MIN_DATA_FLAGS:318,TNS_VERSION_MIN_END_OF_RESPONSE:319,TNS_UUID_OFFSET:45,NSPACVSN:8,NSPACOPT:10,NSPACSDU:12,NSPACTDU:14,NSPACONE:16,NSPACLEN:18,NSPACOFF:20,NSPACFL0:22,NSPACFL1:23,NSPACTMO:24,NSPACTCK:26,NSPACADL:28,NSPACAOF:30,NSPACLSD:32,NSPACLTD:36,NSPACCFL:40,NSPACFL2:41,NSPACV310DAT:32,NSPACV315DAT:41,NSPRFURS:8,NSPRFSRS:9,NSPRFLEN:10,NSPRFDAT:12,NSPACCFON:128,NSPACCFAT:64,NSPACCFNT:2,NSPACOOB:1,NSGPCHKSCMD:16777216,TNS_ACCEPT_FLAG_HAS_END_OF_REQUEST:33554432,TNS_ACCEPT_FLAG_FAST_AUTH:268435456,NSPRDLEN:8,NSPRDDAT:10,NSPDAFLG:8,NSPDADAT:10,NSPDAFEOF:64,NSPDAFCMP:1024,NSPMKTYP:8,NSPMKODT:9,NSPMKDAT:10,NSPMKTD0:0,NSPMKTD1:1,NSPMKTAT:2,NIQBMARK:1,NIQRMARK:2,NIQIMARK:3,NSPCTLCMD:8,NSPCTLDAT:10,NSPCTL_SERR:8,NSPCTL_CLRATTN:9,NSPDFSDULN:8192,NSPABSSDULN:2097152,NSPMXSDULN:65535,NSPMNSDULN:512,NSPDFTDULN:2097152,NSPMXTDULN:2097152,NSPMNTDULN:255,NSFIMM:64,DISABLE_OOB_STR:"DISABLE_OOB",EXPIRE_TIME:"EXPIRE_TIME",PEM_WALLET_FILE_NAME:"ewallet.pem",DEFAULT_TRANSPORT_CONNECT_TIMEOUT:20000,DEFAULT_RETRY_DELAY:1000,NT_MOREDATA:1,NS_MOREDATA:2,SVCNAME:3,SERVERTYPE:4,REMOTEADDR:5,HEALTHCHECK:6,CONNCLASS:7,PURITY:8,SID:9,NETWORK_COMPRESSION_ZLIB:2,NSNOBLOCK:1}});var uD1=o((tR5,mD1)=>{var Xs=A0("buffer").Buffer,T1=gF(),mF=O4();function Xl6($,Y,X=0){this.connectData=$,this.connectDataLen=$.length,this.overflow=!1;let G;if(this.connectDataLen<=230)G=74+this.connectDataLen;else G=74,this.overflow=!0;this.buf=Xs.allocUnsafe(G).fill(0),this.buf.writeUInt16BE(G,T1.NSPHDLEN),this.buf.writeUInt8(X,T1.NSPHDFLGS),this.buf.writeUInt8(T1.NSPTCN,T1.NSPHDTYP),this.buf.writeUInt16BE(T1.TNS_VERSION_DESIRED,T1.NSPCNVSN),this.buf.writeUInt16BE(T1.TNS_VERSION_MINIMUM,T1.NSPCNLOV);let J=T1.NSGDONTCARE;if(this.buf.writeUInt16BE(J,T1.NSPCNOPT),Y.sdu>T1.NSPMXSDULN)this.buf.writeUInt16BE(T1.NSPMXSDULN,T1.NSPCNSDU);else this.buf.writeUInt16BE(Y.sdu,T1.NSPCNSDU);if(Y.tdu>T1.NSPMXSDULN)this.buf.writeUInt16BE(T1.NSPMXSDULN,T1.NSPCNTDU);else this.buf.writeUInt16BE(Y.tdu,T1.NSPCNTDU);this.buf.writeUInt16BE(Y.ntCha,T1.NSPCNNTC),this.buf.writeUInt16BE(1,T1.NSPCNONE),this.buf.writeUInt16BE(this.connectDataLen,T1.NSPCNLEN),this.buf.writeUInt16BE(T1.NSPCNDAT,T1.NSPCNOFF),this.buf.writeUInt8(Y.NAFlags,T1.NSPCNFL0),this.buf.writeUInt8(Y.NAFlags,T1.NSPCNFL1),this.buf.writeUInt16BE(0,T1.NSPCNTMO),this.buf.writeUInt16BE(0,T1.NSPCNTCK),this.buf.writeUInt16BE(0,T1.NSPCNADL),this.buf.writeUInt16BE(0,T1.NSPCNAOF),this.buf.writeUInt32BE(Y.sdu,T1.NSPCNLSD),this.buf.writeUInt32BE(Y.tdu,T1.NSPCNLTD);let Q=0;if(Y.networkCompression){Q=T1.NSPACCFON<<8;let W=10;if(Y.networkCompressionLevels.includes("high"))Q|=T1.NETWORK_COMPRESSION_ZLIB<<W}if(this.buf.writeUInt16BE(Q,T1.NSPCNCFL),this.buf.writeUInt32BE(0,T1.NSPCNCFL2),!this.overflow&&this.connectDataLen)this.buf.write($.toString("ascii"),T1.NSPCNDAT,this.connectDataLen,"ascii")}function Gl6($){this.dataPtr=0,this.dataLen=0,this.offset=0,this.len=0,this.bufLen=0,this.createPacket=function(Y){this.dataPtr=T1.NSPDADAT,this.dataLen=T1.NSPDADAT,this.buf=Xs.allocUnsafe(Y).fill(0),this.buf.writeUInt8(0,T1.NSPHDFLGS),this.buf.writeUInt8(T1.NSPTDA,T1.NSPHDTYP),this.bufLen=Y},this.fillBuf=function(Y,X,G,J=0){let Q;if(!this.buf)this.createPacket(G+T1.NSPDADAT);if(G>this.bufLen-this.dataLen)Q=this.bufLen-this.dataLen;else Q=G;if(Q)Y.copy(this.buf,this.dataLen,X,X+Q);return this.dataLen+=Q,this.prepare2Send(J),Q},this.prepare2Send=function(Y=0){if($)this.buf.writeUInt32BE(this.dataLen,T1.NSPHDLEN);else this.buf.writeUInt16BE(this.dataLen,T1.NSPHDLEN);this.buf.writeUInt16BE(Y,T1.NSPDAFLG),this.dataBuf=this.buf.subarray(0,this.dataLen)},this.fromPacket=function(Y){this.buf=Y.buf,this.dataLen=Y.buf.length,this.dataPtr=T1.NSPDADAT,this.offset=this.dataPtr,this.len=this.dataLen,Y.dataOffset=this.dataPtr}}function Jl6($,Y){if(this.buf=$.buf,this.len=$.buf.length,Y.version=$.buf.readUInt16BE(T1.NSPACVSN),Y.options=$.buf.readUInt16BE(T1.NSPACOPT),Y.sdu=$.buf.readUInt16BE(T1.NSPACSDU),Y.tdu=$.buf.readUInt16BE(T1.NSPACTDU),Y.version>=315)if(Y.sdu=$.buf.readUInt32BE(T1.NSPACLSD),Y.tdu=$.buf.readUInt32BE(T1.NSPACLTD),Y.largeSDU=!0,this.cflag=$.buf.readUInt8(T1.NSPACCFL),(this.cflag&T1.NSPACCFON)!=0)Y.negotiatedNetworkCompressionScheme=(this.cflag&60)>>2,Y.networkCompressionEnabled=!0,Y.firstRecvCompressedPacket=!0,Y.firstSendCompressedPacket=!0;else Y.networkCompressionEnabled=!1;if(this.flag0=$.buf.readUInt8(T1.NSPACFL0),this.flag1=$.buf.readUInt8(T1.NSPACFL1),Y.noNA=(this.flag1&T1.NSINANOSERVICES)==T1.NSINANOSERVICES,!Y.noNA)Y.noNA=(this.flag0&T1.NSINADISABLEDFORCONNECTION)==T1.NSINADISABLEDFORCONNECTION;if(Y.version>=T1.TNS_VERSION_MIN_DATA_FLAGS)$.flags=$.buf.readUInt32BE(T1.NSPACFL2)}function Ql6($){if(this.buf=$.buf,this.len=$.buf.length,this.userReason=$.buf.readUInt8(T1.NSPRFURS),this.systemReason=$.buf.readUInt8(T1.NSPRFURS),this.dataLen=$.buf.readUInt16BE(T1.NSPRFLEN),this.dataOff=T1.NSPRFDAT,this.len>this.dataOff)this.dataBuf=this.buf.toString("ascii",this.dataOff,this.len),this.overflow=!1;else this.overflow=!0}function Wl6($){if(this.buf=$.buf,this.len=$.buf.length,this.flags=$.flags,this.dataLen=$.buf.readUInt16BE(T1.NSPRDLEN),this.dataOff=T1.NSPRDDAT,this.len>this.dataOff)this.dataBuf=this.buf.subarray(this.dataOff,this.len),this.overflow=!1;else this.overflow=!0}function Kl6($){if(this.len=T1.NSPMKDAT+1,this.buf=Xs.allocUnsafe(T1.NSPMKDAT+1).fill(0),$)this.buf.writeUInt32BE(this.len,T1.NSPHDLEN);else this.buf.writeUInt16BE(this.len,T1.NSPHDLEN);this.buf.writeUInt8(0,T1.NSPHDFLGS),this.buf.writeUInt8(T1.NSPTMK,T1.NSPHDTYP),this.prepare=function(Y,X){this.buf.writeUInt8(Y,T1.NSPMKTYP),this.buf.writeUInt8(X,T1.NSPMKDAT)},this.fromPacket=function(Y,X){switch(this.type=Y.buf.readUInt8(T1.NSPMKTYP),this.type){case T1.NSPMKTD0:X.isBreak=!0;break;case T1.NSPMKTD1:if(this.data=Y.buf.readUInt8(T1.NSPMKDAT),X.isBreak=!0,this.data==T1.NIQRMARK)X.isReset=!0,X.isBreak=!0;break;default:mF.throwErr(mF.ERR_INVALID_PACKET)}}}function Zl6(){this.clear=function(){this.errno=0,this.notif=null,this.notifLen=0,this.cmd=0},this.fromPacket=function($){let J,Q,W;switch(this.cmd=$.buf.readUInt16BE(T1.NSPCTLCMD),this.cmd){case T1.NSPCTL_SERR:if(J=$.buf.readUInt32BE(T1.NSPCTLDAT),Q=$.buf.readUInt32BE(T1.NSPCTLDAT+4),W=$.buf.readUInt32BE(T1.NSPCTLDAT+8),Q==12572)this.errno=Q;else if(Q==12573)this.errno=Q,this.notifLen=W,this.notif=Xs.allocUnsafe(W+1).fill(0),this.buf.copy(this.notif,0,T1.NSPCTLDAT+12,T1.NSPCTLDAT+12+W);else if(this.errno=Q,J==22)mF.throwErr(mF.ERR_CONNECTION_INBAND,"ORA-"+Q);else mF.throwErr(mF.ERR_CONNECTION_INBAND,"TNS-"+Q);break;default:mF.throwErr(mF.ERR_INVALID_PACKET)}}}mD1.exports={ConnectPacket:Xl6,DataPacket:Gl6,AcceptPacket:Jl6,RefusePacket:Ql6,RedirectPacket:Wl6,MarkerPacket:Kl6,ControlPacket:Zl6}});var VP=o((eR5,rD1)=>{var K5=O4();class wV0{constructor($){this.name=$,this.listType=3,this.rhsType=0}set setAtom($){if(this._containsComment($))K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);this.rhsType=1,this.list=null,this.atom=$}_containsComment($){for(let Y=0;Y<$.length;Y++)if($.charAt(Y)=="#")if(Y!=0)if($.charAt(Y-1)=="\\")continue;else return!0;else return!0;return!1}getListSize(){if(this.list==null)return 0;else return this.list.length}getListElement($){if(this.list==null)return null;else return this.list[$]}addListElement($){if(this.list==null)this.rhsType=2,this.list=[],this.atom=null;this.list.push($),$.parent=this}removeListElement($){if(this.list!=null){if(this.list.splice($,1),this.getListSize==0)this.list=null,this.rhsType=0}}_space($){var Y="";for(let X=0;X<$;X++)Y+=" ";return Y}valueToString(){let $="";if(this.rhsType==1)$=$+this.atom;else if(this.rhsType==2){if(this.listType==3)for(let Y=0;Y<this.getListSize();Y++)$=$+this.getListElement(Y).toString();else if(this.listType==4)for(let Y=0;Y<this.getListSize();Y++){let X=this.getListElement(Y);if($=$+X.name,Y!=this.getListSize()-1)$=$+", "}}return $}toString(){let $="("+this.name+"=";if(this.rhsType==1)$=$+this.atom;else if(this.rhsType==2){if(this.listType==3)for(let Y=0;Y<this.getListSize();Y++)$=$+this.getListElement(Y).toString();else if(this.listType==4){$=$+" (";for(let Y=0;Y<this.getListSize();Y++){let X=this.getListElement(Y);if($=$+X.name,Y!=this.getListSize()-1)$=$+", "}$=$+")"}}return $=$+")",$}}var Ul6=0,Gs=1,qV0=2,uF=3,dD1=4,Js=8,Hl6=9,OV0="(",EV0=")",MV0=",",RV0="=",zl6="\\",pD1='"',Vl6="'",Fl6="%",Ll6=" ",Dl6="\t",Nl6=`
`,Al6="\r";class cD1{constructor(){this.tkType=null,this.tkValue=null,this.numTokens=0,this.tkPos=0}_isWhiteSpace($){if($==Ll6||$==Dl6||$==Nl6||$==Al6)return!0;return!1}_trimWhiteSpace($){let Y=$.length,X=0,G=Y;while(X<Y&&this._isWhiteSpace($.charAt(X)))X++;while(X<G&&this._isWhiteSpace($.charAt(G-1)))G--;return $.substring(X,G)}parseTokens($){this.numTokens=0,this.tkPos=0,this.tkType=[],this.tkValue=[];let Y=$.length,X=!1,G=[];G=Array.from($);let J=0;while(J<Y){while(J<Y&&this._isWhiteSpace(G[J]))J++;if(J<Y)switch(G[J]){case OV0:X=!1,this._addToken(Gs,OV0),J++;break;case RV0:X=!0,this._addToken(dD1,RV0),J++;break;case EV0:X=!1,this._addToken(qV0,EV0),J++;break;case MV0:X=!1,this._addToken(uF,MV0),J++;break;default:{let Q=J,W=-1,K=!1,Z=pD1;if(G[J]==Vl6||G[J]==pD1)K=!0,Z=G[J],J++,Q=J;while(J<Y){if(G[J]==zl6){J+=2;continue}if(K){if(G[J]==Z){J++,W=J-1;break}}else if(G[J]==OV0||G[J]==EV0||G[J]==MV0&&!X||G[J]==RV0&&!X){W=J;break}J++}if(W==-1)W=J;this._addToken(Js,$.substring(Q,W).trim());break}}}return this._addToken(Hl6,Fl6),!0}getToken(){if(this.tkType==null)K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);if(this.tkPos<this.numTokens)return Number(this.tkType[this.tkPos]);else K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX)}popToken(){let $=Ul6;if(this.tkType==null)K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);if(this.tkPos<this.numTokens)$=Number(this.tkType[this.tkPos++]);else K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);return $}getLiteral(){let $=null;if(this.tkValue==null)K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);if(this.tkPos<this.numTokens)$=String(this.tkValue[this.tkPos]);else K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);return $}popLiteral(){let $=null;if(this.tkValue==null)K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);if(this.tkPos<this.numTokens)$=String(this.tkValue[this.tkPos++]);else K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);return $}eatToken(){if(this.tkPos<this.numTokens)this.tkPos++}toString(){if(this.tkType==null)return"*NO TOKENS*";let $="Tokens";for(let Y=0;Y<this.numTokens;Y++)$=$+" : "+this.tkValue[Y];return $}_addToken($,Y){this.tkType.push(Number($)),this.tkValue.push(String(Y)),this.numTokens++}}function Bl6($){let Y=new cD1;return Y.parseTokens($),Ol6(Y)}function Ol6($){let Y=$.getToken();if($.eatToken(),Y!=Gs)K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);let X=_V0($),G=new wV0(X);if((Y=$.getToken())==uF){while(Y==Js||Y==uF)X+=$.popLiteral(),Y=$.getToken();return G.name=X,PV0(G,$)}return PV0(G,$)}function El6($){let Y=$.getToken();if($.eatToken(),!(Y==Gs||Y==uF))K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);let X=_V0($),G=new wV0(X);return PV0(G,$)}function PV0($,Y){let X=Y.getToken();switch(X){case dD1:if(Y.eatToken(),X=Y.getToken(),X==Js){let G=_V0(Y);$.setAtom=G}else lD1(Y,$);break;case uF:case qV0:$.setAtom=$.name;break;default:K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX)}if(X=Y.getToken(),X==qV0)Y.eatToken();else if(X!=uF)K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);return $}function _V0($){if($.getToken()!=Js)K5.throwErr(K5.ERR_INVALID_CONNECT_STRING_SYNTAX);return $.popLiteral()}function lD1($,Y){let X=$.getToken();if(!(X==Gs||X==uF))return;let G=El6($);if(Y.addListElement(G),X==uF||G.name==G.atom){if(Y.getListType!=4)Y.setListType=4}lD1($,Y)}function iD1($,Y){if(!$)return null;if(Y.toUpperCase()==$.name.toUpperCase())return $;if($.getRHSType==1)return null;for(let X=0;X<$.getListSize();X++){let G=iD1($.getListElement(X),Y);if(G!==null)return G}return null}function nD1($,Y){if(!$)return null;if($.getRHSType==1)return null;for(let X=0;X<$.getListSize();X++){let G=$.getListElement(X);if(Y.toUpperCase()==G.name.toUpperCase())return G}return null}function Ml6($,Y){if(!$)return null;if(Y[0].toUpperCase()!=$.name.toUpperCase())return null;let X=$,G=Y.length;for(let J=1;J<G;J++)if(X=nD1(X,Y[J]),!X)return null;if(X.atom==null)if(X.list==null)return null;else return X.list.toString();else return X.atom.toString()}rD1.exports={findNVPairRecurse:iD1,createNVPair:Bl6,findNVPair:nD1,findValue:Ml6}});var eD1=o(($q5,tD1)=>{var{Buffer:Rl6}=A0("buffer"),ql6=A0("net"),aD1=A0("process"),Ix=A0("tls"),Pl6=A0("http"),wl6=A0("timers"),Qs=gF(),h5=O4(),{findValue:Ws,findNVPair:_l6}=VP(),jl6=["SERVICE_NAME","INSTANCE_NAME","SERVER","COLOCATION_TAG","CONNECTION_ID","POOL_BOUNDARY","POOL_PURITY","POOL_CONNECTION_CLASS","POOL_NAME","SERVICE_TAG","CID"],jV0=["SERVICE_NAME","INSTANCE_NAME","SERVER","COLOCATION_TAG"],sD1=["S","I","T","C"],Tl6=1;class oD1{constructor($){this.atts=$,this.cha=4878,this.connected=!1,this.err=!1,this.needsDrain=!1,this.numPacketsSinceLastWait=0,this.secure=!1,this.largeSDU=!1,this.streamNum=Tl6++,this.packetNum=1,this.doDNMatch=!0}dnMatch($,Y){if(this.atts.sslServerDNMatch&&this.doDNMatch){let X=(G)=>G.split(",").map((J)=>J.split("=").map((Q)=>Q.trim())).reduce((J,Q)=>{return J[Q[0]]=Q[1],J},{});if(this.atts.sslServerCertDN){let G=X(this.atts.sslServerCertDN);if(Object.keys(G).length==Object.keys(Y.subject).length){for(let J in G)if(G[J]!=Y.subject[J])return h5.getErr(h5.ERR_TLS_DNMATCH_FAILURE)}else return h5.getErr(h5.ERR_TLS_DNMATCH_FAILURE)}else if(Ix.checkServerIdentity(this.hostName,Y)&&(!this.originHost||Ix.checkServerIdentity(this.originHost,Y)))if(this.atts.sslAllowWeakDNMatch){if(Ws(this.atts.cDataNVPair,["DESCRIPTION","CONNECT_DATA","SERVICE_NAME"])!=Y.subject.CN)return h5.getErr(h5.ERR_TLS_DNMATCH_FAILURE)}else{let G=this.hostName+" "+(this.originHost?"or "+this.originHost:"");return h5.getErr(h5.ERR_TLS_HOSTMATCH_FAILURE,G)}}}async tlsConnect($,Y){this.stream.removeAllListeners();let X,G=null;if(this.atts.useSNI)G=this.generateSNI();let J={host:this.host,socket:Y,servername:G,rejectUnauthorized:!0,secureContext:$,enableTrace:!1,checkServerIdentity:this.dnMatch.bind(this)};if(await new Promise((Q)=>{this.stream=Ix.connect(J,()=>{if(!this.stream.authorized)X="server certificate unauthorized";Q()}).on("error",(W)=>{X=W.message,Q()})}),X)h5.throwErr(h5.ERR_TLS_AUTH_FAILURE,this.host,this.port,this.atts.connectionId,X);this.connStream=Y}async ntConnect($){if(!$.port)$.port=1521;let Y,X,G,J=$.httpsProxy||this.atts.httpsProxy,Q=$.httpsProxyPort||this.atts.httpsProxyPort;if(await new Promise((W)=>{if(J){if(!Q)Q=80;G=Pl6.request({host:J,port:Q,method:"CONNECT",path:$.host+":"+$.port}),G.once("connect",(K,Z)=>{if(K.statusCode==200)this.connected=!0,this.stream=Z;else X=K.statusCode;W()}),G.once("error",(K)=>{X=K.message,W()}),G.end()}else this.stream=ql6.connect($.port,$.host,()=>{this.connected=!0,W()}),this.stream.once("error",(K)=>{Y=K.message,W()})}),G)G.removeAllListeners();if(!this.connected)if(X)h5.throwErr(h5.ERR_PROXY_CONNECTION_FAILURE,J,Q,this.atts.connectionId,X);else h5.throwErr(h5.ERR_CONNECTION_INCOMPLETE,this.host,this.port,this.atts.connectionId,Y)}async connect($){this.originHost=$.originHost,this.host=$.host,this.hostName=$.hostname,this.port=$.port;try{if(await this.ntConnect($),this.atts.expireTime||this.atts.enableDCD)if(this.atts.expireTime)this.stream.setKeepAlive(!0,this.atts.expireTime);else this.stream.setKeepAlive(!0);if(this.atts.tcpNoDelay)this.stream.setNoDelay(!0);if($.protocol.toUpperCase()=="TCPS"){let Y;if(this.secure=!0,this.atts.sslAllowWeakDNMatch)this.doDNMatch=!1;try{Y=Ix.createSecureContext({cert:this.atts.wallet,key:this.atts.wallet,passphrase:this.atts.walletPassword,ca:this.atts.wallet})}catch(X){h5.throwErr(h5.ERR_TLS_INIT_FAILURE,X.message)}await this.tlsConnect(Y,this.stream)}}finally{if(this.stream)this.setupEventHandlers()}}disconnect($){if(this.connected&&!this.err)if($==Qs.NSFIMM)this.stream.destroy();else this.stream.end();this.stream=null,this.connected=!1,this.drainWaiter=null,this.readWaiter=null}getPacketDump($){let Y=[];for(let X=0;X<$.length;X+=8){let G=X.toString().padStart(4,"0"),J=$.slice(X,X+8),Q=[],W=[];for(let H of J)if(Q.push(H.toString(16).toUpperCase().padStart(2,"0")),H>32&&H<127)W.push(String.fromCharCode(H));else W.push(".");while(Q.length<8)Q.push("  "),W.push(" ");let K=Q.join(" "),Z=W.join("");Y.push(`${G} : ${K} |${Z}|`)}return Y.join(`
`)}printPacket($,Y){let X=new Date,G=`${X.getFullYear()}-${X.getMonth().toString().padStart(2,"0")}-${X.getDay().toString().padStart(2,"0")} ${X.getHours().toString().padStart(2,"0")}:${X.getMinutes().toString().padStart(2,"0")}:${X.getSeconds().toString().padStart(2,"0")}.${X.getMilliseconds().toString().padStart(3,"0")}`,J=this.getPacketDump(Y);console.log(`${G} ${$}:
${J}
`)}checkErr(){if(!this.connected||this.err){let $;if(this.savedErr)$=h5.getErr(h5.ERR_CONNECTION_LOSTCONTACT,this.host,this.port,this.atts.connectionId,this.savedErr.message);else $=h5.getErr(h5.ERR_CONNECTION_EOF,this.host,this.port,this.atts.connectionId);let Y=h5.getErr(h5.ERR_CONNECTION_CLOSED);throw Y.message=Y.message+`
`+$.message,Y}}send($){if(this.checkErr(),aD1.env.NODE_ORACLEDB_DEBUG_PACKETS)this.printPacket(`Sending packet ${this.packetNum} on stream ${this.streamNum}`,$);if(!this.stream.write($,(X)=>{if(X)this.savedErr=X,this.err=!0,this._notifyWaiters()}))this.needsDrain=!0;this.numPacketsSinceLastWait++,this.packetNum++}shouldPauseWrite(){return this.needsDrain||this.numPacketsSinceLastWait>=100}async pauseWrite(){if(this.checkErr(),this.needsDrain)await new Promise(($)=>{this.drainWaiter=$}),this.checkErr();else await new Promise(($)=>wl6.setImmediate($));this.numPacketsSinceLastWait=0}startRead(){let $;this.packets=[],this.stream.on("data",(Y)=>{if($)$=Rl6.concat([$,Y]);else $=Y;while($.length>=8){let X;if(this.largeSDU)X=$.readUInt32BE();else X=$.readUInt16BE();if(X>$.length)break;let G={buf:$.subarray(0,X),type:$[4],flags:$[5],num:this.packetNum++};if(this.packets.push(G),this.readWaiter)this.readWaiter(),this.readWaiter=null;if(aD1.env.NODE_ORACLEDB_DEBUG_PACKETS)this.printPacket(`Receiving packet ${G.num} on stream ${this.streamNum}`,G.buf);if(X===$.length){$=null;break}else $=$.subarray(X)}})}syncReceive(){return this.packets.shift()}async receive(){if(this.packets.length===0)this.checkErr(),await new Promise(($)=>{this.readWaiter=$,this.numPacketsSinceLastWait=0}),this.checkErr();return this.packets.shift()}async renegTLS(){let $=!1;this.checkErr();try{this.doDNMatch=!0;let Y=Ix.createSecureContext({cert:this.atts.wallet,key:this.atts.wallet,passphrase:this.atts.walletPassword,ca:this.atts.wallet});$=!0,await this.tlsConnect(Y,this.connStream)}catch(Y){if(!$)h5.throwErr(h5.ERR_TLS_INIT_FAILURE,Y.message);else throw Y}finally{this.setupEventHandlers()}}setupEventHandlers(){this.stream.removeAllListeners(),this.stream.on("error",($)=>{this.savedErr=$,this.err=!0,this._notifyWaiters()}),this.stream.on("end",()=>{this.err=!0,this._notifyWaiters()}),this.stream.on("close",()=>{this.connected=!1,this._notifyWaiters()}),this.stream.on("drain",()=>{if(this.needsDrain=!1,this.drainWaiter)this.drainWaiter(),this.drainWaiter=null})}getOption($){switch(this.checkErr(),$){case Qs.NT_MOREDATA:return this.packets.length>0;case Qs.REMOTEADDR:{let Y=this.secure?this.connStream:this.stream;return Y.remoteAddress+":"+Y.remotePort}default:h5.throwErr(h5.ERR_INTERNAL,"getOption not supported for opcode "+$)}}_notifyWaiters(){if(this.drainWaiter)this.drainWaiter(),this.drainWaiter=null;if(this.readWaiter)this.readWaiter(),this.readWaiter=null}generateSNI(){if(Ws(this.atts.cDataNVPair,["DESCRIPTION","SOURCE_ROUTE"])=="yes"||Ws(this.atts.cDataNVPair,["DESCRIPTION","ADDRESS_LIST","SOURCE_ROUTE"])=="yes")return null;let $=_l6(this.atts.cDataNVPair,"CONNECT_DATA");for(let J=0;J<$.getListSize();J++){let Q=$.getListElement(J);if(!jl6.includes(Q.name.toUpperCase()))return null}let Y,X="";for(let J=0;J<jV0.length;J++)if(Y=Ws(this.atts.cDataNVPair,["DESCRIPTION","CONNECT_DATA",jV0[J]]))if(jV0[J]=="SERVER")X+=sD1[J]+"1."+Y[0]+".";else X+=sD1[J]+Y.length+"."+Y+".";X+="V3."+Qs.TNS_VERSION_DESIRED;let G=new RegExp("^[A-Za-z0-9._-]+$");if(!X.match(G))return null;if(X.length>256)return null;return X}}tD1.exports=oD1});var IV0=o((Yq5,QN1)=>{var oJ=O4(),TV0=gF(),Il6=[-1,0,1,2,3];class FP{constructor($){this.flags=TV0.NSINAWANTED,this.sAtts=$}getDataSize(){return 20}sendHeader($,Y){return Y=$.writeUInt16BE(this.service,Y),Y=$.writeUInt16BE(this.numSubPackets,Y),Y=$.writeUInt32BE(0,Y),Y}sendVersion($,Y){return Y=$.writeUInt16BE(4,Y),Y=$.writeUInt16BE(5,Y),Y=$.writeUInt32BE(393216000,Y),Y}sendRaw($,Y,X,G){return G=$.writeUInt16BE(X,G),G=$.writeUInt16BE(1,G),G+=Y.copy($,G,0,X),G}sendArray($,Y,X){X=$.writeUInt16BE(10+Y.length*2,X),X=$.writeUInt16BE(1,X),X=$.writeUInt32BE(3735928559,X),X=$.writeUInt16BE(3,X),X=$.writeUInt32BE(Y.length,X);for(let G=0;G<Y.length;G++)X=$.writeUInt16BE(Y[G],X);return X}sendStatus($,Y,X){return X=$.writeUInt16BE(2,X),X=$.writeUInt16BE(6,X),X=$.writeUInt16BE(Y,X),X}sendString($,Y,X){return X=$.writeUInt16BE(Y.length,X),X=$.writeUInt16BE(0,X),X+=$.write(Y,X),X}sendUB1($,Y,X){return X=$.writeUInt16BE(1,X),X=$.writeUInt16BE(2,X),X=$.writeUInt8(Y,X),X}sendUB2($,Y,X){return X=$.writeUInt16BE(2,X),X=$.writeUInt16BE(3,X),X=$.writeUInt16BE(Y,X),X}static receiveHeader($,Y,X){return Y[0]=$.readUInt16BE(X),X+=2,Y[1]=$.readUInt16BE(X),X+=2,Y[2]=$.readUInt32BE(X),X+=4,X}receiveType($,Y,X,G){let J=$.readUInt16BE(G);G+=2;let Q=$.readUInt16BE(G);if(G+=2,Q!=Y)oJ.throwErr(oJ.ERR_ANO_PACKET);let W,K;switch(Y){case 5:return W=$.readUInt32BE(G),G+=4,X[0]=W,G;case 6:return K=$.readUInt16BE(G),G+=2,X[0]=K,G;case 1:return X[0]=J,G;case 0:return X[0]=J,G}}receiveUB2Array($,Y,X){let G=[];if(X=this.receiveType($,1,G,X),$.readUInt32BE(X)!=3735928559)oJ.throwErr(oJ.ERR_ANO_PACKET);X+=4;let J=$.readUInt16BE(X);if(X+=2,J!=3)oJ.throwErr(oJ.ERR_ANO_PACKET);let Q=$.readUInt32BE(X);X+=4;for(let W=0;W<Q;W++)Y[W]=$.readUInt16BE(X),X+=2;return X}receiveString($,Y,X){let G=[];X=this.receiveType($,0,G,X);let J=$.toString("utf8",X,X+G[0]);return X+=G[0],Y[0]=J,X}receiveServiceData($,Y,X){let G=[];return G[0]=$.readUInt16BE(X),X+=2,G[1]=$.readUInt16BE(X),X+=2,G[2]=$.readUInt32BE(X),X+=4,G[3]=$.readUInt16BE(X),X+=2,G[4]=$.readUInt16BE(X),X+=2,G[5]=$.readUInt8(X),X+=1,X}}class $N1 extends FP{constructor($){super($);this.service=4,this.serviceList=[1,2,3,4],this.numSubPackets=3}getDataSize(){return 42+this.serviceList.length*2}sendServiceData($,Y){return Y=this.sendHeader($,Y),Y=this.sendVersion($,Y),Y=this.sendRaw($,Buffer.from(this.sAtts.uuid,"base64"),8,Y),Y=this.sendArray($,this.serviceList,Y),Y}receiveServiceData($,Y,X){let G=[],J=[],Q=[];if(X=this.receiveType($,5,J,X),X=this.receiveType($,6,Q,X),Q[0]!=31)oJ.throwErr(oJ.ERR_ANO_STATUS,"Supervisor");return X=this.receiveUB2Array($,G,X),X}}class YN1 extends FP{constructor($){super($);this.service=1,this.status=64767,this.numSubPackets=5,this.serviceList=["tcps"],this.authActivated=!1}getDataSize(){let $=28;for(let Y=0;Y<this.serviceList.length;Y++)$+=5,$+=4+this.serviceList[Y].length;return $}sendServiceData($,Y){return Y=this.sendHeader($,Y),Y=this.sendVersion($,Y),Y=this.sendUB2($,57569,Y),Y=this.sendStatus($,this.status,Y),Y=this.sendUB1($,2,Y),Y=this.sendString($,"tcps",Y),Y}receiveServiceData($,Y,X){let G=[],J=[],Q=[];if(X=this.receiveType($,5,G,X),X=this.receiveType($,6,J,X),J[0]==64255&&Y>2)X+=5,X=this.receiveString($,Q,X),this.authActivated=!0;else if(J[0]==64511)this.authActivated=!1;else oJ.throwErr(oJ.ERR_ANO_STATUS,"Authentication");return X}}class XN1 extends FP{constructor($){super($);this.service=2,this.numSubPackets=2}getDataSize(){return 21}sendServiceData($,Y){Y=this.sendHeader($,Y),Y=this.sendVersion($,Y);let X=Buffer.from([0]);return Y=this.sendRaw($,X,1,Y),Y}}class GN1 extends FP{constructor($){super($);this.service=3,this.numSubPackets=2}getDataSize(){return 21}sendServiceData($,Y){Y=this.sendHeader($,Y),Y=this.sendVersion($,Y);let X=Buffer.from([0]);return Y=this.sendRaw($,X,1,Y),Y}}class JN1{constructor($){this.serviceList=[new YN1($),new XN1($),new GN1($),new $N1($)]}sendPacket(){let $=13;for(let G=0;G<this.serviceList.length;G++)$+=this.serviceList[G].getDataSize();let Y=Buffer.allocUnsafe($).fill(0),X=Y.writeUInt32BE(3735928559);return X=Y.writeUInt16BE($,X),X=Y.writeUInt32BE(393216000,X),X=Y.writeUInt16BE(this.serviceList.length,X),X=Y.writeUInt8(0,X),X=this.serviceList[3].sendServiceData(Y,X),X=this.serviceList[0].sendServiceData(Y,X),X=this.serviceList[1].sendServiceData(Y,X),this.serviceList[2].sendServiceData(Y,X),Y}processPacket($){let Y=10;if($.readUInt32BE(Y)!=3735928559)oJ.throwErr(oJ.ERR_ANO_PACKET);Y+=4,Y+=2,Y+=4;let X=$.readUInt16BE(Y);Y+=2,Y+=1;let G=[];for(let J=0;J<X;J++){if(Y=FP.receiveHeader($,G,Y),G[2]!=0)oJ.throwErrWithORAError(oJ.ERR_ANO_NEGOTIATION,G[2]);let Q=Il6[G[0]];Y=this.serviceList[Q].receiveServiceData($,G[1],Y)}}}function Cl6($,Y){if($.toUpperCase()=="TCPS"&&Y.externalAuth&&!Y.token)return TV0.NSINAWANTED;else return TV0.NSINANOSERVICES}QN1.exports={ANO:JN1,getFlags:Cl6}});var ZN1=o((Xq5,KN1)=>{var Sl6=A0("crypto"),kl6=A0("path"),CV0=gF(),vl6=A0("fs"),{getFlags:xl6}=IV0();async function yl6(){return await new Promise(($,Y)=>{Sl6.randomBytes(16,(X,G)=>{if(X)Y(X);else $(G)})})}class WN1{constructor($){this.largeSDU=!1,this.tdu=CV0.NSPDFTDULN,this.nt={},this.nt.tcpNoDelay=!0,this.uuid=$,this.nt.sslServerDNMatch=!0,this.nt.sslAllowWeakDNMatch=!1,this.nt.useSNI=!1,this.networkCompressionThreshold=1024}setFrom($){if($){if($.sdu>0)this.sdu=parseInt($.sdu);if(typeof $.networkCompression=="boolean"){if(this.networkCompression=$.networkCompression,this.networkCompressionLevels=[],$.networkCompressionLevels){if($.networkCompressionLevels.includes("high"))this.networkCompressionLevels.push("high");if($.networkCompressionLevels.length==0)this.networkCompressionLevels.push("high")}}if($.networkCompressionThreshold>=200)this.networkCompressionThreshold=parseInt($.networkCompressionThreshold);if(typeof $.walletLocation==="string")this.nt.walletFile=kl6.join($.walletLocation,CV0.PEM_WALLET_FILE_NAME);if(typeof $.walletPassword==="string")this.nt.walletPassword=$.walletPassword;if(typeof $.walletContent==="string")this.nt.wallet=$.walletContent;if($.expireTime>0)this.nt.expireTime=$.expireTime*1000*60;if($.connectTimeout>0)this.connectTimeout=$.connectTimeout*1000;if($.transportConnectTimeout>0)this.transportConnectTimeout=$.transportConnectTimeout*1000;if($.recvTimeout>0)this.recvTimeout=$.recvTimeout*1000;if($.sendTimeout>0)this.sendTimeout=$.sendTimeout*1000;if(typeof $.connectionIdPrefix==="string")this.connectionIdPrefix=$.connectionIdPrefix;if(typeof $.tcpNoDelay==="boolean")this.nt.tcpNoDelay=$.tcpNoDelay;if(typeof $.sslServerDNMatch==="boolean")this.nt.sslServerDNMatch=$.sslServerDNMatch;if(typeof $.sslAllowWeakDNMatch==="boolean")this.nt.sslAllowWeakDNMatch=$.sslAllowWeakDNMatch;if(typeof $.sslServerCertDN==="string")this.nt.sslServerCertDN=$.sslServerCertDN;if(typeof $.enable==="string"&&$.enable.toUpperCase()=="BROKEN")this.nt.enabledDCD=!0;if(typeof $.httpsProxy==="string")this.nt.httpsProxy=$.httpsProxy;if($.httpsProxyPort>=0)this.nt.httpsProxyPort=parseInt($.httpsProxyPort);if(typeof $.useSNI==="boolean")this.nt.useSNI=$.useSNI}}readWalletFile(){return new Promise(($,Y)=>{vl6.readFile(this.nt.walletFile,(X,G)=>{if(X)Y(X);else $(G)})})}clearWallet(){if(this.nt.wallet&&Buffer.isBuffer(this.nt.wallet))this.nt.wallet.fill(0);this.nt.wallet=null}async prepare($,Y){if(!this.uuid)this.uuid=await yl6(),this.uuid=this.uuid.toString("base64");if(this.connectionIdPrefix)this.connectionId=this.connectionIdPrefix+this.uuid;else this.connectionId=this.uuid;if(this.nt.connectionId=this.connectionId,$&&($.toUpperCase()=="TCPS"&&!this.nt.wallet&&this.nt.walletFile))this.nt.wallet=await this.readWalletFile();if(!this.connectTimeout&&!this.transportConnectTimeout)this.transportConnectTimeout=CV0.DEFAULT_TRANSPORT_CONNECT_TIMEOUT;this.NAFlags=xl6($,Y)}}KN1.exports=WN1});var Cx=o((Gq5,VN1)=>{var bl6=SY(),UN1=O4(),HN1=A0("os"),SV0=GY();function hl6(){this.program=SV0.sanitize(process.argv0),this.terminal="unknown",this.pid=process.pid.toString();try{this.userName=SV0.sanitize(HN1.userInfo().username)}catch{this.userName="unknown"}this.hostName=SV0.sanitize(HN1.hostname())}var fl6=new hl6;function gl6($){let Y=[];for(let X of $)Y.push(X.fetchInfo);return Y}function zN1($,Y){let X=$[0].name===void 0,G=X?[]:{};for(let J=0;J<$.length;J++)if(X)G.push($[J].values[Y]);else G[$[J].name]=$[J].values[Y];return G}function ml6($,Y,X){let J=$.bindInfoList.map((Q)=>Q.bindVar).filter((Q)=>Q.dir!==bl6.BIND_IN);if(J.length>0){if(X){let Q=Array(Y);for(let W=0;W<Y;W++)Q[W]=zN1(J,W);return Q}return zN1(J,0)}}function ul6($){let Y="",X="",G=!1,J=!1,Q=0,W={status:-1,proxyUser:"",schemaUser:""},K=$.length,Z=0,H,z;while(Z<K){if($.charAt(Z)==='"')G=!G,Q=Z;if($.charAt(Z)==="["&&!G){if(J=!0,Q!=0){for(H=Q+1;H<Z;H++)if($.charAt(H)!==" ")return W;for(H=0;H<=Q;H++)X+=$.charAt(H)}else for(H=0;H<Z;H++)if($.charAt(H)!==" ")X+=$.charAt(H);else break;break}Z++}if(X.length!=0)W.proxyUser=X;Z=Z+1,G=!1;let V=Z;Q=0;while(Z<K){if($.charAt(Z)==='"')G=!G,Q=Z;if($.charAt(Z)==="["&&!G&&J)return W;if($.charAt(Z)==="]"&&!G){if(Q!=V&&Q!=0){for(H=V;H<=Q;H++)Y+=$.charAt(H);for(H=Q+1;H<Z;H++)if($.charAt(H)!=" ")return W}else{for(H=V;H<Z;H++)if($.charAt(H)!=" ")break;if(H==Z)return W;for(z=H;z<Z;z++)Y+=$[z]}for(H=Z+1;H<K;H++)if($[H]!=" ")return W}Z++}if(Y.length===0)return W;else W.schemaUser=Y;return W.status=0,W}function pl6($){if($.externalAuth===!1){if($.password===void 0)UN1.throwErr(UN1.ERR_MISSING_CREDENTIALS)}}function dl6($){return`-----BEGIN PRIVATE KEY-----
`+$+`
-----END PRIVATE KEY-----`}VN1.exports={getMetadataMany:gl6,CLIENT_INFO:fl6,getOutBinds:ml6,checkProxyUserValidity:ul6,checkCredentials:pl6,normalizePrivateKey:dl6}});var EN1=o((Jq5,ON1)=>{var{findNVPairRecurse:Sx,createNVPair:Ks}=VP(),dX=O4(),cl6=A0("os"),ll6=A0("net"),il6=A0("dns"),FN1=il6.promises,kV0=Cx().CLIENT_INFO,Zs={ADDR:0,ADDR_LIST:1,DESC:2,DESC_LIST:3};class DN1{isS(){return Zs.ADDR}initFromString($){let Y=Ks($);this.initFromNVPair(Y)}initFromNVPair($){if($==null||$.name.toUpperCase()!="ADDRESS")dX.throwErr(dX.ERR_INVALID_CONNECT_STRING_SYNTAX);let Y=Sx($,"protocol"),X=Sx($,"port"),G=Sx($,"host"),J=Sx($,"https_proxy"),Q=Sx($,"https_proxy_port");if(X)this.port=Number(X.atom);if(G)this.host=G.atom;if(Y)this.prot=Y.atom;if(J)this.httpsProxy=J.atom;if(Q)this.httpsProxyPort=Number(Q.atom);this.addr=$.toString()}toString(){return this.addr}}class NN1{constructor(){this.children=[],this.sourceRoute=!1,this.loadBalance=!1,this.failover=!0}isS(){return Zs.ADDR_LIST}initFromString($){let Y=Ks($);this.initFromNVPair(Y)}initFromNVPair($){this.children=[];let Y,X,G=$.getListSize();if(G==0)dX.throwErr(dX.ERR_INVALID_CONNECT_STRING_SYNTAX);for(let J=0;J<G;J++)if(Y=$.getListElement(J),Y.name.toUpperCase()=="SOURCE_ROUTE")this.sourceRoute=Y.atom.toLowerCase()=="yes"||Y.atom.toLowerCase()=="on"||Y.atom.toLowerCase()=="true";else if(Y.name.toUpperCase()=="LOAD_BALANCE")this.loadBalance=Y.atom.toLowerCase()=="yes"||Y.atom.toLowerCase()=="on"||Y.atom.toLowerCase()=="true";else if(Y.name.toUpperCase()=="FAILOVER")this.failover=Y.atom.toLowerCase()=="yes"||Y.atom.toLowerCase()=="on"||Y.atom.toLowerCase()=="true";else if(Y.name.toUpperCase()=="ADDRESS")X=new Us,X.initFromNVPair(Y),this.children.push(X);else if(Y.name.toUpperCase()=="ADDRESS_LIST")X=new Hs,X.initFromNVPair(Y),this.children.push(X);else dX.throwErr(dX.ERR_INVALID_CONNECT_STRING_SYNTAX);if(this.children.length==0)dX.throwErr(dX.ERR_INVALID_CONNECT_STRING_SYNTAX)}toString(){let $=new String("");if(this.children.size()<1)return $;$+="(ADDRESS_LIST=";for(let Y=0;Y<this.children.size();Y++)$+=this.children[Y].toString();if(this.sourceRoute)$+="(SOURCE_ROUTE=yes)"+LP.HC;if(this.loadBalance)$+="(LOAD_BALANCE=yes)";if(!this.failover)$+="(FAILOVER=false)";return $+=")",$}}class AN1{constructor(){this.children=[],this.sourceRoute=!1,this.loadBalance=!1,this.failover=!0,this.delayInMillis=-1,this.params={}}isS(){return Zs.DESC}initFromString($){let Y=Ks($);this.initFromNVPair(Y)}initFromNVPair($){let Y=$.getListSize(),X,G;if(Y==0)dX.throwErr(dX.ERR_INVALID_CONNECT_STRING_SYNTAX);for(let J=0;J<Y;J++)if(X=$.getListElement(J),X.name.toUpperCase()=="SOURCE_ROUTE")this.sourceRoute=X.atom.toLowerCase()=="yes"||X.atom.toLowerCase()=="on"||X.atom.toLowerCase()=="true";else if(X.name.toUpperCase()=="LOAD_BALANCE")this.loadBalance=X.atom.toLowerCase()=="yes"||X.atom.toLowerCase()=="on"||X.atom.toLowerCase()=="true";else if(X.name.toUpperCase()=="FAILOVER")this.failover=X.atom.toLowerCase()=="yes"||X.atom.toLowerCase()=="on"||X.atom.toLowerCase()=="true";else if(X.name.toUpperCase()=="USE_SNI")this.params.useSNI=X.atom.toLowerCase()=="yes"||X.atom.toLowerCase()=="on"||X.atom.toLowerCase()=="true";else if(X.name.toUpperCase()=="ADDRESS_LIST")G=new Hs,G.initFromNVPair(X),this.children.push(G);else if(X.name.toUpperCase()=="ADDRESS")G=new Us,G.initFromNVPair(X),this.children.push(G);else if(X.name.toUpperCase()=="CONNECT_DATA"){let Q,W=X.getListSize();for(let K=0;K<W;K++)if(Q=X.getListElement(K),Q.name.toUpperCase()=="CONNECTION_ID_PREFIX"){this.params.connectionIdPrefix=Q.atom,X.removeListElement(K);break}this.connectData=X.valueToString()}else if(X.name.toUpperCase()=="RETRY_DELAY"){if(X.atom>0)this.delayInMillis=X.atom*1000}else if(X.name.toUpperCase()=="RETRY_COUNT")this.retryCount=X.atom;else if(X.name.toUpperCase()=="CONNECTION_ID_PREFIX")this.conidPrefix=X.atom;else if(X.name.toUpperCase()=="CONNECT_TIMEOUT"){if(X.atom>0)this.params.connectTimeout=X.atom}else if(X.name.toUpperCase()=="TRANSPORT_CONNECT_TIMEOUT"){if(X.atom>0)this.params.transportConnectTimeout=X.atom}else if(X.name.toUpperCase()=="ENABLE")this.params.enable=X.atom;else if(X.name.toUpperCase()=="RECV_TIMEOUT"){if(X.atom>0)this.params.recvTimeout=X.atom}else if(X.name.toUpperCase()=="SDU")this.params.sdu=X.atom;else if(X.name.toUpperCase()=="COMPRESSION")this.params.networkCompression=X.atom.toLowerCase()=="yes"||X.atom.toLowerCase()=="on"||X.atom.toLowerCase()=="true",this.params.networkCompressionLevels=[];else if(X.name.toUpperCase()=="COMPRESSION_LEVELS"){let Q=X.getListSize();for(let W=0;W<Q;W++){let K=X.getListElement(W);if(K.name.toUpperCase()=="LEVEL")this.params.networkCompressionLevels.push(K.atom.toLowerCase())}}else if(X.name.toUpperCase()=="EXPIRE_TIME"){if(X.atom>0)this.params.expireTime=X.atom}else if(X.name.toUpperCase()=="SECURITY"){let Q=X.getListSize(),W;for(let K=0;K<Q;K++)if(W=X.getListElement(K),W.name.toUpperCase()=="SSL_SERVER_CERT_DN")this.params.sslServerCertDN=W.valueToString();else if(W.name.toUpperCase()=="SSL_SERVER_DN_MATCH")this.params.sslServerDNMatch=W.atom.toLowerCase()=="yes"||W.atom.toLowerCase()=="on"||W.atom.toLowerCase()=="true";else if(W.name.toUpperCase()=="SSL_ALLOW_WEAK_DN_MATCH")this.params.sslAllowWeakDNMatch=W.atom.toLowerCase()=="yes"||W.atom.toLowerCase()=="on"||W.atom.toLowerCase()=="true";else if(W.name.toUpperCase()=="WALLET_LOCATION"||W.name.toUpperCase()=="MY_WALLET_DIRECTORY")this.params.walletLocation=W.atom}}toString(){let $=new String(""),Y;Y=new String("");for(let X=0;X<this.children.size();X++)if(Y=this.children[X].toString(),!Y=="")$+=Y;if(!$==""&&this.sourceRoute)$+="(SOURCE_ROUTE=yes)";if(!$==""&&this.loadBalance)$+="(LOAD_BALANCE=yes)";if(!$==""&&!this.failover)$+="(FAILOVER=false)";if(!$.equals(""))$="(DESCRIPTION="+$+")";return $}}class BN1{constructor(){this.children=[],this.sourceRoute=!1,this.loadBalance=!0,this.failover=!0}isS(){return Zs.ADDR_LIST}initFromString($){let Y=Ks($);this.initFromNVPair(Y)}initFromNVPair($){let Y=$.getListSize(),X,G;if(Y==0)dX.throwErr(dX.ERR_INVALID_CONNECT_STRING_SYNTAX);for(let J=0;J<Y;J++)if(G=$.getListElement(J),G.name.toUpperCase()=="SOURCE_ROUTE")this.sourceRoute=G.atom.toLowerCase()=="yes"||G.atom.toLowerCase()=="on"||G.atom.toLowerCase=="true";else if(G.name.toUpperCase()=="LOAD_BALANCE")this.loadBalance=G.atom.toLowerCase()=="yes"||G.atom.toLowerCase()=="on"||G.atom.toLowerCase()=="true";else if(G.name.toUpperCase()=="FAILOVER")this.failover=G.atom.toLowerCase()=="yes"||G.atom.toLowerCase()=="on"||G.atom.toLowerCase()=="true";else if(G.name.toUpperCase()=="DESCRIPTION")X=new xV0,X.initFromNVPair(G),this.children.push(X);else dX.throwErr(dX.ERR_INVALID_CONNECT_STRING_SYNTAX);if(this.children.length==0)dX.throwErr(dX.ERR_INVALID_CONNECT_STRING_SYNTAX)}toString(){let $=new String("");if(this.children.size()<1)return $;let Y=new String("");for(let X=0;X<this.children.size();X++)if(Y=this.children[X].toString(),!Y.equals(""))$+=Y;if($.equals("")&&this.sourceRoute)$+="(SOURCE_ROUTE=yes)";if($.equals("")&&!this.loadBalance)$+="(LOAD_BALANCE=no)";if($.equals("")&&!this.failover)$+="(FAILOVER=false)";if(!$.equals(""))$="(DESCRIPTION_LIST="+$+")";return $}}class vV0{constructor(){this.CNdata=[]}}var LP={DEBUG:!1,SR:"(SOURCE_ROUTE=yes)",HC:"(HOP_COUNT=0)",LB:"(LOAD_BALANCE=yes)",NFO:"(FAILOVER=false)",CD:"(CONNECT_DATA=",CONID:"(CONNECTION_ID="},LN1={all:!0};class Us extends DN1{constructor(){super()}async navigate($){let Y,X=!1,G=!1;if(!this.host){X=!0,this.host=cl6.hostname();try{await FN1.lookup(this.host,LN1)}catch{this.host="localhost"}}if($.getcurrentDescription()==null)$.newConnectionDescription(),G=!0;if(!ll6.isIP(this.host)&&!($.httpsProxy||this.httpsProxy))try{Y=await FN1.lookup(this.host,LN1);for(let J of Y){let Q=new vV0;if(Q.hostname=this.host,Q.port=this.port,Q.protocol=this.prot,Q.httpsProxy=this.httpsProxy,Q.httpsProxyPort=this.httpsProxyPort,Q.desc=$.getcurrentDescription(),Q.CNdata.push($.sBuf.join("")),X)Q.CNdata.push("(address=(protocol="+this.prot+")(host="+this.host+")(port="+this.port+"))");else Q.CNdata.push(this.toString());Q.host=J.address,Q.addr=this.addr,$.getcurrentDescription().addConnectOption(Q)}}catch{}else{let J=new vV0;J.hostname=this.host,J.port=this.port,J.protocol=this.prot,J.httpsProxy=this.httpsProxy,J.httpsProxyPort=this.httpsProxyPort,J.desc=$.getcurrentDescription(),J.CNdata.push($.sBuf.join("")),J.CNdata.push(this.toString()),J.host=this.host,J.addr=this.addr,$.getcurrentDescription().addConnectOption(J)}if(G)$.closeDescription()}addToString($){let Y=this.toString(),X=[];X=$.getcurrentDescription().getConnectOptions();for(let G=0;G<X.length;G++){if(X[G].done)continue;X[G].CNdata.push(Y)}}}class Hs extends NN1{constructor(){super();this.activeChildren=[],this.sBuflength=0}async navigate($){await this.navigate2($,0)}async navigate2($,Y){if(Y++,this.sBuflength=$.sBuf.length,$.sBuf.push("(ADDRESS_LIST="),this.sourceRoute){this.activeChildren=this.children,await this.activeChildren[0].navigate($);for(let X=1;X<this.activeChildren.length;X++)this.activeChildren[X].addToString($)}else{this.activeChildren=kx.setActiveChildren(this.children,this.failover,this.loadBalance);for(let X=0;X<this.activeChildren.length;X++)if(this.getChildrenType(X)==1)await this.activeChildren[X].navigate2($,Y);else await this.activeChildren[X].navigate($)}this.closeNVPair($),$.sBuf.length=this.sBuflength}addToString($){let Y=this.toString(),X=[];X=$.getcurrentDescription().getConnectOptions();for(let G=0;G<X.length;G++){if(X[G].done)continue;X[G].CNdata.push(Y)}}getChildrenSize(){let $=0;for(let Y=0;Y<this.activeChildren.length;Y++){if(this.getChildrenType(Y)==1)$+=this.activeChildren[Y].getChildrenSize();else $++;if(this.sourceRoute)return $}return $}getChildrenType($){return this.activeChildren[$].isS()}getChild($){return this.children[$]}closeNVPair($){let Y=[],X=this.getChildrenSize();if($.getcurrentDescription()!=null){Y=$.getcurrentDescription().getConnectOptions();let G=0,J=null,Q=null;for(let W=Y.length-1;W>=0&&!Y[W].done;W--){if(Y[W].hostname!=J||Y[W].port!=Q)G++;if(J=Y[W].hostname,Q=Y[W].port,G>X)break;if(this.sourceRoute)Y[W].CNdata.push(LP.SR),Y[W].CNdata.push(LP.HC),Y[W].done=!0;Y[W].CNdata.push(")")}}}}class xV0 extends AN1{constructor(){super();this.activeChildren=[],this.descProcessed=0}async navigate($){$.sBuf.length=0,$.sBuf.push("(DESCRIPTION=");let Y=$.newConnectionDescription();if(this.retryCount!=null)$.retryCount=this.getIntValue(this.retryCount,$.retryCount),Y.retryCount=$.retryCount;if(this.delayInMillis!=-1)Y.delayInMillis=this.delayInMillis;if(Y.params=this.params,"connectTimeout"in this.params)$.sBuf.push("(CONNECT_TIMEOUT="+this.params.connectTimeout+")");if("transportConnectTimeout"in this.params)$.sBuf.push("(TRANSPORT_CONNECT_TIMEOUT="+this.params.transportConnectTimeout+")");if("recvTimeout"in this.params)$.sBuf.push("(RECV_TIMEOUT="+this.params.recvTimeout+")");if("sdu"in this.params)$.sBuf.push("(SDU="+this.params.sdu+")");if("expireTime"in this.params)$.sBuf.push("(EXPIRE_TIME="+this.params.expireTime+")");if("enable"in this.params)$.sBuf.push("(ENABLE="+this.params.enable+")");if("useSNI"in this.params)$.sBuf.push("(USE_SNI="+this.params.useSNI+")");if("sslServerCertDN"in this.params||"sslServerDNMatch"in this.params||"walletLocation"in this.params||"sslAllowWeakDNMatch"in this.params){if($.sBuf.push("(SECURITY="),"sslServerCertDN"in this.params)$.sBuf.push("(SSL_SERVER_CERT_DN="+this.params.sslServerCertDN+")");if("sslServerDNMatch"in this.params)$.sBuf.push("(SSL_SERVER_DN_MATCH="+this.params.sslServerDNMatch+")");if("sslAllowWeakDNMatch"in this.params)$.sBuf.push("(SSL_ALLOW_WEAK_DN_MATCH="+this.params.sslAllowWeakDNMatch+")");if("walletLocation"in this.params)$.sBuf.push("(WALLET_LOCATION="+this.params.walletLocation+")");$.sBuf.push(")")}if("httpsProxyPort"in this.params)$.sBuf.push("(HTTPS_PROXY_PORT="+this.params.httpsProxyPort+")");if("httpsProxy"in this.params)$.sBuf.push("(HTTPS_PROXY="+this.params.httpsProxy+")");if(!this.failover)$.sBuf.push(LP.NFO);if(!this.sourceRoute){this.activeChildren=kx.setActiveChildren(this.children,this.failover,this.loadBalance);for(let X=0;X<this.activeChildren.length;X++)await this.activeChildren[X].navigate($);this.closeNVPair($)}else{this.activeChildren=this.children,await this.activeChildren[0].navigate($);for(let X=1;X<this.activeChildren.length;X++)this.activeChildren[X].addToString($);this.closeNVPair($)}$.closeDescription()}closeNVPair($){if($.getcurrentDescription()==null)return;let Y=[];Y=$.getcurrentDescription().getConnectOptions();for(let X=0;X<Y.length;++X){if(this.sourceRoute)Y[X].CNdata.push(LP.SR);if(this.connectData==null)this.connectData="(SERVICE_NAME=)";let G=kV0.program;if($.program)G=$.program;let J=kV0.hostName;if($.machine)J=$.machine;let Q=kV0.userName;if($.osUser)Q=$.osUser;let W=`(CID=(PROGRAM=${G})(HOST=${J})(USER=${Q}))`;if(Y[X].CNdata.push(LP.CD),Y[X].CNdata.push(this.connectData),Y[X].CNdata.push(W),Y[X].CNdata.push(")"),this.SID!=null)Y[X].sid=this.SID;if(this.serviceName!=null)Y[X].service_name=this.serviceName;if(this.instanceName!=null)Y[X].instance_name=this.instanceName;Y[X].CNdata.push(")"),Y[X].done=!0}}getIntValue($,Y){if(/^\d+$/.test($))return parseInt($);return Y}}class kx extends BN1{constructor($=[],Y=0,X=0){super();this.activeChildren=$,this.descProcessed=Y,this.done=X}async navigate($){$.sBuf.push("(DESCRIPTION_LIST="),this.activeChildren=kx.setActiveChildren(this.children,this.failover,this.loadBalance);while(this.descProcessed<this.activeChildren.length)await this.activeChildren[this.descProcessed].navigate($),this.descProcessed++}static setActiveChildren($,Y,X){let G,J=$.length,Q=[],W=Math.floor(Math.random()*10),K=Array(J).fill(!1);if(Y)if(X)for(let Z=0;Z<J;Z++){do G=Math.abs(Math.floor(Math.random()*10))%J;while(K[G]);K[G]=!0,Q.push($[G])}else Q=$;else if(X)G=Math.abs(W)%J,Q.push($[G]);else Q.push($[0]);return Q}}ON1.exports={NavAddress:Us,NavAddressList:Hs,NavDescription:xV0,NavDescriptionList:kx}});var bV0=o((Qq5,wN1)=>{var{NavAddress:nl6,NavAddressList:rl6,NavDescription:al6,NavDescriptionList:sl6}=EN1(),{createNVPair:ol6}=VP(),MN1=O4(),tl6=gF();class RN1{constructor(){this.cOpts=[]}addConnectOption($){this.cOpts.push($)}getConnectOptions(){return this.cOpts}}class qN1{constructor(){this.reset(),this.retryCount=0,this.currentDescription=null,this.descriptionList=[],this.sBuf=[]}reset(){this.nextOptToTry=0,this.lastRetryCounter=0,this.lastRetryConnectDescription=0,this.reorderDescriptionList=0}hasMoreOptions(){let $=0;for(let Y=0;Y<this.descriptionList.length;++Y)$+=this.descriptionList[Y].getConnectOptions().length;return this.nextOptToTry<$}newConnectionDescription(){return this.currentDescription=new RN1,this.currentDescription}getcurrentDescription(){return this.currentDescription}closeDescription(){this.descriptionList.push(this.currentDescription),this.currentDescription=null}async execute($){if($!=null){if(this.retryCount==0&&$.retryCount>0)this.retryCount=$.retryCount}if(!this.reorderDescriptionList)this.descriptionList=yV0.reorderDescriptionList(this.descriptionList),this.reorderDescriptionList=!0;for(let Y=this.lastRetryConnectDescription;Y<this.descriptionList.length;Y++){let X=this.descriptionList[Y],G=[];G=X.getConnectOptions();let J=X.delayInMillis;if($!=null){if((J==0||J==null)&&$.retryDelay>0)J=$.retryDelay*1000;else if(!J)J=tl6.DEFAULT_RETRY_DELAY}for(let Q=this.lastRetryCounter;Q<=this.retryCount;++Q){if(this.nextOptToTry==0)G=yV0.reorderAddresses(G);while(this.nextOptToTry<G.length){let W=G[this.nextOptToTry];return this.lastRetryCounter=Q,this.lastRetryConnectDescription=Y,this.nextOptToTry++,W}if(this.nextOptToTry=0,J>0&&Q<this.retryCount)await el6(J)}this.lastRetryCounter=0}throw this.nextOptToTry=1000,this.lastRetryCounter=1000,Error("All options tried")}}function el6($){return new Promise((Y)=>setTimeout(Y,$))}async function $i6($,Y){let X;if(typeof $==="string")X=ol6($);else X=$;let G=X.name.toUpperCase(),J=null;switch(G){case"ADDRESS":J=new nl6;break;case"ADDRESS_LIST":J=new rl6;break;case"DESCRIPTION":J=new al6;break;case"DESCRIPTION_LIST":J=new sl6;break;default:MN1.throwErr(MN1.ERR_INVALID_CONNECT_STRING_PARAMETERS,`unknown top element ${G}`)}J.initFromNVPair(X);let Q=new qN1;return Q.driverName=Y.driverName,Q.machine=Y.machine,Q.terminal=Y.terminal,Q.osUser=Y.osUser,Q.program=Y.program,Q.httpsProxy=Y.httpsProxy,await J.navigate(Q),Q}class PN1{constructor(){this.DOWN_HOSTS_TIMEOUT=600,this.MIN_TIME_BETWEEN_REFRESH=60,this.downHostsCacheMap=new Map,this.lastRefreshTime=0}markDownHost($){return this.downHostsCacheMap.set($,Date.now())}refreshCache(){if(Date.now()-this.MIN_TIME_BETWEEN_REFRESH*1000>this.lastRefreshTime)this.downHostsCacheMap.forEach(($,Y)=>{let X=$;if(X!=null&&Date.now()-this.DOWN_HOSTS_TIMEOUT*1000>X)this.downHostsCacheMap.delete(Y)}),this.lastRefreshTime=Date.now()}reorderAddresses($){this.refreshCache();let Y=0,X=$.length-1;while(Y<X){while(Y<=X&&!this.isDownHostsCached($[Y]))Y++;while(X>=Y&&this.isDownHostsCached($[X]))X--;if(Y<X)[$[Y],$[X]]=[$[X],$[Y]]}return $}isDownDescCached($){let Y=$.getConnectOptions();for(let X=0;X<Y.length;X++)if(!this.isDownHostsCached(Y[X]))return!1;return!0}reorderDescriptionList($){this.refreshCache();let Y=0,X=$.length-1;while(Y<X){while(Y<=X&&!this.isDownDescCached($[Y]))Y++;while(X>=Y&&this.isDownDescCached($[X]))X--;if(Y<X)[$[Y],$[X]]=[$[X],$[Y]]}return $}isDownHostsCached($){return this.downHostsCacheMap.has($.host)}}var yV0=new PN1;wN1.exports={createNode:$i6,SOLE_INST_DHCACHE:yV0}});var IN1=o((Wq5,TN1)=>{var pF=O4(),_N1=new RegExp("((?=(?<hostnames>(((\\[[A-z0-9:]+\\])|([A-z0-9][A-z0-9._-]+))[,]?)+)))\\k<hostnames>(:(?<port>\\d+)?)?","g"),Yi6=new RegExp("^(((?<protocol>[A-z0-9]+):)?//)?(?<hostinfo>("+_N1.source+"(?=([,]|[;]|[/]|[:]|$))([,]|[;])?)+)(/(?<servicename>[A-z0-9][A-z0-9,-.]+)?)?(:(?<servermode>dedicated|shared|pooled))?(/(?<instance>[A-z0-9][A-z0-9]+))?$","ig"),Xi6=["ENABLE","FAILOVER","LOAD_BALANCE","RECV_BUF_SIZE","SEND_BUF_SIZE","SDU","SOURCE_ROUTE","RETRY_COUNT","RETRY_DELAY","CONNECT_TIMEOUT","TRANSPORT_CONNECT_TIMEOUT","RECV_TIMEOUT","USE_SNI","COMPRESSION"];class jN1{constructor($){this.URL_PROPS_ALIAS=this.initializeUrlAlias(),this.url=$,this.resolvedUrl="",this.connectionProps=new Map,this.urlProps=new Map,this.lb=!1}getResolvedUrl(){return this.parse(),this.resolvedUrl}parse(){let $=this.parseExtendedSettings(this.url);if(this.connectionProps.size===0&&this.urlProps.size===0)$=this.url;this.resolvedUrl=this.resolveToLongURLFormat($)}resolveToLongURLFormat($){let Y=$.replace(/\s/g,""),X=0,G=null,J=null,Q=null,W=null,K=null;for(let L of Y.matchAll(Yi6))X=1,G=L.groups.protocol,J=L.groups.hostinfo,Q=L.groups.servicename,W=L.groups.servermode,K=L.groups.instance;if(!X)pF.throwErr(pF.ERR_INVALID_EZCONNECT_SYNTAX,"input string not in easy connect format",Y);if(G==null){if(!$.includes("//"))G="TCP"}else if(G.toLowerCase()!="tcp"&&G.toLowerCase()!="tcps")pF.throwErr(pF.ERR_INVALID_EZCONNECT_SYNTAX,"Unsupported protocol in thin mode",G);let Z=this.urlProps.get("HTTPS_PROXY"),H=this.urlProps.get("HTTPS_PROXY_PORT"),z=this.buildAddressList(J,G,Z,H),V=this.urlProps.get("CONNECTION_ID_PREFIX"),F=[];if(this.lb)F.push("(LOAD_BALANCE=ON)");return F.push(this.buildDescriptionParams()),F.push(z),F.push(this.buildConnectData(Q,W,K,V)),F.push(this.buildSecurityInfo(G)),`(DESCRIPTION=${F.join("")})`}buildConnectData($,Y,X,G){let J=this.urlProps.get("POOL_CONNECTION_CLASS"),Q=this.urlProps.get("POOL_PURITY"),W=this.urlProps.get("SERVICE_TAG"),K=this.urlProps.get("POOL_BOUNDARY"),Z=[];if($)Z.push(`(SERVICE_NAME=${$})`);else Z.push("(SERVICE_NAME=)");if(Y)Z.push(`(SERVER=${Y})`);if(X)Z.push(`(INSTANCE_NAME=${X})`);if(J)Z.push(`(POOL_CONNECTION_CLASS=${J})`);if(Q)Z.push(`(POOL_PURITY=${Q})`);if(W)Z.push(`(SERVICE_TAG=${W})`);if(G)Z.push(`(CONNECTION_ID_PREFIX=${G})`);if(K)Z.push(`(POOL_BOUNDARY=${K})`);return`(CONNECT_DATA=${Z.join("")})`}buildAddressList($,Y,X,G){let J=[],Q="";if(X!=null)if(G!=null)Q=`(HTTPS_PROXY=${X})(HTTPS_PROXY_PORT=${G})`;else Q=`(HTTPS_PROXY=${X})`;if(Y==null)Y="TCP";let W=0,K=$.split(";");for(let Z of K){let H=0,z=[];for(let F of Z.matchAll(_N1)){let L=F.groups.hostnames.split(","),N=F.groups.port;if(N==null)N="1521";for(let D of L)z.push(this.getAddrStr(D,N,Y,Q)),H++}W+=H;let V=[];if(K.length>1&&H>1)V.push("(LOAD_BALANCE=ON)");if(V.push(z.join("")),K.length>1)J.push(`(ADDRESS_LIST=${V.join("")})`);else J.push(V.join(""))}if(K.length<2&&W>1)this.lb=!0;return J.join("")}getAddrStr($,Y,X,G){let J=$.trim();if(J.startsWith("[")&&J.endsWith("]"))J=J.substring(1,J.length-1);return`(ADDRESS=(PROTOCOL=${X})(HOST=${J})(PORT=${Y})${G})`}buildDescriptionParams(){if(this.urlProps.size===0)return"";let $=[];return this.urlProps.forEach(function(Y,X){if(Xi6.includes(X))$.push(`(${X}=${Y})`)}),$.join("")}buildSecurityInfo($){let Y=[];if($!=null&&$.toLowerCase()=="tcps"){let X=this.urlProps.get("SSL_SERVER_DN_MATCH"),G=this.urlProps.get("SSL_SERVER_CERT_DN"),J=this.urlProps.get("MY_WALLET_DIRECTORY");if(X!=null)Y.push(`(SSL_SERVER_DN_MATCH=${X})`);if(G!=null)Y.push(`(SSL_SERVER_CERT_DN=${G}})`);if(J!=null)Y.push(`(MY_WALLET_DIRECTORY=${J})`)}if(Y.length===0)return"";return`(SECURITY=${Y.join("")})`}parseExtendedSettings($){let Y=Array.from($.trim()),X=this.findExtendedSettingPosition(Y);if(X==-1)return $;return this.parseExtendedProperties(Y,X+1),$.substring(0,X)}parseExtendedProperties($,Y){let X=null,G=null,J=Array($.length),Q=0,W="";for(let K=Y;K<$.length;K++){if($[K].trim()=="")continue;switch($[K]){case'"':W=this.parseQuotedString(K,$,Q,J),Q=W[1],K=W[0];break;case"=":if(X!=null)pF.throwErr(pF.ERR_INVALID_EZCONNECT_SYNTAX,"unable to parse, invalid syntax",this.url);X=J.join("").substring(0,Q).trim(),Q=0;break;case"&":if(X==null)pF.throwErr(pF.ERR_INVALID_EZCONNECT_SYNTAX,"unable to parse, invalid syntax",this.url);G=J.join("").substring(0,Q).trim(),this.addParam(X,G),X=null,G=null,Q=0;break;default:J[Q++]=$[K]}}if(X!=null)G=J.join("").substring(0,Q).trim(),this.addParam(X,G)}parseQuotedString($,Y,X,G){let J=$+1;while(J<Y.length){let Q=Y[J];if(Q=='"')return[J,X];else G[X++]=Q;J++}}addParam($,Y){let X=$.toLowerCase(),G=this.URL_PROPS_ALIAS.get(X);if(G!=null)this.urlProps.set(G,Y);else this.connectionProps.set(G,Y)}findExtendedSettingPosition($){let Y=0;for(let X=0;X<$.length;X++)if($[X]=="(")Y++;else if($[X]==")")Y--;else if($[X]=="?"&&Y==0)return X;return-1}initializeUrlAlias(){let $=new Map;return $.set("enable","ENABLE"),$.set("compression","COMPRESSION"),$.set("failover","FAILOVER"),$.set("load_balance","LOAD_BALANCE"),$.set("recv_buf_size","RECV_BUF_SIZE"),$.set("send_buf_size","SEND_BUF_SIZE"),$.set("sdu","SDU"),$.set("source_route","SOURCE_ROUTE"),$.set("retry_count","RETRY_COUNT"),$.set("retry_delay","RETRY_DELAY"),$.set("https_proxy","HTTPS_PROXY"),$.set("https_proxy_port","HTTPS_PROXY_PORT"),$.set("connect_timeout","CONNECT_TIMEOUT"),$.set("transport_connect_timeout","TRANSPORT_CONNECT_TIMEOUT"),$.set("recv_timeout","RECV_TIMEOUT"),$.set("ssl_server_cert_dn","SSL_SERVER_CERT_DN"),$.set("ssl_server_dn_match","SSL_SERVER_DN_MATCH"),$.set("wallet_location","MY_WALLET_DIRECTORY"),$.set("pool_connection_class","POOL_CONNECTION_CLASS"),$.set("pool_purity","POOL_PURITY"),$.set("service_tag","SERVICE_TAG"),$.set("connection_id_prefix","CONNECTION_ID_PREFIX"),$.set("pool_boundary","POOL_BOUNDARY"),$.set("use_sni","USE_SNI"),$}}TN1.exports=jN1});var hV0=o((Kq5,vN1)=>{var{createNVPair:Gi6}=VP(),NP=A0("fs"),CN1=A0("process"),Ji6=A0("readline"),DP=O4();function Qi6($){let Y=null,X=CN1.env.TNS_ADMIN;if($)if(Y=$+"/tnsnames.ora",NP.existsSync(Y))return Y;else DP.throwErr(DP.ERR_TNS_NAMES_FILE_MISSING,$);else{if(!X)DP.throwErr(DP.ERR_NO_CONFIG_DIR);else if(Y=X,Y+="/tnsnames.ora",!NP.existsSync(Y))DP.throwErr(DP.ERR_TNS_NAMES_FILE_MISSING,X);return Y}}class SN1{constructor(){this.readInProgress=!1,this.waiters=[],this.aliasht=new Map,this.modTime=new Map}}class kN1{constructor(){this.tnsnamesHT=new Map}async initializeNlpa($){let Y;if(this.tnsnamesHT.has($))Y=this.tnsnamesHT.get($);else Y=new SN1;if(Y.readInProgress)await new Promise((X)=>{Y.waiters.push(X)});if(!this.checkModfTime(Y))return Y.aliasht;return Y.readInProgress=!0,await this.start($,0,Y),this.tnsnamesHT.set($,Y),Y.aliasht}async start($,Y,X){if(Y>4)return;let G=NP.statSync($);X.modTime.set($,G.mtime);let J=Ji6.createInterface({input:NP.createReadStream($),output:CN1.stdout,terminal:!1}),Q="";for await(let K of J)if(K.length==0)continue;else if(K[0]=="#")continue;else if(K[0]==" "||K[0]=="\t"||K[0]==")"||K[0]=="(")if(K=K.replace(/\s+/g,""),K=this.checkNLPforComments(K),K.length==0)continue;else Q=Q+K;else if(Q.length==0)K=this.checkNLPforComments(K),Q=Q+K;else if(Q.length!=0)await this.addNLPListElement(Q,Y,X),Q="",K=this.checkNLPforComments(K),Q=Q+K;if(Q.length!=0)await this.addNLPListElement(Q,Y,X),Q="";X.readInProgress=!1;let W;while(W=X.waiters.pop())W()}checkNLPforComments($){let Y=Array($.length);for(let X=0;X<$.length;X++){let G=$[X];if(G=="#")if(X!=0)break;else return"";else Y.push(G)}return Y.join("")}checkModfTime($){if($.modTime.size!=0)for(let[Y,X]of $.modTime)if(NP.existsSync(Y)){if(NP.statSync(Y).mtime-X>0)return!0}else return!0;else return!0;return!1}async addNLPListElement($,Y,X){let G=$.split(/\r?\n/).filter((J)=>J);for(let J=0;J<G.length;J++){if(G[J].charAt(0)!="(")G[J]="("+G[J]+")";let Q=Gi6(G[J]),K=Q.name.toUpperCase();if(Q.name=K,K=="IFILE")await this.start(Q.atom,Y+1,X);else{let Z=K.split(",");for(let H=0;H<Z.length;H++)X.aliasht.set(Z[H],Q)}}}}vN1.exports={NLParamParser:kN1,tnsnamesFilePath:Qi6}});var mV0=o((Zq5,fN1)=>{var dF=A0("zlib"),dK=uD1(),Wi6=eD1(),Ki6=ZN1(),z4=gF(),{createNode:yN1}=bV0(),h9=O4(),{findNVPairRecurse:Zi6,createNVPair:Vs,findValue:cK}=VP(),{Buffer:zs}=A0("buffer"),xN1=IN1(),{NLParamParser:Ui6,tnsnamesFilePath:Hi6}=hV0(),zi6=A0("process"),Vi6=bV0().SOLE_INST_DHCACHE,{ANO:Fi6}=IV0();async function Li6($){let Y=await bN1($.connectString,$.configDir),X=await yN1(Y,$),G;if(typeof Y==="string")G=Vs(Y);else G=Y;let J=cK(G,["DESCRIPTION","CONNECT_DATA","SERVER"]),Q=cK(G,["DESCRIPTION","CONNECT_DATA","POOL_CONNECTION_CLASS"]),W=cK(G,["DESCRIPTION","CONNECT_DATA","SERVICE_NAME"]),K=cK(G,["DESCRIPTION","CONNECT_DATA","SID"]),Z=cK(G,["DESCRIPTION","CONNECT_DATA","POOL_PURITY"]);return[J,Q,W,Z,K,X]}var Di6=new Ui6;async function bN1($,Y){let X=$.trim(),G=X;if(X.indexOf(")")==-1||X.indexOf("(")!=0)if(X.indexOf(":")!=-1||X.indexOf("/")!=-1)return G=new xN1(X).getResolvedUrl(),G;else{let J=Hi6(Y);if(G=(await Di6.initializeNlpa(J)).get(X.toUpperCase()),!G)h9.throwErr(h9.ERR_TNS_ENTRY_NOT_FOUND,X,Y?Y+"/tnsnames.ora":zi6.env.TNS_ADMIN+"/tnsnames.ora");if(G.rhsType==1){let W=G.atom;if(W.indexOf(":")!=-1||W.indexOf("/")!=-1)return new xN1(W).getResolvedUrl()}G=G.getListElement(0)}return G}async function gV0($,Y){let X=await bN1($,Y.configDir);return yN1(X,Y)}function fV0($,Y,X,G,J){let Q,W=new Promise((K,Z)=>{if(Y>2147483647)Y=2147483647;Q=setTimeout(()=>Z(h9.getErr(h9.ERR_CONNECTION_TIMEDOUT,G.host,G.port,X,Y/1000,J)),Y)});return Promise.race([$,W]).then((K)=>{return clearTimeout(Q),K}).catch((K)=>{throw clearTimeout(Q),K})}class hN1{constructor(){this.connected=!1,this.isBreak=!1,this.isReset=!1,this.breakPosted=!1,this.compressionEnabled=!1}async getAddress($,Y){let X=await $.execute(Y),G=this.sAtts?this.sAtts.uuid:null;this.sAtts=new Ki6(G),this.sAtts.setFrom(Y),this.sAtts.setFrom(X.desc.params),await this.sAtts.prepare(X.protocol,Y);let J=Vs(X.CNdata.join("")),Q=Zi6(J,"CONNECT_DATA"),W=`(CONNECTION_ID=${this.sAtts.connectionId})`,K=Vs(W);return Q.addListElement(K),this.cData=zs.from(J.toString(),"ascii"),this.cDataNVPair=J,this.sAtts.nt.cDataNVPair=J,X}async transportConnect($){if($.protocol.toUpperCase()=="TCP"&&$.httpsProxy)h9.throwErr(h9.ERR_INVALID_CONNECT_STRING_PARAMETERS,"https proxy requires protocol as","tcps ");if($.protocol&&($.protocol.toUpperCase()=="TCP"||$.protocol.toUpperCase()=="TCPS"))this.ntAdapter=new Wi6(this.sAtts.nt);else h9.throwErr(h9.ERR_INVALID_CONNECT_STRING_PARAMETERS,$.protocol+" protocol not supported");await this.ntAdapter.connect($),this.ntAdapter.startRead(),this.sAtts.ntCha=this.ntAdapter.cha,this.sndDatapkt=new dK.DataPacket(this.sAtts.largeSDU),this.rcvDatapkt=new dK.DataPacket(this.sAtts.largeSDU)}_sendConnect($){if(this.sendPacket($.buf),$.overflow)this._send($.connectData,0,$.connectDataLen),this.flush()}async connect2($,Y){if(this.sAtts.sdu){if(this.sAtts.sdu>z4.NSPABSSDULN)this.sAtts.sdu=z4.NSPABSSDULN;else if(this.sAtts.sdu<z4.NSPMNSDULN)this.sAtts.sdu=z4.NSPMNSDULN}else this.sAtts.sdu=z4.NSPDFSDULN;if(this.sAtts.transportConnectTimeout){let G=this.transportConnect($);await fV0(G,this.sAtts.transportConnectTimeout,"transportConnectTimeout",$,this.sAtts.connectionId)}else await this.transportConnect($);let X=new dK.ConnectPacket(this.cData,this.sAtts);this._sendConnect(X);while(!0){let G=await this._recvPacket();if(G.type===z4.NSPTAC)break;if(G.type===z4.NSPTRF){if(this.refusePkt.overflow)await this._recvPacket(),this.refusePkt.dataBuf=this.rcvDatapkt.buf.subarray(this.rcvDatapkt.offset,this.rcvDatapkt.len).toString();let J=Vs(this.refusePkt.dataBuf);this.refusePkt=null;let Q=cK(J,["DESCRIPTION","ERR"]);if(Q=="12514")h9.throwErr(h9.ERR_INVALID_SERVICE_NAME,this.getOption(z4.SVCNAME),$.host,$.port,this.sAtts.connectionId);else if(Q=="12505")h9.throwErr(h9.ERR_INVALID_SID,this.getOption(z4.SID),$.host,$.port,this.sAtts.connectionId);else if(Q)h9.throwErr(h9.ERR_CONNECTION_REFUSED,$.host,$.port,this.sAtts.connectionId,"ORA-"+Q);else h9.throwErr(h9.ERR_CONNECTION_REFUSED,$.host,$.port,this.sAtts.connectionId,"refused")}else if(G.type===z4.NSPTRS){if((G.flags&z4.NSPFSRN)==z4.NSPFSRN)await this.ntAdapter.renegTLS(),this.ntAdapter.startRead();this._sendConnect(X)}else if(G.type===z4.NSPTRD){let J,Q,W;if(this.redirectPkt.overflow)await this._recvPacket(),this.redirectPkt.dataBuf=this.rcvDatapkt.buf.subarray(this.rcvDatapkt.offset,this.rcvDatapkt.len);if(this.redirectPkt.flags&z4.NSPFRDS)J=this.redirectPkt.dataBuf.indexOf("\x00",0,"ascii"),Q=this.redirectPkt.dataBuf.toString("ascii",0,J),W=this.redirectPkt.dataBuf.subarray(J+1,this.redirectPkt.dataLen);else Q=this.redirectPkt.dataBuf.toString("ascii"),W=this.cData;let K=await gV0(Q,Y),Z=$.hostname;if($=await K.execute(),$.desc)this.sAtts.setFrom($.desc.params);if($.originHost=Z,this.redirectPkt=null,this.ntAdapter.disconnect(z4.NSFIMM),this.sAtts.transportConnectTimeout){let H=this.transportConnect($);await fV0(H,this.sAtts.transportConnectTimeout,"transportConnectTimeout",$,this.sAtts.connectionId)}else await this.transportConnect($);X=new dK.ConnectPacket(W,this.sAtts,z4.NSPFRDR),this.sndDatapkt=new dK.DataPacket(this.sAtts.largeSDU),this._sendConnect(X)}}if(this.cData=null,this.sndDatapkt=new dK.DataPacket(this.sAtts.largeSDU),this.markerPkt=new dK.MarkerPacket(this.sAtts.largeSDU),this.controlPkt=new dK.ControlPacket,this.ntAdapter.largeSDU=this.sAtts.largeSDU,this.sAtts.clearWallet(),this.sAtts.nt.walletPassword=null,!this.sAtts.noNA){let G=new Fi6(this.sAtts),J=G.sendPacket();this._send(J,0,J.length),this.flush();let Q=await this._recvPacket();G.processPacket(Q.buf)}return this.sndDatapkt.createPacket(z4.NSPDADAT),this.sndDatapkt.offset=this.sndDatapkt.dataPtr,this.sndDatapkt.len=this.sndDatapkt.bufLen,this.connected=!0,!0}async connect1($,Y,X){let G,J;do try{if(this.sAtts.connectTimeout){let Q=this.connect2($,X);G=await fV0(Q,this.sAtts.connectTimeout,"connectTimeout",$,this.sAtts.connectionId)}else G=await this.connect2($,X)}catch(Q){if(Q.message.startsWith("NJS-510")&&!this.ntAdapter.connected)Vi6.markDownHost($.host,Date.now()),this.ntAdapter.connected=!0;if(this.ntAdapter)this.ntAdapter.disconnect(z4.NSFIMM),this.ntAdapter=null;this.sAtts.clearWallet(),G=!1,J=Q;try{$=await this.getAddress(Y,X)}catch(W){break}}while(!G);if(G)return;else throw J}_processPacket($){switch($.type){case z4.NSPTDA:{let Y=$.buf.length;if(($.buf.readUInt16BE(z4.NSPDAFLG)&z4.NSPDAFCMP)!=0){let G=$.buf.subarray(0,z4.NSPDADAT),J=$.buf.subarray(z4.NSPDADAT,Y),Q;try{if(this.sAtts.firstRecvCompressedPacket)Q=dF.inflateSync(J,{finishFlush:dF.constants.Z_SYNC_FLUSH}),this.sAtts.firstRecvCompressedPacket=0;else Q=dF.inflateRawSync(J,{finishFlush:dF.constants.Z_SYNC_FLUSH})}catch(Z){h9.throwErr(h9.ERR_DATA_COMPRESSION,Z.message)}let W=Q.length;$.buf=zs.concat([G,Q]);let K=W+z4.NSPDADAT;if(this.sAtts.largeSDU)$.buf.writeUInt32BE(K,z4.NSPHDLEN);else $.buf.writeUInt16BE(K,z4.NSPHDLEN)}this.rcvDatapkt.fromPacket($);break}case z4.NSPTMK:this.markerPkt.fromPacket($,this);break;case z4.NSPTCNL:this.controlPkt.fromPacket($);break;case z4.NSPTAC:if(dK.AcceptPacket($,this.sAtts),this.sAtts.version>=z4.TNS_VERSION_MIN_END_OF_RESPONSE&&$.flags&z4.TNS_ACCEPT_FLAG_HAS_END_OF_REQUEST)this.endOfRequestSupport=!0;if($.flags&z4.TNS_ACCEPT_FLAG_FAST_AUTH)this.supportsFastAuth=!0;break;case z4.NSPTRF:this.refusePkt=new dK.RefusePacket($);break;case z4.NSPTRS:break;case z4.NSPTRD:this.redirectPkt=new dK.RedirectPacket($);break;default:h9.throwErr(h9.ERR_CONNECTION_INVALID_PACKET)}}async _recvPacket(){while(!0){let $=await this.ntAdapter.receive();if(!$)break;if(this._processPacket($),$.type!==z4.NSPTCNL)return $}}sendPacket($){if($.readUInt8(z4.NSPHDTYP)==z4.NSPTDA){let X=$.length,G=$.readUInt16BE(z4.NSPDAFLG);if(this.sAtts.networkCompressionEnabled&&X>this.sAtts.networkCompressionThreshold){this.compressionEnabled=!0;let J=$.subarray(z4.NSPDADAT,X),Q=$.subarray(0,z4.NSPDADAT),W;try{if(this.sAtts.firstSendCompressedPacket)W=dF.deflateSync(J,{finishFlush:dF.constants.Z_SYNC_FLUSH}),this.sAtts.firstSendCompressedPacket=0;else W=dF.deflateRawSync(J,{finishFlush:dF.constants.Z_SYNC_FLUSH})}catch(Z){h9.throwErr(h9.ERR_DATA_COMPRESSION,Z.message)}let K=W.length;if(K<X-z4.NSPDADAT){G|=z4.NSPDAFCMP,$=zs.concat([Q,W]),$.writeUInt16BE(G,z4.NSPDAFLG);let Z=K+z4.NSPDADAT;if(this.sAtts.largeSDU)$.writeUInt32BE(Z,z4.NSPHDLEN);else $.writeUInt16BE(Z,z4.NSPHDLEN)}}}this.ntAdapter.send($)}sendBreak(){if(this.isBreak)return;if(!this.connected){this.isBreak=!0,this.breakPosted=!0;return}this.isBreak=!0,this.markerPkt.prepare(z4.NSPMKTD1,z4.NIQIMARK),this.sendPacket(this.markerPkt.buf)}async reset(){if(this.breakPosted)this.markerPkt.prepare(z4.NSPMKTD1,z4.NIQBMARK),this.sendPacket(this.markerPkt.buf),this.breakPosted=!1;this.markerPkt.prepare(z4.NSPMKTD1,z4.NIQRMARK),this.sendPacket(this.markerPkt.buf);while(!this.isReset)await this._recvPacket();this.sndDatapkt.dataPtr=this.sndDatapkt.dataLen=z4.NSPDADAT,this.sndDatapkt.offset=this.sndDatapkt.dataPtr,this.sndDatapkt.len=this.sndDatapkt.bufLen,this.isBreak=this.isReset=!1}async recvPacket(){return await this._recvPacket()}syncRecvPacket(){while(this.ntAdapter.packets.length>0){let $=this.ntAdapter.syncReceive();if(!$)break;if(this._processPacket($),$.type!==z4.NSPTCNL)return $}}_send($,Y,X){if(this.isBreak)return;let G=0;if(this.sndDatapkt.dataLen=this.sndDatapkt.offset,this.sndDatapkt.dataLen<this.sndDatapkt.bufLen||!this.sndDatapkt.bufLen)G=this.sndDatapkt.fillBuf($,Y,X),X-=G,Y+=G,this.sndDatapkt.offset=this.sndDatapkt.dataLen;while(X){if(this.sendPacket(this.sndDatapkt.dataBuf),this.isBreak)return;this.sndDatapkt.dataLen=this.sndDatapkt.dataPtr,this.sndDatapkt.offset=this.sndDatapkt.dataPtr,G=this.sndDatapkt.fillBuf($,Y,X),X-=G,Y+=G,this.sndDatapkt.offset=this.sndDatapkt.dataLen}}flush(){if(this.isBreak)return;this.sndDatapkt.dataLen=this.sndDatapkt.offset,this.sndDatapkt.prepare2Send(),this.sendPacket(zs.from(this.sndDatapkt.dataBuf)),this.sndDatapkt.dataLen=this.sndDatapkt.dataPtr,this.sndDatapkt.offset=this.sndDatapkt.dataPtr}async connect($){let Y=$.connectString?$.connectString:$.connectionString,X;if($._connInfo)X=$._connInfo[5],X.reset();else X=await gV0(Y,$);let G;try{G=await this.getAddress(X,$)}catch(J){if(J.message=="All options tried")h9.throwErr(h9.ERR_HOST_NOT_FOUND);else h9.throwErr(h9.ERR_INVALID_CONNECT_STRING_PARAMETERS,J.message)}await this.connect1(G,X,$)}forceDisconnect($){if(!this.connected)return;this.ntAdapter.stream.destroy($),this.connected=!1}disconnect($){if(!this.connected)return;if($!=z4.NSFIMM&&!this.ntAdapter.err)this.sndDatapkt.dataLen=this.sndDatapkt.offset,this.sndDatapkt.prepare2Send(z4.NSPDAFEOF),this.sendPacket(this.sndDatapkt.dataBuf);this.ntAdapter.disconnect($),this.ntAdapter=null,this.connected=!1}getOption($){switch($){case z4.NS_MOREDATA:return this.ntAdapter.packets.length>0;case z4.SVCNAME:return cK(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","SERVICE_NAME"]);case z4.SID:return cK(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","SID"]);case z4.SERVERTYPE:return cK(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","SERVER"]);case z4.REMOTEADDR:if(this.ntAdapter)return this.ntAdapter.getOption($);else return null;case z4.CONNCLASS:return cK(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","POOL_CONNECTION_CLASS"]);case z4.PURITY:return cK(this.cDataNVPair,["DESCRIPTION","CONNECT_DATA","POOL_PURITY"]);case z4.HEALTHCHECK:return this.connected&&this.ntAdapter.connected&&!this.ntAdapter.err;default:h9.throwErr(h9.ERR_INTERNAL,"getOption not supported for opcode "+$)}}recvInbandNotif(){let $=0;if(this.controlPkt.errno)return $=this.controlPkt.errno,$;else if(!this.getOption(z4.HEALTHCHECK))return h9.ERR_CONNECTION_CLOSED;else if(this.getOption(z4.NS_MOREDATA)){let Y=this.ntAdapter.syncReceive();if(Y.type==z4.NSPTCNL)return this.controlPkt.fromPacket(Y),$=this.controlPkt.errno,$;else return this.ntAdapter.packets.unshift(Y),0}else return 0}}fN1.exports={NetworkSession:hN1,resolveAddress:gV0,getConnectionInfo:Li6}});var dV0=o((Bi6,pV0)=>{var{Buffer:Ni6}=A0("buffer"),cX=SY(),gN1=O4(),Ai6=E9();class Fs{constructor($,Y=!1){this.bindName=$,this.isReturnBind=Y,this.maxSize=0,this.numElements=0,this.maxArraySize=0,this.type=null,this.isArray=!1,this.dir=cX.BIND_IN,this.bindVar=null}}Bi6.BindInfo=Fs;class mN1{constructor(){this.returningKeywordFound=!1,this.pos=0,this.maxPos=0,this.sqlData=""}_parseBindName($){let Y=!1,X=!1,G=!1,J=0,Q=this.pos+1,W,K;while(Q<=this.maxPos){if(K=this.sqlData[Q],!X){if(/\p{space}/u.test(K)){Q+=1;continue}else if(K==='"')Y=!0;else if(/\p{N}/u.test(K))G=!0;else if(!/\p{Alpha}/u.test(K))break;X=!0,J=Q}else if(G&&!/\p{N}/u.test(K)){this.pos=Q-1;break}else if(Y&&K==='"'){this.pos=Q;break}else if(!G&&!Y&&!/[\p{L}\p{N}]/u.test(K)&&!["$","_","#"].includes(K)){this.pos=Q-1;break}Q+=1}if(X){if(Y)W=$.sql.substring(J+1,Q);else if(G)W=$.sql.substring(J,Q);else W=$.sql.substring(J,Q).toUpperCase();$._addBind(W)}}_parseMultiLineComment(){let $=!1,Y=!1,X=this.pos+1,G;while(X<=this.maxPos){if(G=this.sqlData[X],!$){if(G!=="*")break;$=!0}else if(G==="*")Y=!0;else if(Y){if(G==="/"){this.pos=X;break}Y=!1}X+=1}}_parseQstring(){let $=!1,Y=!1,X,G;this.pos+=1;while(this.pos<=this.maxPos){if(G=this.sqlData[this.pos],!Y){if(G==="[")X="]";else if(G==="{")X="}";else if(G==="(")X=")";else if(G==="<")X=">";else X=G;Y=!0}else if(!$&&G===X)$=!0;else if($){if(G==="'")break;else if(G!==X)$=!1}this.pos+=1}}_parseQuotedString($){let Y;this.pos+=1;while(this.pos<=this.maxPos){if(Y=this.sqlData[this.pos],Y===$)break;this.pos+=1}}_parseSingleLineComment(){let $=!1,Y=this.pos+1,X;while(Y<=this.maxPos){if(X=this.sqlData[Y],!$){if(X!=="-")return;$=!0}else if(X===`
`)break;Y+=1}this.pos=Y}parse($){let Y=!1,X=!1,G,J="",Q="",W=0,K,Z,H=!1,z;this.pos=0,this.maxPos=$.sql.length-1,this.sqlData=$.sql;while(this.pos<=this.maxPos){if(G=this.sqlData[this.pos],Z=/\p{L}/u.test(G),Z&&!H)W=this.pos,Q=G;else if(!Z&&H){if(K=this.pos-W,!Y){if(z=$.sql.substring(W,this.pos).toUpperCase(),$._determineStatementType(z),Y=!0,$.isDdl)break}else if($.isDml&&!this.returningKeywordFound&&(K===9||K===6)&&["r","R"].includes(Q)){if(z=$.sql.substring(W,this.pos).toUpperCase(),["RETURNING","RETURN"].includes(z))this.returningKeywordFound=!0}else if(this.returningKeywordFound&&K===4&&["i","I"].includes(Q)){if(z=$.sql.substring(W,this.pos).toUpperCase(),z==="INTO")$.isReturning=!0}}if(G==="'")if(X=!0,["q","Q"].includes(J))this._parseQstring();else this._parseQuotedString(G);else if(!/\p{space}/u.test(G)){if(G==="-")this._parseSingleLineComment();else if(G==="/")this._parseMultiLineComment();else if(G==='"')this._parseQuotedString(G);else if(G===":"&&!X)this._parseBindName($);X=!1}this.pos+=1,H=Z,J=G}if(!Y)$._determineStatementType($.sql.toUpperCase())}}class uV0{constructor(){this.sql="",this.sqlBytes=[],this.sqlLength=0,this.cursorId=0,this.requiresDefine=!1,this.isQuery=!1,this.isPlSql=!1,this.isDml=!1,this.isDdl=!1,this.isReturning=!1,this.bindInfoList=[],this.queryVars=[],this.bindInfoDict=new Map,this.requiresFullExecute=!1,this.noPrefetch=!1,this.returnToCache=!1,this.numColumns=0,this.lastRowIndex,this.lastRowid,this.moreRowsToFetch=!0,this.inUse=!1,this.bufferRowIndex=0,this.bufferRowCount=0,this.pendingClear=!1,this.statementType=cX.STMT_TYPE_UNKNOWN}_copy(){let $=new uV0;$.sql=this.sql,$.sqlBytes=this.sqlBytes,$.sqlLength=this.sqlLength,$.isQuery=this.isQuery,$.isPlSql=this.isPlSql,$.isDml=this.isDml,$.isDdl=this.isDdl,$.isReturning=this.isReturning,$.bindInfoList=[];for(let X of this.bindInfoList){let G=new Fs(X.bindName,X.isReturnBind);$.bindInfoList.push(G)}let Y=$.bindInfoDict=new Map;for(let X of $.bindInfoList)if(Y.has(X.bindName))Y.get(X.bindName).push(X);else Y.set(X.bindName,[X]);return $.returnToCache=!1,$}_determineStatementType($){switch($){case"DECLARE":this.isPlSql=!0,this.statementType=cX.STMT_TYPE_DECLARE;break;case"CALL":this.isPlSql=!0,this.statementType=cX.STMT_TYPE_CALL;break;case"BEGIN":this.isPlSql=!0,this.statementType=cX.STMT_TYPE_BEGIN;break;case"SELECT":this.isQuery=!0,this.statementType=cX.STMT_TYPE_SELECT;break;case"WITH":this.isQuery=!0;break;case"INSERT":this.isDml=!0,this.statementType=cX.STMT_TYPE_INSERT;break;case"UPDATE":this.isDml=!0,this.statementType=cX.STMT_TYPE_UPDATE;break;case"DELETE":this.isDml=!0,this.statementType=cX.STMT_TYPE_DELETE;break;case"MERGE":this.isDml=!0,this.statementType=cX.STMT_TYPE_MERGE;break;case"ALTER":this.isDdl=!0,this.statementType=cX.STMT_TYPE_ALTER;break;case"CREATE":this.isDdl=!0,this.statementType=cX.STMT_TYPE_CREATE;break;case"DROP":this.isDdl=!0,this.statementType=cX.STMT_TYPE_DROP;break;case"ANALYZE":case"AUDIT":case"COMMENT":case"GRANT":case"REVOKE":case"TRUNCATE":this.isDdl=!0;break;case"COMMIT":this.statementType=cX.STMT_TYPE_COMMIT;break;case"ROLLBACK":this.statementType=cX.STMT_TYPE_ROLLBACK;break;default:this.statementType=cX.STMT_TYPE_UNKNOWN;break}}_prepare($){this.sql=$,this.sqlBytes=Ni6.from(this.sql,"utf8"),this.sqlLength=this.sqlBytes.length,new mN1().parse(this)}_addBind($){if(!this.isPlSql||!this.bindInfoDict.has($)){let Y=new Fs($,this.isReturning);if(this.bindInfoList.push(Y),this.bindInfoDict.has(Y.bindName)){if(this.isReturning){if(!this.bindInfoDict.get(Y.bindName)[0].isReturnBind)gN1.throwErr(gN1.ERR_DML_RETURNING_DUP_BINDS,$)}this.bindInfoDict.get(Y.bindName).push(Y)}else this.bindInfoDict.set(Y.bindName,[Y])}}_setVariable($,Y){if(Y.type._oraTypeNum===Ai6.TNS_DATA_TYPE_CURSOR)this.requiresFullExecute=!0;if(Y.maxSize!==$.maxSize||Y.dir!==$.dir||Y.isArray!==$.isArray||Y.values.length>$.numElements||Y.type!=$.type||Y.maxArraySize!=$.maxArraySize)$.isArray=Y.isArray,$.numElements=Y.values.length,$.maxSize=Y.maxSize,$.type=Y.type,$.dir=Y.dir,$.maxArraySize=Y.maxArraySize,this.requiresFullExecute=!0;$.bindVar=Y}_clearAllState(){this.cursorId=0,this.requiresDefine=!1,this.noPrefetch=!1,this.requiresFullExecute=!1,this.queryVars=[],this.numQueryVars=0,this.bufferRowCount=0,this.bufferRowIndex=0}_clearState(){this.cursorId=0,this.requiresDefine=!1,this.noPrefetch=!1,this.requiresFullExecute=!1}}Bi6.Statement=uV0});var dN1=o((Uq5,pN1)=>{var{Buffer:f9}=A0("buffer"),lK=A0("crypto"),Ls="aes-256-cbc",Mi6=f9.from([0,1]);class uN1{decrypt($,Y){let X=f9.alloc(16,0),G=lK.createDecipheriv(Ls,$,X);G.setAutoPadding(!1);let J=G.update(Y);return J=f9.concat([J,G.final()]),J}_encrypt($,Y,X){let J=f9.alloc(16,0),Q=16-Y.length%16,W=f9.alloc(Q,Q);if(Q>0)if(X)Y+=f9.alloc(Q);else Y=f9.concat([Y,W]);let K=lK.createCipheriv(Ls,$,J),Z=K.update(Y);if(Z=f9.concat([Z,K.final()]),!X)Z=Z.slice(0,Y.length);return Y.fill(0),Z}_setEncryptedPasswordBuffers($,Y,X,G){let J=f9.alloc(16);lK.randomFillSync(J,0,16);let Q=f9.concat([J,$]);if(G.encodedPassword=this._encrypt(X,Q),Q.fill(0),G.encodedPassword=G.encodedPassword.slice().toString("hex").toUpperCase(),Y){let W=f9.concat([J,Y]);G.encodedNewPassword=this._encrypt(X,W),W.fill(0),G.encodedNewPassword=G.encodedNewPassword.slice().toString("hex").toUpperCase()}if($.fill(0),Y)Y.fill(0)}updateVerifierData($,Y,X,G,J){let Q=32,W="sha512",K=f9.from($.AUTH_VFR_DATA,"hex"),Z=f9.from($.AUTH_SESSKEY,"hex"),H=Number($.AUTH_PBKDF2_VGEN_COUNT),z=f9.from(Y,"utf8"),V,F;if(G){Ls="aes-192-cbc",Q=24,W="sha1";let O=lK.createHash(W);O.update(z),O.update(K);let E=O.digest();V=f9.alloc(E.length+4),E.copy(V,0,0,E.length)}else{Ls="aes-256-cbc";let O=f9.from("AUTH_PBKDF2_SPEEDY_KEY","utf8"),E=f9.concat([K,O]);F=lK.pbkdf2Sync(z,E,H,64,"sha512");let M=lK.createHash(W);M.update(F),M.update(K),V=M.digest().slice(0,Q)}let L;if(X)L=f9.from(X,"utf8");let N=this.decrypt(V,Z),D=f9.alloc(N.length);lK.randomFillSync(D);let A=this._encrypt(V,D);if(N.length===48){J.sessionKey=A.slice().toString("hex").toUpperCase().slice(0,96);let O=f9.alloc(24);for(let R=16;R<=40;R++)O[R-16]=N[R]^D[R];let E=lK.createHash("md5").update(O.subarray(0,16)).digest(),M=lK.createHash("md5").update(O.subarray(16)).digest();J.comboKey=f9.concat([E,M]).slice(0,Q)}else{J.sessionKey=A.slice().toString("hex").toUpperCase().slice(0,64);let O=f9.from($.AUTH_PBKDF2_CSK_SALT,"hex");H=Number($.AUTH_PBKDF2_SDER_COUNT);let M=f9.concat([D.slice(0,Q),N.slice(0,Q)]).toString("hex").toUpperCase(),R=f9.from(M,"utf8");J.comboKey=lK.pbkdf2Sync(R,O,H,Q,"sha512")}let B=f9.alloc(16);if(!G){lK.randomFillSync(B,0,16);let O=f9.concat([B,F]);J.speedyKey=this._encrypt(J.comboKey,O),J.speedyKey=J.speedyKey.slice(0,80).toString("hex").toUpperCase()}this._setEncryptedPasswordBuffers(z,L,J.comboKey,J)}getEncryptedJSWPData($,Y){let X=this._encrypt($,Y,!0);return X=X.slice().toString("hex").toUpperCase(),X=f9.concat([X,Mi6]),X}updatePasswordsWithComboKey($,Y,X,G){let J=f9.from($,"utf8"),Q;if(Y)Q=f9.from(Y,"utf8");this._setEncryptedPasswordBuffers(J,Q,X,G)}}var Ri6=new uN1;pN1.exports=Ri6});var iN1=o((Hq5,lN1)=>{var{Buffer:vx}=A0("buffer"),t8=E9(),Ds=O4(),Ns=A0("process"),As=dN1(),qi6=CG(),cV0=Cx(),J3=cV0.CLIENT_INFO,Pi6=A0("crypto");class cN1 extends qi6{constructor($,Y){super($);if(this.functionCode=t8.TNS_FUNC_AUTH_PHASE_ONE,this.messageType=t8.TNS_MSG_TYPE_FUNCTION,this.sessionData={},this.conn=$,this.sessionKey="",this.encodedPassword="",this.changePassword=!1,Object.defineProperty(this,"password",{enumerable:!1,value:Y.password}),this.username=Y.user,this.username===void 0)this.username="";else this.username=this.username.trim();if(this.schemaUser="",this.proxyUser="",this.proxyStatus=-1,this.username.length!==0){if(this.proxyStatusObj=cV0.checkProxyUserValidity(this.username),this.proxyStatusObj.status===0)this.proxyStatus=0,this.proxyUser=this.proxyStatusObj.proxyUser,this.schemaUser=this.proxyStatusObj.schemaUser,this.username=this.proxyUser}if(this.newPassword=Y.newPassword,Y.changePassword)this.changePassword=!0,this.functionCode=t8.TNS_FUNC_AUTH_PHASE_TWO;if(this.username)this.userByteLen=vx.byteLength(this.username);else this.userByteLen=0;if(this.token=Y.token,Y.externalAuth)this.functionCode=t8.TNS_FUNC_AUTH_PHASE_TWO,this.externalAuth=!0;if(this.privateKey=Y.privateKey,this.privateKey)this.privateKey=cV0.normalizePrivateKey(this.privateKey);if(this.serviceName=this.conn.serviceName,this.remoteAddress=this.conn.remoteAddress,this.driverName=Y.driverName,this.machine=Y.machine,this.osUser=Y.osUser,this.program=Y.program,this.terminal=Y.terminal,Y.edition)this.edition=Y.edition;else if(Ns.env.ORA_EDITION)this.edition=Ns.env.ORA_EDITION;this.appContext=Y.appContext,this.setAuthMode(Y)}setAuthMode($){if(!this.newPassword)this.authMode=t8.TNS_AUTH_MODE_LOGON;if($.privilege&t8.SYSDBA)this.authMode|=t8.TNS_AUTH_MODE_SYSDBA;if($.privilege&t8.SYSOPER)this.authMode|=t8.TNS_AUTH_MODE_SYSOPER;if($.privilege&t8.SYSASM)this.authMode|=t8.TNS_AUTH_MODE_SYSASM;if($.privilege&t8.SYSBKP)this.authMode|=t8.TNS_AUTH_MODE_SYSBKP;if($.privilege&t8.SYSDG)this.authMode|=t8.TNS_AUTH_MODE_SYSDGD;if($.privilege&t8.SYSKM)this.authMode|=t8.TNS_AUTH_MODE_SYSKMT;if($.privilege&t8.SYSRAC)this.authMode|=t8.TNS_AUTH_MODE_SYSRAC;if(this.privateKey)this.authMode|=t8.TNS_AUTH_MODE_IAM_TOKEN;if(this.newPassword)this.authMode|=t8.TNS_AUTH_MODE_CHANGE_PASSWORD;if(!$.externalAuth)this.authMode|=t8.TNS_AUTH_MODE_WITH_PASSWORD}getAlterTimezoneStatement(){let $,Y;if(Ns.env.ORA_SDTZ)Y=Ns.env.ORA_SDTZ;else{let G=new Date().getTimezoneOffset(),J=Math.trunc(G/60),Q=Math.abs((G-J*60)%60);if(J<0)$="+",J=-J;else $="-";J=J.toLocaleString("en-US",{minimumIntegerDigits:2}),Y=`${$}${J}:${Q}`}return`ALTER SESSION SET TIME_ZONE ='${Y}'\x00`}encode($){let Y=!1;if(this.writeFunctionHeader($),this.userByteLen>0)$.writeUInt8(1);else $.writeUInt8(0);if($.writeUB4(this.userByteLen),$.writeUB4(this.authMode),this.functionCode===t8.TNS_FUNC_AUTH_PHASE_ONE){if($.writeUInt8(1),$.writeUB4(5),$.writeUInt8(0),$.writeUInt8(1),this.userByteLen>0)$.writeBytesWithLength(vx.from(this.username));$.writeKeyValue("AUTH_TERMINAL",this.terminal??J3.terminal),$.writeKeyValue("AUTH_PROGRAM_NM",this.program??J3.program),$.writeKeyValue("AUTH_MACHINE",this.machine??J3.hostName),$.writeKeyValue("AUTH_PID",J3.pid),$.writeKeyValue("AUTH_SID",this.osUser??J3.userName)}else{let X=0;if(this.changePassword)As.updatePasswordsWithComboKey(this.password,this.newPassword,this.conn.comboKey,this),X=2;else{if(X=4,this.externalAuth){if(X+=5,this.token)X+=1}else{if(X+=2,this.verifierType===t8.TNS_VERIFIER_TYPE_11G_1||this.verifierType===t8.TNS_VERIFIER_TYPE_11G_2)Y=!0;else if(this.verifierType!==t8.TNS_VERIFIER_TYPE_12C)Ds.throwErr(Ds.ERR_UNSUPPORTED_VERIFIER_TYPE,this.verifierType.toString(16));else X+=1;if(As.updateVerifierData(this.sessionData,this.password,this.newPassword,Y,this),this.conn.comboKey=this.comboKey,this.newPassword)X+=1}if(this.privateKey)X+=2;if(this.conn.connectionClass)X+=1;if(this.conn.purity)X+=1;if(this.conn.jdwpData)this.encryptedJDWPData=As.getEncryptedJSWPData(this.sessionKey,this.conn.jdwpData),X+=1;if(this.edition)X+=1;if(this.appContext)X+=this.appContext.length*3;if(this.schemaUser.length!==0)X+=1}if($.writeUInt8(1),$.writeUB4(X),$.writeUInt8(1),$.writeUInt8(1),this.userByteLen>0)$.writeBytesWithLength(vx.from(this.username));if(this.externalAuth)$.writeKeyValue("AUTH_TERMINAL",this.terminal??J3.terminal),$.writeKeyValue("AUTH_PROGRAM_NM",this.program??J3.program),$.writeKeyValue("AUTH_MACHINE",this.machine??J3.hostName),$.writeKeyValue("AUTH_PID",J3.pid),$.writeKeyValue("AUTH_SID",this.osUser??J3.userName);if(this.token)$.writeKeyValue("AUTH_TOKEN",this.token);else if(!this.changePassword&&!this.externalAuth){if($.writeKeyValue("AUTH_SESSKEY",this.sessionKey,1),!Y)$.writeKeyValue("AUTH_PBKDF2_SPEEDY_KEY",this.speedyKey)}if(!this.changePassword)$.writeKeyValue("SESSION_CLIENT_CHARSET","873"),$.writeKeyValue("SESSION_CLIENT_DRIVER_NAME",this.driverName??t8.DRIVER_NAME),$.writeKeyValue("SESSION_CLIENT_VERSION",t8.CLIENT_VERSION.toString()),$.writeKeyValue("AUTH_ALTER_SESSION",this.getAlterTimezoneStatement(),1);if(this.encodedPassword)$.writeKeyValue("AUTH_PASSWORD",this.encodedPassword);if(this.proxyStatus===0)$.writeKeyValue("PROXY_CLIENT_NAME",this.schemaUser);if(this.encodedNewPassword)$.writeKeyValue("AUTH_NEWPASSWORD",this.encodedNewPassword);if(this.conn.connectionClass)$.writeKeyValue("AUTH_KPPL_CONN_CLASS",this.conn.connectionClass);if(this.conn.purity)$.writeKeyValue("AUTH_KPPL_PURITY",""+this.conn.purity);if(this.privateKey){let Q="date: "+new Date().toGMTString()+`
(request-target): `+this.serviceName+`
host: `+this.remoteAddress,W=Pi6.createSign("RSA-SHA256").update(Q).sign(this.privateKey,"base64");$.writeKeyValue("AUTH_HEADER",Q),$.writeKeyValue("AUTH_SIGNATURE",W)}if(this.conn.jdwpData)$.writeKeyValue("AUTH_ORA_DEBUG_JDWP",this.encryptedJDWPData);if(this.edition)$.writeKeyValue("AUTH_ORA_EDITION",this.edition);if(this.appContext)for(let G of this.appContext)$.writeKeyValue("AUTH_APPCTX_NSPACE\x00",G[0]),$.writeKeyValue("AUTH_APPCTX_ATTR\x00",G[1]),$.writeKeyValue("AUTH_APPCTX_VALUE\x00",G[2])}}processReturnParameter($){let Y=$.readUB2();for(let X=0;X<Y;X++){$.skipUB4();let G=$.readStr(t8.CSFRM_IMPLICIT),J="";if($.readUB4()>0)J=$.readStr(t8.CSFRM_IMPLICIT);let W=$.readUB4();if(G==="AUTH_VFR_DATA")this.verifierType=W;this.sessionData[G]=J}if(this.functionCode===t8.TNS_FUNC_AUTH_PHASE_ONE)this.functionCode=t8.TNS_FUNC_AUTH_PHASE_TWO;else if(!this.changePassword&&this.comboKey){let X=this.sessionData.AUTH_SVR_RESPONSE,G;if(X){let J=vx.from(X,"hex");G=As.decrypt(this.comboKey,J)}if(!G||!G.subarray(16,32).equals(vx.from("SERVER_TO_CLIENT")))Ds.throwErr(Ds.ERR_INVALID_SERVER_RESPONSE)}}}lN1.exports=cN1});var aN1=o((zq5,rN1)=>{var wi6=CG(),_i6=E9();class nN1 extends wi6{constructor($){super($);this.functionCode=_i6.TNS_FUNC_COMMIT}encode($){this.writeFunctionHeader($)}}rN1.exports=nN1});var tN1=o((Vq5,oN1)=>{var c=E9(),ji6=CG();class sN1 extends ji6{processMessage($,Y){if(Y===c.TNS_MSG_TYPE_DATA_TYPES){while(!0){if($.readUInt16BE()===0)break;if($.readUInt16BE()!==0)$.skipBytes(4)}this.endOfResponse=!this.connection.nscon.endOfRequestSupport}else super.processMessage($,Y)}encode($){$.writeUInt8(c.TNS_MSG_TYPE_DATA_TYPES),$.writeUInt16LE(c.TNS_CHARSET_UTF8),$.writeUInt16LE(c.TNS_CHARSET_UTF8),$.writeUInt8(c.TNS_ENCODING_MULTI_BYTE|c.TNS_ENCODING_CONV_LENGTH),$.writeBytesWithLength($.caps.compileCaps),$.writeBytesWithLength($.caps.runtimeCaps);for(let Y of Ti6)$.writeUInt16BE(Y[0]),$.writeUInt16BE(Y[1]),$.writeUInt16BE(Y[2]),$.writeUInt16BE(0);$.writeUInt16BE(0)}}var Ti6=[[c.TNS_DATA_TYPE_VARCHAR,c.TNS_DATA_TYPE_VARCHAR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_NUMBER,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_LONG,c.TNS_DATA_TYPE_LONG,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DATE,c.TNS_DATA_TYPE_DATE,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_RAW,c.TNS_DATA_TYPE_RAW,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_LONG_RAW,c.TNS_DATA_TYPE_LONG_RAW,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UB2,c.TNS_DATA_TYPE_UB2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UB4,c.TNS_DATA_TYPE_UB4,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SB1,c.TNS_DATA_TYPE_SB1,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_SB2,c.TNS_DATA_TYPE_SB2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SB4,c.TNS_DATA_TYPE_SB4,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SWORD,c.TNS_DATA_TYPE_SWORD,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UWORD,c.TNS_DATA_TYPE_UWORD,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PTRB,c.TNS_DATA_TYPE_PTRB,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PTRW,c.TNS_DATA_TYPE_PTRW,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TIDDEF,c.TNS_DATA_TYPE_TIDDEF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ROWID,c.TNS_DATA_TYPE_ROWID,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AMS,c.TNS_DATA_TYPE_AMS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_BRN,c.TNS_DATA_TYPE_BRN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CWD,c.TNS_DATA_TYPE_CWD,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OAC122,c.TNS_DATA_TYPE_OAC122,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OER8,c.TNS_DATA_TYPE_OER8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_FUN,c.TNS_DATA_TYPE_FUN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AUA,c.TNS_DATA_TYPE_AUA,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RXH7,c.TNS_DATA_TYPE_RXH7,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_NA6,c.TNS_DATA_TYPE_NA6,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_BRP,c.TNS_DATA_TYPE_BRP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_BRV,c.TNS_DATA_TYPE_BRV,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KVA,c.TNS_DATA_TYPE_KVA,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CLS,c.TNS_DATA_TYPE_CLS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CUI,c.TNS_DATA_TYPE_CUI,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DFN,c.TNS_DATA_TYPE_DFN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DQR,c.TNS_DATA_TYPE_DQR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSC,c.TNS_DATA_TYPE_DSC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_EXE,c.TNS_DATA_TYPE_EXE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_FCH,c.TNS_DATA_TYPE_FCH,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_GBV,c.TNS_DATA_TYPE_GBV,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_GEM,c.TNS_DATA_TYPE_GEM,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_GIV,c.TNS_DATA_TYPE_GIV,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OKG,c.TNS_DATA_TYPE_OKG,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_HMI,c.TNS_DATA_TYPE_HMI,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_INO,c.TNS_DATA_TYPE_INO,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_LNF,c.TNS_DATA_TYPE_LNF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ONT,c.TNS_DATA_TYPE_ONT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OPE,c.TNS_DATA_TYPE_OPE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OSQ,c.TNS_DATA_TYPE_OSQ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SFE,c.TNS_DATA_TYPE_SFE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SPF,c.TNS_DATA_TYPE_SPF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_VSN,c.TNS_DATA_TYPE_VSN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UD7,c.TNS_DATA_TYPE_UD7,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSA,c.TNS_DATA_TYPE_DSA,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PIN,c.TNS_DATA_TYPE_PIN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PFN,c.TNS_DATA_TYPE_PFN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PPT,c.TNS_DATA_TYPE_PPT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_STO,c.TNS_DATA_TYPE_STO,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ARC,c.TNS_DATA_TYPE_ARC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_MRS,c.TNS_DATA_TYPE_MRS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_MRT,c.TNS_DATA_TYPE_MRT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_MRG,c.TNS_DATA_TYPE_MRG,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_MRR,c.TNS_DATA_TYPE_MRR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_MRC,c.TNS_DATA_TYPE_MRC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_VER,c.TNS_DATA_TYPE_VER,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_LON2,c.TNS_DATA_TYPE_LON2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_INO2,c.TNS_DATA_TYPE_INO2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ALL,c.TNS_DATA_TYPE_ALL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UDB,c.TNS_DATA_TYPE_UDB,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQI,c.TNS_DATA_TYPE_AQI,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ULB,c.TNS_DATA_TYPE_ULB,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ULD,c.TNS_DATA_TYPE_ULD,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SID,c.TNS_DATA_TYPE_SID,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_NA7,c.TNS_DATA_TYPE_NA7,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AL7,c.TNS_DATA_TYPE_AL7,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_K2RPC,c.TNS_DATA_TYPE_K2RPC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XDP,c.TNS_DATA_TYPE_XDP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OKO8,c.TNS_DATA_TYPE_OKO8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UD12,c.TNS_DATA_TYPE_UD12,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AL8,c.TNS_DATA_TYPE_AL8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_LFOP,c.TNS_DATA_TYPE_LFOP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_FCRT,c.TNS_DATA_TYPE_FCRT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DNY,c.TNS_DATA_TYPE_DNY,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OPR,c.TNS_DATA_TYPE_OPR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PLS,c.TNS_DATA_TYPE_PLS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XID,c.TNS_DATA_TYPE_XID,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TXN,c.TNS_DATA_TYPE_TXN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DCB,c.TNS_DATA_TYPE_DCB,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CCA,c.TNS_DATA_TYPE_CCA,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_WRN,c.TNS_DATA_TYPE_WRN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TLH,c.TNS_DATA_TYPE_TLH,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TOH,c.TNS_DATA_TYPE_TOH,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_FOI,c.TNS_DATA_TYPE_FOI,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SID2,c.TNS_DATA_TYPE_SID2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TCH,c.TNS_DATA_TYPE_TCH,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PII,c.TNS_DATA_TYPE_PII,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PFI,c.TNS_DATA_TYPE_PFI,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PPU,c.TNS_DATA_TYPE_PPU,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PTE,c.TNS_DATA_TYPE_PTE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RXH8,c.TNS_DATA_TYPE_RXH8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_N12,c.TNS_DATA_TYPE_N12,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AUTH,c.TNS_DATA_TYPE_AUTH,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KVAL,c.TNS_DATA_TYPE_KVAL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_FGI,c.TNS_DATA_TYPE_FGI,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSY,c.TNS_DATA_TYPE_DSY,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYR8,c.TNS_DATA_TYPE_DSYR8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYH8,c.TNS_DATA_TYPE_DSYH8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYL,c.TNS_DATA_TYPE_DSYL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYT8,c.TNS_DATA_TYPE_DSYT8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYV8,c.TNS_DATA_TYPE_DSYV8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYP,c.TNS_DATA_TYPE_DSYP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYF,c.TNS_DATA_TYPE_DSYF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYK,c.TNS_DATA_TYPE_DSYK,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYY,c.TNS_DATA_TYPE_DSYY,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYQ,c.TNS_DATA_TYPE_DSYQ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYC,c.TNS_DATA_TYPE_DSYC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYA,c.TNS_DATA_TYPE_DSYA,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OT8,c.TNS_DATA_TYPE_OT8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYTY,c.TNS_DATA_TYPE_DSYTY,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQE,c.TNS_DATA_TYPE_AQE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KV,c.TNS_DATA_TYPE_KV,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQD,c.TNS_DATA_TYPE_AQD,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQ8,c.TNS_DATA_TYPE_AQ8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RFS,c.TNS_DATA_TYPE_RFS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RXH10,c.TNS_DATA_TYPE_RXH10,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPN,c.TNS_DATA_TYPE_KPN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDNR,c.TNS_DATA_TYPE_KPDNR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYD,c.TNS_DATA_TYPE_DSYD,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYS,c.TNS_DATA_TYPE_DSYS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYR,c.TNS_DATA_TYPE_DSYR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYH,c.TNS_DATA_TYPE_DSYH,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYT,c.TNS_DATA_TYPE_DSYT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DSYV,c.TNS_DATA_TYPE_DSYV,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQM,c.TNS_DATA_TYPE_AQM,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OER11,c.TNS_DATA_TYPE_OER11,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQL,c.TNS_DATA_TYPE_AQL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OTC,c.TNS_DATA_TYPE_OTC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KFNO,c.TNS_DATA_TYPE_KFNO,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KFNP,c.TNS_DATA_TYPE_KFNP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KGT8,c.TNS_DATA_TYPE_KGT8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RASB4,c.TNS_DATA_TYPE_RASB4,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RAUB2,c.TNS_DATA_TYPE_RAUB2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RAUB1,c.TNS_DATA_TYPE_RAUB1,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RATXT,c.TNS_DATA_TYPE_RATXT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RSSB4,c.TNS_DATA_TYPE_RSSB4,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RSUB2,c.TNS_DATA_TYPE_RSUB2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RSUB1,c.TNS_DATA_TYPE_RSUB1,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RSTXT,c.TNS_DATA_TYPE_RSTXT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RIDL,c.TNS_DATA_TYPE_RIDL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_GLRDD,c.TNS_DATA_TYPE_GLRDD,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_GLRDG,c.TNS_DATA_TYPE_GLRDG,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_GLRDC,c.TNS_DATA_TYPE_GLRDC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OKO,c.TNS_DATA_TYPE_OKO,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DPP,c.TNS_DATA_TYPE_DPP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DPLS,c.TNS_DATA_TYPE_DPLS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DPMOP,c.TNS_DATA_TYPE_DPMOP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_STAT,c.TNS_DATA_TYPE_STAT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RFX,c.TNS_DATA_TYPE_RFX,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_FAL,c.TNS_DATA_TYPE_FAL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CKV,c.TNS_DATA_TYPE_CKV,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DRCX,c.TNS_DATA_TYPE_DRCX,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KGH,c.TNS_DATA_TYPE_KGH,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQO,c.TNS_DATA_TYPE_AQO,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OKGT,c.TNS_DATA_TYPE_OKGT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPFC,c.TNS_DATA_TYPE_KPFC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_FE2,c.TNS_DATA_TYPE_FE2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SPFP,c.TNS_DATA_TYPE_SPFP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DPULS,c.TNS_DATA_TYPE_DPULS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQA,c.TNS_DATA_TYPE_AQA,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPBF,c.TNS_DATA_TYPE_KPBF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TSM,c.TNS_DATA_TYPE_TSM,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_MSS,c.TNS_DATA_TYPE_MSS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPC,c.TNS_DATA_TYPE_KPC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CRS,c.TNS_DATA_TYPE_CRS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KKS,c.TNS_DATA_TYPE_KKS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KSP,c.TNS_DATA_TYPE_KSP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KSPTOP,c.TNS_DATA_TYPE_KSPTOP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KSPVAL,c.TNS_DATA_TYPE_KSPVAL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PSS,c.TNS_DATA_TYPE_PSS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_NLS,c.TNS_DATA_TYPE_NLS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ALS,c.TNS_DATA_TYPE_ALS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KSDEVTVAL,c.TNS_DATA_TYPE_KSDEVTVAL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KSDEVTTOP,c.TNS_DATA_TYPE_KSDEVTTOP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPSPP,c.TNS_DATA_TYPE_KPSPP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KOL,c.TNS_DATA_TYPE_KOL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_LST,c.TNS_DATA_TYPE_LST,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ACX,c.TNS_DATA_TYPE_ACX,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SCS,c.TNS_DATA_TYPE_SCS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RXH,c.TNS_DATA_TYPE_RXH,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDNS,c.TNS_DATA_TYPE_KPDNS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDCN,c.TNS_DATA_TYPE_KPDCN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPNNS,c.TNS_DATA_TYPE_KPNNS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPNCN,c.TNS_DATA_TYPE_KPNCN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPS,c.TNS_DATA_TYPE_KPS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_APINF,c.TNS_DATA_TYPE_APINF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TEN,c.TNS_DATA_TYPE_TEN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSSCS,c.TNS_DATA_TYPE_XSSCS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSSSO,c.TNS_DATA_TYPE_XSSSO,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSSAO,c.TNS_DATA_TYPE_XSSAO,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KSRPC,c.TNS_DATA_TYPE_KSRPC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KVL,c.TNS_DATA_TYPE_KVL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSSDEF,c.TNS_DATA_TYPE_XSSDEF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PDQCINV,c.TNS_DATA_TYPE_PDQCINV,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PDQIDC,c.TNS_DATA_TYPE_PDQIDC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDQCSTA,c.TNS_DATA_TYPE_KPDQCSTA,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPRS,c.TNS_DATA_TYPE_KPRS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDQIDC,c.TNS_DATA_TYPE_KPDQIDC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RTSTRM,c.TNS_DATA_TYPE_RTSTRM,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SESSGET,c.TNS_DATA_TYPE_SESSGET,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SESSREL,c.TNS_DATA_TYPE_SESSREL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SESSRET,c.TNS_DATA_TYPE_SESSRET,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SCN6,c.TNS_DATA_TYPE_SCN6,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KECPA,c.TNS_DATA_TYPE_KECPA,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KECPP,c.TNS_DATA_TYPE_KECPP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SXA,c.TNS_DATA_TYPE_SXA,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KVARR,c.TNS_DATA_TYPE_KVARR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPNGN,c.TNS_DATA_TYPE_KPNGN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_BINARY_INTEGER,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_FLOAT,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_STR,c.TNS_DATA_TYPE_VARCHAR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_VNU,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_PDN,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_VCS,c.TNS_DATA_TYPE_VARCHAR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_VBI,c.TNS_DATA_TYPE_VARCHAR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OAC9,c.TNS_DATA_TYPE_OAC9,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UIN,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_SLS,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_LVC,c.TNS_DATA_TYPE_VARCHAR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_LVB,c.TNS_DATA_TYPE_RAW,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CHAR,c.TNS_DATA_TYPE_CHAR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AVC,c.TNS_DATA_TYPE_CHAR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_BINARY_FLOAT,c.TNS_DATA_TYPE_BINARY_FLOAT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_BINARY_DOUBLE,c.TNS_DATA_TYPE_BINARY_DOUBLE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CURSOR,c.TNS_DATA_TYPE_CURSOR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RDD,c.TNS_DATA_TYPE_ROWID,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OSL,c.TNS_DATA_TYPE_OSL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_EXT_NAMED,c.TNS_DATA_TYPE_INT_NAMED,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_INT_NAMED,c.TNS_DATA_TYPE_INT_NAMED,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_EXT_REF,c.TNS_DATA_TYPE_INT_REF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_INT_REF,c.TNS_DATA_TYPE_INT_REF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CLOB,c.TNS_DATA_TYPE_CLOB,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_BLOB,c.TNS_DATA_TYPE_BLOB,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_BFILE,c.TNS_DATA_TYPE_BFILE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CFILE,c.TNS_DATA_TYPE_CFILE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_RSET,c.TNS_DATA_TYPE_CURSOR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_JSON,c.TNS_DATA_TYPE_JSON,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DJSON,c.TNS_DATA_TYPE_DJSON,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CLV,c.TNS_DATA_TYPE_CLV,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DTR,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_DUN,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_DOP,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_VST,c.TNS_DATA_TYPE_VARCHAR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ODT,c.TNS_DATA_TYPE_DATE,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_DOL,c.TNS_DATA_TYPE_NUMBER,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_TIME,c.TNS_DATA_TYPE_TIME,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TIME_TZ,c.TNS_DATA_TYPE_TIME_TZ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TIMESTAMP,c.TNS_DATA_TYPE_TIMESTAMP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TIMESTAMP_TZ,c.TNS_DATA_TYPE_TIMESTAMP_TZ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_INTERVAL_YM,c.TNS_DATA_TYPE_INTERVAL_YM,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_INTERVAL_DS,c.TNS_DATA_TYPE_INTERVAL_DS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_EDATE,c.TNS_DATA_TYPE_DATE,c.TNS_TYPE_REP_ORACLE],[c.TNS_DATA_TYPE_ETIME,c.TNS_DATA_TYPE_ETIME,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ETTZ,c.TNS_DATA_TYPE_ETTZ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ESTAMP,c.TNS_DATA_TYPE_ESTAMP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ESTZ,c.TNS_DATA_TYPE_ESTZ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_EIYM,c.TNS_DATA_TYPE_EIYM,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_EIDS,c.TNS_DATA_TYPE_EIDS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DCLOB,c.TNS_DATA_TYPE_CLOB,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DBLOB,c.TNS_DATA_TYPE_BLOB,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_DBFILE,c.TNS_DATA_TYPE_BFILE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UROWID,c.TNS_DATA_TYPE_UROWID,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TIMESTAMP_LTZ,c.TNS_DATA_TYPE_TIMESTAMP_LTZ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_ESITZ,c.TNS_DATA_TYPE_TIMESTAMP_LTZ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UB8,c.TNS_DATA_TYPE_UB8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_PNTY,c.TNS_DATA_TYPE_INT_NAMED,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_BOOLEAN,c.TNS_DATA_TYPE_BOOLEAN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSNSOP,c.TNS_DATA_TYPE_XSNSOP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSATTR,c.TNS_DATA_TYPE_XSATTR,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSNS,c.TNS_DATA_TYPE_XSNS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UB1ARRAY,c.TNS_DATA_TYPE_UB1ARRAY,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SESSSTATE,c.TNS_DATA_TYPE_SESSSTATE,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AC_REPLAY,c.TNS_DATA_TYPE_AC_REPLAY,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AC_CONT,c.TNS_DATA_TYPE_AC_CONT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_IMPLRES,c.TNS_DATA_TYPE_IMPLRES,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OER19,c.TNS_DATA_TYPE_OER19,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TXT,c.TNS_DATA_TYPE_TXT,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSSESSNS,c.TNS_DATA_TYPE_XSSESSNS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSATTOP,c.TNS_DATA_TYPE_XSATTOP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSCREOP,c.TNS_DATA_TYPE_XSCREOP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSDETOP,c.TNS_DATA_TYPE_XSDETOP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSDESOP,c.TNS_DATA_TYPE_XSDESOP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSSETSP,c.TNS_DATA_TYPE_XSSETSP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSSIDP,c.TNS_DATA_TYPE_XSSIDP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSPRIN,c.TNS_DATA_TYPE_XSPRIN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSKVL,c.TNS_DATA_TYPE_XSKVL,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSSSDEF2,c.TNS_DATA_TYPE_XSSSDEF2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSNSOP2,c.TNS_DATA_TYPE_XSNSOP2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_XSNS2,c.TNS_DATA_TYPE_XSNS2,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDNREQ,c.TNS_DATA_TYPE_KPDNREQ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDNRNF,c.TNS_DATA_TYPE_KPDNRNF,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPNGNC,c.TNS_DATA_TYPE_KPNGNC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPNRI,c.TNS_DATA_TYPE_KPNRI,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQENQ,c.TNS_DATA_TYPE_AQENQ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQDEQ,c.TNS_DATA_TYPE_AQDEQ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_AQJMS,c.TNS_DATA_TYPE_AQJMS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDNRPAY,c.TNS_DATA_TYPE_KPDNRPAY,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDNRACK,c.TNS_DATA_TYPE_KPDNRACK,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDNRMP,c.TNS_DATA_TYPE_KPDNRMP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_KPDNRDQ,c.TNS_DATA_TYPE_KPDNRDQ,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SCN,c.TNS_DATA_TYPE_SCN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SCN8,c.TNS_DATA_TYPE_SCN8,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_CHUNKINFO,c.TNS_DATA_TYPE_CHUNKINFO,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UD21,c.TNS_DATA_TYPE_UD21,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_UDS,c.TNS_DATA_TYPE_UDS,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_TNP,c.TNS_DATA_TYPE_TNP,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OER,c.TNS_DATA_TYPE_OER,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_OAC,c.TNS_DATA_TYPE_OAC,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_SESSSIGN,c.TNS_DATA_TYPE_SESSSIGN,c.TNS_TYPE_REP_UNIVERSAL],[c.TNS_DATA_TYPE_VECTOR,c.TNS_DATA_TYPE_VECTOR,c.TNS_TYPE_REP_UNIVERSAL]];oN1.exports=sN1});var YA1=o((Fq5,$A1)=>{var Ii6=CG(),Ci6=E9();class eN1 extends Ii6{constructor($){super($);this.functionCode=Ci6.TNS_FUNC_LOGOFF}encode($){this.writeFunctionHeader($)}}$A1.exports=eN1});var JA1=o((Lq5,GA1)=>{var Si6=CG(),ki6=E9();class XA1 extends Si6{constructor($){super($);this.functionCode=ki6.TNS_FUNC_PING}encode($){this.writeFunctionHeader($)}}GA1.exports=XA1});var KA1=o((Dq5,WA1)=>{var lV0=E9(),vi6=CG();class QA1 extends vi6{encode($){$.writeUInt8(lV0.TNS_MSG_TYPE_PROTOCOL),$.writeUInt8(6),$.writeUInt8(0),$.writeStr("node-oracledb"),$.writeUInt8(0)}processMessage($,Y){if(Y===lV0.TNS_MSG_TYPE_PROTOCOL)this.processProtocolInfo($),this.endOfResponse=!this.connection.nscon.endOfRequestSupport;else super.processMessage($,Y)}processProtocolInfo($){this.serverVersion=$.readUInt8(),$.skipUB1(),this.serverBanner=$.readNullTerminatedBytes(48),$.caps.charSetID=$.readUInt16LE(),this.serverFlags=$.readUInt8();let Y=$.readUInt16LE();if(Y>0)$.skipBytes(Y*5);let X=$.readUInt16BE(),G=$.readBytes(X),J=6+G[5]+G[6];$.caps.nCharsetId=(G[J+3]<<8)+G[J+4];let Q=$.readBytesWithLength();if(Q)if(this.serverCompileCaps=Buffer.from(Q),$.caps.adjustForServerCompileCaps(this.serverCompileCaps,this.connection.nscon),$.caps.ttcFieldVersion>=lV0.TNS_CCAP_FIELD_VERSION_23_1)this.connection._osonMaxFieldNameSize=65535;else this.connection._osonMaxFieldNameSize=255;let W=$.readBytesWithLength();if(W)this.serverRunTimeCaps=Buffer.from(W),$.caps.adjustForServerRuntimeCaps(this.serverRunTimeCaps)}}WA1.exports=QA1});var HA1=o((Nq5,UA1)=>{var xi6=CG(),yi6=E9();class ZA1 extends xi6{constructor($){super($);this.functionCode=yi6.TNS_FUNC_ROLLBACK}encode($){this.writeFunctionHeader($)}}UA1.exports=ZA1});var LA1=o((Aq5,FA1)=>{var bi6=CG(),zA1=E9();class VA1 extends bi6{constructor($){super($);this.functionCode=zA1.TNS_FUNC_SESSION_RELEASE,this.messageType=zA1.TNS_MSG_TYPE_ONEWAY_FN,this.sessReleaseMode=0}encode($){this.writeFunctionHeader($),$.writeUInt8(0),$.writeUInt8(0),$.writeUB4(this.sessReleaseMode)}decode(){}}FA1.exports=VA1});var AA1=o((Bq5,NA1)=>{var YB=E9(),hi6=CG();class DA1 extends hi6{encode($){$.writeUInt8(YB.TNS_MSG_TYPE_FAST_AUTH),$.writeUInt8(1),$.writeUInt8(YB.TNS_SERVER_CONVERTS_CHARS),$.writeUInt8(0),this.protocolMessage.encode($),$.writeUInt16BE(0),$.writeUInt8(0),$.writeUInt16BE(0),$.caps.ttcFieldVersion=YB.TNS_CCAP_FIELD_VERSION_19_1_EXT_1,$.writeUInt8($.caps.ttcFieldVersion),this.dataTypeMessage.encode($),this.authMessage.encode($),$.caps.ttcFieldVersion=YB.TNS_CCAP_FIELD_VERSION_MAX}processMessage($,Y){if(Y===YB.TNS_MSG_TYPE_RENEGOTIATE)this.reNegotiate=!0;else if(Y===YB.TNS_MSG_TYPE_PROTOCOL)this.protocolMessage.processMessage($,Y);else if(Y===YB.TNS_MSG_TYPE_DATA_TYPES)this.dataTypeMessage.processMessage($,Y);else if(this.authMessage.processMessage($,Y),this.endOfResponse=this.authMessage.endOfResponse,this.authMessage.errorOccurred)this.errorOccurred=this.authMessage.errorOccurred,this.errorInfo=this.authMessage.errorInfo}}NA1.exports=DA1});var EA1=o((Oq5,OA1)=>{var fi6=CG(),gi6=E9();class BA1 extends fi6{constructor($){super($);this.functionCode=gi6.TNS_FUNC_TPC_TXN_CHANGE_STATE}processReturnParameter($){this.state=$.readUB4()}encode($){let Y;if(this.xid)Y=Buffer.alloc(128),this.xid.globalTransactionId.copy(Y),this.xid.branchQualifier.copy(Y,this.xid.globalTransactionId.length);if(this.writeFunctionHeader($),$.writeUB4(this.operation),this.context)$.writeUInt8(1),$.writeUB4(this.context.length);else $.writeUInt8(0),$.writeUB4(0);if(this.xid)$.writeUB4(this.xid.formatId),$.writeUB4(this.xid.globalTransactionId.length),$.writeUB4(this.xid.branchQualifier.length),$.writeUInt8(1),$.writeUB4(Y.length);else $.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0);if($.writeUB4(0),$.writeUB4(this.state),$.writeUInt8(1),$.writeUB4(this.flags),this.context)$.writeBytes(this.context);if(this.xid)$.writeBytes(Y)}}OA1.exports=BA1});var RA1=o((Eq5,MA1)=>{var mi6=iN1(),ui6=aN1(),pi6=tN1(),di6=DV0(),ci6=NV0(),li6=VV0(),ii6=YA1(),ni6=JA1(),ri6=KA1(),ai6=HA1(),si6=LA1(),oi6=AA1(),ti6=EA1(),ei6=LV0();MA1.exports={AuthMessage:mi6,CommitMessage:ui6,FastAuthMessage:oi6,DataTypeMessage:pi6,ExecuteMessage:di6,FetchMessage:ci6,LobOpMessage:li6,LogOffMessage:ii6,PingMessage:ni6,ProtocolMessage:ri6,RollbackMessage:ai6,SessionReleaseMessage:si6,TransactionChangeStateMessage:ti6,TransactionSwitchMessage:ei6}});var _A1=o((Mq5,wA1)=>{var qA1=O4(),{Statement:$n6}=dV0();class PA1{constructor($){this._cachedStatements=new Map,this._maxSize=$,this._cursorsToClose=new Set,this._openCursors=new Set}_addCursorToClose($){if(this._cursorsToClose.has($.cursorId)){let Y=`attempt to close cursor ${$.cursorId} twice`;qA1.throwErr(qA1.ERR_INTERNAL,Y)}if($.cursorId!=0)this._cursorsToClose.add($.cursorId);this._openCursors.delete($)}_adjustCache(){while(this._cachedStatements.size>this._maxSize){let $=this._cachedStatements.keys().next().value,Y=this._cachedStatements.get($);if(this._cachedStatements.delete($),Y.inUse)Y.returnToCache=!1;else if(Y.cursorId!==0)this._addCursorToClose(Y)}}clearCursors(){let $=new Set;for(let Y of this._openCursors){if(Y.inUse||Y.returnToCache)Y.pendingClear=!0,$.add(Y);Y._clearState()}this._openCursors=$,this._cursorsToClose.clear()}clearPendingStatus(){for(let $ of this._openCursors)if($.pendingClear&&!$.inUse)$._clearAllState(),$.pendingClear=!1}getStatement($,Y=!1,X=!1){let G=null;if($)G=this._cachedStatements.get($);if(!G){if(G=new $n6,$)G._prepare($);if(Y&&!G.isDdl&&this._maxSize>0)G.returnToCache=!0,this._cachedStatements.set($,G),this._adjustCache();this._openCursors.add(G)}else if(X||G.inUse){if(!Y)this._addCursorToClose(G),this._cachedStatements.delete($);G=G._copy(),this._openCursors.add(G)}else if(!Y)this._cachedStatements.delete($),G.returnToCache=!1;else this._cachedStatements.delete($),this._cachedStatements.set($,G);return this._openCursors.add(G),G.inUse=!0,G}clearCursor($){this._addCursorToClose($),$.cursorId=0}returnStatement($){if($.bindInfoList)$.bindInfoList.forEach((Y)=>{Y.bindVar=null});if($.queryVars)$.queryVars.forEach((Y)=>{Y.values.fill(null)});if($.returnToCache)$.inUse=!1;else this._addCursorToClose($);this.clearPendingStatus()}writeCursorsToClose($){$.writeUB4(this._cursorsToClose.size);for(let Y of this._cursorsToClose.keys())$.writeUB4(Y);this._cursorsToClose.clear()}}wA1.exports=PA1});var Bs=o((Rq5,TA1)=>{var SG=E9(),iV0=O4(),Yn6=CG(),{ThinDbObjectImpl:Xn6}=ea(),Gn6=Mx();class jA1 extends Yn6{constructor($){super($);this.queueImpl=null,this.deqOptionsImpl=null,this.enqOptionsImpl=null,this.noMsgFound=!1}_processDate($){if($.readUB4()>0)return $.readOracleDate(!0)}processErrorInfo($){if(super.processErrorInfo($),this.errorInfo.num===SG.TNS_ERR_NO_MESSAGES_FOUND)this.errorInfo.num=0,this.errorOccurred=!1,this.noMsgFound=!0}_processExtensions($,Y){let X=$.readUB4();if(X>0){$.skipUB1();for(let G=0;G<X;G++){let J=$.readBytesAndLength(),Q=$.readBytesAndLength(),W=J||Q,K=$.readUB2();if(W){if(K===SG.TNS_AQ_EXT_KEYWORD_AGENT_NAME)Y.senderAgentName=W;else if(K===SG.TNS_AQ_EXT_KEYWORD_AGENT_ADDRESS)Y.senderAgentAddress=W;else if(K===SG.TNS_AQ_EXT_KEYWORD_AGENT_PROTOCOL)Y.senderAgentProtocol=W[0];else if(K===SG.TNS_AQ_EXT_KEYWORD_ORIGINAL_MSGID)Y.originalMsgId=W}}}}_processMsgId($){return Buffer.from($.readBytes(SG.TNS_AQ_MESSAGE_ID_LENGTH))}_processMsgProps($,Y){if(Y.priority=$.readSB4(),Y.delay=$.readSB4(),Y.expiration=$.readSB4(),Y.correlation=$.readStrAndLength(),Y.numAttempts=$.readSB4(),Y.exceptionQueue=$.readStrAndLength(),Y.state=$.readSB4(),Y.enqTime=this._processDate($),Y.enqTxnId=$.readBytesAndLength(),this._processExtensions($,Y),$.readUB4()>0)iV0.throwErr(iV0.ERR_NOT_IMPLEMENTED);if($.skipUB4(),$.skipUB4(),$.readUB4()===SG.TNS_KPD_AQ_BUFMSG)Y.deliveryMode=SG.TNS_AQ_MSG_BUFFERED;else Y.deliveryMode=SG.TNS_AQ_MSG_PERSISTENT;if($.caps.ttcFieldVersion>=SG.TNS_CCAP_FIELD_VERSION_21_1)$.skipUB4()}_processPayload($){let Y=$.readDbObject();if(this.queueImpl.payloadTypeClass){let X=new this.queueImpl.payloadTypeClass,G=new Xn6(this.queueImpl.payloadTypeClass,Y.packedData);if(Y)G.toid=Y.toid,G.oid=Y.oid;return X._impl=G,X}else if(Y.packedData){let X=Buffer.from(Y.packedData.slice(4));if(this.queueImpl.isJson)return new Gn6.OsonDecoder(X).decode();return X}else if(!this.queueImpl.isJson)return Buffer.alloc(0)}_processRecipients($){if($.readUB4()>0)iV0.throwNotImplemented("aq recipients");return[]}_writeMsgProps($,Y){if($.writeSB4(Y.priority),$.writeSB4(Y.delay),$.writeSB4(Y.expiration),this._writeValueWithLength($,Y.correlation),$.writeUB4(0),this._writeValueWithLength($,Y.exceptionQueue),$.writeUB4(Y.state),$.writeUB4(0),this._writeValueWithLength($,Y.enqTxnId),$.writeUB4(4),$.writeUInt8(14),this._writeKeywordValuePair($,null,null,SG.TNS_AQ_EXT_KEYWORD_AGENT_NAME),this._writeKeywordValuePair($,null,null,SG.TNS_AQ_EXT_KEYWORD_AGENT_ADDRESS),this._writeKeywordValuePair($,null,Buffer.from([0]),SG.TNS_AQ_EXT_KEYWORD_AGENT_PROTOCOL),this._writeKeywordValuePair($,null,null,SG.TNS_AQ_EXT_KEYWORD_ORIGINAL_MSGID),$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.caps.ttcFieldVersion>=SG.TNS_CCAP_FIELD_VERSION_21_1)$.writeUB4(4294967295)}_writePayload($,Y){if(this.queueImpl.isJson)$.writeOson(Y.payload,this.connection._osonMaxFieldNameSize,!1);else if(this.queueImpl.payloadTypeClass)$.writeDbObject(Y.payload);else $.writeBytes(Y.payload)}_writeRecipients($,Y){let X=0;for(let G of Y.recipients)this._writeKeywordValuePair($,G,null,X),this._writeKeywordValuePair($,null,null,X+1),this._writeKeywordValuePair($,null,Buffer.from([0]),X+2),X+=3}_writeValueWithLength($,Y){if(!Y)$.writeUB4(0);else{let X=Buffer.isBuffer(Y)?Y:Buffer.from(Y,"utf-8");$.writeUB4(X.length),$.writeBytesWithLength(X)}}_writeKeywordValuePair($,Y,X,G){let J;if(!Y)$.writeUB4(0);else J=Buffer.from(Y),$.writeUB4(J.length),$.writeBytesWithLength(J);if(!X)$.writeUB4(0);else $.writeUB4(X.length),$.writeBytesWithLength(X);$.writeUB2(G)}}TA1.exports=jA1});var SA1=o((qq5,CA1)=>{var Jn6=Bs(),AP=E9();class IA1 extends Jn6{constructor($){super($);this.functionCode=AP.TNS_FUNC_AQ_ENQ,this.propsImpl=null}processReturnParameter($){this.propsImpl.msgId=this._processMsgId($),$.skipUB2()}encode($){let Y=Buffer.from(this.queueImpl.name,"utf-8"),X=0;if(this.enqOptionsImpl.deliveryMode===AP.TNS_AQ_MSG_BUFFERED)X|=AP.TNS_KPD_AQ_BUFMSG;if(this.writeFunctionHeader($),$.writeUInt8(1),$.writeUB4(Y.length),this._writeMsgProps($,this.propsImpl),!this.propsImpl.recipients)$.writeUInt8(0),$.writeUB4(0);else $.writeUInt8(1),$.writeUB4(3*this.propsImpl.recipients.length);if($.writeUB4(this.enqOptionsImpl.visibility),$.writeUInt8(0),$.writeUB4(0),$.writeUB4(0),$.writeUInt8(1),$.writeUB4(16),$.writeUB2(AP.TNS_AQ_MESSAGE_VERSION),this.queueImpl.isJson)$.writeUInt8(0),$.writeUInt8(0),$.writeUB4(0);else if(this.queueImpl.payloadTypeClass)$.writeUInt8(1),$.writeUInt8(0),$.writeUB4(0);else $.writeUInt8(0),$.writeUInt8(1),$.writeUB4(this.propsImpl.payload.length);if($.writeUInt8(1),$.writeUB4(AP.TNS_AQ_MESSAGE_ID_LENGTH),$.writeUB4(X),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUB4(0),$.writeUInt8(0),$.writeUInt8(0),$.caps.ttcFieldVersion>=AP.TNS_CCAP_FIELD_VERSION_20_1)$.writeUInt8(this.queueImpl.isJson?1:0);if($.writeBytesWithLength(Y),this.propsImpl.recipients)this._writeRecipients($,this.propsImpl);$.writeBytes(this.queueImpl.payloadToid),this._writePayload($,this.propsImpl)}}CA1.exports=IA1});var xA1=o((Pq5,vA1)=>{var Qn6=Bs(),Q3=E9();class kA1 extends Qn6{constructor($){super($);this.functionCode=Q3.TNS_FUNC_AQ_DEQ,this.propsImpl=null}processReturnParameter($){if($.readUB4()>0)this._processMsgProps($,this.propsImpl),this.propsImpl.recipients=this._processRecipients($),this.propsImpl.payload=this._processPayload($),this.propsImpl.msgId=this._processMsgId($)}encode($){let Y=Buffer.from(this.queueImpl.name,"utf-8"),X=this.deqOptionsImpl.consumerName?Buffer.from(this.deqOptionsImpl.consumerName,"utf-8"):null,G=this.deqOptionsImpl.correlation?Buffer.from(this.deqOptionsImpl.correlation,"utf-8"):null,J=this.deqOptionsImpl.condition?Buffer.from(this.deqOptionsImpl.condition,"utf-8"):null,Q=this.deqOptionsImpl.msgId?this.deqOptionsImpl.msgId.slice(0,16):null,W=this.deqOptionsImpl.deliveryMode,K=0;if(Q&&Q.length<16)Q=Buffer.concat([Q,Buffer.alloc(16-Q.length)]);if(W===Q3.TNS_AQ_MSG_BUFFERED)K|=Q3.TNS_KPD_AQ_BUFMSG;else if(W===Q3.TNS_AQ_MSG_PERSISTENT_OR_BUFFERED)K|=Q3.TNS_KPD_AQ_EITHER;if(this.writeFunctionHeader($),$.writeUInt8(1),$.writeUB4(Y.length),$.writeUInt8(1),$.writeUInt8(1),$.writeUInt8(1),$.writeUInt8(1),X)$.writeUInt8(1),$.writeUB4(X.length);else $.writeUInt8(0),$.writeUB4(0);if($.writeSB4(this.deqOptionsImpl.mode),$.writeSB4(this.deqOptionsImpl.navigation),$.writeSB4(this.deqOptionsImpl.visibility),$.writeSB4(this.deqOptionsImpl.wait),Q)$.writeUInt8(1),$.writeUB4(Q3.TNS_AQ_MESSAGE_ID_LENGTH);else $.writeUInt8(0),$.writeUB4(0);if(G)$.writeUInt8(1),$.writeUB4(G.length);else $.writeUInt8(0),$.writeUB4(0);if($.writeUInt8(1),$.writeUB4(16),$.writeUB2(Q3.TNS_AQ_MESSAGE_VERSION),$.writeUInt8(1),$.writeUInt8(1),$.writeUB4(Q3.TNS_AQ_MESSAGE_ID_LENGTH),$.writeUB4(K),J)$.writeUInt8(1),$.writeUB4(J.length);else $.writeUInt8(0),$.writeUB4(0);if($.writeUInt8(0),$.writeUB4(0),$.caps.ttcFieldVersion>=Q3.TNS_CCAP_FIELD_VERSION_20_1)$.writeUInt8(0);if($.caps.ttcFieldVersion>=Q3.TNS_CCAP_FIELD_VERSION_21_1)$.writeUB4(4294967295);if($.writeBytesWithLength(Y),X)$.writeBytesWithLength(X);if(Q)$.writeBytes(Q);if(G)$.writeBytesWithLength(G);if($.writeBytes(this.queueImpl.payloadToid),J)$.writeBytesWithLength(J)}}vA1.exports=kA1});var fA1=o((wq5,hA1)=>{var Wn6=Bs(),C$=E9(),yA1=O4();class bA1 extends Wn6{constructor($){super($);this.functionCode=C$.TNS_FUNC_ARRAY_AQ,this.numIters=0,this.propsImpls=[],this.noMsgFound=!1}processReturnParameter($){let Y=$.readUB4();for(let X=0;X<Y;X++){let G=this.propsImpls[X],J=$.readUB2();if(J>0)$.skipUB1(),this._processMsgProps($,G);if(G.recipients=this._processRecipients($),J=$.readUB2(),J>0)G.payload=this._processPayload($);let Q=$.readBytesAndLength();if(this.operation===C$.TNS_AQ_ARRAY_ENQ)for(let W=0;W<this.propsImpls.length;W++)this.propsImpls[W].msgId=Buffer.from(Q.slice(W*16,(W+1)*16));else G.msgId=Buffer.from(Q);if(J=$.readUB2(),J>0)yA1.throwErr(yA1.ERR_NOT_IMPLEMENTED);$.skipUB2()}if(this.operation===C$.TNS_AQ_ARRAY_ENQ)this.numIters=$.readUB4();else this.numIters=Y}_writeArrayDeq($){let Y=null,X=null,G=null,J=Buffer.from(this.queueImpl.name),Q=this.deqOptionsImpl.deliveryMode,W=0;if(Q===C$.TNS_AQ_MSG_BUFFERED)W|=C$.TNS_KPD_AQ_BUFMSG;else if(Q===C$.TNS_AQ_MSG_PERSISTENT_OR_BUFFERED)W|=C$.TNS_KPD_AQ_EITHER;if(this.deqOptionsImpl.consumerName)Y=Buffer.from(this.deqOptionsImpl.consumerName,"utf-8");if(this.deqOptionsImpl.condition)G=Buffer.from(this.deqOptionsImpl.condition,"utf-8");if(this.deqOptionsImpl.correlation)X=Buffer.from(this.deqOptionsImpl.correlation,"utf-8");for(let K of this.propsImpls)$.writeUB4(J.length),$.writeBytesWithLength(J),this._writeMsgProps($,K),$.writeUB4(0),this._writeValueWithLength($,Y),$.writeSB4(this.deqOptionsImpl.mode),$.writeSB4(this.deqOptionsImpl.navigation),$.writeSB4(this.deqOptionsImpl.visibility),$.writeSB4(this.deqOptionsImpl.wait),this._writeValueWithLength($,this.deqOptionsImpl.msgid),this._writeValueWithLength($,X),this._writeValueWithLength($,G),$.writeUB4(0),$.writeUB4(0),$.writeSB4(0),$.writeUB4(16),$.writeBytesWithLength(this.queueImpl.payloadToid),$.writeUB2(C$.TNS_AQ_MESSAGE_VERSION),$.writeUB4(0),$.writeUB4(0),$.writeUB4(0),$.writeUB4(W),$.writeUB4(0),$.writeUB4(0)}_writeArrayEnq($){let Y=Buffer.from(this.queueImpl.name),X=this.enqOptionsImpl.deliveryMode,G=0;if(X===C$.TNS_AQ_MSG_BUFFERED)G|=C$.TNS_KPD_AQ_BUFMSG;else if(X===C$.TNS_AQ_MSG_PERSISTENT_OR_BUFFERED)G|=C$.TNS_KPD_AQ_EITHER;$.writeUB4(0),$.writeUInt8(C$.TNS_MSG_TYPE_ROW_HEADER),$.writeUB4(Y.length),$.writeBytesWithLength(Y),$.writeBytes(this.queueImpl.payloadToid),$.writeUB2(C$.TNS_AQ_MESSAGE_VERSION),$.writeUB4(G);for(let J of this.propsImpls){if($.writeUInt8(C$.TNS_MSG_TYPE_ROW_DATA),$.writeUB4(G),this._writeMsgProps($,J),J.recipients===null||J.recipients.length===0)$.writeUB4(0);else $.writeUB4(3*J.recipients.length),this._writeRecipients($,J);if($.writeSB4(this.enqOptionsImpl.visibility),$.writeUB4(0),$.writeSB4(0),!this.queueImpl.payloadTypeClass&&!this.queueImpl.isJson)$.writeUB4(J.payload.length);this._writePayload($,J)}$.writeUInt8(C$.TNS_MSG_TYPE_STATUS)}encode($){if(this.writeFunctionHeader($),this.operation===C$.TNS_AQ_ARRAY_ENQ)$.writeUInt8(0),$.writeUB4(0);else $.writeUInt8(1),$.writeUB4(this.numIters);if($.writeUB4(C$.TNS_AQ_ARRAY_FLAGS_RETURN_MESSAGE_ID),this.operation===C$.TNS_AQ_ARRAY_ENQ)$.writeUInt8(1),$.writeUInt8(0);else $.writeUInt8(1),$.writeUInt8(1);if($.writeSB4(this.operation),this.operation===C$.TNS_AQ_ARRAY_ENQ)$.writeUInt8(1);else $.writeUInt8(0);if($.caps.ttcFieldVersion>=C$.TNS_CCAP_FIELD_VERSION_21_1)$.writeUB4(65535);if(this.operation===C$.TNS_AQ_ARRAY_ENQ)$.writeUB4(this.numIters);if(this.operation===C$.TNS_AQ_ARRAY_ENQ)this._writeArrayEnq($);else this._writeArrayDeq($)}}hA1.exports=bA1});var lA1=o((_q5,cA1)=>{var Kn6=SA1(),Zn6=xA1(),gA1=fA1(),iK=E9(),BP=O4(),Un6=kY(),{AQ_VISIBILITY_IMMEDIATE:mA1}=SY();class uA1{constructor($,Y,X,G){if(this._connImpl=$,this.name=Y,this.payloadTypeClass=X,this.isJson=G===Un6.DB_TYPE_JSON,this.payloadType=G,this.deqOptions=new pA1,this.enqOptions=new dA1,this.isJson)this.payloadToid=Buffer.alloc(16,0),this.payloadToid[15]=71;else if(this.payloadTypeClass)this.payloadToid=this.payloadTypeClass._objType.oid;else this.payloadToid=Buffer.alloc(16,0),this.payloadToid[15]=23}_createArrayDeqMessage($){let Y=new gA1(this._connImpl);return Y.numIters=$,Y.propsImpls=Array.from({length:$},()=>new Os),Y.queueImpl=this,Y.deqOptionsImpl=this.deqOptions,Y.operation=iK.TNS_AQ_ARRAY_DEQ,Y}_createArrayEnqMessage($){let Y=new gA1(this._connImpl);return Y.queueImpl=this,Y.enqOptionsImpl=this.enqOptions,Y.propsImpls=$,Y.operation=iK.TNS_AQ_ARRAY_ENQ,Y.numIters=$.length,Y}_createDeqMessage(){let $=new Os,Y=new Zn6(this._connImpl);return Y.queueImpl=this,Y.deqOptionsImpl=this.deqOptions,Y.propsImpl=$,Y}_createEnqMessage($){let Y=new Kn6(this._connImpl);return Y.queueImpl=this,Y.enqOptionsImpl=this.enqOptions,Y.propsImpl=$,Y}async deq($){let Y;if($>1)Y=await this.deqMany($);else if($==1)Y=await this.deqOne();else BP.throwErr(BP.ERR_INVALID_MAX_MESSAGES);return Y}async deqMany($){if(this.enqOptions.visibility===mA1)BP.throwNotImplemented("immediate visibility with deqMany");let Y=this._createArrayDeqMessage($);if(await this._connImpl._protocol._processMessage(Y),Y.noMsgFound)return[];return Y.propsImpls.slice(0,Y.numIters)}async deqOne(){let $=this._createDeqMessage();if(await this._connImpl._protocol._processMessage($),$.noMsgFound)return[];return[$.propsImpl]}async enq($){let Y=$.map((X)=>{let G=new Os;return G._init(X),G});if($.length==1)return await this.enqOne(Y[0]);return await this.enqMany(Y)}async enqMany($){if(this.enqOptions.visibility===mA1)BP.throwNotImplemented("immediate visibility with enqMany");let Y=this._createArrayEnqMessage($);return await this._connImpl._protocol._processMessage(Y),$}async enqOne($){let Y=this._createEnqMessage($);return await this._connImpl._protocol._processMessage(Y),[$]}_getConnImpl(){return this._connImpl}}class pA1{constructor(){this.condition=null,this.consumerName=null,this.correlation=null,this.deliveryMode=iK.TNS_AQ_MSG_PERSISTENT,this.mode=iK.TNS_AQ_DEQ_REMOVE,this.msgId=null,this.navigation=iK.TNS_AQ_DEQ_NEXT_MSG,this.transformation=null,this.visibility=iK.TNS_AQ_DEQ_ON_COMMIT,this.wait=iK.TNS_AQ_DEQ_WAIT_FOREVER}getCondition(){return this.condition}getConsumerName(){return this.consumerName}getCorrelation(){return this.correlation}getMsgId(){return this.msgId}getMode(){return this.mode}getNavigation(){return this.navigation}getTransformation(){return this.transformation}getVisibility(){return this.visibility}getWait(){return this.wait}setCondition($){this.condition=$}setConsumerName($){this.consumerName=$}setCorrelation($){this.correlation=$}setDeliveryMode($){this.deliveryMode=$}setMode($){this.mode=$}setMsgId($){this.msgId=$}setNavigation($){this.navigation=$}setTransformation($){this.transformation=$}setVisibility($){this.visibility=$}setWait($){this.wait=$}}class dA1{constructor(){this.transformation=null,this.visibility=iK.TNS_AQ_ENQ_ON_COMMIT,this.deliveryMode=iK.TNS_AQ_MSG_PERSISTENT}getDeliveryMode(){return this.deliveryMode}getTransformation(){BP.throwNotImplemented("transformation")}getVisibility(){return this.visibility}setDeliveryMode($){this.deliveryMode=$}setTransformation($){BP.throwNotImplemented("transformation")}setVisibility($){this.visibility=$}}class Os{constructor(){this.delay=iK.TNS_AQ_MSG_NO_DELAY,this.correlation=null,this.exceptionq=null,this.expiration=iK.TNS_AQ_MSG_NO_EXPIRATION,this.priority=0,this.recipients=[],this.numAttempts=0,this.deliveryMode=0,this.enqTime=null,this.msgId=null,this.state=0,this.payload=null,this.enqTxnId=null,this.senderAgentName=null,this.senderAgentAddress=null,this.senderAgentProtocol=0,this.originalMsgId=null}_init($){if(this.payload=$.payload,$.correlation!==void 0)this.correlation=$.correlation;if($.delay!==void 0)this.delay=$.delay;if($.exceptionQueue!==void 0)this.exceptionQueue=$.exceptionQueue;if($.expiration!==void 0)this.expiration=$.expiration;if($.priority!==void 0)this.priority=$.priority;if($.recipients!==void 0)this.recipients=$.recipients}getNumAttempts(){return this.numAttempts}getCorrelation(){return this.correlation}getDelay(){return this.delay}getDeliveryMode(){return this.deliveryMode}getEnqTime(){return this.enqTime}getExceptionQueue(){return this.exceptionq}getExpiration(){return this.expiration}getMsgId(){return this.msgId}getOriginalMsgId(){return this.originalMsgId}getPayload(){return this.payload}getPriority(){return this.priority}getState(){return this.state}setCorrelation($){this.correlation=$}setDelay($){this.delay=$}setExceptionQueue($){this.exceptionq=$}setExpiration($){this.expiration=$}setPayloadBytes($){this.payload=$}setPayloadObject($){this.payload=$}setPayloadJson($){this.payload=$}setPriority($){this.priority=$}setRecipients($){this.recipients=$}}cA1.exports={ThinQueueImpl:uA1}});var rV0=o((jq5,sA1)=>{var{Buffer:iA1}=A0("buffer"),Hn6=ha(),zn6=AV0(),nV0=Tx(),Vn6=fD1(),{BaseBuffer:Fn6}=sq(),{NetworkSession:Ln6}=mV0(),{Statement:Dn6}=dV0(),Es=Cx(),OP=gF(),V4=E9(),nA1=A0("process"),D6=kY(),e8=O4(),KY=RA1(),Nn6=_A1(),{ThinQueueImpl:An6}=lA1(),Bn6=new global.FinalizationRegistry(($)=>{$.disconnect()});class rA1 extends Fn6{}class aA1 extends Hn6{async close(){try{if(this._protocol.txnInProgress){if(this.tpcContext){let $=this.createTpcRollbackMessage();await this._protocol._processMessage($)}else await this.rollback();this.tpcContext=null}if(this._drcpEnabled)await this._sessRelease(),this._drcpEstablishSession=!0;if(this._pool&&!this._dropSess)await this._pool.release(this);else{if(!this._drcpEnabled){let $=new KY.LogOffMessage(this);await this._protocol._processMessage($)}this.nscon.disconnect()}}catch($){if(this.nscon.disconnect(OP.NSFIMM),this._pool)await this._pool.release(this)}}async _sessRelease(){let $=new KY.SessionReleaseMessage(this);if(!this.isPooled())$.sessReleaseMode=V4.DRCP_DEAUTHENTICATE;await this._protocol._processMessage($)}async _getElementTypeObj($){let Y=[{name:"owner",type:D6.DB_TYPE_VARCHAR,dir:V4.BIND_IN,maxSize:128,values:[$.schema]},{name:"name",type:D6.DB_TYPE_VARCHAR,dir:V4.BIND_IN,maxSize:128,values:[$.name]},{name:"package_name",type:D6.DB_TYPE_VARCHAR,dir:V4.BIND_IN,maxSize:128,values:[$.packageName]}],X;if($.packageName)X=`
        select
            elem_type_owner,
            elem_type_name,
            elem_type_package
        from all_plsql_coll_types
        where owner = :owner
          and type_name = :name
          and package_name = :package_name`;else Y.pop(),X=`
        select
            elem_type_owner,
            elem_type_name
        from all_coll_types
        where owner = :owner
          and type_name = :name`;let G={connection:{_impl:this},prefetchRows:2},J=await this.execute(X,1,Y,G,!1),Q=await J.resultSet.getRows(1,G);await J.resultSet.close();let W=Q[0];if($.elementTypeClass=this._getDbObjectType(W[0],W[1],W[2]),$.elementTypeClass.partial)this._partialDbObjectTypes.push($.elementTypeClass)}async _execute($,Y,X,G,J,Q=[]){if(J&&$.isQuery)e8.throwErr(e8.ERR_EXECMANY_NOT_ALLOWED_ON_QUERIES);let W=$.bindInfoList.length,K=X.length;if(W!==K){if(!X[0]?.name)e8.throwErr(e8.ERR_WRONG_NUMBER_OF_BINDS,W,K);if($.bindInfoDict.size!==K)e8.throwErr(e8.ERR_WRONG_NUMBER_OF_BINDS,W,K)}for(let z=0;z<X.length;z++)await this._bind($,X[z],z+1,Q);if($.isPlSql&&(G.batchErrors||G.dmlRowCounts))e8.throwErr(e8.ERR_EXEC_MODE_ONLY_FOR_DML);let Z=new KY.ExecuteMessage(this,$,G);if(Z.numExecs=Y,Z.arrayDmlRowCounts=G.dmlRowCounts,Z.batchErrors=G.batchErrors,$.isPlSql&&($.cursorId===0||$.requiresFullExecute))Z.numExecs=1,Z.noImplicitRelease=!0,await this._protocol._processMessage(Z),$.requiresFullExecute=!1,Z.numExecs=Y-1,Z.offset=1,Z.noImplicitRelease=!1;if(Z.numExecs>0)await this._protocol._processMessage(Z),$.requiresFullExecute=!1;if($.requiresDefine&&$.sql)$.requiresFullExecute=!0,await this._protocol._processMessage(Z),$.requiresFullExecute=!1,$.requiresDefine=!1;let H={};if(Z.warning)H.warning=Z.warning;if($.numQueryVars>0)H.resultSet=Z.resultSet;else{$.bufferRowIndex=0;let z=Es.getOutBinds($,Y,J);if(z)H.outBinds=z;if(J){if(!$.isPlSql)H.rowsAffected=$.rowCount,delete $.rowCount;if(G.dmlRowCounts)H.dmlRowCounts=G.dmlRowCounts;if(G.batchErrors)H.batchErrors=G.batchErrors}else{if($.isPlSql&&G.implicitResultSet)H.implicitResults=G.implicitResultSet;if($.lastRowid)H.lastRowid=$.lastRowid,delete $.lastRowid;if($.isPlSql){if($.rowCount)H.rowsAffected=$.rowCount}else H.rowsAffected=$.rowCount||0;if($.rowCount)delete $.rowCount}this._returnStatement($)}return H}_parseTDSAttr($,Y){let X,G,J;for(;;)if(J=$.readUInt8(),J===V4.TNS_OBJ_TDS_TYPE_EMBED_ADT_INFO)$.skipBytes(1);else if(J!==V4.TNS_OBJ_TDS_TYPE_SUBTYPE_MARKER)break;let Q,W;switch(J){case V4.TNS_OBJ_TDS_TYPE_NUMBER:if(Q=$.readInt8(),W=$.readInt8(),Q||W)Y.precision=Q,Y.scale=W;return D6.DB_TYPE_NUMBER;case V4.TNS_OBJ_TDS_TYPE_FLOAT:if(Q=$.readInt8(),Q)Y.precision=Q;return D6.DB_TYPE_NUMBER;case V4.TNS_OBJ_TDS_TYPE_VARCHAR:case V4.TNS_OBJ_TDS_TYPE_CHAR:return Y.maxSize=$.readUInt16BE(),X=J===V4.TNS_OBJ_TDS_TYPE_VARCHAR?V4.TNS_DATA_TYPE_VARCHAR:V4.TNS_DATA_TYPE_CHAR,G=$.readUInt8(),G=G&127,$.skipBytes(2),D6.getTypeByOraTypeNum(X,G);case V4.TNS_OBJ_TDS_TYPE_RAW:return Y.maxSize=$.readUInt16BE(),D6.DB_TYPE_RAW;case V4.TNS_OBJ_TDS_TYPE_BINARY_FLOAT:return D6.DB_TYPE_BINARY_FLOAT;case V4.TNS_OBJ_TDS_TYPE_BINARY_DOUBLE:return D6.DB_TYPE_BINARY_DOUBLE;case V4.TNS_OBJ_TDS_TYPE_DATE:return D6.DB_TYPE_DATE;case V4.TNS_OBJ_TDS_TYPE_TIMESTAMP:return $.skipBytes(1),D6.DB_TYPE_TIMESTAMP;case V4.TNS_OBJ_TDS_TYPE_TIMESTAMP_LTZ:return $.skipBytes(1),D6.DB_TYPE_TIMESTAMP_LTZ;case V4.TNS_OBJ_TDS_TYPE_TIMESTAMP_TZ:return $.skipBytes(1),D6.DB_TYPE_TIMESTAMP_TZ;case V4.TNS_OBJ_TDS_TYPE_BOOLEAN:return D6.DB_TYPE_BOOLEAN;case V4.TNS_OBJ_TDS_TYPE_CLOB:return D6.DB_TYPE_CLOB;case V4.TNS_OBJ_TDS_TYPE_BLOB:return D6.DB_TYPE_BLOB;case V4.TNS_OBJ_TDS_TYPE_OBJ:return $.skipBytes(5),D6.DB_TYPE_OBJECT;case V4.TNS_OBJ_TDS_TYPE_START_EMBED_ADT:while(this._parseTDSAttr($,{})!==0)continue;return D6.DB_TYPE_OBJECT;case V4.TNS_OBJ_TDS_TYPE_END_EMBED_ADT:return 0;default:e8.throwErr(e8.ERR_TDS_TYPE_NOT_SUPPORTED,J)}}async _parseTDS($,Y){let X=new rA1($);X.skipBytes(4),X.skipBytes(2),X.skipBytes(2);let G=X.readUInt16BE();if(X.skipBytes(1),X.skipBytes(1),X.skipBytes(2),X.skipBytes(4),Y.isCollection=!1,G===1){let J=X.pos;if(X.readUInt8()===V4.TNS_OBJ_TDS_TYPE_COLL)Y.isCollection=!0;else X.pos=J}if(Y.isCollection){let J=X.readUInt32BE();if(Y.maxNumElements=X.readUInt32BE(),Y.collectionType=X.readUInt8(),Y.collectionType===V4.TNS_OBJ_PLSQL_INDEX_TABLE)Y.collectionFlags=V4.TNS_OBJ_HAS_INDEXES;if(X.pos=J,Y.elementTypeInfo={},Y.elementType=this._parseTDSAttr(X,Y.elementTypeInfo),Y.elementType===D6.DB_TYPE_OBJECT){if(await this._getElementTypeObj(Y),Y.elementTypeClass.isXmlType)Y.elementType=D6.DB_TYPE_XMLTYPE}}else if(Y.attributes)for(let J of Y.attributes)this._parseTDSAttr(X,J)}async _populateRowTypeInfo($,Y,X){let J=[{name:"owner",type:D6.DB_TYPE_VARCHAR,maxSize:128,dir:V4.BIND_IN,values:[X.outBinds.schema]},{name:"name",type:D6.DB_TYPE_VARCHAR,maxSize:128,dir:V4.BIND_IN,values:[$.name.substring(0,$.name.length-8)]}],Q=await this.execute(`
      SELECT
        column_name,
        data_type,
        data_type_owner,
        case
          when data_type in
            ('CHAR', 'NCHAR', 'VARCHAR2', 'NVARCHAR2', 'RAW')
            then data_length
          else 0
        end,
        case
          when data_precision is null and data_scale is null
            then 0
          when data_precision is null
            then 38
          else data_precision
        end,
        case
          when data_precision is null and data_scale is null
              and data_type = 'NUMBER'
            then -127
          when data_scale is null
            then 0
          else data_scale
        end
      from all_tab_cols
      where owner = :owner
        and table_name = :name
        and hidden_column != 'YES'
      order by column_id`,1,J,Y,!1);try{let W=await Q.resultSet._getAllRows();$.attributes=[];for(let K of W){let Z={name:K[0],dataType:K[1],dataTypeOwner:K[2],maxSize:K[3],dataPrecision:K[4],dataScale:K[5]};if(!Z.dataTypeOwner){let H=K[1].indexOf("("),z=K[1].indexOf(")");if(z>H)Z.dataType=Z.dataType.substring(0,H)+Z.dataType.substring(z+1,Z.dataType.length)}this._addAttr($.attributes,Z)}}finally{Q.resultSet.close()}}async _populateDbObjectTypeInfo($){let X=[{name:"full_name",type:D6.DB_TYPE_VARCHAR,dir:V4.BIND_INOUT,maxSize:500,values:[$]},{name:"ret_val",type:D6.DB_TYPE_BINARY_INTEGER,dir:V4.BIND_OUT,values:[]},{name:"oid",type:D6.DB_TYPE_RAW,maxSize:16,dir:V4.BIND_OUT,values:[]},{name:"version",type:D6.DB_TYPE_BINARY_INTEGER,dir:V4.BIND_OUT,values:[]},{name:"tds",type:D6.DB_TYPE_RAW,maxSize:2000,dir:V4.BIND_OUT,values:[]},{name:"attrs_rc",type:D6.DB_TYPE_CURSOR,dir:V4.BIND_OUT,values:[]},{name:"package_name",type:D6.DB_TYPE_VARCHAR,maxSize:128,dir:V4.BIND_OUT,values:[]},{name:"schema",type:D6.DB_TYPE_VARCHAR,maxSize:128,dir:V4.BIND_OUT,values:[]},{name:"name",type:D6.DB_TYPE_VARCHAR,maxSize:128,dir:V4.BIND_OUT,values:[]}],G={connection:{_impl:this},nullifyInvalidCursor:!0},J=await this.execute(`
      declare
          t_Instantiable              varchar2(3);
          t_SuperTypeOwner            varchar2(128);
          t_SuperTypeName             varchar2(128);
          t_SubTypeRefCursor          sys_refcursor;
          t_Pos                       pls_integer;
      begin
          :ret_val := dbms_pickler.get_type_shape(:full_name, :oid,
              :version, :tds, t_Instantiable, t_SuperTypeOwner,
              t_SuperTypeName, :attrs_rc, t_SubTypeRefCursor);
          :package_name := null;
          if substr(:full_name, length(:full_name) - 7) = '%ROWTYPE' then
              t_Pos := instr(:full_name, '.');
              :schema := substr(:full_name, 1, t_Pos - 1);
              :name := substr(:full_name, t_Pos + 1);
          else
              begin
                  select owner, type_name
                  into :schema, :name
                  from all_types
                  where type_oid = :oid;
              exception
              when no_data_found then
                  begin
                      select owner, package_name, type_name
                      into :schema, :package_name, :name
                      from all_plsql_types
                      where type_oid = :oid;
                  exception
                  when no_data_found then
                      null;
                  end;
              end;
          end if;
      end;`,1,X,G,!1);if(J.outBinds.ret_val!==0)e8.throwErr(e8.ERR_INVALID_OBJECT_TYPE_NAME,$);try{let Q=this._getDbObjectType(J.outBinds.schema,J.outBinds.name,J.outBinds.package_name,J.outBinds.oid);if(!Q.partial)return Q;if(Q.name.endsWith("%ROWTYPE"))await this._populateRowTypeInfo(Q,G,J);else{Q.version=J.outBinds.version;let W=await J.outBinds.attrs_rc._getAllRows();if(W.length>0){Q.attributes=[];for(let K of W){let Z={name:K[1],dataType:K[3],dataTypeOwner:K[4],packageName:K[5],oid:K[6]};this._addAttr(Q.attributes,Z)}}await this._parseTDS(J.outBinds.tds,Q)}return Q.partial=!1,Q}finally{J.outBinds.attrs_rc.close()}}_addAttr($,Y){let X={name:Y.name};if(Y.dataTypeOwner){if(X.type=D6.DB_TYPE_OBJECT,X.typeClass=this._getDbObjectType(Y.dataTypeOwner,Y.dataType,Y.packageName,Y.oid),X.typeClass.isXmlType)X.type=D6.DB_TYPE_XMLTYPE;if(X.typeClass.partial)this._partialDbObjectTypes.push(X.typeClass)}else if(Y.dataType==="INTEGER"||Y.dataType==="SMALLINT")X.type=D6.DB_TYPE_NUMBER,X.precision=38,X.scale=0;else if(Y.dataType==="REAL")X.type=D6.DB_TYPE_NUMBER,X.precision=63,X.scale=-127;else if(Y.dataType==="DOUBLE PRECISION"||Y.dataType==="FLOAT"){if(X.type=D6.DB_TYPE_NUMBER,Y.dataPrecision!=null||Y.dataPrecision!=null)X.precision=Number(Y.dataPrecision);else X.precision=126;X.scale=-127}else{if(X.type=D6.getTypeByColumnTypeName(Y.dataType),Y.maxSize!=null||Y.maxSize!=null){let G=Number(Y.maxSize);if(G)X.maxSize=G}if(X.type===D6.DB_TYPE_NUMBER)X.precision=Number(Y.dataPrecision),X.scale=Number(Y.dataScale)}$.push(X)}async _populatePartialDbObjectTypes(){while(this._partialDbObjectTypes.length>0){let $=this._partialDbObjectTypes.pop(),Y="%ROWTYPE",X=$.name;if(X.endsWith(Y))X=X.substring(0,X.length-Y.length);else Y="";let G;if($.packageName)G=`"${$.schema}"."${$.packageName}"."${X}"${Y}`;else G=`"${$.schema}"."${X}"${Y}`;await this._populateDbObjectTypeInfo(G)}}async commit(){let $=new KY.CommitMessage(this);await this._protocol._processMessage($)}async breakExecution(){await this._protocol.breakMessage()}isCompressionEnabled(){return this.nscon.compressionEnabled}isHealthy(){try{if(this.nscon.recvInbandNotif()===0)return!0;return!1}catch{return!1}}isPooled(){return this._pool?!0:!1}_postConnect($){let Y,X,G,J;this.dbDomain=$.sessionData.AUTH_SC_DB_DOMAIN,this.dbName=$.sessionData.AUTH_DBNAME,this.maxOpenCursors=Number($.sessionData.AUTH_MAX_OPEN_CURSORS||0),this.serviceName=$.sessionData.AUTH_SC_SERVICE_NAME,this.instanceName=$.sessionData.AUTH_INSTANCENAME,this.maxIdentifierLength=Number($.sessionData.AUTH_MAX_IDEN_LENGTH||30);let Q=Number($.sessionData.AUTH_VERSION_NO),W=Q>>24&255;if(this.warning=$.warning,this._protocol.caps.ttcFieldVersion>=V4.TNS_CCAP_FIELD_VERSION_18_1_EXT_1)Y=Q>>16&255,X=Q>>12&15,G=Q>>4&255,J=Q&15;else Y=Q>>20&15,X=Q>>12&255,G=Q>>8&15,J=Q&255;this.serverVersionString=W+"."+Y+"."+X+"."+G+"."+J,this.serverVersion=W*1e8+Y*1e6+X*1e4+G*100+J*1}async connect($){if(!$.connectString)e8.throwErr(e8.ERR_EMPTY_CONNECT_STRING);Es.checkCredentials($),this.sessionID=0,this.serialNum=0,this.autoCommit=!1,this.serverVersion="",this.statementCache=null,this.currentSchema="",this.invokeSessionCallback=!0,this.statementCacheSize=$.stmtCacheSize,this._currentSchemaModified=!1,this._tempLobsToClose=[],this._tempLobsTotalSize=0,this._drcpEstablishSession=!1,this._cclass=null,this._clientIdentifier="",this._clientIdentifierModified=!1,this._action="",this._actionModified=!1,this._dbOp="",this._dbOpModified=!1,this._clientInfo="",this._clientInfoModified=!1,this._module="",this._moduleModified=!1,this._drcpEnabled=!1,this.serviceName="",this.remoteAddress="",this.comboKey=null,this.tpcContext=null,this._sessionlessData=null,this.nscon=new Ln6,Bn6.register(this,this.nscon),await this.nscon.connect($);let Y;if(this.isPooled())Y=$._connInfo[0],this.serviceName=$._connInfo[2],this.purity=$._connInfo[3]|V4.PURITY_DEFAULT,this.sid=$._connInfo[4];else Y=this.nscon.getOption(OP.SERVERTYPE),this.serviceName=this.nscon.getOption(OP.SVCNAME),this.sid=this.nscon.getOption(OP.SID),this.purity=this.nscon.getOption(OP.PURITY)|V4.PURITY_DEFAULT;if(Y)this._drcpEnabled=Y.toLowerCase()==="pooled";if(this.remoteAddress=this.nscon.getOption(OP.REMOTEADDR),this.connectionClass=$.connectionClass,this.purity===V4.PURITY_DEFAULT&&this._drcpEnabled)if(this.isPooled())this.purity=V4.PURITY_SELF;else this.purity=V4.PURITY_NEW;if(this._protocol=new Vn6(this),this._protocol.caps.protocolVersion<V4.TNS_VERSION_MIN_ACCEPTED)e8.throwErr(e8.ERR_SERVER_VERSION_NOT_SUPPORTED);try{let X=new KY.ProtocolMessage(this),G=new KY.DataTypeMessage(this),J=new KY.AuthMessage(this,$);if(this.nscon.supportsFastAuth){let Q=new KY.FastAuthMessage(this);if(Q.protocolMessage=X,Q.dataTypeMessage=G,Q.authMessage=J,await this._protocol._processMessage(Q),Q.reNegotiate)await this._protocol._processMessage(G),await this._protocol._processMessage(J)}else{let Q=this.nscon.endOfRequestSupport;this.nscon.endOfRequestSupport=!1,await this._protocol._processMessage(X),await this._protocol._processMessage(G),this.nscon.endOfRequestSupport=Q,await this._protocol._processMessage(J)}if(!$.externalAuth)await this._protocol._processMessage(J);this._postConnect(J)}catch(X){throw this.nscon.disconnect(),X}if(this.statementCache=new Nn6(this.statementCacheSize),this._partialDbObjectTypes=[],$.debugJDWP)this.jdwpData=iA1.from($.debugJDWP);else if(nA1.env.ORA_DEBUG_JDWP)this.jdwpData=iA1.from(nA1.env.ORA_DEBUG_JDWP);this._protocol.connInProgress=!1}_returnStatement($){this.statementCache.returnStatement($)}_prepare($,Y){let X=this._getStatement($,Y.keepInStmtCache);return X.bufferRowIndex=0,X.bufferRowCount=0,X.lastRowIndex=0,X.moreRowsToFetch=!0,X}async _bind($,Y,X=0,G=[]){let{bindInfoDict:J,bindInfoList:Q}=$;if($.isPlSql&&Y.maxSize>32767){if(Y.type===D6.DB_TYPE_RAW||Y.type===D6.DB_TYPE_LONG_RAW)Y.type=D6.DB_TYPE_BLOB;else if(Y.type._csfrm===V4.CSFRM_NCHAR)Y.type=D6.DB_TYPE_NCLOB;else Y.type=D6.DB_TYPE_CLOB;let W=Y.maxSize;delete Y.maxSize,Y.outConverter=async function(K){if(K===null)return null;let Z=await K.getData(),H=K._length;if(Z&&H>W)e8.throwErr(e8.ERR_INSUFFICIENT_BUFFER_FOR_BINDS);return Z}}if(Y.type===D6.DB_TYPE_CLOB||Y.type===D6.DB_TYPE_NCLOB||Y.type===D6.DB_TYPE_BLOB){for(let[W,K]of Y.values.entries())if(!(K instanceof nV0))if(K&&K.length>0){let Z=new nV0;await Z.create(this,Y.type),G.push(Z),await Z.write(1,K),Y.values[W]=Z}else Y.values[W]=null}if(Y.name){let W;if(Y.name.startsWith('"')&&Y.name.endsWith('"'))W=Y.name.substring(1,Y.name.length-1);else W=Y.name.toUpperCase();if(W.startsWith(":"))W=Y.name.substring(1);if(!J.has(W))e8.throwErr(e8.ERR_INVALID_BIND_NAME,W);J.get(W).forEach((K)=>{$._setVariable(K,Y)})}else{let W=Q[X-1];$._setVariable(W,Y)}}_createResultSet($,Y){let X=new zn6;if(!Y)Y=new Dn6;if(X._resultSetNew(this,Y,$),Y.queryVars.length>0){let G=Es.getMetadataMany(Y.queryVars);X._setup($,G)}return X}async getDbObjectClass($){let Y=await this._populateDbObjectTypeInfo($);return await this._populatePartialDbObjectTypes(),Y}async getStatementInfo($){let Y={},X={},G=this._prepare($,Y);Y.connection=this;try{if(!G.isDdl){let J=new KY.ExecuteMessage(this,G,Y);J.parseOnly=!0,await this._protocol._processMessage(J)}if(G.numQueryVars>0)X.metaData=Es.getMetadataMany(G.queryVars);return X.bindNames=Array.from(G.bindInfoDict.keys()),X.statementType=G.statementType,X}finally{this._returnStatement(G)}}async execute($,Y,X,G,J){let Q=this._prepare($,G),W=[];try{return await this._execute(Q,Y,X,G,J,W)}catch(K){throw this._returnStatement(Q),K}finally{for(let K of W)this._tempLobsToClose.push(K._locator),this._tempLobsTotalSize+=K._locator.length}}_getStatement($,Y=!1){return this.statementCache.getStatement($,Y,this._drcpEstablishSession)}async ping(){let $=new KY.PingMessage(this);await this._protocol._processMessage($)}async rollback(){let $=new KY.RollbackMessage(this);await this._protocol._processMessage($)}getOracleServerVersion(){return this.serverVersion}getOracleServerVersionString(){return this.serverVersionString}setCurrentSchema($){this._currentSchemaModified=!0,this.currentSchema=$}getCurrentSchema(){return this.currentSchema}setClientId($){this._clientIdentifierModified=!0,this._clientIdentifier=$}setDbOp($){this._dbOpModified=!0,this._dbOp=$}setExternalName($){this.externalName=$}setInternalName($){this.internalName=$}setClientInfo($){this._clientInfoModified=!0,this._clientInfo=$}setModule($){this._moduleModified=!0,this._module=$,this._actionModified=!0}setAction($){this._actionModified=!0,this._action=$}async changePassword($,Y,X){let G={user:$,newPassword:X,password:Y,changePassword:!0},J=new KY.AuthMessage(this,G);await this._protocol._processMessage(J)}async createLob($){let Y=new nV0;return await Y.create(this,$),Y}checkTpcCommitState($,Y){if(Y&&$!==V4.TNS_TPC_TXN_STATE_READ_ONLY&&$!==V4.TNS_TPC_TXN_STATE_COMMITTED||!Y&&$!==V4.TNS_TPC_TXN_STATE_FORGOTTEN)e8.throwErr(e8.ERR_UNKNOWN_TRANSACTION_STATE,$)}createTpcCommitMessage($,Y){let X=new KY.TransactionChangeStateMessage(this);return X.operation=V4.TNS_TPC_TXN_COMMIT,X.state=Y==0?V4.TNS_TPC_TXN_STATE_COMMITTED:V4.TNS_TPC_TXN_STATE_READ_ONLY,X.xid=$,X.context=this.tpcContext,X}createTpcRollbackMessage($=null){let Y=new KY.TransactionChangeStateMessage(this);return Y.operation=V4.TNS_TPC_TXN_ABORT,Y.state=V4.TNS_TPC_TXN_STATE_ABORTED,Y.xid=$,Y.context=this.tpcContext,Y}async tpcBegin($,Y,X){let G=new KY.TransactionSwitchMessage(this);G.operation=V4.TNS_TPC_TXN_START,G.xid=$,G.flags=Y,G.timeout=X,await this._protocol._processMessage(G),this.tpcContext=G.context}async tpcCommit($,Y){let X=this.createTpcCommitMessage($,Y);await this._protocol._processMessage(X),this.checkTpcCommitState(X.state,Y)}async tpcEnd($,Y){let X=new KY.TransactionSwitchMessage(this);X.operation=V4.TNS_TPC_TXN_DETACH,X.xid=$,X.context=this.tpcContext,X.flags=Y,await this._protocol._processMessage(X),this.tpcContext=null}async tpcPrepare($){let Y=new KY.TransactionChangeStateMessage(this);if(Y.operation=V4.TNS_TPC_TXN_PREPARE,Y.xid=$,Y.context=this.tpcContext,await this._protocol._processMessage(Y),Y.state===V4.TNS_TPC_TXN_STATE_REQUIRES_COMMIT)return!0;else if(Y.state===V4.TNS_TPC_TXN_STATE_READ_ONLY)return!1;e8.throwErr(e8.ERR_UNKNOWN_TRANSACTION_STATE,Y.state)}async tpcRollback($){let Y=this.createTpcRollbackMessage($);if(await this._protocol._processMessage(Y),Y.state!==V4.TNS_TPC_TXN_STATE_ABORTED)e8.throwErr(e8.ERR_UNKNOWN_TRANSACTION_STATE,Y.state)}_validateSessionlessState(){if(this._sessionlessData?.startedOnServer)e8.throwErr(e8.ERR_SESSIONLESS_DIFFERING_METHODS)}async startSessionlessTransaction($,Y,X,G){if(this._validateSessionlessState(),this._sessionlessData)e8.throwErr(e8.ERR_SESSIONLESS_ALREADY_ACTIVE);let J=new KY.TransactionSwitchMessage(this);if(J.xid={globalTransactionId:$,branchQualifier:"",formatId:V4.TNS_TPC_TRANS_SESSIONLESS_FORMAT},J.timeout=Y,J.operation=V4.TNS_TPC_TXN_START,J.flags=V4.TNS_TPC_TRANS_SESSIONLESS|X,G)J.messageType=V4.TNS_MSG_TYPE_PIGGYBACK,this._sessionlessData={piggyback:J,pending:!0};else await this._protocol._processMessage(J)}async suspendSessionlessTransaction(){if(this._validateSessionlessState(),!this._sessionlessData)e8.throwErr(e8.ERR_SESSIONLESS_INACTIVE);let $=new KY.TransactionSwitchMessage(this);$.operation=V4.TNS_TPC_TXN_DETACH,$.flags=V4.TNS_TPC_TRANS_SESSIONLESS,await this._protocol._processMessage($)}getStmtCacheSize(){return this.statementCache._maxSize}setCallTimeout($){this._protocol.callTimeout=$}getCallTimeout(){return this._protocol.callTimeout}getTag(){return""}getExternalName(){return this.externalName}getInstanceName(){return this.instanceName}getInternalName(){return this.internalName}getLTXID(){return this._ltxid}getDbDomain(){return this.dbDomain}getHostName(){return this.nscon.ntAdapter.hostName}getPort(){return this.nscon.ntAdapter.port}getProtocol(){return this.nscon.ntAdapter.secure?"TCPS":"TCP"}getDbName(){return this.dbName}getMaxOpenCursors(){return this.maxOpenCursors}getMaxIdentifierLength(){return this.maxIdentifierLength}getServiceName(){return this.serviceName}getTransactionInProgress(){return this._protocol.txnInProgress}getWarning(){return this.warning}getQueue($,Y,X){return new An6(this,$,Y,X)}}sA1.exports=aA1});var eA1=o((Tq5,tA1)=>{var On6=Sz0(),En6=rV0(),kG=JP(),T2=O4(),Mn6=w2(),Ms=GY(),Rn6=Cx(),{getConnectionInfo:qn6}=mV0(),Pn6=A0("crypto"),wn6=A0("timers");class oA1 extends On6{_init($){if(!$.homogeneous)T2.throwErr(T2.ERR_NOT_IMPLEMENTED,"Heterogeneous Pooling");if(!$.connectString)T2.throwErr(T2.ERR_EMPTY_CONNECT_STRING);if(Rn6.checkCredentials($),this._availableObjects=[],this._name="node-thin",this._poolMin=$.poolMin,this._poolMax=$.poolMax,this._poolIncrement=$.poolIncrement,this._poolTimeout=$.poolTimeout,this._poolPingInterval=$.poolPingInterval,this._poolPingTimeout=$.poolPingTimeout,this._maxLifetimeSession=$.maxLifetimeSession||0,this._stmtCacheSize=$.stmtCacheSize,this._userConfig=$,this._freeConnectionList=[],this._usedConnectionList=new Set,this._password=$.password,this._walletPassword=$.walletPassword,this._walletContent=$.walletContent,this._obfuscatedPassword=[],this._obfuscatedWalletPassword=[],this._token=$.token,this._obfuscatedToken=[],this._privateKey=$.privateKey,this._obfuscatedPrivateKey=[],this._schedulerJob=null,this._poolCloseWaiter=null,this._pendingRequests=[],this._connsToDrop=[],this._bgCleaner=null,this._poolCloseCleaner=null,this._password!==void 0){let Y=kG.setObfuscatedValue(this._password);this._password=Y.value,this._obfuscatedPassword=Y.obfuscatedValue,this._userConfig.password=null}if(this._walletPassword!==void 0){let Y=kG.setObfuscatedValue(this._walletPassword);this._walletPassword=Y.value,this._obfuscatedWalletPassword=Y.obfuscatedValue,this._userConfig.walletPassword=null}if(this._walletContent!==void 0){let Y=kG.setObfuscatedValue(this._walletContent);this._walletContent=Y.value,this._obfuscatedWalletContent=Y.obfuscatedValue,this._userConfig.walletConent=null}if(this._token!==void 0){let Y=kG.setObfuscatedValue(this._token);this._token=Y.value,this._obfuscatedToken=Y.obfuscatedValue,this._userConfig.token=null}if(this._privateKey!==void 0){let Y=kG.setObfuscatedValue(this._privateKey);this._privateKey=Y.value,this._obfuscatedPrivateKey=Y.obfuscatedValue,this._userConfig.privateKey=null}this._accessTokenFn=$.accessTokenFn,this._accessTokenConfig=$.accessTokenConfig,this._isDRCPEnabled=!1,this._implicitPool=null}async create($){if(this._init($),this._userConfig._connInfo=await qn6($),this._isDRCPEnabled=String(this._userConfig._connInfo[0]).toLowerCase()==="pooled",this._isDRCPEnabled&&Mn6.connectionClass==="")this._generateConnectionClass();this.bgThreadFunc(),this._bgConnCleaner()}setAccessToken($){if($.token){this._token=$.token;let Y=kG.setObfuscatedValue(this._token);this._token=Y.value,this._obfuscatedToken=Y.obfuscatedValue}if($.privateKey){this._privateKey=$.privateKey;let Y=kG.setObfuscatedValue(this._privateKey);this._privateKey=Y.value,this._obfuscatedPrivateKey=Y.obfuscatedValue}}async _getConnAttrs(){let $,Y=Object.assign({},this._userConfig);if(Y.password===null)Y.password=kG.getDeobfuscatedValue(this._password,this._obfuscatedPassword);if(Y.walletPassword===null)Y.walletPassword=kG.getDeobfuscatedValue(this._walletPassword,this._obfuscatedWalletPassword);if(Y.walletContent===null)Y.walletContent=kG.getDeobfuscatedValue(this._walletContent,this._obfuscatedWalletContent);if(Y.token===null){if(Y.token=kG.getDeobfuscatedValue(this._token,this._obfuscatedToken),Ms.isTokenExpired(Y.token))if(typeof this._accessTokenFn==="function"){try{$=await this._accessTokenFn(!0,this._accessTokenConfig)}catch(X){T2.throwWrapErr(X,T2.ERR_ACCESS_TOKEN)}if(typeof $==="string")if(Y.token=$,Ms.isTokenExpired(Y.token))T2.throwErr(T2.ERR_TOKEN_HAS_EXPIRED);else{let X=kG.setObfuscatedValue(Y.token);this._token=X.value,this._obfuscatedToken=X.obfuscatedValue}else if(typeof $==="object")if(Y.token=$.token,Y.privateKey=Ms.denormalizePrivateKey($.privateKey),Ms.isTokenExpired(Y.token))T2.throwErr(T2.ERR_TOKEN_HAS_EXPIRED);else{let X=kG.setObfuscatedValue(Y.token);this._token=X.value,this._obfuscatedToken=X.obfuscatedValue;let G=kG.setObfuscatedValue(Y.privateKey);this._privateKey=G.value,this._obfuscatedPrivateKey=G.obfuscatedValue}}else T2.throwErr(T2.ERR_TOKEN_HAS_EXPIRED)}if(Y.privateKey===null)Y.privateKey=kG.getDeobfuscatedValue(this._privateKey,this._obfuscatedPrivateKey);return Y}async getConnection(){return await this.acquire()}async _destroy($){try{if($.nscon.ntAdapter.connected)$._dropSess=!0,await $.close()}catch(Y){return}}async close(){if(await new Promise(($)=>{if(this._poolCloseWaiter=$,this.bgWaiter)this.bgWaiter()}),this._schedulerJob)clearTimeout(this._schedulerJob),this._schedulerJob=null;for(let $ of this._freeConnectionList)await this._destroy($);for(let $ of this._usedConnectionList)await this._destroy($);await new Promise(($)=>{if(this._poolCloseCleaner=$,this._bgCleaner)this._bgCleaner()})}getPoolMax(){return this._poolMax}getPoolMin(){return this._poolMin}getConnectionsInUse(){return this._usedConnectionList.size}getConnectionsOpen(){return this._freeConnectionList.length+this._usedConnectionList.size}getPoolIncrement(){return this._poolIncrement}getPoolMaxPerShard(){return}getPoolPingInterval(){return this._poolPingInterval}getPoolPingTimeout(){return this._poolPingTimeout}getPoolTimeout(){return this._poolTimeout}getMaxLifetimeSession(){return this._maxLifetimeSession}getSodaMetaDataCache(){return}getStmtCacheSize(){return this._stmtCacheSize}_setScheduler(){if(!this._schedulerJob&&this._poolTimeout>0&&this._freeConnectionList.length>0&&this._freeConnectionList.length+this._usedConnectionList.size>this._poolMin)this._schedulerJob=setTimeout(()=>{this._scanIdleConnection()},this._poolTimeout*1000)}_scanIdleConnection(){while(this._usedConnectionList.size+this._freeConnectionList.length>this._poolMin&&this._freeConnectionList.length>0){let $=this._freeConnectionList[0];if(Date.now()-$._lastTimeUsed<this._poolTimeout*1000)break;this._connsToDrop.push($),this._freeConnectionList.shift()}if(this._bgCleaner)this._bgCleaner();this._schedulerJob=null,this._setScheduler()}_getNumConnsToCreate(){let $=this._freeConnectionList.length+this._usedConnectionList.size;if($<this._poolMin)return this._poolMin-$;else if(this._pendingRequests.length>0)return Math.min(this._poolIncrement,this._poolMax-$);else return 0}async bgThreadFunc(){while(!this._poolCloseWaiter){let $=this._getNumConnsToCreate();for(let Y=0;Y<$;Y++){try{let X=await this._getConnAttrs(),G=new En6;G._pool=this,await G.connect(X),G._newSession=!0,G._dropSess=!1,G._creationTime=Date.now(),G._lastTimeUsed=Date.now(),this._freeConnectionList.push(G)}catch(X){this._bgErr=X}if(this._poolIncrement>1&&this._poolMax-this._usedConnectionList.size-this._freeConnectionList.length>1)this._setScheduler();if(this._pendingRequests.length>0)this._pendingRequests.shift().resolve();if(await new Promise((X)=>wn6.setImmediate(X)),this._poolCloseWaiter)break}if(this._poolCloseWaiter)break;if((this._pendingRequests.length==0||this._bgErr)&&this.getConnectionsOpen()>=this._poolMin)await new Promise((Y)=>{this.bgWaiter=Y}),this.bgWaiter=null}this._poolCloseWaiter()}async _bgConnCleaner(){while(!this._poolCloseCleaner){if(this._connsToDrop.length==0)await new Promise(($)=>this._bgCleaner=$);while(this._connsToDrop.length)await this._destroy(this._connsToDrop.pop())}this._poolCloseCleaner()}async acquire(){while(this._freeConnectionList.length>0){let Y=this._freeConnectionList.pop();if(!this._shouldRetainInPool(Y)){this._invokeBgCleaner(Y);continue}let X=!1;if(this._poolPingInterval===0)X=!0;else if(this._poolPingInterval>0){if(Date.now()-Y._lastTimeUsed>this._poolPingInterval*1000)X=!0}if(X){let G;try{if(this._poolPingTimeout)G=setTimeout(()=>{Y.nscon.forceDisconnect()},this._poolPingTimeout);await Y.ping()}catch{Y.nscon.forceDisconnect();continue}finally{clearTimeout(G)}}return this._usedConnectionList.add(Y),Y}if(await new Promise((Y)=>{if(this._pendingRequests.push({resolve:Y}),this.bgWaiter)this.bgWaiter()}),this._bgErr){let Y=this._bgErr;if(this._bgErr=null,this._pendingRequests.length>0&&this.bgWaiter)this.bgWaiter();throw Y}let $=this._freeConnectionList.pop();return this._usedConnectionList.add($),$}release($){if($.warning=void 0,this._usedConnectionList.delete($),$.nscon.connected)if($._lastTimeUsed=Date.now(),$._newSession=!1,this.getConnectionsOpen()<this._poolMax&&this._shouldRetainInPool($))this._freeConnectionList.push($);else this._invokeBgCleaner($);this._setScheduler()}_generateConnectionClass(){this._userConfig.connectionClass=Pn6.randomBytes(16).toString("base64"),this._userConfig.connectionClass="NJS:"+this._userConfig.connectionClass}reconfigure($){if($.poolIncrement!==void 0)this._poolIncrement=$.poolIncrement;if($.poolTimeout!==void 0&&this._poolTimeout!==$.poolTimeout){if(this._poolTimeout=$.poolTimeout,this._schedulerJob)clearTimeout(this._schedulerJob),this._schedulerJob=null}if($.poolPingInterval!==void 0)this._poolPingInterval=$.poolPingInterval;if($.stmtCacheSize!==void 0)this._stmtCacheSize=$.stmtCacheSize;if($.poolMax!==void 0)this._poolMax=$.poolMax;if($.poolMin!==void 0)this._poolMin=$.poolMin;if($.maxLifetimeSession!==void 0)this._maxLifetimeSession=$.maxLifetimeSession;let Y=this.getConnectionsOpen()-this._poolMax;while(this._freeConnectionList.length&&Y>0){let X=this._freeConnectionList.pop();this._connsToDrop.push(X),Y--}if(this._bgCleaner)this._bgCleaner()}_invokeBgCleaner($){if(this._connsToDrop.push($),this._bgCleaner)this._bgCleaner();if(this.getConnectionsOpen()<this._poolMin&&this.bgWaiter)this.bgWaiter()}_shouldRetainInPool($){if(!$.isHealthy())return!1;if(this._maxLifetimeSession!==0){if(Date.now()-$._creationTime>this._maxLifetimeSession*1000)return!1}return!0}}tA1.exports=oA1});var $B1=o(()=>{var _n6=rV0(),jn6=AV0(),Tn6=eA1(),In6=Tx(),{ThinDbObjectImpl:Cn6}=ea(),xx=GP();xx.ConnectionImpl=_n6;xx.ResultSetImpl=jn6;xx.PoolImpl=Tn6;xx.LobImpl=In6;xx.DbObjectImpl=Cn6});var cF=o((Sq5,KB1)=>{var __dirname="/root/package_linux_2.0/node_modules/oracledb/lib",K1=SY(),S6=GY(),m0=O4(),h6=kY(),XB1=GP(),sV0=A0("process"),Sn6=A0("util"),aV0=sV0.version.substring(1).split(".").map(Number);m0.assert(aV0[0]>14||aV0[0]===14&&aV0[1]>=17,m0.ERR_NODE_TOO_OLD,S6.PACKAGE_JSON_VERSION,"14.17");var kn6=hz0(),vn6=gz0(),xn6=mz0(),Rs=JP(),yn6=tz0(),bn6=kz0(),hn6=xa(),fn6=QP(),GB1=HV0(),gn6=iA(),JB1=oL1(),mn6=zV0(),un6=da(),Y4=w2(),pn6=ZV0(),dn6=WV0(),cn6=YV0(),ln6=ZP(),in6=JV0(),EP={},qs={},bx="default",oV0=[],Ps=new Map,yx,XB;function nn6($){let X=typeof sV0<"u"&&sV0.versions?.node?typeof __webpack_require__==="function"?__non_webpack_require__:A0:void 0,G=["../"+S6.RELEASE_DIR+"/"+S6.BINARY_FILE,"../"+S6.RELEASE_DIR+"/"+S6.BUILD_FILE,"../build/Debug/"+S6.BUILD_FILE,"./node_modules/oracledb/"+S6.RELEASE_DIR+"/"+S6.BINARY_FILE,"./node_modules/oracledb/"+S6.RELEASE_DIR+"/"+S6.BUILD_FILE];if($.binaryDir!==void 0)G.splice(0,0,$.binaryDir+"/"+S6.BINARY_FILE,$.binaryDir+"/"+S6.BUILD_FILE);let J;for(let Q=0;Q<G.length;Q++)try{J=X(G[Q]);break}catch(W){if(W.code!=="MODULE_NOT_FOUND"||Q==G.length-1){let K;if(W.code==="MODULE_NOT_FOUND")K=`
  Looked for ${G.map((Z)=>A0("path").resolve(__dirname,Z)).join(", ")}
  ${S6.getInstallURL()}
`;else K=`
  Node.js require('oracledb') error was:
  ${W.message}
  ${S6.getInstallHelp()}
`;m0.throwErr(m0.ERR_CANNOT_LOAD_BINARY,K)}}return J}function QB1(){$B1()}async function WB1($,Y){let X={};if($=await Yr6($),$.user!==void 0)m0.assertParamPropValue(typeof $.user==="string",1,"user"),X.user=$.user;if($.username!==void 0)m0.assert(X.user===void 0,m0.ERR_DBL_USER),m0.assertParamPropValue(typeof $.username==="string",1,"username"),X.user=$.username;if($.password!==void 0)m0.assertParamPropValue(typeof $.password==="string",1,"password"),X.password=$.password;if($.connectString!==void 0)m0.assertParamPropValue(typeof $.connectString==="string",1,"connectString"),X.connectString=$.connectString;if($.connectionString!==void 0)m0.assert(X.connectString===void 0,m0.ERR_DBL_CONNECT_STRING),m0.assertParamPropValue(typeof $.connectionString==="string",1,"connectionString"),X.connectString=$.connectionString;if($.walletPassword!==void 0)m0.assertParamPropValue(typeof $.walletPassword==="string",1,"walletPassword"),X.walletPassword=$.walletPassword;if($.walletLocation!==void 0)m0.assertParamPropValue(typeof $.walletLocation==="string",1,"walletLocation"),X.walletLocation=$.walletLocation;if($.networkCompression!==void 0)m0.assertParamPropValue(typeof $.networkCompression==="boolean",1,"networkCompression"),X.networkCompression=$.networkCompression,X.networkCompressionLevels=[],X.networkCompressionLevels.push("high");if($.networkCompressionThreshold!==void 0)m0.assertParamPropValue(Number.isInteger($.networkCompressionThreshold),1,"networkCompressionThreshold"),X.networkCompressionThreshold=$.networkCompressionThreshold;if($.walletContent!==void 0)m0.assertParamPropValue(typeof $.walletContent==="string",1,"walletContent"),X.walletContent=$.walletContent;if($.edition!==void 0)m0.assertParamPropValue(typeof $.edition==="string",1,"edition"),X.edition=$.edition;if($.stmtCacheSize!==void 0)m0.assertParamPropValue(Number.isInteger($.stmtCacheSize)&&$.stmtCacheSize>=0,1,"stmtCacheSize"),X.stmtCacheSize=$.stmtCacheSize;if(X.externalAuth=Y4.externalAuth,$.externalAuth!==void 0)m0.assertParamPropValue(typeof $.externalAuth==="boolean",1,"externalAuth"),X.externalAuth=$.externalAuth;if($.events!==void 0)m0.assertParamPropValue(typeof $.events==="boolean",1,"events"),X.events=$.events;if($.poolAlias!==void 0)m0.assertParamPropValue(typeof $.poolAlias==="string"&&$.poolAlias.length>0,1,"poolAlias"),X.poolAlias=$.poolAlias;if($.configDir!==void 0)m0.assertParamPropValue(typeof $.configDir==="string",1,"configDir"),X.configDir=$.configDir;if($.sslServerCertDN!==void 0)m0.assertParamPropValue(typeof $.sslServerCertDN==="string",1,"sslServerCertDN"),X.sslServerCertDN=$.sslServerCertDN;if($.sslServerDNMatch!==void 0)m0.assertParamPropValue(typeof $.sslServerDNMatch==="boolean",1,"sslServerDNMatch"),X.sslServerDNMatch=$.sslServerDNMatch;if($.sslAllowWeakDNMatch!==void 0)m0.assertParamPropValue(typeof $.sslAllowWeakDNMatch==="boolean",1,"sslAllowWeakDNMatch"),X.sslAllowWeakDNMatch=$.sslAllowWeakDNMatch;if($.httpsProxy!==void 0)m0.assertParamPropValue(typeof $.httpsProxy==="string",1,"httpsProxy"),X.httpsProxy=$.httpsProxy;if($.httpsProxyPort!==void 0)m0.assertParamPropValue(Number.isInteger($.httpsProxyPort)&&$.httpsProxyPort>=0,1,"httpsProxyPort"),X.httpsProxyPort=$.httpsProxyPort;if($.retryCount!==void 0)m0.assertParamPropValue(Number.isInteger($.retryCount)&&$.retryCount>=0,1,"retryCount"),X.retryCount=$.retryCount;if($.retryDelay!==void 0)m0.assertParamPropValue(Number.isInteger($.retryDelay)&&$.retryDelay>=0,1,"retryDelay"),X.retryDelay=$.retryDelay;if($.connectTimeout!==void 0)m0.assertParamPropValue(Number.isInteger($.connectTimeout)&&$.connectTimeout>=0,1,"connectTimeout"),X.connectTimeout=$.connectTimeout;if($.transportConnectTimeout!==void 0)m0.assertParamPropValue(Number.isInteger($.transportConnectTimeout)&&$.transportConnectTimeout>=0,1,"transportConnectTimeout"),X.transportConnectTimeout=$.transportConnectTimeout;if($.expireTime!==void 0)m0.assertParamPropValue(Number.isInteger($.expireTime)&&$.expireTime>=0,1,"expireTime"),X.expireTime=$.expireTime;if($.sdu!==void 0)m0.assertParamPropValue(Number.isInteger($.sdu)&&$.sdu>0,1,"sdu"),X.sdu=$.sdu;if($.connectionIdPrefix!==void 0)m0.assertParamPropValue(typeof $.connectionIdPrefix==="string",1,"connectionIdPrefix"),X.connectionIdPrefix=$.connectionIdPrefix;if($.privilege!==void 0)m0.assertParamPropValue(S6.isPrivilege($.privilege),1,"privilege"),X.privilege=$.privilege;if($.machine!==void 0)S6.assertParamPropNetworkName($,1,"machine"),X.machine=$.machine;if($.osUser!==void 0)S6.assertParamPropNetworkName($,1,"osUser"),X.osUser=$.osUser;if($.driverName!==void 0)m0.assertParamPropValue(typeof $.driverName==="string",1,"driverName"),X.driverName=$.driverName;if($.program!==void 0)S6.assertParamPropNetworkName($,1,"program"),X.program=$.program;if($.terminal!==void 0)m0.assertParamPropValue(typeof $.terminal==="string",1,"terminal"),X.terminal=$.terminal;if($.useSNI!==void 0)m0.assertParamPropValue(typeof $.useSNI==="boolean",1,"useSNI"),X.useSNI=$.useSNI;if($.appContext!==void 0){let G=$.appContext;m0.assertParamPropValue(S6.isAppContext(G),1,"appContext"),X.appContext=$.appContext}if(Y){if($.poolMax!==void 0)m0.assertParamPropValue(Number.isInteger($.poolMax)&&$.poolMax>0,1,"poolMax"),X.poolMax=$.poolMax;if($.poolMaxPerShard!==void 0)m0.assertParamPropValue(Number.isInteger($.poolMaxPerShard)&&$.poolMaxPerShard>=0,1,"poolMaxPerShard"),X.poolMaxPerShard=$.poolMaxPerShard;if($.poolMin!==void 0)m0.assertParamPropValue(Number.isInteger($.poolMin)&&$.poolMin>=0,1,"poolMin"),X.poolMin=$.poolMin;if($.poolIncrement!==void 0)m0.assertParamPropValue(Number.isInteger($.poolIncrement)&&$.poolIncrement>=0,1,"poolIncrement"),X.poolIncrement=$.poolIncrement;if($.poolTimeout!==void 0)m0.assertParamPropValue(Number.isInteger($.poolTimeout)&&$.poolTimeout>=0,1,"poolTimeout"),X.poolTimeout=$.poolTimeout;if($.poolPingInterval!==void 0)m0.assertParamPropValue(Number.isInteger($.poolPingInterval)&&$.poolPingInterval>=-2147483648&&$.poolPingInterval<=2147483647,1,"poolPingInterval"),X.poolPingInterval=$.poolPingInterval;if($.poolPingTimeout!==void 0)m0.assertParamPropValue(Number.isInteger($.poolPingTimeout)&&$.poolPingTimeout>=0,1,"poolPingTimeout"),X.poolPingTimeout=$.poolPingTimeout;if($.maxLifetimeSession!==void 0)m0.assertParamPropValue(Number.isInteger($.maxLifetimeSession)&&$.maxLifetimeSession>=0,1,"maxLifetimeSession"),X.maxLifetimeSession=$.maxLifetimeSession;if(X.homogeneous=!0,$.homogeneous!==void 0)m0.assertParamPropValue(typeof $.homogeneous==="boolean",1,"homogeneous"),X.homogeneous=$.homogeneous;if($.queueTimeout!==void 0)m0.assertParamPropValue(Number.isInteger($.queueTimeout)&&$.queueTimeout>=0,1,"queueTimeout"),X.queueTimeout=$.queueTimeout;if($.queueMax!==void 0)m0.assertParamPropValue(Number.isInteger($.queueMax),1,"queueMax"),X.queueMax=$.queueMax;if(X.sodaMetaDataCache=!1,$.sodaMetaDataCache!==void 0)m0.assertParamPropValue(typeof $.sodaMetaDataCache==="boolean",1,"sodaMetaDataCache"),X.sodaMetaDataCache=$.sodaMetaDataCache;if($.sessionCallback!==void 0)m0.assertParamPropValue(typeof $.sessionCallback==="string"||typeof $.sessionCallback==="function",1,"sessionCallback"),X.sessionCallback=$.sessionCallback;if(X.enableStatistics=!1,$.enableStatistics!==void 0)m0.assertParamPropValue(typeof $.enableStatistics==="boolean",1,"enableStatistics"),X.enableStatistics=$.enableStatistics;if(!X.enableStatistics&&$._enableStats!==void 0)m0.assertParamPropValue(typeof $._enableStats==="boolean",1,"_enableStats"),X.enableStatistics=$._enableStats}else{if($.newPassword!==void 0)m0.assertParamPropValue(typeof $.newPassword==="string",1,"newPassword"),X.newPassword=$.newPassword;if($.shardingKey!==void 0){let G=$.shardingKey;m0.assertParamPropValue(S6.isShardingKey(G),1,"shardingKey"),X.shardingKey=$.shardingKey}if($.superShardingKey!==void 0){let G=$.superShardingKey;m0.assertParamPropValue(S6.isShardingKey(G),1,"superShardingKey"),X.superShardingKey=$.superShardingKey}}if($.accessToken!==void 0){if(m0.assert(X.user===void 0&&X.password===void 0,m0.ERR_TOKEN_BASED_AUTH),Y)m0.assert(X.homogeneous&&X.externalAuth,m0.ERR_POOL_TOKEN_BASED_AUTH);else m0.assert(X.externalAuth,m0.ERR_CONN_TOKEN_BASED_AUTH);let G;if(typeof $.accessToken==="function"){X.accessTokenFn=$.accessToken,X.accessTokenConfig=$.accessTokenConfig;try{if(G=await $.accessToken(!1,X.accessTokenConfig),!S6.isTokenValid(G))G=await $.accessToken(!0,X.accessTokenConfig)}catch(J){m0.throwWrapErr(J,m0.ERR_ACCESS_TOKEN)}}else G=$.accessToken;if(m0.assert(S6.isTokenValid(G),m0.ERR_TOKEN_HAS_EXPIRED),G.privateKey!==void 0)m0.assert(typeof G.privateKey==="string",m0.ERR_TOKEN_BASED_AUTH),G.privateKey=S6.denormalizePrivateKey(G.privateKey);if(typeof G==="string")X.token=G;else X.token=G.token,X.privateKey=G.privateKey}if(X.token===void 0&&X.externalAuth){if(X.password)m0.throwErr(m0.ERR_WRONG_CRED_FOR_EXTAUTH);if(X.user){if(Y&&!Y4.thin)m0.throwErr(m0.ERR_WRONG_CRED_FOR_EXTAUTH);else if(X.user[0]!=="["||X.user.slice(-1)!=="]")m0.throwErr(m0.ERR_WRONG_USER_FORMAT_EXTAUTH_PROXY)}}return X}async function rn6($){let Y;m0.assertArgCount(arguments,1,1),m0.assertParamValue(S6.isObject($),1);for(let J of oV0)try{await J($)}catch(Q){m0.throwWrapErr(Q,m0.ERR_CALLOUT_FN)}$=await WB1($,!0);let X=$.sessionCallback;if(typeof X==="function")delete $.sessionCallback;if($.poolAlias!==void 0)Y=$.poolAlias;else if($.poolAlias===void 0&&!EP[bx]&&!qs[bx])Y=bx;if(EP[Y]||qs[Y])m0.throwErr(m0.ERR_POOL_WITH_ALIAS_ALREADY_EXISTS,Y);if(Y4.addToOptions($,"connectionClass","driverName","edition","events","externalAuth","machine","osUser","stmtCacheSize","poolMax","poolMaxPerShard","poolMin","poolIncrement","poolTimeout","poolPingInterval","poolPingTimeout","program","terminal","queueMax","queueTimeout"),$.poolMin>$.poolMax)m0.throwErr(m0.ERR_INVALID_NUMBER_OF_CONNECTIONS,$.poolMax,$.poolMin);if(XB===void 0&&!Y4.thinDriverInitialized)QB1();if(Y)qs[Y]=!0;let G=new JB1;G._impl._connectString=$.connectString,G._impl._user=$.user;try{await G._impl.create($)}finally{if(Y)delete qs[Y]}if(Y)EP[Y]=G;if(G._setup($,Y),G._sessionCallback=X,G.on("_afterPoolClose",()=>{if(G.poolAlias)delete EP[G.poolAlias]}),XB===void 0)Y4.thinDriverInitialized=!0;return G}async function an6($){let{NLParamParser:Y,tnsnamesFilePath:X}=hV0(),G=new Y,J=X($);return[...(await G.initializeNlpa(J)).keys()]}async function sn6($){let Y={},X;if(m0.assertArgCount(arguments,0,1),arguments.length==0)X=bx;else if(typeof $==="string")X=$;else Y=$,m0.assertParamValue(S6.isObject(Y),1),X=Y.poolAlias;if(X){let J=EP[X];return m0.assert(J,m0.ERR_POOL_WITH_ALIAS_NOT_FOUND,X),await J.getConnection(Y)}for(let J of oV0)try{await J(Y)}catch(Q){m0.throwWrapErr(Q,m0.ERR_CALLOUT_FN)}if(Y=await WB1(Y,!1),Y4.addToOptions(Y,"connectionClass","driverName","edition","events","externalAuth","machine","osUser","program","stmtCacheSize","terminal"),XB===void 0&&!Y4.thinDriverInitialized)QB1();let G=new GB1;if(G._impl=new XB1.ConnectionImpl,G._impl._connectString=Y.connectString,G._impl._user=Y.user,await G._impl.connect(Y),XB===void 0)Y4.thinDriverInitialized=!0;return G}function on6($){if(m0.assertArgCount(arguments,0,1),$)m0.assertParamValue(typeof $==="string"||typeof $==="number",1);$=$||bx;let Y=EP[$];if(!Y)m0.throwErr(m0.ERR_POOL_WITH_ALIAS_NOT_FOUND,$);return Y}function tn6($){let Y={};if(m0.assertArgCount(arguments,0,1),$!==void 0)m0.assertParamValue(S6.isObject($),1),Y={...$},m0.assertParamPropString(Y,1,"libDir"),m0.assertParamPropString(Y,1,"configDir"),m0.assertParamPropString(Y,1,"errorUrl"),m0.assertParamPropString(Y,1,"driverName"),m0.assertParamPropString(Y,1,"binaryDir");if(Y4.thinDriverInitialized)m0.throwErr(m0.ERR_THIN_CONNECTION_ALREADY_CREATED);if(XB===void 0){let X=nn6(Y);if(Y.driverName===void 0)Y.driverName=K1.DEFAULT_DRIVER_NAME+" thk";if(Y.errorUrl===void 0)Y.errorUrl=K1.DEFAULT_ERROR_URL;try{X.initOracleClient(Y,XB1,Y4)}catch(G){let J=m0.transformErr(G);if(J.code==="DPI-1047")J.message+=`
`+S6.getInstallHelp();throw J}XB=$||{}}else if(!Sn6.isDeepStrictEqual(XB,Y))m0.throwErr(m0.ERR_INIT_ORACLE_CLIENT_ARGS);Y4.thin=!1}async function en6($,Y){let X={},G=K1.SHUTDOWN_MODE_DEFAULT;if(m0.assertArgCount(arguments,0,2),arguments.length==2)m0.assertParamValue(typeof $==="object",1),m0.assertParamValue(typeof Y==="number",2),X=$,G=Y;else if(arguments.length==1)m0.assertParamValue(typeof $==="object",1),X=$;let J={user:X.user,password:X.password,connectString:X.connectString,connectionString:X.connectionString,externalAuth:X.externalAuth,privilege:K1.SYSOPER},Q=await this.getConnection(J);if(await Q.shutdown(G),G!=this.SHUTDOWN_MODE_ABORT)await Q.execute("ALTER DATABASE CLOSE"),await Q.execute("ALTER DATABASE DISMOUNT"),await Q.shutdown(this.SHUTDOWN_MODE_FINAL);await Q.close()}async function $r6($,Y,X){let G={},J="njs",Q=$.njs;for(let W in Q){let K=Q[W];G[W]=K}if(G.connectString=$.connect_descriptor,G.configTTL=$.config_time_to_live,!G.connectString)m0.throwErr(m0.ERR_CONFIG_PROVIDER_FAILED_TO_RETRIEVE_CONFIG,"connect_descriptor must be set");if(G.user=$.user,$.password)G.password=await YB1($.password,Y,X);if($.wallet_location){if(G.walletContent=await YB1($.wallet_location,Y,X),!S6.isPemFile(G.walletContent))m0.throwErr(m0.ERR_WALLET_TYPE_NOT_SUPPORTED)}return G}async function YB1($,Y,X){let G=new Map,J=$.authentication;if(J)for(let W in J){if(W=="method")G.set("authentication",J[W]);let K=J[W];G.set(W.toLowerCase(),K)}let Q={};if($.type=="base64")return console.log("WARNING: Base64 Encoding in a JSON Password should only be used in development environments"),Buffer.from($.value,"base64").toString("utf-8");else if($.type=="text")if(X=="azurevault"||X=="ocivault")return console.log("WARNING: Plain Text in a JSON Password should only be used in development environments"),$.value;else m0.throwErr(m0.ERR_CONFIG_PROVIDER_PARAM_TYPE,"password type text is only allowed in ocivault and azurevault");else if($.type=="azurevault"){if(G.set("azuresecreturl",$.value),!(X=="azure"||X=="azurevault"))Y=null;let W=Ps.azurevault;if(W==null)m0.throwErr(m0.ERR_REGISTER_HOOKFN_CONFIGPROVIDER,"azurevault");return Q.credential=Y,Q.paramMap=G,(await W(Q))[0]}else if($.type=="ocivault"){if(G.set("ocidvault",$.value),!(X=="ociobject"||X=="ocivault"))Y=null;let W=Ps.ocivault;if(W==null)m0.throwErr(m0.ERR_REGISTER_HOOKFN_CONFIGPROVIDER,"ocivault");let K={};return K.credential=Y,K.paramMap=G,(await W(K))[0]}else m0.throwErr(m0.ERR_CONFIG_PROVIDER_PARAM_TYPE,"password/wallet_location")}async function Yr6($){let Y=Y4.configProviderCacheTimeout*1000,X,G,J=$.connectString||$.connectionString;if(!J)return $;if(yx&&(G=yx.get(J))){let Q=G.cacheOpts;if(Q.configTTL)Y=Q.configTTL*1000;if(Date.now()-G.timeAdded<Y){if(X={...Q},X.password)X.password=Rs.getDeobfuscatedValue(X.password.value,X.password.obfuscatedValue);if(X.walletContent)X.walletContent=Rs.getDeobfuscatedValue(X.walletContent.value,X.walletContent.obfuscatedValue)}}if(!X){let Q=J,W,K=new RegExp("^config-(?<provider>[A-Za-z0-9]+)(://)(?<provider_arg>[^?]+)");if(J.indexOf("?")!=-1)Q=J.substring(0,J.indexOf("?")),W=J.substring(J.indexOf("?"),J.length);let Z=Q.match(K);if(Z){let H=Z.groups.provider,z=Z.groups.provider_arg,V=Ps[H];if(V==null)m0.throwErr(m0.ERR_REGISTER_HOOKFN_CONFIGPROVIDER,H);let F={};F.provider_arg=z,F.urlExtendedPart=W;try{let L=await V(F);if(X=L[0],!yx)yx=new Map;if(!X)m0.throwErr(m0.ERR_CONFIG_PROVIDER_FAILED_TO_RETRIEVE_CONFIG,"no configuration found in "+H);if(H!="azure")X=await $r6(X,L[1],H);let N={...X};if(X.password)N.password=Rs.setObfuscatedValue(X.password);if(X.walletContent)N.walletContent=Rs.setObfuscatedValue(X.walletContent);yx.set(J,{cacheOpts:N,timeAdded:Date.now()})}catch(L){m0.throwErr(m0.ERR_CONFIG_PROVIDER_FAILED_TO_RETRIEVE_CONFIG,L.message)}}}if(X)$=Xr6(X,$);return $}function Xr6($,Y){if(Y={...Y},!Y.user)Y.user=$.user;if(!Y.password)Y.password=$.password;if($.connectString)Y.connectString=$.connectString,Y.connectionString=void 0;if($.walletContent)Y.walletContent=$.walletContent;if($.poolMin)Y.poolMin=$.poolMin;if($.poolMax)Y.poolMax=$.poolMax;if($.poolIncrement)Y.poolIncrement=$.poolIncrement;if($.poolTimeout)Y.poolTimeout=$.poolTimeout;if($.poolPingInterval)Y.poolPingInterval=$.poolPingInterval;if($.poolPingTimeout)Y.poolPingTimeout=$.poolPingTimeout;if($.stmtCacheSize)Y.stmtCacheSize=$.stmtCacheSize;if($.prefetchRows)Y.prefetchRows=$.prefetchRows;if($.lobPrefetch)Y.lobPrefetch=$.lobPrefetch;return Y}async function Gr6($,Y){let X={},G={};if(m0.assertArgCount(arguments,0,2),arguments.length==2)m0.assertParamValue(typeof $==="object",1),m0.assertParamValue(typeof Y==="object",2),X=$,G=Y;else if(arguments.length==1)m0.assertParamValue(typeof $==="object",1),X=$;let J={user:X.user,password:X.password,connectString:X.connectString,connectionString:X.connectionString,externalAuth:X.externalAuth,privilege:this.SYSOPER|this.SYSPRELIM},Q=await this.getConnection(J);await Q.startup(G),await Q.close(),J.privilege=this.SYSOPER,Q=await this.getConnection(J),await Q.execute("ALTER DATABASE MOUNT"),await Q.execute("ALTER DATABASE OPEN"),await Q.close()}function Jr6($){m0.assertArgCount(arguments,1,1),m0.assertParamValue(typeof $==="function",1),oV0.push($)}function Qr6($,Y){m0.assertArgCount(arguments,2,2),m0.assertParamValue(typeof Y==="function",1),m0.assertParamValue(typeof $==="string",1),Ps[$]=Y}KB1.exports={AqDeqOptions:kn6,AqEnqOptions:vn6,AqMessage:xn6,AqQueue:yn6,BaseDbObject:fn6,Connection:GB1,JsonId:h6.JsonId,Lob:gn6,Pool:JB1,PoolStatistics:mn6,ResultSet:un6,SodaDatabase:pn6,SodaCollection:dn6,SodaDocCursor:cn6,SodaDocument:ln6,SodaOperation:in6,SparseVector:h6.SparseVector,IntervalYM:h6.IntervalYM,IntervalDS:h6.IntervalDS,getConnection:S6.callbackify(S6.wrapFn(sn6)),createPool:S6.callbackify(S6.wrapFn(rn6)),getNetworkServiceNames:S6.callbackify(S6.wrapFn(an6)),getPool:on6,initOracleClient:tn6,registerProcessConfigurationHook:Jr6,registerConfigurationProviderHook:Qr6,shutdown:S6.callbackify(S6.wrapFn(en6)),startup:S6.callbackify(S6.wrapFn(Gr6)),CQN_OPCODE_ALL_OPS:K1.CQN_OPCODE_ALL_OPS,CQN_OPCODE_ALL_ROWS:K1.CQN_OPCODE_ALL_ROWS,CQN_OPCODE_ALTER:K1.CQN_OPCODE_ALTER,CQN_OPCODE_DELETE:K1.CQN_OPCODE_DELETE,CQN_OPCODE_DROP:K1.CQN_OPCODE_DROP,CQN_OPCODE_INSERT:K1.CQN_OPCODE_INSERT,CQN_OPCODE_UPDATE:K1.CQN_OPCODE_UPDATE,DB_TYPE_BFILE:h6.DB_TYPE_BFILE,DB_TYPE_BINARY_DOUBLE:h6.DB_TYPE_BINARY_DOUBLE,DB_TYPE_BINARY_FLOAT:h6.DB_TYPE_BINARY_FLOAT,DB_TYPE_BINARY_INTEGER:h6.DB_TYPE_BINARY_INTEGER,DB_TYPE_BLOB:h6.DB_TYPE_BLOB,DB_TYPE_BOOLEAN:h6.DB_TYPE_BOOLEAN,DB_TYPE_CHAR:h6.DB_TYPE_CHAR,DB_TYPE_CLOB:h6.DB_TYPE_CLOB,DB_TYPE_CURSOR:h6.DB_TYPE_CURSOR,DB_TYPE_DATE:h6.DB_TYPE_DATE,DB_TYPE_INTERVAL_DS:h6.DB_TYPE_INTERVAL_DS,DB_TYPE_INTERVAL_YM:h6.DB_TYPE_INTERVAL_YM,DB_TYPE_JSON:h6.DB_TYPE_JSON,DB_TYPE_LONG:h6.DB_TYPE_LONG,DB_TYPE_LONG_NVARCHAR:h6.DB_TYPE_LONG_NVARCHAR,DB_TYPE_LONG_RAW:h6.DB_TYPE_LONG_RAW,DB_TYPE_NCHAR:h6.DB_TYPE_NCHAR,DB_TYPE_NCLOB:h6.DB_TYPE_NCLOB,DB_TYPE_NUMBER:h6.DB_TYPE_NUMBER,DB_TYPE_NVARCHAR:h6.DB_TYPE_NVARCHAR,DB_TYPE_OBJECT:h6.DB_TYPE_OBJECT,DB_TYPE_RAW:h6.DB_TYPE_RAW,DB_TYPE_ROWID:h6.DB_TYPE_ROWID,DB_TYPE_TIMESTAMP:h6.DB_TYPE_TIMESTAMP,DB_TYPE_TIMESTAMP_LTZ:h6.DB_TYPE_TIMESTAMP_LTZ,DB_TYPE_TIMESTAMP_TZ:h6.DB_TYPE_TIMESTAMP_TZ,DB_TYPE_VARCHAR:h6.DB_TYPE_VARCHAR,DB_TYPE_XMLTYPE:h6.DB_TYPE_XMLTYPE,DB_TYPE_VECTOR:h6.DB_TYPE_VECTOR,DEFAULT:K1.DEFAULT,STMT_TYPE_UNKNOWN:K1.STMT_TYPE_UNKNOWN,STMT_TYPE_SELECT:K1.STMT_TYPE_SELECT,STMT_TYPE_UPDATE:K1.STMT_TYPE_UPDATE,STMT_TYPE_DELETE:K1.STMT_TYPE_DELETE,STMT_TYPE_INSERT:K1.STMT_TYPE_INSERT,STMT_TYPE_CREATE:K1.STMT_TYPE_CREATE,STMT_TYPE_DROP:K1.STMT_TYPE_DROP,STMT_TYPE_ALTER:K1.STMT_TYPE_ALTER,STMT_TYPE_BEGIN:K1.STMT_TYPE_BEGIN,STMT_TYPE_DECLARE:K1.STMT_TYPE_DECLARE,STMT_TYPE_CALL:K1.STMT_TYPE_CALL,STMT_TYPE_EXPLAIN_PLAN:K1.STMT_TYPE_EXPLAIN_PLAN,STMT_TYPE_MERGE:K1.STMT_TYPE_MERGE,STMT_TYPE_ROLLBACK:K1.STMT_TYPE_ROLLBACK,STMT_TYPE_COMMIT:K1.STMT_TYPE_COMMIT,SHUTDOWN_MODE_DEFAULT:K1.SHUTDOWN_MODE_DEFAULT,SHUTDOWN_MODE_TRANSACTIONAL:K1.SHUTDOWN_MODE_TRANSACTIONAL,SHUTDOWN_MODE_TRANSACTIONAL_LOCAL:K1.SHUTDOWN_MODE_TRANSACTIONAL_LOCAL,SHUTDOWN_MODE_IMMEDIATE:K1.SHUTDOWN_MODE_IMMEDIATE,SHUTDOWN_MODE_ABORT:K1.SHUTDOWN_MODE_ABORT,SHUTDOWN_MODE_FINAL:K1.SHUTDOWN_MODE_FINAL,STARTUP_MODE_DEFAULT:K1.STARTUP_MODE_DEFAULT,STARTUP_MODE_FORCE:K1.STARTUP_MODE_FORCE,STARTUP_MODE_RESTRICT:K1.STARTUP_MODE_RESTRICT,SUBSCR_EVENT_TYPE_SHUTDOWN:K1.SUBSCR_EVENT_TYPE_SHUTDOWN,SUBSCR_EVENT_TYPE_SHUTDOWN_ANY:K1.SUBSCR_EVENT_TYPE_SHUTDOWN_ANY,SUBSCR_EVENT_TYPE_STARTUP:K1.SUBSCR_EVENT_TYPE_STARTUP,SUBSCR_EVENT_TYPE_DEREG:K1.SUBSCR_EVENT_TYPE_DEREG,SUBSCR_EVENT_TYPE_OBJ_CHANGE:K1.SUBSCR_EVENT_TYPE_OBJ_CHANGE,SUBSCR_EVENT_TYPE_QUERY_CHANGE:K1.SUBSCR_EVENT_TYPE_QUERY_CHANGE,SUBSCR_EVENT_TYPE_AQ:K1.SUBSCR_EVENT_TYPE_AQ,SUBSCR_GROUPING_CLASS_TIME:K1.SUBSCR_GROUPING_CLASS_TIME,SUBSCR_GROUPING_TYPE_SUMMARY:K1.SUBSCR_GROUPING_TYPE_SUMMARY,SUBSCR_GROUPING_TYPE_LAST:K1.SUBSCR_GROUPING_TYPE_LAST,SUBSCR_NAMESPACE_AQ:K1.SUBSCR_NAMESPACE_AQ,SUBSCR_NAMESPACE_DBCHANGE:K1.SUBSCR_NAMESPACE_DBCHANGE,SUBSCR_QOS_BEST_EFFORT:K1.SUBSCR_QOS_BEST_EFFORT,SUBSCR_QOS_DEREG_NFY:K1.SUBSCR_QOS_DEREG_NFY,SUBSCR_QOS_QUERY:K1.SUBSCR_QOS_QUERY,SUBSCR_QOS_RELIABLE:K1.SUBSCR_QOS_RELIABLE,SUBSCR_QOS_ROWIDS:K1.SUBSCR_QOS_ROWIDS,SYSASM:K1.SYSASM,SYSBACKUP:K1.SYSBACKUP,SYSDBA:K1.SYSDBA,SYSDG:K1.SYSDG,SYSKM:K1.SYSKM,SYSOPER:K1.SYSOPER,SYSPRELIM:K1.SYSPRELIM,SYSRAC:K1.SYSRAC,BIND_IN:K1.BIND_IN,BIND_INOUT:K1.BIND_INOUT,BIND_OUT:K1.BIND_OUT,OUT_FORMAT_ARRAY:K1.OUT_FORMAT_ARRAY,OUT_FORMAT_OBJECT:K1.OUT_FORMAT_OBJECT,SODA_COLL_MAP_MODE:K1.SODA_COLL_MAP_MODE,POOL_STATUS_OPEN:K1.POOL_STATUS_OPEN,POOL_STATUS_DRAINING:K1.POOL_STATUS_DRAINING,POOL_STATUS_CLOSED:K1.POOL_STATUS_CLOSED,POOL_STATUS_RECONFIGURING:K1.POOL_STATUS_RECONFIGURING,AQ_DEQ_NO_WAIT:K1.AQ_DEQ_NO_WAIT,AQ_DEQ_WAIT_FOREVER:K1.AQ_DEQ_WAIT_FOREVER,AQ_DEQ_MODE_BROWSE:K1.AQ_DEQ_MODE_BROWSE,AQ_DEQ_MODE_LOCKED:K1.AQ_DEQ_MODE_LOCKED,AQ_DEQ_MODE_REMOVE:K1.AQ_DEQ_MODE_REMOVE,AQ_DEQ_MODE_REMOVE_NO_DATA:K1.AQ_DEQ_MODE_REMOVE_NO_DATA,AQ_DEQ_NAV_FIRST_MSG:K1.AQ_DEQ_NAV_FIRST_MSG,AQ_DEQ_NAV_NEXT_TRANSACTION:K1.AQ_DEQ_NAV_NEXT_TRANSACTION,AQ_DEQ_NAV_NEXT_MSG:K1.AQ_DEQ_NAV_NEXT_MSG,AQ_MSG_DELIV_MODE_PERSISTENT:K1.AQ_MSG_DELIV_MODE_PERSISTENT,AQ_MSG_DELIV_MODE_BUFFERED:K1.AQ_MSG_DELIV_MODE_BUFFERED,AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED:K1.AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED,AQ_MSG_STATE_READY:K1.AQ_MSG_STATE_READY,AQ_MSG_STATE_WAITING:K1.AQ_MSG_STATE_WAITING,AQ_MSG_STATE_PROCESSED:K1.AQ_MSG_STATE_PROCESSED,AQ_MSG_STATE_EXPIRED:K1.AQ_MSG_STATE_EXPIRED,AQ_VISIBILITY_IMMEDIATE:K1.AQ_VISIBILITY_IMMEDIATE,AQ_VISIBILITY_ON_COMMIT:K1.AQ_VISIBILITY_ON_COMMIT,TPC_BEGIN_JOIN:K1.TPC_BEGIN_JOIN,TPC_BEGIN_NEW:K1.TPC_BEGIN_NEW,TPC_BEGIN_PROMOTE:K1.TPC_BEGIN_PROMOTE,TPC_BEGIN_RESUME:K1.TPC_BEGIN_RESUME,TPC_END_NORMAL:K1.TPC_END_NORMAL,TPC_END_SUSPEND:K1.TPC_END_SUSPEND,VECTOR_FORMAT_FLOAT32:K1.VECTOR_FORMAT_FLOAT32,VECTOR_FORMAT_FLOAT64:K1.VECTOR_FORMAT_FLOAT64,VECTOR_FORMAT_INT8:K1.VECTOR_FORMAT_INT8,VECTOR_FORMAT_BINARY:K1.VECTOR_FORMAT_BINARY,BLOB:h6.DB_TYPE_BLOB,BUFFER:h6.DB_TYPE_RAW,CLOB:h6.DB_TYPE_CLOB,CURSOR:h6.DB_TYPE_CURSOR,DATE:h6.DB_TYPE_TIMESTAMP,NCLOB:h6.DB_TYPE_NCLOB,NUMBER:h6.DB_TYPE_NUMBER,STRING:h6.DB_TYPE_VARCHAR,ARRAY:K1.OUT_FORMAT_ARRAY,OBJECT:K1.OUT_FORMAT_OBJECT,traceHandler:hn6,future:bn6,get autoCommit(){return Y4.autoCommit},get connectionClass(){return Y4.connectionClass},get dbObjectAsPojo(){return Y4.dbObjectAsPojo},get edition(){return Y4.edition},get errorOnConcurrentExecute(){return Y4.errorOnConcurrentExecute},get events(){return Y4.events},get externalAuth(){return Y4.externalAuth},get fetchArraySize(){return Y4.fetchArraySize},get fetchAsBuffer(){return Y4.fetchAsBuffer},get fetchAsString(){return Y4.fetchAsString},get fetchTypeHandler(){return Y4.fetchTypeHandler},get dbObjectTypeHandler(){return Y4.dbObjectTypeHandler},get lobPrefetchSize(){return Y4.lobPrefetchSize},get maxRows(){return Y4.maxRows},get oracleClientVersion(){return Y4.oracleClientVersion},get oracleClientVersionString(){return Y4.oracleClientVersionString},get outFormat(){return Y4.outFormat},get poolIncrement(){return Y4.poolIncrement},get poolMax(){return Y4.poolMax},get poolMaxPerShard(){return Y4.poolMaxPerShard},get poolMin(){return Y4.poolMin},get poolPingInterval(){return Y4.poolPingInterval},get poolPingTimeout(){return Y4.poolPingTimeout},get poolTimeout(){return Y4.poolTimeout},get prefetchRows(){return Y4.prefetchRows},get stmtCacheSize(){return Y4.stmtCacheSize},get configProviderCacheTimeout(){return Y4.configProviderCacheTimeout},get thin(){return Y4.thin},get version(){return K1.VERSION_MAJOR*1e4+K1.VERSION_MINOR*100+K1.VERSION_PATCH},get versionString(){return K1.VERSION_STRING},get versionSuffix(){return K1.VERSION_SUFFIX},set autoCommit($){m0.assertPropValue(typeof $==="boolean","autoCommit"),Y4.autoCommit=$},set connectionClass($){m0.assertPropValue(typeof $==="string","connectionClass"),Y4.connectionClass=$},set dbObjectAsPojo($){m0.assertPropValue(typeof $==="boolean","dbObjectAsPojo"),Y4.dbObjectAsPojo=$},set driverName($){m0.assertPropValue(typeof $==="string","driverName"),Y4.driverName=$},set edition($){m0.assertPropValue(typeof $==="string","edition"),Y4.edition=$},set errorOnConcurrentExecute($){m0.assertPropValue(typeof $==="boolean","errorOnConcurrentExecute"),Y4.errorOnConcurrentExecute=$},set events($){m0.assertPropValue(typeof $==="boolean","events"),Y4.events=$},set externalAuth($){m0.assertPropValue(typeof $==="boolean","externalAuth"),Y4.externalAuth=$},set fetchArraySize($){m0.assertPropValue(Number.isInteger($)&&$>0,"fetchArraySize"),Y4.fetchArraySize=$},set fetchAsBuffer($){m0.assertPropValue(Array.isArray($),"fetchAsBuffer"),Y4.createFetchTypeMap(Y4.fetchAsString,$),Y4.fetchAsBuffer=$},set fetchAsString($){m0.assertPropValue(Array.isArray($),"fetchAsString"),Y4.createFetchTypeMap($,Y4.fetchAsBuffer),Y4.fetchAsString=$},set fetchTypeHandler($){if($!==void 0)m0.assertPropValue(typeof $==="function","fetchTypeHandler");Y4.fetchTypeHandler=$},set dbObjectTypeHandler($){if($!==void 0)m0.assertPropValue(typeof $==="function","dbObjectTypeHandler");Y4.dbObjectTypeHandler=$},set lobPrefetchSize($){m0.assertPropValue(Number.isInteger($)&&$>=0,"lobPrefetchSize"),Y4.lobPrefetchSize=$},set machine($){m0.assertPropValue(typeof $==="string","machine");let Y=S6.sanitize($);m0.assertPropValue($==Y,"machine"),Y4.machine=$},set maxRows($){m0.assertPropValue(Number.isInteger($)&&$>=0,"maxRows"),Y4.maxRows=$},set osUser($){m0.assertPropValue(typeof $==="string","osUser");let Y=S6.sanitize($);m0.assertPropValue($==Y,"osUser"),Y4.osUser=$},set outFormat($){if($!==K1.OUT_FORMAT_ARRAY&&$!==K1.OUT_FORMAT_OBJECT)m0.throwErr(m0.ERR_INVALID_PROPERTY_VALUE,"outFormat");Y4.outFormat=$},set poolIncrement($){m0.assertPropValue(Number.isInteger($)&&$>=0,"poolIncrement"),Y4.poolIncrement=$},set poolMax($){m0.assertPropValue(Number.isInteger($)&&$>=0,"poolMax"),Y4.poolMax=$},set poolMaxPerShard($){m0.assertPropValue(Number.isInteger($)&&$>=0,"poolMaxPerShard"),Y4.poolMaxPerShard=$},set poolMin($){m0.assertPropValue(Number.isInteger($)&&$>=0,"poolMin"),Y4.poolMin=$},set poolPingInterval($){m0.assertPropValue(Number.isInteger($)&&$<2147483648&&$>=-2147483648,"poolPingInterval"),Y4.poolPingInterval=$},set poolPingTimeout($){m0.assertPropValue(Number.isInteger($)&&$>=0,"poolPingTimeout"),Y4.poolPingTimeout=$},set poolTimeout($){m0.assertPropValue(Number.isInteger($)&&$>=0,"poolTimeout"),Y4.poolTimeout=$},set prefetchRows($){m0.assertPropValue(Number.isInteger($)&&$>=0,"prefetchRows"),Y4.prefetchRows=$},set program($){m0.assertPropValue(typeof $==="string","program");let Y=S6.sanitize($);m0.assertPropValue($==Y,"program"),Y4.program=$},set stmtCacheSize($){m0.assertPropValue(Number.isInteger($)&&$>=0,"stmtCacheSize"),Y4.stmtCacheSize=$},set terminal($){m0.assertPropValue(typeof $==="string","terminal"),Y4.terminal=$},set configProviderCacheTimeout($){m0.assertPropValue(Number.isInteger($)&&$>=0,"configProviderCacheTimeout"),Y4.configProviderCacheTimeout=$}}});var kO1=o((u_5,SO1)=>{var CO1=A0("stream").Stream,ua6=A0("util");SO1.exports=sK;function sK(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}ua6.inherits(sK,CO1);sK.create=function($,Y){var X=new this;Y=Y||{};for(var G in Y)X[G]=Y[G];X.source=$;var J=$.emit;if($.emit=function(){return X._handleEmit(arguments),J.apply($,arguments)},$.on("error",function(){}),X.pauseStream)$.pause();return X};Object.defineProperty(sK.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});sK.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};sK.prototype.resume=function(){if(!this._released)this.release();this.source.resume()};sK.prototype.pause=function(){this.source.pause()};sK.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function($){this.emit.apply(this,$)}.bind(this)),this._bufferedEvents=[]};sK.prototype.pipe=function(){var $=CO1.prototype.pipe.apply(this,arguments);return this.resume(),$};sK.prototype._handleEmit=function($){if(this._released){this.emit.apply(this,$);return}if($[0]==="data")this.dataSize+=$[1].length,this._checkIfMaxDataSizeExceeded();this._bufferedEvents.push($)};sK.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded)return;if(this.dataSize<=this.maxDataSize)return;this._maxDataSizeExceeded=!0;var $="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",Error($))}});var bO1=o((p_5,yO1)=>{var pa6=A0("util"),xO1=A0("stream").Stream,vO1=kO1();yO1.exports=t$;function t$(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}pa6.inherits(t$,xO1);t$.create=function($){var Y=new this;$=$||{};for(var X in $)Y[X]=$[X];return Y};t$.isStreamLike=function($){return typeof $!=="function"&&typeof $!=="string"&&typeof $!=="boolean"&&typeof $!=="number"&&!Buffer.isBuffer($)};t$.prototype.append=function($){var Y=t$.isStreamLike($);if(Y){if(!($ instanceof vO1)){var X=vO1.create($,{maxDataSize:1/0,pauseStream:this.pauseStreams});$.on("data",this._checkDataSize.bind(this)),$=X}if(this._handleErrors($),this.pauseStreams)$.pause()}return this._streams.push($),this};t$.prototype.pipe=function($,Y){return xO1.prototype.pipe.call(this,$,Y),this.resume(),$};t$.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};t$.prototype._realGetNext=function(){var $=this._streams.shift();if(typeof $>"u"){this.end();return}if(typeof $!=="function"){this._pipeNext($);return}var Y=$;Y(function(X){var G=t$.isStreamLike(X);if(G)X.on("data",this._checkDataSize.bind(this)),this._handleErrors(X);this._pipeNext(X)}.bind(this))};t$.prototype._pipeNext=function($){this._currentStream=$;var Y=t$.isStreamLike($);if(Y){$.on("end",this._getNext.bind(this)),$.pipe(this,{end:!1});return}var X=$;this.write(X),this._getNext()};t$.prototype._handleErrors=function($){var Y=this;$.on("error",function(X){Y._emitError(X)})};t$.prototype.write=function($){this.emit("data",$)};t$.prototype.pause=function(){if(!this.pauseStreams)return;if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};t$.prototype.resume=function(){if(!this._released)this._released=!0,this.writable=!0,this._getNext();if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function")this._currentStream.resume();this.emit("resume")};t$.prototype.end=function(){this._reset(),this.emit("end")};t$.prototype.destroy=function(){this._reset(),this.emit("close")};t$.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};t$.prototype._checkDataSize=function(){if(this._updateDataSize(),this.dataSize<=this.maxDataSize)return;var $="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(Error($))};t$.prototype._updateDataSize=function(){this.dataSize=0;var $=this;if(this._streams.forEach(function(Y){if(!Y.dataSize)return;$.dataSize+=Y.dataSize}),this._currentStream&&this._currentStream.dataSize)this.dataSize+=this._currentStream.dataSize};t$.prototype._emitError=function($){this._reset(),this.emit("error",$)}});var hO1=o((d_5,da6)=>{da6.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana"},"application/3gpp-ims+xml":{source:"iana"},"application/a2l":{source:"iana"},"application/activemessage":{source:"iana"},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana"},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",extensions:["atomsvc"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana"},"application/bacnet-xdd+zip":{source:"iana"},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana"},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana"},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/cbor":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana"},"application/ccxml+xml":{source:"iana",extensions:["ccxml"]},"application/cdfx+xml":{source:"iana"},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana"},"application/cellml+xml":{source:"iana"},"application/cfw":{source:"iana"},"application/clue_info+xml":{source:"iana"},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana"},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana"},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana"},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana"},"application/cstadata+xml":{source:"iana"},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",extensions:["mpd"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana"},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana"},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/docbook+xml":{source:"apache",extensions:["dbk"]},"application/dskpp+xml":{source:"iana"},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/emergencycalldata.comment+xml":{source:"iana"},"application/emergencycalldata.control+xml":{source:"iana"},"application/emergencycalldata.deviceinfo+xml":{source:"iana"},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana"},"application/emergencycalldata.serviceinfo+xml":{source:"iana"},"application/emergencycalldata.subscriberinfo+xml":{source:"iana"},"application/emergencycalldata.veds+xml":{source:"iana"},"application/emma+xml":{source:"iana",extensions:["emma"]},"application/emotionml+xml":{source:"iana"},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana"},"application/epub+zip":{source:"iana",extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana"},"application/fhir+xml":{source:"iana"},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1,extensions:["woff"]},"application/framework-attributes+xml":{source:"iana"},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geoxacml+xml":{source:"iana"},"application/gml+xml":{source:"iana",extensions:["gml"]},"application/gpx+xml":{source:"apache",extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana"},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana"},"application/ibe-pkg-reply+xml":{source:"iana"},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana"},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana"},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana"},"application/kpml-response+xml":{source:"iana"},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana"},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana"},"application/lost+xml":{source:"iana",extensions:["lostxml"]},"application/lostsync+xml":{source:"iana"},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",extensions:["mads"]},"application/manifest+json":{charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",extensions:["mathml"]},"application/mathml-content+xml":{source:"iana"},"application/mathml-presentation+xml":{source:"iana"},"application/mbms-associated-procedure-description+xml":{source:"iana"},"application/mbms-deregister+xml":{source:"iana"},"application/mbms-envelope+xml":{source:"iana"},"application/mbms-msk+xml":{source:"iana"},"application/mbms-msk-response+xml":{source:"iana"},"application/mbms-protection-description+xml":{source:"iana"},"application/mbms-reception-report+xml":{source:"iana"},"application/mbms-register+xml":{source:"iana"},"application/mbms-register-response+xml":{source:"iana"},"application/mbms-schedule+xml":{source:"iana"},"application/mbms-user-service-description+xml":{source:"iana"},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana"},"application/media_control+xml":{source:"iana"},"application/mediaservercontrol+xml":{source:"iana",extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",extensions:["metalink"]},"application/metalink4+xml":{source:"iana",extensions:["meta4"]},"application/mets+xml":{source:"iana",extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mmt-usd+xml":{source:"iana"},"application/mods+xml":{source:"iana",extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana"},"application/mrb-publish+xml":{source:"iana"},"application/msc-ivr+xml":{source:"iana"},"application/msc-mixer+xml":{source:"iana"},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana"},"application/n-triples":{source:"iana"},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana"},"application/news-groupinfo":{source:"iana"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana"},"application/node":{source:"iana"},"application/nss":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p2p-overlay+xml":{source:"iana"},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana"},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana"},"application/pidf-diff+xml":{source:"iana"},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",extensions:["pls"]},"application/poc-settings+xml":{source:"iana"},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana"},"application/provenance+xml":{source:"iana"},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.hpub+zip":{source:"iana"},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana"},"application/pskc+xml":{source:"iana",extensions:["pskcxml"]},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf"]},"application/reginfo+xml":{source:"iana",extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",extensions:["rld"]},"application/rfc+xml":{source:"iana"},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana"},"application/rls-services+xml":{source:"iana",extensions:["rs"]},"application/route-apd+xml":{source:"iana"},"application/route-s-tsid+xml":{source:"iana"},"application/route-usd+xml":{source:"iana"},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana"},"application/samlmetadata+xml":{source:"iana"},"application/sbml+xml":{source:"iana",extensions:["sbml"]},"application/scaip+xml":{source:"iana"},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/sep+xml":{source:"iana"},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",extensions:["shf"]},"application/sieve":{source:"iana"},"application/simple-filter+xml":{source:"iana"},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",extensions:["srx"]},"application/spirits-event+xml":{source:"iana"},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",extensions:["grxml"]},"application/sru+xml":{source:"iana",extensions:["sru"]},"application/ssdl+xml":{source:"apache",extensions:["ssdl"]},"application/ssml+xml":{source:"iana",extensions:["ssml"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/tei+xml":{source:"iana",extensions:["tei","teicorpus"]},"application/thraud+xml":{source:"iana",extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tnauthlist":{source:"iana"},"application/trig":{source:"iana"},"application/ttml+xml":{source:"iana"},"application/tve-trigger":{source:"iana"},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana"},"application/urc-ressheet+xml":{source:"iana"},"application/urc-targetdesc+xml":{source:"iana"},"application/urc-uisocketdesc+xml":{source:"iana"},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana"},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana"},"application/vnd.3gpp-prose+xml":{source:"iana"},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana"},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana"},"application/vnd.3gpp.bsf+xml":{source:"iana"},"application/vnd.3gpp.gmop+xml":{source:"iana"},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana"},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana"},"application/vnd.3gpp.mcptt-info+xml":{source:"iana"},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana"},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana"},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana"},"application/vnd.3gpp.mid-call+xml":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana"},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana"},"application/vnd.3gpp.srvcc-info+xml":{source:"iana"},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana"},"application/vnd.3gpp.ussd+xml":{source:"iana"},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana"},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",extensions:["mpkg"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana"},"application/vnd.balsamiq.bmml+xml":{source:"iana"},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana"},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana"},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana"},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",extensions:["wbs"]},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana"},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana"},"application/vnd.cybank":{source:"iana"},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume-movie":{source:"iana"},"application/vnd.desmume.movie":{source:"apache"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana"},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana"},"application/vnd.dvb.notif-container+xml":{source:"iana"},"application/vnd.dvb.notif-generic+xml":{source:"iana"},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana"},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana"},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana"},"application/vnd.dvb.notif-init+xml":{source:"iana"},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana"},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana"},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana"},"application/vnd.eszigno3+xml":{source:"iana",extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana"},"application/vnd.etsi.asic-e+zip":{source:"iana"},"application/vnd.etsi.asic-s+zip":{source:"iana"},"application/vnd.etsi.cug+xml":{source:"iana"},"application/vnd.etsi.iptvcommand+xml":{source:"iana"},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana"},"application/vnd.etsi.iptvprofile+xml":{source:"iana"},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana"},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana"},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana"},"application/vnd.etsi.iptvservice+xml":{source:"iana"},"application/vnd.etsi.iptvsync+xml":{source:"iana"},"application/vnd.etsi.iptvueprofile+xml":{source:"iana"},"application/vnd.etsi.mcid+xml":{source:"iana"},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana"},"application/vnd.etsi.pstn+xml":{source:"iana"},"application/vnd.etsi.sci+xml":{source:"iana"},"application/vnd.etsi.simservs+xml":{source:"iana"},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana"},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana"},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana"},"application/vnd.gov.sk.e-form+zip":{source:"iana"},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana"},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana"},"application/vnd.imagemeter.image+zip":{source:"iana"},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana"},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana"},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana"},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana"},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana"},"application/vnd.iptc.g2.newsitem+xml":{source:"iana"},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana"},"application/vnd.iptc.g2.packageitem+xml":{source:"iana"},"application/vnd.iptc.g2.planningitem+xml":{source:"iana"},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",extensions:["lasxml"]},"application/vnd.liberty-request+xml":{source:"iana"},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",extensions:["lbe"]},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana"},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana"},"application/vnd.marlin.drm.conftoken+xml":{source:"iana"},"application/vnd.marlin.drm.license+xml":{source:"iana"},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana"},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana"},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana"},"application/vnd.ms-printing.printticket+xml":{source:"apache"},"application/vnd.ms-printschematicket+xml":{source:"iana"},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana"},"application/vnd.nokia.iptv.config+xml":{source:"iana"},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana"},"application/vnd.nokia.landmarkcollection+xml":{source:"iana"},"application/vnd.nokia.n-gage.ac+xml":{source:"iana"},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana"},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana"},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana"},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana"},"application/vnd.oipf.dae.xhtml+xml":{source:"iana"},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana"},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana"},"application/vnd.oipf.spdlist+xml":{source:"iana"},"application/vnd.oipf.ueprofile+xml":{source:"iana"},"application/vnd.oipf.userprofile+xml":{source:"iana"},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana"},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana"},"application/vnd.oma.bcast.imd+xml":{source:"iana"},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana"},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana"},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana"},"application/vnd.oma.bcast.sprov+xml":{source:"iana"},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana"},"application/vnd.oma.cab-feature-handler+xml":{source:"iana"},"application/vnd.oma.cab-pcc+xml":{source:"iana"},"application/vnd.oma.cab-subs-invite+xml":{source:"iana"},"application/vnd.oma.cab-user-prefs+xml":{source:"iana"},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana"},"application/vnd.oma.group-usage-list+xml":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana"},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana"},"application/vnd.oma.poc.final-report+xml":{source:"iana"},"application/vnd.oma.poc.groups+xml":{source:"iana"},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana"},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana"},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana"},"application/vnd.oma.xcap-directory+xml":{source:"iana"},"application/vnd.omads-email+xml":{source:"iana"},"application/vnd.omads-file+xml":{source:"iana"},"application/vnd.omads-folder+xml":{source:"iana"},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana"},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana"},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana"},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana"},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana"},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana"},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos+xml":{source:"iana"},"application/vnd.paos.xml":{source:"apache"},"application/vnd.patentdive":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana"},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana"},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana"},"application/vnd.radisys.msml+xml":{source:"iana"},"application/vnd.radisys.msml-audit+xml":{source:"iana"},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana"},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana"},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana"},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana"},"application/vnd.radisys.msml-conf+xml":{source:"iana"},"application/vnd.radisys.msml-dialog+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana"},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana"},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.software602.filler.form+xml":{source:"iana"},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana"},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana"},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.tmd.mediaflex.api+xml":{source:"iana"},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana"},"application/vnd.wv.ssp+xml":{source:"iana"},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana"},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",extensions:["zaz"]},"application/voicexml+xml":{source:"iana",extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana"},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"apache",extensions:["der","crt","pem"]},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana"},"application/xaml+xml":{source:"apache",extensions:["xaml"]},"application/xcap-att+xml":{source:"iana"},"application/xcap-caps+xml":{source:"iana"},"application/xcap-diff+xml":{source:"iana",extensions:["xdf"]},"application/xcap-el+xml":{source:"iana"},"application/xcap-error+xml":{source:"iana"},"application/xcap-ns+xml":{source:"iana"},"application/xcon-conference-info+xml":{source:"iana"},"application/xcon-conference-info-diff+xml":{source:"iana"},"application/xenc+xml":{source:"iana",extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache"},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana"},"application/xmpp+xml":{source:"iana"},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",extensions:["xpl"]},"application/xslt+xml":{source:"iana",extensions:["xslt"]},"application/xspf+xml":{source:"apache",extensions:["xspf"]},"application/xv+xml":{source:"iana",extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana"},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana"},"application/yin+xml":{source:"iana",extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana"},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana"},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tone":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana"},"image/apng":{compressible:!1,extensions:["apng"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana"},"image/emf":{source:"iana"},"image/fits":{source:"iana"},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana"},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana"},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana"},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/tiff-fx":{source:"iana"},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana"},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana"},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana"},"image/vnd.valve.source.texture":{source:"iana"},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana"},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana"},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/vnd.collada+xml":{source:"iana",extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana"},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana"},"model/vnd.parasolid.transmit.binary":{source:"iana"},"model/vnd.parasolid.transmit.text":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.valve.source.compiled-map":{source:"iana"},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana"},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana"},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana",compressible:!1},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fwdred":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shex":{extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana"},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vp8":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var pO1=o((sa6)=>{/*!
 * mime-types
 * Copyright(c) 2014 Jonathan Ong
 * Copyright(c) 2015 Douglas Christopher Wilson
 * MIT Licensed
 */var as=hO1(),ca6=A0("path").extname,fO1=/^\s*([^;\s]*)(?:;|\s|$)/,la6=/^text\//i;sa6.charset=gO1;sa6.charsets={lookup:gO1};sa6.contentType=ia6;sa6.extension=na6;sa6.extensions=Object.create(null);sa6.lookup=ra6;sa6.types=Object.create(null);aa6(sa6.extensions,sa6.types);function gO1($){if(!$||typeof $!=="string")return!1;var Y=fO1.exec($),X=Y&&as[Y[1].toLowerCase()];if(X&&X.charset)return X.charset;if(Y&&la6.test(Y[1]))return"UTF-8";return!1}function ia6($){if(!$||typeof $!=="string")return!1;var Y=$.indexOf("/")===-1?sa6.lookup($):$;if(!Y)return!1;if(Y.indexOf("charset")===-1){var X=sa6.charset(Y);if(X)Y+="; charset="+X.toLowerCase()}return Y}function na6($){if(!$||typeof $!=="string")return!1;var Y=fO1.exec($),X=Y&&sa6.extensions[Y[1].toLowerCase()];if(!X||!X.length)return!1;return X[0]}function ra6($){if(!$||typeof $!=="string")return!1;var Y=ca6("x."+$).toLowerCase().substr(1);if(!Y)return!1;return sa6.types[Y]||!1}function aa6($,Y){var X=["nginx","apache",void 0,"iana"];Object.keys(as).forEach(function(J){var Q=as[J],W=Q.extensions;if(!W||!W.length)return;$[J]=W;for(var K=0;K<W.length;K++){var Z=W[K];if(Y[Z]){var H=X.indexOf(as[Y[Z]].source),z=X.indexOf(Q.source);if(Y[Z]!=="application/octet-stream"&&(H>z||H===z&&Y[Z].substr(0,12)==="application/"))continue}Y[Z]=J}})}});var cO1=o((l_5,dO1)=>{dO1.exports=$s6;function $s6($){var Y=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(Y)Y($);else setTimeout($,0)}});var RF0=o((i_5,iO1)=>{var lO1=cO1();iO1.exports=Ys6;function Ys6($){var Y=!1;return lO1(function(){Y=!0}),function(G,J){if(Y)$(G,J);else lO1(function(){$(G,J)})}}});var qF0=o((n_5,nO1)=>{nO1.exports=Xs6;function Xs6($){Object.keys($.jobs).forEach(Gs6.bind($)),$.jobs={}}function Gs6($){if(typeof this.jobs[$]=="function")this.jobs[$]()}});var PF0=o((r_5,aO1)=>{var rO1=RF0(),Js6=qF0();aO1.exports=Qs6;function Qs6($,Y,X,G){var J=X.keyedList?X.keyedList[X.index]:X.index;X.jobs[J]=Ws6(Y,J,$[J],function(Q,W){if(!(J in X.jobs))return;if(delete X.jobs[J],Q)Js6(X);else X.results[J]=W;G(Q,X.results)})}function Ws6($,Y,X,G){var J;if($.length==2)J=$(X,rO1(G));else J=$(X,Y,rO1(G));return J}});var wF0=o((a_5,sO1)=>{sO1.exports=Ks6;function Ks6($,Y){var X=!Array.isArray($),G={index:0,keyedList:X||Y?Object.keys($):null,jobs:{},results:X?{}:[],size:X?Object.keys($).length:$.length};if(Y)G.keyedList.sort(X?Y:function(J,Q){return Y($[J],$[Q])});return G}});var _F0=o((s_5,oO1)=>{var Zs6=qF0(),Us6=RF0();oO1.exports=Hs6;function Hs6($){if(!Object.keys(this.jobs).length)return;this.index=this.size,Zs6(this),Us6($)(null,this.results)}});var eO1=o((o_5,tO1)=>{var zs6=PF0(),Vs6=wF0(),Fs6=_F0();tO1.exports=Ls6;function Ls6($,Y,X){var G=Vs6($);while(G.index<(G.keyedList||$).length)zs6($,Y,G,function(J,Q){if(J){X(J,Q);return}if(Object.keys(G.jobs).length===0){X(null,G.results);return}}),G.index++;return Fs6.bind(G,X)}});var jF0=o((t_5,ss)=>{var $E1=PF0(),Ds6=wF0(),Ns6=_F0();ss.exports=As6;ss.exports.ascending=YE1;ss.exports.descending=Bs6;function As6($,Y,X,G){var J=Ds6($,X);return $E1($,Y,J,function Q(W,K){if(W){G(W,K);return}if(J.index++,J.index<(J.keyedList||$).length){$E1($,Y,J,Q);return}G(null,J.results)}),Ns6.bind(J,G)}function YE1($,Y){return $<Y?-1:$>Y?1:0}function Bs6($,Y){return-1*YE1($,Y)}});var GE1=o((e_5,XE1)=>{var Os6=jF0();XE1.exports=Es6;function Es6($,Y,X){return Os6($,Y,null,X)}});var QE1=o(($j5,JE1)=>{JE1.exports={parallel:eO1(),serial:GE1(),serialOrdered:jF0()}});var TF0=o((Yj5,WE1)=>{WE1.exports=Object});var ZE1=o((Xj5,KE1)=>{KE1.exports=Error});var HE1=o((Gj5,UE1)=>{UE1.exports=EvalError});var VE1=o((Jj5,zE1)=>{zE1.exports=RangeError});var LE1=o((Qj5,FE1)=>{FE1.exports=ReferenceError});var NE1=o((Wj5,DE1)=>{DE1.exports=SyntaxError});var os=o((Kj5,AE1)=>{AE1.exports=TypeError});var OE1=o((Zj5,BE1)=>{BE1.exports=URIError});var ME1=o((Uj5,EE1)=>{EE1.exports=Math.abs});var qE1=o((Hj5,RE1)=>{RE1.exports=Math.floor});var wE1=o((zj5,PE1)=>{PE1.exports=Math.max});var jE1=o((Vj5,_E1)=>{_E1.exports=Math.min});var IE1=o((Fj5,TE1)=>{TE1.exports=Math.pow});var SE1=o((Lj5,CE1)=>{CE1.exports=Math.round});var vE1=o((Dj5,kE1)=>{kE1.exports=Number.isNaN||function(Y){return Y!==Y}});var yE1=o((Nj5,xE1)=>{var Ms6=vE1();xE1.exports=function(Y){if(Ms6(Y)||Y===0)return Y;return Y<0?-1:1}});var hE1=o((Aj5,bE1)=>{bE1.exports=Object.getOwnPropertyDescriptor});var IF0=o((Bj5,fE1)=>{var ts=hE1();if(ts)try{ts([],"length")}catch($){ts=null}fE1.exports=ts});var mE1=o((Oj5,gE1)=>{var es=Object.defineProperty||!1;if(es)try{es({},"a",{value:1})}catch($){es=!1}gE1.exports=es});var CF0=o((Ej5,uE1)=>{uE1.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var Y={},X=Symbol("test"),G=Object(X);if(typeof X==="string")return!1;if(Object.prototype.toString.call(X)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(G)!=="[object Symbol]")return!1;var J=42;Y[X]=J;for(var Q in Y)return!1;if(typeof Object.keys==="function"&&Object.keys(Y).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(Y).length!==0)return!1;var W=Object.getOwnPropertySymbols(Y);if(W.length!==1||W[0]!==X)return!1;if(!Object.prototype.propertyIsEnumerable.call(Y,X))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var K=Object.getOwnPropertyDescriptor(Y,X);if(K.value!==J||K.enumerable!==!0)return!1}return!0}});var cE1=o((Mj5,dE1)=>{var pE1=typeof Symbol<"u"&&Symbol,Rs6=CF0();dE1.exports=function(){if(typeof pE1!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof pE1("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return Rs6()}});var SF0=o((Rj5,lE1)=>{lE1.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var kF0=o((qj5,iE1)=>{var qs6=TF0();iE1.exports=qs6.getPrototypeOf||null});var aE1=o((Pj5,rE1)=>{var Ps6="Function.prototype.bind called on incompatible ",ws6=Object.prototype.toString,_s6=Math.max,js6="[object Function]",nE1=function(Y,X){var G=[];for(var J=0;J<Y.length;J+=1)G[J]=Y[J];for(var Q=0;Q<X.length;Q+=1)G[Q+Y.length]=X[Q];return G},Ts6=function(Y,X){var G=[];for(var J=X||0,Q=0;J<Y.length;J+=1,Q+=1)G[Q]=Y[J];return G},Is6=function($,Y){var X="";for(var G=0;G<$.length;G+=1)if(X+=$[G],G+1<$.length)X+=Y;return X};rE1.exports=function(Y){var X=this;if(typeof X!=="function"||ws6.apply(X)!==js6)throw TypeError(Ps6+X);var G=Ts6(arguments,1),J,Q=function(){if(this instanceof J){var z=X.apply(this,nE1(G,arguments));if(Object(z)===z)return z;return this}return X.apply(Y,nE1(G,arguments))},W=_s6(0,X.length-G.length),K=[];for(var Z=0;Z<W;Z++)K[Z]="$"+Z;if(J=Function("binder","return function ("+Is6(K,",")+"){ return binder.apply(this,arguments); }")(Q),X.prototype){var H=function(){};H.prototype=X.prototype,J.prototype=new H,H.prototype=null}return J}});var $y=o((wj5,sE1)=>{var Cs6=aE1();sE1.exports=Function.prototype.bind||Cs6});var $o=o((_j5,oE1)=>{oE1.exports=Function.prototype.call});var vF0=o((jj5,tE1)=>{tE1.exports=Function.prototype.apply});var $M1=o((Tj5,eE1)=>{eE1.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var XM1=o((Ij5,YM1)=>{var Ss6=$y(),ks6=vF0(),vs6=$o(),xs6=$M1();YM1.exports=xs6||Ss6.call(vs6,ks6)});var JM1=o((Cj5,GM1)=>{var ys6=$y(),bs6=os(),hs6=$o(),fs6=XM1();GM1.exports=function(Y){if(Y.length<1||typeof Y[0]!=="function")throw new bs6("a function is required");return fs6(ys6,hs6,Y)}});var HM1=o((Sj5,UM1)=>{var gs6=JM1(),QM1=IF0(),KM1;try{KM1=[].__proto__===Array.prototype}catch($){if(!$||typeof $!=="object"||!("code"in $)||$.code!=="ERR_PROTO_ACCESS")throw $}var xF0=!!KM1&&QM1&&QM1(Object.prototype,"__proto__"),ZM1=Object,WM1=ZM1.getPrototypeOf;UM1.exports=xF0&&typeof xF0.get==="function"?gs6([xF0.get]):typeof WM1==="function"?function(Y){return WM1(Y==null?Y:ZM1(Y))}:!1});var DM1=o((kj5,LM1)=>{var zM1=SF0(),VM1=kF0(),FM1=HM1();LM1.exports=zM1?function(Y){return zM1(Y)}:VM1?function(Y){if(!Y||typeof Y!=="object"&&typeof Y!=="function")throw TypeError("getProto: not an object");return VM1(Y)}:FM1?function(Y){return FM1(Y)}:null});var Yo=o((vj5,NM1)=>{var ms6=Function.prototype.call,us6=Object.prototype.hasOwnProperty,ps6=$y();NM1.exports=ps6.call(ms6,us6)});var RM1=o((xj5,MM1)=>{var U8,ds6=TF0(),cs6=ZE1(),ls6=HE1(),is6=VE1(),ns6=LE1(),yP=NE1(),xP=os(),rs6=OE1(),as6=ME1(),ss6=qE1(),os6=wE1(),ts6=jE1(),es6=IE1(),$o6=SE1(),Yo6=yE1(),OM1=Function,yF0=function($){try{return OM1('"use strict"; return ('+$+").constructor;")()}catch(Y){}},Yy=IF0(),Xo6=mE1(),bF0=function(){throw new xP},Go6=Yy?function(){try{return arguments.callee,bF0}catch($){try{return Yy(arguments,"callee").get}catch(Y){return bF0}}}():bF0,kP=cE1()(),yY=DM1(),Jo6=kF0(),Qo6=SF0(),EM1=vF0(),Xy=$o(),vP={},Wo6=typeof Uint8Array>"u"||!yY?U8:yY(Uint8Array),WB={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?U8:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?U8:ArrayBuffer,"%ArrayIteratorPrototype%":kP&&yY?yY([][Symbol.iterator]()):U8,"%AsyncFromSyncIteratorPrototype%":U8,"%AsyncFunction%":vP,"%AsyncGenerator%":vP,"%AsyncGeneratorFunction%":vP,"%AsyncIteratorPrototype%":vP,"%Atomics%":typeof Atomics>"u"?U8:Atomics,"%BigInt%":typeof BigInt>"u"?U8:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?U8:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?U8:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?U8:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":cs6,"%eval%":eval,"%EvalError%":ls6,"%Float16Array%":typeof Float16Array>"u"?U8:Float16Array,"%Float32Array%":typeof Float32Array>"u"?U8:Float32Array,"%Float64Array%":typeof Float64Array>"u"?U8:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?U8:FinalizationRegistry,"%Function%":OM1,"%GeneratorFunction%":vP,"%Int8Array%":typeof Int8Array>"u"?U8:Int8Array,"%Int16Array%":typeof Int16Array>"u"?U8:Int16Array,"%Int32Array%":typeof Int32Array>"u"?U8:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":kP&&yY?yY(yY([][Symbol.iterator]())):U8,"%JSON%":typeof JSON==="object"?JSON:U8,"%Map%":typeof Map>"u"?U8:Map,"%MapIteratorPrototype%":typeof Map>"u"||!kP||!yY?U8:yY(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":ds6,"%Object.getOwnPropertyDescriptor%":Yy,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?U8:Promise,"%Proxy%":typeof Proxy>"u"?U8:Proxy,"%RangeError%":is6,"%ReferenceError%":ns6,"%Reflect%":typeof Reflect>"u"?U8:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?U8:Set,"%SetIteratorPrototype%":typeof Set>"u"||!kP||!yY?U8:yY(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?U8:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":kP&&yY?yY(""[Symbol.iterator]()):U8,"%Symbol%":kP?Symbol:U8,"%SyntaxError%":yP,"%ThrowTypeError%":Go6,"%TypedArray%":Wo6,"%TypeError%":xP,"%Uint8Array%":typeof Uint8Array>"u"?U8:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?U8:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?U8:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?U8:Uint32Array,"%URIError%":rs6,"%WeakMap%":typeof WeakMap>"u"?U8:WeakMap,"%WeakRef%":typeof WeakRef>"u"?U8:WeakRef,"%WeakSet%":typeof WeakSet>"u"?U8:WeakSet,"%Function.prototype.call%":Xy,"%Function.prototype.apply%":EM1,"%Object.defineProperty%":Xo6,"%Object.getPrototypeOf%":Jo6,"%Math.abs%":as6,"%Math.floor%":ss6,"%Math.max%":os6,"%Math.min%":ts6,"%Math.pow%":es6,"%Math.round%":$o6,"%Math.sign%":Yo6,"%Reflect.getPrototypeOf%":Qo6};if(yY)try{null.error}catch($){hF0=yY(yY($)),WB["%Error.prototype%"]=hF0}var hF0,Ko6=function $(Y){var X;if(Y==="%AsyncFunction%")X=yF0("async function () {}");else if(Y==="%GeneratorFunction%")X=yF0("function* () {}");else if(Y==="%AsyncGeneratorFunction%")X=yF0("async function* () {}");else if(Y==="%AsyncGenerator%"){var G=$("%AsyncGeneratorFunction%");if(G)X=G.prototype}else if(Y==="%AsyncIteratorPrototype%"){var J=$("%AsyncGenerator%");if(J&&yY)X=yY(J.prototype)}return WB[Y]=X,X},AM1={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Gy=$y(),Xo=Yo(),Zo6=Gy.call(Xy,Array.prototype.concat),Uo6=Gy.call(EM1,Array.prototype.splice),BM1=Gy.call(Xy,String.prototype.replace),Go=Gy.call(Xy,String.prototype.slice),Ho6=Gy.call(Xy,RegExp.prototype.exec),zo6=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Vo6=/\\(\\)?/g,Fo6=function(Y){var X=Go(Y,0,1),G=Go(Y,-1);if(X==="%"&&G!=="%")throw new yP("invalid intrinsic syntax, expected closing `%`");else if(G==="%"&&X!=="%")throw new yP("invalid intrinsic syntax, expected opening `%`");var J=[];return BM1(Y,zo6,function(Q,W,K,Z){J[J.length]=K?BM1(Z,Vo6,"$1"):W||Q}),J},Lo6=function(Y,X){var G=Y,J;if(Xo(AM1,G))J=AM1[G],G="%"+J[0]+"%";if(Xo(WB,G)){var Q=WB[G];if(Q===vP)Q=Ko6(G);if(typeof Q>"u"&&!X)throw new xP("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:J,name:G,value:Q}}throw new yP("intrinsic "+Y+" does not exist!")};MM1.exports=function(Y,X){if(typeof Y!=="string"||Y.length===0)throw new xP("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof X!=="boolean")throw new xP('"allowMissing" argument must be a boolean');if(Ho6(/^%?[^%]*%?$/,Y)===null)throw new yP("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var G=Fo6(Y),J=G.length>0?G[0]:"",Q=Lo6("%"+J+"%",X),W=Q.name,K=Q.value,Z=!1,H=Q.alias;if(H)J=H[0],Uo6(G,Zo6([0,1],H));for(var z=1,V=!0;z<G.length;z+=1){var F=G[z],L=Go(F,0,1),N=Go(F,-1);if((L==='"'||L==="'"||L==="`"||(N==='"'||N==="'"||N==="`"))&&L!==N)throw new yP("property names with quotes must have matching quotes");if(F==="constructor"||!V)Z=!0;if(J+="."+F,W="%"+J+"%",Xo(WB,W))K=WB[W];else if(K!=null){if(!(F in K)){if(!X)throw new xP("base intrinsic for "+Y+" exists, but the property is not available.");return}if(Yy&&z+1>=G.length){var D=Yy(K,F);if(V=!!D,V&&"get"in D&&!("originalValue"in D.get))K=D.get;else K=K[F]}else V=Xo(K,F),K=K[F];if(V&&!Z)WB[W]=K}}return K}});var PM1=o((yj5,qM1)=>{var Do6=CF0();qM1.exports=function(){return Do6()&&!!Symbol.toStringTag}});var jM1=o((bj5,_M1)=>{var No6=RM1(),wM1=No6("%Object.defineProperty%",!0),Ao6=PM1()(),Bo6=Yo(),Oo6=os(),Jo=Ao6?Symbol.toStringTag:null;_M1.exports=function(Y,X){var G=arguments.length>2&&!!arguments[2]&&arguments[2].force,J=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof G<"u"&&typeof G!=="boolean"||typeof J<"u"&&typeof J!=="boolean")throw new Oo6("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");if(Jo&&(G||!Bo6(Y,Jo)))if(wM1)wM1(Y,Jo,{configurable:!J,enumerable:!1,value:X,writable:!1});else Y[Jo]=X}});var IM1=o((hj5,TM1)=>{TM1.exports=function($,Y){return Object.keys(Y).forEach(function(X){$[X]=$[X]||Y[X]}),$}});var SM1=o((fj5,CM1)=>{var uF0=bO1(),Eo6=A0("util"),fF0=A0("path"),Mo6=A0("http"),Ro6=A0("https"),qo6=A0("url").parse,Po6=A0("fs"),wo6=A0("stream").Stream,_o6=A0("crypto"),gF0=pO1(),jo6=QE1(),To6=jM1(),nF=Yo(),mF0=IM1();function f8($){if(!(this instanceof f8))return new f8($);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],uF0.call(this),$=$||{};for(var Y in $)this[Y]=$[Y]}Eo6.inherits(f8,uF0);f8.LINE_BREAK=`\r
`;f8.DEFAULT_CONTENT_TYPE="application/octet-stream";f8.prototype.append=function($,Y,X){if(X=X||{},typeof X==="string")X={filename:X};var G=uF0.prototype.append.bind(this);if(typeof Y==="number"||Y==null)Y=String(Y);if(Array.isArray(Y)){this._error(Error("Arrays are not supported."));return}var J=this._multiPartHeader($,Y,X),Q=this._multiPartFooter();G(J),G(Y),G(Q),this._trackLength(J,Y,X)};f8.prototype._trackLength=function($,Y,X){var G=0;if(X.knownLength!=null)G+=Number(X.knownLength);else if(Buffer.isBuffer(Y))G=Y.length;else if(typeof Y==="string")G=Buffer.byteLength(Y);if(this._valueLength+=G,this._overheadLength+=Buffer.byteLength($)+f8.LINE_BREAK.length,!Y||!Y.path&&!(Y.readable&&nF(Y,"httpVersion"))&&!(Y instanceof wo6))return;if(!X.knownLength)this._valuesToMeasure.push(Y)};f8.prototype._lengthRetriever=function($,Y){if(nF($,"fd"))if($.end!=null&&$.end!=1/0&&$.start!=null)Y(null,$.end+1-($.start?$.start:0));else Po6.stat($.path,function(X,G){if(X){Y(X);return}var J=G.size-($.start?$.start:0);Y(null,J)});else if(nF($,"httpVersion"))Y(null,Number($.headers["content-length"]));else if(nF($,"httpModule"))$.on("response",function(X){$.pause(),Y(null,Number(X.headers["content-length"]))}),$.resume();else Y("Unknown stream")};f8.prototype._multiPartHeader=function($,Y,X){if(typeof X.header==="string")return X.header;var G=this._getContentDisposition(Y,X),J=this._getContentType(Y,X),Q="",W={"Content-Disposition":["form-data",'name="'+$+'"'].concat(G||[]),"Content-Type":[].concat(J||[])};if(typeof X.header==="object")mF0(W,X.header);var K;for(var Z in W)if(nF(W,Z)){if(K=W[Z],K==null)continue;if(!Array.isArray(K))K=[K];if(K.length)Q+=Z+": "+K.join("; ")+f8.LINE_BREAK}return"--"+this.getBoundary()+f8.LINE_BREAK+Q+f8.LINE_BREAK};f8.prototype._getContentDisposition=function($,Y){var X;if(typeof Y.filepath==="string")X=fF0.normalize(Y.filepath).replace(/\\/g,"/");else if(Y.filename||$&&($.name||$.path))X=fF0.basename(Y.filename||$&&($.name||$.path));else if($&&$.readable&&nF($,"httpVersion"))X=fF0.basename($.client._httpMessage.path||"");if(X)return'filename="'+X+'"'};f8.prototype._getContentType=function($,Y){var X=Y.contentType;if(!X&&$&&$.name)X=gF0.lookup($.name);if(!X&&$&&$.path)X=gF0.lookup($.path);if(!X&&$&&$.readable&&nF($,"httpVersion"))X=$.headers["content-type"];if(!X&&(Y.filepath||Y.filename))X=gF0.lookup(Y.filepath||Y.filename);if(!X&&$&&typeof $==="object")X=f8.DEFAULT_CONTENT_TYPE;return X};f8.prototype._multiPartFooter=function(){return function($){var Y=f8.LINE_BREAK,X=this._streams.length===0;if(X)Y+=this._lastBoundary();$(Y)}.bind(this)};f8.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+f8.LINE_BREAK};f8.prototype.getHeaders=function($){var Y,X={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(Y in $)if(nF($,Y))X[Y.toLowerCase()]=$[Y];return X};f8.prototype.setBoundary=function($){if(typeof $!=="string")throw TypeError("FormData boundary must be a string");this._boundary=$};f8.prototype.getBoundary=function(){if(!this._boundary)this._generateBoundary();return this._boundary};f8.prototype.getBuffer=function(){var $=new Buffer.alloc(0),Y=this.getBoundary();for(var X=0,G=this._streams.length;X<G;X++)if(typeof this._streams[X]!=="function"){if(Buffer.isBuffer(this._streams[X]))$=Buffer.concat([$,this._streams[X]]);else $=Buffer.concat([$,Buffer.from(this._streams[X])]);if(typeof this._streams[X]!=="string"||this._streams[X].substring(2,Y.length+2)!==Y)$=Buffer.concat([$,Buffer.from(f8.LINE_BREAK)])}return Buffer.concat([$,Buffer.from(this._lastBoundary())])};f8.prototype._generateBoundary=function(){this._boundary="--------------------------"+_o6.randomBytes(12).toString("hex")};f8.prototype.getLengthSync=function(){var $=this._overheadLength+this._valueLength;if(this._streams.length)$+=this._lastBoundary().length;if(!this.hasKnownLength())this._error(Error("Cannot calculate proper length in synchronous way."));return $};f8.prototype.hasKnownLength=function(){var $=!0;if(this._valuesToMeasure.length)$=!1;return $};f8.prototype.getLength=function($){var Y=this._overheadLength+this._valueLength;if(this._streams.length)Y+=this._lastBoundary().length;if(!this._valuesToMeasure.length){process.nextTick($.bind(this,null,Y));return}jo6.parallel(this._valuesToMeasure,this._lengthRetriever,function(X,G){if(X){$(X);return}G.forEach(function(J){Y+=J}),$(null,Y)})};f8.prototype.submit=function($,Y){var X,G,J={method:"post"};if(typeof $==="string")$=qo6($),G=mF0({port:$.port,path:$.pathname,host:$.hostname,protocol:$.protocol},J);else if(G=mF0($,J),!G.port)G.port=G.protocol==="https:"?443:80;if(G.headers=this.getHeaders($.headers),G.protocol==="https:")X=Ro6.request(G);else X=Mo6.request(G);return this.getLength(function(Q,W){if(Q&&Q!=="Unknown stream"){this._error(Q);return}if(W)X.setHeader("Content-Length",W);if(this.pipe(X),Y){var K,Z=function(H,z){return X.removeListener("error",Z),X.removeListener("response",K),Y.call(this,H,z)};K=Z.bind(this,null),X.on("error",Z),X.on("response",K)}}.bind(this)),X};f8.prototype._error=function($){if(!this.error)this.error=$,this.pause(),this.emit("error",$)};f8.prototype.toString=function(){return"[object FormData]"};To6(f8.prototype,"FormData");CM1.exports=f8});var $L0=o((yT5,lM1)=>{function io6($){X.debug=X,X.default=X,X.coerce=Z,X.disable=W,X.enable=J,X.enabled=K,X.humanize=$i(),X.destroy=H,Object.keys($).forEach((z)=>{X[z]=$[z]}),X.names=[],X.skips=[],X.formatters={};function Y(z){let V=0;for(let F=0;F<z.length;F++)V=(V<<5)-V+z.charCodeAt(F),V|=0;return X.colors[Math.abs(V)%X.colors.length]}X.selectColor=Y;function X(z){let V,F=null,L,N;function D(...A){if(!D.enabled)return;let B=D,O=Number(new Date),E=O-(V||O);if(B.diff=E,B.prev=V,B.curr=O,V=O,A[0]=X.coerce(A[0]),typeof A[0]!=="string")A.unshift("%O");let M=0;A[0]=A[0].replace(/%([a-zA-Z%])/g,(q,_)=>{if(q==="%%")return"%";M++;let P=X.formatters[_];if(typeof P==="function"){let w=A[M];q=P.call(B,w),A.splice(M,1),M--}return q}),X.formatArgs.call(B,A),(B.log||X.log).apply(B,A)}if(D.namespace=z,D.useColors=X.useColors(),D.color=X.selectColor(z),D.extend=G,D.destroy=X.destroy,Object.defineProperty(D,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(F!==null)return F;if(L!==X.namespaces)L=X.namespaces,N=X.enabled(z);return N},set:(A)=>{F=A}}),typeof X.init==="function")X.init(D);return D}function G(z,V){let F=X(this.namespace+(typeof V>"u"?":":V)+z);return F.log=this.log,F}function J(z){X.save(z),X.namespaces=z,X.names=[],X.skips=[];let V=(typeof z==="string"?z:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let F of V)if(F[0]==="-")X.skips.push(F.slice(1));else X.names.push(F)}function Q(z,V){let F=0,L=0,N=-1,D=0;while(F<z.length)if(L<V.length&&(V[L]===z[F]||V[L]==="*"))if(V[L]==="*")N=L,D=F,L++;else F++,L++;else if(N!==-1)L=N+1,D++,F=D;else return!1;while(L<V.length&&V[L]==="*")L++;return L===V.length}function W(){let z=[...X.names,...X.skips.map((V)=>"-"+V)].join(",");return X.enable(""),z}function K(z){for(let V of X.skips)if(Q(z,V))return!1;for(let V of X.names)if(Q(z,V))return!0;return!1}function Z(z){if(z instanceof Error)return z.stack||z.message;return z}function H(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return X.enable(X.load()),X}lM1.exports=io6});var nM1=o((iM1,Ko)=>{iM1.formatArgs=ro6;iM1.save=ao6;iM1.load=so6;iM1.useColors=no6;iM1.storage=oo6();iM1.destroy=(()=>{let $=!1;return()=>{if(!$)$=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();iM1.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function no6(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let $;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&($=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt($[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function ro6($){if($[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+$[0]+(this.useColors?"%c ":" ")+"+"+Ko.exports.humanize(this.diff),!this.useColors)return;let Y="color: "+this.color;$.splice(1,0,Y,"color: inherit");let X=0,G=0;$[0].replace(/%[a-zA-Z%]/g,(J)=>{if(J==="%%")return;if(X++,J==="%c")G=X}),$.splice(G,0,Y)}iM1.log=console.debug||console.log||(()=>{});function ao6($){try{if($)iM1.storage.setItem("debug",$);else iM1.storage.removeItem("debug")}catch(Y){}}function so6(){let $;try{$=iM1.storage.getItem("debug")||iM1.storage.getItem("DEBUG")}catch(Y){}if(!$&&typeof process<"u"&&"env"in process)$=process.env.DEBUG;return $}function oo6(){try{return localStorage}catch($){}}Ko.exports=$L0()(iM1);var{formatters:to6}=Ko.exports;to6.j=function($){try{return JSON.stringify($)}catch(Y){return"[UnexpectedJSONParseError]: "+Y.message}}});var aM1=o((hT5,rM1)=>{rM1.exports=($,Y=process.argv)=>{let X=$.startsWith("-")?"":$.length===1?"-":"--",G=Y.indexOf(X+$),J=Y.indexOf("--");return G!==-1&&(J===-1||G<J)}});var XL0=o((fT5,oM1)=>{var Wt6=A0("os"),sM1=A0("tty"),S2=aM1(),{env:bY}=process,Zo;if(S2("no-color")||S2("no-colors")||S2("color=false")||S2("color=never"))Zo=0;else if(S2("color")||S2("colors")||S2("color=true")||S2("color=always"))Zo=1;function Kt6(){if("FORCE_COLOR"in bY){if(bY.FORCE_COLOR==="true")return 1;if(bY.FORCE_COLOR==="false")return 0;return bY.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(bY.FORCE_COLOR,10),3)}}function Zt6($){if($===0)return!1;return{level:$,hasBasic:!0,has256:$>=2,has16m:$>=3}}function Ut6($,{streamIsTTY:Y,sniffFlags:X=!0}={}){let G=Kt6();if(G!==void 0)Zo=G;let J=X?Zo:G;if(J===0)return 0;if(X){if(S2("color=16m")||S2("color=full")||S2("color=truecolor"))return 3;if(S2("color=256"))return 2}if($&&!Y&&J===void 0)return 0;let Q=J||0;if(bY.TERM==="dumb")return Q;if(process.platform==="win32"){let W=Wt6.release().split(".");if(Number(W[0])>=10&&Number(W[2])>=10586)return Number(W[2])>=14931?3:2;return 1}if("CI"in bY){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((W)=>(W in bY))||bY.CI_NAME==="codeship")return 1;return Q}if("TEAMCITY_VERSION"in bY)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(bY.TEAMCITY_VERSION)?1:0;if(bY.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in bY){let W=Number.parseInt((bY.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(bY.TERM_PROGRAM){case"iTerm.app":return W>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(bY.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(bY.TERM))return 1;if("COLORTERM"in bY)return 1;return Q}function YL0($,Y={}){let X=Ut6($,{streamIsTTY:$&&$.isTTY,...Y});return Zt6(X)}oM1.exports={supportsColor:YL0,stdout:YL0({isTTY:sM1.isatty(1)}),stderr:YL0({isTTY:sM1.isatty(2)})}});var YR1=o((eM1,Ho)=>{var Ht6=A0("tty"),Uo=A0("util");eM1.init=At6;eM1.log=Lt6;eM1.formatArgs=Vt6;eM1.save=Dt6;eM1.load=Nt6;eM1.useColors=zt6;eM1.destroy=Uo.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");eM1.colors=[6,2,3,4,5,1];try{let $=XL0();if($&&($.stderr||$).level>=2)eM1.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch($){}eM1.inspectOpts=Object.keys(process.env).filter(($)=>{return/^debug_/i.test($)}).reduce(($,Y)=>{let X=Y.substring(6).toLowerCase().replace(/_([a-z])/g,(J,Q)=>{return Q.toUpperCase()}),G=process.env[Y];if(/^(yes|on|true|enabled)$/i.test(G))G=!0;else if(/^(no|off|false|disabled)$/i.test(G))G=!1;else if(G==="null")G=null;else G=Number(G);return $[X]=G,$},{});function zt6(){return"colors"in eM1.inspectOpts?Boolean(eM1.inspectOpts.colors):Ht6.isatty(process.stderr.fd)}function Vt6($){let{namespace:Y,useColors:X}=this;if(X){let G=this.color,J="\x1B[3"+(G<8?G:"8;5;"+G),Q=`  ${J};1m${Y} \x1B[0m`;$[0]=Q+$[0].split(`
`).join(`
`+Q),$.push(J+"m+"+Ho.exports.humanize(this.diff)+"\x1B[0m")}else $[0]=Ft6()+Y+" "+$[0]}function Ft6(){if(eM1.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function Lt6(...$){return process.stderr.write(Uo.formatWithOptions(eM1.inspectOpts,...$)+`
`)}function Dt6($){if($)process.env.DEBUG=$;else delete process.env.DEBUG}function Nt6(){return process.env.DEBUG}function At6($){$.inspectOpts={};let Y=Object.keys(eM1.inspectOpts);for(let X=0;X<Y.length;X++)$.inspectOpts[Y[X]]=eM1.inspectOpts[Y[X]]}Ho.exports=$L0()(eM1);var{formatters:tM1}=Ho.exports;tM1.o=function($){return this.inspectOpts.colors=this.useColors,Uo.inspect($,this.inspectOpts).split(`
`).map((Y)=>Y.trim()).join(" ")};tM1.O=function($){return this.inspectOpts.colors=this.useColors,Uo.inspect($,this.inspectOpts)}});var Ky=o((mT5,GL0)=>{if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)GL0.exports=nM1();else GL0.exports=YR1()});var GR1=o((XR1)=>{Object.defineProperty(XR1,"__esModule",{value:!0});function wt6($){return function(Y,X){return new Promise((G,J)=>{$.call(this,Y,X,(Q,W)=>{if(Q)J(Q);else G(W)})})}}XR1.default=wt6});var WR1=o((QL0,QR1)=>{var JR1=QL0&&QL0.__importDefault||function($){return $&&$.__esModule?$:{default:$}},jt6=A0("events"),Tt6=JR1(Ky()),It6=JR1(GR1()),Zy=Tt6.default("agent-base");function Ct6($){return Boolean($)&&typeof $.addRequest==="function"}function JL0(){let{stack:$}=Error();if(typeof $!=="string")return!1;return $.split(`
`).some((Y)=>Y.indexOf("(https.js:")!==-1||Y.indexOf("node:https:")!==-1)}function zo($,Y){return new zo.Agent($,Y)}(function($){class Y extends jt6.EventEmitter{constructor(X,G){super();let J=G;if(typeof X==="function")this.callback=X;else if(X)J=X;if(this.timeout=null,J&&typeof J.timeout==="number")this.timeout=J.timeout;this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){if(typeof this.explicitDefaultPort==="number")return this.explicitDefaultPort;return JL0()?443:80}set defaultPort(X){this.explicitDefaultPort=X}get protocol(){if(typeof this.explicitProtocol==="string")return this.explicitProtocol;return JL0()?"https:":"http:"}set protocol(X){this.explicitProtocol=X}callback(X,G,J){throw Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(X,G){let J=Object.assign({},G);if(typeof J.secureEndpoint!=="boolean")J.secureEndpoint=JL0();if(J.host==null)J.host="localhost";if(J.port==null)J.port=J.secureEndpoint?443:80;if(J.protocol==null)J.protocol=J.secureEndpoint?"https:":"http:";if(J.host&&J.path)delete J.path;delete J.agent,delete J.hostname,delete J._defaultAgent,delete J.defaultPort,delete J.createConnection,X._last=!0,X.shouldKeepAlive=!1;let Q=!1,W=null,K=J.timeout||this.timeout,Z=(F)=>{if(X._hadError)return;X.emit("error",F),X._hadError=!0},H=()=>{W=null,Q=!0;let F=Error(`A "socket" was not created for HTTP request before ${K}ms`);F.code="ETIMEOUT",Z(F)},z=(F)=>{if(Q)return;if(W!==null)clearTimeout(W),W=null;Z(F)},V=(F)=>{if(Q)return;if(W!=null)clearTimeout(W),W=null;if(Ct6(F)){Zy("Callback returned another Agent instance %o",F.constructor.name),F.addRequest(X,J);return}if(F){F.once("free",()=>{this.freeSocket(F,J)}),X.onSocket(F);return}let L=Error(`no Duplex stream was returned to agent-base for \`${X.method} ${X.path}\``);Z(L)};if(typeof this.callback!=="function"){Z(Error("`callback` is not defined"));return}if(!this.promisifiedCallback)if(this.callback.length>=3)Zy("Converting legacy callback function to promise"),this.promisifiedCallback=It6.default(this.callback);else this.promisifiedCallback=this.callback;if(typeof K==="number"&&K>0)W=setTimeout(H,K);if("port"in J&&typeof J.port!=="number")J.port=Number(J.port);try{Zy("Resolving socket for %o request: %o",J.protocol,`${X.method} ${X.path}`),Promise.resolve(this.promisifiedCallback(X,J)).then(V,z)}catch(F){Promise.reject(F).catch(z)}}freeSocket(X,G){Zy("Freeing socket %o %o",X.constructor.name,G),X.destroy()}destroy(){Zy("Destroying agent %o",this.constructor.name)}}$.Agent=Y,$.prototype=$.Agent.prototype})(zo||(zo={}));QR1.exports=zo});var KR1=o((Hy)=>{var St6=Hy&&Hy.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(Hy,"__esModule",{value:!0});var kt6=St6(Ky()),Uy=kt6.default("https-proxy-agent:parse-proxy-response");function vt6($){return new Promise((Y,X)=>{let G=0,J=[];function Q(){let V=$.read();if(V)z(V);else $.once("readable",Q)}function W(){$.removeListener("end",Z),$.removeListener("error",H),$.removeListener("close",K),$.removeListener("readable",Q)}function K(V){Uy("onclose had error %o",V)}function Z(){Uy("onend")}function H(V){W(),Uy("onerror %o",V),X(V)}function z(V){J.push(V),G+=V.length;let F=Buffer.concat(J,G);if(F.indexOf(`\r
\r
`)===-1){Uy("have not received end of HTTP headers yet..."),Q();return}let N=F.toString("ascii",0,F.indexOf(`\r
`)),D=+N.split(" ")[1];Uy("got proxy server response: %o",N),Y({statusCode:D,buffered:F})}$.on("error",H),$.on("close",K),$.on("end",Z),Q()})}Hy.default=vt6});var zR1=o((HB)=>{var xt6=HB&&HB.__awaiter||function($,Y,X,G){function J(Q){return Q instanceof X?Q:new X(function(W){W(Q)})}return new(X||(X=Promise))(function(Q,W){function K(z){try{H(G.next(z))}catch(V){W(V)}}function Z(z){try{H(G.throw(z))}catch(V){W(V)}}function H(z){z.done?Q(z.value):J(z.value).then(K,Z)}H((G=G.apply($,Y||[])).next())})},fP=HB&&HB.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(HB,"__esModule",{value:!0});var ZR1=fP(A0("net")),UR1=fP(A0("tls")),yt6=fP(A0("url")),bt6=fP(A0("assert")),ht6=fP(Ky()),ft6=WR1(),gt6=fP(KR1()),zy=ht6.default("https-proxy-agent:agent");class HR1 extends ft6.Agent{constructor($){let Y;if(typeof $==="string")Y=yt6.default.parse($);else Y=$;if(!Y)throw Error("an HTTP(S) proxy server `host` and `port` must be specified!");zy("creating new HttpsProxyAgent instance: %o",Y);super(Y);let X=Object.assign({},Y);if(this.secureProxy=Y.secureProxy||pt6(X.protocol),X.host=X.hostname||X.host,typeof X.port==="string")X.port=parseInt(X.port,10);if(!X.port&&X.host)X.port=this.secureProxy?443:80;if(this.secureProxy&&!("ALPNProtocols"in X))X.ALPNProtocols=["http 1.1"];if(X.host&&X.path)delete X.path,delete X.pathname;this.proxy=X}callback($,Y){return xt6(this,void 0,void 0,function*(){let{proxy:X,secureProxy:G}=this,J;if(G)zy("Creating `tls.Socket`: %o",X),J=UR1.default.connect(X);else zy("Creating `net.Socket`: %o",X),J=ZR1.default.connect(X);let Q=Object.assign({},X.headers),K=`CONNECT ${`${Y.host}:${Y.port}`} HTTP/1.1\r
`;if(X.auth)Q["Proxy-Authorization"]=`Basic ${Buffer.from(X.auth).toString("base64")}`;let{host:Z,port:H,secureEndpoint:z}=Y;if(!ut6(H,z))Z+=`:${H}`;Q.Host=Z,Q.Connection="close";for(let D of Object.keys(Q))K+=`${D}: ${Q[D]}\r
`;let V=gt6.default(J);J.write(`${K}\r
`);let{statusCode:F,buffered:L}=yield V;if(F===200){if($.once("socket",mt6),Y.secureEndpoint){zy("Upgrading socket connection to TLS");let D=Y.servername||Y.host;return UR1.default.connect(Object.assign(Object.assign({},dt6(Y,"host","hostname","path","port")),{socket:J,servername:D}))}return J}J.destroy();let N=new ZR1.default.Socket({writable:!1});return N.readable=!0,$.once("socket",(D)=>{zy("replaying proxy buffer for failed request"),bt6.default(D.listenerCount("data")>0),D.push(L),D.push(null)}),N})}}HB.default=HR1;function mt6($){$.resume()}function ut6($,Y){return Boolean(!Y&&$===80||Y&&$===443)}function pt6($){return typeof $==="string"?/^https:?$/i.test($):!1}function dt6($,...Y){let X={},G;for(G in $)if(!Y.includes(G))X[G]=$[G];return X}});var FR1=o((ZL0,VR1)=>{var ct6=ZL0&&ZL0.__importDefault||function($){return $&&$.__esModule?$:{default:$}},WL0=ct6(zR1());function KL0($){return new WL0.default($)}(function($){$.HttpsProxyAgent=WL0.default,$.prototype=WL0.default.prototype})(KL0||(KL0={}));VR1.exports=KL0});var DR1=o((cT5,LR1)=>{var Vy;LR1.exports=function(){if(!Vy){try{Vy=Ky()("follow-redirects")}catch($){}if(typeof Vy!=="function")Vy=function(){}}Vy.apply(null,arguments)}});var ER1=o((lT5,EL0)=>{var Ly=A0("url"),Fy=Ly.URL,lt6=A0("http"),it6=A0("https"),FL0=A0("stream").Writable,LL0=A0("assert"),NR1=DR1();(function(){var Y=typeof process<"u",X=typeof window<"u"&&typeof document<"u",G=VB(Error.captureStackTrace);if(!Y&&(X||!G))console.warn("The follow-redirects package should be excluded from browser builds.")})();var DL0=!1;try{LL0(new Fy(""))}catch($){DL0=$.code==="ERR_INVALID_URL"}var nt6=["Authorization","Proxy-Authorization","Cookie"],rt6=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],NL0=["abort","aborted","connect","error","socket","timeout"],AL0=Object.create(null);NL0.forEach(function($){AL0[$]=function(Y,X,G){this._redirectable.emit($,Y,X,G)}});var HL0=Dy("ERR_INVALID_URL","Invalid URL",TypeError),zL0=Dy("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),at6=Dy("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",zL0),st6=Dy("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),ot6=Dy("ERR_STREAM_WRITE_AFTER_END","write after end"),tt6=FL0.prototype.destroy||BR1;function $Q($,Y){if(FL0.call(this),this._sanitizeOptions($),this._options=$,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],Y)this.on("response",Y);var X=this;this._onNativeResponse=function(G){try{X._processResponse(G)}catch(J){X.emit("error",J instanceof zL0?J:new zL0({cause:J}))}},this._headerFilter=new RegExp("^(?:"+nt6.concat($.sensitiveHeaders).map(Je6).join("|")+")$","i"),this._performRequest()}$Q.prototype=Object.create(FL0.prototype);$Q.prototype.abort=function(){OL0(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};$Q.prototype.destroy=function($){return OL0(this._currentRequest,$),tt6.call(this,$),this};$Q.prototype.write=function($,Y,X){if(this._ending)throw new ot6;if(!zB($)&&!Xe6($))throw TypeError("data should be a string, Buffer or Uint8Array");if(VB(Y))X=Y,Y=null;if($.length===0){if(X)X();return}if(this._requestBodyLength+$.length<=this._options.maxBodyLength)this._requestBodyLength+=$.length,this._requestBodyBuffers.push({data:$,encoding:Y}),this._currentRequest.write($,Y,X);else this.emit("error",new st6),this.abort()};$Q.prototype.end=function($,Y,X){if(VB($))X=$,$=Y=null;else if(VB(Y))X=Y,Y=null;if(!$)this._ended=this._ending=!0,this._currentRequest.end(null,null,X);else{var G=this,J=this._currentRequest;this.write($,Y,function(){G._ended=!0,J.end(null,null,X)}),this._ending=!0}};$Q.prototype.setHeader=function($,Y){this._options.headers[$]=Y,this._currentRequest.setHeader($,Y)};$Q.prototype.removeHeader=function($){delete this._options.headers[$],this._currentRequest.removeHeader($)};$Q.prototype.setTimeout=function($,Y){var X=this;function G(W){W.setTimeout($),W.removeListener("timeout",W.destroy),W.addListener("timeout",W.destroy)}function J(W){if(X._timeout)clearTimeout(X._timeout);X._timeout=setTimeout(function(){X.emit("timeout"),Q()},$),G(W)}function Q(){if(X._timeout)clearTimeout(X._timeout),X._timeout=null;if(X.removeListener("abort",Q),X.removeListener("error",Q),X.removeListener("response",Q),X.removeListener("close",Q),Y)X.removeListener("timeout",Y);if(!X.socket)X._currentRequest.removeListener("socket",J)}if(Y)this.on("timeout",Y);if(this.socket)J(this.socket);else this._currentRequest.once("socket",J);return this.on("socket",G),this.on("abort",Q),this.on("error",Q),this.on("response",Q),this.on("close",Q),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function($){$Q.prototype[$]=function(Y,X){return this._currentRequest[$](Y,X)}});["aborted","connection","socket"].forEach(function($){Object.defineProperty($Q.prototype,$,{get:function(){return this._currentRequest[$]}})});$Q.prototype._sanitizeOptions=function($){if(!$.headers)$.headers={};if(!Ye6($.sensitiveHeaders))$.sensitiveHeaders=[];if($.host){if(!$.hostname)$.hostname=$.host;delete $.host}if(!$.pathname&&$.path){var Y=$.path.indexOf("?");if(Y<0)$.pathname=$.path;else $.pathname=$.path.substring(0,Y),$.search=$.path.substring(Y)}};$Q.prototype._performRequest=function(){var $=this._options.protocol,Y=this._options.nativeProtocols[$];if(!Y)throw TypeError("Unsupported protocol "+$);if(this._options.agents){var X=$.slice(0,-1);this._options.agent=this._options.agents[X]}var G=this._currentRequest=Y.request(this._options,this._onNativeResponse);G._redirectable=this;for(var J of NL0)G.on(J,AL0[J]);if(this._currentUrl=/^\//.test(this._options.path)?Ly.format(this._options):this._options.path,this._isRedirect){var Q=0,W=this,K=this._requestBodyBuffers;(function Z(H){if(G===W._currentRequest){if(H)W.emit("error",H);else if(Q<K.length){var z=K[Q++];if(!G.finished)G.write(z.data,z.encoding,Z)}else if(W._ended)G.end()}})()}};$Q.prototype._processResponse=function($){var Y=$.statusCode;if(this._options.trackRedirects)this._redirects.push({url:this._currentUrl,headers:$.headers,statusCode:Y});var X=$.headers.location;if(!X||this._options.followRedirects===!1||Y<300||Y>=400){$.responseUrl=this._currentUrl,$.redirects=this._redirects,this.emit("response",$),this._requestBodyBuffers=[];return}if(OL0(this._currentRequest),$.destroy(),++this._redirectCount>this._options.maxRedirects)throw new at6;var G,J=this._options.beforeRedirect;if(J)G=Object.assign({Host:$.req.getHeader("host")},this._options.headers);var Q=this._options.method;if((Y===301||Y===302)&&this._options.method==="POST"||Y===303&&!/^(?:GET|HEAD)$/.test(this._options.method))this._options.method="GET",this._requestBodyBuffers=[],UL0(/^content-/i,this._options.headers);var W=UL0(/^host$/i,this._options.headers),K=BL0(this._currentUrl),Z=W||K.host,H=/^\w+:/.test(X)?this._currentUrl:Ly.format(Object.assign(K,{host:Z})),z=et6(X,H);if(NR1("redirecting to",z.href),this._isRedirect=!0,VL0(z,this._options),z.protocol!==K.protocol&&z.protocol!=="https:"||z.host!==Z&&!$e6(z.host,Z))UL0(this._headerFilter,this._options.headers);if(VB(J)){var V={headers:$.headers,statusCode:Y},F={url:H,method:Q,headers:G};J(this._options,V,F),this._sanitizeOptions(this._options)}this._performRequest()};function AR1($){var Y={maxRedirects:21,maxBodyLength:10485760},X={};return Object.keys($).forEach(function(G){var J=G+":",Q=X[J]=$[G],W=Y[G]=Object.create(Q);function K(H,z,V){if(Ge6(H))H=VL0(H);else if(zB(H))H=VL0(BL0(H));else V=z,z=OR1(H),H={protocol:J};if(VB(z))V=z,z=null;if(z=Object.assign({maxRedirects:Y.maxRedirects,maxBodyLength:Y.maxBodyLength},H,z),z.nativeProtocols=X,!zB(z.host)&&!zB(z.hostname))z.hostname="::1";return LL0.equal(z.protocol,J,"protocol mismatch"),NR1("options",z),new $Q(z,V)}function Z(H,z,V){var F=W.request(H,z,V);return F.end(),F}Object.defineProperties(W,{request:{value:K,configurable:!0,enumerable:!0,writable:!0},get:{value:Z,configurable:!0,enumerable:!0,writable:!0}})}),Y}function BR1(){}function BL0($){var Y;if(DL0)Y=new Fy($);else if(Y=OR1(Ly.parse($)),!zB(Y.protocol))throw new HL0({input:$});return Y}function et6($,Y){return DL0?new Fy($,Y):BL0(Ly.resolve(Y,$))}function OR1($){if(/^\[/.test($.hostname)&&!/^\[[:0-9a-f]+\]$/i.test($.hostname))throw new HL0({input:$.href||$});if(/^\[/.test($.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test($.host))throw new HL0({input:$.href||$});return $}function VL0($,Y){var X=Y||{};for(var G of rt6)X[G]=$[G];if(X.hostname.startsWith("["))X.hostname=X.hostname.slice(1,-1);if(X.port!=="")X.port=Number(X.port);return X.path=X.search?X.pathname+X.search:X.pathname,X}function UL0($,Y){var X;for(var G in Y)if($.test(G))X=Y[G],delete Y[G];return X===null||typeof X>"u"?void 0:String(X).trim()}function Dy($,Y,X){function G(J){if(VB(Error.captureStackTrace))Error.captureStackTrace(this,this.constructor);Object.assign(this,J||{}),this.code=$,this.message=this.cause?Y+": "+this.cause.message:Y}return G.prototype=new(X||Error),Object.defineProperties(G.prototype,{constructor:{value:G,enumerable:!1},name:{value:"Error ["+$+"]",enumerable:!1}}),G}function OL0($,Y){for(var X of NL0)$.removeListener(X,AL0[X]);$.on("error",BR1),$.destroy(Y)}function $e6($,Y){LL0(zB($)&&zB(Y));var X=$.length-Y.length-1;return X>0&&$[X]==="."&&$.endsWith(Y)}function Ye6($){return $ instanceof Array}function zB($){return typeof $==="string"||$ instanceof String}function VB($){return typeof $==="function"}function Xe6($){return typeof $==="object"&&"length"in $}function Ge6($){return Fy&&$ instanceof Fy}function Je6($){return $.replace(/[\]\\/()*+?.$]/g,"\\$&")}EL0.exports=AR1({http:lt6,https:it6});EL0.exports.wrap=AR1});var Uq1=o((gS5,Zq1)=>{Zq1.exports=B08;function uP($){if($ instanceof Buffer)return Buffer.from($);return new $.constructor($.buffer.slice(),$.byteOffset,$.length)}function B08($){if($=$||{},$.circles)return O08($);let Y=new Map;if(Y.set(Date,(W)=>new Date(W)),Y.set(Map,(W,K)=>new Map(G(Array.from(W),K))),Y.set(Set,(W,K)=>new Set(G(Array.from(W),K))),$.constructorHandlers)for(let W of $.constructorHandlers)Y.set(W[0],W[1]);let X=null;return $.proto?Q:J;function G(W,K){let Z=Object.keys(W),H=Array(Z.length);for(let z=0;z<Z.length;z++){let V=Z[z],F=W[V];if(typeof F!=="object"||F===null)H[V]=F;else if(F.constructor!==Object&&(X=Y.get(F.constructor)))H[V]=X(F,K);else if(ArrayBuffer.isView(F))H[V]=uP(F);else H[V]=K(F)}return H}function J(W){if(typeof W!=="object"||W===null)return W;if(Array.isArray(W))return G(W,J);if(W.constructor!==Object&&(X=Y.get(W.constructor)))return X(W,J);let K={};for(let Z in W){if(Object.hasOwnProperty.call(W,Z)===!1)continue;let H=W[Z];if(typeof H!=="object"||H===null)K[Z]=H;else if(H.constructor!==Object&&(X=Y.get(H.constructor)))K[Z]=X(H,J);else if(ArrayBuffer.isView(H))K[Z]=uP(H);else K[Z]=J(H)}return K}function Q(W){if(typeof W!=="object"||W===null)return W;if(Array.isArray(W))return G(W,Q);if(W.constructor!==Object&&(X=Y.get(W.constructor)))return X(W,Q);let K={};for(let Z in W){let H=W[Z];if(typeof H!=="object"||H===null)K[Z]=H;else if(H.constructor!==Object&&(X=Y.get(H.constructor)))K[Z]=X(H,Q);else if(ArrayBuffer.isView(H))K[Z]=uP(H);else K[Z]=Q(H)}return K}}function O08($){let Y=[],X=[],G=new Map;if(G.set(Date,(Z)=>new Date(Z)),G.set(Map,(Z,H)=>new Map(Q(Array.from(Z),H))),G.set(Set,(Z,H)=>new Set(Q(Array.from(Z),H))),$.constructorHandlers)for(let Z of $.constructorHandlers)G.set(Z[0],Z[1]);let J=null;return $.proto?K:W;function Q(Z,H){let z=Object.keys(Z),V=Array(z.length);for(let F=0;F<z.length;F++){let L=z[F],N=Z[L];if(typeof N!=="object"||N===null)V[L]=N;else if(N.constructor!==Object&&(J=G.get(N.constructor)))V[L]=J(N,H);else if(ArrayBuffer.isView(N))V[L]=uP(N);else{let D=Y.indexOf(N);if(D!==-1)V[L]=X[D];else V[L]=H(N)}}return V}function W(Z){if(typeof Z!=="object"||Z===null)return Z;if(Array.isArray(Z))return Q(Z,W);if(Z.constructor!==Object&&(J=G.get(Z.constructor)))return J(Z,W);let H={};Y.push(Z),X.push(H);for(let z in Z){if(Object.hasOwnProperty.call(Z,z)===!1)continue;let V=Z[z];if(typeof V!=="object"||V===null)H[z]=V;else if(V.constructor!==Object&&(J=G.get(V.constructor)))H[z]=J(V,W);else if(ArrayBuffer.isView(V))H[z]=uP(V);else{let F=Y.indexOf(V);if(F!==-1)H[z]=X[F];else H[z]=W(V)}}return Y.pop(),X.pop(),H}function K(Z){if(typeof Z!=="object"||Z===null)return Z;if(Array.isArray(Z))return Q(Z,K);if(Z.constructor!==Object&&(J=G.get(Z.constructor)))return J(Z,K);let H={};Y.push(Z),X.push(H);for(let z in Z){let V=Z[z];if(typeof V!=="object"||V===null)H[z]=V;else if(V.constructor!==Object&&(J=G.get(V.constructor)))H[z]=J(V,K);else if(ArrayBuffer.isView(V))H[z]=uP(V);else{let F=Y.indexOf(V);if(F!==-1)H[z]=X[F];else H[z]=K(V)}}return Y.pop(),X.pop(),H}}});var zq1=o((mS5,Hq1)=>{Hq1.exports=Uq1()()});var qy=o((Lq1)=>{Object.defineProperty(Lq1,"__esModule",{value:!0});Lq1.regexpCode=Lq1.getEsmExportName=Lq1.getProperty=Lq1.safeStringify=Lq1.stringify=Lq1.strConcat=Lq1.addCodeArg=Lq1.str=Lq1._=Lq1.nil=Lq1._Code=Lq1.Name=Lq1.IDENTIFIER=Lq1._CodeOrName=void 0;class Oo{}Lq1._CodeOrName=Oo;Lq1.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class pP extends Oo{constructor($){super();if(!Lq1.IDENTIFIER.test($))throw Error("CodeGen: name must be a valid identifier");this.str=$}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}Lq1.Name=pP;class eK extends Oo{constructor($){super();this._items=typeof $==="string"?[$]:$}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let $=this._items[0];return $===""||$==='""'}get str(){var $;return($=this._str)!==null&&$!==void 0?$:this._str=this._items.reduce((Y,X)=>`${Y}${X}`,"")}get names(){var $;return($=this._names)!==null&&$!==void 0?$:this._names=this._items.reduce((Y,X)=>{if(X instanceof pP)Y[X.str]=(Y[X.str]||0)+1;return Y},{})}}Lq1._Code=eK;Lq1.nil=new eK("");function Vq1($,...Y){let X=[$[0]],G=0;while(G<Y.length)hL0(X,Y[G]),X.push($[++G]);return new eK(X)}Lq1._=Vq1;var bL0=new eK("+");function Fq1($,...Y){let X=[Ry($[0])],G=0;while(G<Y.length)X.push(bL0),hL0(X,Y[G]),X.push(bL0,Ry($[++G]));return E08(X),new eK(X)}Lq1.str=Fq1;function hL0($,Y){if(Y instanceof eK)$.push(...Y._items);else if(Y instanceof pP)$.push(Y);else $.push(q08(Y))}Lq1.addCodeArg=hL0;function E08($){let Y=1;while(Y<$.length-1){if($[Y]===bL0){let X=M08($[Y-1],$[Y+1]);if(X!==void 0){$.splice(Y-1,3,X);continue}$[Y++]="+"}Y++}}function M08($,Y){if(Y==='""')return $;if($==='""')return Y;if(typeof $=="string"){if(Y instanceof pP||$[$.length-1]!=='"')return;if(typeof Y!="string")return`${$.slice(0,-1)}${Y}"`;if(Y[0]==='"')return $.slice(0,-1)+Y.slice(1);return}if(typeof Y=="string"&&Y[0]==='"'&&!($ instanceof pP))return`"${$}${Y.slice(1)}`;return}function R08($,Y){return Y.emptyStr()?$:$.emptyStr()?Y:Fq1`${$}${Y}`}Lq1.strConcat=R08;function q08($){return typeof $=="number"||typeof $=="boolean"||$===null?$:Ry(Array.isArray($)?$.join(","):$)}function P08($){return new eK(Ry($))}Lq1.stringify=P08;function Ry($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Lq1.safeStringify=Ry;function w08($){return typeof $=="string"&&Lq1.IDENTIFIER.test($)?new eK(`.${$}`):Vq1`[${$}]`}Lq1.getProperty=w08;function _08($){if(typeof $=="string"&&Lq1.IDENTIFIER.test($))return new eK(`${$}`);throw Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}Lq1.getEsmExportName=_08;function j08($){return new eK($.toString())}Lq1.regexpCode=j08});var uL0=o((Bq1)=>{Object.defineProperty(Bq1,"__esModule",{value:!0});Bq1.ValueScope=Bq1.ValueScopeName=Bq1.Scope=Bq1.varKinds=Bq1.UsedValueState=void 0;var YQ=qy();class Nq1 extends Error{constructor($){super(`CodeGen: "code" for ${$} not defined`);this.value=$.value}}var Mo;(function($){$[$.Started=0]="Started",$[$.Completed=1]="Completed"})(Mo||(Bq1.UsedValueState=Mo={}));Bq1.varKinds={const:new YQ.Name("const"),let:new YQ.Name("let"),var:new YQ.Name("var")};class gL0{constructor({prefixes:$,parent:Y}={}){this._names={},this._prefixes=$,this._parent=Y}toName($){return $ instanceof YQ.Name?$:this.name($)}name($){return new YQ.Name(this._newName($))}_newName($){let Y=this._names[$]||this._nameGroup($);return`${$}${Y.index++}`}_nameGroup($){var Y,X;if(((X=(Y=this._parent)===null||Y===void 0?void 0:Y._prefixes)===null||X===void 0?void 0:X.has($))||this._prefixes&&!this._prefixes.has($))throw Error(`CodeGen: prefix "${$}" is not allowed in this scope`);return this._names[$]={prefix:$,index:0}}}Bq1.Scope=gL0;class mL0 extends YQ.Name{constructor($,Y){super(Y);this.prefix=$}setValue($,{property:Y,itemIndex:X}){this.value=$,this.scopePath=YQ._`.${new YQ.Name(Y)}[${X}]`}}Bq1.ValueScopeName=mL0;var m08=YQ._`\n`;class Aq1 extends gL0{constructor($){super($);this._values={},this._scope=$.scope,this.opts={...$,_n:$.lines?m08:YQ.nil}}get(){return this._scope}name($){return new mL0($,this._newName($))}value($,Y){var X;if(Y.ref===void 0)throw Error("CodeGen: ref must be passed in value");let G=this.toName($),{prefix:J}=G,Q=(X=Y.key)!==null&&X!==void 0?X:Y.ref,W=this._values[J];if(W){let H=W.get(Q);if(H)return H}else W=this._values[J]=new Map;W.set(Q,G);let K=this._scope[J]||(this._scope[J]=[]),Z=K.length;return K[Z]=Y.ref,G.setValue(Y,{property:J,itemIndex:Z}),G}getValue($,Y){let X=this._values[$];if(!X)return;return X.get(Y)}scopeRefs($,Y=this._values){return this._reduceValues(Y,(X)=>{if(X.scopePath===void 0)throw Error(`CodeGen: name "${X}" has no value`);return YQ._`${$}${X.scopePath}`})}scopeCode($=this._values,Y,X){return this._reduceValues($,(G)=>{if(G.value===void 0)throw Error(`CodeGen: name "${G}" has no value`);return G.value.code},Y,X)}_reduceValues($,Y,X={},G){let J=YQ.nil;for(let Q in $){let W=$[Q];if(!W)continue;let K=X[Q]=X[Q]||new Map;W.forEach((Z)=>{if(K.has(Z))return;K.set(Z,Mo.Started);let H=Y(Z);if(H){let z=this.opts.es5?Bq1.varKinds.var:Bq1.varKinds.const;J=YQ._`${J}${z} ${Z} = ${H};${this.opts._n}`}else if(H=G===null||G===void 0?void 0:G(Z))J=YQ._`${J}${H}${this.opts._n}`;else throw new Nq1(Z);K.set(Z,Mo.Completed)})}return J}}Bq1.ValueScope=Aq1});var d6=o((XQ)=>{Object.defineProperty(XQ,"__esModule",{value:!0});XQ.or=XQ.and=XQ.not=XQ.CodeGen=XQ.operators=XQ.varKinds=XQ.ValueScopeName=XQ.ValueScope=XQ.Scope=XQ.Name=XQ.regexpCode=XQ.stringify=XQ.getProperty=XQ.nil=XQ.strConcat=XQ.str=XQ._=void 0;var k8=qy(),$Z=uL0(),oF=qy();Object.defineProperty(XQ,"_",{enumerable:!0,get:function(){return oF._}});Object.defineProperty(XQ,"str",{enumerable:!0,get:function(){return oF.str}});Object.defineProperty(XQ,"strConcat",{enumerable:!0,get:function(){return oF.strConcat}});Object.defineProperty(XQ,"nil",{enumerable:!0,get:function(){return oF.nil}});Object.defineProperty(XQ,"getProperty",{enumerable:!0,get:function(){return oF.getProperty}});Object.defineProperty(XQ,"stringify",{enumerable:!0,get:function(){return oF.stringify}});Object.defineProperty(XQ,"regexpCode",{enumerable:!0,get:function(){return oF.regexpCode}});Object.defineProperty(XQ,"Name",{enumerable:!0,get:function(){return oF.Name}});var jo=uL0();Object.defineProperty(XQ,"Scope",{enumerable:!0,get:function(){return jo.Scope}});Object.defineProperty(XQ,"ValueScope",{enumerable:!0,get:function(){return jo.ValueScope}});Object.defineProperty(XQ,"ValueScopeName",{enumerable:!0,get:function(){return jo.ValueScopeName}});Object.defineProperty(XQ,"varKinds",{enumerable:!0,get:function(){return jo.varKinds}});XQ.operators={GT:new k8._Code(">"),GTE:new k8._Code(">="),LT:new k8._Code("<"),LTE:new k8._Code("<="),EQ:new k8._Code("==="),NEQ:new k8._Code("!=="),NOT:new k8._Code("!"),OR:new k8._Code("||"),AND:new k8._Code("&&"),ADD:new k8._Code("+")};class tF{optimizeNodes(){return this}optimizeNames($,Y){return this}}class Eq1 extends tF{constructor($,Y,X){super();this.varKind=$,this.name=Y,this.rhs=X}render({es5:$,_n:Y}){let X=$?$Z.varKinds.var:this.varKind,G=this.rhs===void 0?"":` = ${this.rhs}`;return`${X} ${this.name}${G};`+Y}optimizeNames($,Y){if(!$[this.name.str])return;if(this.rhs)this.rhs=cP(this.rhs,$,Y);return this}get names(){return this.rhs instanceof k8._CodeOrName?this.rhs.names:{}}}class cL0 extends tF{constructor($,Y,X){super();this.lhs=$,this.rhs=Y,this.sideEffects=X}render({_n:$}){return`${this.lhs} = ${this.rhs};`+$}optimizeNames($,Y){if(this.lhs instanceof k8.Name&&!$[this.lhs.str]&&!this.sideEffects)return;return this.rhs=cP(this.rhs,$,Y),this}get names(){let $=this.lhs instanceof k8.Name?{}:{...this.lhs.names};return _o($,this.rhs)}}class Mq1 extends cL0{constructor($,Y,X,G){super($,X,G);this.op=Y}render({_n:$}){return`${this.lhs} ${this.op}= ${this.rhs};`+$}}class Rq1 extends tF{constructor($){super();this.label=$,this.names={}}render({_n:$}){return`${this.label}:`+$}}class qq1 extends tF{constructor($){super();this.label=$,this.names={}}render({_n:$}){return`break${this.label?` ${this.label}`:""};`+$}}class Pq1 extends tF{constructor($){super();this.error=$}render({_n:$}){return`throw ${this.error};`+$}get names(){return this.error.names}}class wq1 extends tF{constructor($){super();this.code=$}render({_n:$}){return`${this.code};`+$}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames($,Y){return this.code=cP(this.code,$,Y),this}get names(){return this.code instanceof k8._CodeOrName?this.code.names:{}}}class To extends tF{constructor($=[]){super();this.nodes=$}render($){return this.nodes.reduce((Y,X)=>Y+X.render($),"")}optimizeNodes(){let{nodes:$}=this,Y=$.length;while(Y--){let X=$[Y].optimizeNodes();if(Array.isArray(X))$.splice(Y,1,...X);else if(X)$[Y]=X;else $.splice(Y,1)}return $.length>0?this:void 0}optimizeNames($,Y){let{nodes:X}=this,G=X.length;while(G--){let J=X[G];if(J.optimizeNames($,Y))continue;c08($,J.names),X.splice(G,1)}return X.length>0?this:void 0}get names(){return this.nodes.reduce(($,Y)=>LB($,Y.names),{})}}class eF extends To{render($){return"{"+$._n+super.render($)+"}"+$._n}}class _q1 extends To{}class Py extends eF{}Py.kind="else";class Uz extends eF{constructor($,Y){super(Y);this.condition=$}render($){let Y=`if(${this.condition})`+super.render($);if(this.else)Y+="else "+this.else.render($);return Y}optimizeNodes(){super.optimizeNodes();let $=this.condition;if($===!0)return this.nodes;let Y=this.else;if(Y){let X=Y.optimizeNodes();Y=this.else=Array.isArray(X)?new Py(X):X}if(Y){if($===!1)return Y instanceof Uz?Y:Y.nodes;if(this.nodes.length)return this;return new Uz(Sq1($),Y instanceof Uz?[Y]:Y.nodes)}if($===!1||!this.nodes.length)return;return this}optimizeNames($,Y){var X;if(this.else=(X=this.else)===null||X===void 0?void 0:X.optimizeNames($,Y),!(super.optimizeNames($,Y)||this.else))return;return this.condition=cP(this.condition,$,Y),this}get names(){let $=super.names;if(_o($,this.condition),this.else)LB($,this.else.names);return $}}Uz.kind="if";class dP extends eF{}dP.kind="for";class jq1 extends dP{constructor($){super();this.iteration=$}render($){return`for(${this.iteration})`+super.render($)}optimizeNames($,Y){if(!super.optimizeNames($,Y))return;return this.iteration=cP(this.iteration,$,Y),this}get names(){return LB(super.names,this.iteration.names)}}class Tq1 extends dP{constructor($,Y,X,G){super();this.varKind=$,this.name=Y,this.from=X,this.to=G}render($){let Y=$.es5?$Z.varKinds.var:this.varKind,{name:X,from:G,to:J}=this;return`for(${Y} ${X}=${G}; ${X}<${J}; ${X}++)`+super.render($)}get names(){let $=_o(super.names,this.from);return _o($,this.to)}}class pL0 extends dP{constructor($,Y,X,G){super();this.loop=$,this.varKind=Y,this.name=X,this.iterable=G}render($){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render($)}optimizeNames($,Y){if(!super.optimizeNames($,Y))return;return this.iterable=cP(this.iterable,$,Y),this}get names(){return LB(super.names,this.iterable.names)}}class Ro extends eF{constructor($,Y,X){super();this.name=$,this.args=Y,this.async=X}render($){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render($)}}Ro.kind="func";class qo extends To{render($){return"return "+super.render($)}}qo.kind="return";class Iq1 extends eF{render($){let Y="try"+super.render($);if(this.catch)Y+=this.catch.render($);if(this.finally)Y+=this.finally.render($);return Y}optimizeNodes(){var $,Y;return super.optimizeNodes(),($=this.catch)===null||$===void 0||$.optimizeNodes(),(Y=this.finally)===null||Y===void 0||Y.optimizeNodes(),this}optimizeNames($,Y){var X,G;return super.optimizeNames($,Y),(X=this.catch)===null||X===void 0||X.optimizeNames($,Y),(G=this.finally)===null||G===void 0||G.optimizeNames($,Y),this}get names(){let $=super.names;if(this.catch)LB($,this.catch.names);if(this.finally)LB($,this.finally.names);return $}}class Po extends eF{constructor($){super();this.error=$}render($){return`catch(${this.error})`+super.render($)}}Po.kind="catch";class wo extends eF{render($){return"finally"+super.render($)}}wo.kind="finally";class Cq1{constructor($,Y={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...Y,_n:Y.lines?`
`:""},this._extScope=$,this._scope=new $Z.Scope({parent:$}),this._nodes=[new _q1]}toString(){return this._root.render(this.opts)}name($){return this._scope.name($)}scopeName($){return this._extScope.name($)}scopeValue($,Y){let X=this._extScope.value($,Y);return(this._values[X.prefix]||(this._values[X.prefix]=new Set)).add(X),X}getScopeValue($,Y){return this._extScope.getValue($,Y)}scopeRefs($){return this._extScope.scopeRefs($,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def($,Y,X,G){let J=this._scope.toName(Y);if(X!==void 0&&G)this._constants[J.str]=X;return this._leafNode(new Eq1($,J,X)),J}const($,Y,X){return this._def($Z.varKinds.const,$,Y,X)}let($,Y,X){return this._def($Z.varKinds.let,$,Y,X)}var($,Y,X){return this._def($Z.varKinds.var,$,Y,X)}assign($,Y,X){return this._leafNode(new cL0($,Y,X))}add($,Y){return this._leafNode(new Mq1($,XQ.operators.ADD,Y))}code($){if(typeof $=="function")$();else if($!==k8.nil)this._leafNode(new wq1($));return this}object(...$){let Y=["{"];for(let[X,G]of $){if(Y.length>1)Y.push(",");if(Y.push(X),X!==G||this.opts.es5)Y.push(":"),(0,k8.addCodeArg)(Y,G)}return Y.push("}"),new k8._Code(Y)}if($,Y,X){if(this._blockNode(new Uz($)),Y&&X)this.code(Y).else().code(X).endIf();else if(Y)this.code(Y).endIf();else if(X)throw Error('CodeGen: "else" body without "then" body');return this}elseIf($){return this._elseNode(new Uz($))}else(){return this._elseNode(new Py)}endIf(){return this._endBlockNode(Uz,Py)}_for($,Y){if(this._blockNode($),Y)this.code(Y).endFor();return this}for($,Y){return this._for(new jq1($),Y)}forRange($,Y,X,G,J=this.opts.es5?$Z.varKinds.var:$Z.varKinds.let){let Q=this._scope.toName($);return this._for(new Tq1(J,Q,Y,X),()=>G(Q))}forOf($,Y,X,G=$Z.varKinds.const){let J=this._scope.toName($);if(this.opts.es5){let Q=Y instanceof k8.Name?Y:this.var("_arr",Y);return this.forRange("_i",0,k8._`${Q}.length`,(W)=>{this.var(J,k8._`${Q}[${W}]`),X(J)})}return this._for(new pL0("of",G,J,Y),()=>X(J))}forIn($,Y,X,G=this.opts.es5?$Z.varKinds.var:$Z.varKinds.const){if(this.opts.ownProperties)return this.forOf($,k8._`Object.keys(${Y})`,X);let J=this._scope.toName($);return this._for(new pL0("in",G,J,Y),()=>X(J))}endFor(){return this._endBlockNode(dP)}label($){return this._leafNode(new Rq1($))}break($){return this._leafNode(new qq1($))}return($){let Y=new qo;if(this._blockNode(Y),this.code($),Y.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(qo)}try($,Y,X){if(!Y&&!X)throw Error('CodeGen: "try" without "catch" and "finally"');let G=new Iq1;if(this._blockNode(G),this.code($),Y){let J=this.name("e");this._currNode=G.catch=new Po(J),Y(J)}if(X)this._currNode=G.finally=new wo,this.code(X);return this._endBlockNode(Po,wo)}throw($){return this._leafNode(new Pq1($))}block($,Y){if(this._blockStarts.push(this._nodes.length),$)this.code($).endBlock(Y);return this}endBlock($){let Y=this._blockStarts.pop();if(Y===void 0)throw Error("CodeGen: not in self-balancing block");let X=this._nodes.length-Y;if(X<0||$!==void 0&&X!==$)throw Error(`CodeGen: wrong number of nodes: ${X} vs ${$} expected`);return this._nodes.length=Y,this}func($,Y=k8.nil,X,G){if(this._blockNode(new Ro($,Y,X)),G)this.code(G).endFunc();return this}endFunc(){return this._endBlockNode(Ro)}optimize($=1){while($-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode($){return this._currNode.nodes.push($),this}_blockNode($){this._currNode.nodes.push($),this._nodes.push($)}_endBlockNode($,Y){let X=this._currNode;if(X instanceof $||Y&&X instanceof Y)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${Y?`${$.kind}/${Y.kind}`:$.kind}"`)}_elseNode($){let Y=this._currNode;if(!(Y instanceof Uz))throw Error('CodeGen: "else" without "if"');return this._currNode=Y.else=$,this}get _root(){return this._nodes[0]}get _currNode(){let $=this._nodes;return $[$.length-1]}set _currNode($){let Y=this._nodes;Y[Y.length-1]=$}}XQ.CodeGen=Cq1;function LB($,Y){for(let X in Y)$[X]=($[X]||0)+(Y[X]||0);return $}function _o($,Y){return Y instanceof k8._CodeOrName?LB($,Y.names):$}function cP($,Y,X){if($ instanceof k8.Name)return G($);if(!J($))return $;return new k8._Code($._items.reduce((Q,W)=>{if(W instanceof k8.Name)W=G(W);if(W instanceof k8._Code)Q.push(...W._items);else Q.push(W);return Q},[]));function G(Q){let W=X[Q.str];if(W===void 0||Y[Q.str]!==1)return Q;return delete Y[Q.str],W}function J(Q){return Q instanceof k8._Code&&Q._items.some((W)=>W instanceof k8.Name&&Y[W.str]===1&&X[W.str]!==void 0)}}function c08($,Y){for(let X in Y)$[X]=($[X]||0)-(Y[X]||0)}function Sq1($){return typeof $=="boolean"||typeof $=="number"||$===null?!$:k8._`!${dL0($)}`}XQ.not=Sq1;var l08=kq1(XQ.operators.AND);function i08(...$){return $.reduce(l08)}XQ.and=i08;var n08=kq1(XQ.operators.OR);function r08(...$){return $.reduce(n08)}XQ.or=r08;function kq1($){return(Y,X)=>Y===k8.nil?X:X===k8.nil?Y:k8._`${dL0(Y)} ${$} ${dL0(X)}`}function dL0($){return $ instanceof k8.Name?$:k8._`(${$})`}});var g8=o((uq1)=>{Object.defineProperty(uq1,"__esModule",{value:!0});uq1.checkStrictMode=uq1.getErrorPath=uq1.Type=uq1.useFunc=uq1.setEvaluated=uq1.evaluatedPropsToName=uq1.mergeEvaluated=uq1.eachItem=uq1.unescapeJsonPointer=uq1.escapeJsonPointer=uq1.escapeFragment=uq1.unescapeFragment=uq1.schemaRefOrVal=uq1.schemaHasRulesButRef=uq1.schemaHasRules=uq1.checkUnknownRules=uq1.alwaysValidSchema=uq1.toHash=void 0;var _5=d6(),t08=qy();function e08($){let Y={};for(let X of $)Y[X]=!0;return Y}uq1.toHash=e08;function $18($,Y){if(typeof Y=="boolean")return Y;if(Object.keys(Y).length===0)return!0;return bq1($,Y),!hq1(Y,$.self.RULES.all)}uq1.alwaysValidSchema=$18;function bq1($,Y=$.schema){let{opts:X,self:G}=$;if(!X.strictSchema)return;if(typeof Y==="boolean")return;let J=G.RULES.keywords;for(let Q in Y)if(!J[Q])mq1($,`unknown keyword: "${Q}"`)}uq1.checkUnknownRules=bq1;function hq1($,Y){if(typeof $=="boolean")return!$;for(let X in $)if(Y[X])return!0;return!1}uq1.schemaHasRules=hq1;function Y18($,Y){if(typeof $=="boolean")return!$;for(let X in $)if(X!=="$ref"&&Y.all[X])return!0;return!1}uq1.schemaHasRulesButRef=Y18;function X18({topSchemaRef:$,schemaPath:Y},X,G,J){if(!J){if(typeof X=="number"||typeof X=="boolean")return X;if(typeof X=="string")return _5._`${X}`}return _5._`${$}${Y}${(0,_5.getProperty)(G)}`}uq1.schemaRefOrVal=X18;function G18($){return fq1(decodeURIComponent($))}uq1.unescapeFragment=G18;function J18($){return encodeURIComponent(iL0($))}uq1.escapeFragment=J18;function iL0($){if(typeof $=="number")return`${$}`;return $.replace(/~/g,"~0").replace(/\//g,"~1")}uq1.escapeJsonPointer=iL0;function fq1($){return $.replace(/~1/g,"/").replace(/~0/g,"~")}uq1.unescapeJsonPointer=fq1;function Q18($,Y){if(Array.isArray($))for(let X of $)Y(X);else Y($)}uq1.eachItem=Q18;function xq1({mergeNames:$,mergeToName:Y,mergeValues:X,resultToName:G}){return(J,Q,W,K)=>{let Z=W===void 0?Q:W instanceof _5.Name?(Q instanceof _5.Name?$(J,Q,W):Y(J,Q,W),W):Q instanceof _5.Name?(Y(J,W,Q),Q):X(Q,W);return K===_5.Name&&!(Z instanceof _5.Name)?G(J,Z):Z}}uq1.mergeEvaluated={props:xq1({mergeNames:($,Y,X)=>$.if(_5._`${X} !== true && ${Y} !== undefined`,()=>{$.if(_5._`${Y} === true`,()=>$.assign(X,!0),()=>$.assign(X,_5._`${X} || {}`).code(_5._`Object.assign(${X}, ${Y})`))}),mergeToName:($,Y,X)=>$.if(_5._`${X} !== true`,()=>{if(Y===!0)$.assign(X,!0);else $.assign(X,_5._`${X} || {}`),nL0($,X,Y)}),mergeValues:($,Y)=>$===!0?!0:{...$,...Y},resultToName:gq1}),items:xq1({mergeNames:($,Y,X)=>$.if(_5._`${X} !== true && ${Y} !== undefined`,()=>$.assign(X,_5._`${Y} === true ? true : ${X} > ${Y} ? ${X} : ${Y}`)),mergeToName:($,Y,X)=>$.if(_5._`${X} !== true`,()=>$.assign(X,Y===!0?!0:_5._`${X} > ${Y} ? ${X} : ${Y}`)),mergeValues:($,Y)=>$===!0?!0:Math.max($,Y),resultToName:($,Y)=>$.var("items",Y)})};function gq1($,Y){if(Y===!0)return $.var("props",!0);let X=$.var("props",_5._`{}`);if(Y!==void 0)nL0($,X,Y);return X}uq1.evaluatedPropsToName=gq1;function nL0($,Y,X){Object.keys(X).forEach((G)=>$.assign(_5._`${Y}${(0,_5.getProperty)(G)}`,!0))}uq1.setEvaluated=nL0;var yq1={};function W18($,Y){return $.scopeValue("func",{ref:Y,code:yq1[Y.code]||(yq1[Y.code]=new t08._Code(Y.code))})}uq1.useFunc=W18;var lL0;(function($){$[$.Num=0]="Num",$[$.Str=1]="Str"})(lL0||(uq1.Type=lL0={}));function K18($,Y,X){if($ instanceof _5.Name){let G=Y===lL0.Num;return X?G?_5._`"[" + ${$} + "]"`:_5._`"['" + ${$} + "']"`:G?_5._`"/" + ${$}`:_5._`"/" + ${$}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return X?(0,_5.getProperty)($).toString():"/"+iL0($)}uq1.getErrorPath=K18;function mq1($,Y,X=$.opts.strictSchema){if(!X)return;if(Y=`strict mode: ${Y}`,X===!0)throw Error(Y);$.self.logger.warn(Y)}uq1.checkStrictMode=mq1});var Hz=o((dq1)=>{Object.defineProperty(dq1,"__esModule",{value:!0});var iX=d6(),w18={data:new iX.Name("data"),valCxt:new iX.Name("valCxt"),instancePath:new iX.Name("instancePath"),parentData:new iX.Name("parentData"),parentDataProperty:new iX.Name("parentDataProperty"),rootData:new iX.Name("rootData"),dynamicAnchors:new iX.Name("dynamicAnchors"),vErrors:new iX.Name("vErrors"),errors:new iX.Name("errors"),this:new iX.Name("this"),self:new iX.Name("self"),scope:new iX.Name("scope"),json:new iX.Name("json"),jsonPos:new iX.Name("jsonPos"),jsonLen:new iX.Name("jsonLen"),jsonPart:new iX.Name("jsonPart")};dq1.default=w18});var wy=o((nq1)=>{Object.defineProperty(nq1,"__esModule",{value:!0});nq1.extendErrors=nq1.resetErrorsCount=nq1.reportExtraError=nq1.reportError=nq1.keyword$DataError=nq1.keywordError=void 0;var m8=d6(),Co=g8(),xG=Hz();nq1.keywordError={message:({keyword:$})=>m8.str`must pass "${$}" keyword validation`};nq1.keyword$DataError={message:({keyword:$,schemaType:Y})=>Y?m8.str`"${$}" keyword must be ${Y} ($data)`:m8.str`"${$}" keyword is invalid ($data)`};function j18($,Y=nq1.keywordError,X,G){let{it:J}=$,{gen:Q,compositeRule:W,allErrors:K}=J,Z=iq1($,Y,X);if(G!==null&&G!==void 0?G:W||K)cq1(Q,Z);else lq1(J,m8._`[${Z}]`)}nq1.reportError=j18;function T18($,Y=nq1.keywordError,X){let{it:G}=$,{gen:J,compositeRule:Q,allErrors:W}=G,K=iq1($,Y,X);if(cq1(J,K),!(Q||W))lq1(G,xG.default.vErrors)}nq1.reportExtraError=T18;function I18($,Y){$.assign(xG.default.errors,Y),$.if(m8._`${xG.default.vErrors} !== null`,()=>$.if(Y,()=>$.assign(m8._`${xG.default.vErrors}.length`,Y),()=>$.assign(xG.default.vErrors,null)))}nq1.resetErrorsCount=I18;function C18({gen:$,keyword:Y,schemaValue:X,data:G,errsCount:J,it:Q}){if(J===void 0)throw Error("ajv implementation error");let W=$.name("err");$.forRange("i",J,xG.default.errors,(K)=>{if($.const(W,m8._`${xG.default.vErrors}[${K}]`),$.if(m8._`${W}.instancePath === undefined`,()=>$.assign(m8._`${W}.instancePath`,(0,m8.strConcat)(xG.default.instancePath,Q.errorPath))),$.assign(m8._`${W}.schemaPath`,m8.str`${Q.errSchemaPath}/${Y}`),Q.opts.verbose)$.assign(m8._`${W}.schema`,X),$.assign(m8._`${W}.data`,G)})}nq1.extendErrors=C18;function cq1($,Y){let X=$.const("err",Y);$.if(m8._`${xG.default.vErrors} === null`,()=>$.assign(xG.default.vErrors,m8._`[${X}]`),m8._`${xG.default.vErrors}.push(${X})`),$.code(m8._`${xG.default.errors}++`)}function lq1($,Y){let{gen:X,validateName:G,schemaEnv:J}=$;if(J.$async)X.throw(m8._`new ${$.ValidationError}(${Y})`);else X.assign(m8._`${G}.errors`,Y),X.return(!1)}var DB={keyword:new m8.Name("keyword"),schemaPath:new m8.Name("schemaPath"),params:new m8.Name("params"),propertyName:new m8.Name("propertyName"),message:new m8.Name("message"),schema:new m8.Name("schema"),parentSchema:new m8.Name("parentSchema")};function iq1($,Y,X){let{createErrors:G}=$.it;if(G===!1)return m8._`{}`;return S18($,Y,X)}function S18($,Y,X={}){let{gen:G,it:J}=$,Q=[k18(J,X),v18($,X)];return x18($,Y,Q),G.object(...Q)}function k18({errorPath:$},{instancePath:Y}){let X=Y?m8.str`${$}${(0,Co.getErrorPath)(Y,Co.Type.Str)}`:$;return[xG.default.instancePath,(0,m8.strConcat)(xG.default.instancePath,X)]}function v18({keyword:$,it:{errSchemaPath:Y}},{schemaPath:X,parentSchema:G}){let J=G?Y:m8.str`${Y}/${$}`;if(X)J=m8.str`${J}${(0,Co.getErrorPath)(X,Co.Type.Str)}`;return[DB.schemaPath,J]}function x18($,{params:Y,message:X},G){let{keyword:J,data:Q,schemaValue:W,it:K}=$,{opts:Z,propertyName:H,topSchemaRef:z,schemaPath:V}=K;if(G.push([DB.keyword,J],[DB.params,typeof Y=="function"?Y($):Y||m8._`{}`]),Z.messages)G.push([DB.message,typeof X=="function"?X($):X]);if(Z.verbose)G.push([DB.schema,W],[DB.parentSchema,m8._`${z}${V}`],[xG.default.data,Q]);if(H)G.push([DB.propertyName,H])}});var tq1=o((sq1)=>{Object.defineProperty(sq1,"__esModule",{value:!0});sq1.boolOrEmptySchema=sq1.topBoolOrEmptySchema=void 0;var g18=wy(),m18=d6(),u18=Hz(),p18={message:"boolean schema is false"};function d18($){let{gen:Y,schema:X,validateName:G}=$;if(X===!1)aq1($,!1);else if(typeof X=="object"&&X.$async===!0)Y.return(u18.default.data);else Y.assign(m18._`${G}.errors`,null),Y.return(!0)}sq1.topBoolOrEmptySchema=d18;function c18($,Y){let{gen:X,schema:G}=$;if(G===!1)X.var(Y,!1),aq1($);else X.var(Y,!0)}sq1.boolOrEmptySchema=c18;function aq1($,Y){let{gen:X,data:G}=$,J={gen:X,keyword:"false schema",data:G,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:$};(0,g18.reportError)(J,p18,void 0,Y)}});var aL0=o((eq1)=>{Object.defineProperty(eq1,"__esModule",{value:!0});eq1.getRules=eq1.isJSONType=void 0;var i18=["string","number","integer","boolean","null","object","array"],n18=new Set(i18);function r18($){return typeof $=="string"&&n18.has($)}eq1.isJSONType=r18;function a18(){let $={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...$,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},$.number,$.string,$.array,$.object],post:{rules:[]},all:{},keywords:{}}}eq1.getRules=a18});var sL0=o((GP1)=>{Object.defineProperty(GP1,"__esModule",{value:!0});GP1.shouldUseRule=GP1.shouldUseGroup=GP1.schemaHasRulesForType=void 0;function o18({schema:$,self:Y},X){let G=Y.RULES.types[X];return G&&G!==!0&&YP1($,G)}GP1.schemaHasRulesForType=o18;function YP1($,Y){return Y.rules.some((X)=>XP1($,X))}GP1.shouldUseGroup=YP1;function XP1($,Y){var X;return $[Y.keyword]!==void 0||((X=Y.definition.implements)===null||X===void 0?void 0:X.some((G)=>$[G]!==void 0))}GP1.shouldUseRule=XP1});var _y=o((ZP1)=>{Object.defineProperty(ZP1,"__esModule",{value:!0});ZP1.reportTypeError=ZP1.checkDataTypes=ZP1.checkDataType=ZP1.coerceAndCheckDataType=ZP1.getJSONTypes=ZP1.getSchemaTypes=ZP1.DataType=void 0;var $48=aL0(),Y48=sL0(),X48=wy(),f6=d6(),QP1=g8(),lP;(function($){$[$.Correct=0]="Correct",$[$.Wrong=1]="Wrong"})(lP||(ZP1.DataType=lP={}));function G48($){let Y=WP1($.type);if(Y.includes("null")){if($.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!Y.length&&$.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if($.nullable===!0)Y.push("null")}return Y}ZP1.getSchemaTypes=G48;function WP1($){let Y=Array.isArray($)?$:$?[$]:[];if(Y.every($48.isJSONType))return Y;throw Error("type must be JSONType or JSONType[]: "+Y.join(","))}ZP1.getJSONTypes=WP1;function J48($,Y){let{gen:X,data:G,opts:J}=$,Q=Q48(Y,J.coerceTypes),W=Y.length>0&&!(Q.length===0&&Y.length===1&&(0,Y48.schemaHasRulesForType)($,Y[0]));if(W){let K=tL0(Y,G,J.strictNumbers,lP.Wrong);X.if(K,()=>{if(Q.length)W48($,Y,Q);else eL0($)})}return W}ZP1.coerceAndCheckDataType=J48;var KP1=new Set(["string","number","integer","boolean","null"]);function Q48($,Y){return Y?$.filter((X)=>KP1.has(X)||Y==="array"&&X==="array"):[]}function W48($,Y,X){let{gen:G,data:J,opts:Q}=$,W=G.let("dataType",f6._`typeof ${J}`),K=G.let("coerced",f6._`undefined`);if(Q.coerceTypes==="array")G.if(f6._`${W} == 'object' && Array.isArray(${J}) && ${J}.length == 1`,()=>G.assign(J,f6._`${J}[0]`).assign(W,f6._`typeof ${J}`).if(tL0(Y,J,Q.strictNumbers),()=>G.assign(K,J)));G.if(f6._`${K} !== undefined`);for(let H of X)if(KP1.has(H)||H==="array"&&Q.coerceTypes==="array")Z(H);G.else(),eL0($),G.endIf(),G.if(f6._`${K} !== undefined`,()=>{G.assign(J,K),K48($,K)});function Z(H){switch(H){case"string":G.elseIf(f6._`${W} == "number" || ${W} == "boolean"`).assign(K,f6._`"" + ${J}`).elseIf(f6._`${J} === null`).assign(K,f6._`""`);return;case"number":G.elseIf(f6._`${W} == "boolean" || ${J} === null
              || (${W} == "string" && ${J} && ${J} == +${J})`).assign(K,f6._`+${J}`);return;case"integer":G.elseIf(f6._`${W} === "boolean" || ${J} === null
              || (${W} === "string" && ${J} && ${J} == +${J} && !(${J} % 1))`).assign(K,f6._`+${J}`);return;case"boolean":G.elseIf(f6._`${J} === "false" || ${J} === 0 || ${J} === null`).assign(K,!1).elseIf(f6._`${J} === "true" || ${J} === 1`).assign(K,!0);return;case"null":G.elseIf(f6._`${J} === "" || ${J} === 0 || ${J} === false`),G.assign(K,null);return;case"array":G.elseIf(f6._`${W} === "string" || ${W} === "number"
              || ${W} === "boolean" || ${J} === null`).assign(K,f6._`[${J}]`)}}}function K48({gen:$,parentData:Y,parentDataProperty:X},G){$.if(f6._`${Y} !== undefined`,()=>$.assign(f6._`${Y}[${X}]`,G))}function oL0($,Y,X,G=lP.Correct){let J=G===lP.Correct?f6.operators.EQ:f6.operators.NEQ,Q;switch($){case"null":return f6._`${Y} ${J} null`;case"array":Q=f6._`Array.isArray(${Y})`;break;case"object":Q=f6._`${Y} && typeof ${Y} == "object" && !Array.isArray(${Y})`;break;case"integer":Q=W(f6._`!(${Y} % 1) && !isNaN(${Y})`);break;case"number":Q=W();break;default:return f6._`typeof ${Y} ${J} ${$}`}return G===lP.Correct?Q:(0,f6.not)(Q);function W(K=f6.nil){return(0,f6.and)(f6._`typeof ${Y} == "number"`,K,X?f6._`isFinite(${Y})`:f6.nil)}}ZP1.checkDataType=oL0;function tL0($,Y,X,G){if($.length===1)return oL0($[0],Y,X,G);let J,Q=(0,QP1.toHash)($);if(Q.array&&Q.object){let W=f6._`typeof ${Y} != "object"`;J=Q.null?W:f6._`!${Y} || ${W}`,delete Q.null,delete Q.array,delete Q.object}else J=f6.nil;if(Q.number)delete Q.integer;for(let W in Q)J=(0,f6.and)(J,oL0(W,Y,X,G));return J}ZP1.checkDataTypes=tL0;var Z48={message:({schema:$})=>`must be ${$}`,params:({schema:$,schemaValue:Y})=>typeof $=="string"?f6._`{type: ${$}}`:f6._`{type: ${Y}}`};function eL0($){let Y=U48($);(0,X48.reportError)(Y,Z48)}ZP1.reportTypeError=eL0;function U48($){let{gen:Y,data:X,schema:G}=$,J=(0,QP1.schemaRefOrVal)($,G,"type");return{gen:Y,keyword:"type",data:X,schema:G.type,schemaCode:J,schemaValue:J,parentSchema:G,params:{},it:$}}});var FP1=o((zP1)=>{Object.defineProperty(zP1,"__esModule",{value:!0});zP1.assignDefaults=void 0;var iP=d6(),N48=g8();function A48($,Y){let{properties:X,items:G}=$.schema;if(Y==="object"&&X)for(let J in X)HP1($,J,X[J].default);else if(Y==="array"&&Array.isArray(G))G.forEach((J,Q)=>HP1($,Q,J.default))}zP1.assignDefaults=A48;function HP1($,Y,X){let{gen:G,compositeRule:J,data:Q,opts:W}=$;if(X===void 0)return;let K=iP._`${Q}${(0,iP.getProperty)(Y)}`;if(J){(0,N48.checkStrictMode)($,`default is ignored for: ${K}`);return}let Z=iP._`${K} === undefined`;if(W.useDefaults==="empty")Z=iP._`${Z} || ${K} === null || ${K} === ""`;G.if(Z,iP._`${K} = ${(0,iP.stringify)(X)}`)}});var v2=o((NP1)=>{Object.defineProperty(NP1,"__esModule",{value:!0});NP1.validateUnion=NP1.validateArray=NP1.usePattern=NP1.callValidateCode=NP1.schemaProperties=NP1.allSchemaProperties=NP1.noPropertyInData=NP1.propertyInData=NP1.isOwnProperty=NP1.hasPropFunc=NP1.reportMissingProp=NP1.checkMissingProp=NP1.checkReportMissingProp=void 0;var t5=d6(),$D0=g8(),$L=Hz(),B48=g8();function O48($,Y){let{gen:X,data:G,it:J}=$;X.if(XD0(X,G,Y,J.opts.ownProperties),()=>{$.setParams({missingProperty:t5._`${Y}`},!0),$.error()})}NP1.checkReportMissingProp=O48;function E48({gen:$,data:Y,it:{opts:X}},G,J){return(0,t5.or)(...G.map((Q)=>(0,t5.and)(XD0($,Y,Q,X.ownProperties),t5._`${J} = ${Q}`)))}NP1.checkMissingProp=E48;function M48($,Y){$.setParams({missingProperty:Y},!0),$.error()}NP1.reportMissingProp=M48;function LP1($){return $.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:t5._`Object.prototype.hasOwnProperty`})}NP1.hasPropFunc=LP1;function YD0($,Y,X){return t5._`${LP1($)}.call(${Y}, ${X})`}NP1.isOwnProperty=YD0;function R48($,Y,X,G){let J=t5._`${Y}${(0,t5.getProperty)(X)} !== undefined`;return G?t5._`${J} && ${YD0($,Y,X)}`:J}NP1.propertyInData=R48;function XD0($,Y,X,G){let J=t5._`${Y}${(0,t5.getProperty)(X)} === undefined`;return G?(0,t5.or)(J,(0,t5.not)(YD0($,Y,X))):J}NP1.noPropertyInData=XD0;function DP1($){return $?Object.keys($).filter((Y)=>Y!=="__proto__"):[]}NP1.allSchemaProperties=DP1;function q48($,Y){return DP1(Y).filter((X)=>!(0,$D0.alwaysValidSchema)($,Y[X]))}NP1.schemaProperties=q48;function P48({schemaCode:$,data:Y,it:{gen:X,topSchemaRef:G,schemaPath:J,errorPath:Q},it:W},K,Z,H){let z=H?t5._`${$}, ${Y}, ${G}${J}`:Y,V=[[$L.default.instancePath,(0,t5.strConcat)($L.default.instancePath,Q)],[$L.default.parentData,W.parentData],[$L.default.parentDataProperty,W.parentDataProperty],[$L.default.rootData,$L.default.rootData]];if(W.opts.dynamicRef)V.push([$L.default.dynamicAnchors,$L.default.dynamicAnchors]);let F=t5._`${z}, ${X.object(...V)}`;return Z!==t5.nil?t5._`${K}.call(${Z}, ${F})`:t5._`${K}(${F})`}NP1.callValidateCode=P48;var w48=t5._`new RegExp`;function _48({gen:$,it:{opts:Y}},X){let G=Y.unicodeRegExp?"u":"",{regExp:J}=Y.code,Q=J(X,G);return $.scopeValue("pattern",{key:Q.toString(),ref:Q,code:t5._`${J.code==="new RegExp"?w48:(0,B48.useFunc)($,J)}(${X}, ${G})`})}NP1.usePattern=_48;function j48($){let{gen:Y,data:X,keyword:G,it:J}=$,Q=Y.name("valid");if(J.allErrors){let K=Y.let("valid",!0);return W(()=>Y.assign(K,!1)),K}return Y.var(Q,!0),W(()=>Y.break()),Q;function W(K){let Z=Y.const("len",t5._`${X}.length`);Y.forRange("i",0,Z,(H)=>{$.subschema({keyword:G,dataProp:H,dataPropType:$D0.Type.Num},Q),Y.if((0,t5.not)(Q),K)})}}NP1.validateArray=j48;function T48($){let{gen:Y,schema:X,keyword:G,it:J}=$;if(!Array.isArray(X))throw Error("ajv implementation error");if(X.some((Z)=>(0,$D0.alwaysValidSchema)(J,Z))&&!J.opts.unevaluated)return;let W=Y.let("valid",!1),K=Y.name("_valid");Y.block(()=>X.forEach((Z,H)=>{let z=$.subschema({keyword:G,schemaProp:H,compositeRule:!0},K);if(Y.assign(W,t5._`${W} || ${K}`),!$.mergeValidEvaluated(z,K))Y.if((0,t5.not)(W))})),$.result(W,()=>$.reset(),()=>$.error(!0))}NP1.validateUnion=T48});var RP1=o((EP1)=>{Object.defineProperty(EP1,"__esModule",{value:!0});EP1.validateKeywordUsage=EP1.validSchemaType=EP1.funcKeywordCode=EP1.macroKeywordCode=void 0;var yG=d6(),NB=Hz(),u48=v2(),p48=wy();function d48($,Y){let{gen:X,keyword:G,schema:J,parentSchema:Q,it:W}=$,K=Y.macro.call(W.self,J,Q,W),Z=OP1(X,G,K);if(W.opts.validateSchema!==!1)W.self.validateSchema(K,!0);let H=X.name("valid");$.subschema({schema:K,schemaPath:yG.nil,errSchemaPath:`${W.errSchemaPath}/${G}`,topSchemaRef:Z,compositeRule:!0},H),$.pass(H,()=>$.error(!0))}EP1.macroKeywordCode=d48;function c48($,Y){var X;let{gen:G,keyword:J,schema:Q,parentSchema:W,$data:K,it:Z}=$;i48(Z,Y);let H=!K&&Y.compile?Y.compile.call(Z.self,Q,W,Z):Y.validate,z=OP1(G,J,H),V=G.let("valid");$.block$data(V,F),$.ok((X=Y.valid)!==null&&X!==void 0?X:V);function F(){if(Y.errors===!1){if(D(),Y.modifying)BP1($);A(()=>$.error())}else{let B=Y.async?L():N();if(Y.modifying)BP1($);A(()=>l48($,B))}}function L(){let B=G.let("ruleErrs",null);return G.try(()=>D(yG._`await `),(O)=>G.assign(V,!1).if(yG._`${O} instanceof ${Z.ValidationError}`,()=>G.assign(B,yG._`${O}.errors`),()=>G.throw(O))),B}function N(){let B=yG._`${z}.errors`;return G.assign(B,null),D(yG.nil),B}function D(B=Y.async?yG._`await `:yG.nil){let O=Z.opts.passContext?NB.default.this:NB.default.self,E=!(("compile"in Y)&&!K||Y.schema===!1);G.assign(V,yG._`${B}${(0,u48.callValidateCode)($,z,O,E)}`,Y.modifying)}function A(B){var O;G.if((0,yG.not)((O=Y.valid)!==null&&O!==void 0?O:V),B)}}EP1.funcKeywordCode=c48;function BP1($){let{gen:Y,data:X,it:G}=$;Y.if(G.parentData,()=>Y.assign(X,yG._`${G.parentData}[${G.parentDataProperty}]`))}function l48($,Y){let{gen:X}=$;X.if(yG._`Array.isArray(${Y})`,()=>{X.assign(NB.default.vErrors,yG._`${NB.default.vErrors} === null ? ${Y} : ${NB.default.vErrors}.concat(${Y})`).assign(NB.default.errors,yG._`${NB.default.vErrors}.length`),(0,p48.extendErrors)($)},()=>$.error())}function i48({schemaEnv:$},Y){if(Y.async&&!$.$async)throw Error("async keyword in sync schema")}function OP1($,Y,X){if(X===void 0)throw Error(`keyword "${Y}" failed to compile`);return $.scopeValue("keyword",typeof X=="function"?{ref:X}:{ref:X,code:(0,yG.stringify)(X)})}function n48($,Y,X=!1){return!Y.length||Y.some((G)=>G==="array"?Array.isArray($):G==="object"?$&&typeof $=="object"&&!Array.isArray($):typeof $==G||X&&typeof $>"u")}EP1.validSchemaType=n48;function r48({schema:$,opts:Y,self:X,errSchemaPath:G},J,Q){if(Array.isArray(J.keyword)?!J.keyword.includes(Q):J.keyword!==Q)throw Error("ajv implementation error");let W=J.dependencies;if(W===null||W===void 0?void 0:W.some((K)=>!Object.prototype.hasOwnProperty.call($,K)))throw Error(`parent schema must have dependencies of ${Q}: ${W.join(",")}`);if(J.validateSchema){if(!J.validateSchema($[Q])){let Z=`keyword "${Q}" value is invalid at path "${G}": `+X.errorsText(J.validateSchema.errors);if(Y.validateSchema==="log")X.logger.error(Z);else throw Error(Z)}}}EP1.validateKeywordUsage=r48});var _P1=o((PP1)=>{Object.defineProperty(PP1,"__esModule",{value:!0});PP1.extendSubschemaMode=PP1.extendSubschemaData=PP1.getSubschema=void 0;var Z3=d6(),qP1=g8();function t48($,{keyword:Y,schemaProp:X,schema:G,schemaPath:J,errSchemaPath:Q,topSchemaRef:W}){if(Y!==void 0&&G!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(Y!==void 0){let K=$.schema[Y];return X===void 0?{schema:K,schemaPath:Z3._`${$.schemaPath}${(0,Z3.getProperty)(Y)}`,errSchemaPath:`${$.errSchemaPath}/${Y}`}:{schema:K[X],schemaPath:Z3._`${$.schemaPath}${(0,Z3.getProperty)(Y)}${(0,Z3.getProperty)(X)}`,errSchemaPath:`${$.errSchemaPath}/${Y}/${(0,qP1.escapeFragment)(X)}`}}if(G!==void 0){if(J===void 0||Q===void 0||W===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:G,schemaPath:J,topSchemaRef:W,errSchemaPath:Q}}throw Error('either "keyword" or "schema" must be passed')}PP1.getSubschema=t48;function e48($,Y,{dataProp:X,dataPropType:G,data:J,dataTypes:Q,propertyName:W}){if(J!==void 0&&X!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:K}=Y;if(X!==void 0){let{errorPath:H,dataPathArr:z,opts:V}=Y,F=K.let("data",Z3._`${Y.data}${(0,Z3.getProperty)(X)}`,!0);Z(F),$.errorPath=Z3.str`${H}${(0,qP1.getErrorPath)(X,G,V.jsPropertySyntax)}`,$.parentDataProperty=Z3._`${X}`,$.dataPathArr=[...z,$.parentDataProperty]}if(J!==void 0){let H=J instanceof Z3.Name?J:K.let("data",J,!0);if(Z(H),W!==void 0)$.propertyName=W}if(Q)$.dataTypes=Q;function Z(H){$.data=H,$.dataLevel=Y.dataLevel+1,$.dataTypes=[],Y.definedProperties=new Set,$.parentData=Y.data,$.dataNames=[...Y.dataNames,H]}}PP1.extendSubschemaData=e48;function $68($,{jtdDiscriminator:Y,jtdMetadata:X,compositeRule:G,createErrors:J,allErrors:Q}){if(G!==void 0)$.compositeRule=G;if(J!==void 0)$.createErrors=J;if(Q!==void 0)$.allErrors=Q;$.jtdDiscriminator=Y,$.jtdMetadata=X}PP1.extendSubschemaMode=$68});var So=o((Fk5,jP1)=>{jP1.exports=function $(Y,X){if(Y===X)return!0;if(Y&&X&&typeof Y=="object"&&typeof X=="object"){if(Y.constructor!==X.constructor)return!1;var G,J,Q;if(Array.isArray(Y)){if(G=Y.length,G!=X.length)return!1;for(J=G;J--!==0;)if(!$(Y[J],X[J]))return!1;return!0}if(Y.constructor===RegExp)return Y.source===X.source&&Y.flags===X.flags;if(Y.valueOf!==Object.prototype.valueOf)return Y.valueOf()===X.valueOf();if(Y.toString!==Object.prototype.toString)return Y.toString()===X.toString();if(Q=Object.keys(Y),G=Q.length,G!==Object.keys(X).length)return!1;for(J=G;J--!==0;)if(!Object.prototype.hasOwnProperty.call(X,Q[J]))return!1;for(J=G;J--!==0;){var W=Q[J];if(!$(Y[W],X[W]))return!1}return!0}return Y!==Y&&X!==X}});var IP1=o((Lk5,TP1)=>{var YL=TP1.exports=function($,Y,X){if(typeof Y=="function")X=Y,Y={};X=Y.cb||X;var G=typeof X=="function"?X:X.pre||function(){},J=X.post||function(){};ko(Y,G,J,$,"",$)};YL.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};YL.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};YL.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};YL.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function ko($,Y,X,G,J,Q,W,K,Z,H){if(G&&typeof G=="object"&&!Array.isArray(G)){Y(G,J,Q,W,K,Z,H);for(var z in G){var V=G[z];if(Array.isArray(V)){if(z in YL.arrayKeywords)for(var F=0;F<V.length;F++)ko($,Y,X,V[F],J+"/"+z+"/"+F,Q,J,z,G,F)}else if(z in YL.propsKeywords){if(V&&typeof V=="object")for(var L in V)ko($,Y,X,V[L],J+"/"+z+"/"+G68(L),Q,J,z,G,L)}else if(z in YL.keywords||$.allKeys&&!(z in YL.skipKeywords))ko($,Y,X,V,J+"/"+z,Q,J,z,G)}X(G,J,Q,W,K,Z,H)}}function G68($){return $.replace(/~/g,"~0").replace(/\//g,"~1")}});var jy=o((vP1)=>{Object.defineProperty(vP1,"__esModule",{value:!0});vP1.getSchemaRefs=vP1.resolveUrl=vP1.normalizeId=vP1._getFullPath=vP1.getFullPath=vP1.inlineRef=void 0;var J68=g8(),Q68=So(),W68=IP1(),K68=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Z68($,Y=!0){if(typeof $=="boolean")return!0;if(Y===!0)return!GD0($);if(!Y)return!1;return CP1($)<=Y}vP1.inlineRef=Z68;var U68=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function GD0($){for(let Y in $){if(U68.has(Y))return!0;let X=$[Y];if(Array.isArray(X)&&X.some(GD0))return!0;if(typeof X=="object"&&GD0(X))return!0}return!1}function CP1($){let Y=0;for(let X in $){if(X==="$ref")return 1/0;if(Y++,K68.has(X))continue;if(typeof $[X]=="object")(0,J68.eachItem)($[X],(G)=>Y+=CP1(G));if(Y===1/0)return 1/0}return Y}function SP1($,Y="",X){if(X!==!1)Y=nP(Y);let G=$.parse(Y);return kP1($,G)}vP1.getFullPath=SP1;function kP1($,Y){return $.serialize(Y).split("#")[0]+"#"}vP1._getFullPath=kP1;var H68=/#\/?$/;function nP($){return $?$.replace(H68,""):""}vP1.normalizeId=nP;function z68($,Y,X){return X=nP(X),$.resolve(Y,X)}vP1.resolveUrl=z68;var V68=/^[a-z_][-a-z0-9._]*$/i;function F68($,Y){if(typeof $=="boolean")return{};let{schemaId:X,uriResolver:G}=this.opts,J=nP($[X]||Y),Q={"":J},W=SP1(G,J,!1),K={},Z=new Set;return W68($,{allKeys:!0},(V,F,L,N)=>{if(N===void 0)return;let D=W+F,A=Q[N];if(typeof V[X]=="string")A=B.call(this,V[X]);O.call(this,V.$anchor),O.call(this,V.$dynamicAnchor),Q[F]=A;function B(E){let M=this.opts.uriResolver.resolve;if(E=nP(A?M(A,E):E),Z.has(E))throw z(E);Z.add(E);let R=this.refs[E];if(typeof R=="string")R=this.refs[R];if(typeof R=="object")H(V,R.schema,E);else if(E!==nP(D))if(E[0]==="#")H(V,K[E],E),K[E]=V;else this.refs[E]=D;return E}function O(E){if(typeof E=="string"){if(!V68.test(E))throw Error(`invalid anchor "${E}"`);B.call(this,`#${E}`)}}}),K;function H(V,F,L){if(F!==void 0&&!Q68(V,F))throw z(L)}function z(V){return Error(`reference "${V}" resolves to more than one schema`)}}vP1.getSchemaRefs=F68});var Cy=o((aP1)=>{Object.defineProperty(aP1,"__esModule",{value:!0});aP1.getData=aP1.KeywordCxt=aP1.validateFunctionCode=void 0;var gP1=tq1(),yP1=_y(),QD0=sL0(),vo=_y(),O68=FP1(),Iy=RP1(),JD0=_P1(),y4=d6(),N6=Hz(),E68=jy(),zz=g8(),Ty=wy();function M68($){if(pP1($)){if(dP1($),uP1($)){P68($);return}}mP1($,()=>(0,gP1.topBoolOrEmptySchema)($))}aP1.validateFunctionCode=M68;function mP1({gen:$,validateName:Y,schema:X,schemaEnv:G,opts:J},Q){if(J.code.es5)$.func(Y,y4._`${N6.default.data}, ${N6.default.valCxt}`,G.$async,()=>{$.code(y4._`"use strict"; ${bP1(X,J)}`),q68($,J),$.code(Q)});else $.func(Y,y4._`${N6.default.data}, ${R68(J)}`,G.$async,()=>$.code(bP1(X,J)).code(Q))}function R68($){return y4._`{${N6.default.instancePath}="", ${N6.default.parentData}, ${N6.default.parentDataProperty}, ${N6.default.rootData}=${N6.default.data}${$.dynamicRef?y4._`, ${N6.default.dynamicAnchors}={}`:y4.nil}}={}`}function q68($,Y){$.if(N6.default.valCxt,()=>{if($.var(N6.default.instancePath,y4._`${N6.default.valCxt}.${N6.default.instancePath}`),$.var(N6.default.parentData,y4._`${N6.default.valCxt}.${N6.default.parentData}`),$.var(N6.default.parentDataProperty,y4._`${N6.default.valCxt}.${N6.default.parentDataProperty}`),$.var(N6.default.rootData,y4._`${N6.default.valCxt}.${N6.default.rootData}`),Y.dynamicRef)$.var(N6.default.dynamicAnchors,y4._`${N6.default.valCxt}.${N6.default.dynamicAnchors}`)},()=>{if($.var(N6.default.instancePath,y4._`""`),$.var(N6.default.parentData,y4._`undefined`),$.var(N6.default.parentDataProperty,y4._`undefined`),$.var(N6.default.rootData,N6.default.data),Y.dynamicRef)$.var(N6.default.dynamicAnchors,y4._`{}`)})}function P68($){let{schema:Y,opts:X,gen:G}=$;mP1($,()=>{if(X.$comment&&Y.$comment)lP1($);if(I68($),G.let(N6.default.vErrors,null),G.let(N6.default.errors,0),X.unevaluated)w68($);cP1($),k68($)});return}function w68($){let{gen:Y,validateName:X}=$;$.evaluated=Y.const("evaluated",y4._`${X}.evaluated`),Y.if(y4._`${$.evaluated}.dynamicProps`,()=>Y.assign(y4._`${$.evaluated}.props`,y4._`undefined`)),Y.if(y4._`${$.evaluated}.dynamicItems`,()=>Y.assign(y4._`${$.evaluated}.items`,y4._`undefined`))}function bP1($,Y){let X=typeof $=="object"&&$[Y.schemaId];return X&&(Y.code.source||Y.code.process)?y4._`/*# sourceURL=${X} */`:y4.nil}function _68($,Y){if(pP1($)){if(dP1($),uP1($)){j68($,Y);return}}(0,gP1.boolOrEmptySchema)($,Y)}function uP1({schema:$,self:Y}){if(typeof $=="boolean")return!$;for(let X in $)if(Y.RULES.all[X])return!0;return!1}function pP1($){return typeof $.schema!="boolean"}function j68($,Y){let{schema:X,gen:G,opts:J}=$;if(J.$comment&&X.$comment)lP1($);C68($),S68($);let Q=G.const("_errs",N6.default.errors);cP1($,Q),G.var(Y,y4._`${Q} === ${N6.default.errors}`)}function dP1($){(0,zz.checkUnknownRules)($),T68($)}function cP1($,Y){if($.opts.jtd)return hP1($,[],!1,Y);let X=(0,yP1.getSchemaTypes)($.schema),G=(0,yP1.coerceAndCheckDataType)($,X);hP1($,X,!G,Y)}function T68($){let{schema:Y,errSchemaPath:X,opts:G,self:J}=$;if(Y.$ref&&G.ignoreKeywordsWithRef&&(0,zz.schemaHasRulesButRef)(Y,J.RULES))J.logger.warn(`$ref: keywords ignored in schema at path "${X}"`)}function I68($){let{schema:Y,opts:X}=$;if(Y.default!==void 0&&X.useDefaults&&X.strictSchema)(0,zz.checkStrictMode)($,"default is ignored in the schema root")}function C68($){let Y=$.schema[$.opts.schemaId];if(Y)$.baseId=(0,E68.resolveUrl)($.opts.uriResolver,$.baseId,Y)}function S68($){if($.schema.$async&&!$.schemaEnv.$async)throw Error("async schema in sync schema")}function lP1({gen:$,schemaEnv:Y,schema:X,errSchemaPath:G,opts:J}){let Q=X.$comment;if(J.$comment===!0)$.code(y4._`${N6.default.self}.logger.log(${Q})`);else if(typeof J.$comment=="function"){let W=y4.str`${G}/$comment`,K=$.scopeValue("root",{ref:Y.root});$.code(y4._`${N6.default.self}.opts.$comment(${Q}, ${W}, ${K}.schema)`)}}function k68($){let{gen:Y,schemaEnv:X,validateName:G,ValidationError:J,opts:Q}=$;if(X.$async)Y.if(y4._`${N6.default.errors} === 0`,()=>Y.return(N6.default.data),()=>Y.throw(y4._`new ${J}(${N6.default.vErrors})`));else{if(Y.assign(y4._`${G}.errors`,N6.default.vErrors),Q.unevaluated)v68($);Y.return(y4._`${N6.default.errors} === 0`)}}function v68({gen:$,evaluated:Y,props:X,items:G}){if(X instanceof y4.Name)$.assign(y4._`${Y}.props`,X);if(G instanceof y4.Name)$.assign(y4._`${Y}.items`,G)}function hP1($,Y,X,G){let{gen:J,schema:Q,data:W,allErrors:K,opts:Z,self:H}=$,{RULES:z}=H;if(Q.$ref&&(Z.ignoreKeywordsWithRef||!(0,zz.schemaHasRulesButRef)(Q,z))){J.block(()=>nP1($,"$ref",z.all.$ref.definition));return}if(!Z.jtd)x68($,Y);J.block(()=>{for(let F of z.rules)V(F);V(z.post)});function V(F){if(!(0,QD0.shouldUseGroup)(Q,F))return;if(F.type){if(J.if((0,vo.checkDataType)(F.type,W,Z.strictNumbers)),fP1($,F),Y.length===1&&Y[0]===F.type&&X)J.else(),(0,vo.reportTypeError)($);J.endIf()}else fP1($,F);if(!K)J.if(y4._`${N6.default.errors} === ${G||0}`)}}function fP1($,Y){let{gen:X,schema:G,opts:{useDefaults:J}}=$;if(J)(0,O68.assignDefaults)($,Y.type);X.block(()=>{for(let Q of Y.rules)if((0,QD0.shouldUseRule)(G,Q))nP1($,Q.keyword,Q.definition,Y.type)})}function x68($,Y){if($.schemaEnv.meta||!$.opts.strictTypes)return;if(y68($,Y),!$.opts.allowUnionTypes)b68($,Y);h68($,$.dataTypes)}function y68($,Y){if(!Y.length)return;if(!$.dataTypes.length){$.dataTypes=Y;return}Y.forEach((X)=>{if(!iP1($.dataTypes,X))WD0($,`type "${X}" not allowed by context "${$.dataTypes.join(",")}"`)}),g68($,Y)}function b68($,Y){if(Y.length>1&&!(Y.length===2&&Y.includes("null")))WD0($,"use allowUnionTypes to allow union type keyword")}function h68($,Y){let X=$.self.RULES.all;for(let G in X){let J=X[G];if(typeof J=="object"&&(0,QD0.shouldUseRule)($.schema,J)){let{type:Q}=J.definition;if(Q.length&&!Q.some((W)=>f68(Y,W)))WD0($,`missing type "${Q.join(",")}" for keyword "${G}"`)}}}function f68($,Y){return $.includes(Y)||Y==="number"&&$.includes("integer")}function iP1($,Y){return $.includes(Y)||Y==="integer"&&$.includes("number")}function g68($,Y){let X=[];for(let G of $.dataTypes)if(iP1(Y,G))X.push(G);else if(Y.includes("integer")&&G==="number")X.push("integer");$.dataTypes=X}function WD0($,Y){let X=$.schemaEnv.baseId+$.errSchemaPath;Y+=` at "${X}" (strictTypes)`,(0,zz.checkStrictMode)($,Y,$.opts.strictTypes)}class KD0{constructor($,Y,X){if((0,Iy.validateKeywordUsage)($,Y,X),this.gen=$.gen,this.allErrors=$.allErrors,this.keyword=X,this.data=$.data,this.schema=$.schema[X],this.$data=Y.$data&&$.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,zz.schemaRefOrVal)($,this.schema,X,this.$data),this.schemaType=Y.schemaType,this.parentSchema=$.schema,this.params={},this.it=$,this.def=Y,this.$data)this.schemaCode=$.gen.const("vSchema",rP1(this.$data,$));else if(this.schemaCode=this.schemaValue,!(0,Iy.validSchemaType)(this.schema,Y.schemaType,Y.allowUndefined))throw Error(`${X} value must be ${JSON.stringify(Y.schemaType)}`);if("code"in Y?Y.trackErrors:Y.errors!==!1)this.errsCount=$.gen.const("_errs",N6.default.errors)}result($,Y,X){this.failResult((0,y4.not)($),Y,X)}failResult($,Y,X){if(this.gen.if($),X)X();else this.error();if(Y){if(this.gen.else(),Y(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass($,Y){this.failResult((0,y4.not)($),void 0,Y)}fail($){if($===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if($),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data($){if(!this.$data)return this.fail($);let{schemaCode:Y}=this;this.fail(y4._`${Y} !== undefined && (${(0,y4.or)(this.invalid$data(),$)})`)}error($,Y,X){if(Y){this.setParams(Y),this._error($,X),this.setParams({});return}this._error($,X)}_error($,Y){($?Ty.reportExtraError:Ty.reportError)(this,this.def.error,Y)}$dataError(){(0,Ty.reportError)(this,this.def.$dataError||Ty.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,Ty.resetErrorsCount)(this.gen,this.errsCount)}ok($){if(!this.allErrors)this.gen.if($)}setParams($,Y){if(Y)Object.assign(this.params,$);else this.params=$}block$data($,Y,X=y4.nil){this.gen.block(()=>{this.check$data($,X),Y()})}check$data($=y4.nil,Y=y4.nil){if(!this.$data)return;let{gen:X,schemaCode:G,schemaType:J,def:Q}=this;if(X.if((0,y4.or)(y4._`${G} === undefined`,Y)),$!==y4.nil)X.assign($,!0);if(J.length||Q.validateSchema){if(X.elseIf(this.invalid$data()),this.$dataError(),$!==y4.nil)X.assign($,!1)}X.else()}invalid$data(){let{gen:$,schemaCode:Y,schemaType:X,def:G,it:J}=this;return(0,y4.or)(Q(),W());function Q(){if(X.length){if(!(Y instanceof y4.Name))throw Error("ajv implementation error");let K=Array.isArray(X)?X:[X];return y4._`${(0,vo.checkDataTypes)(K,Y,J.opts.strictNumbers,vo.DataType.Wrong)}`}return y4.nil}function W(){if(G.validateSchema){let K=$.scopeValue("validate$data",{ref:G.validateSchema});return y4._`!${K}(${Y})`}return y4.nil}}subschema($,Y){let X=(0,JD0.getSubschema)(this.it,$);(0,JD0.extendSubschemaData)(X,this.it,$),(0,JD0.extendSubschemaMode)(X,$);let G={...this.it,...X,items:void 0,props:void 0};return _68(G,Y),G}mergeEvaluated($,Y){let{it:X,gen:G}=this;if(!X.opts.unevaluated)return;if(X.props!==!0&&$.props!==void 0)X.props=zz.mergeEvaluated.props(G,$.props,X.props,Y);if(X.items!==!0&&$.items!==void 0)X.items=zz.mergeEvaluated.items(G,$.items,X.items,Y)}mergeValidEvaluated($,Y){let{it:X,gen:G}=this;if(X.opts.unevaluated&&(X.props!==!0||X.items!==!0))return G.if(Y,()=>this.mergeEvaluated($,y4.Name)),!0}}aP1.KeywordCxt=KD0;function nP1($,Y,X,G){let J=new KD0($,X,Y);if("code"in X)X.code(J,G);else if(J.$data&&X.validate)(0,Iy.funcKeywordCode)(J,X);else if("macro"in X)(0,Iy.macroKeywordCode)(J,X);else if(X.compile||X.validate)(0,Iy.funcKeywordCode)(J,X)}var m68=/^\/(?:[^~]|~0|~1)*$/,u68=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function rP1($,{dataLevel:Y,dataNames:X,dataPathArr:G}){let J,Q;if($==="")return N6.default.rootData;if($[0]==="/"){if(!m68.test($))throw Error(`Invalid JSON-pointer: ${$}`);J=$,Q=N6.default.rootData}else{let H=u68.exec($);if(!H)throw Error(`Invalid JSON-pointer: ${$}`);let z=+H[1];if(J=H[2],J==="#"){if(z>=Y)throw Error(Z("property/index",z));return G[Y-z]}if(z>Y)throw Error(Z("data",z));if(Q=X[Y-z],!J)return Q}let W=Q,K=J.split("/");for(let H of K)if(H)Q=y4._`${Q}${(0,y4.getProperty)((0,zz.unescapeJsonPointer)(H))}`,W=y4._`${W} && ${Q}`;return W;function Z(H,z){return`Cannot access ${H} ${z} levels up, current level is ${Y}`}}aP1.getData=rP1});var xo=o((tP1)=>{Object.defineProperty(tP1,"__esModule",{value:!0});class oP1 extends Error{constructor($){super("validation failed");this.errors=$,this.ajv=this.validation=!0}}tP1.default=oP1});var Sy=o(($w1)=>{Object.defineProperty($w1,"__esModule",{value:!0});var ZD0=jy();class eP1 extends Error{constructor($,Y,X,G){super(G||`can't resolve reference ${X} from id ${Y}`);this.missingRef=(0,ZD0.resolveUrl)($,Y,X),this.missingSchema=(0,ZD0.normalizeId)((0,ZD0.getFullPath)($,this.missingRef))}}$w1.default=eP1});var bo=o((Gw1)=>{Object.defineProperty(Gw1,"__esModule",{value:!0});Gw1.resolveSchema=Gw1.getCompilingSchema=Gw1.resolveRef=Gw1.compileSchema=Gw1.SchemaEnv=void 0;var YZ=d6(),i68=xo(),AB=Hz(),XZ=jy(),Yw1=g8(),n68=Cy();class ky{constructor($){var Y;this.refs={},this.dynamicAnchors={};let X;if(typeof $.schema=="object")X=$.schema;this.schema=$.schema,this.schemaId=$.schemaId,this.root=$.root||this,this.baseId=(Y=$.baseId)!==null&&Y!==void 0?Y:(0,XZ.normalizeId)(X===null||X===void 0?void 0:X[$.schemaId||"$id"]),this.schemaPath=$.schemaPath,this.localRefs=$.localRefs,this.meta=$.meta,this.$async=X===null||X===void 0?void 0:X.$async,this.refs={}}}Gw1.SchemaEnv=ky;function HD0($){let Y=Xw1.call(this,$);if(Y)return Y;let X=(0,XZ.getFullPath)(this.opts.uriResolver,$.root.baseId),{es5:G,lines:J}=this.opts.code,{ownProperties:Q}=this.opts,W=new YZ.CodeGen(this.scope,{es5:G,lines:J,ownProperties:Q}),K;if($.$async)K=W.scopeValue("Error",{ref:i68.default,code:YZ._`require("ajv/dist/runtime/validation_error").default`});let Z=W.scopeName("validate");$.validateName=Z;let H={gen:W,allErrors:this.opts.allErrors,data:AB.default.data,parentData:AB.default.parentData,parentDataProperty:AB.default.parentDataProperty,dataNames:[AB.default.data],dataPathArr:[YZ.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:W.scopeValue("schema",this.opts.code.source===!0?{ref:$.schema,code:(0,YZ.stringify)($.schema)}:{ref:$.schema}),validateName:Z,ValidationError:K,schema:$.schema,schemaEnv:$,rootId:X,baseId:$.baseId||X,schemaPath:YZ.nil,errSchemaPath:$.schemaPath||(this.opts.jtd?"":"#"),errorPath:YZ._`""`,opts:this.opts,self:this},z;try{this._compilations.add($),(0,n68.validateFunctionCode)(H),W.optimize(this.opts.code.optimize);let V=W.toString();if(z=`${W.scopeRefs(AB.default.scope)}return ${V}`,this.opts.code.process)z=this.opts.code.process(z,$);let L=Function(`${AB.default.self}`,`${AB.default.scope}`,z)(this,this.scope.get());if(this.scope.value(Z,{ref:L}),L.errors=null,L.schema=$.schema,L.schemaEnv=$,$.$async)L.$async=!0;if(this.opts.code.source===!0)L.source={validateName:Z,validateCode:V,scopeValues:W._values};if(this.opts.unevaluated){let{props:N,items:D}=H;if(L.evaluated={props:N instanceof YZ.Name?void 0:N,items:D instanceof YZ.Name?void 0:D,dynamicProps:N instanceof YZ.Name,dynamicItems:D instanceof YZ.Name},L.source)L.source.evaluated=(0,YZ.stringify)(L.evaluated)}return $.validate=L,$}catch(V){if(delete $.validate,delete $.validateName,z)this.logger.error("Error compiling schema, function code:",z);throw V}finally{this._compilations.delete($)}}Gw1.compileSchema=HD0;function r68($,Y,X){var G;X=(0,XZ.resolveUrl)(this.opts.uriResolver,Y,X);let J=$.refs[X];if(J)return J;let Q=o68.call(this,$,X);if(Q===void 0){let W=(G=$.localRefs)===null||G===void 0?void 0:G[X],{schemaId:K}=this.opts;if(W)Q=new ky({schema:W,schemaId:K,root:$,baseId:Y})}if(Q===void 0)return;return $.refs[X]=a68.call(this,Q)}Gw1.resolveRef=r68;function a68($){if((0,XZ.inlineRef)($.schema,this.opts.inlineRefs))return $.schema;return $.validate?$:HD0.call(this,$)}function Xw1($){for(let Y of this._compilations)if(s68(Y,$))return Y}Gw1.getCompilingSchema=Xw1;function s68($,Y){return $.schema===Y.schema&&$.root===Y.root&&$.baseId===Y.baseId}function o68($,Y){let X;while(typeof(X=this.refs[Y])=="string")Y=X;return X||this.schemas[Y]||yo.call(this,$,Y)}function yo($,Y){let X=this.opts.uriResolver.parse(Y),G=(0,XZ._getFullPath)(this.opts.uriResolver,X),J=(0,XZ.getFullPath)(this.opts.uriResolver,$.baseId,void 0);if(Object.keys($.schema).length>0&&G===J)return UD0.call(this,X,$);let Q=(0,XZ.normalizeId)(G),W=this.refs[Q]||this.schemas[Q];if(typeof W=="string"){let K=yo.call(this,$,W);if(typeof(K===null||K===void 0?void 0:K.schema)!=="object")return;return UD0.call(this,X,K)}if(typeof(W===null||W===void 0?void 0:W.schema)!=="object")return;if(!W.validate)HD0.call(this,W);if(Q===(0,XZ.normalizeId)(Y)){let{schema:K}=W,{schemaId:Z}=this.opts,H=K[Z];if(H)J=(0,XZ.resolveUrl)(this.opts.uriResolver,J,H);return new ky({schema:K,schemaId:Z,root:$,baseId:J})}return UD0.call(this,X,W)}Gw1.resolveSchema=yo;var t68=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function UD0($,{baseId:Y,schema:X,root:G}){var J;if(((J=$.fragment)===null||J===void 0?void 0:J[0])!=="/")return;for(let K of $.fragment.slice(1).split("/")){if(typeof X==="boolean")return;let Z=X[(0,Yw1.unescapeFragment)(K)];if(Z===void 0)return;X=Z;let H=typeof X==="object"&&X[this.opts.schemaId];if(!t68.has(K)&&H)Y=(0,XZ.resolveUrl)(this.opts.uriResolver,Y,H)}let Q;if(typeof X!="boolean"&&X.$ref&&!(0,Yw1.schemaHasRulesButRef)(X,this.RULES)){let K=(0,XZ.resolveUrl)(this.opts.uriResolver,Y,X.$ref);Q=yo.call(this,G,K)}let{schemaId:W}=this.opts;if(Q=Q||new ky({schema:X,schemaId:W,root:G,baseId:Y}),Q.schema!==Q.root.schema)return Q;return}});var Qw1=o((Ek5,G88)=>{G88.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var FD0=o((Mk5,zw1)=>{var J88=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Kw1=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),zD0=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Zw1=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),Q88=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function VD0($){let Y="",X=0,G=0;for(G=0;G<$.length;G++){if(X=$[G].charCodeAt(0),X===48)continue;if(!(X>=48&&X<=57||X>=65&&X<=70||X>=97&&X<=102))return"";Y+=$[G];break}for(G+=1;G<$.length;G++){if(X=$[G].charCodeAt(0),!(X>=48&&X<=57||X>=65&&X<=70||X>=97&&X<=102))return"";Y+=$[G]}return Y}var W88=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Ww1($){return $.length=0,!0}function K88($,Y,X){if($.length){let G=VD0($);if(G!=="")Y.push(G);else return X.error=!0,!1;$.length=0}return!0}function Z88($){let Y=0,X={error:!1,address:"",zone:""},G=[],J=[],Q=!1,W=!1,K=K88;for(let Z=0;Z<$.length;Z++){let H=$[Z];if(H==="["||H==="]")continue;if(H===":"){if(Q===!0)W=!0;if(!K(J,G,X))break;if(++Y>7){X.error=!0;break}if(Z>0&&$[Z-1]===":")Q=!0;G.push(":");continue}else if(H==="%"){if(!K(J,G,X))break;K=Ww1}else{J.push(H);continue}}if(J.length)if(K===Ww1)X.zone=J.join("");else if(W)G.push(J.join(""));else G.push(VD0(J));return X.address=G.join(""),X}function Uw1($){if(U88($,":")<2)return{host:$,isIPV6:!1};let Y=Z88($);if(!Y.error){let{address:X,address:G}=Y;if(Y.zone)X+="%"+Y.zone,G+="%25"+Y.zone;return{host:X,isIPV6:!0,escapedHost:G}}else return{host:$,isIPV6:!1}}function U88($,Y){let X=0;for(let G=0;G<$.length;G++)if($[G]===Y)X++;return X}function H88($){let Y=$,X=[],G=-1,J=0;while(J=Y.length){if(J===1)if(Y===".")break;else if(Y==="/"){X.push("/");break}else{X.push(Y);break}else if(J===2){if(Y[0]==="."){if(Y[1]===".")break;else if(Y[1]==="/"){Y=Y.slice(2);continue}}else if(Y[0]==="/"){if(Y[1]==="."||Y[1]==="/"){X.push("/");break}}}else if(J===3){if(Y==="/.."){if(X.length!==0)X.pop();X.push("/");break}}if(Y[0]==="."){if(Y[1]==="."){if(Y[2]==="/"){Y=Y.slice(3);continue}}else if(Y[1]==="/"){Y=Y.slice(2);continue}}else if(Y[0]==="/"){if(Y[1]==="."){if(Y[2]==="/"){Y=Y.slice(2);continue}else if(Y[2]==="."){if(Y[3]==="/"){if(Y=Y.slice(3),X.length!==0)X.pop();continue}}}}if((G=Y.indexOf("/",1))===-1){X.push(Y);break}else X.push(Y.slice(0,G)),Y=Y.slice(G)}return X.join("")}var z88={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},V88=/[@/?#:]/g,F88=/[@/?#]/g;function Hw1($,Y){let X=Y?F88:V88;return X.lastIndex=0,$.replace(X,(G)=>z88[G])}function L88($,Y=!1){if($.indexOf("%")===-1)return $;let X="";for(let G=0;G<$.length;G++){if($[G]==="%"&&G+2<$.length){let J=$.slice(G+1,G+3);if(zD0(J)){let Q=J.toUpperCase(),W=String.fromCharCode(parseInt(Q,16));if(Y&&Zw1(W))X+=W;else X+="%"+Q;G+=2;continue}}X+=$[G]}return X}function D88($){let Y="";for(let X=0;X<$.length;X++){if($[X]==="%"&&X+2<$.length){let G=$.slice(X+1,X+3);if(zD0(G)){let J=G.toUpperCase(),Q=String.fromCharCode(parseInt(J,16));if(Q!=="."&&Zw1(Q))Y+=Q;else Y+="%"+J;X+=2;continue}}if(Q88($[X]))Y+=$[X];else Y+=escape($[X])}return Y}function N88($){let Y="";for(let X=0;X<$.length;X++){if($[X]==="%"&&X+2<$.length){let G=$.slice(X+1,X+3);if(zD0(G)){Y+="%"+G.toUpperCase(),X+=2;continue}}Y+=escape($[X])}return Y}function A88($){let Y=[];if($.userinfo!==void 0)Y.push($.userinfo),Y.push("@");if($.host!==void 0){let X=unescape($.host);if(!Kw1(X)){let G=Uw1(X);if(G.isIPV6===!0)X=`[${G.escapedHost}]`;else X=Hw1(X,!1)}Y.push(X)}if(typeof $.port==="number"||typeof $.port==="string")Y.push(":"),Y.push(String($.port));return Y.length?Y.join(""):void 0}zw1.exports={nonSimpleDomain:W88,recomposeAuthority:A88,reescapeHostDelimiters:Hw1,normalizePercentEncoding:L88,normalizePathEncoding:D88,escapePreservingEscapes:N88,removeDotSegments:H88,isIPv4:Kw1,isUUID:J88,normalizeIPv6:Uw1,stringArrayToHexStripped:VD0}});var Nw1=o((Rk5,Dw1)=>{var{isUUID:B88}=FD0(),O88=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,E88=["http","https","ws","wss","urn","urn:uuid"];function M88($){return E88.indexOf($)!==-1}function LD0($){if($.secure===!0)return!0;else if($.secure===!1)return!1;else if($.scheme)return $.scheme.length===3&&($.scheme[0]==="w"||$.scheme[0]==="W")&&($.scheme[1]==="s"||$.scheme[1]==="S")&&($.scheme[2]==="s"||$.scheme[2]==="S");else return!1}function Vw1($){if(!$.host)$.error=$.error||"HTTP URIs must have a host.";return $}function Fw1($){let Y=String($.scheme).toLowerCase()==="https";if($.port===(Y?443:80)||$.port==="")$.port=void 0;if(!$.path)$.path="/";return $}function R88($){return $.secure=LD0($),$.resourceName=($.path||"/")+($.query?"?"+$.query:""),$.path=void 0,$.query=void 0,$}function q88($){if($.port===(LD0($)?443:80)||$.port==="")$.port=void 0;if(typeof $.secure==="boolean")$.scheme=$.secure?"wss":"ws",$.secure=void 0;if($.resourceName){let[Y,X]=$.resourceName.split("?");$.path=Y&&Y!=="/"?Y:void 0,$.query=X,$.resourceName=void 0}return $.fragment=void 0,$}function P88($,Y){if(!$.path)return $.error="URN can not be parsed",$;let X=$.path.match(O88);if(X){let G=Y.scheme||$.scheme||"urn";$.nid=X[1].toLowerCase(),$.nss=X[2];let J=`${G}:${Y.nid||$.nid}`,Q=DD0(J);if($.path=void 0,Q)$=Q.parse($,Y)}else $.error=$.error||"URN can not be parsed.";return $}function w88($,Y){if($.nid===void 0)throw Error("URN without nid cannot be serialized");let X=Y.scheme||$.scheme||"urn",G=$.nid.toLowerCase(),J=`${X}:${Y.nid||G}`,Q=DD0(J);if(Q)$=Q.serialize($,Y);let W=$,K=$.nss;return W.path=`${G||Y.nid}:${K}`,Y.skipEscape=!0,W}function _88($,Y){let X=$;if(X.uuid=X.nss,X.nss=void 0,!Y.tolerant&&(!X.uuid||!B88(X.uuid)))X.error=X.error||"UUID is not valid.";return X}function j88($){let Y=$;return Y.nss=($.uuid||"").toLowerCase(),Y}var Lw1={scheme:"http",domainHost:!0,parse:Vw1,serialize:Fw1},T88={scheme:"https",domainHost:Lw1.domainHost,parse:Vw1,serialize:Fw1},ho={scheme:"ws",domainHost:!0,parse:R88,serialize:q88},I88={scheme:"wss",domainHost:ho.domainHost,parse:ho.parse,serialize:ho.serialize},C88={scheme:"urn",parse:P88,serialize:w88,skipNormalize:!0},S88={scheme:"urn:uuid",parse:_88,serialize:j88,skipNormalize:!0},fo={http:Lw1,https:T88,ws:ho,wss:I88,urn:C88,"urn:uuid":S88};Object.setPrototypeOf(fo,null);function DD0($){return $&&(fo[$]||fo[$.toLowerCase()])||void 0}Dw1.exports={wsIsSecure:LD0,SCHEMES:fo,isValidSchemeName:M88,getSchemeHandler:DD0}});var Rw1=o((qk5,go)=>{var{normalizeIPv6:k88,removeDotSegments:vy,recomposeAuthority:v88,normalizePercentEncoding:x88,normalizePathEncoding:y88,escapePreservingEscapes:b88,reescapeHostDelimiters:h88,isIPv4:f88,nonSimpleDomain:g88}=FD0(),{SCHEMES:m88,getSchemeHandler:Bw1}=Nw1();function u88($,Y){if(typeof $==="string")$=i88($,Y);else if(typeof $==="object")$=rP(BB($,Y),Y);return $}function p88($,Y,X){let G=X?Object.assign({scheme:"null"},X):{scheme:"null"},J=Ow1(rP($,G),rP(Y,G),G,!0);return G.skipEscape=!0,BB(J,G)}function Ow1($,Y,X,G){let J={};if(!G)$=rP(BB($,X),X),Y=rP(BB(Y,X),X);if(X=X||{},!X.tolerant&&Y.scheme)J.scheme=Y.scheme,J.userinfo=Y.userinfo,J.host=Y.host,J.port=Y.port,J.path=vy(Y.path||""),J.query=Y.query;else{if(Y.userinfo!==void 0||Y.host!==void 0||Y.port!==void 0)J.userinfo=Y.userinfo,J.host=Y.host,J.port=Y.port,J.path=vy(Y.path||""),J.query=Y.query;else{if(!Y.path)if(J.path=$.path,Y.query!==void 0)J.query=Y.query;else J.query=$.query;else{if(Y.path[0]==="/")J.path=vy(Y.path);else{if(($.userinfo!==void 0||$.host!==void 0||$.port!==void 0)&&!$.path)J.path="/"+Y.path;else if(!$.path)J.path=Y.path;else J.path=$.path.slice(0,$.path.lastIndexOf("/")+1)+Y.path;J.path=vy(J.path)}J.query=Y.query}J.userinfo=$.userinfo,J.host=$.host,J.port=$.port}J.scheme=$.scheme}return J.fragment=Y.fragment,J}function d88($,Y,X){let G=Aw1($,X),J=Aw1(Y,X);return G!==void 0&&J!==void 0&&G.toLowerCase()===J.toLowerCase()}function BB($,Y){let X={host:$.host,scheme:$.scheme,userinfo:$.userinfo,port:$.port,path:$.path,query:$.query,nid:$.nid,nss:$.nss,uuid:$.uuid,fragment:$.fragment,reference:$.reference,resourceName:$.resourceName,secure:$.secure,error:""},G=Object.assign({},Y),J=[],Q=Bw1(G.scheme||X.scheme);if(Q&&Q.serialize)Q.serialize(X,G);if(X.path!==void 0)if(!G.skipEscape){if(X.path=b88(X.path),X.scheme!==void 0)X.path=X.path.split("%3A").join(":")}else X.path=x88(X.path);if(G.reference!=="suffix"&&X.scheme)J.push(X.scheme,":");let W=v88(X);if(W!==void 0){if(G.reference!=="suffix")J.push("//");if(J.push(W),X.path&&X.path[0]!=="/")J.push("/")}if(X.path!==void 0){let K=X.path;if(!G.absolutePath&&(!Q||!Q.absolutePath))K=vy(K);if(W===void 0&&K[0]==="/"&&K[1]==="/")K="/%2F"+K.slice(2);J.push(K)}if(X.query!==void 0)J.push("?",X.query);if(X.fragment!==void 0)J.push("#",X.fragment);return J.join("")}var c88=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function l88($,Y){if(Y[2]!==void 0&&$.path&&$.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof $.port==="number"&&($.port<0||$.port>65535))return"URI port is malformed.";return}function Ew1($,Y){let X=Object.assign({},Y),G={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},J=!1,Q=!1;if(X.reference==="suffix")if(X.scheme)$=X.scheme+":"+$;else $="//"+$;let W=$.match(c88);if(W){if(G.scheme=W[1],G.userinfo=W[3],G.host=W[4],G.port=parseInt(W[5],10),G.path=W[6]||"",G.query=W[7],G.fragment=W[8],isNaN(G.port))G.port=W[5];let K=l88(G,W);if(K!==void 0)G.error=G.error||K,J=!0;if(G.host)if(f88(G.host)===!1){let z=k88(G.host);G.host=z.host.toLowerCase(),Q=z.isIPV6}else Q=!0;if(G.scheme===void 0&&G.userinfo===void 0&&G.host===void 0&&G.port===void 0&&G.query===void 0&&!G.path)G.reference="same-document";else if(G.scheme===void 0)G.reference="relative";else if(G.fragment===void 0)G.reference="absolute";else G.reference="uri";if(X.reference&&X.reference!=="suffix"&&X.reference!==G.reference)G.error=G.error||"URI is not a "+X.reference+" reference.";let Z=Bw1(X.scheme||G.scheme);if(!X.unicodeSupport&&(!Z||!Z.unicodeSupport)){if(G.host&&(X.domainHost||Z&&Z.domainHost)&&Q===!1&&g88(G.host))try{G.host=URL.domainToASCII(G.host.toLowerCase())}catch(H){G.error=G.error||"Host's domain name can not be converted to ASCII: "+H}}if(!Z||Z&&!Z.skipNormalize){if($.indexOf("%")!==-1){if(G.scheme!==void 0)G.scheme=unescape(G.scheme);if(G.host!==void 0)G.host=h88(unescape(G.host),Q)}if(G.path)G.path=y88(G.path);if(G.fragment)try{G.fragment=encodeURI(decodeURIComponent(G.fragment))}catch{G.error=G.error||"URI malformed"}}if(Z&&Z.parse)Z.parse(G,X)}else G.error=G.error||"URI can not be parsed.";return{parsed:G,malformedAuthorityOrPort:J}}function rP($,Y){return Ew1($,Y).parsed}function i88($,Y){return Mw1($,Y).normalized}function Mw1($,Y){let{parsed:X,malformedAuthorityOrPort:G}=Ew1($,Y);return{normalized:G?$:BB(X,Y),malformedAuthorityOrPort:G}}function Aw1($,Y){if(typeof $==="string"){let{normalized:X,malformedAuthorityOrPort:G}=Mw1($,Y);return G?void 0:X}if(typeof $==="object")return BB($,Y)}var ND0={SCHEMES:m88,normalize:u88,resolve:p88,resolveComponent:Ow1,equal:d88,serialize:BB,parse:rP};go.exports=ND0;go.exports.default=ND0;go.exports.fastUri=ND0});var ww1=o((Pw1)=>{Object.defineProperty(Pw1,"__esModule",{value:!0});var qw1=Rw1();qw1.code='require("ajv/dist/runtime/uri").default';Pw1.default=qw1});var vw1=o((Vz)=>{Object.defineProperty(Vz,"__esModule",{value:!0});Vz.CodeGen=Vz.Name=Vz.nil=Vz.stringify=Vz.str=Vz._=Vz.KeywordCxt=void 0;var r88=Cy();Object.defineProperty(Vz,"KeywordCxt",{enumerable:!0,get:function(){return r88.KeywordCxt}});var aP=d6();Object.defineProperty(Vz,"_",{enumerable:!0,get:function(){return aP._}});Object.defineProperty(Vz,"str",{enumerable:!0,get:function(){return aP.str}});Object.defineProperty(Vz,"stringify",{enumerable:!0,get:function(){return aP.stringify}});Object.defineProperty(Vz,"nil",{enumerable:!0,get:function(){return aP.nil}});Object.defineProperty(Vz,"Name",{enumerable:!0,get:function(){return aP.Name}});Object.defineProperty(Vz,"CodeGen",{enumerable:!0,get:function(){return aP.CodeGen}});var a88=xo(),Cw1=Sy(),s88=aL0(),xy=bo(),o88=d6(),yy=jy(),mo=_y(),BD0=g8(),_w1=Qw1(),t88=ww1(),Sw1=($,Y)=>new RegExp($,Y);Sw1.code="new RegExp";var e88=["removeAdditional","useDefaults","coerceTypes"],$98=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Y98={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},X98={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},jw1=200;function G98($){var Y,X,G,J,Q,W,K,Z,H,z,V,F,L,N,D,A,B,O,E,M,R,q,_,P,w;let j=$.strict,C=(Y=$.code)===null||Y===void 0?void 0:Y.optimize,k=C===!0||C===void 0?1:C||0,S=(G=(X=$.code)===null||X===void 0?void 0:X.regExp)!==null&&G!==void 0?G:Sw1,I=(J=$.uriResolver)!==null&&J!==void 0?J:t88.default;return{strictSchema:(W=(Q=$.strictSchema)!==null&&Q!==void 0?Q:j)!==null&&W!==void 0?W:!0,strictNumbers:(Z=(K=$.strictNumbers)!==null&&K!==void 0?K:j)!==null&&Z!==void 0?Z:!0,strictTypes:(z=(H=$.strictTypes)!==null&&H!==void 0?H:j)!==null&&z!==void 0?z:"log",strictTuples:(F=(V=$.strictTuples)!==null&&V!==void 0?V:j)!==null&&F!==void 0?F:"log",strictRequired:(N=(L=$.strictRequired)!==null&&L!==void 0?L:j)!==null&&N!==void 0?N:!1,code:$.code?{...$.code,optimize:k,regExp:S}:{optimize:k,regExp:S},loopRequired:(D=$.loopRequired)!==null&&D!==void 0?D:jw1,loopEnum:(A=$.loopEnum)!==null&&A!==void 0?A:jw1,meta:(B=$.meta)!==null&&B!==void 0?B:!0,messages:(O=$.messages)!==null&&O!==void 0?O:!0,inlineRefs:(E=$.inlineRefs)!==null&&E!==void 0?E:!0,schemaId:(M=$.schemaId)!==null&&M!==void 0?M:"$id",addUsedSchema:(R=$.addUsedSchema)!==null&&R!==void 0?R:!0,validateSchema:(q=$.validateSchema)!==null&&q!==void 0?q:!0,validateFormats:(_=$.validateFormats)!==null&&_!==void 0?_:!0,unicodeRegExp:(P=$.unicodeRegExp)!==null&&P!==void 0?P:!0,int32range:(w=$.int32range)!==null&&w!==void 0?w:!0,uriResolver:I}}class uo{constructor($={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,$=this.opts={...$,...G98($)};let{es5:Y,lines:X}=this.opts.code;this.scope=new o88.ValueScope({scope:{},prefixes:$98,es5:Y,lines:X}),this.logger=U98($.logger);let G=$.validateFormats;if($.validateFormats=!1,this.RULES=(0,s88.getRules)(),Tw1.call(this,Y98,$,"NOT SUPPORTED"),Tw1.call(this,X98,$,"DEPRECATED","warn"),this._metaOpts=K98.call(this),$.formats)Q98.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),$.keywords)W98.call(this,$.keywords);if(typeof $.meta=="object")this.addMetaSchema($.meta);J98.call(this),$.validateFormats=G}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:$,meta:Y,schemaId:X}=this.opts,G=_w1;if(X==="id")G={..._w1},G.id=G.$id,delete G.$id;if(Y&&$)this.addMetaSchema(G,G[X],!1)}defaultMeta(){let{meta:$,schemaId:Y}=this.opts;return this.opts.defaultMeta=typeof $=="object"?$[Y]||$:void 0}validate($,Y){let X;if(typeof $=="string"){if(X=this.getSchema($),!X)throw Error(`no schema with key or ref "${$}"`)}else X=this.compile($);let G=X(Y);if(!("$async"in X))this.errors=X.errors;return G}compile($,Y){let X=this._addSchema($,Y);return X.validate||this._compileSchemaEnv(X)}compileAsync($,Y){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:X}=this.opts;return G.call(this,$,Y);async function G(H,z){await J.call(this,H.$schema);let V=this._addSchema(H,z);return V.validate||Q.call(this,V)}async function J(H){if(H&&!this.getSchema(H))await G.call(this,{$ref:H},!0)}async function Q(H){try{return this._compileSchemaEnv(H)}catch(z){if(!(z instanceof Cw1.default))throw z;return W.call(this,z),await K.call(this,z.missingSchema),Q.call(this,H)}}function W({missingSchema:H,missingRef:z}){if(this.refs[H])throw Error(`AnySchema ${H} is loaded but ${z} cannot be resolved`)}async function K(H){let z=await Z.call(this,H);if(!this.refs[H])await J.call(this,z.$schema);if(!this.refs[H])this.addSchema(z,H,Y)}async function Z(H){let z=this._loading[H];if(z)return z;try{return await(this._loading[H]=X(H))}finally{delete this._loading[H]}}}addSchema($,Y,X,G=this.opts.validateSchema){if(Array.isArray($)){for(let Q of $)this.addSchema(Q,void 0,X,G);return this}let J;if(typeof $==="object"){let{schemaId:Q}=this.opts;if(J=$[Q],J!==void 0&&typeof J!="string")throw Error(`schema ${Q} must be string`)}return Y=(0,yy.normalizeId)(Y||J),this._checkUnique(Y),this.schemas[Y]=this._addSchema($,X,Y,G,!0),this}addMetaSchema($,Y,X=this.opts.validateSchema){return this.addSchema($,Y,!0,X),this}validateSchema($,Y){if(typeof $=="boolean")return!0;let X;if(X=$.$schema,X!==void 0&&typeof X!="string")throw Error("$schema must be a string");if(X=X||this.opts.defaultMeta||this.defaultMeta(),!X)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let G=this.validate(X,$);if(!G&&Y){let J="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(J);else throw Error(J)}return G}getSchema($){let Y;while(typeof(Y=Iw1.call(this,$))=="string")$=Y;if(Y===void 0){let{schemaId:X}=this.opts,G=new xy.SchemaEnv({schema:{},schemaId:X});if(Y=xy.resolveSchema.call(this,G,$),!Y)return;this.refs[$]=Y}return Y.validate||this._compileSchemaEnv(Y)}removeSchema($){if($ instanceof RegExp)return this._removeAllSchemas(this.schemas,$),this._removeAllSchemas(this.refs,$),this;switch(typeof $){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let Y=Iw1.call(this,$);if(typeof Y=="object")this._cache.delete(Y.schema);return delete this.schemas[$],delete this.refs[$],this}case"object":{let Y=$;this._cache.delete(Y);let X=$[this.opts.schemaId];if(X)X=(0,yy.normalizeId)(X),delete this.schemas[X],delete this.refs[X];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary($){for(let Y of $)this.addKeyword(Y);return this}addKeyword($,Y){let X;if(typeof $=="string"){if(X=$,typeof Y=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),Y.keyword=X}else if(typeof $=="object"&&Y===void 0){if(Y=$,X=Y.keyword,Array.isArray(X)&&!X.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(z98.call(this,X,Y),!Y)return(0,BD0.eachItem)(X,(J)=>AD0.call(this,J)),this;F98.call(this,Y);let G={...Y,type:(0,mo.getJSONTypes)(Y.type),schemaType:(0,mo.getJSONTypes)(Y.schemaType)};return(0,BD0.eachItem)(X,G.type.length===0?(J)=>AD0.call(this,J,G):(J)=>G.type.forEach((Q)=>AD0.call(this,J,G,Q))),this}getKeyword($){let Y=this.RULES.all[$];return typeof Y=="object"?Y.definition:!!Y}removeKeyword($){let{RULES:Y}=this;delete Y.keywords[$],delete Y.all[$];for(let X of Y.rules){let G=X.rules.findIndex((J)=>J.keyword===$);if(G>=0)X.rules.splice(G,1)}return this}addFormat($,Y){if(typeof Y=="string")Y=new RegExp(Y);return this.formats[$]=Y,this}errorsText($=this.errors,{separator:Y=", ",dataVar:X="data"}={}){if(!$||$.length===0)return"No errors";return $.map((G)=>`${X}${G.instancePath} ${G.message}`).reduce((G,J)=>G+Y+J)}$dataMetaSchema($,Y){let X=this.RULES.all;$=JSON.parse(JSON.stringify($));for(let G of Y){let J=G.split("/").slice(1),Q=$;for(let W of J)Q=Q[W];for(let W in X){let K=X[W];if(typeof K!="object")continue;let{$data:Z}=K.definition,H=Q[W];if(Z&&H)Q[W]=kw1(H)}}return $}_removeAllSchemas($,Y){for(let X in $){let G=$[X];if(!Y||Y.test(X)){if(typeof G=="string")delete $[X];else if(G&&!G.meta)this._cache.delete(G.schema),delete $[X]}}}_addSchema($,Y,X,G=this.opts.validateSchema,J=this.opts.addUsedSchema){let Q,{schemaId:W}=this.opts;if(typeof $=="object")Q=$[W];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof $!="boolean")throw Error("schema must be object or boolean");let K=this._cache.get($);if(K!==void 0)return K;X=(0,yy.normalizeId)(Q||X);let Z=yy.getSchemaRefs.call(this,$,X);if(K=new xy.SchemaEnv({schema:$,schemaId:W,meta:Y,baseId:X,localRefs:Z}),this._cache.set(K.schema,K),J&&!X.startsWith("#")){if(X)this._checkUnique(X);this.refs[X]=K}if(G)this.validateSchema($,!0);return K}_checkUnique($){if(this.schemas[$]||this.refs[$])throw Error(`schema with key or id "${$}" already exists`)}_compileSchemaEnv($){if($.meta)this._compileMetaSchema($);else xy.compileSchema.call(this,$);if(!$.validate)throw Error("ajv implementation error");return $.validate}_compileMetaSchema($){let Y=this.opts;this.opts=this._metaOpts;try{xy.compileSchema.call(this,$)}finally{this.opts=Y}}}uo.ValidationError=a88.default;uo.MissingRefError=Cw1.default;Vz.default=uo;function Tw1($,Y,X,G="error"){for(let J in $){let Q=J;if(Q in Y)this.logger[G](`${X}: option ${J}. ${$[Q]}`)}}function Iw1($){return $=(0,yy.normalizeId)($),this.schemas[$]||this.refs[$]}function J98(){let $=this.opts.schemas;if(!$)return;if(Array.isArray($))this.addSchema($);else for(let Y in $)this.addSchema($[Y],Y)}function Q98(){for(let $ in this.opts.formats){let Y=this.opts.formats[$];if(Y)this.addFormat($,Y)}}function W98($){if(Array.isArray($)){this.addVocabulary($);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let Y in $){let X=$[Y];if(!X.keyword)X.keyword=Y;this.addKeyword(X)}}function K98(){let $={...this.opts};for(let Y of e88)delete $[Y];return $}var Z98={log(){},warn(){},error(){}};function U98($){if($===!1)return Z98;if($===void 0)return console;if($.log&&$.warn&&$.error)return $;throw Error("logger must implement log, warn and error methods")}var H98=/^[a-z_$][a-z0-9_$:-]*$/i;function z98($,Y){let{RULES:X}=this;if((0,BD0.eachItem)($,(G)=>{if(X.keywords[G])throw Error(`Keyword ${G} is already defined`);if(!H98.test(G))throw Error(`Keyword ${G} has invalid name`)}),!Y)return;if(Y.$data&&!(("code"in Y)||("validate"in Y)))throw Error('$data keyword must have "code" or "validate" function')}function AD0($,Y,X){var G;let J=Y===null||Y===void 0?void 0:Y.post;if(X&&J)throw Error('keyword with "post" flag cannot have "type"');let{RULES:Q}=this,W=J?Q.post:Q.rules.find(({type:Z})=>Z===X);if(!W)W={type:X,rules:[]},Q.rules.push(W);if(Q.keywords[$]=!0,!Y)return;let K={keyword:$,definition:{...Y,type:(0,mo.getJSONTypes)(Y.type),schemaType:(0,mo.getJSONTypes)(Y.schemaType)}};if(Y.before)V98.call(this,W,K,Y.before);else W.rules.push(K);Q.all[$]=K,(G=Y.implements)===null||G===void 0||G.forEach((Z)=>this.addKeyword(Z))}function V98($,Y,X){let G=$.rules.findIndex((J)=>J.keyword===X);if(G>=0)$.rules.splice(G,0,Y);else $.rules.push(Y),this.logger.warn(`rule ${X} is not defined`)}function F98($){let{metaSchema:Y}=$;if(Y===void 0)return;if($.$data&&this.opts.$data)Y=kw1(Y);$.validateSchema=this.compile(Y,!0)}var L98={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function kw1($){return{anyOf:[$,L98]}}});var yw1=o((xw1)=>{Object.defineProperty(xw1,"__esModule",{value:!0});var A98={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};xw1.default=A98});var uw1=o((gw1)=>{Object.defineProperty(gw1,"__esModule",{value:!0});gw1.callRef=gw1.getValidate=void 0;var O98=Sy(),bw1=v2(),GQ=d6(),sP=Hz(),hw1=bo(),po=g8(),E98={keyword:"$ref",schemaType:"string",code($){let{gen:Y,schema:X,it:G}=$,{baseId:J,schemaEnv:Q,validateName:W,opts:K,self:Z}=G,{root:H}=Q;if((X==="#"||X==="#/")&&J===H.baseId)return V();let z=hw1.resolveRef.call(Z,H,J,X);if(z===void 0)throw new O98.default(G.opts.uriResolver,J,X);if(z instanceof hw1.SchemaEnv)return F(z);return L(z);function V(){if(Q===H)return co($,W,Q,Q.$async);let N=Y.scopeValue("root",{ref:H});return co($,GQ._`${N}.validate`,H,H.$async)}function F(N){let D=fw1($,N);co($,D,N,N.$async)}function L(N){let D=Y.scopeValue("schema",K.code.source===!0?{ref:N,code:(0,GQ.stringify)(N)}:{ref:N}),A=Y.name("valid"),B=$.subschema({schema:N,dataTypes:[],schemaPath:GQ.nil,topSchemaRef:D,errSchemaPath:X},A);$.mergeEvaluated(B),$.ok(A)}}};function fw1($,Y){let{gen:X}=$;return Y.validate?X.scopeValue("validate",{ref:Y.validate}):GQ._`${X.scopeValue("wrapper",{ref:Y})}.validate`}gw1.getValidate=fw1;function co($,Y,X,G){let{gen:J,it:Q}=$,{allErrors:W,schemaEnv:K,opts:Z}=Q,H=Z.passContext?sP.default.this:GQ.nil;if(G)z();else V();function z(){if(!K.$async)throw Error("async schema referenced by sync schema");let N=J.let("valid");J.try(()=>{if(J.code(GQ._`await ${(0,bw1.callValidateCode)($,Y,H)}`),L(Y),!W)J.assign(N,!0)},(D)=>{if(J.if(GQ._`!(${D} instanceof ${Q.ValidationError})`,()=>J.throw(D)),F(D),!W)J.assign(N,!1)}),$.ok(N)}function V(){$.result((0,bw1.callValidateCode)($,Y,H),()=>L(Y),()=>F(Y))}function F(N){let D=GQ._`${N}.errors`;J.assign(sP.default.vErrors,GQ._`${sP.default.vErrors} === null ? ${D} : ${sP.default.vErrors}.concat(${D})`),J.assign(sP.default.errors,GQ._`${sP.default.vErrors}.length`)}function L(N){var D;if(!Q.opts.unevaluated)return;let A=(D=X===null||X===void 0?void 0:X.validate)===null||D===void 0?void 0:D.evaluated;if(Q.props!==!0)if(A&&!A.dynamicProps){if(A.props!==void 0)Q.props=po.mergeEvaluated.props(J,A.props,Q.props)}else{let B=J.var("props",GQ._`${N}.evaluated.props`);Q.props=po.mergeEvaluated.props(J,B,Q.props,GQ.Name)}if(Q.items!==!0)if(A&&!A.dynamicItems){if(A.items!==void 0)Q.items=po.mergeEvaluated.items(J,A.items,Q.items)}else{let B=J.var("items",GQ._`${N}.evaluated.items`);Q.items=po.mergeEvaluated.items(J,B,Q.items,GQ.Name)}}}gw1.callRef=co;gw1.default=E98});var dw1=o((pw1)=>{Object.defineProperty(pw1,"__esModule",{value:!0});var q98=yw1(),P98=uw1(),w98=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",q98.default,P98.default];pw1.default=w98});var lw1=o((cw1)=>{Object.defineProperty(cw1,"__esModule",{value:!0});var lo=d6(),XL=lo.operators,io={maximum:{okStr:"<=",ok:XL.LTE,fail:XL.GT},minimum:{okStr:">=",ok:XL.GTE,fail:XL.LT},exclusiveMaximum:{okStr:"<",ok:XL.LT,fail:XL.GTE},exclusiveMinimum:{okStr:">",ok:XL.GT,fail:XL.LTE}},j98={message:({keyword:$,schemaCode:Y})=>lo.str`must be ${io[$].okStr} ${Y}`,params:({keyword:$,schemaCode:Y})=>lo._`{comparison: ${io[$].okStr}, limit: ${Y}}`},T98={keyword:Object.keys(io),type:"number",schemaType:"number",$data:!0,error:j98,code($){let{keyword:Y,data:X,schemaCode:G}=$;$.fail$data(lo._`${X} ${io[Y].fail} ${G} || isNaN(${X})`)}};cw1.default=T98});var nw1=o((iw1)=>{Object.defineProperty(iw1,"__esModule",{value:!0});var by=d6(),C98={message:({schemaCode:$})=>by.str`must be multiple of ${$}`,params:({schemaCode:$})=>by._`{multipleOf: ${$}}`},S98={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:C98,code($){let{gen:Y,data:X,schemaCode:G,it:J}=$,Q=J.opts.multipleOfPrecision,W=Y.let("res"),K=Q?by._`Math.abs(Math.round(${W}) - ${W}) > 1e-${Q}`:by._`${W} !== parseInt(${W})`;$.fail$data(by._`(${G} === 0 || (${W} = ${X}/${G}, ${K}))`)}};iw1.default=S98});var sw1=o((aw1)=>{Object.defineProperty(aw1,"__esModule",{value:!0});function rw1($){let Y=$.length,X=0,G=0,J;while(G<Y)if(X++,J=$.charCodeAt(G++),J>=55296&&J<=56319&&G<Y){if(J=$.charCodeAt(G),(J&64512)===56320)G++}return X}aw1.default=rw1;rw1.code='require("ajv/dist/runtime/ucs2length").default'});var tw1=o((ow1)=>{Object.defineProperty(ow1,"__esModule",{value:!0});var OB=d6(),x98=g8(),y98=sw1(),b98={message({keyword:$,schemaCode:Y}){let X=$==="maxLength"?"more":"fewer";return OB.str`must NOT have ${X} than ${Y} characters`},params:({schemaCode:$})=>OB._`{limit: ${$}}`},h98={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:b98,code($){let{keyword:Y,data:X,schemaCode:G,it:J}=$,Q=Y==="maxLength"?OB.operators.GT:OB.operators.LT,W=J.opts.unicode===!1?OB._`${X}.length`:OB._`${(0,x98.useFunc)($.gen,y98.default)}(${X})`;$.fail$data(OB._`${W} ${Q} ${G}`)}};ow1.default=h98});var $_1=o((ew1)=>{Object.defineProperty(ew1,"__esModule",{value:!0});var g98=v2(),m98=g8(),oP=d6(),u98={message:({schemaCode:$})=>oP.str`must match pattern "${$}"`,params:({schemaCode:$})=>oP._`{pattern: ${$}}`},p98={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:u98,code($){let{gen:Y,data:X,$data:G,schema:J,schemaCode:Q,it:W}=$,K=W.opts.unicodeRegExp?"u":"";if(G){let{regExp:Z}=W.opts.code,H=Z.code==="new RegExp"?oP._`new RegExp`:(0,m98.useFunc)(Y,Z),z=Y.let("valid");Y.try(()=>Y.assign(z,oP._`${H}(${Q}, ${K}).test(${X})`),()=>Y.assign(z,!1)),$.fail$data(oP._`!${z}`)}else{let Z=(0,g98.usePattern)($,J);$.fail$data(oP._`!${Z}.test(${X})`)}}};ew1.default=p98});var X_1=o((Y_1)=>{Object.defineProperty(Y_1,"__esModule",{value:!0});var hy=d6(),c98={message({keyword:$,schemaCode:Y}){let X=$==="maxProperties"?"more":"fewer";return hy.str`must NOT have ${X} than ${Y} properties`},params:({schemaCode:$})=>hy._`{limit: ${$}}`},l98={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:c98,code($){let{keyword:Y,data:X,schemaCode:G}=$,J=Y==="maxProperties"?hy.operators.GT:hy.operators.LT;$.fail$data(hy._`Object.keys(${X}).length ${J} ${G}`)}};Y_1.default=l98});var J_1=o((G_1)=>{Object.defineProperty(G_1,"__esModule",{value:!0});var fy=v2(),gy=d6(),n98=g8(),r98={message:({params:{missingProperty:$}})=>gy.str`must have required property '${$}'`,params:({params:{missingProperty:$}})=>gy._`{missingProperty: ${$}}`},a98={keyword:"required",type:"object",schemaType:"array",$data:!0,error:r98,code($){let{gen:Y,schema:X,schemaCode:G,data:J,$data:Q,it:W}=$,{opts:K}=W;if(!Q&&X.length===0)return;let Z=X.length>=K.loopRequired;if(W.allErrors)H();else z();if(K.strictRequired){let L=$.parentSchema.properties,{definedProperties:N}=$.it;for(let D of X)if((L===null||L===void 0?void 0:L[D])===void 0&&!N.has(D)){let A=W.schemaEnv.baseId+W.errSchemaPath,B=`required property "${D}" is not defined at "${A}" (strictRequired)`;(0,n98.checkStrictMode)(W,B,W.opts.strictRequired)}}function H(){if(Z||Q)$.block$data(gy.nil,V);else for(let L of X)(0,fy.checkReportMissingProp)($,L)}function z(){let L=Y.let("missing");if(Z||Q){let N=Y.let("valid",!0);$.block$data(N,()=>F(L,N)),$.ok(N)}else Y.if((0,fy.checkMissingProp)($,X,L)),(0,fy.reportMissingProp)($,L),Y.else()}function V(){Y.forOf("prop",G,(L)=>{$.setParams({missingProperty:L}),Y.if((0,fy.noPropertyInData)(Y,J,L,K.ownProperties),()=>$.error())})}function F(L,N){$.setParams({missingProperty:L}),Y.forOf(L,G,()=>{Y.assign(N,(0,fy.propertyInData)(Y,J,L,K.ownProperties)),Y.if((0,gy.not)(N),()=>{$.error(),Y.break()})},gy.nil)}}};G_1.default=a98});var W_1=o((Q_1)=>{Object.defineProperty(Q_1,"__esModule",{value:!0});var my=d6(),o98={message({keyword:$,schemaCode:Y}){let X=$==="maxItems"?"more":"fewer";return my.str`must NOT have ${X} than ${Y} items`},params:({schemaCode:$})=>my._`{limit: ${$}}`},t98={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:o98,code($){let{keyword:Y,data:X,schemaCode:G}=$,J=Y==="maxItems"?my.operators.GT:my.operators.LT;$.fail$data(my._`${X}.length ${J} ${G}`)}};Q_1.default=t98});var no=o((Z_1)=>{Object.defineProperty(Z_1,"__esModule",{value:!0});var K_1=So();K_1.code='require("ajv/dist/runtime/equal").default';Z_1.default=K_1});var H_1=o((U_1)=>{Object.defineProperty(U_1,"__esModule",{value:!0});var OD0=_y(),FX=d6(),Y58=g8(),X58=no(),G58={message:({params:{i:$,j:Y}})=>FX.str`must NOT have duplicate items (items ## ${Y} and ${$} are identical)`,params:({params:{i:$,j:Y}})=>FX._`{i: ${$}, j: ${Y}}`},J58={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:G58,code($){let{gen:Y,data:X,$data:G,schema:J,parentSchema:Q,schemaCode:W,it:K}=$;if(!G&&!J)return;let Z=Y.let("valid"),H=Q.items?(0,OD0.getSchemaTypes)(Q.items):[];$.block$data(Z,z,FX._`${W} === false`),$.ok(Z);function z(){let N=Y.let("i",FX._`${X}.length`),D=Y.let("j");$.setParams({i:N,j:D}),Y.assign(Z,!0),Y.if(FX._`${N} > 1`,()=>(V()?F:L)(N,D))}function V(){return H.length>0&&!H.some((N)=>N==="object"||N==="array")}function F(N,D){let A=Y.name("item"),B=(0,OD0.checkDataTypes)(H,A,K.opts.strictNumbers,OD0.DataType.Wrong),O=Y.const("indices",FX._`{}`);Y.for(FX._`;${N}--;`,()=>{if(Y.let(A,FX._`${X}[${N}]`),Y.if(B,FX._`continue`),H.length>1)Y.if(FX._`typeof ${A} == "string"`,FX._`${A} += "_"`);Y.if(FX._`typeof ${O}[${A}] == "number"`,()=>{Y.assign(D,FX._`${O}[${A}]`),$.error(),Y.assign(Z,!1).break()}).code(FX._`${O}[${A}] = ${N}`)})}function L(N,D){let A=(0,Y58.useFunc)(Y,X58.default),B=Y.name("outer");Y.label(B).for(FX._`;${N}--;`,()=>Y.for(FX._`${D} = ${N}; ${D}--;`,()=>Y.if(FX._`${A}(${X}[${N}], ${X}[${D}])`,()=>{$.error(),Y.assign(Z,!1).break(B)})))}}};U_1.default=J58});var V_1=o((z_1)=>{Object.defineProperty(z_1,"__esModule",{value:!0});var ED0=d6(),W58=g8(),K58=no(),Z58={message:"must be equal to constant",params:({schemaCode:$})=>ED0._`{allowedValue: ${$}}`},U58={keyword:"const",$data:!0,error:Z58,code($){let{gen:Y,data:X,$data:G,schemaCode:J,schema:Q}=$;if(G||Q&&typeof Q=="object")$.fail$data(ED0._`!${(0,W58.useFunc)(Y,K58.default)}(${X}, ${J})`);else $.fail(ED0._`${Q} !== ${X}`)}};z_1.default=U58});var L_1=o((F_1)=>{Object.defineProperty(F_1,"__esModule",{value:!0});var uy=d6(),z58=g8(),V58=no(),F58={message:"must be equal to one of the allowed values",params:({schemaCode:$})=>uy._`{allowedValues: ${$}}`},L58={keyword:"enum",schemaType:"array",$data:!0,error:F58,code($){let{gen:Y,data:X,$data:G,schema:J,schemaCode:Q,it:W}=$;if(!G&&J.length===0)throw Error("enum must have non-empty array");let K=J.length>=W.opts.loopEnum,Z,H=()=>Z!==null&&Z!==void 0?Z:Z=(0,z58.useFunc)(Y,V58.default),z;if(K||G)z=Y.let("valid"),$.block$data(z,V);else{if(!Array.isArray(J))throw Error("ajv implementation error");let L=Y.const("vSchema",Q);z=(0,uy.or)(...J.map((N,D)=>F(L,D)))}$.pass(z);function V(){Y.assign(z,!1),Y.forOf("v",Q,(L)=>Y.if(uy._`${H()}(${X}, ${L})`,()=>Y.assign(z,!0).break()))}function F(L,N){let D=J[N];return typeof D==="object"&&D!==null?uy._`${H()}(${X}, ${L}[${N}])`:uy._`${X} === ${D}`}}};F_1.default=L58});var N_1=o((D_1)=>{Object.defineProperty(D_1,"__esModule",{value:!0});var N58=lw1(),A58=nw1(),B58=tw1(),O58=$_1(),E58=X_1(),M58=J_1(),R58=W_1(),q58=H_1(),P58=V_1(),w58=L_1(),_58=[N58.default,A58.default,B58.default,O58.default,E58.default,M58.default,R58.default,q58.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},P58.default,w58.default];D_1.default=_58});var RD0=o((B_1)=>{Object.defineProperty(B_1,"__esModule",{value:!0});B_1.validateAdditionalItems=void 0;var EB=d6(),MD0=g8(),T58={message:({params:{len:$}})=>EB.str`must NOT have more than ${$} items`,params:({params:{len:$}})=>EB._`{limit: ${$}}`},I58={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:T58,code($){let{parentSchema:Y,it:X}=$,{items:G}=Y;if(!Array.isArray(G)){(0,MD0.checkStrictMode)(X,'"additionalItems" is ignored when "items" is not an array of schemas');return}A_1($,G)}};function A_1($,Y){let{gen:X,schema:G,data:J,keyword:Q,it:W}=$;W.items=!0;let K=X.const("len",EB._`${J}.length`);if(G===!1)$.setParams({len:Y.length}),$.pass(EB._`${K} <= ${Y.length}`);else if(typeof G=="object"&&!(0,MD0.alwaysValidSchema)(W,G)){let H=X.var("valid",EB._`${K} <= ${Y.length}`);X.if((0,EB.not)(H),()=>Z(H)),$.ok(H)}function Z(H){X.forRange("i",Y.length,K,(z)=>{if($.subschema({keyword:Q,dataProp:z,dataPropType:MD0.Type.Num},H),!W.allErrors)X.if((0,EB.not)(H),()=>X.break())})}}B_1.validateAdditionalItems=A_1;B_1.default=I58});var qD0=o((R_1)=>{Object.defineProperty(R_1,"__esModule",{value:!0});R_1.validateTuple=void 0;var E_1=d6(),ro=g8(),S58=v2(),k58={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code($){let{schema:Y,it:X}=$;if(Array.isArray(Y))return M_1($,"additionalItems",Y);if(X.items=!0,(0,ro.alwaysValidSchema)(X,Y))return;$.ok((0,S58.validateArray)($))}};function M_1($,Y,X=$.schema){let{gen:G,parentSchema:J,data:Q,keyword:W,it:K}=$;if(z(J),K.opts.unevaluated&&X.length&&K.items!==!0)K.items=ro.mergeEvaluated.items(G,X.length,K.items);let Z=G.name("valid"),H=G.const("len",E_1._`${Q}.length`);X.forEach((V,F)=>{if((0,ro.alwaysValidSchema)(K,V))return;G.if(E_1._`${H} > ${F}`,()=>$.subschema({keyword:W,schemaProp:F,dataProp:F},Z)),$.ok(Z)});function z(V){let{opts:F,errSchemaPath:L}=K,N=X.length,D=N===V.minItems&&(N===V.maxItems||V[Y]===!1);if(F.strictTuples&&!D){let A=`"${W}" is ${N}-tuple, but minItems or maxItems/${Y} are not specified or different at path "${L}"`;(0,ro.checkStrictMode)(K,A,F.strictTuples)}}}R_1.validateTuple=M_1;R_1.default=k58});var w_1=o((P_1)=>{Object.defineProperty(P_1,"__esModule",{value:!0});var x58=qD0(),y58={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:($)=>(0,x58.validateTuple)($,"items")};P_1.default=y58});var T_1=o((j_1)=>{Object.defineProperty(j_1,"__esModule",{value:!0});var __1=d6(),h58=g8(),f58=v2(),g58=RD0(),m58={message:({params:{len:$}})=>__1.str`must NOT have more than ${$} items`,params:({params:{len:$}})=>__1._`{limit: ${$}}`},u58={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:m58,code($){let{schema:Y,parentSchema:X,it:G}=$,{prefixItems:J}=X;if(G.items=!0,(0,h58.alwaysValidSchema)(G,Y))return;if(J)(0,g58.validateAdditionalItems)($,J);else $.ok((0,f58.validateArray)($))}};j_1.default=u58});var C_1=o((I_1)=>{Object.defineProperty(I_1,"__esModule",{value:!0});var x2=d6(),ao=g8(),d58={message:({params:{min:$,max:Y}})=>Y===void 0?x2.str`must contain at least ${$} valid item(s)`:x2.str`must contain at least ${$} and no more than ${Y} valid item(s)`,params:({params:{min:$,max:Y}})=>Y===void 0?x2._`{minContains: ${$}}`:x2._`{minContains: ${$}, maxContains: ${Y}}`},c58={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:d58,code($){let{gen:Y,schema:X,parentSchema:G,data:J,it:Q}=$,W,K,{minContains:Z,maxContains:H}=G;if(Q.opts.next)W=Z===void 0?1:Z,K=H;else W=1;let z=Y.const("len",x2._`${J}.length`);if($.setParams({min:W,max:K}),K===void 0&&W===0){(0,ao.checkStrictMode)(Q,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(K!==void 0&&W>K){(0,ao.checkStrictMode)(Q,'"minContains" > "maxContains" is always invalid'),$.fail();return}if((0,ao.alwaysValidSchema)(Q,X)){let D=x2._`${z} >= ${W}`;if(K!==void 0)D=x2._`${D} && ${z} <= ${K}`;$.pass(D);return}Q.items=!0;let V=Y.name("valid");if(K===void 0&&W===1)L(V,()=>Y.if(V,()=>Y.break()));else if(W===0){if(Y.let(V,!0),K!==void 0)Y.if(x2._`${J}.length > 0`,F)}else Y.let(V,!1),F();$.result(V,()=>$.reset());function F(){let D=Y.name("_valid"),A=Y.let("count",0);L(D,()=>Y.if(D,()=>N(A)))}function L(D,A){Y.forRange("i",0,z,(B)=>{$.subschema({keyword:"contains",dataProp:B,dataPropType:ao.Type.Num,compositeRule:!0},D),A()})}function N(D){if(Y.code(x2._`${D}++`),K===void 0)Y.if(x2._`${D} >= ${W}`,()=>Y.assign(V,!0).break());else if(Y.if(x2._`${D} > ${K}`,()=>Y.assign(V,!1).break()),W===1)Y.assign(V,!0);else Y.if(x2._`${D} >= ${W}`,()=>Y.assign(V,!0))}}};I_1.default=c58});var b_1=o((v_1)=>{Object.defineProperty(v_1,"__esModule",{value:!0});v_1.validateSchemaDeps=v_1.validatePropertyDeps=v_1.error=void 0;var PD0=d6(),i58=g8(),py=v2();v_1.error={message:({params:{property:$,depsCount:Y,deps:X}})=>{let G=Y===1?"property":"properties";return PD0.str`must have ${G} ${X} when property ${$} is present`},params:({params:{property:$,depsCount:Y,deps:X,missingProperty:G}})=>PD0._`{property: ${$},
    missingProperty: ${G},
    depsCount: ${Y},
    deps: ${X}}`};var n58={keyword:"dependencies",type:"object",schemaType:"object",error:v_1.error,code($){let[Y,X]=r58($);S_1($,Y),k_1($,X)}};function r58({schema:$}){let Y={},X={};for(let G in $){if(G==="__proto__")continue;let J=Array.isArray($[G])?Y:X;J[G]=$[G]}return[Y,X]}function S_1($,Y=$.schema){let{gen:X,data:G,it:J}=$;if(Object.keys(Y).length===0)return;let Q=X.let("missing");for(let W in Y){let K=Y[W];if(K.length===0)continue;let Z=(0,py.propertyInData)(X,G,W,J.opts.ownProperties);if($.setParams({property:W,depsCount:K.length,deps:K.join(", ")}),J.allErrors)X.if(Z,()=>{for(let H of K)(0,py.checkReportMissingProp)($,H)});else X.if(PD0._`${Z} && (${(0,py.checkMissingProp)($,K,Q)})`),(0,py.reportMissingProp)($,Q),X.else()}}v_1.validatePropertyDeps=S_1;function k_1($,Y=$.schema){let{gen:X,data:G,keyword:J,it:Q}=$,W=X.name("valid");for(let K in Y){if((0,i58.alwaysValidSchema)(Q,Y[K]))continue;X.if((0,py.propertyInData)(X,G,K,Q.opts.ownProperties),()=>{let Z=$.subschema({keyword:J,schemaProp:K},W);$.mergeValidEvaluated(Z,W)},()=>X.var(W,!0)),$.ok(W)}}v_1.validateSchemaDeps=k_1;v_1.default=n58});var g_1=o((f_1)=>{Object.defineProperty(f_1,"__esModule",{value:!0});var h_1=d6(),o58=g8(),t58={message:"property name must be valid",params:({params:$})=>h_1._`{propertyName: ${$.propertyName}}`},e58={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:t58,code($){let{gen:Y,schema:X,data:G,it:J}=$;if((0,o58.alwaysValidSchema)(J,X))return;let Q=Y.name("valid");Y.forIn("key",G,(W)=>{$.setParams({propertyName:W}),$.subschema({keyword:"propertyNames",data:W,dataTypes:["string"],propertyName:W,compositeRule:!0},Q),Y.if((0,h_1.not)(Q),()=>{if($.error(!0),!J.allErrors)Y.break()})}),$.ok(Q)}};f_1.default=e58});var wD0=o((m_1)=>{Object.defineProperty(m_1,"__esModule",{value:!0});var so=v2(),GZ=d6(),Y$8=Hz(),oo=g8(),X$8={message:"must NOT have additional properties",params:({params:$})=>GZ._`{additionalProperty: ${$.additionalProperty}}`},G$8={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:X$8,code($){let{gen:Y,schema:X,parentSchema:G,data:J,errsCount:Q,it:W}=$;if(!Q)throw Error("ajv implementation error");let{allErrors:K,opts:Z}=W;if(W.props=!0,Z.removeAdditional!=="all"&&(0,oo.alwaysValidSchema)(W,X))return;let H=(0,so.allSchemaProperties)(G.properties),z=(0,so.allSchemaProperties)(G.patternProperties);V(),$.ok(GZ._`${Q} === ${Y$8.default.errors}`);function V(){Y.forIn("key",J,(A)=>{if(!H.length&&!z.length)N(A);else Y.if(F(A),()=>N(A))})}function F(A){let B;if(H.length>8){let O=(0,oo.schemaRefOrVal)(W,G.properties,"properties");B=(0,so.isOwnProperty)(Y,O,A)}else if(H.length)B=(0,GZ.or)(...H.map((O)=>GZ._`${A} === ${O}`));else B=GZ.nil;if(z.length)B=(0,GZ.or)(B,...z.map((O)=>GZ._`${(0,so.usePattern)($,O)}.test(${A})`));return(0,GZ.not)(B)}function L(A){Y.code(GZ._`delete ${J}[${A}]`)}function N(A){if(Z.removeAdditional==="all"||Z.removeAdditional&&X===!1){L(A);return}if(X===!1){if($.setParams({additionalProperty:A}),$.error(),!K)Y.break();return}if(typeof X=="object"&&!(0,oo.alwaysValidSchema)(W,X)){let B=Y.name("valid");if(Z.removeAdditional==="failing")D(A,B,!1),Y.if((0,GZ.not)(B),()=>{$.reset(),L(A)});else if(D(A,B),!K)Y.if((0,GZ.not)(B),()=>Y.break())}}function D(A,B,O){let E={keyword:"additionalProperties",dataProp:A,dataPropType:oo.Type.Str};if(O===!1)Object.assign(E,{compositeRule:!0,createErrors:!1,allErrors:!1});$.subschema(E,B)}}};m_1.default=G$8});var c_1=o((d_1)=>{Object.defineProperty(d_1,"__esModule",{value:!0});var Q$8=Cy(),u_1=v2(),_D0=g8(),p_1=wD0(),W$8={keyword:"properties",type:"object",schemaType:"object",code($){let{gen:Y,schema:X,parentSchema:G,data:J,it:Q}=$;if(Q.opts.removeAdditional==="all"&&G.additionalProperties===void 0)p_1.default.code(new Q$8.KeywordCxt(Q,p_1.default,"additionalProperties"));let W=(0,u_1.allSchemaProperties)(X);for(let V of W)Q.definedProperties.add(V);if(Q.opts.unevaluated&&W.length&&Q.props!==!0)Q.props=_D0.mergeEvaluated.props(Y,(0,_D0.toHash)(W),Q.props);let K=W.filter((V)=>!(0,_D0.alwaysValidSchema)(Q,X[V]));if(K.length===0)return;let Z=Y.name("valid");for(let V of K){if(H(V))z(V);else{if(Y.if((0,u_1.propertyInData)(Y,J,V,Q.opts.ownProperties)),z(V),!Q.allErrors)Y.else().var(Z,!0);Y.endIf()}$.it.definedProperties.add(V),$.ok(Z)}function H(V){return Q.opts.useDefaults&&!Q.compositeRule&&X[V].default!==void 0}function z(V){$.subschema({keyword:"properties",schemaProp:V,dataProp:V},Z)}}};d_1.default=W$8});var a_1=o((r_1)=>{Object.defineProperty(r_1,"__esModule",{value:!0});var l_1=v2(),to=d6(),i_1=g8(),n_1=g8(),Z$8={keyword:"patternProperties",type:"object",schemaType:"object",code($){let{gen:Y,schema:X,data:G,parentSchema:J,it:Q}=$,{opts:W}=Q,K=(0,l_1.allSchemaProperties)(X),Z=K.filter((D)=>(0,i_1.alwaysValidSchema)(Q,X[D]));if(K.length===0||Z.length===K.length&&(!Q.opts.unevaluated||Q.props===!0))return;let H=W.strictSchema&&!W.allowMatchingProperties&&J.properties,z=Y.name("valid");if(Q.props!==!0&&!(Q.props instanceof to.Name))Q.props=(0,n_1.evaluatedPropsToName)(Y,Q.props);let{props:V}=Q;F();function F(){for(let D of K){if(H)L(D);if(Q.allErrors)N(D);else Y.var(z,!0),N(D),Y.if(z)}}function L(D){for(let A in H)if(new RegExp(D).test(A))(0,i_1.checkStrictMode)(Q,`property ${A} matches pattern ${D} (use allowMatchingProperties)`)}function N(D){Y.forIn("key",G,(A)=>{Y.if(to._`${(0,l_1.usePattern)($,D)}.test(${A})`,()=>{let B=Z.includes(D);if(!B)$.subschema({keyword:"patternProperties",schemaProp:D,dataProp:A,dataPropType:n_1.Type.Str},z);if(Q.opts.unevaluated&&V!==!0)Y.assign(to._`${V}[${A}]`,!0);else if(!B&&!Q.allErrors)Y.if((0,to.not)(z),()=>Y.break())})})}}};r_1.default=Z$8});var o_1=o((s_1)=>{Object.defineProperty(s_1,"__esModule",{value:!0});var H$8=g8(),z$8={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code($){let{gen:Y,schema:X,it:G}=$;if((0,H$8.alwaysValidSchema)(G,X)){$.fail();return}let J=Y.name("valid");$.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},J),$.failResult(J,()=>$.reset(),()=>$.error())},error:{message:"must NOT be valid"}};s_1.default=z$8});var e_1=o((t_1)=>{Object.defineProperty(t_1,"__esModule",{value:!0});var F$8=v2(),L$8={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:F$8.validateUnion,error:{message:"must match a schema in anyOf"}};t_1.default=L$8});var Yj1=o(($j1)=>{Object.defineProperty($j1,"__esModule",{value:!0});var eo=d6(),N$8=g8(),A$8={message:"must match exactly one schema in oneOf",params:({params:$})=>eo._`{passingSchemas: ${$.passing}}`},B$8={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:A$8,code($){let{gen:Y,schema:X,parentSchema:G,it:J}=$;if(!Array.isArray(X))throw Error("ajv implementation error");if(J.opts.discriminator&&G.discriminator)return;let Q=X,W=Y.let("valid",!1),K=Y.let("passing",null),Z=Y.name("_valid");$.setParams({passing:K}),Y.block(H),$.result(W,()=>$.reset(),()=>$.error(!0));function H(){Q.forEach((z,V)=>{let F;if((0,N$8.alwaysValidSchema)(J,z))Y.var(Z,!0);else F=$.subschema({keyword:"oneOf",schemaProp:V,compositeRule:!0},Z);if(V>0)Y.if(eo._`${Z} && ${W}`).assign(W,!1).assign(K,eo._`[${K}, ${V}]`).else();Y.if(Z,()=>{if(Y.assign(W,!0),Y.assign(K,V),F)$.mergeEvaluated(F,eo.Name)})})}}};$j1.default=B$8});var Gj1=o((Xj1)=>{Object.defineProperty(Xj1,"__esModule",{value:!0});var E$8=g8(),M$8={keyword:"allOf",schemaType:"array",code($){let{gen:Y,schema:X,it:G}=$;if(!Array.isArray(X))throw Error("ajv implementation error");let J=Y.name("valid");X.forEach((Q,W)=>{if((0,E$8.alwaysValidSchema)(G,Q))return;let K=$.subschema({keyword:"allOf",schemaProp:W},J);$.ok(J),$.mergeEvaluated(K)})}};Xj1.default=M$8});var Kj1=o((Wj1)=>{Object.defineProperty(Wj1,"__esModule",{value:!0});var $t=d6(),Qj1=g8(),q$8={message:({params:$})=>$t.str`must match "${$.ifClause}" schema`,params:({params:$})=>$t._`{failingKeyword: ${$.ifClause}}`},P$8={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:q$8,code($){let{gen:Y,parentSchema:X,it:G}=$;if(X.then===void 0&&X.else===void 0)(0,Qj1.checkStrictMode)(G,'"if" without "then" and "else" is ignored');let J=Jj1(G,"then"),Q=Jj1(G,"else");if(!J&&!Q)return;let W=Y.let("valid",!0),K=Y.name("_valid");if(Z(),$.reset(),J&&Q){let z=Y.let("ifClause");$.setParams({ifClause:z}),Y.if(K,H("then",z),H("else",z))}else if(J)Y.if(K,H("then"));else Y.if((0,$t.not)(K),H("else"));$.pass(W,()=>$.error(!0));function Z(){let z=$.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},K);$.mergeEvaluated(z)}function H(z,V){return()=>{let F=$.subschema({keyword:z},K);if(Y.assign(W,K),$.mergeValidEvaluated(F,W),V)Y.assign(V,$t._`${z}`);else $.setParams({ifClause:z})}}}};function Jj1($,Y){let X=$.schema[Y];return X!==void 0&&!(0,Qj1.alwaysValidSchema)($,X)}Wj1.default=P$8});var Uj1=o((Zj1)=>{Object.defineProperty(Zj1,"__esModule",{value:!0});var _$8=g8(),j$8={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:$,parentSchema:Y,it:X}){if(Y.if===void 0)(0,_$8.checkStrictMode)(X,`"${$}" without "if" is ignored`)}};Zj1.default=j$8});var zj1=o((Hj1)=>{Object.defineProperty(Hj1,"__esModule",{value:!0});var I$8=RD0(),C$8=w_1(),S$8=qD0(),k$8=T_1(),v$8=C_1(),x$8=b_1(),y$8=g_1(),b$8=wD0(),h$8=c_1(),f$8=a_1(),g$8=o_1(),m$8=e_1(),u$8=Yj1(),p$8=Gj1(),d$8=Kj1(),c$8=Uj1();function l$8($=!1){let Y=[g$8.default,m$8.default,u$8.default,p$8.default,d$8.default,c$8.default,y$8.default,b$8.default,x$8.default,h$8.default,f$8.default];if($)Y.push(C$8.default,k$8.default);else Y.push(I$8.default,S$8.default);return Y.push(v$8.default),Y}Hj1.default=l$8});var Fj1=o((Vj1)=>{Object.defineProperty(Vj1,"__esModule",{value:!0});var E7=d6(),n$8={message:({schemaCode:$})=>E7.str`must match format "${$}"`,params:({schemaCode:$})=>E7._`{format: ${$}}`},r$8={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:n$8,code($,Y){let{gen:X,data:G,$data:J,schema:Q,schemaCode:W,it:K}=$,{opts:Z,errSchemaPath:H,schemaEnv:z,self:V}=K;if(!Z.validateFormats)return;if(J)F();else L();function F(){let N=X.scopeValue("formats",{ref:V.formats,code:Z.code.formats}),D=X.const("fDef",E7._`${N}[${W}]`),A=X.let("fType"),B=X.let("format");X.if(E7._`typeof ${D} == "object" && !(${D} instanceof RegExp)`,()=>X.assign(A,E7._`${D}.type || "string"`).assign(B,E7._`${D}.validate`),()=>X.assign(A,E7._`"string"`).assign(B,D)),$.fail$data((0,E7.or)(O(),E()));function O(){if(Z.strictSchema===!1)return E7.nil;return E7._`${W} && !${B}`}function E(){let M=z.$async?E7._`(${D}.async ? await ${B}(${G}) : ${B}(${G}))`:E7._`${B}(${G})`,R=E7._`(typeof ${B} == "function" ? ${M} : ${B}.test(${G}))`;return E7._`${B} && ${B} !== true && ${A} === ${Y} && !${R}`}}function L(){let N=V.formats[Q];if(!N){O();return}if(N===!0)return;let[D,A,B]=E(N);if(D===Y)$.pass(M());function O(){if(Z.strictSchema===!1){V.logger.warn(R());return}throw Error(R());function R(){return`unknown format "${Q}" ignored in schema at path "${H}"`}}function E(R){let q=R instanceof RegExp?(0,E7.regexpCode)(R):Z.code.formats?E7._`${Z.code.formats}${(0,E7.getProperty)(Q)}`:void 0,_=X.scopeValue("formats",{key:Q,ref:R,code:q});if(typeof R=="object"&&!(R instanceof RegExp))return[R.type||"string",R.validate,E7._`${_}.validate`];return["string",R,_]}function M(){if(typeof N=="object"&&!(N instanceof RegExp)&&N.async){if(!z.$async)throw Error("async format in sync schema");return E7._`await ${B}(${G})`}return typeof A=="function"?E7._`${B}(${G})`:E7._`${B}.test(${G})`}}}};Vj1.default=r$8});var Dj1=o((Lj1)=>{Object.defineProperty(Lj1,"__esModule",{value:!0});var s$8=Fj1(),o$8=[s$8.default];Lj1.default=o$8});var Bj1=o((Nj1)=>{Object.defineProperty(Nj1,"__esModule",{value:!0});Nj1.contentVocabulary=Nj1.metadataVocabulary=void 0;Nj1.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Nj1.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Mj1=o((Ej1)=>{Object.defineProperty(Ej1,"__esModule",{value:!0});var $78=dw1(),Y78=N_1(),X78=zj1(),G78=Dj1(),Oj1=Bj1(),J78=[$78.default,Y78.default,(0,X78.default)(),G78.default,Oj1.metadataVocabulary,Oj1.contentVocabulary];Ej1.default=J78});var wj1=o((qj1)=>{Object.defineProperty(qj1,"__esModule",{value:!0});qj1.DiscrError=void 0;var Rj1;(function($){$.Tag="tag",$.Mapping="mapping"})(Rj1||(qj1.DiscrError=Rj1={}))});var Tj1=o((jj1)=>{Object.defineProperty(jj1,"__esModule",{value:!0});var tP=d6(),jD0=wj1(),_j1=bo(),W78=Sy(),K78=g8(),Z78={message:({params:{discrError:$,tagName:Y}})=>$===jD0.DiscrError.Tag?`tag "${Y}" must be string`:`value of tag "${Y}" must be in oneOf`,params:({params:{discrError:$,tag:Y,tagName:X}})=>tP._`{error: ${$}, tag: ${X}, tagValue: ${Y}}`},U78={keyword:"discriminator",type:"object",schemaType:"object",error:Z78,code($){let{gen:Y,data:X,schema:G,parentSchema:J,it:Q}=$,{oneOf:W}=J;if(!Q.opts.discriminator)throw Error("discriminator: requires discriminator option");let K=G.propertyName;if(typeof K!="string")throw Error("discriminator: requires propertyName");if(G.mapping)throw Error("discriminator: mapping is not supported");if(!W)throw Error("discriminator: requires oneOf keyword");let Z=Y.let("valid",!1),H=Y.const("tag",tP._`${X}${(0,tP.getProperty)(K)}`);Y.if(tP._`typeof ${H} == "string"`,()=>z(),()=>$.error(!1,{discrError:jD0.DiscrError.Tag,tag:H,tagName:K})),$.ok(Z);function z(){let L=F();Y.if(!1);for(let N in L)Y.elseIf(tP._`${H} === ${N}`),Y.assign(Z,V(L[N]));Y.else(),$.error(!1,{discrError:jD0.DiscrError.Mapping,tag:H,tagName:K}),Y.endIf()}function V(L){let N=Y.name("valid"),D=$.subschema({keyword:"oneOf",schemaProp:L},N);return $.mergeEvaluated(D,tP.Name),N}function F(){var L;let N={},D=B(J),A=!0;for(let M=0;M<W.length;M++){let R=W[M];if((R===null||R===void 0?void 0:R.$ref)&&!(0,K78.schemaHasRulesButRef)(R,Q.self.RULES)){let _=R.$ref;if(R=_j1.resolveRef.call(Q.self,Q.schemaEnv.root,Q.baseId,_),R instanceof _j1.SchemaEnv)R=R.schema;if(R===void 0)throw new W78.default(Q.opts.uriResolver,Q.baseId,_)}let q=(L=R===null||R===void 0?void 0:R.properties)===null||L===void 0?void 0:L[K];if(typeof q!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${K}"`);A=A&&(D||B(R)),O(q,M)}if(!A)throw Error(`discriminator: "${K}" must be required`);return N;function B({required:M}){return Array.isArray(M)&&M.includes(K)}function O(M,R){if(M.const)E(M.const,R);else if(M.enum)for(let q of M.enum)E(q,R);else throw Error(`discriminator: "properties/${K}" must have "const" or "enum"`)}function E(M,R){if(typeof M!="string"||M in N)throw Error(`discriminator: "${K}" values must be unique strings`);N[M]=R}}}};jj1.default=U78});var Ij1=o((Av5,z78)=>{z78.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Xt=o((JQ,TD0)=>{Object.defineProperty(JQ,"__esModule",{value:!0});JQ.MissingRefError=JQ.ValidationError=JQ.CodeGen=JQ.Name=JQ.nil=JQ.stringify=JQ.str=JQ._=JQ.KeywordCxt=JQ.Ajv=void 0;var V78=vw1(),F78=Mj1(),L78=Tj1(),Cj1=Ij1(),D78=["/properties"],Yt="http://json-schema.org/draft-07/schema";class dy extends V78.default{_addVocabularies(){if(super._addVocabularies(),F78.default.forEach(($)=>this.addVocabulary($)),this.opts.discriminator)this.addKeyword(L78.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let $=this.opts.$data?this.$dataMetaSchema(Cj1,D78):Cj1;this.addMetaSchema($,Yt,!1),this.refs["http://json-schema.org/schema"]=Yt}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Yt)?Yt:void 0)}}JQ.Ajv=dy;TD0.exports=JQ=dy;TD0.exports.Ajv=dy;Object.defineProperty(JQ,"__esModule",{value:!0});JQ.default=dy;var N78=Cy();Object.defineProperty(JQ,"KeywordCxt",{enumerable:!0,get:function(){return N78.KeywordCxt}});var eP=d6();Object.defineProperty(JQ,"_",{enumerable:!0,get:function(){return eP._}});Object.defineProperty(JQ,"str",{enumerable:!0,get:function(){return eP.str}});Object.defineProperty(JQ,"stringify",{enumerable:!0,get:function(){return eP.stringify}});Object.defineProperty(JQ,"nil",{enumerable:!0,get:function(){return eP.nil}});Object.defineProperty(JQ,"Name",{enumerable:!0,get:function(){return eP.Name}});Object.defineProperty(JQ,"CodeGen",{enumerable:!0,get:function(){return eP.CodeGen}});var A78=xo();Object.defineProperty(JQ,"ValidationError",{enumerable:!0,get:function(){return A78.default}});var B78=Sy();Object.defineProperty(JQ,"MissingRefError",{enumerable:!0,get:function(){return B78.default}})});var gD0=o((bj1)=>{Object.defineProperty(bj1,"__esModule",{value:!0});var JL;(function($){$[$.key=0]="key",$[$.value=1]="value"})(JL||(JL={}));var _78=Object.freeze({key:{terminator:"=",quotes:{}},value:{terminator:";",quotes:{'"':'"',"'":"'","{":"}"}}});function j78($,Y=_78){let X={},G=JL.key,J=!1,Q=!1,W=!1,K="",Z="",H="",z=0;function V(){J=!0}function F(){Q=!0}function L(){J=!1,Q=!1,W=!1,K="",Z=""}function N(){return G===JL.key?Y.key:Y.value}function D(M){return N().terminator===M}function A(M){return Object.keys(N().quotes).some((R)=>M===R)}function B(M){return W&&M===N().quotes[K]}function O(M){Z+=M}function E(){if(!W)Z=Z.trim();switch(G){case JL.key:H=Z.toLowerCase(),G=JL.value;break;case JL.value:G=JL.key,X[H]=Z,H="";break}L()}while(z<$.length){let M=$.charAt(z);if(!Q)if(!J){if(M.trim())if(V(),A(M))W=!0,K=M;else O(M)}else if(W&&B(M)){let R=$.charAt(z+1);if(M===R)O(M),z++;else F()}else if(!W&&D(M)){let R=$.charAt(z+1);if(M===R)O(M),z++;else E()}else O(M);else if(D(M))E();else if(M.trim())throw Error("Malformed connection string");z++}if(W&&!Q)throw Error("Connection string terminated unexpectedly");else E();return X}bj1.default=j78});var fj1=o((JZ)=>{var I78=JZ&&JZ.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(JZ,"__esModule",{value:!0});JZ.SCHEMA=JZ.SchemaTypes=void 0;var C78=I78(gD0()),_6;(function($){$[$.BOOL=0]="BOOL",$[$.STRING=1]="STRING",$[$.NUMBER=2]="NUMBER"})(_6=JZ.SchemaTypes||(JZ.SchemaTypes={}));JZ.SCHEMA={"Application Name":{type:_6.STRING,aliases:["App"],validator($){return typeof $==="string"&&$.length<=128}},ApplicationIntent:{type:_6.STRING,allowedValues:["ReadOnly","ReadWrite"],default:"ReadWrite"},"Asynchronous Processing":{type:_6.BOOL,default:!1,aliases:["Async"]},AttachDBFilename:{type:_6.STRING,aliases:["Extended Properties","Initial File Name"]},Authentication:{type:_6.STRING,allowedValues:["Active Directory Integrated","Active Directory Password","Sql Password"]},"Column Encryption Setting":{type:_6.STRING},"Connection Timeout":{type:_6.NUMBER,aliases:["Connect Timeout","Timeout"],default:15},"Connection Lifetime":{type:_6.NUMBER,aliases:["Load Balance Timeout"],default:0},ConnectRetryCount:{type:_6.NUMBER,default:1,validator($){return $>0&&$<=255}},ConnectRetryInterval:{type:_6.NUMBER,default:10},"Context Connection":{type:_6.BOOL,default:!1},"Current Language":{aliases:["Language"],type:_6.STRING,validator($){return typeof $==="string"&&$.length<=128}},"Data Source":{aliases:["Addr","Address","Server","Network Address"],type:_6.STRING},Encrypt:{type:_6.BOOL,default:!1},Enlist:{type:_6.BOOL,default:!0},"Failover Partner":{type:_6.STRING},"Initial Catalog":{type:_6.STRING,aliases:["Database"],validator($){return typeof $==="string"&&$.length<=128}},"Integrated Security":{type:_6.BOOL,aliases:["Trusted_Connection"],coerce($){return $==="sspi"||null}},"Max Pool Size":{type:_6.NUMBER,default:100,validator($){return $>=1}},"Min Pool Size":{type:_6.NUMBER,default:0,validator($){return $>=0}},MultipleActiveResultSets:{type:_6.BOOL,default:!1},MultiSubnetFailover:{type:_6.BOOL,default:!1},"Network Library":{type:_6.STRING,aliases:["Network","Net"],allowedValues:["dbnmpntw","dbmsrpcn","dbmsadsn","dbmsgnet","dbmslpcn","dbmsspxn","dbmssocn","Dbmsvinn"]},"Packet Size":{type:_6.NUMBER,default:8000,validator($){return $>=512&&$<=32768}},Password:{type:_6.STRING,aliases:["PWD"],validator($){return typeof $==="string"&&$.length<=128}},"Persist Security Info":{type:_6.BOOL,aliases:["PersistSecurityInfo"],default:!1},PoolBlockingPeriod:{type:_6.NUMBER,default:0,coerce($){if(typeof $!=="string")return null;switch($.toLowerCase()){case"alwaysblock":return 1;case"auto":return 0;case"neverblock":return 2}return null}},Pooling:{type:_6.BOOL,default:!0},Replication:{type:_6.BOOL,default:!1},"Transaction Binding":{type:_6.STRING,allowedValues:["Implicit Unbind","Explicit Unbind"],default:"Implicit Unbind"},TransparentNetworkIPResolution:{type:_6.BOOL,default:!0},TrustServerCertificate:{type:_6.BOOL,default:!1},"Type System Version":{type:_6.STRING,allowedValues:["SQL Server 2012","SQL Server 2008","SQL Server 2005","Latest"]},"User ID":{type:_6.STRING,aliases:["UID"],validator($){return typeof $==="string"&&$.length<=128}},"User Instance":{type:_6.BOOL,default:!1},"Workstation ID":{type:_6.STRING,aliases:["WSID"],validator($){return typeof $==="string"&&$.length<=128}}};function S78($){if($.trim()==="")return _6.STRING;let Y=parseInt($,10);if(!Number.isNaN(Y)&&Y.toString()===$)return _6.NUMBER;if(["true","false","yes","no"].includes($.toLowerCase()))return _6.BOOL;return _6.STRING}function hj1($,Y,X){if(X){let G=X($);if(G!==null)return G}switch(Y){case _6.BOOL:if(["true","yes","1"].includes($.toLowerCase()))return!0;if(["false","no","0"].includes($.toLowerCase()))return!1;return $;case _6.NUMBER:return parseInt($,10)}return $}function k78($,Y,X){let G=!0;if(X)G=X($);if(G)G=(Y===null||Y===void 0?void 0:Y.includes($))||!1;return G}function v78($,Y=!1,X=!1,G=!1,J=JZ.SCHEMA){let Q=Object.entries(J).reduce((W,[K,Z])=>{var H;return Object.assign(W,{[K.toLowerCase()]:Z}),((H=Z.aliases)===null||H===void 0?void 0:H.reduce((z,V)=>{return Object.assign(z,{[V.toLowerCase()]:{...Z,canonical:K.toLowerCase()}})},W))||W},{});return Object.entries((0,C78.default)($)).reduce((W,[K,Z])=>{if(!Object.prototype.hasOwnProperty.call(Q,K))return Object.assign(W,{[K]:hj1(Z,S78(Z))});let H=hj1(Z,Q[K].type,Q[K].coerce);if(G&&!k78(H,Q[K].allowedValues,Q[K].validator))H=Q[K].default;let z=Y?Q[K].canonical||K:K;return Object.assign(W,{[z]:H})},{})}JZ.default=v78});var mj1=o((QL)=>{var gj1=QL&&QL.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(QL,"__esModule",{value:!0});QL.parseSqlConnectionString=QL.parseConnectionString=void 0;var x78=gj1(gD0());QL.parseConnectionString=x78.default;var y78=gj1(fj1());QL.parseSqlConnectionString=y78.default});function x0($,Y,X){function G(K,Z){if(!K._zod)Object.defineProperty(K,"_zod",{value:{def:Z,constr:W,traits:new Set},enumerable:!1});if(K._zod.traits.has($))return;K._zod.traits.add($),Y(K,Z);let H=W.prototype,z=Object.keys(H);for(let V=0;V<z.length;V++){let F=z[V];if(!(F in K))K[F]=H[F].bind(K)}}let J=X?.Parent??Object;class Q extends J{}Object.defineProperty(Q,"name",{value:$});function W(K){var Z;let H=X?.Parent?new Q:this;G(H,K),(Z=H._zod).deferred??(Z.deferred=[]);for(let z of H._zod.deferred)z();return H}return Object.defineProperty(W,"init",{value:G}),Object.defineProperty(W,Symbol.hasInstance,{value:(K)=>{if(X?.Parent&&K instanceof X.Parent)return!0;return K?._zod?.traits?.has($)}}),Object.defineProperty(W,"name",{value:$}),W}function S$($){if($)Object.assign(jB,$);return jB}var tb1,Aw,Ct,U3,TB,jB;var IB=V0(()=>{Aw=Object.freeze({status:"aborted"});Ct=Symbol("zod_brand");U3=class U3 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};TB=class TB extends Error{constructor($){super(`Encountered unidirectional transform during encode: ${$}`);this.name="ZodEncodeError"}};(tb1=globalThis).__zod_globalConfig??(tb1.__zod_globalConfig={});jB=globalThis.__zod_globalConfig});var V1={};W8(V1,{unwrapMessage:()=>Jb,uint8ArrayToHex:()=>JW8,uint8ArrayToBase64url:()=>XW8,uint8ArrayToBase64:()=>Kh1,stringifyPrimitive:()=>U1,slugify:()=>UP0,shallowClone:()=>vt,safeExtend:()=>Gh1,required:()=>Qh1,randomString:()=>aQ8,propertyKeyTypes:()=>Kb,promiseAllObject:()=>rQ8,primitiveTypes:()=>zP0,prefixIssues:()=>KQ,pick:()=>$h1,partial:()=>Jh1,parsedType:()=>H1,optionalKeys:()=>VP0,omit:()=>Yh1,objectClone:()=>lQ8,numKeys:()=>sQ8,nullish:()=>KL,normalizeParams:()=>R1,mergeDefs:()=>Lz,merge:()=>eQ8,jsonStringifyReplacer:()=>Bw,joinValues:()=>i0,issue:()=>Ew,isPlainObject:()=>UL,isObject:()=>CB,hexToUint8Array:()=>GW8,getSizableOrigin:()=>Zb,getParsedType:()=>oQ8,getLengthableOrigin:()=>Ub,getEnumValues:()=>Qb,getElementAtPath:()=>nQ8,floatSafeRemainder:()=>ZP0,finalizeIssue:()=>gG,extend:()=>Xh1,explicitlyAborted:()=>DP0,escapeRegex:()=>g2,esc:()=>St,defineLazy:()=>m6,createTransparentProxy:()=>tQ8,cloneDef:()=>iQ8,clone:()=>hY,cleanRegex:()=>Wb,cleanEnum:()=>$W8,captureStackTrace:()=>kt,cached:()=>Ow,base64urlToUint8Array:()=>YW8,base64ToUint8Array:()=>Wh1,assignProp:()=>ZL,assertNotEqual:()=>uQ8,assertNever:()=>dQ8,assertIs:()=>pQ8,assertEqual:()=>mQ8,assert:()=>cQ8,allowsEval:()=>HP0,aborted:()=>HL,NUMBER_FORMAT_RANGES:()=>FP0,Class:()=>Zh1,BIGINT_FORMAT_RANGES:()=>LP0});function mQ8($){return $}function uQ8($){return $}function pQ8($){}function dQ8($){throw Error("Unexpected value in exhaustive check")}function cQ8($){}function Qb($){let Y=Object.values($).filter((G)=>typeof G==="number");return Object.entries($).filter(([G,J])=>Y.indexOf(+G)===-1).map(([G,J])=>J)}function i0($,Y="|"){return $.map((X)=>U1(X)).join(Y)}function Bw($,Y){if(typeof Y==="bigint")return Y.toString();return Y}function Ow($){return{get value(){{let X=$();return Object.defineProperty(this,"value",{value:X}),X}throw Error("cached value already set")}}}function KL($){return $===null||$===void 0}function Wb($){let Y=$.startsWith("^")?1:0,X=$.endsWith("$")?$.length-1:$.length;return $.slice(Y,X)}function ZP0($,Y){let X=$/Y,G=Math.round(X),J=Number.EPSILON*Math.max(Math.abs(X),1);if(Math.abs(X-G)<J)return 0;return X-G}function m6($,Y,X){let G=void 0;Object.defineProperty($,Y,{get(){if(G===eb1)return;if(G===void 0)G=eb1,G=X();return G},set(J){Object.defineProperty($,Y,{value:J})},configurable:!0})}function lQ8($){return Object.create(Object.getPrototypeOf($),Object.getOwnPropertyDescriptors($))}function ZL($,Y,X){Object.defineProperty($,Y,{value:X,writable:!0,enumerable:!0,configurable:!0})}function Lz(...$){let Y={};for(let X of $){let G=Object.getOwnPropertyDescriptors(X);Object.assign(Y,G)}return Object.defineProperties({},Y)}function iQ8($){return Lz($._zod.def)}function nQ8($,Y){if(!Y)return $;return Y.reduce((X,G)=>X?.[G],$)}function rQ8($){let Y=Object.keys($),X=Y.map((G)=>$[G]);return Promise.all(X).then((G)=>{let J={};for(let Q=0;Q<Y.length;Q++)J[Y[Q]]=G[Q];return J})}function aQ8($=10){let X="";for(let G=0;G<$;G++)X+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return X}function St($){return JSON.stringify($)}function UP0($){return $.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function CB($){return typeof $==="object"&&$!==null&&!Array.isArray($)}function UL($){if(CB($)===!1)return!1;let Y=$.constructor;if(Y===void 0)return!0;if(typeof Y!=="function")return!0;let X=Y.prototype;if(CB(X)===!1)return!1;if(Object.prototype.hasOwnProperty.call(X,"isPrototypeOf")===!1)return!1;return!0}function vt($){if(UL($))return{...$};if(Array.isArray($))return[...$];if($ instanceof Map)return new Map($);if($ instanceof Set)return new Set($);return $}function sQ8($){let Y=0;for(let X in $)if(Object.prototype.hasOwnProperty.call($,X))Y++;return Y}function g2($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function hY($,Y,X){let G=new $._zod.constr(Y??$._zod.def);if(!Y||X?.parent)G._zod.parent=$;return G}function R1($){let Y=$;if(!Y)return{};if(typeof Y==="string")return{error:()=>Y};if(Y?.message!==void 0){if(Y?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");Y.error=Y.message}if(delete Y.message,typeof Y.error==="string")return{...Y,error:()=>Y.error};return Y}function tQ8($){let Y;return new Proxy({},{get(X,G,J){return Y??(Y=$()),Reflect.get(Y,G,J)},set(X,G,J,Q){return Y??(Y=$()),Reflect.set(Y,G,J,Q)},has(X,G){return Y??(Y=$()),Reflect.has(Y,G)},deleteProperty(X,G){return Y??(Y=$()),Reflect.deleteProperty(Y,G)},ownKeys(X){return Y??(Y=$()),Reflect.ownKeys(Y)},getOwnPropertyDescriptor(X,G){return Y??(Y=$()),Reflect.getOwnPropertyDescriptor(Y,G)},defineProperty(X,G,J){return Y??(Y=$()),Reflect.defineProperty(Y,G,J)}})}function U1($){if(typeof $==="bigint")return $.toString()+"n";if(typeof $==="string")return`"${$}"`;return`${$}`}function VP0($){return Object.keys($).filter((Y)=>{return $[Y]._zod.optin==="optional"&&$[Y]._zod.optout==="optional"})}function $h1($,Y){let X=$._zod.def,G=X.checks;if(G&&G.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let Q=Lz($._zod.def,{get shape(){let W={};for(let K in Y){if(!(K in X.shape))throw Error(`Unrecognized key: "${K}"`);if(!Y[K])continue;W[K]=X.shape[K]}return ZL(this,"shape",W),W},checks:[]});return hY($,Q)}function Yh1($,Y){let X=$._zod.def,G=X.checks;if(G&&G.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let Q=Lz($._zod.def,{get shape(){let W={...$._zod.def.shape};for(let K in Y){if(!(K in X.shape))throw Error(`Unrecognized key: "${K}"`);if(!Y[K])continue;delete W[K]}return ZL(this,"shape",W),W},checks:[]});return hY($,Q)}function Xh1($,Y){if(!UL(Y))throw Error("Invalid input to extend: expected a plain object");let X=$._zod.def.checks;if(X&&X.length>0){let Q=$._zod.def.shape;for(let W in Y)if(Object.getOwnPropertyDescriptor(Q,W)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let J=Lz($._zod.def,{get shape(){let Q={...$._zod.def.shape,...Y};return ZL(this,"shape",Q),Q}});return hY($,J)}function Gh1($,Y){if(!UL(Y))throw Error("Invalid input to safeExtend: expected a plain object");let X=Lz($._zod.def,{get shape(){let G={...$._zod.def.shape,...Y};return ZL(this,"shape",G),G}});return hY($,X)}function eQ8($,Y){if($._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let X=Lz($._zod.def,{get shape(){let G={...$._zod.def.shape,...Y._zod.def.shape};return ZL(this,"shape",G),G},get catchall(){return Y._zod.def.catchall},checks:Y._zod.def.checks??[]});return hY($,X)}function Jh1($,Y,X){let J=Y._zod.def.checks;if(J&&J.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let W=Lz(Y._zod.def,{get shape(){let K=Y._zod.def.shape,Z={...K};if(X)for(let H in X){if(!(H in K))throw Error(`Unrecognized key: "${H}"`);if(!X[H])continue;Z[H]=$?new $({type:"optional",innerType:K[H]}):K[H]}else for(let H in K)Z[H]=$?new $({type:"optional",innerType:K[H]}):K[H];return ZL(this,"shape",Z),Z},checks:[]});return hY(Y,W)}function Qh1($,Y,X){let G=Lz(Y._zod.def,{get shape(){let J=Y._zod.def.shape,Q={...J};if(X)for(let W in X){if(!(W in Q))throw Error(`Unrecognized key: "${W}"`);if(!X[W])continue;Q[W]=new $({type:"nonoptional",innerType:J[W]})}else for(let W in J)Q[W]=new $({type:"nonoptional",innerType:J[W]});return ZL(this,"shape",Q),Q}});return hY(Y,G)}function HL($,Y=0){if($.aborted===!0)return!0;for(let X=Y;X<$.issues.length;X++)if($.issues[X]?.continue!==!0)return!0;return!1}function DP0($,Y=0){if($.aborted===!0)return!0;for(let X=Y;X<$.issues.length;X++)if($.issues[X]?.continue===!1)return!0;return!1}function KQ($,Y){return Y.map((X)=>{var G;return(G=X).path??(G.path=[]),X.path.unshift($),X})}function Jb($){return typeof $==="string"?$:$?.message}function gG($,Y,X){let G=$.message?$.message:Jb($.inst?._zod.def?.error?.($))??Jb(Y?.error?.($))??Jb(X.customError?.($))??Jb(X.localeError?.($))??"Invalid input",{inst:J,continue:Q,input:W,...K}=$;if(K.path??(K.path=[]),K.message=G,Y?.reportInput)K.input=W;return K}function Zb($){if($ instanceof Set)return"set";if($ instanceof Map)return"map";if($ instanceof File)return"file";return"unknown"}function Ub($){if(Array.isArray($))return"array";if(typeof $==="string")return"string";return"unknown"}function H1($){let Y=typeof $;switch(Y){case"number":return Number.isNaN($)?"nan":"number";case"object":{if($===null)return"null";if(Array.isArray($))return"array";let X=$;if(X&&Object.getPrototypeOf(X)!==Object.prototype&&"constructor"in X&&X.constructor)return X.constructor.name}}return Y}function Ew(...$){let[Y,X,G]=$;if(typeof Y==="string")return{message:Y,code:"custom",input:X,inst:G};return{...Y}}function $W8($){return Object.entries($).filter(([Y,X])=>{return Number.isNaN(Number.parseInt(Y,10))}).map((Y)=>Y[1])}function Wh1($){let Y=atob($),X=new Uint8Array(Y.length);for(let G=0;G<Y.length;G++)X[G]=Y.charCodeAt(G);return X}function Kh1($){let Y="";for(let X=0;X<$.length;X++)Y+=String.fromCharCode($[X]);return btoa(Y)}function YW8($){let Y=$.replace(/-/g,"+").replace(/_/g,"/"),X="=".repeat((4-Y.length%4)%4);return Wh1(Y+X)}function XW8($){return Kh1($).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function GW8($){let Y=$.replace(/^0x/,"");if(Y.length%2!==0)throw Error("Invalid hex string length");let X=new Uint8Array(Y.length/2);for(let G=0;G<Y.length;G+=2)X[G/2]=Number.parseInt(Y.slice(G,G+2),16);return X}function JW8($){return Array.from($).map((Y)=>Y.toString(16).padStart(2,"0")).join("")}class Zh1{constructor(...$){}}var eb1,kt,HP0,oQ8=($)=>{let Y=typeof $;switch(Y){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN($)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray($))return"array";if($===null)return"null";if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return"promise";if(typeof Map<"u"&&$ instanceof Map)return"map";if(typeof Set<"u"&&$ instanceof Set)return"set";if(typeof Date<"u"&&$ instanceof Date)return"date";if(typeof File<"u"&&$ instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${Y}`)}},Kb,zP0,FP0,LP0;var j4=V0(()=>{IB();eb1=Symbol("evaluating");kt="captureStackTrace"in Error?Error.captureStackTrace:(...$)=>{};HP0=Ow(()=>{if(jB.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch($){return!1}});Kb=new Set(["string","number","symbol"]),zP0=new Set(["string","number","bigint","boolean","symbol","undefined"]);FP0={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},LP0={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]}});function Mw($,Y=(X)=>X.message){let X={},G=[];for(let J of $.issues)if(J.path.length>0)X[J.path[0]]=X[J.path[0]]||[],X[J.path[0]].push(Y(J));else G.push(Y(J));return{formErrors:G,fieldErrors:X}}function Rw($,Y=(X)=>X.message){let X={_errors:[]},G=(J,Q=[])=>{for(let W of J.issues)if(W.code==="invalid_union"&&W.errors.length)W.errors.map((K)=>G({issues:K},[...Q,...W.path]));else if(W.code==="invalid_key")G({issues:W.issues},[...Q,...W.path]);else if(W.code==="invalid_element")G({issues:W.issues},[...Q,...W.path]);else{let K=[...Q,...W.path];if(K.length===0)X._errors.push(Y(W));else{let Z=X,H=0;while(H<K.length){let z=K[H];if(H!==K.length-1)Z[z]=Z[z]||{_errors:[]};else Z[z]=Z[z]||{_errors:[]},Z[z]._errors.push(Y(W));Z=Z[z],H++}}}};return G($),X}function xt($,Y=(X)=>X.message){let X={errors:[]},G=(J,Q=[])=>{var W,K;for(let Z of J.issues)if(Z.code==="invalid_union"&&Z.errors.length)Z.errors.map((H)=>G({issues:H},[...Q,...Z.path]));else if(Z.code==="invalid_key")G({issues:Z.issues},[...Q,...Z.path]);else if(Z.code==="invalid_element")G({issues:Z.issues},[...Q,...Z.path]);else{let H=[...Q,...Z.path];if(H.length===0){X.errors.push(Y(Z));continue}let z=X,V=0;while(V<H.length){let F=H[V],L=V===H.length-1;if(typeof F==="string")z.properties??(z.properties={}),(W=z.properties)[F]??(W[F]={errors:[]}),z=z.properties[F];else z.items??(z.items=[]),(K=z.items)[F]??(K[F]={errors:[]}),z=z.items[F];if(L)z.errors.push(Y(Z));V++}}};return G($),X}function Hh1($){let Y=[],X=$.map((G)=>typeof G==="object"?G.key:G);for(let G of X)if(typeof G==="number")Y.push(`[${G}]`);else if(typeof G==="symbol")Y.push(`[${JSON.stringify(String(G))}]`);else if(/[^\w$]/.test(G))Y.push(`[${JSON.stringify(G)}]`);else{if(Y.length)Y.push(".");Y.push(G)}return Y.join("")}function yt($){let Y=[],X=[...$.issues].sort((G,J)=>(G.path??[]).length-(J.path??[]).length);for(let G of X)if(Y.push(`\u2716 ${G.message}`),G.path?.length)Y.push(`  \u2192 at ${Hh1(G.path)}`);return Y.join(`
`)}var Uh1=($,Y)=>{$.name="$ZodError",Object.defineProperty($,"_zod",{value:$._zod,enumerable:!1}),Object.defineProperty($,"issues",{value:Y,enumerable:!1}),$.message=JSON.stringify(Y,Bw,2),Object.defineProperty($,"toString",{value:()=>$.message,enumerable:!1})},Hb,ZQ;var NP0=V0(()=>{IB();j4();Hb=x0("$ZodError",Uh1),ZQ=x0("$ZodError",Uh1,{Parent:Error})});var qw=($)=>(Y,X,G,J)=>{let Q=G?{...G,async:!1}:{async:!1},W=Y._zod.run({value:X,issues:[]},Q);if(W instanceof Promise)throw new U3;if(W.issues.length){let K=new(J?.Err??$)(W.issues.map((Z)=>gG(Z,Q,S$())));throw kt(K,J?.callee),K}return W.value},SB,Pw=($)=>async(Y,X,G,J)=>{let Q=G?{...G,async:!0}:{async:!0},W=Y._zod.run({value:X,issues:[]},Q);if(W instanceof Promise)W=await W;if(W.issues.length){let K=new(J?.Err??$)(W.issues.map((Z)=>gG(Z,Q,S$())));throw kt(K,J?.callee),K}return W.value},kB,ww=($)=>(Y,X,G)=>{let J=G?{...G,async:!1}:{async:!1},Q=Y._zod.run({value:X,issues:[]},J);if(Q instanceof Promise)throw new U3;return Q.issues.length?{success:!1,error:new($??Hb)(Q.issues.map((W)=>gG(W,J,S$())))}:{success:!0,data:Q.value}},zL,_w=($)=>async(Y,X,G)=>{let J=G?{...G,async:!0}:{async:!0},Q=Y._zod.run({value:X,issues:[]},J);if(Q instanceof Promise)Q=await Q;return Q.issues.length?{success:!1,error:new $(Q.issues.map((W)=>gG(W,J,S$())))}:{success:!0,data:Q.value}},VL,bt=($)=>(Y,X,G)=>{let J=G?{...G,direction:"backward"}:{direction:"backward"};return qw($)(Y,X,J)},zh1,ht=($)=>(Y,X,G)=>{return qw($)(Y,X,G)},Vh1,ft=($)=>async(Y,X,G)=>{let J=G?{...G,direction:"backward"}:{direction:"backward"};return Pw($)(Y,X,J)},Fh1,gt=($)=>async(Y,X,G)=>{return Pw($)(Y,X,G)},Lh1,mt=($)=>(Y,X,G)=>{let J=G?{...G,direction:"backward"}:{direction:"backward"};return ww($)(Y,X,J)},Dh1,ut=($)=>(Y,X,G)=>{return ww($)(Y,X,G)},Nh1,pt=($)=>async(Y,X,G)=>{let J=G?{...G,direction:"backward"}:{direction:"backward"};return _w($)(Y,X,J)},Ah1,dt=($)=>async(Y,X,G)=>{return _w($)(Y,X,G)},Bh1;var AP0=V0(()=>{IB();NP0();j4();SB=qw(ZQ),kB=Pw(ZQ),zL=ww(ZQ),VL=_w(ZQ),zh1=bt(ZQ),Vh1=ht(ZQ),Fh1=ft(ZQ),Lh1=gt(ZQ),Dh1=mt(ZQ),Nh1=ut(ZQ),Ah1=pt(ZQ),Bh1=dt(ZQ)});var mG={};W8(mG,{xid:()=>MP0,uuid7:()=>UW8,uuid6:()=>ZW8,uuid4:()=>KW8,uuid:()=>vB,uppercase:()=>iP0,unicodeEmail:()=>Oh1,undefined:()=>cP0,ulid:()=>EP0,time:()=>hP0,string:()=>gP0,sha512_hex:()=>CW8,sha512_base64url:()=>kW8,sha512_base64:()=>SW8,sha384_hex:()=>jW8,sha384_base64url:()=>IW8,sha384_base64:()=>TW8,sha256_hex:()=>PW8,sha256_base64url:()=>_W8,sha256_base64:()=>wW8,sha1_hex:()=>MW8,sha1_base64url:()=>qW8,sha1_base64:()=>RW8,rfc5322Email:()=>zW8,number:()=>zb,null:()=>dP0,nanoid:()=>qP0,md5_hex:()=>BW8,md5_base64url:()=>EW8,md5_base64:()=>OW8,mac:()=>CP0,lowercase:()=>lP0,ksuid:()=>RP0,ipv6:()=>IP0,ipv4:()=>TP0,integer:()=>uP0,idnEmail:()=>VW8,httpProtocol:()=>xP0,html5Email:()=>HW8,hostname:()=>DW8,hex:()=>AW8,guid:()=>wP0,extendedDuration:()=>WW8,emoji:()=>jP0,email:()=>_P0,e164:()=>yP0,duration:()=>PP0,domain:()=>NW8,datetime:()=>fP0,date:()=>bP0,cuid2:()=>OP0,cuid:()=>BP0,cidrv6:()=>kP0,cidrv4:()=>SP0,browserEmail:()=>FW8,boolean:()=>pP0,bigint:()=>mP0,base64url:()=>ct,base64:()=>vP0});function jP0(){return new RegExp(LW8,"u")}function Mh1($){return typeof $.precision==="number"?$.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":$.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${$.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function hP0($){return new RegExp(`^${Mh1($)}$`)}function fP0($){let Y=Mh1({precision:$.precision}),X=["Z"];if($.local)X.push("");if($.offset)X.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let G=`${Y}(?:${X.join("|")})`;return new RegExp(`^${Eh1}T(?:${G})$`)}function Vb($,Y){return new RegExp(`^[A-Za-z0-9+/]{${$}}${Y}$`)}function Fb($){return new RegExp(`^[A-Za-z0-9_-]{${$}}$`)}var BP0,OP0,EP0,MP0,RP0,qP0,PP0,WW8,wP0,vB=($)=>{if(!$)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${$}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},KW8,ZW8,UW8,_P0,HW8,zW8,Oh1,VW8,FW8,LW8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",TP0,IP0,CP0=($)=>{let Y=g2($??":");return new RegExp(`^(?:[0-9A-F]{2}${Y}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${Y}){5}[0-9a-f]{2}$`)},SP0,kP0,vP0,ct,DW8,NW8,xP0,yP0,Eh1="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",bP0,gP0=($)=>{let Y=$?`[\\s\\S]{${$?.minimum??0},${$?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${Y}$`)},mP0,uP0,zb,pP0,dP0,cP0,lP0,iP0,AW8,BW8,OW8,EW8,MW8,RW8,qW8,PW8,wW8,_W8,jW8,TW8,IW8,CW8,SW8,kW8;var lt=V0(()=>{j4();BP0=/^[cC][0-9a-z]{6,}$/,OP0=/^[0-9a-z]+$/,EP0=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,MP0=/^[0-9a-vA-V]{20}$/,RP0=/^[A-Za-z0-9]{27}$/,qP0=/^[a-zA-Z0-9_-]{21}$/,PP0=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,WW8=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,wP0=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,KW8=vB(4),ZW8=vB(6),UW8=vB(7),_P0=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,HW8=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,zW8=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Oh1=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,VW8=Oh1,FW8=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;TP0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,IP0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,SP0=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,kP0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,vP0=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ct=/^[A-Za-z0-9_-]*$/,DW8=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,NW8=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,xP0=/^https?$/,yP0=/^\+[1-9]\d{6,14}$/,bP0=new RegExp(`^${Eh1}$`);mP0=/^-?\d+n?$/,uP0=/^-?\d+$/,zb=/^-?\d+(?:\.\d+)?$/,pP0=/^(?:true|false)$/i,dP0=/^null$/i,cP0=/^undefined$/i,lP0=/^[^A-Z]*$/,iP0=/^[^a-z]*$/,AW8=/^[0-9a-fA-F]*$/;BW8=/^[0-9a-fA-F]{32}$/,OW8=Vb(22,"=="),EW8=Fb(22),MW8=/^[0-9a-fA-F]{40}$/,RW8=Vb(27,"="),qW8=Fb(27),PW8=/^[0-9a-fA-F]{64}$/,wW8=Vb(43,"="),_W8=Fb(43),jW8=/^[0-9a-fA-F]{96}$/,TW8=Vb(64,""),IW8=Fb(64),CW8=/^[0-9a-fA-F]{128}$/,SW8=Vb(86,"=="),kW8=Fb(86)});function Rh1($,Y,X){if($.issues.length)Y.issues.push(...KQ(X,$.issues))}var U5,qh1,it,nt,nP0,rP0,aP0,sP0,oP0,tP0,eP0,$w0,Yw0,jw,Xw0,Gw0,Jw0,Qw0,Ww0,Kw0,Zw0,Uw0,Hw0;var rt=V0(()=>{IB();lt();j4();U5=x0("$ZodCheck",($,Y)=>{var X;$._zod??($._zod={}),$._zod.def=Y,(X=$._zod).onattach??(X.onattach=[])}),qh1={number:"number",bigint:"bigint",object:"date"},it=x0("$ZodCheckLessThan",($,Y)=>{U5.init($,Y);let X=qh1[typeof Y.value];$._zod.onattach.push((G)=>{let J=G._zod.bag,Q=(Y.inclusive?J.maximum:J.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(Y.value<Q)if(Y.inclusive)J.maximum=Y.value;else J.exclusiveMaximum=Y.value}),$._zod.check=(G)=>{if(Y.inclusive?G.value<=Y.value:G.value<Y.value)return;G.issues.push({origin:X,code:"too_big",maximum:typeof Y.value==="object"?Y.value.getTime():Y.value,input:G.value,inclusive:Y.inclusive,inst:$,continue:!Y.abort})}}),nt=x0("$ZodCheckGreaterThan",($,Y)=>{U5.init($,Y);let X=qh1[typeof Y.value];$._zod.onattach.push((G)=>{let J=G._zod.bag,Q=(Y.inclusive?J.minimum:J.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(Y.value>Q)if(Y.inclusive)J.minimum=Y.value;else J.exclusiveMinimum=Y.value}),$._zod.check=(G)=>{if(Y.inclusive?G.value>=Y.value:G.value>Y.value)return;G.issues.push({origin:X,code:"too_small",minimum:typeof Y.value==="object"?Y.value.getTime():Y.value,input:G.value,inclusive:Y.inclusive,inst:$,continue:!Y.abort})}}),nP0=x0("$ZodCheckMultipleOf",($,Y)=>{U5.init($,Y),$._zod.onattach.push((X)=>{var G;(G=X._zod.bag).multipleOf??(G.multipleOf=Y.value)}),$._zod.check=(X)=>{if(typeof X.value!==typeof Y.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof X.value==="bigint"?X.value%Y.value===BigInt(0):ZP0(X.value,Y.value)===0)return;X.issues.push({origin:typeof X.value,code:"not_multiple_of",divisor:Y.value,input:X.value,inst:$,continue:!Y.abort})}}),rP0=x0("$ZodCheckNumberFormat",($,Y)=>{U5.init($,Y),Y.format=Y.format||"float64";let X=Y.format?.includes("int"),G=X?"int":"number",[J,Q]=FP0[Y.format];$._zod.onattach.push((W)=>{let K=W._zod.bag;if(K.format=Y.format,K.minimum=J,K.maximum=Q,X)K.pattern=uP0}),$._zod.check=(W)=>{let K=W.value;if(X){if(!Number.isInteger(K)){W.issues.push({expected:G,format:Y.format,code:"invalid_type",continue:!1,input:K,inst:$});return}if(!Number.isSafeInteger(K)){if(K>0)W.issues.push({input:K,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:G,inclusive:!0,continue:!Y.abort});else W.issues.push({input:K,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:G,inclusive:!0,continue:!Y.abort});return}}if(K<J)W.issues.push({origin:"number",input:K,code:"too_small",minimum:J,inclusive:!0,inst:$,continue:!Y.abort});if(K>Q)W.issues.push({origin:"number",input:K,code:"too_big",maximum:Q,inclusive:!0,inst:$,continue:!Y.abort})}}),aP0=x0("$ZodCheckBigIntFormat",($,Y)=>{U5.init($,Y);let[X,G]=LP0[Y.format];$._zod.onattach.push((J)=>{let Q=J._zod.bag;Q.format=Y.format,Q.minimum=X,Q.maximum=G}),$._zod.check=(J)=>{let Q=J.value;if(Q<X)J.issues.push({origin:"bigint",input:Q,code:"too_small",minimum:X,inclusive:!0,inst:$,continue:!Y.abort});if(Q>G)J.issues.push({origin:"bigint",input:Q,code:"too_big",maximum:G,inclusive:!0,inst:$,continue:!Y.abort})}}),sP0=x0("$ZodCheckMaxSize",($,Y)=>{var X;U5.init($,Y),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!KL(J)&&J.size!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag.maximum??Number.POSITIVE_INFINITY;if(Y.maximum<J)G._zod.bag.maximum=Y.maximum}),$._zod.check=(G)=>{let J=G.value;if(J.size<=Y.maximum)return;G.issues.push({origin:Zb(J),code:"too_big",maximum:Y.maximum,inclusive:!0,input:J,inst:$,continue:!Y.abort})}}),oP0=x0("$ZodCheckMinSize",($,Y)=>{var X;U5.init($,Y),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!KL(J)&&J.size!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(Y.minimum>J)G._zod.bag.minimum=Y.minimum}),$._zod.check=(G)=>{let J=G.value;if(J.size>=Y.minimum)return;G.issues.push({origin:Zb(J),code:"too_small",minimum:Y.minimum,inclusive:!0,input:J,inst:$,continue:!Y.abort})}}),tP0=x0("$ZodCheckSizeEquals",($,Y)=>{var X;U5.init($,Y),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!KL(J)&&J.size!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag;J.minimum=Y.size,J.maximum=Y.size,J.size=Y.size}),$._zod.check=(G)=>{let J=G.value,Q=J.size;if(Q===Y.size)return;let W=Q>Y.size;G.issues.push({origin:Zb(J),...W?{code:"too_big",maximum:Y.size}:{code:"too_small",minimum:Y.size},inclusive:!0,exact:!0,input:G.value,inst:$,continue:!Y.abort})}}),eP0=x0("$ZodCheckMaxLength",($,Y)=>{var X;U5.init($,Y),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!KL(J)&&J.length!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag.maximum??Number.POSITIVE_INFINITY;if(Y.maximum<J)G._zod.bag.maximum=Y.maximum}),$._zod.check=(G)=>{let J=G.value;if(J.length<=Y.maximum)return;let W=Ub(J);G.issues.push({origin:W,code:"too_big",maximum:Y.maximum,inclusive:!0,input:J,inst:$,continue:!Y.abort})}}),$w0=x0("$ZodCheckMinLength",($,Y)=>{var X;U5.init($,Y),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!KL(J)&&J.length!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(Y.minimum>J)G._zod.bag.minimum=Y.minimum}),$._zod.check=(G)=>{let J=G.value;if(J.length>=Y.minimum)return;let W=Ub(J);G.issues.push({origin:W,code:"too_small",minimum:Y.minimum,inclusive:!0,input:J,inst:$,continue:!Y.abort})}}),Yw0=x0("$ZodCheckLengthEquals",($,Y)=>{var X;U5.init($,Y),(X=$._zod.def).when??(X.when=(G)=>{let J=G.value;return!KL(J)&&J.length!==void 0}),$._zod.onattach.push((G)=>{let J=G._zod.bag;J.minimum=Y.length,J.maximum=Y.length,J.length=Y.length}),$._zod.check=(G)=>{let J=G.value,Q=J.length;if(Q===Y.length)return;let W=Ub(J),K=Q>Y.length;G.issues.push({origin:W,...K?{code:"too_big",maximum:Y.length}:{code:"too_small",minimum:Y.length},inclusive:!0,exact:!0,input:G.value,inst:$,continue:!Y.abort})}}),jw=x0("$ZodCheckStringFormat",($,Y)=>{var X,G;if(U5.init($,Y),$._zod.onattach.push((J)=>{let Q=J._zod.bag;if(Q.format=Y.format,Y.pattern)Q.patterns??(Q.patterns=new Set),Q.patterns.add(Y.pattern)}),Y.pattern)(X=$._zod).check??(X.check=(J)=>{if(Y.pattern.lastIndex=0,Y.pattern.test(J.value))return;J.issues.push({origin:"string",code:"invalid_format",format:Y.format,input:J.value,...Y.pattern?{pattern:Y.pattern.toString()}:{},inst:$,continue:!Y.abort})});else(G=$._zod).check??(G.check=()=>{})}),Xw0=x0("$ZodCheckRegex",($,Y)=>{jw.init($,Y),$._zod.check=(X)=>{if(Y.pattern.lastIndex=0,Y.pattern.test(X.value))return;X.issues.push({origin:"string",code:"invalid_format",format:"regex",input:X.value,pattern:Y.pattern.toString(),inst:$,continue:!Y.abort})}}),Gw0=x0("$ZodCheckLowerCase",($,Y)=>{Y.pattern??(Y.pattern=lP0),jw.init($,Y)}),Jw0=x0("$ZodCheckUpperCase",($,Y)=>{Y.pattern??(Y.pattern=iP0),jw.init($,Y)}),Qw0=x0("$ZodCheckIncludes",($,Y)=>{U5.init($,Y);let X=g2(Y.includes),G=new RegExp(typeof Y.position==="number"?`^.{${Y.position}}${X}`:X);Y.pattern=G,$._zod.onattach.push((J)=>{let Q=J._zod.bag;Q.patterns??(Q.patterns=new Set),Q.patterns.add(G)}),$._zod.check=(J)=>{if(J.value.includes(Y.includes,Y.position))return;J.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:Y.includes,input:J.value,inst:$,continue:!Y.abort})}}),Ww0=x0("$ZodCheckStartsWith",($,Y)=>{U5.init($,Y);let X=new RegExp(`^${g2(Y.prefix)}.*`);Y.pattern??(Y.pattern=X),$._zod.onattach.push((G)=>{let J=G._zod.bag;J.patterns??(J.patterns=new Set),J.patterns.add(X)}),$._zod.check=(G)=>{if(G.value.startsWith(Y.prefix))return;G.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:Y.prefix,input:G.value,inst:$,continue:!Y.abort})}}),Kw0=x0("$ZodCheckEndsWith",($,Y)=>{U5.init($,Y);let X=new RegExp(`.*${g2(Y.suffix)}$`);Y.pattern??(Y.pattern=X),$._zod.onattach.push((G)=>{let J=G._zod.bag;J.patterns??(J.patterns=new Set),J.patterns.add(X)}),$._zod.check=(G)=>{if(G.value.endsWith(Y.suffix))return;G.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:Y.suffix,input:G.value,inst:$,continue:!Y.abort})}});Zw0=x0("$ZodCheckProperty",($,Y)=>{U5.init($,Y),$._zod.check=(X)=>{let G=Y.schema._zod.run({value:X.value[Y.property],issues:[]},{});if(G instanceof Promise)return G.then((J)=>Rh1(J,X,Y.property));Rh1(G,X,Y.property);return}}),Uw0=x0("$ZodCheckMimeType",($,Y)=>{U5.init($,Y);let X=new Set(Y.mime);$._zod.onattach.push((G)=>{G._zod.bag.mime=Y.mime}),$._zod.check=(G)=>{if(X.has(G.value.type))return;G.issues.push({code:"invalid_value",values:Y.mime,input:G.value.type,inst:$,continue:!Y.abort})}}),Hw0=x0("$ZodCheckOverwrite",($,Y)=>{U5.init($,Y),$._zod.check=(X)=>{X.value=Y.tx(X.value)}})});class at{constructor($=[]){if(this.content=[],this.indent=0,this)this.args=$}indented($){this.indent+=1,$(this),this.indent-=1}write($){if(typeof $==="function"){$(this,{execution:"sync"}),$(this,{execution:"async"});return}let X=$.split(`
`).filter((Q)=>Q),G=Math.min(...X.map((Q)=>Q.length-Q.trimStart().length)),J=X.map((Q)=>Q.slice(G)).map((Q)=>" ".repeat(this.indent*2)+Q);for(let Q of J)this.content.push(Q)}compile(){let $=Function,Y=this?.args,G=[...(this?.content??[""]).map((J)=>`  ${J}`)];return new $(...Y,G.join(`
`))}}var zw0;var Vw0=V0(()=>{zw0={major:4,minor:4,patch:3}});function Bw0($){if($==="")return!0;if(/\s/.test($))return!1;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}function gh1($){if(!ct.test($))return!1;let Y=$.replace(/[-_]/g,(G)=>G==="-"?"+":"/"),X=Y.padEnd(Math.ceil(Y.length/4)*4,"=");return Bw0(X)}function mh1($,Y=null){try{let X=$.split(".");if(X.length!==3)return!1;let[G]=X;if(!G)return!1;let J=JSON.parse(atob(G));if("typ"in J&&J?.typ!=="JWT")return!1;if(!J.alg)return!1;if(Y&&(!("alg"in J)||J.alg!==Y))return!1;return!0}catch{return!1}}function wh1($,Y,X){if($.issues.length)Y.issues.push(...KQ(X,$.issues));Y.value[X]=$.value}function et($,Y,X,G,J,Q){let W=X in G;if($.issues.length){if(J&&Q&&!W)return;Y.issues.push(...KQ(X,$.issues))}if(!W&&!J){if(!$.issues.length)Y.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[X]});return}if($.value===void 0){if(W)Y.value[X]=void 0}else Y.value[X]=$.value}function uh1($){let Y=Object.keys($.shape);for(let G of Y)if(!$.shape?.[G]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${G}": expected a Zod schema`);let X=VP0($.shape);return{...$,keys:Y,keySet:new Set(Y),numKeys:Y.length,optionalKeys:new Set(X)}}function ph1($,Y,X,G,J,Q){let W=[],K=J.keySet,Z=J.catchall._zod,H=Z.def.type,z=Z.optin==="optional",V=Z.optout==="optional";for(let F in Y){if(F==="__proto__")continue;if(K.has(F))continue;if(H==="never"){W.push(F);continue}let L=Z.run({value:Y[F],issues:[]},G);if(L instanceof Promise)$.push(L.then((N)=>et(N,X,F,Y,z,V)));else et(L,X,F,Y,z,V)}if(W.length)X.issues.push({code:"unrecognized_keys",keys:W,input:Y,inst:Q});if(!$.length)return X;return Promise.all($).then(()=>{return X})}function _h1($,Y,X,G){for(let Q of $)if(Q.issues.length===0)return Y.value=Q.value,Y;let J=$.filter((Q)=>!HL(Q));if(J.length===1)return Y.value=J[0].value,J[0];return Y.issues.push({code:"invalid_union",input:Y.value,inst:X,errors:$.map((Q)=>Q.issues.map((W)=>gG(W,G,S$())))}),Y}function jh1($,Y,X,G){let J=$.filter((Q)=>Q.issues.length===0);if(J.length===1)return Y.value=J[0].value,Y;if(J.length===0)Y.issues.push({code:"invalid_union",input:Y.value,inst:X,errors:$.map((Q)=>Q.issues.map((W)=>gG(W,G,S$())))});else Y.issues.push({code:"invalid_union",input:Y.value,inst:X,errors:[],inclusive:!1});return Y}function Fw0($,Y){if($===Y)return{valid:!0,data:$};if($ instanceof Date&&Y instanceof Date&&+$===+Y)return{valid:!0,data:$};if(UL($)&&UL(Y)){let X=Object.keys(Y),G=Object.keys($).filter((Q)=>X.indexOf(Q)!==-1),J={...$,...Y};for(let Q of G){let W=Fw0($[Q],Y[Q]);if(!W.valid)return{valid:!1,mergeErrorPath:[Q,...W.mergeErrorPath]};J[Q]=W.data}return{valid:!0,data:J}}if(Array.isArray($)&&Array.isArray(Y)){if($.length!==Y.length)return{valid:!1,mergeErrorPath:[]};let X=[];for(let G=0;G<$.length;G++){let J=$[G],Q=Y[G],W=Fw0(J,Q);if(!W.valid)return{valid:!1,mergeErrorPath:[G,...W.mergeErrorPath]};X.push(W.data)}return{valid:!0,data:X}}return{valid:!1,mergeErrorPath:[]}}function Th1($,Y,X){let G=new Map,J;for(let K of Y.issues)if(K.code==="unrecognized_keys"){J??(J=K);for(let Z of K.keys){if(!G.has(Z))G.set(Z,{});G.get(Z).l=!0}}else $.issues.push(K);for(let K of X.issues)if(K.code==="unrecognized_keys")for(let Z of K.keys){if(!G.has(Z))G.set(Z,{});G.get(Z).r=!0}else $.issues.push(K);let Q=[...G].filter(([,K])=>K.l&&K.r).map(([K])=>K);if(Q.length&&J)$.issues.push({...J,keys:Q});if(HL($))return $;let W=Fw0(Y.value,X.value);if(!W.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(W.mergeErrorPath)}`);return $.value=W.data,$}function Ih1($,Y){for(let X=$.length-1;X>=0;X--)if($[X]._zod[Y]!=="optional")return X+1;return 0}function Ch1($,Y,X){if($.issues.length)Y.issues.push(...KQ(X,$.issues));Y.value[X]=$.value}function Sh1($,Y,X,G,J){for(let Q=0;Q<X.length;Q++){let W=$[Q],K=Q<G.length;if(W.issues.length){if(!K&&Q>=J){Y.value.length=Q;break}Y.issues.push(...KQ(Q,W.issues))}Y.value[Q]=W.value}for(let Q=Y.value.length-1;Q>=G.length;Q--)if(X[Q]._zod.optout==="optional"&&Y.value[Q]===void 0)Y.value.length=Q;else break;return Y}function kh1($,Y,X,G,J,Q,W){if($.issues.length)if(Kb.has(typeof G))X.issues.push(...KQ(G,$.issues));else X.issues.push({code:"invalid_key",origin:"map",input:J,inst:Q,issues:$.issues.map((K)=>gG(K,W,S$()))});if(Y.issues.length)if(Kb.has(typeof G))X.issues.push(...KQ(G,Y.issues));else X.issues.push({origin:"map",code:"invalid_element",input:J,inst:Q,key:G,issues:Y.issues.map((K)=>gG(K,W,S$()))});X.value.set($.value,Y.value)}function vh1($,Y){if($.issues.length)Y.issues.push(...$.issues);Y.value.add($.value)}function xh1($,Y){if(Y===void 0&&($.issues.length||$.fallback))return{issues:[],value:void 0};return $}function yh1($,Y){if($.value===void 0)$.value=Y.defaultValue;return $}function bh1($,Y){if(!$.issues.length&&$.value===void 0)$.issues.push({code:"invalid_type",expected:"nonoptional",input:$.value,inst:Y});return $}function st($,Y,X){if($.issues.length)return $.aborted=!0,$;return Y._zod.run({value:$.value,issues:$.issues,fallback:$.fallback},X)}function ot($,Y,X){if($.issues.length)return $.aborted=!0,$;if((X.direction||"forward")==="forward"){let J=Y.transform($.value,$);if(J instanceof Promise)return J.then((Q)=>tt($,Q,Y.out,X));return tt($,J,Y.out,X)}else{let J=Y.reverseTransform($.value,$);if(J instanceof Promise)return J.then((Q)=>tt($,Q,Y.in,X));return tt($,J,Y.in,X)}}function tt($,Y,X,G){if($.issues.length)return $.aborted=!0,$;return X._zod.run({value:Y,issues:$.issues},G)}function hh1($){return $.value=Object.freeze($.value),$}function fh1($,Y,X,G){if(!$){let J={code:"custom",input:X,inst:G,path:[...G._zod.def.path??[]],continue:!G._zod.def.abort};if(G._zod.def.params)J.params=G._zod.def.params;Y.issues.push(Ew(J))}}var K6,FL,g9,$e,Ye,Xe,Ge,Je,Qe,We,Ke,Ze,Ue,He,Lw0,Dw0,Nw0,Aw0,ze,Ve,Fe,Le,De,Ne,Ae,Be,Oe,Ee,Lb,Me,Tw,Db,Re,qe,Pe,we,_e,je,Te,Ie,Ce,Se,ke,Ow0,Iw,ve,xe,ye,Nb,be,he,fe,ge,me,ue,pe,Ab,de,ce,le,ie,ne,re,ae,se,Bb,Cw,Ew0,oe,te,ee,$00,Y00,X00;var Mw0=V0(()=>{rt();IB();AP0();lt();j4();Vw0();j4();K6=x0("$ZodType",($,Y)=>{var X;$??($={}),$._zod.def=Y,$._zod.bag=$._zod.bag||{},$._zod.version=zw0;let G=[...$._zod.def.checks??[]];if($._zod.traits.has("$ZodCheck"))G.unshift($);for(let J of G)for(let Q of J._zod.onattach)Q($);if(G.length===0)(X=$._zod).deferred??(X.deferred=[]),$._zod.deferred?.push(()=>{$._zod.run=$._zod.parse});else{let J=(W,K,Z)=>{let H=HL(W),z;for(let V of K){if(V._zod.def.when){if(DP0(W))continue;if(!V._zod.def.when(W))continue}else if(H)continue;let F=W.issues.length,L=V._zod.check(W);if(L instanceof Promise&&Z?.async===!1)throw new U3;if(z||L instanceof Promise)z=(z??Promise.resolve()).then(async()=>{if(await L,W.issues.length===F)return;if(!H)H=HL(W,F)});else{if(W.issues.length===F)continue;if(!H)H=HL(W,F)}}if(z)return z.then(()=>{return W});return W},Q=(W,K,Z)=>{if(HL(W))return W.aborted=!0,W;let H=J(K,G,Z);if(H instanceof Promise){if(Z.async===!1)throw new U3;return H.then((z)=>$._zod.parse(z,Z))}return $._zod.parse(H,Z)};$._zod.run=(W,K)=>{if(K.skipChecks)return $._zod.parse(W,K);if(K.direction==="backward"){let H=$._zod.parse({value:W.value,issues:[]},{...K,skipChecks:!0});if(H instanceof Promise)return H.then((z)=>{return Q(z,W,K)});return Q(H,W,K)}let Z=$._zod.parse(W,K);if(Z instanceof Promise){if(K.async===!1)throw new U3;return Z.then((H)=>J(H,G,K))}return J(Z,G,K)}}m6($,"~standard",()=>({validate:(J)=>{try{let Q=zL($,J);return Q.success?{value:Q.data}:{issues:Q.error?.issues}}catch(Q){return VL($,J).then((W)=>W.success?{value:W.data}:{issues:W.error?.issues})}},vendor:"zod",version:1}))}),FL=x0("$ZodString",($,Y)=>{K6.init($,Y),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??gP0($._zod.bag),$._zod.parse=(X,G)=>{if(Y.coerce)try{X.value=String(X.value)}catch(J){}if(typeof X.value==="string")return X;return X.issues.push({expected:"string",code:"invalid_type",input:X.value,inst:$}),X}}),g9=x0("$ZodStringFormat",($,Y)=>{jw.init($,Y),FL.init($,Y)}),$e=x0("$ZodGUID",($,Y)=>{Y.pattern??(Y.pattern=wP0),g9.init($,Y)}),Ye=x0("$ZodUUID",($,Y)=>{if(Y.version){let G={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[Y.version];if(G===void 0)throw Error(`Invalid UUID version: "${Y.version}"`);Y.pattern??(Y.pattern=vB(G))}else Y.pattern??(Y.pattern=vB());g9.init($,Y)}),Xe=x0("$ZodEmail",($,Y)=>{Y.pattern??(Y.pattern=_P0),g9.init($,Y)}),Ge=x0("$ZodURL",($,Y)=>{g9.init($,Y),$._zod.check=(X)=>{try{let G=X.value.trim();if(!Y.normalize&&Y.protocol?.source===xP0.source){if(!/^https?:\/\//i.test(G)){X.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:X.value,inst:$,continue:!Y.abort});return}}let J=new URL(G);if(Y.hostname){if(Y.hostname.lastIndex=0,!Y.hostname.test(J.hostname))X.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Y.hostname.source,input:X.value,inst:$,continue:!Y.abort})}if(Y.protocol){if(Y.protocol.lastIndex=0,!Y.protocol.test(J.protocol.endsWith(":")?J.protocol.slice(0,-1):J.protocol))X.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:Y.protocol.source,input:X.value,inst:$,continue:!Y.abort})}if(Y.normalize)X.value=J.href;else X.value=G;return}catch(G){X.issues.push({code:"invalid_format",format:"url",input:X.value,inst:$,continue:!Y.abort})}}}),Je=x0("$ZodEmoji",($,Y)=>{Y.pattern??(Y.pattern=jP0()),g9.init($,Y)}),Qe=x0("$ZodNanoID",($,Y)=>{Y.pattern??(Y.pattern=qP0),g9.init($,Y)}),We=x0("$ZodCUID",($,Y)=>{Y.pattern??(Y.pattern=BP0),g9.init($,Y)}),Ke=x0("$ZodCUID2",($,Y)=>{Y.pattern??(Y.pattern=OP0),g9.init($,Y)}),Ze=x0("$ZodULID",($,Y)=>{Y.pattern??(Y.pattern=EP0),g9.init($,Y)}),Ue=x0("$ZodXID",($,Y)=>{Y.pattern??(Y.pattern=MP0),g9.init($,Y)}),He=x0("$ZodKSUID",($,Y)=>{Y.pattern??(Y.pattern=RP0),g9.init($,Y)}),Lw0=x0("$ZodISODateTime",($,Y)=>{Y.pattern??(Y.pattern=fP0(Y)),g9.init($,Y)}),Dw0=x0("$ZodISODate",($,Y)=>{Y.pattern??(Y.pattern=bP0),g9.init($,Y)}),Nw0=x0("$ZodISOTime",($,Y)=>{Y.pattern??(Y.pattern=hP0(Y)),g9.init($,Y)}),Aw0=x0("$ZodISODuration",($,Y)=>{Y.pattern??(Y.pattern=PP0),g9.init($,Y)}),ze=x0("$ZodIPv4",($,Y)=>{Y.pattern??(Y.pattern=TP0),g9.init($,Y),$._zod.bag.format="ipv4"}),Ve=x0("$ZodIPv6",($,Y)=>{Y.pattern??(Y.pattern=IP0),g9.init($,Y),$._zod.bag.format="ipv6",$._zod.check=(X)=>{try{new URL(`http://[${X.value}]`)}catch{X.issues.push({code:"invalid_format",format:"ipv6",input:X.value,inst:$,continue:!Y.abort})}}}),Fe=x0("$ZodMAC",($,Y)=>{Y.pattern??(Y.pattern=CP0(Y.delimiter)),g9.init($,Y),$._zod.bag.format="mac"}),Le=x0("$ZodCIDRv4",($,Y)=>{Y.pattern??(Y.pattern=SP0),g9.init($,Y)}),De=x0("$ZodCIDRv6",($,Y)=>{Y.pattern??(Y.pattern=kP0),g9.init($,Y),$._zod.check=(X)=>{let G=X.value.split("/");try{if(G.length!==2)throw Error();let[J,Q]=G;if(!Q)throw Error();let W=Number(Q);if(`${W}`!==Q)throw Error();if(W<0||W>128)throw Error();new URL(`http://[${J}]`)}catch{X.issues.push({code:"invalid_format",format:"cidrv6",input:X.value,inst:$,continue:!Y.abort})}}});Ne=x0("$ZodBase64",($,Y)=>{Y.pattern??(Y.pattern=vP0),g9.init($,Y),$._zod.bag.contentEncoding="base64",$._zod.check=(X)=>{if(Bw0(X.value))return;X.issues.push({code:"invalid_format",format:"base64",input:X.value,inst:$,continue:!Y.abort})}});Ae=x0("$ZodBase64URL",($,Y)=>{Y.pattern??(Y.pattern=ct),g9.init($,Y),$._zod.bag.contentEncoding="base64url",$._zod.check=(X)=>{if(gh1(X.value))return;X.issues.push({code:"invalid_format",format:"base64url",input:X.value,inst:$,continue:!Y.abort})}}),Be=x0("$ZodE164",($,Y)=>{Y.pattern??(Y.pattern=yP0),g9.init($,Y)});Oe=x0("$ZodJWT",($,Y)=>{g9.init($,Y),$._zod.check=(X)=>{if(mh1(X.value,Y.alg))return;X.issues.push({code:"invalid_format",format:"jwt",input:X.value,inst:$,continue:!Y.abort})}}),Ee=x0("$ZodCustomStringFormat",($,Y)=>{g9.init($,Y),$._zod.check=(X)=>{if(Y.fn(X.value))return;X.issues.push({code:"invalid_format",format:Y.format,input:X.value,inst:$,continue:!Y.abort})}}),Lb=x0("$ZodNumber",($,Y)=>{K6.init($,Y),$._zod.pattern=$._zod.bag.pattern??zb,$._zod.parse=(X,G)=>{if(Y.coerce)try{X.value=Number(X.value)}catch(W){}let J=X.value;if(typeof J==="number"&&!Number.isNaN(J)&&Number.isFinite(J))return X;let Q=typeof J==="number"?Number.isNaN(J)?"NaN":!Number.isFinite(J)?"Infinity":void 0:void 0;return X.issues.push({expected:"number",code:"invalid_type",input:J,inst:$,...Q?{received:Q}:{}}),X}}),Me=x0("$ZodNumberFormat",($,Y)=>{rP0.init($,Y),Lb.init($,Y)}),Tw=x0("$ZodBoolean",($,Y)=>{K6.init($,Y),$._zod.pattern=pP0,$._zod.parse=(X,G)=>{if(Y.coerce)try{X.value=Boolean(X.value)}catch(Q){}let J=X.value;if(typeof J==="boolean")return X;return X.issues.push({expected:"boolean",code:"invalid_type",input:J,inst:$}),X}}),Db=x0("$ZodBigInt",($,Y)=>{K6.init($,Y),$._zod.pattern=mP0,$._zod.parse=(X,G)=>{if(Y.coerce)try{X.value=BigInt(X.value)}catch(J){}if(typeof X.value==="bigint")return X;return X.issues.push({expected:"bigint",code:"invalid_type",input:X.value,inst:$}),X}}),Re=x0("$ZodBigIntFormat",($,Y)=>{aP0.init($,Y),Db.init($,Y)}),qe=x0("$ZodSymbol",($,Y)=>{K6.init($,Y),$._zod.parse=(X,G)=>{let J=X.value;if(typeof J==="symbol")return X;return X.issues.push({expected:"symbol",code:"invalid_type",input:J,inst:$}),X}}),Pe=x0("$ZodUndefined",($,Y)=>{K6.init($,Y),$._zod.pattern=cP0,$._zod.values=new Set([void 0]),$._zod.parse=(X,G)=>{let J=X.value;if(typeof J>"u")return X;return X.issues.push({expected:"undefined",code:"invalid_type",input:J,inst:$}),X}}),we=x0("$ZodNull",($,Y)=>{K6.init($,Y),$._zod.pattern=dP0,$._zod.values=new Set([null]),$._zod.parse=(X,G)=>{let J=X.value;if(J===null)return X;return X.issues.push({expected:"null",code:"invalid_type",input:J,inst:$}),X}}),_e=x0("$ZodAny",($,Y)=>{K6.init($,Y),$._zod.parse=(X)=>X}),je=x0("$ZodUnknown",($,Y)=>{K6.init($,Y),$._zod.parse=(X)=>X}),Te=x0("$ZodNever",($,Y)=>{K6.init($,Y),$._zod.parse=(X,G)=>{return X.issues.push({expected:"never",code:"invalid_type",input:X.value,inst:$}),X}}),Ie=x0("$ZodVoid",($,Y)=>{K6.init($,Y),$._zod.parse=(X,G)=>{let J=X.value;if(typeof J>"u")return X;return X.issues.push({expected:"void",code:"invalid_type",input:J,inst:$}),X}}),Ce=x0("$ZodDate",($,Y)=>{K6.init($,Y),$._zod.parse=(X,G)=>{if(Y.coerce)try{X.value=new Date(X.value)}catch(K){}let J=X.value,Q=J instanceof Date;if(Q&&!Number.isNaN(J.getTime()))return X;return X.issues.push({expected:"date",code:"invalid_type",input:J,...Q?{received:"Invalid Date"}:{},inst:$}),X}});Se=x0("$ZodArray",($,Y)=>{K6.init($,Y),$._zod.parse=(X,G)=>{let J=X.value;if(!Array.isArray(J))return X.issues.push({expected:"array",code:"invalid_type",input:J,inst:$}),X;X.value=Array(J.length);let Q=[];for(let W=0;W<J.length;W++){let K=J[W],Z=Y.element._zod.run({value:K,issues:[]},G);if(Z instanceof Promise)Q.push(Z.then((H)=>wh1(H,X,W)));else wh1(Z,X,W)}if(Q.length)return Promise.all(Q).then(()=>X);return X}});ke=x0("$ZodObject",($,Y)=>{if(K6.init($,Y),!Object.getOwnPropertyDescriptor(Y,"shape")?.get){let K=Y.shape;Object.defineProperty(Y,"shape",{get:()=>{let Z={...K};return Object.defineProperty(Y,"shape",{value:Z}),Z}})}let G=Ow(()=>uh1(Y));m6($._zod,"propValues",()=>{let K=Y.shape,Z={};for(let H in K){let z=K[H]._zod;if(z.values){Z[H]??(Z[H]=new Set);for(let V of z.values)Z[H].add(V)}}return Z});let J=CB,Q=Y.catchall,W;$._zod.parse=(K,Z)=>{W??(W=G.value);let H=K.value;if(!J(H))return K.issues.push({expected:"object",code:"invalid_type",input:H,inst:$}),K;K.value={};let z=[],V=W.shape;for(let F of W.keys){let L=V[F],N=L._zod.optin==="optional",D=L._zod.optout==="optional",A=L._zod.run({value:H[F],issues:[]},Z);if(A instanceof Promise)z.push(A.then((B)=>et(B,K,F,H,N,D)));else et(A,K,F,H,N,D)}if(!Q)return z.length?Promise.all(z).then(()=>K):K;return ph1(z,H,K,Z,G.value,$)}}),Ow0=x0("$ZodObjectJIT",($,Y)=>{ke.init($,Y);let X=$._zod.parse,G=Ow(()=>uh1(Y)),J=(F)=>{let L=new at(["shape","payload","ctx"]),N=G.value,D=(E)=>{let M=St(E);return`shape[${M}]._zod.run({ value: input[${M}], issues: [] }, ctx)`};L.write("const input = payload.value;");let A=Object.create(null),B=0;for(let E of N.keys)A[E]=`key_${B++}`;L.write("const newResult = {};");for(let E of N.keys){let M=A[E],R=St(E),q=F[E],_=q?._zod?.optin==="optional",P=q?._zod?.optout==="optional";if(L.write(`const ${M} = ${D(E)};`),_&&P)L.write(`
        if (${M}.issues.length) {
          if (${R} in input) {
            payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
              ...iss,
              path: iss.path ? [${R}, ...iss.path] : [${R}]
            })));
          }
        }
        
        if (${M}.value === undefined) {
          if (${R} in input) {
            newResult[${R}] = undefined;
          }
        } else {
          newResult[${R}] = ${M}.value;
        }
        
      `);else if(!_)L.write(`
        const ${M}_present = ${R} in input;
        if (${M}.issues.length) {
          payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
            ...iss,
            path: iss.path ? [${R}, ...iss.path] : [${R}]
          })));
        }
        if (!${M}_present && !${M}.issues.length) {
          payload.issues.push({
            code: "invalid_type",
            expected: "nonoptional",
            input: undefined,
            path: [${R}]
          });
        }

        if (${M}_present) {
          if (${M}.value === undefined) {
            newResult[${R}] = undefined;
          } else {
            newResult[${R}] = ${M}.value;
          }
        }

      `);else L.write(`
        if (${M}.issues.length) {
          payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
            ...iss,
            path: iss.path ? [${R}, ...iss.path] : [${R}]
          })));
        }
        
        if (${M}.value === undefined) {
          if (${R} in input) {
            newResult[${R}] = undefined;
          }
        } else {
          newResult[${R}] = ${M}.value;
        }
        
      `)}L.write("payload.value = newResult;"),L.write("return payload;");let O=L.compile();return(E,M)=>O(F,E,M)},Q,W=CB,K=!jB.jitless,H=K&&HP0.value,z=Y.catchall,V;$._zod.parse=(F,L)=>{V??(V=G.value);let N=F.value;if(!W(N))return F.issues.push({expected:"object",code:"invalid_type",input:N,inst:$}),F;if(K&&H&&L?.async===!1&&L.jitless!==!0){if(!Q)Q=J(Y.shape);if(F=Q(F,L),!z)return F;return ph1([],N,F,L,V,$)}return X(F,L)}});Iw=x0("$ZodUnion",($,Y)=>{K6.init($,Y),m6($._zod,"optin",()=>Y.options.some((G)=>G._zod.optin==="optional")?"optional":void 0),m6($._zod,"optout",()=>Y.options.some((G)=>G._zod.optout==="optional")?"optional":void 0),m6($._zod,"values",()=>{if(Y.options.every((G)=>G._zod.values))return new Set(Y.options.flatMap((G)=>Array.from(G._zod.values)));return}),m6($._zod,"pattern",()=>{if(Y.options.every((G)=>G._zod.pattern)){let G=Y.options.map((J)=>J._zod.pattern);return new RegExp(`^(${G.map((J)=>Wb(J.source)).join("|")})$`)}return});let X=Y.options.length===1?Y.options[0]._zod.run:null;$._zod.parse=(G,J)=>{if(X)return X(G,J);let Q=!1,W=[];for(let K of Y.options){let Z=K._zod.run({value:G.value,issues:[]},J);if(Z instanceof Promise)W.push(Z),Q=!0;else{if(Z.issues.length===0)return Z;W.push(Z)}}if(!Q)return _h1(W,G,$,J);return Promise.all(W).then((K)=>{return _h1(K,G,$,J)})}});ve=x0("$ZodXor",($,Y)=>{Iw.init($,Y),Y.inclusive=!1;let X=Y.options.length===1?Y.options[0]._zod.run:null;$._zod.parse=(G,J)=>{if(X)return X(G,J);let Q=!1,W=[];for(let K of Y.options){let Z=K._zod.run({value:G.value,issues:[]},J);if(Z instanceof Promise)W.push(Z),Q=!0;else W.push(Z)}if(!Q)return jh1(W,G,$,J);return Promise.all(W).then((K)=>{return jh1(K,G,$,J)})}}),xe=x0("$ZodDiscriminatedUnion",($,Y)=>{Y.inclusive=!1,Iw.init($,Y);let X=$._zod.parse;m6($._zod,"propValues",()=>{let J={};for(let Q of Y.options){let W=Q._zod.propValues;if(!W||Object.keys(W).length===0)throw Error(`Invalid discriminated union option at index "${Y.options.indexOf(Q)}"`);for(let[K,Z]of Object.entries(W)){if(!J[K])J[K]=new Set;for(let H of Z)J[K].add(H)}}return J});let G=Ow(()=>{let J=Y.options,Q=new Map;for(let W of J){let K=W._zod.propValues?.[Y.discriminator];if(!K||K.size===0)throw Error(`Invalid discriminated union option at index "${Y.options.indexOf(W)}"`);for(let Z of K){if(Q.has(Z))throw Error(`Duplicate discriminator value "${String(Z)}"`);Q.set(Z,W)}}return Q});$._zod.parse=(J,Q)=>{let W=J.value;if(!CB(W))return J.issues.push({code:"invalid_type",expected:"object",input:W,inst:$}),J;let K=G.value.get(W?.[Y.discriminator]);if(K)return K._zod.run(J,Q);if(Y.unionFallback||Q.direction==="backward")return X(J,Q);return J.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:Y.discriminator,options:Array.from(G.value.keys()),input:W,path:[Y.discriminator],inst:$}),J}}),ye=x0("$ZodIntersection",($,Y)=>{K6.init($,Y),$._zod.parse=(X,G)=>{let J=X.value,Q=Y.left._zod.run({value:J,issues:[]},G),W=Y.right._zod.run({value:J,issues:[]},G);if(Q instanceof Promise||W instanceof Promise)return Promise.all([Q,W]).then(([Z,H])=>{return Th1(X,Z,H)});return Th1(X,Q,W)}});Nb=x0("$ZodTuple",($,Y)=>{K6.init($,Y);let X=Y.items;$._zod.parse=(G,J)=>{let Q=G.value;if(!Array.isArray(Q))return G.issues.push({input:Q,inst:$,expected:"tuple",code:"invalid_type"}),G;G.value=[];let W=[],K=Ih1(X,"optin"),Z=Ih1(X,"optout");if(!Y.rest){if(Q.length<K)return G.issues.push({code:"too_small",minimum:K,inclusive:!0,input:Q,inst:$,origin:"array"}),G;if(Q.length>X.length)G.issues.push({code:"too_big",maximum:X.length,inclusive:!0,input:Q,inst:$,origin:"array"})}let H=Array(X.length);for(let z=0;z<X.length;z++){let V=X[z]._zod.run({value:Q[z],issues:[]},J);if(V instanceof Promise)W.push(V.then((F)=>{H[z]=F}));else H[z]=V}if(Y.rest){let z=X.length-1,V=Q.slice(X.length);for(let F of V){z++;let L=Y.rest._zod.run({value:F,issues:[]},J);if(L instanceof Promise)W.push(L.then((N)=>Ch1(N,G,z)));else Ch1(L,G,z)}}if(W.length)return Promise.all(W).then(()=>Sh1(H,G,X,Q,Z));return Sh1(H,G,X,Q,Z)}});be=x0("$ZodRecord",($,Y)=>{K6.init($,Y),$._zod.parse=(X,G)=>{let J=X.value;if(!UL(J))return X.issues.push({expected:"record",code:"invalid_type",input:J,inst:$}),X;let Q=[],W=Y.keyType._zod.values;if(W){X.value={};let K=new Set;for(let H of W)if(typeof H==="string"||typeof H==="number"||typeof H==="symbol"){K.add(typeof H==="number"?H.toString():H);let z=Y.keyType._zod.run({value:H,issues:[]},G);if(z instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(z.issues.length){X.issues.push({code:"invalid_key",origin:"record",issues:z.issues.map((L)=>gG(L,G,S$())),input:H,path:[H],inst:$});continue}let V=z.value,F=Y.valueType._zod.run({value:J[H],issues:[]},G);if(F instanceof Promise)Q.push(F.then((L)=>{if(L.issues.length)X.issues.push(...KQ(H,L.issues));X.value[V]=L.value}));else{if(F.issues.length)X.issues.push(...KQ(H,F.issues));X.value[V]=F.value}}let Z;for(let H in J)if(!K.has(H))Z=Z??[],Z.push(H);if(Z&&Z.length>0)X.issues.push({code:"unrecognized_keys",input:J,inst:$,keys:Z})}else{X.value={};for(let K of Reflect.ownKeys(J)){if(K==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(J,K))continue;let Z=Y.keyType._zod.run({value:K,issues:[]},G);if(Z instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof K==="string"&&zb.test(K)&&Z.issues.length){let V=Y.keyType._zod.run({value:Number(K),issues:[]},G);if(V instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(V.issues.length===0)Z=V}if(Z.issues.length){if(Y.mode==="loose")X.value[K]=J[K];else X.issues.push({code:"invalid_key",origin:"record",issues:Z.issues.map((V)=>gG(V,G,S$())),input:K,path:[K],inst:$});continue}let z=Y.valueType._zod.run({value:J[K],issues:[]},G);if(z instanceof Promise)Q.push(z.then((V)=>{if(V.issues.length)X.issues.push(...KQ(K,V.issues));X.value[Z.value]=V.value}));else{if(z.issues.length)X.issues.push(...KQ(K,z.issues));X.value[Z.value]=z.value}}}if(Q.length)return Promise.all(Q).then(()=>X);return X}}),he=x0("$ZodMap",($,Y)=>{K6.init($,Y),$._zod.parse=(X,G)=>{let J=X.value;if(!(J instanceof Map))return X.issues.push({expected:"map",code:"invalid_type",input:J,inst:$}),X;let Q=[];X.value=new Map;for(let[W,K]of J){let Z=Y.keyType._zod.run({value:W,issues:[]},G),H=Y.valueType._zod.run({value:K,issues:[]},G);if(Z instanceof Promise||H instanceof Promise)Q.push(Promise.all([Z,H]).then(([z,V])=>{kh1(z,V,X,W,J,$,G)}));else kh1(Z,H,X,W,J,$,G)}if(Q.length)return Promise.all(Q).then(()=>X);return X}});fe=x0("$ZodSet",($,Y)=>{K6.init($,Y),$._zod.parse=(X,G)=>{let J=X.value;if(!(J instanceof Set))return X.issues.push({input:J,inst:$,expected:"set",code:"invalid_type"}),X;let Q=[];X.value=new Set;for(let W of J){let K=Y.valueType._zod.run({value:W,issues:[]},G);if(K instanceof Promise)Q.push(K.then((Z)=>vh1(Z,X)));else vh1(K,X)}if(Q.length)return Promise.all(Q).then(()=>X);return X}});ge=x0("$ZodEnum",($,Y)=>{K6.init($,Y);let X=Qb(Y.entries),G=new Set(X);$._zod.values=G,$._zod.pattern=new RegExp(`^(${X.filter((J)=>Kb.has(typeof J)).map((J)=>typeof J==="string"?g2(J):J.toString()).join("|")})$`),$._zod.parse=(J,Q)=>{let W=J.value;if(G.has(W))return J;return J.issues.push({code:"invalid_value",values:X,input:W,inst:$}),J}}),me=x0("$ZodLiteral",($,Y)=>{if(K6.init($,Y),Y.values.length===0)throw Error("Cannot create literal schema with no valid values");let X=new Set(Y.values);$._zod.values=X,$._zod.pattern=new RegExp(`^(${Y.values.map((G)=>typeof G==="string"?g2(G):G?g2(G.toString()):String(G)).join("|")})$`),$._zod.parse=(G,J)=>{let Q=G.value;if(X.has(Q))return G;return G.issues.push({code:"invalid_value",values:Y.values,input:Q,inst:$}),G}}),ue=x0("$ZodFile",($,Y)=>{K6.init($,Y),$._zod.parse=(X,G)=>{let J=X.value;if(J instanceof File)return X;return X.issues.push({expected:"file",code:"invalid_type",input:J,inst:$}),X}}),pe=x0("$ZodTransform",($,Y)=>{K6.init($,Y),$._zod.optin="optional",$._zod.parse=(X,G)=>{if(G.direction==="backward")throw new TB($.constructor.name);let J=Y.transform(X.value,X);if(G.async)return(J instanceof Promise?J:Promise.resolve(J)).then((W)=>{return X.value=W,X.fallback=!0,X});if(J instanceof Promise)throw new U3;return X.value=J,X.fallback=!0,X}});Ab=x0("$ZodOptional",($,Y)=>{K6.init($,Y),$._zod.optin="optional",$._zod.optout="optional",m6($._zod,"values",()=>{return Y.innerType._zod.values?new Set([...Y.innerType._zod.values,void 0]):void 0}),m6($._zod,"pattern",()=>{let X=Y.innerType._zod.pattern;return X?new RegExp(`^(${Wb(X.source)})?$`):void 0}),$._zod.parse=(X,G)=>{if(Y.innerType._zod.optin==="optional"){let J=X.value,Q=Y.innerType._zod.run(X,G);if(Q instanceof Promise)return Q.then((W)=>xh1(W,J));return xh1(Q,J)}if(X.value===void 0)return X;return Y.innerType._zod.run(X,G)}}),de=x0("$ZodExactOptional",($,Y)=>{Ab.init($,Y),m6($._zod,"values",()=>Y.innerType._zod.values),m6($._zod,"pattern",()=>Y.innerType._zod.pattern),$._zod.parse=(X,G)=>{return Y.innerType._zod.run(X,G)}}),ce=x0("$ZodNullable",($,Y)=>{K6.init($,Y),m6($._zod,"optin",()=>Y.innerType._zod.optin),m6($._zod,"optout",()=>Y.innerType._zod.optout),m6($._zod,"pattern",()=>{let X=Y.innerType._zod.pattern;return X?new RegExp(`^(${Wb(X.source)}|null)$`):void 0}),m6($._zod,"values",()=>{return Y.innerType._zod.values?new Set([...Y.innerType._zod.values,null]):void 0}),$._zod.parse=(X,G)=>{if(X.value===null)return X;return Y.innerType._zod.run(X,G)}}),le=x0("$ZodDefault",($,Y)=>{K6.init($,Y),$._zod.optin="optional",m6($._zod,"values",()=>Y.innerType._zod.values),$._zod.parse=(X,G)=>{if(G.direction==="backward")return Y.innerType._zod.run(X,G);if(X.value===void 0)return X.value=Y.defaultValue,X;let J=Y.innerType._zod.run(X,G);if(J instanceof Promise)return J.then((Q)=>yh1(Q,Y));return yh1(J,Y)}});ie=x0("$ZodPrefault",($,Y)=>{K6.init($,Y),$._zod.optin="optional",m6($._zod,"values",()=>Y.innerType._zod.values),$._zod.parse=(X,G)=>{if(G.direction==="backward")return Y.innerType._zod.run(X,G);if(X.value===void 0)X.value=Y.defaultValue;return Y.innerType._zod.run(X,G)}}),ne=x0("$ZodNonOptional",($,Y)=>{K6.init($,Y),m6($._zod,"values",()=>{let X=Y.innerType._zod.values;return X?new Set([...X].filter((G)=>G!==void 0)):void 0}),$._zod.parse=(X,G)=>{let J=Y.innerType._zod.run(X,G);if(J instanceof Promise)return J.then((Q)=>bh1(Q,$));return bh1(J,$)}});re=x0("$ZodSuccess",($,Y)=>{K6.init($,Y),$._zod.parse=(X,G)=>{if(G.direction==="backward")throw new TB("ZodSuccess");let J=Y.innerType._zod.run(X,G);if(J instanceof Promise)return J.then((Q)=>{return X.value=Q.issues.length===0,X});return X.value=J.issues.length===0,X}}),ae=x0("$ZodCatch",($,Y)=>{K6.init($,Y),$._zod.optin="optional",m6($._zod,"optout",()=>Y.innerType._zod.optout),m6($._zod,"values",()=>Y.innerType._zod.values),$._zod.parse=(X,G)=>{if(G.direction==="backward")return Y.innerType._zod.run(X,G);let J=Y.innerType._zod.run(X,G);if(J instanceof Promise)return J.then((Q)=>{if(X.value=Q.value,Q.issues.length)X.value=Y.catchValue({...X,error:{issues:Q.issues.map((W)=>gG(W,G,S$()))},input:X.value}),X.issues=[],X.fallback=!0;return X});if(X.value=J.value,J.issues.length)X.value=Y.catchValue({...X,error:{issues:J.issues.map((Q)=>gG(Q,G,S$()))},input:X.value}),X.issues=[],X.fallback=!0;return X}}),se=x0("$ZodNaN",($,Y)=>{K6.init($,Y),$._zod.parse=(X,G)=>{if(typeof X.value!=="number"||!Number.isNaN(X.value))return X.issues.push({input:X.value,inst:$,expected:"nan",code:"invalid_type"}),X;return X}}),Bb=x0("$ZodPipe",($,Y)=>{K6.init($,Y),m6($._zod,"values",()=>Y.in._zod.values),m6($._zod,"optin",()=>Y.in._zod.optin),m6($._zod,"optout",()=>Y.out._zod.optout),m6($._zod,"propValues",()=>Y.in._zod.propValues),$._zod.parse=(X,G)=>{if(G.direction==="backward"){let Q=Y.out._zod.run(X,G);if(Q instanceof Promise)return Q.then((W)=>st(W,Y.in,G));return st(Q,Y.in,G)}let J=Y.in._zod.run(X,G);if(J instanceof Promise)return J.then((Q)=>st(Q,Y.out,G));return st(J,Y.out,G)}});Cw=x0("$ZodCodec",($,Y)=>{K6.init($,Y),m6($._zod,"values",()=>Y.in._zod.values),m6($._zod,"optin",()=>Y.in._zod.optin),m6($._zod,"optout",()=>Y.out._zod.optout),m6($._zod,"propValues",()=>Y.in._zod.propValues),$._zod.parse=(X,G)=>{if((G.direction||"forward")==="forward"){let Q=Y.in._zod.run(X,G);if(Q instanceof Promise)return Q.then((W)=>ot(W,Y,G));return ot(Q,Y,G)}else{let Q=Y.out._zod.run(X,G);if(Q instanceof Promise)return Q.then((W)=>ot(W,Y,G));return ot(Q,Y,G)}}});Ew0=x0("$ZodPreprocess",($,Y)=>{Bb.init($,Y)}),oe=x0("$ZodReadonly",($,Y)=>{K6.init($,Y),m6($._zod,"propValues",()=>Y.innerType._zod.propValues),m6($._zod,"values",()=>Y.innerType._zod.values),m6($._zod,"optin",()=>Y.innerType?._zod?.optin),m6($._zod,"optout",()=>Y.innerType?._zod?.optout),$._zod.parse=(X,G)=>{if(G.direction==="backward")return Y.innerType._zod.run(X,G);let J=Y.innerType._zod.run(X,G);if(J instanceof Promise)return J.then(hh1);return hh1(J)}});te=x0("$ZodTemplateLiteral",($,Y)=>{K6.init($,Y);let X=[];for(let G of Y.parts)if(typeof G==="object"&&G!==null){if(!G._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...G._zod.traits].shift()}`);let J=G._zod.pattern instanceof RegExp?G._zod.pattern.source:G._zod.pattern;if(!J)throw Error(`Invalid template literal part: ${G._zod.traits}`);let Q=J.startsWith("^")?1:0,W=J.endsWith("$")?J.length-1:J.length;X.push(J.slice(Q,W))}else if(G===null||zP0.has(typeof G))X.push(g2(`${G}`));else throw Error(`Invalid template literal part: ${G}`);$._zod.pattern=new RegExp(`^${X.join("")}$`),$._zod.parse=(G,J)=>{if(typeof G.value!=="string")return G.issues.push({input:G.value,inst:$,expected:"string",code:"invalid_type"}),G;if($._zod.pattern.lastIndex=0,!$._zod.pattern.test(G.value))return G.issues.push({input:G.value,inst:$,code:"invalid_format",format:Y.format??"template_literal",pattern:$._zod.pattern.source}),G;return G}}),ee=x0("$ZodFunction",($,Y)=>{return K6.init($,Y),$._def=Y,$._zod.def=Y,$.implement=(X)=>{if(typeof X!=="function")throw Error("implement() must be called with a function");return function(...G){let J=$._def.input?SB($._def.input,G):G,Q=Reflect.apply(X,this,J);if($._def.output)return SB($._def.output,Q);return Q}},$.implementAsync=(X)=>{if(typeof X!=="function")throw Error("implementAsync() must be called with a function");return async function(...G){let J=$._def.input?await kB($._def.input,G):G,Q=await Reflect.apply(X,this,J);if($._def.output)return await kB($._def.output,Q);return Q}},$._zod.parse=(X,G)=>{if(typeof X.value!=="function")return X.issues.push({code:"invalid_type",expected:"function",input:X.value,inst:$}),X;if($._def.output&&$._def.output._zod.def.type==="promise")X.value=$.implementAsync(X.value);else X.value=$.implement(X.value);return X},$.input=(...X)=>{let G=$.constructor;if(Array.isArray(X[0]))return new G({type:"function",input:new Nb({type:"tuple",items:X[0],rest:X[1]}),output:$._def.output});return new G({type:"function",input:X[0],output:$._def.output})},$.output=(X)=>{return new $.constructor({type:"function",input:$._def.input,output:X})},$}),$00=x0("$ZodPromise",($,Y)=>{K6.init($,Y),$._zod.parse=(X,G)=>{return Promise.resolve(X.value).then((J)=>Y.innerType._zod.run({value:J,issues:[]},G))}}),Y00=x0("$ZodLazy",($,Y)=>{K6.init($,Y),m6($._zod,"innerType",()=>{let X=Y;if(!X._cachedInner)X._cachedInner=Y.getter();return X._cachedInner}),m6($._zod,"pattern",()=>$._zod.innerType?._zod?.pattern),m6($._zod,"propValues",()=>$._zod.innerType?._zod?.propValues),m6($._zod,"optin",()=>$._zod.innerType?._zod?.optin??void 0),m6($._zod,"optout",()=>$._zod.innerType?._zod?.optout??void 0),$._zod.parse=(X,G)=>{return $._zod.innerType._zod.run(X,G)}}),X00=x0("$ZodCustom",($,Y)=>{U5.init($,Y),K6.init($,Y),$._zod.parse=(X,G)=>{return X},$._zod.check=(X)=>{let G=X.value,J=Y.fn(G);if(J instanceof Promise)return J.then((Q)=>fh1(Q,X,G,$));fh1(J,X,G,$);return}})});function Rw0(){return{localeError:xW8()}}var xW8=()=>{let $={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function Y(J){return $[J]??null}let X={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${J.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${K}`;return`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${Q}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${K}`}case"invalid_value":if(J.values.length===1)return`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${U1(J.values[0])}`;return`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${J.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${Q} ${J.maximum.toString()} ${W.unit??"\u0639\u0646\u0635\u0631"}`;return`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${J.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${Q} ${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${J.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${Q} ${J.minimum.toString()} ${W.unit}`;return`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${J.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${Q} ${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${J.prefix}"`;if(Q.format==="ends_with")return`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${Q.suffix}"`;if(Q.format==="includes")return`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${Q.includes}"`;if(Q.format==="regex")return`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${Q.pattern}`;return`${X[Q.format]??J.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${J.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${J.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${J.keys.length>1?"\u0629":""}: ${i0(J.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${J.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${J.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};var dh1=V0(()=>{j4()});function qw0(){return{localeError:yW8()}}var yW8=()=>{let $={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function Y(J){return $[J]??null}let X={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${J.expected}, daxil olan ${K}`;return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${Q}, daxil olan ${K}`}case"invalid_value":if(J.values.length===1)return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${U1(J.values[0])}`;return`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${J.origin??"d\u0259y\u0259r"} ${Q}${J.maximum.toString()} ${W.unit??"element"}`;return`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${J.origin??"d\u0259y\u0259r"} ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${J.origin} ${Q}${J.minimum.toString()} ${W.unit}`;return`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${J.origin} ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Yanl\u0131\u015F m\u0259tn: "${Q.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`;if(Q.format==="ends_with")return`Yanl\u0131\u015F m\u0259tn: "${Q.suffix}" il\u0259 bitm\u0259lidir`;if(Q.format==="includes")return`Yanl\u0131\u015F m\u0259tn: "${Q.includes}" daxil olmal\u0131d\u0131r`;if(Q.format==="regex")return`Yanl\u0131\u015F m\u0259tn: ${Q.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`;return`Yanl\u0131\u015F ${X[Q.format]??J.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${J.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${J.keys.length>1?"lar":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`${J.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${J.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};var ch1=V0(()=>{j4()});function lh1($,Y,X,G){let J=Math.abs($),Q=J%10,W=J%100;if(W>=11&&W<=19)return G;if(Q===1)return Y;if(Q>=2&&Q<=4)return X;return G}function Pw0(){return{localeError:bW8()}}var bW8=()=>{let $={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function Y(J){return $[J]??null}let X={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},G={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${J.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${K}`;return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${Q}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${K}`}case"invalid_value":if(J.values.length===1)return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${U1(J.values[0])}`;return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W){let K=Number(J.maximum),Z=lh1(K,W.unit.one,W.unit.few,W.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${J.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${W.verb} ${Q}${J.maximum.toString()} ${Z}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${J.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W){let K=Number(J.minimum),Z=lh1(K,W.unit.one,W.unit.few,W.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${J.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${W.verb} ${Q}${J.minimum.toString()} ${Z}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${J.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${Q.prefix}"`;if(Q.format==="ends_with")return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${Q.suffix}"`;if(Q.format==="includes")return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${Q.includes}"`;if(Q.format==="regex")return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${Q.pattern}`;return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${X[Q.format]??J.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${J.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${J.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${i0(J.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${J.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${J.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};var ih1=V0(()=>{j4()});function ww0(){return{localeError:hW8()}}var hW8=()=>{let $={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function Y(J){return $[J]??null}let X={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},G={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${J.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${K}`;return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${Q}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${K}`}case"invalid_value":if(J.values.length===1)return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${U1(J.values[0])}`;return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${J.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${Q}${J.maximum.toString()} ${W.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`;return`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${J.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${J.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${Q}${J.minimum.toString()} ${W.unit}`;return`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${J.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${Q.prefix}"`;if(Q.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${Q.suffix}"`;if(Q.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${Q.includes}"`;if(Q.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${Q.pattern}`;let W="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";if(Q.format==="emoji")W="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E";if(Q.format==="datetime")W="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E";if(Q.format==="date")W="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430";if(Q.format==="time")W="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E";if(Q.format==="duration")W="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430";return`${W} ${X[Q.format]??J.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${J.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${J.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${J.keys.length>1?"\u043E\u0432\u0435":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${J.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${J.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};var nh1=V0(()=>{j4()});function _w0(){return{localeError:fW8()}}var fW8=()=>{let $={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function Y(J){return $[J]??null}let X={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Tipus inv\xE0lid: s'esperava instanceof ${J.expected}, s'ha rebut ${K}`;return`Tipus inv\xE0lid: s'esperava ${Q}, s'ha rebut ${K}`}case"invalid_value":if(J.values.length===1)return`Valor inv\xE0lid: s'esperava ${U1(J.values[0])}`;return`Opci\xF3 inv\xE0lida: s'esperava una de ${i0(J.values," o ")}`;case"too_big":{let Q=J.inclusive?"com a m\xE0xim":"menys de",W=Y(J.origin);if(W)return`Massa gran: s'esperava que ${J.origin??"el valor"} contingu\xE9s ${Q} ${J.maximum.toString()} ${W.unit??"elements"}`;return`Massa gran: s'esperava que ${J.origin??"el valor"} fos ${Q} ${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?"com a m\xEDnim":"m\xE9s de",W=Y(J.origin);if(W)return`Massa petit: s'esperava que ${J.origin} contingu\xE9s ${Q} ${J.minimum.toString()} ${W.unit}`;return`Massa petit: s'esperava que ${J.origin} fos ${Q} ${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Format inv\xE0lid: ha de comen\xE7ar amb "${Q.prefix}"`;if(Q.format==="ends_with")return`Format inv\xE0lid: ha d'acabar amb "${Q.suffix}"`;if(Q.format==="includes")return`Format inv\xE0lid: ha d'incloure "${Q.includes}"`;if(Q.format==="regex")return`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${Q.pattern}`;return`Format inv\xE0lid per a ${X[Q.format]??J.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${J.divisor}`;case"unrecognized_keys":return`Clau${J.keys.length>1?"s":""} no reconeguda${J.keys.length>1?"s":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${J.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${J.origin}`;default:return"Entrada inv\xE0lida"}}};var rh1=V0(()=>{j4()});function jw0(){return{localeError:gW8()}}var gW8=()=>{let $={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function Y(J){return $[J]??null}let X={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},G={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${J.expected}, obdr\u017Eeno ${K}`;return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${Q}, obdr\u017Eeno ${K}`}case"invalid_value":if(J.values.length===1)return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${U1(J.values[0])}`;return`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${J.origin??"hodnota"} mus\xED m\xEDt ${Q}${J.maximum.toString()} ${W.unit??"prvk\u016F"}`;return`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${J.origin??"hodnota"} mus\xED b\xFDt ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${J.origin??"hodnota"} mus\xED m\xEDt ${Q}${J.minimum.toString()} ${W.unit??"prvk\u016F"}`;return`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${J.origin??"hodnota"} mus\xED b\xFDt ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${Q.prefix}"`;if(Q.format==="ends_with")return`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${Q.suffix}"`;if(Q.format==="includes")return`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${Q.includes}"`;if(Q.format==="regex")return`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${Q.pattern}`;return`Neplatn\xFD form\xE1t ${X[Q.format]??J.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${J.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${i0(J.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${J.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${J.origin}`;default:return"Neplatn\xFD vstup"}}};var ah1=V0(()=>{j4()});function Tw0(){return{localeError:mW8()}}var mW8=()=>{let $={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function Y(J){return $[J]??null}let X={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},G={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Ugyldigt input: forventede instanceof ${J.expected}, fik ${K}`;return`Ugyldigt input: forventede ${Q}, fik ${K}`}case"invalid_value":if(J.values.length===1)return`Ugyldig v\xE6rdi: forventede ${U1(J.values[0])}`;return`Ugyldigt valg: forventede en af f\xF8lgende ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin),K=G[J.origin]??J.origin;if(W)return`For stor: forventede ${K??"value"} ${W.verb} ${Q} ${J.maximum.toString()} ${W.unit??"elementer"}`;return`For stor: forventede ${K??"value"} havde ${Q} ${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin),K=G[J.origin]??J.origin;if(W)return`For lille: forventede ${K} ${W.verb} ${Q} ${J.minimum.toString()} ${W.unit}`;return`For lille: forventede ${K} havde ${Q} ${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Ugyldig streng: skal starte med "${Q.prefix}"`;if(Q.format==="ends_with")return`Ugyldig streng: skal ende med "${Q.suffix}"`;if(Q.format==="includes")return`Ugyldig streng: skal indeholde "${Q.includes}"`;if(Q.format==="regex")return`Ugyldig streng: skal matche m\xF8nsteret ${Q.pattern}`;return`Ugyldig ${X[Q.format]??J.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${J.divisor}`;case"unrecognized_keys":return`${J.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${i0(J.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${J.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${J.origin}`;default:return"Ugyldigt input"}}};var sh1=V0(()=>{j4()});function Iw0(){return{localeError:uW8()}}var uW8=()=>{let $={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function Y(J){return $[J]??null}let X={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},G={nan:"NaN",number:"Zahl",array:"Array"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Ung\xFCltige Eingabe: erwartet instanceof ${J.expected}, erhalten ${K}`;return`Ung\xFCltige Eingabe: erwartet ${Q}, erhalten ${K}`}case"invalid_value":if(J.values.length===1)return`Ung\xFCltige Eingabe: erwartet ${U1(J.values[0])}`;return`Ung\xFCltige Option: erwartet eine von ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Zu gro\xDF: erwartet, dass ${J.origin??"Wert"} ${Q}${J.maximum.toString()} ${W.unit??"Elemente"} hat`;return`Zu gro\xDF: erwartet, dass ${J.origin??"Wert"} ${Q}${J.maximum.toString()} ist`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Zu klein: erwartet, dass ${J.origin} ${Q}${J.minimum.toString()} ${W.unit} hat`;return`Zu klein: erwartet, dass ${J.origin} ${Q}${J.minimum.toString()} ist`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Ung\xFCltiger String: muss mit "${Q.prefix}" beginnen`;if(Q.format==="ends_with")return`Ung\xFCltiger String: muss mit "${Q.suffix}" enden`;if(Q.format==="includes")return`Ung\xFCltiger String: muss "${Q.includes}" enthalten`;if(Q.format==="regex")return`Ung\xFCltiger String: muss dem Muster ${Q.pattern} entsprechen`;return`Ung\xFCltig: ${X[Q.format]??J.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${J.divisor} sein`;case"unrecognized_keys":return`${J.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${i0(J.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${J.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${J.origin}`;default:return"Ung\xFCltige Eingabe"}}};var oh1=V0(()=>{j4()});function Cw0(){return{localeError:pW8()}}var pW8=()=>{let $={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function Y(J){return $[J]??null}let X={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(typeof J.expected==="string"&&/^[A-Z]/.test(J.expected))return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${J.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${K}`;return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${Q}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${K}`}case"invalid_value":if(J.values.length===1)return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${U1(J.values[0])}`;return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${J.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${Q}${J.maximum.toString()} ${W.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`;return`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${J.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${J.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${Q}${J.minimum.toString()} ${W.unit}`;return`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${J.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${Q.prefix}"`;if(Q.format==="ends_with")return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${Q.suffix}"`;if(Q.format==="includes")return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${Q.includes}"`;if(Q.format==="regex")return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${Q.pattern}`;return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${X[Q.format]??J.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${J.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${J.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${J.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${i0(J.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${J.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${J.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};var th1=V0(()=>{j4()});function Ob(){return{localeError:dW8()}}var dW8=()=>{let $={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function Y(J){return $[J]??null}let X={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;return`Invalid input: expected ${Q}, received ${K}`}case"invalid_value":if(J.values.length===1)return`Invalid input: expected ${U1(J.values[0])}`;return`Invalid option: expected one of ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Too big: expected ${J.origin??"value"} to have ${Q}${J.maximum.toString()} ${W.unit??"elements"}`;return`Too big: expected ${J.origin??"value"} to be ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Too small: expected ${J.origin} to have ${Q}${J.minimum.toString()} ${W.unit}`;return`Too small: expected ${J.origin} to be ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Invalid string: must start with "${Q.prefix}"`;if(Q.format==="ends_with")return`Invalid string: must end with "${Q.suffix}"`;if(Q.format==="includes")return`Invalid string: must include "${Q.includes}"`;if(Q.format==="regex")return`Invalid string: must match pattern ${Q.pattern}`;return`Invalid ${X[Q.format]??J.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${J.divisor}`;case"unrecognized_keys":return`Unrecognized key${J.keys.length>1?"s":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`Invalid key in ${J.origin}`;case"invalid_union":if(J.options&&Array.isArray(J.options)&&J.options.length>0)return`Invalid discriminator value. Expected ${J.options.map((W)=>`'${W}'`).join(" | ")}`;return"Invalid input";case"invalid_element":return`Invalid value in ${J.origin}`;default:return"Invalid input"}}};var Sw0=V0(()=>{j4()});function kw0(){return{localeError:cW8()}}var cW8=()=>{let $={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function Y(J){return $[J]??null}let X={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},G={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Nevalida enigo: atendi\u011Dis instanceof ${J.expected}, ricevi\u011Dis ${K}`;return`Nevalida enigo: atendi\u011Dis ${Q}, ricevi\u011Dis ${K}`}case"invalid_value":if(J.values.length===1)return`Nevalida enigo: atendi\u011Dis ${U1(J.values[0])}`;return`Nevalida opcio: atendi\u011Dis unu el ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Tro granda: atendi\u011Dis ke ${J.origin??"valoro"} havu ${Q}${J.maximum.toString()} ${W.unit??"elementojn"}`;return`Tro granda: atendi\u011Dis ke ${J.origin??"valoro"} havu ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Tro malgranda: atendi\u011Dis ke ${J.origin} havu ${Q}${J.minimum.toString()} ${W.unit}`;return`Tro malgranda: atendi\u011Dis ke ${J.origin} estu ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Nevalida karaktraro: devas komenci\u011Di per "${Q.prefix}"`;if(Q.format==="ends_with")return`Nevalida karaktraro: devas fini\u011Di per "${Q.suffix}"`;if(Q.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${Q.includes}"`;if(Q.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${Q.pattern}`;return`Nevalida ${X[Q.format]??J.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${J.divisor}`;case"unrecognized_keys":return`Nekonata${J.keys.length>1?"j":""} \u015Dlosilo${J.keys.length>1?"j":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${J.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${J.origin}`;default:return"Nevalida enigo"}}};var eh1=V0(()=>{j4()});function vw0(){return{localeError:lW8()}}var lW8=()=>{let $={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function Y(J){return $[J]??null}let X={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},G={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Entrada inv\xE1lida: se esperaba instanceof ${J.expected}, recibido ${K}`;return`Entrada inv\xE1lida: se esperaba ${Q}, recibido ${K}`}case"invalid_value":if(J.values.length===1)return`Entrada inv\xE1lida: se esperaba ${U1(J.values[0])}`;return`Opci\xF3n inv\xE1lida: se esperaba una de ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin),K=G[J.origin]??J.origin;if(W)return`Demasiado grande: se esperaba que ${K??"valor"} tuviera ${Q}${J.maximum.toString()} ${W.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${K??"valor"} fuera ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin),K=G[J.origin]??J.origin;if(W)return`Demasiado peque\xF1o: se esperaba que ${K} tuviera ${Q}${J.minimum.toString()} ${W.unit}`;return`Demasiado peque\xF1o: se esperaba que ${K} fuera ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Cadena inv\xE1lida: debe comenzar con "${Q.prefix}"`;if(Q.format==="ends_with")return`Cadena inv\xE1lida: debe terminar en "${Q.suffix}"`;if(Q.format==="includes")return`Cadena inv\xE1lida: debe incluir "${Q.includes}"`;if(Q.format==="regex")return`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${Q.pattern}`;return`Inv\xE1lido ${X[Q.format]??J.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${J.divisor}`;case"unrecognized_keys":return`Llave${J.keys.length>1?"s":""} desconocida${J.keys.length>1?"s":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${G[J.origin]??J.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${G[J.origin]??J.origin}`;default:return"Entrada inv\xE1lida"}}};var $f1=V0(()=>{j4()});function xw0(){return{localeError:iW8()}}var iW8=()=>{let $={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function Y(J){return $[J]??null}let X={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},G={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${J.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${K} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${Q} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${K} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":if(J.values.length===1)return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${U1(J.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`;return`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${i0(J.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${J.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${Q}${J.maximum.toString()} ${W.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`;return`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${J.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${Q}${J.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${J.origin} \u0628\u0627\u06CC\u062F ${Q}${J.minimum.toString()} ${W.unit} \u0628\u0627\u0634\u062F`;return`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${J.origin} \u0628\u0627\u06CC\u062F ${Q}${J.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${Q.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`;if(Q.format==="ends_with")return`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${Q.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`;if(Q.format==="includes")return`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${Q.includes}" \u0628\u0627\u0634\u062F`;if(Q.format==="regex")return`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${Q.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`;return`${X[Q.format]??J.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${J.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${J.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${i0(J.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${J.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${J.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};var Yf1=V0(()=>{j4()});function yw0(){return{localeError:nW8()}}var nW8=()=>{let $={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function Y(J){return $[J]??null}let X={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Virheellinen tyyppi: odotettiin instanceof ${J.expected}, oli ${K}`;return`Virheellinen tyyppi: odotettiin ${Q}, oli ${K}`}case"invalid_value":if(J.values.length===1)return`Virheellinen sy\xF6te: t\xE4ytyy olla ${U1(J.values[0])}`;return`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Liian suuri: ${W.subject} t\xE4ytyy olla ${Q}${J.maximum.toString()} ${W.unit}`.trim();return`Liian suuri: arvon t\xE4ytyy olla ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Liian pieni: ${W.subject} t\xE4ytyy olla ${Q}${J.minimum.toString()} ${W.unit}`.trim();return`Liian pieni: arvon t\xE4ytyy olla ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${Q.prefix}"`;if(Q.format==="ends_with")return`Virheellinen sy\xF6te: t\xE4ytyy loppua "${Q.suffix}"`;if(Q.format==="includes")return`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${Q.includes}"`;if(Q.format==="regex")return`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${Q.pattern}`;return`Virheellinen ${X[Q.format]??J.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${J.divisor} monikerta`;case"unrecognized_keys":return`${J.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${i0(J.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};var Xf1=V0(()=>{j4()});function bw0(){return{localeError:rW8()}}var rW8=()=>{let $={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function Y(J){return $[J]??null}let X={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},G={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Entr\xE9e invalide : instanceof ${J.expected} attendu, ${K} re\xE7u`;return`Entr\xE9e invalide : ${Q} attendu, ${K} re\xE7u`}case"invalid_value":if(J.values.length===1)return`Entr\xE9e invalide : ${U1(J.values[0])} attendu`;return`Option invalide : une valeur parmi ${i0(J.values,"|")} attendue`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Trop grand : ${G[J.origin]??"valeur"} doit ${W.verb} ${Q}${J.maximum.toString()} ${W.unit??"\xE9l\xE9ment(s)"}`;return`Trop grand : ${G[J.origin]??"valeur"} doit \xEAtre ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Trop petit : ${G[J.origin]??"valeur"} doit ${W.verb} ${Q}${J.minimum.toString()} ${W.unit}`;return`Trop petit : ${G[J.origin]??"valeur"} doit \xEAtre ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Cha\xEEne invalide : doit commencer par "${Q.prefix}"`;if(Q.format==="ends_with")return`Cha\xEEne invalide : doit se terminer par "${Q.suffix}"`;if(Q.format==="includes")return`Cha\xEEne invalide : doit inclure "${Q.includes}"`;if(Q.format==="regex")return`Cha\xEEne invalide : doit correspondre au mod\xE8le ${Q.pattern}`;return`${X[Q.format]??J.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${J.divisor}`;case"unrecognized_keys":return`Cl\xE9${J.keys.length>1?"s":""} non reconnue${J.keys.length>1?"s":""} : ${i0(J.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${J.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${J.origin}`;default:return"Entr\xE9e invalide"}}};var Gf1=V0(()=>{j4()});function hw0(){return{localeError:aW8()}}var aW8=()=>{let $={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function Y(J){return $[J]??null}let X={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Entr\xE9e invalide : attendu instanceof ${J.expected}, re\xE7u ${K}`;return`Entr\xE9e invalide : attendu ${Q}, re\xE7u ${K}`}case"invalid_value":if(J.values.length===1)return`Entr\xE9e invalide : attendu ${U1(J.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"\u2264":"<",W=Y(J.origin);if(W)return`Trop grand : attendu que ${J.origin??"la valeur"} ait ${Q}${J.maximum.toString()} ${W.unit}`;return`Trop grand : attendu que ${J.origin??"la valeur"} soit ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?"\u2265":">",W=Y(J.origin);if(W)return`Trop petit : attendu que ${J.origin} ait ${Q}${J.minimum.toString()} ${W.unit}`;return`Trop petit : attendu que ${J.origin} soit ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Cha\xEEne invalide : doit commencer par "${Q.prefix}"`;if(Q.format==="ends_with")return`Cha\xEEne invalide : doit se terminer par "${Q.suffix}"`;if(Q.format==="includes")return`Cha\xEEne invalide : doit inclure "${Q.includes}"`;if(Q.format==="regex")return`Cha\xEEne invalide : doit correspondre au motif ${Q.pattern}`;return`${X[Q.format]??J.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${J.divisor}`;case"unrecognized_keys":return`Cl\xE9${J.keys.length>1?"s":""} non reconnue${J.keys.length>1?"s":""} : ${i0(J.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${J.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${J.origin}`;default:return"Entr\xE9e invalide"}}};var Jf1=V0(()=>{j4()});function fw0(){return{localeError:sW8()}}var sW8=()=>{let $={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},Y={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},X=(H)=>H?$[H]:void 0,G=(H)=>{let z=X(H);if(z)return z.label;return H??$.unknown.label},J=(H)=>`\u05D4${G(H)}`,Q=(H)=>{return(X(H)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA"},W=(H)=>{if(!H)return null;return Y[H]??null},K={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},Z={nan:"NaN"};return(H)=>{switch(H.code){case"invalid_type":{let z=H.expected,V=Z[z??""]??G(z),F=H1(H.input),L=Z[F]??$[F]?.label??F;if(/^[A-Z]/.test(H.expected))return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${H.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${L}`;return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${V}, \u05D4\u05EA\u05E7\u05D1\u05DC ${L}`}case"invalid_value":{if(H.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${U1(H.values[0])}`;let z=H.values.map((L)=>U1(L));if(H.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${z[0]} \u05D0\u05D5 ${z[1]}`;let V=z[z.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${z.slice(0,-1).join(", ")} \u05D0\u05D5 ${V}`}case"too_big":{let z=W(H.origin),V=J(H.origin??"value");if(H.origin==="string")return`${z?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${V} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${H.maximum.toString()} ${z?.unit??""} ${H.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(H.origin==="number"){let N=H.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${H.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${H.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${V} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${N}`}if(H.origin==="array"||H.origin==="set"){let N=H.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",D=H.inclusive?`${H.maximum} ${z?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${H.maximum} ${z?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${V} ${N} \u05DC\u05D4\u05DB\u05D9\u05DC ${D}`.trim()}let F=H.inclusive?"<=":"<",L=Q(H.origin??"value");if(z?.unit)return`${z.longLabel} \u05DE\u05D3\u05D9: ${V} ${L} ${F}${H.maximum.toString()} ${z.unit}`;return`${z?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${V} ${L} ${F}${H.maximum.toString()}`}case"too_small":{let z=W(H.origin),V=J(H.origin??"value");if(H.origin==="string")return`${z?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${V} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${H.minimum.toString()} ${z?.unit??""} ${H.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(H.origin==="number"){let N=H.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${H.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${H.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${V} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${N}`}if(H.origin==="array"||H.origin==="set"){let N=H.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(H.minimum===1&&H.inclusive){let A=H.origin==="set"?"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3":"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3";return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${V} ${N} \u05DC\u05D4\u05DB\u05D9\u05DC ${A}`}let D=H.inclusive?`${H.minimum} ${z?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${H.minimum} ${z?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${V} ${N} \u05DC\u05D4\u05DB\u05D9\u05DC ${D}`.trim()}let F=H.inclusive?">=":">",L=Q(H.origin??"value");if(z?.unit)return`${z.shortLabel} \u05DE\u05D3\u05D9: ${V} ${L} ${F}${H.minimum.toString()} ${z.unit}`;return`${z?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${V} ${L} ${F}${H.minimum.toString()}`}case"invalid_format":{let z=H;if(z.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${z.prefix}"`;if(z.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${z.suffix}"`;if(z.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${z.includes}"`;if(z.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${z.pattern}`;let V=K[z.format],F=V?.label??z.format,N=(V?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${F} \u05DC\u05D0 ${N}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${H.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${H.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${H.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${i0(H.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${J(H.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};var Qf1=V0(()=>{j4()});function gw0(){return{localeError:oW8()}}var oW8=()=>{let $={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function Y(J){return $[J]??null}let X={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},G={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Neispravan unos: o\u010Dekuje se instanceof ${J.expected}, a primljeno je ${K}`;return`Neispravan unos: o\u010Dekuje se ${Q}, a primljeno je ${K}`}case"invalid_value":if(J.values.length===1)return`Neispravna vrijednost: o\u010Dekivano ${U1(J.values[0])}`;return`Neispravna opcija: o\u010Dekivano jedno od ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin),K=G[J.origin]??J.origin;if(W)return`Preveliko: o\u010Dekivano da ${K??"vrijednost"} ima ${Q}${J.maximum.toString()} ${W.unit??"elemenata"}`;return`Preveliko: o\u010Dekivano da ${K??"vrijednost"} bude ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin),K=G[J.origin]??J.origin;if(W)return`Premalo: o\u010Dekivano da ${K} ima ${Q}${J.minimum.toString()} ${W.unit}`;return`Premalo: o\u010Dekivano da ${K} bude ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Neispravan tekst: mora zapo\u010Dinjati s "${Q.prefix}"`;if(Q.format==="ends_with")return`Neispravan tekst: mora zavr\u0161avati s "${Q.suffix}"`;if(Q.format==="includes")return`Neispravan tekst: mora sadr\u017Eavati "${Q.includes}"`;if(Q.format==="regex")return`Neispravan tekst: mora odgovarati uzorku ${Q.pattern}`;return`Neispravna ${X[Q.format]??J.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${J.divisor}`;case"unrecognized_keys":return`Neprepoznat${J.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${i0(J.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${G[J.origin]??J.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${G[J.origin]??J.origin}`;default:return"Neispravan unos"}}};var Wf1=V0(()=>{j4()});function mw0(){return{localeError:tW8()}}var tW8=()=>{let $={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function Y(J){return $[J]??null}let X={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},G={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${J.expected}, a kapott \xE9rt\xE9k ${K}`;return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${Q}, a kapott \xE9rt\xE9k ${K}`}case"invalid_value":if(J.values.length===1)return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${U1(J.values[0])}`;return`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`T\xFAl nagy: ${J.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${Q}${J.maximum.toString()} ${W.unit??"elem"}`;return`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${J.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${J.origin} m\xE9rete t\xFAl kicsi ${Q}${J.minimum.toString()} ${W.unit}`;return`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${J.origin} t\xFAl kicsi ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\xC9rv\xE9nytelen string: "${Q.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`;if(Q.format==="ends_with")return`\xC9rv\xE9nytelen string: "${Q.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`;if(Q.format==="includes")return`\xC9rv\xE9nytelen string: "${Q.includes}" \xE9rt\xE9ket kell tartalmaznia`;if(Q.format==="regex")return`\xC9rv\xE9nytelen string: ${Q.pattern} mint\xE1nak kell megfelelnie`;return`\xC9rv\xE9nytelen ${X[Q.format]??J.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${J.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${J.keys.length>1?"s":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${J.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${J.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};var Kf1=V0(()=>{j4()});function Zf1($,Y,X){return Math.abs($)===1?Y:X}function Sw($){if(!$)return"";let Y=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],X=$[$.length-1];return $+(Y.includes(X)?"\u0576":"\u0568")}function uw0(){return{localeError:eW8()}}var eW8=()=>{let $={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function Y(J){return $[J]??null}let X={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},G={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${J.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${K}`;return`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${Q}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${K}`}case"invalid_value":if(J.values.length===1)return`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${U1(J.values[1])}`;return`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W){let K=Number(J.maximum),Z=Zf1(K,W.unit.one,W.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Sw(J.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${Q}${J.maximum.toString()} ${Z}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Sw(J.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W){let K=Number(J.minimum),Z=Zf1(K,W.unit.one,W.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Sw(J.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${Q}${J.minimum.toString()} ${Z}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Sw(J.origin)} \u056C\u056B\u0576\u056B ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${Q.prefix}"-\u0578\u057E`;if(Q.format==="ends_with")return`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${Q.suffix}"-\u0578\u057E`;if(Q.format==="includes")return`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${Q.includes}"`;if(Q.format==="regex")return`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${Q.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`;return`\u054D\u056D\u0561\u056C ${X[Q.format]??J.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${J.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${J.keys.length>1?"\u0576\u0565\u0580":""}. ${i0(J.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Sw(J.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Sw(J.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};var Uf1=V0(()=>{j4()});function pw0(){return{localeError:$28()}}var $28=()=>{let $={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function Y(J){return $[J]??null}let X={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Input tidak valid: diharapkan instanceof ${J.expected}, diterima ${K}`;return`Input tidak valid: diharapkan ${Q}, diterima ${K}`}case"invalid_value":if(J.values.length===1)return`Input tidak valid: diharapkan ${U1(J.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Terlalu besar: diharapkan ${J.origin??"value"} memiliki ${Q}${J.maximum.toString()} ${W.unit??"elemen"}`;return`Terlalu besar: diharapkan ${J.origin??"value"} menjadi ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Terlalu kecil: diharapkan ${J.origin} memiliki ${Q}${J.minimum.toString()} ${W.unit}`;return`Terlalu kecil: diharapkan ${J.origin} menjadi ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`String tidak valid: harus dimulai dengan "${Q.prefix}"`;if(Q.format==="ends_with")return`String tidak valid: harus berakhir dengan "${Q.suffix}"`;if(Q.format==="includes")return`String tidak valid: harus menyertakan "${Q.includes}"`;if(Q.format==="regex")return`String tidak valid: harus sesuai pola ${Q.pattern}`;return`${X[Q.format]??J.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${J.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${J.keys.length>1?"s":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${J.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${J.origin}`;default:return"Input tidak valid"}}};var Hf1=V0(()=>{j4()});function dw0(){return{localeError:Y28()}}var Y28=()=>{let $={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function Y(J){return $[J]??null}let X={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},G={nan:"NaN",number:"n\xFAmer",array:"fylki"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Rangt gildi: \xDE\xFA sl\xF3st inn ${K} \xFEar sem \xE1 a\xF0 vera instanceof ${J.expected}`;return`Rangt gildi: \xDE\xFA sl\xF3st inn ${K} \xFEar sem \xE1 a\xF0 vera ${Q}`}case"invalid_value":if(J.values.length===1)return`Rangt gildi: gert r\xE1\xF0 fyrir ${U1(J.values[0])}`;return`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${J.origin??"gildi"} hafi ${Q}${J.maximum.toString()} ${W.unit??"hluti"}`;return`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${J.origin??"gildi"} s\xE9 ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${J.origin} hafi ${Q}${J.minimum.toString()} ${W.unit}`;return`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${J.origin} s\xE9 ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${Q.prefix}"`;if(Q.format==="ends_with")return`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${Q.suffix}"`;if(Q.format==="includes")return`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${Q.includes}"`;if(Q.format==="regex")return`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${Q.pattern}`;return`Rangt ${X[Q.format]??J.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${J.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${J.keys.length>1?"ir lyklar":"ur lykill"}: ${i0(J.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${J.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${J.origin}`;default:return"Rangt gildi"}}};var zf1=V0(()=>{j4()});function cw0(){return{localeError:X28()}}var X28=()=>{let $={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function Y(J){return $[J]??null}let X={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},G={nan:"NaN",number:"numero",array:"vettore"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Input non valido: atteso instanceof ${J.expected}, ricevuto ${K}`;return`Input non valido: atteso ${Q}, ricevuto ${K}`}case"invalid_value":if(J.values.length===1)return`Input non valido: atteso ${U1(J.values[0])}`;return`Opzione non valida: atteso uno tra ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Troppo grande: ${J.origin??"valore"} deve avere ${Q}${J.maximum.toString()} ${W.unit??"elementi"}`;return`Troppo grande: ${J.origin??"valore"} deve essere ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Troppo piccolo: ${J.origin} deve avere ${Q}${J.minimum.toString()} ${W.unit}`;return`Troppo piccolo: ${J.origin} deve essere ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Stringa non valida: deve iniziare con "${Q.prefix}"`;if(Q.format==="ends_with")return`Stringa non valida: deve terminare con "${Q.suffix}"`;if(Q.format==="includes")return`Stringa non valida: deve includere "${Q.includes}"`;if(Q.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${Q.pattern}`;return`Input non valido: ${X[Q.format]??J.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${J.divisor}`;case"unrecognized_keys":return`Chiav${J.keys.length>1?"i":"e"} non riconosciut${J.keys.length>1?"e":"a"}: ${i0(J.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${J.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${J.origin}`;default:return"Input non valido"}}};var Vf1=V0(()=>{j4()});function lw0(){return{localeError:G28()}}var G28=()=>{let $={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function Y(J){return $[J]??null}let X={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},G={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u7121\u52B9\u306A\u5165\u529B: instanceof ${J.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${K}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;return`\u7121\u52B9\u306A\u5165\u529B: ${Q}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${K}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":if(J.values.length===1)return`\u7121\u52B9\u306A\u5165\u529B: ${U1(J.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`;return`\u7121\u52B9\u306A\u9078\u629E: ${i0(J.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let Q=J.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",W=Y(J.origin);if(W)return`\u5927\u304D\u3059\u304E\u308B\u5024: ${J.origin??"\u5024"}\u306F${J.maximum.toString()}${W.unit??"\u8981\u7D20"}${Q}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;return`\u5927\u304D\u3059\u304E\u308B\u5024: ${J.origin??"\u5024"}\u306F${J.maximum.toString()}${Q}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let Q=J.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",W=Y(J.origin);if(W)return`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${J.origin}\u306F${J.minimum.toString()}${W.unit}${Q}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;return`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${J.origin}\u306F${J.minimum.toString()}${Q}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${Q.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;if(Q.format==="ends_with")return`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${Q.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;if(Q.format==="includes")return`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${Q.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;if(Q.format==="regex")return`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${Q.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;return`\u7121\u52B9\u306A${X[Q.format]??J.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${J.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${J.keys.length>1?"\u7FA4":""}: ${i0(J.keys,"\u3001")}`;case"invalid_key":return`${J.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${J.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};var Ff1=V0(()=>{j4()});function iw0(){return{localeError:J28()}}var J28=()=>{let $={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function Y(J){return $[J]??null}let X={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},G={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${J.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${K}`;return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${Q}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${K}`}case"invalid_value":if(J.values.length===1)return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${U1(J.values[0])}`;return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${i0(J.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${J.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${W.verb} ${Q}${J.maximum.toString()} ${W.unit}`;return`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${J.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${J.origin} ${W.verb} ${Q}${J.minimum.toString()} ${W.unit}`;return`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${J.origin} \u10D8\u10E7\u10DD\u10E1 ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${Q.prefix}"-\u10D8\u10D7`;if(Q.format==="ends_with")return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${Q.suffix}"-\u10D8\u10D7`;if(Q.format==="includes")return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${Q.includes}"-\u10E1`;if(Q.format==="regex")return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${Q.pattern}`;return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${X[Q.format]??J.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${J.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${J.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${i0(J.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${J.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${J.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};var Lf1=V0(()=>{j4()});function Eb(){return{localeError:Q28()}}var Q28=()=>{let $={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function Y(J){return $[J]??null}let X={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},G={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${J.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${K}`;return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${Q} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${K}`}case"invalid_value":if(J.values.length===1)return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${U1(J.values[0])}`;return`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${J.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${Q} ${J.maximum.toString()} ${W.unit??"\u1792\u17B6\u178F\u17BB"}`;return`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${J.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${Q} ${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${J.origin} ${Q} ${J.minimum.toString()} ${W.unit}`;return`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${J.origin} ${Q} ${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${Q.prefix}"`;if(Q.format==="ends_with")return`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${Q.suffix}"`;if(Q.format==="includes")return`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${Q.includes}"`;if(Q.format==="regex")return`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${Q.pattern}`;return`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${X[Q.format]??J.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${J.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${i0(J.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${J.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${J.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};var nw0=V0(()=>{j4()});function rw0(){return Eb()}var Df1=V0(()=>{nw0()});function aw0(){return{localeError:W28()}}var W28=()=>{let $={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function Y(J){return $[J]??null}let X={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${J.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${K}\uC785\uB2C8\uB2E4`;return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${Q}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${K}\uC785\uB2C8\uB2E4`}case"invalid_value":if(J.values.length===1)return`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${U1(J.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`;return`\uC798\uBABB\uB41C \uC635\uC158: ${i0(J.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let Q=J.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",W=Q==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",K=Y(J.origin),Z=K?.unit??"\uC694\uC18C";if(K)return`${J.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${J.maximum.toString()}${Z} ${Q}${W}`;return`${J.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${J.maximum.toString()} ${Q}${W}`}case"too_small":{let Q=J.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",W=Q==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",K=Y(J.origin),Z=K?.unit??"\uC694\uC18C";if(K)return`${J.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${J.minimum.toString()}${Z} ${Q}${W}`;return`${J.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${J.minimum.toString()} ${Q}${W}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${Q.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`;if(Q.format==="ends_with")return`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${Q.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`;if(Q.format==="includes")return`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${Q.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`;if(Q.format==="regex")return`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${Q.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`;return`\uC798\uBABB\uB41C ${X[Q.format]??J.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${J.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${i0(J.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${J.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${J.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};var Nf1=V0(()=>{j4()});function Af1($){let Y=Math.abs($),X=Y%10,G=Y%100;if(G>=11&&G<=19||X===0)return"many";if(X===1)return"one";return"few"}function sw0(){return{localeError:K28()}}var Mb=($)=>{return $.charAt(0).toUpperCase()+$.slice(1)},K28=()=>{let $={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function Y(J,Q,W,K){let Z=$[J]??null;if(Z===null)return Z;return{unit:Z.unit[Q],verb:Z.verb[K][W?"inclusive":"notInclusive"]}}let X={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},G={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Gautas tipas ${K}, o tik\u0117tasi - instanceof ${J.expected}`;return`Gautas tipas ${K}, o tik\u0117tasi - ${Q}`}case"invalid_value":if(J.values.length===1)return`Privalo b\u016Bti ${U1(J.values[0])}`;return`Privalo b\u016Bti vienas i\u0161 ${i0(J.values,"|")} pasirinkim\u0173`;case"too_big":{let Q=G[J.origin]??J.origin,W=Y(J.origin,Af1(Number(J.maximum)),J.inclusive??!1,"smaller");if(W?.verb)return`${Mb(Q??J.origin??"reik\u0161m\u0117")} ${W.verb} ${J.maximum.toString()} ${W.unit??"element\u0173"}`;let K=J.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Mb(Q??J.origin??"reik\u0161m\u0117")} turi b\u016Bti ${K} ${J.maximum.toString()} ${W?.unit}`}case"too_small":{let Q=G[J.origin]??J.origin,W=Y(J.origin,Af1(Number(J.minimum)),J.inclusive??!1,"bigger");if(W?.verb)return`${Mb(Q??J.origin??"reik\u0161m\u0117")} ${W.verb} ${J.minimum.toString()} ${W.unit??"element\u0173"}`;let K=J.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Mb(Q??J.origin??"reik\u0161m\u0117")} turi b\u016Bti ${K} ${J.minimum.toString()} ${W?.unit}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Eilut\u0117 privalo prasid\u0117ti "${Q.prefix}"`;if(Q.format==="ends_with")return`Eilut\u0117 privalo pasibaigti "${Q.suffix}"`;if(Q.format==="includes")return`Eilut\u0117 privalo \u012Ftraukti "${Q.includes}"`;if(Q.format==="regex")return`Eilut\u0117 privalo atitikti ${Q.pattern}`;return`Neteisingas ${X[Q.format]??J.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${J.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${J.keys.length>1?"i":"as"} rakt${J.keys.length>1?"ai":"as"}: ${i0(J.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let Q=G[J.origin]??J.origin;return`${Mb(Q??J.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};var Bf1=V0(()=>{j4()});function ow0(){return{localeError:Z28()}}var Z28=()=>{let $={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function Y(J){return $[J]??null}let X={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},G={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${J.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${K}`;return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${Q}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${K}`}case"invalid_value":if(J.values.length===1)return`Invalid input: expected ${U1(J.values[0])}`;return`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${J.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${Q}${J.maximum.toString()} ${W.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`;return`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${J.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${J.origin} \u0434\u0430 \u0438\u043C\u0430 ${Q}${J.minimum.toString()} ${W.unit}`;return`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${J.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${Q.prefix}"`;if(Q.format==="ends_with")return`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${Q.suffix}"`;if(Q.format==="includes")return`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${Q.includes}"`;if(Q.format==="regex")return`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${Q.pattern}`;return`Invalid ${X[Q.format]??J.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${J.divisor}`;case"unrecognized_keys":return`${J.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${i0(J.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${J.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${J.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};var Of1=V0(()=>{j4()});function tw0(){return{localeError:U28()}}var U28=()=>{let $={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function Y(J){return $[J]??null}let X={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},G={nan:"NaN",number:"nombor"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Input tidak sah: dijangka instanceof ${J.expected}, diterima ${K}`;return`Input tidak sah: dijangka ${Q}, diterima ${K}`}case"invalid_value":if(J.values.length===1)return`Input tidak sah: dijangka ${U1(J.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Terlalu besar: dijangka ${J.origin??"nilai"} ${W.verb} ${Q}${J.maximum.toString()} ${W.unit??"elemen"}`;return`Terlalu besar: dijangka ${J.origin??"nilai"} adalah ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Terlalu kecil: dijangka ${J.origin} ${W.verb} ${Q}${J.minimum.toString()} ${W.unit}`;return`Terlalu kecil: dijangka ${J.origin} adalah ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`String tidak sah: mesti bermula dengan "${Q.prefix}"`;if(Q.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${Q.suffix}"`;if(Q.format==="includes")return`String tidak sah: mesti mengandungi "${Q.includes}"`;if(Q.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${Q.pattern}`;return`${X[Q.format]??J.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${J.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${i0(J.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${J.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${J.origin}`;default:return"Input tidak sah"}}};var Ef1=V0(()=>{j4()});function ew0(){return{localeError:H28()}}var H28=()=>{let $={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function Y(J){return $[J]??null}let X={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},G={nan:"NaN",number:"getal"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Ongeldige invoer: verwacht instanceof ${J.expected}, ontving ${K}`;return`Ongeldige invoer: verwacht ${Q}, ontving ${K}`}case"invalid_value":if(J.values.length===1)return`Ongeldige invoer: verwacht ${U1(J.values[0])}`;return`Ongeldige optie: verwacht \xE9\xE9n van ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin),K=J.origin==="date"?"laat":J.origin==="string"?"lang":"groot";if(W)return`Te ${K}: verwacht dat ${J.origin??"waarde"} ${Q}${J.maximum.toString()} ${W.unit??"elementen"} ${W.verb}`;return`Te ${K}: verwacht dat ${J.origin??"waarde"} ${Q}${J.maximum.toString()} is`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin),K=J.origin==="date"?"vroeg":J.origin==="string"?"kort":"klein";if(W)return`Te ${K}: verwacht dat ${J.origin} ${Q}${J.minimum.toString()} ${W.unit} ${W.verb}`;return`Te ${K}: verwacht dat ${J.origin} ${Q}${J.minimum.toString()} is`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Ongeldige tekst: moet met "${Q.prefix}" beginnen`;if(Q.format==="ends_with")return`Ongeldige tekst: moet op "${Q.suffix}" eindigen`;if(Q.format==="includes")return`Ongeldige tekst: moet "${Q.includes}" bevatten`;if(Q.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${Q.pattern}`;return`Ongeldig: ${X[Q.format]??J.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${J.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${J.keys.length>1?"s":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${J.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${J.origin}`;default:return"Ongeldige invoer"}}};var Mf1=V0(()=>{j4()});function $_0(){return{localeError:z28()}}var z28=()=>{let $={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function Y(J){return $[J]??null}let X={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},G={nan:"NaN",number:"tall",array:"liste"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Ugyldig input: forventet instanceof ${J.expected}, fikk ${K}`;return`Ugyldig input: forventet ${Q}, fikk ${K}`}case"invalid_value":if(J.values.length===1)return`Ugyldig verdi: forventet ${U1(J.values[0])}`;return`Ugyldig valg: forventet en av ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`For stor(t): forventet ${J.origin??"value"} til \xE5 ha ${Q}${J.maximum.toString()} ${W.unit??"elementer"}`;return`For stor(t): forventet ${J.origin??"value"} til \xE5 ha ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`For lite(n): forventet ${J.origin} til \xE5 ha ${Q}${J.minimum.toString()} ${W.unit}`;return`For lite(n): forventet ${J.origin} til \xE5 ha ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Ugyldig streng: m\xE5 starte med "${Q.prefix}"`;if(Q.format==="ends_with")return`Ugyldig streng: m\xE5 ende med "${Q.suffix}"`;if(Q.format==="includes")return`Ugyldig streng: m\xE5 inneholde "${Q.includes}"`;if(Q.format==="regex")return`Ugyldig streng: m\xE5 matche m\xF8nsteret ${Q.pattern}`;return`Ugyldig ${X[Q.format]??J.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${J.divisor}`;case"unrecognized_keys":return`${J.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${i0(J.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${J.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${J.origin}`;default:return"Ugyldig input"}}};var Rf1=V0(()=>{j4()});function Y_0(){return{localeError:V28()}}var V28=()=>{let $={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function Y(J){return $[J]??null}let X={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},G={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`F\xE2sit giren: umulan instanceof ${J.expected}, al\u0131nan ${K}`;return`F\xE2sit giren: umulan ${Q}, al\u0131nan ${K}`}case"invalid_value":if(J.values.length===1)return`F\xE2sit giren: umulan ${U1(J.values[0])}`;return`F\xE2sit tercih: m\xFBteberler ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Fazla b\xFCy\xFCk: ${J.origin??"value"}, ${Q}${J.maximum.toString()} ${W.unit??"elements"} sahip olmal\u0131yd\u0131.`;return`Fazla b\xFCy\xFCk: ${J.origin??"value"}, ${Q}${J.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Fazla k\xFC\xE7\xFCk: ${J.origin}, ${Q}${J.minimum.toString()} ${W.unit} sahip olmal\u0131yd\u0131.`;return`Fazla k\xFC\xE7\xFCk: ${J.origin}, ${Q}${J.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`F\xE2sit metin: "${Q.prefix}" ile ba\u015Flamal\u0131.`;if(Q.format==="ends_with")return`F\xE2sit metin: "${Q.suffix}" ile bitmeli.`;if(Q.format==="includes")return`F\xE2sit metin: "${Q.includes}" ihtiv\xE2 etmeli.`;if(Q.format==="regex")return`F\xE2sit metin: ${Q.pattern} nak\u015F\u0131na uymal\u0131.`;return`F\xE2sit ${X[Q.format]??J.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${J.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${J.keys.length>1?"s":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`${J.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${J.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};var qf1=V0(()=>{j4()});function X_0(){return{localeError:F28()}}var F28=()=>{let $={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function Y(J){return $[J]??null}let X={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},G={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${J.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${K} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${Q} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${K} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":if(J.values.length===1)return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${U1(J.values[0])} \u0648\u0627\u06CC`;return`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${i0(J.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${J.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${Q}${J.maximum.toString()} ${W.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`;return`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${J.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${Q}${J.maximum.toString()} \u0648\u064A`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${J.origin} \u0628\u0627\u06CC\u062F ${Q}${J.minimum.toString()} ${W.unit} \u0648\u0644\u0631\u064A`;return`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${J.origin} \u0628\u0627\u06CC\u062F ${Q}${J.minimum.toString()} \u0648\u064A`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${Q.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`;if(Q.format==="ends_with")return`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${Q.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`;if(Q.format==="includes")return`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${Q.includes}" \u0648\u0644\u0631\u064A`;if(Q.format==="regex")return`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${Q.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`;return`${X[Q.format]??J.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${J.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${J.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${i0(J.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${J.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${J.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};var Pf1=V0(()=>{j4()});function G_0(){return{localeError:L28()}}var L28=()=>{let $={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function Y(J){return $[J]??null}let X={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},G={nan:"NaN",number:"liczba",array:"tablica"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${J.expected}, otrzymano ${K}`;return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${Q}, otrzymano ${K}`}case"invalid_value":if(J.values.length===1)return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${U1(J.values[0])}`;return`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${J.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${Q}${J.maximum.toString()} ${W.unit??"element\xF3w"}`;return`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${J.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${J.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${Q}${J.minimum.toString()} ${W.unit??"element\xF3w"}`;return`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${J.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${Q.prefix}"`;if(Q.format==="ends_with")return`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${Q.suffix}"`;if(Q.format==="includes")return`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${Q.includes}"`;if(Q.format==="regex")return`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${Q.pattern}`;return`Nieprawid\u0142ow(y/a/e) ${X[Q.format]??J.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${J.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${J.keys.length>1?"s":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${J.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${J.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};var wf1=V0(()=>{j4()});function J_0(){return{localeError:D28()}}var D28=()=>{let $={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function Y(J){return $[J]??null}let X={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},G={nan:"NaN",number:"n\xFAmero",null:"nulo"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Tipo inv\xE1lido: esperado instanceof ${J.expected}, recebido ${K}`;return`Tipo inv\xE1lido: esperado ${Q}, recebido ${K}`}case"invalid_value":if(J.values.length===1)return`Entrada inv\xE1lida: esperado ${U1(J.values[0])}`;return`Op\xE7\xE3o inv\xE1lida: esperada uma das ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Muito grande: esperado que ${J.origin??"valor"} tivesse ${Q}${J.maximum.toString()} ${W.unit??"elementos"}`;return`Muito grande: esperado que ${J.origin??"valor"} fosse ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Muito pequeno: esperado que ${J.origin} tivesse ${Q}${J.minimum.toString()} ${W.unit}`;return`Muito pequeno: esperado que ${J.origin} fosse ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Texto inv\xE1lido: deve come\xE7ar com "${Q.prefix}"`;if(Q.format==="ends_with")return`Texto inv\xE1lido: deve terminar com "${Q.suffix}"`;if(Q.format==="includes")return`Texto inv\xE1lido: deve incluir "${Q.includes}"`;if(Q.format==="regex")return`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${Q.pattern}`;return`${X[Q.format]??J.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${J.divisor}`;case"unrecognized_keys":return`Chave${J.keys.length>1?"s":""} desconhecida${J.keys.length>1?"s":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${J.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${J.origin}`;default:return"Campo inv\xE1lido"}}};var _f1=V0(()=>{j4()});function Q_0(){return{localeError:N28()}}var N28=()=>{let $={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function Y(J){return $[J]??null}let X={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},G={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;return`Intrare invalid\u0103: a\u0219teptat ${Q}, primit ${K}`}case"invalid_value":if(J.values.length===1)return`Intrare invalid\u0103: a\u0219teptat ${U1(J.values[0])}`;return`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Prea mare: a\u0219teptat ca ${J.origin??"valoarea"} ${W.verb} ${Q}${J.maximum.toString()} ${W.unit??"elemente"}`;return`Prea mare: a\u0219teptat ca ${J.origin??"valoarea"} s\u0103 fie ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Prea mic: a\u0219teptat ca ${J.origin} ${W.verb} ${Q}${J.minimum.toString()} ${W.unit}`;return`Prea mic: a\u0219teptat ca ${J.origin} s\u0103 fie ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${Q.prefix}"`;if(Q.format==="ends_with")return`\u0218ir invalid: trebuie s\u0103 se termine cu "${Q.suffix}"`;if(Q.format==="includes")return`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${Q.includes}"`;if(Q.format==="regex")return`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${Q.pattern}`;return`Format invalid: ${X[Q.format]??J.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${J.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${i0(J.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${J.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${J.origin}`;default:return"Intrare invalid\u0103"}}};var jf1=V0(()=>{j4()});function Tf1($,Y,X,G){let J=Math.abs($),Q=J%10,W=J%100;if(W>=11&&W<=19)return G;if(Q===1)return Y;if(Q>=2&&Q<=4)return X;return G}function W_0(){return{localeError:A28()}}var A28=()=>{let $={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function Y(J){return $[J]??null}let X={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},G={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${J.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${K}`;return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${Q}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${K}`}case"invalid_value":if(J.values.length===1)return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${U1(J.values[0])}`;return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W){let K=Number(J.maximum),Z=Tf1(K,W.unit.one,W.unit.few,W.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${J.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${Q}${J.maximum.toString()} ${Z}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${J.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W){let K=Number(J.minimum),Z=Tf1(K,W.unit.one,W.unit.few,W.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${J.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${Q}${J.minimum.toString()} ${Z}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${J.origin} \u0431\u0443\u0434\u0435\u0442 ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${Q.prefix}"`;if(Q.format==="ends_with")return`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${Q.suffix}"`;if(Q.format==="includes")return`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${Q.includes}"`;if(Q.format==="regex")return`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${Q.pattern}`;return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${X[Q.format]??J.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${J.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${J.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${J.keys.length>1?"\u0438":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${J.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${J.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};var If1=V0(()=>{j4()});function K_0(){return{localeError:B28()}}var B28=()=>{let $={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function Y(J){return $[J]??null}let X={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},G={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Neveljaven vnos: pri\u010Dakovano instanceof ${J.expected}, prejeto ${K}`;return`Neveljaven vnos: pri\u010Dakovano ${Q}, prejeto ${K}`}case"invalid_value":if(J.values.length===1)return`Neveljaven vnos: pri\u010Dakovano ${U1(J.values[0])}`;return`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Preveliko: pri\u010Dakovano, da bo ${J.origin??"vrednost"} imelo ${Q}${J.maximum.toString()} ${W.unit??"elementov"}`;return`Preveliko: pri\u010Dakovano, da bo ${J.origin??"vrednost"} ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Premajhno: pri\u010Dakovano, da bo ${J.origin} imelo ${Q}${J.minimum.toString()} ${W.unit}`;return`Premajhno: pri\u010Dakovano, da bo ${J.origin} ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Neveljaven niz: mora se za\u010Deti z "${Q.prefix}"`;if(Q.format==="ends_with")return`Neveljaven niz: mora se kon\u010Dati z "${Q.suffix}"`;if(Q.format==="includes")return`Neveljaven niz: mora vsebovati "${Q.includes}"`;if(Q.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${Q.pattern}`;return`Neveljaven ${X[Q.format]??J.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${J.divisor}`;case"unrecognized_keys":return`Neprepoznan${J.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${i0(J.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${J.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${J.origin}`;default:return"Neveljaven vnos"}}};var Cf1=V0(()=>{j4()});function Z_0(){return{localeError:O28()}}var O28=()=>{let $={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function Y(J){return $[J]??null}let X={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},G={nan:"NaN",number:"antal",array:"lista"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${J.expected}, fick ${K}`;return`Ogiltig inmatning: f\xF6rv\xE4ntat ${Q}, fick ${K}`}case"invalid_value":if(J.values.length===1)return`Ogiltig inmatning: f\xF6rv\xE4ntat ${U1(J.values[0])}`;return`Ogiltigt val: f\xF6rv\xE4ntade en av ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`F\xF6r stor(t): f\xF6rv\xE4ntade ${J.origin??"v\xE4rdet"} att ha ${Q}${J.maximum.toString()} ${W.unit??"element"}`;return`F\xF6r stor(t): f\xF6rv\xE4ntat ${J.origin??"v\xE4rdet"} att ha ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`F\xF6r lite(t): f\xF6rv\xE4ntade ${J.origin??"v\xE4rdet"} att ha ${Q}${J.minimum.toString()} ${W.unit}`;return`F\xF6r lite(t): f\xF6rv\xE4ntade ${J.origin??"v\xE4rdet"} att ha ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${Q.prefix}"`;if(Q.format==="ends_with")return`Ogiltig str\xE4ng: m\xE5ste sluta med "${Q.suffix}"`;if(Q.format==="includes")return`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${Q.includes}"`;if(Q.format==="regex")return`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${Q.pattern}"`;return`Ogiltig(t) ${X[Q.format]??J.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${J.divisor}`;case"unrecognized_keys":return`${J.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${i0(J.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${J.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${J.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};var Sf1=V0(()=>{j4()});function U_0(){return{localeError:E28()}}var E28=()=>{let $={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function Y(J){return $[J]??null}let X={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},G={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${J.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${K}`;return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Q}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${K}`}case"invalid_value":if(J.values.length===1)return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${U1(J.values[0])}`;return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i0(J.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${J.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${Q}${J.maximum.toString()} ${W.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;return`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${J.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${Q}${J.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${J.origin} ${Q}${J.minimum.toString()} ${W.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;return`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${J.origin} ${Q}${J.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${Q.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;if(Q.format==="ends_with")return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${Q.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;if(Q.format==="includes")return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${Q.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;if(Q.format==="regex")return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${Q.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${X[Q.format]??J.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${J.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${J.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`${J.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${J.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};var kf1=V0(()=>{j4()});function H_0(){return{localeError:M28()}}var M28=()=>{let $={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function Y(J){return $[J]??null}let X={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},G={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${J.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${K}`;return`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${Q} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${K}`}case"invalid_value":if(J.values.length===1)return`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${U1(J.values[0])}`;return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",W=Y(J.origin);if(W)return`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${J.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${Q} ${J.maximum.toString()} ${W.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`;return`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${J.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${Q} ${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",W=Y(J.origin);if(W)return`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${J.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${Q} ${J.minimum.toString()} ${W.unit}`;return`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${J.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${Q} ${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${Q.prefix}"`;if(Q.format==="ends_with")return`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${Q.suffix}"`;if(Q.format==="includes")return`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${Q.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`;if(Q.format==="regex")return`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${Q.pattern}`;return`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${X[Q.format]??J.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${J.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${i0(J.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${J.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${J.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};var vf1=V0(()=>{j4()});function z_0(){return{localeError:R28()}}var R28=()=>{let $={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function Y(J){return $[J]??null}let X={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${J.expected}, al\u0131nan ${K}`;return`Ge\xE7ersiz de\u011Fer: beklenen ${Q}, al\u0131nan ${K}`}case"invalid_value":if(J.values.length===1)return`Ge\xE7ersiz de\u011Fer: beklenen ${U1(J.values[0])}`;return`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\xC7ok b\xFCy\xFCk: beklenen ${J.origin??"de\u011Fer"} ${Q}${J.maximum.toString()} ${W.unit??"\xF6\u011Fe"}`;return`\xC7ok b\xFCy\xFCk: beklenen ${J.origin??"de\u011Fer"} ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\xC7ok k\xFC\xE7\xFCk: beklenen ${J.origin} ${Q}${J.minimum.toString()} ${W.unit}`;return`\xC7ok k\xFC\xE7\xFCk: beklenen ${J.origin} ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Ge\xE7ersiz metin: "${Q.prefix}" ile ba\u015Flamal\u0131`;if(Q.format==="ends_with")return`Ge\xE7ersiz metin: "${Q.suffix}" ile bitmeli`;if(Q.format==="includes")return`Ge\xE7ersiz metin: "${Q.includes}" i\xE7ermeli`;if(Q.format==="regex")return`Ge\xE7ersiz metin: ${Q.pattern} desenine uymal\u0131`;return`Ge\xE7ersiz ${X[Q.format]??J.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${J.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${J.keys.length>1?"lar":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`${J.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${J.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};var xf1=V0(()=>{j4()});function Rb(){return{localeError:q28()}}var q28=()=>{let $={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function Y(J){return $[J]??null}let X={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},G={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${J.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${K}`;return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${Q}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${K}`}case"invalid_value":if(J.values.length===1)return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${U1(J.values[0])}`;return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${J.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${W.verb} ${Q}${J.maximum.toString()} ${W.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`;return`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${J.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${J.origin} ${W.verb} ${Q}${J.minimum.toString()} ${W.unit}`;return`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${J.origin} \u0431\u0443\u0434\u0435 ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${Q.prefix}"`;if(Q.format==="ends_with")return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${Q.suffix}"`;if(Q.format==="includes")return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${Q.includes}"`;if(Q.format==="regex")return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${Q.pattern}`;return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${X[Q.format]??J.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${J.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${J.keys.length>1?"\u0456":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${J.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${J.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};var V_0=V0(()=>{j4()});function F_0(){return Rb()}var yf1=V0(()=>{V_0()});function L_0(){return{localeError:P28()}}var P28=()=>{let $={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function Y(J){return $[J]??null}let X={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},G={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${J.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${K} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${Q} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${K} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":if(J.values.length===1)return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${U1(J.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;return`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${i0(J.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u0628\u06C1\u062A \u0628\u0691\u0627: ${J.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${Q}${J.maximum.toString()} ${W.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`;return`\u0628\u06C1\u062A \u0628\u0691\u0627: ${J.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${Q}${J.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${J.origin} \u06A9\u06D2 ${Q}${J.minimum.toString()} ${W.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`;return`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${J.origin} \u06A9\u0627 ${Q}${J.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${Q.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;if(Q.format==="ends_with")return`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${Q.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;if(Q.format==="includes")return`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${Q.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;if(Q.format==="regex")return`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${Q.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;return`\u063A\u0644\u0637 ${X[Q.format]??J.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${J.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${J.keys.length>1?"\u0632":""}: ${i0(J.keys,"\u060C ")}`;case"invalid_key":return`${J.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${J.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};var bf1=V0(()=>{j4()});function D_0(){return{localeError:w28()}}var w28=()=>{let $={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function Y(J){return $[J]??null}let X={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},G={nan:"NaN",number:"raqam",array:"massiv"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${J.expected}, qabul qilingan ${K}`;return`Noto\u2018g\u2018ri kirish: kutilgan ${Q}, qabul qilingan ${K}`}case"invalid_value":if(J.values.length===1)return`Noto\u2018g\u2018ri kirish: kutilgan ${U1(J.values[0])}`;return`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Juda katta: kutilgan ${J.origin??"qiymat"} ${Q}${J.maximum.toString()} ${W.unit} ${W.verb}`;return`Juda katta: kutilgan ${J.origin??"qiymat"} ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Juda kichik: kutilgan ${J.origin} ${Q}${J.minimum.toString()} ${W.unit} ${W.verb}`;return`Juda kichik: kutilgan ${J.origin} ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Noto\u2018g\u2018ri satr: "${Q.prefix}" bilan boshlanishi kerak`;if(Q.format==="ends_with")return`Noto\u2018g\u2018ri satr: "${Q.suffix}" bilan tugashi kerak`;if(Q.format==="includes")return`Noto\u2018g\u2018ri satr: "${Q.includes}" ni o\u2018z ichiga olishi kerak`;if(Q.format==="regex")return`Noto\u2018g\u2018ri satr: ${Q.pattern} shabloniga mos kelishi kerak`;return`Noto\u2018g\u2018ri ${X[Q.format]??J.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${J.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${J.keys.length>1?"lar":""}: ${i0(J.keys,", ")}`;case"invalid_key":return`${J.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${J.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};var hf1=V0(()=>{j4()});function N_0(){return{localeError:_28()}}var _28=()=>{let $={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function Y(J){return $[J]??null}let X={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},G={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${J.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${K}`;return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${Q}, nh\u1EADn \u0111\u01B0\u1EE3c ${K}`}case"invalid_value":if(J.values.length===1)return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${U1(J.values[0])}`;return`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${J.origin??"gi\xE1 tr\u1ECB"} ${W.verb} ${Q}${J.maximum.toString()} ${W.unit??"ph\u1EA7n t\u1EED"}`;return`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${J.origin??"gi\xE1 tr\u1ECB"} ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${J.origin} ${W.verb} ${Q}${J.minimum.toString()} ${W.unit}`;return`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${J.origin} ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${Q.prefix}"`;if(Q.format==="ends_with")return`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${Q.suffix}"`;if(Q.format==="includes")return`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${Q.includes}"`;if(Q.format==="regex")return`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${Q.pattern}`;return`${X[Q.format]??J.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${J.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${i0(J.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${J.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${J.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};var ff1=V0(()=>{j4()});function A_0(){return{localeError:j28()}}var j28=()=>{let $={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function Y(J){return $[J]??null}let X={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},G={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${J.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${K}`;return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${Q}\uFF0C\u5B9E\u9645\u63A5\u6536 ${K}`}case"invalid_value":if(J.values.length===1)return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${U1(J.values[0])}`;return`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${J.origin??"\u503C"} ${Q}${J.maximum.toString()} ${W.unit??"\u4E2A\u5143\u7D20"}`;return`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${J.origin??"\u503C"} ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${J.origin} ${Q}${J.minimum.toString()} ${W.unit}`;return`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${J.origin} ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${Q.prefix}" \u5F00\u5934`;if(Q.format==="ends_with")return`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${Q.suffix}" \u7ED3\u5C3E`;if(Q.format==="includes")return`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${Q.includes}"`;if(Q.format==="regex")return`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${Q.pattern}`;return`\u65E0\u6548${X[Q.format]??J.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${J.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${i0(J.keys,", ")}`;case"invalid_key":return`${J.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${J.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};var gf1=V0(()=>{j4()});function B_0(){return{localeError:T28()}}var T28=()=>{let $={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function Y(J){return $[J]??null}let X={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},G={nan:"NaN"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${J.expected}\uFF0C\u4F46\u6536\u5230 ${K}`;return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${Q}\uFF0C\u4F46\u6536\u5230 ${K}`}case"invalid_value":if(J.values.length===1)return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${U1(J.values[0])}`;return`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${J.origin??"\u503C"} \u61C9\u70BA ${Q}${J.maximum.toString()} ${W.unit??"\u500B\u5143\u7D20"}`;return`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${J.origin??"\u503C"} \u61C9\u70BA ${Q}${J.maximum.toString()}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${J.origin} \u61C9\u70BA ${Q}${J.minimum.toString()} ${W.unit}`;return`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${J.origin} \u61C9\u70BA ${Q}${J.minimum.toString()}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${Q.prefix}" \u958B\u982D`;if(Q.format==="ends_with")return`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${Q.suffix}" \u7D50\u5C3E`;if(Q.format==="includes")return`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${Q.includes}"`;if(Q.format==="regex")return`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${Q.pattern}`;return`\u7121\u6548\u7684 ${X[Q.format]??J.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${J.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${J.keys.length>1?"\u5011":""}\uFF1A${i0(J.keys,"\u3001")}`;case"invalid_key":return`${J.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${J.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};var mf1=V0(()=>{j4()});function O_0(){return{localeError:I28()}}var I28=()=>{let $={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function Y(J){return $[J]??null}let X={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},G={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return(J)=>{switch(J.code){case"invalid_type":{let Q=G[J.expected]??J.expected,W=H1(J.input),K=G[W]??W;if(/^[A-Z]/.test(J.expected))return`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${J.expected}, \xE0m\u1ECD\u0300 a r\xED ${K}`;return`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${Q}, \xE0m\u1ECD\u0300 a r\xED ${K}`}case"invalid_value":if(J.values.length===1)return`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${U1(J.values[0])}`;return`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${i0(J.values,"|")}`;case"too_big":{let Q=J.inclusive?"<=":"<",W=Y(J.origin);if(W)return`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${J.origin??"iye"} ${W.verb} ${Q}${J.maximum} ${W.unit}`;return`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${Q}${J.maximum}`}case"too_small":{let Q=J.inclusive?">=":">",W=Y(J.origin);if(W)return`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${J.origin} ${W.verb} ${Q}${J.minimum} ${W.unit}`;return`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${Q}${J.minimum}`}case"invalid_format":{let Q=J;if(Q.format==="starts_with")return`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${Q.prefix}"`;if(Q.format==="ends_with")return`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${Q.suffix}"`;if(Q.format==="includes")return`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${Q.includes}"`;if(Q.format==="regex")return`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${Q.pattern}`;return`A\u1E63\xEC\u1E63e: ${X[Q.format]??J.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${J.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${i0(J.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${J.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${J.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};var uf1=V0(()=>{j4()});var xB={};W8(xB,{zhTW:()=>B_0,zhCN:()=>A_0,yo:()=>O_0,vi:()=>N_0,uz:()=>D_0,ur:()=>L_0,uk:()=>Rb,ua:()=>F_0,tr:()=>z_0,th:()=>H_0,ta:()=>U_0,sv:()=>Z_0,sl:()=>K_0,ru:()=>W_0,ro:()=>Q_0,pt:()=>J_0,ps:()=>X_0,pl:()=>G_0,ota:()=>Y_0,no:()=>$_0,nl:()=>ew0,ms:()=>tw0,mk:()=>ow0,lt:()=>sw0,ko:()=>aw0,km:()=>Eb,kh:()=>rw0,ka:()=>iw0,ja:()=>lw0,it:()=>cw0,is:()=>dw0,id:()=>pw0,hy:()=>uw0,hu:()=>mw0,hr:()=>gw0,he:()=>fw0,frCA:()=>hw0,fr:()=>bw0,fi:()=>yw0,fa:()=>xw0,es:()=>vw0,eo:()=>kw0,en:()=>Ob,el:()=>Cw0,de:()=>Iw0,da:()=>Tw0,cs:()=>jw0,ca:()=>_w0,bg:()=>ww0,be:()=>Pw0,az:()=>qw0,ar:()=>Rw0});var G00=V0(()=>{dh1();ch1();ih1();nh1();rh1();ah1();sh1();oh1();th1();Sw0();eh1();$f1();Yf1();Xf1();Gf1();Jf1();Qf1();Wf1();Kf1();Uf1();Hf1();zf1();Vf1();Ff1();Lf1();Df1();nw0();Nf1();Bf1();Of1();Ef1();Mf1();Rf1();qf1();Pf1();wf1();_f1();jf1();If1();Cf1();Sf1();kf1();vf1();xf1();yf1();V_0();bf1();hf1();ff1();gf1();mf1();uf1()});class E_0{constructor(){this._map=new WeakMap,this._idmap=new Map}add($,...Y){let X=Y[0];if(this._map.set($,X),X&&typeof X==="object"&&"id"in X)this._idmap.set(X.id,$);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove($){let Y=this._map.get($);if(Y&&typeof Y==="object"&&"id"in Y)this._idmap.delete(Y.id);return this._map.delete($),this}get($){let Y=$._zod.parent;if(Y){let X={...this.get(Y)??{}};delete X.id;let G={...X,...this._map.get($)};return Object.keys(G).length?G:void 0}return this._map.get($)}has($){return this._map.has($)}}function qb(){return new E_0}var pf1,J00,Q00,fY;var Pb=V0(()=>{J00=Symbol("ZodOutput"),Q00=Symbol("ZodInput");(pf1=globalThis).__zod_globalRegistry??(pf1.__zod_globalRegistry=qb());fY=globalThis.__zod_globalRegistry});function W00($,Y){return new $({type:"string",...R1(Y)})}function M_0($,Y){return new $({type:"string",coerce:!0,...R1(Y)})}function wb($,Y){return new $({type:"string",format:"email",check:"string_format",abort:!1,...R1(Y)})}function kw($,Y){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...R1(Y)})}function _b($,Y){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...R1(Y)})}function jb($,Y){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...R1(Y)})}function Tb($,Y){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...R1(Y)})}function Ib($,Y){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...R1(Y)})}function vw($,Y){return new $({type:"string",format:"url",check:"string_format",abort:!1,...R1(Y)})}function Cb($,Y){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...R1(Y)})}function Sb($,Y){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...R1(Y)})}function kb($,Y){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...R1(Y)})}function vb($,Y){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...R1(Y)})}function xb($,Y){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...R1(Y)})}function yb($,Y){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...R1(Y)})}function bb($,Y){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...R1(Y)})}function hb($,Y){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...R1(Y)})}function fb($,Y){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...R1(Y)})}function K00($,Y){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...R1(Y)})}function gb($,Y){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...R1(Y)})}function mb($,Y){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...R1(Y)})}function ub($,Y){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...R1(Y)})}function pb($,Y){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...R1(Y)})}function db($,Y){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...R1(Y)})}function cb($,Y){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...R1(Y)})}function R_0($,Y){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...R1(Y)})}function q_0($,Y){return new $({type:"string",format:"date",check:"string_format",...R1(Y)})}function P_0($,Y){return new $({type:"string",format:"time",check:"string_format",precision:null,...R1(Y)})}function w_0($,Y){return new $({type:"string",format:"duration",check:"string_format",...R1(Y)})}function U00($,Y){return new $({type:"number",checks:[],...R1(Y)})}function __0($,Y){return new $({type:"number",coerce:!0,checks:[],...R1(Y)})}function H00($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...R1(Y)})}function z00($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...R1(Y)})}function V00($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...R1(Y)})}function F00($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...R1(Y)})}function L00($,Y){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...R1(Y)})}function D00($,Y){return new $({type:"boolean",...R1(Y)})}function j_0($,Y){return new $({type:"boolean",coerce:!0,...R1(Y)})}function N00($,Y){return new $({type:"bigint",...R1(Y)})}function T_0($,Y){return new $({type:"bigint",coerce:!0,...R1(Y)})}function A00($,Y){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...R1(Y)})}function B00($,Y){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...R1(Y)})}function O00($,Y){return new $({type:"symbol",...R1(Y)})}function E00($,Y){return new $({type:"undefined",...R1(Y)})}function M00($,Y){return new $({type:"null",...R1(Y)})}function R00($){return new $({type:"any"})}function q00($){return new $({type:"unknown"})}function P00($,Y){return new $({type:"never",...R1(Y)})}function w00($,Y){return new $({type:"void",...R1(Y)})}function _00($,Y){return new $({type:"date",...R1(Y)})}function I_0($,Y){return new $({type:"date",coerce:!0,...R1(Y)})}function j00($,Y){return new $({type:"nan",...R1(Y)})}function ZZ($,Y){return new it({check:"less_than",...R1(Y),value:$,inclusive:!1})}function UQ($,Y){return new it({check:"less_than",...R1(Y),value:$,inclusive:!0})}function UZ($,Y){return new nt({check:"greater_than",...R1(Y),value:$,inclusive:!1})}function aX($,Y){return new nt({check:"greater_than",...R1(Y),value:$,inclusive:!0})}function lb($){return UZ(0,$)}function ib($){return ZZ(0,$)}function nb($){return UQ(0,$)}function rb($){return aX(0,$)}function Dz($,Y){return new nP0({check:"multiple_of",...R1(Y),value:$})}function Nz($,Y){return new sP0({check:"max_size",...R1(Y),maximum:$})}function HZ($,Y){return new oP0({check:"min_size",...R1(Y),minimum:$})}function LL($,Y){return new tP0({check:"size_equals",...R1(Y),size:$})}function DL($,Y){return new eP0({check:"max_length",...R1(Y),maximum:$})}function H3($,Y){return new $w0({check:"min_length",...R1(Y),minimum:$})}function NL($,Y){return new Yw0({check:"length_equals",...R1(Y),length:$})}function yB($,Y){return new Xw0({check:"string_format",format:"regex",...R1(Y),pattern:$})}function bB($){return new Gw0({check:"string_format",format:"lowercase",...R1($)})}function hB($){return new Jw0({check:"string_format",format:"uppercase",...R1($)})}function fB($,Y){return new Qw0({check:"string_format",format:"includes",...R1(Y),includes:$})}function gB($,Y){return new Ww0({check:"string_format",format:"starts_with",...R1(Y),prefix:$})}function mB($,Y){return new Kw0({check:"string_format",format:"ends_with",...R1(Y),suffix:$})}function ab($,Y,X){return new Zw0({check:"property",property:$,schema:Y,...R1(X)})}function uB($,Y){return new Uw0({check:"mime_type",mime:$,...R1(Y)})}function m2($){return new Hw0({check:"overwrite",tx:$})}function pB($){return m2((Y)=>Y.normalize($))}function dB(){return m2(($)=>$.trim())}function cB(){return m2(($)=>$.toLowerCase())}function lB(){return m2(($)=>$.toUpperCase())}function iB(){return m2(($)=>UP0($))}function C_0($,Y,X){return new $({type:"array",element:Y,...R1(X)})}function S28($,Y,X){return new $({type:"union",options:Y,...R1(X)})}function k28($,Y,X){return new $({type:"union",options:Y,inclusive:!1,...R1(X)})}function v28($,Y,X,G){return new $({type:"union",options:X,discriminator:Y,...R1(G)})}function x28($,Y,X){return new $({type:"intersection",left:Y,right:X})}function y28($,Y,X,G){let J=X instanceof K6;return new $({type:"tuple",items:Y,rest:J?X:null,...R1(J?G:X)})}function b28($,Y,X,G){return new $({type:"record",keyType:Y,valueType:X,...R1(G)})}function h28($,Y,X,G){return new $({type:"map",keyType:Y,valueType:X,...R1(G)})}function f28($,Y,X){return new $({type:"set",valueType:Y,...R1(X)})}function g28($,Y,X){let G=Array.isArray(Y)?Object.fromEntries(Y.map((J)=>[J,J])):Y;return new $({type:"enum",entries:G,...R1(X)})}function m28($,Y,X){return new $({type:"enum",entries:Y,...R1(X)})}function u28($,Y,X){return new $({type:"literal",values:Array.isArray(Y)?Y:[Y],...R1(X)})}function T00($,Y){return new $({type:"file",...R1(Y)})}function p28($,Y){return new $({type:"transform",transform:Y})}function d28($,Y){return new $({type:"optional",innerType:Y})}function c28($,Y){return new $({type:"nullable",innerType:Y})}function l28($,Y,X){return new $({type:"default",innerType:Y,get defaultValue(){return typeof X==="function"?X():vt(X)}})}function i28($,Y,X){return new $({type:"nonoptional",innerType:Y,...R1(X)})}function n28($,Y){return new $({type:"success",innerType:Y})}function r28($,Y,X){return new $({type:"catch",innerType:Y,catchValue:typeof X==="function"?X:()=>X})}function a28($,Y,X){return new $({type:"pipe",in:Y,out:X})}function s28($,Y){return new $({type:"readonly",innerType:Y})}function o28($,Y,X){return new $({type:"template_literal",parts:Y,...R1(X)})}function t28($,Y){return new $({type:"lazy",getter:Y})}function e28($,Y){return new $({type:"promise",innerType:Y})}function I00($,Y,X){let G=R1(X);return G.abort??(G.abort=!0),new $({type:"custom",check:"custom",fn:Y,...G})}function C00($,Y,X){return new $({type:"custom",check:"custom",fn:Y,...R1(X)})}function S00($,Y){let X=df1((G)=>{return G.addIssue=(J)=>{if(typeof J==="string")G.issues.push(Ew(J,G.value,X._zod.def));else{let Q=J;if(Q.fatal)Q.continue=!1;Q.code??(Q.code="custom"),Q.input??(Q.input=G.value),Q.inst??(Q.inst=X),Q.continue??(Q.continue=!X._zod.def.abort),G.issues.push(Ew(Q))}},$(G.value,G)},Y);return X}function df1($,Y){let X=new U5({check:"custom",...R1(Y)});return X._zod.check=$,X}function k00($){let Y=new U5({check:"describe"});return Y._zod.onattach=[(X)=>{let G=fY.get(X)??{};fY.add(X,{...G,description:$})}],Y._zod.check=()=>{},Y}function v00($){let Y=new U5({check:"meta"});return Y._zod.onattach=[(X)=>{let G=fY.get(X)??{};fY.add(X,{...G,...$})}],Y._zod.check=()=>{},Y}function x00($,Y){let X=R1(Y),G=X.truthy??["true","1","yes","on","y","enabled"],J=X.falsy??["false","0","no","off","n","disabled"];if(X.case!=="sensitive")G=G.map((L)=>typeof L==="string"?L.toLowerCase():L),J=J.map((L)=>typeof L==="string"?L.toLowerCase():L);let Q=new Set(G),W=new Set(J),K=$.Codec??Cw,Z=$.Boolean??Tw,z=new($.String??FL)({type:"string",error:X.error}),V=new Z({type:"boolean",error:X.error}),F=new K({type:"pipe",in:z,out:V,transform:(L,N)=>{let D=L;if(X.case!=="sensitive")D=D.toLowerCase();if(Q.has(D))return!0;else if(W.has(D))return!1;else return N.issues.push({code:"invalid_value",expected:"stringbool",values:[...Q,...W],input:N.value,inst:F,continue:!1}),{}},reverseTransform:(L,N)=>{if(L===!0)return G[0]||"true";else return J[0]||"false"},error:X.error});return F}function nB($,Y,X,G={}){let J=R1(G),Q={...R1(G),check:"string_format",type:"string",format:Y,fn:typeof X==="function"?X:(K)=>X.test(K),...J};if(X instanceof RegExp)Q.pattern=X;return new $(Q)}var Z00;var cf1=V0(()=>{rt();Pb();Mw0();j4();Z00={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function AL($){let Y=$?.target??"draft-2020-12";if(Y==="draft-4")Y="draft-04";if(Y==="draft-7")Y="draft-07";return{processors:$.processors??{},metadataRegistry:$?.metadata??fY,target:Y,unrepresentable:$?.unrepresentable??"throw",override:$?.override??(()=>{}),io:$?.io??"output",counter:0,seen:new Map,cycles:$?.cycles??"ref",reused:$?.reused??"inline",external:$?.external??void 0}}function R9($,Y,X={path:[],schemaPath:[]}){var G;let J=$._zod.def,Q=Y.seen.get($);if(Q){if(Q.count++,X.schemaPath.includes($))Q.cycle=X.path;return Q.schema}let W={schema:{},count:1,cycle:void 0,path:X.path};Y.seen.set($,W);let K=$._zod.toJSONSchema?.();if(K)W.schema=K;else{let z={...X,schemaPath:[...X.schemaPath,$],path:X.path};if($._zod.processJSONSchema)$._zod.processJSONSchema(Y,W.schema,z);else{let F=W.schema,L=Y.processors[J.type];if(!L)throw Error(`[toJSONSchema]: Non-representable type encountered: ${J.type}`);L($,Y,F,z)}let V=$._zod.parent;if(V){if(!W.ref)W.ref=V;R9(V,Y,z),Y.seen.get(V).isParent=!0}}let Z=Y.metadataRegistry.get($);if(Z)Object.assign(W.schema,Z);if(Y.io==="input"&&uG($))delete W.schema.examples,delete W.schema.default;if(Y.io==="input"&&"_prefault"in W.schema)(G=W.schema).default??(G.default=W.schema._prefault);return delete W.schema._prefault,Y.seen.get($).schema}function BL($,Y){let X=$.seen.get(Y);if(!X)throw Error("Unprocessed schema. This is a bug in Zod.");let G=new Map;for(let W of $.seen.entries()){let K=$.metadataRegistry.get(W[0])?.id;if(K){let Z=G.get(K);if(Z&&Z!==W[0])throw Error(`Duplicate schema id "${K}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);G.set(K,W[0])}}let J=(W)=>{let K=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let V=$.external.registry.get(W[0])?.id,F=$.external.uri??((N)=>N);if(V)return{ref:F(V)};let L=W[1].defId??W[1].schema.id??`schema${$.counter++}`;return W[1].defId=L,{defId:L,ref:`${F("__shared")}#/${K}/${L}`}}if(W[1]===X)return{ref:"#"};let H=`${"#"}/${K}/`,z=W[1].schema.id??`__schema${$.counter++}`;return{defId:z,ref:H+z}},Q=(W)=>{if(W[1].schema.$ref)return;let K=W[1],{ref:Z,defId:H}=J(W);if(K.def={...K.schema},H)K.defId=H;let z=K.schema;for(let V in z)delete z[V];z.$ref=Z};if($.cycles==="throw")for(let W of $.seen.entries()){let K=W[1];if(K.cycle)throw Error(`Cycle detected: #/${K.cycle?.join("/")}/<root>

Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let W of $.seen.entries()){let K=W[1];if(Y===W[0]){Q(W);continue}if($.external){let H=$.external.registry.get(W[0])?.id;if(Y!==W[0]&&H){Q(W);continue}}if($.metadataRegistry.get(W[0])?.id){Q(W);continue}if(K.cycle){Q(W);continue}if(K.count>1){if($.reused==="ref"){Q(W);continue}}}}function OL($,Y){let X=$.seen.get(Y);if(!X)throw Error("Unprocessed schema. This is a bug in Zod.");let G=(K)=>{let Z=$.seen.get(K);if(Z.ref===null)return;let H=Z.def??Z.schema,z={...H},V=Z.ref;if(Z.ref=null,V){G(V);let L=$.seen.get(V),N=L.schema;if(N.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))H.allOf=H.allOf??[],H.allOf.push(N);else Object.assign(H,N);if(Object.assign(H,z),K._zod.parent===V)for(let A in H){if(A==="$ref"||A==="allOf")continue;if(!(A in z))delete H[A]}if(N.$ref&&L.def)for(let A in H){if(A==="$ref"||A==="allOf")continue;if(A in L.def&&JSON.stringify(H[A])===JSON.stringify(L.def[A]))delete H[A]}}let F=K._zod.parent;if(F&&F!==V){G(F);let L=$.seen.get(F);if(L?.schema.$ref){if(H.$ref=L.schema.$ref,L.def)for(let N in H){if(N==="$ref"||N==="allOf")continue;if(N in L.def&&JSON.stringify(H[N])===JSON.stringify(L.def[N]))delete H[N]}}}$.override({zodSchema:K,jsonSchema:H,path:Z.path??[]})};for(let K of[...$.seen.entries()].reverse())G(K[0]);let J={};if($.target==="draft-2020-12")J.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")J.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")J.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let K=$.external.registry.get(Y)?.id;if(!K)throw Error("Schema is missing an `id` property");J.$id=$.external.uri(K)}Object.assign(J,X.def??X.schema);let Q=$.metadataRegistry.get(Y)?.id;if(Q!==void 0&&J.id===Q)delete J.id;let W=$.external?.defs??{};for(let K of $.seen.entries()){let Z=K[1];if(Z.def&&Z.defId){if(Z.def.id===Z.defId)delete Z.def.id;W[Z.defId]=Z.def}}if($.external);else if(Object.keys(W).length>0)if($.target==="draft-2020-12")J.$defs=W;else J.definitions=W;try{let K=JSON.parse(JSON.stringify(J));return Object.defineProperty(K,"~standard",{value:{...Y["~standard"],jsonSchema:{input:xw(Y,"input",$.processors),output:xw(Y,"output",$.processors)}},enumerable:!1,writable:!1}),K}catch(K){throw Error("Error converting schema to JSON.")}}function uG($,Y){let X=Y??{seen:new Set};if(X.seen.has($))return!1;X.seen.add($);let G=$._zod.def;if(G.type==="transform")return!0;if(G.type==="array")return uG(G.element,X);if(G.type==="set")return uG(G.valueType,X);if(G.type==="lazy")return uG(G.getter(),X);if(G.type==="promise"||G.type==="optional"||G.type==="nonoptional"||G.type==="nullable"||G.type==="readonly"||G.type==="default"||G.type==="prefault")return uG(G.innerType,X);if(G.type==="intersection")return uG(G.left,X)||uG(G.right,X);if(G.type==="record"||G.type==="map")return uG(G.keyType,X)||uG(G.valueType,X);if(G.type==="pipe"){if($._zod.traits.has("$ZodCodec"))return!0;return uG(G.in,X)||uG(G.out,X)}if(G.type==="object"){for(let J in G.shape)if(uG(G.shape[J],X))return!0;return!1}if(G.type==="union"){for(let J of G.options)if(uG(J,X))return!0;return!1}if(G.type==="tuple"){for(let J of G.items)if(uG(J,X))return!0;if(G.rest&&uG(G.rest,X))return!0;return!1}return!1}var S_0=($,Y={})=>(X)=>{let G=AL({...X,processors:Y});return R9($,G),BL(G,$),OL(G,$)},xw=($,Y,X={})=>(G)=>{let{libraryOptions:J,target:Q}=G??{},W=AL({...J??{},target:Q,io:Y,processors:X});return R9($,W),BL(W,$),OL(W,$)};var sb=V0(()=>{Pb()});function e$($,Y){if("_idmap"in $){let G=$,J=AL({...Y,processors:y00}),Q={};for(let Z of G._idmap.entries()){let[H,z]=Z;R9(z,J)}let W={},K={registry:G,uri:Y?.uri,defs:Q};J.external=K;for(let Z of G._idmap.entries()){let[H,z]=Z;BL(J,z),W[H]=OL(J,z)}if(Object.keys(Q).length>0){let Z=J.target==="draft-2020-12"?"$defs":"definitions";W.__shared={[Z]:Q}}return{schemas:W}}let X=AL({...Y,processors:y00});return R9($,X),BL(X,$),OL(X,$)}var $K8,k_0=($,Y,X,G)=>{let J=X;J.type="string";let{minimum:Q,maximum:W,format:K,patterns:Z,contentEncoding:H}=$._zod.bag;if(typeof Q==="number")J.minLength=Q;if(typeof W==="number")J.maxLength=W;if(K){if(J.format=$K8[K]??K,J.format==="")delete J.format;if(K==="time")delete J.format}if(H)J.contentEncoding=H;if(Z&&Z.size>0){let z=[...Z];if(z.length===1)J.pattern=z[0].source;else if(z.length>1)J.allOf=[...z.map((V)=>({...Y.target==="draft-07"||Y.target==="draft-04"||Y.target==="openapi-3.0"?{type:"string"}:{},pattern:V.source}))]}},v_0=($,Y,X,G)=>{let J=X,{minimum:Q,maximum:W,format:K,multipleOf:Z,exclusiveMaximum:H,exclusiveMinimum:z}=$._zod.bag;if(typeof K==="string"&&K.includes("int"))J.type="integer";else J.type="number";let V=typeof z==="number"&&z>=(Q??Number.NEGATIVE_INFINITY),F=typeof H==="number"&&H<=(W??Number.POSITIVE_INFINITY),L=Y.target==="draft-04"||Y.target==="openapi-3.0";if(V)if(L)J.minimum=z,J.exclusiveMinimum=!0;else J.exclusiveMinimum=z;else if(typeof Q==="number")J.minimum=Q;if(F)if(L)J.maximum=H,J.exclusiveMaximum=!0;else J.exclusiveMaximum=H;else if(typeof W==="number")J.maximum=W;if(typeof Z==="number")J.multipleOf=Z},x_0=($,Y,X,G)=>{X.type="boolean"},y_0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},b_0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},h_0=($,Y,X,G)=>{if(Y.target==="openapi-3.0")X.type="string",X.nullable=!0,X.enum=[null];else X.type="null"},f_0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},g_0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},m_0=($,Y,X,G)=>{X.not={}},u_0=($,Y,X,G)=>{},p_0=($,Y,X,G)=>{},d_0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},c_0=($,Y,X,G)=>{let J=$._zod.def,Q=Qb(J.entries);if(Q.every((W)=>typeof W==="number"))X.type="number";if(Q.every((W)=>typeof W==="string"))X.type="string";X.enum=Q},l_0=($,Y,X,G)=>{let J=$._zod.def,Q=[];for(let W of J.values)if(W===void 0){if(Y.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof W==="bigint")if(Y.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else Q.push(Number(W));else Q.push(W);if(Q.length===0);else if(Q.length===1){let W=Q[0];if(X.type=W===null?"null":typeof W,Y.target==="draft-04"||Y.target==="openapi-3.0")X.enum=[W];else X.const=W}else{if(Q.every((W)=>typeof W==="number"))X.type="number";if(Q.every((W)=>typeof W==="string"))X.type="string";if(Q.every((W)=>typeof W==="boolean"))X.type="boolean";if(Q.every((W)=>W===null))X.type="null";X.enum=Q}},i_0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},n_0=($,Y,X,G)=>{let J=X,Q=$._zod.pattern;if(!Q)throw Error("Pattern not found in template literal");J.type="string",J.pattern=Q.source},r_0=($,Y,X,G)=>{let J=X,Q={type:"string",format:"binary",contentEncoding:"binary"},{minimum:W,maximum:K,mime:Z}=$._zod.bag;if(W!==void 0)Q.minLength=W;if(K!==void 0)Q.maxLength=K;if(Z)if(Z.length===1)Q.contentMediaType=Z[0],Object.assign(J,Q);else Object.assign(J,Q),J.anyOf=Z.map((H)=>({contentMediaType:H}));else Object.assign(J,Q)},a_0=($,Y,X,G)=>{X.type="boolean"},s_0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},o_0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},t_0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},e_0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},$j0=($,Y,X,G)=>{if(Y.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},Yj0=($,Y,X,G)=>{let J=X,Q=$._zod.def,{minimum:W,maximum:K}=$._zod.bag;if(typeof W==="number")J.minItems=W;if(typeof K==="number")J.maxItems=K;J.type="array",J.items=R9(Q.element,Y,{...G,path:[...G.path,"items"]})},Xj0=($,Y,X,G)=>{let J=X,Q=$._zod.def;J.type="object",J.properties={};let W=Q.shape;for(let H in W)J.properties[H]=R9(W[H],Y,{...G,path:[...G.path,"properties",H]});let K=new Set(Object.keys(W)),Z=new Set([...K].filter((H)=>{let z=Q.shape[H]._zod;if(Y.io==="input")return z.optin===void 0;else return z.optout===void 0}));if(Z.size>0)J.required=Array.from(Z);if(Q.catchall?._zod.def.type==="never")J.additionalProperties=!1;else if(!Q.catchall){if(Y.io==="output")J.additionalProperties=!1}else if(Q.catchall)J.additionalProperties=R9(Q.catchall,Y,{...G,path:[...G.path,"additionalProperties"]})},b00=($,Y,X,G)=>{let J=$._zod.def,Q=J.inclusive===!1,W=J.options.map((K,Z)=>R9(K,Y,{...G,path:[...G.path,Q?"oneOf":"anyOf",Z]}));if(Q)X.oneOf=W;else X.anyOf=W},Gj0=($,Y,X,G)=>{let J=$._zod.def,Q=R9(J.left,Y,{...G,path:[...G.path,"allOf",0]}),W=R9(J.right,Y,{...G,path:[...G.path,"allOf",1]}),K=(H)=>("allOf"in H)&&Object.keys(H).length===1,Z=[...K(Q)?Q.allOf:[Q],...K(W)?W.allOf:[W]];X.allOf=Z},Jj0=($,Y,X,G)=>{let J=X,Q=$._zod.def;J.type="array";let W=Y.target==="draft-2020-12"?"prefixItems":"items",K=Y.target==="draft-2020-12"?"items":Y.target==="openapi-3.0"?"items":"additionalItems",Z=Q.items.map((F,L)=>R9(F,Y,{...G,path:[...G.path,W,L]})),H=Q.rest?R9(Q.rest,Y,{...G,path:[...G.path,K,...Y.target==="openapi-3.0"?[Q.items.length]:[]]}):null;if(Y.target==="draft-2020-12"){if(J.prefixItems=Z,H)J.items=H}else if(Y.target==="openapi-3.0"){if(J.items={anyOf:Z},H)J.items.anyOf.push(H);if(J.minItems=Z.length,!H)J.maxItems=Z.length}else if(J.items=Z,H)J.additionalItems=H;let{minimum:z,maximum:V}=$._zod.bag;if(typeof z==="number")J.minItems=z;if(typeof V==="number")J.maxItems=V},Qj0=($,Y,X,G)=>{let J=X,Q=$._zod.def;J.type="object";let W=Q.keyType,Z=W._zod.bag?.patterns;if(Q.mode==="loose"&&Z&&Z.size>0){let z=R9(Q.valueType,Y,{...G,path:[...G.path,"patternProperties","*"]});J.patternProperties={};for(let V of Z)J.patternProperties[V.source]=z}else{if(Y.target==="draft-07"||Y.target==="draft-2020-12")J.propertyNames=R9(Q.keyType,Y,{...G,path:[...G.path,"propertyNames"]});J.additionalProperties=R9(Q.valueType,Y,{...G,path:[...G.path,"additionalProperties"]})}let H=W._zod.values;if(H){let z=[...H].filter((V)=>typeof V==="string"||typeof V==="number");if(z.length>0)J.required=z}},Wj0=($,Y,X,G)=>{let J=$._zod.def,Q=R9(J.innerType,Y,G),W=Y.seen.get($);if(Y.target==="openapi-3.0")W.ref=J.innerType,X.nullable=!0;else X.anyOf=[Q,{type:"null"}]},Kj0=($,Y,X,G)=>{let J=$._zod.def;R9(J.innerType,Y,G);let Q=Y.seen.get($);Q.ref=J.innerType},Zj0=($,Y,X,G)=>{let J=$._zod.def;R9(J.innerType,Y,G);let Q=Y.seen.get($);Q.ref=J.innerType,X.default=JSON.parse(JSON.stringify(J.defaultValue))},Uj0=($,Y,X,G)=>{let J=$._zod.def;R9(J.innerType,Y,G);let Q=Y.seen.get($);if(Q.ref=J.innerType,Y.io==="input")X._prefault=JSON.parse(JSON.stringify(J.defaultValue))},Hj0=($,Y,X,G)=>{let J=$._zod.def;R9(J.innerType,Y,G);let Q=Y.seen.get($);Q.ref=J.innerType;let W;try{W=J.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}X.default=W},zj0=($,Y,X,G)=>{let J=$._zod.def,Q=J.in._zod.traits.has("$ZodTransform"),W=Y.io==="input"?Q?J.out:J.in:J.out;R9(W,Y,G);let K=Y.seen.get($);K.ref=W},Vj0=($,Y,X,G)=>{let J=$._zod.def;R9(J.innerType,Y,G);let Q=Y.seen.get($);Q.ref=J.innerType,X.readOnly=!0},Fj0=($,Y,X,G)=>{let J=$._zod.def;R9(J.innerType,Y,G);let Q=Y.seen.get($);Q.ref=J.innerType},h00=($,Y,X,G)=>{let J=$._zod.def;R9(J.innerType,Y,G);let Q=Y.seen.get($);Q.ref=J.innerType},Lj0=($,Y,X,G)=>{let J=$._zod.innerType;R9(J,Y,G);let Q=Y.seen.get($);Q.ref=J},y00;var yw=V0(()=>{sb();j4();$K8={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},y00={string:k_0,number:v_0,boolean:x_0,bigint:y_0,symbol:b_0,null:h_0,undefined:f_0,void:g_0,never:m_0,any:u_0,unknown:p_0,date:d_0,enum:c_0,literal:l_0,nan:i_0,template_literal:n_0,file:r_0,success:a_0,custom:s_0,function:o_0,transform:t_0,map:e_0,set:$j0,array:Yj0,object:Xj0,union:b00,intersection:Gj0,tuple:Jj0,record:Qj0,nullable:Wj0,nonoptional:Kj0,default:Zj0,prefault:Uj0,catch:Hj0,pipe:zj0,readonly:Vj0,promise:Fj0,optional:h00,lazy:Lj0}});class Dj0{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let Y=$?.target??"draft-2020-12";if(Y==="draft-4")Y="draft-04";if(Y==="draft-7")Y="draft-07";this.ctx=AL({processors:y00,target:Y,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,Y={path:[],schemaPath:[]}){return R9($,this.ctx,Y)}emit($,Y){if(Y){if(Y.cycles)this.ctx.cycles=Y.cycles;if(Y.reused)this.ctx.reused=Y.reused;if(Y.external)this.ctx.external=Y.external}BL(this.ctx,$);let X=OL(this.ctx,$),{"~standard":G,...J}=X;return J}}var lf1=V0(()=>{yw();sb()});var if1={};var nf1=()=>{};var u2={};W8(u2,{version:()=>zw0,util:()=>V1,treeifyError:()=>xt,toJSONSchema:()=>e$,toDotPath:()=>Hh1,safeParseAsync:()=>VL,safeParse:()=>zL,safeEncodeAsync:()=>Ah1,safeEncode:()=>Dh1,safeDecodeAsync:()=>Bh1,safeDecode:()=>Nh1,registry:()=>qb,regexes:()=>mG,process:()=>R9,prettifyError:()=>yt,parseAsync:()=>kB,parse:()=>SB,meta:()=>v00,locales:()=>xB,isValidJWT:()=>mh1,isValidBase64URL:()=>gh1,isValidBase64:()=>Bw0,initializeContext:()=>AL,globalRegistry:()=>fY,globalConfig:()=>jB,formatError:()=>Rw,flattenError:()=>Mw,finalize:()=>OL,extractDefs:()=>BL,encodeAsync:()=>Fh1,encode:()=>zh1,describe:()=>k00,decodeAsync:()=>Lh1,decode:()=>Vh1,createToJSONSchemaMethod:()=>S_0,createStandardJSONSchemaMethod:()=>xw,config:()=>S$,clone:()=>hY,_xor:()=>k28,_xid:()=>yb,_void:()=>w00,_uuidv7:()=>Ib,_uuidv6:()=>Tb,_uuidv4:()=>jb,_uuid:()=>_b,_url:()=>vw,_uppercase:()=>hB,_unknown:()=>q00,_union:()=>S28,_undefined:()=>E00,_ulid:()=>xb,_uint64:()=>B00,_uint32:()=>L00,_tuple:()=>y28,_trim:()=>dB,_transform:()=>p28,_toUpperCase:()=>lB,_toLowerCase:()=>cB,_templateLiteral:()=>o28,_symbol:()=>O00,_superRefine:()=>S00,_success:()=>n28,_stringbool:()=>x00,_stringFormat:()=>nB,_string:()=>W00,_startsWith:()=>gB,_slugify:()=>iB,_size:()=>LL,_set:()=>f28,_safeParseAsync:()=>_w,_safeParse:()=>ww,_safeEncodeAsync:()=>pt,_safeEncode:()=>mt,_safeDecodeAsync:()=>dt,_safeDecode:()=>ut,_regex:()=>yB,_refine:()=>C00,_record:()=>b28,_readonly:()=>s28,_property:()=>ab,_promise:()=>e28,_positive:()=>lb,_pipe:()=>a28,_parseAsync:()=>Pw,_parse:()=>qw,_overwrite:()=>m2,_optional:()=>d28,_number:()=>U00,_nullable:()=>c28,_null:()=>M00,_normalize:()=>pB,_nonpositive:()=>nb,_nonoptional:()=>i28,_nonnegative:()=>rb,_never:()=>P00,_negative:()=>ib,_nativeEnum:()=>m28,_nanoid:()=>Sb,_nan:()=>j00,_multipleOf:()=>Dz,_minSize:()=>HZ,_minLength:()=>H3,_min:()=>aX,_mime:()=>uB,_maxSize:()=>Nz,_maxLength:()=>DL,_max:()=>UQ,_map:()=>h28,_mac:()=>K00,_lte:()=>UQ,_lt:()=>ZZ,_lowercase:()=>bB,_literal:()=>u28,_length:()=>NL,_lazy:()=>t28,_ksuid:()=>bb,_jwt:()=>cb,_isoTime:()=>P_0,_isoDuration:()=>w_0,_isoDateTime:()=>R_0,_isoDate:()=>q_0,_ipv6:()=>fb,_ipv4:()=>hb,_intersection:()=>x28,_int64:()=>A00,_int32:()=>F00,_int:()=>H00,_includes:()=>fB,_guid:()=>kw,_gte:()=>aX,_gt:()=>UZ,_float64:()=>V00,_float32:()=>z00,_file:()=>T00,_enum:()=>g28,_endsWith:()=>mB,_encodeAsync:()=>ft,_encode:()=>bt,_emoji:()=>Cb,_email:()=>wb,_e164:()=>db,_discriminatedUnion:()=>v28,_default:()=>l28,_decodeAsync:()=>gt,_decode:()=>ht,_date:()=>_00,_custom:()=>I00,_cuid2:()=>vb,_cuid:()=>kb,_coercedString:()=>M_0,_coercedNumber:()=>__0,_coercedDate:()=>I_0,_coercedBoolean:()=>j_0,_coercedBigint:()=>T_0,_cidrv6:()=>mb,_cidrv4:()=>gb,_check:()=>df1,_catch:()=>r28,_boolean:()=>D00,_bigint:()=>N00,_base64url:()=>pb,_base64:()=>ub,_array:()=>C_0,_any:()=>R00,TimePrecision:()=>Z00,NEVER:()=>Aw,JSONSchemaGenerator:()=>Dj0,JSONSchema:()=>if1,Doc:()=>at,$output:()=>J00,$input:()=>Q00,$constructor:()=>x0,$brand:()=>Ct,$ZodXor:()=>ve,$ZodXID:()=>Ue,$ZodVoid:()=>Ie,$ZodUnknown:()=>je,$ZodUnion:()=>Iw,$ZodUndefined:()=>Pe,$ZodUUID:()=>Ye,$ZodURL:()=>Ge,$ZodULID:()=>Ze,$ZodType:()=>K6,$ZodTuple:()=>Nb,$ZodTransform:()=>pe,$ZodTemplateLiteral:()=>te,$ZodSymbol:()=>qe,$ZodSuccess:()=>re,$ZodStringFormat:()=>g9,$ZodString:()=>FL,$ZodSet:()=>fe,$ZodRegistry:()=>E_0,$ZodRecord:()=>be,$ZodRealError:()=>ZQ,$ZodReadonly:()=>oe,$ZodPromise:()=>$00,$ZodPreprocess:()=>Ew0,$ZodPrefault:()=>ie,$ZodPipe:()=>Bb,$ZodOptional:()=>Ab,$ZodObjectJIT:()=>Ow0,$ZodObject:()=>ke,$ZodNumberFormat:()=>Me,$ZodNumber:()=>Lb,$ZodNullable:()=>ce,$ZodNull:()=>we,$ZodNonOptional:()=>ne,$ZodNever:()=>Te,$ZodNanoID:()=>Qe,$ZodNaN:()=>se,$ZodMap:()=>he,$ZodMAC:()=>Fe,$ZodLiteral:()=>me,$ZodLazy:()=>Y00,$ZodKSUID:()=>He,$ZodJWT:()=>Oe,$ZodIntersection:()=>ye,$ZodISOTime:()=>Nw0,$ZodISODuration:()=>Aw0,$ZodISODateTime:()=>Lw0,$ZodISODate:()=>Dw0,$ZodIPv6:()=>Ve,$ZodIPv4:()=>ze,$ZodGUID:()=>$e,$ZodFunction:()=>ee,$ZodFile:()=>ue,$ZodExactOptional:()=>de,$ZodError:()=>Hb,$ZodEnum:()=>ge,$ZodEncodeError:()=>TB,$ZodEmoji:()=>Je,$ZodEmail:()=>Xe,$ZodE164:()=>Be,$ZodDiscriminatedUnion:()=>xe,$ZodDefault:()=>le,$ZodDate:()=>Ce,$ZodCustomStringFormat:()=>Ee,$ZodCustom:()=>X00,$ZodCodec:()=>Cw,$ZodCheckUpperCase:()=>Jw0,$ZodCheckStringFormat:()=>jw,$ZodCheckStartsWith:()=>Ww0,$ZodCheckSizeEquals:()=>tP0,$ZodCheckRegex:()=>Xw0,$ZodCheckProperty:()=>Zw0,$ZodCheckOverwrite:()=>Hw0,$ZodCheckNumberFormat:()=>rP0,$ZodCheckMultipleOf:()=>nP0,$ZodCheckMinSize:()=>oP0,$ZodCheckMinLength:()=>$w0,$ZodCheckMimeType:()=>Uw0,$ZodCheckMaxSize:()=>sP0,$ZodCheckMaxLength:()=>eP0,$ZodCheckLowerCase:()=>Gw0,$ZodCheckLessThan:()=>it,$ZodCheckLengthEquals:()=>Yw0,$ZodCheckIncludes:()=>Qw0,$ZodCheckGreaterThan:()=>nt,$ZodCheckEndsWith:()=>Kw0,$ZodCheckBigIntFormat:()=>aP0,$ZodCheck:()=>U5,$ZodCatch:()=>ae,$ZodCUID2:()=>Ke,$ZodCUID:()=>We,$ZodCIDRv6:()=>De,$ZodCIDRv4:()=>Le,$ZodBoolean:()=>Tw,$ZodBigIntFormat:()=>Re,$ZodBigInt:()=>Db,$ZodBase64URL:()=>Ae,$ZodBase64:()=>Ne,$ZodAsyncError:()=>U3,$ZodArray:()=>Se,$ZodAny:()=>_e});var sX=V0(()=>{j4();lt();G00();yw();lf1();nf1();IB();AP0();NP0();Mw0();rt();Vw0();Pb();cf1();sb()});var f00={};W8(f00,{uppercase:()=>hB,trim:()=>dB,toUpperCase:()=>lB,toLowerCase:()=>cB,startsWith:()=>gB,slugify:()=>iB,size:()=>LL,regex:()=>yB,property:()=>ab,positive:()=>lb,overwrite:()=>m2,normalize:()=>pB,nonpositive:()=>nb,nonnegative:()=>rb,negative:()=>ib,multipleOf:()=>Dz,minSize:()=>HZ,minLength:()=>H3,mime:()=>uB,maxSize:()=>Nz,maxLength:()=>DL,lte:()=>UQ,lt:()=>ZZ,lowercase:()=>bB,length:()=>NL,includes:()=>fB,gte:()=>aX,gt:()=>UZ,endsWith:()=>mB});var g00=V0(()=>{sX()});var Az={};W8(Az,{time:()=>Bj0,duration:()=>Oj0,datetime:()=>Nj0,date:()=>Aj0,ZodISOTime:()=>eb,ZodISODuration:()=>$h,ZodISODateTime:()=>ob,ZodISODate:()=>tb});function Nj0($){return R_0(ob,$)}function Aj0($){return q_0(tb,$)}function Bj0($){return P_0(eb,$)}function Oj0($){return w_0($h,$)}var ob,tb,eb,$h;var Yh=V0(()=>{sX();Gh();ob=x0("ZodISODateTime",($,Y)=>{Lw0.init($,Y),m9.init($,Y)});tb=x0("ZodISODate",($,Y)=>{Dw0.init($,Y),m9.init($,Y)});eb=x0("ZodISOTime",($,Y)=>{Nw0.init($,Y),m9.init($,Y)});$h=x0("ZodISODuration",($,Y)=>{Aw0.init($,Y),m9.init($,Y)})});var rf1=($,Y)=>{Hb.init($,Y),$.name="ZodError",Object.defineProperties($,{format:{value:(X)=>Rw($,X)},flatten:{value:(X)=>Mw($,X)},addIssue:{value:(X)=>{$.issues.push(X),$.message=JSON.stringify($.issues,Bw,2)}},addIssues:{value:(X)=>{$.issues.push(...X),$.message=JSON.stringify($.issues,Bw,2)}},isEmpty:{get(){return $.issues.length===0}}})},af1,pG;var Ej0=V0(()=>{sX();sX();j4();af1=x0("ZodError",rf1),pG=x0("ZodError",rf1,{Parent:Error})});var m00,u00,p00,oX,d00,c00,l00,i00,n00,r00,a00,s00;var Mj0=V0(()=>{sX();Ej0();m00=qw(pG),u00=Pw(pG),p00=ww(pG),oX=_w(pG),d00=bt(pG),c00=ht(pG),l00=ft(pG),i00=gt(pG),n00=mt(pG),r00=ut(pG),a00=pt(pG),s00=dt(pG)});var Xh={};W8(Xh,{xor:()=>ZT0,xid:()=>xj0,void:()=>JT0,uuidv7:()=>jj0,uuidv6:()=>_j0,uuidv4:()=>wj0,uuid:()=>Pj0,url:()=>Oz,unknown:()=>u9,union:()=>p9,undefined:()=>GT0,ulid:()=>vj0,uint64:()=>YT0,uint32:()=>tj0,tuple:()=>K10,transform:()=>jh,templateLiteral:()=>ET0,symbol:()=>XT0,superRefine:()=>k10,success:()=>NT0,stringbool:()=>jT0,stringFormat:()=>lj0,string:()=>T0,strictObject:()=>KT0,set:()=>VT0,refine:()=>S10,record:()=>q9,readonly:()=>w10,promise:()=>MT0,preprocess:()=>rw,prefault:()=>A10,pipe:()=>Qh,partialRecord:()=>UT0,optional:()=>H5,object:()=>k1,number:()=>H8,nullish:()=>DT0,nullable:()=>hw,null:()=>mw,nonoptional:()=>B10,never:()=>_h,nativeEnum:()=>FT0,nanoid:()=>Cj0,nan:()=>AT0,meta:()=>wT0,map:()=>zT0,mac:()=>hj0,looseRecord:()=>HT0,looseObject:()=>$7,literal:()=>A4,lazy:()=>T10,ksuid:()=>yj0,keyof:()=>WT0,jwt:()=>cj0,json:()=>TT0,ipv6:()=>fj0,ipv4:()=>bj0,invertCodec:()=>OT0,intersection:()=>$O,int64:()=>$T0,int32:()=>oj0,int:()=>Jh,instanceof:()=>_T0,httpUrl:()=>Tj0,hostname:()=>ij0,hex:()=>nj0,hash:()=>rj0,guid:()=>qj0,function:()=>RT0,float64:()=>sj0,float32:()=>aj0,file:()=>LT0,exactOptional:()=>L10,enum:()=>gY,emoji:()=>Ij0,email:()=>Rj0,e164:()=>dj0,discriminatedUnion:()=>pw,describe:()=>PT0,date:()=>QT0,custom:()=>Ih,cuid2:()=>kj0,cuid:()=>Sj0,codec:()=>BT0,cidrv6:()=>mj0,cidrv4:()=>gj0,check:()=>qT0,catch:()=>M10,boolean:()=>U9,bigint:()=>ej0,base64url:()=>pj0,base64:()=>uj0,array:()=>y1,any:()=>wh,_function:()=>RT0,_default:()=>D10,_ZodString:()=>Kh,ZodXor:()=>J10,ZodXID:()=>Lh,ZodVoid:()=>G10,ZodUnknown:()=>Y10,ZodUnion:()=>RL,ZodUndefined:()=>e00,ZodUUID:()=>zZ,ZodURL:()=>fw,ZodULID:()=>Fh,ZodType:()=>j6,ZodTuple:()=>W10,ZodTransform:()=>V10,ZodTemplateLiteral:()=>_10,ZodSymbol:()=>t00,ZodSuccess:()=>O10,ZodStringFormat:()=>m9,ZodString:()=>Bz,ZodSet:()=>U10,ZodRecord:()=>rB,ZodReadonly:()=>P10,ZodPromise:()=>I10,ZodPreprocess:()=>q10,ZodPrefault:()=>N10,ZodPipe:()=>lw,ZodOptional:()=>Rz,ZodObject:()=>Mz,ZodNumberFormat:()=>EL,ZodNumber:()=>Ez,ZodNullable:()=>dw,ZodNull:()=>gw,ZodNonOptional:()=>Th,ZodNever:()=>X10,ZodNanoID:()=>Hh,ZodNaN:()=>R10,ZodMap:()=>Z10,ZodMAC:()=>o00,ZodLiteral:()=>H10,ZodLazy:()=>j10,ZodKSUID:()=>Dh,ZodJWT:()=>qh,ZodIntersection:()=>eB,ZodIPv6:()=>Ah,ZodIPv4:()=>Nh,ZodGUID:()=>bw,ZodFunction:()=>C10,ZodFile:()=>z10,ZodExactOptional:()=>F10,ZodEnum:()=>aB,ZodEmoji:()=>Uh,ZodEmail:()=>Zh,ZodE164:()=>Rh,ZodDiscriminatedUnion:()=>Q10,ZodDefault:()=>cw,ZodDate:()=>ML,ZodCustomStringFormat:()=>sB,ZodCustom:()=>nw,ZodCodec:()=>iw,ZodCatch:()=>E10,ZodCUID2:()=>Vh,ZodCUID:()=>zh,ZodCIDRv6:()=>Oh,ZodCIDRv4:()=>Bh,ZodBoolean:()=>oB,ZodBigIntFormat:()=>Ph,ZodBigInt:()=>tB,ZodBase64URL:()=>Mh,ZodBase64:()=>Eh,ZodArray:()=>uw,ZodAny:()=>$10});function Wh($,Y,X){let G=Object.getPrototypeOf($),J=sf1.get(G);if(!J)J=new Set,sf1.set(G,J);if(J.has(Y))return;J.add(Y);for(let Q in X){let W=X[Q];Object.defineProperty(G,Q,{configurable:!0,enumerable:!1,get(){let K=W.bind(this);return Object.defineProperty(this,Q,{configurable:!0,writable:!0,enumerable:!0,value:K}),K},set(K){Object.defineProperty(this,Q,{configurable:!0,writable:!0,enumerable:!0,value:K})}})}}function T0($){return W00(Bz,$)}function Rj0($){return wb(Zh,$)}function qj0($){return kw(bw,$)}function Pj0($){return _b(zZ,$)}function wj0($){return jb(zZ,$)}function _j0($){return Tb(zZ,$)}function jj0($){return Ib(zZ,$)}function Oz($){return vw(fw,$)}function Tj0($){return vw(fw,{protocol:mG.httpProtocol,hostname:mG.domain,...V1.normalizeParams($)})}function Ij0($){return Cb(Uh,$)}function Cj0($){return Sb(Hh,$)}function Sj0($){return kb(zh,$)}function kj0($){return vb(Vh,$)}function vj0($){return xb(Fh,$)}function xj0($){return yb(Lh,$)}function yj0($){return bb(Dh,$)}function bj0($){return hb(Nh,$)}function hj0($){return K00(o00,$)}function fj0($){return fb(Ah,$)}function gj0($){return gb(Bh,$)}function mj0($){return mb(Oh,$)}function uj0($){return ub(Eh,$)}function pj0($){return pb(Mh,$)}function dj0($){return db(Rh,$)}function cj0($){return cb(qh,$)}function lj0($,Y,X={}){return nB(sB,$,Y,X)}function ij0($){return nB(sB,"hostname",mG.hostname,$)}function nj0($){return nB(sB,"hex",mG.hex,$)}function rj0($,Y){let X=Y?.enc??"hex",G=`${$}_${X}`,J=mG[G];if(!J)throw Error(`Unrecognized hash format: ${G}`);return nB(sB,G,J,Y)}function H8($){return U00(Ez,$)}function Jh($){return H00(EL,$)}function aj0($){return z00(EL,$)}function sj0($){return V00(EL,$)}function oj0($){return F00(EL,$)}function tj0($){return L00(EL,$)}function U9($){return D00(oB,$)}function ej0($){return N00(tB,$)}function $T0($){return A00(Ph,$)}function YT0($){return B00(Ph,$)}function XT0($){return O00(t00,$)}function GT0($){return E00(e00,$)}function mw($){return M00(gw,$)}function wh(){return R00($10)}function u9(){return q00(Y10)}function _h($){return P00(X10,$)}function JT0($){return w00(G10,$)}function QT0($){return _00(ML,$)}function y1($,Y){return C_0(uw,$,Y)}function WT0($){let Y=$._zod.def.shape;return gY(Object.keys(Y))}function k1($,Y){let X={type:"object",shape:$??{},...V1.normalizeParams(Y)};return new Mz(X)}function KT0($,Y){return new Mz({type:"object",shape:$,catchall:_h(),...V1.normalizeParams(Y)})}function $7($,Y){return new Mz({type:"object",shape:$,catchall:u9(),...V1.normalizeParams(Y)})}function p9($,Y){return new RL({type:"union",options:$,...V1.normalizeParams(Y)})}function ZT0($,Y){return new J10({type:"union",options:$,inclusive:!1,...V1.normalizeParams(Y)})}function pw($,Y,X){return new Q10({type:"union",options:Y,discriminator:$,...V1.normalizeParams(X)})}function $O($,Y){return new eB({type:"intersection",left:$,right:Y})}function K10($,Y,X){let G=Y instanceof K6,J=G?X:Y;return new W10({type:"tuple",items:$,rest:G?Y:null,...V1.normalizeParams(J)})}function q9($,Y,X){if(!Y||!Y._zod)return new rB({type:"record",keyType:T0(),valueType:$,...V1.normalizeParams(Y)});return new rB({type:"record",keyType:$,valueType:Y,...V1.normalizeParams(X)})}function UT0($,Y,X){let G=hY($);return G._zod.values=void 0,new rB({type:"record",keyType:G,valueType:Y,...V1.normalizeParams(X)})}function HT0($,Y,X){return new rB({type:"record",keyType:$,valueType:Y,mode:"loose",...V1.normalizeParams(X)})}function zT0($,Y,X){return new Z10({type:"map",keyType:$,valueType:Y,...V1.normalizeParams(X)})}function VT0($,Y){return new U10({type:"set",valueType:$,...V1.normalizeParams(Y)})}function gY($,Y){let X=Array.isArray($)?Object.fromEntries($.map((G)=>[G,G])):$;return new aB({type:"enum",entries:X,...V1.normalizeParams(Y)})}function FT0($,Y){return new aB({type:"enum",entries:$,...V1.normalizeParams(Y)})}function A4($,Y){return new H10({type:"literal",values:Array.isArray($)?$:[$],...V1.normalizeParams(Y)})}function LT0($){return T00(z10,$)}function jh($){return new V10({type:"transform",transform:$})}function H5($){return new Rz({type:"optional",innerType:$})}function L10($){return new F10({type:"optional",innerType:$})}function hw($){return new dw({type:"nullable",innerType:$})}function DT0($){return H5(hw($))}function D10($,Y){return new cw({type:"default",innerType:$,get defaultValue(){return typeof Y==="function"?Y():V1.shallowClone(Y)}})}function A10($,Y){return new N10({type:"prefault",innerType:$,get defaultValue(){return typeof Y==="function"?Y():V1.shallowClone(Y)}})}function B10($,Y){return new Th({type:"nonoptional",innerType:$,...V1.normalizeParams(Y)})}function NT0($){return new O10({type:"success",innerType:$})}function M10($,Y){return new E10({type:"catch",innerType:$,catchValue:typeof Y==="function"?Y:()=>Y})}function AT0($){return j00(R10,$)}function Qh($,Y){return new lw({type:"pipe",in:$,out:Y})}function BT0($,Y,X){return new iw({type:"pipe",in:$,out:Y,transform:X.decode,reverseTransform:X.encode})}function OT0($){let Y=$._zod.def;return new iw({type:"pipe",in:Y.out,out:Y.in,transform:Y.reverseTransform,reverseTransform:Y.transform})}function w10($){return new P10({type:"readonly",innerType:$})}function ET0($,Y){return new _10({type:"template_literal",parts:$,...V1.normalizeParams(Y)})}function T10($){return new j10({type:"lazy",getter:$})}function MT0($){return new I10({type:"promise",innerType:$})}function RT0($){return new C10({type:"function",input:Array.isArray($?.input)?K10($?.input):$?.input??y1(u9()),output:$?.output??u9()})}function qT0($){let Y=new U5({check:"custom"});return Y._zod.check=$,Y}function Ih($,Y){return I00(nw,$??(()=>!0),Y)}function S10($,Y={}){return C00(nw,$,Y)}function k10($,Y){return S00($,Y)}function _T0($,Y={}){let X=new nw({type:"custom",check:"custom",fn:(G)=>G instanceof $,abort:!0,...V1.normalizeParams(Y)});return X._zod.bag.Class=$,X._zod.check=(G)=>{if(!(G.value instanceof $))G.issues.push({code:"invalid_type",expected:$.name,input:G.value,inst:X,path:[...X._zod.def.path??[]]})},X}function TT0($){let Y=T10(()=>{return p9([T0($),H8(),U9(),mw(),y1(Y),q9(T0(),Y)])});return Y}function rw($,Y){return new q10({type:"pipe",in:jh($),out:Y})}var sf1,j6,Kh,Bz,m9,Zh,bw,zZ,fw,Uh,Hh,zh,Vh,Fh,Lh,Dh,Nh,o00,Ah,Bh,Oh,Eh,Mh,Rh,qh,sB,Ez,EL,oB,tB,Ph,t00,e00,gw,$10,Y10,X10,G10,ML,uw,Mz,RL,J10,Q10,eB,W10,rB,Z10,U10,aB,H10,z10,V10,Rz,F10,dw,cw,N10,Th,O10,E10,R10,lw,iw,q10,P10,_10,j10,I10,C10,nw,PT0,wT0,jT0=(...$)=>x00({Codec:iw,Boolean:oB,String:Bz},...$);var Gh=V0(()=>{sX();sX();yw();sb();g00();Yh();Mj0();sf1=new WeakMap;j6=x0("ZodType",($,Y)=>{return K6.init($,Y),Object.assign($["~standard"],{jsonSchema:{input:xw($,"input"),output:xw($,"output")}}),$.toJSONSchema=S_0($,{}),$.def=Y,$.type=Y.type,Object.defineProperty($,"_def",{value:Y}),$.parse=(X,G)=>m00($,X,G,{callee:$.parse}),$.safeParse=(X,G)=>p00($,X,G),$.parseAsync=async(X,G)=>u00($,X,G,{callee:$.parseAsync}),$.safeParseAsync=async(X,G)=>oX($,X,G),$.spa=$.safeParseAsync,$.encode=(X,G)=>d00($,X,G),$.decode=(X,G)=>c00($,X,G),$.encodeAsync=async(X,G)=>l00($,X,G),$.decodeAsync=async(X,G)=>i00($,X,G),$.safeEncode=(X,G)=>n00($,X,G),$.safeDecode=(X,G)=>r00($,X,G),$.safeEncodeAsync=async(X,G)=>a00($,X,G),$.safeDecodeAsync=async(X,G)=>s00($,X,G),Wh($,"ZodType",{check(...X){let G=this.def;return this.clone(V1.mergeDefs(G,{checks:[...G.checks??[],...X.map((J)=>typeof J==="function"?{_zod:{check:J,def:{check:"custom"},onattach:[]}}:J)]}),{parent:!0})},with(...X){return this.check(...X)},clone(X,G){return hY(this,X,G)},brand(){return this},register(X,G){return X.add(this,G),this},refine(X,G){return this.check(S10(X,G))},superRefine(X,G){return this.check(k10(X,G))},overwrite(X){return this.check(m2(X))},optional(){return H5(this)},exactOptional(){return L10(this)},nullable(){return hw(this)},nullish(){return H5(hw(this))},nonoptional(X){return B10(this,X)},array(){return y1(this)},or(X){return p9([this,X])},and(X){return $O(this,X)},transform(X){return Qh(this,jh(X))},default(X){return D10(this,X)},prefault(X){return A10(this,X)},catch(X){return M10(this,X)},pipe(X){return Qh(this,X)},readonly(){return w10(this)},describe(X){let G=this.clone();return fY.add(G,{description:X}),G},meta(...X){if(X.length===0)return fY.get(this);let G=this.clone();return fY.add(G,X[0]),G},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(X){return X(this)}}),Object.defineProperty($,"description",{get(){return fY.get($)?.description},configurable:!0}),$}),Kh=x0("_ZodString",($,Y)=>{FL.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(G,J,Q)=>k_0($,G,J,Q);let X=$._zod.bag;$.format=X.format??null,$.minLength=X.minimum??null,$.maxLength=X.maximum??null,Wh($,"_ZodString",{regex(...G){return this.check(yB(...G))},includes(...G){return this.check(fB(...G))},startsWith(...G){return this.check(gB(...G))},endsWith(...G){return this.check(mB(...G))},min(...G){return this.check(H3(...G))},max(...G){return this.check(DL(...G))},length(...G){return this.check(NL(...G))},nonempty(...G){return this.check(H3(1,...G))},lowercase(G){return this.check(bB(G))},uppercase(G){return this.check(hB(G))},trim(){return this.check(dB())},normalize(...G){return this.check(pB(...G))},toLowerCase(){return this.check(cB())},toUpperCase(){return this.check(lB())},slugify(){return this.check(iB())}})}),Bz=x0("ZodString",($,Y)=>{FL.init($,Y),Kh.init($,Y),$.email=(X)=>$.check(wb(Zh,X)),$.url=(X)=>$.check(vw(fw,X)),$.jwt=(X)=>$.check(cb(qh,X)),$.emoji=(X)=>$.check(Cb(Uh,X)),$.guid=(X)=>$.check(kw(bw,X)),$.uuid=(X)=>$.check(_b(zZ,X)),$.uuidv4=(X)=>$.check(jb(zZ,X)),$.uuidv6=(X)=>$.check(Tb(zZ,X)),$.uuidv7=(X)=>$.check(Ib(zZ,X)),$.nanoid=(X)=>$.check(Sb(Hh,X)),$.guid=(X)=>$.check(kw(bw,X)),$.cuid=(X)=>$.check(kb(zh,X)),$.cuid2=(X)=>$.check(vb(Vh,X)),$.ulid=(X)=>$.check(xb(Fh,X)),$.base64=(X)=>$.check(ub(Eh,X)),$.base64url=(X)=>$.check(pb(Mh,X)),$.xid=(X)=>$.check(yb(Lh,X)),$.ksuid=(X)=>$.check(bb(Dh,X)),$.ipv4=(X)=>$.check(hb(Nh,X)),$.ipv6=(X)=>$.check(fb(Ah,X)),$.cidrv4=(X)=>$.check(gb(Bh,X)),$.cidrv6=(X)=>$.check(mb(Oh,X)),$.e164=(X)=>$.check(db(Rh,X)),$.datetime=(X)=>$.check(Nj0(X)),$.date=(X)=>$.check(Aj0(X)),$.time=(X)=>$.check(Bj0(X)),$.duration=(X)=>$.check(Oj0(X))});m9=x0("ZodStringFormat",($,Y)=>{g9.init($,Y),Kh.init($,Y)}),Zh=x0("ZodEmail",($,Y)=>{Xe.init($,Y),m9.init($,Y)});bw=x0("ZodGUID",($,Y)=>{$e.init($,Y),m9.init($,Y)});zZ=x0("ZodUUID",($,Y)=>{Ye.init($,Y),m9.init($,Y)});fw=x0("ZodURL",($,Y)=>{Ge.init($,Y),m9.init($,Y)});Uh=x0("ZodEmoji",($,Y)=>{Je.init($,Y),m9.init($,Y)});Hh=x0("ZodNanoID",($,Y)=>{Qe.init($,Y),m9.init($,Y)});zh=x0("ZodCUID",($,Y)=>{We.init($,Y),m9.init($,Y)});Vh=x0("ZodCUID2",($,Y)=>{Ke.init($,Y),m9.init($,Y)});Fh=x0("ZodULID",($,Y)=>{Ze.init($,Y),m9.init($,Y)});Lh=x0("ZodXID",($,Y)=>{Ue.init($,Y),m9.init($,Y)});Dh=x0("ZodKSUID",($,Y)=>{He.init($,Y),m9.init($,Y)});Nh=x0("ZodIPv4",($,Y)=>{ze.init($,Y),m9.init($,Y)});o00=x0("ZodMAC",($,Y)=>{Fe.init($,Y),m9.init($,Y)});Ah=x0("ZodIPv6",($,Y)=>{Ve.init($,Y),m9.init($,Y)});Bh=x0("ZodCIDRv4",($,Y)=>{Le.init($,Y),m9.init($,Y)});Oh=x0("ZodCIDRv6",($,Y)=>{De.init($,Y),m9.init($,Y)});Eh=x0("ZodBase64",($,Y)=>{Ne.init($,Y),m9.init($,Y)});Mh=x0("ZodBase64URL",($,Y)=>{Ae.init($,Y),m9.init($,Y)});Rh=x0("ZodE164",($,Y)=>{Be.init($,Y),m9.init($,Y)});qh=x0("ZodJWT",($,Y)=>{Oe.init($,Y),m9.init($,Y)});sB=x0("ZodCustomStringFormat",($,Y)=>{Ee.init($,Y),m9.init($,Y)});Ez=x0("ZodNumber",($,Y)=>{Lb.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(G,J,Q)=>v_0($,G,J,Q),Wh($,"ZodNumber",{gt(G,J){return this.check(UZ(G,J))},gte(G,J){return this.check(aX(G,J))},min(G,J){return this.check(aX(G,J))},lt(G,J){return this.check(ZZ(G,J))},lte(G,J){return this.check(UQ(G,J))},max(G,J){return this.check(UQ(G,J))},int(G){return this.check(Jh(G))},safe(G){return this.check(Jh(G))},positive(G){return this.check(UZ(0,G))},nonnegative(G){return this.check(aX(0,G))},negative(G){return this.check(ZZ(0,G))},nonpositive(G){return this.check(UQ(0,G))},multipleOf(G,J){return this.check(Dz(G,J))},step(G,J){return this.check(Dz(G,J))},finite(){return this}});let X=$._zod.bag;$.minValue=Math.max(X.minimum??Number.NEGATIVE_INFINITY,X.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,$.maxValue=Math.min(X.maximum??Number.POSITIVE_INFINITY,X.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,$.isInt=(X.format??"").includes("int")||Number.isSafeInteger(X.multipleOf??0.5),$.isFinite=!0,$.format=X.format??null});EL=x0("ZodNumberFormat",($,Y)=>{Me.init($,Y),Ez.init($,Y)});oB=x0("ZodBoolean",($,Y)=>{Tw.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>x_0($,X,G,J)});tB=x0("ZodBigInt",($,Y)=>{Db.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(G,J,Q)=>y_0($,G,J,Q),$.gte=(G,J)=>$.check(aX(G,J)),$.min=(G,J)=>$.check(aX(G,J)),$.gt=(G,J)=>$.check(UZ(G,J)),$.gte=(G,J)=>$.check(aX(G,J)),$.min=(G,J)=>$.check(aX(G,J)),$.lt=(G,J)=>$.check(ZZ(G,J)),$.lte=(G,J)=>$.check(UQ(G,J)),$.max=(G,J)=>$.check(UQ(G,J)),$.positive=(G)=>$.check(UZ(BigInt(0),G)),$.negative=(G)=>$.check(ZZ(BigInt(0),G)),$.nonpositive=(G)=>$.check(UQ(BigInt(0),G)),$.nonnegative=(G)=>$.check(aX(BigInt(0),G)),$.multipleOf=(G,J)=>$.check(Dz(G,J));let X=$._zod.bag;$.minValue=X.minimum??null,$.maxValue=X.maximum??null,$.format=X.format??null});Ph=x0("ZodBigIntFormat",($,Y)=>{Re.init($,Y),tB.init($,Y)});t00=x0("ZodSymbol",($,Y)=>{qe.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>b_0($,X,G,J)});e00=x0("ZodUndefined",($,Y)=>{Pe.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>f_0($,X,G,J)});gw=x0("ZodNull",($,Y)=>{we.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>h_0($,X,G,J)});$10=x0("ZodAny",($,Y)=>{_e.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>u_0($,X,G,J)});Y10=x0("ZodUnknown",($,Y)=>{je.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>p_0($,X,G,J)});X10=x0("ZodNever",($,Y)=>{Te.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>m_0($,X,G,J)});G10=x0("ZodVoid",($,Y)=>{Ie.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>g_0($,X,G,J)});ML=x0("ZodDate",($,Y)=>{Ce.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(G,J,Q)=>d_0($,G,J,Q),$.min=(G,J)=>$.check(aX(G,J)),$.max=(G,J)=>$.check(UQ(G,J));let X=$._zod.bag;$.minDate=X.minimum?new Date(X.minimum):null,$.maxDate=X.maximum?new Date(X.maximum):null});uw=x0("ZodArray",($,Y)=>{Se.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>Yj0($,X,G,J),$.element=Y.element,Wh($,"ZodArray",{min(X,G){return this.check(H3(X,G))},nonempty(X){return this.check(H3(1,X))},max(X,G){return this.check(DL(X,G))},length(X,G){return this.check(NL(X,G))},unwrap(){return this.element}})});Mz=x0("ZodObject",($,Y)=>{Ow0.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>Xj0($,X,G,J),V1.defineLazy($,"shape",()=>{return Y.shape}),Wh($,"ZodObject",{keyof(){return gY(Object.keys(this._zod.def.shape))},catchall(X){return this.clone({...this._zod.def,catchall:X})},passthrough(){return this.clone({...this._zod.def,catchall:u9()})},loose(){return this.clone({...this._zod.def,catchall:u9()})},strict(){return this.clone({...this._zod.def,catchall:_h()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(X){return V1.extend(this,X)},safeExtend(X){return V1.safeExtend(this,X)},merge(X){return V1.merge(this,X)},pick(X){return V1.pick(this,X)},omit(X){return V1.omit(this,X)},partial(...X){return V1.partial(Rz,this,X[0])},required(...X){return V1.required(Th,this,X[0])}})});RL=x0("ZodUnion",($,Y)=>{Iw.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>b00($,X,G,J),$.options=Y.options});J10=x0("ZodXor",($,Y)=>{RL.init($,Y),ve.init($,Y),$._zod.processJSONSchema=(X,G,J)=>b00($,X,G,J),$.options=Y.options});Q10=x0("ZodDiscriminatedUnion",($,Y)=>{RL.init($,Y),xe.init($,Y)});eB=x0("ZodIntersection",($,Y)=>{ye.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>Gj0($,X,G,J)});W10=x0("ZodTuple",($,Y)=>{Nb.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>Jj0($,X,G,J),$.rest=(X)=>$.clone({...$._zod.def,rest:X})});rB=x0("ZodRecord",($,Y)=>{be.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>Qj0($,X,G,J),$.keyType=Y.keyType,$.valueType=Y.valueType});Z10=x0("ZodMap",($,Y)=>{he.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>e_0($,X,G,J),$.keyType=Y.keyType,$.valueType=Y.valueType,$.min=(...X)=>$.check(HZ(...X)),$.nonempty=(X)=>$.check(HZ(1,X)),$.max=(...X)=>$.check(Nz(...X)),$.size=(...X)=>$.check(LL(...X))});U10=x0("ZodSet",($,Y)=>{fe.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>$j0($,X,G,J),$.min=(...X)=>$.check(HZ(...X)),$.nonempty=(X)=>$.check(HZ(1,X)),$.max=(...X)=>$.check(Nz(...X)),$.size=(...X)=>$.check(LL(...X))});aB=x0("ZodEnum",($,Y)=>{ge.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(G,J,Q)=>c_0($,G,J,Q),$.enum=Y.entries,$.options=Object.values(Y.entries);let X=new Set(Object.keys(Y.entries));$.extract=(G,J)=>{let Q={};for(let W of G)if(X.has(W))Q[W]=Y.entries[W];else throw Error(`Key ${W} not found in enum`);return new aB({...Y,checks:[],...V1.normalizeParams(J),entries:Q})},$.exclude=(G,J)=>{let Q={...Y.entries};for(let W of G)if(X.has(W))delete Q[W];else throw Error(`Key ${W} not found in enum`);return new aB({...Y,checks:[],...V1.normalizeParams(J),entries:Q})}});H10=x0("ZodLiteral",($,Y)=>{me.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>l_0($,X,G,J),$.values=new Set(Y.values),Object.defineProperty($,"value",{get(){if(Y.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return Y.values[0]}})});z10=x0("ZodFile",($,Y)=>{ue.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>r_0($,X,G,J),$.min=(X,G)=>$.check(HZ(X,G)),$.max=(X,G)=>$.check(Nz(X,G)),$.mime=(X,G)=>$.check(uB(Array.isArray(X)?X:[X],G))});V10=x0("ZodTransform",($,Y)=>{pe.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>t_0($,X,G,J),$._zod.parse=(X,G)=>{if(G.direction==="backward")throw new TB($.constructor.name);X.addIssue=(Q)=>{if(typeof Q==="string")X.issues.push(V1.issue(Q,X.value,Y));else{let W=Q;if(W.fatal)W.continue=!1;W.code??(W.code="custom"),W.input??(W.input=X.value),W.inst??(W.inst=$),X.issues.push(V1.issue(W))}};let J=Y.transform(X.value,X);if(J instanceof Promise)return J.then((Q)=>{return X.value=Q,X.fallback=!0,X});return X.value=J,X.fallback=!0,X}});Rz=x0("ZodOptional",($,Y)=>{Ab.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>h00($,X,G,J),$.unwrap=()=>$._zod.def.innerType});F10=x0("ZodExactOptional",($,Y)=>{de.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>h00($,X,G,J),$.unwrap=()=>$._zod.def.innerType});dw=x0("ZodNullable",($,Y)=>{ce.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>Wj0($,X,G,J),$.unwrap=()=>$._zod.def.innerType});cw=x0("ZodDefault",($,Y)=>{le.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>Zj0($,X,G,J),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});N10=x0("ZodPrefault",($,Y)=>{ie.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>Uj0($,X,G,J),$.unwrap=()=>$._zod.def.innerType});Th=x0("ZodNonOptional",($,Y)=>{ne.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>Kj0($,X,G,J),$.unwrap=()=>$._zod.def.innerType});O10=x0("ZodSuccess",($,Y)=>{re.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>a_0($,X,G,J),$.unwrap=()=>$._zod.def.innerType});E10=x0("ZodCatch",($,Y)=>{ae.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>Hj0($,X,G,J),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});R10=x0("ZodNaN",($,Y)=>{se.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>i_0($,X,G,J)});lw=x0("ZodPipe",($,Y)=>{Bb.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>zj0($,X,G,J),$.in=Y.in,$.out=Y.out});iw=x0("ZodCodec",($,Y)=>{lw.init($,Y),Cw.init($,Y)});q10=x0("ZodPreprocess",($,Y)=>{lw.init($,Y),Ew0.init($,Y)}),P10=x0("ZodReadonly",($,Y)=>{oe.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>Vj0($,X,G,J),$.unwrap=()=>$._zod.def.innerType});_10=x0("ZodTemplateLiteral",($,Y)=>{te.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>n_0($,X,G,J)});j10=x0("ZodLazy",($,Y)=>{Y00.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>Lj0($,X,G,J),$.unwrap=()=>$._zod.def.getter()});I10=x0("ZodPromise",($,Y)=>{$00.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>Fj0($,X,G,J),$.unwrap=()=>$._zod.def.innerType});C10=x0("ZodFunction",($,Y)=>{ee.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>o_0($,X,G,J)});nw=x0("ZodCustom",($,Y)=>{X00.init($,Y),j6.init($,Y),$._zod.processJSONSchema=(X,G,J)=>s_0($,X,G,J)});PT0=k00,wT0=v00});function of1($){S$({customError:$})}function tf1(){return S$().customError}var x10,v10;var ef1=V0(()=>{sX();x10={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};(function($){})(v10||(v10={}))});function JK8($,Y){let X=$.$schema;if(X==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(X==="http://json-schema.org/draft-07/schema#")return"draft-7";if(X==="http://json-schema.org/draft-04/schema#")return"draft-4";return Y??"draft-2020-12"}function QK8($,Y){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let X=$.slice(1).split("/").filter(Boolean);if(X.length===0)return Y.rootSchema;let G=Y.version==="draft-2020-12"?"$defs":"definitions";if(X[0]===G){let J=X[1];if(!J||!Y.defs[J])throw Error(`Reference not found: ${$}`);return Y.defs[J]}throw Error(`Reference not found: ${$}`)}function $g1($,Y){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return t1.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let J=$.$ref;if(Y.refs.has(J))return Y.refs.get(J);if(Y.processing.has(J))return t1.lazy(()=>{if(!Y.refs.has(J))throw Error(`Circular reference not resolved: ${J}`);return Y.refs.get(J)});Y.processing.add(J);let Q=QK8(J,Y),W=tX(Q,Y);return Y.refs.set(J,W),Y.processing.delete(J),W}if($.enum!==void 0){let J=$.enum;if(Y.version==="openapi-3.0"&&$.nullable===!0&&J.length===1&&J[0]===null)return t1.null();if(J.length===0)return t1.never();if(J.length===1)return t1.literal(J[0]);if(J.every((W)=>typeof W==="string"))return t1.enum(J);let Q=J.map((W)=>t1.literal(W));if(Q.length<2)return Q[0];return t1.union([Q[0],Q[1],...Q.slice(2)])}if($.const!==void 0)return t1.literal($.const);let X=$.type;if(Array.isArray(X)){let J=X.map((Q)=>{let W={...$,type:Q};return $g1(W,Y)});if(J.length===0)return t1.never();if(J.length===1)return J[0];return t1.union(J)}if(!X)return t1.any();let G;switch(X){case"string":{let J=t1.string();if($.format){let Q=$.format;if(Q==="email")J=J.check(t1.email());else if(Q==="uri"||Q==="uri-reference")J=J.check(t1.url());else if(Q==="uuid"||Q==="guid")J=J.check(t1.uuid());else if(Q==="date-time")J=J.check(t1.iso.datetime());else if(Q==="date")J=J.check(t1.iso.date());else if(Q==="time")J=J.check(t1.iso.time());else if(Q==="duration")J=J.check(t1.iso.duration());else if(Q==="ipv4")J=J.check(t1.ipv4());else if(Q==="ipv6")J=J.check(t1.ipv6());else if(Q==="mac")J=J.check(t1.mac());else if(Q==="cidr")J=J.check(t1.cidrv4());else if(Q==="cidr-v6")J=J.check(t1.cidrv6());else if(Q==="base64")J=J.check(t1.base64());else if(Q==="base64url")J=J.check(t1.base64url());else if(Q==="e164")J=J.check(t1.e164());else if(Q==="jwt")J=J.check(t1.jwt());else if(Q==="emoji")J=J.check(t1.emoji());else if(Q==="nanoid")J=J.check(t1.nanoid());else if(Q==="cuid")J=J.check(t1.cuid());else if(Q==="cuid2")J=J.check(t1.cuid2());else if(Q==="ulid")J=J.check(t1.ulid());else if(Q==="xid")J=J.check(t1.xid());else if(Q==="ksuid")J=J.check(t1.ksuid())}if(typeof $.minLength==="number")J=J.min($.minLength);if(typeof $.maxLength==="number")J=J.max($.maxLength);if($.pattern)J=J.regex(new RegExp($.pattern));G=J;break}case"number":case"integer":{let J=X==="integer"?t1.number().int():t1.number();if(typeof $.minimum==="number")J=J.min($.minimum);if(typeof $.maximum==="number")J=J.max($.maximum);if(typeof $.exclusiveMinimum==="number")J=J.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")J=J.gt($.minimum);if(typeof $.exclusiveMaximum==="number")J=J.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")J=J.lt($.maximum);if(typeof $.multipleOf==="number")J=J.multipleOf($.multipleOf);G=J;break}case"boolean":{G=t1.boolean();break}case"null":{G=t1.null();break}case"object":{let J={},Q=$.properties||{},W=new Set($.required||[]);for(let[Z,H]of Object.entries(Q)){let z=tX(H,Y);J[Z]=W.has(Z)?z:z.optional()}if($.propertyNames){let Z=tX($.propertyNames,Y),H=$.additionalProperties&&typeof $.additionalProperties==="object"?tX($.additionalProperties,Y):t1.any();if(Object.keys(J).length===0){G=t1.record(Z,H);break}let z=t1.object(J).passthrough(),V=t1.looseRecord(Z,H);G=t1.intersection(z,V);break}if($.patternProperties){let Z=$.patternProperties,H=Object.keys(Z),z=[];for(let F of H){let L=tX(Z[F],Y),N=t1.string().regex(new RegExp(F));z.push(t1.looseRecord(N,L))}let V=[];if(Object.keys(J).length>0)V.push(t1.object(J).passthrough());if(V.push(...z),V.length===0)G=t1.object({}).passthrough();else if(V.length===1)G=V[0];else{let F=t1.intersection(V[0],V[1]);for(let L=2;L<V.length;L++)F=t1.intersection(F,V[L]);G=F}break}let K=t1.object(J);if($.additionalProperties===!1)G=K.strict();else if(typeof $.additionalProperties==="object")G=K.catchall(tX($.additionalProperties,Y));else G=K.passthrough();break}case"array":{let{prefixItems:J,items:Q}=$;if(J&&Array.isArray(J)){let W=J.map((Z)=>tX(Z,Y)),K=Q&&typeof Q==="object"&&!Array.isArray(Q)?tX(Q,Y):void 0;if(K)G=t1.tuple(W).rest(K);else G=t1.tuple(W);if(typeof $.minItems==="number")G=G.check(t1.minLength($.minItems));if(typeof $.maxItems==="number")G=G.check(t1.maxLength($.maxItems))}else if(Array.isArray(Q)){let W=Q.map((Z)=>tX(Z,Y)),K=$.additionalItems&&typeof $.additionalItems==="object"?tX($.additionalItems,Y):void 0;if(K)G=t1.tuple(W).rest(K);else G=t1.tuple(W);if(typeof $.minItems==="number")G=G.check(t1.minLength($.minItems));if(typeof $.maxItems==="number")G=G.check(t1.maxLength($.maxItems))}else if(Q!==void 0){let W=tX(Q,Y),K=t1.array(W);if(typeof $.minItems==="number")K=K.min($.minItems);if(typeof $.maxItems==="number")K=K.max($.maxItems);G=K}else G=t1.array(t1.any());break}default:throw Error(`Unsupported type: ${X}`)}return G}function tX($,Y){if(typeof $==="boolean")return $?t1.any():t1.never();let X=$g1($,Y),G=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let K=$.anyOf.map((H)=>tX(H,Y)),Z=t1.union(K);X=G?t1.intersection(X,Z):Z}if($.oneOf&&Array.isArray($.oneOf)){let K=$.oneOf.map((H)=>tX(H,Y)),Z=t1.xor(K);X=G?t1.intersection(X,Z):Z}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)X=G?X:t1.any();else{let K=G?X:tX($.allOf[0],Y),Z=G?0:1;for(let H=Z;H<$.allOf.length;H++)K=t1.intersection(K,tX($.allOf[H],Y));X=K}if($.nullable===!0&&Y.version==="openapi-3.0")X=t1.nullable(X);if($.readOnly===!0)X=t1.readonly(X);if($.default!==void 0)X=X.default($.default);let J={},Q=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let K of Q)if(K in $)J[K]=$[K];let W=["contentEncoding","contentMediaType","contentSchema"];for(let K of W)if(K in $)J[K]=$[K];for(let K of Object.keys($))if(!GK8.has(K))J[K]=$[K];if(Object.keys(J).length>0)Y.registry.add(X,J);if($.description)X=X.describe($.description);return X}function IT0($,Y){if(typeof $==="boolean")return $?t1.any():t1.never();let X;try{X=JSON.parse(JSON.stringify($))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let G=JK8(X,Y?.defaultTarget),J=X.$defs||X.definitions||{},Q={version:G,defs:J,refs:new Map,processing:new Set,rootSchema:X,registry:Y?.registry??fY};return tX(X,Q)}var t1,GK8;var Yg1=V0(()=>{Pb();g00();Yh();Gh();t1={...Xh,...f00,iso:Az},GK8=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var aw={};W8(aw,{string:()=>WK8,number:()=>KK8,date:()=>HK8,boolean:()=>ZK8,bigint:()=>UK8});function WK8($){return M_0(Bz,$)}function KK8($){return __0(Ez,$)}function ZK8($){return j_0(oB,$)}function UK8($){return T_0(tB,$)}function HK8($){return I_0(ML,$)}var Xg1=V0(()=>{sX();Gh()});var U={};W8(U,{xor:()=>ZT0,xid:()=>xj0,void:()=>JT0,uuidv7:()=>jj0,uuidv6:()=>_j0,uuidv4:()=>wj0,uuid:()=>Pj0,util:()=>V1,url:()=>Oz,uppercase:()=>hB,unknown:()=>u9,union:()=>p9,undefined:()=>GT0,ulid:()=>vj0,uint64:()=>YT0,uint32:()=>tj0,tuple:()=>K10,trim:()=>dB,treeifyError:()=>xt,transform:()=>jh,toUpperCase:()=>lB,toLowerCase:()=>cB,toJSONSchema:()=>e$,templateLiteral:()=>ET0,symbol:()=>XT0,superRefine:()=>k10,success:()=>NT0,stringbool:()=>jT0,stringFormat:()=>lj0,string:()=>T0,strictObject:()=>KT0,startsWith:()=>gB,slugify:()=>iB,size:()=>LL,setErrorMap:()=>of1,set:()=>VT0,safeParseAsync:()=>oX,safeParse:()=>p00,safeEncodeAsync:()=>a00,safeEncode:()=>n00,safeDecodeAsync:()=>s00,safeDecode:()=>r00,registry:()=>qb,regexes:()=>mG,regex:()=>yB,refine:()=>S10,record:()=>q9,readonly:()=>w10,property:()=>ab,promise:()=>MT0,prettifyError:()=>yt,preprocess:()=>rw,prefault:()=>A10,positive:()=>lb,pipe:()=>Qh,partialRecord:()=>UT0,parseAsync:()=>u00,parse:()=>m00,overwrite:()=>m2,optional:()=>H5,object:()=>k1,number:()=>H8,nullish:()=>DT0,nullable:()=>hw,null:()=>mw,normalize:()=>pB,nonpositive:()=>nb,nonoptional:()=>B10,nonnegative:()=>rb,never:()=>_h,negative:()=>ib,nativeEnum:()=>FT0,nanoid:()=>Cj0,nan:()=>AT0,multipleOf:()=>Dz,minSize:()=>HZ,minLength:()=>H3,mime:()=>uB,meta:()=>wT0,maxSize:()=>Nz,maxLength:()=>DL,map:()=>zT0,mac:()=>hj0,lte:()=>UQ,lt:()=>ZZ,lowercase:()=>bB,looseRecord:()=>HT0,looseObject:()=>$7,locales:()=>xB,literal:()=>A4,length:()=>NL,lazy:()=>T10,ksuid:()=>yj0,keyof:()=>WT0,jwt:()=>cj0,json:()=>TT0,iso:()=>Az,ipv6:()=>fj0,ipv4:()=>bj0,invertCodec:()=>OT0,intersection:()=>$O,int64:()=>$T0,int32:()=>oj0,int:()=>Jh,instanceof:()=>_T0,includes:()=>fB,httpUrl:()=>Tj0,hostname:()=>ij0,hex:()=>nj0,hash:()=>rj0,guid:()=>qj0,gte:()=>aX,gt:()=>UZ,globalRegistry:()=>fY,getErrorMap:()=>tf1,function:()=>RT0,fromJSONSchema:()=>IT0,formatError:()=>Rw,float64:()=>sj0,float32:()=>aj0,flattenError:()=>Mw,file:()=>LT0,exactOptional:()=>L10,enum:()=>gY,endsWith:()=>mB,encodeAsync:()=>l00,encode:()=>d00,emoji:()=>Ij0,email:()=>Rj0,e164:()=>dj0,discriminatedUnion:()=>pw,describe:()=>PT0,decodeAsync:()=>i00,decode:()=>c00,date:()=>QT0,custom:()=>Ih,cuid2:()=>kj0,cuid:()=>Sj0,core:()=>u2,config:()=>S$,coerce:()=>aw,codec:()=>BT0,clone:()=>hY,cidrv6:()=>mj0,cidrv4:()=>gj0,check:()=>qT0,catch:()=>M10,boolean:()=>U9,bigint:()=>ej0,base64url:()=>pj0,base64:()=>uj0,array:()=>y1,any:()=>wh,_function:()=>RT0,_default:()=>D10,_ZodString:()=>Kh,ZodXor:()=>J10,ZodXID:()=>Lh,ZodVoid:()=>G10,ZodUnknown:()=>Y10,ZodUnion:()=>RL,ZodUndefined:()=>e00,ZodUUID:()=>zZ,ZodURL:()=>fw,ZodULID:()=>Fh,ZodType:()=>j6,ZodTuple:()=>W10,ZodTransform:()=>V10,ZodTemplateLiteral:()=>_10,ZodSymbol:()=>t00,ZodSuccess:()=>O10,ZodStringFormat:()=>m9,ZodString:()=>Bz,ZodSet:()=>U10,ZodRecord:()=>rB,ZodRealError:()=>pG,ZodReadonly:()=>P10,ZodPromise:()=>I10,ZodPreprocess:()=>q10,ZodPrefault:()=>N10,ZodPipe:()=>lw,ZodOptional:()=>Rz,ZodObject:()=>Mz,ZodNumberFormat:()=>EL,ZodNumber:()=>Ez,ZodNullable:()=>dw,ZodNull:()=>gw,ZodNonOptional:()=>Th,ZodNever:()=>X10,ZodNanoID:()=>Hh,ZodNaN:()=>R10,ZodMap:()=>Z10,ZodMAC:()=>o00,ZodLiteral:()=>H10,ZodLazy:()=>j10,ZodKSUID:()=>Dh,ZodJWT:()=>qh,ZodIssueCode:()=>x10,ZodIntersection:()=>eB,ZodISOTime:()=>eb,ZodISODuration:()=>$h,ZodISODateTime:()=>ob,ZodISODate:()=>tb,ZodIPv6:()=>Ah,ZodIPv4:()=>Nh,ZodGUID:()=>bw,ZodFunction:()=>C10,ZodFirstPartyTypeKind:()=>v10,ZodFile:()=>z10,ZodExactOptional:()=>F10,ZodError:()=>af1,ZodEnum:()=>aB,ZodEmoji:()=>Uh,ZodEmail:()=>Zh,ZodE164:()=>Rh,ZodDiscriminatedUnion:()=>Q10,ZodDefault:()=>cw,ZodDate:()=>ML,ZodCustomStringFormat:()=>sB,ZodCustom:()=>nw,ZodCodec:()=>iw,ZodCatch:()=>E10,ZodCUID2:()=>Vh,ZodCUID:()=>zh,ZodCIDRv6:()=>Oh,ZodCIDRv4:()=>Bh,ZodBoolean:()=>oB,ZodBigIntFormat:()=>Ph,ZodBigInt:()=>tB,ZodBase64URL:()=>Mh,ZodBase64:()=>Eh,ZodArray:()=>uw,ZodAny:()=>$10,TimePrecision:()=>Z00,NEVER:()=>Aw,$output:()=>J00,$input:()=>Q00,$brand:()=>Ct});var Ch=V0(()=>{sX();sX();Sw0();sX();yw();Yg1();G00();Yh();Yh();Xg1();Gh();g00();Ej0();Mj0();ef1();S$(Ob())});var ZY=V0(()=>{Ch();Ch()});function y10($,Y){if(!$)return Y;if(!Y)return $;return{...$,...Y,agents:{...$.agents,...Y.agents}}}var eX="mastra__resourceId",DX="mastra__threadId",Sh="mastra__versions",p1=class{registry=new Map;constructor($){if($&&typeof $==="object"&&typeof $[Symbol.iterator]!=="function")this.registry=new Map(Object.entries($));else this.registry=new Map($)}set($,Y){this.registry.set($,Y)}get($){return this.registry.get($)}has($){return this.registry.has($)}delete($){return this.registry.delete($)}clear(){this.registry.clear()}keys(){return this.registry.keys()}values(){return this.registry.values()}entries(){return this.registry.entries()}size(){return this.registry.size}forEach($){this.registry.forEach($)}toJSON(){let $={};for(let[Y,X]of this.registry.entries())if(this.isSerializable(X))$[Y]=X;return $}isSerializable($){if($===null||$===void 0)return!0;if(typeof $==="function")return!1;if(typeof $==="symbol")return!1;if(typeof $!=="object")return!0;try{return JSON.stringify($),!0}catch{return!1}}get all(){return Object.fromEntries(this.registry)}};var qL=()=>{};function ST0($){return $ in CT0}function Zg1($){return $.every(ST0)}function kT0($){let Y=$??process.env.MASTRA_EE_LICENSE;if(!Y)return{valid:!1};if(Y.length<32)return{valid:!1};return{valid:!0,features:["user","session","sso","rbac","acl","fga","agent-builder"],tier:"enterprise"}}function ow(){let $=Date.now();if(YO&&$-Gg1<zK8)return YO.valid;if(YO=kT0(),Gg1=$,!YO.valid&&process.env.MASTRA_EE_LICENSE)console.warn("[mastra/auth-ee] Invalid or expired EE license. EE features are disabled.");return YO.valid}function Hg1($){if(!ow())return!1;if(!YO?.features)return!0;return YO.features.includes($)}function f10(){return process.env.MASTRA_DEV==="true"||process.env.MASTRA_DEV==="1"||!1}function zg1(){if(f10())return!0;return ow()}function Vg1($){return"user"in $&&$.user!==null}function PL($,Y){return $!==null&&typeof $==="object"&&Y in $}function VK8($){if(!$||typeof $!=="object")return!1;return"isMastraCloudAuth"in $&&$.isMastraCloudAuth===!0}function FK8($){if(!$||typeof $!=="object")return!1;return"isSimpleAuth"in $&&$.isSimpleAuth===!0}function Jg1($){return $.some((Y)=>Y==="*"||Y==="*:*")}async function Fg1($,Y,X){if(!$)return{enabled:!1,login:null};let G=ow(),J=VK8($),Q=FK8($),W=f10(),K=G||J||Q||W,Z=null,H=PL($,"getLoginUrl")&&K,z=PL($,"signIn")&&K,V=(X?.apiPrefix||"/api").trim(),F=V.startsWith("/")?V:`/${V}`,N=`${F.endsWith("/")?F.slice(0,-1):F}/auth/sso/login`,D=!0;if(PL($,"signIn")){let _=$;if(typeof _.isSignUpEnabled==="function")D=_.isSignUpEnabled()}if(H&&z){let _=$.getLoginButtonConfig();Z={type:"both",signUpEnabled:D,description:_.description,sso:{..._,url:N}}}else if(H){let _=$.getLoginButtonConfig();Z={type:"sso",description:_.description,sso:{..._,url:N}}}else if(z)Z={type:"credentials",signUpEnabled:D};let A=null;if(PL($,"getCurrentUser")&&K)try{A=await $.getCurrentUser(Y)}catch{A=null}if(!A)return{enabled:!0,login:Z};let B=X?.rbac,O=!!B&&K,E=!!X?.fga&&K,M={user:PL($,"getCurrentUser")&&K,session:PL($,"createSession")&&K,sso:PL($,"getLoginUrl")&&K,rbac:O,acl:PL($,"canAccess")&&K,fga:E},R=null;if(O&&B)try{let _=await B.getRoles(A),P=await B.getPermissions(A);R={roles:_,permissions:P}}catch{R=null}let q;if(R&&B?.getAvailableRoles){if(Jg1(R.permissions))try{let _=await B.getAvailableRoles(),P=B.getPermissionsForRole;if(P)q=(await Promise.allSettled(_.map(async(j)=>({role:j,perms:await P(j.id)})))).flatMap((j)=>{if(j.status!=="fulfilled")return console.warn("[auth/ee] failed to list permissions for role:",j.reason),[];return Jg1(j.value.perms)?[]:[j.value.role]});else q=_}catch(_){console.warn("[auth/ee] failed to list available roles for admin user:",_)}}return{enabled:!0,login:Z,user:{id:A.id,email:A.email,name:A.name,avatarUrl:A.avatarUrl},capabilities:M,access:R,availableRoles:q}}function Lg1($){return g10.find((Y)=>Y.id===$)}function b10($,Y=g10){let X=new Set,G=new Set;function J(Q){if(G.has(Q))return;G.add(Q);let W=Y.find((K)=>K.id===Q);if(!W)return;for(let K of W.permissions)X.add(K);if(W.inherits)for(let K of W.inherits)J(K)}for(let Q of $)J(Q);return Array.from(X)}function XO($,Y){if($==="*")return!0;let X=$.split(":"),G=Y.split(":"),J=LK8[X[0]??""];if(J&&J.includes(G[0]??"")){let V=[G[0],...X.slice(1)].join(":");return XO(V,Y)}if(X.length<2||G.length<2)return $===Y;let[Q,W,K]=X,[Z,H,z]=G;if(Q==="*"){if(W==="*"){if(K===void 0)return!0;return K===z}if(W!==H)return!1;if(K===void 0)return!0;return K===z}if(Q!==Z)return!1;if(W==="*"){if(K===void 0)return!0;return K===z}if(W!==H)return!1;if(K===void 0)return!0;return K===z}function Dg1($,Y){return $.some((X)=>XO(X,Y))}function h10($,Y){let X=new Set,G=Y._default??[];for(let J of $){let Q=Y[J];if(Q)for(let W of Q)X.add(W);else for(let W of G)X.add(W)}return Array.from(X)}var Qg1,Wg1,CT0,Kg1,qz,YO=null,Gg1=0,zK8=60000,Ug1,g10,LK8,Ng1=class{roles;_roleMapping;getUserRolesFn;permissionCache=new Map;get roleMapping(){return this._roleMapping}constructor($){if("roles"in $&&$.roles)this.roles=$.roles;if("roleMapping"in $&&$.roleMapping)this._roleMapping=$.roleMapping;this.getUserRolesFn=$.getUserRoles}async getRoles($){return await this.getUserRolesFn($)}async hasRole($,Y){return(await this.getRoles($)).includes(Y)}async getPermissions($){let Y=await this.getRoles($),X=Y.sort().join(","),G=this.permissionCache.get(X);if(G)return G;let J;if(this._roleMapping)J=h10(Y,this._roleMapping);else if(this.roles)J=b10(Y,this.roles);else J=[];return this.permissionCache.set(X,J),J}async hasPermission($,Y){return(await this.getPermissions($)).some((G)=>XO(G,Y))}async hasAllPermissions($,Y){let X=await this.getPermissions($);return Y.every((G)=>X.some((J)=>XO(J,G)))}async hasAnyPermission($,Y){let X=await this.getPermissions($);return Y.some((G)=>X.some((J)=>XO(J,G)))}clearCache(){this.permissionCache.clear()}getRoleDefinitions(){return this.roles??[]}getRoleDefinition($){return this.roles?.find((Y)=>Y.id===$)}async getAvailableRoles(){if(this.roles)return this.roles.map(($)=>({id:$.id,name:$.name}));if(this._roleMapping)return Object.keys(this._roleMapping).filter(($)=>$!=="_default").map(($)=>({id:$,name:$}));return[]}async getPermissionsForRole($){if(this._roleMapping)return h10([$],this._roleMapping);if(this.roles)return b10([$],this.roles);return[]}};var vT0=V0(()=>{Qg1=["a2a","agent-builder","agents","auth","background-tasks","channels","datasets","embedders","experiments","infrastructure","logs","mcp","memory","observability","processor-providers","processors","schedules","scores","stored-agents","stored-mcp-clients","stored-prompt-blocks","stored-scorers","stored-skills","stored-workspaces","system","tool-providers","tools","vector","vectors","workflows","workspaces"],Wg1=["create","delete","execute","publish","read","share","write"],CT0={"*":"*","*:create":"*:create","*:delete":"*:delete","*:execute":"*:execute","*:publish":"*:publish","*:read":"*:read","*:share":"*:share","*:write":"*:write","a2a:*":"a2a:*","agent-builder:*":"agent-builder:*","agents:*":"agents:*","auth:*":"auth:*","background-tasks:*":"background-tasks:*","channels:*":"channels:*","datasets:*":"datasets:*","embedders:*":"embedders:*","experiments:*":"experiments:*","infrastructure:*":"infrastructure:*","logs:*":"logs:*","mcp:*":"mcp:*","memory:*":"memory:*","observability:*":"observability:*","processor-providers:*":"processor-providers:*","processors:*":"processors:*","schedules:*":"schedules:*","scores:*":"scores:*","stored-agents:*":"stored-agents:*","stored-mcp-clients:*":"stored-mcp-clients:*","stored-prompt-blocks:*":"stored-prompt-blocks:*","stored-scorers:*":"stored-scorers:*","stored-skills:*":"stored-skills:*","stored-workspaces:*":"stored-workspaces:*","system:*":"system:*","tool-providers:*":"tool-providers:*","tools:*":"tools:*","vector:*":"vector:*","vectors:*":"vectors:*","workflows:*":"workflows:*","workspaces:*":"workspaces:*","a2a:read":"a2a:read","a2a:write":"a2a:write","agent-builder:execute":"agent-builder:execute","agent-builder:read":"agent-builder:read","agent-builder:write":"agent-builder:write","agents:create":"agents:create","agents:delete":"agents:delete","agents:execute":"agents:execute","agents:read":"agents:read","agents:write":"agents:write","auth:read":"auth:read","background-tasks:read":"background-tasks:read","channels:read":"channels:read","channels:write":"channels:write","datasets:delete":"datasets:delete","datasets:execute":"datasets:execute","datasets:read":"datasets:read","datasets:write":"datasets:write","embedders:read":"embedders:read","experiments:read":"experiments:read","infrastructure:read":"infrastructure:read","logs:read":"logs:read","mcp:execute":"mcp:execute","mcp:read":"mcp:read","mcp:write":"mcp:write","memory:delete":"memory:delete","memory:execute":"memory:execute","memory:read":"memory:read","memory:write":"memory:write","observability:read":"observability:read","observability:write":"observability:write","processor-providers:read":"processor-providers:read","processors:execute":"processors:execute","processors:read":"processors:read","schedules:execute":"schedules:execute","schedules:read":"schedules:read","schedules:write":"schedules:write","scores:read":"scores:read","scores:write":"scores:write","stored-agents:delete":"stored-agents:delete","stored-agents:publish":"stored-agents:publish","stored-agents:read":"stored-agents:read","stored-agents:share":"stored-agents:share","stored-agents:write":"stored-agents:write","stored-mcp-clients:delete":"stored-mcp-clients:delete","stored-mcp-clients:publish":"stored-mcp-clients:publish","stored-mcp-clients:read":"stored-mcp-clients:read","stored-mcp-clients:write":"stored-mcp-clients:write","stored-prompt-blocks:delete":"stored-prompt-blocks:delete","stored-prompt-blocks:publish":"stored-prompt-blocks:publish","stored-prompt-blocks:read":"stored-prompt-blocks:read","stored-prompt-blocks:write":"stored-prompt-blocks:write","stored-scorers:delete":"stored-scorers:delete","stored-scorers:publish":"stored-scorers:publish","stored-scorers:read":"stored-scorers:read","stored-scorers:write":"stored-scorers:write","stored-skills:delete":"stored-skills:delete","stored-skills:publish":"stored-skills:publish","stored-skills:read":"stored-skills:read","stored-skills:share":"stored-skills:share","stored-skills:write":"stored-skills:write","stored-workspaces:delete":"stored-workspaces:delete","stored-workspaces:read":"stored-workspaces:read","stored-workspaces:write":"stored-workspaces:write","system:read":"system:read","tool-providers:read":"tool-providers:read","tools:execute":"tools:execute","tools:read":"tools:read","vector:delete":"vector:delete","vector:execute":"vector:execute","vector:read":"vector:read","vector:write":"vector:write","vectors:read":"vectors:read","workflows:delete":"workflows:delete","workflows:execute":"workflows:execute","workflows:read":"workflows:read","workflows:write":"workflows:write","workspaces:delete":"workspaces:delete","workspaces:read":"workspaces:read","workspaces:write":"workspaces:write","stored:*":"stored:*","stored:read":"stored:read","stored:write":"stored:write","stored:delete":"stored:delete"},Kg1=["a2a:read","a2a:write","agent-builder:execute","agent-builder:read","agent-builder:write","agents:create","agents:delete","agents:execute","agents:read","agents:write","auth:read","background-tasks:read","channels:read","channels:write","datasets:delete","datasets:execute","datasets:read","datasets:write","embedders:read","experiments:read","infrastructure:read","logs:read","mcp:execute","mcp:read","mcp:write","memory:delete","memory:execute","memory:read","memory:write","observability:read","observability:write","processor-providers:read","processors:execute","processors:read","schedules:execute","schedules:read","schedules:write","scores:read","scores:write","stored-agents:delete","stored-agents:publish","stored-agents:read","stored-agents:share","stored-agents:write","stored-mcp-clients:delete","stored-mcp-clients:publish","stored-mcp-clients:read","stored-mcp-clients:write","stored-prompt-blocks:delete","stored-prompt-blocks:publish","stored-prompt-blocks:read","stored-prompt-blocks:write","stored-scorers:delete","stored-scorers:publish","stored-scorers:read","stored-scorers:write","stored-skills:delete","stored-skills:publish","stored-skills:read","stored-skills:share","stored-skills:write","stored-workspaces:delete","stored-workspaces:read","stored-workspaces:write","system:read","tool-providers:read","tools:execute","tools:read","vector:delete","vector:execute","vector:read","vector:write","vectors:read","workflows:delete","workflows:execute","workflows:read","workflows:write","workspaces:delete","workspaces:read","workspaces:write"],qz={A2A_READ:"a2a:read",A2A_WRITE:"a2a:write",AGENT_BUILDER_EXECUTE:"agent-builder:execute",AGENT_BUILDER_READ:"agent-builder:read",AGENT_BUILDER_WRITE:"agent-builder:write",AGENTS_CREATE:"agents:create",AGENTS_DELETE:"agents:delete",AGENTS_EXECUTE:"agents:execute",AGENTS_READ:"agents:read",AGENTS_WRITE:"agents:write",AUTH_READ:"auth:read",BACKGROUND_TASKS_READ:"background-tasks:read",CHANNELS_READ:"channels:read",CHANNELS_WRITE:"channels:write",DATASETS_DELETE:"datasets:delete",DATASETS_EXECUTE:"datasets:execute",DATASETS_READ:"datasets:read",DATASETS_WRITE:"datasets:write",EMBEDDERS_READ:"embedders:read",EXPERIMENTS_READ:"experiments:read",INFRASTRUCTURE_READ:"infrastructure:read",LOGS_READ:"logs:read",MCP_EXECUTE:"mcp:execute",MCP_READ:"mcp:read",MCP_WRITE:"mcp:write",MEMORY_DELETE:"memory:delete",MEMORY_EXECUTE:"memory:execute",MEMORY_READ:"memory:read",MEMORY_WRITE:"memory:write",OBSERVABILITY_READ:"observability:read",OBSERVABILITY_WRITE:"observability:write",PROCESSOR_PROVIDERS_READ:"processor-providers:read",PROCESSORS_EXECUTE:"processors:execute",PROCESSORS_READ:"processors:read",SCHEDULES_EXECUTE:"schedules:execute",SCHEDULES_READ:"schedules:read",SCHEDULES_WRITE:"schedules:write",SCORES_READ:"scores:read",SCORES_WRITE:"scores:write",STORED_AGENTS_DELETE:"stored-agents:delete",STORED_AGENTS_PUBLISH:"stored-agents:publish",STORED_AGENTS_READ:"stored-agents:read",STORED_AGENTS_SHARE:"stored-agents:share",STORED_AGENTS_WRITE:"stored-agents:write",STORED_MCP_CLIENTS_DELETE:"stored-mcp-clients:delete",STORED_MCP_CLIENTS_PUBLISH:"stored-mcp-clients:publish",STORED_MCP_CLIENTS_READ:"stored-mcp-clients:read",STORED_MCP_CLIENTS_WRITE:"stored-mcp-clients:write",STORED_PROMPT_BLOCKS_DELETE:"stored-prompt-blocks:delete",STORED_PROMPT_BLOCKS_PUBLISH:"stored-prompt-blocks:publish",STORED_PROMPT_BLOCKS_READ:"stored-prompt-blocks:read",STORED_PROMPT_BLOCKS_WRITE:"stored-prompt-blocks:write",STORED_SCORERS_DELETE:"stored-scorers:delete",STORED_SCORERS_PUBLISH:"stored-scorers:publish",STORED_SCORERS_READ:"stored-scorers:read",STORED_SCORERS_WRITE:"stored-scorers:write",STORED_SKILLS_DELETE:"stored-skills:delete",STORED_SKILLS_PUBLISH:"stored-skills:publish",STORED_SKILLS_READ:"stored-skills:read",STORED_SKILLS_SHARE:"stored-skills:share",STORED_SKILLS_WRITE:"stored-skills:write",STORED_WORKSPACES_DELETE:"stored-workspaces:delete",STORED_WORKSPACES_READ:"stored-workspaces:read",STORED_WORKSPACES_WRITE:"stored-workspaces:write",SYSTEM_READ:"system:read",TOOL_PROVIDERS_READ:"tool-providers:read",TOOLS_EXECUTE:"tools:execute",TOOLS_READ:"tools:read",VECTOR_DELETE:"vector:delete",VECTOR_EXECUTE:"vector:execute",VECTOR_READ:"vector:read",VECTOR_WRITE:"vector:write",VECTORS_READ:"vectors:read",WORKFLOWS_DELETE:"workflows:delete",WORKFLOWS_EXECUTE:"workflows:execute",WORKFLOWS_READ:"workflows:read",WORKFLOWS_WRITE:"workflows:write",WORKSPACES_DELETE:"workspaces:delete",WORKSPACES_READ:"workspaces:read",WORKSPACES_WRITE:"workspaces:write"};Ug1=ow;g10=[{id:"owner",name:"Owner",description:"Full access to all features and settings",permissions:["*"]},{id:"admin",name:"Admin",description:"Manage agents, workflows, and team members",permissions:["*:read","*:write","*:execute","*:publish","*:share"]},{id:"member",name:"Member",description:"Execute agents and workflows",permissions:["*:read","*:execute"]},{id:"viewer",name:"Viewer",description:"Read-only access",permissions:["*:read"]}];LK8={stored:["stored-agents","stored-mcp-clients","stored-prompt-blocks","stored-scorers","stored-skills","stored-workspaces"]}});var VZ,dG,DK8=class{name;level;transports;constructor($={}){this.name=$.name||"Mastra",this.level=$.level||dG.ERROR,this.transports=new Map(Object.entries($.transports||{}))}getTransports(){return this.transports}trackException($,Y){}async listLogs($,Y){if(!$||!this.transports.has($))return{logs:[],total:0,page:Y?.page??1,perPage:Y?.perPage??100,hasMore:!1};return this.transports.get($).listLogs(Y)??{logs:[],total:0,page:Y?.page??1,perPage:Y?.perPage??100,hasMore:!1}}async listLogsByRunId({transportId:$,runId:Y,fromDate:X,toDate:G,logLevel:J,filters:Q,page:W,perPage:K}){if(!$||!this.transports.has($)||!Y)return{logs:[],total:0,page:W??1,perPage:K??100,hasMore:!1};return this.transports.get($).listLogsByRunId({runId:Y,fromDate:X,toDate:G,logLevel:J,filters:Q,page:W,perPage:K})??{logs:[],total:0,page:W??1,perPage:K??100,hasMore:!1}}},z3;var kh=V0(()=>{VZ={AGENT:"AGENT",OBSERVABILITY:"OBSERVABILITY",AUTH:"AUTH",BROWSER:"BROWSER",NETWORK:"NETWORK",WORKFLOW:"WORKFLOW",LLM:"LLM",TTS:"TTS",VOICE:"VOICE",VECTOR:"VECTOR",BUNDLER:"BUNDLER",DEPLOYER:"DEPLOYER",MEMORY:"MEMORY",STORAGE:"STORAGE",EMBEDDINGS:"EMBEDDINGS",MCP_SERVER:"MCP_SERVER",SERVER_CACHE:"SERVER_CACHE",SERVER:"SERVER",WORKSPACE:"WORKSPACE",CHANNEL:"CHANNEL"},dG={DEBUG:"debug",INFO:"info",WARN:"warn",ERROR:"error",NONE:"silent"},z3=class $ extends DK8{component;filter;constructor(Y={}){super(Y);this.component=Y.component,this.filter=Y.filter}child(Y){let X=typeof Y==="string"?Y:Y?.component??this.component;return new $({name:this.name,level:this.level,component:X,filter:this.filter})}shouldLog(Y,X,G){if(!this.filter)return!0;try{return this.filter({component:this.component,level:Y,message:X,args:G})}catch(J){return console.error(`[Logger] Filter error for component=${this.component} level=${Y}:`,J),!0}}prefix(){return this.component?`[${this.component}] `:""}debug(Y,...X){if(this.level===dG.DEBUG&&this.shouldLog(dG.DEBUG,Y,X))console.info(`${this.prefix()}${Y}`,...X)}info(Y,...X){if((this.level===dG.INFO||this.level===dG.DEBUG)&&this.shouldLog(dG.INFO,Y,X))console.info(`${this.prefix()}${Y}`,...X)}warn(Y,...X){if((this.level===dG.WARN||this.level===dG.INFO||this.level===dG.DEBUG)&&this.shouldLog(dG.WARN,Y,X))console.info(`${this.prefix()}${Y}`,...X)}error(Y,...X){if((this.level===dG.ERROR||this.level===dG.WARN||this.level===dG.INFO||this.level===dG.DEBUG)&&this.shouldLog(dG.ERROR,Y,X))console.error(`${this.prefix()}${Y}`,...X)}async listLogs(Y,X){return{logs:[],total:0,page:X?.page??1,perPage:X?.perPage??100,hasMore:!1}}async listLogsByRunId(Y){return{logs:[],total:0,page:Y.page??1,perPage:Y.perPage??100,hasMore:!1}}}});var u8=class{component=VZ.LLM;logger;name;#$;constructor({component:$,name:Y,rawConfig:X}){this.component=$||VZ.LLM,this.name=Y,this.#$=X,this.logger=new z3({name:`${this.component} - ${this.name}`})}toRawConfig(){return this.#$}__setRawConfig($){this.#$=$}__setLogger($){this.logger="child"in $&&typeof $.child==="function"?$.child({component:this.component}):$}};var p2=V0(()=>{kh()});var Ag1;var xT0=V0(()=>{Ch();Ch();Ag1=U});var V3={};W8(V3,{z:()=>U,xor:()=>ZT0,xid:()=>xj0,void:()=>JT0,uuidv7:()=>jj0,uuidv6:()=>_j0,uuidv4:()=>wj0,uuid:()=>Pj0,util:()=>V1,url:()=>Oz,uppercase:()=>hB,unknown:()=>u9,union:()=>p9,undefined:()=>GT0,ulid:()=>vj0,uint64:()=>YT0,uint32:()=>tj0,tuple:()=>K10,trim:()=>dB,treeifyError:()=>xt,transform:()=>jh,toUpperCase:()=>lB,toLowerCase:()=>cB,toJSONSchema:()=>e$,templateLiteral:()=>ET0,symbol:()=>XT0,superRefine:()=>k10,success:()=>NT0,stringbool:()=>jT0,stringFormat:()=>lj0,string:()=>T0,strictObject:()=>KT0,startsWith:()=>gB,slugify:()=>iB,size:()=>LL,setErrorMap:()=>of1,set:()=>VT0,safeParseAsync:()=>oX,safeParse:()=>p00,safeEncodeAsync:()=>a00,safeEncode:()=>n00,safeDecodeAsync:()=>s00,safeDecode:()=>r00,registry:()=>qb,regexes:()=>mG,regex:()=>yB,refine:()=>S10,record:()=>q9,readonly:()=>w10,property:()=>ab,promise:()=>MT0,prettifyError:()=>yt,preprocess:()=>rw,prefault:()=>A10,positive:()=>lb,pipe:()=>Qh,partialRecord:()=>UT0,parseAsync:()=>u00,parse:()=>m00,overwrite:()=>m2,optional:()=>H5,object:()=>k1,number:()=>H8,nullish:()=>DT0,nullable:()=>hw,null:()=>mw,normalize:()=>pB,nonpositive:()=>nb,nonoptional:()=>B10,nonnegative:()=>rb,never:()=>_h,negative:()=>ib,nativeEnum:()=>FT0,nanoid:()=>Cj0,nan:()=>AT0,multipleOf:()=>Dz,minSize:()=>HZ,minLength:()=>H3,mime:()=>uB,meta:()=>wT0,maxSize:()=>Nz,maxLength:()=>DL,map:()=>zT0,mac:()=>hj0,lte:()=>UQ,lt:()=>ZZ,lowercase:()=>bB,looseRecord:()=>HT0,looseObject:()=>$7,locales:()=>xB,literal:()=>A4,length:()=>NL,lazy:()=>T10,ksuid:()=>yj0,keyof:()=>WT0,jwt:()=>cj0,json:()=>TT0,iso:()=>Az,ipv6:()=>fj0,ipv4:()=>bj0,invertCodec:()=>OT0,intersection:()=>$O,int64:()=>$T0,int32:()=>oj0,int:()=>Jh,instanceof:()=>_T0,includes:()=>fB,httpUrl:()=>Tj0,hostname:()=>ij0,hex:()=>nj0,hash:()=>rj0,guid:()=>qj0,gte:()=>aX,gt:()=>UZ,globalRegistry:()=>fY,getErrorMap:()=>tf1,function:()=>RT0,fromJSONSchema:()=>IT0,formatError:()=>Rw,float64:()=>sj0,float32:()=>aj0,flattenError:()=>Mw,file:()=>LT0,exactOptional:()=>L10,enum:()=>gY,endsWith:()=>mB,encodeAsync:()=>l00,encode:()=>d00,emoji:()=>Ij0,email:()=>Rj0,e164:()=>dj0,discriminatedUnion:()=>pw,describe:()=>PT0,default:()=>NK8,decodeAsync:()=>i00,decode:()=>c00,date:()=>QT0,custom:()=>Ih,cuid2:()=>kj0,cuid:()=>Sj0,core:()=>u2,config:()=>S$,coerce:()=>aw,codec:()=>BT0,clone:()=>hY,cidrv6:()=>mj0,cidrv4:()=>gj0,check:()=>qT0,catch:()=>M10,boolean:()=>U9,bigint:()=>ej0,base64url:()=>pj0,base64:()=>uj0,array:()=>y1,any:()=>wh,_function:()=>RT0,_default:()=>D10,_ZodString:()=>Kh,ZodXor:()=>J10,ZodXID:()=>Lh,ZodVoid:()=>G10,ZodUnknown:()=>Y10,ZodUnion:()=>RL,ZodUndefined:()=>e00,ZodUUID:()=>zZ,ZodURL:()=>fw,ZodULID:()=>Fh,ZodType:()=>j6,ZodTuple:()=>W10,ZodTransform:()=>V10,ZodTemplateLiteral:()=>_10,ZodSymbol:()=>t00,ZodSuccess:()=>O10,ZodStringFormat:()=>m9,ZodString:()=>Bz,ZodSet:()=>U10,ZodRecord:()=>rB,ZodRealError:()=>pG,ZodReadonly:()=>P10,ZodPromise:()=>I10,ZodPreprocess:()=>q10,ZodPrefault:()=>N10,ZodPipe:()=>lw,ZodOptional:()=>Rz,ZodObject:()=>Mz,ZodNumberFormat:()=>EL,ZodNumber:()=>Ez,ZodNullable:()=>dw,ZodNull:()=>gw,ZodNonOptional:()=>Th,ZodNever:()=>X10,ZodNanoID:()=>Hh,ZodNaN:()=>R10,ZodMap:()=>Z10,ZodMAC:()=>o00,ZodLiteral:()=>H10,ZodLazy:()=>j10,ZodKSUID:()=>Dh,ZodJWT:()=>qh,ZodIssueCode:()=>x10,ZodIntersection:()=>eB,ZodISOTime:()=>eb,ZodISODuration:()=>$h,ZodISODateTime:()=>ob,ZodISODate:()=>tb,ZodIPv6:()=>Ah,ZodIPv4:()=>Nh,ZodGUID:()=>bw,ZodFunction:()=>C10,ZodFirstPartyTypeKind:()=>v10,ZodFile:()=>z10,ZodExactOptional:()=>F10,ZodError:()=>af1,ZodEnum:()=>aB,ZodEmoji:()=>Uh,ZodEmail:()=>Zh,ZodE164:()=>Rh,ZodDiscriminatedUnion:()=>Q10,ZodDefault:()=>cw,ZodDate:()=>ML,ZodCustomStringFormat:()=>sB,ZodCustom:()=>nw,ZodCodec:()=>iw,ZodCatch:()=>E10,ZodCUID2:()=>Vh,ZodCUID:()=>zh,ZodCIDRv6:()=>Oh,ZodCIDRv4:()=>Bh,ZodBoolean:()=>oB,ZodBigIntFormat:()=>Ph,ZodBigInt:()=>tB,ZodBase64URL:()=>Mh,ZodBase64:()=>Eh,ZodArray:()=>uw,ZodAny:()=>$10,TimePrecision:()=>Z00,NEVER:()=>Aw,$output:()=>J00,$input:()=>Q00,$brand:()=>Ct});var NK8;var O1=V0(()=>{xT0();xT0();NK8=Ag1});var z8,yT0,b1,F3=($)=>{switch(typeof $){case"undefined":return b1.undefined;case"string":return b1.string;case"number":return Number.isNaN($)?b1.nan:b1.number;case"boolean":return b1.boolean;case"function":return b1.function;case"bigint":return b1.bigint;case"symbol":return b1.symbol;case"object":if(Array.isArray($))return b1.array;if($===null)return b1.null;if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return b1.promise;if(typeof Map<"u"&&$ instanceof Map)return b1.map;if(typeof Set<"u"&&$ instanceof Set)return b1.set;if(typeof Date<"u"&&$ instanceof Date)return b1.date;return b1.object;default:return b1.unknown}};var vh=V0(()=>{(function($){$.assertEqual=(J)=>{};function Y(J){}$.assertIs=Y;function X(J){throw Error()}$.assertNever=X,$.arrayToEnum=(J)=>{let Q={};for(let W of J)Q[W]=W;return Q},$.getValidEnumValues=(J)=>{let Q=$.objectKeys(J).filter((K)=>typeof J[J[K]]!=="number"),W={};for(let K of Q)W[K]=J[K];return $.objectValues(W)},$.objectValues=(J)=>{return $.objectKeys(J).map(function(Q){return J[Q]})},$.objectKeys=typeof Object.keys==="function"?(J)=>Object.keys(J):(J)=>{let Q=[];for(let W in J)if(Object.prototype.hasOwnProperty.call(J,W))Q.push(W);return Q},$.find=(J,Q)=>{for(let W of J)if(Q(W))return W;return},$.isInteger=typeof Number.isInteger==="function"?(J)=>Number.isInteger(J):(J)=>typeof J==="number"&&Number.isFinite(J)&&Math.floor(J)===J;function G(J,Q=" | "){return J.map((W)=>typeof W==="string"?`'${W}'`:W).join(Q)}$.joinValues=G,$.jsonStringifyReplacer=(J,Q)=>{if(typeof Q==="bigint")return Q.toString();return Q}})(z8||(z8={}));(function($){$.mergeShapes=(Y,X)=>{return{...Y,...X}}})(yT0||(yT0={}));b1=z8.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var A1,AK8=($)=>{return JSON.stringify($,null,2).replace(/"([^"]+)":/g,"$1:")},HQ;var m10=V0(()=>{vh();A1=z8.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);HQ=class HQ extends Error{get errors(){return this.issues}constructor($){super();this.issues=[],this.addIssue=(X)=>{this.issues=[...this.issues,X]},this.addIssues=(X=[])=>{this.issues=[...this.issues,...X]};let Y=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,Y);else this.__proto__=Y;this.name="ZodError",this.issues=$}format($){let Y=$||function(J){return J.message},X={_errors:[]},G=(J)=>{for(let Q of J.issues)if(Q.code==="invalid_union")Q.unionErrors.map(G);else if(Q.code==="invalid_return_type")G(Q.returnTypeError);else if(Q.code==="invalid_arguments")G(Q.argumentsError);else if(Q.path.length===0)X._errors.push(Y(Q));else{let W=X,K=0;while(K<Q.path.length){let Z=Q.path[K];if(K!==Q.path.length-1)W[Z]=W[Z]||{_errors:[]};else W[Z]=W[Z]||{_errors:[]},W[Z]._errors.push(Y(Q));W=W[Z],K++}}};return G(this),X}static assert($){if(!($ instanceof HQ))throw Error(`Not a ZodError: ${$}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,z8.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten($=(Y)=>Y.message){let Y=Object.create(null),X=[];for(let G of this.issues)if(G.path.length>0){let J=G.path[0];Y[J]=Y[J]||[],Y[J].push($(G))}else X.push($(G));return{formErrors:X,fieldErrors:Y}}get formErrors(){return this.flatten()}};HQ.create=($)=>{return new HQ($)}});var BK8=($,Y)=>{let X;switch($.code){case A1.invalid_type:if($.received===b1.undefined)X="Required";else X=`Expected ${$.expected}, received ${$.received}`;break;case A1.invalid_literal:X=`Invalid literal value, expected ${JSON.stringify($.expected,z8.jsonStringifyReplacer)}`;break;case A1.unrecognized_keys:X=`Unrecognized key(s) in object: ${z8.joinValues($.keys,", ")}`;break;case A1.invalid_union:X="Invalid input";break;case A1.invalid_union_discriminator:X=`Invalid discriminator value. Expected ${z8.joinValues($.options)}`;break;case A1.invalid_enum_value:X=`Invalid enum value. Expected ${z8.joinValues($.options)}, received '${$.received}'`;break;case A1.invalid_arguments:X="Invalid function arguments";break;case A1.invalid_return_type:X="Invalid function return type";break;case A1.invalid_date:X="Invalid date";break;case A1.invalid_string:if(typeof $.validation==="object")if("includes"in $.validation){if(X=`Invalid input: must include "${$.validation.includes}"`,typeof $.validation.position==="number")X=`${X} at one or more positions greater than or equal to ${$.validation.position}`}else if("startsWith"in $.validation)X=`Invalid input: must start with "${$.validation.startsWith}"`;else if("endsWith"in $.validation)X=`Invalid input: must end with "${$.validation.endsWith}"`;else z8.assertNever($.validation);else if($.validation!=="regex")X=`Invalid ${$.validation}`;else X="Invalid";break;case A1.too_small:if($.type==="array")X=`Array must contain ${$.exact?"exactly":$.inclusive?"at least":"more than"} ${$.minimum} element(s)`;else if($.type==="string")X=`String must contain ${$.exact?"exactly":$.inclusive?"at least":"over"} ${$.minimum} character(s)`;else if($.type==="number")X=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="bigint")X=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="date")X=`Date must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${new Date(Number($.minimum))}`;else X="Invalid input";break;case A1.too_big:if($.type==="array")X=`Array must contain ${$.exact?"exactly":$.inclusive?"at most":"less than"} ${$.maximum} element(s)`;else if($.type==="string")X=`String must contain ${$.exact?"exactly":$.inclusive?"at most":"under"} ${$.maximum} character(s)`;else if($.type==="number")X=`Number must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="bigint")X=`BigInt must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="date")X=`Date must be ${$.exact?"exactly":$.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number($.maximum))}`;else X="Invalid input";break;case A1.custom:X="Invalid input";break;case A1.invalid_intersection_types:X="Intersection results could not be merged";break;case A1.not_multiple_of:X=`Number must be a multiple of ${$.multipleOf}`;break;case A1.not_finite:X="Number must be finite";break;default:X=Y.defaultError,z8.assertNever($)}return{message:X}},Pz;var bT0=V0(()=>{m10();vh();Pz=BK8});function OK8($){Bg1=$}function tw(){return Bg1}var Bg1;var u10=V0(()=>{bT0();Bg1=Pz});function s1($,Y){let X=tw(),G=xh({issueData:Y,data:$.data,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,X,X===Pz?void 0:Pz].filter((J)=>!!J)});$.common.issues.push(G)}class NX{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray($,Y){let X=[];for(let G of Y){if(G.status==="aborted")return a4;if(G.status==="dirty")$.dirty();X.push(G.value)}return{status:$.value,value:X}}static async mergeObjectAsync($,Y){let X=[];for(let G of Y){let J=await G.key,Q=await G.value;X.push({key:J,value:Q})}return NX.mergeObjectSync($,X)}static mergeObjectSync($,Y){let X={};for(let G of Y){let{key:J,value:Q}=G;if(J.status==="aborted")return a4;if(Q.status==="aborted")return a4;if(J.status==="dirty")$.dirty();if(Q.status==="dirty")$.dirty();if(J.value!=="__proto__"&&(typeof Q.value<"u"||G.alwaysSet))X[J.value]=Q.value}return{status:$.value,value:X}}}var xh=($)=>{let{data:Y,path:X,errorMaps:G,issueData:J}=$,Q=[...X,...J.path||[]],W={...J,path:Q};if(J.message!==void 0)return{...J,path:Q,message:J.message};let K="",Z=G.filter((H)=>!!H).slice().reverse();for(let H of Z)K=H(W,{data:Y,defaultError:K}).message;return{...J,path:Q,message:K}},EK8,a4,GO=($)=>({status:"dirty",value:$}),$G=($)=>({status:"valid",value:$}),p10=($)=>$.status==="aborted",d10=($)=>$.status==="dirty",wL=($)=>$.status==="valid",ew=($)=>typeof Promise<"u"&&$ instanceof Promise;var hT0=V0(()=>{u10();bT0();EK8=[];a4=Object.freeze({status:"aborted"})});var Og1=()=>{};var T4;var Eg1=V0(()=>{(function($){$.errToObj=(Y)=>typeof Y==="string"?{message:Y}:Y||{},$.toString=(Y)=>typeof Y==="string"?Y:Y?.message})(T4||(T4={}))});class FZ{constructor($,Y,X,G){this._cachedPath=[],this.parent=$,this.data=Y,this._path=X,this._key=G}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}function k6($){if(!$)return{};let{errorMap:Y,invalid_type_error:X,required_error:G,description:J}=$;if(Y&&(X||G))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(Y)return{errorMap:Y,description:J};return{errorMap:(W,K)=>{let{message:Z}=$;if(W.code==="invalid_enum_value")return{message:Z??K.defaultError};if(typeof K.data>"u")return{message:Z??G??K.defaultError};if(W.code!=="invalid_type")return{message:K.defaultError};return{message:Z??X??K.defaultError}},description:J}}class a6{get description(){return this._def.description}_getType($){return F3($.data)}_getOrReturnCtx($,Y){return Y||{common:$.parent.common,data:$.data,parsedType:F3($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}_processInputParams($){return{status:new NX,ctx:{common:$.parent.common,data:$.data,parsedType:F3($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}}_parseSync($){let Y=this._parse($);if(ew(Y))throw Error("Synchronous parse encountered promise.");return Y}_parseAsync($){let Y=this._parse($);return Promise.resolve(Y)}parse($,Y){let X=this.safeParse($,Y);if(X.success)return X.data;throw X.error}safeParse($,Y){let X={common:{issues:[],async:Y?.async??!1,contextualErrorMap:Y?.errorMap},path:Y?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:F3($)},G=this._parseSync({data:$,path:X.path,parent:X});return Mg1(X,G)}"~validate"($){let Y={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:F3($)};if(!this["~standard"].async)try{let X=this._parseSync({data:$,path:[],parent:Y});return wL(X)?{value:X.value}:{issues:Y.common.issues}}catch(X){if(X?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;Y.common={issues:[],async:!0}}return this._parseAsync({data:$,path:[],parent:Y}).then((X)=>wL(X)?{value:X.value}:{issues:Y.common.issues})}async parseAsync($,Y){let X=await this.safeParseAsync($,Y);if(X.success)return X.data;throw X.error}async safeParseAsync($,Y){let X={common:{issues:[],contextualErrorMap:Y?.errorMap,async:!0},path:Y?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:F3($)},G=this._parse({data:$,path:X.path,parent:X}),J=await(ew(G)?G:Promise.resolve(G));return Mg1(X,J)}refine($,Y){let X=(G)=>{if(typeof Y==="string"||typeof Y>"u")return{message:Y};else if(typeof Y==="function")return Y(G);else return Y};return this._refinement((G,J)=>{let Q=$(G),W=()=>J.addIssue({code:A1.custom,...X(G)});if(typeof Promise<"u"&&Q instanceof Promise)return Q.then((K)=>{if(!K)return W(),!1;else return!0});if(!Q)return W(),!1;else return!0})}refinement($,Y){return this._refinement((X,G)=>{if(!$(X))return G.addIssue(typeof Y==="function"?Y(X,G):Y),!1;else return!0})}_refinement($){return new LZ({schema:this,typeName:U0.ZodEffects,effect:{type:"refinement",refinement:$}})}superRefine($){return this._refinement($)}constructor($){this.spa=this.safeParseAsync,this._def=$,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(Y)=>this["~validate"](Y)}}optional(){return LW.create(this,this._def)}nullable(){return DZ.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return FW.create(this)}promise(){return WO.create(this,this._def)}or($){return IL.create([this,$],this._def)}and($){return jz.create(this,$,this._def)}transform($){return new LZ({...k6(this._def),schema:this,typeName:U0.ZodEffects,effect:{type:"transform",transform:$}})}default($){let Y=typeof $==="function"?$:()=>$;return new SL({...k6(this._def),innerType:this,defaultValue:Y,typeName:U0.ZodDefault})}brand(){return new l10({typeName:U0.ZodBranded,type:this,...k6(this._def)})}catch($){let Y=typeof $==="function"?$:()=>$;return new K_({...k6(this._def),innerType:this,catchValue:Y,typeName:U0.ZodCatch})}describe($){return new this.constructor({...this._def,description:$})}pipe($){return mh.create(this,$)}readonly(){return Z_.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function Pg1($){let Y="[0-5]\\d";if($.precision)Y=`${Y}\\.\\d{${$.precision}}`;else if($.precision==null)Y=`${Y}(\\.\\d+)?`;let X=$.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${Y})${X}`}function hK8($){return new RegExp(`^${Pg1($)}$`)}function wg1($){let Y=`${qg1}T${Pg1($)}`,X=[];if(X.push($.local?"Z?":"Z"),$.offset)X.push("([+-]\\d{2}:?\\d{2})");return Y=`${Y}(${X.join("|")})`,new RegExp(`^${Y}$`)}function fK8($,Y){if((Y==="v4"||!Y)&&CK8.test($))return!0;if((Y==="v6"||!Y)&&kK8.test($))return!0;return!1}function gK8($,Y){if(!_K8.test($))return!1;try{let[X]=$.split(".");if(!X)return!1;let G=X.replace(/-/g,"+").replace(/_/g,"/").padEnd(X.length+(4-X.length%4)%4,"="),J=JSON.parse(atob(G));if(typeof J!=="object"||J===null)return!1;if("typ"in J&&J?.typ!=="JWT")return!1;if(!J.alg)return!1;if(Y&&J.alg!==Y)return!1;return!0}catch{return!1}}function mK8($,Y){if((Y==="v4"||!Y)&&SK8.test($))return!0;if((Y==="v6"||!Y)&&vK8.test($))return!0;return!1}function uK8($,Y){let X=($.toString().split(".")[1]||"").length,G=(Y.toString().split(".")[1]||"").length,J=X>G?X:G,Q=Number.parseInt($.toFixed(J).replace(".","")),W=Number.parseInt(Y.toFixed(J).replace(".",""));return Q%W/10**J}function $_($){if($ instanceof g5){let Y={};for(let X in $.shape){let G=$.shape[X];Y[X]=LW.create($_(G))}return new g5({...$._def,shape:()=>Y})}else if($ instanceof FW)return new FW({...$._def,type:$_($.element)});else if($ instanceof LW)return LW.create($_($.unwrap()));else if($ instanceof DZ)return DZ.create($_($.unwrap()));else if($ instanceof N3)return N3.create($.items.map((Y)=>$_(Y)));else return $}function gT0($,Y){let X=F3($),G=F3(Y);if($===Y)return{valid:!0,data:$};else if(X===b1.object&&G===b1.object){let J=z8.objectKeys(Y),Q=z8.objectKeys($).filter((K)=>J.indexOf(K)!==-1),W={...$,...Y};for(let K of Q){let Z=gT0($[K],Y[K]);if(!Z.valid)return{valid:!1};W[K]=Z.data}return{valid:!0,data:W}}else if(X===b1.array&&G===b1.array){if($.length!==Y.length)return{valid:!1};let J=[];for(let Q=0;Q<$.length;Q++){let W=$[Q],K=Y[Q],Z=gT0(W,K);if(!Z.valid)return{valid:!1};J.push(Z.data)}return{valid:!0,data:J}}else if(X===b1.date&&G===b1.date&&+$===+Y)return{valid:!0,data:$};else return{valid:!1}}function _g1($,Y){return new CL({values:$,typeName:U0.ZodEnum,...k6(Y)})}function Rg1($,Y){let X=typeof $==="function"?$(Y):typeof $==="string"?{message:$}:$;return typeof X==="string"?{message:X}:X}function jg1($,Y={},X){if($)return JO.create().superRefine((G,J)=>{let Q=$(G);if(Q instanceof Promise)return Q.then((W)=>{if(!W){let K=Rg1(Y,G),Z=K.fatal??X??!0;J.addIssue({code:"custom",...K,fatal:Z})}});if(!Q){let W=Rg1(Y,G),K=W.fatal??X??!0;J.addIssue({code:"custom",...W,fatal:K})}return});return JO.create()}var Mg1=($,Y)=>{if(wL(Y))return{success:!0,data:Y.value};else{if(!$.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let X=new HQ($.common.issues);return this._error=X,this._error}}}},MK8,RK8,qK8,PK8,wK8,_K8,jK8,TK8,IK8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",fT0,CK8,SK8,kK8,vK8,xK8,yK8,qg1="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",bK8,VW,L3,jL,X_,_z,yh,G_,TL,JO,_L,D3,bh,FW,g5,IL,wz=($)=>{if($ instanceof J_)return wz($.schema);else if($ instanceof LZ)return wz($.innerType());else if($ instanceof Q_)return[$.value];else if($ instanceof CL)return $.options;else if($ instanceof W_)return z8.objectValues($.enum);else if($ instanceof SL)return wz($._def.innerType);else if($ instanceof G_)return[void 0];else if($ instanceof TL)return[null];else if($ instanceof LW)return[void 0,...wz($.unwrap())];else if($ instanceof DZ)return[null,...wz($.unwrap())];else if($ instanceof l10)return wz($.unwrap());else if($ instanceof Z_)return wz($.unwrap());else if($ instanceof K_)return wz($._def.innerType);else return[]},c10,jz,N3,hh,fh,QO,Y_,J_,Q_,CL,W_,WO,LZ,LW,DZ,SL,K_,gh,pK8,l10,mh,Z_,dK8,U0,cK8=($,Y={message:`Input not instance of ${$.name}`})=>jg1((X)=>X instanceof $,Y),Tg1,Ig1,lK8,iK8,Cg1,nK8,rK8,aK8,sK8,oK8,tK8,eK8,$Z8,YZ8,mT0,XZ8,GZ8,JZ8,QZ8,WZ8,KZ8,ZZ8,UZ8,HZ8,zZ8,VZ8,FZ8,LZ8,DZ8,NZ8,AZ8,BZ8,OZ8,EZ8,MZ8=()=>Tg1().optional(),RZ8=()=>Ig1().optional(),qZ8=()=>Cg1().optional(),PZ8,wZ8;var Sg1=V0(()=>{m10();u10();Eg1();hT0();vh();MK8=/^c[^\s-]{8,}$/i,RK8=/^[0-9a-z]+$/,qK8=/^[0-9A-HJKMNP-TV-Z]{26}$/i,PK8=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,wK8=/^[a-z0-9_-]{21}$/i,_K8=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,jK8=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,TK8=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,CK8=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,SK8=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,kK8=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,vK8=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,xK8=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,yK8=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,bK8=new RegExp(`^${qg1}$`);VW=class VW extends a6{_parse($){if(this._def.coerce)$.data=String($.data);if(this._getType($)!==b1.string){let J=this._getOrReturnCtx($);return s1(J,{code:A1.invalid_type,expected:b1.string,received:J.parsedType}),a4}let X=new NX,G=void 0;for(let J of this._def.checks)if(J.kind==="min"){if($.data.length<J.value)G=this._getOrReturnCtx($,G),s1(G,{code:A1.too_small,minimum:J.value,type:"string",inclusive:!0,exact:!1,message:J.message}),X.dirty()}else if(J.kind==="max"){if($.data.length>J.value)G=this._getOrReturnCtx($,G),s1(G,{code:A1.too_big,maximum:J.value,type:"string",inclusive:!0,exact:!1,message:J.message}),X.dirty()}else if(J.kind==="length"){let Q=$.data.length>J.value,W=$.data.length<J.value;if(Q||W){if(G=this._getOrReturnCtx($,G),Q)s1(G,{code:A1.too_big,maximum:J.value,type:"string",inclusive:!0,exact:!0,message:J.message});else if(W)s1(G,{code:A1.too_small,minimum:J.value,type:"string",inclusive:!0,exact:!0,message:J.message});X.dirty()}}else if(J.kind==="email"){if(!TK8.test($.data))G=this._getOrReturnCtx($,G),s1(G,{validation:"email",code:A1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="emoji"){if(!fT0)fT0=new RegExp(IK8,"u");if(!fT0.test($.data))G=this._getOrReturnCtx($,G),s1(G,{validation:"emoji",code:A1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="uuid"){if(!PK8.test($.data))G=this._getOrReturnCtx($,G),s1(G,{validation:"uuid",code:A1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="nanoid"){if(!wK8.test($.data))G=this._getOrReturnCtx($,G),s1(G,{validation:"nanoid",code:A1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="cuid"){if(!MK8.test($.data))G=this._getOrReturnCtx($,G),s1(G,{validation:"cuid",code:A1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="cuid2"){if(!RK8.test($.data))G=this._getOrReturnCtx($,G),s1(G,{validation:"cuid2",code:A1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="ulid"){if(!qK8.test($.data))G=this._getOrReturnCtx($,G),s1(G,{validation:"ulid",code:A1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="url")try{new URL($.data)}catch{G=this._getOrReturnCtx($,G),s1(G,{validation:"url",code:A1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="regex"){if(J.regex.lastIndex=0,!J.regex.test($.data))G=this._getOrReturnCtx($,G),s1(G,{validation:"regex",code:A1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="trim")$.data=$.data.trim();else if(J.kind==="includes"){if(!$.data.includes(J.value,J.position))G=this._getOrReturnCtx($,G),s1(G,{code:A1.invalid_string,validation:{includes:J.value,position:J.position},message:J.message}),X.dirty()}else if(J.kind==="toLowerCase")$.data=$.data.toLowerCase();else if(J.kind==="toUpperCase")$.data=$.data.toUpperCase();else if(J.kind==="startsWith"){if(!$.data.startsWith(J.value))G=this._getOrReturnCtx($,G),s1(G,{code:A1.invalid_string,validation:{startsWith:J.value},message:J.message}),X.dirty()}else if(J.kind==="endsWith"){if(!$.data.endsWith(J.value))G=this._getOrReturnCtx($,G),s1(G,{code:A1.invalid_string,validation:{endsWith:J.value},message:J.message}),X.dirty()}else if(J.kind==="datetime"){if(!wg1(J).test($.data))G=this._getOrReturnCtx($,G),s1(G,{code:A1.invalid_string,validation:"datetime",message:J.message}),X.dirty()}else if(J.kind==="date"){if(!bK8.test($.data))G=this._getOrReturnCtx($,G),s1(G,{code:A1.invalid_string,validation:"date",message:J.message}),X.dirty()}else if(J.kind==="time"){if(!hK8(J).test($.data))G=this._getOrReturnCtx($,G),s1(G,{code:A1.invalid_string,validation:"time",message:J.message}),X.dirty()}else if(J.kind==="duration"){if(!jK8.test($.data))G=this._getOrReturnCtx($,G),s1(G,{validation:"duration",code:A1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="ip"){if(!fK8($.data,J.version))G=this._getOrReturnCtx($,G),s1(G,{validation:"ip",code:A1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="jwt"){if(!gK8($.data,J.alg))G=this._getOrReturnCtx($,G),s1(G,{validation:"jwt",code:A1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="cidr"){if(!mK8($.data,J.version))G=this._getOrReturnCtx($,G),s1(G,{validation:"cidr",code:A1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="base64"){if(!xK8.test($.data))G=this._getOrReturnCtx($,G),s1(G,{validation:"base64",code:A1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="base64url"){if(!yK8.test($.data))G=this._getOrReturnCtx($,G),s1(G,{validation:"base64url",code:A1.invalid_string,message:J.message}),X.dirty()}else z8.assertNever(J);return{status:X.value,value:$.data}}_regex($,Y,X){return this.refinement((G)=>$.test(G),{validation:Y,code:A1.invalid_string,...T4.errToObj(X)})}_addCheck($){return new VW({...this._def,checks:[...this._def.checks,$]})}email($){return this._addCheck({kind:"email",...T4.errToObj($)})}url($){return this._addCheck({kind:"url",...T4.errToObj($)})}emoji($){return this._addCheck({kind:"emoji",...T4.errToObj($)})}uuid($){return this._addCheck({kind:"uuid",...T4.errToObj($)})}nanoid($){return this._addCheck({kind:"nanoid",...T4.errToObj($)})}cuid($){return this._addCheck({kind:"cuid",...T4.errToObj($)})}cuid2($){return this._addCheck({kind:"cuid2",...T4.errToObj($)})}ulid($){return this._addCheck({kind:"ulid",...T4.errToObj($)})}base64($){return this._addCheck({kind:"base64",...T4.errToObj($)})}base64url($){return this._addCheck({kind:"base64url",...T4.errToObj($)})}jwt($){return this._addCheck({kind:"jwt",...T4.errToObj($)})}ip($){return this._addCheck({kind:"ip",...T4.errToObj($)})}cidr($){return this._addCheck({kind:"cidr",...T4.errToObj($)})}datetime($){if(typeof $==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:$});return this._addCheck({kind:"datetime",precision:typeof $?.precision>"u"?null:$?.precision,offset:$?.offset??!1,local:$?.local??!1,...T4.errToObj($?.message)})}date($){return this._addCheck({kind:"date",message:$})}time($){if(typeof $==="string")return this._addCheck({kind:"time",precision:null,message:$});return this._addCheck({kind:"time",precision:typeof $?.precision>"u"?null:$?.precision,...T4.errToObj($?.message)})}duration($){return this._addCheck({kind:"duration",...T4.errToObj($)})}regex($,Y){return this._addCheck({kind:"regex",regex:$,...T4.errToObj(Y)})}includes($,Y){return this._addCheck({kind:"includes",value:$,position:Y?.position,...T4.errToObj(Y?.message)})}startsWith($,Y){return this._addCheck({kind:"startsWith",value:$,...T4.errToObj(Y)})}endsWith($,Y){return this._addCheck({kind:"endsWith",value:$,...T4.errToObj(Y)})}min($,Y){return this._addCheck({kind:"min",value:$,...T4.errToObj(Y)})}max($,Y){return this._addCheck({kind:"max",value:$,...T4.errToObj(Y)})}length($,Y){return this._addCheck({kind:"length",value:$,...T4.errToObj(Y)})}nonempty($){return this.min(1,T4.errToObj($))}trim(){return new VW({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new VW({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new VW({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(($)=>$.kind==="datetime")}get isDate(){return!!this._def.checks.find(($)=>$.kind==="date")}get isTime(){return!!this._def.checks.find(($)=>$.kind==="time")}get isDuration(){return!!this._def.checks.find(($)=>$.kind==="duration")}get isEmail(){return!!this._def.checks.find(($)=>$.kind==="email")}get isURL(){return!!this._def.checks.find(($)=>$.kind==="url")}get isEmoji(){return!!this._def.checks.find(($)=>$.kind==="emoji")}get isUUID(){return!!this._def.checks.find(($)=>$.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(($)=>$.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(($)=>$.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(($)=>$.kind==="cuid2")}get isULID(){return!!this._def.checks.find(($)=>$.kind==="ulid")}get isIP(){return!!this._def.checks.find(($)=>$.kind==="ip")}get isCIDR(){return!!this._def.checks.find(($)=>$.kind==="cidr")}get isBase64(){return!!this._def.checks.find(($)=>$.kind==="base64")}get isBase64url(){return!!this._def.checks.find(($)=>$.kind==="base64url")}get minLength(){let $=null;for(let Y of this._def.checks)if(Y.kind==="min"){if($===null||Y.value>$)$=Y.value}return $}get maxLength(){let $=null;for(let Y of this._def.checks)if(Y.kind==="max"){if($===null||Y.value<$)$=Y.value}return $}};VW.create=($)=>{return new VW({checks:[],typeName:U0.ZodString,coerce:$?.coerce??!1,...k6($)})};L3=class L3 extends a6{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse($){if(this._def.coerce)$.data=Number($.data);if(this._getType($)!==b1.number){let J=this._getOrReturnCtx($);return s1(J,{code:A1.invalid_type,expected:b1.number,received:J.parsedType}),a4}let X=void 0,G=new NX;for(let J of this._def.checks)if(J.kind==="int"){if(!z8.isInteger($.data))X=this._getOrReturnCtx($,X),s1(X,{code:A1.invalid_type,expected:"integer",received:"float",message:J.message}),G.dirty()}else if(J.kind==="min"){if(J.inclusive?$.data<J.value:$.data<=J.value)X=this._getOrReturnCtx($,X),s1(X,{code:A1.too_small,minimum:J.value,type:"number",inclusive:J.inclusive,exact:!1,message:J.message}),G.dirty()}else if(J.kind==="max"){if(J.inclusive?$.data>J.value:$.data>=J.value)X=this._getOrReturnCtx($,X),s1(X,{code:A1.too_big,maximum:J.value,type:"number",inclusive:J.inclusive,exact:!1,message:J.message}),G.dirty()}else if(J.kind==="multipleOf"){if(uK8($.data,J.value)!==0)X=this._getOrReturnCtx($,X),s1(X,{code:A1.not_multiple_of,multipleOf:J.value,message:J.message}),G.dirty()}else if(J.kind==="finite"){if(!Number.isFinite($.data))X=this._getOrReturnCtx($,X),s1(X,{code:A1.not_finite,message:J.message}),G.dirty()}else z8.assertNever(J);return{status:G.value,value:$.data}}gte($,Y){return this.setLimit("min",$,!0,T4.toString(Y))}gt($,Y){return this.setLimit("min",$,!1,T4.toString(Y))}lte($,Y){return this.setLimit("max",$,!0,T4.toString(Y))}lt($,Y){return this.setLimit("max",$,!1,T4.toString(Y))}setLimit($,Y,X,G){return new L3({...this._def,checks:[...this._def.checks,{kind:$,value:Y,inclusive:X,message:T4.toString(G)}]})}_addCheck($){return new L3({...this._def,checks:[...this._def.checks,$]})}int($){return this._addCheck({kind:"int",message:T4.toString($)})}positive($){return this._addCheck({kind:"min",value:0,inclusive:!1,message:T4.toString($)})}negative($){return this._addCheck({kind:"max",value:0,inclusive:!1,message:T4.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:0,inclusive:!0,message:T4.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:0,inclusive:!0,message:T4.toString($)})}multipleOf($,Y){return this._addCheck({kind:"multipleOf",value:$,message:T4.toString(Y)})}finite($){return this._addCheck({kind:"finite",message:T4.toString($)})}safe($){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:T4.toString($)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:T4.toString($)})}get minValue(){let $=null;for(let Y of this._def.checks)if(Y.kind==="min"){if($===null||Y.value>$)$=Y.value}return $}get maxValue(){let $=null;for(let Y of this._def.checks)if(Y.kind==="max"){if($===null||Y.value<$)$=Y.value}return $}get isInt(){return!!this._def.checks.find(($)=>$.kind==="int"||$.kind==="multipleOf"&&z8.isInteger($.value))}get isFinite(){let $=null,Y=null;for(let X of this._def.checks)if(X.kind==="finite"||X.kind==="int"||X.kind==="multipleOf")return!0;else if(X.kind==="min"){if(Y===null||X.value>Y)Y=X.value}else if(X.kind==="max"){if($===null||X.value<$)$=X.value}return Number.isFinite(Y)&&Number.isFinite($)}};L3.create=($)=>{return new L3({checks:[],typeName:U0.ZodNumber,coerce:$?.coerce||!1,...k6($)})};jL=class jL extends a6{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse($){if(this._def.coerce)try{$.data=BigInt($.data)}catch{return this._getInvalidInput($)}if(this._getType($)!==b1.bigint)return this._getInvalidInput($);let X=void 0,G=new NX;for(let J of this._def.checks)if(J.kind==="min"){if(J.inclusive?$.data<J.value:$.data<=J.value)X=this._getOrReturnCtx($,X),s1(X,{code:A1.too_small,type:"bigint",minimum:J.value,inclusive:J.inclusive,message:J.message}),G.dirty()}else if(J.kind==="max"){if(J.inclusive?$.data>J.value:$.data>=J.value)X=this._getOrReturnCtx($,X),s1(X,{code:A1.too_big,type:"bigint",maximum:J.value,inclusive:J.inclusive,message:J.message}),G.dirty()}else if(J.kind==="multipleOf"){if($.data%J.value!==BigInt(0))X=this._getOrReturnCtx($,X),s1(X,{code:A1.not_multiple_of,multipleOf:J.value,message:J.message}),G.dirty()}else z8.assertNever(J);return{status:G.value,value:$.data}}_getInvalidInput($){let Y=this._getOrReturnCtx($);return s1(Y,{code:A1.invalid_type,expected:b1.bigint,received:Y.parsedType}),a4}gte($,Y){return this.setLimit("min",$,!0,T4.toString(Y))}gt($,Y){return this.setLimit("min",$,!1,T4.toString(Y))}lte($,Y){return this.setLimit("max",$,!0,T4.toString(Y))}lt($,Y){return this.setLimit("max",$,!1,T4.toString(Y))}setLimit($,Y,X,G){return new jL({...this._def,checks:[...this._def.checks,{kind:$,value:Y,inclusive:X,message:T4.toString(G)}]})}_addCheck($){return new jL({...this._def,checks:[...this._def.checks,$]})}positive($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:T4.toString($)})}negative($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:T4.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:T4.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:T4.toString($)})}multipleOf($,Y){return this._addCheck({kind:"multipleOf",value:$,message:T4.toString(Y)})}get minValue(){let $=null;for(let Y of this._def.checks)if(Y.kind==="min"){if($===null||Y.value>$)$=Y.value}return $}get maxValue(){let $=null;for(let Y of this._def.checks)if(Y.kind==="max"){if($===null||Y.value<$)$=Y.value}return $}};jL.create=($)=>{return new jL({checks:[],typeName:U0.ZodBigInt,coerce:$?.coerce??!1,...k6($)})};X_=class X_ extends a6{_parse($){if(this._def.coerce)$.data=Boolean($.data);if(this._getType($)!==b1.boolean){let X=this._getOrReturnCtx($);return s1(X,{code:A1.invalid_type,expected:b1.boolean,received:X.parsedType}),a4}return $G($.data)}};X_.create=($)=>{return new X_({typeName:U0.ZodBoolean,coerce:$?.coerce||!1,...k6($)})};_z=class _z extends a6{_parse($){if(this._def.coerce)$.data=new Date($.data);if(this._getType($)!==b1.date){let J=this._getOrReturnCtx($);return s1(J,{code:A1.invalid_type,expected:b1.date,received:J.parsedType}),a4}if(Number.isNaN($.data.getTime())){let J=this._getOrReturnCtx($);return s1(J,{code:A1.invalid_date}),a4}let X=new NX,G=void 0;for(let J of this._def.checks)if(J.kind==="min"){if($.data.getTime()<J.value)G=this._getOrReturnCtx($,G),s1(G,{code:A1.too_small,message:J.message,inclusive:!0,exact:!1,minimum:J.value,type:"date"}),X.dirty()}else if(J.kind==="max"){if($.data.getTime()>J.value)G=this._getOrReturnCtx($,G),s1(G,{code:A1.too_big,message:J.message,inclusive:!0,exact:!1,maximum:J.value,type:"date"}),X.dirty()}else z8.assertNever(J);return{status:X.value,value:new Date($.data.getTime())}}_addCheck($){return new _z({...this._def,checks:[...this._def.checks,$]})}min($,Y){return this._addCheck({kind:"min",value:$.getTime(),message:T4.toString(Y)})}max($,Y){return this._addCheck({kind:"max",value:$.getTime(),message:T4.toString(Y)})}get minDate(){let $=null;for(let Y of this._def.checks)if(Y.kind==="min"){if($===null||Y.value>$)$=Y.value}return $!=null?new Date($):null}get maxDate(){let $=null;for(let Y of this._def.checks)if(Y.kind==="max"){if($===null||Y.value<$)$=Y.value}return $!=null?new Date($):null}};_z.create=($)=>{return new _z({checks:[],coerce:$?.coerce||!1,typeName:U0.ZodDate,...k6($)})};yh=class yh extends a6{_parse($){if(this._getType($)!==b1.symbol){let X=this._getOrReturnCtx($);return s1(X,{code:A1.invalid_type,expected:b1.symbol,received:X.parsedType}),a4}return $G($.data)}};yh.create=($)=>{return new yh({typeName:U0.ZodSymbol,...k6($)})};G_=class G_ extends a6{_parse($){if(this._getType($)!==b1.undefined){let X=this._getOrReturnCtx($);return s1(X,{code:A1.invalid_type,expected:b1.undefined,received:X.parsedType}),a4}return $G($.data)}};G_.create=($)=>{return new G_({typeName:U0.ZodUndefined,...k6($)})};TL=class TL extends a6{_parse($){if(this._getType($)!==b1.null){let X=this._getOrReturnCtx($);return s1(X,{code:A1.invalid_type,expected:b1.null,received:X.parsedType}),a4}return $G($.data)}};TL.create=($)=>{return new TL({typeName:U0.ZodNull,...k6($)})};JO=class JO extends a6{constructor(){super(...arguments);this._any=!0}_parse($){return $G($.data)}};JO.create=($)=>{return new JO({typeName:U0.ZodAny,...k6($)})};_L=class _L extends a6{constructor(){super(...arguments);this._unknown=!0}_parse($){return $G($.data)}};_L.create=($)=>{return new _L({typeName:U0.ZodUnknown,...k6($)})};D3=class D3 extends a6{_parse($){let Y=this._getOrReturnCtx($);return s1(Y,{code:A1.invalid_type,expected:b1.never,received:Y.parsedType}),a4}};D3.create=($)=>{return new D3({typeName:U0.ZodNever,...k6($)})};bh=class bh extends a6{_parse($){if(this._getType($)!==b1.undefined){let X=this._getOrReturnCtx($);return s1(X,{code:A1.invalid_type,expected:b1.void,received:X.parsedType}),a4}return $G($.data)}};bh.create=($)=>{return new bh({typeName:U0.ZodVoid,...k6($)})};FW=class FW extends a6{_parse($){let{ctx:Y,status:X}=this._processInputParams($),G=this._def;if(Y.parsedType!==b1.array)return s1(Y,{code:A1.invalid_type,expected:b1.array,received:Y.parsedType}),a4;if(G.exactLength!==null){let Q=Y.data.length>G.exactLength.value,W=Y.data.length<G.exactLength.value;if(Q||W)s1(Y,{code:Q?A1.too_big:A1.too_small,minimum:W?G.exactLength.value:void 0,maximum:Q?G.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:G.exactLength.message}),X.dirty()}if(G.minLength!==null){if(Y.data.length<G.minLength.value)s1(Y,{code:A1.too_small,minimum:G.minLength.value,type:"array",inclusive:!0,exact:!1,message:G.minLength.message}),X.dirty()}if(G.maxLength!==null){if(Y.data.length>G.maxLength.value)s1(Y,{code:A1.too_big,maximum:G.maxLength.value,type:"array",inclusive:!0,exact:!1,message:G.maxLength.message}),X.dirty()}if(Y.common.async)return Promise.all([...Y.data].map((Q,W)=>{return G.type._parseAsync(new FZ(Y,Q,Y.path,W))})).then((Q)=>{return NX.mergeArray(X,Q)});let J=[...Y.data].map((Q,W)=>{return G.type._parseSync(new FZ(Y,Q,Y.path,W))});return NX.mergeArray(X,J)}get element(){return this._def.type}min($,Y){return new FW({...this._def,minLength:{value:$,message:T4.toString(Y)}})}max($,Y){return new FW({...this._def,maxLength:{value:$,message:T4.toString(Y)}})}length($,Y){return new FW({...this._def,exactLength:{value:$,message:T4.toString(Y)}})}nonempty($){return this.min(1,$)}};FW.create=($,Y)=>{return new FW({type:$,minLength:null,maxLength:null,exactLength:null,typeName:U0.ZodArray,...k6(Y)})};g5=class g5 extends a6{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let $=this._def.shape(),Y=z8.objectKeys($);return this._cached={shape:$,keys:Y},this._cached}_parse($){if(this._getType($)!==b1.object){let Z=this._getOrReturnCtx($);return s1(Z,{code:A1.invalid_type,expected:b1.object,received:Z.parsedType}),a4}let{status:X,ctx:G}=this._processInputParams($),{shape:J,keys:Q}=this._getCached(),W=[];if(!(this._def.catchall instanceof D3&&this._def.unknownKeys==="strip")){for(let Z in G.data)if(!Q.includes(Z))W.push(Z)}let K=[];for(let Z of Q){let H=J[Z],z=G.data[Z];K.push({key:{status:"valid",value:Z},value:H._parse(new FZ(G,z,G.path,Z)),alwaysSet:Z in G.data})}if(this._def.catchall instanceof D3){let Z=this._def.unknownKeys;if(Z==="passthrough")for(let H of W)K.push({key:{status:"valid",value:H},value:{status:"valid",value:G.data[H]}});else if(Z==="strict"){if(W.length>0)s1(G,{code:A1.unrecognized_keys,keys:W}),X.dirty()}else if(Z==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let Z=this._def.catchall;for(let H of W){let z=G.data[H];K.push({key:{status:"valid",value:H},value:Z._parse(new FZ(G,z,G.path,H)),alwaysSet:H in G.data})}}if(G.common.async)return Promise.resolve().then(async()=>{let Z=[];for(let H of K){let z=await H.key,V=await H.value;Z.push({key:z,value:V,alwaysSet:H.alwaysSet})}return Z}).then((Z)=>{return NX.mergeObjectSync(X,Z)});else return NX.mergeObjectSync(X,K)}get shape(){return this._def.shape()}strict($){return T4.errToObj,new g5({...this._def,unknownKeys:"strict",...$!==void 0?{errorMap:(Y,X)=>{let G=this._def.errorMap?.(Y,X).message??X.defaultError;if(Y.code==="unrecognized_keys")return{message:T4.errToObj($).message??G};return{message:G}}}:{}})}strip(){return new g5({...this._def,unknownKeys:"strip"})}passthrough(){return new g5({...this._def,unknownKeys:"passthrough"})}extend($){return new g5({...this._def,shape:()=>({...this._def.shape(),...$})})}merge($){return new g5({unknownKeys:$._def.unknownKeys,catchall:$._def.catchall,shape:()=>({...this._def.shape(),...$._def.shape()}),typeName:U0.ZodObject})}setKey($,Y){return this.augment({[$]:Y})}catchall($){return new g5({...this._def,catchall:$})}pick($){let Y={};for(let X of z8.objectKeys($))if($[X]&&this.shape[X])Y[X]=this.shape[X];return new g5({...this._def,shape:()=>Y})}omit($){let Y={};for(let X of z8.objectKeys(this.shape))if(!$[X])Y[X]=this.shape[X];return new g5({...this._def,shape:()=>Y})}deepPartial(){return $_(this)}partial($){let Y={};for(let X of z8.objectKeys(this.shape)){let G=this.shape[X];if($&&!$[X])Y[X]=G;else Y[X]=G.optional()}return new g5({...this._def,shape:()=>Y})}required($){let Y={};for(let X of z8.objectKeys(this.shape))if($&&!$[X])Y[X]=this.shape[X];else{let J=this.shape[X];while(J instanceof LW)J=J._def.innerType;Y[X]=J}return new g5({...this._def,shape:()=>Y})}keyof(){return _g1(z8.objectKeys(this.shape))}};g5.create=($,Y)=>{return new g5({shape:()=>$,unknownKeys:"strip",catchall:D3.create(),typeName:U0.ZodObject,...k6(Y)})};g5.strictCreate=($,Y)=>{return new g5({shape:()=>$,unknownKeys:"strict",catchall:D3.create(),typeName:U0.ZodObject,...k6(Y)})};g5.lazycreate=($,Y)=>{return new g5({shape:$,unknownKeys:"strip",catchall:D3.create(),typeName:U0.ZodObject,...k6(Y)})};IL=class IL extends a6{_parse($){let{ctx:Y}=this._processInputParams($),X=this._def.options;function G(J){for(let W of J)if(W.result.status==="valid")return W.result;for(let W of J)if(W.result.status==="dirty")return Y.common.issues.push(...W.ctx.common.issues),W.result;let Q=J.map((W)=>new HQ(W.ctx.common.issues));return s1(Y,{code:A1.invalid_union,unionErrors:Q}),a4}if(Y.common.async)return Promise.all(X.map(async(J)=>{let Q={...Y,common:{...Y.common,issues:[]},parent:null};return{result:await J._parseAsync({data:Y.data,path:Y.path,parent:Q}),ctx:Q}})).then(G);else{let J=void 0,Q=[];for(let K of X){let Z={...Y,common:{...Y.common,issues:[]},parent:null},H=K._parseSync({data:Y.data,path:Y.path,parent:Z});if(H.status==="valid")return H;else if(H.status==="dirty"&&!J)J={result:H,ctx:Z};if(Z.common.issues.length)Q.push(Z.common.issues)}if(J)return Y.common.issues.push(...J.ctx.common.issues),J.result;let W=Q.map((K)=>new HQ(K));return s1(Y,{code:A1.invalid_union,unionErrors:W}),a4}}get options(){return this._def.options}};IL.create=($,Y)=>{return new IL({options:$,typeName:U0.ZodUnion,...k6(Y)})};c10=class c10 extends a6{_parse($){let{ctx:Y}=this._processInputParams($);if(Y.parsedType!==b1.object)return s1(Y,{code:A1.invalid_type,expected:b1.object,received:Y.parsedType}),a4;let X=this.discriminator,G=Y.data[X],J=this.optionsMap.get(G);if(!J)return s1(Y,{code:A1.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[X]}),a4;if(Y.common.async)return J._parseAsync({data:Y.data,path:Y.path,parent:Y});else return J._parseSync({data:Y.data,path:Y.path,parent:Y})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create($,Y,X){let G=new Map;for(let J of Y){let Q=wz(J.shape[$]);if(!Q.length)throw Error(`A discriminator value for key \`${$}\` could not be extracted from all schema options`);for(let W of Q){if(G.has(W))throw Error(`Discriminator property ${String($)} has duplicate value ${String(W)}`);G.set(W,J)}}return new c10({typeName:U0.ZodDiscriminatedUnion,discriminator:$,options:Y,optionsMap:G,...k6(X)})}};jz=class jz extends a6{_parse($){let{status:Y,ctx:X}=this._processInputParams($),G=(J,Q)=>{if(p10(J)||p10(Q))return a4;let W=gT0(J.value,Q.value);if(!W.valid)return s1(X,{code:A1.invalid_intersection_types}),a4;if(d10(J)||d10(Q))Y.dirty();return{status:Y.value,value:W.data}};if(X.common.async)return Promise.all([this._def.left._parseAsync({data:X.data,path:X.path,parent:X}),this._def.right._parseAsync({data:X.data,path:X.path,parent:X})]).then(([J,Q])=>G(J,Q));else return G(this._def.left._parseSync({data:X.data,path:X.path,parent:X}),this._def.right._parseSync({data:X.data,path:X.path,parent:X}))}};jz.create=($,Y,X)=>{return new jz({left:$,right:Y,typeName:U0.ZodIntersection,...k6(X)})};N3=class N3 extends a6{_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.parsedType!==b1.array)return s1(X,{code:A1.invalid_type,expected:b1.array,received:X.parsedType}),a4;if(X.data.length<this._def.items.length)return s1(X,{code:A1.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),a4;if(!this._def.rest&&X.data.length>this._def.items.length)s1(X,{code:A1.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Y.dirty();let J=[...X.data].map((Q,W)=>{let K=this._def.items[W]||this._def.rest;if(!K)return null;return K._parse(new FZ(X,Q,X.path,W))}).filter((Q)=>!!Q);if(X.common.async)return Promise.all(J).then((Q)=>{return NX.mergeArray(Y,Q)});else return NX.mergeArray(Y,J)}get items(){return this._def.items}rest($){return new N3({...this._def,rest:$})}};N3.create=($,Y)=>{if(!Array.isArray($))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new N3({items:$,typeName:U0.ZodTuple,rest:null,...k6(Y)})};hh=class hh extends a6{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.parsedType!==b1.object)return s1(X,{code:A1.invalid_type,expected:b1.object,received:X.parsedType}),a4;let G=[],J=this._def.keyType,Q=this._def.valueType;for(let W in X.data)G.push({key:J._parse(new FZ(X,W,X.path,W)),value:Q._parse(new FZ(X,X.data[W],X.path,W)),alwaysSet:W in X.data});if(X.common.async)return NX.mergeObjectAsync(Y,G);else return NX.mergeObjectSync(Y,G)}get element(){return this._def.valueType}static create($,Y,X){if(Y instanceof a6)return new hh({keyType:$,valueType:Y,typeName:U0.ZodRecord,...k6(X)});return new hh({keyType:VW.create(),valueType:$,typeName:U0.ZodRecord,...k6(Y)})}};fh=class fh extends a6{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.parsedType!==b1.map)return s1(X,{code:A1.invalid_type,expected:b1.map,received:X.parsedType}),a4;let G=this._def.keyType,J=this._def.valueType,Q=[...X.data.entries()].map(([W,K],Z)=>{return{key:G._parse(new FZ(X,W,X.path,[Z,"key"])),value:J._parse(new FZ(X,K,X.path,[Z,"value"]))}});if(X.common.async){let W=new Map;return Promise.resolve().then(async()=>{for(let K of Q){let Z=await K.key,H=await K.value;if(Z.status==="aborted"||H.status==="aborted")return a4;if(Z.status==="dirty"||H.status==="dirty")Y.dirty();W.set(Z.value,H.value)}return{status:Y.value,value:W}})}else{let W=new Map;for(let K of Q){let{key:Z,value:H}=K;if(Z.status==="aborted"||H.status==="aborted")return a4;if(Z.status==="dirty"||H.status==="dirty")Y.dirty();W.set(Z.value,H.value)}return{status:Y.value,value:W}}}};fh.create=($,Y,X)=>{return new fh({valueType:Y,keyType:$,typeName:U0.ZodMap,...k6(X)})};QO=class QO extends a6{_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.parsedType!==b1.set)return s1(X,{code:A1.invalid_type,expected:b1.set,received:X.parsedType}),a4;let G=this._def;if(G.minSize!==null){if(X.data.size<G.minSize.value)s1(X,{code:A1.too_small,minimum:G.minSize.value,type:"set",inclusive:!0,exact:!1,message:G.minSize.message}),Y.dirty()}if(G.maxSize!==null){if(X.data.size>G.maxSize.value)s1(X,{code:A1.too_big,maximum:G.maxSize.value,type:"set",inclusive:!0,exact:!1,message:G.maxSize.message}),Y.dirty()}let J=this._def.valueType;function Q(K){let Z=new Set;for(let H of K){if(H.status==="aborted")return a4;if(H.status==="dirty")Y.dirty();Z.add(H.value)}return{status:Y.value,value:Z}}let W=[...X.data.values()].map((K,Z)=>J._parse(new FZ(X,K,X.path,Z)));if(X.common.async)return Promise.all(W).then((K)=>Q(K));else return Q(W)}min($,Y){return new QO({...this._def,minSize:{value:$,message:T4.toString(Y)}})}max($,Y){return new QO({...this._def,maxSize:{value:$,message:T4.toString(Y)}})}size($,Y){return this.min($,Y).max($,Y)}nonempty($){return this.min(1,$)}};QO.create=($,Y)=>{return new QO({valueType:$,minSize:null,maxSize:null,typeName:U0.ZodSet,...k6(Y)})};Y_=class Y_ extends a6{constructor(){super(...arguments);this.validate=this.implement}_parse($){let{ctx:Y}=this._processInputParams($);if(Y.parsedType!==b1.function)return s1(Y,{code:A1.invalid_type,expected:b1.function,received:Y.parsedType}),a4;function X(W,K){return xh({data:W,path:Y.path,errorMaps:[Y.common.contextualErrorMap,Y.schemaErrorMap,tw(),Pz].filter((Z)=>!!Z),issueData:{code:A1.invalid_arguments,argumentsError:K}})}function G(W,K){return xh({data:W,path:Y.path,errorMaps:[Y.common.contextualErrorMap,Y.schemaErrorMap,tw(),Pz].filter((Z)=>!!Z),issueData:{code:A1.invalid_return_type,returnTypeError:K}})}let J={errorMap:Y.common.contextualErrorMap},Q=Y.data;if(this._def.returns instanceof WO){let W=this;return $G(async function(...K){let Z=new HQ([]),H=await W._def.args.parseAsync(K,J).catch((F)=>{throw Z.addIssue(X(K,F)),Z}),z=await Reflect.apply(Q,this,H);return await W._def.returns._def.type.parseAsync(z,J).catch((F)=>{throw Z.addIssue(G(z,F)),Z})})}else{let W=this;return $G(function(...K){let Z=W._def.args.safeParse(K,J);if(!Z.success)throw new HQ([X(K,Z.error)]);let H=Reflect.apply(Q,this,Z.data),z=W._def.returns.safeParse(H,J);if(!z.success)throw new HQ([G(H,z.error)]);return z.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...$){return new Y_({...this._def,args:N3.create($).rest(_L.create())})}returns($){return new Y_({...this._def,returns:$})}implement($){return this.parse($)}strictImplement($){return this.parse($)}static create($,Y,X){return new Y_({args:$?$:N3.create([]).rest(_L.create()),returns:Y||_L.create(),typeName:U0.ZodFunction,...k6(X)})}};J_=class J_ extends a6{get schema(){return this._def.getter()}_parse($){let{ctx:Y}=this._processInputParams($);return this._def.getter()._parse({data:Y.data,path:Y.path,parent:Y})}};J_.create=($,Y)=>{return new J_({getter:$,typeName:U0.ZodLazy,...k6(Y)})};Q_=class Q_ extends a6{_parse($){if($.data!==this._def.value){let Y=this._getOrReturnCtx($);return s1(Y,{received:Y.data,code:A1.invalid_literal,expected:this._def.value}),a4}return{status:"valid",value:$.data}}get value(){return this._def.value}};Q_.create=($,Y)=>{return new Q_({value:$,typeName:U0.ZodLiteral,...k6(Y)})};CL=class CL extends a6{_parse($){if(typeof $.data!=="string"){let Y=this._getOrReturnCtx($),X=this._def.values;return s1(Y,{expected:z8.joinValues(X),received:Y.parsedType,code:A1.invalid_type}),a4}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has($.data)){let Y=this._getOrReturnCtx($),X=this._def.values;return s1(Y,{received:Y.data,code:A1.invalid_enum_value,options:X}),a4}return $G($.data)}get options(){return this._def.values}get enum(){let $={};for(let Y of this._def.values)$[Y]=Y;return $}get Values(){let $={};for(let Y of this._def.values)$[Y]=Y;return $}get Enum(){let $={};for(let Y of this._def.values)$[Y]=Y;return $}extract($,Y=this._def){return CL.create($,{...this._def,...Y})}exclude($,Y=this._def){return CL.create(this.options.filter((X)=>!$.includes(X)),{...this._def,...Y})}};CL.create=_g1;W_=class W_ extends a6{_parse($){let Y=z8.getValidEnumValues(this._def.values),X=this._getOrReturnCtx($);if(X.parsedType!==b1.string&&X.parsedType!==b1.number){let G=z8.objectValues(Y);return s1(X,{expected:z8.joinValues(G),received:X.parsedType,code:A1.invalid_type}),a4}if(!this._cache)this._cache=new Set(z8.getValidEnumValues(this._def.values));if(!this._cache.has($.data)){let G=z8.objectValues(Y);return s1(X,{received:X.data,code:A1.invalid_enum_value,options:G}),a4}return $G($.data)}get enum(){return this._def.values}};W_.create=($,Y)=>{return new W_({values:$,typeName:U0.ZodNativeEnum,...k6(Y)})};WO=class WO extends a6{unwrap(){return this._def.type}_parse($){let{ctx:Y}=this._processInputParams($);if(Y.parsedType!==b1.promise&&Y.common.async===!1)return s1(Y,{code:A1.invalid_type,expected:b1.promise,received:Y.parsedType}),a4;let X=Y.parsedType===b1.promise?Y.data:Promise.resolve(Y.data);return $G(X.then((G)=>{return this._def.type.parseAsync(G,{path:Y.path,errorMap:Y.common.contextualErrorMap})}))}};WO.create=($,Y)=>{return new WO({type:$,typeName:U0.ZodPromise,...k6(Y)})};LZ=class LZ extends a6{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===U0.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse($){let{status:Y,ctx:X}=this._processInputParams($),G=this._def.effect||null,J={addIssue:(Q)=>{if(s1(X,Q),Q.fatal)Y.abort();else Y.dirty()},get path(){return X.path}};if(J.addIssue=J.addIssue.bind(J),G.type==="preprocess"){let Q=G.transform(X.data,J);if(X.common.async)return Promise.resolve(Q).then(async(W)=>{if(Y.value==="aborted")return a4;let K=await this._def.schema._parseAsync({data:W,path:X.path,parent:X});if(K.status==="aborted")return a4;if(K.status==="dirty")return GO(K.value);if(Y.value==="dirty")return GO(K.value);return K});else{if(Y.value==="aborted")return a4;let W=this._def.schema._parseSync({data:Q,path:X.path,parent:X});if(W.status==="aborted")return a4;if(W.status==="dirty")return GO(W.value);if(Y.value==="dirty")return GO(W.value);return W}}if(G.type==="refinement"){let Q=(W)=>{let K=G.refinement(W,J);if(X.common.async)return Promise.resolve(K);if(K instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return W};if(X.common.async===!1){let W=this._def.schema._parseSync({data:X.data,path:X.path,parent:X});if(W.status==="aborted")return a4;if(W.status==="dirty")Y.dirty();return Q(W.value),{status:Y.value,value:W.value}}else return this._def.schema._parseAsync({data:X.data,path:X.path,parent:X}).then((W)=>{if(W.status==="aborted")return a4;if(W.status==="dirty")Y.dirty();return Q(W.value).then(()=>{return{status:Y.value,value:W.value}})})}if(G.type==="transform")if(X.common.async===!1){let Q=this._def.schema._parseSync({data:X.data,path:X.path,parent:X});if(!wL(Q))return a4;let W=G.transform(Q.value,J);if(W instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:Y.value,value:W}}else return this._def.schema._parseAsync({data:X.data,path:X.path,parent:X}).then((Q)=>{if(!wL(Q))return a4;return Promise.resolve(G.transform(Q.value,J)).then((W)=>({status:Y.value,value:W}))});z8.assertNever(G)}};LZ.create=($,Y,X)=>{return new LZ({schema:$,typeName:U0.ZodEffects,effect:Y,...k6(X)})};LZ.createWithPreprocess=($,Y,X)=>{return new LZ({schema:Y,effect:{type:"preprocess",transform:$},typeName:U0.ZodEffects,...k6(X)})};LW=class LW extends a6{_parse($){if(this._getType($)===b1.undefined)return $G(void 0);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}};LW.create=($,Y)=>{return new LW({innerType:$,typeName:U0.ZodOptional,...k6(Y)})};DZ=class DZ extends a6{_parse($){if(this._getType($)===b1.null)return $G(null);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}};DZ.create=($,Y)=>{return new DZ({innerType:$,typeName:U0.ZodNullable,...k6(Y)})};SL=class SL extends a6{_parse($){let{ctx:Y}=this._processInputParams($),X=Y.data;if(Y.parsedType===b1.undefined)X=this._def.defaultValue();return this._def.innerType._parse({data:X,path:Y.path,parent:Y})}removeDefault(){return this._def.innerType}};SL.create=($,Y)=>{return new SL({innerType:$,typeName:U0.ZodDefault,defaultValue:typeof Y.default==="function"?Y.default:()=>Y.default,...k6(Y)})};K_=class K_ extends a6{_parse($){let{ctx:Y}=this._processInputParams($),X={...Y,common:{...Y.common,issues:[]}},G=this._def.innerType._parse({data:X.data,path:X.path,parent:{...X}});if(ew(G))return G.then((J)=>{return{status:"valid",value:J.status==="valid"?J.value:this._def.catchValue({get error(){return new HQ(X.common.issues)},input:X.data})}});else return{status:"valid",value:G.status==="valid"?G.value:this._def.catchValue({get error(){return new HQ(X.common.issues)},input:X.data})}}removeCatch(){return this._def.innerType}};K_.create=($,Y)=>{return new K_({innerType:$,typeName:U0.ZodCatch,catchValue:typeof Y.catch==="function"?Y.catch:()=>Y.catch,...k6(Y)})};gh=class gh extends a6{_parse($){if(this._getType($)!==b1.nan){let X=this._getOrReturnCtx($);return s1(X,{code:A1.invalid_type,expected:b1.nan,received:X.parsedType}),a4}return{status:"valid",value:$.data}}};gh.create=($)=>{return new gh({typeName:U0.ZodNaN,...k6($)})};pK8=Symbol("zod_brand");l10=class l10 extends a6{_parse($){let{ctx:Y}=this._processInputParams($),X=Y.data;return this._def.type._parse({data:X,path:Y.path,parent:Y})}unwrap(){return this._def.type}};mh=class mh extends a6{_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.common.async)return(async()=>{let J=await this._def.in._parseAsync({data:X.data,path:X.path,parent:X});if(J.status==="aborted")return a4;if(J.status==="dirty")return Y.dirty(),GO(J.value);else return this._def.out._parseAsync({data:J.value,path:X.path,parent:X})})();else{let G=this._def.in._parseSync({data:X.data,path:X.path,parent:X});if(G.status==="aborted")return a4;if(G.status==="dirty")return Y.dirty(),{status:"dirty",value:G.value};else return this._def.out._parseSync({data:G.value,path:X.path,parent:X})}}static create($,Y){return new mh({in:$,out:Y,typeName:U0.ZodPipeline})}};Z_=class Z_ extends a6{_parse($){let Y=this._def.innerType._parse($),X=(G)=>{if(wL(G))G.value=Object.freeze(G.value);return G};return ew(Y)?Y.then((G)=>X(G)):X(Y)}unwrap(){return this._def.innerType}};Z_.create=($,Y)=>{return new Z_({innerType:$,typeName:U0.ZodReadonly,...k6(Y)})};dK8={object:g5.lazycreate};(function($){$.ZodString="ZodString",$.ZodNumber="ZodNumber",$.ZodNaN="ZodNaN",$.ZodBigInt="ZodBigInt",$.ZodBoolean="ZodBoolean",$.ZodDate="ZodDate",$.ZodSymbol="ZodSymbol",$.ZodUndefined="ZodUndefined",$.ZodNull="ZodNull",$.ZodAny="ZodAny",$.ZodUnknown="ZodUnknown",$.ZodNever="ZodNever",$.ZodVoid="ZodVoid",$.ZodArray="ZodArray",$.ZodObject="ZodObject",$.ZodUnion="ZodUnion",$.ZodDiscriminatedUnion="ZodDiscriminatedUnion",$.ZodIntersection="ZodIntersection",$.ZodTuple="ZodTuple",$.ZodRecord="ZodRecord",$.ZodMap="ZodMap",$.ZodSet="ZodSet",$.ZodFunction="ZodFunction",$.ZodLazy="ZodLazy",$.ZodLiteral="ZodLiteral",$.ZodEnum="ZodEnum",$.ZodEffects="ZodEffects",$.ZodNativeEnum="ZodNativeEnum",$.ZodOptional="ZodOptional",$.ZodNullable="ZodNullable",$.ZodDefault="ZodDefault",$.ZodCatch="ZodCatch",$.ZodPromise="ZodPromise",$.ZodBranded="ZodBranded",$.ZodPipeline="ZodPipeline",$.ZodReadonly="ZodReadonly"})(U0||(U0={}));Tg1=VW.create,Ig1=L3.create,lK8=gh.create,iK8=jL.create,Cg1=X_.create,nK8=_z.create,rK8=yh.create,aK8=G_.create,sK8=TL.create,oK8=JO.create,tK8=_L.create,eK8=D3.create,$Z8=bh.create,YZ8=FW.create,mT0=g5.create,XZ8=g5.strictCreate,GZ8=IL.create,JZ8=c10.create,QZ8=jz.create,WZ8=N3.create,KZ8=hh.create,ZZ8=fh.create,UZ8=QO.create,HZ8=Y_.create,zZ8=J_.create,VZ8=Q_.create,FZ8=CL.create,LZ8=W_.create,DZ8=WO.create,NZ8=LZ.create,AZ8=LW.create,BZ8=DZ.create,OZ8=LZ.createWithPreprocess,EZ8=mh.create,PZ8={string:($)=>VW.create({...$,coerce:!0}),number:($)=>L3.create({...$,coerce:!0}),boolean:($)=>X_.create({...$,coerce:!0}),bigint:($)=>jL.create({...$,coerce:!0}),date:($)=>_z.create({...$,coerce:!0})},wZ8=a4});var DW={};W8(DW,{void:()=>$Z8,util:()=>z8,unknown:()=>tK8,union:()=>GZ8,undefined:()=>aK8,tuple:()=>WZ8,transformer:()=>NZ8,symbol:()=>rK8,string:()=>Tg1,strictObject:()=>XZ8,setErrorMap:()=>OK8,set:()=>UZ8,record:()=>KZ8,quotelessJson:()=>AK8,promise:()=>DZ8,preprocess:()=>OZ8,pipeline:()=>EZ8,ostring:()=>MZ8,optional:()=>AZ8,onumber:()=>RZ8,oboolean:()=>qZ8,objectUtil:()=>yT0,object:()=>mT0,number:()=>Ig1,nullable:()=>BZ8,null:()=>sK8,never:()=>eK8,nativeEnum:()=>LZ8,nan:()=>lK8,map:()=>ZZ8,makeIssue:()=>xh,literal:()=>VZ8,lazy:()=>zZ8,late:()=>dK8,isValid:()=>wL,isDirty:()=>d10,isAsync:()=>ew,isAborted:()=>p10,intersection:()=>QZ8,instanceof:()=>cK8,getParsedType:()=>F3,getErrorMap:()=>tw,function:()=>HZ8,enum:()=>FZ8,effect:()=>NZ8,discriminatedUnion:()=>JZ8,defaultErrorMap:()=>Pz,datetimeRegex:()=>wg1,date:()=>nK8,custom:()=>jg1,coerce:()=>PZ8,boolean:()=>Cg1,bigint:()=>iK8,array:()=>YZ8,any:()=>oK8,addIssueToContext:()=>s1,ZodVoid:()=>bh,ZodUnknown:()=>_L,ZodUnion:()=>IL,ZodUndefined:()=>G_,ZodType:()=>a6,ZodTuple:()=>N3,ZodTransformer:()=>LZ,ZodSymbol:()=>yh,ZodString:()=>VW,ZodSet:()=>QO,ZodSchema:()=>a6,ZodRecord:()=>hh,ZodReadonly:()=>Z_,ZodPromise:()=>WO,ZodPipeline:()=>mh,ZodParsedType:()=>b1,ZodOptional:()=>LW,ZodObject:()=>g5,ZodNumber:()=>L3,ZodNullable:()=>DZ,ZodNull:()=>TL,ZodNever:()=>D3,ZodNativeEnum:()=>W_,ZodNaN:()=>gh,ZodMap:()=>fh,ZodLiteral:()=>Q_,ZodLazy:()=>J_,ZodIssueCode:()=>A1,ZodIntersection:()=>jz,ZodFunction:()=>Y_,ZodFirstPartyTypeKind:()=>U0,ZodError:()=>HQ,ZodEnum:()=>CL,ZodEffects:()=>LZ,ZodDiscriminatedUnion:()=>c10,ZodDefault:()=>SL,ZodDate:()=>_z,ZodCatch:()=>K_,ZodBranded:()=>l10,ZodBoolean:()=>X_,ZodBigInt:()=>jL,ZodArray:()=>FW,ZodAny:()=>JO,Schema:()=>a6,ParseStatus:()=>NX,OK:()=>$G,NEVER:()=>wZ8,INVALID:()=>a4,EMPTY_PATH:()=>EK8,DIRTY:()=>GO,BRAND:()=>pK8});var uT0=V0(()=>{u10();hT0();Og1();vh();Sg1();m10()});var kg1;var cG=V0(()=>{uT0();uT0();kg1=DW});function a10($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function pT0($){}function yZ8($){if(typeof $=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:Y=pT0,onError:X=pT0,onRetry:G=pT0,onComment:J}=$,Q="",W=!0,K,Z="",H="";function z(D){let A=W?D.replace(/^\xEF\xBB\xBF/,""):D,[B,O]=bZ8(`${Q}${A}`);for(let E of B)V(E);Q=O,W=!1}function V(D){if(D===""){L();return}if(D.startsWith(":")){J&&J(D.slice(D.startsWith(": ")?2:1));return}let A=D.indexOf(":");if(A!==-1){let B=D.slice(0,A),O=D[A+1]===" "?2:1,E=D.slice(A+O);F(B,E,D);return}F(D,"",D)}function F(D,A,B){switch(D){case"event":H=A;break;case"data":Z=`${Z}${A}
`;break;case"id":K=A.includes("\x00")?void 0:A;break;case"retry":/^\d+$/.test(A)?G(parseInt(A,10)):X(new lg1(`Invalid \`retry\` value: "${A}"`,{type:"invalid-retry",value:A,line:B}));break;default:X(new lg1(`Unknown field "${D.length>20?`${D.slice(0,20)}\u2026`:D}"`,{type:"unknown-field",field:D,value:A,line:B}));break}}function L(){Z.length>0&&Y({id:K,event:H||void 0,data:Z.endsWith(`
`)?Z.slice(0,-1):Z}),K=void 0,Z="",H=""}function N(D={}){Q&&D.consume&&V(Q),W=!0,K=void 0,Z="",H="",Q=""}return{feed:z,reset:N}}function bZ8($){let Y=[],X="",G=0;for(;G<$.length;){let J=$.indexOf("\r",G),Q=$.indexOf(`
`,G),W=-1;if(J!==-1&&Q!==-1?W=Math.min(J,Q):J!==-1?J===$.length-1?W=-1:W=J:Q!==-1&&(W=Q),W===-1){X=$.slice(G);break}else{let K=$.slice(G,W);Y.push(K),G=W+1,$[G-1]==="\r"&&$[G]===`
`&&G++}}return[Y,X]}function ph(...$){return $.reduce((Y,X)=>({...Y,...X!=null?X:{}}),{})}function dh($){return Object.fromEntries([...$.headers])}async function Hm1({response:$,url:Y,maxBytes:X=rT0}){let G=$.headers.get("content-length");if(G!=null){let z=parseInt(G,10);if(!isNaN(z)&&z>X)throw new kL({url:Y,message:`Download of ${Y} exceeded maximum size of ${X} bytes (Content-Length: ${z}).`})}let J=$.body;if(J==null)return new Uint8Array(0);let Q=J.getReader(),W=[],K=0;try{while(!0){let{done:z,value:V}=await Q.read();if(z)break;if(K+=V.length,K>X)throw new kL({url:Y,message:`Download of ${Y} exceeded maximum size of ${X} bytes.`});W.push(V)}}finally{try{await Q.cancel()}finally{Q.releaseLock()}}let Z=new Uint8Array(K),H=0;for(let z of W)Z.set(z,H),H+=z.length;return Z}function U_($){return($ instanceof Error||$ instanceof DOMException)&&($.name==="AbortError"||$.name==="ResponseAborted"||$.name==="TimeoutError")}function zm1({error:$,url:Y,requestBodyValues:X}){if(U_($))return $;if($ instanceof TypeError&&gZ8.includes($.message.toLowerCase())){let G=$.cause;if(G!=null)return new M7({message:`Cannot connect to API: ${G.message}`,cause:G,url:Y,requestBodyValues:X,isRetryable:!0})}return $}function s10($=globalThis){var Y,X,G;if($.window)return"runtime/browser";if((Y=$.navigator)==null?void 0:Y.userAgent)return`runtime/${$.navigator.userAgent.toLowerCase()}`;if((G=(X=$.process)==null?void 0:X.versions)==null?void 0:G.node)return`runtime/node.js/${$.process.version.substring(0)}`;if($.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function mZ8($){if($==null)return{};let Y={};if($ instanceof Headers)$.forEach((X,G)=>{Y[G.toLowerCase()]=X});else{if(!Array.isArray($))$=Object.entries($);for(let[X,G]of $)if(G!=null)Y[X.toLowerCase()]=G}return Y}function ch($,...Y){let X=new Headers(mZ8($)),G=X.get("user-agent")||"";return X.set("user-agent",[G,...Y].filter(Boolean).join(" ")),Object.fromEntries(X.entries())}function z_({settingValue:$,environmentVariableName:Y}){if(typeof $==="string")return $;if($!=null||typeof process>"u")return;if($=process.env[Y],$==null||typeof $!=="string")return;return $}function rg1($){let Y=JSON.parse($);if(Y===null||typeof Y!=="object")return Y;if(pZ8.test($)===!1&&dZ8.test($)===!1)return Y;return cZ8(Y)}function cZ8($){let Y=[$];while(Y.length){let X=Y;Y=[];for(let G of X){if(Object.prototype.hasOwnProperty.call(G,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(G,"constructor")&&G.constructor!==null&&typeof G.constructor==="object"&&Object.prototype.hasOwnProperty.call(G.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let J in G){let Q=G[J];if(Q&&typeof Q==="object")Y.push(Q)}}}return $}function Fm1($){let{stackTraceLimit:Y}=Error;try{Error.stackTraceLimit=0}catch(X){return rg1($)}try{return rg1($)}finally{Error.stackTraceLimit=Y}}function lZ8($){return{[r10]:!0,validate:$}}function iZ8($){return typeof $==="object"&&$!==null&&r10 in $&&$[r10]===!0&&"validate"in $}function Tz($){let Y;return()=>{if(Y==null)Y=$();return Y}}function nZ8($){return iZ8($)?$:typeof $==="function"?$():rZ8($)}function rZ8($){return lZ8(async(Y)=>{let X=await $["~standard"].validate(Y);return X.issues==null?{success:!0,value:X.value}:{success:!1,error:new uh({value:Y,cause:X.issues})}})}async function aZ8({value:$,schema:Y}){let X=await ZO({value:$,schema:Y});if(!X.success)throw uh.wrap({value:$,cause:X.error});return X.value}async function ZO({value:$,schema:Y}){let X=nZ8(Y);try{if(X.validate==null)return{success:!0,value:$,rawValue:$};let G=await X.validate($);if(G.success)return{success:!0,value:G.value,rawValue:$};return{success:!1,error:uh.wrap({value:$,cause:G.error}),rawValue:$}}catch(G){return{success:!1,error:uh.wrap({value:$,cause:G}),rawValue:$}}}async function sZ8({text:$,schema:Y}){try{let X=Fm1($);if(Y==null)return X;return aZ8({value:X,schema:Y})}catch(X){if(n10.isInstance(X)||uh.isInstance(X))throw X;throw new n10({text:$,cause:X})}}async function V_({text:$,schema:Y}){try{let X=Fm1($);if(Y==null)return{success:!0,value:X,rawValue:X};return await ZO({value:X,schema:Y})}catch(X){return{success:!1,error:n10.isInstance(X)?X:new n10({text:$,cause:X}),rawValue:void 0}}}function oZ8({stream:$,schema:Y}){return $.pipeThrough(new TextDecoderStream).pipeThrough(new hZ8).pipeThrough(new TransformStream({async transform({data:X},G){if(X==="[DONE]")return;G.enqueue(await V_({text:X,schema:Y}))}}))}function aT0($){return $}function sT0({id:$,name:Y,inputSchema:X,outputSchema:G}){return({execute:J,toModelOutput:Q,onInputStart:W,onInputDelta:K,onInputAvailable:Z,...H})=>aT0({type:"provider-defined",id:$,name:Y,args:H,inputSchema:X,outputSchema:G,execute:J,toModelOutput:Q,onInputStart:W,onInputDelta:K,onInputAvailable:Z})}async function AW($){if(typeof $==="function")$=$();return Promise.resolve($)}function UO($){let Y;return()=>{if(Y==null)Y=$();return Y}}function oT0($,{validate:Y}={}){return{[lT0]:!0,_type:void 0,[r10]:!0,get jsonSchema(){if(typeof $==="function")$=$();return $},validate:Y}}function i10($){if($.type==="object"){$.additionalProperties=!1;let Y=$.properties;if(Y!=null)for(let X in Y)Y[X]=i10(Y[X])}if($.type==="array"&&$.items!=null)if(Array.isArray($.items))$.items=$.items.map((Y)=>i10(Y));else $.items=i10($.items);return $}function NW(){return{}}function XU8($,Y){var X,G,J;let Q={type:"array"};if(((X=$.type)==null?void 0:X._def)&&((J=(G=$.type)==null?void 0:G._def)==null?void 0:J.typeName)!==U0.ZodAny)Q.items=d9($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)Q.minItems=$.minLength.value;if($.maxLength)Q.maxItems=$.maxLength.value;if($.exactLength)Q.minItems=$.exactLength.value,Q.maxItems=$.exactLength.value;return Q}function GU8($){let Y={type:"integer",format:"int64"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function JU8(){return{type:"boolean"}}function Dm1($,Y){return d9($.type._def,Y)}function Nm1($,Y,X){let G=X!=null?X:Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>Nm1($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return WU8($)}}function KU8($,Y){return{...d9($.innerType._def,Y),default:$.defaultValue()}}function ZU8($,Y){return Y.effectStrategy==="input"?d9($.schema._def,Y):NW()}function UU8($){return{type:"string",enum:Array.from($.values)}}function zU8($,Y){let X=[d9($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),d9($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((J)=>!!J),G=[];return X.forEach((J)=>{if(HU8(J))G.push(...J.allOf);else{let Q=J;if("additionalProperties"in J&&J.additionalProperties===!1){let{additionalProperties:W,...K}=J;Q=K}G.push(Q)}}),G.length?{allOf:G}:void 0}function VU8($){let Y=typeof $.value;if(Y!=="bigint"&&Y!=="number"&&Y!=="boolean"&&Y!=="string")return{type:Array.isArray($.value)?"array":"object"};return{type:Y==="bigint"?"integer":Y,const:$.value}}function Am1($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value;break;case"max":X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"email":switch(Y.emailStrategy){case"format:email":AZ(X,"email",G.message,Y);break;case"format:idn-email":AZ(X,"idn-email",G.message,Y);break;case"pattern:zod":lG(X,NZ.email,G.message,Y);break}break;case"url":AZ(X,"uri",G.message,Y);break;case"uuid":AZ(X,"uuid",G.message,Y);break;case"regex":lG(X,G.regex,G.message,Y);break;case"cuid":lG(X,NZ.cuid,G.message,Y);break;case"cuid2":lG(X,NZ.cuid2,G.message,Y);break;case"startsWith":lG(X,RegExp(`^${cT0(G.value,Y)}`),G.message,Y);break;case"endsWith":lG(X,RegExp(`${cT0(G.value,Y)}$`),G.message,Y);break;case"datetime":AZ(X,"date-time",G.message,Y);break;case"date":AZ(X,"date",G.message,Y);break;case"time":AZ(X,"time",G.message,Y);break;case"duration":AZ(X,"duration",G.message,Y);break;case"length":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"includes":{lG(X,RegExp(cT0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")AZ(X,"ipv4",G.message,Y);if(G.version!=="v4")AZ(X,"ipv6",G.message,Y);break}case"base64url":lG(X,NZ.base64url,G.message,Y);break;case"jwt":lG(X,NZ.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")lG(X,NZ.ipv4Cidr,G.message,Y);if(G.version!=="v4")lG(X,NZ.ipv6Cidr,G.message,Y);break}case"emoji":lG(X,NZ.emoji(),G.message,Y);break;case"ulid":{lG(X,NZ.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{AZ(X,"binary",G.message,Y);break}case"contentEncoding:base64":{X.contentEncoding="base64";break}case"pattern:zod":{lG(X,NZ.base64,G.message,Y);break}}break}case"nanoid":lG(X,NZ.nanoid,G.message,Y)}return X}function cT0($,Y){return Y.patternStrategy==="escape"?LU8($):$}function LU8($){let Y="";for(let X=0;X<$.length;X++){if(!FU8.has($[X]))Y+="\\";Y+=$[X]}return Y}function AZ($,Y,X,G){var J;if($.format||((J=$.anyOf)==null?void 0:J.some((Q)=>Q.format))){if(!$.anyOf)$.anyOf=[];if($.format)$.anyOf.push({format:$.format}),delete $.format;$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else $.format=Y}function lG($,Y,X,G){var J;if($.pattern||((J=$.allOf)==null?void 0:J.some((Q)=>Q.pattern))){if(!$.allOf)$.allOf=[];if($.pattern)$.allOf.push({pattern:$.pattern}),delete $.pattern;$.allOf.push({pattern:sg1(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else $.pattern=sg1(Y,G)}function sg1($,Y){var X;if(!Y.applyRegexFlags||!$.flags)return $.source;let G={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},J=G.i?$.source.toLowerCase():$.source,Q="",W=!1,K=!1,Z=!1;for(let H=0;H<J.length;H++){if(W){Q+=J[H],W=!1;continue}if(G.i){if(K){if(J[H].match(/[a-z]/)){if(Z)Q+=J[H],Q+=`${J[H-2]}-${J[H]}`.toUpperCase(),Z=!1;else if(J[H+1]==="-"&&((X=J[H+2])==null?void 0:X.match(/[a-z]/)))Q+=J[H],Z=!0;else Q+=`${J[H]}${J[H].toUpperCase()}`;continue}}else if(J[H].match(/[a-z]/)){Q+=`[${J[H]}${J[H].toUpperCase()}]`;continue}}if(G.m){if(J[H]==="^"){Q+=`(^|(?<=[\r
]))`;continue}else if(J[H]==="$"){Q+=`($|(?=[\r
]))`;continue}}if(G.s&&J[H]==="."){Q+=K?`${J[H]}\r
`:`[${J[H]}\r
]`;continue}if(Q+=J[H],J[H]==="\\")W=!0;else if(K&&J[H]==="]")K=!1;else if(!K&&J[H]==="[")K=!0}return Q}function Bm1($,Y){var X,G,J,Q,W,K;let Z={type:"object",additionalProperties:(X=d9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]}))!=null?X:Y.allowedAdditionalProperties};if(((G=$.keyType)==null?void 0:G._def.typeName)===U0.ZodString&&((J=$.keyType._def.checks)==null?void 0:J.length)){let{type:H,...z}=Am1($.keyType._def,Y);return{...Z,propertyNames:z}}else if(((Q=$.keyType)==null?void 0:Q._def.typeName)===U0.ZodEnum)return{...Z,propertyNames:{enum:$.keyType._def.values}};else if(((W=$.keyType)==null?void 0:W._def.typeName)===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&((K=$.keyType._def.type._def.checks)==null?void 0:K.length)){let{type:H,...z}=Dm1($.keyType._def,Y);return{...Z,propertyNames:z}}return Z}function DU8($,Y){if(Y.mapStrategy==="record")return Bm1($,Y);let X=d9($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||NW(),G=d9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||NW();return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function NU8($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function AU8(){return{not:NW()}}function BU8(){return{type:"null"}}function OU8($,Y){let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in iT0)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=iT0[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,K)=>K.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return EU8($,Y)}function MU8($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length))return{type:[iT0[$.innerType._def.typeName],"null"]};let X=d9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function RU8($){let Y={type:"number"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"int":Y.type="integer";break;case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function qU8($,Y){let X={type:"object",properties:{}},G=[],J=$.shape();for(let W in J){let K=J[W];if(K===void 0||K._def===void 0)continue;let Z=wU8(K),H=d9(K._def,{...Y,currentPath:[...Y.currentPath,"properties",W],propertyPath:[...Y.currentPath,"properties",W]});if(H===void 0)continue;if(X.properties[W]=H,!Z)G.push(W)}if(G.length)X.required=G;let Q=PU8($,Y);if(Q!==void 0)X.additionalProperties=Q;return X}function PU8($,Y){if($.catchall._def.typeName!=="ZodNever")return d9($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function wU8($){try{return $.isOptional()}catch(Y){return!0}}function TU8($,Y){return d9($.type._def,Y)}function IU8($,Y){let G={type:"array",uniqueItems:!0,items:d9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)G.minItems=$.minSize.value;if($.maxSize)G.maxItems=$.maxSize.value;return G}function CU8($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>d9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:d9($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>d9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function SU8(){return{not:NW()}}function kU8(){return NW()}function d9($,Y,X=!1){var G;let J=Y.seen.get($);if(Y.override){let Z=(G=Y.override)==null?void 0:G.call(Y,$,Y,J,X);if(Z!==$U8)return Z}if(J&&!X){let Z=bU8(J,Y);if(Z!==void 0)return Z}let Q={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,Q);let W=xU8($,$.typeName,Y),K=typeof W==="function"?d9(W(),Y):W;if(K)hU8($,Y,K);if(Y.postProcess){let Z=Y.postProcess(K,$,Y);return Q.jsonSchema=K,Z}return Q.jsonSchema=K,K}function uU8($,Y){var X;let G=(X=Y==null?void 0:Y.useReferences)!=null?X:!1;return oT0(()=>mU8($,{$refStrategy:G?"root":"none"}),{validate:async(J)=>{let Q=await $.safeParseAsync(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function pU8($,Y){var X;let G=(X=Y==null?void 0:Y.useReferences)!=null?X:!1;return oT0(()=>i10(e$($,{target:"draft-7",io:"input",reused:G?"ref":"inline"})),{validate:async(J)=>{let Q=await oX($,J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function dU8($){return"_zod"in $}function YG($,Y){if(dU8($))return pU8($,Y);else return uU8($,Y)}function cU8($){return typeof $==="object"&&$!==null&&lT0 in $&&$[lT0]===!0&&"jsonSchema"in $&&"validate"in $}function o10($){return $==null?oT0({properties:{},additionalProperties:!1}):cU8($)?$:typeof $==="function"?$():YG($)}function tT0($){let Y;try{Y=new URL($)}catch(G){throw new kL({url:$,message:`Invalid URL: ${$}`})}if(Y.protocol==="data:")return;if(Y.protocol!=="http:"&&Y.protocol!=="https:")throw new kL({url:$,message:`URL scheme must be http, https, or data, got ${Y.protocol}`});let X=Y.hostname;if(!X)throw new kL({url:$,message:"URL must have a hostname"});if(X==="localhost"||X.endsWith(".local")||X.endsWith(".localhost"))throw new kL({url:$,message:`URL with hostname ${X} is not allowed`});if(X.startsWith("[")&&X.endsWith("]")){let G=X.slice(1,-1);if(lU8(G))throw new kL({url:$,message:`URL with IPv6 address ${X} is not allowed`});return}if(Om1(X)){if(nT0(X))throw new kL({url:$,message:`URL with IP address ${X} is not allowed`});return}}function Om1($){let Y=$.split(".");if(Y.length!==4)return!1;return Y.every((X)=>{let G=Number(X);return Number.isInteger(G)&&G>=0&&G<=255&&String(G)===X})}function nT0($){let Y=$.split(".").map(Number),[X,G]=Y;if(X===0)return!0;if(X===10)return!0;if(X===127)return!0;if(X===169&&G===254)return!0;if(X===172&&G>=16&&G<=31)return!0;if(X===192&&G===168)return!0;return!1}function lU8($){let Y=$.toLowerCase();if(Y==="::1")return!0;if(Y==="::")return!0;if(Y.startsWith("::ffff:")){let X=Y.slice(7);if(Om1(X))return nT0(X);let G=X.split(":");if(G.length===2){let J=parseInt(G[0],16),Q=parseInt(G[1],16);if(!isNaN(J)&&!isNaN(Q)){let W=J>>8&255,K=J&255,Z=Q>>8&255,H=Q&255;return nT0(`${W}.${K}.${Z}.${H}`)}}}if(Y.startsWith("fc")||Y.startsWith("fd"))return!0;if(Y.startsWith("fe80"))return!0;return!1}function Em1($){return $==null?void 0:$.replace(/\/$/,"")}var og1="vercel.ai.error",jZ8,vg1,xg1,UY,tg1="AI_APICallError",eg1,TZ8,yg1,bg1,M7,$m1="AI_EmptyResponseBodyError",Ym1,IZ8,hg1,fg1,CZ8,Xm1="AI_InvalidArgumentError",Gm1,SZ8,gg1,mg1,kZ8,Jm1="AI_JSONParseError",Qm1,vZ8,ug1,pg1,n10,Wm1="AI_TypeValidationError",Km1,xZ8,dg1,cg1,uh,lg1,hZ8,Zm1="AI_DownloadError",Um1,fZ8,ig1,ng1,kL,rT0=2147483648,H_=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=()=>{let Q=X.length,W=Array(Y);for(let K=0;K<Y;K++)W[K]=X[Math.random()*Q|0];return W.join("")};if($==null)return J;if(X.includes(G))throw new kZ8({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return()=>`${$}${G}${J()}`},KO,gZ8,Vm1="3.0.25",uZ8=()=>globalThis.fetch,lh=async({url:$,headers:Y={},successfulResponseHandler:X,failedResponseHandler:G,abortSignal:J,fetch:Q=uZ8()})=>{try{let W=await Q($,{method:"GET",headers:ch(Y,`ai-sdk/provider-utils/${Vm1}`,s10()),signal:J}),K=dh(W);if(!W.ok){let Z;try{Z=await G({response:W,url:$,requestBodyValues:{}})}catch(H){if(U_(H)||M7.isInstance(H))throw H;throw new M7({message:"Failed to process error response",cause:H,statusCode:W.status,url:$,responseHeaders:K,requestBodyValues:{}})}throw Z.value}try{return await X({response:W,url:$,requestBodyValues:{}})}catch(Z){if(Z instanceof Error){if(U_(Z)||M7.isInstance(Z))throw Z}throw new M7({message:"Failed to process successful response",cause:Z,statusCode:W.status,url:$,responseHeaders:K,requestBodyValues:{}})}}catch(W){throw zm1({error:W,url:$,requestBodyValues:{}})}},pZ8,dZ8,r10,tZ8=()=>globalThis.fetch,ih=async({url:$,headers:Y,body:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>eZ8({url:$,headers:{"Content-Type":"application/json",...Y},body:{content:JSON.stringify(X),values:X},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),eZ8=async({url:$,headers:Y={},body:X,successfulResponseHandler:G,failedResponseHandler:J,abortSignal:Q,fetch:W=tZ8()})=>{try{let K=await W($,{method:"POST",headers:ch(Y,`ai-sdk/provider-utils/${Vm1}`,s10()),body:X.content,signal:Q}),Z=dh(K);if(!K.ok){let H;try{H=await J({response:K,url:$,requestBodyValues:X.values})}catch(z){if(U_(z)||M7.isInstance(z))throw z;throw new M7({message:"Failed to process error response",cause:z,statusCode:K.status,url:$,responseHeaders:Z,requestBodyValues:X.values})}throw H.value}try{return await G({response:K,url:$,requestBodyValues:X.values})}catch(H){if(H instanceof Error){if(U_(H)||M7.isInstance(H))throw H}throw new M7({message:"Failed to process successful response",cause:H,statusCode:K.status,url:$,responseHeaders:Z,requestBodyValues:X.values})}}catch(K){throw zm1({error:K,url:$,requestBodyValues:X.values})}},Iz=({errorSchema:$,errorToMessage:Y,isRetryable:X})=>async({response:G,url:J,requestBodyValues:Q})=>{let W=await G.text(),K=dh(G);if(W.trim()==="")return{responseHeaders:K,value:new M7({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,isRetryable:X==null?void 0:X(G)})};try{let Z=await sZ8({text:W,schema:$});return{responseHeaders:K,value:new M7({message:Y(Z),url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,data:Z,isRetryable:X==null?void 0:X(G,Z)})}}catch(Z){return{responseHeaders:K,value:new M7({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,isRetryable:X==null?void 0:X(G)})}}},Lm1=($)=>async({response:Y})=>{let X=dh(Y);if(Y.body==null)throw new CZ8({});return{responseHeaders:X,value:oZ8({stream:Y.body,schema:$})}},vL=($)=>async({response:Y,url:X,requestBodyValues:G})=>{let J=await Y.text(),Q=await V_({text:J,schema:$}),W=dh(Y);if(!Q.success)throw new M7({message:"Invalid JSON response",cause:Q.error,statusCode:Y.status,responseHeaders:W,responseBody:J,url:X,requestBodyValues:G});return{responseHeaders:W,value:Q.value,rawValue:Q.rawValue}},lT0,$U8,ag1,YU8=($)=>typeof $==="string"?{...ag1,name:$}:{...ag1,...$},QU8=($,Y)=>{return d9($.innerType._def,Y)},WU8=($)=>{let Y={type:"integer",format:"unix-time"};for(let X of $.checks)switch(X.kind){case"min":Y.minimum=X.value;break;case"max":Y.maximum=X.value;break}return Y},HU8=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $},dT0=void 0,NZ,FU8,iT0,EU8=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>d9(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0},_U8=($,Y)=>{var X;if(Y.currentPath.toString()===((X=Y.propertyPath)==null?void 0:X.toString()))return d9($.innerType._def,Y);let G=d9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return G?{anyOf:[{not:NW()},G]}:NW()},jU8=($,Y)=>{if(Y.pipeStrategy==="input")return d9($.in._def,Y);else if(Y.pipeStrategy==="output")return d9($.out._def,Y);let X=d9($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=d9($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}},vU8=($,Y)=>{return d9($.innerType._def,Y)},xU8=($,Y,X)=>{switch(Y){case U0.ZodString:return Am1($,X);case U0.ZodNumber:return RU8($);case U0.ZodObject:return qU8($,X);case U0.ZodBigInt:return GU8($);case U0.ZodBoolean:return JU8();case U0.ZodDate:return Nm1($,X);case U0.ZodUndefined:return SU8();case U0.ZodNull:return BU8();case U0.ZodArray:return XU8($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return OU8($,X);case U0.ZodIntersection:return zU8($,X);case U0.ZodTuple:return CU8($,X);case U0.ZodRecord:return Bm1($,X);case U0.ZodLiteral:return VU8($);case U0.ZodEnum:return UU8($);case U0.ZodNativeEnum:return NU8($);case U0.ZodNullable:return MU8($,X);case U0.ZodOptional:return _U8($,X);case U0.ZodMap:return DU8($,X);case U0.ZodSet:return IU8($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return TU8($,X);case U0.ZodNaN:case U0.ZodNever:return AU8();case U0.ZodEffects:return ZU8($,X);case U0.ZodAny:return NW();case U0.ZodUnknown:return kU8();case U0.ZodDefault:return KU8($,X);case U0.ZodBranded:return Dm1($,X);case U0.ZodReadonly:return vU8($,X);case U0.ZodCatch:return QU8($,X);case U0.ZodPipeline:return jU8($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})()}},yU8=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")},bU8=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:yU8(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),NW();return Y.$refStrategy==="seen"?NW():void 0}}},hU8=($,Y,X)=>{if($.description)X.description=$.description;return X},fU8=($)=>{let Y=YU8($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}},gU8=($,Y)=>{var X;let G=fU8(Y),J=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((H,[z,V])=>{var F;return{...H,[z]:(F=d9(V._def,{...G,currentPath:[...G.basePath,G.definitionPath,z]},!0))!=null?F:NW()}},{}):void 0,Q=typeof Y==="string"?Y:(Y==null?void 0:Y.nameStrategy)==="title"?void 0:Y==null?void 0:Y.name,W=(X=d9($._def,Q===void 0?G:{...G,currentPath:[...G.basePath,G.definitionPath,Q]},!1))!=null?X:NW(),K=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(K!==void 0)W.title=K;let Z=Q===void 0?J?{...W,[G.definitionPath]:J}:W:{$ref:[...G.$refStrategy==="relative"?[]:G.basePath,G.definitionPath,Q].join("/"),[G.definitionPath]:{...J,[Q]:W}};return Z.$schema="http://json-schema.org/draft-07/schema#",Z},mU8;var eT0=V0(()=>{O1();cG();jZ8=Symbol.for(og1),UY=class $ extends(xg1=Error,vg1=jZ8,xg1){constructor({name:Y,message:X,cause:G}){super(X);this[vg1]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,og1)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}},eg1=`vercel.ai.error.${tg1}`,TZ8=Symbol.for(eg1),M7=class extends(bg1=UY,yg1=TZ8,bg1){constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:K=G!=null&&(G===408||G===409||G===429||G>=500),data:Z}){super({name:tg1,message:$,cause:W});this[yg1]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=K,this.data=Z}static isInstance($){return UY.hasMarker($,eg1)}},Ym1=`vercel.ai.error.${$m1}`,IZ8=Symbol.for(Ym1),CZ8=class extends(fg1=UY,hg1=IZ8,fg1){constructor({message:$="Empty response body"}={}){super({name:$m1,message:$});this[hg1]=!0}static isInstance($){return UY.hasMarker($,Ym1)}};Gm1=`vercel.ai.error.${Xm1}`,SZ8=Symbol.for(Gm1),kZ8=class extends(mg1=UY,gg1=SZ8,mg1){constructor({message:$,cause:Y,argument:X}){super({name:Xm1,message:$,cause:Y});this[gg1]=!0,this.argument=X}static isInstance($){return UY.hasMarker($,Gm1)}},Qm1=`vercel.ai.error.${Jm1}`,vZ8=Symbol.for(Qm1),n10=class extends(pg1=UY,ug1=vZ8,pg1){constructor({text:$,cause:Y}){super({name:Jm1,message:`JSON parsing failed: Text: ${$}.
Error message: ${a10(Y)}`,cause:Y});this[ug1]=!0,this.text=$}static isInstance($){return UY.hasMarker($,Qm1)}},Km1=`vercel.ai.error.${Wm1}`,xZ8=Symbol.for(Km1),uh=class $ extends(cg1=UY,dg1=xZ8,cg1){constructor({value:Y,cause:X}){super({name:Wm1,message:`Type validation failed: Value: ${JSON.stringify(Y)}.
Error message: ${a10(X)}`,cause:X});this[dg1]=!0,this.value=Y}static isInstance(Y){return UY.hasMarker(Y,Km1)}static wrap({value:Y,cause:X}){return $.isInstance(X)&&X.value===Y?X:new $({value:Y,cause:X})}},lg1=class extends Error{constructor($,Y){super($),this.name="ParseError",this.type=Y.type,this.field=Y.field,this.value=Y.value,this.line=Y.line}};hZ8=class extends TransformStream{constructor({onError:$,onRetry:Y,onComment:X}={}){let G;super({start(J){G=yZ8({onEvent:(Q)=>{J.enqueue(Q)},onError(Q){$==="terminate"?J.error(Q):typeof $=="function"&&$(Q)},onRetry:Y,onComment:X})},transform(J){G.feed(J)}})}};Um1=`vercel.ai.error.${Zm1}`,fZ8=Symbol.for(Um1),kL=class extends(ng1=UY,ig1=fZ8,ng1){constructor({url:$,statusCode:Y,statusText:X,cause:G,message:J=G==null?`Failed to download ${$}: ${Y} ${X}`:`Failed to download ${$}: ${G}`}){super({name:Zm1,message:J,cause:G});this[ig1]=!0,this.url=$,this.statusCode=Y,this.statusText=X}static isInstance($){return UY.hasMarker($,Um1)}};KO=H_();gZ8=["fetch failed","failed to fetch"];pZ8=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,dZ8=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;r10=Symbol.for("vercel.ai.validator");lT0=Symbol.for("vercel.ai.schema");$U8=Symbol("Let zodToJsonSchema decide on which parser to use"),ag1={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"};NZ={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(dT0===void 0)dT0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return dT0},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};FU8=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");iT0={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};mU8=gU8});function iU8(){return{headers:{}}}async function nU8(){if(process.env.VERCEL_OIDC_TOKEN)return process.env.VERCEL_OIDC_TOKEN??"";throw Error("@vercel/oidc is not available in the vendored @internal AI packages. Provide an API key instead.")}async function pm1({response:$,statusCode:Y,defaultMessage:X="Gateway request failed",cause:G,authMethod:J}){let Q=await ZO({value:$,schema:W38});if(!Q.success)return new Q38({message:`Invalid error response format: ${X}`,statusCode:Y,response:$,validationError:Q.error,cause:G});let W=Q.value,K=W.error.type,Z=W.error.message;switch(K){case"authentication_error":return Ju1.createContextualError({apiKeyProvided:J==="api-key",oidcTokenProvided:J==="oidc",statusCode:Y,cause:G});case"invalid_request_error":return new oU8({message:Z,statusCode:Y,cause:G});case"rate_limit_exceeded":return new eU8({message:Z,statusCode:Y,cause:G});case"model_not_found":{let H=await ZO({value:W.error.param,schema:Y38});return new X38({message:Z,statusCode:Y,modelId:H.success?H.value.modelId:void 0,cause:G})}case"internal_server_error":return new fm1({message:Z,statusCode:Y,cause:G});default:return new fm1({message:Z,statusCode:Y,cause:G})}}function K38($){if($.data!==void 0)return $.data;if($.responseBody!=null)try{return JSON.parse($.responseBody)}catch(Y){return $.responseBody}return{}}function nm1($){if(!($ instanceof Error))return!1;let Y=$.code;if(typeof Y==="string")return["UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_CONNECT_TIMEOUT"].includes(Y);return!1}async function d2($,Y){var X;if(iG.isInstance($))return $;if(nm1($))return im1.createTimeoutError({originalMessage:$ instanceof Error?$.message:"Unknown error",cause:$});if(M7.isInstance($)){if($.cause&&nm1($.cause))return im1.createTimeoutError({originalMessage:$.message,cause:$});return await pm1({response:K38($),statusCode:(X=$.statusCode)!=null?X:500,defaultMessage:"Gateway request failed",cause:$,authMethod:Y})}return await pm1({response:{},statusCode:500,defaultMessage:$ instanceof Error?`Gateway request failed: ${$.message}`:"Unknown Gateway error",cause:$,authMethod:Y})}async function xL($){let Y=await ZO({value:$[zu1],schema:U38});return Y.success?Y.value:void 0}async function v38(){var $;return($=iU8().headers)==null?void 0:$["x-vercel-id"]}function b38($={}){var Y,X;let G=null,J=null,Q=(Y=$.metadataCacheRefreshMillis)!=null?Y:300000,W=0,K=(X=Em1($.baseURL))!=null?X:"https://ai-gateway.vercel.sh/v1/ai",Z=async()=>{let A=await h38($);if(A)return ch({Authorization:`Bearer ${A.token}`,"ai-gateway-protocol-version":y38,[zu1]:A.authMethod,...$.headers},`ai-sdk/gateway/${x38}`);throw Ju1.createContextualError({apiKeyProvided:!1,oidcTokenProvided:!1,statusCode:401})},H=()=>{let A=z_({settingValue:void 0,environmentVariableName:"VERCEL_DEPLOYMENT_ID"}),B=z_({settingValue:void 0,environmentVariableName:"VERCEL_ENV"}),O=z_({settingValue:void 0,environmentVariableName:"VERCEL_REGION"}),E=z_({settingValue:void 0,environmentVariableName:"VERCEL_PROJECT_ID"});return async()=>{let M=await v38();return{...A&&{"ai-o11y-deployment-id":A},...B&&{"ai-o11y-environment":B},...O&&{"ai-o11y-region":O},...M&&{"ai-o11y-request-id":M},...E&&{"ai-o11y-project-id":E}}}},z=(A)=>{return new A38(A,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})},V=async()=>{var A,B,O;let E=(O=(B=(A=$._internal)==null?void 0:A.currentDate)==null?void 0:B.call(A).getTime())!=null?O:Date.now();if(!G||E-W>Q)W=E,G=new rm1({baseURL:K,headers:Z,fetch:$.fetch}).getAvailableModels().then((M)=>{return J=M,M}).catch(async(M)=>{throw await d2(M,await xL(await Z()))});return J?Promise.resolve(J):G},F=async()=>{return new rm1({baseURL:K,headers:Z,fetch:$.fetch}).getCredits().catch(async(A)=>{throw await d2(A,await xL(await Z()))})},L=async(A)=>{return new F38({baseURL:K,headers:Z,fetch:$.fetch}).getSpendReport(A).catch(async(B)=>{throw await d2(B,await xL(await Z()))})},N=async(A)=>{return new D38({baseURL:K,headers:Z,fetch:$.fetch}).getGenerationInfo(A).catch(async(B)=>{throw await d2(B,await xL(await Z()))})},D=function(A){if(new.target)throw Error("The Gateway Provider model function cannot be called with the new keyword.");return z(A)};return D.getAvailableModels=V,D.getCredits=F,D.getSpendReport=L,D.getGenerationInfo=N,D.imageModel=(A)=>{return new E38(A,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})},D.languageModel=z,D.textEmbeddingModel=(A)=>{return new B38(A,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})},D.tools=k38,D}async function h38($){let Y=z_({settingValue:$.apiKey,environmentVariableName:"AI_GATEWAY_API_KEY"});if(Y)return{token:Y,authMethod:"api-key"};try{return{token:await nU8(),authMethod:"oidc"}}catch(X){return null}}function g38($){var Y=new Set([$]),X=new Set,G=$.match(am1);if(!G)return function(){return!1};var J={major:+G[1],minor:+G[2],patch:+G[3],prerelease:G[4]};if(J.prerelease!=null)return function(Z){return Z===$};function Q(K){return X.add(K),!1}function W(K){return Y.add(K),!0}return function(Z){if(Y.has(Z))return!0;if(X.has(Z))return!1;var H=Z.match(am1);if(!H)return Q(Z);var z={major:+H[1],minor:+H[2],patch:+H[3],prerelease:H[4]};if(z.prerelease!=null)return Q(Z);if(J.major!==z.major)return Q(Z);if(J.major===0){if(J.minor===z.minor&&J.patch<=z.patch)return W(Z);return Q(Z)}if(J.minor<=z.minor)return W(Z);return Q(Z)}}function UI0($,Y,X,G){var J;if(G===void 0)G=!1;var Q=sh[ah]=(J=sh[ah])!==null&&J!==void 0?J:{version:HO};if(!G&&Q[$]){var W=Error("@opentelemetry/api: Attempted duplicate registration of API: "+$);return X.error(W.stack||W.message),!1}if(Q.version!==HO){var W=Error("@opentelemetry/api: Registration of version v"+Q.version+" for "+$+" does not match previously registered API v"+HO);return X.error(W.stack||W.message),!1}return Q[$]=Y,X.debug("@opentelemetry/api: Registered a global for "+$+" v"+HO+"."),!0}function oh($){var Y,X,G=(Y=sh[ah])===null||Y===void 0?void 0:Y.version;if(!G||!m38(G))return;return(X=sh[ah])===null||X===void 0?void 0:X[$]}function HI0($,Y){Y.debug("@opentelemetry/api: Unregistering a global for "+$+" v"+HO+".");var X=sh[ah];if(X)delete X[$]}function nh($,Y,X){var G=oh("diag");if(!G)return;return X.unshift(Y),G[$].apply(G,d38([],p38(X),!1))}function l38($,Y){if($<BW.NONE)$=BW.NONE;else if($>BW.ALL)$=BW.ALL;Y=Y||{};function X(G,J){var Q=Y[G];if(typeof Q==="function"&&$>=J)return Q.bind(Y);return function(){}}return{error:X("error",BW.ERROR),warn:X("warn",BW.WARN),info:X("info",BW.INFO),debug:X("debug",BW.DEBUG),verbose:X("verbose",BW.VERBOSE)}}function a38($){return Symbol.for($)}function VI0($){return $.getValue(zI0)||void 0}function QH8(){return VI0(Vu1.getInstance().active())}function FI0($,Y){return $.setValue(zI0,Y)}function WH8($){return $.deleteValue(zI0)}function KH8($,Y){return FI0($,new rh(Y))}function Du1($){var Y;return(Y=VI0($))===null||Y===void 0?void 0:Y.spanContext()}function HH8($){return ZH8.test($)&&$!==Lu1}function zH8($){return UH8.test($)&&$!==Fu1}function Nu1($){return HH8($.traceId)&&zH8($.spanId)}function VH8($){return new rh($)}function FH8($){return typeof $==="object"&&typeof $.spanId==="string"&&typeof $.traceId==="string"&&typeof $.traceFlags==="number"}function LI0($){return({steps:Y})=>Y.length===$}function em1({output:$,tool:Y,errorMode:X}){if(X==="text")return{type:"error-text",value:a10($)};else if(X==="json")return{type:"error-json",value:$u1($)};if(Y==null?void 0:Y.toModelOutput)return Y.toModelOutput($);return typeof $==="string"?{type:"text",value:$}:{type:"json",value:$u1($)}}function $u1($){return $===void 0?null:$}function nH8($){let Y=["ROOT"],X=-1,G=null;function J(Z,H,z){switch(Z){case'"':{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_STRING");break}case"f":case"t":case"n":{X=H,G=H,Y.pop(),Y.push(z),Y.push("INSIDE_LITERAL");break}case"-":{Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"{":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_OBJECT_START");break}case"[":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_ARRAY_START");break}}}function Q(Z,H){switch(Z){case",":{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{X=H,Y.pop();break}}}function W(Z,H){switch(Z){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=H,Y.pop();break}}}for(let Z=0;Z<$.length;Z++){let H=$[Z];switch(Y[Y.length-1]){case"ROOT":J(H,Z,"FINISH");break;case"INSIDE_OBJECT_START":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}case"}":{X=Z,Y.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(H){case":":{Y.pop(),Y.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{J(H,Z,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{Q(H,Z);break}case"INSIDE_STRING":{switch(H){case'"':{Y.pop(),X=Z;break}case"\\":{Y.push("INSIDE_STRING_ESCAPE");break}default:X=Z}break}case"INSIDE_ARRAY_START":{switch(H){case"]":{X=Z,Y.pop();break}default:{X=Z,J(H,Z,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(H){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=Z,Y.pop();break}default:{X=Z;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{J(H,Z,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{Y.pop(),X=Z;break}case"INSIDE_NUMBER":{switch(H){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=Z;break}case"e":case"E":case"-":case".":break;case",":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z);if(Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);break}case"}":{if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);break}case"]":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z);break}default:{Y.pop();break}}break}case"INSIDE_LITERAL":{let V=$.substring(G,Z+1);if(!"false".startsWith(V)&&!"true".startsWith(V)&&!"null".startsWith(V)){if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);else if(Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z)}else X=Z;break}}}let K=$.slice(0,X+1);for(let Z=Y.length-1;Z>=0;Z--)switch(Y[Z]){case"INSIDE_STRING":{K+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{K+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{K+="]";break}case"INSIDE_LITERAL":{let z=$.substring(G,$.length);if("true".startsWith(z))K+="true".slice(z.length);else if("false".startsWith(z))K+="false".slice(z.length);else if("null".startsWith(z))K+="null".slice(z.length)}}return K}async function bL($){if($===void 0)return{value:void 0,state:"undefined-input"};let Y=await V_({text:$});if(Y.success)return{value:Y.value,state:"successful-parse"};if(Y=await V_({text:nH8($)}),Y.success)return{value:Y.value,state:"repaired-parse"};return{value:void 0,state:"failed-parse"}}function QI0($){return $.type.startsWith("data-")}function WI0($){return $.type==="text"}function KI0($){return $.type==="file"}function Yu1($){return $.type==="reasoning"}function zQ($){return $.type.startsWith("tool-")}function DI0($){return $.type==="dynamic-tool"}function Xu1($){return zQ($)||DI0($)}function Su1($){return $.type.split("-").slice(1).join("-")}function rH8($){return DI0($)?$.toolName:Su1($)}function NI0($,Y){let X=[];if(Y==null?void 0:Y.ignoreIncompleteToolCalls)$=$.map((G)=>({...G,parts:G.parts.filter((J)=>!Xu1(J)||J.state!=="input-streaming"&&J.state!=="input-available")}));for(let G of $)switch(G.role){case"system":{let J=G.parts.filter((W)=>W.type==="text"),Q=J.reduce((W,K)=>{if(K.providerMetadata!=null)return{...W,...K.providerMetadata};return W},{});X.push({role:"system",content:J.map((W)=>W.text).join(""),...Object.keys(Q).length>0?{providerOptions:Q}:{}});break}case"user":{X.push({role:"user",content:G.parts.map((J)=>{var Q;if(WI0(J))return{type:"text",text:J.text,...J.providerMetadata!=null?{providerOptions:J.providerMetadata}:{}};if(KI0(J))return{type:"file",mediaType:J.mediaType,filename:J.filename,data:J.url,...J.providerMetadata!=null?{providerOptions:J.providerMetadata}:{}};if(QI0(J))return(Q=Y==null?void 0:Y.convertDataPart)==null?void 0:Q.call(Y,J)}).filter((J)=>J!=null)});break}case"assistant":{if(G.parts!=null){let J=function(){var W,K,Z;if(Q.length===0)return;let H=[];for(let V of Q)if(WI0(V))H.push({type:"text",text:V.text,...V.providerMetadata!=null?{providerOptions:V.providerMetadata}:{}});else if(KI0(V))H.push({type:"file",mediaType:V.mediaType,filename:V.filename,data:V.url});else if(Yu1(V))H.push({type:"reasoning",text:V.text,providerOptions:V.providerMetadata});else if(DI0(V)){let F=V.toolName;if(V.state!=="input-streaming")H.push({type:"tool-call",toolCallId:V.toolCallId,toolName:F,input:V.input,...V.callProviderMetadata!=null?{providerOptions:V.callProviderMetadata}:{}})}else if(zQ(V)){let F=Su1(V);if(V.state!=="input-streaming"){if(H.push({type:"tool-call",toolCallId:V.toolCallId,toolName:F,input:V.state==="output-error"?(W=V.input)!=null?W:V.rawInput:V.input,providerExecuted:V.providerExecuted,...V.callProviderMetadata!=null?{providerOptions:V.callProviderMetadata}:{}}),V.providerExecuted===!0&&(V.state==="output-available"||V.state==="output-error"))H.push({type:"tool-result",toolCallId:V.toolCallId,toolName:F,output:em1({output:V.state==="output-error"?V.errorText:V.output,tool:(K=Y==null?void 0:Y.tools)==null?void 0:K[F],errorMode:V.state==="output-error"?"json":"none"}),...V.callProviderMetadata!=null?{providerOptions:V.callProviderMetadata}:{}})}}else if(QI0(V)){let F=(Z=Y==null?void 0:Y.convertDataPart)==null?void 0:Z.call(Y,V);if(F!=null)H.push(F)}else throw Error(`Unsupported part: ${V}`);X.push({role:"assistant",content:H});let z=Q.filter((V)=>zQ(V)&&V.providerExecuted!==!0||V.type==="dynamic-tool");if(z.length>0)X.push({role:"tool",content:z.map((V)=>{var F;switch(V.state){case"output-error":case"output-available":{let L=rH8(V);return{type:"tool-result",toolCallId:V.toolCallId,toolName:L,output:em1({output:V.state==="output-error"?V.errorText:V.output,tool:(F=Y==null?void 0:Y.tools)==null?void 0:F[L],errorMode:V.state==="output-error"?"text":"none"}),...V.callProviderMetadata!=null?{providerOptions:V.callProviderMetadata}:{}}}default:return null}}).filter((V)=>V!=null)});Q=[]},Q=[];for(let W of G.parts)if(WI0(W)||Yu1(W)||KI0(W)||Xu1(W)||QI0(W))Q.push(W);else if(W.type==="step-start")J();J();break}break}default:{let J=G.role;throw new SH8({originalMessage:G,message:`Unsupported role: ${J}`})}}return X}function aH8($){return({url:Y,abortSignal:X})=>fH8({url:Y,maxBytes:void 0,abortSignal:X})}function yL($,Y){if($===Y)return!0;if($==null||Y==null)return!1;if(typeof $!=="object"&&typeof Y!=="object")return $===Y;if($.constructor!==Y.constructor)return!1;if($ instanceof Date&&Y instanceof Date)return $.getTime()===Y.getTime();if(Array.isArray($)){if($.length!==Y.length)return!1;for(let J=0;J<$.length;J++)if(!yL($[J],Y[J]))return!1;return!0}let X=Object.keys($),G=Object.keys(Y);if(X.length!==G.length)return!1;for(let J of X){if(!G.includes(J))return!1;if(!yL($[J],Y[J]))return!1}return!0}var rU8="vercel.ai.gateway.error",$I0,Mm1,Rm1,iG,Gu1="GatewayAuthenticationError",aU8,qm1,Pm1,wm1,Ju1,Qu1="GatewayInvalidRequestError",sU8,_m1,jm1,Tm1,oU8,Wu1="GatewayRateLimitError",tU8,Im1,Cm1,Sm1,eU8,Ku1="GatewayModelNotFoundError",$38,km1,Y38,vm1,xm1,X38,Zu1="GatewayInternalServerError",G38,ym1,bm1,hm1,fm1,Uu1="GatewayResponseError",J38,gm1,mm1,um1,Q38,W38,Hu1="GatewayTimeoutError",Z38,dm1,cm1,lm1,im1,zu1="ai-gateway-auth-method",U38,H38,rm1=class{constructor($){this.config=$}async getAvailableModels(){try{let{value:$}=await lh({url:`${this.config.baseURL}/config`,headers:await AW(this.config.headers()),successfulResponseHandler:vL(z38),failedResponseHandler:Iz({errorSchema:U.any(),errorToMessage:(Y)=>Y}),fetch:this.config.fetch});return $}catch($){throw await d2($)}}async getCredits(){try{let $=new URL(this.config.baseURL),{value:Y}=await lh({url:`${$.origin}/v1/credits`,headers:await AW(this.config.headers()),successfulResponseHandler:vL(V38),failedResponseHandler:Iz({errorSchema:U.any(),errorToMessage:(X)=>X}),fetch:this.config.fetch});return Y}catch($){throw await d2($)}}},z38,V38,F38=class{constructor($){this.config=$}async getSpendReport($){try{let Y=new URL(this.config.baseURL),X=new URLSearchParams;if(X.set("start_date",$.startDate),X.set("end_date",$.endDate),$.groupBy)X.set("group_by",$.groupBy);if($.datePart)X.set("date_part",$.datePart);if($.userId)X.set("user_id",$.userId);if($.model)X.set("model",$.model);if($.provider)X.set("provider",$.provider);if($.credentialType)X.set("credential_type",$.credentialType);if($.tags&&$.tags.length>0)X.set("tags",$.tags.join(","));let{value:G}=await lh({url:`${Y.origin}/v1/report?${X.toString()}`,headers:await AW(this.config.headers()),successfulResponseHandler:vL(L38),failedResponseHandler:Iz({errorSchema:U.any(),errorToMessage:(J)=>J}),fetch:this.config.fetch});return G}catch(Y){throw await d2(Y)}}},L38,D38=class{constructor($){this.config=$}async getGenerationInfo($){try{let Y=new URL(this.config.baseURL),{value:X}=await lh({url:`${Y.origin}/v1/generation?id=${encodeURIComponent($.id)}`,headers:await AW(this.config.headers()),successfulResponseHandler:vL(N38),failedResponseHandler:Iz({errorSchema:U.any(),errorToMessage:(G)=>G}),fetch:this.config.fetch});return X}catch(Y){throw await d2(Y)}}},N38,A38=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2",this.supportedUrls={"*/*":[/.*/]}}get provider(){return this.config.provider}async getArgs($){let{abortSignal:Y,...X}=$;return{args:this.maybeEncodeFileParts(X),warnings:[]}}async doGenerate($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await AW(this.config.headers());try{let{responseHeaders:Q,value:W,rawValue:K}=await ih({url:this.getUrl(),headers:ph(J,$.headers,this.getModelConfigHeaders(this.modelId,!1),await AW(this.config.o11yHeaders)),body:Y,successfulResponseHandler:vL(U.any()),failedResponseHandler:Iz({errorSchema:U.any(),errorToMessage:(Z)=>Z}),...G&&{abortSignal:G},fetch:this.config.fetch});return{...W,request:{body:Y},response:{headers:Q,body:K},warnings:X}}catch(Q){throw await d2(Q,await xL(J))}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await AW(this.config.headers());try{let{value:Q,responseHeaders:W}=await ih({url:this.getUrl(),headers:ph(J,$.headers,this.getModelConfigHeaders(this.modelId,!0),await AW(this.config.o11yHeaders)),body:Y,successfulResponseHandler:Lm1(U.any()),failedResponseHandler:Iz({errorSchema:U.any(),errorToMessage:(K)=>K}),...G&&{abortSignal:G},fetch:this.config.fetch});return{stream:Q.pipeThrough(new TransformStream({start(K){if(X.length>0)K.enqueue({type:"stream-start",warnings:X})},transform(K,Z){if(K.success){let H=K.value;if(H.type==="raw"&&!$.includeRawChunks)return;if(H.type==="response-metadata"&&H.timestamp&&typeof H.timestamp==="string")H.timestamp=new Date(H.timestamp);Z.enqueue(H)}else Z.error(K.error)}})),request:{body:Y},response:{headers:W}}}catch(Q){throw await d2(Q,await xL(J))}}isFilePart($){return $&&typeof $==="object"&&"type"in $&&$.type==="file"}maybeEncodeFileParts($){for(let Y of $.prompt)for(let X of Y.content)if(this.isFilePart(X)){let G=X;if(G.data instanceof Uint8Array){let J=Uint8Array.from(G.data),Q=Buffer.from(J).toString("base64");G.data=new URL(`data:${G.mediaType||"application/octet-stream"};base64,${Q}`)}}return $}getUrl(){return`${this.config.baseURL}/language-model`}getModelConfigHeaders($,Y){return{"ai-language-model-specification-version":"2","ai-language-model-id":$,"ai-language-model-streaming":String(Y)}}},B38=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J;let Q=await AW(this.config.headers());try{let{responseHeaders:W,value:K,rawValue:Z}=await ih({url:this.getUrl(),headers:ph(Q,Y!=null?Y:{},this.getModelConfigHeaders(),await AW(this.config.o11yHeaders)),body:{input:$.length===1?$[0]:$,...G?{providerOptions:G}:{}},successfulResponseHandler:vL(O38),failedResponseHandler:Iz({errorSchema:U.any(),errorToMessage:(H)=>H}),...X&&{abortSignal:X},fetch:this.config.fetch});return{embeddings:K.embeddings,usage:(J=K.usage)!=null?J:void 0,providerMetadata:K.providerMetadata,response:{headers:W,body:Z}}}catch(W){throw await d2(W,await xL(Q))}}getUrl(){return`${this.config.baseURL}/embedding-model`}getModelConfigHeaders(){return{"ai-embedding-model-specification-version":"2","ai-model-id":this.modelId}}},O38,E38=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2",this.maxImagesPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,providerOptions:Q,headers:W,abortSignal:K}){var Z,H,z,V;let F=await AW(this.config.headers());try{let{responseHeaders:L,value:N}=await ih({url:this.getUrl(),headers:ph(F,W!=null?W:{},this.getModelConfigHeaders(),await AW(this.config.o11yHeaders)),body:{prompt:$,n:Y,...X&&{size:X},...G&&{aspectRatio:G},...J&&{seed:J},...Q&&{providerOptions:Q}},successfulResponseHandler:vL(q38),failedResponseHandler:Iz({errorSchema:U.any(),errorToMessage:(D)=>D}),...K&&{abortSignal:K},fetch:this.config.fetch});return{images:N.images,warnings:(Z=N.warnings)!=null?Z:[],providerMetadata:N.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:L},...N.usage!=null&&{usage:{inputTokens:(H=N.usage.inputTokens)!=null?H:void 0,outputTokens:(z=N.usage.outputTokens)!=null?z:void 0,totalTokens:(V=N.usage.totalTokens)!=null?V:void 0}}}}catch(L){throw await d2(L,await xL(F))}}getUrl(){return`${this.config.baseURL}/image-model`}getModelConfigHeaders(){return{"ai-image-model-specification-version":"2","ai-model-id":this.modelId}}},M38,R38,q38,P38,w38,_38,j38=($={})=>_38($),T38,I38,C38,S38=($={})=>C38($),k38,x38="2.0.88",y38="0.0.1",Dg5,f38,HO="1.9.0",am1,m38,u38,ah,sh,p38=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},d38=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},c38,BW,i38=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},n38=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},r38="diag",t10,s38,o38,t38=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},e38=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},$H8,YH8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},XH8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},YI0="context",GH8,Vu1,ZI0,Fu1="0000000000000000",Lu1="00000000000000000000000000000000",JH8,rh,zI0,ZH8,UH8,XI0,Au1,LH8,DH8,NH8,AH8,sm1,om1,GI0="trace",BH8,Ng5,OH8,EH8=($,Y)=>{for(var X in Y)OH8($,X,{get:Y[X],enumerable:!0})},MH8="AI_InvalidArgumentError",RH8,qH8,PH8,Bu1="AI_NoObjectGeneratedError",Ou1,wH8,Eu1,tm1,_H8="AI_InvalidDataContentError",jH8,TH8,IH8,Mu1="AI_MessageConversionError",Ru1,CH8,qu1,SH8,Pu1="AI_DownloadError",wu1,kH8,_u1,JI0,vH8="AI_RetryError",xH8,yH8,bH8,hH8="5.0.186",fH8=async({url:$,maxBytes:Y,abortSignal:X})=>{var G;let J=$.toString();tT0(J);try{let Q=await fetch(J,{headers:ch({},`ai-sdk/${hH8}`,s10()),signal:X});if(Q.redirected)tT0(Q.url);if(!Q.ok)throw new JI0({url:J,statusCode:Q.status,statusText:Q.statusText});return{data:await Hm1({response:Q,url:J,maxBytes:rT0}),mediaType:(G=Q.headers.get("content-type"))!=null?G:void 0}}catch(Q){if(JI0.isInstance(Q))throw Q;throw new JI0({url:J,cause:Q})}},ju1,th,v8,Tu1,gH8,Iu1,mH8,uH8,pH8,Cu1,dH8,cH8,lH8,iH8,sH8,oH8=()=>({type:"text",responseFormat:{type:"text"},async parsePartial({text:$}){return{partial:$}},async parseOutput({text:$}){return $}}),tH8=({schema:$})=>{let Y=o10($);return{type:"object",responseFormat:{type:"json",schema:Y.jsonSchema},async parsePartial({text:X}){let G=await bL(X);switch(G.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:G.value};default:{let J=G.state;throw Error(`Unsupported parse state: ${J}`)}}},async parseOutput({text:X},G){let J=await V_({text:X});if(!J.success)throw new tm1({message:"No object generated: could not parse the response.",cause:J.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});let Q=await ZO({value:J.value,schema:Y});if(!Q.success)throw new tm1({message:"No object generated: response did not match schema.",cause:Q.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});return Q.value}}},Ag5;var AI0=V0(()=>{eT0();O1();ZY();$I0=Symbol.for(rU8),iG=class $ extends(Rm1=Error,Mm1=$I0,Rm1){constructor({message:Y,statusCode:X=500,cause:G}){super(Y);this[Mm1]=!0,this.statusCode=X,this.cause=G}static isInstance(Y){return $.hasMarker(Y)}static hasMarker(Y){return typeof Y==="object"&&Y!==null&&$I0 in Y&&Y[$I0]===!0}},aU8=`vercel.ai.gateway.error.${Gu1}`,qm1=Symbol.for(aU8),Ju1=class $ extends(wm1=iG,Pm1=qm1,wm1){constructor({message:Y="Authentication failed",statusCode:X=401,cause:G}={}){super({message:Y,statusCode:X,cause:G});this[Pm1]=!0,this.name=Gu1,this.type="authentication_error"}static isInstance(Y){return iG.hasMarker(Y)&&qm1 in Y}static createContextualError({apiKeyProvided:Y,oidcTokenProvided:X,message:G="Authentication failed",statusCode:J=401,cause:Q}){let W;if(Y)W=`AI Gateway authentication failed: Invalid API key.

Create a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys

Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.`;else if(X)W=`AI Gateway authentication failed: Invalid OIDC token.

Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.

Alternatively, use an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys`;else W=`AI Gateway authentication failed: No authentication provided.

Option 1 - API key:
Create an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys
Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.

Option 2 - OIDC token:
Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.`;return new $({message:W,statusCode:J,cause:Q})}},sU8=`vercel.ai.gateway.error.${Qu1}`,_m1=Symbol.for(sU8),oU8=class extends(Tm1=iG,jm1=_m1,Tm1){constructor({message:$="Invalid request",statusCode:Y=400,cause:X}={}){super({message:$,statusCode:Y,cause:X});this[jm1]=!0,this.name=Qu1,this.type="invalid_request_error"}static isInstance($){return iG.hasMarker($)&&_m1 in $}},tU8=`vercel.ai.gateway.error.${Wu1}`,Im1=Symbol.for(tU8),eU8=class extends(Sm1=iG,Cm1=Im1,Sm1){constructor({message:$="Rate limit exceeded",statusCode:Y=429,cause:X}={}){super({message:$,statusCode:Y,cause:X});this[Cm1]=!0,this.name=Wu1,this.type="rate_limit_exceeded"}static isInstance($){return iG.hasMarker($)&&Im1 in $}},$38=`vercel.ai.gateway.error.${Ku1}`,km1=Symbol.for($38),Y38=Tz(()=>YG(U.object({modelId:U.string()}))),X38=class extends(xm1=iG,vm1=km1,xm1){constructor({message:$="Model not found",statusCode:Y=404,modelId:X,cause:G}={}){super({message:$,statusCode:Y,cause:G});this[vm1]=!0,this.name=Ku1,this.type="model_not_found",this.modelId=X}static isInstance($){return iG.hasMarker($)&&km1 in $}},G38=`vercel.ai.gateway.error.${Zu1}`,ym1=Symbol.for(G38),fm1=class extends(hm1=iG,bm1=ym1,hm1){constructor({message:$="Internal server error",statusCode:Y=500,cause:X}={}){super({message:$,statusCode:Y,cause:X});this[bm1]=!0,this.name=Zu1,this.type="internal_server_error"}static isInstance($){return iG.hasMarker($)&&ym1 in $}},J38=`vercel.ai.gateway.error.${Uu1}`,gm1=Symbol.for(J38),Q38=class extends(um1=iG,mm1=gm1,um1){constructor({message:$="Invalid response from Gateway",statusCode:Y=502,response:X,validationError:G,cause:J}={}){super({message:$,statusCode:Y,cause:J});this[mm1]=!0,this.name=Uu1,this.type="response_error",this.response=X,this.validationError=G}static isInstance($){return iG.hasMarker($)&&gm1 in $}};W38=Tz(()=>YG(U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.unknown().nullish(),code:U.union([U.string(),U.number()]).nullish()})})));Z38=`vercel.ai.gateway.error.${Hu1}`,dm1=Symbol.for(Z38),im1=class $ extends(lm1=iG,cm1=dm1,lm1){constructor({message:Y="Request timed out",statusCode:X=408,cause:G}={}){super({message:Y,statusCode:X,cause:G});this[cm1]=!0,this.name=Hu1,this.type="timeout_error"}static isInstance(Y){return iG.hasMarker(Y)&&dm1 in Y}static createTimeoutError({originalMessage:Y,statusCode:X=408,cause:G}){let J=`Gateway request timed out: ${Y}

    This is a client-side timeout. To resolve this, increase your timeout configuration: https://vercel.com/docs/ai-gateway/capabilities/video-generation#extending-timeouts-for-node.js`;return new $({message:J,statusCode:X,cause:G})}};U38=Tz(()=>YG(U.union([U.literal("api-key"),U.literal("oidc")]))),H38=["embedding","image","language"],z38=Tz(()=>YG(U.object({models:U.array(U.object({id:U.string(),name:U.string(),description:U.string().nullish(),pricing:U.object({input:U.string(),output:U.string(),input_cache_read:U.string().nullish(),input_cache_write:U.string().nullish()}).transform(({input:$,output:Y,input_cache_read:X,input_cache_write:G})=>({input:$,output:Y,...X?{cachedInputTokens:X}:{},...G?{cacheCreationInputTokens:G}:{}})).nullish(),specification:U.object({specificationVersion:U.literal("v2"),provider:U.string(),modelId:U.string()}),modelType:U.string().nullish()})).transform(($)=>$.filter((Y)=>Y.modelType==null||H38.includes(Y.modelType)))}))),V38=Tz(()=>YG(U.object({balance:U.string(),total_used:U.string()}).transform(({balance:$,total_used:Y})=>({balance:$,totalUsed:Y})))),L38=UO(()=>YG(U.object({results:U.array(U.object({day:U.string().optional(),hour:U.string().optional(),user:U.string().optional(),model:U.string().optional(),tag:U.string().optional(),provider:U.string().optional(),credential_type:U.enum(["byok","system"]).optional(),total_cost:U.number(),market_cost:U.number().optional(),input_tokens:U.number().optional(),output_tokens:U.number().optional(),cached_input_tokens:U.number().optional(),cache_creation_input_tokens:U.number().optional(),reasoning_tokens:U.number().optional(),request_count:U.number().optional()}).transform(({credential_type:$,total_cost:Y,market_cost:X,input_tokens:G,output_tokens:J,cached_input_tokens:Q,cache_creation_input_tokens:W,reasoning_tokens:K,request_count:Z,...H})=>({...H,...$!==void 0?{credentialType:$}:{},totalCost:Y,...X!==void 0?{marketCost:X}:{},...G!==void 0?{inputTokens:G}:{},...J!==void 0?{outputTokens:J}:{},...Q!==void 0?{cachedInputTokens:Q}:{},...W!==void 0?{cacheCreationInputTokens:W}:{},...K!==void 0?{reasoningTokens:K}:{},...Z!==void 0?{requestCount:Z}:{}})))}))),N38=UO(()=>YG(U.object({data:U.object({id:U.string(),total_cost:U.number(),upstream_inference_cost:U.number(),usage:U.number(),created_at:U.string(),model:U.string(),is_byok:U.boolean(),provider_name:U.string(),streamed:U.boolean(),finish_reason:U.string(),latency:U.number(),generation_time:U.number(),native_tokens_prompt:U.number(),native_tokens_completion:U.number(),native_tokens_reasoning:U.number(),native_tokens_cached:U.number(),native_tokens_cache_creation:U.number(),billable_web_search_calls:U.number()}).transform(({total_cost:$,upstream_inference_cost:Y,created_at:X,is_byok:G,provider_name:J,finish_reason:Q,generation_time:W,native_tokens_prompt:K,native_tokens_completion:Z,native_tokens_reasoning:H,native_tokens_cached:z,native_tokens_cache_creation:V,billable_web_search_calls:F,...L})=>({...L,totalCost:$,upstreamInferenceCost:Y,createdAt:X,isByok:G,providerName:J,finishReason:Q,generationTime:W,promptTokens:K,completionTokens:Z,reasoningTokens:H,cachedTokens:z,cacheCreationTokens:V,billableWebSearchCalls:F}))}).transform(({data:$})=>$))),O38=Tz(()=>YG(U.object({embeddings:U.array(U.array(U.number())),usage:U.object({tokens:U.number()}).nullish(),providerMetadata:U.record(U.string(),U.record(U.string(),U.unknown())).optional()}))),M38=U.object({images:U.array(U.unknown()).optional()}).catchall(U.unknown()),R38=U.object({inputTokens:U.number().nullish(),outputTokens:U.number().nullish(),totalTokens:U.number().nullish()}),q38=U.object({images:U.array(U.string()),warnings:U.array(U.object({type:U.literal("other"),message:U.string()})).optional(),providerMetadata:U.record(U.string(),M38).optional(),usage:R38.optional()}),P38=UO(()=>YG(U.object({objective:U.string().describe("Natural-language description of the web research goal, including source or freshness guidance and broader context from the task. Maximum 5000 characters."),search_queries:U.array(U.string()).optional().describe("Optional search queries to supplement the objective. Maximum 200 characters per query."),mode:U.enum(["one-shot","agentic"]).optional().describe('Mode preset: "one-shot" for comprehensive results with longer excerpts (default), "agentic" for concise, token-efficient results for multi-step workflows.'),max_results:U.number().optional().describe("Maximum number of results to return (1-20). Defaults to 10 if not specified."),source_policy:U.object({include_domains:U.array(U.string()).optional().describe("List of domains to include in search results."),exclude_domains:U.array(U.string()).optional().describe("List of domains to exclude from search results."),after_date:U.string().optional().describe("Only include results published after this date (ISO 8601 format).")}).optional().describe("Source policy for controlling which domains to include/exclude and freshness."),excerpts:U.object({max_chars_per_result:U.number().optional().describe("Maximum characters per result."),max_chars_total:U.number().optional().describe("Maximum total characters across all results.")}).optional().describe("Excerpt configuration for controlling result length."),fetch_policy:U.object({max_age_seconds:U.number().optional().describe("Maximum age in seconds for cached content. Set to 0 to always fetch fresh content.")}).optional().describe("Fetch policy for controlling content freshness.")}))),w38=UO(()=>YG(U.union([U.object({searchId:U.string(),results:U.array(U.object({url:U.string(),title:U.string(),excerpt:U.string(),publishDate:U.string().nullable().optional(),relevanceScore:U.number().optional()}))}),U.object({error:U.enum(["api_error","rate_limit","timeout","invalid_input","configuration_error","unknown"]),statusCode:U.number().optional(),message:U.string()})]))),_38=sT0({id:"gateway.parallel_search",name:"parallel_search",inputSchema:P38,outputSchema:w38}),T38=UO(()=>YG(U.object({query:U.union([U.string(),U.array(U.string())]).describe("Search query (string) or multiple queries (array of up to 5 strings). Multi-query searches return combined results from all queries."),max_results:U.number().optional().describe("Maximum number of search results to return (1-20, default: 10)"),max_tokens_per_page:U.number().optional().describe("Maximum number of tokens to extract per search result page (256-2048, default: 2048)"),max_tokens:U.number().optional().describe("Maximum total tokens across all search results (default: 25000, max: 1000000)"),country:U.string().optional().describe("Two-letter ISO 3166-1 alpha-2 country code for regional search results (e.g., 'US', 'GB', 'FR')"),search_domain_filter:U.array(U.string()).optional().describe("List of domains to include or exclude from search results (max 20). To include: ['nature.com', 'science.org']. To exclude: ['-example.com', '-spam.net']"),search_language_filter:U.array(U.string()).optional().describe("List of ISO 639-1 language codes to filter results (max 10, lowercase). Examples: ['en', 'fr', 'de']"),search_after_date:U.string().optional().describe("Include only results published after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),search_before_date:U.string().optional().describe("Include only results published before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),last_updated_after_filter:U.string().optional().describe("Include only results last updated after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),last_updated_before_filter:U.string().optional().describe("Include only results last updated before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),search_recency_filter:U.enum(["day","week","month","year"]).optional().describe("Filter results by relative time period. Cannot be used with search_after_date or search_before_date.")}))),I38=UO(()=>YG(U.union([U.object({results:U.array(U.object({title:U.string(),url:U.string(),snippet:U.string(),date:U.string().optional(),lastUpdated:U.string().optional()})),id:U.string()}),U.object({error:U.enum(["api_error","rate_limit","timeout","invalid_input","unknown"]),statusCode:U.number().optional(),message:U.string()})]))),C38=sT0({id:"gateway.perplexity_search",name:"perplexity_search",inputSchema:T38,outputSchema:I38}),k38={parallelSearch:j38,perplexitySearch:S38};Dg5=b38();f38=typeof globalThis==="object"?globalThis:global,am1=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;m38=g38(HO),u38=HO.split(".")[0],ah=Symbol.for("opentelemetry.js.api."+u38),sh=f38;c38=function(){function $(Y){this._namespace=Y.namespace||"DiagComponentLogger"}return $.prototype.debug=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return nh("debug",this._namespace,Y)},$.prototype.error=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return nh("error",this._namespace,Y)},$.prototype.info=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return nh("info",this._namespace,Y)},$.prototype.warn=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return nh("warn",this._namespace,Y)},$.prototype.verbose=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return nh("verbose",this._namespace,Y)},$}();(function($){$[$.NONE=0]="NONE",$[$.ERROR=30]="ERROR",$[$.WARN=50]="WARN",$[$.INFO=60]="INFO",$[$.DEBUG=70]="DEBUG",$[$.VERBOSE=80]="VERBOSE",$[$.ALL=9999]="ALL"})(BW||(BW={}));t10=function(){function $(){function Y(J){return function(){var Q=[];for(var W=0;W<arguments.length;W++)Q[W]=arguments[W];var K=oh("diag");if(!K)return;return K[J].apply(K,n38([],i38(Q),!1))}}var X=this,G=function(J,Q){var W,K,Z;if(Q===void 0)Q={logLevel:BW.INFO};if(J===X){var H=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return X.error((W=H.stack)!==null&&W!==void 0?W:H.message),!1}if(typeof Q==="number")Q={logLevel:Q};var z=oh("diag"),V=l38((K=Q.logLevel)!==null&&K!==void 0?K:BW.INFO,J);if(z&&!Q.suppressOverrideMessage){var F=(Z=Error().stack)!==null&&Z!==void 0?Z:"<failed to generate stacktrace>";z.warn("Current logger will be overwritten from "+F),V.warn("Current logger will overwrite one already registered from "+F)}return UI0("diag",V,X,!0)};X.setLogger=G,X.disable=function(){HI0(r38,X)},X.createComponentLogger=function(J){return new c38(J)},X.verbose=Y("verbose"),X.debug=Y("debug"),X.info=Y("info"),X.warn=Y("warn"),X.error=Y("error")}return $.instance=function(){if(!this._instance)this._instance=new $;return this._instance},$}();s38=function(){function $(Y){var X=this;X._currentContext=Y?new Map(Y):new Map,X.getValue=function(G){return X._currentContext.get(G)},X.setValue=function(G,J){var Q=new $(X._currentContext);return Q._currentContext.set(G,J),Q},X.deleteValue=function(G){var J=new $(X._currentContext);return J._currentContext.delete(G),J}}return $}(),o38=new s38,$H8=function(){function $(){}return $.prototype.active=function(){return o38},$.prototype.with=function(Y,X,G){var J=[];for(var Q=3;Q<arguments.length;Q++)J[Q-3]=arguments[Q];return X.call.apply(X,e38([G],t38(J),!1))},$.prototype.bind=function(Y,X){return X},$.prototype.enable=function(){return this},$.prototype.disable=function(){return this},$}(),GH8=new $H8,Vu1=function(){function $(){}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalContextManager=function(Y){return UI0(YI0,Y,t10.instance())},$.prototype.active=function(){return this._getContextManager().active()},$.prototype.with=function(Y,X,G){var J,Q=[];for(var W=3;W<arguments.length;W++)Q[W-3]=arguments[W];return(J=this._getContextManager()).with.apply(J,XH8([Y,X,G],YH8(Q),!1))},$.prototype.bind=function(Y,X){return this._getContextManager().bind(Y,X)},$.prototype._getContextManager=function(){return oh(YI0)||GH8},$.prototype.disable=function(){this._getContextManager().disable(),HI0(YI0,t10.instance())},$}();(function($){$[$.NONE=0]="NONE",$[$.SAMPLED=1]="SAMPLED"})(ZI0||(ZI0={}));JH8={traceId:Lu1,spanId:Fu1,traceFlags:ZI0.NONE},rh=function(){function $(Y){if(Y===void 0)Y=JH8;this._spanContext=Y}return $.prototype.spanContext=function(){return this._spanContext},$.prototype.setAttribute=function(Y,X){return this},$.prototype.setAttributes=function(Y){return this},$.prototype.addEvent=function(Y,X){return this},$.prototype.addLink=function(Y){return this},$.prototype.addLinks=function(Y){return this},$.prototype.setStatus=function(Y){return this},$.prototype.updateName=function(Y){return this},$.prototype.end=function(Y){},$.prototype.isRecording=function(){return!1},$.prototype.recordException=function(Y,X){},$}(),zI0=a38("OpenTelemetry Context Key SPAN");ZH8=/^([0-9a-f]{32})$/i,UH8=/^[0-9a-f]{16}$/i;XI0=Vu1.getInstance(),Au1=function(){function $(){}return $.prototype.startSpan=function(Y,X,G){if(G===void 0)G=XI0.active();var J=Boolean(X===null||X===void 0?void 0:X.root);if(J)return new rh;var Q=G&&Du1(G);if(FH8(Q)&&Nu1(Q))return new rh(Q);else return new rh},$.prototype.startActiveSpan=function(Y,X,G,J){var Q,W,K;if(arguments.length<2)return;else if(arguments.length===2)K=X;else if(arguments.length===3)Q=X,K=G;else Q=X,W=G,K=J;var Z=W!==null&&W!==void 0?W:XI0.active(),H=this.startSpan(Y,Q,Z),z=FI0(Z,H);return XI0.with(z,K,void 0,H)},$}();LH8=new Au1,DH8=function(){function $(Y,X,G,J){this._provider=Y,this.name=X,this.version=G,this.options=J}return $.prototype.startSpan=function(Y,X,G){return this._getTracer().startSpan(Y,X,G)},$.prototype.startActiveSpan=function(Y,X,G,J){var Q=this._getTracer();return Reflect.apply(Q.startActiveSpan,Q,arguments)},$.prototype._getTracer=function(){if(this._delegate)return this._delegate;var Y=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!Y)return LH8;return this._delegate=Y,this._delegate},$}(),NH8=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){return new Au1},$}(),AH8=new NH8,sm1=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){var J;return(J=this.getDelegateTracer(Y,X,G))!==null&&J!==void 0?J:new DH8(this,Y,X,G)},$.prototype.getDelegate=function(){var Y;return(Y=this._delegate)!==null&&Y!==void 0?Y:AH8},$.prototype.setDelegate=function(Y){this._delegate=Y},$.prototype.getDelegateTracer=function(Y,X,G){var J;return(J=this._delegate)===null||J===void 0?void 0:J.getTracer(Y,X,G)},$}();(function($){$[$.UNSET=0]="UNSET",$[$.OK=1]="OK",$[$.ERROR=2]="ERROR"})(om1||(om1={}));BH8=function(){function $(){this._proxyTracerProvider=new sm1,this.wrapSpanContext=VH8,this.isSpanContextValid=Nu1,this.deleteSpan=WH8,this.getSpan=VI0,this.getActiveSpan=QH8,this.getSpanContext=Du1,this.setSpan=FI0,this.setSpanContext=KH8}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalTracerProvider=function(Y){var X=UI0(GI0,this._proxyTracerProvider,t10.instance());if(X)this._proxyTracerProvider.setDelegate(Y);return X},$.prototype.getTracerProvider=function(){return oh(GI0)||this._proxyTracerProvider},$.prototype.getTracer=function(Y,X){return this.getTracerProvider().getTracer(Y,X)},$.prototype.disable=function(){HI0(GI0,t10.instance()),this._proxyTracerProvider=new sm1},$}(),Ng5=BH8.getInstance(),OH8=Object.defineProperty,RH8=`vercel.ai.error.${MH8}`,qH8=Symbol.for(RH8);PH8=qH8;Ou1=`vercel.ai.error.${Bu1}`,wH8=Symbol.for(Ou1),tm1=class extends UY{constructor({message:$="No object generated.",cause:Y,text:X,response:G,usage:J,finishReason:Q}){super({name:Bu1,message:$,cause:Y});this[Eu1]=!0,this.text=X,this.response=G,this.usage=J,this.finishReason=Q}static isInstance($){return UY.hasMarker($,Ou1)}};Eu1=wH8;jH8=`vercel.ai.error.${_H8}`,TH8=Symbol.for(jH8);IH8=TH8;Ru1=`vercel.ai.error.${Mu1}`,CH8=Symbol.for(Ru1),SH8=class extends UY{constructor({originalMessage:$,message:Y}){super({name:Mu1,message:Y});this[qu1]=!0,this.originalMessage=$}static isInstance($){return UY.hasMarker($,Ru1)}};qu1=CH8;wu1=`vercel.ai.error.${Pu1}`,kH8=Symbol.for(wu1),JI0=class extends UY{constructor({url:$,statusCode:Y,statusText:X,cause:G,message:J=G==null?`Failed to download ${$}: ${Y} ${X}`:`Failed to download ${$}: ${G}`}){super({name:Pu1,message:J,cause:G});this[_u1]=!0,this.url=$,this.statusCode=Y,this.statusText=X}static isInstance($){return UY.hasMarker($,wu1)}};_u1=kH8;xH8=`vercel.ai.error.${vH8}`,yH8=Symbol.for(xH8);bH8=yH8;ju1=U.union([U.string(),U.instanceof(Uint8Array),U.instanceof(ArrayBuffer),U.custom(($)=>{var Y,X;return(X=(Y=globalThis.Buffer)==null?void 0:Y.isBuffer($))!=null?X:!1},{message:"Must be a Buffer"})]),th=U.lazy(()=>U.union([U.null(),U.string(),U.number(),U.boolean(),U.record(U.string(),th),U.array(th)])),v8=U.record(U.string(),U.record(U.string(),th)),Tu1=U.object({type:U.literal("text"),text:U.string(),providerOptions:v8.optional()}),gH8=U.object({type:U.literal("image"),image:U.union([ju1,U.instanceof(URL)]),mediaType:U.string().optional(),providerOptions:v8.optional()}),Iu1=U.object({type:U.literal("file"),data:U.union([ju1,U.instanceof(URL)]),filename:U.string().optional(),mediaType:U.string(),providerOptions:v8.optional()}),mH8=U.object({type:U.literal("reasoning"),text:U.string(),providerOptions:v8.optional()}),uH8=U.object({type:U.literal("tool-call"),toolCallId:U.string(),toolName:U.string(),input:U.unknown(),providerOptions:v8.optional(),providerExecuted:U.boolean().optional()}),pH8=U.discriminatedUnion("type",[U.object({type:U.literal("text"),value:U.string()}),U.object({type:U.literal("json"),value:th}),U.object({type:U.literal("error-text"),value:U.string()}),U.object({type:U.literal("error-json"),value:th}),U.object({type:U.literal("content"),value:U.array(U.union([U.object({type:U.literal("text"),text:U.string()}),U.object({type:U.literal("media"),data:U.string(),mediaType:U.string()})]))})]),Cu1=U.object({type:U.literal("tool-result"),toolCallId:U.string(),toolName:U.string(),output:pH8,providerOptions:v8.optional()}),dH8=U.object({role:U.literal("system"),content:U.string(),providerOptions:v8.optional()}),cH8=U.object({role:U.literal("user"),content:U.union([U.string(),U.array(U.union([Tu1,gH8,Iu1]))]),providerOptions:v8.optional()}),lH8=U.object({role:U.literal("assistant"),content:U.union([U.string(),U.array(U.union([Tu1,Iu1,mH8,uH8,Cu1]))]),providerOptions:v8.optional()}),iH8=U.object({role:U.literal("tool"),content:U.array(Cu1),providerOptions:v8.optional()});U.union([dH8,cH8,lH8,iH8]);H_({prefix:"aitxt",size:24});Tz(()=>YG(U.union([U.strictObject({type:U.literal("text-start"),id:U.string(),providerMetadata:v8.optional()}),U.strictObject({type:U.literal("text-delta"),id:U.string(),delta:U.string(),providerMetadata:v8.optional()}),U.strictObject({type:U.literal("text-end"),id:U.string(),providerMetadata:v8.optional()}),U.strictObject({type:U.literal("error"),errorText:U.string()}),U.strictObject({type:U.literal("tool-input-start"),toolCallId:U.string(),toolName:U.string(),providerExecuted:U.boolean().optional(),dynamic:U.boolean().optional()}),U.strictObject({type:U.literal("tool-input-delta"),toolCallId:U.string(),inputTextDelta:U.string()}),U.strictObject({type:U.literal("tool-input-available"),toolCallId:U.string(),toolName:U.string(),input:U.unknown(),providerExecuted:U.boolean().optional(),providerMetadata:v8.optional(),dynamic:U.boolean().optional()}),U.strictObject({type:U.literal("tool-input-error"),toolCallId:U.string(),toolName:U.string(),input:U.unknown(),providerExecuted:U.boolean().optional(),providerMetadata:v8.optional(),dynamic:U.boolean().optional(),errorText:U.string()}),U.strictObject({type:U.literal("tool-output-available"),toolCallId:U.string(),output:U.unknown(),providerExecuted:U.boolean().optional(),dynamic:U.boolean().optional(),preliminary:U.boolean().optional()}),U.strictObject({type:U.literal("tool-output-error"),toolCallId:U.string(),errorText:U.string(),providerExecuted:U.boolean().optional(),dynamic:U.boolean().optional()}),U.strictObject({type:U.literal("reasoning-start"),id:U.string(),providerMetadata:v8.optional()}),U.strictObject({type:U.literal("reasoning-delta"),id:U.string(),delta:U.string(),providerMetadata:v8.optional()}),U.strictObject({type:U.literal("reasoning-end"),id:U.string(),providerMetadata:v8.optional()}),U.strictObject({type:U.literal("source-url"),sourceId:U.string(),url:U.string(),title:U.string().optional(),providerMetadata:v8.optional()}),U.strictObject({type:U.literal("source-document"),sourceId:U.string(),mediaType:U.string(),title:U.string(),filename:U.string().optional(),providerMetadata:v8.optional()}),U.strictObject({type:U.literal("file"),url:U.string(),mediaType:U.string(),providerMetadata:v8.optional()}),U.strictObject({type:U.custom(($)=>typeof $==="string"&&$.startsWith("data-"),{message:'Type must start with "data-"'}),id:U.string().optional(),data:U.unknown(),transient:U.boolean().optional()}),U.strictObject({type:U.literal("start-step")}),U.strictObject({type:U.literal("finish-step")}),U.strictObject({type:U.literal("start"),messageId:U.string().optional(),messageMetadata:U.unknown().optional()}),U.strictObject({type:U.literal("finish"),finishReason:U.enum(["stop","length","content-filter","tool-calls","error","other","unknown"]).optional(),messageMetadata:U.unknown().optional()}),U.strictObject({type:U.literal("abort")}),U.strictObject({type:U.literal("message-metadata"),messageMetadata:U.unknown()})])));H_({prefix:"aitxt",size:24});H_({prefix:"aiobj",size:24});H_({prefix:"aiobj",size:24});sH8={};EH8(sH8,{object:()=>tH8,text:()=>oH8});Ag5=aH8();Tz(()=>YG(U.array(U.object({id:U.string(),role:U.enum(["system","user","assistant"]),metadata:U.unknown().optional(),parts:U.array(U.union([U.object({type:U.literal("text"),text:U.string(),state:U.enum(["streaming","done"]).optional(),providerMetadata:v8.optional()}),U.object({type:U.literal("reasoning"),text:U.string(),state:U.enum(["streaming","done"]).optional(),providerMetadata:v8.optional()}),U.object({type:U.literal("source-url"),sourceId:U.string(),url:U.string(),title:U.string().optional(),providerMetadata:v8.optional()}),U.object({type:U.literal("source-document"),sourceId:U.string(),mediaType:U.string(),title:U.string(),filename:U.string().optional(),providerMetadata:v8.optional()}),U.object({type:U.literal("file"),mediaType:U.string(),filename:U.string().optional(),url:U.string(),providerMetadata:v8.optional()}),U.object({type:U.literal("step-start")}),U.object({type:U.string().startsWith("data-"),id:U.string().optional(),data:U.unknown()}),U.object({type:U.literal("dynamic-tool"),toolName:U.string(),toolCallId:U.string(),state:U.literal("input-streaming"),input:U.unknown().optional(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.never().optional()}),U.object({type:U.literal("dynamic-tool"),toolName:U.string(),toolCallId:U.string(),state:U.literal("input-available"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:v8.optional()}),U.object({type:U.literal("dynamic-tool"),toolName:U.string(),toolCallId:U.string(),state:U.literal("output-available"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.unknown(),errorText:U.never().optional(),callProviderMetadata:v8.optional(),preliminary:U.boolean().optional()}),U.object({type:U.literal("dynamic-tool"),toolName:U.string(),toolCallId:U.string(),state:U.literal("output-error"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.string(),callProviderMetadata:v8.optional()}),U.object({type:U.string().startsWith("tool-"),toolCallId:U.string(),state:U.literal("input-streaming"),providerExecuted:U.boolean().optional(),input:U.unknown().optional(),output:U.never().optional(),errorText:U.never().optional(),approval:U.never().optional()}),U.object({type:U.string().startsWith("tool-"),toolCallId:U.string(),state:U.literal("input-available"),providerExecuted:U.boolean().optional(),input:U.unknown(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:v8.optional(),approval:U.never().optional()}),U.object({type:U.string().startsWith("tool-"),toolCallId:U.string(),state:U.literal("approval-requested"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:v8.optional(),approval:U.object({id:U.string(),approved:U.never().optional(),reason:U.never().optional()})}),U.object({type:U.string().startsWith("tool-"),toolCallId:U.string(),state:U.literal("approval-responded"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:v8.optional(),approval:U.object({id:U.string(),approved:U.boolean(),reason:U.string().optional()})}),U.object({type:U.string().startsWith("tool-"),toolCallId:U.string(),state:U.literal("output-available"),providerExecuted:U.boolean().optional(),input:U.unknown(),output:U.unknown(),errorText:U.never().optional(),callProviderMetadata:v8.optional(),preliminary:U.boolean().optional(),approval:U.object({id:U.string(),approved:U.literal(!0),reason:U.string().optional()}).optional()}),U.object({type:U.string().startsWith("tool-"),toolCallId:U.string(),state:U.literal("output-error"),providerExecuted:U.boolean().optional(),input:U.unknown(),output:U.never().optional(),errorText:U.string(),callProviderMetadata:v8.optional(),approval:U.object({id:U.string(),approved:U.literal(!0),reason:U.string().optional()}).optional()}),U.object({type:U.string().startsWith("tool-"),toolCallId:U.string(),state:U.literal("output-denied"),providerExecuted:U.boolean().optional(),input:U.unknown(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:v8.optional(),approval:U.object({id:U.string(),approved:U.literal(!1),reason:U.string().optional()})})])).nonempty("Message must contain at least one part")})).nonempty("Messages array must not be empty")))});function eH8($){if(typeof $!=="object"||$===null)return String($);try{let Y=JSON.stringify($);if(Y==="{}")return String($);return Y}catch{return String($)}}function XG($,Y={}){let X={fallbackMessage:"Unknown error",maxDepth:5,supportSerialization:!0,serializeStack:!0},G=Y?{...X,...Y}:X,{fallbackMessage:J,maxDepth:Q,supportSerialization:W,serializeStack:K}=G;if($&&$ instanceof Error){if(W)BI0($,K,{maxDepth:Q});return $}let Z;if($&&typeof $==="object"){let H=$&&"message"in $&&typeof $.message==="string"?$.message:eH8($),z="cause"in $&&$.cause!==void 0?$.cause instanceof Error?$.cause:Q>0?XG($.cause,{...G,maxDepth:Q-1}):void 0:void 0;Z=Error(H,z?{cause:z}:void 0),Object.assign(Z,$),Z.stack="stack"in $&&typeof $.stack==="string"?$.stack:void 0}else if($&&typeof $==="string")Z=Error($),Z.stack=void 0;else Z=Error(J);if(W)BI0(Z,K,{maxDepth:Q});return Z}function BI0($,Y=!0,X){let G=X?.maxDepth??$z8,J=X?.currentDepth??0;if($.toJSON)return;if($.cause instanceof Error&&J<G)BI0($.cause,Y,{maxDepth:G,currentDepth:J+1});Object.defineProperty($,"toJSON",{value:function(){let Q={message:this.message,name:this.name};if(Y&&this.stack!==void 0)Q.stack=this.stack;if(this.cause!==void 0)if(this.cause instanceof Error&&"toJSON"in this.cause&&typeof this.cause.toJSON==="function")Q.cause=this.cause.toJSON();else Q.cause=this.cause;let W=this;for(let K in W)if(W.hasOwnProperty(K)&&!(K in Q)&&K!=="toJSON")Q[K]=W[K];return Q},enumerable:!1,writable:!0,configurable:!0})}var $z8=5,M0,E0,ku1,G0;var OW=V0(()=>{M0=(($)=>{return $.TOOL="TOOL",$.AGENT="AGENT",$.MCP="MCP",$.AGENT_NETWORK="AGENT_NETWORK",$.MASTRA_SERVER="MASTRA_SERVER",$.MASTRA_OBSERVABILITY="MASTRA_OBSERVABILITY",$.MASTRA_WORKFLOW="MASTRA_WORKFLOW",$.MASTRA_VOICE="MASTRA_VOICE",$.MASTRA_VECTOR="MASTRA_VECTOR",$.MASTRA_MEMORY="MASTRA_MEMORY",$.LLM="LLM",$.EVAL="EVAL",$.SCORER="SCORER",$.A2A="A2A",$.MASTRA_INSTANCE="MASTRA_INSTANCE",$.MASTRA="MASTRA",$.DEPLOYER="DEPLOYER",$.STORAGE="STORAGE",$.MODEL_ROUTER="MODEL_ROUTER",$})(M0||{}),E0=(($)=>{return $.UNKNOWN="UNKNOWN",$.USER="USER",$.SYSTEM="SYSTEM",$.THIRD_PARTY="THIRD_PARTY",$})(E0||{}),ku1=class extends Error{id;domain;category;details={};message;cause;constructor($,Y){let X=Y?XG(Y,{serializeStack:!1,fallbackMessage:"Unknown error"}):void 0,G=$.text??X?.message??"Unknown error";super(G,{cause:X});this.id=$.id,this.domain=$.domain,this.category=$.category,this.details=$.details??{},this.message=G,this.cause=X,Object.setPrototypeOf(this,new.target.prototype)}toJSONDetails(){return{message:this.message,domain:this.domain,category:this.category,details:this.details}}toJSON(){return{message:this.message,domain:this.domain,category:this.category,code:this.id,details:this.details,cause:this.cause?.toJSON?.()}}toString(){return JSON.stringify(this.toJSON())}},G0=class extends ku1{}});var Yz8,OI0;var vu1=V0(()=>{p2();OW();Yz8=class extends u8{listeningModel;speechModel;speaker;realtimeConfig;constructor({listeningModel:$,speechModel:Y,speaker:X,realtimeConfig:G,name:J}={}){super({component:"VOICE",name:J});this.listeningModel=$,this.speechModel=Y,this.speaker=X,this.realtimeConfig=G}serializeForSpan(){return{component:"VOICE",name:this.name,speaker:this.speaker,listeningModel:this.listeningModel?{name:this.listeningModel.name}:void 0,speechModel:this.speechModel?{name:this.speechModel.name}:void 0,realtimeModel:this.realtimeConfig?.model}}updateConfig($){this.logger.debug("updateConfig not implemented by this voice provider")}connect($){return this.logger.debug("connect not implemented by this voice provider"),Promise.resolve()}send($){return this.logger.debug("relay not implemented by this voice provider"),Promise.resolve()}answer($){return this.logger.debug("answer not implemented by this voice provider"),Promise.resolve()}addInstructions($){}addTools($){}close(){this.logger.debug("close not implemented by this voice provider")}on($,Y){this.logger.debug("on not implemented by this voice provider")}off($,Y){this.logger.debug("off not implemented by this voice provider")}getSpeakers(){return this.logger.debug("getSpeakers not implemented by this voice provider"),Promise.resolve([])}getListener(){return this.logger.debug("getListener not implemented by this voice provider"),Promise.resolve({enabled:!1})}},OI0=class extends Yz8{constructor(){super()}async speak($){throw new G0({id:"VOICE_DEFAULT_NO_SPEAK_PROVIDER",text:"No voice provider configured",domain:"MASTRA_VOICE",category:"USER"})}async listen($){throw new G0({id:"VOICE_DEFAULT_NO_LISTEN_PROVIDER",text:"No voice provider configured",domain:"MASTRA_VOICE",category:"USER"})}async getSpeakers(){throw new G0({id:"VOICE_DEFAULT_NO_SPEAKERS_PROVIDER",text:"No voice provider configured",domain:"MASTRA_VOICE",category:"USER"})}async getListener(){throw new G0({id:"VOICE_DEFAULT_NO_LISTENER_PROVIDER",text:"No voice provider configured",domain:"MASTRA_VOICE",category:"USER"})}}});var VQ,EW;var EI0=V0(()=>{VQ=Symbol("pubsub"),EW=Symbol("stream_format")});function xu1($){return typeof $==="object"&&$!==null&&"_def"in $&&"parse"in $&&typeof $.parse==="function"&&"safeParse"in $&&typeof $.safeParse==="function"}function hL($){let Y=$;if(Y._def?.typeName)return Y._def.typeName;let X=Y._def?.type;if(typeof X==="string"&&X)return"Zod"+X.charAt(0).toUpperCase()+X.slice(1);return}function fL($){if(!xu1($))return!1;return hL($)==="ZodArray"}function F_($){if(!xu1($))return!1;return hL($)==="ZodObject"}function eh($){let Y=$;return Y._zod?.def??Y._def}function MI0($,Y){let X=$;if(Y==="ZodNullable"||Y==="ZodOptional"||Y==="ZodDefault")return X._zod?.def?.innerType??X._def?.innerType;if(Y==="ZodEffects")return X._zod?.def?.schema??X._def?.schema;if(Y==="ZodBranded")return X._zod?.def?.type??X._def?.type;return}function RI0($){let Y=$;while(!0){let X=hL(Y);if(!X)break;let G=MI0(Y,X);if(!G)break;Y=G}return Y}var $f=()=>{};function yu1($){return new Gz8($)}var Xz8="ai-sdk",Gz8=class{#$;"~standard";constructor($){this.#$=$,this["~standard"]={version:1,vendor:Xz8,validate:this.#Y.bind(this),jsonSchema:{input:this.#J.bind(this),output:this.#J.bind(this)}}}#Y($){if(!this.#$.validate)return{value:$};try{let Y=this.#$.validate($);if(Y&&typeof Y==="object"&&"then"in Y&&typeof Y.then==="function")return Promise.resolve(Y).then((X)=>this.#X(X)).catch((X)=>{return{issues:[{message:`Schema validation error: ${X instanceof Error?X.message:"Unknown validation error"}`}]}});return this.#X(Y)}catch(Y){return{issues:[{message:`Schema validation error: ${Y instanceof Error?Y.message:"Unknown validation error"}`}]}}}#X($){if($.success)return{value:$.value};return{issues:[{message:$.error.message}]}}#J($){let{target:Y}=$,X=JSON.parse(JSON.stringify(this.#$.jsonSchema));if(!X.$schema)switch(Y){case"draft-07":X.$schema="http://json-schema.org/draft-07/schema#";break;case"draft-2020-12":X.$schema="https://json-schema.org/draft/2020-12/schema";break}return X}getSchema(){return this.#$}getJsonSchema(){return this.#$.jsonSchema}};var bu1=()=>{};var Jz8,hu1,Qz8,fu1,Wz8,Kz8,q1=($,Y)=>function(){return Y||(0,$[fu1($)[0]])((Y={exports:{}}).exports,Y),Y.exports},Zz8=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of fu1(Y))if(!Kz8.call($,J)&&J!==X)hu1($,J,{get:()=>Y[J],enumerable:!(G=Qz8(Y,J))||G.enumerable})}return $},gL=($,Y,X)=>(X=$!=null?Jz8(Wz8($)):{},Zz8(Y||!$||!$.__esModule?hu1(X,"default",{value:$,enumerable:!0}):X,$));var Yf=V0(()=>{Jz8=Object.create,hu1=Object.defineProperty,Qz8=Object.getOwnPropertyDescriptor,fu1=Object.getOwnPropertyNames,Wz8=Object.getPrototypeOf,Kz8=Object.prototype.hasOwnProperty});var zO;var e10=V0(()=>{Yf();zO=q1({"../../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js"($,Y){var X=Y.exports=function(Q,W,K){if(typeof W=="function")K=W,W={};K=W.cb||K;var Z=typeof K=="function"?K:K.pre||function(){},H=K.post||function(){};G(W,Z,H,Q,"",Q)};X.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},X.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},X.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},X.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function G(Q,W,K,Z,H,z,V,F,L,N){if(Z&&typeof Z=="object"&&!Array.isArray(Z)){W(Z,H,z,V,F,L,N);for(var D in Z){var A=Z[D];if(Array.isArray(A)){if(D in X.arrayKeywords)for(var B=0;B<A.length;B++)G(Q,W,K,A[B],H+"/"+D+"/"+B,z,H,D,Z,B)}else if(D in X.propsKeywords){if(A&&typeof A=="object")for(var O in A)G(Q,W,K,A[O],H+"/"+D+"/"+J(O),z,H,D,Z,O)}else if(D in X.keywords||Q.allKeys&&!(D in X.skipKeywords))G(Q,W,K,A,H+"/"+D,z,H,D,Z)}K(Z,H,z,V,F,L,N)}}function J(Q){return Q.replace(/~/g,"~0").replace(/\//g,"~1")}}})});function Xp1($,Y){return new AV8($,Y)}var $40,gu1,v6,V8,BZ,X40,Uz8,mu1,uu1,Y40,Hz8,OZ,zz8,Vz8,pu1,G40,Xf,J40,Gf,Q40,Fz8,du1,Lz8,Dz8,Nz8,cu1,Az8,qI0,lu1,Bz8,Oz8,Ez8,Mz8,Rz8,qz8,Pz8,wz8,PI0,_z8,jz8,Tz8,iu1,nu1,ru1,Iz8,Cz8,Sz8,wI0,kz8,au1,vz8,xz8,yz8,bz8,hz8,fz8,gz8,mz8,su1,uz8,ou1,tu1,pz8,dz8,eu1,cz8,lz8,$p1,Yp1,iz8,nz8,rz8,az8,sz8,oz8,tz8,ez8,$V8,YV8,XV8,GV8,JV8,QV8,WV8,KV8,ZV8,UV8,HV8,zV8,VV8,FV8,LV8,DV8,NV8="json-schema",AV8=class{#$;#Y;#X=null;#J=null;"~standard";constructor($,Y={}){this.#$=$,this.#Y=Y,this["~standard"]={version:1,vendor:NV8,validate:this.#G.bind(this),jsonSchema:{input:this.#U.bind(this),output:this.#U.bind(this)}}}#G($){try{let Y=this.#Z(),X=Y($);if(Y.$async)return X.then(()=>({value:$})).catch((J)=>{return{issues:(J?.errors??[]).map((K)=>({message:K.message??"Validation error",path:this.#Q(K.instancePath)}))}});if(X)return{value:$};return{issues:(Y.errors??[]).map((J)=>({message:J.message??"Validation error",path:this.#Q(J.instancePath)}))}}catch(Y){return{issues:[{message:`Schema validation error: ${Y instanceof Error?Y.message:"Unknown validation error"}`}]}}}#Q($){if(!$||$==="")return[];return $.slice(1).split("/").map((X)=>{let G=parseInt(X,10);if(!isNaN(G)&&String(G)===X)return G;return X.replace(/~1/g,"/").replace(/~0/g,"~")})}#U($){let{target:Y}=$,X=JSON.parse(JSON.stringify(this.#$));if(!X.$schema)switch(Y){case"draft-07":X.$schema="http://json-schema.org/draft-07/schema#";break;case"draft-2020-12":X.$schema="https://json-schema.org/draft/2020-12/schema";break}if($?.libraryOptions?.override){let G=$.libraryOptions.override;(0,DV8.default)(X,{cb:{post:(J)=>{G({jsonSchema:J})}}})}return X}#Z(){if(!this.#X){let Y=typeof this.#$.$schema==="string"&&this.#$.$schema.includes("2020-12")?LV8.default:FV8.default;this.#J=new Y({allErrors:!0,strict:!1,...this.#Y.ajvOptions}),this.#X=this.#J.compile(this.#$)}return this.#X}getSchema(){return this.#$}getAjv(){return this.#Z(),this.#J}};var Gp1=V0(()=>{e10();Yf();$40=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.regexpCode=$.getEsmExportName=$.getProperty=$.safeStringify=$.stringify=$.strConcat=$.addCodeArg=$.str=$._=$.nil=$._Code=$.Name=$.IDENTIFIER=$._CodeOrName=void 0;var Y=class{};$._CodeOrName=Y,$.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var X=class extends Y{constructor(B){super();if(!$.IDENTIFIER.test(B))throw Error("CodeGen: name must be a valid identifier");this.str=B}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};$.Name=X;var G=class extends Y{constructor(B){super();this._items=typeof B==="string"?[B]:B}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let B=this._items[0];return B===""||B==='""'}get str(){var B;return(B=this._str)!==null&&B!==void 0?B:this._str=this._items.reduce((O,E)=>`${O}${E}`,"")}get names(){var B;return(B=this._names)!==null&&B!==void 0?B:this._names=this._items.reduce((O,E)=>{if(E instanceof X)O[E.str]=(O[E.str]||0)+1;return O},{})}};$._Code=G,$.nil=new G("");function J(B,...O){let E=[B[0]],M=0;while(M<O.length)K(E,O[M]),E.push(B[++M]);return new G(E)}$._=J;var Q=new G("+");function W(B,...O){let E=[L(B[0])],M=0;while(M<O.length)E.push(Q),K(E,O[M]),E.push(Q,L(B[++M]));return Z(E),new G(E)}$.str=W;function K(B,O){if(O instanceof G)B.push(...O._items);else if(O instanceof X)B.push(O);else B.push(V(O))}$.addCodeArg=K;function Z(B){let O=1;while(O<B.length-1){if(B[O]===Q){let E=H(B[O-1],B[O+1]);if(E!==void 0){B.splice(O-1,3,E);continue}B[O++]="+"}O++}}function H(B,O){if(O==='""')return B;if(B==='""')return O;if(typeof B=="string"){if(O instanceof X||B[B.length-1]!=='"')return;if(typeof O!="string")return`${B.slice(0,-1)}${O}"`;if(O[0]==='"')return B.slice(0,-1)+O.slice(1);return}if(typeof O=="string"&&O[0]==='"'&&!(B instanceof X))return`"${B}${O.slice(1)}`;return}function z(B,O){return O.emptyStr()?B:B.emptyStr()?O:W`${B}${O}`}$.strConcat=z;function V(B){return typeof B=="number"||typeof B=="boolean"||B===null?B:L(Array.isArray(B)?B.join(","):B)}function F(B){return new G(L(B))}$.stringify=F;function L(B){return JSON.stringify(B).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}$.safeStringify=L;function N(B){return typeof B=="string"&&$.IDENTIFIER.test(B)?new G(`.${B}`):J`[${B}]`}$.getProperty=N;function D(B){if(typeof B=="string"&&$.IDENTIFIER.test(B))return new G(`${B}`);throw Error(`CodeGen: invalid export name: ${B}, use explicit $id name mapping`)}$.getEsmExportName=D;function A(B){return new G(B.toString())}$.regexpCode=A}}),gu1=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.ValueScope=$.ValueScopeName=$.Scope=$.varKinds=$.UsedValueState=void 0;var Y=$40(),X=class extends Error{constructor(Z){super(`CodeGen: "code" for ${Z} not defined`);this.value=Z.value}},G;(function(Z){Z[Z.Started=0]="Started",Z[Z.Completed=1]="Completed"})(G||($.UsedValueState=G={})),$.varKinds={const:new Y.Name("const"),let:new Y.Name("let"),var:new Y.Name("var")};var J=class{constructor({prefixes:Z,parent:H}={}){this._names={},this._prefixes=Z,this._parent=H}toName(Z){return Z instanceof Y.Name?Z:this.name(Z)}name(Z){return new Y.Name(this._newName(Z))}_newName(Z){let H=this._names[Z]||this._nameGroup(Z);return`${Z}${H.index++}`}_nameGroup(Z){var H,z;if(((z=(H=this._parent)===null||H===void 0?void 0:H._prefixes)===null||z===void 0?void 0:z.has(Z))||this._prefixes&&!this._prefixes.has(Z))throw Error(`CodeGen: prefix "${Z}" is not allowed in this scope`);return this._names[Z]={prefix:Z,index:0}}};$.Scope=J;var Q=class extends Y.Name{constructor(Z,H){super(H);this.prefix=Z}setValue(Z,{property:H,itemIndex:z}){this.value=Z,this.scopePath=Y._`.${new Y.Name(H)}[${z}]`}};$.ValueScopeName=Q;var W=Y._`\n`,K=class extends J{constructor(Z){super(Z);this._values={},this._scope=Z.scope,this.opts={...Z,_n:Z.lines?W:Y.nil}}get(){return this._scope}name(Z){return new Q(Z,this._newName(Z))}value(Z,H){var z;if(H.ref===void 0)throw Error("CodeGen: ref must be passed in value");let V=this.toName(Z),{prefix:F}=V,L=(z=H.key)!==null&&z!==void 0?z:H.ref,N=this._values[F];if(N){let B=N.get(L);if(B)return B}else N=this._values[F]=new Map;N.set(L,V);let D=this._scope[F]||(this._scope[F]=[]),A=D.length;return D[A]=H.ref,V.setValue(H,{property:F,itemIndex:A}),V}getValue(Z,H){let z=this._values[Z];if(!z)return;return z.get(H)}scopeRefs(Z,H=this._values){return this._reduceValues(H,(z)=>{if(z.scopePath===void 0)throw Error(`CodeGen: name "${z}" has no value`);return Y._`${Z}${z.scopePath}`})}scopeCode(Z=this._values,H,z){return this._reduceValues(Z,(V)=>{if(V.value===void 0)throw Error(`CodeGen: name "${V}" has no value`);return V.value.code},H,z)}_reduceValues(Z,H,z={},V){let F=Y.nil;for(let L in Z){let N=Z[L];if(!N)continue;let D=z[L]=z[L]||new Map;N.forEach((A)=>{if(D.has(A))return;D.set(A,G.Started);let B=H(A);if(B){let O=this.opts.es5?$.varKinds.var:$.varKinds.const;F=Y._`${F}${O} ${A} = ${B};${this.opts._n}`}else if(B=V===null||V===void 0?void 0:V(A))F=Y._`${F}${B}${this.opts._n}`;else throw new X(A);D.set(A,G.Completed)})}return F}};$.ValueScope=K}}),v6=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.or=$.and=$.not=$.CodeGen=$.operators=$.varKinds=$.ValueScopeName=$.ValueScope=$.Scope=$.Name=$.regexpCode=$.stringify=$.getProperty=$.nil=$.strConcat=$.str=$._=void 0;var Y=$40(),X=gu1(),G=$40();Object.defineProperty($,"_",{enumerable:!0,get:function(){return G._}}),Object.defineProperty($,"str",{enumerable:!0,get:function(){return G.str}}),Object.defineProperty($,"strConcat",{enumerable:!0,get:function(){return G.strConcat}}),Object.defineProperty($,"nil",{enumerable:!0,get:function(){return G.nil}}),Object.defineProperty($,"getProperty",{enumerable:!0,get:function(){return G.getProperty}}),Object.defineProperty($,"stringify",{enumerable:!0,get:function(){return G.stringify}}),Object.defineProperty($,"regexpCode",{enumerable:!0,get:function(){return G.regexpCode}}),Object.defineProperty($,"Name",{enumerable:!0,get:function(){return G.Name}});var J=gu1();Object.defineProperty($,"Scope",{enumerable:!0,get:function(){return J.Scope}}),Object.defineProperty($,"ValueScope",{enumerable:!0,get:function(){return J.ValueScope}}),Object.defineProperty($,"ValueScopeName",{enumerable:!0,get:function(){return J.ValueScopeName}}),Object.defineProperty($,"varKinds",{enumerable:!0,get:function(){return J.varKinds}}),$.operators={GT:new Y._Code(">"),GTE:new Y._Code(">="),LT:new Y._Code("<"),LTE:new Y._Code("<="),EQ:new Y._Code("==="),NEQ:new Y._Code("!=="),NOT:new Y._Code("!"),OR:new Y._Code("||"),AND:new Y._Code("&&"),ADD:new Y._Code("+")};var Q=class{optimizeNodes(){return this}optimizeNames(h,n){return this}},W=class extends Q{constructor(h,n,t){super();this.varKind=h,this.name=n,this.rhs=t}render({es5:h,_n:n}){let t=h?X.varKinds.var:this.varKind,s=this.rhs===void 0?"":` = ${this.rhs}`;return`${t} ${this.name}${s};`+n}optimizeNames(h,n){if(!h[this.name.str])return;if(this.rhs)this.rhs=I(this.rhs,h,n);return this}get names(){return this.rhs instanceof Y._CodeOrName?this.rhs.names:{}}},K=class extends Q{constructor(h,n,t){super();this.lhs=h,this.rhs=n,this.sideEffects=t}render({_n:h}){return`${this.lhs} = ${this.rhs};`+h}optimizeNames(h,n){if(this.lhs instanceof Y.Name&&!h[this.lhs.str]&&!this.sideEffects)return;return this.rhs=I(this.rhs,h,n),this}get names(){let h=this.lhs instanceof Y.Name?{}:{...this.lhs.names};return S(h,this.rhs)}},Z=class extends K{constructor(h,n,t,s){super(h,t,s);this.op=n}render({_n:h}){return`${this.lhs} ${this.op}= ${this.rhs};`+h}},H=class extends Q{constructor(h){super();this.label=h,this.names={}}render({_n:h}){return`${this.label}:`+h}},z=class extends Q{constructor(h){super();this.label=h,this.names={}}render({_n:h}){return`break${this.label?` ${this.label}`:""};`+h}},V=class extends Q{constructor(h){super();this.error=h}render({_n:h}){return`throw ${this.error};`+h}get names(){return this.error.names}},F=class extends Q{constructor(h){super();this.code=h}render({_n:h}){return`${this.code};`+h}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(h,n){return this.code=I(this.code,h,n),this}get names(){return this.code instanceof Y._CodeOrName?this.code.names:{}}},L=class extends Q{constructor(h=[]){super();this.nodes=h}render(h){return this.nodes.reduce((n,t)=>n+t.render(h),"")}optimizeNodes(){let{nodes:h}=this,n=h.length;while(n--){let t=h[n].optimizeNodes();if(Array.isArray(t))h.splice(n,1,...t);else if(t)h[n]=t;else h.splice(n,1)}return h.length>0?this:void 0}optimizeNames(h,n){let{nodes:t}=this,s=t.length;while(s--){let K0=t[s];if(K0.optimizeNames(h,n))continue;v(h,K0.names),t.splice(s,1)}return t.length>0?this:void 0}get names(){return this.nodes.reduce((h,n)=>k(h,n.names),{})}},N=class extends L{render(h){return"{"+h._n+super.render(h)+"}"+h._n}},D=class extends L{},A=class extends N{};A.kind="else";var B=class h extends N{constructor(n,t){super(t);this.condition=n}render(n){let t=`if(${this.condition})`+super.render(n);if(this.else)t+="else "+this.else.render(n);return t}optimizeNodes(){super.optimizeNodes();let n=this.condition;if(n===!0)return this.nodes;let t=this.else;if(t){let s=t.optimizeNodes();t=this.else=Array.isArray(s)?new A(s):s}if(t){if(n===!1)return t instanceof h?t:t.nodes;if(this.nodes.length)return this;return new h(x(n),t instanceof h?[t]:t.nodes)}if(n===!1||!this.nodes.length)return;return this}optimizeNames(n,t){var s;if(this.else=(s=this.else)===null||s===void 0?void 0:s.optimizeNames(n,t),!(super.optimizeNames(n,t)||this.else))return;return this.condition=I(this.condition,n,t),this}get names(){let n=super.names;if(S(n,this.condition),this.else)k(n,this.else.names);return n}};B.kind="if";var O=class extends N{};O.kind="for";var E=class extends O{constructor(h){super();this.iteration=h}render(h){return`for(${this.iteration})`+super.render(h)}optimizeNames(h,n){if(!super.optimizeNames(h,n))return;return this.iteration=I(this.iteration,h,n),this}get names(){return k(super.names,this.iteration.names)}},M=class extends O{constructor(h,n,t,s){super();this.varKind=h,this.name=n,this.from=t,this.to=s}render(h){let n=h.es5?X.varKinds.var:this.varKind,{name:t,from:s,to:K0}=this;return`for(${n} ${t}=${s}; ${t}<${K0}; ${t}++)`+super.render(h)}get names(){let h=S(super.names,this.from);return S(h,this.to)}},R=class extends O{constructor(h,n,t,s){super();this.loop=h,this.varKind=n,this.name=t,this.iterable=s}render(h){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(h)}optimizeNames(h,n){if(!super.optimizeNames(h,n))return;return this.iterable=I(this.iterable,h,n),this}get names(){return k(super.names,this.iterable.names)}},q=class extends N{constructor(h,n,t){super();this.name=h,this.args=n,this.async=t}render(h){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(h)}};q.kind="func";var _=class extends L{render(h){return"return "+super.render(h)}};_.kind="return";var P=class extends N{render(h){let n="try"+super.render(h);if(this.catch)n+=this.catch.render(h);if(this.finally)n+=this.finally.render(h);return n}optimizeNodes(){var h,n;return super.optimizeNodes(),(h=this.catch)===null||h===void 0||h.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(h,n){var t,s;return super.optimizeNames(h,n),(t=this.catch)===null||t===void 0||t.optimizeNames(h,n),(s=this.finally)===null||s===void 0||s.optimizeNames(h,n),this}get names(){let h=super.names;if(this.catch)k(h,this.catch.names);if(this.finally)k(h,this.finally.names);return h}},w=class extends N{constructor(h){super();this.error=h}render(h){return`catch(${this.error})`+super.render(h)}};w.kind="catch";var j=class extends N{render(h){return"finally"+super.render(h)}};j.kind="finally";var C=class{constructor(h,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
`:""},this._extScope=h,this._scope=new X.Scope({parent:h}),this._nodes=[new D]}toString(){return this._root.render(this.opts)}name(h){return this._scope.name(h)}scopeName(h){return this._extScope.name(h)}scopeValue(h,n){let t=this._extScope.value(h,n);return(this._values[t.prefix]||(this._values[t.prefix]=new Set)).add(t),t}getScopeValue(h,n){return this._extScope.getValue(h,n)}scopeRefs(h){return this._extScope.scopeRefs(h,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(h,n,t,s){let K0=this._scope.toName(n);if(t!==void 0&&s)this._constants[K0.str]=t;return this._leafNode(new W(h,K0,t)),K0}const(h,n,t){return this._def(X.varKinds.const,h,n,t)}let(h,n,t){return this._def(X.varKinds.let,h,n,t)}var(h,n,t){return this._def(X.varKinds.var,h,n,t)}assign(h,n,t){return this._leafNode(new K(h,n,t))}add(h,n){return this._leafNode(new Z(h,$.operators.ADD,n))}code(h){if(typeof h=="function")h();else if(h!==Y.nil)this._leafNode(new F(h));return this}object(...h){let n=["{"];for(let[t,s]of h){if(n.length>1)n.push(",");if(n.push(t),t!==s||this.opts.es5)n.push(":"),(0,Y.addCodeArg)(n,s)}return n.push("}"),new Y._Code(n)}if(h,n,t){if(this._blockNode(new B(h)),n&&t)this.code(n).else().code(t).endIf();else if(n)this.code(n).endIf();else if(t)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(h){return this._elseNode(new B(h))}else(){return this._elseNode(new A)}endIf(){return this._endBlockNode(B,A)}_for(h,n){if(this._blockNode(h),n)this.code(n).endFor();return this}for(h,n){return this._for(new E(h),n)}forRange(h,n,t,s,K0=this.opts.es5?X.varKinds.var:X.varKinds.let){let X0=this._scope.toName(h);return this._for(new M(K0,X0,n,t),()=>s(X0))}forOf(h,n,t,s=X.varKinds.const){let K0=this._scope.toName(h);if(this.opts.es5){let X0=n instanceof Y.Name?n:this.var("_arr",n);return this.forRange("_i",0,Y._`${X0}.length`,(a)=>{this.var(K0,Y._`${X0}[${a}]`),t(K0)})}return this._for(new R("of",s,K0,n),()=>t(K0))}forIn(h,n,t,s=this.opts.es5?X.varKinds.var:X.varKinds.const){if(this.opts.ownProperties)return this.forOf(h,Y._`Object.keys(${n})`,t);let K0=this._scope.toName(h);return this._for(new R("in",s,K0,n),()=>t(K0))}endFor(){return this._endBlockNode(O)}label(h){return this._leafNode(new H(h))}break(h){return this._leafNode(new z(h))}return(h){let n=new _;if(this._blockNode(n),this.code(h),n.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(_)}try(h,n,t){if(!n&&!t)throw Error('CodeGen: "try" without "catch" and "finally"');let s=new P;if(this._blockNode(s),this.code(h),n){let K0=this.name("e");this._currNode=s.catch=new w(K0),n(K0)}if(t)this._currNode=s.finally=new j,this.code(t);return this._endBlockNode(w,j)}throw(h){return this._leafNode(new V(h))}block(h,n){if(this._blockStarts.push(this._nodes.length),h)this.code(h).endBlock(n);return this}endBlock(h){let n=this._blockStarts.pop();if(n===void 0)throw Error("CodeGen: not in self-balancing block");let t=this._nodes.length-n;if(t<0||h!==void 0&&t!==h)throw Error(`CodeGen: wrong number of nodes: ${t} vs ${h} expected`);return this._nodes.length=n,this}func(h,n=Y.nil,t,s){if(this._blockNode(new q(h,n,t)),s)this.code(s).endFunc();return this}endFunc(){return this._endBlockNode(q)}optimize(h=1){while(h-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(h){return this._currNode.nodes.push(h),this}_blockNode(h){this._currNode.nodes.push(h),this._nodes.push(h)}_endBlockNode(h,n){let t=this._currNode;if(t instanceof h||n&&t instanceof n)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${n?`${h.kind}/${n.kind}`:h.kind}"`)}_elseNode(h){let n=this._currNode;if(!(n instanceof B))throw Error('CodeGen: "else" without "if"');return this._currNode=n.else=h,this}get _root(){return this._nodes[0]}get _currNode(){let h=this._nodes;return h[h.length-1]}set _currNode(h){let n=this._nodes;n[n.length-1]=h}};$.CodeGen=C;function k(h,n){for(let t in n)h[t]=(h[t]||0)+(n[t]||0);return h}function S(h,n){return n instanceof Y._CodeOrName?k(h,n.names):h}function I(h,n,t){if(h instanceof Y.Name)return s(h);if(!K0(h))return h;return new Y._Code(h._items.reduce((X0,a)=>{if(a instanceof Y.Name)a=s(a);if(a instanceof Y._Code)X0.push(...a._items);else X0.push(a);return X0},[]));function s(X0){let a=t[X0.str];if(a===void 0||n[X0.str]!==1)return X0;return delete n[X0.str],a}function K0(X0){return X0 instanceof Y._Code&&X0._items.some((a)=>a instanceof Y.Name&&n[a.str]===1&&t[a.str]!==void 0)}}function v(h,n){for(let t in n)h[t]=(h[t]||0)-(n[t]||0)}function x(h){return typeof h=="boolean"||typeof h=="number"||h===null?!h:Y._`!${p(h)}`}$.not=x;var y=g($.operators.AND);function d(...h){return h.reduce(y)}$.and=d;var u=g($.operators.OR);function b(...h){return h.reduce(u)}$.or=b;function g(h){return(n,t)=>n===Y.nil?t:t===Y.nil?n:Y._`${p(n)} ${h} ${p(t)}`}function p(h){return h instanceof Y.Name?h:Y._`(${h})`}}}),V8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.checkStrictMode=$.getErrorPath=$.Type=$.useFunc=$.setEvaluated=$.evaluatedPropsToName=$.mergeEvaluated=$.eachItem=$.unescapeJsonPointer=$.escapeJsonPointer=$.escapeFragment=$.unescapeFragment=$.schemaRefOrVal=$.schemaHasRulesButRef=$.schemaHasRules=$.checkUnknownRules=$.alwaysValidSchema=$.toHash=void 0;var Y=v6(),X=$40();function G(q){let _={};for(let P of q)_[P]=!0;return _}$.toHash=G;function J(q,_){if(typeof _=="boolean")return _;if(Object.keys(_).length===0)return!0;return Q(q,_),!W(_,q.self.RULES.all)}$.alwaysValidSchema=J;function Q(q,_=q.schema){let{opts:P,self:w}=q;if(!P.strictSchema)return;if(typeof _==="boolean")return;let j=w.RULES.keywords;for(let C in _)if(!j[C])R(q,`unknown keyword: "${C}"`)}$.checkUnknownRules=Q;function W(q,_){if(typeof q=="boolean")return!q;for(let P in q)if(_[P])return!0;return!1}$.schemaHasRules=W;function K(q,_){if(typeof q=="boolean")return!q;for(let P in q)if(P!=="$ref"&&_.all[P])return!0;return!1}$.schemaHasRulesButRef=K;function Z({topSchemaRef:q,schemaPath:_},P,w,j){if(!j){if(typeof P=="number"||typeof P=="boolean")return P;if(typeof P=="string")return Y._`${P}`}return Y._`${q}${_}${(0,Y.getProperty)(w)}`}$.schemaRefOrVal=Z;function H(q){return F(decodeURIComponent(q))}$.unescapeFragment=H;function z(q){return encodeURIComponent(V(q))}$.escapeFragment=z;function V(q){if(typeof q=="number")return`${q}`;return q.replace(/~/g,"~0").replace(/\//g,"~1")}$.escapeJsonPointer=V;function F(q){return q.replace(/~1/g,"/").replace(/~0/g,"~")}$.unescapeJsonPointer=F;function L(q,_){if(Array.isArray(q))for(let P of q)_(P);else _(q)}$.eachItem=L;function N({mergeNames:q,mergeToName:_,mergeValues:P,resultToName:w}){return(j,C,k,S)=>{let I=k===void 0?C:k instanceof Y.Name?(C instanceof Y.Name?q(j,C,k):_(j,C,k),k):C instanceof Y.Name?(_(j,k,C),C):P(C,k);return S===Y.Name&&!(I instanceof Y.Name)?w(j,I):I}}$.mergeEvaluated={props:N({mergeNames:(q,_,P)=>q.if(Y._`${P} !== true && ${_} !== undefined`,()=>{q.if(Y._`${_} === true`,()=>q.assign(P,!0),()=>q.assign(P,Y._`${P} || {}`).code(Y._`Object.assign(${P}, ${_})`))}),mergeToName:(q,_,P)=>q.if(Y._`${P} !== true`,()=>{if(_===!0)q.assign(P,!0);else q.assign(P,Y._`${P} || {}`),A(q,P,_)}),mergeValues:(q,_)=>q===!0?!0:{...q,..._},resultToName:D}),items:N({mergeNames:(q,_,P)=>q.if(Y._`${P} !== true && ${_} !== undefined`,()=>q.assign(P,Y._`${_} === true ? true : ${P} > ${_} ? ${P} : ${_}`)),mergeToName:(q,_,P)=>q.if(Y._`${P} !== true`,()=>q.assign(P,_===!0?!0:Y._`${P} > ${_} ? ${P} : ${_}`)),mergeValues:(q,_)=>q===!0?!0:Math.max(q,_),resultToName:(q,_)=>q.var("items",_)})};function D(q,_){if(_===!0)return q.var("props",!0);let P=q.var("props",Y._`{}`);if(_!==void 0)A(q,P,_);return P}$.evaluatedPropsToName=D;function A(q,_,P){Object.keys(P).forEach((w)=>q.assign(Y._`${_}${(0,Y.getProperty)(w)}`,!0))}$.setEvaluated=A;var B={};function O(q,_){return q.scopeValue("func",{ref:_,code:B[_.code]||(B[_.code]=new X._Code(_.code))})}$.useFunc=O;var E;(function(q){q[q.Num=0]="Num",q[q.Str=1]="Str"})(E||($.Type=E={}));function M(q,_,P){if(q instanceof Y.Name){let w=_===E.Num;return P?w?Y._`"[" + ${q} + "]"`:Y._`"['" + ${q} + "']"`:w?Y._`"/" + ${q}`:Y._`"/" + ${q}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return P?(0,Y.getProperty)(q).toString():"/"+V(q)}$.getErrorPath=M;function R(q,_,P=q.opts.strictSchema){if(!P)return;if(_=`strict mode: ${_}`,P===!0)throw Error(_);q.self.logger.warn(_)}$.checkStrictMode=R}}),BZ=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X={data:new Y.Name("data"),valCxt:new Y.Name("valCxt"),instancePath:new Y.Name("instancePath"),parentData:new Y.Name("parentData"),parentDataProperty:new Y.Name("parentDataProperty"),rootData:new Y.Name("rootData"),dynamicAnchors:new Y.Name("dynamicAnchors"),vErrors:new Y.Name("vErrors"),errors:new Y.Name("errors"),this:new Y.Name("this"),self:new Y.Name("self"),scope:new Y.Name("scope"),json:new Y.Name("json"),jsonPos:new Y.Name("jsonPos"),jsonLen:new Y.Name("jsonLen"),jsonPart:new Y.Name("jsonPart")};$.default=X}}),X40=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.extendErrors=$.resetErrorsCount=$.reportExtraError=$.reportError=$.keyword$DataError=$.keywordError=void 0;var Y=v6(),X=V8(),G=BZ();$.keywordError={message:({keyword:A})=>Y.str`must pass "${A}" keyword validation`},$.keyword$DataError={message:({keyword:A,schemaType:B})=>B?Y.str`"${A}" keyword must be ${B} ($data)`:Y.str`"${A}" keyword is invalid ($data)`};function J(A,B=$.keywordError,O,E){let{it:M}=A,{gen:R,compositeRule:q,allErrors:_}=M,P=V(A,B,O);if(E!==null&&E!==void 0?E:q||_)Z(R,P);else H(M,Y._`[${P}]`)}$.reportError=J;function Q(A,B=$.keywordError,O){let{it:E}=A,{gen:M,compositeRule:R,allErrors:q}=E,_=V(A,B,O);if(Z(M,_),!(R||q))H(E,G.default.vErrors)}$.reportExtraError=Q;function W(A,B){A.assign(G.default.errors,B),A.if(Y._`${G.default.vErrors} !== null`,()=>A.if(B,()=>A.assign(Y._`${G.default.vErrors}.length`,B),()=>A.assign(G.default.vErrors,null)))}$.resetErrorsCount=W;function K({gen:A,keyword:B,schemaValue:O,data:E,errsCount:M,it:R}){if(M===void 0)throw Error("ajv implementation error");let q=A.name("err");A.forRange("i",M,G.default.errors,(_)=>{if(A.const(q,Y._`${G.default.vErrors}[${_}]`),A.if(Y._`${q}.instancePath === undefined`,()=>A.assign(Y._`${q}.instancePath`,(0,Y.strConcat)(G.default.instancePath,R.errorPath))),A.assign(Y._`${q}.schemaPath`,Y.str`${R.errSchemaPath}/${B}`),R.opts.verbose)A.assign(Y._`${q}.schema`,O),A.assign(Y._`${q}.data`,E)})}$.extendErrors=K;function Z(A,B){let O=A.const("err",B);A.if(Y._`${G.default.vErrors} === null`,()=>A.assign(G.default.vErrors,Y._`[${O}]`),Y._`${G.default.vErrors}.push(${O})`),A.code(Y._`${G.default.errors}++`)}function H(A,B){let{gen:O,validateName:E,schemaEnv:M}=A;if(M.$async)O.throw(Y._`new ${A.ValidationError}(${B})`);else O.assign(Y._`${E}.errors`,B),O.return(!1)}var z={keyword:new Y.Name("keyword"),schemaPath:new Y.Name("schemaPath"),params:new Y.Name("params"),propertyName:new Y.Name("propertyName"),message:new Y.Name("message"),schema:new Y.Name("schema"),parentSchema:new Y.Name("parentSchema")};function V(A,B,O){let{createErrors:E}=A.it;if(E===!1)return Y._`{}`;return F(A,B,O)}function F(A,B,O={}){let{gen:E,it:M}=A,R=[L(M,O),N(A,O)];return D(A,B,R),E.object(...R)}function L({errorPath:A},{instancePath:B}){let O=B?Y.str`${A}${(0,X.getErrorPath)(B,X.Type.Str)}`:A;return[G.default.instancePath,(0,Y.strConcat)(G.default.instancePath,O)]}function N({keyword:A,it:{errSchemaPath:B}},{schemaPath:O,parentSchema:E}){let M=E?B:Y.str`${B}/${A}`;if(O)M=Y.str`${M}${(0,X.getErrorPath)(O,X.Type.Str)}`;return[z.schemaPath,M]}function D(A,{params:B,message:O},E){let{keyword:M,data:R,schemaValue:q,it:_}=A,{opts:P,propertyName:w,topSchemaRef:j,schemaPath:C}=_;if(E.push([z.keyword,M],[z.params,typeof B=="function"?B(A):B||Y._`{}`]),P.messages)E.push([z.message,typeof O=="function"?O(A):O]);if(P.verbose)E.push([z.schema,q],[z.parentSchema,Y._`${j}${C}`],[G.default.data,R]);if(w)E.push([z.propertyName,w])}}}),Uz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.boolOrEmptySchema=$.topBoolOrEmptySchema=void 0;var Y=X40(),X=v6(),G=BZ(),J={message:"boolean schema is false"};function Q(Z){let{gen:H,schema:z,validateName:V}=Z;if(z===!1)K(Z,!1);else if(typeof z=="object"&&z.$async===!0)H.return(G.default.data);else H.assign(X._`${V}.errors`,null),H.return(!0)}$.topBoolOrEmptySchema=Q;function W(Z,H){let{gen:z,schema:V}=Z;if(V===!1)z.var(H,!1),K(Z);else z.var(H,!0)}$.boolOrEmptySchema=W;function K(Z,H){let{gen:z,data:V}=Z,F={gen:z,keyword:"false schema",data:V,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:Z};(0,Y.reportError)(F,J,void 0,H)}}}),mu1=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.getRules=$.isJSONType=void 0;var Y=["string","number","integer","boolean","null","object","array"],X=new Set(Y);function G(Q){return typeof Q=="string"&&X.has(Q)}$.isJSONType=G;function J(){let Q={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...Q,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},Q.number,Q.string,Q.array,Q.object],post:{rules:[]},all:{},keywords:{}}}$.getRules=J}}),uu1=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.shouldUseRule=$.shouldUseGroup=$.schemaHasRulesForType=void 0;function Y({schema:J,self:Q},W){let K=Q.RULES.types[W];return K&&K!==!0&&X(J,K)}$.schemaHasRulesForType=Y;function X(J,Q){return Q.rules.some((W)=>G(J,W))}$.shouldUseGroup=X;function G(J,Q){var W;return J[Q.keyword]!==void 0||((W=Q.definition.implements)===null||W===void 0?void 0:W.some((K)=>J[K]!==void 0))}$.shouldUseRule=G}}),Y40=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.reportTypeError=$.checkDataTypes=$.checkDataType=$.coerceAndCheckDataType=$.getJSONTypes=$.getSchemaTypes=$.DataType=void 0;var Y=mu1(),X=uu1(),G=X40(),J=v6(),Q=V8(),W;(function(E){E[E.Correct=0]="Correct",E[E.Wrong=1]="Wrong"})(W||($.DataType=W={}));function K(E){let M=Z(E.type);if(M.includes("null")){if(E.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!M.length&&E.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(E.nullable===!0)M.push("null")}return M}$.getSchemaTypes=K;function Z(E){let M=Array.isArray(E)?E:E?[E]:[];if(M.every(Y.isJSONType))return M;throw Error("type must be JSONType or JSONType[]: "+M.join(","))}$.getJSONTypes=Z;function H(E,M){let{gen:R,data:q,opts:_}=E,P=V(M,_.coerceTypes),w=M.length>0&&!(P.length===0&&M.length===1&&(0,X.schemaHasRulesForType)(E,M[0]));if(w){let j=D(M,q,_.strictNumbers,W.Wrong);R.if(j,()=>{if(P.length)F(E,M,P);else B(E)})}return w}$.coerceAndCheckDataType=H;var z=new Set(["string","number","integer","boolean","null"]);function V(E,M){return M?E.filter((R)=>z.has(R)||M==="array"&&R==="array"):[]}function F(E,M,R){let{gen:q,data:_,opts:P}=E,w=q.let("dataType",J._`typeof ${_}`),j=q.let("coerced",J._`undefined`);if(P.coerceTypes==="array")q.if(J._`${w} == 'object' && Array.isArray(${_}) && ${_}.length == 1`,()=>q.assign(_,J._`${_}[0]`).assign(w,J._`typeof ${_}`).if(D(M,_,P.strictNumbers),()=>q.assign(j,_)));q.if(J._`${j} !== undefined`);for(let k of R)if(z.has(k)||k==="array"&&P.coerceTypes==="array")C(k);q.else(),B(E),q.endIf(),q.if(J._`${j} !== undefined`,()=>{q.assign(_,j),L(E,j)});function C(k){switch(k){case"string":q.elseIf(J._`${w} == "number" || ${w} == "boolean"`).assign(j,J._`"" + ${_}`).elseIf(J._`${_} === null`).assign(j,J._`""`);return;case"number":q.elseIf(J._`${w} == "boolean" || ${_} === null
              || (${w} == "string" && ${_} && ${_} == +${_})`).assign(j,J._`+${_}`);return;case"integer":q.elseIf(J._`${w} === "boolean" || ${_} === null
              || (${w} === "string" && ${_} && ${_} == +${_} && !(${_} % 1))`).assign(j,J._`+${_}`);return;case"boolean":q.elseIf(J._`${_} === "false" || ${_} === 0 || ${_} === null`).assign(j,!1).elseIf(J._`${_} === "true" || ${_} === 1`).assign(j,!0);return;case"null":q.elseIf(J._`${_} === "" || ${_} === 0 || ${_} === false`),q.assign(j,null);return;case"array":q.elseIf(J._`${w} === "string" || ${w} === "number"
              || ${w} === "boolean" || ${_} === null`).assign(j,J._`[${_}]`)}}}function L({gen:E,parentData:M,parentDataProperty:R},q){E.if(J._`${M} !== undefined`,()=>E.assign(J._`${M}[${R}]`,q))}function N(E,M,R,q=W.Correct){let _=q===W.Correct?J.operators.EQ:J.operators.NEQ,P;switch(E){case"null":return J._`${M} ${_} null`;case"array":P=J._`Array.isArray(${M})`;break;case"object":P=J._`${M} && typeof ${M} == "object" && !Array.isArray(${M})`;break;case"integer":P=w(J._`!(${M} % 1) && !isNaN(${M})`);break;case"number":P=w();break;default:return J._`typeof ${M} ${_} ${E}`}return q===W.Correct?P:(0,J.not)(P);function w(j=J.nil){return(0,J.and)(J._`typeof ${M} == "number"`,j,R?J._`isFinite(${M})`:J.nil)}}$.checkDataType=N;function D(E,M,R,q){if(E.length===1)return N(E[0],M,R,q);let _,P=(0,Q.toHash)(E);if(P.array&&P.object){let w=J._`typeof ${M} != "object"`;_=P.null?w:J._`!${M} || ${w}`,delete P.null,delete P.array,delete P.object}else _=J.nil;if(P.number)delete P.integer;for(let w in P)_=(0,J.and)(_,N(w,M,R,q));return _}$.checkDataTypes=D;var A={message:({schema:E})=>`must be ${E}`,params:({schema:E,schemaValue:M})=>typeof E=="string"?J._`{type: ${E}}`:J._`{type: ${M}}`};function B(E){let M=O(E);(0,G.reportError)(M,A)}$.reportTypeError=B;function O(E){let{gen:M,data:R,schema:q}=E,_=(0,Q.schemaRefOrVal)(E,q,"type");return{gen:M,keyword:"type",data:R,schema:q.type,schemaCode:_,schemaValue:_,parentSchema:q,params:{},it:E}}}}),Hz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.assignDefaults=void 0;var Y=v6(),X=V8();function G(Q,W){let{properties:K,items:Z}=Q.schema;if(W==="object"&&K)for(let H in K)J(Q,H,K[H].default);else if(W==="array"&&Array.isArray(Z))Z.forEach((H,z)=>J(Q,z,H.default))}$.assignDefaults=G;function J(Q,W,K){let{gen:Z,compositeRule:H,data:z,opts:V}=Q;if(K===void 0)return;let F=Y._`${z}${(0,Y.getProperty)(W)}`;if(H){(0,X.checkStrictMode)(Q,`default is ignored for: ${F}`);return}let L=Y._`${F} === undefined`;if(V.useDefaults==="empty")L=Y._`${L} || ${F} === null || ${F} === ""`;Z.if(L,Y._`${F} = ${(0,Y.stringify)(K)}`)}}}),OZ=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.validateUnion=$.validateArray=$.usePattern=$.callValidateCode=$.schemaProperties=$.allSchemaProperties=$.noPropertyInData=$.propertyInData=$.isOwnProperty=$.hasPropFunc=$.reportMissingProp=$.checkMissingProp=$.checkReportMissingProp=void 0;var Y=v6(),X=V8(),G=BZ(),J=V8();function Q(E,M){let{gen:R,data:q,it:_}=E;R.if(V(R,q,M,_.opts.ownProperties),()=>{E.setParams({missingProperty:Y._`${M}`},!0),E.error()})}$.checkReportMissingProp=Q;function W({gen:E,data:M,it:{opts:R}},q,_){return(0,Y.or)(...q.map((P)=>(0,Y.and)(V(E,M,P,R.ownProperties),Y._`${_} = ${P}`)))}$.checkMissingProp=W;function K(E,M){E.setParams({missingProperty:M},!0),E.error()}$.reportMissingProp=K;function Z(E){return E.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:Y._`Object.prototype.hasOwnProperty`})}$.hasPropFunc=Z;function H(E,M,R){return Y._`${Z(E)}.call(${M}, ${R})`}$.isOwnProperty=H;function z(E,M,R,q){let _=Y._`${M}${(0,Y.getProperty)(R)} !== undefined`;return q?Y._`${_} && ${H(E,M,R)}`:_}$.propertyInData=z;function V(E,M,R,q){let _=Y._`${M}${(0,Y.getProperty)(R)} === undefined`;return q?(0,Y.or)(_,(0,Y.not)(H(E,M,R))):_}$.noPropertyInData=V;function F(E){return E?Object.keys(E).filter((M)=>M!=="__proto__"):[]}$.allSchemaProperties=F;function L(E,M){return F(M).filter((R)=>!(0,X.alwaysValidSchema)(E,M[R]))}$.schemaProperties=L;function N({schemaCode:E,data:M,it:{gen:R,topSchemaRef:q,schemaPath:_,errorPath:P},it:w},j,C,k){let S=k?Y._`${E}, ${M}, ${q}${_}`:M,I=[[G.default.instancePath,(0,Y.strConcat)(G.default.instancePath,P)],[G.default.parentData,w.parentData],[G.default.parentDataProperty,w.parentDataProperty],[G.default.rootData,G.default.rootData]];if(w.opts.dynamicRef)I.push([G.default.dynamicAnchors,G.default.dynamicAnchors]);let v=Y._`${S}, ${R.object(...I)}`;return C!==Y.nil?Y._`${j}.call(${C}, ${v})`:Y._`${j}(${v})`}$.callValidateCode=N;var D=Y._`new RegExp`;function A({gen:E,it:{opts:M}},R){let q=M.unicodeRegExp?"u":"",{regExp:_}=M.code,P=_(R,q);return E.scopeValue("pattern",{key:P.toString(),ref:P,code:Y._`${_.code==="new RegExp"?D:(0,J.useFunc)(E,_)}(${R}, ${q})`})}$.usePattern=A;function B(E){let{gen:M,data:R,keyword:q,it:_}=E,P=M.name("valid");if(_.allErrors){let j=M.let("valid",!0);return w(()=>M.assign(j,!1)),j}return M.var(P,!0),w(()=>M.break()),P;function w(j){let C=M.const("len",Y._`${R}.length`);M.forRange("i",0,C,(k)=>{E.subschema({keyword:q,dataProp:k,dataPropType:X.Type.Num},P),M.if((0,Y.not)(P),j)})}}$.validateArray=B;function O(E){let{gen:M,schema:R,keyword:q,it:_}=E;if(!Array.isArray(R))throw Error("ajv implementation error");if(R.some((C)=>(0,X.alwaysValidSchema)(_,C))&&!_.opts.unevaluated)return;let w=M.let("valid",!1),j=M.name("_valid");M.block(()=>R.forEach((C,k)=>{let S=E.subschema({keyword:q,schemaProp:k,compositeRule:!0},j);if(M.assign(w,Y._`${w} || ${j}`),!E.mergeValidEvaluated(S,j))M.if((0,Y.not)(w))})),E.result(w,()=>E.reset(),()=>E.error(!0))}$.validateUnion=O}}),zz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.validateKeywordUsage=$.validSchemaType=$.funcKeywordCode=$.macroKeywordCode=void 0;var Y=v6(),X=BZ(),G=OZ(),J=X40();function Q(L,N){let{gen:D,keyword:A,schema:B,parentSchema:O,it:E}=L,M=N.macro.call(E.self,B,O,E),R=z(D,A,M);if(E.opts.validateSchema!==!1)E.self.validateSchema(M,!0);let q=D.name("valid");L.subschema({schema:M,schemaPath:Y.nil,errSchemaPath:`${E.errSchemaPath}/${A}`,topSchemaRef:R,compositeRule:!0},q),L.pass(q,()=>L.error(!0))}$.macroKeywordCode=Q;function W(L,N){var D;let{gen:A,keyword:B,schema:O,parentSchema:E,$data:M,it:R}=L;H(R,N);let q=!M&&N.compile?N.compile.call(R.self,O,E,R):N.validate,_=z(A,B,q),P=A.let("valid");L.block$data(P,w),L.ok((D=N.valid)!==null&&D!==void 0?D:P);function w(){if(N.errors===!1){if(k(),N.modifying)K(L);S(()=>L.error())}else{let I=N.async?j():C();if(N.modifying)K(L);S(()=>Z(L,I))}}function j(){let I=A.let("ruleErrs",null);return A.try(()=>k(Y._`await `),(v)=>A.assign(P,!1).if(Y._`${v} instanceof ${R.ValidationError}`,()=>A.assign(I,Y._`${v}.errors`),()=>A.throw(v))),I}function C(){let I=Y._`${_}.errors`;return A.assign(I,null),k(Y.nil),I}function k(I=N.async?Y._`await `:Y.nil){let v=R.opts.passContext?X.default.this:X.default.self,x=!(("compile"in N)&&!M||N.schema===!1);A.assign(P,Y._`${I}${(0,G.callValidateCode)(L,_,v,x)}`,N.modifying)}function S(I){var v;A.if((0,Y.not)((v=N.valid)!==null&&v!==void 0?v:P),I)}}$.funcKeywordCode=W;function K(L){let{gen:N,data:D,it:A}=L;N.if(A.parentData,()=>N.assign(D,Y._`${A.parentData}[${A.parentDataProperty}]`))}function Z(L,N){let{gen:D}=L;D.if(Y._`Array.isArray(${N})`,()=>{D.assign(X.default.vErrors,Y._`${X.default.vErrors} === null ? ${N} : ${X.default.vErrors}.concat(${N})`).assign(X.default.errors,Y._`${X.default.vErrors}.length`),(0,J.extendErrors)(L)},()=>L.error())}function H({schemaEnv:L},N){if(N.async&&!L.$async)throw Error("async keyword in sync schema")}function z(L,N,D){if(D===void 0)throw Error(`keyword "${N}" failed to compile`);return L.scopeValue("keyword",typeof D=="function"?{ref:D}:{ref:D,code:(0,Y.stringify)(D)})}function V(L,N,D=!1){return!N.length||N.some((A)=>A==="array"?Array.isArray(L):A==="object"?L&&typeof L=="object"&&!Array.isArray(L):typeof L==A||D&&typeof L>"u")}$.validSchemaType=V;function F({schema:L,opts:N,self:D,errSchemaPath:A},B,O){if(Array.isArray(B.keyword)?!B.keyword.includes(O):B.keyword!==O)throw Error("ajv implementation error");let E=B.dependencies;if(E===null||E===void 0?void 0:E.some((M)=>!Object.prototype.hasOwnProperty.call(L,M)))throw Error(`parent schema must have dependencies of ${O}: ${E.join(",")}`);if(B.validateSchema){if(!B.validateSchema(L[O])){let R=`keyword "${O}" value is invalid at path "${A}": `+D.errorsText(B.validateSchema.errors);if(N.validateSchema==="log")D.logger.error(R);else throw Error(R)}}}$.validateKeywordUsage=F}}),Vz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.extendSubschemaMode=$.extendSubschemaData=$.getSubschema=void 0;var Y=v6(),X=V8();function G(W,{keyword:K,schemaProp:Z,schema:H,schemaPath:z,errSchemaPath:V,topSchemaRef:F}){if(K!==void 0&&H!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(K!==void 0){let L=W.schema[K];return Z===void 0?{schema:L,schemaPath:Y._`${W.schemaPath}${(0,Y.getProperty)(K)}`,errSchemaPath:`${W.errSchemaPath}/${K}`}:{schema:L[Z],schemaPath:Y._`${W.schemaPath}${(0,Y.getProperty)(K)}${(0,Y.getProperty)(Z)}`,errSchemaPath:`${W.errSchemaPath}/${K}/${(0,X.escapeFragment)(Z)}`}}if(H!==void 0){if(z===void 0||V===void 0||F===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:H,schemaPath:z,topSchemaRef:F,errSchemaPath:V}}throw Error('either "keyword" or "schema" must be passed')}$.getSubschema=G;function J(W,K,{dataProp:Z,dataPropType:H,data:z,dataTypes:V,propertyName:F}){if(z!==void 0&&Z!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:L}=K;if(Z!==void 0){let{errorPath:D,dataPathArr:A,opts:B}=K,O=L.let("data",Y._`${K.data}${(0,Y.getProperty)(Z)}`,!0);N(O),W.errorPath=Y.str`${D}${(0,X.getErrorPath)(Z,H,B.jsPropertySyntax)}`,W.parentDataProperty=Y._`${Z}`,W.dataPathArr=[...A,W.parentDataProperty]}if(z!==void 0){let D=z instanceof Y.Name?z:L.let("data",z,!0);if(N(D),F!==void 0)W.propertyName=F}if(V)W.dataTypes=V;function N(D){W.data=D,W.dataLevel=K.dataLevel+1,W.dataTypes=[],K.definedProperties=new Set,W.parentData=K.data,W.dataNames=[...K.dataNames,D]}}$.extendSubschemaData=J;function Q(W,{jtdDiscriminator:K,jtdMetadata:Z,compositeRule:H,createErrors:z,allErrors:V}){if(H!==void 0)W.compositeRule=H;if(z!==void 0)W.createErrors=z;if(V!==void 0)W.allErrors=V;W.jtdDiscriminator=K,W.jtdMetadata=Z}$.extendSubschemaMode=Q}}),pu1=q1({"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"($,Y){Y.exports=function X(G,J){if(G===J)return!0;if(G&&J&&typeof G=="object"&&typeof J=="object"){if(G.constructor!==J.constructor)return!1;var Q,W,K;if(Array.isArray(G)){if(Q=G.length,Q!=J.length)return!1;for(W=Q;W--!==0;)if(!X(G[W],J[W]))return!1;return!0}if(G.constructor===RegExp)return G.source===J.source&&G.flags===J.flags;if(G.valueOf!==Object.prototype.valueOf)return G.valueOf()===J.valueOf();if(G.toString!==Object.prototype.toString)return G.toString()===J.toString();if(K=Object.keys(G),Q=K.length,Q!==Object.keys(J).length)return!1;for(W=Q;W--!==0;)if(!Object.prototype.hasOwnProperty.call(J,K[W]))return!1;for(W=Q;W--!==0;){var Z=K[W];if(!X(G[Z],J[Z]))return!1}return!0}return G!==G&&J!==J}}}),G40=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.getSchemaRefs=$.resolveUrl=$.normalizeId=$._getFullPath=$.getFullPath=$.inlineRef=void 0;var Y=V8(),X=pu1(),G=zO(),J=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Q(A,B=!0){if(typeof A=="boolean")return!0;if(B===!0)return!K(A);if(!B)return!1;return Z(A)<=B}$.inlineRef=Q;var W=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function K(A){for(let B in A){if(W.has(B))return!0;let O=A[B];if(Array.isArray(O)&&O.some(K))return!0;if(typeof O=="object"&&K(O))return!0}return!1}function Z(A){let B=0;for(let O in A){if(O==="$ref")return 1/0;if(B++,J.has(O))continue;if(typeof A[O]=="object")(0,Y.eachItem)(A[O],(E)=>B+=Z(E));if(B===1/0)return 1/0}return B}function H(A,B="",O){if(O!==!1)B=F(B);let E=A.parse(B);return z(A,E)}$.getFullPath=H;function z(A,B){return A.serialize(B).split("#")[0]+"#"}$._getFullPath=z;var V=/#\/?$/;function F(A){return A?A.replace(V,""):""}$.normalizeId=F;function L(A,B,O){return O=F(O),A.resolve(B,O)}$.resolveUrl=L;var N=/^[a-z_][-a-z0-9._]*$/i;function D(A,B){if(typeof A=="boolean")return{};let{schemaId:O,uriResolver:E}=this.opts,M=F(A[O]||B),R={"":M},q=H(E,M,!1),_={},P=new Set;return G(A,{allKeys:!0},(C,k,S,I)=>{if(I===void 0)return;let v=q+k,x=R[I];if(typeof C[O]=="string")x=y.call(this,C[O]);d.call(this,C.$anchor),d.call(this,C.$dynamicAnchor),R[k]=x;function y(u){let b=this.opts.uriResolver.resolve;if(u=F(x?b(x,u):u),P.has(u))throw j(u);P.add(u);let g=this.refs[u];if(typeof g=="string")g=this.refs[g];if(typeof g=="object")w(C,g.schema,u);else if(u!==F(v))if(u[0]==="#")w(C,_[u],u),_[u]=C;else this.refs[u]=v;return u}function d(u){if(typeof u=="string"){if(!N.test(u))throw Error(`invalid anchor "${u}"`);y.call(this,`#${u}`)}}}),_;function w(C,k,S){if(k!==void 0&&!X(C,k))throw j(S)}function j(C){return Error(`reference "${C}" resolves to more than one schema`)}}$.getSchemaRefs=D}}),Xf=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.getData=$.KeywordCxt=$.validateFunctionCode=void 0;var Y=Uz8(),X=Y40(),G=uu1(),J=Y40(),Q=Hz8(),W=zz8(),K=Vz8(),Z=v6(),H=BZ(),z=G40(),V=V8(),F=X40();function L(m){if(q(m)){if(P(m),R(m)){B(m);return}}N(m,()=>(0,Y.topBoolOrEmptySchema)(m))}$.validateFunctionCode=L;function N({gen:m,validateName:$0,schema:Y0,schemaEnv:Z0,opts:F0},D0){if(F0.code.es5)m.func($0,Z._`${H.default.data}, ${H.default.valCxt}`,Z0.$async,()=>{m.code(Z._`"use strict"; ${E(Y0,F0)}`),A(m,F0),m.code(D0)});else m.func($0,Z._`${H.default.data}, ${D(F0)}`,Z0.$async,()=>m.code(E(Y0,F0)).code(D0))}function D(m){return Z._`{${H.default.instancePath}="", ${H.default.parentData}, ${H.default.parentDataProperty}, ${H.default.rootData}=${H.default.data}${m.dynamicRef?Z._`, ${H.default.dynamicAnchors}={}`:Z.nil}}={}`}function A(m,$0){m.if(H.default.valCxt,()=>{if(m.var(H.default.instancePath,Z._`${H.default.valCxt}.${H.default.instancePath}`),m.var(H.default.parentData,Z._`${H.default.valCxt}.${H.default.parentData}`),m.var(H.default.parentDataProperty,Z._`${H.default.valCxt}.${H.default.parentDataProperty}`),m.var(H.default.rootData,Z._`${H.default.valCxt}.${H.default.rootData}`),$0.dynamicRef)m.var(H.default.dynamicAnchors,Z._`${H.default.valCxt}.${H.default.dynamicAnchors}`)},()=>{if(m.var(H.default.instancePath,Z._`""`),m.var(H.default.parentData,Z._`undefined`),m.var(H.default.parentDataProperty,Z._`undefined`),m.var(H.default.rootData,H.default.data),$0.dynamicRef)m.var(H.default.dynamicAnchors,Z._`{}`)})}function B(m){let{schema:$0,opts:Y0,gen:Z0}=m;N(m,()=>{if(Y0.$comment&&$0.$comment)I(m);if(C(m),Z0.let(H.default.vErrors,null),Z0.let(H.default.errors,0),Y0.unevaluated)O(m);w(m),v(m)});return}function O(m){let{gen:$0,validateName:Y0}=m;m.evaluated=$0.const("evaluated",Z._`${Y0}.evaluated`),$0.if(Z._`${m.evaluated}.dynamicProps`,()=>$0.assign(Z._`${m.evaluated}.props`,Z._`undefined`)),$0.if(Z._`${m.evaluated}.dynamicItems`,()=>$0.assign(Z._`${m.evaluated}.items`,Z._`undefined`))}function E(m,$0){let Y0=typeof m=="object"&&m[$0.schemaId];return Y0&&($0.code.source||$0.code.process)?Z._`/*# sourceURL=${Y0} */`:Z.nil}function M(m,$0){if(q(m)){if(P(m),R(m)){_(m,$0);return}}(0,Y.boolOrEmptySchema)(m,$0)}function R({schema:m,self:$0}){if(typeof m=="boolean")return!m;for(let Y0 in m)if($0.RULES.all[Y0])return!0;return!1}function q(m){return typeof m.schema!="boolean"}function _(m,$0){let{schema:Y0,gen:Z0,opts:F0}=m;if(F0.$comment&&Y0.$comment)I(m);k(m),S(m);let D0=Z0.const("_errs",H.default.errors);w(m,D0),Z0.var($0,Z._`${D0} === ${H.default.errors}`)}function P(m){(0,V.checkUnknownRules)(m),j(m)}function w(m,$0){if(m.opts.jtd)return y(m,[],!1,$0);let Y0=(0,X.getSchemaTypes)(m.schema),Z0=(0,X.coerceAndCheckDataType)(m,Y0);y(m,Y0,!Z0,$0)}function j(m){let{schema:$0,errSchemaPath:Y0,opts:Z0,self:F0}=m;if($0.$ref&&Z0.ignoreKeywordsWithRef&&(0,V.schemaHasRulesButRef)($0,F0.RULES))F0.logger.warn(`$ref: keywords ignored in schema at path "${Y0}"`)}function C(m){let{schema:$0,opts:Y0}=m;if($0.default!==void 0&&Y0.useDefaults&&Y0.strictSchema)(0,V.checkStrictMode)(m,"default is ignored in the schema root")}function k(m){let $0=m.schema[m.opts.schemaId];if($0)m.baseId=(0,z.resolveUrl)(m.opts.uriResolver,m.baseId,$0)}function S(m){if(m.schema.$async&&!m.schemaEnv.$async)throw Error("async schema in sync schema")}function I({gen:m,schemaEnv:$0,schema:Y0,errSchemaPath:Z0,opts:F0}){let D0=Y0.$comment;if(F0.$comment===!0)m.code(Z._`${H.default.self}.logger.log(${D0})`);else if(typeof F0.$comment=="function"){let O0=Z.str`${Z0}/$comment`,R0=m.scopeValue("root",{ref:$0.root});m.code(Z._`${H.default.self}.opts.$comment(${D0}, ${O0}, ${R0}.schema)`)}}function v(m){let{gen:$0,schemaEnv:Y0,validateName:Z0,ValidationError:F0,opts:D0}=m;if(Y0.$async)$0.if(Z._`${H.default.errors} === 0`,()=>$0.return(H.default.data),()=>$0.throw(Z._`new ${F0}(${H.default.vErrors})`));else{if($0.assign(Z._`${Z0}.errors`,H.default.vErrors),D0.unevaluated)x(m);$0.return(Z._`${H.default.errors} === 0`)}}function x({gen:m,evaluated:$0,props:Y0,items:Z0}){if(Y0 instanceof Z.Name)m.assign(Z._`${$0}.props`,Y0);if(Z0 instanceof Z.Name)m.assign(Z._`${$0}.items`,Z0)}function y(m,$0,Y0,Z0){let{gen:F0,schema:D0,data:O0,allErrors:R0,opts:P0,self:f0}=m,{RULES:p0}=f0;if(D0.$ref&&(P0.ignoreKeywordsWithRef||!(0,V.schemaHasRulesButRef)(D0,p0))){F0.block(()=>X0(m,"$ref",p0.all.$ref.definition));return}if(!P0.jtd)u(m,$0);F0.block(()=>{for(let P1 of p0.rules)U4(P1);U4(p0.post)});function U4(P1){if(!(0,G.shouldUseGroup)(D0,P1))return;if(P1.type){if(F0.if((0,J.checkDataType)(P1.type,O0,P0.strictNumbers)),d(m,P1),$0.length===1&&$0[0]===P1.type&&Y0)F0.else(),(0,J.reportTypeError)(m);F0.endIf()}else d(m,P1);if(!R0)F0.if(Z._`${H.default.errors} === ${Z0||0}`)}}function d(m,$0){let{gen:Y0,schema:Z0,opts:{useDefaults:F0}}=m;if(F0)(0,Q.assignDefaults)(m,$0.type);Y0.block(()=>{for(let D0 of $0.rules)if((0,G.shouldUseRule)(Z0,D0))X0(m,D0.keyword,D0.definition,$0.type)})}function u(m,$0){if(m.schemaEnv.meta||!m.opts.strictTypes)return;if(b(m,$0),!m.opts.allowUnionTypes)g(m,$0);p(m,m.dataTypes)}function b(m,$0){if(!$0.length)return;if(!m.dataTypes.length){m.dataTypes=$0;return}$0.forEach((Y0)=>{if(!n(m.dataTypes,Y0))s(m,`type "${Y0}" not allowed by context "${m.dataTypes.join(",")}"`)}),t(m,$0)}function g(m,$0){if($0.length>1&&!($0.length===2&&$0.includes("null")))s(m,"use allowUnionTypes to allow union type keyword")}function p(m,$0){let Y0=m.self.RULES.all;for(let Z0 in Y0){let F0=Y0[Z0];if(typeof F0=="object"&&(0,G.shouldUseRule)(m.schema,F0)){let{type:D0}=F0.definition;if(D0.length&&!D0.some((O0)=>h($0,O0)))s(m,`missing type "${D0.join(",")}" for keyword "${Z0}"`)}}}function h(m,$0){return m.includes($0)||$0==="number"&&m.includes("integer")}function n(m,$0){return m.includes($0)||$0==="integer"&&m.includes("number")}function t(m,$0){let Y0=[];for(let Z0 of m.dataTypes)if(n($0,Z0))Y0.push(Z0);else if($0.includes("integer")&&Z0==="number")Y0.push("integer");m.dataTypes=Y0}function s(m,$0){let Y0=m.schemaEnv.baseId+m.errSchemaPath;$0+=` at "${Y0}" (strictTypes)`,(0,V.checkStrictMode)(m,$0,m.opts.strictTypes)}var K0=class{constructor(m,$0,Y0){if((0,W.validateKeywordUsage)(m,$0,Y0),this.gen=m.gen,this.allErrors=m.allErrors,this.keyword=Y0,this.data=m.data,this.schema=m.schema[Y0],this.$data=$0.$data&&m.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,V.schemaRefOrVal)(m,this.schema,Y0,this.$data),this.schemaType=$0.schemaType,this.parentSchema=m.schema,this.params={},this.it=m,this.def=$0,this.$data)this.schemaCode=m.gen.const("vSchema",e(this.$data,m));else if(this.schemaCode=this.schemaValue,!(0,W.validSchemaType)(this.schema,$0.schemaType,$0.allowUndefined))throw Error(`${Y0} value must be ${JSON.stringify($0.schemaType)}`);if("code"in $0?$0.trackErrors:$0.errors!==!1)this.errsCount=m.gen.const("_errs",H.default.errors)}result(m,$0,Y0){this.failResult((0,Z.not)(m),$0,Y0)}failResult(m,$0,Y0){if(this.gen.if(m),Y0)Y0();else this.error();if($0){if(this.gen.else(),$0(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(m,$0){this.failResult((0,Z.not)(m),void 0,$0)}fail(m){if(m===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(m),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(m){if(!this.$data)return this.fail(m);let{schemaCode:$0}=this;this.fail(Z._`${$0} !== undefined && (${(0,Z.or)(this.invalid$data(),m)})`)}error(m,$0,Y0){if($0){this.setParams($0),this._error(m,Y0),this.setParams({});return}this._error(m,Y0)}_error(m,$0){(m?F.reportExtraError:F.reportError)(this,this.def.error,$0)}$dataError(){(0,F.reportError)(this,this.def.$dataError||F.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,F.resetErrorsCount)(this.gen,this.errsCount)}ok(m){if(!this.allErrors)this.gen.if(m)}setParams(m,$0){if($0)Object.assign(this.params,m);else this.params=m}block$data(m,$0,Y0=Z.nil){this.gen.block(()=>{this.check$data(m,Y0),$0()})}check$data(m=Z.nil,$0=Z.nil){if(!this.$data)return;let{gen:Y0,schemaCode:Z0,schemaType:F0,def:D0}=this;if(Y0.if((0,Z.or)(Z._`${Z0} === undefined`,$0)),m!==Z.nil)Y0.assign(m,!0);if(F0.length||D0.validateSchema){if(Y0.elseIf(this.invalid$data()),this.$dataError(),m!==Z.nil)Y0.assign(m,!1)}Y0.else()}invalid$data(){let{gen:m,schemaCode:$0,schemaType:Y0,def:Z0,it:F0}=this;return(0,Z.or)(D0(),O0());function D0(){if(Y0.length){if(!($0 instanceof Z.Name))throw Error("ajv implementation error");let R0=Array.isArray(Y0)?Y0:[Y0];return Z._`${(0,J.checkDataTypes)(R0,$0,F0.opts.strictNumbers,J.DataType.Wrong)}`}return Z.nil}function O0(){if(Z0.validateSchema){let R0=m.scopeValue("validate$data",{ref:Z0.validateSchema});return Z._`!${R0}(${$0})`}return Z.nil}}subschema(m,$0){let Y0=(0,K.getSubschema)(this.it,m);(0,K.extendSubschemaData)(Y0,this.it,m),(0,K.extendSubschemaMode)(Y0,m);let Z0={...this.it,...Y0,items:void 0,props:void 0};return M(Z0,$0),Z0}mergeEvaluated(m,$0){let{it:Y0,gen:Z0}=this;if(!Y0.opts.unevaluated)return;if(Y0.props!==!0&&m.props!==void 0)Y0.props=V.mergeEvaluated.props(Z0,m.props,Y0.props,$0);if(Y0.items!==!0&&m.items!==void 0)Y0.items=V.mergeEvaluated.items(Z0,m.items,Y0.items,$0)}mergeValidEvaluated(m,$0){let{it:Y0,gen:Z0}=this;if(Y0.opts.unevaluated&&(Y0.props!==!0||Y0.items!==!0))return Z0.if($0,()=>this.mergeEvaluated(m,Z.Name)),!0}};$.KeywordCxt=K0;function X0(m,$0,Y0,Z0){let F0=new K0(m,Y0,$0);if("code"in Y0)Y0.code(F0,Z0);else if(F0.$data&&Y0.validate)(0,W.funcKeywordCode)(F0,Y0);else if("macro"in Y0)(0,W.macroKeywordCode)(F0,Y0);else if(Y0.compile||Y0.validate)(0,W.funcKeywordCode)(F0,Y0)}var a=/^\/(?:[^~]|~0|~1)*$/,Q0=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function e(m,{dataLevel:$0,dataNames:Y0,dataPathArr:Z0}){let F0,D0;if(m==="")return H.default.rootData;if(m[0]==="/"){if(!a.test(m))throw Error(`Invalid JSON-pointer: ${m}`);F0=m,D0=H.default.rootData}else{let f0=Q0.exec(m);if(!f0)throw Error(`Invalid JSON-pointer: ${m}`);let p0=+f0[1];if(F0=f0[2],F0==="#"){if(p0>=$0)throw Error(P0("property/index",p0));return Z0[$0-p0]}if(p0>$0)throw Error(P0("data",p0));if(D0=Y0[$0-p0],!F0)return D0}let O0=D0,R0=F0.split("/");for(let f0 of R0)if(f0)D0=Z._`${D0}${(0,Z.getProperty)((0,V.unescapeJsonPointer)(f0))}`,O0=Z._`${O0} && ${D0}`;return O0;function P0(f0,p0){return`Cannot access ${f0} ${p0} levels up, current level is ${$0}`}}$.getData=e}}),J40=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=class extends Error{constructor(X){super("validation failed");this.errors=X,this.ajv=this.validation=!0}};$.default=Y}}),Gf=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=G40(),X=class extends Error{constructor(G,J,Q,W){super(W||`can't resolve reference ${Q} from id ${J}`);this.missingRef=(0,Y.resolveUrl)(G,J,Q),this.missingSchema=(0,Y.normalizeId)((0,Y.getFullPath)(G,this.missingRef))}};$.default=X}}),Q40=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.resolveSchema=$.getCompilingSchema=$.resolveRef=$.compileSchema=$.SchemaEnv=void 0;var Y=v6(),X=J40(),G=BZ(),J=G40(),Q=V8(),W=Xf(),K=class{constructor(B){var O;this.refs={},this.dynamicAnchors={};let E;if(typeof B.schema=="object")E=B.schema;this.schema=B.schema,this.schemaId=B.schemaId,this.root=B.root||this,this.baseId=(O=B.baseId)!==null&&O!==void 0?O:(0,J.normalizeId)(E===null||E===void 0?void 0:E[B.schemaId||"$id"]),this.schemaPath=B.schemaPath,this.localRefs=B.localRefs,this.meta=B.meta,this.$async=E===null||E===void 0?void 0:E.$async,this.refs={}}};$.SchemaEnv=K;function Z(B){let O=V.call(this,B);if(O)return O;let E=(0,J.getFullPath)(this.opts.uriResolver,B.root.baseId),{es5:M,lines:R}=this.opts.code,{ownProperties:q}=this.opts,_=new Y.CodeGen(this.scope,{es5:M,lines:R,ownProperties:q}),P;if(B.$async)P=_.scopeValue("Error",{ref:X.default,code:Y._`require("ajv/dist/runtime/validation_error").default`});let w=_.scopeName("validate");B.validateName=w;let j={gen:_,allErrors:this.opts.allErrors,data:G.default.data,parentData:G.default.parentData,parentDataProperty:G.default.parentDataProperty,dataNames:[G.default.data],dataPathArr:[Y.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:_.scopeValue("schema",this.opts.code.source===!0?{ref:B.schema,code:(0,Y.stringify)(B.schema)}:{ref:B.schema}),validateName:w,ValidationError:P,schema:B.schema,schemaEnv:B,rootId:E,baseId:B.baseId||E,schemaPath:Y.nil,errSchemaPath:B.schemaPath||(this.opts.jtd?"":"#"),errorPath:Y._`""`,opts:this.opts,self:this},C;try{this._compilations.add(B),(0,W.validateFunctionCode)(j),_.optimize(this.opts.code.optimize);let k=_.toString();if(C=`${_.scopeRefs(G.default.scope)}return ${k}`,this.opts.code.process)C=this.opts.code.process(C,B);let I=Function(`${G.default.self}`,`${G.default.scope}`,C)(this,this.scope.get());if(this.scope.value(w,{ref:I}),I.errors=null,I.schema=B.schema,I.schemaEnv=B,B.$async)I.$async=!0;if(this.opts.code.source===!0)I.source={validateName:w,validateCode:k,scopeValues:_._values};if(this.opts.unevaluated){let{props:v,items:x}=j;if(I.evaluated={props:v instanceof Y.Name?void 0:v,items:x instanceof Y.Name?void 0:x,dynamicProps:v instanceof Y.Name,dynamicItems:x instanceof Y.Name},I.source)I.source.evaluated=(0,Y.stringify)(I.evaluated)}return B.validate=I,B}catch(k){if(delete B.validate,delete B.validateName,C)this.logger.error("Error compiling schema, function code:",C);throw k}finally{this._compilations.delete(B)}}$.compileSchema=Z;function H(B,O,E){var M;E=(0,J.resolveUrl)(this.opts.uriResolver,O,E);let R=B.refs[E];if(R)return R;let q=L.call(this,B,E);if(q===void 0){let _=(M=B.localRefs)===null||M===void 0?void 0:M[E],{schemaId:P}=this.opts;if(_)q=new K({schema:_,schemaId:P,root:B,baseId:O})}if(q===void 0)return;return B.refs[E]=z.call(this,q)}$.resolveRef=H;function z(B){if((0,J.inlineRef)(B.schema,this.opts.inlineRefs))return B.schema;return B.validate?B:Z.call(this,B)}function V(B){for(let O of this._compilations)if(F(O,B))return O}$.getCompilingSchema=V;function F(B,O){return B.schema===O.schema&&B.root===O.root&&B.baseId===O.baseId}function L(B,O){let E;while(typeof(E=this.refs[O])=="string")O=E;return E||this.schemas[O]||N.call(this,B,O)}function N(B,O){let E=this.opts.uriResolver.parse(O),M=(0,J._getFullPath)(this.opts.uriResolver,E),R=(0,J.getFullPath)(this.opts.uriResolver,B.baseId,void 0);if(Object.keys(B.schema).length>0&&M===R)return A.call(this,E,B);let q=(0,J.normalizeId)(M),_=this.refs[q]||this.schemas[q];if(typeof _=="string"){let P=N.call(this,B,_);if(typeof(P===null||P===void 0?void 0:P.schema)!=="object")return;return A.call(this,E,P)}if(typeof(_===null||_===void 0?void 0:_.schema)!=="object")return;if(!_.validate)Z.call(this,_);if(q===(0,J.normalizeId)(O)){let{schema:P}=_,{schemaId:w}=this.opts,j=P[w];if(j)R=(0,J.resolveUrl)(this.opts.uriResolver,R,j);return new K({schema:P,schemaId:w,root:B,baseId:R})}return A.call(this,E,_)}$.resolveSchema=N;var D=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function A(B,{baseId:O,schema:E,root:M}){var R;if(((R=B.fragment)===null||R===void 0?void 0:R[0])!=="/")return;for(let P of B.fragment.slice(1).split("/")){if(typeof E==="boolean")return;let w=E[(0,Q.unescapeFragment)(P)];if(w===void 0)return;E=w;let j=typeof E==="object"&&E[this.opts.schemaId];if(!D.has(P)&&j)O=(0,J.resolveUrl)(this.opts.uriResolver,O,j)}let q;if(typeof E!="boolean"&&E.$ref&&!(0,Q.schemaHasRulesButRef)(E,this.RULES)){let P=(0,J.resolveUrl)(this.opts.uriResolver,O,E.$ref);q=N.call(this,M,P)}let{schemaId:_}=this.opts;if(q=q||new K({schema:E,schemaId:_,root:M,baseId:O}),q.schema!==q.root.schema)return q;return}}}),Fz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.json"($,Y){Y.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}}),du1=q1({"../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js"($,Y){var X=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),G=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function J(N){let D="",A=0,B=0;for(B=0;B<N.length;B++){if(A=N[B].charCodeAt(0),A===48)continue;if(!(A>=48&&A<=57||A>=65&&A<=70||A>=97&&A<=102))return"";D+=N[B];break}for(B+=1;B<N.length;B++){if(A=N[B].charCodeAt(0),!(A>=48&&A<=57||A>=65&&A<=70||A>=97&&A<=102))return"";D+=N[B]}return D}var Q=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function W(N){return N.length=0,!0}function K(N,D,A){if(N.length){let B=J(N);if(B!=="")D.push(B);else return A.error=!0,!1;N.length=0}return!0}function Z(N){let D=0,A={error:!1,address:"",zone:""},B=[],O=[],E=!1,M=!1,R=K;for(let q=0;q<N.length;q++){let _=N[q];if(_==="["||_==="]")continue;if(_===":"){if(E===!0)M=!0;if(!R(O,B,A))break;if(++D>7){A.error=!0;break}if(q>0&&N[q-1]===":")E=!0;B.push(":");continue}else if(_==="%"){if(!R(O,B,A))break;R=W}else{O.push(_);continue}}if(O.length)if(R===W)A.zone=O.join("");else if(M)B.push(O.join(""));else B.push(J(O));return A.address=B.join(""),A}function H(N){if(z(N,":")<2)return{host:N,isIPV6:!1};let D=Z(N);if(!D.error){let{address:A,address:B}=D;if(D.zone)A+="%"+D.zone,B+="%25"+D.zone;return{host:A,isIPV6:!0,escapedHost:B}}else return{host:N,isIPV6:!1}}function z(N,D){let A=0;for(let B=0;B<N.length;B++)if(N[B]===D)A++;return A}function V(N){let D=N,A=[],B=-1,O=0;while(O=D.length){if(O===1)if(D===".")break;else if(D==="/"){A.push("/");break}else{A.push(D);break}else if(O===2){if(D[0]==="."){if(D[1]===".")break;else if(D[1]==="/"){D=D.slice(2);continue}}else if(D[0]==="/"){if(D[1]==="."||D[1]==="/"){A.push("/");break}}}else if(O===3){if(D==="/.."){if(A.length!==0)A.pop();A.push("/");break}}if(D[0]==="."){if(D[1]==="."){if(D[2]==="/"){D=D.slice(3);continue}}else if(D[1]==="/"){D=D.slice(2);continue}}else if(D[0]==="/"){if(D[1]==="."){if(D[2]==="/"){D=D.slice(2);continue}else if(D[2]==="."){if(D[3]==="/"){if(D=D.slice(3),A.length!==0)A.pop();continue}}}}if((B=D.indexOf("/",1))===-1){A.push(D);break}else A.push(D.slice(0,B)),D=D.slice(B)}return A.join("")}function F(N,D){let A=D!==!0?escape:unescape;if(N.scheme!==void 0)N.scheme=A(N.scheme);if(N.userinfo!==void 0)N.userinfo=A(N.userinfo);if(N.host!==void 0)N.host=A(N.host);if(N.path!==void 0)N.path=A(N.path);if(N.query!==void 0)N.query=A(N.query);if(N.fragment!==void 0)N.fragment=A(N.fragment);return N}function L(N){let D=[];if(N.userinfo!==void 0)D.push(N.userinfo),D.push("@");if(N.host!==void 0){let A=unescape(N.host);if(!G(A)){let B=H(A);if(B.isIPV6===!0)A=`[${B.escapedHost}]`;else A=N.host}D.push(A)}if(typeof N.port==="number"||typeof N.port==="string")D.push(":"),D.push(String(N.port));return D.length?D.join(""):void 0}Y.exports={nonSimpleDomain:Q,recomposeAuthority:L,normalizeComponentEncoding:F,removeDotSegments:V,isIPv4:G,isUUID:X,normalizeIPv6:H,stringArrayToHexStripped:J}}}),Lz8=q1({"../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js"($,Y){var{isUUID:X}=du1(),G=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,J=["http","https","ws","wss","urn","urn:uuid"];function Q(_){return J.indexOf(_)!==-1}function W(_){if(_.secure===!0)return!0;else if(_.secure===!1)return!1;else if(_.scheme)return _.scheme.length===3&&(_.scheme[0]==="w"||_.scheme[0]==="W")&&(_.scheme[1]==="s"||_.scheme[1]==="S")&&(_.scheme[2]==="s"||_.scheme[2]==="S");else return!1}function K(_){if(!_.host)_.error=_.error||"HTTP URIs must have a host.";return _}function Z(_){let P=String(_.scheme).toLowerCase()==="https";if(_.port===(P?443:80)||_.port==="")_.port=void 0;if(!_.path)_.path="/";return _}function H(_){return _.secure=W(_),_.resourceName=(_.path||"/")+(_.query?"?"+_.query:""),_.path=void 0,_.query=void 0,_}function z(_){if(_.port===(W(_)?443:80)||_.port==="")_.port=void 0;if(typeof _.secure==="boolean")_.scheme=_.secure?"wss":"ws",_.secure=void 0;if(_.resourceName){let[P,w]=_.resourceName.split("?");_.path=P&&P!=="/"?P:void 0,_.query=w,_.resourceName=void 0}return _.fragment=void 0,_}function V(_,P){if(!_.path)return _.error="URN can not be parsed",_;let w=_.path.match(G);if(w){let j=P.scheme||_.scheme||"urn";_.nid=w[1].toLowerCase(),_.nss=w[2];let C=`${j}:${P.nid||_.nid}`,k=q(C);if(_.path=void 0,k)_=k.parse(_,P)}else _.error=_.error||"URN can not be parsed.";return _}function F(_,P){if(_.nid===void 0)throw Error("URN without nid cannot be serialized");let w=P.scheme||_.scheme||"urn",j=_.nid.toLowerCase(),C=`${w}:${P.nid||j}`,k=q(C);if(k)_=k.serialize(_,P);let S=_,I=_.nss;return S.path=`${j||P.nid}:${I}`,P.skipEscape=!0,S}function L(_,P){let w=_;if(w.uuid=w.nss,w.nss=void 0,!P.tolerant&&(!w.uuid||!X(w.uuid)))w.error=w.error||"UUID is not valid.";return w}function N(_){let P=_;return P.nss=(_.uuid||"").toLowerCase(),P}var D={scheme:"http",domainHost:!0,parse:K,serialize:Z},A={scheme:"https",domainHost:D.domainHost,parse:K,serialize:Z},B={scheme:"ws",domainHost:!0,parse:H,serialize:z},O={scheme:"wss",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize},E={scheme:"urn",parse:V,serialize:F,skipNormalize:!0},M={scheme:"urn:uuid",parse:L,serialize:N,skipNormalize:!0},R={http:D,https:A,ws:B,wss:O,urn:E,"urn:uuid":M};Object.setPrototypeOf(R,null);function q(_){return _&&(R[_]||R[_.toLowerCase()])||void 0}Y.exports={wsIsSecure:W,SCHEMES:R,isValidSchemeName:Q,getSchemeHandler:q}}}),Dz8=q1({"../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js"($,Y){var{normalizeIPv6:X,removeDotSegments:G,recomposeAuthority:J,normalizeComponentEncoding:Q,isIPv4:W,nonSimpleDomain:K}=du1(),{SCHEMES:Z,getSchemeHandler:H}=Lz8();function z(O,E){if(typeof O==="string")O=N(A(O,E),E);else if(typeof O==="object")O=A(N(O,E),E);return O}function V(O,E,M){let R=M?Object.assign({scheme:"null"},M):{scheme:"null"},q=F(A(O,R),A(E,R),R,!0);return R.skipEscape=!0,N(q,R)}function F(O,E,M,R){let q={};if(!R)O=A(N(O,M),M),E=A(N(E,M),M);if(M=M||{},!M.tolerant&&E.scheme)q.scheme=E.scheme,q.userinfo=E.userinfo,q.host=E.host,q.port=E.port,q.path=G(E.path||""),q.query=E.query;else{if(E.userinfo!==void 0||E.host!==void 0||E.port!==void 0)q.userinfo=E.userinfo,q.host=E.host,q.port=E.port,q.path=G(E.path||""),q.query=E.query;else{if(!E.path)if(q.path=O.path,E.query!==void 0)q.query=E.query;else q.query=O.query;else{if(E.path[0]==="/")q.path=G(E.path);else{if((O.userinfo!==void 0||O.host!==void 0||O.port!==void 0)&&!O.path)q.path="/"+E.path;else if(!O.path)q.path=E.path;else q.path=O.path.slice(0,O.path.lastIndexOf("/")+1)+E.path;q.path=G(q.path)}q.query=E.query}q.userinfo=O.userinfo,q.host=O.host,q.port=O.port}q.scheme=O.scheme}return q.fragment=E.fragment,q}function L(O,E,M){if(typeof O==="string")O=unescape(O),O=N(Q(A(O,M),!0),{...M,skipEscape:!0});else if(typeof O==="object")O=N(Q(O,!0),{...M,skipEscape:!0});if(typeof E==="string")E=unescape(E),E=N(Q(A(E,M),!0),{...M,skipEscape:!0});else if(typeof E==="object")E=N(Q(E,!0),{...M,skipEscape:!0});return O.toLowerCase()===E.toLowerCase()}function N(O,E){let M={host:O.host,scheme:O.scheme,userinfo:O.userinfo,port:O.port,path:O.path,query:O.query,nid:O.nid,nss:O.nss,uuid:O.uuid,fragment:O.fragment,reference:O.reference,resourceName:O.resourceName,secure:O.secure,error:""},R=Object.assign({},E),q=[],_=H(R.scheme||M.scheme);if(_&&_.serialize)_.serialize(M,R);if(M.path!==void 0)if(!R.skipEscape){if(M.path=escape(M.path),M.scheme!==void 0)M.path=M.path.split("%3A").join(":")}else M.path=unescape(M.path);if(R.reference!=="suffix"&&M.scheme)q.push(M.scheme,":");let P=J(M);if(P!==void 0){if(R.reference!=="suffix")q.push("//");if(q.push(P),M.path&&M.path[0]!=="/")q.push("/")}if(M.path!==void 0){let w=M.path;if(!R.absolutePath&&(!_||!_.absolutePath))w=G(w);if(P===void 0&&w[0]==="/"&&w[1]==="/")w="/%2F"+w.slice(2);q.push(w)}if(M.query!==void 0)q.push("?",M.query);if(M.fragment!==void 0)q.push("#",M.fragment);return q.join("")}var D=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function A(O,E){let M=Object.assign({},E),R={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},q=!1;if(M.reference==="suffix")if(M.scheme)O=M.scheme+":"+O;else O="//"+O;let _=O.match(D);if(_){if(R.scheme=_[1],R.userinfo=_[3],R.host=_[4],R.port=parseInt(_[5],10),R.path=_[6]||"",R.query=_[7],R.fragment=_[8],isNaN(R.port))R.port=_[5];if(R.host)if(W(R.host)===!1){let j=X(R.host);R.host=j.host.toLowerCase(),q=j.isIPV6}else q=!0;if(R.scheme===void 0&&R.userinfo===void 0&&R.host===void 0&&R.port===void 0&&R.query===void 0&&!R.path)R.reference="same-document";else if(R.scheme===void 0)R.reference="relative";else if(R.fragment===void 0)R.reference="absolute";else R.reference="uri";if(M.reference&&M.reference!=="suffix"&&M.reference!==R.reference)R.error=R.error||"URI is not a "+M.reference+" reference.";let P=H(M.scheme||R.scheme);if(!M.unicodeSupport&&(!P||!P.unicodeSupport)){if(R.host&&(M.domainHost||P&&P.domainHost)&&q===!1&&K(R.host))try{R.host=URL.domainToASCII(R.host.toLowerCase())}catch(w){R.error=R.error||"Host's domain name can not be converted to ASCII: "+w}}if(!P||P&&!P.skipNormalize){if(O.indexOf("%")!==-1){if(R.scheme!==void 0)R.scheme=unescape(R.scheme);if(R.host!==void 0)R.host=unescape(R.host)}if(R.path)R.path=escape(unescape(R.path));if(R.fragment)R.fragment=encodeURI(decodeURIComponent(R.fragment))}if(P&&P.parse)P.parse(R,M)}else R.error=R.error||"URI can not be parsed.";return R}var B={SCHEMES:Z,normalize:z,resolve:V,resolveComponent:F,equal:L,serialize:N,parse:A};Y.exports=B,Y.exports.default=B,Y.exports.fastUri=B}}),Nz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=Dz8();Y.code='require("ajv/dist/runtime/uri").default',$.default=Y}}),cu1=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.CodeGen=$.Name=$.nil=$.stringify=$.str=$._=$.KeywordCxt=void 0;var Y=Xf();Object.defineProperty($,"KeywordCxt",{enumerable:!0,get:function(){return Y.KeywordCxt}});var X=v6();Object.defineProperty($,"_",{enumerable:!0,get:function(){return X._}}),Object.defineProperty($,"str",{enumerable:!0,get:function(){return X.str}}),Object.defineProperty($,"stringify",{enumerable:!0,get:function(){return X.stringify}}),Object.defineProperty($,"nil",{enumerable:!0,get:function(){return X.nil}}),Object.defineProperty($,"Name",{enumerable:!0,get:function(){return X.Name}}),Object.defineProperty($,"CodeGen",{enumerable:!0,get:function(){return X.CodeGen}});var G=J40(),J=Gf(),Q=mu1(),W=Q40(),K=v6(),Z=G40(),H=Y40(),z=V8(),V=Fz8(),F=Nz8(),L=(b,g)=>new RegExp(b,g);L.code="new RegExp";var N=["removeAdditional","useDefaults","coerceTypes"],D=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),A={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},B={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},O=200;function E(b){var g,p,h,n,t,s,K0,X0,a,Q0,e,m,$0,Y0,Z0,F0,D0,O0,R0,P0,f0,p0,U4,P1,d1;let C0=b.strict,n0=(g=b.code)===null||g===void 0?void 0:g.optimize,J0=n0===!0||n0===void 0?1:n0||0,B0=(h=(p=b.code)===null||p===void 0?void 0:p.regExp)!==null&&h!==void 0?h:L,Y1=(n=b.uriResolver)!==null&&n!==void 0?n:F.default;return{strictSchema:(s=(t=b.strictSchema)!==null&&t!==void 0?t:C0)!==null&&s!==void 0?s:!0,strictNumbers:(X0=(K0=b.strictNumbers)!==null&&K0!==void 0?K0:C0)!==null&&X0!==void 0?X0:!0,strictTypes:(Q0=(a=b.strictTypes)!==null&&a!==void 0?a:C0)!==null&&Q0!==void 0?Q0:"log",strictTuples:(m=(e=b.strictTuples)!==null&&e!==void 0?e:C0)!==null&&m!==void 0?m:"log",strictRequired:(Y0=($0=b.strictRequired)!==null&&$0!==void 0?$0:C0)!==null&&Y0!==void 0?Y0:!1,code:b.code?{...b.code,optimize:J0,regExp:B0}:{optimize:J0,regExp:B0},loopRequired:(Z0=b.loopRequired)!==null&&Z0!==void 0?Z0:O,loopEnum:(F0=b.loopEnum)!==null&&F0!==void 0?F0:O,meta:(D0=b.meta)!==null&&D0!==void 0?D0:!0,messages:(O0=b.messages)!==null&&O0!==void 0?O0:!0,inlineRefs:(R0=b.inlineRefs)!==null&&R0!==void 0?R0:!0,schemaId:(P0=b.schemaId)!==null&&P0!==void 0?P0:"$id",addUsedSchema:(f0=b.addUsedSchema)!==null&&f0!==void 0?f0:!0,validateSchema:(p0=b.validateSchema)!==null&&p0!==void 0?p0:!0,validateFormats:(U4=b.validateFormats)!==null&&U4!==void 0?U4:!0,unicodeRegExp:(P1=b.unicodeRegExp)!==null&&P1!==void 0?P1:!0,int32range:(d1=b.int32range)!==null&&d1!==void 0?d1:!0,uriResolver:Y1}}var M=class{constructor(b={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,b=this.opts={...b,...E(b)};let{es5:g,lines:p}=this.opts.code;this.scope=new K.ValueScope({scope:{},prefixes:D,es5:g,lines:p}),this.logger=k(b.logger);let h=b.validateFormats;if(b.validateFormats=!1,this.RULES=(0,Q.getRules)(),R.call(this,A,b,"NOT SUPPORTED"),R.call(this,B,b,"DEPRECATED","warn"),this._metaOpts=j.call(this),b.formats)P.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),b.keywords)w.call(this,b.keywords);if(typeof b.meta=="object")this.addMetaSchema(b.meta);_.call(this),b.validateFormats=h}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:b,meta:g,schemaId:p}=this.opts,h=V;if(p==="id")h={...V},h.id=h.$id,delete h.$id;if(g&&b)this.addMetaSchema(h,h[p],!1)}defaultMeta(){let{meta:b,schemaId:g}=this.opts;return this.opts.defaultMeta=typeof b=="object"?b[g]||b:void 0}validate(b,g){let p;if(typeof b=="string"){if(p=this.getSchema(b),!p)throw Error(`no schema with key or ref "${b}"`)}else p=this.compile(b);let h=p(g);if(!("$async"in p))this.errors=p.errors;return h}compile(b,g){let p=this._addSchema(b,g);return p.validate||this._compileSchemaEnv(p)}compileAsync(b,g){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:p}=this.opts;return h.call(this,b,g);async function h(a,Q0){await n.call(this,a.$schema);let e=this._addSchema(a,Q0);return e.validate||t.call(this,e)}async function n(a){if(a&&!this.getSchema(a))await h.call(this,{$ref:a},!0)}async function t(a){try{return this._compileSchemaEnv(a)}catch(Q0){if(!(Q0 instanceof J.default))throw Q0;return s.call(this,Q0),await K0.call(this,Q0.missingSchema),t.call(this,a)}}function s({missingSchema:a,missingRef:Q0}){if(this.refs[a])throw Error(`AnySchema ${a} is loaded but ${Q0} cannot be resolved`)}async function K0(a){let Q0=await X0.call(this,a);if(!this.refs[a])await n.call(this,Q0.$schema);if(!this.refs[a])this.addSchema(Q0,a,g)}async function X0(a){let Q0=this._loading[a];if(Q0)return Q0;try{return await(this._loading[a]=p(a))}finally{delete this._loading[a]}}}addSchema(b,g,p,h=this.opts.validateSchema){if(Array.isArray(b)){for(let t of b)this.addSchema(t,void 0,p,h);return this}let n;if(typeof b==="object"){let{schemaId:t}=this.opts;if(n=b[t],n!==void 0&&typeof n!="string")throw Error(`schema ${t} must be string`)}return g=(0,Z.normalizeId)(g||n),this._checkUnique(g),this.schemas[g]=this._addSchema(b,p,g,h,!0),this}addMetaSchema(b,g,p=this.opts.validateSchema){return this.addSchema(b,g,!0,p),this}validateSchema(b,g){if(typeof b=="boolean")return!0;let p;if(p=b.$schema,p!==void 0&&typeof p!="string")throw Error("$schema must be a string");if(p=p||this.opts.defaultMeta||this.defaultMeta(),!p)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let h=this.validate(p,b);if(!h&&g){let n="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(n);else throw Error(n)}return h}getSchema(b){let g;while(typeof(g=q.call(this,b))=="string")b=g;if(g===void 0){let{schemaId:p}=this.opts,h=new W.SchemaEnv({schema:{},schemaId:p});if(g=W.resolveSchema.call(this,h,b),!g)return;this.refs[b]=g}return g.validate||this._compileSchemaEnv(g)}removeSchema(b){if(b instanceof RegExp)return this._removeAllSchemas(this.schemas,b),this._removeAllSchemas(this.refs,b),this;switch(typeof b){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let g=q.call(this,b);if(typeof g=="object")this._cache.delete(g.schema);return delete this.schemas[b],delete this.refs[b],this}case"object":{let g=b;this._cache.delete(g);let p=b[this.opts.schemaId];if(p)p=(0,Z.normalizeId)(p),delete this.schemas[p],delete this.refs[p];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(b){for(let g of b)this.addKeyword(g);return this}addKeyword(b,g){let p;if(typeof b=="string"){if(p=b,typeof g=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),g.keyword=p}else if(typeof b=="object"&&g===void 0){if(g=b,p=g.keyword,Array.isArray(p)&&!p.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(I.call(this,p,g),!g)return(0,z.eachItem)(p,(n)=>v.call(this,n)),this;y.call(this,g);let h={...g,type:(0,H.getJSONTypes)(g.type),schemaType:(0,H.getJSONTypes)(g.schemaType)};return(0,z.eachItem)(p,h.type.length===0?(n)=>v.call(this,n,h):(n)=>h.type.forEach((t)=>v.call(this,n,h,t))),this}getKeyword(b){let g=this.RULES.all[b];return typeof g=="object"?g.definition:!!g}removeKeyword(b){let{RULES:g}=this;delete g.keywords[b],delete g.all[b];for(let p of g.rules){let h=p.rules.findIndex((n)=>n.keyword===b);if(h>=0)p.rules.splice(h,1)}return this}addFormat(b,g){if(typeof g=="string")g=new RegExp(g);return this.formats[b]=g,this}errorsText(b=this.errors,{separator:g=", ",dataVar:p="data"}={}){if(!b||b.length===0)return"No errors";return b.map((h)=>`${p}${h.instancePath} ${h.message}`).reduce((h,n)=>h+g+n)}$dataMetaSchema(b,g){let p=this.RULES.all;b=JSON.parse(JSON.stringify(b));for(let h of g){let n=h.split("/").slice(1),t=b;for(let s of n)t=t[s];for(let s in p){let K0=p[s];if(typeof K0!="object")continue;let{$data:X0}=K0.definition,a=t[s];if(X0&&a)t[s]=u(a)}}return b}_removeAllSchemas(b,g){for(let p in b){let h=b[p];if(!g||g.test(p)){if(typeof h=="string")delete b[p];else if(h&&!h.meta)this._cache.delete(h.schema),delete b[p]}}}_addSchema(b,g,p,h=this.opts.validateSchema,n=this.opts.addUsedSchema){let t,{schemaId:s}=this.opts;if(typeof b=="object")t=b[s];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof b!="boolean")throw Error("schema must be object or boolean");let K0=this._cache.get(b);if(K0!==void 0)return K0;p=(0,Z.normalizeId)(t||p);let X0=Z.getSchemaRefs.call(this,b,p);if(K0=new W.SchemaEnv({schema:b,schemaId:s,meta:g,baseId:p,localRefs:X0}),this._cache.set(K0.schema,K0),n&&!p.startsWith("#")){if(p)this._checkUnique(p);this.refs[p]=K0}if(h)this.validateSchema(b,!0);return K0}_checkUnique(b){if(this.schemas[b]||this.refs[b])throw Error(`schema with key or id "${b}" already exists`)}_compileSchemaEnv(b){if(b.meta)this._compileMetaSchema(b);else W.compileSchema.call(this,b);if(!b.validate)throw Error("ajv implementation error");return b.validate}_compileMetaSchema(b){let g=this.opts;this.opts=this._metaOpts;try{W.compileSchema.call(this,b)}finally{this.opts=g}}};M.ValidationError=G.default,M.MissingRefError=J.default,$.default=M;function R(b,g,p,h="error"){for(let n in b){let t=n;if(t in g)this.logger[h](`${p}: option ${n}. ${b[t]}`)}}function q(b){return b=(0,Z.normalizeId)(b),this.schemas[b]||this.refs[b]}function _(){let b=this.opts.schemas;if(!b)return;if(Array.isArray(b))this.addSchema(b);else for(let g in b)this.addSchema(b[g],g)}function P(){for(let b in this.opts.formats){let g=this.opts.formats[b];if(g)this.addFormat(b,g)}}function w(b){if(Array.isArray(b)){this.addVocabulary(b);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let g in b){let p=b[g];if(!p.keyword)p.keyword=g;this.addKeyword(p)}}function j(){let b={...this.opts};for(let g of N)delete b[g];return b}var C={log(){},warn(){},error(){}};function k(b){if(b===!1)return C;if(b===void 0)return console;if(b.log&&b.warn&&b.error)return b;throw Error("logger must implement log, warn and error methods")}var S=/^[a-z_$][a-z0-9_$:-]*$/i;function I(b,g){let{RULES:p}=this;if((0,z.eachItem)(b,(h)=>{if(p.keywords[h])throw Error(`Keyword ${h} is already defined`);if(!S.test(h))throw Error(`Keyword ${h} has invalid name`)}),!g)return;if(g.$data&&!(("code"in g)||("validate"in g)))throw Error('$data keyword must have "code" or "validate" function')}function v(b,g,p){var h;let n=g===null||g===void 0?void 0:g.post;if(p&&n)throw Error('keyword with "post" flag cannot have "type"');let{RULES:t}=this,s=n?t.post:t.rules.find(({type:X0})=>X0===p);if(!s)s={type:p,rules:[]},t.rules.push(s);if(t.keywords[b]=!0,!g)return;let K0={keyword:b,definition:{...g,type:(0,H.getJSONTypes)(g.type),schemaType:(0,H.getJSONTypes)(g.schemaType)}};if(g.before)x.call(this,s,K0,g.before);else s.rules.push(K0);t.all[b]=K0,(h=g.implements)===null||h===void 0||h.forEach((X0)=>this.addKeyword(X0))}function x(b,g,p){let h=b.rules.findIndex((n)=>n.keyword===p);if(h>=0)b.rules.splice(h,0,g);else b.rules.push(g),this.logger.warn(`rule ${p} is not defined`)}function y(b){let{metaSchema:g}=b;if(g===void 0)return;if(b.$data&&this.opts.$data)g=u(g);b.validateSchema=this.compile(g,!0)}var d={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function u(b){return{anyOf:[b,d]}}}}),Az8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};$.default=Y}}),qI0=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.callRef=$.getValidate=void 0;var Y=Gf(),X=OZ(),G=v6(),J=BZ(),Q=Q40(),W=V8(),K={keyword:"$ref",schemaType:"string",code(z){let{gen:V,schema:F,it:L}=z,{baseId:N,schemaEnv:D,validateName:A,opts:B,self:O}=L,{root:E}=D;if((F==="#"||F==="#/")&&N===E.baseId)return R();let M=Q.resolveRef.call(O,E,N,F);if(M===void 0)throw new Y.default(L.opts.uriResolver,N,F);if(M instanceof Q.SchemaEnv)return q(M);return _(M);function R(){if(D===E)return H(z,A,D,D.$async);let P=V.scopeValue("root",{ref:E});return H(z,G._`${P}.validate`,E,E.$async)}function q(P){let w=Z(z,P);H(z,w,P,P.$async)}function _(P){let w=V.scopeValue("schema",B.code.source===!0?{ref:P,code:(0,G.stringify)(P)}:{ref:P}),j=V.name("valid"),C=z.subschema({schema:P,dataTypes:[],schemaPath:G.nil,topSchemaRef:w,errSchemaPath:F},j);z.mergeEvaluated(C),z.ok(j)}}};function Z(z,V){let{gen:F}=z;return V.validate?F.scopeValue("validate",{ref:V.validate}):G._`${F.scopeValue("wrapper",{ref:V})}.validate`}$.getValidate=Z;function H(z,V,F,L){let{gen:N,it:D}=z,{allErrors:A,schemaEnv:B,opts:O}=D,E=O.passContext?J.default.this:G.nil;if(L)M();else R();function M(){if(!B.$async)throw Error("async schema referenced by sync schema");let P=N.let("valid");N.try(()=>{if(N.code(G._`await ${(0,X.callValidateCode)(z,V,E)}`),_(V),!A)N.assign(P,!0)},(w)=>{if(N.if(G._`!(${w} instanceof ${D.ValidationError})`,()=>N.throw(w)),q(w),!A)N.assign(P,!1)}),z.ok(P)}function R(){z.result((0,X.callValidateCode)(z,V,E),()=>_(V),()=>q(V))}function q(P){let w=G._`${P}.errors`;N.assign(J.default.vErrors,G._`${J.default.vErrors} === null ? ${w} : ${J.default.vErrors}.concat(${w})`),N.assign(J.default.errors,G._`${J.default.vErrors}.length`)}function _(P){var w;if(!D.opts.unevaluated)return;let j=(w=F===null||F===void 0?void 0:F.validate)===null||w===void 0?void 0:w.evaluated;if(D.props!==!0)if(j&&!j.dynamicProps){if(j.props!==void 0)D.props=W.mergeEvaluated.props(N,j.props,D.props)}else{let C=N.var("props",G._`${P}.evaluated.props`);D.props=W.mergeEvaluated.props(N,C,D.props,G.Name)}if(D.items!==!0)if(j&&!j.dynamicItems){if(j.items!==void 0)D.items=W.mergeEvaluated.items(N,j.items,D.items)}else{let C=N.var("items",G._`${P}.evaluated.items`);D.items=W.mergeEvaluated.items(N,C,D.items,G.Name)}}}$.callRef=H,$.default=K}}),lu1=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=Az8(),X=qI0(),G=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Y.default,X.default];$.default=G}}),Bz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=Y.operators,G={maximum:{okStr:"<=",ok:X.LTE,fail:X.GT},minimum:{okStr:">=",ok:X.GTE,fail:X.LT},exclusiveMaximum:{okStr:"<",ok:X.LT,fail:X.GTE},exclusiveMinimum:{okStr:">",ok:X.GT,fail:X.LTE}},J={message:({keyword:W,schemaCode:K})=>Y.str`must be ${G[W].okStr} ${K}`,params:({keyword:W,schemaCode:K})=>Y._`{comparison: ${G[W].okStr}, limit: ${K}}`},Q={keyword:Object.keys(G),type:"number",schemaType:"number",$data:!0,error:J,code(W){let{keyword:K,data:Z,schemaCode:H}=W;W.fail$data(Y._`${Z} ${G[K].fail} ${H} || isNaN(${Z})`)}};$.default=Q}}),Oz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X={message:({schemaCode:J})=>Y.str`must be multiple of ${J}`,params:({schemaCode:J})=>Y._`{multipleOf: ${J}}`},G={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:X,code(J){let{gen:Q,data:W,schemaCode:K,it:Z}=J,H=Z.opts.multipleOfPrecision,z=Q.let("res"),V=H?Y._`Math.abs(Math.round(${z}) - ${z}) > 1e-${H}`:Y._`${z} !== parseInt(${z})`;J.fail$data(Y._`(${K} === 0 || (${z} = ${W}/${K}, ${V}))`)}};$.default=G}}),Ez8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js"($){Object.defineProperty($,"__esModule",{value:!0});function Y(X){let G=X.length,J=0,Q=0,W;while(Q<G)if(J++,W=X.charCodeAt(Q++),W>=55296&&W<=56319&&Q<G){if(W=X.charCodeAt(Q),(W&64512)===56320)Q++}return J}$.default=Y,Y.code='require("ajv/dist/runtime/ucs2length").default'}}),Mz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G=Ez8(),J={message({keyword:W,schemaCode:K}){let Z=W==="maxLength"?"more":"fewer";return Y.str`must NOT have ${Z} than ${K} characters`},params:({schemaCode:W})=>Y._`{limit: ${W}}`},Q={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:J,code(W){let{keyword:K,data:Z,schemaCode:H,it:z}=W,V=K==="maxLength"?Y.operators.GT:Y.operators.LT,F=z.opts.unicode===!1?Y._`${Z}.length`:Y._`${(0,X.useFunc)(W.gen,G.default)}(${Z})`;W.fail$data(Y._`${F} ${V} ${H}`)}};$.default=Q}}),Rz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=OZ(),X=V8(),G=v6(),J={message:({schemaCode:W})=>G.str`must match pattern "${W}"`,params:({schemaCode:W})=>G._`{pattern: ${W}}`},Q={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:J,code(W){let{gen:K,data:Z,$data:H,schema:z,schemaCode:V,it:F}=W,L=F.opts.unicodeRegExp?"u":"";if(H){let{regExp:N}=F.opts.code,D=N.code==="new RegExp"?G._`new RegExp`:(0,X.useFunc)(K,N),A=K.let("valid");K.try(()=>K.assign(A,G._`${D}(${V}, ${L}).test(${Z})`),()=>K.assign(A,!1)),W.fail$data(G._`!${A}`)}else{let N=(0,Y.usePattern)(W,z);W.fail$data(G._`!${N}.test(${Z})`)}}};$.default=Q}}),qz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X={message({keyword:J,schemaCode:Q}){let W=J==="maxProperties"?"more":"fewer";return Y.str`must NOT have ${W} than ${Q} properties`},params:({schemaCode:J})=>Y._`{limit: ${J}}`},G={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:X,code(J){let{keyword:Q,data:W,schemaCode:K}=J,Z=Q==="maxProperties"?Y.operators.GT:Y.operators.LT;J.fail$data(Y._`Object.keys(${W}).length ${Z} ${K}`)}};$.default=G}}),Pz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=OZ(),X=v6(),G=V8(),J={message:({params:{missingProperty:W}})=>X.str`must have required property '${W}'`,params:({params:{missingProperty:W}})=>X._`{missingProperty: ${W}}`},Q={keyword:"required",type:"object",schemaType:"array",$data:!0,error:J,code(W){let{gen:K,schema:Z,schemaCode:H,data:z,$data:V,it:F}=W,{opts:L}=F;if(!V&&Z.length===0)return;let N=Z.length>=L.loopRequired;if(F.allErrors)D();else A();if(L.strictRequired){let E=W.parentSchema.properties,{definedProperties:M}=W.it;for(let R of Z)if((E===null||E===void 0?void 0:E[R])===void 0&&!M.has(R)){let q=F.schemaEnv.baseId+F.errSchemaPath,_=`required property "${R}" is not defined at "${q}" (strictRequired)`;(0,G.checkStrictMode)(F,_,F.opts.strictRequired)}}function D(){if(N||V)W.block$data(X.nil,B);else for(let E of Z)(0,Y.checkReportMissingProp)(W,E)}function A(){let E=K.let("missing");if(N||V){let M=K.let("valid",!0);W.block$data(M,()=>O(E,M)),W.ok(M)}else K.if((0,Y.checkMissingProp)(W,Z,E)),(0,Y.reportMissingProp)(W,E),K.else()}function B(){K.forOf("prop",H,(E)=>{W.setParams({missingProperty:E}),K.if((0,Y.noPropertyInData)(K,z,E,L.ownProperties),()=>W.error())})}function O(E,M){W.setParams({missingProperty:E}),K.forOf(E,H,()=>{K.assign(M,(0,Y.propertyInData)(K,z,E,L.ownProperties)),K.if((0,X.not)(M),()=>{W.error(),K.break()})},X.nil)}}};$.default=Q}}),wz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X={message({keyword:J,schemaCode:Q}){let W=J==="maxItems"?"more":"fewer";return Y.str`must NOT have ${W} than ${Q} items`},params:({schemaCode:J})=>Y._`{limit: ${J}}`},G={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:X,code(J){let{keyword:Q,data:W,schemaCode:K}=J,Z=Q==="maxItems"?Y.operators.GT:Y.operators.LT;J.fail$data(Y._`${W}.length ${Z} ${K}`)}};$.default=G}}),PI0=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=pu1();Y.code='require("ajv/dist/runtime/equal").default',$.default=Y}}),_z8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=Y40(),X=v6(),G=V8(),J=PI0(),Q={message:({params:{i:K,j:Z}})=>X.str`must NOT have duplicate items (items ## ${Z} and ${K} are identical)`,params:({params:{i:K,j:Z}})=>X._`{i: ${K}, j: ${Z}}`},W={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Q,code(K){let{gen:Z,data:H,$data:z,schema:V,parentSchema:F,schemaCode:L,it:N}=K;if(!z&&!V)return;let D=Z.let("valid"),A=F.items?(0,Y.getSchemaTypes)(F.items):[];K.block$data(D,B,X._`${L} === false`),K.ok(D);function B(){let R=Z.let("i",X._`${H}.length`),q=Z.let("j");K.setParams({i:R,j:q}),Z.assign(D,!0),Z.if(X._`${R} > 1`,()=>(O()?E:M)(R,q))}function O(){return A.length>0&&!A.some((R)=>R==="object"||R==="array")}function E(R,q){let _=Z.name("item"),P=(0,Y.checkDataTypes)(A,_,N.opts.strictNumbers,Y.DataType.Wrong),w=Z.const("indices",X._`{}`);Z.for(X._`;${R}--;`,()=>{if(Z.let(_,X._`${H}[${R}]`),Z.if(P,X._`continue`),A.length>1)Z.if(X._`typeof ${_} == "string"`,X._`${_} += "_"`);Z.if(X._`typeof ${w}[${_}] == "number"`,()=>{Z.assign(q,X._`${w}[${_}]`),K.error(),Z.assign(D,!1).break()}).code(X._`${w}[${_}] = ${R}`)})}function M(R,q){let _=(0,G.useFunc)(Z,J.default),P=Z.name("outer");Z.label(P).for(X._`;${R}--;`,()=>Z.for(X._`${q} = ${R}; ${q}--;`,()=>Z.if(X._`${_}(${H}[${R}], ${H}[${q}])`,()=>{K.error(),Z.assign(D,!1).break(P)})))}}};$.default=W}}),jz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G=PI0(),J={message:"must be equal to constant",params:({schemaCode:W})=>Y._`{allowedValue: ${W}}`},Q={keyword:"const",$data:!0,error:J,code(W){let{gen:K,data:Z,$data:H,schemaCode:z,schema:V}=W;if(H||V&&typeof V=="object")W.fail$data(Y._`!${(0,X.useFunc)(K,G.default)}(${Z}, ${z})`);else W.fail(Y._`${V} !== ${Z}`)}};$.default=Q}}),Tz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G=PI0(),J={message:"must be equal to one of the allowed values",params:({schemaCode:W})=>Y._`{allowedValues: ${W}}`},Q={keyword:"enum",schemaType:"array",$data:!0,error:J,code(W){let{gen:K,data:Z,$data:H,schema:z,schemaCode:V,it:F}=W;if(!H&&z.length===0)throw Error("enum must have non-empty array");let L=z.length>=F.opts.loopEnum,N,D=()=>N!==null&&N!==void 0?N:N=(0,X.useFunc)(K,G.default),A;if(L||H)A=K.let("valid"),W.block$data(A,B);else{if(!Array.isArray(z))throw Error("ajv implementation error");let E=K.const("vSchema",V);A=(0,Y.or)(...z.map((M,R)=>O(E,R)))}W.pass(A);function B(){K.assign(A,!1),K.forOf("v",V,(E)=>K.if(Y._`${D()}(${Z}, ${E})`,()=>K.assign(A,!0).break()))}function O(E,M){let R=z[M];return typeof R==="object"&&R!==null?Y._`${D()}(${Z}, ${E}[${M}])`:Y._`${Z} === ${R}`}}};$.default=Q}}),iu1=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=Bz8(),X=Oz8(),G=Mz8(),J=Rz8(),Q=qz8(),W=Pz8(),K=wz8(),Z=_z8(),H=jz8(),z=Tz8(),V=[Y.default,X.default,G.default,J.default,Q.default,W.default,K.default,Z.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},H.default,z.default];$.default=V}}),nu1=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.validateAdditionalItems=void 0;var Y=v6(),X=V8(),G={message:({params:{len:W}})=>Y.str`must NOT have more than ${W} items`,params:({params:{len:W}})=>Y._`{limit: ${W}}`},J={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:G,code(W){let{parentSchema:K,it:Z}=W,{items:H}=K;if(!Array.isArray(H)){(0,X.checkStrictMode)(Z,'"additionalItems" is ignored when "items" is not an array of schemas');return}Q(W,H)}};function Q(W,K){let{gen:Z,schema:H,data:z,keyword:V,it:F}=W;F.items=!0;let L=Z.const("len",Y._`${z}.length`);if(H===!1)W.setParams({len:K.length}),W.pass(Y._`${L} <= ${K.length}`);else if(typeof H=="object"&&!(0,X.alwaysValidSchema)(F,H)){let D=Z.var("valid",Y._`${L} <= ${K.length}`);Z.if((0,Y.not)(D),()=>N(D)),W.ok(D)}function N(D){Z.forRange("i",K.length,L,(A)=>{if(W.subschema({keyword:V,dataProp:A,dataPropType:X.Type.Num},D),!F.allErrors)Z.if((0,Y.not)(D),()=>Z.break())})}}$.validateAdditionalItems=Q,$.default=J}}),ru1=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.validateTuple=void 0;var Y=v6(),X=V8(),G=OZ(),J={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(W){let{schema:K,it:Z}=W;if(Array.isArray(K))return Q(W,"additionalItems",K);if(Z.items=!0,(0,X.alwaysValidSchema)(Z,K))return;W.ok((0,G.validateArray)(W))}};function Q(W,K,Z=W.schema){let{gen:H,parentSchema:z,data:V,keyword:F,it:L}=W;if(A(z),L.opts.unevaluated&&Z.length&&L.items!==!0)L.items=X.mergeEvaluated.items(H,Z.length,L.items);let N=H.name("valid"),D=H.const("len",Y._`${V}.length`);Z.forEach((B,O)=>{if((0,X.alwaysValidSchema)(L,B))return;H.if(Y._`${D} > ${O}`,()=>W.subschema({keyword:F,schemaProp:O,dataProp:O},N)),W.ok(N)});function A(B){let{opts:O,errSchemaPath:E}=L,M=Z.length,R=M===B.minItems&&(M===B.maxItems||B[K]===!1);if(O.strictTuples&&!R){let q=`"${F}" is ${M}-tuple, but minItems or maxItems/${K} are not specified or different at path "${E}"`;(0,X.checkStrictMode)(L,q,O.strictTuples)}}}$.validateTuple=Q,$.default=J}}),Iz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=ru1(),X={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(G)=>(0,Y.validateTuple)(G,"items")};$.default=X}}),Cz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G=OZ(),J=nu1(),Q={message:({params:{len:K}})=>Y.str`must NOT have more than ${K} items`,params:({params:{len:K}})=>Y._`{limit: ${K}}`},W={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Q,code(K){let{schema:Z,parentSchema:H,it:z}=K,{prefixItems:V}=H;if(z.items=!0,(0,X.alwaysValidSchema)(z,Z))return;if(V)(0,J.validateAdditionalItems)(K,V);else K.ok((0,G.validateArray)(K))}};$.default=W}}),Sz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G={message:({params:{min:Q,max:W}})=>W===void 0?Y.str`must contain at least ${Q} valid item(s)`:Y.str`must contain at least ${Q} and no more than ${W} valid item(s)`,params:({params:{min:Q,max:W}})=>W===void 0?Y._`{minContains: ${Q}}`:Y._`{minContains: ${Q}, maxContains: ${W}}`},J={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:G,code(Q){let{gen:W,schema:K,parentSchema:Z,data:H,it:z}=Q,V,F,{minContains:L,maxContains:N}=Z;if(z.opts.next)V=L===void 0?1:L,F=N;else V=1;let D=W.const("len",Y._`${H}.length`);if(Q.setParams({min:V,max:F}),F===void 0&&V===0){(0,X.checkStrictMode)(z,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(F!==void 0&&V>F){(0,X.checkStrictMode)(z,'"minContains" > "maxContains" is always invalid'),Q.fail();return}if((0,X.alwaysValidSchema)(z,K)){let M=Y._`${D} >= ${V}`;if(F!==void 0)M=Y._`${M} && ${D} <= ${F}`;Q.pass(M);return}z.items=!0;let A=W.name("valid");if(F===void 0&&V===1)O(A,()=>W.if(A,()=>W.break()));else if(V===0){if(W.let(A,!0),F!==void 0)W.if(Y._`${H}.length > 0`,B)}else W.let(A,!1),B();Q.result(A,()=>Q.reset());function B(){let M=W.name("_valid"),R=W.let("count",0);O(M,()=>W.if(M,()=>E(R)))}function O(M,R){W.forRange("i",0,D,(q)=>{Q.subschema({keyword:"contains",dataProp:q,dataPropType:X.Type.Num,compositeRule:!0},M),R()})}function E(M){if(W.code(Y._`${M}++`),F===void 0)W.if(Y._`${M} >= ${V}`,()=>W.assign(A,!0).break());else if(W.if(Y._`${M} > ${F}`,()=>W.assign(A,!1).break()),V===1)W.assign(A,!0);else W.if(Y._`${M} >= ${V}`,()=>W.assign(A,!0))}}};$.default=J}}),wI0=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.validateSchemaDeps=$.validatePropertyDeps=$.error=void 0;var Y=v6(),X=V8(),G=OZ();$.error={message:({params:{property:Z,depsCount:H,deps:z}})=>{let V=H===1?"property":"properties";return Y.str`must have ${V} ${z} when property ${Z} is present`},params:({params:{property:Z,depsCount:H,deps:z,missingProperty:V}})=>Y._`{property: ${Z},
    missingProperty: ${V},
    depsCount: ${H},
    deps: ${z}}`};var J={keyword:"dependencies",type:"object",schemaType:"object",error:$.error,code(Z){let[H,z]=Q(Z);W(Z,H),K(Z,z)}};function Q({schema:Z}){let H={},z={};for(let V in Z){if(V==="__proto__")continue;let F=Array.isArray(Z[V])?H:z;F[V]=Z[V]}return[H,z]}function W(Z,H=Z.schema){let{gen:z,data:V,it:F}=Z;if(Object.keys(H).length===0)return;let L=z.let("missing");for(let N in H){let D=H[N];if(D.length===0)continue;let A=(0,G.propertyInData)(z,V,N,F.opts.ownProperties);if(Z.setParams({property:N,depsCount:D.length,deps:D.join(", ")}),F.allErrors)z.if(A,()=>{for(let B of D)(0,G.checkReportMissingProp)(Z,B)});else z.if(Y._`${A} && (${(0,G.checkMissingProp)(Z,D,L)})`),(0,G.reportMissingProp)(Z,L),z.else()}}$.validatePropertyDeps=W;function K(Z,H=Z.schema){let{gen:z,data:V,keyword:F,it:L}=Z,N=z.name("valid");for(let D in H){if((0,X.alwaysValidSchema)(L,H[D]))continue;z.if((0,G.propertyInData)(z,V,D,L.opts.ownProperties),()=>{let A=Z.subschema({keyword:F,schemaProp:D},N);Z.mergeValidEvaluated(A,N)},()=>z.var(N,!0)),Z.ok(N)}}$.validateSchemaDeps=K,$.default=J}}),kz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G={message:"property name must be valid",params:({params:Q})=>Y._`{propertyName: ${Q.propertyName}}`},J={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:G,code(Q){let{gen:W,schema:K,data:Z,it:H}=Q;if((0,X.alwaysValidSchema)(H,K))return;let z=W.name("valid");W.forIn("key",Z,(V)=>{Q.setParams({propertyName:V}),Q.subschema({keyword:"propertyNames",data:V,dataTypes:["string"],propertyName:V,compositeRule:!0},z),W.if((0,Y.not)(z),()=>{if(Q.error(!0),!H.allErrors)W.break()})}),Q.ok(z)}};$.default=J}}),au1=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=OZ(),X=v6(),G=BZ(),J=V8(),Q={message:"must NOT have additional properties",params:({params:K})=>X._`{additionalProperty: ${K.additionalProperty}}`},W={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Q,code(K){let{gen:Z,schema:H,parentSchema:z,data:V,errsCount:F,it:L}=K;if(!F)throw Error("ajv implementation error");let{allErrors:N,opts:D}=L;if(L.props=!0,D.removeAdditional!=="all"&&(0,J.alwaysValidSchema)(L,H))return;let A=(0,Y.allSchemaProperties)(z.properties),B=(0,Y.allSchemaProperties)(z.patternProperties);O(),K.ok(X._`${F} === ${G.default.errors}`);function O(){Z.forIn("key",V,(_)=>{if(!A.length&&!B.length)R(_);else Z.if(E(_),()=>R(_))})}function E(_){let P;if(A.length>8){let w=(0,J.schemaRefOrVal)(L,z.properties,"properties");P=(0,Y.isOwnProperty)(Z,w,_)}else if(A.length)P=(0,X.or)(...A.map((w)=>X._`${_} === ${w}`));else P=X.nil;if(B.length)P=(0,X.or)(P,...B.map((w)=>X._`${(0,Y.usePattern)(K,w)}.test(${_})`));return(0,X.not)(P)}function M(_){Z.code(X._`delete ${V}[${_}]`)}function R(_){if(D.removeAdditional==="all"||D.removeAdditional&&H===!1){M(_);return}if(H===!1){if(K.setParams({additionalProperty:_}),K.error(),!N)Z.break();return}if(typeof H=="object"&&!(0,J.alwaysValidSchema)(L,H)){let P=Z.name("valid");if(D.removeAdditional==="failing")q(_,P,!1),Z.if((0,X.not)(P),()=>{K.reset(),M(_)});else if(q(_,P),!N)Z.if((0,X.not)(P),()=>Z.break())}}function q(_,P,w){let j={keyword:"additionalProperties",dataProp:_,dataPropType:J.Type.Str};if(w===!1)Object.assign(j,{compositeRule:!0,createErrors:!1,allErrors:!1});K.subschema(j,P)}}};$.default=W}}),vz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=Xf(),X=OZ(),G=V8(),J=au1(),Q={keyword:"properties",type:"object",schemaType:"object",code(W){let{gen:K,schema:Z,parentSchema:H,data:z,it:V}=W;if(V.opts.removeAdditional==="all"&&H.additionalProperties===void 0)J.default.code(new Y.KeywordCxt(V,J.default,"additionalProperties"));let F=(0,X.allSchemaProperties)(Z);for(let B of F)V.definedProperties.add(B);if(V.opts.unevaluated&&F.length&&V.props!==!0)V.props=G.mergeEvaluated.props(K,(0,G.toHash)(F),V.props);let L=F.filter((B)=>!(0,G.alwaysValidSchema)(V,Z[B]));if(L.length===0)return;let N=K.name("valid");for(let B of L){if(D(B))A(B);else{if(K.if((0,X.propertyInData)(K,z,B,V.opts.ownProperties)),A(B),!V.allErrors)K.else().var(N,!0);K.endIf()}W.it.definedProperties.add(B),W.ok(N)}function D(B){return V.opts.useDefaults&&!V.compositeRule&&Z[B].default!==void 0}function A(B){W.subschema({keyword:"properties",schemaProp:B,dataProp:B},N)}}};$.default=Q}}),xz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=OZ(),X=v6(),G=V8(),J=V8(),Q={keyword:"patternProperties",type:"object",schemaType:"object",code(W){let{gen:K,schema:Z,data:H,parentSchema:z,it:V}=W,{opts:F}=V,L=(0,Y.allSchemaProperties)(Z),N=L.filter((R)=>(0,G.alwaysValidSchema)(V,Z[R]));if(L.length===0||N.length===L.length&&(!V.opts.unevaluated||V.props===!0))return;let D=F.strictSchema&&!F.allowMatchingProperties&&z.properties,A=K.name("valid");if(V.props!==!0&&!(V.props instanceof X.Name))V.props=(0,J.evaluatedPropsToName)(K,V.props);let{props:B}=V;O();function O(){for(let R of L){if(D)E(R);if(V.allErrors)M(R);else K.var(A,!0),M(R),K.if(A)}}function E(R){for(let q in D)if(new RegExp(R).test(q))(0,G.checkStrictMode)(V,`property ${q} matches pattern ${R} (use allowMatchingProperties)`)}function M(R){K.forIn("key",H,(q)=>{K.if(X._`${(0,Y.usePattern)(W,R)}.test(${q})`,()=>{let _=N.includes(R);if(!_)W.subschema({keyword:"patternProperties",schemaProp:R,dataProp:q,dataPropType:J.Type.Str},A);if(V.opts.unevaluated&&B!==!0)K.assign(X._`${B}[${q}]`,!0);else if(!_&&!V.allErrors)K.if((0,X.not)(A),()=>K.break())})})}}};$.default=Q}}),yz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=V8(),X={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(G){let{gen:J,schema:Q,it:W}=G;if((0,Y.alwaysValidSchema)(W,Q)){G.fail();return}let K=J.name("valid");G.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},K),G.failResult(K,()=>G.reset(),()=>G.error())},error:{message:"must NOT be valid"}};$.default=X}}),bz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=OZ(),X={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Y.validateUnion,error:{message:"must match a schema in anyOf"}};$.default=X}}),hz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G={message:"must match exactly one schema in oneOf",params:({params:Q})=>Y._`{passingSchemas: ${Q.passing}}`},J={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:G,code(Q){let{gen:W,schema:K,parentSchema:Z,it:H}=Q;if(!Array.isArray(K))throw Error("ajv implementation error");if(H.opts.discriminator&&Z.discriminator)return;let z=K,V=W.let("valid",!1),F=W.let("passing",null),L=W.name("_valid");Q.setParams({passing:F}),W.block(N),Q.result(V,()=>Q.reset(),()=>Q.error(!0));function N(){z.forEach((D,A)=>{let B;if((0,X.alwaysValidSchema)(H,D))W.var(L,!0);else B=Q.subschema({keyword:"oneOf",schemaProp:A,compositeRule:!0},L);if(A>0)W.if(Y._`${L} && ${V}`).assign(V,!1).assign(F,Y._`[${F}, ${A}]`).else();W.if(L,()=>{if(W.assign(V,!0),W.assign(F,A),B)Q.mergeEvaluated(B,Y.Name)})})}}};$.default=J}}),fz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=V8(),X={keyword:"allOf",schemaType:"array",code(G){let{gen:J,schema:Q,it:W}=G;if(!Array.isArray(Q))throw Error("ajv implementation error");let K=J.name("valid");Q.forEach((Z,H)=>{if((0,Y.alwaysValidSchema)(W,Z))return;let z=G.subschema({keyword:"allOf",schemaProp:H},K);G.ok(K),G.mergeEvaluated(z)})}};$.default=X}}),gz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G={message:({params:W})=>Y.str`must match "${W.ifClause}" schema`,params:({params:W})=>Y._`{failingKeyword: ${W.ifClause}}`},J={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:G,code(W){let{gen:K,parentSchema:Z,it:H}=W;if(Z.then===void 0&&Z.else===void 0)(0,X.checkStrictMode)(H,'"if" without "then" and "else" is ignored');let z=Q(H,"then"),V=Q(H,"else");if(!z&&!V)return;let F=K.let("valid",!0),L=K.name("_valid");if(N(),W.reset(),z&&V){let A=K.let("ifClause");W.setParams({ifClause:A}),K.if(L,D("then",A),D("else",A))}else if(z)K.if(L,D("then"));else K.if((0,Y.not)(L),D("else"));W.pass(F,()=>W.error(!0));function N(){let A=W.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},L);W.mergeEvaluated(A)}function D(A,B){return()=>{let O=W.subschema({keyword:A},L);if(K.assign(F,L),W.mergeValidEvaluated(O,F),B)K.assign(B,Y._`${A}`);else W.setParams({ifClause:A})}}}};function Q(W,K){let Z=W.schema[K];return Z!==void 0&&!(0,X.alwaysValidSchema)(W,Z)}$.default=J}}),mz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=V8(),X={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:G,parentSchema:J,it:Q}){if(J.if===void 0)(0,Y.checkStrictMode)(Q,`"${G}" without "if" is ignored`)}};$.default=X}}),su1=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=nu1(),X=Iz8(),G=ru1(),J=Cz8(),Q=Sz8(),W=wI0(),K=kz8(),Z=au1(),H=vz8(),z=xz8(),V=yz8(),F=bz8(),L=hz8(),N=fz8(),D=gz8(),A=mz8();function B(O=!1){let E=[V.default,F.default,L.default,N.default,D.default,A.default,K.default,Z.default,W.default,H.default,z.default];if(O)E.push(X.default,J.default);else E.push(Y.default,G.default);return E.push(Q.default),E}$.default=B}}),uz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X={message:({schemaCode:J})=>Y.str`must match format "${J}"`,params:({schemaCode:J})=>Y._`{format: ${J}}`},G={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:X,code(J,Q){let{gen:W,data:K,$data:Z,schema:H,schemaCode:z,it:V}=J,{opts:F,errSchemaPath:L,schemaEnv:N,self:D}=V;if(!F.validateFormats)return;if(Z)A();else B();function A(){let O=W.scopeValue("formats",{ref:D.formats,code:F.code.formats}),E=W.const("fDef",Y._`${O}[${z}]`),M=W.let("fType"),R=W.let("format");W.if(Y._`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>W.assign(M,Y._`${E}.type || "string"`).assign(R,Y._`${E}.validate`),()=>W.assign(M,Y._`"string"`).assign(R,E)),J.fail$data((0,Y.or)(q(),_()));function q(){if(F.strictSchema===!1)return Y.nil;return Y._`${z} && !${R}`}function _(){let P=N.$async?Y._`(${E}.async ? await ${R}(${K}) : ${R}(${K}))`:Y._`${R}(${K})`,w=Y._`(typeof ${R} == "function" ? ${P} : ${R}.test(${K}))`;return Y._`${R} && ${R} !== true && ${M} === ${Q} && !${w}`}}function B(){let O=D.formats[H];if(!O){q();return}if(O===!0)return;let[E,M,R]=_(O);if(E===Q)J.pass(P());function q(){if(F.strictSchema===!1){D.logger.warn(w());return}throw Error(w());function w(){return`unknown format "${H}" ignored in schema at path "${L}"`}}function _(w){let j=w instanceof RegExp?(0,Y.regexpCode)(w):F.code.formats?Y._`${F.code.formats}${(0,Y.getProperty)(H)}`:void 0,C=W.scopeValue("formats",{key:H,ref:w,code:j});if(typeof w=="object"&&!(w instanceof RegExp))return[w.type||"string",w.validate,Y._`${C}.validate`];return["string",w,C]}function P(){if(typeof O=="object"&&!(O instanceof RegExp)&&O.async){if(!N.$async)throw Error("async format in sync schema");return Y._`await ${R}(${K})`}return typeof M=="function"?Y._`${R}(${K})`:Y._`${R}.test(${K})`}}}};$.default=G}}),ou1=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/index.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=uz8(),X=[Y.default];$.default=X}}),tu1=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/metadata.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.contentVocabulary=$.metadataVocabulary=void 0,$.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],$.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}}),pz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=lu1(),X=iu1(),G=su1(),J=ou1(),Q=tu1(),W=[Y.default,X.default,(0,G.default)(),J.default,Q.metadataVocabulary,Q.contentVocabulary];$.default=W}}),dz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.DiscrError=void 0;var Y;(function(X){X.Tag="tag",X.Mapping="mapping"})(Y||($.DiscrError=Y={}))}}),eu1=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=dz8(),G=Q40(),J=Gf(),Q=V8(),W={message:({params:{discrError:Z,tagName:H}})=>Z===X.DiscrError.Tag?`tag "${H}" must be string`:`value of tag "${H}" must be in oneOf`,params:({params:{discrError:Z,tag:H,tagName:z}})=>Y._`{error: ${Z}, tag: ${z}, tagValue: ${H}}`},K={keyword:"discriminator",type:"object",schemaType:"object",error:W,code(Z){let{gen:H,data:z,schema:V,parentSchema:F,it:L}=Z,{oneOf:N}=F;if(!L.opts.discriminator)throw Error("discriminator: requires discriminator option");let D=V.propertyName;if(typeof D!="string")throw Error("discriminator: requires propertyName");if(V.mapping)throw Error("discriminator: mapping is not supported");if(!N)throw Error("discriminator: requires oneOf keyword");let A=H.let("valid",!1),B=H.const("tag",Y._`${z}${(0,Y.getProperty)(D)}`);H.if(Y._`typeof ${B} == "string"`,()=>O(),()=>Z.error(!1,{discrError:X.DiscrError.Tag,tag:B,tagName:D})),Z.ok(A);function O(){let R=M();H.if(!1);for(let q in R)H.elseIf(Y._`${B} === ${q}`),H.assign(A,E(R[q]));H.else(),Z.error(!1,{discrError:X.DiscrError.Mapping,tag:B,tagName:D}),H.endIf()}function E(R){let q=H.name("valid"),_=Z.subschema({keyword:"oneOf",schemaProp:R},q);return Z.mergeEvaluated(_,Y.Name),q}function M(){var R;let q={},_=w(F),P=!0;for(let k=0;k<N.length;k++){let S=N[k];if((S===null||S===void 0?void 0:S.$ref)&&!(0,Q.schemaHasRulesButRef)(S,L.self.RULES)){let v=S.$ref;if(S=G.resolveRef.call(L.self,L.schemaEnv.root,L.baseId,v),S instanceof G.SchemaEnv)S=S.schema;if(S===void 0)throw new J.default(L.opts.uriResolver,L.baseId,v)}let I=(R=S===null||S===void 0?void 0:S.properties)===null||R===void 0?void 0:R[D];if(typeof I!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${D}"`);P=P&&(_||w(S)),j(I,k)}if(!P)throw Error(`discriminator: "${D}" must be required`);return q;function w({required:k}){return Array.isArray(k)&&k.includes(D)}function j(k,S){if(k.const)C(k.const,S);else if(k.enum)for(let I of k.enum)C(I,S);else throw Error(`discriminator: "properties/${D}" must have "const" or "enum"`)}function C(k,S){if(typeof k!="string"||k in q)throw Error(`discriminator: "${D}" values must be unique strings`);q[k]=S}}}};$.default=K}}),cz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-draft-07.json"($,Y){Y.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}}),lz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.js"($,Y){Object.defineProperty($,"__esModule",{value:!0}),$.MissingRefError=$.ValidationError=$.CodeGen=$.Name=$.nil=$.stringify=$.str=$._=$.KeywordCxt=$.Ajv=void 0;var X=cu1(),G=pz8(),J=eu1(),Q=cz8(),W=["/properties"],K="http://json-schema.org/draft-07/schema",Z=class extends X.default{_addVocabularies(){if(super._addVocabularies(),G.default.forEach((L)=>this.addVocabulary(L)),this.opts.discriminator)this.addKeyword(J.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let L=this.opts.$data?this.$dataMetaSchema(Q,W):Q;this.addMetaSchema(L,K,!1),this.refs["http://json-schema.org/schema"]=K}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(K)?K:void 0)}};$.Ajv=Z,Y.exports=$=Z,Y.exports.Ajv=Z,Object.defineProperty($,"__esModule",{value:!0}),$.default=Z;var H=Xf();Object.defineProperty($,"KeywordCxt",{enumerable:!0,get:function(){return H.KeywordCxt}});var z=v6();Object.defineProperty($,"_",{enumerable:!0,get:function(){return z._}}),Object.defineProperty($,"str",{enumerable:!0,get:function(){return z.str}}),Object.defineProperty($,"stringify",{enumerable:!0,get:function(){return z.stringify}}),Object.defineProperty($,"nil",{enumerable:!0,get:function(){return z.nil}}),Object.defineProperty($,"Name",{enumerable:!0,get:function(){return z.Name}}),Object.defineProperty($,"CodeGen",{enumerable:!0,get:function(){return z.CodeGen}});var V=J40();Object.defineProperty($,"ValidationError",{enumerable:!0,get:function(){return V.default}});var F=Gf();Object.defineProperty($,"MissingRefError",{enumerable:!0,get:function(){return F.default}})}}),$p1=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.dynamicAnchor=void 0;var Y=v6(),X=BZ(),G=Q40(),J=qI0(),Q={keyword:"$dynamicAnchor",schemaType:"string",code:(Z)=>W(Z,Z.schema)};function W(Z,H){let{gen:z,it:V}=Z;V.schemaEnv.root.dynamicAnchors[H]=!0;let F=Y._`${X.default.dynamicAnchors}${(0,Y.getProperty)(H)}`,L=V.errSchemaPath==="#"?V.validateName:K(Z);z.if(Y._`!${F}`,()=>z.assign(F,L))}$.dynamicAnchor=W;function K(Z){let{schemaEnv:H,schema:z,self:V}=Z.it,{root:F,baseId:L,localRefs:N,meta:D}=H.root,{schemaId:A}=V.opts,B=new G.SchemaEnv({schema:z,schemaId:A,root:F,baseId:L,localRefs:N,meta:D});return G.compileSchema.call(V,B),(0,J.getValidate)(Z,B)}$.default=Q}}),Yp1=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js"($){Object.defineProperty($,"__esModule",{value:!0}),$.dynamicRef=void 0;var Y=v6(),X=BZ(),G=qI0(),J={keyword:"$dynamicRef",schemaType:"string",code:(W)=>Q(W,W.schema)};function Q(W,K){let{gen:Z,keyword:H,it:z}=W;if(K[0]!=="#")throw Error(`"${H}" only supports hash fragment reference`);let V=K.slice(1);if(z.allErrors)F();else{let N=Z.let("valid",!1);F(N),W.ok(N)}function F(N){if(z.schemaEnv.root.dynamicAnchors[V]){let D=Z.let("_v",Y._`${X.default.dynamicAnchors}${(0,Y.getProperty)(V)}`);Z.if(D,L(D,N),L(z.validateName,N))}else L(z.validateName,N)()}function L(N,D){return D?()=>Z.block(()=>{(0,G.callRef)(W,N),Z.let(D,!0)}):()=>(0,G.callRef)(W,N)}}$.dynamicRef=Q,$.default=J}}),iz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=$p1(),X=V8(),G={keyword:"$recursiveAnchor",schemaType:"boolean",code(J){if(J.schema)(0,Y.dynamicAnchor)(J,"");else(0,X.checkStrictMode)(J.it,"$recursiveAnchor: false is ignored")}};$.default=G}}),nz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=Yp1(),X={keyword:"$recursiveRef",schemaType:"string",code:(G)=>(0,Y.dynamicRef)(G,G.schema)};$.default=X}}),rz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/index.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=$p1(),X=Yp1(),G=iz8(),J=nz8(),Q=[Y.default,X.default,G.default,J.default];$.default=Q}}),az8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=wI0(),X={keyword:"dependentRequired",type:"object",schemaType:"object",error:Y.error,code:(G)=>(0,Y.validatePropertyDeps)(G)};$.default=X}}),sz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=wI0(),X={keyword:"dependentSchemas",type:"object",schemaType:"object",code:(G)=>(0,Y.validateSchemaDeps)(G)};$.default=X}}),oz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=V8(),X={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:G,parentSchema:J,it:Q}){if(J.contains===void 0)(0,Y.checkStrictMode)(Q,`"${G}" without "contains" is ignored`)}};$.default=X}}),tz8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/next.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=az8(),X=sz8(),G=oz8(),J=[Y.default,X.default,G.default];$.default=J}}),ez8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G=BZ(),J={message:"must NOT have unevaluated properties",params:({params:W})=>Y._`{unevaluatedProperty: ${W.unevaluatedProperty}}`},Q={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:J,code(W){let{gen:K,schema:Z,data:H,errsCount:z,it:V}=W;if(!z)throw Error("ajv implementation error");let{allErrors:F,props:L}=V;if(L instanceof Y.Name)K.if(Y._`${L} !== true`,()=>K.forIn("key",H,(B)=>K.if(D(L,B),()=>N(B))));else if(L!==!0)K.forIn("key",H,(B)=>L===void 0?N(B):K.if(A(L,B),()=>N(B)));V.props=!0,W.ok(Y._`${z} === ${G.default.errors}`);function N(B){if(Z===!1){if(W.setParams({unevaluatedProperty:B}),W.error(),!F)K.break();return}if(!(0,X.alwaysValidSchema)(V,Z)){let O=K.name("valid");if(W.subschema({keyword:"unevaluatedProperties",dataProp:B,dataPropType:X.Type.Str},O),!F)K.if((0,Y.not)(O),()=>K.break())}}function D(B,O){return Y._`!${B} || !${B}[${O}]`}function A(B,O){let E=[];for(let M in B)if(B[M]===!0)E.push(Y._`${O} !== ${M}`);return(0,Y.and)(...E)}}};$.default=Q}}),$V8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=v6(),X=V8(),G={message:({params:{len:Q}})=>Y.str`must NOT have more than ${Q} items`,params:({params:{len:Q}})=>Y._`{limit: ${Q}}`},J={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:G,code(Q){let{gen:W,schema:K,data:Z,it:H}=Q,z=H.items||0;if(z===!0)return;let V=W.const("len",Y._`${Z}.length`);if(K===!1)Q.setParams({len:z}),Q.fail(Y._`${V} > ${z}`);else if(typeof K=="object"&&!(0,X.alwaysValidSchema)(H,K)){let L=W.var("valid",Y._`${V} <= ${z}`);W.if((0,Y.not)(L),()=>F(L,z)),Q.ok(L)}H.items=!0;function F(L,N){W.forRange("i",N,V,(D)=>{if(Q.subschema({keyword:"unevaluatedItems",dataProp:D,dataPropType:X.Type.Num},L),!H.allErrors)W.if((0,Y.not)(L),()=>W.break())})}}};$.default=J}}),YV8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=ez8(),X=$V8(),G=[Y.default,X.default];$.default=G}}),XV8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft2020.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=lu1(),X=iu1(),G=su1(),J=rz8(),Q=tz8(),W=YV8(),K=ou1(),Z=tu1(),H=[J.default,Y.default,X.default,(0,G.default)(!0),K.default,Z.metadataVocabulary,Z.contentVocabulary,Q.default,W.default];$.default=H}}),GV8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json"($,Y){Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}}}),JV8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json"($,Y){Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}}}),QV8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json"($,Y){Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}}}),WV8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json"($,Y){Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}}}),KV8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json"($,Y){Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}}}),ZV8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json"($,Y){Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}}}),UV8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json"($,Y){Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}}),HV8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json"($,Y){Y.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}}),zV8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js"($){Object.defineProperty($,"__esModule",{value:!0});var Y=GV8(),X=JV8(),G=QV8(),J=WV8(),Q=KV8(),W=ZV8(),K=UV8(),Z=HV8(),H=["/properties"];function z(V){return[Y,X,G,J,Q,F(this,W),K,F(this,Z)].forEach((L)=>this.addMetaSchema(L,void 0,!1)),this;function F(L,N){return V?L.$dataMetaSchema(N,H):N}}$.default=z}}),VV8=q1({"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/2020.js"($,Y){Object.defineProperty($,"__esModule",{value:!0}),$.MissingRefError=$.ValidationError=$.CodeGen=$.Name=$.nil=$.stringify=$.str=$._=$.KeywordCxt=$.Ajv2020=void 0;var X=cu1(),G=XV8(),J=eu1(),Q=zV8(),W="https://json-schema.org/draft/2020-12/schema",K=class extends X.default{constructor(F={}){super({...F,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){if(super._addVocabularies(),G.default.forEach((F)=>this.addVocabulary(F)),this.opts.discriminator)this.addKeyword(J.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:F,meta:L}=this.opts;if(!L)return;Q.default.call(this,F),this.refs["http://json-schema.org/schema"]=W}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(W)?W:void 0)}};$.Ajv2020=K,Y.exports=$=K,Y.exports.Ajv2020=K,Object.defineProperty($,"__esModule",{value:!0}),$.default=K;var Z=Xf();Object.defineProperty($,"KeywordCxt",{enumerable:!0,get:function(){return Z.KeywordCxt}});var H=v6();Object.defineProperty($,"_",{enumerable:!0,get:function(){return H._}}),Object.defineProperty($,"str",{enumerable:!0,get:function(){return H.str}}),Object.defineProperty($,"stringify",{enumerable:!0,get:function(){return H.stringify}}),Object.defineProperty($,"nil",{enumerable:!0,get:function(){return H.nil}}),Object.defineProperty($,"Name",{enumerable:!0,get:function(){return H.Name}}),Object.defineProperty($,"CodeGen",{enumerable:!0,get:function(){return H.CodeGen}});var z=J40();Object.defineProperty($,"ValidationError",{enumerable:!0,get:function(){return z.default}});var V=Gf();Object.defineProperty($,"MissingRefError",{enumerable:!0,get:function(){return V.default}})}}),FV8=gL(lz8(),1),LV8=gL(VV8(),1),DV8=gL(zO(),1)});var W40,Jp1,Qp1=($)=>typeof $==="string"?{...Jp1,name:$}:{...Jp1,...$};var K40=V0(()=>{W40=Symbol("Let zodToJsonSchema decide on which parser to use"),Jp1={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"}});var Wp1=($)=>{let Y=Qp1($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,flags:{hasReferencedOpenAiAnyType:!1},currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}};var _I0=V0(()=>{K40()});function jI0($,Y,X,G){if(!G?.errorMessages)return;if(X)$.errorMessage={...$.errorMessage,[Y]:X}}function x8($,Y,X,G,J){$[Y]=X,jI0($,Y,G,J)}var Z40=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")};function F$($){if($.target!=="openAi")return{};let Y=[...$.basePath,$.definitionPath,$.openAiAnyTypeName];return $.flags.hasReferencedOpenAiAnyType=!0,{$ref:$.$refStrategy==="relative"?Z40(Y,$.currentPath):Y.join("/")}}var c2=()=>{};function Kp1($,Y){let X={type:"array"};if($.type?._def&&$.type?._def?.typeName!==U0.ZodAny)X.items=G6($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)x8(X,"minItems",$.minLength.value,$.minLength.message,Y);if($.maxLength)x8(X,"maxItems",$.maxLength.value,$.maxLength.message,Y);if($.exactLength)x8(X,"minItems",$.exactLength.value,$.exactLength.message,Y),x8(X,"maxItems",$.exactLength.value,$.exactLength.message,Y);return X}var TI0=V0(()=>{cG();b7()});function Zp1($,Y){let X={type:"integer",format:"int64"};if(!$.checks)return X;for(let G of $.checks)switch(G.kind){case"min":if(Y.target==="jsonSchema7")if(G.inclusive)x8(X,"minimum",G.value,G.message,Y);else x8(X,"exclusiveMinimum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMinimum=!0;x8(X,"minimum",G.value,G.message,Y)}break;case"max":if(Y.target==="jsonSchema7")if(G.inclusive)x8(X,"maximum",G.value,G.message,Y);else x8(X,"exclusiveMaximum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMaximum=!0;x8(X,"maximum",G.value,G.message,Y)}break;case"multipleOf":x8(X,"multipleOf",G.value,G.message,Y);break}return X}var II0=()=>{};function Up1(){return{type:"boolean"}}function U40($,Y){return G6($.type._def,Y)}var H40=V0(()=>{b7()});var Hp1=($,Y)=>{return G6($.innerType._def,Y)};var CI0=V0(()=>{b7()});function SI0($,Y,X){let G=X??Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>SI0($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return BV8($,Y)}}var BV8=($,Y)=>{let X={type:"integer",format:"unix-time"};if(Y.target==="openApi3")return X;for(let G of $.checks)switch(G.kind){case"min":x8(X,"minimum",G.value,G.message,Y);break;case"max":x8(X,"maximum",G.value,G.message,Y);break}return X};var kI0=()=>{};function zp1($,Y){return{...G6($.innerType._def,Y),default:$.defaultValue()}}var vI0=V0(()=>{b7()});function Vp1($,Y){return Y.effectStrategy==="input"?G6($.schema._def,Y):F$(Y)}var xI0=V0(()=>{b7();c2()});function Fp1($){return{type:"string",enum:Array.from($.values)}}function Lp1($,Y){let X=[G6($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G6($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((Q)=>!!Q),G=Y.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,J=[];return X.forEach((Q)=>{if(OV8(Q)){if(J.push(...Q.allOf),Q.unevaluatedProperties===void 0)G=void 0}else{let W=Q;if("additionalProperties"in Q&&Q.additionalProperties===!1){let{additionalProperties:K,...Z}=Q;W=Z}else G=void 0;J.push(W)}}),J.length?{allOf:J,...G}:void 0}var OV8=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $};var yI0=V0(()=>{b7()});function Dp1($,Y){let X=typeof $.value;if(X!=="bigint"&&X!=="number"&&X!=="boolean"&&X!=="string")return{type:Array.isArray($.value)?"array":"object"};if(Y.target==="openApi3")return{type:X==="bigint"?"integer":X,enum:[$.value]};return{type:X==="bigint"?"integer":X,const:$.value}}function z40($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":x8(X,"minLength",typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,G.message,Y);break;case"max":x8(X,"maxLength",typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value,G.message,Y);break;case"email":switch(Y.emailStrategy){case"format:email":MZ(X,"email",G.message,Y);break;case"format:idn-email":MZ(X,"idn-email",G.message,Y);break;case"pattern:zod":nG(X,EZ.email,G.message,Y);break}break;case"url":MZ(X,"uri",G.message,Y);break;case"uuid":MZ(X,"uuid",G.message,Y);break;case"regex":nG(X,G.regex,G.message,Y);break;case"cuid":nG(X,EZ.cuid,G.message,Y);break;case"cuid2":nG(X,EZ.cuid2,G.message,Y);break;case"startsWith":nG(X,RegExp(`^${hI0(G.value,Y)}`),G.message,Y);break;case"endsWith":nG(X,RegExp(`${hI0(G.value,Y)}$`),G.message,Y);break;case"datetime":MZ(X,"date-time",G.message,Y);break;case"date":MZ(X,"date",G.message,Y);break;case"time":MZ(X,"time",G.message,Y);break;case"duration":MZ(X,"duration",G.message,Y);break;case"length":x8(X,"minLength",typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,G.message,Y),x8(X,"maxLength",typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value,G.message,Y);break;case"includes":{nG(X,RegExp(hI0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")MZ(X,"ipv4",G.message,Y);if(G.version!=="v4")MZ(X,"ipv6",G.message,Y);break}case"base64url":nG(X,EZ.base64url,G.message,Y);break;case"jwt":nG(X,EZ.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")nG(X,EZ.ipv4Cidr,G.message,Y);if(G.version!=="v4")nG(X,EZ.ipv6Cidr,G.message,Y);break}case"emoji":nG(X,EZ.emoji(),G.message,Y);break;case"ulid":{nG(X,EZ.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{MZ(X,"binary",G.message,Y);break}case"contentEncoding:base64":{x8(X,"contentEncoding","base64",G.message,Y);break}case"pattern:zod":{nG(X,EZ.base64,G.message,Y);break}}break}case"nanoid":nG(X,EZ.nanoid,G.message,Y);case"toLowerCase":case"toUpperCase":case"trim":break;default:((J)=>{})(G)}return X}function hI0($,Y){return Y.patternStrategy==="escape"?MV8($):$}function MV8($){let Y="";for(let X=0;X<$.length;X++){if(!EV8.has($[X]))Y+="\\";Y+=$[X]}return Y}function MZ($,Y,X,G){if($.format||$.anyOf?.some((J)=>J.format)){if(!$.anyOf)$.anyOf=[];if($.format){if($.anyOf.push({format:$.format,...$.errorMessage&&G.errorMessages&&{errorMessage:{format:$.errorMessage.format}}}),delete $.format,$.errorMessage){if(delete $.errorMessage.format,Object.keys($.errorMessage).length===0)delete $.errorMessage}}$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else x8($,"format",Y,X,G)}function nG($,Y,X,G){if($.pattern||$.allOf?.some((J)=>J.pattern)){if(!$.allOf)$.allOf=[];if($.pattern){if($.allOf.push({pattern:$.pattern,...$.errorMessage&&G.errorMessages&&{errorMessage:{pattern:$.errorMessage.pattern}}}),delete $.pattern,$.errorMessage){if(delete $.errorMessage.pattern,Object.keys($.errorMessage).length===0)delete $.errorMessage}}$.allOf.push({pattern:Np1(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else x8($,"pattern",Np1(Y,G),X,G)}function Np1($,Y){if(!Y.applyRegexFlags||!$.flags)return $.source;let X={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},G=X.i?$.source.toLowerCase():$.source,J="",Q=!1,W=!1,K=!1;for(let Z=0;Z<G.length;Z++){if(Q){J+=G[Z],Q=!1;continue}if(X.i){if(W){if(G[Z].match(/[a-z]/)){if(K)J+=G[Z],J+=`${G[Z-2]}-${G[Z]}`.toUpperCase(),K=!1;else if(G[Z+1]==="-"&&G[Z+2]?.match(/[a-z]/))J+=G[Z],K=!0;else J+=`${G[Z]}${G[Z].toUpperCase()}`;continue}}else if(G[Z].match(/[a-z]/)){J+=`[${G[Z]}${G[Z].toUpperCase()}]`;continue}}if(X.m){if(G[Z]==="^"){J+=`(^|(?<=[\r
]))`;continue}else if(G[Z]==="$"){J+=`($|(?=[\r
]))`;continue}}if(X.s&&G[Z]==="."){J+=W?`${G[Z]}\r
`:`[${G[Z]}\r
]`;continue}if(J+=G[Z],G[Z]==="\\")Q=!0;else if(W&&G[Z]==="]")W=!1;else if(!W&&G[Z]==="[")W=!0}try{new RegExp(J)}catch{return console.warn(`Could not convert regex pattern at ${Y.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),$.source}return J}var bI0=void 0,EZ,EV8;var V40=V0(()=>{EZ={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(bI0===void 0)bI0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return bI0},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};EV8=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});function F40($,Y){if(Y.target==="openAi")console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");if(Y.target==="openApi3"&&$.keyType?._def.typeName===U0.ZodEnum)return{type:"object",required:$.keyType._def.values,properties:$.keyType._def.values.reduce((G,J)=>({...G,[J]:G6($.valueType._def,{...Y,currentPath:[...Y.currentPath,"properties",J]})??F$(Y)}),{}),additionalProperties:Y.rejectedAdditionalProperties};let X={type:"object",additionalProperties:G6($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]})??Y.allowedAdditionalProperties};if(Y.target==="openApi3")return X;if($.keyType?._def.typeName===U0.ZodString&&$.keyType._def.checks?.length){let{type:G,...J}=z40($.keyType._def,Y);return{...X,propertyNames:J}}else if($.keyType?._def.typeName===U0.ZodEnum)return{...X,propertyNames:{enum:$.keyType._def.values}};else if($.keyType?._def.typeName===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&$.keyType._def.type._def.checks?.length){let{type:G,...J}=U40($.keyType._def,Y);return{...X,propertyNames:J}}return X}var L40=V0(()=>{cG();b7();V40();H40();c2()});function Ap1($,Y){if(Y.mapStrategy==="record")return F40($,Y);let X=G6($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||F$(Y),G=G6($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||F$(Y);return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}var fI0=V0(()=>{b7();L40();c2()});function Bp1($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function Op1($){return $.target==="openAi"?void 0:{not:F$({...$,currentPath:[...$.currentPath,"not"]})}}var gI0=V0(()=>{c2()});function Ep1($){return $.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}function Rp1($,Y){if(Y.target==="openApi3")return Mp1($,Y);let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in Jf)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=Jf[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,K)=>K.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return Mp1($,Y)}var Jf,Mp1=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>G6(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0};var D40=V0(()=>{b7();Jf={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"}});function qp1($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length)){if(Y.target==="openApi3")return{type:Jf[$.innerType._def.typeName],nullable:!0};return{type:[Jf[$.innerType._def.typeName],"null"]}}if(Y.target==="openApi3"){let G=G6($.innerType._def,{...Y,currentPath:[...Y.currentPath]});if(G&&"$ref"in G)return{allOf:[G],nullable:!0};return G&&{...G,nullable:!0}}let X=G6($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}var mI0=V0(()=>{b7();D40()});function Pp1($,Y){let X={type:"number"};if(!$.checks)return X;for(let G of $.checks)switch(G.kind){case"int":X.type="integer",jI0(X,"type",G.message,Y);break;case"min":if(Y.target==="jsonSchema7")if(G.inclusive)x8(X,"minimum",G.value,G.message,Y);else x8(X,"exclusiveMinimum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMinimum=!0;x8(X,"minimum",G.value,G.message,Y)}break;case"max":if(Y.target==="jsonSchema7")if(G.inclusive)x8(X,"maximum",G.value,G.message,Y);else x8(X,"exclusiveMaximum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMaximum=!0;x8(X,"maximum",G.value,G.message,Y)}break;case"multipleOf":x8(X,"multipleOf",G.value,G.message,Y);break}return X}var uI0=()=>{};function wp1($,Y){let X=Y.target==="openAi",G={type:"object",properties:{}},J=[],Q=$.shape();for(let K in Q){let Z=Q[K];if(Z===void 0||Z._def===void 0)continue;let H=qV8(Z);if(H&&X){if(Z._def.typeName==="ZodOptional")Z=Z._def.innerType;if(!Z.isNullable())Z=Z.nullable();H=!1}let z=G6(Z._def,{...Y,currentPath:[...Y.currentPath,"properties",K],propertyPath:[...Y.currentPath,"properties",K]});if(z===void 0)continue;if(G.properties[K]=z,!H)J.push(K)}if(J.length)G.required=J;let W=RV8($,Y);if(W!==void 0)G.additionalProperties=W;return G}function RV8($,Y){if($.catchall._def.typeName!=="ZodNever")return G6($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function qV8($){try{return $.isOptional()}catch{return!0}}var pI0=V0(()=>{b7()});var _p1=($,Y)=>{if(Y.currentPath.toString()===Y.propertyPath?.toString())return G6($.innerType._def,Y);let X=G6($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return X?{anyOf:[{not:F$(Y)},X]}:F$(Y)};var dI0=V0(()=>{b7();c2()});var jp1=($,Y)=>{if(Y.pipeStrategy==="input")return G6($.in._def,Y);else if(Y.pipeStrategy==="output")return G6($.out._def,Y);let X=G6($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=G6($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}};var cI0=V0(()=>{b7()});function Tp1($,Y){return G6($.type._def,Y)}var lI0=V0(()=>{b7()});function Ip1($,Y){let G={type:"array",uniqueItems:!0,items:G6($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)x8(G,"minItems",$.minSize.value,$.minSize.message,Y);if($.maxSize)x8(G,"maxItems",$.maxSize.value,$.maxSize.message,Y);return G}var iI0=V0(()=>{b7()});function Cp1($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>G6(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:G6($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>G6(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}var nI0=V0(()=>{b7()});function Sp1($){return{not:F$($)}}var rI0=V0(()=>{c2()});function kp1($){return F$($)}var aI0=V0(()=>{c2()});var vp1=($,Y)=>{return G6($.innerType._def,Y)};var sI0=V0(()=>{b7()});var xp1=($,Y,X)=>{switch(Y){case U0.ZodString:return z40($,X);case U0.ZodNumber:return Pp1($,X);case U0.ZodObject:return wp1($,X);case U0.ZodBigInt:return Zp1($,X);case U0.ZodBoolean:return Up1();case U0.ZodDate:return SI0($,X);case U0.ZodUndefined:return Sp1(X);case U0.ZodNull:return Ep1(X);case U0.ZodArray:return Kp1($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return Rp1($,X);case U0.ZodIntersection:return Lp1($,X);case U0.ZodTuple:return Cp1($,X);case U0.ZodRecord:return F40($,X);case U0.ZodLiteral:return Dp1($,X);case U0.ZodEnum:return Fp1($);case U0.ZodNativeEnum:return Bp1($);case U0.ZodNullable:return qp1($,X);case U0.ZodOptional:return _p1($,X);case U0.ZodMap:return Ap1($,X);case U0.ZodSet:return Ip1($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return Tp1($,X);case U0.ZodNaN:case U0.ZodNever:return Op1(X);case U0.ZodEffects:return Vp1($,X);case U0.ZodAny:return F$(X);case U0.ZodUnknown:return kp1(X);case U0.ZodDefault:return zp1($,X);case U0.ZodBranded:return U40($,X);case U0.ZodReadonly:return vp1($,X);case U0.ZodCatch:return Hp1($,X);case U0.ZodPipeline:return jp1($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})(Y)}};var oI0=V0(()=>{cG();c2();TI0();II0();H40();CI0();kI0();vI0();xI0();yI0();fI0();gI0();mI0();uI0();pI0();dI0();cI0();lI0();L40();iI0();V40();nI0();rI0();D40();aI0();sI0()});function G6($,Y,X=!1){let G=Y.seen.get($);if(Y.override){let K=Y.override?.($,Y,G,X);if(K!==W40)return K}if(G&&!X){let K=PV8(G,Y);if(K!==void 0)return K}let J={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,J);let Q=xp1($,$.typeName,Y),W=typeof Q==="function"?G6(Q(),Y):Q;if(W)wV8($,Y,W);if(Y.postProcess){let K=Y.postProcess(W,$,Y);return J.jsonSchema=W,K}return J.jsonSchema=W,W}var PV8=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:Z40(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),F$(Y);return Y.$refStrategy==="seen"?F$(Y):void 0}}},wV8=($,Y,X)=>{if($.description){if(X.description=$.description,Y.markdownDescription)X.markdownDescription=$.description}return X};var b7=V0(()=>{K40();oI0();c2()});var yp1=()=>{};var N40=($,Y)=>{let X=Wp1(Y),G=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((Z,[H,z])=>({...Z,[H]:G6(z._def,{...X,currentPath:[...X.basePath,X.definitionPath,H]},!0)??F$(X)}),{}):void 0,J=typeof Y==="string"?Y:Y?.nameStrategy==="title"?void 0:Y?.name,Q=G6($._def,J===void 0?X:{...X,currentPath:[...X.basePath,X.definitionPath,J]},!1)??F$(X),W=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(W!==void 0)Q.title=W;if(X.flags.hasReferencedOpenAiAnyType){if(!G)G={};if(!G[X.openAiAnyTypeName])G[X.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:X.$refStrategy==="relative"?"1":[...X.basePath,X.definitionPath,X.openAiAnyTypeName].join("/")}}}let K=J===void 0?G?{...Q,[X.definitionPath]:G}:Q:{$ref:[...X.$refStrategy==="relative"?[]:X.basePath,X.definitionPath,J].join("/"),[X.definitionPath]:{...G,[J]:Q}};if(X.target==="jsonSchema7")K.$schema="http://json-schema.org/draft-07/schema#";else if(X.target==="jsonSchema2019-09"||X.target==="openAi")K.$schema="https://json-schema.org/draft/2019-09/schema#";if(X.target==="openAi"&&(("anyOf"in K)||("oneOf"in K)||("allOf"in K)||("type"in K)&&Array.isArray(K.type)))console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");return K};var tI0=V0(()=>{b7();_I0();c2()});var A40;var B40=V0(()=>{tI0();K40();_I0();b7();yp1();c2();TI0();II0();H40();CI0();kI0();vI0();xI0();yI0();fI0();gI0();mI0();uI0();pI0();dI0();cI0();lI0();sI0();L40();iI0();V40();nI0();rI0();D40();aI0();oI0();tI0();A40=N40});function hp1($,Y){let X=bp1[Y.target];if(!X){let J=Object.keys(bp1);throw Error(`Unsupported JSON Schema target: "${Y.target}". Supported targets are: ${J.join(", ")}`)}let G=A40($,{$refStrategy:"none",target:X,override:(J)=>{if(J.typeName==="ZodDate")return{type:"string",format:"date-time","x-date":!0};return W40}});return(0,_V8.default)(G,{cb:{pre:(J)=>{if(J.type==="string"&&J.format==="email")J.pattern="^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}}),G}function fp1($){let Y=Object.create($),X=$["~standard"];return Object.defineProperty(Y,"~standard",{value:{...X,jsonSchema:{input:(J)=>{return hp1($,J)},output:(J)=>{return hp1($,J)}}},writable:!1,enumerable:!0,configurable:!1}),Y}var _V8,bp1;var gp1=V0(()=>{e10();Yf();B40();_V8=gL(zO(),1),bp1={"draft-04":"jsonSchema7","draft-07":"jsonSchema7","draft-2020-12":"jsonSchema2019-09","openapi-3.0":"openApi3"}});function mp1($,Y,X){let G=jV8.has(Y.target)?Y.target:"draft-07",J={target:TV8[G]??G};if(X.unrepresentable)J.unrepresentable=X.unrepresentable;if(X.override)J.override=X.override;return e$($,J)}function IV8($,Y={}){let X=Object.create($),G=$["~standard"];return Object.defineProperty(X,"~standard",{value:{...G,jsonSchema:{input:(Q)=>{return mp1($,Q,Y)},output:(Q)=>{return mp1($,Q,Y)}}},writable:!1,enumerable:!0,configurable:!1}),X}function CV8($){let Y=$.zodSchema;if($.jsonSchema.type==="object"&&$.jsonSchema.properties!==void 0&&!$.jsonSchema.additionalProperties)$.jsonSchema.additionalProperties=!1;if(Y){if(Y?.type==="date"||Y?._def?.typeName==="ZodDate"){if(Y?.type==="date")$.jsonSchema.type="string",$.jsonSchema.format="date-time";$.jsonSchema["x-date"]=!Y._zod?.def?.coerce}else if(Y?.type==="object"&&Y._zod?.def?.catchall?.type==="unknown")$.jsonSchema.additionalProperties=!0}return}function SV8($){return typeof $==="object"&&$!==null&&"_type"in $&&"jsonSchema"in $&&typeof $.jsonSchema==="object"}function up1($){return typeof $==="object"&&$!==null&&"_zod"in $}function kV8($){if($===null||typeof $!=="object")return!1;if(up1($))return!1;if("~standard"in $){let Y=$["~standard"];if(typeof Y==="object"&&Y!==null&&Y.vendor==="zod"&&!("jsonSchema"in Y))return!0}return $ instanceof kg1.ZodType}function Q4($){if(z5($))return $;if(up1($))return IV8($,{unrepresentable:L_.unrepresentable,override:L_.override});if(kV8($))return fp1($);if(SV8($))return yu1($);if($===null||typeof $!=="object"&&typeof $!=="function")throw Error(`Unsupported schema type: ${typeof $}`);if(typeof $==="function")throw Error("Unsupported schema type: function (schema libraries should implement StandardSchemaWithJSON)");return Xp1($)}function eI0($){if($===null||typeof $!=="object"&&typeof $!=="function")return!1;if(!("~standard"in $))return!1;let Y=$["~standard"];return typeof Y==="object"&&Y!==null&&"version"in Y&&Y.version===1&&"vendor"in Y&&"validate"in Y&&typeof Y.validate==="function"}function $C0($){if($===null||typeof $!=="object"&&typeof $!=="function")return!1;if(!("~standard"in $))return!1;let Y=$["~standard"];if(typeof Y!=="object"||Y===null)return!1;if(!("version"in Y)||Y.version!==1||!("vendor"in Y))return!1;if(!("jsonSchema"in Y)||typeof Y.jsonSchema!=="object")return!1;return typeof Y.jsonSchema.input==="function"&&typeof Y.jsonSchema.output==="function"}function z5($){return eI0($)&&$C0($)}function $6($,Y={}){let{target:X="draft-07",io:G="output",override:J=L_.override}=Y,Q=$["~standard"].jsonSchema[G],W=Q({target:X,libraryOptions:{...L_,override:J}});return W=JSON.parse(JSON.stringify(W)),W}var jV8,TV8,L_;var O40=V0(()=>{bu1();Gp1();gp1();cG();O1();jV8=new Set(["draft-07","draft-04","draft-2020-12"]),TV8={"draft-07":"draft-7","draft-04":"draft-4"};L_={unrepresentable:"any",override:CV8}});var YC0=V0(()=>{O40()});var VO=V0(()=>{YC0()});function D_($,Y){try{let X=$["~standard"].validate(Y);if(X instanceof Promise)throw Error("Your schema is async, which is not supported. Please use a sync schema.");return X}catch(X){if(X instanceof TypeError&&X.message.includes("Cannot read properties of undefined"))throw Error(`Schema validation failed due to an invalid schema definition. This often happens when a union schema (z.union or z.or) has undefined options. Please check that all schema options are properly defined. Original error: ${X.message}`);throw X}}function KC0($){return $!==null&&typeof $==="object"&&"error"in $&&$.error===!0&&"validationErrors"in $}function vV8($){if(typeof $==="object"&&$!==null&&"key"in $)return String($.key);return String($)}function XC0(){return{errors:[],fields:{}}}function E40($){let Y=XC0();for(let X of $)if(!X.path||X.path.length===0)Y.errors.push(X.message);else{let G=Y;for(let J=0;J<X.path.length;J++){let Q=vV8(X.path[J]);if(J===X.path.length-1){if(!G.fields[Q])G.fields[Q]=XC0();G.fields[Q].errors.push(X.message)}else{if(!G.fields[Q])G.fields[Q]=XC0();G=G.fields[Q]}}}return Y}function M40($,Y=200){try{let X=JSON.stringify($,null,2);if(X.length<=Y)return X;return X.slice(0,Y)+"... (truncated)"}catch{return"[Unable to serialize data]"}}function ZC0($,Y,X){if(!$||!("~standard"in $))return{data:Y};let G=D_($,Y);if("value"in G)return{data:G.value};let J=G.issues.map((W)=>`- ${W.path?.join(".")||"root"}: ${W.message}`).join(`
`);return{error:{error:!0,message:`Tool suspension data validation failed${X?` for ${X}`:""}. Please fix the following errors and try again:
${J}

Provided arguments: ${M40(Y)}`,validationErrors:E40(G.issues)}}}function pp1($,Y){if(typeof Y<"u"&&Y!==null)return Y;let X=$6($,{io:"input"});if(X.type==="array")return[];if(X.type==="object")return{};return Y}function Qf($){if($===null||typeof $!=="object")return!1;let Y=Object.getPrototypeOf($);return Y===Object.prototype||Y===null}function GC0($){if($===void 0)return null;if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map(GC0);if(!Qf($))return $;let Y={};for(let[X,G]of Object.entries($))Y[X]=GC0(G);return Y}function JC0($){if($===null||$===void 0)return;if(typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>X===null?null:JC0(X));if(!Qf($))return $;let Y={};for(let[X,G]of Object.entries($)){if(G===null||G===void 0)continue;Y[X]=JC0(G)}return Y}function QC0($,Y,X=""){if($===null||$===void 0)return Y.has(X)?void 0:$;if(typeof $!=="object")return $;if(Array.isArray($))return $.map((J,Q)=>QC0(J,Y,X?`${X}.${Q}`:String(Q)));if(!Qf($))return $;let G={};for(let[J,Q]of Object.entries($)){let W=X?`${X}.${J}`:J;if((Q===null||Q===void 0)&&Y.has(W))continue;G[J]=QC0(Q,Y,W)}return G}function yV8($,Y){let X=$;for(let G of Y){if(X===null||X===void 0||typeof X!=="object")return xV8;let J=typeof G==="object"&&G!==null&&"key"in G?String(G.key):String(G);X=X[J]}return X}function bV8($,Y){if(!Qf(Y))return Y;let X=RI0($);if(!F_(X))return Y;let G=X.shape;if(!G||typeof G!=="object")return Y;let J=!1,Q={...Y};for(let[W,K]of Object.entries(Y)){if(typeof K!=="string")continue;let Z=G[W];if(!Z)continue;let H=RI0(Z);if(hL(H)==="ZodString")continue;let z=K.trim();if(fL(H)&&z.startsWith("[")||F_(H)&&z.startsWith("{"))try{let V=JSON.parse(K);if(fL(H)&&Array.isArray(V)||F_(H)&&Qf(V))Q[W]=V,J=!0}catch{}}return J?Q:Y}function Wf($,Y,X){if(!$||!("~standard"in $))return{data:Y};let G=pp1($,Y);G=GC0(G);let J=D_($,G);if("value"in J)return{data:J.value};let Q=bV8($,G);if(Q!==G){let N=D_($,Q);if("value"in N)return{data:N.value}}let W=new Set(J.issues.filter((N)=>{if(!N.path||N.path.length===0)return!1;let D=yV8(G,N.path);return D===null||D===void 0}).map((N)=>N.path?.map((D)=>typeof D==="object"&&("key"in D)?String(D.key):String(D)).join(".")).filter((N)=>!!N)),K=W.size>0?QC0(Y,W):JC0(Y),Z=pp1($,K),H=D_($,Z);if("value"in H)return{data:H.value};let z=$6($,{io:"input"});if(z.type==="object"&&z.properties!=null&&"prompt"in z.properties&&G!=null&&typeof G==="object"&&!Array.isArray(G)){let N=G;if(N.prompt==null){let D=[N.query,N.message,N.input].find((A)=>typeof A==="string");if(D!==void 0){let A={...N,prompt:D},B=D_($,A);if("value"in B)return{data:B.value}}}}let F=J.issues.map((N)=>`- ${N.path?.join(".")||"root"}: ${N.message}`).join(`
`);return{error:{error:!0,message:`Tool input validation failed${X?` for ${X}`:""}. Please fix the following errors and try again:
${F}

Provided arguments: ${M40(Y)}`,validationErrors:E40(J.issues)}}}function UC0($,Y,X,G){if(!$||!("~standard"in $)||G)return{data:Y};let J=D_($,Y);if("value"in J)return{data:J.value};let Q=J.issues.map((K)=>`- ${K.path?.join(".")||"root"}: ${K.message}`).join(`
`);return{error:{error:!0,message:`Tool output validation failed${X?` for ${X}`:""}. The tool returned invalid output:
${Q}

Returned output: ${M40(Y)}`,validationErrors:E40(J.issues)}}}function WC0($){if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map(WC0);let Y={};for(let[X,G]of Object.entries($))if(hV8.some((J)=>X.toLowerCase().includes(J.toLowerCase())))Y[X]="[REDACTED]";else if(typeof G==="object"&&G!==null)Y[X]=WC0(G);else Y[X]=G;return Y}function fV8($,Y,X){if(!$)return{data:Y?.all??{}};let G=Y?.all??{},Q=Q4($)["~standard"].validate(G);if(Q instanceof Promise)throw Error("Your schema is async, which is not supported. Please use a sync schema.");if("value"in Q)return{data:Q.value};let W=Q.issues.map((H)=>`- ${H.path?.join(".")||"root"}: ${H.message}`).join(`
`),K=WC0(G),Z={error:!0,message:`Request context validation failed${X?` for ${X}`:""}. Please fix the following errors and try again:
${W}

Provided request context: ${M40(K)}`,validationErrors:E40(Q.issues)};return{data:G,error:Z}}function X8($){return new MW($)}function Kf($){return $ instanceof MW||typeof $==="object"&&$!==null&&HC0 in $}function A3($){return!!($&&!Kf($)&&(("parameters"in $)||("execute"in $)&&typeof $.execute==="function"&&("inputSchema"in $)))}function N_($){if(typeof $!=="object"||$===null)return!1;let Y=$;return(Y.type==="provider-defined"||Y.type==="provider")&&typeof Y.id==="string"}function dp1($){return $.split(".").slice(1).join(".")}var xV8,hV8,HC0,MW=class{id;description;inputSchema;outputSchema;suspendSchema;resumeSchema;requestContextSchema;execute;mastra;requireApproval;strict;providerOptions;toModelOutput;transform;mcp;onInputStart;onInputDelta;onInputAvailable;onOutput;inputExamples;mcpMetadata;constructor($){if(this[HC0]=!0,this.id=$.id,this.description=$.description,this.inputSchema=$.inputSchema?Q4($.inputSchema):void 0,this.outputSchema=$.outputSchema?Q4($.outputSchema):void 0,this.suspendSchema=$.suspendSchema?Q4($.suspendSchema):void 0,this.resumeSchema=$.resumeSchema?Q4($.resumeSchema):void 0,this.requestContextSchema=$.requestContextSchema,this.mastra=$.mastra,this.requireApproval=$.requireApproval||!1,this.strict=$.strict,this.providerOptions=$.providerOptions,this.toModelOutput=$.toModelOutput,this.transform=$.transform,this.inputExamples=$.inputExamples,this.mcp=$.mcp,this.mcpMetadata=$.mcpMetadata,this.onInputStart=$.onInputStart,this.onInputDelta=$.onInputDelta,this.onInputAvailable=$.onInputAvailable,this.onOutput=$.onOutput,$.execute){let Y=$.execute;this.execute=async(X,G)=>{let{data:J,error:Q}=Wf(this.inputSchema,X,this.id);if(Q)return Q;let{error:W}=fV8(this.requestContextSchema,G?.requestContext,this.id);if(W)return W;let K=null,Z=G?{...G,...G.suspend?{suspend:(N,D)=>{return K=N,G.suspend?.(N,D)}}:{}}:{},H=Z;if(!G)H={requestContext:new p1,mastra:void 0};else{let N=Z.toolCallId&&Z.messages,D=!N&&(Z.workflow||Z.workflowId);if(N&&!Z.agent){let{agentId:A,toolCallId:B,messages:O,suspend:E,resumeData:M,threadId:R,resourceId:q,writableStream:_,...P}=Z;H={...P,agent:{agentId:A||"",toolCallId:B,messages:O,suspend:E,resumeData:M,threadId:R,resourceId:q,writableStream:_},requestContext:P.requestContext||new p1}}else if(D&&!Z.workflow){let{workflowId:A,runId:B,state:O,setState:E,suspend:M,resumeData:R,...q}=Z;H={...q,workflow:{workflowId:A,runId:B,state:O,setState:E,suspend:M,resumeData:R},requestContext:q.requestContext||new p1}}else H={...Z,agent:Z.agent?{...Z.agent,agentId:Z.agent.agentId??"",suspend:(A,B)=>{return K=A,Z.agent?.suspend?.(A,B)}}:Z.agent,workflow:Z.workflow?{...Z.workflow,suspend:(A,B)=>{return K=A,Z.workflow?.suspend?.(A,B)}}:Z.workflow,requestContext:Z.requestContext||new p1}}let z=H.agent?.resumeData??H.workflow?.resumeData??H?.resumeData;if(z){let N=Wf(this.resumeSchema,z,this.id);if(N.error)return N.error}let V=await Y(J,H);if(K){let N=ZC0(this.suspendSchema,K,this.id);if(N.error)return N.error}let F=!!(typeof V>"u"&&K),L=UC0(this.outputSchema,V,this.id,F);if(L.error)return L.error;return L.data}}}},FO;var A_=V0(()=>{$f();VO();qL();xV8=Symbol("PATH_NOT_FOUND");hV8=["password","secret","token","apiKey","api_key","auth","credential"];HC0=Symbol.for("mastra.core.tool.Tool");FO=N_});var cp1={};W8(cp1,{pMapSkip:()=>B_,pMapIterable:()=>gV8,default:()=>LO});async function LO($,Y,{concurrency:X=Number.POSITIVE_INFINITY,stopOnError:G=!0,signal:J}={}){return new Promise((Q,W)=>{if($[Symbol.iterator]===void 0&&$[Symbol.asyncIterator]===void 0)throw TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof $})`);if(typeof Y!=="function")throw TypeError("Mapper function is required");if(!(Number.isSafeInteger(X)&&X>=1||X===Number.POSITIVE_INFINITY))throw TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${X}\` (${typeof X})`);let K=[],Z=[],H=new Map,z=!1,V=!1,F=!1,L=0,N=0,D=$[Symbol.iterator]===void 0?$[Symbol.asyncIterator]():$[Symbol.iterator](),A=()=>{E(J.reason)},B=()=>{J?.removeEventListener("abort",A)},O=(R)=>{Q(R),B()},E=(R)=>{z=!0,V=!0,W(R),B()};if(J){if(J.aborted)E(J.reason);J.addEventListener("abort",A,{once:!0})}let M=async()=>{if(V)return;let R=await D.next(),q=N;if(N++,R.done){if(F=!0,L===0&&!V){if(!G&&Z.length>0){E(AggregateError(Z));return}if(V=!0,H.size===0){O(K);return}let _=[];for(let[P,w]of K.entries()){if(H.get(P)===B_)continue;_.push(w)}O(_)}return}L++,(async()=>{try{let _=await R.value;if(V)return;let P=await Y(_,q);if(P===B_)H.set(q,P);K[q]=P,L--,await M()}catch(_){if(G)E(_);else{Z.push(_),L--;try{await M()}catch(P){E(P)}}}})()};(async()=>{for(let R=0;R<X;R++){try{await M()}catch(q){E(q);break}if(F||z)break}})()})}function gV8($,Y,{concurrency:X=Number.POSITIVE_INFINITY,backpressure:G=X}={}){if($[Symbol.iterator]===void 0&&$[Symbol.asyncIterator]===void 0)throw TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof $})`);if(typeof Y!=="function")throw TypeError("Mapper function is required");if(!(Number.isSafeInteger(X)&&X>=1||X===Number.POSITIVE_INFINITY))throw TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${X}\` (${typeof X})`);if(!(Number.isSafeInteger(G)&&G>=X||G===Number.POSITIVE_INFINITY))throw TypeError(`Expected \`backpressure\` to be an integer from \`concurrency\` (${X}) and up or \`Infinity\`, got \`${G}\` (${typeof G})`);return{async*[Symbol.asyncIterator](){let J=$[Symbol.asyncIterator]===void 0?$[Symbol.iterator]():$[Symbol.asyncIterator](),Q=[],W=0,K=!1,Z=0;function H(){if(K||!(W<X&&Q.length<G))return;W++;let z=(async()=>{let{done:V,value:F}=await J.next();if(V)return W--,{done:!0};H();try{let L=await Y(await F,Z++);if(W--,L===B_){let N=Q.indexOf(z);if(N>0)Q.splice(N,1)}return H(),{done:!1,value:L}}catch(L){return W--,K=!0,{error:L}}})();Q.push(z)}H();while(Q.length>0){let{error:z,done:V,value:F}=await Q[0];if(Q.shift(),z)throw z;if(V)return;if(H(),F===B_)continue;yield F}}}}var B_;var zC0=V0(()=>{B_=Symbol("skip")});var Zf=o((cd5,ip1)=>{var lp1={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:"(?=.)",QMARK:"[^/]",END_ANCHOR:"(?:\\/|$)",DOTS_SLASH:"\\.{1,2}(?:\\/|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|\\/)\\.{1,2}(?:\\/|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:\\/|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:\\/|$))",QMARK_NO_DOT:"[^.\\/]",STAR:"[^/]*?",START_ANCHOR:"(?:^|\\/)",SEP:"/"},mV8={...lp1,SLASH_LITERAL:"[\\\\/]",QMARK:"[^\\\\/]",STAR:"[^\\\\/]*?",DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},uV8={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};ip1.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:uV8,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars($){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${$.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars($){return $===!0?mV8:lp1}}});var Uf=o((iV8)=>{var{REGEX_BACKSLASH:pV8,REGEX_REMOVE_BACKSLASH:dV8,REGEX_SPECIAL_CHARS:cV8,REGEX_SPECIAL_CHARS_GLOBAL:lV8}=Zf();iV8.isObject=($)=>$!==null&&typeof $==="object"&&!Array.isArray($);iV8.hasRegexChars=($)=>cV8.test($);iV8.isRegexChar=($)=>$.length===1&&iV8.hasRegexChars($);iV8.escapeRegex=($)=>$.replace(lV8,"\\$1");iV8.toPosixSlashes=($)=>$.replace(pV8,"/");iV8.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){let $=navigator.platform.toLowerCase();return $==="win32"||$==="windows"}if(typeof process<"u"&&process.platform)return process.platform==="win32";return!1};iV8.removeBackslashes=($)=>{return $.replace(dV8,(Y)=>{return Y==="\\"?"":Y})};iV8.escapeLast=($,Y,X)=>{let G=$.lastIndexOf(Y,X);if(G===-1)return $;if($[G-1]==="\\")return iV8.escapeLast($,Y,G-1);return`${$.slice(0,G)}\\${$.slice(G)}`};iV8.removePrefix=($,Y={})=>{let X=$;if(X.startsWith("./"))X=X.slice(2),Y.prefix="./";return X};iV8.wrapOutput=($,Y={},X={})=>{let G=X.contains?"":"^",J=X.contains?"":"$",Q=`${G}(?:${$})${J}`;if(Y.negated===!0)Q=`(?:^(?!${Q}).*$)`;return Q};iV8.basename=($,{windows:Y}={})=>{let X=$.split(Y?/[\\/]/:"/"),G=X[X.length-1];if(G==="")return X[X.length-2];return G}});var Xd1=o((id5,Yd1)=>{var ap1=Uf(),{CHAR_ASTERISK:VC0,CHAR_AT:XF8,CHAR_BACKWARD_SLASH:Hf,CHAR_COMMA:GF8,CHAR_DOT:FC0,CHAR_EXCLAMATION_MARK:LC0,CHAR_FORWARD_SLASH:$d1,CHAR_LEFT_CURLY_BRACE:DC0,CHAR_LEFT_PARENTHESES:NC0,CHAR_LEFT_SQUARE_BRACKET:JF8,CHAR_PLUS:QF8,CHAR_QUESTION_MARK:sp1,CHAR_RIGHT_CURLY_BRACE:WF8,CHAR_RIGHT_PARENTHESES:op1,CHAR_RIGHT_SQUARE_BRACKET:KF8}=Zf(),tp1=($)=>{return $===$d1||$===Hf},ep1=($)=>{if($.isPrefix!==!0)$.depth=$.isGlobstar?1/0:1},ZF8=($,Y)=>{let X=Y||{},G=$.length-1,J=X.parts===!0||X.scanToEnd===!0,Q=[],W=[],K=[],Z=$,H=-1,z=0,V=0,F=!1,L=!1,N=!1,D=!1,A=!1,B=!1,O=!1,E=!1,M=!1,R=!1,q=0,_,P,w={value:"",depth:0,isGlob:!1},j=()=>H>=G,C=()=>Z.charCodeAt(H+1),k=()=>{return _=P,Z.charCodeAt(++H)};while(H<G){P=k();let y;if(P===Hf){if(O=w.backslashes=!0,P=k(),P===DC0)B=!0;continue}if(B===!0||P===DC0){q++;while(j()!==!0&&(P=k())){if(P===Hf){O=w.backslashes=!0,k();continue}if(P===DC0){q++;continue}if(B!==!0&&P===FC0&&(P=k())===FC0){if(F=w.isBrace=!0,N=w.isGlob=!0,R=!0,J===!0)continue;break}if(B!==!0&&P===GF8){if(F=w.isBrace=!0,N=w.isGlob=!0,R=!0,J===!0)continue;break}if(P===WF8){if(q--,q===0){B=!1,F=w.isBrace=!0,R=!0;break}}}if(J===!0)continue;break}if(P===$d1){if(Q.push(H),W.push(w),w={value:"",depth:0,isGlob:!1},R===!0)continue;if(_===FC0&&H===z+1){z+=2;continue}V=H+1;continue}if(X.noext!==!0){if((P===QF8||P===XF8||P===VC0||P===sp1||P===LC0)===!0&&C()===NC0){if(N=w.isGlob=!0,D=w.isExtglob=!0,R=!0,P===LC0&&H===z)M=!0;if(J===!0){while(j()!==!0&&(P=k())){if(P===Hf){O=w.backslashes=!0,P=k();continue}if(P===op1){N=w.isGlob=!0,R=!0;break}}continue}break}}if(P===VC0){if(_===VC0)A=w.isGlobstar=!0;if(N=w.isGlob=!0,R=!0,J===!0)continue;break}if(P===sp1){if(N=w.isGlob=!0,R=!0,J===!0)continue;break}if(P===JF8){while(j()!==!0&&(y=k())){if(y===Hf){O=w.backslashes=!0,k();continue}if(y===KF8){L=w.isBracket=!0,N=w.isGlob=!0,R=!0;break}}if(J===!0)continue;break}if(X.nonegate!==!0&&P===LC0&&H===z){E=w.negated=!0,z++;continue}if(X.noparen!==!0&&P===NC0){if(N=w.isGlob=!0,J===!0){while(j()!==!0&&(P=k())){if(P===NC0){O=w.backslashes=!0,P=k();continue}if(P===op1){R=!0;break}}continue}break}if(N===!0){if(R=!0,J===!0)continue;break}}if(X.noext===!0)D=!1,N=!1;let S=Z,I="",v="";if(z>0)I=Z.slice(0,z),Z=Z.slice(z),V-=z;if(S&&N===!0&&V>0)S=Z.slice(0,V),v=Z.slice(V);else if(N===!0)S="",v=Z;else S=Z;if(S&&S!==""&&S!=="/"&&S!==Z){if(tp1(S.charCodeAt(S.length-1)))S=S.slice(0,-1)}if(X.unescape===!0){if(v)v=ap1.removeBackslashes(v);if(S&&O===!0)S=ap1.removeBackslashes(S)}let x={prefix:I,input:$,start:z,base:S,glob:v,isBrace:F,isBracket:L,isGlob:N,isExtglob:D,isGlobstar:A,negated:E,negatedExtglob:M};if(X.tokens===!0){if(x.maxDepth=0,!tp1(P))W.push(w);x.tokens=W}if(X.parts===!0||X.tokens===!0){let y;for(let d=0;d<Q.length;d++){let u=y?y+1:z,b=Q[d],g=$.slice(u,b);if(X.tokens){if(d===0&&z!==0)W[d].isPrefix=!0,W[d].value=I;else W[d].value=g;ep1(W[d]),x.maxDepth+=W[d].depth}if(d!==0||g!=="")K.push(g);y=b}if(y&&y+1<$.length){let d=$.slice(y+1);if(K.push(d),X.tokens)W[W.length-1].value=d,ep1(W[W.length-1]),x.maxDepth+=W[W.length-1].depth}x.slashes=Q,x.parts=K}return x};Yd1.exports=ZF8});var Kd1=o((nd5,Wd1)=>{var zf=Zf(),RW=Uf(),{MAX_LENGTH:R40,POSIX_REGEX_SOURCE:UF8,REGEX_NON_SPECIAL_CHARS:HF8,REGEX_SPECIAL_CHARS_BACKREF:zF8,REPLACEMENTS:Gd1}=zf,VF8=($,Y)=>{if(typeof Y.expandRange==="function")return Y.expandRange(...$,Y);$.sort();let X=`[${$.join("-")}]`;try{new RegExp(X)}catch(G){return $.map((J)=>RW.escapeRegex(J)).join("..")}return X},O_=($,Y)=>{return`Missing ${$}: "${Y}" - use "\\\\${Y}" to match literal characters`},Jd1=($)=>{let Y=[],X=0,G=0,J=0,Q="",W=!1;for(let K of $){if(W===!0){Q+=K,W=!1;continue}if(K==="\\"){Q+=K,W=!0;continue}if(K==='"'){J=J===1?0:1,Q+=K;continue}if(J===0){if(K==="[")X++;else if(K==="]"&&X>0)X--;else if(X===0){if(K==="(")G++;else if(K===")"&&G>0)G--;else if(K==="|"&&G===0){Y.push(Q),Q="";continue}}}Q+=K}return Y.push(Q),Y},FF8=($)=>{let Y=!1;for(let X of $){if(Y===!0){Y=!1;continue}if(X==="\\"){Y=!0;continue}if(/[?*+@!()[\]{}]/.test(X))return!1}return!0},Qd1=($)=>{let Y=$.trim(),X=!0;while(X===!0)if(X=!1,/^@\([^\\()[\]{}|]+\)$/.test(Y))Y=Y.slice(2,-1),X=!0;if(!FF8(Y))return;return Y.replace(/\\(.)/g,"$1")},LF8=($)=>{let Y=$.map(Qd1).filter(Boolean);for(let X=0;X<Y.length;X++)for(let G=X+1;G<Y.length;G++){let J=Y[X],Q=Y[G],W=J[0];if(!W||J!==W.repeat(J.length)||Q!==W.repeat(Q.length))continue;if(J===Q||J.startsWith(Q)||Q.startsWith(J))return!0}return!1},AC0=($,Y=!0)=>{if($[0]!=="+"&&$[0]!=="*"||$[1]!=="(")return;let X=0,G=0,J=0,Q=!1;for(let W=1;W<$.length;W++){let K=$[W];if(Q===!0){Q=!1;continue}if(K==="\\"){Q=!0;continue}if(K==='"'){J=J===1?0:1;continue}if(J===1)continue;if(K==="["){X++;continue}if(K==="]"&&X>0){X--;continue}if(X>0)continue;if(K==="("){G++;continue}if(K===")"){if(G--,G===0){if(Y===!0&&W!==$.length-1)return;return{type:$[0],body:$.slice(2,W),end:W}}}}},DF8=($)=>{let Y=0,X=[];while(Y<$.length){let J=AC0($.slice(Y),!1);if(!J||J.type!=="*")return;let Q=Jd1(J.body).map((K)=>K.trim());if(Q.length!==1)return;let W=Qd1(Q[0]);if(!W||W.length!==1)return;X.push(W),Y+=J.end+1}if(X.length<1)return;return`${X.length===1?RW.escapeRegex(X[0]):`[${X.map((J)=>RW.escapeRegex(J)).join("")}]`}*`},NF8=($)=>{let Y=0,X=$.trim(),G=AC0(X);while(G)Y++,X=G.body.trim(),G=AC0(X);return Y},AF8=($,Y)=>{if(Y.maxExtglobRecursion===!1)return{risky:!1};let X=typeof Y.maxExtglobRecursion==="number"?Y.maxExtglobRecursion:zf.DEFAULT_MAX_EXTGLOB_RECURSION,G=Jd1($).map((J)=>J.trim());if(G.length>1){if(G.some((J)=>J==="")||G.some((J)=>/^[*?]+$/.test(J))||LF8(G))return{risky:!0}}for(let J of G){let Q=DF8(J);if(Q)return{risky:!0,safeOutput:Q};if(NF8(J)>X)return{risky:!0}}return{risky:!1}},BC0=($,Y)=>{if(typeof $!=="string")throw TypeError("Expected a string");$=Gd1[$]||$;let X={...Y},G=typeof X.maxLength==="number"?Math.min(R40,X.maxLength):R40,J=$.length;if(J>G)throw SyntaxError(`Input length: ${J}, exceeds maximum allowed length: ${G}`);let Q={type:"bos",value:"",output:X.prepend||""},W=[Q],K=X.capture?"":"?:",Z=zf.globChars(X.windows),H=zf.extglobChars(Z),{DOT_LITERAL:z,PLUS_LITERAL:V,SLASH_LITERAL:F,ONE_CHAR:L,DOTS_SLASH:N,NO_DOT:D,NO_DOT_SLASH:A,NO_DOTS_SLASH:B,QMARK:O,QMARK_NO_DOT:E,STAR:M,START_ANCHOR:R}=Z,q=(X0)=>{return`(${K}(?:(?!${R}${X0.dot?N:z}).)*?)`},_=X.dot?"":D,P=X.dot?O:E,w=X.bash===!0?q(X):M;if(X.capture)w=`(${w})`;if(typeof X.noext==="boolean")X.noextglob=X.noext;let j={input:$,index:-1,start:0,dot:X.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:W};$=RW.removePrefix($,j),J=$.length;let C=[],k=[],S=[],I=Q,v,x=()=>j.index===J-1,y=j.peek=(X0=1)=>$[j.index+X0],d=j.advance=()=>$[++j.index]||"",u=()=>$.slice(j.index+1),b=(X0="",a=0)=>{j.consumed+=X0,j.index+=a},g=(X0)=>{j.output+=X0.output!=null?X0.output:X0.value,b(X0.value)},p=()=>{let X0=1;while(y()==="!"&&(y(2)!=="("||y(3)==="?"))d(),j.start++,X0++;if(X0%2===0)return!1;return j.negated=!0,j.start++,!0},h=(X0)=>{j[X0]++,S.push(X0)},n=(X0)=>{j[X0]--,S.pop()},t=(X0)=>{if(I.type==="globstar"){let a=j.braces>0&&(X0.type==="comma"||X0.type==="brace"),Q0=X0.extglob===!0||C.length&&(X0.type==="pipe"||X0.type==="paren");if(X0.type!=="slash"&&X0.type!=="paren"&&!a&&!Q0)j.output=j.output.slice(0,-I.output.length),I.type="star",I.value="*",I.output=w,j.output+=I.output}if(C.length&&X0.type!=="paren")C[C.length-1].inner+=X0.value;if(X0.value||X0.output)g(X0);if(I&&I.type==="text"&&X0.type==="text"){I.output=(I.output||I.value)+X0.value,I.value+=X0.value;return}X0.prev=I,W.push(X0),I=X0},s=(X0,a)=>{let Q0={...H[a],conditions:1,inner:""};Q0.prev=I,Q0.parens=j.parens,Q0.output=j.output,Q0.startIndex=j.index,Q0.tokensIndex=W.length;let e=(X.capture?"(":"")+Q0.open;h("parens"),t({type:X0,value:a,output:j.output?"":L}),t({type:"paren",extglob:!0,value:d(),output:e}),C.push(Q0)},K0=(X0)=>{let a=$.slice(X0.startIndex,j.index+1),Q0=$.slice(X0.startIndex+2,j.index),e=AF8(Q0,X);if((X0.type==="plus"||X0.type==="star")&&e.risky){let Y0=e.safeOutput?(X0.output?"":L)+(X.capture?`(${e.safeOutput})`:e.safeOutput):void 0,Z0=W[X0.tokensIndex];Z0.type="text",Z0.value=a,Z0.output=Y0||RW.escapeRegex(a);for(let F0=X0.tokensIndex+1;F0<W.length;F0++)W[F0].value="",W[F0].output="",delete W[F0].suffix;j.output=X0.output+Z0.output,j.backtrack=!0,t({type:"paren",extglob:!0,value:v,output:""}),n("parens");return}let m=X0.close+(X.capture?")":""),$0;if(X0.type==="negate"){let Y0=w;if(X0.inner&&X0.inner.length>1&&X0.inner.includes("/"))Y0=q(X);if(Y0!==w||x()||/^\)+$/.test(u()))m=X0.close=`)$))${Y0}`;if(X0.inner.includes("*")&&($0=u())&&/^\.[^\\/.]+$/.test($0)){let Z0=BC0($0,{...Y,fastpaths:!1}).output;m=X0.close=`)${Z0})${Y0})`}if(X0.prev.type==="bos")j.negatedExtglob=!0}t({type:"paren",extglob:!0,value:v,output:m}),n("parens")};if(X.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test($)){let X0=!1,a=$.replace(zF8,(Q0,e,m,$0,Y0,Z0)=>{if($0==="\\")return X0=!0,Q0;if($0==="?"){if(e)return e+$0+(Y0?O.repeat(Y0.length):"");if(Z0===0)return P+(Y0?O.repeat(Y0.length):"");return O.repeat(m.length)}if($0===".")return z.repeat(m.length);if($0==="*"){if(e)return e+$0+(Y0?w:"");return w}return e?Q0:`\\${Q0}`});if(X0===!0)if(X.unescape===!0)a=a.replace(/\\/g,"");else a=a.replace(/\\+/g,(Q0)=>{return Q0.length%2===0?"\\\\":Q0?"\\":""});if(a===$&&X.contains===!0)return j.output=$,j;return j.output=RW.wrapOutput(a,j,Y),j}while(!x()){if(v=d(),v==="\x00")continue;if(v==="\\"){let Q0=y();if(Q0==="/"&&X.bash!==!0)continue;if(Q0==="."||Q0===";")continue;if(!Q0){v+="\\",t({type:"text",value:v});continue}let e=/^\\+/.exec(u()),m=0;if(e&&e[0].length>2){if(m=e[0].length,j.index+=m,m%2!==0)v+="\\"}if(X.unescape===!0)v=d();else v+=d();if(j.brackets===0){t({type:"text",value:v});continue}}if(j.brackets>0&&(v!=="]"||I.value==="["||I.value==="[^")){if(X.posix!==!1&&v===":"){let Q0=I.value.slice(1);if(Q0.includes("[")){if(I.posix=!0,Q0.includes(":")){let e=I.value.lastIndexOf("["),m=I.value.slice(0,e),$0=I.value.slice(e+2),Y0=UF8[$0];if(Y0){if(I.value=m+Y0,j.backtrack=!0,d(),!Q.output&&W.indexOf(I)===1)Q.output=L;continue}}}}if(v==="["&&y()!==":"||v==="-"&&y()==="]")v=`\\${v}`;if(v==="]"&&(I.value==="["||I.value==="[^"))v=`\\${v}`;if(X.posix===!0&&v==="!"&&I.value==="[")v="^";I.value+=v,g({value:v});continue}if(j.quotes===1&&v!=='"'){v=RW.escapeRegex(v),I.value+=v,g({value:v});continue}if(v==='"'){if(j.quotes=j.quotes===1?0:1,X.keepQuotes===!0)t({type:"text",value:v});continue}if(v==="("){h("parens"),t({type:"paren",value:v});continue}if(v===")"){if(j.parens===0&&X.strictBrackets===!0)throw SyntaxError(O_("opening","("));let Q0=C[C.length-1];if(Q0&&j.parens===Q0.parens+1){K0(C.pop());continue}t({type:"paren",value:v,output:j.parens?")":"\\)"}),n("parens");continue}if(v==="["){if(X.nobracket===!0||!u().includes("]")){if(X.nobracket!==!0&&X.strictBrackets===!0)throw SyntaxError(O_("closing","]"));v=`\\${v}`}else h("brackets");t({type:"bracket",value:v});continue}if(v==="]"){if(X.nobracket===!0||I&&I.type==="bracket"&&I.value.length===1){t({type:"text",value:v,output:`\\${v}`});continue}if(j.brackets===0){if(X.strictBrackets===!0)throw SyntaxError(O_("opening","["));t({type:"text",value:v,output:`\\${v}`});continue}n("brackets");let Q0=I.value.slice(1);if(I.posix!==!0&&Q0[0]==="^"&&!Q0.includes("/"))v=`/${v}`;if(I.value+=v,g({value:v}),X.literalBrackets===!1||RW.hasRegexChars(Q0))continue;let e=RW.escapeRegex(I.value);if(j.output=j.output.slice(0,-I.value.length),X.literalBrackets===!0){j.output+=e,I.value=e;continue}I.value=`(${K}${e}|${I.value})`,j.output+=I.value;continue}if(v==="{"&&X.nobrace!==!0){h("braces");let Q0={type:"brace",value:v,output:"(",outputIndex:j.output.length,tokensIndex:j.tokens.length};k.push(Q0),t(Q0);continue}if(v==="}"){let Q0=k[k.length-1];if(X.nobrace===!0||!Q0){t({type:"text",value:v,output:v});continue}let e=")";if(Q0.dots===!0){let m=W.slice(),$0=[];for(let Y0=m.length-1;Y0>=0;Y0--){if(W.pop(),m[Y0].type==="brace")break;if(m[Y0].type!=="dots")$0.unshift(m[Y0].value)}e=VF8($0,X),j.backtrack=!0}if(Q0.comma!==!0&&Q0.dots!==!0){let m=j.output.slice(0,Q0.outputIndex),$0=j.tokens.slice(Q0.tokensIndex);Q0.value=Q0.output="\\{",v=e="\\}",j.output=m;for(let Y0 of $0)j.output+=Y0.output||Y0.value}t({type:"brace",value:v,output:e}),n("braces"),k.pop();continue}if(v==="|"){if(C.length>0)C[C.length-1].conditions++;t({type:"text",value:v});continue}if(v===","){let Q0=v,e=k[k.length-1];if(e&&S[S.length-1]==="braces")e.comma=!0,Q0="|";t({type:"comma",value:v,output:Q0});continue}if(v==="/"){if(I.type==="dot"&&j.index===j.start+1){j.start=j.index+1,j.consumed="",j.output="",W.pop(),I=Q;continue}t({type:"slash",value:v,output:F});continue}if(v==="."){if(j.braces>0&&I.type==="dot"){if(I.value===".")I.output=z;let Q0=k[k.length-1];I.type="dots",I.output+=v,I.value+=v,Q0.dots=!0;continue}if(j.braces+j.parens===0&&I.type!=="bos"&&I.type!=="slash"){t({type:"text",value:v,output:z});continue}t({type:"dot",value:v,output:z});continue}if(v==="?"){if(!(I&&I.value==="(")&&X.noextglob!==!0&&y()==="("&&y(2)!=="?"){s("qmark",v);continue}if(I&&I.type==="paren"){let e=y(),m=v;if(I.value==="("&&!/[!=<:]/.test(e)||e==="<"&&!/<([!=]|\w+>)/.test(u()))m=`\\${v}`;t({type:"text",value:v,output:m});continue}if(X.dot!==!0&&(I.type==="slash"||I.type==="bos")){t({type:"qmark",value:v,output:E});continue}t({type:"qmark",value:v,output:O});continue}if(v==="!"){if(X.noextglob!==!0&&y()==="("){if(y(2)!=="?"||!/[!=<:]/.test(y(3))){s("negate",v);continue}}if(X.nonegate!==!0&&j.index===0){p();continue}}if(v==="+"){if(X.noextglob!==!0&&y()==="("&&y(2)!=="?"){s("plus",v);continue}if(I&&I.value==="("||X.regex===!1){t({type:"plus",value:v,output:V});continue}if(I&&(I.type==="bracket"||I.type==="paren"||I.type==="brace")||j.parens>0){t({type:"plus",value:v});continue}t({type:"plus",value:V});continue}if(v==="@"){if(X.noextglob!==!0&&y()==="("&&y(2)!=="?"){t({type:"at",extglob:!0,value:v,output:""});continue}t({type:"text",value:v});continue}if(v!=="*"){if(v==="$"||v==="^")v=`\\${v}`;let Q0=HF8.exec(u());if(Q0)v+=Q0[0],j.index+=Q0[0].length;t({type:"text",value:v});continue}if(I&&(I.type==="globstar"||I.star===!0)){I.type="star",I.star=!0,I.value+=v,I.output=w,j.backtrack=!0,j.globstar=!0,b(v);continue}let X0=u();if(X.noextglob!==!0&&/^\([^?]/.test(X0)){s("star",v);continue}if(I.type==="star"){if(X.noglobstar===!0){b(v);continue}let Q0=I.prev,e=Q0.prev,m=Q0.type==="slash"||Q0.type==="bos",$0=e&&(e.type==="star"||e.type==="globstar");if(X.bash===!0&&(!m||X0[0]&&X0[0]!=="/")){t({type:"star",value:v,output:""});continue}let Y0=j.braces>0&&(Q0.type==="comma"||Q0.type==="brace"),Z0=C.length&&(Q0.type==="pipe"||Q0.type==="paren");if(!m&&Q0.type!=="paren"&&!Y0&&!Z0){t({type:"star",value:v,output:""});continue}while(X0.slice(0,3)==="/**"){let F0=$[j.index+4];if(F0&&F0!=="/")break;X0=X0.slice(3),b("/**",3)}if(Q0.type==="bos"&&x()){I.type="globstar",I.value+=v,I.output=q(X),j.output=I.output,j.globstar=!0,b(v);continue}if(Q0.type==="slash"&&Q0.prev.type!=="bos"&&!$0&&x()){j.output=j.output.slice(0,-(Q0.output+I.output).length),Q0.output=`(?:${Q0.output}`,I.type="globstar",I.output=q(X)+(X.strictSlashes?")":"|$)"),I.value+=v,j.globstar=!0,j.output+=Q0.output+I.output,b(v);continue}if(Q0.type==="slash"&&Q0.prev.type!=="bos"&&X0[0]==="/"){let F0=X0[1]!==void 0?"|$":"";j.output=j.output.slice(0,-(Q0.output+I.output).length),Q0.output=`(?:${Q0.output}`,I.type="globstar",I.output=`${q(X)}${F}|${F}${F0})`,I.value+=v,j.output+=Q0.output+I.output,j.globstar=!0,b(v+d()),t({type:"slash",value:"/",output:""});continue}if(Q0.type==="bos"&&X0[0]==="/"){I.type="globstar",I.value+=v,I.output=`(?:^|${F}|${q(X)}${F})`,j.output=I.output,j.globstar=!0,b(v+d()),t({type:"slash",value:"/",output:""});continue}j.output=j.output.slice(0,-I.output.length),I.type="globstar",I.output=q(X),I.value+=v,j.output+=I.output,j.globstar=!0,b(v);continue}let a={type:"star",value:v,output:w};if(X.bash===!0){if(a.output=".*?",I.type==="bos"||I.type==="slash")a.output=_+a.output;t(a);continue}if(I&&(I.type==="bracket"||I.type==="paren")&&X.regex===!0){a.output=v,t(a);continue}if(j.index===j.start||I.type==="slash"||I.type==="dot"){if(I.type==="dot")j.output+=A,I.output+=A;else if(X.dot===!0)j.output+=B,I.output+=B;else j.output+=_,I.output+=_;if(y()!=="*")j.output+=L,I.output+=L}t(a)}while(j.brackets>0){if(X.strictBrackets===!0)throw SyntaxError(O_("closing","]"));j.output=RW.escapeLast(j.output,"["),n("brackets")}while(j.parens>0){if(X.strictBrackets===!0)throw SyntaxError(O_("closing",")"));j.output=RW.escapeLast(j.output,"("),n("parens")}while(j.braces>0){if(X.strictBrackets===!0)throw SyntaxError(O_("closing","}"));j.output=RW.escapeLast(j.output,"{"),n("braces")}if(X.strictSlashes!==!0&&(I.type==="star"||I.type==="bracket"))t({type:"maybe_slash",value:"",output:`${F}?`});if(j.backtrack===!0){j.output="";for(let X0 of j.tokens)if(j.output+=X0.output!=null?X0.output:X0.value,X0.suffix)j.output+=X0.suffix}return j};BC0.fastpaths=($,Y)=>{let X={...Y},G=typeof X.maxLength==="number"?Math.min(R40,X.maxLength):R40,J=$.length;if(J>G)throw SyntaxError(`Input length: ${J}, exceeds maximum allowed length: ${G}`);$=Gd1[$]||$;let{DOT_LITERAL:Q,SLASH_LITERAL:W,ONE_CHAR:K,DOTS_SLASH:Z,NO_DOT:H,NO_DOTS:z,NO_DOTS_SLASH:V,STAR:F,START_ANCHOR:L}=zf.globChars(X.windows),N=X.dot?z:H,D=X.dot?V:H,A=X.capture?"":"?:",B={negated:!1,prefix:""},O=X.bash===!0?".*?":F;if(X.capture)O=`(${O})`;let E=(_)=>{if(_.noglobstar===!0)return O;return`(${A}(?:(?!${L}${_.dot?Z:Q}).)*?)`},M=(_)=>{switch(_){case"*":return`${N}${K}${O}`;case".*":return`${Q}${K}${O}`;case"*.*":return`${N}${O}${Q}${K}${O}`;case"*/*":return`${N}${O}${W}${K}${D}${O}`;case"**":return N+E(X);case"**/*":return`(?:${N}${E(X)}${W})?${D}${K}${O}`;case"**/*.*":return`(?:${N}${E(X)}${W})?${D}${O}${Q}${K}${O}`;case"**/.*":return`(?:${N}${E(X)}${W})?${Q}${K}${O}`;default:{let P=/^(.*?)\.(\w+)$/.exec(_);if(!P)return;let w=M(P[1]);if(!w)return;return w+Q+P[2]}}},R=RW.removePrefix($,B),q=M(R);if(q&&X.strictSlashes!==!0)q+=`${W}?`;return q};Wd1.exports=BC0});var Hd1=o((rd5,Ud1)=>{var BF8=Xd1(),OC0=Kd1(),Zd1=Uf(),OF8=Zf(),EF8=($)=>$&&typeof $==="object"&&!Array.isArray($),R7=($,Y,X=!1)=>{if(Array.isArray($)){let z=$.map((F)=>R7(F,Y,X));return(F)=>{for(let L of z){let N=L(F);if(N)return N}return!1}}let G=EF8($)&&$.tokens&&$.input;if($===""||typeof $!=="string"&&!G)throw TypeError("Expected pattern to be a non-empty string");let J=Y||{},Q=J.windows,W=G?R7.compileRe($,Y):R7.makeRe($,Y,!1,!0),K=W.state;delete W.state;let Z=()=>!1;if(J.ignore){let z={...Y,ignore:null,onMatch:null,onResult:null};Z=R7(J.ignore,z,X)}let H=(z,V=!1)=>{let{isMatch:F,match:L,output:N}=R7.test(z,W,Y,{glob:$,posix:Q}),D={glob:$,state:K,regex:W,posix:Q,input:z,output:N,match:L,isMatch:F};if(typeof J.onResult==="function")J.onResult(D);if(F===!1)return D.isMatch=!1,V?D:!1;if(Z(z)){if(typeof J.onIgnore==="function")J.onIgnore(D);return D.isMatch=!1,V?D:!1}if(typeof J.onMatch==="function")J.onMatch(D);return V?D:!0};if(X)H.state=K;return H};R7.test=($,Y,X,{glob:G,posix:J}={})=>{if(typeof $!=="string")throw TypeError("Expected input to be a string");if($==="")return{isMatch:!1,output:""};let Q=X||{},W=Q.format||(J?Zd1.toPosixSlashes:null),K=$===G,Z=K&&W?W($):$;if(K===!1)Z=W?W($):$,K=Z===G;if(K===!1||Q.capture===!0)if(Q.matchBase===!0||Q.basename===!0)K=R7.matchBase($,Y,X,J);else K=Y.exec(Z);return{isMatch:Boolean(K),match:K,output:Z}};R7.matchBase=($,Y,X)=>{return(Y instanceof RegExp?Y:R7.makeRe(Y,X)).test(Zd1.basename($))};R7.isMatch=($,Y,X)=>R7(Y,X)($);R7.parse=($,Y)=>{if(Array.isArray($))return $.map((X)=>R7.parse(X,Y));return OC0($,{...Y,fastpaths:!1})};R7.scan=($,Y)=>BF8($,Y);R7.compileRe=($,Y,X=!1,G=!1)=>{if(X===!0)return $.output;let J=Y||{},Q=J.contains?"":"^",W=J.contains?"":"$",K=`${Q}(?:${$.output})${W}`;if($&&$.negated===!0)K=`^(?!${K}).*$`;let Z=R7.toRegex(K,Y);if(G===!0)Z.state=$;return Z};R7.makeRe=($,Y={},X=!1,G=!1)=>{if(!$||typeof $!=="string")throw TypeError("Expected a non-empty string");let J={negated:!1,fastpaths:!0};if(Y.fastpaths!==!1&&($[0]==="."||$[0]==="*"))J.output=OC0.fastpaths($,Y);if(!J.output)J=OC0($,Y);return R7.compileRe(J,Y,X,G)};R7.toRegex=($,Y)=>{try{let X=Y||{};return new RegExp($,X.flags||(X.nocase?"i":""))}catch(X){if(Y&&Y.debug===!0)throw X;return/$^/}};R7.constants=OF8;Ud1.exports=R7});var Ld1=o((ad5,Fd1)=>{var zd1=Hd1(),MF8=Uf();function Vd1($,Y,X=!1){if(Y&&(Y.windows===null||Y.windows===void 0))Y={...Y,windows:MF8.isWindows()};return zd1($,Y,X)}Object.assign(Vd1,zd1);Fd1.exports=Vd1});var Vf=o((sd5,Nd1)=>{var RF8=Object.prototype.toString;Nd1.exports=function(Y){if(Y===void 0)return"undefined";if(Y===null)return"null";var X=typeof Y;if(X==="boolean")return"boolean";if(X==="string")return"string";if(X==="number")return"number";if(X==="symbol")return"symbol";if(X==="function")return jF8(Y)?"generatorfunction":"function";if(qF8(Y))return"array";if(CF8(Y))return"buffer";if(IF8(Y))return"arguments";if(wF8(Y))return"date";if(PF8(Y))return"error";if(_F8(Y))return"regexp";switch(Dd1(Y)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(TF8(Y))return"generator";switch(X=RF8.call(Y),X){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return X.slice(8,-1).toLowerCase().replace(/\s/g,"")};function Dd1($){return typeof $.constructor==="function"?$.constructor.name:null}function qF8($){if(Array.isArray)return Array.isArray($);return $ instanceof Array}function PF8($){return $ instanceof Error||typeof $.message==="string"&&$.constructor&&typeof $.constructor.stackTraceLimit==="number"}function wF8($){if($ instanceof Date)return!0;return typeof $.toDateString==="function"&&typeof $.getDate==="function"&&typeof $.setDate==="function"}function _F8($){if($ instanceof RegExp)return!0;return typeof $.flags==="string"&&typeof $.ignoreCase==="boolean"&&typeof $.multiline==="boolean"&&typeof $.global==="boolean"}function jF8($,Y){return Dd1($)==="GeneratorFunction"}function TF8($){return typeof $.throw==="function"&&typeof $.return==="function"&&typeof $.next==="function"}function IF8($){try{if(typeof $.length==="number"&&typeof $.callee==="function")return!0}catch(Y){if(Y.message.indexOf("callee")!==-1)return!0}return!1}function CF8($){if($.constructor&&typeof $.constructor.isBuffer==="function")return $.constructor.isBuffer($);return!1}});var Bd1=o((od5,Ad1)=>{/*!
 * is-extendable <https://github.com/jonschlinkert/is-extendable>
 *
 * Copyright (c) 2015, Jon Schlinkert.
 * Licensed under the MIT License.
 */Ad1.exports=function(Y){return typeof Y<"u"&&Y!==null&&(typeof Y==="object"||typeof Y==="function")}});var Md1=o((td5,Ed1)=>{var Od1=Bd1();Ed1.exports=function(Y){if(!Od1(Y))Y={};var X=arguments.length;for(var G=1;G<X;G++){var J=arguments[G];if(Od1(J))SF8(Y,J)}return Y};function SF8($,Y){for(var X in Y)if(kF8(Y,X))$[X]=Y[X]}function kF8($,Y){return Object.prototype.hasOwnProperty.call($,Y)}});var Pd1=o((ed5,qd1)=>{var vF8=Vf(),xF8=Md1();qd1.exports=function($,Y){if(typeof Y==="function")Y={parse:Y};var X=bF8($),G={section_delimiter:"---",parse:fF8},J=xF8({},G,Y),Q=J.section_delimiter,W=X.content.split(/\r?\n/),K=null,Z=Rd1(),H=[],z=[];function V(B){X.content=B,K=[],H=[]}function F(B){if(z.length)Z.key=hF8(z[0],Q),Z.content=B,J.parse(Z,K),K.push(Z),Z=Rd1(),H=[],z=[]}for(var L=0;L<W.length;L++){var N=W[L],D=z.length,A=N.trim();if(yF8(A,Q)){if(A.length===3&&L!==0){if(D===0||D===2){H.push(N);continue}z.push(A),Z.data=H.join(`
`),H=[];continue}if(K===null)V(H.join(`
`));if(D===2)F(H.join(`
`));z.push(A);continue}H.push(N)}if(K===null)V(H.join(`
`));else F(H.join(`
`));return X.sections=K,X};function yF8($,Y){if($.slice(0,Y.length)!==Y)return!1;if($.charAt(Y.length+1)===Y.slice(-1))return!1;return!0}function bF8($){if(vF8($)!=="object")$={content:$};if(typeof $.content!=="string"&&!gF8($.content))throw TypeError("expected a buffer or string");return $.content=$.content.toString(),$.sections=[],$}function hF8($,Y){return $?$.slice(Y.length).trim():""}function Rd1(){return{key:"",data:"",content:""}}function fF8($){return $}function gF8($){if($&&$.constructor&&typeof $.constructor.isBuffer==="function")return $.constructor.isBuffer($);return!1}});var NO=o((lF8,DO)=>{function wd1($){return typeof $>"u"||$===null}function mF8($){return typeof $==="object"&&$!==null}function uF8($){if(Array.isArray($))return $;else if(wd1($))return[];return[$]}function pF8($,Y){var X,G,J,Q;if(Y){Q=Object.keys(Y);for(X=0,G=Q.length;X<G;X+=1)J=Q[X],$[J]=Y[J]}return $}function dF8($,Y){var X="",G;for(G=0;G<Y;G+=1)X+=$;return X}function cF8($){return $===0&&Number.NEGATIVE_INFINITY===1/$}lF8.isNothing=wd1;lF8.isObject=mF8;lF8.toArray=uF8;lF8.repeat=dF8;lF8.isNegativeZero=cF8;lF8.extend=pF8});var E_=o(($c5,_d1)=>{function Ff($,Y){if(Error.call(this),this.name="YAMLException",this.reason=$,this.mark=Y,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}Ff.prototype=Object.create(Error.prototype);Ff.prototype.constructor=Ff;Ff.prototype.toString=function(Y){var X=this.name+": ";if(X+=this.reason||"(unknown reason)",!Y&&this.mark)X+=" "+this.mark.toString();return X};_d1.exports=Ff});var Id1=o((Yc5,Td1)=>{var jd1=NO();function EC0($,Y,X,G,J){this.name=$,this.buffer=Y,this.position=X,this.line=G,this.column=J}EC0.prototype.getSnippet=function(Y,X){var G,J,Q,W,K;if(!this.buffer)return null;Y=Y||4,X=X||75,G="",J=this.position;while(J>0&&`\x00\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(J-1))===-1)if(J-=1,this.position-J>X/2-1){G=" ... ",J+=5;break}Q="",W=this.position;while(W<this.buffer.length&&`\x00\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(W))===-1)if(W+=1,W-this.position>X/2-1){Q=" ... ",W-=5;break}return K=this.buffer.slice(J,W),jd1.repeat(" ",Y)+G+K+Q+`
`+jd1.repeat(" ",Y+this.position-J+G.length)+"^"};EC0.prototype.toString=function(Y){var X,G="";if(this.name)G+='in "'+this.name+'" ';if(G+="at line "+(this.line+1)+", column "+(this.column+1),!Y){if(X=this.getSnippet(),X)G+=`:
`+X}return G};Td1.exports=EC0});var HY=o((Xc5,Sd1)=>{var Cd1=E_(),tF8=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],eF8=["scalar","sequence","mapping"];function $L8($){var Y={};if($!==null)Object.keys($).forEach(function(X){$[X].forEach(function(G){Y[String(G)]=X})});return Y}function YL8($,Y){if(Y=Y||{},Object.keys(Y).forEach(function(X){if(tF8.indexOf(X)===-1)throw new Cd1('Unknown option "'+X+'" is met in definition of "'+$+'" YAML type.')}),this.tag=$,this.kind=Y.kind||null,this.resolve=Y.resolve||function(){return!0},this.construct=Y.construct||function(X){return X},this.instanceOf=Y.instanceOf||null,this.predicate=Y.predicate||null,this.represent=Y.represent||null,this.defaultStyle=Y.defaultStyle||null,this.styleAliases=$L8(Y.styleAliases||null),eF8.indexOf(this.kind)===-1)throw new Cd1('Unknown kind "'+this.kind+'" is specified for "'+$+'" YAML type.')}Sd1.exports=YL8});var AO=o((Gc5,vd1)=>{var kd1=NO(),q40=E_(),XL8=HY();function MC0($,Y,X){var G=[];return $.include.forEach(function(J){X=MC0(J,Y,X)}),$[Y].forEach(function(J){X.forEach(function(Q,W){if(Q.tag===J.tag&&Q.kind===J.kind)G.push(W)}),X.push(J)}),X.filter(function(J,Q){return G.indexOf(Q)===-1})}function GL8(){var $={scalar:{},sequence:{},mapping:{},fallback:{}},Y,X;function G(J){$[J.kind][J.tag]=$.fallback[J.tag]=J}for(Y=0,X=arguments.length;Y<X;Y+=1)arguments[Y].forEach(G);return $}function M_($){this.include=$.include||[],this.implicit=$.implicit||[],this.explicit=$.explicit||[],this.implicit.forEach(function(Y){if(Y.loadKind&&Y.loadKind!=="scalar")throw new q40("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=MC0(this,"implicit",[]),this.compiledExplicit=MC0(this,"explicit",[]),this.compiledTypeMap=GL8(this.compiledImplicit,this.compiledExplicit)}M_.DEFAULT=null;M_.create=function(){var Y,X;switch(arguments.length){case 1:Y=M_.DEFAULT,X=arguments[0];break;case 2:Y=arguments[0],X=arguments[1];break;default:throw new q40("Wrong number of arguments for Schema.create function")}if(Y=kd1.toArray(Y),X=kd1.toArray(X),!Y.every(function(G){return G instanceof M_}))throw new q40("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!X.every(function(G){return G instanceof XL8}))throw new q40("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new M_({include:Y,explicit:X})};vd1.exports=M_});var yd1=o((Jc5,xd1)=>{var JL8=HY();xd1.exports=new JL8("tag:yaml.org,2002:str",{kind:"scalar",construct:function($){return $!==null?$:""}})});var hd1=o((Qc5,bd1)=>{var QL8=HY();bd1.exports=new QL8("tag:yaml.org,2002:seq",{kind:"sequence",construct:function($){return $!==null?$:[]}})});var gd1=o((Wc5,fd1)=>{var WL8=HY();fd1.exports=new WL8("tag:yaml.org,2002:map",{kind:"mapping",construct:function($){return $!==null?$:{}}})});var P40=o((Kc5,md1)=>{var KL8=AO();md1.exports=new KL8({explicit:[yd1(),hd1(),gd1()]})});var pd1=o((Zc5,ud1)=>{var ZL8=HY();function UL8($){if($===null)return!0;var Y=$.length;return Y===1&&$==="~"||Y===4&&($==="null"||$==="Null"||$==="NULL")}function HL8(){return null}function zL8($){return $===null}ud1.exports=new ZL8("tag:yaml.org,2002:null",{kind:"scalar",resolve:UL8,construct:HL8,predicate:zL8,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var cd1=o((Uc5,dd1)=>{var VL8=HY();function FL8($){if($===null)return!1;var Y=$.length;return Y===4&&($==="true"||$==="True"||$==="TRUE")||Y===5&&($==="false"||$==="False"||$==="FALSE")}function LL8($){return $==="true"||$==="True"||$==="TRUE"}function DL8($){return Object.prototype.toString.call($)==="[object Boolean]"}dd1.exports=new VL8("tag:yaml.org,2002:bool",{kind:"scalar",resolve:FL8,construct:LL8,predicate:DL8,represent:{lowercase:function($){return $?"true":"false"},uppercase:function($){return $?"TRUE":"FALSE"},camelcase:function($){return $?"True":"False"}},defaultStyle:"lowercase"})});var id1=o((Hc5,ld1)=>{var NL8=NO(),AL8=HY();function BL8($){return 48<=$&&$<=57||65<=$&&$<=70||97<=$&&$<=102}function OL8($){return 48<=$&&$<=55}function EL8($){return 48<=$&&$<=57}function ML8($){if($===null)return!1;var Y=$.length,X=0,G=!1,J;if(!Y)return!1;if(J=$[X],J==="-"||J==="+")J=$[++X];if(J==="0"){if(X+1===Y)return!0;if(J=$[++X],J==="b"){X++;for(;X<Y;X++){if(J=$[X],J==="_")continue;if(J!=="0"&&J!=="1")return!1;G=!0}return G&&J!=="_"}if(J==="x"){X++;for(;X<Y;X++){if(J=$[X],J==="_")continue;if(!BL8($.charCodeAt(X)))return!1;G=!0}return G&&J!=="_"}for(;X<Y;X++){if(J=$[X],J==="_")continue;if(!OL8($.charCodeAt(X)))return!1;G=!0}return G&&J!=="_"}if(J==="_")return!1;for(;X<Y;X++){if(J=$[X],J==="_")continue;if(J===":")break;if(!EL8($.charCodeAt(X)))return!1;G=!0}if(!G||J==="_")return!1;if(J!==":")return!0;return/^(:[0-5]?[0-9])+$/.test($.slice(X))}function RL8($){var Y=$,X=1,G,J,Q=[];if(Y.indexOf("_")!==-1)Y=Y.replace(/_/g,"");if(G=Y[0],G==="-"||G==="+"){if(G==="-")X=-1;Y=Y.slice(1),G=Y[0]}if(Y==="0")return 0;if(G==="0"){if(Y[1]==="b")return X*parseInt(Y.slice(2),2);if(Y[1]==="x")return X*parseInt(Y,16);return X*parseInt(Y,8)}if(Y.indexOf(":")!==-1)return Y.split(":").forEach(function(W){Q.unshift(parseInt(W,10))}),Y=0,J=1,Q.forEach(function(W){Y+=W*J,J*=60}),X*Y;return X*parseInt(Y,10)}function qL8($){return Object.prototype.toString.call($)==="[object Number]"&&($%1===0&&!NL8.isNegativeZero($))}ld1.exports=new AL8("tag:yaml.org,2002:int",{kind:"scalar",resolve:ML8,construct:RL8,predicate:qL8,represent:{binary:function($){return $>=0?"0b"+$.toString(2):"-0b"+$.toString(2).slice(1)},octal:function($){return $>=0?"0"+$.toString(8):"-0"+$.toString(8).slice(1)},decimal:function($){return $.toString(10)},hexadecimal:function($){return $>=0?"0x"+$.toString(16).toUpperCase():"-0x"+$.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var ad1=o((zc5,rd1)=>{var nd1=NO(),PL8=HY(),wL8=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function _L8($){if($===null)return!1;if(!wL8.test($)||$[$.length-1]==="_")return!1;return!0}function jL8($){var Y,X,G,J;if(Y=$.replace(/_/g,"").toLowerCase(),X=Y[0]==="-"?-1:1,J=[],"+-".indexOf(Y[0])>=0)Y=Y.slice(1);if(Y===".inf")return X===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(Y===".nan")return NaN;else if(Y.indexOf(":")>=0)return Y.split(":").forEach(function(Q){J.unshift(parseFloat(Q,10))}),Y=0,G=1,J.forEach(function(Q){Y+=Q*G,G*=60}),X*Y;return X*parseFloat(Y,10)}var TL8=/^[-+]?[0-9]+e/;function IL8($,Y){var X;if(isNaN($))switch(Y){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===$)switch(Y){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===$)switch(Y){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(nd1.isNegativeZero($))return"-0.0";return X=$.toString(10),TL8.test(X)?X.replace("e",".e"):X}function CL8($){return Object.prototype.toString.call($)==="[object Number]"&&($%1!==0||nd1.isNegativeZero($))}rd1.exports=new PL8("tag:yaml.org,2002:float",{kind:"scalar",resolve:_L8,construct:jL8,predicate:CL8,represent:IL8,defaultStyle:"lowercase"})});var RC0=o((Vc5,sd1)=>{var SL8=AO();sd1.exports=new SL8({include:[P40()],implicit:[pd1(),cd1(),id1(),ad1()]})});var qC0=o((Fc5,od1)=>{var kL8=AO();od1.exports=new kL8({include:[RC0()]})});var Yc1=o((Lc5,$c1)=>{var vL8=HY(),td1=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ed1=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function xL8($){if($===null)return!1;if(td1.exec($)!==null)return!0;if(ed1.exec($)!==null)return!0;return!1}function yL8($){var Y,X,G,J,Q,W,K,Z=0,H=null,z,V,F;if(Y=td1.exec($),Y===null)Y=ed1.exec($);if(Y===null)throw Error("Date resolve error");if(X=+Y[1],G=+Y[2]-1,J=+Y[3],!Y[4])return new Date(Date.UTC(X,G,J));if(Q=+Y[4],W=+Y[5],K=+Y[6],Y[7]){Z=Y[7].slice(0,3);while(Z.length<3)Z+="0";Z=+Z}if(Y[9]){if(z=+Y[10],V=+(Y[11]||0),H=(z*60+V)*60000,Y[9]==="-")H=-H}if(F=new Date(Date.UTC(X,G,J,Q,W,K,Z)),H)F.setTime(F.getTime()-H);return F}function bL8($){return $.toISOString()}$c1.exports=new vL8("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:xL8,construct:yL8,instanceOf:Date,represent:bL8})});var Gc1=o((Dc5,Xc1)=>{var hL8=HY();function fL8($){return $==="<<"||$===null}Xc1.exports=new hL8("tag:yaml.org,2002:merge",{kind:"scalar",resolve:fL8})});var Qc1=o((Nc5,Jc1)=>{var BO;try{PC0=A0,BO=PC0("buffer").Buffer}catch($){}var PC0,gL8=HY(),wC0=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function mL8($){if($===null)return!1;var Y,X,G=0,J=$.length,Q=wC0;for(X=0;X<J;X++){if(Y=Q.indexOf($.charAt(X)),Y>64)continue;if(Y<0)return!1;G+=6}return G%8===0}function uL8($){var Y,X,G=$.replace(/[\r\n=]/g,""),J=G.length,Q=wC0,W=0,K=[];for(Y=0;Y<J;Y++){if(Y%4===0&&Y)K.push(W>>16&255),K.push(W>>8&255),K.push(W&255);W=W<<6|Q.indexOf(G.charAt(Y))}if(X=J%4*6,X===0)K.push(W>>16&255),K.push(W>>8&255),K.push(W&255);else if(X===18)K.push(W>>10&255),K.push(W>>2&255);else if(X===12)K.push(W>>4&255);if(BO)return BO.from?BO.from(K):new BO(K);return K}function pL8($){var Y="",X=0,G,J,Q=$.length,W=wC0;for(G=0;G<Q;G++){if(G%3===0&&G)Y+=W[X>>18&63],Y+=W[X>>12&63],Y+=W[X>>6&63],Y+=W[X&63];X=(X<<8)+$[G]}if(J=Q%3,J===0)Y+=W[X>>18&63],Y+=W[X>>12&63],Y+=W[X>>6&63],Y+=W[X&63];else if(J===2)Y+=W[X>>10&63],Y+=W[X>>4&63],Y+=W[X<<2&63],Y+=W[64];else if(J===1)Y+=W[X>>2&63],Y+=W[X<<4&63],Y+=W[64],Y+=W[64];return Y}function dL8($){return BO&&BO.isBuffer($)}Jc1.exports=new gL8("tag:yaml.org,2002:binary",{kind:"scalar",resolve:mL8,construct:uL8,predicate:dL8,represent:pL8})});var Kc1=o((Bc5,Wc1)=>{var cL8=HY(),lL8=Object.prototype.hasOwnProperty,iL8=Object.prototype.toString;function nL8($){if($===null)return!0;var Y=[],X,G,J,Q,W,K=$;for(X=0,G=K.length;X<G;X+=1){if(J=K[X],W=!1,iL8.call(J)!=="[object Object]")return!1;for(Q in J)if(lL8.call(J,Q))if(!W)W=!0;else return!1;if(!W)return!1;if(Y.indexOf(Q)===-1)Y.push(Q);else return!1}return!0}function rL8($){return $!==null?$:[]}Wc1.exports=new cL8("tag:yaml.org,2002:omap",{kind:"sequence",resolve:nL8,construct:rL8})});var Uc1=o((Oc5,Zc1)=>{var aL8=HY(),sL8=Object.prototype.toString;function oL8($){if($===null)return!0;var Y,X,G,J,Q,W=$;Q=Array(W.length);for(Y=0,X=W.length;Y<X;Y+=1){if(G=W[Y],sL8.call(G)!=="[object Object]")return!1;if(J=Object.keys(G),J.length!==1)return!1;Q[Y]=[J[0],G[J[0]]]}return!0}function tL8($){if($===null)return[];var Y,X,G,J,Q,W=$;Q=Array(W.length);for(Y=0,X=W.length;Y<X;Y+=1)G=W[Y],J=Object.keys(G),Q[Y]=[J[0],G[J[0]]];return Q}Zc1.exports=new aL8("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:oL8,construct:tL8})});var zc1=o((Ec5,Hc1)=>{var eL8=HY(),$D8=Object.prototype.hasOwnProperty;function YD8($){if($===null)return!0;var Y,X=$;for(Y in X)if($D8.call(X,Y)){if(X[Y]!==null)return!1}return!0}function XD8($){return $!==null?$:{}}Hc1.exports=new eL8("tag:yaml.org,2002:set",{kind:"mapping",resolve:YD8,construct:XD8})});var R_=o((Mc5,Vc1)=>{var GD8=AO();Vc1.exports=new GD8({include:[qC0()],implicit:[Yc1(),Gc1()],explicit:[Qc1(),Kc1(),Uc1(),zc1()]})});var Lc1=o((Rc5,Fc1)=>{var JD8=HY();function QD8(){return!0}function WD8(){return}function KD8(){return""}function ZD8($){return typeof $>"u"}Fc1.exports=new JD8("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:QD8,construct:WD8,predicate:ZD8,represent:KD8})});var Nc1=o((qc5,Dc1)=>{var UD8=HY();function HD8($){if($===null)return!1;if($.length===0)return!1;var Y=$,X=/\/([gim]*)$/.exec($),G="";if(Y[0]==="/"){if(X)G=X[1];if(G.length>3)return!1;if(Y[Y.length-G.length-1]!=="/")return!1}return!0}function zD8($){var Y=$,X=/\/([gim]*)$/.exec($),G="";if(Y[0]==="/"){if(X)G=X[1];Y=Y.slice(1,Y.length-G.length-1)}return new RegExp(Y,G)}function VD8($){var Y="/"+$.source+"/";if($.global)Y+="g";if($.multiline)Y+="m";if($.ignoreCase)Y+="i";return Y}function FD8($){return Object.prototype.toString.call($)==="[object RegExp]"}Dc1.exports=new UD8("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:HD8,construct:zD8,predicate:FD8,represent:VD8})});var Bc1=o((Pc5,Ac1)=>{var w40;try{_C0=A0,w40=_C0("esprima")}catch($){if(typeof window<"u")w40=window.esprima}var _C0,LD8=HY();function DD8($){if($===null)return!1;try{var Y="("+$+")",X=w40.parse(Y,{range:!0});if(X.type!=="Program"||X.body.length!==1||X.body[0].type!=="ExpressionStatement"||X.body[0].expression.type!=="ArrowFunctionExpression"&&X.body[0].expression.type!=="FunctionExpression")return!1;return!0}catch(G){return!1}}function ND8($){var Y="("+$+")",X=w40.parse(Y,{range:!0}),G=[],J;if(X.type!=="Program"||X.body.length!==1||X.body[0].type!=="ExpressionStatement"||X.body[0].expression.type!=="ArrowFunctionExpression"&&X.body[0].expression.type!=="FunctionExpression")throw Error("Failed to resolve function");if(X.body[0].expression.params.forEach(function(Q){G.push(Q.name)}),J=X.body[0].expression.body.range,X.body[0].expression.body.type==="BlockStatement")return Function(G,Y.slice(J[0]+1,J[1]-1));return Function(G,"return "+Y.slice(J[0],J[1]))}function AD8($){return $.toString()}function BD8($){return Object.prototype.toString.call($)==="[object Function]"}Ac1.exports=new LD8("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:DD8,construct:ND8,predicate:BD8,represent:AD8})});var Lf=o((_c5,Ec1)=>{var Oc1=AO();Ec1.exports=Oc1.DEFAULT=new Oc1({include:[R_()],explicit:[Lc1(),Nc1(),Bc1()]})});var mc1=o((pD8,Df)=>{var Cz=NO(),jc1=E_(),OD8=Id1(),Tc1=R_(),ED8=Lf(),pL=Object.prototype.hasOwnProperty,_40=1,Ic1=2,Cc1=3,j40=4,jC0=1,MD8=2,Mc1=3,RD8=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,qD8=/[\x85\u2028\u2029]/,PD8=/[,\[\]\{\}]/,Sc1=/^(?:!|!!|![a-z\-]+!)$/i,kc1=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Rc1($){return Object.prototype.toString.call($)}function B3($){return $===10||$===13}function OO($){return $===9||$===32}function FQ($){return $===9||$===32||$===10||$===13}function q_($){return $===44||$===91||$===93||$===123||$===125}function wD8($){var Y;if(48<=$&&$<=57)return $-48;if(Y=$|32,97<=Y&&Y<=102)return Y-97+10;return-1}function _D8($){if($===120)return 2;if($===117)return 4;if($===85)return 8;return 0}function jD8($){if(48<=$&&$<=57)return $-48;return-1}function qc1($){return $===48?"\x00":$===97?"\x07":$===98?"\b":$===116?"\t":$===9?"\t":$===110?`
`:$===118?"\v":$===102?"\f":$===114?"\r":$===101?"\x1B":$===32?" ":$===34?'"':$===47?"/":$===92?"\\":$===78?"\x85":$===95?"\xA0":$===76?"\u2028":$===80?"\u2029":""}function TD8($){if($<=65535)return String.fromCharCode($);return String.fromCharCode(($-65536>>10)+55296,($-65536&1023)+56320)}function vc1($,Y,X){if(Y==="__proto__")Object.defineProperty($,Y,{configurable:!0,enumerable:!0,writable:!0,value:X});else $[Y]=X}var xc1=Array(256),yc1=Array(256);for(mL=0;mL<256;mL++)xc1[mL]=qc1(mL)?1:0,yc1[mL]=qc1(mL);var mL;function ID8($,Y){this.input=$,this.filename=Y.filename||null,this.schema=Y.schema||ED8,this.onWarning=Y.onWarning||null,this.legacy=Y.legacy||!1,this.json=Y.json||!1,this.listener=Y.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=$.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function bc1($,Y){return new jc1(Y,new OD8($.filename,$.input,$.position,$.line,$.position-$.lineStart))}function s4($,Y){throw bc1($,Y)}function T40($,Y){if($.onWarning)$.onWarning.call(null,bc1($,Y))}var Pc1={YAML:function(Y,X,G){var J,Q,W;if(Y.version!==null)s4(Y,"duplication of %YAML directive");if(G.length!==1)s4(Y,"YAML directive accepts exactly one argument");if(J=/^([0-9]+)\.([0-9]+)$/.exec(G[0]),J===null)s4(Y,"ill-formed argument of the YAML directive");if(Q=parseInt(J[1],10),W=parseInt(J[2],10),Q!==1)s4(Y,"unacceptable YAML version of the document");if(Y.version=G[0],Y.checkLineBreaks=W<2,W!==1&&W!==2)T40(Y,"unsupported YAML version of the document")},TAG:function(Y,X,G){var J,Q;if(G.length!==2)s4(Y,"TAG directive accepts exactly two arguments");if(J=G[0],Q=G[1],!Sc1.test(J))s4(Y,"ill-formed tag handle (first argument) of the TAG directive");if(pL.call(Y.tagMap,J))s4(Y,'there is a previously declared suffix for "'+J+'" tag handle');if(!kc1.test(Q))s4(Y,"ill-formed tag prefix (second argument) of the TAG directive");Y.tagMap[J]=Q}};function uL($,Y,X,G){var J,Q,W,K;if(Y<X){if(K=$.input.slice(Y,X),G){for(J=0,Q=K.length;J<Q;J+=1)if(W=K.charCodeAt(J),!(W===9||32<=W&&W<=1114111))s4($,"expected valid JSON character")}else if(RD8.test(K))s4($,"the stream contains non-printable characters");$.result+=K}}function wc1($,Y,X,G){var J,Q,W,K;if(!Cz.isObject(X))s4($,"cannot merge mappings; the provided source object is unacceptable");J=Object.keys(X);for(W=0,K=J.length;W<K;W+=1)if(Q=J[W],!pL.call(Y,Q))vc1(Y,Q,X[Q]),G[Q]=!0}function P_($,Y,X,G,J,Q,W,K){var Z,H;if(Array.isArray(J)){J=Array.prototype.slice.call(J);for(Z=0,H=J.length;Z<H;Z+=1){if(Array.isArray(J[Z]))s4($,"nested arrays are not supported inside keys");if(typeof J==="object"&&Rc1(J[Z])==="[object Object]")J[Z]="[object Object]"}}if(typeof J==="object"&&Rc1(J)==="[object Object]")J="[object Object]";if(J=String(J),Y===null)Y={};if(G==="tag:yaml.org,2002:merge")if(Array.isArray(Q))for(Z=0,H=Q.length;Z<H;Z+=1)wc1($,Y,Q[Z],X);else wc1($,Y,Q,X);else{if(!$.json&&!pL.call(X,J)&&pL.call(Y,J))$.line=W||$.line,$.position=K||$.position,s4($,"duplicated mapping key");vc1(Y,J,Q),delete X[J]}return Y}function TC0($){var Y=$.input.charCodeAt($.position);if(Y===10)$.position++;else if(Y===13){if($.position++,$.input.charCodeAt($.position)===10)$.position++}else s4($,"a line break is expected");$.line+=1,$.lineStart=$.position}function h7($,Y,X){var G=0,J=$.input.charCodeAt($.position);while(J!==0){while(OO(J))J=$.input.charCodeAt(++$.position);if(Y&&J===35)do J=$.input.charCodeAt(++$.position);while(J!==10&&J!==13&&J!==0);if(B3(J)){TC0($),J=$.input.charCodeAt($.position),G++,$.lineIndent=0;while(J===32)$.lineIndent++,J=$.input.charCodeAt(++$.position)}else break}if(X!==-1&&G!==0&&$.lineIndent<X)T40($,"deficient indentation");return G}function I40($){var Y=$.position,X;if(X=$.input.charCodeAt(Y),(X===45||X===46)&&X===$.input.charCodeAt(Y+1)&&X===$.input.charCodeAt(Y+2)){if(Y+=3,X=$.input.charCodeAt(Y),X===0||FQ(X))return!0}return!1}function IC0($,Y){if(Y===1)$.result+=" ";else if(Y>1)$.result+=Cz.repeat(`
`,Y-1)}function CD8($,Y,X){var G,J,Q,W,K,Z,H,z,V=$.kind,F=$.result,L;if(L=$.input.charCodeAt($.position),FQ(L)||q_(L)||L===35||L===38||L===42||L===33||L===124||L===62||L===39||L===34||L===37||L===64||L===96)return!1;if(L===63||L===45){if(J=$.input.charCodeAt($.position+1),FQ(J)||X&&q_(J))return!1}$.kind="scalar",$.result="",Q=W=$.position,K=!1;while(L!==0){if(L===58){if(J=$.input.charCodeAt($.position+1),FQ(J)||X&&q_(J))break}else if(L===35){if(G=$.input.charCodeAt($.position-1),FQ(G))break}else if($.position===$.lineStart&&I40($)||X&&q_(L))break;else if(B3(L))if(Z=$.line,H=$.lineStart,z=$.lineIndent,h7($,!1,-1),$.lineIndent>=Y){K=!0,L=$.input.charCodeAt($.position);continue}else{$.position=W,$.line=Z,$.lineStart=H,$.lineIndent=z;break}if(K)uL($,Q,W,!1),IC0($,$.line-Z),Q=W=$.position,K=!1;if(!OO(L))W=$.position+1;L=$.input.charCodeAt(++$.position)}if(uL($,Q,W,!1),$.result)return!0;return $.kind=V,$.result=F,!1}function SD8($,Y){var X,G,J;if(X=$.input.charCodeAt($.position),X!==39)return!1;$.kind="scalar",$.result="",$.position++,G=J=$.position;while((X=$.input.charCodeAt($.position))!==0)if(X===39)if(uL($,G,$.position,!0),X=$.input.charCodeAt(++$.position),X===39)G=$.position,$.position++,J=$.position;else return!0;else if(B3(X))uL($,G,J,!0),IC0($,h7($,!1,Y)),G=J=$.position;else if($.position===$.lineStart&&I40($))s4($,"unexpected end of the document within a single quoted scalar");else $.position++,J=$.position;s4($,"unexpected end of the stream within a single quoted scalar")}function kD8($,Y){var X,G,J,Q,W,K;if(K=$.input.charCodeAt($.position),K!==34)return!1;$.kind="scalar",$.result="",$.position++,X=G=$.position;while((K=$.input.charCodeAt($.position))!==0)if(K===34)return uL($,X,$.position,!0),$.position++,!0;else if(K===92){if(uL($,X,$.position,!0),K=$.input.charCodeAt(++$.position),B3(K))h7($,!1,Y);else if(K<256&&xc1[K])$.result+=yc1[K],$.position++;else if((W=_D8(K))>0){J=W,Q=0;for(;J>0;J--)if(K=$.input.charCodeAt(++$.position),(W=wD8(K))>=0)Q=(Q<<4)+W;else s4($,"expected hexadecimal character");$.result+=TD8(Q),$.position++}else s4($,"unknown escape sequence");X=G=$.position}else if(B3(K))uL($,X,G,!0),IC0($,h7($,!1,Y)),X=G=$.position;else if($.position===$.lineStart&&I40($))s4($,"unexpected end of the document within a double quoted scalar");else $.position++,G=$.position;s4($,"unexpected end of the stream within a double quoted scalar")}function vD8($,Y){var X=!0,G,J=$.tag,Q,W=$.anchor,K,Z,H,z,V,F={},L,N,D,A;if(A=$.input.charCodeAt($.position),A===91)Z=93,V=!1,Q=[];else if(A===123)Z=125,V=!0,Q={};else return!1;if($.anchor!==null)$.anchorMap[$.anchor]=Q;A=$.input.charCodeAt(++$.position);while(A!==0){if(h7($,!0,Y),A=$.input.charCodeAt($.position),A===Z)return $.position++,$.tag=J,$.anchor=W,$.kind=V?"mapping":"sequence",$.result=Q,!0;else if(!X)s4($,"missed comma between flow collection entries");if(N=L=D=null,H=z=!1,A===63){if(K=$.input.charCodeAt($.position+1),FQ(K))H=z=!0,$.position++,h7($,!0,Y)}if(G=$.line,w_($,Y,_40,!1,!0),N=$.tag,L=$.result,h7($,!0,Y),A=$.input.charCodeAt($.position),(z||$.line===G)&&A===58)H=!0,A=$.input.charCodeAt(++$.position),h7($,!0,Y),w_($,Y,_40,!1,!0),D=$.result;if(V)P_($,Q,F,N,L,D);else if(H)Q.push(P_($,null,F,N,L,D));else Q.push(L);if(h7($,!0,Y),A=$.input.charCodeAt($.position),A===44)X=!0,A=$.input.charCodeAt(++$.position);else X=!1}s4($,"unexpected end of the stream within a flow collection")}function xD8($,Y){var X,G,J=jC0,Q=!1,W=!1,K=Y,Z=0,H=!1,z,V;if(V=$.input.charCodeAt($.position),V===124)G=!1;else if(V===62)G=!0;else return!1;$.kind="scalar",$.result="";while(V!==0)if(V=$.input.charCodeAt(++$.position),V===43||V===45)if(jC0===J)J=V===43?Mc1:MD8;else s4($,"repeat of a chomping mode identifier");else if((z=jD8(V))>=0)if(z===0)s4($,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!W)K=Y+z-1,W=!0;else s4($,"repeat of an indentation width identifier");else break;if(OO(V)){do V=$.input.charCodeAt(++$.position);while(OO(V));if(V===35)do V=$.input.charCodeAt(++$.position);while(!B3(V)&&V!==0)}while(V!==0){TC0($),$.lineIndent=0,V=$.input.charCodeAt($.position);while((!W||$.lineIndent<K)&&V===32)$.lineIndent++,V=$.input.charCodeAt(++$.position);if(!W&&$.lineIndent>K)K=$.lineIndent;if(B3(V)){Z++;continue}if($.lineIndent<K){if(J===Mc1)$.result+=Cz.repeat(`
`,Q?1+Z:Z);else if(J===jC0){if(Q)$.result+=`
`}break}if(G)if(OO(V))H=!0,$.result+=Cz.repeat(`
`,Q?1+Z:Z);else if(H)H=!1,$.result+=Cz.repeat(`
`,Z+1);else if(Z===0){if(Q)$.result+=" "}else $.result+=Cz.repeat(`
`,Z);else $.result+=Cz.repeat(`
`,Q?1+Z:Z);Q=!0,W=!0,Z=0,X=$.position;while(!B3(V)&&V!==0)V=$.input.charCodeAt(++$.position);uL($,X,$.position,!1)}return!0}function _c1($,Y){var X,G=$.tag,J=$.anchor,Q=[],W,K=!1,Z;if($.anchor!==null)$.anchorMap[$.anchor]=Q;Z=$.input.charCodeAt($.position);while(Z!==0){if(Z!==45)break;if(W=$.input.charCodeAt($.position+1),!FQ(W))break;if(K=!0,$.position++,h7($,!0,-1)){if($.lineIndent<=Y){Q.push(null),Z=$.input.charCodeAt($.position);continue}}if(X=$.line,w_($,Y,Cc1,!1,!0),Q.push($.result),h7($,!0,-1),Z=$.input.charCodeAt($.position),($.line===X||$.lineIndent>Y)&&Z!==0)s4($,"bad indentation of a sequence entry");else if($.lineIndent<Y)break}if(K)return $.tag=G,$.anchor=J,$.kind="sequence",$.result=Q,!0;return!1}function yD8($,Y,X){var G,J,Q,W,K=$.tag,Z=$.anchor,H={},z={},V=null,F=null,L=null,N=!1,D=!1,A;if($.anchor!==null)$.anchorMap[$.anchor]=H;A=$.input.charCodeAt($.position);while(A!==0){if(G=$.input.charCodeAt($.position+1),Q=$.line,W=$.position,(A===63||A===58)&&FQ(G)){if(A===63){if(N)P_($,H,z,V,F,null),V=F=L=null;D=!0,N=!0,J=!0}else if(N)N=!1,J=!0;else s4($,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");$.position+=1,A=G}else if(w_($,X,Ic1,!1,!0))if($.line===Q){A=$.input.charCodeAt($.position);while(OO(A))A=$.input.charCodeAt(++$.position);if(A===58){if(A=$.input.charCodeAt(++$.position),!FQ(A))s4($,"a whitespace character is expected after the key-value separator within a block mapping");if(N)P_($,H,z,V,F,null),V=F=L=null;D=!0,N=!1,J=!1,V=$.tag,F=$.result}else if(D)s4($,"can not read an implicit mapping pair; a colon is missed");else return $.tag=K,$.anchor=Z,!0}else if(D)s4($,"can not read a block mapping entry; a multiline key may not be an implicit key");else return $.tag=K,$.anchor=Z,!0;else break;if($.line===Q||$.lineIndent>Y){if(w_($,Y,j40,!0,J))if(N)F=$.result;else L=$.result;if(!N)P_($,H,z,V,F,L,Q,W),V=F=L=null;h7($,!0,-1),A=$.input.charCodeAt($.position)}if($.lineIndent>Y&&A!==0)s4($,"bad indentation of a mapping entry");else if($.lineIndent<Y)break}if(N)P_($,H,z,V,F,null);if(D)$.tag=K,$.anchor=Z,$.kind="mapping",$.result=H;return D}function bD8($){var Y,X=!1,G=!1,J,Q,W;if(W=$.input.charCodeAt($.position),W!==33)return!1;if($.tag!==null)s4($,"duplication of a tag property");if(W=$.input.charCodeAt(++$.position),W===60)X=!0,W=$.input.charCodeAt(++$.position);else if(W===33)G=!0,J="!!",W=$.input.charCodeAt(++$.position);else J="!";if(Y=$.position,X){do W=$.input.charCodeAt(++$.position);while(W!==0&&W!==62);if($.position<$.length)Q=$.input.slice(Y,$.position),W=$.input.charCodeAt(++$.position);else s4($,"unexpected end of the stream within a verbatim tag")}else{while(W!==0&&!FQ(W)){if(W===33)if(!G){if(J=$.input.slice(Y-1,$.position+1),!Sc1.test(J))s4($,"named tag handle cannot contain such characters");G=!0,Y=$.position+1}else s4($,"tag suffix cannot contain exclamation marks");W=$.input.charCodeAt(++$.position)}if(Q=$.input.slice(Y,$.position),PD8.test(Q))s4($,"tag suffix cannot contain flow indicator characters")}if(Q&&!kc1.test(Q))s4($,"tag name cannot contain such characters: "+Q);if(X)$.tag=Q;else if(pL.call($.tagMap,J))$.tag=$.tagMap[J]+Q;else if(J==="!")$.tag="!"+Q;else if(J==="!!")$.tag="tag:yaml.org,2002:"+Q;else s4($,'undeclared tag handle "'+J+'"');return!0}function hD8($){var Y,X;if(X=$.input.charCodeAt($.position),X!==38)return!1;if($.anchor!==null)s4($,"duplication of an anchor property");X=$.input.charCodeAt(++$.position),Y=$.position;while(X!==0&&!FQ(X)&&!q_(X))X=$.input.charCodeAt(++$.position);if($.position===Y)s4($,"name of an anchor node must contain at least one character");return $.anchor=$.input.slice(Y,$.position),!0}function fD8($){var Y,X,G;if(G=$.input.charCodeAt($.position),G!==42)return!1;G=$.input.charCodeAt(++$.position),Y=$.position;while(G!==0&&!FQ(G)&&!q_(G))G=$.input.charCodeAt(++$.position);if($.position===Y)s4($,"name of an alias node must contain at least one character");if(X=$.input.slice(Y,$.position),!pL.call($.anchorMap,X))s4($,'unidentified alias "'+X+'"');return $.result=$.anchorMap[X],h7($,!0,-1),!0}function w_($,Y,X,G,J){var Q,W,K,Z=1,H=!1,z=!1,V,F,L,N,D;if($.listener!==null)$.listener("open",$);if($.tag=null,$.anchor=null,$.kind=null,$.result=null,Q=W=K=j40===X||Cc1===X,G){if(h7($,!0,-1)){if(H=!0,$.lineIndent>Y)Z=1;else if($.lineIndent===Y)Z=0;else if($.lineIndent<Y)Z=-1}}if(Z===1)while(bD8($)||hD8($))if(h7($,!0,-1)){if(H=!0,K=Q,$.lineIndent>Y)Z=1;else if($.lineIndent===Y)Z=0;else if($.lineIndent<Y)Z=-1}else K=!1;if(K)K=H||J;if(Z===1||j40===X){if(_40===X||Ic1===X)N=Y;else N=Y+1;if(D=$.position-$.lineStart,Z===1)if(K&&(_c1($,D)||yD8($,D,N))||vD8($,N))z=!0;else{if(W&&xD8($,N)||SD8($,N)||kD8($,N))z=!0;else if(fD8($)){if(z=!0,$.tag!==null||$.anchor!==null)s4($,"alias node should not have any properties")}else if(CD8($,N,_40===X)){if(z=!0,$.tag===null)$.tag="?"}if($.anchor!==null)$.anchorMap[$.anchor]=$.result}else if(Z===0)z=K&&_c1($,D)}if($.tag!==null&&$.tag!=="!")if($.tag==="?"){if($.result!==null&&$.kind!=="scalar")s4($,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+$.kind+'"');for(V=0,F=$.implicitTypes.length;V<F;V+=1)if(L=$.implicitTypes[V],L.resolve($.result)){if($.result=L.construct($.result),$.tag=L.tag,$.anchor!==null)$.anchorMap[$.anchor]=$.result;break}}else if(pL.call($.typeMap[$.kind||"fallback"],$.tag)){if(L=$.typeMap[$.kind||"fallback"][$.tag],$.result!==null&&L.kind!==$.kind)s4($,"unacceptable node kind for !<"+$.tag+'> tag; it should be "'+L.kind+'", not "'+$.kind+'"');if(!L.resolve($.result))s4($,"cannot resolve a node with !<"+$.tag+"> explicit tag");else if($.result=L.construct($.result),$.anchor!==null)$.anchorMap[$.anchor]=$.result}else s4($,"unknown tag !<"+$.tag+">");if($.listener!==null)$.listener("close",$);return $.tag!==null||$.anchor!==null||z}function gD8($){var Y=$.position,X,G,J,Q=!1,W;$.version=null,$.checkLineBreaks=$.legacy,$.tagMap={},$.anchorMap={};while((W=$.input.charCodeAt($.position))!==0){if(h7($,!0,-1),W=$.input.charCodeAt($.position),$.lineIndent>0||W!==37)break;Q=!0,W=$.input.charCodeAt(++$.position),X=$.position;while(W!==0&&!FQ(W))W=$.input.charCodeAt(++$.position);if(G=$.input.slice(X,$.position),J=[],G.length<1)s4($,"directive name must not be less than one character in length");while(W!==0){while(OO(W))W=$.input.charCodeAt(++$.position);if(W===35){do W=$.input.charCodeAt(++$.position);while(W!==0&&!B3(W));break}if(B3(W))break;X=$.position;while(W!==0&&!FQ(W))W=$.input.charCodeAt(++$.position);J.push($.input.slice(X,$.position))}if(W!==0)TC0($);if(pL.call(Pc1,G))Pc1[G]($,G,J);else T40($,'unknown document directive "'+G+'"')}if(h7($,!0,-1),$.lineIndent===0&&$.input.charCodeAt($.position)===45&&$.input.charCodeAt($.position+1)===45&&$.input.charCodeAt($.position+2)===45)$.position+=3,h7($,!0,-1);else if(Q)s4($,"directives end mark is expected");if(w_($,$.lineIndent-1,j40,!1,!0),h7($,!0,-1),$.checkLineBreaks&&qD8.test($.input.slice(Y,$.position)))T40($,"non-ASCII line breaks are interpreted as content");if($.documents.push($.result),$.position===$.lineStart&&I40($)){if($.input.charCodeAt($.position)===46)$.position+=3,h7($,!0,-1);return}if($.position<$.length-1)s4($,"end of the stream or a document separator is expected");else return}function hc1($,Y){if($=String($),Y=Y||{},$.length!==0){if($.charCodeAt($.length-1)!==10&&$.charCodeAt($.length-1)!==13)$+=`
`;if($.charCodeAt(0)===65279)$=$.slice(1)}var X=new ID8($,Y),G=$.indexOf("\x00");if(G!==-1)X.position=G,s4(X,"null byte is not allowed in input");X.input+="\x00";while(X.input.charCodeAt(X.position)===32)X.lineIndent+=1,X.position+=1;while(X.position<X.length-1)gD8(X);return X.documents}function fc1($,Y,X){if(Y!==null&&typeof Y==="object"&&typeof X>"u")X=Y,Y=null;var G=hc1($,X);if(typeof Y!=="function")return G;for(var J=0,Q=G.length;J<Q;J+=1)Y(G[J])}function gc1($,Y){var X=hc1($,Y);if(X.length===0)return;else if(X.length===1)return X[0];throw new jc1("expected a single document in the stream, but found more")}function mD8($,Y,X){if(typeof Y==="object"&&Y!==null&&typeof X>"u")X=Y,Y=null;return fc1($,Y,Cz.extend({schema:Tc1},X))}function uD8($,Y){return gc1($,Cz.extend({schema:Tc1},Y))}pD8.loadAll=fc1;pD8.load=gc1;pD8.safeLoadAll=mD8;pD8.safeLoad=uD8});var Ul1=o((jN8,vC0)=>{var Af=NO(),Bf=E_(),nD8=Lf(),rD8=R_(),rc1=Object.prototype.toString,ac1=Object.prototype.hasOwnProperty,aD8=9,Nf=10,sD8=13,oD8=32,tD8=33,eD8=34,sc1=35,$N8=37,YN8=38,XN8=39,GN8=42,oc1=44,JN8=45,tc1=58,QN8=61,WN8=62,KN8=63,ZN8=64,ec1=91,$l1=93,UN8=96,Yl1=123,HN8=124,Xl1=125,GG={};GG[0]="\\0";GG[7]="\\a";GG[8]="\\b";GG[9]="\\t";GG[10]="\\n";GG[11]="\\v";GG[12]="\\f";GG[13]="\\r";GG[27]="\\e";GG[34]="\\\"";GG[92]="\\\\";GG[133]="\\N";GG[160]="\\_";GG[8232]="\\L";GG[8233]="\\P";var zN8=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function VN8($,Y){var X,G,J,Q,W,K,Z;if(Y===null)return{};X={},G=Object.keys(Y);for(J=0,Q=G.length;J<Q;J+=1){if(W=G[J],K=String(Y[W]),W.slice(0,2)==="!!")W="tag:yaml.org,2002:"+W.slice(2);if(Z=$.compiledTypeMap.fallback[W],Z&&ac1.call(Z.styleAliases,K))K=Z.styleAliases[K];X[W]=K}return X}function uc1($){var Y,X,G;if(Y=$.toString(16).toUpperCase(),$<=255)X="x",G=2;else if($<=65535)X="u",G=4;else if($<=4294967295)X="U",G=8;else throw new Bf("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+X+Af.repeat("0",G-Y.length)+Y}function FN8($){this.schema=$.schema||nD8,this.indent=Math.max(1,$.indent||2),this.noArrayIndent=$.noArrayIndent||!1,this.skipInvalid=$.skipInvalid||!1,this.flowLevel=Af.isNothing($.flowLevel)?-1:$.flowLevel,this.styleMap=VN8(this.schema,$.styles||null),this.sortKeys=$.sortKeys||!1,this.lineWidth=$.lineWidth||80,this.noRefs=$.noRefs||!1,this.noCompatMode=$.noCompatMode||!1,this.condenseFlow=$.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function pc1($,Y){var X=Af.repeat(" ",Y),G=0,J=-1,Q="",W,K=$.length;while(G<K){if(J=$.indexOf(`
`,G),J===-1)W=$.slice(G),G=K;else W=$.slice(G,J+1),G=J+1;if(W.length&&W!==`
`)Q+=X;Q+=W}return Q}function CC0($,Y){return`
`+Af.repeat(" ",$.indent*Y)}function LN8($,Y){var X,G,J;for(X=0,G=$.implicitTypes.length;X<G;X+=1)if(J=$.implicitTypes[X],J.resolve(Y))return!0;return!1}function kC0($){return $===oD8||$===aD8}function __($){return 32<=$&&$<=126||161<=$&&$<=55295&&$!==8232&&$!==8233||57344<=$&&$<=65533&&$!==65279||65536<=$&&$<=1114111}function DN8($){return __($)&&!kC0($)&&$!==65279&&$!==sD8&&$!==Nf}function dc1($,Y){return __($)&&$!==65279&&$!==oc1&&$!==ec1&&$!==$l1&&$!==Yl1&&$!==Xl1&&$!==tc1&&($!==sc1||Y&&DN8(Y))}function NN8($){return __($)&&$!==65279&&!kC0($)&&$!==JN8&&$!==KN8&&$!==tc1&&$!==oc1&&$!==ec1&&$!==$l1&&$!==Yl1&&$!==Xl1&&$!==sc1&&$!==YN8&&$!==GN8&&$!==tD8&&$!==HN8&&$!==QN8&&$!==WN8&&$!==XN8&&$!==eD8&&$!==$N8&&$!==ZN8&&$!==UN8}function Gl1($){var Y=/^\n* /;return Y.test($)}var Jl1=1,Ql1=2,Wl1=3,Kl1=4,C40=5;function AN8($,Y,X,G,J){var Q,W,K,Z=!1,H=!1,z=G!==-1,V=-1,F=NN8($.charCodeAt(0))&&!kC0($.charCodeAt($.length-1));if(Y)for(Q=0;Q<$.length;Q++){if(W=$.charCodeAt(Q),!__(W))return C40;K=Q>0?$.charCodeAt(Q-1):null,F=F&&dc1(W,K)}else{for(Q=0;Q<$.length;Q++){if(W=$.charCodeAt(Q),W===Nf){if(Z=!0,z)H=H||Q-V-1>G&&$[V+1]!==" ",V=Q}else if(!__(W))return C40;K=Q>0?$.charCodeAt(Q-1):null,F=F&&dc1(W,K)}H=H||z&&(Q-V-1>G&&$[V+1]!==" ")}if(!Z&&!H)return F&&!J($)?Jl1:Ql1;if(X>9&&Gl1($))return C40;return H?Kl1:Wl1}function BN8($,Y,X,G){$.dump=function(){if(Y.length===0)return"''";if(!$.noCompatMode&&zN8.indexOf(Y)!==-1)return"'"+Y+"'";var J=$.indent*Math.max(1,X),Q=$.lineWidth===-1?-1:Math.max(Math.min($.lineWidth,40),$.lineWidth-J),W=G||$.flowLevel>-1&&X>=$.flowLevel;function K(Z){return LN8($,Z)}switch(AN8(Y,W,$.indent,Q,K)){case Jl1:return Y;case Ql1:return"'"+Y.replace(/'/g,"''")+"'";case Wl1:return"|"+cc1(Y,$.indent)+lc1(pc1(Y,J));case Kl1:return">"+cc1(Y,$.indent)+lc1(pc1(ON8(Y,Q),J));case C40:return'"'+EN8(Y,Q)+'"';default:throw new Bf("impossible error: invalid scalar style")}}()}function cc1($,Y){var X=Gl1($)?String(Y):"",G=$[$.length-1]===`
`,J=G&&($[$.length-2]===`
`||$===`
`),Q=J?"+":G?"":"-";return X+Q+`
`}function lc1($){return $[$.length-1]===`
`?$.slice(0,-1):$}function ON8($,Y){var X=/(\n+)([^\n]*)/g,G=function(){var H=$.indexOf(`
`);return H=H!==-1?H:$.length,X.lastIndex=H,ic1($.slice(0,H),Y)}(),J=$[0]===`
`||$[0]===" ",Q,W;while(W=X.exec($)){var K=W[1],Z=W[2];Q=Z[0]===" ",G+=K+(!J&&!Q&&Z!==""?`
`:"")+ic1(Z,Y),J=Q}return G}function ic1($,Y){if($===""||$[0]===" ")return $;var X=/ [^ ]/g,G,J=0,Q,W=0,K=0,Z="";while(G=X.exec($)){if(K=G.index,K-J>Y)Q=W>J?W:K,Z+=`
`+$.slice(J,Q),J=Q+1;W=K}if(Z+=`
`,$.length-J>Y&&W>J)Z+=$.slice(J,W)+`
`+$.slice(W+1);else Z+=$.slice(J);return Z.slice(1)}function EN8($){var Y="",X,G,J;for(var Q=0;Q<$.length;Q++){if(X=$.charCodeAt(Q),X>=55296&&X<=56319){if(G=$.charCodeAt(Q+1),G>=56320&&G<=57343){Y+=uc1((X-55296)*1024+G-56320+65536),Q++;continue}}J=GG[X],Y+=!J&&__(X)?$[Q]:J||uc1(X)}return Y}function MN8($,Y,X){var G="",J=$.tag,Q,W;for(Q=0,W=X.length;Q<W;Q+=1)if(EO($,Y,X[Q],!1,!1)){if(Q!==0)G+=","+(!$.condenseFlow?" ":"");G+=$.dump}$.tag=J,$.dump="["+G+"]"}function RN8($,Y,X,G){var J="",Q=$.tag,W,K;for(W=0,K=X.length;W<K;W+=1)if(EO($,Y+1,X[W],!0,!0)){if(!G||W!==0)J+=CC0($,Y);if($.dump&&Nf===$.dump.charCodeAt(0))J+="-";else J+="- ";J+=$.dump}$.tag=Q,$.dump=J||"[]"}function qN8($,Y,X){var G="",J=$.tag,Q=Object.keys(X),W,K,Z,H,z;for(W=0,K=Q.length;W<K;W+=1){if(z="",W!==0)z+=", ";if($.condenseFlow)z+='"';if(Z=Q[W],H=X[Z],!EO($,Y,Z,!1,!1))continue;if($.dump.length>1024)z+="? ";if(z+=$.dump+($.condenseFlow?'"':"")+":"+($.condenseFlow?"":" "),!EO($,Y,H,!1,!1))continue;z+=$.dump,G+=z}$.tag=J,$.dump="{"+G+"}"}function PN8($,Y,X,G){var J="",Q=$.tag,W=Object.keys(X),K,Z,H,z,V,F;if($.sortKeys===!0)W.sort();else if(typeof $.sortKeys==="function")W.sort($.sortKeys);else if($.sortKeys)throw new Bf("sortKeys must be a boolean or a function");for(K=0,Z=W.length;K<Z;K+=1){if(F="",!G||K!==0)F+=CC0($,Y);if(H=W[K],z=X[H],!EO($,Y+1,H,!0,!0,!0))continue;if(V=$.tag!==null&&$.tag!=="?"||$.dump&&$.dump.length>1024,V)if($.dump&&Nf===$.dump.charCodeAt(0))F+="?";else F+="? ";if(F+=$.dump,V)F+=CC0($,Y);if(!EO($,Y+1,z,!0,V))continue;if($.dump&&Nf===$.dump.charCodeAt(0))F+=":";else F+=": ";F+=$.dump,J+=F}$.tag=Q,$.dump=J||"{}"}function nc1($,Y,X){var G,J,Q,W,K,Z;J=X?$.explicitTypes:$.implicitTypes;for(Q=0,W=J.length;Q<W;Q+=1)if(K=J[Q],(K.instanceOf||K.predicate)&&(!K.instanceOf||typeof Y==="object"&&Y instanceof K.instanceOf)&&(!K.predicate||K.predicate(Y))){if($.tag=X?K.tag:"?",K.represent){if(Z=$.styleMap[K.tag]||K.defaultStyle,rc1.call(K.represent)==="[object Function]")G=K.represent(Y,Z);else if(ac1.call(K.represent,Z))G=K.represent[Z](Y,Z);else throw new Bf("!<"+K.tag+'> tag resolver accepts not "'+Z+'" style');$.dump=G}return!0}return!1}function EO($,Y,X,G,J,Q){if($.tag=null,$.dump=X,!nc1($,X,!1))nc1($,X,!0);var W=rc1.call($.dump);if(G)G=$.flowLevel<0||$.flowLevel>Y;var K=W==="[object Object]"||W==="[object Array]",Z,H;if(K)Z=$.duplicates.indexOf(X),H=Z!==-1;if($.tag!==null&&$.tag!=="?"||H||$.indent!==2&&Y>0)J=!1;if(H&&$.usedDuplicates[Z])$.dump="*ref_"+Z;else{if(K&&H&&!$.usedDuplicates[Z])$.usedDuplicates[Z]=!0;if(W==="[object Object]"){if(G&&Object.keys($.dump).length!==0){if(PN8($,Y,$.dump,J),H)$.dump="&ref_"+Z+$.dump}else if(qN8($,Y,$.dump),H)$.dump="&ref_"+Z+" "+$.dump}else if(W==="[object Array]"){var z=$.noArrayIndent&&Y>0?Y-1:Y;if(G&&$.dump.length!==0){if(RN8($,z,$.dump,J),H)$.dump="&ref_"+Z+$.dump}else if(MN8($,z,$.dump),H)$.dump="&ref_"+Z+" "+$.dump}else if(W==="[object String]"){if($.tag!=="?")BN8($,$.dump,Y,Q)}else{if($.skipInvalid)return!1;throw new Bf("unacceptable kind of an object to dump "+W)}if($.tag!==null&&$.tag!=="?")$.dump="!<"+$.tag+"> "+$.dump}return!0}function wN8($,Y){var X=[],G=[],J,Q;SC0($,X,G);for(J=0,Q=G.length;J<Q;J+=1)Y.duplicates.push(X[G[J]]);Y.usedDuplicates=Array(Q)}function SC0($,Y,X){var G,J,Q;if($!==null&&typeof $==="object")if(J=Y.indexOf($),J!==-1){if(X.indexOf(J)===-1)X.push(J)}else if(Y.push($),Array.isArray($))for(J=0,Q=$.length;J<Q;J+=1)SC0($[J],Y,X);else{G=Object.keys($);for(J=0,Q=G.length;J<Q;J+=1)SC0($[G[J]],Y,X)}}function Zl1($,Y){Y=Y||{};var X=new FN8(Y);if(!X.noRefs)wN8($,X);if(EO(X,0,$,!0,!0))return X.dump+`
`;return""}function _N8($,Y){return Zl1($,Af.extend({schema:rD8},Y))}jN8.dump=Zl1;jN8.safeDump=_N8});var zl1=o((CN8,Y7)=>{var S40=mc1(),Hl1=Ul1();function k40($){return function(){throw Error("Function "+$+" is deprecated and cannot be used.")}}CN8.Type=HY();CN8.Schema=AO();CN8.FAILSAFE_SCHEMA=P40();CN8.JSON_SCHEMA=RC0();CN8.CORE_SCHEMA=qC0();CN8.DEFAULT_SAFE_SCHEMA=R_();CN8.DEFAULT_FULL_SCHEMA=Lf();CN8.load=S40.load;CN8.loadAll=S40.loadAll;CN8.safeLoad=S40.safeLoad;CN8.safeLoadAll=S40.safeLoadAll;CN8.dump=Hl1.dump;CN8.safeDump=Hl1.safeDump;CN8.YAMLException=E_();CN8.MINIMAL_SCHEMA=P40();CN8.SAFE_SCHEMA=R_();CN8.DEFAULT_SCHEMA=Lf();CN8.scan=k40("scan");CN8.parse=k40("parse");CN8.compose=k40("compose");CN8.addConstructor=k40("addConstructor")});var Fl1=o((jc5,Vl1)=>{var tN8=zl1();Vl1.exports=tN8});var hC0=o((yC0,bC0)=>{var v40=Fl1(),xC0=yC0=bC0.exports;xC0.yaml={parse:v40.safeLoad.bind(v40),stringify:v40.safeDump.bind(v40)};xC0.json={parse:JSON.parse.bind(JSON),stringify:function($,Y){let X=Object.assign({replacer:null,space:2},Y);return JSON.stringify($,X.replacer,X.space)}};xC0.javascript={parse:function parse(str,options,wrap){try{if(wrap!==!1)str=`(function() {
return `+str.trim()+`;
}());`;return eval(str)||{}}catch($){if(wrap!==!1&&/(unexpected|identifier)/i.test($.message))return parse(str,options,!1);throw SyntaxError($)}},stringify:function(){throw Error("stringifying JavaScript is not supported")}}});var Dl1=o((Tc5,Ll1)=>{/*!
 * strip-bom-string <https://github.com/jonschlinkert/strip-bom-string>
 *
 * Copyright (c) 2015, 2017, Jon Schlinkert.
 * Released under the MIT License.
 */Ll1.exports=function($){if(typeof $==="string"&&$.charAt(0)==="\uFEFF")return $.slice(1);return $}});var x40=o((eN8)=>{var Nl1=Dl1(),Al1=Vf();eN8.define=function($,Y,X){Reflect.defineProperty($,Y,{enumerable:!1,configurable:!0,writable:!0,value:X})};eN8.isBuffer=function($){return Al1($)==="buffer"};eN8.isObject=function($){return Al1($)==="object"};eN8.toBuffer=function($){return typeof $==="string"?Buffer.from($):$};eN8.toString=function($){if(eN8.isBuffer($))return Nl1(String($));if(typeof $!=="string")throw TypeError("expected input to be a string or buffer");return Nl1($)};eN8.arrayify=function($){return $?Array.isArray($)?$:[$]:[]};eN8.startsWith=function($,Y,X){if(typeof X!=="number")X=Y.length;return $.slice(0,X)===Y}});var Of=o((Cc5,Ol1)=>{var WA8=hC0(),KA8=x40();Ol1.exports=function($){let Y=Object.assign({},$);if(Y.delimiters=KA8.arrayify(Y.delims||Y.delimiters||"---"),Y.delimiters.length===1)Y.delimiters.push(Y.delimiters[0]);return Y.language=(Y.language||Y.lang||"yaml").toLowerCase(),Y.engines=Object.assign({},WA8,Y.parsers,Y.engines),Y}});var fC0=o((Sc5,El1)=>{El1.exports=function($,Y){let X=Y.engines[$]||Y.engines[ZA8($)];if(typeof X>"u")throw Error('gray-matter engine "'+$+'" is not registered');if(typeof X==="function")X={parse:X};return X};function ZA8($){switch($.toLowerCase()){case"js":case"javascript":return"javascript";case"coffee":case"coffeescript":case"cson":return"coffee";case"yaml":case"yml":return"yaml";default:return $}}});var gC0=o((kc5,Ml1)=>{var UA8=Vf(),HA8=fC0(),zA8=Of();Ml1.exports=function($,Y,X){if(Y==null&&X==null)switch(UA8($)){case"object":Y=$.data,X={};break;case"string":return $;default:throw TypeError("expected file to be a string or object")}let G=$.content,J=zA8(X);if(Y==null){if(!J.data)return $;Y=J.data}let Q=$.language||J.language,W=HA8(Q,J);if(typeof W.stringify!=="function")throw TypeError('expected "'+Q+'.stringify" to be a function');Y=Object.assign({},$.data,Y);let K=J.delimiters[0],Z=J.delimiters[1],H=W.stringify(Y,X).trim(),z="";if(H!=="{}")z=j_(K)+j_(H)+j_(Z);if(typeof $.excerpt==="string"&&$.excerpt!==""){if(G.indexOf($.excerpt.trim())===-1)z+=j_($.excerpt)+j_(Z)}return z+j_(G)};function j_($){return $.slice(-1)!==`
`?$+`
`:$}});var ql1=o((vc5,Rl1)=>{var VA8=Of();Rl1.exports=function($,Y){let X=VA8(Y);if($.data==null)$.data={};if(typeof X.excerpt==="function")return X.excerpt($,X);let G=$.data.excerpt_separator||X.excerpt_separator;if(G==null&&(X.excerpt===!1||X.excerpt==null))return $;let J=typeof X.excerpt==="string"?X.excerpt:G||X.delimiters[0],Q=$.content.indexOf(J);if(Q!==-1)$.excerpt=$.content.slice(0,Q);return $}});var _l1=o((xc5,wl1)=>{var Pl1=Vf(),FA8=gC0(),T_=x40();wl1.exports=function($){if(Pl1($)!=="object")$={content:$};if(Pl1($.data)!=="object")$.data={};if($.contents&&$.content==null)$.content=$.contents;return T_.define($,"orig",T_.toBuffer($.content)),T_.define($,"language",$.language||""),T_.define($,"matter",$.matter||""),T_.define($,"stringify",function(Y,X){if(X&&X.language)$.language=X.language;return FA8($,Y,X)}),$.content=T_.toString($.content),$.isEmpty=!1,$.excerpt="",$}});var Tl1=o((yc5,jl1)=>{var LA8=fC0(),DA8=Of();jl1.exports=function($,Y,X){let G=DA8(X),J=LA8($,G);if(typeof J.parse!=="function")throw TypeError('expected "'+$+'.parse" to be a function');return J.parse(Y,G)}});var kl1=o((bc5,Sl1)=>{var NA8=A0("fs"),AA8=Pd1(),mC0=Of(),BA8=gC0(),Il1=ql1(),OA8=hC0(),EA8=_l1(),MA8=Tl1(),Cl1=x40();function rG($,Y){if($==="")return{data:{},content:$,excerpt:"",orig:$};let X=EA8($),G=rG.cache[X.content];if(!Y){if(G)return X=Object.assign({},G),X.orig=G.orig,X;rG.cache[X.content]=X}return RA8(X,Y)}function RA8($,Y){let X=mC0(Y),G=X.delimiters[0],J=`
`+X.delimiters[1],Q=$.content;if(X.language)$.language=X.language;let W=G.length;if(!Cl1.startsWith(Q,G,W))return Il1($,X),$;if(Q.charAt(W)===G.slice(-1))return $;Q=Q.slice(W);let K=Q.length,Z=rG.language(Q,X);if(Z.name)$.language=Z.name,Q=Q.slice(Z.raw.length);let H=Q.indexOf(J);if(H===-1)H=K;if($.matter=Q.slice(0,H),$.matter.replace(/^\s*#[^\n]+/gm,"").trim()==="")$.isEmpty=!0,$.empty=$.content,$.data={};else $.data=MA8($.language,$.matter,X);if(H===K)$.content="";else{if($.content=Q.slice(H+J.length),$.content[0]==="\r")$.content=$.content.slice(1);if($.content[0]===`
`)$.content=$.content.slice(1)}if(Il1($,X),X.sections===!0||typeof X.section==="function")AA8($,X.section);return $}rG.engines=OA8;rG.stringify=function($,Y,X){if(typeof $==="string")$=rG($,X);return BA8($,Y,X)};rG.read=function($,Y){let X=NA8.readFileSync($,"utf8"),G=rG(X,Y);return G.path=$,G};rG.test=function($,Y){return Cl1.startsWith($,mC0(Y).delimiters[0])};rG.language=function($,Y){let G=mC0(Y).delimiters[0];if(rG.test($))$=$.slice(G.length);let J=$.slice(0,$.search(/\r?\n/));return{raw:J,name:J?J.trim():""}};rG.cache={};rG.clearCache=function(){rG.cache={}};Sl1.exports=rG});function JG($,Y={}){if(!$)return 0;let{defaultCharsPerToken:X=6,languageConfigs:G=yl1}=Y,J=$.split(xl1).filter(Boolean),Q=0;for(let W of J)Q+=bl1(W,G,X);return Q}function Ef($,Y=0,X,G={}){if(!$)return"";let{defaultCharsPerToken:J=6,languageConfigs:Q=yl1}=G,W=0;if(Y<0||X!==void 0&&X<0)W=JG($,G);let K=Y<0?Math.max(0,W+Y):Math.max(0,Y),Z=X===void 0?1/0:X<0?Math.max(0,W+X):X;if(K>=Z)return"";let H=$.split(xl1).filter(Boolean),z=[],V=0;for(let F of H){if(V>=Z)break;let L=bl1(F,Q,J),N=PA8(F,V,L,K,Z);if(N)z.push(N);V+=L}return z.join("")}function bl1($,Y,X){if(I_.whitespace.test($))return 0;if(I_.cjk.test($))return qA8($);if(I_.numeric.test($))return 1;if($.length<=3)return 1;if(I_.punctuation.test($))return $.length>1?Math.ceil($.length/2):1;if(I_.alphanumeric.test($)){let J=vl1($,Y)??X;return Math.ceil($.length/J)}let G=vl1($,Y)??X;return Math.ceil($.length/G)}function vl1($,Y){for(let X of Y)if(X.pattern.test($))return X.averageCharsPerToken}function qA8($){return Array.from($).length}function PA8($,Y,X,G,J){if(X===0)return Y>=G&&Y<J?$:"";let Q=Y+X;if(Y>=J||Q<=G)return"";let W=Math.max(0,G-Y),K=Math.min(X,J-Y);if(W===0&&K===X)return $;let Z=Math.floor(W/X*$.length),H=Math.ceil(K/X*$.length);return $.slice(Z,H)}var I_,xl1,yl1;var y40=V0(()=>{I_={whitespace:/^\s+$/,cjk:/[\u4E00-\u9FFF\u3400-\u4DBF\u3000-\u303F\uFF00-\uFFEF\u30A0-\u30FF\u2E80-\u2EFF\u31C0-\u31EF\u3200-\u32FF\u3300-\u33FF\uAC00-\uD7AF\u1100-\u11FF\u3130-\u318F\uA960-\uA97F\uD7B0-\uD7FF]/,numeric:/^\d+(?:[.,]\d+)*$/,punctuation:/[.,!?;(){}[\]<>:/\\|@#$%^&*+=`~_-]/,alphanumeric:/^[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]+$/},xl1=new RegExp(`(\\s+|${I_.punctuation.source}+)`),yl1=[{pattern:/[\u00E4\u00F6\u00FC\u00DF\u1E9E]/i,averageCharsPerToken:3},{pattern:/[\u00E9\u00E8\u00EA\u00EB\u00E0\u00E2\u00EE\u00EF\u00F4\u00FB\u00F9\u00FC\u00FF\u00E7\u0153\u00E6\u00E1\u00ED\u00F3\u00FA\u00F1]/i,averageCharsPerToken:3},{pattern:/[\u0105\u0107\u0119\u0142\u0144\u00F3\u015B\u017A\u017C\u011B\u0161\u010D\u0159\u017E\u00FD\u016F\u00FA\u010F\u0165\u0148]/i,averageCharsPerToken:3.5}]});var rl1=o((fc5,f40)=>{function gl1($){return Array.isArray($)?$:[$]}var wA8=void 0,pC0="",hl1=" ",uC0="\\",_A8=/^\s+$/,jA8=/(?:[^\\]|^)\\$/,TA8=/^\\!/,IA8=/^\\#/,CA8=/\r?\n/g,SA8=/^\.{0,2}\/|^\.{1,2}$/,kA8=/\/$/,C_="/",ml1="node-ignore";if(typeof Symbol<"u")ml1=Symbol.for("node-ignore");var ul1=ml1,S_=($,Y,X)=>{return Object.defineProperty($,Y,{value:X}),X},vA8=/([0-z])-([0-z])/g,pl1=()=>!1,xA8=($)=>$.replace(vA8,(Y,X,G)=>X.charCodeAt(0)<=G.charCodeAt(0)?Y:pC0),yA8=($)=>{let{length:Y}=$;return $.slice(0,Y-Y%2)},bA8=[[/^\uFEFF/,()=>pC0],[/((?:\\\\)*?)(\\?\s+)$/,($,Y,X)=>Y+(X.indexOf("\\")===0?hl1:pC0)],[/(\\+?)\s/g,($,Y)=>{let{length:X}=Y;return Y.slice(0,X-X%2)+hl1}],[/[\\$.|*+(){^]/g,($)=>`\\${$}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return!/\/(?!$)/.test(this)?"(?:^|\\/)":"^"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,($,Y,X)=>Y+6<X.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,($,Y,X)=>{let G=X.replace(/\\\*/g,"[^\\/]*");return Y+G}],[/\\\\\\(?=[$.|*+(){^])/g,()=>uC0],[/\\\\/g,()=>uC0],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,($,Y,X,G,J)=>Y===uC0?`\\[${X}${yA8(G)}${J}`:J==="]"?G.length%2===0?`[${xA8(X)}${G}]`:"[]":"[]"],[/(?:[^*])$/,($)=>/\/$/.test($)?`${$}$`:`${$}(?=$|\\/$)`]],hA8=/(^|\\\/)?\\\*$/,Mf="regex",b40="checkRegex",fl1="_",fA8={[Mf]($,Y){return`${Y?`${Y}[^/]+`:"[^/]*"}(?=$|\\/$)`},[b40]($,Y){return`${Y?`${Y}[^/]*`:"[^/]*"}(?=$|\\/$)`}},gA8=($)=>bA8.reduce((Y,[X,G])=>Y.replace(X,G.bind($)),$),h40=($)=>typeof $==="string",mA8=($)=>$&&h40($)&&!_A8.test($)&&!jA8.test($)&&$.indexOf("#")!==0,uA8=($)=>$.split(CA8).filter(Boolean);class dl1{constructor($,Y,X,G,J,Q){this.pattern=$,this.mark=Y,this.negative=J,S_(this,"body",X),S_(this,"ignoreCase",G),S_(this,"regexPrefix",Q)}get regex(){let $=fl1+Mf;if(this[$])return this[$];return this._make(Mf,$)}get checkRegex(){let $=fl1+b40;if(this[$])return this[$];return this._make(b40,$)}_make($,Y){let X=this.regexPrefix.replace(hA8,fA8[$]),G=this.ignoreCase?new RegExp(X,"i"):new RegExp(X);return S_(this,Y,G)}}var pA8=({pattern:$,mark:Y},X)=>{let G=!1,J=$;if(J.indexOf("!")===0)G=!0,J=J.substr(1);J=J.replace(TA8,"!").replace(IA8,"#");let Q=gA8(J);return new dl1($,Y,J,X,G,Q)};class cl1{constructor($){this._ignoreCase=$,this._rules=[]}_add($){if($&&$[ul1]){this._rules=this._rules.concat($._rules._rules),this._added=!0;return}if(h40($))$={pattern:$};if(mA8($.pattern)){let Y=pA8($,this._ignoreCase);this._added=!0,this._rules.push(Y)}}add($){return this._added=!1,gl1(h40($)?uA8($):$).forEach(this._add,this),this._added}test($,Y,X){let G=!1,J=!1,Q;this._rules.forEach((K)=>{let{negative:Z}=K;if(J===Z&&G!==J||Z&&!G&&!J&&!Y)return;if(!K[X].test($))return;G=!Z,J=Z,Q=Z?wA8:K});let W={ignored:G,unignored:J};if(Q)W.rule=Q;return W}}var dA8=($,Y)=>{throw new Y($)},Sz=($,Y,X)=>{if(!h40($))return X(`path must be a string, but got \`${Y}\``,TypeError);if(!$)return X("path must not be empty",TypeError);if(Sz.isNotRelative($))return X(`path should be a \`path.relative()\`d string, but got "${Y}"`,RangeError);return!0},ll1=($)=>SA8.test($);Sz.isNotRelative=ll1;Sz.convert=($)=>$;class il1{constructor({ignorecase:$=!0,ignoreCase:Y=$,allowRelativePaths:X=!1}={}){S_(this,ul1,!0),this._rules=new cl1(Y),this._strictPathCheck=!X,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add($){if(this._rules.add($))this._initCache();return this}addPattern($){return this.add($)}_test($,Y,X,G){let J=$&&Sz.convert($);return Sz(J,$,this._strictPathCheck?dA8:pl1),this._t(J,Y,X,G)}checkIgnore($){if(!kA8.test($))return this.test($);let Y=$.split(C_).filter(Boolean);if(Y.pop(),Y.length){let X=this._t(Y.join(C_)+C_,this._testCache,!0,Y);if(X.ignored)return X}return this._rules.test($,!1,b40)}_t($,Y,X,G){if($ in Y)return Y[$];if(!G)G=$.split(C_).filter(Boolean);if(G.pop(),!G.length)return Y[$]=this._rules.test($,X,Mf);let J=this._t(G.join(C_)+C_,Y,X,G);return Y[$]=J.ignored?J:this._rules.test($,X,Mf)}ignores($){return this._test($,this._ignoreCache,!1).ignored}createFilter(){return($)=>!this.ignores($)}filter($){return gl1($).filter(this.createFilter())}test($){return this._test($,this._testCache,!0)}}var dC0=($)=>new il1($),cA8=($)=>Sz($&&Sz.convert($),$,pl1),nl1=()=>{let $=(X)=>/^\\\\\?\\/.test(X)||/["<>|\u0000-\u001F]+/u.test(X)?X:X.replace(/\\/g,"/");Sz.convert=$;let Y=/^[a-z]:\//i;Sz.isNotRelative=(X)=>Y.test(X)||ll1(X)};if(typeof process<"u"&&process.platform==="win32")nl1();f40.exports=dC0;dC0.default=dC0;f40.exports.isPathValid=cA8;S_(f40.exports,Symbol.for("setupWindows"),nl1)});import*as q7 from"path";import sC0,{parse as pc5,join as k_,dirname as dc5}from"path";import{realpathSync as ic5,constants as nc5,existsSync as cC0}from"fs";import*as X7 from"fs/promises";import oC0 from"fs/promises";import*as v_ from"os";import{createRequire as m40}from"module";import{fileURLToPath as lA8,pathToFileURL as tC0}from"url";import{execFileSync as iA8}from"child_process";function oA8($){return $!==null&&typeof $==="object"&&"code"in $&&$.code==="ENOENT"}function eA8($){let Y=q7.extname($).slice(1).toLowerCase();return tA8[Y]??"application/octet-stream"}function eC0($){let Y=q7.extname($).toLowerCase();return $B8.has(Y)}async function YB8($){try{return await X7.access($),!0}catch{return!1}}async function XB8($,Y){try{let X=await X7.stat($);return{name:q7.basename($),type:X.isDirectory()?"directory":"file",size:X.size,createdAt:X.birthtime,modifiedAt:X.mtime,mimeType:X.isFile()?eA8($):void 0}}catch(X){if(oA8(X))throw new c40(Y);throw X}}function p40($){return Ui1.test($)}function Hi1($){let Y=$.search(Ui1);if(Y===-1)return $;let X=$.slice(0,Y),G=X.lastIndexOf("/");if(G<=0)return".";return X.slice(0,G)}function al1($){if($.startsWith("./"))return $.slice(2);if($.startsWith("/"))return $.slice(1);return $}function $S0($,Y){let X=(Array.isArray($)?$:[$]).map(al1),G=Qi1.default(X,{posix:!0,dot:Y?.dot??!1});return(J)=>G(al1(J))}async function zi1($,Y,X,G){if(X>=G)return[];try{let J=await $(Y),Q=[];for(let W of J){if(W.type==="directory"&&W.isSymlink)continue;let K=Y==="."||Y===""?W.name:`${Y}/${W.name}`;if(Q.push({path:K,type:W.type}),W.type==="directory")Q.push(...await zi1($,K,X+1,G))}return Q}catch{return[]}}async function sl1($,Y,X){let G=X?.maxDepth??10,J=$.length>1&&$.endsWith("/")?$.slice(0,-1):$;if(!p40(J))try{return await Y(J),[{path:J,type:"directory"}]}catch{return[{path:J,type:"file"}]}let Q=Hi1(J),W=$S0(J,{dot:X?.dot??!1});return(await zi1(Y,Q,0,G)).filter((Z)=>W(Z.path))}function Rf($){try{let Y=process.platform==="win32"?"where":"which";return iA8(Y,[$],{stdio:"ignore"}),!0}catch{return!1}}function QB8($,Y){try{let X=m40(tC0(k_($,"package.json")));return{require:X,resolved:X.resolve(Y)}}catch{}try{let X=m40(tC0(k_(process.cwd(),"package.json")));return{require:X,resolved:X.resolve(Y)}}catch{return null}}function ol1($,Y,X){let G=QB8($,Y);if(G)return G;for(let J of X??[])try{let Q=m40(tC0(k_(J,"package.json")));return{require:Q,resolved:Q.resolve(Y)}}catch{}return null}function lC0($,Y,X){let G=k_($,"node_modules",".bin",Y),J=k_(process.cwd(),"node_modules",".bin",Y);if(cC0(G))return G;if(cC0(J))return J;for(let Q of X??[]){let W=k_(Q,"node_modules",".bin",Y);if(cC0(W))return W}return}function WB8($){return{id:$.id,name:$.name,languageIds:$.languageIds,markers:$.markers,command:()=>$.command,initialization:$.initializationOptions?()=>$.initializationOptions:void 0}}function KB8($){let{binaryOverrides:Y,searchPaths:X,packageRunner:G}=$??{},J={typescript:{id:"typescript",name:"TypeScript Language Server",languageIds:["typescript","typescriptreact","javascript","javascriptreact"],markers:["tsconfig.json","package.json"],command:(Q)=>{if(Y?.typescript)return Y.typescript;if(!ol1(Q,"typescript/lib/tsserver.js",X))return;let W=lC0(Q,"typescript-language-server",X);if(W)return`${W} --stdio`;if(Rf("typescript-language-server"))return"typescript-language-server --stdio";if(G)return`${G} typescript-language-server --stdio`;return},initialization:(Q)=>{let W=ol1(Q,"typescript/lib/tsserver.js",X);if(!W)return;return{tsserver:{path:W.resolved,logVerbosity:"off"}}}},eslint:{id:"eslint",name:"ESLint Language Server",languageIds:["typescript","typescriptreact","javascript","javascriptreact"],markers:["package.json",".eslintrc.js",".eslintrc.json",".eslintrc.yml",".eslintrc.yaml","eslint.config.js","eslint.config.mjs","eslint.config.ts"],command:(Q)=>{if(Y?.eslint)return Y.eslint;let W=lC0(Q,"vscode-eslint-language-server",X);if(W)return`${W} --stdio`;if(Rf("vscode-eslint-language-server"))return"vscode-eslint-language-server --stdio";if(G)return`${G} vscode-eslint-language-server --stdio`;return}},python:{id:"python",name:"Python Language Server (Pyright)",languageIds:["python"],markers:["pyproject.toml","setup.py","requirements.txt","setup.cfg"],command:(Q)=>{if(Y?.python)return Y.python;let W=lC0(Q,"pyright-langserver",X);if(W)return`${W} --stdio`;if(Rf("pyright-langserver"))return"pyright-langserver --stdio";if(G)return`${G} pyright-langserver --stdio`;return}},go:{id:"go",name:"Go Language Server (gopls)",languageIds:["go"],markers:["go.mod"],command:()=>{if(Y?.go)return Y.go;return Rf("gopls")?"gopls serve":void 0}},rust:{id:"rust",name:"Rust Language Server (rust-analyzer)",languageIds:["rust"],markers:["Cargo.toml"],command:()=>{if(Y?.rust)return Y.rust;return Rf("rust-analyzer")?"rust-analyzer --stdio":void 0}}};if($?.servers)for(let Q of Object.values($.servers))J[Q.id]=WB8(Q);return J}function d40($){if(/^[a-zA-Z0-9._\-\/=:@]+$/.test($))return $;return`'${$.replace(/'/g,"'\\''")}'`}function tl1($){let Y=[],X=[],G="",J=0,Q=!1,W=!1;while(J<$.length){let K=$[J],Z=$[J+1];if(K==="\\"&&J+1<$.length){G+=K+Z,J+=2;continue}if(K==="'"&&!W){Q=!Q,G+=K,J++;continue}if(K==='"'&&!Q){W=!W,G+=K,J++;continue}if(!Q&&!W){if(K==="&"&&Z==="&"||K==="|"&&Z==="|"){Y.push(G.trim()),X.push(K+Z),G="",J+=2;while(J<$.length&&/\s/.test($[J]))J++;continue}if(K===";"){Y.push(G.trim()),X.push(";"),G="",J++;while(J<$.length&&/\s/.test($[J]))J++;continue}}G+=K,J++}if(G.trim())Y.push(G.trim());return{parts:Y,operators:X}}function ZB8($,Y){let X=$[0]??"";for(let G=0;G<Y.length;G++)X+=` ${Y[G]} ${$[G+1]??""}`;return X.trim()}function Vi1($,Y,X){let G=$.split(`
`),J=G.length,Q=Math.max(1,Y??1),W=Math.min(J,X??J);return{content:G.slice(Q-1,W).join(`
`),lines:{start:Q,end:W},totalLines:J}}function UB8($,Y,X){let G=Y??1,J=X?G+X-1:void 0;return Vi1($,G,J)}function HB8($,Y=1){let X=$.split(`
`),G=Y+X.length-1,J=Math.max(6,String(G).length+1);return X.map((Q,W)=>{let K=Y+W;return`${String(K).padStart(J)}\u2192${Q}`}).join(`
`)}function zB8($,Y){if(!Y)return 0;let X=0,G=0;while((G=$.indexOf(Y,G))!==-1)X++,G+=Y.length;return X}function VB8($,Y,X,G=!1){let J=zB8($,Y);if(J===0)throw new Fi1(Y);if(!G&&J>1)throw new Li1(Y,J);let Q=X.replace(/\$/g,"$$$$");if(G)return{content:$.split(Y).join(X),replacements:J};else return{content:$.replace(Y,Q),replacements:1}}function wf($,Y={}){let X={...LB8,...Y},G=$;if(X.lowercase)G=G.toLowerCase();if(X.removePunctuation)G=G.replace(/[^\w\s]/g," ");return G.split(X.splitPattern).filter((Q)=>{if(Q.length<X.minLength)return!1;if(X.stopwords?.has(Q))return!1;return!0})}function el1($,Y,X={}){if(Y.length===0)return;let G=$.split(`
`),Q={...{lowercase:!0,removePunctuation:!0,minLength:2},...X},W=new Set(Y.map((H)=>Q.lowercase?H.toLowerCase():H)),K,Z;for(let H=0;H<G.length;H++){let z=wf(G[H],X);for(let V of z)if(W.has(V)){let F=H+1;if(K===void 0)K=F;Z=F;break}}if(K!==void 0&&Z!==void 0)return{start:K,end:Z};return}function DB8($){let Y=new Map;for(let X of $)Y.set(X,(Y.get(X)||0)+1);return Y}function iC0($){return typeof $==="function"&&$.batch===!0}function NB8($){let Y=[],X="name";if(typeof $!=="string")return Y.push(`name: Expected string, received ${typeof $}`),Y;if($.length===0)return Y.push("name: Skill name cannot be empty"),Y;if($.length>dL.MAX_NAME_LENGTH)Y.push(`name: Skill name must be ${dL.MAX_NAME_LENGTH} characters or less`);if(!/^[a-z0-9-]+$/.test($))Y.push("name: Skill name must contain only lowercase letters, numbers, and hyphens");if($.startsWith("-")||$.endsWith("-"))Y.push("name: Skill name must not start or end with a hyphen");if($.includes("--"))Y.push("name: Skill name must not contain consecutive hyphens");return Y}function AB8($){let Y=[],X="description";if(typeof $!=="string")return Y.push(`description: Expected string, received ${typeof $}`),Y;if($.length===0)return Y.push("description: Skill description cannot be empty"),Y;if($.length>dL.MAX_DESCRIPTION_LENGTH)Y.push(`description: Skill description must be ${dL.MAX_DESCRIPTION_LENGTH} characters or less`);if($.trim().length===0)Y.push("description: Skill description cannot be only whitespace");return Y}function BB8($){let Y=[],X="license";if($===void 0||$===null)return Y;if(typeof $!=="string")Y.push(`license: Expected string, received ${typeof $}`);return Y}function OB8($){return[]}function EB8($){let Y=[],X="metadata";if($===void 0||$===null)return Y;if(typeof $!=="object"||Array.isArray($))return Y.push(`metadata: Expected object, received ${Array.isArray($)?"array":typeof $}`),Y;return Y}function MB8($){let Y=$.split(/\s+/).filter(Boolean).length;return Math.ceil(Y*1.3)}function RB8($){return $.split(`
`).length}function qB8($,Y,X){let G=[],J=[];if(typeof $!=="object"||$===null||Array.isArray($))return G.push(`Expected object, received ${$===null?"null":Array.isArray($)?"array":typeof $}`),{valid:!1,errors:G,warnings:J};let Q=$;if(G.push(...NB8(Q.name)),G.push(...AB8(Q.description)),G.push(...BB8(Q.license)),G.push(...OB8()),G.push(...EB8(Q.metadata)),Y&&typeof Q.name==="string"&&Q.name!==Y)G.push(`Skill name "${Q.name}" must match directory name "${Y}"`);if(X){let W=RB8(X),K=MB8(X);if(W>dL.MAX_INSTRUCTION_LINES)J.push(`Instructions have ${W} lines (recommended: <${dL.MAX_INSTRUCTION_LINES}). Consider moving content to references/.`);if(K>dL.MAX_INSTRUCTION_TOKENS)J.push(`Instructions have ~${K} estimated tokens (recommended: <${dL.MAX_INSTRUCTION_TOKENS}). Consider moving content to references/.`)}return{valid:G.length===0,errors:G,warnings:J}}function wB8($){let Y=$.length;while(Y>0&&$.charCodeAt(Y-1)===47)Y--;return Y===$.length?$:$.slice(0,Y)}function _B8($){let Y=0;while(Y<$.length&&$.charCodeAt(Y)===47)Y++;let X=$.length;while(X>Y&&$.charCodeAt(X-1)===47)X--;return Y===0&&X===$.length?$:$.slice(Y,X)}function mY($,Y,X){let G=$?.tracing?.currentSpan??$?.tracingContext?.currentSpan;if(!G)return jB8;let{category:J,operation:Q,input:W,attributes:K}=X,Z=G.createChildSpan({type:"workspace_action",name:`workspace:${J}:${Q}`,input:W,attributes:{category:J,workspaceId:Y?.id,workspaceName:Y?.name,...K}});return{span:Z,end(H,z){Z?.end({output:z,attributes:{...H}})},error(H,z){let V=H instanceof Error?H:Error(String(H));Z?.error({error:V,attributes:{success:!1,...z}})}}}function Ni1($){return{skill:TB8($),skill_search:IB8($),skill_read:CB8($)}}async function Ai1($,Y){let X=await $.get(Y);if(X)return{skill:X};let J=(await $.list()).map((Q)=>`${Q.name} (${Q.path})`);return{notFound:`Skill "${Y}" not found. Available skills: ${J.join(", ")}`}}function TB8($){return X8({id:"skill",description:"Activate a skill to load its full instructions. You should activate skills proactively when they are relevant to the user's request without asking for permission first.",inputSchema:U.object({name:U.string().describe("The name or path of the skill to activate. Use the path when multiple skills share the same name.")}),execute:async({name:X},G)=>{let J=mY(G,G?.workspace,{category:"skill",operation:"activate",input:{name:X}});try{let Q=await Ai1($,X);if("notFound"in Q)return J.end({success:!1}),Q.notFound;let{skill:W}=Q,K=[W.instructions];if(W.references?.length)K.push(`

## References
${W.references.map((Z)=>`- references/${Z}`).join(`
`)}`);if(W.scripts?.length)K.push(`

## Scripts
${W.scripts.map((Z)=>`- scripts/${Z}`).join(`
`)}`);if(W.assets?.length)K.push(`

## Assets
${W.assets.map((Z)=>`- assets/${Z}`).join(`
`)}`);return J.end({success:!0}),K.join("")}catch(Q){throw J.error(Q),Q}}})}function IB8($){return X8({id:"skill_search",description:"Search across skill content to find relevant information. Useful when you need to find specific details within skills.",inputSchema:U.object({query:U.string().describe("The search query"),skillNames:U.array(U.string()).optional().describe("Optional list of skill names to search within"),topK:U.number().optional().describe("Maximum number of results to return (default: 5)")}),execute:async({query:X,skillNames:G,topK:J},Q)=>{let W=mY(Q,Q?.workspace,{category:"skill",operation:"search",input:{query:X,skillNames:G,topK:J},attributes:{}});try{let K=await $.search(X,{topK:J,skillNames:G});if(K.length===0)return W.end({success:!0},{resultCount:0}),"No results found.";return W.end({success:!0},{resultCount:K.length}),K.map((Z)=>{let H=Z.content.substring(0,200)+(Z.content.length>200?"...":""),z=Z.lineRange?` (lines ${Z.lineRange.start}-${Z.lineRange.end})`:"";return`[${Z.skillName}]${z} (score: ${Z.score.toFixed(2)})
${H}`}).join(`

`)}catch(K){throw W.error(K),K}}})}function CB8($){return X8({id:"skill_read",description:"Read a file from a skill directory (references, scripts, or assets). The path is relative to the skill root.",inputSchema:U.object({skillName:U.string().describe("The name or path of the skill. Use the path when multiple skills share the same name."),path:U.string().describe('Path to the file relative to the skill root (e.g. "references/colors.md", "scripts/run.sh")'),startLine:U.number().optional().describe("Starting line number (1-indexed). If omitted, starts from the beginning."),endLine:U.number().optional().describe("Ending line number (1-indexed, inclusive). If omitted, reads to the end.")}),execute:async({skillName:X,path:G,startLine:J,endLine:Q},W)=>{let K=mY(W,W?.workspace,{category:"skill",operation:"read",input:{skillName:X,path:G,startLine:J,endLine:Q},attributes:{}});try{let Z=await Ai1($,X);if("notFound"in Z)return K.end({success:!1}),Z.notFound;let H=Z.skill.path,z=null;if(z=await $.getReference(H,G),z===null)z=await $.getScript(H,G);if(z===null)z=await $.getAsset(H,G);if(z===null){let L=(await $.listReferences(H)).map((O)=>`references/${O}`),N=(await $.listScripts(H)).map((O)=>`scripts/${O}`),D=(await $.listAssets(H)).map((O)=>`assets/${O}`),A=[...L,...N,...D],B=A.length>0?`
Available files: ${A.join(", ")}`:"";return K.end({success:!1}),`File "${G}" not found in skill "${X}".${B}`}let V=typeof z==="string"?z:z.toString("utf-8");if(V.slice(0,1000).includes("\x00")){let L=`${Z.skill.path}/${G}`,N=typeof z==="string"?Buffer.byteLength(z):z.length;return K.end({success:!0},{bytesTransferred:N}),`Binary file: ${L} (${N} bytes)`}z=V;let F=Vi1(z,J,Q);return K.end({success:!0},{bytesTransferred:Buffer.byteLength(F.content,"utf-8")}),F.content}catch(Z){throw K.error(Z),Z}}})}function x_($){if(!$?.workspace)throw new nA8;return $.workspace}function vz($){let Y=x_($);if(!Y.filesystem)throw new rA8;return{workspace:Y,filesystem:Y.filesystem}}function YS0($){let Y=x_($);if(!Y.sandbox)throw new aA8;return{workspace:Y,sandbox:Y.sandbox}}async function sG($,Y){let G=await x_($).getInfo({requestContext:$?.requestContext}),J=$?.agent?.toolCallId;await $?.writer?.custom({type:"data-workspace-metadata",data:{toolName:Y,toolCallId:J,...G}})}async function XS0($,Y,X){try{let G=$.lsp;if(!G)return"";let J=$.filesystem?.resolveAbsolutePath?.(Y)??sC0.resolve(G.root,Y.replace(/^\/+/,"")),Q=1e4,W,K=await Promise.race([G.getDiagnostics(J,X),new Promise((D,A)=>{W=setTimeout(()=>A(Error("LSP diagnostics timeout")),Q)})]).finally(()=>clearTimeout(W));if(K===null)return"";if(K.length===0)return"";let Z=new Set,H=K.filter((D)=>{let A=`${D.severity}:${D.line}:${D.character}:${D.message}`;if(Z.has(A))return!1;return Z.add(A),!0}),z={error:[],warning:[],info:[],hint:[]};for(let D of H)z[D.severity].push(D);let V=[`

LSP Diagnostics:`],F=[["error","Errors"],["warning","Warnings"],["info","Info"],["hint","Hints"]];for(let[D,A]of F){let B=z[D];if(B.length===0)continue;V.push(`${A}:`);for(let O of B){let E=O.source?` [${O.source}]`:"";V.push(`  ${O.line}:${O.character} - ${O.message}${E}`)}}let L=V.join(`
`),N=2000;if(L.length>N){let D=L.lastIndexOf(`
`,N);L=L.slice(0,D>0?D:N)+`
  ... (truncated)`}return L}catch{return""}}async function SB8(){if(MO!==void 0)return MO;if(!nC0)nC0=(async()=>{try{let Y=await import("@ast-grep/napi");return MO={parse:Y.parse,Lang:Y.Lang},MO}catch{return MO=null,null}})();return nC0}function kB8(){if(MO!==void 0)return MO!==null;try{return m40(import.meta.url).resolve("@ast-grep/napi"),!0}catch{return!1}}function vB8($,Y){switch($.split(".").pop()?.toLowerCase()){case"ts":return Y.TypeScript;case"tsx":case"jsx":return Y.Tsx;case"js":return Y.JavaScript;case"html":return Y.Html;case"css":return Y.Css;default:return null}}function xB8($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yB8($,Y,X,G){let J=$,Q=0,W=Y.findAll({rule:{kind:"identifier",regex:`^${xB8(X)}$`}}),K=[],Z=new Set;for(let H of W){let z=H.range();if(Z.has(z.start.index))continue;Z.add(z.start.index),K.push({start:z.start.index,end:z.end.index,text:G}),Q++}K.sort((H,z)=>z.start-H.start);for(let{start:H,end:z,text:V}of K)J=J.slice(0,H)+V+J.slice(z);return{content:J,count:Q}}function Bi1($,Y,X){if($&&Y.length>0)return`import ${$}, { ${Y.join(", ")} } from ${X};`;else if($)return`import ${$} from ${X};`;else return`import { ${Y.join(", ")} } from ${X};`}function bB8($,Y,X,G){let J=Y.text();if(/^import\s+\*\s+as\s+/.test(J))return null;let Q=J.match(/^import\s+(?!type\s)(?!\{)(\w+)/),W=J.match(/\{([^}]*)\}/),K=J.match(/(["'][^"']+["'])\s*;?\s*$/);if(!K)return null;let Z=K[1]??"",H=Q?Q[1]??null:null,z=W?(W[1]??"").split(",").map((B)=>B.trim()).filter(Boolean):[],V=H,F=[...z];if(G&&X.length>0){if(!H)V=X[0]??null;for(let B of X.slice(1))if(!F.includes(B))F.push(B)}else for(let B of X)if(!F.includes(B))F.push(B);let L=V!==H,N=F.length!==z.length;if(!L&&!N)return null;let D=Bi1(V,F,Z),A=Y.range();return $.slice(0,A.start.index)+D+$.slice(A.end.index)}function hB8($,Y,X){let{module:G,names:J,isDefault:Q}=X,W=Y.findAll({rule:{kind:"import_statement"}}),K=W.find((V)=>{let F=V.text();if(/^import\s+type\s/.test(F))return!1;if(/^import\s+\*\s+as\s+/.test(F))return!1;return F.includes(`'${G}'`)||F.includes(`"${G}"`)});if(K)return bB8($,K,J,Q)??$;let Z=`'${G}'`,H=Bi1(Q?J[0]:null,Q?J.slice(1):J,Z),z=W.at(-1);if(z){let V=z.range().end.index;return $.slice(0,V)+`
`+H+$.slice(V)}else return H+`

`+$}function fB8($,Y,X){let G=Y.findAll({rule:{kind:"import_statement"}});for(let J of G){let W=J.text().match(/from\s+['"]([^'"]+)['"]|import\s+['"]([^'"]+)['"]/),K=W?.[1]??W?.[2];if(K===X||K?.startsWith(`${X}/`)){let Z=J.range(),H=Z.start.index,z=Z.end.index;if($[z]===`
`)z++;return $.slice(0,H)+$.slice(z)}}return $}function gB8($,Y,X,G){let J=$,Q=0;try{let W=Y.findAll({rule:{pattern:X}}),K=[],Z=[...X.matchAll(/\$(\w+)/g)].map((H)=>H[1]).filter((H)=>H!==void 0);for(let H of W){let z=H.range(),V=G;for(let F of Z){let L=H.getMatch(F);if(L)V=V.replace(new RegExp(`\\$${F}`,"g"),L.text())}K.push({start:z.start.index,end:z.end.index,text:V}),Q++}K.sort((H,z)=>z.start-H.start);for(let{start:H,end:z,text:V}of K)J=J.slice(0,H)+V+J.slice(z)}catch(W){return{content:J,count:0,error:W instanceof Error?W.message:"Pattern matching failed"}}return{content:J,count:Q}}function iB8($){return $.replace(lB8,"")}function l40($){if(typeof $==="string")return{type:"text",value:iB8($)};return $}function nB8($,Y){if(!$)return $;let X=Math.abs(Y??GS0);if(X===0)return $;let G=$.endsWith(`
`),J=(G?$.slice(0,-1):$).split(`
`);if(J.length<=X)return $;let Q=J.slice(-X).join(`
`),W=G?Q+`
`:Q;return`[showing last ${X} of ${J.length} lines]
${W}`}async function Pf($,Y=Oi1,X="start"){if(!$)return $;let G=JG($);if(G<=Y)return $;let J=X==="start"?Ef($,-Y):Ef($,0,Y),Q=X==="start"?"last":"first";return X==="start"?`[output truncated: showing ${Q} ~${Y} of ~${G} tokens]
${J}`:`${J}
[output truncated: showing ${Q} ~${Y} of ~${G} tokens]`}async function rB8($,Y=Oi1,X=0.1){if(!$)return $;let G=JG($);if(G<=Y)return $;let J=Math.floor(Y*X),Q=Y-J,W=J>0?Ef($,0,J):"",K=Q>0?Ef($,-Q):"",Z=`[...output truncated \u2014 showing first ~${J} + last ~${Q} of ~${G} tokens...]`;return[W,Z,K].filter(Boolean).join(`
`)}async function kz($,Y,X,G){let J=nB8($,Y);return rB8(J,X)}function oB8($){let Y=$.match(/\|\s*tail\s+(?:-n\s+)?(-?\d+)\s*$/);if(Y){let X=Math.abs(parseInt(Y[1],10));if(X>0)return{command:$.replace(/\|\s*tail\s+(?:-n\s+)?-?\d+\s*$/,"").trim(),tail:X}}return{command:$}}async function Mi1($,Y){let{command:X,cwd:G,tail:J}=$,Q=$.timeout!=null?$.timeout*1000:void 0,W=$.background,{workspace:K,sandbox:Z}=YS0(Y);if(!W){let M=oB8(X);if(X=M.command,M.tail!=null)J=M.tail}let H=K.browser,{browserClis:z,usingExternalCdp:V,externalCdpUrl:F}=qf.analyzeCommand(X);if(H&&z.length>0&&!V){let M=Y?.agent?.threadId??Y?.threadId??"default";if(!H.isBrowserRunning(M))await H.launch(M);let R=H.getCdpUrl(M),q=H.id;if(R){let _=qf.getWarmupCommands(q,z,R,M);for(let{cliName:P,command:w}of _)try{if(Z.executeCommand)await Z.executeCommand(w,[],{timeout:1e4});qf.markWarmedUp(q,P,M),qf.registerWarmupCleanup(q,P,M,H)}catch{}X=qf.injectCdpUrl(X,R,M)}}else if(H&&z.length>0&&V&&F){let M=Y?.agent?.threadId??Y?.threadId??"default";try{await H.connectToExternalCdp(F,M)}catch{}}await sG(Y,n4.SANDBOX.EXECUTE_COMMAND);let L=Y?.agent?.toolCallId,N=K.getToolsConfig()?.[n4.SANDBOX.EXECUTE_COMMAND],D=N?.maxOutputTokens,A=mY(Y,K,{category:"sandbox",operation:W?"spawnProcess":"executeCommand",input:{command:X,cwd:G,timeout:$.timeout,background:W},attributes:{sandboxProvider:Z.provider}});if(W){if(!Z.processes){let _=new u40("processes");throw A.error(_),_}let M=N?.backgroundProcesses,R=M?.abortSignal===void 0?Y?.abortSignal:M.abortSignal||void 0,q;if(q=await Z.processes.spawn(X,{cwd:G??void 0,timeout:Q??void 0,abortSignal:R,onStdout:M?.onStdout?(_)=>M.onStdout(_,{pid:q.pid,toolCallId:L}):void 0,onStderr:M?.onStderr?(_)=>M.onStderr(_,{pid:q.pid,toolCallId:L}):void 0}),M?.onExit)q.wait().then((_)=>{M.onExit({pid:q.pid,exitCode:_.exitCode,stdout:_.stdout,stderr:_.stderr,stdoutTruncated:_.stdoutTruncated,stderrTruncated:_.stderrTruncated,stdoutDroppedBytes:_.stdoutDroppedBytes,stderrDroppedBytes:_.stderrDroppedBytes,toolCallId:L})});return A.end({success:!0},{pid:Number(q.pid)||void 0}),`Started background process (PID: ${q.pid})`}if(!Z.executeCommand){let M=new u40("executeCommand");throw A.error(M),M}let B=Date.now(),O="",E="";try{let M=await Z.executeCommand(X,[],{timeout:Q??void 0,cwd:G??void 0,abortSignal:Y?.abortSignal,onStdout:async(R)=>{O+=R,await Y?.writer?.custom({type:"data-sandbox-stdout",data:{output:R,timestamp:Date.now(),toolCallId:L},transient:!0})},onStderr:async(R)=>{E+=R,await Y?.writer?.custom({type:"data-sandbox-stderr",data:{output:R,timestamp:Date.now(),toolCallId:L},transient:!0})}});if(await Y?.writer?.custom({type:"data-sandbox-exit",data:{exitCode:M.exitCode,success:M.success,executionTimeMs:M.executionTimeMs,toolCallId:L}}),A.end({success:M.success},{exitCode:M.exitCode}),!M.success){let R=[await kz(M.stdout,J,D),await kz(M.stderr,J,D)].filter(Boolean);return R.push(`Exit code: ${M.exitCode}`),R.join(`
`)}return await kz(M.stdout,J,D)||"(no output)"}catch(M){await Y?.writer?.custom({type:"data-sandbox-exit",data:{exitCode:-1,success:!1,executionTimeMs:Date.now()-B,toolCallId:L}}),A.end({success:!1},{exitCode:-1});let R=[await kz(O,J,D),await kz(E,J,D)].filter(Boolean),q=M instanceof Error?M.message:String(M);return R.push(`Error: ${q}`),R.join(`
`)}}async function qi1($){let Y;try{let G=await $.readFile(".gitignore",{encoding:"utf-8"});if(typeof G!=="string"||!G.trim())return;Y=G}catch{return}let X=Ki1.default().add(Y);return(G)=>{let J=G.replace(/^\.\//,"").replace(/^\//,"");if(!J)return!1;return X.ignores(J)}}async function QO8($,Y,X){let G=X?.maxDepth??1/0,J=X?.showHidden??!1,Q=X?.dirsOnly??!1,W=X?.exclude,K=X?.extension,Z=X?.pattern,H=X?.respectGitignore??!0,z=X?.ignoreFilter;if(!z&&H){let R=await qi1($);if(R){let q=Y.replace(/^\.\//,"").replace(/^\//,"").replace(/\/$/,"");z=q&&R(q+"/")?void 0:R}}let V;if(Z){let R=Array.isArray(Z)?Z:[Z];V=$S0(R,{dot:J})}let F=["."],L=[],N=0,D=0,A=!1;async function B(R,q){if(q>=G){A=!0;return}let _;try{_=await $.readdir(R)}catch(j){if(q===0)throw j;return}let P=_;if(!J)P=P.filter((j)=>!j.name.startsWith("."));if(W){let j=Array.isArray(W)?W:[W];P=P.filter((C)=>{return!j.some((k)=>C.name.includes(k))})}if(z)P=P.filter((j)=>{let C=aC0("",R,j.name),k=j.type==="directory"?`${C}/`:C;return!z(k)});if(Q)P=P.filter((j)=>j.type==="directory");if(K&&!Q){let j=Array.isArray(K)?K:[K];P=P.filter((C)=>{if(C.type==="directory")return!0;return j.some((k)=>{let S=k.startsWith(".")?k:`.${k}`;return C.name.endsWith(S)})})}if(V&&!Q)P=P.filter((j)=>{if(j.type==="directory")return!0;let C=aC0(Y,R,j.name);return V(C)});P.sort((j,C)=>{if(j.type==="directory"&&C.type!=="directory")return-1;if(j.type!=="directory"&&C.type==="directory")return 1;return j.name<C.name?-1:j.name>C.name?1:0});let w="\t".repeat(q);for(let j=0;j<P.length;j++){let C=P[j],k=C.isSymlink&&C.symlinkTarget?`${C.name} -> ${C.symlinkTarget}`:C.name;if(F.push(`${w}${k}`),L.push(aC0(Y,R,C.name)),C.type==="directory"){if(N++,!C.isSymlink){let S=WO8(R,C.name);await B(S,q+1)}}else D++}}await B(Y,0);let O=N===1?"1 directory":`${N} directories`,E=D===1?"1 file":`${D} files`,M=`${O}, ${E}`;if(A)M+=` (truncated at depth ${G})`;return{tree:F.join(`
`),summary:M,dirCount:N,fileCount:D,truncated:A,paths:L}}function aC0($,Y,X){let G=(W)=>W==="/"||W===""||W===".",J=Y===$||G(Y)&&G($)?X:`${Y==="/"?"":Y}/${X}`;if(G($)){let W=J.replace(/^\.\//,"");return W.startsWith("/")?W.slice(1):W}return(J.startsWith($+"/")?J.slice($.length+1):J)||J}function WO8($,Y){if($===""||$==="./"||$===".")return Y;if($==="/")return`/${Y}`;return`${$}/${Y}`}async function ZO8($,Y){try{return(await oC0.readFile($,"utf-8")).split(`
`)[Y-1]?.trim()??null}catch{return null}}function UO8($,Y,X){let G=X?.($);if(G)return G;if(sC0.isAbsolute($))return $;return sC0.resolve(Y,$)}function Yi1($){if(!$.startsWith("file://"))return null;try{return lA8($)}catch{return null}}function Xi1($){return`${$.path}:L${$.line}`}function Gi1($){let Y=process.cwd();if($.startsWith(Y))return"$cwd"+$.slice(Y.length);return $}function VO8($){return typeof $==="object"&&$!==null&&$.__workspaceMedia===!0&&typeof $.text==="string"&&typeof $.mediaType==="string"&&typeof $.data==="string"}function NO8($){if(!$)return!0;if($==="application/octet-stream")return!0;if($.startsWith("text/"))return!0;if(DO8.has($))return!0;if($.endsWith("+json")||$.endsWith("+xml"))return!0;return!1}function BO8($){for(let Y of $)if(typeof Y!=="string"||!AO8.test(Y))throw Error(`Invalid \`mediaTypes\` pattern: ${JSON.stringify(Y)}. Expected \`*\`, \`*/*\`, \`type/*\`, or a full mime type like \`application/pdf\`.`)}function OO8($){if($===!1)return()=>!1;if(typeof $==="function")return(X)=>X?$(X):!1;let Y=$??FO8;return BO8(Y),(X)=>{if(!X)return!1;return Y.some((G)=>{if(G==="*"||G==="*/*")return!0;if(G.endsWith("/*"))return X.startsWith(G.slice(0,-1));return X===G})}}async function JS0($,Y,X){if($===void 0)return X;if(typeof $==="boolean")return $;if(!Y)return X;try{return await $(Y)}catch(G){return console.warn("[Workspace Tools] Dynamic config function threw, using safe default:",G),X}}function wi1($){if(typeof $?.hasFilesystemConfig==="function")return $.hasFilesystemConfig();return!!$.filesystem}function Ji1($){if(!$)return{};if(typeof $.entries==="function")return Object.fromEntries($.entries());return $}async function qO8($,Y,X){let G=!0,J=!1,Q,W,K;if($){if($.enabled!==void 0)G=$.enabled;if($.requireApproval!==void 0)J=$.requireApproval;let H=$[Y];if(H){if(H.enabled!==void 0)G=H.enabled;if(H.requireApproval!==void 0)J=H.requireApproval;if(H.requireReadBeforeWrite!==void 0)Q=H.requireReadBeforeWrite;if(H.maxOutputTokens!==void 0)W=H.maxOutputTokens;if(H.name!==void 0)K=H.name}}return{enabled:await JS0(G,X,!1),requireApproval:J,requireReadBeforeWrite:Q,maxOutputTokens:W,name:K}}async function _i1($,Y){if(!$.filesystem&&wi1($)){let X=Y?.requestContext??new p1,G=await $.resolveFilesystem({requestContext:X});if(G)return new Proxy($,{get(J,Q){if(Q==="filesystem")return G;return J[Q]}})}return $}function PO8($,Y){return{...$,execute:async(X,G={})=>{let J=await _i1(G?.workspace??Y,G),Q={...G,workspace:J};return $.execute(X,Q)}}}function wO8($,Y,X,G,J){return{...$,execute:async(Q,W={})=>{let K=await _i1(W?.workspace??Y,W),Z={...W,workspace:K},H=K.filesystem;if(J==="write"&&H){let V=X.getReadRecord(Q.path);if(V)Z={...Z,__expectedMtime:V.modifiedAtRead};try{let F=await H.stat(Q.path);if(G.requireReadBeforeWrite!==void 0){if(await JS0(G.requireReadBeforeWrite,{args:Q,requestContext:Z.requestContext??{},workspace:K},!0)){let N=X.needsReRead(Q.path,F.modifiedAt);if(N.needsReRead)throw new sA8(Q.path,N.reason)}}}catch(F){if(!(F instanceof c40))throw F}}let z=await $.execute(Q,Z);if(J==="read"&&H)try{let V=await H.stat(Q.path);X.recordRead(Q.path,V.modifiedAt)}catch{}else if(J==="write")X.clearReadRecord(Q.path);return z}}}function _O8($,Y){return{...$,execute:async(X,G={})=>{if(!X.path)throw Error("wrapWithWriteLock: input.path is required");return Y.withLock(X.path,()=>$.execute(X,G))}}}async function ji1($,Y){let X=Y?{...Y,requestContext:Ji1(Y.requestContext)}:{requestContext:{},workspace:$},G={},J=$.getToolsConfig(),Q=$.filesystem?.readOnly??!1,W=new JB8,K=new GB8,Z=async(H,z,V)=>{let F=await qO8(J,H,X);if(!F.enabled)return;if(V?.requireWrite&&Q)return;let L;if(typeof F.requireApproval==="function"){let D=F.requireApproval;L={...z,requireApproval:!0,needsApprovalFn:async(A,B)=>JS0(D,{args:A,requestContext:Ji1(B?.requestContext),workspace:B?.workspace??$},!0)}}else L={...z,requireApproval:F.requireApproval};if(V?.readTrackerMode)L=wO8(L,$,K,F,V.readTrackerMode);else L=PO8(L,$);if(V?.useWriteLock)L=_O8(L,W);let N=F.name??H;if(G[N])throw Error(`Duplicate workspace tool name "${N}": tool "${H}" conflicts with an already-registered tool. Check your tools config for duplicate "name" values.`);if(N!==H&&"id"in L)L={...L,id:N};G[N]=L};if(wi1($)){if(await Z(n4.FILESYSTEM.READ_FILE,EO8,{readTrackerMode:"read"}),await Z(n4.FILESYSTEM.WRITE_FILE,RO8,{requireWrite:!0,readTrackerMode:"write",useWriteLock:!0}),await Z(n4.FILESYSTEM.EDIT_FILE,pB8,{requireWrite:!0,readTrackerMode:"write",useWriteLock:!0}),await Z(n4.FILESYSTEM.LIST_FILES,KO8),await Z(n4.FILESYSTEM.DELETE,uB8,{requireWrite:!0,useWriteLock:!0}),await Z(n4.FILESYSTEM.FILE_STAT,$O8),await Z(n4.FILESYSTEM.MKDIR,zO8,{requireWrite:!0}),await Z(n4.FILESYSTEM.GREP,XO8),kB8())await Z(n4.FILESYSTEM.AST_EDIT,mB8,{requireWrite:!0,readTrackerMode:"write",useWriteLock:!0})}if($.canBM25||$.canVector){let H=[$.canBM25?"bm25":null,$.canVector?"vector":null,$.canHybrid?"hybrid":null].filter((V)=>V!==null),z={...MO8,inputSchema:Pi1.extend({mode:U.enum(H).optional().describe(`Search mode: ${H.join(", ")}`)})};await Z(n4.SEARCH.SEARCH,z),await Z(n4.SEARCH.INDEX,GO8,{requireWrite:!0})}if($.sandbox){if($.sandbox.executeCommand){let H=$.sandbox.processes?eB8:tB8;await Z(n4.SANDBOX.EXECUTE_COMMAND,H)}if($.sandbox.processes)await Z(n4.SANDBOX.GET_PROCESS_OUTPUT,YO8),await Z(n4.SANDBOX.KILL_PROCESS,JO8)}return await Z(n4.LSP.LSP_INSPECT,HO8),G}var Qi1,Wi1,Ki1,_f,nA8,rA8,aA8,u40,jf,Zi1,c40,sA8,tA8,$B8,GB8=class{records=new Map;recordRead($,Y){let X=this.normalizePath($);this.records.set(X,{path:X,readAt:new Date,modifiedAtRead:Y})}getReadRecord($){return this.records.get(this.normalizePath($))}needsReRead($,Y){let X=this.getReadRecord($);if(!X)return{needsReRead:!0,reason:`File "${$}" has not been read. You must read a file before writing to it.`};if(Y.getTime()>X.modifiedAtRead.getTime())return{needsReRead:!0,reason:`File "${$}" was modified since last read (read at: ${X.modifiedAtRead.toISOString()}, current: ${Y.toISOString()}). Please re-read the file to get the latest contents.`};return{needsReRead:!1}}clearReadRecord($){this.records.delete(this.normalizePath($))}clear(){this.records.clear()}normalizePath($){return q7.posix.normalize($.replace(/\\/g,"/")).replace(/\/$/,"")||"/"}},JB8=class{queues=new Map;timeoutMs;constructor($){this.timeoutMs=$?.timeoutMs??30000}get size(){return this.queues.size}withLock($,Y){let X=this.normalizePath($),G=this.queues.get(X)??Promise.resolve(),J,Q,W=new Promise((Z,H)=>{J=Z,Q=H}),K=G.catch(()=>{}).then(async()=>{let Z;try{let H=await Promise.race([Y(),new Promise((z,V)=>{Z=setTimeout(()=>V(Error(`write-lock timeout on "${X}" after ${this.timeoutMs}ms`)),this.timeoutMs)})]);clearTimeout(Z),J(H)}catch(H){clearTimeout(Z),Q(H)}});return this.queues.set(X,K),K.finally(()=>{if(this.queues.get(X)===K)this.queues.delete(X)}),W}normalizePath($){return q7.posix.normalize($.replace(/\\/g,"/").replace(/^\/\/+/,"/")).replace(/\/+$/,"")||"/"}},Ui1,$l5,Yl5,Xl5,Fi1,Li1,FB8,LB8,Di1=class ${k1;b;#$=new Map;#Y=new Map;#X=new Map;#J=0;#G=0;#Q;constructor(Y={},X={}){this.k1=Y.k1??1.5,this.b=Y.b??0.75,this.#Q=X}add(Y,X,G){if(this.#$.has(Y))this.remove(Y);let J=wf(X,this.#Q),Q=DB8(J),W={id:Y,content:X,tokens:J,termFrequencies:Q,length:J.length,metadata:G};this.#$.set(Y,W),this.#G++;for(let K of Q.keys()){if(!this.#Y.has(K))this.#Y.set(K,new Set);this.#Y.get(K).add(Y),this.#X.set(K,(this.#X.get(K)||0)+1)}this.#U()}remove(Y){let X=this.#$.get(Y);if(!X)return!1;for(let G of X.termFrequencies.keys()){let J=this.#Y.get(G);if(J)if(J.delete(Y),J.size===0)this.#Y.delete(G),this.#X.delete(G);else this.#X.set(G,(this.#X.get(G)||1)-1)}return this.#$.delete(Y),this.#G--,this.#U(),!0}clear(){this.#$.clear(),this.#Y.clear(),this.#X.clear(),this.#G=0,this.#J=0}search(Y,X=10,G=0){let J=wf(Y,this.#Q);if(J.length===0||this.#G===0)return[];let Q=new Map;for(let K of J){let Z=this.#Y.get(K);if(!Z)continue;let H=this.#X.get(K)||0,z=this.#Z(H);for(let V of Z){let F=this.#$.get(V),L=F.termFrequencies.get(K)||0,N=this.#W(L,F.length,z);Q.set(V,(Q.get(V)||0)+N)}}let W=[];for(let[K,Z]of Q.entries())if(Z>=G){let H=this.#$.get(K);W.push({id:K,content:H.content,score:Z,metadata:H.metadata})}return W.sort((K,Z)=>Z.score-K.score),W.slice(0,X)}get(Y){return this.#$.get(Y)}has(Y){return this.#$.has(Y)}get size(){return this.#G}get documentIds(){return Array.from(this.#$.keys())}serialize(){let Y=[];for(let[X,G]of this.#$.entries())Y.push({id:X,content:G.content,tokens:G.tokens,termFrequencies:Object.fromEntries(G.termFrequencies),length:G.length,metadata:G.metadata});return{k1:this.k1,b:this.b,documents:Y,avgDocLength:this.#J}}static deserialize(Y,X={}){let G=new $({k1:Y.k1,b:Y.b},X);for(let J of Y.documents){let Q=new Map(Object.entries(J.termFrequencies)),W={id:J.id,content:J.content,tokens:J.tokens,termFrequencies:Q,length:J.length,metadata:J.metadata};G.#$.set(J.id,W),G.#G++;for(let K of Q.keys()){if(!G.#Y.has(K))G.#Y.set(K,new Set);G.#Y.get(K).add(J.id),G.#X.set(K,(G.#X.get(K)||0)+1)}}return G.#J=Y.avgDocLength,G}#U(){if(this.#G===0){this.#J=0;return}let Y=0;for(let X of this.#$.values())Y+=X.length;this.#J=Y/this.#G}#Z(Y){return Math.log((this.#G-Y+0.5)/(Y+0.5)+1)}#W(Y,X,G){let J=Y*(this.k1+1),Q=Y+this.k1*(1-this.b+this.b*(X/this.#J));return G*(J/Q)}},g40=8,Gl5=class{#$;#Y;#X;#J;#G=new Set;#Q=[];#U=!1;#Z=!1;constructor($={}){if($.bm25!==void 0)this.#Y=$.bm25.tokenize,this.#$=new Di1($.bm25.bm25,this.#Y);if($.vector)this.#X=$.vector;this.#J=$.lazyVectorIndex??!1}async index($){let Y={...$.metadata};if($.startLineOffset!==void 0)Y._startLineOffset=$.startLineOffset;if(this.#G.add($.id),this.#$)this.#$.add($.id,$.content,Y);if(this.#X){let X={...$,metadata:Y};if(this.#J)this.#Q.push(X),this.#U=!1;else await this.#V(X)}}async indexMany($,Y){let X=Y?.stopOnError,G=Y?.concurrency??g40;await LO($,(J)=>this.index(J),{stopOnError:X,concurrency:G})}async remove($){if(this.#G.delete($),this.#$)this.#$.remove($);if(this.#X){try{await this.#X.vectorStore.deleteVector({indexName:this.#X.indexName,id:$})}catch{}if(this.#J)this.#Q=this.#Q.filter((Y)=>Y.id!==$)}}async removeByPrefix($){let Y=[...this.#G].filter((X)=>X.startsWith($));for(let X of Y)this.#G.delete(X);if(this.#$)for(let X of Y)this.#$.remove(X);if(this.#X){if(this.#J)this.#Q=this.#Q.filter((X)=>!X.id.startsWith($));for(let X of Y)try{await this.#X.vectorStore.deleteVector({indexName:this.#X.indexName,id:X})}catch{}}}async removeSource($){if(await this.remove($),await this.removeByPrefix(`${$}#chunk-`),this.#X)try{await this.#X.vectorStore.deleteVectors({indexName:this.#X.indexName,filter:{sourceFile:$}})}catch{}}clear(){if(this.#G.clear(),this.#$)this.#$.clear();this.#Q=[],this.#U=!1}async search($,Y={}){let{topK:X=10,minScore:G,mode:J,vectorWeight:Q=0.5,filter:W}=Y,K=this.#W(J);if(K==="bm25")return this.#N($,X,G);if(K==="vector")return this.#B($,X,G,W);return this.#R($,X,G,Q,W)}get canBM25(){return!!this.#$}get canVector(){return!!this.#X}get canHybrid(){return this.canBM25&&this.canVector}get bm25Index(){return this.#$}#W($){if($){if($==="vector"&&!this.canVector)throw Error("Vector search requires vector configuration.");if($==="bm25"&&!this.canBM25)throw Error("BM25 search requires BM25 configuration.");if($==="hybrid"&&!this.canHybrid)throw Error("Hybrid search requires both vector and BM25 configuration.");return $}if(this.canHybrid)return"hybrid";if(this.canVector)return"vector";if(this.canBM25)return"bm25";throw Error("No search configuration available. Provide bm25 or vector config.")}async#H($){if(!this.#X)throw Error("Vector configuration is required to embed text.");let{embedder:Y}=this.#X;if(iC0(Y)){let[X]=await Y([$]);if(!X)throw Error("Batch embedder returned no embedding for input text.");return X}return Y($)}async#F($){if(!this.#X)throw Error("Vector configuration is required to embed texts.");if($.length===0)return[];let{embedder:Y}=this.#X;if(iC0(Y)){let X=Y.maxBatchSize;if(X===void 0||$.length<=X)return Y($);let G=[];for(let Q=0;Q<$.length;Q+=X)G.push($.slice(Q,Q+X));return(await LO(G,(Q)=>Y(Q),{concurrency:g40})).flat()}return LO($,(X)=>Y(X),{concurrency:g40})}async#V($){if(!this.#X)return;let{vectorStore:Y,indexName:X}=this.#X,G=await this.#H($.content);if(!this.#Z)try{await Y.createIndex({indexName:X,dimension:G.length})}catch{}await Y.upsert({indexName:X,vectors:[G],metadata:[{id:$.id,text:$.content,...$.metadata}],ids:[$.id]}),this.#Z=!0}async#K($){if(!this.#X||$.length===0)return;let{vectorStore:Y,embedder:X,indexName:G}=this.#X;if(!iC0(X)){await LO($,(Q)=>this.#V(Q),{concurrency:g40});return}let J=await this.#F($.map((Q)=>Q.content));if(J.length!==$.length)throw Error(`Batch embedder returned ${J.length} embeddings for ${$.length} inputs.`);if(!this.#Z){let Q=J[0].length;try{await Y.createIndex({indexName:G,dimension:Q})}catch{}}await Y.upsert({indexName:G,vectors:J,metadata:$.map((Q)=>({id:Q.id,text:Q.content,...Q.metadata})),ids:$.map((Q)=>Q.id)}),this.#Z=!0}#A($){let Y=new Map;for(let X of $)Y.set(X.id,X);return[...Y.values()]}async#O(){if(!this.#J)return;if(this.#Q.length===0){this.#U=!0;return}while(this.#Q.length>0){let $=this.#Q;this.#Q=[];let Y=this.#A($);try{await this.#K(Y)}catch(X){throw this.#Q=[...Y,...this.#Q],X}}this.#U=!0}#N($,Y,X){if(!this.#$)throw Error("BM25 search requires BM25 configuration.");let G=this.#$.search($,Y,X),J=wf($,this.#Y);return G.map((Q)=>{let W=el1(Q.content,J,this.#Y),K=this.#L(W,Q.metadata),{_startLineOffset:Z,...H}=Q.metadata??{};return{id:Q.id,content:Q.content,score:Q.score,lineRange:K,metadata:Object.keys(H).length>0?H:void 0,scoreDetails:{bm25:Q.score}}})}async#B($,Y,X,G){if(!this.#X)throw Error("Vector search requires vector configuration.");await this.#O();let{vectorStore:J,indexName:Q}=this.#X,W=await this.#H($),K=await J.query({indexName:Q,queryVector:W,topK:Y,filter:G}),Z=wf($,this.#Y),H=[];for(let z of K){if(X!==void 0&&z.score<X)continue;let V=z.metadata?.id??z.id,F=z.metadata?.text??"",{id:L,text:N,_startLineOffset:D,...A}=z.metadata??{},B=el1(F,Z,this.#Y),O=this.#L(B,z.metadata);H.push({id:V,content:F,score:z.score,lineRange:O,metadata:Object.keys(A).length>0?A:void 0,scoreDetails:{vector:z.score}})}return H}async#R($,Y,X,G=0.5,J){let Q=Math.min(Y*2,50),[W,K]=await Promise.all([this.#B($,Q,void 0,J),Promise.resolve(this.#N($,Q,void 0))]),Z=this.#D(K),H=new Map;for(let D of Z)H.set(D.id,D);let z=new Map;for(let D of W)z.set(D.id,D);let V=new Map,F=new Set([...z.keys(),...H.keys()]),L=1-G;for(let D of F){let A=z.get(D),B=H.get(D),O=A?.scoreDetails?.vector??0,E=B?.score??0,M=G*O+L*E,R=A??B;V.set(D,{id:D,content:R.content,score:M,lineRange:B?.lineRange??A?.lineRange,metadata:R.metadata,scoreDetails:{vector:A?.scoreDetails?.vector,bm25:B?.scoreDetails?.bm25}})}let N=Array.from(V.values());if(N.sort((D,A)=>A.score-D.score),X!==void 0)N=N.filter((D)=>D.score>=X);return N.slice(0,Y)}#D($){if($.length===0)return $;let Y=$.map((Q)=>Q.scoreDetails?.bm25??Q.score),X=Math.max(...Y),G=Math.min(...Y),J=X-G;if(J===0)return $.map((Q)=>({...Q,score:1}));return $.map((Q)=>({...Q,score:((Q.scoreDetails?.bm25??Q.score)-G)/J}))}#L($,Y){if(!$)return;let X=Y?._startLineOffset;if(typeof X!=="number")return $;return{start:$.start+X-1,end:$.end+X-1}}},dL,Jl5=class{#$;constructor($={}){this.#$=$.basePath??process.cwd()}#Y($){if(q7.isAbsolute($))return $;return q7.resolve(this.#$,$)}async exists($){return YB8(this.#Y($))}async stat($){return XB8(this.#Y($),$)}async readFile($){let Y=this.#Y($),X=await X7.readFile(Y);if(eC0($))return X.toString("utf-8");return X}async readdir($){let Y=this.#Y($),X=await X7.readdir(Y,{withFileTypes:!0});return Promise.all(X.map(async(G)=>{let J=q7.join(Y,G.name),Q=G.isSymbolicLink(),W=G.isDirectory()?"directory":"file";if(Q)try{W=(await X7.stat(J)).isDirectory()?"directory":"file"}catch{W="file"}return{name:G.name,type:W,isSymlink:Q||void 0}}))}async realpath($){return X7.realpath(this.#Y($))}},PB8=class{#$;#Y;#X;#J;constructor($,Y,X){this.#$=$,this.#Y=Y,this.#X=X,this.#J=this.#G()}#G(){let $=new Set;$.add(""),$.add(".");for(let Y of Object.keys(this.#$.entries)){let X=Y.split("/");for(let G=1;G<X.length;G++)$.add(X.slice(0,G).join("/"))}return $}#Q($){let Y=$.replace(/^[./\\]+|[/\\]+$/g,"");if(Y==="")return"";return Y}async exists($){let Y=this.#Q($);if(this.#$.entries[Y])return!0;return this.#J.has(Y)}async stat($){let Y=this.#Q($),X=Y.split("/").pop()||Y||".",G=this.#$.entries[Y];if(G)return{name:X,type:"file",size:G.size,createdAt:this.#X,modifiedAt:this.#X,mimeType:G.mimeType};if(this.#J.has(Y))return{name:X,type:"directory",size:0,createdAt:this.#X,modifiedAt:this.#X};throw Error(`Path not found in skill version tree: ${$}`)}async readFile($){let Y=this.#Q($),X=this.#$.entries[Y];if(!X)throw Error(`File not found in skill version tree: ${$}`);let G=await this.#Y.get(X.blobHash);if(!G)throw Error(`Blob not found for hash ${X.blobHash} (file: ${$})`);if(X.encoding==="base64")return Buffer.from(G.content,"base64");return G.content}async readdir($){let Y=this.#Q($);if(!this.#J.has(Y))throw Error(`Directory not found in skill version tree: ${$}`);let X=Y===""?"":Y+"/",G=new Set,J=[];for(let Q of Object.keys(this.#$.entries)){if(!Q.startsWith(X))continue;let W=Q.slice(X.length),K=W.split("/")[0];if(!K||G.has(K))continue;G.add(K);let Z=W.includes("/");J.push({name:K,type:Z?"directory":"file"})}return J}async realpath($){return this.#Q($)}},Ql5=class{#$=new Map;#Y;#X;#J;constructor($,Y,X){let G=0;for(let J of $){this.#$.set(J.dirName,new PB8(J.tree,Y,J.versionCreatedAt));let Q=J.versionCreatedAt.getTime();if(Q>G)G=Q}this.#J=G>0?new Date(G):new Date(0),this.#Y=X?.fallback,this.#X=new Set(X?.fallbackSkills??[])}#G($){let Y=0;while(Y<$.length){let G=$.charCodeAt(Y);if(G===46||G===47||G===92)Y++;else break}let X=$.length;while(X>Y){let G=$.charCodeAt(X-1);if(G===47||G===92)X--;else break}return Y===0&&X===$.length?$:$.slice(Y,X)}#Q($){let Y=this.#G($);if(Y==="")return null;let X=Y.split("/"),G=X[0],J=X.slice(1).join("/");if(this.#X.has(G)&&this.#Y)return{source:this.#Y,subPath:Y,mountDir:""};let Q=this.#$.get(G);if(Q)return{source:Q,subPath:J,mountDir:G};if(this.#Y)return{source:this.#Y,subPath:Y,mountDir:""};return null}async exists($){if(this.#G($)==="")return!0;let X=this.#Q($);if(!X)return!1;return X.source.exists(X.subPath)}async stat($){if(this.#G($)==="")return{name:".",type:"directory",size:0,createdAt:this.#J,modifiedAt:this.#J};let X=this.#Q($);if(!X)throw Error(`Path not found in composite skill source: ${$}`);return X.source.stat(X.subPath)}async readFile($){let Y=this.#Q($);if(!Y)throw Error(`File not found in composite skill source: ${$}`);return Y.source.readFile(Y.subPath)}async readdir($){if(this.#G($)===""){let G=[],J=new Set;for(let Q of this.#$.keys())G.push({name:Q,type:"directory"}),J.add(Q);for(let Q of this.#X)if(!J.has(Q))G.push({name:Q,type:"directory"}),J.add(Q);return G}let X=this.#Q($);if(!X)throw Error(`Directory not found in composite skill source: ${$}`);return X.source.readdir(X.subPath)}async realpath($){if(this.#G($)==="")return"";let X=this.#Q($);if(!X)throw Error(`Path not found in composite skill source: ${$}`);let G=X.source.realpath?await X.source.realpath(X.subPath):X.subPath;return[X.mountDir,G].filter(Boolean).join("/")}},Wl5=class ${#$;#Y;#X;#J;#G;#Q=new Map;#U=!1;#Z=null;#W=0;#H=[];#F=new Map;#V=new Map;static GLOB_RESOLVE_INTERVAL=5000;static STALENESS_CHECK_COOLDOWN=2000;constructor(Y){this.#$=Y.source,this.#Y=Y.skills,this.#X=Y.searchEngine,this.#J=Y.validateOnLoad??!0,this.#G=Y.checkSkillFileMtime??!1}async list(){await this.#L();let Y=[];for(let X of this.#Q.values()){let G=await this.#N(X);for(let J of G)Y.push({name:J.name,path:J.path,description:J.description,license:J.license,compatibility:J.compatibility,metadata:J.metadata})}return Y}async get(Y){await this.#L();let X=await this.#K(Y)??this.#A(Y);if(!X)return null;let{indexableContent:G,...J}=X;return J}async has(Y){return await this.#L(),(await this.#K(Y)??this.#A(Y))!==null}async#K(Y){let X=this.#Q.get(Y);if(!X||X.length===0)return null;return this.#B(X)}#A(Y){let X=Y.replace(/\/SKILL\.md$/,"");for(let G of this.#Q.values()){let J=G.find((Q)=>Q.path===X);if(J)return J}return null}async#O(Y){if(!this.#$.realpath)return Y;try{return await this.#$.realpath(Y)}catch{return Y}}async#N(Y){let X=new Map;for(let J of Y){let Q=await this.#O(J.path),W=X.get(Q)??[];W.push(J),X.set(Q,W)}let G={local:0,managed:1,external:2};return[...X.values()].map((J)=>[...J].sort((Q,W)=>{let K=G[Q.source.type]??99,Z=G[W.source.type]??99;if(K!==Z)return K-Z;return Q.path.localeCompare(W.path)})[0])}async#B(Y){if(Y.length===0)return null;if(Y.length===1)return Y[0];let X=await this.#N(Y);if(X.length===1)return X[0];let G={local:0,managed:1,external:2},J=[...X].sort((K,Z)=>{let H=G[K.source.type]??99,z=G[Z.source.type]??99;if(H!==z)return H-z;return K.path.localeCompare(Z.path)}),Q=J[0],W=J[1];if(Q.source.type===W.source.type){let K=J.filter((Z)=>Z.source.type===Q.source.type).map((Z)=>`"${Z.path}"`).join(", ");throw Error(`[WorkspaceSkills] Cannot resolve skill "${Q.name}": multiple ${Q.source.type} skills found at ${K}. Rename one or move it to a different source type.`)}return console.warn(`[WorkspaceSkills] Multiple skills named "${Q.name}" found. Using "${Q.path}" (source: ${Q.source.type}). Other candidates: ${J.slice(1).map((K)=>`"${K.path}" (${K.source.type})`).join(", ")}`),Q}async refresh(){for(let Y of this.#Q.values())for(let X of Y)await this.#f(X);this.#Q.clear(),this.#U=!1,this.#Z=null,await this.#M(),this.#U=!0}async maybeRefresh(Y){await this.#L();let X=await this.#R(Y);if(!this.#D(this.#H,X)){this.#H=X,await this.refresh();return}if(await this.#v())await this.refresh()}async addSkill(Y){await this.#L();let X,G;if(Y.endsWith("/SKILL.md")||Y==="SKILL.md")X=Y,G=this.#S(Y).split("/").pop()||"unknown";else X=this.#C(Y,"SKILL.md"),G=Y.split("/").pop()||"unknown";let J=this.#T(Y),Q=await this.#_(X,G,J),W=this.#Q.get(Q.name)??[],K=W.findIndex((Z)=>Z.path===Q.path);if(K>=0)await this.#f(W[K]),W[K]=Q;else W.push(Q);this.#Q.set(Q.name,W),await this.#k(Q),this.#W=Date.now()}async removeSkill(Y){await this.#L();let X=await this.#K(Y)??this.#A(Y);if(!X)return;await this.#f(X);let G=this.#Q.get(X.name);if(G){let J=G.findIndex((Q)=>Q.path===X.path);if(J>=0)G.splice(J,1);if(G.length===0)this.#Q.delete(X.name)}this.#W=Date.now()}async#R(Y){if(Array.isArray(this.#Y))return this.#Y;return this.#Y(Y??{})}#D(Y,X){if(Y.length!==X.length)return!1;let G=[...Y].sort(),J=[...X].sort();return G.every((Q,W)=>Q===J[W])}async search(Y,X={}){if(await this.#L(),!this.#X)return this.#b(Y,X);let{topK:G=5,minScore:J,skillNames:Q,includeReferences:W=!0,mode:K}=X,Z=[...this.#Q.values()].reduce((L,N)=>L+N.reduce((D,A)=>D+1+A.references.length,0),0),H=Math.max(Q?G*3:G,Z),z=await this.#X.search(Y,{topK:H,minScore:J,mode:K}),V=[],F=new Set;for(let L of z){let N=L.metadata?.skillPath,D=L.metadata?.source;if(!N||!D)continue;let A=this.#A(N);if(!A)continue;let B=await this.#K(A.name)??A;if(Q&&!Q.includes(B.name))continue;if(!W&&D!=="SKILL.md")continue;let O=`${B.path}:${D}`;if(F.has(O))continue;if(F.add(O),V.push({skillName:B.name,skillPath:B.path,source:D,content:L.content,score:L.score,lineRange:L.lineRange,scoreDetails:L.scoreDetails}),V.length>=G)break}return V}async getReference(Y,X){await this.#L();let G=await this.#K(Y)??this.#A(Y);if(!G)return null;let J=this.#x(X,"reference"),Q=this.#C(G.path,J);if(!await this.#$.exists(Q))return null;try{let W=await this.#$.readFile(Q);return typeof W==="string"?W:W.toString("utf-8")}catch{return null}}async getScript(Y,X){await this.#L();let G=await this.#K(Y)??this.#A(Y);if(!G)return null;let J=this.#x(X,"script"),Q=this.#C(G.path,J);if(!await this.#$.exists(Q))return null;try{let W=await this.#$.readFile(Q);return typeof W==="string"?W:W.toString("utf-8")}catch{return null}}async getAsset(Y,X){await this.#L();let G=await this.#K(Y)??this.#A(Y);if(!G)return null;let J=this.#x(X,"asset"),Q=this.#C(G.path,J);if(!await this.#$.exists(Q))return null;try{let W=await this.#$.readFile(Q);return typeof W==="string"?Buffer.from(W,"utf-8"):W}catch{return null}}async listReferences(Y){return await this.#L(),(await this.#K(Y)??this.#A(Y))?.references??[]}async listScripts(Y){return await this.#L(),(await this.#K(Y)??this.#A(Y))?.scripts??[]}async listAssets(Y){return await this.#L(),(await this.#K(Y)??this.#A(Y))?.assets??[]}async#L(){if(this.#U)return;if(this.#Z){await this.#Z;return}this.#Z=(async()=>{try{if(this.#H.length===0)this.#H=await this.#R();await this.#M(),this.#U=!0}finally{this.#Z=null}})(),await this.#Z}#w(Y){let X=this.#Q.get(Y.name)??[],G=X.findIndex((J)=>J.path===Y.path);if(G>=0)X[G]=Y;else X.push(Y);this.#Q.set(Y.name,X)}async#M(){this.#F.clear(),this.#V.clear();let Y=async(X)=>{return(await this.#$.readdir(X)).map((J)=>({name:J.name,type:J.type,isSymlink:J.isSymlink}))};for(let X of this.#H){let G=X.length>1&&X.endsWith("/")?X.slice(0,-1):X,J=this.#q(G);if(p40(G)){let Q=await sl1(G,Y,{dot:!0,maxDepth:4}),W=new Set;for(let Z of Q)if(Z.type==="directory")W.add(Z.path);else W.add(this.#S(Z.path));this.#F.set(G,[...W]),this.#V.set(G,Date.now());let K=await Promise.allSettled(Q.map(async(Z)=>{if(Z.type==="file")await this.#z(Z.path,J);else if(!await this.#z(Z.path,J))await this.#P(Z.path,J)}));for(let[Z,H]of K.entries()){let z=Q[Z];if(z&&H.status==="rejected"){let V=H.reason;if(V instanceof Error)console.error(`[WorkspaceSkills] Failed to load skill from ${z.path}:`,V.message)}}}else if(!await this.#z(G,J))await this.#P(G,J)}this.#W=Date.now()}async#P(Y,X){try{if(!await this.#$.exists(Y))return}catch(G){let J=G instanceof Error?G.message:String(G),Q="";if(Y.startsWith("/")&&J.includes("Permission denied")){let W=Y.slice(1);try{if(await this.#$.exists(W))Q=` (did you mean to use the relative path "${W}"?)`}catch{}}console.warn(`[WorkspaceSkills] Cannot access skills path "${Y}": ${J}${Q}`);return}try{let G=await this.#$.readdir(Y),J=await Promise.allSettled(G.filter((Q)=>Q.type==="directory").map(async(Q)=>{let W=this.#C(Y,Q.name),K=this.#C(W,"SKILL.md");if(await this.#$.exists(K))return await this.#_(K,Q.name,X);return null}));for(let Q of J)if(Q.status==="fulfilled"&&Q.value)this.#w(Q.value),await this.#k(Q.value);else if(Q.status==="rejected"){let W=Q.reason;if(W instanceof Error)console.error(`[WorkspaceSkills] Failed to load skill from ${Y}:`,W.message)}}catch(G){if(G instanceof Error)console.error(`[WorkspaceSkills] Failed to scan skills directory ${Y}:`,G.message)}}async#z(Y,X){try{if(Y.endsWith("/SKILL.md")||Y==="SKILL.md"){if(!await this.#$.exists(Y))return!0;let G=this.#S(Y),J=G.split("/").pop()||G;try{let Q=await this.#_(Y,J,X);this.#w(Q),await this.#k(Q)}catch(Q){if(Q instanceof Error)console.error(`[WorkspaceSkills] Failed to load skill from ${Y}:`,Q.message)}return!0}if(await this.#$.exists(Y)){let G=this.#C(Y,"SKILL.md");if(await this.#$.exists(G)){let J=Y.split("/").pop()||Y;try{let Q=await this.#_(G,J,X);this.#w(Q),await this.#k(Q)}catch(Q){if(Q instanceof Error)console.error(`[WorkspaceSkills] Failed to load skill from ${G}:`,Q.message)}return!0}}return!1}catch{return!1}}async#v(){if(this.#W===0)return!0;if(Date.now()-this.#W<$.STALENESS_CHECK_COOLDOWN)return!1;for(let Y of this.#H){let X;if(p40(Y)){let G=Date.now(),J=this.#V.get(Y)??0;if(G-J>$.GLOB_RESOLVE_INTERVAL||!this.#F.has(Y)){let W=await sl1(Y,async(H)=>{return(await this.#$.readdir(H)).map((V)=>({name:V.name,type:V.type,isSymlink:V.isSymlink}))},{dot:!0,maxDepth:4}),K=new Set;for(let H of W)if(H.type==="directory")K.add(H.path);else K.add(this.#S(H.path));let Z=[...K];this.#F.set(Y,Z),this.#V.set(Y,G)}X=this.#F.get(Y)??[]}else X=[Y];for(let G of X)try{let J=await this.#$.stat(G);if(J.modifiedAt.getTime()>this.#W)return!0;if(J.type!=="directory")continue;if(this.#G){let Z=this.#C(G,"SKILL.md");try{let H=await this.#$.stat(Z);if(H.type==="file"&&H.modifiedAt.getTime()>this.#W)return!0}catch{}}let K=(await this.#$.readdir(G)).filter((Z)=>Z.type==="directory");if(K.length>0){if((await Promise.all(K.map(async(H)=>{let z=this.#C(G,H.name);try{if((await this.#$.stat(z)).modifiedAt.getTime()>this.#W)return!0;if(this.#G){let F=this.#C(z,"SKILL.md");try{let L=await this.#$.stat(F);return L.type==="file"&&L.modifiedAt.getTime()>this.#W}catch{}}}catch{}return!1}))).some((H)=>H))return!0}}catch{continue}}return!1}async#_(Y,X,G){let J=await this.#$.readFile(Y),Q=typeof J==="string"?J:J.toString("utf-8"),W=Wi1.default(Q),K=W.data,Z=W.content.trim(),H=this.#S(Y),z={name:K.name,path:H,description:K.description,license:K.license,compatibility:K.compatibility,metadata:K.metadata};if(this.#J){let D=this.#g(z,X,Z);if(!D.valid)throw Error(`Invalid skill metadata in ${Y}:
${D.errors.join(`
`)}`)}let[V,F,L]=await Promise.all([this.#E(H,"references"),this.#E(H,"scripts"),this.#E(H,"assets")]),N=await this.#h(Z,H,V);return{...z,instructions:Z,source:G,references:V,scripts:F,assets:L,indexableContent:N}}#g(Y,X,G){let J=qB8(Y,X,G);if(J.warnings.length>0)for(let Q of J.warnings)console.warn(`[WorkspaceSkills] ${Y.name}: ${Q}`);return J}async#E(Y,X){let G=this.#C(Y,X),J=[];if(!await this.#$.exists(G))return J;try{await this.#j(G,G,(Q)=>{J.push(Q)})}catch{}return J}async#j(Y,X,G,J=0,Q=20){if(J>=Q)return;let W=await this.#$.readdir(X);for(let K of W){let Z=this.#C(X,K.name);if(K.type==="directory"&&!K.isSymlink)await this.#j(Y,Z,G,J+1,Q);else{let H=Z.substring(Y.length+1);G(H)}}}async#h(Y,X,G){let J=[Y],Q=await Promise.all(G.map(async(W)=>{let K=this.#C(X,"references",W);try{let Z=await this.#$.readFile(K);return typeof Z==="string"?Z:Z.toString("utf-8")}catch{return null}}));for(let W of Q)if(W!==null)J.push(W);return J.join(`

`)}async#f(Y){if(!this.#X?.remove)return;let X=[`skill:${Y.path}:SKILL.md`,...Y.references.map((G)=>`skill:${Y.path}:${G}`)];for(let G of X)try{await this.#X.remove(G)}catch{}}#T(Y){for(let X of this.#H)if(Y===X||Y.startsWith(X+"/"))return this.#q(X);return this.#q(Y)}async#k(Y){if(!this.#X)return;await this.#X.index({id:`skill:${Y.path}:SKILL.md`,content:Y.instructions,metadata:{skillPath:Y.path,source:"SKILL.md"}}),await Promise.all(Y.references.map(async(X)=>{let G=this.#C(Y.path,"references",X);try{let J=await this.#$.readFile(G),Q=typeof J==="string"?J:J.toString("utf-8");await this.#X.index({id:`skill:${Y.path}:${X}`,content:Q,metadata:{skillPath:Y.path,source:`references/${X}`}})}catch{}}))}async#b(Y,X){let{topK:G=5,skillNames:J,includeReferences:Q=!0}=X,W=Y.toLowerCase(),K=[];for(let Z of this.#Q.values()){let H=await this.#B(Z);if(!H)continue;if(J&&!J.includes(H.name))continue;if(H.instructions.toLowerCase().includes(W))K.push({skillName:H.name,skillPath:H.path,source:"SKILL.md",content:H.instructions.substring(0,200),score:1});if(Q)for(let z of H.references){if(K.length>=G)break;let V=await this.getReference(H.name,`references/${z}`);if(V&&V.toLowerCase().includes(W))K.push({skillName:H.name,skillPath:H.path,source:`references/${z}`,content:V.substring(0,200),score:0.8})}if(K.length>=G)break}return K.slice(0,G)}#q(Y){if(Y.split("/").includes("node_modules"))return{type:"external",packagePath:Y};if(Y.includes("/.mastra/skills")||Y.startsWith(".mastra/skills"))return{type:"managed",mastraPath:Y};return{type:"local",projectPath:Y}}#C(...Y){return Y.map((X,G)=>G===0?wB8(X):_B8(X)).filter(Boolean).join("/")}#x(Y,X){let G=Y.replace(/\\/g,"/"),J=G.split("/").filter((Q)=>Boolean(Q)&&Q!==".");if(G.startsWith("/")||J.some((Q)=>Q===".."))throw Error(`Invalid ${X} path: ${Y}`);return J.join("/")}#S(Y){let X=Y.lastIndexOf("/");return X>0?Y.substring(0,X):"/"}},jB8,aG="mastra_workspace",n4,MO,nC0,mB8,uB8,pB8,dB8,cB8=class{warmedUpClis=new Set;warmupCleanups=new Map;makeWarmupKey($,Y,X){return`${$}:${Y}:${X}`}getBrowserCliConfig($){for(let[Y,X]of Object.entries(dB8))if(X.pattern.test($))return{name:Y,config:X};return null}hasExternalCdpFlag($){for(let Y of $){let X=this.getBrowserCliConfig(Y.trim());if(X){if(X.config.externalCdpPattern){if(X.config.externalCdpPattern.test(Y))return!0}else if(new RegExp(`${X.config.flag}\\s+\\S+`).test(Y))return!0}}return!1}extractExternalCdpUrl($){for(let Y of $){let X=this.getBrowserCliConfig(Y.trim());if(X?.config.externalCdpExtractor){let G=Y.match(X.config.externalCdpExtractor);if(G?.[1])return G[1]}}return null}injectCdpUrlIntoSingleCommand($,Y,X,G){if(new RegExp(`${X.flag}\\s+\\S+`).test($))return $;let Q=`${X.flag} ${d40(Y)}`;if(X.sessionFlag&&G){if(!new RegExp(`${X.sessionFlag}\\s+\\S+`).test($))Q+=` ${X.sessionFlag} ${d40(G)}`}return $.replace(X.pattern,`$& ${Q}`)}injectCdpUrl($,Y,X){let{parts:G,operators:J}=tl1($),Q=G.map((W)=>{let K=W.trim(),Z=this.getBrowserCliConfig(K);if(Z)return this.injectCdpUrlIntoSingleCommand(K,Y,Z.config,X);return W});return ZB8(Q,J)}isWarmedUp($,Y,X){return this.warmedUpClis.has(this.makeWarmupKey($,Y,X))}markWarmedUp($,Y,X){this.warmedUpClis.add(this.makeWarmupKey($,Y,X))}registerWarmupCleanup($,Y,X,G){let J=this.makeWarmupKey($,Y,X);if(!this.warmupCleanups.has(J)){let Q=G.onBrowserClosed(()=>{this.warmedUpClis.delete(J),this.warmupCleanups.delete(J)},X);this.warmupCleanups.set(J,Q)}}getWarmupCommands($,Y,X,G){let J=[],Q=new Set;for(let{name:W,config:K}of Y){if(Q.has(W))continue;if(Q.add(W),K.warmupCommand&&!this.isWarmedUp($,W,G))J.push({cliName:W,command:K.warmupCommand(X,G)})}return J}analyzeCommand($){let{parts:Y}=tl1($),X=Y.map((Q)=>this.getBrowserCliConfig(Q.trim())).filter((Q)=>Q!==null),G=this.hasExternalCdpFlag(Y),J=G?this.extractExternalCdpUrl(Y):null;return{browserClis:X,parts:Y,usingExternalCdp:G,externalCdpUrl:J}}},qf,GS0=200,Oi1=2000,lB8,aB8,Ei1,sB8,Ri1=`Execute a shell command in the workspace sandbox.

Examples:
  "npm install && npm run build"
  "ls -la src/"
  "cat config.json | jq '.database'"
  "cd /app && python main.py"

Usage:
- Commands run in a shell, so pipes, redirects, and chaining (&&, ||, ;) all work.
- Always quote file paths that contain spaces (e.g., cd "/path/with spaces").
- Use the timeout parameter (in seconds) to limit execution time. Behavior when omitted depends on the sandbox provider.
- Optionally use cwd to override the working directory. Commands run from the sandbox default if omitted.`,tB8,eB8,$O8,YO8,XO8,GO8,rC0=50,JO8,KO8,$i1="<<<",HO8,zO8,FO8,LO8=10485760,DO8,AO8,EO8,Pi1,MO8,RO8;var Ti1=V0(()=>{A_();qL();zC0();O1();y40();Qi1=U6(Ld1(),1),Wi1=U6(kl1(),1),Ki1=U6(rl1(),1),_f=class extends Error{constructor($,Y,X){super($);this.code=Y,this.workspaceId=X,this.name="WorkspaceError"}code;workspaceId},nA8=class extends _f{constructor(){super("Workspace not available. Ensure the agent has a workspace configured.","NO_WORKSPACE");this.name="WorkspaceNotAvailableError"}},rA8=class extends _f{constructor(){super("Workspace does not have a filesystem configured","NO_FILESYSTEM");this.name="FilesystemNotAvailableError"}},aA8=class extends _f{constructor($){super($??"Workspace does not have a sandbox configured","NO_SANDBOX");this.name="SandboxNotAvailableError"}},u40=class extends _f{constructor($){super(`Sandbox does not support ${$}`,"FEATURE_NOT_SUPPORTED");this.name="SandboxFeatureNotSupportedError"}},jf=class extends _f{constructor($){super(`Workspace is in read-only mode. Cannot perform: ${$}`,"READ_ONLY");this.name="WorkspaceReadOnlyError"}},Zi1=class extends Error{constructor($,Y,X){super($);this.code=Y,this.path=X,this.name="FilesystemError"}code;path},c40=class extends Zi1{constructor($){super(`File not found: ${$}`,"ENOENT",$);this.name="FileNotFoundError"}},sA8=class extends Zi1{constructor($,Y){super(Y,"EREAD_REQUIRED",$);this.name="FileReadRequiredError"}};tA8={txt:"text/plain",html:"text/html",htm:"text/html",css:"text/css",csv:"text/csv",md:"text/markdown",js:"application/javascript",mjs:"application/javascript",ts:"application/typescript",tsx:"application/typescript",jsx:"application/javascript",json:"application/json",xml:"application/xml",yaml:"text/yaml",yml:"text/yaml",py:"text/x-python",rb:"text/x-ruby",go:"text/x-go",rs:"text/x-rust",java:"text/x-java",c:"text/x-c",cpp:"text/x-c++",h:"text/x-c",hpp:"text/x-c++",sh:"text/x-sh",bash:"text/x-sh",zsh:"text/x-sh",toml:"text/toml",ini:"text/plain",env:"text/plain",sql:"text/x-sql",graphql:"application/graphql",gql:"application/graphql",vue:"text/x-vue",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp",ico:"image/x-icon",bmp:"image/bmp",tiff:"image/tiff",tif:"image/tiff",heic:"image/heic",heif:"image/heif",avif:"image/avif",pdf:"application/pdf",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",flac:"audio/flac",m4a:"audio/mp4",aac:"audio/aac",mp4:"video/mp4",webm:"video/webm",mov:"video/quicktime",avi:"video/x-msvideo",mkv:"video/x-matroska",zip:"application/zip",tar:"application/x-tar",gz:"application/gzip",tgz:"application/gzip",bz2:"application/x-bzip2","7z":"application/x-7z-compressed",rar:"application/vnd.rar",exe:"application/vnd.microsoft.portable-executable",dll:"application/vnd.microsoft.portable-executable",so:"application/x-sharedlib",dylib:"application/x-sharedlib",bin:"application/x-binary",dat:"application/x-binary",dmg:"application/x-apple-diskimage",iso:"application/x-iso9660-image",deb:"application/vnd.debian.binary-package",rpm:"application/x-rpm",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",ttf:"font/ttf",otf:"font/otf",woff:"font/woff",woff2:"font/woff2",wasm:"application/wasm",class:"application/java-vm",pyc:"application/x-python-code"};$B8=new Set([".md",".txt",".json",".yaml",".yml",".js",".mjs",".ts",".tsx",".jsx",".py",".rb",".go",".rs",".java",".c",".cpp",".h",".hpp",".sh",".bash",".zsh",".html",".htm",".css",".xml",".toml",".ini",".env",".csv",".sql",".graphql",".gql",".vue",".svg"]);Ui1=/[*?{}[\]]/;$l5=KB8(),Yl5=process.platform==="win32";Xl5=q7.join(v_.tmpdir(),".mastra-mounts");Fi1=class extends Error{constructor($){super("The specified text was not found. Make sure you use the exact text from the file.");this.searchString=$,this.name="StringNotFoundError"}searchString},Li1=class extends Error{constructor($,Y){super(`The specified text appears ${Y} times. Provide more surrounding context to make the match unique, or use replace_all to replace all occurrences.`);this.searchString=$,this.occurrences=Y,this.name="StringNotUniqueError"}searchString;occurrences},FB8=new Set(["a","an","and","are","as","at","be","by","for","from","has","he","in","is","it","its","of","on","or","that","the","to","was","were","will","with"]),LB8={lowercase:!0,removePunctuation:!0,minLength:2,stopwords:FB8,splitPattern:/\s+/};dL={MAX_INSTRUCTION_TOKENS:5000,MAX_INSTRUCTION_LINES:500,MAX_NAME_LENGTH:64,MAX_DESCRIPTION_LENGTH:1024};jB8={span:void 0,end(){},error(){}};n4={FILESYSTEM:{READ_FILE:`${aG}_read_file`,WRITE_FILE:`${aG}_write_file`,EDIT_FILE:`${aG}_edit_file`,LIST_FILES:`${aG}_list_files`,DELETE:`${aG}_delete`,FILE_STAT:`${aG}_file_stat`,MKDIR:`${aG}_mkdir`,GREP:`${aG}_grep`,AST_EDIT:`${aG}_ast_edit`},SANDBOX:{EXECUTE_COMMAND:`${aG}_execute_command`,GET_PROCESS_OUTPUT:`${aG}_get_process_output`,KILL_PROCESS:`${aG}_kill_process`},SEARCH:{SEARCH:`${aG}_search`,INDEX:`${aG}_index`},LSP:{LSP_INSPECT:`${aG}_lsp_inspect`}};mB8=X8({id:n4.FILESYSTEM.AST_EDIT,description:`Edit code using AST-based analysis for intelligent transformations.

Use \`transform\` for structured operations (imports, renames). Use \`pattern\`/\`replacement\` only for general find-and-replace.

Transforms:
- add-import: Add or merge imports. Skips duplicates. For default imports, put the default name first in \`names\`.
  { transform: "add-import", importSpec: { module: "react", names: ["useState", "useEffect"] } }
  { transform: "add-import", importSpec: { module: "express", names: ["express"], isDefault: true } }
  { transform: "add-import", importSpec: { module: "express", names: ["express", "Router"], isDefault: true } } \u2192 import express, { Router } from 'express'
- remove-import: Remove an import by module name.
  { transform: "remove-import", targetName: "lodash" }
- rename: Rename all occurrences of an identifier (not scope-aware).
  { transform: "rename", targetName: "oldName", newName: "newName" }

Pattern replace (for everything else):
  { pattern: "console.log($ARG)", replacement: "logger.debug($ARG)" }`,inputSchema:U.object({path:U.string().describe("The path to the file to edit"),pattern:U.string().optional().describe('AST pattern to search for (supports $VARIABLE placeholders, e.g., "console.log($ARG)")'),replacement:U.string().optional().describe('Replacement pattern (can use captured $VARIABLES, e.g., "logger.debug($ARG)")'),transform:U.enum(["add-import","remove-import","rename"]).optional().describe("Structured transformation to apply"),targetName:U.string().optional().describe("Required for remove-import and rename transforms. The current name to target."),newName:U.string().optional().describe("Required for rename transform. The new name to replace targetName with."),importSpec:U.object({module:U.string().describe("Module to import from"),names:U.array(U.string()).min(1).describe("Names to import. For default imports, put the default name first."),isDefault:U.boolean().optional().describe("Whether the first name is a default import")}).optional().describe("Required for add-import transform. Specifies the module and names to import.")}),execute:async({path:$,pattern:Y,replacement:X,transform:G,targetName:J,newName:Q,importSpec:W},K)=>{let{workspace:Z,filesystem:H}=vz(K);await sG(K,n4.FILESYSTEM.AST_EDIT);let z=mY(K,Z,{category:"filesystem",operation:"astEdit",input:{path:$,transform:G,pattern:Y},attributes:{filesystemProvider:H.provider}});try{if(H.readOnly)throw new jf("ast_edit");let V=await SB8();if(!V)return z.end({success:!1}),"@ast-grep/napi is not available. Install it to use AST editing.";let{parse:F,Lang:L}=V,N;try{N=await H.readFile($,{encoding:"utf-8"})}catch(q){if(q instanceof c40)return z.end({success:!1}),`File not found: ${$}. Use the write file tool to create it first.`;throw q}if(typeof N!=="string")return z.end({success:!1}),"Cannot perform AST edits on binary files. Use the write file tool instead.";let D=vB8($,L);if(!D)return z.end({success:!1}),`Unsupported file type for AST editing: ${$}`;let B=F(D,N).root(),O=N,E=[];if(G)switch(G){case"add-import":{if(!W)return z.end({success:!1}),"Error: importSpec is required for add-import transform";O=hB8(N,B,W),E.push(`Added import from '${W.module}'`);break}case"remove-import":{if(!J)return z.end({success:!1}),"Error: targetName is required for remove-import transform";O=fB8(N,B,J),E.push(`Removed import '${J}'`);break}case"rename":{if(!J||!Q)return z.end({success:!1}),"Error: targetName and newName are required for rename transform";let q=yB8(N,B,J,Q);O=q.content,E.push(`Renamed '${J}' to '${Q}' (${q.count} occurrences)`);break}}else if(Y&&X!==void 0){let q=gB8(N,B,Y,X);if(q.error)return z.end({success:!1}),`Error: AST pattern matching failed: ${q.error}`;O=q.content,E.push(`Replaced ${q.count} occurrences of pattern`)}else if(Y&&X===void 0)return z.end({success:!1}),"Error: replacement is required when pattern is provided";else if(!Y&&X!==void 0)return z.end({success:!1}),"Error: pattern is required when replacement is provided";else return z.end({success:!1}),"Error: Must provide either transform or pattern/replacement";let M=O!==N;if(M)await H.writeFile($,O,{overwrite:!0,expectedMtime:K?.__expectedMtime});if(!M)return z.end({success:!0}),`No changes made to ${$} (${E.join("; ")})`;let R=`${$}: ${E.join("; ")}`;return R+=await XS0(Z,$,O),z.end({success:!0},{bytesTransferred:Buffer.byteLength(O,"utf-8")}),R}catch(V){throw z.error(V),V}}}),uB8=X8({id:n4.FILESYSTEM.DELETE,description:"Delete a file or directory from the workspace filesystem",inputSchema:U.object({path:U.string().describe("The path to the file or directory to delete"),recursive:U.boolean().optional().default(!1).describe("If true, delete directories and their contents recursively. Required for non-empty directories.")}),execute:async({path:$,recursive:Y},X)=>{let{workspace:G,filesystem:J}=vz(X);await sG(X,n4.FILESYSTEM.DELETE);let Q=mY(X,G,{category:"filesystem",operation:"delete",input:{path:$,recursive:Y},attributes:{filesystemProvider:J.provider}});try{if(J.readOnly)throw new jf("delete");if((await J.stat($)).type==="directory")await J.rmdir($,{recursive:Y,force:Y});else await J.deleteFile($);return Q.end({success:!0}),`Deleted ${$}`}catch(W){throw Q.error(W),W}}}),pB8=X8({id:n4.FILESYSTEM.EDIT_FILE,description:`Edit a file by replacing specific text. The old_string must match exactly and be unique in the file.

Usage:
- Read the file first to get the exact text to replace.
- By default, read file output includes line number prefixes (e.g., "     1\u2192"). Ensure you preserve the exact indentation as it appears AFTER the arrow. Never include any part of the line number prefix in old_string or new_string.
- Include enough surrounding context (multiple lines) to make old_string unique. If it still isn't unique, include more lines.
- Use replace_all only when intentionally replacing all occurrences.`,inputSchema:U.object({path:U.string().describe("The path to the file to edit"),old_string:U.string().describe("The exact text to find and replace. Must be unique in the file."),new_string:U.string().describe("The text to replace old_string with"),replace_all:U.boolean().optional().default(!1).describe("If true, replace all occurrences. If false (default), old_string must be unique.")}),execute:async({path:$,old_string:Y,new_string:X,replace_all:G},J)=>{let{workspace:Q,filesystem:W}=vz(J);await sG(J,n4.FILESYSTEM.EDIT_FILE);let K=mY(J,Q,{category:"filesystem",operation:"editFile",input:{path:$,replace_all:G},attributes:{filesystemProvider:W.provider}});try{if(W.readOnly)throw new jf("edit_file");let Z=await W.readFile($,{encoding:"utf-8"});if(typeof Z!=="string")return K.end({success:!1}),"Cannot edit binary files. Use the write file tool instead.";let H=VB8(Z,Y,X,G);await W.writeFile($,H.content,{overwrite:!0,expectedMtime:J?.__expectedMtime});let z=`Replaced ${H.replacements} occurrence${H.replacements!==1?"s":""} in ${$}`;return z+=await XS0(Q,$,H.content),K.end({success:!0},{bytesTransferred:Buffer.byteLength(H.content,"utf-8")}),z}catch(Z){if(Z instanceof Fi1)return K.end({success:!1}),Z.message;if(Z instanceof Li1)return K.end({success:!1}),Z.message;throw K.error(Z),Z}}}),dB8={"agent-browser":{pattern:/^agent-browser\b/,flag:"--cdp",sessionFlag:"--session",warmupCommand:($,Y)=>`agent-browser --session ${d40(Y)} connect ${d40($)}`,externalCdpPattern:/(?:\bconnect\s+["']?wss?:\/\/|--cdp\s+["']?\S)/,externalCdpExtractor:/(?:\bconnect|--cdp)\s+["']?(wss?:\/\/[^\s"']+)["']?/},"browser-use":{pattern:/^(?:browser-use|browseruse|browser|bu)\b/,flag:"--cdp-url",sessionFlag:"--session",externalCdpPattern:/--cdp-url\s+["']?\S+/,externalCdpExtractor:/--cdp-url\s+["']?(wss?:\/\/[^\s"']+)["']?/},browse:{pattern:/^browse\b/,flag:"--ws",externalCdpPattern:/--ws\s+["']?\S+/,externalCdpExtractor:/--ws\s+["']?(wss?:\/\/[^\s"']+)["']?/}},qf=new cB8,lB8=/(?:\u001B\][\s\S]*?(?:\u0007|\u001B\u005C|\u009C))|(?:[\u001B\u009B][\[\]()#;?]*(?:\d{1,4}(?:[;:]\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~])/g;aB8=/^\d+(?:\.\d+)?$/,Ei1=U.object({command:U.string().describe('The shell command to execute (e.g., "npm install", "ls -la src/", "cat file.txt | grep error")'),timeout:U.preprocess(($)=>{if(typeof $!=="string")return $;let Y=$.trim();return aB8.test(Y)?Number(Y):$},U.number()).nullish().describe("Maximum execution time in seconds. Example: 60 for 1 minute."),cwd:U.string().nullish().describe("Working directory for the command"),tail:U.number().nullish().describe(`For foreground commands: limit output to the last N lines, similar to tail -n. Defaults to ${GS0}. Use 0 for no limit.`)}),sB8=Ei1.extend({background:U.boolean().optional().describe("Run the command in the background. Returns a PID immediately instead of waiting for completion. Use get_process_output to check on it later.")});tB8=X8({id:n4.SANDBOX.EXECUTE_COMMAND,description:Ri1,inputSchema:Ei1,execute:Mi1,toModelOutput:l40}),eB8=X8({id:n4.SANDBOX.EXECUTE_COMMAND,description:`${Ri1}

Set background: true to run long-running commands (dev servers, watchers) without blocking. You'll get a PID to track the process.`,inputSchema:sB8,execute:Mi1,toModelOutput:l40}),$O8=X8({id:n4.FILESYSTEM.FILE_STAT,description:"Get file or directory metadata from the workspace. Returns existence, type, size, and modification time.",inputSchema:U.object({path:U.string().describe("The path to check")}),execute:async({path:$},Y)=>{let{workspace:X,filesystem:G}=vz(Y);await sG(Y,n4.FILESYSTEM.FILE_STAT);let J=mY(Y,X,{category:"filesystem",operation:"stat",input:{path:$},attributes:{filesystemProvider:G.provider}});try{let Q=await G.stat($),W=Q.modifiedAt.toISOString(),K=[`${$}`,`Type: ${Q.type}`];if(Q.size!==void 0)K.push(`Size: ${Q.size} bytes`);return K.push(`Modified: ${W}`),J.end({success:!0},{bytesTransferred:Q.size}),K.join(" ")}catch(Q){if(Q instanceof c40)return J.end({success:!1}),`${$}: not found`;throw J.error(Q),Q}}}),YO8=X8({id:n4.SANDBOX.GET_PROCESS_OUTPUT,description:`Get the current output (stdout, stderr) and status of a background process by its PID.

Use this after starting a background command with execute_command (background: true) to check if the process is still running and read its output.`,toModelOutput:l40,inputSchema:U.object({pid:U.string().describe("The process ID returned when the background command was started"),tail:U.number().optional().describe(`Number of lines to return, similar to tail -n. Positive or negative returns last N lines from end. Defaults to ${GS0}. Use 0 for no limit.`),wait:U.boolean().optional().describe("If true, block until the process exits and return the final output. Useful for short-lived background commands where you want to wait for the result.")}),execute:async({pid:$,tail:Y,wait:X},G)=>{let{workspace:J,sandbox:Q}=YS0(G);await sG(G,n4.SANDBOX.GET_PROCESS_OUTPUT);let W=mY(G,J,{category:"sandbox",operation:"getProcessOutput",input:{pid:$,tail:Y,wait:X},attributes:{sandboxProvider:Q.provider}}),K=G?.agent?.toolCallId;try{if(!Q.processes)throw new u40("processes");let Z=await Q.processes.get($);if(!Z)return W.end({success:!1}),`No background process found with PID ${$}.`;if(Z.command)await G?.writer?.custom({type:"data-sandbox-command",data:{command:Z.command,pid:$,toolCallId:K}});if(X&&Z.exitCode===void 0){let N=await Z.wait({onStdout:G?.writer?async(D)=>{await G.writer.custom({type:"data-sandbox-stdout",data:{output:D,timestamp:Date.now(),toolCallId:K},transient:!0})}:void 0,onStderr:G?.writer?async(D)=>{await G.writer.custom({type:"data-sandbox-stderr",data:{output:D,timestamp:Date.now(),toolCallId:K},transient:!0})}:void 0});await G?.writer?.custom({type:"data-sandbox-exit",data:{exitCode:N.exitCode,success:N.success,executionTimeMs:N.executionTimeMs,toolCallId:K}})}let H=Z.exitCode===void 0,z=J.getToolsConfig()?.[n4.SANDBOX.GET_PROCESS_OUTPUT]?.maxOutputTokens,V=await kz(Z.stdout,Y,z),F=await kz(Z.stderr,Y,z);if(!V&&!F)return W.end({success:!0},{exitCode:Z.exitCode}),"(no output yet)";let L=[];if(V&&F)L.push("stdout:",V,"","stderr:",F);else if(V)L.push(V);else L.push("stderr:",F);if(!H)L.push("",`Exit code: ${Z.exitCode}`);return W.end({success:!0},{exitCode:Z.exitCode}),L.join(`
`)}catch(Z){throw W.error(Z),Z}}});XO8=X8({id:n4.FILESYSTEM.GREP,description:`Search file contents using a regex pattern. Walks the filesystem and returns matching lines with file paths and line numbers.

Usage:
- Basic search: { pattern: "TODO" }
- Regex: { pattern: "function\\s+\\w+\\(" }
- Multiple terms: { pattern: "TODO|FIXME|HACK" }
- Case-insensitive: { pattern: "error", caseSensitive: false }
- Search in directory: { pattern: "import", path: "./src" }
- Filter by glob: { pattern: "import", path: "**/*.ts" }
- Combined path + glob: { pattern: "import", path: "src/**/*.ts" }
- Multiple file types: { pattern: "import", path: "**/*.{ts,tsx,js}" }
- Multiple directories: { pattern: "TODO", path: "{src,lib}/**/*.ts" }
- With context: { pattern: "function", contextLines: 2 }`,inputSchema:U.object({pattern:U.string().describe("Regex pattern to search for"),path:U.string().optional().default(".").describe('File, directory, or glob pattern to search within (default: "."). A plain path searches that file or directory. A glob pattern (e.g., "**/*.ts", "src/**/*.test.ts") filters which files to search.'),contextLines:U.number().optional().default(0).describe("Number of lines of context to include before and after each match (default: 0)"),maxCount:U.number().optional().describe("Maximum matches per file. Moves on to the next file after this many matches. Similar to grep -m flag."),caseSensitive:U.boolean().optional().default(!0).describe("Whether the search is case-sensitive (default: true)"),includeHidden:U.boolean().optional().default(!1).describe('Include hidden files and directories (names starting with ".") in the search (default: false)')}),execute:async({pattern:$,path:Y=".",contextLines:X=0,maxCount:G,caseSensitive:J=!0,includeHidden:Q=!1},W)=>{let{workspace:K,filesystem:Z}=vz(W);await sG(W,n4.FILESYSTEM.GREP);let H=mY(W,K,{category:"filesystem",operation:"grep",input:{pattern:$,path:Y,contextLines:X,maxCount:G},attributes:{filesystemProvider:Z.provider}});try{if($.length>1000)return H.end({success:!1}),`Error: Pattern too long (${$.length} chars, max 1000). Use a shorter pattern.`;let V;try{V=new RegExp($,J?"g":"gi")}catch(k){return H.end({success:!1}),`Error: Invalid regex pattern: ${k.message}`}let F,L;if(p40(Y))F=Hi1(Y),L=$S0(Y,{dot:Q});else F=Y;let N=await qi1(Z),D=F.replace(/^\.\//,"").replace(/\/$/,""),B=N&&D&&N(D+"/")?void 0:N,O;try{if((await Z.stat(F)).type==="file")O=eC0(F)?[F]:[];else{let S=async(I)=>{let v=[],x;try{x=await Z.readdir(I)}catch{return v}for(let y of x){if(!Q&&y.name.startsWith("."))continue;let d=I.endsWith("/")?`${I}${y.name}`:`${I}/${y.name}`;if(B){let u=d.replace(/^\.\//,""),b=y.type==="directory"?`${u}/`:u;if(B(b))continue}if(y.type==="file"){if(!eC0(y.name))continue;if(L&&!L(d))continue;v.push(d)}else if(y.type==="directory"&&!y.isSymlink)v.push(...await S(d))}return v};O=await S(F)}}catch{O=[]}let E=[],M=new Set,R=0,q=!1,_=500,P=1000;for(let k of O){if(q)break;let S;try{let x=await Z.readFile(k,{encoding:"utf-8"});if(typeof x!=="string")continue;S=x}catch{continue}let I=S.split(`
`),v=0;for(let x=0;x<I.length;x++){let y=I[x];V.lastIndex=0;let d=V.exec(y);if(!d)continue;M.add(k);let u=y;if(u.length>_)u=u.slice(0,_)+"...";if(X>0){let b=Math.max(0,x-X);for(let g=b;g<x;g++)E.push(`${k}:${g+1}- ${I[g]}`)}if(E.push(`${k}:${x+1}:${d.index+1}: ${u}`),X>0){let b=Math.min(I.length-1,x+X);for(let g=x+1;g<=b;g++)E.push(`${k}:${g+1}- ${I[g]}`);E.push("--")}if(R++,v++,G!==void 0&&v>=G)break;if(R>=P){q=!0;break}}}let w=[`${R} match${R!==1?"es":""}`];if(w.push(`across ${M.size} file${M.size!==1?"s":""}`),q)w.push(`(truncated at ${P})`);let j=w.join(" ");E.unshift(j,"---");let C=await Pf(E.join(`
`),K.getToolsConfig()?.[n4.FILESYSTEM.GREP]?.maxOutputTokens,"end");return H.end({success:!0},{resultCount:R}),C}catch(z){throw H.error(z),z}}}),GO8=X8({id:n4.SEARCH.INDEX,description:"Index content for search. The path becomes the document ID in search results.",inputSchema:U.object({path:U.string().describe("The document ID/path for search results"),content:U.string().describe("The text content to index"),metadata:U.record(U.string(),U.unknown()).optional().describe("Optional metadata to store with the document")}),execute:async({path:$,content:Y,metadata:X},G)=>{let J=x_(G);await sG(G,n4.SEARCH.INDEX);let Q=mY(G,J,{category:"search",operation:"index",input:{path:$,contentLength:Y.length},attributes:{}});try{return await J.index($,Y,{metadata:X}),Q.end({success:!0},{bytesTransferred:Buffer.byteLength(Y,"utf-8")}),`Indexed ${$}`}catch(W){throw Q.error(W),W}}}),JO8=X8({id:n4.SANDBOX.KILL_PROCESS,description:`Kill a background process by its PID.

Use this to stop a long-running background process that was started with execute_command (background: true). Returns the last ${rC0} lines of output.`,toModelOutput:l40,inputSchema:U.object({pid:U.string().describe("The process ID of the background process to kill")}),execute:async({pid:$},Y)=>{let{workspace:X,sandbox:G}=YS0(Y);await sG(Y,n4.SANDBOX.KILL_PROCESS);let J=mY(Y,X,{category:"sandbox",operation:"killProcess",input:{pid:$},attributes:{sandboxProvider:G.provider}}),Q=Y?.agent?.toolCallId;try{if(!G.processes)throw new u40("processes");let W=await G.processes.get($);if(W?.command)await Y?.writer?.custom({type:"data-sandbox-command",data:{command:W.command,pid:$,toolCallId:Q}});if(!await G.processes.kill($))return await Y?.writer?.custom({type:"data-sandbox-exit",data:{exitCode:W?.exitCode??-1,success:!1,killed:!1,toolCallId:Q}}),J.end({success:!1}),`Process ${$} was not found or had already exited.`;await Y?.writer?.custom({type:"data-sandbox-exit",data:{exitCode:W?.exitCode??137,success:!1,killed:!0,toolCallId:Q}});let Z=[`Process ${$} has been killed.`];if(W){let H=X.getToolsConfig()?.[n4.SANDBOX.KILL_PROCESS]?.maxOutputTokens,z=W.stdout?await kz(W.stdout,rC0,H):"",V=W.stderr?await kz(W.stderr,rC0,H):"";if(z)Z.push("","--- stdout (last output) ---",z);if(V)Z.push("","--- stderr (last output) ---",V)}return J.end({success:!0},{exitCode:W?.exitCode??137}),Z.join(`
`)}catch(W){throw J.error(W),W}}});KO8=X8({id:n4.FILESYSTEM.LIST_FILES,description:`List files and directories in the workspace filesystem.
Returns a compact tab-indented listing for efficient token usage.
Options mirror common tree command flags for familiarity.

Examples:
- List workspace root: { path: "." }
- Deep listing: { path: "src", maxDepth: 5 }
- Directories only: { path: ".", dirsOnly: true }
- Exclude node_modules: { path: ".", exclude: "node_modules" }
- Find TypeScript files: { path: "src", pattern: "**/*.ts" }
- Find config files: { path: ".", pattern: "*.config.{js,ts}" }
- Multiple patterns: { path: ".", pattern: ["**/*.ts", "**/*.tsx"] }

To list ALL files, omit the pattern parameter \u2014 do NOT pass pattern: "*".`,inputSchema:U.object({path:U.string().default(".").describe("Directory path to list"),maxDepth:U.number().optional().default(2).describe("Maximum depth to descend (default: 2). Similar to tree -L flag."),showHidden:U.boolean().optional().default(!1).describe('Show hidden files starting with "." (default: false). Similar to tree -a flag.'),dirsOnly:U.boolean().optional().default(!1).describe("List directories only, no files (default: false). Similar to tree -d flag."),exclude:U.string().optional().describe('Pattern to exclude (e.g., "node_modules"). Similar to tree -I flag.'),extension:U.string().optional().describe('Filter by file extension (e.g., ".ts"). Similar to tree -P flag.'),pattern:U.union([U.string(),U.array(U.string())]).optional().describe('Glob pattern(s) to filter files. Omit this parameter to list all files (do NOT pass "*"). Use "**/*.ext" to match files recursively across directories. "*" only matches within a single directory level (standard glob). Glob patterns only filter files \u2014 directories are always shown to preserve tree structure. Examples: "**/*.ts", "src/**/*.test.ts", "*.config.{js,ts}".'),respectGitignore:U.boolean().optional().default(!0).describe("Respect .gitignore in the listed directory (default: true).")}),execute:async({path:$=".",maxDepth:Y=2,showHidden:X,dirsOnly:G,exclude:J,extension:Q,pattern:W,respectGitignore:K},Z)=>{let{workspace:H,filesystem:z}=vz(Z);await sG(Z,n4.FILESYSTEM.LIST_FILES);let V=(()=>{if(W===void 0)return;if(Array.isArray(W)){let L=W.filter((N)=>typeof N==="string"&&N.trim().length>0);return L.length>0?L:void 0}return W.trim().length>0?W:void 0})(),F=mY(Z,H,{category:"filesystem",operation:"listFiles",input:{path:$,maxDepth:Y,pattern:V},attributes:{filesystemProvider:z.provider}});try{let L=await QO8(z,$,{maxDepth:Y,showHidden:X,dirsOnly:G,exclude:J||void 0,extension:Q||void 0,pattern:V,respectGitignore:K}),N=await Pf(`${L.tree}

${L.summary}`,H.getToolsConfig()?.[n4.FILESYSTEM.LIST_FILES]?.maxOutputTokens??1000,"end");return F.end({success:!0},{resultCount:L.fileCount}),N}catch(L){throw F.error(L),L}}});HO8=X8({id:n4.LSP.LSP_INSPECT,description:"Inspect code at a specific symbol position using the Language Server Protocol. Provide an absolute file path, a 1-indexed line number, and the exact line content with <<< marking the cursor position. Exactly one <<< marker is required. Returns hover information, any diagnostics reported on that line, plus definition and implementation locations when available. Use this for type information, symbol navigation, and go-to-definition; use view to read the surrounding implementation.",inputSchema:U.object({path:U.string().describe("Absolute path to the file"),line:U.number().int().positive().describe("Line number (1-indexed)"),match:U.string().describe('Line content with <<< marking the cursor position. Exactly one <<< marker is required. Example: "const foo = <<<bar()" means cursor is at bar')}),execute:async({path:$,line:Y,match:X},G)=>{let J=x_(G);await sG(G,n4.LSP.LSP_INSPECT);let Q=mY(G,J,{category:"filesystem",operation:"lspInspect",input:{path:$,line:Y},attributes:{}}),W=[],K=0;while(!0){let B=X.indexOf($i1,K);if(B===-1)break;W.push(B),K=B+$i1.length}if(W.length===0)return Q.end({success:!1}),{error:"No <<< cursor marker found in match"};if(W.length>1)return Q.end({success:!1}),{error:`Multiple <<< markers found (found ${W.length}, expected 1)`};let Z=W[0]+1,H=J.lsp;if(!H)return Q.end({success:!1}),{error:"LSP is not configured for this workspace. Enable LSP in workspace config to use this tool."};let z=UO8($,H.root,J.filesystem?.resolveAbsolutePath?.bind(J.filesystem)),V="";try{V=await oC0.readFile(z,"utf-8")}catch{V=""}let F;try{F=await H.prepareQuery(z)}catch(B){return Q.end({success:!1}),{error:`Failed to initialize LSP client: ${B instanceof Error?B.message:String(B)}`}}if(!F)return Q.end({success:!1}),{error:`No language server available for files of this type: ${$}`};let{client:L,uri:N}=F,D={line:Y-1,character:Z-1},A={};try{let B=await L.queryHover(N,D).catch(()=>null);if(B){let w=B.contents;if(w){if(typeof w==="string")A.hover={value:w,kind:"plaintext"};else if(Array.isArray(w)){let j=w[0];if(typeof j==="string")A.hover={value:j,kind:"plaintext"};else if(j?.value)A.hover={value:j.value,kind:j.kind??"markdown"}}else if(w.value)A.hover={value:w.value,kind:w.kind??"markdown"}}}let O=V?Promise.resolve().then(()=>{return L.notifyChange(z,V,1),L.waitForDiagnostics(z,5000,!0)}).catch(()=>[]):Promise.resolve([]),[E,M,R]=await Promise.all([O,L.queryDefinition(N,D).catch(()=>[]),L.queryImplementation(N,D).catch(()=>[])]);if(E&&E.length>0){let w=E.map((j)=>({line:typeof j.line==="number"?j.line:(j.range?.start?.line??-1)+1,severity:typeof j.severity==="number"?j.severity===1?"error":j.severity===2?"warning":j.severity===3?"info":"hint":j.severity,message:j.message,source:j.source??null})).filter((j)=>j.line===Y).map(({severity:j,message:C,source:k})=>({severity:j,message:C,source:k}));if(w.length>0)A.diagnostics=w}let q=M.map((w)=>({uri:w.uri??w.targetUri,range:w.range??w.targetRange})).map((w)=>{let j=w.uri?Yi1(String(w.uri)):null;return j?{path:j,line:(w.range?.start?.line??0)+1,character:(w.range?.start?.character??0)+1}:null}).filter((w)=>Boolean(w)).filter((w)=>!(w.path===z&&w.line===Y));if(q.length>0){let w=await Promise.all(q.map((j)=>ZO8(j.path,j.line)));A.definition=q.map((j,C)=>({location:`${Gi1(j.path)}:L${j.line}:C${j.character}`,preview:w[C]}))}let _=new Set(q.map(Xi1)),P=R.map((w)=>({uri:w.uri??w.targetUri,range:w.range??w.targetRange})).map((w)=>{let j=w.uri?Yi1(String(w.uri)):null;return j?{path:j,line:(w.range?.start?.line??0)+1,character:(w.range?.start?.character??0)+1}:null}).filter((w)=>Boolean(w)).filter((w)=>!_.has(Xi1(w))&&!(w.path===z&&w.line===Y));if(P.length>0)A.implementation=P.map((w)=>`${Gi1(w.path)}:L${w.line}:C${w.character}`)}catch(B){A.error=`LSP query failed: ${B instanceof Error?B.message:String(B)}`}finally{L.notifyClose(z)}return Q.end({success:!A.error}),A}}),zO8=X8({id:n4.FILESYSTEM.MKDIR,description:"Create a directory in the workspace filesystem",inputSchema:U.object({path:U.string().describe("The path of the directory to create"),recursive:U.boolean().optional().default(!0).describe("Whether to create parent directories if they do not exist")}),execute:async({path:$,recursive:Y},X)=>{let{workspace:G,filesystem:J}=vz(X);await sG(X,n4.FILESYSTEM.MKDIR);let Q=mY(X,G,{category:"filesystem",operation:"mkdir",input:{path:$,recursive:Y},attributes:{filesystemProvider:J.provider}});try{if(J.readOnly)throw new jf("mkdir");return await J.mkdir($,{recursive:Y}),Q.end({success:!0}),`Created directory ${$}`}catch(W){throw Q.error(W),W}}});FO8=["image/png","image/jpeg","image/webp","application/pdf"],DO8=new Set(["application/json","application/javascript","application/typescript","application/xml","application/graphql","application/x-sh","application/x-yaml","application/yaml","application/ld+json","application/sql"]);AO8=/^(?:\*|\*\/\*|[a-z0-9!#$&^_.+-]+\/(?:\*|[a-z0-9!#$&^_.+-]+))$/i;EO8=X8({id:n4.FILESYSTEM.READ_FILE,description:"Read a file from the workspace filesystem. Text files come back as text \u2014 use offset/limit to read a line range from large files. Supported media files come back as a native file part you can view directly. Other binary files return only their metadata (path, size, mime type) since their raw contents are not useful to read.",inputSchema:U.object({path:U.string().describe('The path to the file to read (e.g., "data/config.json")'),offset:U.number().int().min(1).optional().describe("Line number to start reading from (1-indexed). Only used when reading text files; ignored for media and other binary files. Defaults to line 1 if omitted."),limit:U.number().int().min(1).optional().describe("Maximum number of lines to read. Only used when reading text files; ignored for media and other binary files. Defaults to the end of the file if omitted."),showLineNumbers:U.boolean().optional().default(!0).describe("Prefix each line with its line number. Only used when reading text files; ignored for media and other binary files. Defaults to true if omitted."),encoding:U.enum(["utf-8","utf8","base64","hex","binary"]).optional().describe("Usually omit this \u2014 text files and supported media are handled automatically. Pass `base64` or `hex` to get the file's raw bytes encoded as text when you need to inspect an unsupported binary file that would otherwise only return metadata (e.g. checking a file header or magic bytes).")}),execute:async({path:$,encoding:Y,offset:X,limit:G,showLineNumbers:J},Q)=>{let{workspace:W,filesystem:K}=vz(Q);await sG(Q,n4.FILESYSTEM.READ_FILE);let Z=mY(Q,W,{category:"filesystem",operation:"readFile",input:{path:$,encoding:Y,offset:X,limit:G},attributes:{filesystemProvider:K.provider}});try{let H=await K.stat($),z=W.getToolsConfig()?.[n4.FILESYSTEM.READ_FILE],V=OO8(z?.mediaTypes);if(!Y&&V(H.mimeType)){let q=z?.maxMediaBytes??LO8;if(H.size>q)return Z.end({success:!0},{bytesTransferred:0}),`${H.path} (${H.size} bytes, ${H.mimeType}) \u2014 exceeds maxMediaBytes (${q}). Returning metadata only; configure \`maxMediaBytes\` on the read_file tool to raise this cap.`;let _=await K.readFile($,{encoding:"base64"}),P=`${H.path} (${H.size} bytes, ${H.mimeType})`;return Z.end({success:!0},{bytesTransferred:H.size}),{__workspaceMedia:!0,text:P,mediaType:H.mimeType,data:_}}if(!Y&&!NO8(H.mimeType))return Z.end({success:!0},{bytesTransferred:0}),`${H.path} (${H.size} bytes, ${H.mimeType??"unknown"}) \u2014 binary file not readable as text. Pass an explicit \`encoding\` (e.g. \`base64\`) to read the raw bytes, or configure \`mediaTypes\` on the read_file tool to surface it as a media part.`;let F=Y??"utf-8",L=await K.readFile($,{encoding:F}),N=!Y||Y==="utf-8"||Y==="utf8",D=z?.maxOutputTokens;if(!N){let q=await Pf(`${H.path} (${H.size} bytes, ${F})
${L}`,D,"end");return Z.end({success:!0},{bytesTransferred:H.size}),q}if(typeof L!=="string"){let q=await Pf(`${H.path} (${H.size} bytes, base64)
${L.toString("base64")}`,D,"end");return Z.end({success:!0},{bytesTransferred:H.size}),q}let A=X!==void 0||G!==void 0,B=UB8(L,X,G),E=J!==!1?HB8(B.content,B.lines.start):B.content,M;if(A)M=`${H.path} (lines ${B.lines.start}-${B.lines.end} of ${B.totalLines}, ${H.size} bytes)`;else M=`${H.path} (${H.size} bytes)`;let R=await Pf(`${M}
${E}`,D,"end");return Z.end({success:!0},{bytesTransferred:H.size}),R}catch(H){throw Z.error(H),H}},toModelOutput:($)=>{if(VO8($))return{type:"content",value:[{type:"text",text:$.text},{type:"media",data:$.data,mediaType:$.mediaType}]};return}}),Pi1=U.object({query:U.string().describe("The search query string"),topK:U.number().optional().default(5).describe("Maximum number of results to return"),mode:U.enum(["bm25","vector","hybrid"]).optional().describe("Search mode: bm25 for keyword search, vector for semantic search, hybrid for both combined"),minScore:U.number().optional().describe("Minimum score threshold (0-1 for normalized scores)")}),MO8=X8({id:n4.SEARCH.SEARCH,description:"Search indexed content in the workspace. Supports keyword (BM25), semantic (vector), and hybrid search modes.",inputSchema:Pi1,execute:async({query:$,topK:Y,mode:X,minScore:G},J)=>{let Q=x_(J);await sG(J,n4.SEARCH.SEARCH);let W=mY(J,Q,{category:"search",operation:"search",input:{query:$,topK:Y,mode:X,minScore:G},attributes:{}});try{let K=X==="hybrid"&&!Q.canHybrid?Q.canVector?"vector":"bm25":X==="vector"&&!Q.canVector?"bm25":X??(Q.canHybrid?"hybrid":Q.canVector?"vector":"bm25"),Z=await Q.search($,{topK:Y,mode:K,minScore:G}),H=Z.map((z)=>{let V=z.lineRange?`:${z.lineRange.start}-${z.lineRange.end}`:"";return`${z.id}${V}: ${z.content}`});return H.push("---"),H.push(`${Z.length} result${Z.length!==1?"s":""} (${K} search)`),W.end({success:!0},{resultCount:Z.length}),H.join(`
`)}catch(K){throw W.error(K),K}}}),RO8=X8({id:n4.FILESYSTEM.WRITE_FILE,description:"Write content to a file in the workspace filesystem. Creates parent directories if needed.",inputSchema:U.object({path:U.string().describe('The path where to write the file (e.g., "data/output.txt")'),content:U.string().describe("The content to write to the file"),overwrite:U.boolean().optional().default(!0).describe("Whether to overwrite the file if it already exists")}),execute:async({path:$,content:Y,overwrite:X},G)=>{let{workspace:J,filesystem:Q}=vz(G);await sG(G,n4.FILESYSTEM.WRITE_FILE);let W=mY(G,J,{category:"filesystem",operation:"writeFile",input:{path:$,overwrite:X,contentLength:Y.length},attributes:{filesystemProvider:Q.provider}});try{if(Q.readOnly)throw new jf("write_file");await Q.writeFile($,Y,{overwrite:X,expectedMtime:G?.__expectedMtime});let K=Buffer.byteLength(Y,"utf-8"),Z=`Wrote ${K} bytes to ${$}`;return Z+=await XS0(J,$,Y),W.end({success:!0},{bytesTransferred:K}),Z}catch(K){throw W.error(K),K}}})});import{execFile as jO8}from"child_process";import{realpathSync as Ii1}from"fs";import{relative as TO8}from"path";function F4($,Y){if($===!1)return Number.MAX_SAFE_INTEGER;else if($===0)return 0;else if(typeof $==="number"&&$>0)return $;else if(typeof $==="number"&&$<0)throw Error("perPage must be >= 0");return Y}function B4($,Y,X){return{offset:Y===!1?0:$*X,perPage:Y===!1?!1:X}}var QS0,cL,ki1,qW,IO8,Ci1,CO8,QG,WS0=class{repoRootCache=new Map;commitCache=new Map;snapshotCache=new Map;async isGitRepo($){let Y=this.repoRootCache.get($);if(Y===!1)return!1;if(typeof Y==="string")return!0;try{let X=(await this.exec($,["rev-parse","--show-toplevel"])).trim();return this.repoRootCache.set($,X),!0}catch{return this.repoRootCache.set($,!1),!1}}async getFileHistory($,Y,X=50){let G=`${$}:${Y}:${X}`;if(this.commitCache.has(G))return this.commitCache.get(G);if(!await this.isGitRepo($))return this.commitCache.set(G,[]),[];try{let J=await this.exec($,["log",`--max-count=${X}`,"--format=%H|%aI|%aN|%s","--follow","--",Y]),Q=[];for(let W of J.split(`
`)){let K=W.trim();if(!K)continue;let Z=K.indexOf("|"),H=K.indexOf("|",Z+1),z=K.indexOf("|",H+1);if(Z===-1||H===-1||z===-1)continue;Q.push({hash:K.slice(0,Z),date:new Date(K.slice(Z+1,H)),author:K.slice(H+1,z),message:K.slice(z+1)})}return this.commitCache.set(G,Q),Q}catch{return this.commitCache.set(G,[]),[]}}async getFileAtCommit($,Y,X){let G=`${$}:${Y}:${X}`;if(this.snapshotCache.has(G))return this.snapshotCache.get(G);if(!await this.isGitRepo($))return null;try{let J=this.relativeToRepo($,X),Q=await this.exec($,["show",`${Y}:${J}`]),W=JSON.parse(Q);return this.snapshotCache.set(G,W),W}catch{return null}}invalidateCache(){this.repoRootCache.clear(),this.commitCache.clear(),this.snapshotCache.clear()}relativeToRepo($,Y){let X=this.repoRootCache.get($);if(!X)throw Error(`Not a git repository: ${$}`);let G=Ii1(X),J=Ii1($),Q=TO8(G,J);return Q?`${Q}/${Y}`:Y}exec($,Y){return new Promise((X,G)=>{jO8("git",Y,{cwd:$,maxBuffer:10485760},(J,Q)=>{if(J)G(J);else X(Q)})})}},Si1="git-",WG;var O3=V0(()=>{p2();QS0=["agents","promptBlocks","scorerDefinitions","mcpClients","mcpServers","workspaces","skills","favorites"];cL=class extends u8{hasInitialized=null;shouldCacheInit=!0;id;stores;disableInit=!1;constructor($){let Y=$.name??"MastraCompositeStore";if(!$.id||typeof $.id!=="string"||$.id.trim()==="")throw Error(`${Y}: id must be provided and cannot be empty.`);super({component:"STORAGE",name:Y});if(this.id=$.id,this.disableInit=$.disableInit??!1,$.default||$.editor||$.domains){let X=$.default?.stores,G=$.editor?.stores,J=$.domains??{},Q=X&&Object.values(X).some((z)=>z!==void 0),W=G&&Object.values(G).some((z)=>z!==void 0),K=Object.values(J).some((z)=>z!==void 0);if(!Q&&!W&&!K)throw Error("MastraCompositeStore requires at least one storage source. Provide a default storage, an editor storage, or domain overrides.");let Z=new Set(QS0),H=(z)=>{if(J[z]!==void 0)return J[z];if(Z.has(z)&&G?.[z]!==void 0)return G[z];return X?.[z]};this.stores={memory:H("memory"),workflows:H("workflows"),scores:H("scores"),observability:H("observability"),agents:H("agents"),datasets:H("datasets"),experiments:H("experiments"),promptBlocks:H("promptBlocks"),scorerDefinitions:H("scorerDefinitions"),mcpClients:H("mcpClients"),mcpServers:H("mcpServers"),workspaces:H("workspaces"),skills:H("skills"),favorites:H("favorites"),blobs:H("blobs"),backgroundTasks:H("backgroundTasks"),schedules:H("schedules"),channels:H("channels")}}}async getStore($){return this.stores?.[$]}async init(){if(this.shouldCacheInit&&await this.hasInitialized)return;let $=[];if(this.stores?.memory)$.push(this.stores.memory.init());if(this.stores?.workflows)$.push(this.stores.workflows.init());if(this.stores?.scores)$.push(this.stores.scores.init());if(this.stores?.observability)$.push(this.stores.observability.init());if(this.stores?.agents)$.push(this.stores.agents.init());if(this.stores?.datasets)$.push(this.stores.datasets.init());if(this.stores?.experiments)$.push(this.stores.experiments.init());if(this.stores?.promptBlocks)$.push(this.stores.promptBlocks.init());if(this.stores?.scorerDefinitions)$.push(this.stores.scorerDefinitions.init());if(this.stores?.mcpClients)$.push(this.stores.mcpClients.init());if(this.stores?.mcpServers)$.push(this.stores.mcpServers.init());if(this.stores?.workspaces)$.push(this.stores.workspaces.init());if(this.stores?.skills)$.push(this.stores.skills.init());if(this.stores?.favorites)$.push(this.stores.favorites.init());if(this.stores?.blobs)$.push(this.stores.blobs.init());if(this.stores?.backgroundTasks)$.push(this.stores.backgroundTasks.init());if(this.stores?.schedules)$.push(this.stores.schedules.init());if(this.stores?.channels)$.push(this.stores.channels.init());this.hasInitialized=Promise.all($).then(()=>!0),await this.hasInitialized}},ki1=class extends cL{},qW=class extends u8{async init(){}},IO8={createdAt:!0,updatedAt:!0},Ci1={ASC:!0,DESC:!0},CO8={versionNumber:!0,createdAt:!0},QG=class extends qW{extractSnapshotConfig($){let Y={},X=new Set(this.versionMetadataFields);for(let[G,J]of Object.entries($))if(!X.has(G))Y[G]=J;return Y}async getByIdResolved($,Y){let X=await this.getById($);if(!X)return null;return this.resolveEntity(X,Y)}async listResolved($){let Y=await this.list($),X=$?.status,G=Y[this.listKey],J=await Promise.all(G.map((Q)=>this.resolveEntity(Q,{status:X})));return{...Y,[this.listKey]:J}}async resolveEntity($,Y){let X=Y?.status||"published",G=null;if(Y?.versionId)G=await this.getVersion(Y.versionId);else if(X==="draft")G=await this.getLatestVersion($.id);else{if($.activeVersionId){if(G=await this.getVersion($.activeVersionId),!G)this.logger?.warn?.(`Entity ${$.id} has activeVersionId ${$.activeVersionId} but version not found. Falling back to latest version.`)}if(!G)G=await this.getLatestVersion($.id)}if(G){let J=this.extractSnapshotConfig(G);return{...$,...J,resolvedVersionId:G.id}}return $}parseOrderBy($,Y="DESC"){return{field:$?.field&&$.field in IO8?$.field:"createdAt",direction:$?.direction&&$.direction in Ci1?$.direction:Y}}parseVersionOrderBy($,Y="DESC"){return{field:$?.field&&$.field in CO8?$.field:"versionNumber",direction:$?.direction&&$.direction in Ci1?$.direction:Y}}},WG=class ${db;entitiesFile;parentIdField;name;versionMetadataFields;gitHistoryLimit;entities=new Map;versions=new Map;hydrated=!1;static gitHistory=new WS0;gitHistoryPromise=null;gitVersionCounts=new Map;constructor(Y){this.db=Y.db,this.entitiesFile=Y.entitiesFile,this.parentIdField=Y.parentIdField,this.name=Y.name,this.versionMetadataFields=Y.versionMetadataFields,this.gitHistoryLimit=Y.gitHistoryLimit??50}static isGitVersion(Y){return Y.startsWith(Si1)}hydrate(){if(this.hydrated)return;this.hydrated=!0;let Y=this.db.readDomain(this.entitiesFile);for(let[X,G]of Object.entries(Y)){if(!G||typeof G!=="object")continue;let J=`hydrated-${X}-v1`,Q=new Date,W={id:X,status:"published",activeVersionId:J,createdAt:Q,updatedAt:Q};this.entities.set(X,W);let K={id:J,[this.parentIdField]:X,versionNumber:1,...G,createdAt:Q};this.versions.set(J,K)}this.gitHistoryPromise=this.loadGitHistory()}async ensureGitHistory(){if(this.hydrate(),this.gitHistoryPromise)await this.gitHistoryPromise}async loadGitHistory(){let Y=$.gitHistory,X=this.db.dir;if(!await Y.isGitRepo(X))return;let J=await Y.getFileHistory(X,this.entitiesFile,this.gitHistoryLimit);if(J.length===0)return;let Q=[...J].reverse(),W=new Map,K=new Map;for(let Z=0;Z<Q.length;Z++){let H=Q[Z],z=await Y.getFileAtCommit(X,H.hash,this.entitiesFile);if(!z)continue;for(let[V,F]of Object.entries(z)){if(!F||typeof F!=="object")continue;let L=JSON.stringify(F);if(K.get(V)===L)continue;K.set(V,L);let N=(W.get(V)??0)+1;W.set(V,N);let D=`${Si1}${H.hash}-${V}`;if(this.versions.has(D))continue;let A={id:D,[this.parentIdField]:V,versionNumber:N,changeMessage:H.message,...F,createdAt:H.date};this.versions.set(D,A)}}this.gitVersionCounts=W;for(let[Z,H]of W){let z=`hydrated-${Z}-v1`,V=this.versions.get(z);if(V)V.versionNumber=H+1}}persistToDisk(){let Y={};for(let[X,G]of this.entities){if(G.status!=="published"||!G.activeVersionId)continue;let J=this.versions.get(G.activeVersionId);if(!J)continue;let Q=this.extractSnapshotConfig(J);Y[X]=Q}this.db.writeDomain(this.entitiesFile,Y)}extractSnapshotConfig(Y){let X=new Set(this.versionMetadataFields),G={};for(let[J,Q]of Object.entries(Y))if(!X.has(J))G[J]=Q;return G}async getById(Y){return this.hydrate(),this.entities.has(Y)?structuredClone(this.entities.get(Y)):null}async createEntity(Y,X){if(this.hydrate(),this.entities.has(Y))throw Error(`${this.name}: entity with id ${Y} already exists`);return this.entities.set(Y,structuredClone(X)),structuredClone(X)}async updateEntity(Y,X){this.hydrate();let G=this.entities.get(Y);if(!G)throw Error(`${this.name}: entity with id ${Y} not found`);let J={...G};for(let[Z,H]of Object.entries(X)){if(Z==="id")continue;if(H===void 0)continue;if(Z==="metadata"&&typeof H==="object"&&H!==null)J.metadata={...J.metadata??{},...H};else J[Z]=H}J.updatedAt=new Date;let Q=J;this.entities.set(Y,structuredClone(Q));let W=G.status==="published";if(Q.status==="published"&&Q.activeVersionId||W&&X.status!==void 0)this.persistToDisk();return structuredClone(Q)}async deleteEntity(Y){this.hydrate(),this.entities.delete(Y),await this.deleteVersionsByParentId(Y),this.persistToDisk()}async listEntities(Y){this.hydrate();let{page:X=0,perPage:G,orderBy:J,filters:Q,listKey:W}=Y,K=F4(G,100);if(X<0)throw Error("page must be >= 0");let Z=Array.from(this.entities.values());if(Q)for(let[L,N]of Object.entries(Q)){if(N===void 0)continue;if(L==="metadata"&&typeof N==="object"&&N!==null)Z=Z.filter((D)=>{let A=D.metadata;if(!A)return!1;return Object.entries(N).every(([B,O])=>JSON.stringify(A[B])===JSON.stringify(O))});else Z=Z.filter((D)=>D[L]===N)}let H=J?.field??"createdAt",z=J?.direction??"DESC";Z.sort((L,N)=>{let D=new Date(L[H]).getTime(),A=new Date(N[H]).getTime();return z==="ASC"?D-A:A-D});let{offset:V,perPage:F}=B4(X,G,K);return{[W]:Z.slice(V,V+K),total:Z.length,page:X,perPage:F,hasMore:V+K<Z.length}}async createVersion(Y){if(await this.ensureGitHistory(),this.versions.has(Y.id))throw Error(`${this.name}: version with id ${Y.id} already exists`);let X=Y[this.parentIdField];for(let J of this.versions.values())if(J[this.parentIdField]===X&&J.versionNumber===Y.versionNumber)throw Error(`${this.name}: version number ${Y.versionNumber} already exists for entity ${X}`);let G={...Y,createdAt:new Date};return this.versions.set(Y.id,structuredClone(G)),structuredClone(G)}async getVersion(Y){return await this.ensureGitHistory(),this.versions.has(Y)?structuredClone(this.versions.get(Y)):null}async getVersionByNumber(Y,X){await this.ensureGitHistory();for(let G of this.versions.values())if(G[this.parentIdField]===Y&&G.versionNumber===X)return structuredClone(G);return null}async getLatestVersion(Y){await this.ensureGitHistory();let X=null;for(let G of this.versions.values())if(G[this.parentIdField]===Y){if(!X||G.versionNumber>X.versionNumber)X=G}return X?structuredClone(X):null}async listVersions(Y,X){await this.ensureGitHistory();let{page:G=0,perPage:J,orderBy:Q}=Y,W=Y[X],K=F4(J,20);if(G<0)throw Error("page must be >= 0");let Z=Array.from(this.versions.values()).filter((L)=>L[this.parentIdField]===W),H=Q?.field??"versionNumber",z=Q?.direction??"DESC";Z.sort((L,N)=>{let D=H==="createdAt"?new Date(L.createdAt).getTime():L.versionNumber,A=H==="createdAt"?new Date(N.createdAt).getTime():N.versionNumber;return z==="ASC"?D-A:A-D});let{offset:V,perPage:F}=B4(G,J,K);return{versions:Z.slice(V,V+K),total:Z.length,page:G,perPage:F,hasMore:V+K<Z.length}}async deleteVersion(Y){if(await this.ensureGitHistory(),$.isGitVersion(Y))return;this.versions.delete(Y)}async deleteVersionsByParentId(Y){await this.ensureGitHistory();for(let[X,G]of this.versions)if(G[this.parentIdField]===Y){if($.isGitVersion(X))continue;this.versions.delete(X)}}async countVersions(Y){await this.ensureGitHistory();let X=0;for(let G of this.versions.values())if(G[this.parentIdField]===Y)X++;return X}async getNextVersionNumber(Y){return await this.ensureGitHistory(),this._getNextVersionNumber(Y)}_getNextVersionNumber(Y){let G=this.gitVersionCounts.get(Y)??0;for(let J of this.versions.values())if(J[this.parentIdField]===Y)G=Math.max(G,J.versionNumber);return G+1}async dangerouslyClearAll(){this.entities.clear(),this.versions.clear(),this.gitVersionCounts.clear(),this.gitHistoryPromise=null,this.hydrated=!1,this.db.clearDomain(this.entitiesFile)}}});import{WritableStream as SO8}from"stream/web";var PW;var i40=V0(()=>{PW=class extends SO8{prefix;callId;name;runId;writeFn;constructor({prefix:$,callId:Y,name:X,runId:G},J){super({async write(K){await W()._write(K)}});let Q=this;function W(){return Q}this.prefix=$,this.callId=Y,this.name=X,this.runId=G,this.writeFn=J}async _write($){if(this.writeFn)await this.writeFn({type:`${this.prefix}-output`,runId:this.runId,from:"USER",payload:{output:$,...this.prefix==="workflow-step"?{runId:this.runId,stepName:this.name}:{[`${this.prefix}CallId`]:this.callId,[`${this.prefix}Name`]:this.name}}})}async write($){await this._write($)}async custom($){if(this.writeFn)await this.writeFn($)}}});function wS0($){if(!$||typeof $!=="object"||Array.isArray($))return $;let Y={...$};if(typeof Y.userId==="string"&&Y.feedbackUserId==null)Y.feedbackUserId=Y.userId,delete Y.userId;return Y}var J6,KS0,ZS0,RO,xz,l2,lL,R3,i2,yz,Tf,qO,US0,HS0,zS0,h_,f_,VS0,FS0,iL,LS0,r40,a40,s40,o40,t40,e40,$60,Y60,X60,DS0,G60,J60,Q60,NS0,W60,K60,AS0,Z60,vi1,xi1,yi1,g_,BS0,m_,u_,bi1,p_,PO,d_,k$,LQ,y_,hi1,fi1,U60,gi1,OS0,mi1,ES0,MS0,RS0,H60,ui1,c_,pi1,di1,E3,ci1,li1,z60,ii1,If,ni1,ri1,ai1,si1,wO,qS0,PS0,V60,oi1,ti1,ei1,$n1,Yn1,Xn1,Gn1,Jn1,Qn1,M3,l_,Wn1,Kn1,n40,F60,L60,kO8,Zn1,Un1,Hn1,zn1,Vn1,Fn1,Ln1,i_,_S0,jS0,D60,Dn1,Nn1,An1,Bn1,On1,En1,Mn1,Rn1,qn1,Pn1,wn1,_n1,jn1,Tn1,In1,vO8,Cn1,xO8,N60,Sn1,TS0,kn1,vn1,_O,IS0,CS0,A60,xn1,SS0,Cf,b_,yn1,bn1,hn1,fn1,gn1,mn1,un1,pn1,dn1,cn1,ln1,in1,nn1,rn1,an1,sn1,on1,tn1,en1,$r1,Yr1,Xr1,Gr1,Jr1,bz;var hz=V0(()=>{O1();J6=(($)=>{return $.AGENT="agent",$.SCORER="scorer",$.RAG_INGESTION="rag_ingestion",$.TRAJECTORY="trajectory",$.INPUT_PROCESSOR="input_processor",$.INPUT_STEP_PROCESSOR="input_step_processor",$.OUTPUT_PROCESSOR="output_processor",$.OUTPUT_STEP_PROCESSOR="output_step_processor",$.WORKFLOW_STEP="workflow_step",$.TOOL="tool",$.WORKFLOW_RUN="workflow_run",$.MEMORY="memory",$})(J6||{}),KS0=U.date().describe("Database record creation time"),ZS0=U.date().describe("Database record last update time"),RO={createdAt:KS0,updatedAt:ZS0.nullable()},xz=U.object({page:U.coerce.number().int().min(0).optional().default(0).describe("Zero-indexed page number"),perPage:U.coerce.number().int().min(1).max(100).optional().default(10).describe("Number of items per page")}).describe("Pagination options for list queries"),l2=U.object({total:U.number().describe("Total number of items available"),page:U.number().describe("Current page"),perPage:U.union([U.number(),U.literal(!1)]).describe("Number of items per page, or false if pagination is disabled"),hasMore:U.boolean().describe("True if more pages are available")}),lL=U.object({start:U.coerce.date().optional().describe("Start of date range (inclusive by default)"),end:U.coerce.date().optional().describe("End of date range (inclusive by default)"),startExclusive:U.boolean().optional().describe("When true, excludes the start date from results (uses > instead of >=)"),endExclusive:U.boolean().optional().describe("When true, excludes the end date from results (uses < instead of <=)")}).describe("Date range filter for timestamps"),R3=U.enum(["ASC","DESC"]).describe("Sort direction: 'ASC' | 'DESC'"),i2=U.enum(["sum","avg","min","max","count","count_distinct","last"]).describe("Aggregation function"),yz=U.enum(["1m","5m","15m","1h","1d"]).describe("Time bucket interval"),Tf=U.enum(["previous_period","previous_day","previous_week"]).describe("Comparison period for aggregate queries"),qO=U.array(U.string()).min(1).describe("Fields to group by"),US0=U.array(U.number().min(0).max(1)).min(1).describe("Percentile values (0-1)"),HS0={value:U.number().nullable().describe("Aggregated value"),previousValue:U.number().nullable().optional().describe("Value from comparison period"),changePercent:U.number().nullable().optional().describe("Percentage change from comparison period")},zS0=U.record(U.string(),U.string().nullable()).describe("Dimension values for this group"),h_=U.number().describe("Aggregated value"),f_=U.date().describe("Bucket timestamp"),VS0=U.number().describe("Percentile value"),FS0=U.number().describe("Percentile value at this bucket"),iL=U.nativeEnum(J6).describe("Entity type (e.g., 'agent' | 'processor' | 'tool' | 'workflow')"),LS0=U.string().describe('ID of the entity (e.g., "weatherAgent", "orderWorkflow")'),r40=U.string().describe("Name of the entity"),a40=U.string().describe("Human end-user who triggered execution"),s40=U.string().describe("Multi-tenant organization/account"),o40=U.string().describe("Broader resource context (Mastra memory compatibility)"),t40=U.string().describe("Unique execution run identifier"),e40=U.string().describe("Session identifier for grouping traces"),$60=U.string().describe("Conversation thread identifier"),Y60=U.string().describe("HTTP request ID for log correlation"),X60=U.string().describe('Environment (e.g., "production" | "staging" | "development")'),DS0=U.string().describe('Source of execution (e.g., "local" | "cloud" | "ci")'),G60=U.string().describe('Source of execution (e.g., "local" | "cloud" | "ci")'),J60=U.string().describe("Name of the service"),Q60=U.nativeEnum(J6).describe("Entity type of the parent entity"),NS0=U.string().describe("ID of the parent entity"),W60=U.string().describe("Name of the parent entity"),K60=U.nativeEnum(J6).describe("Entity type of the root entity"),AS0=U.string().describe("ID of the root entity"),Z60=U.string().describe("Name of the root entity"),vi1=U.string().describe("Version ID of the entity that produced this signal (e.g., agent version, workflow version)"),xi1=U.string().describe("Version ID of the parent entity that produced this signal"),yi1=U.string().describe("Version ID of the root entity that produced this signal"),g_=U.string().describe("Experiment or eval run identifier"),BS0=U.record(U.string(),U.unknown()).describe('Arbitrary package/app version info (e.g., {"core": "1.0.0", "memory": "1.0.0", "gitSha": "abcd1234"})'),m_=U.record(U.string(),U.unknown()).describe("User-defined metadata for custom filtering"),u_=U.array(U.string()).describe("Labels for filtering"),bi1={entityType:iL.nullish(),entityId:LS0.nullish(),entityName:r40.nullish(),parentEntityType:Q60.nullish(),parentEntityId:NS0.nullish(),parentEntityName:W60.nullish(),rootEntityType:K60.nullish(),rootEntityId:AS0.nullish(),rootEntityName:Z60.nullish(),userId:a40.nullish(),organizationId:s40.nullish(),resourceId:o40.nullish(),runId:t40.nullish(),sessionId:e40.nullish(),threadId:$60.nullish(),requestId:Y60.nullish(),environment:X60.nullish(),serviceName:J60.nullish(),scope:BS0.nullish(),entityVersionId:vi1.nullish(),parentEntityVersionId:xi1.nullish(),rootEntityVersionId:yi1.nullish(),experimentId:g_.nullish()},p_={...bi1,executionSource:G60.nullish(),tags:u_.nullish()},PO={...bi1,source:DS0.nullish()},d_={timestamp:lL.optional().describe("Filter by timestamp range"),traceId:U.string().optional().describe("Filter by trace ID"),spanId:U.string().optional().describe("Filter by span ID"),entityType:iL.optional(),entityName:r40.optional(),entityVersionId:vi1.optional(),parentEntityVersionId:xi1.optional(),rootEntityVersionId:yi1.optional(),userId:a40.optional(),organizationId:s40.optional(),experimentId:g_.optional(),serviceName:J60.optional(),environment:X60.optional(),parentEntityType:Q60.optional(),parentEntityName:W60.optional(),rootEntityType:K60.optional(),rootEntityName:Z60.optional(),resourceId:o40.optional(),runId:t40.optional(),sessionId:e40.optional(),threadId:$60.optional(),requestId:Y60.optional(),executionSource:G60.optional(),tags:U.array(U.string()).optional().describe("Filter by tags (must have all specified tags)")},k$=U.string().describe("Unique trace identifier"),LQ=U.string().describe("Unique span identifier within a trace"),y_=U.enum(["debug","info","warn","error","fatal"]),hi1=U.string().describe("Log message"),fi1=U.record(U.string(),U.unknown()).describe("Structured data attached to the log"),U60=U.object({logId:U.string().nullish().describe("Unique id for this log event"),timestamp:U.date().describe("When the log was created"),level:y_.describe("Log severity level"),message:hi1,data:fi1.nullish(),traceId:k$.nullish(),spanId:LQ.nullish(),...p_,source:U.string().nullish().describe("Execution source"),metadata:m_.nullish()}).describe("Log record as stored in the database"),gi1=U.object({level:y_,message:hi1,data:fi1.optional(),tags:u_.optional()}).describe("User-provided log input"),OS0=U60,mi1=U.object({logs:U.array(OS0)}).describe("Arguments for batch creating logs"),ES0=U.object({...d_,source:U.string().optional().describe("Filter by execution source"),level:U.union([y_,U.array(y_)]).optional().describe("Filter by log level(s)")}).describe("Filters for querying logs"),MS0=U.enum(["timestamp"]).describe("Field to order by: 'timestamp'"),RS0=U.object({field:MS0.default("timestamp").describe("Field to order by"),direction:R3.default("DESC").describe("Sort direction")}).describe("Order by configuration"),H60=U.object({filters:ES0.optional().describe("Optional filters to apply"),pagination:xz.default({page:0,perPage:10}).describe("Pagination settings"),orderBy:RS0.default({field:"timestamp",direction:"DESC"}).describe("Ordering configuration (defaults to timestamp desc)")}).describe("Arguments for listing logs"),ui1=U.object({pagination:l2,logs:U.array(U60)}),c_=U.string().describe("Identifier of the scorer (e.g., relevance, accuracy)"),pi1=U.string().describe("Display name of the scorer"),di1=U.string().describe("Version of the scorer"),E3=U.string().describe("How the score was produced (e.g., manual, automated, experiment)"),ci1=U.number().describe("Score value (range defined by scorer)"),li1=U.string().describe("Explanation for the score"),z60=U.object({scoreId:U.string().nullish().describe("Unique id for this score event"),timestamp:U.date().describe("When the score was recorded"),traceId:k$.nullish().describe("Trace that anchors the scored target when available"),spanId:LQ.nullish().describe("Span ID this score applies to"),scorerId:c_,scorerName:pi1.nullish(),scorerVersion:di1.nullish(),scoreSource:E3.nullish(),source:E3.nullish(),score:ci1,reason:li1.nullish(),...p_,scoreTraceId:U.string().nullish().describe("Trace ID of the scoring run for debugging score generation"),metadata:U.record(U.string(),U.unknown()).nullish().describe("User-defined metadata")}).describe("Score record as stored in the database"),ii1=U.object({scorerId:c_,scorerName:pi1.optional(),scorerVersion:di1.optional(),scoreSource:E3.optional(),source:E3.optional(),score:ci1,reason:li1.optional(),metadata:U.record(U.string(),U.unknown()).optional().describe("Additional scorer-specific metadata"),experimentId:g_.optional(),scoreTraceId:U.string().optional().describe("Trace ID of the scoring run for debugging score generation"),targetEntityType:iL.optional().describe("Entity type the scorer evaluated when known")}).describe("User-provided score input"),If=z60,ni1=U.object({score:If}).describe("Arguments for creating a score"),ri1=U.object({score:If.omit({timestamp:!0})}).describe("Arguments for creating a score"),ai1=U.object({success:U.boolean()}).describe("Response from creating a score"),si1=U.object({scores:U.array(If)}).describe("Arguments for batch recording scores"),wO=U.object({...d_,scorerId:U.union([U.string(),U.array(U.string())]).optional().describe("Filter by scorer ID(s)"),scoreSource:E3.optional().describe("Filter by how the score was produced"),source:E3.optional().describe("Filter by how the score was produced")}).describe("Filters for querying scores"),qS0=U.enum(["timestamp","score"]).describe("Field to order by: 'timestamp' | 'score'"),PS0=U.object({field:qS0.default("timestamp").describe("Field to order by"),direction:R3.default("DESC").describe("Sort direction")}).describe("Order by configuration"),V60=U.object({filters:wO.optional(),pagination:xz.default({page:0,perPage:10}).describe("Pagination settings"),orderBy:PS0.default({field:"timestamp",direction:"DESC"}).describe("Ordering configuration (defaults to timestamp desc)")}).describe("Arguments for listing scores"),oi1=U.object({pagination:l2,scores:U.array(z60)}),ti1=U.object({scorerId:c_,scoreSource:E3.optional(),aggregation:i2,filters:wO.optional(),comparePeriod:Tf.optional()}).describe("Arguments for getting a score aggregate"),ei1=U.object(HS0),$n1=U.object({scorerId:c_,scoreSource:E3.optional(),groupBy:qO,aggregation:i2,filters:wO.optional()}).describe("Arguments for getting a score breakdown"),Yn1=U.object({groups:U.array(U.object({dimensions:zS0,value:h_}))}),Xn1=U.object({scorerId:c_,scoreSource:E3.optional(),interval:yz,aggregation:i2,filters:wO.optional(),groupBy:qO.optional()}).describe("Arguments for getting score time series"),Gn1=U.object({series:U.array(U.object({name:U.string().describe("Series name (scorer ID or group key)"),points:U.array(U.object({timestamp:f_,value:h_}))}))}),Jn1=U.object({scorerId:c_,scoreSource:E3.optional(),percentiles:US0,interval:yz,filters:wO.optional()}).describe("Arguments for getting score percentiles"),Qn1=U.object({series:U.array(U.object({percentile:VS0,points:U.array(U.object({timestamp:f_,value:FS0}))}))}),M3=U.string().describe("Source of feedback (e.g., 'user', 'system', 'manual')"),l_=U.string().describe("Type of feedback (e.g., 'thumbs', 'rating', 'correction')"),Wn1=U.union([U.number(),U.string()]).describe("Feedback value (rating number or correction text)"),Kn1=U.string().describe("Additional comment or context"),n40=U.string().describe("User who provided the feedback");F60=U.object({feedbackId:U.string().nullish().describe("Unique id for this feedback event"),timestamp:U.date().describe("When the feedback was recorded"),traceId:k$.nullish().describe("Trace that anchors the feedback target when available"),spanId:LQ.nullish().describe("Span ID this feedback applies to"),feedbackSource:M3.nullish(),source:M3.nullish(),feedbackType:l_,value:Wn1,comment:Kn1.nullish(),feedbackUserId:n40.nullish(),...p_,sourceId:U.string().nullish().describe("ID of the source record this feedback is linked to (e.g. experiment result ID)"),metadata:U.record(U.string(),U.unknown()).nullish().describe("User-defined metadata")}),L60=U.object(F60.shape).describe("Feedback record as stored in the database"),kO8=U.object({feedbackSource:M3.optional(),source:M3.optional(),feedbackType:l_,value:Wn1,comment:Kn1.optional(),feedbackUserId:n40.optional(),userId:n40.optional(),metadata:U.record(U.string(),U.unknown()).optional().describe("Additional feedback-specific metadata"),experimentId:g_.optional(),sourceId:U.string().optional().describe("ID of the source record this feedback is linked to")}),Zn1=U.object(kO8.shape).describe("User-provided feedback input"),Un1=L60,Hn1=U.object({feedback:U.preprocess(wS0,F60)}).describe("Arguments for creating feedback"),zn1=U.object({feedback:F60.omit({timestamp:!0})}).describe("Arguments for creating feedback"),Vn1=U.object({success:U.boolean()}).describe("Response from creating feedback"),Fn1=U.object({feedbacks:U.array(U.preprocess(wS0,F60))}).describe("Arguments for batch recording feedback"),Ln1=U.object({...d_,feedbackType:U.union([U.string(),U.array(U.string())]).optional().describe("Filter by feedback type(s)"),feedbackSource:M3.optional(),source:M3.optional(),feedbackUserId:n40.optional()}),i_=U.object(Ln1.shape).describe("Filters for querying feedback"),_S0=U.enum(["timestamp"]).describe("Field to order by: 'timestamp'"),jS0=U.object({field:_S0.default("timestamp").describe("Field to order by"),direction:R3.default("DESC").describe("Sort direction")}).describe("Order by configuration"),D60=U.object({filters:U.preprocess(wS0,Ln1).optional().describe("Optional filters to apply"),pagination:xz.default({page:0,perPage:10}).describe("Pagination settings"),orderBy:jS0.default({field:"timestamp",direction:"DESC"}).describe("Ordering configuration (defaults to timestamp desc)")}).describe("Arguments for listing feedback"),Dn1=U.object({pagination:l2,feedback:U.array(L60)}),Nn1=U.object({feedbackType:l_,feedbackSource:M3.optional(),aggregation:i2,filters:i_.optional(),comparePeriod:Tf.optional()}).describe("Arguments for getting a feedback aggregate over numeric values"),An1=U.object(HS0),Bn1=U.object({feedbackType:l_,feedbackSource:M3.optional(),groupBy:qO,aggregation:i2,filters:i_.optional()}).describe("Arguments for getting a feedback breakdown over numeric values"),On1=U.object({groups:U.array(U.object({dimensions:zS0,value:h_}))}),En1=U.object({feedbackType:l_,feedbackSource:M3.optional(),interval:yz,aggregation:i2,filters:i_.optional(),groupBy:qO.optional()}).describe("Arguments for getting feedback time series over numeric values"),Mn1=U.object({series:U.array(U.object({name:U.string().describe("Series name (feedback type or group key)"),points:U.array(U.object({timestamp:f_,value:h_}))}))}),Rn1=U.object({feedbackType:l_,feedbackSource:M3.optional(),percentiles:US0,interval:yz,filters:i_.optional()}).describe("Arguments for getting feedback percentiles over numeric values"),qn1=U.object({series:U.array(U.object({percentile:VS0,points:U.array(U.object({timestamp:f_,value:FS0}))}))}),Pn1=U.enum(["counter","gauge","histogram"]),wn1=U.string().describe("Metric name (e.g., mastra_agent_duration_ms)"),_n1=U.number().describe("Metric value"),jn1=U.record(U.string(),U.string()).describe("Metric labels for dimensional filtering"),Tn1=U.string().describe("Model provider"),In1=U.string().describe("Model"),vO8=U.number().describe("Estimated cost"),Cn1=U.string().describe("Unit for the estimated cost (e.g., usd)"),xO8=U.record(U.string(),U.unknown()).nullish().describe("Structured costing metadata"),N60=U.object({metricId:U.string().nullish().describe("Unique id for this metric event"),timestamp:U.date().describe("When the metric was recorded"),name:wn1,value:_n1,traceId:k$.nullish(),spanId:LQ.nullish(),...p_,source:U.string().nullish().describe("Execution source"),provider:Tn1.nullish(),model:In1.nullish(),estimatedCost:vO8.nullish(),costUnit:Cn1.nullish(),costMetadata:xO8.nullish(),labels:jn1.default({}),metadata:m_.nullish()}).describe("Metric record as stored in the database"),Sn1=U.object({name:wn1,value:_n1,labels:jn1.optional()}).describe("User-provided metric input"),TS0=N60,kn1=U.object({metrics:U.array(TS0)}).describe("Arguments for batch recording metrics"),vn1=U.object({type:i2,interval:yz.optional(),groupBy:qO.optional()}).describe("Metrics aggregation configuration"),_O=U.object({...d_,name:U.array(U.string()).nonempty().optional().describe("Filter by metric name(s)"),source:U.string().optional().describe("Filter by execution source"),provider:Tn1.optional(),model:In1.optional(),costUnit:Cn1.optional(),labels:U.record(U.string(),U.string()).optional().describe("Exact match on label key-value pairs")}).describe("Filters for querying metrics"),IS0=U.enum(["timestamp"]).describe("Field to order by: 'timestamp'"),CS0=U.object({field:IS0.default("timestamp").describe("Field to order by"),direction:R3.default("DESC").describe("Sort direction")}).describe("Order by configuration"),A60=U.object({filters:_O.optional(),pagination:xz.default({page:0,perPage:10}).describe("Pagination settings"),orderBy:CS0.default({field:"timestamp",direction:"DESC"}).describe("Ordering configuration (defaults to timestamp desc)")}).describe("Arguments for listing metrics"),xn1=U.object({pagination:l2,metrics:U.array(N60)}),SS0=["entityType","entityName","parentEntityType","parentEntityName","rootEntityType","rootEntityName","name","provider","model","environment","executionSource","serviceName","threadId","resourceId"],Cf=U.enum(SS0).optional().describe("Column to apply count_distinct over (required when aggregation is 'count_distinct'). Restricted to allowlisted metric dimensions."),b_={check:($)=>$.aggregation!=="count_distinct"||$.distinctColumn!==void 0,options:{message:"distinctColumn is required when aggregation is 'count_distinct'",path:["distinctColumn"]}},yn1=U.object({name:U.array(U.string()).nonempty().describe("Metric name(s) to aggregate"),aggregation:i2,distinctColumn:Cf,filters:_O.optional(),comparePeriod:Tf.optional()}).refine(b_.check,b_.options).describe("Arguments for getting a metric aggregate"),bn1=U.object({...HS0,estimatedCost:U.number().nullable().optional().describe("Aggregated estimated cost from the same filtered row set"),costUnit:U.string().nullable().optional().describe("Shared cost unit for the aggregated rows, or null when mixed/unknown"),previousEstimatedCost:U.number().nullable().optional().describe("Aggregated estimated cost from the comparison period"),costChangePercent:U.number().nullable().optional().describe("Percentage change in estimated cost from comparison period")}),hn1=U.object({name:U.array(U.string()).nonempty().describe("Metric name(s) to break down"),groupBy:qO,aggregation:i2,distinctColumn:Cf,filters:_O.optional(),limit:U.number().int().positive().max(1000).optional().describe("Maximum number of groups to return (server-side TopK). Required for high-cardinality groupBy."),orderDirection:R3.optional().describe("Sort direction for the aggregated value (defaults to 'DESC' at the storage layer; pairs with limit for top/bottom-N).")}).refine(b_.check,b_.options).describe("Arguments for getting a metric breakdown"),fn1=U.object({groups:U.array(U.object({dimensions:zS0,value:h_,estimatedCost:U.number().nullable().optional().describe("Summed estimated cost for this group"),costUnit:U.string().nullable().optional().describe("Shared cost unit for this group, or null when mixed/unknown")}))}),gn1=U.object({name:U.array(U.string()).nonempty().describe("Metric name(s)"),interval:yz,aggregation:i2,distinctColumn:Cf,filters:_O.optional(),groupBy:qO.optional()}).refine(b_.check,b_.options).describe("Arguments for getting metric time series"),mn1=U.object({series:U.array(U.object({name:U.string().describe("Series name (metric name or group key)"),costUnit:U.string().nullable().optional().describe("Shared cost unit for this series, or null when mixed/unknown"),points:U.array(U.object({timestamp:f_,value:h_,estimatedCost:U.number().nullable().optional().describe("Summed estimated cost in this bucket")}))}))}),un1=U.object({name:U.string().describe("Metric name"),percentiles:US0,interval:yz,filters:_O.optional()}).describe("Arguments for getting metric percentiles"),pn1=U.object({series:U.array(U.object({percentile:VS0,points:U.array(U.object({timestamp:f_,value:FS0}))}))}),dn1=U.object({prefix:U.string().optional().describe("Filter metric names by prefix"),limit:U.coerce.number().int().min(1).optional().describe("Maximum number of names to return")}).describe("Arguments for getting metric names"),cn1=U.object({names:U.array(U.string()).describe("Distinct metric names")}),ln1=U.object({metricName:U.string().describe("Metric name to get label keys for")}).describe("Arguments for getting metric label keys"),in1=U.object({keys:U.array(U.string()).describe("Distinct label keys for the metric")}),nn1=U.object({metricName:U.string().describe("Metric name"),labelKey:U.string().describe("Label key to get values for"),prefix:U.string().optional().describe("Filter values by prefix"),limit:U.coerce.number().int().min(1).optional().describe("Maximum number of values to return")}).describe("Arguments for getting label values"),rn1=U.object({values:U.array(U.string()).describe("Distinct label values")}),an1=U.object({}).describe("Arguments for getting entity types"),sn1=U.object({entityTypes:U.array(iL).describe("Distinct entity types")}),on1=U.object({entityType:iL.optional().describe("Optional entity type filter")}).describe("Arguments for getting entity names"),tn1=U.object({names:U.array(U.string()).describe("Distinct entity names")}),en1=U.object({}).describe("Arguments for getting service names"),$r1=U.object({serviceNames:U.array(U.string()).describe("Distinct service names")}),Yr1=U.object({}).describe("Arguments for getting environments"),Xr1=U.object({environments:U.array(U.string()).describe("Distinct environments")}),Gr1=U.object({entityType:iL.optional().describe("Optional entity type filter")}).describe("Arguments for getting tags"),Jr1=U.object({tags:U.array(U.string()).describe("Distinct tags")}),bz=(($)=>{return $.AGENT_RUN="agent_run",$.SCORER_RUN="scorer_run",$.SCORER_STEP="scorer_step",$.GENERIC="generic",$.MODEL_GENERATION="model_generation",$.MODEL_STEP="model_step",$.MODEL_INFERENCE="model_inference",$.MODEL_CHUNK="model_chunk",$.MCP_TOOL_CALL="mcp_tool_call",$.PROCESSOR_RUN="processor_run",$.TOOL_CALL="tool_call",$.WORKFLOW_RUN="workflow_run",$.WORKFLOW_STEP="workflow_step",$.WORKFLOW_CONDITIONAL="workflow_conditional",$.WORKFLOW_CONDITIONAL_EVAL="workflow_conditional_eval",$.WORKFLOW_PARALLEL="workflow_parallel",$.WORKFLOW_LOOP="workflow_loop",$.WORKFLOW_SLEEP="workflow_sleep",$.WORKFLOW_WAIT_EVENT="workflow_wait_event",$.MEMORY_OPERATION="memory_operation",$.WORKSPACE_ACTION="workspace_action",$.RAG_INGESTION="rag_ingestion",$.RAG_EMBEDDING="rag_embedding",$.RAG_VECTOR_OPERATION="rag_vector_operation",$.RAG_ACTION="rag_action",$.GRAPH_ACTION="graph_action",$.MAPPING="mapping",$})(bz||{})});function kS0(){return yO8?.()}function vS0($,Y){if(Y!==void 0)return[...Y];if($)return Object.keys($);return}async function DQ($){if(Qr1)return Qr1($);let{span:Y,fn:X}=$;if(Y?.executeInContext)return Y.executeInContext(X);return X()}function jO($){if(Wr1)return Wr1($);let{span:Y,fn:X}=$;if(Y?.executeInContextSync)return Y.executeInContextSync(X);return X()}function wW($){let{type:Y,attributes:X,tracingContext:G,requestContext:J,tracingOptions:Q,...W}=$,K={...W.metadata??{},...Q?.metadata??{}};if(G?.currentSpan)return G.currentSpan.createChildSpan({type:Y,attributes:X,...W,metadata:K,requestContext:J});return $.mastra?.observability?.getSelectedInstance({requestContext:J})?.startSpan({type:Y,attributes:X,...W,metadata:K,requestContext:J,tracingOptions:Q,traceId:Q?.traceId,parentSpanId:Q?.parentSpanId,customSamplerOptions:{requestContext:J,metadata:K}})}function xS0($){if(!$?.isValid)return;let Y=$,X=$.isInternal?void 0:$;while(Y?.parent)if(Y=Y.parent,!Y.isInternal)X=Y;return X}var pl5,yO8,Qr1,Wr1;var TO=V0(()=>{hz();pl5=new Set(Object.values(J6))});function Ur1($){let Y=$.currentSpan;return Y?.observabilityInstance?.getLoggerContext?.(Y)??Kr1}function Hr1($){let Y=$.currentSpan;return Y?.observabilityInstance?.getMetricsContext?.(Y)??Zr1}function g4($){let Y=$??yS0;return{tracing:Y,loggerVNext:Ur1(Y),metrics:Hr1(Y),tracingContext:Y}}function e1($){let Y=$.tracing??$.tracingContext??yS0;return{tracing:Y,loggerVNext:$.loggerVNext??Ur1(Y),metrics:$.metrics??Hr1(Y),tracingContext:Y}}function B60($){return $.constructor.name==="NoOpSpan"||$.__isNoOp===!0}function uO8($){let Y=zr1.every((G)=>typeof $?.[G]==="function"),X=Vr1.every((G)=>typeof $?.[G]==="function");return Y&&X}function Sf($,Y){if(!Y.currentSpan||B60(Y.currentSpan))return $;if(!uO8($))return $;try{return new Proxy($,{get(X,G){try{if(zr1.includes(G))return(...Q)=>{let W=X[G](...Q);return pO8(W,Y)};if(Vr1.includes(G))return(...Q)=>{let W=X[G](...Q);return dO8(W,Y)};let J=X[G];return typeof J==="function"?J.bind(X):J}catch(J){console.warn("Tracing: Failed to wrap method, falling back to original",J);let Q=X[G];return typeof Q==="function"?Q.bind(X):Q}}})}catch(X){return console.warn("Tracing: Failed to create proxy, using original Mastra instance",X),$}}function pO8($,Y){if(!Y.currentSpan||B60(Y.currentSpan))return $;try{return new Proxy($,{get(X,G){try{if(gO8.includes(G))return(Q,W={})=>{return X[G](Q,{...W,...g4(Y)})};let J=X[G];return typeof J==="function"?J.bind(X):J}catch(J){console.warn("Tracing: Failed to wrap agent method, falling back to original",J);let Q=X[G];return typeof Q==="function"?Q.bind(X):Q}}})}catch(X){return console.warn("Tracing: Failed to create agent proxy, using original instance",X),$}}function dO8($,Y){if(!Y.currentSpan||B60(Y.currentSpan))return $;try{return new Proxy($,{get(X,G){try{if(mO8.includes(G)){if(G==="createRun"||G==="createRun")return async(Q={})=>{let W=await X[G](Q);return W?cO8(W,Y):W};return(Q,W={})=>{return X[G](Q,{...W,...g4(Y)})}}let J=X[G];return typeof J==="function"?J.bind(X):J}catch(J){console.warn("Tracing: Failed to wrap workflow method, falling back to original",J);let Q=X[G];return typeof Q==="function"?Q.bind(X):Q}}})}catch(X){return console.warn("Tracing: Failed to create workflow proxy, using original instance",X),$}}function cO8($,Y){if(!Y.currentSpan||B60(Y.currentSpan))return $;try{return new Proxy($,{get(X,G){try{if(G==="start")return(Q={})=>{return X.start({...Q,...g4(Q.tracingContext??Y)})};let J=X[G];return typeof J==="function"?J.bind(X):J}catch(J){console.warn("Tracing: Failed to wrap run method, falling back to original",J);let Q=X[G];return typeof Q==="function"?Q.bind(X):Q}}})}catch(X){return console.warn("Tracing: Failed to create run proxy, using original instance",X),$}}var bO8,hO8,fO8,yS0,Kr1,Zr1,zr1,gO8,Vr1,mO8;var n_=V0(()=>{bO8={add(){}},hO8={set(){}},fO8={record(){}},yS0={currentSpan:void 0},Kr1={debug(){},info(){},warn(){},error(){},fatal(){}},Zr1={emit(){},counter(){return bO8},gauge(){return hO8},histogram(){return fO8}};zr1=["getAgent","getAgentById"],gO8=["generate","stream","generateLegacy","streamLegacy"],Vr1=["getWorkflow","getWorkflowById"],mO8=["execute","createRun","createRun"]});function O60($){if(!$)return;if("transformToolPayload"in $)return $;if("projectToolPayload"in $&&$.projectToolPayload)return{transformToolPayload:$.projectToolPayload,targets:$.targets};return}function Lr1($,Y){return Boolean($?.transformToolPayload&&(!$.targets||$.targets.includes(Y)))}function iO8($,Y){return Boolean(Lr1($?.policy,Y)||$?.toolTransform?.[Y])}function nO8($,Y,X){return $?.toolTransform?.[Y]?.[lO8[X]]}function bS0($){return{message:`Tool ${$.phase} payload unavailable`}}async function Fr1($,Y,X){if(!iO8(Y,$.target))return;let J=[Lr1(Y?.policy,$.target)?Y?.policy?.transformToolPayload:void 0,nO8(Y,$.target,$.phase)].filter(Boolean);if(J.length===0)return $.phase==="input-delta"?{suppress:!0}:{transformed:bS0($)};for(let Q of J)try{let W=await Q($);if(W!==void 0)return{transformed:W}}catch(W){return X?.warn?.("Tool payload transform failed",{toolName:$.toolName,toolCallId:$.toolCallId,target:$.target,phase:$.phase,error:W}),$.phase==="input-delta"?{suppress:!0,failed:!0}:{transformed:bS0($),failed:!0}}return $.phase==="input-delta"?{suppress:!0}:{transformed:bS0($)}}async function NQ($,Y,X){let G=await Fr1({...$,target:"display"},Y,X),J=await Fr1({...$,target:"transcript"},Y,X);if(!G&&!J)return;return{...G?{display:{[$.phase]:G}}:{},...J?{transcript:{[$.phase]:J}}:{}}}function uY($,Y,X){let G=$?.mastra,J=G?.toolPayloadTransform?.[Y]?.[X]??G?.toolPayloadProjection?.[Y]?.[X];if(J&&Object.prototype.hasOwnProperty.call(J,"projected")&&!Object.prototype.hasOwnProperty.call(J,"transformed")){let{projected:Q,...W}=J;return{...W,transformed:Q}}return J}function f7($){return Boolean($&&Object.prototype.hasOwnProperty.call($,"transformed"))}function Dr1($,Y){if(!$)return Y;if(!Y)return $;return{display:{...$.display??{},...Y.display??{}},transcript:{...$.transcript??{},...Y.transcript??{}}}}function n2($,Y){let X=Y?.mastra?.toolPayloadTransform;if(!X)return $;return{...$??{},mastra:{...$?.mastra??{},toolPayloadTransform:Dr1($?.mastra?.toolPayloadTransform,X)}}}function RZ($,Y){if(!Y)return $;return{...$,metadata:{...$.metadata??{},mastra:{...$.metadata?.mastra??{},toolPayloadTransform:Dr1($.metadata?.mastra?.toolPayloadTransform,Y)}}}}var lO8;var hS0=V0(()=>{lO8={"input-delta":"inputDelta","input-available":"input","output-available":"output",error:"error",approval:"approval",suspend:"suspend",resume:"resume"}});function Pa1($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function fS0($){}function QE8($){if(typeof $=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:Y=fS0,onError:X=fS0,onRetry:G=fS0,onComment:J}=$,Q=[],W=!0,K,Z="",H=0,z;function V(B){if(W&&(W=!1,B.charCodeAt(0)===239&&B.charCodeAt(1)===187&&B.charCodeAt(2)===191&&(B=B.slice(3))),Q.length===0){let M=F(B);M!==""&&Q.push(M);return}if(B.indexOf(`
`)===-1&&B.indexOf("\r")===-1){Q.push(B);return}Q.push(B);let O=Q.join("");Q.length=0;let E=F(O);E!==""&&Q.push(E)}function F(B){let O=0;if(B.indexOf("\r")===-1){let E=B.indexOf(`
`,O);for(;E!==-1;){if(O===E){H>0&&Y({id:K,event:z,data:Z}),K=void 0,Z="",H=0,z=void 0,O=E+1,E=B.indexOf(`
`,O);continue}let M=B.charCodeAt(O);if(xr1(B,O,M)){let R=B.charCodeAt(O+5)===IO?O+6:O+5,q=B.slice(R,E);if(H===0&&B.charCodeAt(E+1)===vr1){Y({id:K,event:z,data:q}),K=void 0,Z="",z=void 0,O=E+2,E=B.indexOf(`
`,O);continue}Z=H===0?q:`${Z}
${q}`,H++}else yr1(B,O,M)?z=B.slice(B.charCodeAt(O+6)===IO?O+7:O+6,E)||void 0:L(B,O,E);O=E+1,E=B.indexOf(`
`,O)}return B.slice(O)}for(;O<B.length;){let E=B.indexOf("\r",O),M=B.indexOf(`
`,O),R=-1;if(E!==-1&&M!==-1?R=E<M?E:M:E!==-1?E===B.length-1?R=-1:R=E:M!==-1&&(R=M),R===-1)break;L(B,O,R),O=R+1,B.charCodeAt(O-1)===JE8&&B.charCodeAt(O)===vr1&&O++}return B.slice(O)}function L(B,O,E){if(O===E){D();return}let M=B.charCodeAt(O);if(xr1(B,O,M)){let j=B.charCodeAt(O+5)===IO?O+6:O+5,C=B.slice(j,E);Z=H===0?C:`${Z}
${C}`,H++;return}if(yr1(B,O,M)){z=B.slice(B.charCodeAt(O+6)===IO?O+7:O+6,E)||void 0;return}if(M===105&&B.charCodeAt(O+1)===100&&B.charCodeAt(O+2)===58){let j=B.slice(B.charCodeAt(O+3)===IO?O+4:O+3,E);K=j.includes("\x00")?void 0:j;return}if(M===58){if(J){let j=B.slice(O,E);J(j.slice(B.charCodeAt(O+1)===IO?2:1))}return}let R=B.slice(O,E),q=R.indexOf(":");if(q===-1){N(R,"",R);return}let _=R.slice(0,q),P=R.charCodeAt(q+1)===IO?2:1,w=R.slice(q+P);N(_,w,R)}function N(B,O,E){switch(B){case"event":z=O||void 0;break;case"data":Z=H===0?O:`${Z}
${O}`,H++;break;case"id":K=O.includes("\x00")?void 0:O;break;case"retry":/^\d+$/.test(O)?G(parseInt(O,10)):X(new kr1(`Invalid \`retry\` value: "${O}"`,{type:"invalid-retry",value:O,line:E}));break;default:X(new kr1(`Unknown field "${B.length>20?`${B.slice(0,20)}\u2026`:B}"`,{type:"unknown-field",field:B,value:O,line:E}));break}}function D(){H>0&&Y({id:K,event:z,data:Z}),K=void 0,Z="",H=0,z=void 0}function A(B={}){if(B.consume&&Q.length>0){let O=Q.join("");L(O,0,O.length)}W=!0,K=void 0,Z="",H=0,z=void 0,Q.length=0}return{feed:V,reset:A}}function xr1($,Y,X){return X===100&&$.charCodeAt(Y+1)===97&&$.charCodeAt(Y+2)===116&&$.charCodeAt(Y+3)===97&&$.charCodeAt(Y+4)===58}function yr1($,Y,X){return X===101&&$.charCodeAt(Y+1)===118&&$.charCodeAt(Y+2)===101&&$.charCodeAt(Y+3)===110&&$.charCodeAt(Y+4)===116&&$.charCodeAt(Y+5)===58}function r_(...$){return $.reduce((Y,X)=>({...Y,...X!=null?X:{}}),{})}function gf($){return Object.fromEntries([...$.headers])}function ya1($){let Y="";for(let X=0;X<$.length;X++)Y+=String.fromCodePoint($[X]);return KE8(Y)}function yf($){return($ instanceof Error||$ instanceof DOMException)&&($.name==="AbortError"||$.name==="ResponseAborted"||$.name==="TimeoutError")}function zE8($){if(!($ instanceof Error))return!1;let Y=$.code;if(typeof Y==="string"&&HE8.includes(Y))return!0;return!1}function fa1({error:$,url:Y,requestBodyValues:X}){if(yf($))return $;if($ instanceof TypeError&&UE8.includes($.message.toLowerCase())){let G=$.cause;if(G!=null)return new zY({message:`Cannot connect to API: ${G.message}`,cause:G,url:Y,requestBodyValues:X,isRetryable:!0})}if(zE8($))return new zY({message:`Cannot connect to API: ${$.message}`,cause:$,url:Y,requestBodyValues:X,isRetryable:!0});return $}function ga1($=globalThis){var Y,X,G;if($.window)return"runtime/browser";if((Y=$.navigator)==null?void 0:Y.userAgent)return`runtime/${$.navigator.userAgent.toLowerCase()}`;if((G=(X=$.process)==null?void 0:X.versions)==null?void 0:G.node)return`runtime/node.js/${$.process.version.substring(0)}`;if($.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function VE8($){if($==null)return{};let Y={};if($ instanceof Headers)$.forEach((X,G)=>{Y[G.toLowerCase()]=X});else{if(!Array.isArray($))$=Object.entries($);for(let[X,G]of $)if(G!=null)Y[X.toLowerCase()]=G}return Y}function rS0($,...Y){let X=new Headers(VE8($)),G=X.get("user-agent")||"";return X.set("user-agent",[G,...Y].filter(Boolean).join(" ")),Object.fromEntries(X.entries())}function vf({settingValue:$,environmentVariableName:Y}){if(typeof $==="string")return $;if($!=null||typeof process>"u")return;if($=process.env[Y],$==null||typeof $!=="string")return;return $}function fr1($){let Y=JSON.parse($);if(Y===null||typeof Y!=="object")return Y;if(LE8.test($)===!1&&DE8.test($)===!1)return Y;return NE8(Y)}function NE8($){let Y=[$];while(Y.length){let X=Y;Y=[];for(let G of X){if(Object.prototype.hasOwnProperty.call(G,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(G,"constructor")&&G.constructor!==null&&typeof G.constructor==="object"&&Object.prototype.hasOwnProperty.call(G.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let J in G){let Q=G[J];if(Q&&typeof Q==="object")Y.push(Q)}}}return $}function ua1($){let{stackTraceLimit:Y}=Error;try{Error.stackTraceLimit=0}catch(X){return fr1($)}try{return fr1($)}finally{Error.stackTraceLimit=Y}}function aS0($){if($.type==="object"||Array.isArray($.type)&&$.type.includes("object")){$.additionalProperties=!1;let{properties:X}=$;if(X!=null)for(let G of Object.keys(X))X[G]=CO(X[G])}if($.items!=null)$.items=Array.isArray($.items)?$.items.map(CO):CO($.items);if($.anyOf!=null)$.anyOf=$.anyOf.map(CO);if($.allOf!=null)$.allOf=$.allOf.map(CO);if($.oneOf!=null)$.oneOf=$.oneOf.map(CO);let{definitions:Y}=$;if(Y!=null)for(let X of Object.keys(Y))Y[X]=CO(Y[X]);return $}function CO($){if(typeof $==="boolean")return $;return aS0($)}function jW(){return{}}function OE8($,Y){var X,G,J;let Q={type:"array"};if(((X=$.type)==null?void 0:X._def)&&((J=(G=$.type)==null?void 0:G._def)==null?void 0:J.typeName)!==U0.ZodAny)Q.items=c9($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)Q.minItems=$.minLength.value;if($.maxLength)Q.maxItems=$.maxLength.value;if($.exactLength)Q.minItems=$.exactLength.value,Q.maxItems=$.exactLength.value;return Q}function EE8($){let Y={type:"integer",format:"int64"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function ME8(){return{type:"boolean"}}function pa1($,Y){return c9($.type._def,Y)}function da1($,Y,X){let G=X!=null?X:Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>da1($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return qE8($)}}function PE8($,Y){return{...c9($.innerType._def,Y),default:$.defaultValue()}}function wE8($,Y){return Y.effectStrategy==="input"?c9($.schema._def,Y):jW()}function _E8($){return{type:"string",enum:Array.from($.values)}}function TE8($,Y){let X=[c9($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),c9($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((J)=>!!J),G=[];return X.forEach((J)=>{if(jE8(J))G.push(...J.allOf);else{let Q=J;if("additionalProperties"in J&&J.additionalProperties===!1){let{additionalProperties:W,...K}=J;Q=K}G.push(Q)}}),G.length?{allOf:G}:void 0}function IE8($){let Y=typeof $.value;if(Y!=="bigint"&&Y!=="number"&&Y!=="boolean"&&Y!=="string")return{type:Array.isArray($.value)?"array":"object"};return{type:Y==="bigint"?"integer":Y,const:$.value}}function ca1($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value;break;case"max":X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"email":switch(Y.emailStrategy){case"format:email":PZ(X,"email",G.message,Y);break;case"format:idn-email":PZ(X,"idn-email",G.message,Y);break;case"pattern:zod":oG(X,qZ.email,G.message,Y);break}break;case"url":PZ(X,"uri",G.message,Y);break;case"uuid":PZ(X,"uuid",G.message,Y);break;case"regex":oG(X,G.regex,G.message,Y);break;case"cuid":oG(X,qZ.cuid,G.message,Y);break;case"cuid2":oG(X,qZ.cuid2,G.message,Y);break;case"startsWith":oG(X,RegExp(`^${mS0(G.value,Y)}`),G.message,Y);break;case"endsWith":oG(X,RegExp(`${mS0(G.value,Y)}$`),G.message,Y);break;case"datetime":PZ(X,"date-time",G.message,Y);break;case"date":PZ(X,"date",G.message,Y);break;case"time":PZ(X,"time",G.message,Y);break;case"duration":PZ(X,"duration",G.message,Y);break;case"length":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"includes":{oG(X,RegExp(mS0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")PZ(X,"ipv4",G.message,Y);if(G.version!=="v4")PZ(X,"ipv6",G.message,Y);break}case"base64url":oG(X,qZ.base64url,G.message,Y);break;case"jwt":oG(X,qZ.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")oG(X,qZ.ipv4Cidr,G.message,Y);if(G.version!=="v4")oG(X,qZ.ipv6Cidr,G.message,Y);break}case"emoji":oG(X,qZ.emoji(),G.message,Y);break;case"ulid":{oG(X,qZ.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{PZ(X,"binary",G.message,Y);break}case"contentEncoding:base64":{X.contentEncoding="base64";break}case"pattern:zod":{oG(X,qZ.base64,G.message,Y);break}}break}case"nanoid":oG(X,qZ.nanoid,G.message,Y)}return X}function mS0($,Y){return Y.patternStrategy==="escape"?SE8($):$}function SE8($){let Y="";for(let X=0;X<$.length;X++){if(!CE8.has($[X]))Y+="\\";Y+=$[X]}return Y}function PZ($,Y,X,G){var J;if($.format||((J=$.anyOf)==null?void 0:J.some((Q)=>Q.format))){if(!$.anyOf)$.anyOf=[];if($.format)$.anyOf.push({format:$.format}),delete $.format;$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else $.format=Y}function oG($,Y,X,G){var J;if($.pattern||((J=$.allOf)==null?void 0:J.some((Q)=>Q.pattern))){if(!$.allOf)$.allOf=[];if($.pattern)$.allOf.push({pattern:$.pattern}),delete $.pattern;$.allOf.push({pattern:mr1(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else $.pattern=mr1(Y,G)}function mr1($,Y){var X;if(!Y.applyRegexFlags||!$.flags)return $.source;let G={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},J=G.i?$.source.toLowerCase():$.source,Q="",W=!1,K=!1,Z=!1;for(let H=0;H<J.length;H++){if(W){Q+=J[H],W=!1;continue}if(G.i){if(K){if(J[H].match(/[a-z]/)){if(Z)Q+=J[H],Q+=`${J[H-2]}-${J[H]}`.toUpperCase(),Z=!1;else if(J[H+1]==="-"&&((X=J[H+2])==null?void 0:X.match(/[a-z]/)))Q+=J[H],Z=!0;else Q+=`${J[H]}${J[H].toUpperCase()}`;continue}}else if(J[H].match(/[a-z]/)){Q+=`[${J[H]}${J[H].toUpperCase()}]`;continue}}if(G.m){if(J[H]==="^"){Q+=`(^|(?<=[\r
]))`;continue}else if(J[H]==="$"){Q+=`($|(?=[\r
]))`;continue}}if(G.s&&J[H]==="."){Q+=K?`${J[H]}\r
`:`[${J[H]}\r
]`;continue}if(Q+=J[H],J[H]==="\\")W=!0;else if(K&&J[H]==="]")K=!1;else if(!K&&J[H]==="[")K=!0}return Q}function la1($,Y){var X,G,J,Q,W,K;let Z={type:"object",additionalProperties:(X=c9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]}))!=null?X:Y.allowedAdditionalProperties};if(((G=$.keyType)==null?void 0:G._def.typeName)===U0.ZodString&&((J=$.keyType._def.checks)==null?void 0:J.length)){let{type:H,...z}=ca1($.keyType._def,Y);return{...Z,propertyNames:z}}else if(((Q=$.keyType)==null?void 0:Q._def.typeName)===U0.ZodEnum)return{...Z,propertyNames:{enum:$.keyType._def.values}};else if(((W=$.keyType)==null?void 0:W._def.typeName)===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&((K=$.keyType._def.type._def.checks)==null?void 0:K.length)){let{type:H,...z}=pa1($.keyType._def,Y);return{...Z,propertyNames:z}}return Z}function kE8($,Y){if(Y.mapStrategy==="record")return la1($,Y);let X=c9($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||jW(),G=c9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||jW();return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function vE8($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function xE8(){return{not:jW()}}function yE8(){return{type:"null"}}function bE8($,Y){let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in lS0)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=lS0[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,K)=>K.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return hE8($,Y)}function fE8($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length))return{type:[lS0[$.innerType._def.typeName],"null"]};let X=c9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function gE8($){let Y={type:"number"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"int":Y.type="integer";break;case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function mE8($,Y){let X={type:"object",properties:{}},G=[],J=$.shape();for(let W in J){let K=J[W];if(K===void 0||K._def===void 0)continue;let Z=pE8(K),H=c9(K._def,{...Y,currentPath:[...Y.currentPath,"properties",W],propertyPath:[...Y.currentPath,"properties",W]});if(H===void 0)continue;if(X.properties[W]=H,!Z)G.push(W)}if(G.length)X.required=G;let Q=uE8($,Y);if(Q!==void 0)X.additionalProperties=Q;return X}function uE8($,Y){if($.catchall._def.typeName!=="ZodNever")return c9($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function pE8($){try{return $.isOptional()}catch(Y){return!0}}function lE8($,Y){return c9($.type._def,Y)}function iE8($,Y){let G={type:"array",uniqueItems:!0,items:c9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)G.minItems=$.minSize.value;if($.maxSize)G.maxItems=$.maxSize.value;return G}function nE8($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>c9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:c9($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>c9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function rE8(){return{not:jW()}}function aE8(){return jW()}function c9($,Y,X=!1){var G;let J=Y.seen.get($);if(Y.override){let Z=(G=Y.override)==null?void 0:G.call(Y,$,Y,J,X);if(Z!==AE8)return Z}if(J&&!X){let Z=eE8(J,Y);if(Z!==void 0)return Z}let Q={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,Q);let W=oE8($,$.typeName,Y),K=typeof W==="function"?c9(W(),Y):W;if(K)$M8($,Y,K);if(Y.postProcess){let Z=Y.postProcess(K,$,Y);return Q.jsonSchema=K,Z}return Q.jsonSchema=K,K}function TW($){let Y;return()=>{if(Y==null)Y=$();return Y}}function q60($,{validate:Y}={}){return{[iS0]:!0,_type:void 0,get jsonSchema(){if(typeof $==="function")$=$();return $},validate:Y}}function GM8($){return typeof $==="object"&&$!==null&&iS0 in $&&$[iS0]===!0&&"jsonSchema"in $&&"validate"in $}function sS0($){return $==null?q60({properties:{},additionalProperties:!1}):GM8($)?$:("~standard"in $)?$["~standard"].vendor==="zod"?BQ($):JM8($):$()}function JM8($){return q60(()=>aS0($["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async(Y)=>{let X=await $["~standard"].validate(Y);return"value"in X?{success:!0,value:X.value}:{success:!1,error:new kO({value:Y,cause:X.issues})}}})}function QM8($,Y){var X;let G=(X=void 0)!=null?X:!1;return q60(()=>XM8($,{$refStrategy:G?"root":"none"}),{validate:async(J)=>{let Q=await $.safeParseAsync(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function WM8($,Y){var X;let G=(X=void 0)!=null?X:!1;return q60(()=>aS0(e$($,{target:"draft-7",io:"input",reused:G?"ref":"inline"})),{validate:async(J)=>{let Q=await oX($,J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function KM8($){return"_zod"in $}function BQ($,Y){if(KM8($))return WM8($);else return QM8($)}async function ZM8({value:$,schema:Y,context:X}){let G=await rL({value:$,schema:Y,context:X});if(!G.success)throw kO.wrap({value:$,cause:G.error,context:X});return G.value}async function rL({value:$,schema:Y,context:X}){let G=sS0(Y);try{if(G.validate==null)return{success:!0,value:$,rawValue:$};let J=await G.validate($);if(J.success)return{success:!0,value:J.value,rawValue:$};return{success:!1,error:kO.wrap({value:$,cause:J.error,context:X}),rawValue:$}}catch(J){return{success:!1,error:kO.wrap({value:$,cause:J,context:X}),rawValue:$}}}async function UM8({text:$,schema:Y}){try{let X=ua1($);if(Y==null)return X;return ZM8({value:X,schema:Y})}catch(X){if(E60.isInstance(X)||kO.isInstance(X))throw X;throw new E60({text:$,cause:X})}}async function aL({text:$,schema:Y}){try{let X=ua1($);if(Y==null)return{success:!0,value:X,rawValue:X};return await rL({value:X,schema:Y})}catch(X){return{success:!1,error:E60.isInstance(X)?X:new E60({text:$,cause:X}),rawValue:void 0}}}function ia1({stream:$,schema:Y}){return $.pipeThrough(new TextDecoderStream).pipeThrough(new WE8).pipeThrough(new TransformStream({async transform({data:X},G){if(X==="[DONE]")return;G.enqueue(await aL({text:X,schema:Y}))}}))}function VM8($){return $}function na1({id:$,inputSchema:Y,outputSchema:X,supportsDeferredResults:G}){return({execute:J,needsApproval:Q,toModelOutput:W,onInputStart:K,onInputDelta:Z,onInputAvailable:H,...z})=>VM8({type:"provider",id:$,args:z,inputSchema:Y,outputSchema:X,execute:J,needsApproval:Q,toModelOutput:W,onInputStart:K,onInputDelta:Z,onInputAvailable:H,supportsDeferredResults:G})}async function pY($){if(typeof $==="function")$=$();return Promise.resolve($)}function LM8($){return $==null?void 0:$.replace(/\/$/,"")}function DM8(){return{headers:{}}}async function NM8(){if(process.env.VERCEL_OIDC_TOKEN)return process.env.VERCEL_OIDC_TOKEN??"";throw Error("@vercel/oidc is not available in the vendored @internal AI packages. Provide an API key instead.")}async function Za1({response:$,statusCode:Y,defaultMessage:X="Gateway request failed",cause:G,authMethod:J}){var Q;let W=await rL({value:$,schema:IM8});if(!W.success){let V=typeof $==="object"&&$!==null&&"generationId"in $?$.generationId:void 0;return new TM8({message:`Invalid error response format: ${X}`,statusCode:Y,response:$,validationError:W.error,cause:G,generationId:V})}let K=W.value,Z=K.error.type,H=K.error.message,z=(Q=K.generationId)!=null?Q:void 0;switch(Z){case"authentication_error":return aa1.createContextualError({apiKeyProvided:J==="api-key",oidcTokenProvided:J==="oidc",statusCode:Y,cause:G,generationId:z});case"invalid_request_error":return new EM8({message:H,statusCode:Y,cause:G,generationId:z});case"rate_limit_exceeded":return new RM8({message:H,statusCode:Y,cause:G,generationId:z});case"model_not_found":{let V=await rL({value:K.error.param,schema:PM8});return new wM8({message:H,statusCode:Y,modelId:V.success?V.value.modelId:void 0,cause:G,generationId:z})}case"internal_server_error":return new Ja1({message:H,statusCode:Y,cause:G,generationId:z});default:return new Ja1({message:H,statusCode:Y,cause:G,generationId:z})}}function CM8($){if($.data!==void 0)return $.data;if($.responseBody!=null)try{return JSON.parse($.responseBody)}catch(Y){return $.responseBody}return{}}function Fa1($){if(!($ instanceof Error))return!1;let Y=$.code;if(typeof Y==="string")return["UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_CONNECT_TIMEOUT"].includes(Y);return!1}async function AQ($,Y){var X;if(tG.isInstance($))return $;if(Fa1($))return Va1.createTimeoutError({originalMessage:$ instanceof Error?$.message:"Unknown error",cause:$});if(zY.isInstance($)){if($.cause&&Fa1($.cause))return Va1.createTimeoutError({originalMessage:$.message,cause:$});return await Za1({response:CM8($),statusCode:(X=$.statusCode)!=null?X:500,defaultMessage:"Gateway request failed",cause:$,authMethod:Y})}return await Za1({response:{},statusCode:500,defaultMessage:$ instanceof Error?`Gateway request failed: ${$.message}`:"Unknown Gateway error",cause:$,authMethod:Y})}async function q3($){let Y=await rL({value:$[Xs1],schema:kM8});return Y.success?Y.value:void 0}function Da1($){if($.type==="file"&&$.data instanceof Uint8Array)return{...$,data:ya1($.data)};return $}function aM8($){if($.type==="file"&&$.data instanceof Uint8Array)return{...$,data:ya1($.data)};return $}async function zR8(){var $;return($=DM8().headers)==null?void 0:$["x-vercel-id"]}function oS0($={}){var Y,X;let G=null,J=null,Q=(Y=$.metadataCacheRefreshMillis)!=null?Y:300000,W=0,K=(X=LM8($.baseURL))!=null?X:"https://ai-gateway.vercel.sh/v3/ai",Z=async()=>{try{let O=await LR8($);return rS0({Authorization:`Bearer ${O.token}`,"ai-gateway-protocol-version":FR8,[Xs1]:O.authMethod,...$.headers},`ai-sdk/gateway/${VR8}`)}catch(O){throw aa1.createContextualError({apiKeyProvided:!1,oidcTokenProvided:!1,statusCode:401,cause:O})}},H=()=>{let O=vf({settingValue:void 0,environmentVariableName:"VERCEL_DEPLOYMENT_ID"}),E=vf({settingValue:void 0,environmentVariableName:"VERCEL_ENV"}),M=vf({settingValue:void 0,environmentVariableName:"VERCEL_REGION"}),R=vf({settingValue:void 0,environmentVariableName:"VERCEL_PROJECT_ID"});return async()=>{let q=await zR8();return{...O&&{"ai-o11y-deployment-id":O},...E&&{"ai-o11y-environment":E},...M&&{"ai-o11y-region":M},...q&&{"ai-o11y-request-id":q},...R&&{"ai-o11y-project-id":R}}}},z=(O)=>{return new mM8(O,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})},V=async()=>{var O,E,M;let R=(M=(E=(O=$._internal)==null?void 0:O.currentDate)==null?void 0:E.call(O).getTime())!=null?M:Date.now();if(!G||R-W>Q)W=R,G=new La1({baseURL:K,headers:Z,fetch:$.fetch}).getAvailableModels().then((q)=>{return J=q,q}).catch(async(q)=>{throw await AQ(q,await q3(await Z()))});return J?Promise.resolve(J):G},F=async()=>{return new La1({baseURL:K,headers:Z,fetch:$.fetch}).getCredits().catch(async(O)=>{throw await AQ(O,await q3(await Z()))})},L=async(O)=>{return new bM8({baseURL:K,headers:Z,fetch:$.fetch}).getSpendReport(O).catch(async(E)=>{throw await AQ(E,await q3(await Z()))})},N=async(O)=>{return new fM8({baseURL:K,headers:Z,fetch:$.fetch}).getGenerationInfo(O).catch(async(E)=>{throw await AQ(E,await q3(await Z()))})},D=function(O){if(new.target)throw Error("The Gateway Provider model function cannot be called with the new keyword.");return z(O)};D.specificationVersion="v3",D.getAvailableModels=V,D.getCredits=F,D.getSpendReport=L,D.getGenerationInfo=N,D.imageModel=(O)=>{return new dM8(O,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})},D.languageModel=z;let A=(O)=>{return new uM8(O,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})};D.embeddingModel=A,D.textEmbeddingModel=A,D.videoModel=(O)=>{return new rM8(O,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})};let B=(O)=>{return new $R8(O,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})};return D.rerankingModel=B,D.reranking=B,D.chat=D.languageModel,D.embedding=D.embeddingModel,D.image=D.imageModel,D.video=D.videoModel,D.tools=HR8,D}async function LR8($){let Y=vf({settingValue:$.apiKey,environmentVariableName:"AI_GATEWAY_API_KEY"});if(Y)return{token:Y,authMethod:"api-key"};return{token:await NM8(),authMethod:"oidc"}}function NR8($){var Y=new Set([$]),X=new Set,G=$.match(Na1);if(!G)return function(){return!1};var J={major:+G[1],minor:+G[2],patch:+G[3],prerelease:G[4]};if(J.prerelease!=null)return function(Z){return Z===$};function Q(K){return X.add(K),!1}function W(K){return Y.add(K),!0}return function(Z){if(Y.has(Z))return!0;if(X.has(Z))return!1;var H=Z.match(Na1);if(!H)return Q(Z);var z={major:+H[1],minor:+H[2],patch:+H[3],prerelease:H[4]};if(z.prerelease!=null)return Q(Z);if(J.major!==z.major)return Q(Z);if(J.major===0){if(J.minor===z.minor&&J.patch<=z.patch)return W(Z);return Q(Z)}if(J.minor<=z.minor)return W(Z);return Q(Z)}}function tS0($,Y,X,G){var J;if(G===void 0)G=!1;var Q=hf[bf]=(J=hf[bf])!==null&&J!==void 0?J:{version:SO};if(!G&&Q[$]){var W=Error("@opentelemetry/api: Attempted duplicate registration of API: "+$);return X.error(W.stack||W.message),!1}if(Q.version!==SO){var W=Error("@opentelemetry/api: Registration of version v"+Q.version+" for "+$+" does not match previously registered API v"+SO);return X.error(W.stack||W.message),!1}return Q[$]=Y,X.debug("@opentelemetry/api: Registered a global for "+$+" v"+SO+"."),!0}function ff($){var Y,X,G=(Y=hf[bf])===null||Y===void 0?void 0:Y.version;if(!G||!AR8(G))return;return(X=hf[bf])===null||X===void 0?void 0:X[$]}function eS0($,Y){Y.debug("@opentelemetry/api: Unregistering a global for "+$+" v"+SO+".");var X=hf[bf];if(X)delete X[$]}function kf($,Y,X){var G=ff("diag");if(!G)return;return X.unshift(Y),G[$].apply(G,ER8([],OR8(X),!1))}function RR8($,Y){if($<_W.NONE)$=_W.NONE;else if($>_W.ALL)$=_W.ALL;Y=Y||{};function X(G,J){var Q=Y[G];if(typeof Q==="function"&&$>=J)return Q.bind(Y);return function(){}}return{error:X("error",_W.ERROR),warn:X("warn",_W.WARN),info:X("info",_W.INFO),debug:X("debug",_W.DEBUG),verbose:X("verbose",_W.VERBOSE)}}function _R8($){return Symbol.for($)}function Xk0($){return $.getValue(Yk0)||void 0}function bR8(){return Xk0($k0.getInstance().active())}function Gk0($,Y){return $.setValue(Yk0,Y)}function hR8($){return $.deleteValue(Yk0)}function fR8($,Y){return Gk0($,new xf(Y))}function Qs1($){var Y;return(Y=Xk0($))===null||Y===void 0?void 0:Y.spanContext()}function uR8($){return gR8.test($)&&$!==Js1}function pR8($){return mR8.test($)&&$!==Gs1}function Ws1($){return uR8($.traceId)&&pR8($.spanId)}function dR8($){return new xf($)}function cR8($){return typeof $==="object"&&typeof $.spanId==="string"&&typeof $.traceId==="string"&&typeof $.traceFlags==="number"}function $P8($){let Y=["ROOT"],X=-1,G=null;function J(Z,H,z){switch(Z){case'"':{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_STRING");break}case"f":case"t":case"n":{X=H,G=H,Y.pop(),Y.push(z),Y.push("INSIDE_LITERAL");break}case"-":{Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"{":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_OBJECT_START");break}case"[":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_ARRAY_START");break}}}function Q(Z,H){switch(Z){case",":{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{X=H,Y.pop();break}}}function W(Z,H){switch(Z){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=H,Y.pop();break}}}for(let Z=0;Z<$.length;Z++){let H=$[Z];switch(Y[Y.length-1]){case"ROOT":J(H,Z,"FINISH");break;case"INSIDE_OBJECT_START":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}case"}":{X=Z,Y.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(H){case":":{Y.pop(),Y.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{J(H,Z,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{Q(H,Z);break}case"INSIDE_STRING":{switch(H){case'"':{Y.pop(),X=Z;break}case"\\":{Y.push("INSIDE_STRING_ESCAPE");break}default:X=Z}break}case"INSIDE_ARRAY_START":{switch(H){case"]":{X=Z,Y.pop();break}default:{X=Z,J(H,Z,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(H){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=Z,Y.pop();break}default:{X=Z;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{J(H,Z,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{Y.pop(),X=Z;break}case"INSIDE_NUMBER":{switch(H){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=Z;break}case"e":case"E":case"-":case".":break;case",":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z);if(Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);break}case"}":{if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);break}case"]":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z);break}default:{Y.pop();break}}break}case"INSIDE_LITERAL":{let V=$.substring(G,Z+1);if(!"false".startsWith(V)&&!"true".startsWith(V)&&!"null".startsWith(V)){if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);else if(Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z)}else X=Z;break}}}let K=$.slice(0,X+1);for(let Z=Y.length-1;Z>=0;Z--)switch(Y[Z]){case"INSIDE_STRING":{K+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{K+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{K+="]";break}case"INSIDE_LITERAL":{let z=$.substring(G,$.length);if("true".startsWith(z))K+="true".slice(z.length);else if("false".startsWith(z))K+="false".slice(z.length);else if("null".startsWith(z))K+="null".slice(z.length)}}return K}async function P60($){if($===void 0)return{value:void 0,state:"undefined-input"};let Y=await aL({text:$});if(Y.success)return{value:Y.value,state:"successful-parse"};if(Y=await aL({text:$P8($)}),Y.success)return{value:Y.value,state:"repaired-parse"};return{value:void 0,state:"failed-parse"}}function WP8($){return $.type.startsWith("tool-")}function KP8($){return $.type==="dynamic-tool"}function Jk0($){return WP8($)||KP8($)}var Oa1="vercel.ai.error",rO8,Nr1,Ar1,dY,Ea1="AI_APICallError",Ma1,aO8,Br1,Or1,zY,Ra1="AI_EmptyResponseBodyError",qa1,sO8,Er1,Mr1,oO8,wa1="AI_InvalidArgumentError",_a1,tO8,Rr1,qr1,eO8,ja1="AI_InvalidPromptError",Ta1,$E8,Pr1,wr1,al5,Ia1="AI_JSONParseError",Ca1,YE8,_r1,jr1,E60,Sa1="AI_TypeValidationError",ka1,XE8,Tr1,Ir1,kO,va1="AI_UnsupportedFunctionalityError",xa1,GE8,Cr1,Sr1,sl5,kr1,vr1=10,JE8=13,IO=32,WE8,KE8,ol5,ba1="AI_DownloadError",ha1,ZE8,br1,hr1,tl5,mf=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=()=>{let Q=X.length,W=Array(Y);for(let K=0;K<Y;K++)W[K]=X[Math.random()*Q|0];return W.join("")};if($==null)return J;if(X.includes(G))throw new eO8({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return()=>`${$}${G}${J()}`},UE8,HE8,ma1="4.0.27",FE8=()=>globalThis.fetch,M60=async({url:$,headers:Y={},successfulResponseHandler:X,failedResponseHandler:G,abortSignal:J,fetch:Q=FE8()})=>{try{let W=await Q($,{method:"GET",headers:rS0(Y,`ai-sdk/provider-utils/${ma1}`,ga1()),signal:J}),K=gf(W);if(!W.ok){let Z;try{Z=await G({response:W,url:$,requestBodyValues:{}})}catch(H){if(yf(H)||zY.isInstance(H))throw H;throw new zY({message:"Failed to process error response",cause:H,statusCode:W.status,url:$,responseHeaders:K,requestBodyValues:{}})}throw Z.value}try{return await X({response:W,url:$,requestBodyValues:{}})}catch(Z){if(Z instanceof Error){if(yf(Z)||zY.isInstance(Z))throw Z}throw new zY({message:"Failed to process successful response",cause:Z,statusCode:W.status,url:$,responseHeaders:K,requestBodyValues:{}})}}catch(W){throw fa1({error:W,url:$,requestBodyValues:{}})}},LE8,DE8,AE8,gr1,BE8=($)=>typeof $==="string"?{...gr1,name:$}:{...gr1,...$},RE8=($,Y)=>{return c9($.innerType._def,Y)},qE8=($)=>{let Y={type:"integer",format:"unix-time"};for(let X of $.checks)switch(X.kind){case"min":Y.minimum=X.value;break;case"max":Y.maximum=X.value;break}return Y},jE8=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $},gS0=void 0,qZ,CE8,lS0,hE8=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>c9(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0},dE8=($,Y)=>{var X;if(Y.currentPath.toString()===((X=Y.propertyPath)==null?void 0:X.toString()))return c9($.innerType._def,Y);let G=c9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return G?{anyOf:[{not:jW()},G]}:jW()},cE8=($,Y)=>{if(Y.pipeStrategy==="input")return c9($.in._def,Y);else if(Y.pipeStrategy==="output")return c9($.out._def,Y);let X=c9($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=c9($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}},sE8=($,Y)=>{return c9($.innerType._def,Y)},oE8=($,Y,X)=>{switch(Y){case U0.ZodString:return ca1($,X);case U0.ZodNumber:return gE8($);case U0.ZodObject:return mE8($,X);case U0.ZodBigInt:return EE8($);case U0.ZodBoolean:return ME8();case U0.ZodDate:return da1($,X);case U0.ZodUndefined:return rE8();case U0.ZodNull:return yE8();case U0.ZodArray:return OE8($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return bE8($,X);case U0.ZodIntersection:return TE8($,X);case U0.ZodTuple:return nE8($,X);case U0.ZodRecord:return la1($,X);case U0.ZodLiteral:return IE8($);case U0.ZodEnum:return _E8($);case U0.ZodNativeEnum:return vE8($);case U0.ZodNullable:return fE8($,X);case U0.ZodOptional:return dE8($,X);case U0.ZodMap:return kE8($,X);case U0.ZodSet:return iE8($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return lE8($,X);case U0.ZodNaN:case U0.ZodNever:return xE8();case U0.ZodEffects:return wE8($,X);case U0.ZodAny:return jW();case U0.ZodUnknown:return aE8();case U0.ZodDefault:return PE8($,X);case U0.ZodBranded:return pa1($,X);case U0.ZodReadonly:return sE8($,X);case U0.ZodCatch:return RE8($,X);case U0.ZodPipeline:return cE8($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})()}},tE8=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")},eE8=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:tE8(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),jW();return Y.$refStrategy==="seen"?jW():void 0}}},$M8=($,Y,X)=>{if($.description)X.description=$.description;return X},YM8=($)=>{let Y=BE8($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}},XM8=($,Y)=>{var X;let G=YM8(Y),J=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((H,[z,V])=>{var F;return{...H,[z]:(F=c9(V._def,{...G,currentPath:[...G.basePath,G.definitionPath,z]},!0))!=null?F:jW()}},{}):void 0,Q=typeof Y==="string"?Y:(Y==null?void 0:Y.nameStrategy)==="title"?void 0:Y==null?void 0:Y.name,W=(X=c9($._def,Q===void 0?G:{...G,currentPath:[...G.basePath,G.definitionPath,Q]},!1))!=null?X:jW(),K=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(K!==void 0)W.title=K;let Z=Q===void 0?J?{...W,[G.definitionPath]:J}:W:{$ref:[...G.$refStrategy==="relative"?[]:G.basePath,G.definitionPath,Q].join("/"),[G.definitionPath]:{...J,[Q]:W}};return Z.$schema="http://json-schema.org/draft-07/schema#",Z},iS0,HM8=()=>globalThis.fetch,a_=async({url:$,headers:Y,body:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>zM8({url:$,headers:{"Content-Type":"application/json",...Y},body:{content:JSON.stringify(X),values:X},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),zM8=async({url:$,headers:Y={},body:X,successfulResponseHandler:G,failedResponseHandler:J,abortSignal:Q,fetch:W=HM8()})=>{try{let K=await W($,{method:"POST",headers:rS0(Y,`ai-sdk/provider-utils/${ma1}`,ga1()),body:X.content,signal:Q}),Z=gf(K);if(!K.ok){let H;try{H=await J({response:K,url:$,requestBodyValues:X.values})}catch(z){if(yf(z)||zY.isInstance(z))throw z;throw new zY({message:"Failed to process error response",cause:z,statusCode:K.status,url:$,responseHeaders:Z,requestBodyValues:X.values})}throw H.value}try{return await G({response:K,url:$,requestBodyValues:X.values})}catch(H){if(H instanceof Error){if(yf(H)||zY.isInstance(H))throw H}throw new zY({message:"Failed to process successful response",cause:H,statusCode:K.status,url:$,responseHeaders:Z,requestBodyValues:X.values})}}catch(K){throw fa1({error:K,url:$,requestBodyValues:X.values})}},P3=({errorSchema:$,errorToMessage:Y,isRetryable:X})=>async({response:G,url:J,requestBodyValues:Q})=>{let W=await G.text(),K=gf(G);if(W.trim()==="")return{responseHeaders:K,value:new zY({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,isRetryable:X==null?void 0:X(G)})};try{let Z=await UM8({text:W,schema:$});return{responseHeaders:K,value:new zY({message:Y(Z),url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,data:Z,isRetryable:X==null?void 0:X(G,Z)})}}catch(Z){return{responseHeaders:K,value:new zY({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,isRetryable:X==null?void 0:X(G)})}}},FM8=($)=>async({response:Y})=>{let X=gf(Y);if(Y.body==null)throw new oO8({});return{responseHeaders:X,value:ia1({stream:Y.body,schema:$})}},sL=($)=>async({response:Y,url:X,requestBodyValues:G})=>{let J=await Y.text(),Q=await aL({text:J,schema:$}),W=gf(Y);if(!Q.success)throw new zY({message:"Invalid JSON response",cause:Q.error,statusCode:Y.status,responseHeaders:W,responseBody:J,url:X,requestBodyValues:G});return{responseHeaders:W,value:Q.value,rawValue:Q.rawValue}},AM8="vercel.ai.gateway.error",uS0,ur1,pr1,tG,ra1="GatewayAuthenticationError",BM8,dr1,cr1,lr1,aa1,sa1="GatewayInvalidRequestError",OM8,ir1,nr1,rr1,EM8,oa1="GatewayRateLimitError",MM8,ar1,sr1,or1,RM8,ta1="GatewayModelNotFoundError",qM8,tr1,PM8,er1,$a1,wM8,ea1="GatewayInternalServerError",_M8,Ya1,Xa1,Ga1,Ja1,$s1="GatewayResponseError",jM8,Qa1,Wa1,Ka1,TM8,IM8,Ys1="GatewayTimeoutError",SM8,Ua1,Ha1,za1,Va1,Xs1="ai-gateway-auth-method",kM8,vM8,La1=class{constructor($){this.config=$}async getAvailableModels(){try{let{value:$}=await M60({url:`${this.config.baseURL}/config`,headers:await pY(this.config.headers()),successfulResponseHandler:sL(xM8),failedResponseHandler:P3({errorSchema:U.any(),errorToMessage:(Y)=>Y}),fetch:this.config.fetch});return $}catch($){throw await AQ($)}}async getCredits(){try{let $=new URL(this.config.baseURL),{value:Y}=await M60({url:`${$.origin}/v1/credits`,headers:await pY(this.config.headers()),successfulResponseHandler:sL(yM8),failedResponseHandler:P3({errorSchema:U.any(),errorToMessage:(X)=>X}),fetch:this.config.fetch});return Y}catch($){throw await AQ($)}}},xM8,yM8,bM8=class{constructor($){this.config=$}async getSpendReport($){try{let Y=new URL(this.config.baseURL),X=new URLSearchParams;if(X.set("start_date",$.startDate),X.set("end_date",$.endDate),$.groupBy)X.set("group_by",$.groupBy);if($.datePart)X.set("date_part",$.datePart);if($.userId)X.set("user_id",$.userId);if($.model)X.set("model",$.model);if($.provider)X.set("provider",$.provider);if($.credentialType)X.set("credential_type",$.credentialType);if($.tags&&$.tags.length>0)X.set("tags",$.tags.join(","));let{value:G}=await M60({url:`${Y.origin}/v1/report?${X.toString()}`,headers:await pY(this.config.headers()),successfulResponseHandler:sL(hM8),failedResponseHandler:P3({errorSchema:U.any(),errorToMessage:(J)=>J}),fetch:this.config.fetch});return G}catch(Y){throw await AQ(Y)}}},hM8,fM8=class{constructor($){this.config=$}async getGenerationInfo($){try{let Y=new URL(this.config.baseURL),{value:X}=await M60({url:`${Y.origin}/v1/generation?id=${encodeURIComponent($.id)}`,headers:await pY(this.config.headers()),successfulResponseHandler:sL(gM8),failedResponseHandler:P3({errorSchema:U.any(),errorToMessage:(G)=>G}),fetch:this.config.fetch});return X}catch(Y){throw await AQ(Y)}}},gM8,mM8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.supportedUrls={"*/*":[/.*/]}}get provider(){return this.config.provider}async getArgs($){let{abortSignal:Y,...X}=$;return{args:this.maybeEncodeFileParts(X),warnings:[]}}async doGenerate($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await pY(this.config.headers());try{let{responseHeaders:Q,value:W,rawValue:K}=await a_({url:this.getUrl(),headers:r_(J,$.headers,this.getModelConfigHeaders(this.modelId,!1),await pY(this.config.o11yHeaders)),body:Y,successfulResponseHandler:sL(U.any()),failedResponseHandler:P3({errorSchema:U.any(),errorToMessage:(Z)=>Z}),...G&&{abortSignal:G},fetch:this.config.fetch});return{...W,request:{body:Y},response:{headers:Q,body:K},warnings:X}}catch(Q){throw await AQ(Q,await q3(J))}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await pY(this.config.headers());try{let{value:Q,responseHeaders:W}=await a_({url:this.getUrl(),headers:r_(J,$.headers,this.getModelConfigHeaders(this.modelId,!0),await pY(this.config.o11yHeaders)),body:Y,successfulResponseHandler:FM8(U.any()),failedResponseHandler:P3({errorSchema:U.any(),errorToMessage:(K)=>K}),...G&&{abortSignal:G},fetch:this.config.fetch});return{stream:Q.pipeThrough(new TransformStream({start(K){if(X.length>0)K.enqueue({type:"stream-start",warnings:X})},transform(K,Z){if(K.success){let H=K.value;if(H.type==="raw"&&!$.includeRawChunks)return;if(H.type==="response-metadata"&&H.timestamp&&typeof H.timestamp==="string")H.timestamp=new Date(H.timestamp);Z.enqueue(H)}else Z.error(K.error)}})),request:{body:Y},response:{headers:W}}}catch(Q){throw await AQ(Q,await q3(J))}}isFilePart($){return $&&typeof $==="object"&&"type"in $&&$.type==="file"}maybeEncodeFileParts($){for(let Y of $.prompt)for(let X of Y.content)if(this.isFilePart(X)){let G=X;if(G.data instanceof Uint8Array){let J=Uint8Array.from(G.data),Q=Buffer.from(J).toString("base64");G.data=new URL(`data:${G.mediaType||"application/octet-stream"};base64,${Q}`)}}return $}getUrl(){return`${this.config.baseURL}/language-model`}getModelConfigHeaders($,Y){return{"ai-language-model-specification-version":"3","ai-language-model-id":$,"ai-language-model-streaming":String(Y)}}},uM8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J;let Q=await pY(this.config.headers());try{let{responseHeaders:W,value:K,rawValue:Z}=await a_({url:this.getUrl(),headers:r_(Q,Y!=null?Y:{},this.getModelConfigHeaders(),await pY(this.config.o11yHeaders)),body:{values:$,...G?{providerOptions:G}:{}},successfulResponseHandler:sL(pM8),failedResponseHandler:P3({errorSchema:U.any(),errorToMessage:(H)=>H}),...X&&{abortSignal:X},fetch:this.config.fetch});return{embeddings:K.embeddings,usage:(J=K.usage)!=null?J:void 0,providerMetadata:K.providerMetadata,response:{headers:W,body:Z},warnings:[]}}catch(W){throw await AQ(W,await q3(Q))}}getUrl(){return`${this.config.baseURL}/embedding-model`}getModelConfigHeaders(){return{"ai-embedding-model-specification-version":"3","ai-model-id":this.modelId}}},pM8,dM8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxImagesPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,files:Q,mask:W,providerOptions:K,headers:Z,abortSignal:H}){var z,V,F,L;let N=await pY(this.config.headers());try{let{responseHeaders:D,value:A}=await a_({url:this.getUrl(),headers:r_(N,Z!=null?Z:{},this.getModelConfigHeaders(),await pY(this.config.o11yHeaders)),body:{prompt:$,n:Y,...X&&{size:X},...G&&{aspectRatio:G},...J&&{seed:J},...K&&{providerOptions:K},...Q&&{files:Q.map((B)=>Da1(B))},...W&&{mask:Da1(W)}},successfulResponseHandler:sL(nM8),failedResponseHandler:P3({errorSchema:U.any(),errorToMessage:(B)=>B}),...H&&{abortSignal:H},fetch:this.config.fetch});return{images:A.images,warnings:(z=A.warnings)!=null?z:[],providerMetadata:A.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:D},...A.usage!=null&&{usage:{inputTokens:(V=A.usage.inputTokens)!=null?V:void 0,outputTokens:(F=A.usage.outputTokens)!=null?F:void 0,totalTokens:(L=A.usage.totalTokens)!=null?L:void 0}}}}catch(D){throw await AQ(D,await q3(N))}}getUrl(){return`${this.config.baseURL}/image-model`}getModelConfigHeaders(){return{"ai-image-model-specification-version":"3","ai-model-id":this.modelId}}},cM8,lM8,iM8,nM8,rM8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxVideosPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,aspectRatio:X,resolution:G,duration:J,fps:Q,seed:W,image:K,providerOptions:Z,headers:H,abortSignal:z}){var V;let F=await pY(this.config.headers());try{let{responseHeaders:L,value:N}=await a_({url:this.getUrl(),headers:r_(F,H!=null?H:{},this.getModelConfigHeaders(),await pY(this.config.o11yHeaders),{accept:"text/event-stream"}),body:{prompt:$,n:Y,...X&&{aspectRatio:X},...G&&{resolution:G},...J&&{duration:J},...Q&&{fps:Q},...W&&{seed:W},...Z&&{providerOptions:Z},...K&&{image:aM8(K)}},successfulResponseHandler:async({response:D,url:A,requestBodyValues:B})=>{if(D.body==null)throw new zY({message:"SSE response body is empty",url:A,requestBodyValues:B,statusCode:D.status});let E=ia1({stream:D.body,schema:eM8}).getReader(),{done:M,value:R}=await E.read();if(E.releaseLock(),M||!R)throw new zY({message:"SSE stream ended without a data event",url:A,requestBodyValues:B,statusCode:D.status});if(!R.success)throw new zY({message:"Failed to parse video SSE event",cause:R.error,url:A,requestBodyValues:B,statusCode:D.status});let q=R.value;if(q.type==="error")throw new zY({message:q.message,statusCode:q.statusCode,url:A,requestBodyValues:B,responseHeaders:Object.fromEntries([...D.headers]),responseBody:JSON.stringify(q),data:{error:{message:q.message,type:q.errorType,param:q.param}}});return{value:{videos:q.videos,warnings:q.warnings,providerMetadata:q.providerMetadata},responseHeaders:Object.fromEntries([...D.headers])}},failedResponseHandler:P3({errorSchema:U.any(),errorToMessage:(D)=>D}),...z&&{abortSignal:z},fetch:this.config.fetch});return{videos:N.videos,warnings:(V=N.warnings)!=null?V:[],providerMetadata:N.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:L}}}catch(L){throw await AQ(L,await q3(F))}}getUrl(){return`${this.config.baseURL}/video-model`}getModelConfigHeaders(){return{"ai-video-model-specification-version":"3","ai-model-id":this.modelId}}},sM8,oM8,tM8,eM8,$R8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get provider(){return this.config.provider}async doRerank({documents:$,query:Y,topN:X,headers:G,abortSignal:J,providerOptions:Q}){let W=await pY(this.config.headers());try{let{responseHeaders:K,value:Z,rawValue:H}=await a_({url:this.getUrl(),headers:r_(W,G!=null?G:{},this.getModelConfigHeaders(),await pY(this.config.o11yHeaders)),body:{documents:$,query:Y,...X!=null?{topN:X}:{},...Q?{providerOptions:Q}:{}},successfulResponseHandler:sL(YR8),failedResponseHandler:P3({errorSchema:U.any(),errorToMessage:(z)=>z}),...J&&{abortSignal:J},fetch:this.config.fetch});return{ranking:Z.ranking,providerMetadata:Z.providerMetadata,response:{headers:K,body:H},warnings:[]}}catch(K){throw await AQ(K,await q3(W))}}getUrl(){return`${this.config.baseURL}/reranking-model`}getModelConfigHeaders(){return{"ai-reranking-model-specification-version":"3","ai-model-id":this.modelId}}},YR8,XR8,GR8,JR8,QR8=($={})=>JR8($),WR8,KR8,ZR8,UR8=($={})=>ZR8($),HR8,VR8="3.0.112",FR8="0.0.1",el5,DR8,SO="1.9.0",Na1,AR8,BR8,bf,hf,OR8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},ER8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},MR8,_W,qR8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},PR8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},wR8="diag",R60,jR8,TR8,IR8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},CR8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},SR8,kR8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},vR8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},pS0="context",xR8,$k0,nS0,Gs1="0000000000000000",Js1="00000000000000000000000000000000",yR8,xf,Yk0,gR8,mR8,dS0,Ks1,lR8,iR8,nR8,rR8,Aa1,Ba1,$i5,cS0="trace",aR8,Yi5,sR8,oR8=($,Y)=>{for(var X in Y)sR8($,X,{get:Y[X],enumerable:!0})},tR8="AI_InvalidArgumentError",eR8,$q8,Yq8,Xq8="AI_InvalidToolApprovalError",Gq8,Jq8,Qq8,Wq8="AI_InvalidToolInputError",Kq8,Zq8,Uq8,Hq8="AI_ToolCallNotFoundForApprovalError",zq8,Vq8,Fq8,Lq8="AI_MissingToolResultsError",Dq8,Nq8,Aq8,Zs1="AI_NoObjectGeneratedError",Us1,Bq8,Hs1,nL,Oq8="AI_NoOutputGeneratedError",Eq8,Mq8,Rq8,qq8="AI_NoSuchToolError",Pq8,wq8,_q8,jq8="AI_ToolCallRepairError",Tq8,Iq8,Cq8,Sq8="AI_UIMessageStreamError",kq8,vq8,xq8,yq8="AI_InvalidMessageRoleError",bq8,hq8,fq8,gq8="AI_RetryError",mq8,uq8,pq8,zs1,vO,v$,Vs1,dq8,Fs1,cq8,lq8,iq8,Ls1,nq8,rq8,aq8,sq8,oq8,tq8,Xi5,eq8,YP8=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:$}){return $},async parsePartialOutput({text:$}){return{partial:$}},createElementStreamTransform(){return}}),XP8=({schema:$,name:Y,description:X})=>{let G=sS0($);return{name:"object",responseFormat:pY(G.jsonSchema).then((J)=>({type:"json",schema:J,...Y!=null&&{name:Y},...X!=null&&{description:X}})),async parseCompleteOutput({text:J},Q){let W=await aL({text:J});if(!W.success)throw new nL({message:"No object generated: could not parse the response.",cause:W.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});let K=await rL({value:W.value,schema:G});if(!K.success)throw new nL({message:"No object generated: response did not match schema.",cause:K.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});return K.value},async parsePartialOutput({text:J}){let Q=await P60(J);switch(Q.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:Q.value}}},createElementStreamTransform(){return}}},GP8=({element:$,name:Y,description:X})=>{let G=sS0($);return{name:"array",responseFormat:pY(G.jsonSchema).then((J)=>{let{$schema:Q,...W}=J;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:W}},required:["elements"],additionalProperties:!1},...Y!=null&&{name:Y},...X!=null&&{description:X}}}),async parseCompleteOutput({text:J},Q){let W=await aL({text:J});if(!W.success)throw new nL({message:"No object generated: could not parse the response.",cause:W.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});let K=W.value;if(K==null||typeof K!=="object"||!("elements"in K)||!Array.isArray(K.elements))throw new nL({message:"No object generated: response did not match schema.",cause:new kO({value:K,cause:"response must be an object with an elements array"}),text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});for(let Z of K.elements){let H=await rL({value:Z,schema:G});if(!H.success)throw new nL({message:"No object generated: response did not match schema.",cause:H.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason})}return K.elements},async parsePartialOutput({text:J}){let Q=await P60(J);switch(Q.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let W=Q.value;if(W==null||typeof W!=="object"||!("elements"in W)||!Array.isArray(W.elements))return;let K=Q.state==="repaired-parse"&&W.elements.length>0?W.elements.slice(0,-1):W.elements,Z=[];for(let H of K){let z=await rL({value:H,schema:G});if(z.success)Z.push(z.value)}return{partial:Z}}}},createElementStreamTransform(){let J=0;return new TransformStream({transform({partialOutput:Q},W){if(Q!=null)for(;J<Q.length;J++)W.enqueue(Q[J])}})}}},JP8=({options:$,name:Y,description:X})=>{return{name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:$}},required:["result"],additionalProperties:!1},...Y!=null&&{name:Y},...X!=null&&{description:X}}),async parseCompleteOutput({text:G},J){let Q=await aL({text:G});if(!Q.success)throw new nL({message:"No object generated: could not parse the response.",cause:Q.error,text:G,response:J.response,usage:J.usage,finishReason:J.finishReason});let W=Q.value;if(W==null||typeof W!=="object"||!("result"in W)||typeof W.result!=="string"||!$.includes(W.result))throw new nL({message:"No object generated: response did not match schema.",cause:new kO({value:W,cause:"response must be an object that contains a choice value."}),text:G,response:J.response,usage:J.usage,finishReason:J.finishReason});return W.result},async parsePartialOutput({text:G}){let J=await P60(G);switch(J.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let Q=J.value;if(Q==null||typeof Q!=="object"||!("result"in Q)||typeof Q.result!=="string")return;let W=$.filter((K)=>K.startsWith(Q.result));if(J.state==="successful-parse")return W.includes(Q.result)?{partial:Q.result}:void 0;else return W.length===1?{partial:W[0]}:void 0}}},createElementStreamTransform(){return}}},QP8=({name:$,description:Y}={})=>{return{name:"json",responseFormat:Promise.resolve({type:"json",...$!=null&&{name:$},...Y!=null&&{description:Y}}),async parseCompleteOutput({text:X},G){let J=await aL({text:X});if(!J.success)throw new nL({message:"No object generated: could not parse the response.",cause:J.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});return J.value},async parsePartialOutput({text:X}){let G=await P60(X);switch(G.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return G.value===void 0?void 0:{partial:G.value}}},createElementStreamTransform(){return}}},Gi5,Ji5,Qi5;var Qk0=V0(()=>{O1();O1();cG();ZY();rO8=Symbol.for(Oa1),dY=class $ extends(Ar1=Error,Nr1=rO8,Ar1){constructor({name:Y,message:X,cause:G}){super(X);this[Nr1]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,Oa1)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}},Ma1=`vercel.ai.error.${Ea1}`,aO8=Symbol.for(Ma1),zY=class extends(Or1=dY,Br1=aO8,Or1){constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:K=G!=null&&(G===408||G===409||G===429||G>=500),data:Z}){super({name:Ea1,message:$,cause:W});this[Br1]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=K,this.data=Z}static isInstance($){return dY.hasMarker($,Ma1)}},qa1=`vercel.ai.error.${Ra1}`,sO8=Symbol.for(qa1),oO8=class extends(Mr1=dY,Er1=sO8,Mr1){constructor({message:$="Empty response body"}={}){super({name:Ra1,message:$});this[Er1]=!0}static isInstance($){return dY.hasMarker($,qa1)}};_a1=`vercel.ai.error.${wa1}`,tO8=Symbol.for(_a1),eO8=class extends(qr1=dY,Rr1=tO8,qr1){constructor({message:$,cause:Y,argument:X}){super({name:wa1,message:$,cause:Y});this[Rr1]=!0,this.argument=X}static isInstance($){return dY.hasMarker($,_a1)}},Ta1=`vercel.ai.error.${ja1}`,$E8=Symbol.for(Ta1),al5=class extends(wr1=dY,Pr1=$E8,wr1){constructor({prompt:$,message:Y,cause:X}){super({name:ja1,message:`Invalid prompt: ${Y}`,cause:X});this[Pr1]=!0,this.prompt=$}static isInstance($){return dY.hasMarker($,Ta1)}},Ca1=`vercel.ai.error.${Ia1}`,YE8=Symbol.for(Ca1),E60=class extends(jr1=dY,_r1=YE8,jr1){constructor({text:$,cause:Y}){super({name:Ia1,message:`JSON parsing failed: Text: ${$}.
Error message: ${Pa1(Y)}`,cause:Y});this[_r1]=!0,this.text=$}static isInstance($){return dY.hasMarker($,Ca1)}},ka1=`vercel.ai.error.${Sa1}`,XE8=Symbol.for(ka1),kO=class $ extends(Ir1=dY,Tr1=XE8,Ir1){constructor({value:Y,cause:X,context:G}){let J="Type validation failed";if(G==null?void 0:G.field)J+=` for ${G.field}`;if((G==null?void 0:G.entityName)||(G==null?void 0:G.entityId)){J+=" (";let Q=[];if(G.entityName)Q.push(G.entityName);if(G.entityId)Q.push(`id: "${G.entityId}"`);J+=Q.join(", "),J+=")"}super({name:Sa1,message:`${J}: Value: ${JSON.stringify(Y)}.
Error message: ${Pa1(X)}`,cause:X});this[Tr1]=!0,this.value=Y,this.context=G}static isInstance(Y){return dY.hasMarker(Y,ka1)}static wrap({value:Y,cause:X,context:G}){var J,Q,W;if($.isInstance(X)&&X.value===Y&&((J=X.context)==null?void 0:J.field)===(G==null?void 0:G.field)&&((Q=X.context)==null?void 0:Q.entityName)===(G==null?void 0:G.entityName)&&((W=X.context)==null?void 0:W.entityId)===(G==null?void 0:G.entityId))return X;return new $({value:Y,cause:X,context:G})}},xa1=`vercel.ai.error.${va1}`,GE8=Symbol.for(xa1),sl5=class extends(Sr1=dY,Cr1=GE8,Sr1){constructor({functionality:$,message:Y=`'${$}' functionality not supported.`}){super({name:va1,message:Y});this[Cr1]=!0,this.functionality=$}static isInstance($){return dY.hasMarker($,xa1)}},kr1=class extends Error{constructor($,Y){super($),this.name="ParseError",this.type=Y.type,this.field=Y.field,this.value=Y.value,this.line=Y.line}};WE8=class extends TransformStream{constructor({onError:$,onRetry:Y,onComment:X}={}){let G;super({start(J){G=QE8({onEvent:(Q)=>{J.enqueue(Q)},onError(Q){$==="terminate"?J.error(Q):typeof $=="function"&&$(Q)},onRetry:Y,onComment:X})},transform(J){G.feed(J)}})}};({btoa:KE8,atob:ol5}=globalThis);ha1=`vercel.ai.error.${ba1}`,ZE8=Symbol.for(ha1),tl5=class extends(hr1=dY,br1=ZE8,hr1){constructor({url:$,statusCode:Y,statusText:X,cause:G,message:J=G==null?`Failed to download ${$}: ${Y} ${X}`:`Failed to download ${$}: ${G}`}){super({name:ba1,message:J,cause:G});this[br1]=!0,this.url=$,this.statusCode=Y,this.statusText=X}static isInstance($){return dY.hasMarker($,ha1)}};mf();UE8=["fetch failed","failed to fetch"],HE8=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];LE8=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,DE8=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;AE8=Symbol("Let zodToJsonSchema decide on which parser to use"),gr1={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"};qZ={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(gS0===void 0)gS0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return gS0},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};CE8=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");lS0={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};iS0=Symbol.for("vercel.ai.schema");uS0=Symbol.for(AM8),tG=class $ extends(pr1=Error,ur1=uS0,pr1){constructor({message:Y,statusCode:X=500,cause:G,generationId:J}){super(J?`${Y} [${J}]`:Y);this[ur1]=!0,this.statusCode=X,this.cause=G,this.generationId=J}static isInstance(Y){return $.hasMarker(Y)}static hasMarker(Y){return typeof Y==="object"&&Y!==null&&uS0 in Y&&Y[uS0]===!0}},BM8=`vercel.ai.gateway.error.${ra1}`,dr1=Symbol.for(BM8),aa1=class $ extends(lr1=tG,cr1=dr1,lr1){constructor({message:Y="Authentication failed",statusCode:X=401,cause:G,generationId:J}={}){super({message:Y,statusCode:X,cause:G,generationId:J});this[cr1]=!0,this.name=ra1,this.type="authentication_error"}static isInstance(Y){return tG.hasMarker(Y)&&dr1 in Y}static createContextualError({apiKeyProvided:Y,oidcTokenProvided:X,message:G="Authentication failed",statusCode:J=401,cause:Q,generationId:W}){let K;if(Y)K=`AI Gateway authentication failed: Invalid API key.

Create a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys

Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.`;else if(X)K=`AI Gateway authentication failed: Invalid OIDC token.

Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.

Alternatively, use an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys`;else K=`AI Gateway authentication failed: No authentication provided.

Option 1 - API key:
Create an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys
Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.

Option 2 - OIDC token:
Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.`;return new $({message:K,statusCode:J,cause:Q,generationId:W})}},OM8=`vercel.ai.gateway.error.${sa1}`,ir1=Symbol.for(OM8),EM8=class extends(rr1=tG,nr1=ir1,rr1){constructor({message:$="Invalid request",statusCode:Y=400,cause:X,generationId:G}={}){super({message:$,statusCode:Y,cause:X,generationId:G});this[nr1]=!0,this.name=sa1,this.type="invalid_request_error"}static isInstance($){return tG.hasMarker($)&&ir1 in $}},MM8=`vercel.ai.gateway.error.${oa1}`,ar1=Symbol.for(MM8),RM8=class extends(or1=tG,sr1=ar1,or1){constructor({message:$="Rate limit exceeded",statusCode:Y=429,cause:X,generationId:G}={}){super({message:$,statusCode:Y,cause:X,generationId:G});this[sr1]=!0,this.name=oa1,this.type="rate_limit_exceeded"}static isInstance($){return tG.hasMarker($)&&ar1 in $}},qM8=`vercel.ai.gateway.error.${ta1}`,tr1=Symbol.for(qM8),PM8=TW(()=>BQ(U.object({modelId:U.string()}))),wM8=class extends($a1=tG,er1=tr1,$a1){constructor({message:$="Model not found",statusCode:Y=404,modelId:X,cause:G,generationId:J}={}){super({message:$,statusCode:Y,cause:G,generationId:J});this[er1]=!0,this.name=ta1,this.type="model_not_found",this.modelId=X}static isInstance($){return tG.hasMarker($)&&tr1 in $}},_M8=`vercel.ai.gateway.error.${ea1}`,Ya1=Symbol.for(_M8),Ja1=class extends(Ga1=tG,Xa1=Ya1,Ga1){constructor({message:$="Internal server error",statusCode:Y=500,cause:X,generationId:G}={}){super({message:$,statusCode:Y,cause:X,generationId:G});this[Xa1]=!0,this.name=ea1,this.type="internal_server_error"}static isInstance($){return tG.hasMarker($)&&Ya1 in $}},jM8=`vercel.ai.gateway.error.${$s1}`,Qa1=Symbol.for(jM8),TM8=class extends(Ka1=tG,Wa1=Qa1,Ka1){constructor({message:$="Invalid response from Gateway",statusCode:Y=502,response:X,validationError:G,cause:J,generationId:Q}={}){super({message:$,statusCode:Y,cause:J,generationId:Q});this[Wa1]=!0,this.name=$s1,this.type="response_error",this.response=X,this.validationError=G}static isInstance($){return tG.hasMarker($)&&Qa1 in $}};IM8=TW(()=>BQ(U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.unknown().nullish(),code:U.union([U.string(),U.number()]).nullish()}),generationId:U.string().nullish()})));SM8=`vercel.ai.gateway.error.${Ys1}`,Ua1=Symbol.for(SM8),Va1=class $ extends(za1=tG,Ha1=Ua1,za1){constructor({message:Y="Request timed out",statusCode:X=408,cause:G,generationId:J}={}){super({message:Y,statusCode:X,cause:G,generationId:J});this[Ha1]=!0,this.name=Ys1,this.type="timeout_error"}static isInstance(Y){return tG.hasMarker(Y)&&Ua1 in Y}static createTimeoutError({originalMessage:Y,statusCode:X=408,cause:G,generationId:J}){let Q=`Gateway request timed out: ${Y}

    This is a client-side timeout. To resolve this, increase your timeout configuration: https://vercel.com/docs/ai-gateway/capabilities/video-generation#extending-timeouts-for-node.js`;return new $({message:Q,statusCode:X,cause:G,generationId:J})}};kM8=TW(()=>BQ(U.union([U.literal("api-key"),U.literal("oidc")]))),vM8=["embedding","image","language","reranking","video"],xM8=TW(()=>BQ(U.object({models:U.array(U.object({id:U.string(),name:U.string(),description:U.string().nullish(),pricing:U.object({input:U.string(),output:U.string(),input_cache_read:U.string().nullish(),input_cache_write:U.string().nullish()}).transform(({input:$,output:Y,input_cache_read:X,input_cache_write:G})=>({input:$,output:Y,...X?{cachedInputTokens:X}:{},...G?{cacheCreationInputTokens:G}:{}})).nullish(),specification:U.object({specificationVersion:U.literal("v3"),provider:U.string(),modelId:U.string()}),modelType:U.string().nullish()})).transform(($)=>$.filter((Y)=>Y.modelType==null||vM8.includes(Y.modelType)))}))),yM8=TW(()=>BQ(U.object({balance:U.string(),total_used:U.string()}).transform(({balance:$,total_used:Y})=>({balance:$,totalUsed:Y})))),hM8=TW(()=>BQ(U.object({results:U.array(U.object({day:U.string().optional(),hour:U.string().optional(),user:U.string().optional(),model:U.string().optional(),tag:U.string().optional(),provider:U.string().optional(),credential_type:U.enum(["byok","system"]).optional(),total_cost:U.number(),market_cost:U.number().optional(),input_tokens:U.number().optional(),output_tokens:U.number().optional(),cached_input_tokens:U.number().optional(),cache_creation_input_tokens:U.number().optional(),reasoning_tokens:U.number().optional(),request_count:U.number().optional()}).transform(({credential_type:$,total_cost:Y,market_cost:X,input_tokens:G,output_tokens:J,cached_input_tokens:Q,cache_creation_input_tokens:W,reasoning_tokens:K,request_count:Z,...H})=>({...H,...$!==void 0?{credentialType:$}:{},totalCost:Y,...X!==void 0?{marketCost:X}:{},...G!==void 0?{inputTokens:G}:{},...J!==void 0?{outputTokens:J}:{},...Q!==void 0?{cachedInputTokens:Q}:{},...W!==void 0?{cacheCreationInputTokens:W}:{},...K!==void 0?{reasoningTokens:K}:{},...Z!==void 0?{requestCount:Z}:{}})))}))),gM8=TW(()=>BQ(U.object({data:U.object({id:U.string(),total_cost:U.number(),upstream_inference_cost:U.number(),usage:U.number(),created_at:U.string(),model:U.string(),is_byok:U.boolean(),provider_name:U.string(),streamed:U.boolean(),finish_reason:U.string(),latency:U.number(),generation_time:U.number(),native_tokens_prompt:U.number(),native_tokens_completion:U.number(),native_tokens_reasoning:U.number(),native_tokens_cached:U.number(),native_tokens_cache_creation:U.number(),billable_web_search_calls:U.number()}).transform(({total_cost:$,upstream_inference_cost:Y,created_at:X,is_byok:G,provider_name:J,finish_reason:Q,generation_time:W,native_tokens_prompt:K,native_tokens_completion:Z,native_tokens_reasoning:H,native_tokens_cached:z,native_tokens_cache_creation:V,billable_web_search_calls:F,...L})=>({...L,totalCost:$,upstreamInferenceCost:Y,createdAt:X,isByok:G,providerName:J,finishReason:Q,generationTime:W,promptTokens:K,completionTokens:Z,reasoningTokens:H,cachedTokens:z,cacheCreationTokens:V,billableWebSearchCalls:F}))}).transform(({data:$})=>$))),pM8=TW(()=>BQ(U.object({embeddings:U.array(U.array(U.number())),usage:U.object({tokens:U.number()}).nullish(),providerMetadata:U.record(U.string(),U.record(U.string(),U.unknown())).optional()})));cM8=U.object({images:U.array(U.unknown()).optional()}).catchall(U.unknown()),lM8=U.discriminatedUnion("type",[U.object({type:U.literal("unsupported"),feature:U.string(),details:U.string().optional()}),U.object({type:U.literal("compatibility"),feature:U.string(),details:U.string().optional()}),U.object({type:U.literal("other"),message:U.string()})]),iM8=U.object({inputTokens:U.number().nullish(),outputTokens:U.number().nullish(),totalTokens:U.number().nullish()}),nM8=U.object({images:U.array(U.string()),warnings:U.array(lM8).optional(),providerMetadata:U.record(U.string(),cM8).optional(),usage:iM8.optional()});sM8=U.object({videos:U.array(U.unknown()).optional()}).catchall(U.unknown()),oM8=U.union([U.object({type:U.literal("url"),url:U.string(),mediaType:U.string()}),U.object({type:U.literal("base64"),data:U.string(),mediaType:U.string()})]),tM8=U.discriminatedUnion("type",[U.object({type:U.literal("unsupported"),feature:U.string(),details:U.string().optional()}),U.object({type:U.literal("compatibility"),feature:U.string(),details:U.string().optional()}),U.object({type:U.literal("other"),message:U.string()})]),eM8=U.discriminatedUnion("type",[U.object({type:U.literal("result"),videos:U.array(oM8),warnings:U.array(tM8).optional(),providerMetadata:U.record(U.string(),sM8).optional()}),U.object({type:U.literal("error"),message:U.string(),errorType:U.string(),statusCode:U.number(),param:U.unknown().nullable()})]),YR8=TW(()=>BQ(U.object({ranking:U.array(U.object({index:U.number(),relevanceScore:U.number()})),providerMetadata:U.record(U.string(),U.record(U.string(),U.unknown())).optional()}))),XR8=TW(()=>BQ(U.object({objective:U.string().describe("Natural-language description of the web research goal, including source or freshness guidance and broader context from the task. Maximum 5000 characters."),search_queries:U.array(U.string()).optional().describe("Optional search queries to supplement the objective. Maximum 200 characters per query."),mode:U.enum(["one-shot","agentic"]).optional().describe('Mode preset: "one-shot" for comprehensive results with longer excerpts (default), "agentic" for concise, token-efficient results for multi-step workflows.'),max_results:U.number().optional().describe("Maximum number of results to return (1-20). Defaults to 10 if not specified."),source_policy:U.object({include_domains:U.array(U.string()).optional().describe("List of domains to include in search results."),exclude_domains:U.array(U.string()).optional().describe("List of domains to exclude from search results."),after_date:U.string().optional().describe("Only include results published after this date (ISO 8601 format).")}).optional().describe("Source policy for controlling which domains to include/exclude and freshness."),excerpts:U.object({max_chars_per_result:U.number().optional().describe("Maximum characters per result."),max_chars_total:U.number().optional().describe("Maximum total characters across all results.")}).optional().describe("Excerpt configuration for controlling result length."),fetch_policy:U.object({max_age_seconds:U.number().optional().describe("Maximum age in seconds for cached content. Set to 0 to always fetch fresh content.")}).optional().describe("Fetch policy for controlling content freshness.")}))),GR8=TW(()=>BQ(U.union([U.object({searchId:U.string(),results:U.array(U.object({url:U.string(),title:U.string(),excerpt:U.string(),publishDate:U.string().nullable().optional(),relevanceScore:U.number().optional()}))}),U.object({error:U.enum(["api_error","rate_limit","timeout","invalid_input","configuration_error","unknown"]),statusCode:U.number().optional(),message:U.string()})]))),JR8=na1({id:"gateway.parallel_search",inputSchema:XR8,outputSchema:GR8}),WR8=TW(()=>BQ(U.object({query:U.union([U.string(),U.array(U.string())]).describe("Search query (string) or multiple queries (array of up to 5 strings). Multi-query searches return combined results from all queries."),max_results:U.number().optional().describe("Maximum number of search results to return (1-20, default: 10)"),max_tokens_per_page:U.number().optional().describe("Maximum number of tokens to extract per search result page (256-2048, default: 2048)"),max_tokens:U.number().optional().describe("Maximum total tokens across all search results (default: 25000, max: 1000000)"),country:U.string().optional().describe("Two-letter ISO 3166-1 alpha-2 country code for regional search results (e.g., 'US', 'GB', 'FR')"),search_domain_filter:U.array(U.string()).optional().describe("List of domains to include or exclude from search results (max 20). To include: ['nature.com', 'science.org']. To exclude: ['-example.com', '-spam.net']"),search_language_filter:U.array(U.string()).optional().describe("List of ISO 639-1 language codes to filter results (max 10, lowercase). Examples: ['en', 'fr', 'de']"),search_after_date:U.string().optional().describe("Include only results published after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),search_before_date:U.string().optional().describe("Include only results published before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),last_updated_after_filter:U.string().optional().describe("Include only results last updated after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),last_updated_before_filter:U.string().optional().describe("Include only results last updated before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),search_recency_filter:U.enum(["day","week","month","year"]).optional().describe("Filter results by relative time period. Cannot be used with search_after_date or search_before_date.")}))),KR8=TW(()=>BQ(U.union([U.object({results:U.array(U.object({title:U.string(),url:U.string(),snippet:U.string(),date:U.string().optional(),lastUpdated:U.string().optional()})),id:U.string()}),U.object({error:U.enum(["api_error","rate_limit","timeout","invalid_input","unknown"]),statusCode:U.number().optional(),message:U.string()})]))),ZR8=na1({id:"gateway.perplexity_search",inputSchema:WR8,outputSchema:KR8}),HR8={parallelSearch:QR8,perplexitySearch:UR8};el5=oS0();DR8=typeof globalThis==="object"?globalThis:global,Na1=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;AR8=NR8(SO),BR8=SO.split(".")[0],bf=Symbol.for("opentelemetry.js.api."+BR8),hf=DR8;MR8=function(){function $(Y){this._namespace=Y.namespace||"DiagComponentLogger"}return $.prototype.debug=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return kf("debug",this._namespace,Y)},$.prototype.error=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return kf("error",this._namespace,Y)},$.prototype.info=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return kf("info",this._namespace,Y)},$.prototype.warn=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return kf("warn",this._namespace,Y)},$.prototype.verbose=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return kf("verbose",this._namespace,Y)},$}();(function($){$[$.NONE=0]="NONE",$[$.ERROR=30]="ERROR",$[$.WARN=50]="WARN",$[$.INFO=60]="INFO",$[$.DEBUG=70]="DEBUG",$[$.VERBOSE=80]="VERBOSE",$[$.ALL=9999]="ALL"})(_W||(_W={}));R60=function(){function $(){function Y(J){return function(){var Q=[];for(var W=0;W<arguments.length;W++)Q[W]=arguments[W];var K=ff("diag");if(!K)return;return K[J].apply(K,PR8([],qR8(Q),!1))}}var X=this,G=function(J,Q){var W,K,Z;if(Q===void 0)Q={logLevel:_W.INFO};if(J===X){var H=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return X.error((W=H.stack)!==null&&W!==void 0?W:H.message),!1}if(typeof Q==="number")Q={logLevel:Q};var z=ff("diag"),V=RR8((K=Q.logLevel)!==null&&K!==void 0?K:_W.INFO,J);if(z&&!Q.suppressOverrideMessage){var F=(Z=Error().stack)!==null&&Z!==void 0?Z:"<failed to generate stacktrace>";z.warn("Current logger will be overwritten from "+F),V.warn("Current logger will overwrite one already registered from "+F)}return tS0("diag",V,X,!0)};X.setLogger=G,X.disable=function(){eS0(wR8,X)},X.createComponentLogger=function(J){return new MR8(J)},X.verbose=Y("verbose"),X.debug=Y("debug"),X.info=Y("info"),X.warn=Y("warn"),X.error=Y("error")}return $.instance=function(){if(!this._instance)this._instance=new $;return this._instance},$}();jR8=function(){function $(Y){var X=this;X._currentContext=Y?new Map(Y):new Map,X.getValue=function(G){return X._currentContext.get(G)},X.setValue=function(G,J){var Q=new $(X._currentContext);return Q._currentContext.set(G,J),Q},X.deleteValue=function(G){var J=new $(X._currentContext);return J._currentContext.delete(G),J}}return $}(),TR8=new jR8,SR8=function(){function $(){}return $.prototype.active=function(){return TR8},$.prototype.with=function(Y,X,G){var J=[];for(var Q=3;Q<arguments.length;Q++)J[Q-3]=arguments[Q];return X.call.apply(X,CR8([G],IR8(J),!1))},$.prototype.bind=function(Y,X){return X},$.prototype.enable=function(){return this},$.prototype.disable=function(){return this},$}(),xR8=new SR8,$k0=function(){function $(){}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalContextManager=function(Y){return tS0(pS0,Y,R60.instance())},$.prototype.active=function(){return this._getContextManager().active()},$.prototype.with=function(Y,X,G){var J,Q=[];for(var W=3;W<arguments.length;W++)Q[W-3]=arguments[W];return(J=this._getContextManager()).with.apply(J,vR8([Y,X,G],kR8(Q),!1))},$.prototype.bind=function(Y,X){return this._getContextManager().bind(Y,X)},$.prototype._getContextManager=function(){return ff(pS0)||xR8},$.prototype.disable=function(){this._getContextManager().disable(),eS0(pS0,R60.instance())},$}();(function($){$[$.NONE=0]="NONE",$[$.SAMPLED=1]="SAMPLED"})(nS0||(nS0={}));yR8={traceId:Js1,spanId:Gs1,traceFlags:nS0.NONE},xf=function(){function $(Y){if(Y===void 0)Y=yR8;this._spanContext=Y}return $.prototype.spanContext=function(){return this._spanContext},$.prototype.setAttribute=function(Y,X){return this},$.prototype.setAttributes=function(Y){return this},$.prototype.addEvent=function(Y,X){return this},$.prototype.addLink=function(Y){return this},$.prototype.addLinks=function(Y){return this},$.prototype.setStatus=function(Y){return this},$.prototype.updateName=function(Y){return this},$.prototype.end=function(Y){},$.prototype.isRecording=function(){return!1},$.prototype.recordException=function(Y,X){},$}(),Yk0=_R8("OpenTelemetry Context Key SPAN");gR8=/^([0-9a-f]{32})$/i,mR8=/^[0-9a-f]{16}$/i;dS0=$k0.getInstance(),Ks1=function(){function $(){}return $.prototype.startSpan=function(Y,X,G){if(G===void 0)G=dS0.active();var J=Boolean(X===null||X===void 0?void 0:X.root);if(J)return new xf;var Q=G&&Qs1(G);if(cR8(Q)&&Ws1(Q))return new xf(Q);else return new xf},$.prototype.startActiveSpan=function(Y,X,G,J){var Q,W,K;if(arguments.length<2)return;else if(arguments.length===2)K=X;else if(arguments.length===3)Q=X,K=G;else Q=X,W=G,K=J;var Z=W!==null&&W!==void 0?W:dS0.active(),H=this.startSpan(Y,Q,Z),z=Gk0(Z,H);return dS0.with(z,K,void 0,H)},$}();lR8=new Ks1,iR8=function(){function $(Y,X,G,J){this._provider=Y,this.name=X,this.version=G,this.options=J}return $.prototype.startSpan=function(Y,X,G){return this._getTracer().startSpan(Y,X,G)},$.prototype.startActiveSpan=function(Y,X,G,J){var Q=this._getTracer();return Reflect.apply(Q.startActiveSpan,Q,arguments)},$.prototype._getTracer=function(){if(this._delegate)return this._delegate;var Y=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!Y)return lR8;return this._delegate=Y,this._delegate},$}(),nR8=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){return new Ks1},$}(),rR8=new nR8,Aa1=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){var J;return(J=this.getDelegateTracer(Y,X,G))!==null&&J!==void 0?J:new iR8(this,Y,X,G)},$.prototype.getDelegate=function(){var Y;return(Y=this._delegate)!==null&&Y!==void 0?Y:rR8},$.prototype.setDelegate=function(Y){this._delegate=Y},$.prototype.getDelegateTracer=function(Y,X,G){var J;return(J=this._delegate)===null||J===void 0?void 0:J.getTracer(Y,X,G)},$}();(function($){$[$.UNSET=0]="UNSET",$[$.OK=1]="OK",$[$.ERROR=2]="ERROR"})(Ba1||(Ba1={}));$i5=$k0.getInstance(),aR8=function(){function $(){this._proxyTracerProvider=new Aa1,this.wrapSpanContext=dR8,this.isSpanContextValid=Ws1,this.deleteSpan=hR8,this.getSpan=Xk0,this.getActiveSpan=bR8,this.getSpanContext=Qs1,this.setSpan=Gk0,this.setSpanContext=fR8}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalTracerProvider=function(Y){var X=tS0(cS0,this._proxyTracerProvider,R60.instance());if(X)this._proxyTracerProvider.setDelegate(Y);return X},$.prototype.getTracerProvider=function(){return ff(cS0)||this._proxyTracerProvider},$.prototype.getTracer=function(Y,X){return this.getTracerProvider().getTracer(Y,X)},$.prototype.disable=function(){eS0(cS0,R60.instance()),this._proxyTracerProvider=new Aa1},$}(),Yi5=aR8.getInstance(),sR8=Object.defineProperty,eR8=`vercel.ai.error.${tR8}`,$q8=Symbol.for(eR8);Yq8=$q8;Gq8=`vercel.ai.error.${Xq8}`,Jq8=Symbol.for(Gq8);Qq8=Jq8;Kq8=`vercel.ai.error.${Wq8}`,Zq8=Symbol.for(Kq8);Uq8=Zq8;zq8=`vercel.ai.error.${Hq8}`,Vq8=Symbol.for(zq8);Fq8=Vq8;Dq8=`vercel.ai.error.${Lq8}`,Nq8=Symbol.for(Dq8);Aq8=Nq8;Us1=`vercel.ai.error.${Zs1}`,Bq8=Symbol.for(Us1),nL=class extends dY{constructor({message:$="No object generated.",cause:Y,text:X,response:G,usage:J,finishReason:Q}){super({name:Zs1,message:$,cause:Y});this[Hs1]=!0,this.text=X,this.response=G,this.usage=J,this.finishReason=Q}static isInstance($){return dY.hasMarker($,Us1)}};Hs1=Bq8;Eq8=`vercel.ai.error.${Oq8}`,Mq8=Symbol.for(Eq8);Rq8=Mq8;Pq8=`vercel.ai.error.${qq8}`,wq8=Symbol.for(Pq8);_q8=wq8;Tq8=`vercel.ai.error.${jq8}`,Iq8=Symbol.for(Tq8);Cq8=Iq8;kq8=`vercel.ai.error.${Sq8}`,vq8=Symbol.for(kq8);xq8=vq8;bq8=`vercel.ai.error.${yq8}`,hq8=Symbol.for(bq8);fq8=hq8;mq8=`vercel.ai.error.${gq8}`,uq8=Symbol.for(mq8);pq8=uq8;zs1=U.union([U.string(),U.instanceof(Uint8Array),U.instanceof(ArrayBuffer),U.custom(($)=>{var Y,X;return(X=(Y=globalThis.Buffer)==null?void 0:Y.isBuffer($))!=null?X:!1},{message:"Must be a Buffer"})]),vO=U.lazy(()=>U.union([U.null(),U.string(),U.number(),U.boolean(),U.record(U.string(),vO.optional()),U.array(vO)])),v$=U.record(U.string(),U.record(U.string(),vO.optional())),Vs1=U.object({type:U.literal("text"),text:U.string(),providerOptions:v$.optional()}),dq8=U.object({type:U.literal("image"),image:U.union([zs1,U.instanceof(URL)]),mediaType:U.string().optional(),providerOptions:v$.optional()}),Fs1=U.object({type:U.literal("file"),data:U.union([zs1,U.instanceof(URL)]),filename:U.string().optional(),mediaType:U.string(),providerOptions:v$.optional()}),cq8=U.object({type:U.literal("reasoning"),text:U.string(),providerOptions:v$.optional()}),lq8=U.object({type:U.literal("tool-call"),toolCallId:U.string(),toolName:U.string(),input:U.unknown(),providerOptions:v$.optional(),providerExecuted:U.boolean().optional()}),iq8=U.discriminatedUnion("type",[U.object({type:U.literal("text"),value:U.string(),providerOptions:v$.optional()}),U.object({type:U.literal("json"),value:vO,providerOptions:v$.optional()}),U.object({type:U.literal("execution-denied"),reason:U.string().optional(),providerOptions:v$.optional()}),U.object({type:U.literal("error-text"),value:U.string(),providerOptions:v$.optional()}),U.object({type:U.literal("error-json"),value:vO,providerOptions:v$.optional()}),U.object({type:U.literal("content"),value:U.array(U.union([U.object({type:U.literal("text"),text:U.string(),providerOptions:v$.optional()}),U.object({type:U.literal("media"),data:U.string(),mediaType:U.string()}),U.object({type:U.literal("file-data"),data:U.string(),mediaType:U.string(),filename:U.string().optional(),providerOptions:v$.optional()}),U.object({type:U.literal("file-url"),url:U.string(),providerOptions:v$.optional()}),U.object({type:U.literal("file-id"),fileId:U.union([U.string(),U.record(U.string(),U.string())]),providerOptions:v$.optional()}),U.object({type:U.literal("image-data"),data:U.string(),mediaType:U.string(),providerOptions:v$.optional()}),U.object({type:U.literal("image-url"),url:U.string(),providerOptions:v$.optional()}),U.object({type:U.literal("image-file-id"),fileId:U.union([U.string(),U.record(U.string(),U.string())]),providerOptions:v$.optional()}),U.object({type:U.literal("custom"),providerOptions:v$.optional()})]))})]),Ls1=U.object({type:U.literal("tool-result"),toolCallId:U.string(),toolName:U.string(),output:iq8,providerOptions:v$.optional()}),nq8=U.object({type:U.literal("tool-approval-request"),approvalId:U.string(),toolCallId:U.string()}),rq8=U.object({type:U.literal("tool-approval-response"),approvalId:U.string(),approved:U.boolean(),reason:U.string().optional()}),aq8=U.object({role:U.literal("system"),content:U.string(),providerOptions:v$.optional()}),sq8=U.object({role:U.literal("user"),content:U.union([U.string(),U.array(U.union([Vs1,dq8,Fs1]))]),providerOptions:v$.optional()}),oq8=U.object({role:U.literal("assistant"),content:U.union([U.string(),U.array(U.union([Vs1,Fs1,cq8,lq8,Ls1,nq8]))]),providerOptions:v$.optional()}),tq8=U.object({role:U.literal("tool"),content:U.array(U.union([Ls1,rq8])),providerOptions:v$.optional()}),Xi5=U.union([aq8,sq8,oq8,tq8]),eq8={};oR8(eq8,{array:()=>GP8,choice:()=>JP8,json:()=>QP8,object:()=>XP8,text:()=>YP8});Gi5=mf({prefix:"aitxt",size:24}),Ji5=class extends TransformStream{constructor(){super({transform($,Y){Y.enqueue(`data: ${JSON.stringify($)}

`)},flush($){$.enqueue(`data: [DONE]

`)}})}};U.record(U.string(),vO.optional());Qi5=mf({prefix:"aitxt",size:24});U.record(U.string(),vO.optional());mf({prefix:"aiobj",size:24});mf({prefix:"aiobj",size:24})});var ZP8,Kk0,UP8,Ds1,HP8,zP8,Ns1=($,Y)=>function(){return Y||(0,$[Ds1($)[0]])((Y={exports:{}}).exports,Y),Y.exports},As1=($,Y)=>{for(var X in Y)Kk0($,X,{get:Y[X],enumerable:!0})},Wk0=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of Ds1(Y))if(!zP8.call($,J)&&J!==X)Kk0($,J,{get:()=>Y[J],enumerable:!(G=UP8(Y,J))||G.enumerable})}return $},Bs1=($,Y,X)=>(Wk0($,Y,"default"),X&&Wk0(X,Y,"default")),Zk0=($,Y,X)=>(X=$!=null?ZP8(HP8($)):{},Wk0(Y||!$||!$.__esModule?Kk0(X,"default",{value:$,enumerable:!0}):X,$));var Uk0=V0(()=>{ZP8=Object.create,Kk0=Object.defineProperty,UP8=Object.getOwnPropertyDescriptor,Ds1=Object.getOwnPropertyNames,HP8=Object.getPrototypeOf,zP8=Object.prototype.hasOwnProperty});function sf($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function j60($){if($===null||typeof $==="string"||typeof $==="number"||typeof $==="boolean")return!0;if(Array.isArray($))return $.every(j60);if(typeof $==="object")return Object.entries($).every(([Y,X])=>typeof Y==="string"&&j60(X));return!1}function Os1($){return Array.isArray($)&&$.every(j60)}function Ok0($){return $!=null&&typeof $==="object"&&Object.entries($).every(([Y,X])=>typeof Y==="string"&&j60(X))}function vP8($){return new ReadableStream({async pull(Y){try{let{value:X,done:G}=await $.next();if(G)Y.close();else Y.enqueue(X)}catch(X){Y.error(X)}},cancel(){}})}async function xP8($){return $==null?Promise.resolve():new Promise((Y)=>setTimeout(Y,$))}function bP8($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function hP8($){return $ instanceof Error&&($.name==="AbortError"||$.name==="TimeoutError")}function fP8($){return{[T60]:!0,validate:$}}function gP8($){return typeof $==="object"&&$!==null&&T60 in $&&$[T60]===!0&&"validate"in $}function mP8($){return gP8($)?$:uP8($)}function uP8($){return fP8((Y)=>{let X=$.safeParse(Y);return X.success?{success:!0,value:X.data}:{success:!1,error:X.error}})}function hO({value:$,schema:Y}){let X=mP8(Y);try{if(X.validate==null)return{success:!0,value:$};let G=X.validate($);if(G.success)return G;return{success:!1,error:bO.wrap({value:$,cause:G.error})}}catch(G){return{success:!1,error:bO.wrap({value:$,cause:G})}}}function df({text:$,schema:Y}){try{let X=kP8.default.parse($);if(Y==null)return{success:!0,value:X,rawValue:X};let G=hO({value:X,schema:Y});return G.success?{...G,rawValue:X}:G}catch(X){return{success:!1,error:Bk0.isInstance(X)?X:new Bk0({text:$,cause:X})}}}function Ik0($){let Y=$.replace(/-/g,"+").replace(/_/g,"/"),X=dP8(Y);return Uint8Array.from(X,(G)=>G.codePointAt(0))}function Ek0($){let Y="";for(let X=0;X<$.length;X++)Y+=String.fromCodePoint($[X]);return pP8(Y)}function $o1($,Y,X,G){if(!G?.errorMessages)return;if(X)$.errorMessage={...$.errorMessage,[Y]:X}}function l9($,Y,X,G,J){$[Y]=X,$o1($,Y,G,J)}function OQ($){if($.target!=="openAi")return{};let Y=[...$.basePath,$.definitionPath,$.openAiAnyTypeName];return $.flags.hasReferencedOpenAiAnyType=!0,{$ref:$.$refStrategy==="relative"?Yo1(Y,$.currentPath):Y.join("/")}}function nP8($,Y){let X={type:"array"};if($.type?._def&&$.type?._def?.typeName!==U0.ZodAny)X.items=H9($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)l9(X,"minItems",$.minLength.value,$.minLength.message,Y);if($.maxLength)l9(X,"maxItems",$.maxLength.value,$.maxLength.message,Y);if($.exactLength)l9(X,"minItems",$.exactLength.value,$.exactLength.message,Y),l9(X,"maxItems",$.exactLength.value,$.exactLength.message,Y);return X}function rP8($,Y){let X={type:"integer",format:"int64"};if(!$.checks)return X;for(let G of $.checks)switch(G.kind){case"min":if(Y.target==="jsonSchema7")if(G.inclusive)l9(X,"minimum",G.value,G.message,Y);else l9(X,"exclusiveMinimum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMinimum=!0;l9(X,"minimum",G.value,G.message,Y)}break;case"max":if(Y.target==="jsonSchema7")if(G.inclusive)l9(X,"maximum",G.value,G.message,Y);else l9(X,"exclusiveMaximum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMaximum=!0;l9(X,"maximum",G.value,G.message,Y)}break;case"multipleOf":l9(X,"multipleOf",G.value,G.message,Y);break}return X}function aP8(){return{type:"boolean"}}function Xo1($,Y){return H9($.type._def,Y)}function Go1($,Y,X){let G=X??Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>Go1($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return oP8($,Y)}}function tP8($,Y){return{...H9($.innerType._def,Y),default:$.defaultValue()}}function eP8($,Y){return Y.effectStrategy==="input"?H9($.schema._def,Y):OQ(Y)}function $w8($){return{type:"string",enum:Array.from($.values)}}function Xw8($,Y){let X=[H9($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),H9($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((Q)=>!!Q),G=Y.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,J=[];return X.forEach((Q)=>{if(Yw8(Q)){if(J.push(...Q.allOf),Q.unevaluatedProperties===void 0)G=void 0}else{let W=Q;if("additionalProperties"in Q&&Q.additionalProperties===!1){let{additionalProperties:K,...Z}=Q;W=Z}else G=void 0;J.push(W)}}),J.length?{allOf:J,...G}:void 0}function Gw8($,Y){let X=typeof $.value;if(X!=="bigint"&&X!=="number"&&X!=="boolean"&&X!=="string")return{type:Array.isArray($.value)?"array":"object"};if(Y.target==="openApi3")return{type:X==="bigint"?"integer":X,enum:[$.value]};return{type:X==="bigint"?"integer":X,const:$.value}}function Jo1($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":l9(X,"minLength",typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,G.message,Y);break;case"max":l9(X,"maxLength",typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value,G.message,Y);break;case"email":switch(Y.emailStrategy){case"format:email":_Z(X,"email",G.message,Y);break;case"format:idn-email":_Z(X,"idn-email",G.message,Y);break;case"pattern:zod":eG(X,wZ.email,G.message,Y);break}break;case"url":_Z(X,"uri",G.message,Y);break;case"uuid":_Z(X,"uuid",G.message,Y);break;case"regex":eG(X,G.regex,G.message,Y);break;case"cuid":eG(X,wZ.cuid,G.message,Y);break;case"cuid2":eG(X,wZ.cuid2,G.message,Y);break;case"startsWith":eG(X,RegExp(`^${zk0(G.value,Y)}`),G.message,Y);break;case"endsWith":eG(X,RegExp(`${zk0(G.value,Y)}$`),G.message,Y);break;case"datetime":_Z(X,"date-time",G.message,Y);break;case"date":_Z(X,"date",G.message,Y);break;case"time":_Z(X,"time",G.message,Y);break;case"duration":_Z(X,"duration",G.message,Y);break;case"length":l9(X,"minLength",typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,G.message,Y),l9(X,"maxLength",typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value,G.message,Y);break;case"includes":{eG(X,RegExp(zk0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")_Z(X,"ipv4",G.message,Y);if(G.version!=="v4")_Z(X,"ipv6",G.message,Y);break}case"base64url":eG(X,wZ.base64url,G.message,Y);break;case"jwt":eG(X,wZ.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")eG(X,wZ.ipv4Cidr,G.message,Y);if(G.version!=="v4")eG(X,wZ.ipv6Cidr,G.message,Y);break}case"emoji":eG(X,wZ.emoji(),G.message,Y);break;case"ulid":{eG(X,wZ.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{_Z(X,"binary",G.message,Y);break}case"contentEncoding:base64":{l9(X,"contentEncoding","base64",G.message,Y);break}case"pattern:zod":{eG(X,wZ.base64,G.message,Y);break}}break}case"nanoid":eG(X,wZ.nanoid,G.message,Y)}return X}function zk0($,Y){return Y.patternStrategy==="escape"?Qw8($):$}function Qw8($){let Y="";for(let X=0;X<$.length;X++){if(!Jw8.has($[X]))Y+="\\";Y+=$[X]}return Y}function _Z($,Y,X,G){if($.format||$.anyOf?.some((J)=>J.format)){if(!$.anyOf)$.anyOf=[];if($.format){if($.anyOf.push({format:$.format,...$.errorMessage&&G.errorMessages&&{errorMessage:{format:$.errorMessage.format}}}),delete $.format,$.errorMessage){if(delete $.errorMessage.format,Object.keys($.errorMessage).length===0)delete $.errorMessage}}$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else l9($,"format",Y,X,G)}function eG($,Y,X,G){if($.pattern||$.allOf?.some((J)=>J.pattern)){if(!$.allOf)$.allOf=[];if($.pattern){if($.allOf.push({pattern:$.pattern,...$.errorMessage&&G.errorMessages&&{errorMessage:{pattern:$.errorMessage.pattern}}}),delete $.pattern,$.errorMessage){if(delete $.errorMessage.pattern,Object.keys($.errorMessage).length===0)delete $.errorMessage}}$.allOf.push({pattern:Ms1(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else l9($,"pattern",Ms1(Y,G),X,G)}function Ms1($,Y){if(!Y.applyRegexFlags||!$.flags)return $.source;let X={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},G=X.i?$.source.toLowerCase():$.source,J="",Q=!1,W=!1,K=!1;for(let Z=0;Z<G.length;Z++){if(Q){J+=G[Z],Q=!1;continue}if(X.i){if(W){if(G[Z].match(/[a-z]/)){if(K)J+=G[Z],J+=`${G[Z-2]}-${G[Z]}`.toUpperCase(),K=!1;else if(G[Z+1]==="-"&&G[Z+2]?.match(/[a-z]/))J+=G[Z],K=!0;else J+=`${G[Z]}${G[Z].toUpperCase()}`;continue}}else if(G[Z].match(/[a-z]/)){J+=`[${G[Z]}${G[Z].toUpperCase()}]`;continue}}if(X.m){if(G[Z]==="^"){J+=`(^|(?<=[\r
]))`;continue}else if(G[Z]==="$"){J+=`($|(?=[\r
]))`;continue}}if(X.s&&G[Z]==="."){J+=W?`${G[Z]}\r
`:`[${G[Z]}\r
]`;continue}if(J+=G[Z],G[Z]==="\\")Q=!0;else if(W&&G[Z]==="]")W=!1;else if(!W&&G[Z]==="[")W=!0}return J}function Qo1($,Y){if(Y.target==="openAi")console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");if(Y.target==="openApi3"&&$.keyType?._def.typeName===U0.ZodEnum)return{type:"object",required:$.keyType._def.values,properties:$.keyType._def.values.reduce((G,J)=>({...G,[J]:H9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"properties",J]})??OQ(Y)}),{}),additionalProperties:Y.rejectedAdditionalProperties};let X={type:"object",additionalProperties:H9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]})??Y.allowedAdditionalProperties};if(Y.target==="openApi3")return X;if($.keyType?._def.typeName===U0.ZodString&&$.keyType._def.checks?.length){let{type:G,...J}=Jo1($.keyType._def,Y);return{...X,propertyNames:J}}else if($.keyType?._def.typeName===U0.ZodEnum)return{...X,propertyNames:{enum:$.keyType._def.values}};else if($.keyType?._def.typeName===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&$.keyType._def.type._def.checks?.length){let{type:G,...J}=Xo1($.keyType._def,Y);return{...X,propertyNames:J}}return X}function Ww8($,Y){if(Y.mapStrategy==="record")return Qo1($,Y);let X=H9($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||OQ(Y),G=H9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||OQ(Y);return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function Kw8($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function Zw8($){return $.target==="openAi"?void 0:{not:OQ({...$,currentPath:[...$.currentPath,"not"]})}}function Uw8($){return $.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}function Hw8($,Y){if(Y.target==="openApi3")return Rs1($,Y);let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in I60)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=I60[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,K)=>K.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return Rs1($,Y)}function zw8($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length)){if(Y.target==="openApi3")return{type:I60[$.innerType._def.typeName],nullable:!0};return{type:[I60[$.innerType._def.typeName],"null"]}}if(Y.target==="openApi3"){let G=H9($.innerType._def,{...Y,currentPath:[...Y.currentPath]});if(G&&"$ref"in G)return{allOf:[G],nullable:!0};return G&&{...G,nullable:!0}}let X=H9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function Vw8($,Y){let X={type:"number"};if(!$.checks)return X;for(let G of $.checks)switch(G.kind){case"int":X.type="integer",$o1(X,"type",G.message,Y);break;case"min":if(Y.target==="jsonSchema7")if(G.inclusive)l9(X,"minimum",G.value,G.message,Y);else l9(X,"exclusiveMinimum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMinimum=!0;l9(X,"minimum",G.value,G.message,Y)}break;case"max":if(Y.target==="jsonSchema7")if(G.inclusive)l9(X,"maximum",G.value,G.message,Y);else l9(X,"exclusiveMaximum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMaximum=!0;l9(X,"maximum",G.value,G.message,Y)}break;case"multipleOf":l9(X,"multipleOf",G.value,G.message,Y);break}return X}function Fw8($,Y){let X=Y.target==="openAi",G={type:"object",properties:{}},J=[],Q=$.shape();for(let K in Q){let Z=Q[K];if(Z===void 0||Z._def===void 0)continue;let H=Dw8(Z);if(H&&X){if(Z._def.typeName==="ZodOptional")Z=Z._def.innerType;if(!Z.isNullable())Z=Z.nullable();H=!1}let z=H9(Z._def,{...Y,currentPath:[...Y.currentPath,"properties",K],propertyPath:[...Y.currentPath,"properties",K]});if(z===void 0)continue;if(G.properties[K]=z,!H)J.push(K)}if(J.length)G.required=J;let W=Lw8($,Y);if(W!==void 0)G.additionalProperties=W;return G}function Lw8($,Y){if($.catchall._def.typeName!=="ZodNever")return H9($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function Dw8($){try{return $.isOptional()}catch{return!0}}function Bw8($,Y){return H9($.type._def,Y)}function Ow8($,Y){let G={type:"array",uniqueItems:!0,items:H9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)l9(G,"minItems",$.minSize.value,$.minSize.message,Y);if($.maxSize)l9(G,"maxItems",$.maxSize.value,$.maxSize.message,Y);return G}function Ew8($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>H9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:H9($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>H9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function Mw8($){return{not:OQ($)}}function Rw8($){return OQ($)}function H9($,Y,X=!1){let G=Y.seen.get($);if(Y.override){let K=Y.override?.($,Y,G,X);if(K!==cP8)return K}if(G&&!X){let K=ww8(G,Y);if(K!==void 0)return K}let J={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,J);let Q=Pw8($,$.typeName,Y),W=typeof Q==="function"?H9(Q(),Y):Q;if(W)_w8($,Y,W);if(Y.postProcess){let K=Y.postProcess(W,$,Y);return J.jsonSchema=W,K}return J.jsonSchema=W,W}function Iw8($){let Y=["ROOT"],X=-1,G=null;function J(Z,H,z){switch(Z){case'"':{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_STRING");break}case"f":case"t":case"n":{X=H,G=H,Y.pop(),Y.push(z),Y.push("INSIDE_LITERAL");break}case"-":{Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"{":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_OBJECT_START");break}case"[":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_ARRAY_START");break}}}function Q(Z,H){switch(Z){case",":{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{X=H,Y.pop();break}}}function W(Z,H){switch(Z){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=H,Y.pop();break}}}for(let Z=0;Z<$.length;Z++){let H=$[Z];switch(Y[Y.length-1]){case"ROOT":J(H,Z,"FINISH");break;case"INSIDE_OBJECT_START":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}case"}":{X=Z,Y.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(H){case":":{Y.pop(),Y.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{J(H,Z,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{Q(H,Z);break}case"INSIDE_STRING":{switch(H){case'"':{Y.pop(),X=Z;break}case"\\":{Y.push("INSIDE_STRING_ESCAPE");break}default:X=Z}break}case"INSIDE_ARRAY_START":{switch(H){case"]":{X=Z,Y.pop();break}default:{X=Z,J(H,Z,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(H){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=Z,Y.pop();break}default:{X=Z;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{J(H,Z,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{Y.pop(),X=Z;break}case"INSIDE_NUMBER":{switch(H){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=Z;break}case"e":case"E":case"-":case".":break;case",":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z);if(Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);break}case"}":{if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);break}case"]":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z);break}default:{Y.pop();break}}break}case"INSIDE_LITERAL":{let V=$.substring(G,Z+1);if(!"false".startsWith(V)&&!"true".startsWith(V)&&!"null".startsWith(V)){if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);else if(Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z)}else X=Z;break}}}let K=$.slice(0,X+1);for(let Z=Y.length-1;Z>=0;Z--)switch(Y[Z]){case"INSIDE_STRING":{K+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{K+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{K+="]";break}case"INSIDE_LITERAL":{let z=$.substring(G,$.length);if("true".startsWith(z))K+="true".slice(z.length);else if("false".startsWith(z))K+="false".slice(z.length);else if("null".startsWith(z))K+="null".slice(z.length)}}return K}function Wo1($){if($===void 0)return{value:void 0,state:"undefined-input"};let Y=df({text:$});if(Y.success)return{value:Y.value,state:"successful-parse"};if(Y=df({text:Iw8($)}),Y.success)return{value:Y.value,state:"repaired-parse"};return{value:void 0,state:"failed-parse"}}function KG($,Y){let X=Ck0.find((G)=>G.name===$);if(!X)throw Error(`Invalid stream part type: ${$}`);return`${X.code}:${JSON.stringify(Y)}
`}function C60($,Y){if($===Y)return!0;if($==null||Y==null)return!1;if(typeof $!=="object"&&typeof Y!=="object")return $===Y;if($.constructor!==Y.constructor)return!1;if($ instanceof Date&&Y instanceof Date)return $.getTime()===Y.getTime();if(Array.isArray($)){if($.length!==Y.length)return!1;for(let J=0;J<$.length;J++)if(!C60($[J],Y[J]))return!1;return!0}let X=Object.keys($),G=Object.keys(Y);if(X.length!==G.length)return!1;for(let J of X){if(!G.includes(J))return!1;if(!C60($[J],Y[J]))return!1}return!0}function iw8($,Y){var X;let G=(X=void 0)!=null?X:!1;return nw8(Tw8($,{$refStrategy:G?"root":"none",target:"jsonSchema7"}),{validate:(J)=>{let Q=$.safeParse(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function nw8($,{validate:Y}={}){return{[Mk0]:!0,_type:void 0,[T60]:!0,jsonSchema:$,validate:Y}}function rw8($){return typeof $==="object"&&$!==null&&Mk0 in $&&$[Mk0]===!0&&"jsonSchema"in $&&"validate"in $}function s_($){return rw8($)?$:iw8($)}function sw8($){var Y=new Set([$]),X=new Set,G=$.match(qs1);if(!G)return function(){return!1};var J={major:+G[1],minor:+G[2],patch:+G[3],prerelease:G[4]};if(J.prerelease!=null)return function(Z){return Z===$};function Q(K){return X.add(K),!1}function W(K){return Y.add(K),!0}return function(Z){if(Y.has(Z))return!0;if(X.has(Z))return!1;var H=Z.match(qs1);if(!H)return Q(Z);var z={major:+H[1],minor:+H[2],patch:+H[3],prerelease:H[4]};if(z.prerelease!=null)return Q(Z);if(J.major!==z.major)return Q(Z);if(J.major===0){if(J.minor===z.minor&&J.patch<=z.patch)return W(Z);return Q(Z)}if(J.minor<=z.minor)return W(Z);return Q(Z)}}function Sk0($,Y,X,G){var J;if(G===void 0)G=!1;var Q=lf[cf]=(J=lf[cf])!==null&&J!==void 0?J:{version:xO};if(!G&&Q[$]){var W=Error("@opentelemetry/api: Attempted duplicate registration of API: "+$);return X.error(W.stack||W.message),!1}if(Q.version!==xO){var W=Error("@opentelemetry/api: Registration of version v"+Q.version+" for "+$+" does not match previously registered API v"+xO);return X.error(W.stack||W.message),!1}return Q[$]=Y,X.debug("@opentelemetry/api: Registered a global for "+$+" v"+xO+"."),!0}function nf($){var Y,X,G=(Y=lf[cf])===null||Y===void 0?void 0:Y.version;if(!G||!ow8(G))return;return(X=lf[cf])===null||X===void 0?void 0:X[$]}function kk0($,Y){Y.debug("@opentelemetry/api: Unregistering a global for "+$+" v"+xO+".");var X=lf[cf];if(X)delete X[$]}function uf($,Y,X){var G=nf("diag");if(!G)return;return X.unshift(Y),G[$].apply(G,$_8([],ew8(X),!1))}function X_8($,Y){if($<IW.NONE)$=IW.NONE;else if($>IW.ALL)$=IW.ALL;Y=Y||{};function X(G,J){var Q=Y[G];if(typeof Q==="function"&&$>=J)return Q.bind(Y);return function(){}}return{error:X("error",IW.ERROR),warn:X("warn",IW.WARN),info:X("info",IW.INFO),debug:X("debug",IW.DEBUG),verbose:X("verbose",IW.VERBOSE)}}function W_8($){return Symbol.for($)}function xk0($){return $.getValue(vk0)||void 0}function N_8(){return xk0(Ko1.getInstance().active())}function yk0($,Y){return $.setValue(vk0,Y)}function A_8($){return $.deleteValue(vk0)}function B_8($,Y){return yk0($,new pf(Y))}function Ho1($){var Y;return(Y=xk0($))===null||Y===void 0?void 0:Y.spanContext()}function M_8($){return O_8.test($)&&$!==Uo1}function R_8($){return E_8.test($)&&$!==Zo1}function zo1($){return M_8($.traceId)&&R_8($.spanId)}function q_8($){return new pf($)}function P_8($){return typeof $==="object"&&typeof $.spanId==="string"&&typeof $.traceId==="string"&&typeof $.traceFlags==="number"}function o_($,{contentType:Y,dataStreamVersion:X}){let G=new Headers($!=null?$:{});if(!G.has("Content-Type"))G.set("Content-Type",Y);if(X!==void 0)G.set("X-Vercel-AI-Data-Stream",X);return G}function qk0($,{contentType:Y,dataStreamVersion:X}){let G={};if($!=null)for(let[J,Q]of Object.entries($))G[J]=Q;if(G["Content-Type"]==null)G["Content-Type"]=Y;if(X!==void 0)G["X-Vercel-AI-Data-Stream"]=X;return G}function Pk0({response:$,status:Y,statusText:X,headers:G,stream:J}){$.writeHead(Y!=null?Y:200,X,G);let Q=J.getReader();(async()=>{try{while(!0){let{done:K,value:Z}=await Q.read();if(K)break;$.write(Z)}}catch(K){throw K}finally{$.end()}})()}async function Oo1($,{maxRetries:Y,delayInMs:X,backoffFactor:G},J=[]){try{return await $()}catch(Q){if(hP8(Q))throw Q;if(Y===0)throw Q;let W=bP8(Q),K=[...J,Q],Z=K.length;if(Z>Y)throw new ws1({message:`Failed after ${Z} attempts. Last error: ${W}`,reason:"maxRetriesExceeded",errors:K});if(Q instanceof Error&&qP8.isInstance(Q)&&Q.isRetryable===!0&&Z<=Y)return await xP8(X),Oo1($,{maxRetries:Y,delayInMs:G*X,backoffFactor:G},K);if(Z===1)throw Q;throw new ws1({message:`Failed after ${Z} attempts with non-retryable error: '${W}'`,reason:"errorNotRetryable",errors:K})}}function y60({maxRetries:$}){if($!=null){if(!Number.isInteger($))throw new j5({parameter:"maxRetries",value:$,message:"maxRetries must be an integer"});if($<0)throw new j5({parameter:"maxRetries",value:$,message:"maxRetries must be >= 0"})}let Y=$!=null?$:2;return{maxRetries:Y,retry:x_8({maxRetries:Y})}}function jZ({operationId:$,telemetry:Y}){return{"operation.name":`${$}${(Y==null?void 0:Y.functionId)!=null?` ${Y.functionId}`:""}`,"resource.name":Y==null?void 0:Y.functionId,"ai.operationId":$,"ai.telemetry.functionId":Y==null?void 0:Y.functionId}}function b60({model:$,settings:Y,telemetry:X,headers:G}){var J;return{"ai.model.provider":$.provider,"ai.model.id":$.modelId,...Object.entries(Y).reduce((Q,[W,K])=>{return Q[`ai.settings.${W}`]=K,Q},{}),...Object.entries((J=X==null?void 0:X.metadata)!=null?J:{}).reduce((Q,[W,K])=>{return Q[`ai.telemetry.metadata.${W}`]=K,Q},{}),...Object.entries(G!=null?G:{}).reduce((Q,[W,K])=>{if(K!==void 0)Q[`ai.request.headers.${W}`]=K;return Q},{})}}function h60({isEnabled:$=!1,tracer:Y}={}){if(!$)return y_8;if(Y)return Y;return C_8.getTracer("ai")}function TZ({name:$,tracer:Y,attributes:X,fn:G,endWhenDone:J=!0}){return Y.startActiveSpan($,{attributes:X},async(Q)=>{try{let W=await G(Q);if(J)Q.end();return W}catch(W){try{hk0(Q,W)}finally{Q.end()}throw W}})}function hk0($,Y){if(Y instanceof Error)$.recordException({name:Y.name,message:Y.message,stack:Y.stack}),$.setStatus({code:k60.ERROR,message:Y.message});else $.setStatus({code:k60.ERROR})}function G7({telemetry:$,attributes:Y}){if(($==null?void 0:$.isEnabled)!==!0)return{};return Object.entries(Y).reduce((X,[G,J])=>{if(J===void 0)return X;if(typeof J==="object"&&"input"in J&&typeof J.input==="function"){if(($==null?void 0:$.recordInputs)===!1)return X;let Q=J.input();return Q===void 0?X:{...X,[G]:Q}}if(typeof J==="object"&&"output"in J&&typeof J.output==="function"){if(($==null?void 0:$.recordOutputs)===!1)return X;let Q=J.output();return Q===void 0?X:{...X,[G]:Q}}return{...X,[G]:J}},{})}function m_8($){return typeof $==="string"&&$.startsWith("SUQz")||typeof $!=="string"&&$.length>10&&$[0]===73&&$[1]===68&&$[2]===51?g_8($):$}function u_8({data:$,signatures:Y}){let X=m_8($);for(let G of Y)if(typeof X==="string"?X.startsWith(G.base64Prefix):X.length>=G.bytesPrefix.length&&G.bytesPrefix.every((J,Q)=>X[Q]===J))return G.mimeType;return}async function c_8({url:$}){var Y;let X=$.toString();try{let G=await fetch(X);if(!G.ok)throw new Dk0({url:X,statusCode:G.status,statusText:G.statusText});return{data:new Uint8Array(await G.arrayBuffer()),mimeType:(Y=G.headers.get("content-type"))!=null?Y:void 0}}catch(G){if(Dk0.isInstance(G))throw G;throw new Dk0({url:X,cause:G})}}function fk0($){if(typeof $==="string")return $;if($ instanceof ArrayBuffer)return Ek0(new Uint8Array($));return Ek0($)}function v60($){if($ instanceof Uint8Array)return $;if(typeof $==="string")try{return Ik0($)}catch(Y){throw new _s1({message:"Invalid data content. Content string is not a base64-encoded media.",content:$,cause:Y})}if($ instanceof ArrayBuffer)return new Uint8Array($);throw new _s1({content:$})}function i_8($){try{return new TextDecoder().decode($)}catch(Y){throw Error("Error decoding Uint8Array to text")}}function a_8($){try{let[Y,X]=$.split(",");return{mimeType:Y.split(";")[0].split(":")[1],base64Content:X}}catch(Y){return{mimeType:void 0,base64Content:void 0}}}async function t_({prompt:$,modelSupportsImageUrls:Y=!0,modelSupportsUrl:X=()=>!1,downloadImplementation:G=c_8}){let J=await o_8($.messages,G,Y,X);return[...$.system!=null?[{role:"system",content:$.system}]:[],...$.messages.map((Q)=>s_8(Q,J))]}function s_8($,Y){var X,G,J,Q,W,K;let Z=$.role;switch(Z){case"system":return{role:"system",content:$.content,providerMetadata:(X=$.providerOptions)!=null?X:$.experimental_providerMetadata};case"user":{if(typeof $.content==="string")return{role:"user",content:[{type:"text",text:$.content}],providerMetadata:(G=$.providerOptions)!=null?G:$.experimental_providerMetadata};return{role:"user",content:$.content.map((H)=>t_8(H,Y)).filter((H)=>H.type!=="text"||H.text!==""),providerMetadata:(J=$.providerOptions)!=null?J:$.experimental_providerMetadata}}case"assistant":{if(typeof $.content==="string")return{role:"assistant",content:[{type:"text",text:$.content}],providerMetadata:(Q=$.providerOptions)!=null?Q:$.experimental_providerMetadata};return{role:"assistant",content:$.content.filter((H)=>H.type!=="text"||H.text!=="").map((H)=>{var z;let V=(z=H.providerOptions)!=null?z:H.experimental_providerMetadata;switch(H.type){case"file":return{type:"file",data:H.data instanceof URL?H.data:fk0(H.data),filename:H.filename,mimeType:H.mimeType,providerMetadata:V};case"reasoning":return{type:"reasoning",text:H.text,signature:H.signature,providerMetadata:V};case"redacted-reasoning":return{type:"redacted-reasoning",data:H.data,providerMetadata:V};case"text":return{type:"text",text:H.text,providerMetadata:V};case"tool-call":return{type:"tool-call",toolCallId:H.toolCallId,toolName:H.toolName,args:H.args,providerMetadata:V}}}),providerMetadata:(W=$.providerOptions)!=null?W:$.experimental_providerMetadata}}case"tool":return{role:"tool",content:$.content.map((H)=>{var z;return{type:"tool-result",toolCallId:H.toolCallId,toolName:H.toolName,result:H.result,content:H.experimental_content,isError:H.isError,providerMetadata:(z=H.providerOptions)!=null?z:H.experimental_providerMetadata}}),providerMetadata:(K=$.providerOptions)!=null?K:$.experimental_providerMetadata};default:throw new r_8({role:Z})}}async function o_8($,Y,X,G){let J=$.filter((W)=>W.role==="user").map((W)=>W.content).filter((W)=>Array.isArray(W)).flat().filter((W)=>W.type==="image"||W.type==="file").filter((W)=>!(W.type==="image"&&X===!0)).map((W)=>W.type==="image"?W.image:W.data).map((W)=>typeof W==="string"&&(W.startsWith("http:")||W.startsWith("https:"))?new URL(W):W).filter((W)=>W instanceof URL).filter((W)=>!G(W)),Q=await Promise.all(J.map(async(W)=>({url:W,data:await Y({url:W})})));return Object.fromEntries(Q.map(({url:W,data:K})=>[W.toString(),K]))}function t_8($,Y){var X,G,J,Q;if($.type==="text")return{type:"text",text:$.text,providerMetadata:(X=$.providerOptions)!=null?X:$.experimental_providerMetadata};let W=$.mimeType,K,Z,H,z=$.type;switch(z){case"image":K=$.image;break;case"file":K=$.data;break;default:throw Error(`Unsupported part type: ${z}`)}try{Z=typeof K==="string"?new URL(K):K}catch(V){Z=K}if(Z instanceof URL)if(Z.protocol==="data:"){let{mimeType:V,base64Content:F}=a_8(Z.toString());if(V==null||F==null)throw Error(`Invalid data URL format in part ${z}`);W=V,H=v60(F)}else{let V=Y[Z.toString()];if(V)H=V.data,W!=null||(W=V.mimeType);else H=Z}else H=v60(Z);switch(z){case"image":{if(H instanceof Uint8Array)W=(G=u_8({data:H,signatures:f_8}))!=null?G:W;return{type:"image",image:H,mimeType:W,providerMetadata:(J=$.providerOptions)!=null?J:$.experimental_providerMetadata}}case"file":{if(W==null)throw Error("Mime type is missing for file part");return{type:"file",data:H instanceof Uint8Array?fk0(H):H,filename:$.filename,mimeType:W,providerMetadata:(Q=$.providerOptions)!=null?Q:$.experimental_providerMetadata}}}}function e_({maxTokens:$,temperature:Y,topP:X,topK:G,presencePenalty:J,frequencyPenalty:Q,stopSequences:W,seed:K}){if($!=null){if(!Number.isInteger($))throw new j5({parameter:"maxTokens",value:$,message:"maxTokens must be an integer"});if($<1)throw new j5({parameter:"maxTokens",value:$,message:"maxTokens must be >= 1"})}if(Y!=null){if(typeof Y!=="number")throw new j5({parameter:"temperature",value:Y,message:"temperature must be a number"})}if(X!=null){if(typeof X!=="number")throw new j5({parameter:"topP",value:X,message:"topP must be a number"})}if(G!=null){if(typeof G!=="number")throw new j5({parameter:"topK",value:G,message:"topK must be a number"})}if(J!=null){if(typeof J!=="number")throw new j5({parameter:"presencePenalty",value:J,message:"presencePenalty must be a number"})}if(Q!=null){if(typeof Q!=="number")throw new j5({parameter:"frequencyPenalty",value:Q,message:"frequencyPenalty must be a number"})}if(K!=null){if(!Number.isInteger(K))throw new j5({parameter:"seed",value:K,message:"seed must be an integer"})}return{maxTokens:$,temperature:Y!=null?Y:0,topP:X,topK:G,presencePenalty:J,frequencyPenalty:Q,stopSequences:W!=null&&W.length>0?W:void 0,seed:K}}function js1($){var Y,X,G;let J=[];for(let Q of $){let W;try{W=new URL(Q.url)}catch(K){throw Error(`Invalid URL: ${Q.url}`)}switch(W.protocol){case"http:":case"https:":{if((Y=Q.contentType)==null?void 0:Y.startsWith("image/"))J.push({type:"image",image:W});else{if(!Q.contentType)throw Error("If the attachment is not an image, it must specify a content type");J.push({type:"file",data:W,mimeType:Q.contentType})}break}case"data:":{let K,Z,H;try{[K,Z]=Q.url.split(","),H=K.split(";")[0].split(":")[1]}catch(z){throw Error(`Error processing data URL: ${Q.url}`)}if(H==null||Z==null)throw Error(`Invalid data URL format: ${Q.url}`);if((X=Q.contentType)==null?void 0:X.startsWith("image/"))J.push({type:"image",image:v60(Z)});else if((G=Q.contentType)==null?void 0:G.startsWith("text/"))J.push({type:"text",text:i_8(v60(Z))});else{if(!Q.contentType)throw Error("If the attachment is not an image or text, it must specify a content type");J.push({type:"file",data:Z,mimeType:Q.contentType})}break}default:throw Error(`Unsupported URL protocol: ${W.protocol}`)}}return J}function gk0($,Y){var X,G;let J=(X=Y==null?void 0:Y.tools)!=null?X:{},Q=[];for(let W=0;W<$.length;W++){let K=$[W],Z=W===$.length-1,{role:H,content:z,experimental_attachments:V}=K;switch(H){case"system":{Q.push({role:"system",content:z});break}case"user":{if(K.parts==null)Q.push({role:"user",content:V?[{type:"text",text:z},...js1(V)]:z});else{let F=K.parts.filter((L)=>L.type==="text").map((L)=>({type:"text",text:L.text}));Q.push({role:"user",content:V?[...F,...js1(V)]:F})}break}case"assistant":{if(K.parts!=null){let N=function(){let O=[];for(let M of B)switch(M.type){case"file":case"text":{O.push(M);break}case"reasoning":{for(let R of M.details)switch(R.type){case"text":O.push({type:"reasoning",text:R.text,signature:R.signature});break;case"redacted":O.push({type:"redacted-reasoning",data:R.data});break}break}case"tool-invocation":O.push({type:"tool-call",toolCallId:M.toolInvocation.toolCallId,toolName:M.toolInvocation.toolName,args:M.toolInvocation.args});break;default:throw Error(`Unsupported part: ${M}`)}Q.push({role:"assistant",content:O});let E=B.filter((M)=>M.type==="tool-invocation").map((M)=>M.toolInvocation);if(E.length>0)Q.push({role:"tool",content:E.map((M)=>{if(!("result"in M))throw new Nk0({originalMessage:K,message:"ToolInvocation must have a result: "+JSON.stringify(M)});let{toolCallId:R,toolName:q,result:_}=M,P=J[q];return(P==null?void 0:P.experimental_toToolResultContent)!=null?{type:"tool-result",toolCallId:R,toolName:q,result:P.experimental_toToolResultContent(_),experimental_content:P.experimental_toToolResultContent(_)}:{type:"tool-result",toolCallId:R,toolName:q,result:_}})});B=[],A=!1,D++},D=0,A=!1,B=[];for(let O of K.parts)switch(O.type){case"text":{if(A)N();B.push(O);break}case"file":case"reasoning":{B.push(O);break}case"tool-invocation":{if(((G=O.toolInvocation.step)!=null?G:0)!==D)N();B.push(O),A=!0;break}}N();break}let F=K.toolInvocations;if(F==null||F.length===0){Q.push({role:"assistant",content:z});break}let L=F.reduce((N,D)=>{var A;return Math.max(N,(A=D.step)!=null?A:0)},0);for(let N=0;N<=L;N++){let D=F.filter((A)=>{var B;return((B=A.step)!=null?B:0)===N});if(D.length===0)continue;Q.push({role:"assistant",content:[...Z&&z&&N===0?[{type:"text",text:z}]:[],...D.map(({toolCallId:A,toolName:B,args:O})=>({type:"tool-call",toolCallId:A,toolName:B,args:O}))]}),Q.push({role:"tool",content:D.map((A)=>{if(!("result"in A))throw new Nk0({originalMessage:K,message:"ToolInvocation must have a result: "+JSON.stringify(A)});let{toolCallId:B,toolName:O,result:E}=A,M=J[O];return(M==null?void 0:M.experimental_toToolResultContent)!=null?{type:"tool-result",toolCallId:B,toolName:O,result:M.experimental_toToolResultContent(E),experimental_content:M.experimental_toToolResultContent(E)}:{type:"tool-result",toolCallId:B,toolName:O,result:E}})})}if(z&&!Z)Q.push({role:"assistant",content:z});break}case"data":break;default:throw new Nk0({originalMessage:K,message:`Unsupported role: ${H}`})}}return Q}function $j({prompt:$,tools:Y}){if($.prompt==null&&$.messages==null)throw new oL({prompt:$,message:"prompt or messages must be defined"});if($.prompt!=null&&$.messages!=null)throw new oL({prompt:$,message:"prompt and messages cannot be defined at the same time"});if($.system!=null&&typeof $.system!=="string")throw new oL({prompt:$,message:"system must be a string"});if($.prompt!=null){if(typeof $.prompt!=="string")throw new oL({prompt:$,message:"prompt must be a string"});return{type:"prompt",system:$.system,messages:[{role:"user",content:$.prompt}]}}if($.messages!=null){let G=zj8($.messages)==="ui-messages"?gk0($.messages,{tools:Y}):$.messages;if(G.length===0)throw new oL({prompt:$,message:"messages must not be empty"});let J=hO({value:G,schema:U.array(Hj8)});if(!J.success)throw new oL({prompt:$,message:["message must be a CoreMessage or a UI message",`Validation error: ${J.error.message}`].join(`
`),cause:J.error});return{type:"messages",messages:G,system:$.system}}throw Error("unreachable")}function zj8($){if(!Array.isArray($))throw new oL({prompt:$,message:["messages must be an array of CoreMessage or UIMessage",`Received non-array value: ${JSON.stringify($)}`].join(`
`),cause:$});if($.length===0)return"messages";let Y=$.map(Vj8);if(Y.some((G)=>G==="has-ui-specific-parts"))return"ui-messages";let X=Y.findIndex((G)=>G!=="has-core-specific-parts"&&G!=="message");if(X===-1)return"messages";throw new oL({prompt:$,message:["messages must be an array of CoreMessage or UIMessage",`Received message of type: "${Y[X]}" at index ${X}`,`messages[${X}]: ${JSON.stringify($[X])}`].join(`
`),cause:$})}function Vj8($){if(typeof $==="object"&&$!==null&&($.role==="function"||$.role==="data"||("toolInvocations"in $)||("parts"in $)||("experimental_attachments"in $)))return"has-ui-specific-parts";else if(typeof $==="object"&&$!==null&&"content"in $&&(Array.isArray($.content)||("experimental_providerMetadata"in $)||("providerOptions"in $)))return"has-core-specific-parts";else if(typeof $==="object"&&$!==null&&"role"in $&&"content"in $&&typeof $.content==="string"&&["system","user","assistant","tool"].includes($.role))return"message";else return"other"}function fz({promptTokens:$,completionTokens:Y}){return{promptTokens:$,completionTokens:Y,totalTokens:$+Y}}function go1($,Y){return{promptTokens:$.promptTokens+Y.promptTokens,completionTokens:$.completionTokens+Y.completionTokens,totalTokens:$.totalTokens+Y.totalTokens}}function rf({prompt:$,schema:Y,schemaPrefix:X=Y!=null?Fj8:void 0,schemaSuffix:G=Y!=null?Lj8:Dj8}){return[$!=null&&$.length>0?$:void 0,$!=null&&$.length>0?"":void 0,X,Y!=null?JSON.stringify(Y):void 0,G].filter((J)=>J!=null).join(`
`)}function yO($){let Y=$.pipeThrough(new TransformStream);return Y[Symbol.asyncIterator]=()=>{let X=Y.getReader();return{async next(){let{done:G,value:J}=await X.read();return G?{done:!0,value:void 0}:{done:!1,value:J}}}},Y}function mo1({output:$,schema:Y,enumValues:X}){switch($){case"object":return Aj8(s_(Y));case"array":return Bj8(s_(Y));case"enum":return Oj8(X);case"no-schema":return Nj8;default:throw Error(`Unsupported output: ${$}`)}}function uo1({output:$,mode:Y,schema:X,schemaName:G,schemaDescription:J,enumValues:Q}){if($!=null&&$!=="object"&&$!=="array"&&$!=="enum"&&$!=="no-schema")throw new j5({parameter:"output",value:$,message:"Invalid output type."});if($==="no-schema"){if(Y==="auto"||Y==="tool")throw new j5({parameter:"mode",value:Y,message:'Mode must be "json" for no-schema output.'});if(X!=null)throw new j5({parameter:"schema",value:X,message:"Schema is not supported for no-schema output."});if(J!=null)throw new j5({parameter:"schemaDescription",value:J,message:"Schema description is not supported for no-schema output."});if(G!=null)throw new j5({parameter:"schemaName",value:G,message:"Schema name is not supported for no-schema output."});if(Q!=null)throw new j5({parameter:"enumValues",value:Q,message:"Enum values are not supported for no-schema output."})}if($==="object"){if(X==null)throw new j5({parameter:"schema",value:X,message:"Schema is required for object output."});if(Q!=null)throw new j5({parameter:"enumValues",value:Q,message:"Enum values are not supported for object output."})}if($==="array"){if(X==null)throw new j5({parameter:"schema",value:X,message:"Element schema is required for array output."});if(Q!=null)throw new j5({parameter:"enumValues",value:Q,message:"Enum values are not supported for array output."})}if($==="enum"){if(X!=null)throw new j5({parameter:"schema",value:X,message:"Schema is not supported for enum output."});if(J!=null)throw new j5({parameter:"schemaDescription",value:J,message:"Schema description is not supported for enum output."});if(G!=null)throw new j5({parameter:"schemaName",value:G,message:"Schema name is not supported for enum output."});if(Q==null)throw new j5({parameter:"enumValues",value:Q,message:"Enum values are required for enum output."});for(let W of Q)if(typeof W!=="string")throw new j5({parameter:"enumValues",value:W,message:"Enum values must be strings."})}}function f60($){let Y=$.map((X)=>{return{...X,content:typeof X.content==="string"?X.content:X.content.map(Ej8)}});return JSON.stringify(Y)}function Ej8($){if($.type==="image")return{...$,image:$.image instanceof Uint8Array?fk0($.image):$.image};return $}async function po1({model:$,enum:Y,schema:X,schemaName:G,schemaDescription:J,mode:Q,output:W="object",system:K,prompt:Z,messages:H,maxRetries:z,abortSignal:V,headers:F,experimental_repairText:L,experimental_telemetry:N,experimental_providerMetadata:D,providerOptions:A=D,_internal:{generateId:B=Mj8,currentDate:O=()=>new Date}={},...E}){if(typeof $==="string"||$.specificationVersion!=="v1")throw new x60;uo1({output:W,mode:Q,schema:X,schemaName:G,schemaDescription:J,enumValues:Y});let{maxRetries:M,retry:R}=y60({maxRetries:z}),q=mo1({output:W,schema:X,enumValues:Y});if(q.type==="no-schema"&&Q===void 0)Q="json";let _=b60({model:$,telemetry:N,headers:F,settings:{...E,maxRetries:M}}),P=h60(N);return TZ({name:"ai.generateObject",attributes:G7({telemetry:N,attributes:{...jZ({operationId:"ai.generateObject",telemetry:N}),..._,"ai.prompt":{input:()=>JSON.stringify({system:K,prompt:Z,messages:H})},"ai.schema":q.jsonSchema!=null?{input:()=>JSON.stringify(q.jsonSchema)}:void 0,"ai.schema.name":G,"ai.schema.description":J,"ai.settings.output":q.type,"ai.settings.mode":Q}}),tracer:P,fn:async(w)=>{var j,C,k,S;if(Q==="auto"||Q==null)Q=$.defaultObjectGenerationMode;let I,v,x,y,d,u,b,g,p;switch(Q){case"json":{let t=$j({prompt:{system:q.jsonSchema==null?rf({prompt:K}):$.supportsStructuredOutputs?K:rf({prompt:K,schema:q.jsonSchema}),prompt:Z,messages:H},tools:void 0}),s=await t_({prompt:t,modelSupportsImageUrls:$.supportsImageUrls,modelSupportsUrl:(j=$.supportsUrl)==null?void 0:j.bind($)}),K0=await R(()=>TZ({name:"ai.generateObject.doGenerate",attributes:G7({telemetry:N,attributes:{...jZ({operationId:"ai.generateObject.doGenerate",telemetry:N}),..._,"ai.prompt.format":{input:()=>t.type},"ai.prompt.messages":{input:()=>JSON.stringify(s)},"ai.settings.mode":Q,"gen_ai.system":$.provider,"gen_ai.request.model":$.modelId,"gen_ai.request.frequency_penalty":E.frequencyPenalty,"gen_ai.request.max_tokens":E.maxTokens,"gen_ai.request.presence_penalty":E.presencePenalty,"gen_ai.request.temperature":E.temperature,"gen_ai.request.top_k":E.topK,"gen_ai.request.top_p":E.topP}}),tracer:P,fn:async(X0)=>{var a,Q0,e,m,$0,Y0;let Z0=await $.doGenerate({mode:{type:"object-json",schema:q.jsonSchema,name:G,description:J},...e_(E),inputFormat:t.type,prompt:s,providerMetadata:A,abortSignal:V,headers:F}),F0={id:(Q0=(a=Z0.response)==null?void 0:a.id)!=null?Q0:B(),timestamp:(m=(e=Z0.response)==null?void 0:e.timestamp)!=null?m:O(),modelId:(Y0=($0=Z0.response)==null?void 0:$0.modelId)!=null?Y0:$.modelId};if(Z0.text===void 0)throw new gz({message:"No object generated: the model did not return a response.",response:F0,usage:fz(Z0.usage),finishReason:Z0.finishReason});return X0.setAttributes(G7({telemetry:N,attributes:{"ai.response.finishReason":Z0.finishReason,"ai.response.object":{output:()=>Z0.text},"ai.response.id":F0.id,"ai.response.model":F0.modelId,"ai.response.timestamp":F0.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(Z0.providerMetadata),"ai.usage.promptTokens":Z0.usage.promptTokens,"ai.usage.completionTokens":Z0.usage.completionTokens,"gen_ai.response.finish_reasons":[Z0.finishReason],"gen_ai.response.id":F0.id,"gen_ai.response.model":F0.modelId,"gen_ai.usage.prompt_tokens":Z0.usage.promptTokens,"gen_ai.usage.completion_tokens":Z0.usage.completionTokens}})),{...Z0,objectText:Z0.text,responseData:F0}}}));I=K0.objectText,v=K0.finishReason,x=K0.usage,y=K0.warnings,d=K0.rawResponse,g=K0.logprobs,p=K0.providerMetadata,b=(C=K0.request)!=null?C:{},u=K0.responseData;break}case"tool":{let t=$j({prompt:{system:K,prompt:Z,messages:H},tools:void 0}),s=await t_({prompt:t,modelSupportsImageUrls:$.supportsImageUrls,modelSupportsUrl:(k=$.supportsUrl)==null?void 0:k.bind($)}),K0=t.type,X0=await R(()=>TZ({name:"ai.generateObject.doGenerate",attributes:G7({telemetry:N,attributes:{...jZ({operationId:"ai.generateObject.doGenerate",telemetry:N}),..._,"ai.prompt.format":{input:()=>K0},"ai.prompt.messages":{input:()=>f60(s)},"ai.settings.mode":Q,"gen_ai.system":$.provider,"gen_ai.request.model":$.modelId,"gen_ai.request.frequency_penalty":E.frequencyPenalty,"gen_ai.request.max_tokens":E.maxTokens,"gen_ai.request.presence_penalty":E.presencePenalty,"gen_ai.request.temperature":E.temperature,"gen_ai.request.top_k":E.topK,"gen_ai.request.top_p":E.topP}}),tracer:P,fn:async(a)=>{var Q0,e,m,$0,Y0,Z0,F0,D0;let O0=await $.doGenerate({mode:{type:"object-tool",tool:{type:"function",name:G!=null?G:"json",description:J!=null?J:"Respond with a JSON object.",parameters:q.jsonSchema}},...e_(E),inputFormat:K0,prompt:s,providerMetadata:A,abortSignal:V,headers:F}),R0=(e=(Q0=O0.toolCalls)==null?void 0:Q0[0])==null?void 0:e.args,P0={id:($0=(m=O0.response)==null?void 0:m.id)!=null?$0:B(),timestamp:(Z0=(Y0=O0.response)==null?void 0:Y0.timestamp)!=null?Z0:O(),modelId:(D0=(F0=O0.response)==null?void 0:F0.modelId)!=null?D0:$.modelId};if(R0===void 0)throw new gz({message:"No object generated: the tool was not called.",response:P0,usage:fz(O0.usage),finishReason:O0.finishReason});return a.setAttributes(G7({telemetry:N,attributes:{"ai.response.finishReason":O0.finishReason,"ai.response.object":{output:()=>R0},"ai.response.id":P0.id,"ai.response.model":P0.modelId,"ai.response.timestamp":P0.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(O0.providerMetadata),"ai.usage.promptTokens":O0.usage.promptTokens,"ai.usage.completionTokens":O0.usage.completionTokens,"gen_ai.response.finish_reasons":[O0.finishReason],"gen_ai.response.id":P0.id,"gen_ai.response.model":P0.modelId,"gen_ai.usage.input_tokens":O0.usage.promptTokens,"gen_ai.usage.output_tokens":O0.usage.completionTokens}})),{...O0,objectText:R0,responseData:P0}}}));I=X0.objectText,v=X0.finishReason,x=X0.usage,y=X0.warnings,d=X0.rawResponse,g=X0.logprobs,p=X0.providerMetadata,b=(S=X0.request)!=null?S:{},u=X0.responseData;break}case void 0:throw Error("Model does not have a default object generation mode.");default:throw Error(`Unsupported mode: ${Q}`)}function h(t){let s=df({text:t});if(!s.success)throw new gz({message:"No object generated: could not parse the response.",cause:s.error,text:t,response:u,usage:fz(x),finishReason:v});let K0=q.validateFinalResult(s.value,{text:t,response:u,usage:fz(x)});if(!K0.success)throw new gz({message:"No object generated: response did not match schema.",cause:K0.error,text:t,response:u,usage:fz(x),finishReason:v});return K0.value}let n;try{n=h(I)}catch(t){if(L!=null&&gz.isInstance(t)&&(Bk0.isInstance(t.cause)||bO.isInstance(t.cause))){let s=await L({text:I,error:t.cause});if(s===null)throw t;n=h(s)}else throw t}return w.setAttributes(G7({telemetry:N,attributes:{"ai.response.finishReason":v,"ai.response.object":{output:()=>JSON.stringify(n)},"ai.usage.promptTokens":x.promptTokens,"ai.usage.completionTokens":x.completionTokens}})),new Rj8({object:n,finishReason:v,usage:fz(x),warnings:y,request:b,response:{...u,headers:d==null?void 0:d.headers,body:d==null?void 0:d.body},logprobs:g,providerMetadata:p})}})}function Ts1(){let $,Y;return{promise:new Promise((G,J)=>{$=G,Y=J}),resolve:$,reject:Y}}function do1(){let $=[],Y=null,X=!1,G=Ts1(),J=async()=>{if(X&&$.length===0){Y==null||Y.close();return}if($.length===0)return G=Ts1(),await G.promise,J();try{let{value:Q,done:W}=await $[0].read();if(W){if($.shift(),$.length>0)await J();else if(X)Y==null||Y.close()}else Y==null||Y.enqueue(Q)}catch(Q){if(Y==null||Y.error(Q),$.shift(),X&&$.length===0)Y==null||Y.close()}};return{stream:new ReadableStream({start(Q){Y=Q},pull:J,async cancel(){for(let Q of $)await Q.cancel();$=[],X=!0}}),addStream:(Q)=>{if(X)throw Error("Cannot add inner stream: outer stream is closed");$.push(Q.getReader()),G.resolve()},close:()=>{if(X=!0,G.resolve(),$.length===0)Y==null||Y.close()},terminate:()=>{X=!0,G.resolve(),$.forEach((Q)=>Q.cancel()),$=[],Y==null||Y.close()}}}function co1(){var $,Y;return(Y=($=globalThis==null?void 0:globalThis.performance)==null?void 0:$.now())!=null?Y:Date.now()}function lo1({model:$,schema:Y,schemaName:X,schemaDescription:G,mode:J,output:Q="object",system:W,prompt:K,messages:Z,maxRetries:H,abortSignal:z,headers:V,experimental_telemetry:F,experimental_providerMetadata:L,providerOptions:N=L,onError:D,onFinish:A,_internal:{generateId:B=qj8,currentDate:O=()=>new Date,now:E=co1}={},...M}){if(typeof $==="string"||$.specificationVersion!=="v1")throw new x60;uo1({output:Q,mode:J,schema:Y,schemaName:X,schemaDescription:G});let R=mo1({output:Q,schema:Y});if(R.type==="no-schema"&&J===void 0)J="json";return new Pj8({model:$,telemetry:F,headers:V,settings:M,maxRetries:H,abortSignal:z,outputStrategy:R,system:W,prompt:K,messages:Z,schemaName:X,schemaDescription:G,providerOptions:N,mode:J,onError:D,onFinish:A,generateId:B,currentDate:O,now:E})}function jj8($){return $!=null&&Object.keys($).length>0}function $t1({tools:$,toolChoice:Y,activeTools:X}){if(!jj8($))return{tools:void 0,toolChoice:void 0};return{tools:(X!=null?Object.entries($).filter(([J])=>X.includes(J)):Object.entries($)).map(([J,Q])=>{let W=Q.type;switch(W){case void 0:case"function":return{type:"function",name:J,description:Q.description,parameters:s_(Q.parameters).jsonSchema};case"provider-defined":return{type:"provider-defined",name:J,id:Q.id,args:Q.args};default:throw Error(`Unsupported tool type: ${W}`)}}),toolChoice:Y==null?{type:"auto"}:typeof Y==="string"?{type:Y}:{type:"tool",toolName:Y.toolName}}}function Yt1($){let Y=$.match(Tj8);return Y?{prefix:Y[1],whitespace:Y[2],suffix:Y[3]}:void 0}function Ij8($){let Y=Yt1($);return Y?Y.prefix+Y.whitespace:$}async function Vt1({toolCall:$,tools:Y,repairToolCall:X,system:G,messages:J}){if(Y==null)throw new _k0({toolName:$.toolName});try{return await Is1({toolCall:$,tools:Y})}catch(Q){if(X==null||!(_k0.isInstance(Q)||Qt1.isInstance(Q)))throw Q;let W=null;try{W=await X({toolCall:$,tools:Y,parameterSchema:({toolName:K})=>s_(Y[K].parameters).jsonSchema,system:G,messages:J,error:Q})}catch(K){throw new vj8({cause:K,originalError:Q})}if(W==null)throw Q;return await Is1({toolCall:W,tools:Y})}}async function Is1({toolCall:$,tools:Y}){let X=$.toolName,G=Y[X];if(G==null)throw new _k0({toolName:$.toolName,availableTools:Object.keys(Y)});let J=s_(G.parameters),Q=$.args.trim()===""?hO({value:{},schema:J}):df({text:$.args,schema:J});if(Q.success===!1)throw new Qt1({toolName:X,toolArgs:$.args,cause:Q.error});return{type:"tool-call",toolCallId:$.toolCallId,toolName:X,args:Q.value}}function jk0($){let Y=$.filter((X)=>X.type==="text").map((X)=>X.text).join("");return Y.length>0?Y:void 0}function Tk0({text:$="",files:Y,reasoning:X,tools:G,toolCalls:J,toolResults:Q,messageId:W,generateMessageId:K}){let Z=[],H=[];if(X.length>0)H.push(...X.map((z)=>z.type==="text"?{...z,type:"reasoning"}:{...z,type:"redacted-reasoning"}));if(Y.length>0)H.push(...Y.map((z)=>({type:"file",data:z.base64,mimeType:z.mimeType})));if($.length>0)H.push({type:"text",text:$});if(J.length>0)H.push(...J);if(H.length>0)Z.push({role:"assistant",content:H,id:W});if(Q.length>0)Z.push({role:"tool",id:K(),content:Q.map((z)=>{let V=G[z.toolName];return(V==null?void 0:V.experimental_toToolResultContent)!=null?{type:"tool-result",toolCallId:z.toolCallId,toolName:z.toolName,result:V.experimental_toToolResultContent(z.result),experimental_content:V.experimental_toToolResultContent(z.result)}:{type:"tool-result",toolCallId:z.toolCallId,toolName:z.toolName,result:z.result}})});return Z}async function Ft1({model:$,tools:Y,toolChoice:X,system:G,prompt:J,messages:Q,maxRetries:W,abortSignal:K,headers:Z,maxSteps:H=1,experimental_generateMessageId:z=yj8,experimental_output:V,experimental_continueSteps:F=!1,experimental_telemetry:L,experimental_providerMetadata:N,providerOptions:D=N,experimental_activeTools:A,experimental_prepareStep:B,experimental_repairToolCall:O,_internal:{generateId:E=xj8,currentDate:M=()=>new Date}={},onStepFinish:R,...q}){var _;if(typeof $==="string"||$.specificationVersion!=="v1")throw new x60;if(H<1)throw new j5({parameter:"maxSteps",value:H,message:"maxSteps must be at least 1"});let{maxRetries:P,retry:w}=y60({maxRetries:W}),j=b60({model:$,telemetry:L,headers:Z,settings:{...q,maxRetries:P}}),C=$j({prompt:{system:(_=V==null?void 0:V.injectIntoSystemPrompt({system:G,model:$}))!=null?_:G,prompt:J,messages:Q},tools:Y}),k=h60(L);return TZ({name:"ai.generateText",attributes:G7({telemetry:L,attributes:{...jZ({operationId:"ai.generateText",telemetry:L}),...j,"ai.model.provider":$.provider,"ai.model.id":$.modelId,"ai.prompt":{input:()=>JSON.stringify({system:G,prompt:J,messages:Q})},"ai.settings.maxSteps":H}}),tracer:k,fn:async(S)=>{var I,v,x,y,d,u,b,g,p,h,n,t,s,K0;let X0=e_(q),a,Q0=[],e=[],m=[],$0=0,Y0=[],Z0="",F0=[],D0=[],O0={completionTokens:0,promptTokens:0,totalTokens:0},R0="initial";do{let P0=$0===0?C.type:"messages",f0=[...C.messages,...Y0],p0=await(B==null?void 0:B({model:$,steps:D0,maxSteps:H,stepNumber:$0})),U4=(I=p0==null?void 0:p0.toolChoice)!=null?I:X,P1=(v=p0==null?void 0:p0.experimental_activeTools)!=null?v:A,d1=(x=p0==null?void 0:p0.model)!=null?x:$,C0=await t_({prompt:{system:C.system,messages:f0},modelSupportsImageUrls:d1.supportsImageUrls,modelSupportsUrl:(y=d1.supportsUrl)==null?void 0:y.bind(d1)}),n0={type:"regular",...$t1({tools:Y,toolChoice:U4,activeTools:P1})};a=await w(()=>TZ({name:"ai.generateText.doGenerate",attributes:G7({telemetry:L,attributes:{...jZ({operationId:"ai.generateText.doGenerate",telemetry:L}),...j,"ai.model.provider":d1.provider,"ai.model.id":d1.modelId,"ai.prompt.format":{input:()=>P0},"ai.prompt.messages":{input:()=>f60(C0)},"ai.prompt.tools":{input:()=>{var r4;return(r4=n0.tools)==null?void 0:r4.map((T6)=>JSON.stringify(T6))}},"ai.prompt.toolChoice":{input:()=>n0.toolChoice!=null?JSON.stringify(n0.toolChoice):void 0},"gen_ai.system":d1.provider,"gen_ai.request.model":d1.modelId,"gen_ai.request.frequency_penalty":q.frequencyPenalty,"gen_ai.request.max_tokens":q.maxTokens,"gen_ai.request.presence_penalty":q.presencePenalty,"gen_ai.request.stop_sequences":q.stopSequences,"gen_ai.request.temperature":q.temperature,"gen_ai.request.top_k":q.topK,"gen_ai.request.top_p":q.topP}}),tracer:k,fn:async(r4)=>{var T6,p6,n6,Z1,J4,I6;let t4=await d1.doGenerate({mode:n0,...X0,inputFormat:P0,responseFormat:V==null?void 0:V.responseFormat({model:$}),prompt:C0,providerMetadata:D,abortSignal:K,headers:Z}),a1={id:(p6=(T6=t4.response)==null?void 0:T6.id)!=null?p6:E(),timestamp:(Z1=(n6=t4.response)==null?void 0:n6.timestamp)!=null?Z1:M(),modelId:(I6=(J4=t4.response)==null?void 0:J4.modelId)!=null?I6:d1.modelId};return r4.setAttributes(G7({telemetry:L,attributes:{"ai.response.finishReason":t4.finishReason,"ai.response.text":{output:()=>t4.text},"ai.response.toolCalls":{output:()=>JSON.stringify(t4.toolCalls)},"ai.response.id":a1.id,"ai.response.model":a1.modelId,"ai.response.timestamp":a1.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(t4.providerMetadata),"ai.usage.promptTokens":t4.usage.promptTokens,"ai.usage.completionTokens":t4.usage.completionTokens,"gen_ai.response.finish_reasons":[t4.finishReason],"gen_ai.response.id":a1.id,"gen_ai.response.model":a1.modelId,"gen_ai.usage.input_tokens":t4.usage.promptTokens,"gen_ai.usage.output_tokens":t4.usage.completionTokens}})),{...t4,response:a1}}})),Q0=await Promise.all(((d=a.toolCalls)!=null?d:[]).map((r4)=>Vt1({toolCall:r4,tools:Y,repairToolCall:O,system:G,messages:f0}))),e=Y==null?[]:await bj8({toolCalls:Q0,tools:Y,tracer:k,telemetry:L,messages:f0,abortSignal:K});let J0=fz(a.usage);O0=go1(O0,J0);let B0="done";if(++$0<H){if(F&&a.finishReason==="length"&&Q0.length===0)B0="continue";else if(Q0.length>0&&e.length===Q0.length)B0="tool-result"}let Y1=(u=a.text)!=null?u:"",c1=R0==="continue"&&Z0.trimEnd()!==Z0?Y1.trimStart():Y1,C4=B0==="continue"?Ij8(c1):c1;if(Z0=B0==="continue"||R0==="continue"?Z0+C4:C4,m=Cs1(a.reasoning),F0.push(...(b=a.sources)!=null?b:[]),R0==="continue"){let r4=Y0[Y0.length-1];if(typeof r4.content==="string")r4.content+=C4;else r4.content.push({text:C4,type:"text"})}else Y0.push(...Tk0({text:Z0,files:Ak0(a.files),reasoning:Cs1(a.reasoning),tools:Y!=null?Y:{},toolCalls:Q0,toolResults:e,messageId:z(),generateMessageId:z}));let c4={stepType:R0,text:C4,reasoning:jk0(m),reasoningDetails:m,files:Ak0(a.files),sources:(g=a.sources)!=null?g:[],toolCalls:Q0,toolResults:e,finishReason:a.finishReason,usage:J0,warnings:a.warnings,logprobs:a.logprobs,request:(p=a.request)!=null?p:{},response:{...a.response,headers:(h=a.rawResponse)==null?void 0:h.headers,body:(n=a.rawResponse)==null?void 0:n.body,messages:structuredClone(Y0)},providerMetadata:a.providerMetadata,experimental_providerMetadata:a.providerMetadata,isContinued:B0==="continue"};D0.push(c4),await(R==null?void 0:R(c4)),R0=B0}while(R0!=="done");return S.setAttributes(G7({telemetry:L,attributes:{"ai.response.finishReason":a.finishReason,"ai.response.text":{output:()=>a.text},"ai.response.toolCalls":{output:()=>JSON.stringify(a.toolCalls)},"ai.usage.promptTokens":a.usage.promptTokens,"ai.usage.completionTokens":a.usage.completionTokens,"ai.response.providerMetadata":JSON.stringify(a.providerMetadata)}})),new hj8({text:Z0,files:Ak0(a.files),reasoning:jk0(m),reasoningDetails:m,sources:F0,outputResolver:()=>{if(V==null)throw new ao1;return V.parseOutput({text:Z0},{response:a.response,usage:O0,finishReason:a.finishReason})},toolCalls:Q0,toolResults:e,finishReason:a.finishReason,usage:O0,warnings:a.warnings,request:(t=a.request)!=null?t:{},response:{...a.response,headers:(s=a.rawResponse)==null?void 0:s.headers,body:(K0=a.rawResponse)==null?void 0:K0.body,messages:Y0},logprobs:a.logprobs,steps:D0,providerMetadata:a.providerMetadata})}})}async function bj8({toolCalls:$,tools:Y,tracer:X,telemetry:G,messages:J,abortSignal:Q}){return(await Promise.all($.map(async({toolCallId:K,toolName:Z,args:H})=>{let z=Y[Z];if((z==null?void 0:z.execute)==null)return;let V=await TZ({name:"ai.toolCall",attributes:G7({telemetry:G,attributes:{...jZ({operationId:"ai.toolCall",telemetry:G}),"ai.toolCall.name":Z,"ai.toolCall.id":K,"ai.toolCall.args":{output:()=>JSON.stringify(H)}}}),tracer:X,fn:async(F)=>{try{let L=await z.execute(H,{toolCallId:K,messages:J,abortSignal:Q});try{F.setAttributes(G7({telemetry:G,attributes:{"ai.toolCall.result":{output:()=>JSON.stringify(L)}}}))}catch(N){}return L}catch(L){throw hk0(F,L),new eo1({toolCallId:K,toolName:Z,toolArgs:H,cause:L})}}});return{type:"tool-result",toolCallId:K,toolName:Z,args:H,result:V}}))).filter((K)=>K!=null)}function Cs1($){if($==null)return[];if(typeof $==="string")return[{type:"text",text:$}];return $}function Ak0($){var Y;return(Y=$==null?void 0:$.map((X)=>new Eo1(X)))!=null?Y:[]}function pj8($){return $===void 0?[]:Array.isArray($)?$:[$]}async function dj8({stream:$,onError:Y}){let X=$.getReader();try{while(!0){let{done:G}=await X.read();if(G)break}}catch(G){Y==null||Y(G)}finally{X.releaseLock()}}function mk0($,Y){let X=$.getReader(),G=Y.getReader(),J=void 0,Q=void 0,W=!1,K=!1;async function Z(z){try{if(J==null)J=X.read();let V=await J;if(J=void 0,!V.done)z.enqueue(V.value);else z.close()}catch(V){z.error(V)}}async function H(z){try{if(Q==null)Q=G.read();let V=await Q;if(Q=void 0,!V.done)z.enqueue(V.value);else z.close()}catch(V){z.error(V)}}return new ReadableStream({async pull(z){try{if(W){await H(z);return}if(K){await Z(z);return}if(J==null)J=X.read();if(Q==null)Q=G.read();let{result:V,reader:F}=await Promise.race([J.then((L)=>({result:L,reader:X})),Q.then((L)=>({result:L,reader:G}))]);if(!V.done)z.enqueue(V.value);if(F===X){if(J=void 0,V.done)await H(z),W=!0}else if(Q=void 0,V.done)K=!0,await Z(z)}catch(V){z.error(V)}},cancel(){X.cancel(),G.cancel()}})}function cj8({tools:$,generatorStream:Y,toolCallStreaming:X,tracer:G,telemetry:J,system:Q,messages:W,abortSignal:K,repairToolCall:Z}){let H=null,z=new ReadableStream({start(B){H=B}}),V={},F=new Set,L=!1,N=void 0;function D(){if(L&&F.size===0){if(N!=null)H.enqueue(N);H.close()}}let A=new TransformStream({async transform(B,O){let E=B.type;switch(E){case"text-delta":case"reasoning":case"reasoning-signature":case"redacted-reasoning":case"source":case"response-metadata":case"error":{O.enqueue(B);break}case"file":{O.enqueue(new h_8({data:B.data,mimeType:B.mimeType}));break}case"tool-call-delta":{if(X){if(!V[B.toolCallId])O.enqueue({type:"tool-call-streaming-start",toolCallId:B.toolCallId,toolName:B.toolName}),V[B.toolCallId]=!0;O.enqueue({type:"tool-call-delta",toolCallId:B.toolCallId,toolName:B.toolName,argsTextDelta:B.argsTextDelta})}break}case"tool-call":{try{let M=await Vt1({toolCall:B,tools:$,repairToolCall:Z,system:Q,messages:W});O.enqueue(M);let R=$[M.toolName];if(R.execute!=null){let q=yP8();F.add(q),TZ({name:"ai.toolCall",attributes:G7({telemetry:J,attributes:{...jZ({operationId:"ai.toolCall",telemetry:J}),"ai.toolCall.name":M.toolName,"ai.toolCall.id":M.toolCallId,"ai.toolCall.args":{output:()=>JSON.stringify(M.args)}}}),tracer:G,fn:async(_)=>R.execute(M.args,{toolCallId:M.toolCallId,messages:W,abortSignal:K}).then((P)=>{H.enqueue({...M,type:"tool-result",result:P}),F.delete(q),D();try{_.setAttributes(G7({telemetry:J,attributes:{"ai.toolCall.result":{output:()=>JSON.stringify(P)}}}))}catch(w){}},(P)=>{hk0(_,P),H.enqueue({type:"error",error:new eo1({toolCallId:M.toolCallId,toolName:M.toolName,toolArgs:M.args,cause:P})}),F.delete(q),D()})})}}catch(M){H.enqueue({type:"error",error:M})}break}case"finish":{N={type:"finish",finishReason:B.finishReason,logprobs:B.logprobs,usage:fz(B.usage),experimental_providerMetadata:B.providerMetadata};break}default:throw Error(`Unhandled chunk type: ${E}`)}},flush(){L=!0,D()}});return new ReadableStream({async start(B){return Promise.all([Y.pipeThrough(A).pipeTo(new WritableStream({write(O){B.enqueue(O)},close(){}})),z.pipeTo(new WritableStream({write(O){B.enqueue(O)},close(){B.close()}}))])}})}function At1({model:$,tools:Y,toolChoice:X,system:G,prompt:J,messages:Q,maxRetries:W,abortSignal:K,headers:Z,maxSteps:H=1,experimental_generateMessageId:z=ij8,experimental_output:V,experimental_continueSteps:F=!1,experimental_telemetry:L,experimental_providerMetadata:N,providerOptions:D=N,experimental_toolCallStreaming:A=!1,toolCallStreaming:B=A,experimental_activeTools:O,experimental_repairToolCall:E,experimental_transform:M,onChunk:R,onError:q,onFinish:_,onStepFinish:P,_internal:{now:w=co1,generateId:j=lj8,currentDate:C=()=>new Date}={},...k}){if(typeof $==="string"||$.specificationVersion!=="v1")throw new x60;return new rj8({model:$,telemetry:L,headers:Z,settings:k,maxRetries:W,abortSignal:K,system:G,prompt:J,messages:Q,tools:Y,toolChoice:X,toolCallStreaming:B,transforms:pj8(M),activeTools:O,repairToolCall:E,maxSteps:H,output:V,continueSteps:F,providerOptions:D,onChunk:R,onError:q,onFinish:_,onStepFinish:P,now:w,currentDate:C,generateId:j,generateMessageId:z})}function nj8($){if(!$)return new TransformStream({transform(Q,W){W.enqueue({part:Q,partialOutput:void 0})}});let Y="",X="",G="";function J({controller:Q,partialOutput:W=void 0}){Q.enqueue({part:{type:"text-delta",textDelta:X},partialOutput:W}),X=""}return new TransformStream({transform(Q,W){if(Q.type==="step-finish")J({controller:W});if(Q.type!=="text-delta"){W.enqueue({part:Q,partialOutput:void 0});return}Y+=Q.textDelta,X+=Q.textDelta;let K=$.parsePartial({text:Y});if(K!=null){let Z=JSON.stringify(K.partial);if(Z!==G)J({controller:W,partialOutput:K.partial}),G=Z}},flush(Q){if(X.length>0)J({controller:Q})}})}function Ot1($={}){let Y=new TextEncoder,X="";return new TransformStream({async start(){if($.onStart)await $.onStart()},async transform(G,J){if(J.enqueue(Y.encode(G)),X+=G,$.onToken)await $.onToken(G);if($.onText&&typeof G==="string")await $.onText(G)},async flush(){if($.onCompletion)await $.onCompletion(X);if($.onFinal)await $.onFinal(X)}})}function pk0($,Y){return $.pipeThrough(new TransformStream({transform:async(X,G)=>{var J;if(typeof X==="string"){G.enqueue(X);return}if("event"in X){if(X.event==="on_chat_model_stream")Ss1((J=X.data)==null?void 0:J.chunk,G);return}Ss1(X,G)}})).pipeThrough(Ot1(Y)).pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({transform:async(X,G)=>{G.enqueue(KG("text",X))}}))}function HT8($,Y){return pk0($,Y).pipeThrough(new TextEncoderStream)}function zT8($,Y){var X;let G=pk0($,Y==null?void 0:Y.callbacks).pipeThrough(new TextEncoderStream),J=Y==null?void 0:Y.data,Q=Y==null?void 0:Y.init,W=J?mk0(J.stream,G):G;return new Response(W,{status:(X=Q==null?void 0:Q.status)!=null?X:200,statusText:Q==null?void 0:Q.statusText,headers:o_(Q==null?void 0:Q.headers,{contentType:"text/plain; charset=utf-8",dataStreamVersion:"v1"})})}function VT8($,Y){Y.dataStream.merge(pk0($,Y.callbacks))}function Ss1($,Y){if(typeof $.content==="string")Y.enqueue($.content);else{let X=$.content;for(let G of X)if(G.type==="text")Y.enqueue(G.text)}}function dk0($,Y){let X=AT8();return vP8($[Symbol.asyncIterator]()).pipeThrough(new TransformStream({async transform(G,J){J.enqueue(X(G.delta))}})).pipeThrough(Ot1(Y)).pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({transform:async(G,J)=>{J.enqueue(KG("text",G))}}))}function LT8($,Y){return dk0($,Y).pipeThrough(new TextEncoderStream)}function DT8($,Y={}){var X;let{init:G,data:J,callbacks:Q}=Y,W=dk0($,Q).pipeThrough(new TextEncoderStream),K=J?mk0(J.stream,W):W;return new Response(K,{status:(X=G==null?void 0:G.status)!=null?X:200,statusText:G==null?void 0:G.statusText,headers:o_(G==null?void 0:G.headers,{contentType:"text/plain; charset=utf-8",dataStreamVersion:"v1"})})}function NT8($,Y){Y.dataStream.merge(dk0($,Y.callbacks))}function AT8(){let $=!0;return(Y)=>{if($){if(Y=Y.trimStart(),Y)$=!1}return Y}}var VP8,ks1,FP8,vs1,LP8,DP8,NP8=($,Y)=>function(){return Y||(0,$[vs1($)[0]])((Y={exports:{}}).exports,Y),Y.exports},AP8=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of vs1(Y))if(!DP8.call($,J)&&J!==X)ks1($,J,{get:()=>Y[J],enumerable:!(G=FP8(Y,J))||G.enumerable})}return $},BP8=($,Y,X)=>(X=$!=null?VP8(LP8($)):{},AP8(ks1(X,"default",{value:$,enumerable:!0}),$)),OP8,xs1="vercel.ai.error",EP8,ys1,MP8,c6,bs1="AI_APICallError",hs1,RP8,fs1,qP8,gs1="AI_InvalidArgumentError",ms1,PP8,us1,wP8,ps1="AI_InvalidPromptError",ds1,_P8,cs1,oL,ls1="AI_JSONParseError",is1,jP8,ns1,Bk0,rs1="AI_TypeValidationError",as1,TP8,ss1,IP8,bO,os1="AI_UnsupportedFunctionalityError",ts1,CP8,es1,_60,SP8=($,Y=21)=>{return(X=Y)=>{let G="",J=X|0;while(J--)G+=$[Math.random()*$.length|0];return G}},kP8,fO=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=SP8(X,Y);if($==null)return J;if(X.includes(G))throw new wP8({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return(Q)=>`${$}${G}${J(Q)}`},yP8,T60,pP8,dP8,cP8,Es1,lP8=($)=>typeof $==="string"?{...Es1,name:$}:{...Es1,...$},iP8=($)=>{let Y=lP8($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,flags:{hasReferencedOpenAiAnyType:!1},currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}},Yo1=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")},sP8=($,Y)=>{return H9($.innerType._def,Y)},oP8=($,Y)=>{let X={type:"integer",format:"unix-time"};if(Y.target==="openApi3")return X;for(let G of $.checks)switch(G.kind){case"min":l9(X,"minimum",G.value,G.message,Y);break;case"max":l9(X,"maximum",G.value,G.message,Y);break}return X},Yw8=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $},Hk0=void 0,wZ,Jw8,I60,Rs1=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>H9(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0},Nw8=($,Y)=>{if(Y.currentPath.toString()===Y.propertyPath?.toString())return H9($.innerType._def,Y);let X=H9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return X?{anyOf:[{not:OQ(Y)},X]}:OQ(Y)},Aw8=($,Y)=>{if(Y.pipeStrategy==="input")return H9($.in._def,Y);else if(Y.pipeStrategy==="output")return H9($.out._def,Y);let X=H9($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=H9($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}},qw8=($,Y)=>{return H9($.innerType._def,Y)},Pw8=($,Y,X)=>{switch(Y){case U0.ZodString:return Jo1($,X);case U0.ZodNumber:return Vw8($,X);case U0.ZodObject:return Fw8($,X);case U0.ZodBigInt:return rP8($,X);case U0.ZodBoolean:return aP8();case U0.ZodDate:return Go1($,X);case U0.ZodUndefined:return Mw8(X);case U0.ZodNull:return Uw8(X);case U0.ZodArray:return nP8($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return Hw8($,X);case U0.ZodIntersection:return Xw8($,X);case U0.ZodTuple:return Ew8($,X);case U0.ZodRecord:return Qo1($,X);case U0.ZodLiteral:return Gw8($,X);case U0.ZodEnum:return $w8($);case U0.ZodNativeEnum:return Kw8($);case U0.ZodNullable:return zw8($,X);case U0.ZodOptional:return Nw8($,X);case U0.ZodMap:return Ww8($,X);case U0.ZodSet:return Ow8($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return Bw8($,X);case U0.ZodNaN:case U0.ZodNever:return Zw8(X);case U0.ZodEffects:return eP8($,X);case U0.ZodAny:return OQ(X);case U0.ZodUnknown:return Rw8(X);case U0.ZodDefault:return tP8($,X);case U0.ZodBranded:return Xo1($,X);case U0.ZodReadonly:return qw8($,X);case U0.ZodCatch:return sP8($,X);case U0.ZodPipeline:return Aw8($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})()}},ww8=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:Yo1(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),OQ(Y);return Y.$refStrategy==="seen"?OQ(Y):void 0}}},_w8=($,Y,X)=>{if($.description){if(X.description=$.description,Y.markdownDescription)X.markdownDescription=$.description}return X},jw8=($,Y)=>{let X=iP8(Y),G=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((Z,[H,z])=>({...Z,[H]:H9(z._def,{...X,currentPath:[...X.basePath,X.definitionPath,H]},!0)??OQ(X)}),{}):void 0,J=typeof Y==="string"?Y:Y?.nameStrategy==="title"?void 0:Y?.name,Q=H9($._def,J===void 0?X:{...X,currentPath:[...X.basePath,X.definitionPath,J]},!1)??OQ(X),W=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(W!==void 0)Q.title=W;if(X.flags.hasReferencedOpenAiAnyType){if(!G)G={};if(!G[X.openAiAnyTypeName])G[X.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:X.$refStrategy==="relative"?"1":[...X.basePath,X.definitionPath,X.openAiAnyTypeName].join("/")}}}let K=J===void 0?G?{...Q,[X.definitionPath]:G}:Q:{$ref:[...X.$refStrategy==="relative"?[]:X.basePath,X.definitionPath,J].join("/"),[X.definitionPath]:{...G,[J]:Q}};if(X.target==="jsonSchema7")K.$schema="http://json-schema.org/draft-07/schema#";else if(X.target==="jsonSchema2019-09"||X.target==="openAi")K.$schema="https://json-schema.org/draft/2019-09/schema#";if(X.target==="openAi"&&(("anyOf"in K)||("oneOf"in K)||("allOf"in K)||("type"in K)&&Array.isArray(K.type)))console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");return K},Tw8,Cw8,Sw8,kw8,vw8,xw8,yw8,bw8,hw8,fw8,gw8,mw8,uw8,pw8,dw8,cw8,lw8,Ck0,Mk0,aw8,xO="1.9.0",qs1,ow8,tw8,cf,lf,ew8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},$_8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},Y_8,IW,G_8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},J_8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},Q_8="diag",S60,K_8,Z_8,U_8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},H_8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},z_8,V_8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},F_8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},Vk0="context",L_8,Ko1,Rk0,Zo1="0000000000000000",Uo1="00000000000000000000000000000000",D_8,pf,vk0,O_8,E_8,Fk0,Vo1,w_8,__8,j_8,T_8,Ps1,k60,Lk0="trace",I_8,C_8,S_8,bk0=($,Y)=>{for(var X in Y)S_8($,X,{get:Y[X],enumerable:!0})},x60,Fo1="AI_InvalidArgumentError",Lo1,k_8,Do1,j5,No1="AI_RetryError",Ao1,v_8,Bo1,ws1,x_8=({maxRetries:$=2,initialDelayInMs:Y=2000,backoffFactor:X=2}={})=>async(G)=>Oo1(G,{maxRetries:$,delayInMs:Y,backoffFactor:X}),y_8,w60,b_8,Eo1=class{constructor({data:$,mimeType:Y}){let X=$ instanceof Uint8Array;this.base64Data=X?void 0:$,this.uint8ArrayData=X?$:void 0,this.mimeType=Y}get base64(){if(this.base64Data==null)this.base64Data=Ek0(this.uint8ArrayData);return this.base64Data}get uint8Array(){if(this.uint8ArrayData==null)this.uint8ArrayData=Ik0(this.base64Data);return this.uint8ArrayData}},h_8,f_8,g_8=($)=>{let Y=typeof $==="string"?Ik0($):$,X=(Y[6]&127)<<21|(Y[7]&127)<<14|(Y[8]&127)<<7|Y[9]&127;return Y.slice(X+10)},Mo1="AI_NoObjectGeneratedError",Ro1,p_8,qo1,gz,Po1="AI_DownloadError",wo1,d_8,_o1,Dk0,jo1="AI_InvalidDataContentError",To1,l_8,Io1,_s1,Co1,So1="AI_InvalidMessageRoleError",ko1,n_8,vo1,r_8,xo1="AI_MessageConversionError",yo1,e_8,bo1,Nk0,wk0,J7,$j8,ho1,Yj8,fo1,Xj8,Gj8,Jj8,Qj8,Wj8,Kj8,Zj8,Uj8,Hj8,Fj8="JSON schema:",Lj8="You MUST answer with a JSON object that matches the JSON schema above.",Dj8="You MUST answer with JSON.",Nj8,Aj8=($)=>({type:"object",jsonSchema:$.jsonSchema,validatePartialResult({value:Y,textDelta:X}){return{success:!0,value:{partial:Y,textDelta:X}}},validateFinalResult(Y){return hO({value:Y,schema:$})},createElementStream(){throw new _60({functionality:"element streams in object mode"})}}),Bj8=($)=>{let{$schema:Y,...X}=$.jsonSchema;return{type:"enum",jsonSchema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:X}},required:["elements"],additionalProperties:!1},validatePartialResult({value:G,latestObject:J,isFirstDelta:Q,isFinalDelta:W}){var K;if(!Ok0(G)||!Os1(G.elements))return{success:!1,error:new bO({value:G,cause:"value must be an object that contains an array of elements"})};let Z=G.elements,H=[];for(let F=0;F<Z.length;F++){let L=Z[F],N=hO({value:L,schema:$});if(F===Z.length-1&&!W)continue;if(!N.success)return N;H.push(N.value)}let z=(K=J==null?void 0:J.length)!=null?K:0,V="";if(Q)V+="[";if(z>0)V+=",";if(V+=H.slice(z).map((F)=>JSON.stringify(F)).join(","),W)V+="]";return{success:!0,value:{partial:H,textDelta:V}}},validateFinalResult(G){if(!Ok0(G)||!Os1(G.elements))return{success:!1,error:new bO({value:G,cause:"value must be an object that contains an array of elements"})};let J=G.elements;for(let Q of J){let W=hO({value:Q,schema:$});if(!W.success)return W}return{success:!0,value:J}},createElementStream(G){let J=0;return yO(G.pipeThrough(new TransformStream({transform(Q,W){switch(Q.type){case"object":{let K=Q.object;for(;J<K.length;J++)W.enqueue(K[J]);break}case"text-delta":case"finish":case"error":break;default:throw Error(`Unsupported chunk type: ${Q}`)}}})))}}},Oj8=($)=>{return{type:"enum",jsonSchema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:$}},required:["result"],additionalProperties:!1},validateFinalResult(Y){if(!Ok0(Y)||typeof Y.result!=="string")return{success:!1,error:new bO({value:Y,cause:'value must be an object that contains a string in the "result" property.'})};let X=Y.result;return $.includes(X)?{success:!0,value:X}:{success:!1,error:new bO({value:Y,cause:"value must be a string in the enum"})}},validatePartialResult(){throw new _60({functionality:"partial results in enum mode"})},createElementStream(){throw new _60({functionality:"element streams in enum mode"})}}},Mj8,Rj8=class{constructor($){this.object=$.object,this.finishReason=$.finishReason,this.usage=$.usage,this.warnings=$.warnings,this.providerMetadata=$.providerMetadata,this.experimental_providerMetadata=$.providerMetadata,this.response=$.response,this.request=$.request,this.logprobs=$.logprobs}toJsonResponse($){var Y;return new Response(JSON.stringify(this.object),{status:(Y=$==null?void 0:$.status)!=null?Y:200,headers:o_($==null?void 0:$.headers,{contentType:"application/json; charset=utf-8"})})}},g7=class{constructor(){this.status={type:"pending"},this._resolve=void 0,this._reject=void 0}get value(){if(this.promise)return this.promise;return this.promise=new Promise(($,Y)=>{if(this.status.type==="resolved")$(this.status.value);else if(this.status.type==="rejected")Y(this.status.error);this._resolve=$,this._reject=Y}),this.promise}resolve($){var Y;if(this.status={type:"resolved",value:$},this.promise)(Y=this._resolve)==null||Y.call(this,$)}reject($){var Y;if(this.status={type:"rejected",error:$},this.promise)(Y=this._reject)==null||Y.call(this,$)}},qj8,Pj8=class{constructor({model:$,headers:Y,telemetry:X,settings:G,maxRetries:J,abortSignal:Q,outputStrategy:W,system:K,prompt:Z,messages:H,schemaName:z,schemaDescription:V,providerOptions:F,mode:L,onError:N,onFinish:D,generateId:A,currentDate:B,now:O}){this.objectPromise=new g7,this.usagePromise=new g7,this.providerMetadataPromise=new g7,this.warningsPromise=new g7,this.requestPromise=new g7,this.responsePromise=new g7;let{maxRetries:E,retry:M}=y60({maxRetries:J}),R=b60({model:$,telemetry:X,headers:Y,settings:{...G,maxRetries:E}}),q=h60(X),_=this,P=do1(),w=new TransformStream({transform(j,C){if(C.enqueue(j),j.type==="error")N==null||N({error:j.error})}});this.baseStream=P.stream.pipeThrough(w),TZ({name:"ai.streamObject",attributes:G7({telemetry:X,attributes:{...jZ({operationId:"ai.streamObject",telemetry:X}),...R,"ai.prompt":{input:()=>JSON.stringify({system:K,prompt:Z,messages:H})},"ai.schema":W.jsonSchema!=null?{input:()=>JSON.stringify(W.jsonSchema)}:void 0,"ai.schema.name":z,"ai.schema.description":V,"ai.settings.output":W.type,"ai.settings.mode":L}}),tracer:q,endWhenDone:!1,fn:async(j)=>{var C,k;if(L==="auto"||L==null)L=$.defaultObjectGenerationMode;let S,I;switch(L){case"json":{let Y0=$j({prompt:{system:W.jsonSchema==null?rf({prompt:K}):$.supportsStructuredOutputs?K:rf({prompt:K,schema:W.jsonSchema}),prompt:Z,messages:H},tools:void 0});S={mode:{type:"object-json",schema:W.jsonSchema,name:z,description:V},...e_(G),inputFormat:Y0.type,prompt:await t_({prompt:Y0,modelSupportsImageUrls:$.supportsImageUrls,modelSupportsUrl:(C=$.supportsUrl)==null?void 0:C.bind($)}),providerMetadata:F,abortSignal:Q,headers:Y},I={transform:(Z0,F0)=>{switch(Z0.type){case"text-delta":F0.enqueue(Z0.textDelta);break;case"response-metadata":case"finish":case"error":F0.enqueue(Z0);break}}};break}case"tool":{let Y0=$j({prompt:{system:K,prompt:Z,messages:H},tools:void 0});S={mode:{type:"object-tool",tool:{type:"function",name:z!=null?z:"json",description:V!=null?V:"Respond with a JSON object.",parameters:W.jsonSchema}},...e_(G),inputFormat:Y0.type,prompt:await t_({prompt:Y0,modelSupportsImageUrls:$.supportsImageUrls,modelSupportsUrl:(k=$.supportsUrl)==null?void 0:k.bind($)}),providerMetadata:F,abortSignal:Q,headers:Y},I={transform(Z0,F0){switch(Z0.type){case"tool-call-delta":F0.enqueue(Z0.argsTextDelta);break;case"response-metadata":case"finish":case"error":F0.enqueue(Z0);break}}};break}case void 0:throw Error("Model does not have a default object generation mode.");default:throw Error(`Unsupported mode: ${L}`)}let{result:{stream:v,warnings:x,rawResponse:y,request:d},doStreamSpan:u,startTimestampMs:b}=await M(()=>TZ({name:"ai.streamObject.doStream",attributes:G7({telemetry:X,attributes:{...jZ({operationId:"ai.streamObject.doStream",telemetry:X}),...R,"ai.prompt.format":{input:()=>S.inputFormat},"ai.prompt.messages":{input:()=>f60(S.prompt)},"ai.settings.mode":L,"gen_ai.system":$.provider,"gen_ai.request.model":$.modelId,"gen_ai.request.frequency_penalty":G.frequencyPenalty,"gen_ai.request.max_tokens":G.maxTokens,"gen_ai.request.presence_penalty":G.presencePenalty,"gen_ai.request.temperature":G.temperature,"gen_ai.request.top_k":G.topK,"gen_ai.request.top_p":G.topP}}),tracer:q,endWhenDone:!1,fn:async(Y0)=>({startTimestampMs:O(),doStreamSpan:Y0,result:await $.doStream(S)})}));_.requestPromise.resolve(d!=null?d:{});let g,p,h,n,t,s="",K0="",X0={id:A(),timestamp:B(),modelId:$.modelId},a=void 0,Q0=void 0,e=!0,m=!0,$0=v.pipeThrough(new TransformStream(I)).pipeThrough(new TransformStream({async transform(Y0,Z0){var F0,D0,O0;if(e){let R0=O()-b;e=!1,u.addEvent("ai.stream.firstChunk",{"ai.stream.msToFirstChunk":R0}),u.setAttributes({"ai.stream.msToFirstChunk":R0})}if(typeof Y0==="string"){s+=Y0,K0+=Y0;let{value:R0,state:P0}=Wo1(s);if(R0!==void 0&&!C60(a,R0)){let f0=W.validatePartialResult({value:R0,textDelta:K0,latestObject:Q0,isFirstDelta:m,isFinalDelta:P0==="successful-parse"});if(f0.success&&!C60(Q0,f0.value.partial))a=R0,Q0=f0.value.partial,Z0.enqueue({type:"object",object:Q0}),Z0.enqueue({type:"text-delta",textDelta:f0.value.textDelta}),K0="",m=!1}return}switch(Y0.type){case"response-metadata":{X0={id:(F0=Y0.id)!=null?F0:X0.id,timestamp:(D0=Y0.timestamp)!=null?D0:X0.timestamp,modelId:(O0=Y0.modelId)!=null?O0:X0.modelId};break}case"finish":{if(K0!=="")Z0.enqueue({type:"text-delta",textDelta:K0});p=Y0.finishReason,g=fz(Y0.usage),h=Y0.providerMetadata,Z0.enqueue({...Y0,usage:g,response:X0}),_.usagePromise.resolve(g),_.providerMetadataPromise.resolve(h),_.responsePromise.resolve({...X0,headers:y==null?void 0:y.headers});let R0=W.validateFinalResult(a,{text:s,response:X0,usage:g});if(R0.success)n=R0.value,_.objectPromise.resolve(n);else t=new gz({message:"No object generated: response did not match schema.",cause:R0.error,text:s,response:X0,usage:g,finishReason:p}),_.objectPromise.reject(t);break}default:{Z0.enqueue(Y0);break}}},async flush(Y0){try{let Z0=g!=null?g:{promptTokens:NaN,completionTokens:NaN,totalTokens:NaN};u.setAttributes(G7({telemetry:X,attributes:{"ai.response.finishReason":p,"ai.response.object":{output:()=>JSON.stringify(n)},"ai.response.id":X0.id,"ai.response.model":X0.modelId,"ai.response.timestamp":X0.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(h),"ai.usage.promptTokens":Z0.promptTokens,"ai.usage.completionTokens":Z0.completionTokens,"gen_ai.response.finish_reasons":[p],"gen_ai.response.id":X0.id,"gen_ai.response.model":X0.modelId,"gen_ai.usage.input_tokens":Z0.promptTokens,"gen_ai.usage.output_tokens":Z0.completionTokens}})),u.end(),j.setAttributes(G7({telemetry:X,attributes:{"ai.usage.promptTokens":Z0.promptTokens,"ai.usage.completionTokens":Z0.completionTokens,"ai.response.object":{output:()=>JSON.stringify(n)},"ai.response.providerMetadata":JSON.stringify(h)}})),await(D==null?void 0:D({usage:Z0,object:n,error:t,response:{...X0,headers:y==null?void 0:y.headers},warnings:x,providerMetadata:h,experimental_providerMetadata:h}))}catch(Z0){Y0.enqueue({type:"error",error:Z0})}finally{j.end()}}}));P.addStream($0)}}).catch((j)=>{P.addStream(new ReadableStream({start(C){C.enqueue({type:"error",error:j}),C.close()}}))}).finally(()=>{P.close()}),this.outputStrategy=W}get object(){return this.objectPromise.value}get usage(){return this.usagePromise.value}get experimental_providerMetadata(){return this.providerMetadataPromise.value}get providerMetadata(){return this.providerMetadataPromise.value}get warnings(){return this.warningsPromise.value}get request(){return this.requestPromise.value}get response(){return this.responsePromise.value}get partialObjectStream(){return yO(this.baseStream.pipeThrough(new TransformStream({transform($,Y){switch($.type){case"object":Y.enqueue($.object);break;case"text-delta":case"finish":case"error":break;default:throw Error(`Unsupported chunk type: ${$}`)}}})))}get elementStream(){return this.outputStrategy.createElementStream(this.baseStream)}get textStream(){return yO(this.baseStream.pipeThrough(new TransformStream({transform($,Y){switch($.type){case"text-delta":Y.enqueue($.textDelta);break;case"object":case"finish":case"error":break;default:throw Error(`Unsupported chunk type: ${$}`)}}})))}get fullStream(){return yO(this.baseStream)}pipeTextStreamToResponse($,Y){Pk0({response:$,status:Y==null?void 0:Y.status,statusText:Y==null?void 0:Y.statusText,headers:qk0(Y==null?void 0:Y.headers,{contentType:"text/plain; charset=utf-8"}),stream:this.textStream.pipeThrough(new TextEncoderStream)})}toTextStreamResponse($){var Y;return new Response(this.textStream.pipeThrough(new TextEncoderStream),{status:(Y=$==null?void 0:$.status)!=null?Y:200,headers:o_($==null?void 0:$.headers,{contentType:"text/plain; charset=utf-8"})})}},io1="AI_NoOutputSpecifiedError",no1,wj8,ro1,ao1,so1="AI_ToolExecutionError",oo1,_j8,to1,eo1,Tj8,Xt1="AI_InvalidToolArgumentsError",Gt1,Cj8,Jt1,Qt1,Wt1="AI_NoSuchToolError",Kt1,Sj8,Zt1,_k0,Ut1="AI_ToolCallRepairError",Ht1,kj8,zt1,vj8,xj8,yj8,hj8=class{constructor($){this.text=$.text,this.files=$.files,this.reasoning=$.reasoning,this.reasoningDetails=$.reasoningDetails,this.toolCalls=$.toolCalls,this.toolResults=$.toolResults,this.finishReason=$.finishReason,this.usage=$.usage,this.warnings=$.warnings,this.request=$.request,this.response=$.response,this.steps=$.steps,this.experimental_providerMetadata=$.providerMetadata,this.providerMetadata=$.providerMetadata,this.logprobs=$.logprobs,this.outputResolver=$.outputResolver,this.sources=$.sources}get experimental_output(){return this.outputResolver()}},g60,Lt1="AI_InvalidStreamPartError",Dt1,fj8,Nt1,gj8,mj8=()=>({type:"text",responseFormat:()=>({type:"text"}),injectIntoSystemPrompt({system:$}){return $},parsePartial({text:$}){return{partial:$}},parseOutput({text:$}){return $}}),uj8=({schema:$})=>{let Y=s_($);return{type:"object",responseFormat:({model:X})=>({type:"json",schema:X.supportsStructuredOutputs?Y.jsonSchema:void 0}),injectIntoSystemPrompt({system:X,model:G}){return G.supportsStructuredOutputs?X:rf({prompt:X,schema:Y.jsonSchema})},parsePartial({text:X}){let G=Wo1(X);switch(G.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:G.value};default:{let J=G.state;throw Error(`Unsupported parse state: ${J}`)}}},parseOutput({text:X},G){let J=df({text:X});if(!J.success)throw new gz({message:"No object generated: could not parse the response.",cause:J.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});let Q=hO({value:J.value,schema:Y});if(!Q.success)throw new gz({message:"No object generated: response did not match schema.",cause:Q.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});return Q.value}}},lj8,ij8,rj8=class{constructor({model:$,telemetry:Y,headers:X,settings:G,maxRetries:J,abortSignal:Q,system:W,prompt:K,messages:Z,tools:H,toolChoice:z,toolCallStreaming:V,transforms:F,activeTools:L,repairToolCall:N,maxSteps:D,output:A,continueSteps:B,providerOptions:O,now:E,currentDate:M,generateId:R,generateMessageId:q,onChunk:_,onError:P,onFinish:w,onStepFinish:j}){this.warningsPromise=new g7,this.usagePromise=new g7,this.finishReasonPromise=new g7,this.providerMetadataPromise=new g7,this.textPromise=new g7,this.reasoningPromise=new g7,this.reasoningDetailsPromise=new g7,this.sourcesPromise=new g7,this.filesPromise=new g7,this.toolCallsPromise=new g7,this.toolResultsPromise=new g7,this.requestPromise=new g7,this.responsePromise=new g7,this.stepsPromise=new g7;var C;if(D<1)throw new j5({parameter:"maxSteps",value:D,message:"maxSteps must be at least 1"});this.output=A;let k="",S="",I="",v=[],x=[],y=void 0,d=[],u=[],b={id:R(),timestamp:M(),modelId:$.modelId,messages:[]},g=[],p=[],h=void 0,n=void 0,t="initial",s=[],K0,X0=new TransformStream({async transform(D0,O0){O0.enqueue(D0);let{part:R0}=D0;if(R0.type==="text-delta"||R0.type==="reasoning"||R0.type==="source"||R0.type==="tool-call"||R0.type==="tool-result"||R0.type==="tool-call-streaming-start"||R0.type==="tool-call-delta")await(_==null?void 0:_({chunk:R0}));if(R0.type==="error")await(P==null?void 0:P({error:R0.error}));if(R0.type==="text-delta")k+=R0.textDelta,S+=R0.textDelta,I+=R0.textDelta;if(R0.type==="reasoning")if(y==null)y={type:"text",text:R0.textDelta},v.push(y);else y.text+=R0.textDelta;if(R0.type==="reasoning-signature"){if(y==null)throw new c6({name:"InvalidStreamPart",message:"reasoning-signature without reasoning"});y.signature=R0.signature,y=void 0}if(R0.type==="redacted-reasoning")v.push({type:"redacted",data:R0.data});if(R0.type==="file")x.push(R0);if(R0.type==="source")u.push(R0.source),d.push(R0.source);if(R0.type==="tool-call")g.push(R0);if(R0.type==="tool-result")p.push(R0);if(R0.type==="step-finish"){let P0=Tk0({text:S,files:x,reasoning:v,tools:H!=null?H:{},toolCalls:g,toolResults:p,messageId:R0.messageId,generateMessageId:q}),f0=s.length,p0="done";if(f0+1<D){if(B&&R0.finishReason==="length"&&g.length===0)p0="continue";else if(g.length>0&&p.length===g.length)p0="tool-result"}let U4={stepType:t,text:k,reasoning:jk0(v),reasoningDetails:v,files:x,sources:d,toolCalls:g,toolResults:p,finishReason:R0.finishReason,usage:R0.usage,warnings:R0.warnings,logprobs:R0.logprobs,request:R0.request,response:{...R0.response,messages:[...b.messages,...P0]},providerMetadata:R0.experimental_providerMetadata,experimental_providerMetadata:R0.experimental_providerMetadata,isContinued:R0.isContinued};if(await(j==null?void 0:j(U4)),s.push(U4),g=[],p=[],k="",d=[],v=[],x=[],y=void 0,p0!=="done")t=p0;if(p0!=="continue")b.messages.push(...P0),S=""}if(R0.type==="finish")b.id=R0.response.id,b.timestamp=R0.response.timestamp,b.modelId=R0.response.modelId,b.headers=R0.response.headers,n=R0.usage,h=R0.finishReason},async flush(D0){var O0;try{if(s.length===0)return;let R0=s[s.length-1];F0.warningsPromise.resolve(R0.warnings),F0.requestPromise.resolve(R0.request),F0.responsePromise.resolve(R0.response),F0.toolCallsPromise.resolve(R0.toolCalls),F0.toolResultsPromise.resolve(R0.toolResults),F0.providerMetadataPromise.resolve(R0.experimental_providerMetadata),F0.reasoningPromise.resolve(R0.reasoning),F0.reasoningDetailsPromise.resolve(R0.reasoningDetails);let P0=h!=null?h:"unknown",f0=n!=null?n:{completionTokens:NaN,promptTokens:NaN,totalTokens:NaN};F0.finishReasonPromise.resolve(P0),F0.usagePromise.resolve(f0),F0.textPromise.resolve(I),F0.sourcesPromise.resolve(u),F0.filesPromise.resolve(R0.files),F0.stepsPromise.resolve(s),await(w==null?void 0:w({finishReason:P0,logprobs:void 0,usage:f0,text:I,reasoning:R0.reasoning,reasoningDetails:R0.reasoningDetails,files:R0.files,sources:R0.sources,toolCalls:R0.toolCalls,toolResults:R0.toolResults,request:(O0=R0.request)!=null?O0:{},response:R0.response,warnings:R0.warnings,providerMetadata:R0.providerMetadata,experimental_providerMetadata:R0.experimental_providerMetadata,steps:s})),K0.setAttributes(G7({telemetry:Y,attributes:{"ai.response.finishReason":P0,"ai.response.text":{output:()=>I},"ai.response.toolCalls":{output:()=>{var p0;return((p0=R0.toolCalls)==null?void 0:p0.length)?JSON.stringify(R0.toolCalls):void 0}},"ai.usage.promptTokens":f0.promptTokens,"ai.usage.completionTokens":f0.completionTokens,"ai.response.providerMetadata":JSON.stringify(R0.providerMetadata)}}))}catch(R0){D0.error(R0)}finally{K0.end()}}}),a=do1();this.addStream=a.addStream,this.closeStream=a.close;let Q0=a.stream;for(let D0 of F)Q0=Q0.pipeThrough(D0({tools:H,stopStream(){a.terminate()}}));this.baseStream=Q0.pipeThrough(nj8(A)).pipeThrough(X0);let{maxRetries:e,retry:m}=y60({maxRetries:J}),$0=h60(Y),Y0=b60({model:$,telemetry:Y,headers:X,settings:{...G,maxRetries:e}}),Z0=$j({prompt:{system:(C=A==null?void 0:A.injectIntoSystemPrompt({system:W,model:$}))!=null?C:W,prompt:K,messages:Z},tools:H}),F0=this;TZ({name:"ai.streamText",attributes:G7({telemetry:Y,attributes:{...jZ({operationId:"ai.streamText",telemetry:Y}),...Y0,"ai.prompt":{input:()=>JSON.stringify({system:W,prompt:K,messages:Z})},"ai.settings.maxSteps":D}}),tracer:$0,endWhenDone:!1,fn:async(D0)=>{K0=D0;async function O0({currentStep:R0,responseMessages:P0,usage:f0,stepType:p0,previousStepText:U4,hasLeadingWhitespace:P1,messageId:d1}){var C0;let n0=P0.length===0?Z0.type:"messages",J0=[...Z0.messages,...P0],B0=await t_({prompt:{system:Z0.system,messages:J0},modelSupportsImageUrls:$.supportsImageUrls,modelSupportsUrl:(C0=$.supportsUrl)==null?void 0:C0.bind($)}),Y1={type:"regular",...$t1({tools:H,toolChoice:z,activeTools:L})},{result:{stream:c1,warnings:C4,rawResponse:c4,request:r4},doStreamSpan:T6,startTimestampMs:p6}=await m(()=>TZ({name:"ai.streamText.doStream",attributes:G7({telemetry:Y,attributes:{...jZ({operationId:"ai.streamText.doStream",telemetry:Y}),...Y0,"ai.prompt.format":{input:()=>n0},"ai.prompt.messages":{input:()=>f60(B0)},"ai.prompt.tools":{input:()=>{var Q1;return(Q1=Y1.tools)==null?void 0:Q1.map((C1)=>JSON.stringify(C1))}},"ai.prompt.toolChoice":{input:()=>Y1.toolChoice!=null?JSON.stringify(Y1.toolChoice):void 0},"gen_ai.system":$.provider,"gen_ai.request.model":$.modelId,"gen_ai.request.frequency_penalty":G.frequencyPenalty,"gen_ai.request.max_tokens":G.maxTokens,"gen_ai.request.presence_penalty":G.presencePenalty,"gen_ai.request.stop_sequences":G.stopSequences,"gen_ai.request.temperature":G.temperature,"gen_ai.request.top_k":G.topK,"gen_ai.request.top_p":G.topP}}),tracer:$0,endWhenDone:!1,fn:async(Q1)=>({startTimestampMs:E(),doStreamSpan:Q1,result:await $.doStream({mode:Y1,...e_(G),inputFormat:n0,responseFormat:A==null?void 0:A.responseFormat({model:$}),prompt:B0,providerMetadata:O,abortSignal:Q,headers:X})})})),n6=cj8({tools:H,generatorStream:c1,toolCallStreaming:V,tracer:$0,telemetry:Y,system:W,messages:J0,repairToolCall:N,abortSignal:Q}),Z1=r4!=null?r4:{},J4=[],I6=[],t4=[],a1=[],F1=void 0,I1="unknown",M4={promptTokens:0,completionTokens:0,totalTokens:0},w4,z6=!0,K4="",b4=p0==="continue"?U4:"",N0,h0={id:R(),timestamp:M(),modelId:$.modelId},a0="",c0=!1,L1=!0,E1=!1;async function l4({controller:Q1,chunk:C1}){Q1.enqueue(C1),K4+=C1.textDelta,b4+=C1.textDelta,c0=!0,E1=C1.textDelta.trimEnd()!==C1.textDelta}F0.addStream(n6.pipeThrough(new TransformStream({async transform(Q1,C1){var f4,A6,J9;if(z6){let $4=E()-p6;z6=!1,T6.addEvent("ai.stream.firstChunk",{"ai.response.msToFirstChunk":$4}),T6.setAttributes({"ai.response.msToFirstChunk":$4}),C1.enqueue({type:"step-start",messageId:d1,request:Z1,warnings:C4!=null?C4:[]})}if(Q1.type==="text-delta"&&Q1.textDelta.length===0)return;let o7=Q1.type;switch(o7){case"text-delta":{if(B){let $4=L1&&P1?Q1.textDelta.trimStart():Q1.textDelta;if($4.length===0)break;L1=!1,a0+=$4;let i4=Yt1(a0);if(i4!=null)a0=i4.suffix,await l4({controller:C1,chunk:{type:"text-delta",textDelta:i4.prefix+i4.whitespace}})}else await l4({controller:C1,chunk:Q1});break}case"reasoning":{if(C1.enqueue(Q1),F1==null)F1={type:"text",text:Q1.textDelta},t4.push(F1);else F1.text+=Q1.textDelta;break}case"reasoning-signature":{if(C1.enqueue(Q1),F1==null)throw new gj8({chunk:Q1,message:"reasoning-signature without reasoning"});F1.signature=Q1.signature,F1=void 0;break}case"redacted-reasoning":{C1.enqueue(Q1),t4.push({type:"redacted",data:Q1.data});break}case"tool-call":{C1.enqueue(Q1),J4.push(Q1);break}case"tool-result":{C1.enqueue(Q1),I6.push(Q1);break}case"response-metadata":{h0={id:(f4=Q1.id)!=null?f4:h0.id,timestamp:(A6=Q1.timestamp)!=null?A6:h0.timestamp,modelId:(J9=Q1.modelId)!=null?J9:h0.modelId};break}case"finish":{M4=Q1.usage,I1=Q1.finishReason,w4=Q1.experimental_providerMetadata,N0=Q1.logprobs;let $4=E()-p6;T6.addEvent("ai.stream.finish"),T6.setAttributes({"ai.response.msToFinish":$4,"ai.response.avgCompletionTokensPerSecond":1000*M4.completionTokens/$4});break}case"file":{a1.push(Q1),C1.enqueue(Q1);break}case"source":case"tool-call-streaming-start":case"tool-call-delta":{C1.enqueue(Q1);break}case"error":{C1.enqueue(Q1),I1="error";break}default:throw Error(`Unknown chunk type: ${o7}`)}},async flush(Q1){let C1=J4.length>0?JSON.stringify(J4):void 0,f4="done";if(R0+1<D){if(B&&I1==="length"&&J4.length===0)f4="continue";else if(J4.length>0&&I6.length===J4.length)f4="tool-result"}if(B&&a0.length>0&&(f4!=="continue"||p0==="continue"&&!c0))await l4({controller:Q1,chunk:{type:"text-delta",textDelta:a0}}),a0="";try{T6.setAttributes(G7({telemetry:Y,attributes:{"ai.response.finishReason":I1,"ai.response.text":{output:()=>K4},"ai.response.toolCalls":{output:()=>C1},"ai.response.id":h0.id,"ai.response.model":h0.modelId,"ai.response.timestamp":h0.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(w4),"ai.usage.promptTokens":M4.promptTokens,"ai.usage.completionTokens":M4.completionTokens,"gen_ai.response.finish_reasons":[I1],"gen_ai.response.id":h0.id,"gen_ai.response.model":h0.modelId,"gen_ai.usage.input_tokens":M4.promptTokens,"gen_ai.usage.output_tokens":M4.completionTokens}}))}catch(J9){}finally{T6.end()}Q1.enqueue({type:"step-finish",finishReason:I1,usage:M4,providerMetadata:w4,experimental_providerMetadata:w4,logprobs:N0,request:Z1,response:{...h0,headers:c4==null?void 0:c4.headers},warnings:C4,isContinued:f4==="continue",messageId:d1});let A6=go1(f0,M4);if(f4==="done")Q1.enqueue({type:"finish",finishReason:I1,usage:A6,providerMetadata:w4,experimental_providerMetadata:w4,logprobs:N0,response:{...h0,headers:c4==null?void 0:c4.headers}}),F0.closeStream();else{if(p0==="continue"){let J9=P0[P0.length-1];if(typeof J9.content==="string")J9.content+=K4;else J9.content.push({text:K4,type:"text"})}else P0.push(...Tk0({text:K4,files:a1,reasoning:t4,tools:H!=null?H:{},toolCalls:J4,toolResults:I6,messageId:d1,generateMessageId:q}));await O0({currentStep:R0+1,responseMessages:P0,usage:A6,stepType:f4,previousStepText:b4,hasLeadingWhitespace:E1,messageId:f4==="continue"?d1:q()})}}})))}await O0({currentStep:0,responseMessages:[],usage:{promptTokens:0,completionTokens:0,totalTokens:0},previousStepText:"",stepType:"initial",hasLeadingWhitespace:!1,messageId:q()})}}).catch((D0)=>{F0.addStream(new ReadableStream({start(O0){O0.enqueue({type:"error",error:D0}),O0.close()}})),F0.closeStream()})}get warnings(){return this.warningsPromise.value}get usage(){return this.usagePromise.value}get finishReason(){return this.finishReasonPromise.value}get experimental_providerMetadata(){return this.providerMetadataPromise.value}get providerMetadata(){return this.providerMetadataPromise.value}get text(){return this.textPromise.value}get reasoning(){return this.reasoningPromise.value}get reasoningDetails(){return this.reasoningDetailsPromise.value}get sources(){return this.sourcesPromise.value}get files(){return this.filesPromise.value}get toolCalls(){return this.toolCallsPromise.value}get toolResults(){return this.toolResultsPromise.value}get request(){return this.requestPromise.value}get response(){return this.responsePromise.value}get steps(){return this.stepsPromise.value}teeStream(){let[$,Y]=this.baseStream.tee();return this.baseStream=Y,$}get textStream(){return yO(this.teeStream().pipeThrough(new TransformStream({transform({part:$},Y){if($.type==="text-delta")Y.enqueue($.textDelta)}})))}get fullStream(){return yO(this.teeStream().pipeThrough(new TransformStream({transform({part:$},Y){Y.enqueue($)}})))}async consumeStream($){var Y;try{await dj8({stream:this.fullStream,onError:$==null?void 0:$.onError})}catch(X){(Y=$==null?void 0:$.onError)==null||Y.call($,X)}}get experimental_partialOutputStream(){if(this.output==null)throw new ao1;return yO(this.teeStream().pipeThrough(new TransformStream({transform({partialOutput:$},Y){if($!=null)Y.enqueue($)}})))}toDataStreamInternal({getErrorMessage:$=()=>"An error occurred.",sendUsage:Y=!0,sendReasoning:X=!1,sendSources:G=!1,experimental_sendFinish:J=!0}){return this.fullStream.pipeThrough(new TransformStream({transform:async(Q,W)=>{let K=Q.type;switch(K){case"text-delta":{W.enqueue(KG("text",Q.textDelta));break}case"reasoning":{if(X)W.enqueue(KG("reasoning",Q.textDelta));break}case"redacted-reasoning":{if(X)W.enqueue(KG("redacted_reasoning",{data:Q.data}));break}case"reasoning-signature":{if(X)W.enqueue(KG("reasoning_signature",{signature:Q.signature}));break}case"file":{W.enqueue(KG("file",{mimeType:Q.mimeType,data:Q.base64}));break}case"source":{if(G)W.enqueue(KG("source",Q.source));break}case"tool-call-streaming-start":{W.enqueue(KG("tool_call_streaming_start",{toolCallId:Q.toolCallId,toolName:Q.toolName}));break}case"tool-call-delta":{W.enqueue(KG("tool_call_delta",{toolCallId:Q.toolCallId,argsTextDelta:Q.argsTextDelta}));break}case"tool-call":{W.enqueue(KG("tool_call",{toolCallId:Q.toolCallId,toolName:Q.toolName,args:Q.args}));break}case"tool-result":{W.enqueue(KG("tool_result",{toolCallId:Q.toolCallId,result:Q.result}));break}case"error":{W.enqueue(KG("error",$(Q.error)));break}case"step-start":{W.enqueue(KG("start_step",{messageId:Q.messageId}));break}case"step-finish":{W.enqueue(KG("finish_step",{finishReason:Q.finishReason,usage:Y?{promptTokens:Q.usage.promptTokens,completionTokens:Q.usage.completionTokens}:void 0,isContinued:Q.isContinued}));break}case"finish":{if(J)W.enqueue(KG("finish_message",{finishReason:Q.finishReason,usage:Y?{promptTokens:Q.usage.promptTokens,completionTokens:Q.usage.completionTokens}:void 0}));break}default:throw Error(`Unknown chunk type: ${K}`)}}}))}pipeDataStreamToResponse($,{status:Y,statusText:X,headers:G,data:J,getErrorMessage:Q,sendUsage:W,sendReasoning:K,sendSources:Z,experimental_sendFinish:H}={}){Pk0({response:$,status:Y,statusText:X,headers:qk0(G,{contentType:"text/plain; charset=utf-8",dataStreamVersion:"v1"}),stream:this.toDataStream({data:J,getErrorMessage:Q,sendUsage:W,sendReasoning:K,sendSources:Z,experimental_sendFinish:H})})}pipeTextStreamToResponse($,Y){Pk0({response:$,status:Y==null?void 0:Y.status,statusText:Y==null?void 0:Y.statusText,headers:qk0(Y==null?void 0:Y.headers,{contentType:"text/plain; charset=utf-8"}),stream:this.textStream.pipeThrough(new TextEncoderStream)})}toDataStream($){let Y=this.toDataStreamInternal({getErrorMessage:$==null?void 0:$.getErrorMessage,sendUsage:$==null?void 0:$.sendUsage,sendReasoning:$==null?void 0:$.sendReasoning,sendSources:$==null?void 0:$.sendSources,experimental_sendFinish:$==null?void 0:$.experimental_sendFinish}).pipeThrough(new TextEncoderStream);return($==null?void 0:$.data)?mk0($==null?void 0:$.data.stream,Y):Y}mergeIntoDataStream($,Y){$.merge(this.toDataStreamInternal({getErrorMessage:$.onError,sendUsage:Y==null?void 0:Y.sendUsage,sendReasoning:Y==null?void 0:Y.sendReasoning,sendSources:Y==null?void 0:Y.sendSources,experimental_sendFinish:Y==null?void 0:Y.experimental_sendFinish}))}toDataStreamResponse({headers:$,status:Y,statusText:X,data:G,getErrorMessage:J,sendUsage:Q,sendReasoning:W,sendSources:K,experimental_sendFinish:Z}={}){return new Response(this.toDataStream({data:G,getErrorMessage:J,sendUsage:Q,sendReasoning:W,sendSources:K,experimental_sendFinish:Z}),{status:Y,statusText:X,headers:o_($,{contentType:"text/plain; charset=utf-8",dataStreamVersion:"v1"})})}toTextStreamResponse($){var Y;return new Response(this.textStream.pipeThrough(new TextEncoderStream),{status:(Y=$==null?void 0:$.status)!=null?Y:200,headers:o_($==null?void 0:$.headers,{contentType:"text/plain; charset=utf-8"})})}},aj8,uk0,af,sj8,oj8,tj8,ej8,$T8,YT8,Bt1,XT8,GT8,JT8,m60="2.0",QT8,WT8,KT8,ZT8,UT8,FT8;var ck0=V0(()=>{cG();ZY();VP8=Object.create,ks1=Object.defineProperty,FP8=Object.getOwnPropertyDescriptor,vs1=Object.getOwnPropertyNames,LP8=Object.getPrototypeOf,DP8=Object.prototype.hasOwnProperty,OP8=NP8({"../../../node_modules/.pnpm/secure-json-parse@2.7.0/node_modules/secure-json-parse/index.js"($,Y){var X=typeof Buffer<"u",G=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,J=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Q(H,z,V){if(V==null){if(z!==null&&typeof z==="object")V=z,z=void 0}if(X&&Buffer.isBuffer(H))H=H.toString();if(H&&H.charCodeAt(0)===65279)H=H.slice(1);let F=JSON.parse(H,z);if(F===null||typeof F!=="object")return F;let L=V&&V.protoAction||"error",N=V&&V.constructorAction||"error";if(L==="ignore"&&N==="ignore")return F;if(L!=="ignore"&&N!=="ignore"){if(G.test(H)===!1&&J.test(H)===!1)return F}else if(L!=="ignore"&&N==="ignore"){if(G.test(H)===!1)return F}else if(J.test(H)===!1)return F;return W(F,{protoAction:L,constructorAction:N,safe:V&&V.safe})}function W(H,{protoAction:z="error",constructorAction:V="error",safe:F}={}){let L=[H];while(L.length){let N=L;L=[];for(let D of N){if(z!=="ignore"&&Object.prototype.hasOwnProperty.call(D,"__proto__")){if(F===!0)return null;else if(z==="error")throw SyntaxError("Object contains forbidden prototype property");delete D.__proto__}if(V!=="ignore"&&Object.prototype.hasOwnProperty.call(D,"constructor")&&Object.prototype.hasOwnProperty.call(D.constructor,"prototype")){if(F===!0)return null;else if(V==="error")throw SyntaxError("Object contains forbidden prototype property");delete D.constructor}for(let A in D){let B=D[A];if(B&&typeof B==="object")L.push(B)}}}return H}function K(H,z,V){let F=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return Q(H,z,V)}finally{Error.stackTraceLimit=F}}function Z(H,z){let V=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return Q(H,z,{safe:!0})}catch(F){return null}finally{Error.stackTraceLimit=V}}Y.exports=K,Y.exports.default=K,Y.exports.parse=K,Y.exports.safeParse=Z,Y.exports.scan=W}}),EP8=Symbol.for(xs1),MP8=class $ extends Error{constructor({name:Y,message:X,cause:G}){super(X);this[ys1]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,xs1)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}};ys1=EP8;c6=MP8,hs1=`vercel.ai.error.${bs1}`,RP8=Symbol.for(hs1),qP8=class extends c6{constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:K=G!=null&&(G===408||G===409||G===429||G>=500),data:Z}){super({name:bs1,message:$,cause:W});this[fs1]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=K,this.data=Z}static isInstance($){return c6.hasMarker($,hs1)}};fs1=RP8;ms1=`vercel.ai.error.${gs1}`,PP8=Symbol.for(ms1),wP8=class extends c6{constructor({message:$,cause:Y,argument:X}){super({name:gs1,message:$,cause:Y});this[us1]=!0,this.argument=X}static isInstance($){return c6.hasMarker($,ms1)}};us1=PP8;ds1=`vercel.ai.error.${ps1}`,_P8=Symbol.for(ds1),oL=class extends c6{constructor({prompt:$,message:Y,cause:X}){super({name:ps1,message:`Invalid prompt: ${Y}`,cause:X});this[cs1]=!0,this.prompt=$}static isInstance($){return c6.hasMarker($,ds1)}};cs1=_P8;is1=`vercel.ai.error.${ls1}`,jP8=Symbol.for(is1),Bk0=class extends c6{constructor({text:$,cause:Y}){super({name:ls1,message:`JSON parsing failed: Text: ${$}.
Error message: ${sf(Y)}`,cause:Y});this[ns1]=!0,this.text=$}static isInstance($){return c6.hasMarker($,is1)}};ns1=jP8;as1=`vercel.ai.error.${rs1}`,TP8=Symbol.for(as1),IP8=class $ extends c6{constructor({value:Y,cause:X}){super({name:rs1,message:`Type validation failed: Value: ${JSON.stringify(Y)}.
Error message: ${sf(X)}`,cause:X});this[ss1]=!0,this.value=Y}static isInstance(Y){return c6.hasMarker(Y,as1)}static wrap({value:Y,cause:X}){return $.isInstance(X)&&X.value===Y?X:new $({value:Y,cause:X})}};ss1=TP8;bO=IP8,ts1=`vercel.ai.error.${os1}`,CP8=Symbol.for(ts1),_60=class extends c6{constructor({functionality:$,message:Y=`'${$}' functionality not supported.`}){super({name:os1,message:Y});this[es1]=!0,this.functionality=$}static isInstance($){return c6.hasMarker($,ts1)}};es1=CP8;kP8=BP8(OP8());yP8=fO();T60=Symbol.for("vercel.ai.validator");({btoa:pP8,atob:dP8}=globalThis);cP8=Symbol("Let zodToJsonSchema decide on which parser to use"),Es1={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"};wZ={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(Hk0===void 0)Hk0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return Hk0},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};Jw8=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");I60={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};Tw8=jw8;Cw8={code:"0",name:"text",parse:($)=>{if(typeof $!=="string")throw Error('"text" parts expect a string value.');return{type:"text",value:$}}},Sw8={code:"2",name:"data",parse:($)=>{if(!Array.isArray($))throw Error('"data" parts expect an array value.');return{type:"data",value:$}}},kw8={code:"3",name:"error",parse:($)=>{if(typeof $!=="string")throw Error('"error" parts expect a string value.');return{type:"error",value:$}}},vw8={code:"8",name:"message_annotations",parse:($)=>{if(!Array.isArray($))throw Error('"message_annotations" parts expect an array value.');return{type:"message_annotations",value:$}}},xw8={code:"9",name:"tool_call",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("toolName"in $)||typeof $.toolName!=="string"||!("args"in $)||typeof $.args!=="object")throw Error('"tool_call" parts expect an object with a "toolCallId", "toolName", and "args" property.');return{type:"tool_call",value:$}}},yw8={code:"a",name:"tool_result",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("result"in $))throw Error('"tool_result" parts expect an object with a "toolCallId" and a "result" property.');return{type:"tool_result",value:$}}},bw8={code:"b",name:"tool_call_streaming_start",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("toolName"in $)||typeof $.toolName!=="string")throw Error('"tool_call_streaming_start" parts expect an object with a "toolCallId" and "toolName" property.');return{type:"tool_call_streaming_start",value:$}}},hw8={code:"c",name:"tool_call_delta",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("argsTextDelta"in $)||typeof $.argsTextDelta!=="string")throw Error('"tool_call_delta" parts expect an object with a "toolCallId" and "argsTextDelta" property.');return{type:"tool_call_delta",value:$}}},fw8={code:"d",name:"finish_message",parse:($)=>{if($==null||typeof $!=="object"||!("finishReason"in $)||typeof $.finishReason!=="string")throw Error('"finish_message" parts expect an object with a "finishReason" property.');let Y={finishReason:$.finishReason};if("usage"in $&&$.usage!=null&&typeof $.usage==="object"&&"promptTokens"in $.usage&&"completionTokens"in $.usage)Y.usage={promptTokens:typeof $.usage.promptTokens==="number"?$.usage.promptTokens:Number.NaN,completionTokens:typeof $.usage.completionTokens==="number"?$.usage.completionTokens:Number.NaN};return{type:"finish_message",value:Y}}},gw8={code:"e",name:"finish_step",parse:($)=>{if($==null||typeof $!=="object"||!("finishReason"in $)||typeof $.finishReason!=="string")throw Error('"finish_step" parts expect an object with a "finishReason" property.');let Y={finishReason:$.finishReason,isContinued:!1};if("usage"in $&&$.usage!=null&&typeof $.usage==="object"&&"promptTokens"in $.usage&&"completionTokens"in $.usage)Y.usage={promptTokens:typeof $.usage.promptTokens==="number"?$.usage.promptTokens:Number.NaN,completionTokens:typeof $.usage.completionTokens==="number"?$.usage.completionTokens:Number.NaN};if("isContinued"in $&&typeof $.isContinued==="boolean")Y.isContinued=$.isContinued;return{type:"finish_step",value:Y}}},mw8={code:"f",name:"start_step",parse:($)=>{if($==null||typeof $!=="object"||!("messageId"in $)||typeof $.messageId!=="string")throw Error('"start_step" parts expect an object with an "id" property.');return{type:"start_step",value:{messageId:$.messageId}}}},uw8={code:"g",name:"reasoning",parse:($)=>{if(typeof $!=="string")throw Error('"reasoning" parts expect a string value.');return{type:"reasoning",value:$}}},pw8={code:"h",name:"source",parse:($)=>{if($==null||typeof $!=="object")throw Error('"source" parts expect a Source object.');return{type:"source",value:$}}},dw8={code:"i",name:"redacted_reasoning",parse:($)=>{if($==null||typeof $!=="object"||!("data"in $)||typeof $.data!=="string")throw Error('"redacted_reasoning" parts expect an object with a "data" property.');return{type:"redacted_reasoning",value:{data:$.data}}}},cw8={code:"j",name:"reasoning_signature",parse:($)=>{if($==null||typeof $!=="object"||!("signature"in $)||typeof $.signature!=="string")throw Error('"reasoning_signature" parts expect an object with a "signature" property.');return{type:"reasoning_signature",value:{signature:$.signature}}}},lw8={code:"k",name:"file",parse:($)=>{if($==null||typeof $!=="object"||!("data"in $)||typeof $.data!=="string"||!("mimeType"in $)||typeof $.mimeType!=="string")throw Error('"file" parts expect an object with a "data" and "mimeType" property.');return{type:"file",value:$}}},Ck0=[Cw8,Sw8,kw8,vw8,xw8,yw8,bw8,hw8,fw8,gw8,mw8,uw8,pw8,dw8,cw8,lw8];Object.fromEntries(Ck0.map(($)=>[$.code,$]));Object.fromEntries(Ck0.map(($)=>[$.name,$.code]));Mk0=Symbol.for("vercel.ai.schema");aw8=typeof globalThis==="object"?globalThis:global,qs1=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;ow8=sw8(xO),tw8=xO.split(".")[0],cf=Symbol.for("opentelemetry.js.api."+tw8),lf=aw8;Y_8=function(){function $(Y){this._namespace=Y.namespace||"DiagComponentLogger"}return $.prototype.debug=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return uf("debug",this._namespace,Y)},$.prototype.error=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return uf("error",this._namespace,Y)},$.prototype.info=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return uf("info",this._namespace,Y)},$.prototype.warn=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return uf("warn",this._namespace,Y)},$.prototype.verbose=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return uf("verbose",this._namespace,Y)},$}();(function($){$[$.NONE=0]="NONE",$[$.ERROR=30]="ERROR",$[$.WARN=50]="WARN",$[$.INFO=60]="INFO",$[$.DEBUG=70]="DEBUG",$[$.VERBOSE=80]="VERBOSE",$[$.ALL=9999]="ALL"})(IW||(IW={}));S60=function(){function $(){function Y(J){return function(){var Q=[];for(var W=0;W<arguments.length;W++)Q[W]=arguments[W];var K=nf("diag");if(!K)return;return K[J].apply(K,J_8([],G_8(Q),!1))}}var X=this,G=function(J,Q){var W,K,Z;if(Q===void 0)Q={logLevel:IW.INFO};if(J===X){var H=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return X.error((W=H.stack)!==null&&W!==void 0?W:H.message),!1}if(typeof Q==="number")Q={logLevel:Q};var z=nf("diag"),V=X_8((K=Q.logLevel)!==null&&K!==void 0?K:IW.INFO,J);if(z&&!Q.suppressOverrideMessage){var F=(Z=Error().stack)!==null&&Z!==void 0?Z:"<failed to generate stacktrace>";z.warn("Current logger will be overwritten from "+F),V.warn("Current logger will overwrite one already registered from "+F)}return Sk0("diag",V,X,!0)};X.setLogger=G,X.disable=function(){kk0(Q_8,X)},X.createComponentLogger=function(J){return new Y_8(J)},X.verbose=Y("verbose"),X.debug=Y("debug"),X.info=Y("info"),X.warn=Y("warn"),X.error=Y("error")}return $.instance=function(){if(!this._instance)this._instance=new $;return this._instance},$}();K_8=function(){function $(Y){var X=this;X._currentContext=Y?new Map(Y):new Map,X.getValue=function(G){return X._currentContext.get(G)},X.setValue=function(G,J){var Q=new $(X._currentContext);return Q._currentContext.set(G,J),Q},X.deleteValue=function(G){var J=new $(X._currentContext);return J._currentContext.delete(G),J}}return $}(),Z_8=new K_8,z_8=function(){function $(){}return $.prototype.active=function(){return Z_8},$.prototype.with=function(Y,X,G){var J=[];for(var Q=3;Q<arguments.length;Q++)J[Q-3]=arguments[Q];return X.call.apply(X,H_8([G],U_8(J),!1))},$.prototype.bind=function(Y,X){return X},$.prototype.enable=function(){return this},$.prototype.disable=function(){return this},$}(),L_8=new z_8,Ko1=function(){function $(){}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalContextManager=function(Y){return Sk0(Vk0,Y,S60.instance())},$.prototype.active=function(){return this._getContextManager().active()},$.prototype.with=function(Y,X,G){var J,Q=[];for(var W=3;W<arguments.length;W++)Q[W-3]=arguments[W];return(J=this._getContextManager()).with.apply(J,F_8([Y,X,G],V_8(Q),!1))},$.prototype.bind=function(Y,X){return this._getContextManager().bind(Y,X)},$.prototype._getContextManager=function(){return nf(Vk0)||L_8},$.prototype.disable=function(){this._getContextManager().disable(),kk0(Vk0,S60.instance())},$}();(function($){$[$.NONE=0]="NONE",$[$.SAMPLED=1]="SAMPLED"})(Rk0||(Rk0={}));D_8={traceId:Uo1,spanId:Zo1,traceFlags:Rk0.NONE},pf=function(){function $(Y){if(Y===void 0)Y=D_8;this._spanContext=Y}return $.prototype.spanContext=function(){return this._spanContext},$.prototype.setAttribute=function(Y,X){return this},$.prototype.setAttributes=function(Y){return this},$.prototype.addEvent=function(Y,X){return this},$.prototype.addLink=function(Y){return this},$.prototype.addLinks=function(Y){return this},$.prototype.setStatus=function(Y){return this},$.prototype.updateName=function(Y){return this},$.prototype.end=function(Y){},$.prototype.isRecording=function(){return!1},$.prototype.recordException=function(Y,X){},$}(),vk0=W_8("OpenTelemetry Context Key SPAN");O_8=/^([0-9a-f]{32})$/i,E_8=/^[0-9a-f]{16}$/i;Fk0=Ko1.getInstance(),Vo1=function(){function $(){}return $.prototype.startSpan=function(Y,X,G){if(G===void 0)G=Fk0.active();var J=Boolean(X===null||X===void 0?void 0:X.root);if(J)return new pf;var Q=G&&Ho1(G);if(P_8(Q)&&zo1(Q))return new pf(Q);else return new pf},$.prototype.startActiveSpan=function(Y,X,G,J){var Q,W,K;if(arguments.length<2)return;else if(arguments.length===2)K=X;else if(arguments.length===3)Q=X,K=G;else Q=X,W=G,K=J;var Z=W!==null&&W!==void 0?W:Fk0.active(),H=this.startSpan(Y,Q,Z),z=yk0(Z,H);return Fk0.with(z,K,void 0,H)},$}();w_8=new Vo1,__8=function(){function $(Y,X,G,J){this._provider=Y,this.name=X,this.version=G,this.options=J}return $.prototype.startSpan=function(Y,X,G){return this._getTracer().startSpan(Y,X,G)},$.prototype.startActiveSpan=function(Y,X,G,J){var Q=this._getTracer();return Reflect.apply(Q.startActiveSpan,Q,arguments)},$.prototype._getTracer=function(){if(this._delegate)return this._delegate;var Y=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!Y)return w_8;return this._delegate=Y,this._delegate},$}(),j_8=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){return new Vo1},$}(),T_8=new j_8,Ps1=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){var J;return(J=this.getDelegateTracer(Y,X,G))!==null&&J!==void 0?J:new __8(this,Y,X,G)},$.prototype.getDelegate=function(){var Y;return(Y=this._delegate)!==null&&Y!==void 0?Y:T_8},$.prototype.setDelegate=function(Y){this._delegate=Y},$.prototype.getDelegateTracer=function(Y,X,G){var J;return(J=this._delegate)===null||J===void 0?void 0:J.getTracer(Y,X,G)},$}();(function($){$[$.UNSET=0]="UNSET",$[$.OK=1]="OK",$[$.ERROR=2]="ERROR"})(k60||(k60={}));I_8=function(){function $(){this._proxyTracerProvider=new Ps1,this.wrapSpanContext=q_8,this.isSpanContextValid=zo1,this.deleteSpan=A_8,this.getSpan=xk0,this.getActiveSpan=N_8,this.getSpanContext=Ho1,this.setSpan=yk0,this.setSpanContext=B_8}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalTracerProvider=function(Y){var X=Sk0(Lk0,this._proxyTracerProvider,S60.instance());if(X)this._proxyTracerProvider.setDelegate(Y);return X},$.prototype.getTracerProvider=function(){return nf(Lk0)||this._proxyTracerProvider},$.prototype.getTracer=function(Y,X){return this.getTracerProvider().getTracer(Y,X)},$.prototype.disable=function(){kk0(Lk0,S60.instance()),this._proxyTracerProvider=new Ps1},$}(),C_8=I_8.getInstance(),S_8=Object.defineProperty;x60=class extends c6{constructor(){super({name:"AI_UnsupportedModelVersionError",message:'Unsupported model version. AI SDK 4 only supports models that implement specification version "v1". Please upgrade to AI SDK 5 to use this model.'})}},Lo1=`vercel.ai.error.${Fo1}`,k_8=Symbol.for(Lo1),j5=class extends c6{constructor({parameter:$,value:Y,message:X}){super({name:Fo1,message:`Invalid argument for parameter ${$}: ${X}`});this[Do1]=!0,this.parameter=$,this.value=Y}static isInstance($){return c6.hasMarker($,Lo1)}};Do1=k_8;Ao1=`vercel.ai.error.${No1}`,v_8=Symbol.for(Ao1),ws1=class extends c6{constructor({message:$,reason:Y,errors:X}){super({name:No1,message:$});this[Bo1]=!0,this.reason=Y,this.errors=X,this.lastError=X[X.length-1]}static isInstance($){return c6.hasMarker($,Ao1)}};Bo1=v_8;y_8={startSpan(){return w60},startActiveSpan($,Y,X,G){if(typeof Y==="function")return Y(w60);if(typeof X==="function")return X(w60);if(typeof G==="function")return G(w60)}},w60={spanContext(){return b_8},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},addLink(){return this},addLinks(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this}},b_8={traceId:"",spanId:"",traceFlags:0};h_8=class extends Eo1{constructor($){super($);this.type="file"}},f_8=[{mimeType:"image/gif",bytesPrefix:[71,73,70],base64Prefix:"R0lG"},{mimeType:"image/png",bytesPrefix:[137,80,78,71],base64Prefix:"iVBORw"},{mimeType:"image/jpeg",bytesPrefix:[255,216],base64Prefix:"/9j/"},{mimeType:"image/webp",bytesPrefix:[82,73,70,70],base64Prefix:"UklGRg"},{mimeType:"image/bmp",bytesPrefix:[66,77],base64Prefix:"Qk"},{mimeType:"image/tiff",bytesPrefix:[73,73,42,0],base64Prefix:"SUkqAA"},{mimeType:"image/tiff",bytesPrefix:[77,77,0,42],base64Prefix:"TU0AKg"},{mimeType:"image/avif",bytesPrefix:[0,0,0,32,102,116,121,112,97,118,105,102],base64Prefix:"AAAAIGZ0eXBhdmlm"},{mimeType:"image/heic",bytesPrefix:[0,0,0,32,102,116,121,112,104,101,105,99],base64Prefix:"AAAAIGZ0eXBoZWlj"}];Ro1=`vercel.ai.error.${Mo1}`,p_8=Symbol.for(Ro1),gz=class extends c6{constructor({message:$="No object generated.",cause:Y,text:X,response:G,usage:J,finishReason:Q}){super({name:Mo1,message:$,cause:Y});this[qo1]=!0,this.text=X,this.response=G,this.usage=J,this.finishReason=Q}static isInstance($){return c6.hasMarker($,Ro1)}};qo1=p_8;wo1=`vercel.ai.error.${Po1}`,d_8=Symbol.for(wo1),Dk0=class extends c6{constructor({url:$,statusCode:Y,statusText:X,cause:G,message:J=G==null?`Failed to download ${$}: ${Y} ${X}`:`Failed to download ${$}: ${G}`}){super({name:Po1,message:J,cause:G});this[_o1]=!0,this.url=$,this.statusCode=Y,this.statusText=X}static isInstance($){return c6.hasMarker($,wo1)}};_o1=d_8;To1=`vercel.ai.error.${jo1}`,l_8=Symbol.for(To1),_s1=class extends c6{constructor({content:$,cause:Y,message:X=`Invalid data content. Expected a base64 string, Uint8Array, ArrayBuffer, or Buffer, but got ${typeof $}.`}){super({name:jo1,message:X,cause:Y});this[Io1]=!0,this.content=$}static isInstance($){return c6.hasMarker($,To1)}};Io1=l_8;Co1=U.union([U.string(),U.instanceof(Uint8Array),U.instanceof(ArrayBuffer),U.custom(($)=>{var Y,X;return(X=(Y=globalThis.Buffer)==null?void 0:Y.isBuffer($))!=null?X:!1},{message:"Must be a Buffer"})]);ko1=`vercel.ai.error.${So1}`,n_8=Symbol.for(ko1),r_8=class extends c6{constructor({role:$,message:Y=`Invalid message role: '${$}'. Must be one of: "system", "user", "assistant", "tool".`}){super({name:So1,message:Y});this[vo1]=!0,this.role=$}static isInstance($){return c6.hasMarker($,ko1)}};vo1=n_8;yo1=`vercel.ai.error.${xo1}`,e_8=Symbol.for(yo1),Nk0=class extends c6{constructor({originalMessage:$,message:Y}){super({name:xo1,message:Y});this[bo1]=!0,this.originalMessage=$}static isInstance($){return c6.hasMarker($,yo1)}};bo1=e_8;wk0=U.lazy(()=>U.union([U.null(),U.string(),U.number(),U.boolean(),U.record(U.string(),wk0),U.array(wk0)])),J7=U.record(U.string(),U.record(U.string(),wk0)),$j8=U.array(U.union([U.object({type:U.literal("text"),text:U.string()}),U.object({type:U.literal("image"),data:U.string(),mimeType:U.string().optional()})])),ho1=U.object({type:U.literal("text"),text:U.string(),providerOptions:J7.optional(),experimental_providerMetadata:J7.optional()}),Yj8=U.object({type:U.literal("image"),image:U.union([Co1,U.instanceof(URL)]),mimeType:U.string().optional(),providerOptions:J7.optional(),experimental_providerMetadata:J7.optional()}),fo1=U.object({type:U.literal("file"),data:U.union([Co1,U.instanceof(URL)]),filename:U.string().optional(),mimeType:U.string(),providerOptions:J7.optional(),experimental_providerMetadata:J7.optional()}),Xj8=U.object({type:U.literal("reasoning"),text:U.string(),providerOptions:J7.optional(),experimental_providerMetadata:J7.optional()}),Gj8=U.object({type:U.literal("redacted-reasoning"),data:U.string(),providerOptions:J7.optional(),experimental_providerMetadata:J7.optional()}),Jj8=U.object({type:U.literal("tool-call"),toolCallId:U.string(),toolName:U.string(),args:U.unknown(),providerOptions:J7.optional(),experimental_providerMetadata:J7.optional()}),Qj8=U.object({type:U.literal("tool-result"),toolCallId:U.string(),toolName:U.string(),result:U.unknown(),content:$j8.optional(),isError:U.boolean().optional(),providerOptions:J7.optional(),experimental_providerMetadata:J7.optional()}),Wj8=U.object({role:U.literal("system"),content:U.string(),providerOptions:J7.optional(),experimental_providerMetadata:J7.optional()}),Kj8=U.object({role:U.literal("user"),content:U.union([U.string(),U.array(U.union([ho1,Yj8,fo1]))]),providerOptions:J7.optional(),experimental_providerMetadata:J7.optional()}),Zj8=U.object({role:U.literal("assistant"),content:U.union([U.string(),U.array(U.union([ho1,fo1,Xj8,Gj8,Jj8]))]),providerOptions:J7.optional(),experimental_providerMetadata:J7.optional()}),Uj8=U.object({role:U.literal("tool"),content:U.array(Qj8),providerOptions:J7.optional(),experimental_providerMetadata:J7.optional()}),Hj8=U.union([Wj8,Kj8,Zj8,Uj8]);Nj8={type:"no-schema",jsonSchema:void 0,validatePartialResult({value:$,textDelta:Y}){return{success:!0,value:{partial:$,textDelta:Y}}},validateFinalResult($,Y){return $===void 0?{success:!1,error:new gz({message:"No object generated: response did not match schema.",text:Y.text,response:Y.response,usage:Y.usage,finishReason:Y.finishReason})}:{success:!0,value:$}},createElementStream(){throw new _60({functionality:"element streams in no-schema mode"})}};Mj8=fO({prefix:"aiobj",size:24});qj8=fO({prefix:"aiobj",size:24});no1=`vercel.ai.error.${io1}`,wj8=Symbol.for(no1),ao1=class extends c6{constructor({message:$="No output specified."}={}){super({name:io1,message:$});this[ro1]=!0}static isInstance($){return c6.hasMarker($,no1)}};ro1=wj8;oo1=`vercel.ai.error.${so1}`,_j8=Symbol.for(oo1),eo1=class extends c6{constructor({toolArgs:$,toolName:Y,toolCallId:X,cause:G,message:J=`Error executing tool ${Y}: ${sf(G)}`}){super({name:so1,message:J,cause:G});this[to1]=!0,this.toolArgs=$,this.toolName=Y,this.toolCallId=X}static isInstance($){return c6.hasMarker($,oo1)}};to1=_j8;Tj8=/^([\s\S]*?)(\s+)(\S*)$/;Gt1=`vercel.ai.error.${Xt1}`,Cj8=Symbol.for(Gt1),Qt1=class extends c6{constructor({toolArgs:$,toolName:Y,cause:X,message:G=`Invalid arguments for tool ${Y}: ${sf(X)}`}){super({name:Xt1,message:G,cause:X});this[Jt1]=!0,this.toolArgs=$,this.toolName=Y}static isInstance($){return c6.hasMarker($,Gt1)}};Jt1=Cj8;Kt1=`vercel.ai.error.${Wt1}`,Sj8=Symbol.for(Kt1),_k0=class extends c6{constructor({toolName:$,availableTools:Y=void 0,message:X=`Model tried to call unavailable tool '${$}'. ${Y===void 0?"No tools are available.":`Available tools: ${Y.join(", ")}.`}`}){super({name:Wt1,message:X});this[Zt1]=!0,this.toolName=$,this.availableTools=Y}static isInstance($){return c6.hasMarker($,Kt1)}};Zt1=Sj8;Ht1=`vercel.ai.error.${Ut1}`,kj8=Symbol.for(Ht1),vj8=class extends c6{constructor({cause:$,originalError:Y,message:X=`Error repairing tool call: ${sf($)}`}){super({name:Ut1,message:X,cause:$});this[zt1]=!0,this.originalError=Y}static isInstance($){return c6.hasMarker($,Ht1)}};zt1=kj8;xj8=fO({prefix:"aitxt",size:24}),yj8=fO({prefix:"msg",size:24});g60={};bk0(g60,{object:()=>uj8,text:()=>mj8});Dt1=`vercel.ai.error.${Lt1}`,fj8=Symbol.for(Dt1),gj8=class extends c6{constructor({chunk:$,message:Y}){super({name:Lt1,message:Y});this[Nt1]=!0,this.chunk=$}static isInstance($){return c6.hasMarker($,Dt1)}};Nt1=fj8;lj8=fO({prefix:"aitxt",size:24}),ij8=fO({prefix:"msg",size:24});aj8=U.object({name:U.string(),version:U.string()}).passthrough(),uk0=U.object({_meta:U.optional(U.object({}).passthrough())}).passthrough(),af=uk0,sj8=U.object({method:U.string(),params:U.optional(uk0)}),oj8=U.object({experimental:U.optional(U.object({}).passthrough()),logging:U.optional(U.object({}).passthrough()),prompts:U.optional(U.object({listChanged:U.optional(U.boolean())}).passthrough()),resources:U.optional(U.object({subscribe:U.optional(U.boolean()),listChanged:U.optional(U.boolean())}).passthrough()),tools:U.optional(U.object({listChanged:U.optional(U.boolean())}).passthrough())}).passthrough();af.extend({protocolVersion:U.string(),capabilities:oj8,serverInfo:aj8,instructions:U.optional(U.string())});tj8=af.extend({nextCursor:U.optional(U.string())}),ej8=U.object({name:U.string(),description:U.optional(U.string()),inputSchema:U.object({type:U.literal("object"),properties:U.optional(U.object({}).passthrough())}).passthrough()}).passthrough();tj8.extend({tools:U.array(ej8)});$T8=U.object({type:U.literal("text"),text:U.string()}).passthrough(),YT8=U.object({type:U.literal("image"),data:U.string().base64(),mimeType:U.string()}).passthrough(),Bt1=U.object({uri:U.string(),mimeType:U.optional(U.string())}).passthrough(),XT8=Bt1.extend({text:U.string()}),GT8=Bt1.extend({blob:U.string().base64()}),JT8=U.object({type:U.literal("resource"),resource:U.union([XT8,GT8])}).passthrough();af.extend({content:U.array(U.union([$T8,YT8,JT8])),isError:U.boolean().default(!1).optional()}).or(af.extend({toolResult:U.unknown()}));QT8=U.object({jsonrpc:U.literal(m60),id:U.union([U.string(),U.number().int()])}).merge(sj8).strict(),WT8=U.object({jsonrpc:U.literal(m60),id:U.union([U.string(),U.number().int()]),result:af}).strict(),KT8=U.object({jsonrpc:U.literal(m60),id:U.union([U.string(),U.number().int()]),error:U.object({code:U.number().int(),message:U.string(),data:U.optional(U.unknown())})}).strict(),ZT8=U.object({jsonrpc:U.literal(m60)}).merge(U.object({method:U.string(),params:U.optional(uk0)})).strict();U.union([QT8,ZT8,WT8,KT8]);UT8={};bk0(UT8,{mergeIntoDataStream:()=>VT8,toDataStream:()=>HT8,toDataStreamResponse:()=>zT8});FT8={};bk0(FT8,{mergeIntoDataStream:()=>NT8,toDataStream:()=>LT8,toDataStreamResponse:()=>DT8})});async function Et1($,Y={},X=3,G={}){let J=0,Q=null,W=G.shouldRetryResponse??BT8;while(J<X){let K;try{K=await fetch($,Y)}catch(H){Q=H instanceof Error?H:Error(String(H))}if(K)if(!K.ok){if(Q=Error(`Request failed with status: ${K.status} ${K.statusText}`),!W(K))throw Q}else return K;if(J++,J>=X)break;let Z=Math.min(1000*Math.pow(2,J),1e4);await new Promise((H)=>setTimeout(H,Z))}throw Q||Error("Request failed after multiple retry attempts")}var BT8=()=>!0;var Mt1=()=>{};function d60(){var $=0,Y,X="";if(!u60||gO+16>256){u60=Array($=256);while($--)u60[$]=256*Math.random()|0;$=gO=0}for(;$<16;$++){if(Y=u60[gO+$],$==6)X+=p60[Y&15|64];else if($==8)X+=p60[Y&63|128];else X+=p60[Y];if($&1&&$>1&&$<11)X+="-"}return gO++,X}var gO=256,p60,u60;var Rt1=V0(()=>{p60=[];while(gO--)p60[gO]=(gO+256).toString(16).substring(1)});function Xe1($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}var ot1="vercel.ai.error",OT8,qt1,Pt1,i9,tt1="AI_APICallError",et1,ET8,wt1,_t1,Hn5,$e1="AI_EmptyResponseBodyError",Ye1,MT8,jt1,Tt1,zn5,Ge1="AI_InvalidArgumentError",Je1,RT8,It1,Ct1,Qe1,We1="AI_InvalidPromptError",Ke1,qT8,St1,kt1,Vn5,Ze1="AI_InvalidResponseDataError",Ue1,PT8,vt1,xt1,Fn5,He1="AI_JSONParseError",ze1,wT8,yt1,bt1,Ln5,Ve1="AI_LoadAPIKeyError",Fe1,_T8,ht1,ft1,Dn5,Le1="AI_LoadSettingError",De1,jT8,gt1,mt1,Nn5,Ne1="AI_NoContentGeneratedError",Ae1,TT8,ut1,pt1,An5,Be1="AI_NoSuchModelError",Oe1,IT8,dt1,ct1,Bn5,Ee1="AI_TooManyEmbeddingValuesForCallError",Me1,CT8,lt1,it1,On5,Re1="AI_TypeValidationError",qe1,ST8,nt1,rt1,En5,Pe1="AI_UnsupportedFunctionalityError",we1,kT8,at1,st1,Mn5;var lk0=V0(()=>{OT8=Symbol.for(ot1),i9=class $ extends(Pt1=Error,qt1=OT8,Pt1){constructor({name:Y,message:X,cause:G}){super(X);this[qt1]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,ot1)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}},et1=`vercel.ai.error.${tt1}`,ET8=Symbol.for(et1),Hn5=class extends(_t1=i9,wt1=ET8,_t1){constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:K=G!=null&&(G===408||G===409||G===429||G>=500),data:Z}){super({name:tt1,message:$,cause:W});this[wt1]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=K,this.data=Z}static isInstance($){return i9.hasMarker($,et1)}},Ye1=`vercel.ai.error.${$e1}`,MT8=Symbol.for(Ye1),zn5=class extends(Tt1=i9,jt1=MT8,Tt1){constructor({message:$="Empty response body"}={}){super({name:$e1,message:$});this[jt1]=!0}static isInstance($){return i9.hasMarker($,Ye1)}};Je1=`vercel.ai.error.${Ge1}`,RT8=Symbol.for(Je1),Qe1=class extends(Ct1=i9,It1=RT8,Ct1){constructor({message:$,cause:Y,argument:X}){super({name:Ge1,message:$,cause:Y});this[It1]=!0,this.argument=X}static isInstance($){return i9.hasMarker($,Je1)}},Ke1=`vercel.ai.error.${We1}`,qT8=Symbol.for(Ke1),Vn5=class extends(kt1=i9,St1=qT8,kt1){constructor({prompt:$,message:Y,cause:X}){super({name:We1,message:`Invalid prompt: ${Y}`,cause:X});this[St1]=!0,this.prompt=$}static isInstance($){return i9.hasMarker($,Ke1)}},Ue1=`vercel.ai.error.${Ze1}`,PT8=Symbol.for(Ue1),Fn5=class extends(xt1=i9,vt1=PT8,xt1){constructor({data:$,message:Y=`Invalid response data: ${JSON.stringify($)}.`}){super({name:Ze1,message:Y});this[vt1]=!0,this.data=$}static isInstance($){return i9.hasMarker($,Ue1)}},ze1=`vercel.ai.error.${He1}`,wT8=Symbol.for(ze1),Ln5=class extends(bt1=i9,yt1=wT8,bt1){constructor({text:$,cause:Y}){super({name:He1,message:`JSON parsing failed: Text: ${$}.
Error message: ${Xe1(Y)}`,cause:Y});this[yt1]=!0,this.text=$}static isInstance($){return i9.hasMarker($,ze1)}},Fe1=`vercel.ai.error.${Ve1}`,_T8=Symbol.for(Fe1),Dn5=class extends(ft1=i9,ht1=_T8,ft1){constructor({message:$}){super({name:Ve1,message:$});this[ht1]=!0}static isInstance($){return i9.hasMarker($,Fe1)}},De1=`vercel.ai.error.${Le1}`,jT8=Symbol.for(De1),Nn5=class extends(mt1=i9,gt1=jT8,mt1){constructor({message:$}){super({name:Le1,message:$});this[gt1]=!0}static isInstance($){return i9.hasMarker($,De1)}},Ae1=`vercel.ai.error.${Ne1}`,TT8=Symbol.for(Ae1),An5=class extends(pt1=i9,ut1=TT8,pt1){constructor({message:$="No content generated."}={}){super({name:Ne1,message:$});this[ut1]=!0}static isInstance($){return i9.hasMarker($,Ae1)}},Oe1=`vercel.ai.error.${Be1}`,IT8=Symbol.for(Oe1),Bn5=class extends(ct1=i9,dt1=IT8,ct1){constructor({errorName:$=Be1,modelId:Y,modelType:X,message:G=`No such ${X}: ${Y}`}){super({name:$,message:G});this[dt1]=!0,this.modelId=Y,this.modelType=X}static isInstance($){return i9.hasMarker($,Oe1)}},Me1=`vercel.ai.error.${Ee1}`,CT8=Symbol.for(Me1),On5=class extends(it1=i9,lt1=CT8,it1){constructor($){super({name:Ee1,message:`Too many values for a single embedding call. The ${$.provider} model "${$.modelId}" can only embed up to ${$.maxEmbeddingsPerCall} values per call, but ${$.values.length} values were provided.`});this[lt1]=!0,this.provider=$.provider,this.modelId=$.modelId,this.maxEmbeddingsPerCall=$.maxEmbeddingsPerCall,this.values=$.values}static isInstance($){return i9.hasMarker($,Me1)}},qe1=`vercel.ai.error.${Re1}`,ST8=Symbol.for(qe1),En5=class $ extends(rt1=i9,nt1=ST8,rt1){constructor({value:Y,cause:X}){super({name:Re1,message:`Type validation failed: Value: ${JSON.stringify(Y)}.
Error message: ${Xe1(X)}`,cause:X});this[nt1]=!0,this.value=Y}static isInstance(Y){return i9.hasMarker(Y,qe1)}static wrap({value:Y,cause:X}){return $.isInstance(X)&&X.value===Y?X:new $({value:Y,cause:X})}},we1=`vercel.ai.error.${Pe1}`,kT8=Symbol.for(we1),Mn5=class extends(st1=i9,at1=kT8,st1){constructor({functionality:$,message:Y=`'${$}' functionality not supported.`}){super({name:Pe1,message:Y});this[at1]=!0,this.functionality=$}static isInstance($){return i9.hasMarker($,we1)}}});function ik0($){}function c60($){if(typeof $=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:Y=ik0,onError:X=ik0,onRetry:G=ik0,onComment:J}=$,Q=[],W=!0,K,Z="",H=0,z;function V(B){if(W&&(W=!1,B.charCodeAt(0)===239&&B.charCodeAt(1)===187&&B.charCodeAt(2)===191&&(B=B.slice(3))),Q.length===0){let M=F(B);M!==""&&Q.push(M);return}if(B.indexOf(`
`)===-1&&B.indexOf("\r")===-1){Q.push(B);return}Q.push(B);let O=Q.join("");Q.length=0;let E=F(O);E!==""&&Q.push(E)}function F(B){let O=0;if(B.indexOf("\r")===-1){let E=B.indexOf(`
`,O);for(;E!==-1;){if(O===E){H>0&&Y({id:K,event:z,data:Z}),K=void 0,Z="",H=0,z=void 0,O=E+1,E=B.indexOf(`
`,O);continue}let M=B.charCodeAt(O);if(je1(B,O,M)){let R=B.charCodeAt(O+5)===mO?O+6:O+5,q=B.slice(R,E);if(H===0&&B.charCodeAt(E+1)===_e1){Y({id:K,event:z,data:q}),K=void 0,Z="",z=void 0,O=E+2,E=B.indexOf(`
`,O);continue}Z=H===0?q:`${Z}
${q}`,H++}else Te1(B,O,M)?z=B.slice(B.charCodeAt(O+6)===mO?O+7:O+6,E)||void 0:L(B,O,E);O=E+1,E=B.indexOf(`
`,O)}return B.slice(O)}for(;O<B.length;){let E=B.indexOf("\r",O),M=B.indexOf(`
`,O),R=-1;if(E!==-1&&M!==-1?R=E<M?E:M:E!==-1?E===B.length-1?R=-1:R=E:M!==-1&&(R=M),R===-1)break;L(B,O,R),O=R+1,B.charCodeAt(O-1)===vT8&&B.charCodeAt(O)===_e1&&O++}return B.slice(O)}function L(B,O,E){if(O===E){D();return}let M=B.charCodeAt(O);if(je1(B,O,M)){let j=B.charCodeAt(O+5)===mO?O+6:O+5,C=B.slice(j,E);Z=H===0?C:`${Z}
${C}`,H++;return}if(Te1(B,O,M)){z=B.slice(B.charCodeAt(O+6)===mO?O+7:O+6,E)||void 0;return}if(M===105&&B.charCodeAt(O+1)===100&&B.charCodeAt(O+2)===58){let j=B.slice(B.charCodeAt(O+3)===mO?O+4:O+3,E);K=j.includes("\x00")?void 0:j;return}if(M===58){if(J){let j=B.slice(O,E);J(j.slice(B.charCodeAt(O+1)===mO?2:1))}return}let R=B.slice(O,E),q=R.indexOf(":");if(q===-1){N(R,"",R);return}let _=R.slice(0,q),P=R.charCodeAt(q+1)===mO?2:1,w=R.slice(q+P);N(_,w,R)}function N(B,O,E){switch(B){case"event":z=O||void 0;break;case"data":Z=H===0?O:`${Z}
${O}`,H++;break;case"id":K=O.includes("\x00")?void 0:O;break;case"retry":/^\d+$/.test(O)?G(parseInt(O,10)):X(new nk0(`Invalid \`retry\` value: "${O}"`,{type:"invalid-retry",value:O,line:E}));break;default:X(new nk0(`Unknown field "${B.length>20?`${B.slice(0,20)}\u2026`:B}"`,{type:"unknown-field",field:B,value:O,line:E}));break}}function D(){H>0&&Y({id:K,event:z,data:Z}),K=void 0,Z="",H=0,z=void 0}function A(B={}){if(B.consume&&Q.length>0){let O=Q.join("");L(O,0,O.length)}W=!0,K=void 0,Z="",H=0,z=void 0,Q.length=0}return{feed:V,reset:A}}function je1($,Y,X){return X===100&&$.charCodeAt(Y+1)===97&&$.charCodeAt(Y+2)===116&&$.charCodeAt(Y+3)===97&&$.charCodeAt(Y+4)===58}function Te1($,Y,X){return X===101&&$.charCodeAt(Y+1)===118&&$.charCodeAt(Y+2)===101&&$.charCodeAt(Y+3)===110&&$.charCodeAt(Y+4)===116&&$.charCodeAt(Y+5)===58}var nk0,_e1=10,vT8=13,mO=32;var rk0=V0(()=>{nk0=class nk0 extends Error{constructor($,Y){super($),this.name="ParseError",this.type=Y.type,this.field=Y.field,this.value=Y.value,this.line=Y.line}}});var of;var ak0=V0(()=>{rk0();of=class of extends TransformStream{constructor({onError:$,onRetry:Y,onComment:X}={}){let G;super({start(J){G=c60({onEvent:(Q)=>{J.enqueue(Q)},onError(Q){$==="terminate"?J.error(Q):typeof $=="function"&&$(Q)},onRetry:Y,onComment:X})},transform(J){G.feed(J)}})}}});var sk0={};W8(sk0,{default:()=>yT8});var yT8=void 0;var ok0=()=>{};function tk0($){return($ instanceof Error||$ instanceof DOMException)&&($.name==="AbortError"||$.name==="ResponseAborted"||$.name==="TimeoutError")}function uT8({prompt:$,schema:Y,schemaPrefix:X=Y!=null?fT8:void 0,schemaSuffix:G=Y!=null?gT8:mT8}){return[$!=null&&$.length>0?$:void 0,$!=null&&$.length>0?"":void 0,X,Y!=null?JSON.stringify(Y):void 0,G].filter((J)=>J!=null).join(`
`)}function ek0({messages:$,schema:Y,schemaPrefix:X,schemaSuffix:G}){var J,Q;let W=((J=$[0])==null?void 0:J.role)==="system"?{...$[0]}:{role:"system",content:""};return W.content=uT8({prompt:W.content,schema:Y,schemaPrefix:X,schemaSuffix:G}),[W,...((Q=$[0])==null?void 0:Q.role)==="system"?$.slice(1):$]}function ve1({mediaType:$,url:Y,supportedUrls:X}){return Y=Y.toLowerCase(),$=$.toLowerCase(),Object.entries(X).map(([G,J])=>{let Q=G.toLowerCase();return Q==="*"||Q==="*/*"?{mediaTypePrefix:"",regexes:J}:{mediaTypePrefix:Q.replace(/\*/,""),regexes:J}}).filter(({mediaTypePrefix:G})=>$.startsWith(G)).flatMap(({regexes:G})=>G).some((G)=>G.test(Y))}function $v0($){let Y=$.replace(/-/g,"+").replace(/_/g,"/"),X=dT8(Y);return Uint8Array.from(X,(G)=>G.codePointAt(0))}function l60($){let Y="";for(let X=0;X<$.length;X++)Y+=String.fromCodePoint($[X]);return pT8(Y)}var Se1="AI_DownloadError",ke1,bT8,Ie1,Ce1,gn5,hT8=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=()=>{let Q=X.length,W=Array(Y);for(let K=0;K<Y;K++)W[K]=X[Math.random()*Q|0];return W.join("")};if($==null)return J;if(X.includes(G))throw new Qe1({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return()=>`${$}${G}${J()}`},un5,fT8="JSON schema:",gT8="You MUST answer with a JSON object that matches the JSON schema above.",mT8="You MUST answer with JSON.",pn5,pT8,dT8;var Yv0=V0(()=>{lk0();lk0();ok0();ke1=`vercel.ai.error.${Se1}`,bT8=Symbol.for(ke1),gn5=class extends(Ce1=i9,Ie1=bT8,Ce1){constructor({url:$,statusCode:Y,statusText:X,cause:G,message:J=G==null?`Failed to download ${$}: ${Y} ${X}`:`Failed to download ${$}: ${G}`}){super({name:Se1,message:J,cause:G});this[Ie1]=!0,this.url=$,this.statusCode=Y,this.statusText=X}static isInstance($){return i9.hasMarker($,ke1)}},un5=hT8();pn5=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"),{btoa:pT8,atob:dT8}=globalThis});function cT8($){return{...$,id:$.id??crypto.randomUUID(),createdAt:$.createdAt instanceof Date?$.createdAt:$.createdAt?new Date($.createdAt):new Date,acceptedAt:$.acceptedAt instanceof Date?$.acceptedAt:$.acceptedAt?new Date($.acceptedAt):void 0}}function le1($){return $.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;")}function lT8($){return le1($).replaceAll('"',"&quot;")}function ie1($,Y){if(!iT8.test($))throw Error(`Invalid signal XML ${Y}: ${$}`)}function nT8($){if(!$)return"";let Y=Object.entries($).filter((X)=>X[1]!==null&&X[1]!==void 0).map(([X,G])=>{return ie1(X,"attribute name"),`${X}="${lT8(String(G))}"`}).join(" ");return Y?` ${Y}`:""}function Wv0($){return ie1($.type,"tag name"),`<${$.type}${nT8($.attributes)}>${le1(ef($.contents))}</${$.type}>`}function ef($){if(typeof $==="string")return $;if(Array.isArray($))return $.map((Y)=>ef(Y)).join(`
`);if($&&typeof $==="object"){let Y=$.content;if(typeof Y==="string")return Y;if(Array.isArray(Y))return Y.map((X)=>X&&typeof X==="object"&&("text"in X)?String(X.text):"").filter(Boolean).join(`
`)}return""}function rT8($){if($.type==="user-message")return $.contents;return[{role:"user",content:Wv0({...$,contents:ef($.contents)})}]}function aT8($){return{type:`data-${$.type}`,data:{id:$.id,type:$.type,contents:$.contents,createdAt:$.createdAt.toISOString(),...$.acceptedAt?{acceptedAt:$.acceptedAt.toISOString()}:{},...$.attributes?{attributes:$.attributes}:{},...$.metadata?{metadata:$.metadata}:{}}}}function sT8($,Y){return{id:$.id,role:"signal",createdAt:$.createdAt,threadId:Y?.threadId,resourceId:Y?.resourceId,type:$.type,content:{format:2,parts:[{type:"text",text:ef($.contents)}],metadata:{signal:{id:$.id,type:$.type,createdAt:$.createdAt.toISOString(),...$.acceptedAt?{acceptedAt:$.acceptedAt.toISOString()}:{},contents:$.contents,...$.attributes?{attributes:$.attributes}:{},...$.metadata?{metadata:$.metadata}:{}}}}}}function Gv0($){if(!$||typeof $!=="object"||Array.isArray($))return!1;return $.__isCreatedSignal===!0}function Wj($){let Y=cT8($);return{...Y,__isCreatedSignal:!0,toDBMessage:(X)=>sT8(Y,X),toLLMMessage:()=>rT8(Y),toDataPart:()=>aT8(Y)}}function r60($){let Y=$.content.metadata?.signal,X=Y&&typeof Y==="object"&&!Array.isArray(Y)?Y:void 0,G=typeof X?.type==="string"?X.type:$.type??"user-message",J=X&&"contents"in X?X.contents:typeof $.content.content==="string"?$.content.content:$.content.parts.find((W)=>W.type==="text")?.text??"",Q={id:typeof X?.id==="string"?X.id:$.id,createdAt:typeof X?.createdAt==="string"?X.createdAt:$.createdAt,acceptedAt:typeof X?.acceptedAt==="string"?X.acceptedAt:void 0,attributes:X?.attributes&&typeof X.attributes==="object"&&!Array.isArray(X.attributes)?X.attributes:void 0,metadata:X?.metadata&&typeof X.metadata==="object"&&!Array.isArray(X.metadata)?X.metadata:void 0};return Wj(G==="user-message"?{...Q,type:G,contents:J}:{...Q,type:G,contents:ef(J)})}function Qj($){if(typeof $==="string")return $;if($ instanceof ArrayBuffer)return l60(new Uint8Array($));return l60($)}function n60($){if(!$.startsWith("data:"))return{isDataUri:!1,base64Content:$};let Y=$.indexOf(",");if(Y===-1)return{isDataUri:!0,base64Content:$};let X=$.substring(5,Y),G=$.substring(Y+1),J=X.indexOf(";");return{isDataUri:!0,mimeType:(J!==-1?X.substring(0,J):X)||void 0,base64Content:G}}function a60($,Y="application/octet-stream"){if($.startsWith("data:"))return $;return`data:${Y};base64,${$}`}function oT8($,Y){if(typeof $==="string")return $;if($ instanceof URL)return $.toString();if($ instanceof Uint8Array||$ instanceof ArrayBuffer||globalThis.Buffer&&Buffer.isBuffer($))return Qj($);return String($)}function xe1($){if($ instanceof URL)return $.toString();if(typeof $==="string")return $.length;if($ instanceof Uint8Array)return $.byteLength;if($ instanceof ArrayBuffer)return $.byteLength;return $}function tT8($){try{return new URL($),!0}catch{if($.startsWith("//"))try{return new URL(`https:${$}`),!0}catch{return!1}return!1}}function tf($,Y){let X=n60($),G=X.isDataUri&&X.mimeType?X.mimeType:Y;if(X.isDataUri)return{type:"dataUri",mimeType:G,data:$};if(tT8($))return{type:"url",mimeType:G,data:$};return{type:"raw",mimeType:G,data:$}}function ne1($,Y){return`${$}:${Y}`}function $I8($){return re1($)[0]}function ye1($){let Y=$I8($);return Y?ne1(Y.provider,Y.itemId):void 0}function re1($){if(!$)return[];let X=$.azure?.itemId,J=$.openai?.itemId;if(typeof X==="string"&&X===J)return[{provider:"azure",itemId:X}];return eT8.flatMap((Q)=>{let K=$[Q]?.itemId;return typeof K==="string"?[{provider:Q,itemId:K}]:[]})}function YI8($){return re1($).map(({provider:Y,itemId:X})=>ne1(Y,X))}function i60($,Y){let X=[...$],G=X.findIndex((J)=>J.role!=="system");if(G===-1){if(X.length>0)Y?.warn("No user or assistant messages in the request. Some providers (e.g. Gemini) require at least one user message to generate a response.")}else if(X[G]?.role==="assistant")X.splice(G,0,{role:"user",content:"."});return X}function XI8($,Y){return $.map((X)=>JI8(X,Y))}function GI8($){let Y=$.map((G)=>Array.isArray(G.content)?[...G.content]:null);for(let G=0;G<$.length;G++){let J=$[G];if(J.role==="assistant"&&Array.isArray(J.content)){let Q=new Set,W=new Set;for(let z of J.content)if(z.type==="tool-call")Q.add(z.toolCallId);else if(z.type==="tool-result")W.add(z.toolCallId);let K=$[G+1],Z=new Set;if(K&&K.role==="tool"&&Array.isArray(K.content)){for(let z of K.content)if(z.type==="tool-result")Z.add(z.toolCallId)}let H=new Set([...Q].filter((z)=>W.has(z)||Z.has(z)));if(Y[G]=Y[G].filter((z)=>{if(z.type!=="tool-call")return!0;let V=z;return V.providerExecuted===!0||H.has(V.toolCallId)}),K&&K.role==="tool"&&Array.isArray(K.content))Y[G+1]=Y[G+1].filter((z)=>z.type!=="tool-result"||H.has(z.toolCallId))}else if(J.role==="tool"&&Array.isArray(J.content)){let Q=$[G-1];if(!Q||Q.role!=="assistant"||!Array.isArray(Q.content))Y[G]=Y[G].filter((W)=>W.type!=="tool-result")}}let X=[];for(let G=0;G<$.length;G++){let J=$[G],Q=Y[G];if(Q==null){X.push(J);continue}if(Q.length===0)continue;if(Array.isArray(J.content)&&Q.length===J.content.length){X.push(J);continue}X.push({...J,content:Q})}return X}function JI8($,Y){if($.role!=="tool"||!Array.isArray($.content))return $;return{...$,content:$.content.map((X)=>{if(X.type==="tool-result")return{...X,input:Kv0(Y,X.toolCallId)};return X})}}function Kv0($,Y){for(let X=$.length-1;X>=0;X--){let G=$[X];if(!G||G.role!=="assistant")continue;if(G.content.parts){let J=G.content.parts.find((Q)=>Q.type==="tool-invocation"&&Q.toolInvocation.toolCallId===Y);if(J&&J.type==="tool-invocation"){let Q=J.toolInvocation.args||{};if(typeof Q==="object"&&Object.keys(Q).length>0)return Q}}if(G.content.toolInvocations){let J=G.content.toolInvocations.find((Q)=>Q.toolCallId===Y);if(J){let Q=J.args||{};if(typeof Q==="object"&&Object.keys(Q).length>0)return Q}}}return{}}function Jj($,Y,X,G=!0){if(!G)return X;let J=uY($,"display",Y);return f7(J)?J.transformed:X}function QI8($,Y,X){return{...$,args:Jj(Y,"input-available",$.args,X),...$.state==="result"?{result:Jj(Y,"output-available",Jj(Y,"error",$.result,X),X)}:{}}}function WI8($){return $}function be1($){if(!$.some((X)=>!(X.type==="text"&&X.text==="")))return $;return $.filter((X)=>{if(X.type==="text")return X.text!=="";return!0})}function Jv0($){let Y=$.content.metadata?.signal;if(Y&&typeof Y==="object"&&!Array.isArray(Y)){let X=Y.type;return typeof X==="string"?X:$.type}return $.type}function KI8($,Y){let X=$.content.metadata?.signal&&typeof $.content.metadata.signal==="object"?$.content.metadata.signal:{},G=X.metadata&&typeof X.metadata==="object"&&!Array.isArray(X.metadata)?X.metadata:{};return{type:`data-${Jv0($)??"signal"}`,data:{id:typeof X.id==="string"?X.id:$.id,type:Jv0($)??"signal",contents:"contents"in X?X.contents:Y,createdAt:typeof X.createdAt==="string"?X.createdAt:$.createdAt.toISOString(),...Object.keys(G).length?{metadata:G}:{}}}}function P7($){if(typeof $!=="string")return he1;return ZI8.test($)?$:he1}function fe1($){if(!$.some((X)=>!(X.type==="text"&&X.text==="")))return $;return $.filter((X)=>{if(X.type==="text")return X.text!=="";return!0})}function ae1($){let Y=$.content.metadata?.signal;if(Y&&typeof Y==="object"&&!Array.isArray(Y)){let X=Y.type;return typeof X==="string"?X:$.type}return $.type}function UI8($){return typeof $.content.content==="string"?$.content.content:$.content.parts.find((Y)=>Y.type==="text")?.text??""}function HI8($){let Y=$.content.metadata?.signal&&typeof $.content.metadata.signal==="object"?$.content.metadata.signal:{},X=Y.metadata&&typeof Y.metadata==="object"&&!Array.isArray(Y.metadata)?Y.metadata:{},G=ae1($)??"signal";return{type:`data-${G}`,data:{id:typeof Y.id==="string"?Y.id:$.id,type:G,contents:"contents"in Y?Y.contents:UI8($),createdAt:typeof Y.createdAt==="string"?Y.createdAt:$.createdAt.toISOString(),...Object.keys(X).length?{metadata:X}:{}}}}function ge1($){if(typeof $==="object"&&$&&"type"in $)$=$.type;if(typeof $!=="string")return P7($);if($==="dynamic-tool")return"dynamic-tool";if($.startsWith("tool-"))return P7($.slice(5));return P7($)}function tL($,Y){if(Y==null)return $;return{...$||{},mastra:{...($||{}).mastra||{},createdAt:Y}}}function CW($){let Y=$?.mastra;if(!Y||typeof Y!=="object")return;let X=Y.createdAt;return typeof X==="number"?X:void 0}function Yj($,Y,X,G=!0){if(!G)return X;let J=uY($,"display",Y);return f7(J)?J.transformed:X}function Xv0($,Y,X=!0){if(!X)return $;if(!$||typeof $!=="object")return $;let G=$,J=G.metadata??G.providerMetadata,Q=uY(J,"display",Y),W=uY(J,"display","input-available"),K=Y==="approval"?f7(Q)?Q.transformed:f7(W)?W.transformed:void 0:f7(W)?W.transformed:f7(Q)?Q.transformed:void 0,Z=Y==="suspend"&&f7(Q)?Q.transformed:void 0;return{...G,...K!==void 0?{args:K}:{},...Z!==void 0?{suspendPayload:Z}:{}}}function $J($,Y){for(let[X,G]of Object.entries(Y))if(G!==void 0)$[X]=G;return $}function w3($,Y,X){let G=uY($,"display",Y);return f7(G)?G.transformed:X}function zI8($){return $.startsWith("tool-")?P7($.slice(5)):P7($)}function se1($){return typeof $==="object"&&$!==null&&!Array.isArray($)?$:{}}function VI8($){return typeof $==="object"&&$&&"value"in $?$.value:$}function FI8($){return $==="approval-requested"||$==="approval-responded"||$==="output-denied"}function LI8($){if(!$)return;return{id:$.id,approved:"approved"in $?$.approved:void 0,reason:"reason"in $?$.reason:void 0}}function oe1($){return $}function DI8($){return $.type==="dynamic-tool"?P7($.toolName):zI8($.type)}function NI8($){let Y={toolCallId:$.toolCallId,toolName:DI8($),args:se1($.input),approval:"approval"in $?LI8($.approval):void 0,providerMetadata:"callProviderMetadata"in $?oe1($.callProviderMetadata):void 0,providerExecuted:$.providerExecuted,title:$.title,preliminary:"preliminary"in $?$.preliminary:void 0};switch($.state){case"input-streaming":return uO({...Y,state:"partial-call"});case"input-available":return uO({...Y,state:"call"});case"output-available":return uO({...Y,state:"result",result:VI8($.output)});case"output-error":return uO({...Y,state:"output-error",errorText:$.errorText,rawInput:"rawInput"in $?$.rawInput:void 0});case"approval-requested":case"approval-responded":case"output-denied":return uO({...Y,state:$.state})}}function AI8($){if($.type==="dynamic-tool"&&!FI8($.state))return{...$,type:`tool-${P7($.toolName)}`};return $}function uO({toolCallId:$,toolName:Y,args:X,state:G,approval:J,result:Q,errorText:W,rawInput:K,providerMetadata:Z,providerExecuted:H,title:z,preliminary:V}){return $J({type:"tool-invocation",toolInvocation:$J({toolCallId:$,toolName:Y,args:X,state:G},{approval:J,result:Q,errorText:W,rawInput:K})},{providerMetadata:Z,providerExecuted:H,title:z,preliminary:V})}function BI8($,Y){for(let X of $)if(X.type==="tool-invocation"&&X.toolInvocation.toolCallId===Y)return X;return}function OI8($,Y){if(!$)return;for(let X of[...$].reverse())for(let G of[...X.content.parts||[]].reverse())if(G.type==="tool-invocation"&&G.toolInvocation.approval?.id===Y&&G.toolInvocation.state==="approval-requested")return G;return}function EI8($){let Y=[];for(let X of $){if(X.type!=="tool-invocation")continue;let G=X.toolInvocation;if(G.state==="result"){Y.push({args:G.args,result:G.result,toolCallId:G.toolCallId,toolName:G.toolName,state:"result"});continue}if(G.state==="call"||G.state==="partial-call")Y.push({args:G.args,toolCallId:G.toolCallId,toolName:G.toolName,state:G.state})}return Y.length>0?Y:void 0}function eL($,...Y){let X=new Set(Y.flatMap((G)=>YI8(G)));for(let G of X)$+=`|${G}`;return $}function MI8($){if($.role==="system")return $;if(typeof $.content==="string"&&($.role==="assistant"||$.role==="user"))return{...$,content:[{type:"text",text:$.content}]};if(typeof $.content==="string")throw Error(`Saw text content for input CoreMessage, but the role is ${$.role}. This is only allowed for "system", "assistant", and "user" roles.`);let Y={user:[],assistant:[],tool:[]},X=$.role;for(let G of $.content){let J=`Saw incompatible message content part type ${G.type} for message role ${X}`;switch(G.type){case"text":{if(X==="tool")throw Error(J);Y[X].push(G);break}case"redacted-reasoning":case"reasoning":{if(X!=="assistant")throw Error(J);Y[X].push(G);break}case"tool-call":{if(X==="tool"||X==="user")throw Error(J);Y[X].push({...G,toolName:P7(G.toolName)});break}case"tool-result":{if(X==="assistant"||X==="user")throw Error(J);Y[X].push({...G,toolName:P7(G.toolName)});break}case"image":{if(X==="tool"||X==="assistant")throw Error(J);let Q;if(G.image instanceof URL||G.image instanceof Uint8Array)Q=G.image;else if(Buffer.isBuffer(G.image)||G.image instanceof ArrayBuffer)Q=new Uint8Array(G.image);else if(tf(G.image,G.mimeType).type==="raw"){let K=a60(G.image,G.mimeType||"image/png");Q=new URL(K)}else Q=new URL(G.image);Y[X].push({...G,image:Q});break}case"file":{if(X==="tool")throw Error(J);Y[X].push({...G,data:G.data instanceof URL?G.data:typeof G.data==="string"?G.data:Qj(G.data)});break}}}if(X==="tool")return{...$,content:Y[X]};if(X==="user")return{...$,content:Y[X]};if(X==="assistant")return{...$,content:Y[X]};throw Error(`Encountered unknown role ${X} when converting V4 CoreMessage -> V4 LanguageModelV1Prompt, input message: ${JSON.stringify($,null,2)}`)}function te1($){if($.role==="system")return $;if(typeof $.content==="string"&&($.role==="assistant"||$.role==="user"))return{role:$.role,content:[{type:"text",text:$.content}],providerOptions:$.providerOptions};if(typeof $.content==="string")throw Error(`Saw text content for input ModelMessage, but the role is ${$.role}. This is only allowed for "system", "assistant", and "user" roles.`);let Y={user:[],assistant:[],tool:[]},X=$.role;for(let G of $.content){let J=`Saw incompatible message content part type ${G.type} for message role ${X}`;switch(G.type){case"text":{if(X==="tool")throw Error(J);Y[X].push(G);break}case"reasoning":{if(X==="tool"||X==="user")throw Error(J);Y[X].push(G);break}case"tool-call":{if(X!=="assistant")throw Error(J);Y[X].push({...G,toolName:P7(G.toolName)});break}case"tool-result":{if(X==="user")throw Error(J);Y[X].push({...G,toolName:P7(G.toolName)});break}case"file":{if(X==="tool")throw Error(J);Y[X].push({...G,data:G.data instanceof ArrayBuffer?new Uint8Array(G.data):G.data});break}case"image":{if(X==="tool")throw Error(J);Y[X].push({...G,mediaType:G.mediaType||"image/unknown",type:"file",data:G.image instanceof ArrayBuffer?new Uint8Array(G.image):G.image});break}}}if(X==="tool")return{...$,content:Y[X]};if(X==="user")return{...$,content:Y[X]};if(X==="assistant")return{...$,content:Y[X]};throw Error(`Encountered unknown role ${X} when converting V5 ModelMessage -> V5 LanguageModelV2Message, input message: ${JSON.stringify($,null,2)}`)}function Zv0($){if(typeof $==="string")return $;return $.reduce((Y,X)=>{if(X.type==="text")Y+=X.text;return Y},"")}function YD($,Y){let X=P9.isAIV4UIMessage($)&&$,G=P9.isAIV4UIMessage(Y)&&Y;if(X&&!G)return!1;if(X&&G)return Q7.fromAIV4Parts($.parts)===Q7.fromAIV4Parts(Y.parts);let J=P9.isAIV4CoreMessage($)&&$,Q=P9.isAIV4CoreMessage(Y)&&Y;if(J&&!Q)return!1;if(J&&Q)return Q7.fromAIV4CoreMessageContent(J.content)===Q7.fromAIV4CoreMessageContent(Q.content);let W=P9.isMastraMessageV1($)&&$,K=P9.isMastraMessageV1(Y)&&Y;if(W&&!K)return!1;if(W&&K)return W.id===K.id&&Q7.fromAIV4CoreMessageContent(W.content)===Q7.fromAIV4CoreMessageContent(K.content);let Z=P9.isMastraDBMessage($)&&$,H=P9.isMastraDBMessage(Y)&&Y;if(Z&&!H)return!1;if(Z&&H)return Z.id===H.id&&Q7.fromDBParts(Z.content.parts)===Q7.fromDBParts(H.content.parts);let z=P9.isAIV5UIMessage($)&&$,V=P9.isAIV5UIMessage(Y)&&Y;if(z&&!V)return!1;if(z&&V)return Q7.fromAIV5Parts($.parts)===Q7.fromAIV5Parts(Y.parts);let F=P9.isAIV5CoreMessage($)&&$,L=P9.isAIV5CoreMessage(Y)&&Y;if(F&&!L)return!1;if(F&&L)return Q7.fromAIV5ModelMessageContent(F.content)===Q7.fromAIV5ModelMessageContent(L.content);return!0}function Uv0($){if($.createdAt==null)$.createdAt=Date.now();return $}function Xj($,Y){if(Y==="memory"||!Array.isArray($.content.parts))return $;return $.content.parts=$.content.parts.map((X)=>Uv0(X)),$}function me1($,Y,X){if(Y!=="memory"&&"threadId"in $&&$.threadId&&X.memoryInfo&&$.threadId!==X.memoryInfo.threadId)throw Error(`Received input message with wrong threadId. Input ${$.threadId}, expected ${X.memoryInfo.threadId}`);if("resourceId"in $&&$.resourceId&&X.memoryInfo?.resourceId&&$.resourceId!==X.memoryInfo.resourceId)throw Error(`Received input message with wrong resourceId. Input ${$.resourceId}, expected ${X.memoryInfo.resourceId}`);if(P9.isMastraMessageV1($))return Xj(RI8($,Y,X),Y);if(P9.isMastraDBMessage($))return Xj(qI8($,X),Y);if(P9.isAIV4CoreMessage($))return Xj($D.fromCoreMessage($,X,Y),Y);if(P9.isAIV4UIMessage($))return Xj($D.fromUIMessage($,X,Y),Y);let J="id"in $&&typeof $.id==="string"?$.id:X.newMessageId();if(P9.isAIV6CoreMessage($)){let Q=j3.fromModelMessage($,Y,X),W="metadata"in $&&$.metadata&&typeof $.metadata==="object"&&"createdAt"in $.metadata?$.metadata.createdAt:void 0;return{...Q,id:J,createdAt:X.generateCreatedAt(Y,W),threadId:X.memoryInfo?.threadId,resourceId:X.memoryInfo?.resourceId}}if(P9.isAIV6UIMessage($)){let Q=j3.fromUIMessage($),W="createdAt"in $?$.createdAt:void 0;return{...Q,id:J,createdAt:X.generateCreatedAt(Y,W),threadId:X.memoryInfo?.threadId,resourceId:X.memoryInfo?.resourceId}}if(P9.isAIV5CoreMessage($)){let Q=uz.fromModelMessage($,Y),W="metadata"in $&&$.metadata&&typeof $.metadata==="object"&&"createdAt"in $.metadata?$.metadata.createdAt:void 0;return Xj({...Q,id:J,createdAt:X.generateCreatedAt(Y,W),threadId:X.memoryInfo?.threadId,resourceId:X.memoryInfo?.resourceId},Y)}if(P9.isAIV5UIMessage($)){let Q=uz.fromUIMessage($),W="createdAt"in $?$.createdAt:void 0;return Xj({...Q,id:J,createdAt:X.generateCreatedAt(Y,W),threadId:X.memoryInfo?.threadId,resourceId:X.memoryInfo?.resourceId},Y)}throw Error(`Found unhandled message ${JSON.stringify($)}`)}function RI8($,Y,X){let G=$D.fromCoreMessage({content:$.content,role:$.role},X,Y);return{id:$.id,role:G.role,createdAt:X.generateCreatedAt(Y,$.createdAt),threadId:$.threadId,resourceId:$.resourceId,content:G.content}}function qI8($,Y){if(!$.id)$.id=Y.newMessageId();if(!($.createdAt instanceof Date))$.createdAt=new Date($.createdAt);if($.content.toolInvocations&&$.content.parts)$.content.toolInvocations=$.content.toolInvocations.map((X)=>{if(!X.args||Object.keys(X.args).length===0){let G=$.content.parts.find((J)=>J.type==="tool-invocation"&&J.toolInvocation&&J.toolInvocation.toolCallId===X.toolCallId&&J.toolInvocation.args&&Object.keys(J.toolInvocation.args).length>0);if(G&&G.type==="tool-invocation")return{...X,args:G.toolInvocation.args}}return X});if(!$.threadId&&Y.memoryInfo?.threadId){if($.threadId=Y.memoryInfo.threadId,!$.resourceId&&Y.memoryInfo?.resourceId)$.resourceId=Y.memoryInfo.resourceId}return $}function PI8($){return $.type.startsWith("source-")}function wI8($){let Y=[];for(let X of $){if(X.type!=="text"){Y.push(X);continue}let G=X,J=ye1(G.providerMetadata);if(!J){Y.push(X);continue}let Q=!1;for(let W=Y.length-1;W>=0;W--){let K=Y[W];if(K.type==="text"){let Z=K;if(ye1(Z.providerMetadata)===J)Y[W]={...Z,text:Z.text+G.text},Q=!0;break}if(!PI8(K))break}if(Q)continue;Y.push(X)}return Y}function _I8($){return $.map((X)=>{if(X.parts.length===0)return!1;let G=X.parts.filter((Q)=>Q.type!=="tool-invocation"||Q.toolInvocation.state!=="call"&&Q.toolInvocation.state!=="partial-call");if(!G.length)return!1;let J={...X,parts:G};if("toolInvocations"in X&&X.toolInvocations)J.toolInvocations=X.toolInvocations.filter((Q)=>Q.state==="result");return J}).filter((X)=>Boolean(X))}function ee1($,Y=!1){let X=-1;for(let W=$.length-1;W>=0;W--)if($[W].role==="user"){X=W;break}let G=(W,K)=>W.parts.filter((Z)=>{if(typeof Z.type==="string"&&Z.type.startsWith("data-"))return!1;if(Z.type==="text"&&(!("text"in Z)||Z.text===""||Z.text?.trim()==="")){if(W.role==="user")return!1;if(W.parts.some((z)=>!(z.type==="text"&&(!("text"in z)||z.text===""||z.text?.trim()===""))))return!1}if(!zQ(Z))return!0;if(Y){if(Z.state==="output-available"||Z.state==="output-error")return!0;if(Z.state==="input-available"&&Z.providerExecuted&&K)return!0;return!1}return Z.state!=="input-streaming"}),J=-1;if(X!==$.length-1)for(let W=$.length-1;W>X;W--){let K=$[W];if(K.role!=="assistant"||K.parts.length===0)continue;if(G(K,!0).length>0){J=W;break}}return $.map((W,K)=>{if(W.parts.length===0)return!1;let Z=W.role==="assistant"&&K===J,H=G(W,Z);if(!H.length)return!1;let z=wI8(H);return{...W,parts:z.map((F)=>{if(zQ(F)&&F.state==="output-available")return{...F,output:typeof F.output==="object"&&F.output&&"value"in F.output?F.output.value:F.output};return F})}}).filter((W)=>Boolean(W))}function jI8($){for(let Y of $){if(Y.role!=="assistant")continue;for(let[X,G]of Y.parts.entries()){if(!zQ(G))continue;let J=Y.parts.at(X+1);if(J&&J.type!=="step-start"&&!zQ(J))Y.parts.splice(X+1,0,{type:"step-start"});if(J&&zQ(J)&&!G.providerExecuted&&J.providerExecuted&&(J.state==="output-available"||J.state==="output-error"))Y.parts.splice(X+1,0,{type:"step-start"})}}return $}function r2($){return gk0(_I8($))}function TI8($,Y){let X=[];for(let J of Y){if(J.role!=="assistant")continue;for(let Q of J.parts)if(Q.type==="file")X.push(Q.providerMetadata??void 0)}if(X.length===0||X.every((J)=>J==null))return $;let G=0;return $.map((J)=>{if(J.role!=="assistant"||typeof J.content==="string")return J;let Q=!1,W=J.content.map((K)=>{if(K.type!=="file"||G>=X.length)return K;let Z=X[G++];if(K.providerOptions||!Z)return K;return Q=!0,{...K,providerOptions:Z}});return Q?{...J,content:W}:J})}function _3($,Y,X=!1){let G=ee1($,X),J=jI8(G),Q=[];for(let Z of J){let H=NI0([Z]);if(H.length===0)continue;let z=Z.metadata&&typeof Z.metadata==="object"&&"providerMetadata"in Z.metadata?Z.metadata.providerMetadata:void 0;if(z){let V=-1;for(let F=H.length-1;F>=0;F--)if(H[F]?.role===Z.role){V=F;break}if(V!==-1)H[V]={...H[V],providerOptions:z}}Q.push(...H)}let W=TI8(Q,J),K=XI8(W,Y);return X?GI8(K):K}function ue1($,Y,X,G){return _3($.map((J)=>$D.fromCoreMessage(J,X,Y)).map((J)=>uz.toUIMessage(J)),G)}function II8($){if(typeof $==="string")return{role:"system",content:$};if(P9.isAIV6CoreMessage($)){let Y=j3.fromModelMessage($,"system");return $D.systemToV4Core(Y)}if(P9.isAIV5CoreMessage($)){let Y=uz.fromModelMessage($,"system");return $D.systemToV4Core(Y)}if(P9.isMastraDBMessage($))return $D.systemToV4Core($);return $}function CI8($){try{let[Y,X]=$.split(",");return{mediaType:Y?.split(";")[0]?.split(":")[1],base64Content:X}}catch{return{mediaType:void 0,base64Content:void 0}}}function SI8($){if($ instanceof Uint8Array)return{data:$,mediaType:void 0};if($ instanceof ArrayBuffer)return{data:new Uint8Array($),mediaType:void 0};if(typeof $==="string")try{$=new URL($)}catch{}if($ instanceof URL&&$.protocol==="data:"){let{mediaType:Y,base64Content:X}=CI8($.toString());if(Y==null||X==null)throw new G0({id:"INVALID_DATA_URL_FORMAT",text:`Invalid data URL format in content ${$.toString()}`,domain:"LLM",category:"USER"});return{data:X,mediaType:Y}}return{data:$,mediaType:void 0}}function xI8($){return typeof $==="string"&&$.startsWith("SUQz")||typeof $!=="string"&&$.length>10&&$[0]===73&&$[1]===68&&$[2]===51?vI8($):$}function yI8({data:$,signatures:Y}){let X=xI8($);for(let G of Y)if(typeof X==="string"?X.startsWith(G.base64Prefix):X.length>=G.bytesPrefix.length&&G.bytesPrefix.every((J,Q)=>X[Q]===J))return G.mediaType;return}function de1($,Y){let X,G=$.type;switch(G){case"image":X=$.image;break;case"file":X=$.data;break;default:throw Error(`Unsupported part type: ${G}`)}let{data:J,mediaType:Q}=SI8(X),W=Q??$.mediaType,K=J;if(K instanceof URL&&Y){let Z=Y[K.toString()];if(Z)K=Z.data,W??=Z.mediaType}switch(G){case"image":{if(K instanceof Uint8Array||typeof K==="string")W=yI8({data:K,signatures:kI8})??W;return{type:"file",mediaType:W??"image/*",filename:void 0,data:K,providerOptions:$.providerOptions}}case"file":{if(W==null)throw Error("Media type is missing for file part");return{type:"file",mediaType:W,filename:$.filename,data:K,providerOptions:$.providerOptions}}}}function ce1($){let Y=[];for(let X of $){let G=tf(X.url,X.contentType),J=X.url;if(G.type==="raw")J=a60(X.url,X.contentType||"application/octet-stream");let Q;try{Q=new URL(J)}catch{throw Error(`Invalid URL: ${X.url}`)}switch(Q.protocol){case"http:":case"https:":case"gs:":case"s3:":{if(X.contentType?.startsWith("image/"))Y.push({type:"image",image:Q.toString(),mimeType:X.contentType});else{if(!X.contentType)throw Error("If the attachment is not an image, it must specify a content type");Y.push({type:"file",data:Q.toString(),mimeType:X.contentType})}break}case"data:":{if(X.contentType?.startsWith("image/"))Y.push({type:"image",image:J,mimeType:X.contentType});else if(X.contentType?.startsWith("text/"))Y.push({type:"file",data:J,mimeType:X.contentType});else{if(!X.contentType)throw Error("If the attachment is not an image or text, it must specify a content type");Y.push({type:"file",data:J,mimeType:X.contentType})}break}default:throw Error(`Unsupported URL protocol: ${Q.protocol}`)}}return Y}function Gj($){let Y=[],X=bI8(Y);for(let G=0;G<$.length;G++){let J=$[G],Q=G===$.length-1;if(!J?.content)continue;let{content:W,experimental_attachments:K=[],parts:Z}=J.content,{role:H}=J,z={id:J.id,createdAt:J.createdAt,resourceId:J.resourceId,threadId:J.threadId},V=[...K],F=[];for(let L of Z)if(L.type==="file")V.push({url:L.data,contentType:L.mimeType});else F.push(L);switch(H){case"user":{if(F==null){let L=V?[{type:"text",text:W||""},...ce1(V)]:{type:"text",text:W||""};X({role:"user",...z,type:"text",content:L})}else{let L=J.content.parts.filter((D)=>D.type==="text").map((D)=>({type:"text",text:D.text})),N=V?[...L,...ce1(V)]:L;X({role:"user",...z,type:"text",content:Array.isArray(N)&&N.length===1&&N[0]?.type==="text"&&typeof W<"u"?W:N})}break}case"assistant":{if(J.content.parts!=null){let D=function(){let M=[];for(let _ of O)switch(_.type){case"file":case"text":{M.push(_);break}case"reasoning":{for(let P of _.details)switch(P.type){case"text":M.push({type:"reasoning",text:P.text,signature:P.signature});break;case"redacted":M.push({type:"redacted-reasoning",data:P.data});break}break}case"tool-invocation":if(_.toolInvocation.toolName!=="updateWorkingMemory")M.push({type:"tool-call",toolCallId:_.toolInvocation.toolCallId,toolName:_.toolInvocation.toolName,args:_.toolInvocation.args});break}X({role:"assistant",...z,type:M.some((_)=>_.type==="tool-call")?"tool-call":"text",content:typeof M!=="string"&&Array.isArray(M)&&M.length===1&&M[0]?.type==="text"?M[0].text:M});let q=O.filter((_)=>("type"in _)&&_.type==="tool-invocation").map((_)=>_.toolInvocation).filter((_)=>_.toolName!=="updateWorkingMemory").filter((_)=>_.state==="result"&&("result"in _));if(q.length>0)X({role:"tool",...z,type:"tool-result",content:q.map((_)=>{let{toolCallId:P,toolName:w,result:j}=_;return{type:"tool-result",toolCallId:P,toolName:w,result:j}})});O=[],B=!1,A++},A=0,B=!1,O=[];for(let M of J.content.parts)switch(M.type){case"text":{if(B)D();O.push(M);break}case"file":case"reasoning":{O.push(M);break}case"tool-invocation":{if(O.some((q)=>q.type==="text"||q.type==="file"||q.type==="reasoning")||(M.toolInvocation.step??0)!==A)D();O.push(M),B=!0;break}}D();let E=J.content.toolInvocations;if(E&&E.length>0){let M=new Set;for(let q of J.content.parts)if(q.type==="tool-invocation"&&q.toolInvocation.toolCallId)M.add(q.toolInvocation.toolCallId);let R=E.filter((q)=>!M.has(q.toolCallId)&&q.toolName!=="updateWorkingMemory");if(R.length>0){let q=new Map;for(let P of R){let w=P.step??0;if(!q.has(w))q.set(w,[]);q.get(w).push(P)}let _=Array.from(q.keys()).sort((P,w)=>P-w);for(let P of _){let w=q.get(P);X({role:"assistant",...z,type:"tool-call",content:[...w.map(({toolCallId:C,toolName:k,args:S})=>({type:"tool-call",toolCallId:C,toolName:k,args:S}))]});let j=w.filter((C)=>C.state==="result"&&("result"in C));if(j.length>0)X({role:"tool",...z,type:"tool-result",content:j.map((C)=>{let{toolCallId:k,toolName:S,result:I}=C;return{type:"tool-result",toolCallId:k,toolName:S,result:I}})})}}}break}let L=J.content.toolInvocations;if(L==null||L.length===0){X({role:"assistant",...z,content:W||"",type:"text"});break}let N=L.reduce((D,A)=>{return Math.max(D,A.step??0)},0);for(let D=0;D<=N;D++){let A=L.filter((O)=>(O.step??0)===D&&O.toolName!=="updateWorkingMemory");if(A.length===0)continue;X({role:"assistant",...z,type:"tool-call",content:[...Q&&W&&D===0?[{type:"text",text:W}]:[],...A.map(({toolCallId:O,toolName:E,args:M})=>({type:"tool-call",toolCallId:O,toolName:E,args:M}))]});let B=A.filter((O)=>O.state==="result"&&("result"in O));if(B.length>0)X({role:"tool",...z,type:"tool-result",content:B.map((O)=>{let{toolCallId:E,toolName:M,result:R}=O;return{type:"tool-result",toolCallId:E,toolName:M,result:R}})})}if(W&&!Q)X({role:"assistant",...z,type:"text",content:W||""});break}}}return Y}async function fI8({messages:$,downloadConcurrency:Y=10,downloadRetries:X=3,supportedUrls:G}){let J=(await Promise.resolve().then(() => (zC0(),cp1))).default,Q=$.filter((Z)=>Z.role==="user").map((Z)=>Z.content).filter((Z)=>Array.isArray(Z)).flat().filter((Z)=>Z.type==="image"||Z.type==="file").map((Z)=>{let H=Z.mediaType??(Z.type==="image"?"image/*":void 0),z=Z.type==="image"?Z.image:Z.data;if(typeof z==="string")try{z=new URL(z)}catch{}return{mediaType:H,data:z}}).filter((Z)=>Z.data instanceof URL).map((Z)=>{return{url:Z.data,isUrlSupportedByModel:Z.mediaType!=null&&ve1({url:Z.data.toString(),mediaType:Z.mediaType,supportedUrls:G??{}})}}),K=(await J(Q,async(Z)=>{if(Z.isUrlSupportedByModel)return null;return{url:Z.url.toString(),...await hI8({url:Z.url,downloadRetries:X})}},{concurrency:Y})).filter((Z)=>Z?.data!=null).map(({url:Z,data:H,mediaType:z})=>[Z,{data:H,mediaType:z}]);return Object.fromEntries(K)}function gI8($){return{...$,createdAt:$.createdAt.toISOString()}}function mI8($){return{...$,createdAt:new Date($.createdAt)}}function uI8($){return $.map(gI8)}function pI8($){return $.map(mI8)}var iT8,P9=class ${static isMastraDBMessage(Y){return Boolean("content"in Y&&Y.content&&!Array.isArray(Y.content)&&typeof Y.content!=="string"&&"format"in Y.content&&Y.content.format===2)}static isMastraMessageV1(Y){return!$.isMastraDBMessage(Y)&&(("threadId"in Y)||("resourceId"in Y))}static isMastraMessage(Y){return $.isMastraDBMessage(Y)||$.isMastraMessageV1(Y)}static isAIV4UIMessage(Y){return!$.isMastraMessage(Y)&&!$.isAIV4CoreMessage(Y)&&"parts"in Y&&!$.hasAIV5UIMessageCharacteristics(Y)}static isAIV6UIMessage(Y){return!$.isMastraMessage(Y)&&!$.isAIV4CoreMessage(Y)&&"parts"in Y&&$.hasAIV6UIMessageCharacteristics(Y)}static isAIV5UIMessage(Y){return!$.isMastraMessage(Y)&&!$.isAIV6UIMessage(Y)&&!$.isAIV5CoreMessage(Y)&&"parts"in Y&&$.hasAIV5UIMessageCharacteristics(Y)}static isAIV4CoreMessage(Y){return!$.isMastraMessage(Y)&&!("parts"in Y)&&"content"in Y&&!$.hasAIV5CoreMessageCharacteristics(Y)}static isAIV6CoreMessage(Y){return!$.isMastraMessage(Y)&&!("parts"in Y)&&"content"in Y&&$.hasAIV6CoreMessageCharacteristics(Y)}static isAIV5CoreMessage(Y){return!$.isMastraMessage(Y)&&!$.isAIV6CoreMessage(Y)&&!("parts"in Y)&&"content"in Y&&$.hasAIV5CoreMessageCharacteristics(Y)}static hasAIV6UIMessageCharacteristics(Y){if(!("parts"in Y)||!Y.parts)return!1;for(let X of Y.parts){if(X.type==="source-document")return!0;if(X.type==="dynamic-tool")return!0;if("toolCallId"in X&&"state"in X&&(X.state==="approval-requested"||X.state==="approval-responded"||X.state==="output-denied"))return!0}return!1}static hasAIV5UIMessageCharacteristics(Y){if("toolInvocations"in Y||"reasoning"in Y||"experimental_attachments"in Y||"data"in Y||"annotations"in Y)return!1;if(!Y.parts)return!1;for(let X of Y.parts){if("metadata"in X)return!0;if("toolInvocation"in X)return!1;if("toolCallId"in X)return!0;if(X.type==="source")return!1;if(X.type==="source-url")return!0;if(X.type==="reasoning"){if("state"in X||"text"in X)return!0;if("reasoning"in X||"details"in X)return!1}if(X.type==="file"&&"mediaType"in X)return!0}return!1}static hasAIV6CoreMessageCharacteristics(Y){if("parts"in Y||typeof Y.content==="string")return!1;return Y.content.some((X)=>X.type==="tool-approval-request"||X.type==="tool-approval-response")}static hasAIV5CoreMessageCharacteristics(Y){if("experimental_providerMetadata"in Y)return!1;if(typeof Y.content==="string")return!0;for(let X of Y.content){if(X.type==="tool-result"&&"output"in X)return!0;if(X.type==="tool-call"&&"input"in X)return!0;if(X.type==="tool-result"&&"result"in X)return!1;if(X.type==="tool-call"&&"args"in X)return!1;if("mediaType"in X)return!0;if("mimeType"in X)return!1;if("experimental_providerMetadata"in X)return!1;if(X.type==="reasoning"&&"signature"in X)return!1;if(X.type==="redacted-reasoning")return!1}return!0}static getRole(Y){if(Y.role==="assistant"||Y.role==="tool")return"assistant";if(Y.role==="user")return"user";if(Y.role==="system")return"system";throw Error(`BUG: add handling for message role ${Y.role} in message ${JSON.stringify(Y,null,2)}`)}},eT8,$D=class{static toUIMessage($,Y){let X=Y?.transformToolPayloads??!0,G=$.content.experimental_attachments?[...$.content.experimental_attachments]:[],J=typeof $.content.content==="string"&&$.content.content!==""?$.content.content:($.content.parts??[]).reduce((V,F)=>{if(F.type==="text")return F.text;return V},""),Q=[],W=$.content.parts??[];if(W.length)for(let V of W)if(V.type==="file"){let F;if(typeof V.data==="string")if(tf(V.data,V.mimeType).type==="raw")F=a60(V.data,V.mimeType||"application/octet-stream");else F=V.data;else F=V.data;G.push({contentType:V.mimeType,url:F})}else if(V.type==="tool-invocation"&&(V.toolInvocation.state==="call"||V.toolInvocation.state==="partial-call"))continue;else if(V.type==="tool-invocation"){let F={...V.toolInvocation,args:Jj(V.providerMetadata,"input-available",V.toolInvocation.args,X),...V.toolInvocation.state==="result"?{result:Jj(V.providerMetadata,"output-available",Jj(V.providerMetadata,"error",V.toolInvocation.result,X),X)}:{}},L=-1,N=-1;for(let D of W){if(D.type==="step-start")L++;if(D.type==="tool-invocation"&&D.toolInvocation.toolCallId===V.toolInvocation.toolCallId){N=L;break}}if(N>=0){let D={step:N,...F};Q.push({type:"tool-invocation",toolInvocation:D})}else Q.push({type:"tool-invocation",toolInvocation:F})}else Q.push(V);if(Q.length===0&&G.length>0)Q.push({type:"text",text:""});let Z=($.role==="signal"?Jv0($):void 0)==="user-message",H=WI8($.role==="signal"&&!Z?[KI8($,$.content.content||J)]:Q);if($.role==="user"){let V={id:$.id,role:$.role,content:$.content.content||J,createdAt:$.createdAt,parts:H,experimental_attachments:G};if($.content.metadata)V.metadata=$.content.metadata;return V}else if($.role==="assistant"){let V=Array.isArray($.content.content)&&$.content.content.length===1&&$.content.content[0].type==="text",F={id:$.id,role:$.role,content:V?J:$.content.content||J,createdAt:$.createdAt,parts:H,reasoning:void 0,toolInvocations:"toolInvocations"in $.content?$.content.toolInvocations?.filter((L)=>L.state==="result").map((L)=>{let N=$.content.parts?.find((D)=>D.type==="tool-invocation"&&D.toolInvocation.toolCallId===L.toolCallId)?.providerMetadata;return QI8(L,N,X)}):void 0};if($.content.metadata)F.metadata=$.content.metadata;return F}let z={id:$.id,role:$.role==="signal"?Z?"user":"system":$.role,content:$.role==="signal"&&!Z?"":$.content.content||J,createdAt:$.createdAt,parts:H,experimental_attachments:G};if($.content.metadata)z.metadata=$.content.metadata;return z}static systemToV4Core($){if($.role!=="system"||!$.content.content)throw new G0({id:"INVALID_SYSTEM_MESSAGE_FORMAT",domain:"AGENT",category:"USER",text:"Invalid system message format. System messages must include 'role' and 'content' properties. The content should be a string.",details:{receivedMessage:JSON.stringify($,null,2)}});let Y={role:"system",content:$.content.content};if($.content.providerMetadata)Y.experimental_providerMetadata=$.content.providerMetadata;return Y}static fromUIMessage($,Y,X){let J={format:2,parts:$.parts?be1($.parts):[]};if($.toolInvocations)J.toolInvocations=$.toolInvocations;if($.reasoning)J.reasoning=$.reasoning;if($.annotations)J.annotations=$.annotations;if($.experimental_attachments)J.experimental_attachments=$.experimental_attachments;if("metadata"in $&&$.metadata!==null&&$.metadata!==void 0)J.metadata=$.metadata;return{id:$.id||Y.newMessageId(),role:P9.getRole($),createdAt:Y.generateCreatedAt(X,$.createdAt),threadId:Y.memoryInfo?.threadId,resourceId:Y.memoryInfo?.resourceId,content:J}}static fromCoreMessage($,Y,X){let G="id"in $?$.id:Y.newMessageId(),J=[],Q=[],W=[],K=X==="response"&&Array.isArray($.content)&&$.content.length===1&&$.content[0]&&$.content[0].type==="text"&&"text"in $.content[0]&&$.content[0].text;if(K&&X==="response")$.content=K;if(typeof $.content==="string")J.push({type:"text",text:$.content});else if(Array.isArray($.content))for(let V of $.content)switch(V.type){case"text":{let F=J.at(-1);if($.role==="assistant"&&F&&F.type==="tool-invocation")J.push({type:"step-start"});let L={type:"text",text:V.text};if(V.providerOptions)L.providerMetadata=V.providerOptions;J.push(L);break}case"tool-call":{let F={type:"tool-invocation",toolInvocation:{state:"call",toolCallId:V.toolCallId,toolName:V.toolName,args:V.args}};if(V.providerOptions)F.providerMetadata=V.providerOptions;J.push(F);break}case"tool-result":{let F={},L=$.content.find((A)=>A.type==="tool-call"&&A.toolCallId===V.toolCallId);if(L&&L.type==="tool-call")F=L.args;if(Object.keys(F).length===0&&Y.dbMessages)F=Kv0(Y.dbMessages,V.toolCallId);let N={state:"result",toolCallId:V.toolCallId,toolName:V.toolName,result:V.result??"",args:F},D={type:"tool-invocation",toolInvocation:N};if(V.providerOptions)D.providerMetadata=V.providerOptions;J.push(D),W.push(N)}break;case"reasoning":{let F={type:"reasoning",reasoning:"",details:[{type:"text",text:V.text,signature:V.signature}]};if(V.providerOptions)F.providerMetadata=V.providerOptions;J.push(F)}break;case"redacted-reasoning":{let F={type:"reasoning",reasoning:"",details:[{type:"redacted",data:V.data}]};if(V.providerOptions)F.providerMetadata=V.providerOptions;J.push(F)}break;case"image":{let F={type:"file",data:oT8(V.image),mimeType:V.mimeType};if(V.providerOptions)F.providerMetadata=V.providerOptions;J.push(F);break}case"file":{if(V.data instanceof URL){let F={type:"file",data:V.data.toString(),mimeType:V.mimeType};if(V.providerOptions)F.providerMetadata=V.providerOptions;if(V.filename)F.filename=V.filename;J.push(F)}else if(typeof V.data==="string"){let F=tf(V.data,V.mimeType);if(F.type==="url"||F.type==="dataUri"){let L={type:"file",data:V.data,mimeType:F.mimeType||"image/png"};if(V.providerOptions)L.providerMetadata=V.providerOptions;if(V.filename)L.filename=V.filename;J.push(L)}else try{let L={type:"file",mimeType:F.mimeType||"image/png",data:Qj(V.data)};if(V.providerOptions)L.providerMetadata=V.providerOptions;if(V.filename)L.filename=V.filename;J.push(L)}catch(L){console.error(`Failed to convert binary data to base64 in CoreMessage file part: ${L}`,L)}}else try{let F={type:"file",mimeType:V.mimeType,data:Qj(V.data)};if(V.providerOptions)F.providerMetadata=V.providerOptions;if(V.filename)F.filename=V.filename;J.push(F)}catch(F){console.error(`Failed to convert binary data to base64 in CoreMessage file part: ${F}`,F)}break}}let H={format:2,parts:be1(J)};if(W.length)H.toolInvocations=W;if(typeof $.content==="string")H.content=$.content;if(Q.length)H.experimental_attachments=Q;if($.providerOptions)H.providerMetadata=$.providerOptions;else if("experimental_providerMetadata"in $&&$.experimental_providerMetadata)H.providerMetadata=$.experimental_providerMetadata;if("metadata"in $&&$.metadata!==null&&$.metadata!==void 0)H.metadata=$.metadata;let z="metadata"in $&&$.metadata&&typeof $.metadata==="object"&&"createdAt"in $.metadata?$.metadata.createdAt:void 0;return{id:G,role:P9.getRole($),createdAt:Y.generateCreatedAt(X,z),threadId:Y.memoryInfo?.threadId,resourceId:Y.memoryInfo?.resourceId,content:H}}},ZI8,he1="unknown_tool",uz=class{static toUIMessage($,Y){let G=($.role==="signal"?ae1($):void 0)==="user-message",J=Y?.transformToolPayloads??!0,Q=[],W={...$.content.metadata||{}};if($.role==="signal"&&!G)Q.push(HI8($));if($.createdAt)W.createdAt=$.createdAt;if($.threadId)W.threadId=$.threadId;if($.resourceId)W.resourceId=$.resourceId;if($.content.providerMetadata)W.providerMetadata=$.content.providerMetadata;if($.role==="signal"&&!G)return{id:$.id,role:"system",metadata:W,parts:Q};let K=$.content.parts?.some((A)=>A.type==="tool-invocation");if($.content.toolInvocations&&!K)for(let A of $.content.toolInvocations)if(A.state==="result")Q.push({type:`tool-${A.toolName}`,toolCallId:A.toolCallId,state:"output-available",input:A.args,output:A.result});else Q.push({type:`tool-${A.toolName}`,toolCallId:A.toolCallId,state:A.state==="call"?"input-available":"input-streaming",input:A.args});let Z=$.content.parts?.some((A)=>A.type==="reasoning"),H=$.content.parts?.some((A)=>A.type==="file");if($.content.reasoning&&!Z)Q.push({type:"reasoning",text:$.content.reasoning});let z=new Set;if($.content.experimental_attachments&&!H)for(let A of $.content.experimental_attachments)z.add(A.url),Q.push({type:"file",url:A.url,mediaType:A.contentType||"unknown"});let V=!1;if($.content.parts)for(let A of $.content.parts){if(A.type==="tool-invocation"&&A.toolInvocation){let B=A.toolInvocation;if(B.state==="result")Q.push({type:`tool-${B.toolName}`,toolCallId:B.toolCallId,input:Yj(A.providerMetadata,"input-available",B.args,J),output:Yj(A.providerMetadata,"output-available",Yj(A.providerMetadata,"error",B.result,J),J),state:"output-available",callProviderMetadata:tL(A.providerMetadata,A.createdAt),providerExecuted:A.providerExecuted});else if(B.state==="output-error")Q.push({type:`tool-${B.toolName}`,toolCallId:B.toolCallId,input:Yj(A.providerMetadata,"input-available",B.args,J),errorText:Yj(A.providerMetadata,"error",B.errorText||"",J),state:"output-error",callProviderMetadata:tL(A.providerMetadata,A.createdAt),providerExecuted:A.providerExecuted});else Q.push({type:`tool-${B.toolName}`,toolCallId:B.toolCallId,input:Yj(A.providerMetadata,"input-available",B.args,J),state:"input-available",callProviderMetadata:tL(A.providerMetadata,A.createdAt),providerExecuted:A.providerExecuted});continue}if(A.type==="reasoning"){let B=A.reasoning||(A.details?.reduce((O,E)=>{if(E.type==="text"&&E.text)return O+E.text;return O},"")??"");if(B||A.details?.length){let O={type:"reasoning",text:B||"",state:"done"};O.providerMetadata=tL(A.providerMetadata,A.createdAt),Q.push(O)}continue}if(A.type==="tool-invocation"||A.type.startsWith("tool-"))continue;if(A.type==="file"){if(typeof A.data==="string"&&z.has(A.data))continue;let B=typeof A.data==="string"?tf(A.data,A.mimeType):{type:"raw",mimeType:A.mimeType};if(B.type==="url"&&typeof A.data==="string"){let O={type:"file",url:A.data,mediaType:B.mimeType||"image/png"};O.providerMetadata=tL(A.providerMetadata,A.createdAt),Q.push(O)}else{let O,E=A.mimeType;if(typeof A.data==="string"){let _=n60(A.data);if(_.isDataUri){if(O=_.base64Content,_.mimeType)E=E||_.mimeType}else O=A.data}else O=A.data;let M=E||"image/png",R;if(typeof O==="string"&&O.startsWith("data:"))R=O;else R=a60(O,M);let q={type:"file",url:R,mediaType:M};q.providerMetadata=tL(A.providerMetadata,A.createdAt),Q.push(q)}}else if(A.type==="source"){let B={type:"source-url",url:A.source.url,sourceId:A.source.id,title:A.source.title};B.providerMetadata=tL(A.providerMetadata,A.createdAt),Q.push(B)}else if(A.type==="source-document")continue;else if(A.type==="text"){let B={type:"text",text:A.text};B.providerMetadata=tL(A.providerMetadata,A.createdAt),Q.push(B),V=!0}else if(A.type==="data-tool-call-suspended"||A.type==="data-tool-call-approval")Q.push({...A,data:Xv0(A.data,A.type==="data-tool-call-suspended"?"suspend":"approval",J)});else Q.push(A),V=!0}if($.content.content&&!V)Q.push({type:"text",text:$.content.content});let F=new Set(Q.filter((A)=>A.type==="data-tool-call-suspended"||A.type==="data-tool-call-approval").map((A)=>{let B=A.data;return typeof B?.toolCallId==="string"?B.toolCallId:void 0}).filter((A)=>typeof A==="string")),L=(A,B)=>{let O=Q.findIndex((E)=>E.type.startsWith("tool-")&&E.toolCallId===A);if(O===-1){Q.push(B);return}Q.splice(O+1,0,B)},N=W.suspendedTools;if(N&&typeof N==="object")for(let A of Object.values(N)){if(!A||typeof A!=="object")continue;let B="toolCallId"in A?A.toolCallId:void 0;if(typeof B!=="string"||F.has(B))continue;L(B,{type:"data-tool-call-suspended",data:Xv0(A,"suspend",J)}),F.add(B)}let D=W.pendingToolApprovals;if(D&&typeof D==="object")for(let A of Object.values(D)){if(!A||typeof A!=="object")continue;let B="toolCallId"in A?A.toolCallId:void 0;if(typeof B!=="string"||F.has(B))continue;L(B,{type:"data-tool-call-approval",data:Xv0(A,"approval",J)}),F.add(B)}return{id:$.id,role:$.role==="signal"?G?"user":"system":$.role,metadata:W,parts:Q}}static fromUIMessage($){let{parts:Y,metadata:X}=$,G=X||{},J=G.createdAt,Q=J?typeof J==="string"?new Date(J):J instanceof Date?J:new Date:new Date,W=G.threadId,K=G.resourceId,Z={...G};delete Z.createdAt,delete Z.threadId,delete Z.resourceId;let H=Y.filter((E)=>zQ(E)),z=Y.filter((E)=>E.type==="reasoning"),V=Y.filter((E)=>E.type==="file"),F=Y.filter((E)=>E.type==="text"),L=void 0;if(H.length>0)L=H.map((E)=>{let M=ge1(E);if(E.state==="output-available")return{args:E.input,result:typeof E.output==="object"&&E.output&&"value"in E.output?E.output.value:E.output,toolCallId:E.toolCallId,toolName:M,state:"result"};return{args:E.input,toolCallId:E.toolCallId,toolName:M,state:"call"}});let N=void 0;if(z.length>0)N=z.map((E)=>E.text).join(`
`);let D=void 0;if(V.length>0)D=V.map((E)=>({url:E.url||"",contentType:E.mediaType}));let A=void 0;if(F.length>0)A=F.map((E)=>E.text).join("");let B=Y.map((E)=>{if(zQ(E)){let M=ge1(E),R="callProviderMetadata"in E?E.callProviderMetadata:void 0;if(E.state==="output-available")return{type:"tool-invocation",toolInvocation:{toolCallId:E.toolCallId,toolName:M,args:E.input,result:typeof E.output==="object"&&E.output&&"value"in E.output?E.output.value:E.output,state:"result"},providerMetadata:R,createdAt:CW(R)};return{type:"tool-invocation",toolInvocation:{toolCallId:E.toolCallId,toolName:M,args:E.input,state:"call"},providerMetadata:R,createdAt:CW(R)}}if(E.type==="reasoning")return{type:"reasoning",reasoning:"",details:[{type:"text",text:E.text}],providerMetadata:E.providerMetadata,createdAt:CW(E.providerMetadata)};if(E.type==="file")return{type:"file",mimeType:E.mediaType,data:E.url||"",providerMetadata:E.providerMetadata,createdAt:CW(E.providerMetadata),...E.filename?{filename:E.filename}:{}};if(E.type==="source-url")return{type:"source",source:{url:E.url,sourceType:"url",id:E.url,providerMetadata:E.providerMetadata},providerMetadata:E.providerMetadata,createdAt:CW(E.providerMetadata)};if(E.type==="text")return{type:"text",text:E.text,providerMetadata:E.providerMetadata,createdAt:CW(E.providerMetadata)};if(E.type==="step-start")return E;if(typeof E.type==="string"&&E.type.startsWith("data-"))return{type:E.type,data:"data"in E?E.data:void 0};return null}).filter((E)=>E!==null),O=fe1(B);return{id:$.id,role:$.role,createdAt:Q,threadId:W,resourceId:K,content:{format:2,parts:O,toolInvocations:L,reasoning:N,experimental_attachments:D,content:A,metadata:Object.keys(Z).length>0?Z:void 0}}}static getDataStringFromAIV5DataPart($){let Y,X;if("data"in $)Y=$.mediaType||"application/octet-stream",X=$.data;else if("image"in $)Y=$.mediaType||"image/jpeg",X=$.image;else if("url"in $&&typeof $.url==="string")return $.url;else throw new G0({id:"MASTRA_AIV5_DATA_PART_INVALID",domain:"AGENT",category:"USER",text:"Invalid AIV5 data part in getDataStringFromAIV5DataPart",details:{part:$}});if(X instanceof URL)return X.toString();else if(X instanceof Buffer){let G=X.toString("base64");return`data:${Y};base64,${G}`}else if(typeof X==="string")return X.startsWith("data:")||X.startsWith("http")?X:`data:${Y};base64,${X}`;else if(X instanceof Uint8Array){let G=Buffer.from(X).toString("base64");return`data:${Y};base64,${G}`}else if(X instanceof ArrayBuffer){let G=Buffer.from(X).toString("base64");return`data:${Y};base64,${G}`}else return""}static fromModelMessage($,Y){let X=Array.isArray($.content)?$.content:[{type:"text",text:$.content}],G=[],J=[],Q=[],W=[];for(let F of X)if(F.type==="text"){let L={type:"text",text:F.text};if(F.providerOptions)L.providerMetadata=F.providerOptions,L.createdAt=CW(F.providerOptions);G.push(L)}else if(F.type==="tool-call"){let L=F,N={type:"tool-invocation",toolInvocation:{toolCallId:L.toolCallId,toolName:P7(L.toolName),args:L.input,state:"call"}};if(F.providerOptions)N.providerMetadata=F.providerOptions,N.createdAt=CW(F.providerOptions);G.push(N),J.push({toolCallId:L.toolCallId,toolName:P7(L.toolName),args:L.input,state:"call"})}else if(F.type==="tool-result"){let L=F,N=J.find((B)=>B.toolCallId===L.toolCallId),D=G.find((B)=>B.type==="tool-invocation"&&("toolInvocation"in B)&&B.toolInvocation.toolCallId===L.toolCallId),A=(B,O)=>{O.state="result",O.result=typeof B.output==="object"&&B.output&&"value"in B.output?B.output.value:B.output};if(N)A(L,N);else{let B={state:"call",toolCallId:L.toolCallId,toolName:P7(L.toolName),args:{}};A(L,B),J.push(B)}if(D&&D.type==="tool-invocation"){if(A(L,D.toolInvocation),L.providerOptions)D.providerMetadata=L.providerOptions,D.createdAt=CW(L.providerOptions)??D.createdAt}else{let B={type:"tool-invocation",toolInvocation:{toolCallId:L.toolCallId,toolName:P7(L.toolName),args:{},state:"call"}};if(A(L,B.toolInvocation),L.providerOptions)B.providerMetadata=L.providerOptions,B.createdAt=CW(L.providerOptions);G.push(B)}}else if(F.type==="reasoning"){let L={type:"reasoning",reasoning:"",details:[{type:"text",text:F.text}]};if(F.providerOptions)L.providerMetadata=F.providerOptions,L.createdAt=CW(F.providerOptions);G.push(L),Q.push(F.text)}else if(F.type==="image"){let L=F,N=L.mediaType||"image/jpeg",D=this.getDataStringFromAIV5DataPart(L),A={type:"file",data:D,mimeType:N};if(F.providerOptions)A.providerMetadata=F.providerOptions,A.createdAt=CW(F.providerOptions);G.push(A),W.push({url:D,contentType:N})}else if(F.type==="file"){let L=F,N=L.mediaType||"application/octet-stream",D=this.getDataStringFromAIV5DataPart(L),A={type:"file",data:D,mimeType:N};if(F.providerOptions)A.providerMetadata=F.providerOptions,A.createdAt=CW(F.providerOptions);if(L.filename)A.filename=L.filename;G.push(A),W.push({url:D,contentType:N})}let K=fe1(G),Z=K.filter((F)=>F.type==="text").map((F)=>F.text).join(`
`),H="metadata"in $&&$.metadata!==null&&$.metadata!==void 0?$.metadata:{},V={id:"id"in $&&typeof $.id==="string"?$.id:`msg-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,role:$.role==="tool"?"assistant":$.role,createdAt:new Date,content:{format:2,parts:K,toolInvocations:J.length>0?J:void 0,reasoning:Q.length>0?Q.join(`
`):void 0,experimental_attachments:W.length>0?W:void 0,content:Z||void 0,metadata:Object.keys(H).length>0?H:void 0}};if($.providerOptions)V.content.providerMetadata=$.providerOptions;return V}},j3=class ${static toUIMessage(Y){let X=uz.toUIMessage(Y),G=X.metadata||{},J=[];if(Y.role==="signal"&&X.role!=="user")return{id:Y.id,role:"system",metadata:Object.keys(G).length>0?G:void 0,parts:X.parts.map((z)=>$.toUIPartFromV5(z))};let Q=Y.content.parts||[],W=Q.some((z)=>z.type==="tool-invocation"),K=Q.some((z)=>z.type==="reasoning"),Z=Q.some((z)=>z.type==="file"),H=Q.some((z)=>z.type==="text");for(let z of Q)J.push($.toUIPart(z));if(!W||!K||!Z||!H)for(let z of X.parts){if(zQ(z)){if(!W)J.push($.toUIPartFromV5(z));continue}if(z.type==="reasoning"){if(!K)J.push($.toUIPartFromV5(z));continue}if(z.type==="file"){if(!Z)J.push($.toUIPartFromV5(z));continue}if(z.type==="text"&&!H)J.push($.toUIPartFromV5(z))}return{id:Y.id,role:Y.role==="signal"?X.role:Y.role,metadata:Object.keys(G).length>0?G:void 0,parts:J}}static fromUIMessage(Y){let X=Y.parts.filter((K)=>{if(K.type==="source-document")return!1;if(Jk0(K))return!1;return!0}),G=uz.fromUIMessage({...Y,parts:X.map((K)=>AI8(K))}),J=G.content.parts||[],Q=[],W=0;for(let K of Y.parts){if(K.type==="source-document"){Q.push($J({type:"source-document",sourceId:K.sourceId,mediaType:K.mediaType,title:K.title},{filename:K.filename,providerMetadata:oe1(K.providerMetadata)}));continue}if(!Jk0(K)){let Z=J[W++];if(Z)Q.push(Z);continue}Q.push(NI8(K))}return{...G,content:{...G.content,parts:Q,toolInvocations:EI8(Q)||G.content.toolInvocations}}}static fromModelMessage(Y,X,G={}){let J=Array.isArray(Y.content)?Y.content:[{type:"text",text:Y.content}],Q=J.filter((Z)=>Z.type!=="tool-approval-request"&&Z.type!=="tool-approval-response"),W=uz.fromModelMessage({...Y,content:Q},X),K=[...W.content.parts];if(Y.role==="assistant"){let Z=new Map;for(let H of J){if(H.type==="tool-call"){Z.set(H.toolCallId,{toolName:P7(H.toolName),args:se1(H.input)});continue}if(H.type!=="tool-approval-request")continue;let z=Z.get(H.toolCallId),V=BI8(K,H.toolCallId);if(V){V.toolInvocation.state="approval-requested",V.toolInvocation.approval={id:H.approvalId};continue}K.push(uO({toolCallId:H.toolCallId,toolName:z?.toolName||"unknown",args:z?.args||{},state:"approval-requested",approval:{id:H.approvalId}}))}}else if(Y.role==="tool")for(let Z of J){if(Z.type!=="tool-approval-response")continue;let H=OI8(G.dbMessages,Z.approvalId);if(!H)continue;K.push(uO({toolCallId:H.toolInvocation.toolCallId,toolName:H.toolInvocation.toolName,args:H.toolInvocation.args,state:"approval-responded",approval:{id:Z.approvalId,approved:Z.approved,reason:Z.reason},providerMetadata:H.providerMetadata,providerExecuted:H.providerExecuted,title:H.title}))}return{...W,content:{...W.content,parts:K}}}static toUIPart(Y){if(Y.type==="tool-invocation"){let X=$J({type:`tool-${P7(Y.toolInvocation.toolName)}`,toolCallId:Y.toolInvocation.toolCallId,providerExecuted:Y.providerExecuted},{callProviderMetadata:Y.providerMetadata,title:Y.title});switch(Y.toolInvocation.state){case"partial-call":return{...X,state:"input-streaming",input:w3(Y.providerMetadata,"input-available",Y.toolInvocation.args)};case"call":return{...X,state:"input-available",input:w3(Y.providerMetadata,"input-available",Y.toolInvocation.args)};case"approval-requested":return{...X,state:"approval-requested",input:w3(Y.providerMetadata,"input-available",Y.toolInvocation.args),approval:{id:Y.toolInvocation.approval?.id||Y.toolInvocation.toolCallId}};case"approval-responded":return{...X,state:"approval-responded",input:w3(Y.providerMetadata,"input-available",Y.toolInvocation.args),approval:{id:Y.toolInvocation.approval?.id||Y.toolInvocation.toolCallId,approved:Y.toolInvocation.approval?.approved??!1,reason:Y.toolInvocation.approval?.reason}};case"output-error":return $J({...X,state:"output-error",input:w3(Y.providerMetadata,"input-available",Y.toolInvocation.args),errorText:w3(Y.providerMetadata,"error",Y.toolInvocation.errorText||"")},{rawInput:Y.toolInvocation.rawInput,approval:Y.toolInvocation.approval?.approved===!0?{id:Y.toolInvocation.approval.id,approved:!0,reason:Y.toolInvocation.approval.reason}:void 0});case"output-denied":return{...X,state:"output-denied",input:w3(Y.providerMetadata,"input-available",Y.toolInvocation.args),approval:{id:Y.toolInvocation.approval?.id||Y.toolInvocation.toolCallId,approved:!1,reason:Y.toolInvocation.approval?.reason}};case"result":return $J({...X,state:"output-available",input:w3(Y.providerMetadata,"input-available",Y.toolInvocation.args),output:w3(Y.providerMetadata,"output-available",w3(Y.providerMetadata,"error",Y.toolInvocation.result))},{preliminary:Y.preliminary,approval:Y.toolInvocation.approval?.approved===!0?{id:Y.toolInvocation.approval.id,approved:!0,reason:Y.toolInvocation.approval.reason}:void 0});default:throw Error(`Unhandled toolInvocation.state: ${String(Y.toolInvocation.state)}`)}}if(Y.type==="source-document")return $J({type:"source-document",sourceId:Y.sourceId,mediaType:Y.mediaType,title:Y.title},{filename:Y.filename,providerMetadata:Y.providerMetadata});return $.toUIPartFromV5(uz.toUIMessage({id:"tmp",role:"assistant",createdAt:new Date,content:{format:2,parts:[Y]}}).parts[0])}static toUIPartFromV5(Y){if(zQ(Y)){let X={type:Y.type,toolCallId:Y.toolCallId,providerExecuted:Y.providerExecuted};switch(Y.state){case"input-streaming":return $J({...X,state:"input-streaming",input:Y.input},{callProviderMetadata:"callProviderMetadata"in Y?Y.callProviderMetadata:void 0,title:"title"in Y?Y.title:void 0});case"input-available":return $J({...X,state:"input-available",input:Y.input},{callProviderMetadata:"callProviderMetadata"in Y?Y.callProviderMetadata:void 0,title:"title"in Y?Y.title:void 0});case"output-available":return $J({...X,state:"output-available",input:Y.input,output:Y.output},{callProviderMetadata:"callProviderMetadata"in Y?Y.callProviderMetadata:void 0,preliminary:"preliminary"in Y?Y.preliminary:void 0,title:"title"in Y?Y.title:void 0});case"output-error":return $J({...X,state:"output-error",input:Y.input,errorText:Y.errorText},{rawInput:"rawInput"in Y?Y.rawInput:void 0,callProviderMetadata:"callProviderMetadata"in Y?Y.callProviderMetadata:void 0,title:"title"in Y?Y.title:void 0})}}switch(Y.type){case"text":return $J({type:"text",text:Y.text},{providerMetadata:Y.providerMetadata});case"reasoning":return $J({type:"reasoning",text:Y.text,state:Y.state},{providerMetadata:Y.providerMetadata});case"file":return $J({type:"file",url:Y.url,mediaType:Y.mediaType},{filename:"filename"in Y?Y.filename:void 0,providerMetadata:Y.providerMetadata});case"source-url":return $J({type:"source-url",sourceId:Y.sourceId,url:Y.url},{title:Y.title,providerMetadata:Y.providerMetadata});case"step-start":return{type:"step-start"};default:if(typeof Y.type==="string"&&Y.type.startsWith("data-"))return{type:Y.type,data:"data"in Y?Y.data:void 0};return Y}}},Q7=class ${static fromAIV4Parts(Y){let X="";for(let G of Y)X+=G.type,X+=$.fromAIV4Part(G);return X}static fromAIV4Part(Y){let X="";if(Y.type==="text")X+=Y.text,X=eL(X,Y.providerMetadata);if(Y.type==="tool-invocation")X+=Y.toolInvocation.toolCallId,X+=Y.toolInvocation.state;if(Y.type==="reasoning"){X+=Y.reasoning,X+=Y.details.reduce((J,Q)=>{if(Q.type==="text")return J+Q.text.length+(Q.signature?.length||0);return J},0);let G=Y;if(G&&Object.hasOwn(G,"providerMetadata"))X=eL(X,G.providerMetadata)}if(Y.type==="file")X+=Y.data,X+=Y.mimeType;return X}static fromDBParts(Y){let X="";for(let G of Y)if(X+=G.type,G.type.startsWith("data-")){let J=G.data;X+=JSON.stringify(J)}else X+=$.fromAIV4Part(G);return X}static fromAIV4CoreMessageContent(Y){if(typeof Y==="string")return Y;let X="";for(let G of Y){if(X+=G.type,G.type==="text"){X+=G.text.length;let J=G;X=eL(X,J.providerMetadata,J.providerOptions)}if(G.type==="reasoning"){X+=G.text.length;let J=G;X=eL(X,J.providerMetadata,J.providerOptions)}if(G.type==="tool-call")X+=G.toolCallId,X+=G.toolName;if(G.type==="tool-result")X+=G.toolCallId,X+=G.toolName;if(G.type==="file")X+=G.filename,X+=G.mimeType;if(G.type==="image")X+=xe1(G.image),X+=G.mimeType;if(G.type==="redacted-reasoning")X+=G.data.length}return X}static fromAIV5Parts(Y){let X="";for(let G of Y){if(X+=G.type,G.type==="text")X+=G.text,X=eL(X,G.providerMetadata);if(zQ(G)||G.type==="dynamic-tool")X+=G.toolCallId,X+=G.state;if(G.type==="reasoning")X+=G.text,X=eL(X,G.providerMetadata);if(G.type==="file")X+=G.url.length,X+=G.mediaType,X+=G.filename||""}return X}static fromAIV5ModelMessageContent(Y){if(typeof Y==="string")return Y;let X="";for(let G of Y){if(X+=G.type,G.type==="text")X+=G.text.length,X=eL(X,G.providerOptions);if(G.type==="reasoning")X+=G.text.length,X=eL(X,G.providerOptions);if(G.type==="tool-call")X+=G.toolCallId,X+=G.toolName;if(G.type==="tool-result")X+=G.toolCallId,X+=G.toolName;if(G.type==="file")X+=G.filename,X+=G.mediaType;if(G.type==="image")X+=xe1(G.image),X+=G.mediaType}return X}},$04=class{base64Data;uint8ArrayData;mediaType;constructor({data:$,mediaType:Y}){let X=$ instanceof Uint8Array;this.base64Data=X?void 0:$,this.uint8ArrayData=X?$:void 0,this.mediaType=Y}get base64(){if(this.base64Data==null)this.base64Data=l60(this.uint8ArrayData);return this.base64Data}get uint8Array(){if(this.uint8ArrayData==null)this.uint8ArrayData=$v0(this.base64Data);return this.uint8ArrayData}},Qv0,pe1=class ${static extractStepContent(Y,X,G){let J=Y.flatMap((W)=>W.parts),Q=[];if(J.forEach((W,K)=>{if(W.type==="step-start")Q.push(K)}),X===-1)return $.extractLastStep(J,Q,G);if(X===1)return $.extractFirstStep(J,Q,G);return $.extractMiddleStep(J,Q,X,G)}static extractLastStep(Y,X,G){let J=Y.filter((H)=>H.type?.startsWith("tool-")),Q=X.length>0;if(!Q&&J.length>0){let H=J[J.length-1];if(!H)return[];let z=Y.indexOf(H),V=J[J.length-2],L=(V?Y.indexOf(V):-1)+1,N=Y.slice(L,z+1);return $.convertPartsToContent(N,"last-step",G)}if(X.length+1===1&&!Q)return $.convertPartsToContent(Y,"last-step",G);let K=X[X.length-1];if(K===void 0)return[];let Z=Y.slice(K+1);if(Z.length===0)return[];return $.convertPartsToContent(Z,"last-step",G)}static extractFirstStep(Y,X,G){let J=X[0]??Y.length;if(J===0)return[];let Q=Y.slice(0,J);return $.convertPartsToContent(Q,"step-1",G)}static extractMiddleStep(Y,X,G,J){let Q=G-2;if(Q<0||Q>=X.length)return[];let W=(X[Q]??0)+1,K=X[Q+1]??Y.length;if(W>=K)return[];let Z=Y.slice(W,K);return $.convertPartsToContent(Z,`step-${G}`,J)}static convertPartsToContent(Y,X,G){return NI0(ee1([{id:X,role:"assistant",parts:Y}])).flatMap(G)}static convertToStepContent(Y,X,G){let J=Y?Y:G();if(!J)return[];if(typeof J.content==="string")return[{type:"text",text:J.content}];return J.content.map((Q)=>{if(Q.type==="tool-result")return{type:"tool-result",input:Kv0(X,Q.toolCallId),output:Q.output,toolCallId:Q.toolCallId,toolName:Q.toolName};if(Q.type==="file")return{type:"file",file:new Qv0({data:typeof Q.data==="string"?n60(Q.data).base64Content:Q.data instanceof URL?Q.data.toString():Qj(Q.data),mediaType:Q.mediaType})};if(Q.type==="image")return{type:"file",file:new Qv0({data:typeof Q.image==="string"?n60(Q.image).base64Content:Q.image instanceof URL?Q.image.toString():Qj(Q.image),mediaType:Q.mediaType||"unknown"})};return{...Q}})}},mz=class ${static isSealed(Y){return Y.content?.metadata?.mastra?.sealed===!0}static shouldMerge(Y,X,G,J,Q=!1){if(!Y)return!1;if($.isSealed(Y))return!1;if(Y.content?.metadata?.mastra?.responseBoundary)return!1;if(X.content.metadata?.completionResult||Y.content.metadata?.completionResult||X.content.metadata?.isTaskCompleteResult||Y.content.metadata?.isTaskCompleteResult)return!1;let W=Y.content?.parts??[];if(W.length>0&&W.every((z)=>z.type.startsWith("data-"))&&Y.id!==X.id)return!1;return Y.role==="assistant"&&X.role==="assistant"&&Y.threadId===X.threadId&&G!=="memory"&&(Q?!J:!0)}static merge(Y,X){if(Y.createdAt=X.createdAt||Y.createdAt,X.content.metadata)Y.content.metadata={...Y.content.metadata??{},...X.content.metadata};let G=new Map,J=new Map;for(let[Q,W]of X.content.parts.entries())if(W.type==="tool-invocation"){let K=[...Y.content.parts].reverse().find((H)=>H.type==="tool-invocation"&&H.toolInvocation.toolCallId===W.toolInvocation.toolCallId);if(!!K&&K.type==="tool-invocation"){if(W.toolInvocation.state==="result"){if(K.toolInvocation={...K.toolInvocation,step:W.toolInvocation.step,state:"result",result:W.toolInvocation.result,args:{...K.toolInvocation.args,...W.toolInvocation.args}},W.providerMetadata)K.providerMetadata={...K.providerMetadata,...W.providerMetadata};if(!Y.content.toolInvocations)Y.content.toolInvocations=[];let z=Y.content.toolInvocations.findIndex((V)=>V.toolCallId===K.toolInvocation.toolCallId);if(z===-1)Y.content.toolInvocations.push(K.toolInvocation);else Y.content.toolInvocations[z]=K.toolInvocation}else if(W.toolInvocation.state==="approval-requested"||W.toolInvocation.state==="approval-responded"||W.toolInvocation.state==="output-denied"||W.toolInvocation.state==="output-error"){if(K.toolInvocation={...K.toolInvocation,state:W.toolInvocation.state,approval:W.toolInvocation.approval,errorText:W.toolInvocation.errorText,rawInput:W.toolInvocation.rawInput,args:{...K.toolInvocation.args,...W.toolInvocation.args}},W.providerMetadata)K.providerMetadata={...K.providerMetadata,...W.providerMetadata};if("providerExecuted"in W&&W.providerExecuted!==void 0)K.providerExecuted=W.providerExecuted;if("title"in W&&W.title!==void 0)K.title=W.title;if("preliminary"in W&&W.preliminary!==void 0)K.preliminary=W.preliminary}let H=Y.content.parts.findIndex((z)=>z===K);G.set(Q,H)}else J.set(Q,W)}else J.set(Q,W);if($.addPartsToMessage({latestMessage:Y,incomingMessage:X,anchorMap:G,partsToAdd:J}),Y.createdAt.getTime()<X.createdAt.getTime())Y.createdAt=X.createdAt;if(!Y.content.content&&X.content.content)Y.content.content=X.content.content;if(Y.content.content&&X.content.content&&Y.content.content!==X.content.content)Y.content.content=X.content.content}static addPartsToMessage({latestMessage:Y,incomingMessage:X,anchorMap:G,partsToAdd:J}){for(let Q=0;Q<X.content.parts.length;++Q){let W=X.content.parts[Q];if(!W)continue;let K=Q7.fromDBParts([W]),Z=J.get(Q);if(!K||!Z)continue;if(G.size>0){if(G.has(Q))continue;let H=[...G.keys()].filter((D)=>D<Q).pop()??-1,z=[...G.keys()].find((D)=>D>Q)??-1,V=H!==-1?G.get(H):0,F=H===-1?Q:Q-H,L=V+F,N=z!==-1?G.get(z):Y.content.parts.length;if(L>=0&&L<=N&&!Y.content.parts.slice(L,N).some((D)=>Q7.fromDBParts([D])===Q7.fromDBParts([W]))){$.pushNewPart({latestMessage:Y,newMessage:X,part:W,insertAt:L});for(let[D,A]of G.entries())if(A>=L)G.set(D,A+1)}}else $.pushNewPart({latestMessage:Y,newMessage:X,part:W})}}static pushNewPart({latestMessage:Y,newMessage:X,part:G,insertAt:J}){let Q=Q7.fromDBParts([G]),W=Y.content.parts.filter((Z)=>Q7.fromDBParts([Z])===Q).length,K=X.content.parts.filter((Z)=>Q7.fromDBParts([Z])===Q).length;if(W<K){let Z=X.content.parts.indexOf(G),H=Z>0&&X.content.parts[Z-1]?.type==="step-start",z=Y.role==="assistant"&&G.type==="text"&&!H&&Y.content.parts.length>0&&Y.content.parts.at(-1)?.type==="tool-invocation",V=[...Y.content.parts].reverse().find((L)=>L.type==="step-start"),F=V?.model?Uv0({type:"step-start",model:V.model}):{type:"step-start"};if(typeof J==="number")if(z)Y.content.parts.splice(J,0,F),Y.content.parts.splice(J+1,0,G);else Y.content.parts.splice(J,0,G);else{if(z)Y.content.parts.push(F);Y.content.parts.push(G)}}}},kI8,vI8=($)=>{let Y=typeof $==="string"?$v0($):$,X=(Y[6]&127)<<21|(Y[7]&127)<<14|(Y[8]&127)<<7|Y[9]&127;return Y.slice(X+10)},bI8=($)=>{let Y=new Map,X=/__split-\d+$/;return(G)=>{let J=$.at(-1);if(G.role===J?.role&&Array.isArray(J.content)&&Array.isArray(G.content)&&(G.role!=="assistant"||G.role==="assistant"&&G.content.at(-1)?.type!=="tool-call"))for(let Q of G.content)J.content.push(Q);else{let Q=G.id;if(X.test(Q)){$.push(G);return}let K=Y.get(Q)||0;if(K>0)G.id=`${Q}__split-${K}`;Y.set(Q,K+1),$.push(G)}}},hI8=async({url:$,downloadRetries:Y})=>{let X=$.toString();try{let G=await Et1(X,{method:"GET"},Y,{shouldRetryResponse:(J)=>J.status>=500});if(!G.ok)throw new G0({id:"DOWNLOAD_ASSETS_FAILED",text:"Failed to download asset",domain:"LLM",category:"USER"});return{data:new Uint8Array(await G.arrayBuffer()),mediaType:G.headers.get("content-type")??void 0}}catch(G){throw new G0({id:"DOWNLOAD_ASSETS_FAILED",text:"Failed to download asset",domain:"LLM",category:"USER"},G)}},dI8=class{memoryMessages=new Set;newUserMessages=new Set;newResponseMessages=new Set;userContextMessages=new Set;memoryMessagesPersisted=new Set;newUserMessagesPersisted=new Set;newResponseMessagesPersisted=new Set;userContextMessagesPersisted=new Set;addToSource($,Y){switch(Y){case"memory":this.memoryMessages.add($),this.memoryMessagesPersisted.add($);break;case"response":if(this.memoryMessages.has($))this.memoryMessages.delete($);if(this.newResponseMessages.add($),this.newResponseMessagesPersisted.add($),this.newUserMessages.has($))this.newUserMessages.delete($);break;case"input":case"user":this.newUserMessages.add($),this.newUserMessagesPersisted.add($);break;case"context":this.userContextMessages.add($),this.userContextMessagesPersisted.add($);break;default:throw Error(`Missing message source for message ${$}`)}}isMemoryMessage($){return this.memoryMessages.has($)}isUserMessage($){return this.newUserMessages.has($)}isResponseMessage($){return this.newResponseMessages.has($)}isContextMessage($){return this.userContextMessages.has($)}getMemoryMessages(){return this.memoryMessages}getUserMessages(){return this.newUserMessages}getResponseMessages(){return this.newResponseMessages}getContextMessages(){return this.userContextMessages}getMemoryMessagesPersisted(){return this.memoryMessagesPersisted}getUserMessagesPersisted(){return this.newUserMessagesPersisted}getResponseMessagesPersisted(){return this.newResponseMessagesPersisted}getContextMessagesPersisted(){return this.userContextMessagesPersisted}removeMessage($){this.memoryMessages.delete($),this.newUserMessages.delete($),this.newResponseMessages.delete($),this.userContextMessages.delete($)}clearUserMessages(){this.newUserMessages.clear()}clearResponseMessages(){this.newResponseMessages.clear()}clearContextMessages(){this.userContextMessages.clear()}clearAll(){this.newUserMessages.clear(),this.newResponseMessages.clear(),this.userContextMessages.clear()}createSourceChecker(){let $={memory:new Set(Array.from(this.memoryMessages.values()).map((Y)=>Y.id)),output:new Set(Array.from(this.newResponseMessages.values()).map((Y)=>Y.id)),input:new Set(Array.from(this.newUserMessages.values()).map((Y)=>Y.id)),context:new Set(Array.from(this.userContextMessages.values()).map((Y)=>Y.id))};return{...$,getSource:(Y)=>{if($.memory.has(Y.id))return"memory";if($.input.has(Y.id))return"input";if($.output.has(Y.id))return"response";if($.context.has(Y.id))return"context";return null}}}isNewMessage($){let Y=typeof $==="string"?$:$.id;if(typeof $!=="string"){if(this.newUserMessages.has($)||this.newResponseMessages.has($))return!0}return Array.from(this.newUserMessages).some((X)=>X.id===Y)||Array.from(this.newResponseMessages).some((X)=>X.id===Y)}serializeSourceTracking(){let $=(Y)=>Array.from(Y).map((X)=>X.id);return{memoryMessages:$(this.memoryMessages),newUserMessages:$(this.newUserMessages),newResponseMessages:$(this.newResponseMessages),userContextMessages:$(this.userContextMessages),memoryMessagesPersisted:$(this.memoryMessagesPersisted),newUserMessagesPersisted:$(this.newUserMessagesPersisted),newResponseMessagesPersisted:$(this.newResponseMessagesPersisted),userContextMessagesPersisted:$(this.userContextMessagesPersisted)}}deserializeSourceTracking($,Y){let X=(G)=>new Set(G.map((J)=>Y.find((Q)=>Q.id===J)).filter(Boolean));this.memoryMessages=X($.memoryMessages),this.newUserMessages=X($.newUserMessages),this.newResponseMessages=X($.newResponseMessages),this.userContextMessages=X($.userContextMessages),this.memoryMessagesPersisted=X($.memoryMessagesPersisted),this.newUserMessagesPersisted=X($.newUserMessagesPersisted),this.newResponseMessagesPersisted=X($.newResponseMessagesPersisted),this.userContextMessagesPersisted=X($.userContextMessagesPersisted)}serializeAll($){return{messages:uI8($.messages),systemMessages:$.systemMessages,taggedSystemMessages:$.taggedSystemMessages,memoryInfo:$.memoryInfo,_agentNetworkAppend:$.agentNetworkAppend,...this.serializeSourceTracking()}}deserializeAll($){let Y=pI8($.messages);return this.deserializeSourceTracking({memoryMessages:$.memoryMessages,newUserMessages:$.newUserMessages,newResponseMessages:$.newResponseMessages,userContextMessages:$.userContextMessages,memoryMessagesPersisted:$.memoryMessagesPersisted,newUserMessagesPersisted:$.newUserMessagesPersisted,newResponseMessagesPersisted:$.newResponseMessagesPersisted,userContextMessagesPersisted:$.userContextMessagesPersisted},Y),{messages:Y,systemMessages:$.systemMessages,taggedSystemMessages:$.taggedSystemMessages,memoryInfo:$.memoryInfo,agentNetworkAppend:$._agentNetworkAppend}}},l6=class{messages=[];systemMessages=[];taggedSystemMessages={};memoryInfo=null;stateManager=new dI8;get memoryMessages(){return this.stateManager.getMemoryMessages()}get newUserMessages(){return this.stateManager.getUserMessages()}get newResponseMessages(){return this.stateManager.getResponseMessages()}get userContextMessages(){return this.stateManager.getContextMessages()}get memoryMessagesPersisted(){return this.stateManager.getMemoryMessagesPersisted()}get newUserMessagesPersisted(){return this.stateManager.getUserMessagesPersisted()}get newResponseMessagesPersisted(){return this.stateManager.getResponseMessagesPersisted()}get userContextMessagesPersisted(){return this.stateManager.getContextMessagesPersisted()}generateMessageId;_agentNetworkAppend=!1;filterIncompleteToolCalls;logger;toAIV5UIMessages($,Y){return $.map((X)=>uz.toUIMessage(X,Y))}toAIV4UIMessages($,Y){return $.map((X)=>$D.toUIMessage(X,Y))}isRecording=!1;recordedEvents=[];constructor({threadId:$,resourceId:Y,generateMessageId:X,logger:G,filterIncompleteToolCalls:J,_agentNetworkAppend:Q}={}){if($)this.memoryInfo={threadId:$,resourceId:Y};this.generateMessageId=X,this.logger=G,this.filterIncompleteToolCalls=J??!0,this._agentNetworkAppend=Q||!1}startRecording(){this.isRecording=!0,this.recordedEvents=[]}hasRecordedEvents(){return this.recordedEvents.length>0}getRecordedEvents(){return[...this.recordedEvents]}stopRecording(){this.isRecording=!1;let $=this.getRecordedEvents();return this.recordedEvents=[],$}addSignal($,Y){let X=Y?.source??"input",G=this.generateCreatedAt(X,new Date),J=$.acceptedAt??$.createdAt,Q=Wj($.type==="user-message"?{id:$.id,type:"user-message",contents:$.contents,attributes:$.attributes,metadata:$.metadata,createdAt:G,acceptedAt:J}:{id:$.id,type:$.type,contents:String($.contents),attributes:$.attributes,metadata:$.metadata,createdAt:G,acceptedAt:J});return this.addOne(Q.toDBMessage(this.memoryInfo??void 0),X),Q}add($,Y){if(Y==="user")Y="input";if(!$)return this;let X=Array.isArray($)?$:[$];if(this.isRecording)this.recordedEvents.push({type:"add",source:Y,count:X.length});for(let G of X){if(Gv0(G)&&Y==="input"){this.addSignal(G,{source:Y});continue}let J=Gv0(G)?G.toDBMessage(this.memoryInfo??void 0):typeof G==="string"?{role:"user",content:G}:G;if(Array.isArray(J)){for(let Q of J)this.addOne(typeof Q==="string"?{role:"user",content:Q}:Q,Y);continue}this.addOne(typeof J==="string"?{role:"user",content:J}:J,Y)}return this}serialize(){return this.stateManager.serializeAll({messages:this.messages,systemMessages:this.systemMessages,taggedSystemMessages:this.taggedSystemMessages,memoryInfo:this.memoryInfo,agentNetworkAppend:this._agentNetworkAppend})}serializeForSpan(){return{messages:this.all.aiV4.core().map((Y)=>({role:Y.role,content:Y.content})),systemMessages:[...this.systemMessages.map((Y)=>({role:Y.role,content:Y.content})),...Object.entries(this.taggedSystemMessages).flatMap(([Y,X])=>X.map((G)=>({role:G.role,content:G.content,tag:Y})))]}}deserialize($){let Y=this.stateManager.deserializeAll($);this.messages=Y.messages,this.systemMessages=Y.systemMessages,this.taggedSystemMessages=Y.taggedSystemMessages,this.memoryInfo=Y.memoryInfo,this._agentNetworkAppend=Y.agentNetworkAppend;for(let X of this.messages)this.updateLastCreatedAt(X);return this}getMessagesForModelPrompt(){return this.messages.flatMap(($)=>{if($.role!=="signal")return[$];return this.convertSignalForModelPrompt($)})}convertSignalForModelPrompt($){let Y=r60($).toLLMMessage();return(Array.isArray(Y)?Y:[Y]).map((X,G)=>{let J=$.createdAt,Q=G===0?$.id:`${$.id}:prompt:${G}`,W=typeof X==="string"?{id:Q,role:"user",content:X,metadata:{createdAt:J}}:{...X,id:"id"in X&&typeof X.id==="string"?X.id:Q,metadata:{..."metadata"in X&&X.metadata&&typeof X.metadata==="object"?X.metadata:{},createdAt:J}};return me1(W,"input",{memoryInfo:this.memoryInfo,newMessageId:()=>Q,generateCreatedAt:(K,Z)=>{if(Z instanceof Date)return Z;if(typeof Z==="string"||typeof Z==="number")return new Date(Z);return J},dbMessages:this.messages})})}makeMessageSourceChecker(){return this.stateManager.createSourceChecker()}getLatestUserContent(){let Y=this.all.core().filter((X)=>X.role==="user").at(-1)?.content;if(!Y)return null;return Zv0(Y)}get get(){return{all:this.all,remembered:this.remembered,input:this.input,response:this.response}}get getPersisted(){return{remembered:this.rememberedPersisted,input:this.inputPersisted,taggedSystemMessages:this.taggedSystemMessages,response:this.responsePersisted}}get clear(){return{all:{db:()=>{let $=[...this.messages];if(this.messages=[],this.stateManager.clearAll(),this.isRecording&&$.length>0)this.recordedEvents.push({type:"clear",count:$.length});return $}},input:{db:()=>{let $=Array.from(this.stateManager.getUserMessages());if(this.messages=this.messages.filter((Y)=>!this.stateManager.isUserMessage(Y)),this.stateManager.clearUserMessages(),this.isRecording&&$.length>0)this.recordedEvents.push({type:"clear",source:"input",count:$.length});return $}},response:{db:()=>{let $=Array.from(this.stateManager.getResponseMessages());if(this.messages=this.messages.filter((Y)=>!this.stateManager.isResponseMessage(Y)),this.stateManager.clearResponseMessages(),this.isRecording&&$.length>0)this.recordedEvents.push({type:"clear",source:"response",count:$.length});return $}}}}removeByIds($){let Y=new Set($),X=[];if(this.messages=this.messages.filter((G)=>{if(Y.has(G.id))return X.push(G),this.stateManager.removeMessage(G),!1;return!0}),this.isRecording&&X.length>0)this.recordedEvents.push({type:"removeByIds",ids:$,count:X.length});return X}all={db:()=>this.messages,v1:()=>Gj(this.all.db()),aiV5:{model:()=>{let $=this.getMessagesForModelPrompt();return _3(this.toAIV5UIMessages($,{transformToolPayloads:!1}),$)},ui:()=>this.toAIV5UIMessages(this.all.db()),prompt:()=>{let $=ue1([...this.systemMessages,...Object.values(this.taggedSystemMessages).flat()],"system",this.createAdapterContext(),this.messages),Y=this.getMessagesForModelPrompt(),X=_3(this.toAIV5UIMessages(Y,{transformToolPayloads:!1}),Y,this.filterIncompleteToolCalls),G=[...$,...X];return i60(G,this.logger)},llmPrompt:async($={downloadConcurrency:10,downloadRetries:3})=>{let Y=this.getMessagesForModelPrompt(),X=_3(this.toAIV5UIMessages(Y,{transformToolPayloads:!1}),Y,this.filterIncompleteToolCalls),G=new Map;for(let Z of this.messages){if(Z.content?.format!==2||!Z.content.parts)continue;for(let H of Z.content.parts)if(H.type==="tool-invocation"&&H.toolInvocation?.state==="result"&&H.providerMetadata?.mastra&&typeof H.providerMetadata.mastra==="object"&&"modelOutput"in H.providerMetadata.mastra)G.set(H.toolInvocation.toolCallId,H.providerMetadata.mastra.modelOutput)}if(G.size>0)for(let Z of X){if(Z.role!=="tool"||!Array.isArray(Z.content))continue;for(let H=0;H<Z.content.length;H++){let z=Z.content[H];if(z.type==="tool-result"&&G.has(z.toolCallId))Z.content[H]={...z,output:G.get(z.toolCallId)}}}let J=ue1([...this.systemMessages,...Object.values(this.taggedSystemMessages).flat()],"system",this.createAdapterContext(),this.messages),Q=await fI8({messages:X,downloadConcurrency:$?.downloadConcurrency,downloadRetries:$?.downloadRetries,supportedUrls:$?.supportedUrls}),W=[...J,...X];if(X.some((Z)=>(Z.role==="user"||Z.role==="assistant")&&typeof Z.content!=="string"&&Z.content.some((H)=>H.type==="image"||H.type==="file")))W=W.map((Z)=>{if(Z.role==="user"){if(typeof Z.content==="string")return{role:"user",content:[{type:"text",text:Z.content}],providerOptions:Z.providerOptions};return{role:"user",content:Z.content.map((z)=>{if(z.type==="image"||z.type==="file")return de1(z,Q);return z}).filter((z)=>z.type!=="text"||z.text!==""),providerOptions:Z.providerOptions}}if(Z.role==="assistant"&&typeof Z.content!=="string"){let H=Z.content.map((z)=>{if(z.type==="file")return de1(z,Q);return z});return{...Z,content:H}}return Z});return W=i60(W,this.logger),W.map(te1).filter((Z)=>Z.role==="system"||typeof Z.content==="string"||Z.content.length>0)}},aiV6:{ui:()=>this.all.db().map(j3.toUIMessage)},prompt:()=>this.all.aiV4.prompt(),ui:()=>this.toAIV4UIMessages(this.all.db()),core:()=>r2(this.toAIV4UIMessages(this.all.db(),{transformToolPayloads:!1})),aiV4:{ui:()=>this.toAIV4UIMessages(this.all.db()),core:()=>r2(this.toAIV4UIMessages(this.getMessagesForModelPrompt(),{transformToolPayloads:!1})),prompt:()=>{let $=this.all.aiV4.core(),Y=[...this.systemMessages,...Object.values(this.taggedSystemMessages).flat(),...$];return i60(Y,this.logger)},llmPrompt:()=>{let $=this.all.aiV4.core(),X=[...[...this.systemMessages,...Object.values(this.taggedSystemMessages).flat()],...$];return X=i60(X,this.logger),X.map(MI8)}}};remembered={db:()=>this.messages.filter(($)=>this.memoryMessages.has($)),v1:()=>Gj(this.remembered.db()),aiV5:{model:()=>_3(this.toAIV5UIMessages(this.remembered.db(),{transformToolPayloads:!1}),this.messages),ui:()=>this.toAIV5UIMessages(this.remembered.db())},aiV6:{ui:()=>this.remembered.db().map(j3.toUIMessage)},ui:()=>this.toAIV4UIMessages(this.remembered.db()),core:()=>r2(this.toAIV4UIMessages(this.remembered.db(),{transformToolPayloads:!1})),aiV4:{ui:()=>this.toAIV4UIMessages(this.remembered.db()),core:()=>r2(this.toAIV4UIMessages(this.remembered.db(),{transformToolPayloads:!1}))}};rememberedPersisted={db:()=>this.all.db().filter(($)=>this.memoryMessagesPersisted.has($)),v1:()=>Gj(this.rememberedPersisted.db()),aiV5:{model:()=>_3(this.toAIV5UIMessages(this.rememberedPersisted.db(),{transformToolPayloads:!1}),this.messages),ui:()=>this.toAIV5UIMessages(this.rememberedPersisted.db())},aiV6:{ui:()=>this.rememberedPersisted.db().map(j3.toUIMessage)},ui:()=>this.toAIV4UIMessages(this.rememberedPersisted.db()),core:()=>r2(this.toAIV4UIMessages(this.rememberedPersisted.db(),{transformToolPayloads:!1})),aiV4:{ui:()=>this.toAIV4UIMessages(this.rememberedPersisted.db()),core:()=>r2(this.toAIV4UIMessages(this.rememberedPersisted.db(),{transformToolPayloads:!1}))}};input={db:()=>this.messages.filter(($)=>this.newUserMessages.has($)),v1:()=>Gj(this.input.db()),aiV5:{model:()=>_3(this.toAIV5UIMessages(this.input.db(),{transformToolPayloads:!1}),this.messages),ui:()=>this.toAIV5UIMessages(this.input.db())},aiV6:{ui:()=>this.input.db().map(j3.toUIMessage)},ui:()=>this.toAIV4UIMessages(this.input.db()),core:()=>r2(this.toAIV4UIMessages(this.input.db(),{transformToolPayloads:!1})),aiV4:{ui:()=>this.toAIV4UIMessages(this.input.db()),core:()=>r2(this.toAIV4UIMessages(this.input.db(),{transformToolPayloads:!1}))}};inputPersisted={db:()=>this.messages.filter(($)=>this.newUserMessagesPersisted.has($)),v1:()=>Gj(this.inputPersisted.db()),aiV5:{model:()=>_3(this.toAIV5UIMessages(this.inputPersisted.db(),{transformToolPayloads:!1}),this.messages),ui:()=>this.toAIV5UIMessages(this.inputPersisted.db())},aiV6:{ui:()=>this.inputPersisted.db().map(j3.toUIMessage)},ui:()=>this.toAIV4UIMessages(this.inputPersisted.db()),core:()=>r2(this.toAIV4UIMessages(this.inputPersisted.db(),{transformToolPayloads:!1})),aiV4:{ui:()=>this.toAIV4UIMessages(this.inputPersisted.db()),core:()=>r2(this.toAIV4UIMessages(this.inputPersisted.db(),{transformToolPayloads:!1}))}};response={db:()=>this.messages.filter(($)=>this.newResponseMessages.has($)),v1:()=>Gj(this.response.db()),aiV5:{ui:()=>this.toAIV5UIMessages(this.response.db()),model:()=>_3(this.toAIV5UIMessages(this.response.db(),{transformToolPayloads:!1}),this.messages).filter(($)=>$.role==="tool"||$.role==="assistant"),modelContent:($)=>{if(typeof $==="number")return pe1.extractStepContent(this.response.aiV5.ui(),$,this.response.aiV5.stepContent);return this.response.aiV5.model().map(this.response.aiV5.stepContent).flat()},stepContent:($)=>{return pe1.convertToStepContent($,this.messages,()=>this.response.aiV5.model().at(-1))}},aiV6:{ui:()=>this.response.db().map(j3.toUIMessage)},aiV4:{ui:()=>this.toAIV4UIMessages(this.response.db()),core:()=>r2(this.toAIV4UIMessages(this.response.db(),{transformToolPayloads:!1}))}};responsePersisted={db:()=>this.messages.filter(($)=>this.newResponseMessagesPersisted.has($)),aiV5:{model:()=>_3(this.toAIV5UIMessages(this.responsePersisted.db(),{transformToolPayloads:!1}),this.messages),ui:()=>this.toAIV5UIMessages(this.responsePersisted.db())},aiV6:{ui:()=>this.responsePersisted.db().map(j3.toUIMessage)},ui:()=>this.toAIV4UIMessages(this.responsePersisted.db()),aiV4:{ui:()=>this.toAIV4UIMessages(this.responsePersisted.db()),core:()=>r2(this.toAIV4UIMessages(this.responsePersisted.db(),{transformToolPayloads:!1}))}};drainUnsavedMessages(){let $=this.messages.filter((Y)=>this.newUserMessages.has(Y)||this.newResponseMessages.has(Y));return this.newUserMessages.clear(),this.newResponseMessages.clear(),$.map((Y)=>this.transformMessageForTranscript(Y))}transformToolStateDataForTranscript($,Y){if(!$||typeof $!=="object")return $;let X=$,G=X.metadata??X.providerMetadata,J=uY(G,"transcript",Y),Q=uY(G,"transcript","input-available"),W=Y==="approval"?f7(J)?J.transformed:f7(Q)?Q.transformed:void 0:f7(Q)?Q.transformed:f7(J)?J.transformed:void 0,K=Y==="suspend"&&f7(J)?J.transformed:void 0;return{...X,...W!==void 0?{args:W}:{},...K!==void 0?{suspendPayload:K}:{}}}transformMessageForTranscript($){if($.content?.format!==2||!$.content.parts)return $;let Y=!1,X=new Map,G=$.content.parts.map((W)=>{if(W.type==="tool-invocation"&&W.toolInvocation){let K=uY(W.providerMetadata,"transcript","input-available"),Z=W.toolInvocation.state==="result"?uY(W.providerMetadata,"transcript","output-available")??uY(W.providerMetadata,"transcript","error"):W.toolInvocation.state==="output-error"?uY(W.providerMetadata,"transcript","error"):void 0;if(!K&&!Z)return W;Y=!0;let H=f7(K)?K.transformed:W.toolInvocation.args,z=W.toolInvocation.state==="result"?f7(Z)?Z.transformed:W.toolInvocation.result:void 0,V=W.toolInvocation.state==="output-error"?f7(Z)?Z.transformed:W.toolInvocation.errorText:void 0;return X.set(W.toolInvocation.toolCallId,{args:H,...W.toolInvocation.state==="result"?{result:z}:{},...W.toolInvocation.state==="output-error"?{errorText:V}:{}}),{...W,toolInvocation:{...W.toolInvocation,args:H,...W.toolInvocation.state==="result"?{result:z}:{},...W.toolInvocation.state==="output-error"?{errorText:V}:{}}}}if(W.type==="data-tool-call-suspended"||W.type==="data-tool-call-approval")return Y=!0,{...W,data:this.transformToolStateDataForTranscript(W.data,W.type==="data-tool-call-suspended"?"suspend":"approval")};return W}),J=$.content.toolInvocations?.map((W)=>{let K=X.get(W.toolCallId);if(!K)return W;let Z=W.state;return Y=!0,{...W,...K.args!==void 0?{args:K.args}:{},...W.state==="result"&&K.result!==void 0?{result:K.result}:{},...Z==="output-error"&&K.errorText!==void 0?{errorText:K.errorText}:{}}}),Q=$.content.metadata&&typeof $.content.metadata==="object"?{...$.content.metadata}:$.content.metadata;if(Q&&typeof Q==="object")for(let[W,K]of[["suspendedTools","suspend"],["pendingToolApprovals","approval"]]){let Z=Q[W];if(!Z||typeof Z!=="object")continue;Y=!0,Q[W]=Object.fromEntries(Object.entries(Z).map(([H,z])=>[H,this.transformToolStateDataForTranscript(z,K)]))}if(!Y)return $;return{...$,content:{...$.content,parts:G,...J?{toolInvocations:J}:{},...Q?{metadata:Q}:{}}}}getEarliestUnsavedMessageTimestamp(){let $=this.messages.filter((Y)=>this.newUserMessages.has(Y)||this.newResponseMessages.has(Y));if($.length===0)return;return Math.min(...$.map((Y)=>new Date(Y.createdAt).getTime()))}isNewMessage($){return this.stateManager.isNewMessage($)}updateToolInvocation($,Y){if(!$.toolInvocation?.toolCallId)return!1;let X=$.toolInvocation.toolCallId;for(let G=this.messages.length-1;G>=0;G--){let J=this.messages[G];if(J.role!=="assistant"||!J.content?.parts)continue;for(let Q=0;Q<J.content.parts.length;Q++){let W=J.content.parts[Q];if(W?.type==="tool-invocation"&&W.toolInvocation?.toolCallId===X){let K=W,Z=$,H=K.providerMetadata!==void 0||Z.providerMetadata!==void 0?{...K.providerMetadata??{},...Z.providerMetadata??{}}:void 0;J.content.parts[Q]={...$,toolInvocation:{...$.toolInvocation,args:W.toolInvocation.args},...K.providerExecuted!==void 0&&Z.providerExecuted===void 0?{providerExecuted:K.providerExecuted}:{},...H!==void 0?{providerMetadata:H}:{}},this.lastCreatedAt=Math.max(this.lastCreatedAt||0,Date.now()),this.updateLastCreatedAt(J);let z=J.content.metadata??{},V=Y??{},F=z.backgroundTasks,L=V.backgroundTasks;if(J.content.metadata={...z,...V,...F||L?{backgroundTasks:{...F??{},...L??{}}}:{}},!this.stateManager.isResponseMessage(J))this.stateManager.removeMessage(J),this.stateManager.addToSource(J,"response");return!0}}}return this.logger?.warn(`updateToolInvocation: no matching tool call found for toolCallId=${X}`),!1}stepStart(){let $=this.messages[this.messages.length-1];if(!$||$.role!=="assistant"||!$.content?.parts)return!1;if(mz.isSealed($))return!1;if($.content.parts[$.content.parts.length-1]?.type==="step-start")return!1;if($.content.parts.push(Uv0({type:"step-start"})),!this.stateManager.isResponseMessage($))this.stateManager.removeMessage($),this.stateManager.addToSource($,"response");return!0}markResponseMessageBoundary($){let Y=$?this.messages.find((X)=>X.id===$):[...this.messages].reverse().find((X)=>X.role==="assistant");if(!Y||Y.role!=="assistant")return!1;if(Y.content.metadata={...Y.content.metadata??{},mastra:{...Y.content.metadata?.mastra??{},responseBoundary:!0}},!this.stateManager.isResponseMessage(Y))this.stateManager.removeMessage(Y),this.stateManager.addToSource(Y,"response");return!0}enrichLastStepStart($){let Y=this.messages[this.messages.length-1];if(!Y||Y.role!=="assistant"||!Y.content?.parts)return!1;if(mz.isSealed(Y))return!1;for(let X=Y.content.parts.length-1;X>=0;X--){let G=Y.content.parts[X];if(G?.type!=="step-start")continue;if(G.model)return!1;if(G.model=$,!this.stateManager.isResponseMessage(Y))this.stateManager.removeMessage(Y),this.stateManager.addToSource(Y,"response");return!0}return!1}getSystemMessages($){if($)return this.taggedSystemMessages[$]||[];return this.systemMessages}getAllSystemMessages(){return[...this.systemMessages,...Object.values(this.taggedSystemMessages).flat()]}clearSystemMessages($){if($)delete this.taggedSystemMessages[$];else this.systemMessages=[];return this}replaceAllSystemMessages($){this.systemMessages=[],this.taggedSystemMessages={};for(let Y of $)if(Y.role==="system")this.systemMessages.push(Y);return this}addSystem($,Y){if(!$)return this;for(let X of Array.isArray($)?$:[$])this.addOneSystem(X,Y);return this}addOneSystem($,Y){let X=II8($);if(X.role!=="system")throw Error(`Expected role "system" but saw ${X.role} for message ${JSON.stringify(X,null,2)}`);if(Y&&!this.isDuplicateSystem(X,Y)){if(this.taggedSystemMessages[Y]||=[],this.taggedSystemMessages[Y].push(X),this.isRecording)this.recordedEvents.push({type:"addSystem",tag:Y,message:X})}else if(!Y&&!this.isDuplicateSystem(X)){if(this.systemMessages.push(X),this.isRecording)this.recordedEvents.push({type:"addSystem",message:X})}}isDuplicateSystem($,Y){if(Y){if(!this.taggedSystemMessages[Y])return!1;return this.taggedSystemMessages[Y].some((X)=>Q7.fromAIV4CoreMessageContent(X.content)===Q7.fromAIV4CoreMessageContent($.content))}return this.systemMessages.some((X)=>Q7.fromAIV4CoreMessageContent(X.content)===Q7.fromAIV4CoreMessageContent($.content))}getMessageById($){return this.messages.find((Y)=>Y.id===$)}shouldReplaceMessage($){if(!this.messages.length)return{exists:!1};if(!("id"in $)||!$?.id)return{exists:!1};let Y=this.getMessageById($.id);if(!Y)return{exists:!1};return{exists:!0,shouldReplace:!YD(Y,$),id:Y.id}}addOne($,Y){if((!("content"in $)||!$.content&&typeof $.content!=="string")&&(!("parts"in $)||!$.parts))throw new G0({id:"INVALID_MESSAGE_CONTENT",domain:"AGENT",category:"USER",text:`Message with role "${$.role}" must have either a 'content' property (string or array) or a 'parts' property (array) that is not empty, null, or undefined. Received message: ${JSON.stringify($,null,2)}`,details:{role:$.role,messageSource:Y,hasContent:"content"in $,hasParts:"parts"in $}});if($.role==="system"){if(Y==="memory")return null;if(P9.isAIV4CoreMessage($)||P9.isAIV6CoreMessage($)||P9.isAIV5CoreMessage($)||P9.isMastraDBMessage($))return this.addSystem($);throw new G0({id:"INVALID_SYSTEM_MESSAGE_FORMAT",domain:"AGENT",category:"USER",text:"Invalid system message format. System messages must be CoreMessage format with 'role' and 'content' properties. The content should be a string or valid content array.",details:{messageSource:Y,receivedMessage:JSON.stringify($,null,2)}})}let X=me1($,Y,this.createAdapterContext()),G=X.role==="signal"?X.content.metadata?.signal:void 0;if(Y==="input"&&X.role==="signal"&&!G?.acceptedAt){let D=G?.createdAt??X.createdAt.toISOString();X.createdAt=this.generateCreatedAt(Y,X.createdAt),X.content.metadata={...X.content.metadata,signal:{...G,createdAt:X.createdAt.toISOString(),acceptedAt:D}}}let{exists:J,shouldReplace:Q,id:W}=this.shouldReplaceMessage(X),K=this.messages.findLastIndex((D)=>mz.isSealed(D)),Z=this.messages.at(-1),H=this.messages.length-1,z=K===-1||H>K;if(Y==="memory"){for(let D of this.messages)if(YD(D,X))return}let V=J&&W?this.messages.find((D)=>D.id===W):void 0,F=!!V&&mz.isSealed(V),L=Z?this.memoryMessages.has(Z):!1;if(z&&!F&&mz.shouldMerge(Z,X,Y,L,this._agentNetworkAppend)&&Z)mz.merge(Z,X),this.updateLastCreatedAt(Z),this.pushMessageToSource(Z,Y);else{let D=-1;if(Q)D=this.messages.findIndex((B)=>B.id===W);let A=D!==-1&&this.messages[D];if(Q&&A){let B=K!==-1&&D<=K;if(mz.isSealed(A)){let O=A.content?.parts||[],E=0;for(let q=O.length-1;q>=0;q--)if(O[q]?.metadata?.mastra?.sealedAt){E=q+1;break}if(E===0)E=O.length;let M=X.content.parts,R;if(M.length<=E){if(YD(A,X))return this;R=M}else R=M.slice(E);if(R.length>0){if(X.id=this.generateMessageId?.({idType:"message",source:"memory"})??d60(),X.content.parts=R,X.createdAt<=A.createdAt)X.createdAt=new Date(A.createdAt.getTime()+1);this.messages.push(X)}}else if(B){if(X.id=this.generateMessageId?.({idType:"message",source:"memory"})??d60(),X.createdAt<=A.createdAt)X.createdAt=new Date(A.createdAt.getTime()+1);this.messages.push(X)}else{let O=this.memoryMessages.has(A);if(mz.shouldMerge(A,X,Y,O,this._agentNetworkAppend))return mz.merge(A,X),this.updateLastCreatedAt(A),this.pushMessageToSource(A,Y),this.messages.sort((M,R)=>M.createdAt.getTime()-R.createdAt.getTime()),this;this.messages[D]=X}}else if(!J)this.messages.push(X);this.pushMessageToSource(X,Y)}for(let D of this.messages)this.updateLastCreatedAt(D);return this.messages.sort((D,A)=>D.createdAt.getTime()-A.createdAt.getTime()),this}pushMessageToSource($,Y){this.stateManager.addToSource($,Y)}lastCreatedAt;updateLastCreatedAt($){let Y=$.createdAt.getTime(),X=Array.isArray($.content.parts)?$.content.parts.reduce((G,J)=>{if(typeof J.createdAt==="number"&&J.createdAt>G)return J.createdAt;return G},Y):Y;this.lastCreatedAt=Math.max(this.lastCreatedAt||0,X)}generateCreatedAt($,Y){let X=Y instanceof Date?Y:typeof Y==="string"||typeof Y==="number"?new Date(Y):void 0;if(X&&!this.lastCreatedAt)return this.lastCreatedAt=X.getTime(),X;if(X&&$==="memory")return X;let G=new Date,J=X?.getTime()||G.getTime(),Q=this.lastCreatedAt||0;if(J<=Q){let W=new Date(Q+1);return this.lastCreatedAt=W.getTime(),W}return this.lastCreatedAt=J,G}newMessageId($){if(this.generateMessageId)return this.generateMessageId({idType:"message",source:"agent",threadId:this.memoryInfo?.threadId,resourceId:this.memoryInfo?.resourceId,role:$});return d60()}createAdapterContext(){return{memoryInfo:this.memoryInfo,newMessageId:()=>this.newMessageId(),generateCreatedAt:($,Y)=>this.generateCreatedAt($,Y),dbMessages:this.messages}}};var $g=V0(()=>{AI0();hS0();Qk0();ck0();Mt1();OW();Rt1();Yv0();iT8=/^[A-Za-z_][A-Za-z0-9_.-]*$/;eT8=["openai","azure"];ZI8=/^[a-zA-Z0-9_-]+$/;Qv0=class extends $04{type="file";constructor($){super($)}};kI8=[{mediaType:"image/gif",bytesPrefix:[71,73,70],base64Prefix:"R0lG"},{mediaType:"image/png",bytesPrefix:[137,80,78,71],base64Prefix:"iVBORw"},{mediaType:"image/jpeg",bytesPrefix:[255,216],base64Prefix:"/9j/"},{mediaType:"image/webp",bytesPrefix:[82,73,70,70],base64Prefix:"UklGRg"},{mediaType:"image/bmp",bytesPrefix:[66,77],base64Prefix:"Qk"},{mediaType:"image/tiff",bytesPrefix:[73,73,42,0],base64Prefix:"SUkqAA"},{mediaType:"image/tiff",bytesPrefix:[77,77,0,42],base64Prefix:"TU0AKg"},{mediaType:"image/avif",bytesPrefix:[0,0,0,32,102,116,121,112,97,118,105,102],base64Prefix:"AAAAIGZ0eXBhdmlm"},{mediaType:"image/heic",bytesPrefix:[0,0,0,32,102,116,121,112,104,101,105,99],base64Prefix:"AAAAIGZ0eXBoZWlj"}]});import{randomUUID as XD}from"crypto";import{ReadableStream as Y04}from"stream/web";import cI8 from"events";function lI8($,Y){new AS($,{timezone:Y}).nextRun()}function iI8($){return $!==null&&typeof $==="object"&&"type"in $&&$.type==="tripwire"&&"payload"in $}function nI8($){let{payload:Y}=$;return new u6(Y.reason||"Agent tripwire triggered",{retry:Y.retry,metadata:Y.metadata},Y.processorId)}function rI8($,Y){if($.type!=="text-delta")return;return Y?$.payload?.text:$.textDelta}function pz($){let{stepResult:Y,stepResults:X,state:G}=$;return Y?.__state??X?.__state??G??{}}async function X04({workflowId:$,prevResult:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,resumeData:K,parentWorkflow:Z,requestContext:H,retryCount:z=0,perStep:V,state:F,outputOptions:L},{pubsub:N,stepExecutor:D,step:A,stepResult:B}){let O=pz({stepResult:B,stepResults:J,state:F}),E=new p1(Object.entries(H??{})),R=(J[A.step?.id]?.metadata?.iterationCount??0)+1,q=await D.evaluateCondition({workflowId:$,condition:A.condition,runId:X,stepResults:J,state:O,requestContext:E,inputData:Y?.status==="success"?Y.output:void 0,resumeData:K,abortController:new AbortController,retryCount:z,iterationCount:R}),_={parentWorkflow:Z,workflowId:$,runId:X,executionPath:G,resumeSteps:[],stepResults:J,prevResult:B,resumeData:void 0,activeStepsPath:Q,requestContext:H,retryCount:z,perStep:V,state:O,outputOptions:L},P={parentWorkflow:Z,workflowId:$,runId:X,executionPath:G,resumeSteps:W,stepResults:J,prevResult:B,resumeData:K,activeStepsPath:Q,requestContext:H,perStep:V,state:O,outputOptions:L};if(A.loopType==="dountil")if(q)await N.publish("workflows",{type:"workflow.step.end",runId:X,data:P});else await N.publish("workflows",{type:"workflow.step.run",runId:X,data:_});else if(q)await N.publish("workflows",{type:"workflow.step.run",runId:X,data:_});else await N.publish("workflows",{type:"workflow.step.end",runId:X,data:P})}async function Hv0({workflowId:$,prevResult:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,timeTravel:K,restart:Z,resumeData:H,parentWorkflow:z,requestContext:V,perStep:F,state:L,outputOptions:N,forEachIndex:D},{pubsub:A,mastra:B,step:O}){let E=pz({stepResults:J,state:L}),M=J[O.step.id],R=M?.output?.length??0,q=Y?.output?.length??0;if(D!==void 0&&W?.length>0&&R>0){let C=M?.output,k=Array.isArray(C)?C.length:0;if(!Array.isArray(C)||D<0||D>=k){let v=Error(`Invalid forEachIndex ${D} for forEach resume: expected index in range [0, ${k-1}] but output array has length ${k}`);await A.publish("workflows",{type:"workflow.fail",runId:X,data:{parentWorkflow:z,workflowId:$,runId:X,executionPath:G,resumeSteps:W,stepResults:J,prevResult:{status:"failed",error:v},activeStepsPath:Q,requestContext:V,state:E,outputOptions:N}});return}let S=M?.output?.[D];if(S?.status==="suspended"||S===null){let v=O.step.component==="WORKFLOW",x=Y?.output,y=v&&Y.status==="success"&&Array.isArray(x)?{status:"success",output:x[D]}:Y;await A.publish("workflows",{type:"workflow.step.run",runId:X,data:{parentWorkflow:z,workflowId:$,runId:X,executionPath:[G[0],D],resumeSteps:W,timeTravel:K,restart:Z,stepResults:J,prevResult:y,resumeData:H,activeStepsPath:Q,requestContext:V,perStep:F,state:E,outputOptions:N}});return}if(M.output.filter((v)=>v===null||v?.status==="suspended").length>0){let v={};for(let y=0;y<M.output.length;y++){let d=M.output[y];if(d?.status==="suspended"&&d.suspendPayload?.__workflow_meta?.resumeLabels)Object.assign(v,d.suspendPayload.__workflow_meta.resumeLabels)}let x={foreachIndex:D};if(Object.keys(v).length>0)x.resumeLabels=v;await A.publish("workflows",{type:"workflow.step.end",runId:X,data:{parentWorkflow:z,workflowId:$,runId:X,executionPath:G,resumeSteps:W,stepResults:{...J,[O.step.id]:{...M,status:"suspended",suspendedAt:Date.now(),suspendPayload:{__workflow_meta:x}}},prevResult:{status:"suspended",output:M.output,suspendPayload:{__workflow_meta:x},payload:M.payload,startedAt:M.startedAt,suspendedAt:Date.now()},activeStepsPath:Q,requestContext:V,state:E,outputOptions:N}});return}return}if(H!==void 0&&D===void 0&&M?.output?.length>0){let C=[];for(let k=0;k<M.output.length;k++){let S=M.output[k];if(S&&typeof S==="object"&&S.status==="suspended")C.push(k)}if(C.length>0){let k=O.opts.concurrency??1,S=C.slice(0,k),I=await B.getStorage()?.getStore("workflows"),v=[...M.output];for(let y of S)v[y]=K04();await I?.updateWorkflowResults({workflowName:$,runId:X,stepId:O.step.id,result:{...M,output:v},requestContext:V});let x=O.step.component==="WORKFLOW";for(let y of S){let d=Y?.output,u=x&&Y.status==="success"&&Array.isArray(d)?{status:"success",output:d[y]}:Y;try{await A.publish("workflows",{type:"workflow.step.run",runId:X,data:{parentWorkflow:z,workflowId:$,runId:X,executionPath:[G[0],y],resumeSteps:W,timeTravel:K,restart:Z,stepResults:J,prevResult:u,resumeData:H,activeStepsPath:Q,requestContext:V,perStep:F,state:E,outputOptions:N}})}catch{}}return}}let _=await B.getStorage()?.getStore("workflows");if(R>=q&&M?.output?.filter((C)=>C!==null)?.length>=q||Y?.output?.length===0){let C=M;if(Y?.output?.length===0)C={status:"success",output:[],startedAt:Date.now(),endedAt:Date.now(),payload:Y?.output},await _?.updateWorkflowResults({workflowName:$,runId:X,stepId:O.step.id,result:C,requestContext:V}),J[O.step.id]=C;await A.publish("workflows",{type:"workflow.step.run",runId:X,data:{parentWorkflow:z,workflowId:$,runId:X,executionPath:G.slice(0,-1).concat([G[G.length-1]+1]),resumeSteps:W,stepResults:J,timeTravel:K,restart:Z,prevResult:C,resumeData:void 0,activeStepsPath:Q,requestContext:V,perStep:F,state:E,outputOptions:N}});return}else if(R>=q)return;if(G.length===1&&R===0){let C=Math.min(O.opts.concurrency??1,q),k=Array.from({length:C},()=>null);await _?.updateWorkflowResults({workflowName:$,runId:X,stepId:O.step.id,result:{status:"success",output:k,startedAt:Date.now(),payload:Y?.output},requestContext:V});let S=O.step.component==="WORKFLOW";for(let I=0;I<C;I++){let v=Y?.output,x=S&&Y.status==="success"&&Array.isArray(v)?{status:"success",output:v[I]}:Y;await A.publish("workflows",{type:"workflow.step.run",runId:X,data:{parentWorkflow:z,workflowId:$,runId:X,executionPath:[G[0],I],resumeSteps:W,stepResults:J,timeTravel:K,restart:Z,prevResult:x,resumeData:H,activeStepsPath:Q,requestContext:V,perStep:F,state:E,outputOptions:N}})}return}M.output.push(null),await _?.updateWorkflowResults({workflowName:$,runId:X,stepId:O.step.id,result:{status:"success",output:M.output,startedAt:Date.now(),payload:Y?.output},requestContext:V});let P=O.step.component==="WORKFLOW",w=Y?.output,j=P&&Y.status==="success"&&Array.isArray(w)?{status:"success",output:w[R]}:Y;await A.publish("workflows",{type:"workflow.step.run",runId:X,data:{parentWorkflow:z,workflowId:$,runId:X,executionPath:[G[0],R],resumeSteps:W,timeTravel:K,restart:Z,stepResults:J,prevResult:j,resumeData:H,activeStepsPath:Q,requestContext:V,perStep:F,state:E,outputOptions:N}})}async function oI8({workflowId:$,runId:Y,executionPath:X,stepResults:G,activeStepsPath:J,resumeSteps:Q,timeTravel:W,restart:K,prevResult:Z,resumeData:H,parentWorkflow:z,requestContext:V,perStep:F,state:L,outputOptions:N},{pubsub:D,step:A}){let B={},O=pz({stepResults:G,state:L});for(let E=0;E<A.steps.length;E++){let M=A.steps[E];if(M?.type==="step"){if(K)B[M.step.id]=!!K.activeStepsPath[M.step.id];else B[M.step.id]=!0;if(F)break}}await Promise.all(A.steps?.filter((E)=>B[E.step.id]).map(async(E,M)=>{return D.publish("workflows",{type:"workflow.step.run",runId:Y,data:{workflowId:$,runId:Y,executionPath:K?X.slice(0,-1).concat([M]):X.concat([M]),resumeSteps:Q,stepResults:G,prevResult:Z,resumeData:H,timeTravel:W,restart:K?{...K,isParallelOrConditionalRestarted:!0}:void 0,parentWorkflow:z,activeStepsPath:J,requestContext:V,perStep:F,state:O,outputOptions:N}})}))}async function tI8({workflowId:$,runId:Y,executionPath:X,stepResults:G,activeStepsPath:J,resumeSteps:Q,timeTravel:W,restart:K,prevResult:Z,resumeData:H,parentWorkflow:z,requestContext:V,perStep:F,state:L,outputOptions:N},{pubsub:D,stepExecutor:A,step:B}){let O=pz({stepResults:G,state:L}),E=new p1(Object.entries(V??{})),M=await A.evaluateConditions({workflowId:$,step:B,runId:Y,stepResults:G,state:O,requestContext:E,input:Z?.status==="success"?Z.output:void 0,resumeData:H}),R={};for(let _=0;_<M.length;_++)R[M[_]]=!0;let q;if(F)q=B.steps.filter((P,w)=>R[w])[0];if(q){let _=B.steps.findIndex((P)=>P.step.id===q.step.id);J[q.step.id]=X.concat([_]),await D.publish("workflows",{type:"workflow.step.run",runId:Y,data:{workflowId:$,runId:Y,executionPath:X.concat([_]),resumeSteps:Q,stepResults:G,timeTravel:W,restart:K,prevResult:Z,resumeData:H,parentWorkflow:z,activeStepsPath:J,requestContext:V,perStep:F,state:O,outputOptions:N}})}else await Promise.all(B.steps.map(async(_,P)=>{if(R[P]){if(_?.type==="step")J[_.step.id]=X.concat([P]);return D.publish("workflows",{type:"workflow.step.run",runId:Y,data:{workflowId:$,runId:Y,executionPath:X.concat([P]),resumeSteps:Q,stepResults:G,timeTravel:W,restart:K?{...K,isParallelOrConditionalRestarted:!0}:void 0,prevResult:Z,resumeData:H,parentWorkflow:z,activeStepsPath:J,requestContext:V,perStep:F,state:O,outputOptions:N}})}else return D.publish("workflows",{type:"workflow.step.end",runId:Y,data:{workflowId:$,runId:Y,executionPath:X.concat([P]),resumeSteps:Q,stepResults:G,prevResult:{status:"skipped"},resumeData:H,parentWorkflow:z,activeStepsPath:J,requestContext:V,perStep:F,state:O,outputOptions:N}})}))}async function eI8($,{pubsub:Y,eventName:X,currentState:G}){let J=G?.waitingPaths[X];if(!J)return;let Q=dz($.workflow,J),W={status:"success",output:G?.context[Q?.id??"input"]?.payload};await Y.publish("workflows",{type:"workflow.step.run",runId:$.runId,data:{workflowId:$.workflowId,runId:$.runId,executionPath:J,resumeSteps:[],resumeData:$.resumeData,parentWorkflow:$.parentWorkflow,stepResults:G?.context,prevResult:W,activeStepsPath:{},requestContext:G?.requestContext,perStep:$.perStep}})}async function $C8({workflowId:$,runId:Y,executionPath:X,stepResults:G,activeStepsPath:J,resumeSteps:Q,timeTravel:W,restart:K,prevResult:Z,resumeData:H,parentWorkflow:z,requestContext:V,perStep:F},{pubsub:L,stepExecutor:N,step:D}){let A=Date.now();await L.publish(`workflow.events.v2.${Y}`,{type:"watch",runId:Y,data:{type:"workflow-step-waiting",payload:{id:D.id,status:"waiting",payload:Z.status==="success"?Z.output:void 0,startedAt:A}}});let B=new p1(Object.entries(V??{})),O=await N.resolveSleep({workflowId:$,step:D,runId:Y,stepResults:G,requestContext:B,input:Z?.status==="success"?Z.output:void 0,resumeData:H});setTimeout(async()=>{await L.publish(`workflow.events.v2.${Y}`,{type:"watch",runId:Y,data:{type:"workflow-step-result",payload:{id:D.id,status:"success",payload:Z.status==="success"?Z.output:void 0,output:Z.status==="success"?Z.output:void 0,startedAt:A,endedAt:Date.now()}}}),await L.publish(`workflow.events.v2.${Y}`,{type:"watch",runId:Y,data:{type:"workflow-step-finish",payload:{id:D.id,metadata:{}}}}),await L.publish("workflows",{type:"workflow.step.run",runId:Y,data:{workflowId:$,runId:Y,executionPath:X.slice(0,-1).concat([X[X.length-1]+1]),resumeSteps:Q,timeTravel:W,restart:K,stepResults:G,prevResult:Z,resumeData:H,parentWorkflow:z,activeStepsPath:J,requestContext:V,perStep:F}})},O<0?0:O)}async function YC8({workflowId:$,runId:Y,executionPath:X,stepResults:G,activeStepsPath:J,resumeSteps:Q,timeTravel:W,restart:K,prevResult:Z,resumeData:H,parentWorkflow:z,requestContext:V,perStep:F},{pubsub:L,stepExecutor:N,step:D}){let A=Date.now(),B=new p1(Object.entries(V??{})),O=await N.resolveSleepUntil({workflowId:$,step:D,runId:Y,stepResults:G,requestContext:B,input:Z?.status==="success"?Z.output:void 0,resumeData:H});await L.publish(`workflow.events.v2.${Y}`,{type:"watch",runId:Y,data:{type:"workflow-step-waiting",payload:{id:D.id,status:"waiting",payload:Z.status==="success"?Z.output:void 0,startedAt:A}}}),setTimeout(async()=>{await L.publish(`workflow.events.v2.${Y}`,{type:"watch",runId:Y,data:{type:"workflow-step-result",payload:{id:D.id,status:"success",payload:Z.status==="success"?Z.output:void 0,output:Z.status==="success"?Z.output:void 0,startedAt:A,endedAt:Date.now()}}}),await L.publish(`workflow.events.v2.${Y}`,{type:"watch",runId:Y,data:{type:"workflow-step-finish",payload:{id:D.id,metadata:{}}}}),await L.publish("workflows",{type:"workflow.step.run",runId:Y,data:{workflowId:$,runId:Y,executionPath:X.slice(0,-1).concat([X[X.length-1]+1]),resumeSteps:Q,timeTravel:W,restart:K,stepResults:G,prevResult:Z,resumeData:H,parentWorkflow:z,activeStepsPath:J,requestContext:V,perStep:F}})},O<0?0:O)}function GC8($){return $ instanceof MW}function JC8($){return $!==null&&typeof $==="object"&&"id"in $&&"execute"in $&&!($ instanceof YJ)&&!($ instanceof MW)}function QC8($){return $!==null&&typeof $==="object"&&"id"in $&&typeof $.id==="string"&&!($ instanceof YJ)&&!($ instanceof MW)&&(typeof $.processInput==="function"||typeof $.processInputStep==="function"||typeof $.processOutputStream==="function"||typeof $.processOutputResult==="function"||typeof $.processOutputStep==="function")}function Kj($,Y){if($===Y)return!0;if(!$||!Y)return $===Y;return $.length===Y.length&&$.every((X,G)=>YD(X,Y[G]))}function Vv0($,Y){if(e60($))return ZC8($,Y);if(GC8($))return UC8($,Y);if(QC8($)){let X=HC8($);return X.providesSkillDiscovery=$.providesSkillDiscovery,X}if(JC8($))return WC8($);throw Error("Invalid input: expected StepParams, Agent, ToolStep, or Processor")}function WC8($){return{id:$.id,description:$.description,inputSchema:Q4($.inputSchema),stateSchema:$.stateSchema?Q4($.stateSchema):void 0,outputSchema:Q4($.outputSchema),resumeSchema:$.resumeSchema?Q4($.resumeSchema):void 0,suspendSchema:$.suspendSchema?Q4($.suspendSchema):void 0,requestContextSchema:$.requestContextSchema?Q4($.requestContextSchema):void 0,scorers:$.scorers,retries:$.retries,metadata:$.metadata,execute:$.execute.bind($)}}async function KC8($){let{fullStream:Y,isV2Model:X,pubsub:G,runId:J,toolData:Q,logger:W,writer:K,streamFormat:Z}=$;try{await G.publish(`workflow.events.v2.${J}`,{type:"watch",runId:J,data:{type:"tool-call-streaming-start",...Q}})}catch(z){W?.debug("Failed to publish stream start event",{runId:J,error:z})}let H=null;for await(let z of Y){if(iI8(z)){H=z;break}if(typeof z==="object"&&z!==null&&"type"in z&&z.type==="text-delta"){let V=rI8(z,X);if(V)try{await G.publish(`workflow.events.v2.${J}`,{type:"watch",runId:J,data:{type:"tool-call-delta",...Q,argsTextDelta:V}})}catch(F){W?.debug("Failed to publish stream delta event",{runId:J,error:F})}}if(Z!=="legacy")await Dv0({writer:K,chunk:z})}try{await G.publish(`workflow.events.v2.${J}`,{type:"watch",runId:J,data:{type:"tool-call-streaming-finish",...Q}})}catch(z){W?.debug("Failed to publish stream finish event",{runId:J,error:z})}return{tripwireChunk:H}}async function G04($,Y,X){if(!$)return;try{await $(Y)}catch(G){X?.warn("User onFinish callback threw an error",{error:G})}}function ZC8($,Y){let X=Y??{},G=X?.structuredOutput?.schema??U.object({text:U.string()}),{retries:J,scorers:Q,metadata:W,...K}=X??{};return{id:$.id,description:$.getDescription(),inputSchema:Q4(U.object({prompt:U.string()})),outputSchema:Q4(G),retries:J,scorers:Q,metadata:W,execute:async({inputData:Z,runId:H,mastra:z,[VQ]:V,[EW]:F,requestContext:L,abortSignal:N,abort:D,writer:A,...B})=>{let O=e1(B),E=z?.getLogger(),M={name:$.name??$.id,args:Z},R=ZG(await $.getModel({requestContext:L})),q=null,_=(C)=>{let k=C;if(K?.structuredOutput?.schema&&k.object)q=k.object},P,w;if(R){let C=await $.stream(Z.prompt,{...K??{},...O,requestContext:L,onFinish:(k)=>{_(k),G04(K?.onFinish,k,E)},abortSignal:N});P=C.fullStream,w=C.text}else{let C;if(w=new Promise((S)=>{C=S}),typeof $.streamLegacy!=="function")throw Error(`Agent step "${$.id}" uses a legacy v1 model but does not implement streamLegacy().`);P=(await $.streamLegacy(Z.prompt,{...K??{},...O,requestContext:L,onFinish:(S)=>{_(S),C(S.text),G04(K?.onFinish,S,E)},abortSignal:N})).fullStream}if(N.aborted)return D();let{tripwireChunk:j}=await KC8({fullStream:P,isV2Model:R,pubsub:V,runId:H,toolData:M,logger:E,writer:A,streamFormat:F});if(j)throw nI8(j);if(q!==null)return q;return{text:await w}},component:"AGENT"}}function UC8($,Y){let X=Y;if(!$.inputSchema||!$.outputSchema)throw Error("Tool must have input and output schemas defined");return{id:$.id,description:$.description,inputSchema:$.inputSchema,outputSchema:$.outputSchema,resumeSchema:$.resumeSchema,suspendSchema:$.suspendSchema,retries:X?.retries,scorers:X?.scorers,metadata:X?.metadata,execute:async({inputData:G,mastra:J,requestContext:Q,suspend:W,resumeData:K,runId:Z,workflowId:H,state:z,setState:V,...F})=>{let L=e1(F);if(!$.execute)throw Error(`Tool ${$.id} does not have an execute function`);let N={mastra:J,requestContext:Q,...L,workflow:{runId:Z,workflowId:H,state:z,setState:V,suspend:W,resumeData:K}};return $.execute(G,N)},component:"TOOL"}}function HC8($){let Y=(J)=>{switch(J){case"input":return J6.INPUT_PROCESSOR;case"inputStep":return J6.INPUT_STEP_PROCESSOR;case"outputStream":case"outputResult":return J6.OUTPUT_PROCESSOR;case"outputStep":return J6.OUTPUT_STEP_PROCESSOR;default:return J6.OUTPUT_PROCESSOR}},X=(J)=>{switch(J){case"input":return"input processor";case"inputStep":return"input step processor";case"outputStream":return"output stream processor";case"outputResult":return"output processor";case"outputStep":return"output step processor";default:return"processor"}},G=(J)=>{switch(J){case"input":return!!$.processInput;case"inputStep":return!!$.processInputStep;case"outputStream":return!!$.processOutputStream;case"outputResult":return!!$.processOutputResult;case"outputStep":return!!$.processOutputStep;default:return!1}};return{id:`processor:${$.id}`,description:$.name??`Processor ${$.id}`,inputSchema:Q4(Yg),outputSchema:Q4(t60),execute:async({inputData:J,requestContext:Q,...W})=>{let K=e1(W),Z=J,{phase:H,messages:z,messageList:V,stepNumber:F,systemMessages:L,part:N,streamParts:D,state:A,result:B,finishReason:O,toolCalls:E,text:M,retryCount:R,model:q,tools:_,toolChoice:P,activeTools:w,providerOptions:j,modelSettings:C,structuredOutput:k,steps:S,usage:I,messageId:v,rotateResponseMessageId:x,processorStates:y,abortSignal:d}=Z,u=(Y0,Z0)=>{throw new u6(Y0||`Tripwire triggered by ${$.id}`,Z0,$.id)},b=v,g=v,p=x?()=>{return g=x(),g}:void 0,h={text:"",usage:{inputTokens:0,outputTokens:0,totalTokens:0},finishReason:"unknown",steps:[]},n=()=>{switch(H){case"input":return{messages:z??[],...L?{systemMessages:L}:{},...R!==void 0?{retryCount:R}:{}};case"inputStep":{let Y0=pO(q),Z0=GD(_),F0=cO(P,_),D0=dO(w,_);return{messages:z??[],...L?{systemMessages:L}:{},...F!==void 0?{stepNumber:F}:{},...g?{messageId:g}:{},...R!==void 0?{retryCount:R}:{},...Y0?{model:Y0}:{},...Z0?{tools:Z0}:{},...F0?{toolChoice:F0}:{},...D0?{activeTools:D0}:{}}}case"outputResult":{let Y0=$80(B??h);return{messages:z??[],...Y0?{result:Y0}:{},...R!==void 0?{retryCount:R}:{}}}case"outputStep":return{messages:z??[],...L?{systemMessages:L}:{},...F!==void 0?{stepNumber:F}:{},...O!==void 0?{finishReason:O}:{},...M!==void 0?{text:M}:{},...E!==void 0?{toolCalls:E}:{},...R!==void 0?{retryCount:R}:{}};default:return}},t=(Y0)=>{if(Y0===null||typeof Y0!=="object"||Array.isArray(Y0))return Y0;let Z0=Y0;switch(H){case"input":return{...Array.isArray(Z0.messages)&&!Kj(z,Z0.messages)?{messages:Z0.messages}:{},...Array.isArray(Z0.systemMessages)&&!Kj(L,Z0.systemMessages)?{systemMessages:Z0.systemMessages}:{}};case"inputStep":{let F0={};if(Array.isArray(Z0.messages)&&!Kj(z,Z0.messages))F0.messages=Z0.messages;if(Array.isArray(Z0.systemMessages)&&!Kj(L,Z0.systemMessages))F0.systemMessages=Z0.systemMessages;if(Z0.messageId!==void 0&&Z0.messageId!==b)F0.messageId=Z0.messageId;if(Z0.model!==void 0&&Z0.model!==q){let D0=pO(Z0.model);if(D0)F0.model=D0}if(Z0.tools!==void 0&&Z0.tools!==_){let D0=GD(Z0.tools);if(D0)F0.tools=D0}if(Z0.toolChoice!==void 0&&Z0.toolChoice!==P){let D0=cO(Z0.toolChoice,Z0.tools??_);if(D0)F0.toolChoice=D0}if(Z0.activeTools!==void 0&&Z0.activeTools!==w){let D0=dO(Z0.activeTools,Z0.tools??_);if(D0)F0.activeTools=D0}if(Z0.retryCount!==void 0&&Z0.retryCount!==R)F0.retryCount=Z0.retryCount;return F0}case"outputResult":case"outputStep":return{...Array.isArray(Z0.messages)&&!Kj(z,Z0.messages)?{messages:Z0.messages}:{},...Array.isArray(Z0.systemMessages)&&!Kj(L,Z0.systemMessages)?{systemMessages:Z0.systemMessages}:{}};default:return}};if(!G(H))return Z;let s=K.tracingContext?.currentSpan,K0=H==="inputStep"||H==="outputStep"?s?.findParent("model_step")||s:s?.findParent("agent_run")||s,X0=H!=="outputStream"?K0?.createChildSpan({type:"processor_run",name:`${X(H)}: ${$.id}`,entityType:Y(H),entityId:$.id,entityName:$.name??$.id,input:n(),attributes:{processorExecutor:"workflow",processorIndex:$.processorIndex}}):void 0,a=g4(X0?{currentSpan:X0}:K.tracingContext),Q0;if(y){let Y0=y.get($.id);if(!Y0)Y0=new JD,y.set($.id,Y0);Q0=Y0.customState}else Q0=A??{};let e={abort:u,retryCount:R??0,requestContext:Q,...a,state:Q0,abortSignal:d,messageId:g,rotateResponseMessageId:p},m={phase:H,messageList:V??(Array.isArray(z)?new l6().add(z,"input").addSystem(L??[]):void 0),stepNumber:F,systemMessages:L,streamParts:D,state:Q0,processorStates:y,result:B,finishReason:O,toolCalls:E,text:M,retryCount:R,model:q,tools:_,toolChoice:P,activeTools:w,providerOptions:j,modelSettings:C,structuredOutput:k,steps:S,usage:I,messageId:g,rotateResponseMessageId:p};return(async(Y0)=>{try{let Z0=await DQ({span:X0,fn:Y0});return X0?.end({output:t(Z0)}),Z0}catch(Z0){if(Z0 instanceof u6)X0?.end({output:{tripwire:Z0.message}});else X0?.error({error:Z0,endSpan:!0});throw Z0}})(async()=>{switch(H){case"input":{if($.processInput){if(!m.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_MISSING_MESSAGE_LIST",text:`Processor ${$.id} requires messageList or messages for processInput phase`});let Y0=z.map((D0)=>D0.id),Z0=m.messageList.makeMessageSourceChecker(),F0=await $.processInput({...e,messages:z,messageList:m.messageList,systemMessages:L??[]});if(F0 instanceof l6){if(F0!==m.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${$.id} returned a MessageList instance other than the one passed in. Use the messageList argument instead.`});return{...m,messages:F0.get.all.db(),systemMessages:F0.getAllSystemMessages()}}else if(Array.isArray(F0))return V5.applyMessagesToMessageList(F0,m.messageList,Y0,Z0,"input"),{...m,messages:F0};else if(F0&&"messages"in F0&&"systemMessages"in F0){let D0=F0;return V5.applyMessagesToMessageList(D0.messages,m.messageList,Y0,Z0,"input"),m.messageList.replaceAllSystemMessages(D0.systemMessages),{...m,messages:D0.messages,systemMessages:D0.systemMessages}}return{...m,messages:z}}return{...m,messages:z}}case"inputStep":{if($.processInputStep){if(!m.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_MISSING_MESSAGE_LIST",text:`Processor ${$.id} requires messageList or messages for processInputStep phase`});let Y0=z.map((O0)=>O0.id),Z0=m.messageList.makeMessageSourceChecker(),F0=await $.processInputStep({...e,messages:z,messageList:m.messageList,stepNumber:F??0,systemMessages:L??[],model:q,tools:_,toolChoice:P,activeTools:w,providerOptions:j,modelSettings:C,structuredOutput:k,steps:S??[],messageId:g,rotateResponseMessageId:p}),D0=await V5.validateAndFormatProcessInputStepResult(F0,{messageList:m.messageList,processor:$,stepNumber:F??0});if(D0.messages)V5.applyMessagesToMessageList(D0.messages,m.messageList,Y0,Z0);if(D0.systemMessages)m.messageList.replaceAllSystemMessages(D0.systemMessages);return{...m,messages:z,...D0,...g?{messageId:D0.messageId??g}:{}}}return{...m,messages:z}}case"outputStream":{if($.processOutputStream&&N){let Y0=`__outputStreamSpan_${$.id}`,Z0=Q0,F0=Z0[Y0];if(!F0&&K0)F0=K0.createChildSpan({type:"processor_run",name:`output stream processor: ${$.id}`,entityType:J6.OUTPUT_PROCESSOR,entityId:$.id,entityName:$.name??$.id,attributes:{processorExecutor:"workflow",processorIndex:$.processorIndex}}),Z0[Y0]=F0;let D0=g4(F0?{currentSpan:F0}:e.tracingContext),O0;try{if(O0=await $.processOutputStream({...e,...D0,part:N,streamParts:D??[],state:Z0,messageList:m.messageList}),N&&N.type==="finish")F0?.end({output:{totalChunks:(D??[]).length}}),delete Z0[Y0]}catch(R0){if(R0 instanceof u6)F0?.end({output:{tripwire:R0.message}});else F0?.error({error:R0,endSpan:!0});throw delete Z0[Y0],R0}return{...m,state:Z0,part:O0}}return{...m,part:N}}case"outputResult":{if($.processOutputResult){if(!m.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_MISSING_MESSAGE_LIST",text:`Processor ${$.id} requires messageList or messages for processOutputResult phase`});let Y0=z.map((O0)=>O0.id),Z0=m.messageList.makeMessageSourceChecker(),F0={text:"",usage:{inputTokens:0,outputTokens:0,totalTokens:0},finishReason:"unknown",steps:[]},D0=await $.processOutputResult({...e,messages:z,messageList:m.messageList,result:m.result??F0});if(D0 instanceof l6){if(D0!==m.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${$.id} returned a MessageList instance other than the one passed in. Use the messageList argument instead.`});return{...m,messages:D0.get.all.db(),systemMessages:D0.getAllSystemMessages()}}else if(Array.isArray(D0))return V5.applyMessagesToMessageList(D0,m.messageList,Y0,Z0,"response"),{...m,messages:D0};else if(D0&&"messages"in D0&&"systemMessages"in D0){let O0=D0;return V5.applyMessagesToMessageList(O0.messages,m.messageList,Y0,Z0,"response"),m.messageList.replaceAllSystemMessages(O0.systemMessages),{...m,messages:O0.messages,systemMessages:O0.systemMessages}}return{...m,messages:z}}return{...m,messages:z}}case"outputStep":{if($.processOutputStep){if(!m.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_MISSING_MESSAGE_LIST",text:`Processor ${$.id} requires messageList or messages for processOutputStep phase`});let Y0=z.map((O0)=>O0.id),Z0=m.messageList.makeMessageSourceChecker(),F0={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},D0=await $.processOutputStep({...e,messages:z,messageList:m.messageList,stepNumber:F??0,finishReason:O,toolCalls:E,text:M,usage:I??F0,systemMessages:L??[],steps:S??[]});if(D0 instanceof l6){if(D0!==m.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${$.id} returned a MessageList instance other than the one passed in. Use the messageList argument instead.`});return{...m,messages:D0.get.all.db(),systemMessages:D0.getAllSystemMessages()}}else if(Array.isArray(D0))return V5.applyMessagesToMessageList(D0,m.messageList,Y0,Z0,"response"),{...m,messages:D0};else if(D0&&"messages"in D0&&"systemMessages"in D0){let O0=D0;return V5.applyMessagesToMessageList(O0.messages,m.messageList,Y0,Z0,"response"),m.messageList.replaceAllSystemMessages(O0.systemMessages),{...m,messages:O0.messages,systemMessages:O0.systemMessages}}return{...m,messages:z}}return{...m,messages:z}}default:return{...m,messages:z}}})},component:"PROCESSOR"}}function s60($){if($.schedule){let G=Array.isArray($.schedule)?$.schedule:[$.schedule];if(Array.isArray($.schedule)){let J=new Set;for(let Q of G){if(!Q.id)throw Error(`Workflow "${$.id}" declares an array of schedules but one entry is missing the required \`id\` field. Every entry in a schedule array must have a unique stable id.`);if(J.has(Q.id))throw Error(`Workflow "${$.id}" declares duplicate schedule id "${Q.id}".`);J.add(Q.id)}}for(let J of G)lI8(J.cron,J.timezone)}let Y=new XC8({mastra:$.mastra}),X=new VC8({mastra:$.mastra,eventProcessor:Y,options:{validateInputs:$.options?.validateInputs??!0,shouldPersistSnapshot:$.options?.shouldPersistSnapshot??(()=>!0),tracingPolicy:$.options?.tracingPolicy,onFinish:$.options?.onFinish,onError:$.options?.onError}});return new o60({...$,executionEngine:X})}function J04($){if(!$||typeof $!=="object")return!1;if($ instanceof o60)return!0;if("component"in $&&$.component==="WORKFLOW")return!0;return!1}function Q04($,{workflowId:Y,executionPath:X,parentWorkflow:G}){let J=null;if(G){let K=Q04($,G);if(!K)return null;J=K}J=J??($.__hasInternalWorkflow(Y)?$.__getInternalWorkflow(Y):$.getWorkflow(Y));let W=J.stepGraph[X[0]];if(W?.type==="parallel"||W?.type==="conditional")W=W.steps[X[1]];if(W?.type==="step"||W?.type==="loop"){if(J04(W.step))return W.step;return null}if(W?.type==="foreach"){if(J04(W.step))return W.step;return null}return null}function dz($,Y){let X=0,J=$.stepGraph[Y[0]];if(J?.type==="parallel"||J?.type==="conditional")J=J.steps[Y[1]],X++;else if(J?.type==="foreach")return J.step;if(!(J?.type==="step"||J?.type==="loop"))return null;if(J instanceof o60)return dz(J,Y.slice(X+1));return J.step}function zv0($){return $.type==="step"||$.type==="loop"||$.type==="foreach"}var aI8=class{mastra;__registerMastra($){this.mastra=$}constructor({mastra:$}){this.mastra=$}},sI8,XC8,o60,zC8,VC8;var W04=V0(()=>{Uj();EI0();Fv0();i40();A_();VO();n_();TO();hz();p2();kh();$g();OW();qL();WQ0();O1();sI8=class extends u8{mastra;constructor({mastra:$}){super({name:"StepExecutor",component:VZ.WORKFLOW});this.mastra=$}__registerMastra($){this.mastra=$;let Y=$?.getLogger();if(Y)this.__setLogger(Y)}createOutputWriter($){return async(Y)=>{try{if(this.mastra?.pubsub)await this.mastra.pubsub.publish(`workflow.events.v2.${$}`,{type:"watch",runId:$,data:Y})}catch(X){this.logger.debug("Failed to publish workflow watch event",{runId:$,error:X})}}}async execute($){let{step:Y,stepResults:X,runId:G,requestContext:J,retryCount:Q=0,perStep:W}=$,K=$.abortController??new AbortController,Z,H,z=Date.now(),{inputData:V,validationError:F}=await X80({prevOutput:typeof $.foreachIdx==="number"?$.input?.[$.foreachIdx]:$.input,step:Y,validateInputs:$.validateInputs??!0}),L={...X[Y.id],startedAt:z,payload:(typeof $.foreachIdx==="number"?$.input:V)??{}};if($.resumeData){if(L.resumePayload=$.resumeData,L.resumedAt=Date.now(),L.suspendPayload&&"__workflow_meta"in L.suspendPayload){let{__workflow_meta:A,...B}=L.suspendPayload;L.suspendPayload=B}}let N=$.stepResults[Y.id]?.status==="suspended"?$.stepResults[Y.id]?.suspendPayload:void 0;if(N&&"__workflow_meta"in N){let{__workflow_meta:A,...B}=N;N=B}let D;try{if(F)throw F;let A=XD(),B=this.createOutputWriter(G),O=await DQ({span:$.tracingContext?.currentSpan,fn:()=>Y.execute(lz({workflowId:$.workflowId,runId:G,mastra:this.mastra,requestContext:J,inputData:V,state:$.state,setState:async(P)=>{D={...D??$.state,...P}},retryCount:Q,resumeData:$.resumeData,suspendData:N,getInitData:()=>X?.input,getStepResult:a2.bind(this,X),suspend:async(P,w)=>{let{suspendData:j,validationError:C}=await J80({suspendData:P,step:Y,validateInputs:$.validateInputs??!0});if(C)throw C;let k={};if(w?.resumeLabel){let S=Array.isArray(w.resumeLabel)?w.resumeLabel:[w.resumeLabel];for(let I of S)k[I]={stepId:Y.id,foreachIndex:$.foreachIdx}}Z={payload:{...j,__workflow_meta:{runId:G,path:[Y.id],foreachIndex:$.foreachIdx,resumeLabels:Object.keys(k).length>0?k:void 0}}}},bail:(P)=>{H={payload:P}},writer:new PW({prefix:"workflow-step",callId:A,name:Y.id,runId:G},B),abort:()=>{K?.abort()},[VQ]:this.mastra.pubsub,[EW]:$.format,engine:{},abortSignal:K?.signal,...g4($.tracingContext)},{paramName:"runCount",deprecationMessage:cz,logger:this.logger}))}),M=Y.component==="WORKFLOW"&&W,R=Date.now(),q=D??$.state,_;if(Z){if(_={...L,status:"suspended",suspendedAt:R,...O?{suspendOutput:O}:{},__state:q},Z.payload)_.suspendPayload=Z.payload}else if(H)_={...L,status:"bailed",endedAt:R,output:H.payload,__state:q};else if(M)_={...L,status:"paused",__state:q};else _={...L,status:"success",endedAt:R,output:O,__state:q};return _}catch(A){let B=Date.now(),O=XG(A,{serializeStack:!1,fallbackMessage:"Unknown step execution error"}),E=$.step.id,M=new G0({id:"WORKFLOW_STEP_INVOKE_FAILED",domain:"MASTRA_WORKFLOW",category:"USER",details:{workflowId:$.workflowId,runId:$.runId,stepId:E}},O);return this.logger?.trackException(M),this.logger?.error(`Error executing step ${E}: `+O?.stack),{...L,status:"failed",endedAt:B,error:O,tripwire:A instanceof u6?{reason:A.message,retry:A.options?.retry,metadata:A.options?.metadata,processorId:A.processorId}:void 0}}}async evaluateConditions($){let{step:Y,stepResults:X,runId:G,requestContext:J,retryCount:Q=0}=$,W=$.abortController??new AbortController;return(await Promise.all(Y.conditions.map((H)=>{try{return this.evaluateCondition({workflowId:$.workflowId,condition:H,runId:G,requestContext:J,inputData:$.input,state:$.state,retryCount:Q,resumeData:$.resumeData,abortController:W,stepResults:X,iterationCount:0})}catch(z){return this.mastra?.getLogger()?.error("error evaluating condition",z),!1}}))).reduce((H,z,V)=>{if(z)H.push(V);return H},[])}async evaluateCondition({workflowId:$,condition:Y,runId:X,inputData:G,resumeData:J,stepResults:Q,state:W,requestContext:K,abortController:Z,retryCount:H=0,iterationCount:z}){let V=XD(),F=this.createOutputWriter(X);return Y(lz({workflowId:$,runId:X,mastra:this.mastra,requestContext:K,inputData:G,state:W,retryCount:H,resumeData:J,getInitData:()=>Q?.input,getStepResult:a2.bind(this,Q),bail:(L)=>{throw Error("Not implemented")},writer:new PW({prefix:"workflow-step",callId:V,name:"condition",runId:X},F),abort:()=>{Z?.abort()},[VQ]:this.mastra.pubsub,[EW]:void 0,engine:{},abortSignal:Z?.signal,...g4(),iterationCount:z},{paramName:"runCount",deprecationMessage:cz,logger:this.logger}))}async resolveSleep($){let{step:Y,stepResults:X,runId:G,requestContext:J,retryCount:Q=0}=$,W=$.state??X?.__state??{},K=$.abortController??new AbortController;if(Y.duration)return Y.duration;if(!Y.fn)return 0;try{let Z=XD(),H=this.createOutputWriter(G);return await Y.fn(lz({workflowId:$.workflowId,runId:G,mastra:this.mastra,requestContext:J,inputData:$.input,state:W,setState:async(z)=>{Object.assign(W,z)},retryCount:Q,resumeData:$.resumeData,getInitData:()=>X?.input,getStepResult:a2.bind(this,X),suspend:async(z)=>{throw Error("Not implemented")},bail:(z)=>{throw Error("Not implemented")},abort:()=>{K?.abort()},writer:new PW({prefix:"workflow-step",callId:Z,name:Y.id,runId:G},H),[VQ]:this.mastra.pubsub,[EW]:void 0,engine:{},abortSignal:K?.signal,...g4()},{paramName:"runCount",deprecationMessage:cz,logger:this.logger}))}catch(Z){return this.mastra?.getLogger()?.error("error evaluating condition",Z),0}}async resolveSleepUntil($){let{step:Y,stepResults:X,runId:G,requestContext:J,retryCount:Q=0}=$,W=$.state??X?.__state??{},K=$.abortController??new AbortController;if(Y.date)return Y.date.getTime()-Date.now();if(!Y.fn)return 0;try{let Z=XD(),H=this.createOutputWriter(G);return(await Y.fn(lz({workflowId:$.workflowId,runId:G,mastra:this.mastra,requestContext:J,inputData:$.input,state:W,setState:async(V)=>{Object.assign(W,V)},retryCount:Q,resumeData:$.resumeData,getInitData:()=>X?.input,getStepResult:a2.bind(this,X),suspend:async(V)=>{throw Error("Not implemented")},bail:(V)=>{throw Error("Not implemented")},abort:()=>{K?.abort()},writer:new PW({prefix:"workflow-step",callId:Z,name:Y.id,runId:G},H),[VQ]:this.mastra.pubsub,[EW]:void 0,engine:{},abortSignal:K?.signal,...g4()},{paramName:"runCount",deprecationMessage:cz,logger:this.logger}))).getTime()-Date.now()}catch(Z){return this.mastra?.getLogger()?.error("error evaluating condition",Z),0}}};XC8=class extends aI8{stepExecutor;stepExecutionStrategy;abortControllers=new Map;parentChildRelationships=new Map;runFormats=new Map;constructor({mastra:$,stepExecutionStrategy:Y}){super({mastra:$});this.stepExecutor=new sI8({mastra:$}),this.stepExecutionStrategy=Y}getOrCreateAbortController($){let Y=this.abortControllers.get($);if(!Y)Y=new AbortController,this.abortControllers.set($,Y);return Y}cancelRunAndChildren($){let Y=this.abortControllers.get($);if(Y)Y.abort();for(let[X,G]of this.parentChildRelationships.entries())if(G===$)this.cancelRunAndChildren(X)}cleanupRun($){this.abortControllers.delete($),this.parentChildRelationships.delete($),this.runFormats.delete($);for(let[Y,X]of this.parentChildRelationships.entries())if(X===$)this.parentChildRelationships.delete(Y)}__registerMastra($){super.__registerMastra($),this.stepExecutor.__registerMastra($)}#$($){try{return this.mastra.getWorkflowById($)}catch{return}}async errorWorkflow({parentWorkflow:$,workflowId:Y,runId:X,resumeSteps:G,stepResults:J,resumeData:Q,requestContext:W},K){await this.mastra.pubsub.publish("workflows",{type:"workflow.fail",runId:X,data:{workflowId:Y,runId:X,executionPath:[],resumeSteps:G,stepResults:J,prevResult:{status:"failed",error:XG(K).toJSON()},requestContext:W,resumeData:Q,activeStepsPath:{},parentWorkflow:$}})}async processWorkflowCancel({workflowId:$,runId:Y,prevResult:X,...G}){if(this.cancelRunAndChildren(Y),!await(await this.mastra.getStorage()?.getStore("workflows"))?.loadWorkflowSnapshot({workflowName:$,runId:Y}))this.mastra.getLogger()?.warn("Canceling workflow without loaded state",{workflowId:$,runId:Y});await this.endWorkflow({workflowId:$,runId:Y,prevResult:X,...G},"canceled")}async processWorkflowStart({workflow:$,parentWorkflow:Y,workflowId:X,runId:G,resumeSteps:J,prevResult:Q,resumeData:W,timeTravel:K,restart:Z,executionPath:H,stepResults:z,requestContext:V,perStep:F,format:L,state:N,outputOptions:D,forEachIndex:A}){let B=arguments[0].initialState??N??{},O=L??this.runFormats.get(G);if(this.runFormats.set(G,O),this.getOrCreateAbortController(G),Y?.runId)this.parentChildRelationships.set(G,Y.runId);let E=await this.mastra.getStorage()?.getStore("workflows"),R=(await E?.getWorkflowRunById({runId:G,workflowName:$.id}))?.resourceId;if($?.options?.shouldPersistSnapshot?.({stepResults:z??{},workflowStatus:"running"})??!0){if(await E?.persistWorkflowSnapshot({workflowName:$.id,runId:G,resourceId:R,snapshot:{activePaths:[],suspendedPaths:{},resumeLabels:{},waitingPaths:{},activeStepsPath:{},serializedStepGraph:$.serializedStepGraph,timestamp:Date.now(),runId:G,context:{...z??{input:Q?.status==="success"?Q.output:void 0},__state:B},status:"running",value:B}}),Y){let P=(await E?.loadWorkflowSnapshot({workflowName:Y.workflowId,runId:Y.runId}))?.context?.[X];await E?.updateWorkflowResults({workflowName:Y.workflowId,runId:Y.runId,stepId:X,result:{startedAt:P?.startedAt??Date.now(),status:"running",payload:P?.payload??Y.input?.output??{},...P??{},metadata:{...P?.metadata??{},nestedRunId:G}},requestContext:V})}}await this.mastra.pubsub.publish("workflows",{type:"workflow.step.run",runId:G,data:{parentWorkflow:Y,workflowId:X,runId:G,executionPath:H??[0],resumeSteps:J,stepResults:{...z??{input:Q?.status==="success"?Q.output:void 0},__state:B},prevResult:Q,timeTravel:K,restart:Z,requestContext:V,resumeData:W,activeStepsPath:{},perStep:F,state:B,outputOptions:D,forEachIndex:A}})}async endWorkflow($,Y="success"){let{workflowId:X,runId:G,prevResult:J,perStep:Q,workflow:W,stepResults:K,activeStepsPath:Z,executionPath:H}=$,z=await this.mastra.getStorage()?.getStore("workflows"),V=Q&&Y==="success"?"paused":Y;if(W?.options?.shouldPersistSnapshot?.({stepResults:K??{},workflowStatus:V})??!0)await z?.updateWorkflowState({workflowName:X,runId:G,opts:{status:V,result:J,activePaths:H,activeStepsPath:Z}});if(Q)await this.mastra.pubsub.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-paused",payload:{}}});await this.mastra.pubsub.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-finish",payload:{runId:G}}}),await this.mastra.pubsub.publish("workflows",{type:"workflow.end",runId:G,data:{...$,workflow:void 0}})}async processWorkflowEnd($){let{resumeSteps:Y,prevResult:X,resumeData:G,parentWorkflow:J,activeStepsPath:Q,requestContext:W,runId:K,timeTravel:Z,perStep:H,stepResults:z,state:V}=$,F=pz({stepResults:z,state:V});if(this.cleanupRun(K),J){let L=J.stepGraph[J.executionPath[0]];if(L?.type==="loop")await X04({workflowId:J.workflowId,prevResult:X,runId:J.runId,executionPath:J.executionPath,stepResults:J.stepResults,activeStepsPath:J.activeStepsPath,resumeSteps:J.resumeSteps,resumeData:J.resumeData,parentWorkflow:J.parentWorkflow,requestContext:W,retryCount:0},{pubsub:this.mastra.pubsub,stepExecutor:this.stepExecutor,step:L,stepResult:X});else await this.mastra.pubsub.publish("workflows",{type:"workflow.step.end",runId:J.runId,data:{workflowId:J.workflowId,runId:J.runId,executionPath:J.executionPath,resumeSteps:Y,stepResults:J.stepResults,prevResult:X,resumeData:G,activeStepsPath:Q,parentWorkflow:J.parentWorkflow,parentContext:J,requestContext:W,timeTravel:Z,perStep:H,state:F,nestedRunId:K}})}await this.mastra.pubsub.publish("workflows-finish",{type:"workflow.end",runId:K,data:{...$,workflow:void 0,state:F}})}async processWorkflowSuspend($){let{workflow:Y,executionPath:X,resumeSteps:G,prevResult:J,resumeData:Q,parentWorkflow:W,activeStepsPath:K,runId:Z,requestContext:H,timeTravel:z,restart:V,stepResults:F,state:L,outputOptions:N}=$,D=pz({stepResults:F,state:L});if(W){let A=J.suspendPayload?.__workflow_meta?.path??[],B=Y&&X?dz(Y,X)?.id:void 0,O=B&&A[0]!==B?[B,...A]:A;await this.mastra.pubsub.publish("workflows",{type:"workflow.step.end",runId:W.runId,data:{workflowId:W.workflowId,runId:W.runId,executionPath:W.executionPath,resumeSteps:G,stepResults:W.stepResults,prevResult:{...J,suspendPayload:{...J.suspendPayload,__workflow_meta:{...J.suspendPayload?.__workflow_meta??{},runId:Z,path:O}}},timeTravel:z,restart:V,resumeData:Q,activeStepsPath:K,requestContext:H,parentWorkflow:W.parentWorkflow,parentContext:W,state:D,outputOptions:N,nestedRunId:Z}})}await this.mastra.pubsub.publish("workflows-finish",{type:"workflow.suspend",runId:Z,data:{...$,workflow:void 0,state:D}})}async processWorkflowFail($){let{workflowId:Y,runId:X,resumeSteps:G,prevResult:J,resumeData:Q,parentWorkflow:W,activeStepsPath:K,requestContext:Z,timeTravel:H,restart:z,stepResults:V,state:F,outputOptions:L,workflow:N,executionPath:D}=$,A=pz({stepResults:V,state:F});this.cleanupRun(X);let B=await this.mastra.getStorage()?.getStore("workflows");if(N?.options?.shouldPersistSnapshot?.({stepResults:V??{},workflowStatus:"failed"})??!0)await B?.updateWorkflowState({workflowName:Y,runId:X,opts:{status:"failed",error:J.error,activePaths:D,activeStepsPath:K}});if(W)await this.mastra.pubsub.publish("workflows",{type:"workflow.step.end",runId:W.runId,data:{workflowId:W.workflowId,runId:W.runId,executionPath:W.executionPath,resumeSteps:G,stepResults:W.stepResults,prevResult:J,timeTravel:H,restart:z,resumeData:Q,activeStepsPath:K,requestContext:Z,parentWorkflow:W.parentWorkflow,parentContext:W,state:A,outputOptions:L,nestedRunId:X}});await this.mastra.pubsub.publish("workflows-finish",{type:"workflow.fail",runId:X,data:{...$,workflow:void 0,state:A}})}async processWorkflowStepRun({workflow:$,workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,timeTravel:K,restart:Z,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:F,retryCount:L=0,perStep:N,state:D,outputOptions:A,forEachIndex:B}){let O=this.runFormats.get(X),E=pz({stepResults:J,state:D}),M=$.stepGraph;if(!G?.length)return this.errorWorkflow({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:F},new G0({id:"MASTRA_WORKFLOW",text:`Execution path is empty: ${JSON.stringify(G)}`,domain:"MASTRA_WORKFLOW",category:"SYSTEM"}));let R=M[G[0]];if(!R){if(G[0]>=M.length)return this.endWorkflow({workflow:$,parentWorkflow:V,workflowId:Y,runId:X,executionPath:G,resumeSteps:W,stepResults:J,prevResult:H,activeStepsPath:Q,requestContext:F,state:E,outputOptions:A});return this.errorWorkflow({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:F},new G0({id:"MASTRA_WORKFLOW",text:`Step not found in step graph: ${JSON.stringify(G)}`,domain:"MASTRA_WORKFLOW",category:"SYSTEM"}))}if((R.type==="parallel"||R.type==="conditional")&&G.length>1&&(!Z||Z&&Z.isParallelOrConditionalRestarted))R=R.steps[G[1]];else if(R.type==="parallel")return oI8({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,restart:Z,timeTravel:K,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:F,perStep:N,state:E,outputOptions:A},{pubsub:this.mastra.pubsub,step:R});else if(R?.type==="conditional")return tI8({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,restart:Z,timeTravel:K,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:F,perStep:N,state:E,outputOptions:A},{pubsub:this.mastra.pubsub,stepExecutor:this.stepExecutor,step:R});else if(R?.type==="sleep")return $C8({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,timeTravel:K,restart:Z,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:F,perStep:N},{pubsub:this.mastra.pubsub,stepExecutor:this.stepExecutor,step:R});else if(R?.type==="sleepUntil")return YC8({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,timeTravel:K,restart:Z,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:F,perStep:N},{pubsub:this.mastra.pubsub,stepExecutor:this.stepExecutor,step:R});else if(R?.type==="foreach"&&G.length===1)return Hv0({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,timeTravel:K,restart:Z,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:F,perStep:N,state:E,outputOptions:A,forEachIndex:B},{pubsub:this.mastra.pubsub,mastra:this.mastra,step:R});if(!zv0(R))return this.errorWorkflow({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:F},new G0({id:"MASTRA_WORKFLOW",text:`Step is not executable: ${R?.type} -- ${JSON.stringify(G)}`,domain:"MASTRA_WORKFLOW",category:"SYSTEM"}));Q[R.step.id]=G;let q=await this.mastra?.getStorage()?.getStore("workflows");if(R.step instanceof o60||R.step.component==="WORKFLOW"){if(W?.length===1&&W[0]===R.step.id){let v=J[R.step.id]?.suspendPayload?.__workflow_meta?.runId;if(!v)return this.errorWorkflow({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:F},new G0({id:"MASTRA_WORKFLOW",text:`Nested workflow run id not found for auto-detection: ${JSON.stringify(J)}`,domain:"MASTRA_WORKFLOW",category:"SYSTEM"}));let x=await q?.loadWorkflowSnapshot({workflowName:R.step.id,runId:v}),y=Object.keys(x?.suspendedPaths??{})?.[0];if(!y)return this.errorWorkflow({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:F},new G0({id:"MASTRA_WORKFLOW",text:`No suspended step found in nested workflow: ${R.step.id}`,domain:"MASTRA_WORKFLOW",category:"SYSTEM"}));let d=x?.suspendedPaths?.[y],u=x?.context,b={status:"success",output:u?.[y]?.payload??H?.output};await this.mastra.pubsub.publish("workflows",{type:"workflow.resume",runId:X,data:{workflowId:R.step.id,parentWorkflow:{stepId:R.step.id,workflowId:Y,runId:X,stepGraph:M,executionPath:G,resumeSteps:W,stepResults:J,input:H,parentWorkflow:V,activeStepsPath:Q,resumeData:z},executionPath:d,runId:v,resumeSteps:[y],stepResults:u,prevResult:b,resumeData:z,activeStepsPath:Q,requestContext:F,perStep:N,initialState:E,state:E,outputOptions:A}})}else if(W?.length>1&&W[0]===R.step.id){let v=J[R.step.id]?.suspendPayload?.__workflow_meta?.runId;if(!v)return this.errorWorkflow({workflowId:Y,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,prevResult:H,resumeData:z,parentWorkflow:V,requestContext:F},new G0({id:"MASTRA_WORKFLOW",text:`Nested workflow run id not found: ${JSON.stringify(J)}`,domain:"MASTRA_WORKFLOW",category:"SYSTEM"}));let x=await q?.loadWorkflowSnapshot({workflowName:R.step.id,runId:v}),y=x?.context,d=W.slice(1),u={status:"success",output:y?.[d[0]]?.payload??H?.output};await this.mastra.pubsub.publish("workflows",{type:"workflow.resume",runId:X,data:{workflowId:R.step.id,parentWorkflow:{stepId:R.step.id,workflowId:Y,runId:X,stepGraph:M,executionPath:G,resumeSteps:W,stepResults:J,input:H,parentWorkflow:V,activeStepsPath:Q,resumeData:z},executionPath:x?.suspendedPaths?.[d[0]],runId:v,resumeSteps:d,stepResults:y,prevResult:u,resumeData:z,activeStepsPath:Q,requestContext:F,perStep:N,initialState:E,state:E,outputOptions:A}})}else if(K&&K.steps?.length>1&&K.steps[0]===R.step.id){let I=J[R.step.id]?.metadata?.nestedRunId??XD(),v=await q?.loadWorkflowSnapshot({workflowName:R.step.id,runId:I})??{context:{}},x=R.step,y=Q80({steps:K.steps.slice(1),inputData:K.inputData,resumeData:K.resumeData,context:K.nestedStepResults?.[R.step.id]??{},nestedStepsContext:K.nestedStepResults??{},snapshot:v,graph:x.buildExecutionGraph(),perStep:N}),d=dz(x,y.executionPath),u=y.stepResults[d?.id??"input"];await this.mastra.pubsub.publish("workflows",{type:"workflow.start",runId:X,data:{workflowId:R.step.id,parentWorkflow:{stepId:R.step.id,workflowId:Y,runId:X,stepGraph:M,executionPath:G,resumeSteps:W,stepResults:J,timeTravel:K,input:H,parentWorkflow:V,activeStepsPath:Q,resumeData:z},executionPath:y.executionPath,runId:I,stepResults:y.stepResults,prevResult:{status:"success",output:u?.payload},timeTravel:y,activeStepsPath:Q,requestContext:F,perStep:N,initialState:E,state:E,outputOptions:A}})}else if(Z&&!!Z.activeStepsPath?.[R.step.id]){let I=J[R.step.id]?.metadata?.nestedRunId??XD(),v=await q?.loadWorkflowSnapshot({workflowName:R.step.id,runId:I})??{context:{}},x=R.step,y=W80({snapshot:v,graph:x.buildExecutionGraph()}),d=dz(x,v.activePaths),u=y.stepResults[d?.id??"input"];await this.mastra.pubsub.publish("workflows",{type:"workflow.start",runId:X,data:{workflowId:R.step.id,parentWorkflow:{stepId:R.step.id,workflowId:Y,runId:X,stepGraph:M,executionPath:G,resumeSteps:W,stepResults:J,restart:Z,input:H,parentWorkflow:V,activeStepsPath:Q,resumeData:z},executionPath:y.activePaths,runId:I,stepResults:y.stepResults,prevResult:{status:"success",output:u?.payload},restart:y,activeStepsPath:y.activeStepsPath,requestContext:F,perStep:N,initialState:y.state,state:y.state,outputOptions:A}})}else await this.mastra.pubsub.publish("workflows",{type:"workflow.start",runId:X,data:{workflowId:R.step.id,parentWorkflow:{stepId:R.step.id,workflowId:Y,stepGraph:M,runId:X,executionPath:G,resumeSteps:W,stepResults:J,input:H,parentWorkflow:V,activeStepsPath:Q,resumeData:z},executionPath:[0],runId:XD(),resumeSteps:W,prevResult:H,resumeData:z,activeStepsPath:Q,requestContext:F,perStep:N,initialState:E,state:E,outputOptions:A}});return}if(R.type==="step")await this.mastra.pubsub.publish(`workflow.events.v2.${X}`,{type:"watch",runId:X,data:{type:"workflow-step-start",payload:{id:R.step.id,startedAt:Date.now(),payload:H.status==="success"?H.output:void 0,status:"running"}}});new cI8().on("watch",async(I)=>{await this.mastra.pubsub.publish(`workflow.events.v2.${X}`,{type:"watch",runId:X,data:I})});let P=new p1;for(let[I,v]of Object.entries(F))P.set(I,v);let{resumeData:w,validationError:j}=await G80({resumeData:K?.stepResults[R.step.id]?.status==="suspended"?K?.resumeData:void 0,step:R.step}),C;if(w&&!j)C=w;else if(w&&j)this.mastra.getLogger()?.warn("Time travel resume data validation failed",{stepId:R.step.id,error:j.message});else if(W?.length>0&&W?.[0]===R.step.id)C=z;let k=this.getOrCreateAbortController(X),S;if(this.stepExecutionStrategy)S=await this.stepExecutionStrategy.executeStep({workflowId:Y,runId:X,stepId:R.step.id,executionPath:G,stepResults:J,state:E,requestContext:Object.fromEntries(P.entries()),input:H?.output,resumeData:C,retryCount:L,foreachIdx:R.type==="foreach"?G[1]:void 0,format:O,perStep:N,validateInputs:$.options.validateInputs,abortSignal:k.signal});else S=await this.stepExecutor.execute({workflowId:Y,step:R.step,runId:X,stepResults:J,state:E,requestContext:P,input:H?.output,resumeData:C,retryCount:L,foreachIdx:R.type==="foreach"?G[1]:void 0,validateInputs:$.options.validateInputs,abortController:k,format:O,perStep:N});if(F=Object.fromEntries(P.entries()),k?.signal?.aborted){let I=S.__state??E;return this.mastra.pubsub.publish("workflows",{type:"workflow.cancel",runId:X,data:{parentWorkflow:V,workflowId:Y,runId:X,executionPath:G,resumeSteps:W,timeTravel:K,stepResults:{...J,[R.step.id]:S,__state:I},prevResult:{...S,status:"canceled"},activeStepsPath:Q,requestContext:F,perStep:N,state:I,outputOptions:A}})}if(S.status==="bailed"){S.status="success",await this.endWorkflow({workflow:$,resumeData:z,parentWorkflow:V,workflowId:Y,runId:X,executionPath:G,resumeSteps:W,stepResults:{...J,[R.step.id]:S},prevResult:S,activeStepsPath:Q,requestContext:F,perStep:N,state:E,outputOptions:A});return}if(S.status==="failed"){let I=R.step.retries??$.retryConfig.attempts??0;if(L>=I)await this.mastra.pubsub.publish("workflows",{type:"workflow.step.end",runId:X,data:{parentWorkflow:V,workflowId:Y,runId:X,executionPath:G,resumeSteps:W,stepResults:J,prevResult:S,activeStepsPath:Q,requestContext:F,state:E,outputOptions:A}});else return this.mastra.pubsub.publish("workflows",{type:"workflow.step.run",runId:X,data:{parentWorkflow:V,workflowId:Y,runId:X,executionPath:G,resumeSteps:W,stepResults:J,timeTravel:K,restart:Z,prevResult:H,activeStepsPath:Q,requestContext:F,retryCount:L+1,state:E,outputOptions:A}})}if(R.type==="loop"&&S.status==="suspended"){let I=S.__state??E;await this.mastra.pubsub.publish("workflows",{type:"workflow.step.end",runId:X,data:{parentWorkflow:V,workflowId:Y,runId:X,executionPath:G,resumeSteps:W,timeTravel:K,restart:Z,stepResults:{...J,[R.step.id]:S,__state:I},prevResult:S,activeStepsPath:Q,requestContext:F,perStep:N,state:I,outputOptions:A}});return}if(R.type==="loop")await X04({workflowId:Y,prevResult:S,runId:X,executionPath:G,stepResults:J,activeStepsPath:Q,resumeSteps:W,resumeData:z,parentWorkflow:V,requestContext:F,retryCount:L+1},{pubsub:this.mastra.pubsub,stepExecutor:this.stepExecutor,step:R,stepResult:S});else{let I=S.__state??E;await this.mastra.pubsub.publish("workflows",{type:"workflow.step.end",runId:X,data:{parentWorkflow:V,workflowId:Y,runId:X,executionPath:G,resumeSteps:W,timeTravel:K,restart:Z,stepResults:{...J,[R.step.id]:S,__state:I},prevResult:S,activeStepsPath:Q,requestContext:F,perStep:N,state:I,outputOptions:A,forEachIndex:B}})}}async aggregateBranchResults({workflow:$,workflowId:Y,runId:X,branchEntry:G,branchExecutionPath:J,latestBranchResult:Q,resumeSteps:W,timeTravel:K,restart:Z,parentWorkflow:H,stepResults:z,activeStepsPath:V,requestContext:F,state:L,outputOptions:N}){let D=pz({stepResults:z,state:L}),A=J[0],B=J.length>1?J[1]:void 0,O=0,E=0,M={},R={},q={};if(G.steps.forEach((P,w)=>{if(!zv0(P))return;let j=z?.[P.step.id];if(!j||!j.status)return;if(j.status==="success"){let C=w===B&&Q?.status==="success"?Q.output:j.output;M[P.step.id]=C}else if(j.status==="skipped")E++;else if(j.status==="suspended")O++,R[P.step.id]=[A,w],Object.assign(q,j.suspendPayload?.__workflow_meta?.resumeLabels??{})}),Object.keys(M).length+E+O<G.steps.length)return;if(O>0){let P=await this.mastra.getStorage()?.getStore("workflows");if($?.options?.shouldPersistSnapshot?.({stepResults:z??{},workflowStatus:"suspended"})??!0)await P?.updateWorkflowResults({workflowName:$.id,runId:X,stepId:"__state",result:D,requestContext:F}),await P?.updateWorkflowState({workflowName:Y,runId:X,opts:{status:"suspended",result:{status:"suspended"},suspendedPaths:R,resumeLabels:q}});await this.mastra.pubsub.publish("workflows",{type:"workflow.suspend",runId:X,data:{workflowId:Y,runId:X,executionPath:J,resumeSteps:W,parentWorkflow:H,stepResults:z,prevResult:{status:"suspended"},activeStepsPath:V,requestContext:F,timeTravel:K,restart:Z,state:D,outputOptions:N}});return}await this.mastra.pubsub.publish("workflows",{type:"workflow.step.end",runId:X,data:{parentWorkflow:H,workflowId:Y,runId:X,executionPath:J.slice(0,-1),resumeSteps:W,stepResults:z,prevResult:{status:"success",output:M},activeStepsPath:V,requestContext:F,timeTravel:K,restart:Z,state:D,outputOptions:N}})}async processWorkflowStepEnd({workflow:$,workflowId:Y,runId:X,executionPath:G,resumeSteps:J,timeTravel:Q,restart:W,prevResult:K,parentWorkflow:Z,stepResults:H,activeStepsPath:z,parentContext:V,requestContext:F,perStep:L,state:N,outputOptions:D,forEachIndex:A,nestedRunId:B}){let O=V?N??K?.__state??H?.__state??{}:K?.__state??H?.__state??N??{},{__state:E,...M}=K;K=M;let R=$.stepGraph[G[0]];if((R?.type==="parallel"||R?.type==="conditional")&&G.length>1)R=R.steps[G[1]];if(!R)return this.errorWorkflow({workflowId:Y,runId:X,executionPath:G,resumeSteps:J,prevResult:K,stepResults:H,activeStepsPath:z,requestContext:F},new G0({id:"MASTRA_WORKFLOW",text:`Step not found: ${JSON.stringify(G)}`,domain:"MASTRA_WORKFLOW",category:"SYSTEM"}));let q=await this.mastra.getStorage()?.getStore("workflows");if(R.type==="foreach"){let _=await q?.loadWorkflowSnapshot({workflowName:Y,runId:X}),P=G[1],w=_?.context?.[R.step.id],j=w?.output,C=w?.payload,k=K;if(P!==void 0){if(K.status==="bailed"){let v={status:"success",output:K.output,startedAt:w?.startedAt??Date.now(),endedAt:Date.now(),payload:C};return await q?.updateWorkflowResults({workflowName:$.id,runId:X,stepId:R.step.id,result:v,requestContext:F}),this.endWorkflow({workflow:$,parentWorkflow:Z,workflowId:Y,runId:X,executionPath:[G[0]],resumeSteps:J,stepResults:{...H,[R.step.id]:v},prevResult:v,activeStepsPath:z,requestContext:F,perStep:L,state:O,outputOptions:D})}let I=K.status==="suspended"?K:K.output;if(j)j[P]=I,k={...w,...K,output:j,payload:C,suspendPayload:w?.suspendPayload??K.suspendPayload,suspendedAt:w?.suspendedAt??K.suspendedAt,resumePayload:K.resumePayload??w?.resumePayload,resumedAt:K.resumedAt??w?.resumedAt};else k={...K,output:[I],payload:C}}let S=await q?.updateWorkflowResults({workflowName:$.id,runId:X,stepId:R.step.id,result:k,requestContext:F});if(!S)return;if(O)await q?.updateWorkflowResults({workflowName:$.id,runId:X,stepId:"__state",result:O,requestContext:F});if(H={...S,__state:O},P!==void 0){let I=H[R.step.id],v=I?.output??[],x=I?.payload?.length??0,y=v.filter((p)=>p===null).length,d=v.filter((p)=>p&&typeof p==="object"&&p.status==="suspended").length,u=v.length,b=v.filter((p)=>p!==null&&!(typeof p==="object"&&p.status==="suspended")).length,g=K.status==="suspended"?"suspended":K.status==="success"?"success":"failed";if(await this.mastra.pubsub.publish(`workflow.events.v2.${X}`,{type:"watch",runId:X,data:{type:"workflow-step-progress",payload:{id:R.step.id,completedCount:b,totalCount:x,currentIndex:P,iterationStatus:g,...K.status==="success"?{iterationOutput:K.output}:{}}}}),y>0)return;if(u<x){await Hv0({workflowId:Y,prevResult:{status:"success",output:I.payload},runId:X,executionPath:[G[0]],stepResults:H,activeStepsPath:z,resumeSteps:J,timeTravel:Q,restart:W,resumeData:void 0,parentWorkflow:Z,requestContext:F,perStep:L,state:O,outputOptions:D},{pubsub:this.mastra.pubsub,mastra:this.mastra,step:R});return}if(d>0){let p={},h={[R.step.id]:[G[0]]};for(let s=0;s<v.length;s++){let K0=v[s];if(K0&&typeof K0==="object"&&K0.status==="suspended"){if(K0.suspendPayload?.__workflow_meta?.resumeLabels)Object.assign(p,K0.suspendPayload.__workflow_meta.resumeLabels)}}let n={status:"suspended",output:v,payload:I.payload,suspendedAt:Date.now(),startedAt:I.startedAt,suspendPayload:{__workflow_meta:{path:G,resumeLabels:p}}};if(await q?.updateWorkflowResults({workflowName:$.id,runId:X,stepId:R.step.id,result:n,requestContext:F}),$?.options?.shouldPersistSnapshot?.({stepResults:H??{},workflowStatus:"suspended"})??!0)await q?.updateWorkflowResults({workflowName:$.id,runId:X,stepId:"__state",result:O,requestContext:F}),await q?.updateWorkflowState({workflowName:Y,runId:X,opts:{status:"suspended",result:n,suspendedPaths:h,resumeLabels:p,activePaths:G,activeStepsPath:z}});await this.mastra.pubsub.publish("workflows",{type:"workflow.suspend",runId:X,data:{workflowId:Y,runId:X,executionPath:[G[0]],resumeSteps:J,parentWorkflow:Z,stepResults:{...H,[R.step.id]:n},prevResult:n,activeStepsPath:z,requestContext:F,timeTravel:Q,restart:W,state:O,outputOptions:D}});return}await Hv0({workflowId:Y,prevResult:{status:"success",output:I.payload},runId:X,executionPath:[G[0]],stepResults:H,activeStepsPath:z,resumeSteps:J,timeTravel:Q,restart:W,resumeData:void 0,parentWorkflow:Z,requestContext:F,perStep:L,state:O,outputOptions:D},{pubsub:this.mastra.pubsub,mastra:this.mastra,step:R});return}}else if(zv0(R)){if(delete z[R.step.id],V)K=H[R.step.id]={...K,payload:V.input?.output??{},...B&&{metadata:{...K.metadata,nestedRunId:B}}};let _=await q?.updateWorkflowResults({workflowName:$.id,runId:X,stepId:R.step.id,result:K,requestContext:F});if(!_)return;H=_}if(H={...H,__state:O},!K?.status||K.status==="failed"){await this.mastra.pubsub.publish("workflows",{type:"workflow.fail",runId:X,data:{workflowId:Y,runId:X,executionPath:G,resumeSteps:J,parentWorkflow:Z,stepResults:H,timeTravel:Q,restart:W,prevResult:K,activeStepsPath:z,requestContext:F,state:O,outputOptions:D}});return}else if(K.status==="suspended"){await this.mastra.pubsub.publish(`workflow.events.v2.${X}`,{type:"watch",runId:X,data:{type:"workflow-step-suspended",payload:{id:R?.step?.id,...K,suspendedAt:Date.now(),suspendPayload:K.suspendPayload}}});let _=$.stepGraph[G[0]];if((_?.type==="parallel"||_?.type==="conditional")&&G.length>1){await this.aggregateBranchResults({workflow:$,workflowId:Y,runId:X,branchEntry:_,branchExecutionPath:G,latestBranchResult:K,resumeSteps:J,timeTravel:Q,restart:W,parentWorkflow:Z,stepResults:H,activeStepsPath:z,requestContext:F,state:O,outputOptions:D});return}let P={},w=dz($,G);if(w)P[w.id]=G;let j=K.suspendPayload?.__workflow_meta?.resumeLabels??{};if($?.options?.shouldPersistSnapshot?.({stepResults:H??{},workflowStatus:"suspended"})??!0)await q?.updateWorkflowResults({workflowName:$.id,runId:X,stepId:"__state",result:O,requestContext:F}),await q?.updateWorkflowState({workflowName:Y,runId:X,opts:{status:"suspended",result:K,suspendedPaths:P,resumeLabels:j,activePaths:G,activeStepsPath:z}});await this.mastra.pubsub.publish("workflows",{type:"workflow.suspend",runId:X,data:{workflowId:Y,runId:X,executionPath:G,resumeSteps:J,parentWorkflow:Z,stepResults:H,prevResult:K,activeStepsPath:z,requestContext:F,timeTravel:Q,restart:W,state:O,outputOptions:D}});return}if(R?.type==="step"){if(await this.mastra.pubsub.publish(`workflow.events.v2.${X}`,{type:"watch",runId:X,data:{type:"workflow-step-result",payload:{id:R.step.id,...K}}}),K.status==="success")await this.mastra.pubsub.publish(`workflow.events.v2.${X}`,{type:"watch",runId:X,data:{type:"workflow-step-finish",payload:{id:R.step.id,metadata:{}}}})}if(R=$.stepGraph[G[0]],L)if(Z&&G[0]<$.stepGraph.length-1){let{endedAt:_,output:P,status:w,...j}=K;await this.endWorkflow({workflow:$,parentWorkflow:Z,workflowId:Y,runId:X,executionPath:G,resumeSteps:J,stepResults:H,prevResult:{...j,status:"paused"},activeStepsPath:z,requestContext:F,perStep:L})}else await this.endWorkflow({workflow:$,parentWorkflow:Z,workflowId:Y,runId:X,executionPath:G,resumeSteps:J,stepResults:H,prevResult:K,activeStepsPath:z,requestContext:F,perStep:L});else if((R?.type==="parallel"||R?.type==="conditional")&&G.length>1)await this.aggregateBranchResults({workflow:$,workflowId:Y,runId:X,branchEntry:R,branchExecutionPath:G,latestBranchResult:K,resumeSteps:J,timeTravel:Q,restart:W,parentWorkflow:Z,stepResults:H,activeStepsPath:z,requestContext:F,state:O,outputOptions:D});else if(R?.type==="foreach"){let P=H[R.step.id]?.payload;await this.mastra.pubsub.publish("workflows",{type:"workflow.step.run",runId:X,data:{workflowId:Y,runId:X,executionPath:G.slice(0,-1),resumeSteps:J,parentWorkflow:Z,stepResults:H,prevResult:{...K,output:P},activeStepsPath:z,requestContext:F,timeTravel:Q,restart:W,state:O,outputOptions:D,forEachIndex:A}})}else if(G[0]>=$.stepGraph.length-1)await this.endWorkflow({workflow:$,parentWorkflow:Z,workflowId:Y,runId:X,executionPath:G,resumeSteps:J,stepResults:H,prevResult:K,activeStepsPath:z,requestContext:F,state:O,outputOptions:D});else await this.mastra.pubsub.publish("workflows",{type:"workflow.step.run",runId:X,data:{workflowId:Y,runId:X,executionPath:G.slice(0,-1).concat([G[G.length-1]+1]),resumeSteps:J,parentWorkflow:Z,stepResults:H,prevResult:K,activeStepsPath:z,requestContext:F,timeTravel:Q,restart:W,state:O,outputOptions:D}})}async loadData({workflowId:$,runId:Y}){return await(await this.mastra.getStorage()?.getStore("workflows"))?.loadWorkflowSnapshot({workflowName:$,runId:Y})}async handle($){try{return await this.#Y($),{ok:!0}}catch(Y){return this.mastra.getLogger()?.error("WorkflowEventProcessor.handle: error processing event",{type:$.type,runId:$.runId,error:Y}),{ok:!1,retry:!0}}}async process($,Y){if((await this.handle($)).ok)try{await Y?.()}catch(G){this.mastra.getLogger()?.error("Error acking event",G)}}async#Y($){let{type:Y,data:X}=$,G=X,J=await this.loadData({workflowId:G.workflowId,runId:G.runId});if(J?.status==="canceled"&&Y!=="workflow.end"&&Y!=="workflow.cancel")return;if(Y.startsWith("workflow.user-event.")){let K=this.#$(G.workflowId);if(!K)return this.errorWorkflow(G,new G0({id:"MASTRA_WORKFLOW",text:`Workflow not found: ${G.workflowId}`,domain:"MASTRA_WORKFLOW",category:"SYSTEM"}));await eI8({...G,workflow:K},{pubsub:this.mastra.pubsub,eventName:Y.split(".").slice(2).join("."),currentState:J});return}let Q;if(this.mastra.__hasInternalWorkflow(G.workflowId))Q=this.mastra.__getInternalWorkflow(G.workflowId);else if(G.parentWorkflow)Q=Q04(this.mastra,G.parentWorkflow);else Q=this.#$(G.workflowId);if(!Q)if(Y==="workflow.fail"||Y==="workflow.end"||Y==="workflow.cancel");else return this.errorWorkflow(G,new G0({id:"MASTRA_WORKFLOW",text:`Workflow not found: ${G.workflowId}`,domain:"MASTRA_WORKFLOW",category:"SYSTEM"}));if(Y==="workflow.start"||Y==="workflow.resume"){let{runId:K}=G;await this.mastra.pubsub.publish(`workflow.events.v2.${K}`,{type:"watch",runId:K,data:{type:"workflow-start",payload:{runId:K}}})}let W=Q;switch(Y){case"workflow.cancel":await this.processWorkflowCancel({workflow:W,...G});break;case"workflow.start":await this.processWorkflowStart({workflow:W,...G});break;case"workflow.resume":await this.processWorkflowStart({workflow:W,...G});break;case"workflow.end":await this.processWorkflowEnd({workflow:W,...G});break;case"workflow.step.end":await this.processWorkflowStepEnd({workflow:W,...G});break;case"workflow.step.run":await this.processWorkflowStepRun({workflow:W,...G});break;case"workflow.suspend":await this.processWorkflowSuspend({workflow:W,...G});break;case"workflow.fail":await this.processWorkflowFail({workflow:W,...G});break}}};Nv0(s60);o60=class extends Z80{#$;constructor($){super($);if(this.engineType="evented",!$.schedule)this.#$=[];else if(Array.isArray($.schedule))this.#$=$.schedule.map((Y)=>({...Y}));else this.#$=[{...$.schedule}]}getScheduleConfigs(){return this.#$.map(($)=>({...$}))}__registerMastra($){super.__registerMastra($),this.executionEngine.__registerMastra($)}async createRun($){if(this.stepFlow.length===0)throw Error("Execution flow of workflow is not defined. Add steps to the workflow via .then(), .branch(), etc.");if(!this.executionGraph.steps)throw Error("Uncommitted step flow changes detected. Call .commit() to register the steps.");let Y=$?.runId||XD(),X=await this.mastra?.getStorage()?.getStore("workflows"),G=X?.supportsConcurrentUpdates?.()??!1;if(X&&!G)throw new G0({id:"ATOMIC_STORAGE_OPERATIONS_NOT_SUPPORTED",domain:"MASTRA",category:"USER",text:`Workflow "${this.id}" runs on the evented execution engine, which requires a storage adapter that supports concurrent updates. Your current workflow storage adapter does not. Switch to an adapter that does (for example @mastra/libsql), or, if you do not need scheduled execution, remove the \`schedule\` field from this workflow's definition to use the default execution engine.`,details:{workflowId:this.id}});let J=this.runs.get(Y)??new zC8({workflowId:this.id,runId:Y,resourceId:$?.resourceId,executionEngine:this.executionEngine,executionGraph:this.executionGraph,serializedStepGraph:this.serializedStepGraph,mastra:this.mastra,retryConfig:this.retryConfig,cleanup:()=>this.runs.delete(Y),workflowSteps:this.steps,validateInputs:this.options?.validateInputs,inputSchema:this.inputSchema,stateSchema:this.stateSchema,workflowEngineType:this.engineType});this.runs.set(Y,J);let Q=this.options?.shouldPersistSnapshot?.({workflowStatus:J.workflowRunStatus,stepResults:{}}),W=await this.getWorkflowRunById(Y,{withNestedWorkflows:!1}),K=W&&!W.isFromInMemory;if(K&&W.status)J.workflowRunStatus=W.status;if(!K&&Q)await X?.persistWorkflowSnapshot({workflowName:this.id,runId:Y,resourceId:$?.resourceId,snapshot:{runId:Y,status:"pending",value:{},context:{},activePaths:[],serializedStepGraph:this.serializedStepGraph,activeStepsPath:{},suspendedPaths:{},resumeLabels:{},waitingPaths:{},result:void 0,error:void 0,timestamp:Date.now()}});return J}},zC8=class extends U80{constructor($){super($);this.serializedStepGraph=$.serializedStepGraph}setupAbortHandler(){let $=()=>{this.mastra?.pubsub.publish("workflows",{type:"workflow.cancel",runId:this.runId,data:{workflowId:this.workflowId,runId:this.runId}}).catch((Y)=>{this.mastra?.getLogger()?.error(`Failed to publish workflow.cancel for runId ${this.runId}:`,Y)})};this.abortController.signal.addEventListener("abort",$,{once:!0})}async start({inputData:$,initialState:Y,requestContext:X,perStep:G,outputOptions:J}){if(this.serializedStepGraph.length===0)throw Error("Execution flow of workflow is not defined. Add steps to the workflow via .then(), .branch(), etc.");if(!this.executionGraph.steps)throw Error("Uncommitted step flow changes detected. Call .commit() to register the steps.");X=X??new p1,await(await this.mastra?.getStorage()?.getStore("workflows"))?.persistWorkflowSnapshot({workflowName:this.workflowId,runId:this.runId,resourceId:this.resourceId,snapshot:{runId:this.runId,serializedStepGraph:this.serializedStepGraph,status:"running",value:{},context:{},requestContext:X.toJSON(),activePaths:[],activeStepsPath:{},suspendedPaths:{},resumeLabels:{},waitingPaths:{},timestamp:Date.now()}});let W=await this._validateInput($??{}),K=await this._validateInitialState(Y??{});if(!this.mastra?.pubsub)throw Error("Mastra instance with pubsub is required for workflow execution");this.setupAbortHandler();let Z=await this.executionEngine.execute({workflowId:this.workflowId,runId:this.runId,resourceId:this.resourceId,graph:this.executionGraph,serializedStepGraph:this.serializedStepGraph,input:W,initialState:K,pubsub:this.mastra.pubsub,retryConfig:this.retryConfig,requestContext:X,abortController:this.abortController,perStep:G,outputOptions:J});if(Z.status!=="suspended")this.cleanup?.();return Z}async startAsync({inputData:$,initialState:Y,requestContext:X,perStep:G}){if(this.serializedStepGraph.length===0)throw Error("Execution flow of workflow is not defined. Add steps to the workflow via .then(), .branch(), etc.");if(!this.executionGraph.steps)throw Error("Uncommitted step flow changes detected. Call .commit() to register the steps.");X=X??new p1,await(await this.mastra?.getStorage()?.getStore("workflows"))?.persistWorkflowSnapshot({workflowName:this.workflowId,runId:this.runId,resourceId:this.resourceId,snapshot:{runId:this.runId,serializedStepGraph:this.serializedStepGraph,status:"running",value:{},context:{},requestContext:X.toJSON(),activePaths:[],activeStepsPath:{},suspendedPaths:{},resumeLabels:{},waitingPaths:{},timestamp:Date.now()}});let Q=await this._validateInput($??{}),W=await this._validateInitialState(Y??{});if(!this.mastra?.pubsub)throw Error("Mastra instance with pubsub is required for workflow execution");return await this.mastra.pubsub.publish("workflows",{type:"workflow.start",runId:this.runId,data:{workflowId:this.workflowId,runId:this.runId,prevResult:{status:"success",output:Q},requestContext:X.toJSON(),initialState:W,perStep:G}}),{runId:this.runId}}stream({inputData:$,requestContext:Y,initialState:X,closeOnSuspend:G=!0,perStep:J,outputOptions:Q}){if(this.closeStreamAction&&this.streamOutput)return this.streamOutput;this.closeStreamAction=async()=>{};let W=this,K=new Y04({async start(Z){let H=W.watch((z)=>{let{type:V,payload:F}=z;Z.enqueue({type:V,runId:W.runId,from:"WORKFLOW",payload:{stepName:F?.id,...F}})});W.closeStreamAction=async()=>{H();try{if(Z.desiredSize!==null)Z.close()}catch(z){W.mastra?.getLogger()?.error("Error closing stream:",z)}};try{let z=await W.start({inputData:$,requestContext:Y,initialState:X,perStep:J,outputOptions:Q});if(W.streamOutput)W.streamOutput.updateResults(z);if(G)W.closeStreamAction?.().catch(()=>{});else if(z.status!=="suspended")W.closeStreamAction?.().catch(()=>{})}catch(z){W.streamOutput?.rejectResults(z),W.closeStreamAction?.().catch(()=>{})}}});return this.streamOutput=new Zj({runId:this.runId,workflowId:this.workflowId,stream:K}),this.streamOutput}resumeStream({step:$,resumeData:Y,requestContext:X,perStep:G,outputOptions:J}={}){this.closeStreamAction=async()=>{};let Q=this,W=new Y04({async start(K){let Z=Q.watch((H)=>{let{type:z,payload:V}=H;K.enqueue({type:z,runId:Q.runId,from:"WORKFLOW",payload:{stepName:V?.id,...V}})});Q.closeStreamAction=async()=>{Z();try{if(K.desiredSize!==null)K.close()}catch(H){Q.mastra?.getLogger()?.error("Error closing stream:",H)}};try{let H=await Q.resume({resumeData:Y,step:$,requestContext:X,perStep:G,outputOptions:J});if(Q.streamOutput)Q.streamOutput.updateResults(H);await new Promise((z)=>setTimeout(z,0)),Q.closeStreamAction?.().catch(()=>{})}catch(H){Q.streamOutput?.rejectResults(H),Q.closeStreamAction?.().catch(()=>{})}}});return this.streamOutput=new Zj({runId:this.runId,workflowId:this.workflowId,stream:W}),this.streamOutput}async resume($){let Y=await this.mastra?.getStorage()?.getStore("workflows");if(!Y)throw Error("Cannot resume workflow: workflows store is required");let X=await Y.loadWorkflowSnapshot({workflowName:this.workflowId,runId:this.runId});if(!X)throw Error(`Cannot resume workflow: no snapshot found for runId ${this.runId}`);if(X.status!=="suspended")throw Error("This workflow run was not suspended");let G=$.label?X?.resumeLabels?.[$.label]:void 0;if($.label&&!G){let D=Object.keys(X?.resumeLabels??{});throw Error(`Resume label "${$.label}" not found. Available labels: [${D.join(", ")}]`)}let J=G?.stepId??$.step,Q;if(J)if(typeof J==="string")Q=J.split(".");else Q=(Array.isArray(J)?J:[J]).map((D)=>typeof D==="string"?D:D?.id);else{let D=[];if(Object.entries(X?.suspendedPaths??{}).forEach(([A,B])=>{let O=X?.context?.[A];if(O&&typeof O==="object"&&"status"in O){let E=O;if(E.status==="suspended"){let M=E.suspendPayload?.__workflow_meta?.path;if(M&&Array.isArray(M))D.push([A,...M]);else D.push([A])}}}),D.length===0)throw Error("No suspended steps found in this workflow run");if(D.length===1)Q=D[0];else{let A=D.map((B)=>`[${B.join(", ")}]`);throw Error(`Multiple suspended steps found: ${A.join(", ")}. Please specify which step to resume using the "step" parameter.`)}}let W=Object.keys(X?.suspendedPaths??{});if(!W.includes(Q?.[0]??""))throw Error(`This workflow step "${Q?.[0]}" was not suspended. Available suspended steps: [${W.join(", ")}]`);let Z=X.suspendedPaths?.[Q[0]],H=X.requestContext??{},z=new p1;for(let[D,A]of Object.entries(H))z.set(D,A);if($.requestContext)for(let[D,A]of $.requestContext.entries())z.set(D,A);let V=this.workflowSteps[Q?.[0]??""],F=await this._validateResumeData($.resumeData,V);if(!this.mastra?.pubsub)throw Error("Mastra instance with pubsub is required for workflow execution");this.setupAbortHandler();let L=X?.context?.__state??X?.value??{},N=this.executionEngine.execute({workflowId:this.workflowId,runId:this.runId,graph:this.executionGraph,serializedStepGraph:this.serializedStepGraph,input:X?.context?.input,initialState:L,resume:{steps:Q,stepResults:X?.context,resumePayload:F,resumePath:Z,forEachIndex:$.forEachIndex??G?.foreachIndex},pubsub:this.mastra.pubsub,requestContext:z,abortController:this.abortController,perStep:$.perStep,outputOptions:$.outputOptions}).then((D)=>{if(D.status!=="suspended")this.closeStreamAction?.().catch(()=>{});return D});return this.executionResults=N,N}watch($){let Y=async(X,G)=>{if(X.runId!==this.runId)return;$(X.data),await G?.()};return this.mastra?.pubsub.subscribe(`workflow.events.v2.${this.runId}`,Y).catch(()=>{}),()=>{this.mastra?.pubsub.unsubscribe(`workflow.events.v2.${this.runId}`,Y).catch(()=>{})}}async watchAsync($){let Y=async(X,G)=>{if(X.runId!==this.runId)return;$(X.data),await G?.()};return await this.mastra?.pubsub.subscribe(`workflow.events.v2.${this.runId}`,Y).catch(()=>{}),async()=>{await this.mastra?.pubsub.unsubscribe(`workflow.events.v2.${this.runId}`,Y).catch(()=>{})}}async cancel(){await(await this.mastra?.getStorage()?.getStore("workflows"))?.updateWorkflowState({workflowName:this.workflowId,runId:this.runId,opts:{status:"canceled"}}),this.abortController.abort()}};VC8=class extends Y80{eventProcessor;constructor({mastra:$,eventProcessor:Y,options:X}){super({mastra:$,options:X});this.eventProcessor=Y}__registerMastra($){super.__registerMastra($),this.eventProcessor.__registerMastra($)}resolveWorkflow($){if(this.mastra?.__hasInternalWorkflow($))return this.mastra.__getInternalWorkflow($);return this.mastra.getWorkflow($)}async execute($){let Y=this.mastra?.pubsub;if(!Y)throw Error("No Pubsub adapter configured on the Mastra instance");let X,G,J=new Promise((L,N)=>{X=L,G=N}),Q=async(L,N)=>{if(L.runId!==$.runId){await N?.();return}if(["workflow.end","workflow.fail","workflow.suspend"].includes(L.type)){if(await N?.(),await Y.unsubscribe("workflows-finish",Q),L.type==="workflow.fail"&&L.data.stepResults)L.data.stepResults=Lv0(L.data.stepResults);X(L.data);return}await N?.()};try{await Y.subscribe("workflows-finish",Q)}catch(L){throw this.mastra?.getLogger()?.error("Failed to subscribe to workflows-finish:",L),L}try{if($.resume){let L=dz(this.resolveWorkflow($.workflowId),$.resume.resumePath),N=$.resume.stepResults[L?.id??"input"],D=$.resume.stepResults?.__state??$.initialState??{};await Y.publish("workflows",{type:"workflow.resume",runId:$.runId,data:{workflowId:$.workflowId,runId:$.runId,executionPath:$.resume.resumePath,stepResults:$.resume.stepResults,resumeSteps:$.resume.steps,prevResult:{status:"success",output:N?.payload},resumeData:$.resume.resumePayload,requestContext:$.requestContext.toJSON(),format:$.format,perStep:$.perStep,initialState:D,state:D,outputOptions:$.outputOptions,forEachIndex:$.resume.forEachIndex}})}else if($.timeTravel){let L=dz(this.resolveWorkflow($.workflowId),$.timeTravel.executionPath),N=$.timeTravel.stepResults[L?.id??"input"];await Y.publish("workflows",{type:"workflow.start",runId:$.runId,data:{workflowId:$.workflowId,runId:$.runId,executionPath:$.timeTravel.executionPath,stepResults:$.timeTravel.stepResults,timeTravel:$.timeTravel,prevResult:{status:"success",output:N?.payload},requestContext:$.requestContext.toJSON(),format:$.format,perStep:$.perStep,state:$.timeTravel.state}})}else if($.restart){let L=dz(this.resolveWorkflow($.workflowId),$.restart.activePaths),N=$.restart.stepResults[L?.id??"input"];await Y.publish("workflows",{type:"workflow.start",runId:$.runId,data:{workflowId:$.workflowId,runId:$.runId,executionPath:$.restart.activePaths,stepResults:$.restart.stepResults,restart:$.restart,prevResult:{status:"success",output:N?.payload},requestContext:$.requestContext.toJSON(),format:$.format,perStep:$.perStep,state:$.restart.state}})}else await Y.publish("workflows",{type:"workflow.start",runId:$.runId,data:{workflowId:$.workflowId,runId:$.runId,prevResult:{status:"success",output:$.input},requestContext:$.requestContext.toJSON(),format:$.format,perStep:$.perStep,initialState:$.initialState,outputOptions:$.outputOptions}})}catch(L){throw await Y.unsubscribe("workflows-finish",Q),G(L),L}let W=await J,K=W.state??W.stepResults?.__state??$.initialState??{},{__state:Z,...H}=W.stepResults??{},z={};for(let[L,N]of Object.entries(H)){if(N?.status==="skipped")continue;z[L]=K80(N)}let V;if(W.prevResult.status==="failed"){let L;for(let N of Object.values(z))if(N?.status==="failed"&&N?.tripwire){L=N.tripwire;break}if(L&&typeof L==="object"&&"reason"in L)V={status:"tripwire",steps:z,state:K,tripwire:L};else V={status:"failed",error:W.prevResult.error,steps:z,state:K}}else if(W.prevResult.status==="suspended")V={status:"suspended",steps:z,state:K};else if(W.prevResult.status==="paused"||$.perStep)V={status:"paused",steps:z,state:K};else V={status:W.prevResult.status,result:W.prevResult?.output,steps:z,state:K};if(V.status!=="paused")await this.invokeLifecycleCallbacks({status:V.status,result:V.result,error:V.error,steps:V.steps,tripwire:V.tripwire,runId:$.runId,workflowId:$.workflowId,resourceId:$.resourceId,input:$.input,requestContext:$.requestContext,state:K});let F;if(W.prevResult.status==="suspended"){let L=Object.entries(W.stepResults).map(([N,D])=>{if(D.status==="suspended"){let A=D.suspendPayload?.__workflow_meta?.path??[];return[N,...A]}return null}).filter(Boolean);F={status:V.status,steps:V.steps,suspended:L}}else if(W.prevResult.status==="failed")if(V.status==="tripwire"&&V.tripwire)F={status:"tripwire",tripwire:V.tripwire,steps:V.steps};else F={status:V.status,error:V.error,steps:V.steps};else if(W.prevResult.status==="paused"||$.perStep)F={status:"paused",steps:V.steps};else F={status:V.status,result:V.result,steps:V.steps};if($.outputOptions?.includeState)F.state=K;return F}}});var z04={};W8(z04,{buildBackgroundTaskWorkflow:()=>DC8,BACKGROUND_TASK_WORKFLOW_ID:()=>T3});function DC8($){let Y=Vv0({id:"run-attempt",inputSchema:U04,outputSchema:Z04,execute:async({inputData:J,abortSignal:Q,suspend:W,resumeData:K})=>{let{taskId:Z}=J,H=await $.getStorage(),z=await H.getTask(Z);if(!z||z.status==="cancelled")return $.deregisterTaskContext(Z),{taskId:Z,outcome:"cancelled"};let F=$.taskContexts.get(Z)?.executor??$.getStaticExecutor(z.toolName);if(!F){let q={message:`No executor registered for tool "${z.toolName}". Register the tool on Mastra (so workers can resolve it cross-process) or run the task in the same process as the producer.`};await H.updateTask(Z,{status:"failed",error:q,completedAt:new Date});let _=await H.getTask(Z);if(_)await $.runLocalCompletionHooks(_,"failed",{error:q}),await $.publishLifecycleEvent("task.failed",_);throw $.deregisterTaskContext(Z),Error(q.message)}let L=$.config.progressThrottleMs,N=typeof L==="number"&&Number.isFinite(L)&&L>0,D,A=async(q)=>{if(N){let _=Date.now();if(D!==void 0&&_-D<L)return;D=_}await $.publishLifecycleEvent("task.output",{...z,chunk:q})},B=new AbortController;$.activeAbortControllers.set(Z,B);let O=()=>B.abort(Error("Task cancelled"));if(Q.aborted)B.abort(Error("Task cancelled"));else Q.addEventListener("abort",O,{once:!0});let E=setTimeout(()=>{B.abort(Error(`Task timed out after ${z.timeoutMs}ms`))},z.timeoutMs),M,R=async(q,_)=>{await H.updateTask(Z,{status:"suspended",suspendPayload:q,suspendedAt:new Date});let P=await H.getTask(Z);if(P)await $.runLocalSuspendHooks(P),await $.publishLifecycleEvent("task.suspended",P);M={data:q,suspendOptions:_}};try{let q=await F.execute(z.args,{abortSignal:B.signal,onProgress:A,suspend:R,resumeData:K});if(M)return W(M.data,M.suspendOptions);return{taskId:Z,outcome:"success",result:q}}catch(q){let _=await H.getTask(Z);if(!_||_.status==="cancelled")return $.deregisterTaskContext(Z),{taskId:Z,outcome:"cancelled"};if(B.signal.aborted||q?.name==="AbortError"||q?.message==="Task cancelled"||q?.message?.startsWith("Task timed out after "))return{taskId:Z,outcome:"timed_out"};return{taskId:Z,outcome:"retry",error:{message:q?.message??"Unknown error",stack:q?.stack}}}finally{clearTimeout(E),Q.removeEventListener("abort",O),$.activeAbortControllers.delete(Z)}}}),X=Vv0({id:"classify-outcome",inputSchema:Z04,outputSchema:Av0,execute:async({inputData:J})=>{let{taskId:Q,outcome:W,result:K,error:Z}=J,H=await $.getStorage(),z=await H.getTask(Q);if(!z)return{taskId:Q,done:!0};if(W==="cancelled")return $.deregisterTaskContext(Q),{taskId:Q,done:!0};if(W==="timed_out"){let N=z.status;if(N!=="timed_out"&&N!=="cancelled"){await H.updateTask(Q,{status:"timed_out",error:{message:`Task timed out after ${z.timeoutMs}ms`},completedAt:new Date});let D=await H.getTask(Q);if(D)await $.publishLifecycleEvent("task.failed",D)}return{taskId:Q,done:!0}}if(W==="success"){if(z.status==="cancelled")return $.deregisterTaskContext(Q),{taskId:Q,done:!0};await H.updateTask(Q,{status:"completed",result:K,completedAt:new Date});let N=await H.getTask(Q);if(N)await $.runLocalCompletionHooks(N,"completed",{result:K}),await $.publishLifecycleEvent("task.completed",N);return{taskId:Q,done:!0,result:K}}if(z.retryCount<z.maxRetries)return await H.updateTask(Q,{retryCount:z.retryCount+1,error:void 0,startedAt:new Date}),{taskId:Q,done:!1};let V=Z??{message:"Unknown error"};await H.updateTask(Q,{status:"failed",error:V,completedAt:new Date});let F=await H.getTask(Q);if(F)await $.runLocalCompletionHooks(F,"failed",{error:V}),await $.publishLifecycleEvent("task.failed",F);let L=Error(V.message);if(V.stack)L.stack=V.stack;throw L}}),G=s60({id:`${T3}__attempt`,inputSchema:U04,outputSchema:Av0,steps:[Y,X],options:{validateInputs:!1,shouldPersistSnapshot:({workflowStatus:J})=>H04.includes(J)}}).then(Y).then(X).commit();return s60({id:T3,inputSchema:FC8,outputSchema:Av0,steps:[G],options:{shouldPersistSnapshot:({workflowStatus:J})=>H04.includes(J)}}).dountil(G,async({inputData:J})=>J?.done===!0).commit()}var FC8,LC8,Z04,U04,Av0,H04;var V04=V0(()=>{W04();Xg();Xg();ZY();FC8=U.object({taskId:U.string()}),LC8=U.enum(["success","retry","cancelled","timed_out"]),Z04=U.object({taskId:U.string(),outcome:LC8,result:U.unknown().optional(),error:U.any().optional()}),U04=U.object({taskId:U.string(),done:U.boolean().optional(),result:U.unknown().optional()}),Av0=U.object({taskId:U.string(),done:U.boolean(),result:U.unknown().optional()}),H04=["suspended","pending","paused","waiting"]});import{randomUUID as NC8}from"crypto";function F04($,Y){let{context:X,...G}=Y,J;return{get task(){if(!J)throw Error("Task has not been dispatched yet");return{id:J}},async dispatch(){let Q=await $.enqueue(G,X);return J=Q.task.id,Q},async checkIfSuspended(Q){let W=await $.listTasks({toolCallId:Q.toolCallId,runId:Q.runId,agentId:Q.agentId,threadId:Q.threadId,resourceId:Q.resourceId,toolName:Q.toolName,status:"suspended"});if(W.total>0){let K=W.tasks[0];if(K)return J=K.id,!0}return!1},async resume(Q){if(!J)throw Error("Task has not been dispatched yet");return $.resume(J,Q)},async cancel(){if(!J)throw Error("Task has not been dispatched yet");return $.cancel(J)},async waitForCompletion(Q){if(!J)throw Error("Task has not been dispatched yet");return $.waitForNextTask([J],Q)}}}function L04({llmBgOverrides:$,toolName:Y,toolConfig:X,agentConfig:G,managerConfig:J}){let Q=$;if(G?.disabled)return{runInBackground:!1,timeoutMs:J?.defaultTimeoutMs??300000,maxRetries:J?.defaultRetries?.maxRetries??0};let W=BC8(Y,G),K=Q?.enabled??W?.enabled??X?.enabled??!1,Z=Q?.timeoutMs??W?.timeoutMs??X?.timeoutMs??J?.defaultTimeoutMs??300000,H=Q?.maxRetries??X?.maxRetries??J?.defaultRetries?.maxRetries??0;return{runInBackground:K,timeoutMs:Z,maxRetries:H}}function BC8($,Y){if(!Y?.tools)return;if(Y.tools==="all")return{enabled:!0};if($.startsWith("agent-"))$=$.substring(6);else if($.startsWith("workflow-"))$=$.substring(9);let X=Y.tools[$];if(X===void 0)return;if(typeof X==="boolean")return{enabled:X};return X}function A04($,Y){let X=[],G=Y?.tools==="all";for(let[Q,W]of Object.entries($)){let K=Y?.tools==="all"?!1:typeof Y?.tools?.[Q]==="boolean"?Y.tools[Q]:Y?.tools?.[Q]?.enabled??!1;X.push({toolName:Q,toolConfig:W.background,defaultBackground:G?!0:K??W.background?.enabled??!1})}if(X.length===0)return;return`You have the ability to run certain tools in the background while continuing the conversation. The following tools support background execution:
${X.map((Q)=>`- ${Q.toolName} (default: ${Q.defaultBackground?"background":"foreground"})`).join(`
`)}

For any of these tools, you can include a "_background" field in the tool arguments to override the default:
  "_background": { "enabled": true/false, "timeoutMs": number, "maxRetries": number }

All fields in "_background" are optional. Only include what you want to override.

Guidelines:
- Use background execution when the user doesn't need the result immediately, or when you're launching multiple independent tasks.
- Use foreground execution when the user is directly waiting for the result and the conversation can't continue without it.
- If you don't include "_background", the tool's default configuration is used.
- When a tool runs in the background, you'll receive a placeholder result with a task ID. You can reference this in your response to the user.`}var T3="__background-task",Gg="background-tasks",Jg="background-tasks-result",AC8="background-task-workers",gr5=class{pubsub;config;#$;taskContexts=new Map;staticExecutors=new Map;activeAbortControllers=new Map;workerCallback;resultCallback;shuttingDown=!1;cleanupInterval;initPromise;constructor($={enabled:!1}){this.config={globalConcurrency:$.globalConcurrency??10,perAgentConcurrency:$.perAgentConcurrency??5,backpressure:$.backpressure??"queue",defaultTimeoutMs:$.defaultTimeoutMs??300000,...$}}__registerMastra($){this.#$=$}async getStorage(){let $=this.#$?.getStorage();if(!$)throw Error("Storage is not initialized");let Y=await $.getStore("backgroundTasks");if(!Y)throw Error("Background tasks storage is not available");return Y}async init($){if(this.initPromise)return this.initPromise;return this.initPromise=this.#Y($),this.initPromise}async#Y($){if(this.pubsub=$,this.workerCallback=async(X,G)=>{if(X.type==="task.dispatch")await this.handleDispatch(X);else if(X.type==="task.resume")await this.handleResume(X);else if(X.type==="task.cancel")this.handleCancel(X);await G?.()},this.resultCallback=async(X,G)=>{if(X.type==="task.completed"||X.type==="task.failed")await this.handleResult(X);await G?.()},this.#$){let{buildBackgroundTaskWorkflow:X}=await Promise.resolve().then(() => (V04(),z04)),G=X(this);if(!this.#$.__hasInternalWorkflow(T3))this.#$.__registerInternalWorkflow(G)}await this.pubsub.subscribe(Gg,this.workerCallback,{group:AC8}),await this.pubsub.subscribe(Jg,this.resultCallback),await this.recoverStaleTasks();let Y=this.config.cleanup;if(Y){let X=Y.cleanupIntervalMs??60000;this.cleanupInterval=setInterval(()=>{this.cleanup()},X)}}registerTaskContext($,Y){this.taskContexts.set($,Y)}deregisterTaskContext($){this.taskContexts.delete($)}registerStaticExecutor($,Y){if(this.staticExecutors.has($))this.#$?.getLogger?.()?.debug?.(`Overwriting existing static executor for tool "${$}"`);this.staticExecutors.set($,Y)}unregisterStaticExecutor($){this.staticExecutors.delete($)}getStaticExecutor($){return this.staticExecutors.get($)}async enqueue($,Y){if(this.shuttingDown)throw Error("BackgroundTaskManager is shutting down, cannot enqueue new tasks");if(this.initPromise)await this.initPromise;let X={id:this.#$?.generateId()??NC8(),status:"pending",toolName:$.toolName,toolCallId:$.toolCallId,args:$.args,agentId:$.agentId,threadId:$.threadId,resourceId:$.resourceId,runId:$.runId,retryCount:0,maxRetries:$.maxRetries??this.config.defaultRetries?.maxRetries??0,timeoutMs:$.timeoutMs??this.config.defaultTimeoutMs,createdAt:new Date};if(Y)this.registerTaskContext(X.id,Y);let G=await this.getStorage();if(await G.createTask(X),await this.checkConcurrency(X.agentId))return await this.dispatch(X),{task:X};switch(this.config.backpressure){case"reject":throw this.deregisterTaskContext(X.id),await G.deleteTask(X.id),Error(`Concurrency limit reached, cannot enqueue task for tool "${X.toolName}"`);case"fallback-sync":return this.deregisterTaskContext(X.id),await G.deleteTask(X.id),{task:X,fallbackToSync:!0};case"queue":default:return{task:X}}}async cancel($){if(this.initPromise)await this.initPromise;let Y=await this.getStorage(),X=await Y.getTask($);if(!X)throw Error(`Task not found: ${$}`);if(X.status==="completed"||X.status==="failed"||X.status==="cancelled"||X.status==="timed_out")return;if(X.status==="pending"){await Y.updateTask($,{status:"cancelled",completedAt:new Date});let G=await Y.getTask($);if(G)await this.publishLifecycleEvent("task.cancelled",G);this.deregisterTaskContext($);return}if(X.status==="suspended"){if(await Y.updateTask($,{status:"cancelled",completedAt:new Date}),this.#$)try{await(await this.#$.__getInternalWorkflow(T3).createRun({runId:$})).cancel()}catch(J){this.#$?.getLogger?.()?.warn(`background-task workflow cancel failed for ${$}:`,J)}let G=await Y.getTask($);if(G)await this.publishLifecycleEvent("task.cancelled",G);this.deregisterTaskContext($);return}if(X.status==="running"){await Y.updateTask($,{status:"cancelled",completedAt:new Date});let G=this.activeAbortControllers.get($);if(G)G.abort(Error("Task cancelled")),this.activeAbortControllers.delete($);if(this.#$)try{await(await this.#$.__getInternalWorkflow(T3).createRun({runId:$})).cancel()}catch(Q){this.#$?.getLogger?.()?.warn(`background-task workflow cancel failed for ${$}:`,Q)}let J=await Y.getTask($);if(J)await this.publishLifecycleEvent("task.cancelled",J);this.deregisterTaskContext($),await this.pubsub.publish(Gg,{type:"task.cancel",data:{taskId:$},runId:$})}}async resume($,Y){if(!this.#$)throw Error("Mastra is not registered with this manager");if(this.initPromise)await this.initPromise;let G=await(await this.getStorage()).getTask($);if(!G)throw Error(`Task not found: ${$}`);if(G.status!=="suspended")throw Error(`Cannot resume task in status '${G.status}' (expected 'suspended')`);if(!await this.checkConcurrency(G.agentId))throw Error(`Concurrency limit reached, cannot resume task "${$}" \u2014 retry once a slot is available`);return await this.pubsub.publish(Gg,{type:"task.resume",data:{taskId:$,resumeData:Y},runId:$}),G}async getTask($){return(await this.getStorage()).getTask($)}async listTasks($={}){return(await this.getStorage()).listTasks($)}async cleanup(){let $=this.config.cleanup?.completedTtlMs??3600000,Y=this.config.cleanup?.failedTtlMs??86400000,X=Date.now(),G=await this.getStorage();await G.deleteTasks({status:["completed"],toDate:new Date(X-$),dateFilterBy:"completedAt"}),await G.deleteTasks({status:["failed","cancelled","timed_out"],toDate:new Date(X-Y),dateFilterBy:"completedAt"})}async waitForNextTask($,Y){let X=await this.getStorage(),G=(J)=>J==="completed"||J==="failed"||J==="cancelled"||J==="timed_out";for(let J of $){let Q=await X.getTask(J);if(Q&&G(Q.status))return Q}return new Promise((J,Q)=>{let W=Date.now(),K=Y?.timeoutMs?setTimeout(()=>{if(clearInterval(H),Z)clearInterval(Z);Q(Error("Timed out waiting for background task"))},Y.timeoutMs):void 0,Z=Y?.onProgress?setInterval(()=>{Y.onProgress(Date.now()-W)},Y.progressIntervalMs??3000):void 0,H=setInterval(async()=>{for(let z of $){let V=await X.getTask(z);if(V&&G(V.status)){if(clearInterval(H),K)clearTimeout(K);if(Z)clearInterval(Z);J(V);return}}},50)})}stream($){let Y=this,X=this.pubsub,{agentId:G,runId:J,threadId:Q,resourceId:W,abortSignal:K,taskId:Z}=$??{},H={"task.running":"running","task.output":"running","task.completed":"completed","task.failed":"failed","task.cancelled":"cancelled","task.suspended":"suspended","task.resumed":"running"},z={"task.running":"background-task-running","task.output":"background-task-output","task.completed":"background-task-completed","task.failed":"background-task-failed","task.cancelled":"background-task-cancelled","task.suspended":"background-task-suspended","task.resumed":"background-task-resumed"};return new ReadableStream({async start(V){let F=async(L)=>{if(!H[L.type])return;let D=L.data;if(G&&D.agentId!==G)return;if(J&&D.runId!==J)return;if(Q&&D.threadId!==Q)return;if(W&&D.resourceId!==W)return;if(Z&&D.taskId!==Z)return;let A={taskId:D.taskId,toolName:D.toolName,toolCallId:D.toolCallId,agentId:D.agentId,runId:D.runId};switch(L.type){case"task.running":A.startedAt=D.startedAt,A.args=D.args;break;case"task.completed":A.completedAt=D.completedAt,A.result=D.result;break;case"task.failed":A.completedAt=D.completedAt,A.error=D.error;break;case"task.cancelled":A.completedAt=D.completedAt;break;case"task.output":A.payload=D.chunk;break;case"task.suspended":A.suspendPayload=D.suspendPayload,A.suspendedAt=D.suspendedAt,A.args=D.args;break;case"task.resumed":A.startedAt=D.startedAt,A.args=D.args;break}try{V.enqueue({type:z[L.type],payload:A})}catch{}};X.subscribe(Jg,F),K?.addEventListener("abort",()=>{X.unsubscribe(Jg,F);try{V.close()}catch{}});try{let L=await Y.getStorage();if(Z){let N=await L.getTask(Z);if(N&&N.status==="running")V.enqueue({type:"background-task-running",payload:{taskId:N.id,toolName:N.toolName,toolCallId:N.toolCallId,agentId:N.agentId,runId:N.runId,startedAt:N.startedAt,args:N.args}})}else{let{tasks:N}=await L.listTasks({agentId:G,runId:J,threadId:Q,resourceId:W,status:["running"]});for(let D of N){if(K?.aborted)break;try{V.enqueue({type:"background-task-running",payload:{taskId:D.id,toolName:D.toolName,toolCallId:D.toolCallId,agentId:D.agentId,runId:D.runId,startedAt:D.startedAt,args:D.args}})}catch{break}}}}catch{}}})}async shutdown(){if(this.shuttingDown=!0,this.cleanupInterval)clearInterval(this.cleanupInterval),this.cleanupInterval=void 0;if(this.workerCallback)await this.pubsub.unsubscribe(Gg,this.workerCallback);if(this.resultCallback)await this.pubsub.unsubscribe(Jg,this.resultCallback);this.taskContexts.clear(),await this.pubsub.flush()}async dispatch($){await this.pubsub.publish(Gg,{type:"task.dispatch",data:{taskId:$.id,toolName:$.toolName,toolCallId:$.toolCallId,args:$.args,agentId:$.agentId,threadId:$.threadId,resourceId:$.resourceId,timeoutMs:$.timeoutMs,maxRetries:$.maxRetries,runId:$.runId},runId:$.id})}async handleDispatch($){let{taskId:Y}=$.data,X=$.deliveryAttempt??1,G=!1,J=await this.getStorage(),Q=await J.getTask(Y);if(!Q||Q.status==="cancelled")return this.deregisterTaskContext(Y),!1;await J.updateTask(Y,{status:"running",startedAt:new Date,retryCount:X-1});let W=await J.getTask(Y);if(W)await this.publishLifecycleEvent("task.running",W);if(this.#$){if(W)this.runLocalExecutionHook(W);let K=this.#$.__getInternalWorkflow(T3);(await K.createRun({runId:Y})).start({inputData:{taskId:Y}}).then((H)=>{if(H.status!=="suspended")K.deleteWorkflowRunById(Y)}).catch((H)=>{this.#$?.getLogger?.()?.error(`background-task workflow start failed for ${Y}:`,H)}).finally(()=>{this.drainPending()})}return G}async handleResume($){let{taskId:Y,resumeData:X}=$.data,G=await this.getStorage(),J=await G.getTask(Y);if(!J||J.status!=="suspended")return;await G.updateTask(Y,{status:"running",startedAt:new Date,suspendPayload:void 0,suspendedAt:void 0});let Q=await G.getTask(Y);if(Q)await this.publishLifecycleEvent("task.resumed",Q);if(!this.#$)return;let W=this.#$.__getInternalWorkflow(T3);(await W.createRun({runId:Y})).resume({resumeData:X}).then((Z)=>{if(Z.status!=="suspended")W.deleteWorkflowRunById(Y)}).catch((Z)=>{this.#$?.getLogger?.()?.error(`background-task workflow resume failed for ${Y}:`,Z)}).finally(()=>{this.drainPending()})}async runLocalCompletionHooks($,Y,X){let G=this.taskContexts.get($.id);if(!G)return;try{if(Y==="completed")G.onChunk?.({type:"background-task-completed",payload:{taskId:$.id,toolName:$.toolName,toolCallId:$.toolCallId,runId:$.runId,result:X.result,completedAt:$.completedAt,agentId:$.agentId}}),await G.onResult?.({runId:$.runId,taskId:$.id,toolCallId:$.toolCallId,toolName:$.toolName,agentId:$.agentId,threadId:$.threadId,resourceId:$.resourceId,result:X.result,status:"completed",completedAt:$.completedAt,startedAt:$.startedAt}),await G.onComplete?.($);else G.onChunk?.({type:"background-task-failed",payload:{taskId:$.id,toolName:$.toolName,toolCallId:$.toolCallId,runId:$.runId,error:X.error??{message:"Unknown error"},completedAt:$.completedAt,agentId:$.agentId}}),await G.onResult?.({runId:$.runId,taskId:$.id,toolCallId:$.toolCallId,toolName:$.toolName,agentId:$.agentId,threadId:$.threadId,resourceId:$.resourceId,error:X.error,status:"failed",completedAt:$.completedAt,startedAt:$.startedAt}),await G.onFailed?.($)}finally{this.deregisterTaskContext($.id)}}async runLocalSuspendHooks($){let Y=this.taskContexts.get($.id);if(!Y)return;await Y.onExecution?.({runId:$.runId,taskId:$.id,toolCallId:$.toolCallId,toolName:$.toolName,agentId:$.agentId,threadId:$.threadId,resourceId:$.resourceId,startedAt:$.startedAt,suspendedAt:$.suspendedAt})}async runLocalExecutionHook($){let Y=this.taskContexts.get($.id);if(!Y)return;try{await Y.onExecution?.({runId:$.runId,taskId:$.id,toolCallId:$.toolCallId,toolName:$.toolName,agentId:$.agentId,threadId:$.threadId,resourceId:$.resourceId,startedAt:$.startedAt})}catch{}}async handleResult($){let{taskId:Y,toolName:X,toolCallId:G,threadId:J,resourceId:Q,runId:W}=$.data,Z=await(await this.getStorage()).getTask(Y);if(Z?.completedAt){let H=this.taskContexts.get(Y);if($.type==="task.completed"){if(H?.onChunk?.({type:"background-task-completed",payload:{taskId:Y,toolName:X,toolCallId:G,runId:W,result:$.data.result,completedAt:Z.completedAt,agentId:Z.agentId}}),await H?.onResult?.({runId:W,taskId:Y,toolCallId:G,toolName:X,agentId:$.data.agentId,threadId:J,resourceId:Q,result:$.data.result,status:"completed",completedAt:Z.completedAt,startedAt:Z.startedAt}),Z)await Promise.all([H?.onComplete?.(Z),this.config.onTaskComplete?.(Z)])}if($.type==="task.failed"){if(H?.onChunk?.({type:"background-task-failed",payload:{taskId:Y,toolName:X,toolCallId:G,runId:W,error:$.data.error,completedAt:Z.completedAt,agentId:Z.agentId}}),await H?.onResult?.({runId:W,taskId:Y,toolCallId:G,toolName:X,agentId:$.data.agentId,threadId:J,resourceId:Q,error:$.data.error,status:"failed",completedAt:Z.completedAt,startedAt:Z.startedAt}),Z)await Promise.all([H?.onFailed?.(Z),this.config.onTaskFailed?.(Z)])}this.deregisterTaskContext(Y)}}handleCancel($){let{taskId:Y}=$.data,X=this.activeAbortControllers.get(Y);if(X)X.abort(Error("Task cancelled")),this.activeAbortControllers.delete(Y);this.deregisterTaskContext(Y)}async publishLifecycleEvent($,Y){await this.pubsub.publish(Jg,{type:$,data:{taskId:Y.id,toolName:Y.toolName,toolCallId:Y.toolCallId,runId:Y.runId,agentId:Y.agentId,threadId:Y.threadId,resourceId:Y.resourceId,args:Y.args,result:Y.result,error:Y.error,chunk:Y.chunk,completedAt:Y.completedAt,startedAt:Y.startedAt,suspendPayload:Y.suspendPayload,suspendedAt:Y.suspendedAt},runId:Y.id})}async checkConcurrency($){let Y=await this.getStorage();if(await Y.getRunningCount()>=this.config.globalConcurrency)return!1;if(await Y.getRunningCountByAgent($)>=this.config.perAgentConcurrency)return!1;return!0}async drainPending(){let $=await this.getStorage(),{tasks:Y}=await $.listTasks({status:"pending",orderBy:"createdAt",orderDirection:"asc"});for(let X of Y)if(await this.checkConcurrency(X.agentId))await this.dispatch(X)}async recoverStaleTasks(){try{let $=await this.getStorage(),{tasks:Y}=await $.listTasks({status:"running"});for(let G of Y)if(G.maxRetries>0)await $.updateTask(G.id,{status:"pending",startedAt:void 0});else await $.updateTask(G.id,{status:"failed",error:{message:"Worker process terminated before task completed"},completedAt:new Date});let{tasks:X}=await $.listTasks({status:"pending",orderBy:"createdAt",orderDirection:"asc"});for(let G of X)if(await this.checkConcurrency(G.agentId))await this.dispatch(G)}catch($){let Y=this.#$?.getLogger();if(Y)Y.error("Failed to recover stale background tasks",$)}}},D04,N04;var Xg=V0(()=>{O1();D04={type:"object",description:"Optional: override background execution behavior for this specific call. Set enabled=false to force foreground, enabled=true to force background. Omit entirely to use the default configuration.",properties:{enabled:{type:"boolean",description:"Force background (true) or foreground (false) execution for this call."},timeoutMs:{type:"number",description:"Override timeout in milliseconds for this call."},maxRetries:{type:"number",description:"Override maximum retry attempts for this call."}},additionalProperties:!1},N04=U.object({enabled:U.boolean().optional().describe("Force background (true) or foreground (false) execution for this call."),timeoutMs:U.number().optional().describe("Override timeout in milliseconds for this call."),maxRetries:U.number().optional().describe("Override maximum retry attempts for this call.")}).optional().describe("Optional: override background execution behavior for this specific call. Set enabled=false to force foreground, enabled=true to force background. Omit entirely to use the default configuration.")});var B04=()=>{};var Hj=($,Y)=>{return $.anyOf.length?$.anyOf.length===1?F8($.anyOf[0],{...Y,path:[...Y.path,"anyOf",0]}):`z.union([${$.anyOf.map((X,G)=>F8(X,{...Y,path:[...Y.path,"anyOf",G]})).join(", ")}])`:"z.any()"};var H80=V0(()=>{EQ()});var O04=($)=>{return"z.boolean()"};var E04=($)=>{return"z.any()"};var M04=($,Y)=>{return`z.union([${$.type.map((X)=>F8({...$,type:X},{...Y,withoutDefaults:!0})).join(", ")}])`};var Bv0=V0(()=>{EQ()});var R04=($,Y)=>{return`z.any().refine((value) => !${F8($.not,{...Y,path:[...Y.path,"not"]})}.safeParse(value).success, "Invalid input: Should NOT be valid against schema")`};var Ov0=V0(()=>{EQ()});var q04=($)=>{return"z.null()"};var P04=($)=>{return[$.slice(0,$.length/2),$.slice($.length/2)]};function QD($,Y){if($.allOf.length===0)return"z.never()";else if($.allOf.length===1){let X=$.allOf[0];return F8(X,{...Y,path:[...Y.path,"allOf",X[Qg]]})}else{let[X,G]=P04(OC8($.allOf));return`z.intersection(${QD({allOf:X},Y)}, ${QD({allOf:G},Y)})`}}var Qg,OC8=($)=>{let Y=[];for(let X=0;X<$.length;X++){let G=$[X];if(typeof G==="boolean")Y.push(G?{[Qg]:X}:{[Qg]:X,not:{}});else if(Qg in G)return $;else Y.push({...G,[Qg]:X})}return Y};var z80=V0(()=>{EQ();Qg=Symbol("Original index")});function W7($,Y,X,G){let J=$[Y],Q="";if(J!==void 0){let W=X({value:J,json:JSON.stringify(J)});if(W){let K=W[0],Z=W.length===3?W[1]:"",H=W.length===3?W[2]:W[1];Q+=K;let z=$.errorMessage?.[Y]??G;if(z!==void 0)Q+=Z+JSON.stringify(z);Q+=H}}return Q}var w04=($,Y)=>{if(Array.isArray($.items))return`z.tuple([${$.items.map((G,J)=>F8(G,{...Y,path:[...Y.path,"items",J]}))}])`;let X=!$.items?"z.array(z.any())":`z.array(${F8($.items,{...Y,path:[...Y.path,"items"]})})`;if(X+=W7($,"minItems",({json:G})=>[`.min(${G}`,", ",")"]),X+=W7($,"maxItems",({json:G})=>[`.max(${G}`,", ",")"]),$.uniqueItems===!0)X+=W7($,"uniqueItems",()=>[".refine((arr) => arr.every((item, i) => arr.indexOf(item) == i)",", ",")"],"All items must be unique!");return X};var Ev0=V0(()=>{EQ()});var _04=($)=>{return`z.literal(${JSON.stringify($.const)})`};var j04=($)=>{if($.enum.length===0)return"z.never()";else if($.enum.length===1)return`z.literal(${JSON.stringify($.enum[0])})`;else if($.enum.every((Y)=>typeof Y==="string"))return`z.enum([${$.enum.map((Y)=>JSON.stringify(Y))}])`;else return`z.union([${$.enum.map((Y)=>`z.literal(${JSON.stringify(Y)})`).join(", ")}])`};var T04=($,Y)=>{let X=F8($.if,{...Y,path:[...Y.path,"if"]}),G=F8($.then,{...Y,path:[...Y.path,"then"]}),J=F8($.else,{...Y,path:[...Y.path,"else"]});return`z.union([${G}, ${J}]).superRefine((value,ctx) => {
  const result = ${X}.safeParse(value).success
    ? ${G}.safeParse(value)
    : ${J}.safeParse(value);
  if (!result.success) {
    result.error.errors.forEach((error) => ctx.addIssue(error))
  }
})`};var Mv0=V0(()=>{EQ()});var I04=($)=>{let Y="z.number()";if($.type==="integer")Y+=W7($,"type",()=>[".int(",")"]);else Y+=W7($,"format",({value:X})=>{if(X==="int64")return[".int(",")"]});if(Y+=W7($,"multipleOf",({value:X,json:G})=>{if(X===1){if(Y.startsWith("z.number().int("))return;return[".int(",")"]}return[`.multipleOf(${G}`,", ",")"]}),typeof $.minimum==="number")if($.exclusiveMinimum===!0)Y+=W7($,"minimum",({json:X})=>[`.gt(${X}`,", ",")"]);else Y+=W7($,"minimum",({json:X})=>[`.gte(${X}`,", ",")"]);else if(typeof $.exclusiveMinimum==="number")Y+=W7($,"exclusiveMinimum",({json:X})=>[`.gt(${X}`,", ",")"]);if(typeof $.maximum==="number")if($.exclusiveMaximum===!0)Y+=W7($,"maximum",({json:X})=>[`.lt(${X}`,", ",")"]);else Y+=W7($,"maximum",({json:X})=>[`.lte(${X}`,", ",")"]);else if(typeof $.exclusiveMaximum==="number")Y+=W7($,"exclusiveMaximum",({json:X})=>[`.lt(${X}`,", ",")"]);return Y};var Rv0=()=>{};var zj=($,Y)=>{let X=Y.zodVersion===3;return $.oneOf.length?$.oneOf.length===1?F8($.oneOf[0],{...Y,path:[...Y.path,"oneOf",0]}):`z.any().superRefine((x, ctx) => {
    const schemas = [${$.oneOf.map((G,J)=>F8(G,{...Y,path:[...Y.path,"oneOf",J]})).join(", ")}];
    const { errors, failed } = schemas.reduce<{
      errors: z.${X?"ZodError":"core.$ZodIssue"}[];
      failed: number;
    }>(
      ({ errors, failed }, schema) =>
        ((result) =>
          result.error
            ? {
                errors: [...errors, ${X?"result.error":"...result.error.issues"}],
                failed: failed + 1,
              }
            : { errors, failed })(
          schema.safeParse(x),
        ),
      { errors: [], failed: 0 },
    );
    const passed = schemas.length - failed;
    if (passed !== 1) {
      ctx.addIssue(errors.length ? {
        path: ${X?"ctx.path":"[]"},
        code: "invalid_union",
        ${X?"unionErrors: errors":"errors: [errors]"},
        message: "Invalid input: Should pass single schema. Passed " + passed,
      } : {
        path: ${X?"ctx.path":"[]"},
        code: "custom",${X?"":`
        errors: [errors],`}
        message: "Invalid input: Should pass single schema. Passed " + passed,
      });
    }
  })`:"z.any()"};var V80=V0(()=>{EQ()});var qv0=($)=>{let Y=$.split(`
`);return`/**${Y.length===1?Y[0]:`
${Y.map((G)=>`* ${G}`).join(`
`)}
`}*/
`},F80=($,Y)=>{let X=$.description;if(!X)return Y;return`
${qv0(X)}${Y}`};function Wg($,Y){if(Y.zodVersion===3)return`z.record(${$})`;return`z.record(z.string(), ${$})`}function C04($){if($.zodVersion===3)return"path: [...ctx.path, key]";return"path: [key]"}function S04($,Y){let X=void 0;if($.properties)if(!Object.keys($.properties).length)X="z.object({})";else X="z.object({ ",X+=Object.keys($.properties).map((W)=>{let K=$.properties[W],Z=`${JSON.stringify(W)}: ${F8(K,{...Y,path:[...Y.path,"properties",W]})}`;if(Y.withJsdocs&&typeof K==="object")Z=F80(K,Z);let H=typeof K==="object"&&K.default!==void 0,z=Array.isArray($.required)?$.required.includes(W):typeof K==="object"&&K.required===!0;return!H&&!z?`${Z}.optional()`:Z}).join(", "),X+=" })";let G=$.additionalProperties!==void 0?F8($.additionalProperties,{...Y,path:[...Y.path,"additionalProperties"]}):void 0,J=void 0;if($.patternProperties){let W=Object.fromEntries(Object.entries($.patternProperties).map(([K,Z])=>{return[K,F8(Z,{...Y,path:[...Y.path,"patternProperties",K]})]},{}));if(J="",X)if(G)J+=`.catchall(z.union([${[...Object.values(W),G].join(", ")}]))`;else if(Object.keys(W).length>1)J+=`.catchall(z.union([${Object.values(W).join(", ")}]))`;else J+=`.catchall(${Object.values(W)})`;else if(G)J+=Wg(`z.union([${[...Object.values(W),G].join(", ")}])`,Y);else if(Object.keys(W).length>1)J+=Wg(`z.union([${Object.values(W).join(", ")}])`,Y);else J+=Wg(`${Object.values(W)}`,Y);if(J+=`.superRefine((value, ctx) => {
`,J+=`for (const key in value) {
`,G)if($.properties)J+=`let evaluated = [${Object.keys($.properties).map((K)=>JSON.stringify(K)).join(", ")}].includes(key)
`;else J+=`let evaluated = false
`;for(let K in $.patternProperties){if(J+="if (key.match(new RegExp("+JSON.stringify(K)+`))) {
`,G)J+=`evaluated = true
`;J+="const result = "+W[K]+`.safeParse(value[key])
`,J+=`if (!result.success) {
`,J+=`ctx.addIssue({
          ${C04(Y)},
          code: 'custom',
          message: \`Invalid input: Key matching regex /\${key}/ must match schema\`,
          params: {
            issues: result.error.issues
          }
        })
`,J+=`}
`,J+=`}
`}if(G)J+=`if (!evaluated) {
`,J+="const result = "+G+`.safeParse(value[key])
`,J+=`if (!result.success) {
`,J+=`ctx.addIssue({
          ${C04(Y)},
          code: 'custom',
          message: \`Invalid input: must match catchall schema\`,
          params: {
            issues: result.error.issues
          }
        })
`,J+=`}
`,J+=`}
`;J+=`}
`,J+="})"}let Q=X?J?X+J:G?G==="z.never()"?X+".strict()":X+`.catchall(${G})`:X:J?J:G?Wg(G,Y):Wg("z.any()",Y);if(n9.an.anyOf($))Q+=`.and(${Hj({...$,anyOf:$.anyOf.map((W)=>typeof W==="object"&&!W.type&&(W.properties||W.additionalProperties||W.patternProperties)?{...W,type:"object"}:W)},Y)})`;if(n9.a.oneOf($))Q+=`.and(${zj({...$,oneOf:$.oneOf.map((W)=>typeof W==="object"&&!W.type&&(W.properties||W.additionalProperties||W.patternProperties)?{...W,type:"object"}:W)},Y)})`;if(n9.an.allOf($))Q+=`.and(${QD({...$,allOf:$.allOf.map((W)=>typeof W==="object"&&!W.type&&(W.properties||W.additionalProperties||W.patternProperties)?{...W,type:"object"}:W)},Y)})`;return Q}var Pv0=V0(()=>{H80();V80();EQ();z80()});var k04=($)=>{let Y="z.string()";Y+=W7($,"format",({value:G})=>{switch(G){case"email":return[".email(",")"];case"ip":return[".ip(",")"];case"ipv4":return['.ip({ version: "v4"',", message: "," })"];case"ipv6":return['.ip({ version: "v6"',", message: "," })"];case"uri":return[".url(",")"];case"uuid":return[".uuid(",")"];case"date-time":return[".datetime({ offset: true",", message: "," })"];case"time":return[".time(",")"];case"date":return[".date(",")"];case"binary":return[".base64(",")"];case"duration":return[".duration(",")"]}}),Y+=W7($,"pattern",({json:G})=>[`.regex(new RegExp(${G})`,", ",")"]),Y+=W7($,"minLength",({json:G})=>[`.min(${G}`,", ",")"]),Y+=W7($,"maxLength",({json:G})=>[`.max(${G}`,", ",")"]),Y+=W7($,"contentEncoding",({value:G})=>{if(G==="base64")return[".base64(",")"]});let X=W7($,"contentMediaType",({value:G})=>{if(G==="application/json")return['.transform((str, ctx) => { try { return JSON.parse(str); } catch (err) { ctx.addIssue({ code: "custom", message: "Invalid JSON" }); }}',", ",")"]});if(X!="")Y+=X,Y+=W7($,"contentSchema",({value:G})=>{if(G&&G instanceof Object)return[`.pipe(${F8(G)}`,", ",")"]});return Y};var wv0=V0(()=>{EQ()});var v04=($,Y)=>{return $.oneOf.length?$.oneOf.length===1?F8($.oneOf[0],{...Y,path:[...Y.path,"oneOf",0]}):`z.discriminatedUnion("${$.discriminator.propertyName}", [${$.oneOf.map((X,G)=>F8(X,{...Y,path:[...Y.path,"oneOf",G]})).join(", ")}])`:"z.any()"};var _v0=V0(()=>{EQ()});var x04=($,...Y)=>Object.keys($).reduce((X,G)=>{if(!Y.includes(G))X[G]=$[G];return X},{});var y04=($,Y)=>{return`${F8(x04($,"nullable"),Y,!0)}.nullable()`};var jv0=V0(()=>{EQ()});var F8=($,Y={seen:new Map,path:[]},X)=>{if(typeof $!=="object")return $?"z.any()":"z.never()";if(Y.parserOverride){let Q=Y.parserOverride($,Y);if(typeof Q==="string")return Q}let G=Y.seen.get($);if(G){if(G.r!==void 0)return G.r;if(Y.depth===void 0||G.n>=Y.depth)return"z.any()";G.n+=1}else G={r:void 0,n:0},Y.seen.set($,G);let J=qC8($,Y);if(!X){if(!Y.withoutDescribes)J=EC8($,J);if(!Y.withoutDefaults)J=MC8($,J);J=RC8($,J)}return G.r=J,J},EC8=($,Y)=>{if($.description)Y+=`.describe(${JSON.stringify($.description)})`;return Y},MC8=($,Y)=>{if($.default!==void 0)Y+=`.default(${JSON.stringify($.default)})`;return Y},RC8=($,Y)=>{if($.readOnly)Y+=".readonly()";return Y},qC8=($,Y)=>{if(n9.a.nullable($))return y04($,Y);else if(n9.an.object($))return S04($,Y);else if(n9.an.array($))return w04($,Y);else if(n9.an.anyOf($))return Hj($,Y);else if(n9.an.allOf($))return QD($,Y);else if(n9.a.simpleDiscriminatedOneOf($))return v04($,Y);else if(n9.a.oneOf($))return zj($,Y);else if(n9.a.not($))return R04($,Y);else if(n9.an.enum($))return j04($);else if(n9.a.const($))return _04($);else if(n9.a.multipleType($))return M04($,Y);else if(n9.a.primitive($,"string"))return k04($);else if(n9.a.primitive($,"number")||n9.a.primitive($,"integer"))return I04($);else if(n9.a.primitive($,"boolean"))return O04($);else if(n9.a.primitive($,"null"))return q04($);else if(n9.a.conditional($))return T04($,Y);else return E04($)},n9;var EQ=V0(()=>{H80();Bv0();Ov0();z80();Ev0();Mv0();Rv0();Pv0();wv0();V80();_v0();jv0();n9={an:{object:($)=>$.type==="object",array:($)=>$.type==="array",anyOf:($)=>$.anyOf!==void 0,allOf:($)=>$.allOf!==void 0,enum:($)=>$.enum!==void 0},a:{nullable:($)=>$.nullable===!0,multipleType:($)=>Array.isArray($.type),not:($)=>$.not!==void 0,const:($)=>$.const!==void 0,primitive:($,Y)=>$.type===Y,conditional:($)=>Boolean("if"in $&&$.if&&"then"in $&&"else"in $&&$.then&&$.else),simpleDiscriminatedOneOf:($)=>{if(!$.oneOf||!Array.isArray($.oneOf)||$.oneOf.length===0||!$.discriminator||typeof $.discriminator!=="object"||!("propertyName"in $.discriminator)||typeof $.discriminator.propertyName!=="string")return!1;let Y=$.discriminator.propertyName;return $.oneOf.every((X)=>{if(!X||typeof X!=="object"||X.type!=="object"||!X.properties||typeof X.properties!=="object"||!(Y in X.properties))return!1;let G=X.properties[Y];return G&&typeof G==="object"&&G.type==="string"&&(G.const!==void 0||G.enum&&Array.isArray(G.enum)&&G.enum.length===1)&&Array.isArray(X.required)&&X.required.includes(Y)})},oneOf:($)=>$.oneOf!==void 0}}});var b04=($,{module:Y,name:X,type:G,noImport:J,zodVersion:Q=4,...W}={})=>{if(G&&(!X||Y!=="esm"))throw Error("Option `type` requires `name` to be set and `module` to be `esm`");let K=F8($,{module:Y,name:X,path:[],seen:new Map,zodVersion:Q,...W}),Z=W.withJsdocs&&typeof $!=="boolean"&&$.description?qv0($.description):"";if(Y==="cjs"){if(K=`${Z}module.exports = ${X?`{ ${JSON.stringify(X)}: ${K} }`:K}
`,!J)K=`${Z}const { z } = require("zod")

${K}`}else if(Y==="esm"){if(K=`${Z}export ${X?`const ${X} =`:"default"} ${K}
`,!J)K=`import { z } from "zod"

${K}`}else if(X)K=`${Z}const ${X} = ${K}`;if(G&&X){let H=typeof G==="string"?G:`${X[0].toUpperCase()}${X.substring(1)}`;K+=`export type ${H} = z.infer<typeof ${X}>
`}return K};var Tv0=V0(()=>{EQ()});var h04;var Iv0=V0(()=>{Tv0();B04();Tv0();z80();H80();Ev0();Mv0();Bv0();Ov0();jv0();Rv0();Pv0();V80();EQ();_v0();wv0();h04=b04});function PC8($,Y){let X=void 0;if($.properties)if(!Object.keys($.properties).length)X="z.object({})";else X="z.object({ ",X+=Object.keys($.properties).map((W)=>{let K=$.properties[W],Z=`${JSON.stringify(W)}: ${F8(K,{...Y,path:[...Y.path,"properties",W]})}`;if(Y.withJsdocs&&typeof K==="object")Z=F80(K,Z);let H=typeof K==="object"&&K.default!==void 0,z=Array.isArray($.required)?$.required.includes(W):typeof K==="object"&&K.required===!0;return!H&&!z?`${Z}.optional()`:Z}).join(", "),X+=" })";let G=$.additionalProperties!==void 0&&$.additionalProperties!==!1?F8($.additionalProperties,{...Y,path:[...Y.path,"additionalProperties"]}):void 0,J=void 0;if($.patternProperties){let W=Object.fromEntries(Object.entries($.patternProperties).map(([K,Z])=>{return[K,F8(Z,{...Y,path:[...Y.path,"patternProperties",K]})]},{}));if(J="",X)if(G)J+=`.catchall(z.union([${[...Object.values(W),G].join(", ")}]))`;else if(Object.keys(W).length>1)J+=`.catchall(z.union([${Object.values(W).join(", ")}]))`;else J+=`.catchall(${Object.values(W)})`;else if(G)J+=`z.record(z.union([${[...Object.values(W),G].join(", ")}]))`;else if(Object.keys(W).length>1)J+=`z.record(z.union([${Object.values(W).join(", ")}]))`;else J+=`z.record(${Object.values(W)})`;if(J+=`.superRefine((value, ctx) => {
`,J+=`for (const key in value) {
`,G)if($.properties)J+=`let evaluated = [${Object.keys($.properties).map((K)=>JSON.stringify(K)).join(", ")}].includes(key)
`;else J+=`let evaluated = false
`;for(let K in $.patternProperties){if(J+="if (key.match(new RegExp("+JSON.stringify(K)+`))) {
`,G)J+=`evaluated = true
`;J+="const result = "+W[K]+`.safeParse(value[key])
`,J+=`if (!result.success) {
`,J+=`ctx.addIssue({
          path: [...ctx.path, key],
          code: 'custom',
          message: \`Invalid input: Key matching regex /\${key}/ must match schema\`,
          params: {
            issues: result.error.issues
          }
        })
`,J+=`}
`,J+=`}
`}if(G)J+=`if (!evaluated) {
`,J+="const result = "+G+`.safeParse(value[key])
`,J+=`if (!result.success) {
`,J+=`ctx.addIssue({
          path: [...ctx.path, key],
          code: 'custom',
          message: \`Invalid input: must match catchall schema\`,
          params: {
            issues: result.error.issues
          }
        })
`,J+=`}
`,J+=`}
`;J+=`}
`,J+="})"}let Q=X?J?X+J:G?G==="z.never()"?X+".strict()":X+`.catchall(${G})`:X:J?J:G?`z.record(${G})`:"z.record(z.any())";if(n9.an.anyOf($))Q+=`.and(${Hj({...$,anyOf:$.anyOf.map((W)=>typeof W==="object"&&!W.type&&(W.properties||W.additionalProperties||W.patternProperties)?{...W,type:"object"}:W)},Y)})`;if(n9.a.oneOf($))Q+=`.and(${zj({...$,oneOf:$.oneOf.map((W)=>typeof W==="object"&&!W.type&&(W.properties||W.additionalProperties||W.patternProperties)?{...W,type:"object"}:W)},Y)})`;if(n9.an.allOf($))Q+=`.and(${QD({...$,allOf:$.allOf.map((W)=>typeof W==="object"&&!W.type&&(W.properties||W.additionalProperties||W.patternProperties)?{...W,type:"object"}:W)},Y)})`;return Q}function L80($,Y={}){return h04($,{...Y,parserOverride:wC8}).replace(/\.reduce<[^>]+>/g,".reduce")}var wC8=($,Y)=>{let X="",G=Y.seen.get($);if(n9.an.anyOf($)){let J=$.anyOf.every((Q)=>typeof Q==="object"&&n9.an.object(Q)&&Q.properties!==void 0);if($.anyOf.length>1&&J){let Q=$.anyOf.reduce((W,K)=>{if(typeof K==="object"&&n9.an.object(K)){let Z=Object.entries(K.properties??{}).filter(([H,z])=>typeof z==="object"&&z?.const!==void 0);if(Z?.length){let H=Z.map(([z,V])=>z);W.push(H)}}return W},[]);if(Q.length===$.anyOf.length){if(G){if(G.r!==void 0)return G.r;if(Y.depth===void 0||G.n>=Y.depth)return"z.any()";G.n+=1}else G={r:void 0,n:0},Y.seen.set($,G);let W=Q.length>0&&Q[0]?Q.reduce((K,Z)=>{return K.filter((H)=>Z.includes(H))},Q[0]):[];if(W.length>0){let K=W[0];if(K)X=`z.discriminatedUnion("${K}", [${$.anyOf.map((Z,H)=>F8(Z,{...Y,path:[...Y.path,"anyOf",H]})).join(", ")}])`}}}}else if(n9.an.object($)){if(G){if(G.r!==void 0)return G.r;if(Y.depth===void 0||G.n>=Y.depth)return"z.any()";G.n+=1}else G={r:void 0,n:0},Y.seen.set($,G);X=PC8($,Y)}if(X){if(!Y.withoutDescribes)X=_C8($,X);if(!Y.withoutDefaults)X=jC8($,X);if(X=TC8($,X),G)G.r=X;return X}},_C8=($,Y)=>{if($.description)Y+=`.describe(${JSON.stringify($.description)})`;return Y},jC8=($,Y)=>{if($.default!==void 0)Y+=`.default(${JSON.stringify($.default)})`;return Y},TC8=($,Y)=>{if($.readOnly)Y+=".readonly()";return Y};var Cv0=V0(()=>{Iv0();Iv0()});function I3($){if(!$||typeof $!=="object")return $;if($[f04])return $;$[f04]=!0;let Y=$._zod?.def;if(Y?.type==="record"&&Y.keyType&&!Y.valueType)Y.valueType=Y.keyType,Y.keyType=U.string();if(!Y)return $;if(Y.type==="object"&&Y.shape){let X=typeof Y.shape==="function"?Y.shape():Y.shape;for(let G of Object.keys(X))I3(X[G])}if(Y.type==="array"&&Y.element)I3(Y.element);if(Y.type==="union"&&Y.options)Y.options.forEach(I3);if(Y.type==="record"){if(Y.keyType)I3(Y.keyType);if(Y.valueType)I3(Y.valueType)}if(Y.type==="intersection"){if(Y.left)I3(Y.left);if(Y.right)I3(Y.right)}if(Y.type==="lazy"){if(Y.getter&&typeof Y.getter==="function"){let X=Y.getter;Y.getter=function(){let G=X();if(G)I3(G);return G}}}if(Y.innerType)I3(Y.innerType);return $}function iz($){if(typeof $!=="object"||$===null)return $;let Y={...$};if(Y.anyOf&&Array.isArray(Y.anyOf)&&Y.anyOf.length===2){let X=Y.anyOf.find((J)=>typeof J==="object"&&J!==null&&J.type==="null"),G=Y.anyOf.find((J)=>typeof J==="object"&&J!==null&&J.type!=="null");if(X&&G&&typeof G==="object"&&G.type){let{anyOf:J,...Q}=Y,W=iz(Q),K=iz(G);return{...W,...K,type:Array.isArray(K.type)?[...K.type,"null"]:[K.type,"null"]}}}if(Y.properties&&typeof Y.properties==="object"&&!Array.isArray(Y.properties))Y.properties=Object.fromEntries(Object.entries(Y.properties).map(([X,G])=>{let J=G;if(typeof J==="object"&&J!==null&&!Array.isArray(J)&&Object.keys(J).length===0)return[X,{type:["string","number","boolean","null"]}];return[X,iz(J)]}));if(Y.items)if(Array.isArray(Y.items))Y.items=Y.items.map((X)=>iz(X));else Y.items=iz(Y.items);if(Y.anyOf&&Array.isArray(Y.anyOf))Y.anyOf=Y.anyOf.map((X)=>iz(X));if(Y.oneOf&&Array.isArray(Y.oneOf))Y.oneOf=Y.oneOf.map((X)=>iz(X));if(Y.allOf&&Array.isArray(Y.allOf))Y.allOf=Y.allOf.map((X)=>iz(X));return Y}function nz($){if(typeof $!=="object"||$===null)return $;let Y={...$};if(Y.type==="object"&&Y.properties)Y.required=Object.keys(Y.properties),Y.properties=Object.fromEntries(Object.entries(Y.properties).map(([X,G])=>[X,nz(G)]));if(Y.items){if(Array.isArray(Y.items))Y.items=Y.items.map((X)=>nz(X));else if(typeof Y.items==="object")Y.items=nz(Y.items)}if(Y.additionalProperties&&typeof Y.additionalProperties==="object")Y.additionalProperties=nz(Y.additionalProperties);if(Y.anyOf&&Array.isArray(Y.anyOf))Y.anyOf=Y.anyOf.map((X)=>nz(X));if(Y.oneOf&&Array.isArray(Y.oneOf))Y.oneOf=Y.oneOf.map((X)=>nz(X));if(Y.allOf&&Array.isArray(Y.allOf))Y.allOf=Y.allOf.map((X)=>nz(X));return Y}function Sv0($){let Y=nz($);return lO(Y)}function lO($){if(typeof $!=="object"||$===null)return $;let Y={...$};if(Y.type==="object"||Y.properties)Y.additionalProperties=!1;if(Y.properties)Y.properties=Object.fromEntries(Object.entries(Y.properties).map(([X,G])=>[X,lO(G)]));if(Y.items){if(Array.isArray(Y.items))Y.items=Y.items.map((X)=>lO(X));else if(typeof Y.items==="object")Y.items=lO(Y.items)}if(Y.anyOf&&Array.isArray(Y.anyOf))Y.anyOf=Y.anyOf.map((X)=>lO(X));if(Y.oneOf&&Array.isArray(Y.oneOf))Y.oneOf=Y.oneOf.map((X)=>lO(X));if(Y.allOf&&Array.isArray(Y.allOf))Y.allOf=Y.allOf.map((X)=>lO(X));return Y}function g04($,Y="jsonSchema7",X="relative"){if($?._zod){I3($);let G=U.toJSONSchema($,{unrepresentable:"any",override:(J)=>{let Q=J.zodSchema?._def||J.zodSchema?._zod?.def;if(Q&&(Q.typeName==="ZodDate"||Q.type==="date"))J.jsonSchema.type="string",J.jsonSchema.format="date-time";if(Q&&(Q.typeName==="ZodObject"||Q.type==="object"))J.jsonSchema.additionalProperties=!1}});return iz(G)}else return A40($,{$refStrategy:X,target:Y})}var f04;var kv0=V0(()=>{O1();B40();f04=Symbol("__mastra_patched__")});function Kg($,Y){if($===Y)return!0;if($==null||Y==null)return $===Y;if(typeof $!==typeof Y)return!1;if(Array.isArray($)&&Array.isArray(Y)){if($.length!==Y.length)return!1;return $.every((X,G)=>Kg(X,Y[G]))}if(typeof $==="object"&&typeof Y==="object"){let X=Object.keys($),G=Object.keys(Y);if(X.length!==G.length)return!1;return X.every((J)=>G.includes(J)&&Kg($[J],Y[J]))}return!1}function oC8(){return($)=>{if(!Array.isArray($))return!0;let Y=[];return $.every((X)=>{if(Y.some((J)=>Kg(X,J)))return!1;return Y.push(X),!0})}}function D80($,Y){return $.safeParse(Y).success}function UG($){if(typeof $==="boolean")return $?U.any():U.never();let Y={};for(let J of zS8)J.apply(Y,$);let X=[];if(Y.string!==!1)X.push(Y.string||U.string());if(Y.number!==!1)X.push(Y.number||U.number());if(Y.boolean!==!1)X.push(Y.boolean||U.boolean());if(Y.null!==!1)X.push(Y.null||U.null());if(Y.array!==!1)X.push(Y.array||U.array(U.any()));if(Y.tuple!==!1&&Y.tuple!==void 0)X.push(Y.tuple);if(Y.object!==!1)if(Y.object)X.push(Y.object);else{let J=U.custom((Q)=>{return typeof Q==="object"&&Q!==null&&!Array.isArray(Q)},"Must be an object, not an array");X.push(J)}if(Y.file!==!1&&Y.file!==void 0)X.push(Y.file);let G;if(X.length===0)G=U.never();else if(X.length===1)G=X[0];else if(!Object.keys($).some((Q)=>Q!=="$schema"&&Q!=="title"&&Q!=="description"))G=U.any();else G=U.union(X);for(let J of VS8)G=J.apply(G,$);return G}var IC8=class{apply($,Y){if(!Y.type)return;let X=Array.isArray(Y.type)?Y.type:[Y.type],G=new Set(X);if(!G.has("string"))$.string=!1;if(!G.has("number")&&!G.has("integer"))$.number=!1;if(!G.has("boolean"))$.boolean=!1;if(!G.has("null"))$.null=!1;if(!G.has("array"))$.array=!1;if(!G.has("object"))$.object=!1;if(G.has("integer")&&$.number!==!1){let J=$.number||U.number();if(J instanceof U.ZodNumber)$.number=J.int()}}},CC8=class{apply($,Y){if(Y.const===void 0)return;let X=Y.const;if($.string=!1,$.number=!1,$.boolean=!1,$.null=!1,$.array=!1,$.object=!1,typeof X==="string")$.string=U.literal(X);else if(typeof X==="number")$.number=U.literal(X);else if(typeof X==="boolean")$.boolean=U.literal(X);else if(X===null)$.null=U.null();else if(Array.isArray(X))$.array=void 0;else if(typeof X==="object")$.object=void 0}},SC8=class{apply($,Y){if(!Y.enum)return;if(Y.enum.length===0){if(!Y.type)$.string=!1,$.number=!1,$.boolean=!1,$.null=!1,$.array=!1,$.object=!1;return}let X={string:Y.enum.filter((G)=>typeof G==="string"),number:Y.enum.filter((G)=>typeof G==="number"),boolean:Y.enum.filter((G)=>typeof G==="boolean"),null:Y.enum.filter((G)=>G===null),array:Y.enum.filter((G)=>Array.isArray(G)),object:Y.enum.filter((G)=>typeof G==="object"&&G!==null&&!Array.isArray(G))};$.string=this.createTypeSchema(X.string,"string"),$.number=this.createTypeSchema(X.number,"number"),$.boolean=this.createTypeSchema(X.boolean,"boolean"),$.null=X.null.length>0?U.null():!1,$.array=X.array.length>0?void 0:!1,$.object=X.object.length>0?void 0:!1}createTypeSchema($,Y){if($.length===0)return!1;if($.length===1)return U.literal($[0]);if(Y==="string")return U.enum($);if(Y==="number"){let[X,G,...J]=$;return U.union([U.literal(X),U.literal(G),...J.map((Q)=>U.literal(Q))])}if(Y==="boolean")return U.union([U.literal(!0),U.literal(!1)]);return!1}},kC8=class{apply($,Y){let X=Y;if(X.type==="string"&&X.format==="binary"&&X.contentEncoding==="binary"){let G=U.file();if(X.minLength!==void 0)G=G.min(X.minLength);if(X.maxLength!==void 0)G=G.max(X.maxLength);if(X.contentMediaType!==void 0)G=G.mime(X.contentMediaType);$.file=G,$.string=!1}}},vC8=class{apply($,Y){let X=Y;if(Y.type===void 0&&(X.minLength!==void 0||X.maxLength!==void 0||X.pattern!==void 0)){if($.string===void 0)$.string=U.string()}}},xC8=class{apply($,Y){let X=Y;if(X.minLength===void 0)return;if($.string!==!1){let G=$.string||U.string();if(G instanceof U.ZodString)$.string=G.refine((J)=>{return Array.from(J).length>=X.minLength},{message:`String must be at least ${X.minLength} characters long`})}}},yC8=class{apply($,Y){let X=Y;if(X.maxLength===void 0)return;if($.string!==!1){let G=$.string||U.string();if(G instanceof U.ZodString)$.string=G.refine((J)=>{return Array.from(J).length<=X.maxLength},{message:`String must be at most ${X.maxLength} characters long`})}}},bC8=class{apply($,Y){let X=Y;if(!X.pattern)return;if($.string!==!1){let G=$.string||U.string();if(G instanceof U.ZodString){let J=new RegExp(X.pattern);$.string=G.regex(J)}}}},hC8=class{apply($,Y){let X=Y;if(X.minimum===void 0)return;if($.number!==!1){let G=$.number||U.number();if(G instanceof U.ZodNumber)$.number=G.min(X.minimum)}}},fC8=class{apply($,Y){let X=Y;if(X.maximum===void 0)return;if($.number!==!1){let G=$.number||U.number();if(G instanceof U.ZodNumber)$.number=G.max(X.maximum)}}},gC8=class{apply($,Y){let X=Y;if(X.exclusiveMinimum===void 0)return;if($.number!==!1){let G=$.number||U.number();if(G instanceof U.ZodNumber)if(typeof X.exclusiveMinimum==="number")$.number=G.gt(X.exclusiveMinimum);else $.number=!1}}},mC8=class{apply($,Y){let X=Y;if(X.exclusiveMaximum===void 0)return;if($.number!==!1){let G=$.number||U.number();if(G instanceof U.ZodNumber)if(typeof X.exclusiveMaximum==="number")$.number=G.lt(X.exclusiveMaximum);else $.number=!1}}},uC8=class{apply($,Y){let X=Y;if(X.multipleOf===void 0)return;if($.number!==!1){let G=$.number||U.number();if(G instanceof U.ZodNumber)$.number=G.refine((J)=>{if(X.multipleOf===0)return!1;let Q=J/X.multipleOf,W=Math.round(Q),K=Math.min(Math.abs(J)*Number.EPSILON*10,Math.abs(X.multipleOf)*Number.EPSILON*10);return Math.abs(Q-W)<=K/Math.abs(X.multipleOf)},{message:`Must be a multiple of ${X.multipleOf}`})}}},pC8=class{apply($,Y){let X=Y;if(Y.type===void 0&&(X.minItems!==void 0||X.maxItems!==void 0||X.items!==void 0||X.prefixItems!==void 0)){if($.array===void 0)$.array=U.array(U.any())}}},dC8=class{apply($,Y){let X=Y;if(X.minItems===void 0)return;if($.array!==!1)$.array=($.array||U.array(U.any())).min(X.minItems)}},cC8=class{apply($,Y){let X=Y;if(X.maxItems===void 0)return;if($.array!==!1)$.array=($.array||U.array(U.any())).max(X.maxItems)}},lC8=class{apply($,Y){let X=Y;if($.array===!1)return;if(Array.isArray(X.items))$.array=$.array||U.array(U.any());else if(X.items&&typeof X.items!=="boolean"&&!X.prefixItems){let G=UG(X.items),J=U.array(G);if($.array&&$.array instanceof U.ZodArray){let Q=$.array._def;if(Q.checks)Q.checks.forEach((W)=>{if(W._zod&&W._zod.def){let K=W._zod.def;if(K.check==="min_length"&&K.minimum!==void 0)J=J.min(K.minimum);else if(K.check==="max_length"&&K.maximum!==void 0)J=J.max(K.maximum)}})}$.array=J}else if(typeof X.items==="boolean"&&X.items===!1)if(!X.prefixItems)$.array=U.array(U.any()).max(0);else $.array=$.array||U.array(U.any());else if(typeof X.items==="boolean"&&X.items===!0)$.array=$.array||U.array(U.any());else if(X.prefixItems)$.array=$.array||U.array(U.any())}},iC8=class{apply($,Y){if(Y.type!=="array")return;let X=Y;if(!Array.isArray(X.items))return;if($.array===!1)return;let G=X.items.map((Q)=>UG(Q)),J;if(G.length===0)J=U.tuple([]);else J=U.tuple(G);if(X.minItems!==void 0&&X.minItems>G.length)J=!1;if(X.maxItems!==void 0&&X.maxItems<G.length)J=!1;$.tuple=J,$.array=!1}},nC8=class{apply($,Y){let X=Y;if($.object===!1)return;if(X.properties||X.required||X.additionalProperties!==void 0)$.object=$.object||U.object({}).passthrough()}},rC8=class{apply($,Y){let X=Y;if(Y.type===void 0&&(X.maxProperties!==void 0||X.minProperties!==void 0)){if($.object===void 0)$.object=U.object({}).passthrough()}}},aC8=class{apply($,Y){let X=Y;if(X.maxProperties===void 0)return;if($.object!==!1){let G=$.object||U.object({}).passthrough();$.object=G.refine((J)=>Object.keys(J).length<=X.maxProperties,{message:`Object must have at most ${X.maxProperties} properties`})}}},sC8=class{apply($,Y){let X=Y;if(X.minProperties===void 0)return;if($.object!==!1){let G=$.object||U.object({}).passthrough();$.object=G.refine((J)=>Object.keys(J).length>=X.minProperties,{message:`Object must have at least ${X.minProperties} properties`})}}},tC8=class{apply($,Y){if(!Y.not)return $;let X=UG(Y.not);return $.refine((G)=>!D80(X,G),{message:"Value must not match the 'not' schema"})}},eC8=class{apply($,Y){if(Y.uniqueItems!==!0)return $;return $.refine(oC8(),{message:"Array items must be unique"})}},$S8=class{apply($,Y){if(!Y.allOf||Y.allOf.length===0)return $;return Y.allOf.map((G)=>UG(G)).reduce((G,J)=>U.intersection(G,J),$)}},YS8=class{apply($,Y){if(!Y.anyOf||Y.anyOf.length===0)return $;let X=Y.anyOf.length===1?UG(Y.anyOf[0]):U.union([UG(Y.anyOf[0]),UG(Y.anyOf[1]),...Y.anyOf.slice(2).map((G)=>UG(G))]);return U.intersection($,X)}},XS8=class{apply($,Y){if(!Y.oneOf||Y.oneOf.length===0)return $;let X=Y.oneOf.map((G)=>UG(G));return $.refine((G)=>{let J=0;for(let Q of X)if(Q.safeParse(G).success){if(J++,J>1)return!1}return J===1},{message:"Value must match exactly one of the oneOf schemas"})}},GS8=class{apply($,Y){let X=Y;if(X.prefixItems&&Array.isArray(X.prefixItems)){let J=X.prefixItems.map((Q)=>UG(Q));return $.refine((Q)=>{if(!Array.isArray(Q))return!0;for(let W=0;W<Math.min(Q.length,J.length);W++)if(!D80(J[W],Q[W]))return!1;if(Q.length>J.length){if(typeof X.items==="boolean"&&X.items===!1)return!1;else if(X.items&&typeof X.items==="object"&&!Array.isArray(X.items)){let W=UG(X.items);for(let K=J.length;K<Q.length;K++)if(!D80(W,Q[K]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return $}},JS8=class{apply($,Y){let X=Y;if(!X.properties&&!X.required&&X.additionalProperties!==!1)return $;if($ instanceof U.ZodObject||$ instanceof U.ZodRecord){let G={};if(X.properties){for(let[J,Q]of Object.entries(X.properties))if(Q!==void 0)G[J]=UG(Q)}if(X.required&&Array.isArray(X.required)){let J=new Set(X.required);for(let Q of Object.keys(G))if(!J.has(Q))G[Q]=G[Q].optional()}else for(let J of Object.keys(G))G[J]=G[J].optional();if(X.additionalProperties===!1)return U.object(G);else return U.object(G).passthrough()}return $.refine((G)=>{if(typeof G!=="object"||G===null||Array.isArray(G))return!0;if(X.properties){for(let[J,Q]of Object.entries(X.properties))if(Q!==void 0){if(Object.getOwnPropertyDescriptor(G,J)!==void 0){if(!UG(Q).safeParse(G[J]).success)return!1}}}if(X.required&&Array.isArray(X.required)){for(let J of X.required)if(Object.getOwnPropertyDescriptor(G,J)===void 0)return!1}if(X.additionalProperties===!1&&X.properties){let J=new Set(Object.keys(X.properties));for(let Q in G)if(!J.has(Q))return!1}return!0},{message:"Object constraints validation failed"})}},QS8=class{apply($,Y){if(!Y.enum||Y.enum.length===0)return $;let X=Y.enum.filter((G)=>Array.isArray(G)||typeof G==="object"&&G!==null);if(X.length===0)return $;return $.refine((G)=>{if(typeof G!=="object"||G===null)return!0;return X.some((J)=>Kg(G,J))},{message:"Value must match one of the enum values"})}},WS8=class{apply($,Y){if(Y.const===void 0)return $;let X=Y.const;if(typeof X!=="object"||X===null)return $;return $.refine((G)=>Kg(G,X),{message:"Value must equal the const value"})}},KS8=class{apply($,Y){if(Y.description)$=$.describe(Y.description);return $}},ZS8=class{apply($,Y){var X;let G=Y;if(!((X=G.required)==null?void 0:X.includes("__proto__"))||Y.type!==void 0)return $;return U.any().refine((J)=>this.validateRequired(J,G.required),{message:"Missing required properties"})}validateRequired($,Y){if(typeof $!=="object"||$===null||Array.isArray($))return!0;return Y.every((X)=>Object.prototype.hasOwnProperty.call($,X))}},US8=class{apply($,Y){var X;let G=Y;if(G.contains===void 0)return $;let J=UG(G.contains),Q=(X=G.minContains)!=null?X:1,W=G.maxContains;return $.refine((K)=>{if(!Array.isArray(K))return!0;let Z=0;for(let H of K)if(D80(J,H))Z++;if(Z<Q)return!1;if(W!==void 0&&Z>W)return!1;return!0},{message:"Array must contain required items matching the schema"})}},HS8=class{apply($,Y){let{default:X}=Y;if(X===void 0)return $;if(!$.safeParse(X).success)return $;return $.default(X)}},zS8,VS8;var m04=V0(()=>{O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();zS8=[new CC8,new SC8,new IC8,new kC8,new vC8,new pC8,new rC8,new xC8,new yC8,new bC8,new hC8,new fC8,new gC8,new mC8,new uC8,new iC8,new dC8,new cC8,new lC8,new aC8,new sC8,new nC8],VS8=[new ZS8,new QS8,new WS8,new $S8,new YS8,new XS8,new GS8,new JS8,new US8,new tC8,new eC8,new HS8,new KS8]});var L8,vv0,h1,C3=($)=>{switch(typeof $){case"undefined":return h1.undefined;case"string":return h1.string;case"number":return Number.isNaN($)?h1.nan:h1.number;case"boolean":return h1.boolean;case"function":return h1.function;case"bigint":return h1.bigint;case"symbol":return h1.symbol;case"object":if(Array.isArray($))return h1.array;if($===null)return h1.null;if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return h1.promise;if(typeof Map<"u"&&$ instanceof Map)return h1.map;if(typeof Set<"u"&&$ instanceof Set)return h1.set;if(typeof Date<"u"&&$ instanceof Date)return h1.date;return h1.object;default:return h1.unknown}};var Zg=V0(()=>{(function($){$.assertEqual=(J)=>{};function Y(J){}$.assertIs=Y;function X(J){throw Error()}$.assertNever=X,$.arrayToEnum=(J)=>{let Q={};for(let W of J)Q[W]=W;return Q},$.getValidEnumValues=(J)=>{let Q=$.objectKeys(J).filter((K)=>typeof J[J[K]]!=="number"),W={};for(let K of Q)W[K]=J[K];return $.objectValues(W)},$.objectValues=(J)=>{return $.objectKeys(J).map(function(Q){return J[Q]})},$.objectKeys=typeof Object.keys==="function"?(J)=>Object.keys(J):(J)=>{let Q=[];for(let W in J)if(Object.prototype.hasOwnProperty.call(J,W))Q.push(W);return Q},$.find=(J,Q)=>{for(let W of J)if(Q(W))return W;return},$.isInteger=typeof Number.isInteger==="function"?(J)=>Number.isInteger(J):(J)=>typeof J==="number"&&Number.isFinite(J)&&Math.floor(J)===J;function G(J,Q=" | "){return J.map((W)=>typeof W==="string"?`'${W}'`:W).join(Q)}$.joinValues=G,$.jsonStringifyReplacer=(J,Q)=>{if(typeof Q==="bigint")return Q.toString();return Q}})(L8||(L8={}));(function($){$.mergeShapes=(Y,X)=>{return{...Y,...X}}})(vv0||(vv0={}));h1=L8.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var B1,FS8=($)=>{return JSON.stringify($,null,2).replace(/"([^"]+)":/g,"$1:")},MQ;var N80=V0(()=>{Zg();B1=L8.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);MQ=class MQ extends Error{get errors(){return this.issues}constructor($){super();this.issues=[],this.addIssue=(X)=>{this.issues=[...this.issues,X]},this.addIssues=(X=[])=>{this.issues=[...this.issues,...X]};let Y=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,Y);else this.__proto__=Y;this.name="ZodError",this.issues=$}format($){let Y=$||function(J){return J.message},X={_errors:[]},G=(J)=>{for(let Q of J.issues)if(Q.code==="invalid_union")Q.unionErrors.map(G);else if(Q.code==="invalid_return_type")G(Q.returnTypeError);else if(Q.code==="invalid_arguments")G(Q.argumentsError);else if(Q.path.length===0)X._errors.push(Y(Q));else{let W=X,K=0;while(K<Q.path.length){let Z=Q.path[K];if(K!==Q.path.length-1)W[Z]=W[Z]||{_errors:[]};else W[Z]=W[Z]||{_errors:[]},W[Z]._errors.push(Y(Q));W=W[Z],K++}}};return G(this),X}static assert($){if(!($ instanceof MQ))throw Error(`Not a ZodError: ${$}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,L8.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten($=(Y)=>Y.message){let Y={},X=[];for(let G of this.issues)if(G.path.length>0){let J=G.path[0];Y[J]=Y[J]||[],Y[J].push($(G))}else X.push($(G));return{formErrors:X,fieldErrors:Y}}get formErrors(){return this.flatten()}};MQ.create=($)=>{return new MQ($)}});var LS8=($,Y)=>{let X;switch($.code){case B1.invalid_type:if($.received===h1.undefined)X="Required";else X=`Expected ${$.expected}, received ${$.received}`;break;case B1.invalid_literal:X=`Invalid literal value, expected ${JSON.stringify($.expected,L8.jsonStringifyReplacer)}`;break;case B1.unrecognized_keys:X=`Unrecognized key(s) in object: ${L8.joinValues($.keys,", ")}`;break;case B1.invalid_union:X="Invalid input";break;case B1.invalid_union_discriminator:X=`Invalid discriminator value. Expected ${L8.joinValues($.options)}`;break;case B1.invalid_enum_value:X=`Invalid enum value. Expected ${L8.joinValues($.options)}, received '${$.received}'`;break;case B1.invalid_arguments:X="Invalid function arguments";break;case B1.invalid_return_type:X="Invalid function return type";break;case B1.invalid_date:X="Invalid date";break;case B1.invalid_string:if(typeof $.validation==="object")if("includes"in $.validation){if(X=`Invalid input: must include "${$.validation.includes}"`,typeof $.validation.position==="number")X=`${X} at one or more positions greater than or equal to ${$.validation.position}`}else if("startsWith"in $.validation)X=`Invalid input: must start with "${$.validation.startsWith}"`;else if("endsWith"in $.validation)X=`Invalid input: must end with "${$.validation.endsWith}"`;else L8.assertNever($.validation);else if($.validation!=="regex")X=`Invalid ${$.validation}`;else X="Invalid";break;case B1.too_small:if($.type==="array")X=`Array must contain ${$.exact?"exactly":$.inclusive?"at least":"more than"} ${$.minimum} element(s)`;else if($.type==="string")X=`String must contain ${$.exact?"exactly":$.inclusive?"at least":"over"} ${$.minimum} character(s)`;else if($.type==="number")X=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="bigint")X=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="date")X=`Date must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${new Date(Number($.minimum))}`;else X="Invalid input";break;case B1.too_big:if($.type==="array")X=`Array must contain ${$.exact?"exactly":$.inclusive?"at most":"less than"} ${$.maximum} element(s)`;else if($.type==="string")X=`String must contain ${$.exact?"exactly":$.inclusive?"at most":"under"} ${$.maximum} character(s)`;else if($.type==="number")X=`Number must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="bigint")X=`BigInt must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="date")X=`Date must be ${$.exact?"exactly":$.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number($.maximum))}`;else X="Invalid input";break;case B1.custom:X="Invalid input";break;case B1.invalid_intersection_types:X="Intersection results could not be merged";break;case B1.not_multiple_of:X=`Number must be a multiple of ${$.multipleOf}`;break;case B1.not_finite:X="Number must be finite";break;default:X=Y.defaultError,L8.assertNever($)}return{message:X}},rz;var xv0=V0(()=>{N80();Zg();rz=LS8});function DS8($){u04=$}function Vj(){return u04}var u04;var A80=V0(()=>{xv0();u04=rz});function o1($,Y){let X=Vj(),G=Ug({issueData:Y,data:$.data,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,X,X===rz?void 0:rz].filter((J)=>!!J)});$.common.issues.push(G)}class AX{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray($,Y){let X=[];for(let G of Y){if(G.status==="aborted")return o4;if(G.status==="dirty")$.dirty();X.push(G.value)}return{status:$.value,value:X}}static async mergeObjectAsync($,Y){let X=[];for(let G of Y){let J=await G.key,Q=await G.value;X.push({key:J,value:Q})}return AX.mergeObjectSync($,X)}static mergeObjectSync($,Y){let X={};for(let G of Y){let{key:J,value:Q}=G;if(J.status==="aborted")return o4;if(Q.status==="aborted")return o4;if(J.status==="dirty")$.dirty();if(Q.status==="dirty")$.dirty();if(J.value!=="__proto__"&&(typeof Q.value<"u"||G.alwaysSet))X[J.value]=Q.value}return{status:$.value,value:X}}}var Ug=($)=>{let{data:Y,path:X,errorMaps:G,issueData:J}=$,Q=[...X,...J.path||[]],W={...J,path:Q};if(J.message!==void 0)return{...J,path:Q,message:J.message};let K="",Z=G.filter((H)=>!!H).slice().reverse();for(let H of Z)K=H(W,{data:Y,defaultError:K}).message;return{...J,path:Q,message:K}},NS8,o4,iO=($)=>({status:"dirty",value:$}),HG=($)=>({status:"valid",value:$}),B80=($)=>$.status==="aborted",O80=($)=>$.status==="dirty",WD=($)=>$.status==="valid",Fj=($)=>typeof Promise<"u"&&$ instanceof Promise;var yv0=V0(()=>{A80();xv0();NS8=[];o4=Object.freeze({status:"aborted"})});var p04=()=>{};var I4;var d04=V0(()=>{(function($){$.errToObj=(Y)=>typeof Y==="string"?{message:Y}:Y||{},$.toString=(Y)=>typeof Y==="string"?Y:Y?.message})(I4||(I4={}))});class kZ{constructor($,Y,X,G){this._cachedPath=[],this.parent=$,this.data=Y,this._path=X,this._key=G}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}function x6($){if(!$)return{};let{errorMap:Y,invalid_type_error:X,required_error:G,description:J}=$;if(Y&&(X||G))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(Y)return{errorMap:Y,description:J};return{errorMap:(W,K)=>{let{message:Z}=$;if(W.code==="invalid_enum_value")return{message:Z??K.defaultError};if(typeof K.data>"u")return{message:Z??G??K.defaultError};if(W.code!=="invalid_type")return{message:K.defaultError};return{message:Z??X??K.defaultError}},description:J}}class s6{get description(){return this._def.description}_getType($){return C3($.data)}_getOrReturnCtx($,Y){return Y||{common:$.parent.common,data:$.data,parsedType:C3($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}_processInputParams($){return{status:new AX,ctx:{common:$.parent.common,data:$.data,parsedType:C3($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}}_parseSync($){let Y=this._parse($);if(Fj(Y))throw Error("Synchronous parse encountered promise.");return Y}_parseAsync($){let Y=this._parse($);return Promise.resolve(Y)}parse($,Y){let X=this.safeParse($,Y);if(X.success)return X.data;throw X.error}safeParse($,Y){let X={common:{issues:[],async:Y?.async??!1,contextualErrorMap:Y?.errorMap},path:Y?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:C3($)},G=this._parseSync({data:$,path:X.path,parent:X});return c04(X,G)}"~validate"($){let Y={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:C3($)};if(!this["~standard"].async)try{let X=this._parseSync({data:$,path:[],parent:Y});return WD(X)?{value:X.value}:{issues:Y.common.issues}}catch(X){if(X?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;Y.common={issues:[],async:!0}}return this._parseAsync({data:$,path:[],parent:Y}).then((X)=>WD(X)?{value:X.value}:{issues:Y.common.issues})}async parseAsync($,Y){let X=await this.safeParseAsync($,Y);if(X.success)return X.data;throw X.error}async safeParseAsync($,Y){let X={common:{issues:[],contextualErrorMap:Y?.errorMap,async:!0},path:Y?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:C3($)},G=this._parse({data:$,path:X.path,parent:X}),J=await(Fj(G)?G:Promise.resolve(G));return c04(X,J)}refine($,Y){let X=(G)=>{if(typeof Y==="string"||typeof Y>"u")return{message:Y};else if(typeof Y==="function")return Y(G);else return Y};return this._refinement((G,J)=>{let Q=$(G),W=()=>J.addIssue({code:B1.custom,...X(G)});if(typeof Promise<"u"&&Q instanceof Promise)return Q.then((K)=>{if(!K)return W(),!1;else return!0});if(!Q)return W(),!1;else return!0})}refinement($,Y){return this._refinement((X,G)=>{if(!$(X))return G.addIssue(typeof Y==="function"?Y(X,G):Y),!1;else return!0})}_refinement($){return new vZ({schema:this,typeName:Q6.ZodEffects,effect:{type:"refinement",refinement:$}})}superRefine($){return this._refinement($)}constructor($){this.spa=this.safeParseAsync,this._def=$,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(Y)=>this["~validate"](Y)}}optional(){return SZ.create(this,this._def)}nullable(){return sz.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return CZ.create(this)}promise(){return sO.create(this,this._def)}or($){return Oj.create([this,$],this._def)}and($){return Ej.create(this,$,this._def)}transform($){return new vZ({...x6(this._def),schema:this,typeName:Q6.ZodEffects,effect:{type:"transform",transform:$}})}default($){let Y=typeof $==="function"?$:()=>$;return new Pj({...x6(this._def),innerType:this,defaultValue:Y,typeName:Q6.ZodDefault})}brand(){return new M80({typeName:Q6.ZodBranded,type:this,...x6(this._def)})}catch($){let Y=typeof $==="function"?$:()=>$;return new wj({...x6(this._def),innerType:this,catchValue:Y,typeName:Q6.ZodCatch})}describe($){return new this.constructor({...this._def,description:$})}pipe($){return Dg.create(this,$)}readonly(){return _j.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function n04($){let Y="[0-5]\\d";if($.precision)Y=`${Y}\\.\\d{${$.precision}}`;else if($.precision==null)Y=`${Y}(\\.\\d+)?`;let X=$.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${Y})${X}`}function vS8($){return new RegExp(`^${n04($)}$`)}function r04($){let Y=`${i04}T${n04($)}`,X=[];if(X.push($.local?"Z?":"Z"),$.offset)X.push("([+-]\\d{2}:?\\d{2})");return Y=`${Y}(${X.join("|")})`,new RegExp(`^${Y}$`)}function xS8($,Y){if((Y==="v4"||!Y)&&_S8.test($))return!0;if((Y==="v6"||!Y)&&TS8.test($))return!0;return!1}function yS8($,Y){if(!RS8.test($))return!1;try{let[X]=$.split(".");if(!X)return!1;let G=X.replace(/-/g,"+").replace(/_/g,"/").padEnd(X.length+(4-X.length%4)%4,"="),J=JSON.parse(atob(G));if(typeof J!=="object"||J===null)return!1;if("typ"in J&&J?.typ!=="JWT")return!1;if(!J.alg)return!1;if(Y&&J.alg!==Y)return!1;return!0}catch{return!1}}function bS8($,Y){if((Y==="v4"||!Y)&&jS8.test($))return!0;if((Y==="v6"||!Y)&&IS8.test($))return!0;return!1}function hS8($,Y){let X=($.toString().split(".")[1]||"").length,G=(Y.toString().split(".")[1]||"").length,J=X>G?X:G,Q=Number.parseInt($.toFixed(J).replace(".","")),W=Number.parseInt(Y.toFixed(J).replace(".",""));return Q%W/10**J}function Lj($){if($ instanceof x$){let Y={};for(let X in $.shape){let G=$.shape[X];Y[X]=SZ.create(Lj(G))}return new x$({...$._def,shape:()=>Y})}else if($ instanceof CZ)return new CZ({...$._def,type:Lj($.element)});else if($ instanceof SZ)return SZ.create(Lj($.unwrap()));else if($ instanceof sz)return sz.create(Lj($.unwrap()));else if($ instanceof k3)return k3.create($.items.map((Y)=>Lj(Y)));else return $}function hv0($,Y){let X=C3($),G=C3(Y);if($===Y)return{valid:!0,data:$};else if(X===h1.object&&G===h1.object){let J=L8.objectKeys(Y),Q=L8.objectKeys($).filter((K)=>J.indexOf(K)!==-1),W={...$,...Y};for(let K of Q){let Z=hv0($[K],Y[K]);if(!Z.valid)return{valid:!1};W[K]=Z.data}return{valid:!0,data:W}}else if(X===h1.array&&G===h1.array){if($.length!==Y.length)return{valid:!1};let J=[];for(let Q=0;Q<$.length;Q++){let W=$[Q],K=Y[Q],Z=hv0(W,K);if(!Z.valid)return{valid:!1};J.push(Z.data)}return{valid:!0,data:J}}else if(X===h1.date&&G===h1.date&&+$===+Y)return{valid:!0,data:$};else return{valid:!1}}function a04($,Y){return new HD({values:$,typeName:Q6.ZodEnum,...x6(Y)})}function l04($,Y){let X=typeof $==="function"?$(Y):typeof $==="string"?{message:$}:$;return typeof X==="string"?{message:X}:X}function s04($,Y={},X){if($)return rO.create().superRefine((G,J)=>{let Q=$(G);if(Q instanceof Promise)return Q.then((W)=>{if(!W){let K=l04(Y,G),Z=K.fatal??X??!0;J.addIssue({code:"custom",...K,fatal:Z})}});if(!Q){let W=l04(Y,G),K=W.fatal??X??!0;J.addIssue({code:"custom",...W,fatal:K})}return});return rO.create()}var c04=($,Y)=>{if(WD(Y))return{success:!0,data:Y.value};else{if(!$.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let X=new MQ($.common.issues);return this._error=X,this._error}}}},AS8,BS8,OS8,ES8,MS8,RS8,qS8,PS8,wS8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",bv0,_S8,jS8,TS8,IS8,CS8,SS8,i04="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",kS8,IZ,ZD,UD,Nj,nO,Hg,Aj,Bj,rO,KD,S3,zg,CZ,x$,Oj,az=($)=>{if($ instanceof Mj)return az($.schema);else if($ instanceof vZ)return az($.innerType());else if($ instanceof Rj)return[$.value];else if($ instanceof HD)return $.options;else if($ instanceof qj)return L8.objectValues($.enum);else if($ instanceof Pj)return az($._def.innerType);else if($ instanceof Aj)return[void 0];else if($ instanceof Bj)return[null];else if($ instanceof SZ)return[void 0,...az($.unwrap())];else if($ instanceof sz)return[null,...az($.unwrap())];else if($ instanceof M80)return az($.unwrap());else if($ instanceof _j)return az($.unwrap());else if($ instanceof wj)return az($._def.innerType);else return[]},E80,Ej,k3,Vg,Fg,aO,Dj,Mj,Rj,HD,qj,sO,vZ,SZ,sz,Pj,wj,Lg,fS8,M80,Dg,_j,gS8,Q6,mS8=($,Y={message:`Input not instance of ${$.name}`})=>s04((X)=>X instanceof $,Y),o04,t04,uS8,pS8,e04,dS8,cS8,lS8,iS8,nS8,rS8,aS8,sS8,oS8,tS8,eS8,$k8,Yk8,Xk8,Gk8,Jk8,Qk8,Wk8,Kk8,Zk8,Uk8,Hk8,zk8,Vk8,Fk8,Lk8,Dk8,Nk8,Ak8,Bk8=()=>o04().optional(),Ok8=()=>t04().optional(),Ek8=()=>e04().optional(),Mk8,Rk8;var $14=V0(()=>{N80();A80();d04();yv0();Zg();AS8=/^c[^\s-]{8,}$/i,BS8=/^[0-9a-z]+$/,OS8=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ES8=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,MS8=/^[a-z0-9_-]{21}$/i,RS8=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,qS8=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,PS8=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_S8=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,jS8=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,TS8=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,IS8=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,CS8=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,SS8=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,kS8=new RegExp(`^${i04}$`);IZ=class IZ extends s6{_parse($){if(this._def.coerce)$.data=String($.data);if(this._getType($)!==h1.string){let J=this._getOrReturnCtx($);return o1(J,{code:B1.invalid_type,expected:h1.string,received:J.parsedType}),o4}let X=new AX,G=void 0;for(let J of this._def.checks)if(J.kind==="min"){if($.data.length<J.value)G=this._getOrReturnCtx($,G),o1(G,{code:B1.too_small,minimum:J.value,type:"string",inclusive:!0,exact:!1,message:J.message}),X.dirty()}else if(J.kind==="max"){if($.data.length>J.value)G=this._getOrReturnCtx($,G),o1(G,{code:B1.too_big,maximum:J.value,type:"string",inclusive:!0,exact:!1,message:J.message}),X.dirty()}else if(J.kind==="length"){let Q=$.data.length>J.value,W=$.data.length<J.value;if(Q||W){if(G=this._getOrReturnCtx($,G),Q)o1(G,{code:B1.too_big,maximum:J.value,type:"string",inclusive:!0,exact:!0,message:J.message});else if(W)o1(G,{code:B1.too_small,minimum:J.value,type:"string",inclusive:!0,exact:!0,message:J.message});X.dirty()}}else if(J.kind==="email"){if(!PS8.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"email",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="emoji"){if(!bv0)bv0=new RegExp(wS8,"u");if(!bv0.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"emoji",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="uuid"){if(!ES8.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"uuid",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="nanoid"){if(!MS8.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"nanoid",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="cuid"){if(!AS8.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"cuid",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="cuid2"){if(!BS8.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"cuid2",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="ulid"){if(!OS8.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"ulid",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="url")try{new URL($.data)}catch{G=this._getOrReturnCtx($,G),o1(G,{validation:"url",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="regex"){if(J.regex.lastIndex=0,!J.regex.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"regex",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="trim")$.data=$.data.trim();else if(J.kind==="includes"){if(!$.data.includes(J.value,J.position))G=this._getOrReturnCtx($,G),o1(G,{code:B1.invalid_string,validation:{includes:J.value,position:J.position},message:J.message}),X.dirty()}else if(J.kind==="toLowerCase")$.data=$.data.toLowerCase();else if(J.kind==="toUpperCase")$.data=$.data.toUpperCase();else if(J.kind==="startsWith"){if(!$.data.startsWith(J.value))G=this._getOrReturnCtx($,G),o1(G,{code:B1.invalid_string,validation:{startsWith:J.value},message:J.message}),X.dirty()}else if(J.kind==="endsWith"){if(!$.data.endsWith(J.value))G=this._getOrReturnCtx($,G),o1(G,{code:B1.invalid_string,validation:{endsWith:J.value},message:J.message}),X.dirty()}else if(J.kind==="datetime"){if(!r04(J).test($.data))G=this._getOrReturnCtx($,G),o1(G,{code:B1.invalid_string,validation:"datetime",message:J.message}),X.dirty()}else if(J.kind==="date"){if(!kS8.test($.data))G=this._getOrReturnCtx($,G),o1(G,{code:B1.invalid_string,validation:"date",message:J.message}),X.dirty()}else if(J.kind==="time"){if(!vS8(J).test($.data))G=this._getOrReturnCtx($,G),o1(G,{code:B1.invalid_string,validation:"time",message:J.message}),X.dirty()}else if(J.kind==="duration"){if(!qS8.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"duration",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="ip"){if(!xS8($.data,J.version))G=this._getOrReturnCtx($,G),o1(G,{validation:"ip",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="jwt"){if(!yS8($.data,J.alg))G=this._getOrReturnCtx($,G),o1(G,{validation:"jwt",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="cidr"){if(!bS8($.data,J.version))G=this._getOrReturnCtx($,G),o1(G,{validation:"cidr",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="base64"){if(!CS8.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"base64",code:B1.invalid_string,message:J.message}),X.dirty()}else if(J.kind==="base64url"){if(!SS8.test($.data))G=this._getOrReturnCtx($,G),o1(G,{validation:"base64url",code:B1.invalid_string,message:J.message}),X.dirty()}else L8.assertNever(J);return{status:X.value,value:$.data}}_regex($,Y,X){return this.refinement((G)=>$.test(G),{validation:Y,code:B1.invalid_string,...I4.errToObj(X)})}_addCheck($){return new IZ({...this._def,checks:[...this._def.checks,$]})}email($){return this._addCheck({kind:"email",...I4.errToObj($)})}url($){return this._addCheck({kind:"url",...I4.errToObj($)})}emoji($){return this._addCheck({kind:"emoji",...I4.errToObj($)})}uuid($){return this._addCheck({kind:"uuid",...I4.errToObj($)})}nanoid($){return this._addCheck({kind:"nanoid",...I4.errToObj($)})}cuid($){return this._addCheck({kind:"cuid",...I4.errToObj($)})}cuid2($){return this._addCheck({kind:"cuid2",...I4.errToObj($)})}ulid($){return this._addCheck({kind:"ulid",...I4.errToObj($)})}base64($){return this._addCheck({kind:"base64",...I4.errToObj($)})}base64url($){return this._addCheck({kind:"base64url",...I4.errToObj($)})}jwt($){return this._addCheck({kind:"jwt",...I4.errToObj($)})}ip($){return this._addCheck({kind:"ip",...I4.errToObj($)})}cidr($){return this._addCheck({kind:"cidr",...I4.errToObj($)})}datetime($){if(typeof $==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:$});return this._addCheck({kind:"datetime",precision:typeof $?.precision>"u"?null:$?.precision,offset:$?.offset??!1,local:$?.local??!1,...I4.errToObj($?.message)})}date($){return this._addCheck({kind:"date",message:$})}time($){if(typeof $==="string")return this._addCheck({kind:"time",precision:null,message:$});return this._addCheck({kind:"time",precision:typeof $?.precision>"u"?null:$?.precision,...I4.errToObj($?.message)})}duration($){return this._addCheck({kind:"duration",...I4.errToObj($)})}regex($,Y){return this._addCheck({kind:"regex",regex:$,...I4.errToObj(Y)})}includes($,Y){return this._addCheck({kind:"includes",value:$,position:Y?.position,...I4.errToObj(Y?.message)})}startsWith($,Y){return this._addCheck({kind:"startsWith",value:$,...I4.errToObj(Y)})}endsWith($,Y){return this._addCheck({kind:"endsWith",value:$,...I4.errToObj(Y)})}min($,Y){return this._addCheck({kind:"min",value:$,...I4.errToObj(Y)})}max($,Y){return this._addCheck({kind:"max",value:$,...I4.errToObj(Y)})}length($,Y){return this._addCheck({kind:"length",value:$,...I4.errToObj(Y)})}nonempty($){return this.min(1,I4.errToObj($))}trim(){return new IZ({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new IZ({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new IZ({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(($)=>$.kind==="datetime")}get isDate(){return!!this._def.checks.find(($)=>$.kind==="date")}get isTime(){return!!this._def.checks.find(($)=>$.kind==="time")}get isDuration(){return!!this._def.checks.find(($)=>$.kind==="duration")}get isEmail(){return!!this._def.checks.find(($)=>$.kind==="email")}get isURL(){return!!this._def.checks.find(($)=>$.kind==="url")}get isEmoji(){return!!this._def.checks.find(($)=>$.kind==="emoji")}get isUUID(){return!!this._def.checks.find(($)=>$.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(($)=>$.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(($)=>$.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(($)=>$.kind==="cuid2")}get isULID(){return!!this._def.checks.find(($)=>$.kind==="ulid")}get isIP(){return!!this._def.checks.find(($)=>$.kind==="ip")}get isCIDR(){return!!this._def.checks.find(($)=>$.kind==="cidr")}get isBase64(){return!!this._def.checks.find(($)=>$.kind==="base64")}get isBase64url(){return!!this._def.checks.find(($)=>$.kind==="base64url")}get minLength(){let $=null;for(let Y of this._def.checks)if(Y.kind==="min"){if($===null||Y.value>$)$=Y.value}return $}get maxLength(){let $=null;for(let Y of this._def.checks)if(Y.kind==="max"){if($===null||Y.value<$)$=Y.value}return $}};IZ.create=($)=>{return new IZ({checks:[],typeName:Q6.ZodString,coerce:$?.coerce??!1,...x6($)})};ZD=class ZD extends s6{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse($){if(this._def.coerce)$.data=Number($.data);if(this._getType($)!==h1.number){let J=this._getOrReturnCtx($);return o1(J,{code:B1.invalid_type,expected:h1.number,received:J.parsedType}),o4}let X=void 0,G=new AX;for(let J of this._def.checks)if(J.kind==="int"){if(!L8.isInteger($.data))X=this._getOrReturnCtx($,X),o1(X,{code:B1.invalid_type,expected:"integer",received:"float",message:J.message}),G.dirty()}else if(J.kind==="min"){if(J.inclusive?$.data<J.value:$.data<=J.value)X=this._getOrReturnCtx($,X),o1(X,{code:B1.too_small,minimum:J.value,type:"number",inclusive:J.inclusive,exact:!1,message:J.message}),G.dirty()}else if(J.kind==="max"){if(J.inclusive?$.data>J.value:$.data>=J.value)X=this._getOrReturnCtx($,X),o1(X,{code:B1.too_big,maximum:J.value,type:"number",inclusive:J.inclusive,exact:!1,message:J.message}),G.dirty()}else if(J.kind==="multipleOf"){if(hS8($.data,J.value)!==0)X=this._getOrReturnCtx($,X),o1(X,{code:B1.not_multiple_of,multipleOf:J.value,message:J.message}),G.dirty()}else if(J.kind==="finite"){if(!Number.isFinite($.data))X=this._getOrReturnCtx($,X),o1(X,{code:B1.not_finite,message:J.message}),G.dirty()}else L8.assertNever(J);return{status:G.value,value:$.data}}gte($,Y){return this.setLimit("min",$,!0,I4.toString(Y))}gt($,Y){return this.setLimit("min",$,!1,I4.toString(Y))}lte($,Y){return this.setLimit("max",$,!0,I4.toString(Y))}lt($,Y){return this.setLimit("max",$,!1,I4.toString(Y))}setLimit($,Y,X,G){return new ZD({...this._def,checks:[...this._def.checks,{kind:$,value:Y,inclusive:X,message:I4.toString(G)}]})}_addCheck($){return new ZD({...this._def,checks:[...this._def.checks,$]})}int($){return this._addCheck({kind:"int",message:I4.toString($)})}positive($){return this._addCheck({kind:"min",value:0,inclusive:!1,message:I4.toString($)})}negative($){return this._addCheck({kind:"max",value:0,inclusive:!1,message:I4.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:0,inclusive:!0,message:I4.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:0,inclusive:!0,message:I4.toString($)})}multipleOf($,Y){return this._addCheck({kind:"multipleOf",value:$,message:I4.toString(Y)})}finite($){return this._addCheck({kind:"finite",message:I4.toString($)})}safe($){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:I4.toString($)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:I4.toString($)})}get minValue(){let $=null;for(let Y of this._def.checks)if(Y.kind==="min"){if($===null||Y.value>$)$=Y.value}return $}get maxValue(){let $=null;for(let Y of this._def.checks)if(Y.kind==="max"){if($===null||Y.value<$)$=Y.value}return $}get isInt(){return!!this._def.checks.find(($)=>$.kind==="int"||$.kind==="multipleOf"&&L8.isInteger($.value))}get isFinite(){let $=null,Y=null;for(let X of this._def.checks)if(X.kind==="finite"||X.kind==="int"||X.kind==="multipleOf")return!0;else if(X.kind==="min"){if(Y===null||X.value>Y)Y=X.value}else if(X.kind==="max"){if($===null||X.value<$)$=X.value}return Number.isFinite(Y)&&Number.isFinite($)}};ZD.create=($)=>{return new ZD({checks:[],typeName:Q6.ZodNumber,coerce:$?.coerce||!1,...x6($)})};UD=class UD extends s6{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse($){if(this._def.coerce)try{$.data=BigInt($.data)}catch{return this._getInvalidInput($)}if(this._getType($)!==h1.bigint)return this._getInvalidInput($);let X=void 0,G=new AX;for(let J of this._def.checks)if(J.kind==="min"){if(J.inclusive?$.data<J.value:$.data<=J.value)X=this._getOrReturnCtx($,X),o1(X,{code:B1.too_small,type:"bigint",minimum:J.value,inclusive:J.inclusive,message:J.message}),G.dirty()}else if(J.kind==="max"){if(J.inclusive?$.data>J.value:$.data>=J.value)X=this._getOrReturnCtx($,X),o1(X,{code:B1.too_big,type:"bigint",maximum:J.value,inclusive:J.inclusive,message:J.message}),G.dirty()}else if(J.kind==="multipleOf"){if($.data%J.value!==BigInt(0))X=this._getOrReturnCtx($,X),o1(X,{code:B1.not_multiple_of,multipleOf:J.value,message:J.message}),G.dirty()}else L8.assertNever(J);return{status:G.value,value:$.data}}_getInvalidInput($){let Y=this._getOrReturnCtx($);return o1(Y,{code:B1.invalid_type,expected:h1.bigint,received:Y.parsedType}),o4}gte($,Y){return this.setLimit("min",$,!0,I4.toString(Y))}gt($,Y){return this.setLimit("min",$,!1,I4.toString(Y))}lte($,Y){return this.setLimit("max",$,!0,I4.toString(Y))}lt($,Y){return this.setLimit("max",$,!1,I4.toString(Y))}setLimit($,Y,X,G){return new UD({...this._def,checks:[...this._def.checks,{kind:$,value:Y,inclusive:X,message:I4.toString(G)}]})}_addCheck($){return new UD({...this._def,checks:[...this._def.checks,$]})}positive($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:I4.toString($)})}negative($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:I4.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:I4.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:I4.toString($)})}multipleOf($,Y){return this._addCheck({kind:"multipleOf",value:$,message:I4.toString(Y)})}get minValue(){let $=null;for(let Y of this._def.checks)if(Y.kind==="min"){if($===null||Y.value>$)$=Y.value}return $}get maxValue(){let $=null;for(let Y of this._def.checks)if(Y.kind==="max"){if($===null||Y.value<$)$=Y.value}return $}};UD.create=($)=>{return new UD({checks:[],typeName:Q6.ZodBigInt,coerce:$?.coerce??!1,...x6($)})};Nj=class Nj extends s6{_parse($){if(this._def.coerce)$.data=Boolean($.data);if(this._getType($)!==h1.boolean){let X=this._getOrReturnCtx($);return o1(X,{code:B1.invalid_type,expected:h1.boolean,received:X.parsedType}),o4}return HG($.data)}};Nj.create=($)=>{return new Nj({typeName:Q6.ZodBoolean,coerce:$?.coerce||!1,...x6($)})};nO=class nO extends s6{_parse($){if(this._def.coerce)$.data=new Date($.data);if(this._getType($)!==h1.date){let J=this._getOrReturnCtx($);return o1(J,{code:B1.invalid_type,expected:h1.date,received:J.parsedType}),o4}if(Number.isNaN($.data.getTime())){let J=this._getOrReturnCtx($);return o1(J,{code:B1.invalid_date}),o4}let X=new AX,G=void 0;for(let J of this._def.checks)if(J.kind==="min"){if($.data.getTime()<J.value)G=this._getOrReturnCtx($,G),o1(G,{code:B1.too_small,message:J.message,inclusive:!0,exact:!1,minimum:J.value,type:"date"}),X.dirty()}else if(J.kind==="max"){if($.data.getTime()>J.value)G=this._getOrReturnCtx($,G),o1(G,{code:B1.too_big,message:J.message,inclusive:!0,exact:!1,maximum:J.value,type:"date"}),X.dirty()}else L8.assertNever(J);return{status:X.value,value:new Date($.data.getTime())}}_addCheck($){return new nO({...this._def,checks:[...this._def.checks,$]})}min($,Y){return this._addCheck({kind:"min",value:$.getTime(),message:I4.toString(Y)})}max($,Y){return this._addCheck({kind:"max",value:$.getTime(),message:I4.toString(Y)})}get minDate(){let $=null;for(let Y of this._def.checks)if(Y.kind==="min"){if($===null||Y.value>$)$=Y.value}return $!=null?new Date($):null}get maxDate(){let $=null;for(let Y of this._def.checks)if(Y.kind==="max"){if($===null||Y.value<$)$=Y.value}return $!=null?new Date($):null}};nO.create=($)=>{return new nO({checks:[],coerce:$?.coerce||!1,typeName:Q6.ZodDate,...x6($)})};Hg=class Hg extends s6{_parse($){if(this._getType($)!==h1.symbol){let X=this._getOrReturnCtx($);return o1(X,{code:B1.invalid_type,expected:h1.symbol,received:X.parsedType}),o4}return HG($.data)}};Hg.create=($)=>{return new Hg({typeName:Q6.ZodSymbol,...x6($)})};Aj=class Aj extends s6{_parse($){if(this._getType($)!==h1.undefined){let X=this._getOrReturnCtx($);return o1(X,{code:B1.invalid_type,expected:h1.undefined,received:X.parsedType}),o4}return HG($.data)}};Aj.create=($)=>{return new Aj({typeName:Q6.ZodUndefined,...x6($)})};Bj=class Bj extends s6{_parse($){if(this._getType($)!==h1.null){let X=this._getOrReturnCtx($);return o1(X,{code:B1.invalid_type,expected:h1.null,received:X.parsedType}),o4}return HG($.data)}};Bj.create=($)=>{return new Bj({typeName:Q6.ZodNull,...x6($)})};rO=class rO extends s6{constructor(){super(...arguments);this._any=!0}_parse($){return HG($.data)}};rO.create=($)=>{return new rO({typeName:Q6.ZodAny,...x6($)})};KD=class KD extends s6{constructor(){super(...arguments);this._unknown=!0}_parse($){return HG($.data)}};KD.create=($)=>{return new KD({typeName:Q6.ZodUnknown,...x6($)})};S3=class S3 extends s6{_parse($){let Y=this._getOrReturnCtx($);return o1(Y,{code:B1.invalid_type,expected:h1.never,received:Y.parsedType}),o4}};S3.create=($)=>{return new S3({typeName:Q6.ZodNever,...x6($)})};zg=class zg extends s6{_parse($){if(this._getType($)!==h1.undefined){let X=this._getOrReturnCtx($);return o1(X,{code:B1.invalid_type,expected:h1.void,received:X.parsedType}),o4}return HG($.data)}};zg.create=($)=>{return new zg({typeName:Q6.ZodVoid,...x6($)})};CZ=class CZ extends s6{_parse($){let{ctx:Y,status:X}=this._processInputParams($),G=this._def;if(Y.parsedType!==h1.array)return o1(Y,{code:B1.invalid_type,expected:h1.array,received:Y.parsedType}),o4;if(G.exactLength!==null){let Q=Y.data.length>G.exactLength.value,W=Y.data.length<G.exactLength.value;if(Q||W)o1(Y,{code:Q?B1.too_big:B1.too_small,minimum:W?G.exactLength.value:void 0,maximum:Q?G.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:G.exactLength.message}),X.dirty()}if(G.minLength!==null){if(Y.data.length<G.minLength.value)o1(Y,{code:B1.too_small,minimum:G.minLength.value,type:"array",inclusive:!0,exact:!1,message:G.minLength.message}),X.dirty()}if(G.maxLength!==null){if(Y.data.length>G.maxLength.value)o1(Y,{code:B1.too_big,maximum:G.maxLength.value,type:"array",inclusive:!0,exact:!1,message:G.maxLength.message}),X.dirty()}if(Y.common.async)return Promise.all([...Y.data].map((Q,W)=>{return G.type._parseAsync(new kZ(Y,Q,Y.path,W))})).then((Q)=>{return AX.mergeArray(X,Q)});let J=[...Y.data].map((Q,W)=>{return G.type._parseSync(new kZ(Y,Q,Y.path,W))});return AX.mergeArray(X,J)}get element(){return this._def.type}min($,Y){return new CZ({...this._def,minLength:{value:$,message:I4.toString(Y)}})}max($,Y){return new CZ({...this._def,maxLength:{value:$,message:I4.toString(Y)}})}length($,Y){return new CZ({...this._def,exactLength:{value:$,message:I4.toString(Y)}})}nonempty($){return this.min(1,$)}};CZ.create=($,Y)=>{return new CZ({type:$,minLength:null,maxLength:null,exactLength:null,typeName:Q6.ZodArray,...x6(Y)})};x$=class x$ extends s6{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let $=this._def.shape(),Y=L8.objectKeys($);return this._cached={shape:$,keys:Y},this._cached}_parse($){if(this._getType($)!==h1.object){let Z=this._getOrReturnCtx($);return o1(Z,{code:B1.invalid_type,expected:h1.object,received:Z.parsedType}),o4}let{status:X,ctx:G}=this._processInputParams($),{shape:J,keys:Q}=this._getCached(),W=[];if(!(this._def.catchall instanceof S3&&this._def.unknownKeys==="strip")){for(let Z in G.data)if(!Q.includes(Z))W.push(Z)}let K=[];for(let Z of Q){let H=J[Z],z=G.data[Z];K.push({key:{status:"valid",value:Z},value:H._parse(new kZ(G,z,G.path,Z)),alwaysSet:Z in G.data})}if(this._def.catchall instanceof S3){let Z=this._def.unknownKeys;if(Z==="passthrough")for(let H of W)K.push({key:{status:"valid",value:H},value:{status:"valid",value:G.data[H]}});else if(Z==="strict"){if(W.length>0)o1(G,{code:B1.unrecognized_keys,keys:W}),X.dirty()}else if(Z==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let Z=this._def.catchall;for(let H of W){let z=G.data[H];K.push({key:{status:"valid",value:H},value:Z._parse(new kZ(G,z,G.path,H)),alwaysSet:H in G.data})}}if(G.common.async)return Promise.resolve().then(async()=>{let Z=[];for(let H of K){let z=await H.key,V=await H.value;Z.push({key:z,value:V,alwaysSet:H.alwaysSet})}return Z}).then((Z)=>{return AX.mergeObjectSync(X,Z)});else return AX.mergeObjectSync(X,K)}get shape(){return this._def.shape()}strict($){return I4.errToObj,new x$({...this._def,unknownKeys:"strict",...$!==void 0?{errorMap:(Y,X)=>{let G=this._def.errorMap?.(Y,X).message??X.defaultError;if(Y.code==="unrecognized_keys")return{message:I4.errToObj($).message??G};return{message:G}}}:{}})}strip(){return new x$({...this._def,unknownKeys:"strip"})}passthrough(){return new x$({...this._def,unknownKeys:"passthrough"})}extend($){return new x$({...this._def,shape:()=>({...this._def.shape(),...$})})}merge($){return new x$({unknownKeys:$._def.unknownKeys,catchall:$._def.catchall,shape:()=>({...this._def.shape(),...$._def.shape()}),typeName:Q6.ZodObject})}setKey($,Y){return this.augment({[$]:Y})}catchall($){return new x$({...this._def,catchall:$})}pick($){let Y={};for(let X of L8.objectKeys($))if($[X]&&this.shape[X])Y[X]=this.shape[X];return new x$({...this._def,shape:()=>Y})}omit($){let Y={};for(let X of L8.objectKeys(this.shape))if(!$[X])Y[X]=this.shape[X];return new x$({...this._def,shape:()=>Y})}deepPartial(){return Lj(this)}partial($){let Y={};for(let X of L8.objectKeys(this.shape)){let G=this.shape[X];if($&&!$[X])Y[X]=G;else Y[X]=G.optional()}return new x$({...this._def,shape:()=>Y})}required($){let Y={};for(let X of L8.objectKeys(this.shape))if($&&!$[X])Y[X]=this.shape[X];else{let J=this.shape[X];while(J instanceof SZ)J=J._def.innerType;Y[X]=J}return new x$({...this._def,shape:()=>Y})}keyof(){return a04(L8.objectKeys(this.shape))}};x$.create=($,Y)=>{return new x$({shape:()=>$,unknownKeys:"strip",catchall:S3.create(),typeName:Q6.ZodObject,...x6(Y)})};x$.strictCreate=($,Y)=>{return new x$({shape:()=>$,unknownKeys:"strict",catchall:S3.create(),typeName:Q6.ZodObject,...x6(Y)})};x$.lazycreate=($,Y)=>{return new x$({shape:$,unknownKeys:"strip",catchall:S3.create(),typeName:Q6.ZodObject,...x6(Y)})};Oj=class Oj extends s6{_parse($){let{ctx:Y}=this._processInputParams($),X=this._def.options;function G(J){for(let W of J)if(W.result.status==="valid")return W.result;for(let W of J)if(W.result.status==="dirty")return Y.common.issues.push(...W.ctx.common.issues),W.result;let Q=J.map((W)=>new MQ(W.ctx.common.issues));return o1(Y,{code:B1.invalid_union,unionErrors:Q}),o4}if(Y.common.async)return Promise.all(X.map(async(J)=>{let Q={...Y,common:{...Y.common,issues:[]},parent:null};return{result:await J._parseAsync({data:Y.data,path:Y.path,parent:Q}),ctx:Q}})).then(G);else{let J=void 0,Q=[];for(let K of X){let Z={...Y,common:{...Y.common,issues:[]},parent:null},H=K._parseSync({data:Y.data,path:Y.path,parent:Z});if(H.status==="valid")return H;else if(H.status==="dirty"&&!J)J={result:H,ctx:Z};if(Z.common.issues.length)Q.push(Z.common.issues)}if(J)return Y.common.issues.push(...J.ctx.common.issues),J.result;let W=Q.map((K)=>new MQ(K));return o1(Y,{code:B1.invalid_union,unionErrors:W}),o4}}get options(){return this._def.options}};Oj.create=($,Y)=>{return new Oj({options:$,typeName:Q6.ZodUnion,...x6(Y)})};E80=class E80 extends s6{_parse($){let{ctx:Y}=this._processInputParams($);if(Y.parsedType!==h1.object)return o1(Y,{code:B1.invalid_type,expected:h1.object,received:Y.parsedType}),o4;let X=this.discriminator,G=Y.data[X],J=this.optionsMap.get(G);if(!J)return o1(Y,{code:B1.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[X]}),o4;if(Y.common.async)return J._parseAsync({data:Y.data,path:Y.path,parent:Y});else return J._parseSync({data:Y.data,path:Y.path,parent:Y})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create($,Y,X){let G=new Map;for(let J of Y){let Q=az(J.shape[$]);if(!Q.length)throw Error(`A discriminator value for key \`${$}\` could not be extracted from all schema options`);for(let W of Q){if(G.has(W))throw Error(`Discriminator property ${String($)} has duplicate value ${String(W)}`);G.set(W,J)}}return new E80({typeName:Q6.ZodDiscriminatedUnion,discriminator:$,options:Y,optionsMap:G,...x6(X)})}};Ej=class Ej extends s6{_parse($){let{status:Y,ctx:X}=this._processInputParams($),G=(J,Q)=>{if(B80(J)||B80(Q))return o4;let W=hv0(J.value,Q.value);if(!W.valid)return o1(X,{code:B1.invalid_intersection_types}),o4;if(O80(J)||O80(Q))Y.dirty();return{status:Y.value,value:W.data}};if(X.common.async)return Promise.all([this._def.left._parseAsync({data:X.data,path:X.path,parent:X}),this._def.right._parseAsync({data:X.data,path:X.path,parent:X})]).then(([J,Q])=>G(J,Q));else return G(this._def.left._parseSync({data:X.data,path:X.path,parent:X}),this._def.right._parseSync({data:X.data,path:X.path,parent:X}))}};Ej.create=($,Y,X)=>{return new Ej({left:$,right:Y,typeName:Q6.ZodIntersection,...x6(X)})};k3=class k3 extends s6{_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.parsedType!==h1.array)return o1(X,{code:B1.invalid_type,expected:h1.array,received:X.parsedType}),o4;if(X.data.length<this._def.items.length)return o1(X,{code:B1.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),o4;if(!this._def.rest&&X.data.length>this._def.items.length)o1(X,{code:B1.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Y.dirty();let J=[...X.data].map((Q,W)=>{let K=this._def.items[W]||this._def.rest;if(!K)return null;return K._parse(new kZ(X,Q,X.path,W))}).filter((Q)=>!!Q);if(X.common.async)return Promise.all(J).then((Q)=>{return AX.mergeArray(Y,Q)});else return AX.mergeArray(Y,J)}get items(){return this._def.items}rest($){return new k3({...this._def,rest:$})}};k3.create=($,Y)=>{if(!Array.isArray($))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new k3({items:$,typeName:Q6.ZodTuple,rest:null,...x6(Y)})};Vg=class Vg extends s6{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.parsedType!==h1.object)return o1(X,{code:B1.invalid_type,expected:h1.object,received:X.parsedType}),o4;let G=[],J=this._def.keyType,Q=this._def.valueType;for(let W in X.data)G.push({key:J._parse(new kZ(X,W,X.path,W)),value:Q._parse(new kZ(X,X.data[W],X.path,W)),alwaysSet:W in X.data});if(X.common.async)return AX.mergeObjectAsync(Y,G);else return AX.mergeObjectSync(Y,G)}get element(){return this._def.valueType}static create($,Y,X){if(Y instanceof s6)return new Vg({keyType:$,valueType:Y,typeName:Q6.ZodRecord,...x6(X)});return new Vg({keyType:IZ.create(),valueType:$,typeName:Q6.ZodRecord,...x6(Y)})}};Fg=class Fg extends s6{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.parsedType!==h1.map)return o1(X,{code:B1.invalid_type,expected:h1.map,received:X.parsedType}),o4;let G=this._def.keyType,J=this._def.valueType,Q=[...X.data.entries()].map(([W,K],Z)=>{return{key:G._parse(new kZ(X,W,X.path,[Z,"key"])),value:J._parse(new kZ(X,K,X.path,[Z,"value"]))}});if(X.common.async){let W=new Map;return Promise.resolve().then(async()=>{for(let K of Q){let Z=await K.key,H=await K.value;if(Z.status==="aborted"||H.status==="aborted")return o4;if(Z.status==="dirty"||H.status==="dirty")Y.dirty();W.set(Z.value,H.value)}return{status:Y.value,value:W}})}else{let W=new Map;for(let K of Q){let{key:Z,value:H}=K;if(Z.status==="aborted"||H.status==="aborted")return o4;if(Z.status==="dirty"||H.status==="dirty")Y.dirty();W.set(Z.value,H.value)}return{status:Y.value,value:W}}}};Fg.create=($,Y,X)=>{return new Fg({valueType:Y,keyType:$,typeName:Q6.ZodMap,...x6(X)})};aO=class aO extends s6{_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.parsedType!==h1.set)return o1(X,{code:B1.invalid_type,expected:h1.set,received:X.parsedType}),o4;let G=this._def;if(G.minSize!==null){if(X.data.size<G.minSize.value)o1(X,{code:B1.too_small,minimum:G.minSize.value,type:"set",inclusive:!0,exact:!1,message:G.minSize.message}),Y.dirty()}if(G.maxSize!==null){if(X.data.size>G.maxSize.value)o1(X,{code:B1.too_big,maximum:G.maxSize.value,type:"set",inclusive:!0,exact:!1,message:G.maxSize.message}),Y.dirty()}let J=this._def.valueType;function Q(K){let Z=new Set;for(let H of K){if(H.status==="aborted")return o4;if(H.status==="dirty")Y.dirty();Z.add(H.value)}return{status:Y.value,value:Z}}let W=[...X.data.values()].map((K,Z)=>J._parse(new kZ(X,K,X.path,Z)));if(X.common.async)return Promise.all(W).then((K)=>Q(K));else return Q(W)}min($,Y){return new aO({...this._def,minSize:{value:$,message:I4.toString(Y)}})}max($,Y){return new aO({...this._def,maxSize:{value:$,message:I4.toString(Y)}})}size($,Y){return this.min($,Y).max($,Y)}nonempty($){return this.min(1,$)}};aO.create=($,Y)=>{return new aO({valueType:$,minSize:null,maxSize:null,typeName:Q6.ZodSet,...x6(Y)})};Dj=class Dj extends s6{constructor(){super(...arguments);this.validate=this.implement}_parse($){let{ctx:Y}=this._processInputParams($);if(Y.parsedType!==h1.function)return o1(Y,{code:B1.invalid_type,expected:h1.function,received:Y.parsedType}),o4;function X(W,K){return Ug({data:W,path:Y.path,errorMaps:[Y.common.contextualErrorMap,Y.schemaErrorMap,Vj(),rz].filter((Z)=>!!Z),issueData:{code:B1.invalid_arguments,argumentsError:K}})}function G(W,K){return Ug({data:W,path:Y.path,errorMaps:[Y.common.contextualErrorMap,Y.schemaErrorMap,Vj(),rz].filter((Z)=>!!Z),issueData:{code:B1.invalid_return_type,returnTypeError:K}})}let J={errorMap:Y.common.contextualErrorMap},Q=Y.data;if(this._def.returns instanceof sO){let W=this;return HG(async function(...K){let Z=new MQ([]),H=await W._def.args.parseAsync(K,J).catch((F)=>{throw Z.addIssue(X(K,F)),Z}),z=await Reflect.apply(Q,this,H);return await W._def.returns._def.type.parseAsync(z,J).catch((F)=>{throw Z.addIssue(G(z,F)),Z})})}else{let W=this;return HG(function(...K){let Z=W._def.args.safeParse(K,J);if(!Z.success)throw new MQ([X(K,Z.error)]);let H=Reflect.apply(Q,this,Z.data),z=W._def.returns.safeParse(H,J);if(!z.success)throw new MQ([G(H,z.error)]);return z.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...$){return new Dj({...this._def,args:k3.create($).rest(KD.create())})}returns($){return new Dj({...this._def,returns:$})}implement($){return this.parse($)}strictImplement($){return this.parse($)}static create($,Y,X){return new Dj({args:$?$:k3.create([]).rest(KD.create()),returns:Y||KD.create(),typeName:Q6.ZodFunction,...x6(X)})}};Mj=class Mj extends s6{get schema(){return this._def.getter()}_parse($){let{ctx:Y}=this._processInputParams($);return this._def.getter()._parse({data:Y.data,path:Y.path,parent:Y})}};Mj.create=($,Y)=>{return new Mj({getter:$,typeName:Q6.ZodLazy,...x6(Y)})};Rj=class Rj extends s6{_parse($){if($.data!==this._def.value){let Y=this._getOrReturnCtx($);return o1(Y,{received:Y.data,code:B1.invalid_literal,expected:this._def.value}),o4}return{status:"valid",value:$.data}}get value(){return this._def.value}};Rj.create=($,Y)=>{return new Rj({value:$,typeName:Q6.ZodLiteral,...x6(Y)})};HD=class HD extends s6{_parse($){if(typeof $.data!=="string"){let Y=this._getOrReturnCtx($),X=this._def.values;return o1(Y,{expected:L8.joinValues(X),received:Y.parsedType,code:B1.invalid_type}),o4}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has($.data)){let Y=this._getOrReturnCtx($),X=this._def.values;return o1(Y,{received:Y.data,code:B1.invalid_enum_value,options:X}),o4}return HG($.data)}get options(){return this._def.values}get enum(){let $={};for(let Y of this._def.values)$[Y]=Y;return $}get Values(){let $={};for(let Y of this._def.values)$[Y]=Y;return $}get Enum(){let $={};for(let Y of this._def.values)$[Y]=Y;return $}extract($,Y=this._def){return HD.create($,{...this._def,...Y})}exclude($,Y=this._def){return HD.create(this.options.filter((X)=>!$.includes(X)),{...this._def,...Y})}};HD.create=a04;qj=class qj extends s6{_parse($){let Y=L8.getValidEnumValues(this._def.values),X=this._getOrReturnCtx($);if(X.parsedType!==h1.string&&X.parsedType!==h1.number){let G=L8.objectValues(Y);return o1(X,{expected:L8.joinValues(G),received:X.parsedType,code:B1.invalid_type}),o4}if(!this._cache)this._cache=new Set(L8.getValidEnumValues(this._def.values));if(!this._cache.has($.data)){let G=L8.objectValues(Y);return o1(X,{received:X.data,code:B1.invalid_enum_value,options:G}),o4}return HG($.data)}get enum(){return this._def.values}};qj.create=($,Y)=>{return new qj({values:$,typeName:Q6.ZodNativeEnum,...x6(Y)})};sO=class sO extends s6{unwrap(){return this._def.type}_parse($){let{ctx:Y}=this._processInputParams($);if(Y.parsedType!==h1.promise&&Y.common.async===!1)return o1(Y,{code:B1.invalid_type,expected:h1.promise,received:Y.parsedType}),o4;let X=Y.parsedType===h1.promise?Y.data:Promise.resolve(Y.data);return HG(X.then((G)=>{return this._def.type.parseAsync(G,{path:Y.path,errorMap:Y.common.contextualErrorMap})}))}};sO.create=($,Y)=>{return new sO({type:$,typeName:Q6.ZodPromise,...x6(Y)})};vZ=class vZ extends s6{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Q6.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse($){let{status:Y,ctx:X}=this._processInputParams($),G=this._def.effect||null,J={addIssue:(Q)=>{if(o1(X,Q),Q.fatal)Y.abort();else Y.dirty()},get path(){return X.path}};if(J.addIssue=J.addIssue.bind(J),G.type==="preprocess"){let Q=G.transform(X.data,J);if(X.common.async)return Promise.resolve(Q).then(async(W)=>{if(Y.value==="aborted")return o4;let K=await this._def.schema._parseAsync({data:W,path:X.path,parent:X});if(K.status==="aborted")return o4;if(K.status==="dirty")return iO(K.value);if(Y.value==="dirty")return iO(K.value);return K});else{if(Y.value==="aborted")return o4;let W=this._def.schema._parseSync({data:Q,path:X.path,parent:X});if(W.status==="aborted")return o4;if(W.status==="dirty")return iO(W.value);if(Y.value==="dirty")return iO(W.value);return W}}if(G.type==="refinement"){let Q=(W)=>{let K=G.refinement(W,J);if(X.common.async)return Promise.resolve(K);if(K instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return W};if(X.common.async===!1){let W=this._def.schema._parseSync({data:X.data,path:X.path,parent:X});if(W.status==="aborted")return o4;if(W.status==="dirty")Y.dirty();return Q(W.value),{status:Y.value,value:W.value}}else return this._def.schema._parseAsync({data:X.data,path:X.path,parent:X}).then((W)=>{if(W.status==="aborted")return o4;if(W.status==="dirty")Y.dirty();return Q(W.value).then(()=>{return{status:Y.value,value:W.value}})})}if(G.type==="transform")if(X.common.async===!1){let Q=this._def.schema._parseSync({data:X.data,path:X.path,parent:X});if(!WD(Q))return o4;let W=G.transform(Q.value,J);if(W instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:Y.value,value:W}}else return this._def.schema._parseAsync({data:X.data,path:X.path,parent:X}).then((Q)=>{if(!WD(Q))return o4;return Promise.resolve(G.transform(Q.value,J)).then((W)=>({status:Y.value,value:W}))});L8.assertNever(G)}};vZ.create=($,Y,X)=>{return new vZ({schema:$,typeName:Q6.ZodEffects,effect:Y,...x6(X)})};vZ.createWithPreprocess=($,Y,X)=>{return new vZ({schema:Y,effect:{type:"preprocess",transform:$},typeName:Q6.ZodEffects,...x6(X)})};SZ=class SZ extends s6{_parse($){if(this._getType($)===h1.undefined)return HG(void 0);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}};SZ.create=($,Y)=>{return new SZ({innerType:$,typeName:Q6.ZodOptional,...x6(Y)})};sz=class sz extends s6{_parse($){if(this._getType($)===h1.null)return HG(null);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}};sz.create=($,Y)=>{return new sz({innerType:$,typeName:Q6.ZodNullable,...x6(Y)})};Pj=class Pj extends s6{_parse($){let{ctx:Y}=this._processInputParams($),X=Y.data;if(Y.parsedType===h1.undefined)X=this._def.defaultValue();return this._def.innerType._parse({data:X,path:Y.path,parent:Y})}removeDefault(){return this._def.innerType}};Pj.create=($,Y)=>{return new Pj({innerType:$,typeName:Q6.ZodDefault,defaultValue:typeof Y.default==="function"?Y.default:()=>Y.default,...x6(Y)})};wj=class wj extends s6{_parse($){let{ctx:Y}=this._processInputParams($),X={...Y,common:{...Y.common,issues:[]}},G=this._def.innerType._parse({data:X.data,path:X.path,parent:{...X}});if(Fj(G))return G.then((J)=>{return{status:"valid",value:J.status==="valid"?J.value:this._def.catchValue({get error(){return new MQ(X.common.issues)},input:X.data})}});else return{status:"valid",value:G.status==="valid"?G.value:this._def.catchValue({get error(){return new MQ(X.common.issues)},input:X.data})}}removeCatch(){return this._def.innerType}};wj.create=($,Y)=>{return new wj({innerType:$,typeName:Q6.ZodCatch,catchValue:typeof Y.catch==="function"?Y.catch:()=>Y.catch,...x6(Y)})};Lg=class Lg extends s6{_parse($){if(this._getType($)!==h1.nan){let X=this._getOrReturnCtx($);return o1(X,{code:B1.invalid_type,expected:h1.nan,received:X.parsedType}),o4}return{status:"valid",value:$.data}}};Lg.create=($)=>{return new Lg({typeName:Q6.ZodNaN,...x6($)})};fS8=Symbol("zod_brand");M80=class M80 extends s6{_parse($){let{ctx:Y}=this._processInputParams($),X=Y.data;return this._def.type._parse({data:X,path:Y.path,parent:Y})}unwrap(){return this._def.type}};Dg=class Dg extends s6{_parse($){let{status:Y,ctx:X}=this._processInputParams($);if(X.common.async)return(async()=>{let J=await this._def.in._parseAsync({data:X.data,path:X.path,parent:X});if(J.status==="aborted")return o4;if(J.status==="dirty")return Y.dirty(),iO(J.value);else return this._def.out._parseAsync({data:J.value,path:X.path,parent:X})})();else{let G=this._def.in._parseSync({data:X.data,path:X.path,parent:X});if(G.status==="aborted")return o4;if(G.status==="dirty")return Y.dirty(),{status:"dirty",value:G.value};else return this._def.out._parseSync({data:G.value,path:X.path,parent:X})}}static create($,Y){return new Dg({in:$,out:Y,typeName:Q6.ZodPipeline})}};_j=class _j extends s6{_parse($){let Y=this._def.innerType._parse($),X=(G)=>{if(WD(G))G.value=Object.freeze(G.value);return G};return Fj(Y)?Y.then((G)=>X(G)):X(Y)}unwrap(){return this._def.innerType}};_j.create=($,Y)=>{return new _j({innerType:$,typeName:Q6.ZodReadonly,...x6(Y)})};gS8={object:x$.lazycreate};(function($){$.ZodString="ZodString",$.ZodNumber="ZodNumber",$.ZodNaN="ZodNaN",$.ZodBigInt="ZodBigInt",$.ZodBoolean="ZodBoolean",$.ZodDate="ZodDate",$.ZodSymbol="ZodSymbol",$.ZodUndefined="ZodUndefined",$.ZodNull="ZodNull",$.ZodAny="ZodAny",$.ZodUnknown="ZodUnknown",$.ZodNever="ZodNever",$.ZodVoid="ZodVoid",$.ZodArray="ZodArray",$.ZodObject="ZodObject",$.ZodUnion="ZodUnion",$.ZodDiscriminatedUnion="ZodDiscriminatedUnion",$.ZodIntersection="ZodIntersection",$.ZodTuple="ZodTuple",$.ZodRecord="ZodRecord",$.ZodMap="ZodMap",$.ZodSet="ZodSet",$.ZodFunction="ZodFunction",$.ZodLazy="ZodLazy",$.ZodLiteral="ZodLiteral",$.ZodEnum="ZodEnum",$.ZodEffects="ZodEffects",$.ZodNativeEnum="ZodNativeEnum",$.ZodOptional="ZodOptional",$.ZodNullable="ZodNullable",$.ZodDefault="ZodDefault",$.ZodCatch="ZodCatch",$.ZodPromise="ZodPromise",$.ZodBranded="ZodBranded",$.ZodPipeline="ZodPipeline",$.ZodReadonly="ZodReadonly"})(Q6||(Q6={}));o04=IZ.create,t04=ZD.create,uS8=Lg.create,pS8=UD.create,e04=Nj.create,dS8=nO.create,cS8=Hg.create,lS8=Aj.create,iS8=Bj.create,nS8=rO.create,rS8=KD.create,aS8=S3.create,sS8=zg.create,oS8=CZ.create,tS8=x$.create,eS8=x$.strictCreate,$k8=Oj.create,Yk8=E80.create,Xk8=Ej.create,Gk8=k3.create,Jk8=Vg.create,Qk8=Fg.create,Wk8=aO.create,Kk8=Dj.create,Zk8=Mj.create,Uk8=Rj.create,Hk8=HD.create,zk8=qj.create,Vk8=sO.create,Fk8=vZ.create,Lk8=SZ.create,Dk8=sz.create,Nk8=vZ.createWithPreprocess,Ak8=Dg.create,Mk8={string:($)=>IZ.create({...$,coerce:!0}),number:($)=>ZD.create({...$,coerce:!0}),boolean:($)=>Nj.create({...$,coerce:!0}),bigint:($)=>UD.create({...$,coerce:!0}),date:($)=>nO.create({...$,coerce:!0})},Rk8=o4});var q8={};W8(q8,{void:()=>sS8,util:()=>L8,unknown:()=>rS8,union:()=>$k8,undefined:()=>lS8,tuple:()=>Gk8,transformer:()=>Fk8,symbol:()=>cS8,string:()=>o04,strictObject:()=>eS8,setErrorMap:()=>DS8,set:()=>Wk8,record:()=>Jk8,quotelessJson:()=>FS8,promise:()=>Vk8,preprocess:()=>Nk8,pipeline:()=>Ak8,ostring:()=>Bk8,optional:()=>Lk8,onumber:()=>Ok8,oboolean:()=>Ek8,objectUtil:()=>vv0,object:()=>tS8,number:()=>t04,nullable:()=>Dk8,null:()=>iS8,never:()=>aS8,nativeEnum:()=>zk8,nan:()=>uS8,map:()=>Qk8,makeIssue:()=>Ug,literal:()=>Uk8,lazy:()=>Zk8,late:()=>gS8,isValid:()=>WD,isDirty:()=>O80,isAsync:()=>Fj,isAborted:()=>B80,intersection:()=>Xk8,instanceof:()=>mS8,getParsedType:()=>C3,getErrorMap:()=>Vj,function:()=>Kk8,enum:()=>Hk8,effect:()=>Fk8,discriminatedUnion:()=>Yk8,defaultErrorMap:()=>rz,datetimeRegex:()=>r04,date:()=>dS8,custom:()=>s04,coerce:()=>Mk8,boolean:()=>e04,bigint:()=>pS8,array:()=>oS8,any:()=>nS8,addIssueToContext:()=>o1,ZodVoid:()=>zg,ZodUnknown:()=>KD,ZodUnion:()=>Oj,ZodUndefined:()=>Aj,ZodType:()=>s6,ZodTuple:()=>k3,ZodTransformer:()=>vZ,ZodSymbol:()=>Hg,ZodString:()=>IZ,ZodSet:()=>aO,ZodSchema:()=>s6,ZodRecord:()=>Vg,ZodReadonly:()=>_j,ZodPromise:()=>sO,ZodPipeline:()=>Dg,ZodParsedType:()=>h1,ZodOptional:()=>SZ,ZodObject:()=>x$,ZodNumber:()=>ZD,ZodNullable:()=>sz,ZodNull:()=>Bj,ZodNever:()=>S3,ZodNativeEnum:()=>qj,ZodNaN:()=>Lg,ZodMap:()=>Fg,ZodLiteral:()=>Rj,ZodLazy:()=>Mj,ZodIssueCode:()=>B1,ZodIntersection:()=>Ej,ZodFunction:()=>Dj,ZodFirstPartyTypeKind:()=>Q6,ZodError:()=>MQ,ZodEnum:()=>HD,ZodEffects:()=>vZ,ZodDiscriminatedUnion:()=>E80,ZodDefault:()=>Pj,ZodDate:()=>nO,ZodCatch:()=>wj,ZodBranded:()=>M80,ZodBoolean:()=>Nj,ZodBigInt:()=>UD,ZodArray:()=>CZ,ZodAny:()=>rO,Schema:()=>s6,ParseStatus:()=>AX,OK:()=>HG,NEVER:()=>Rk8,INVALID:()=>o4,EMPTY_PATH:()=>NS8,DIRTY:()=>iO,BRAND:()=>fS8});var fv0=V0(()=>{A80();yv0();p04();Zg();$14();N80()});var Y14=V0(()=>{fv0();fv0()});function oO($){function Y(X,G){if(G.description)X=X.describe(G.description);return X}if($.const!==void 0){if(typeof $.const==="string")return Y(q8.literal($.const),$);else if(typeof $.const==="number")return Y(q8.literal($.const),$);else if(typeof $.const==="boolean")return Y(q8.literal($.const),$);else if($.const===null)return Y(q8.null(),$);return Y(q8.literal($.const),$)}if($.type)switch($.type){case"string":{if($.enum){if($.enum.length===0)return Y(q8.string(),$);return Y(q8.enum($.enum),$)}let X=q8.string();if($.minLength!==void 0)X=X.min($.minLength);if($.maxLength!==void 0)X=X.max($.maxLength);if($.pattern!==void 0){let G=new RegExp($.pattern);X=X.regex(G)}return Y(X,$)}case"number":case"integer":{if($.enum){if($.enum.length===0)return Y(q8.number(),$);let G=$.enum.map((J)=>q8.literal(J));if(G.length===1)return Y(G[0],$);if(G.length>=2){let J=q8.union([G[0],G[1],...G.slice(2)]);return Y(J,$)}}let X=$.type==="integer"?q8.number().int():q8.number();if($.minimum!==void 0)X=X.min($.minimum);if($.maximum!==void 0)X=X.max($.maximum);if($.exclusiveMinimum!==void 0)X=X.gt($.exclusiveMinimum);if($.exclusiveMaximum!==void 0)X=X.lt($.exclusiveMaximum);if($.multipleOf!==void 0)X=X.multipleOf($.multipleOf);return Y(X,$)}case"boolean":if($.enum){if($.enum.length===0)return Y(q8.boolean(),$);let X=$.enum.map((G)=>q8.literal(G));if(X.length===1)return Y(X[0],$);if(X.length>=2){let G=q8.union([X[0],X[1],...X.slice(2)]);return Y(G,$)}}return Y(q8.boolean(),$);case"null":return Y(q8.null(),$);case"object":if($.properties){let X={};for(let[J,Q]of Object.entries($.properties))X[J]=oO(Q);if($.required&&Array.isArray($.required)){let J=new Set($.required);for(let Q of Object.keys(X))if(!J.has(Q))X[Q]=X[Q].optional()}else for(let J of Object.keys(X))X[J]=X[J].optional();let G;if($.additionalProperties!==!1)G=q8.object(X).passthrough();else G=q8.object(X);return Y(G,$)}return Y(q8.object({}),$);case"array":{let X;if($.items)X=q8.array(oO($.items));else X=q8.array(q8.any());if($.minItems!==void 0)X=X.min($.minItems);if($.maxItems!==void 0)X=X.max($.maxItems);if($.uniqueItems===!0)X=X.refine((G)=>{let J=new Set;return G.every((Q)=>{if(typeof Q==="string"||typeof Q==="number"||typeof Q==="boolean"){if(J.has(Q))return!1;return J.add(Q),!0}let W=JSON.stringify(Q);if(J.has(W))return!1;return J.add(W),!0})},{message:"Array items must be unique"});return Y(X,$)}}if($.enum){if($.enum.length===0)return Y(q8.never(),$);if($.enum.every((G)=>typeof G==="string"))return Y(q8.enum($.enum),$);else{let G=$.enum.map((J)=>q8.literal(J));if(G.length===1)return Y(G[0],$);if(G.length>=2){let J=q8.union([G[0],G[1],...G.slice(2)]);return Y(J,$)}}}if($.anyOf&&$.anyOf.length>=2){let X=$.anyOf.map(oO);return Y(q8.union([X[0],X[1],...X.slice(2)]),$)}if($.allOf)return Y($.allOf.reduce((X,G)=>q8.intersection(X,oO(G)),q8.object({})),$);if($.oneOf&&$.oneOf.length>=2){let X=$.oneOf.map(oO);return Y(q8.union([X[0],X[1],...X.slice(2)]),$)}return Y(q8.any(),$)}var X14=V0(()=>{Y14()});function B14($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function mk8($){return new ReadableStream({async pull(Y){try{let{value:X,done:G}=await $.next();if(G)Y.close();else Y.enqueue(X)}catch(X){Y.error(X)}},cancel(){}})}function uk8($){return{[R80]:!0,validate:$}}function pk8($){return typeof $==="object"&&$!==null&&R80 in $&&$[R80]===!0&&"validate"in $}function dk8($){return pk8($)?$:ck8($)}function ck8($){return uk8((Y)=>{let X=$.safeParse(Y);return X.success?{success:!0,value:X.data}:{success:!1,error:X.error}})}function T14({value:$,schema:Y}){let X=dk8(Y);try{if(X.validate==null)return{success:!0,value:$};let G=X.validate($);if(G.success)return G;return{success:!1,error:J14.wrap({value:$,cause:G.error})}}catch(G){return{success:!1,error:J14.wrap({value:$,cause:G})}}}function cv0({text:$,schema:Y}){try{let X=gk8.default.parse($);if(Y==null)return{success:!0,value:X,rawValue:X};let G=T14({value:X,schema:Y});return G.success?{...G,rawValue:X}:G}catch(X){return{success:!1,error:G14.isInstance(X)?X:new G14({text:$,cause:X})}}}function I14($,Y,X,G){if(!G?.errorMessages)return;if(X)$.errorMessage={...$.errorMessage,[Y]:X}}function r9($,Y,X,G,J){$[Y]=X,I14($,Y,G,J)}function RQ($){if($.target!=="openAi")return{};let Y=[...$.basePath,$.definitionPath,$.openAiAnyTypeName];return $.flags.hasReferencedOpenAiAnyType=!0,{$ref:$.$refStrategy==="relative"?C14(Y,$.currentPath):Y.join("/")}}function rk8($,Y){let X={type:"array"};if($.type?._def&&$.type?._def?.typeName!==U0.ZodAny)X.items=z9($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)r9(X,"minItems",$.minLength.value,$.minLength.message,Y);if($.maxLength)r9(X,"maxItems",$.maxLength.value,$.maxLength.message,Y);if($.exactLength)r9(X,"minItems",$.exactLength.value,$.exactLength.message,Y),r9(X,"maxItems",$.exactLength.value,$.exactLength.message,Y);return X}function ak8($,Y){let X={type:"integer",format:"int64"};if(!$.checks)return X;for(let G of $.checks)switch(G.kind){case"min":if(Y.target==="jsonSchema7")if(G.inclusive)r9(X,"minimum",G.value,G.message,Y);else r9(X,"exclusiveMinimum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMinimum=!0;r9(X,"minimum",G.value,G.message,Y)}break;case"max":if(Y.target==="jsonSchema7")if(G.inclusive)r9(X,"maximum",G.value,G.message,Y);else r9(X,"exclusiveMaximum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMaximum=!0;r9(X,"maximum",G.value,G.message,Y)}break;case"multipleOf":r9(X,"multipleOf",G.value,G.message,Y);break}return X}function sk8(){return{type:"boolean"}}function S14($,Y){return z9($.type._def,Y)}function k14($,Y,X){let G=X??Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>k14($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return tk8($,Y)}}function ek8($,Y){return{...z9($.innerType._def,Y),default:$.defaultValue()}}function $v8($,Y){return Y.effectStrategy==="input"?z9($.schema._def,Y):RQ(Y)}function Yv8($){return{type:"string",enum:Array.from($.values)}}function Gv8($,Y){let X=[z9($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),z9($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((Q)=>!!Q),G=Y.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,J=[];return X.forEach((Q)=>{if(Xv8(Q)){if(J.push(...Q.allOf),Q.unevaluatedProperties===void 0)G=void 0}else{let W=Q;if("additionalProperties"in Q&&Q.additionalProperties===!1){let{additionalProperties:K,...Z}=Q;W=Z}else G=void 0;J.push(W)}}),J.length?{allOf:J,...G}:void 0}function Jv8($,Y){let X=typeof $.value;if(X!=="bigint"&&X!=="number"&&X!=="boolean"&&X!=="string")return{type:Array.isArray($.value)?"array":"object"};if(Y.target==="openApi3")return{type:X==="bigint"?"integer":X,enum:[$.value]};return{type:X==="bigint"?"integer":X,const:$.value}}function v14($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":r9(X,"minLength",typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,G.message,Y);break;case"max":r9(X,"maxLength",typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value,G.message,Y);break;case"email":switch(Y.emailStrategy){case"format:email":yZ(X,"email",G.message,Y);break;case"format:idn-email":yZ(X,"idn-email",G.message,Y);break;case"pattern:zod":XJ(X,xZ.email,G.message,Y);break}break;case"url":yZ(X,"uri",G.message,Y);break;case"uuid":yZ(X,"uuid",G.message,Y);break;case"regex":XJ(X,G.regex,G.message,Y);break;case"cuid":XJ(X,xZ.cuid,G.message,Y);break;case"cuid2":XJ(X,xZ.cuid2,G.message,Y);break;case"startsWith":XJ(X,RegExp(`^${mv0(G.value,Y)}`),G.message,Y);break;case"endsWith":XJ(X,RegExp(`${mv0(G.value,Y)}$`),G.message,Y);break;case"datetime":yZ(X,"date-time",G.message,Y);break;case"date":yZ(X,"date",G.message,Y);break;case"time":yZ(X,"time",G.message,Y);break;case"duration":yZ(X,"duration",G.message,Y);break;case"length":r9(X,"minLength",typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,G.message,Y),r9(X,"maxLength",typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value,G.message,Y);break;case"includes":{XJ(X,RegExp(mv0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")yZ(X,"ipv4",G.message,Y);if(G.version!=="v4")yZ(X,"ipv6",G.message,Y);break}case"base64url":XJ(X,xZ.base64url,G.message,Y);break;case"jwt":XJ(X,xZ.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")XJ(X,xZ.ipv4Cidr,G.message,Y);if(G.version!=="v4")XJ(X,xZ.ipv6Cidr,G.message,Y);break}case"emoji":XJ(X,xZ.emoji(),G.message,Y);break;case"ulid":{XJ(X,xZ.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{yZ(X,"binary",G.message,Y);break}case"contentEncoding:base64":{r9(X,"contentEncoding","base64",G.message,Y);break}case"pattern:zod":{XJ(X,xZ.base64,G.message,Y);break}}break}case"nanoid":XJ(X,xZ.nanoid,G.message,Y)}return X}function mv0($,Y){return Y.patternStrategy==="escape"?Wv8($):$}function Wv8($){let Y="";for(let X=0;X<$.length;X++){if(!Qv8.has($[X]))Y+="\\";Y+=$[X]}return Y}function yZ($,Y,X,G){if($.format||$.anyOf?.some((J)=>J.format)){if(!$.anyOf)$.anyOf=[];if($.format){if($.anyOf.push({format:$.format,...$.errorMessage&&G.errorMessages&&{errorMessage:{format:$.errorMessage.format}}}),delete $.format,$.errorMessage){if(delete $.errorMessage.format,Object.keys($.errorMessage).length===0)delete $.errorMessage}}$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else r9($,"format",Y,X,G)}function XJ($,Y,X,G){if($.pattern||$.allOf?.some((J)=>J.pattern)){if(!$.allOf)$.allOf=[];if($.pattern){if($.allOf.push({pattern:$.pattern,...$.errorMessage&&G.errorMessages&&{errorMessage:{pattern:$.errorMessage.pattern}}}),delete $.pattern,$.errorMessage){if(delete $.errorMessage.pattern,Object.keys($.errorMessage).length===0)delete $.errorMessage}}$.allOf.push({pattern:W14(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else r9($,"pattern",W14(Y,G),X,G)}function W14($,Y){if(!Y.applyRegexFlags||!$.flags)return $.source;let X={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},G=X.i?$.source.toLowerCase():$.source,J="",Q=!1,W=!1,K=!1;for(let Z=0;Z<G.length;Z++){if(Q){J+=G[Z],Q=!1;continue}if(X.i){if(W){if(G[Z].match(/[a-z]/)){if(K)J+=G[Z],J+=`${G[Z-2]}-${G[Z]}`.toUpperCase(),K=!1;else if(G[Z+1]==="-"&&G[Z+2]?.match(/[a-z]/))J+=G[Z],K=!0;else J+=`${G[Z]}${G[Z].toUpperCase()}`;continue}}else if(G[Z].match(/[a-z]/)){J+=`[${G[Z]}${G[Z].toUpperCase()}]`;continue}}if(X.m){if(G[Z]==="^"){J+=`(^|(?<=[\r
]))`;continue}else if(G[Z]==="$"){J+=`($|(?=[\r
]))`;continue}}if(X.s&&G[Z]==="."){J+=W?`${G[Z]}\r
`:`[${G[Z]}\r
]`;continue}if(J+=G[Z],G[Z]==="\\")Q=!0;else if(W&&G[Z]==="]")W=!1;else if(!W&&G[Z]==="[")W=!0}return J}function x14($,Y){if(Y.target==="openAi")console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");if(Y.target==="openApi3"&&$.keyType?._def.typeName===U0.ZodEnum)return{type:"object",required:$.keyType._def.values,properties:$.keyType._def.values.reduce((G,J)=>({...G,[J]:z9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"properties",J]})??RQ(Y)}),{}),additionalProperties:Y.rejectedAdditionalProperties};let X={type:"object",additionalProperties:z9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]})??Y.allowedAdditionalProperties};if(Y.target==="openApi3")return X;if($.keyType?._def.typeName===U0.ZodString&&$.keyType._def.checks?.length){let{type:G,...J}=v14($.keyType._def,Y);return{...X,propertyNames:J}}else if($.keyType?._def.typeName===U0.ZodEnum)return{...X,propertyNames:{enum:$.keyType._def.values}};else if($.keyType?._def.typeName===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&$.keyType._def.type._def.checks?.length){let{type:G,...J}=S14($.keyType._def,Y);return{...X,propertyNames:J}}return X}function Kv8($,Y){if(Y.mapStrategy==="record")return x14($,Y);let X=z9($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||RQ(Y),G=z9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||RQ(Y);return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function Zv8($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function Uv8($){return $.target==="openAi"?void 0:{not:RQ({...$,currentPath:[...$.currentPath,"not"]})}}function Hv8($){return $.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}function zv8($,Y){if(Y.target==="openApi3")return K14($,Y);let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in q80)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=q80[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,K)=>K.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return K14($,Y)}function Vv8($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length)){if(Y.target==="openApi3")return{type:q80[$.innerType._def.typeName],nullable:!0};return{type:[q80[$.innerType._def.typeName],"null"]}}if(Y.target==="openApi3"){let G=z9($.innerType._def,{...Y,currentPath:[...Y.currentPath]});if(G&&"$ref"in G)return{allOf:[G],nullable:!0};return G&&{...G,nullable:!0}}let X=z9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function Fv8($,Y){let X={type:"number"};if(!$.checks)return X;for(let G of $.checks)switch(G.kind){case"int":X.type="integer",I14(X,"type",G.message,Y);break;case"min":if(Y.target==="jsonSchema7")if(G.inclusive)r9(X,"minimum",G.value,G.message,Y);else r9(X,"exclusiveMinimum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMinimum=!0;r9(X,"minimum",G.value,G.message,Y)}break;case"max":if(Y.target==="jsonSchema7")if(G.inclusive)r9(X,"maximum",G.value,G.message,Y);else r9(X,"exclusiveMaximum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMaximum=!0;r9(X,"maximum",G.value,G.message,Y)}break;case"multipleOf":r9(X,"multipleOf",G.value,G.message,Y);break}return X}function Lv8($,Y){let X=Y.target==="openAi",G={type:"object",properties:{}},J=[],Q=$.shape();for(let K in Q){let Z=Q[K];if(Z===void 0||Z._def===void 0)continue;let H=Nv8(Z);if(H&&X){if(Z._def.typeName==="ZodOptional")Z=Z._def.innerType;if(!Z.isNullable())Z=Z.nullable();H=!1}let z=z9(Z._def,{...Y,currentPath:[...Y.currentPath,"properties",K],propertyPath:[...Y.currentPath,"properties",K]});if(z===void 0)continue;if(G.properties[K]=z,!H)J.push(K)}if(J.length)G.required=J;let W=Dv8($,Y);if(W!==void 0)G.additionalProperties=W;return G}function Dv8($,Y){if($.catchall._def.typeName!=="ZodNever")return z9($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function Nv8($){try{return $.isOptional()}catch{return!0}}function Ov8($,Y){return z9($.type._def,Y)}function Ev8($,Y){let G={type:"array",uniqueItems:!0,items:z9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)r9(G,"minItems",$.minSize.value,$.minSize.message,Y);if($.maxSize)r9(G,"maxItems",$.maxSize.value,$.maxSize.message,Y);return G}function Mv8($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>z9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:z9($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>z9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function Rv8($){return{not:RQ($)}}function qv8($){return RQ($)}function z9($,Y,X=!1){let G=Y.seen.get($);if(Y.override){let K=Y.override?.($,Y,G,X);if(K!==lk8)return K}if(G&&!X){let K=_v8(G,Y);if(K!==void 0)return K}let J={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,J);let Q=wv8($,$.typeName,Y),W=typeof Q==="function"?z9(Q(),Y):Q;if(W)jv8($,Y,W);if(Y.postProcess){let K=Y.postProcess(W,$,Y);return J.jsonSchema=W,K}return J.jsonSchema=W,W}function Cv8($){let Y=["ROOT"],X=-1,G=null;function J(Z,H,z){switch(Z){case'"':{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_STRING");break}case"f":case"t":case"n":{X=H,G=H,Y.pop(),Y.push(z),Y.push("INSIDE_LITERAL");break}case"-":{Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"{":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_OBJECT_START");break}case"[":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_ARRAY_START");break}}}function Q(Z,H){switch(Z){case",":{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{X=H,Y.pop();break}}}function W(Z,H){switch(Z){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=H,Y.pop();break}}}for(let Z=0;Z<$.length;Z++){let H=$[Z];switch(Y[Y.length-1]){case"ROOT":J(H,Z,"FINISH");break;case"INSIDE_OBJECT_START":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}case"}":{X=Z,Y.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(H){case":":{Y.pop(),Y.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{J(H,Z,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{Q(H,Z);break}case"INSIDE_STRING":{switch(H){case'"':{Y.pop(),X=Z;break}case"\\":{Y.push("INSIDE_STRING_ESCAPE");break}default:X=Z}break}case"INSIDE_ARRAY_START":{switch(H){case"]":{X=Z,Y.pop();break}default:{X=Z,J(H,Z,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(H){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=Z,Y.pop();break}default:{X=Z;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{J(H,Z,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{Y.pop(),X=Z;break}case"INSIDE_NUMBER":{switch(H){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=Z;break}case"e":case"E":case"-":case".":break;case",":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z);if(Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);break}case"}":{if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);break}case"]":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z);break}default:{Y.pop();break}}break}case"INSIDE_LITERAL":{let V=$.substring(G,Z+1);if(!"false".startsWith(V)&&!"true".startsWith(V)&&!"null".startsWith(V)){if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);else if(Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z)}else X=Z;break}}}let K=$.slice(0,X+1);for(let Z=Y.length-1;Z>=0;Z--)switch(Y[Z]){case"INSIDE_STRING":{K+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{K+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{K+="]";break}case"INSIDE_LITERAL":{let z=$.substring(G,$.length);if("true".startsWith(z))K+="true".slice(z.length);else if("false".startsWith(z))K+="false".slice(z.length);else if("null".startsWith(z))K+="null".slice(z.length)}}return K}function Sv8($){if($===void 0)return{value:void 0,state:"undefined-input"};let Y=cv0({text:$});if(Y.success)return{value:Y.value,state:"successful-parse"};if(Y=cv0({text:Cv8($)}),Y.success)return{value:Y.value,state:"repaired-parse"};return{value:void 0,state:"failed-parse"}}function y14($,Y){let X=ov0.find((G)=>G.name===$);if(!X)throw Error(`Invalid stream part type: ${$}`);return`${X.code}:${JSON.stringify(Y)}
`}function rv8($,Y){var X;let G=(X=void 0)!=null?X:!1;return BX(Iv8($,{$refStrategy:G?"root":"none",target:"jsonSchema7"}),{validate:(J)=>{let Q=$.safeParse(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function BX($,{validate:Y}={}){return{[lv0]:!0,_type:void 0,[R80]:!0,jsonSchema:$,validate:Y}}function av8($){return typeof $==="object"&&$!==null&&lv0 in $&&$[lv0]===!0&&"jsonSchema"in $&&"validate"in $}function sv8($){return av8($)?$:rv8($)}function tv8($){var Y=new Set([$]),X=new Set,G=$.match(Z14);if(!G)return function(){return!1};var J={major:+G[1],minor:+G[2],patch:+G[3],prerelease:G[4]};if(J.prerelease!=null)return function(Z){return Z===$};function Q(K){return X.add(K),!1}function W(K){return Y.add(K),!0}return function(Z){if(Y.has(Z))return!0;if(X.has(Z))return!1;var H=Z.match(Z14);if(!H)return Q(Z);var z={major:+H[1],minor:+H[2],patch:+H[3],prerelease:H[4]};if(z.prerelease!=null)return Q(Z);if(J.major!==z.major)return Q(Z);if(J.major===0){if(J.minor===z.minor&&J.patch<=z.patch)return W(Z);return Q(Z)}if(J.minor<=z.minor)return W(Z);return Q(Z)}}function tv0($,Y,X,G){var J;if(G===void 0)G=!1;var Q=Og[Bg]=(J=Og[Bg])!==null&&J!==void 0?J:{version:tO};if(!G&&Q[$]){var W=Error("@opentelemetry/api: Attempted duplicate registration of API: "+$);return X.error(W.stack||W.message),!1}if(Q.version!==tO){var W=Error("@opentelemetry/api: Registration of version v"+Q.version+" for "+$+" does not match previously registered API v"+tO);return X.error(W.stack||W.message),!1}return Q[$]=Y,X.debug("@opentelemetry/api: Registered a global for "+$+" v"+tO+"."),!0}function Eg($){var Y,X,G=(Y=Og[Bg])===null||Y===void 0?void 0:Y.version;if(!G||!ev8(G))return;return(X=Og[Bg])===null||X===void 0?void 0:X[$]}function ev0($,Y){Y.debug("@opentelemetry/api: Unregistering a global for "+$+" v"+tO+".");var X=Og[Bg];if(X)delete X[$]}function Ng($,Y,X){var G=Eg("diag");if(!G)return;return X.unshift(Y),G[$].apply(G,Xx8([],Yx8(X),!1))}function Jx8($,Y){if($<SW.NONE)$=SW.NONE;else if($>SW.ALL)$=SW.ALL;Y=Y||{};function X(G,J){var Q=Y[G];if(typeof Q==="function"&&$>=J)return Q.bind(Y);return function(){}}return{error:X("error",SW.ERROR),warn:X("warn",SW.WARN),info:X("info",SW.INFO),debug:X("debug",SW.DEBUG),verbose:X("verbose",SW.VERBOSE)}}function Zx8($){return Symbol.for($)}function Yx0($){return $.getValue($x0)||void 0}function Bx8(){return Yx0(b14.getInstance().active())}function Xx0($,Y){return $.setValue($x0,Y)}function Ox8($){return $.deleteValue($x0)}function Ex8($,Y){return Xx0($,new Ag(Y))}function g14($){var Y;return(Y=Yx0($))===null||Y===void 0?void 0:Y.spanContext()}function qx8($){return Mx8.test($)&&$!==f14}function Px8($){return Rx8.test($)&&$!==h14}function m14($){return qx8($.traceId)&&Px8($.spanId)}function wx8($){return new Ag($)}function _x8($){return typeof $==="object"&&typeof $.spanId==="string"&&typeof $.traceId==="string"&&typeof $.traceFlags==="number"}function p14($,{contentType:Y,dataStreamVersion:X}){let G=new Headers($!=null?$:{});if(!G.has("Content-Type"))G.set("Content-Type",Y);return G.set("X-Vercel-AI-Data-Stream",X),G}function nx8({prompt:$,schema:Y,schemaPrefix:X=Y!=null?cx8:void 0,schemaSuffix:G=Y!=null?lx8:ix8}){return[$!=null&&$.length>0?$:void 0,$!=null&&$.length>0?"":void 0,X,Y!=null?JSON.stringify(Y):void 0,G].filter((J)=>J!=null).join(`
`)}function a14($,Y){let X=$.getReader(),G=Y.getReader(),J=void 0,Q=void 0,W=!1,K=!1;async function Z(z){try{if(J==null)J=X.read();let V=await J;if(J=void 0,!V.done)z.enqueue(V.value);else z.close()}catch(V){z.error(V)}}async function H(z){try{if(Q==null)Q=G.read();let V=await Q;if(Q=void 0,!V.done)z.enqueue(V.value);else z.close()}catch(V){z.error(V)}}return new ReadableStream({async pull(z){try{if(W){await H(z);return}if(K){await Z(z);return}if(J==null)J=X.read();if(Q==null)Q=G.read();let{result:V,reader:F}=await Promise.race([J.then((L)=>({result:L,reader:X})),Q.then((L)=>({result:L,reader:G}))]);if(!V.done)z.enqueue(V.value);if(F===X){if(J=void 0,V.done)await H(z),W=!0}else if(Q=void 0,V.done)K=!0,await Z(z)}catch(V){z.error(V)}},cancel(){X.cancel(),G.cancel()}})}function o14($={}){let Y=new TextEncoder,X="";return new TransformStream({async start(){if($.onStart)await $.onStart()},async transform(G,J){if(J.enqueue(Y.encode(G)),X+=G,$.onToken)await $.onToken(G);if($.onText&&typeof G==="string")await $.onText(G)},async flush(){if($.onCompletion)await $.onCompletion(X);if($.onFinal)await $.onFinal(X)}})}function Qx0($,Y){return $.pipeThrough(new TransformStream({transform:async(X,G)=>{var J;if(typeof X==="string"){G.enqueue(X);return}if("event"in X){if(X.event==="on_chat_model_stream")V14((J=X.data)==null?void 0:J.chunk,G);return}V14(X,G)}})).pipeThrough(o14(Y)).pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({transform:async(X,G)=>{G.enqueue(y14("text",X))}}))}function Vy8($,Y){return Qx0($,Y).pipeThrough(new TextEncoderStream)}function Fy8($,Y){var X;let G=Qx0($,Y==null?void 0:Y.callbacks).pipeThrough(new TextEncoderStream),J=Y==null?void 0:Y.data,Q=Y==null?void 0:Y.init,W=J?a14(J.stream,G):G;return new Response(W,{status:(X=Q==null?void 0:Q.status)!=null?X:200,statusText:Q==null?void 0:Q.statusText,headers:p14(Q==null?void 0:Q.headers,{contentType:"text/plain; charset=utf-8",dataStreamVersion:"v1"})})}function Ly8($,Y){Y.dataStream.merge(Qx0($,Y.callbacks))}function V14($,Y){if(typeof $.content==="string")Y.enqueue($.content);else{let X=$.content;for(let G of X)if(G.type==="text")Y.enqueue(G.text)}}function Wx0($,Y){let X=Oy8();return mk8($[Symbol.asyncIterator]()).pipeThrough(new TransformStream({async transform(G,J){J.enqueue(X(G.delta))}})).pipeThrough(o14(Y)).pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({transform:async(G,J)=>{J.enqueue(y14("text",G))}}))}function Ny8($,Y){return Wx0($,Y).pipeThrough(new TextEncoderStream)}function Ay8($,Y={}){var X;let{init:G,data:J,callbacks:Q}=Y,W=Wx0($,Q).pipeThrough(new TextEncoderStream),K=J?a14(J.stream,W):W;return new Response(K,{status:(X=G==null?void 0:G.status)!=null?X:200,statusText:G==null?void 0:G.statusText,headers:p14(G==null?void 0:G.headers,{contentType:"text/plain; charset=utf-8",dataStreamVersion:"v1"})})}function By8($,Y){Y.dataStream.merge(Wx0($,Y.callbacks))}function Oy8(){let $=!0;return(Y)=>{if($){if(Y=Y.trimStart(),Y)$=!1}return Y}}function XE($,Y="jsonSchema7"){let X=g04($,Y);return BX(X,{validate:(G)=>{let J=$.safeParse(G);return J.success?{success:!0,value:J.data}:{success:!1,error:J.error}}})}function T80($){return typeof $==="object"&&$!==null&&(("_def"in $)||("_zod"in $))&&"parse"in $&&typeof $.parse==="function"&&"safeParse"in $&&typeof $.safeParse==="function"}function Ey8($){if(T80($))return $;else{let Y="jsonSchema"in $?$.jsonSchema:$;try{if("toJSONSchema"in U)return UG(Y);else return oO(Y)}catch(X){let G=`[Schema Builder] Failed to convert schema parameters to Zod. Original schema: ${JSON.stringify(Y)}`;throw console.error(G,X),Error(G+(X instanceof Error?`
${X.stack}`:`
Unknown error object`))}}}function GE({schema:$,compatLayers:Y,mode:X}){if(X==="jsonSchema"){let G=Q4($);for(let J of Y)if(J.shouldApply()){let Q=J.processToCompatSchema(G);return $6(Q)}return $6(G)}else{let G;if(T80($))G=$;else{if(z5($))throw Error("StandardSchemaWithJSON is not supported for applyCompatLayer and aiSdkSchema mode");G=Ey8($)}for(let J of Y)if(J.shouldApply())return J.processToAISDKSchema(G);return XE(G)}}function Rg($,Y){if($.type===Y)return!0;if(Array.isArray($.type)&&$.type.includes(Y))return!0;return!1}function eO($){return Rg($,"object")||$.properties!==void 0}function jj($){return Rg($,"array")||$.items!==void 0}function Tj($){return Rg($,"string")}function I80($){return Rg($,"number")||Rg($,"integer")}function _y8($){return Array.isArray($.anyOf)&&$.anyOf.length>0}function jy8($){return Array.isArray($.oneOf)&&$.oneOf.length>0}function Ij($){return _y8($)||jy8($)||Array.isArray($.type)}function Cj($){return Array.isArray($.allOf)&&$.allOf.length>0}function Ty8($,Y){if(!Y.required||!Array.isArray(Y.required))return!0;return!Y.required.includes($)}function sv0($,Y){if($===null||$===void 0)return $;if(typeof $!=="object"||Array.isArray($)){if(Array.isArray($)&&Y.items&&typeof Y.items==="object")return $.map((Q)=>sv0(Q,Y.items));return $}let X=Y.properties;if(!X)return $;let G=Y.required||[],J={};for(let[Q,W]of Object.entries($))if(W===null&&!G.includes(Q))J[Q]=void 0;else if(W!==null&&typeof W==="object"&&X[Q])J[Q]=sv0(W,X[Q]);else J[Q]=W;return J}function Y44($){let Y;try{Y=$["~standard"].jsonSchema.input({target:"draft-07"})}catch{}if(!Y)return $;let X=$["~standard"];return{"~standard":{version:X.version,vendor:X.vendor,types:X.types,validate:(G,J)=>{let Q=sv0(G,Y);return X.validate(Q,J)},jsonSchema:X.jsonSchema}}}function $E($){return(Y)=>Y instanceof $.ZodOptional}function wg($){return(Y)=>Y instanceof $.ZodObject}function Kx0($){return(Y)=>Y instanceof $.ZodNull}function _g($){return(Y)=>Y instanceof $.ZodArray}function jg($){return(Y)=>Y instanceof $.ZodUnion}function Tg($){return(Y)=>Y instanceof $.ZodString}function Zx0($){return(Y)=>Y instanceof $.ZodNumber}function Iy8($){return(Y)=>Y instanceof $.ZodDate}function X44($){return(Y)=>Y instanceof $.ZodDefault}function qg($){return(Y)=>Y instanceof $.ZodNullable}function Sj($){return(Y)=>Y instanceof $.ZodIntersection}function Sy8($){return $.format==="date-time"||$.format==="date"}function oz($){if(typeof $!=="object"||$===null)return $;let Y={...$};if(Array.isArray(Y.type)){let X=Y.type.filter((G)=>G!=="null");if(X.length===1)Y.type=X[0],Y.nullable=!0;else delete Y.type,delete Y.nullable}if(Array.isArray(Y.enum)&&Y.enum.some((X)=>typeof X!=="string"))delete Y.enum;if("const"in Y&&typeof Y.const!=="string")delete Y.const;if(Y.anyOf&&Array.isArray(Y.anyOf)){let X=Y.anyOf.find((J)=>typeof J==="object"&&J!==null&&J.type==="null"),G=Y.anyOf.filter((J)=>!(typeof J==="object"&&J!==null&&J.type==="null"));if(X){let{anyOf:J,...Q}=Y;if(G.length===1&&typeof G[0]==="object"&&G[0]!==null){let W=oz(G[0]);return W.type?{...Q,...W,nullable:!0}:{...Q,...W}}return Q}}if(Y.properties&&typeof Y.properties==="object")Y.properties=Object.fromEntries(Object.entries(Y.properties).map(([X,G])=>[X,oz(G)]));if(Y.items)if(Array.isArray(Y.items))Y.items=Y.items.map((X)=>oz(X));else Y.items=oz(Y.items);if(Y.additionalProperties&&typeof Y.additionalProperties==="object")Y.additionalProperties=oz(Y.additionalProperties);if(Y.anyOf&&Array.isArray(Y.anyOf))Y.anyOf=Y.anyOf.map((X)=>oz(X));if(Y.oneOf&&Array.isArray(Y.oneOf))Y.oneOf=Y.oneOf.map((X)=>oz(X));if(Y.allOf&&Array.isArray(Y.allOf))Y.allOf=Y.allOf.map((X)=>oz(X));if(Y.anyOf&&Array.isArray(Y.anyOf)){if(Y.description){for(let X of Y.anyOf)if(typeof X==="object"&&X!==null&&!X.description)X.description=Y.description}return{anyOf:Y.anyOf}}return Y}var qk8,L14,Pk8,D14,wk8,_k8,jk8=($,Y)=>function(){return Y||(0,$[D14($)[0]])((Y={exports:{}}).exports,Y),Y.exports},Tk8=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of D14(Y))if(!_k8.call($,J)&&J!==X)L14($,J,{get:()=>Y[J],enumerable:!(G=Pk8(Y,J))||G.enumerable})}return $},Ik8=($,Y,X)=>(X=$!=null?qk8(wk8($)):{},Tk8(L14(X,"default",{value:$,enumerable:!0}),$)),Ck8,N14="vercel.ai.error",Sk8,A14,kk8,zD,O14="AI_InvalidArgumentError",E14,vk8,M14,xk8,R14="AI_JSONParseError",q14,yk8,P14,G14,w14="AI_TypeValidationError",_14,bk8,j14,hk8,J14,fk8=($,Y=21)=>{return(X=Y)=>{let G="",J=X|0;while(J--)G+=$[Math.random()*$.length|0];return G}},gk8,YE=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=fk8(X,Y);if($==null)return J;if(X.includes(G))throw new xk8({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return(Q)=>`${$}${G}${J(Q)}`},R80,lk8,Q14,ik8=($)=>typeof $==="string"?{...Q14,name:$}:{...Q14,...$},nk8=($)=>{let Y=ik8($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,flags:{hasReferencedOpenAiAnyType:!1},currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}},C14=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")},ok8=($,Y)=>{return z9($.innerType._def,Y)},tk8=($,Y)=>{let X={type:"integer",format:"unix-time"};if(Y.target==="openApi3")return X;for(let G of $.checks)switch(G.kind){case"min":r9(X,"minimum",G.value,G.message,Y);break;case"max":r9(X,"maximum",G.value,G.message,Y);break}return X},Xv8=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $},gv0=void 0,xZ,Qv8,q80,K14=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>z9(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0},Av8=($,Y)=>{if(Y.currentPath.toString()===Y.propertyPath?.toString())return z9($.innerType._def,Y);let X=z9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return X?{anyOf:[{not:RQ(Y)},X]}:RQ(Y)},Bv8=($,Y)=>{if(Y.pipeStrategy==="input")return z9($.in._def,Y);else if(Y.pipeStrategy==="output")return z9($.out._def,Y);let X=z9($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=z9($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}},Pv8=($,Y)=>{return z9($.innerType._def,Y)},wv8=($,Y,X)=>{switch(Y){case U0.ZodString:return v14($,X);case U0.ZodNumber:return Fv8($,X);case U0.ZodObject:return Lv8($,X);case U0.ZodBigInt:return ak8($,X);case U0.ZodBoolean:return sk8();case U0.ZodDate:return k14($,X);case U0.ZodUndefined:return Rv8(X);case U0.ZodNull:return Hv8(X);case U0.ZodArray:return rk8($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return zv8($,X);case U0.ZodIntersection:return Gv8($,X);case U0.ZodTuple:return Mv8($,X);case U0.ZodRecord:return x14($,X);case U0.ZodLiteral:return Jv8($,X);case U0.ZodEnum:return Yv8($);case U0.ZodNativeEnum:return Zv8($);case U0.ZodNullable:return Vv8($,X);case U0.ZodOptional:return Av8($,X);case U0.ZodMap:return Kv8($,X);case U0.ZodSet:return Ev8($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return Ov8($,X);case U0.ZodNaN:case U0.ZodNever:return Uv8(X);case U0.ZodEffects:return $v8($,X);case U0.ZodAny:return RQ(X);case U0.ZodUnknown:return qv8(X);case U0.ZodDefault:return ek8($,X);case U0.ZodBranded:return S14($,X);case U0.ZodReadonly:return Pv8($,X);case U0.ZodCatch:return ok8($,X);case U0.ZodPipeline:return Bv8($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})()}},_v8=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:C14(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),RQ(Y);return Y.$refStrategy==="seen"?RQ(Y):void 0}}},jv8=($,Y,X)=>{if($.description){if(X.description=$.description,Y.markdownDescription)X.markdownDescription=$.description}return X},Tv8=($,Y)=>{let X=nk8(Y),G=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((Z,[H,z])=>({...Z,[H]:z9(z._def,{...X,currentPath:[...X.basePath,X.definitionPath,H]},!0)??RQ(X)}),{}):void 0,J=typeof Y==="string"?Y:Y?.nameStrategy==="title"?void 0:Y?.name,Q=z9($._def,J===void 0?X:{...X,currentPath:[...X.basePath,X.definitionPath,J]},!1)??RQ(X),W=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(W!==void 0)Q.title=W;if(X.flags.hasReferencedOpenAiAnyType){if(!G)G={};if(!G[X.openAiAnyTypeName])G[X.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:X.$refStrategy==="relative"?"1":[...X.basePath,X.definitionPath,X.openAiAnyTypeName].join("/")}}}let K=J===void 0?G?{...Q,[X.definitionPath]:G}:Q:{$ref:[...X.$refStrategy==="relative"?[]:X.basePath,X.definitionPath,J].join("/"),[X.definitionPath]:{...G,[J]:Q}};if(X.target==="jsonSchema7")K.$schema="http://json-schema.org/draft-07/schema#";else if(X.target==="jsonSchema2019-09"||X.target==="openAi")K.$schema="https://json-schema.org/draft/2019-09/schema#";if(X.target==="openAi"&&(("anyOf"in K)||("oneOf"in K)||("allOf"in K)||("type"in K)&&Array.isArray(K.type)))console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");return K},Iv8,kv8,vv8,xv8,yv8,bv8,hv8,fv8,gv8,mv8,uv8,pv8,dv8,cv8,lv8,iv8,nv8,ov0,lv0,ov8,tO="1.9.0",Z14,ev8,$x8,Bg,Og,Yx8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},Xx8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},Gx8,SW,Qx8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},Wx8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},Kx8="diag",P80,Ux8,Hx8,zx8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},Vx8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},Fx8,Lx8=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},Dx8=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},uv0="context",Nx8,b14,iv0,h14="0000000000000000",f14="00000000000000000000000000000000",Ax8,Ag,$x0,Mx8,Rx8,pv0,u14,jx8,Tx8,Ix8,Cx8,U14,H14,dv0="trace",Sx8,kx8,Gx0=($,Y)=>{for(var X in Y)kx8($,X,{get:Y[X],enumerable:!0})},d14="AI_NoObjectGeneratedError",c14,vx8,l14,z14,i14,nv0,K7,xx8,n14,yx8,r14,bx8,hx8,fx8,gx8,mx8,ux8,px8,dx8,cx8="JSON schema:",lx8="You MUST answer with a JSON object that matches the JSON schema above.",ix8="You MUST answer with JSON.",rx8,ax8=()=>({type:"text",responseFormat:()=>({type:"text"}),injectIntoSystemPrompt({system:$}){return $},parsePartial({text:$}){return{partial:$}},parseOutput({text:$}){return $}}),sx8=({schema:$})=>{let Y=sv8($);return{type:"object",responseFormat:({model:X})=>({type:"json",schema:X.supportsStructuredOutputs?Y.jsonSchema:void 0}),injectIntoSystemPrompt({system:X,model:G}){return G.supportsStructuredOutputs?X:nx8({prompt:X,schema:Y.jsonSchema})},parsePartial({text:X}){let G=Sv8(X);switch(G.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:G.value};default:{let J=G.state;throw Error(`Unsupported parse state: ${J}`)}}},parseOutput({text:X},G){let J=cv0({text:X});if(!J.success)throw new z14({message:"No object generated: could not parse the response.",cause:J.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});let Q=T14({value:J.value,schema:Y});if(!Q.success)throw new z14({message:"No object generated: response did not match schema.",cause:Q.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});return Q.value}}},ox8,Jx0,Mg,tx8,ex8,$y8,Yy8,Xy8,Gy8,s14,Jy8,Qy8,Wy8,j80="2.0",Ky8,Zy8,Uy8,Hy8,zy8,Dy8,t14,e14,$44,w80,_80,Kt5,My8=class{model;parent;constructor($,Y){this.model=$,this.parent=Y}getModel(){return this.model}getUnsupportedZodTypes(){return w80}isOptional($){return $ instanceof LW}isObj($){return $ instanceof g5}isNull($){return $ instanceof TL}isNullable($){return $ instanceof DZ}isArr($){return $ instanceof FW}isUnion($){return $ instanceof IL}isString($){return $ instanceof VW}isNumber($){return $ instanceof L3}isDate($){return $ instanceof _z}isDefault($){return $ instanceof SL}isIntersection($){return $ instanceof jz}shouldApply(){return this.parent.shouldApply()}getSchemaTarget(){return this.parent.getSchemaTarget()}processZodType($){return this.parent.processZodType($)}defaultZodObjectHandler($,Y={passthrough:!0}){let X=Object.entries($.shape).reduce((J,[Q,W])=>{return J[Q]=this.processZodType(W),J},{}),G=DW.object(X);if($._def.unknownKeys==="strict")G=G.strict();if($._def.catchall&&!($._def.catchall instanceof DW.ZodNever))G=G.catchall($._def.catchall);if($.description)G=G.describe($.description);if(Y.passthrough&&$._def.unknownKeys==="passthrough")G=G.passthrough();return G}mergeParameterDescription($,Y){if(Y.length>0)return($?$+`
`:"")+`constraints: ${Y.join(", ")}`;else return $}defaultUnsupportedZodTypeHandler($,Y=w80){if(Y.includes($._def?.typeName))throw Error(`${this.model.modelId} does not support zod type: ${$._def?.typeName}`);return $}defaultZodArrayHandler($,Y=$44){let X=$._def,G=this.processZodType(X.type),J=DW.array(G),Q=[];if(X.minLength?.value!==void 0)if(Y.includes("min"))Q.push(`minimum length ${X.minLength.value}`);else J=J.min(X.minLength.value);if(X.maxLength?.value!==void 0)if(Y.includes("max"))Q.push(`maximum length ${X.maxLength.value}`);else J=J.max(X.maxLength.value);if(X.exactLength?.value!==void 0)if(Y.includes("length"))Q.push(`exact length ${X.exactLength.value}`);else J=J.length(X.exactLength.value);let W=this.mergeParameterDescription($.description,Q);if(W)J=J.describe(W);return J}defaultZodUnionHandler($){let Y=$._def.options.map((G)=>this.processZodType(G));if(Y.length<2)throw Error("Union must have at least 2 options");let X=DW.union(Y);if($.description)X=X.describe($.description);return X}defaultZodStringHandler($,Y=t14){let X=[],G=$._def.checks||[],J=[];for(let K of G)if("kind"in K)if(Y.includes(K.kind))switch(K.kind){case"regex":{X.push(`input must match this regex ${K.regex.source}`);break}case"emoji":case"email":case"url":case"uuid":case"cuid":{X.push(`a valid ${K.kind}`);break}case"min":case"max":{X.push(`${K.kind}imum length ${K.value}`);break}}else J.push(K);let Q=DW.string();for(let K of J)Q=Q._addCheck(K);let W=this.mergeParameterDescription($.description,X);if(W)Q=Q.describe(W);return Q}defaultZodNumberHandler($,Y=e14){let X=[],G=$._def.checks||[],J=[];for(let K of G)if("kind"in K)if(Y.includes(K.kind))switch(K.kind){case"min":if(K.inclusive)X.push(`greater than or equal to ${K.value}`);else X.push(`greater than ${K.value}`);break;case"max":if(K.inclusive)X.push(`lower than or equal to ${K.value}`);else X.push(`lower than ${K.value}`);break;case"multipleOf":{X.push(`multiple of ${K.value}`);break}}else J.push(K);let Q=DW.number();for(let K of J)switch(K.kind){case"int":Q=Q.int();break;case"finite":Q=Q.finite();break;default:Q=Q._addCheck(K)}let W=this.mergeParameterDescription($.description,X);if(W)Q=Q.describe(W);return Q}defaultZodDateHandler($){let Y=[],X=$._def.checks||[];for(let Q of X)if("kind"in Q)switch(Q.kind){case"min":let W=new Date(Q.value);if(!isNaN(W.getTime()))Y.push(`Date must be newer than ${W.toISOString()} (ISO)`);break;case"max":let K=new Date(Q.value);if(!isNaN(K.getTime()))Y.push(`Date must be older than ${K.toISOString()} (ISO)`);break}Y.push("Date format is date-time");let G=DW.string().describe("date-time"),J=this.mergeParameterDescription($.description,Y);if(J)G=G.describe(J);return G}defaultZodOptionalHandler($,Y=_80){if(Y.includes($._def.innerType._def.typeName))return this.processZodType($._def.innerType).optional();else return $}defaultZodNullableHandler($,Y=_80){if(Y.includes($._def.innerType._def.typeName))return this.processZodType($._def.innerType).nullable();else return $}collectIntersectionLeaves($){if($ instanceof jz)return[...this.collectIntersectionLeaves($._def.left),...this.collectIntersectionLeaves($._def.right)];return[$]}defaultZodIntersectionHandler($){let X=this.collectIntersectionLeaves($).map((G)=>this.processZodType(G));if(X.every((G)=>G instanceof g5)){let G={};for(let Q of X)Object.assign(G,Q.shape);let J=DW.object(G);if($.description)J=J.describe($.description);return J}return DW.any().describe($.description||"intersection type")}processToAISDKSchema($){let Y=this.processZodType($);return XE(Y,this.getSchemaTarget())}processToJSONSchema($){return this.processToAISDKSchema($).jsonSchema}},Ry8,qy8,Py8,rv0,av0,wy8=class{model;parent;constructor($,Y){this.model=$,this.parent=Y}getModel(){return this.model}getUnsupportedZodTypes(){return rv0}isOptional($){return $ instanceof Rz}isObj($){return $ instanceof Mz}isNull($){return $ instanceof gw}isNullable($){return $ instanceof dw}isArr($){return $ instanceof uw}isUnion($){return $ instanceof RL}isString($){return $ instanceof Bz}isNumber($){return $ instanceof Ez}isDate($){return $ instanceof ML}isDefault($){return $ instanceof cw}isIntersection($){return $ instanceof eB}shouldApply(){return this.parent.shouldApply()}getSchemaTarget(){return this.parent.getSchemaTarget()}processZodType($){return this.parent.processZodType($)}defaultZodObjectHandler($,Y={passthrough:!0}){let X=Object.entries($.shape).reduce((J,[Q,W])=>{return J[Q]=this.processZodType(W),J},{}),G=U.object(X);if($._zod.def.catchall instanceof U.ZodNever)G=U.strictObject(X);else if($._zod.def.catchall instanceof U.ZodUnknown){if(Y.passthrough)G=U.looseObject(X)}else if($._zod.def.catchall)G=G.catchall($._zod.def.catchall);if($.description)G=G.describe($.description);return G}mergeParameterDescription($,Y){if(Y.length>0)return($?$+`
`:"")+`constraints: ${Y.join(", ")}`;else return $}defaultUnsupportedZodTypeHandler($,Y=rv0){if(Y.includes($.constructor.name))throw Error(`${this.model.modelId} does not support zod type: ${$.constructor.name}`);return $}defaultZodArrayHandler($,Y=Py8){let X=$._zod.def,G=this.processZodType(X.element),J=U.array(G),Q=[];if(X.checks)for(let H of X.checks){if(H._zod.def.check==="min_length")if(Y.includes("min"))Q.push(`minimum length ${H._zod.def.minimum}`);else J=J.min(H._zod.def.minimum);if(H._zod.def.check==="max_length")if(Y.includes("max"))Q.push(`maximum length ${H._zod.def.maximum}`);else J=J.max(H._zod.def.maximum);if(H._zod.def.check==="length_equals")if(Y.includes("length"))Q.push(`exact length ${H._zod.def.length}`);else J=J.length(H._zod.def.length)}let W=$.meta()?.description,K=$.description,Z=this.mergeParameterDescription(W||K,Q);if(Z)J=J.describe(Z);return J}defaultZodUnionHandler($){let Y=$._zod.def.options.map((G)=>this.processZodType(G));if(Y.length<2)throw Error("Union must have at least 2 options");let X=U.union(Y);if($.description)X=X.describe($.description);return X}defaultZodStringHandler($,Y=Ry8){let X=[],G=$._zod.def.checks||[],J=[];if(G)for(let H of G)if(Y.includes(H._zod.def.check))switch(H._zod.def.check){case"min_length":X.push(`minimum length ${H._zod.def.minimum}`);break;case"max_length":X.push(`maximum length ${H._zod.def.maximum}`);break;case"string_format":switch(H._zod.def.format){case"email":case"url":case"emoji":case"uuid":case"cuid":X.push(`a valid ${H._zod.def.format}`);break;case"regex":X.push(`input must match this regex ${H._zod.def.pattern}`);break}break}else J.push(H);let Q=U.string();for(let H of J)Q=Q.check(H);let W=$.meta()?.description,K=$.description,Z=this.mergeParameterDescription(W||K,X);if(Z)Q=Q.describe(Z);return Q}defaultZodNumberHandler($,Y=qy8){let X=[],G=$._zod.def.checks||[],J=[];if(G)for(let K of G)if(Y.includes(K._zod.def.check))switch(K._zod.def.check){case"greater_than":if(K._zod.def.inclusive)X.push(`greater than or equal to ${K._zod.def.value}`);else X.push(`greater than ${K._zod.def.value}`);break;case"less_than":if(K._zod.def.inclusive)X.push(`lower than or equal to ${K._zod.def.value}`);else X.push(`lower than ${K._zod.def.value}`);break;case"multiple_of":{X.push(`multiple of ${K._zod.def.value}`);break}}else J.push(K);let Q=U.number();for(let K of J)switch(K._zod.def.check){case"number_format":{switch(K._zod.def.format){case"safeint":Q=Q.int();break}break}default:Q=Q.check(K)}let W=this.mergeParameterDescription($.description,X);if(W)Q=Q.describe(W);return Q}defaultZodDateHandler($){let Y=[],X=$._zod.def.checks||[];if(X)for(let Q of X)switch(Q._zod.def.check){case"less_than":let W=new Date(Q._zod.def.value);if(!isNaN(W.getTime()))Y.push(`Date must be newer than ${W.toISOString()} (ISO)`);break;case"greater_than":let K=new Date(Q._zod.def.value);if(!isNaN(K.getTime()))Y.push(`Date must be older than ${K.toISOString()} (ISO)`);break}Y.push("Date format is date-time");let G=U.string().describe("date-time"),J=this.mergeParameterDescription($.description,Y);if(J)G=G.describe(J);return G}defaultZodOptionalHandler($,Y=av0){if(Y.includes($.constructor.name))return this.processZodType($._zod.def.innerType).optional();else return $}defaultZodNullableHandler($,Y=av0){if(Y.includes($.constructor.name))return this.processZodType($._zod.def.innerType).nullable();else return $}collectIntersectionLeaves($){if($ instanceof eB)return[...this.collectIntersectionLeaves($._zod.def.left),...this.collectIntersectionLeaves($._zod.def.right)];return[$]}defaultZodIntersectionHandler($){let X=this.collectIntersectionLeaves($).map((G)=>this.processZodType(G));if(X.every((G)=>G instanceof Mz)){let G={};for(let Q of X)for(let[W,K]of Object.entries(Q.shape)){if(W in G)throw Error("Cannot flatten intersections with overlapping keys");G[W]=K}let J=U.object(G);if($.description)J=J.describe($.description);return J}return U.any().describe($.description||"intersection type")}processToAISDKSchema($){let Y=this.processZodType($);return XE(Y,this.getSchemaTarget())}processToJSONSchema($){return this.processToAISDKSchema($).jsonSchema}},F14,Pg=class{model;v3Layer;v4Layer;constructor($){this.model=$,this.v3Layer=new My8($,this),this.v4Layer=new wy8($,this)}preProcessJSONNode($,Y){}postProcessJSONNode($,Y){}getModel(){return this.model}getUnsupportedZodTypes($){if("_zod"in $)return this.v4Layer.getUnsupportedZodTypes();else return this.v3Layer.getUnsupportedZodTypes()}isOptional($){if("_zod"in $)return this.v4Layer.isOptional($);else return this.v3Layer.isOptional($)}isObj($){if("_zod"in $)return this.v4Layer.isObj($);else return this.v3Layer.isObj($)}isNull($){if("_zod"in $)return this.v4Layer.isNull($);else return this.v3Layer.isNull($)}isNullable($){if("_zod"in $)return this.v4Layer.isNullable($);else return this.v3Layer.isNullable($)}isArr($){if("_zod"in $)return this.v4Layer.isArr($);else return this.v3Layer.isArr($)}isUnion($){if("_zod"in $)return this.v4Layer.isUnion($);else return this.v3Layer.isUnion($)}isString($){if("_zod"in $)return this.v4Layer.isString($);else return this.v3Layer.isString($)}isNumber($){if("_zod"in $)return this.v4Layer.isNumber($);else return this.v3Layer.isNumber($)}isDate($){if("_zod"in $)return this.v4Layer.isDate($);else return this.v3Layer.isDate($)}isDefault($){if("_zod"in $)return this.v4Layer.isDefault($);else return this.v3Layer.isDefault($)}isIntersection($){if("_zod"in $)return this.v4Layer.isIntersection($);else return this.v3Layer.isIntersection($)}defaultZodObjectHandler($,Y={passthrough:!0}){if("_zod"in $)return this.v4Layer.defaultZodObjectHandler($,Y);else return this.v3Layer.defaultZodObjectHandler($,Y)}mergeParameterDescription($,Y){return this.v3Layer.mergeParameterDescription($,Y)}defaultUnsupportedZodTypeHandler($,Y){if("_zod"in $)return this.v4Layer.defaultUnsupportedZodTypeHandler($,Y??rv0);else return this.v3Layer.defaultUnsupportedZodTypeHandler($,Y??w80)}defaultZodArrayHandler($,Y=$44){if("_zod"in $)return this.v4Layer.defaultZodArrayHandler($,Y);else return this.v3Layer.defaultZodArrayHandler($,Y)}defaultZodUnionHandler($){if("_zod"in $)return this.v4Layer.defaultZodUnionHandler($);else return this.v3Layer.defaultZodUnionHandler($)}defaultZodStringHandler($,Y=t14){if("_zod"in $)return this.v4Layer.defaultZodStringHandler($);else return this.v3Layer.defaultZodStringHandler($,Y)}defaultZodNumberHandler($,Y=e14){if("_zod"in $)return this.v4Layer.defaultZodNumberHandler($);else return this.v3Layer.defaultZodNumberHandler($,Y)}defaultZodDateHandler($){if("_zod"in $)return this.v4Layer.defaultZodDateHandler($);else return this.v3Layer.defaultZodDateHandler($)}defaultZodOptionalHandler($,Y){if(!Y)Y=["ZodObject","ZodArray","ZodUnion","ZodString","ZodNumber"];let X;if("_zod"in $){let J=$._zod?.def?.innerType?._zod?.def?.type;if(!J)return $;X="Zod"+J.charAt(0).toUpperCase()+J.slice(1)}else X=$._def.innerType._def.typeName;if(Y.includes(X))if("_zod"in $){let G=$._zod?.def?.innerType;if(!G)return $;return this.processZodType(G).optional()}else return this.processZodType($._def.innerType).optional();else return $}defaultZodNullableHandler($,Y){if("_zod"in $)return this.v4Layer.defaultZodNullableHandler($,Y??av0);else return this.v3Layer.defaultZodNullableHandler($,Y??_80)}defaultZodIntersectionHandler($){if("_zod"in $)return this.v4Layer.defaultZodIntersectionHandler($);else return this.v3Layer.defaultZodIntersectionHandler($)}processToAISDKSchema($){let Y=this.processZodType($);return XE(Y,this.getSchemaTarget())}processToJSONSchema($,Y="input"){let X=Q4($),G=$6(X,{target:"draft-07",io:Y});return(0,F14.default)(G,{cb:{pre:(J)=>{this.preProcessJSONNode(J)},post:(J)=>{this.postProcessJSONNode(J)}}}),G}processToCompatSchema($){return{"~standard":{version:1,vendor:"mastra",validate:(Y)=>Q4($)["~standard"].validate(Y),jsonSchema:{input:()=>{return this.processToJSONSchema($,"input")},output:()=>{return this.processToJSONSchema($,"output")}}}}}defaultObjectHandler($){if($.properties&&$.additionalProperties===void 0)$.additionalProperties=!1;if(!Object.keys($.properties??{}).length)$.required=[];return $}defaultArrayHandler($){let Y=[],X=$.minItems,G=$.maxItems;if(X!==void 0&&G!==void 0&&X===G)Y=[`exact length ${X}`],delete $.minItems,delete $.maxItems;else{if(X!==void 0)Y.push(`minimum length ${X}`),delete $.minItems;if(G!==void 0)Y.push(`maximum length ${G}`),delete $.maxItems}if(Y.length)$.description=this.mergeParameterDescription($.description,Y);return $}defaultStringHandler($){let Y=[];if($.minLength!==void 0)Y.push(`minimum length ${$.minLength}`),delete $.minLength;if($.maxLength!==void 0)Y.push(`maximum length ${$.maxLength}`),delete $.maxLength;switch($.format){case"email":case"emoji":case"uri":case"uuid":case"date-time":case"date":case"time":{Y.push(`a valid ${$.format}`),delete $.pattern,delete $.format;break}}if(Y.length===0&&$.pattern!==void 0)Y.push(`input must match this regex ${$.pattern}`),delete $.pattern;if(Y.length)$.description=this.mergeParameterDescription($.description,Y);return $}defaultNumberHandler($){let Y=[];if($.minimum!==void 0){if($.minimum!==Number.MIN_SAFE_INTEGER)Y.push(`greater than or equal to ${$.minimum}`);delete $.minimum}if($.maximum!==void 0){if($.maximum!==Number.MAX_SAFE_INTEGER)Y.push(`lower than or equal to ${$.maximum}`);delete $.maximum}if($.exclusiveMinimum!==void 0)Y.push(`greater than ${$.exclusiveMinimum}`),delete $.exclusiveMinimum;if($.exclusiveMaximum!==void 0)Y.push(`lower than ${$.exclusiveMaximum}`),delete $.exclusiveMaximum;if($.multipleOf!==void 0)Y.push(`multiple of ${$.multipleOf}`),delete $.multipleOf;if(Y.length)$.description=this.mergeParameterDescription($.description,Y);return $}defaultUnionHandler($){if(Array.isArray($.anyOf)){if($.anyOf=$.anyOf.map((Y)=>{if(typeof Y!=="object"||Y===null)return!1;return this.preProcessJSONNode(Y),this.postProcessJSONNode(Y),Y}).filter(Boolean),$.anyOf.length===1)$=$.anyOf[0]}return $}defaultAllOfHandler($){if(!$.allOf||!Array.isArray($.allOf))return $;let Y={},X=[];for(let G of $.allOf){if(G.properties)Object.assign(Y,G.properties);if(Array.isArray(G.required))X.push(...G.required)}if(delete $.allOf,$.type="object",$.properties=Y,X.length>0)$.required=[...new Set(X)];return $.additionalProperties=!1,$}defaultNullableHandler($){return this.defaultUnionHandler($)}defaultDateHandler($){if($.format==="date"||$.format==="date-time"){let Y=$.format;delete $.format,$.description=this.mergeParameterDescription($.description,[`format: ${Y}`])}return $}defaultEmptySchemaHandler($){if(Object.keys($).length===0)$.type=["string","number","boolean","null"];return $}defaultUnsupportedHandler($,Y=[]){for(let X of Y)if(X in $)delete $[X];return $}isObjectSchema($){return eO($)}isArraySchema($){return jj($)}isStringSchema($){return Tj($)}isNumberSchema($){return I80($)}isUnionSchema($){return Ij($)}isAllOfSchema($){return Cj($)}isOptionalProperty($,Y){return Ty8($,Y)}toJSONSchema($){let Y={jsonSchema7:"draft-07","jsonSchema2019-09":"draft-2020-12",openApi3:"openapi-3.0"},X=this.getSchemaTarget(),G=(X&&Y[X])??X,J=Q4($),Q=$6(J,{target:G,io:"input"});return(0,F14.default)(Q,{cb:{pre:(W)=>{this.preProcessJSONNode(W)},post:(W)=>{this.postProcessJSONNode(W)}}}),Q}},Cy8,Ig,C80,kj,S80,k80,v80;var x80=V0(()=>{O40();O40();kv0();kv0();e10();Yf();cG();ZY();m04();X14();O1();qk8=Object.create,L14=Object.defineProperty,Pk8=Object.getOwnPropertyDescriptor,D14=Object.getOwnPropertyNames,wk8=Object.getPrototypeOf,_k8=Object.prototype.hasOwnProperty,Ck8=jk8({"../../../node_modules/.pnpm/secure-json-parse@2.7.0/node_modules/secure-json-parse/index.js"($,Y){var X=typeof Buffer<"u",G=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,J=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Q(H,z,V){if(V==null){if(z!==null&&typeof z==="object")V=z,z=void 0}if(X&&Buffer.isBuffer(H))H=H.toString();if(H&&H.charCodeAt(0)===65279)H=H.slice(1);let F=JSON.parse(H,z);if(F===null||typeof F!=="object")return F;let L=V&&V.protoAction||"error",N=V&&V.constructorAction||"error";if(L==="ignore"&&N==="ignore")return F;if(L!=="ignore"&&N!=="ignore"){if(G.test(H)===!1&&J.test(H)===!1)return F}else if(L!=="ignore"&&N==="ignore"){if(G.test(H)===!1)return F}else if(J.test(H)===!1)return F;return W(F,{protoAction:L,constructorAction:N,safe:V&&V.safe})}function W(H,{protoAction:z="error",constructorAction:V="error",safe:F}={}){let L=[H];while(L.length){let N=L;L=[];for(let D of N){if(z!=="ignore"&&Object.prototype.hasOwnProperty.call(D,"__proto__")){if(F===!0)return null;else if(z==="error")throw SyntaxError("Object contains forbidden prototype property");delete D.__proto__}if(V!=="ignore"&&Object.prototype.hasOwnProperty.call(D,"constructor")&&Object.prototype.hasOwnProperty.call(D.constructor,"prototype")){if(F===!0)return null;else if(V==="error")throw SyntaxError("Object contains forbidden prototype property");delete D.constructor}for(let A in D){let B=D[A];if(B&&typeof B==="object")L.push(B)}}}return H}function K(H,z,V){let F=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return Q(H,z,V)}finally{Error.stackTraceLimit=F}}function Z(H,z){let V=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return Q(H,z,{safe:!0})}catch(F){return null}finally{Error.stackTraceLimit=V}}Y.exports=K,Y.exports.default=K,Y.exports.parse=K,Y.exports.safeParse=Z,Y.exports.scan=W}}),Sk8=Symbol.for(N14),kk8=class $ extends Error{constructor({name:Y,message:X,cause:G}){super(X);this[A14]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,N14)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}};A14=Sk8;zD=kk8;E14=`vercel.ai.error.${O14}`,vk8=Symbol.for(E14),xk8=class extends zD{constructor({message:$,cause:Y,argument:X}){super({name:O14,message:$,cause:Y});this[M14]=!0,this.argument=X}static isInstance($){return zD.hasMarker($,E14)}};M14=vk8;q14=`vercel.ai.error.${R14}`,yk8=Symbol.for(q14),G14=class extends zD{constructor({text:$,cause:Y}){super({name:R14,message:`JSON parsing failed: Text: ${$}.
Error message: ${B14(Y)}`,cause:Y});this[P14]=!0,this.text=$}static isInstance($){return zD.hasMarker($,q14)}};P14=yk8;_14=`vercel.ai.error.${w14}`,bk8=Symbol.for(_14),hk8=class $ extends zD{constructor({value:Y,cause:X}){super({name:w14,message:`Type validation failed: Value: ${JSON.stringify(Y)}.
Error message: ${B14(X)}`,cause:X});this[j14]=!0,this.value=Y}static isInstance(Y){return zD.hasMarker(Y,_14)}static wrap({value:Y,cause:X}){return $.isInstance(X)&&X.value===Y?X:new $({value:Y,cause:X})}};j14=bk8;J14=hk8,gk8=Ik8(Ck8());YE();R80=Symbol.for("vercel.ai.validator");lk8=Symbol("Let zodToJsonSchema decide on which parser to use"),Q14={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"};xZ={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(gv0===void 0)gv0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return gv0},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};Qv8=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");q80={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};Iv8=Tv8;kv8={code:"0",name:"text",parse:($)=>{if(typeof $!=="string")throw Error('"text" parts expect a string value.');return{type:"text",value:$}}},vv8={code:"2",name:"data",parse:($)=>{if(!Array.isArray($))throw Error('"data" parts expect an array value.');return{type:"data",value:$}}},xv8={code:"3",name:"error",parse:($)=>{if(typeof $!=="string")throw Error('"error" parts expect a string value.');return{type:"error",value:$}}},yv8={code:"8",name:"message_annotations",parse:($)=>{if(!Array.isArray($))throw Error('"message_annotations" parts expect an array value.');return{type:"message_annotations",value:$}}},bv8={code:"9",name:"tool_call",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("toolName"in $)||typeof $.toolName!=="string"||!("args"in $)||typeof $.args!=="object")throw Error('"tool_call" parts expect an object with a "toolCallId", "toolName", and "args" property.');return{type:"tool_call",value:$}}},hv8={code:"a",name:"tool_result",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("result"in $))throw Error('"tool_result" parts expect an object with a "toolCallId" and a "result" property.');return{type:"tool_result",value:$}}},fv8={code:"b",name:"tool_call_streaming_start",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("toolName"in $)||typeof $.toolName!=="string")throw Error('"tool_call_streaming_start" parts expect an object with a "toolCallId" and "toolName" property.');return{type:"tool_call_streaming_start",value:$}}},gv8={code:"c",name:"tool_call_delta",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("argsTextDelta"in $)||typeof $.argsTextDelta!=="string")throw Error('"tool_call_delta" parts expect an object with a "toolCallId" and "argsTextDelta" property.');return{type:"tool_call_delta",value:$}}},mv8={code:"d",name:"finish_message",parse:($)=>{if($==null||typeof $!=="object"||!("finishReason"in $)||typeof $.finishReason!=="string")throw Error('"finish_message" parts expect an object with a "finishReason" property.');let Y={finishReason:$.finishReason};if("usage"in $&&$.usage!=null&&typeof $.usage==="object"&&"promptTokens"in $.usage&&"completionTokens"in $.usage)Y.usage={promptTokens:typeof $.usage.promptTokens==="number"?$.usage.promptTokens:Number.NaN,completionTokens:typeof $.usage.completionTokens==="number"?$.usage.completionTokens:Number.NaN};return{type:"finish_message",value:Y}}},uv8={code:"e",name:"finish_step",parse:($)=>{if($==null||typeof $!=="object"||!("finishReason"in $)||typeof $.finishReason!=="string")throw Error('"finish_step" parts expect an object with a "finishReason" property.');let Y={finishReason:$.finishReason,isContinued:!1};if("usage"in $&&$.usage!=null&&typeof $.usage==="object"&&"promptTokens"in $.usage&&"completionTokens"in $.usage)Y.usage={promptTokens:typeof $.usage.promptTokens==="number"?$.usage.promptTokens:Number.NaN,completionTokens:typeof $.usage.completionTokens==="number"?$.usage.completionTokens:Number.NaN};if("isContinued"in $&&typeof $.isContinued==="boolean")Y.isContinued=$.isContinued;return{type:"finish_step",value:Y}}},pv8={code:"f",name:"start_step",parse:($)=>{if($==null||typeof $!=="object"||!("messageId"in $)||typeof $.messageId!=="string")throw Error('"start_step" parts expect an object with an "id" property.');return{type:"start_step",value:{messageId:$.messageId}}}},dv8={code:"g",name:"reasoning",parse:($)=>{if(typeof $!=="string")throw Error('"reasoning" parts expect a string value.');return{type:"reasoning",value:$}}},cv8={code:"h",name:"source",parse:($)=>{if($==null||typeof $!=="object")throw Error('"source" parts expect a Source object.');return{type:"source",value:$}}},lv8={code:"i",name:"redacted_reasoning",parse:($)=>{if($==null||typeof $!=="object"||!("data"in $)||typeof $.data!=="string")throw Error('"redacted_reasoning" parts expect an object with a "data" property.');return{type:"redacted_reasoning",value:{data:$.data}}}},iv8={code:"j",name:"reasoning_signature",parse:($)=>{if($==null||typeof $!=="object"||!("signature"in $)||typeof $.signature!=="string")throw Error('"reasoning_signature" parts expect an object with a "signature" property.');return{type:"reasoning_signature",value:{signature:$.signature}}}},nv8={code:"k",name:"file",parse:($)=>{if($==null||typeof $!=="object"||!("data"in $)||typeof $.data!=="string"||!("mimeType"in $)||typeof $.mimeType!=="string")throw Error('"file" parts expect an object with a "data" and "mimeType" property.');return{type:"file",value:$}}},ov0=[kv8,vv8,xv8,yv8,bv8,hv8,fv8,gv8,mv8,uv8,pv8,dv8,cv8,lv8,iv8,nv8];Object.fromEntries(ov0.map(($)=>[$.code,$]));Object.fromEntries(ov0.map(($)=>[$.name,$.code]));lv0=Symbol.for("vercel.ai.schema");ov8=typeof globalThis==="object"?globalThis:global,Z14=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;ev8=tv8(tO),$x8=tO.split(".")[0],Bg=Symbol.for("opentelemetry.js.api."+$x8),Og=ov8;Gx8=function(){function $(Y){this._namespace=Y.namespace||"DiagComponentLogger"}return $.prototype.debug=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Ng("debug",this._namespace,Y)},$.prototype.error=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Ng("error",this._namespace,Y)},$.prototype.info=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Ng("info",this._namespace,Y)},$.prototype.warn=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Ng("warn",this._namespace,Y)},$.prototype.verbose=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return Ng("verbose",this._namespace,Y)},$}();(function($){$[$.NONE=0]="NONE",$[$.ERROR=30]="ERROR",$[$.WARN=50]="WARN",$[$.INFO=60]="INFO",$[$.DEBUG=70]="DEBUG",$[$.VERBOSE=80]="VERBOSE",$[$.ALL=9999]="ALL"})(SW||(SW={}));P80=function(){function $(){function Y(J){return function(){var Q=[];for(var W=0;W<arguments.length;W++)Q[W]=arguments[W];var K=Eg("diag");if(!K)return;return K[J].apply(K,Wx8([],Qx8(Q),!1))}}var X=this,G=function(J,Q){var W,K,Z;if(Q===void 0)Q={logLevel:SW.INFO};if(J===X){var H=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return X.error((W=H.stack)!==null&&W!==void 0?W:H.message),!1}if(typeof Q==="number")Q={logLevel:Q};var z=Eg("diag"),V=Jx8((K=Q.logLevel)!==null&&K!==void 0?K:SW.INFO,J);if(z&&!Q.suppressOverrideMessage){var F=(Z=Error().stack)!==null&&Z!==void 0?Z:"<failed to generate stacktrace>";z.warn("Current logger will be overwritten from "+F),V.warn("Current logger will overwrite one already registered from "+F)}return tv0("diag",V,X,!0)};X.setLogger=G,X.disable=function(){ev0(Kx8,X)},X.createComponentLogger=function(J){return new Gx8(J)},X.verbose=Y("verbose"),X.debug=Y("debug"),X.info=Y("info"),X.warn=Y("warn"),X.error=Y("error")}return $.instance=function(){if(!this._instance)this._instance=new $;return this._instance},$}();Ux8=function(){function $(Y){var X=this;X._currentContext=Y?new Map(Y):new Map,X.getValue=function(G){return X._currentContext.get(G)},X.setValue=function(G,J){var Q=new $(X._currentContext);return Q._currentContext.set(G,J),Q},X.deleteValue=function(G){var J=new $(X._currentContext);return J._currentContext.delete(G),J}}return $}(),Hx8=new Ux8,Fx8=function(){function $(){}return $.prototype.active=function(){return Hx8},$.prototype.with=function(Y,X,G){var J=[];for(var Q=3;Q<arguments.length;Q++)J[Q-3]=arguments[Q];return X.call.apply(X,Vx8([G],zx8(J),!1))},$.prototype.bind=function(Y,X){return X},$.prototype.enable=function(){return this},$.prototype.disable=function(){return this},$}(),Nx8=new Fx8,b14=function(){function $(){}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalContextManager=function(Y){return tv0(uv0,Y,P80.instance())},$.prototype.active=function(){return this._getContextManager().active()},$.prototype.with=function(Y,X,G){var J,Q=[];for(var W=3;W<arguments.length;W++)Q[W-3]=arguments[W];return(J=this._getContextManager()).with.apply(J,Dx8([Y,X,G],Lx8(Q),!1))},$.prototype.bind=function(Y,X){return this._getContextManager().bind(Y,X)},$.prototype._getContextManager=function(){return Eg(uv0)||Nx8},$.prototype.disable=function(){this._getContextManager().disable(),ev0(uv0,P80.instance())},$}();(function($){$[$.NONE=0]="NONE",$[$.SAMPLED=1]="SAMPLED"})(iv0||(iv0={}));Ax8={traceId:f14,spanId:h14,traceFlags:iv0.NONE},Ag=function(){function $(Y){if(Y===void 0)Y=Ax8;this._spanContext=Y}return $.prototype.spanContext=function(){return this._spanContext},$.prototype.setAttribute=function(Y,X){return this},$.prototype.setAttributes=function(Y){return this},$.prototype.addEvent=function(Y,X){return this},$.prototype.addLink=function(Y){return this},$.prototype.addLinks=function(Y){return this},$.prototype.setStatus=function(Y){return this},$.prototype.updateName=function(Y){return this},$.prototype.end=function(Y){},$.prototype.isRecording=function(){return!1},$.prototype.recordException=function(Y,X){},$}(),$x0=Zx8("OpenTelemetry Context Key SPAN");Mx8=/^([0-9a-f]{32})$/i,Rx8=/^[0-9a-f]{16}$/i;pv0=b14.getInstance(),u14=function(){function $(){}return $.prototype.startSpan=function(Y,X,G){if(G===void 0)G=pv0.active();var J=Boolean(X===null||X===void 0?void 0:X.root);if(J)return new Ag;var Q=G&&g14(G);if(_x8(Q)&&m14(Q))return new Ag(Q);else return new Ag},$.prototype.startActiveSpan=function(Y,X,G,J){var Q,W,K;if(arguments.length<2)return;else if(arguments.length===2)K=X;else if(arguments.length===3)Q=X,K=G;else Q=X,W=G,K=J;var Z=W!==null&&W!==void 0?W:pv0.active(),H=this.startSpan(Y,Q,Z),z=Xx0(Z,H);return pv0.with(z,K,void 0,H)},$}();jx8=new u14,Tx8=function(){function $(Y,X,G,J){this._provider=Y,this.name=X,this.version=G,this.options=J}return $.prototype.startSpan=function(Y,X,G){return this._getTracer().startSpan(Y,X,G)},$.prototype.startActiveSpan=function(Y,X,G,J){var Q=this._getTracer();return Reflect.apply(Q.startActiveSpan,Q,arguments)},$.prototype._getTracer=function(){if(this._delegate)return this._delegate;var Y=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!Y)return jx8;return this._delegate=Y,this._delegate},$}(),Ix8=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){return new u14},$}(),Cx8=new Ix8,U14=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){var J;return(J=this.getDelegateTracer(Y,X,G))!==null&&J!==void 0?J:new Tx8(this,Y,X,G)},$.prototype.getDelegate=function(){var Y;return(Y=this._delegate)!==null&&Y!==void 0?Y:Cx8},$.prototype.setDelegate=function(Y){this._delegate=Y},$.prototype.getDelegateTracer=function(Y,X,G){var J;return(J=this._delegate)===null||J===void 0?void 0:J.getTracer(Y,X,G)},$}();(function($){$[$.UNSET=0]="UNSET",$[$.OK=1]="OK",$[$.ERROR=2]="ERROR"})(H14||(H14={}));Sx8=function(){function $(){this._proxyTracerProvider=new U14,this.wrapSpanContext=wx8,this.isSpanContextValid=m14,this.deleteSpan=Ox8,this.getSpan=Yx0,this.getActiveSpan=Bx8,this.getSpanContext=g14,this.setSpan=Xx0,this.setSpanContext=Ex8}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalTracerProvider=function(Y){var X=tv0(dv0,this._proxyTracerProvider,P80.instance());if(X)this._proxyTracerProvider.setDelegate(Y);return X},$.prototype.getTracerProvider=function(){return Eg(dv0)||this._proxyTracerProvider},$.prototype.getTracer=function(Y,X){return this.getTracerProvider().getTracer(Y,X)},$.prototype.disable=function(){ev0(dv0,P80.instance()),this._proxyTracerProvider=new U14},$}();Sx8.getInstance();kx8=Object.defineProperty;c14=`vercel.ai.error.${d14}`,vx8=Symbol.for(c14),z14=class extends zD{constructor({message:$="No object generated.",cause:Y,text:X,response:G,usage:J,finishReason:Q}){super({name:d14,message:$,cause:Y});this[l14]=!0,this.text=X,this.response=G,this.usage=J,this.finishReason=Q}static isInstance($){return zD.hasMarker($,c14)}};l14=vx8;i14=U.union([U.string(),U.instanceof(Uint8Array),U.instanceof(ArrayBuffer),U.custom(($)=>{var Y,X;return(X=(Y=globalThis.Buffer)==null?void 0:Y.isBuffer($))!=null?X:!1},{message:"Must be a Buffer"})]),nv0=U.lazy(()=>U.union([U.null(),U.string(),U.number(),U.boolean(),U.record(U.string(),nv0),U.array(nv0)])),K7=U.record(U.string(),U.record(U.string(),nv0)),xx8=U.array(U.union([U.object({type:U.literal("text"),text:U.string()}),U.object({type:U.literal("image"),data:U.string(),mimeType:U.string().optional()})])),n14=U.object({type:U.literal("text"),text:U.string(),providerOptions:K7.optional(),experimental_providerMetadata:K7.optional()}),yx8=U.object({type:U.literal("image"),image:U.union([i14,U.instanceof(URL)]),mimeType:U.string().optional(),providerOptions:K7.optional(),experimental_providerMetadata:K7.optional()}),r14=U.object({type:U.literal("file"),data:U.union([i14,U.instanceof(URL)]),filename:U.string().optional(),mimeType:U.string(),providerOptions:K7.optional(),experimental_providerMetadata:K7.optional()}),bx8=U.object({type:U.literal("reasoning"),text:U.string(),providerOptions:K7.optional(),experimental_providerMetadata:K7.optional()}),hx8=U.object({type:U.literal("redacted-reasoning"),data:U.string(),providerOptions:K7.optional(),experimental_providerMetadata:K7.optional()}),fx8=U.object({type:U.literal("tool-call"),toolCallId:U.string(),toolName:U.string(),args:U.unknown(),providerOptions:K7.optional(),experimental_providerMetadata:K7.optional()}),gx8=U.object({type:U.literal("tool-result"),toolCallId:U.string(),toolName:U.string(),result:U.unknown(),content:xx8.optional(),isError:U.boolean().optional(),providerOptions:K7.optional(),experimental_providerMetadata:K7.optional()}),mx8=U.object({role:U.literal("system"),content:U.string(),providerOptions:K7.optional(),experimental_providerMetadata:K7.optional()}),ux8=U.object({role:U.literal("user"),content:U.union([U.string(),U.array(U.union([n14,yx8,r14]))]),providerOptions:K7.optional(),experimental_providerMetadata:K7.optional()}),px8=U.object({role:U.literal("assistant"),content:U.union([U.string(),U.array(U.union([n14,r14,bx8,hx8,fx8]))]),providerOptions:K7.optional(),experimental_providerMetadata:K7.optional()}),dx8=U.object({role:U.literal("tool"),content:U.array(gx8),providerOptions:K7.optional(),experimental_providerMetadata:K7.optional()});U.union([mx8,ux8,px8,dx8]);YE({prefix:"aiobj",size:24});YE({prefix:"aiobj",size:24});YE({prefix:"aitxt",size:24});YE({prefix:"msg",size:24});rx8={};Gx0(rx8,{object:()=>sx8,text:()=>ax8});YE({prefix:"aitxt",size:24});YE({prefix:"msg",size:24});ox8=U.object({name:U.string(),version:U.string()}).passthrough(),Jx0=U.object({_meta:U.optional(U.object({}).passthrough())}).passthrough(),Mg=Jx0,tx8=U.object({method:U.string(),params:U.optional(Jx0)}),ex8=U.object({experimental:U.optional(U.object({}).passthrough()),logging:U.optional(U.object({}).passthrough()),prompts:U.optional(U.object({listChanged:U.optional(U.boolean())}).passthrough()),resources:U.optional(U.object({subscribe:U.optional(U.boolean()),listChanged:U.optional(U.boolean())}).passthrough()),tools:U.optional(U.object({listChanged:U.optional(U.boolean())}).passthrough())}).passthrough();Mg.extend({protocolVersion:U.string(),capabilities:ex8,serverInfo:ox8,instructions:U.optional(U.string())});$y8=Mg.extend({nextCursor:U.optional(U.string())}),Yy8=U.object({name:U.string(),description:U.optional(U.string()),inputSchema:U.object({type:U.literal("object"),properties:U.optional(U.object({}).passthrough())}).passthrough()}).passthrough();$y8.extend({tools:U.array(Yy8)});Xy8=U.object({type:U.literal("text"),text:U.string()}).passthrough(),Gy8=U.object({type:U.literal("image"),data:U.string().base64(),mimeType:U.string()}).passthrough(),s14=U.object({uri:U.string(),mimeType:U.optional(U.string())}).passthrough(),Jy8=s14.extend({text:U.string()}),Qy8=s14.extend({blob:U.string().base64()}),Wy8=U.object({type:U.literal("resource"),resource:U.union([Jy8,Qy8])}).passthrough();Mg.extend({content:U.array(U.union([Xy8,Gy8,Wy8])),isError:U.boolean().default(!1).optional()}).or(Mg.extend({toolResult:U.unknown()}));Ky8=U.object({jsonrpc:U.literal(j80),id:U.union([U.string(),U.number().int()])}).merge(tx8).strict(),Zy8=U.object({jsonrpc:U.literal(j80),id:U.union([U.string(),U.number().int()]),result:Mg}).strict(),Uy8=U.object({jsonrpc:U.literal(j80),id:U.union([U.string(),U.number().int()]),error:U.object({code:U.number().int(),message:U.string(),data:U.optional(U.unknown())})}).strict(),Hy8=U.object({jsonrpc:U.literal(j80)}).merge(U.object({method:U.string(),params:U.optional(Jx0)})).strict();U.union([Ky8,Hy8,Zy8,Uy8]);zy8={};Gx0(zy8,{mergeIntoDataStream:()=>Ly8,toDataStream:()=>Vy8,toDataStreamResponse:()=>Fy8});Dy8={};Gx0(Dy8,{mergeIntoDataStream:()=>By8,toDataStream:()=>Ny8,toDataStreamResponse:()=>Ay8});t14=["regex","emoji","email","url","uuid","cuid","min","max"],e14=["min","max","multipleOf"],$44=["min","max","length"],w80=["ZodIntersection","ZodNever","ZodNull","ZodTuple","ZodUndefined"],_80=["ZodObject","ZodArray","ZodUnion","ZodString","ZodNumber","ZodDate","ZodAny","ZodDefault","ZodNullable"],Kt5=[..._80,...w80],Ry8=["regex","emoji","email","url","uuid","cuid","min_length","max_length","string_format"],qy8=["greater_than","less_than","multiple_of"],Py8=["min","max","length"],rv0=["ZodIntersection","ZodNever","ZodNull","ZodTuple","ZodUndefined"],av0=["ZodObject","ZodArray","ZodUnion","ZodString","ZodNumber","ZodDate","ZodAny","ZodDefault","ZodNullable"],F14=gL(zO(),1);Cy8=["date-time","time","date","duration","email","hostname","ipv4","ipv6","uuid"],Ig=class extends Pg{getSchemaTarget(){return"jsonSchema7"}isReasoningModel(){let $=this.getModel().modelId;if(!$)return!1;return $.includes("o3")||$.includes("o4")||$.includes("o1")}shouldApply(){let $=this.getModel();if(!this.isReasoningModel()&&($.provider.includes("openai")||$.modelId?.includes("openai")||$.provider.includes("groq")))return!0;return!1}processZodType($){if($E(U)($)){let Y="_def"in $?$._def.innerType:$._zod?.def?.innerType;if(Y){if(qg(U)(Y))return this.processZodType(Y).transform((J)=>J===null?void 0:J);return this.processZodType(Y).nullable().transform((G)=>G===null?void 0:G)}return $}else if(qg(U)($)){let Y="_def"in $?$._def.innerType:$._zod?.def?.innerType;if(Y){if($E(U)(Y)){let G="_def"in Y?Y._def.innerType:Y._zod?.def?.innerType;if(G)return this.processZodType(G).nullable().transform((Q)=>Q===null?void 0:Q)}return this.processZodType(Y).nullable()}return $}else if(X44(U)($)){let Y="_def"in $?$._def.innerType:$._zod?.def?.innerType,X="_def"in $?$._def.defaultValue:$._zod?.def?.defaultValue;if(Y)return this.processZodType(Y).nullable().transform((J)=>{if(J===null)return typeof X==="function"?X():X;return J});return $}else if(wg(U)($))return this.defaultZodObjectHandler($);else if(jg(U)($))return this.defaultZodUnionHandler($);else if(_g(U)($))return this.defaultZodArrayHandler($);else if(Tg(U)($)){let Y=this.getModel(),X=["emoji"];if(Y.modelId?.includes("gpt-4o-mini"))return this.defaultZodStringHandler($,["emoji","regex"]);return this.defaultZodStringHandler($,X)}if(Sj(U)($))return this.defaultZodIntersectionHandler($);return this.defaultUnsupportedZodTypeHandler($,["ZodNever","ZodUndefined","ZodTuple"])}processToAISDKSchema($){let Y=this.processToCompatSchema($),X=$6(Y);return BX(X,{validate:(G)=>{let J=this.#$(G,X),Q=$.safeParse(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}processToCompatSchema($){let Y=Q4($);return{"~standard":{version:1,vendor:"mastra",validate:(X)=>{let G=this.processToJSONSchema($,"input"),J=this.#$(X,G);return Y["~standard"].validate(J)},jsonSchema:{input:()=>{return this.processToJSONSchema($,"input")},output:()=>{return this.processToJSONSchema($,"output")}}}}}preProcessJSONNode($,Y){if(Cj($))this.defaultAllOfHandler($);if(eO($))this.defaultObjectHandler($);else if(jj($))this.defaultArrayHandler($);else if(I80($))this.defaultNumberHandler($);else if(Tj($)){if($.format){if(!Cy8.includes($.format))delete $.format,delete $.pattern}this.defaultStringHandler($)}}postProcessJSONNode($){if(Ij($))this.defaultUnionHandler($);if($.type===void 0&&!$.anyOf){let Y={};for(let X of Object.keys($))Y[X]=$[X],delete $[X];$.anyOf=[Y,{type:"null"}]}if(eO($)){if($.additionalProperties=!1,$.properties)for(let Y of Object.keys($.properties)){let X=$.properties[Y];if(!$.required)$.required=[];if(!$.required?.includes(Y)){if($["x-optional"]=[...$["x-optional"]||[],Y],$.required?.push(Y),X.type){if(Array.isArray(X.type)){let G=[...X.type];if(!G.includes("null"))G.push("null");let J={...X};delete J.anyOf,delete J.type,delete X.type,X.anyOf=G.map((Q)=>Q==="null"?{type:"null"}:{...J,type:Q})}else if(X.type!=="null"){let G=X.type,J={...X};delete J.anyOf,delete J.type,delete X.type,X.anyOf=[{...J,type:G},{type:"null"}]}}}}}}#$($,Y){let X=this.#Y(Y);if((Sy8(X)||X["x-date"]===!0)&&typeof $==="string")return new Date($);if(X.type==="array"||Array.isArray(X.type)&&X.type.includes("array")){if(!Array.isArray($))return $;return $.map((Z)=>this.#$(Z,X.items))}if(!(X.type==="object"||Array.isArray(X.type)&&X.type.includes("object")))return $;let Q=X.properties;if(!Q||!$)return $;let W=$,K=X["x-optional"]??[];for(let Z in W)if(K.includes(Z)&&W[Z]===null)W[Z]=void 0;else if(Q[Z])W[Z]=this.#$(W[Z],Q[Z]);return W}#Y($){if(Array.isArray($.anyOf)){let Y=$.anyOf.find((X)=>X.type!=="null");if(Y)return Y}return $}};C80=class extends Ig{getSchemaTarget(){return"openApi3"}isReasoningModel(){let $=this.getModel().modelId;if(!$)return!1;return $.includes("o3")||$.includes("o4")||$.includes("o1")}shouldApply(){let $=this.getModel();if(this.isReasoningModel()&&($.provider.includes("openai")||$.modelId?.includes("openai")))return!0;return!1}processZodType($){if($E(U)($)){let Y="_def"in $?$._def.innerType:$._zod?.def?.innerType;if(Y){if(qg(U)(Y))return this.processZodType(Y).transform((J)=>J===null?void 0:J);return this.processZodType(Y).nullable().transform((G)=>G===null?void 0:G)}return $}else if(qg(U)($)){let Y="_def"in $?$._def.innerType:$._zod?.def?.innerType;if(Y&&$E(U)(Y)){let X="_def"in Y?Y._def.innerType:Y._zod?.def?.innerType;if(X)return this.processZodType(X).nullable().transform((J)=>J===null?void 0:J)}if(Y)return this.processZodType(Y).nullable();return $}else if(wg(U)($))return this.defaultZodObjectHandler($,{passthrough:!1});else if(_g(U)($))return this.defaultZodArrayHandler($);else if(jg(U)($))return this.defaultZodUnionHandler($);else if(X44(U)($)){let Y=$._def,X=Y.innerType,G=typeof Y.defaultValue==="function"?Y.defaultValue():Y.defaultValue,J=[];if(G!==void 0)J.push(`the default value is ${G}`);let Q=this.mergeParameterDescription($.description,J),W=this.processZodType(X);if(Q)W=W.describe(Q);return W}else if(Zx0(U)($))return this.defaultZodNumberHandler($);else if(Tg(U)($))return this.defaultZodStringHandler($);else if(Iy8(U)($))return this.defaultZodDateHandler($);else if(Kx0(U)($))return U.any().refine((Y)=>Y===null,{message:"must be null"}).describe($.description||"must be null");else if($.constructor.name==="ZodAny")return U.string().describe(($.description??"")+`
Argument was an "any" type, but you (the LLM) do not support "any", so it was cast to a "string" type`);if(Sj(U)($))return this.defaultZodIntersectionHandler($);return this.defaultUnsupportedZodTypeHandler($)}},kj=class extends Pg{constructor($){super($)}getSchemaTarget(){return"jsonSchema7"}shouldApply(){return this.getModel().modelId.includes("claude")}processZodType($){if(this.isOptional($)){let Y=["ZodObject","ZodArray","ZodUnion","ZodNever","ZodUndefined","ZodTuple"];if(this.getModel().modelId.includes("claude-3.5-haiku"))Y.push("ZodString");return this.defaultZodOptionalHandler($,Y)}else if(this.isObj($))return this.defaultZodObjectHandler($);else if(this.isArr($))return this.defaultZodArrayHandler($,[]);else if(this.isUnion($))return this.defaultZodUnionHandler($);else if(this.isString($))if(this.getModel().modelId.includes("claude-3.5-haiku"))return this.defaultZodStringHandler($,["max","min"]);else return $;else if(Kx0(U)($))return U.any().refine((Y)=>Y===null,{message:"must be null"}).describe($.description||"must be null");else if(Sj(U)($))return this.defaultZodIntersectionHandler($);return this.defaultUnsupportedZodTypeHandler($)}processToAISDKSchema($){let Y=this.processToCompatSchema($),X=$6(Y);return BX(X,{validate:(G)=>{let J=this.#$(G,X),Q=$.safeParse(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}processToCompatSchema($){let Y=Q4($);return{"~standard":{version:1,vendor:"mastra",validate:(X)=>{let G=this.processToJSONSchema($,"input"),J=this.#$(X,G);return Y["~standard"].validate(J)},jsonSchema:{input:()=>{return this.processToJSONSchema($,"input")},output:()=>{return this.processToJSONSchema($,"output")}}}}}preProcessJSONNode($){if(Cj($))this.defaultAllOfHandler($);if(eO($))this.defaultObjectHandler($);else if(jj($))this.defaultArrayHandler($);else if(I80($))this.defaultNumberHandler($);else if(Tj($))this.defaultStringHandler($)}postProcessJSONNode($){if(Ij($))this.defaultUnionHandler($)}#$($,Y){let X=this.#Y(Y,$);if(X["x-date"]===!0&&typeof $==="string")return new Date($);if(X.type==="array"||Array.isArray(X.type)&&X.type.includes("array")){if(!Array.isArray($))return $;return $.map((K)=>this.#$(K,X.items))}if(!(X.type==="object"||Array.isArray(X.type)&&X.type.includes("object")))return $;let Q=X.properties;if(!Q||!$)return $;let W=$;for(let K in W)if(Q[K])W[K]=this.#$(W[K],Q[K]);return W}#Y($,Y){if(!Array.isArray($.anyOf))return $;let X=$.anyOf,G=X.filter((Q)=>Q.type!=="null");if(X.length===2&&G.length===1)return G[0];let J=Y&&typeof Y==="object"?Object.keys(Y):[];return G.find((Q)=>{let W=Q.properties;return!!W&&J.some((K)=>(K in W))})??$}},S80=class extends Pg{constructor($){super($)}getSchemaTarget(){return"jsonSchema7"}shouldApply(){return this.getModel().modelId.includes("deepseek")&&!this.getModel().modelId.includes("r1")}processZodType($){if($E(U)($))return this.defaultZodOptionalHandler($,["ZodObject","ZodArray","ZodUnion","ZodString","ZodNumber"]);else if(wg(U)($))return this.defaultZodObjectHandler($);else if(_g(U)($))return this.defaultZodArrayHandler($,["min","max"]);else if(jg(U)($))return this.defaultZodUnionHandler($);else if(Tg(U)($))return this.defaultZodStringHandler($);else if(Sj(U)($))return this.defaultZodIntersectionHandler($);return $}processToAISDKSchema($){let Y=this.processToCompatSchema($),X=$6(Y);return BX(X,{validate:(G)=>{let J=this.#$(G,X),Q=$.safeParse(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}processToCompatSchema($){let Y=Q4($);return{"~standard":{version:1,vendor:"mastra",validate:(X)=>{let G=this.processToJSONSchema($,"input"),J=this.#$(X,G);return Y["~standard"].validate(J)},jsonSchema:{input:()=>{return this.processToJSONSchema($,"input")},output:()=>{return this.processToJSONSchema($,"output")}}}}}preProcessJSONNode($){if(Cj($))this.defaultAllOfHandler($);if(eO($))this.defaultObjectHandler($);else if(jj($))this.defaultArrayHandler($);else if(Tj($))this.defaultStringHandler($)}postProcessJSONNode($){if(Ij($))this.defaultUnionHandler($)}#$($,Y){let X=this.#Y(Y);if(X["x-date"]===!0&&typeof $==="string")return new Date($);if(X.type==="array"||Array.isArray(X.type)&&X.type.includes("array")){if(!Array.isArray($))return $;return $.map((K)=>this.#$(K,X.items))}if(!(X.type==="object"||Array.isArray(X.type)&&X.type.includes("object")))return $;let Q=X.properties;if(!Q||!$)return $;let W=$;for(let K in W)if(Q[K])W[K]=this.#$(W[K],Q[K]);return W}#Y($){if(Array.isArray($.anyOf)){let Y=$.anyOf.find((X)=>X.type!=="null");if(Y)return Y}return $}};k80=class extends Pg{constructor($){super($)}getSchemaTarget(){return"jsonSchema7"}shouldApply(){return this.getModel().provider.includes("google")||this.getModel().modelId.includes("gemini-")||this.getModel().modelId.includes("google")}processZodType($){if($E(U)($))return this.defaultZodOptionalHandler($,["ZodObject","ZodArray","ZodUnion","ZodString","ZodNumber","ZodNullable"]);else if(qg(U)($))return this.defaultZodNullableHandler($);else if(Kx0(U)($))return U.any().refine((Y)=>Y===null,{message:"must be null"}).describe($.description||"must be null");else if(wg(U)($))return this.defaultZodObjectHandler($);else if(_g(U)($))return this.defaultZodArrayHandler($,[]);else if(jg(U)($))return this.defaultZodUnionHandler($);else if(Tg(U)($))return this.defaultZodStringHandler($);else if(Zx0(U)($))return this.defaultZodNumberHandler($);else if(Sj(U)($))return this.defaultZodIntersectionHandler($);return this.defaultUnsupportedZodTypeHandler($)}processToJSONSchema($,Y){return super.processToJSONSchema($,Y)}processToAISDKSchema($){let Y=this.processToCompatSchema($),X=$6(Y),G=oz(X);return BX(G,{validate:(J)=>{let Q=this.#$(J,G),W=$.safeParse(Q);return W.success?{success:!0,value:W.data}:{success:!1,error:W.error}}})}processToCompatSchema($){let Y=Q4($);return{"~standard":{version:1,vendor:"mastra",validate:(X)=>{let G=this.processToJSONSchema($,"input"),J=this.#$(X,G);return Y["~standard"].validate(J)},jsonSchema:{input:()=>{return this.processToJSONSchema($,"input")},output:()=>{return this.processToJSONSchema($,"output")}}}}}preProcessJSONNode($){if(Cj($))this.defaultAllOfHandler($);if(eO($))this.defaultObjectHandler($);else if(I80($))this.defaultNumberHandler($);else if(jj($))this.defaultArrayHandler($);else if(Tj($))this.defaultStringHandler($)}postProcessJSONNode($){if(Ij($))this.defaultUnionHandler($)}#$($,Y){let X=this.#Y(Y);if(X["x-date"]===!0&&typeof $==="string")return new Date($);if(X.type==="array"||Array.isArray(X.type)&&X.type.includes("array")){if(!Array.isArray($))return $;return $.map((K)=>this.#$(K,X.items))}if(!(X.type==="object"||Array.isArray(X.type)&&X.type.includes("object")))return $;let Q=X.properties;if(!Q||!$)return $;let W=$;for(let K in W)if(Q[K])W[K]=this.#$(W[K],Q[K]);return W}#Y($){if(Array.isArray($.anyOf)){let Y=$.anyOf.find((X)=>X.type!=="null");if(Y)return Y}return $}},v80=class extends Pg{constructor($){super($)}getSchemaTarget(){return"jsonSchema7"}shouldApply(){return this.getModel().modelId.includes("meta")}processZodType($){if($E(U)($))return this.defaultZodOptionalHandler($,["ZodObject","ZodArray","ZodUnion","ZodString","ZodNumber"]);else if(wg(U)($))return this.defaultZodObjectHandler($);else if(_g(U)($))return this.defaultZodArrayHandler($,["min","max"]);else if(jg(U)($))return this.defaultZodUnionHandler($);else if(Zx0(U)($))return this.defaultZodNumberHandler($);else if(Tg(U)($))return this.defaultZodStringHandler($);else if(Sj(U)($))return this.defaultZodIntersectionHandler($);return $}processToAISDKSchema($){let Y=this.processToCompatSchema($),X=$6(Y);return BX(X,{validate:(G)=>{let J=this.#$(G,X),Q=$.safeParse(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}processToCompatSchema($){let Y=Q4($);return{"~standard":{version:1,vendor:"mastra",validate:(X)=>{let G=this.processToJSONSchema($,"input"),J=this.#$(X,G);return Y["~standard"].validate(J)},jsonSchema:{input:()=>{return this.processToJSONSchema($,"input")},output:()=>{return this.processToJSONSchema($,"output")}}}}}preProcessJSONNode($){if(Cj($))this.defaultAllOfHandler($);if(eO($))this.defaultObjectHandler($);else if(jj($))this.defaultArrayHandler($);else if(Tj($))this.defaultStringHandler($)}postProcessJSONNode($){if(Ij($))this.defaultUnionHandler($)}#$($,Y){let X=this.#Y(Y);if(X["x-date"]===!0&&typeof $==="string")return new Date($);if(X.type==="array"||Array.isArray(X.type)&&X.type.includes("array")){if(!Array.isArray($))return $;return $.map((K)=>this.#$(K,X.items))}if(!(X.type==="object"||Array.isArray(X.type)&&X.type.includes("object")))return $;let Q=X.properties;if(!Q||!$)return $;let W=$;for(let K in W)if(Q[K])W[K]=this.#$(W[K],Q[K]);return W}#Y($){if(Array.isArray($.anyOf)){let Y=$.anyOf.find((X)=>X.type!=="null");if(Y)return Y}return $}}});import{createHash as ky8}from"crypto";function JE($,Y){let X=[];return JSON.stringify($,function(G,J){if(typeof J==="bigint")return J.toString();if(J!==null&&typeof J==="object"){while(X.length>0&&X[X.length-1]!==this)X.pop();if(X.includes(J))return"[Circular]";X.push(J)}return J},Y)}function Ux0($){if($===null||typeof $!=="object")return $;try{return JSON.stringify($),$}catch{return JSON.parse(JE($))}}function G44($){if($===null||typeof $!=="object")return!1;let Y=Object.getPrototypeOf($);return Y===Object.prototype||Y===null}function tz($,Y){let X={...$};if(!Y)return X;return Object.keys(Y).forEach((G)=>{let J=X[G],Q=Y[G];if(G44(J)&&G44(Q))X[G]=tz(J,Q);else if(Q!==void 0)X[G]=Q}),X}function GJ($,Y){if($===Y)return!0;if($==null||Y==null)return $===Y;if(typeof $!==typeof Y)return!1;if(Array.isArray($)&&Array.isArray(Y)){if($.length!==Y.length)return!1;return $.every((X,G)=>GJ(X,Y[G]))}if($ instanceof Date&&Y instanceof Date)return $.getTime()===Y.getTime();if(typeof $==="object"&&typeof Y==="object"){let X=$,G=Y,J=Object.keys(X),Q=Object.keys(G);if(J.length!==Q.length)return!1;return J.every((W)=>Object.prototype.hasOwnProperty.call(G,W)&&GJ(X[W],G[W]))}return!1}function xj($){try{let Y=typeof $==="string"?JSON.parse($):$;if(!Y||Y.type!=="object"||!Y.properties)return{};let X={};for(let[G,J]of Object.entries(Y.properties))if(J.default!==void 0)X[G]=typeof J.default==="object"&&J.default!==null?JSON.parse(JSON.stringify(J.default)):J.default;else if(J.type==="object"&&J.properties)X[G]=xj(J);else if(J.type==="object")X[G]={};else if(J.type==="string")X[G]="";else if(J.type==="array")X[G]=[];else if(J.type==="number"||J.type==="integer")X[G]=0;else if(J.type==="boolean")X[G]=!1;else X[G]=null;return X}catch{return{}}}function J44($){return Function("z",`"use strict";return (${$});`)(U)}function y80($){return typeof $==="object"&&$!==null&&"_def"in $&&"parse"in $&&typeof $.parse==="function"&&"safeParse"in $&&typeof $.safeParse==="function"}function xy8($){return ky8("sha256").update($).digest("hex").slice(0,8)}function yy8($){let Y="inputSchema"in $?$.inputSchema:by8($),X=!("id"in $)?$.description?`tool-${xy8($.description)}`:`tool-${Math.random().toString(36).substring(2,9)}`:$.id;return{...$,id:X,inputSchema:Y}}function b80($){return Object.keys($).reduce((X,G)=>{let J=$?.[G];if(J){if(typeof J==="function"&&!(J instanceof MW)&&!A3(J))throw new G0({id:"TOOL_INVALID_FORMAT",domain:"TOOL",category:"USER",text:`Tool "${G}" is not a valid tool format. Tools must be created using createTool() or be a valid Vercel AI SDK tool. Received a function.`});if(A3(J))X[G]=yy8(J);else X[G]=J}return X},{})}function by8($){let Y=$.parameters??U.object({});if(typeof Y==="function")Y=Y();return y80(Y)?Y:J44(L80(Y))}function VY($,Y,X,G,J){return new vy8({originalTool:$,options:Y,logType:X,autoResumeSuspendedTools:G,backgroundTaskEnabled:J}).build()}function h80({mastra:$,logger:Y}){return new Proxy($,{get(X,G){if(Reflect.has(X,G)){let Q=Reflect.get(X,G);if(typeof Q==="function")return Q.bind(X);return Q}if(G==="logger")return Y.warn("Please use 'getLogger' instead, logger is deprecated"),Reflect.apply(X.getLogger,X,[]);if(G==="storage")return Y.warn("Please use 'getStorage' instead, storage is deprecated"),Reflect.get(X,"storage");if(G==="agents")return Y.warn("Please use 'listAgents' instead, agents is deprecated"),Reflect.apply(X.listAgents,X,[]);if(G==="tts")return Y.warn("Please use 'getTTS' instead, tts is deprecated"),Reflect.apply(X.getTTS,X,[]);if(G==="vectors")return Y.warn("Please use 'getVectors' instead, vectors is deprecated"),Reflect.apply(X.getVectors,X,[]);if(G==="memory")return Y.warn("Please use 'getMemory' instead, memory is deprecated"),Reflect.get(X,"memory");return Reflect.get(X,G)}})}function y$($,Y="identifier"){if(!Q44.test($)||$.length>63)throw Error(`Invalid ${Y}: ${$}. Must start with a letter or underscore, contain only letters, numbers, or underscores, and be at most 63 characters long.`);return $}function Hx0($){if(!$)throw Error("Field key cannot be empty");let Y=$.split(".");for(let X of Y)if(!Q44.test(X)||X.length>63)throw Error(`Invalid field key segment: ${X} in ${$}`);return $}function zx0($,Y){if(!$||typeof $!=="object")return $;let X={};for(let G of Y){let J=W44($,G);if(J!==void 0)K44(X,G,J)}return X}function W44($,Y){return Y.split(".").reduce((X,G)=>{return X&&typeof X==="object"?X[G]:void 0},$)}function K44($,Y,X){let G=Y.split("."),J=G.pop();if(!J)return;for(let W of G)if(W==="__proto__"||W==="constructor"||W==="prototype")return;if(J==="__proto__"||J==="constructor"||J==="prototype")return;let Q=$;for(let W of G){let K=Object.prototype.hasOwnProperty.call(Q,W)?Q[W]:void 0;if(K===null||typeof K!=="object")Object.defineProperty(Q,W,{value:Object.create(null),writable:!0,enumerable:!0,configurable:!0});Q=Q[W]}Object.defineProperty(Q,J,{value:X,writable:!0,enumerable:!0,configurable:!0})}var vy8,vj=($)=>new Promise((Y)=>setTimeout(Y,$)),Q44,Vx0=($)=>{return Object.fromEntries(Object.entries($).filter(([Y,X])=>X!==void 0))};var v3=V0(()=>{i40();A_();$f();VO();n_();TO();hz();Xg();p2();OW();qL();Cv0();O1();x80();vy8=class extends u8{originalTool;options;logType;constructor($){super({name:"CoreToolBuilder"});this.originalTool=$.originalTool,this.options=$.options,this.logType=$.logType;let Y=!!$.backgroundTaskEnabled,X=$.autoResumeSuspendedTools||this.originalTool.id?.startsWith("agent-")||this.originalTool.id?.startsWith("workflow-");if(!A3(this.originalTool)&&!N_(this.originalTool)){if(Y||X){let G=this.originalTool.inputSchema;if(typeof G==="function")G=G();if(!G)G=U.object({});if(F_(G)){let J=G;if(Y)J=J.extend({_background:N04});if(X)J=J.extend({suspendedToolRunId:U.string().describe("The runId of the suspended tool").nullable().optional(),resumeData:U.any().describe("The resumeData object created from the resumeSchema of suspended tool").optional()});this.originalTool.inputSchema=J}else{let J=$6(G,{io:"input"});if(J&&typeof J==="object"&&J.type==="object"){if(Y)J.properties={...J.properties,_background:D04};if(X)J.properties={...J.properties,suspendedToolRunId:{type:["string","null"],description:"The runId of the suspended tool"},resumeData:{description:"The resumeData object created from the resumeSchema of suspended tool"}};this.originalTool.inputSchema=Q4(J)}}}}}getParameters=()=>{if(A3(this.originalTool)){let Y=this.originalTool.parameters??("inputSchema"in this.originalTool?this.originalTool.inputSchema:void 0)??U.object({});if(typeof Y==="function")Y=Y();return Y}let $=this.originalTool.inputSchema;if(z5($))return $;if(typeof $==="function")$=$();return $};getOutputSchema=()=>{if("outputSchema"in this.originalTool){let $=this.originalTool.outputSchema;if(z5($))return $;if(typeof $==="function")$=$();return $}return null};getResumeSchema=()=>{if("resumeSchema"in this.originalTool){let $=this.originalTool.resumeSchema;if(typeof $==="function")$=$();return $}return null};getSuspendSchema=()=>{if("suspendSchema"in this.originalTool){let $=this.originalTool.suspendSchema;if(typeof $==="function")$=$();return $}return null};buildProviderTool($){if("type"in $&&($.type==="provider-defined"||$.type==="provider")&&"id"in $&&typeof $.id==="string"&&$.id.includes(".")){let Y="parameters"in $?$.parameters:("inputSchema"in $)?$.inputSchema:void 0;if(typeof Y==="function")Y=Y();let X="outputSchema"in $?$.outputSchema:void 0;if(typeof X==="function")X=X();let G;if(Y!==void 0&&Y!==null)if(typeof Y==="object"&&"jsonSchema"in Y)G=Y;else if(z5(Y))G={jsonSchema:$6(Y,{io:"input"})};else G=XE(Y);else G={jsonSchema:{type:"object",properties:{},additionalProperties:!1}};let J;if(X!==void 0&&X!==null)if(typeof X==="object"&&"jsonSchema"in X)J=X;else if(z5(X))J={jsonSchema:$6(X)};else J=XE(X);return{...J?{outputSchema:J}:{},type:"provider-defined",id:$.id,..."name"in $&&typeof $.name==="string"?{name:$.name}:{},args:"args"in this.originalTool?this.originalTool.args:{},description:$.description,parameters:G,execute:this.originalTool.execute?this.createExecute(this.originalTool,{...this.options,description:this.originalTool.description},this.logType):void 0,toModelOutput:"toModelOutput"in this.originalTool?this.originalTool.toModelOutput:void 0,transform:"transform"in this.originalTool?this.originalTool.transform:void 0,inputExamples:"inputExamples"in this.originalTool?this.originalTool.inputExamples:void 0}}return}createLogMessageOptions({agentName:$,toolName:Y,type:X}){let G=X==="toolset"?"toolset":"tool";return{start:`Executing ${G}`,error:`Failed ${G} execution`,logData:{agent:$,tool:Y}}}createExecute($,Y,X){let{logger:G,mastra:J,memory:Q,requestContext:W,model:K,tracingContext:Z,tracingPolicy:H,...z}=Y,V={modelId:K?.modelId,provider:K?.provider,specificationVersion:K?.specificationVersion},{start:F,logData:L}=this.createLogMessageOptions({agentName:Y.agentName,toolName:Y.name,type:X}),N=!A3($)&&"mcpMetadata"in $?$.mcpMetadata:void 0,D=async(A,B,O)=>{try{let E,M=null;if(A3($))E=await DQ({span:O,fn:async()=>$?.execute?.(A,B)});else{let q=Y.mastra?Sf(Y.mastra,{currentSpan:O}):Y.mastra,_=this.getResumeSchema(),P={threadId:Y.threadId,resourceId:Y.resourceId,mastra:q,memory:Y.memory,runId:Y.runId,requestContext:B.requestContext??Y.requestContext??new p1,workspace:B.workspace??Y.workspace,browser:Y.browser,writer:new PW({prefix:"tool",callId:B.toolCallId,name:Y.name,runId:Y.runId},Y.outputWriter||B.outputWriter),...g4({currentSpan:O}),abortSignal:B.abortSignal,suspend:(S,I)=>{M=S;let v={...I??{},resumeSchema:I?.resumeSchema??(_?JSON.stringify($6(Q4(_),{io:"input"})):void 0)};return B.suspend?.(S,v)},resumeData:B.resumeData},w=B.toolCallId&&B.messages||Y.agentName&&Y.threadId&&!Y.workflowId,j=!w&&(Y.workflow||Y.workflowId),C;if(w){let{suspend:S,resumeData:I,threadId:v,resourceId:x,...y}=P;C={...y,agent:{agentId:Y.agentId||"",toolCallId:B.toolCallId||"",messages:B.messages||[],suspend:S,resumeData:I,threadId:v,resourceId:x,outputWriter:B.outputWriter,flushMessages:B.flushMessages}}}else if(j){let{suspend:S,resumeData:I,...v}=P;C={...v,workflow:Y.workflow||{runId:Y.runId,workflowId:Y.workflowId,state:Y.state,setState:Y.setState,suspend:S,resumeData:I}}}else if(B.mcp)C={...P,mcp:B.mcp};else C=P;let k=B.resumeData;if(k){let S=Wf(_,k,Y.name);if(S.error)return G?.warn(S.error.message),O?.end({output:S.error,attributes:{success:!1}}),S.error}E=await DQ({span:O,fn:async()=>$?.execute?.(A,C)})}if(M){let q=this.getSuspendSchema(),_=ZC0(q,M,Y.name);if(_.error)return G?.warn(_.error.message),O?.end({output:_.error,attributes:{success:!1}}),_.error}if(typeof E>"u"&&!!M)return O?.end({output:E,attributes:{success:!0}}),E;if(A3($)){let q=this.getOutputSchema(),_=UC0(q,E,Y.name,!1);if(_.error)return G?.warn(_.error.message),O?.end({output:_.error,attributes:{success:!1}}),_.error;E=_.data}return O?.end({output:E,attributes:{success:!0}}),E}catch(E){throw O?.error({error:E,attributes:{success:!1}}),E}};return async(A,B)=>{let O=Y.logger||this.logger,E=B?.tracingContext||Y.tracingContext,M=B?.requestContext??Y.requestContext,R=wW({type:N?"mcp_tool_call":"tool_call",name:N?`mcp_tool: '${Y.name}' on '${N.serverName}'`:`tool: '${Y.name}'`,input:A,entityType:J6.TOOL,entityId:Y.name,entityName:Y.name,attributes:N?{mcpServer:N.serverName,serverVersion:N.serverVersion,toolDescription:Y.description}:{toolDescription:Y.description,toolType:X||"tool"},tracingPolicy:Y.tracingPolicy,tracingContext:E,requestContext:M,mastra:Y.mastra&&"observability"in Y.mastra?Y.mastra:void 0});try{O.debug(F,{...L,...z,model:V,args:A});let q=this.getParameters(),{data:_,error:P}=Wf(q,A,Y.name),w=P?.message?.includes("suspendedToolRunId: Required")&&!A?.resumeData;if(P&&!w)return O.warn("Tool input validation failed",{...L,validationError:P.message}),R?.end({output:P,attributes:{success:!1}}),P;return A=_,await new Promise((j,C)=>{setImmediate(async()=>{try{let k=await D(A,B,R);j(k)}catch(k){C(k)}})})}catch(q){let _=new G0({id:"TOOL_EXECUTION_FAILED",domain:"TOOL",category:"USER",details:{errorMessage:String(q),argsJson:JE(A),model:K?.modelId??""}},q);throw R?.error({error:_,attributes:{success:!1}}),O.trackException(_,{...L,...z,model:V,args:A}),_}}}buildV5(){let $=this.build();if(!$.parameters)throw Error("Tool parameters are required");let Y={...$,inputSchema:$.parameters,onInputStart:"onInputStart"in this.originalTool?this.originalTool.onInputStart:void 0,onInputDelta:"onInputDelta"in this.originalTool?this.originalTool.onInputDelta:void 0,onInputAvailable:"onInputAvailable"in this.originalTool?this.originalTool.onInputAvailable:void 0,onOutput:"onOutput"in this.originalTool?this.originalTool.onOutput:void 0};if($.type==="provider-defined"){let{execute:X,parameters:G,...J}=Y,Q=("name"in $&&typeof $.name==="string"?$.name:null)||$.id.split(".")[1]||$.id;return{...J,type:$.type,id:$.id,name:Q,args:$.args}}return Y}build(){let $=this.buildProviderTool(this.originalTool);if($)return $;let Y=this.options.model,X=[];if(Y){let z="supportsStructuredOutputs"in Y?Y.supportsStructuredOutputs??!1:!1,V={modelId:Y.modelId,supportsStructuredOutputs:z,provider:Y.provider};X.push(new C80(V),new Ig(V),new k80(V),new kj(V),new S80(V),new v80(V))}let G=this.getParameters(),J;if(G)if(z5(G)){let z=X.find((F)=>F.shouldApply()),V;if(z)V=z.processToCompatSchema(G);else V=Q4(G);J=BX($6(V,{io:"input"}),{validate:(F)=>{let L=V["~standard"].validate(F);if(L instanceof Promise)return L.then((N)=>{if("issues"in N&&N.issues)return{success:!1,error:Error(N.issues.map((D)=>D.message).join(", "))};return{success:!0,value:N.value}});if("issues"in L&&L.issues)return{success:!1,error:Error(L.issues.map((N)=>N.message).join(", "))};return{success:!0,value:L.value}}})}else J=GE({schema:G,compatLayers:X,mode:"aiSdkSchema"});let Q=this.getOutputSchema(),W;if(Q)if(z5(Q))W=$6(Q,{io:"output"});else W=GE({schema:Q,compatLayers:[],mode:"aiSdkSchema"});let K=!1,Z;if(typeof this.options.requireApproval==="function")K=!0,Z=this.options.requireApproval;else if(typeof this.options.requireApproval==="boolean")K=this.options.requireApproval,Z=void 0;if(A3(this.originalTool)&&"needsApproval"in this.originalTool){let z=this.originalTool.needsApproval;if(typeof z==="boolean")K=z,Z=void 0;else if(typeof z==="function")Z=z,K=!0}return{...{type:"function",description:this.originalTool.description,requireApproval:K,needsApprovalFn:Z,hasSuspendSchema:!!this.getSuspendSchema(),execute:this.originalTool.execute?this.createExecute(this.originalTool,{...this.options,description:this.originalTool.description},this.logType):void 0},id:"id"in this.originalTool?this.originalTool.id:void 0,parameters:J??U.object({}),outputSchema:W,strict:"strict"in this.originalTool?this.originalTool.strict:void 0,providerOptions:"providerOptions"in this.originalTool?this.originalTool.providerOptions:void 0,mcp:"mcp"in this.originalTool?this.originalTool.mcp:void 0,toModelOutput:"toModelOutput"in this.originalTool?this.originalTool.toModelOutput:void 0,transform:"transform"in this.originalTool?this.originalTool.transform:void 0,inputExamples:"inputExamples"in this.originalTool?this.originalTool.inputExamples:void 0,onInputStart:"onInputStart"in this.originalTool?this.originalTool.onInputStart:void 0,onInputDelta:"onInputDelta"in this.originalTool?this.originalTool.onInputDelta:void 0,onInputAvailable:"onInputAvailable"in this.originalTool?this.originalTool.onInputAvailable:void 0,onOutput:"onOutput"in this.originalTool?this.originalTool.onOutput:void 0,backgroundConfig:this.options.backgroundConfig}}};Q44=/^[a-zA-Z_][a-zA-Z0-9_]*$/});var yj,f80,g80;var Fx0=V0(()=>{O3();v3();yj=class extends QG{listKey="mcpServers";versionMetadataFields=["id","mcpServerId","versionNumber","changedFields","changeMessage","createdAt"];constructor(){super({component:"STORAGE",name:"MCP_SERVERS"})}},f80=class extends yj{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.mcpServers.clear(),this.db.mcpServerVersions.clear()}async getById($){let Y=this.db.mcpServers.get($);return Y?this.deepCopyConfig(Y):null}async create($){let{mcpServer:Y}=$;if(this.db.mcpServers.has(Y.id))throw Error(`MCP server with id ${Y.id} already exists`);let X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};this.db.mcpServers.set(Y.id,G);let{id:J,authorId:Q,metadata:W,...K}=Y,Z=crypto.randomUUID();return await this.createVersion({id:Z,mcpServerId:Y.id,versionNumber:1,...K,changedFields:Object.keys(K),changeMessage:"Initial version"}),this.deepCopyConfig(G)}async update($){let{id:Y,...X}=$,G=this.db.mcpServers.get(Y);if(!G)throw Error(`MCP server with id ${Y} not found`);let{authorId:J,activeVersionId:Q,metadata:W,status:K}=X,Z={...G,...J!==void 0&&{authorId:J},...Q!==void 0&&{activeVersionId:Q},...K!==void 0&&{status:K},...W!==void 0&&{metadata:{...G.metadata,...W}},updatedAt:new Date};return this.db.mcpServers.set(Y,Z),this.deepCopyConfig(Z)}async delete($){this.db.mcpServers.delete($),await this.deleteVersionsByParentId($)}async list($){let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W="published"}=$||{},{field:K,direction:Z}=this.parseOrderBy(G),H=F4(X,100);if(Y<0)throw Error("page must be >= 0");let z=Number.MAX_SAFE_INTEGER/2;if(Y*H>z)throw Error("page value too large");let V=Array.from(this.db.mcpServers.values());if(W)V=V.filter((A)=>A.status===W);if(J!==void 0)V=V.filter((A)=>A.authorId===J);if(Q&&Object.keys(Q).length>0)V=V.filter((A)=>{if(!A.metadata)return!1;return Object.entries(Q).every(([B,O])=>GJ(A.metadata[B],O))});let L=this.sortConfigs(V,K,Z).map((A)=>this.deepCopyConfig(A)),{offset:N,perPage:D}=B4(Y,X,H);return{mcpServers:L.slice(N,N+H),total:L.length,page:Y,perPage:D,hasMore:N+H<L.length}}async createVersion($){if(this.db.mcpServerVersions.has($.id))throw Error(`Version with id ${$.id} already exists`);for(let X of this.db.mcpServerVersions.values())if(X.mcpServerId===$.mcpServerId&&X.versionNumber===$.versionNumber)throw Error(`Version number ${$.versionNumber} already exists for MCP server ${$.mcpServerId}`);let Y={...$,createdAt:new Date};return this.db.mcpServerVersions.set($.id,this.deepCopyVersion(Y)),this.deepCopyVersion(Y)}async getVersion($){let Y=this.db.mcpServerVersions.get($);return Y?this.deepCopyVersion(Y):null}async getVersionByNumber($,Y){for(let X of this.db.mcpServerVersions.values())if(X.mcpServerId===$&&X.versionNumber===Y)return this.deepCopyVersion(X);return null}async getLatestVersion($){let Y=null;for(let X of this.db.mcpServerVersions.values())if(X.mcpServerId===$){if(!Y||X.versionNumber>Y.versionNumber)Y=X}return Y?this.deepCopyVersion(Y):null}async listVersions($){let{mcpServerId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),K=F4(G,20);if(X<0)throw Error("page must be >= 0");let Z=Number.MAX_SAFE_INTEGER/2;if(X*K>Z)throw Error("page value too large");let H=Array.from(this.db.mcpServerVersions.values()).filter((D)=>D.mcpServerId===Y);H=this.sortVersions(H,Q,W);let z=H.map((D)=>this.deepCopyVersion(D)),V=z.length,{offset:F,perPage:L}=B4(X,G,K);return{versions:z.slice(F,F+K),total:V,page:X,perPage:L,hasMore:F+K<V}}async deleteVersion($){this.db.mcpServerVersions.delete($)}async deleteVersionsByParentId($){let Y=[];for(let[X,G]of this.db.mcpServerVersions.entries())if(G.mcpServerId===$)Y.push(X);for(let X of Y)this.db.mcpServerVersions.delete(X)}async countVersions($){let Y=0;for(let X of this.db.mcpServerVersions.values())if(X.mcpServerId===$)Y++;return Y}deepCopyConfig($){return{...$,metadata:$.metadata?{...$.metadata}:$.metadata}}deepCopyVersion($){return{...$,tools:$.tools?JSON.parse(JSON.stringify($.tools)):$.tools,agents:$.agents?JSON.parse(JSON.stringify($.agents)):$.agents,workflows:$.workflows?JSON.parse(JSON.stringify($.workflows)):$.workflows,repository:$.repository?{...$.repository}:$.repository,changedFields:$.changedFields?[...$.changedFields]:$.changedFields}}sortConfigs($,Y,X){return $.sort((G,J)=>{let Q=G[Y].getTime(),W=J[Y].getTime();return X==="ASC"?Q-W:W-Q})}sortVersions($,Y,X){return $.sort((G,J)=>{let Q,W;if(Y==="createdAt")Q=G.createdAt.getTime(),W=J.createdAt.getTime();else Q=G.versionNumber,W=J.versionNumber;return X==="ASC"?Q-W:W-Q})}},g80=class extends yj{helpers;constructor({db:$}){super();this.helpers=new WG({db:$,entitiesFile:"mcp-servers.json",parentIdField:"mcpServerId",name:"FilesystemMCPServersStorage",versionMetadataFields:["id","mcpServerId","versionNumber","changedFields","changeMessage","createdAt"]})}async init(){await this.helpers.db.init()}async dangerouslyClearAll(){await this.helpers.dangerouslyClearAll()}async getById($){return this.helpers.getById($)}async create($){let{mcpServer:Y}=$,X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};await this.helpers.createEntity(Y.id,G);let{id:J,authorId:Q,metadata:W,...K}=Y,Z=crypto.randomUUID();return await this.createVersion({id:Z,mcpServerId:Y.id,versionNumber:1,...K,changedFields:Object.keys(K),changeMessage:"Initial version"}),structuredClone(G)}async update($){let{id:Y,...X}=$;return this.helpers.updateEntity(Y,X)}async delete($){await this.helpers.deleteEntity($)}async list($){let{page:Y,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W}=$||{};return await this.helpers.listEntities({page:Y,perPage:X,orderBy:G,listKey:"mcpServers",filters:{authorId:J,metadata:Q,status:W}})}async createVersion($){return this.helpers.createVersion($)}async getVersion($){return this.helpers.getVersion($)}async getVersionByNumber($,Y){return this.helpers.getVersionByNumber($,Y)}async getLatestVersion($){return this.helpers.getLatestVersion($)}async listVersions($){return await this.helpers.listVersions($,"mcpServerId")}async deleteVersion($){await this.helpers.deleteVersion($)}async deleteVersionsByParentId($){await this.helpers.deleteVersionsByParentId($)}async countVersions($){return this.helpers.countVersions($)}}});var bj,m80,u80;var Lx0=V0(()=>{O3();v3();bj=class extends QG{listKey="promptBlocks";versionMetadataFields=["id","blockId","versionNumber","changedFields","changeMessage","createdAt"];constructor(){super({component:"STORAGE",name:"PROMPT_BLOCKS"})}},m80=class extends bj{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.promptBlocks.clear(),this.db.promptBlockVersions.clear()}async getById($){let Y=this.db.promptBlocks.get($);return Y?this.deepCopyBlock(Y):null}async create($){let{promptBlock:Y}=$;if(this.db.promptBlocks.has(Y.id))throw Error(`Prompt block with id ${Y.id} already exists`);let X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};this.db.promptBlocks.set(Y.id,G);let{id:J,authorId:Q,metadata:W,...K}=Y,Z=crypto.randomUUID();return await this.createVersion({id:Z,blockId:Y.id,versionNumber:1,...K,changedFields:Object.keys(K),changeMessage:"Initial version"}),this.deepCopyBlock(G)}async update($){let{id:Y,...X}=$,G=this.db.promptBlocks.get(Y);if(!G)throw Error(`Prompt block with id ${Y} not found`);let{authorId:J,activeVersionId:Q,metadata:W,status:K}=X,Z={...G,...J!==void 0&&{authorId:J},...Q!==void 0&&{activeVersionId:Q},...K!==void 0&&{status:K},...W!==void 0&&{metadata:{...G.metadata,...W}},updatedAt:new Date};return this.db.promptBlocks.set(Y,Z),this.deepCopyBlock(Z)}async delete($){this.db.promptBlocks.delete($),await this.deleteVersionsByParentId($)}async list($){let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W}=$||{},{field:K,direction:Z}=this.parseOrderBy(G),H=F4(X,100);if(Y<0)throw Error("page must be >= 0");let z=Number.MAX_SAFE_INTEGER/2;if(Y*H>z)throw Error("page value too large");let V=Array.from(this.db.promptBlocks.values());if(W)V=V.filter((A)=>A.status===W);if(J!==void 0)V=V.filter((A)=>A.authorId===J);if(Q&&Object.keys(Q).length>0)V=V.filter((A)=>{if(!A.metadata)return!1;return Object.entries(Q).every(([B,O])=>GJ(A.metadata[B],O))});let L=this.sortBlocks(V,K,Z).map((A)=>this.deepCopyBlock(A)),{offset:N,perPage:D}=B4(Y,X,H);return{promptBlocks:L.slice(N,N+H),total:L.length,page:Y,perPage:D,hasMore:N+H<L.length}}async createVersion($){if(this.db.promptBlockVersions.has($.id))throw Error(`Version with id ${$.id} already exists`);for(let X of this.db.promptBlockVersions.values())if(X.blockId===$.blockId&&X.versionNumber===$.versionNumber)throw Error(`Version number ${$.versionNumber} already exists for prompt block ${$.blockId}`);let Y={...$,createdAt:new Date};return this.db.promptBlockVersions.set($.id,this.deepCopyVersion(Y)),this.deepCopyVersion(Y)}async getVersion($){let Y=this.db.promptBlockVersions.get($);return Y?this.deepCopyVersion(Y):null}async getVersionByNumber($,Y){for(let X of this.db.promptBlockVersions.values())if(X.blockId===$&&X.versionNumber===Y)return this.deepCopyVersion(X);return null}async getLatestVersion($){let Y=null;for(let X of this.db.promptBlockVersions.values())if(X.blockId===$){if(!Y||X.versionNumber>Y.versionNumber)Y=X}return Y?this.deepCopyVersion(Y):null}async listVersions($){let{blockId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),K=F4(G,20);if(X<0)throw Error("page must be >= 0");let Z=Number.MAX_SAFE_INTEGER/2;if(X*K>Z)throw Error("page value too large");let H=Array.from(this.db.promptBlockVersions.values()).filter((D)=>D.blockId===Y);H=this.sortVersions(H,Q,W);let z=H.map((D)=>this.deepCopyVersion(D)),V=z.length,{offset:F,perPage:L}=B4(X,G,K);return{versions:z.slice(F,F+K),total:V,page:X,perPage:L,hasMore:F+K<V}}async deleteVersion($){this.db.promptBlockVersions.delete($)}async deleteVersionsByParentId($){let Y=[];for(let[X,G]of this.db.promptBlockVersions.entries())if(G.blockId===$)Y.push(X);for(let X of Y)this.db.promptBlockVersions.delete(X)}async countVersions($){let Y=0;for(let X of this.db.promptBlockVersions.values())if(X.blockId===$)Y++;return Y}deepCopyBlock($){return{...$,metadata:$.metadata?{...$.metadata}:$.metadata}}deepCopyVersion($){return{...$,rules:$.rules?JSON.parse(JSON.stringify($.rules)):$.rules,changedFields:$.changedFields?[...$.changedFields]:$.changedFields}}sortBlocks($,Y,X){return $.sort((G,J)=>{let Q=G[Y].getTime(),W=J[Y].getTime();return X==="ASC"?Q-W:W-Q})}sortVersions($,Y,X){return $.sort((G,J)=>{let Q,W;if(Y==="createdAt")Q=G.createdAt.getTime(),W=J.createdAt.getTime();else Q=G.versionNumber,W=J.versionNumber;return X==="ASC"?Q-W:W-Q})}},u80=class extends bj{helpers;constructor({db:$}){super();this.helpers=new WG({db:$,entitiesFile:"prompt-blocks.json",parentIdField:"blockId",name:"FilesystemPromptBlocksStorage",versionMetadataFields:["id","blockId","versionNumber","changedFields","changeMessage","createdAt"]})}async init(){await this.helpers.db.init()}async dangerouslyClearAll(){await this.helpers.dangerouslyClearAll()}async getById($){return this.helpers.getById($)}async create($){let{promptBlock:Y}=$,X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};await this.helpers.createEntity(Y.id,G);let{id:J,authorId:Q,metadata:W,...K}=Y,Z=crypto.randomUUID();return await this.createVersion({id:Z,blockId:Y.id,versionNumber:1,...K,changedFields:Object.keys(K),changeMessage:"Initial version"}),structuredClone(G)}async update($){let{id:Y,...X}=$;return this.helpers.updateEntity(Y,X)}async delete($){await this.helpers.deleteEntity($)}async list($){let{page:Y,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W}=$||{};return await this.helpers.listEntities({page:Y,perPage:X,orderBy:G,listKey:"promptBlocks",filters:{authorId:J,metadata:Q,status:W}})}async createVersion($){return this.helpers.createVersion($)}async getVersion($){return this.helpers.getVersion($)}async getVersionByNumber($,Y){return this.helpers.getVersionByNumber($,Y)}async getLatestVersion($){return this.helpers.getLatestVersion($)}async listVersions($){return await this.helpers.listVersions($,"blockId")}async deleteVersion($){await this.helpers.deleteVersion($)}async deleteVersionsByParentId($){await this.helpers.deleteVersionsByParentId($)}async countVersions($){return this.helpers.countVersions($)}}});var hj,p80,d80;var Dx0=V0(()=>{O3();v3();hj=class extends QG{listKey="scorerDefinitions";versionMetadataFields=["id","scorerDefinitionId","versionNumber","changedFields","changeMessage","createdAt"];constructor(){super({component:"STORAGE",name:"SCORER_DEFINITIONS"})}},p80=class extends hj{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.scorerDefinitions.clear(),this.db.scorerDefinitionVersions.clear()}async getById($){let Y=this.db.scorerDefinitions.get($);return Y?this.deepCopyScorer(Y):null}async create($){let{scorerDefinition:Y}=$;if(this.db.scorerDefinitions.has(Y.id))throw Error(`Scorer definition with id ${Y.id} already exists`);let X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};this.db.scorerDefinitions.set(Y.id,G);let{id:J,authorId:Q,metadata:W,...K}=Y,Z=crypto.randomUUID();return await this.createVersion({id:Z,scorerDefinitionId:Y.id,versionNumber:1,...K,changedFields:Object.keys(K),changeMessage:"Initial version"}),this.deepCopyScorer(G)}async update($){let{id:Y,...X}=$,G=this.db.scorerDefinitions.get(Y);if(!G)throw Error(`Scorer definition with id ${Y} not found`);let{authorId:J,activeVersionId:Q,metadata:W,status:K}=X,Z={...G,...J!==void 0&&{authorId:J},...Q!==void 0&&{activeVersionId:Q},...K!==void 0&&{status:K},...W!==void 0&&{metadata:{...G.metadata,...W}},updatedAt:new Date};return this.db.scorerDefinitions.set(Y,Z),this.deepCopyScorer(Z)}async delete($){this.db.scorerDefinitions.delete($),await this.deleteVersionsByParentId($)}async list($){let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W}=$||{},{field:K,direction:Z}=this.parseOrderBy(G),H=F4(X,100);if(Y<0)throw Error("page must be >= 0");let z=Number.MAX_SAFE_INTEGER/2;if(Y*H>z)throw Error("page value too large");let V=Array.from(this.db.scorerDefinitions.values());if(W)V=V.filter((A)=>A.status===W);if(J!==void 0)V=V.filter((A)=>A.authorId===J);if(Q&&Object.keys(Q).length>0)V=V.filter((A)=>{if(!A.metadata)return!1;return Object.entries(Q).every(([B,O])=>GJ(A.metadata[B],O))});let L=this.sortScorers(V,K,Z).map((A)=>this.deepCopyScorer(A)),{offset:N,perPage:D}=B4(Y,X,H);return{scorerDefinitions:L.slice(N,N+H),total:L.length,page:Y,perPage:D,hasMore:N+H<L.length}}async createVersion($){if(this.db.scorerDefinitionVersions.has($.id))throw Error(`Version with id ${$.id} already exists`);for(let X of this.db.scorerDefinitionVersions.values())if(X.scorerDefinitionId===$.scorerDefinitionId&&X.versionNumber===$.versionNumber)throw Error(`Version number ${$.versionNumber} already exists for scorer definition ${$.scorerDefinitionId}`);let Y={...$,createdAt:new Date};return this.db.scorerDefinitionVersions.set($.id,this.deepCopyVersion(Y)),this.deepCopyVersion(Y)}async getVersion($){let Y=this.db.scorerDefinitionVersions.get($);return Y?this.deepCopyVersion(Y):null}async getVersionByNumber($,Y){for(let X of this.db.scorerDefinitionVersions.values())if(X.scorerDefinitionId===$&&X.versionNumber===Y)return this.deepCopyVersion(X);return null}async getLatestVersion($){let Y=null;for(let X of this.db.scorerDefinitionVersions.values())if(X.scorerDefinitionId===$){if(!Y||X.versionNumber>Y.versionNumber)Y=X}return Y?this.deepCopyVersion(Y):null}async listVersions($){let{scorerDefinitionId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),K=F4(G,20);if(X<0)throw Error("page must be >= 0");let Z=Number.MAX_SAFE_INTEGER/2;if(X*K>Z)throw Error("page value too large");let H=Array.from(this.db.scorerDefinitionVersions.values()).filter((D)=>D.scorerDefinitionId===Y);H=this.sortVersions(H,Q,W);let z=H.map((D)=>this.deepCopyVersion(D)),V=z.length,{offset:F,perPage:L}=B4(X,G,K);return{versions:z.slice(F,F+K),total:V,page:X,perPage:L,hasMore:F+K<V}}async deleteVersion($){this.db.scorerDefinitionVersions.delete($)}async deleteVersionsByParentId($){let Y=[];for(let[X,G]of this.db.scorerDefinitionVersions.entries())if(G.scorerDefinitionId===$)Y.push(X);for(let X of Y)this.db.scorerDefinitionVersions.delete(X)}async countVersions($){let Y=0;for(let X of this.db.scorerDefinitionVersions.values())if(X.scorerDefinitionId===$)Y++;return Y}deepCopyScorer($){return{...$,metadata:$.metadata?{...$.metadata}:$.metadata}}deepCopyVersion($){return{...$,model:$.model?JSON.parse(JSON.stringify($.model)):$.model,scoreRange:$.scoreRange?JSON.parse(JSON.stringify($.scoreRange)):$.scoreRange,presetConfig:$.presetConfig?JSON.parse(JSON.stringify($.presetConfig)):$.presetConfig,defaultSampling:$.defaultSampling?JSON.parse(JSON.stringify($.defaultSampling)):$.defaultSampling,changedFields:$.changedFields?[...$.changedFields]:$.changedFields}}sortScorers($,Y,X){return $.sort((G,J)=>{let Q=G[Y].getTime(),W=J[Y].getTime();return X==="ASC"?Q-W:W-Q})}sortVersions($,Y,X){return $.sort((G,J)=>{let Q,W;if(Y==="createdAt")Q=G.createdAt.getTime(),W=J.createdAt.getTime();else Q=G.versionNumber,W=J.versionNumber;return X==="ASC"?Q-W:W-Q})}},d80=class extends hj{helpers;constructor({db:$}){super();this.helpers=new WG({db:$,entitiesFile:"scorer-definitions.json",parentIdField:"scorerDefinitionId",name:"FilesystemScorerDefinitionsStorage",versionMetadataFields:["id","scorerDefinitionId","versionNumber","changedFields","changeMessage","createdAt"]})}async init(){await this.helpers.db.init()}async dangerouslyClearAll(){await this.helpers.dangerouslyClearAll()}async getById($){return this.helpers.getById($)}async create($){let{scorerDefinition:Y}=$,X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};await this.helpers.createEntity(Y.id,G);let{id:J,authorId:Q,metadata:W,...K}=Y,Z=crypto.randomUUID();return await this.createVersion({id:Z,scorerDefinitionId:Y.id,versionNumber:1,...K,changedFields:Object.keys(K),changeMessage:"Initial version"}),structuredClone(G)}async update($){let{id:Y,...X}=$;return this.helpers.updateEntity(Y,X)}async delete($){await this.helpers.deleteEntity($)}async list($){let{page:Y,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W}=$||{};return await this.helpers.listEntities({page:Y,perPage:X,orderBy:G,listKey:"scorerDefinitions",filters:{authorId:J,metadata:Q,status:W}})}async createVersion($){return this.helpers.createVersion($)}async getVersion($){return this.helpers.getVersion($)}async getVersionByNumber($,Y){return this.helpers.getVersionByNumber($,Y)}async getLatestVersion($){return this.helpers.getLatestVersion($)}async listVersions($){return await this.helpers.listVersions($,"scorerDefinitionId")}async deleteVersion($){await this.helpers.deleteVersion($)}async deleteVersionsByParentId($){await this.helpers.deleteVersionsByParentId($)}async countVersions($){return this.helpers.countVersions($)}}});import{randomUUID as Z44}from"crypto";var fj,c80,l80;var Nx0=V0(()=>{O3();fj=class extends QG{listKey="skills";versionMetadataFields=["id","skillId","versionNumber","changedFields","changeMessage","createdAt"];constructor(){super({component:"STORAGE",name:"SKILLS"})}},c80=class extends fj{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.skills.clear(),this.db.skillVersions.clear()}async getById($){let Y=this.db.skills.get($);return Y?this.deepCopyConfig(Y):null}async create($){let{skill:Y}=$;if(this.db.skills.has(Y.id))throw Error(`Skill with id ${Y.id} already exists`);let X=new Date,G=Y.visibility??(Y.authorId?"private":void 0),J={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,visibility:G,favoriteCount:0,createdAt:X,updatedAt:X};this.db.skills.set(Y.id,J);let{id:Q,authorId:W,visibility:K,...Z}=Y,H=Z44();try{await this.createVersion({id:H,skillId:Y.id,versionNumber:1,...Z,changedFields:Object.keys(Z),changeMessage:"Initial version"})}catch(z){throw this.db.skills.delete(Y.id),z}return this.deepCopyConfig(J)}async update($){let{id:Y,...X}=$,G=this.db.skills.get(Y);if(!G)throw Error(`Skill with id ${Y} not found`);let{authorId:J,visibility:Q,activeVersionId:W,status:K,...Z}=X,H={};for(let[L,N]of Object.entries(Z))if(N!==void 0)H[L]=N;let z=["name","description","instructions","license","compatibility","source","references","scripts","assets","files","metadata","tree"],V=z.some((L)=>(L in H)),F={...G,...J!==void 0&&{authorId:J},...Q!==void 0&&{visibility:Q},...W!==void 0&&{activeVersionId:W},...K!==void 0&&{status:K},updatedAt:new Date};if(W!==void 0&&K===void 0)F.status="published";if(V){let L=await this.getLatestVersion(Y);if(!L)throw Error(`No versions found for skill ${Y}`);let{id:N,skillId:D,versionNumber:A,changedFields:B,changeMessage:O,createdAt:E,...M}=L,R={...M,...H},q=z.filter((_)=>(_ in H)&&JSON.stringify(H[_])!==JSON.stringify(M[_]));if(q.length>0){let _=Z44(),P=L.versionNumber+1;await this.createVersion({id:_,skillId:Y,versionNumber:P,...R,changedFields:q,changeMessage:`Updated ${q.join(", ")}`})}}return this.db.skills.set(Y,F),this.deepCopyConfig(F)}async delete($){this.db.skills.delete($),await this.deleteVersionsByParentId($)}async list($){let{page:Y=0,perPage:X,orderBy:G,authorId:J,status:Q,visibility:W,metadata:K,entityIds:Z,pinFavoritedFor:H,favoritedOnly:z}=$||{},{field:V,direction:F}=this.parseOrderBy(G),L=F4(X,100);if(Y<0)throw Error("page must be >= 0");let N=Number.MAX_SAFE_INTEGER/2;if(Y*L>N)throw Error("page value too large");let D=Array.from(this.db.skills.values());if(Z!==void 0){if(Z.length===0)return{skills:[],total:0,page:Y,perPage:X===!1?!1:L,hasMore:!1};let R=new Set(Z);D=D.filter((q)=>R.has(q.id))}if(J!==void 0)D=D.filter((R)=>R.authorId===J);if(Q!==void 0)D=D.filter((R)=>R.status===Q);if(W!==void 0)D=D.filter((R)=>R.visibility===W);if(K&&Object.keys(K).length>0)D=D.filter((R)=>{return!1});let A=H?this.collectFavoritedIdsFor(H):void 0;if(z)if(A)D=D.filter((R)=>A.has(R.id));else D=[];let O=this.sortConfigs(D,V,F,A).map((R)=>this.deepCopyConfig(R)),{offset:E,perPage:M}=B4(Y,X,L);return{skills:O.slice(E,E+L),total:O.length,page:Y,perPage:M,hasMore:E+L<O.length}}async createVersion($){if(this.db.skillVersions.has($.id))throw Error(`Version with id ${$.id} already exists`);for(let X of this.db.skillVersions.values())if(X.skillId===$.skillId&&X.versionNumber===$.versionNumber)throw Error(`Version number ${$.versionNumber} already exists for skill ${$.skillId}`);let Y={...$,createdAt:new Date};return this.db.skillVersions.set($.id,this.deepCopyVersion(Y)),this.deepCopyVersion(Y)}async getVersion($){let Y=this.db.skillVersions.get($);return Y?this.deepCopyVersion(Y):null}async getVersionByNumber($,Y){for(let X of this.db.skillVersions.values())if(X.skillId===$&&X.versionNumber===Y)return this.deepCopyVersion(X);return null}async getLatestVersion($){let Y=null;for(let X of this.db.skillVersions.values())if(X.skillId===$){if(!Y||X.versionNumber>Y.versionNumber)Y=X}return Y?this.deepCopyVersion(Y):null}async listVersions($){let{skillId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),K=F4(G,20);if(X<0)throw Error("page must be >= 0");let Z=Number.MAX_SAFE_INTEGER/2;if(X*K>Z)throw Error("page value too large");let H=Array.from(this.db.skillVersions.values()).filter((D)=>D.skillId===Y);H=this.sortVersions(H,Q,W);let z=H.map((D)=>this.deepCopyVersion(D)),V=z.length,{offset:F,perPage:L}=B4(X,G,K);return{versions:z.slice(F,F+K),total:V,page:X,perPage:L,hasMore:F+K<V}}async deleteVersion($){this.db.skillVersions.delete($)}async deleteVersionsByParentId($){let Y=[];for(let[X,G]of this.db.skillVersions.entries())if(G.skillId===$)Y.push(X);for(let X of Y)this.db.skillVersions.delete(X)}async countVersions($){let Y=0;for(let X of this.db.skillVersions.values())if(X.skillId===$)Y++;return Y}deepCopyConfig($){return{...$}}deepCopyVersion($){return structuredClone($)}sortConfigs($,Y,X,G){return $.sort((J,Q)=>{if(G){let Z=G.has(J.id)?1:0,H=G.has(Q.id)?1:0;if(Z!==H)return H-Z}let W=J[Y].getTime(),K=Q[Y].getTime();if(W!==K)return X==="ASC"?W-K:K-W;return J.id<Q.id?-1:J.id>Q.id?1:0})}collectFavoritedIdsFor($){let Y=new Set;for(let X of this.db.favorites.values())if(X.userId===$&&X.entityType==="skill")Y.add(X.entityId);return Y}sortVersions($,Y,X){return $.sort((G,J)=>{let Q,W;if(Y==="createdAt")Q=G.createdAt.getTime(),W=J.createdAt.getTime();else Q=G.versionNumber,W=J.versionNumber;return X==="ASC"?Q-W:W-Q})}},l80=class extends fj{helpers;constructor({db:$}){super();this.helpers=new WG({db:$,entitiesFile:"skills.json",parentIdField:"skillId",name:"FilesystemSkillsStorage",versionMetadataFields:["id","skillId","versionNumber","changedFields","changeMessage","createdAt"]})}async init(){await this.helpers.db.init()}async dangerouslyClearAll(){await this.helpers.dangerouslyClearAll()}async getById($){return this.helpers.getById($)}async create($){let{skill:Y}=$,X=new Date,G=Y.visibility??(Y.authorId?"private":void 0),J={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,visibility:G,createdAt:X,updatedAt:X};await this.helpers.createEntity(Y.id,J);let{id:Q,authorId:W,visibility:K,...Z}=Y,H=crypto.randomUUID();return await this.createVersion({id:H,skillId:Y.id,versionNumber:1,...Z,changedFields:Object.keys(Z),changeMessage:"Initial version"}),structuredClone(J)}async update($){let{id:Y,...X}=$;if(!await this.helpers.getById(Y))throw Error(`FilesystemSkillsStorage: skill with id ${Y} not found`);let{authorId:J,visibility:Q,activeVersionId:W,status:K,...Z}=X,H={};for(let[L,N]of Object.entries(Z))if(N!==void 0)H[L]=N;let z=["name","description","instructions","license","compatibility","source","references","scripts","assets","files","metadata","tree"];if(z.some((L)=>(L in H))){let L=await this.getLatestVersion(Y);if(!L)throw Error(`No versions found for skill ${Y}`);let{id:N,skillId:D,versionNumber:A,changedFields:B,changeMessage:O,createdAt:E,...M}=L,R={...M,...H},q=z.filter((_)=>(_ in H)&&JSON.stringify(H[_])!==JSON.stringify(M[_]));if(q.length>0){let _=crypto.randomUUID(),P=L.versionNumber+1;await this.createVersion({id:_,skillId:Y,versionNumber:P,...R,changedFields:q,changeMessage:`Updated ${q.join(", ")}`})}}let F={...J!==void 0&&{authorId:J},...Q!==void 0&&{visibility:Q},...W!==void 0&&{activeVersionId:W},...K!==void 0&&{status:K}};if(W!==void 0&&K===void 0)F.status="published";return await this.helpers.updateEntity(Y,F)}async delete($){await this.helpers.deleteEntity($)}async list($){let{page:Y,perPage:X,orderBy:G,authorId:J,visibility:Q,metadata:W}=$||{};return await this.helpers.listEntities({page:Y,perPage:X,orderBy:G,listKey:"skills",filters:{authorId:J,visibility:Q,metadata:W}})}async createVersion($){return this.helpers.createVersion($)}async getVersion($){return this.helpers.getVersion($)}async getVersionByNumber($,Y){return this.helpers.getVersionByNumber($,Y)}async getLatestVersion($){return this.helpers.getLatestVersion($)}async listVersions($){return await this.helpers.listVersions($,"skillId")}async deleteVersion($){await this.helpers.deleteVersion($)}async deleteVersionsByParentId($){await this.helpers.deleteVersionsByParentId($)}async countVersions($){return this.helpers.countVersions($)}}});var gj,i80,n80;var Ax0=V0(()=>{O3();v3();gj=class extends QG{listKey="workspaces";versionMetadataFields=["id","workspaceId","versionNumber","changedFields","changeMessage","createdAt"];constructor(){super({component:"STORAGE",name:"WORKSPACES"})}},i80=class extends gj{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.workspaces.clear(),this.db.workspaceVersions.clear()}async getById($){let Y=this.db.workspaces.get($);return Y?this.deepCopyConfig(Y):null}async create($){let{workspace:Y}=$;if(this.db.workspaces.has(Y.id))throw Error(`Workspace with id ${Y.id} already exists`);let X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};this.db.workspaces.set(Y.id,G);let{id:J,authorId:Q,metadata:W,...K}=Y,Z=crypto.randomUUID();return await this.createVersion({id:Z,workspaceId:Y.id,versionNumber:1,...K,changedFields:Object.keys(K),changeMessage:"Initial version"}),this.deepCopyConfig(G)}async update($){let{id:Y,...X}=$,G=this.db.workspaces.get(Y);if(!G)throw Error(`Workspace with id ${Y} not found`);let{authorId:J,activeVersionId:Q,metadata:W,status:K,...Z}=X,H={};for(let[L,N]of Object.entries(Z))if(N!==void 0)H[L]=N;let z=["name","description","filesystem","sandbox","mounts","search","skills","tools","autoSync","operationTimeout"],V=z.some((L)=>(L in H)),F={...G,...J!==void 0&&{authorId:J},...Q!==void 0&&{activeVersionId:Q},...K!==void 0&&{status:K},...W!==void 0&&{metadata:{...G.metadata,...W}},updatedAt:new Date};if(Q!==void 0&&K===void 0)F.status="published";if(V){let L=await this.getLatestVersion(Y);if(!L)throw Error(`No versions found for workspace ${Y}`);let{id:N,workspaceId:D,versionNumber:A,changedFields:B,changeMessage:O,createdAt:E,...M}=L,R={...M,...H},q=z.filter((_)=>(_ in H)&&JSON.stringify(H[_])!==JSON.stringify(M[_]));if(q.length>0){let _=crypto.randomUUID(),P=L.versionNumber+1;await this.createVersion({id:_,workspaceId:Y,versionNumber:P,...R,changedFields:q,changeMessage:`Updated ${q.join(", ")}`})}}return this.db.workspaces.set(Y,F),this.deepCopyConfig(F)}async delete($){this.db.workspaces.delete($),await this.deleteVersionsByParentId($)}async list($){let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q}=$||{},{field:W,direction:K}=this.parseOrderBy(G),Z=F4(X,100);if(Y<0)throw Error("page must be >= 0");let H=Number.MAX_SAFE_INTEGER/2;if(Y*Z>H)throw Error("page value too large");let z=Array.from(this.db.workspaces.values());if(J!==void 0)z=z.filter((D)=>D.authorId===J);if(Q&&Object.keys(Q).length>0)z=z.filter((D)=>{if(!D.metadata)return!1;return Object.entries(Q).every(([A,B])=>GJ(D.metadata[A],B))});let F=this.sortConfigs(z,W,K).map((D)=>this.deepCopyConfig(D)),{offset:L,perPage:N}=B4(Y,X,Z);return{workspaces:F.slice(L,L+Z),total:F.length,page:Y,perPage:N,hasMore:L+Z<F.length}}async createVersion($){if(this.db.workspaceVersions.has($.id))throw Error(`Version with id ${$.id} already exists`);for(let X of this.db.workspaceVersions.values())if(X.workspaceId===$.workspaceId&&X.versionNumber===$.versionNumber)throw Error(`Version number ${$.versionNumber} already exists for workspace ${$.workspaceId}`);let Y={...$,createdAt:new Date};return this.db.workspaceVersions.set($.id,this.deepCopyVersion(Y)),this.deepCopyVersion(Y)}async getVersion($){let Y=this.db.workspaceVersions.get($);return Y?this.deepCopyVersion(Y):null}async getVersionByNumber($,Y){for(let X of this.db.workspaceVersions.values())if(X.workspaceId===$&&X.versionNumber===Y)return this.deepCopyVersion(X);return null}async getLatestVersion($){let Y=null;for(let X of this.db.workspaceVersions.values())if(X.workspaceId===$){if(!Y||X.versionNumber>Y.versionNumber)Y=X}return Y?this.deepCopyVersion(Y):null}async listVersions($){let{workspaceId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),K=F4(G,20);if(X<0)throw Error("page must be >= 0");let Z=Number.MAX_SAFE_INTEGER/2;if(X*K>Z)throw Error("page value too large");let H=Array.from(this.db.workspaceVersions.values()).filter((D)=>D.workspaceId===Y);H=this.sortVersions(H,Q,W);let z=H.map((D)=>this.deepCopyVersion(D)),V=z.length,{offset:F,perPage:L}=B4(X,G,K);return{versions:z.slice(F,F+K),total:V,page:X,perPage:L,hasMore:F+K<V}}async deleteVersion($){this.db.workspaceVersions.delete($)}async deleteVersionsByParentId($){let Y=[];for(let[X,G]of this.db.workspaceVersions.entries())if(G.workspaceId===$)Y.push(X);for(let X of Y)this.db.workspaceVersions.delete(X)}async countVersions($){let Y=0;for(let X of this.db.workspaceVersions.values())if(X.workspaceId===$)Y++;return Y}deepCopyConfig($){return{...$,metadata:$.metadata?{...$.metadata}:$.metadata}}deepCopyVersion($){return structuredClone($)}sortConfigs($,Y,X){return $.sort((G,J)=>{let Q=G[Y].getTime(),W=J[Y].getTime();return X==="ASC"?Q-W:W-Q})}sortVersions($,Y,X){return $.sort((G,J)=>{let Q,W;if(Y==="createdAt")Q=G.createdAt.getTime(),W=J.createdAt.getTime();else Q=G.versionNumber,W=J.versionNumber;return X==="ASC"?Q-W:W-Q})}},n80=class extends gj{helpers;constructor({db:$}){super();this.helpers=new WG({db:$,entitiesFile:"workspaces.json",parentIdField:"workspaceId",name:"FilesystemWorkspacesStorage",versionMetadataFields:["id","workspaceId","versionNumber","changedFields","changeMessage","createdAt"]})}async init(){await this.helpers.db.init()}async dangerouslyClearAll(){await this.helpers.dangerouslyClearAll()}async getById($){return this.helpers.getById($)}async create($){let{workspace:Y}=$,X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};await this.helpers.createEntity(Y.id,G);let{id:J,authorId:Q,metadata:W,...K}=Y,Z=crypto.randomUUID();return await this.createVersion({id:Z,workspaceId:Y.id,versionNumber:1,...K,changedFields:Object.keys(K),changeMessage:"Initial version"}),structuredClone(G)}async update($){let{id:Y,...X}=$;return this.helpers.updateEntity(Y,X)}async delete($){await this.helpers.deleteEntity($)}async list($){let{page:Y,perPage:X,orderBy:G,authorId:J,metadata:Q}=$||{};return await this.helpers.listEntities({page:Y,perPage:X,orderBy:G,listKey:"workspaces",filters:{authorId:J,metadata:Q}})}async createVersion($){return this.helpers.createVersion($)}async getVersion($){return this.helpers.getVersion($)}async getVersionByNumber($,Y){return this.helpers.getVersionByNumber($,Y)}async getLatestVersion($){return this.helpers.getLatestVersion($)}async listVersions($){return await this.helpers.listVersions($,"workspaceId")}async deleteVersion($){await this.helpers.deleteVersion($)}async deleteVersionsByParentId($){await this.helpers.deleteVersionsByParentId($)}async countVersions($){return this.helpers.countVersions($)}}});function U44($){let Y={};for(let[X,G]of Object.entries($))if(hy8.has(X))Y[X]=G;return Y}var mj,r80,hy8,a80;var Bx0=V0(()=>{O3();v3();mj=class extends QG{listKey="agents";versionMetadataFields=["id","agentId","versionNumber","changedFields","changeMessage","createdAt"];constructor(){super({component:"STORAGE",name:"AGENTS"})}},r80=class extends mj{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.agents.clear(),this.db.agentVersions.clear()}async getById($){let Y=this.db.agents.get($);return Y?this.deepCopyAgent(Y):null}async create($){let{agent:Y}=$;if(this.db.agents.has(Y.id))throw Error(`Agent with id ${Y.id} already exists`);let X=new Date,G=Y.visibility??(Y.authorId?"private":void 0),J={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,visibility:G,metadata:Y.metadata,favoriteCount:0,createdAt:X,updatedAt:X};this.db.agents.set(Y.id,J);let{id:Q,authorId:W,visibility:K,metadata:Z,...H}=Y,z=crypto.randomUUID();return await this.createVersion({id:z,agentId:Y.id,versionNumber:1,...H,changedFields:Object.keys(H),changeMessage:"Initial version"}),this.deepCopyAgent(J)}async update($){let{id:Y,...X}=$,G=this.db.agents.get(Y);if(!G)throw Error(`Agent with id ${Y} not found`);let{authorId:J,visibility:Q,activeVersionId:W,metadata:K,status:Z}=X,H={...G,...J!==void 0&&{authorId:J},...Q!==void 0&&{visibility:Q},...W!==void 0&&{activeVersionId:W},...K!==void 0&&{metadata:{...G.metadata,...K}},...Z!==void 0&&{status:Z},updatedAt:new Date};return this.db.agents.set(Y,H),this.deepCopyAgent(H)}async delete($){this.db.agents.delete($),await this.deleteVersionsByParentId($)}async list($){let{page:Y=0,perPage:X,orderBy:G,authorId:J,visibility:Q,metadata:W,status:K,entityIds:Z,pinFavoritedFor:H,favoritedOnly:z}=$||{},{field:V,direction:F}=this.parseOrderBy(G),L=F4(X,100);if(Y<0)throw Error("page must be >= 0");let N=Number.MAX_SAFE_INTEGER/2;if(Y*L>N)throw Error("page value too large");let D=Array.from(this.db.agents.values());if(Z!==void 0){if(Z.length===0)return{agents:[],total:0,page:Y,perPage:X===!1?!1:L,hasMore:!1};let R=new Set(Z);D=D.filter((q)=>R.has(q.id))}if(K)D=D.filter((R)=>R.status===K);if(J!==void 0)D=D.filter((R)=>R.authorId===J);if(Q!==void 0)D=D.filter((R)=>R.visibility===Q);if(W&&Object.keys(W).length>0)D=D.filter((R)=>{if(!R.metadata)return!1;return Object.entries(W).every(([q,_])=>GJ(R.metadata[q],_))});let A=H?this.collectFavoritedIdsFor(H):void 0;if(z)if(A)D=D.filter((R)=>A.has(R.id));else D=[];let O=this.sortAgents(D,V,F,A).map((R)=>this.deepCopyAgent(R)),{offset:E,perPage:M}=B4(Y,X,L);return{agents:O.slice(E,E+L),total:O.length,page:Y,perPage:M,hasMore:E+L<O.length}}async createVersion($){if(this.db.agentVersions.has($.id))throw Error(`Version with id ${$.id} already exists`);for(let X of this.db.agentVersions.values())if(X.agentId===$.agentId&&X.versionNumber===$.versionNumber)throw Error(`Version number ${$.versionNumber} already exists for agent ${$.agentId}`);let Y={...$,createdAt:new Date};return this.db.agentVersions.set($.id,this.deepCopyVersion(Y)),this.deepCopyVersion(Y)}async getVersion($){let Y=this.db.agentVersions.get($);return Y?this.deepCopyVersion(Y):null}async getVersionByNumber($,Y){for(let X of this.db.agentVersions.values())if(X.agentId===$&&X.versionNumber===Y)return this.deepCopyVersion(X);return null}async getLatestVersion($){let Y=null;for(let X of this.db.agentVersions.values())if(X.agentId===$){if(!Y||X.versionNumber>Y.versionNumber)Y=X}return Y?this.deepCopyVersion(Y):null}async listVersions($){let{agentId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),K=F4(G,20);if(X<0)throw Error("page must be >= 0");let Z=Number.MAX_SAFE_INTEGER/2;if(X*K>Z)throw Error("page value too large");let H=Array.from(this.db.agentVersions.values()).filter((D)=>D.agentId===Y);H=this.sortVersions(H,Q,W);let z=H.map((D)=>this.deepCopyVersion(D)),V=z.length,{offset:F,perPage:L}=B4(X,G,K);return{versions:z.slice(F,F+K),total:V,page:X,perPage:L,hasMore:F+K<V}}async deleteVersion($){this.db.agentVersions.delete($)}async deleteVersionsByParentId($){let Y=[];for(let[X,G]of this.db.agentVersions.entries())if(G.agentId===$)Y.push(X);for(let X of Y)this.db.agentVersions.delete(X)}async countVersions($){let Y=0;for(let X of this.db.agentVersions.values())if(X.agentId===$)Y++;return Y}deepCopyAgent($){return{...$,metadata:$.metadata?{...$.metadata}:$.metadata}}deepCopyVersion($){return structuredClone($)}sortAgents($,Y,X,G){return $.sort((J,Q)=>{if(G){let Z=G.has(J.id)?1:0,H=G.has(Q.id)?1:0;if(Z!==H)return H-Z}let W=new Date(J[Y]).getTime(),K=new Date(Q[Y]).getTime();if(W!==K)return X==="ASC"?W-K:K-W;return J.id<Q.id?-1:J.id>Q.id?1:0})}collectFavoritedIdsFor($){let Y=new Set;for(let X of this.db.favorites.values())if(X.userId===$&&X.entityType==="agent")Y.add(X.entityId);return Y}sortVersions($,Y,X){return $.sort((G,J)=>{let Q,W;if(Y==="createdAt")Q=G.createdAt.getTime(),W=J.createdAt.getTime();else Q=G.versionNumber,W=J.versionNumber;return X==="ASC"?Q-W:W-Q})}},hy8=new Set(["name","instructions","model","tools","integrationTools","mcpClients","requestContextSchema"]);a80=class extends mj{helpers;constructor({db:$}){super();this.helpers=new WG({db:$,entitiesFile:"agents.json",parentIdField:"agentId",name:"FilesystemAgentsStorage",versionMetadataFields:["id","agentId","versionNumber","changedFields","changeMessage","createdAt"]})}async init(){await this.helpers.db.init()}async dangerouslyClearAll(){await this.helpers.dangerouslyClearAll()}async getById($){return this.helpers.getById($)}async create($){let{agent:Y}=$,X=new Date,G=Y.visibility??(Y.authorId?"private":void 0),J={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,visibility:G,metadata:Y.metadata,createdAt:X,updatedAt:X};await this.helpers.createEntity(Y.id,J);let{id:Q,authorId:W,visibility:K,metadata:Z,...H}=Y,z=U44(H),V=crypto.randomUUID();return await this.createVersion({id:V,agentId:Y.id,versionNumber:1,...z,changedFields:Object.keys(z),changeMessage:"Initial version"}),structuredClone(J)}async update($){let{id:Y,...X}=$,G={},J=new Set(["authorId","visibility","metadata","activeVersionId","status"]);for(let[Q,W]of Object.entries(X))if(J.has(Q))G[Q]=W;return this.helpers.updateEntity(Y,G)}async delete($){await this.helpers.deleteEntity($)}async list($){let{page:Y,perPage:X,orderBy:G,authorId:J,visibility:Q,metadata:W,status:K}=$||{};return await this.helpers.listEntities({page:Y,perPage:X,orderBy:G,listKey:"agents",filters:{authorId:J,visibility:Q,metadata:W,status:K}})}async createVersion($){let{id:Y,agentId:X,versionNumber:G,changedFields:J,changeMessage:Q,...W}=$,K=U44(W);return this.helpers.createVersion({id:Y,agentId:X,versionNumber:G,changedFields:J,changeMessage:Q,...K})}async getVersion($){return this.helpers.getVersion($)}async getVersionByNumber($,Y){return this.helpers.getVersionByNumber($,Y)}async getLatestVersion($){return this.helpers.getLatestVersion($)}async listVersions($){return await this.helpers.listVersions($,"agentId")}async deleteVersion($){await this.helpers.deleteVersion($)}async deleteVersionsByParentId($){await this.helpers.deleteVersionsByParentId($)}async countVersions($){return this.helpers.countVersions($)}}});function s80($,Y,X){return`${$}\x00${Y}\x00${X}`}var Cg,o80;var Ox0=V0(()=>{p2();Cg=class extends u8{constructor(){super({component:"STORAGE",name:"FAVORITES"})}};o80=class extends Cg{db;constructor({db:$}){super();this.db=$}async init(){}async dangerouslyClearAll(){this.db.favorites.clear();for(let $ of this.db.agents.values())if($.favoriteCount)$.favoriteCount=0;for(let $ of this.db.skills.values())if($.favoriteCount)$.favoriteCount=0}async favorite({userId:$,entityType:Y,entityId:X}){let G=this.requireEntity(Y,X),J=s80($,Y,X);if(this.db.favorites.has(J))return{favorited:!0,favoriteCount:G.favoriteCount??0};let Q={userId:$,entityType:Y,entityId:X,createdAt:new Date};this.db.favorites.set(J,Q);let W=(G.favoriteCount??0)+1;return G.favoriteCount=W,G.updatedAt=new Date,{favorited:!0,favoriteCount:W}}async unfavorite({userId:$,entityType:Y,entityId:X}){let G=this.requireEntity(Y,X),J=s80($,Y,X);if(!this.db.favorites.has(J))return{favorited:!1,favoriteCount:G.favoriteCount??0};this.db.favorites.delete(J);let Q=Math.max(0,(G.favoriteCount??0)-1);return G.favoriteCount=Q,G.updatedAt=new Date,{favorited:!1,favoriteCount:Q}}async isFavorited({userId:$,entityType:Y,entityId:X}){return this.db.favorites.has(s80($,Y,X))}async isFavoritedBatch({userId:$,entityType:Y,entityIds:X}){let G=new Set;for(let J of X)if(this.db.favorites.has(s80($,Y,J)))G.add(J);return G}async listFavoritedIds({userId:$,entityType:Y}){let X=[];for(let G of this.db.favorites.values())if(G.userId===$&&G.entityType===Y)X.push(G.entityId);return X}async deleteFavoritesForEntity({entityType:$,entityId:Y}){let X=0;for(let[Q,W]of this.db.favorites)if(W.entityType===$&&W.entityId===Y)this.db.favorites.delete(Q),X++;let J=($==="agent"?this.db.agents:this.db.skills).get(Y);if(J&&J.favoriteCount)J.favoriteCount=0;return X}requireEntity($,Y){let G=($==="agent"?this.db.agents:this.db.skills).get(Y);if(!G)throw Error(`Cannot favorite: ${$} with id ${Y} does not exist`);return G}}});var uj,t80,e80;var Ex0=V0(()=>{O3();v3();uj=class extends QG{listKey="mcpClients";versionMetadataFields=["id","mcpClientId","versionNumber","changedFields","changeMessage","createdAt"];constructor(){super({component:"STORAGE",name:"MCP_CLIENTS"})}},t80=class extends uj{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.mcpClients.clear(),this.db.mcpClientVersions.clear()}async getById($){let Y=this.db.mcpClients.get($);return Y?this.deepCopyConfig(Y):null}async create($){let{mcpClient:Y}=$;if(this.db.mcpClients.has(Y.id))throw Error(`MCP client with id ${Y.id} already exists`);let X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};this.db.mcpClients.set(Y.id,G);let{id:J,authorId:Q,metadata:W,...K}=Y,Z=crypto.randomUUID();return await this.createVersion({id:Z,mcpClientId:Y.id,versionNumber:1,...K,changedFields:Object.keys(K),changeMessage:"Initial version"}),this.deepCopyConfig(G)}async update($){let{id:Y,...X}=$,G=this.db.mcpClients.get(Y);if(!G)throw Error(`MCP client with id ${Y} not found`);let{authorId:J,activeVersionId:Q,metadata:W,status:K}=X,Z={...G,...J!==void 0&&{authorId:J},...Q!==void 0&&{activeVersionId:Q},...K!==void 0&&{status:K},...W!==void 0&&{metadata:{...G.metadata,...W}},updatedAt:new Date};return this.db.mcpClients.set(Y,Z),this.deepCopyConfig(Z)}async delete($){this.db.mcpClients.delete($),await this.deleteVersionsByParentId($)}async list($){let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W}=$||{},{field:K,direction:Z}=this.parseOrderBy(G),H=F4(X,100);if(Y<0)throw Error("page must be >= 0");let z=Number.MAX_SAFE_INTEGER/2;if(Y*H>z)throw Error("page value too large");let V=Array.from(this.db.mcpClients.values());if(W)V=V.filter((A)=>A.status===W);if(J!==void 0)V=V.filter((A)=>A.authorId===J);if(Q&&Object.keys(Q).length>0)V=V.filter((A)=>{if(!A.metadata)return!1;return Object.entries(Q).every(([B,O])=>GJ(A.metadata[B],O))});let L=this.sortConfigs(V,K,Z).map((A)=>this.deepCopyConfig(A)),{offset:N,perPage:D}=B4(Y,X,H);return{mcpClients:L.slice(N,N+H),total:L.length,page:Y,perPage:D,hasMore:N+H<L.length}}async createVersion($){if(this.db.mcpClientVersions.has($.id))throw Error(`Version with id ${$.id} already exists`);for(let X of this.db.mcpClientVersions.values())if(X.mcpClientId===$.mcpClientId&&X.versionNumber===$.versionNumber)throw Error(`Version number ${$.versionNumber} already exists for MCP client ${$.mcpClientId}`);let Y={...$,createdAt:new Date};return this.db.mcpClientVersions.set($.id,this.deepCopyVersion(Y)),this.deepCopyVersion(Y)}async getVersion($){let Y=this.db.mcpClientVersions.get($);return Y?this.deepCopyVersion(Y):null}async getVersionByNumber($,Y){for(let X of this.db.mcpClientVersions.values())if(X.mcpClientId===$&&X.versionNumber===Y)return this.deepCopyVersion(X);return null}async getLatestVersion($){let Y=null;for(let X of this.db.mcpClientVersions.values())if(X.mcpClientId===$){if(!Y||X.versionNumber>Y.versionNumber)Y=X}return Y?this.deepCopyVersion(Y):null}async listVersions($){let{mcpClientId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),K=F4(G,20);if(X<0)throw Error("page must be >= 0");let Z=Number.MAX_SAFE_INTEGER/2;if(X*K>Z)throw Error("page value too large");let H=Array.from(this.db.mcpClientVersions.values()).filter((D)=>D.mcpClientId===Y);H=this.sortVersions(H,Q,W);let z=H.map((D)=>this.deepCopyVersion(D)),V=z.length,{offset:F,perPage:L}=B4(X,G,K);return{versions:z.slice(F,F+K),total:V,page:X,perPage:L,hasMore:F+K<V}}async deleteVersion($){this.db.mcpClientVersions.delete($)}async deleteVersionsByParentId($){let Y=[];for(let[X,G]of this.db.mcpClientVersions.entries())if(G.mcpClientId===$)Y.push(X);for(let X of Y)this.db.mcpClientVersions.delete(X)}async countVersions($){let Y=0;for(let X of this.db.mcpClientVersions.values())if(X.mcpClientId===$)Y++;return Y}deepCopyConfig($){return{...$,metadata:$.metadata?{...$.metadata}:$.metadata}}deepCopyVersion($){return{...$,servers:$.servers?JSON.parse(JSON.stringify($.servers)):$.servers,changedFields:$.changedFields?[...$.changedFields]:$.changedFields}}sortConfigs($,Y,X){return $.sort((G,J)=>{let Q=G[Y].getTime(),W=J[Y].getTime();return X==="ASC"?Q-W:W-Q})}sortVersions($,Y,X){return $.sort((G,J)=>{let Q,W;if(Y==="createdAt")Q=G.createdAt.getTime(),W=J.createdAt.getTime();else Q=G.versionNumber,W=J.versionNumber;return X==="ASC"?Q-W:W-Q})}},e80=class extends uj{helpers;constructor({db:$}){super();this.helpers=new WG({db:$,entitiesFile:"mcp-clients.json",parentIdField:"mcpClientId",name:"FilesystemMCPClientsStorage",versionMetadataFields:["id","mcpClientId","versionNumber","changedFields","changeMessage","createdAt"]})}async init(){await this.helpers.db.init()}async dangerouslyClearAll(){await this.helpers.dangerouslyClearAll()}async getById($){return this.helpers.getById($)}async create($){let{mcpClient:Y}=$,X=new Date,G={id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X};await this.helpers.createEntity(Y.id,G);let{id:J,authorId:Q,metadata:W,...K}=Y,Z=crypto.randomUUID();return await this.createVersion({id:Z,mcpClientId:Y.id,versionNumber:1,...K,changedFields:Object.keys(K),changeMessage:"Initial version"}),structuredClone(G)}async update($){let{id:Y,...X}=$;return this.helpers.updateEntity(Y,X)}async delete($){await this.helpers.deleteEntity($)}async list($){let{page:Y,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W}=$||{};return await this.helpers.listEntities({page:Y,perPage:X,orderBy:G,listKey:"mcpClients",filters:{authorId:J,metadata:Q,status:W}})}async createVersion($){return this.helpers.createVersion($)}async getVersion($){return this.helpers.getVersion($)}async getVersionByNumber($,Y){return this.helpers.getVersionByNumber($,Y)}async getLatestVersion($){return this.helpers.getLatestVersion($)}async listVersions($){return await this.helpers.listVersions($,"mcpClientId")}async deleteVersion($){await this.helpers.deleteVersion($)}async deleteVersionsByParentId($){await this.helpers.deleteVersionsByParentId($)}async countVersions($){return this.helpers.countVersions($)}}});function _x0($){if($.error!=null)return"error";if($.endedAt==null)return"running";return"success"}function dj($){return{...$,status:_x0($)}}function cj($){return $.map(dj)}function vg($,Y,X){let G=$.find((H)=>H.spanId===Y);if(!G)return[];let J=new Map;for(let H of $){if(H.parentSpanId==null)continue;let z=J.get(H.parentSpanId);if(z)z.push(H);else J.set(H.parentSpanId,[H])}let Q=new Set([G.spanId]),W=[],K=[G],Z=0;while(K.length>0){if(X!=null&&Z>=X)break;let H=[];for(let z of K){let V=J.get(z.spanId);if(!V)continue;for(let F of V){if(Q.has(F.spanId))continue;Q.add(F.spanId),W.push(F),H.push(F)}}K=H,Z++}return W.sort((H,z)=>H.startedAt.getTime()-z.startedAt.getTime()),[G,...W]}function sy8($){let Y=$,X=!1;while(!0){let G=hL(Y);if(!G)break;if(G==="ZodNullable"||G==="ZodOptional")X=!0;let J=MI0(Y,G);if(!J)break;Y=J}return{base:Y,nullable:X}}function H44($){if("_zod"in $){let X=$._zod?.def?.checks;if(X&&Array.isArray(X))return X.map((G)=>{if(typeof G==="object"&&G!==null&&"def"in G&&typeof G.def==="object"&&G.def!==null){let J=G.def;if(J.check==="number_format"&&J.format==="safeint")return{kind:"int"};if(J.check==="string_format"&&typeof J.format==="string")return{kind:J.format};return{kind:typeof J.check==="string"?J.check:"unknown"}}return{kind:"unknown"}})}if("_def"in $){let X=$._def?.checks;if(X&&Array.isArray(X))return X}return[]}function oy8($){let Y=hL($);if(Y==="ZodString"){if(H44($).some((G)=>G.kind==="uuid"))return"uuid";return"text"}if(Y==="ZodNativeEnum"||Y==="ZodEnum")return"text";if(Y==="ZodNumber")return H44($).some((G)=>G.kind==="int")?"integer":"float";if(Y==="ZodBigInt"||Y==="ZodBigint")return"bigint";if(Y==="ZodDate")return"timestamp";if(Y==="ZodBoolean")return"boolean";return"jsonb"}function yx0($){let Y=$.shape,X={};for(let[G,J]of Object.entries(Y)){let{base:Q,nullable:W}=sy8(J);X[G]={type:oy8(Q),nullable:W}}return X}var Mx0,Rx0,fy8,Sg,qQ,z44,gy8,V44,my8,F44,L44,uy8,$90,qx0,py8,D44=($)=>Object.fromEntries(Object.keys($).map((Y)=>[Y,!0])),N44,A44,Y90,dy8,cy8,ly8,iy8,B44,O44,E44,M44,VD,Px0,ny8,wx0,pj,R44,ry8,ay8,x3,X90,kg,q44,P44,w44,_44,j44,T44,I44,C44,S44,k44,G90,v44,J90,jx0,x44,Tx0,Ix0,Cx0,lj,y44,b44,Sx0,xg,kx0,vx0,xx0,Q90,h44,W90,f44,g44,m44,u44,p44,d44,c44,l44,L$="mastra_workflow_snapshot",T5="mastra_messages",OX="mastra_threads",bx0="mastra_traces",y3="mastra_resources",D$="mastra_scorers",H6="mastra_ai_spans",N$="mastra_agents",m5="mastra_agent_versions",hx0="mastra_observational_memory",PQ="mastra_prompt_blocks",w7="mastra_prompt_block_versions",wQ="mastra_scorer_definitions",m7="mastra_scorer_definition_versions",JJ="mastra_mcp_clients",u7="mastra_mcp_client_versions",QJ="mastra_mcp_servers",p7="mastra_mcp_server_versions",WJ="mastra_workspaces",d7="mastra_workspace_versions",cY="mastra_skills",_7="mastra_skill_versions",KJ="mastra_skill_blobs",zG="mastra_favorites",D8="mastra_datasets",P8="mastra_dataset_items",lY="mastra_dataset_versions",iY="mastra_experiments",c7="mastra_experiment_results",l7="mastra_background_tasks",EX="mastra_schedules",bZ="mastra_schedule_triggers",VG="mastra_channel_installations",hZ="mastra_channel_config",ij,nj,i44,QE,WE,yg,rj,bg,hg,fg,gg,mg,ug,pg,dg,aj,sj,oj,cg,fx0,lg,tj,ig,ej,$T,F5,n44,r44;var K90=V0(()=>{$f();hz();O1();Mx0=U.enum(["LIVE","TEST"]),Rx0=U.enum(["AGENT","WORKFLOW","TRAJECTORY","STEP",...Object.values(bz)]),fy8=U.object({description:U.string(),prompt:U.string()}),Sg=U.record(U.string(),U.unknown()),qQ=Sg.optional(),z44=U.object({runId:U.string().optional(),input:U.unknown().optional(),output:U.unknown(),additionalContext:qQ,requestContext:qQ}),gy8=U.object({runId:U.string().optional(),scorer:Sg,input:U.unknown(),output:U.unknown(),metadata:qQ,additionalContext:qQ,source:Mx0,entity:Sg,entityType:Rx0,requestContext:qQ,structuredOutput:U.boolean().optional(),traceId:U.string().optional(),spanId:U.string().optional(),resourceId:U.string().optional(),threadId:U.string().optional()}),V44=U.number(),my8=U.object({result:qQ,score:V44,prompt:U.string().optional()}),F44=z44.extend({runId:U.string(),extractStepResult:qQ,extractPrompt:U.string().optional()}),L44=F44.extend({score:U.number(),analyzeStepResult:qQ,analyzePrompt:U.string().optional()}),uy8=L44.extend({reason:U.string().optional(),reasonPrompt:U.string().optional()}),$90=U.object({id:U.string(),scorerId:U.string(),entityId:U.string(),runId:U.string(),input:U.unknown().optional(),output:U.unknown(),additionalContext:qQ,requestContext:qQ,extractStepResult:qQ,extractPrompt:U.string().optional(),score:U.number(),analyzeStepResult:qQ,analyzePrompt:U.string().optional(),reason:U.string().optional(),reasonPrompt:U.string().optional(),scorer:Sg,metadata:qQ,source:Mx0,entity:Sg,entityType:Rx0.optional(),structuredOutput:U.boolean().optional(),traceId:U.string().optional(),spanId:U.string().optional(),resourceId:U.string().optional(),threadId:U.string().optional(),preprocessStepResult:qQ,preprocessPrompt:U.string().optional(),generateScorePrompt:U.string().optional(),generateReasonPrompt:U.string().optional(),...RO}),qx0=$90.omit({id:!0,createdAt:!0,updatedAt:!0}),py8=U.object({pagination:l2,scores:U.array($90)}),N44=U.string().describe("Human-readable span name"),A44=U.string().describe("Parent span reference (null = root span)"),Y90=U.nativeEnum(bz).describe("Span type (e.g., WORKFLOW_RUN, AGENT_RUN, TOOL_CALL, etc.)"),dy8=U.record(U.string(),U.unknown()).describe("Span-type specific attributes (e.g., model, tokens, tools)"),cy8=U.array(U.unknown()).describe("References to related spans in other traces"),ly8=U.unknown().describe("Input data passed to the span"),iy8=U.unknown().describe("Output data returned from the span"),B44=U.unknown().describe("Error info - presence indicates failure (status derived from this)"),O44=U.boolean().describe("Whether this is an event (point-in-time) vs a span (duration)"),E44=U.date().describe("When the span started"),M44=U.date().describe("When the span ended (null = running, status derived from this)"),VD=(($)=>{return $.SUCCESS="success",$.ERROR="error",$.RUNNING="running",$})(VD||{}),Px0=U.nativeEnum(VD).describe("Current status of the trace"),ny8=U.preprocess(($)=>{if($==="true")return!0;if($==="false")return!1;return $},U.boolean()).describe("True if any span in the trace encountered an error"),wx0={...PO,metadata:m_.nullish(),tags:u_.nullish()},pj={traceId:k$,spanId:LQ},R44=U.object({...pj}),ry8=D44(RO),ay8=D44(pj),x3=U.object({...pj,name:N44,spanType:Y90,isEvent:O44,startedAt:E44,parentSpanId:A44.nullish(),...wx0,experimentId:U.string().nullish().describe("Experiment or eval run identifier"),attributes:dy8.nullish(),links:cy8.nullish(),input:ly8.nullish(),output:iy8.nullish(),error:B44.nullish(),endedAt:M44.nullish(),requestContext:U.record(U.string(),U.unknown()).nullish().describe("Request context data"),...RO}).describe("Span record data");X90=x3.extend({status:Px0}).describe("Trace span with computed status (root spans only)");kg=x3.omit(ry8),q44=U.object({span:kg}).describe("Arguments for creating a single span"),P44=U.object({records:U.array(kg)}).describe("Arguments for batch creating spans"),w44=U.object({traceId:k$.min(1),spanId:LQ.min(1)}).describe("Arguments for getting a single span"),_44=U.object({span:x3}),j44=U.object({traceId:k$.min(1),spanIds:U.array(LQ.min(1)).min(1).describe("Span IDs to fetch within the trace")}).describe("Arguments for batch-fetching spans by spanId within a trace"),T44=U.object({traceId:k$,spans:U.array(x3)}),I44=U.object({traceId:k$.min(1)}).describe("Arguments for getting a root span"),C44=U.object({span:x3}),S44=U.object({traceId:k$.min(1)}).describe("Arguments for getting a single trace"),k44=U.object({traceId:k$,spans:U.array(x3)}),G90=U.object({traceId:k$.min(1),spanId:LQ.min(1),depth:U.coerce.number().int().min(0).optional().describe("Maximum descendant levels below the anchor span (omit for full subtree)")}).describe("Arguments for getting a span branch (subtree rooted at a span)"),v44=U.object({traceId:k$,spans:U.array(x3)});J90=U.object({...pj,name:N44,spanType:Y90,isEvent:O44,startedAt:E44,parentSpanId:A44.nullish(),endedAt:M44.nullish(),error:B44.nullish(),entityType:PO.entityType,entityId:PO.entityId,entityName:PO.entityName,...RO}).describe("Lightweight span record for timeline rendering (excludes input, output, attributes, metadata, tags, links)"),jx0=U.object({traceId:k$,spans:U.array(J90)}),x44=jx0,Tx0=U.object({startedAt:lL.optional().describe("Filter by span start time range"),endedAt:lL.optional().describe("Filter by span end time range"),spanType:Y90.optional(),traceId:k$.optional().describe("Filter by trace ID (matches root span)"),...wx0,status:Px0.optional(),hasChildError:ny8.optional()}).describe("Filters for querying traces"),Ix0=U.enum(["startedAt","endedAt"]).describe("Field to order by: 'startedAt' | 'endedAt'"),Cx0=U.object({field:Ix0.default("startedAt").describe("Field to order by"),direction:R3.default("DESC").describe("Sort direction")}).describe("Order by configuration"),lj=U.object({filters:Tx0.optional().describe("Optional filters to apply"),pagination:xz.default({page:0,perPage:10}).describe("Pagination settings"),orderBy:Cx0.default({field:"startedAt",direction:"DESC"}).describe("Ordering configuration (defaults to startedAt desc)")}).describe("Arguments for listing traces"),y44=U.object({pagination:l2,spans:U.array(X90)}),b44=U.object({pagination:l2,spans:U.array(J90)}),Sx0=["agent_run","workflow_run","processor_run","scorer_run","rag_ingestion","tool_call","mcp_tool_call"],xg=new Set(Sx0),kx0=U.object({startedAt:lL.optional().describe("Filter by span start time range"),endedAt:lL.optional().describe("Filter by span end time range"),spanType:Y90.optional(),traceId:k$.optional().describe("Filter by parent trace ID"),...wx0,status:Px0.optional()}).describe("Filters for querying trace branches"),vx0=U.enum(["startedAt","endedAt"]).describe("Field to order by: 'startedAt' | 'endedAt'"),xx0=U.object({field:vx0.default("startedAt").describe("Field to order by"),direction:R3.default("DESC").describe("Sort direction")}).describe("Order by configuration"),Q90=U.object({filters:kx0.optional().describe("Optional filters to apply"),pagination:xz.default({page:0,perPage:10}).describe("Pagination settings"),orderBy:xx0.default({field:"startedAt",direction:"DESC"}).describe("Ordering configuration (defaults to startedAt desc)")}).describe("Arguments for listing trace branches"),h44=U.object({pagination:l2,branches:U.array(X90)}),W90=kg.omit(ay8),f44=U.object({spanId:LQ,traceId:k$,updates:W90.partial()}).describe("Arguments for updating a single span"),g44=U.object({records:U.array(U.object({traceId:k$,spanId:LQ,updates:W90.partial()}))}).describe("Arguments for batch updating spans"),m44=U.object({traceIds:U.array(k$)}).describe("Arguments for batch deleting traces"),u44=U.object({pagination:l2,scores:U.array($90)}),p44=U.object({scorerName:U.string().min(1),targets:U.array(U.object({traceId:k$,spanId:LQ.optional()})).min(1)}),d44=U.object({status:U.string(),message:U.string(),traceCount:U.number()}),c44=["private","public"];l44=["agent","skill"],ij={id:{type:"text",nullable:!1,primaryKey:!0},scorerId:{type:"text"},traceId:{type:"text",nullable:!0},spanId:{type:"text",nullable:!0},runId:{type:"text"},scorer:{type:"jsonb"},preprocessStepResult:{type:"jsonb",nullable:!0},extractStepResult:{type:"jsonb",nullable:!0},analyzeStepResult:{type:"jsonb",nullable:!0},score:{type:"float"},reason:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},preprocessPrompt:{type:"text",nullable:!0},extractPrompt:{type:"text",nullable:!0},generateScorePrompt:{type:"text",nullable:!0},generateReasonPrompt:{type:"text",nullable:!0},analyzePrompt:{type:"text",nullable:!0},reasonPrompt:{type:"text",nullable:!0},input:{type:"jsonb"},output:{type:"jsonb"},additionalContext:{type:"jsonb",nullable:!0},requestContext:{type:"jsonb",nullable:!0},entityType:{type:"text",nullable:!0},entity:{type:"jsonb",nullable:!0},entityId:{type:"text",nullable:!0},source:{type:"text"},resourceId:{type:"text",nullable:!0},threadId:{type:"text",nullable:!0},createdAt:{type:"timestamp"},updatedAt:{type:"timestamp"}},nj=yx0(x3),i44={traceId:{type:"text",nullable:!1},spanId:{type:"text",nullable:!1},parentSpanId:{type:"text",nullable:!0},name:{type:"text",nullable:!1},scope:{type:"jsonb",nullable:!0},spanType:{type:"text",nullable:!1},attributes:{type:"jsonb",nullable:!0},metadata:{type:"jsonb",nullable:!0},links:{type:"jsonb",nullable:!0},input:{type:"jsonb",nullable:!0},output:{type:"jsonb",nullable:!0},error:{type:"jsonb",nullable:!0},startedAt:{type:"timestamp",nullable:!1},endedAt:{type:"timestamp",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!0},isEvent:{type:"boolean",nullable:!1}},QE={id:{type:"text",nullable:!1,primaryKey:!0},status:{type:"text",nullable:!1},activeVersionId:{type:"text",nullable:!0},authorId:{type:"text",nullable:!0},visibility:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},favoriteCount:{type:"integer",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},WE={id:{type:"text",nullable:!1,primaryKey:!0},agentId:{type:"text",nullable:!1},versionNumber:{type:"integer",nullable:!1},name:{type:"text",nullable:!1},description:{type:"text",nullable:!0},instructions:{type:"text",nullable:!1},model:{type:"jsonb",nullable:!1},tools:{type:"jsonb",nullable:!0},defaultOptions:{type:"jsonb",nullable:!0},workflows:{type:"jsonb",nullable:!0},agents:{type:"jsonb",nullable:!0},integrationTools:{type:"jsonb",nullable:!0},inputProcessors:{type:"jsonb",nullable:!0},outputProcessors:{type:"jsonb",nullable:!0},memory:{type:"jsonb",nullable:!0},scorers:{type:"jsonb",nullable:!0},mcpClients:{type:"jsonb",nullable:!0},requestContextSchema:{type:"jsonb",nullable:!0},workspace:{type:"jsonb",nullable:!0},skills:{type:"jsonb",nullable:!0},skillsFormat:{type:"text",nullable:!0},browser:{type:"jsonb",nullable:!0},changedFields:{type:"jsonb",nullable:!0},changeMessage:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1}},yg={id:{type:"text",nullable:!1,primaryKey:!0},status:{type:"text",nullable:!1},activeVersionId:{type:"text",nullable:!0},authorId:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},rj={id:{type:"text",nullable:!1,primaryKey:!0},blockId:{type:"text",nullable:!1},versionNumber:{type:"integer",nullable:!1},name:{type:"text",nullable:!1},description:{type:"text",nullable:!0},content:{type:"text",nullable:!1},rules:{type:"jsonb",nullable:!0},requestContextSchema:{type:"jsonb",nullable:!0},changedFields:{type:"jsonb",nullable:!0},changeMessage:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1}},bg={id:{type:"text",nullable:!1,primaryKey:!0},status:{type:"text",nullable:!1},activeVersionId:{type:"text",nullable:!0},authorId:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},hg={id:{type:"text",nullable:!1,primaryKey:!0},scorerDefinitionId:{type:"text",nullable:!1},versionNumber:{type:"integer",nullable:!1},name:{type:"text",nullable:!1},description:{type:"text",nullable:!0},type:{type:"text",nullable:!1},model:{type:"jsonb",nullable:!0},instructions:{type:"text",nullable:!0},scoreRange:{type:"jsonb",nullable:!0},presetConfig:{type:"jsonb",nullable:!0},defaultSampling:{type:"jsonb",nullable:!0},changedFields:{type:"jsonb",nullable:!0},changeMessage:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1}},fg={id:{type:"text",nullable:!1,primaryKey:!0},status:{type:"text",nullable:!1},activeVersionId:{type:"text",nullable:!0},authorId:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},gg={id:{type:"text",nullable:!1,primaryKey:!0},mcpClientId:{type:"text",nullable:!1},versionNumber:{type:"integer",nullable:!1},name:{type:"text",nullable:!1},description:{type:"text",nullable:!0},servers:{type:"jsonb",nullable:!1},changedFields:{type:"jsonb",nullable:!0},changeMessage:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1}},mg={id:{type:"text",nullable:!1,primaryKey:!0},status:{type:"text",nullable:!1},activeVersionId:{type:"text",nullable:!0},authorId:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},ug={id:{type:"text",nullable:!1,primaryKey:!0},mcpServerId:{type:"text",nullable:!1},versionNumber:{type:"integer",nullable:!1},name:{type:"text",nullable:!1},version:{type:"text",nullable:!1},description:{type:"text",nullable:!0},instructions:{type:"text",nullable:!0},repository:{type:"jsonb",nullable:!0},releaseDate:{type:"text",nullable:!0},isLatest:{type:"boolean",nullable:!0},packageCanonical:{type:"text",nullable:!0},tools:{type:"jsonb",nullable:!0},agents:{type:"jsonb",nullable:!0},workflows:{type:"jsonb",nullable:!0},changedFields:{type:"jsonb",nullable:!0},changeMessage:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1}},pg={id:{type:"text",nullable:!1,primaryKey:!0},status:{type:"text",nullable:!1},activeVersionId:{type:"text",nullable:!0},authorId:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},dg={id:{type:"text",nullable:!1,primaryKey:!0},workspaceId:{type:"text",nullable:!1},versionNumber:{type:"integer",nullable:!1},name:{type:"text",nullable:!1},description:{type:"text",nullable:!0},filesystem:{type:"jsonb",nullable:!0},sandbox:{type:"jsonb",nullable:!0},mounts:{type:"jsonb",nullable:!0},search:{type:"jsonb",nullable:!0},skills:{type:"jsonb",nullable:!0},tools:{type:"jsonb",nullable:!0},autoSync:{type:"boolean",nullable:!0},operationTimeout:{type:"integer",nullable:!0},changedFields:{type:"jsonb",nullable:!0},changeMessage:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1}},aj={id:{type:"text",nullable:!1,primaryKey:!0},status:{type:"text",nullable:!1},activeVersionId:{type:"text",nullable:!0},authorId:{type:"text",nullable:!0},visibility:{type:"text",nullable:!0},favoriteCount:{type:"integer",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},sj={userId:{type:"text",nullable:!1},entityType:{type:"text",nullable:!1},entityId:{type:"text",nullable:!1},createdAt:{type:"timestamp",nullable:!1}},oj={id:{type:"text",nullable:!1,primaryKey:!0},skillId:{type:"text",nullable:!1},versionNumber:{type:"integer",nullable:!1},name:{type:"text",nullable:!1},description:{type:"text",nullable:!1},instructions:{type:"text",nullable:!1},license:{type:"text",nullable:!0},compatibility:{type:"jsonb",nullable:!0},source:{type:"jsonb",nullable:!0},references:{type:"jsonb",nullable:!0},scripts:{type:"jsonb",nullable:!0},assets:{type:"jsonb",nullable:!0},files:{type:"jsonb",nullable:!0},metadata:{type:"jsonb",nullable:!0},tree:{type:"jsonb",nullable:!0},changedFields:{type:"jsonb",nullable:!0},changeMessage:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1}},cg={hash:{type:"text",nullable:!1,primaryKey:!0},content:{type:"text",nullable:!1},size:{type:"integer",nullable:!1},mimeType:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1}},fx0={id:{type:"text",nullable:!1,primaryKey:!0},lookupKey:{type:"text",nullable:!1},scope:{type:"text",nullable:!1},resourceId:{type:"text",nullable:!0},threadId:{type:"text",nullable:!0},activeObservations:{type:"text",nullable:!1},activeObservationsPendingUpdate:{type:"text",nullable:!0},originType:{type:"text",nullable:!1},config:{type:"text",nullable:!1},generationCount:{type:"integer",nullable:!1},lastObservedAt:{type:"timestamp",nullable:!0},lastReflectionAt:{type:"timestamp",nullable:!0},pendingMessageTokens:{type:"integer",nullable:!1},totalTokensObserved:{type:"integer",nullable:!1},observationTokenCount:{type:"integer",nullable:!1},isObserving:{type:"boolean",nullable:!1},isReflecting:{type:"boolean",nullable:!1},observedMessageIds:{type:"jsonb",nullable:!0},observedTimezone:{type:"text",nullable:!0},bufferedObservations:{type:"text",nullable:!0},bufferedObservationTokens:{type:"integer",nullable:!0},bufferedMessageIds:{type:"jsonb",nullable:!0},bufferedReflection:{type:"text",nullable:!0},bufferedReflectionTokens:{type:"integer",nullable:!0},bufferedReflectionInputTokens:{type:"integer",nullable:!0},reflectedObservationLineCount:{type:"integer",nullable:!0},bufferedObservationChunks:{type:"jsonb",nullable:!0},isBufferingObservation:{type:"boolean",nullable:!1},isBufferingReflection:{type:"boolean",nullable:!1},lastBufferedAtTokens:{type:"integer",nullable:!1},lastBufferedAtTime:{type:"timestamp",nullable:!0},metadata:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},lg={id:{type:"text",nullable:!1,primaryKey:!0},name:{type:"text",nullable:!1},description:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},inputSchema:{type:"jsonb",nullable:!0},groundTruthSchema:{type:"jsonb",nullable:!0},requestContextSchema:{type:"jsonb",nullable:!0},tags:{type:"jsonb",nullable:!0},targetType:{type:"text",nullable:!0},targetIds:{type:"jsonb",nullable:!0},scorerIds:{type:"jsonb",nullable:!0},version:{type:"integer",nullable:!1},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},tj={id:{type:"text",nullable:!1},datasetId:{type:"text",nullable:!1,references:{table:"mastra_datasets",column:"id"}},datasetVersion:{type:"integer",nullable:!1},validTo:{type:"integer",nullable:!0},isDeleted:{type:"boolean",nullable:!1},input:{type:"jsonb",nullable:!1},groundTruth:{type:"jsonb",nullable:!0},requestContext:{type:"jsonb",nullable:!0},metadata:{type:"jsonb",nullable:!0},source:{type:"jsonb",nullable:!0},expectedTrajectory:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},ig={id:{type:"text",nullable:!1,primaryKey:!0},datasetId:{type:"text",nullable:!1,references:{table:"mastra_datasets",column:"id"}},version:{type:"integer",nullable:!1},createdAt:{type:"timestamp",nullable:!1}},ej={id:{type:"text",nullable:!1,primaryKey:!0},name:{type:"text",nullable:!0},description:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},datasetId:{type:"text",nullable:!0,references:{table:"mastra_datasets",column:"id"}},datasetVersion:{type:"integer",nullable:!0},targetType:{type:"text",nullable:!1},targetId:{type:"text",nullable:!1},status:{type:"text",nullable:!1},totalItems:{type:"integer",nullable:!1},succeededCount:{type:"integer",nullable:!1},failedCount:{type:"integer",nullable:!1},skippedCount:{type:"integer",nullable:!1},startedAt:{type:"timestamp",nullable:!0},completedAt:{type:"timestamp",nullable:!0},agentVersion:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},$T={id:{type:"text",nullable:!1,primaryKey:!0},experimentId:{type:"text",nullable:!1,references:{table:"mastra_experiments",column:"id"}},itemId:{type:"text",nullable:!1,references:{table:"mastra_dataset_items",column:"id"}},itemDatasetVersion:{type:"integer",nullable:!0},input:{type:"jsonb",nullable:!1},output:{type:"jsonb",nullable:!0},groundTruth:{type:"jsonb",nullable:!0},error:{type:"jsonb",nullable:!0},startedAt:{type:"timestamp",nullable:!1},completedAt:{type:"timestamp",nullable:!1},retryCount:{type:"integer",nullable:!1},traceId:{type:"text",nullable:!0},status:{type:"text",nullable:!0},tags:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1}},F5={[L$]:{workflow_name:{type:"text"},run_id:{type:"text"},resourceId:{type:"text",nullable:!0},snapshot:{type:"jsonb"},createdAt:{type:"timestamp"},updatedAt:{type:"timestamp"}},[D$]:ij,[OX]:{id:{type:"text",nullable:!1,primaryKey:!0},resourceId:{type:"text",nullable:!1},title:{type:"text",nullable:!1},metadata:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},[T5]:{id:{type:"text",nullable:!1,primaryKey:!0},thread_id:{type:"text",nullable:!1},content:{type:"text",nullable:!1},role:{type:"text",nullable:!1},type:{type:"text",nullable:!1},createdAt:{type:"timestamp",nullable:!1},resourceId:{type:"text",nullable:!0}},[H6]:nj,[bx0]:{id:{type:"text",nullable:!1,primaryKey:!0},parentSpanId:{type:"text",nullable:!0},name:{type:"text",nullable:!1},traceId:{type:"text",nullable:!1},scope:{type:"text",nullable:!1},kind:{type:"integer",nullable:!1},attributes:{type:"jsonb",nullable:!0},status:{type:"jsonb",nullable:!0},events:{type:"jsonb",nullable:!0},links:{type:"jsonb",nullable:!0},other:{type:"text",nullable:!0},startTime:{type:"bigint",nullable:!1},endTime:{type:"bigint",nullable:!1},createdAt:{type:"timestamp",nullable:!1}},[y3]:{id:{type:"text",nullable:!1,primaryKey:!0},workingMemory:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},[N$]:QE,[m5]:WE,[PQ]:yg,[w7]:rj,[wQ]:bg,[m7]:hg,[JJ]:fg,[u7]:gg,[QJ]:mg,[p7]:ug,[WJ]:pg,[d7]:dg,[cY]:aj,[_7]:oj,[KJ]:cg,[D8]:lg,[P8]:tj,[lY]:ig,[iY]:ej,[c7]:$T,[zG]:sj,[l7]:{id:{type:"text",nullable:!1,primaryKey:!0},tool_call_id:{type:"text",nullable:!1},tool_name:{type:"text",nullable:!1},agent_id:{type:"text",nullable:!1},run_id:{type:"text",nullable:!1},thread_id:{type:"text",nullable:!0},resource_id:{type:"text",nullable:!0},status:{type:"text",nullable:!1},args:{type:"jsonb",nullable:!1},result:{type:"jsonb",nullable:!0},error:{type:"jsonb",nullable:!0},suspend_payload:{type:"jsonb",nullable:!0},retry_count:{type:"integer",nullable:!1},max_retries:{type:"integer",nullable:!1},timeout_ms:{type:"integer",nullable:!1},createdAt:{type:"timestamp",nullable:!1},startedAt:{type:"timestamp",nullable:!0},suspendedAt:{type:"timestamp",nullable:!0},completedAt:{type:"timestamp",nullable:!0}},[EX]:{id:{type:"text",nullable:!1,primaryKey:!0},target:{type:"jsonb",nullable:!1},cron:{type:"text",nullable:!1},timezone:{type:"text",nullable:!0},status:{type:"text",nullable:!1},next_fire_at:{type:"bigint",nullable:!1},last_fire_at:{type:"bigint",nullable:!0},last_run_id:{type:"text",nullable:!0},created_at:{type:"bigint",nullable:!1},updated_at:{type:"bigint",nullable:!1},metadata:{type:"jsonb",nullable:!0},owner_type:{type:"text",nullable:!0},owner_id:{type:"text",nullable:!0}},[bZ]:{id:{type:"text",nullable:!1,primaryKey:!0},schedule_id:{type:"text",nullable:!1},run_id:{type:"text",nullable:!0},scheduled_fire_at:{type:"bigint",nullable:!1},actual_fire_at:{type:"bigint",nullable:!1},outcome:{type:"text",nullable:!1},error:{type:"text",nullable:!0},trigger_kind:{type:"text",nullable:!1},parent_trigger_id:{type:"text",nullable:!0},metadata:{type:"jsonb",nullable:!0}},[VG]:{id:{type:"text",nullable:!1,primaryKey:!0},platform:{type:"text",nullable:!1},agentId:{type:"text",nullable:!1},status:{type:"text",nullable:!1},webhookId:{type:"text",nullable:!0},data:{type:"jsonb",nullable:!1},configHash:{type:"text",nullable:!0},error:{type:"text",nullable:!0},createdAt:{type:"timestamp",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}},[hZ]:{platform:{type:"text",nullable:!1,primaryKey:!0},data:{type:"jsonb",nullable:!1},updatedAt:{type:"timestamp",nullable:!1}}},n44={[P8]:{columns:tj,compositePrimaryKey:["id","datasetVersion"]},[zG]:{columns:sj,compositePrimaryKey:["userId","entityType","entityId"]}},r44={[hx0]:fx0}});import{randomUUID as ty8}from"crypto";import{join as ng,dirname as a44,resolve as px0,sep as gx0,relative as ey8}from"path";import{existsSync as FD,mkdirSync as Z90,readFileSync as s44,writeFileSync as o44,renameSync as $b8,rmSync as Yb8,readdirSync as Xb8,statSync as Gb8}from"fs";function N8($){if($&&typeof $==="object")return $;if($==null)return{};if(typeof $==="string")try{return JSON.parse($)}catch{return $}return{}}function cx0($,Y,X={}){let{preferredTimestampFields:G={},convertTimestamps:J=!1,nullValuePattern:Q,fieldMappings:W={}}=X,K=F5[Y],Z={};for(let[H,z]of Object.entries(K)){let V=W[H]??H,F=$[V];if(G[H])F=$[G[H]]??F;if(F===void 0||F===null)continue;if(Q&&F===Q)continue;if(z.type==="jsonb")if(typeof F==="string")Z[H]=N8(F);else if(typeof F==="object")Z[H]=F;else Z[H]=F;else if(z.type==="timestamp"&&J&&typeof F==="string")Z[H]=new Date(F);else Z[H]=F}return Z}function V90($,Y={}){return cx0($,D$,Y)}function mx0($){return $.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toUpperCase().replace(/[^A-Z0-9]+/g,"_").replace(/^_+|_+$/g,"")}function F90($,Y,X,G){let J=mx0(Y),Q=mx0(X),W=mx0(G);return`MASTRA_${$==="storage"?"STORAGE":"VECTOR"}_${J}_${Q}_${W}`}function w0($,Y,X){return F90("storage",$,Y,X)}function lx0($,Y,X){return F90("vector",$,Y,X)}function L90($){switch($){case"text":return"TEXT";case"timestamp":return"TIMESTAMP";case"float":return"FLOAT";case"integer":return"INTEGER";case"bigint":return"BIGINT";case"jsonb":return"JSONB";case"boolean":return"BOOLEAN";default:return"TEXT"}}function $64($){switch($){case"text":case"uuid":return"DEFAULT ''";case"timestamp":return"DEFAULT '1970-01-01 00:00:00'";case"integer":case"bigint":case"float":return"DEFAULT 0";case"jsonb":return"DEFAULT '{}'";case"boolean":return"DEFAULT FALSE";default:return"DEFAULT ''"}}function i7($){if(!$)return;return $ instanceof Date?$:new Date($)}function Y64($){if(!$)return;return i7($)?.toISOString()}function z90($,Y,X){if(!X)return $;let G=$;if(X.start){let J=i7(X.start).getTime();G=G.filter((Q)=>{let W=Y(Q).getTime();return X.startExclusive?W>J:W>=J})}if(X.end){let J=i7(X.end).getTime();G=G.filter((Q)=>{let W=Y(Q).getTime();return X.endExclusive?W<J:W<=J})}return G}function $V($,Y){if($===void 0||Y===void 0)return $===Y;if($===null||Y===null)return $===Y;if(typeof $!==typeof Y)return!1;if($ instanceof Date&&Y instanceof Date)return $.getTime()===Y.getTime();if($ instanceof Date||Y instanceof Date)return!1;if(typeof $==="object"){if(Array.isArray($)&&Array.isArray(Y)){if($.length!==Y.length)return!1;return $.every((J,Q)=>$V(J,Y[Q]))}if(Array.isArray($)||Array.isArray(Y))return!1;let X=Object.keys($),G=Object.keys(Y);if(X.length!==G.length)return!1;return X.every((J)=>$V($[J],Y[J]))}return $===Y}function ZE($){if($&&Jb8.has($))return $;return null}function u5($){return typeof $==="string"?$:null}function nx0($){return $!==null&&typeof $==="object"&&!Array.isArray($)?$:null}function D90($){if(!$.attributes)return null;try{return JSON.parse(JSON.stringify($.attributes,(Y,X)=>{if(X instanceof Date)return X.toISOString();return X}))}catch{return null}}function N90($){return{tags:$?.tags??null,entityType:$?.entityType??null,entityId:$?.entityId??null,entityName:$?.entityName??null,entityVersionId:$?.entityVersionId??null,parentEntityType:$?.parentEntityType??null,parentEntityId:$?.parentEntityId??null,parentEntityName:$?.parentEntityName??null,parentEntityVersionId:$?.parentEntityVersionId??null,rootEntityType:$?.rootEntityType??null,rootEntityId:$?.rootEntityId??null,rootEntityName:$?.rootEntityName??null,rootEntityVersionId:$?.rootEntityVersionId??null,userId:$?.userId??null,organizationId:$?.organizationId??null,resourceId:$?.resourceId??null,runId:$?.runId??null,sessionId:$?.sessionId??null,threadId:$?.threadId??null,requestId:$?.requestId??null,environment:$?.environment??null,executionSource:$?.source??null,serviceName:$?.serviceName??null,experimentId:$?.experimentId??null}}function Qb8($){return{entityType:ZE($.entity_type),entityName:u5($.entity_name),parentEntityType:ZE($.parent_type),parentEntityName:u5($.parent_name),serviceName:u5($.service_name)}}function Wb8($){let Y={...$};return delete Y.entity_type,delete Y.entity_name,delete Y.parent_type,delete Y.parent_name,delete Y.service_name,Y}function Kb8($){return{entityType:ZE(u5($?.entity_type)??void 0),entityName:u5($?.entity_name),parentEntityType:ZE(u5($?.parent_type)??void 0),parentEntityName:u5($?.parent_name),rootEntityType:ZE(u5($?.root_type)??void 0),rootEntityName:u5($?.root_name),environment:u5($?.environment),executionSource:u5($?.source),serviceName:u5($?.service_name)}}function X64($){let Y=$.metadata??{};return{traceId:$.traceId,spanId:$.id,parentSpanId:$.parentSpanId??null,name:$.name,entityType:$.entityType??null,entityId:$.entityId??null,entityName:$.entityName??null,entityVersionId:u5(Y.entityVersionId),userId:u5(Y.userId),organizationId:u5(Y.organizationId),resourceId:u5(Y.resourceId),runId:u5(Y.runId),sessionId:u5(Y.sessionId),threadId:u5(Y.threadId),requestId:u5(Y.requestId),environment:u5(Y.environment),source:u5(Y.source),serviceName:u5(Y.serviceName),scope:nx0(Y.scope),experimentId:u5(Y.experimentId),spanType:$.type,attributes:D90($),metadata:$.metadata??null,tags:$.tags??null,links:null,input:$.input??null,output:$.output??null,error:$.errorInfo??null,isEvent:$.isEvent,requestContext:$.requestContext??null,startedAt:$.startTime,endedAt:$.endTime??null}}function G64($){return{name:$.name,scope:null,attributes:D90($),metadata:$.metadata??null,links:null,endedAt:$.endTime??null,input:$.input,output:$.output,error:$.errorInfo??null}}function J64($){let Y=$.metric,X=Wb8(Y.labels),G=N90(Y.correlationContext),J=Qb8(Y.labels),Q=Y.costContext;return{metricId:Y.metricId,timestamp:Y.timestamp,name:Y.name,value:Y.value,labels:X,traceId:Y.traceId??Y.correlationContext?.traceId??null,spanId:Y.spanId??Y.correlationContext?.spanId??null,...G,scope:null,entityType:G.entityType??J.entityType??null,entityName:G.entityName??J.entityName??null,parentEntityType:G.parentEntityType??J.parentEntityType??null,parentEntityName:G.parentEntityName??J.parentEntityName??null,serviceName:G.serviceName??J.serviceName??null,provider:Q?.provider??null,model:Q?.model??null,estimatedCost:Q?.estimatedCost??null,costUnit:Q?.costUnit??null,costMetadata:Q?.costMetadata??null,metadata:Y.metadata??null}}function Q64($){let Y=$.log,X=N90(Y.correlationContext),G=Kb8(Y.metadata??null);return{logId:Y.logId,timestamp:Y.timestamp,level:Y.level,message:Y.message,data:Y.data??null,...X,traceId:Y.traceId??Y.correlationContext?.traceId??null,spanId:Y.spanId??Y.correlationContext?.spanId??null,tags:X.tags??Y.tags??null,entityType:X.entityType??G.entityType??null,entityName:X.entityName??G.entityName??null,parentEntityType:X.parentEntityType??G.parentEntityType??null,parentEntityName:X.parentEntityName??G.parentEntityName??null,rootEntityType:X.rootEntityType??G.rootEntityType??null,rootEntityName:X.rootEntityName??G.rootEntityName??null,environment:X.environment??G.environment??null,executionSource:X.executionSource??G.executionSource??null,serviceName:X.serviceName??G.serviceName??null,scope:null,metadata:Y.metadata??null}}function W64($){let Y=$.score,X=N90(Y.correlationContext);return{scoreId:Y.scoreId,timestamp:Y.timestamp,traceId:Y.traceId??Y.correlationContext?.traceId??null,spanId:Y.spanId??Y.correlationContext?.spanId??null,scorerId:Y.scorerId,scorerName:Y.scorerName??null,scorerVersion:Y.scorerVersion??null,scoreSource:Y.scoreSource??Y.source??null,source:Y.scoreSource??Y.source??null,score:Y.score,reason:Y.reason??null,...X,entityType:X.entityType??Y.targetEntityType??null,experimentId:X.experimentId??Y.experimentId??null,scope:null,scoreTraceId:Y.scoreTraceId??null,metadata:Y.metadata??null}}function K64($){let Y=$.feedback,X=N90(Y.correlationContext);return{feedbackId:Y.feedbackId,timestamp:Y.timestamp,traceId:Y.traceId??Y.correlationContext?.traceId??null,spanId:Y.spanId??Y.correlationContext?.spanId??null,feedbackSource:Y.feedbackSource??Y.source??"",source:Y.feedbackSource??Y.source??"",feedbackType:Y.feedbackType,value:Y.value,comment:Y.comment??null,...X,experimentId:X.experimentId??Y.experimentId??null,feedbackUserId:Y.feedbackUserId??Y.userId??(typeof Y.metadata?.userId==="string"?Y.metadata.userId:null),scope:null,sourceId:Y.sourceId??null,metadata:Y.metadata??null}}function Hb8($){return Function("z",`"use strict";return (${$});`)(U)}function U90(){if(!ux0)ux0=new zb8;return ux0}function KE($){return{id:$.id,datasetId:$.datasetId,datasetVersion:$.datasetVersion,input:$.input,groundTruth:$.groundTruth,expectedTrajectory:$.expectedTrajectory,requestContext:$.requestContext,metadata:$.metadata,source:$.source,createdAt:$.createdAt,updatedAt:$.updatedAt}}function H90($){return{...$,inputSchema:$.inputSchema??void 0,groundTruthSchema:$.groundTruthSchema??void 0,requestContextSchema:$.requestContextSchema??void 0}}function t44($){return typeof $==="object"&&$!==null&&!Array.isArray($)}function ez($){return $==null?$:JSON.parse(JSON.stringify($))}function K04(){return{[dx0]:!0}}function Nb8($){return $!==null&&typeof $==="object"&&dx0 in $&&$[dx0]===!0}function Ab8($,Y){if(typeof Y==="string"&&/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(Y)){let X=new Date(Y);if(!isNaN(X.getTime()))return X}return Y}function U64($){let Y=[];for(let X of Xb8($)){let G=ng($,X);if(Gb8(G).isDirectory())Y.push(...U64(G));else Y.push(G)}return Y}var rg,ix0,Jb8,ag,rx0,sg,ax0,og,sx0,Zb8,Ub8,zb8=class{cache=new Map;getValidator($,Y){let X=this.cache.get(Y);if(!X){let G=L80($);X=Hb8(G),this.cache.set(Y,X)}return X}clearCache($){this.cache.delete($)}validate($,Y,X,G){let Q=this.getValidator(Y,G).safeParse($);if(!Q.success)throw new Zb8(X,this.formatErrors(Q.error))}validateBatch($,Y,X,G,J=10){let Q={valid:[],invalid:[]},W=Y?this.getValidator(Y,`${G}:input`):null,K=X?this.getValidator(X,`${G}:output`):null;for(let[Z,H]of $.entries()){let z=!1;if(W){let V=W.safeParse(H.input);if(!V.success){if(Q.invalid.push({index:Z,data:H,field:"input",errors:this.formatErrors(V.error)}),z=!0,Q.invalid.length>=J)break}}if(!z&&K&&H.groundTruth!==void 0){let V=K.safeParse(H.groundTruth);if(!V.success){if(Q.invalid.push({index:Z,data:H,field:"groundTruth",errors:this.formatErrors(V.error)}),z=!0,Q.invalid.length>=J)break}}if(!z)Q.valid.push({index:Z,data:H})}return Q}formatErrors($){return $.issues.slice(0,5).map((Y)=>({path:Y.path.length>0?"/"+Y.path.join("/"):"/",code:Y.code,message:Y.message}))}},ux0=null,tg,ox0,eg,tx0,ex0=class{threads=new Map;messages=new Map;resources=new Map;workflows=new Map;scores=new Map;traces=new Map;metricRecords=[];logRecords=[];scoreRecords=[];feedbackRecords=[];agents=new Map;agentVersions=new Map;promptBlocks=new Map;promptBlockVersions=new Map;scorerDefinitions=new Map;scorerDefinitionVersions=new Map;mcpClients=new Map;mcpClientVersions=new Map;mcpServers=new Map;mcpServerVersions=new Map;workspaces=new Map;workspaceVersions=new Map;skills=new Map;skillVersions=new Map;favorites=new Map;observationalMemory=new Map;datasets=new Map;datasetItems=new Map;datasetVersions=new Map;experiments=new Map;experimentResults=new Map;backgroundTasks=new Map;schedules=new Map;scheduleTriggers=[];clear(){this.threads.clear(),this.messages.clear(),this.resources.clear(),this.workflows.clear(),this.scores.clear(),this.traces.clear(),this.metricRecords.length=0,this.logRecords.length=0,this.scoreRecords.length=0,this.feedbackRecords.length=0,this.agents.clear(),this.agentVersions.clear(),this.promptBlocks.clear(),this.promptBlockVersions.clear(),this.scorerDefinitions.clear(),this.scorerDefinitionVersions.clear(),this.mcpClients.clear(),this.mcpClientVersions.clear(),this.mcpServers.clear(),this.mcpServerVersions.clear(),this.workspaces.clear(),this.workspaceVersions.clear(),this.skills.clear(),this.skillVersions.clear(),this.favorites.clear(),this.observationalMemory.clear(),this.datasets.clear(),this.datasetItems.clear(),this.datasetVersions.clear(),this.experiments.clear(),this.experimentResults.clear(),this.backgroundTasks.clear(),this.schedules.clear(),this.scheduleTriggers.length=0}},Vb8,e44=128,Fb8,$m,Lb8,Db8,$y0,Ym,Yy0,Xm,Xy0,dx0="__mastra_pending__",Gm,Gy0,Jy0,Z64,Qy0=class{dir;cache=new Map;initialized=!1;constructor($){this.dir=$}async init(){if(this.initialized)return;this.ensureDir(),this.initialized=!0}ensureDir(){if(!FD(this.dir))Z90(this.dir,{recursive:!0});let $=ng(this.dir,"skills");if(!FD($))Z90($,{recursive:!0})}readDomain($){if(this.cache.has($))return this.cache.get($);let Y=ng(this.dir,$),X={};if(FD(Y))try{let G=s44(Y,"utf-8");X=JSON.parse(G,Ab8)}catch{X={}}return this.cache.set($,X),X}writeDomain($,Y){this.cache.set($,Y);let X=ng(this.dir,$),G=X+".tmp",J=a44(X);if(!FD(J))Z90(J,{recursive:!0});o44(G,JSON.stringify(Y,null,2),"utf-8"),$b8(G,X)}clearDomain($){this.writeDomain($,{})}invalidateCache($){if($)this.cache.delete($);else this.cache.clear()}get($,Y){return this.readDomain($)[Y]??null}getAll($){let Y=this.readDomain($);return Object.values(Y)}set($,Y,X){let G=this.readDomain($);G[Y]=X,this.writeDomain($,G)}remove($,Y){let X=this.readDomain($);if(Y in X)delete X[Y],this.writeDomain($,X)}skillDir($){let Y=ng(this.dir,"skills"),X=px0(Y,$);if(!X.startsWith(Y+gx0)&&X!==Y)throw Error(`Path traversal detected: skill name "${$}" escapes skills directory`);return X}safeSkillPath($,Y){let X=this.skillDir($),G=px0(X,Y);if(!G.startsWith(X+gx0)&&G!==X)throw Error(`Path traversal detected: "${Y}" escapes skill directory`);return G}listSkillFiles($){let Y=this.skillDir($);if(!FD(Y))return[];return U64(Y).map((X)=>ey8(Y,X).split(gx0).join("/"))}readSkillFile($,Y){let X=this.safeSkillPath($,Y);if(!FD(X))return null;try{return s44(X)}catch{return null}}writeSkillFile($,Y,X){let G=this.safeSkillPath($,Y),J=a44(G);if(!FD(J))Z90(J,{recursive:!0});o44(G,X)}deleteSkillDir($){let Y=this.skillDir($);if(FD(Y))Yb8(Y,{recursive:!0,force:!0})}},H64,Wy0,z64;var Fv0=V0(()=>{Fx0();Lx0();Dx0();Nx0();Ax0();Bx0();Ox0();Ex0();O3();K90();hz();p2();$g();OW();Cv0();O1();rg=class $ extends qW{constructor(){super({component:"STORAGE",name:"OBSERVABILITY"})}async dangerouslyClearAll(){}get observabilityStrategy(){return{preferred:"batch-with-updates",supported:["realtime","batch-with-updates","insert-only"]}}get tracingStrategy(){return this.observabilityStrategy}get runtimeTracingStrategy(){let Y=this.observabilityStrategy.supported;return Y.length===1?Y[0]:void 0}async createSpan(Y){throw new G0({id:"OBSERVABILITY_CREATE_SPAN_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support creating spans"})}async updateSpan(Y){throw new G0({id:"OBSERVABILITY_STORAGE_UPDATE_SPAN_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support updating spans"})}async getSpan(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_SPAN_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support getting spans"})}async getRootSpan(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_ROOT_SPAN_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support getting root spans"})}async getTrace(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_TRACE_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support getting traces"})}async getStructure(Y){if(this.getTraceLight===$.prototype.getTraceLight)throw new G0({id:"OBSERVABILITY_STORAGE_GET_STRUCTURE_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support getting trace structure"});return this.getTraceLight(Y)}async getTraceLight(Y){if(this.getStructure===$.prototype.getStructure)throw new G0({id:"OBSERVABILITY_STORAGE_GET_TRACE_LIGHT_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support getting lightweight traces"});return this.getStructure(Y)}async getBranch(Y){let X=G90.parse(Y);try{let Q=await this.getStructure({traceId:X.traceId});if(!Q)return null;let W=vg(Q.spans,X.spanId,X.depth).map((Z)=>Z.spanId);if(W.length===0)return null;let{spans:K}=await this.getSpans({traceId:X.traceId,spanIds:W});if(K.length===0)return null;return K.sort((Z,H)=>Z.startedAt.getTime()-H.startedAt.getTime()),{traceId:X.traceId,spans:K}}catch(Q){if(!(Q instanceof G0&&(Q.id==="OBSERVABILITY_STORAGE_GET_STRUCTURE_NOT_IMPLEMENTED"||Q.id==="OBSERVABILITY_STORAGE_GET_TRACE_LIGHT_NOT_IMPLEMENTED"||Q.id==="OBSERVABILITY_STORAGE_GET_SPANS_NOT_IMPLEMENTED")))throw Q}let G=await this.getTrace({traceId:X.traceId});if(!G)return null;let J=vg(G.spans,X.spanId,X.depth);if(J.length===0)return null;return{traceId:X.traceId,spans:J}}async getSpans(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_SPANS_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support batch-fetching spans"})}async listTraces(Y){throw new G0({id:"OBSERVABILITY_STORAGE_LIST_TRACES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support listing traces"})}async listTracesLight(Y){throw new G0({id:"OBSERVABILITY_STORAGE_LIST_TRACES_LIGHT_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support listing lightweight traces"})}async listBranches(Y){throw new G0({id:"OBSERVABILITY_STORAGE_LIST_BRANCHES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support listing trace branches"})}async batchCreateSpans(Y){throw new G0({id:"OBSERVABILITY_STORAGE_BATCH_CREATE_SPAN_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support batch creating spans"})}async batchUpdateSpans(Y){throw new G0({id:"OBSERVABILITY_STORAGE_BATCH_UPDATE_SPANS_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support batch updating spans"})}async batchDeleteTraces(Y){throw new G0({id:"OBSERVABILITY_STORAGE_BATCH_DELETE_TRACES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support batch deleting traces"})}async batchCreateLogs(Y){throw new G0({id:"OBSERVABILITY_STORAGE_BATCH_CREATE_LOGS_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support batch creating logs"})}async listLogs(Y){throw new G0({id:"OBSERVABILITY_STORAGE_LIST_LOGS_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support listing logs"})}async batchCreateMetrics(Y){throw new G0({id:"OBSERVABILITY_STORAGE_BATCH_CREATE_METRICS_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support batch creating metrics"})}async listMetrics(Y){throw new G0({id:"OBSERVABILITY_STORAGE_LIST_METRICS_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support listing metrics"})}async getMetricAggregate(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_METRIC_AGGREGATE_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support metric aggregation"})}async getMetricBreakdown(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_METRIC_BREAKDOWN_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support metric breakdown"})}async getMetricTimeSeries(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_METRIC_TIME_SERIES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support metric time series"})}async getMetricPercentiles(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_METRIC_PERCENTILES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support metric percentiles"})}async getMetricNames(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_METRIC_NAMES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support metric name discovery"})}async getMetricLabelKeys(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_METRIC_LABEL_KEYS_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support metric label key discovery"})}async getMetricLabelValues(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_LABEL_VALUES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support label value discovery"})}async getEntityTypes(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_ENTITY_TYPES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support entity type discovery"})}async getEntityNames(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_ENTITY_NAMES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support entity name discovery"})}async getServiceNames(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_SERVICE_NAMES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support service name discovery"})}async getEnvironments(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_ENVIRONMENTS_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support environment discovery"})}async getTags(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_TAGS_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support tag discovery"})}async createScore(Y){throw new G0({id:"OBSERVABILITY_STORAGE_CREATE_SCORE_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support creating scores"})}async batchCreateScores(Y){throw new G0({id:"OBSERVABILITY_STORAGE_BATCH_CREATE_SCORES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support batch creating scores"})}async listScores(Y){throw new G0({id:"OBSERVABILITY_STORAGE_LIST_SCORES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support listing scores"})}async getScoreById(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_SCORE_BY_ID_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support getting scores by ID"})}async getScoreAggregate(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_SCORE_AGGREGATE_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support score aggregation"})}async getScoreBreakdown(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_SCORE_BREAKDOWN_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support score breakdown"})}async getScoreTimeSeries(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_SCORE_TIME_SERIES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support score time series"})}async getScorePercentiles(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_SCORE_PERCENTILES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support score percentiles"})}async createFeedback(Y){throw new G0({id:"OBSERVABILITY_STORAGE_CREATE_FEEDBACK_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support creating feedback"})}async batchCreateFeedback(Y){throw new G0({id:"OBSERVABILITY_STORAGE_BATCH_CREATE_FEEDBACK_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support batch creating feedback"})}async listFeedback(Y){throw new G0({id:"OBSERVABILITY_STORAGE_LIST_FEEDBACK_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support listing feedback"})}async getFeedbackAggregate(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_FEEDBACK_AGGREGATE_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support feedback aggregation"})}async getFeedbackBreakdown(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_FEEDBACK_BREAKDOWN_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support feedback breakdown"})}async getFeedbackTimeSeries(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_FEEDBACK_TIME_SERIES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support feedback time series"})}async getFeedbackPercentiles(Y){throw new G0({id:"OBSERVABILITY_STORAGE_GET_FEEDBACK_PERCENTILES_NOT_IMPLEMENTED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"This storage provider does not support feedback percentiles"})}};ix0=class extends rg{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.traces.clear(),this.db.metricRecords.length=0,this.db.logRecords.length=0,this.db.scoreRecords.length=0,this.db.feedbackRecords.length=0}async createSpan($){let{span:Y}=$;this.validateCreateSpan(Y);let X=new Date,G={...Y,createdAt:X,updatedAt:X};this.upsertSpanToTrace(G)}async batchCreateSpans($){let Y=new Date;for(let X of $.records){this.validateCreateSpan(X);let G={...X,createdAt:Y,updatedAt:Y};this.upsertSpanToTrace(G)}}validateCreateSpan($){if(!$.spanId)throw new G0({id:"OBSERVABILITY_SPAN_ID_REQUIRED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"Span ID is required for creating a span"});if(!$.traceId)throw new G0({id:"OBSERVABILITY_TRACE_ID_REQUIRED",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"Trace ID is required for creating a span"})}upsertSpanToTrace($){let{traceId:Y,spanId:X}=$,G=this.db.traces.get(Y);if(!G)G={spans:{},rootSpan:null,status:"running",hasChildError:!1},this.db.traces.set(Y,G);if(G.spans[X]=$,$.parentSpanId==null)G.rootSpan=$;this.recomputeTraceProperties(G)}recomputeTraceProperties($){let Y=Object.values($.spans);if(Y.length===0)return;$.hasChildError=Y.some((G)=>G.error!=null);let X=$.rootSpan;if(X)if(X.error!=null)$.status="error";else if(X.endedAt==null)$.status="running";else $.status="success";else $.status="running"}async getSpan($){let{traceId:Y,spanId:X}=$,G=this.db.traces.get(Y);if(!G)return null;let J=G.spans[X];if(!J)return null;return{span:J}}async getRootSpan($){let{traceId:Y}=$,X=this.db.traces.get(Y);if(!X||!X.rootSpan)return null;return{span:X.rootSpan}}async getTrace($){let{traceId:Y}=$,X=this.db.traces.get(Y);if(!X)return null;let G=Object.values(X.spans);if(G.length===0)return null;return G.sort((J,Q)=>J.startedAt.getTime()-Q.startedAt.getTime()),{traceId:Y,spans:G}}async getTraceLight($){let{traceId:Y}=$,X=this.db.traces.get(Y);if(!X)return null;let G=Object.values(X.spans);if(G.length===0)return null;return G.sort((J,Q)=>J.startedAt.getTime()-Q.startedAt.getTime()),{traceId:Y,spans:G.map((J)=>({traceId:J.traceId,spanId:J.spanId,parentSpanId:J.parentSpanId,name:J.name,spanType:J.spanType,isEvent:J.isEvent,startedAt:J.startedAt,endedAt:J.endedAt,error:J.error,entityType:J.entityType,entityId:J.entityId,entityName:J.entityName,createdAt:J.createdAt,updatedAt:J.updatedAt}))}}getMatchingRootSpans($){let{filters:Y,pagination:X,orderBy:G}=lj.parse($),J=[];for(let[,L]of this.db.traces){if(!L.rootSpan)continue;if(this.traceMatchesFilters(L,Y))J.push(L.rootSpan)}let{field:Q,direction:W}=G;J.sort((L,N)=>{if(Q==="endedAt"){let D=L.endedAt,A=N.endedAt;if(D==null&&A==null)return 0;if(D==null)return W==="DESC"?-1:1;if(A==null)return W==="DESC"?1:-1;let B=D.getTime()-A.getTime();return W==="DESC"?-B:B}else{let D=L.startedAt.getTime()-N.startedAt.getTime();return W==="DESC"?-D:D}});let K=J.length,{page:Z,perPage:H}=X,z=Z*H,V=z+H;return{paged:J.slice(z,V),total:K,page:Z,perPage:H,hasMore:V<K}}async listTraces($){let{paged:Y,total:X,page:G,perPage:J,hasMore:Q}=this.getMatchingRootSpans($);return{spans:cj(Y),pagination:{total:X,page:G,perPage:J,hasMore:Q}}}async listTracesLight($){let{paged:Y,total:X,page:G,perPage:J,hasMore:Q}=this.getMatchingRootSpans($);return{spans:Y.map((W)=>({traceId:W.traceId,spanId:W.spanId,parentSpanId:W.parentSpanId,name:W.name,spanType:W.spanType,isEvent:W.isEvent,startedAt:W.startedAt,endedAt:W.endedAt,error:W.error,entityType:W.entityType,entityId:W.entityId,entityName:W.entityName,createdAt:W.createdAt,updatedAt:W.updatedAt})),pagination:{total:X,page:G,perPage:J,hasMore:Q}}}traceMatchesFilters($,Y){if(!Y)return!0;let X=$.rootSpan;if(!X)return!1;if(Y.startedAt){if(Y.startedAt.start&&X.startedAt<Y.startedAt.start)return!1;if(Y.startedAt.end&&X.startedAt>Y.startedAt.end)return!1}if(Y.endedAt){if(X.endedAt==null)return!1;if(Y.endedAt.start&&X.endedAt<Y.endedAt.start)return!1;if(Y.endedAt.end&&X.endedAt>Y.endedAt.end)return!1}if(Y.spanType!==void 0&&X.spanType!==Y.spanType)return!1;if(Y.entityType!==void 0&&X.entityType!==Y.entityType)return!1;if(Y.entityId!==void 0&&X.entityId!==Y.entityId)return!1;if(Y.entityName!==void 0&&X.entityName!==Y.entityName)return!1;if(Y.entityVersionId!==void 0&&X.entityVersionId!==Y.entityVersionId)return!1;if(Y.experimentId!==void 0&&X.experimentId!==Y.experimentId)return!1;if(Y.userId!==void 0&&X.userId!==Y.userId)return!1;if(Y.organizationId!==void 0&&X.organizationId!==Y.organizationId)return!1;if(Y.resourceId!==void 0&&X.resourceId!==Y.resourceId)return!1;if(Y.runId!==void 0&&X.runId!==Y.runId)return!1;if(Y.sessionId!==void 0&&X.sessionId!==Y.sessionId)return!1;if(Y.threadId!==void 0&&X.threadId!==Y.threadId)return!1;if(Y.requestId!==void 0&&X.requestId!==Y.requestId)return!1;if(Y.environment!==void 0&&X.environment!==Y.environment)return!1;if(Y.source!==void 0&&X.source!==Y.source)return!1;if(Y.serviceName!==void 0&&X.serviceName!==Y.serviceName)return!1;if(Y.scope!=null&&X.scope!=null){for(let[G,J]of Object.entries(Y.scope))if(!$V(X.scope[G],J))return!1}else if(Y.scope!=null&&X.scope==null)return!1;if(Y.metadata!=null&&X.metadata!=null){for(let[G,J]of Object.entries(Y.metadata))if(!$V(X.metadata[G],J))return!1}else if(Y.metadata!=null&&X.metadata==null)return!1;if(Y.tags!=null&&Y.tags.length>0){if(X.tags==null)return!1;for(let G of Y.tags)if(!X.tags.includes(G))return!1}if(Y.status!==void 0&&$.status!==Y.status)return!1;if(Y.hasChildError!==void 0&&$.hasChildError!==Y.hasChildError)return!1;return!0}async listBranches($){let{filters:Y,pagination:X,orderBy:G}=Q90.parse($),J=Y?.spanType?xg.has(Y.spanType)?new Set([Y.spanType]):new Set:xg,Q=[];for(let[,N]of this.db.traces)for(let D of Object.values(N.spans)){if(!J.has(D.spanType))continue;if(!this.spanMatchesBranchFilters(D,Y))continue;Q.push(D)}let{field:W,direction:K}=G;Q.sort((N,D)=>{if(W==="endedAt"){let B=N.endedAt,O=D.endedAt;if(B==null&&O==null)return 0;if(B==null)return K==="DESC"?-1:1;if(O==null)return K==="DESC"?1:-1;let E=B.getTime()-O.getTime();return K==="DESC"?-E:E}let A=N.startedAt.getTime()-D.startedAt.getTime();return K==="DESC"?-A:A});let Z=Q.length,{page:H,perPage:z}=X,V=H*z,F=V+z,L=Q.slice(V,F);return{pagination:{total:Z,page:H,perPage:z,hasMore:F<Z},branches:L.map(dj)}}spanMatchesBranchFilters($,Y){if(!Y)return!0;if(Y.startedAt){if(Y.startedAt.start&&$.startedAt<Y.startedAt.start)return!1;if(Y.startedAt.end&&$.startedAt>Y.startedAt.end)return!1}if(Y.endedAt){if($.endedAt==null)return!1;if(Y.endedAt.start&&$.endedAt<Y.endedAt.start)return!1;if(Y.endedAt.end&&$.endedAt>Y.endedAt.end)return!1}if(Y.traceId!==void 0&&$.traceId!==Y.traceId)return!1;if(Y.entityType!==void 0&&$.entityType!==Y.entityType)return!1;if(Y.entityId!==void 0&&$.entityId!==Y.entityId)return!1;if(Y.entityName!==void 0&&$.entityName!==Y.entityName)return!1;if(Y.entityVersionId!==void 0&&$.entityVersionId!==Y.entityVersionId)return!1;if(Y.parentEntityType!==void 0&&$.parentEntityType!==Y.parentEntityType)return!1;if(Y.parentEntityId!==void 0&&$.parentEntityId!==Y.parentEntityId)return!1;if(Y.parentEntityName!==void 0&&$.parentEntityName!==Y.parentEntityName)return!1;if(Y.parentEntityVersionId!==void 0&&$.parentEntityVersionId!==Y.parentEntityVersionId)return!1;if(Y.rootEntityType!==void 0&&$.rootEntityType!==Y.rootEntityType)return!1;if(Y.rootEntityId!==void 0&&$.rootEntityId!==Y.rootEntityId)return!1;if(Y.rootEntityName!==void 0&&$.rootEntityName!==Y.rootEntityName)return!1;if(Y.rootEntityVersionId!==void 0&&$.rootEntityVersionId!==Y.rootEntityVersionId)return!1;if(Y.experimentId!==void 0&&$.experimentId!==Y.experimentId)return!1;if(Y.userId!==void 0&&$.userId!==Y.userId)return!1;if(Y.organizationId!==void 0&&$.organizationId!==Y.organizationId)return!1;if(Y.resourceId!==void 0&&$.resourceId!==Y.resourceId)return!1;if(Y.runId!==void 0&&$.runId!==Y.runId)return!1;if(Y.sessionId!==void 0&&$.sessionId!==Y.sessionId)return!1;if(Y.threadId!==void 0&&$.threadId!==Y.threadId)return!1;if(Y.requestId!==void 0&&$.requestId!==Y.requestId)return!1;if(Y.environment!==void 0&&$.environment!==Y.environment)return!1;if(Y.source!==void 0&&$.source!==Y.source)return!1;if(Y.serviceName!==void 0&&$.serviceName!==Y.serviceName)return!1;if(Y.scope!=null&&$.scope!=null){for(let[X,G]of Object.entries(Y.scope))if(!$V($.scope[X],G))return!1}else if(Y.scope!=null&&$.scope==null)return!1;if(Y.metadata!=null&&$.metadata!=null){for(let[X,G]of Object.entries(Y.metadata))if(!$V($.metadata[X],G))return!1}else if(Y.metadata!=null&&$.metadata==null)return!1;if(Y.tags!=null&&Y.tags.length>0){if($.tags==null)return!1;for(let X of Y.tags)if(!$.tags.includes(X))return!1}if(Y.status!==void 0){if(dj($).status!==Y.status)return!1}return!0}async updateSpan($){let{traceId:Y,spanId:X,updates:G}=$,J=this.db.traces.get(Y);if(!J)throw new G0({id:"OBSERVABILITY_UPDATE_SPAN_NOT_FOUND",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"Trace not found for span update"});let Q=J.spans[X];if(!Q)throw new G0({id:"OBSERVABILITY_UPDATE_SPAN_NOT_FOUND",domain:"MASTRA_OBSERVABILITY",category:"SYSTEM",text:"Span not found for update"});let W={...Q,...G,updatedAt:new Date};if(J.spans[X]=W,W.parentSpanId==null)J.rootSpan=W;this.recomputeTraceProperties(J)}async batchUpdateSpans($){for(let Y of $.records)await this.updateSpan(Y)}async batchDeleteTraces($){for(let Y of $.traceIds)this.db.traces.delete(Y)}async batchCreateMetrics($){for(let Y of $.metrics)this.db.metricRecords.push(Y)}async listMetrics($){let{filters:Y,pagination:X,orderBy:G}=A60.parse($),J=this.filterMetrics(Y),Q=G.direction==="DESC"?-1:1;J.sort((z,V)=>Q*(z.timestamp.getTime()-V.timestamp.getTime()));let W=J.length,K=Number(X.page),Z=Number(X.perPage),H=K*Z;return{metrics:J.slice(H,H+Z),pagination:{total:W,page:K,perPage:Z,hasMore:H+Z<W}}}filterMetrics($){if(!$)return[...this.db.metricRecords];return this.db.metricRecords.filter((Y)=>{if($.timestamp){let G=$.timestamp;if(G.start&&(G.startExclusive?Y.timestamp<=G.start:Y.timestamp<G.start))return!1;if(G.end&&(G.endExclusive?Y.timestamp>=G.end:Y.timestamp>G.end))return!1}if($.name!=null){if(!$.name.includes(Y.name))return!1}if($.traceId!==void 0&&Y.traceId!==$.traceId)return!1;if($.spanId!==void 0&&Y.spanId!==$.spanId)return!1;if($.provider!==void 0&&Y.provider!==$.provider)return!1;if($.model!==void 0&&Y.model!==$.model)return!1;if($.costUnit!==void 0&&Y.costUnit!==$.costUnit)return!1;if($.entityType!==void 0&&Y.entityType!==$.entityType)return!1;if($.entityName!==void 0&&Y.entityName!==$.entityName)return!1;if($.entityVersionId!==void 0&&Y.entityVersionId!==$.entityVersionId)return!1;if($.parentEntityVersionId!==void 0&&Y.parentEntityVersionId!==$.parentEntityVersionId)return!1;if($.rootEntityVersionId!==void 0&&Y.rootEntityVersionId!==$.rootEntityVersionId)return!1;if($.userId!==void 0&&Y.userId!==$.userId)return!1;if($.organizationId!==void 0&&Y.organizationId!==$.organizationId)return!1;if($.resourceId!==void 0&&Y.resourceId!==$.resourceId)return!1;if($.runId!==void 0&&Y.runId!==$.runId)return!1;if($.sessionId!==void 0&&Y.sessionId!==$.sessionId)return!1;if($.threadId!==void 0&&Y.threadId!==$.threadId)return!1;if($.requestId!==void 0&&Y.requestId!==$.requestId)return!1;if($.experimentId!==void 0&&Y.experimentId!==$.experimentId)return!1;if($.serviceName!==void 0&&Y.serviceName!==$.serviceName)return!1;if($.environment!==void 0&&Y.environment!==$.environment)return!1;let X=Y.executionSource??Y.source??null;if($.executionSource!==void 0&&X!==$.executionSource)return!1;if($.source!==void 0&&X!==$.source)return!1;if($.parentEntityType!==void 0&&Y.parentEntityType!==$.parentEntityType)return!1;if($.parentEntityName!==void 0&&Y.parentEntityName!==$.parentEntityName)return!1;if($.rootEntityType!==void 0&&Y.rootEntityType!==$.rootEntityType)return!1;if($.rootEntityName!==void 0&&Y.rootEntityName!==$.rootEntityName)return!1;if($.tags!=null&&Array.isArray($.tags)&&$.tags.length>0){if(Y.tags==null)return!1;for(let G of $.tags)if(!Y.tags.includes(G))return!1}if($.labels){let G=$.labels;for(let[J,Q]of Object.entries(G))if(Y.labels[J]!==Q)return!1}return!0})}aggregate($,Y,X,G){if(Y==="count_distinct"){if(!G)return 0;let J=new Set;for(let Q of G){if(Q===null||Q===void 0)continue;J.add(Q)}return J.size}if($.length===0)return null;switch(Y){case"sum":return $.reduce((J,Q)=>J+Q,0);case"avg":return $.reduce((J,Q)=>J+Q,0)/$.length;case"min":return Math.min(...$);case"max":return Math.max(...$);case"count":return $.length;case"last":{if(!X||X.length!==$.length)return $[$.length-1];let J=0,Q=X[0];for(let W=1;W<X.length;W++){let K=X[W];if(K>=Q)Q=K,J=W}return $[J]}default:return $.reduce((J,Q)=>J+Q,0)}}extractDistinctValues($,Y){if(!Y)return;return $.map((X)=>{let G=X[Y];if(G===null||G===void 0)return null;if(typeof G==="string"||typeof G==="number")return G;return String(G)})}interpolatePercentile($,Y){if($.length===0)return 0;let X=Y*($.length-1),G=Math.floor(X),J=Math.ceil(X),Q=$[G],W=$[J];if(G===J)return Q;return Q+(W-Q)*(X-G)}summarizeCost($){let Y=$.map((G)=>G.estimatedCost).filter((G)=>typeof G==="number"&&Number.isFinite(G)),X=new Set($.map((G)=>G.costUnit).filter((G)=>typeof G==="string"));return{estimatedCost:Y.length>0?Y.reduce((G,J)=>G+J,0):null,costUnit:X.size===1?Array.from(X)[0]:null}}async getMetricAggregate($){let Y=Array.isArray($.name)?$.name:[$.name],X=this.filterMetrics($.filters).filter((Q)=>Y.includes(Q.name)),G=this.aggregate(X.map((Q)=>Q.value),$.aggregation,void 0,this.extractDistinctValues(X,$.distinctColumn)),J=this.summarizeCost(X);if($.comparePeriod&&$.filters?.timestamp){let Q=$.filters.timestamp;if(Q.start&&Q.end){let W=Q.end.getTime()-Q.start.getTime(),K,Z;switch($.comparePeriod){case"previous_period":K=new Date(Q.start.getTime()-W),Z=new Date(Q.end.getTime()-W);break;case"previous_day":K=new Date(Q.start.getTime()-86400000),Z=new Date(Q.end.getTime()-86400000);break;case"previous_week":K=new Date(Q.start.getTime()-604800000),Z=new Date(Q.end.getTime()-604800000);break}let H=this.filterMetrics({...$.filters,timestamp:{...Q,start:K,end:Z}}).filter((N)=>Y.includes(N.name)),z=this.aggregate(H.map((N)=>N.value),$.aggregation,void 0,this.extractDistinctValues(H,$.distinctColumn)),V=this.summarizeCost(H),F=null;if(z!==null&&z!==0&&G!==null)F=(G-z)/Math.abs(z)*100;let L=null;if(V.estimatedCost!==null&&V.estimatedCost!==0&&J.estimatedCost!==null)L=(J.estimatedCost-V.estimatedCost)/Math.abs(V.estimatedCost)*100;return{value:G,estimatedCost:J.estimatedCost,costUnit:J.costUnit,previousValue:z,previousEstimatedCost:V.estimatedCost,changePercent:F,costChangePercent:L}}}return{value:G,estimatedCost:J.estimatedCost,costUnit:J.costUnit}}async getMetricBreakdown($){let Y=Array.isArray($.name)?$.name:[$.name],X=this.filterMetrics($.filters).filter((K)=>Y.includes(K.name)),G=new Map;for(let K of X){let Z={};for(let z of $.groupBy)Z[z]=K[z]??K.labels[z]??null;let H=JSON.stringify(Z);if(!G.has(H))G.set(H,[]);G.get(H).push(K)}let J=Array.from(G.entries()).map(([K,Z])=>{let H=this.summarizeCost(Z);return{dimensions:JSON.parse(K),value:this.aggregate(Z.map((z)=>z.value),$.aggregation,void 0,this.extractDistinctValues(Z,$.distinctColumn))??0,estimatedCost:H.estimatedCost,costUnit:H.costUnit}}),Q=$.orderDirection==="ASC"?1:-1;return J.sort((K,Z)=>(K.value-Z.value)*Q),{groups:typeof $.limit==="number"?J.slice(0,$.limit):J}}async getMetricTimeSeries($){let Y=Array.isArray($.name)?$.name:[$.name],X=this.filterMetrics($.filters).filter((K)=>Y.includes(K.name)),G=this.intervalToMs($.interval);if($.groupBy&&$.groupBy.length>0){let K=new Map;for(let Z of X){let H=$.groupBy.map((F)=>String(Z[F]??Z.labels[F]??"")).join("|");if(!K.has(H))K.set(H,new Map);let z=Math.floor(Z.timestamp.getTime()/G)*G,V=K.get(H);if(!V.has(z))V.set(z,[]);V.get(z).push(Z)}return{series:Array.from(K.entries()).map(([Z,H])=>{let z=Array.from(H.values()).flat(),V=this.summarizeCost(z);return{name:Z,costUnit:V.costUnit,points:Array.from(H.entries()).sort(([F],[L])=>F-L).map(([F,L])=>({timestamp:new Date(F),value:this.aggregate(L.map((N)=>N.value),$.aggregation,void 0,this.extractDistinctValues(L,$.distinctColumn))??0,estimatedCost:this.summarizeCost(L).estimatedCost}))}})}}let J=new Map;for(let K of X){let Z=Math.floor(K.timestamp.getTime()/G)*G;if(!J.has(Z))J.set(Z,[]);J.get(Z).push(K)}let Q=Array.isArray($.name)?$.name.join(","):$.name,W=this.summarizeCost(X);return{series:[{name:Q,costUnit:W.costUnit,points:Array.from(J.entries()).sort(([K],[Z])=>K-Z).map(([K,Z])=>({timestamp:new Date(K),value:this.aggregate(Z.map((H)=>H.value),$.aggregation,void 0,this.extractDistinctValues(Z,$.distinctColumn))??0,estimatedCost:this.summarizeCost(Z).estimatedCost}))}]}}async getMetricPercentiles($){let Y=this.filterMetrics($.filters).filter((Q)=>Q.name===$.name),X=this.intervalToMs($.interval),G=new Map;for(let Q of Y){let W=Math.floor(Q.timestamp.getTime()/X)*X;if(!G.has(W))G.set(W,[]);G.get(W).push(Q.value)}let J=Array.from(G.entries()).sort(([Q],[W])=>Q-W);return{series:$.percentiles.map((Q)=>({percentile:Q,points:J.map(([W,K])=>{let Z=[...K].sort((z,V)=>z-V),H=Math.min(Math.floor(Q*Z.length),Z.length-1);return{timestamp:new Date(W),value:Z[H]??0}})}))}}intervalToMs($){switch($){case"1m":return 60000;case"5m":return 300000;case"15m":return 900000;case"1h":return 3600000;case"1d":return 86400000;default:return 3600000}}async getMetricNames($){let Y=new Set;for(let G of this.db.metricRecords){if($.prefix&&!G.name.startsWith($.prefix))continue;Y.add(G.name)}let X=Array.from(Y).sort();if($.limit)X=X.slice(0,$.limit);return{names:X}}async getMetricLabelKeys($){let Y=new Set;for(let X of this.db.metricRecords){if(X.name!==$.metricName)continue;for(let G of Object.keys(X.labels))Y.add(G)}return{keys:Array.from(Y).sort()}}async getMetricLabelValues($){let Y=new Set;for(let G of this.db.metricRecords){if(G.name!==$.metricName)continue;let J=G.labels[$.labelKey];if(J===void 0)continue;if($.prefix&&!J.startsWith($.prefix))continue;Y.add(J)}let X=Array.from(Y).sort();if($.limit)X=X.slice(0,$.limit);return{values:X}}async getEntityTypes($){let Y=new Set(Object.values(J6)),X=new Set;for(let[,G]of this.db.traces)for(let J of Object.values(G.spans))if(J.entityType&&Y.has(J.entityType))X.add(J.entityType);return{entityTypes:Array.from(X).sort()}}async getEntityNames($){let Y=new Set;for(let[,X]of this.db.traces)for(let G of Object.values(X.spans)){if(!G.entityName)continue;if($.entityType&&G.entityType!==$.entityType)continue;Y.add(G.entityName)}return{names:Array.from(Y).sort()}}async getServiceNames($){let Y=new Set;for(let[,X]of this.db.traces)for(let G of Object.values(X.spans))if(G.serviceName)Y.add(G.serviceName);return{serviceNames:Array.from(Y).sort()}}async getEnvironments($){let Y=new Set;for(let[,X]of this.db.traces)for(let G of Object.values(X.spans))if(G.environment)Y.add(G.environment);return{environments:Array.from(Y).sort()}}async getTags($){let Y=new Set;for(let[,X]of this.db.traces)for(let G of Object.values(X.spans)){if(!G.tags)continue;if($.entityType&&G.entityType!==$.entityType)continue;for(let J of G.tags)Y.add(J)}return{tags:Array.from(Y).sort()}}async batchCreateLogs($){for(let Y of $.logs)this.db.logRecords.push(Y)}async listLogs($){let{filters:Y,pagination:X,orderBy:G}=H60.parse($),J=this.db.logRecords.filter((z)=>this.logMatchesFilters(z,Y)),Q=G.direction==="DESC"?-1:1;J.sort((z,V)=>Q*(z.timestamp.getTime()-V.timestamp.getTime()));let W=J.length,K=Number(X.page),Z=Number(X.perPage),H=K*Z;return{logs:J.slice(H,H+Z),pagination:{total:W,page:K,perPage:Z,hasMore:H+Z<W}}}logMatchesFilters($,Y){if(!Y)return!0;if(Y.timestamp){if(Y.timestamp.start&&(Y.timestamp.startExclusive?$.timestamp<=Y.timestamp.start:$.timestamp<Y.timestamp.start))return!1;if(Y.timestamp.end&&(Y.timestamp.endExclusive?$.timestamp>=Y.timestamp.end:$.timestamp>Y.timestamp.end))return!1}if(Y.level!==void 0){if(!(Array.isArray(Y.level)?Y.level:[Y.level]).includes($.level))return!1}if(Y.traceId!==void 0&&$.traceId!==Y.traceId)return!1;if(Y.spanId!==void 0&&$.spanId!==Y.spanId)return!1;if(Y.entityType!==void 0&&$.entityType!==Y.entityType)return!1;if(Y.entityName!==void 0&&$.entityName!==Y.entityName)return!1;if(Y.entityVersionId!==void 0&&$.entityVersionId!==Y.entityVersionId)return!1;if(Y.parentEntityVersionId!==void 0&&$.parentEntityVersionId!==Y.parentEntityVersionId)return!1;if(Y.rootEntityVersionId!==void 0&&$.rootEntityVersionId!==Y.rootEntityVersionId)return!1;if(Y.userId!==void 0&&$.userId!==Y.userId)return!1;if(Y.organizationId!==void 0&&$.organizationId!==Y.organizationId)return!1;if(Y.resourceId!==void 0&&$.resourceId!==Y.resourceId)return!1;if(Y.runId!==void 0&&$.runId!==Y.runId)return!1;if(Y.sessionId!==void 0&&$.sessionId!==Y.sessionId)return!1;if(Y.threadId!==void 0&&$.threadId!==Y.threadId)return!1;if(Y.requestId!==void 0&&$.requestId!==Y.requestId)return!1;if(Y.parentEntityType!==void 0&&$.parentEntityType!==Y.parentEntityType)return!1;if(Y.parentEntityName!==void 0&&$.parentEntityName!==Y.parentEntityName)return!1;if(Y.rootEntityType!==void 0&&$.rootEntityType!==Y.rootEntityType)return!1;if(Y.rootEntityName!==void 0&&$.rootEntityName!==Y.rootEntityName)return!1;if(Y.serviceName!==void 0&&$.serviceName!==Y.serviceName)return!1;if(Y.environment!==void 0&&$.environment!==Y.environment)return!1;let X=$.executionSource??$.source??null;if(Y.executionSource!==void 0&&X!==Y.executionSource)return!1;if(Y.source!==void 0&&X!==Y.source)return!1;if(Y.experimentId!==void 0&&$.experimentId!==Y.experimentId)return!1;if(Y.tags!=null&&Y.tags.length>0){if($.tags==null)return!1;for(let G of Y.tags)if(!$.tags.includes(G))return!1}return!0}async createScore($){let Y=$.score.scoreSource??$.score.source??null;this.db.scoreRecords.push({...$.score,scoreSource:Y,source:Y})}async batchCreateScores($){for(let Y of $.scores){let X=Y.scoreSource??Y.source??null;this.db.scoreRecords.push({...Y,scoreSource:X,source:X})}}async listScores($){let{filters:Y,pagination:X,orderBy:G}=V60.parse($),J=this.db.scoreRecords.filter((z)=>this.scoreMatchesFilters(z,Y)),Q=G.direction==="DESC"?-1:1;if(G.field==="score")J.sort((z,V)=>Q*(z.score-V.score));else J.sort((z,V)=>Q*(z.timestamp.getTime()-V.timestamp.getTime()));let W=J.length,K=Number(X.page),Z=Number(X.perPage),H=K*Z;return{scores:J.slice(H,H+Z),pagination:{total:W,page:K,perPage:Z,hasMore:H+Z<W}}}async getScoreById($){return this.db.scoreRecords.find((Y)=>Y.scoreId===$)??null}scoreMatchesFilters($,Y){if(!Y)return!0;if(Y.timestamp){if(Y.timestamp.start&&$.timestamp<Y.timestamp.start)return!1;if(Y.timestamp.end&&$.timestamp>Y.timestamp.end)return!1}if(Y.traceId!==void 0&&$.traceId!==Y.traceId)return!1;if(Y.spanId!==void 0&&$.spanId!==Y.spanId)return!1;if(Y.entityType!==void 0&&$.entityType!==Y.entityType)return!1;if(Y.entityName!==void 0&&$.entityName!==Y.entityName)return!1;if(Y.entityVersionId!==void 0&&$.entityVersionId!==Y.entityVersionId)return!1;if(Y.parentEntityVersionId!==void 0&&$.parentEntityVersionId!==Y.parentEntityVersionId)return!1;if(Y.rootEntityVersionId!==void 0&&$.rootEntityVersionId!==Y.rootEntityVersionId)return!1;if(Y.userId!==void 0&&$.userId!==Y.userId)return!1;if(Y.organizationId!==void 0&&$.organizationId!==Y.organizationId)return!1;if(Y.resourceId!==void 0&&$.resourceId!==Y.resourceId)return!1;if(Y.runId!==void 0&&$.runId!==Y.runId)return!1;if(Y.sessionId!==void 0&&$.sessionId!==Y.sessionId)return!1;if(Y.threadId!==void 0&&$.threadId!==Y.threadId)return!1;if(Y.requestId!==void 0&&$.requestId!==Y.requestId)return!1;if(Y.parentEntityType!==void 0&&$.parentEntityType!==Y.parentEntityType)return!1;if(Y.parentEntityName!==void 0&&$.parentEntityName!==Y.parentEntityName)return!1;if(Y.rootEntityType!==void 0&&$.rootEntityType!==Y.rootEntityType)return!1;if(Y.rootEntityName!==void 0&&$.rootEntityName!==Y.rootEntityName)return!1;if(Y.serviceName!==void 0&&$.serviceName!==Y.serviceName)return!1;if(Y.environment!==void 0&&$.environment!==Y.environment)return!1;if(Y.executionSource!==void 0&&$.executionSource!==Y.executionSource)return!1;if(Y.scorerId!==void 0){if(!(Array.isArray(Y.scorerId)?Y.scorerId:[Y.scorerId]).includes($.scorerId))return!1}let X=$.scoreSource??$.source??null;if(Y.scoreSource!==void 0&&X!==Y.scoreSource)return!1;if(Y.source!==void 0&&X!==Y.source)return!1;if(Y.experimentId!==void 0&&$.experimentId!==Y.experimentId)return!1;if(Y.tags!=null&&Y.tags.length>0){if($.tags==null)return!1;for(let G of Y.tags)if(!$.tags.includes(G))return!1}return!0}async getScoreAggregate($){let Y=this.db.scoreRecords.filter((G)=>this.scoreMatchesFilters(G,$.filters)).filter((G)=>G.scorerId===$.scorerId).filter((G)=>$.scoreSource?(G.scoreSource??G.source??null)===$.scoreSource:!0),X=this.aggregate(Y.map((G)=>G.score),$.aggregation,Y.map((G)=>G.timestamp.getTime()));if($.comparePeriod&&$.filters?.timestamp){let G=this.getComparisonDateRange($.comparePeriod,$.filters.timestamp);if(G){let J=this.db.scoreRecords.filter((K)=>this.scoreMatchesFilters(K,{...$.filters??{},timestamp:G})).filter((K)=>K.scorerId===$.scorerId).filter((K)=>$.scoreSource?(K.scoreSource??K.source??null)===$.scoreSource:!0),Q=this.aggregate(J.map((K)=>K.score),$.aggregation,J.map((K)=>K.timestamp.getTime())),W=null;if(Q!==null&&Q!==0&&X!==null)W=(X-Q)/Math.abs(Q)*100;return{value:X,previousValue:Q,changePercent:W}}}return{value:X}}async getScoreBreakdown($){let Y=this.db.scoreRecords.filter((J)=>this.scoreMatchesFilters(J,$.filters)).filter((J)=>J.scorerId===$.scorerId).filter((J)=>$.scoreSource?(J.scoreSource??J.source??null)===$.scoreSource:!0),X=new Map;for(let J of Y){let Q={};for(let K of $.groupBy){let Z=J[K];Q[K]=Z===null||Z===void 0?null:String(Z)}let W=JSON.stringify(Q);if(!X.has(W))X.set(W,[]);X.get(W).push(J)}let G=Array.from(X.entries()).map(([J,Q])=>({dimensions:JSON.parse(J),value:this.aggregate(Q.map((W)=>W.score),$.aggregation,Q.map((W)=>W.timestamp.getTime()))??0}));return G.sort((J,Q)=>Q.value-J.value),{groups:G}}async getScoreTimeSeries($){let Y=this.db.scoreRecords.filter((J)=>this.scoreMatchesFilters(J,$.filters)).filter((J)=>J.scorerId===$.scorerId).filter((J)=>$.scoreSource?(J.scoreSource??J.source??null)===$.scoreSource:!0),X=this.intervalToMs($.interval);if($.groupBy&&$.groupBy.length>0){let J=new Map,Q=new Map;for(let W of Y){let K=$.groupBy.map((V)=>W[V]??""),Z=JSON.stringify(K);if(!J.has(Z))J.set(Z,new Map);if(!Q.has(Z))Q.set(Z,K.map((V)=>V===null||V===void 0?"":String(V)).join("|"));let H=Math.floor(W.timestamp.getTime()/X)*X,z=J.get(Z);if(!z.has(H))z.set(H,[]);z.get(H).push(W)}return{series:Array.from(J.entries()).map(([W,K])=>({name:Q.get(W),points:Array.from(K.entries()).sort(([Z],[H])=>Z-H).map(([Z,H])=>({timestamp:new Date(Z),value:this.aggregate(H.map((z)=>z.score),$.aggregation,H.map((z)=>z.timestamp.getTime()))??0}))}))}}let G=new Map;for(let J of Y){let Q=Math.floor(J.timestamp.getTime()/X)*X;if(!G.has(Q))G.set(Q,[]);G.get(Q).push(J)}return{series:[{name:$.scoreSource?`${$.scorerId}|${$.scoreSource}`:$.scorerId,points:Array.from(G.entries()).sort(([J],[Q])=>J-Q).map(([J,Q])=>({timestamp:new Date(J),value:this.aggregate(Q.map((W)=>W.score),$.aggregation,Q.map((W)=>W.timestamp.getTime()))??0}))}]}}async getScorePercentiles($){let Y=this.db.scoreRecords.filter((Q)=>this.scoreMatchesFilters(Q,$.filters)).filter((Q)=>Q.scorerId===$.scorerId).filter((Q)=>$.scoreSource?(Q.scoreSource??Q.source??null)===$.scoreSource:!0),X=this.intervalToMs($.interval),G=new Map;for(let Q of Y){let W=Math.floor(Q.timestamp.getTime()/X)*X;if(!G.has(W))G.set(W,[]);G.get(W).push(Q.score)}let J=Array.from(G.entries()).sort(([Q],[W])=>Q-W);return{series:$.percentiles.map((Q)=>({percentile:Q,points:J.map(([W,K])=>{let Z=[...K].sort((H,z)=>H-z);return{timestamp:new Date(W),value:this.interpolatePercentile(Z,Q)}})}))}}getNumericFeedbackValue($){if(typeof $==="number")return Number.isFinite($)?$:null;if(typeof $==="string"){let Y=$.trim();if(Y.length===0)return null;let X=Number(Y);return Number.isFinite(X)?X:null}return null}getComparisonDateRange($,Y){if(!Y.start||!Y.end)return null;let X=Y.end.getTime()-Y.start.getTime();switch($){case"previous_period":return{start:new Date(Y.start.getTime()-X),end:new Date(Y.end.getTime()-X),startExclusive:Y.startExclusive,endExclusive:Y.endExclusive};case"previous_day":return{start:new Date(Y.start.getTime()-86400000),end:new Date(Y.end.getTime()-86400000),startExclusive:Y.startExclusive,endExclusive:Y.endExclusive};case"previous_week":return{start:new Date(Y.start.getTime()-604800000),end:new Date(Y.end.getTime()-604800000),startExclusive:Y.startExclusive,endExclusive:Y.endExclusive}}}async createFeedback($){this.db.feedbackRecords.push({...$.feedback,feedbackSource:$.feedback.feedbackSource??$.feedback.source??"",source:$.feedback.feedbackSource??$.feedback.source??"",feedbackUserId:$.feedback.feedbackUserId??$.feedback.userId??(typeof $.feedback.metadata?.userId==="string"?$.feedback.metadata.userId:null)})}async batchCreateFeedback($){for(let Y of $.feedbacks)this.db.feedbackRecords.push({...Y,feedbackSource:Y.feedbackSource??Y.source??"",source:Y.feedbackSource??Y.source??"",feedbackUserId:Y.feedbackUserId??Y.userId??(typeof Y.metadata?.userId==="string"?Y.metadata.userId:null)})}async listFeedback($){let{filters:Y,pagination:X,orderBy:G}=D60.parse($),J=this.db.feedbackRecords.filter((z)=>this.feedbackMatchesFilters(z,Y)),Q=G.direction==="DESC"?-1:1;J.sort((z,V)=>Q*(z.timestamp.getTime()-V.timestamp.getTime()));let W=J.length,K=Number(X.page),Z=Number(X.perPage),H=K*Z;return{feedback:J.slice(H,H+Z),pagination:{total:W,page:K,perPage:Z,hasMore:H+Z<W}}}async getFeedbackAggregate($){let X=this.db.feedbackRecords.filter((J)=>this.feedbackMatchesFilters(J,$.filters)).filter((J)=>J.feedbackType===$.feedbackType).filter((J)=>$.feedbackSource?(J.feedbackSource??J.source??"")===$.feedbackSource:!0).flatMap((J)=>{let Q=this.getNumericFeedbackValue(J.value);return Q===null?[]:[{numericValue:Q,timestamp:J.timestamp.getTime()}]}),G=this.aggregate(X.map((J)=>J.numericValue),$.aggregation,X.map((J)=>J.timestamp));if($.comparePeriod&&$.filters?.timestamp){let J=this.getComparisonDateRange($.comparePeriod,$.filters.timestamp);if(J){let Q=this.db.feedbackRecords.filter((Z)=>this.feedbackMatchesFilters(Z,{...$.filters??{},timestamp:J})).filter((Z)=>Z.feedbackType===$.feedbackType).filter((Z)=>$.feedbackSource?(Z.feedbackSource??Z.source??"")===$.feedbackSource:!0).flatMap((Z)=>{let H=this.getNumericFeedbackValue(Z.value);return H===null?[]:[{numericValue:H,timestamp:Z.timestamp.getTime()}]}),W=this.aggregate(Q.map((Z)=>Z.numericValue),$.aggregation,Q.map((Z)=>Z.timestamp)),K=null;if(W!==null&&W!==0&&G!==null)K=(G-W)/Math.abs(W)*100;return{value:G,previousValue:W,changePercent:K}}}return{value:G}}async getFeedbackBreakdown($){let Y=this.db.feedbackRecords.filter((J)=>this.feedbackMatchesFilters(J,$.filters)).filter((J)=>J.feedbackType===$.feedbackType).filter((J)=>$.feedbackSource?(J.feedbackSource??J.source??"")===$.feedbackSource:!0).filter((J)=>this.getNumericFeedbackValue(J.value)!==null),X=new Map;for(let J of Y){let Q={};for(let K of $.groupBy){let Z=J[K];Q[K]=Z===null||Z===void 0?null:String(Z)}let W=JSON.stringify(Q);if(!X.has(W))X.set(W,[]);X.get(W).push(J)}let G=Array.from(X.entries()).map(([J,Q])=>({dimensions:JSON.parse(J),value:(()=>{let W=Q.flatMap((K)=>{let Z=this.getNumericFeedbackValue(K.value);return Z===null?[]:[{numericValue:Z,timestamp:K.timestamp.getTime()}]});return this.aggregate(W.map((K)=>K.numericValue),$.aggregation,W.map((K)=>K.timestamp))??0})()}));return G.sort((J,Q)=>Q.value-J.value),{groups:G}}async getFeedbackTimeSeries($){let Y=this.db.feedbackRecords.filter((J)=>this.feedbackMatchesFilters(J,$.filters)).filter((J)=>J.feedbackType===$.feedbackType).filter((J)=>$.feedbackSource?(J.feedbackSource??J.source??"")===$.feedbackSource:!0).filter((J)=>this.getNumericFeedbackValue(J.value)!==null),X=this.intervalToMs($.interval);if($.groupBy&&$.groupBy.length>0){let J=new Map,Q=new Map;for(let W of Y){let K=$.groupBy.map((V)=>W[V]??""),Z=JSON.stringify(K);if(!J.has(Z))J.set(Z,new Map);if(!Q.has(Z))Q.set(Z,K.map((V)=>V===null||V===void 0?"":String(V)).join("|"));let H=Math.floor(W.timestamp.getTime()/X)*X,z=J.get(Z);if(!z.has(H))z.set(H,[]);z.get(H).push(W)}return{series:Array.from(J.entries()).map(([W,K])=>({name:Q.get(W),points:Array.from(K.entries()).sort(([Z],[H])=>Z-H).map(([Z,H])=>({timestamp:new Date(Z),value:(()=>{let z=H.flatMap((V)=>{let F=this.getNumericFeedbackValue(V.value);return F===null?[]:[{numericValue:F,timestamp:V.timestamp.getTime()}]});return this.aggregate(z.map((V)=>V.numericValue),$.aggregation,z.map((V)=>V.timestamp))??0})()}))}))}}let G=new Map;for(let J of Y){let Q=Math.floor(J.timestamp.getTime()/X)*X;if(!G.has(Q))G.set(Q,[]);G.get(Q).push(J)}return{series:[{name:$.feedbackSource?`${$.feedbackType}|${$.feedbackSource}`:$.feedbackType,points:Array.from(G.entries()).sort(([J],[Q])=>J-Q).map(([J,Q])=>({timestamp:new Date(J),value:(()=>{let W=Q.flatMap((K)=>{let Z=this.getNumericFeedbackValue(K.value);return Z===null?[]:[{numericValue:Z,timestamp:K.timestamp.getTime()}]});return this.aggregate(W.map((K)=>K.numericValue),$.aggregation,W.map((K)=>K.timestamp))??0})()}))}]}}async getFeedbackPercentiles($){let Y=this.db.feedbackRecords.filter((Q)=>this.feedbackMatchesFilters(Q,$.filters)).filter((Q)=>Q.feedbackType===$.feedbackType).filter((Q)=>$.feedbackSource?(Q.feedbackSource??Q.source??"")===$.feedbackSource:!0),X=this.intervalToMs($.interval),G=new Map;for(let Q of Y){let W=this.getNumericFeedbackValue(Q.value);if(W===null)continue;let K=Math.floor(Q.timestamp.getTime()/X)*X;if(!G.has(K))G.set(K,[]);G.get(K).push(W)}let J=Array.from(G.entries()).sort(([Q],[W])=>Q-W);return{series:$.percentiles.map((Q)=>({percentile:Q,points:J.map(([W,K])=>{let Z=[...K].sort((H,z)=>H-z);return{timestamp:new Date(W),value:this.interpolatePercentile(Z,Q)}})}))}}feedbackMatchesFilters($,Y){if(!Y)return!0;if(Y.timestamp){if(Y.timestamp.start&&$.timestamp<Y.timestamp.start)return!1;if(Y.timestamp.end&&$.timestamp>Y.timestamp.end)return!1}if(Y.traceId!==void 0&&$.traceId!==Y.traceId)return!1;if(Y.spanId!==void 0&&$.spanId!==Y.spanId)return!1;if(Y.entityType!==void 0&&$.entityType!==Y.entityType)return!1;if(Y.entityName!==void 0&&$.entityName!==Y.entityName)return!1;if(Y.entityVersionId!==void 0&&$.entityVersionId!==Y.entityVersionId)return!1;if(Y.parentEntityVersionId!==void 0&&$.parentEntityVersionId!==Y.parentEntityVersionId)return!1;if(Y.rootEntityVersionId!==void 0&&$.rootEntityVersionId!==Y.rootEntityVersionId)return!1;if(Y.userId!==void 0&&$.userId!==Y.userId)return!1;if(Y.organizationId!==void 0&&$.organizationId!==Y.organizationId)return!1;if(Y.resourceId!==void 0&&$.resourceId!==Y.resourceId)return!1;if(Y.runId!==void 0&&$.runId!==Y.runId)return!1;if(Y.sessionId!==void 0&&$.sessionId!==Y.sessionId)return!1;if(Y.threadId!==void 0&&$.threadId!==Y.threadId)return!1;if(Y.requestId!==void 0&&$.requestId!==Y.requestId)return!1;if(Y.parentEntityType!==void 0&&$.parentEntityType!==Y.parentEntityType)return!1;if(Y.parentEntityName!==void 0&&$.parentEntityName!==Y.parentEntityName)return!1;if(Y.rootEntityType!==void 0&&$.rootEntityType!==Y.rootEntityType)return!1;if(Y.rootEntityName!==void 0&&$.rootEntityName!==Y.rootEntityName)return!1;if(Y.serviceName!==void 0&&$.serviceName!==Y.serviceName)return!1;if(Y.environment!==void 0&&$.environment!==Y.environment)return!1;if(Y.executionSource!==void 0&&$.executionSource!==Y.executionSource)return!1;if(Y.feedbackType!==void 0){if(!(Array.isArray(Y.feedbackType)?Y.feedbackType:[Y.feedbackType]).includes($.feedbackType))return!1}let X=$.feedbackSource??$.source??"";if(Y.feedbackSource!==void 0&&X!==Y.feedbackSource)return!1;if(Y.source!==void 0&&X!==Y.source)return!1;if(Y.experimentId!==void 0&&$.experimentId!==Y.experimentId)return!1;if(Y.feedbackUserId!==void 0&&$.feedbackUserId!==Y.feedbackUserId)return!1;if(Y.tags!=null&&Y.tags.length>0){if($.tags==null)return!1;for(let G of Y.tags)if(!$.tags.includes(G))return!1}return!0}},Jb8=new Set(Object.values(J6));ag=class extends qW{constructor(){super({component:"STORAGE",name:"BACKGROUND_TASKS"})}async dangerouslyClearAll(){}},rx0=class extends ag{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.backgroundTasks.clear()}async createTask($){this.db.backgroundTasks.set($.id,{...$})}async updateTask($,Y){let X=this.db.backgroundTasks.get($);if(!X)return;this.db.backgroundTasks.set($,{...X,...Y})}async getTask($){let Y=this.db.backgroundTasks.get($);return Y?{...Y}:null}async listTasks($){let Y=Array.from(this.db.backgroundTasks.values());if($.status){let W=Array.isArray($.status)?$.status:[$.status];Y=Y.filter((K)=>W.includes(K.status))}if($.agentId)Y=Y.filter((W)=>W.agentId===$.agentId);if($.threadId)Y=Y.filter((W)=>W.threadId===$.threadId);if($.resourceId)Y=Y.filter((W)=>W.resourceId===$.resourceId);if($.toolName)Y=Y.filter((W)=>W.toolName===$.toolName);if($.toolCallId)Y=Y.filter((W)=>W.toolCallId===$.toolCallId);if($.runId)Y=Y.filter((W)=>W.runId===$.runId);let X=$.dateFilterBy??"createdAt";if($.fromDate)Y=Y.filter((W)=>{let K=W[X];return K!=null&&K>=$.fromDate});if($.toDate)Y=Y.filter((W)=>{let K=W[X];return K!=null&&K<$.toDate});let G=$.orderBy??"createdAt",J=$.orderDirection??"asc";Y.sort((W,K)=>{let Z=W[G]?.getTime()??0,H=K[G]?.getTime()??0;return J==="asc"?Z-H:H-Z});let Q=Y.length;if($.page!=null&&$.perPage!=null){let W=$.page*$.perPage;Y=Y.slice(W,W+$.perPage)}else if($.perPage!=null)Y=Y.slice(0,$.perPage);return{tasks:Y.map((W)=>({...W})),total:Q}}async deleteTask($){this.db.backgroundTasks.delete($)}async deleteTasks($){let{tasks:Y}=await this.listTasks($);for(let X of Y)this.db.backgroundTasks.delete(X.id)}async getRunningCount(){let $=0;for(let Y of this.db.backgroundTasks.values())if(Y.status==="running")$++;return $}async getRunningCountByAgent($){let Y=0;for(let X of this.db.backgroundTasks.values())if(X.status==="running"&&X.agentId===$)Y++;return Y}},sg=class extends u8{constructor(){super({component:"STORAGE",name:"BLOBS"})}},ax0=class extends sg{#$=new Map;async init(){}async put($){if(!this.#$.has($.hash))this.#$.set($.hash,$)}async get($){return this.#$.get($)??null}async has($){return this.#$.has($)}async delete($){return this.#$.delete($)}async putMany($){for(let Y of $)await this.put(Y)}async getMany($){let Y=new Map;for(let X of $){let G=this.#$.get(X);if(G)Y.set(X,G)}return Y}async dangerouslyClearAll(){this.#$.clear()}},og=class extends qW{constructor(){super({component:"STORAGE",name:"CHANNELS"})}},sx0=class extends og{#$=new Map;#Y=new Map;async saveInstallation($){this.#$.set($.id,{...$})}async getInstallation($){let Y=this.#$.get($);return Y?{...Y}:null}async getInstallationByAgent($,Y){let X={active:0,pending:1,error:2},G=null;for(let J of this.#$.values())if(J.platform===$&&J.agentId===Y){if(!G||(X[J.status]??3)<(X[G.status]??3))G=J}return G?{...G}:null}async getInstallationByWebhookId($){for(let Y of this.#$.values())if(Y.webhookId===$)return{...Y};return null}async listInstallations($){let Y=[];for(let X of this.#$.values())if(X.platform===$)Y.push({...X});return Y}async deleteInstallation($){this.#$.delete($)}async saveConfig($){this.#Y.set($.platform,{...$})}async getConfig($){let Y=this.#Y.get($);return Y?{...Y}:null}async deleteConfig($){this.#Y.delete($)}async dangerouslyClearAll(){this.#$.clear(),this.#Y.clear()}},Zb8=class extends Error{constructor($,Y){let X=Y.slice(0,3).map((G)=>G.message).join("; ");super(`Validation failed for ${$}: ${X}`);this.field=$,this.errors=Y,this.name="SchemaValidationError"}field;errors},Ub8=class extends Error{constructor($){let Y=$.length;super(`Cannot update schema: ${Y} existing item(s) would fail validation`);this.failingItems=$,this.name="SchemaUpdateValidationError"}failingItems};tg=class extends qW{constructor(){super({component:"STORAGE",name:"DATASETS"})}async dangerouslyClearAll(){}async updateDataset($){let Y=await this.getDatasetById({id:$.id});if(!Y)throw Error(`Dataset not found: ${$.id}`);let X=$.inputSchema!==void 0&&JSON.stringify($.inputSchema)!==JSON.stringify(Y.inputSchema),G=$.groundTruthSchema!==void 0&&JSON.stringify($.groundTruthSchema)!==JSON.stringify(Y.groundTruthSchema);if(X||G){let Q=(await this.listItems({datasetId:$.id,pagination:{page:0,perPage:!1}})).items;if(Q.length>0){let W=U90(),K=$.inputSchema!==void 0?$.inputSchema:Y.inputSchema,Z=$.groundTruthSchema!==void 0?$.groundTruthSchema:Y.groundTruthSchema,H=W.validateBatch(Q.map((z)=>({input:z.input,groundTruth:z.groundTruth})),K,Z,`dataset:${$.id}:schema-update`,10);if(H.invalid.length>0)throw new Ub8(H.invalid);W.clearCache(`dataset:${$.id}:input`),W.clearCache(`dataset:${$.id}:output`)}}return this._doUpdateDataset($)}async addItem($){let Y=await this.getDatasetById({id:$.datasetId});if(!Y)throw Error(`Dataset not found: ${$.datasetId}`);let X=U90(),G=`dataset:${$.datasetId}`;if(Y.inputSchema)X.validate($.input,Y.inputSchema,"input",`${G}:input`);if(Y.groundTruthSchema&&$.groundTruth!==void 0)X.validate($.groundTruth,Y.groundTruthSchema,"groundTruth",`${G}:output`);return this._doAddItem($)}async updateItem($){let Y=await this.getDatasetById({id:$.datasetId});if(!Y)throw Error(`Dataset not found: ${$.datasetId}`);let X=U90(),G=`dataset:${$.datasetId}`;if($.input!==void 0&&Y.inputSchema)X.validate($.input,Y.inputSchema,"input",`${G}:input`);if($.groundTruth!==void 0&&Y.groundTruthSchema)X.validate($.groundTruth,Y.groundTruthSchema,"groundTruth",`${G}:output`);return this._doUpdateItem($)}async deleteItem($){return this._doDeleteItem($)}async batchInsertItems($){let Y=await this.getDatasetById({id:$.datasetId});if(!Y)throw Error(`Dataset not found: ${$.datasetId}`);let X=U90(),G=`dataset:${$.datasetId}`;for(let J of $.items){if(Y.inputSchema)X.validate(J.input,Y.inputSchema,"input",`${G}:input`);if(Y.groundTruthSchema&&J.groundTruth!==void 0)X.validate(J.groundTruth,Y.groundTruthSchema,"groundTruth",`${G}:output`)}return this._doBatchInsertItems($)}async batchDeleteItems($){if(!await this.getDatasetById({id:$.datasetId}))throw Error(`Dataset not found: ${$.datasetId}`);return this._doBatchDeleteItems($)}};ox0=class extends tg{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.datasets.clear(),this.db.datasetItems.clear(),this.db.datasetVersions.clear()}async createDataset($){let Y=crypto.randomUUID(),X=new Date,G={id:Y,name:$.name,description:$.description,metadata:$.metadata,inputSchema:$.inputSchema,groundTruthSchema:$.groundTruthSchema,requestContextSchema:$.requestContextSchema,targetType:$.targetType,targetIds:$.targetIds,scorerIds:$.scorerIds??null,version:0,createdAt:X,updatedAt:X};return this.db.datasets.set(Y,G),H90(G)}async getDatasetById({id:$}){let Y=this.db.datasets.get($);return Y?H90(Y):null}async _doUpdateDataset($){let Y=this.db.datasets.get($.id);if(!Y)throw Error(`Dataset not found: ${$.id}`);let X={...Y,name:$.name??Y.name,description:$.description??Y.description,metadata:$.metadata??Y.metadata,inputSchema:$.inputSchema!==void 0?$.inputSchema:Y.inputSchema,groundTruthSchema:$.groundTruthSchema!==void 0?$.groundTruthSchema:Y.groundTruthSchema,requestContextSchema:$.requestContextSchema!==void 0?$.requestContextSchema:Y.requestContextSchema,tags:$.tags!==void 0?$.tags:Y.tags,targetType:$.targetType!==void 0?$.targetType:Y.targetType,targetIds:$.targetIds!==void 0?$.targetIds:Y.targetIds,scorerIds:$.scorerIds!==void 0?$.scorerIds:Y.scorerIds,updatedAt:new Date};return this.db.datasets.set($.id,X),H90(X)}async deleteDataset({id:$}){for(let[Y,X]of this.db.datasetItems)if(X.length>0&&X[0].datasetId===$)this.db.datasetItems.delete(Y);for(let[Y,X]of this.db.datasetVersions)if(X.datasetId===$)this.db.datasetVersions.delete(Y);for(let[Y,X]of this.db.experiments)if(X.datasetId===$)this.db.experiments.set(Y,{...X,datasetId:null,datasetVersion:null});this.db.datasets.delete($)}async listDatasets($){let Y=Array.from(this.db.datasets.values());Y.sort((Z,H)=>H.createdAt.getTime()-Z.createdAt.getTime());let{page:X,perPage:G}=$.pagination,J=F4(G,100),{offset:Q,perPage:W}=B4(X,G,J),K=G===!1?Y.length:Q+J;return{datasets:Y.slice(Q,K).map(H90),pagination:{total:Y.length,page:X,perPage:W,hasMore:G===!1?!1:Y.length>K}}}async _doAddItem($){let Y=this.db.datasets.get($.datasetId);if(!Y)throw Error(`Dataset not found: ${$.datasetId}`);let X=Y.version+1;this.db.datasets.set($.datasetId,{...Y,version:X});let G=new Date,J=crypto.randomUUID(),Q={id:J,datasetId:$.datasetId,datasetVersion:X,validTo:null,isDeleted:!1,input:$.input,groundTruth:$.groundTruth,expectedTrajectory:$.expectedTrajectory,requestContext:$.requestContext,metadata:$.metadata,source:$.source,createdAt:G,updatedAt:G};return this.db.datasetItems.set(J,[Q]),await this.createDatasetVersion($.datasetId,X),KE(Q)}async _doUpdateItem($){let Y=this.db.datasetItems.get($.id);if(!Y||Y.length===0)throw Error(`Item not found: ${$.id}`);let X=Y.find((K)=>K.validTo===null&&!K.isDeleted);if(!X)throw Error(`Item not found: ${$.id}`);if(X.datasetId!==$.datasetId)throw Error(`Item ${$.id} does not belong to dataset ${$.datasetId}`);let G=this.db.datasets.get($.datasetId);if(!G)throw Error(`Dataset not found: ${$.datasetId}`);let J=G.version+1;this.db.datasets.set($.datasetId,{...G,version:J}),X.validTo=J;let Q=new Date,W={id:$.id,datasetId:$.datasetId,datasetVersion:J,validTo:null,isDeleted:!1,input:$.input!==void 0?$.input:X.input,groundTruth:$.groundTruth!==void 0?$.groundTruth:X.groundTruth,expectedTrajectory:$.expectedTrajectory!==void 0?$.expectedTrajectory:X.expectedTrajectory,requestContext:$.requestContext!==void 0?$.requestContext:X.requestContext,metadata:$.metadata!==void 0?$.metadata:X.metadata,source:$.source!==void 0?$.source:X.source,createdAt:X.createdAt,updatedAt:Q};return Y.push(W),await this.createDatasetVersion($.datasetId,J),KE(W)}async _doDeleteItem({id:$,datasetId:Y}){let X=this.db.datasetItems.get($);if(!X||X.length===0)return;let G=X.find((K)=>K.validTo===null&&!K.isDeleted);if(!G)return;if(G.datasetId!==Y)throw Error(`Item ${$} does not belong to dataset ${Y}`);let J=this.db.datasets.get(Y);if(!J)throw Error(`Dataset not found: ${Y}`);let Q=J.version+1;this.db.datasets.set(Y,{...J,version:Q}),G.validTo=Q;let W=new Date;X.push({id:$,datasetId:Y,datasetVersion:Q,validTo:null,isDeleted:!0,input:G.input,groundTruth:G.groundTruth,requestContext:G.requestContext,metadata:G.metadata,createdAt:G.createdAt,updatedAt:W}),await this.createDatasetVersion(Y,Q)}async getItemById($){let Y=this.db.datasetItems.get($.id);if(!Y||Y.length===0)return null;if($.datasetVersion!==void 0){let G=Y.find((J)=>J.datasetVersion===$.datasetVersion&&!J.isDeleted);return G?KE(G):null}let X=Y.find((G)=>G.validTo===null&&!G.isDeleted);return X?KE(X):null}async getItemsByVersion({datasetId:$,version:Y}){let X=[];for(let G of this.db.datasetItems.values()){if(G.length===0||G[0].datasetId!==$)continue;let J=G.find((Q)=>Q.datasetVersion<=Y&&(Q.validTo===null||Q.validTo>Y)&&!Q.isDeleted);if(J)X.push(KE(J))}return X.sort((G,J)=>J.createdAt.getTime()-G.createdAt.getTime()||J.id.localeCompare(G.id)),X}async getItemHistory($){let Y=this.db.datasetItems.get($);if(!Y)return[];return[...Y].sort((X,G)=>G.datasetVersion-X.datasetVersion)}async listItems($){let Y;if($.version!==void 0)Y=await this.getItemsByVersion({datasetId:$.datasetId,version:$.version});else{Y=[];for(let Z of this.db.datasetItems.values()){if(Z.length===0||Z[0].datasetId!==$.datasetId)continue;let H=Z.find((z)=>z.validTo===null&&!z.isDeleted);if(H)Y.push(KE(H))}}if($.search){let Z=$.search.toLowerCase();Y=Y.filter((H)=>{let z=typeof H.input==="string"?H.input:JSON.stringify(H.input),V=H.groundTruth?typeof H.groundTruth==="string"?H.groundTruth:JSON.stringify(H.groundTruth):"";return z.toLowerCase().includes(Z)||V.toLowerCase().includes(Z)})}Y.sort((Z,H)=>H.createdAt.getTime()-Z.createdAt.getTime()||H.id.localeCompare(Z.id));let{page:X,perPage:G}=$.pagination,J=F4(G,100),{offset:Q,perPage:W}=B4(X,G,J),K=G===!1?Y.length:Q+J;return{items:Y.slice(Q,K),pagination:{total:Y.length,page:X,perPage:W,hasMore:G===!1?!1:Y.length>K}}}async createDatasetVersion($,Y){let X=crypto.randomUUID(),G={id:X,datasetId:$,version:Y,createdAt:new Date};return this.db.datasetVersions.set(X,G),G}async listDatasetVersions($){let Y=[];for(let Z of this.db.datasetVersions.values())if(Z.datasetId===$.datasetId)Y.push(Z);Y.sort((Z,H)=>H.version-Z.version);let{page:X,perPage:G}=$.pagination,J=F4(G,100),{offset:Q,perPage:W}=B4(X,G,J),K=G===!1?Y.length:Q+J;return{versions:Y.slice(Q,K),pagination:{total:Y.length,page:X,perPage:W,hasMore:G===!1?!1:Y.length>K}}}async _doBatchInsertItems($){let Y=this.db.datasets.get($.datasetId);if(!Y)throw Error(`Dataset not found: ${$.datasetId}`);let X=Y.version+1;this.db.datasets.set($.datasetId,{...Y,version:X});let G=new Date,J=[];for(let Q of $.items){let W=crypto.randomUUID(),K={id:W,datasetId:$.datasetId,datasetVersion:X,validTo:null,isDeleted:!1,input:Q.input,groundTruth:Q.groundTruth,expectedTrajectory:Q.expectedTrajectory,requestContext:Q.requestContext,metadata:Q.metadata,source:Q.source,createdAt:G,updatedAt:G};this.db.datasetItems.set(W,[K]),J.push(KE(K))}return await this.createDatasetVersion($.datasetId,X),J}async _doBatchDeleteItems($){let Y=this.db.datasets.get($.datasetId);if(!Y)throw Error(`Dataset not found: ${$.datasetId}`);let X=Y.version+1;this.db.datasets.set($.datasetId,{...Y,version:X});let G=new Date;for(let J of $.itemIds){let Q=this.db.datasetItems.get(J);if(!Q)continue;let W=Q.find((K)=>K.validTo===null&&!K.isDeleted);if(!W||W.datasetId!==$.datasetId)continue;W.validTo=X,Q.push({id:J,datasetId:$.datasetId,datasetVersion:X,validTo:null,isDeleted:!0,input:W.input,groundTruth:W.groundTruth,requestContext:W.requestContext,metadata:W.metadata,createdAt:W.createdAt,updatedAt:G})}await this.createDatasetVersion($.datasetId,X)}},eg=class extends qW{constructor(){super({component:"STORAGE",name:"EXPERIMENTS"})}async dangerouslyClearAll(){}},tx0=class extends eg{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.experiments.clear(),this.db.experimentResults.clear()}async createExperiment($){let Y=new Date,X={id:$.id??crypto.randomUUID(),datasetId:$.datasetId,datasetVersion:$.datasetVersion,agentVersion:$.agentVersion??null,targetType:$.targetType,targetId:$.targetId,name:$.name,description:$.description,metadata:$.metadata,status:"pending",totalItems:$.totalItems,succeededCount:0,failedCount:0,skippedCount:0,startedAt:null,completedAt:null,createdAt:Y,updatedAt:Y};return this.db.experiments.set(X.id,X),X}async updateExperiment($){let Y=this.db.experiments.get($.id);if(!Y)throw Error(`Experiment not found: ${$.id}`);let X={...Y,status:$.status??Y.status,totalItems:$.totalItems??Y.totalItems,succeededCount:$.succeededCount??Y.succeededCount,failedCount:$.failedCount??Y.failedCount,skippedCount:$.skippedCount??Y.skippedCount,startedAt:$.startedAt??Y.startedAt,completedAt:$.completedAt??Y.completedAt,name:$.name??Y.name,description:$.description??Y.description,metadata:$.metadata??Y.metadata,updatedAt:new Date};return this.db.experiments.set($.id,X),X}async getExperimentById($){return this.db.experiments.get($.id)??null}async listExperiments($){let Y=Array.from(this.db.experiments.values());if($.datasetId)Y=Y.filter((Z)=>Z.datasetId===$.datasetId);if($.targetType)Y=Y.filter((Z)=>Z.targetType===$.targetType);if($.targetId)Y=Y.filter((Z)=>Z.targetId===$.targetId);if($.agentVersion)Y=Y.filter((Z)=>Z.agentVersion===$.agentVersion);if($.status)Y=Y.filter((Z)=>Z.status===$.status);Y.sort((Z,H)=>H.createdAt.getTime()-Z.createdAt.getTime());let{page:X,perPage:G}=$.pagination,J=F4(G,100),{offset:Q,perPage:W}=B4(X,G,J),K=G===!1?Y.length:Q+J;return{experiments:Y.slice(Q,K),pagination:{total:Y.length,page:X,perPage:W,hasMore:G===!1?!1:Y.length>K}}}async deleteExperiment($){this.db.experiments.delete($.id);for(let[Y,X]of this.db.experimentResults)if(X.experimentId===$.id)this.db.experimentResults.delete(Y)}async addExperimentResult($){let Y=new Date,X={id:$.id??crypto.randomUUID(),experimentId:$.experimentId,itemId:$.itemId,itemDatasetVersion:$.itemDatasetVersion,input:$.input,output:$.output,groundTruth:$.groundTruth,error:$.error,startedAt:$.startedAt,completedAt:$.completedAt,retryCount:$.retryCount,traceId:$.traceId??null,status:$.status??null,tags:$.tags??null,createdAt:Y};return this.db.experimentResults.set(X.id,X),X}async updateExperimentResult($){let Y=this.db.experimentResults.get($.id);if(!Y)throw Error(`Experiment result not found: ${$.id}`);if($.experimentId&&Y.experimentId!==$.experimentId)throw Error(`Experiment result ${$.id} does not belong to experiment ${$.experimentId}`);let X={...Y,status:$.status!==void 0?$.status:Y.status,tags:$.tags!==void 0?$.tags:Y.tags};return this.db.experimentResults.set($.id,X),X}async getExperimentResultById($){return this.db.experimentResults.get($.id)??null}async listExperimentResults($){let Y=Array.from(this.db.experimentResults.values()).filter((Z)=>Z.experimentId===$.experimentId);if($.traceId)Y=Y.filter((Z)=>Z.traceId===$.traceId);if($.status)Y=Y.filter((Z)=>Z.status===$.status);Y.sort((Z,H)=>Z.startedAt.getTime()-H.startedAt.getTime());let{page:X,perPage:G}=$.pagination,J=F4(G,100),{offset:Q,perPage:W}=B4(X,G,J),K=G===!1?Y.length:Q+J;return{results:Y.slice(Q,K),pagination:{total:Y.length,page:X,perPage:W,hasMore:G===!1?!1:Y.length>K}}}async deleteExperimentResults($){for(let[Y,X]of this.db.experimentResults)if(X.experimentId===$.experimentId)this.db.experimentResults.delete(Y)}async getReviewSummary(){let $=new Map;for(let Y of this.db.experimentResults.values()){let X=$.get(Y.experimentId);if(!X)X={experimentId:Y.experimentId,total:0,needsReview:0,reviewed:0,complete:0},$.set(Y.experimentId,X);if(X.total++,Y.status==="needs-review")X.needsReview++;else if(Y.status==="reviewed")X.reviewed++;else if(Y.status==="complete")X.complete++}return Array.from($.values())}};Vb8=/^[a-zA-Z_][a-zA-Z0-9_]*$/,Fb8=new Set(["__proto__","prototype","constructor"]),$m=class extends qW{supportsObservationalMemory=!1;constructor(){super({component:"STORAGE",name:"MEMORY"})}async listMessagesByResourceId($){throw Error(`Resource-scoped message listing is not implemented by this storage adapter (${this.constructor.name}). Use an adapter that supports Observational Memory (pg, libsql, mongodb) or disable observational memory.`)}async deleteMessages($){throw Error(`Message deletion is not supported by this storage adapter (${this.constructor.name}). The deleteMessages method needs to be implemented in the storage adapter.`)}async cloneThread($){throw Error(`Thread cloning is not implemented by this storage adapter (${this.constructor.name}). The cloneThread method needs to be implemented in the storage adapter.`)}async getResourceById($){throw Error(`Resource working memory is not implemented by this storage adapter (${this.constructor.name}). This is likely a bug - all Mastra storage adapters should implement resource support. Please report this issue at https://github.com/mastra-ai/mastra/issues`)}async saveResource($){throw Error(`Resource working memory is not implemented by this storage adapter (${this.constructor.name}). This is likely a bug - all Mastra storage adapters should implement resource support. Please report this issue at https://github.com/mastra-ai/mastra/issues`)}async updateResource($){throw Error(`Resource working memory is not implemented by this storage adapter (${this.constructor.name}). This is likely a bug - all Mastra storage adapters should implement resource support. Please report this issue at https://github.com/mastra-ai/mastra/issues`)}parseOrderBy($,Y="DESC"){return{field:$?.field&&$.field in Lb8?$.field:"createdAt",direction:$?.direction&&$.direction in Db8?$.direction:Y}}async getObservationalMemory($,Y){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async getObservationalMemoryHistory($,Y,X,G){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async initializeObservationalMemory($){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async updateActiveObservations($){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async updateBufferedObservations($){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async swapBufferedToActive($){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async createReflectionGeneration($){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async updateBufferedReflection($){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async swapBufferedReflectionToActive($){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async setReflectingFlag($,Y){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async setObservingFlag($,Y){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async setBufferingObservationFlag($,Y,X){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async setBufferingReflectionFlag($,Y){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async insertObservationalMemoryRecord($){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async clearObservationalMemory($,Y){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async setPendingMessageTokens($,Y){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}async updateObservationalMemoryConfig($){throw Error(`Observational memory is not implemented by this storage adapter (${this.constructor.name}).`)}deepMergeConfig($,Y){let X={...$};for(let G of Object.keys(Y)){let J=$[G],Q=Y[G];if(t44(J)&&t44(Q))X[G]=this.deepMergeConfig(J,Q);else if(Q!==void 0)X[G]=Q}return X}validateMetadataKeys($){if(!$)return;for(let Y of Object.keys($)){if(Fb8.has(Y))throw Error(`Invalid metadata key: "${Y}".`);if(!Vb8.test(Y))throw Error(`Invalid metadata key: "${Y}". Keys must start with a letter or underscore and contain only alphanumeric characters and underscores.`);if(Y.length>e44)throw Error(`Metadata key "${Y}" exceeds maximum length of ${e44} characters.`)}}validatePagination($,Y){if(!Number.isFinite($)||!Number.isSafeInteger($)||$<0)throw Error("page must be >= 0");if(!Number.isFinite(Y)||!Number.isSafeInteger(Y)||Y<0)throw Error("perPage must be >= 0");if(Y===0)return;let X=$*Y;if(!Number.isSafeInteger(X)||X>Number.MAX_SAFE_INTEGER)throw Error("page value too large")}validatePaginationInput($,Y){if(Y!==!1){if(typeof Y!=="number"||!Number.isFinite(Y)||!Number.isSafeInteger(Y))throw Error("perPage must be false or a safe integer");if(Y<0)throw Error("perPage must be >= 0")}if(Y===!1){if($!==0)throw Error("page must be 0 when perPage is false");if(!Number.isFinite($)||!Number.isSafeInteger($))throw Error("page must be >= 0");return}this.validatePagination($,Y)}},Lb8={createdAt:!0,updatedAt:!0},Db8={ASC:!0,DESC:!0},$y0=class extends $m{supportsObservationalMemory=!0;db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.threads.clear(),this.db.messages.clear(),this.db.resources.clear(),this.db.observationalMemory.clear()}async getThreadById({threadId:$,resourceId:Y}){let X=this.db.threads.get($);if(!X||Y!==void 0&&X.resourceId!==Y)return null;return{...X,metadata:X.metadata?{...X.metadata}:X.metadata}}async saveThread({thread:$}){let Y=$.id;return this.db.threads.set(Y,$),$}async updateThread({id:$,title:Y,metadata:X}){let G=this.db.threads.get($);if(!G)throw Error(`Thread with id ${$} not found`);if(G)G.title=Y,G.metadata={...G.metadata,...X},G.updatedAt=new Date;return G}async deleteThread({threadId:$}){this.db.threads.delete($),this.db.messages.forEach((Y,X)=>{if(Y.thread_id===$)this.db.messages.delete(X)})}async listMessages({threadId:$,resourceId:Y,include:X,filter:G,perPage:J,page:Q=0,orderBy:W}){let K=Array.isArray($)?$:[$];if(K.length===0||K.some((R)=>!R.trim()))throw Error("threadId must be a non-empty string or array of non-empty strings");let Z=new Set(K),{field:H,direction:z}=this.parseOrderBy(W,"ASC"),V=F4(J,40);if(Q<0)throw Error("page must be >= 0");let F=Number.MAX_SAFE_INTEGER/2;if(Q*V>F)throw Error("page value too large");let{offset:L,perPage:N}=B4(Q,J,V);if(V===0&&(!X||X.length===0))return{messages:[],total:0,page:Q,perPage:N,hasMore:!1};let D=Array.from(this.db.messages.values()).filter((R)=>{if(Z&&!Z.has(R.thread_id))return!1;if(Y&&R.resourceId!==Y)return!1;return!0});D=z90(D,(R)=>new Date(R.createdAt),G?.dateRange),D.sort((R,q)=>{let _=H==="createdAt"||H==="updatedAt",P=_?new Date(R[H]).getTime():R[H],w=_?new Date(q[H]).getTime():q[H];if(typeof P==="number"&&typeof w==="number")return z==="ASC"?P-w:w-P;return z==="ASC"?String(P).localeCompare(String(w)):String(w).localeCompare(String(P))});let A=V===0?0:D.length,B=V===0?[]:D.slice(L,L+V),O=[],E=new Set;for(let R of B){let q=this.parseStoredMessage(R);O.push(q),E.add(R.id)}if(X&&X.length>0)for(let R of X){let q=this.db.messages.get(R.id);if(q){let _={id:q.id,threadId:q.thread_id,content:N8(q.content),role:q.role,type:q.type,createdAt:q.createdAt,resourceId:q.resourceId};if(!E.has(_.id))O.push(_),E.add(_.id);if(R.withPreviousMessages){let P=Array.from(this.db.messages.values()).filter((j)=>j.thread_id===(R.threadId||$)).sort((j,C)=>new Date(j.createdAt).getTime()-new Date(C.createdAt).getTime()),w=P.findIndex((j)=>j.id===R.id);if(w!==-1){let j=Math.max(0,w-(R.withPreviousMessages||0));for(let C=j;C<w;C++){let k=P[C];if(k&&!E.has(k.id)){let S={id:k.id,threadId:k.thread_id,content:N8(k.content),role:k.role,type:k.type,createdAt:k.createdAt,resourceId:k.resourceId};O.push(S),E.add(k.id)}}}}if(R.withNextMessages){let P=Array.from(this.db.messages.values()).filter((j)=>j.thread_id===(R.threadId||$)).sort((j,C)=>new Date(j.createdAt).getTime()-new Date(C.createdAt).getTime()),w=P.findIndex((j)=>j.id===R.id);if(w!==-1){let j=Math.min(P.length,w+(R.withNextMessages||0)+1);for(let C=w+1;C<j;C++){let k=P[C];if(k&&!E.has(k.id)){let S={id:k.id,threadId:k.thread_id,content:N8(k.content),role:k.role,type:k.type,createdAt:k.createdAt,resourceId:k.resourceId};O.push(S),E.add(k.id)}}}}}}O.sort((R,q)=>{let _=H==="createdAt"||H==="updatedAt",P=_?new Date(R[H]).getTime():R[H],w=_?new Date(q[H]).getTime():q[H];if(typeof P==="number"&&typeof w==="number")return z==="ASC"?P-w:w-P;return z==="ASC"?String(P).localeCompare(String(w)):String(w).localeCompare(String(P))});let M;if(V===0)M=!1;else if(X&&X.length>0)M=new Set(O.filter((q)=>q.threadId===$).map((q)=>q.id)).size<A;else M=L+V<A;return{messages:O,total:A,page:Q,perPage:N,hasMore:M}}async listMessagesByResourceId({resourceId:$,filter:Y,perPage:X,page:G=0,orderBy:J}){let{field:Q,direction:W}=this.parseOrderBy(J,"ASC"),K=F4(X,40);if(G<0)throw Error("page must be >= 0");let Z=Number.MAX_SAFE_INTEGER/2;if(G*K>Z)throw Error("page value too large");let{offset:H,perPage:z}=B4(G,X,K),V=Array.from(this.db.messages.values()).filter((A)=>A.resourceId===$);V=z90(V,(A)=>new Date(A.createdAt),Y?.dateRange),V.sort((A,B)=>{let O=Q==="createdAt"||Q==="updatedAt",E=O?new Date(A[Q]).getTime():A[Q],M=O?new Date(B[Q]).getTime():B[Q];if(typeof E==="number"&&typeof M==="number")return W==="ASC"?E-M:M-E;return W==="ASC"?String(E).localeCompare(String(M)):String(M).localeCompare(String(E))});let F=V.length,L=V.slice(H,H+K),N=new l6().add(L.map((A)=>this.parseStoredMessage(A)),"memory"),D=H+L.length<F;return{messages:N.get.all.db(),total:F,page:G,perPage:z,hasMore:D}}parseStoredMessage($){let{resourceId:Y,content:X,role:G,thread_id:J,...Q}=$,W=N8(X);if(typeof W==="string")W={format:2,content:W,parts:[{type:"text",text:W}]};return{...Q,threadId:J,...$.resourceId&&{resourceId:$.resourceId},content:W,role:G}}async listMessagesById({messageIds:$}){let Y=$.map((G)=>this.db.messages.get(G)).filter((G)=>!!G);return{messages:new l6().add(Y.map((G)=>this.parseStoredMessage(G)),"memory").get.all.db()}}async saveMessages($){let{messages:Y}=$;if(Y.some((J)=>J.id==="error-message"||J.resourceId===null))throw Error("Simulated error for testing");let X=new Set(Y.map((J)=>J.threadId).filter((J)=>Boolean(J)));for(let J of X){let Q=this.db.threads.get(J);if(Q)Q.updatedAt=new Date}for(let J of Y){let Q=J.id,W={id:J.id,thread_id:J.threadId||"",content:JSON.stringify(J.content),role:J.role||"user",type:J.type||"text",createdAt:J.createdAt,resourceId:J.resourceId||null};this.db.messages.set(Q,W)}return{messages:new l6().add(Y,"memory").get.all.db()}}async updateMessages($){let Y=[];for(let X of $.messages){let G=this.db.messages.get(X.id);if(!G)continue;let J=G.thread_id,Q=X.threadId||J,W=!1;if(X.threadId&&X.threadId!==J)W=!0;if(X.role!==void 0)G.role=X.role;if(X.type!==void 0)G.type=X.type;if(X.createdAt!==void 0)G.createdAt=X.createdAt;if(X.resourceId!==void 0)G.resourceId=X.resourceId;if(X.content!==void 0){let K=N8(G.content),Z=X.content;if(typeof Z==="object"&&typeof K==="object"){if(Z={...K,...Z},K.metadata&&Z.metadata)Z.metadata={...K.metadata,...Z.metadata}}G.content=JSON.stringify(Z)}if(W){G.thread_id=Q;let K=Date.now(),Z,H=this.db.threads.get(J);if(H){let V=new Date(H.updatedAt).getTime();Z=Math.max(K,V+1),H.updatedAt=new Date(Z)}let z=this.db.threads.get(Q);if(z){let V=new Date(z.updatedAt).getTime(),F=Math.max(K+1,V+1);if(Z!==void 0&&F<=Z)F=Z+1;z.updatedAt=new Date(F)}}else{let K=this.db.threads.get(J);if(K){let Z=new Date(K.updatedAt).getTime(),H=Date.now();if(H<=Z)H=Z+1;K.updatedAt=new Date(H)}}this.db.messages.set(X.id,G),Y.push({id:G.id,threadId:G.thread_id,content:N8(G.content),role:G.role==="user"||G.role==="assistant"?G.role:"user",type:G.type,createdAt:G.createdAt,resourceId:G.resourceId===null?void 0:G.resourceId})}return Y}async deleteMessages($){if(!$||$.length===0)return;let Y=new Set;for(let G of $){let J=this.db.messages.get(G);if(J&&J.thread_id)Y.add(J.thread_id);this.db.messages.delete(G)}let X=new Date;for(let G of Y){let J=this.db.threads.get(G);if(J)J.updatedAt=X}}async listThreads($){let{page:Y=0,perPage:X,orderBy:G,filter:J}=$,{field:Q,direction:W}=this.parseOrderBy(G);this.validatePaginationInput(Y,X??100);let K=F4(X,100),Z=Array.from(this.db.threads.values());if(J?.resourceId)Z=Z.filter((L)=>L.resourceId===J.resourceId);if(this.validateMetadataKeys(J?.metadata),J?.metadata&&Object.keys(J.metadata).length>0)Z=Z.filter((L)=>{if(!L.metadata)return!1;return Object.entries(J.metadata).every(([N,D])=>$V(L.metadata[N],D))});let z=this.sortThreads(Z,Q,W).map((L)=>({...L,metadata:L.metadata?{...L.metadata}:L.metadata})),{offset:V,perPage:F}=B4(Y,X,K);return{threads:z.slice(V,V+K),total:z.length,page:Y,perPage:F,hasMore:V+K<z.length}}async getResourceById({resourceId:$}){let Y=this.db.resources.get($);return Y?{...Y,metadata:Y.metadata?{...Y.metadata}:Y.metadata}:null}async saveResource({resource:$}){return this.db.resources.set($.id,$),$}async updateResource({resourceId:$,workingMemory:Y,metadata:X}){let G=this.db.resources.get($);if(!G)G={id:$,workingMemory:Y,metadata:X||{},createdAt:new Date,updatedAt:new Date};else G={...G,workingMemory:Y!==void 0?Y:G.workingMemory,metadata:{...G.metadata,...X},updatedAt:new Date};return this.db.resources.set($,G),G}async cloneThread($){let{sourceThreadId:Y,newThreadId:X,resourceId:G,title:J,metadata:Q,options:W}=$,K=this.db.threads.get(Y);if(!K)throw Error(`Source thread with id ${Y} not found`);let Z=X||crypto.randomUUID();if(this.db.threads.has(Z))throw Error(`Thread with id ${Z} already exists`);let H=Array.from(this.db.messages.values()).filter((A)=>A.thread_id===Y).sort((A,B)=>new Date(A.createdAt).getTime()-new Date(B.createdAt).getTime());if(W?.messageFilter){let{startDate:A,endDate:B,messageIds:O}=W.messageFilter;if(O&&O.length>0){let E=new Set(O);H=H.filter((M)=>E.has(M.id))}if(A)H=H.filter((E)=>new Date(E.createdAt)>=A);if(B)H=H.filter((E)=>new Date(E.createdAt)<=B)}if(W?.messageLimit&&W.messageLimit>0&&H.length>W.messageLimit)H=H.slice(-W.messageLimit);let z=new Date,V=H.length>0?H[H.length-1].id:void 0,F={sourceThreadId:Y,clonedAt:z,...V&&{lastMessageId:V}},L={id:Z,resourceId:G||K.resourceId,title:J||(K.title?`Clone of ${K.title}`:void 0),metadata:{...Q,clone:F},createdAt:z,updatedAt:z};this.db.threads.set(Z,L);let N=[],D={};for(let A of H){let B=crypto.randomUUID();D[A.id]=B;let O=N8(A.content),E={id:B,thread_id:Z,content:A.content,role:A.role,type:A.type,createdAt:A.createdAt,resourceId:G||A.resourceId};this.db.messages.set(B,E),N.push({id:B,threadId:Z,content:O,role:A.role,type:A.type,createdAt:A.createdAt,resourceId:G||A.resourceId||void 0})}return{thread:L,clonedMessages:N,messageIdMap:D}}sortThreads($,Y,X){return $.sort((G,J)=>{let Q=Y==="createdAt"||Y==="updatedAt",W=Q?new Date(G[Y]).getTime():G[Y],K=Q?new Date(J[Y]).getTime():J[Y];if(typeof W==="number"&&typeof K==="number")if(X==="ASC")return W-K;else return K-W;return X==="ASC"?String(W).localeCompare(String(K)):String(K).localeCompare(String(W))})}getObservationalMemoryKey($,Y){if($)return`thread:${$}`;return`resource:${Y}`}async getObservationalMemory($,Y){let X=this.getObservationalMemoryKey($,Y);return this.db.observationalMemory.get(X)?.[0]??null}async getObservationalMemoryHistory($,Y,X,G){let J=this.getObservationalMemoryKey($,Y),Q=this.db.observationalMemory.get(J)??[];if(G?.from)Q=Q.filter((W)=>W.createdAt>=G.from);if(G?.to)Q=Q.filter((W)=>W.createdAt<=G.to);if(G?.offset!=null)Q=Q.slice(G.offset);return X!=null?Q.slice(0,X):Q}async initializeObservationalMemory($){let{threadId:Y,resourceId:X,scope:G,config:J,observedTimezone:Q}=$,W=this.getObservationalMemoryKey(Y,X),K=new Date,Z={id:crypto.randomUUID(),scope:G,threadId:Y,resourceId:X,createdAt:K,updatedAt:K,lastObservedAt:void 0,originType:"initial",generationCount:0,activeObservations:"",bufferedObservations:void 0,bufferedReflection:void 0,totalTokensObserved:0,observationTokenCount:0,pendingMessageTokens:0,isReflecting:!1,isObserving:!1,isBufferingObservation:!1,isBufferingReflection:!1,lastBufferedAtTokens:0,lastBufferedAtTime:null,config:J,observedTimezone:Q,metadata:{}},H=this.db.observationalMemory.get(W)??[];return this.db.observationalMemory.set(W,[Z,...H]),Z}async insertObservationalMemoryRecord($){let Y=this.getObservationalMemoryKey($.threadId,$.resourceId),X=this.db.observationalMemory.get(Y)??[],G=!1;for(let J=0;J<X.length;J++)if($.generationCount>=X[J].generationCount){X.splice(J,0,$),G=!0;break}if(!G)X.push($);this.db.observationalMemory.set(Y,X)}async updateActiveObservations($){let{id:Y,observations:X,tokenCount:G,lastObservedAt:J,observedMessageIds:Q}=$,W=this.findObservationalMemoryRecordById(Y);if(!W)throw Error(`Observational memory record not found: ${Y}`);if(W.activeObservations=X,W.observationTokenCount=G,W.totalTokensObserved+=G,W.pendingMessageTokens=0,W.lastObservedAt=J,W.updatedAt=new Date,Q)W.observedMessageIds=Q}async updateBufferedObservations($){let{id:Y,chunk:X}=$,G=this.findObservationalMemoryRecordById(Y);if(!G)throw Error(`Observational memory record not found: ${Y}`);let J={id:`ombuf-${crypto.randomUUID()}`,cycleId:X.cycleId,observations:X.observations,tokenCount:X.tokenCount,messageIds:X.messageIds,messageTokens:X.messageTokens,lastObservedAt:X.lastObservedAt,createdAt:new Date,suggestedContinuation:X.suggestedContinuation,currentTask:X.currentTask,threadTitle:X.threadTitle},Q=Array.isArray(G.bufferedObservationChunks)?G.bufferedObservationChunks:[];if(G.bufferedObservationChunks=[...Q,J],$.lastBufferedAtTime)G.lastBufferedAtTime=$.lastBufferedAtTime;G.updatedAt=new Date}async swapBufferedToActive($){let{id:Y,activationRatio:X,lastObservedAt:G}=$,J=this.findObservationalMemoryRecordById(Y);if(!J)throw Error(`Observational memory record not found: ${Y}`);let Q=Array.isArray(J.bufferedObservationChunks)?J.bufferedObservationChunks:[],W=Array.isArray($.bufferedChunks)?$.bufferedChunks:Q;if(W.length===0)return{chunksActivated:0,messageTokensActivated:0,observationTokensActivated:0,messagesActivated:0,activatedCycleIds:[],activatedMessageIds:[]};let K=$.messageTokensThreshold*(1-X),Z=Math.max(0,$.currentPendingTokens-K),H=0,z=0,V=0,F=0,L=0;for(let v=0;v<W.length;v++){H+=W[v].messageTokens??0;let x=v+1;if(H>=Z){if(z===0||H<V)z=x,V=H}else if(H>L)F=x,L=H}let N=K*0.95,D=V-Z,A=$.currentPendingTokens-V,B=$.currentPendingTokens-L,O=Math.min(1000,K),E;if($.forceMaxActivation&&z>0&&A>=O)E=z;else if(z>0&&D<=N&&A>=O)E=z;else if(F>0&&B>=O)E=F;else if(z>0)E=z;else E=1;let M=W.slice(0,E),R=W.slice(E),q=M.map((v)=>v.observations).join(`

`),_=M.reduce((v,x)=>v+x.tokenCount,0),P=M.reduce((v,x)=>v+(x.messageTokens??0),0),w=M.reduce((v,x)=>v+x.messageIds.length,0),j=M.map((v)=>v.cycleId).filter((v)=>!!v),C=M.flatMap((v)=>v.messageIds),k=M[M.length-1],S=G??(k?.lastObservedAt?new Date(k.lastObservedAt):new Date);if(J.activeObservations){let v=`

--- message boundary (${S.toISOString()}) ---

`;J.activeObservations=`${J.activeObservations}${v}${q}`}else J.activeObservations=q;J.observationTokenCount=(J.observationTokenCount??0)+_,J.pendingMessageTokens=Math.max(0,(J.pendingMessageTokens??0)-P),J.bufferedObservationChunks=R.length>0?R:void 0,J.lastObservedAt=S,J.updatedAt=new Date;let I=M[M.length-1];return{chunksActivated:M.length,messageTokensActivated:P,observationTokensActivated:_,messagesActivated:w,activatedCycleIds:j,activatedMessageIds:C,observations:q,perChunk:M.map((v)=>({cycleId:v.cycleId??"",messageTokens:v.messageTokens??0,observationTokens:v.tokenCount,messageCount:v.messageIds.length,observations:v.observations})),suggestedContinuation:I?.suggestedContinuation??void 0,currentTask:I?.currentTask??void 0}}async createReflectionGeneration($){let{currentRecord:Y,reflection:X,tokenCount:G}=$,J=this.getObservationalMemoryKey(Y.threadId,Y.resourceId),Q=new Date,W={id:crypto.randomUUID(),scope:Y.scope,threadId:Y.threadId,resourceId:Y.resourceId,createdAt:Q,updatedAt:Q,lastObservedAt:Y.lastObservedAt??Q,originType:"reflection",generationCount:Y.generationCount+1,activeObservations:X,config:Y.config,totalTokensObserved:Y.totalTokensObserved,observationTokenCount:G,pendingMessageTokens:0,isReflecting:!1,isObserving:!1,isBufferingObservation:!1,isBufferingReflection:!1,lastBufferedAtTokens:0,lastBufferedAtTime:null,observedTimezone:Y.observedTimezone,metadata:{}},K=this.db.observationalMemory.get(J)??[];return this.db.observationalMemory.set(J,[W,...K]),W}async updateBufferedReflection($){let{id:Y,reflection:X,tokenCount:G,inputTokenCount:J,reflectedObservationLineCount:Q}=$,W=this.findObservationalMemoryRecordById(Y);if(!W)throw Error(`Observational memory record not found: ${Y}`);let K=W.bufferedReflection||"";W.bufferedReflection=K?`${K}

${X}`:X,W.bufferedReflectionTokens=(W.bufferedReflectionTokens||0)+G,W.bufferedReflectionInputTokens=(W.bufferedReflectionInputTokens||0)+J,W.reflectedObservationLineCount=Q,W.updatedAt=new Date}async swapBufferedReflectionToActive($){let{currentRecord:Y}=$,X=this.findObservationalMemoryRecordById(Y.id);if(!X)throw Error(`Observational memory record not found: ${Y.id}`);if(!X.bufferedReflection)throw Error("No buffered reflection to swap");let G=X.bufferedReflection,J=X.reflectedObservationLineCount??0,Z=(X.activeObservations??"").split(`
`).slice(J).join(`
`).trim(),H=Z?`${G}

${Z}`:G,z=await this.createReflectionGeneration({currentRecord:X,reflection:H,tokenCount:$.tokenCount});return X.bufferedReflection=void 0,X.bufferedReflectionTokens=void 0,X.bufferedReflectionInputTokens=void 0,X.reflectedObservationLineCount=void 0,z}async setReflectingFlag($,Y){let X=this.findObservationalMemoryRecordById($);if(!X)throw Error(`Observational memory record not found: ${$}`);X.isReflecting=Y,X.updatedAt=new Date}async setObservingFlag($,Y){let X=this.findObservationalMemoryRecordById($);if(!X)throw Error(`Observational memory record not found: ${$}`);X.isObserving=Y,X.updatedAt=new Date}async setBufferingObservationFlag($,Y,X){let G=this.findObservationalMemoryRecordById($);if(!G)throw Error(`Observational memory record not found: ${$}`);if(G.isBufferingObservation=Y,X!==void 0)G.lastBufferedAtTokens=X;G.updatedAt=new Date}async setBufferingReflectionFlag($,Y){let X=this.findObservationalMemoryRecordById($);if(!X)throw Error(`Observational memory record not found: ${$}`);X.isBufferingReflection=Y,X.updatedAt=new Date}async clearObservationalMemory($,Y){let X=this.getObservationalMemoryKey($,Y);this.db.observationalMemory.delete(X)}async setPendingMessageTokens($,Y){let X=this.findObservationalMemoryRecordById($);if(!X)throw Error(`Observational memory record not found: ${$}`);X.pendingMessageTokens=Y,X.updatedAt=new Date}async updateObservationalMemoryConfig($){let Y=this.findObservationalMemoryRecordById($.id);if(!Y)throw Error(`Observational memory record not found: ${$.id}`);Y.config=this.deepMergeConfig(Y.config,$.config),Y.updatedAt=new Date}findObservationalMemoryRecordById($){for(let Y of this.db.observationalMemory.values()){let X=Y.find((G)=>G.id===$);if(X)return X}return null}},Ym=class extends qW{constructor(){super({component:"STORAGE",name:"SCHEDULES"})}async dangerouslyClearAll(){}};Yy0=class extends Ym{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.schedules.clear(),this.db.scheduleTriggers.length=0}async createSchedule($){if(this.db.schedules.has($.id))throw Error(`Schedule ${$.id} already exists`);let Y=ez($);return this.db.schedules.set(Y.id,Y),ez(Y)}async getSchedule($){let Y=this.db.schedules.get($);return Y?ez(Y):null}async listSchedules($){let Y=Array.from(this.db.schedules.values());if($?.status)Y=Y.filter((X)=>X.status===$.status);if($?.workflowId)Y=Y.filter((X)=>X.target.type==="workflow"&&X.target.workflowId===$.workflowId);if($?.ownerType!==void 0)Y=Y.filter((X)=>(X.ownerType??null)===$.ownerType);if($?.ownerId!==void 0)Y=Y.filter((X)=>(X.ownerId??null)===$.ownerId);return Y.sort((X,G)=>X.createdAt-G.createdAt),Y.map(ez)}async listDueSchedules($,Y){let X=[];for(let J of this.db.schedules.values())if(J.status==="active"&&J.nextFireAt<=$)X.push(J);X.sort((J,Q)=>J.nextFireAt-Q.nextFireAt);let G=Y??X.length;return X.slice(0,G).map(ez)}async updateSchedule($,Y){let X=this.db.schedules.get($);if(!X)throw Error(`Schedule ${$} not found`);let G={...X,...Y,target:Y.target!==void 0?Y.target:X.target,metadata:Y.metadata!==void 0?Y.metadata:X.metadata,updatedAt:Date.now()},J=ez(G);return this.db.schedules.set($,J),ez(J)}async updateScheduleNextFire($,Y,X,G,J){let Q=this.db.schedules.get($);if(!Q)return!1;if(Q.nextFireAt!==Y)return!1;if(Q.status!=="active")return!1;let W={...Q,nextFireAt:X,lastFireAt:G,lastRunId:J,updatedAt:Date.now()};return this.db.schedules.set($,W),!0}async deleteSchedule($){this.db.schedules.delete($);for(let Y=this.db.scheduleTriggers.length-1;Y>=0;Y--)if(this.db.scheduleTriggers[Y].scheduleId===$)this.db.scheduleTriggers.splice(Y,1)}async recordTrigger($){let Y={...$,id:$.id??ty8(),triggerKind:$.triggerKind??"schedule-fire"};this.db.scheduleTriggers.push(ez(Y))}async listTriggers($,Y){let X=this.db.scheduleTriggers.filter((G)=>G.scheduleId===$);if(Y?.fromActualFireAt!=null)X=X.filter((G)=>G.actualFireAt>=Y.fromActualFireAt);if(Y?.toActualFireAt!=null)X=X.filter((G)=>G.actualFireAt<Y.toActualFireAt);if(X.sort((G,J)=>J.actualFireAt-G.actualFireAt),Y?.limit!=null)X=X.slice(0,Y.limit);return X.map(ez)}},Xm=class extends qW{constructor(){super({component:"STORAGE",name:"SCORES"})}async dangerouslyClearAll(){}async listScoresBySpan({traceId:$,spanId:Y,pagination:X}){throw new G0({id:"SCORES_STORAGE_GET_SCORES_BY_SPAN_NOT_IMPLEMENTED",domain:"STORAGE",category:"SYSTEM",details:{traceId:$,spanId:Y}})}},Xy0=class extends Xm{db;constructor({db:$}){super();this.db=$}async dangerouslyClearAll(){this.db.scores.clear()}async getScoreById({id:$}){return this.db.scores.get($)??null}async saveScore($){let Y={id:crypto.randomUUID(),createdAt:new Date,updatedAt:new Date,...$};return this.db.scores.set(Y.id,Y),{score:Y}}async listScoresByScorerId({scorerId:$,pagination:Y,entityId:X,entityType:G,source:J}){let Q=Array.from(this.db.scores.values()).filter((F)=>{let L=F.scorerId===$;if(X)L=L&&F.entityId===X;if(G)L=L&&F.entityType===G;if(J)L=L&&F.source===J;return L}),{page:W,perPage:K}=Y,Z=F4(K,Number.MAX_SAFE_INTEGER),{offset:H,perPage:z}=B4(W,K,Z),V=K===!1?Q.length:H+Z;return{scores:Q.slice(H,V),pagination:{total:Q.length,page:W,perPage:z,hasMore:K===!1?!1:Q.length>V}}}async listScoresByRunId({runId:$,pagination:Y}){let X=Array.from(this.db.scores.values()).filter((H)=>H.runId===$),{page:G,perPage:J}=Y,Q=F4(J,Number.MAX_SAFE_INTEGER),{offset:W,perPage:K}=B4(G,J,Q),Z=J===!1?X.length:W+Q;return{scores:X.slice(W,Z),pagination:{total:X.length,page:G,perPage:K,hasMore:J===!1?!1:X.length>Z}}}async listScoresByEntityId({entityId:$,entityType:Y,pagination:X}){let G=Array.from(this.db.scores.values()).filter((z)=>{return z.entityId===$&&z.entityType===Y}),{page:J,perPage:Q}=X,W=F4(Q,Number.MAX_SAFE_INTEGER),{offset:K,perPage:Z}=B4(J,Q,W),H=Q===!1?G.length:K+W;return{scores:G.slice(K,H),pagination:{total:G.length,page:J,perPage:Z,hasMore:Q===!1?!1:G.length>H}}}async listScoresBySpan({traceId:$,spanId:Y,pagination:X}){let G=Array.from(this.db.scores.values()).filter((z)=>z.traceId===$&&z.spanId===Y);G.sort((z,V)=>new Date(V.createdAt).getTime()-new Date(z.createdAt).getTime());let{page:J,perPage:Q}=X,W=F4(Q,Number.MAX_SAFE_INTEGER),{offset:K,perPage:Z}=B4(J,Q,W),H=Q===!1?G.length:K+W;return{scores:G.slice(K,H),pagination:{total:G.length,page:J,perPage:Z,hasMore:Q===!1?!1:G.length>H}}}};Gm=class extends qW{constructor(){super({component:"STORAGE",name:"WORKFLOWS"})}},Gy0=class extends Gm{db;constructor({db:$}){super();this.db=$}supportsConcurrentUpdates(){return!0}async dangerouslyClearAll(){this.db.workflows.clear()}getWorkflowKey($,Y){return`${$}-${Y}`}async updateWorkflowResults({workflowName:$,runId:Y,stepId:X,result:G,requestContext:J}){let Q=this.getWorkflowKey($,Y),W=this.db.workflows.get(Q);if(!W)return{};let K;if(!W.snapshot)K={context:{},activePaths:[],activeStepsPath:{},timestamp:Date.now(),suspendedPaths:{},resumeLabels:{},serializedStepGraph:[],value:{},waitingPaths:{},status:"pending",runId:W.run_id},this.db.workflows.set(Q,{...W,snapshot:K});else K=typeof W.snapshot==="string"?JSON.parse(W.snapshot):W.snapshot;if(!K||!K?.context)throw Error(`Snapshot not found for runId ${Y}`);let Z=K.context[X];if(Z&&"output"in Z&&Array.isArray(Z.output)&&G&&typeof G==="object"&&"output"in G&&Array.isArray(G.output)){let H=Z.output,z=G.output,V=[...H];for(let F=0;F<Math.max(H.length,z.length);F++)if(F<z.length){let L=z[F];if(Nb8(L))V[F]=null;else if(L!==null)V[F]=L}K.context[X]={...Z,...G,output:V}}else K.context[X]=G;return K.requestContext={...K.requestContext,...J},this.db.workflows.set(Q,{...W,snapshot:K}),JSON.parse(JSON.stringify(K.context))}async updateWorkflowState({workflowName:$,runId:Y,opts:X}){let G=this.getWorkflowKey($,Y),J=this.db.workflows.get(G);if(!J)return;let Q;if(!J.snapshot)Q={context:{},activePaths:[],activeStepsPath:{},timestamp:Date.now(),suspendedPaths:{},resumeLabels:{},serializedStepGraph:[],value:{},waitingPaths:{},status:"pending",runId:J.run_id},this.db.workflows.set(G,{...J,snapshot:Q});else Q=typeof J.snapshot==="string"?JSON.parse(J.snapshot):J.snapshot;if(!Q||!Q?.context)throw Error(`Snapshot not found for runId ${Y}`);return Q={...Q,...X},this.db.workflows.set(G,{...J,snapshot:Q}),Q}async persistWorkflowSnapshot({workflowName:$,runId:Y,resourceId:X,snapshot:G,createdAt:J,updatedAt:Q}){let W=this.getWorkflowKey($,Y),K=new Date,Z={workflow_name:$,run_id:Y,resourceId:X,snapshot:G,createdAt:J??K,updatedAt:Q??K};this.db.workflows.set(W,Z)}async loadWorkflowSnapshot({workflowName:$,runId:Y}){let X=this.getWorkflowKey($,Y),G=this.db.workflows.get(X);if(!G)return null;let J=typeof G.snapshot==="string"?JSON.parse(G.snapshot):G.snapshot;return J?JSON.parse(JSON.stringify(J)):null}async listWorkflowRuns({workflowName:$,fromDate:Y,toDate:X,perPage:G,page:J,resourceId:Q,status:W}={}){if(J!==void 0&&J<0)throw Error("page must be >= 0");let K=Array.from(this.db.workflows.values());if($)K=K.filter((z)=>z.workflow_name===$);if(W)K=K.filter((z)=>{let V=z?.snapshot;if(!V)return!1;if(typeof V==="string")try{V=JSON.parse(V)}catch{return!1}else V=JSON.parse(JSON.stringify(V));return V.status===W});if(Y&&X)K=K.filter((z)=>new Date(z.createdAt).getTime()>=Y.getTime()&&new Date(z.createdAt).getTime()<=X.getTime());else if(Y)K=K.filter((z)=>new Date(z.createdAt).getTime()>=Y.getTime());else if(X)K=K.filter((z)=>new Date(z.createdAt).getTime()<=X.getTime());if(Q)K=K.filter((z)=>z.resourceId===Q);let Z=K.length;if(K.sort((z,V)=>new Date(V.createdAt).getTime()-new Date(z.createdAt).getTime()),G!==void 0&&J!==void 0){let z=F4(G,Number.MAX_SAFE_INTEGER),F=J*z,L=F+z;K=K.slice(F,L)}return{runs:K.map((z)=>({...z,snapshot:typeof z.snapshot==="string"?JSON.parse(z.snapshot):JSON.parse(JSON.stringify(z.snapshot)),createdAt:new Date(z.createdAt),updatedAt:new Date(z.updatedAt),runId:z.run_id,workflowName:z.workflow_name,resourceId:z.resourceId})),total:Z}}async getWorkflowRunById({runId:$,workflowName:Y}){let G=Array.from(this.db.workflows.values()).filter((Q)=>Q.run_id===$).find((Q)=>Q.workflow_name===Y);if(!G)return null;return{...G,snapshot:typeof G.snapshot==="string"?JSON.parse(G.snapshot):JSON.parse(JSON.stringify(G.snapshot)),createdAt:new Date(G.createdAt),updatedAt:new Date(G.updatedAt),runId:G.run_id,workflowName:G.workflow_name,resourceId:G.resourceId}}async deleteWorkflowRunById({runId:$,workflowName:Y}){let X=this.getWorkflowKey(Y,$);this.db.workflows.delete(X)}},Jy0=class extends cL{stores;#$;constructor({id:$="in-memory"}={}){super({id:$,name:"InMemoryStorage"});this.hasInitialized=Promise.resolve(!0),this.#$=new ex0,this.stores={memory:new $y0({db:this.#$}),workflows:new Gy0({db:this.#$}),scores:new Xy0({db:this.#$}),observability:new ix0({db:this.#$}),agents:new r80({db:this.#$}),channels:new sx0,datasets:new ox0({db:this.#$}),experiments:new tx0({db:this.#$}),promptBlocks:new m80({db:this.#$}),scorerDefinitions:new p80({db:this.#$}),mcpClients:new t80({db:this.#$}),mcpServers:new f80({db:this.#$}),workspaces:new i80({db:this.#$}),skills:new c80({db:this.#$}),favorites:new o80({db:this.#$}),blobs:new ax0,backgroundTasks:new rx0({db:this.#$}),schedules:new Yy0({db:this.#$})}}clear(){this.#$.clear(),this.stores.channels?.dangerouslyClearAll?.()}},Z64=Jy0;H64=class extends cL{#$;#Y;constructor($={}){let Y=px0($.dir??".mastra-storage");super({id:"filesystem",name:"FilesystemStore"});this.#Y=Y,this.#$=new Qy0(Y),this.stores={agents:new a80({db:this.#$}),promptBlocks:new u80({db:this.#$}),scorerDefinitions:new d80({db:this.#$}),mcpClients:new e80({db:this.#$}),mcpServers:new g80({db:this.#$}),workspaces:new n80({db:this.#$}),skills:new l80({db:this.#$})}}get dir(){return this.#Y}},Wy0=class extends u8{constructor(){super({component:"STORAGE",name:"OPERATIONS"})}getSqlType($){switch($){case"text":return"TEXT";case"timestamp":return"TIMESTAMP";case"float":return"FLOAT";case"integer":return"INTEGER";case"bigint":return"BIGINT";case"jsonb":return"JSONB";default:return"TEXT"}}getDefaultValue($){switch($){case"text":case"uuid":return"DEFAULT ''";case"timestamp":return"DEFAULT '1970-01-01 00:00:00'";case"integer":case"bigint":case"float":return"DEFAULT 0";case"jsonb":return"DEFAULT '{}'";default:return"DEFAULT ''"}}async createIndex($){throw new G0({id:"MASTRA_STORAGE_CREATE_INDEX_NOT_SUPPORTED",domain:"STORAGE",category:"SYSTEM",text:"Index management is not supported by this storage adapter"})}async dropIndex($){throw new G0({id:"MASTRA_STORAGE_DROP_INDEX_NOT_SUPPORTED",domain:"STORAGE",category:"SYSTEM",text:"Index management is not supported by this storage adapter"})}async listIndexes($){throw new G0({id:"MASTRA_STORAGE_LIST_INDEXES_NOT_SUPPORTED",domain:"STORAGE",category:"SYSTEM",text:"Index management is not supported by this storage adapter"})}async describeIndex($){throw new G0({id:"MASTRA_STORAGE_DESCRIBE_INDEX_NOT_SUPPORTED",domain:"STORAGE",category:"SYSTEM",text:"Index management is not supported by this storage adapter"})}getAutomaticIndexDefinitions(){return[]}},z64=class extends Wy0{data;constructor(){super();this.data={mastra_workflow_snapshot:new Map,mastra_messages:new Map,mastra_threads:new Map,mastra_traces:new Map,mastra_resources:new Map,mastra_scorers:new Map,mastra_ai_spans:new Map,mastra_agents:new Map,mastra_agent_versions:new Map,mastra_observational_memory:new Map,mastra_prompt_blocks:new Map,mastra_prompt_block_versions:new Map,mastra_scorer_definitions:new Map,mastra_scorer_definition_versions:new Map,mastra_mcp_clients:new Map,mastra_mcp_client_versions:new Map,mastra_mcp_servers:new Map,mastra_mcp_server_versions:new Map,mastra_workspaces:new Map,mastra_workspace_versions:new Map,mastra_skills:new Map,mastra_skill_versions:new Map,mastra_skill_blobs:new Map,mastra_datasets:new Map,mastra_dataset_items:new Map,mastra_dataset_versions:new Map,mastra_experiments:new Map,mastra_experiment_results:new Map,mastra_background_tasks:new Map,mastra_favorites:new Map,mastra_schedules:new Map,mastra_schedule_triggers:new Map,mastra_channel_installations:new Map,mastra_channel_config:new Map}}getDatabase(){return this.data}async insert({tableName:$,record:Y}){let X=this.data[$],G=Y.id;if([L$].includes($)&&!Y.id&&Y.run_id)G=Y.workflow_name?`${Y.workflow_name}-${Y.run_id}`:Y.run_id,Y.id=G;else if(!Y.id)G=`auto-${Date.now()}-${Math.random()}`,Y.id=G;X.set(G,Y)}async batchInsert({tableName:$,records:Y}){let X=this.data[$];for(let G of Y){let J=G.id;if([L$].includes($)&&!G.id&&G.run_id)J=G.run_id,G.id=J;else if(!G.id)J=`auto-${Date.now()}-${Math.random()}`,G.id=J;X.set(J,G)}}async load({tableName:$,keys:Y}){let X=this.data[$];return Array.from(X.values()).filter((J)=>Object.keys(Y).every((Q)=>J[Q]===Y[Q]))?.[0]}async createTable({tableName:$,schema:Y}){this.data[$]=new Map}async clearTable({tableName:$}){this.data[$].clear()}async dropTable({tableName:$}){this.data[$].clear()}async alterTable({tableName:$,schema:Y}){}async hasColumn($,Y){return!0}}});var S0$=class{#$;#Y;constructor($,Y){this.#$=$,this.#Y=Y}setLoggerVNext($){this.#Y=$}debug($,...Y){this.#$.debug($,...Y),this.#J("debug",$,Y)}info($,...Y){this.#$.info($,...Y),this.#J("info",$,Y)}warn($,...Y){this.#$.warn($,...Y),this.#J("warn",$,Y)}error($,...Y){this.#$.error($,...Y),this.#J("error",$,Y)}trackException($,Y){this.#$.trackException($,Y);try{this.#X()?.error($.message,{errorId:$.id,domain:$.domain,category:$.category,details:$.details,cause:$.cause?.message,...Y})}catch{}}getTransports(){return this.#$.getTransports()}async listLogs($,Y){return this.#$.listLogs($,Y)}async listLogsByRunId($){return this.#$.listLogsByRunId($)}#X(){let $=kS0();if($){let Y=$.observabilityInstance?.getLoggerContext?.($);if(Y)return Y}return this.#Y?.()}#J($,Y,X){try{let G=this.#X();if(!G)return;let J=X.find((K)=>K!==null&&typeof K==="object"&&!Array.isArray(K)&&!(K instanceof Error)),Q=X.find((K)=>K instanceof Error),W=X.filter((K)=>K!==J&&K!==Q);G[$](Y,{...J??{},...Q?{error:{name:Q.name,message:Q.message,stack:Q.stack}}:{},...W.length>0?{args:W}:{}})}catch{}}},Ky0;var V64=V0(()=>{TO();Ky0={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{},cleanup:async()=>{},getTransports:()=>new Map,trackException:()=>{},listLogs:async()=>({logs:[],total:0,page:1,perPage:100,hasMore:!1}),listLogsByRunId:async()=>({logs:[],total:0,page:1,perPage:100,hasMore:!1})}});import Bb8 from"events";var Ob8=class{get supportedModes(){return["pull"]}getHistory($,Y){return Promise.resolve([])}subscribeWithReplay($,Y){return this.subscribe($,Y)}subscribeFromOffset($,Y,X){return this.subscribeWithReplay($,X)}},F64;var L64=V0(()=>{F64=class extends Ob8{get supportedModes(){return["pull","push"]}emitter;groups=new Map;groupCounters=new Map;groupListeners=new Map;pendingNacks=new Set;deliveryAttempts=new Map;fanoutWrappers=new Map;constructor($){super();this.emitter=$??new Bb8}async publish($,Y){let X=crypto.randomUUID(),G=new Date;this.emitter.emit($,{...Y,id:X,createdAt:G,deliveryAttempt:1})}async subscribe($,Y,X){if(X?.group)this.subscribeWithGroup($,Y,X.group);else{let G=(Q)=>{Y(Q,async()=>{},async()=>{})},J=this.fanoutWrappers.get($);if(!J)J=new Map,this.fanoutWrappers.set($,J);J.set(Y,G),this.emitter.on($,G)}}async unsubscribe($,Y){for(let[J,Q]of this.groups){let W=Q.get($);if(W){let K=W.indexOf(Y);if(K!==-1){if(W.splice(K,1),W.length===0){Q.delete($);let Z=`${$}:${J}`,H=this.groupListeners.get(Z);if(H)this.emitter.off($,H),this.groupListeners.delete(Z),this.groupCounters.delete(Z)}if(Q.size===0)this.groups.delete(J);return}}}let X=this.fanoutWrappers.get($),G=X?.get(Y);if(G&&X){if(this.emitter.off($,G),X.delete(Y),X.size===0)this.fanoutWrappers.delete($)}else this.emitter.off($,Y)}async flush(){if(this.pendingNacks.size>0)await new Promise(($)=>{let Y=()=>{if(this.pendingNacks.size===0)$();else setTimeout(Y,10)};Y()})}async close(){for(let $ of this.pendingNacks)clearTimeout($);this.pendingNacks.clear(),this.deliveryAttempts.clear(),this.emitter.removeAllListeners(),this.groups.clear(),this.groupCounters.clear(),this.groupListeners.clear(),this.fanoutWrappers.clear()}subscribeWithGroup($,Y,X){let G=this.groups.get(X);if(!G)G=new Map,this.groups.set(X,G);let J=G.get($);if(!J)J=[],G.set($,J);J.push(Y);let Q=`${$}:${X}`;if(!this.groupListeners.has(Q)){let W=(K)=>{this.deliverToGroup($,X,Q,K)};this.groupListeners.set(Q,W),this.emitter.on($,W)}}deliverToGroup($,Y,X,G){let J=this.groups.get(Y)?.get($);if(!J||J.length===0)return;let Q=this.groupCounters.get(X)??0,W=Q%J.length;this.groupCounters.set(X,Q+1);let K=`${X}:${G.id}`,Z=this.deliveryAttempts.get(K)??1,H={...G,deliveryAttempt:Z},z=async()=>{this.deliveryAttempts.delete(K)},V=async()=>{this.deliveryAttempts.set(K,Z+1);let F=setTimeout(()=>{this.pendingNacks.delete(F),this.deliverToGroup($,Y,X,G)},0);this.pendingNacks.add(F)};J[W](H,z,V)}}});function Eb8($){return $=$||new Map,{all:$,on(Y,X){let G=$.get(Y);if(G)G.push(X);else $.set(Y,[X])},off(Y,X){let G=$.get(Y);if(G)if(X)G.splice(G.indexOf(X)>>>0,1);else $.set(Y,[])},emit(Y,X){let G=$.get(Y);if(G)G.slice().map((J)=>{J(X)});if(G=$.get("*"),G)G.slice().map((J)=>{J(Y,X)})}}}function D64($,Y){setImmediate(()=>{Mb8.emit($,Y)})}var Mb8;var N64=V0(()=>{Mb8=Eb8()});function R94($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function Zy0($){}function yb8($){if(typeof $=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:Y=Zy0,onError:X=Zy0,onRetry:G=Zy0,onComment:J}=$,Q="",W=!0,K,Z="",H="";function z(D){let A=W?D.replace(/^\xEF\xBB\xBF/,""):D,[B,O]=bb8(`${Q}${A}`);for(let E of B)V(E);Q=O,W=!1}function V(D){if(D===""){L();return}if(D.startsWith(":")){J&&J(D.slice(D.startsWith(": ")?2:1));return}let A=D.indexOf(":");if(A!==-1){let B=D.slice(0,A),O=D[A+1]===" "?2:1,E=D.slice(A+O);F(B,E,D);return}F(D,"",D)}function F(D,A,B){switch(D){case"event":H=A;break;case"data":Z=`${Z}${A}
`;break;case"id":K=A.includes("\x00")?void 0:A;break;case"retry":/^\d+$/.test(A)?G(parseInt(A,10)):X(new d64(`Invalid \`retry\` value: "${A}"`,{type:"invalid-retry",value:A,line:B}));break;default:X(new d64(`Unknown field "${D.length>20?`${D.slice(0,20)}\u2026`:D}"`,{type:"unknown-field",field:D,value:A,line:B}));break}}function L(){Z.length>0&&Y({id:K,event:H||void 0,data:Z.endsWith(`
`)?Z.slice(0,-1):Z}),K=void 0,Z="",H=""}function N(D={}){Q&&D.consume&&V(Q),W=!0,K=void 0,Z="",H="",Q=""}return{feed:z,reset:N}}function bb8($){let Y=[],X="",G=0;for(;G<$.length;){let J=$.indexOf("\r",G),Q=$.indexOf(`
`,G),W=-1;if(J!==-1&&Q!==-1?W=Math.min(J,Q):J!==-1?J===$.length-1?W=-1:W=J:Q!==-1&&(W=Q),W===-1){X=$.slice(G);break}else{let K=$.slice(G,W);Y.push(K),G=W+1,$[G-1]==="\r"&&$[G]===`
`&&G++}}return[Y,X]}function o6(...$){return $.reduce((Y,X)=>({...Y,...X!=null?X:{}}),{})}function hb8($){let Y=!1;return new ReadableStream({async pull(X){if(Y)return;try{let{value:G,done:J}=await $.next();if(J)X.close();else X.enqueue(G)}catch(G){X.error(G)}},async cancel(X){if(Y=!0,$.return)try{await $.return(X)}catch(G){}}})}async function fb8($,Y){if($==null)return Promise.resolve();let X=Y==null?void 0:Y.abortSignal;return new Promise((G,J)=>{if(X==null?void 0:X.aborted){J(c64());return}let Q=setTimeout(()=>{W(),G()},$),W=()=>{clearTimeout(Q),X==null||X.removeEventListener("abort",K)},K=()=>{W(),J(c64())};X==null||X.addEventListener("abort",K)})}function c64(){return new DOMException("Delay was aborted","AbortError")}function XV($){return Object.fromEntries([...$.headers])}async function ub8({response:$,url:Y,maxBytes:X=r94}){let G=$.headers.get("content-length");if(G!=null){let z=parseInt(G,10);if(!isNaN(z)&&z>X)throw new YV({url:Y,message:`Download of ${Y} exceeded maximum size of ${X} bytes (Content-Length: ${z}).`})}let J=$.body;if(J==null)return new Uint8Array(0);let Q=J.getReader(),W=[],K=0;try{while(!0){let{done:z,value:V}=await Q.read();if(z)break;if(K+=V.length,K>X)throw new YV({url:Y,message:`Download of ${Y} exceeded maximum size of ${X} bytes.`});W.push(V)}}finally{try{await Q.cancel()}finally{Q.releaseLock()}}let Z=new Uint8Array(K),H=0;for(let z of W)Z.set(z,H),H+=z.length;return Z}function pb8($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function YT($){return($ instanceof Error||$ instanceof DOMException)&&($.name==="AbortError"||$.name==="ResponseAborted"||$.name==="TimeoutError")}function s94({error:$,url:Y,requestBodyValues:X}){if(YT($))return $;if($ instanceof TypeError&&db8.includes($.message.toLowerCase())){let G=$.cause;if(G!=null)return new FY({message:`Cannot connect to API: ${G.message}`,cause:G,url:Y,requestBodyValues:X,isRetryable:!0})}return $}function yy0($=globalThis){var Y,X,G;if($.window)return"runtime/browser";if((Y=$.navigator)==null?void 0:Y.userAgent)return`runtime/${$.navigator.userAgent.toLowerCase()}`;if((G=(X=$.process)==null?void 0:X.versions)==null?void 0:G.node)return`runtime/node.js/${$.process.version.substring(0)}`;if($.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function o94($){if($==null)return{};let Y={};if($ instanceof Headers)$.forEach((X,G)=>{Y[G.toLowerCase()]=X});else{if(!Array.isArray($))$=Object.entries($);for(let[X,G]of $)if(G!=null)Y[X.toLowerCase()]=G}return Y}function _Q($,...Y){let X=new Headers(o94($)),G=X.get("user-agent")||"";return X.set("user-agent",[G,...Y].filter(Boolean).join(" ")),Object.fromEntries(X.entries())}function ab8({prompt:$,schema:Y,schemaPrefix:X=Y!=null?ib8:void 0,schemaSuffix:G=Y!=null?nb8:rb8}){return[$!=null&&$.length>0?$:void 0,$!=null&&$.length>0?"":void 0,X,Y!=null?JSON.stringify(Y):void 0,G].filter((J)=>J!=null).join(`
`)}function sb8({messages:$,schema:Y,schemaPrefix:X,schemaSuffix:G}){var J,Q;let W=((J=$[0])==null?void 0:J.role)==="system"?{...$[0]}:{role:"system",content:""};return W.content=ab8({prompt:W.content,schema:Y,schemaPrefix:X,schemaSuffix:G}),[W,...((Q=$[0])==null?void 0:Q.role)==="system"?$.slice(1):$]}function ob8({mediaType:$,url:Y,supportedUrls:X}){return Y=Y.toLowerCase(),$=$.toLowerCase(),Object.entries(X).map(([G,J])=>{let Q=G.toLowerCase();return Q==="*"||Q==="*/*"?{mediaTypePrefix:"",regexes:J}:{mediaTypePrefix:Q.replace(/\*/,""),regexes:J}}).filter(({mediaTypePrefix:G})=>$.startsWith(G)).flatMap(({regexes:G})=>G).some((G)=>G.test(Y))}function rZ({apiKey:$,environmentVariableName:Y,apiKeyParameterName:X="apiKey",description:G}){if(typeof $==="string")return $;if($!=null)throw new A90({message:`${G} API key must be a string.`});if(typeof process>"u")throw new A90({message:`${G} API key is missing. Pass it using the '${X}' parameter. Environment variables is not supported in this environment.`});if($=process.env[Y],$==null)throw new A90({message:`${G} API key is missing. Pass it using the '${X}' parameter or the ${Y} environment variable.`});if(typeof $!=="string")throw new A90({message:`${G} API key must be a string. The value of the ${Y} environment variable is not a string.`});return $}function hy0({settingValue:$,environmentVariableName:Y}){if(typeof $==="string")return $;if($!=null||typeof process>"u")return;if($=process.env[Y],$==null||typeof $!=="string")return;return $}function fy0({settingValue:$,environmentVariableName:Y,settingName:X,description:G}){if(typeof $==="string")return $;if($!=null)throw new B90({message:`${G} setting must be a string.`});if(typeof process>"u")throw new B90({message:`${G} setting is missing. Pass it using the '${X}' parameter. Environment variables is not supported in this environment.`});if($=process.env[Y],$==null)throw new B90({message:`${G} setting is missing. Pass it using the '${X}' parameter or the ${Y} environment variable.`});if(typeof $!=="string")throw new B90({message:`${G} setting must be a string. The value of the ${Y} environment variable is not a string.`});return $}function C90($){var Y;let[X,G=""]=$.toLowerCase().split("/");return(Y={mpeg:"mp3","x-wav":"wav",opus:"ogg",mp4:"m4a","x-m4a":"m4a"}[G])!=null?Y:G}function n64($){let Y=JSON.parse($);if(Y===null||typeof Y!=="object")return Y;if(tb8.test($)===!1&&eb8.test($)===!1)return Y;return $h8(Y)}function $h8($){let Y=[$];while(Y.length){let X=Y;Y=[];for(let G of X){if(Object.prototype.hasOwnProperty.call(G,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(G,"constructor")&&G.constructor!==null&&typeof G.constructor==="object"&&Object.prototype.hasOwnProperty.call(G.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let J in G){let Q=G[J];if(Q&&typeof Q==="object")Y.push(Q)}}}return $}function gy0($){let{stackTraceLimit:Y}=Error;try{Error.stackTraceLimit=0}catch(X){return n64($)}try{return n64($)}finally{Error.stackTraceLimit=Y}}function t94($){return{[w90]:!0,validate:$}}function e94($){return typeof $==="object"&&$!==null&&w90 in $&&$[w90]===!0&&"validate"in $}function j8($){let Y;return()=>{if(Y==null)Y=$();return Y}}function $54($){return e94($)?$:typeof $==="function"?$():Y54($)}function Y54($){return t94(async(Y)=>{let X=await $["~standard"].validate(Y);return X.issues==null?{success:!0,value:X.value}:{success:!1,error:new Qm({value:Y,cause:X.issues})}})}async function MX({value:$,schema:Y}){let X=await S90({value:$,schema:Y});if(!X.success)throw Qm.wrap({value:$,cause:X.error});return X.value}async function S90({value:$,schema:Y}){let X=$54(Y);try{if(X.validate==null)return{success:!0,value:$,rawValue:$};let G=await X.validate($);if(G.success)return{success:!0,value:G.value,rawValue:$};return{success:!1,error:Qm.wrap({value:$,cause:G.error}),rawValue:$}}catch(G){return{success:!1,error:Qm.wrap({value:$,cause:G}),rawValue:$}}}async function X54({text:$,schema:Y}){try{let X=gy0($);if(Y==null)return X;return MX({value:X,schema:Y})}catch(X){if(P90.isInstance(X)||Qm.isInstance(X))throw X;throw new P90({text:$,cause:X})}}async function k90({text:$,schema:Y}){try{let X=gy0($);if(Y==null)return{success:!0,value:X,rawValue:X};return await S90({value:X,schema:Y})}catch(X){return{success:!1,error:P90.isInstance(X)?X:new P90({text:$,cause:X}),rawValue:void 0}}}function iZ($){try{return gy0($),!0}catch(Y){return!1}}function G54({stream:$,schema:Y}){return $.pipeThrough(new TextDecoderStream).pipeThrough(new l94).pipeThrough(new TransformStream({async transform({data:X},G){if(X==="[DONE]")return;G.enqueue(await k90({text:X,schema:Y}))}}))}async function j9({provider:$,providerOptions:Y,schema:X}){if((Y==null?void 0:Y[$])==null)return;let G=await S90({value:Y[$],schema:X});if(!G.success)throw new w94({argument:"providerOptions",message:`invalid ${$} provider options`,cause:G.error});return G.value}function uy0($){return $}function Xh8($){return{...$,type:"dynamic"}}function DD({id:$,name:Y,inputSchema:X}){return({execute:G,outputSchema:J,toModelOutput:Q,onInputStart:W,onInputDelta:K,onInputAvailable:Z,...H})=>uy0({type:"provider-defined",id:$,name:Y,args:H,inputSchema:X,outputSchema:J,execute:G,toModelOutput:Q,onInputStart:W,onInputDelta:K,onInputAvailable:Z})}function HJ({id:$,name:Y,inputSchema:X,outputSchema:G}){return({execute:J,toModelOutput:Q,onInputStart:W,onInputDelta:K,onInputAvailable:Z,...H})=>uy0({type:"provider-defined",id:$,name:Y,args:H,inputSchema:X,outputSchema:G,execute:J,toModelOutput:Q,onInputStart:W,onInputDelta:K,onInputAvailable:Z})}function Gh8($){return Object.fromEntries(Object.entries($).filter(([Y,X])=>X!=null))}async function XT($){if(typeof $==="function")$=$();return Promise.resolve($)}function Y6($){let Y;return()=>{if(Y==null)Y=$();return Y}}function y90($,{validate:Y}={}){return{[My0]:!0,_type:void 0,[w90]:!0,get jsonSchema(){if(typeof $==="function")$=$();return $},validate:Y}}function q90($){if($.type==="object"){$.additionalProperties=!1;let Y=$.properties;if(Y!=null)for(let X in Y)Y[X]=q90(Y[X])}if($.type==="array"&&$.items!=null)if(Array.isArray($.items))$.items=$.items.map((Y)=>q90(Y));else $.items=q90($.items);return $}function kW(){return{}}function Zh8($,Y){var X,G,J;let Q={type:"array"};if(((X=$.type)==null?void 0:X._def)&&((J=(G=$.type)==null?void 0:G._def)==null?void 0:J.typeName)!==U0.ZodAny)Q.items=a9($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)Q.minItems=$.minLength.value;if($.maxLength)Q.maxItems=$.maxLength.value;if($.exactLength)Q.minItems=$.exactLength.value,Q.maxItems=$.exactLength.value;return Q}function Uh8($){let Y={type:"integer",format:"int64"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function Hh8(){return{type:"boolean"}}function J54($,Y){return a9($.type._def,Y)}function Q54($,Y,X){let G=X!=null?X:Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>Q54($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Vh8($)}}function Fh8($,Y){return{...a9($.innerType._def,Y),default:$.defaultValue()}}function Lh8($,Y){return Y.effectStrategy==="input"?a9($.schema._def,Y):kW()}function Dh8($){return{type:"string",enum:Array.from($.values)}}function Ah8($,Y){let X=[a9($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),a9($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((J)=>!!J),G=[];return X.forEach((J)=>{if(Nh8(J))G.push(...J.allOf);else{let Q=J;if("additionalProperties"in J&&J.additionalProperties===!1){let{additionalProperties:W,...K}=J;Q=K}G.push(Q)}}),G.length?{allOf:G}:void 0}function Bh8($){let Y=typeof $.value;if(Y!=="bigint"&&Y!=="number"&&Y!=="boolean"&&Y!=="string")return{type:Array.isArray($.value)?"array":"object"};return{type:Y==="bigint"?"integer":Y,const:$.value}}function W54($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value;break;case"max":X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"email":switch(Y.emailStrategy){case"format:email":gZ(X,"email",G.message,Y);break;case"format:idn-email":gZ(X,"idn-email",G.message,Y);break;case"pattern:zod":ZJ(X,fZ.email,G.message,Y);break}break;case"url":gZ(X,"uri",G.message,Y);break;case"uuid":gZ(X,"uuid",G.message,Y);break;case"regex":ZJ(X,G.regex,G.message,Y);break;case"cuid":ZJ(X,fZ.cuid,G.message,Y);break;case"cuid2":ZJ(X,fZ.cuid2,G.message,Y);break;case"startsWith":ZJ(X,RegExp(`^${Hy0(G.value,Y)}`),G.message,Y);break;case"endsWith":ZJ(X,RegExp(`${Hy0(G.value,Y)}$`),G.message,Y);break;case"datetime":gZ(X,"date-time",G.message,Y);break;case"date":gZ(X,"date",G.message,Y);break;case"time":gZ(X,"time",G.message,Y);break;case"duration":gZ(X,"duration",G.message,Y);break;case"length":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"includes":{ZJ(X,RegExp(Hy0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")gZ(X,"ipv4",G.message,Y);if(G.version!=="v4")gZ(X,"ipv6",G.message,Y);break}case"base64url":ZJ(X,fZ.base64url,G.message,Y);break;case"jwt":ZJ(X,fZ.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")ZJ(X,fZ.ipv4Cidr,G.message,Y);if(G.version!=="v4")ZJ(X,fZ.ipv6Cidr,G.message,Y);break}case"emoji":ZJ(X,fZ.emoji(),G.message,Y);break;case"ulid":{ZJ(X,fZ.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{gZ(X,"binary",G.message,Y);break}case"contentEncoding:base64":{X.contentEncoding="base64";break}case"pattern:zod":{ZJ(X,fZ.base64,G.message,Y);break}}break}case"nanoid":ZJ(X,fZ.nanoid,G.message,Y)}return X}function Hy0($,Y){return Y.patternStrategy==="escape"?Eh8($):$}function Eh8($){let Y="";for(let X=0;X<$.length;X++){if(!Oh8.has($[X]))Y+="\\";Y+=$[X]}return Y}function gZ($,Y,X,G){var J;if($.format||((J=$.anyOf)==null?void 0:J.some((Q)=>Q.format))){if(!$.anyOf)$.anyOf=[];if($.format)$.anyOf.push({format:$.format}),delete $.format;$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else $.format=Y}function ZJ($,Y,X,G){var J;if($.pattern||((J=$.allOf)==null?void 0:J.some((Q)=>Q.pattern))){if(!$.allOf)$.allOf=[];if($.pattern)$.allOf.push({pattern:$.pattern}),delete $.pattern;$.allOf.push({pattern:a64(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else $.pattern=a64(Y,G)}function a64($,Y){var X;if(!Y.applyRegexFlags||!$.flags)return $.source;let G={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},J=G.i?$.source.toLowerCase():$.source,Q="",W=!1,K=!1,Z=!1;for(let H=0;H<J.length;H++){if(W){Q+=J[H],W=!1;continue}if(G.i){if(K){if(J[H].match(/[a-z]/)){if(Z)Q+=J[H],Q+=`${J[H-2]}-${J[H]}`.toUpperCase(),Z=!1;else if(J[H+1]==="-"&&((X=J[H+2])==null?void 0:X.match(/[a-z]/)))Q+=J[H],Z=!0;else Q+=`${J[H]}${J[H].toUpperCase()}`;continue}}else if(J[H].match(/[a-z]/)){Q+=`[${J[H]}${J[H].toUpperCase()}]`;continue}}if(G.m){if(J[H]==="^"){Q+=`(^|(?<=[\r
]))`;continue}else if(J[H]==="$"){Q+=`($|(?=[\r
]))`;continue}}if(G.s&&J[H]==="."){Q+=K?`${J[H]}\r
`:`[${J[H]}\r
]`;continue}if(Q+=J[H],J[H]==="\\")W=!0;else if(K&&J[H]==="]")K=!1;else if(!K&&J[H]==="[")K=!0}return Q}function K54($,Y){var X,G,J,Q,W,K;let Z={type:"object",additionalProperties:(X=a9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]}))!=null?X:Y.allowedAdditionalProperties};if(((G=$.keyType)==null?void 0:G._def.typeName)===U0.ZodString&&((J=$.keyType._def.checks)==null?void 0:J.length)){let{type:H,...z}=W54($.keyType._def,Y);return{...Z,propertyNames:z}}else if(((Q=$.keyType)==null?void 0:Q._def.typeName)===U0.ZodEnum)return{...Z,propertyNames:{enum:$.keyType._def.values}};else if(((W=$.keyType)==null?void 0:W._def.typeName)===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&((K=$.keyType._def.type._def.checks)==null?void 0:K.length)){let{type:H,...z}=J54($.keyType._def,Y);return{...Z,propertyNames:z}}return Z}function Mh8($,Y){if(Y.mapStrategy==="record")return K54($,Y);let X=a9($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||kW(),G=a9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||kW();return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function Rh8($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function qh8(){return{not:kW()}}function Ph8(){return{type:"null"}}function wh8($,Y){let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in Ry0)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=Ry0[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,K)=>K.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return _h8($,Y)}function jh8($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length))return{type:[Ry0[$.innerType._def.typeName],"null"]};let X=a9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function Th8($){let Y={type:"number"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"int":Y.type="integer";break;case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function Ih8($,Y){let X={type:"object",properties:{}},G=[],J=$.shape();for(let W in J){let K=J[W];if(K===void 0||K._def===void 0)continue;let Z=Sh8(K),H=a9(K._def,{...Y,currentPath:[...Y.currentPath,"properties",W],propertyPath:[...Y.currentPath,"properties",W]});if(H===void 0)continue;if(X.properties[W]=H,!Z)G.push(W)}if(G.length)X.required=G;let Q=Ch8($,Y);if(Q!==void 0)X.additionalProperties=Q;return X}function Ch8($,Y){if($.catchall._def.typeName!=="ZodNever")return a9($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function Sh8($){try{return $.isOptional()}catch(Y){return!0}}function xh8($,Y){return a9($.type._def,Y)}function yh8($,Y){let G={type:"array",uniqueItems:!0,items:a9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)G.minItems=$.minSize.value;if($.maxSize)G.maxItems=$.maxSize.value;return G}function bh8($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>a9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:a9($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>a9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function hh8(){return{not:kW()}}function fh8(){return kW()}function a9($,Y,X=!1){var G;let J=Y.seen.get($);if(Y.override){let Z=(G=Y.override)==null?void 0:G.call(Y,$,Y,J,X);if(Z!==Wh8)return Z}if(J&&!X){let Z=ph8(J,Y);if(Z!==void 0)return Z}let Q={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,Q);let W=mh8($,$.typeName,Y),K=typeof W==="function"?a9(W(),Y):W;if(K)dh8($,Y,K);if(Y.postProcess){let Z=Y.postProcess(K,$,Y);return Q.jsonSchema=K,Z}return Q.jsonSchema=K,K}function nh8($,Y){var X;let G=(X=Y==null?void 0:Y.useReferences)!=null?X:!1;return y90(()=>ih8($,{$refStrategy:G?"root":"none"}),{validate:async(J)=>{let Q=await $.safeParseAsync(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function rh8($,Y){var X;let G=(X=Y==null?void 0:Y.useReferences)!=null?X:!1;return y90(()=>q90(e$($,{target:"draft-7",io:"input",reused:G?"ref":"inline"})),{validate:async(J)=>{let Q=await oX($,J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function ah8($){return"_zod"in $}function v1($,Y){if(ah8($))return rh8($,Y);else return nh8($,Y)}function sh8($){return typeof $==="object"&&$!==null&&My0 in $&&$[My0]===!0&&"jsonSchema"in $&&"validate"in $}function oh8($){return $==null?y90({properties:{},additionalProperties:!1}):sh8($)?$:typeof $==="function"?$():v1($)}function b90($){let Y=$.replace(/-/g,"+").replace(/_/g,"/"),X=eh8(Y);return Uint8Array.from(X,(G)=>G.codePointAt(0))}function zm($){let Y="";for(let X=0;X<$.length;X++)Y+=String.fromCodePoint($[X]);return th8(Y)}function RX($){return $ instanceof Uint8Array?zm($):$}function $f8($){let Y;try{Y=new URL($)}catch(G){throw new YV({url:$,message:`Invalid URL: ${$}`})}if(Y.protocol==="data:")return;if(Y.protocol!=="http:"&&Y.protocol!=="https:")throw new YV({url:$,message:`URL scheme must be http, https, or data, got ${Y.protocol}`});let X=Y.hostname;if(!X)throw new YV({url:$,message:"URL must have a hostname"});if(X==="localhost"||X.endsWith(".local")||X.endsWith(".localhost"))throw new YV({url:$,message:`URL with hostname ${X} is not allowed`});if(X.startsWith("[")&&X.endsWith("]")){let G=X.slice(1,-1);if(Yf8(G))throw new YV({url:$,message:`URL with IPv6 address ${X} is not allowed`});return}if(Z54(X)){if(qy0(X))throw new YV({url:$,message:`URL with IP address ${X} is not allowed`});return}}function Z54($){let Y=$.split(".");if(Y.length!==4)return!1;return Y.every((X)=>{let G=Number(X);return Number.isInteger(G)&&G>=0&&G<=255&&String(G)===X})}function qy0($){let Y=$.split(".").map(Number),[X,G]=Y;if(X===0)return!0;if(X===10)return!0;if(X===127)return!0;if(X===169&&G===254)return!0;if(X===172&&G>=16&&G<=31)return!0;if(X===192&&G===168)return!0;return!1}function Yf8($){let Y=$.toLowerCase();if(Y==="::1")return!0;if(Y==="::")return!0;if(Y.startsWith("::ffff:")){let X=Y.slice(7);if(Z54(X))return qy0(X);let G=X.split(":");if(G.length===2){let J=parseInt(G[0],16),Q=parseInt(G[1],16);if(!isNaN(J)&&!isNaN(Q)){let W=J>>8&255,K=J&255,Z=Q>>8&255,H=Q&255;return qy0(`${W}.${K}.${Z}.${H}`)}}}if(Y.startsWith("fc")||Y.startsWith("fd"))return!0;if(Y.startsWith("fe80"))return!0;return!1}function aZ($){return $==null?void 0:$.replace(/\/$/,"")}function Xf8($){return $!=null&&typeof $[Symbol.asyncIterator]==="function"}async function*Gf8({execute:$,input:Y,options:X}){let G=$(Y,X);if(Xf8(G)){let J;for await(let Q of G)J=Q,yield{type:"preliminary",output:Q};yield{type:"final",output:J}}else yield{type:"final",output:await G}}function Jm($){var Y,X;return(X=(Y=$==null?void 0:$.providerOptions)==null?void 0:Y.openaiCompatible)!=null?X:{}}function Jf8($){let Y=[];for(let{role:X,content:G,...J}of $){let Q=Jm({...J});switch(X){case"system":{Y.push({role:"system",content:G,...Q});break}case"user":{if(G.length===1&&G[0].type==="text"){Y.push({role:"user",content:G[0].text,...Jm(G[0])});break}Y.push({role:"user",content:G.map((W)=>{let K=Jm(W);switch(W.type){case"text":return{type:"text",text:W.text,...K};case"file":if(W.mediaType.startsWith("image/")){let Z=W.mediaType==="image/*"?"image/jpeg":W.mediaType;return{type:"image_url",image_url:{url:W.data instanceof URL?W.data.toString():`data:${Z};base64,${RX(W.data)}`},...K}}else throw new _9({functionality:`file part media type ${W.mediaType}`})}}),...Q});break}case"assistant":{let W="",K="",Z=[];for(let H of G){let z=Jm(H);switch(H.type){case"text":{W+=H.text;break}case"reasoning":{K+=H.text;break}case"tool-call":{Z.push({id:H.toolCallId,type:"function",function:{name:H.toolName,arguments:JSON.stringify(H.input)},...z});break}}}Y.push({role:"assistant",content:W,...K.length>0?{reasoning_content:K}:{},tool_calls:Z.length>0?Z:void 0,...Q});break}case"tool":{for(let W of G){let K=W.output,Z;switch(K.type){case"text":case"error-text":Z=K.value;break;case"content":case"json":case"error-json":Z=JSON.stringify(K.value);break}let H=Jm(W);Y.push({role:"tool",tool_call_id:W.toolCallId,content:Z,...H})}break}default:throw Error(`Unsupported role: ${X}`)}}return Y}function s64({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function o64($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"unknown"}}function Wf8({tools:$,toolChoice:Y}){$=($==null?void 0:$.length)?$:void 0;let X=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:X};let G=[];for(let Q of $)if(Q.type==="provider-defined")X.push({type:"unsupported-tool",tool:Q});else G.push({type:"function",function:{name:Q.name,description:Q.description,parameters:Q.inputSchema}});if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:X};let J=Y.type;switch(J){case"auto":case"none":case"required":return{tools:G,toolChoice:J,toolWarnings:X};case"tool":return{tools:G,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:X};default:throw new _9({functionality:`tool choice type: ${J}`})}}function Kf8($){var Y,X,G,J,Q,W,K;return{inputTokens:(Y=$==null?void 0:$.prompt_tokens)!=null?Y:void 0,outputTokens:(X=$==null?void 0:$.completion_tokens)!=null?X:void 0,totalTokens:(G=$==null?void 0:$.total_tokens)!=null?G:void 0,reasoningTokens:(Q=(J=$==null?void 0:$.completion_tokens_details)==null?void 0:J.reasoning_tokens)!=null?Q:void 0,cachedInputTokens:(K=(W=$==null?void 0:$.prompt_tokens_details)==null?void 0:W.cached_tokens)!=null?K:void 0}}function Hf8({prompt:$,user:Y="user",assistant:X="assistant"}){let G="";if($[0].role==="system")G+=`${$[0].content}

`,$=$.slice(1);for(let{role:J,content:Q}of $)switch(J){case"system":throw new I90({message:"Unexpected system message in prompt: ${content}",prompt:$});case"user":{let W=Q.map((K)=>{switch(K.type){case"text":return K.text}}).filter(Boolean).join("");G+=`${Y}:
${W}

`;break}case"assistant":{let W=Q.map((K)=>{switch(K.type){case"text":return K.text;case"tool-call":throw new _9({functionality:"tool-call messages"})}}).join("");G+=`${X}:
${W}

`;break}case"tool":throw new _9({functionality:"tool messages"});default:throw Error(`Unsupported role: ${J}`)}return G+=`${X}:
`,{prompt:G,stopSequences:[`
${Y}:`]}}function t64({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function e64($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"unknown"}}function ND($){let Y=aZ($.baseURL),X=$.name,G={...$.apiKey&&{Authorization:`Bearer ${$.apiKey}`},...$.headers},J=()=>_Q(G,`ai-sdk/openai-compatible/${Af8}`),Q=(F)=>({provider:`${X}.${F}`,url:({path:L})=>{let N=new URL(`${Y}${L}`);if($.queryParams)N.search=new URLSearchParams($.queryParams).toString();return N.toString()},headers:J,fetch:$.fetch}),W=(F)=>K(F),K=(F)=>new Vm(F,{...Q("chat"),includeUsage:$.includeUsage,supportsStructuredOutputs:$.supportsStructuredOutputs,supportedUrls:$.supportedUrls,transformRequestBody:$.transformRequestBody,metadataExtractor:$.metadataExtractor,convertUsage:$.convertUsage}),Z=(F)=>new f90(F,{...Q("completion"),includeUsage:$.includeUsage}),H=(F)=>new g90(F,{...Q("embedding")}),z=(F)=>new Df8(F,Q("image")),V=(F)=>W(F);return V.languageModel=W,V.chatModel=K,V.completionModel=Z,V.textEmbeddingModel=H,V.imageModel=z,V}function N54($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function Vy0($){}function vf8($){if(typeof $=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:Y=Vy0,onError:X=Vy0,onRetry:G=Vy0,onComment:J}=$,Q=[],W=!0,K,Z="",H=0,z;function V(B){if(W&&(W=!1,B.charCodeAt(0)===239&&B.charCodeAt(1)===187&&B.charCodeAt(2)===191&&(B=B.slice(3))),Q.length===0){let M=F(B);M!==""&&Q.push(M);return}if(B.indexOf(`
`)===-1&&B.indexOf("\r")===-1){Q.push(B);return}Q.push(B);let O=Q.join("");Q.length=0;let E=F(O);E!==""&&Q.push(E)}function F(B){let O=0;if(B.indexOf("\r")===-1){let E=B.indexOf(`
`,O);for(;E!==-1;){if(O===E){H>0&&Y({id:K,event:z,data:Z}),K=void 0,Z="",H=0,z=void 0,O=E+1,E=B.indexOf(`
`,O);continue}let M=B.charCodeAt(O);if(j84(B,O,M)){let R=B.charCodeAt(O+5)===UE?O+6:O+5,q=B.slice(R,E);if(H===0&&B.charCodeAt(E+1)===_84){Y({id:K,event:z,data:q}),K=void 0,Z="",z=void 0,O=E+2,E=B.indexOf(`
`,O);continue}Z=H===0?q:`${Z}
${q}`,H++}else T84(B,O,M)?z=B.slice(B.charCodeAt(O+6)===UE?O+7:O+6,E)||void 0:L(B,O,E);O=E+1,E=B.indexOf(`
`,O)}return B.slice(O)}for(;O<B.length;){let E=B.indexOf("\r",O),M=B.indexOf(`
`,O),R=-1;if(E!==-1&&M!==-1?R=E<M?E:M:E!==-1?E===B.length-1?R=-1:R=E:M!==-1&&(R=M),R===-1)break;L(B,O,R),O=R+1,B.charCodeAt(O-1)===kf8&&B.charCodeAt(O)===_84&&O++}return B.slice(O)}function L(B,O,E){if(O===E){D();return}let M=B.charCodeAt(O);if(j84(B,O,M)){let j=B.charCodeAt(O+5)===UE?O+6:O+5,C=B.slice(j,E);Z=H===0?C:`${Z}
${C}`,H++;return}if(T84(B,O,M)){z=B.slice(B.charCodeAt(O+6)===UE?O+7:O+6,E)||void 0;return}if(M===105&&B.charCodeAt(O+1)===100&&B.charCodeAt(O+2)===58){let j=B.slice(B.charCodeAt(O+3)===UE?O+4:O+3,E);K=j.includes("\x00")?void 0:j;return}if(M===58){if(J){let j=B.slice(O,E);J(j.slice(B.charCodeAt(O+1)===UE?2:1))}return}let R=B.slice(O,E),q=R.indexOf(":");if(q===-1){N(R,"",R);return}let _=R.slice(0,q),P=R.charCodeAt(q+1)===UE?2:1,w=R.slice(q+P);N(_,w,R)}function N(B,O,E){switch(B){case"event":z=O||void 0;break;case"data":Z=H===0?O:`${Z}
${O}`,H++;break;case"id":K=O.includes("\x00")?void 0:O;break;case"retry":/^\d+$/.test(O)?G(parseInt(O,10)):X(new w84(`Invalid \`retry\` value: "${O}"`,{type:"invalid-retry",value:O,line:E}));break;default:X(new w84(`Unknown field "${B.length>20?`${B.slice(0,20)}\u2026`:B}"`,{type:"unknown-field",field:B,value:O,line:E}));break}}function D(){H>0&&Y({id:K,event:z,data:Z}),K=void 0,Z="",H=0,z=void 0}function A(B={}){if(B.consume&&Q.length>0){let O=Q.join("");L(O,0,O.length)}W=!0,K=void 0,Z="",H=0,z=void 0,Q.length=0}return{feed:V,reset:A}}function j84($,Y,X){return X===100&&$.charCodeAt(Y+1)===97&&$.charCodeAt(Y+2)===116&&$.charCodeAt(Y+3)===97&&$.charCodeAt(Y+4)===58}function T84($,Y,X){return X===101&&$.charCodeAt(Y+1)===118&&$.charCodeAt(Y+2)===101&&$.charCodeAt(Y+3)===110&&$.charCodeAt(Y+4)===116&&$.charCodeAt(Y+5)===58}function p8(...$){return $.reduce((Y,X)=>({...Y,...X!=null?X:{}}),{})}function y54({tools:$=[],providerToolNames:Y,resolveProviderToolName:X}){var G;let J={},Q={};for(let W of $)if(W.type==="provider"){let K=(G=X==null?void 0:X(W))!=null?G:(W.id in Y)?Y[W.id]:void 0;if(K==null)continue;J[W.name]=K,Q[K]=W.name}return{toProviderToolName:(W)=>{var K;return(K=J[W])!=null?K:W},toCustomToolName:(W)=>{var K;return(K=Q[W])!=null?K:W}}}async function u90($,Y){if($==null)return Promise.resolve();let X=Y==null?void 0:Y.abortSignal;return new Promise((G,J)=>{if(X==null?void 0:X.aborted){J(I84());return}let Q=setTimeout(()=>{W(),G()},$),W=()=>{clearTimeout(Q),X==null||X.removeEventListener("abort",K)},K=()=>{W(),J(I84())};X==null||X.addEventListener("abort",K)})}function I84(){return new DOMException("Delay was aborted","AbortError")}function GV($){return Object.fromEntries([...$.headers])}function GT($){let Y=$.replace(/-/g,"+").replace(/_/g,"/"),X=bf8(Y);return Uint8Array.from(X,(G)=>G.codePointAt(0))}function Fm($){let Y="";for(let X=0;X<$.length;X++)Y+=String.fromCodePoint($[X]);return yf8(Y)}function nY($){return $ instanceof Uint8Array?Fm($):$}function b54($){if($.type==="url")return $.url;return`data:${$.mediaType};base64,${typeof $.data==="string"?$.data:Fm($.data)}`}function hf8($,Y={}){let{useArrayBrackets:X=!0}=Y,G=new FormData;for(let[J,Q]of Object.entries($)){if(Q==null)continue;if(Array.isArray(Q)){if(Q.length===1){G.append(J,Q[0]);continue}let W=X?`${J}[]`:J;for(let K of Q)G.append(W,K);continue}G.append(J,Q)}return G}async function gf8({response:$,url:Y,maxBytes:X=g54}){let G=$.headers.get("content-length");if(G!=null){let z=parseInt(G,10);if(!isNaN(z)&&z>X)throw new dZ({url:Y,message:`Download of ${Y} exceeded maximum size of ${X} bytes (Content-Length: ${z}).`})}let J=$.body;if(J==null)return new Uint8Array(0);let Q=J.getReader(),W=[],K=0;try{while(!0){let{done:z,value:V}=await Q.read();if(z)break;if(K+=V.length,K>X)throw new dZ({url:Y,message:`Download of ${Y} exceeded maximum size of ${X} bytes.`});W.push(V)}}finally{try{await Q.cancel()}finally{Q.releaseLock()}}let Z=new Uint8Array(K),H=0;for(let z of W)Z.set(z,H),H+=z.length;return Z}function k84($){let Y;try{Y=new URL($)}catch(G){throw new dZ({url:$,message:`Invalid URL: ${$}`})}if(Y.protocol==="data:")return;if(Y.protocol!=="http:"&&Y.protocol!=="https:")throw new dZ({url:$,message:`URL scheme must be http, https, or data, got ${Y.protocol}`});let X=Y.hostname;if(!X)throw new dZ({url:$,message:"URL must have a hostname"});if(X==="localhost"||X.endsWith(".local")||X.endsWith(".localhost"))throw new dZ({url:$,message:`URL with hostname ${X} is not allowed`});if(X.startsWith("[")&&X.endsWith("]")){let G=X.slice(1,-1);if(mf8(G))throw new dZ({url:$,message:`URL with IPv6 address ${X} is not allowed`});return}if(m54(X)){if(Py0(X))throw new dZ({url:$,message:`URL with IP address ${X} is not allowed`});return}}function m54($){let Y=$.split(".");if(Y.length!==4)return!1;return Y.every((X)=>{let G=Number(X);return Number.isInteger(G)&&G>=0&&G<=255&&String(G)===X})}function Py0($){let Y=$.split(".").map(Number),[X,G]=Y;if(X===0)return!0;if(X===10)return!0;if(X===127)return!0;if(X===169&&G===254)return!0;if(X===172&&G>=16&&G<=31)return!0;if(X===192&&G===168)return!0;return!1}function mf8($){let Y=$.toLowerCase();if(Y==="::1")return!0;if(Y==="::")return!0;if(Y.startsWith("::ffff:")){let X=Y.slice(7);if(m54(X))return Py0(X);let G=X.split(":");if(G.length===2){let J=parseInt(G[0],16),Q=parseInt(G[1],16);if(!isNaN(J)&&!isNaN(Q)){let W=J>>8&255,K=J&255,Z=Q>>8&255,H=Q&255;return Py0(`${W}.${K}.${Z}.${H}`)}}}if(Y.startsWith("fc")||Y.startsWith("fd"))return!0;if(Y.startsWith("fe80"))return!0;return!1}async function u54($,Y){var X,G;k84($);try{let J=await fetch($,{signal:void 0});if(J.redirected)k84(J.url);if(!J.ok)throw new dZ({url:$,statusCode:J.status,statusText:J.statusText});let Q=await gf8({response:J,url:$,maxBytes:(X=void 0)!=null?X:g54}),W=(G=J.headers.get("content-type"))!=null?G:void 0;return new Blob([Q],W?{type:W}:void 0)}catch(J){if(dZ.isInstance(J))throw J;throw new dZ({url:$,cause:J})}}function Km($){return($ instanceof Error||$ instanceof DOMException)&&($.name==="AbortError"||$.name==="ResponseAborted"||$.name==="TimeoutError")}function cf8($){if(!($ instanceof Error))return!1;let Y=$.code;if(typeof Y==="string"&&df8.includes(Y))return!0;return!1}function p54({error:$,url:Y,requestBodyValues:X}){if(Km($))return $;if($ instanceof TypeError&&pf8.includes($.message.toLowerCase())){let G=$.cause;if(G!=null)return new b$({message:`Cannot connect to API: ${G.message}`,cause:G,url:Y,requestBodyValues:X,isRetryable:!0})}if(cf8($))return new b$({message:`Cannot connect to API: ${$.message}`,cause:$,url:Y,requestBodyValues:X,isRetryable:!0});return $}function d54($=globalThis){var Y,X,G;if($.window)return"runtime/browser";if((Y=$.navigator)==null?void 0:Y.userAgent)return`runtime/${$.navigator.userAgent.toLowerCase()}`;if((G=(X=$.process)==null?void 0:X.versions)==null?void 0:G.node)return`runtime/node.js/${$.process.version.substring(0)}`;if($.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function lf8($){if($==null)return{};let Y={};if($ instanceof Headers)$.forEach((X,G)=>{Y[G.toLowerCase()]=X});else{if(!Array.isArray($))$=Object.entries($);for(let[X,G]of $)if(G!=null)Y[X.toLowerCase()]=G}return Y}function JV($,...Y){let X=new Headers(lf8($)),G=X.get("user-agent")||"";return X.set("user-agent",[G,...Y].filter(Boolean).join(" ")),Object.fromEntries(X.entries())}function sf8({prompt:$,schema:Y,schemaPrefix:X=Y!=null?nf8:void 0,schemaSuffix:G=Y!=null?rf8:af8}){return[$!=null&&$.length>0?$:void 0,$!=null&&$.length>0?"":void 0,X,Y!=null?JSON.stringify(Y):void 0,G].filter((J)=>J!=null).join(`
`)}function l54({messages:$,schema:Y,schemaPrefix:X,schemaSuffix:G}){var J,Q;let W=((J=$[0])==null?void 0:J.role)==="system"?{...$[0]}:{role:"system",content:""};return W.content=sf8({prompt:W.content,schema:Y,schemaPrefix:X,schemaSuffix:G}),[W,...((Q=$[0])==null?void 0:Q.role)==="system"?$.slice(1):$]}function wy0($){return $!=null}function DE({apiKey:$,environmentVariableName:Y,apiKeyParameterName:X="apiKey",description:G}){if(typeof $==="string")return $;if($!=null)throw new O90({message:`${G} API key must be a string.`});if(typeof process>"u")throw new O90({message:`${G} API key is missing. Pass it using the '${X}' parameter. Environment variables are not supported in this environment.`});if($=process.env[Y],$==null)throw new O90({message:`${G} API key is missing. Pass it using the '${X}' parameter or the ${Y} environment variable.`});if(typeof $!=="string")throw new O90({message:`${G} API key must be a string. The value of the ${Y} environment variable is not a string.`});return $}function i54({settingValue:$,environmentVariableName:Y}){if(typeof $==="string")return $;if($!=null||typeof process>"u")return;if($=process.env[Y],$==null||typeof $!=="string")return;return $}function dy0($){var Y;let[X,G=""]=$.toLowerCase().split("/");return(Y={mpeg:"mp3","x-wav":"wav",opus:"ogg",mp4:"m4a","x-m4a":"m4a"}[G])!=null?Y:G}function v84($){let Y=JSON.parse($);if(Y===null||typeof Y!=="object")return Y;if(of8.test($)===!1&&tf8.test($)===!1)return Y;return ef8(Y)}function ef8($){let Y=[$];while(Y.length){let X=Y;Y=[];for(let G of X){if(Object.prototype.hasOwnProperty.call(G,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(G,"constructor")&&G.constructor!==null&&typeof G.constructor==="object"&&Object.prototype.hasOwnProperty.call(G.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let J in G){let Q=G[J];if(Q&&typeof Q==="object")Y.push(Q)}}}return $}function cy0($){let{stackTraceLimit:Y}=Error;try{Error.stackTraceLimit=0}catch(X){return v84($)}try{return v84($)}finally{Error.stackTraceLimit=Y}}function ly0($){if($.type==="object"||Array.isArray($.type)&&$.type.includes("object")){$.additionalProperties=!1;let{properties:X}=$;if(X!=null)for(let G of Object.keys(X))X[G]=HE(X[G])}if($.items!=null)$.items=Array.isArray($.items)?$.items.map(HE):HE($.items);if($.anyOf!=null)$.anyOf=$.anyOf.map(HE);if($.allOf!=null)$.allOf=$.allOf.map(HE);if($.oneOf!=null)$.oneOf=$.oneOf.map(HE);let{definitions:Y}=$;if(Y!=null)for(let X of Object.keys(Y))Y[X]=HE(Y[X]);return $}function HE($){if(typeof $==="boolean")return $;return ly0($)}function vW(){return{}}function Xg8($,Y){var X,G,J;let Q={type:"array"};if(((X=$.type)==null?void 0:X._def)&&((J=(G=$.type)==null?void 0:G._def)==null?void 0:J.typeName)!==U0.ZodAny)Q.items=s9($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)Q.minItems=$.minLength.value;if($.maxLength)Q.maxItems=$.maxLength.value;if($.exactLength)Q.minItems=$.exactLength.value,Q.maxItems=$.exactLength.value;return Q}function Gg8($){let Y={type:"integer",format:"int64"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function Jg8(){return{type:"boolean"}}function n54($,Y){return s9($.type._def,Y)}function r54($,Y,X){let G=X!=null?X:Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>r54($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Wg8($)}}function Kg8($,Y){return{...s9($.innerType._def,Y),default:$.defaultValue()}}function Zg8($,Y){return Y.effectStrategy==="input"?s9($.schema._def,Y):vW()}function Ug8($){return{type:"string",enum:Array.from($.values)}}function zg8($,Y){let X=[s9($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),s9($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((J)=>!!J),G=[];return X.forEach((J)=>{if(Hg8(J))G.push(...J.allOf);else{let Q=J;if("additionalProperties"in J&&J.additionalProperties===!1){let{additionalProperties:W,...K}=J;Q=K}G.push(Q)}}),G.length?{allOf:G}:void 0}function Vg8($){let Y=typeof $.value;if(Y!=="bigint"&&Y!=="number"&&Y!=="boolean"&&Y!=="string")return{type:Array.isArray($.value)?"array":"object"};return{type:Y==="bigint"?"integer":Y,const:$.value}}function a54($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value;break;case"max":X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"email":switch(Y.emailStrategy){case"format:email":uZ(X,"email",G.message,Y);break;case"format:idn-email":uZ(X,"idn-email",G.message,Y);break;case"pattern:zod":UJ(X,mZ.email,G.message,Y);break}break;case"url":uZ(X,"uri",G.message,Y);break;case"uuid":uZ(X,"uuid",G.message,Y);break;case"regex":UJ(X,G.regex,G.message,Y);break;case"cuid":UJ(X,mZ.cuid,G.message,Y);break;case"cuid2":UJ(X,mZ.cuid2,G.message,Y);break;case"startsWith":UJ(X,RegExp(`^${Ly0(G.value,Y)}`),G.message,Y);break;case"endsWith":UJ(X,RegExp(`${Ly0(G.value,Y)}$`),G.message,Y);break;case"datetime":uZ(X,"date-time",G.message,Y);break;case"date":uZ(X,"date",G.message,Y);break;case"time":uZ(X,"time",G.message,Y);break;case"duration":uZ(X,"duration",G.message,Y);break;case"length":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"includes":{UJ(X,RegExp(Ly0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")uZ(X,"ipv4",G.message,Y);if(G.version!=="v4")uZ(X,"ipv6",G.message,Y);break}case"base64url":UJ(X,mZ.base64url,G.message,Y);break;case"jwt":UJ(X,mZ.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")UJ(X,mZ.ipv4Cidr,G.message,Y);if(G.version!=="v4")UJ(X,mZ.ipv6Cidr,G.message,Y);break}case"emoji":UJ(X,mZ.emoji(),G.message,Y);break;case"ulid":{UJ(X,mZ.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{uZ(X,"binary",G.message,Y);break}case"contentEncoding:base64":{X.contentEncoding="base64";break}case"pattern:zod":{UJ(X,mZ.base64,G.message,Y);break}}break}case"nanoid":UJ(X,mZ.nanoid,G.message,Y)}return X}function Ly0($,Y){return Y.patternStrategy==="escape"?Lg8($):$}function Lg8($){let Y="";for(let X=0;X<$.length;X++){if(!Fg8.has($[X]))Y+="\\";Y+=$[X]}return Y}function uZ($,Y,X,G){var J;if($.format||((J=$.anyOf)==null?void 0:J.some((Q)=>Q.format))){if(!$.anyOf)$.anyOf=[];if($.format)$.anyOf.push({format:$.format}),delete $.format;$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else $.format=Y}function UJ($,Y,X,G){var J;if($.pattern||((J=$.allOf)==null?void 0:J.some((Q)=>Q.pattern))){if(!$.allOf)$.allOf=[];if($.pattern)$.allOf.push({pattern:$.pattern}),delete $.pattern;$.allOf.push({pattern:y84(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else $.pattern=y84(Y,G)}function y84($,Y){var X;if(!Y.applyRegexFlags||!$.flags)return $.source;let G={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},J=G.i?$.source.toLowerCase():$.source,Q="",W=!1,K=!1,Z=!1;for(let H=0;H<J.length;H++){if(W){Q+=J[H],W=!1;continue}if(G.i){if(K){if(J[H].match(/[a-z]/)){if(Z)Q+=J[H],Q+=`${J[H-2]}-${J[H]}`.toUpperCase(),Z=!1;else if(J[H+1]==="-"&&((X=J[H+2])==null?void 0:X.match(/[a-z]/)))Q+=J[H],Z=!0;else Q+=`${J[H]}${J[H].toUpperCase()}`;continue}}else if(J[H].match(/[a-z]/)){Q+=`[${J[H]}${J[H].toUpperCase()}]`;continue}}if(G.m){if(J[H]==="^"){Q+=`(^|(?<=[\r
]))`;continue}else if(J[H]==="$"){Q+=`($|(?=[\r
]))`;continue}}if(G.s&&J[H]==="."){Q+=K?`${J[H]}\r
`:`[${J[H]}\r
]`;continue}if(Q+=J[H],J[H]==="\\")W=!0;else if(K&&J[H]==="]")K=!1;else if(!K&&J[H]==="[")K=!0}return Q}function s54($,Y){var X,G,J,Q,W,K;let Z={type:"object",additionalProperties:(X=s9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]}))!=null?X:Y.allowedAdditionalProperties};if(((G=$.keyType)==null?void 0:G._def.typeName)===U0.ZodString&&((J=$.keyType._def.checks)==null?void 0:J.length)){let{type:H,...z}=a54($.keyType._def,Y);return{...Z,propertyNames:z}}else if(((Q=$.keyType)==null?void 0:Q._def.typeName)===U0.ZodEnum)return{...Z,propertyNames:{enum:$.keyType._def.values}};else if(((W=$.keyType)==null?void 0:W._def.typeName)===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&((K=$.keyType._def.type._def.checks)==null?void 0:K.length)){let{type:H,...z}=n54($.keyType._def,Y);return{...Z,propertyNames:z}}return Z}function Dg8($,Y){if(Y.mapStrategy==="record")return s54($,Y);let X=s9($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||vW(),G=s9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||vW();return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function Ng8($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function Ag8(){return{not:vW()}}function Bg8(){return{type:"null"}}function Og8($,Y){let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in _y0)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=_y0[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,K)=>K.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return Eg8($,Y)}function Mg8($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length))return{type:[_y0[$.innerType._def.typeName],"null"]};let X=s9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function Rg8($){let Y={type:"number"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"int":Y.type="integer";break;case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function qg8($,Y){let X={type:"object",properties:{}},G=[],J=$.shape();for(let W in J){let K=J[W];if(K===void 0||K._def===void 0)continue;let Z=wg8(K),H=s9(K._def,{...Y,currentPath:[...Y.currentPath,"properties",W],propertyPath:[...Y.currentPath,"properties",W]});if(H===void 0)continue;if(X.properties[W]=H,!Z)G.push(W)}if(G.length)X.required=G;let Q=Pg8($,Y);if(Q!==void 0)X.additionalProperties=Q;return X}function Pg8($,Y){if($.catchall._def.typeName!=="ZodNever")return s9($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function wg8($){try{return $.isOptional()}catch(Y){return!0}}function Tg8($,Y){return s9($.type._def,Y)}function Ig8($,Y){let G={type:"array",uniqueItems:!0,items:s9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)G.minItems=$.minSize.value;if($.maxSize)G.maxItems=$.maxSize.value;return G}function Cg8($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>s9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:s9($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>s9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function Sg8(){return{not:vW()}}function kg8(){return vW()}function s9($,Y,X=!1){var G;let J=Y.seen.get($);if(Y.override){let Z=(G=Y.override)==null?void 0:G.call(Y,$,Y,J,X);if(Z!==$g8)return Z}if(J&&!X){let Z=bg8(J,Y);if(Z!==void 0)return Z}let Q={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,Q);let W=xg8($,$.typeName,Y),K=typeof W==="function"?s9(W(),Y):W;if(K)hg8($,Y,K);if(Y.postProcess){let Z=Y.postProcess(K,$,Y);return Q.jsonSchema=K,Z}return Q.jsonSchema=K,K}function J1($){let Y;return()=>{if(Y==null)Y=$();return Y}}function p90($,{validate:Y}={}){return{[jy0]:!0,_type:void 0,get jsonSchema(){if(typeof $==="function")$=$();return $},validate:Y}}function mg8($){return typeof $==="object"&&$!==null&&jy0 in $&&$[jy0]===!0&&"jsonSchema"in $&&"validate"in $}function ug8($){return $==null?p90({properties:{},additionalProperties:!1}):mg8($)?$:("~standard"in $)?$["~standard"].vendor==="zod"?G1($):pg8($):$()}function pg8($){return p90(()=>ly0($["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async(Y)=>{let X=await $["~standard"].validate(Y);return"value"in X?{success:!0,value:X.value}:{success:!1,error:new Wm({value:Y,cause:X.issues})}}})}function dg8($,Y){var X;let G=(X=Y==null?void 0:Y.useReferences)!=null?X:!1;return p90(()=>gg8($,{$refStrategy:G?"root":"none"}),{validate:async(J)=>{let Q=await $.safeParseAsync(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function cg8($,Y){var X;let G=(X=Y==null?void 0:Y.useReferences)!=null?X:!1;return p90(()=>ly0(e$($,{target:"draft-7",io:"input",reused:G?"ref":"inline"})),{validate:async(J)=>{let Q=await oX($,J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function lg8($){return"_zod"in $}function G1($,Y){if(lg8($))return cg8($,Y);else return dg8($,Y)}async function w8({value:$,schema:Y,context:X}){let G=await iy0({value:$,schema:Y,context:X});if(!G.success)throw Wm.wrap({value:$,cause:G.error,context:X});return G.value}async function iy0({value:$,schema:Y,context:X}){let G=ug8(Y);try{if(G.validate==null)return{success:!0,value:$,rawValue:$};let J=await G.validate($);if(J.success)return{success:!0,value:J.value,rawValue:$};return{success:!1,error:Wm.wrap({value:$,cause:J.error,context:X}),rawValue:$}}catch(J){return{success:!1,error:Wm.wrap({value:$,cause:J,context:X}),rawValue:$}}}async function o54({text:$,schema:Y}){try{let X=cy0($);if(Y==null)return X;return w8({value:X,schema:Y})}catch(X){if(_90.isInstance(X)||Wm.isInstance(X))throw X;throw new _90({text:$,cause:X})}}async function d90({text:$,schema:Y}){try{let X=cy0($);if(Y==null)return{success:!0,value:X,rawValue:X};return await iy0({value:X,schema:Y})}catch(X){return{success:!1,error:_90.isInstance(X)?X:new _90({text:$,cause:X}),rawValue:void 0}}}function Zm($){try{return cy0($),!0}catch(Y){return!1}}function ig8({stream:$,schema:Y}){return $.pipeThrough(new TextDecoderStream).pipeThrough(new xf8).pipeThrough(new TransformStream({async transform({data:X},G){if(X==="[DONE]")return;G.enqueue(await d90({text:X,schema:Y}))}}))}async function w9({provider:$,providerOptions:Y,schema:X}){if((Y==null?void 0:Y[$])==null)return;let G=await iy0({value:Y[$],schema:X});if(!G.success)throw new py0({argument:"providerOptions",message:`invalid ${$} provider options`,cause:G.error});return G.value}function e54($){return $}function LY({id:$,inputSchema:Y}){return({execute:X,outputSchema:G,needsApproval:J,toModelOutput:Q,onInputStart:W,onInputDelta:K,onInputAvailable:Z,...H})=>e54({type:"provider",id:$,args:H,inputSchema:Y,outputSchema:G,execute:X,needsApproval:J,toModelOutput:Q,onInputStart:W,onInputDelta:K,onInputAvailable:Z})}function L5({id:$,inputSchema:Y,outputSchema:X,supportsDeferredResults:G}){return({execute:J,needsApproval:Q,toModelOutput:W,onInputStart:K,onInputDelta:Z,onInputAvailable:H,...z})=>e54({type:"provider",id:$,args:z,inputSchema:Y,outputSchema:X,execute:J,needsApproval:Q,toModelOutput:W,onInputStart:K,onInputDelta:Z,onInputAvailable:H,supportsDeferredResults:G})}async function cZ($){if(typeof $==="function")$=$();return Promise.resolve($)}function AE($){return $==null?void 0:$.replace(/\/$/,"")}function Y$4($){let Y=$.startsWith("o3")||$.startsWith("o4-mini")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-chat"),X=$.startsWith("gpt-4")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-nano")&&!$.startsWith("gpt-5-chat")&&!$.startsWith("gpt-5.4-nano")||$.startsWith("o3")||$.startsWith("o4-mini"),G=$.startsWith("o1")||$.startsWith("o3")||$.startsWith("o4-mini")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-chat"),J=$.startsWith("gpt-5.1")||$.startsWith("gpt-5.2")||$.startsWith("gpt-5.3")||$.startsWith("gpt-5.4")||$.startsWith("gpt-5.5");return{supportsFlexProcessing:Y,supportsPriorityProcessing:X,isReasoningModel:G,systemMessageMode:G?"developer":"system",supportsNonReasoningParameters:J}}function b84($){var Y,X,G,J,Q,W;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let K=(Y=$.prompt_tokens)!=null?Y:0,Z=(X=$.completion_tokens)!=null?X:0,H=(J=(G=$.prompt_tokens_details)==null?void 0:G.cached_tokens)!=null?J:0,z=(W=(Q=$.completion_tokens_details)==null?void 0:Q.reasoning_tokens)!=null?W:0;return{inputTokens:{total:K,noCache:K-H,cacheRead:H,cacheWrite:void 0},outputTokens:{total:Z,text:Z-z,reasoning:z},raw:$}}function rg8($){return JSON.stringify($===void 0?{}:$)}function ag8({prompt:$,systemMessageMode:Y="system"}){var X;let G=[],J=[];for(let{role:Q,content:W}of $)switch(Q){case"system":{switch(Y){case"system":{G.push({role:"system",content:W});break}case"developer":{G.push({role:"developer",content:W});break}case"remove":{J.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Y}`)}break}case"user":{if(W.length===1&&W[0].type==="text"){G.push({role:"user",content:W[0].text});break}G.push({role:"user",content:W.map((K,Z)=>{var H,z,V;switch(K.type){case"text":return{type:"text",text:K.text};case"file":if(K.mediaType.startsWith("image/")){let F=K.mediaType==="image/*"?"image/jpeg":K.mediaType;return{type:"image_url",image_url:{url:K.data instanceof URL?K.data.toString():`data:${F};base64,${nY(K.data)}`,detail:(z=(H=K.providerOptions)==null?void 0:H.openai)==null?void 0:z.imageDetail}}}else if(K.mediaType.startsWith("audio/")){if(K.data instanceof URL)throw new p5({functionality:"audio file parts with URLs"});switch(K.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:nY(K.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:nY(K.data),format:"mp3"}};default:throw new p5({functionality:`audio content parts with media type ${K.mediaType}`})}}else if(K.mediaType==="application/pdf"){if(K.data instanceof URL)throw new p5({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof K.data==="string"&&K.data.startsWith("file-")?{file_id:K.data}:{filename:(V=K.filename)!=null?V:`part-${Z}.pdf`,file_data:`data:application/pdf;base64,${nY(K.data)}`}}}else throw new p5({functionality:`file part media type ${K.mediaType}`})}})});break}case"assistant":{let K="",Z=[];for(let H of W)switch(H.type){case"text":{K+=H.text;break}case"tool-call":{Z.push({id:H.toolCallId,type:"function",function:{name:H.toolName,arguments:rg8(H.input)}});break}}G.push({role:"assistant",content:Z.length>0?K||null:K,tool_calls:Z.length>0?Z:void 0});break}case"tool":{for(let K of W){if(K.type==="tool-approval-response")continue;let Z=K.output,H;switch(Z.type){case"text":case"error-text":H=Z.value;break;case"execution-denied":H=(X=Z.reason)!=null?X:"Tool execution denied.";break;case"content":case"json":case"error-json":H=JSON.stringify(Z.value);break}G.push({role:"tool",tool_call_id:K.toolCallId,content:H})}break}default:throw Error(`Unsupported role: ${Q}`)}return{messages:G,warnings:J}}function Dy0({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X?new Date(X*1000):void 0}}function h84($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}function eg8({tools:$,toolChoice:Y}){$=($==null?void 0:$.length)?$:void 0;let X=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:X};let G=[];for(let Q of $)switch(Q.type){case"function":G.push({type:"function",function:{name:Q.name,description:Q.description,parameters:Q.inputSchema,...Q.strict!=null?{strict:Q.strict}:{}}});break;default:X.push({type:"unsupported",feature:`tool type: ${Q.type}`});break}if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:X};let J=Y.type;switch(J){case"auto":case"none":case"required":return{tools:G,toolChoice:J,toolWarnings:X};case"tool":return{tools:G,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:X};default:throw new p5({functionality:`tool choice type: ${J}`})}}function f84($){var Y,X,G,J;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let Q=(Y=$.prompt_tokens)!=null?Y:0,W=(X=$.completion_tokens)!=null?X:0;return{inputTokens:{total:(G=$.prompt_tokens)!=null?G:void 0,noCache:Q,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(J=$.completion_tokens)!=null?J:void 0,text:W,reasoning:void 0},raw:$}}function Ym8({prompt:$,user:Y="user",assistant:X="assistant"}){let G="";if($[0].role==="system")G+=`${$[0].content}

`,$=$.slice(1);for(let{role:J,content:Q}of $)switch(J){case"system":throw new Pf8({message:"Unexpected system message in prompt: ${content}",prompt:$});case"user":{let W=Q.map((K)=>{switch(K.type){case"text":return K.text}}).filter(Boolean).join("");G+=`${Y}:
${W}

`;break}case"assistant":{let W=Q.map((K)=>{switch(K.type){case"text":return K.text;case"tool-call":throw new p5({functionality:"tool-call messages"})}}).join("");G+=`${X}:
${W}

`;break}case"tool":throw new p5({functionality:"tool messages"});default:throw Error(`Unsupported role: ${J}`)}return G+=`${X}:
`,{prompt:G,stopSequences:[`
${Y}:`]}}function g84({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function m84($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}function Hm8($){return Um8.some((Y)=>$.startsWith(Y))}function d84($,Y,X){if($==null)return{};let G={};if($.image_tokens!=null){let J=Math.floor($.image_tokens/X),Q=$.image_tokens-J*(X-1);G.imageTokens=Y===X-1?Q:J}if($.text_tokens!=null){let J=Math.floor($.text_tokens/X),Q=$.text_tokens-J*(X-1);G.textTokens=Y===X-1?Q:J}return G}async function Lm8($){if(!$)return;if($.type==="url")return u54($.url);let Y=$.data instanceof Uint8Array?$.data:GT($.data);return new Blob([Y],{type:$.mediaType})}function c84($){var Y,X,G,J;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let{input_tokens:Q,output_tokens:W}=$,K=(X=(Y=$.input_tokens_details)==null?void 0:Y.cached_tokens)!=null?X:0,Z=(J=(G=$.output_tokens_details)==null?void 0:G.reasoning_tokens)!=null?J:0;return{inputTokens:{total:Q,noCache:Q-K,cacheRead:K,cacheWrite:void 0},outputTokens:{total:W,text:W-Z,reasoning:Z},raw:$}}function Xu8($){return JSON.stringify($===void 0?{}:$)}function l84($,Y){if(!Y)return!1;return Y.some((X)=>$.startsWith(X))}async function Gu8({prompt:$,toolNameMapping:Y,systemMessageMode:X,providerOptionsName:G,fileIdPrefixes:J,store:Q,hasConversation:W=!1,hasLocalShellTool:K=!1,hasShellTool:Z=!1,hasApplyPatchTool:H=!1,customProviderToolNames:z}){var V,F,L,N,D,A,B,O,E,M,R,q,_,P,w,j,C;let k=[],S=[],I=new Set;for(let{role:v,content:x}of $)switch(v){case"system":{switch(X){case"system":{k.push({role:"system",content:x});break}case"developer":{k.push({role:"developer",content:x});break}case"remove":{S.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${X}`)}break}case"user":{k.push({role:"user",content:x.map((y,d)=>{var u,b,g;switch(y.type){case"text":return{type:"input_text",text:y.text};case"file":if(y.mediaType.startsWith("image/")){let p=y.mediaType==="image/*"?"image/jpeg":y.mediaType;return{type:"input_image",...y.data instanceof URL?{image_url:y.data.toString()}:typeof y.data==="string"&&l84(y.data,J)?{file_id:y.data}:{image_url:`data:${p};base64,${nY(y.data)}`},detail:(b=(u=y.providerOptions)==null?void 0:u[G])==null?void 0:b.imageDetail}}else if(y.mediaType==="application/pdf"){if(y.data instanceof URL)return{type:"input_file",file_url:y.data.toString()};return{type:"input_file",...typeof y.data==="string"&&l84(y.data,J)?{file_id:y.data}:{filename:(g=y.filename)!=null?g:`part-${d}.pdf`,file_data:`data:application/pdf;base64,${nY(y.data)}`}}}else throw new p5({functionality:`file part media type ${y.mediaType}`})}})});break}case"assistant":{let y={};for(let d of x)switch(d.type){case"text":{let u=(V=d.providerOptions)==null?void 0:V[G],b=u==null?void 0:u.itemId,g=u==null?void 0:u.phase;if(W&&b!=null)break;if(Q&&b!=null){k.push({type:"item_reference",id:b});break}k.push({role:"assistant",content:[{type:"output_text",text:d.text}],id:b,...g!=null&&{phase:g}});break}case"tool-call":{let u=(A=(L=(F=d.providerOptions)==null?void 0:F[G])==null?void 0:L.itemId)!=null?A:(D=(N=d.providerMetadata)==null?void 0:N[G])==null?void 0:D.itemId;if(W&&u!=null)break;let b=Y.toProviderToolName(d.toolName);if(b==="tool_search"){if(Q&&u!=null){k.push({type:"item_reference",id:u});break}let g=typeof d.input==="string"?await o54({text:d.input,schema:Iy0}):await w8({value:d.input,schema:Iy0}),p=g.call_id!=null?"client":"server";k.push({type:"tool_search_call",id:u!=null?u:d.toolCallId,execution:p,call_id:(B=g.call_id)!=null?B:null,status:"completed",arguments:g.arguments});break}if(d.providerExecuted){if(Q&&u!=null)k.push({type:"item_reference",id:u});break}if(Q&&u!=null){k.push({type:"item_reference",id:u});break}if(K&&b==="local_shell"){let g=await w8({value:d.input,schema:K$4});k.push({type:"local_shell_call",call_id:d.toolCallId,id:u,action:{type:"exec",command:g.action.command,timeout_ms:g.action.timeoutMs,user:g.action.user,working_directory:g.action.workingDirectory,env:g.action.env}});break}if(Z&&b==="shell"){let g=await w8({value:d.input,schema:U$4});k.push({type:"shell_call",call_id:d.toolCallId,id:u,status:"completed",action:{commands:g.action.commands,timeout_ms:g.action.timeoutMs,max_output_length:g.action.maxOutputLength}});break}if(H&&b==="apply_patch"){let g=await w8({value:d.input,schema:G$4});k.push({type:"apply_patch_call",call_id:g.callId,id:u,status:"completed",operation:g.operation});break}if(z==null?void 0:z.has(b)){k.push({type:"custom_tool_call",call_id:d.toolCallId,name:b,input:typeof d.input==="string"?d.input:JSON.stringify(d.input),id:u});break}k.push({type:"function_call",call_id:d.toolCallId,name:b,arguments:Xu8(d.input),id:u});break}case"tool-result":{if(d.output.type==="execution-denied"||d.output.type==="json"&&typeof d.output.value==="object"&&d.output.value!=null&&"type"in d.output.value&&d.output.value.type==="execution-denied")break;if(W)break;let u=Y.toProviderToolName(d.toolName);if(u==="tool_search"){let b=(M=(E=(O=d.providerOptions)==null?void 0:O[G])==null?void 0:E.itemId)!=null?M:d.toolCallId;if(Q)k.push({type:"item_reference",id:b});else if(d.output.type==="json"){let g=await w8({value:d.output.value,schema:Cy0});k.push({type:"tool_search_output",id:b,execution:"server",call_id:null,status:"completed",tools:g.tools})}break}if(Z&&u==="shell"){if(d.output.type==="json"){let b=await w8({value:d.output.value,schema:Ty0});k.push({type:"shell_call_output",call_id:d.toolCallId,output:b.output.map((g)=>({stdout:g.stdout,stderr:g.stderr,outcome:g.outcome.type==="timeout"?{type:"timeout"}:{type:"exit",exit_code:g.outcome.exitCode}}))})}break}if(Q){let b=(_=(q=(R=d.providerOptions)==null?void 0:R[G])==null?void 0:q.itemId)!=null?_:d.toolCallId;k.push({type:"item_reference",id:b})}else S.push({type:"other",message:`Results for OpenAI tool ${d.toolName} are not sent to the API when store is false`});break}case"reasoning":{let u=await w9({provider:G,providerOptions:d.providerOptions,schema:Ju8}),b=u==null?void 0:u.itemId;if(W&&b!=null)break;if(b!=null){let g=y[b];if(Q){if(g===void 0)k.push({type:"item_reference",id:b}),y[b]={type:"reasoning",id:b,summary:[]}}else{let p=[];if(d.text.length>0)p.push({type:"summary_text",text:d.text});else if(g!==void 0)S.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(d)}.`});if(g===void 0)y[b]={type:"reasoning",id:b,encrypted_content:u==null?void 0:u.reasoningEncryptedContent,summary:p},k.push(y[b]);else if(g.summary.push(...p),(u==null?void 0:u.reasoningEncryptedContent)!=null)g.encrypted_content=u.reasoningEncryptedContent}}else{let g=u==null?void 0:u.reasoningEncryptedContent;if(g!=null){let p=[];if(d.text.length>0)p.push({type:"summary_text",text:d.text});k.push({type:"reasoning",encrypted_content:g,summary:p})}else S.push({type:"other",message:`Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(d)}.`})}break}}break}case"tool":{for(let y of x){if(y.type==="tool-approval-response"){let g=y;if(I.has(g.approvalId))continue;if(I.add(g.approvalId),Q)k.push({type:"item_reference",id:g.approvalId});k.push({type:"mcp_approval_response",approval_request_id:g.approvalId,approve:g.approved});continue}let d=y.output;if(d.type==="execution-denied"){if((w=(P=d.providerOptions)==null?void 0:P.openai)==null?void 0:w.approvalId)continue}let u=Y.toProviderToolName(y.toolName);if(u==="tool_search"&&d.type==="json"){let g=await w8({value:d.value,schema:Cy0});k.push({type:"tool_search_output",execution:"client",call_id:y.toolCallId,status:"completed",tools:g.tools});continue}if(K&&u==="local_shell"&&d.type==="json"){let g=await w8({value:d.value,schema:Z$4});k.push({type:"local_shell_call_output",call_id:y.toolCallId,output:g.output});continue}if(Z&&u==="shell"&&d.type==="json"){let g=await w8({value:d.value,schema:Ty0});k.push({type:"shell_call_output",call_id:y.toolCallId,output:g.output.map((p)=>({stdout:p.stdout,stderr:p.stderr,outcome:p.outcome.type==="timeout"?{type:"timeout"}:{type:"exit",exit_code:p.outcome.exitCode}}))});continue}if(H&&y.toolName==="apply_patch"&&d.type==="json"){let g=await w8({value:d.value,schema:J$4});k.push({type:"apply_patch_call_output",call_id:y.toolCallId,status:g.status,output:g.output});continue}if(z==null?void 0:z.has(u)){let g;switch(d.type){case"text":case"error-text":g=d.value;break;case"execution-denied":g=(j=d.reason)!=null?j:"Tool execution denied.";break;case"json":case"error-json":g=JSON.stringify(d.value);break;case"content":g=d.value.map((p)=>{var h,n,t,s,K0;switch(p.type){case"text":return{type:"input_text",text:p.text};case"image-data":return{type:"input_image",image_url:`data:${p.mediaType};base64,${p.data}`,detail:(n=(h=p.providerOptions)==null?void 0:h[G])==null?void 0:n.imageDetail};case"image-url":return{type:"input_image",image_url:p.url,detail:(s=(t=p.providerOptions)==null?void 0:t[G])==null?void 0:s.imageDetail};case"file-data":return{type:"input_file",filename:(K0=p.filename)!=null?K0:"data",file_data:`data:${p.mediaType};base64,${p.data}`};case"file-url":return{type:"input_file",file_url:p.url};default:S.push({type:"other",message:`unsupported custom tool content part type: ${p.type}`});return}}).filter(wy0);break;default:g=""}k.push({type:"custom_tool_call_output",call_id:y.toolCallId,output:g});continue}let b;switch(d.type){case"text":case"error-text":b=d.value;break;case"execution-denied":b=(C=d.reason)!=null?C:"Tool execution denied.";break;case"json":case"error-json":b=JSON.stringify(d.value);break;case"content":b=d.value.map((g)=>{var p,h,n,t,s;switch(g.type){case"text":return{type:"input_text",text:g.text};case"image-data":return{type:"input_image",image_url:`data:${g.mediaType};base64,${g.data}`,detail:(h=(p=g.providerOptions)==null?void 0:p[G])==null?void 0:h.imageDetail};case"image-url":return{type:"input_image",image_url:g.url,detail:(t=(n=g.providerOptions)==null?void 0:n[G])==null?void 0:t.imageDetail};case"file-data":return{type:"input_file",filename:(s=g.filename)!=null?s:"data",file_data:`data:${g.mediaType};base64,${g.data}`};case"file-url":return{type:"input_file",file_url:g.url};default:{S.push({type:"other",message:`unsupported tool content part type: ${g.type}`});return}}}).filter(wy0);break}k.push({type:"function_call_output",call_id:y.toolCallId,output:b})}break}default:throw Error(`Unsupported role: ${v}`)}if(!Q&&k.some((v)=>("type"in v)&&v.type==="reasoning"&&v.encrypted_content==null))S.push({type:"other",message:"Reasoning parts without encrypted content are not supported when store is false. Skipping reasoning parts."}),k=k.filter((v)=>!("type"in v)||v.type!=="reasoning"||v.encrypted_content!=null);return{input:k,warnings:S}}function Ny0({finishReason:$,hasFunctionCall:Y}){switch($){case void 0:case null:return Y?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return Y?"tool-calls":"other"}}async function Ku8({tools:$,toolChoice:Y,allowedTools:X,toolNameMapping:G,customProviderToolNames:J}){var Q,W,K;$=($==null?void 0:$.length)?$:void 0;let Z=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:Z};let H=[],z=J!=null?J:new Set;for(let F of $)switch(F.type){case"function":{let L=(Q=F.providerOptions)==null?void 0:Q.openai,N=L==null?void 0:L.deferLoading;H.push({type:"function",name:F.name,description:F.description,parameters:F.inputSchema,...F.strict!=null?{strict:F.strict}:{},...N!=null?{defer_loading:N}:{}});break}case"provider":{switch(F.id){case"openai.file_search":{let L=await w8({value:F.args,schema:_m8});H.push({type:"file_search",vector_store_ids:L.vectorStoreIds,max_num_results:L.maxNumResults,ranking_options:L.ranking?{ranker:L.ranking.ranker,score_threshold:L.ranking.scoreThreshold}:void 0,filters:L.filters});break}case"openai.local_shell":{H.push({type:"local_shell"});break}case"openai.shell":{let L=await w8({value:F.args,schema:bm8});H.push({type:"shell",...L.environment&&{environment:Zu8(L.environment)}});break}case"openai.apply_patch":{H.push({type:"apply_patch"});break}case"openai.web_search_preview":{let L=await w8({value:F.args,schema:im8});H.push({type:"web_search_preview",search_context_size:L.searchContextSize,user_location:L.userLocation});break}case"openai.web_search":{let L=await w8({value:F.args,schema:um8});H.push({type:"web_search",filters:L.filters!=null?{allowed_domains:L.filters.allowedDomains}:void 0,external_web_access:L.externalWebAccess,search_context_size:L.searchContextSize,user_location:L.userLocation});break}case"openai.code_interpreter":{let L=await w8({value:F.args,schema:Om8});H.push({type:"code_interpreter",container:L.container==null?{type:"auto",file_ids:void 0}:typeof L.container==="string"?L.container:{type:"auto",file_ids:L.container.fileIds}});break}case"openai.image_generation":{let L=await w8({value:F.args,schema:Im8});H.push({type:"image_generation",background:L.background,input_fidelity:L.inputFidelity,input_image_mask:L.inputImageMask?{file_id:L.inputImageMask.fileId,image_url:L.inputImageMask.imageUrl}:void 0,model:L.model,moderation:L.moderation,partial_images:L.partialImages,quality:L.quality,output_compression:L.outputCompression,output_format:L.outputFormat,size:L.size});break}case"openai.mcp":{let L=await w8({value:F.args,schema:sm8}),N=(B)=>({tool_names:B.toolNames}),D=L.requireApproval,A=D==null?void 0:typeof D==="string"?D:D.never!=null?{never:N(D.never)}:void 0;H.push({type:"mcp",server_label:L.serverLabel,allowed_tools:Array.isArray(L.allowedTools)?L.allowedTools:L.allowedTools?{read_only:L.allowedTools.readOnly,tool_names:L.allowedTools.toolNames}:void 0,authorization:L.authorization,connector_id:L.connectorId,headers:L.headers,require_approval:A!=null?A:"never",server_description:L.serverDescription,server_url:L.serverUrl});break}case"openai.custom":{let L=await w8({value:F.args,schema:Rm8});H.push({type:"custom",name:L.name,description:L.description,format:L.format}),z.add(L.name);break}case"openai.tool_search":{let L=await w8({value:F.args,schema:fm8});H.push({type:"tool_search",...L.execution!=null?{execution:L.execution}:{},...L.description!=null?{description:L.description}:{},...L.parameters!=null?{parameters:L.parameters}:{}});break}}break}default:Z.push({type:"unsupported",feature:`function tool ${F}`});break}if(X!=null)return{tools:H,toolChoice:{type:"allowed_tools",mode:(W=X.mode)!=null?W:"auto",tools:X.toolNames.map((F)=>{var L;return{type:"function",name:(L=G==null?void 0:G.toProviderToolName(F))!=null?L:F}})},toolWarnings:Z};if(Y==null)return{tools:H,toolChoice:void 0,toolWarnings:Z};let V=Y.type;switch(V){case"auto":case"none":case"required":return{tools:H,toolChoice:V,toolWarnings:Z};case"tool":{let F=(K=G==null?void 0:G.toProviderToolName(Y.toolName))!=null?K:Y.toolName;return{tools:H,toolChoice:F==="code_interpreter"||F==="file_search"||F==="image_generation"||F==="web_search_preview"||F==="web_search"||F==="mcp"||F==="apply_patch"?{type:F}:z.has(F)?{type:"custom",name:F}:{type:"function",name:F},toolWarnings:Z}}default:throw new p5({functionality:`tool choice type: ${V}`})}}function Zu8($){if($.type==="containerReference")return{type:"container_reference",container_id:$.containerId};if($.type==="containerAuto"){let X=$;return{type:"container_auto",file_ids:X.fileIds,memory_limit:X.memoryLimit,network_policy:X.networkPolicy==null?void 0:X.networkPolicy.type==="disabled"?{type:"disabled"}:{type:"allowlist",allowed_domains:X.networkPolicy.allowedDomains,domain_secrets:X.networkPolicy.domainSecrets},skills:Uu8(X.skills)}}return{type:"local",skills:$.skills}}function Uu8($){return $==null?void 0:$.map((Y)=>Y.type==="skillReference"?{type:"skill_reference",skill_id:Y.skillId,version:Y.version}:{type:"inline",name:Y.name,description:Y.description,source:{type:"base64",media_type:Y.source.mediaType,data:Y.source.data}})}function n84($){var Y,X;let G={};for(let J of $){if(J.role!=="assistant")continue;for(let Q of J.content){if(Q.type!=="tool-call")continue;let W=(X=(Y=Q.providerOptions)==null?void 0:Y.openai)==null?void 0:X.approvalRequestId;if(W!=null)G[W]=Q.toolCallId}}return G}function zu8($){return $.type==="response.output_text.delta"}function Vu8($){return $.type==="response.output_item.done"}function Fu8($){return $.type==="response.completed"||$.type==="response.incomplete"}function Lu8($){return $.type==="response.failed"}function Du8($){return $.type==="response.created"}function Nu8($){return $.type==="response.function_call_arguments.delta"}function Au8($){return $.type==="response.custom_tool_call_input.delta"}function Bu8($){return $.type==="response.image_generation_call.partial_image"}function Ou8($){return $.type==="response.code_interpreter_call_code.delta"}function Eu8($){return $.type==="response.code_interpreter_call_code.done"}function Mu8($){return $.type==="response.apply_patch_call_operation_diff.delta"}function Ru8($){return $.type==="response.apply_patch_call_operation_diff.done"}function r84($){return $.type==="response.output_item.added"}function qu8($){return $.type==="response.output_text.annotation.added"}function Pu8($){return $.type==="error"}function a84($){var Y;if($==null)return{};switch($.type){case"search":return{action:{type:"search",query:(Y=$.query)!=null?Y:void 0},...$.sources!=null&&{sources:$.sources}};case"open_page":return{action:{type:"openPage",url:$.url}};case"find_in_page":return{action:{type:"findInPage",url:$.url,pattern:$.pattern}}}}function zE($){return JSON.stringify($).slice(1,-1)}function AD($={}){var Y,X;let G=(Y=AE(i54({settingValue:$.baseURL,environmentVariableName:"OPENAI_BASE_URL"})))!=null?Y:"https://api.openai.com/v1",J=(X=$.name)!=null?X:"openai",Q=()=>JV({Authorization:`Bearer ${DE({apiKey:$.apiKey,environmentVariableName:"OPENAI_API_KEY",description:"OpenAI"})}`,"OpenAI-Organization":$.organization,"OpenAI-Project":$.project,...$.headers},`ai-sdk/openai/${Cu8}`),W=(D)=>new $m8(D,{provider:`${J}.chat`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch}),K=(D)=>new Jm8(D,{provider:`${J}.completion`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch}),Z=(D)=>new Km8(D,{provider:`${J}.embedding`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch}),H=(D)=>new Fm8(D,{provider:`${J}.image`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch}),z=(D)=>new Iu8(D,{provider:`${J}.transcription`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch}),V=(D)=>new _u8(D,{provider:`${J}.speech`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch}),F=(D)=>{if(new.target)throw Error("The OpenAI model function cannot be called with the new keyword.");return L(D)},L=(D)=>{return new Hu8(D,{provider:`${J}.responses`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch,fileIdPrefixes:["file-"]})},N=function(D){return F(D)};return N.specificationVersion="v3",N.languageModel=F,N.chat=W,N.completion=K,N.responses=L,N.embedding=Z,N.embeddingModel=Z,N.textEmbedding=Z,N.textEmbeddingModel=Z,N.image=H,N.imageModel=H,N.transcription=z,N.transcriptionModel=z,N.speech=V,N.speechModel=V,N.tools=Yu8,N}function bu8($){var Y;let X=$==null?void 0:$.anthropic;return(Y=X==null?void 0:X.cacheControl)!=null?Y:X==null?void 0:X.cache_control}async function Qp8({tools:$,toolChoice:Y,disableParallelToolUse:X,cacheControlValidator:G,supportsStructuredOutput:J,supportsStrictTools:Q,defaultEagerInputStreaming:W=!1}){var K,Z;$=($==null?void 0:$.length)?$:void 0;let H=[],z=new Set,V=G||new oy0;if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:H,betas:z};let F=[];for(let N of $)switch(N.type){case"function":{let D=V.getCacheControl(N.providerOptions,{type:"tool definition",canCache:!0}),A=(K=N.providerOptions)==null?void 0:K.anthropic,B=(Z=A==null?void 0:A.eagerInputStreaming)!=null?Z:W,O=A==null?void 0:A.deferLoading,E=A==null?void 0:A.allowedCallers;if(!Q&&N.strict!=null)H.push({type:"unsupported",feature:"strict",details:`Tool '${N.name}' has strict: ${N.strict}, but strict mode is not supported by this provider. The strict property will be ignored.`});if(F.push({name:N.name,description:N.description,input_schema:N.inputSchema,cache_control:D,...B?{eager_input_streaming:!0}:{},...Q===!0&&N.strict!=null?{strict:N.strict}:{},...O!=null?{defer_loading:O}:{},...E!=null?{allowed_callers:E}:{},...N.inputExamples!=null?{input_examples:N.inputExamples.map((M)=>M.input)}:{}}),J===!0)z.add("structured-outputs-2025-11-13");if(N.inputExamples!=null||E!=null)z.add("advanced-tool-use-2025-11-20");break}case"provider":{switch(N.id){case"anthropic.code_execution_20250522":{z.add("code-execution-2025-05-22"),F.push({type:"code_execution_20250522",name:"code_execution",cache_control:void 0});break}case"anthropic.code_execution_20250825":{z.add("code-execution-2025-08-25"),F.push({type:"code_execution_20250825",name:"code_execution"});break}case"anthropic.code_execution_20260120":{F.push({type:"code_execution_20260120",name:"code_execution"});break}case"anthropic.computer_20250124":{z.add("computer-use-2025-01-24"),F.push({name:"computer",type:"computer_20250124",display_width_px:N.args.displayWidthPx,display_height_px:N.args.displayHeightPx,display_number:N.args.displayNumber,cache_control:void 0});break}case"anthropic.computer_20251124":{z.add("computer-use-2025-11-24"),F.push({name:"computer",type:"computer_20251124",display_width_px:N.args.displayWidthPx,display_height_px:N.args.displayHeightPx,display_number:N.args.displayNumber,enable_zoom:N.args.enableZoom,cache_control:void 0});break}case"anthropic.computer_20241022":{z.add("computer-use-2024-10-22"),F.push({name:"computer",type:"computer_20241022",display_width_px:N.args.displayWidthPx,display_height_px:N.args.displayHeightPx,display_number:N.args.displayNumber,cache_control:void 0});break}case"anthropic.text_editor_20250124":{z.add("computer-use-2025-01-24"),F.push({name:"str_replace_editor",type:"text_editor_20250124",cache_control:void 0});break}case"anthropic.text_editor_20241022":{z.add("computer-use-2024-10-22"),F.push({name:"str_replace_editor",type:"text_editor_20241022",cache_control:void 0});break}case"anthropic.text_editor_20250429":{z.add("computer-use-2025-01-24"),F.push({name:"str_replace_based_edit_tool",type:"text_editor_20250429",cache_control:void 0});break}case"anthropic.text_editor_20250728":{let D=await w8({value:N.args,schema:hu8});F.push({name:"str_replace_based_edit_tool",type:"text_editor_20250728",max_characters:D.maxCharacters,cache_control:void 0});break}case"anthropic.bash_20250124":{z.add("computer-use-2025-01-24"),F.push({name:"bash",type:"bash_20250124",cache_control:void 0});break}case"anthropic.bash_20241022":{z.add("computer-use-2024-10-22"),F.push({name:"bash",type:"bash_20241022",cache_control:void 0});break}case"anthropic.memory_20250818":{z.add("context-management-2025-06-27"),F.push({name:"memory",type:"memory_20250818"});break}case"anthropic.web_fetch_20250910":{z.add("web-fetch-2025-09-10");let D=await w8({value:N.args,schema:Yp8});F.push({type:"web_fetch_20250910",name:"web_fetch",max_uses:D.maxUses,allowed_domains:D.allowedDomains,blocked_domains:D.blockedDomains,citations:D.citations,max_content_tokens:D.maxContentTokens,cache_control:void 0});break}case"anthropic.web_fetch_20260209":{z.add("code-execution-web-tools-2026-02-09");let D=await w8({value:N.args,schema:su8});F.push({type:"web_fetch_20260209",name:"web_fetch",max_uses:D.maxUses,allowed_domains:D.allowedDomains,blocked_domains:D.blockedDomains,citations:D.citations,max_content_tokens:D.maxContentTokens,cache_control:void 0});break}case"anthropic.web_search_20250305":{let D=await w8({value:N.args,schema:iu8});F.push({type:"web_search_20250305",name:"web_search",max_uses:D.maxUses,allowed_domains:D.allowedDomains,blocked_domains:D.blockedDomains,user_location:D.userLocation,cache_control:void 0});break}case"anthropic.web_search_20260209":{z.add("code-execution-web-tools-2026-02-09");let D=await w8({value:N.args,schema:uu8});F.push({type:"web_search_20260209",name:"web_search",max_uses:D.maxUses,allowed_domains:D.allowedDomains,blocked_domains:D.blockedDomains,user_location:D.userLocation,cache_control:void 0});break}case"anthropic.tool_search_regex_20251119":{F.push({type:"tool_search_tool_regex_20251119",name:"tool_search_tool_regex"});break}case"anthropic.tool_search_bm25_20251119":{F.push({type:"tool_search_tool_bm25_20251119",name:"tool_search_tool_bm25"});break}default:{H.push({type:"unsupported",feature:`provider-defined tool ${N.id}`});break}}break}default:{H.push({type:"unsupported",feature:`tool ${N}`});break}}if(Y==null)return{tools:F,toolChoice:X?{type:"auto",disable_parallel_tool_use:X}:void 0,toolWarnings:H,betas:z};let L=Y.type;switch(L){case"auto":return{tools:F,toolChoice:{type:"auto",disable_parallel_tool_use:X},toolWarnings:H,betas:z};case"required":return{tools:F,toolChoice:{type:"any",disable_parallel_tool_use:X},toolWarnings:H,betas:z};case"none":return{tools:void 0,toolChoice:void 0,toolWarnings:H,betas:z};case"tool":return{tools:F,toolChoice:{type:"tool",name:Y.toolName,disable_parallel_tool_use:X},toolWarnings:H,betas:z};default:throw new p5({functionality:`tool choice type: ${L}`})}}function Y94({usage:$,rawUsage:Y}){var X,G;let J=(X=$.cache_creation_input_tokens)!=null?X:0,Q=(G=$.cache_read_input_tokens)!=null?G:0,W,K;if($.iterations&&$.iterations.length>0){let Z=$.iterations.reduce((H,z)=>({input:H.input+z.input_tokens,output:H.output+z.output_tokens}),{input:0,output:0});W=Z.input,K=Z.output}else W=$.input_tokens,K=$.output_tokens;return{inputTokens:{total:W+J+Q,noCache:W,cacheRead:Q,cacheWrite:J},outputTokens:{total:K,text:void 0,reasoning:void 0},raw:Y!=null?Y:$}}function Bp8($){if(typeof $==="string")return new TextDecoder().decode(GT($));if($ instanceof Uint8Array)return new TextDecoder().decode($);if($ instanceof URL)throw new p5({functionality:"URL-based text documents are not supported for citations"});throw new p5({functionality:`unsupported data type for text documents: ${typeof $}`})}function Ay0($){return $ instanceof URL||Op8($)}function Op8($){return typeof $==="string"&&/^https?:\/\//i.test($)}function By0($){return $ instanceof URL?$.toString():$}async function Ep8({prompt:$,sendReasoning:Y,warnings:X,cacheControlValidator:G,toolNameMapping:J}){var Q,W,K,Z,H,z,V,F,L,N,D,A,B,O,E,M,R,q,_;let P=new Set,w=Mp8($),j=G||new oy0,C=void 0,k=[];async function S(v){var x,y;let d=await w9({provider:"anthropic",providerOptions:v,schema:t84});return(y=(x=d==null?void 0:d.citations)==null?void 0:x.enabled)!=null?y:!1}async function I(v){let x=await w9({provider:"anthropic",providerOptions:v,schema:t84});return{title:x==null?void 0:x.title,context:x==null?void 0:x.context}}for(let v=0;v<w.length;v++){let x=w[v],y=v===w.length-1,d=x.type;switch(d){case"system":{if(C!=null)throw new p5({functionality:"Multiple system messages that are separated by user/assistant messages"});C=x.messages.map(({content:u,providerOptions:b})=>({type:"text",text:u,cache_control:j.getCacheControl(b,{type:"system message",canCache:!0})}));break}case"user":{let u=[];for(let b of x.messages){let{role:g,content:p}=b;switch(g){case"user":{for(let h=0;h<p.length;h++){let n=p[h],t=h===p.length-1,s=(Q=j.getCacheControl(n.providerOptions,{type:"user message part",canCache:!0}))!=null?Q:t?j.getCacheControl(b.providerOptions,{type:"user message",canCache:!0}):void 0;switch(n.type){case"text":{u.push({type:"text",text:n.text,cache_control:s});break}case"file":{if(n.mediaType.startsWith("image/"))u.push({type:"image",source:Ay0(n.data)?{type:"url",url:By0(n.data)}:{type:"base64",media_type:n.mediaType==="image/*"?"image/jpeg":n.mediaType,data:nY(n.data)},cache_control:s});else if(n.mediaType==="application/pdf"){P.add("pdfs-2024-09-25");let K0=await S(n.providerOptions),X0=await I(n.providerOptions);u.push({type:"document",source:Ay0(n.data)?{type:"url",url:By0(n.data)}:{type:"base64",media_type:"application/pdf",data:nY(n.data)},title:(W=X0.title)!=null?W:n.filename,...X0.context&&{context:X0.context},...K0&&{citations:{enabled:!0}},cache_control:s})}else if(n.mediaType==="text/plain"){let K0=await S(n.providerOptions),X0=await I(n.providerOptions);u.push({type:"document",source:Ay0(n.data)?{type:"url",url:By0(n.data)}:{type:"text",media_type:"text/plain",data:Bp8(n.data)},title:(K=X0.title)!=null?K:n.filename,...X0.context&&{context:X0.context},...K0&&{citations:{enabled:!0}},cache_control:s})}else throw new p5({functionality:`media type: ${n.mediaType}`});break}}}break}case"tool":{for(let h=0;h<p.length;h++){let n=p[h];if(n.type==="tool-approval-response")continue;let t=h===p.length-1,s=(Z=j.getCacheControl(n.providerOptions,{type:"tool result part",canCache:!0}))!=null?Z:t?j.getCacheControl(b.providerOptions,{type:"tool result message",canCache:!0}):void 0,K0=n.output,X0;switch(K0.type){case"content":X0=K0.value.map((a)=>{var Q0;switch(a.type){case"text":return{type:"text",text:a.text};case"image-data":return{type:"image",source:{type:"base64",media_type:a.mediaType,data:a.data}};case"image-url":return{type:"image",source:{type:"url",url:a.url}};case"file-url":return{type:"document",source:{type:"url",url:a.url}};case"file-data":{if(a.mediaType==="application/pdf")return P.add("pdfs-2024-09-25"),{type:"document",source:{type:"base64",media_type:a.mediaType,data:a.data}};X.push({type:"other",message:`unsupported tool content part type: ${a.type} with media type: ${a.mediaType}`});return}case"custom":{let e=(Q0=a.providerOptions)==null?void 0:Q0.anthropic;if((e==null?void 0:e.type)==="tool-reference")return{type:"tool_reference",tool_name:e.toolName};X.push({type:"other",message:"unsupported custom tool content part"});return}default:{X.push({type:"other",message:`unsupported tool content part type: ${a.type}`});return}}}).filter(wy0);break;case"text":case"error-text":X0=K0.value;break;case"execution-denied":X0=(H=K0.reason)!=null?H:"Tool execution denied.";break;case"json":case"error-json":default:X0=JSON.stringify(K0.value);break}u.push({type:"tool_result",tool_use_id:n.toolCallId,content:X0,is_error:K0.type==="error-text"||K0.type==="error-json"?!0:void 0,cache_control:s})}break}default:throw Error(`Unsupported role: ${g}`)}}k.push({role:"user",content:u});break}case"assistant":{let u=[],b=new Set;for(let g=0;g<x.messages.length;g++){let p=x.messages[g],h=g===x.messages.length-1,{content:n}=p;for(let t=0;t<n.length;t++){let s=n[t],K0=t===n.length-1,X0=(z=j.getCacheControl(s.providerOptions,{type:"assistant message part",canCache:!0}))!=null?z:K0?j.getCacheControl(p.providerOptions,{type:"assistant message",canCache:!0}):void 0;switch(s.type){case"text":{let a=(V=s.providerOptions)==null?void 0:V.anthropic;if((a==null?void 0:a.type)==="compaction")u.push({type:"compaction",content:s.text,cache_control:X0});else u.push({type:"text",text:y&&h&&K0?s.text.trim():s.text,cache_control:X0});break}case"reasoning":{if(Y){let a=await w9({provider:"anthropic",providerOptions:s.providerOptions,schema:yu8});if(a!=null)if(a.signature!=null)j.getCacheControl(s.providerOptions,{type:"thinking block",canCache:!1}),u.push({type:"thinking",thinking:s.text,signature:a.signature});else if(a.redactedData!=null)j.getCacheControl(s.providerOptions,{type:"redacted thinking block",canCache:!1}),u.push({type:"redacted_thinking",data:a.redactedData});else X.push({type:"other",message:"unsupported reasoning metadata"});else X.push({type:"other",message:"unsupported reasoning metadata"})}else X.push({type:"other",message:"sending reasoning content is disabled for this model"});break}case"tool-call":{if(s.providerExecuted){let e=J.toProviderToolName(s.toolName);if(((L=(F=s.providerOptions)==null?void 0:F.anthropic)==null?void 0:L.type)==="mcp-tool-use"){b.add(s.toolCallId);let $0=(D=(N=s.providerOptions)==null?void 0:N.anthropic)==null?void 0:D.serverName;if($0==null||typeof $0!=="string"){X.push({type:"other",message:"mcp tool use server name is required and must be a string"});break}u.push({type:"mcp_tool_use",id:s.toolCallId,name:s.toolName,input:s.input,server_name:$0,cache_control:X0})}else if(e==="code_execution"&&s.input!=null&&typeof s.input==="object"&&"type"in s.input&&typeof s.input.type==="string"&&(s.input.type==="bash_code_execution"||s.input.type==="text_editor_code_execution"))u.push({type:"server_tool_use",id:s.toolCallId,name:s.input.type,input:s.input,cache_control:X0});else if(e==="code_execution"&&s.input!=null&&typeof s.input==="object"&&"type"in s.input&&s.input.type==="programmatic-tool-call"){let{type:$0,...Y0}=s.input;u.push({type:"server_tool_use",id:s.toolCallId,name:"code_execution",input:Y0,cache_control:X0})}else if(e==="code_execution"||e==="web_fetch"||e==="web_search")u.push({type:"server_tool_use",id:s.toolCallId,name:e,input:s.input,cache_control:X0});else if(e==="tool_search_tool_regex"||e==="tool_search_tool_bm25")u.push({type:"server_tool_use",id:s.toolCallId,name:e,input:s.input,cache_control:X0});else X.push({type:"other",message:`provider executed tool call for tool ${s.toolName} is not supported`});break}let a=(A=s.providerOptions)==null?void 0:A.anthropic,Q0=(a==null?void 0:a.caller)?(a.caller.type==="code_execution_20250825"||a.caller.type==="code_execution_20260120")&&a.caller.toolId?{type:a.caller.type,tool_id:a.caller.toolId}:a.caller.type==="direct"?{type:"direct"}:void 0:void 0;u.push({type:"tool_use",id:s.toolCallId,name:s.toolName,input:s.input,...Q0&&{caller:Q0},cache_control:X0});break}case"tool-result":{let a=J.toProviderToolName(s.toolName);if(b.has(s.toolCallId)){let Q0=s.output;if(Q0.type!=="json"&&Q0.type!=="error-json"){X.push({type:"other",message:`provider executed tool result output type ${Q0.type} for tool ${s.toolName} is not supported`});break}u.push({type:"mcp_tool_result",tool_use_id:s.toolCallId,is_error:Q0.type==="error-json",content:Q0.value,cache_control:X0})}else if(a==="code_execution"){let Q0=s.output;if(Q0.type==="error-text"||Q0.type==="error-json"){let e={};try{if(typeof Q0.value==="string")e=JSON.parse(Q0.value);else if(typeof Q0.value==="object"&&Q0.value!==null)e=Q0.value}catch(m){}if(e.type==="code_execution_tool_result_error")u.push({type:"code_execution_tool_result",tool_use_id:s.toolCallId,content:{type:"code_execution_tool_result_error",error_code:(B=e.errorCode)!=null?B:"unknown"},cache_control:X0});else u.push({type:"bash_code_execution_tool_result",tool_use_id:s.toolCallId,cache_control:X0,content:{type:"bash_code_execution_tool_result_error",error_code:(O=e.errorCode)!=null?O:"unknown"}});break}if(Q0.type!=="json"){X.push({type:"other",message:`provider executed tool result output type ${Q0.type} for tool ${s.toolName} is not supported`});break}if(Q0.value==null||typeof Q0.value!=="object"||!("type"in Q0.value)||typeof Q0.value.type!=="string"){X.push({type:"other",message:`provider executed tool result output value is not a valid code execution result for tool ${s.toolName}`});break}if(Q0.value.type==="code_execution_result"){let e=await w8({value:Q0.value,schema:D$4});u.push({type:"code_execution_tool_result",tool_use_id:s.toolCallId,content:{type:e.type,stdout:e.stdout,stderr:e.stderr,return_code:e.return_code,content:(E=e.content)!=null?E:[]},cache_control:X0})}else if(Q0.value.type==="encrypted_code_execution_result"){let e=await w8({value:Q0.value,schema:A$4});if(e.type==="encrypted_code_execution_result")u.push({type:"code_execution_tool_result",tool_use_id:s.toolCallId,content:{type:e.type,encrypted_stdout:e.encrypted_stdout,stderr:e.stderr,return_code:e.return_code,content:(M=e.content)!=null?M:[]},cache_control:X0})}else{let e=await w8({value:Q0.value,schema:N$4});if(e.type==="code_execution_result")u.push({type:"code_execution_tool_result",tool_use_id:s.toolCallId,content:{type:e.type,stdout:e.stdout,stderr:e.stderr,return_code:e.return_code,content:(R=e.content)!=null?R:[]},cache_control:X0});else if(e.type==="bash_code_execution_result"||e.type==="bash_code_execution_tool_result_error")u.push({type:"bash_code_execution_tool_result",tool_use_id:s.toolCallId,cache_control:X0,content:e});else u.push({type:"text_editor_code_execution_tool_result",tool_use_id:s.toolCallId,cache_control:X0,content:e})}break}if(a==="web_fetch"){let Q0=s.output;if(Q0.type==="error-json"){let m={};try{if(typeof Q0.value==="string")m=JSON.parse(Q0.value);else if(typeof Q0.value==="object"&&Q0.value!==null)m=Q0.value}catch($0){let Y0=(q=Q0.value)==null?void 0:q.errorCode;m={errorCode:typeof Y0==="string"?Y0:"unavailable"}}u.push({type:"web_fetch_tool_result",tool_use_id:s.toolCallId,content:{type:"web_fetch_tool_result_error",error_code:(_=m.errorCode)!=null?_:"unavailable"},cache_control:X0});break}if(Q0.type!=="json"){X.push({type:"other",message:`provider executed tool result output type ${Q0.type} for tool ${s.toolName} is not supported`});break}let e=await w8({value:Q0.value,schema:L$4});u.push({type:"web_fetch_tool_result",tool_use_id:s.toolCallId,content:{type:"web_fetch_result",url:e.url,retrieved_at:e.retrievedAt,content:{type:"document",title:e.content.title,citations:e.content.citations,source:{type:e.content.source.type,media_type:e.content.source.mediaType,data:e.content.source.data}}},cache_control:X0});break}if(a==="web_search"){let Q0=s.output;if(Q0.type!=="json"){X.push({type:"other",message:`provider executed tool result output type ${Q0.type} for tool ${s.toolName} is not supported`});break}let e=await w8({value:Q0.value,schema:F$4});u.push({type:"web_search_tool_result",tool_use_id:s.toolCallId,content:e.map((m)=>({url:m.url,title:m.title,page_age:m.pageAge,encrypted_content:m.encryptedContent,type:m.type})),cache_control:X0});break}if(a==="tool_search_tool_regex"||a==="tool_search_tool_bm25"){let Q0=s.output;if(Q0.type!=="json"){X.push({type:"other",message:`provider executed tool result output type ${Q0.type} for tool ${s.toolName} is not supported`});break}let m=(await w8({value:Q0.value,schema:B$4})).map(($0)=>({type:"tool_reference",tool_name:$0.toolName}));u.push({type:"tool_search_tool_result",tool_use_id:s.toolCallId,content:{type:"tool_search_tool_search_result",tool_references:m},cache_control:X0});break}X.push({type:"other",message:`provider executed tool result for tool ${s.toolName} is not supported`});break}}}}k.push({role:"assistant",content:u});break}default:throw Error(`content type: ${d}`)}}return{prompt:{system:C,messages:k},betas:P}}function Mp8($){let Y=[],X=void 0;for(let G of $){let{role:J}=G;switch(J){case"system":{if((X==null?void 0:X.type)!=="system")X={type:"system",messages:[]},Y.push(X);X.messages.push(G);break}case"assistant":{if((X==null?void 0:X.type)!=="assistant")X={type:"assistant",messages:[]},Y.push(X);X.messages.push(G);break}case"user":{if((X==null?void 0:X.type)!=="user")X={type:"user",messages:[]},Y.push(X);X.messages.push(G);break}case"tool":{if((X==null?void 0:X.type)!=="user")X={type:"user",messages:[]},Y.push(X);X.messages.push(G);break}default:throw Error(`Unsupported role: ${J}`)}}return Y}function Oy0({finishReason:$,isJsonResponseFromTool:Y}){switch($){case"pause_turn":case"end_turn":case"stop_sequence":return"stop";case"refusal":return"content-filter";case"tool_use":return Y?"stop":"tool-calls";case"max_tokens":case"model_context_window_exceeded":return"length";case"compaction":return"other";default:return"other"}}function qp8($){return E$4($)}function LD($){if(typeof $==="boolean"||!jp8($))return $;return E$4($)}function E$4($){let Y={},X=$;if($.$ref!=null)return{$ref:$.$ref};if($.$schema!=null)Y.$schema=$.$schema;if($.$id!=null)Y.$id=$.$id;if($.title!=null)Y.title=$.title;if($.description!=null)Y.description=$.description;if($.default!==void 0)Y.default=$.default;if($.const!==void 0)Y.const=$.const;if($.enum!=null)Y.enum=$.enum;if($.type!=null)Y.type=$.type;if($.anyOf!=null)Y.anyOf=$.anyOf.map(LD);else if($.oneOf!=null)Y.anyOf=$.oneOf.map(LD);if($.allOf!=null)Y.allOf=$.allOf.map(LD);if($.definitions!=null)Y.definitions=Object.fromEntries(Object.entries($.definitions).map(([J,Q])=>[J,LD(Q)]));if(X.$defs!=null){let J=Y;J.$defs=Object.fromEntries(Object.entries(X.$defs).map(([Q,W])=>[Q,LD(W)]))}if($.type==="object"||$.properties!=null){if($.properties!=null)Y.properties=Object.fromEntries(Object.entries($.properties).map(([J,Q])=>[J,LD(Q)]));if(Y.additionalProperties=!1,$.required!=null)Y.required=$.required}if($.items!=null)Y.items=Array.isArray($.items)?$.items.map(LD):LD($.items);if(typeof $.format==="string"&&O$4.has($.format))Y.format=$.format;let G=Pp8($);if(G!=null)Y.description=Y.description==null?G:`${Y.description}
${G}`;return Y}function Pp8($){let Y=Rp8.flatMap((X)=>{let G=$[X];if(G==null||G===!1)return[];return`${wp8(X)}: ${_p8(G)}`});if(typeof $.format==="string"&&!O$4.has($.format))Y.push(`format: ${$.format}`);return Y.length===0?void 0:`${Y.join("; ")}.`}function wp8($){return $.replace(/[A-Z]/g,(Y)=>` ${Y.toLowerCase()}`)}function _p8($){if(typeof $==="string")return $;return JSON.stringify($)}function jp8($){return typeof $==="object"&&$!==null&&!Array.isArray($)}function X94($,Y,X){var G;if($.type==="web_search_result_location")return{type:"source",sourceType:"url",id:X(),url:$.url,title:$.title,providerMetadata:{anthropic:{citedText:$.cited_text,encryptedIndex:$.encrypted_index}}};if($.type!=="page_location"&&$.type!=="char_location")return;let J=Y[$.document_index];if(!J)return;return{type:"source",sourceType:"document",id:X(),mediaType:J.mediaType,title:(G=$.document_title)!=null?G:J.title,filename:J.filename,providerMetadata:{anthropic:$.type==="page_location"?{citedText:$.cited_text,startPageNumber:$.start_page_number,endPageNumber:$.end_page_number}:{citedText:$.cited_text,startCharIndex:$.start_char_index,endCharIndex:$.end_char_index}}}}function Ip8($){if($.includes("claude-opus-4-7"))return{maxOutputTokens:128000,supportsStructuredOutput:!0,rejectsSamplingParameters:!0,isKnownModel:!0};else if($.includes("claude-sonnet-4-6")||$.includes("claude-opus-4-6"))return{maxOutputTokens:128000,supportsStructuredOutput:!0,rejectsSamplingParameters:!1,isKnownModel:!0};else if($.includes("claude-sonnet-4-5")||$.includes("claude-opus-4-5")||$.includes("claude-haiku-4-5"))return{maxOutputTokens:64000,supportsStructuredOutput:!0,rejectsSamplingParameters:!1,isKnownModel:!0};else if($.includes("claude-opus-4-1"))return{maxOutputTokens:32000,supportsStructuredOutput:!0,rejectsSamplingParameters:!1,isKnownModel:!0};else if($.includes("claude-sonnet-4-"))return{maxOutputTokens:64000,supportsStructuredOutput:!1,rejectsSamplingParameters:!1,isKnownModel:!0};else if($.includes("claude-opus-4-"))return{maxOutputTokens:32000,supportsStructuredOutput:!1,rejectsSamplingParameters:!1,isKnownModel:!0};else if($.includes("claude-3-haiku"))return{maxOutputTokens:4096,supportsStructuredOutput:!1,rejectsSamplingParameters:!1,isKnownModel:!0};else return{maxOutputTokens:4096,supportsStructuredOutput:!1,rejectsSamplingParameters:!1,isKnownModel:!1}}function G94($){if(!$)return!1;let Y=!1,X=!1;for(let G of $){if("type"in G&&(G.type==="web_fetch_20260209"||G.type==="web_search_20260209")){Y=!0;continue}if(G.name==="code_execution"){X=!0;break}}return Y&&!X}function J94($){return $?{appliedEdits:$.applied_edits.map((Y)=>{switch(Y.type){case"clear_tool_uses_20250919":return{type:Y.type,clearedToolUses:Y.cleared_tool_uses,clearedInputTokens:Y.cleared_input_tokens};case"clear_thinking_20251015":return{type:Y.type,clearedThinkingTurns:Y.cleared_thinking_turns,clearedInputTokens:Y.cleared_input_tokens};case"compact_20260112":return{type:Y.type}}}).filter((Y)=>Y!==void 0)}:null}function QV($={}){var Y,X;let G=(Y=AE(i54({settingValue:$.baseURL,environmentVariableName:"ANTHROPIC_BASE_URL"})))!=null?Y:"https://api.anthropic.com/v1",J=(X=$.name)!=null?X:"anthropic.messages";if($.apiKey&&$.authToken)throw new py0({argument:"apiKey/authToken",message:"Both apiKey and authToken were provided. Please use only one authentication method."});let Q=()=>{let Z=$.authToken?{Authorization:`Bearer ${$.authToken}`}:{"x-api-key":DE({apiKey:$.apiKey,environmentVariableName:"ANTHROPIC_API_KEY",description:"Anthropic"})};return JV({"anthropic-version":"2023-06-01",...Z,...$.headers},`ai-sdk/anthropic/${Su8}`)},W=(Z)=>{var H;return new Tp8(Z,{provider:J,baseURL:G,headers:Q,fetch:$.fetch,generateId:(H=$.generateId)!=null?H:X9,supportedUrls:()=>({"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]})})},K=function(Z){if(new.target)throw Error("The Anthropic model function cannot be called with the new keyword.");return W(Z)};return K.specificationVersion="v3",K.languageModel=W,K.chat=W,K.messages=W,K.embeddingModel=(Z)=>{throw new FE({modelId:Z,modelType:"embeddingModel"})},K.textEmbeddingModel=K.embeddingModel,K.imageModel=(Z)=>{throw new FE({modelId:Z,modelType:"imageModel"})},K.tools=tp8,K}function Q94($){var Y,X,G,J;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let Q=(Y=$.promptTokenCount)!=null?Y:0,W=(X=$.candidatesTokenCount)!=null?X:0,K=(G=$.cachedContentTokenCount)!=null?G:0,Z=(J=$.thoughtsTokenCount)!=null?J:0;return{inputTokens:{total:Q,noCache:Q-K,cacheRead:K,cacheWrite:void 0},outputTokens:{total:W+Z,text:W,reasoning:Z},raw:$}}function pZ($,Y=!0){if($==null)return;if(Wd8($)){if(Y)return;if(typeof $==="object"&&$.description)return{type:"object",description:$.description};return{type:"object"}}if(typeof $==="boolean")return{type:"boolean",properties:{}};let{type:X,description:G,required:J,properties:Q,items:W,allOf:K,anyOf:Z,oneOf:H,format:z,const:V,minLength:F,enum:L}=$,N={};if(G)N.description=G;if(J)N.required=J;if(z)N.format=z;if(V!==void 0)N.enum=[V];if(X)if(Array.isArray(X)){let D=X.includes("null"),A=X.filter((B)=>B!=="null");if(A.length===0)N.type="null";else if(N.anyOf=A.map((B)=>({type:B})),D)N.nullable=!0}else N.type=X;if(L!==void 0)N.enum=L;if(Q!=null)N.properties=Object.entries(Q).reduce((D,[A,B])=>{return D[A]=pZ(B,!1),D},{});if(W)N.items=Array.isArray(W)?W.map((D)=>pZ(D,!1)):pZ(W,!1);if(K)N.allOf=K.map((D)=>pZ(D,!1));if(Z)if(Z.some((D)=>typeof D==="object"&&(D==null?void 0:D.type)==="null")){let D=Z.filter((A)=>!(typeof A==="object"&&(A==null?void 0:A.type)==="null"));if(D.length===1){let A=pZ(D[0],!1);if(typeof A==="object")N.nullable=!0,Object.assign(N,A)}else N.anyOf=D.map((A)=>pZ(A,!1)),N.nullable=!0}else N.anyOf=Z.map((D)=>pZ(D,!1));if(H)N.oneOf=H.map((D)=>pZ(D,!1));if(F!==void 0)N.minLength=F;return N}function Wd8($){return $!=null&&typeof $==="object"&&$.type==="object"&&($.properties==null||Object.keys($.properties).length===0)&&!$.additionalProperties}function Zd8($){let Y=Kd8.exec($);if(Y==null)return;return{mediaType:Y[1],data:Y[2]}}function Ud8($){let Y=Zd8($);if(Y==null)return;return{inlineData:{mimeType:Y.mediaType,data:Y.data}}}function Hd8($,Y,X){let G=[],J=[];for(let Q of X)switch(Q.type){case"text":{J.push(Q.text);break}case"image-data":case"file-data":{G.push({inlineData:{mimeType:Q.mediaType,data:Q.data}});break}case"image-url":case"file-url":{let W=Ud8(Q.url);if(W!=null)G.push(W);else J.push(JSON.stringify(Q));break}default:{J.push(JSON.stringify(Q));break}}$.push({functionResponse:{name:Y,response:{name:Y,content:J.length>0?J.join(`
`):"Tool executed successfully."},...G.length>0?{parts:G}:{}}})}function zd8($,Y,X){for(let G of X)switch(G.type){case"text":$.push({functionResponse:{name:Y,response:{name:Y,content:G.text}}});break;case"image-data":$.push({inlineData:{mimeType:String(G.mediaType),data:String(G.data)}},{text:"Tool executed successfully and returned this image as a response"});break;default:$.push({text:JSON.stringify(G)});break}}function Vd8($,Y){var X,G,J,Q,W,K,Z,H;let z=[],V=[],F=!0,L=(X=Y==null?void 0:Y.isGemmaModel)!=null?X:!1,N=(G=Y==null?void 0:Y.providerOptionsName)!=null?G:"google",D=(J=Y==null?void 0:Y.supportsFunctionResponseParts)!=null?J:!0;for(let{role:A,content:B}of $)switch(A){case"system":{if(!F)throw new p5({functionality:"system messages are only supported at the beginning of the conversation"});z.push({text:B});break}case"user":{F=!1;let O=[];for(let E of B)switch(E.type){case"text":{O.push({text:E.text});break}case"file":{let M=E.mediaType==="image/*"?"image/jpeg":E.mediaType;O.push(E.data instanceof URL?{fileData:{mimeType:M,fileUri:E.data.toString()}}:{inlineData:{mimeType:M,data:nY(E.data)}});break}}V.push({role:"user",parts:O});break}case"assistant":{F=!1,V.push({role:"model",parts:B.map((O)=>{var E,M,R,q;let _=(q=(E=O.providerOptions)==null?void 0:E[N])!=null?q:N!=="google"?(M=O.providerOptions)==null?void 0:M.google:(R=O.providerOptions)==null?void 0:R.vertex,P=(_==null?void 0:_.thoughtSignature)!=null?String(_.thoughtSignature):void 0;switch(O.type){case"text":return O.text.length===0?void 0:{text:O.text,thoughtSignature:P};case"reasoning":return O.text.length===0?void 0:{text:O.text,thought:!0,thoughtSignature:P};case"file":{if(O.data instanceof URL)throw new p5({functionality:"File data URLs in assistant messages are not supported"});return{inlineData:{mimeType:O.mediaType,data:nY(O.data)},...(_==null?void 0:_.thought)===!0?{thought:!0}:{},thoughtSignature:P}}case"tool-call":{let w=(_==null?void 0:_.serverToolCallId)!=null?String(_.serverToolCallId):void 0,j=(_==null?void 0:_.serverToolType)!=null?String(_.serverToolType):void 0;if(w&&j)return{toolCall:{toolType:j,args:typeof O.input==="string"?JSON.parse(O.input):O.input,id:w},thoughtSignature:P};return{functionCall:{name:O.toolName,args:O.input},thoughtSignature:P}}case"tool-result":{let w=(_==null?void 0:_.serverToolCallId)!=null?String(_.serverToolCallId):void 0,j=(_==null?void 0:_.serverToolType)!=null?String(_.serverToolType):void 0;if(w&&j)return{toolResponse:{toolType:j,response:O.output.type==="json"?O.output.value:{},id:w},thoughtSignature:P};return}}}).filter((O)=>O!==void 0)});break}case"tool":{F=!1;let O=[];for(let E of B){if(E.type==="tool-approval-response")continue;let M=(Z=(Q=E.providerOptions)==null?void 0:Q[N])!=null?Z:N!=="google"?(W=E.providerOptions)==null?void 0:W.google:(K=E.providerOptions)==null?void 0:K.vertex,R=(M==null?void 0:M.serverToolCallId)!=null?String(M.serverToolCallId):void 0,q=(M==null?void 0:M.serverToolType)!=null?String(M.serverToolType):void 0;if(R&&q){let P=(M==null?void 0:M.thoughtSignature)!=null?String(M.thoughtSignature):void 0;if(V.length>0){let w=V[V.length-1];if(w.role==="model"){w.parts.push({toolResponse:{toolType:q,response:E.output.type==="json"?E.output.value:{},id:R},thoughtSignature:P});continue}}}let _=E.output;if(_.type==="content")if(D)Hd8(O,E.toolName,_.value);else zd8(O,E.toolName,_.value);else O.push({functionResponse:{name:E.toolName,response:{name:E.toolName,content:_.type==="execution-denied"?(H=_.reason)!=null?H:"Tool execution denied.":_.value}}})}V.push({role:"user",parts:O});break}}if(L&&z.length>0&&V.length>0&&V[0].role==="user"){let A=z.map((B)=>B.text).join(`

`);V[0].parts.unshift({text:A+`

`})}return{systemInstruction:z.length>0&&!L?{parts:z}:void 0,contents:V}}function W94($){return $.includes("/")?$:`models/${$}`}function Ld8({tools:$,toolChoice:Y,modelId:X,isVertexProvider:G=!1}){var J,Q;$=($==null?void 0:$.length)?$:void 0;let W=[],K=["gemini-flash-latest","gemini-flash-lite-latest","gemini-pro-latest"].some((A)=>A===X),Z=X.includes("gemini-2")||X.includes("gemini-3")||X.includes("nano-banana")||K,H=X.includes("gemini-3"),z=X.includes("gemini-2.5")||X.includes("gemini-3");if($==null)return{tools:void 0,toolConfig:void 0,toolWarnings:W};let V=$.some((A)=>A.type==="function"),F=$.some((A)=>A.type==="provider");if(V&&F&&!H)W.push({type:"unsupported",feature:"combination of function and provider-defined tools"});if(F){let A=[];if($.filter((O)=>O.type==="provider").forEach((O)=>{switch(O.id){case"google.google_search":if(Z)A.push({googleSearch:{...O.args}});else W.push({type:"unsupported",feature:`provider-defined tool ${O.id}`,details:"Google Search requires Gemini 2.0 or newer."});break;case"google.enterprise_web_search":if(Z)A.push({enterpriseWebSearch:{}});else W.push({type:"unsupported",feature:`provider-defined tool ${O.id}`,details:"Enterprise Web Search requires Gemini 2.0 or newer."});break;case"google.url_context":if(Z)A.push({urlContext:{}});else W.push({type:"unsupported",feature:`provider-defined tool ${O.id}`,details:"The URL context tool is not supported with other Gemini models than Gemini 2."});break;case"google.code_execution":if(Z)A.push({codeExecution:{}});else W.push({type:"unsupported",feature:`provider-defined tool ${O.id}`,details:"The code execution tool is not supported with other Gemini models than Gemini 2."});break;case"google.file_search":if(z)A.push({fileSearch:{...O.args}});else W.push({type:"unsupported",feature:`provider-defined tool ${O.id}`,details:"The file search tool is only supported with Gemini 2.5 models and Gemini 3 models."});break;case"google.vertex_rag_store":if(Z)A.push({retrieval:{vertex_rag_store:{rag_resources:{rag_corpus:O.args.ragCorpus},similarity_top_k:O.args.topK}}});else W.push({type:"unsupported",feature:`provider-defined tool ${O.id}`,details:"The RAG store tool is not supported with other Gemini models than Gemini 2."});break;case"google.google_maps":if(Z)A.push({googleMaps:{}});else W.push({type:"unsupported",feature:`provider-defined tool ${O.id}`,details:"The Google Maps grounding tool is not supported with Gemini models other than Gemini 2 or newer."});break;default:W.push({type:"unsupported",feature:`provider-defined tool ${O.id}`});break}}),V&&H&&A.length>0){let O=[];for(let M of $)if(M.type==="function")O.push({name:M.name,description:(J=M.description)!=null?J:"",parameters:pZ(M.inputSchema)});let E={functionCallingConfig:{mode:"VALIDATED"},...!G&&{includeServerSideToolInvocations:!0}};if(Y!=null)switch(Y.type){case"auto":break;case"none":E.functionCallingConfig={mode:"NONE"};break;case"required":E.functionCallingConfig={mode:"ANY"};break;case"tool":E.functionCallingConfig={mode:"ANY",allowedFunctionNames:[Y.toolName]};break}return{tools:[...A,{functionDeclarations:O}],toolConfig:E,toolWarnings:W}}return{tools:A.length>0?A:void 0,toolConfig:void 0,toolWarnings:W}}let L=[],N=!1;for(let A of $)switch(A.type){case"function":if(L.push({name:A.name,description:(Q=A.description)!=null?Q:"",parameters:pZ(A.inputSchema)}),A.strict===!0)N=!0;break;default:W.push({type:"unsupported",feature:`function tool ${A.name}`});break}if(Y==null)return{tools:[{functionDeclarations:L}],toolConfig:N?{functionCallingConfig:{mode:"VALIDATED"}}:void 0,toolWarnings:W};let D=Y.type;switch(D){case"auto":return{tools:[{functionDeclarations:L}],toolConfig:{functionCallingConfig:{mode:N?"VALIDATED":"AUTO"}},toolWarnings:W};case"none":return{tools:[{functionDeclarations:L}],toolConfig:{functionCallingConfig:{mode:"NONE"}},toolWarnings:W};case"required":return{tools:[{functionDeclarations:L}],toolConfig:{functionCallingConfig:{mode:N?"VALIDATED":"ANY"}},toolWarnings:W};case"tool":return{tools:[{functionDeclarations:L}],toolConfig:{functionCallingConfig:{mode:N?"VALIDATED":"ANY",allowedFunctionNames:[Y.toolName]}},toolWarnings:W};default:throw new p5({functionality:`tool choice type: ${D}`})}}function Nd8($){let Y=[];for(let X of $.split(".")){let G=X.indexOf("[");if(G===-1)Y.push(X);else{if(G>0)Y.push(X.slice(0,G));for(let J of X.matchAll(/\[(\d+)\]/g))Y.push(parseInt(J[1],10))}}return Y}function Ad8($,Y){let X=$;for(let G of Y){if(X==null||typeof X!=="object")return;X=X[G]}return X}function Z94($,Y,X){let G=$;for(let J=0;J<Y.length-1;J++){let Q=Y[J],W=Y[J+1];if(G[Q]==null)G[Q]=typeof W==="number"?[]:{};G=G[Q]}G[Y[Y.length-1]]=X}function Bd8($){var Y,X;let G=(X=(Y=$.stringValue)!=null?Y:$.numberValue)!=null?X:$.boolValue;if(G!=null)return{value:G,json:JSON.stringify(G)};if("nullValue"in $)return{value:null,json:"null"};return}function U94({finishReason:$,hasToolCalls:Y}){switch($){case"STOP":return Y?"tool-calls":"stop";case"MAX_TOKENS":return"length";case"IMAGE_SAFETY":case"RECITATION":case"SAFETY":case"BLOCKLIST":case"PROHIBITED_CONTENT":case"SPII":return"content-filter";case"MALFORMED_FUNCTION_CALL":return"error";case"FINISH_REASON_UNSPECIFIED":case"OTHER":default:return"other"}}function H94({groundingMetadata:$,generateId:Y}){var X,G,J,Q,W,K;if(!($==null?void 0:$.groundingChunks))return;let Z=[];for(let H of $.groundingChunks)if(H.web!=null)Z.push({type:"source",sourceType:"url",id:Y(),url:H.web.uri,title:(X=H.web.title)!=null?X:void 0});else if(H.image!=null)Z.push({type:"source",sourceType:"url",id:Y(),url:H.image.sourceUri,title:(G=H.image.title)!=null?G:void 0});else if(H.retrievedContext!=null){let z=H.retrievedContext.uri,V=H.retrievedContext.fileSearchStore;if(z&&(z.startsWith("http://")||z.startsWith("https://")))Z.push({type:"source",sourceType:"url",id:Y(),url:z,title:(J=H.retrievedContext.title)!=null?J:void 0});else if(z){let F=(Q=H.retrievedContext.title)!=null?Q:"Unknown Document",L="application/octet-stream",N=void 0;if(z.endsWith(".pdf"))L="application/pdf",N=z.split("/").pop();else if(z.endsWith(".txt"))L="text/plain",N=z.split("/").pop();else if(z.endsWith(".docx"))L="application/vnd.openxmlformats-officedocument.wordprocessingml.document",N=z.split("/").pop();else if(z.endsWith(".doc"))L="application/msword",N=z.split("/").pop();else if(z.match(/\.(md|markdown)$/))L="text/markdown",N=z.split("/").pop();else N=z.split("/").pop();Z.push({type:"source",sourceType:"document",id:Y(),mediaType:L,title:F,filename:N})}else if(V){let F=(W=H.retrievedContext.title)!=null?W:"Unknown Document";Z.push({type:"source",sourceType:"document",id:Y(),mediaType:"application/octet-stream",title:F,filename:V.split("/").pop()})}}else if(H.maps!=null){if(H.maps.uri)Z.push({type:"source",sourceType:"url",id:Y(),url:H.maps.uri,title:(K=H.maps.title)!=null?K:void 0})}return Z.length>0?Z:void 0}function V94($){return $.startsWith("gemini-")}function ty0($){var Y,X,G,J,Q,W,K,Z;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let H=(Y=$.total_input_tokens)!=null?Y:0,z=(X=$.total_output_tokens)!=null?X:0,V=(G=$.total_thought_tokens)!=null?G:0,F=(J=$.total_cached_tokens)!=null?J:0;return{inputTokens:{total:(Q=$.total_input_tokens)!=null?Q:void 0,noCache:$.total_input_tokens==null?void 0:H-F,cacheRead:(W=$.total_cached_tokens)!=null?W:void 0,cacheWrite:void 0},outputTokens:{total:$.total_output_tokens==null&&$.total_thought_tokens==null?void 0:z+V,text:(K=$.total_output_tokens)!=null?K:void 0,reasoning:(Z=$.total_thought_tokens)!=null?Z:void 0},raw:$}}function _$4($){let Y=$.toLowerCase();for(let[X,G]of Object.entries(gd8))if(Y.endsWith(`.${X}`))return G;return"application/octet-stream"}function j$4($){let Y=$.split("/"),X=Y[Y.length-1];return X&&X.length>0?X:void 0}function md8({annotation:$,generateId:Y}){var X,G,J,Q,W;switch($.type){case"url_citation":{let K=$;if(K.url==null||K.url.length===0)return;return{type:"source",sourceType:"url",id:Y(),url:K.url,...K.title!=null?{title:K.title}:{}}}case"file_citation":{let K=$,Z=(G=(X=K.document_uri)!=null?X:K.source)!=null?G:K.file_name;if(Z==null||Z.length===0)return;if(Z.startsWith("http://")||Z.startsWith("https://"))return{type:"source",sourceType:"url",id:Y(),url:Z,...K.file_name!=null?{title:K.file_name}:{}};let H=(J=K.file_name)!=null?J:j$4(Z),z=_$4(Z);return{type:"source",sourceType:"document",id:Y(),mediaType:z,title:(W=(Q=K.file_name)!=null?Q:H)!=null?W:Z,...H!=null?{filename:H}:{}}}case"place_citation":{let K=$;if(K.url==null||K.url.length===0)return;return{type:"source",sourceType:"url",id:Y(),url:K.url,...K.name!=null?{title:K.name}:{}}}default:return}}function T$4({block:$,generateId:Y}){var X,G,J,Q,W,K,Z,H,z,V,F;let L=[];switch($.type){case"url_context_result":{let N=(X=$.result)!=null?X:[];for(let D of N){if((D==null?void 0:D.url)==null||D.url.length===0)continue;if(D.status!=null&&D.status!=="success")continue;L.push({type:"source",sourceType:"url",id:Y(),url:D.url})}break}case"google_search_result":{let N=(G=$.result)!=null?G:[];for(let D of N){let A=D==null?void 0:D.url;if(A==null||A.length===0)continue;L.push({type:"source",sourceType:"url",id:Y(),url:A,...D.title!=null?{title:D.title}:{}})}break}case"google_maps_result":{let N=(J=$.result)!=null?J:[];for(let D of N)for(let A of(Q=D.places)!=null?Q:[]){if(A.url==null||A.url.length===0)continue;L.push({type:"source",sourceType:"url",id:Y(),url:A.url,...A.name!=null?{title:A.name}:{}})}break}case"file_search_result":{let N=(W=$.result)!=null?W:[];for(let D of N){if(D==null||typeof D!=="object")continue;let A=D,B=(Z=(K=A.document_uri)!=null?K:A.source)!=null?Z:A.file_name;if(B==null||B.length===0)continue;if(B.startsWith("http://")||B.startsWith("https://")){L.push({type:"source",sourceType:"url",id:Y(),url:B,...A.title!=null?{title:A.title}:{}});continue}let O=(H=A.file_name)!=null?H:j$4(B),E=_$4(B);L.push({type:"source",sourceType:"document",id:Y(),mediaType:E,title:(F=(V=(z=A.title)!=null?z:A.file_name)!=null?V:O)!=null?F:B,...O!=null?{filename:O}:{}})}break}}return L}function ky0({annotations:$,generateId:Y}){var X;if($==null)return[];let G=new Set,J=[];for(let Q of $){let W=md8({annotation:Q,generateId:Y});if(W==null)continue;let K=W.sourceType==="url"?`url:${W.url}`:`doc:${(X=W.filename)!=null?X:W.title}`;if(G.has(K))continue;G.add(K),J.push(W)}return J}function ey0({status:$,hasFunctionCall:Y}){switch($){case"completed":return Y?"tool-calls":"stop";case"requires_action":return"tool-calls";case"failed":return"error";case"incomplete":return"length";case"cancelled":return"other";case"in_progress":default:return"other"}}function dd8($){return $.replace(/_call$/,"")}function cd8($){return $.replace(/_result$/,"")}function ld8({warnings:$,generateId:Y,includeRawChunks:X,serviceTier:G}){let J,Q,W=G,K,Z=!1,H=new Map,z=new Set;function V(F){var L;return F.sourceType==="url"?`url:${F.url}`:`doc:${(L=F.filename)!=null?L:F.title}`}return new TransformStream({start(F){F.enqueue({type:"stream-start",warnings:$})},transform(F,L){var N,D,A,B,O,E,M,R,q,_,P,w,j,C,k,S;if(X)L.enqueue({type:"raw",rawValue:F.rawValue});if(!F.success){K="failed",L.enqueue({type:"error",error:F.error});return}let I=F.value;switch(I.event_type){case"interaction.start":{let y=I.interaction;J=(y==null?void 0:y.id)!=null&&y.id.length>0?y.id:void 0;let d=y==null?void 0:y.created,u;if(typeof d==="string"){let b=new Date(d);if(!Number.isNaN(b.getTime()))u=b}L.enqueue({type:"response-metadata",...J!=null?{id:J}:{},modelId:y==null?void 0:y.model,...u?{timestamp:u}:{}});break}case"content.start":{let x=I,y=x.content,d=x.index,u=`${J!=null?J:"interaction"}:${d}`;if((y==null?void 0:y.type)==="text"){H.set(d,{kind:"text",id:u,emittedSourceKeys:new Set}),L.enqueue({type:"text-start",id:u});let b=ky0({annotations:y.annotations,generateId:Y});for(let g of b){let p=V(g);if(z.has(p))continue;z.add(p),L.enqueue(g)}}else if((y==null?void 0:y.type)==="image"){let b=y;H.set(d,{kind:"image",id:u,...b.data!=null?{data:b.data}:{},...b.mime_type!=null?{mimeType:b.mime_type}:{},...b.uri!=null?{uri:b.uri}:{}})}else if((y==null?void 0:y.type)==="thought"){let b=y.signature;H.set(d,{kind:"reasoning",id:u,...b!=null?{signature:b}:{}}),L.enqueue({type:"reasoning-start",id:u})}else if((y==null?void 0:y.type)==="function_call"){let b=y,g=(N=b.id)!=null?N:u;Z=!0;let p={kind:"function_call",id:u,toolCallId:g,toolName:b.name,arguments:(D=b.arguments)!=null?D:{},...b.signature!=null?{signature:b.signature}:{},startEmitted:!1};if(H.set(d,p),p.toolName!=null)L.enqueue({type:"tool-input-start",id:g,toolName:p.toolName}),p.startEmitted=!0}else if((y==null?void 0:y.type)!=null&&ud8.has(y.type)){let b=y.type==="mcp_server_tool_call"?(A=y.name)!=null?A:"mcp_server_tool":dd8(y.type),g=(B=y.id)!=null?B:u,p={kind:"builtin_tool_call",id:u,blockType:y.type,toolCallId:g,toolName:b,arguments:(O=y.arguments)!=null?O:{},callEmitted:!1};H.set(d,p)}else if((y==null?void 0:y.type)!=null&&pd8.has(y.type)){let b=y.type==="mcp_server_tool_result"?(E=y.name)!=null?E:"mcp_server_tool":cd8(y.type),g=(M=y.call_id)!=null?M:u,p={kind:"builtin_tool_result",id:u,blockType:y.type,callId:g,toolName:b,result:(R=y.result)!=null?R:null,...y.is_error!=null?{isError:y.is_error}:{},resultEmitted:!1};H.set(d,p)}else H.set(d,{kind:"unknown",id:u});break}case"content.delta":{let x=I,y=H.get(x.index);if(y==null)break;let d=x.delta;if(y.kind==="text"&&(d==null?void 0:d.type)==="text"){let u=(q=d.text)!=null?q:"";if(u.length>0)L.enqueue({type:"text-delta",id:y.id,delta:u})}else if(y.kind==="text"&&(d==null?void 0:d.type)==="text_annotation"){let u=ky0({annotations:d.annotations,generateId:Y});for(let b of u){let g=V(b);if(z.has(g))continue;z.add(g),y.emittedSourceKeys.add(g),L.enqueue(b)}}else if(y.kind==="image"&&(d==null?void 0:d.type)==="image"){if(d.data!=null)y.data=d.data;if(d.mime_type!=null)y.mimeType=d.mime_type;if(d.uri!=null)y.uri=d.uri}else if(y.kind==="reasoning"){if((d==null?void 0:d.type)==="thought_summary"){let u=d.content;if((u==null?void 0:u.type)==="text"&&typeof u.text==="string")L.enqueue({type:"reasoning-delta",id:y.id,delta:u.text})}else if((d==null?void 0:d.type)==="thought_signature"){let u=d.signature;if(u!=null)y.signature=u}}else if(y.kind==="function_call"&&(d==null?void 0:d.type)==="function_call"){if(d.id!=null)y.toolCallId=d.id;if(d.name!=null)y.toolName=d.name;if(d.arguments!=null)y.arguments=d.arguments;if(d.signature!=null)y.signature=d.signature;if(!y.startEmitted&&y.toolName!=null)L.enqueue({type:"tool-input-start",id:y.toolCallId,toolName:y.toolName}),y.startEmitted=!0;Z=!0}else if(y.kind==="builtin_tool_call"&&(d==null?void 0:d.type)===y.blockType){if(d.id!=null)y.toolCallId=d.id;if(d.arguments!=null)y.arguments=d.arguments;if(d.name!=null&&y.blockType==="mcp_server_tool_call")y.toolName=d.name}else if(y.kind==="builtin_tool_result"&&(d==null?void 0:d.type)===y.blockType){if(d.call_id!=null)y.callId=d.call_id;if(d.result!==void 0)y.result=d.result;if(d.is_error!=null)y.isError=d.is_error;if(d.name!=null&&y.blockType==="mcp_server_tool_result")y.toolName=d.name}break}case"content.stop":{let x=I,y=H.get(x.index);if(y==null)break;if(y.kind==="text"){let d=J!=null?{google:{interactionId:J}}:void 0;L.enqueue({type:"text-end",id:y.id,...d?{providerMetadata:d}:{}})}else if(y.kind==="reasoning"){let d={};if(y.signature!=null)d.signature=y.signature;if(J!=null)d.interactionId=J;let u=Object.keys(d).length>0?{google:d}:void 0;L.enqueue({type:"reasoning-end",id:y.id,...u?{providerMetadata:u}:{}})}else if(y.kind==="image"){let d={};if(J!=null)d.interactionId=J;let u=Object.keys(d).length>0?{google:d}:void 0;if(y.data!=null&&y.data.length>0)L.enqueue({type:"file",mediaType:(_=y.mimeType)!=null?_:"image/png",data:y.data,...u?{providerMetadata:u}:{}});else if(y.uri!=null&&y.uri.length>0){let b={google:{...J!=null?{interactionId:J}:{},imageUri:y.uri}};L.enqueue({type:"file",mediaType:(P=y.mimeType)!=null?P:"image/png",data:"",providerMetadata:b})}}else if(y.kind==="function_call"){let d=(w=y.toolName)!=null?w:"unknown",u=JSON.stringify((j=y.arguments)!=null?j:{});if(!y.startEmitted)L.enqueue({type:"tool-input-start",id:y.toolCallId,toolName:d});L.enqueue({type:"tool-input-delta",id:y.toolCallId,delta:u}),L.enqueue({type:"tool-input-end",id:y.toolCallId});let b={};if(y.signature!=null)b.signature=y.signature;if(J!=null)b.interactionId=J;let g=Object.keys(b).length>0?{google:b}:void 0;L.enqueue({type:"tool-call",toolCallId:y.toolCallId,toolName:d,input:u,...g?{providerMetadata:g}:{}})}else if(y.kind==="builtin_tool_call"&&!y.callEmitted)L.enqueue({type:"tool-call",toolCallId:y.toolCallId,toolName:y.toolName,input:JSON.stringify((C=y.arguments)!=null?C:{}),providerExecuted:!0}),y.callEmitted=!0;else if(y.kind==="builtin_tool_result"&&!y.resultEmitted){L.enqueue({type:"tool-result",toolCallId:y.callId,toolName:y.toolName,result:(k=y.result)!=null?k:null}),y.resultEmitted=!0;let d=T$4({block:{type:y.blockType,result:y.result},generateId:Y});for(let u of d){let b=V(u);if(z.has(b))continue;z.add(b),L.enqueue(u)}}H.delete(x.index);break}case"interaction.status_update":{K=I.status;break}case"interaction.complete":{let y=I.interaction;if((y==null?void 0:y.id)!=null&&y.id.length>0)J=y.id;if((y==null?void 0:y.status)!=null)K=y.status;if((y==null?void 0:y.usage)!=null)Q=y.usage;if((y==null?void 0:y.service_tier)!=null)W=y.service_tier;break}case"error":{let x=I;K="failed";let y=(S=x.error)!=null?S:{message:"Unknown interaction error"};L.enqueue({type:"error",error:y});break}}},flush(F){let L={unified:ey0({status:K,hasFunctionCall:Z}),raw:K},N={google:{...J!=null?{interactionId:J}:{},...W!=null?{serviceTier:W}:{}}};F.enqueue({type:"finish",finishReason:L,usage:ty0(Q),providerMetadata:N})}})}function I$4($){let Y=$.indexOf("/");return Y===-1?$:$.substring(0,Y)}function T90($){let Y=$.indexOf("/");if(Y===-1)return!1;let X=$.substring(Y+1);return X.length>0&&X!=="*"}function id8({prompt:$,previousInteractionId:Y,store:X,mediaResolution:G}){var J,Q,W,K,Z,H,z;let V=[],F=Y!=null&&X===!1,L=Y!=null&&X!==!1;if(F)V.push({type:"other",message:"google.interactions: providerOptions.google.previousInteractionId was set together with store: false. These are incoherent (the prior interaction cannot be referenced when nothing was stored on the server); the full history will be sent and previous_interaction_id will still be emitted."});let N=L?nd8({prompt:$,previousInteractionId:Y}):$,D=[],A=[];for(let E of N)switch(E.role){case"system":{D.push(E.content);break}case"user":{let M=[];for(let q of E.content)if(q.type==="text"){let _={type:"text",text:q.text};M.push(_)}else if(q.type==="file"){let _=L94({part:q,warnings:V,mediaResolution:G});if(_!=null)M.push(_)}let R=sd8(M);if(R.length>0)A.push({role:"user",content:R});break}case"assistant":{let M=[];for(let R of E.content)if(R.type==="text")M.push({type:"text",text:R.text});else if(R.type==="reasoning"){let q=(Q=(J=R.providerOptions)==null?void 0:J.google)==null?void 0:Q.signature;M.push({type:"thought",...q!=null?{signature:q}:{},summary:R.text.length>0?[{type:"text",text:R.text}]:void 0})}else if(R.type==="file"){let q=L94({part:R,warnings:V,mediaResolution:G});if(q!=null)M.push(q)}else if(R.type==="tool-call"){let q=(K=(W=R.providerOptions)==null?void 0:W.google)==null?void 0:K.signature,_=typeof R.input==="string"?rd8(R.input):(Z=R.input)!=null?Z:{};M.push({type:"function_call",id:R.toolCallId,name:R.toolName,arguments:_,...q!=null?{signature:q}:{}})}else V.push({type:"other",message:`google.interactions: unsupported assistant content part type "${R.type}"; part dropped.`});if(M.length>0)A.push({role:"model",content:M});break}case"tool":{let M=[];for(let R of E.content){if(R.type!=="tool-result"){V.push({type:"other",message:`google.interactions: unsupported tool message part type "${R.type}"; part dropped.`});continue}let q=ad8({toolCallId:R.toolCallId,toolName:R.toolName,output:R.output,signature:(z=(H=R.providerOptions)==null?void 0:H.google)==null?void 0:z.signature,warnings:V});M.push(q)}if(M.length>0)A.push({role:"user",content:M});break}}let B=D.length>0?D.join(`

`):void 0,O;if(A.length===0)O="";else if(A.length===1&&A[0].role==="user"&&Array.isArray(A[0].content))O=A[0].content;else O=A;return{input:O,systemInstruction:B,warnings:V}}function L94({part:$,warnings:Y,mediaResolution:X}){let G=I$4($.mediaType),J;switch(G){case"image":J="image";break;case"audio":J="audio";break;case"video":J="video";break;case"application":J="document";break;default:J=void 0}if(J==null){Y.push({type:"other",message:`google.interactions: unsupported file media type "${$.mediaType}"; part dropped.`});return}let Q=X!=null&&(J==="image"||J==="video")?{resolution:X}:{};if($.data instanceof URL)return{type:J,uri:$.data.toString(),...T90($.mediaType)?{mime_type:$.mediaType}:{},...Q};if(!T90($.mediaType)){Y.push({type:"other",message:`google.interactions: inline file data requires a full IANA media type (e.g. "image/png"), got "${$.mediaType}"; part dropped.`});return}return{type:J,data:nY($.data),mime_type:$.mediaType,...Q}}function nd8({prompt:$,previousInteractionId:Y}){let X=[],G=new Set;for(let J of $){if(J.role==="assistant"){if(J.content.some((W)=>{var K,Z;return((Z=(K=W.providerOptions)==null?void 0:K.google)==null?void 0:Z.interactionId)===Y})){for(let W of J.content)if(W.type==="tool-call")G.add(W.toolCallId);continue}X.push(J);continue}if(J.role==="tool"){let Q=J.content.filter((W)=>{if(W.type!=="tool-result")return!0;return!G.has(W.toolCallId)});if(Q.length===0)continue;X.push({...J,content:Q});continue}X.push(J)}return X}function rd8($){try{let Y=JSON.parse($);if(Y!=null&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{value:Y}}catch(Y){return{value:$}}}function ad8({toolCallId:$,toolName:Y,output:X,signature:G,warnings:J}){var Q;let W={type:"function_result",call_id:$,name:Y,...G!=null?{signature:G}:{}};switch(X.type){case"text":return{...W,result:X.value};case"json":return{...W,result:JSON.stringify(X.value)};case"error-text":return{...W,is_error:!0,result:X.value};case"error-json":return{...W,is_error:!0,result:JSON.stringify(X.value)};case"execution-denied":return{...W,is_error:!0,result:(Q=X.reason)!=null?Q:"Tool execution denied by user."};case"content":{let K=[];for(let Z of X.value)if(Z.type==="text")K.push({type:"text",text:Z.text});else if(Z.type==="image-data"){let H=Ey0({part:{mediaType:Z.mediaType,data:Z.data},warnings:J});if(H!=null)K.push(H)}else if(Z.type==="image-url"){let H=Ey0({part:{mediaType:"image/*",data:new URL(Z.url)},warnings:J});if(H!=null)K.push(H)}else if(Z.type==="file-data"||Z.type==="file-url"){let H=Z.type==="file-data"?Z.mediaType:"application/*";if(I$4(H)!=="image"){J.push({type:"other",message:`google.interactions: tool-result file with mediaType "${H}" is not supported (Interactions \`function_result.result\` accepts only text and image content); part dropped.`});continue}let V=Ey0({part:Z.type==="file-data"?{mediaType:Z.mediaType,data:Z.data}:{mediaType:H,data:new URL(Z.url)},warnings:J});if(V!=null)K.push(V)}else J.push({type:"other",message:`google.interactions: tool-result content part type "${Z.type}" is not supported; part dropped.`});return{...W,result:K}}}}function Ey0({part:$,warnings:Y}){if($.data instanceof URL)return{type:"image",uri:$.data.toString(),...T90($.mediaType)?{mime_type:$.mediaType}:{}};if(!T90($.mediaType)){Y.push({type:"other",message:`google.interactions: tool-result image part requires a full IANA media type (e.g. "image/png"), got "${$.mediaType}"; part dropped.`});return}return{type:"image",data:nY($.data),mime_type:$.mediaType}}function sd8($){if($.length<2)return $;let Y=[];for(let X of $){let G=Y[Y.length-1];if(X.type==="text"&&G!=null&&G.type==="text"&&G.annotations==null&&X.annotations==null){let J={type:"text",text:`${G.text}

${X.text}`};Y[Y.length-1]=J;continue}Y.push(X)}return Y}function M90({signature:$,interactionId:Y}){let X={};if($!=null)X.signature=$;if(Y!=null)X.interactionId=Y;return Object.keys(X).length>0?{providerMetadata:{google:X}}:{}}function Yc8($){return $.replace(/_call$/,"")}function Xc8($){return $.replace(/_result$/,"")}function y$4({outputs:$,generateId:Y,interactionId:X}){var G,J,Q,W,K,Z,H,z,V,F;let L=[],N=!1;if($==null)return{content:L,hasFunctionCall:N};for(let D of $){if(D==null||typeof D!=="object")continue;let A=D.type;if(typeof A!=="string")continue;switch(A){case"text":{let B=(G=D.text)!=null?G:"",O=D.annotations;L.push({type:"text",text:B,...M90({interactionId:X})});let E=ky0({annotations:O,generateId:Y});for(let M of E)L.push(M);break}case"thought":{let B=D,E=(Array.isArray(B.summary)?B.summary:[]).filter((M)=>(M==null?void 0:M.type)==="text"&&typeof M.text==="string").map((M)=>M.text).join(`
`);L.push({type:"reasoning",text:E,...M90({signature:B.signature,interactionId:X})});break}case"image":{let B=D;if(B.data!=null&&B.data.length>0)L.push({type:"file",mediaType:(J=B.mime_type)!=null?J:"image/png",data:B.data,...M90({interactionId:X})});else if(B.uri!=null&&B.uri.length>0)L.push({type:"file",mediaType:(Q=B.mime_type)!=null?Q:"image/png",data:"",providerMetadata:{google:{...X!=null?{interactionId:X}:{},imageUri:B.uri}}});break}case"function_call":{N=!0;let B=D;L.push({type:"tool-call",toolCallId:B.id,toolName:B.name,input:JSON.stringify((W=B.arguments)!=null?W:{}),...M90({signature:B.signature,interactionId:X})});break}default:{if(ed8.has(A)){let B=D,O=A==="mcp_server_tool_call"?(K=B.name)!=null?K:"mcp_server_tool":Yc8(A),E=JSON.stringify((Z=B.arguments)!=null?Z:{});L.push({type:"tool-call",toolCallId:(H=B.id)!=null?H:Y(),toolName:O,input:E,providerExecuted:!0})}else if($c8.has(A)){let B=D,O=A==="mcp_server_tool_result"?(z=B.name)!=null?z:"mcp_server_tool":Xc8(A);L.push({type:"tool-result",toolCallId:(V=B.call_id)!=null?V:Y(),toolName:O,result:(F=B.result)!=null?F:null});let E=T$4({block:D,generateId:Y});for(let M of E)L.push(M)}break}}}return{content:L,hasFunctionCall:N}}function xy0($){return $!=null&&Gc8.has($)}async function D94({baseURL:$,interactionId:Y,headers:X,fetch:G,abortSignal:J,initialDelayMs:Q=Jc8,maxDelayMs:W=Qc8,timeoutMs:K=Wc8}){if(Y==null||Y.length===0)throw Error("google.interactions: cannot poll a background interaction without an id. The POST response did not include an interaction id.");let Z=Date.now(),H=Q,z=`${$}/interactions/${encodeURIComponent(Y)}`;while(!0){if(J==null?void 0:J.aborted)throw new DOMException("Polling was aborted","AbortError");if(Date.now()-Z>K)throw Error(`google.interactions: timed out polling interaction ${Y} after ${K}ms.`);await u90(H,{abortSignal:J});let{value:V,rawValue:F,responseHeaders:L}=await Lm({url:z,headers:X,failedResponseHandler:lZ,successfulResponseHandler:I5(vy0),abortSignal:J,fetch:G});if(xy0(V.status))return{response:V,rawResponse:F,responseHeaders:L};H=Math.min(H*2,W)}}function Kc8({tools:$,toolChoice:Y}){var X,G,J,Q;let W=[],K=($==null?void 0:$.length)?$:void 0;if(K==null)return{tools:void 0,toolChoice:void 0,toolWarnings:W};let Z=[];for(let V of K){if(V.type==="function"){Z.push({type:"function",name:V.name,description:(X=V.description)!=null?X:"",parameters:V.inputSchema});continue}if(V.type==="provider"){let F=(G=V.args)!=null?G:{};switch(V.id){case"google.google_search":{let L=F.searchTypes,N;if(L!=null&&typeof L==="object"){let D=[];if(L.webSearch!=null)D.push("web_search");if(L.imageSearch!=null)D.push("image_search");if(D.length>0)N=D}Z.push({type:"google_search",...N!=null?{search_types:N}:{}});break}case"google.code_execution":{Z.push({type:"code_execution"});break}case"google.url_context":{Z.push({type:"url_context"});break}case"google.file_search":{Z.push({type:"file_search",...F.fileSearchStoreNames!=null?{file_search_store_names:F.fileSearchStoreNames}:{},...F.topK!=null?{top_k:F.topK}:{},...F.metadataFilter!=null?{metadata_filter:F.metadataFilter}:{}});break}case"google.google_maps":{Z.push({type:"google_maps",...F.latitude!=null?{latitude:F.latitude}:{},...F.longitude!=null?{longitude:F.longitude}:{},...F.enableWidget!=null?{enable_widget:F.enableWidget}:{}});break}case"google.computer_use":{Z.push({type:"computer_use",environment:(J=F.environment)!=null?J:"browser",...F.excludedPredefinedFunctions!=null?{excludedPredefinedFunctions:F.excludedPredefinedFunctions}:{}});break}case"google.mcp_server":{Z.push({type:"mcp_server",...F.name!=null?{name:F.name}:{},...F.url!=null?{url:F.url}:{},...F.headers!=null?{headers:F.headers}:{},...F.allowedTools!=null?{allowed_tools:F.allowedTools}:{}});break}case"google.retrieval":{let L=(Q=F.vertexAiSearchConfig)!=null?Q:void 0;Z.push({type:"retrieval",...F.retrievalTypes!=null?{retrieval_types:F.retrievalTypes}:{retrieval_types:["vertex_ai_search"]},...L!=null?{vertex_ai_search_config:L}:{}});break}default:{W.push({type:"unsupported",feature:`provider-defined tool ${V.id}`,details:`provider-defined tool ${V.id} is not supported by google.interactions; tool dropped.`});break}}continue}W.push({type:"unsupported",feature:`tool of type ${V.type}`,details:"Only function tools and google.* provider-defined tools are supported by google.interactions; tool dropped."})}let H=Z.some((V)=>V.type==="function"),z;if(Y!=null&&H)switch(Y.type){case"auto":z="auto";break;case"required":z="any";break;case"none":z="none";break;case"tool":z={allowed_tools:{mode:"validated",tools:[Y.toolName]}};break}return{tools:Z.length>0?Z:void 0,toolChoice:z,toolWarnings:W}}function Zc8({response:$,warnings:Y,generateId:X,includeRawChunks:G,headerServiceTier:J}){return new ReadableStream({start(Q){var W,K,Z;Q.enqueue({type:"stream-start",warnings:Y});let H=typeof $.id==="string"&&$.id.length>0?$.id:void 0,z,V=$.created;if(typeof V==="string"){let E=new Date(V);if(!Number.isNaN(E.getTime()))z=E}if(Q.enqueue({type:"response-metadata",...H!=null?{id:H}:{},modelId:(W=$.model)!=null?W:void 0,...z?{timestamp:z}:{}}),G)Q.enqueue({type:"raw",rawValue:$});let{content:F,hasFunctionCall:L}=y$4({outputs:(K=$.outputs)!=null?K:null,generateId:X,interactionId:H}),N=0,D=()=>`${H!=null?H:"agent"}:${N++}`;for(let E of F)switch(E.type){case"text":{let M=D(),R=E.providerMetadata;if(Q.enqueue({type:"text-start",id:M}),E.text.length>0)Q.enqueue({type:"text-delta",id:M,delta:E.text});Q.enqueue({type:"text-end",id:M,...R?{providerMetadata:R}:{}});break}case"reasoning":{let M=D(),R=E.providerMetadata;if(Q.enqueue({type:"reasoning-start",id:M}),E.text.length>0)Q.enqueue({type:"reasoning-delta",id:M,delta:E.text});Q.enqueue({type:"reasoning-end",id:M,...R?{providerMetadata:R}:{}});break}case"tool-call":{let M=E.providerMetadata;Q.enqueue({type:"tool-input-start",id:E.toolCallId,toolName:E.toolName,...E.providerExecuted?{providerExecuted:E.providerExecuted}:{}}),Q.enqueue({type:"tool-input-delta",id:E.toolCallId,delta:E.input}),Q.enqueue({type:"tool-input-end",id:E.toolCallId}),Q.enqueue({type:"tool-call",toolCallId:E.toolCallId,toolName:E.toolName,input:E.input,...E.providerExecuted?{providerExecuted:E.providerExecuted}:{},...M?{providerMetadata:M}:{}});break}case"tool-result":{Q.enqueue({type:"tool-result",toolCallId:E.toolCallId,toolName:E.toolName,result:E.result});break}case"source":case"file":{Q.enqueue(E);break}}let A=(Z=$.service_tier)!=null?Z:J,B={unified:ey0({status:$.status,hasFunctionCall:L}),raw:$.status},O={google:{...H!=null?{interactionId:H}:{},...A!=null?{serviceTier:A}:{}}};Q.enqueue({type:"finish",finishReason:B,usage:ty0($.usage),providerMetadata:O}),Q.close()}})}function R90($){let Y={};for(let[X,G]of Object.entries($)){if(G===void 0)continue;Y[X]=G}return Y}function JT($={}){var Y,X;let G=(Y=AE($.baseURL))!=null?Y:"https://generativelanguage.googleapis.com/v1beta",J=(X=$.name)!=null?X:"google.generative-ai",Q=()=>JV({"x-goog-api-key":DE({apiKey:$.apiKey,environmentVariableName:"GOOGLE_GENERATIVE_AI_API_KEY",description:"Google Generative AI"}),...$.headers},`ai-sdk/google/${ep8}`),W=(F)=>{var L;return new M$4(F,{provider:J,baseURL:G,headers:Q,generateId:(L=$.generateId)!=null?L:X9,supportedUrls:()=>({"*":[new RegExp(`^${G}/files/.*$`),new RegExp("^https://(?:www\\.)?youtube\\.com/watch\\?v=[\\w-]+(?:&[\\w=&.-]*)?$"),new RegExp("^https://youtu\\.be/[\\w-]+(?:\\?[\\w=&.-]*)?$")]}),fetch:$.fetch})},K=(F)=>new Gd8(F,{provider:J,baseURL:G,headers:Q,fetch:$.fetch}),Z=(F,L={})=>new xd8(F,L,{provider:J,baseURL:G,headers:Q,fetch:$.fetch}),H=(F)=>{var L;return new hd8(F,{provider:J,baseURL:G,headers:Q,fetch:$.fetch,generateId:(L=$.generateId)!=null?L:X9})},z=(F)=>{var L;return new Uc8(F,{provider:`${J}.interactions`,baseURL:G,headers:Q,generateId:(L=$.generateId)!=null?L:X9,fetch:$.fetch})},V=function(F){if(new.target)throw Error("The Google Generative AI model function cannot be called with the new keyword.");return W(F)};return V.specificationVersion="v3",V.languageModel=W,V.chat=W,V.generativeAI=W,V.embedding=K,V.embeddingModel=K,V.textEmbedding=K,V.textEmbeddingModel=K,V.image=Z,V.imageModel=Z,V.video=H,V.videoModel=H,V.interactions=z,V.tools=vd8,V}var N94="vercel.ai.error",Rb8,A64,B64,d5,A94="AI_APICallError",B94,qb8,O64,E64,FY,O94="AI_EmptyResponseBodyError",E94,Pb8,M64,R64,M94,q94="AI_InvalidArgumentError",P94,wb8,q64,P64,w94,_94="AI_InvalidPromptError",j94,_b8,w64,_64,I90,T94="AI_InvalidResponseDataError",I94,jb8,j64,T64,s2,C94="AI_JSONParseError",S94,Tb8,I64,C64,P90,k94="AI_LoadAPIKeyError",v94,Ib8,S64,k64,A90,x94="AI_LoadSettingError",y94,Cb8,v64,x64,B90,b94="AI_NoSuchModelError",h94,Sb8,y64,b64,LE,f94="AI_TooManyEmbeddingValuesForCallError",g94,kb8,h64,f64,Hm,m94="AI_TypeValidationError",u94,vb8,g64,m64,Qm,p94="AI_UnsupportedFunctionalityError",d94,xb8,u64,p64,_9,c94,d64,l94,gb8=class{constructor(){this.status={type:"pending"},this._resolve=void 0,this._reject=void 0}get promise(){if(this._promise)return this._promise;return this._promise=new Promise(($,Y)=>{if(this.status.type==="resolved")$(this.status.value);else if(this.status.type==="rejected")Y(this.status.error);this._resolve=$,this._reject=Y}),this._promise}resolve($){var Y;if(this.status={type:"resolved",value:$},this._promise)(Y=this._resolve)==null||Y.call(this,$)}reject($){var Y;if(this.status={type:"rejected",error:$},this._promise)(Y=this._reject)==null||Y.call(this,$)}isResolved(){return this.status.type==="resolved"}isRejected(){return this.status.type==="rejected"}isPending(){return this.status.type==="pending"}},i94="AI_DownloadError",n94,mb8,l64,i64,YV,r94=2147483648,a94=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=()=>{let Q=X.length,W=Array(Y);for(let K=0;K<Y;K++)W[K]=X[Math.random()*Q|0];return W.join("")};if($==null)return J;if(X.includes(G))throw new w94({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return()=>`${$}${G}${J()}`},_8,db8,by0="3.0.25",cb8=()=>globalThis.fetch,lb8=async({url:$,headers:Y={},successfulResponseHandler:X,failedResponseHandler:G,abortSignal:J,fetch:Q=cb8()})=>{try{let W=await Q($,{method:"GET",headers:_Q(Y,`ai-sdk/provider-utils/${by0}`,yy0()),signal:J}),K=XV(W);if(!W.ok){let Z;try{Z=await G({response:W,url:$,requestBodyValues:{}})}catch(H){if(YT(H)||FY.isInstance(H))throw H;throw new FY({message:"Failed to process error response",cause:H,statusCode:W.status,url:$,responseHeaders:K,requestBodyValues:{}})}throw Z.value}try{return await X({response:W,url:$,requestBodyValues:{}})}catch(Z){if(Z instanceof Error){if(YT(Z)||FY.isInstance(Z))throw Z}throw new FY({message:"Failed to process successful response",cause:Z,statusCode:W.status,url:$,responseHeaders:K,requestBodyValues:{}})}}catch(W){throw s94({error:W,url:$,requestBodyValues:{}})}},ib8="JSON schema:",nb8="You MUST answer with a JSON object that matches the JSON schema above.",rb8="You MUST answer with JSON.",tb8,eb8,w90,Yh8=()=>globalThis.fetch,G8=async({url:$,headers:Y,body:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>my0({url:$,headers:{"Content-Type":"application/json",...Y},body:{content:JSON.stringify(X),values:X},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),v90=async({url:$,headers:Y,formData:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>my0({url:$,headers:Y,body:{content:X,values:Object.fromEntries(X.entries())},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),my0=async({url:$,headers:Y={},body:X,successfulResponseHandler:G,failedResponseHandler:J,abortSignal:Q,fetch:W=Yh8()})=>{try{let K=await W($,{method:"POST",headers:_Q(Y,`ai-sdk/provider-utils/${by0}`,yy0()),body:X.content,signal:Q}),Z=XV(K);if(!K.ok){let H;try{H=await J({response:K,url:$,requestBodyValues:X.values})}catch(z){if(YT(z)||FY.isInstance(z))throw z;throw new FY({message:"Failed to process error response",cause:z,statusCode:K.status,url:$,responseHeaders:Z,requestBodyValues:X.values})}throw H.value}try{return await G({response:K,url:$,requestBodyValues:X.values})}catch(H){if(H instanceof Error){if(YT(H)||FY.isInstance(H))throw H}throw new FY({message:"Failed to process successful response",cause:H,statusCode:K.status,url:$,responseHeaders:Z,requestBodyValues:X.values})}}catch(K){throw s94({error:K,url:$,requestBodyValues:X.values})}},zJ=({errorSchema:$,errorToMessage:Y,isRetryable:X})=>async({response:G,url:J,requestBodyValues:Q})=>{let W=await G.text(),K=XV(G);if(W.trim()==="")return{responseHeaders:K,value:new FY({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,isRetryable:X==null?void 0:X(G)})};try{let Z=await X54({text:W,schema:$});return{responseHeaders:K,value:new FY({message:Y(Z),url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,data:Z,isRetryable:X==null?void 0:X(G,Z)})}}catch(Z){return{responseHeaders:K,value:new FY({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,isRetryable:X==null?void 0:X(G)})}}},jQ=($)=>async({response:Y})=>{let X=XV(Y);if(Y.body==null)throw new M94({});return{responseHeaders:X,value:G54({stream:Y.body,schema:$})}},Jh8=($)=>async({response:Y})=>{let X=XV(Y);if(Y.body==null)throw new M94({});let G="";return{responseHeaders:X,value:Y.body.pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({async transform(J,Q){if(J.endsWith(`
`))Q.enqueue(await k90({text:G+J,schema:$})),G="";else G+=J}}))}},C5=($)=>async({response:Y,url:X,requestBodyValues:G})=>{let J=await Y.text(),Q=await k90({text:J,schema:$}),W=XV(Y);if(!Q.success)throw new FY({message:"Invalid JSON response",cause:Q.error,statusCode:Y.status,responseHeaders:W,responseBody:J,url:X,requestBodyValues:G});return{responseHeaders:W,value:Q.value,rawValue:Q.rawValue}},x90=()=>async({response:$,url:Y,requestBodyValues:X})=>{let G=XV($);if(!$.body)throw new FY({message:"Response body is empty",url:Y,requestBodyValues:X,statusCode:$.status,responseHeaders:G,responseBody:void 0});try{let J=await $.arrayBuffer();return{responseHeaders:G,value:new Uint8Array(J)}}catch(J){throw new FY({message:"Failed to read response as array buffer",url:Y,requestBodyValues:X,statusCode:$.status,responseHeaders:G,responseBody:void 0,cause:J})}},Qh8=()=>async({response:$,url:Y,requestBodyValues:X})=>{let G=XV($),J=await $.text();return{responseHeaders:G,value:new FY({message:$.statusText,url:Y,requestBodyValues:X,statusCode:$.status,responseHeaders:G,responseBody:J})}},My0,Wh8,r64,Kh8=($)=>typeof $==="string"?{...r64,name:$}:{...r64,...$},zh8=($,Y)=>{return a9($.innerType._def,Y)},Vh8=($)=>{let Y={type:"integer",format:"unix-time"};for(let X of $.checks)switch(X.kind){case"min":Y.minimum=X.value;break;case"max":Y.maximum=X.value;break}return Y},Nh8=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $},Uy0=void 0,fZ,Oh8,Ry0,_h8=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>a9(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0},kh8=($,Y)=>{var X;if(Y.currentPath.toString()===((X=Y.propertyPath)==null?void 0:X.toString()))return a9($.innerType._def,Y);let G=a9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return G?{anyOf:[{not:kW()},G]}:kW()},vh8=($,Y)=>{if(Y.pipeStrategy==="input")return a9($.in._def,Y);else if(Y.pipeStrategy==="output")return a9($.out._def,Y);let X=a9($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=a9($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}},gh8=($,Y)=>{return a9($.innerType._def,Y)},mh8=($,Y,X)=>{switch(Y){case U0.ZodString:return W54($,X);case U0.ZodNumber:return Th8($);case U0.ZodObject:return Ih8($,X);case U0.ZodBigInt:return Uh8($);case U0.ZodBoolean:return Hh8();case U0.ZodDate:return Q54($,X);case U0.ZodUndefined:return hh8();case U0.ZodNull:return Ph8();case U0.ZodArray:return Zh8($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return wh8($,X);case U0.ZodIntersection:return Ah8($,X);case U0.ZodTuple:return bh8($,X);case U0.ZodRecord:return K54($,X);case U0.ZodLiteral:return Bh8($);case U0.ZodEnum:return Dh8($);case U0.ZodNativeEnum:return Rh8($);case U0.ZodNullable:return jh8($,X);case U0.ZodOptional:return kh8($,X);case U0.ZodMap:return Mh8($,X);case U0.ZodSet:return yh8($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return xh8($,X);case U0.ZodNaN:case U0.ZodNever:return qh8();case U0.ZodEffects:return Lh8($,X);case U0.ZodAny:return kW();case U0.ZodUnknown:return fh8();case U0.ZodDefault:return Fh8($,X);case U0.ZodBranded:return J54($,X);case U0.ZodReadonly:return gh8($,X);case U0.ZodCatch:return zh8($,X);case U0.ZodPipeline:return vh8($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})()}},uh8=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")},ph8=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:uh8(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),kW();return Y.$refStrategy==="seen"?kW():void 0}}},dh8=($,Y,X)=>{if($.description)X.description=$.description;return X},ch8=($)=>{let Y=Kh8($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}},lh8=($,Y)=>{var X;let G=ch8(Y),J=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((H,[z,V])=>{var F;return{...H,[z]:(F=a9(V._def,{...G,currentPath:[...G.basePath,G.definitionPath,z]},!0))!=null?F:kW()}},{}):void 0,Q=typeof Y==="string"?Y:(Y==null?void 0:Y.nameStrategy)==="title"?void 0:Y==null?void 0:Y.name,W=(X=a9($._def,Q===void 0?G:{...G,currentPath:[...G.basePath,G.definitionPath,Q]},!1))!=null?X:kW(),K=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(K!==void 0)W.title=K;let Z=Q===void 0?J?{...W,[G.definitionPath]:J}:W:{$ref:[...G.$refStrategy==="relative"?[]:G.basePath,G.definitionPath,Q].join("/"),[G.definitionPath]:{...J,[Q]:W}};return Z.$schema="http://json-schema.org/draft-07/schema#",Z},ih8,th8,eh8,zy0,Qf8,h90,Vm=class{constructor($,Y){this.specificationVersion="v2";var X,G;this.modelId=$,this.config=Y;let J=(X=Y.errorStructure)!=null?X:h90;this.chunkSchema=Uf8(J.errorSchema),this.failedResponseHandler=zJ(J),this.supportsStructuredOutputs=(G=Y.supportsStructuredOutputs)!=null?G:!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var $,Y,X;return(X=(Y=($=this.config).supportedUrls)==null?void 0:Y.call($))!=null?X:{}}transformRequestBody($){var Y,X,G;return(G=(X=(Y=this.config).transformRequestBody)==null?void 0:X.call(Y,$))!=null?G:$}convertUsage($){var Y,X,G;return(G=(X=(Y=this.config).convertUsage)==null?void 0:X.call(Y,$))!=null?G:Kf8($)}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,providerOptions:K,stopSequences:Z,responseFormat:H,seed:z,toolChoice:V,tools:F}){var L,N,D,A;let B=[],O=Object.assign((L=await j9({provider:"openai-compatible",providerOptions:K,schema:zy0}))!=null?L:{},(N=await j9({provider:this.providerOptionsName,providerOptions:K,schema:zy0}))!=null?N:{});if(J!=null)B.push({type:"unsupported-setting",setting:"topK"});if((H==null?void 0:H.type)==="json"&&H.schema!=null&&!this.supportsStructuredOutputs)B.push({type:"unsupported-setting",setting:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:E,toolChoice:M,toolWarnings:R}=Wf8({tools:F,toolChoice:V});return{args:{model:this.modelId,user:O.user,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,response_format:(H==null?void 0:H.type)==="json"?this.supportsStructuredOutputs===!0&&H.schema!=null?{type:"json_schema",json_schema:{schema:H.schema,name:(D=H.name)!=null?D:"response",description:H.description}}:{type:"json_object"}:void 0,stop:Z,seed:z,...Object.fromEntries(Object.entries((A=K==null?void 0:K[this.providerOptionsName])!=null?A:{}).filter(([q])=>!Object.keys(zy0.shape).includes(q))),reasoning_effort:O.reasoningEffort,verbosity:O.textVerbosity,messages:Jf8($),tools:E,tool_choice:M},warnings:[...B,...R]}}async doGenerate($){var Y,X,G,J,Q;let{args:W,warnings:K}=await this.getArgs({...$}),Z=this.transformRequestBody(W),H=JSON.stringify(Z),{responseHeaders:z,value:V,rawValue:F}=await G8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:Z,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:C5(Zf8),abortSignal:$.abortSignal,fetch:this.config.fetch}),L=V.choices[0],N=[],D=L.message.content;if(D!=null&&D.length>0)N.push({type:"text",text:D});let A=(Y=L.message.reasoning_content)!=null?Y:L.message.reasoning;if(A!=null&&A.length>0)N.push({type:"reasoning",text:A});if(L.message.tool_calls!=null)for(let E of L.message.tool_calls)N.push({type:"tool-call",toolCallId:(X=E.id)!=null?X:_8(),toolName:E.function.name,input:E.function.arguments});let B={[this.providerOptionsName]:{},...await((J=(G=this.config.metadataExtractor)==null?void 0:G.extractMetadata)==null?void 0:J.call(G,{parsedBody:F}))},O=(Q=V.usage)==null?void 0:Q.completion_tokens_details;if((O==null?void 0:O.accepted_prediction_tokens)!=null)B[this.providerOptionsName].acceptedPredictionTokens=O==null?void 0:O.accepted_prediction_tokens;if((O==null?void 0:O.rejected_prediction_tokens)!=null)B[this.providerOptionsName].rejectedPredictionTokens=O==null?void 0:O.rejected_prediction_tokens;return{content:N,finishReason:o64(L.finish_reason),usage:this.convertUsage(V.usage),providerMetadata:B,request:{body:H},response:{...s64(V),headers:z,body:F},warnings:K}}async doStream($){var Y;let{args:X,warnings:G}=await this.getArgs({...$}),J=this.transformRequestBody({...X,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0}),Q=(Y=this.config.metadataExtractor)==null?void 0:Y.createStreamExtractor(),{responseHeaders:W,value:K}=await G8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:J,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:jQ(this.chunkSchema),abortSignal:$.abortSignal,fetch:this.config.fetch}),Z=[],H="unknown",z={completionTokens:void 0,completionTokensDetails:{reasoningTokens:void 0,acceptedPredictionTokens:void 0,rejectedPredictionTokens:void 0},promptTokens:void 0,promptTokensDetails:{cachedTokens:void 0},totalTokens:void 0},V=void 0,F=!0,L=this.providerOptionsName,N=!1,D=!1,A=(B)=>this.convertUsage(B);return{stream:K.pipeThrough(new TransformStream({start(B){B.enqueue({type:"stream-start",warnings:G})},transform(B,O){var E,M,R,q,_,P,w,j,C,k,S,I,v;if($.includeRawChunks)O.enqueue({type:"raw",rawValue:B.rawValue});if(!B.success){H="error",O.enqueue({type:"error",error:B.error});return}let x=B.value;if(Q==null||Q.processChunk(B.rawValue),"error"in x){H="error",O.enqueue({type:"error",error:x.error.message});return}if(F)F=!1,O.enqueue({type:"response-metadata",...s64(x)});if(x.usage!=null){V=x.usage;let{prompt_tokens:b,completion_tokens:g,total_tokens:p,prompt_tokens_details:h,completion_tokens_details:n}=x.usage;if(z.promptTokens=b!=null?b:void 0,z.completionTokens=g!=null?g:void 0,z.totalTokens=p!=null?p:void 0,(n==null?void 0:n.reasoning_tokens)!=null)z.completionTokensDetails.reasoningTokens=n==null?void 0:n.reasoning_tokens;if((n==null?void 0:n.accepted_prediction_tokens)!=null)z.completionTokensDetails.acceptedPredictionTokens=n==null?void 0:n.accepted_prediction_tokens;if((n==null?void 0:n.rejected_prediction_tokens)!=null)z.completionTokensDetails.rejectedPredictionTokens=n==null?void 0:n.rejected_prediction_tokens;if((h==null?void 0:h.cached_tokens)!=null)z.promptTokensDetails.cachedTokens=h==null?void 0:h.cached_tokens}let y=x.choices[0];if((y==null?void 0:y.finish_reason)!=null)H=o64(y.finish_reason);if((y==null?void 0:y.delta)==null)return;let d=y.delta,u=(E=d.reasoning_content)!=null?E:d.reasoning;if(u){if(!N)O.enqueue({type:"reasoning-start",id:"reasoning-0"}),N=!0;O.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:u})}if(d.content){if(!D)O.enqueue({type:"text-start",id:"txt-0"}),D=!0;O.enqueue({type:"text-delta",id:"txt-0",delta:d.content})}if(d.tool_calls!=null)for(let b of d.tool_calls){let g=b.index;if(Z[g]==null){if(b.id==null)throw new s2({data:b,message:"Expected 'id' to be a string."});if(((M=b.function)==null?void 0:M.name)==null)throw new s2({data:b,message:"Expected 'function.name' to be a string."});O.enqueue({type:"tool-input-start",id:b.id,toolName:b.function.name}),Z[g]={id:b.id,type:"function",function:{name:b.function.name,arguments:(R=b.function.arguments)!=null?R:""},hasFinished:!1};let h=Z[g];if(((q=h.function)==null?void 0:q.name)!=null&&((_=h.function)==null?void 0:_.arguments)!=null){if(h.function.arguments.length>0)O.enqueue({type:"tool-input-delta",id:h.id,delta:h.function.arguments});if(iZ(h.function.arguments))O.enqueue({type:"tool-input-end",id:h.id}),O.enqueue({type:"tool-call",toolCallId:(P=h.id)!=null?P:_8(),toolName:h.function.name,input:h.function.arguments}),h.hasFinished=!0}continue}let p=Z[g];if(p.hasFinished)continue;if(((w=b.function)==null?void 0:w.arguments)!=null)p.function.arguments+=(C=(j=b.function)==null?void 0:j.arguments)!=null?C:"";if(O.enqueue({type:"tool-input-delta",id:p.id,delta:(k=b.function.arguments)!=null?k:""}),((S=p.function)==null?void 0:S.name)!=null&&((I=p.function)==null?void 0:I.arguments)!=null&&iZ(p.function.arguments))O.enqueue({type:"tool-input-end",id:p.id}),O.enqueue({type:"tool-call",toolCallId:(v=p.id)!=null?v:_8(),toolName:p.function.name,input:p.function.arguments}),p.hasFinished=!0}},flush(B){var O;if(N)B.enqueue({type:"reasoning-end",id:"reasoning-0"});if(D)B.enqueue({type:"text-end",id:"txt-0"});for(let M of Z.filter((R)=>!R.hasFinished))B.enqueue({type:"tool-input-end",id:M.id}),B.enqueue({type:"tool-call",toolCallId:(O=M.id)!=null?O:_8(),toolName:M.function.name,input:M.function.arguments});let E={[L]:{},...Q==null?void 0:Q.buildMetadata()};if(z.completionTokensDetails.acceptedPredictionTokens!=null)E[L].acceptedPredictionTokens=z.completionTokensDetails.acceptedPredictionTokens;if(z.completionTokensDetails.rejectedPredictionTokens!=null)E[L].rejectedPredictionTokens=z.completionTokensDetails.rejectedPredictionTokens;B.enqueue({type:"finish",finishReason:H,usage:A(V),providerMetadata:E})}})),request:{body:J},response:{headers:W}}}},U54,Zf8,Uf8=($)=>U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).nullish(),content:U.string().nullish(),reasoning_content:U.string().nullish(),reasoning:U.string().nullish(),tool_calls:U.array(U.object({index:U.number(),id:U.string().nullish(),function:U.object({name:U.string().nullish(),arguments:U.string().nullish()})})).nullish()}).nullish(),finish_reason:U.string().nullish()})),usage:U54}),$]),zf8,f90=class{constructor($,Y){this.specificationVersion="v2";var X;this.modelId=$,this.config=Y;let G=(X=Y.errorStructure)!=null?X:h90;this.chunkSchema=Ff8(G.errorSchema),this.failedResponseHandler=zJ(G)}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var $,Y,X;return(X=(Y=($=this.config).supportedUrls)==null?void 0:Y.call($))!=null?X:{}}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:K,responseFormat:Z,seed:H,providerOptions:z,tools:V,toolChoice:F}){var L;let N=[],D=(L=await j9({provider:this.providerOptionsName,providerOptions:z,schema:zf8}))!=null?L:{};if(J!=null)N.push({type:"unsupported-setting",setting:"topK"});if(V==null?void 0:V.length)N.push({type:"unsupported-setting",setting:"tools"});if(F!=null)N.push({type:"unsupported-setting",setting:"toolChoice"});if(Z!=null&&Z.type!=="text")N.push({type:"unsupported-setting",setting:"responseFormat",details:"JSON response format is not supported."});let{prompt:A,stopSequences:B}=Hf8({prompt:$}),O=[...B!=null?B:[],...K!=null?K:[]];return{args:{model:this.modelId,echo:D.echo,logit_bias:D.logitBias,suffix:D.suffix,user:D.user,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,seed:H,...z==null?void 0:z[this.providerOptionsName],prompt:A,stop:O.length>0?O:void 0},warnings:N}}async doGenerate($){var Y,X,G,J,Q,W;let{args:K,warnings:Z}=await this.getArgs($),{responseHeaders:H,value:z,rawValue:V}=await G8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:K,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:C5(Vf8),abortSignal:$.abortSignal,fetch:this.config.fetch}),F=z.choices[0],L=[];if(F.text!=null&&F.text.length>0)L.push({type:"text",text:F.text});return{content:L,usage:{inputTokens:(X=(Y=z.usage)==null?void 0:Y.prompt_tokens)!=null?X:void 0,outputTokens:(J=(G=z.usage)==null?void 0:G.completion_tokens)!=null?J:void 0,totalTokens:(W=(Q=z.usage)==null?void 0:Q.total_tokens)!=null?W:void 0},finishReason:e64(F.finish_reason),request:{body:K},response:{...t64(z),headers:H,body:V},warnings:Z}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},{responseHeaders:J,value:Q}=await G8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:G,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:jQ(this.chunkSchema),abortSignal:$.abortSignal,fetch:this.config.fetch}),W="unknown",K={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},Z=!0;return{stream:Q.pipeThrough(new TransformStream({start(H){H.enqueue({type:"stream-start",warnings:X})},transform(H,z){var V,F,L;if($.includeRawChunks)z.enqueue({type:"raw",rawValue:H.rawValue});if(!H.success){W="error",z.enqueue({type:"error",error:H.error});return}let N=H.value;if("error"in N){W="error",z.enqueue({type:"error",error:N.error});return}if(Z)Z=!1,z.enqueue({type:"response-metadata",...t64(N)}),z.enqueue({type:"text-start",id:"0"});if(N.usage!=null)K.inputTokens=(V=N.usage.prompt_tokens)!=null?V:void 0,K.outputTokens=(F=N.usage.completion_tokens)!=null?F:void 0,K.totalTokens=(L=N.usage.total_tokens)!=null?L:void 0;let D=N.choices[0];if((D==null?void 0:D.finish_reason)!=null)W=e64(D.finish_reason);if((D==null?void 0:D.text)!=null)z.enqueue({type:"text-delta",id:"0",delta:D.text})},flush(H){if(!Z)H.enqueue({type:"text-end",id:"0"});H.enqueue({type:"finish",finishReason:W,usage:K})}})),request:{body:G},response:{headers:J}}}},H54,Vf8,Ff8=($)=>U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string().nullish(),index:U.number()})),usage:H54.nullish()}),$]),$84,g90=class{constructor($,Y){this.specificationVersion="v2",this.modelId=$,this.config=Y}get provider(){return this.config.provider}get maxEmbeddingsPerCall(){var $;return($=this.config.maxEmbeddingsPerCall)!=null?$:2048}get supportsParallelCalls(){var $;return($=this.config.supportsParallelCalls)!=null?$:!0}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J,Q,W;let K=Object.assign((J=await j9({provider:"openai-compatible",providerOptions:G,schema:$84}))!=null?J:{},(Q=await j9({provider:this.providerOptionsName,providerOptions:G,schema:$84}))!=null?Q:{});if($.length>this.maxEmbeddingsPerCall)throw new Hm({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:$});let{responseHeaders:Z,value:H,rawValue:z}=await G8({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:o6(this.config.headers(),Y),body:{model:this.modelId,input:$,encoding_format:"float",dimensions:K.dimensions,user:K.user},failedResponseHandler:zJ((W=this.config.errorStructure)!=null?W:h90),successfulResponseHandler:C5(Lf8),abortSignal:X,fetch:this.config.fetch});return{embeddings:H.data.map((V)=>V.embedding),usage:H.usage?{tokens:H.usage.prompt_tokens}:void 0,providerMetadata:H.providerMetadata,response:{headers:Z,body:z}}}},Lf8,Df8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2",this.maxImagesPerCall=10}get provider(){return this.config.provider}get providerOptionsKey(){return this.config.provider.split(".")[0].trim()}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,providerOptions:Q,headers:W,abortSignal:K}){var Z,H,z,V;let F=[];if(G!=null)F.push({type:"unsupported-setting",setting:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."});if(J!=null)F.push({type:"unsupported-setting",setting:"seed"});let L=(z=(H=(Z=this.config._internal)==null?void 0:Z.currentDate)==null?void 0:H.call(Z))!=null?z:new Date,{value:N,responseHeaders:D}=await G8({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:o6(this.config.headers(),W),body:{model:this.modelId,prompt:$,n:Y,size:X,...Q[this.providerOptionsKey],response_format:"b64_json"},failedResponseHandler:zJ((V=this.config.errorStructure)!=null?V:h90),successfulResponseHandler:C5(Nf8),abortSignal:K,fetch:this.config.fetch});return{images:N.data.map((A)=>A.b64_json),warnings:F,response:{timestamp:L,modelId:this.modelId,headers:D}}}},Nf8,Af8="1.0.39",z54="vercel.ai.error",Bf8,Y84,X84,A8,V54="AI_APICallError",F54,Of8,G84,J84,b$,L54="AI_EmptyResponseBodyError",D54,Ef8,Q84,W84,Mf8,A54="AI_InvalidArgumentError",B54,Rf8,K84,Z84,py0,O54="AI_InvalidPromptError",E54,qf8,U84,H84,Pf8,M54="AI_InvalidResponseDataError",R54,wf8,z84,V84,VE,q54="AI_JSONParseError",P54,_f8,F84,L84,_90,w54="AI_LoadAPIKeyError",_54,jf8,D84,N84,O90,j54="AI_NoSuchModelError",T54,Tf8,A84,B84,FE,I54="AI_TooManyEmbeddingValuesForCallError",C54,If8,O84,E84,m90,S54="AI_TypeValidationError",k54,Cf8,M84,R84,Wm,v54="AI_UnsupportedFunctionalityError",x54,Sf8,q84,P84,p5,w84,_84=10,kf8=13,UE=32,xf8,yf8,bf8,h54="AI_DownloadError",f54,ff8,C84,S84,dZ,g54=2147483648,uf8=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=()=>{let Q=X.length,W=Array(Y);for(let K=0;K<Y;K++)W[K]=X[Math.random()*Q|0];return W.join("")};if($==null)return J;if(X.includes(G))throw new py0({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return()=>`${$}${G}${J()}`},X9,pf8,df8,c54="4.0.27",if8=()=>globalThis.fetch,Lm=async({url:$,headers:Y={},successfulResponseHandler:X,failedResponseHandler:G,abortSignal:J,fetch:Q=if8()})=>{try{let W=await Q($,{method:"GET",headers:JV(Y,`ai-sdk/provider-utils/${c54}`,d54()),signal:J}),K=GV(W);if(!W.ok){let Z;try{Z=await G({response:W,url:$,requestBodyValues:{}})}catch(H){if(Km(H)||b$.isInstance(H))throw H;throw new b$({message:"Failed to process error response",cause:H,statusCode:W.status,url:$,responseHeaders:K,requestBodyValues:{}})}throw Z.value}try{return await X({response:W,url:$,requestBodyValues:{}})}catch(Z){if(Z instanceof Error){if(Km(Z)||b$.isInstance(Z))throw Z}throw new b$({message:"Failed to process successful response",cause:Z,statusCode:W.status,url:$,responseHeaders:K,requestBodyValues:{}})}}catch(W){throw p54({error:W,url:$,requestBodyValues:{}})}},nf8="JSON schema:",rf8="You MUST answer with a JSON object that matches the JSON schema above.",af8="You MUST answer with JSON.",of8,tf8,$g8,x84,Yg8=($)=>typeof $==="string"?{...x84,name:$}:{...x84,...$},Qg8=($,Y)=>{return s9($.innerType._def,Y)},Wg8=($)=>{let Y={type:"integer",format:"unix-time"};for(let X of $.checks)switch(X.kind){case"min":Y.minimum=X.value;break;case"max":Y.maximum=X.value;break}return Y},Hg8=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $},Fy0=void 0,mZ,Fg8,_y0,Eg8=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>s9(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0},_g8=($,Y)=>{var X;if(Y.currentPath.toString()===((X=Y.propertyPath)==null?void 0:X.toString()))return s9($.innerType._def,Y);let G=s9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return G?{anyOf:[{not:vW()},G]}:vW()},jg8=($,Y)=>{if(Y.pipeStrategy==="input")return s9($.in._def,Y);else if(Y.pipeStrategy==="output")return s9($.out._def,Y);let X=s9($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=s9($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}},vg8=($,Y)=>{return s9($.innerType._def,Y)},xg8=($,Y,X)=>{switch(Y){case U0.ZodString:return a54($,X);case U0.ZodNumber:return Rg8($);case U0.ZodObject:return qg8($,X);case U0.ZodBigInt:return Gg8($);case U0.ZodBoolean:return Jg8();case U0.ZodDate:return r54($,X);case U0.ZodUndefined:return Sg8();case U0.ZodNull:return Bg8();case U0.ZodArray:return Xg8($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return Og8($,X);case U0.ZodIntersection:return zg8($,X);case U0.ZodTuple:return Cg8($,X);case U0.ZodRecord:return s54($,X);case U0.ZodLiteral:return Vg8($);case U0.ZodEnum:return Ug8($);case U0.ZodNativeEnum:return Ng8($);case U0.ZodNullable:return Mg8($,X);case U0.ZodOptional:return _g8($,X);case U0.ZodMap:return Dg8($,X);case U0.ZodSet:return Ig8($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return Tg8($,X);case U0.ZodNaN:case U0.ZodNever:return Ag8();case U0.ZodEffects:return Zg8($,X);case U0.ZodAny:return vW();case U0.ZodUnknown:return kg8();case U0.ZodDefault:return Kg8($,X);case U0.ZodBranded:return n54($,X);case U0.ZodReadonly:return vg8($,X);case U0.ZodCatch:return Qg8($,X);case U0.ZodPipeline:return jg8($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})()}},yg8=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")},bg8=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:yg8(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),vW();return Y.$refStrategy==="seen"?vW():void 0}}},hg8=($,Y,X)=>{if($.description)X.description=$.description;return X},fg8=($)=>{let Y=Yg8($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}},gg8=($,Y)=>{var X;let G=fg8(Y),J=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((H,[z,V])=>{var F;return{...H,[z]:(F=s9(V._def,{...G,currentPath:[...G.basePath,G.definitionPath,z]},!0))!=null?F:vW()}},{}):void 0,Q=typeof Y==="string"?Y:(Y==null?void 0:Y.nameStrategy)==="title"?void 0:Y==null?void 0:Y.name,W=(X=s9($._def,Q===void 0?G:{...G,currentPath:[...G.basePath,G.definitionPath,Q]},!1))!=null?X:vW(),K=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(K!==void 0)W.title=K;let Z=Q===void 0?J?{...W,[G.definitionPath]:J}:W:{$ref:[...G.$refStrategy==="relative"?[]:G.basePath,G.definitionPath,Q].join("/"),[G.definitionPath]:{...J,[Q]:W}};return Z.$schema="http://json-schema.org/draft-07/schema#",Z},jy0,ng8=()=>globalThis.fetch,G9=async({url:$,headers:Y,body:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>t54({url:$,headers:{"Content-Type":"application/json",...Y},body:{content:JSON.stringify(X),values:X},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),c90=async({url:$,headers:Y,formData:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>t54({url:$,headers:Y,body:{content:X,values:Object.fromEntries(X.entries())},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),t54=async({url:$,headers:Y={},body:X,successfulResponseHandler:G,failedResponseHandler:J,abortSignal:Q,fetch:W=ng8()})=>{try{let K=await W($,{method:"POST",headers:JV(Y,`ai-sdk/provider-utils/${c54}`,d54()),body:X.content,signal:Q}),Z=GV(K);if(!K.ok){let H;try{H=await J({response:K,url:$,requestBodyValues:X.values})}catch(z){if(Km(z)||b$.isInstance(z))throw z;throw new b$({message:"Failed to process error response",cause:z,statusCode:K.status,url:$,responseHeaders:Z,requestBodyValues:X.values})}throw H.value}try{return await G({response:K,url:$,requestBodyValues:X.values})}catch(H){if(H instanceof Error){if(Km(H)||b$.isInstance(H))throw H}throw new b$({message:"Failed to process successful response",cause:H,statusCode:K.status,url:$,responseHeaders:Z,requestBodyValues:X.values})}}catch(K){throw p54({error:K,url:$,requestBodyValues:X.values})}},NE=({errorSchema:$,errorToMessage:Y,isRetryable:X})=>async({response:G,url:J,requestBodyValues:Q})=>{let W=await G.text(),K=GV(G);if(W.trim()==="")return{responseHeaders:K,value:new b$({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,isRetryable:X==null?void 0:X(G)})};try{let Z=await o54({text:W,schema:$});return{responseHeaders:K,value:new b$({message:Y(Z),url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,data:Z,isRetryable:X==null?void 0:X(G,Z)})}}catch(Z){return{responseHeaders:K,value:new b$({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,isRetryable:X==null?void 0:X(G)})}}},sZ=($)=>async({response:Y})=>{let X=GV(Y);if(Y.body==null)throw new Mf8({});return{responseHeaders:X,value:ig8({stream:Y.body,schema:$})}},I5=($)=>async({response:Y,url:X,requestBodyValues:G})=>{let J=await Y.text(),Q=await d90({text:J,schema:$}),W=GV(Y);if(!Q.success)throw new b$({message:"Invalid JSON response",cause:Q.error,statusCode:Y.status,responseHeaders:W,responseBody:J,url:X,requestBodyValues:G});return{responseHeaders:W,value:Q.value,rawValue:Q.rawValue}},ny0=()=>async({response:$,url:Y,requestBodyValues:X})=>{let G=GV($);if(!$.body)throw new b$({message:"Response body is empty",url:Y,requestBodyValues:X,statusCode:$.status,responseHeaders:G,responseBody:void 0});try{let J=await $.arrayBuffer();return{responseHeaders:G,value:new Uint8Array(J)}}catch(J){throw new b$({message:"Failed to read response as array buffer",url:Y,requestBodyValues:X,statusCode:$.status,responseHeaders:G,responseBody:void 0,cause:J})}},$$4=()=>async({response:$,url:Y,requestBodyValues:X})=>{let G=GV($),J=await $.text();return{responseHeaders:G,value:new b$({message:$.statusText,url:Y,requestBodyValues:X,statusCode:$.status,responseHeaders:G,responseBody:J})}},ry0,nZ,sg8,og8,tg8,$m8=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:K,responseFormat:Z,seed:H,tools:z,toolChoice:V,providerOptions:F}){var L,N,D,A,B;let O=[],E=(L=await w9({provider:"openai",providerOptions:F,schema:tg8}))!=null?L:{},M=Y$4(this.modelId),R=(N=E.forceReasoning)!=null?N:M.isReasoningModel;if(J!=null)O.push({type:"unsupported",feature:"topK"});let{messages:q,warnings:_}=ag8({prompt:$,systemMessageMode:(D=E.systemMessageMode)!=null?D:R?"developer":M.systemMessageMode});O.push(..._);let P=(A=E.strictJsonSchema)!=null?A:!0,w={model:this.modelId,logit_bias:E.logitBias,logprobs:E.logprobs===!0||typeof E.logprobs==="number"?!0:void 0,top_logprobs:typeof E.logprobs==="number"?E.logprobs:typeof E.logprobs==="boolean"?E.logprobs?0:void 0:void 0,user:E.user,parallel_tool_calls:E.parallelToolCalls,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,response_format:(Z==null?void 0:Z.type)==="json"?Z.schema!=null?{type:"json_schema",json_schema:{schema:Z.schema,strict:P,name:(B=Z.name)!=null?B:"response",description:Z.description}}:{type:"json_object"}:void 0,stop:K,seed:H,verbosity:E.textVerbosity,max_completion_tokens:E.maxCompletionTokens,store:E.store,metadata:E.metadata,prediction:E.prediction,reasoning_effort:E.reasoningEffort,service_tier:E.serviceTier,prompt_cache_key:E.promptCacheKey,prompt_cache_retention:E.promptCacheRetention,safety_identifier:E.safetyIdentifier,messages:q};if(R){if(E.reasoningEffort!=="none"||!M.supportsNonReasoningParameters){if(w.temperature!=null)w.temperature=void 0,O.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(w.top_p!=null)w.top_p=void 0,O.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"});if(w.logprobs!=null)w.logprobs=void 0,O.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(w.frequency_penalty!=null)w.frequency_penalty=void 0,O.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(w.presence_penalty!=null)w.presence_penalty=void 0,O.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(w.logit_bias!=null)w.logit_bias=void 0,O.push({type:"other",message:"logitBias is not supported for reasoning models"});if(w.top_logprobs!=null)w.top_logprobs=void 0,O.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(w.max_tokens!=null){if(w.max_completion_tokens==null)w.max_completion_tokens=w.max_tokens;w.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(w.temperature!=null)w.temperature=void 0,O.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(E.serviceTier==="flex"&&!M.supportsFlexProcessing)O.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),w.service_tier=void 0;if(E.serviceTier==="priority"&&!M.supportsPriorityProcessing)O.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),w.service_tier=void 0;let{tools:j,toolChoice:C,toolWarnings:k}=eg8({tools:z,toolChoice:V});return{args:{...w,tools:j,tool_choice:C},warnings:[...O,...k]}}async doGenerate($){var Y,X,G,J,Q,W;let{args:K,warnings:Z}=await this.getArgs($),{responseHeaders:H,value:z,rawValue:V}=await G9({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),body:K,failedResponseHandler:nZ,successfulResponseHandler:I5(sg8),abortSignal:$.abortSignal,fetch:this.config.fetch}),F=z.choices[0],L=[],N=F.message.content;if(N!=null&&N.length>0)L.push({type:"text",text:N});for(let B of(Y=F.message.tool_calls)!=null?Y:[])L.push({type:"tool-call",toolCallId:(X=B.id)!=null?X:X9(),toolName:B.function.name,input:B.function.arguments});for(let B of(G=F.message.annotations)!=null?G:[])L.push({type:"source",sourceType:"url",id:X9(),url:B.url_citation.url,title:B.url_citation.title});let D=(J=z.usage)==null?void 0:J.completion_tokens_details,A={openai:{}};if((D==null?void 0:D.accepted_prediction_tokens)!=null)A.openai.acceptedPredictionTokens=D==null?void 0:D.accepted_prediction_tokens;if((D==null?void 0:D.rejected_prediction_tokens)!=null)A.openai.rejectedPredictionTokens=D==null?void 0:D.rejected_prediction_tokens;if(((Q=F.logprobs)==null?void 0:Q.content)!=null)A.openai.logprobs=F.logprobs.content;return{content:L,finishReason:{unified:h84(F.finish_reason),raw:(W=F.finish_reason)!=null?W:void 0},usage:b84(z.usage),request:{body:K},response:{...Dy0(z),headers:H,body:V},warnings:Z,providerMetadata:A}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:Q}=await G9({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),body:G,failedResponseHandler:nZ,successfulResponseHandler:sZ(og8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W=[],K={unified:"other",raw:void 0},Z=void 0,H=!1,z=!1,V={openai:{}};return{stream:Q.pipeThrough(new TransformStream({start(F){F.enqueue({type:"stream-start",warnings:X})},transform(F,L){var N,D,A,B,O,E,M,R,q,_,P,w,j,C,k,S,I;if($.includeRawChunks)L.enqueue({type:"raw",rawValue:F.rawValue});if(!F.success){K={unified:"error",raw:void 0},L.enqueue({type:"error",error:F.error});return}let v=F.value;if("error"in v){K={unified:"error",raw:void 0},L.enqueue({type:"error",error:v.error});return}if(!H){let d=Dy0(v);if(Object.values(d).some(Boolean))H=!0,L.enqueue({type:"response-metadata",...Dy0(v)})}if(v.usage!=null){if(Z=v.usage,((N=v.usage.completion_tokens_details)==null?void 0:N.accepted_prediction_tokens)!=null)V.openai.acceptedPredictionTokens=(D=v.usage.completion_tokens_details)==null?void 0:D.accepted_prediction_tokens;if(((A=v.usage.completion_tokens_details)==null?void 0:A.rejected_prediction_tokens)!=null)V.openai.rejectedPredictionTokens=(B=v.usage.completion_tokens_details)==null?void 0:B.rejected_prediction_tokens}let x=v.choices[0];if((x==null?void 0:x.finish_reason)!=null)K={unified:h84(x.finish_reason),raw:x.finish_reason};if(((O=x==null?void 0:x.logprobs)==null?void 0:O.content)!=null)V.openai.logprobs=x.logprobs.content;if((x==null?void 0:x.delta)==null)return;let y=x.delta;if(y.content!=null){if(!z)L.enqueue({type:"text-start",id:"0"}),z=!0;L.enqueue({type:"text-delta",id:"0",delta:y.content})}if(y.tool_calls!=null)for(let d of y.tool_calls){let u=d.index;if(W[u]==null){if(d.type!=null&&d.type!=="function")throw new VE({data:d,message:"Expected 'function' type."});if(d.id==null)throw new VE({data:d,message:"Expected 'id' to be a string."});if(((E=d.function)==null?void 0:E.name)==null)throw new VE({data:d,message:"Expected 'function.name' to be a string."});L.enqueue({type:"tool-input-start",id:d.id,toolName:d.function.name}),W[u]={id:d.id,type:"function",function:{name:d.function.name,arguments:(M=d.function.arguments)!=null?M:""},hasFinished:!1};let g=W[u];if(((R=g.function)==null?void 0:R.name)!=null&&((q=g.function)==null?void 0:q.arguments)!=null){if(g.function.arguments.length>0)L.enqueue({type:"tool-input-delta",id:g.id,delta:g.function.arguments});if(Zm(g.function.arguments))L.enqueue({type:"tool-input-end",id:g.id}),L.enqueue({type:"tool-call",toolCallId:(_=g.id)!=null?_:X9(),toolName:g.function.name,input:g.function.arguments}),g.hasFinished=!0}continue}let b=W[u];if(b.hasFinished)continue;if(((P=d.function)==null?void 0:P.arguments)!=null)b.function.arguments+=(j=(w=d.function)==null?void 0:w.arguments)!=null?j:"";if(L.enqueue({type:"tool-input-delta",id:b.id,delta:(C=d.function.arguments)!=null?C:""}),((k=b.function)==null?void 0:k.name)!=null&&((S=b.function)==null?void 0:S.arguments)!=null&&Zm(b.function.arguments))L.enqueue({type:"tool-input-end",id:b.id}),L.enqueue({type:"tool-call",toolCallId:(I=b.id)!=null?I:X9(),toolName:b.function.name,input:b.function.arguments}),b.hasFinished=!0}if(y.annotations!=null)for(let d of y.annotations)L.enqueue({type:"source",sourceType:"url",id:X9(),url:d.url_citation.url,title:d.url_citation.title})},flush(F){if(z)F.enqueue({type:"text-end",id:"0"});F.enqueue({type:"finish",finishReason:K,usage:b84(Z),...V!=null?{providerMetadata:V}:{}})}})),request:{body:G},response:{headers:J}}}},Xm8,Gm8,u84,Jm8=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={},this.modelId=$,this.config=Y}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:K,responseFormat:Z,tools:H,toolChoice:z,seed:V,providerOptions:F}){let L=[],N={...await w9({provider:"openai",providerOptions:F,schema:u84}),...await w9({provider:this.providerOptionsName,providerOptions:F,schema:u84})};if(J!=null)L.push({type:"unsupported",feature:"topK"});if(H==null?void 0:H.length)L.push({type:"unsupported",feature:"tools"});if(z!=null)L.push({type:"unsupported",feature:"toolChoice"});if(Z!=null&&Z.type!=="text")L.push({type:"unsupported",feature:"responseFormat",details:"JSON response format is not supported."});let{prompt:D,stopSequences:A}=Ym8({prompt:$}),B=[...A!=null?A:[],...K!=null?K:[]];return{args:{model:this.modelId,echo:N.echo,logit_bias:N.logitBias,logprobs:(N==null?void 0:N.logprobs)===!0?0:(N==null?void 0:N.logprobs)===!1?void 0:N==null?void 0:N.logprobs,suffix:N.suffix,user:N.user,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,seed:V,prompt:D,stop:B.length>0?B:void 0},warnings:L}}async doGenerate($){var Y;let{args:X,warnings:G}=await this.getArgs($),{responseHeaders:J,value:Q,rawValue:W}=await G9({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),body:X,failedResponseHandler:nZ,successfulResponseHandler:I5(Xm8),abortSignal:$.abortSignal,fetch:this.config.fetch}),K=Q.choices[0],Z={openai:{}};if(K.logprobs!=null)Z.openai.logprobs=K.logprobs;return{content:[{type:"text",text:K.text}],usage:f84(Q.usage),finishReason:{unified:m84(K.finish_reason),raw:(Y=K.finish_reason)!=null?Y:void 0},request:{body:X},response:{...g84(Q),headers:J,body:W},providerMetadata:Z,warnings:G}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:Q}=await G9({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),body:G,failedResponseHandler:nZ,successfulResponseHandler:sZ(Gm8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W={unified:"other",raw:void 0},K={openai:{}},Z=void 0,H=!0;return{stream:Q.pipeThrough(new TransformStream({start(z){z.enqueue({type:"stream-start",warnings:X})},transform(z,V){if($.includeRawChunks)V.enqueue({type:"raw",rawValue:z.rawValue});if(!z.success){W={unified:"error",raw:void 0},V.enqueue({type:"error",error:z.error});return}let F=z.value;if("error"in F){W={unified:"error",raw:void 0},V.enqueue({type:"error",error:F.error});return}if(H)H=!1,V.enqueue({type:"response-metadata",...g84(F)}),V.enqueue({type:"text-start",id:"0"});if(F.usage!=null)Z=F.usage;let L=F.choices[0];if((L==null?void 0:L.finish_reason)!=null)W={unified:m84(L.finish_reason),raw:L.finish_reason};if((L==null?void 0:L.logprobs)!=null)K.openai.logprobs=L.logprobs;if((L==null?void 0:L.text)!=null&&L.text.length>0)V.enqueue({type:"text-delta",id:"0",delta:L.text})},flush(z){if(!H)z.enqueue({type:"text-end",id:"0"});z.enqueue({type:"finish",finishReason:W,providerMetadata:K,usage:f84(Z)})}})),request:{body:G},response:{headers:J}}}},Qm8,Wm8,Km8=class{constructor($,Y){this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=$,this.config=Y}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J;if($.length>this.maxEmbeddingsPerCall)throw new m90({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:$});let Q=(J=await w9({provider:"openai",providerOptions:G,schema:Qm8}))!=null?J:{},{responseHeaders:W,value:K,rawValue:Z}=await G9({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:p8(this.config.headers(),Y),body:{model:this.modelId,input:$,encoding_format:"float",dimensions:Q.dimensions,user:Q.user},failedResponseHandler:nZ,successfulResponseHandler:I5(Wm8),abortSignal:X,fetch:this.config.fetch});return{warnings:[],embeddings:K.data.map((H)=>H.embedding),usage:K.usage?{tokens:K.usage.prompt_tokens}:void 0,response:{headers:W,body:Z}}}},p84,Zm8,Um8,X$4,zm8,Vm8,Fm8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get maxImagesPerCall(){var $;return($=Zm8[this.modelId])!=null?$:1}get provider(){return this.config.provider}async doGenerate({prompt:$,files:Y,mask:X,n:G,size:J,aspectRatio:Q,seed:W,providerOptions:K,headers:Z,abortSignal:H}){var z,V,F,L,N,D,A,B,O,E,M;let R=[];if(Q!=null)R.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."});if(W!=null)R.push({type:"unsupported",feature:"seed"});let q=(F=(V=(z=this.config._internal)==null?void 0:z.currentDate)==null?void 0:V.call(z))!=null?F:new Date;if(Y!=null){let j=(L=await w9({provider:"openai",providerOptions:K,schema:Vm8}))!=null?L:{},{value:C,responseHeaders:k}=await c90({url:this.config.url({path:"/images/edits",modelId:this.modelId}),headers:p8(this.config.headers(),Z),formData:hf8({model:this.modelId,prompt:$,image:await Promise.all(Y.map((S)=>S.type==="file"?new Blob([S.data instanceof Uint8Array?new Blob([S.data],{type:S.mediaType}):new Blob([GT(S.data)],{type:S.mediaType})],{type:S.mediaType}):u54(S.url))),mask:X!=null?await Lm8(X):void 0,n:G,size:J,quality:j.quality,background:j.background,output_format:j.outputFormat,output_compression:j.outputCompression,input_fidelity:j.inputFidelity,user:j.user}),failedResponseHandler:nZ,successfulResponseHandler:I5(p84),abortSignal:H,fetch:this.config.fetch});return{images:C.data.map((S)=>S.b64_json),warnings:R,usage:C.usage!=null?{inputTokens:(N=C.usage.input_tokens)!=null?N:void 0,outputTokens:(D=C.usage.output_tokens)!=null?D:void 0,totalTokens:(A=C.usage.total_tokens)!=null?A:void 0}:void 0,response:{timestamp:q,modelId:this.modelId,headers:k},providerMetadata:{openai:{images:C.data.map((S,I)=>{var v,x,y,d,u,b;return{...S.revised_prompt?{revisedPrompt:S.revised_prompt}:{},created:(v=C.created)!=null?v:void 0,size:(x=C.size)!=null?x:void 0,quality:(y=C.quality)!=null?y:void 0,background:(d=C.background)!=null?d:void 0,outputFormat:(u=C.output_format)!=null?u:void 0,...d84((b=C.usage)==null?void 0:b.input_tokens_details,I,C.data.length)}})}}}}let _=(B=await w9({provider:"openai",providerOptions:K,schema:zm8}))!=null?B:{},{value:P,responseHeaders:w}=await G9({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:p8(this.config.headers(),Z),body:{model:this.modelId,prompt:$,n:G,size:J,quality:_.quality,style:_.style,background:_.background,moderation:_.moderation,output_format:_.outputFormat,output_compression:_.outputCompression,user:_.user,...!Hm8(this.modelId)?{response_format:"b64_json"}:{}},failedResponseHandler:nZ,successfulResponseHandler:I5(p84),abortSignal:H,fetch:this.config.fetch});return{images:P.data.map((j)=>j.b64_json),warnings:R,usage:P.usage!=null?{inputTokens:(O=P.usage.input_tokens)!=null?O:void 0,outputTokens:(E=P.usage.output_tokens)!=null?E:void 0,totalTokens:(M=P.usage.total_tokens)!=null?M:void 0}:void 0,response:{timestamp:q,modelId:this.modelId,headers:w},providerMetadata:{openai:{images:P.data.map((j,C)=>{var k,S,I,v,x,y;return{...j.revised_prompt?{revisedPrompt:j.revised_prompt}:{},created:(k=P.created)!=null?k:void 0,size:(S=P.size)!=null?S:void 0,quality:(I=P.quality)!=null?I:void 0,background:(v=P.background)!=null?v:void 0,outputFormat:(x=P.output_format)!=null?x:void 0,...d84((y=P.usage)==null?void 0:y.input_tokens_details,C,P.data.length)}})}}}}},G$4,J$4,Dm8,Nm8,Am8,Bm8,Om8,Em8,Mm8=($={})=>{return Em8($)},Rm8,qm8,Pm8,wm8=($)=>Pm8($),Q$4,W$4,_m8,jm8,Tm8,Im8,Cm8,Sm8,km8,vm8=($={})=>{return km8($)},K$4,Z$4,xm8,U$4,Ty0,ym8,bm8,hm8,fm8,Iy0,Cy0,gm8,mm8=($={})=>gm8($),um8,pm8,dm8,cm8,lm8=($={})=>cm8($),im8,nm8,rm8,am8,Sy0,sm8,om8,tm8,em8,$u8=($)=>em8($),Yu8,Ju8,Um,Qu8,Wu8,H$4=20,i84,Hu8=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({maxOutputTokens:$,temperature:Y,stopSequences:X,topP:G,topK:J,presencePenalty:Q,frequencyPenalty:W,seed:K,prompt:Z,providerOptions:H,tools:z,toolChoice:V,responseFormat:F}){var L,N,D,A,B,O,E,M,R,q;let _=[],P=Y$4(this.modelId);if(J!=null)_.push({type:"unsupported",feature:"topK"});if(K!=null)_.push({type:"unsupported",feature:"seed"});if(Q!=null)_.push({type:"unsupported",feature:"presencePenalty"});if(W!=null)_.push({type:"unsupported",feature:"frequencyPenalty"});if(X!=null)_.push({type:"unsupported",feature:"stopSequences"});let w=this.config.provider.includes("azure")?"azure":"openai",j=await w9({provider:w,providerOptions:H,schema:i84});if(j==null&&w!=="openai")j=await w9({provider:"openai",providerOptions:H,schema:i84});let C=(L=j==null?void 0:j.forceReasoning)!=null?L:P.isReasoningModel;if((j==null?void 0:j.conversation)&&(j==null?void 0:j.previousResponseId))_.push({type:"unsupported",feature:"conversation",details:"conversation and previousResponseId cannot be used together"});let k=y54({tools:z,providerToolNames:{"openai.code_interpreter":"code_interpreter","openai.file_search":"file_search","openai.image_generation":"image_generation","openai.local_shell":"local_shell","openai.shell":"shell","openai.web_search":"web_search","openai.web_search_preview":"web_search_preview","openai.mcp":"mcp","openai.apply_patch":"apply_patch","openai.tool_search":"tool_search"},resolveProviderToolName:(a)=>a.id==="openai.custom"?a.args.name:void 0}),S=new Set,{tools:I,toolChoice:v,toolWarnings:x}=await Ku8({tools:z,toolChoice:V,allowedTools:(N=j==null?void 0:j.allowedTools)!=null?N:void 0,toolNameMapping:k,customProviderToolNames:S}),{input:y,warnings:d}=await Gu8({prompt:Z,toolNameMapping:k,systemMessageMode:(D=j==null?void 0:j.systemMessageMode)!=null?D:C?"developer":P.systemMessageMode,providerOptionsName:w,fileIdPrefixes:this.config.fileIdPrefixes,store:(A=j==null?void 0:j.store)!=null?A:!0,hasConversation:(j==null?void 0:j.conversation)!=null,hasLocalShellTool:p("openai.local_shell"),hasShellTool:p("openai.shell"),hasApplyPatchTool:p("openai.apply_patch"),customProviderToolNames:S.size>0?S:void 0});_.push(...d);let u=(B=j==null?void 0:j.strictJsonSchema)!=null?B:!0,b=j==null?void 0:j.include;function g(a){if(b==null)b=[a];else if(!b.includes(a))b=[...b,a]}function p(a){return(z==null?void 0:z.find((Q0)=>Q0.type==="provider"&&Q0.id===a))!=null}let h=typeof(j==null?void 0:j.logprobs)==="number"?j==null?void 0:j.logprobs:(j==null?void 0:j.logprobs)===!0?H$4:void 0;if(h)g("message.output_text.logprobs");let n=(O=z==null?void 0:z.find((a)=>a.type==="provider"&&(a.id==="openai.web_search"||a.id==="openai.web_search_preview")))==null?void 0:O.name;if(n)g("web_search_call.action.sources");if(p("openai.code_interpreter"))g("code_interpreter_call.outputs");let t=j==null?void 0:j.store;if(t===!1&&C)g("reasoning.encrypted_content");let s={model:this.modelId,input:y,temperature:Y,top_p:G,max_output_tokens:$,...((F==null?void 0:F.type)==="json"||(j==null?void 0:j.textVerbosity))&&{text:{...(F==null?void 0:F.type)==="json"&&{format:F.schema!=null?{type:"json_schema",strict:u,name:(E=F.name)!=null?E:"response",description:F.description,schema:F.schema}:{type:"json_object"}},...(j==null?void 0:j.textVerbosity)&&{verbosity:j.textVerbosity}}},conversation:j==null?void 0:j.conversation,max_tool_calls:j==null?void 0:j.maxToolCalls,metadata:j==null?void 0:j.metadata,parallel_tool_calls:j==null?void 0:j.parallelToolCalls,previous_response_id:j==null?void 0:j.previousResponseId,store:t,user:j==null?void 0:j.user,instructions:j==null?void 0:j.instructions,service_tier:j==null?void 0:j.serviceTier,include:b,prompt_cache_key:j==null?void 0:j.promptCacheKey,prompt_cache_retention:j==null?void 0:j.promptCacheRetention,safety_identifier:j==null?void 0:j.safetyIdentifier,top_logprobs:h,truncation:j==null?void 0:j.truncation,...C&&((j==null?void 0:j.reasoningEffort)!=null||(j==null?void 0:j.reasoningSummary)!=null)&&{reasoning:{...(j==null?void 0:j.reasoningEffort)!=null&&{effort:j.reasoningEffort},...(j==null?void 0:j.reasoningSummary)!=null&&{summary:j.reasoningSummary}}}};if(C){if(!((j==null?void 0:j.reasoningEffort)==="none"&&P.supportsNonReasoningParameters)){if(s.temperature!=null)s.temperature=void 0,_.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(s.top_p!=null)s.top_p=void 0,_.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"})}}else{if((j==null?void 0:j.reasoningEffort)!=null)_.push({type:"unsupported",feature:"reasoningEffort",details:"reasoningEffort is not supported for non-reasoning models"});if((j==null?void 0:j.reasoningSummary)!=null)_.push({type:"unsupported",feature:"reasoningSummary",details:"reasoningSummary is not supported for non-reasoning models"})}if((j==null?void 0:j.serviceTier)==="flex"&&!P.supportsFlexProcessing)_.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),delete s.service_tier;if((j==null?void 0:j.serviceTier)==="priority"&&!P.supportsPriorityProcessing)_.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),delete s.service_tier;let K0=(q=(R=(M=z==null?void 0:z.find((a)=>a.type==="provider"&&a.id==="openai.shell"))==null?void 0:M.args)==null?void 0:R.environment)==null?void 0:q.type,X0=K0==="containerAuto"||K0==="containerReference";return{webSearchToolName:n,args:{...s,tools:I,tool_choice:v},warnings:[..._,...x],store:t,toolNameMapping:k,providerOptionsName:w,isShellProviderExecuted:X0}}async doGenerate($){var Y,X,G,J,Q,W,K,Z,H,z,V,F,L,N,D,A,B,O,E,M,R,q,_,P,w,j,C,k;let{args:S,warnings:I,webSearchToolName:v,toolNameMapping:x,providerOptionsName:y,isShellProviderExecuted:d}=await this.getArgs($),u=this.config.url({path:"/responses",modelId:this.modelId}),b=n84($.prompt),{responseHeaders:g,value:p,rawValue:h}=await G9({url:u,headers:p8(this.config.headers(),$.headers),body:S,failedResponseHandler:nZ,successfulResponseHandler:I5(Wu8),abortSignal:$.abortSignal,fetch:this.config.fetch});if(p.error)throw new b$({message:p.error.message,url:u,requestBodyValues:S,statusCode:400,responseHeaders:g,responseBody:h,isRetryable:!1});let n=[],t=[],s=!1,K0=[];for(let Q0 of p.output)switch(Q0.type){case"reasoning":{if(Q0.summary.length===0)Q0.summary.push({type:"summary_text",text:""});for(let e of Q0.summary)n.push({type:"reasoning",text:e.text,providerMetadata:{[y]:{itemId:Q0.id,reasoningEncryptedContent:(Y=Q0.encrypted_content)!=null?Y:null}}});break}case"image_generation_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName("image_generation"),input:"{}",providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName("image_generation"),result:{result:Q0.result}});break}case"tool_search_call":{let e=(X=Q0.call_id)!=null?X:Q0.id,m=Q0.execution==="server";if(m)K0.push(e);n.push({type:"tool-call",toolCallId:e,toolName:x.toCustomToolName("tool_search"),input:JSON.stringify({arguments:Q0.arguments,call_id:Q0.call_id}),...m?{providerExecuted:!0}:{},providerMetadata:{[y]:{itemId:Q0.id}}});break}case"tool_search_output":{let e=(J=(G=Q0.call_id)!=null?G:K0.shift())!=null?J:Q0.id;n.push({type:"tool-result",toolCallId:e,toolName:x.toCustomToolName("tool_search"),result:{tools:Q0.tools},providerMetadata:{[y]:{itemId:Q0.id}}});break}case"local_shell_call":{n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:x.toCustomToolName("local_shell"),input:JSON.stringify({action:Q0.action}),providerMetadata:{[y]:{itemId:Q0.id}}});break}case"shell_call":{n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:x.toCustomToolName("shell"),input:JSON.stringify({action:{commands:Q0.action.commands}}),...d&&{providerExecuted:!0},providerMetadata:{[y]:{itemId:Q0.id}}});break}case"shell_call_output":{n.push({type:"tool-result",toolCallId:Q0.call_id,toolName:x.toCustomToolName("shell"),result:{output:Q0.output.map((e)=>({stdout:e.stdout,stderr:e.stderr,outcome:e.outcome.type==="exit"?{type:"exit",exitCode:e.outcome.exit_code}:{type:"timeout"}}))}});break}case"message":{for(let e of Q0.content){if(((W=(Q=$.providerOptions)==null?void 0:Q[y])==null?void 0:W.logprobs)&&e.logprobs)t.push(e.logprobs);let m={itemId:Q0.id,...Q0.phase!=null&&{phase:Q0.phase},...e.annotations.length>0&&{annotations:e.annotations}};n.push({type:"text",text:e.text,providerMetadata:{[y]:m}});for(let $0 of e.annotations)if($0.type==="url_citation")n.push({type:"source",sourceType:"url",id:(H=(Z=(K=this.config).generateId)==null?void 0:Z.call(K))!=null?H:X9(),url:$0.url,title:$0.title});else if($0.type==="file_citation")n.push({type:"source",sourceType:"document",id:(F=(V=(z=this.config).generateId)==null?void 0:V.call(z))!=null?F:X9(),mediaType:"text/plain",title:$0.filename,filename:$0.filename,providerMetadata:{[y]:{type:$0.type,fileId:$0.file_id,index:$0.index}}});else if($0.type==="container_file_citation")n.push({type:"source",sourceType:"document",id:(D=(N=(L=this.config).generateId)==null?void 0:N.call(L))!=null?D:X9(),mediaType:"text/plain",title:$0.filename,filename:$0.filename,providerMetadata:{[y]:{type:$0.type,fileId:$0.file_id,containerId:$0.container_id}}});else if($0.type==="file_path")n.push({type:"source",sourceType:"document",id:(O=(B=(A=this.config).generateId)==null?void 0:B.call(A))!=null?O:X9(),mediaType:"application/octet-stream",title:$0.file_id,filename:$0.file_id,providerMetadata:{[y]:{type:$0.type,fileId:$0.file_id,index:$0.index}}})}break}case"function_call":{s=!0,n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:Q0.name,input:Q0.arguments,providerMetadata:{[y]:{itemId:Q0.id,...Q0.namespace!=null&&{namespace:Q0.namespace}}}});break}case"custom_tool_call":{s=!0;let e=x.toCustomToolName(Q0.name);n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:e,input:JSON.stringify(Q0.input),providerMetadata:{[y]:{itemId:Q0.id}}});break}case"web_search_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName(v!=null?v:"web_search"),input:JSON.stringify({}),providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName(v!=null?v:"web_search"),result:a84(Q0.action)});break}case"mcp_call":{let e=Q0.approval_request_id!=null?(E=b[Q0.approval_request_id])!=null?E:Q0.id:Q0.id,m=`mcp.${Q0.name}`;n.push({type:"tool-call",toolCallId:e,toolName:m,input:Q0.arguments,providerExecuted:!0,dynamic:!0}),n.push({type:"tool-result",toolCallId:e,toolName:m,result:{type:"call",serverLabel:Q0.server_label,name:Q0.name,arguments:Q0.arguments,...Q0.output!=null?{output:Q0.output}:{},...Q0.error!=null?{error:Q0.error}:{}},providerMetadata:{[y]:{itemId:Q0.id}}});break}case"mcp_list_tools":break;case"mcp_approval_request":{let e=(M=Q0.approval_request_id)!=null?M:Q0.id,m=(_=(q=(R=this.config).generateId)==null?void 0:q.call(R))!=null?_:X9(),$0=`mcp.${Q0.name}`;n.push({type:"tool-call",toolCallId:m,toolName:$0,input:Q0.arguments,providerExecuted:!0,dynamic:!0}),n.push({type:"tool-approval-request",approvalId:e,toolCallId:m});break}case"computer_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName("computer_use"),input:"",providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName("computer_use"),result:{type:"computer_use_tool_result",status:Q0.status||"completed"}});break}case"file_search_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName("file_search"),input:"{}",providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName("file_search"),result:{queries:Q0.queries,results:(w=(P=Q0.results)==null?void 0:P.map((e)=>({attributes:e.attributes,fileId:e.file_id,filename:e.filename,score:e.score,text:e.text})))!=null?w:null}});break}case"code_interpreter_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName("code_interpreter"),input:JSON.stringify({code:Q0.code,containerId:Q0.container_id}),providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName("code_interpreter"),result:{outputs:Q0.outputs}});break}case"apply_patch_call":{n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:x.toCustomToolName("apply_patch"),input:JSON.stringify({callId:Q0.call_id,operation:Q0.operation}),providerMetadata:{[y]:{itemId:Q0.id}}});break}}let X0={[y]:{responseId:p.id,...t.length>0?{logprobs:t}:{},...typeof p.service_tier==="string"?{serviceTier:p.service_tier}:{}}},a=p.usage;return{content:n,finishReason:{unified:Ny0({finishReason:(j=p.incomplete_details)==null?void 0:j.reason,hasFunctionCall:s}),raw:(k=(C=p.incomplete_details)==null?void 0:C.reason)!=null?k:void 0},usage:c84(a),request:{body:S},response:{id:p.id,timestamp:new Date(p.created_at*1000),modelId:p.model,headers:g,body:h},providerMetadata:X0,warnings:I}}async doStream($){let{args:Y,warnings:X,webSearchToolName:G,toolNameMapping:J,store:Q,providerOptionsName:W,isShellProviderExecuted:K}=await this.getArgs($),{responseHeaders:Z,value:H}=await G9({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),body:{...Y,stream:!0},failedResponseHandler:nZ,successfulResponseHandler:sZ(Qu8),abortSignal:$.abortSignal,fetch:this.config.fetch}),z=this,V=n84($.prompt),F=new Map,L={unified:"other",raw:void 0},N=void 0,D=[],A=null,B={},O=[],E,M=!1,R={},q,_=[];return{stream:H.pipeThrough(new TransformStream({start(P){P.enqueue({type:"stream-start",warnings:X})},transform(P,w){var j,C,k,S,I,v,x,y,d,u,b,g,p,h,n,t,s,K0,X0,a,Q0,e,m,$0,Y0,Z0,F0,D0,O0,R0,P0,f0,p0,U4,P1,d1,C0,n0;if($.includeRawChunks)w.enqueue({type:"raw",rawValue:P.rawValue});if(!P.success){L={unified:"error",raw:void 0},w.enqueue({type:"error",error:P.error});return}let J0=P.value;if(r84(J0)){if(J0.item.type==="function_call")B[J0.output_index]={toolName:J0.item.name,toolCallId:J0.item.call_id},w.enqueue({type:"tool-input-start",id:J0.item.call_id,toolName:J0.item.name});else if(J0.item.type==="custom_tool_call"){let B0=J.toCustomToolName(J0.item.name);B[J0.output_index]={toolName:B0,toolCallId:J0.item.call_id},w.enqueue({type:"tool-input-start",id:J0.item.call_id,toolName:B0})}else if(J0.item.type==="web_search_call")B[J0.output_index]={toolName:J.toCustomToolName(G!=null?G:"web_search"),toolCallId:J0.item.id},w.enqueue({type:"tool-input-start",id:J0.item.id,toolName:J.toCustomToolName(G!=null?G:"web_search"),providerExecuted:!0}),w.enqueue({type:"tool-input-end",id:J0.item.id}),w.enqueue({type:"tool-call",toolCallId:J0.item.id,toolName:J.toCustomToolName(G!=null?G:"web_search"),input:JSON.stringify({}),providerExecuted:!0});else if(J0.item.type==="computer_call")B[J0.output_index]={toolName:J.toCustomToolName("computer_use"),toolCallId:J0.item.id},w.enqueue({type:"tool-input-start",id:J0.item.id,toolName:J.toCustomToolName("computer_use"),providerExecuted:!0});else if(J0.item.type==="code_interpreter_call")B[J0.output_index]={toolName:J.toCustomToolName("code_interpreter"),toolCallId:J0.item.id,codeInterpreter:{containerId:J0.item.container_id}},w.enqueue({type:"tool-input-start",id:J0.item.id,toolName:J.toCustomToolName("code_interpreter"),providerExecuted:!0}),w.enqueue({type:"tool-input-delta",id:J0.item.id,delta:`{"containerId":"${J0.item.container_id}","code":"`});else if(J0.item.type==="file_search_call")w.enqueue({type:"tool-call",toolCallId:J0.item.id,toolName:J.toCustomToolName("file_search"),input:"{}",providerExecuted:!0});else if(J0.item.type==="image_generation_call")w.enqueue({type:"tool-call",toolCallId:J0.item.id,toolName:J.toCustomToolName("image_generation"),input:"{}",providerExecuted:!0});else if(J0.item.type==="tool_search_call"){let B0=J0.item.id,Y1=J.toCustomToolName("tool_search"),c1=J0.item.execution==="server";if(B[J0.output_index]={toolName:Y1,toolCallId:B0,toolSearchExecution:(j=J0.item.execution)!=null?j:"server"},c1)w.enqueue({type:"tool-input-start",id:B0,toolName:Y1,providerExecuted:!0})}else if(J0.item.type==="tool_search_output");else if(J0.item.type==="mcp_call"||J0.item.type==="mcp_list_tools"||J0.item.type==="mcp_approval_request");else if(J0.item.type==="apply_patch_call"){let{call_id:B0,operation:Y1}=J0.item;if(B[J0.output_index]={toolName:J.toCustomToolName("apply_patch"),toolCallId:B0,applyPatch:{hasDiff:Y1.type==="delete_file",endEmitted:Y1.type==="delete_file"}},w.enqueue({type:"tool-input-start",id:B0,toolName:J.toCustomToolName("apply_patch")}),Y1.type==="delete_file"){let c1=JSON.stringify({callId:B0,operation:Y1});w.enqueue({type:"tool-input-delta",id:B0,delta:c1}),w.enqueue({type:"tool-input-end",id:B0})}else w.enqueue({type:"tool-input-delta",id:B0,delta:`{"callId":"${zE(B0)}","operation":{"type":"${zE(Y1.type)}","path":"${zE(Y1.path)}","diff":"`})}else if(J0.item.type==="shell_call")B[J0.output_index]={toolName:J.toCustomToolName("shell"),toolCallId:J0.item.call_id};else if(J0.item.type==="shell_call_output");else if(J0.item.type==="message")O.splice(0,O.length),E=(C=J0.item.phase)!=null?C:void 0,w.enqueue({type:"text-start",id:J0.item.id,providerMetadata:{[W]:{itemId:J0.item.id,...J0.item.phase!=null&&{phase:J0.item.phase}}}});else if(r84(J0)&&J0.item.type==="reasoning")R[J0.item.id]={encryptedContent:J0.item.encrypted_content,summaryParts:{0:"active"}},w.enqueue({type:"reasoning-start",id:`${J0.item.id}:0`,providerMetadata:{[W]:{itemId:J0.item.id,reasoningEncryptedContent:(k=J0.item.encrypted_content)!=null?k:null}}})}else if(Vu8(J0)){if(J0.item.type==="message"){let B0=(S=J0.item.phase)!=null?S:E;E=void 0,w.enqueue({type:"text-end",id:J0.item.id,providerMetadata:{[W]:{itemId:J0.item.id,...B0!=null&&{phase:B0},...O.length>0&&{annotations:O}}}})}else if(J0.item.type==="function_call")B[J0.output_index]=void 0,M=!0,w.enqueue({type:"tool-input-end",id:J0.item.call_id,...J0.item.namespace!=null&&{providerMetadata:{[W]:{namespace:J0.item.namespace}}}}),w.enqueue({type:"tool-call",toolCallId:J0.item.call_id,toolName:J0.item.name,input:J0.item.arguments,providerMetadata:{[W]:{itemId:J0.item.id,...J0.item.namespace!=null&&{namespace:J0.item.namespace}}}});else if(J0.item.type==="custom_tool_call"){B[J0.output_index]=void 0,M=!0;let B0=J.toCustomToolName(J0.item.name);w.enqueue({type:"tool-input-end",id:J0.item.call_id}),w.enqueue({type:"tool-call",toolCallId:J0.item.call_id,toolName:B0,input:JSON.stringify(J0.item.input),providerMetadata:{[W]:{itemId:J0.item.id}}})}else if(J0.item.type==="web_search_call")B[J0.output_index]=void 0,w.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName(G!=null?G:"web_search"),result:a84(J0.item.action)});else if(J0.item.type==="computer_call")B[J0.output_index]=void 0,w.enqueue({type:"tool-input-end",id:J0.item.id}),w.enqueue({type:"tool-call",toolCallId:J0.item.id,toolName:J.toCustomToolName("computer_use"),input:"",providerExecuted:!0}),w.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName("computer_use"),result:{type:"computer_use_tool_result",status:J0.item.status||"completed"}});else if(J0.item.type==="file_search_call")B[J0.output_index]=void 0,w.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName("file_search"),result:{queries:J0.item.queries,results:(v=(I=J0.item.results)==null?void 0:I.map((B0)=>({attributes:B0.attributes,fileId:B0.file_id,filename:B0.filename,score:B0.score,text:B0.text})))!=null?v:null}});else if(J0.item.type==="code_interpreter_call")B[J0.output_index]=void 0,w.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName("code_interpreter"),result:{outputs:J0.item.outputs}});else if(J0.item.type==="image_generation_call")w.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName("image_generation"),result:{result:J0.item.result}});else if(J0.item.type==="tool_search_call"){let B0=B[J0.output_index],Y1=J0.item.execution==="server";if(B0!=null){let c1=Y1?B0.toolCallId:(x=J0.item.call_id)!=null?x:J0.item.id;if(Y1)_.push(c1);else w.enqueue({type:"tool-input-start",id:c1,toolName:B0.toolName});w.enqueue({type:"tool-input-end",id:c1}),w.enqueue({type:"tool-call",toolCallId:c1,toolName:B0.toolName,input:JSON.stringify({arguments:J0.item.arguments,call_id:Y1?null:c1}),...Y1?{providerExecuted:!0}:{},providerMetadata:{[W]:{itemId:J0.item.id}}})}B[J0.output_index]=void 0}else if(J0.item.type==="tool_search_output"){let B0=(d=(y=J0.item.call_id)!=null?y:_.shift())!=null?d:J0.item.id;w.enqueue({type:"tool-result",toolCallId:B0,toolName:J.toCustomToolName("tool_search"),result:{tools:J0.item.tools},providerMetadata:{[W]:{itemId:J0.item.id}}})}else if(J0.item.type==="mcp_call"){B[J0.output_index]=void 0;let B0=(u=J0.item.approval_request_id)!=null?u:void 0,Y1=B0!=null?(g=(b=F.get(B0))!=null?b:V[B0])!=null?g:J0.item.id:J0.item.id,c1=`mcp.${J0.item.name}`;w.enqueue({type:"tool-call",toolCallId:Y1,toolName:c1,input:J0.item.arguments,providerExecuted:!0,dynamic:!0}),w.enqueue({type:"tool-result",toolCallId:Y1,toolName:c1,result:{type:"call",serverLabel:J0.item.server_label,name:J0.item.name,arguments:J0.item.arguments,...J0.item.output!=null?{output:J0.item.output}:{},...J0.item.error!=null?{error:J0.item.error}:{}},providerMetadata:{[W]:{itemId:J0.item.id}}})}else if(J0.item.type==="mcp_list_tools")B[J0.output_index]=void 0;else if(J0.item.type==="apply_patch_call"){let B0=B[J0.output_index];if((B0==null?void 0:B0.applyPatch)&&!B0.applyPatch.endEmitted&&J0.item.operation.type!=="delete_file"){if(!B0.applyPatch.hasDiff)w.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:zE(J0.item.operation.diff)});w.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:'"}}'}),w.enqueue({type:"tool-input-end",id:B0.toolCallId}),B0.applyPatch.endEmitted=!0}if(B0&&J0.item.status==="completed")w.enqueue({type:"tool-call",toolCallId:B0.toolCallId,toolName:J.toCustomToolName("apply_patch"),input:JSON.stringify({callId:J0.item.call_id,operation:J0.item.operation}),providerMetadata:{[W]:{itemId:J0.item.id}}});B[J0.output_index]=void 0}else if(J0.item.type==="mcp_approval_request"){B[J0.output_index]=void 0;let B0=(n=(h=(p=z.config).generateId)==null?void 0:h.call(p))!=null?n:X9(),Y1=(t=J0.item.approval_request_id)!=null?t:J0.item.id;F.set(Y1,B0);let c1=`mcp.${J0.item.name}`;w.enqueue({type:"tool-call",toolCallId:B0,toolName:c1,input:J0.item.arguments,providerExecuted:!0,dynamic:!0}),w.enqueue({type:"tool-approval-request",approvalId:Y1,toolCallId:B0})}else if(J0.item.type==="local_shell_call")B[J0.output_index]=void 0,w.enqueue({type:"tool-call",toolCallId:J0.item.call_id,toolName:J.toCustomToolName("local_shell"),input:JSON.stringify({action:{type:"exec",command:J0.item.action.command,timeoutMs:J0.item.action.timeout_ms,user:J0.item.action.user,workingDirectory:J0.item.action.working_directory,env:J0.item.action.env}}),providerMetadata:{[W]:{itemId:J0.item.id}}});else if(J0.item.type==="shell_call")B[J0.output_index]=void 0,w.enqueue({type:"tool-call",toolCallId:J0.item.call_id,toolName:J.toCustomToolName("shell"),input:JSON.stringify({action:{commands:J0.item.action.commands}}),...K&&{providerExecuted:!0},providerMetadata:{[W]:{itemId:J0.item.id}}});else if(J0.item.type==="shell_call_output")w.enqueue({type:"tool-result",toolCallId:J0.item.call_id,toolName:J.toCustomToolName("shell"),result:{output:J0.item.output.map((B0)=>({stdout:B0.stdout,stderr:B0.stderr,outcome:B0.outcome.type==="exit"?{type:"exit",exitCode:B0.outcome.exit_code}:{type:"timeout"}}))}});else if(J0.item.type==="reasoning"){let B0=R[J0.item.id],Y1=Object.entries(B0.summaryParts).filter(([c1,C4])=>C4==="active"||C4==="can-conclude").map(([c1])=>c1);for(let c1 of Y1)w.enqueue({type:"reasoning-end",id:`${J0.item.id}:${c1}`,providerMetadata:{[W]:{itemId:J0.item.id,reasoningEncryptedContent:(s=J0.item.encrypted_content)!=null?s:null}}});delete R[J0.item.id]}}else if(Nu8(J0)){let B0=B[J0.output_index];if(B0!=null)w.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:J0.delta})}else if(Au8(J0)){let B0=B[J0.output_index];if(B0!=null)w.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:J0.delta})}else if(Mu8(J0)){let B0=B[J0.output_index];if(B0==null?void 0:B0.applyPatch)w.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:zE(J0.delta)}),B0.applyPatch.hasDiff=!0}else if(Ru8(J0)){let B0=B[J0.output_index];if((B0==null?void 0:B0.applyPatch)&&!B0.applyPatch.endEmitted){if(!B0.applyPatch.hasDiff)w.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:zE(J0.diff)}),B0.applyPatch.hasDiff=!0;w.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:'"}}'}),w.enqueue({type:"tool-input-end",id:B0.toolCallId}),B0.applyPatch.endEmitted=!0}}else if(Bu8(J0))w.enqueue({type:"tool-result",toolCallId:J0.item_id,toolName:J.toCustomToolName("image_generation"),result:{result:J0.partial_image_b64},preliminary:!0});else if(Ou8(J0)){let B0=B[J0.output_index];if(B0!=null)w.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:zE(J0.delta)})}else if(Eu8(J0)){let B0=B[J0.output_index];if(B0!=null)w.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:'"}'}),w.enqueue({type:"tool-input-end",id:B0.toolCallId}),w.enqueue({type:"tool-call",toolCallId:B0.toolCallId,toolName:J.toCustomToolName("code_interpreter"),input:JSON.stringify({code:J0.code,containerId:B0.codeInterpreter.containerId}),providerExecuted:!0})}else if(Du8(J0))A=J0.response.id,w.enqueue({type:"response-metadata",id:J0.response.id,timestamp:new Date(J0.response.created_at*1000),modelId:J0.response.model});else if(zu8(J0)){if(w.enqueue({type:"text-delta",id:J0.item_id,delta:J0.delta}),((X0=(K0=$.providerOptions)==null?void 0:K0[W])==null?void 0:X0.logprobs)&&J0.logprobs)D.push(J0.logprobs)}else if(J0.type==="response.reasoning_summary_part.added"){if(J0.summary_index>0){let B0=R[J0.item_id];B0.summaryParts[J0.summary_index]="active";for(let Y1 of Object.keys(B0.summaryParts))if(B0.summaryParts[Y1]==="can-conclude")w.enqueue({type:"reasoning-end",id:`${J0.item_id}:${Y1}`,providerMetadata:{[W]:{itemId:J0.item_id}}}),B0.summaryParts[Y1]="concluded";w.enqueue({type:"reasoning-start",id:`${J0.item_id}:${J0.summary_index}`,providerMetadata:{[W]:{itemId:J0.item_id,reasoningEncryptedContent:(Q0=(a=R[J0.item_id])==null?void 0:a.encryptedContent)!=null?Q0:null}}})}}else if(J0.type==="response.reasoning_summary_text.delta")w.enqueue({type:"reasoning-delta",id:`${J0.item_id}:${J0.summary_index}`,delta:J0.delta,providerMetadata:{[W]:{itemId:J0.item_id}}});else if(J0.type==="response.reasoning_summary_part.done")if(Q)w.enqueue({type:"reasoning-end",id:`${J0.item_id}:${J0.summary_index}`,providerMetadata:{[W]:{itemId:J0.item_id}}}),R[J0.item_id].summaryParts[J0.summary_index]="concluded";else R[J0.item_id].summaryParts[J0.summary_index]="can-conclude";else if(Fu8(J0)){if(L={unified:Ny0({finishReason:(e=J0.response.incomplete_details)==null?void 0:e.reason,hasFunctionCall:M}),raw:($0=(m=J0.response.incomplete_details)==null?void 0:m.reason)!=null?$0:void 0},N=J0.response.usage,typeof J0.response.service_tier==="string")q=J0.response.service_tier}else if(Lu8(J0)){let B0=(Y0=J0.response.incomplete_details)==null?void 0:Y0.reason;L={unified:B0?Ny0({finishReason:B0,hasFunctionCall:M}):"error",raw:B0!=null?B0:"error"},N=(Z0=J0.response.usage)!=null?Z0:void 0}else if(qu8(J0)){if(O.push(J0.annotation),J0.annotation.type==="url_citation")w.enqueue({type:"source",sourceType:"url",id:(O0=(D0=(F0=z.config).generateId)==null?void 0:D0.call(F0))!=null?O0:X9(),url:J0.annotation.url,title:J0.annotation.title});else if(J0.annotation.type==="file_citation")w.enqueue({type:"source",sourceType:"document",id:(f0=(P0=(R0=z.config).generateId)==null?void 0:P0.call(R0))!=null?f0:X9(),mediaType:"text/plain",title:J0.annotation.filename,filename:J0.annotation.filename,providerMetadata:{[W]:{type:J0.annotation.type,fileId:J0.annotation.file_id,index:J0.annotation.index}}});else if(J0.annotation.type==="container_file_citation")w.enqueue({type:"source",sourceType:"document",id:(P1=(U4=(p0=z.config).generateId)==null?void 0:U4.call(p0))!=null?P1:X9(),mediaType:"text/plain",title:J0.annotation.filename,filename:J0.annotation.filename,providerMetadata:{[W]:{type:J0.annotation.type,fileId:J0.annotation.file_id,containerId:J0.annotation.container_id}}});else if(J0.annotation.type==="file_path")w.enqueue({type:"source",sourceType:"document",id:(n0=(C0=(d1=z.config).generateId)==null?void 0:C0.call(d1))!=null?n0:X9(),mediaType:"application/octet-stream",title:J0.annotation.file_id,filename:J0.annotation.file_id,providerMetadata:{[W]:{type:J0.annotation.type,fileId:J0.annotation.file_id,index:J0.annotation.index}}})}else if(Pu8(J0))w.enqueue({type:"error",error:J0})},flush(P){let w={[W]:{responseId:A,...D.length>0?{logprobs:D}:{},...q!==void 0?{serviceTier:q}:{}}};P.enqueue({type:"finish",finishReason:L,usage:c84(N),providerMetadata:w})}})),request:{body:Y},response:{headers:Z}}}},wu8,_u8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({text:$,voice:Y="alloy",outputFormat:X="mp3",speed:G,instructions:J,language:Q,providerOptions:W}){let K=[],Z=await w9({provider:"openai",providerOptions:W,schema:wu8}),H={model:this.modelId,input:$,voice:Y,response_format:"mp3",speed:G,instructions:J};if(X)if(["mp3","opus","aac","flac","wav","pcm"].includes(X))H.response_format=X;else K.push({type:"unsupported",feature:"outputFormat",details:`Unsupported output format: ${X}. Using mp3 instead.`});if(Z){let z={};for(let V in z){let F=z[V];if(F!==void 0)H[V]=F}}if(Q)K.push({type:"unsupported",feature:"language",details:`OpenAI speech models do not support language selection. Language parameter "${Q}" was ignored.`});return{requestBody:H,warnings:K}}async doGenerate($){var Y,X,G;let J=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,{requestBody:Q,warnings:W}=await this.getArgs($),{value:K,responseHeaders:Z,rawValue:H}=await G9({url:this.config.url({path:"/audio/speech",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),body:Q,failedResponseHandler:nZ,successfulResponseHandler:ny0(),abortSignal:$.abortSignal,fetch:this.config.fetch});return{audio:K,warnings:W,request:{body:JSON.stringify(Q)},response:{timestamp:J,modelId:this.modelId,headers:Z,body:H}}}},ju8,Tu8,s84,Iu8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({audio:$,mediaType:Y,providerOptions:X}){let G=[],J=await w9({provider:"openai",providerOptions:X,schema:Tu8}),Q=new FormData,W=$ instanceof Uint8Array?new Blob([$]):new Blob([GT($)]);Q.append("model",this.modelId);let K=dy0(Y);if(Q.append("file",new File([W],"audio",{type:Y}),`audio.${K}`),J){let Z={include:J.include,language:J.language,prompt:J.prompt,response_format:["gpt-4o-transcribe","gpt-4o-mini-transcribe"].includes(this.modelId)?"json":"verbose_json",temperature:J.temperature,timestamp_granularities:J.timestampGranularities};for(let[H,z]of Object.entries(Z))if(z!=null)if(Array.isArray(z))for(let V of z)Q.append(`${H}[]`,String(V));else Q.append(H,String(z))}return{formData:Q,warnings:G}}async doGenerate($){var Y,X,G,J,Q,W,K,Z;let H=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,{formData:z,warnings:V}=await this.getArgs($),{value:F,responseHeaders:L,rawValue:N}=await c90({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),formData:z,failedResponseHandler:nZ,successfulResponseHandler:I5(ju8),abortSignal:$.abortSignal,fetch:this.config.fetch}),D=F.language!=null&&F.language in s84?s84[F.language]:void 0;return{text:F.text,segments:(K=(W=(J=F.segments)==null?void 0:J.map((A)=>({text:A.text,startSecond:A.start,endSecond:A.end})))!=null?W:(Q=F.words)==null?void 0:Q.map((A)=>({text:A.word,startSecond:A.start,endSecond:A.end})))!=null?K:[],language:D,durationInSeconds:(Z=F.duration)!=null?Z:void 0,warnings:V,response:{timestamp:H,modelId:this.modelId,headers:L,body:N}}}},Cu8="3.0.63",ay0,BD=class{getId(){return this.id}shouldEnable(){return!0}serializeForSpan(){return{id:this.id,name:this.name}}},b3="mastra/1.35.0",z$4,V$4,sy0="X-Memory-Gateway-Authorization",Su8="3.0.76",ku8,o84,vu8,xu8,yu8,t84,e84,$94=4,oy0=class{constructor(){this.breakpointCount=0,this.warnings=[]}getCacheControl($,Y){let X=bu8($);if(!X)return;if(!Y.canCache){this.warnings.push({type:"unsupported",feature:"cache_control on non-cacheable context",details:`cache_control cannot be set on ${Y.type}. It will be ignored.`});return}if(this.breakpointCount++,this.breakpointCount>$94){this.warnings.push({type:"unsupported",feature:"cacheControl breakpoint limit",details:`Maximum ${$94} cache breakpoints exceeded (found ${this.breakpointCount}). This breakpoint will be ignored.`});return}return X}getWarnings(){return this.warnings}},hu8,fu8,gu8,mu8=($={})=>{return gu8($)},uu8,pu8,du8,cu8,lu8=($={})=>{return cu8($)},iu8,F$4,nu8,ru8,au8=($={})=>{return ru8($)},su8,ou8,tu8,eu8,$p8=($={})=>{return eu8($)},Yp8,L$4,Xp8,Gp8,Jp8=($={})=>{return Gp8($)},D$4,Wp8,Kp8,Zp8=($={})=>{return Kp8($)},N$4,Up8,Hp8,zp8=($={})=>{return Hp8($)},A$4,Vp8,Fp8,Lp8=($={})=>{return Fp8($)},B$4,Dp8,Np8,Ap8=($={})=>{return Np8($)},O$4,Rp8,Tp8=class{constructor($,Y){this.specificationVersion="v3";var X;this.modelId=$,this.config=Y,this.generateId=(X=Y.generateId)!=null?X:X9}supportsUrl($){return $.protocol==="https:"}get provider(){return this.config.provider}get providerOptionsName(){let $=this.config.provider,Y=$.indexOf(".");return Y===-1?$:$.substring(0,Y)}get supportedUrls(){var $,Y,X;return(X=(Y=($=this.config).supportedUrls)==null?void 0:Y.call($))!=null?X:{}}async getArgs({userSuppliedBetas:$,prompt:Y,maxOutputTokens:X,temperature:G,topP:J,topK:Q,frequencyPenalty:W,presencePenalty:K,stopSequences:Z,responseFormat:H,seed:z,tools:V,toolChoice:F,providerOptions:L,stream:N}){var D,A,B,O,E,M,R,q,_,P;let w=[];if(W!=null)w.push({type:"unsupported",feature:"frequencyPenalty"});if(K!=null)w.push({type:"unsupported",feature:"presencePenalty"});if(z!=null)w.push({type:"unsupported",feature:"seed"});if(G!=null&&G>1)w.push({type:"unsupported",feature:"temperature",details:`${G} exceeds anthropic maximum of 1.0. clamped to 1.0`}),G=1;else if(G!=null&&G<0)w.push({type:"unsupported",feature:"temperature",details:`${G} is below anthropic minimum of 0. clamped to 0`}),G=0;if((H==null?void 0:H.type)==="json"){if(H.schema==null)w.push({type:"unsupported",feature:"responseFormat",details:"JSON response format requires a schema. The response format is ignored."})}let j=this.providerOptionsName,C=await w9({provider:"anthropic",providerOptions:L,schema:e84}),k=j!=="anthropic"?await w9({provider:j,providerOptions:L,schema:e84}):null,S=k!=null,I=Object.assign({},C!=null?C:{},k!=null?k:{}),{maxOutputTokens:v,supportsStructuredOutput:x,rejectsSamplingParameters:y,isKnownModel:d}=Ip8(this.modelId);if(y){if(G!=null)w.push({type:"unsupported",feature:"temperature",details:`temperature is not supported by ${this.modelId} and will be ignored`}),G=void 0;if(Q!=null)w.push({type:"unsupported",feature:"topK",details:`topK is not supported by ${this.modelId} and will be ignored`}),Q=void 0;if(J!=null)w.push({type:"unsupported",feature:"topP",details:`topP is not supported by ${this.modelId} and will be ignored`}),J=void 0}let u=d||this.modelId.startsWith("claude-"),b=((D=this.config.supportsNativeStructuredOutput)!=null?D:!0)&&x,g=((A=this.config.supportsStrictTools)!=null?A:!0)&&x,p=(B=I==null?void 0:I.structuredOutputMode)!=null?B:"auto",h=p==="outputFormat"||p==="auto"&&b,n=(H==null?void 0:H.type)==="json"&&H.schema!=null&&!h?{type:"function",name:"json",description:"Respond with a JSON object.",inputSchema:H.schema}:void 0,t=I==null?void 0:I.contextManagement,s=new oy0,K0=y54({tools:V,providerToolNames:{"anthropic.code_execution_20250522":"code_execution","anthropic.code_execution_20250825":"code_execution","anthropic.code_execution_20260120":"code_execution","anthropic.computer_20241022":"computer","anthropic.computer_20250124":"computer","anthropic.text_editor_20241022":"str_replace_editor","anthropic.text_editor_20250124":"str_replace_editor","anthropic.text_editor_20250429":"str_replace_based_edit_tool","anthropic.text_editor_20250728":"str_replace_based_edit_tool","anthropic.bash_20241022":"bash","anthropic.bash_20250124":"bash","anthropic.memory_20250818":"memory","anthropic.web_search_20250305":"web_search","anthropic.web_search_20260209":"web_search","anthropic.web_fetch_20250910":"web_fetch","anthropic.web_fetch_20260209":"web_fetch","anthropic.tool_search_regex_20251119":"tool_search_tool_regex","anthropic.tool_search_bm25_20251119":"tool_search_tool_bm25"}}),{prompt:X0,betas:a}=await Ep8({prompt:Y,sendReasoning:(O=I==null?void 0:I.sendReasoning)!=null?O:!0,warnings:w,cacheControlValidator:s,toolNameMapping:K0}),Q0=(E=I==null?void 0:I.thinking)==null?void 0:E.type,e=Q0==="enabled"||Q0==="adaptive",m=Q0==="enabled"?(M=I==null?void 0:I.thinking)==null?void 0:M.budgetTokens:void 0,$0=Q0==="adaptive"?(R=I==null?void 0:I.thinking)==null?void 0:R.display:void 0,Y0=X!=null?X:v,Z0={model:this.modelId,max_tokens:Y0,temperature:G,top_k:Q,top_p:J,stop_sequences:Z,...e&&{thinking:{type:Q0,...m!=null&&{budget_tokens:m},...$0!=null&&{display:$0}}},...((I==null?void 0:I.effort)||(I==null?void 0:I.taskBudget)||h&&(H==null?void 0:H.type)==="json"&&H.schema!=null)&&{output_config:{...(I==null?void 0:I.effort)&&{effort:I.effort},...(I==null?void 0:I.taskBudget)&&{task_budget:{type:I.taskBudget.type,total:I.taskBudget.total,...I.taskBudget.remaining!=null&&{remaining:I.taskBudget.remaining}}},...h&&(H==null?void 0:H.type)==="json"&&H.schema!=null&&{format:{type:"json_schema",schema:qp8(H.schema)}}}},...(I==null?void 0:I.speed)&&{speed:I.speed},...(I==null?void 0:I.inferenceGeo)&&{inference_geo:I.inferenceGeo},...(I==null?void 0:I.cacheControl)&&{cache_control:I.cacheControl},...((q=I==null?void 0:I.metadata)==null?void 0:q.userId)!=null&&{metadata:{user_id:I.metadata.userId}},...(I==null?void 0:I.mcpServers)&&I.mcpServers.length>0&&{mcp_servers:I.mcpServers.map((p0)=>({type:p0.type,name:p0.name,url:p0.url,authorization_token:p0.authorizationToken,tool_configuration:p0.toolConfiguration?{allowed_tools:p0.toolConfiguration.allowedTools,enabled:p0.toolConfiguration.enabled}:void 0}))},...(I==null?void 0:I.container)&&{container:I.container.skills&&I.container.skills.length>0?{id:I.container.id,skills:I.container.skills.map((p0)=>({type:p0.type,skill_id:p0.skillId,version:p0.version}))}:I.container.id},system:X0.system,messages:X0.messages,...t&&{context_management:{edits:t.edits.map((p0)=>{let U4=p0.type;switch(U4){case"clear_tool_uses_20250919":return{type:p0.type,...p0.trigger!==void 0&&{trigger:p0.trigger},...p0.keep!==void 0&&{keep:p0.keep},...p0.clearAtLeast!==void 0&&{clear_at_least:p0.clearAtLeast},...p0.clearToolInputs!==void 0&&{clear_tool_inputs:p0.clearToolInputs},...p0.excludeTools!==void 0&&{exclude_tools:p0.excludeTools}};case"clear_thinking_20251015":return{type:p0.type,...p0.keep!==void 0&&{keep:p0.keep}};case"compact_20260112":return{type:p0.type,...p0.trigger!==void 0&&{trigger:p0.trigger},...p0.pauseAfterCompaction!==void 0&&{pause_after_compaction:p0.pauseAfterCompaction},...p0.instructions!==void 0&&{instructions:p0.instructions}};default:w.push({type:"other",message:`Unknown context management strategy: ${U4}`});return}}).filter((p0)=>p0!==void 0)}}};if(e){if(Q0==="enabled"&&m==null)w.push({type:"compatibility",feature:"extended thinking",details:"thinking budget is required when thinking is enabled. using default budget of 1024 tokens."}),Z0.thinking={type:"enabled",budget_tokens:1024},m=1024;if(Z0.temperature!=null)Z0.temperature=void 0,w.push({type:"unsupported",feature:"temperature",details:"temperature is not supported when thinking is enabled"});if(Q!=null)Z0.top_k=void 0,w.push({type:"unsupported",feature:"topK",details:"topK is not supported when thinking is enabled"});if(J!=null)Z0.top_p=void 0,w.push({type:"unsupported",feature:"topP",details:"topP is not supported when thinking is enabled"});Z0.max_tokens=Y0+(m!=null?m:0)}else if(u&&J!=null&&G!=null)w.push({type:"unsupported",feature:"topP",details:"topP is not supported when temperature is set. topP is ignored."}),Z0.top_p=void 0;if(d&&Z0.max_tokens>v){if(X!=null)w.push({type:"unsupported",feature:"maxOutputTokens",details:`${Z0.max_tokens} (maxOutputTokens + thinkingBudget) is greater than ${this.modelId} ${v} max output tokens. The max output tokens have been limited to ${v}.`});Z0.max_tokens=v}if((I==null?void 0:I.mcpServers)&&I.mcpServers.length>0)a.add("mcp-client-2025-04-04");if(t){if(a.add("context-management-2025-06-27"),t.edits.some((p0)=>p0.type==="compact_20260112"))a.add("compact-2026-01-12")}if((I==null?void 0:I.container)&&I.container.skills&&I.container.skills.length>0){if(a.add("code-execution-2025-08-25"),a.add("skills-2025-10-02"),a.add("files-api-2025-04-14"),!(V==null?void 0:V.some((p0)=>p0.type==="provider"&&(p0.id==="anthropic.code_execution_20250825"||p0.id==="anthropic.code_execution_20260120"))))w.push({type:"other",message:"code execution tool is required when using skills"})}if(I==null?void 0:I.taskBudget)a.add("task-budgets-2026-03-13");if((I==null?void 0:I.speed)==="fast")a.add("fast-mode-2026-02-01");let F0=N&&((_=I==null?void 0:I.toolStreaming)!=null?_:!0),{tools:D0,toolChoice:O0,toolWarnings:R0,betas:P0}=await Qp8(n!=null?{tools:[...V!=null?V:[],n],toolChoice:{type:"required"},disableParallelToolUse:!0,cacheControlValidator:s,supportsStructuredOutput:!1,supportsStrictTools:g,defaultEagerInputStreaming:F0}:{tools:V!=null?V:[],toolChoice:F,disableParallelToolUse:I==null?void 0:I.disableParallelToolUse,cacheControlValidator:s,supportsStructuredOutput:b,supportsStrictTools:g,defaultEagerInputStreaming:F0}),f0=s.getWarnings();return{args:{...Z0,tools:D0,tool_choice:O0,stream:N===!0?!0:void 0},warnings:[...w,...R0,...f0],betas:new Set([...a,...P0,...$,...(P=I==null?void 0:I.anthropicBeta)!=null?P:[]]),usesJsonResponseTool:n!=null,toolNameMapping:K0,providerOptionsName:j,usedCustomProviderKey:S}}async getHeaders({betas:$,headers:Y}){return p8(await cZ(this.config.headers),Y,$.size>0?{"anthropic-beta":Array.from($).join(",")}:{})}async getBetasFromHeaders($){var Y,X;let J=(Y=(await cZ(this.config.headers))["anthropic-beta"])!=null?Y:"",Q=(X=$==null?void 0:$["anthropic-beta"])!=null?X:"";return new Set([...J.toLowerCase().split(","),...Q.toLowerCase().split(",")].map((W)=>W.trim()).filter((W)=>W!==""))}buildRequestUrl($){var Y,X,G;return(G=(X=(Y=this.config).buildRequestUrl)==null?void 0:X.call(Y,this.config.baseURL,$))!=null?G:`${this.config.baseURL}/messages`}transformRequestBody($,Y){var X,G,J;return(J=(G=(X=this.config).transformRequestBody)==null?void 0:G.call(X,$,Y))!=null?J:$}extractCitationDocuments($){let Y=(X)=>{var G,J;if(X.type!=="file")return!1;if(X.mediaType!=="application/pdf"&&X.mediaType!=="text/plain")return!1;let Q=(G=X.providerOptions)==null?void 0:G.anthropic,W=Q==null?void 0:Q.citations;return(J=W==null?void 0:W.enabled)!=null?J:!1};return $.filter((X)=>X.role==="user").flatMap((X)=>X.content).filter(Y).map((X)=>{var G;let J=X;return{title:(G=J.filename)!=null?G:"Untitled Document",filename:J.filename,mediaType:J.mediaType}})}async doGenerate($){var Y,X,G,J,Q,W,K;let{args:Z,warnings:H,betas:z,usesJsonResponseTool:V,toolNameMapping:F,providerOptionsName:L,usedCustomProviderKey:N}=await this.getArgs({...$,stream:!1,userSuppliedBetas:await this.getBetasFromHeaders($.headers)}),D=[...this.extractCitationDocuments($.prompt)],A=G94(Z.tools),{responseHeaders:B,value:O,rawValue:E}=await G9({url:this.buildRequestUrl(!1),headers:await this.getHeaders({betas:z,headers:$.headers}),body:this.transformRequestBody(Z,z),failedResponseHandler:o84,successfulResponseHandler:I5(vu8),abortSignal:$.abortSignal,fetch:this.config.fetch}),M=[],R={},q={},_=!1;for(let P of O.content)switch(P.type){case"text":{if(!V){if(M.push({type:"text",text:P.text}),P.citations)for(let w of P.citations){let j=X94(w,D,this.generateId);if(j)M.push(j)}}break}case"thinking":{M.push({type:"reasoning",text:P.thinking,providerMetadata:{anthropic:{signature:P.signature}}});break}case"redacted_thinking":{M.push({type:"reasoning",text:"",providerMetadata:{anthropic:{redactedData:P.data}}});break}case"compaction":{M.push({type:"text",text:P.content,providerMetadata:{anthropic:{type:"compaction"}}});break}case"tool_use":{if(V&&P.name==="json")_=!0,M.push({type:"text",text:JSON.stringify(P.input)});else{let j=P.caller,C=j?{type:j.type,toolId:"tool_id"in j?j.tool_id:void 0}:void 0;M.push({type:"tool-call",toolCallId:P.id,toolName:P.name,input:JSON.stringify(P.input),...C&&{providerMetadata:{anthropic:{caller:C}}}})}break}case"server_tool_use":{if(P.name==="text_editor_code_execution"||P.name==="bash_code_execution")M.push({type:"tool-call",toolCallId:P.id,toolName:F.toCustomToolName("code_execution"),input:JSON.stringify({type:P.name,...P.input}),providerExecuted:!0});else if(P.name==="web_search"||P.name==="code_execution"||P.name==="web_fetch"){let w=P.name==="code_execution"&&P.input!=null&&typeof P.input==="object"&&"code"in P.input&&!("type"in P.input)?{type:"programmatic-tool-call",...P.input}:P.input;M.push({type:"tool-call",toolCallId:P.id,toolName:F.toCustomToolName(P.name),input:JSON.stringify(w),providerExecuted:!0,...A&&P.name==="code_execution"?{dynamic:!0}:{}})}else if(P.name==="tool_search_tool_regex"||P.name==="tool_search_tool_bm25")q[P.id]=P.name,M.push({type:"tool-call",toolCallId:P.id,toolName:F.toCustomToolName(P.name),input:JSON.stringify(P.input),providerExecuted:!0});break}case"mcp_tool_use":{R[P.id]={type:"tool-call",toolCallId:P.id,toolName:P.name,input:JSON.stringify(P.input),providerExecuted:!0,dynamic:!0,providerMetadata:{anthropic:{type:"mcp-tool-use",serverName:P.server_name}}},M.push(R[P.id]);break}case"mcp_tool_result":{M.push({type:"tool-result",toolCallId:P.tool_use_id,toolName:R[P.tool_use_id].toolName,isError:P.is_error,result:P.content,dynamic:!0,providerMetadata:R[P.tool_use_id].providerMetadata});break}case"web_fetch_tool_result":{if(P.content.type==="web_fetch_result")D.push({title:(Y=P.content.content.title)!=null?Y:P.content.url,mediaType:P.content.content.source.media_type}),M.push({type:"tool-result",toolCallId:P.tool_use_id,toolName:F.toCustomToolName("web_fetch"),result:{type:"web_fetch_result",url:P.content.url,retrievedAt:P.content.retrieved_at,content:{type:P.content.content.type,title:P.content.content.title,citations:P.content.content.citations,source:{type:P.content.content.source.type,mediaType:P.content.content.source.media_type,data:P.content.content.source.data}}}});else if(P.content.type==="web_fetch_tool_result_error")M.push({type:"tool-result",toolCallId:P.tool_use_id,toolName:F.toCustomToolName("web_fetch"),isError:!0,result:{type:"web_fetch_tool_result_error",errorCode:P.content.error_code}});break}case"web_search_tool_result":{if(Array.isArray(P.content)){M.push({type:"tool-result",toolCallId:P.tool_use_id,toolName:F.toCustomToolName("web_search"),result:P.content.map((w)=>{var j;return{url:w.url,title:w.title,pageAge:(j=w.page_age)!=null?j:null,encryptedContent:w.encrypted_content,type:w.type}})});for(let w of P.content)M.push({type:"source",sourceType:"url",id:this.generateId(),url:w.url,title:w.title,providerMetadata:{anthropic:{pageAge:(X=w.page_age)!=null?X:null}}})}else M.push({type:"tool-result",toolCallId:P.tool_use_id,toolName:F.toCustomToolName("web_search"),isError:!0,result:{type:"web_search_tool_result_error",errorCode:P.content.error_code}});break}case"code_execution_tool_result":{if(P.content.type==="code_execution_result")M.push({type:"tool-result",toolCallId:P.tool_use_id,toolName:F.toCustomToolName("code_execution"),result:{type:P.content.type,stdout:P.content.stdout,stderr:P.content.stderr,return_code:P.content.return_code,content:(G=P.content.content)!=null?G:[]}});else if(P.content.type==="encrypted_code_execution_result")M.push({type:"tool-result",toolCallId:P.tool_use_id,toolName:F.toCustomToolName("code_execution"),result:{type:P.content.type,encrypted_stdout:P.content.encrypted_stdout,stderr:P.content.stderr,return_code:P.content.return_code,content:(J=P.content.content)!=null?J:[]}});else if(P.content.type==="code_execution_tool_result_error")M.push({type:"tool-result",toolCallId:P.tool_use_id,toolName:F.toCustomToolName("code_execution"),isError:!0,result:{type:"code_execution_tool_result_error",errorCode:P.content.error_code}});break}case"bash_code_execution_tool_result":case"text_editor_code_execution_tool_result":{M.push({type:"tool-result",toolCallId:P.tool_use_id,toolName:F.toCustomToolName("code_execution"),result:P.content});break}case"tool_search_tool_result":{let w=q[P.tool_use_id];if(w==null){let j=F.toCustomToolName("tool_search_tool_bm25"),C=F.toCustomToolName("tool_search_tool_regex");if(j!=="tool_search_tool_bm25")w="tool_search_tool_bm25";else if(C!=="tool_search_tool_regex")w="tool_search_tool_regex";else w="tool_search_tool_regex"}if(P.content.type==="tool_search_tool_search_result")M.push({type:"tool-result",toolCallId:P.tool_use_id,toolName:F.toCustomToolName(w),result:P.content.tool_references.map((j)=>({type:j.type,toolName:j.tool_name}))});else M.push({type:"tool-result",toolCallId:P.tool_use_id,toolName:F.toCustomToolName(w),isError:!0,result:{type:"tool_search_tool_result_error",errorCode:P.content.error_code}});break}}return{content:M,finishReason:{unified:Oy0({finishReason:O.stop_reason,isJsonResponseFromTool:_}),raw:(Q=O.stop_reason)!=null?Q:void 0},usage:Y94({usage:O.usage}),request:{body:Z},response:{id:(W=O.id)!=null?W:void 0,modelId:(K=O.model)!=null?K:void 0,headers:B,body:E},warnings:H,providerMetadata:(()=>{var P,w,j,C,k;let S={usage:O.usage,cacheCreationInputTokens:(P=O.usage.cache_creation_input_tokens)!=null?P:null,stopSequence:(w=O.stop_sequence)!=null?w:null,iterations:O.usage.iterations?O.usage.iterations.map((v)=>({type:v.type,inputTokens:v.input_tokens,outputTokens:v.output_tokens})):null,container:O.container?{expiresAt:O.container.expires_at,id:O.container.id,skills:(C=(j=O.container.skills)==null?void 0:j.map((v)=>({type:v.type,skillId:v.skill_id,version:v.version})))!=null?C:null}:null,contextManagement:(k=J94(O.context_management))!=null?k:null},I={anthropic:S};if(N&&L!=="anthropic")I[L]=S;return I})()}}async doStream($){var Y,X;let{args:G,warnings:J,betas:Q,usesJsonResponseTool:W,toolNameMapping:K,providerOptionsName:Z,usedCustomProviderKey:H}=await this.getArgs({...$,stream:!0,userSuppliedBetas:await this.getBetasFromHeaders($.headers)}),z=[...this.extractCitationDocuments($.prompt)],V=G94(G.tools),F=this.buildRequestUrl(!0),{responseHeaders:L,value:N}=await G9({url:F,headers:await this.getHeaders({betas:Q,headers:$.headers}),body:this.transformRequestBody(G,Q),failedResponseHandler:o84,successfulResponseHandler:sZ(xu8),abortSignal:$.abortSignal,fetch:this.config.fetch}),D={unified:"other",raw:void 0},A={input_tokens:0,output_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0,iterations:null},B={},O={},E={},M=null,R=void 0,q=null,_=null,P=null,w=!1,j=void 0,C=this.generateId,k=N.pipeThrough(new TransformStream({start(x){x.enqueue({type:"stream-start",warnings:J})},transform(x,y){var d,u,b,g,p,h,n,t,s,K0,X0,a,Q0,e;if($.includeRawChunks)y.enqueue({type:"raw",rawValue:x.rawValue});if(!x.success){y.enqueue({type:"error",error:x.error});return}let m=x.value;switch(m.type){case"ping":return;case"content_block_start":{let $0=m.content_block,Y0=$0.type;switch(j=Y0,Y0){case"text":{if(W)return;B[m.index]={type:"text"},y.enqueue({type:"text-start",id:String(m.index)});return}case"thinking":{B[m.index]={type:"reasoning"},y.enqueue({type:"reasoning-start",id:String(m.index)});return}case"redacted_thinking":{B[m.index]={type:"reasoning"},y.enqueue({type:"reasoning-start",id:String(m.index),providerMetadata:{anthropic:{redactedData:$0.data}}});return}case"compaction":{B[m.index]={type:"text"},y.enqueue({type:"text-start",id:String(m.index),providerMetadata:{anthropic:{type:"compaction"}}});return}case"tool_use":{if(W&&$0.name==="json")w=!0,B[m.index]={type:"text"},y.enqueue({type:"text-start",id:String(m.index)});else{let F0=$0.caller,D0=F0?{type:F0.type,toolId:"tool_id"in F0?F0.tool_id:void 0}:void 0,R0=$0.input&&Object.keys($0.input).length>0?JSON.stringify($0.input):"";B[m.index]={type:"tool-call",toolCallId:$0.id,toolName:$0.name,input:R0,firstDelta:R0.length===0,...D0&&{caller:D0}},y.enqueue({type:"tool-input-start",id:$0.id,toolName:$0.name})}return}case"server_tool_use":{if(["web_fetch","web_search","code_execution","text_editor_code_execution","bash_code_execution"].includes($0.name)){let Z0=$0.name==="text_editor_code_execution"||$0.name==="bash_code_execution"?"code_execution":$0.name,F0=K.toCustomToolName(Z0),D0=$0.input!=null&&typeof $0.input==="object"&&Object.keys($0.input).length>0?JSON.stringify($0.input):"";B[m.index]={type:"tool-call",toolCallId:$0.id,toolName:F0,input:D0,providerExecuted:!0,...V&&Z0==="code_execution"?{dynamic:!0}:{},firstDelta:!0,providerToolName:$0.name},y.enqueue({type:"tool-input-start",id:$0.id,toolName:F0,providerExecuted:!0,...V&&Z0==="code_execution"?{dynamic:!0}:{}})}else if($0.name==="tool_search_tool_regex"||$0.name==="tool_search_tool_bm25"){E[$0.id]=$0.name;let Z0=K.toCustomToolName($0.name);B[m.index]={type:"tool-call",toolCallId:$0.id,toolName:Z0,input:"",providerExecuted:!0,firstDelta:!0,providerToolName:$0.name},y.enqueue({type:"tool-input-start",id:$0.id,toolName:Z0,providerExecuted:!0})}return}case"web_fetch_tool_result":{if($0.content.type==="web_fetch_result")z.push({title:(d=$0.content.content.title)!=null?d:$0.content.url,mediaType:$0.content.content.source.media_type}),y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:K.toCustomToolName("web_fetch"),result:{type:"web_fetch_result",url:$0.content.url,retrievedAt:$0.content.retrieved_at,content:{type:$0.content.content.type,title:$0.content.content.title,citations:$0.content.content.citations,source:{type:$0.content.content.source.type,mediaType:$0.content.content.source.media_type,data:$0.content.content.source.data}}}});else if($0.content.type==="web_fetch_tool_result_error")y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:K.toCustomToolName("web_fetch"),isError:!0,result:{type:"web_fetch_tool_result_error",errorCode:$0.content.error_code}});return}case"web_search_tool_result":{if(Array.isArray($0.content)){y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:K.toCustomToolName("web_search"),result:$0.content.map((Z0)=>{var F0;return{url:Z0.url,title:Z0.title,pageAge:(F0=Z0.page_age)!=null?F0:null,encryptedContent:Z0.encrypted_content,type:Z0.type}})});for(let Z0 of $0.content)y.enqueue({type:"source",sourceType:"url",id:C(),url:Z0.url,title:Z0.title,providerMetadata:{anthropic:{pageAge:(u=Z0.page_age)!=null?u:null}}})}else y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:K.toCustomToolName("web_search"),isError:!0,result:{type:"web_search_tool_result_error",errorCode:$0.content.error_code}});return}case"code_execution_tool_result":{if($0.content.type==="code_execution_result")y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:K.toCustomToolName("code_execution"),result:{type:$0.content.type,stdout:$0.content.stdout,stderr:$0.content.stderr,return_code:$0.content.return_code,content:(b=$0.content.content)!=null?b:[]}});else if($0.content.type==="encrypted_code_execution_result")y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:K.toCustomToolName("code_execution"),result:{type:$0.content.type,encrypted_stdout:$0.content.encrypted_stdout,stderr:$0.content.stderr,return_code:$0.content.return_code,content:(g=$0.content.content)!=null?g:[]}});else if($0.content.type==="code_execution_tool_result_error")y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:K.toCustomToolName("code_execution"),isError:!0,result:{type:"code_execution_tool_result_error",errorCode:$0.content.error_code}});return}case"bash_code_execution_tool_result":case"text_editor_code_execution_tool_result":{y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:K.toCustomToolName("code_execution"),result:$0.content});return}case"tool_search_tool_result":{let Z0=E[$0.tool_use_id];if(Z0==null){let F0=K.toCustomToolName("tool_search_tool_bm25"),D0=K.toCustomToolName("tool_search_tool_regex");if(F0!=="tool_search_tool_bm25")Z0="tool_search_tool_bm25";else if(D0!=="tool_search_tool_regex")Z0="tool_search_tool_regex";else Z0="tool_search_tool_regex"}if($0.content.type==="tool_search_tool_search_result")y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:K.toCustomToolName(Z0),result:$0.content.tool_references.map((F0)=>({type:F0.type,toolName:F0.tool_name}))});else y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:K.toCustomToolName(Z0),isError:!0,result:{type:"tool_search_tool_result_error",errorCode:$0.content.error_code}});return}case"mcp_tool_use":{O[$0.id]={type:"tool-call",toolCallId:$0.id,toolName:$0.name,input:JSON.stringify($0.input),providerExecuted:!0,dynamic:!0,providerMetadata:{anthropic:{type:"mcp-tool-use",serverName:$0.server_name}}},y.enqueue(O[$0.id]);return}case"mcp_tool_result":{y.enqueue({type:"tool-result",toolCallId:$0.tool_use_id,toolName:O[$0.tool_use_id].toolName,isError:$0.is_error,result:$0.content,dynamic:!0,providerMetadata:O[$0.tool_use_id].providerMetadata});return}default:throw Error(`Unsupported content block type: ${Y0}`)}}case"content_block_stop":{if(B[m.index]!=null){let $0=B[m.index];switch($0.type){case"text":{y.enqueue({type:"text-end",id:String(m.index)});break}case"reasoning":{y.enqueue({type:"reasoning-end",id:String(m.index)});break}case"tool-call":if(!(W&&$0.toolName==="json")){y.enqueue({type:"tool-input-end",id:$0.toolCallId});let Z0=$0.input===""?"{}":$0.input;if($0.providerToolName==="code_execution")try{let F0=JSON.parse(Z0);if(F0!=null&&typeof F0==="object"&&"code"in F0&&!("type"in F0))Z0=JSON.stringify({type:"programmatic-tool-call",...F0})}catch(F0){}y.enqueue({type:"tool-call",toolCallId:$0.toolCallId,toolName:$0.toolName,input:Z0,providerExecuted:$0.providerExecuted,...V&&$0.providerToolName==="code_execution"?{dynamic:!0}:{},...$0.caller&&{providerMetadata:{anthropic:{caller:$0.caller}}}})}break}delete B[m.index]}j=void 0;return}case"content_block_delta":{let $0=m.delta.type;switch($0){case"text_delta":{if(W)return;y.enqueue({type:"text-delta",id:String(m.index),delta:m.delta.text});return}case"thinking_delta":{y.enqueue({type:"reasoning-delta",id:String(m.index),delta:m.delta.thinking});return}case"signature_delta":{if(j==="thinking")y.enqueue({type:"reasoning-delta",id:String(m.index),delta:"",providerMetadata:{anthropic:{signature:m.delta.signature}}});return}case"compaction_delta":{if(m.delta.content!=null)y.enqueue({type:"text-delta",id:String(m.index),delta:m.delta.content});return}case"input_json_delta":{let Y0=B[m.index],Z0=m.delta.partial_json;if(Z0.length===0)return;if(w){if((Y0==null?void 0:Y0.type)!=="text")return;y.enqueue({type:"text-delta",id:String(m.index),delta:Z0})}else{if((Y0==null?void 0:Y0.type)!=="tool-call")return;if(Y0.firstDelta&&(Y0.providerToolName==="bash_code_execution"||Y0.providerToolName==="text_editor_code_execution"))Z0=`{"type": "${Y0.providerToolName}",${Z0.substring(1)}`;y.enqueue({type:"tool-input-delta",id:Y0.toolCallId,delta:Z0}),Y0.input+=Z0,Y0.firstDelta=!1}return}case"citations_delta":{let Y0=m.delta.citation,Z0=X94(Y0,z,C);if(Z0)y.enqueue(Z0);return}default:throw Error(`Unsupported delta type: ${$0}`)}}case"message_start":{if(A.input_tokens=m.message.usage.input_tokens,A.cache_read_input_tokens=(p=m.message.usage.cache_read_input_tokens)!=null?p:0,A.cache_creation_input_tokens=(h=m.message.usage.cache_creation_input_tokens)!=null?h:0,R={...m.message.usage},q=(n=m.message.usage.cache_creation_input_tokens)!=null?n:null,m.message.container!=null)P={expiresAt:m.message.container.expires_at,id:m.message.container.id,skills:null};if(m.message.stop_reason!=null)D={unified:Oy0({finishReason:m.message.stop_reason,isJsonResponseFromTool:w}),raw:m.message.stop_reason};if(y.enqueue({type:"response-metadata",id:(t=m.message.id)!=null?t:void 0,modelId:(s=m.message.model)!=null?s:void 0}),m.message.content!=null)for(let $0=0;$0<m.message.content.length;$0++){let Y0=m.message.content[$0];if(Y0.type==="tool_use"){let Z0=Y0.caller,F0=Z0?{type:Z0.type,toolId:"tool_id"in Z0?Z0.tool_id:void 0}:void 0;y.enqueue({type:"tool-input-start",id:Y0.id,toolName:Y0.name});let D0=JSON.stringify((K0=Y0.input)!=null?K0:{});y.enqueue({type:"tool-input-delta",id:Y0.id,delta:D0}),y.enqueue({type:"tool-input-end",id:Y0.id}),y.enqueue({type:"tool-call",toolCallId:Y0.id,toolName:Y0.name,input:D0,...F0&&{providerMetadata:{anthropic:{caller:F0}}}})}}return}case"message_delta":{if(m.usage.input_tokens!=null&&A.input_tokens!==m.usage.input_tokens)A.input_tokens=m.usage.input_tokens;if(A.output_tokens=m.usage.output_tokens,m.usage.cache_read_input_tokens!=null)A.cache_read_input_tokens=m.usage.cache_read_input_tokens;if(m.usage.cache_creation_input_tokens!=null)A.cache_creation_input_tokens=m.usage.cache_creation_input_tokens,q=m.usage.cache_creation_input_tokens;if(m.usage.iterations!=null)A.iterations=m.usage.iterations;if(D={unified:Oy0({finishReason:m.delta.stop_reason,isJsonResponseFromTool:w}),raw:(X0=m.delta.stop_reason)!=null?X0:void 0},_=(a=m.delta.stop_sequence)!=null?a:null,P=m.delta.container!=null?{expiresAt:m.delta.container.expires_at,id:m.delta.container.id,skills:(e=(Q0=m.delta.container.skills)==null?void 0:Q0.map(($0)=>({type:$0.type,skillId:$0.skill_id,version:$0.version})))!=null?e:null}:null,m.context_management)M=J94(m.context_management);R={...R,...m.usage};return}case"message_stop":{let $0={usage:R!=null?R:null,cacheCreationInputTokens:q,stopSequence:_,iterations:A.iterations?A.iterations.map((Z0)=>({type:Z0.type,inputTokens:Z0.input_tokens,outputTokens:Z0.output_tokens})):null,container:P,contextManagement:M},Y0={anthropic:$0};if(H&&Z!=="anthropic")Y0[Z]=$0;y.enqueue({type:"finish",finishReason:D,usage:Y94({usage:A,rawUsage:R}),providerMetadata:Y0});return}case"error":{y.enqueue({type:"error",error:m.error});return}default:throw Error(`Unsupported chunk type: ${m}`)}}})),[S,I]=k.tee(),v=S.getReader();try{await v.read();let x=await v.read();if(((Y=x.value)==null?void 0:Y.type)==="raw")x=await v.read();if(((X=x.value)==null?void 0:X.type)==="error"){let y=x.value.error;throw new b$({message:y.message,url:F,requestBodyValues:G,statusCode:y.type==="overloaded_error"?529:500,responseHeaders:L,responseBody:JSON.stringify(y),isRetryable:y.type==="overloaded_error"})}}finally{v.cancel().catch(()=>{}),v.releaseLock()}return{stream:I,request:{body:G},response:{headers:L}}}},Cp8,Sp8,kp8,vp8,xp8,yp8,bp8,hp8,fp8,gp8,mp8,up8,pp8,dp8,cp8,lp8,ip8,np8,rp8,ap8,sp8,op8=($={})=>{return sp8($)},tp8,ep8="3.0.70",$d8,lZ,Yd8,Xd8,Gd8=class{constructor($,Y){this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=$,this.config=Y}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){let J=await w9({provider:"google",providerOptions:G,schema:Xd8});if($.length>this.maxEmbeddingsPerCall)throw new m90({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:$});let Q=p8(await cZ(this.config.headers),Y),W=J==null?void 0:J.content;if(W!=null&&W.length!==$.length)throw Error(`The number of multimodal content entries (${W.length}) must match the number of values (${$.length}).`);if($.length===1){let z=W==null?void 0:W[0],V=$[0]?[{text:$[0]}]:[],F=z!=null?[...V,...z]:[{text:$[0]}],{responseHeaders:L,value:N,rawValue:D}=await G9({url:`${this.config.baseURL}/models/${this.modelId}:embedContent`,headers:Q,body:{model:`models/${this.modelId}`,content:{parts:F},outputDimensionality:J==null?void 0:J.outputDimensionality,taskType:J==null?void 0:J.taskType},failedResponseHandler:lZ,successfulResponseHandler:I5(Qd8),abortSignal:X,fetch:this.config.fetch});return{warnings:[],embeddings:[N.embedding.values],usage:void 0,response:{headers:L,body:D}}}let{responseHeaders:K,value:Z,rawValue:H}=await G9({url:`${this.config.baseURL}/models/${this.modelId}:batchEmbedContents`,headers:Q,body:{requests:$.map((z,V)=>{let F=W==null?void 0:W[V],L=z?[{text:z}]:[];return{model:`models/${this.modelId}`,content:{role:"user",parts:F!=null?[...L,...F]:[{text:z}]},outputDimensionality:J==null?void 0:J.outputDimensionality,taskType:J==null?void 0:J.taskType}})},failedResponseHandler:lZ,successfulResponseHandler:I5(Jd8),abortSignal:X,fetch:this.config.fetch});return{warnings:[],embeddings:Z.embeddings.map((z)=>z.values),usage:void 0,response:{headers:K,body:H}}}},Jd8,Qd8,Kd8,K94,Fd8,Dd8=class{constructor(){this.accumulatedArgs={},this.jsonText="",this.pathStack=[],this.stringOpen=!1}processPartialArgs($){let Y="";for(let X of $){let G=X.jsonPath.replace(/^\$\./,"");if(!G)continue;let J=Nd8(G),Q=Ad8(this.accumulatedArgs,J);if(X.stringValue!=null&&Q!==void 0){let Z=JSON.stringify(X.stringValue).slice(1,-1);Z94(this.accumulatedArgs,J,Q+X.stringValue),Y+=Z;continue}let K=Bd8(X);if(K==null)continue;Z94(this.accumulatedArgs,J,K.value),Y+=this.emitNavigationTo(J,X,K.json)}return this.jsonText+=Y,{currentJSON:this.accumulatedArgs,textDelta:Y}}finalize(){let $=JSON.stringify(this.accumulatedArgs),Y=$.slice(this.jsonText.length);return{finalJSON:$,closingDelta:Y}}ensureRoot(){if(this.pathStack.length===0)return this.pathStack.push({segment:"",isArray:!1,childCount:0}),"{";return""}emitNavigationTo($,Y,X){let G="";if(this.stringOpen)G+='"',this.stringOpen=!1;G+=this.ensureRoot();let J=$.slice(0,-1),Q=$[$.length-1],W=this.findCommonStackDepth(J);return G+=this.closeDownTo(W),G+=this.openDownTo(J,Q),G+=this.emitLeaf(Q,Y,X),G}findCommonStackDepth($){let Y=Math.min(this.pathStack.length-1,$.length),X=0;for(let G=0;G<Y;G++)if(this.pathStack[G+1].segment===$[G])X++;else break;return X+1}closeDownTo($){let Y="";while(this.pathStack.length>$){let X=this.pathStack.pop();Y+=X.isArray?"]":"}"}return Y}openDownTo($,Y){let X="",G=this.pathStack.length-1;for(let J=G;J<$.length;J++){let Q=$[J],W=this.pathStack[this.pathStack.length-1];if(W.childCount>0)X+=",";if(W.childCount++,typeof Q==="string")X+=`${JSON.stringify(Q)}:`;let Z=typeof(J+1<$.length?$[J+1]:Y)==="number";X+=Z?"[":"{",this.pathStack.push({segment:Q,isArray:Z,childCount:0})}return X}emitLeaf($,Y,X){let G="",J=this.pathStack[this.pathStack.length-1];if(J.childCount>0)G+=",";if(J.childCount++,typeof $==="string")G+=`${JSON.stringify($)}:`;if(Y.stringValue!=null&&Y.willContinue)G+=X.slice(0,-1),this.stringOpen=!0;else G+=X;return G}},M$4=class{constructor($,Y){this.specificationVersion="v3";var X;this.modelId=$,this.config=Y,this.generateId=(X=Y.generateId)!=null?X:X9}get provider(){return this.config.provider}get supportedUrls(){var $,Y,X;return(X=(Y=($=this.config).supportedUrls)==null?void 0:Y.call($))!=null?X:{}}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:K,responseFormat:Z,seed:H,tools:z,toolChoice:V,providerOptions:F},{isStreaming:L=!1}={}){var N,D;let A=[],B=this.config.provider.includes("vertex")?"vertex":"google",O=await w9({provider:B,providerOptions:F,schema:K94});if(O==null&&B!=="google")O=await w9({provider:"google",providerOptions:F,schema:K94});let E=this.config.provider.startsWith("google.vertex.");if((z==null?void 0:z.some((I)=>I.type==="provider"&&I.id==="google.vertex_rag_store"))&&!E)A.push({type:"other",message:`The 'vertex_rag_store' tool is only supported with the Google Vertex provider and might not be supported or could behave unexpectedly with the current Google provider (${this.config.provider}).`});if((O==null?void 0:O.streamFunctionCallArguments)&&!E)A.push({type:"other",message:`'streamFunctionCallArguments' is only supported on the Vertex AI API and will be ignored with the current Google provider (${this.config.provider}). See https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling#streaming-fc`});let M=O==null?void 0:O.serviceTier;if((O==null?void 0:O.serviceTier)&&E)M=Fd8[O.serviceTier];let R=this.modelId.toLowerCase().startsWith("gemma-"),q=this.modelId.startsWith("gemini-3"),{contents:_,systemInstruction:P}=Vd8($,{isGemmaModel:R,providerOptionsName:B,supportsFunctionResponseParts:q}),{tools:w,toolConfig:j,toolWarnings:C}=Ld8({tools:z,toolChoice:V,modelId:this.modelId,isVertexProvider:E}),k=L&&E?(N=O==null?void 0:O.streamFunctionCallArguments)!=null?N:!1:void 0,S=j||k||(O==null?void 0:O.retrievalConfig)?{...j,...k&&{functionCallingConfig:{...j==null?void 0:j.functionCallingConfig,streamFunctionCallArguments:!0}},...(O==null?void 0:O.retrievalConfig)&&{retrievalConfig:O.retrievalConfig}}:void 0;return{args:{generationConfig:{maxOutputTokens:Y,temperature:X,topK:J,topP:G,frequencyPenalty:Q,presencePenalty:W,stopSequences:K,seed:H,responseMimeType:(Z==null?void 0:Z.type)==="json"?"application/json":void 0,responseSchema:(Z==null?void 0:Z.type)==="json"&&Z.schema!=null&&((D=O==null?void 0:O.structuredOutputs)!=null?D:!0)?pZ(Z.schema):void 0,...(O==null?void 0:O.audioTimestamp)&&{audioTimestamp:O.audioTimestamp},responseModalities:O==null?void 0:O.responseModalities,thinkingConfig:O==null?void 0:O.thinkingConfig,...(O==null?void 0:O.mediaResolution)&&{mediaResolution:O.mediaResolution},...(O==null?void 0:O.imageConfig)&&{imageConfig:O.imageConfig}},contents:_,systemInstruction:R?void 0:P,safetySettings:O==null?void 0:O.safetySettings,tools:w,toolConfig:S,cachedContent:O==null?void 0:O.cachedContent,labels:O==null?void 0:O.labels,serviceTier:M},warnings:[...A,...C],providerOptionsName:B}}async doGenerate($){var Y,X,G,J,Q,W,K,Z,H,z,V,F,L,N,D,A;let{args:B,warnings:O,providerOptionsName:E}=await this.getArgs($),M=p8(await cZ(this.config.headers),$.headers),{responseHeaders:R,value:q,rawValue:_}=await G9({url:`${this.config.baseURL}/${W94(this.modelId)}:generateContent`,headers:M,body:B,failedResponseHandler:lZ,successfulResponseHandler:I5(Ed8),abortSignal:$.abortSignal,fetch:this.config.fetch}),P=q.candidates[0],w=[],j=(X=(Y=P.content)==null?void 0:Y.parts)!=null?X:[],C=q.usageMetadata,k,S;for(let v of j)if("executableCode"in v&&((G=v.executableCode)==null?void 0:G.code)){let x=this.config.generateId();k=x,w.push({type:"tool-call",toolCallId:x,toolName:"code_execution",input:JSON.stringify(v.executableCode),providerExecuted:!0})}else if("codeExecutionResult"in v&&v.codeExecutionResult)w.push({type:"tool-result",toolCallId:k,toolName:"code_execution",result:{outcome:v.codeExecutionResult.outcome,output:(J=v.codeExecutionResult.output)!=null?J:""}}),k=void 0;else if("text"in v&&v.text!=null){let x=v.thoughtSignature?{[E]:{thoughtSignature:v.thoughtSignature}}:void 0;if(v.text.length===0){if(x!=null&&w.length>0){let y=w[w.length-1];y.providerMetadata=x}}else w.push({type:v.thought===!0?"reasoning":"text",text:v.text,providerMetadata:x})}else if("functionCall"in v&&v.functionCall.name!=null&&v.functionCall.args!=null)w.push({type:"tool-call",toolCallId:this.config.generateId(),toolName:v.functionCall.name,input:JSON.stringify(v.functionCall.args),providerMetadata:v.thoughtSignature?{[E]:{thoughtSignature:v.thoughtSignature}}:void 0});else if("inlineData"in v){let x=v.thought===!0,y=!!v.thoughtSignature;w.push({type:"file",data:v.inlineData.data,mediaType:v.inlineData.mimeType,providerMetadata:x||y?{[E]:{...x?{thought:!0}:{},...y?{thoughtSignature:v.thoughtSignature}:{}}}:void 0})}else if("toolCall"in v&&v.toolCall){let x=(Q=v.toolCall.id)!=null?Q:this.config.generateId();S=x,w.push({type:"tool-call",toolCallId:x,toolName:`server:${v.toolCall.toolType}`,input:JSON.stringify((W=v.toolCall.args)!=null?W:{}),providerExecuted:!0,dynamic:!0,providerMetadata:v.thoughtSignature?{[E]:{thoughtSignature:v.thoughtSignature,serverToolCallId:x,serverToolType:v.toolCall.toolType}}:{[E]:{serverToolCallId:x,serverToolType:v.toolCall.toolType}}})}else if("toolResponse"in v&&v.toolResponse){let x=(K=S!=null?S:v.toolResponse.id)!=null?K:this.config.generateId();w.push({type:"tool-result",toolCallId:x,toolName:`server:${v.toolResponse.toolType}`,result:(Z=v.toolResponse.response)!=null?Z:{},providerMetadata:v.thoughtSignature?{[E]:{thoughtSignature:v.thoughtSignature,serverToolCallId:x,serverToolType:v.toolResponse.toolType}}:{[E]:{serverToolCallId:x,serverToolType:v.toolResponse.toolType}}}),S=void 0}let I=(H=H94({groundingMetadata:P.groundingMetadata,generateId:this.config.generateId}))!=null?H:[];for(let v of I)w.push(v);return{content:w,finishReason:{unified:U94({finishReason:P.finishReason,hasToolCalls:w.some((v)=>v.type==="tool-call"&&!v.providerExecuted)}),raw:(z=P.finishReason)!=null?z:void 0},usage:Q94(C),warnings:O,providerMetadata:{[E]:{promptFeedback:(V=q.promptFeedback)!=null?V:null,groundingMetadata:(F=P.groundingMetadata)!=null?F:null,urlContextMetadata:(L=P.urlContextMetadata)!=null?L:null,safetyRatings:(N=P.safetyRatings)!=null?N:null,usageMetadata:C!=null?C:null,finishMessage:(D=P.finishMessage)!=null?D:null,serviceTier:(A=q.serviceTier)!=null?A:null}},request:{body:B},response:{headers:R,body:_}}}async doStream($){let{args:Y,warnings:X,providerOptionsName:G}=await this.getArgs($,{isStreaming:!0}),J=p8(await cZ(this.config.headers),$.headers),{responseHeaders:Q,value:W}=await G9({url:`${this.config.baseURL}/${W94(this.modelId)}:streamGenerateContent?alt=sse`,headers:J,body:Y,failedResponseHandler:lZ,successfulResponseHandler:sZ(Md8),abortSignal:$.abortSignal,fetch:this.config.fetch}),K={unified:"other",raw:void 0},Z=void 0,H=void 0,z=null,V=null,F=null,L=this.config.generateId,N=!1,D=null,A=null,B=0,O=new Set,E,M,R=[];return{stream:W.pipeThrough(new TransformStream({start(q){q.enqueue({type:"stream-start",warnings:X})},transform(q,_){var P,w,j,C,k,S,I,v,x,y,d,u;if($.includeRawChunks)_.enqueue({type:"raw",rawValue:q.rawValue});if(!q.success){_.enqueue({type:"error",error:q.error});return}let b=q.value,g=b.usageMetadata;if(g!=null)Z=g;if(b.serviceTier!=null)F=b.serviceTier;let p=(P=b.candidates)==null?void 0:P[0];if(p==null)return;let h=p.content;if(p.groundingMetadata!=null)z=p.groundingMetadata;if(p.urlContextMetadata!=null)V=p.urlContextMetadata;let n=H94({groundingMetadata:p.groundingMetadata,generateId:L});if(n!=null){for(let t of n)if(t.sourceType==="url"&&!O.has(t.url))O.add(t.url),_.enqueue(t)}if(h!=null){let t=(w=h.parts)!=null?w:[];for(let s of t)if("executableCode"in s&&((j=s.executableCode)==null?void 0:j.code)){let K0=L();E=K0,_.enqueue({type:"tool-call",toolCallId:K0,toolName:"code_execution",input:JSON.stringify(s.executableCode),providerExecuted:!0})}else if("codeExecutionResult"in s&&s.codeExecutionResult){let K0=E;if(K0)_.enqueue({type:"tool-result",toolCallId:K0,toolName:"code_execution",result:{outcome:s.codeExecutionResult.outcome,output:(C=s.codeExecutionResult.output)!=null?C:""}}),E=void 0}else if("text"in s&&s.text!=null){let K0=s.thoughtSignature?{[G]:{thoughtSignature:s.thoughtSignature}}:void 0;if(s.text.length===0){if(K0!=null&&D!==null)_.enqueue({type:"text-delta",id:D,delta:"",providerMetadata:K0})}else if(s.thought===!0){if(D!==null)_.enqueue({type:"text-end",id:D}),D=null;if(A===null)A=String(B++),_.enqueue({type:"reasoning-start",id:A,providerMetadata:K0});_.enqueue({type:"reasoning-delta",id:A,delta:s.text,providerMetadata:K0})}else{if(A!==null)_.enqueue({type:"reasoning-end",id:A}),A=null;if(D===null)D=String(B++),_.enqueue({type:"text-start",id:D,providerMetadata:K0});_.enqueue({type:"text-delta",id:D,delta:s.text,providerMetadata:K0})}}else if("inlineData"in s){if(D!==null)_.enqueue({type:"text-end",id:D}),D=null;if(A!==null)_.enqueue({type:"reasoning-end",id:A}),A=null;let K0=s.thought===!0,X0=!!s.thoughtSignature,a=K0||X0?{[G]:{...K0?{thought:!0}:{},...X0?{thoughtSignature:s.thoughtSignature}:{}}}:void 0;_.enqueue({type:"file",mediaType:s.inlineData.mimeType,data:s.inlineData.data,providerMetadata:a})}else if("toolCall"in s&&s.toolCall){let K0=(k=s.toolCall.id)!=null?k:L();M=K0;let X0={[G]:{...s.thoughtSignature?{thoughtSignature:s.thoughtSignature}:{},serverToolCallId:K0,serverToolType:s.toolCall.toolType}};_.enqueue({type:"tool-call",toolCallId:K0,toolName:`server:${s.toolCall.toolType}`,input:JSON.stringify((S=s.toolCall.args)!=null?S:{}),providerExecuted:!0,dynamic:!0,providerMetadata:X0})}else if("toolResponse"in s&&s.toolResponse){let K0=(I=M!=null?M:s.toolResponse.id)!=null?I:L(),X0={[G]:{...s.thoughtSignature?{thoughtSignature:s.thoughtSignature}:{},serverToolCallId:K0,serverToolType:s.toolResponse.toolType}};_.enqueue({type:"tool-result",toolCallId:K0,toolName:`server:${s.toolResponse.toolType}`,result:(v=s.toolResponse.response)!=null?v:{},providerMetadata:X0}),M=void 0}for(let s of t){if(!("functionCall"in s))continue;let K0=s.thoughtSignature?{[G]:{thoughtSignature:s.thoughtSignature}}:void 0,X0=s.functionCall.partialArgs!=null||s.functionCall.name!=null&&s.functionCall.willContinue===!0,a=s.functionCall.name==null&&s.functionCall.args==null&&s.functionCall.partialArgs==null&&s.functionCall.willContinue==null,Q0=s.functionCall.name!=null&&s.functionCall.args!=null&&s.functionCall.partialArgs==null;if(X0){if(s.functionCall.name!=null&&s.functionCall.willContinue===!0){let e=L(),m=new Dd8;if(R.push({toolCallId:e,toolName:s.functionCall.name,accumulator:m,providerMetadata:K0}),_.enqueue({type:"tool-input-start",id:e,toolName:s.functionCall.name,providerMetadata:K0}),s.functionCall.partialArgs!=null){let{textDelta:$0}=m.processPartialArgs(s.functionCall.partialArgs);if($0.length>0)_.enqueue({type:"tool-input-delta",id:e,delta:$0,providerMetadata:K0})}}else if(s.functionCall.partialArgs!=null&&R.length>0){let e=R[R.length-1],{textDelta:m}=e.accumulator.processPartialArgs(s.functionCall.partialArgs);if(m.length>0)_.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:m,providerMetadata:K0})}}else if(a&&R.length>0){let e=R.pop(),{finalJSON:m,closingDelta:$0}=e.accumulator.finalize();if($0.length>0)_.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:$0,providerMetadata:e.providerMetadata});_.enqueue({type:"tool-input-end",id:e.toolCallId,providerMetadata:e.providerMetadata}),_.enqueue({type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:m,providerMetadata:e.providerMetadata}),N=!0}else if(Q0){let e=L(),m=s.functionCall.name,$0=typeof s.functionCall.args==="string"?s.functionCall.args:JSON.stringify((x=s.functionCall.args)!=null?x:{});_.enqueue({type:"tool-input-start",id:e,toolName:m,providerMetadata:K0}),_.enqueue({type:"tool-input-delta",id:e,delta:$0,providerMetadata:K0}),_.enqueue({type:"tool-input-end",id:e,providerMetadata:K0}),_.enqueue({type:"tool-call",toolCallId:e,toolName:m,input:$0,providerMetadata:K0}),N=!0}}}if(p.finishReason!=null)K={unified:U94({finishReason:p.finishReason,hasToolCalls:N}),raw:p.finishReason},H={[G]:{promptFeedback:(y=b.promptFeedback)!=null?y:null,groundingMetadata:z,urlContextMetadata:V,safetyRatings:(d=p.safetyRatings)!=null?d:null,usageMetadata:g!=null?g:null,finishMessage:(u=p.finishMessage)!=null?u:null,serviceTier:F}}},flush(q){if(D!==null)q.enqueue({type:"text-end",id:D});if(A!==null)q.enqueue({type:"reasoning-end",id:A});q.enqueue({type:"finish",finishReason:K,usage:Q94(Z),providerMetadata:H})}})),response:{headers:Q},request:{body:Y}}}},R$4=()=>U.object({webSearchQueries:U.array(U.string()).nullish(),imageSearchQueries:U.array(U.string()).nullish(),retrievalQueries:U.array(U.string()).nullish(),searchEntryPoint:U.object({renderedContent:U.string()}).nullish(),groundingChunks:U.array(U.object({web:U.object({uri:U.string(),title:U.string().nullish()}).nullish(),image:U.object({sourceUri:U.string(),imageUri:U.string(),title:U.string().nullish(),domain:U.string().nullish()}).nullish(),retrievedContext:U.object({uri:U.string().nullish(),title:U.string().nullish(),text:U.string().nullish(),fileSearchStore:U.string().nullish()}).nullish(),maps:U.object({uri:U.string().nullish(),title:U.string().nullish(),text:U.string().nullish(),placeId:U.string().nullish()}).nullish()})).nullish(),groundingSupports:U.array(U.object({segment:U.object({startIndex:U.number().nullish(),endIndex:U.number().nullish(),text:U.string().nullish()}).nullish(),segment_text:U.string().nullish(),groundingChunkIndices:U.array(U.number()).nullish(),supportChunkIndices:U.array(U.number()).nullish(),confidenceScores:U.array(U.number()).nullish(),confidenceScore:U.array(U.number()).nullish()})).nullish(),retrievalMetadata:U.union([U.object({webDynamicRetrievalScore:U.number()}),U.object({})]).nullish()}),Od8,q$4=()=>U.object({parts:U.array(U.union([U.object({functionCall:U.object({name:U.string().nullish(),args:U.unknown().nullish(),partialArgs:U.array(Od8).nullish(),willContinue:U.boolean().nullish()}),thoughtSignature:U.string().nullish()}),U.object({inlineData:U.object({mimeType:U.string(),data:U.string()}),thought:U.boolean().nullish(),thoughtSignature:U.string().nullish()}),U.object({toolCall:U.object({toolType:U.string(),args:U.unknown().nullish(),id:U.string()}),thoughtSignature:U.string().nullish()}),U.object({toolResponse:U.object({toolType:U.string(),response:U.unknown().nullish(),id:U.string()}),thoughtSignature:U.string().nullish()}),U.object({executableCode:U.object({language:U.string(),code:U.string()}).nullish(),codeExecutionResult:U.object({outcome:U.string(),output:U.string().nullish()}).nullish(),text:U.string().nullish(),thought:U.boolean().nullish(),thoughtSignature:U.string().nullish()})])).nullish()}),j90=()=>U.object({category:U.string().nullish(),probability:U.string().nullish(),probabilityScore:U.number().nullish(),severity:U.string().nullish(),severityScore:U.number().nullish(),blocked:U.boolean().nullish()}),z94,P$4,w$4=()=>U.object({urlMetadata:U.array(U.object({retrievedUrl:U.string(),urlRetrievalStatus:U.string()})).nullish()}),Ed8,Md8,Rd8,qd8,Pd8,wd8,_d8,jd8,Td8,Id8,Cd8,Sd8,kd8,vd8,xd8=class{constructor($,Y,X){this.modelId=$,this.settings=Y,this.config=X,this.specificationVersion="v3"}get maxImagesPerCall(){if(this.settings.maxImagesPerCall!=null)return this.settings.maxImagesPerCall;if(V94(this.modelId))return 10;return 4}get provider(){return this.config.provider}async doGenerate($){if(V94(this.modelId))return this.doGenerateGemini($);return this.doGenerateImagen($)}async doGenerateImagen($){var Y,X,G;let{prompt:J,n:Q=1,size:W,aspectRatio:K="1:1",seed:Z,providerOptions:H,headers:z,abortSignal:V,files:F,mask:L}=$,N=[];if(F!=null&&F.length>0)throw Error("Google Generative AI does not support image editing with Imagen models. Use Google Vertex AI (@ai-sdk/google-vertex) for image editing capabilities.");if(L!=null)throw Error("Google Generative AI does not support image editing with masks. Use Google Vertex AI (@ai-sdk/google-vertex) for image editing capabilities.");if(W!=null)N.push({type:"unsupported",feature:"size",details:"This model does not support the `size` option. Use `aspectRatio` instead."});if(Z!=null)N.push({type:"unsupported",feature:"seed",details:"This model does not support the `seed` option through this provider."});let D=await w9({provider:"google",providerOptions:H,schema:bd8}),A=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,B={sampleCount:Q};if(K!=null)B.aspectRatio=K;if(D)Object.assign(B,D);let O={instances:[{prompt:J}],parameters:B},{responseHeaders:E,value:M}=await G9({url:`${this.config.baseURL}/models/${this.modelId}:predict`,headers:p8(await cZ(this.config.headers),z),body:O,failedResponseHandler:lZ,successfulResponseHandler:I5(yd8),abortSignal:V,fetch:this.config.fetch});return{images:M.predictions.map((R)=>R.bytesBase64Encoded),warnings:N,providerMetadata:{google:{images:M.predictions.map(()=>({}))}},response:{timestamp:A,modelId:this.modelId,headers:E}}}async doGenerateGemini($){var Y,X,G,J,Q,W,K,Z,H;let{prompt:z,n:V,size:F,aspectRatio:L,seed:N,providerOptions:D,headers:A,abortSignal:B,files:O,mask:E}=$,M=[];if(E!=null)throw Error("Gemini image models do not support mask-based image editing.");if(V!=null&&V>1)throw Error("Gemini image models do not support generating a set number of images per call. Use n=1 or omit the n parameter.");if(F!=null)M.push({type:"unsupported",feature:"size",details:"This model does not support the `size` option. Use `aspectRatio` instead."});let R=[];if(z!=null)R.push({type:"text",text:z});if(O!=null&&O.length>0)for(let C of O)if(C.type==="url")R.push({type:"file",data:new URL(C.url),mediaType:"image/*"});else R.push({type:"file",data:typeof C.data==="string"?C.data:new Uint8Array(C.data),mediaType:C.mediaType});let q=[{role:"user",content:R}],P=await new M$4(this.modelId,{provider:this.config.provider,baseURL:this.config.baseURL,headers:(Y=this.config.headers)!=null?Y:{},fetch:this.config.fetch,generateId:(X=this.config.generateId)!=null?X:X9}).doGenerate({prompt:q,seed:N,providerOptions:{google:{responseModalities:["IMAGE"],imageConfig:L?{aspectRatio:L}:void 0,...(G=D==null?void 0:D.google)!=null?G:{}}},headers:A,abortSignal:B}),w=(W=(Q=(J=this.config._internal)==null?void 0:J.currentDate)==null?void 0:Q.call(J))!=null?W:new Date,j=[];for(let C of P.content)if(C.type==="file"&&C.mediaType.startsWith("image/"))j.push(nY(C.data));return{images:j,warnings:M,providerMetadata:{google:{images:j.map(()=>({}))}},response:{timestamp:w,modelId:this.modelId,headers:(K=P.response)==null?void 0:K.headers},usage:P.usage?{inputTokens:P.usage.inputTokens.total,outputTokens:P.usage.outputTokens.total,totalTokens:((Z=P.usage.inputTokens.total)!=null?Z:0)+((H=P.usage.outputTokens.total)!=null?H:0)}:void 0}}},yd8,bd8,hd8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get provider(){return this.config.provider}get maxVideosPerCall(){return 4}async doGenerate($){var Y,X,G,J,Q,W,K,Z;let H=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,z=[],V=await w9({provider:"google",providerOptions:$.providerOptions,schema:fd8}),F=[{}],L=F[0];if($.prompt!=null)L.prompt=$.prompt;if($.image!=null)if($.image.type==="url")z.push({type:"unsupported",feature:"URL-based image input",details:"Google Generative AI video models require base64-encoded images. URL will be ignored."});else{let C=typeof $.image.data==="string"?$.image.data:Fm($.image.data);L.image={inlineData:{mimeType:$.image.mediaType||"image/png",data:C}}}if((V==null?void 0:V.referenceImages)!=null)L.referenceImages=V.referenceImages.map((C)=>{if(C.bytesBase64Encoded)return{inlineData:{mimeType:"image/png",data:C.bytesBase64Encoded}};else if(C.gcsUri)return{gcsUri:C.gcsUri};return C});let N={sampleCount:$.n};if($.aspectRatio)N.aspectRatio=$.aspectRatio;if($.resolution){let C={"1280x720":"720p","1920x1080":"1080p","3840x2160":"4k"};N.resolution=C[$.resolution]||$.resolution}if($.duration)N.durationSeconds=$.duration;if($.seed)N.seed=$.seed;if(V!=null){let C=V;if(C.personGeneration!==void 0&&C.personGeneration!==null)N.personGeneration=C.personGeneration;if(C.negativePrompt!==void 0&&C.negativePrompt!==null)N.negativePrompt=C.negativePrompt;for(let[k,S]of Object.entries(C))if(!["pollIntervalMs","pollTimeoutMs","personGeneration","negativePrompt","referenceImages"].includes(k))N[k]=S}let{value:D}=await G9({url:`${this.config.baseURL}/models/${this.modelId}:predictLongRunning`,headers:p8(await cZ(this.config.headers),$.headers),body:{instances:F,parameters:N},successfulResponseHandler:I5(F94),failedResponseHandler:lZ,abortSignal:$.abortSignal,fetch:this.config.fetch}),A=D.name;if(!A)throw new A8({name:"GOOGLE_VIDEO_GENERATION_ERROR",message:"No operation name returned from API"});let B=(J=V==null?void 0:V.pollIntervalMs)!=null?J:1e4,O=(Q=V==null?void 0:V.pollTimeoutMs)!=null?Q:600000,E=Date.now(),M=D,R;while(!M.done){if(Date.now()-E>O)throw new A8({name:"GOOGLE_VIDEO_GENERATION_TIMEOUT",message:`Video generation timed out after ${O}ms`});if(await u90(B),(W=$.abortSignal)==null?void 0:W.aborted)throw new A8({name:"GOOGLE_VIDEO_GENERATION_ABORTED",message:"Video generation request was aborted"});let{value:C,responseHeaders:k}=await Lm({url:`${this.config.baseURL}/${A}`,headers:p8(await cZ(this.config.headers),$.headers),successfulResponseHandler:I5(F94),failedResponseHandler:lZ,abortSignal:$.abortSignal,fetch:this.config.fetch});M=C,R=k}if(M.error)throw new A8({name:"GOOGLE_VIDEO_GENERATION_FAILED",message:`Video generation failed: ${M.error.message}`});let q=M.response;if(!((K=q==null?void 0:q.generateVideoResponse)==null?void 0:K.generatedSamples)||q.generateVideoResponse.generatedSamples.length===0)throw new A8({name:"GOOGLE_VIDEO_GENERATION_ERROR",message:`No videos in response. Response: ${JSON.stringify(M)}`});let _=[],P=[],w=await cZ(this.config.headers),j=w==null?void 0:w["x-goog-api-key"];for(let C of q.generateVideoResponse.generatedSamples)if((Z=C.video)==null?void 0:Z.uri){let k=j?`${C.video.uri}${C.video.uri.includes("?")?"&":"?"}key=${j}`:C.video.uri;_.push({type:"url",url:k,mediaType:"video/mp4"}),P.push({uri:C.video.uri})}if(_.length===0)throw new A8({name:"GOOGLE_VIDEO_GENERATION_ERROR",message:"No valid videos in response"});return{videos:_,warnings:z,response:{timestamp:H,modelId:this.modelId,headers:R},providerMetadata:{google:{videos:P}}}}},F94,fd8,gd8,ud8,pd8,E90=()=>U.object({modality:U.string().nullish(),tokens:U.number().nullish()}).loose(),C$4=()=>U.object({total_input_tokens:U.number().nullish(),total_output_tokens:U.number().nullish(),total_thought_tokens:U.number().nullish(),total_cached_tokens:U.number().nullish(),total_tool_use_tokens:U.number().nullish(),total_tokens:U.number().nullish(),input_tokens_by_modality:U.array(E90()).nullish(),output_tokens_by_modality:U.array(E90()).nullish(),cached_tokens_by_modality:U.array(E90()).nullish(),tool_use_tokens_by_modality:U.array(E90()).nullish(),grounding_tool_count:U.array(U.object({type:U.string().nullish(),count:U.number().nullish()}).loose()).nullish()}).loose(),S$4=()=>U.enum(["in_progress","requires_action","completed","failed","cancelled","incomplete"]),k$4=()=>{let $=U.object({type:U.literal("url_citation"),url:U.string().nullish(),title:U.string().nullish(),start_index:U.number().nullish(),end_index:U.number().nullish()}).loose(),Y=U.object({type:U.literal("file_citation"),file_name:U.string().nullish(),document_uri:U.string().nullish(),source:U.string().nullish(),page_number:U.number().nullish(),media_id:U.string().nullish(),start_index:U.number().nullish(),end_index:U.number().nullish(),custom_metadata:U.record(U.string(),U.unknown()).nullish()}).loose(),X=U.object({type:U.literal("place_citation"),name:U.string().nullish(),url:U.string().nullish(),place_id:U.string().nullish(),start_index:U.number().nullish(),end_index:U.number().nullish()}).loose();return U.union([$,Y,X,U.object({type:U.string()}).loose()])},v$4=()=>U.object({type:U.string(),text:U.string().nullish(),data:U.string().nullish(),mime_type:U.string().nullish()}).loose(),x$4=()=>{let $=U.object({type:U.literal("text"),text:U.string(),annotations:U.array(k$4()).nullish()}).loose(),Y=U.object({type:U.literal("thought"),signature:U.string().nullish(),summary:U.array(v$4()).nullish()}).loose(),X=U.object({type:U.literal("function_call"),id:U.string(),name:U.string(),arguments:U.record(U.string(),U.unknown()).nullish(),signature:U.string().nullish()}).loose(),G=U.object({type:U.literal("image"),data:U.string().nullish(),mime_type:U.string().nullish(),resolution:U.enum(["low","medium","high","ultra_high"]).nullish(),uri:U.string().nullish()}).loose(),J=U.object({type:U.enum(["google_search_call","code_execution_call","url_context_call","file_search_call","google_maps_call","mcp_server_tool_call"]),id:U.string(),arguments:U.record(U.string(),U.unknown()).nullish(),name:U.string().nullish(),server_name:U.string().nullish(),search_type:U.string().nullish(),signature:U.string().nullish()}).loose(),Q=U.object({type:U.enum(["google_search_result","code_execution_result","url_context_result","file_search_result","google_maps_result","mcp_server_tool_result"]),call_id:U.string(),result:U.unknown().nullish(),is_error:U.boolean().nullish(),name:U.string().nullish(),server_name:U.string().nullish(),signature:U.string().nullish()}).loose();return U.union([$,G,Y,X,J,Q,U.object({type:U.string()}).loose()])},vy0,od8,td8,ed8,$c8,Gc8,Jc8=1000,Qc8=1e4,Wc8=1800000,Uc8=class{constructor($,Y){if(this.specificationVersion="v3",typeof $==="string")this.modelId=$,this.agent=void 0;else this.modelId=$.agent,this.agent=$.agent;this.config=Y}get provider(){return this.config.provider}get supportedUrls(){if(this.config.supportedUrls)return this.config.supportedUrls();return{"image/*":[/^https?:\/\/.+/],"application/pdf":[/^https?:\/\/.+/],"audio/*":[/^https?:\/\/.+/],"video/*":[/^https?:\/\/(www\.)?youtube\.com\/watch\?v=.+/,/^https?:\/\/youtu\.be\/.+/,/^gs:\/\/.+/]}}async getArgs($){var Y,X,G,J,Q,W,K,Z,H,z,V,F,L,N,D,A,B,O,E,M;let R=[],q=await w9({provider:"google",providerOptions:$.providerOptions,schema:td8}),_=this.agent!=null,P=$.tools!=null&&$.tools.length>0,w,j;if(P&&_)R.push({type:"other",message:"google.interactions: tools are not supported when an agent is set; tools will be omitted from the request body."});else if(P){let g=Kc8({tools:$.tools,toolChoice:$.toolChoice});w=g.tools,j=g.toolChoice,R.push(...g.toolWarnings)}let C,k;if(((Y=$.responseFormat)==null?void 0:Y.type)==="json"){if(_)R.push({type:"other",message:"google.interactions: structured output (responseFormat) is not supported when an agent is set; responseFormat will be ignored."});else if(C="application/json",$.responseFormat.schema!=null)k=$.responseFormat.schema}let{input:S,systemInstruction:I,warnings:v}=id8({prompt:$.prompt,previousInteractionId:(X=q==null?void 0:q.previousInteractionId)!=null?X:void 0,store:(G=q==null?void 0:q.store)!=null?G:void 0,mediaResolution:(J=q==null?void 0:q.mediaResolution)!=null?J:void 0});R.push(...v);let x=I,y=(Q=q==null?void 0:q.systemInstruction)!=null?Q:void 0;if(x!=null&&y!=null)R.push({type:"other",message:"google.interactions: both AI SDK system message and providerOptions.google.systemInstruction were set; using the AI SDK system message."});else if(x==null&&y!=null)x=y;let d;if(_){let g=[];if($.temperature!=null)g.push("temperature");if($.topP!=null)g.push("topP");if($.seed!=null)g.push("seed");if($.stopSequences!=null&&$.stopSequences.length>0)g.push("stopSequences");if($.maxOutputTokens!=null)g.push("maxOutputTokens");if((q==null?void 0:q.thinkingLevel)!=null)g.push("thinkingLevel");if((q==null?void 0:q.thinkingSummaries)!=null)g.push("thinkingSummaries");if((q==null?void 0:q.imageConfig)!=null)g.push("imageConfig");if(g.length>0)R.push({type:"other",message:`google.interactions: ${g.join(", ")} ${g.length===1?"is":"are"} not supported when an agent is set; use providerOptions.google.agentConfig instead. Dropped from the request body.`});d=void 0}else d=R90({temperature:(W=$.temperature)!=null?W:void 0,top_p:(K=$.topP)!=null?K:void 0,seed:(Z=$.seed)!=null?Z:void 0,stop_sequences:$.stopSequences!=null&&$.stopSequences.length>0?$.stopSequences:void 0,max_output_tokens:(H=$.maxOutputTokens)!=null?H:void 0,thinking_level:(z=q==null?void 0:q.thinkingLevel)!=null?z:void 0,thinking_summaries:(V=q==null?void 0:q.thinkingSummaries)!=null?V:void 0,image_config:(q==null?void 0:q.imageConfig)!=null?R90({aspect_ratio:(F=q.imageConfig.aspectRatio)!=null?F:void 0,image_size:(L=q.imageConfig.imageSize)!=null?L:void 0}):void 0,tool_choice:j});let u;if(_&&(q==null?void 0:q.agentConfig)!=null){let g=q.agentConfig;if(g.type==="deep-research")u=R90({type:"deep-research",thinking_summaries:(N=g.thinkingSummaries)!=null?N:void 0,visualization:(D=g.visualization)!=null?D:void 0,collaborative_planning:(A=g.collaborativePlanning)!=null?A:void 0});else if(g.type==="dynamic")u={type:"dynamic"}}return{args:R90({..._?{agent:this.agent}:{model:this.modelId},input:S,system_instruction:x,tools:w,response_format:k,response_mime_type:C,response_modalities:(q==null?void 0:q.responseModalities)!=null?q.responseModalities:void 0,previous_interaction_id:(B=q==null?void 0:q.previousInteractionId)!=null?B:void 0,service_tier:(O=q==null?void 0:q.serviceTier)!=null?O:void 0,store:(E=q==null?void 0:q.store)!=null?E:void 0,generation_config:d!=null&&Object.keys(d).length>0?d:void 0,agent_config:u,..._?{background:!0}:{}}),warnings:R,isAgent:_,pollingTimeoutMs:(M=q==null?void 0:q.pollingTimeoutMs)!=null?M:void 0}}async doGenerate($){var Y,X,G,J,Q,W;let{args:K,warnings:Z,isAgent:H,pollingTimeoutMs:z}=await this.getArgs($),V=`${this.config.baseURL}/interactions`,F=p8(this.config.headers?await cZ(this.config.headers):void 0,$.headers),L=await G9({url:V,headers:F,body:K,failedResponseHandler:lZ,successfulResponseHandler:I5(vy0),abortSignal:$.abortSignal,fetch:this.config.fetch}),{responseHeaders:N,value:D,rawValue:A}=L;if(H&&!xy0(D.status)){let P=await D94({baseURL:this.config.baseURL,interactionId:D.id,headers:F,fetch:this.config.fetch,abortSignal:$.abortSignal,timeoutMs:z});D=P.response,A=P.rawResponse,N=(Y=P.responseHeaders)!=null?Y:N}let B=typeof D.id==="string"&&D.id.length>0?D.id:void 0,{content:O,hasFunctionCall:E}=y$4({outputs:(X=D.outputs)!=null?X:null,generateId:(G=this.config.generateId)!=null?G:X9,interactionId:B}),M={unified:ey0({status:D.status,hasFunctionCall:E}),raw:D.status},R=(Q=(J=D.service_tier)!=null?J:N==null?void 0:N["x-gemini-service-tier"])!=null?Q:void 0,q={google:{...B!=null?{interactionId:B}:{},...R!=null?{serviceTier:R}:{}}},_;if(typeof D.created==="string"){let P=new Date(D.created);if(!Number.isNaN(P.getTime()))_=P}return{content:O,finishReason:M,usage:ty0(D.usage),warnings:Z,providerMetadata:q,request:{body:K},response:{headers:N,body:A,...B!=null?{id:B}:{},..._?{timestamp:_}:{},modelId:(W=D.model)!=null?W:void 0}}}async doStream($){var Y;let{args:X,warnings:G,isAgent:J,pollingTimeoutMs:Q}=await this.getArgs($),W=`${this.config.baseURL}/interactions`,K=p8(this.config.headers?await cZ(this.config.headers):void 0,$.headers);if(J)return this.doStreamAgent({args:X,warnings:G,url:W,mergedHeaders:K,options:$,pollingTimeoutMs:Q});let Z={...X,stream:!0},{responseHeaders:H,value:z}=await G9({url:W,headers:K,body:Z,failedResponseHandler:lZ,successfulResponseHandler:sZ(od8),abortSignal:$.abortSignal,fetch:this.config.fetch}),V=H==null?void 0:H["x-gemini-service-tier"],F=ld8({warnings:G,generateId:(Y=this.config.generateId)!=null?Y:X9,includeRawChunks:$.includeRawChunks,serviceTier:V});return{stream:z.pipeThrough(F),request:{body:Z},response:{headers:H}}}async doStreamAgent({args:$,warnings:Y,url:X,mergedHeaders:G,options:J,pollingTimeoutMs:Q}){var W,K;let Z=await G9({url:X,headers:G,body:$,failedResponseHandler:lZ,successfulResponseHandler:I5(vy0),abortSignal:J.abortSignal,fetch:this.config.fetch}),{responseHeaders:H,value:z}=Z,V=z.id;if(V==null||V.length===0)throw Error("google.interactions: agent POST response did not include an interaction id; cannot poll for the agent result.");if(!xy0(z.status)){let L=await D94({baseURL:this.config.baseURL,interactionId:V,headers:G,fetch:this.config.fetch,abortSignal:J.abortSignal,timeoutMs:Q});z=L.response,H=(W=L.responseHeaders)!=null?W:H}return{stream:Zc8({response:z,warnings:Y,generateId:(K=this.config.generateId)!=null?K:X9,includeRawChunks:J.includeRawChunks,headerServiceTier:H==null?void 0:H["x-gemini-service-tier"]}),request:{body:$},response:{headers:H}}}};var Dm=V0(()=>{Uk0();O1();O1();cG();ok0();Rb8=Symbol.for(N94),d5=class $ extends(B64=Error,A64=Rb8,B64){constructor({name:Y,message:X,cause:G}){super(X);this[A64]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,N94)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}},B94=`vercel.ai.error.${A94}`,qb8=Symbol.for(B94),FY=class extends(E64=d5,O64=qb8,E64){constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:K=G!=null&&(G===408||G===409||G===429||G>=500),data:Z}){super({name:A94,message:$,cause:W});this[O64]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=K,this.data=Z}static isInstance($){return d5.hasMarker($,B94)}},E94=`vercel.ai.error.${O94}`,Pb8=Symbol.for(E94),M94=class extends(R64=d5,M64=Pb8,R64){constructor({message:$="Empty response body"}={}){super({name:O94,message:$});this[M64]=!0}static isInstance($){return d5.hasMarker($,E94)}};P94=`vercel.ai.error.${q94}`,wb8=Symbol.for(P94),w94=class extends(P64=d5,q64=wb8,P64){constructor({message:$,cause:Y,argument:X}){super({name:q94,message:$,cause:Y});this[q64]=!0,this.argument=X}static isInstance($){return d5.hasMarker($,P94)}},j94=`vercel.ai.error.${_94}`,_b8=Symbol.for(j94),I90=class extends(_64=d5,w64=_b8,_64){constructor({prompt:$,message:Y,cause:X}){super({name:_94,message:`Invalid prompt: ${Y}`,cause:X});this[w64]=!0,this.prompt=$}static isInstance($){return d5.hasMarker($,j94)}},I94=`vercel.ai.error.${T94}`,jb8=Symbol.for(I94),s2=class extends(T64=d5,j64=jb8,T64){constructor({data:$,message:Y=`Invalid response data: ${JSON.stringify($)}.`}){super({name:T94,message:Y});this[j64]=!0,this.data=$}static isInstance($){return d5.hasMarker($,I94)}},S94=`vercel.ai.error.${C94}`,Tb8=Symbol.for(S94),P90=class extends(C64=d5,I64=Tb8,C64){constructor({text:$,cause:Y}){super({name:C94,message:`JSON parsing failed: Text: ${$}.
Error message: ${R94(Y)}`,cause:Y});this[I64]=!0,this.text=$}static isInstance($){return d5.hasMarker($,S94)}},v94=`vercel.ai.error.${k94}`,Ib8=Symbol.for(v94),A90=class extends(k64=d5,S64=Ib8,k64){constructor({message:$}){super({name:k94,message:$});this[S64]=!0}static isInstance($){return d5.hasMarker($,v94)}},y94=`vercel.ai.error.${x94}`,Cb8=Symbol.for(y94),B90=class extends(x64=d5,v64=Cb8,x64){constructor({message:$}){super({name:x94,message:$});this[v64]=!0}static isInstance($){return d5.hasMarker($,y94)}},h94=`vercel.ai.error.${b94}`,Sb8=Symbol.for(h94),LE=class extends(b64=d5,y64=Sb8,b64){constructor({errorName:$=b94,modelId:Y,modelType:X,message:G=`No such ${X}: ${Y}`}){super({name:$,message:G});this[y64]=!0,this.modelId=Y,this.modelType=X}static isInstance($){return d5.hasMarker($,h94)}},g94=`vercel.ai.error.${f94}`,kb8=Symbol.for(g94),Hm=class extends(f64=d5,h64=kb8,f64){constructor($){super({name:f94,message:`Too many values for a single embedding call. The ${$.provider} model "${$.modelId}" can only embed up to ${$.maxEmbeddingsPerCall} values per call, but ${$.values.length} values were provided.`});this[h64]=!0,this.provider=$.provider,this.modelId=$.modelId,this.maxEmbeddingsPerCall=$.maxEmbeddingsPerCall,this.values=$.values}static isInstance($){return d5.hasMarker($,g94)}},u94=`vercel.ai.error.${m94}`,vb8=Symbol.for(u94),Qm=class $ extends(m64=d5,g64=vb8,m64){constructor({value:Y,cause:X}){super({name:m94,message:`Type validation failed: Value: ${JSON.stringify(Y)}.
Error message: ${R94(X)}`,cause:X});this[g64]=!0,this.value=Y}static isInstance(Y){return d5.hasMarker(Y,u94)}static wrap({value:Y,cause:X}){return $.isInstance(X)&&X.value===Y?X:new $({value:Y,cause:X})}},d94=`vercel.ai.error.${p94}`,xb8=Symbol.for(d94),_9=class extends(p64=d5,u64=xb8,p64){constructor({functionality:$,message:Y=`'${$}' functionality not supported.`}){super({name:p94,message:Y});this[u64]=!0,this.functionality=$}static isInstance($){return d5.hasMarker($,d94)}},c94={};As1(c94,{DEFAULT_MAX_DOWNLOAD_SIZE:()=>r94,DelayedPromise:()=>gb8,DownloadError:()=>YV,EventSourceParserStream:()=>l94,VERSION:()=>by0,asSchema:()=>oh8,asValidator:()=>$54,combineHeaders:()=>o6,convertAsyncIteratorToReadableStream:()=>hb8,convertBase64ToUint8Array:()=>b90,convertToBase64:()=>RX,convertUint8ArrayToBase64:()=>zm,createBinaryResponseHandler:()=>x90,createEventSourceResponseHandler:()=>jQ,createIdGenerator:()=>a94,createJsonErrorResponseHandler:()=>zJ,createJsonResponseHandler:()=>C5,createJsonStreamResponseHandler:()=>Jh8,createProviderDefinedToolFactory:()=>DD,createProviderDefinedToolFactoryWithOutputSchema:()=>HJ,createStatusCodeErrorResponseHandler:()=>Qh8,delay:()=>fb8,dynamicTool:()=>Xh8,executeTool:()=>Gf8,extractResponseHeaders:()=>XV,generateId:()=>_8,getErrorMessage:()=>pb8,getFromApi:()=>lb8,getRuntimeEnvironmentUserAgent:()=>yy0,injectJsonInstructionIntoMessages:()=>sb8,isAbortError:()=>YT,isParsableJson:()=>iZ,isUrlSupported:()=>ob8,isValidator:()=>e94,jsonSchema:()=>y90,lazySchema:()=>Y6,lazyValidator:()=>j8,loadApiKey:()=>rZ,loadOptionalSetting:()=>hy0,loadSetting:()=>fy0,mediaTypeToExtension:()=>C90,normalizeHeaders:()=>o94,parseJSON:()=>X54,parseJsonEventStream:()=>G54,parseProviderOptions:()=>j9,postFormDataToApi:()=>v90,postJsonToApi:()=>G8,postToApi:()=>my0,readResponseWithSizeLimit:()=>ub8,removeUndefinedEntries:()=>Gh8,resolve:()=>XT,safeParseJSON:()=>k90,safeValidateTypes:()=>S90,standardSchemaValidator:()=>Y54,tool:()=>uy0,validateDownloadUrl:()=>$f8,validateTypes:()=>MX,validator:()=>t94,withUserAgentSuffix:()=>_Q,withoutTrailingSlash:()=>aZ,zodSchema:()=>v1});d64=class extends Error{constructor($,Y){super($),this.name="ParseError",this.type=Y.type,this.field=Y.field,this.value=Y.value,this.line=Y.line}};l94=class extends TransformStream{constructor({onError:$,onRetry:Y,onComment:X}={}){let G;super({start(J){G=yb8({onEvent:(Q)=>{J.enqueue(Q)},onError(Q){$==="terminate"?J.error(Q):typeof $=="function"&&$(Q)},onRetry:Y,onComment:X})},transform(J){G.feed(J)}})}};Bs1(c94,sk0);n94=`vercel.ai.error.${i94}`,mb8=Symbol.for(n94),YV=class extends(i64=d5,l64=mb8,i64){constructor({url:$,statusCode:Y,statusText:X,cause:G,message:J=G==null?`Failed to download ${$}: ${Y} ${X}`:`Failed to download ${$}: ${G}`}){super({name:i94,message:J,cause:G});this[l64]=!0,this.url=$,this.statusCode=Y,this.statusText=X}static isInstance($){return d5.hasMarker($,n94)}};_8=a94();db8=["fetch failed","failed to fetch"];tb8=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,eb8=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;w90=Symbol.for("vercel.ai.validator");My0=Symbol.for("vercel.ai.schema");Wh8=Symbol("Let zodToJsonSchema decide on which parser to use"),r64={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"};fZ={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(Uy0===void 0)Uy0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return Uy0},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};Oh8=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");Ry0={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};ih8=lh8;({btoa:th8,atob:eh8}=globalThis);zy0=U.object({user:U.string().optional(),reasoningEffort:U.string().optional(),textVerbosity:U.string().optional()}),Qf8=U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.any().nullish(),code:U.union([U.string(),U.number()]).nullish()})}),h90={errorSchema:Qf8,errorToMessage:($)=>$.error.message};U54=U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish();Zf8=U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({role:U.literal("assistant").nullish(),content:U.string().nullish(),reasoning_content:U.string().nullish(),reasoning:U.string().nullish(),tool_calls:U.array(U.object({id:U.string().nullish(),function:U.object({name:U.string(),arguments:U.string()})})).nullish()}),finish_reason:U.string().nullish()})),usage:U54});zf8=U.object({echo:U.boolean().optional(),logitBias:U.record(U.string(),U.number()).optional(),suffix:U.string().optional(),user:U.string().optional()}),H54=U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}),Vf8=U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string()})),usage:H54.nullish()}),$84=U.object({dimensions:U.number().optional(),user:U.string().optional()}),Lf8=U.object({data:U.array(U.object({embedding:U.array(U.number())})),usage:U.object({prompt_tokens:U.number()}).nullish(),providerMetadata:U.record(U.string(),U.record(U.string(),U.any())).optional()}),Nf8=U.object({data:U.array(U.object({b64_json:U.string()}))});Bf8=Symbol.for(z54),A8=class $ extends(X84=Error,Y84=Bf8,X84){constructor({name:Y,message:X,cause:G}){super(X);this[Y84]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,z54)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}},F54=`vercel.ai.error.${V54}`,Of8=Symbol.for(F54),b$=class extends(J84=A8,G84=Of8,J84){constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:K=G!=null&&(G===408||G===409||G===429||G>=500),data:Z}){super({name:V54,message:$,cause:W});this[G84]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=K,this.data=Z}static isInstance($){return A8.hasMarker($,F54)}},D54=`vercel.ai.error.${L54}`,Ef8=Symbol.for(D54),Mf8=class extends(W84=A8,Q84=Ef8,W84){constructor({message:$="Empty response body"}={}){super({name:L54,message:$});this[Q84]=!0}static isInstance($){return A8.hasMarker($,D54)}};B54=`vercel.ai.error.${A54}`,Rf8=Symbol.for(B54),py0=class extends(Z84=A8,K84=Rf8,Z84){constructor({message:$,cause:Y,argument:X}){super({name:A54,message:$,cause:Y});this[K84]=!0,this.argument=X}static isInstance($){return A8.hasMarker($,B54)}},E54=`vercel.ai.error.${O54}`,qf8=Symbol.for(E54),Pf8=class extends(H84=A8,U84=qf8,H84){constructor({prompt:$,message:Y,cause:X}){super({name:O54,message:`Invalid prompt: ${Y}`,cause:X});this[U84]=!0,this.prompt=$}static isInstance($){return A8.hasMarker($,E54)}},R54=`vercel.ai.error.${M54}`,wf8=Symbol.for(R54),VE=class extends(V84=A8,z84=wf8,V84){constructor({data:$,message:Y=`Invalid response data: ${JSON.stringify($)}.`}){super({name:M54,message:Y});this[z84]=!0,this.data=$}static isInstance($){return A8.hasMarker($,R54)}},P54=`vercel.ai.error.${q54}`,_f8=Symbol.for(P54),_90=class extends(L84=A8,F84=_f8,L84){constructor({text:$,cause:Y}){super({name:q54,message:`JSON parsing failed: Text: ${$}.
Error message: ${N54(Y)}`,cause:Y});this[F84]=!0,this.text=$}static isInstance($){return A8.hasMarker($,P54)}},_54=`vercel.ai.error.${w54}`,jf8=Symbol.for(_54),O90=class extends(N84=A8,D84=jf8,N84){constructor({message:$}){super({name:w54,message:$});this[D84]=!0}static isInstance($){return A8.hasMarker($,_54)}},T54=`vercel.ai.error.${j54}`,Tf8=Symbol.for(T54),FE=class extends(B84=A8,A84=Tf8,B84){constructor({errorName:$=j54,modelId:Y,modelType:X,message:G=`No such ${X}: ${Y}`}){super({name:$,message:G});this[A84]=!0,this.modelId=Y,this.modelType=X}static isInstance($){return A8.hasMarker($,T54)}},C54=`vercel.ai.error.${I54}`,If8=Symbol.for(C54),m90=class extends(E84=A8,O84=If8,E84){constructor($){super({name:I54,message:`Too many values for a single embedding call. The ${$.provider} model "${$.modelId}" can only embed up to ${$.maxEmbeddingsPerCall} values per call, but ${$.values.length} values were provided.`});this[O84]=!0,this.provider=$.provider,this.modelId=$.modelId,this.maxEmbeddingsPerCall=$.maxEmbeddingsPerCall,this.values=$.values}static isInstance($){return A8.hasMarker($,C54)}},k54=`vercel.ai.error.${S54}`,Cf8=Symbol.for(k54),Wm=class $ extends(R84=A8,M84=Cf8,R84){constructor({value:Y,cause:X,context:G}){let J="Type validation failed";if(G==null?void 0:G.field)J+=` for ${G.field}`;if((G==null?void 0:G.entityName)||(G==null?void 0:G.entityId)){J+=" (";let Q=[];if(G.entityName)Q.push(G.entityName);if(G.entityId)Q.push(`id: "${G.entityId}"`);J+=Q.join(", "),J+=")"}super({name:S54,message:`${J}: Value: ${JSON.stringify(Y)}.
Error message: ${N54(X)}`,cause:X});this[M84]=!0,this.value=Y,this.context=G}static isInstance(Y){return A8.hasMarker(Y,k54)}static wrap({value:Y,cause:X,context:G}){var J,Q,W;if($.isInstance(X)&&X.value===Y&&((J=X.context)==null?void 0:J.field)===(G==null?void 0:G.field)&&((Q=X.context)==null?void 0:Q.entityName)===(G==null?void 0:G.entityName)&&((W=X.context)==null?void 0:W.entityId)===(G==null?void 0:G.entityId))return X;return new $({value:Y,cause:X,context:G})}},x54=`vercel.ai.error.${v54}`,Sf8=Symbol.for(x54),p5=class extends(P84=A8,q84=Sf8,P84){constructor({functionality:$,message:Y=`'${$}' functionality not supported.`}){super({name:v54,message:Y});this[q84]=!0,this.functionality=$}static isInstance($){return A8.hasMarker($,x54)}},w84=class extends Error{constructor($,Y){super($),this.name="ParseError",this.type=Y.type,this.field=Y.field,this.value=Y.value,this.line=Y.line}};xf8=class extends TransformStream{constructor({onError:$,onRetry:Y,onComment:X}={}){let G;super({start(J){G=vf8({onEvent:(Q)=>{J.enqueue(Q)},onError(Q){$==="terminate"?J.error(Q):typeof $=="function"&&$(Q)},onRetry:Y,onComment:X})},transform(J){G.feed(J)}})}};({btoa:yf8,atob:bf8}=globalThis);f54=`vercel.ai.error.${h54}`,ff8=Symbol.for(f54),dZ=class extends(S84=A8,C84=ff8,S84){constructor({url:$,statusCode:Y,statusText:X,cause:G,message:J=G==null?`Failed to download ${$}: ${Y} ${X}`:`Failed to download ${$}: ${G}`}){super({name:h54,message:J,cause:G});this[C84]=!0,this.url=$,this.statusCode=Y,this.statusText=X}static isInstance($){return A8.hasMarker($,f54)}};X9=uf8();pf8=["fetch failed","failed to fetch"],df8=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];of8=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,tf8=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;$g8=Symbol("Let zodToJsonSchema decide on which parser to use"),x84={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"};mZ={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(Fy0===void 0)Fy0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return Fy0},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};Fg8=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");_y0={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};jy0=Symbol.for("vercel.ai.schema");ry0=U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.any().nullish(),code:U.union([U.string(),U.number()]).nullish()})}),nZ=NE({errorSchema:ry0,errorToMessage:($)=>$.error.message});sg8=J1(()=>G1(U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({role:U.literal("assistant").nullish(),content:U.string().nullish(),tool_calls:U.array(U.object({id:U.string().nullish(),type:U.literal("function"),function:U.object({name:U.string(),arguments:U.string()})})).nullish(),annotations:U.array(U.object({type:U.literal("url_citation"),url_citation:U.object({start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()})})).nullish()}),index:U.number(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}).nullish(),finish_reason:U.string().nullish()})),usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish()}))),og8=J1(()=>G1(U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).nullish(),content:U.string().nullish(),tool_calls:U.array(U.object({index:U.number(),id:U.string().nullish(),type:U.literal("function").nullish(),function:U.object({name:U.string().nullish(),arguments:U.string().nullish()})})).nullish(),annotations:U.array(U.object({type:U.literal("url_citation"),url_citation:U.object({start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()})})).nullish()}).nullish(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}).nullish(),finish_reason:U.string().nullish(),index:U.number()})),usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish()}),ry0]))),tg8=J1(()=>G1(U.object({logitBias:U.record(U.coerce.number(),U.number()).optional(),logprobs:U.union([U.boolean(),U.number()]).optional(),parallelToolCalls:U.boolean().optional(),user:U.string().optional(),reasoningEffort:U.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:U.number().optional(),store:U.boolean().optional(),metadata:U.record(U.string().max(64),U.string().max(512)).optional(),prediction:U.record(U.string(),U.any()).optional(),serviceTier:U.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:U.boolean().optional(),textVerbosity:U.enum(["low","medium","high"]).optional(),promptCacheKey:U.string().optional(),promptCacheRetention:U.enum(["in_memory","24h"]).optional(),safetyIdentifier:U.string().optional(),systemMessageMode:U.enum(["system","developer","remove"]).optional(),forceReasoning:U.boolean().optional()})));Xm8=J1(()=>G1(U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string(),logprobs:U.object({tokens:U.array(U.string()),token_logprobs:U.array(U.number()),top_logprobs:U.array(U.record(U.string(),U.number())).nullish()}).nullish()})),usage:U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}).nullish()}))),Gm8=J1(()=>G1(U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string().nullish(),index:U.number(),logprobs:U.object({tokens:U.array(U.string()),token_logprobs:U.array(U.number()),top_logprobs:U.array(U.record(U.string(),U.number())).nullish()}).nullish()})),usage:U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}).nullish()}),ry0]))),u84=J1(()=>G1(U.object({echo:U.boolean().optional(),logitBias:U.record(U.string(),U.number()).optional(),suffix:U.string().optional(),user:U.string().optional(),logprobs:U.union([U.boolean(),U.number()]).optional()}))),Qm8=J1(()=>G1(U.object({dimensions:U.number().optional(),user:U.string().optional()}))),Wm8=J1(()=>G1(U.object({data:U.array(U.object({embedding:U.array(U.number())})),usage:U.object({prompt_tokens:U.number()}).nullish()}))),p84=J1(()=>G1(U.object({created:U.number().nullish(),data:U.array(U.object({b64_json:U.string(),revised_prompt:U.string().nullish()})),background:U.string().nullish(),output_format:U.string().nullish(),size:U.string().nullish(),quality:U.string().nullish(),usage:U.object({input_tokens:U.number().nullish(),output_tokens:U.number().nullish(),total_tokens:U.number().nullish(),input_tokens_details:U.object({image_tokens:U.number().nullish(),text_tokens:U.number().nullish()}).nullish()}).nullish()}))),Zm8={"dall-e-3":1,"dall-e-2":10,"gpt-image-1":10,"gpt-image-1-mini":10,"gpt-image-1.5":10,"gpt-image-2":10,"chatgpt-image-latest":10},Um8=["chatgpt-image-","gpt-image-1-mini","gpt-image-1.5","gpt-image-1","gpt-image-2"];X$4=U.object({quality:U.enum(["standard","hd","low","medium","high","auto"]).optional(),background:U.enum(["transparent","opaque","auto"]).optional(),outputFormat:U.enum(["png","jpeg","webp"]).optional(),outputCompression:U.number().int().min(0).max(100).optional(),user:U.string().optional()}),zm8=J1(()=>G1(X$4.extend({style:U.enum(["vivid","natural"]).optional(),moderation:U.enum(["auto","low"]).optional()}))),Vm8=J1(()=>G1(X$4.extend({inputFidelity:U.enum(["high","low"]).optional()})));G$4=J1(()=>G1(U.object({callId:U.string(),operation:U.discriminatedUnion("type",[U.object({type:U.literal("create_file"),path:U.string(),diff:U.string()}),U.object({type:U.literal("delete_file"),path:U.string()}),U.object({type:U.literal("update_file"),path:U.string(),diff:U.string()})])}))),J$4=J1(()=>G1(U.object({status:U.enum(["completed","failed"]),output:U.string().optional()}))),Dm8=L5({id:"openai.apply_patch",inputSchema:G$4,outputSchema:J$4}),Nm8=Dm8,Am8=J1(()=>G1(U.object({code:U.string().nullish(),containerId:U.string()}))),Bm8=J1(()=>G1(U.object({outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullish()}))),Om8=J1(()=>G1(U.object({container:U.union([U.string(),U.object({fileIds:U.array(U.string()).optional()})]).optional()}))),Em8=L5({id:"openai.code_interpreter",inputSchema:Am8,outputSchema:Bm8}),Rm8=J1(()=>G1(U.object({name:U.string(),description:U.string().optional(),format:U.union([U.object({type:U.literal("grammar"),syntax:U.enum(["regex","lark"]),definition:U.string()}),U.object({type:U.literal("text")})]).optional()}))),qm8=J1(()=>G1(U.string())),Pm8=LY({id:"openai.custom",inputSchema:qm8}),Q$4=U.object({key:U.string(),type:U.enum(["eq","ne","gt","gte","lt","lte","in","nin"]),value:U.union([U.string(),U.number(),U.boolean(),U.array(U.string())])}),W$4=U.object({type:U.enum(["and","or"]),filters:U.array(U.union([Q$4,U.lazy(()=>W$4)]))}),_m8=J1(()=>G1(U.object({vectorStoreIds:U.array(U.string()),maxNumResults:U.number().optional(),ranking:U.object({ranker:U.string().optional(),scoreThreshold:U.number().optional()}).optional(),filters:U.union([Q$4,W$4]).optional()}))),jm8=J1(()=>G1(U.object({queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.unknown()),fileId:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullable()}))),Tm8=L5({id:"openai.file_search",inputSchema:U.object({}),outputSchema:jm8}),Im8=J1(()=>G1(U.object({background:U.enum(["auto","opaque","transparent"]).optional(),inputFidelity:U.enum(["low","high"]).optional(),inputImageMask:U.object({fileId:U.string().optional(),imageUrl:U.string().optional()}).optional(),model:U.string().optional(),moderation:U.enum(["auto"]).optional(),outputCompression:U.number().int().min(0).max(100).optional(),outputFormat:U.enum(["png","jpeg","webp"]).optional(),partialImages:U.number().int().min(0).max(3).optional(),quality:U.enum(["auto","low","medium","high"]).optional(),size:U.enum(["1024x1024","1024x1536","1536x1024","auto"]).optional()}).strict())),Cm8=J1(()=>G1(U.object({}))),Sm8=J1(()=>G1(U.object({result:U.string()}))),km8=L5({id:"openai.image_generation",inputSchema:Cm8,outputSchema:Sm8}),K$4=J1(()=>G1(U.object({action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeoutMs:U.number().optional(),user:U.string().optional(),workingDirectory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}))),Z$4=J1(()=>G1(U.object({output:U.string()}))),xm8=L5({id:"openai.local_shell",inputSchema:K$4,outputSchema:Z$4}),U$4=J1(()=>G1(U.object({action:U.object({commands:U.array(U.string()),timeoutMs:U.number().optional(),maxOutputLength:U.number().optional()})}))),Ty0=J1(()=>G1(U.object({output:U.array(U.object({stdout:U.string(),stderr:U.string(),outcome:U.discriminatedUnion("type",[U.object({type:U.literal("timeout")}),U.object({type:U.literal("exit"),exitCode:U.number()})])}))}))),ym8=U.array(U.discriminatedUnion("type",[U.object({type:U.literal("skillReference"),skillId:U.string(),version:U.string().optional()}),U.object({type:U.literal("inline"),name:U.string(),description:U.string(),source:U.object({type:U.literal("base64"),mediaType:U.literal("application/zip"),data:U.string()})})])).optional(),bm8=J1(()=>G1(U.object({environment:U.union([U.object({type:U.literal("containerAuto"),fileIds:U.array(U.string()).optional(),memoryLimit:U.enum(["1g","4g","16g","64g"]).optional(),networkPolicy:U.discriminatedUnion("type",[U.object({type:U.literal("disabled")}),U.object({type:U.literal("allowlist"),allowedDomains:U.array(U.string()),domainSecrets:U.array(U.object({domain:U.string(),name:U.string(),value:U.string()})).optional()})]).optional(),skills:ym8}),U.object({type:U.literal("containerReference"),containerId:U.string()}),U.object({type:U.literal("local").optional(),skills:U.array(U.object({name:U.string(),description:U.string(),path:U.string()})).optional()})]).optional()}))),hm8=L5({id:"openai.shell",inputSchema:U$4,outputSchema:Ty0}),fm8=J1(()=>G1(U.object({execution:U.enum(["server","client"]).optional(),description:U.string().optional(),parameters:U.record(U.string(),U.unknown()).optional()}))),Iy0=J1(()=>G1(U.object({arguments:U.unknown().optional(),call_id:U.string().nullish()}))),Cy0=J1(()=>G1(U.object({tools:U.array(U.record(U.string(),U.unknown()))}))),gm8=L5({id:"openai.tool_search",inputSchema:Iy0,outputSchema:Cy0}),um8=J1(()=>G1(U.object({externalWebAccess:U.boolean().optional(),filters:U.object({allowedDomains:U.array(U.string()).optional()}).optional(),searchContextSize:U.enum(["low","medium","high"]).optional(),userLocation:U.object({type:U.literal("approximate"),country:U.string().optional(),city:U.string().optional(),region:U.string().optional(),timezone:U.string().optional()}).optional()}))),pm8=J1(()=>G1(U.object({}))),dm8=J1(()=>G1(U.object({action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().optional()}),U.object({type:U.literal("openPage"),url:U.string().nullish()}),U.object({type:U.literal("findInPage"),url:U.string().nullish(),pattern:U.string().nullish()})]).optional(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).optional()}))),cm8=L5({id:"openai.web_search",inputSchema:pm8,outputSchema:dm8}),im8=J1(()=>G1(U.object({searchContextSize:U.enum(["low","medium","high"]).optional(),userLocation:U.object({type:U.literal("approximate"),country:U.string().optional(),city:U.string().optional(),region:U.string().optional(),timezone:U.string().optional()}).optional()}))),nm8=J1(()=>G1(U.object({}))),rm8=J1(()=>G1(U.object({action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().optional()}),U.object({type:U.literal("openPage"),url:U.string().nullish()}),U.object({type:U.literal("findInPage"),url:U.string().nullish(),pattern:U.string().nullish()})]).optional()}))),am8=L5({id:"openai.web_search_preview",inputSchema:nm8,outputSchema:rm8}),Sy0=U.lazy(()=>U.union([U.string(),U.number(),U.boolean(),U.null(),U.array(Sy0),U.record(U.string(),Sy0)])),sm8=J1(()=>G1(U.object({serverLabel:U.string(),allowedTools:U.union([U.array(U.string()),U.object({readOnly:U.boolean().optional(),toolNames:U.array(U.string()).optional()})]).optional(),authorization:U.string().optional(),connectorId:U.string().optional(),headers:U.record(U.string(),U.string()).optional(),requireApproval:U.union([U.enum(["always","never"]),U.object({never:U.object({toolNames:U.array(U.string()).optional()}).optional()})]).optional(),serverDescription:U.string().optional(),serverUrl:U.string().optional()}).refine(($)=>$.serverUrl!=null||$.connectorId!=null,"One of serverUrl or connectorId must be provided."))),om8=J1(()=>G1(U.object({}))),tm8=J1(()=>G1(U.object({type:U.literal("call"),serverLabel:U.string(),name:U.string(),arguments:U.string(),output:U.string().nullish(),error:U.union([U.string(),Sy0]).optional()}))),em8=L5({id:"openai.mcp",inputSchema:om8,outputSchema:tm8}),Yu8={applyPatch:Nm8,customTool:wm8,codeInterpreter:Mm8,fileSearch:Tm8,imageGeneration:vm8,localShell:xm8,shell:hm8,webSearchPreview:am8,webSearch:lm8,mcp:$u8,toolSearch:mm8};Ju8=U.object({itemId:U.string().nullish(),reasoningEncryptedContent:U.string().nullish()});Um=U.lazy(()=>U.union([U.string(),U.number(),U.boolean(),U.null(),U.array(Um),U.record(U.string(),Um.optional())])),Qu8=J1(()=>G1(U.union([U.object({type:U.literal("response.output_text.delta"),item_id:U.string(),delta:U.string(),logprobs:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}),U.object({type:U.enum(["response.completed","response.incomplete"]),response:U.object({incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.failed"),response:U.object({error:U.object({code:U.string().nullish(),message:U.string()}).nullish(),incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}).nullish(),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.created"),response:U.object({id:U.string(),created_at:U.number(),model:U.string(),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.output_item.added"),output_index:U.number(),item:U.discriminatedUnion("type",[U.object({type:U.literal("message"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish()}),U.object({type:U.literal("function_call"),id:U.string(),call_id:U.string(),name:U.string(),arguments:U.string(),namespace:U.string().nullish()}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string()}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.string()}),U.object({type:U.literal("file_search_call"),id:U.string()}),U.object({type:U.literal("image_generation_call"),id:U.string()}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),container_id:U.string(),code:U.string().nullable(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable(),status:U.string()}),U.object({type:U.literal("mcp_call"),id:U.string(),status:U.string(),approval_request_id:U.string().nullish()}),U.object({type:U.literal("mcp_list_tools"),id:U.string()}),U.object({type:U.literal("mcp_approval_request"),id:U.string()}),U.object({type:U.literal("apply_patch_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed"]),operation:U.discriminatedUnion("type",[U.object({type:U.literal("create_file"),path:U.string(),diff:U.string()}),U.object({type:U.literal("delete_file"),path:U.string()}),U.object({type:U.literal("update_file"),path:U.string(),diff:U.string()})])}),U.object({type:U.literal("custom_tool_call"),id:U.string(),call_id:U.string(),name:U.string(),input:U.string()}),U.object({type:U.literal("shell_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),action:U.object({commands:U.array(U.string())})}),U.object({type:U.literal("shell_call_output"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),output:U.array(U.object({stdout:U.string(),stderr:U.string(),outcome:U.discriminatedUnion("type",[U.object({type:U.literal("timeout")}),U.object({type:U.literal("exit"),exit_code:U.number()})])}))}),U.object({type:U.literal("tool_search_call"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),arguments:U.unknown()}),U.object({type:U.literal("tool_search_output"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),tools:U.array(U.record(U.string(),Um.optional()))})])}),U.object({type:U.literal("response.output_item.done"),output_index:U.number(),item:U.discriminatedUnion("type",[U.object({type:U.literal("message"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish()}),U.object({type:U.literal("function_call"),id:U.string(),call_id:U.string(),name:U.string(),arguments:U.string(),status:U.literal("completed"),namespace:U.string().nullish()}),U.object({type:U.literal("custom_tool_call"),id:U.string(),call_id:U.string(),name:U.string(),input:U.string(),status:U.literal("completed")}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),code:U.string().nullable(),container_id:U.string(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable()}),U.object({type:U.literal("image_generation_call"),id:U.string(),result:U.string()}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string(),action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().nullish(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).nullish()}),U.object({type:U.literal("open_page"),url:U.string().nullish()}),U.object({type:U.literal("find_in_page"),url:U.string().nullish(),pattern:U.string().nullish()})]).nullish()}),U.object({type:U.literal("file_search_call"),id:U.string(),queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.union([U.string(),U.number(),U.boolean()])),file_id:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullish()}),U.object({type:U.literal("local_shell_call"),id:U.string(),call_id:U.string(),action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeout_ms:U.number().optional(),user:U.string().optional(),working_directory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.literal("completed")}),U.object({type:U.literal("mcp_call"),id:U.string(),status:U.string(),arguments:U.string(),name:U.string(),server_label:U.string(),output:U.string().nullish(),error:U.union([U.string(),U.object({type:U.string().optional(),code:U.union([U.number(),U.string()]).optional(),message:U.string().optional()}).loose()]).nullish(),approval_request_id:U.string().nullish()}),U.object({type:U.literal("mcp_list_tools"),id:U.string(),server_label:U.string(),tools:U.array(U.object({name:U.string(),description:U.string().optional(),input_schema:U.any(),annotations:U.record(U.string(),U.unknown()).optional()})),error:U.union([U.string(),U.object({type:U.string().optional(),code:U.union([U.number(),U.string()]).optional(),message:U.string().optional()}).loose()]).optional()}),U.object({type:U.literal("mcp_approval_request"),id:U.string(),server_label:U.string(),name:U.string(),arguments:U.string(),approval_request_id:U.string().optional()}),U.object({type:U.literal("apply_patch_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed"]),operation:U.discriminatedUnion("type",[U.object({type:U.literal("create_file"),path:U.string(),diff:U.string()}),U.object({type:U.literal("delete_file"),path:U.string()}),U.object({type:U.literal("update_file"),path:U.string(),diff:U.string()})])}),U.object({type:U.literal("shell_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),action:U.object({commands:U.array(U.string())})}),U.object({type:U.literal("shell_call_output"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),output:U.array(U.object({stdout:U.string(),stderr:U.string(),outcome:U.discriminatedUnion("type",[U.object({type:U.literal("timeout")}),U.object({type:U.literal("exit"),exit_code:U.number()})])}))}),U.object({type:U.literal("tool_search_call"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),arguments:U.unknown()}),U.object({type:U.literal("tool_search_output"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),tools:U.array(U.record(U.string(),Um.optional()))})])}),U.object({type:U.literal("response.function_call_arguments.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.custom_tool_call_input.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.image_generation_call.partial_image"),item_id:U.string(),output_index:U.number(),partial_image_b64:U.string()}),U.object({type:U.literal("response.code_interpreter_call_code.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.code_interpreter_call_code.done"),item_id:U.string(),output_index:U.number(),code:U.string()}),U.object({type:U.literal("response.output_text.annotation.added"),annotation:U.discriminatedUnion("type",[U.object({type:U.literal("url_citation"),start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()}),U.object({type:U.literal("file_citation"),file_id:U.string(),filename:U.string(),index:U.number()}),U.object({type:U.literal("container_file_citation"),container_id:U.string(),file_id:U.string(),filename:U.string(),start_index:U.number(),end_index:U.number()}),U.object({type:U.literal("file_path"),file_id:U.string(),index:U.number()})])}),U.object({type:U.literal("response.reasoning_summary_part.added"),item_id:U.string(),summary_index:U.number()}),U.object({type:U.literal("response.reasoning_summary_text.delta"),item_id:U.string(),summary_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.reasoning_summary_part.done"),item_id:U.string(),summary_index:U.number()}),U.object({type:U.literal("response.apply_patch_call_operation_diff.delta"),item_id:U.string(),output_index:U.number(),delta:U.string(),obfuscation:U.string().nullish()}),U.object({type:U.literal("response.apply_patch_call_operation_diff.done"),item_id:U.string(),output_index:U.number(),diff:U.string()}),U.object({type:U.literal("error"),sequence_number:U.number(),error:U.object({type:U.string(),code:U.string(),message:U.string(),param:U.string().nullish()})}),U.object({type:U.string()}).loose().transform(($)=>({type:"unknown_chunk",message:$.type}))]))),Wu8=J1(()=>G1(U.object({id:U.string().optional(),created_at:U.number().optional(),error:U.object({message:U.string(),type:U.string(),param:U.string().nullish(),code:U.string()}).nullish(),model:U.string().optional(),output:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("message"),role:U.literal("assistant"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish(),content:U.array(U.object({type:U.literal("output_text"),text:U.string(),logprobs:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish(),annotations:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url_citation"),start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()}),U.object({type:U.literal("file_citation"),file_id:U.string(),filename:U.string(),index:U.number()}),U.object({type:U.literal("container_file_citation"),container_id:U.string(),file_id:U.string(),filename:U.string(),start_index:U.number(),end_index:U.number()}),U.object({type:U.literal("file_path"),file_id:U.string(),index:U.number()})]))}))}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string(),action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().nullish(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).nullish()}),U.object({type:U.literal("open_page"),url:U.string().nullish()}),U.object({type:U.literal("find_in_page"),url:U.string().nullish(),pattern:U.string().nullish()})]).nullish()}),U.object({type:U.literal("file_search_call"),id:U.string(),queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.union([U.string(),U.number(),U.boolean()])),file_id:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullish()}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),code:U.string().nullable(),container_id:U.string(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable()}),U.object({type:U.literal("image_generation_call"),id:U.string(),result:U.string()}),U.object({type:U.literal("local_shell_call"),id:U.string(),call_id:U.string(),action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeout_ms:U.number().optional(),user:U.string().optional(),working_directory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}),U.object({type:U.literal("function_call"),call_id:U.string(),name:U.string(),arguments:U.string(),id:U.string(),namespace:U.string().nullish()}),U.object({type:U.literal("custom_tool_call"),call_id:U.string(),name:U.string(),input:U.string(),id:U.string()}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.string().optional()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish(),summary:U.array(U.object({type:U.literal("summary_text"),text:U.string()}))}),U.object({type:U.literal("mcp_call"),id:U.string(),status:U.string(),arguments:U.string(),name:U.string(),server_label:U.string(),output:U.string().nullish(),error:U.union([U.string(),U.object({type:U.string().optional(),code:U.union([U.number(),U.string()]).optional(),message:U.string().optional()}).loose()]).nullish(),approval_request_id:U.string().nullish()}),U.object({type:U.literal("mcp_list_tools"),id:U.string(),server_label:U.string(),tools:U.array(U.object({name:U.string(),description:U.string().optional(),input_schema:U.any(),annotations:U.record(U.string(),U.unknown()).optional()})),error:U.union([U.string(),U.object({type:U.string().optional(),code:U.union([U.number(),U.string()]).optional(),message:U.string().optional()}).loose()]).optional()}),U.object({type:U.literal("mcp_approval_request"),id:U.string(),server_label:U.string(),name:U.string(),arguments:U.string(),approval_request_id:U.string().optional()}),U.object({type:U.literal("apply_patch_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed"]),operation:U.discriminatedUnion("type",[U.object({type:U.literal("create_file"),path:U.string(),diff:U.string()}),U.object({type:U.literal("delete_file"),path:U.string()}),U.object({type:U.literal("update_file"),path:U.string(),diff:U.string()})])}),U.object({type:U.literal("shell_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),action:U.object({commands:U.array(U.string())})}),U.object({type:U.literal("shell_call_output"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),output:U.array(U.object({stdout:U.string(),stderr:U.string(),outcome:U.discriminatedUnion("type",[U.object({type:U.literal("timeout")}),U.object({type:U.literal("exit"),exit_code:U.number()})])}))}),U.object({type:U.literal("tool_search_call"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),arguments:U.unknown()}),U.object({type:U.literal("tool_search_output"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),tools:U.array(U.record(U.string(),Um.optional()))})])).optional(),service_tier:U.string().nullish(),incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}).optional()}))),i84=J1(()=>G1(U.object({conversation:U.string().nullish(),include:U.array(U.enum(["reasoning.encrypted_content","file_search_call.results","message.output_text.logprobs"])).nullish(),instructions:U.string().nullish(),logprobs:U.union([U.boolean(),U.number().min(1).max(H$4)]).optional(),maxToolCalls:U.number().nullish(),metadata:U.any().nullish(),parallelToolCalls:U.boolean().nullish(),previousResponseId:U.string().nullish(),promptCacheKey:U.string().nullish(),promptCacheRetention:U.enum(["in_memory","24h"]).nullish(),reasoningEffort:U.string().nullish(),reasoningSummary:U.string().nullish(),safetyIdentifier:U.string().nullish(),serviceTier:U.enum(["auto","flex","priority","default"]).nullish(),store:U.boolean().nullish(),strictJsonSchema:U.boolean().nullish(),textVerbosity:U.enum(["low","medium","high"]).nullish(),truncation:U.enum(["auto","disabled"]).nullish(),user:U.string().nullish(),systemMessageMode:U.enum(["system","developer","remove"]).optional(),forceReasoning:U.boolean().optional(),allowedTools:U.object({toolNames:U.array(U.string()).min(1),mode:U.enum(["auto","required"]).optional()}).optional()})));wu8=J1(()=>G1(U.object({instructions:U.string().nullish(),speed:U.number().min(0.25).max(4).default(1).nullish()}))),ju8=J1(()=>G1(U.object({text:U.string(),language:U.string().nullish(),duration:U.number().nullish(),words:U.array(U.object({word:U.string(),start:U.number(),end:U.number()})).nullish(),segments:U.array(U.object({id:U.number(),seek:U.number(),start:U.number(),end:U.number(),text:U.string(),tokens:U.array(U.number()),temperature:U.number(),avg_logprob:U.number(),compression_ratio:U.number(),no_speech_prob:U.number()})).nullish()}))),Tu8=J1(()=>G1(U.object({include:U.array(U.string()).optional(),language:U.string().optional(),prompt:U.string().optional(),temperature:U.number().min(0).max(1).default(0).optional(),timestampGranularities:U.array(U.enum(["word","segment"])).default(["segment"]).optional()}))),s84={afrikaans:"af",arabic:"ar",armenian:"hy",azerbaijani:"az",belarusian:"be",bosnian:"bs",bulgarian:"bg",catalan:"ca",chinese:"zh",croatian:"hr",czech:"cs",danish:"da",dutch:"nl",english:"en",estonian:"et",finnish:"fi",french:"fr",galician:"gl",german:"de",greek:"el",hebrew:"he",hindi:"hi",hungarian:"hu",icelandic:"is",indonesian:"id",italian:"it",japanese:"ja",kannada:"kn",kazakh:"kk",korean:"ko",latvian:"lv",lithuanian:"lt",macedonian:"mk",malay:"ms",marathi:"mr",maori:"mi",nepali:"ne",norwegian:"no",persian:"fa",polish:"pl",portuguese:"pt",romanian:"ro",russian:"ru",serbian:"sr",slovak:"sk",slovenian:"sl",spanish:"es",swahili:"sw",swedish:"sv",tagalog:"tl",tamil:"ta",thai:"th",turkish:"tr",ukrainian:"uk",urdu:"ur",vietnamese:"vi",welsh:"cy"};AD();ay0=Symbol.for("@mastra/core.gatewayStreamTransport"),z$4=["anthropic","cerebras","deepinfra","deepseek","google","groq","mistral","openai","openrouter","perplexity","togetherai","vercel","xai"],V$4=["github-copilot"],ku8=J1(()=>G1(U.object({type:U.literal("error"),error:U.object({type:U.string(),message:U.string()})}))),o84=NE({errorSchema:ku8,errorToMessage:($)=>$.error.message}),vu8=J1(()=>G1(U.object({type:U.literal("message"),id:U.string().nullish(),model:U.string().nullish(),content:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("text"),text:U.string(),citations:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("web_search_result_location"),cited_text:U.string(),url:U.string(),title:U.string(),encrypted_index:U.string()}),U.object({type:U.literal("page_location"),cited_text:U.string(),document_index:U.number(),document_title:U.string().nullable(),start_page_number:U.number(),end_page_number:U.number()}),U.object({type:U.literal("char_location"),cited_text:U.string(),document_index:U.number(),document_title:U.string().nullable(),start_char_index:U.number(),end_char_index:U.number()})])).optional()}),U.object({type:U.literal("thinking"),thinking:U.string(),signature:U.string()}),U.object({type:U.literal("redacted_thinking"),data:U.string()}),U.object({type:U.literal("compaction"),content:U.string()}),U.object({type:U.literal("tool_use"),id:U.string(),name:U.string(),input:U.unknown(),caller:U.union([U.object({type:U.literal("code_execution_20250825"),tool_id:U.string()}),U.object({type:U.literal("code_execution_20260120"),tool_id:U.string()}),U.object({type:U.literal("direct")})]).optional()}),U.object({type:U.literal("server_tool_use"),id:U.string(),name:U.string(),input:U.record(U.string(),U.unknown()).nullish(),caller:U.union([U.object({type:U.literal("code_execution_20260120"),tool_id:U.string()}),U.object({type:U.literal("direct")})]).optional()}),U.object({type:U.literal("mcp_tool_use"),id:U.string(),name:U.string(),input:U.unknown(),server_name:U.string()}),U.object({type:U.literal("mcp_tool_result"),tool_use_id:U.string(),is_error:U.boolean(),content:U.array(U.union([U.string(),U.object({type:U.literal("text"),text:U.string()})]))}),U.object({type:U.literal("web_fetch_tool_result"),tool_use_id:U.string(),content:U.union([U.object({type:U.literal("web_fetch_result"),url:U.string(),retrieved_at:U.string(),content:U.object({type:U.literal("document"),title:U.string().nullable(),citations:U.object({enabled:U.boolean()}).optional(),source:U.union([U.object({type:U.literal("base64"),media_type:U.literal("application/pdf"),data:U.string()}),U.object({type:U.literal("text"),media_type:U.literal("text/plain"),data:U.string()})])})}),U.object({type:U.literal("web_fetch_tool_result_error"),error_code:U.string()})])}),U.object({type:U.literal("web_search_tool_result"),tool_use_id:U.string(),content:U.union([U.array(U.object({type:U.literal("web_search_result"),url:U.string(),title:U.string(),encrypted_content:U.string(),page_age:U.string().nullish()})),U.object({type:U.literal("web_search_tool_result_error"),error_code:U.string()})])}),U.object({type:U.literal("code_execution_tool_result"),tool_use_id:U.string(),content:U.union([U.object({type:U.literal("code_execution_result"),stdout:U.string(),stderr:U.string(),return_code:U.number(),content:U.array(U.object({type:U.literal("code_execution_output"),file_id:U.string()})).optional().default([])}),U.object({type:U.literal("encrypted_code_execution_result"),encrypted_stdout:U.string(),stderr:U.string(),return_code:U.number(),content:U.array(U.object({type:U.literal("code_execution_output"),file_id:U.string()})).optional().default([])}),U.object({type:U.literal("code_execution_tool_result_error"),error_code:U.string()})])}),U.object({type:U.literal("bash_code_execution_tool_result"),tool_use_id:U.string(),content:U.discriminatedUnion("type",[U.object({type:U.literal("bash_code_execution_result"),content:U.array(U.object({type:U.literal("bash_code_execution_output"),file_id:U.string()})),stdout:U.string(),stderr:U.string(),return_code:U.number()}),U.object({type:U.literal("bash_code_execution_tool_result_error"),error_code:U.string()})])}),U.object({type:U.literal("text_editor_code_execution_tool_result"),tool_use_id:U.string(),content:U.discriminatedUnion("type",[U.object({type:U.literal("text_editor_code_execution_tool_result_error"),error_code:U.string()}),U.object({type:U.literal("text_editor_code_execution_view_result"),content:U.string(),file_type:U.string(),num_lines:U.number().nullable(),start_line:U.number().nullable(),total_lines:U.number().nullable()}),U.object({type:U.literal("text_editor_code_execution_create_result"),is_file_update:U.boolean()}),U.object({type:U.literal("text_editor_code_execution_str_replace_result"),lines:U.array(U.string()).nullable(),new_lines:U.number().nullable(),new_start:U.number().nullable(),old_lines:U.number().nullable(),old_start:U.number().nullable()})])}),U.object({type:U.literal("tool_search_tool_result"),tool_use_id:U.string(),content:U.union([U.object({type:U.literal("tool_search_tool_search_result"),tool_references:U.array(U.object({type:U.literal("tool_reference"),tool_name:U.string()}))}),U.object({type:U.literal("tool_search_tool_result_error"),error_code:U.string()})])})])),stop_reason:U.string().nullish(),stop_sequence:U.string().nullish(),usage:U.looseObject({input_tokens:U.number(),output_tokens:U.number(),cache_creation_input_tokens:U.number().nullish(),cache_read_input_tokens:U.number().nullish(),iterations:U.array(U.object({type:U.union([U.literal("compaction"),U.literal("message")]),input_tokens:U.number(),output_tokens:U.number()})).nullish()}),container:U.object({expires_at:U.string(),id:U.string(),skills:U.array(U.object({type:U.union([U.literal("anthropic"),U.literal("custom")]),skill_id:U.string(),version:U.string()})).nullish()}).nullish(),context_management:U.object({applied_edits:U.array(U.union([U.object({type:U.literal("clear_tool_uses_20250919"),cleared_tool_uses:U.number(),cleared_input_tokens:U.number()}),U.object({type:U.literal("clear_thinking_20251015"),cleared_thinking_turns:U.number(),cleared_input_tokens:U.number()}),U.object({type:U.literal("compact_20260112")})]))}).nullish()}))),xu8=J1(()=>G1(U.discriminatedUnion("type",[U.object({type:U.literal("message_start"),message:U.object({id:U.string().nullish(),model:U.string().nullish(),role:U.string().nullish(),usage:U.looseObject({input_tokens:U.number(),cache_creation_input_tokens:U.number().nullish(),cache_read_input_tokens:U.number().nullish()}),content:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("tool_use"),id:U.string(),name:U.string(),input:U.unknown(),caller:U.union([U.object({type:U.literal("code_execution_20250825"),tool_id:U.string()}),U.object({type:U.literal("code_execution_20260120"),tool_id:U.string()}),U.object({type:U.literal("direct")})]).optional()})])).nullish(),stop_reason:U.string().nullish(),container:U.object({expires_at:U.string(),id:U.string()}).nullish()})}),U.object({type:U.literal("content_block_start"),index:U.number(),content_block:U.discriminatedUnion("type",[U.object({type:U.literal("text"),text:U.string()}),U.object({type:U.literal("thinking"),thinking:U.string()}),U.object({type:U.literal("tool_use"),id:U.string(),name:U.string(),input:U.record(U.string(),U.unknown()).optional(),caller:U.union([U.object({type:U.literal("code_execution_20250825"),tool_id:U.string()}),U.object({type:U.literal("code_execution_20260120"),tool_id:U.string()}),U.object({type:U.literal("direct")})]).optional()}),U.object({type:U.literal("redacted_thinking"),data:U.string()}),U.object({type:U.literal("compaction"),content:U.string().nullish()}),U.object({type:U.literal("server_tool_use"),id:U.string(),name:U.string(),input:U.record(U.string(),U.unknown()).nullish(),caller:U.union([U.object({type:U.literal("code_execution_20260120"),tool_id:U.string()}),U.object({type:U.literal("direct")})]).optional()}),U.object({type:U.literal("mcp_tool_use"),id:U.string(),name:U.string(),input:U.unknown(),server_name:U.string()}),U.object({type:U.literal("mcp_tool_result"),tool_use_id:U.string(),is_error:U.boolean(),content:U.array(U.union([U.string(),U.object({type:U.literal("text"),text:U.string()})]))}),U.object({type:U.literal("web_fetch_tool_result"),tool_use_id:U.string(),content:U.union([U.object({type:U.literal("web_fetch_result"),url:U.string(),retrieved_at:U.string(),content:U.object({type:U.literal("document"),title:U.string().nullable(),citations:U.object({enabled:U.boolean()}).optional(),source:U.union([U.object({type:U.literal("base64"),media_type:U.literal("application/pdf"),data:U.string()}),U.object({type:U.literal("text"),media_type:U.literal("text/plain"),data:U.string()})])})}),U.object({type:U.literal("web_fetch_tool_result_error"),error_code:U.string()})])}),U.object({type:U.literal("web_search_tool_result"),tool_use_id:U.string(),content:U.union([U.array(U.object({type:U.literal("web_search_result"),url:U.string(),title:U.string(),encrypted_content:U.string(),page_age:U.string().nullish()})),U.object({type:U.literal("web_search_tool_result_error"),error_code:U.string()})])}),U.object({type:U.literal("code_execution_tool_result"),tool_use_id:U.string(),content:U.union([U.object({type:U.literal("code_execution_result"),stdout:U.string(),stderr:U.string(),return_code:U.number(),content:U.array(U.object({type:U.literal("code_execution_output"),file_id:U.string()})).optional().default([])}),U.object({type:U.literal("encrypted_code_execution_result"),encrypted_stdout:U.string(),stderr:U.string(),return_code:U.number(),content:U.array(U.object({type:U.literal("code_execution_output"),file_id:U.string()})).optional().default([])}),U.object({type:U.literal("code_execution_tool_result_error"),error_code:U.string()})])}),U.object({type:U.literal("bash_code_execution_tool_result"),tool_use_id:U.string(),content:U.discriminatedUnion("type",[U.object({type:U.literal("bash_code_execution_result"),content:U.array(U.object({type:U.literal("bash_code_execution_output"),file_id:U.string()})),stdout:U.string(),stderr:U.string(),return_code:U.number()}),U.object({type:U.literal("bash_code_execution_tool_result_error"),error_code:U.string()})])}),U.object({type:U.literal("text_editor_code_execution_tool_result"),tool_use_id:U.string(),content:U.discriminatedUnion("type",[U.object({type:U.literal("text_editor_code_execution_tool_result_error"),error_code:U.string()}),U.object({type:U.literal("text_editor_code_execution_view_result"),content:U.string(),file_type:U.string(),num_lines:U.number().nullable(),start_line:U.number().nullable(),total_lines:U.number().nullable()}),U.object({type:U.literal("text_editor_code_execution_create_result"),is_file_update:U.boolean()}),U.object({type:U.literal("text_editor_code_execution_str_replace_result"),lines:U.array(U.string()).nullable(),new_lines:U.number().nullable(),new_start:U.number().nullable(),old_lines:U.number().nullable(),old_start:U.number().nullable()})])}),U.object({type:U.literal("tool_search_tool_result"),tool_use_id:U.string(),content:U.union([U.object({type:U.literal("tool_search_tool_search_result"),tool_references:U.array(U.object({type:U.literal("tool_reference"),tool_name:U.string()}))}),U.object({type:U.literal("tool_search_tool_result_error"),error_code:U.string()})])})])}),U.object({type:U.literal("content_block_delta"),index:U.number(),delta:U.discriminatedUnion("type",[U.object({type:U.literal("input_json_delta"),partial_json:U.string()}),U.object({type:U.literal("text_delta"),text:U.string()}),U.object({type:U.literal("thinking_delta"),thinking:U.string()}),U.object({type:U.literal("signature_delta"),signature:U.string()}),U.object({type:U.literal("compaction_delta"),content:U.string().nullish()}),U.object({type:U.literal("citations_delta"),citation:U.discriminatedUnion("type",[U.object({type:U.literal("web_search_result_location"),cited_text:U.string(),url:U.string(),title:U.string(),encrypted_index:U.string()}),U.object({type:U.literal("page_location"),cited_text:U.string(),document_index:U.number(),document_title:U.string().nullable(),start_page_number:U.number(),end_page_number:U.number()}),U.object({type:U.literal("char_location"),cited_text:U.string(),document_index:U.number(),document_title:U.string().nullable(),start_char_index:U.number(),end_char_index:U.number()})])})])}),U.object({type:U.literal("content_block_stop"),index:U.number()}),U.object({type:U.literal("error"),error:U.object({type:U.string(),message:U.string()})}),U.object({type:U.literal("message_delta"),delta:U.object({stop_reason:U.string().nullish(),stop_sequence:U.string().nullish(),container:U.object({expires_at:U.string(),id:U.string(),skills:U.array(U.object({type:U.union([U.literal("anthropic"),U.literal("custom")]),skill_id:U.string(),version:U.string()})).nullish()}).nullish()}),usage:U.looseObject({input_tokens:U.number().nullish(),output_tokens:U.number(),cache_creation_input_tokens:U.number().nullish(),cache_read_input_tokens:U.number().nullish(),iterations:U.array(U.object({type:U.union([U.literal("compaction"),U.literal("message")]),input_tokens:U.number(),output_tokens:U.number()})).nullish()}),context_management:U.object({applied_edits:U.array(U.union([U.object({type:U.literal("clear_tool_uses_20250919"),cleared_tool_uses:U.number(),cleared_input_tokens:U.number()}),U.object({type:U.literal("clear_thinking_20251015"),cleared_thinking_turns:U.number(),cleared_input_tokens:U.number()}),U.object({type:U.literal("compact_20260112")})]))}).nullish()}),U.object({type:U.literal("message_stop")}),U.object({type:U.literal("ping")})]))),yu8=J1(()=>G1(U.object({signature:U.string().optional(),redactedData:U.string().optional()}))),t84=U.object({citations:U.object({enabled:U.boolean()}).optional(),title:U.string().optional(),context:U.string().optional()}),e84=U.object({sendReasoning:U.boolean().optional(),structuredOutputMode:U.enum(["outputFormat","jsonTool","auto"]).optional(),thinking:U.discriminatedUnion("type",[U.object({type:U.literal("adaptive"),display:U.enum(["omitted","summarized"]).optional()}),U.object({type:U.literal("enabled"),budgetTokens:U.number().optional()}),U.object({type:U.literal("disabled")})]).optional(),disableParallelToolUse:U.boolean().optional(),cacheControl:U.object({type:U.literal("ephemeral"),ttl:U.union([U.literal("5m"),U.literal("1h")]).optional()}).optional(),metadata:U.object({userId:U.string().optional()}).optional(),mcpServers:U.array(U.object({type:U.literal("url"),name:U.string(),url:U.string(),authorizationToken:U.string().nullish(),toolConfiguration:U.object({enabled:U.boolean().nullish(),allowedTools:U.array(U.string()).nullish()}).nullish()})).optional(),container:U.object({id:U.string().optional(),skills:U.array(U.object({type:U.union([U.literal("anthropic"),U.literal("custom")]),skillId:U.string(),version:U.string().optional()})).optional()}).optional(),toolStreaming:U.boolean().optional(),effort:U.enum(["low","medium","high","xhigh","max"]).optional(),taskBudget:U.object({type:U.literal("tokens"),total:U.number().int().min(20000),remaining:U.number().int().min(0).optional()}).optional(),speed:U.enum(["fast","standard"]).optional(),inferenceGeo:U.enum(["us","global"]).optional(),anthropicBeta:U.array(U.string()).optional(),contextManagement:U.object({edits:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("clear_tool_uses_20250919"),trigger:U.discriminatedUnion("type",[U.object({type:U.literal("input_tokens"),value:U.number()}),U.object({type:U.literal("tool_uses"),value:U.number()})]).optional(),keep:U.object({type:U.literal("tool_uses"),value:U.number()}).optional(),clearAtLeast:U.object({type:U.literal("input_tokens"),value:U.number()}).optional(),clearToolInputs:U.boolean().optional(),excludeTools:U.array(U.string()).optional()}),U.object({type:U.literal("clear_thinking_20251015"),keep:U.union([U.literal("all"),U.object({type:U.literal("thinking_turns"),value:U.number()})]).optional()}),U.object({type:U.literal("compact_20260112"),trigger:U.object({type:U.literal("input_tokens"),value:U.number()}).optional(),pauseAfterCompaction:U.boolean().optional(),instructions:U.string().optional()})]))}).optional()});hu8=J1(()=>G1(U.object({maxCharacters:U.number().optional()}))),fu8=J1(()=>G1(U.object({command:U.enum(["view","create","str_replace","insert"]),path:U.string(),file_text:U.string().optional(),insert_line:U.number().int().optional(),new_str:U.string().optional(),insert_text:U.string().optional(),old_str:U.string().optional(),view_range:U.array(U.number().int()).optional()}))),gu8=LY({id:"anthropic.text_editor_20250728",inputSchema:fu8}),uu8=J1(()=>G1(U.object({maxUses:U.number().optional(),allowedDomains:U.array(U.string()).optional(),blockedDomains:U.array(U.string()).optional(),userLocation:U.object({type:U.literal("approximate"),city:U.string().optional(),region:U.string().optional(),country:U.string().optional(),timezone:U.string().optional()}).optional()}))),pu8=J1(()=>G1(U.array(U.object({url:U.string(),title:U.string().nullable(),pageAge:U.string().nullable(),encryptedContent:U.string(),type:U.literal("web_search_result")})))),du8=J1(()=>G1(U.object({query:U.string()}))),cu8=L5({id:"anthropic.web_search_20260209",inputSchema:du8,outputSchema:pu8,supportsDeferredResults:!0}),iu8=J1(()=>G1(U.object({maxUses:U.number().optional(),allowedDomains:U.array(U.string()).optional(),blockedDomains:U.array(U.string()).optional(),userLocation:U.object({type:U.literal("approximate"),city:U.string().optional(),region:U.string().optional(),country:U.string().optional(),timezone:U.string().optional()}).optional()}))),F$4=J1(()=>G1(U.array(U.object({url:U.string(),title:U.string().nullable(),pageAge:U.string().nullable(),encryptedContent:U.string(),type:U.literal("web_search_result")})))),nu8=J1(()=>G1(U.object({query:U.string()}))),ru8=L5({id:"anthropic.web_search_20250305",inputSchema:nu8,outputSchema:F$4,supportsDeferredResults:!0}),su8=J1(()=>G1(U.object({maxUses:U.number().optional(),allowedDomains:U.array(U.string()).optional(),blockedDomains:U.array(U.string()).optional(),citations:U.object({enabled:U.boolean()}).optional(),maxContentTokens:U.number().optional()}))),ou8=J1(()=>G1(U.object({type:U.literal("web_fetch_result"),url:U.string(),content:U.object({type:U.literal("document"),title:U.string().nullable(),citations:U.object({enabled:U.boolean()}).optional(),source:U.union([U.object({type:U.literal("base64"),mediaType:U.literal("application/pdf"),data:U.string()}),U.object({type:U.literal("text"),mediaType:U.literal("text/plain"),data:U.string()})])}),retrievedAt:U.string().nullable()}))),tu8=J1(()=>G1(U.object({url:U.string()}))),eu8=L5({id:"anthropic.web_fetch_20260209",inputSchema:tu8,outputSchema:ou8,supportsDeferredResults:!0}),Yp8=J1(()=>G1(U.object({maxUses:U.number().optional(),allowedDomains:U.array(U.string()).optional(),blockedDomains:U.array(U.string()).optional(),citations:U.object({enabled:U.boolean()}).optional(),maxContentTokens:U.number().optional()}))),L$4=J1(()=>G1(U.object({type:U.literal("web_fetch_result"),url:U.string(),content:U.object({type:U.literal("document"),title:U.string().nullable(),citations:U.object({enabled:U.boolean()}).optional(),source:U.union([U.object({type:U.literal("base64"),mediaType:U.literal("application/pdf"),data:U.string()}),U.object({type:U.literal("text"),mediaType:U.literal("text/plain"),data:U.string()})])}),retrievedAt:U.string().nullable()}))),Xp8=J1(()=>G1(U.object({url:U.string()}))),Gp8=L5({id:"anthropic.web_fetch_20250910",inputSchema:Xp8,outputSchema:L$4,supportsDeferredResults:!0});D$4=J1(()=>G1(U.object({type:U.literal("code_execution_result"),stdout:U.string(),stderr:U.string(),return_code:U.number(),content:U.array(U.object({type:U.literal("code_execution_output"),file_id:U.string()})).optional().default([])}))),Wp8=J1(()=>G1(U.object({code:U.string()}))),Kp8=L5({id:"anthropic.code_execution_20250522",inputSchema:Wp8,outputSchema:D$4}),N$4=J1(()=>G1(U.discriminatedUnion("type",[U.object({type:U.literal("code_execution_result"),stdout:U.string(),stderr:U.string(),return_code:U.number(),content:U.array(U.object({type:U.literal("code_execution_output"),file_id:U.string()})).optional().default([])}),U.object({type:U.literal("bash_code_execution_result"),content:U.array(U.object({type:U.literal("bash_code_execution_output"),file_id:U.string()})),stdout:U.string(),stderr:U.string(),return_code:U.number()}),U.object({type:U.literal("bash_code_execution_tool_result_error"),error_code:U.string()}),U.object({type:U.literal("text_editor_code_execution_tool_result_error"),error_code:U.string()}),U.object({type:U.literal("text_editor_code_execution_view_result"),content:U.string(),file_type:U.string(),num_lines:U.number().nullable(),start_line:U.number().nullable(),total_lines:U.number().nullable()}),U.object({type:U.literal("text_editor_code_execution_create_result"),is_file_update:U.boolean()}),U.object({type:U.literal("text_editor_code_execution_str_replace_result"),lines:U.array(U.string()).nullable(),new_lines:U.number().nullable(),new_start:U.number().nullable(),old_lines:U.number().nullable(),old_start:U.number().nullable()})]))),Up8=J1(()=>G1(U.discriminatedUnion("type",[U.object({type:U.literal("programmatic-tool-call"),code:U.string()}),U.object({type:U.literal("bash_code_execution"),command:U.string()}),U.discriminatedUnion("command",[U.object({type:U.literal("text_editor_code_execution"),command:U.literal("view"),path:U.string()}),U.object({type:U.literal("text_editor_code_execution"),command:U.literal("create"),path:U.string(),file_text:U.string().nullish()}),U.object({type:U.literal("text_editor_code_execution"),command:U.literal("str_replace"),path:U.string(),old_str:U.string(),new_str:U.string()})])]))),Hp8=L5({id:"anthropic.code_execution_20250825",inputSchema:Up8,outputSchema:N$4,supportsDeferredResults:!0}),A$4=J1(()=>G1(U.discriminatedUnion("type",[U.object({type:U.literal("code_execution_result"),stdout:U.string(),stderr:U.string(),return_code:U.number(),content:U.array(U.object({type:U.literal("code_execution_output"),file_id:U.string()})).optional().default([])}),U.object({type:U.literal("encrypted_code_execution_result"),encrypted_stdout:U.string(),stderr:U.string(),return_code:U.number(),content:U.array(U.object({type:U.literal("code_execution_output"),file_id:U.string()})).optional().default([])}),U.object({type:U.literal("bash_code_execution_result"),content:U.array(U.object({type:U.literal("bash_code_execution_output"),file_id:U.string()})),stdout:U.string(),stderr:U.string(),return_code:U.number()}),U.object({type:U.literal("bash_code_execution_tool_result_error"),error_code:U.string()}),U.object({type:U.literal("text_editor_code_execution_tool_result_error"),error_code:U.string()}),U.object({type:U.literal("text_editor_code_execution_view_result"),content:U.string(),file_type:U.string(),num_lines:U.number().nullable(),start_line:U.number().nullable(),total_lines:U.number().nullable()}),U.object({type:U.literal("text_editor_code_execution_create_result"),is_file_update:U.boolean()}),U.object({type:U.literal("text_editor_code_execution_str_replace_result"),lines:U.array(U.string()).nullable(),new_lines:U.number().nullable(),new_start:U.number().nullable(),old_lines:U.number().nullable(),old_start:U.number().nullable()})]))),Vp8=J1(()=>G1(U.discriminatedUnion("type",[U.object({type:U.literal("programmatic-tool-call"),code:U.string()}),U.object({type:U.literal("bash_code_execution"),command:U.string()}),U.discriminatedUnion("command",[U.object({type:U.literal("text_editor_code_execution"),command:U.literal("view"),path:U.string()}),U.object({type:U.literal("text_editor_code_execution"),command:U.literal("create"),path:U.string(),file_text:U.string().nullish()}),U.object({type:U.literal("text_editor_code_execution"),command:U.literal("str_replace"),path:U.string(),old_str:U.string(),new_str:U.string()})])]))),Fp8=L5({id:"anthropic.code_execution_20260120",inputSchema:Vp8,outputSchema:A$4,supportsDeferredResults:!0}),B$4=J1(()=>G1(U.array(U.object({type:U.literal("tool_reference"),toolName:U.string()})))),Dp8=J1(()=>G1(U.object({pattern:U.string(),limit:U.number().optional()}))),Np8=L5({id:"anthropic.tool_search_regex_20251119",inputSchema:Dp8,outputSchema:B$4,supportsDeferredResults:!0});O$4=new Set(["date-time","time","date","duration","email","hostname","uri","ipv4","ipv6","uuid"]),Rp8=["minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","minLength","maxLength","pattern","minItems","maxItems","uniqueItems","minProperties","maxProperties","not"];Cp8=J1(()=>G1(U.object({command:U.string(),restart:U.boolean().optional()}))),Sp8=LY({id:"anthropic.bash_20241022",inputSchema:Cp8}),kp8=J1(()=>G1(U.object({command:U.string(),restart:U.boolean().optional()}))),vp8=LY({id:"anthropic.bash_20250124",inputSchema:kp8}),xp8=J1(()=>G1(U.object({action:U.enum(["key","type","mouse_move","left_click","left_click_drag","right_click","middle_click","double_click","screenshot","cursor_position"]),coordinate:U.array(U.number().int()).optional(),text:U.string().optional()}))),yp8=LY({id:"anthropic.computer_20241022",inputSchema:xp8}),bp8=J1(()=>G1(U.object({action:U.enum(["key","hold_key","type","cursor_position","mouse_move","left_mouse_down","left_mouse_up","left_click","left_click_drag","right_click","middle_click","double_click","triple_click","scroll","wait","screenshot"]),coordinate:U.tuple([U.number().int(),U.number().int()]).optional(),duration:U.number().optional(),scroll_amount:U.number().optional(),scroll_direction:U.enum(["up","down","left","right"]).optional(),start_coordinate:U.tuple([U.number().int(),U.number().int()]).optional(),text:U.string().optional()}))),hp8=LY({id:"anthropic.computer_20250124",inputSchema:bp8}),fp8=J1(()=>G1(U.object({action:U.enum(["key","hold_key","type","cursor_position","mouse_move","left_mouse_down","left_mouse_up","left_click","left_click_drag","right_click","middle_click","double_click","triple_click","scroll","wait","screenshot","zoom"]),coordinate:U.tuple([U.number().int(),U.number().int()]).optional(),duration:U.number().optional(),region:U.tuple([U.number().int(),U.number().int(),U.number().int(),U.number().int()]).optional(),scroll_amount:U.number().optional(),scroll_direction:U.enum(["up","down","left","right"]).optional(),start_coordinate:U.tuple([U.number().int(),U.number().int()]).optional(),text:U.string().optional()}))),gp8=LY({id:"anthropic.computer_20251124",inputSchema:fp8}),mp8=J1(()=>G1(U.discriminatedUnion("command",[U.object({command:U.literal("view"),path:U.string(),view_range:U.tuple([U.number(),U.number()]).optional()}),U.object({command:U.literal("create"),path:U.string(),file_text:U.string()}),U.object({command:U.literal("str_replace"),path:U.string(),old_str:U.string(),new_str:U.string()}),U.object({command:U.literal("insert"),path:U.string(),insert_line:U.number(),insert_text:U.string()}),U.object({command:U.literal("delete"),path:U.string()}),U.object({command:U.literal("rename"),old_path:U.string(),new_path:U.string()})]))),up8=LY({id:"anthropic.memory_20250818",inputSchema:mp8}),pp8=J1(()=>G1(U.object({command:U.enum(["view","create","str_replace","insert","undo_edit"]),path:U.string(),file_text:U.string().optional(),insert_line:U.number().int().optional(),new_str:U.string().optional(),insert_text:U.string().optional(),old_str:U.string().optional(),view_range:U.array(U.number().int()).optional()}))),dp8=LY({id:"anthropic.text_editor_20241022",inputSchema:pp8}),cp8=J1(()=>G1(U.object({command:U.enum(["view","create","str_replace","insert","undo_edit"]),path:U.string(),file_text:U.string().optional(),insert_line:U.number().int().optional(),new_str:U.string().optional(),insert_text:U.string().optional(),old_str:U.string().optional(),view_range:U.array(U.number().int()).optional()}))),lp8=LY({id:"anthropic.text_editor_20250124",inputSchema:cp8}),ip8=J1(()=>G1(U.object({command:U.enum(["view","create","str_replace","insert"]),path:U.string(),file_text:U.string().optional(),insert_line:U.number().int().optional(),new_str:U.string().optional(),insert_text:U.string().optional(),old_str:U.string().optional(),view_range:U.array(U.number().int()).optional()}))),np8=LY({id:"anthropic.text_editor_20250429",inputSchema:ip8}),rp8=J1(()=>G1(U.array(U.object({type:U.literal("tool_reference"),toolName:U.string()})))),ap8=J1(()=>G1(U.object({query:U.string(),limit:U.number().optional()}))),sp8=L5({id:"anthropic.tool_search_bm25_20251119",inputSchema:ap8,outputSchema:rp8,supportsDeferredResults:!0}),tp8={bash_20241022:Sp8,bash_20250124:vp8,codeExecution_20250522:Zp8,codeExecution_20250825:zp8,codeExecution_20260120:Lp8,computer_20241022:yp8,computer_20250124:hp8,computer_20251124:gp8,memory_20250818:up8,textEditor_20241022:dp8,textEditor_20250124:lp8,textEditor_20250429:np8,textEditor_20250728:mu8,webFetch_20250910:Jp8,webFetch_20260209:$p8,webSearch_20250305:au8,webSearch_20260209:lu8,toolSearchRegex_20251119:Ap8,toolSearchBm25_20251119:op8};QV();$d8=J1(()=>G1(U.object({error:U.object({code:U.number().nullable(),message:U.string(),status:U.string()})}))),lZ=NE({errorSchema:$d8,errorToMessage:($)=>$.error.message}),Yd8=U.union([U.object({text:U.string()}),U.object({inlineData:U.object({mimeType:U.string(),data:U.string()})})]),Xd8=J1(()=>G1(U.object({outputDimensionality:U.number().optional(),taskType:U.enum(["SEMANTIC_SIMILARITY","CLASSIFICATION","CLUSTERING","RETRIEVAL_DOCUMENT","RETRIEVAL_QUERY","QUESTION_ANSWERING","FACT_VERIFICATION","CODE_RETRIEVAL_QUERY"]).optional(),content:U.array(U.array(Yd8).min(1).nullable()).optional()}))),Jd8=J1(()=>G1(U.object({embeddings:U.array(U.object({values:U.array(U.number())}))}))),Qd8=J1(()=>G1(U.object({embedding:U.object({values:U.array(U.number())})})));Kd8=/^data:([^;,]+);base64,(.+)$/s;K94=J1(()=>G1(U.object({responseModalities:U.array(U.enum(["TEXT","IMAGE"])).optional(),thinkingConfig:U.object({thinkingBudget:U.number().optional(),includeThoughts:U.boolean().optional(),thinkingLevel:U.enum(["minimal","low","medium","high"]).optional()}).optional(),cachedContent:U.string().optional(),structuredOutputs:U.boolean().optional(),safetySettings:U.array(U.object({category:U.enum(["HARM_CATEGORY_UNSPECIFIED","HARM_CATEGORY_HATE_SPEECH","HARM_CATEGORY_DANGEROUS_CONTENT","HARM_CATEGORY_HARASSMENT","HARM_CATEGORY_SEXUALLY_EXPLICIT","HARM_CATEGORY_CIVIC_INTEGRITY"]),threshold:U.enum(["HARM_BLOCK_THRESHOLD_UNSPECIFIED","BLOCK_LOW_AND_ABOVE","BLOCK_MEDIUM_AND_ABOVE","BLOCK_ONLY_HIGH","BLOCK_NONE","OFF"])})).optional(),threshold:U.enum(["HARM_BLOCK_THRESHOLD_UNSPECIFIED","BLOCK_LOW_AND_ABOVE","BLOCK_MEDIUM_AND_ABOVE","BLOCK_ONLY_HIGH","BLOCK_NONE","OFF"]).optional(),audioTimestamp:U.boolean().optional(),labels:U.record(U.string(),U.string()).optional(),mediaResolution:U.enum(["MEDIA_RESOLUTION_UNSPECIFIED","MEDIA_RESOLUTION_LOW","MEDIA_RESOLUTION_MEDIUM","MEDIA_RESOLUTION_HIGH"]).optional(),imageConfig:U.object({aspectRatio:U.enum(["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9","1:8","8:1","1:4","4:1"]).optional(),imageSize:U.enum(["1K","2K","4K","512"]).optional()}).optional(),retrievalConfig:U.object({latLng:U.object({latitude:U.number(),longitude:U.number()}).optional()}).optional(),streamFunctionCallArguments:U.boolean().optional(),serviceTier:U.enum(["standard","flex","priority"]).optional()}))),Fd8={standard:"SERVICE_TIER_STANDARD",flex:"SERVICE_TIER_FLEX",priority:"SERVICE_TIER_PRIORITY"};Od8=U.object({jsonPath:U.string(),stringValue:U.string().nullish(),numberValue:U.number().nullish(),boolValue:U.boolean().nullish(),nullValue:U.unknown().nullish(),willContinue:U.boolean().nullish()}),z94=U.array(U.object({modality:U.string(),tokenCount:U.number()})).nullish(),P$4=U.object({cachedContentTokenCount:U.number().nullish(),thoughtsTokenCount:U.number().nullish(),promptTokenCount:U.number().nullish(),candidatesTokenCount:U.number().nullish(),totalTokenCount:U.number().nullish(),trafficType:U.string().nullish(),promptTokensDetails:z94,candidatesTokensDetails:z94}),Ed8=J1(()=>G1(U.object({candidates:U.array(U.object({content:q$4().nullish().or(U.object({}).strict()),finishReason:U.string().nullish(),finishMessage:U.string().nullish(),safetyRatings:U.array(j90()).nullish(),groundingMetadata:R$4().nullish(),urlContextMetadata:w$4().nullish()})),usageMetadata:P$4.nullish(),promptFeedback:U.object({blockReason:U.string().nullish(),safetyRatings:U.array(j90()).nullish()}).nullish(),serviceTier:U.string().nullish()}))),Md8=J1(()=>G1(U.object({candidates:U.array(U.object({content:q$4().nullish(),finishReason:U.string().nullish(),finishMessage:U.string().nullish(),safetyRatings:U.array(j90()).nullish(),groundingMetadata:R$4().nullish(),urlContextMetadata:w$4().nullish()})).nullish(),usageMetadata:P$4.nullish(),promptFeedback:U.object({blockReason:U.string().nullish(),safetyRatings:U.array(j90()).nullish()}).nullish(),serviceTier:U.string().nullish()}))),Rd8=L5({id:"google.code_execution",inputSchema:U.object({language:U.string().describe("The programming language of the code."),code:U.string().describe("The code to be executed.")}),outputSchema:U.object({outcome:U.string().describe('The outcome of the execution (e.g., "OUTCOME_OK").'),output:U.string().describe("The output from the code execution.")})}),qd8=LY({id:"google.enterprise_web_search",inputSchema:J1(()=>G1(U.object({})))}),Pd8=U.object({fileSearchStoreNames:U.array(U.string()).describe("The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`"),topK:U.number().int().positive().describe("The number of file search retrieval chunks to retrieve.").optional(),metadataFilter:U.string().describe("Metadata filter to apply to the file search retrieval documents. See https://google.aip.dev/160 for the syntax of the filter expression.").optional()}).passthrough(),wd8=J1(()=>G1(Pd8)),_d8=LY({id:"google.file_search",inputSchema:wd8}),jd8=LY({id:"google.google_maps",inputSchema:J1(()=>G1(U.object({})))}),Td8=U.object({searchTypes:U.object({webSearch:U.object({}).optional(),imageSearch:U.object({}).optional()}).optional(),timeRangeFilter:U.object({startTime:U.string(),endTime:U.string()}).optional()}).passthrough(),Id8=J1(()=>G1(Td8)),Cd8=LY({id:"google.google_search",inputSchema:Id8}),Sd8=LY({id:"google.url_context",inputSchema:J1(()=>G1(U.object({})))}),kd8=LY({id:"google.vertex_rag_store",inputSchema:U.object({ragCorpus:U.string(),topK:U.number().optional()})}),vd8={googleSearch:Cd8,enterpriseWebSearch:qd8,googleMaps:jd8,urlContext:Sd8,fileSearch:_d8,codeExecution:Rd8,vertexRagStore:kd8};yd8=J1(()=>G1(U.object({predictions:U.array(U.object({bytesBase64Encoded:U.string()})).default([])}))),bd8=J1(()=>G1(U.object({personGeneration:U.enum(["dont_allow","allow_adult","allow_all"]).nullish(),aspectRatio:U.enum(["1:1","3:4","4:3","9:16","16:9"]).nullish()}))),F94=U.object({name:U.string().nullish(),done:U.boolean().nullish(),error:U.object({code:U.number().nullish(),message:U.string(),status:U.string().nullish()}).nullish(),response:U.object({generateVideoResponse:U.object({generatedSamples:U.array(U.object({video:U.object({uri:U.string().nullish()}).nullish()})).nullish()}).nullish()}).nullish()}),fd8=J1(()=>G1(U.object({pollIntervalMs:U.number().positive().nullish(),pollTimeoutMs:U.number().positive().nullish(),personGeneration:U.enum(["dont_allow","allow_adult","allow_all"]).nullish(),negativePrompt:U.string().nullish(),referenceImages:U.array(U.object({bytesBase64Encoded:U.string().nullish(),gcsUri:U.string().nullish()})).nullish()}).passthrough()));gd8={pdf:"application/pdf",txt:"text/plain",md:"text/markdown",markdown:"text/markdown",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};ud8=new Set(["google_search_call","code_execution_call","url_context_call","file_search_call","google_maps_call","mcp_server_tool_call"]),pd8=new Set(["google_search_result","code_execution_result","url_context_result","file_search_result","google_maps_result","mcp_server_tool_result"]);vy0=J1(()=>G1(U.object({id:U.string().nullish(),created:U.string().nullish(),updated:U.string().nullish(),status:S$4(),model:U.string().nullish(),agent:U.string().nullish(),outputs:U.array(x$4()).nullish(),usage:C$4().nullish(),service_tier:U.string().nullish(),previous_interaction_id:U.string().nullish(),response_modalities:U.array(U.string()).nullish()}).loose())),od8=J1(()=>G1((()=>{let $=S$4(),Y=k$4(),X=v$4(),G=U.object({event_type:U.literal("interaction.start"),event_id:U.string().nullish(),interaction:U.object({id:U.string().nullish(),created:U.string().nullish(),model:U.string().nullish(),agent:U.string().nullish(),status:$.nullish()}).loose()}).loose(),J=U.object({event_type:U.literal("content.start"),event_id:U.string().nullish(),index:U.number(),content:x$4()}).loose(),Q=U.object({type:U.literal("text"),text:U.string()}).loose(),W=U.object({type:U.literal("thought_summary"),content:X.nullish()}).loose(),K=U.object({type:U.literal("thought_signature"),signature:U.string().nullish()}).loose(),Z=U.object({type:U.literal("function_call"),id:U.string(),name:U.string(),arguments:U.record(U.string(),U.unknown()).nullish(),signature:U.string().nullish()}).loose(),H=U.object({type:U.literal("text_annotation"),annotations:U.array(Y).nullish()}).loose(),z=U.object({type:U.literal("image"),data:U.string().nullish(),mime_type:U.string().nullish(),resolution:U.enum(["low","medium","high","ultra_high"]).nullish(),uri:U.string().nullish()}).loose(),V=U.object({type:U.enum(["google_search_call","code_execution_call","url_context_call","file_search_call","google_maps_call","mcp_server_tool_call"]),id:U.string(),arguments:U.record(U.string(),U.unknown()).nullish(),name:U.string().nullish(),server_name:U.string().nullish(),search_type:U.string().nullish(),signature:U.string().nullish()}).loose(),F=U.object({type:U.enum(["google_search_result","code_execution_result","url_context_result","file_search_result","google_maps_result","mcp_server_tool_result"]),call_id:U.string(),result:U.unknown().nullish(),is_error:U.boolean().nullish(),name:U.string().nullish(),server_name:U.string().nullish(),signature:U.string().nullish()}).loose(),L=U.object({type:U.string()}).loose(),N=U.union([Q,z,W,K,Z,H,V,F,L]),D=U.object({event_type:U.literal("content.delta"),event_id:U.string().nullish(),index:U.number(),delta:N}).loose(),A=U.object({event_type:U.literal("content.stop"),event_id:U.string().nullish(),index:U.number()}).loose(),B=U.object({event_type:U.literal("interaction.status_update"),event_id:U.string().nullish(),interaction_id:U.string().nullish(),status:$}).loose(),O=U.object({event_type:U.literal("interaction.complete"),event_id:U.string().nullish(),interaction:U.object({id:U.string().nullish(),status:$.nullish(),usage:C$4().nullish(),service_tier:U.string().nullish()}).loose()}).loose(),E=U.object({event_type:U.literal("error"),event_id:U.string().nullish(),error:U.object({code:U.string().nullish(),message:U.string().nullish()}).loose().nullish()}).loose(),M=U.object({event_type:U.string()}).loose();return U.union([G,J,D,A,B,O,E,M])})())),td8=J1(()=>G1(U.object({previousInteractionId:U.string().nullish(),store:U.boolean().nullish(),agent:U.string().nullish(),agentConfig:U.union([U.object({type:U.literal("dynamic")}).loose(),U.object({type:U.literal("deep-research"),thinkingSummaries:U.enum(["auto","none"]).nullish(),visualization:U.enum(["off","auto"]).nullish(),collaborativePlanning:U.boolean().nullish()})]).nullish(),thinkingLevel:U.enum(["minimal","low","medium","high"]).nullish(),thinkingSummaries:U.enum(["auto","none"]).nullish(),imageConfig:U.object({aspectRatio:U.enum(["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9","1:8","8:1","1:4","4:1"]).nullish(),imageSize:U.enum(["1K","2K","4K","512"]).nullish()}).nullish(),mediaResolution:U.enum(["low","medium","high","ultra_high"]).nullish(),responseModalities:U.array(U.enum(["text","image","audio","video","document"])).nullish(),serviceTier:U.enum(["flex","standard","priority"]).nullish(),systemInstruction:U.string().nullish(),signature:U.string().nullish(),interactionId:U.string().nullish(),pollingTimeoutMs:U.number().int().positive().nullish()})));ed8=new Set(["google_search_call","code_execution_call","url_context_call","file_search_call","google_maps_call","mcp_server_tool_call"]),$c8=new Set(["google_search_result","code_execution_result","url_context_result","file_search_result","google_maps_result","mcp_server_tool_result"]);Gc8=new Set(["completed","failed","cancelled","incomplete"]);JT()});function W74($={}){var Y;let X=aZ((Y=$.baseURL)!=null?Y:"https://api.cerebras.ai/v1"),G=()=>_Q({Authorization:`Bearer ${rZ({apiKey:$.apiKey,environmentVariableName:"CEREBRAS_API_KEY",description:"Cerebras API key"})}`,...$.headers},`ai-sdk/cerebras/${Hc8}`),J=(W)=>{return new Vm(W,{provider:"cerebras.chat",url:({path:K})=>`${X}${K}`,headers:G,fetch:$.fetch,errorStructure:Vc8,supportsStructuredOutputs:!0})},Q=(W)=>J(W);return Q.languageModel=J,Q.chat=J,Q.textEmbeddingModel=(W)=>{throw new LE({modelId:W,modelType:"textEmbeddingModel"})},Q.imageModel=(W)=>{throw new LE({modelId:W,modelType:"imageModel"})},Q}function K74($={}){var Y;let X=aZ((Y=$.baseURL)!=null?Y:"https://api.deepinfra.com/v1"),G=()=>_Q({Authorization:`Bearer ${rZ({apiKey:$.apiKey,environmentVariableName:"DEEPINFRA_API_KEY",description:"DeepInfra's API key"})}`,...$.headers},`ai-sdk/deepinfra/${Ac8}`),J=(z)=>({provider:`deepinfra.${z}`,url:({path:V})=>`${X}/openai${V}`,headers:G,fetch:$.fetch}),Q=(z)=>{return new Nc8(z,J("chat"))},W=(z)=>new f90(z,J("completion")),K=(z)=>new g90(z,J("embedding")),Z=(z)=>new Fc8(z,{...J("image"),baseURL:X?`${X}/inference`:"https://api.deepinfra.com/v1/inference"}),H=(z)=>Q(z);return H.completionModel=W,H.chatModel=Q,H.image=Z,H.imageModel=Z,H.languageModel=Q,H.textEmbeddingModel=K,H}function Bc8({prompt:$,responseFormat:Y,modelId:X}){let G=X.includes("deepseek-v4"),J=[],Q=[];if((Y==null?void 0:Y.type)==="json")if(Y.schema==null)J.push({role:"system",content:"Return JSON."});else J.push({role:"system",content:"Return JSON that conforms to the following schema: "+JSON.stringify(Y.schema)});let W=-1;for(let Z=$.length-1;Z>=0;Z--)if($[Z].role==="user"){W=Z;break}let K=-1;for(let{role:Z,content:H}of $)switch(K++,Z){case"system":{J.push({role:"system",content:H});break}case"user":{let z="";for(let V of H)if(V.type==="text")z+=V.text;else Q.push({type:"other",message:`Unsupported user message part type: ${V.type}`});J.push({role:"user",content:z});break}case"assistant":{let z="",V,F=[];for(let L of H)switch(L.type){case"text":{z+=L.text;break}case"reasoning":{if(K<=W&&!G)break;if(V==null)V=L.text;else V+=L.text;break}case"tool-call":{F.push({id:L.toolCallId,type:"function",function:{name:L.toolName,arguments:JSON.stringify(L.input)}});break}}J.push({role:"assistant",content:z,reasoning_content:V!=null?V:G?"":void 0,tool_calls:F.length>0?F:void 0});break}case"tool":{for(let z of H){let V=z.output,F;switch(V.type){case"text":case"error-text":F=V.value;break;case"content":case"json":case"error-json":F=JSON.stringify(V.value);break}J.push({role:"tool",tool_call_id:z.toolCallId,content:F})}break}default:{Q.push({type:"other",message:`Unsupported message role: ${Z}`});break}}return{messages:J,warnings:Q}}function Rc8({tools:$,toolChoice:Y}){$=($==null?void 0:$.length)?$:void 0;let X=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:X};let G=[];for(let Q of $)if(Q.type==="provider-defined")X.push({type:"unsupported-tool",tool:Q});else G.push({type:"function",function:{name:Q.name,description:Q.description,parameters:Q.inputSchema}});if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:X};let J=Y.type;switch(J){case"auto":case"none":case"required":return{tools:G,toolChoice:J,toolWarnings:X};case"tool":return{tools:G,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:X};default:throw new _9({functionality:`tool choice type: ${J}`})}}function b$4({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function h$4($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"tool_calls":return"tool-calls";case"insufficient_system_resource":return"error";default:return"unknown"}}function H74($={}){var Y;let X=aZ((Y=$.baseURL)!=null?Y:"https://api.deepseek.com"),G=()=>_Q({Authorization:`Bearer ${rZ({apiKey:$.apiKey,environmentVariableName:"DEEPSEEK_API_KEY",description:"DeepSeek API key"})}`,...$.headers},`ai-sdk/deepseek/${Pc8}`),J=(W)=>{return new qc8(W,{provider:"deepseek.chat",url:({path:K})=>`${X}${K}`,headers:G,fetch:$.fetch})},Q=(W)=>J(W);return Q.languageModel=J,Q.chat=J,Q.textEmbeddingModel=(W)=>{throw new LE({modelId:W,modelType:"textEmbeddingModel"})},Q.imageModel=(W)=>{throw new LE({modelId:W,modelType:"imageModel"})},Q}function f$4($){var Y,X,G,J;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let Q=(Y=$.prompt_tokens)!=null?Y:0,W=(X=$.completion_tokens)!=null?X:0,K=(J=(G=$.completion_tokens_details)==null?void 0:G.reasoning_tokens)!=null?J:void 0,Z=K!=null?W-K:W;return{inputTokens:{total:Q,noCache:Q,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:W,text:Z,reasoning:K},raw:$}}function wc8($){var Y;let X=[];for(let{role:G,content:J}of $)switch(G){case"system":{X.push({role:"system",content:J});break}case"user":{if(J.length===1&&J[0].type==="text"){X.push({role:"user",content:J[0].text});break}X.push({role:"user",content:J.map((Q)=>{switch(Q.type){case"text":return{type:"text",text:Q.text};case"file":{if(!Q.mediaType.startsWith("image/"))throw new p5({functionality:"Non-image file content parts"});let W=Q.mediaType==="image/*"?"image/jpeg":Q.mediaType;return{type:"image_url",image_url:{url:Q.data instanceof URL?Q.data.toString():`data:${W};base64,${nY(Q.data)}`}}}}})});break}case"assistant":{let Q="",W="",K=[];for(let Z of J)switch(Z.type){case"reasoning":{W+=Z.text;break}case"text":{Q+=Z.text;break}case"tool-call":{K.push({id:Z.toolCallId,type:"function",function:{name:Z.toolName,arguments:JSON.stringify(Z.input)}});break}}X.push({role:"assistant",content:Q,...W.length>0?{reasoning:W}:null,...K.length>0?{tool_calls:K}:null});break}case"tool":{for(let Q of J){if(Q.type==="tool-approval-response")continue;let W=Q.output,K;switch(W.type){case"text":case"error-text":K=W.value;break;case"execution-denied":K=(Y=W.reason)!=null?Y:"Tool execution denied.";break;case"content":case"json":case"error-json":K=JSON.stringify(W.value);break}X.push({role:"tool",tool_call_id:Q.toolCallId,content:K})}break}default:throw Error(`Unsupported role: ${G}`)}return X}function g$4({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function jc8($){return V74.includes($)}function Tc8(){return V74.join(", ")}function Ic8({tools:$,toolChoice:Y,modelId:X}){$=($==null?void 0:$.length)?$:void 0;let G=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:G};let J=[];for(let W of $)if(W.type==="provider")if(W.id==="groq.browser_search")if(!jc8(X))G.push({type:"unsupported",feature:`provider-defined tool ${W.id}`,details:`Browser search is only supported on the following models: ${Tc8()}. Current model: ${X}`});else J.push({type:"browser_search"});else G.push({type:"unsupported",feature:`provider-defined tool ${W.id}`});else J.push({type:"function",function:{name:W.name,description:W.description,parameters:W.inputSchema,...W.strict!=null?{strict:W.strict}:{}}});if(Y==null)return{tools:J,toolChoice:void 0,toolWarnings:G};let Q=Y.type;switch(Q){case"auto":case"none":case"required":return{tools:J,toolChoice:Q,toolWarnings:G};case"tool":return{tools:J,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:G};default:throw new p5({functionality:`tool choice type: ${Q}`})}}function m$4($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}function F74($={}){var Y;let X=(Y=AE($.baseURL))!=null?Y:"https://api.groq.com/openai/v1",G=()=>JV({Authorization:`Bearer ${DE({apiKey:$.apiKey,environmentVariableName:"GROQ_API_KEY",description:"Groq"})}`,...$.headers},`ai-sdk/groq/${fc8}`),J=(Z)=>new Cc8(Z,{provider:"groq.chat",url:({path:H})=>`${X}${H}`,headers:G,fetch:$.fetch}),Q=(Z)=>{if(new.target)throw Error("The Groq model function cannot be called with the new keyword.");return J(Z)},W=(Z)=>{return new xc8(Z,{provider:"groq.transcription",url:({path:H})=>`${X}${H}`,headers:G,fetch:$.fetch})},K=function(Z){return Q(Z)};return K.specificationVersion="v3",K.languageModel=Q,K.chat=J,K.embeddingModel=(Z)=>{throw new FE({modelId:Z,modelType:"embeddingModel"})},K.textEmbeddingModel=K.embeddingModel,K.imageModel=(Z)=>{throw new FE({modelId:Z,modelType:"imageModel"})},K.transcription=W,K.transcriptionModel=W,K.tools=hc8,K}function u$4($){var Y,X,G,J,Q;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let{prompt_tokens:W,completion_tokens:K}=$,Z=(Q=(J=(X=$.num_cached_tokens)!=null?X:(Y=$.prompt_tokens_details)==null?void 0:Y.cached_tokens)!=null?J:(G=$.prompt_token_details)==null?void 0:G.cached_tokens)!=null?Q:0;return{inputTokens:{total:W,noCache:W-Z,cacheRead:Z||void 0,cacheWrite:void 0},outputTokens:{total:K,text:K,reasoning:void 0},raw:$}}function p$4({data:$,mediaType:Y}){return $ instanceof URL?$.toString():`data:${Y};base64,${nY($)}`}function gc8($){var Y;let X=[];for(let G=0;G<$.length;G++){let{role:J,content:Q}=$[G],W=G===$.length-1;switch(J){case"system":{X.push({role:"system",content:Q});break}case"user":{X.push({role:"user",content:Q.map((K)=>{switch(K.type){case"text":return{type:"text",text:K.text};case"file":if(K.mediaType.startsWith("image/")){let Z=K.mediaType==="image/*"?"image/jpeg":K.mediaType;return{type:"image_url",image_url:p$4({data:K.data,mediaType:Z})}}else if(K.mediaType==="application/pdf")return{type:"document_url",document_url:p$4({data:K.data,mediaType:"application/pdf"})};else throw new p5({functionality:"Only images and PDF file parts are supported"})}})});break}case"assistant":{let K="",Z=[];for(let H of Q)switch(H.type){case"text":{K+=H.text;break}case"tool-call":{Z.push({id:H.toolCallId,type:"function",function:{name:H.toolName,arguments:JSON.stringify(H.input)}});break}case"reasoning":{K+=H.text;break}default:throw Error(`Unsupported content type in assistant message: ${H.type}`)}X.push({role:"assistant",content:K,prefix:W?!0:void 0,tool_calls:Z.length>0?Z:void 0});break}case"tool":{for(let K of Q){if(K.type==="tool-approval-response")continue;let Z=K.output,H;switch(Z.type){case"text":case"error-text":H=Z.value;break;case"execution-denied":H=(Y=Z.reason)!=null?Y:"Tool execution denied.";break;case"content":case"json":case"error-json":H=JSON.stringify(Z.value);break}X.push({role:"tool",name:K.toolName,tool_call_id:K.toolCallId,content:H})}break}default:throw Error(`Unsupported role: ${J}`)}}return X}function d$4({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function c$4($){switch($){case"stop":return"stop";case"length":case"model_length":return"length";case"tool_calls":return"tool-calls";default:return"other"}}function pc8({tools:$,toolChoice:Y}){$=($==null?void 0:$.length)?$:void 0;let X=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:X};let G=[];for(let Q of $)if(Q.type==="provider")X.push({type:"unsupported",feature:`provider-defined tool ${Q.id}`});else G.push({type:"function",function:{name:Q.name,description:Q.description,parameters:Q.inputSchema,...Q.strict!=null?{strict:Q.strict}:{}}});if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:X};let J=Y.type;switch(J){case"auto":case"none":return{tools:G,toolChoice:J,toolWarnings:X};case"required":return{tools:G,toolChoice:"any",toolWarnings:X};case"tool":return{tools:G.filter((Q)=>Q.function.name===Y.toolName),toolChoice:"any",toolWarnings:X};default:throw new p5({functionality:`tool choice type: ${J}`})}}function l$4($){return $.filter((Y)=>Y.type==="text").map((Y)=>Y.text).join("")}function i$4($){if(typeof $==="string")return $;if($==null)return;let Y=[];for(let X of $){let{type:G}=X;switch(G){case"text":Y.push(X.text);break;case"thinking":case"image_url":case"reference":break;default:throw Error(`Unsupported type: ${G}`)}}return Y.length?Y.join(""):void 0}function Wb0($={}){var Y;let X=(Y=AE($.baseURL))!=null?Y:"https://api.mistral.ai/v1",G=()=>JV({Authorization:`Bearer ${DE({apiKey:$.apiKey,environmentVariableName:"MISTRAL_API_KEY",description:"Mistral"})}`,...$.headers},`ai-sdk/mistral/${rc8}`),J=(K)=>new dc8(K,{provider:"mistral.chat",baseURL:X,headers:G,fetch:$.fetch,generateId:$.generateId}),Q=(K)=>new ic8(K,{provider:"mistral.embedding",baseURL:X,headers:G,fetch:$.fetch}),W=function(K){if(new.target)throw Error("The Mistral model function cannot be called with the new keyword.");return J(K)};return W.specificationVersion="v3",W.languageModel=J,W.chat=J,W.embedding=Q,W.embeddingModel=Q,W.textEmbedding=Q,W.textEmbeddingModel=Q,W.imageModel=(K)=>{throw new FE({modelId:K,modelType:"imageModel"})},W}function ac8($){let Y=[];for(let{role:X,content:G}of $)switch(X){case"system":{Y.push({role:"system",content:G});break}case"user":case"assistant":{let J=G.some((W)=>W.type==="file"&&W.mediaType.startsWith("image/")||W.type==="file"&&W.mediaType==="application/pdf"),Q=G.map((W,K)=>{var Z;switch(W.type){case"text":return{type:"text",text:W.text};case"file":if(W.mediaType==="application/pdf")return W.data instanceof URL?{type:"file_url",file_url:{url:W.data.toString()},file_name:W.filename}:{type:"file_url",file_url:{url:typeof W.data==="string"?W.data:zm(W.data)},file_name:W.filename||`document-${K}.pdf`};else if(W.mediaType.startsWith("image/"))return W.data instanceof URL?{type:"image_url",image_url:{url:W.data.toString()}}:{type:"image_url",image_url:{url:`data:${(Z=W.mediaType)!=null?Z:"image/jpeg"};base64,${typeof W.data==="string"?W.data:zm(W.data)}`}}}}).filter(Boolean);Y.push({role:X,content:J?Q:Q.filter((W)=>W.type==="text").map((W)=>W.text).join("")});break}case"tool":throw new _9({functionality:"Tool messages"});default:throw Error(`Unsupported role: ${X}`)}return Y}function n$4($){switch($){case"stop":case"length":return $;default:return"unknown"}}function r$4({id:$,model:Y,created:X}){return{id:$,modelId:Y,timestamp:new Date(X*1000)}}function B74($={}){let Y=()=>_Q({Authorization:`Bearer ${rZ({apiKey:$.apiKey,environmentVariableName:"PERPLEXITY_API_KEY",description:"Perplexity"})}`,...$.headers},`ai-sdk/perplexity/${$l8}`),X=(J)=>{var Q;return new sc8(J,{baseURL:aZ((Q=$.baseURL)!=null?Q:"https://api.perplexity.ai"),headers:Y,generateId:_8,fetch:$.fetch})},G=(J)=>X(J);return G.languageModel=X,G.textEmbeddingModel=(J)=>{throw new LE({modelId:J,modelType:"textEmbeddingModel"})},G.imageModel=(J)=>{throw new LE({modelId:J,modelType:"imageModel"})},G}function Ql8(){if(typeof process>"u")return;if(typeof process.env.TOGETHER_API_KEY==="string")return;let $=process.env.TOGETHER_AI_API_KEY;if(typeof $==="string")console.warn("TOGETHER_AI_API_KEY is deprecated and will be removed in a future release. Please use TOGETHER_API_KEY instead.");return $}function O74($={}){var Y;let X=aZ((Y=$.baseURL)!=null?Y:"https://api.together.xyz/v1/"),G=()=>{var z;return _Q({Authorization:`Bearer ${rZ({apiKey:(z=$.apiKey)!=null?z:Ql8(),environmentVariableName:"TOGETHER_API_KEY",description:"TogetherAI"})}`,...$.headers},`ai-sdk/togetherai/${Jl8}`)},J=(z)=>({provider:`togetherai.${z}`,url:({path:V})=>`${X}${V}`,headers:G,fetch:$.fetch}),Q=(z)=>{return new Vm(z,J("chat"))},W=(z)=>new f90(z,J("completion")),K=(z)=>new g90(z,J("embedding")),Z=(z)=>new Yl8(z,{...J("image"),baseURL:X!=null?X:"https://api.together.xyz/v1/"}),H=(z)=>Q(z);return H.completionModel=W,H.languageModel=Q,H.chatModel=Q,H.textEmbeddingModel=K,H.image=Z,H.imageModel=Z,H}function Wl8($){var Y;let X=[],G=[];for(let{role:J,content:Q}of $)switch(J){case"system":{X.push({role:"system",content:Q});break}case"user":{if(Q.length===1&&Q[0].type==="text"){X.push({role:"user",content:Q[0].text});break}X.push({role:"user",content:Q.map((W)=>{switch(W.type){case"text":return{type:"text",text:W.text};case"file":if(W.mediaType.startsWith("image/")){let K=W.mediaType==="image/*"?"image/jpeg":W.mediaType;return{type:"image_url",image_url:{url:W.data instanceof URL?W.data.toString():`data:${K};base64,${nY(W.data)}`}}}else throw new p5({functionality:`file part media type ${W.mediaType}`})}})});break}case"assistant":{let W="",K=[];for(let Z of Q)switch(Z.type){case"text":{W+=Z.text;break}case"tool-call":{K.push({id:Z.toolCallId,type:"function",function:{name:Z.toolName,arguments:JSON.stringify(Z.input)}});break}}X.push({role:"assistant",content:W,tool_calls:K.length>0?K:void 0});break}case"tool":{for(let W of Q){if(W.type==="tool-approval-response")continue;let K=W.output,Z;switch(K.type){case"text":case"error-text":Z=K.value;break;case"execution-denied":Z=(Y=K.reason)!=null?Y:"Tool execution denied.";break;case"content":case"json":case"error-json":Z=JSON.stringify(K.value);break}X.push({role:"tool",tool_call_id:W.toolCallId,content:Z})}break}default:throw Error(`Unsupported role: ${J}`)}return{messages:X,warnings:G}}function o$4($){var Y,X,G,J;let Q=(X=(Y=$.prompt_tokens_details)==null?void 0:Y.cached_tokens)!=null?X:0,W=(J=(G=$.completion_tokens_details)==null?void 0:G.reasoning_tokens)!=null?J:0,K=Q<=$.prompt_tokens;return{inputTokens:{total:K?$.prompt_tokens:$.prompt_tokens+Q,noCache:K?$.prompt_tokens-Q:$.prompt_tokens,cacheRead:Q,cacheWrite:void 0},outputTokens:{total:$.completion_tokens+W,text:$.completion_tokens,reasoning:W},raw:$}}function r90({id:$,model:Y,created:X,created_at:G}){let J=X!=null?X:G;return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:J!=null?new Date(J*1000):void 0}}function t$4($){switch($){case"stop":return"stop";case"length":return"length";case"tool_calls":case"function_call":return"tool-calls";case"content_filter":return"content-filter";default:return"other"}}function Ll8({tools:$,toolChoice:Y}){$=($==null?void 0:$.length)?$:void 0;let X=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:X};let G=[];for(let Q of $)if(Q.type==="provider")X.push({type:"unsupported",feature:`provider-defined tool ${Q.name}`});else G.push({type:"function",function:{name:Q.name,description:Q.description,parameters:Q.inputSchema,...Q.strict!=null?{strict:Q.strict}:{}}});if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:X};let J=Y.type;switch(J){case"auto":case"none":return{tools:G,toolChoice:J,toolWarnings:X};case"required":return{tools:G,toolChoice:"required",toolWarnings:X};case"tool":return{tools:G,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:X};default:throw new p5({functionality:`tool choice type: ${J}`})}}async function Rl8({prompt:$}){var Y,X,G,J,Q,W,K,Z,H;let z=[],V=[];for(let F of $)switch(F.role){case"system":{z.push({role:"system",content:F.content});break}case"user":{let L=[];for(let N of F.content)switch(N.type){case"text":{L.push({type:"input_text",text:N.text});break}case"file":{if(N.mediaType.startsWith("image/")){let D=N.mediaType==="image/*"?"image/jpeg":N.mediaType,A=N.data instanceof URL?N.data.toString():`data:${D};base64,${nY(N.data)}`;L.push({type:"input_image",image_url:A})}else if(N.data instanceof URL)L.push({type:"input_file",file_url:N.data.toString()});else throw new p5({functionality:`file part media type ${N.mediaType} as inline data (xAI Responses requires a URL or a Files API reference for non-image files)`});break}default:V.push({type:"other",message:"xAI Responses API does not support this content type in user messages"})}z.push({role:"user",content:L});break}case"assistant":{for(let L of F.content)switch(L.type){case"text":{let N=typeof((X=(Y=L.providerOptions)==null?void 0:Y.xai)==null?void 0:X.itemId)==="string"?L.providerOptions.xai.itemId:void 0;z.push({role:"assistant",content:L.text,id:N});break}case"tool-call":{if(L.providerExecuted)break;let N=typeof((J=(G=L.providerOptions)==null?void 0:G.xai)==null?void 0:J.itemId)==="string"?L.providerOptions.xai.itemId:void 0;z.push({type:"function_call",id:N!=null?N:L.toolCallId,call_id:L.toolCallId,name:L.toolName,arguments:JSON.stringify(L.input),status:"completed"});break}case"tool-result":break;case"reasoning":{let N=typeof((W=(Q=L.providerOptions)==null?void 0:Q.xai)==null?void 0:W.itemId)==="string"?L.providerOptions.xai.itemId:void 0,D=typeof((Z=(K=L.providerOptions)==null?void 0:K.xai)==null?void 0:Z.reasoningEncryptedContent)==="string"?L.providerOptions.xai.reasoningEncryptedContent:void 0;if(N!=null||D!=null){let A=[];if(L.text.length>0)A.push({type:"summary_text",text:L.text});z.push({type:"reasoning",id:N!=null?N:"",summary:A,status:"completed",...D!=null&&{encrypted_content:D}})}else V.push({type:"other",message:"Reasoning parts without itemId or encrypted content cannot be sent back to xAI. Skipping."});break}case"file":{V.push({type:"other",message:`xAI Responses API does not support ${L.type} in assistant messages`});break}default:V.push({type:"other",message:"xAI Responses API does not support this content type in assistant messages"})}break}case"tool":{for(let L of F.content){if(L.type==="tool-approval-response")continue;let N=L.output,D;switch(N.type){case"text":case"error-text":D=N.value;break;case"execution-denied":D=(H=N.reason)!=null?H:"tool execution denied";break;case"json":case"error-json":D=JSON.stringify(N.value);break;case"content":D=N.value.map((A)=>{if(A.type==="text")return A.text;return""}).join("");break;default:D=""}z.push({type:"function_call_output",call_id:L.toolCallId,output:D})}break}default:V.push({type:"other",message:"unsupported message role"})}return{input:z,inputWarnings:V}}function $b0($){var Y,X,G,J;let Q=(X=(Y=$.input_tokens_details)==null?void 0:Y.cached_tokens)!=null?X:0,W=(J=(G=$.output_tokens_details)==null?void 0:G.reasoning_tokens)!=null?J:0,K=Q<=$.input_tokens;return{inputTokens:{total:K?$.input_tokens:$.input_tokens+Q,noCache:K?$.input_tokens-Q:$.input_tokens,cacheRead:Q,cacheWrite:void 0},outputTokens:{total:$.output_tokens,text:$.output_tokens-W,reasoning:W},raw:$}}function l90($){switch($){case"stop":case"completed":return"stop";case"length":case"max_output_tokens":return"length";case"tool_calls":case"function_call":return"tool-calls";case"content_filter":return"content-filter";default:return"other"}}async function pl8({tools:$,toolChoice:Y}){let X=($==null?void 0:$.length)?$:void 0,G=[];if(X==null)return{tools:void 0,toolChoice:void 0,toolWarnings:G};let J=[],Q=new Map;for(let K of X)if(Q.set(K.name,K),K.type==="provider")switch(K.id){case"xai.web_search":{let Z=await w8({value:K.args,schema:xl8});J.push({type:"web_search",allowed_domains:Z.allowedDomains,excluded_domains:Z.excludedDomains,enable_image_understanding:Z.enableImageUnderstanding});break}case"xai.x_search":{let Z=await w8({value:K.args,schema:fl8});J.push({type:"x_search",allowed_x_handles:Z.allowedXHandles,excluded_x_handles:Z.excludedXHandles,from_date:Z.fromDate,to_date:Z.toDate,enable_image_understanding:Z.enableImageUnderstanding,enable_video_understanding:Z.enableVideoUnderstanding});break}case"xai.code_execution":{J.push({type:"code_interpreter"});break}case"xai.view_image":{J.push({type:"view_image"});break}case"xai.view_x_video":{J.push({type:"view_x_video"});break}case"xai.file_search":{let Z=await w8({value:K.args,schema:_l8});J.push({type:"file_search",vector_store_ids:Z.vectorStoreIds,max_num_results:Z.maxNumResults});break}case"xai.mcp":{let Z=await w8({value:K.args,schema:Cl8});J.push({type:"mcp",server_url:Z.serverUrl,server_label:Z.serverLabel,server_description:Z.serverDescription,allowed_tools:Z.allowedTools,headers:Z.headers,authorization:Z.authorization});break}default:{G.push({type:"unsupported",feature:`provider-defined tool ${K.name}`});break}}else J.push({type:"function",name:K.name,description:K.description,parameters:K.inputSchema,...K.strict!=null?{strict:K.strict}:{}});if(Y==null)return{tools:J,toolChoice:void 0,toolWarnings:G};let W=Y.type;switch(W){case"auto":case"none":return{tools:J,toolChoice:W,toolWarnings:G};case"required":return{tools:J,toolChoice:"required",toolWarnings:G};case"tool":{let K=Q.get(Y.toolName);if(K==null)return{tools:J,toolChoice:void 0,toolWarnings:G};if(K.type==="provider")return G.push({type:"unsupported",feature:`toolChoice for server-side tool "${K.name}"`}),{tools:J,toolChoice:void 0,toolWarnings:G};return{tools:J,toolChoice:{type:"function",name:K.name},toolWarnings:G}}default:throw new p5({functionality:`tool choice type: ${W}`})}}function Hi8($){if(($==null?void 0:$.mode)!=null)return $.mode;if(($==null?void 0:$.videoUrl)!=null)return"edit-video";if(($==null?void 0:$.referenceImageUrls)!=null&&$.referenceImageUrls.length>0)return"reference-to-video";return}function M74($={}){var Y;let X=AE((Y=$.baseURL)!=null?Y:"https://api.x.ai/v1"),G=()=>JV({Authorization:`Bearer ${DE({apiKey:$.apiKey,environmentVariableName:"XAI_API_KEY",description:"xAI API key"})}`,...$.headers},`ai-sdk/xai/${$i8}`),J=(H)=>{return new Dl8(H,{provider:"xai.chat",baseURL:X,headers:G,generateId:X9,fetch:$.fetch})},Q=(H)=>{return new dl8(H,{provider:"xai.responses",baseURL:X,headers:G,generateId:X9,fetch:$.fetch})},W=(H)=>{return new El8(H,{provider:"xai.image",baseURL:X,headers:G,fetch:$.fetch})},K=(H)=>{return new zi8(H,{provider:"xai.video",baseURL:X,headers:G,fetch:$.fetch})},Z=(H)=>J(H);return Z.specificationVersion="v3",Z.languageModel=J,Z.chat=J,Z.responses=Q,Z.embeddingModel=(H)=>{throw new FE({modelId:H,modelType:"embeddingModel"})},Z.textEmbeddingModel=Z.embeddingModel,Z.imageModel=W,Z.image=W,Z.videoModel=K,Z.video=K,Z.tools=el8,Z}function C74($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function Yb0($){}function xi8($){if(typeof $=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:Y=Yb0,onError:X=Yb0,onRetry:G=Yb0,onComment:J}=$,Q="",W=!0,K,Z="",H="";function z(D){let A=W?D.replace(/^\xEF\xBB\xBF/,""):D,[B,O]=yi8(`${Q}${A}`);for(let E of B)V(E);Q=O,W=!1}function V(D){if(D===""){L();return}if(D.startsWith(":")){J&&J(D.slice(D.startsWith(": ")?2:1));return}let A=D.indexOf(":");if(A!==-1){let B=D.slice(0,A),O=D[A+1]===" "?2:1,E=D.slice(A+O);F(B,E,D);return}F(D,"",D)}function F(D,A,B){switch(D){case"event":H=A;break;case"data":Z=`${Z}${A}
`;break;case"id":K=A.includes("\x00")?void 0:A;break;case"retry":/^\d+$/.test(A)?G(parseInt(A,10)):X(new Y74(`Invalid \`retry\` value: "${A}"`,{type:"invalid-retry",value:A,line:B}));break;default:X(new Y74(`Unknown field "${D.length>20?`${D.slice(0,20)}\u2026`:D}"`,{type:"unknown-field",field:D,value:A,line:B}));break}}function L(){Z.length>0&&Y({id:K,event:H||void 0,data:Z.endsWith(`
`)?Z.slice(0,-1):Z}),K=void 0,Z="",H=""}function N(D={}){Q&&D.consume&&V(Q),W=!0,K=void 0,Z="",H="",Q=""}return{feed:z,reset:N}}function yi8($){let Y=[],X="",G=0;for(;G<$.length;){let J=$.indexOf("\r",G),Q=$.indexOf(`
`,G),W=-1;if(J!==-1&&Q!==-1?W=Math.min(J,Q):J!==-1?W=J:Q!==-1&&(W=Q),W===-1){X=$.slice(G);break}else{let K=$.slice(G,W);Y.push(K),G=W+1,$[G-1]==="\r"&&$[G]===`
`&&G++}}return[Y,X]}function s90(...$){return $.reduce((Y,X)=>h$(h$({},Y),X!=null?X:{}),{})}function $50($){return Object.fromEntries([...$.headers])}function Vb0($){return($ instanceof Error||$ instanceof DOMException)&&($.name==="AbortError"||$.name==="ResponseAborted"||$.name==="TimeoutError")}function gi8({error:$,url:Y,requestBodyValues:X}){if(Vb0($))return $;if($ instanceof TypeError&&fi8.includes($.message.toLowerCase())){let G=$.cause;if(G!=null)return new tZ({message:`Cannot connect to API: ${G.message}`,cause:G,url:Y,requestBodyValues:X,isRetryable:!0})}return $}function mi8($){return Object.fromEntries(Object.entries($).filter(([Y,X])=>X!=null))}function ui8({apiKey:$,environmentVariableName:Y,apiKeyParameterName:X="apiKey",description:G}){if(typeof $==="string")return $;if($!=null)throw new i90({message:`${G} API key must be a string.`});if(typeof process>"u")throw new i90({message:`${G} API key is missing. Pass it using the '${X}' parameter. Environment variables is not supported in this environment.`});if($=process.env[Y],$==null)throw new i90({message:`${G} API key is missing. Pass it using the '${X}' parameter or the ${Y} environment variable.`});if(typeof $!=="string")throw new i90({message:`${G} API key must be a string. The value of the ${Y} environment variable is not a string.`});return $}function ci8($){let Y=JSON.parse($);if(Y===null||typeof Y!=="object")return Y;if(pi8.test($)===!1&&di8.test($)===!1)return Y;return li8(Y)}function li8($){let Y=[$];while(Y.length){let X=Y;Y=[];for(let G of X){if(Object.prototype.hasOwnProperty.call(G,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(G,"constructor")&&Object.prototype.hasOwnProperty.call(G.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let J in G){let Q=G[J];if(Q&&typeof Q==="object")Y.push(Q)}}}return $}function Lb0($){let{stackTraceLimit:Y}=Error;Error.stackTraceLimit=0;try{return ci8($)}finally{Error.stackTraceLimit=Y}}function ii8($){return{[Fb0]:!0,validate:$}}function ni8($){return typeof $==="object"&&$!==null&&Fb0 in $&&$[Fb0]===!0&&"validate"in $}function ri8($){return ni8($)?$:ai8($)}function ai8($){return ii8(async(Y)=>{let X=await $["~standard"].validate(Y);return X.issues==null?{success:!0,value:X.value}:{success:!1,error:new Em({value:Y,cause:X.issues})}})}async function si8({value:$,schema:Y}){let X=await GY4({value:$,schema:Y});if(!X.success)throw Em.wrap({value:$,cause:X.error});return X.value}async function GY4({value:$,schema:Y}){let X=ri8(Y);try{if(X.validate==null)return{success:!0,value:$,rawValue:$};let G=await X.validate($);if(G.success)return{success:!0,value:G.value,rawValue:$};return{success:!1,error:Em.wrap({value:$,cause:G.error}),rawValue:$}}catch(G){return{success:!1,error:Em.wrap({value:$,cause:G}),rawValue:$}}}async function oi8({text:$,schema:Y}){try{let X=Lb0($);if(Y==null)return X;return si8({value:X,schema:Y})}catch(X){if(a90.isInstance(X)||Em.isInstance(X))throw X;throw new a90({text:$,cause:X})}}async function JY4({text:$,schema:Y}){try{let X=Lb0($);if(Y==null)return{success:!0,value:X,rawValue:X};return await GY4({value:X,schema:Y})}catch(X){return{success:!1,error:a90.isInstance(X)?X:new a90({text:$,cause:X}),rawValue:void 0}}}function Xb0($){try{return Lb0($),!0}catch(Y){return!1}}function ti8({stream:$,schema:Y}){return $.pipeThrough(new TextDecoderStream).pipeThrough(new bi8).pipeThrough(new TransformStream({async transform({data:X},G){if(X==="[DONE]")return;G.enqueue(await JY4({text:X,schema:Y}))}}))}function Gn8($){let Y="";for(let X=0;X<$.length;X++)Y+=String.fromCodePoint($[X]);return Xn8(Y)}function Jn8($){return $==null?void 0:$.replace(/\/$/,"")}function Gb0($){return $!==null&&$!==void 0}function e90($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"unknown"}}function ZY4({url:$,protocols:Y}){try{let X=new URL($);return Y.has(X.protocol)}catch(X){return!1}}function X74({part:$,defaultMediaType:Y}){var X,G;if($.data instanceof Uint8Array){let Q=Gn8($.data);return`data:${(X=$.mediaType)!=null?X:Y};base64,${Q}`}let J=$.data.toString();if(ZY4({url:J,protocols:new Set(["http:","https:"])}))return J;return J.startsWith("data:")?J:`data:${(G=$.mediaType)!=null?G:Y};base64,${J}`}function G74($,Y){var X;let G=$.match(/^data:([^;]+)/);return G?(X=G[1])!=null?X:Y:Y}function J74($){let Y=$.match(/^data:[^;]*;base64,(.+)$/);return Y?Y[1]:$}function OD($){var Y,X,G;let J=$==null?void 0:$.anthropic,Q=$==null?void 0:$.openrouter;return(G=(X=(Y=Q==null?void 0:Q.cacheControl)!=null?Y:Q==null?void 0:Q.cache_control)!=null?X:J==null?void 0:J.cacheControl)!=null?G:J==null?void 0:J.cache_control}function Hn8($){var Y,X,G,J,Q;let W=[];for(let{role:K,content:Z,providerOptions:H}of $)switch(K){case"system":{W.push({role:"system",content:Z,cache_control:OD(H)});break}case"user":{if(Z.length===1&&((Y=Z[0])==null?void 0:Y.type)==="text"){let F=(X=OD(H))!=null?X:OD(Z[0].providerOptions),L=F?[{type:"text",text:Z[0].text,cache_control:F}]:Z[0].text;W.push({role:"user",content:L});break}let z=OD(H),V=Z.map((F)=>{var L,N,D,A,B,O;let E=(L=OD(F.providerOptions))!=null?L:z;switch(F.type){case"text":return{type:"text",text:F.text,cache_control:E};case"file":{if((N=F.mediaType)==null?void 0:N.startsWith("image/"))return{type:"image_url",image_url:{url:X74({part:F,defaultMediaType:"image/jpeg"})},cache_control:E};let M=String((O=(B=(A=(D=F.providerOptions)==null?void 0:D.openrouter)==null?void 0:A.filename)!=null?B:F.filename)!=null?O:""),R=X74({part:F,defaultMediaType:"application/pdf"});if(ZY4({url:R,protocols:new Set(["http:","https:"])}))return{type:"file",file:{filename:M,file_data:R}};return{type:"file",file:{filename:M,file_data:R},cache_control:E}}default:return{type:"text",text:"",cache_control:E}}});W.push({role:"user",content:V});break}case"assistant":{let z="",V="",F=[];for(let D of Z)switch(D.type){case"text":{z+=D.text;break}case"tool-call":{F.push({id:D.toolCallId,type:"function",function:{name:D.toolName,arguments:JSON.stringify(D.input)}});break}case"reasoning":{V+=D.text;break}}let L=Un8.safeParse(H),N=L.success?(J=(G=L.data)==null?void 0:G.openrouter)==null?void 0:J.reasoning_details:void 0;W.push({role:"assistant",content:z,tool_calls:F.length>0?F:void 0,reasoning:V||void 0,reasoning_details:N&&Array.isArray(N)&&N.length>0?N:void 0,cache_control:OD(H)});break}case"tool":{for(let z of Z){let V=zn8(z);W.push({role:"tool",tool_call_id:z.toolCallId,content:V,cache_control:(Q=OD(H))!=null?Q:OD(z.providerOptions)})}break}}return W}function zn8($){return $.output.type==="text"?$.output.value:JSON.stringify($.output.value)}function Vn8($){switch($.type){case"auto":case"none":case"required":return $.type;case"tool":return{type:"function",function:{name:$.toolName}};default:throw new x74({argument:"toolChoice",message:`Invalid tool choice type: ${JSON.stringify($)}`})}}function Bn8({prompt:$,inputFormat:Y,user:X="user",assistant:G="assistant"}){if($.length===1&&$[0]&&$[0].role==="user"&&$[0].content.length===1&&$[0].content[0]&&$[0].content[0].type==="text")return{prompt:$[0].content[0].text};let J="";if($[0]&&$[0].role==="system")J+=`${$[0].content}

`,$=$.slice(1);for(let{role:Q,content:W}of $)switch(Q){case"system":throw new _i8({message:`Unexpected system message in prompt: ${W}`,prompt:$});case"user":{let K=W.map((Z)=>{switch(Z.type){case"text":return Z.text;case"file":throw new ED({functionality:"file attachments"});default:return""}}).join("");J+=`${X}:
${K}

`;break}case"assistant":{let K=W.map((Z)=>{switch(Z.type){case"text":return Z.text;case"tool-call":throw new ED({functionality:"tool-call messages"});case"tool-result":throw new ED({functionality:"tool-result messages"});case"reasoning":throw new ED({functionality:"reasoning messages"});case"file":throw new ED({functionality:"file attachments"});default:return""}}).join("");J+=`${G}:
${K}

`;break}case"tool":throw new ED({functionality:"tool messages"})}return J+=`${G}:
`,{prompt:J}}function En8($){return Object.fromEntries(Object.entries($).filter(([,Y])=>Y!==null))}function Mn8($,...Y){let X=En8($!=null?$:{}),J=[X["user-agent"]||"",...Y].filter(Boolean).join(" ");return Om(h$({},X),{"user-agent":J})}function Rm($={}){var Y,X,G;let J=(X=Jn8((Y=$.baseURL)!=null?Y:$.baseUrl))!=null?X:"https://openrouter.ai/api/v1",Q=(G=$.compatibility)!=null?G:"compatible",W=()=>Mn8(h$({Authorization:`Bearer ${ui8({apiKey:$.apiKey,environmentVariableName:"OPENROUTER_API_KEY",description:"OpenRouter"})}`},$.headers),`ai-sdk/openrouter/${Rn8}`),K=(V,F={})=>new An8(V,F,{provider:"openrouter.chat",url:({path:L})=>`${J}${L}`,headers:W,compatibility:Q,fetch:$.fetch,extraBody:$.extraBody}),Z=(V,F={})=>new On8(V,F,{provider:"openrouter.completion",url:({path:L})=>`${J}${L}`,headers:W,compatibility:Q,fetch:$.fetch,extraBody:$.extraBody}),H=(V,F)=>{if(new.target)throw Error("The OpenRouter model function cannot be called with the new keyword.");if(V==="openai/gpt-3.5-turbo-instruct")return Z(V,F);return K(V,F)},z=(V,F)=>H(V,F);return z.languageModel=H,z.chat=K,z.completion=Z,z}function QT($,Y){if(Y&&!$.startsWith(`${Y}/`))throw Error(`Expected ${Y}/ in model router ID ${$}`);let X=$.split("/");if(Y==="azure-openai"){if(X.length<2)throw Error(`Expected format azure-openai/deployment-name, but got ${$}`);return{providerId:"azure-openai",modelId:X.slice(1).join("/")}}if(Y&&X.length<3)throw Error(`Expected atleast 3 id parts ${Y}/provider/model, but only saw ${X.length} in ${$}`);let G=X.at(Y?1:0),J=X.slice(Y?2:1).join("/");if(!$.includes("/")||!G||!J)throw Error(`Attempted to parse provider/model from ${$} but this ID doesn't appear to contain a provider`);return{providerId:G,modelId:J}}function qn8({envVars:$,providerId:Y}){let X=`${Y.toUpperCase().replace(/-/g,"_")}_API_KEY`;if(!$?.length)return X;let G=["_API_TOKEN","_API_KEY","_TOKEN","_KEY","_PAT"];for(let J of G){let Q=$.find((W)=>W.endsWith(J));if(Q)return Q}return $[0]||X}function Pn8($,Y){return $.replace(/\$\{([^}]+)\}/g,(X,G)=>{let J=G.trim(),Q=Y?.[J]??process.env[J];if(Q===void 0||Q===null)throw Error(`Missing environment variable ${G} required to build provider URL`);return Q})}var Hc8="1.0.44",zc8,Vc8,Fc8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2",this.maxImagesPerCall=1}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,providerOptions:Q,headers:W,abortSignal:K}){var Z,H,z,V;let F=[],L=X==null?void 0:X.split("x"),N=(z=(H=(Z=this.config._internal)==null?void 0:Z.currentDate)==null?void 0:H.call(Z))!=null?z:new Date,{value:D,responseHeaders:A}=await G8({url:`${this.config.baseURL}/${this.modelId}`,headers:o6(this.config.headers(),W),body:{prompt:$,num_images:Y,...G&&{aspect_ratio:G},...L&&{width:L[0],height:L[1]},...J!=null&&{seed:J},...(V=Q.deepinfra)!=null?V:{}},failedResponseHandler:zJ({errorSchema:Lc8,errorToMessage:(B)=>B.detail.error}),successfulResponseHandler:C5(Dc8),abortSignal:K,fetch:this.config.fetch});return{images:D.images.map((B)=>B.replace(/^data:image\/\w+;base64,/,"")),warnings:F,response:{timestamp:N,modelId:this.modelId,headers:A}}}},Lc8,Dc8,Nc8,Ac8="1.0.42",Z74,U74,Oc8,Ec8,Mc8,qc8=class{constructor($,Y){this.specificationVersion="v2",this.supportedUrls={},this.modelId=$,this.config=Y,this.failedResponseHandler=zJ({errorSchema:U74,errorToMessage:(X)=>X.error.message})}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,providerOptions:K,stopSequences:Z,responseFormat:H,tools:z,toolChoice:V,seed:F}){var L,N;let D=(L=await j9({provider:this.providerOptionsName,providerOptions:K,schema:Mc8}))!=null?L:{},{messages:A,warnings:B}=Bc8({prompt:$,responseFormat:H,modelId:this.modelId});if(J!=null)B.push({type:"unsupported-setting",setting:"topK"});if(F!=null)B.push({type:"unsupported-setting",setting:"seed"});let{tools:O,toolChoice:E,toolWarnings:M}=Rc8({tools:z,toolChoice:V}),R=((N=D.thinking)==null?void 0:N.type)!=null?{type:D.thinking.type}:void 0;return{args:{model:this.modelId,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,response_format:(H==null?void 0:H.type)==="json"?{type:"json_object"}:void 0,stop:Z,messages:A,tools:O,tool_choice:E,thinking:R,...(R==null?void 0:R.type)!=="disabled"&&D.reasoningEffort!=null&&{reasoning_effort:D.reasoningEffort}},warnings:[...B,...M]}}async doGenerate($){var Y,X,G,J,Q,W,K,Z,H,z,V,F,L,N,D,A;let{args:B,warnings:O}=await this.getArgs({...$}),{responseHeaders:E,value:M,rawValue:R}=await G8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:B,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:C5(Oc8),abortSignal:$.abortSignal,fetch:this.config.fetch}),q=M.choices[0],_=[],P=q.message.reasoning_content;if(P!=null&&P.length>0)_.push({type:"reasoning",text:P});if(q.message.tool_calls!=null)for(let j of q.message.tool_calls)_.push({type:"tool-call",toolCallId:(Y=j.id)!=null?Y:_8(),toolName:j.function.name,input:j.function.arguments});let w=q.message.content;if(w!=null&&w.length>0)_.push({type:"text",text:w});return{content:_,finishReason:h$4(q.finish_reason),usage:{inputTokens:(G=(X=M.usage)==null?void 0:X.prompt_tokens)!=null?G:void 0,outputTokens:(Q=(J=M.usage)==null?void 0:J.completion_tokens)!=null?Q:void 0,totalTokens:(K=(W=M.usage)==null?void 0:W.total_tokens)!=null?K:void 0,reasoningTokens:(z=(H=(Z=M.usage)==null?void 0:Z.completion_tokens_details)==null?void 0:H.reasoning_tokens)!=null?z:void 0,cachedInputTokens:(F=(V=M.usage)==null?void 0:V.prompt_cache_hit_tokens)!=null?F:void 0},providerMetadata:{[this.providerOptionsName]:{promptCacheHitTokens:(N=(L=M.usage)==null?void 0:L.prompt_cache_hit_tokens)!=null?N:null,promptCacheMissTokens:(A=(D=M.usage)==null?void 0:D.prompt_cache_miss_tokens)!=null?A:null}},request:{body:B},response:{...b$4(M),headers:E,body:R},warnings:O}}async doStream($){let{args:Y,warnings:X}=await this.getArgs({...$}),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:Q}=await G8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:G,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:jQ(Ec8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W=[],K="unknown",Z=void 0,H=!0,z=this.providerOptionsName,V=!1,F=!1;return{stream:Q.pipeThrough(new TransformStream({start(L){L.enqueue({type:"stream-start",warnings:X})},transform(L,N){var D,A,B,O,E,M,R,q,_,P,w,j;if($.includeRawChunks)N.enqueue({type:"raw",rawValue:L.rawValue});if(!L.success){K="error",N.enqueue({type:"error",error:L.error});return}let C=L.value;if("error"in C){K="error",N.enqueue({type:"error",error:C.error.message});return}if(H)H=!1,N.enqueue({type:"response-metadata",...b$4(C)});if(C.usage!=null)Z=C.usage;let k=C.choices[0];if((k==null?void 0:k.finish_reason)!=null)K=h$4(k.finish_reason);if((k==null?void 0:k.delta)==null)return;let S=k.delta,I=S.reasoning_content;if(I){if(!V)N.enqueue({type:"reasoning-start",id:"reasoning-0"}),V=!0;N.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:I})}if(S.content){if(!F)N.enqueue({type:"text-start",id:"txt-0"}),F=!0;if(V)N.enqueue({type:"reasoning-end",id:"reasoning-0"}),V=!1;N.enqueue({type:"text-delta",id:"txt-0",delta:S.content})}if(S.tool_calls!=null){if(V)N.enqueue({type:"reasoning-end",id:"reasoning-0"}),V=!1;for(let v of S.tool_calls){let x=v.index;if(W[x]==null){if(v.id==null)throw new s2({data:v,message:"Expected 'id' to be a string."});if(((D=v.function)==null?void 0:D.name)==null)throw new s2({data:v,message:"Expected 'function.name' to be a string."});N.enqueue({type:"tool-input-start",id:v.id,toolName:v.function.name}),W[x]={id:v.id,type:"function",function:{name:v.function.name,arguments:(A=v.function.arguments)!=null?A:""},hasFinished:!1};let d=W[x];if(((B=d.function)==null?void 0:B.name)!=null&&((O=d.function)==null?void 0:O.arguments)!=null){if(d.function.arguments.length>0)N.enqueue({type:"tool-input-delta",id:d.id,delta:d.function.arguments});if(iZ(d.function.arguments))N.enqueue({type:"tool-input-end",id:d.id}),N.enqueue({type:"tool-call",toolCallId:(E=d.id)!=null?E:_8(),toolName:d.function.name,input:d.function.arguments}),d.hasFinished=!0}continue}let y=W[x];if(y.hasFinished)continue;if(((M=v.function)==null?void 0:M.arguments)!=null)y.function.arguments+=(q=(R=v.function)==null?void 0:R.arguments)!=null?q:"";if(N.enqueue({type:"tool-input-delta",id:y.id,delta:(_=v.function.arguments)!=null?_:""}),((P=y.function)==null?void 0:P.name)!=null&&((w=y.function)==null?void 0:w.arguments)!=null&&iZ(y.function.arguments))N.enqueue({type:"tool-input-end",id:y.id}),N.enqueue({type:"tool-call",toolCallId:(j=y.id)!=null?j:_8(),toolName:y.function.name,input:y.function.arguments}),y.hasFinished=!0}}},flush(L){var N,D,A,B,O,E,M,R,q;if(V)L.enqueue({type:"reasoning-end",id:"reasoning-0"});if(F)L.enqueue({type:"text-end",id:"txt-0"});for(let _ of W.filter((P)=>!P.hasFinished))L.enqueue({type:"tool-input-end",id:_.id}),L.enqueue({type:"tool-call",toolCallId:(N=_.id)!=null?N:_8(),toolName:_.function.name,input:_.function.arguments});L.enqueue({type:"finish",finishReason:K,usage:{inputTokens:(D=Z==null?void 0:Z.prompt_tokens)!=null?D:void 0,outputTokens:(A=Z==null?void 0:Z.completion_tokens)!=null?A:void 0,totalTokens:(B=Z==null?void 0:Z.total_tokens)!=null?B:void 0,reasoningTokens:(E=(O=Z==null?void 0:Z.completion_tokens_details)==null?void 0:O.reasoning_tokens)!=null?E:void 0,cachedInputTokens:(M=Z==null?void 0:Z.prompt_cache_hit_tokens)!=null?M:void 0},providerMetadata:{[z]:{promptCacheHitTokens:(R=Z==null?void 0:Z.prompt_cache_hit_tokens)!=null?R:null,promptCacheMissTokens:(q=Z==null?void 0:Z.prompt_cache_miss_tokens)!=null?q:null}}})}})),request:{body:G},response:{headers:J}}}},Pc8="1.0.40",_c8,z74,Jb0,V74,Cc8=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:K,responseFormat:Z,seed:H,stream:z,tools:V,toolChoice:F,providerOptions:L}){var N,D,A;let B=[],O=await w9({provider:"groq",providerOptions:L,schema:_c8}),E=(N=O==null?void 0:O.structuredOutputs)!=null?N:!0,M=(D=O==null?void 0:O.strictJsonSchema)!=null?D:!0;if(J!=null)B.push({type:"unsupported",feature:"topK"});if((Z==null?void 0:Z.type)==="json"&&Z.schema!=null&&!E)B.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:R,toolChoice:q,toolWarnings:_}=Ic8({tools:V,toolChoice:F,modelId:this.modelId});return{args:{model:this.modelId,user:O==null?void 0:O.user,parallel_tool_calls:O==null?void 0:O.parallelToolCalls,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,stop:K,seed:H,response_format:(Z==null?void 0:Z.type)==="json"?E&&Z.schema!=null?{type:"json_schema",json_schema:{schema:Z.schema,strict:M,name:(A=Z.name)!=null?A:"response",description:Z.description}}:{type:"json_object"}:void 0,reasoning_format:O==null?void 0:O.reasoningFormat,reasoning_effort:O==null?void 0:O.reasoningEffort,service_tier:O==null?void 0:O.serviceTier,messages:wc8($),tools:R,tool_choice:q},warnings:[...B,..._]}}async doGenerate($){var Y,X;let{args:G,warnings:J}=await this.getArgs({...$,stream:!1}),Q=JSON.stringify(G),{responseHeaders:W,value:K,rawValue:Z}=await G9({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),body:G,failedResponseHandler:Jb0,successfulResponseHandler:I5(Sc8),abortSignal:$.abortSignal,fetch:this.config.fetch}),H=K.choices[0],z=[],V=H.message.content;if(V!=null&&V.length>0)z.push({type:"text",text:V});let F=H.message.reasoning;if(F!=null&&F.length>0)z.push({type:"reasoning",text:F});if(H.message.tool_calls!=null)for(let L of H.message.tool_calls)z.push({type:"tool-call",toolCallId:(Y=L.id)!=null?Y:X9(),toolName:L.function.name,input:L.function.arguments});return{content:z,finishReason:{unified:m$4(H.finish_reason),raw:(X=H.finish_reason)!=null?X:void 0},usage:f$4(K.usage),response:{...g$4(K),headers:W,body:Z},warnings:J,request:{body:Q}}}async doStream($){let{args:Y,warnings:X}=await this.getArgs({...$,stream:!0}),G=JSON.stringify({...Y,stream:!0}),{responseHeaders:J,value:Q}=await G9({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),body:{...Y,stream:!0},failedResponseHandler:Jb0,successfulResponseHandler:sZ(kc8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W=[],K={unified:"other",raw:void 0},Z=void 0,H=!0,z=!1,V=!1;return{stream:Q.pipeThrough(new TransformStream({start(F){F.enqueue({type:"stream-start",warnings:X})},transform(F,L){var N,D,A,B,O,E,M,R,q,_,P,w,j;if($.includeRawChunks)L.enqueue({type:"raw",rawValue:F.rawValue});if(!F.success){K={unified:"error",raw:void 0},L.enqueue({type:"error",error:F.error});return}let C=F.value;if("error"in C){K={unified:"error",raw:void 0},L.enqueue({type:"error",error:C.error});return}if(H)H=!1,L.enqueue({type:"response-metadata",...g$4(C)});if(((N=C.x_groq)==null?void 0:N.usage)!=null)Z=C.x_groq.usage;let k=C.choices[0];if((k==null?void 0:k.finish_reason)!=null)K={unified:m$4(k.finish_reason),raw:k.finish_reason};if((k==null?void 0:k.delta)==null)return;let S=k.delta;if(S.reasoning!=null&&S.reasoning.length>0){if(!V)L.enqueue({type:"reasoning-start",id:"reasoning-0"}),V=!0;L.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:S.reasoning})}if(S.content!=null&&S.content.length>0){if(V)L.enqueue({type:"reasoning-end",id:"reasoning-0"}),V=!1;if(!z)L.enqueue({type:"text-start",id:"txt-0"}),z=!0;L.enqueue({type:"text-delta",id:"txt-0",delta:S.content})}if(S.tool_calls!=null){if(V)L.enqueue({type:"reasoning-end",id:"reasoning-0"}),V=!1;for(let I of S.tool_calls){let v=I.index;if(W[v]==null){if(I.type!=="function")throw new VE({data:I,message:"Expected 'function' type."});if(I.id==null)throw new VE({data:I,message:"Expected 'id' to be a string."});if(((D=I.function)==null?void 0:D.name)==null)throw new VE({data:I,message:"Expected 'function.name' to be a string."});L.enqueue({type:"tool-input-start",id:I.id,toolName:I.function.name}),W[v]={id:I.id,type:"function",function:{name:I.function.name,arguments:(A=I.function.arguments)!=null?A:""},hasFinished:!1};let y=W[v];if(((B=y.function)==null?void 0:B.name)!=null&&((O=y.function)==null?void 0:O.arguments)!=null){if(y.function.arguments.length>0)L.enqueue({type:"tool-input-delta",id:y.id,delta:y.function.arguments});if(Zm(y.function.arguments))L.enqueue({type:"tool-input-end",id:y.id}),L.enqueue({type:"tool-call",toolCallId:(E=y.id)!=null?E:X9(),toolName:y.function.name,input:y.function.arguments}),y.hasFinished=!0}continue}let x=W[v];if(x.hasFinished)continue;if(((M=I.function)==null?void 0:M.arguments)!=null)x.function.arguments+=(q=(R=I.function)==null?void 0:R.arguments)!=null?q:"";if(L.enqueue({type:"tool-input-delta",id:x.id,delta:(_=I.function.arguments)!=null?_:""}),((P=x.function)==null?void 0:P.name)!=null&&((w=x.function)==null?void 0:w.arguments)!=null&&Zm(x.function.arguments))L.enqueue({type:"tool-input-end",id:x.id}),L.enqueue({type:"tool-call",toolCallId:(j=x.id)!=null?j:X9(),toolName:x.function.name,input:x.function.arguments}),x.hasFinished=!0}}},flush(F){if(V)F.enqueue({type:"reasoning-end",id:"reasoning-0"});if(z)F.enqueue({type:"text-end",id:"txt-0"});F.enqueue({type:"finish",finishReason:K,usage:f$4(Z),...{}})}})),request:{body:G},response:{headers:J}}}},Sc8,kc8,vc8,xc8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({audio:$,mediaType:Y,providerOptions:X}){var G,J,Q,W,K;let Z=[],H=await w9({provider:"groq",providerOptions:X,schema:vc8}),z=new FormData,V=$ instanceof Uint8Array?new Blob([$]):new Blob([GT($)]);z.append("model",this.modelId);let F=dy0(Y);if(z.append("file",new File([V],"audio",{type:Y}),`audio.${F}`),H){let L={language:(G=H.language)!=null?G:void 0,prompt:(J=H.prompt)!=null?J:void 0,response_format:(Q=H.responseFormat)!=null?Q:void 0,temperature:(W=H.temperature)!=null?W:void 0,timestamp_granularities:(K=H.timestampGranularities)!=null?K:void 0};for(let N in L){let D=L[N];if(D!==void 0)if(Array.isArray(D))for(let A of D)z.append(`${N}[]`,String(A));else z.append(N,String(D))}}return{formData:z,warnings:Z}}async doGenerate($){var Y,X,G,J,Q,W,K;let Z=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,{formData:H,warnings:z}=await this.getArgs($),{value:V,responseHeaders:F,rawValue:L}=await c90({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:p8(this.config.headers(),$.headers),formData:H,failedResponseHandler:Jb0,successfulResponseHandler:I5(yc8),abortSignal:$.abortSignal,fetch:this.config.fetch});return{text:V.text,segments:(Q=(J=V.segments)==null?void 0:J.map((N)=>({text:N.text,startSecond:N.start,endSecond:N.end})))!=null?Q:[],language:(W=V.language)!=null?W:void 0,durationInSeconds:(K=V.duration)!=null?K:void 0,warnings:z,response:{timestamp:Z,modelId:this.modelId,headers:F,body:L}}}},yc8,bc8,hc8,fc8="3.0.39",mc8,uc8,Qb0,dc8=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={"application/pdf":[/^https:\/\/.*$/]};var X;this.modelId=$,this.config=Y,this.generateId=(X=Y.generateId)!=null?X:X9}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:K,responseFormat:Z,seed:H,providerOptions:z,tools:V,toolChoice:F}){var L,N,D,A;let B=[],O=(L=await w9({provider:"mistral",providerOptions:z,schema:mc8}))!=null?L:{};if(J!=null)B.push({type:"unsupported",feature:"topK"});if(Q!=null)B.push({type:"unsupported",feature:"frequencyPenalty"});if(W!=null)B.push({type:"unsupported",feature:"presencePenalty"});if(K!=null)B.push({type:"unsupported",feature:"stopSequences"});let E=(N=O.structuredOutputs)!=null?N:!0,M=(D=O.strictJsonSchema)!=null?D:!1;if((Z==null?void 0:Z.type)==="json"&&!(Z==null?void 0:Z.schema))$=l54({messages:$,schema:Z.schema});let R={model:this.modelId,safe_prompt:O.safePrompt,max_tokens:Y,temperature:X,top_p:G,random_seed:H,reasoning_effort:O.reasoningEffort,response_format:(Z==null?void 0:Z.type)==="json"?E&&(Z==null?void 0:Z.schema)!=null?{type:"json_schema",json_schema:{schema:Z.schema,strict:M,name:(A=Z.name)!=null?A:"response",description:Z.description}}:{type:"json_object"}:void 0,document_image_limit:O.documentImageLimit,document_page_limit:O.documentPageLimit,messages:gc8($)},{tools:q,toolChoice:_,toolWarnings:P}=pc8({tools:V,toolChoice:F});return{args:{...R,tools:q,tool_choice:_,...q!=null&&O.parallelToolCalls!==void 0?{parallel_tool_calls:O.parallelToolCalls}:{}},warnings:[...B,...P]}}async doGenerate($){var Y;let{args:X,warnings:G}=await this.getArgs($),{responseHeaders:J,value:Q,rawValue:W}=await G9({url:`${this.config.baseURL}/chat/completions`,headers:p8(this.config.headers(),$.headers),body:X,failedResponseHandler:Qb0,successfulResponseHandler:I5(cc8),abortSignal:$.abortSignal,fetch:this.config.fetch}),K=Q.choices[0],Z=[];if(K.message.content!=null&&Array.isArray(K.message.content)){for(let H of K.message.content)if(H.type==="thinking"){let z=l$4(H.thinking);if(z.length>0)Z.push({type:"reasoning",text:z})}else if(H.type==="text"){if(H.text.length>0)Z.push({type:"text",text:H.text})}}else{let H=i$4(K.message.content);if(H!=null&&H.length>0)Z.push({type:"text",text:H})}if(K.message.tool_calls!=null)for(let H of K.message.tool_calls)Z.push({type:"tool-call",toolCallId:H.id,toolName:H.function.name,input:H.function.arguments});return{content:Z,finishReason:{unified:c$4(K.finish_reason),raw:(Y=K.finish_reason)!=null?Y:void 0},usage:u$4(Q.usage),request:{body:X},response:{...d$4(Q),headers:J,body:W},warnings:G}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0},{responseHeaders:J,value:Q}=await G9({url:`${this.config.baseURL}/chat/completions`,headers:p8(this.config.headers(),$.headers),body:G,failedResponseHandler:Qb0,successfulResponseHandler:sZ(lc8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W={unified:"other",raw:void 0},K=void 0,Z=!0,H=!1,z=null,V=this.generateId;return{stream:Q.pipeThrough(new TransformStream({start(F){F.enqueue({type:"stream-start",warnings:X})},transform(F,L){if($.includeRawChunks)L.enqueue({type:"raw",rawValue:F.rawValue});if(!F.success){L.enqueue({type:"error",error:F.error});return}let N=F.value;if(Z)Z=!1,L.enqueue({type:"response-metadata",...d$4(N)});if(N.usage!=null)K=N.usage;let D=N.choices[0],A=D.delta,B=i$4(A.content);if(A.content!=null&&Array.isArray(A.content)){for(let O of A.content)if(O.type==="thinking"){let E=l$4(O.thinking);if(E.length>0){if(z==null){if(H)L.enqueue({type:"text-end",id:"0"}),H=!1;z=V(),L.enqueue({type:"reasoning-start",id:z})}L.enqueue({type:"reasoning-delta",id:z,delta:E})}}}if(B!=null&&B.length>0){if(!H){if(z!=null)L.enqueue({type:"reasoning-end",id:z}),z=null;L.enqueue({type:"text-start",id:"0"}),H=!0}L.enqueue({type:"text-delta",id:"0",delta:B})}if((A==null?void 0:A.tool_calls)!=null)for(let O of A.tool_calls){let E=O.id,M=O.function.name,R=O.function.arguments;L.enqueue({type:"tool-input-start",id:E,toolName:M}),L.enqueue({type:"tool-input-delta",id:E,delta:R}),L.enqueue({type:"tool-input-end",id:E}),L.enqueue({type:"tool-call",toolCallId:E,toolName:M,input:R})}if(D.finish_reason!=null)W={unified:c$4(D.finish_reason),raw:D.finish_reason}},flush(F){if(z!=null)F.enqueue({type:"reasoning-end",id:z});if(H)F.enqueue({type:"text-end",id:"0"});F.enqueue({type:"finish",finishReason:W,usage:u$4(K)})}})),request:{body:G},response:{headers:J}}}},L74,D74,cc8,lc8,ic8=class{constructor($,Y){this.specificationVersion="v3",this.maxEmbeddingsPerCall=32,this.supportsParallelCalls=!1,this.modelId=$,this.config=Y}get provider(){return this.config.provider}async doEmbed({values:$,abortSignal:Y,headers:X}){if($.length>this.maxEmbeddingsPerCall)throw new m90({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:$});let{responseHeaders:G,value:J,rawValue:Q}=await G9({url:`${this.config.baseURL}/embeddings`,headers:p8(this.config.headers(),X),body:{model:this.modelId,input:$,encoding_format:"float"},failedResponseHandler:Qb0,successfulResponseHandler:I5(nc8),abortSignal:Y,fetch:this.config.fetch});return{warnings:[],embeddings:J.data.map((W)=>W.embedding),usage:J.usage?{tokens:J.usage.prompt_tokens}:void 0,response:{headers:G,body:Q}}}},nc8,rc8="3.0.36",sc8=class{constructor($,Y){this.specificationVersion="v2",this.provider="perplexity",this.supportedUrls={},this.modelId=$,this.config=Y}getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:K,responseFormat:Z,seed:H,providerOptions:z}){var V;let F=[];if(J!=null)F.push({type:"unsupported-setting",setting:"topK"});if(K!=null)F.push({type:"unsupported-setting",setting:"stopSequences"});if(H!=null)F.push({type:"unsupported-setting",setting:"seed"});return{args:{model:this.modelId,frequency_penalty:Q,max_tokens:Y,presence_penalty:W,temperature:X,top_k:J,top_p:G,response_format:(Z==null?void 0:Z.type)==="json"?{type:"json_schema",json_schema:{schema:Z.schema}}:void 0,...(V=z==null?void 0:z.perplexity)!=null?V:{},messages:ac8($)},warnings:F}}async doGenerate($){var Y,X,G,J,Q,W,K,Z,H,z,V,F,L,N,D,A,B;let{args:O,warnings:E}=this.getArgs($),{responseHeaders:M,value:R,rawValue:q}=await G8({url:`${this.config.baseURL}/chat/completions`,headers:o6(this.config.headers(),$.headers),body:O,failedResponseHandler:zJ({errorSchema:a$4,errorToMessage:s$4}),successfulResponseHandler:C5(tc8),abortSignal:$.abortSignal,fetch:this.config.fetch}),_=R.choices[0],P=[],w=_.message.content;if(w.length>0)P.push({type:"text",text:w});if(R.citations!=null)for(let j of R.citations)P.push({type:"source",sourceType:"url",id:this.config.generateId(),url:j});return{content:P,finishReason:n$4(_.finish_reason),usage:{inputTokens:(Y=R.usage)==null?void 0:Y.prompt_tokens,outputTokens:(X=R.usage)==null?void 0:X.completion_tokens,totalTokens:(J=(G=R.usage)==null?void 0:G.total_tokens)!=null?J:void 0,reasoningTokens:(W=(Q=R.usage)==null?void 0:Q.reasoning_tokens)!=null?W:void 0},request:{body:O},response:{...r$4(R),headers:M,body:q},warnings:E,providerMetadata:{perplexity:{images:(Z=(K=R.images)==null?void 0:K.map((j)=>({imageUrl:j.image_url,originUrl:j.origin_url,height:j.height,width:j.width})))!=null?Z:null,usage:{citationTokens:(z=(H=R.usage)==null?void 0:H.citation_tokens)!=null?z:null,numSearchQueries:(F=(V=R.usage)==null?void 0:V.num_search_queries)!=null?F:null},cost:((L=R.usage)==null?void 0:L.cost)?{inputTokensCost:(N=R.usage.cost.input_tokens_cost)!=null?N:null,outputTokensCost:(D=R.usage.cost.output_tokens_cost)!=null?D:null,requestCost:(A=R.usage.cost.request_cost)!=null?A:null,totalCost:(B=R.usage.cost.total_cost)!=null?B:null}:null}}}}async doStream($){let{args:Y,warnings:X}=this.getArgs($),G={...Y,stream:!0},{responseHeaders:J,value:Q}=await G8({url:`${this.config.baseURL}/chat/completions`,headers:o6(this.config.headers(),$.headers),body:G,failedResponseHandler:zJ({errorSchema:a$4,errorToMessage:s$4}),successfulResponseHandler:jQ(ec8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W="unknown",K={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0},Z={perplexity:{usage:{citationTokens:null,numSearchQueries:null},cost:null,images:null}},H=!0,z=!1,V=this;return{stream:Q.pipeThrough(new TransformStream({start(F){F.enqueue({type:"stream-start",warnings:X})},transform(F,L){var N,D,A,B,O,E,M,R;if($.includeRawChunks)L.enqueue({type:"raw",rawValue:F.rawValue});if(!F.success){L.enqueue({type:"error",error:F.error});return}let q=F.value;if(H)L.enqueue({type:"response-metadata",...r$4(q)}),(N=q.citations)==null||N.forEach((j)=>{L.enqueue({type:"source",sourceType:"url",id:V.config.generateId(),url:j})}),H=!1;if(q.usage!=null)K.inputTokens=q.usage.prompt_tokens,K.outputTokens=q.usage.completion_tokens,K.reasoningTokens=(D=q.usage.reasoning_tokens)!=null?D:void 0,Z.perplexity.usage={citationTokens:(A=q.usage.citation_tokens)!=null?A:null,numSearchQueries:(B=q.usage.num_search_queries)!=null?B:null},Z.perplexity.cost=q.usage.cost?{inputTokensCost:(O=q.usage.cost.input_tokens_cost)!=null?O:null,outputTokensCost:(E=q.usage.cost.output_tokens_cost)!=null?E:null,requestCost:(M=q.usage.cost.request_cost)!=null?M:null,totalCost:(R=q.usage.cost.total_cost)!=null?R:null}:null;if(q.images!=null)Z.perplexity.images=q.images.map((j)=>({imageUrl:j.image_url,originUrl:j.origin_url,height:j.height,width:j.width}));let _=q.choices[0];if((_==null?void 0:_.finish_reason)!=null)W=n$4(_.finish_reason);if((_==null?void 0:_.delta)==null)return;let w=_.delta.content;if(w!=null){if(!z)L.enqueue({type:"text-start",id:"0"}),z=!0;L.enqueue({type:"text-delta",id:"0",delta:w})}},flush(F){if(z)F.enqueue({type:"text-end",id:"0"});F.enqueue({type:"finish",finishReason:W,usage:K,providerMetadata:Z})}})),request:{body:G},response:{headers:J}}}},oc8,N74,A74,tc8,ec8,a$4,s$4=($)=>{var Y,X;return(X=(Y=$.error.message)!=null?Y:$.error.type)!=null?X:"unknown error"},$l8="2.0.30",Yl8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2",this.maxImagesPerCall=1}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,seed:G,providerOptions:J,headers:Q,abortSignal:W}){var K,Z,H,z;let V=[];if(X!=null)V.push({type:"unsupported-setting",setting:"aspectRatio",details:"This model does not support the `aspectRatio` option. Use `size` instead."});let F=(H=(Z=(K=this.config._internal)==null?void 0:K.currentDate)==null?void 0:Z.call(K))!=null?H:new Date,L=X==null?void 0:X.split("x"),{value:N,responseHeaders:D}=await G8({url:`${this.config.baseURL}/images/generations`,headers:o6(this.config.headers(),Q),body:{model:this.modelId,prompt:$,seed:G,...Y>1?{n:Y}:{},...L&&{width:parseInt(L[0]),height:parseInt(L[1])},response_format:"base64",...(z=J.togetherai)!=null?z:{}},failedResponseHandler:zJ({errorSchema:Gl8,errorToMessage:(A)=>A.error.message}),successfulResponseHandler:C5(Xl8),abortSignal:W,fetch:this.config.fetch});return{images:N.data.map((A)=>A.b64_json),warnings:V,response:{timestamp:F,modelId:this.modelId,headers:D}}}},Xl8,Gl8,Jl8="1.0.42",Kl8,Zl8,Ul8,Hl8,zl8,Vl8,Fl8,OE,Dl8=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:K,seed:Z,responseFormat:H,providerOptions:z,tools:V,toolChoice:F}){var L,N,D;let A=[],B=(L=await w9({provider:"xai",providerOptions:z,schema:Vl8}))!=null?L:{};if(J!=null)A.push({type:"unsupported",feature:"topK"});if(Q!=null)A.push({type:"unsupported",feature:"frequencyPenalty"});if(W!=null)A.push({type:"unsupported",feature:"presencePenalty"});if(K!=null)A.push({type:"unsupported",feature:"stopSequences"});let{messages:O,warnings:E}=Wl8($);A.push(...E);let{tools:M,toolChoice:R,toolWarnings:q}=Ll8({tools:V,toolChoice:F});return A.push(...q),{args:{model:this.modelId,logprobs:B.logprobs===!0||B.topLogprobs!=null?!0:void 0,top_logprobs:B.topLogprobs,max_completion_tokens:Y,temperature:X,top_p:G,seed:Z,reasoning_effort:B.reasoningEffort,parallel_function_calling:B.parallel_function_calling,response_format:(H==null?void 0:H.type)==="json"?H.schema!=null?{type:"json_schema",json_schema:{name:(N=H.name)!=null?N:"response",schema:H.schema,strict:!0}}:{type:"json_object"}:void 0,search_parameters:B.searchParameters?{mode:B.searchParameters.mode,return_citations:B.searchParameters.returnCitations,from_date:B.searchParameters.fromDate,to_date:B.searchParameters.toDate,max_search_results:B.searchParameters.maxSearchResults,sources:(D=B.searchParameters.sources)==null?void 0:D.map((P)=>{var w;return{type:P.type,...P.type==="web"&&{country:P.country,excluded_websites:P.excludedWebsites,allowed_websites:P.allowedWebsites,safe_search:P.safeSearch},...P.type==="x"&&{excluded_x_handles:P.excludedXHandles,included_x_handles:(w=P.includedXHandles)!=null?w:P.xHandles,post_favorite_count:P.postFavoriteCount,post_view_count:P.postViewCount},...P.type==="news"&&{country:P.country,excluded_websites:P.excludedWebsites,safe_search:P.safeSearch},...P.type==="rss"&&{links:P.links}}})}:void 0,messages:O,tools:M,tool_choice:R},warnings:A}}async doGenerate($){var Y,X;let{args:G,warnings:J}=await this.getArgs($),Q=`${(Y=this.config.baseURL)!=null?Y:"https://api.x.ai/v1"}/chat/completions`,{responseHeaders:W,value:K,rawValue:Z}=await G9({url:Q,headers:p8(this.config.headers(),$.headers),body:G,failedResponseHandler:OE,successfulResponseHandler:I5(Nl8),abortSignal:$.abortSignal,fetch:this.config.fetch});if(K.error!=null)throw new b$({message:K.error,url:Q,requestBodyValues:G,statusCode:200,responseHeaders:W,responseBody:JSON.stringify(Z),isRetryable:K.code==="The service is currently unavailable"});let H=K.choices[0],z=[];if(H.message.content!=null&&H.message.content.length>0){let V=H.message.content,F=G.messages[G.messages.length-1];if((F==null?void 0:F.role)==="assistant"&&V===F.content)V="";if(V.length>0)z.push({type:"text",text:V})}if(H.message.reasoning_content!=null&&H.message.reasoning_content.length>0)z.push({type:"reasoning",text:H.message.reasoning_content});if(H.message.tool_calls!=null)for(let V of H.message.tool_calls)z.push({type:"tool-call",toolCallId:V.id,toolName:V.function.name,input:V.function.arguments});if(K.citations!=null)for(let V of K.citations)z.push({type:"source",sourceType:"url",id:this.config.generateId(),url:V});return{content:z,finishReason:{unified:t$4(H.finish_reason),raw:(X=H.finish_reason)!=null?X:void 0},usage:K.usage?o$4(K.usage):{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}},request:{body:G},response:{...r90(K),headers:W,body:Z},warnings:J}}async doStream($){var Y;let{args:X,warnings:G}=await this.getArgs($),J={...X,stream:!0,stream_options:{include_usage:!0}},Q=`${(Y=this.config.baseURL)!=null?Y:"https://api.x.ai/v1"}/chat/completions`,{responseHeaders:W,value:K}=await G9({url:Q,headers:p8(this.config.headers(),$.headers),body:J,failedResponseHandler:OE,successfulResponseHandler:async({response:D})=>{let A=GV(D),B=D.headers.get("content-type");if(B==null?void 0:B.includes("application/json")){let O=await D.text(),E=await d90({text:O,schema:Bl8});if(E.success)throw new b$({message:E.value.error,url:Q,requestBodyValues:J,statusCode:200,responseHeaders:A,responseBody:O,isRetryable:E.value.code==="The service is currently unavailable"});throw new b$({message:"Invalid JSON response",url:Q,requestBodyValues:J,statusCode:200,responseHeaders:A,responseBody:O})}return sZ(Al8)({response:D,url:Q,requestBodyValues:J})},abortSignal:$.abortSignal,fetch:this.config.fetch}),Z={unified:"other",raw:void 0},H=void 0,z=!0,V={},F={},L=void 0,N=this;return{stream:K.pipeThrough(new TransformStream({start(D){D.enqueue({type:"stream-start",warnings:G})},transform(D,A){if($.includeRawChunks)A.enqueue({type:"raw",rawValue:D.rawValue});if(!D.success){A.enqueue({type:"error",error:D.error});return}let B=D.value;if(z)A.enqueue({type:"response-metadata",...r90(B)}),z=!1;if(B.citations!=null)for(let R of B.citations)A.enqueue({type:"source",sourceType:"url",id:N.config.generateId(),url:R});if(B.usage!=null)H=o$4(B.usage);let O=B.choices[0];if((O==null?void 0:O.finish_reason)!=null)Z={unified:t$4(O.finish_reason),raw:O.finish_reason};if((O==null?void 0:O.delta)==null)return;let{delta:E,index:M}=O;if(E.content!=null&&E.content.length>0){let R=E.content;if(L!=null&&!V[L].ended)A.enqueue({type:"reasoning-end",id:L}),V[L].ended=!0,L=void 0;let q=J.messages[J.messages.length-1];if((q==null?void 0:q.role)==="assistant"&&R===q.content)return;let _=`text-${B.id||M}`;if(V[_]==null)V[_]={type:"text",ended:!1},A.enqueue({type:"text-start",id:_});A.enqueue({type:"text-delta",id:_,delta:R})}if(E.reasoning_content!=null&&E.reasoning_content.length>0){let R=`reasoning-${B.id||M}`;if(F[R]===E.reasoning_content)return;if(F[R]=E.reasoning_content,V[R]==null)V[R]={type:"reasoning",ended:!1},L=R,A.enqueue({type:"reasoning-start",id:R});A.enqueue({type:"reasoning-delta",id:R,delta:E.reasoning_content})}if(E.tool_calls!=null){if(L!=null&&!V[L].ended)A.enqueue({type:"reasoning-end",id:L}),V[L].ended=!0,L=void 0;for(let R of E.tool_calls){let q=R.id;A.enqueue({type:"tool-input-start",id:q,toolName:R.function.name}),A.enqueue({type:"tool-input-delta",id:q,delta:R.function.arguments}),A.enqueue({type:"tool-input-end",id:q}),A.enqueue({type:"tool-call",toolCallId:q,toolName:R.function.name,input:R.function.arguments})}}},flush(D){for(let[A,B]of Object.entries(V))if(!B.ended)D.enqueue({type:B.type==="text"?"text-end":"reasoning-end",id:A});D.enqueue({type:"finish",finishReason:Z,usage:H!=null?H:{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}}})}})),request:{body:J},response:{headers:W}}}},E74,Nl8,Al8,Bl8,Ol8,El8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxImagesPerCall=3}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,providerOptions:Q,headers:W,abortSignal:K,files:Z,mask:H}){var z,V,F,L,N;let D=[];if(X!=null)D.push({type:"unsupported",feature:"size",details:"This model does not support the `size` option. Use `aspectRatio` instead."});if(J!=null)D.push({type:"unsupported",feature:"seed"});if(H!=null)D.push({type:"unsupported",feature:"mask"});let A=await w9({provider:"xai",providerOptions:Q,schema:Ol8}),B=Z!=null&&Z.length>0,O=B?Z.map((C)=>b54(C)):[],E=B?"/images/edits":"/images/generations",M={model:this.modelId,prompt:$,n:Y,response_format:"b64_json"};if(G!=null)M.aspect_ratio=G;if((A==null?void 0:A.output_format)!=null)M.output_format=A.output_format;if((A==null?void 0:A.sync_mode)!=null)M.sync_mode=A.sync_mode;if((A==null?void 0:A.aspect_ratio)!=null&&G==null)M.aspect_ratio=A.aspect_ratio;if((A==null?void 0:A.resolution)!=null)M.resolution=A.resolution;if((A==null?void 0:A.quality)!=null)M.quality=A.quality;if((A==null?void 0:A.user)!=null)M.user=A.user;if(O.length===1)M.image={url:O[0],type:"image_url"};else if(O.length>1)M.images=O.map((C)=>({url:C,type:"image_url"}));let R=(z=this.config.baseURL)!=null?z:"https://api.x.ai/v1",q=(L=(F=(V=this.config._internal)==null?void 0:V.currentDate)==null?void 0:F.call(V))!=null?L:new Date,{value:_,responseHeaders:P}=await G9({url:`${R}${E}`,headers:p8(this.config.headers(),W),body:M,failedResponseHandler:OE,successfulResponseHandler:I5(Ml8),abortSignal:K,fetch:this.config.fetch});return{images:_.data.every((C)=>C.b64_json!=null)?_.data.map((C)=>C.b64_json):await Promise.all(_.data.map((C)=>this.downloadImage(C.url,K))),warnings:D,response:{timestamp:q,modelId:this.modelId,headers:P},providerMetadata:{xai:{images:_.data.map((C)=>({...C.revised_prompt?{revisedPrompt:C.revised_prompt}:{}})),...((N=_.usage)==null?void 0:N.cost_in_usd_ticks)!=null?{costInUsdTicks:_.usage.cost_in_usd_ticks}:{}}}}}async downloadImage($,Y){let{value:X}=await Lm({url:$,abortSignal:Y,failedResponseHandler:$$4(),successfulResponseHandler:ny0(),fetch:this.config.fetch});return X}},Ml8,Kb0,Zb0,Ub0,BE,ql8,Hb0,zb0,Bm,Pl8,wl8,_l8,jl8,Tl8,Il8=($)=>Tl8($),Cl8,Sl8,kl8,vl8=($)=>kl8($),xl8,yl8,bl8,hl8=($={})=>bl8($),fl8,gl8,ml8,ul8=($={})=>ml8($),dl8=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/],"text/*":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,stopSequences:J,seed:Q,responseFormat:W,providerOptions:K,tools:Z,toolChoice:H}){var z,V,F,L,N,D,A;let B=[],O=(z=await w9({provider:"xai",providerOptions:K,schema:wl8}))!=null?z:{};if(J!=null)B.push({type:"unsupported",feature:"stopSequences"});let E=(V=Z==null?void 0:Z.find((v)=>v.type==="provider"&&v.id==="xai.web_search"))==null?void 0:V.name,M=(F=Z==null?void 0:Z.find((v)=>v.type==="provider"&&v.id==="xai.x_search"))==null?void 0:F.name,R=(L=Z==null?void 0:Z.find((v)=>v.type==="provider"&&v.id==="xai.code_execution"))==null?void 0:L.name,q=(N=Z==null?void 0:Z.find((v)=>v.type==="provider"&&v.id==="xai.mcp"))==null?void 0:N.name,_=(D=Z==null?void 0:Z.find((v)=>v.type==="provider"&&v.id==="xai.file_search"))==null?void 0:D.name,{input:P,inputWarnings:w}=await Rl8({prompt:$});B.push(...w);let{tools:j,toolChoice:C,toolWarnings:k}=await pl8({tools:Z,toolChoice:H});B.push(...k);let S=O.include?[...O.include]:void 0;if(O.store===!1)if(S==null)S=["reasoning.encrypted_content"];else S=[...S,"reasoning.encrypted_content"];let I={model:this.modelId,input:P,logprobs:O.logprobs===!0||O.topLogprobs!=null?!0:void 0,top_logprobs:O.topLogprobs,max_output_tokens:Y,temperature:X,top_p:G,seed:Q,...(W==null?void 0:W.type)==="json"&&{text:{format:W.schema!=null?{type:"json_schema",strict:!0,name:(A=W.name)!=null?A:"response",description:W.description,schema:W.schema}:{type:"json_object"}}},...O.reasoningEffort!=null&&{reasoning:{effort:O.reasoningEffort}},...O.store===!1&&{store:O.store},...S!=null&&{include:S},...O.previousResponseId!=null&&{previous_response_id:O.previousResponseId}};if(j&&j.length>0)I.tools=j;if(C!=null)I.tool_choice=C;return{args:I,warnings:B,webSearchToolName:E,xSearchToolName:M,codeExecutionToolName:R,mcpToolName:q,fileSearchToolName:_}}async doGenerate($){var Y,X,G,J,Q,W,K,Z,H,z,V,F,L;let{args:N,warnings:D,webSearchToolName:A,xSearchToolName:B,codeExecutionToolName:O,mcpToolName:E,fileSearchToolName:M}=await this.getArgs($),{responseHeaders:R,value:q,rawValue:_}=await G9({url:`${(Y=this.config.baseURL)!=null?Y:"https://api.x.ai/v1"}/responses`,headers:p8(this.config.headers(),$.headers),body:N,failedResponseHandler:OE,successfulResponseHandler:I5(Bm),abortSignal:$.abortSignal,fetch:this.config.fetch}),P=[],w=!1,j=["web_search","web_search_with_snippets","browse_page"],C=["x_user_search","x_keyword_search","x_semantic_search","x_thread_fetch"];for(let k of q.output){if(k.type==="file_search_call"){let S=M!=null?M:"file_search";P.push({type:"tool-call",toolCallId:k.id,toolName:S,input:"",providerExecuted:!0}),P.push({type:"tool-result",toolCallId:k.id,toolName:S,result:{queries:(X=k.queries)!=null?X:[],results:(J=(G=k.results)==null?void 0:G.map((I)=>({fileId:I.file_id,filename:I.filename,score:I.score,text:I.text})))!=null?J:null}});continue}if(k.type==="web_search_call"||k.type==="x_search_call"||k.type==="code_interpreter_call"||k.type==="code_execution_call"||k.type==="view_image_call"||k.type==="view_x_video_call"||k.type==="custom_tool_call"||k.type==="mcp_call"){let S=(Q=k.name)!=null?Q:"";if(j.includes((W=k.name)!=null?W:"")||k.type==="web_search_call")S=A!=null?A:"web_search";else if(C.includes((K=k.name)!=null?K:"")||k.type==="x_search_call")S=B!=null?B:"x_search";else if(k.name==="code_execution"||k.type==="code_interpreter_call"||k.type==="code_execution_call")S=O!=null?O:"code_execution";else if(k.type==="mcp_call")S=(Z=E!=null?E:k.name)!=null?Z:"mcp";let I=k.type==="custom_tool_call"?(H=k.input)!=null?H:"":k.type==="mcp_call"?(z=k.arguments)!=null?z:"":(V=k.arguments)!=null?V:"";P.push({type:"tool-call",toolCallId:k.id,toolName:S,input:I,providerExecuted:!0});continue}switch(k.type){case"message":{for(let S of k.content){if(S.text)P.push({type:"text",text:S.text});if(S.annotations){for(let I of S.annotations)if(I.type==="url_citation"&&"url"in I)P.push({type:"source",sourceType:"url",id:this.config.generateId(),url:I.url,title:(F=I.title)!=null?F:I.url})}}break}case"function_call":{w=!0,P.push({type:"tool-call",toolCallId:k.call_id,toolName:k.name,input:k.arguments});break}case"reasoning":{let I=k.summary.map((v)=>v.text).filter((v)=>v&&v.length>0).join("");if(I||k.encrypted_content){let v=k.encrypted_content||k.id;P.push({type:"reasoning",text:I,...v&&{providerMetadata:{xai:{...k.encrypted_content&&{reasoningEncryptedContent:k.encrypted_content},...k.id&&{itemId:k.id}}}}})}break}}}return{content:P,finishReason:{unified:w?"tool-calls":l90(q.status),raw:(L=q.status)!=null?L:void 0},usage:q.usage?$b0(q.usage):{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}},request:{body:N},response:{...r90(q),headers:R,body:_},warnings:D}}async doStream($){var Y;let{args:X,warnings:G,webSearchToolName:J,xSearchToolName:Q,codeExecutionToolName:W,mcpToolName:K,fileSearchToolName:Z}=await this.getArgs($),H={...X,stream:!0},{responseHeaders:z,value:V}=await G9({url:`${(Y=this.config.baseURL)!=null?Y:"https://api.x.ai/v1"}/responses`,headers:p8(this.config.headers(),$.headers),body:H,failedResponseHandler:OE,successfulResponseHandler:sZ(Pl8),abortSignal:$.abortSignal,fetch:this.config.fetch}),F={unified:"other",raw:void 0},L=!1,N=void 0,D=!0,A={},B=new Set,O={},E={},M=this;return{stream:V.pipeThrough(new TransformStream({start(R){R.enqueue({type:"stream-start",warnings:G})},transform(R,q){var _,P,w,j,C,k,S,I,v,x,y,d,u,b,g;if($.includeRawChunks)q.enqueue({type:"raw",rawValue:R.rawValue});if(!R.success){q.enqueue({type:"error",error:R.error});return}let p=R.value;if(p.type==="response.created"||p.type==="response.in_progress"){if(D)q.enqueue({type:"response-metadata",...r90(p.response)}),D=!1;return}if(p.type==="response.reasoning_summary_part.added"){let h=`reasoning-${p.item_id}`;E[p.item_id]={},q.enqueue({type:"reasoning-start",id:h,providerMetadata:{xai:{itemId:p.item_id}}})}if(p.type==="response.reasoning_summary_text.delta"){let h=`reasoning-${p.item_id}`;q.enqueue({type:"reasoning-delta",id:h,delta:p.delta,providerMetadata:{xai:{itemId:p.item_id}}});return}if(p.type==="response.reasoning_summary_text.done")return;if(p.type==="response.reasoning_text.delta"){let h=`reasoning-${p.item_id}`;if(E[p.item_id]==null)E[p.item_id]={},q.enqueue({type:"reasoning-start",id:h,providerMetadata:{xai:{itemId:p.item_id}}});q.enqueue({type:"reasoning-delta",id:h,delta:p.delta,providerMetadata:{xai:{itemId:p.item_id}}});return}if(p.type==="response.reasoning_text.done")return;if(p.type==="response.output_text.delta"){let h=`text-${p.item_id}`;if(A[h]==null)A[h]={type:"text"},q.enqueue({type:"text-start",id:h});q.enqueue({type:"text-delta",id:h,delta:p.delta});return}if(p.type==="response.output_text.done"){if(p.annotations){for(let h of p.annotations)if(h.type==="url_citation"&&"url"in h)q.enqueue({type:"source",sourceType:"url",id:M.config.generateId(),url:h.url,title:(_=h.title)!=null?_:h.url})}return}if(p.type==="response.output_text.annotation.added"){let h=p.annotation;if(h.type==="url_citation"&&"url"in h)q.enqueue({type:"source",sourceType:"url",id:M.config.generateId(),url:h.url,title:(P=h.title)!=null?P:h.url});return}if(p.type==="response.done"||p.type==="response.completed"||p.type==="response.incomplete"){let h=p.response;if(h.usage)N=$b0(h.usage);if(p.type==="response.incomplete"){let n="incomplete_details"in h?(w=h.incomplete_details)==null?void 0:w.reason:void 0;F={unified:n?l90(n):"other",raw:n!=null?n:"incomplete"}}else if("status"in h&&h.status)F={unified:L?"tool-calls":l90(h.status),raw:h.status};return}if(p.type==="response.failed"){let h=(j=p.response.incomplete_details)==null?void 0:j.reason;if(F={unified:h?l90(h):"error",raw:h!=null?h:"error"},p.response.usage)N=$b0(p.response.usage);return}if(p.type==="error"){q.enqueue({type:"error",error:p});return}if(p.type==="response.custom_tool_call_input.delta"||p.type==="response.custom_tool_call_input.done")return;if(p.type==="response.function_call_arguments.delta"){let h=O[p.output_index];if(h!=null)q.enqueue({type:"tool-input-delta",id:h.toolCallId,delta:p.delta});return}if(p.type==="response.function_call_arguments.done")return;if(p.type==="response.output_item.added"||p.type==="response.output_item.done"){let h=p.item;if(h.type==="reasoning"){if(p.type==="response.output_item.done"){let n=`reasoning-${h.id}`;if(!(h.id in E))E[h.id]={},q.enqueue({type:"reasoning-start",id:n,providerMetadata:{xai:{...h.id&&{itemId:h.id}}}});q.enqueue({type:"reasoning-end",id:n,providerMetadata:{xai:{...h.encrypted_content&&{reasoningEncryptedContent:h.encrypted_content},...h.id&&{itemId:h.id}}}}),delete E[h.id]}return}if(h.type==="file_search_call"){let n=Z!=null?Z:"file_search";if(!B.has(h.id))B.add(h.id),q.enqueue({type:"tool-input-start",id:h.id,toolName:n}),q.enqueue({type:"tool-input-delta",id:h.id,delta:""}),q.enqueue({type:"tool-input-end",id:h.id}),q.enqueue({type:"tool-call",toolCallId:h.id,toolName:n,input:"",providerExecuted:!0});if(p.type==="response.output_item.done")q.enqueue({type:"tool-result",toolCallId:h.id,toolName:n,result:{queries:(C=h.queries)!=null?C:[],results:(S=(k=h.results)==null?void 0:k.map((t)=>({fileId:t.file_id,filename:t.filename,score:t.score,text:t.text})))!=null?S:null}});return}if(h.type==="web_search_call"||h.type==="x_search_call"||h.type==="code_interpreter_call"||h.type==="code_execution_call"||h.type==="view_image_call"||h.type==="view_x_video_call"||h.type==="custom_tool_call"||h.type==="mcp_call"){let n=["web_search","web_search_with_snippets","browse_page"],t=["x_user_search","x_keyword_search","x_semantic_search","x_thread_fetch"],s=(I=h.name)!=null?I:"";if(n.includes((v=h.name)!=null?v:"")||h.type==="web_search_call")s=J!=null?J:"web_search";else if(t.includes((x=h.name)!=null?x:"")||h.type==="x_search_call")s=Q!=null?Q:"x_search";else if(h.name==="code_execution"||h.type==="code_interpreter_call"||h.type==="code_execution_call")s=W!=null?W:"code_execution";else if(h.type==="mcp_call")s=(y=K!=null?K:h.name)!=null?y:"mcp";let K0=h.type==="custom_tool_call"?(d=h.input)!=null?d:"":h.type==="mcp_call"?(u=h.arguments)!=null?u:"":(b=h.arguments)!=null?b:"";if((h.type==="custom_tool_call"?p.type==="response.output_item.done":!B.has(h.id))&&!B.has(h.id))B.add(h.id),q.enqueue({type:"tool-input-start",id:h.id,toolName:s}),q.enqueue({type:"tool-input-delta",id:h.id,delta:K0}),q.enqueue({type:"tool-input-end",id:h.id}),q.enqueue({type:"tool-call",toolCallId:h.id,toolName:s,input:K0,providerExecuted:!0});return}if(h.type==="message")for(let n of h.content){if(n.text&&n.text.length>0){let t=`text-${h.id}`;if(A[t]==null)A[t]={type:"text"},q.enqueue({type:"text-start",id:t}),q.enqueue({type:"text-delta",id:t,delta:n.text})}if(n.annotations){for(let t of n.annotations)if(t.type==="url_citation"&&"url"in t)q.enqueue({type:"source",sourceType:"url",id:M.config.generateId(),url:t.url,title:(g=t.title)!=null?g:t.url})}}else if(h.type==="function_call"){if(p.type==="response.output_item.added")O[p.output_index]={toolName:h.name,toolCallId:h.call_id},q.enqueue({type:"tool-input-start",id:h.call_id,toolName:h.name});else if(p.type==="response.output_item.done")L=!0,O[p.output_index]=void 0,q.enqueue({type:"tool-input-end",id:h.call_id}),q.enqueue({type:"tool-call",toolCallId:h.call_id,toolName:h.name,input:h.arguments})}}},flush(R){for(let[q,_]of Object.entries(A))if(_.type==="text")R.enqueue({type:"text-end",id:q});R.enqueue({type:"finish",finishReason:F,usage:N!=null?N:{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}}})}})),request:{body:H},response:{headers:z}}}},cl8,ll8,il8=($={})=>ll8($),nl8,rl8,al8=($={})=>rl8($),sl8,ol8,tl8=($={})=>ol8($),el8,$i8="3.0.89",EE,Yi8,Xi8,Mm,Gi8,Ji8,Qi8,Wi8,Ki8,Zi8,Ui8,zi8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxVideosPerCall=1}get provider(){return this.config.provider}async doGenerate($){var Y,X,G,J,Q,W,K,Z,H,z;let V=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,F=[],L=await w9({provider:"xai",providerOptions:$.providerOptions,schema:Zi8}),N=Hi8(L),D=N==="edit-video",A=N==="extend-video",B=N==="reference-to-video";if($.fps!=null)F.push({type:"unsupported",feature:"fps",details:"xAI video models do not support custom FPS."});if($.seed!=null)F.push({type:"unsupported",feature:"seed",details:"xAI video models do not support seed."});if($.n!=null&&$.n>1)F.push({type:"unsupported",feature:"n",details:"xAI video models do not support generating multiple videos per call. Only 1 video will be generated."});if(D&&$.duration!=null)F.push({type:"unsupported",feature:"duration",details:"xAI video editing does not support custom duration."});if(D&&$.aspectRatio!=null)F.push({type:"unsupported",feature:"aspectRatio",details:"xAI video editing does not support custom aspect ratio."});if(D&&((L==null?void 0:L.resolution)!=null||$.resolution!=null))F.push({type:"unsupported",feature:"resolution",details:"xAI video editing does not support custom resolution."});if(A&&$.aspectRatio!=null)F.push({type:"unsupported",feature:"aspectRatio",details:"xAI video extension does not support custom aspect ratio."});if(A&&((L==null?void 0:L.resolution)!=null||$.resolution!=null))F.push({type:"unsupported",feature:"resolution",details:"xAI video extension does not support custom resolution."});let O={model:this.modelId,prompt:$.prompt},E=!D,M=!D&&!A,R=!D&&!A;if(E&&$.duration!=null)O.duration=$.duration;if(M&&$.aspectRatio!=null)O.aspect_ratio=$.aspectRatio;if(R&&(L==null?void 0:L.resolution)!=null)O.resolution=L.resolution;else if(R&&$.resolution!=null){let I=Ui8[$.resolution];if(I!=null)O.resolution=I;else F.push({type:"unsupported",feature:"resolution",details:`Unrecognized resolution "${$.resolution}". Use providerOptions.xai.resolution with "480p" or "720p" instead.`})}if(D)O.video={url:L.videoUrl};if(A)O.video={url:L.videoUrl};if($.image!=null)if($.image.type==="url")O.image={url:$.image.url};else{let I=typeof $.image.data==="string"?$.image.data:Fm($.image.data);O.image={url:`data:${$.image.mediaType};base64,${I}`}}if(B)O.reference_images=L.referenceImageUrls.map((I)=>({url:I}));if(L!=null){for(let[I,v]of Object.entries(L))if(!["mode","pollIntervalMs","pollTimeoutMs","resolution","videoUrl","referenceImageUrls"].includes(I))O[I]=v}let q=(J=this.config.baseURL)!=null?J:"https://api.x.ai/v1",_;if(D)_=`${q}/videos/edits`;else if(A)_=`${q}/videos/extensions`;else _=`${q}/videos/generations`;let{value:P}=await G9({url:_,headers:p8(this.config.headers(),$.headers),body:O,failedResponseHandler:OE,successfulResponseHandler:I5(Vi8),abortSignal:$.abortSignal,fetch:this.config.fetch}),w=P.request_id;if(!w)throw new A8({name:"XAI_VIDEO_GENERATION_ERROR",message:`No request_id returned from xAI API. Response: ${JSON.stringify(P)}`});let j=(Q=L==null?void 0:L.pollIntervalMs)!=null?Q:5000,C=(W=L==null?void 0:L.pollTimeoutMs)!=null?W:600000,k=Date.now(),S;while(!0){if(await u90(j,{abortSignal:$.abortSignal}),Date.now()-k>C)throw new A8({name:"XAI_VIDEO_GENERATION_TIMEOUT",message:`Video generation timed out after ${C}ms`});let{value:I,responseHeaders:v}=await Lm({url:`${q}/videos/${w}`,headers:p8(this.config.headers(),$.headers),successfulResponseHandler:I5(Fi8),failedResponseHandler:OE,abortSignal:$.abortSignal,fetch:this.config.fetch});if(S=v,I.status==="done"||I.status==null&&((K=I.video)==null?void 0:K.url)){if(((Z=I.video)==null?void 0:Z.respect_moderation)===!1)throw new A8({name:"XAI_VIDEO_MODERATION_ERROR",message:"Video generation was blocked due to a content policy violation."});if(!((H=I.video)==null?void 0:H.url))throw new A8({name:"XAI_VIDEO_GENERATION_ERROR",message:"Video generation completed but no video URL was returned."});return{videos:[{type:"url",url:I.video.url,mediaType:"video/mp4"}],warnings:F,response:{timestamp:V,modelId:this.modelId,headers:S},providerMetadata:{xai:{requestId:w,videoUrl:I.video.url,...I.video.duration!=null?{duration:I.video.duration}:{},...((z=I.usage)==null?void 0:z.cost_in_usd_ticks)!=null?{costInUsdTicks:I.usage.cost_in_usd_ticks}:{},...I.progress!=null?{progress:I.progress}:{}}}}}if(I.status==="expired")throw new A8({name:"XAI_VIDEO_GENERATION_EXPIRED",message:"Video generation request expired."});if(I.status==="failed")throw new A8({name:"XAI_VIDEO_GENERATION_FAILED",message:"Video generation failed."})}}},Vi8,Fi8,Li8,Di8,Ni8,e$4,Ai8,Bi8,$74=($,Y,X)=>(Y in $)?Li8($,Y,{enumerable:!0,configurable:!0,writable:!0,value:X}):$[Y]=X,h$=($,Y)=>{for(var X in Y||(Y={}))if(Ai8.call(Y,X))$74($,X,Y[X]);if(e$4){for(var X of e$4(Y))if(Bi8.call(Y,X))$74($,X,Y[X])}return $},Om=($,Y)=>Di8($,Ni8(Y)),R74="vercel.ai.error",Oi8,q74,Ei8,n7,P74="AI_APICallError",w74,Mi8,_74,tZ,j74="AI_EmptyResponseBodyError",T74,Ri8,I74,qi8,S74="AI_InvalidArgumentError",k74,Pi8,v74,x74,y74="AI_InvalidPromptError",b74,wi8,h74,_i8,f74="AI_InvalidResponseDataError",g74,ji8,m74,Nm,u74="AI_JSONParseError",p74,Ti8,d74,a90,c74="AI_LoadAPIKeyError",l74,Ii8,i74,i90,n74="AI_NoContentGeneratedError",r74,Ci8,a74,s74,o74="AI_TypeValidationError",t74,Si8,e74,ki8,Em,$Y4="AI_UnsupportedFunctionalityError",YY4,vi8,XY4,ED,Y74,bi8,hi8=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=()=>{let Q=X.length,W=Array(Y);for(let K=0;K<Y;K++)W[K]=X[Math.random()*Q|0];return W.join("")};if($==null)return J;if(X.includes(G))throw new x74({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return()=>`${$}${G}${J()}`},oZ,fi8,pi8,di8,Fb0,ei8=()=>globalThis.fetch,o90=async({url:$,headers:Y,body:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>$n8({url:$,headers:h$({"Content-Type":"application/json"},Y),body:{content:JSON.stringify(X),values:X},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),$n8=async({url:$,headers:Y={},body:X,successfulResponseHandler:G,failedResponseHandler:J,abortSignal:Q,fetch:W=ei8()})=>{try{let K=await W($,{method:"POST",headers:mi8(Y),body:X.content,signal:Q}),Z=$50(K);if(!K.ok){let H;try{H=await J({response:K,url:$,requestBodyValues:X.values})}catch(z){if(Vb0(z)||tZ.isInstance(z))throw z;throw new tZ({message:"Failed to process error response",cause:z,statusCode:K.status,url:$,responseHeaders:Z,requestBodyValues:X.values})}throw H.value}try{return await G({response:K,url:$,requestBodyValues:X.values})}catch(H){if(H instanceof Error){if(Vb0(H)||tZ.isInstance(H))throw H}throw new tZ({message:"Failed to process successful response",cause:H,statusCode:K.status,url:$,responseHeaders:Z,requestBodyValues:X.values})}}catch(K){throw gi8({error:K,url:$,requestBodyValues:X.values})}},Yn8=({errorSchema:$,errorToMessage:Y,isRetryable:X})=>async({response:G,url:J,requestBodyValues:Q})=>{let W=await G.text(),K=$50(G);if(W.trim()==="")return{responseHeaders:K,value:new tZ({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,isRetryable:X==null?void 0:X(G)})};try{let Z=await oi8({text:W,schema:$});return{responseHeaders:K,value:new tZ({message:Y(Z),url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,data:Z,isRetryable:X==null?void 0:X(G,Z)})}}catch(Z){return{responseHeaders:K,value:new tZ({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,isRetryable:X==null?void 0:X(G)})}}},QY4=($)=>async({response:Y})=>{let X=$50(Y);if(Y.body==null)throw new qi8({});return{responseHeaders:X,value:ti8({stream:Y.body,schema:$})}},WY4=($)=>async({response:Y,url:X,requestBodyValues:G})=>{let J=await Y.text(),Q=await JY4({text:J,schema:$}),W=$50(Y);if(!Q.success)throw new tZ({message:"Invalid JSON response",cause:Q.error,statusCode:Y.status,responseHeaders:W,responseBody:J,url:X,requestBodyValues:G});return{responseHeaders:W,value:Q.value,rawValue:Q.rawValue}},Xn8,KY4,Db0,Qn8,Wn8,Kn8,Nb0,n90,Ab0,Y50,t90,Zn8,Un8,Fn8,Ln8,UY4,HY4,Dn8,Nn8,An8=class{constructor($,Y,X){this.specificationVersion="v2",this.provider="openrouter",this.defaultObjectGenerationMode="tool",this.supportedUrls={"image/*":[/^data:image\/[a-zA-Z]+;base64,/,/^https?:\/\/.+\.(jpg|jpeg|png|gif|webp)$/i],"application/*":[/^data:application\//,/^https?:\/\/.+$/]},this.modelId=$,this.settings=Y,this.config=X}getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,frequencyPenalty:J,presencePenalty:Q,seed:W,stopSequences:K,responseFormat:Z,topK:H,tools:z,toolChoice:V}){var F;let L=h$(h$({model:this.modelId,models:this.settings.models,logit_bias:this.settings.logitBias,logprobs:this.settings.logprobs===!0||typeof this.settings.logprobs==="number"?!0:void 0,top_logprobs:typeof this.settings.logprobs==="number"?this.settings.logprobs:typeof this.settings.logprobs==="boolean"?this.settings.logprobs?0:void 0:void 0,user:this.settings.user,parallel_tool_calls:this.settings.parallelToolCalls,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:J,presence_penalty:Q,seed:W,stop:K,response_format:Z,top_k:H,messages:Hn8($),include_reasoning:this.settings.includeReasoning,reasoning:this.settings.reasoning,usage:this.settings.usage,plugins:this.settings.plugins,web_search_options:this.settings.web_search_options,provider:this.settings.provider},this.config.extraBody),this.settings.extraBody);if((Z==null?void 0:Z.type)==="json"&&Z.schema!=null)return Om(h$({},L),{response_format:{type:"json_schema",json_schema:h$({schema:Z.schema,strict:!0,name:(F=Z.name)!=null?F:"response"},Z.description&&{description:Z.description})}});if(z&&z.length>0){let N=z.filter((D)=>D.type==="function").map((D)=>({type:"function",function:{name:D.name,description:D.description,parameters:D.inputSchema}}));return Om(h$({},L),{tools:N,tool_choice:V?Vn8(V):void 0})}return L}async doGenerate($){var Y,X,G,J,Q,W,K,Z,H,z,V,F,L,N,D,A,B,O,E,M,R,q,_,P,w;let C=($.providerOptions||{}).openrouter||{},k=h$(h$({},this.getArgs($)),C),{value:S,responseHeaders:I}=await o90({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:s90(this.config.headers(),$.headers),body:k,failedResponseHandler:t90,successfulResponseHandler:WY4(Dn8),abortSignal:$.abortSignal,fetch:this.config.fetch});if("error"in S){let g=S.error;throw new tZ({message:g.message,url:this.config.url({path:"/chat/completions",modelId:this.modelId}),requestBodyValues:k,statusCode:200,responseHeaders:I,data:g})}let v=S,x=v.choices[0];if(!x)throw new s74({message:"No choice in response"});let y=v.usage?{inputTokens:(Y=v.usage.prompt_tokens)!=null?Y:0,outputTokens:(X=v.usage.completion_tokens)!=null?X:0,totalTokens:((G=v.usage.prompt_tokens)!=null?G:0)+((J=v.usage.completion_tokens)!=null?J:0),reasoningTokens:(W=(Q=v.usage.completion_tokens_details)==null?void 0:Q.reasoning_tokens)!=null?W:0,cachedInputTokens:(Z=(K=v.usage.prompt_tokens_details)==null?void 0:K.cached_tokens)!=null?Z:0}:{inputTokens:0,outputTokens:0,totalTokens:0,reasoningTokens:0,cachedInputTokens:0},d=(H=x.message.reasoning_details)!=null?H:[],u=d.length>0?d.map((g)=>{switch(g.type){case"reasoning.text":{if(g.text)return{type:"reasoning",text:g.text};break}case"reasoning.summary":{if(g.summary)return{type:"reasoning",text:g.summary};break}case"reasoning.encrypted":{if(g.data)return{type:"reasoning",text:"[REDACTED]"};break}}return null}).filter((g)=>g!==null):x.message.reasoning?[{type:"reasoning",text:x.message.reasoning}]:[],b=[];if(b.push(...u),x.message.content)b.push({type:"text",text:x.message.content});if(x.message.tool_calls)for(let g of x.message.tool_calls)b.push({type:"tool-call",toolCallId:(z=g.id)!=null?z:oZ(),toolName:g.function.name,input:g.function.arguments});if(x.message.images)for(let g of x.message.images)b.push({type:"file",mediaType:G74(g.image_url.url,"image/jpeg"),data:J74(g.image_url.url)});if(x.message.annotations){for(let g of x.message.annotations)if(g.type==="url_citation")b.push({type:"source",sourceType:"url",id:g.url_citation.url,url:g.url_citation.url,title:g.url_citation.title,providerMetadata:{openrouter:{content:g.url_citation.content||""}}})}return{content:b,finishReason:e90(x.finish_reason),usage:y,warnings:[],providerMetadata:{openrouter:Zn8.parse({provider:(V=v.provider)!=null?V:"",reasoning_details:(F=x.message.reasoning_details)!=null?F:[],usage:{promptTokens:(L=y.inputTokens)!=null?L:0,completionTokens:(N=y.outputTokens)!=null?N:0,totalTokens:(D=y.totalTokens)!=null?D:0,cost:(A=v.usage)==null?void 0:A.cost,promptTokensDetails:{cachedTokens:(E=(O=(B=v.usage)==null?void 0:B.prompt_tokens_details)==null?void 0:O.cached_tokens)!=null?E:0},completionTokensDetails:{reasoningTokens:(q=(R=(M=v.usage)==null?void 0:M.completion_tokens_details)==null?void 0:R.reasoning_tokens)!=null?q:0},costDetails:{upstreamInferenceCost:(w=(P=(_=v.usage)==null?void 0:_.cost_details)==null?void 0:P.upstream_inference_cost)!=null?w:0}}})},request:{body:k},response:{id:v.id,modelId:v.model,headers:I}}}async doStream($){var Y;let G=($.providerOptions||{}).openrouter||{},J=h$(h$({},this.getArgs($)),G),{value:Q,responseHeaders:W}=await o90({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:s90(this.config.headers(),$.headers),body:Om(h$({},J),{stream:!0,stream_options:this.config.compatibility==="strict"?h$({include_usage:!0},((Y=this.settings.usage)==null?void 0:Y.include)?{include_usage:!0}:{}):void 0}),failedResponseHandler:t90,successfulResponseHandler:QY4(Nn8),abortSignal:$.abortSignal,fetch:this.config.fetch}),K=[],Z="other",H={inputTokens:Number.NaN,outputTokens:Number.NaN,totalTokens:Number.NaN,reasoningTokens:Number.NaN,cachedInputTokens:Number.NaN},z={},V=[],F=!1,L=!1,N,D,A,B;return{stream:Q.pipeThrough(new TransformStream({transform(O,E){var M,R,q,_,P,w,j,C,k,S,I,v,x,y;if(!O.success){Z="error",E.enqueue({type:"error",error:O.error});return}let d=O.value;if("error"in d){Z="error",E.enqueue({type:"error",error:d.error});return}if(d.provider)B=d.provider;if(d.id)A=d.id,E.enqueue({type:"response-metadata",id:d.id});if(d.model)E.enqueue({type:"response-metadata",modelId:d.model});if(d.usage!=null){if(H.inputTokens=d.usage.prompt_tokens,H.outputTokens=d.usage.completion_tokens,H.totalTokens=d.usage.prompt_tokens+d.usage.completion_tokens,z.promptTokens=d.usage.prompt_tokens,d.usage.prompt_tokens_details){let p=(M=d.usage.prompt_tokens_details.cached_tokens)!=null?M:0;H.cachedInputTokens=p,z.promptTokensDetails={cachedTokens:p}}if(z.completionTokens=d.usage.completion_tokens,d.usage.completion_tokens_details){let p=(R=d.usage.completion_tokens_details.reasoning_tokens)!=null?R:0;H.reasoningTokens=p,z.completionTokensDetails={reasoningTokens:p}}z.cost=d.usage.cost,z.totalTokens=d.usage.total_tokens}let u=d.choices[0];if((u==null?void 0:u.finish_reason)!=null)Z=e90(u.finish_reason);if((u==null?void 0:u.delta)==null)return;let b=u.delta,g=(p)=>{if(!L)D=A||oZ(),E.enqueue({type:"reasoning-start",id:D}),L=!0;E.enqueue({type:"reasoning-delta",delta:p,id:D||oZ()})};if(b.reasoning_details&&b.reasoning_details.length>0){V.push(...b.reasoning_details);for(let p of b.reasoning_details)switch(p.type){case"reasoning.text":{if(p.text)g(p.text);break}case"reasoning.encrypted":{if(p.data)g("[REDACTED]");break}case"reasoning.summary":{if(p.summary)g(p.summary);break}}}else if(b.reasoning)g(b.reasoning);if(b.content){if(L&&!F)E.enqueue({type:"reasoning-end",id:D||oZ()}),L=!1;if(!F)N=A||oZ(),E.enqueue({type:"text-start",id:N}),F=!0;E.enqueue({type:"text-delta",delta:b.content,id:N||oZ()})}if(b.annotations){for(let p of b.annotations)if(p.type==="url_citation")E.enqueue({type:"source",sourceType:"url",id:p.url_citation.url,url:p.url_citation.url,title:p.url_citation.title,providerMetadata:{openrouter:{content:p.url_citation.content||""}}})}if(b.tool_calls!=null)for(let p of b.tool_calls){let h=(q=p.index)!=null?q:K.length-1;if(K[h]==null){if(p.type!=="function")throw new Nm({data:p,message:"Expected 'function' type."});if(p.id==null)throw new Nm({data:p,message:"Expected 'id' to be a string."});if(((_=p.function)==null?void 0:_.name)==null)throw new Nm({data:p,message:"Expected 'function.name' to be a string."});K[h]={id:p.id,type:"function",function:{name:p.function.name,arguments:(P=p.function.arguments)!=null?P:""},inputStarted:!1,sent:!1};let t=K[h];if(t==null)throw new Nm({data:{index:h,toolCallsLength:K.length},message:`Tool call at index ${h} is missing after creation.`});if(((w=t.function)==null?void 0:w.name)!=null&&((j=t.function)==null?void 0:j.arguments)!=null&&Xb0(t.function.arguments))t.inputStarted=!0,E.enqueue({type:"tool-input-start",id:t.id,toolName:t.function.name}),E.enqueue({type:"tool-input-delta",id:t.id,delta:t.function.arguments}),E.enqueue({type:"tool-input-end",id:t.id}),E.enqueue({type:"tool-call",toolCallId:t.id,toolName:t.function.name,input:t.function.arguments}),t.sent=!0;continue}let n=K[h];if(n==null)throw new Nm({data:{index:h,toolCallsLength:K.length,toolCallDelta:p},message:`Tool call at index ${h} is missing during merge.`});if(!n.inputStarted)n.inputStarted=!0,E.enqueue({type:"tool-input-start",id:n.id,toolName:n.function.name});if(((C=p.function)==null?void 0:C.arguments)!=null)n.function.arguments+=(S=(k=p.function)==null?void 0:k.arguments)!=null?S:"";if(E.enqueue({type:"tool-input-delta",id:n.id,delta:(I=p.function.arguments)!=null?I:""}),((v=n.function)==null?void 0:v.name)!=null&&((x=n.function)==null?void 0:x.arguments)!=null&&Xb0(n.function.arguments))E.enqueue({type:"tool-call",toolCallId:(y=n.id)!=null?y:oZ(),toolName:n.function.name,input:n.function.arguments}),n.sent=!0}if(b.images!=null)for(let p of b.images)E.enqueue({type:"file",mediaType:G74(p.image_url.url,"image/jpeg"),data:J74(p.image_url.url)})},flush(O){var E;if(Z==="tool-calls"){for(let R of K)if(R&&!R.sent)O.enqueue({type:"tool-call",toolCallId:(E=R.id)!=null?E:oZ(),toolName:R.function.name,input:Xb0(R.function.arguments)?R.function.arguments:"{}"}),R.sent=!0}if(L)O.enqueue({type:"reasoning-end",id:D||oZ()});if(F)O.enqueue({type:"text-end",id:N||oZ()});let M={usage:z};if(B!==void 0)M.provider=B;if(V.length>0)M.reasoning_details=V;O.enqueue({type:"finish",finishReason:Z,usage:H,providerMetadata:{openrouter:M}})}})),warnings:[],request:{body:J},response:{headers:W}}}},Q74,On8=class{constructor($,Y,X){this.specificationVersion="v2",this.provider="openrouter",this.supportedUrls={"image/*":[/^data:image\/[a-zA-Z]+;base64,/,/^https?:\/\/.+\.(jpg|jpeg|png|gif|webp)$/i],"text/*":[/^data:text\//,/^https?:\/\/.+$/],"application/*":[/^data:application\//,/^https?:\/\/.+$/]},this.defaultObjectGenerationMode=void 0,this.modelId=$,this.settings=Y,this.config=X}getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,frequencyPenalty:J,presencePenalty:Q,seed:W,responseFormat:K,topK:Z,stopSequences:H,tools:z,toolChoice:V}){let{prompt:F}=Bn8({prompt:$,inputFormat:"prompt"});if(z==null?void 0:z.length)throw new ED({functionality:"tools"});if(V)throw new ED({functionality:"toolChoice"});return h$(h$({model:this.modelId,models:this.settings.models,logit_bias:this.settings.logitBias,logprobs:typeof this.settings.logprobs==="number"?this.settings.logprobs:typeof this.settings.logprobs==="boolean"?this.settings.logprobs?0:void 0:void 0,suffix:this.settings.suffix,user:this.settings.user,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:J,presence_penalty:Q,seed:W,stop:H,response_format:K,top_k:Z,prompt:F,include_reasoning:this.settings.includeReasoning,reasoning:this.settings.reasoning},this.config.extraBody),this.settings.extraBody)}async doGenerate($){var Y,X,G,J,Q,W,K,Z,H,z,V,F,L,N,D;let B=($.providerOptions||{}).openrouter||{},O=h$(h$({},this.getArgs($)),B),{value:E,responseHeaders:M}=await o90({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:s90(this.config.headers(),$.headers),body:O,failedResponseHandler:t90,successfulResponseHandler:WY4(Q74),abortSignal:$.abortSignal,fetch:this.config.fetch});if("error"in E){let q=E.error;throw new tZ({message:q.message,url:this.config.url({path:"/completions",modelId:this.modelId}),requestBodyValues:O,statusCode:200,responseHeaders:M,data:q})}let R=E.choices[0];if(!R)throw new s74({message:"No choice in OpenRouter completion response"});return{content:[{type:"text",text:(Y=R.text)!=null?Y:""}],finishReason:e90(R.finish_reason),usage:{inputTokens:(G=(X=E.usage)==null?void 0:X.prompt_tokens)!=null?G:0,outputTokens:(Q=(J=E.usage)==null?void 0:J.completion_tokens)!=null?Q:0,totalTokens:((K=(W=E.usage)==null?void 0:W.prompt_tokens)!=null?K:0)+((H=(Z=E.usage)==null?void 0:Z.completion_tokens)!=null?H:0),reasoningTokens:(F=(V=(z=E.usage)==null?void 0:z.completion_tokens_details)==null?void 0:V.reasoning_tokens)!=null?F:0,cachedInputTokens:(D=(N=(L=E.usage)==null?void 0:L.prompt_tokens_details)==null?void 0:N.cached_tokens)!=null?D:0},warnings:[],response:{headers:M}}}async doStream($){let X=($.providerOptions||{}).openrouter||{},G=h$(h$({},this.getArgs($)),X),{value:J,responseHeaders:Q}=await o90({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:s90(this.config.headers(),$.headers),body:Om(h$({},G),{stream:!0,stream_options:this.config.compatibility==="strict"?{include_usage:!0}:void 0}),failedResponseHandler:t90,successfulResponseHandler:QY4(Q74),abortSignal:$.abortSignal,fetch:this.config.fetch}),W="other",K={inputTokens:Number.NaN,outputTokens:Number.NaN,totalTokens:Number.NaN,reasoningTokens:Number.NaN,cachedInputTokens:Number.NaN},Z={};return{stream:J.pipeThrough(new TransformStream({transform(H,z){var V,F;if(!H.success){W="error",z.enqueue({type:"error",error:H.error});return}let L=H.value;if("error"in L){W="error",z.enqueue({type:"error",error:L.error});return}if(L.usage!=null){if(K.inputTokens=L.usage.prompt_tokens,K.outputTokens=L.usage.completion_tokens,K.totalTokens=L.usage.prompt_tokens+L.usage.completion_tokens,Z.promptTokens=L.usage.prompt_tokens,L.usage.prompt_tokens_details){let D=(V=L.usage.prompt_tokens_details.cached_tokens)!=null?V:0;K.cachedInputTokens=D,Z.promptTokensDetails={cachedTokens:D}}if(Z.completionTokens=L.usage.completion_tokens,L.usage.completion_tokens_details){let D=(F=L.usage.completion_tokens_details.reasoning_tokens)!=null?F:0;K.reasoningTokens=D,Z.completionTokensDetails={reasoningTokens:D}}Z.cost=L.usage.cost,Z.totalTokens=L.usage.total_tokens}let N=L.choices[0];if((N==null?void 0:N.finish_reason)!=null)W=e90(N.finish_reason);if((N==null?void 0:N.text)!=null)z.enqueue({type:"text-delta",delta:N.text,id:oZ()})},flush(H){H.enqueue({type:"finish",finishReason:W,usage:K,providerMetadata:{openrouter:{usage:Z}}})}})),response:{headers:Q}}}},Rn8="1.2.3",Am,WT;var X50=V0(()=>{Dm();Qk0();O1();zc8=U.object({message:U.string(),type:U.string(),param:U.string(),code:U.string()}),Vc8={errorSchema:zc8,errorToMessage:($)=>$.message};W74();Lc8=U.object({detail:U.object({error:U.string()})}),Dc8=U.object({images:U.array(U.string())}),Nc8=class extends Vm{constructor($,Y){super($,Y)}fixUsage($){var Y,X;let G=(Y=$.outputTokens)!=null?Y:0,J=(X=$.reasoningTokens)!=null?X:0;if(J>G){let Q=G+J;return{...$,outputTokens:Q,totalTokens:$.totalTokens!=null?$.totalTokens+J:void 0}}return $}async doGenerate($){let Y=await super.doGenerate($);return{...Y,usage:this.fixUsage(Y.usage)}}async doStream($){let Y=await super.doStream($),X=this.fixUsage.bind(this),G=Y.stream.pipeThrough(new TransformStream({transform(J,Q){if(J.type==="finish")Q.enqueue({...J,usage:X(J.usage)});else Q.enqueue(J)}}));return{...Y,stream:G}}};K74();Z74=U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),prompt_cache_hit_tokens:U.number().nullish(),prompt_cache_miss_tokens:U.number().nullish(),total_tokens:U.number().nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}).nullish(),U74=U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.any().nullish(),code:U.union([U.string(),U.number()]).nullish()})}),Oc8=U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({role:U.literal("assistant").nullish(),content:U.string().nullish(),reasoning_content:U.string().nullish(),tool_calls:U.array(U.object({id:U.string().nullish(),function:U.object({name:U.string(),arguments:U.string()})})).nullish()}),finish_reason:U.string().nullish()})),usage:Z74}),Ec8=Y6(()=>v1(U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).nullish(),content:U.string().nullish(),reasoning_content:U.string().nullish(),tool_calls:U.array(U.object({index:U.number(),id:U.string().nullish(),function:U.object({name:U.string().nullish(),arguments:U.string().nullish()})})).nullish()}).nullish(),finish_reason:U.string().nullish()})),usage:Z74}),U74]))),Mc8=U.object({thinking:U.object({type:U.enum(["enabled","disabled"]).optional()}).optional(),reasoningEffort:U.enum(["high","max"]).optional()});H74();_c8=U.object({reasoningFormat:U.enum(["parsed","raw","hidden"]).optional(),reasoningEffort:U.enum(["none","default","low","medium","high"]).optional(),parallelToolCalls:U.boolean().optional(),user:U.string().optional(),structuredOutputs:U.boolean().optional(),strictJsonSchema:U.boolean().optional(),serviceTier:U.enum(["on_demand","performance","flex","auto"]).optional()}),z74=U.object({error:U.object({message:U.string(),type:U.string()})}),Jb0=NE({errorSchema:z74,errorToMessage:($)=>$.error.message}),V74=["openai/gpt-oss-20b","openai/gpt-oss-120b"];Sc8=U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({content:U.string().nullish(),reasoning:U.string().nullish(),tool_calls:U.array(U.object({id:U.string().nullish(),type:U.literal("function"),function:U.object({name:U.string(),arguments:U.string()})})).nullish()}),index:U.number(),finish_reason:U.string().nullish()})),usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}).nullish()}),kc8=U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({content:U.string().nullish(),reasoning:U.string().nullish(),tool_calls:U.array(U.object({index:U.number(),id:U.string().nullish(),type:U.literal("function").optional(),function:U.object({name:U.string().nullish(),arguments:U.string().nullish()})})).nullish()}).nullish(),finish_reason:U.string().nullable().optional(),index:U.number()})),x_groq:U.object({usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}).nullish()}).nullish()}),z74]),vc8=J1(()=>G1(U.object({language:U.string().nullish(),prompt:U.string().nullish(),responseFormat:U.string().nullish(),temperature:U.number().min(0).max(1).nullish(),timestampGranularities:U.array(U.string()).nullish()}))),yc8=U.object({text:U.string(),x_groq:U.object({id:U.string()}),task:U.string().nullish(),language:U.string().nullish(),duration:U.number().nullish(),segments:U.array(U.object({id:U.number(),seek:U.number(),start:U.number(),end:U.number(),text:U.string(),tokens:U.array(U.number()),temperature:U.number(),avg_logprob:U.number(),compression_ratio:U.number(),no_speech_prob:U.number()})).nullish()}),bc8=LY({id:"groq.browser_search",inputSchema:U.object({})}),hc8={browserSearch:bc8};F74();mc8=U.object({safePrompt:U.boolean().optional(),documentImageLimit:U.number().optional(),documentPageLimit:U.number().optional(),structuredOutputs:U.boolean().optional(),strictJsonSchema:U.boolean().optional(),parallelToolCalls:U.boolean().optional(),reasoningEffort:U.enum(["high","none"]).optional()}),uc8=U.object({object:U.literal("error"),message:U.string(),type:U.string(),param:U.string().nullable(),code:U.string().nullable()}),Qb0=NE({errorSchema:uc8,errorToMessage:($)=>$.message});L74=U.union([U.string(),U.array(U.discriminatedUnion("type",[U.object({type:U.literal("text"),text:U.string()}),U.object({type:U.literal("image_url"),image_url:U.union([U.string(),U.object({url:U.string(),detail:U.string().nullable()})])}),U.object({type:U.literal("reference"),reference_ids:U.array(U.union([U.string(),U.number()]))}),U.object({type:U.literal("thinking"),thinking:U.array(U.object({type:U.literal("text"),text:U.string()}))})]))]).nullish(),D74=U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number(),num_cached_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),prompt_token_details:U.object({cached_tokens:U.number().nullish()}).nullish()}),cc8=U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({role:U.literal("assistant"),content:L74,tool_calls:U.array(U.object({id:U.string(),function:U.object({name:U.string(),arguments:U.string()})})).nullish()}),index:U.number(),finish_reason:U.string().nullish()})),object:U.literal("chat.completion"),usage:D74}),lc8=U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).optional(),content:L74,tool_calls:U.array(U.object({id:U.string(),function:U.object({name:U.string(),arguments:U.string()})})).nullish()}),finish_reason:U.string().nullish(),index:U.number()})),usage:D74.nullish()}),nc8=U.object({data:U.array(U.object({embedding:U.array(U.number())})),usage:U.object({prompt_tokens:U.number()}).nullish()});Wb0();oc8=U.object({input_tokens_cost:U.number().nullish(),output_tokens_cost:U.number().nullish(),request_cost:U.number().nullish(),total_cost:U.number().nullish()}),N74=U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number().nullish(),citation_tokens:U.number().nullish(),num_search_queries:U.number().nullish(),reasoning_tokens:U.number().nullish(),cost:oc8.nullish()}),A74=U.object({image_url:U.string(),origin_url:U.string(),height:U.number(),width:U.number()}),tc8=U.object({id:U.string(),created:U.number(),model:U.string(),choices:U.array(U.object({message:U.object({role:U.literal("assistant"),content:U.string()}),finish_reason:U.string().nullish()})),citations:U.array(U.string()).nullish(),images:U.array(A74).nullish(),usage:N74.nullish()}),ec8=U.object({id:U.string(),created:U.number(),model:U.string(),choices:U.array(U.object({delta:U.object({role:U.literal("assistant"),content:U.string()}),finish_reason:U.string().nullish()})),citations:U.array(U.string()).nullish(),images:U.array(A74).nullish(),usage:N74.nullish()}),a$4=U.object({error:U.object({code:U.number(),message:U.string().nullish(),type:U.string().nullish()})});B74();Xl8=U.object({data:U.array(U.object({b64_json:U.string()}))}),Gl8=U.object({error:U.object({message:U.string()})});O74();Kl8=U.object({type:U.literal("web"),country:U.string().length(2).optional(),excludedWebsites:U.array(U.string()).max(5).optional(),allowedWebsites:U.array(U.string()).max(5).optional(),safeSearch:U.boolean().optional()}),Zl8=U.object({type:U.literal("x"),excludedXHandles:U.array(U.string()).optional(),includedXHandles:U.array(U.string()).optional(),postFavoriteCount:U.number().int().optional(),postViewCount:U.number().int().optional(),xHandles:U.array(U.string()).optional()}),Ul8=U.object({type:U.literal("news"),country:U.string().length(2).optional(),excludedWebsites:U.array(U.string()).max(5).optional(),safeSearch:U.boolean().optional()}),Hl8=U.object({type:U.literal("rss"),links:U.array(U.string().url()).max(1)}),zl8=U.discriminatedUnion("type",[Kl8,Zl8,Ul8,Hl8]),Vl8=U.object({reasoningEffort:U.enum(["low","high"]).optional(),logprobs:U.boolean().optional(),topLogprobs:U.number().int().min(0).max(8).optional(),parallel_function_calling:U.boolean().optional(),searchParameters:U.object({mode:U.enum(["off","auto","on"]),returnCitations:U.boolean().optional(),fromDate:U.string().optional(),toDate:U.string().optional(),maxSearchResults:U.number().min(1).max(50).optional(),sources:U.array(zl8).optional()}).optional()}),Fl8=U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.any().nullish(),code:U.union([U.string(),U.number()]).nullish()})}),OE=NE({errorSchema:Fl8,errorToMessage:($)=>$.error.message});E74=U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number(),prompt_tokens_details:U.object({text_tokens:U.number().nullish(),audio_tokens:U.number().nullish(),image_tokens:U.number().nullish(),cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),audio_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}),Nl8=U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({role:U.literal("assistant"),content:U.string().nullish(),reasoning_content:U.string().nullish(),tool_calls:U.array(U.object({id:U.string(),type:U.literal("function"),function:U.object({name:U.string(),arguments:U.string()})})).nullish()}),index:U.number(),finish_reason:U.string().nullish()})).nullish(),object:U.literal("chat.completion").nullish(),usage:E74.nullish(),citations:U.array(U.string().url()).nullish(),code:U.string().nullish(),error:U.string().nullish()}),Al8=U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).optional(),content:U.string().nullish(),reasoning_content:U.string().nullish(),tool_calls:U.array(U.object({id:U.string(),type:U.literal("function"),function:U.object({name:U.string(),arguments:U.string()})})).nullish()}),finish_reason:U.string().nullish(),index:U.number()})),usage:E74.nullish(),citations:U.array(U.string().url()).nullish()}),Bl8=U.object({code:U.string(),error:U.string()}),Ol8=U.object({aspect_ratio:U.string().optional(),output_format:U.string().optional(),sync_mode:U.boolean().optional(),resolution:U.enum(["1k","2k"]).optional(),quality:U.enum(["low","medium","high"]).optional(),user:U.string().optional()}),Ml8=U.object({data:U.array(U.object({url:U.string().nullish(),b64_json:U.string().nullish(),revised_prompt:U.string().nullish()})),usage:U.object({cost_in_usd_ticks:U.number().nullish()}).nullish()});Kb0=U.union([U.object({type:U.literal("url_citation"),url:U.string(),title:U.string().optional()}),U.object({type:U.string()})]),Zb0=U.object({type:U.string(),text:U.string().optional(),logprobs:U.array(U.any()).optional(),annotations:U.array(Kb0).optional()}),Ub0=U.object({type:U.string(),text:U.string()}),BE=U.object({name:U.string().optional(),arguments:U.string().optional(),input:U.string().optional(),call_id:U.string().optional(),id:U.string(),status:U.string(),action:U.any().optional()}),ql8=U.object({name:U.string().optional(),arguments:U.string().optional(),output:U.string().optional(),error:U.string().optional(),id:U.string(),status:U.string(),server_label:U.string().optional()}),Hb0=U.discriminatedUnion("type",[U.object({type:U.literal("web_search_call"),...BE.shape}),U.object({type:U.literal("x_search_call"),...BE.shape}),U.object({type:U.literal("code_interpreter_call"),...BE.shape}),U.object({type:U.literal("code_execution_call"),...BE.shape}),U.object({type:U.literal("view_image_call"),...BE.shape}),U.object({type:U.literal("view_x_video_call"),...BE.shape}),U.object({type:U.literal("file_search_call"),id:U.string(),status:U.string(),queries:U.array(U.string()).optional(),results:U.array(U.object({file_id:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullish()}),U.object({type:U.literal("custom_tool_call"),...BE.shape}),U.object({type:U.literal("mcp_call"),...ql8.shape}),U.object({type:U.literal("message"),role:U.string(),content:U.array(Zb0),id:U.string(),status:U.string()}),U.object({type:U.literal("function_call"),name:U.string(),arguments:U.string(),call_id:U.string(),id:U.string()}),U.object({type:U.literal("reasoning"),id:U.string(),summary:U.array(Ub0),status:U.string(),encrypted_content:U.string().nullish()})]),zb0=U.object({input_tokens:U.number(),output_tokens:U.number(),total_tokens:U.number().optional(),input_tokens_details:U.object({cached_tokens:U.number().optional()}).optional(),output_tokens_details:U.object({reasoning_tokens:U.number().optional()}).optional(),num_sources_used:U.number().optional(),num_server_side_tools_used:U.number().optional()}),Bm=U.object({id:U.string().nullish(),created_at:U.number().nullish(),model:U.string().nullish(),object:U.literal("response"),output:U.array(Hb0),usage:zb0.nullish(),status:U.string()}),Pl8=U.union([U.object({type:U.literal("response.created"),response:Bm.partial({usage:!0,status:!0})}),U.object({type:U.literal("response.in_progress"),response:Bm.partial({usage:!0,status:!0})}),U.object({type:U.literal("response.output_item.added"),item:Hb0,output_index:U.number()}),U.object({type:U.literal("response.output_item.done"),item:Hb0,output_index:U.number()}),U.object({type:U.literal("response.content_part.added"),item_id:U.string(),output_index:U.number(),content_index:U.number(),part:Zb0}),U.object({type:U.literal("response.content_part.done"),item_id:U.string(),output_index:U.number(),content_index:U.number(),part:Zb0}),U.object({type:U.literal("response.output_text.delta"),item_id:U.string(),output_index:U.number(),content_index:U.number(),delta:U.string(),logprobs:U.array(U.any()).optional()}),U.object({type:U.literal("response.output_text.done"),item_id:U.string(),output_index:U.number(),content_index:U.number(),text:U.string(),logprobs:U.array(U.any()).optional(),annotations:U.array(Kb0).optional()}),U.object({type:U.literal("response.output_text.annotation.added"),item_id:U.string(),output_index:U.number(),content_index:U.number(),annotation_index:U.number(),annotation:Kb0}),U.object({type:U.literal("response.reasoning_summary_part.added"),item_id:U.string(),output_index:U.number(),summary_index:U.number(),part:Ub0}),U.object({type:U.literal("response.reasoning_summary_part.done"),item_id:U.string(),output_index:U.number(),summary_index:U.number(),part:Ub0}),U.object({type:U.literal("response.reasoning_summary_text.delta"),item_id:U.string(),output_index:U.number(),summary_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.reasoning_summary_text.done"),item_id:U.string(),output_index:U.number(),summary_index:U.number(),text:U.string()}),U.object({type:U.literal("response.reasoning_text.delta"),item_id:U.string(),output_index:U.number(),content_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.reasoning_text.done"),item_id:U.string(),output_index:U.number(),content_index:U.number(),text:U.string()}),U.object({type:U.literal("response.web_search_call.in_progress"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.web_search_call.searching"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.web_search_call.completed"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.x_search_call.in_progress"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.x_search_call.searching"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.x_search_call.completed"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.file_search_call.in_progress"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.file_search_call.searching"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.file_search_call.completed"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.code_execution_call.in_progress"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.code_execution_call.executing"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.code_execution_call.completed"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.code_interpreter_call.in_progress"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.code_interpreter_call.executing"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.code_interpreter_call.interpreting"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.code_interpreter_call.completed"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.code_interpreter_call_code.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.code_interpreter_call_code.done"),item_id:U.string(),output_index:U.number(),code:U.string()}),U.object({type:U.literal("response.custom_tool_call_input.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.custom_tool_call_input.done"),item_id:U.string(),output_index:U.number(),input:U.string()}),U.object({type:U.literal("response.function_call_arguments.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.function_call_arguments.done"),item_id:U.string(),output_index:U.number(),arguments:U.string()}),U.object({type:U.literal("response.mcp_call.in_progress"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.mcp_call.executing"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.mcp_call.completed"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.mcp_call.failed"),item_id:U.string(),output_index:U.number()}),U.object({type:U.literal("response.mcp_call_arguments.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.mcp_call_arguments.done"),item_id:U.string(),output_index:U.number(),arguments:U.string().optional()}),U.object({type:U.literal("response.mcp_call_output.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.mcp_call_output.done"),item_id:U.string(),output_index:U.number(),output:U.string().optional()}),U.object({type:U.literal("response.incomplete"),response:U.object({incomplete_details:U.object({reason:U.string()}).nullish(),usage:zb0.nullish()})}),U.object({type:U.literal("response.failed"),response:U.object({error:U.object({code:U.string().nullish(),message:U.string()}).nullish(),incomplete_details:U.object({reason:U.string()}).nullish(),usage:zb0.nullish()})}),U.object({type:U.literal("error"),code:U.string().nullish(),message:U.string(),param:U.string().nullish()}),U.object({type:U.literal("response.done"),response:Bm}),U.object({type:U.literal("response.completed"),response:Bm})]),wl8=U.object({reasoningEffort:U.enum(["low","medium","high"]).optional(),logprobs:U.boolean().optional(),topLogprobs:U.number().int().min(0).max(8).optional(),store:U.boolean().optional(),previousResponseId:U.string().optional(),include:U.array(U.enum(["file_search_call.results"])).nullish()}),_l8=J1(()=>G1(U.object({vectorStoreIds:U.array(U.string()),maxNumResults:U.number().optional()}))),jl8=J1(()=>G1(U.object({queries:U.array(U.string()),results:U.array(U.object({fileId:U.string(),filename:U.string(),score:U.number().min(0).max(1),text:U.string()})).nullable()}))),Tl8=L5({id:"xai.file_search",inputSchema:J1(()=>G1(U.object({}))),outputSchema:jl8}),Cl8=J1(()=>G1(U.object({serverUrl:U.string().describe("The URL of the MCP server"),serverLabel:U.string().optional().describe("A label for the MCP server"),serverDescription:U.string().optional().describe("Description of the MCP server"),allowedTools:U.array(U.string()).optional().describe("List of allowed tool names"),headers:U.record(U.string(),U.string()).optional().describe("Custom headers to send"),authorization:U.string().optional().describe("Authorization header value")}))),Sl8=J1(()=>G1(U.object({name:U.string(),arguments:U.string(),result:U.unknown()}))),kl8=L5({id:"xai.mcp",inputSchema:J1(()=>G1(U.object({}))),outputSchema:Sl8}),xl8=J1(()=>G1(U.object({allowedDomains:U.array(U.string()).max(5).optional(),excludedDomains:U.array(U.string()).max(5).optional(),enableImageUnderstanding:U.boolean().optional()}))),yl8=J1(()=>G1(U.object({query:U.string(),sources:U.array(U.object({title:U.string(),url:U.string(),snippet:U.string()}))}))),bl8=L5({id:"xai.web_search",inputSchema:J1(()=>G1(U.object({}))),outputSchema:yl8}),fl8=J1(()=>G1(U.object({allowedXHandles:U.array(U.string()).max(10).optional(),excludedXHandles:U.array(U.string()).max(10).optional(),fromDate:U.string().optional(),toDate:U.string().optional(),enableImageUnderstanding:U.boolean().optional(),enableVideoUnderstanding:U.boolean().optional()}))),gl8=J1(()=>G1(U.object({query:U.string(),posts:U.array(U.object({author:U.string(),text:U.string(),url:U.string(),likes:U.number()}))}))),ml8=L5({id:"xai.x_search",inputSchema:J1(()=>G1(U.object({}))),outputSchema:gl8});cl8=U.object({output:U.string().describe("the output of the code execution"),error:U.string().optional().describe("any error that occurred")}),ll8=L5({id:"xai.code_execution",inputSchema:U.object({}).describe("no input parameters"),outputSchema:cl8}),nl8=U.object({description:U.string().describe("description of the image"),objects:U.array(U.string()).optional().describe("objects detected in the image")}),rl8=L5({id:"xai.view_image",inputSchema:U.object({}).describe("no input parameters"),outputSchema:nl8}),sl8=U.object({transcript:U.string().optional().describe("transcript of the video"),description:U.string().describe("description of the video content"),duration:U.number().optional().describe("duration in seconds")}),ol8=L5({id:"xai.view_x_video",inputSchema:U.object({}).describe("no input parameters"),outputSchema:sl8}),el8={codeExecution:il8,fileSearch:Il8,mcpServer:vl8,viewImage:al8,viewXVideo:tl8,webSearch:hl8,xSearch:ul8},EE=U.string().min(1),Yi8=U.enum(["480p","720p"]),Xi8=U.enum(["edit-video","extend-video","reference-to-video"]),Mm={pollIntervalMs:U.number().positive().nullish(),pollTimeoutMs:U.number().positive().nullish(),resolution:Yi8.nullish()},Gi8=U.object({...Mm,mode:U.literal("edit-video"),videoUrl:EE,referenceImageUrls:U.undefined().optional()}),Ji8=U.object({...Mm,mode:U.literal("extend-video"),videoUrl:EE,referenceImageUrls:U.undefined().optional()}),Qi8=U.object({...Mm,mode:U.literal("reference-to-video"),referenceImageUrls:U.array(EE).min(1).max(7),videoUrl:U.undefined().optional()}),Wi8=U.object({...Mm,mode:U.undefined().optional(),videoUrl:EE.optional(),referenceImageUrls:U.array(EE).min(1).max(7).optional()});U.union([Gi8,Ji8,Qi8,Wi8]);Ki8=U.object({mode:Xi8.optional(),videoUrl:EE.optional(),referenceImageUrls:U.array(EE).min(1).max(7).optional(),...Mm}).passthrough(),Zi8=J1(()=>G1(Ki8)),Ui8={"1280x720":"720p","854x480":"480p","640x480":"480p"};Vi8=U.object({request_id:U.string().nullish()}),Fi8=U.object({status:U.string().nullish(),video:U.object({url:U.string(),duration:U.number().nullish(),respect_moderation:U.boolean().nullish()}).nullish(),model:U.string().nullish(),usage:U.object({cost_in_usd_ticks:U.number().nullish()}).nullish(),progress:U.number().nullish(),error:U.object({code:U.string().nullish(),message:U.string().nullish()}).nullish()});M74();Li8=Object.defineProperty,Di8=Object.defineProperties,Ni8=Object.getOwnPropertyDescriptors,e$4=Object.getOwnPropertySymbols,Ai8=Object.prototype.hasOwnProperty,Bi8=Object.prototype.propertyIsEnumerable,Oi8=Symbol.for(R74),Ei8=class $ extends Error{constructor({name:Y,message:X,cause:G}){super(X);this[q74]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,R74)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}};q74=Oi8;n7=Ei8,w74=`vercel.ai.error.${P74}`,Mi8=Symbol.for(w74),tZ=class extends n7{constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:K=G!=null&&(G===408||G===409||G===429||G>=500),data:Z}){super({name:P74,message:$,cause:W});this[_74]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=K,this.data=Z}static isInstance($){return n7.hasMarker($,w74)}};_74=Mi8;T74=`vercel.ai.error.${j74}`,Ri8=Symbol.for(T74),qi8=class extends n7{constructor({message:$="Empty response body"}={}){super({name:j74,message:$});this[I74]=!0}static isInstance($){return n7.hasMarker($,T74)}};I74=Ri8;k74=`vercel.ai.error.${S74}`,Pi8=Symbol.for(k74),x74=class extends n7{constructor({message:$,cause:Y,argument:X}){super({name:S74,message:$,cause:Y});this[v74]=!0,this.argument=X}static isInstance($){return n7.hasMarker($,k74)}};v74=Pi8;b74=`vercel.ai.error.${y74}`,wi8=Symbol.for(b74),_i8=class extends n7{constructor({prompt:$,message:Y,cause:X}){super({name:y74,message:`Invalid prompt: ${Y}`,cause:X});this[h74]=!0,this.prompt=$}static isInstance($){return n7.hasMarker($,b74)}};h74=wi8;g74=`vercel.ai.error.${f74}`,ji8=Symbol.for(g74),Nm=class extends n7{constructor({data:$,message:Y=`Invalid response data: ${JSON.stringify($)}.`}){super({name:f74,message:Y});this[m74]=!0,this.data=$}static isInstance($){return n7.hasMarker($,g74)}};m74=ji8;p74=`vercel.ai.error.${u74}`,Ti8=Symbol.for(p74),a90=class extends n7{constructor({text:$,cause:Y}){super({name:u74,message:`JSON parsing failed: Text: ${$}.
Error message: ${C74(Y)}`,cause:Y});this[d74]=!0,this.text=$}static isInstance($){return n7.hasMarker($,p74)}};d74=Ti8;l74=`vercel.ai.error.${c74}`,Ii8=Symbol.for(l74),i90=class extends n7{constructor({message:$}){super({name:c74,message:$});this[i74]=!0}static isInstance($){return n7.hasMarker($,l74)}};i74=Ii8;r74=`vercel.ai.error.${n74}`,Ci8=Symbol.for(r74),s74=class extends n7{constructor({message:$="No content generated."}={}){super({name:n74,message:$});this[a74]=!0}static isInstance($){return n7.hasMarker($,r74)}};a74=Ci8;t74=`vercel.ai.error.${o74}`,Si8=Symbol.for(t74),ki8=class $ extends n7{constructor({value:Y,cause:X}){super({name:o74,message:`Type validation failed: Value: ${JSON.stringify(Y)}.
Error message: ${C74(X)}`,cause:X});this[e74]=!0,this.value=Y}static isInstance(Y){return n7.hasMarker(Y,t74)}static wrap({value:Y,cause:X}){return $.isInstance(X)&&X.value===Y?X:new $({value:Y,cause:X})}};e74=Si8;Em=ki8,YY4=`vercel.ai.error.${$Y4}`,vi8=Symbol.for(YY4),ED=class extends n7{constructor({functionality:$,message:Y=`'${$}' functionality not supported.`}){super({name:$Y4,message:Y});this[XY4]=!0,this.functionality=$}static isInstance($){return n7.hasMarker($,YY4)}};XY4=vi8;Y74=class extends Error{constructor($,Y){super($),this.name="ParseError",this.type=Y.type,this.field=Y.field,this.value=Y.value,this.line=Y.line}};bi8=class extends TransformStream{constructor({onError:$,onRetry:Y,onComment:X}={}){let G;super({start(J){G=xi8({onEvent:(Q)=>{J.enqueue(Q)},onError(Q){$==="terminate"?J.error(Q):typeof $=="function"&&$(Q)},onRetry:Y,onComment:X})},transform(J){G.feed(J)}})}};new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");oZ=hi8();fi8=["fetch failed","failed to fetch"];pi8=/"__proto__"\s*:/,di8=/"constructor"\s*:/;Fb0=Symbol.for("vercel.ai.validator");({btoa:Xn8}=globalThis);KY4=(($)=>{return $.Unknown="unknown",$.OpenAIResponsesV1="openai-responses-v1",$.XAIResponsesV1="xai-responses-v1",$.AnthropicClaudeV1="anthropic-claude-v1",$})(KY4||{}),Db0=U.object({id:U.string().nullish(),format:U.nativeEnum(KY4).nullish(),index:U.number().optional()}).passthrough(),Qn8=U.object({type:U.literal("reasoning.summary"),summary:U.string()}).extend(Db0.shape),Wn8=U.object({type:U.literal("reasoning.encrypted"),data:U.string()}).extend(Db0.shape),Kn8=U.object({type:U.literal("reasoning.text"),text:U.string().nullish(),signature:U.string().nullish()}).extend(Db0.shape),Nb0=U.union([Qn8,Wn8,Kn8]),n90=U.union([Nb0,U.unknown().transform(()=>null)]),Ab0=U.array(n90).transform(($)=>$.filter((Y)=>!!Y));U.union([U.object({delta:U.object({reasoning_details:U.array(n90)})}).transform(($)=>$.delta.reasoning_details.filter(Gb0)),U.object({message:U.object({reasoning_details:U.array(n90)})}).transform(($)=>$.message.reasoning_details.filter(Gb0)),U.object({text:U.string(),reasoning_details:U.array(n90)}).transform(($)=>$.reasoning_details.filter(Gb0))]);Y50=U.object({error:U.object({code:U.union([U.string(),U.number()]).nullable().optional().default(null),message:U.string(),type:U.string().nullable().optional().default(null),param:U.any().nullable().optional().default(null)}).passthrough()}).passthrough(),t90=Yn8({errorSchema:Y50,errorToMessage:($)=>$.error.message}),Zn8=U.object({provider:U.string(),reasoning_details:U.array(Nb0).optional(),usage:U.object({promptTokens:U.number(),promptTokensDetails:U.object({cachedTokens:U.number()}).passthrough().optional(),completionTokens:U.number(),completionTokensDetails:U.object({reasoningTokens:U.number()}).passthrough().optional(),totalTokens:U.number(),cost:U.number().optional(),costDetails:U.object({upstreamInferenceCost:U.number()}).passthrough()}).passthrough()}).passthrough(),Un8=U.object({openrouter:U.object({reasoning_details:U.array(Nb0).optional()}).optional()}).optional();U.union([U.literal("auto"),U.literal("none"),U.literal("required"),U.object({type:U.literal("function"),function:U.object({name:U.string()})})]);Fn8=U.object({type:U.literal("image_url"),image_url:U.object({url:U.string()}).passthrough()}).passthrough(),Ln8=U.union([Fn8,U.unknown().transform(()=>null)]),UY4=U.array(Ln8).transform(($)=>$.filter((Y)=>!!Y)),HY4=U.object({id:U.string().optional(),model:U.string().optional(),provider:U.string().optional(),usage:U.object({prompt_tokens:U.number(),prompt_tokens_details:U.object({cached_tokens:U.number()}).passthrough().nullish(),completion_tokens:U.number(),completion_tokens_details:U.object({reasoning_tokens:U.number()}).passthrough().nullish(),total_tokens:U.number(),cost:U.number().optional(),cost_details:U.object({upstream_inference_cost:U.number().nullish()}).passthrough().nullish()}).passthrough().nullish()}).passthrough(),Dn8=U.union([HY4.extend({choices:U.array(U.object({message:U.object({role:U.literal("assistant"),content:U.string().nullable().optional(),reasoning:U.string().nullable().optional(),reasoning_details:Ab0.nullish(),images:UY4.nullish(),tool_calls:U.array(U.object({id:U.string().optional().nullable(),type:U.literal("function"),function:U.object({name:U.string(),arguments:U.string()}).passthrough()}).passthrough()).optional(),annotations:U.array(U.union([U.object({type:U.literal("url_citation"),url_citation:U.object({end_index:U.number(),start_index:U.number(),title:U.string(),url:U.string(),content:U.string().optional()}).passthrough()}).passthrough(),U.object({type:U.literal("file_annotation"),file_annotation:U.object({file_id:U.string(),quote:U.string().optional()}).passthrough()}).passthrough(),U.object({type:U.literal("file"),file:U.object({hash:U.string(),name:U.string(),content:U.array(U.object({type:U.string(),text:U.string()}).passthrough()).optional()}).passthrough()}).passthrough()])).nullish()}).passthrough(),index:U.number().nullish(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}).passthrough())}).passthrough()).nullable()}).passthrough().nullable().optional(),finish_reason:U.string().optional().nullable()}).passthrough())}),Y50.extend({user_id:U.string().optional()})]),Nn8=U.union([HY4.extend({choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).optional(),content:U.string().nullish(),reasoning:U.string().nullish().optional(),reasoning_details:Ab0.nullish(),images:UY4.nullish(),tool_calls:U.array(U.object({index:U.number().nullish(),id:U.string().nullish(),type:U.literal("function").optional(),function:U.object({name:U.string().nullish(),arguments:U.string().nullish()}).passthrough()}).passthrough()).nullish(),annotations:U.array(U.union([U.object({type:U.literal("url_citation"),url_citation:U.object({end_index:U.number(),start_index:U.number(),title:U.string(),url:U.string(),content:U.string().optional()}).passthrough()}).passthrough(),U.object({type:U.literal("file_annotation"),file_annotation:U.object({file_id:U.string(),quote:U.string().optional()}).passthrough()}).passthrough(),U.object({type:U.literal("file"),file:U.object({hash:U.string(),name:U.string(),content:U.array(U.object({type:U.string(),text:U.string()}).passthrough()).optional()}).passthrough()}).passthrough()])).nullish()}).passthrough().nullish(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}).passthrough())}).passthrough()).nullable()}).passthrough().nullish(),finish_reason:U.string().nullable().optional(),index:U.number().nullish()}).passthrough())}),Y50]);Q74=U.union([U.object({id:U.string().optional(),model:U.string().optional(),choices:U.array(U.object({text:U.string(),reasoning:U.string().nullish().optional(),reasoning_details:Ab0.nullish(),finish_reason:U.string().nullish(),index:U.number().nullish(),logprobs:U.object({tokens:U.array(U.string()),token_logprobs:U.array(U.number()),top_logprobs:U.array(U.record(U.string(),U.number())).nullable()}).passthrough().nullable().optional()}).passthrough()),usage:U.object({prompt_tokens:U.number(),prompt_tokens_details:U.object({cached_tokens:U.number()}).passthrough().nullish(),completion_tokens:U.number(),completion_tokens_details:U.object({reasoning_tokens:U.number()}).passthrough().nullish(),total_tokens:U.number(),cost:U.number().optional()}).passthrough().nullish()}).passthrough(),Y50]);Rm({compatibility:"strict"});Am={mistral:{url:"https://api.mistral.ai/v1"},groq:{url:"https://api.groq.com/openai/v1"},moonshotai:{url:"https://api.moonshot.ai/anthropic/v1",npm:"@ai-sdk/anthropic"},"moonshotai-cn":{url:"https://api.moonshot.cn/anthropic/v1",npm:"@ai-sdk/anthropic"}},WT=class extends BD{id="models.dev";name="models.dev";providerConfigs={};constructor($){super();if($)this.providerConfigs=$}async fetchProviders(){let $=await fetch("https://models.dev/api.json");if(!$.ok)throw Error(`Failed to fetch from models.dev: ${$.statusText}`);let Y=await $.json(),X={};for(let[G,J]of Object.entries(Y)){if(V$4.includes(G))continue;if(!J||typeof J!=="object"||!J.models)continue;let Q=G,W=J.npm==="@ai-sdk/openai-compatible"||J.npm==="@ai-sdk/gateway"||Q in Am,K=z$4.includes(G),Z=J.api&&J.env&&J.env.length>0;if(W||K||Z){let H=Object.entries(J.models).filter(([,L])=>L?.status!=="deprecated").map(([L])=>L).sort(),z=Am[Q]?.url||J.api;if(!K&&!z)continue;let V=Am[Q]?.apiKeyEnvVar||qn8({envVars:J.env,providerId:Q}),F=!K?Am[Q]?.apiKeyHeader||"Authorization":void 0;X[Q]={url:z,apiKeyEnvVar:V,apiKeyHeader:F,name:J.name||G.charAt(0).toUpperCase()+G.slice(1),models:H,docUrl:J.doc,gateway:"models.dev",npm:Am[Q]?.npm||(J.npm&&J.npm!=="@ai-sdk/openai-compatible"&&J.npm!=="@ai-sdk/gateway"?J.npm:void 0)}}}return this.providerConfigs=X,X}buildUrl($,Y){let{providerId:X}=QT($),G=this.providerConfigs[X];if(!G?.url)return;let J=`${X.toUpperCase().replace(/-/g,"_")}_BASE_URL`;return Y?.[J]||process.env[J]||Pn8(G.url,Y)}getApiKey($){let[Y,X]=$.split("/");if(!Y||!X)throw Error(`Could not identify provider from model id ${$}`);let G=this.providerConfigs[Y];if(!G)throw Error(`Could not find config for provider ${Y} with model id ${$}`);let J=typeof G.apiKeyEnvVar==="string"?process.env[G.apiKeyEnvVar]:void 0;if(!J)throw Error(`Could not find API key process.env.${G.apiKeyEnvVar} for model id ${$}`);return Promise.resolve(J)}async resolveLanguageModel({modelId:$,providerId:Y,apiKey:X,headers:G}){let J=this.buildUrl(`${Y}/${$}`),Q={"User-Agent":b3,...G};switch(Y){case"openai":return AD({apiKey:X,headers:Q}).responses($);case"gemini":case"google":return JT({apiKey:X,headers:Q}).chat($);case"anthropic":return QV({apiKey:X,headers:Q})($);case"mistral":return Wb0({apiKey:X,headers:Q})($);case"groq":return F74({apiKey:X,headers:Q})($);case"openrouter":return Rm({apiKey:X,headers:Q})($);case"xai":return M74({apiKey:X,headers:Q})($);case"deepseek":return H74({apiKey:X,headers:Q})($);case"perplexity":return B74({apiKey:X,headers:Q})($);case"cerebras":return W74({apiKey:X,headers:Q})($);case"togetherai":return O74({apiKey:X,headers:Q})($);case"deepinfra":return K74({apiKey:X,headers:Q})($);case"vercel":return oS0({apiKey:X,headers:Q})($);case"moonshotai":case"moonshotai-cn":{if(!J)throw Error(`No API URL found for ${Y}/${$}`);return QV({apiKey:X,baseURL:J,headers:Q})($)}default:{let K=this.providerConfigs[Y]?.npm;if(K==="@ai-sdk/anthropic"){if(!J)throw Error(`No API URL found for ${Y}/${$}`);return QV({apiKey:X,baseURL:J,headers:Q})($)}if(K==="@ai-sdk/openai"){if(!J)throw Error(`No API URL found for ${Y}/${$}`);return AD({apiKey:X,baseURL:J,headers:Q}).chat($)}if(K==="@ai-sdk/google"){if(!J)throw Error(`No API URL found for ${Y}/${$}`);return JT({apiKey:X,baseURL:J,headers:Q}).chat($)}if(K==="@ai-sdk/mistral"){if(!J)throw Error(`No API URL found for ${Y}/${$}`);return Wb0({apiKey:X,baseURL:J,headers:Q})($)}if(!J)throw Error(`No API URL found for ${Y}/${$}`);return ND({name:Y,apiKey:X,baseURL:J,headers:Q,supportsStructuredOutputs:!0}).chatModel($)}}}}});var wn8,G50=()=>wn8.now(),_n8=($)=>!!$&&$===Math.floor($)&&$>0&&isFinite($),Bb0=($)=>$===1/0||_n8($),J50;var zY4=V0(()=>{wn8=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date;J50=class J50{expirations=Object.create(null);data=new Map;expirationMap=new Map;ttl;max;updateAgeOnGet;updateAgeOnHas;noUpdateTTL;noDisposeOnSet;checkAgeOnGet;checkAgeOnHas;dispose;timer;timerExpiration;immortalKeys=new Set;constructor({max:$=1/0,ttl:Y,updateAgeOnGet:X=!1,checkAgeOnGet:G=!1,updateAgeOnHas:J=!1,checkAgeOnHas:Q=!1,noUpdateTTL:W=!1,dispose:K,noDisposeOnSet:Z=!1}={}){if(Y!==void 0&&!Bb0(Y))throw TypeError("ttl must be positive integer or Infinity if set");if(!Bb0($))throw TypeError("max must be positive integer or Infinity");if(this.ttl=Y,this.max=$,this.updateAgeOnGet=!!X,this.checkAgeOnGet=!!G,this.updateAgeOnHas=!!J,this.checkAgeOnHas=!!Q,this.noUpdateTTL=!!W,this.noDisposeOnSet=!!Z,K!==void 0){if(typeof K!=="function")throw TypeError("dispose must be function if set");this.dispose=K}else this.dispose=(H,z,V)=>{};this.timer=void 0,this.timerExpiration=void 0}setTimer($,Y){if(this.timerExpiration&&this.timerExpiration<$)return;if(this.timer)clearTimeout(this.timer);let X=setTimeout(()=>{this.timer=void 0,this.timerExpiration=void 0,this.purgeStale();for(let G in this.expirations){let J=Number(G);this.setTimer(J,J-G50());break}},Math.min(2147483647,Math.max(0,Y)));if(X.unref)X.unref();this.timerExpiration=$,this.timer=X}cancelTimer(){if(this.timer)clearTimeout(this.timer),this.timerExpiration=void 0,this.timer=void 0}cancelTimers(){return process.emitWarning('TTLCache.cancelTimers has been renamed to TTLCache.cancelTimer (no "s"), and will be removed in the next major version update'),this.cancelTimer()}clear(){let $=this.dispose!==J50.prototype.dispose?[...this]:[];this.data.clear(),this.expirationMap.clear(),this.cancelTimer(),this.expirations=Object.create(null);for(let[Y,X]of $)this.dispose(X,Y,"delete")}setTTL($,Y=this.ttl){let X=this.expirationMap.get($);if(X!==void 0){let G=this.expirations[X];if(!G||G.length<=1)delete this.expirations[X];else this.expirations[X]=G.filter((J)=>J!==$)}if(Y&&Y!==1/0){this.immortalKeys.delete($);let G=Math.floor(G50()+Y);if(this.expirationMap.set($,G),!this.expirations[G])this.expirations[G]=[],this.setTimer(G,Y);this.expirations[G].push($)}else this.immortalKeys.add($),this.expirationMap.set($,1/0)}set($,Y,{ttl:X=this.ttl,noUpdateTTL:G=this.noUpdateTTL,noDisposeOnSet:J=this.noDisposeOnSet}={}){if(!Bb0(X))throw TypeError("ttl must be positive integer or Infinity");if(this.expirationMap.has($)){if(!G)this.setTTL($,X);let Q=this.data.get($),W=!J&&this.data.has($);if(Q!==Y){if(this.data.set($,Y),W)this.dispose(Q,$,"set")}}else this.setTTL($,X),this.data.set($,Y);while(this.size>this.max)this.purgeToCapacity();return this}has($,{checkAgeOnHas:Y=this.checkAgeOnHas,ttl:X=this.ttl,updateAgeOnHas:G=this.updateAgeOnHas}={}){if(this.data.has($)){if(Y&&this.getRemainingTTL($)===0)return this.delete($),!1;if(G)this.setTTL($,X);return!0}return!1}getRemainingTTL($){let Y=this.expirationMap.get($);return Y===1/0?Y:Y!==void 0?Math.max(0,Math.ceil(Y-G50())):0}get($,{updateAgeOnGet:Y=this.updateAgeOnGet,ttl:X=this.ttl,checkAgeOnGet:G=this.checkAgeOnGet}={}){let J=this.data.get($);if(G&&this.getRemainingTTL($)===0){this.delete($);return}if(Y)this.setTTL($,X);return J}delete($){let Y=this.expirationMap.get($);if(Y!==void 0){let X=this.data.get($);this.data.delete($),this.expirationMap.delete($),this.immortalKeys.delete($);let G=this.expirations[Y];if(G)if(G.length<=1)delete this.expirations[Y];else this.expirations[Y]=G.filter((J)=>J!==$);if(this.dispose(X,$,"delete"),this.size===0)this.cancelTimer();return!0}return!1}purgeToCapacity(){for(let $ in this.expirations){let Y=this.expirations[$];if(this.size-Y.length>=this.max){delete this.expirations[$];let X=[];for(let G of Y)X.push([G,this.data.get(G)]),this.data.delete(G),this.expirationMap.delete(G);for(let[G,J]of X)this.dispose(J,G,"evict")}else{let X=this.size-this.max,G=[];for(let J of Y.splice(0,X))G.push([J,this.data.get(J)]),this.data.delete(J),this.expirationMap.delete(J);for(let[J,Q]of G)this.dispose(Q,J,"evict");return}}}get size(){return this.data.size}purgeStale(){let $=Math.ceil(G50());for(let Y in this.expirations){if(Y==="Infinity"||Number(Y)>$)return;let X=[...this.expirations[Y]||[]],G=[];delete this.expirations[Y];for(let J of X)G.push([J,this.data.get(J)]),this.data.delete(J),this.expirationMap.delete(J);for(let[J,Q]of G)this.dispose(Q,J,"stale")}if(this.size===0)this.cancelTimer()}*entries(){for(let $ in this.expirations)for(let Y of this.expirations[$])yield[Y,this.data.get(Y)];for(let $ of this.immortalKeys)yield[$,this.data.get($)]}*keys(){for(let $ in this.expirations)for(let Y of this.expirations[$])yield Y;for(let $ of this.immortalKeys)yield $}*values(){for(let $ in this.expirations)for(let Y of this.expirations[$])yield this.data.get(Y);for(let $ of this.immortalKeys)yield this.data.get($)}[Symbol.iterator](){return this.entries()}}});var jn8,Q50;var Ob0=V0(()=>{p2();zY4();jn8=class extends u8{constructor({name:$}){super({component:"SERVER_CACHE",name:$})}},Q50=class extends jn8{cache;ttlMs;constructor($={}){super({name:"InMemoryServerCache"});this.ttlMs=$.ttlMs??300000;let Y=this.ttlMs>0?this.ttlMs:1/0;this.cache=new J50({max:$.maxSize??1000,ttl:Y})}async get($){return this.cache.get($)}async set($,Y,X){if(X===void 0){this.cache.set($,Y);return}this.cache.set($,Y,{ttl:X>0?X:1/0})}async listLength($){let Y=this.cache.get($);if(Y===void 0)return 0;if(!Array.isArray(Y))throw Error(`${$} exists but is not an array`);return Y.length}async listPush($,Y){let X=this.cache.get($);if(Array.isArray(X)){if(X.push(Y),this.ttlMs>0)this.cache.set($,X,{ttl:this.ttlMs})}else if(X!==void 0)throw Error(`${$} exists but is not an array`);else this.cache.set($,[Y])}async listFromTo($,Y,X=-1){let G=this.cache.get($);if(Array.isArray(G)){let J=X===-1?void 0:X+1;return G.slice(Y,J)}return[]}async delete($){this.cache.delete($)}async clear(){this.cache.clear()}async increment($){let Y=this.cache.get($),X;if(Y===void 0)X=1;else if(typeof Y==="number")X=Y+1;else throw Error(`${$} exists but is not a number`);return this.cache.set($,X),X}}});var KT;var W50=V0(()=>{Dm();Ob0();OW();KT=class extends BD{id="netlify";name="Netlify AI Gateway";tokenCache=new Q50;async fetchProviders(){let $=await fetch("https://api.netlify.com/api/v1/ai-gateway/providers");if(!$.ok)throw Error(`Failed to fetch from Netlify: ${$.statusText}`);let Y=await $.json(),X={apiKeyEnvVar:["NETLIFY_TOKEN","NETLIFY_SITE_ID"],apiKeyHeader:"Authorization",name:"Netlify",gateway:"netlify",models:[],docUrl:"https://docs.netlify.com/build/ai-gateway/overview/"};for(let[G,J]of Object.entries(Y.providers))for(let Q of J.models)X.models.push(`${G}/${Q}`);return{netlify:X}}async buildUrl($,Y){let X=Y?.NETLIFY_SITE_ID||process.env.NETLIFY_SITE_ID,G=Y?.NETLIFY_TOKEN||process.env.NETLIFY_TOKEN;if(!G)throw new G0({id:"NETLIFY_GATEWAY_NO_TOKEN",domain:"LLM",category:"UNKNOWN",text:`Missing NETLIFY_TOKEN environment variable required for model: ${$}`});if(!X)throw new G0({id:"NETLIFY_GATEWAY_NO_SITE_ID",domain:"LLM",category:"UNKNOWN",text:`Missing NETLIFY_SITE_ID environment variable required for model: ${$}`});try{let J=await this.getOrFetchToken(X,G);return J.url.endsWith("/")?J.url.substring(0,J.url.length-1):J.url}catch(J){throw new G0({id:"NETLIFY_GATEWAY_TOKEN_ERROR",domain:"LLM",category:"UNKNOWN",text:`Failed to get Netlify AI Gateway token for model ${$}: ${J instanceof Error?J.message:String(J)}`})}}async getOrFetchToken($,Y){let X=`netlify-token:${$}:${Y}`,G=await this.tokenCache.get(X);if(G&&G.expiresAt>Date.now()/1000+60)return{token:G.token,url:G.url};let J=await fetch(`https://api.netlify.com/api/v1/sites/${$}/ai-gateway/token`,{method:"GET",headers:{Authorization:`Bearer ${Y}`}});if(!J.ok){let W=await J.text();throw Error(`Failed to get Netlify AI Gateway token: ${J.status} ${W}`)}let Q=await J.json();return await this.tokenCache.set(X,{token:Q.token,url:Q.url,expiresAt:Q.expires_at}),{token:Q.token,url:Q.url}}async getApiKey($){let Y=process.env.NETLIFY_SITE_ID,X=process.env.NETLIFY_TOKEN;if(!X)throw new G0({id:"NETLIFY_GATEWAY_NO_TOKEN",domain:"LLM",category:"UNKNOWN",text:`Missing NETLIFY_TOKEN environment variable required for model: ${$}`});if(!Y)throw new G0({id:"NETLIFY_GATEWAY_NO_SITE_ID",domain:"LLM",category:"UNKNOWN",text:`Missing NETLIFY_SITE_ID environment variable required for model: ${$}`});try{return(await this.getOrFetchToken(Y,X)).token}catch(G){throw new G0({id:"NETLIFY_GATEWAY_TOKEN_ERROR",domain:"LLM",category:"UNKNOWN",text:`Failed to get Netlify AI Gateway token for model ${$}: ${G instanceof Error?G.message:String(G)}`})}}async resolveLanguageModel({modelId:$,providerId:Y,apiKey:X,headers:G}){let J=await this.buildUrl(`${Y}/${$}`),Q={"User-Agent":b3,...G};switch(Y){case"openai":return AD({apiKey:X,baseURL:J,headers:Q}).responses($);case"gemini":return JT({baseURL:`${J}/v1beta/`,apiKey:X,headers:{"user-agent":"google-genai-sdk/",...Q}}).chat($);case"anthropic":return QV({apiKey:X,baseURL:`${J}/v1/`,headers:{"anthropic-version":"2023-06-01",...Q}})($);default:return ND({name:Y,apiKey:X,baseURL:J,headers:Q,supportsStructuredOutputs:!0}).chatModel($)}}}});var VY4={};W8(VY4,{ModelsDevGateway:()=>WT});var FY4=V0(()=>{X50()});var LY4={};W8(LY4,{NetlifyGateway:()=>KT});var DY4=V0(()=>{W50()});var NY4={};W8(NY4,{MastraGateway:()=>qm});var AY4=V0(()=>{Eb0()});var EY4={};W8(EY4,{writeRegistryFiles:()=>In8,generateTypesContent:()=>OY4,fetchProvidersFromGateways:()=>Tn8,atomicWriteFile:()=>Mb0});import Pm from"fs/promises";import BY4 from"path";async function Mb0($,Y,X="utf-8"){let G=Math.random().toString(36).substring(2,15),J=`${$}.${process.pid}.${Date.now()}.${G}.tmp`;try{await Pm.writeFile(J,Y,X),await Pm.rename(J,$)}catch(Q){try{await Pm.unlink(J)}catch{}throw Q}}async function Tn8($){let Y=[];for(let Q of $)if(await Q.shouldEnable())Y.push(Q);let X={},G={},J=3;for(let Q of Y){let W=null;for(let K=1;K<=J;K++)try{let Z=await Q.fetchProviders(),H=Q.id==="models.dev";for(let[z,V]of Object.entries(Z)){let F=H?z:z===Q.id?Q.id:`${Q.id}/${z}`;X[F]=V,G[F]=V.models.sort()}W=null;break}catch(Z){if(W=Z instanceof Error?Z:Error(String(Z)),K<J){let H=Math.min(1000*Math.pow(2,K-1),5000);await new Promise((z)=>setTimeout(z,H))}}if(W)throw W}return{providers:X,models:G}}function OY4($){return`/**
 * THIS FILE IS AUTO-GENERATED - DO NOT EDIT
 * Generated from model gateway providers
 */

/**
 * Provider models mapping type
 * This is derived from the JSON data and provides type-safe access
 */
export type ProviderModelsMap = {
${Object.entries($).map(([X,G])=>{let J=G.map((Z)=>`'${Z}'`),W=!/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(X)?`'${X}'`:X,K=`  readonly ${W}: readonly [${J.join(", ")}];`;if(K.length>120){let Z=G.map((H)=>`    '${H}',`).join(`
`);return`  readonly ${W}: readonly [
${Z}
  ];`}return K}).join(`
`)}
};

/**
 * Union type of all registered provider IDs
 */
export type Provider = keyof ProviderModelsMap;

/**
 * Provider models mapping interface
 */
export interface ProviderModels {
  [key: string]: string[];
}

/**
 * OpenAI-compatible model ID type
 * Dynamically derived from ProviderModelsMap
 * Full provider/model paths (e.g., "openai/gpt-4o", "anthropic/claude-3-5-sonnet-20241022")
 */
export type ModelRouterModelId =
  | {
      [P in Provider]: \`\${P}/\${ProviderModelsMap[P][number]}\`;
    }[Provider]
  | \`mastra/\${ProviderModelsMap['openrouter'][number]}\`
  | (string & {});

/**
 * Extract the model part from a ModelRouterModelId for a specific provider
 * Dynamically derived from ProviderModelsMap
 * Example: ModelForProvider<'openai'> = 'gpt-4o' | 'gpt-4-turbo' | ...
 */
export type ModelForProvider<P extends Provider> = ProviderModelsMap[P][number];
`}async function In8($,Y,X,G){let J=BY4.dirname($),Q=BY4.dirname(Y);await Pm.mkdir(J,{recursive:!0}),await Pm.mkdir(Q,{recursive:!0}),await Mb0($,JSON.stringify({providers:X,models:G,version:"1.0.0"},null,2),"utf-8");let K=OY4(G);await Mb0(Y,K,"utf-8")}var MY4=()=>{};import e5 from"fs";import{createRequire as Cn8}from"module";import Sn8 from"os";import qX from"path";function qb0(){let $=process.env.MASTRA_OFFLINE;return $==="true"||$==="1"}function kn8($){let Y=new Set;for(let X of $)if(X.shouldEnable())Y.add(X.id);return Y}function K50($,Y){let X=Object.fromEntries(Object.entries($.providers).filter(([,J])=>Y.has(J.gateway))),G=Object.fromEntries(Object.entries($.models).filter(([J])=>(J in X)));return{...$,providers:X,models:G}}function RY4($,Y,X="utf-8"){let G=Math.random().toString(36).substring(2,15),J=`${$}.${process.pid}.${Date.now()}.${G}.tmp`;try{e5.writeFileSync(J,Y,X),e5.renameSync(J,$)}catch(Q){try{e5.unlinkSync(J)}catch{}throw Q}}function vn8(){try{let $=e5.existsSync(U50()),Y=e5.existsSync(H50());if(!$&&!Y)return;let X=wb0(),G=qX.join(X,"dist","provider-registry.json"),J=qX.join(X,"dist","llm","model","provider-types.generated.d.ts");if(e5.mkdirSync(qX.dirname(G),{recursive:!0}),e5.mkdirSync(qX.dirname(J),{recursive:!0}),$){let Q=e5.readFileSync(U50(),"utf-8");try{JSON.parse(Q)}catch{try{e5.unlinkSync(U50())}catch{}return}let W=!0;if(e5.existsSync(G)){let K=e5.readFileSync(G,"utf-8");W=Q!==K}if(W)RY4(G,Q,"utf-8")}if(Y){let Q=e5.readFileSync(H50(),"utf-8");if(/readonly\s+\d/.test(Q))try{e5.unlinkSync(H50())}catch{}else{let W=!0;if(e5.existsSync(J)){let K=e5.readFileSync(J,"utf-8");W=Q!==K}if(W)RY4(J,Q,"utf-8")}}}catch{}}function qY4(){try{if(!e5.existsSync(Pb0()))return null;let $=e5.readFileSync(Pb0(),"utf-8").trim();return new Date(parseInt($,10))}catch($){return console.warn("[GatewayRegistry] Failed to read cache file:",$),z50=!0,null}}function xn8($){try{if(!e5.existsSync(ZT()))e5.mkdirSync(ZT(),{recursive:!0});e5.writeFileSync(Pb0(),$.getTime().toString(),"utf-8")}catch(Y){z50=!0,console.warn("[GatewayRegistry] Failed to write cache file:",Y)}}function wb0(){try{let Y=Cn8(import.meta.url||"file://").resolve("@mastra/core/package.json");return qX.dirname(Y)}catch{return process.cwd()}}function Z50($,Y=[]){let X=kn8([new WT({}),new KT,new qm,...Y]);if(!$)return K50(Rb0,X);if(vn8(),WV)return WV;let G=wb0(),J=[qX.join(G,"dist","provider-registry.json"),qX.join(G,"src","llm","model","provider-registry.json"),qX.join(process.cwd(),"packages/core/src/llm/model/provider-registry.json"),qX.join(process.cwd(),"src/llm/model/provider-registry.json")],Q=[];for(let W of J)try{let K=e5.readFileSync(W,"utf-8"),Z=JSON.parse(K);return WV=K50(Z,X),WV}catch(K){let Z=K instanceof Error?K.message:String(K);Q.push(`${W}: ${Z}`);let H=K instanceof Error&&"code"in K&&K.code==="ENOENT",z=K instanceof SyntaxError;if(!H&&z){console.warn(`[GatewayRegistry] Detected corrupted provider-registry.json at ${W}. Deleting corrupted file and falling back to static registry.`);try{e5.unlinkSync(W)}catch{}return WV=K50(Rb0,X),WV}continue}return console.warn(`[GatewayRegistry] Could not load provider registry from any path. Falling back to static registry.
Tried paths:
${Q.join(`
`)}`),WV=K50(Rb0,X),WV}var qm,Rb0,WV=null,ZT=()=>qX.join(Sn8.homedir(),".cache","mastra"),Pb0=()=>qX.join(ZT(),"gateway-refresh-time"),U50=()=>qX.join(ZT(),"provider-registry.json"),H50=()=>qX.join(ZT(),"provider-types.generated.d.ts"),z50=!1,_b0,f4$,eZ=class ${static instance=null;lastRefreshTime=null;refreshInterval=null;isRefreshing=!1;useDynamicLoading;customGateways=[];constructor(Y={}){let X=process.env.MASTRA_DEV==="true"||process.env.MASTRA_DEV==="1";this.useDynamicLoading=Y.useDynamicLoading??X}static getInstance(Y){if(!$.instance)return $.instance=new $(Y),$.instance;if(Y?.useDynamicLoading===!0)$.instance.useDynamicLoading=!0;return $.instance}registerCustomGateways(Y){this.customGateways=Y}getCustomGateways(){return this.customGateways}async syncGateways(Y=!1,X=!1){if(!this.useDynamicLoading&&!X)return;if(qb0())return;if(this.isRefreshing&&!Y)return;this.isRefreshing=!0;try{let{ModelsDevGateway:G}=await Promise.resolve().then(() => (FY4(),VY4)),{NetlifyGateway:J}=await Promise.resolve().then(() => (DY4(),LY4)),{MastraGateway:Q}=await Promise.resolve().then(() => (AY4(),NY4)),{fetchProvidersFromGateways:W,writeRegistryFiles:K}=await Promise.resolve().then(() => (MY4(),EY4)),H=[...[new G({}),new J,...X?[]:[new Q]],...this.customGateways],{providers:z,models:V}=await W(H),F=wb0();try{e5.mkdirSync(ZT(),{recursive:!0}),await K(U50(),H50(),z,V)}catch(A){console.warn("[GatewayRegistry] Failed to write to global cache:",A)}let L=qX.join(F,"dist","provider-registry.json"),N=qX.join(F,"dist","llm","model","provider-types.generated.d.ts");if(await K(L,N,z,V),X){let A=qX.join(F,"src","llm","model","provider-registry.json"),B=qX.join(F,"src","llm","model","provider-types.generated.d.ts");await e5.promises.copyFile(L,A),await e5.promises.copyFile(N,B)}if(this.useDynamicLoading)WV=null;this.lastRefreshTime=new Date,xn8(this.lastRefreshTime)}catch(G){throw console.error("[GatewayRegistry] \u274C Gateway sync failed:",G),G}finally{this.isRefreshing=!1}}getLastRefreshTime(){return this.lastRefreshTime||qY4()}startAutoRefresh(Y=3600000){if(!this.useDynamicLoading)return;if(qb0())return;if(this.refreshInterval)return;let X=qY4(),G=Date.now();if(!z50&&(!X||G-X.getTime()>Y))this.syncGateways().catch((Q)=>{console.error("[GatewayRegistry] Initial auto-refresh failed:",Q)});if(this.refreshInterval=setInterval(()=>{if(z50&&this.refreshInterval){clearInterval(this.refreshInterval),this.refreshInterval=null;return}this.syncGateways().catch((Q)=>{console.error("[GatewayRegistry] Auto-refresh failed:",Q)})},Y),this.refreshInterval.unref)this.refreshInterval.unref()}stopAutoRefresh(){if(this.refreshInterval)clearInterval(this.refreshInterval),this.refreshInterval=null}getProviderConfig(Y){return Z50(this.useDynamicLoading,this.customGateways).providers[Y]}isProviderRegistered(Y){let X=Z50(this.useDynamicLoading,this.customGateways);return Y in X.providers}getProviders(){return Z50(this.useDynamicLoading,this.customGateways).providers}getModels(){return Z50(this.useDynamicLoading,this.customGateways).models}},PY4,yn8;var Eb0=V0(()=>{X50();W50();Dm();OW();qm=class extends BD{constructor($){super();this.config=$}config;id="mastra";name="Memory Gateway";getBaseUrl(){return(this.config?.baseUrl??process.env.MASTRA_GATEWAY_URL??"https://gateway-api.mastra.ai").replace(/\/+$/,"").replace(/\/v1$/,"")}shouldEnable(){return!!(this.config?.apiKey??process.env.MASTRA_GATEWAY_API_KEY)}async fetchProviders(){if(!this.shouldEnable())return{};return{mastra:{apiKeyEnvVar:"MASTRA_GATEWAY_API_KEY",apiKeyHeader:"Authorization",name:"Memory Gateway",gateway:"mastra",models:[..._b0.openrouter?.models??[]],docUrl:"https://mastra.ai/docs/gateway"}}}async buildUrl($){return`${this.getBaseUrl()}/v1`}async getApiKey(){let $=this.config?.apiKey??process.env.MASTRA_GATEWAY_API_KEY;if(!$)throw new G0({id:"MASTRA_GATEWAY_NO_API_KEY",domain:"LLM",category:"UNKNOWN",text:"Missing MASTRA_GATEWAY_API_KEY environment variable"});return $}resolveLanguageModel({modelId:$,providerId:Y,apiKey:X,headers:G}){let J=`${this.getBaseUrl()}/v1`,Q=`${Y}/${$}`;if(this.config?.customFetch&&Y==="anthropic")return QV({apiKey:"oauth-gateway-placeholder",baseURL:J,headers:{"User-Agent":b3,[sy0]:`Bearer ${X}`,...G},fetch:this.config.customFetch})($);if(this.config?.customFetch)return Rm({apiKey:"oauth-gateway-placeholder",baseURL:J,headers:{"User-Agent":b3,[sy0]:`Bearer ${X}`,...G},fetch:this.config.customFetch}).chat(Q);return Rm({apiKey:X,baseURL:J,headers:{"User-Agent":b3,...G}}).chat(Q)}},Rb0={providers:{"302ai":{url:"https://api.302.ai/v1",apiKeyEnvVar:"302AI_API_KEY",apiKeyHeader:"Authorization",name:"302.AI",models:["MiniMax-M1","MiniMax-M2","MiniMax-M2.1","MiniMax-M2.7","MiniMax-M2.7-highspeed","chatgpt-4o-latest","claude-3-5-haiku-20241022","claude-3-5-haiku-latest","claude-haiku-4-5","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-1-20250805-thinking","claude-opus-4-20250514","claude-opus-4-5","claude-opus-4-5-20251101","claude-opus-4-5-20251101-thinking","claude-opus-4-6","claude-opus-4-6-thinking","claude-opus-4-7","claude-sonnet-4-20250514","claude-sonnet-4-5","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929-thinking","claude-sonnet-4-6","claude-sonnet-4-6-thinking","deepseek-chat","deepseek-reasoner","deepseek-v3.2","deepseek-v3.2-thinking","doubao-seed-1-6-thinking-250715","doubao-seed-1-6-vision-250815","doubao-seed-1-8-251215","doubao-seed-code-preview-251028","gemini-2.0-flash-lite","gemini-2.5-flash","gemini-2.5-flash-image","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-flash-nothink","gemini-2.5-flash-preview-09-2025","gemini-2.5-pro","gemini-3-flash-preview","gemini-3-pro-image-preview","gemini-3-pro-preview","gemini-3.1-flash-image-preview","glm-4.5","glm-4.5-air","glm-4.5-airx","glm-4.5-x","glm-4.5v","glm-4.6","glm-4.6v","glm-4.7","glm-4.7-flashx","glm-5","glm-5-turbo","glm-5.1","glm-5v-turbo","glm-for-coding","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-5","gpt-5-mini","gpt-5-pro","gpt-5-thinking","gpt-5.1","gpt-5.1-chat-latest","gpt-5.2","gpt-5.2-chat-latest","gpt-5.4","gpt-5.4-mini","gpt-5.4-mini-2026-03-17","gpt-5.4-nano","gpt-5.4-nano-2026-03-17","gpt-5.4-pro","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-fast-non-reasoning","grok-4-fast-reasoning","grok-4.1","grok-4.20-beta-0309-non-reasoning","grok-4.20-beta-0309-reasoning","grok-4.20-multi-agent-beta-0309","kimi-k2-0905-preview","kimi-k2-thinking","kimi-k2-thinking-turbo","ministral-14b-2512","mistral-large-2512","qwen-flash","qwen-max-latest","qwen-plus","qwen3-235b-a22b","qwen3-235b-a22b-instruct-2507","qwen3-30b-a3b","qwen3-coder-480b-a35b-instruct","qwen3-max-2025-09-23"],docUrl:"https://doc.302.ai",gateway:"models.dev"},alibaba:{url:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",apiKeyEnvVar:"DASHSCOPE_API_KEY",apiKeyHeader:"Authorization",name:"Alibaba",models:["qvq-max","qwen-flash","qwen-max","qwen-mt-plus","qwen-mt-turbo","qwen-omni-turbo","qwen-omni-turbo-realtime","qwen-plus","qwen-plus-character-ja","qwen-turbo","qwen-vl-max","qwen-vl-ocr","qwen-vl-plus","qwen2-5-14b-instruct","qwen2-5-32b-instruct","qwen2-5-72b-instruct","qwen2-5-7b-instruct","qwen2-5-omni-7b","qwen2-5-vl-72b-instruct","qwen2-5-vl-7b-instruct","qwen3-14b","qwen3-235b-a22b","qwen3-32b","qwen3-8b","qwen3-asr-flash","qwen3-coder-30b-a3b-instruct","qwen3-coder-480b-a35b-instruct","qwen3-coder-flash","qwen3-coder-plus","qwen3-livetranslate-flash-realtime","qwen3-max","qwen3-next-80b-a3b-instruct","qwen3-next-80b-a3b-thinking","qwen3-omni-flash","qwen3-omni-flash-realtime","qwen3-vl-235b-a22b","qwen3-vl-30b-a3b","qwen3-vl-plus","qwen3.5-122b-a10b","qwen3.5-27b","qwen3.5-35b-a3b","qwen3.5-397b-a17b","qwen3.5-plus","qwen3.6-27b","qwen3.6-35b-a3b","qwen3.6-max-preview","qwen3.6-plus","qwq-plus"],docUrl:"https://www.alibabacloud.com/help/en/model-studio/models",gateway:"models.dev"},scaleway:{url:"https://api.scaleway.ai/v1",apiKeyEnvVar:"SCALEWAY_API_KEY",apiKeyHeader:"Authorization",name:"Scaleway",models:["bge-multilingual-gemma2","deepseek-r1-distill-llama-70b","devstral-2-123b-instruct-2512","gemma-3-27b-it","gpt-oss-120b","llama-3.1-8b-instruct","llama-3.3-70b-instruct","mistral-nemo-instruct-2407","mistral-small-3.2-24b-instruct-2506","pixtral-12b-2409","qwen3-235b-a22b-instruct-2507","qwen3-coder-30b-a3b-instruct","qwen3-embedding-8b","qwen3.5-397b-a17b","voxtral-small-24b-2507","whisper-large-v3"],docUrl:"https://www.scaleway.com/en/docs/generative-apis/",gateway:"models.dev"},"nano-gpt":{url:"https://nano-gpt.com/api/v1",apiKeyEnvVar:"NANO_GPT_API_KEY",apiKeyHeader:"Authorization",name:"NanoGPT",models:["Alibaba-NLP/Tongyi-DeepResearch-30B-A3B","Baichuan-M2","Baichuan4-Air","Baichuan4-Turbo","CrucibleLab/L3.3-70B-Loki-V2.0","Doctor-Shotgun/MS3.2-24B-Magnum-Diamond","EVA-UNIT-01/EVA-LLaMA-3.33-70B-v0.0","EVA-UNIT-01/EVA-LLaMA-3.33-70B-v0.1","EVA-UNIT-01/EVA-Qwen2.5-32B-v0.2","EVA-UNIT-01/EVA-Qwen2.5-72B-v0.2","Envoid/Llama-3.05-NT-Storybreaker-Ministral-70B","Envoid/Llama-3.05-Nemotron-Tenyxchat-Storybreaker-70B","GLM-4.5-Air-Derestricted","GLM-4.5-Air-Derestricted-Iceblink","GLM-4.5-Air-Derestricted-Iceblink-ReExtract","GLM-4.5-Air-Derestricted-Iceblink-v2","GLM-4.5-Air-Derestricted-Iceblink-v2-ReExtract","GLM-4.5-Air-Derestricted-Steam","GLM-4.5-Air-Derestricted-Steam-ReExtract","GLM-4.6-Derestricted-v5","GalrionSoftworks/MN-LooseCannon-12B-v1","Gemma-3-27B-ArliAI-RPMax-v3","Gemma-3-27B-Big-Tiger-v3","Gemma-3-27B-CardProjector-v4","Gemma-3-27B-Glitter","Gemma-3-27B-Nidum-Uncensored","Gemma-3-27B-it","Gemma-3-27B-it-Abliterated","Gryphe/MythoMax-L2-13b","Infermatic/MN-12B-Inferor-v0.0","KAT-Coder-Air-V1","KAT-Coder-Exp-72B-1010","KAT-Coder-Pro-V1","LLM360/K2-Think","LatitudeGames/Wayfarer-Large-70B-Llama-3.3","Llama-3.3+(3.1v3.3)-70B-Hanami-x1","Llama-3.3+(3.1v3.3)-70B-New-Dawn-v1.1","Llama-3.3+(3v3.3)-70B-TenyxChat-DaybreakStorywriter","Llama-3.3-70B-Anthrobomination","Llama-3.3-70B-Argunaut-1-SFT","Llama-3.3-70B-ArliAI-RPMax-v1.4","Llama-3.3-70B-ArliAI-RPMax-v2","Llama-3.3-70B-ArliAI-RPMax-v3","Llama-3.3-70B-Aurora-Borealis","Llama-3.3-70B-Bigger-Body","Llama-3.3-70B-Cirrus-x1","Llama-3.3-70B-Cu-Mai-R1","Llama-3.3-70B-Damascus-R1","Llama-3.3-70B-Dark-Ages-v0.1","Llama-3.3-70B-Electra-R1","Llama-3.3-70B-Electranova-v1.0","Llama-3.3-70B-Fallen-R1-v1","Llama-3.3-70B-Fallen-v1","Llama-3.3-70B-Forgotten-Abomination-v5.0","Llama-3.3-70B-Forgotten-Safeword-3.6","Llama-3.3-70B-GeneticLemonade-Opus","Llama-3.3-70B-GeneticLemonade-Unleashed-v3","Llama-3.3-70B-Ignition-v0.1","Llama-3.3-70B-Incandescent-Malevolence","Llama-3.3-70B-Legion-V2.1","Llama-3.3-70B-MS-Nevoria","Llama-3.3-70B-Magnum-v4-SE","Llama-3.3-70B-Magnum-v4-SE-Cirrus-x1-SLERP","Llama-3.3-70B-Mhnnn-x1","Llama-3.3-70B-MiraiFanfare","Llama-3.3-70B-Mokume-Gane-R1","Llama-3.3-70B-Nova","Llama-3.3-70B-Predatorial-Extasy","Llama-3.3-70B-Progenitor-V3.3","Llama-3.3-70B-RAWMAW","Llama-3.3-70B-Sapphira-0.1","Llama-3.3-70B-Sapphira-0.2","Llama-3.3-70B-Shakudo","Llama-3.3-70B-StrawberryLemonade-v1.0","Llama-3.3-70B-Strawberrylemonade-v1.2","Llama-3.3-70B-The-Omega-Directive-Unslop-v2.0","Llama-3.3-70B-The-Omega-Directive-Unslop-v2.1","Llama-3.3-70B-Vulpecula-R1","Magistral-Small-2506","MarinaraSpaghetti/NemoMix-Unleashed-12B","Meta-Llama-3-1-8B-Instruct-FP8","MiniMax-M1","MiniMax-M2","MiniMaxAI/MiniMax-M1-80k","Mistral-Nemo-12B-Instruct-2407","NeverSleep/Llama-3-Lumimaid-70B-v0.1","NeverSleep/Lumimaid-v0.2-70B","NousResearch 2/DeepHermes-3-Mistral-24B-Preview","NousResearch 2/Hermes-4-70B:thinking","NousResearch 2/hermes-3-llama-3.1-70b","NousResearch 2/hermes-4-405b","NousResearch 2/hermes-4-405b:thinking","NousResearch 2/hermes-4-70b","QwQ-32B-ArliAI-RpR-v1","Qwen2.5-32B-EVA-v0.2","ReadyArt/MS3.2-The-Omega-Directive-24B-Unslop-v2.0","ReadyArt/The-Omega-Abomination-L-70B-v1.0","Salesforce/Llama-xLAM-2-70b-fc-r","Sao10K/L3-8B-Stheno-v3.2","Sao10K/L3.1-70B-Euryale-v2.2","Sao10K/L3.1-70B-Hanami-x1","Sao10K/L3.3-70B-Euryale-v2.3","Steelskull/L3.3-Cu-Mai-R1-70b","Steelskull/L3.3-Electra-R1-70b","Steelskull/L3.3-MS-Evalebis-70b","Steelskull/L3.3-MS-Evayale-70B","Steelskull/L3.3-MS-Nevoria-70b","Steelskull/L3.3-Nevoria-R1-70b","TEE/deepseek-r1-0528","TEE/deepseek-v3.1","TEE/deepseek-v3.2","TEE/gemma-3-27b-it","TEE/glm-4.6","TEE/glm-4.7","TEE/glm-4.7-flash","TEE/glm-5","TEE/gpt-oss-120b","TEE/gpt-oss-20b","TEE/kimi-k2-thinking","TEE/kimi-k2.5","TEE/kimi-k2.5-thinking","TEE/llama3-3-70b","TEE/minimax-m2.1","TEE/qwen2.5-vl-72b-instruct","TEE/qwen3-30b-a3b-instruct-2507","TEE/qwen3-coder","TEE/qwen3.5-397b-a17b","THUDM/GLM-4-32B-0414","THUDM/GLM-4-9B-0414","THUDM/GLM-Z1-32B-0414","THUDM/GLM-Z1-9B-0414","THUDM/GLM-Z1-Rumination-32B-0414","TheDrummer 2/Anubis-70B-v1","TheDrummer 2/Anubis-70B-v1.1","TheDrummer 2/Cydonia-24B-v2","TheDrummer 2/Cydonia-24B-v4","TheDrummer 2/Cydonia-24B-v4.1","TheDrummer 2/Cydonia-24B-v4.3","TheDrummer 2/Magidonia-24B-v4.3","TheDrummer 2/Rocinante-12B-v1.1","TheDrummer 2/UnslopNemo-12B-v4.1","TheDrummer 2/skyfall-36b-v2","Tongyi-Zhiwen/QwenLong-L1-32B","VongolaChouko/Starcannon-Unleashed-12B-v1.0","abacusai/Dracarys-72B-Instruct","aion-labs/aion-1.0","aion-labs/aion-1.0-mini","aion-labs/aion-rp-llama-3.1-8b","alibaba/qwen3.6-flash","allenai/molmo-2-8b","allenai/olmo-3-32b-think","allenai/olmo-3.1-32b-instruct","allenai/olmo-3.1-32b-think","amazon/nova-2-lite-v1","amazon/nova-lite-v1","amazon/nova-micro-v1","amazon/nova-pro-v1","anthracite-org/magnum-v2-72b","anthracite-org/magnum-v4-72b","anthropic/claude-opus-4.6","anthropic/claude-opus-4.6:thinking","anthropic/claude-opus-4.6:thinking:low","anthropic/claude-opus-4.6:thinking:max","anthropic/claude-opus-4.6:thinking:medium","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet-4.6:thinking","arcee-ai/trinity-large","arcee-ai/trinity-mini","asi1-mini","auto-model","auto-model-basic","auto-model-premium","auto-model-standard","azure-gpt-4-turbo","azure-gpt-4o","azure-gpt-4o-mini","azure-o1","azure-o3-mini","baidu/ernie-4.5-300b-a47b","baidu/ernie-4.5-vl-28b-a3b","baseten/Kimi-K2-Instruct-FP4","brave","brave-pro","brave-research","chroma","chutesai/Mistral-Small-3.2-24B-Instruct-2506","claude-3-5-haiku-20241022","claude-3-5-sonnet-20240620","claude-3-5-sonnet-20241022","claude-3-7-sonnet-20250219","claude-3-7-sonnet-reasoner","claude-3-7-sonnet-thinking","claude-3-7-sonnet-thinking:1024","claude-3-7-sonnet-thinking:128000","claude-3-7-sonnet-thinking:32768","claude-3-7-sonnet-thinking:8192","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-1-thinking","claude-opus-4-1-thinking:1024","claude-opus-4-1-thinking:32000","claude-opus-4-1-thinking:32768","claude-opus-4-1-thinking:8192","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-5-20251101:thinking","claude-opus-4-thinking","claude-opus-4-thinking:1024","claude-opus-4-thinking:32000","claude-opus-4-thinking:32768","claude-opus-4-thinking:8192","claude-sonnet-4-20250514","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929-thinking","claude-sonnet-4-thinking","claude-sonnet-4-thinking:1024","claude-sonnet-4-thinking:32768","claude-sonnet-4-thinking:64000","claude-sonnet-4-thinking:8192","cognitivecomputations/dolphin-2.9.2-qwen2-72b","cohere/command-r","cohere/command-r-plus-08-2024","command-a-reasoning-08-2025","deepclaude","deepcogito/cogito-v1-preview-qwen-32B","deepcogito/cogito-v2.1-671b","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3.1","deepseek-ai/DeepSeek-V3.1-Terminus","deepseek-ai/DeepSeek-V3.1-Terminus:thinking","deepseek-ai/DeepSeek-V3.1:thinking","deepseek-ai/deepseek-v3.2-exp","deepseek-ai/deepseek-v3.2-exp-thinking","deepseek-chat","deepseek-chat-cheaper","deepseek-math-v2","deepseek-r1","deepseek-r1-sambanova","deepseek-reasoner","deepseek-reasoner-cheaper","deepseek-v3-0324","deepseek/deepseek-prover-v2-671b","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-speciale","deepseek/deepseek-v3.2:thinking","dmind/dmind-1","dmind/dmind-1-mini","doubao-1-5-thinking-pro-250415","doubao-1-5-thinking-pro-vision-250415","doubao-1-5-thinking-vision-pro-250428","doubao-1.5-pro-256k","doubao-1.5-pro-32k","doubao-1.5-vision-pro-32k","doubao-seed-1-6-250615","doubao-seed-1-6-flash-250615","doubao-seed-1-6-thinking-250615","doubao-seed-1-8-251215","doubao-seed-2-0-code-preview-260215","doubao-seed-2-0-lite-260215","doubao-seed-2-0-mini-260215","doubao-seed-2-0-pro-260215","doubao-seed-code-preview-latest","ernie-4.5-8k-preview","ernie-4.5-turbo-128k","ernie-4.5-turbo-vl-32k","ernie-5.0-thinking-latest","ernie-5.0-thinking-preview","ernie-x1-32k","ernie-x1-32k-preview","ernie-x1-turbo-32k","ernie-x1.1-preview","essentialai/rnj-1-instruct","exa-answer","exa-research","exa-research-pro","failspy/Meta-Llama-3-70B-Instruct-abliterated-v3.5","fastgpt","featherless-ai/Qwerky-72B","gemini-2.0-flash-001","gemini-2.0-flash-exp-image-generation","gemini-2.0-flash-lite","gemini-2.0-flash-thinking-exp-01-21","gemini-2.0-flash-thinking-exp-1219","gemini-2.0-pro-exp-02-05","gemini-2.0-pro-reasoner","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.5-flash-lite-preview-06-17","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-flash-lite-preview-09-2025-thinking","gemini-2.5-flash-nothinking","gemini-2.5-flash-preview-04-17","gemini-2.5-flash-preview-04-17:thinking","gemini-2.5-flash-preview-05-20","gemini-2.5-flash-preview-05-20:thinking","gemini-2.5-flash-preview-09-2025","gemini-2.5-flash-preview-09-2025-thinking","gemini-2.5-pro","gemini-2.5-pro-exp-03-25","gemini-2.5-pro-preview-03-25","gemini-2.5-pro-preview-05-06","gemini-2.5-pro-preview-06-05","gemini-3-pro-image-preview","gemini-3-pro-preview","gemini-3-pro-preview-thinking","gemini-exp-1206","glm-4","glm-4-air","glm-4-air-0111","glm-4-airx","glm-4-flash","glm-4-long","glm-4-plus","glm-4-plus-0111","glm-4.1v-thinking-flash","glm-4.1v-thinking-flashx","glm-z1-air","glm-z1-airx","glm-zero-preview","google/gemini-3-flash-preview","google/gemini-3-flash-preview-thinking","google/gemini-flash-1.5","grok-3-beta","grok-3-fast-beta","grok-3-mini-beta","grok-3-mini-fast-beta","hidream","huihui-ai/DeepSeek-R1-Distill-Llama-70B-abliterated","huihui-ai/DeepSeek-R1-Distill-Qwen-32B-abliterated","huihui-ai/Llama-3.1-Nemotron-70B-Instruct-HF-abliterated","huihui-ai/Llama-3.3-70B-Instruct-abliterated","huihui-ai/Qwen2.5-32B-Instruct-abliterated","hunyuan-t1-latest","hunyuan-turbos-20250226","inflatebot/MN-12B-Mag-Mell-R1","inflection/inflection-3-pi","inflection/inflection-3-productivity","jamba-large","jamba-large-1.6","jamba-large-1.7","jamba-mini","jamba-mini-1.6","jamba-mini-1.7","kimi-k2-instruct-fast","kimi-thinking-preview","learnlm-1.5-pro-experimental","meganova-ai/manta-flash-1.0","meganova-ai/manta-mini-1.0","meganova-ai/manta-pro-1.0","meituan-longcat/LongCat-Flash-Chat-FP8","meta-llama/llama-3.1-8b-instruct","meta-llama/llama-3.2-3b-instruct","meta-llama/llama-3.2-90b-vision-instruct","meta-llama/llama-3.3-70b-instruct","meta-llama/llama-4-maverick","meta-llama/llama-4-scout","microsoft/MAI-DS-R1-FP8","microsoft/wizardlm-2-8x22b","minimax/minimax-01","minimax/minimax-m2-her","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.7","miromind-ai/mirothinker-v1.5-235b","mistral-small-31-24b-instruct","mistralai/Devstral-Small-2505","mistralai/Mistral-Nemo-Instruct-2407","mistralai/codestral-2508","mistralai/devstral-2-123b-instruct-2512","mistralai/ministral-14b-2512","mistralai/ministral-14b-instruct-2512","mistralai/ministral-3b-2512","mistralai/ministral-8b-2512","mistralai/mistral-7b-instruct","mistralai/mistral-large","mistralai/mistral-large-3-675b-instruct-2512","mistralai/mistral-medium-3","mistralai/mistral-medium-3.1","mistralai/mistral-saba","mistralai/mistral-small-creative","mistralai/mistral-tiny","mistralai/mixtral-8x22b-instruct-v0.1","mistralai/mixtral-8x7b-instruct-v0.1","mlabonne/NeuralDaredevil-8B-abliterated","moonshotai/Kimi-Dev-72B","moonshotai/Kimi-K2-Instruct-0905","moonshotai/kimi-k2-instruct","moonshotai/kimi-k2-instruct-0711","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2-thinking-original","moonshotai/kimi-k2-thinking-turbo-original","moonshotai/kimi-k2.5","moonshotai/kimi-k2.5:thinking","moonshotai/kimi-k2.6","moonshotai/kimi-k2.6:thinking","nex-agi/deepseek-v3.1-nex-n1","nothingiisreal/L3.1-70B-Celeste-V0.1-BF16","nvidia/Llama-3.1-Nemotron-70B-Instruct-HF","nvidia/Llama-3.1-Nemotron-Ultra-253B-v1","nvidia/Llama-3.3-Nemotron-Super-49B-v1","nvidia/Llama-3_3-Nemotron-Super-49B-v1_5","nvidia/nemotron-3-nano-30b-a3b","nvidia/nvidia-nemotron-nano-9b-v2","openai/chatgpt-4o-latest","openai/gpt-3.5-turbo","openai/gpt-4-turbo","openai/gpt-4-turbo-preview","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-2024-08-06","openai/gpt-4o-2024-11-20","openai/gpt-4o-mini","openai/gpt-4o-mini-search-preview","openai/gpt-4o-search-preview","openai/gpt-5","openai/gpt-5-chat-latest","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-2025-11-13","openai/gpt-5.1-chat","openai/gpt-5.1-chat-latest","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/gpt-oss-safeguard-20b","openai/o1","openai/o1-preview","openai/o1-pro","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-mini-high","openai/o3-mini-low","openai/o3-pro-2025-06-10","openai/o4-mini","openai/o4-mini-deep-research","openai/o4-mini-high","pamanseau/OpenReasoning-Nemotron-32B","phi-4-mini-instruct","phi-4-multimodal-instruct","qvq-max","qwen-3.6-plus","qwen-image","qwen-long","qwen-max","qwen-plus","qwen-turbo","qwen/Qwen3.6-35B-A3B","qwen/Qwen3.6-35B-A3B:thinking","qwen/qwen3.5-397b-a17b","qwen25-vl-72b-instruct","qwen3-30b-a3b-instruct-2507","qwen3-coder-30b-a3b-instruct","qwen3-max-2026-01-23","qwen3-vl-235b-a22b-instruct-original","qwen3-vl-235b-a22b-thinking","qwen3.6-max-preview","qwq-32b","raifle/sorcererlm-8x22b","sarvan-medium","shisa-ai/shisa-v2-llama3.3-70b","shisa-ai/shisa-v2.1-llama3.3-70b","sonar","sonar-deep-research","sonar-pro","sonar-reasoning-pro","soob3123/GrayLine-Qwen3-8B","soob3123/Veiled-Calla-12B","soob3123/amoral-gemma3-27B-v2","step-2-16k-exp","step-2-mini","step-3","step-r1-v-mini","stepfun-ai/step-3.5-flash","stepfun-ai/step-3.5-flash:thinking","study_gpt-chatgpt-4o-latest","tencent/Hunyuan-MT-7B","tngtech/DeepSeek-TNG-R1T2-Chimera","tngtech/tng-r1t-chimera","undi95/remm-slerp-l2-13b","universal-summarizer","unsloth/gemma-3-12b-it","unsloth/gemma-3-1b-it","unsloth/gemma-3-27b-it","unsloth/gemma-3-4b-it","v0-1.0-md","v0-1.5-lg","v0-1.5-md","venice-uncensored","venice-uncensored:web","x-ai/grok-4-07-09","x-ai/grok-4-fast","x-ai/grok-4-fast:thinking","x-ai/grok-4.1-fast","x-ai/grok-4.1-fast-reasoning","x-ai/grok-code-fast-1","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-flash-original","xiaomi/mimo-v2-flash-thinking","xiaomi/mimo-v2-flash-thinking-original","yi-large","yi-lightning","yi-medium-200k","z-ai/glm-4.5v","z-ai/glm-4.5v:thinking","z-ai/glm-4.6","z-ai/glm-4.6:thinking","z-image-turbo","zai-org/glm-4.7","zai-org/glm-4.7-flash","zai-org/glm-5","zai-org/glm-5.1","zai-org/glm-5.1:thinking","zai-org/glm-5:thinking"],docUrl:"https://docs.nano-gpt.com",gateway:"models.dev"},abacus:{url:"https://routellm.abacus.ai/v1",apiKeyEnvVar:"ABACUS_API_KEY",apiKeyHeader:"Authorization",name:"Abacus",models:["Qwen/QwQ-32B","Qwen/Qwen2.5-72B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-32B","Qwen/qwen3-coder-480b-a35b-instruct","claude-3-7-sonnet-20250219","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-6","claude-sonnet-4-20250514","claude-sonnet-4-5-20250929","claude-sonnet-4-6","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-V3.1-Terminus","deepseek-ai/DeepSeek-V3.2","deepseek/deepseek-v3.1","gemini-2.5-flash","gemini-2.5-pro","gemini-3-flash-preview","gemini-3.1-flash-lite-preview","gemini-3.1-pro-preview","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-4o-2024-11-20","gpt-4o-mini","gpt-5","gpt-5-codex","gpt-5-mini","gpt-5-nano","gpt-5.1","gpt-5.1-chat-latest","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.2","gpt-5.2-chat-latest","gpt-5.2-codex","gpt-5.3-chat-latest","gpt-5.3-codex","gpt-5.3-codex-xhigh","gpt-5.4","grok-4-0709","grok-4-1-fast-non-reasoning","grok-4-fast-non-reasoning","grok-code-fast-1","kimi-k2-turbo-preview","kimi-k2.5","llama-3.3-70b-versatile","meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8","meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo","meta-llama/Meta-Llama-3.1-8B-Instruct","o3","o3-mini","o3-pro","o4-mini","openai/gpt-oss-120b","qwen-2.5-coder-32b","qwen3-max","route-llm","zai-org/glm-4.5","zai-org/glm-4.6","zai-org/glm-4.7","zai-org/glm-5"],docUrl:"https://abacus.ai/help/api",gateway:"models.dev"},"perplexity-agent":{url:"https://api.perplexity.ai/v1",apiKeyEnvVar:"PERPLEXITY_API_KEY",apiKeyHeader:"Authorization",name:"Perplexity Agent",models:["anthropic/claude-haiku-4-5","anthropic/claude-opus-4-5","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","google/gemini-2.5-flash","google/gemini-2.5-pro","google/gemini-3-flash-preview","google/gemini-3.1-pro-preview","nvidia/nemotron-3-super-120b-a12b","openai/gpt-5-mini","openai/gpt-5.1","openai/gpt-5.2","openai/gpt-5.4","openai/gpt-5.5","perplexity/sonar","xai/grok-4-1-fast-non-reasoning"],docUrl:"https://docs.perplexity.ai/docs/agent-api/models",gateway:"models.dev",npm:"@ai-sdk/openai"},"siliconflow-cn":{url:"https://api.siliconflow.cn/v1",apiKeyEnvVar:"SILICONFLOW_CN_API_KEY",apiKeyHeader:"Authorization",name:"SiliconFlow (China)",models:["ByteDance-Seed/Seed-OSS-36B-Instruct","Kwaipilot/KAT-Dev","PaddlePaddle/PaddleOCR-VL","PaddlePaddle/PaddleOCR-VL-1.5","Pro/MiniMaxAI/MiniMax-M2.1","Pro/MiniMaxAI/MiniMax-M2.5","Pro/deepseek-ai/DeepSeek-R1","Pro/deepseek-ai/DeepSeek-V3","Pro/deepseek-ai/DeepSeek-V3.1-Terminus","Pro/deepseek-ai/DeepSeek-V3.2","Pro/moonshotai/Kimi-K2-Instruct-0905","Pro/moonshotai/Kimi-K2-Thinking","Pro/moonshotai/Kimi-K2.5","Pro/moonshotai/Kimi-K2.6","Pro/zai-org/GLM-4.7","Pro/zai-org/GLM-5","Pro/zai-org/GLM-5.1","Qwen/QwQ-32B","Qwen/Qwen2.5-14B-Instruct","Qwen/Qwen2.5-32B-Instruct","Qwen/Qwen2.5-72B-Instruct","Qwen/Qwen2.5-72B-Instruct-128K","Qwen/Qwen2.5-7B-Instruct","Qwen/Qwen2.5-Coder-32B-Instruct","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen2.5-VL-72B-Instruct","Qwen/Qwen3-14B","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-30B-A3B-Thinking-2507","Qwen/Qwen3-32B","Qwen/Qwen3-8B","Qwen/Qwen3-Coder-30B-A3B-Instruct","Qwen/Qwen3-Coder-480B-A35B-Instruct","Qwen/Qwen3-Next-80B-A3B-Instruct","Qwen/Qwen3-Next-80B-A3B-Thinking","Qwen/Qwen3-Omni-30B-A3B-Captioner","Qwen/Qwen3-Omni-30B-A3B-Instruct","Qwen/Qwen3-Omni-30B-A3B-Thinking","Qwen/Qwen3-VL-235B-A22B-Instruct","Qwen/Qwen3-VL-235B-A22B-Thinking","Qwen/Qwen3-VL-30B-A3B-Instruct","Qwen/Qwen3-VL-30B-A3B-Thinking","Qwen/Qwen3-VL-32B-Instruct","Qwen/Qwen3-VL-32B-Thinking","Qwen/Qwen3-VL-8B-Instruct","Qwen/Qwen3-VL-8B-Thinking","Qwen/Qwen3.5-122B-A10B","Qwen/Qwen3.5-27B","Qwen/Qwen3.5-35B-A3B","Qwen/Qwen3.5-397B-A17B","Qwen/Qwen3.5-4B","Qwen/Qwen3.5-9B","Qwen/Qwen3.6-35B-A3B","THUDM/GLM-4-32B-0414","THUDM/GLM-4-9B-0414","THUDM/GLM-Z1-32B-0414","THUDM/GLM-Z1-9B-0414","ascend-tribe/pangu-pro-moe","baidu/ERNIE-4.5-300B-A47B","deepseek-ai/DeepSeek-OCR","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-R1-Distill-Qwen-14B","deepseek-ai/DeepSeek-R1-Distill-Qwen-32B","deepseek-ai/DeepSeek-V3","deepseek-ai/DeepSeek-V3.1-Terminus","deepseek-ai/DeepSeek-V3.2","deepseek-ai/deepseek-vl2","inclusionAI/Ling-flash-2.0","inclusionAI/Ling-mini-2.0","inclusionAI/Ring-flash-2.0","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","stepfun-ai/Step-3.5-Flash","tencent/Hunyuan-A13B-Instruct","tencent/Hunyuan-MT-7B","zai-org/GLM-4.5-Air","zai-org/GLM-4.5V","zai-org/GLM-4.6","zai-org/GLM-4.6V"],docUrl:"https://cloud.siliconflow.com/models",gateway:"models.dev"},submodel:{url:"https://llm.submodel.ai/v1",apiKeyEnvVar:"SUBMODEL_INSTAGEN_ACCESS_KEY",apiKeyHeader:"Authorization",name:"submodel",models:["Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3-0324","deepseek-ai/DeepSeek-V3.1","openai/gpt-oss-120b","zai-org/GLM-4.5-Air","zai-org/GLM-4.5-FP8"],docUrl:"https://submodel.gitbook.io",gateway:"models.dev"},"minimax-coding-plan":{url:"https://api.minimax.io/anthropic/v1",apiKeyEnvVar:"MINIMAX_API_KEY",apiKeyHeader:"Authorization",name:"MiniMax Token Plan (minimax.io)",models:["MiniMax-M2","MiniMax-M2.1","MiniMax-M2.5","MiniMax-M2.5-highspeed","MiniMax-M2.7","MiniMax-M2.7-highspeed"],docUrl:"https://platform.minimax.io/docs/token-plan/intro",gateway:"models.dev",npm:"@ai-sdk/anthropic"},claudinio:{url:"https://api.claudin.io/v1",apiKeyEnvVar:"CLAUDINIO_API_KEY",apiKeyHeader:"Authorization",name:"Claudinio",models:["claudinio"],docUrl:"https://claudin.io",gateway:"models.dev"},perplexity:{apiKeyEnvVar:"PERPLEXITY_API_KEY",name:"Perplexity",models:["sonar","sonar-deep-research","sonar-pro","sonar-reasoning-pro"],docUrl:"https://docs.perplexity.ai",gateway:"models.dev",npm:"@ai-sdk/perplexity"},deepseek:{url:"https://api.deepseek.com",apiKeyEnvVar:"DEEPSEEK_API_KEY",name:"DeepSeek",models:["deepseek-chat","deepseek-reasoner","deepseek-v4-flash","deepseek-v4-pro"],docUrl:"https://api-docs.deepseek.com/quick_start/pricing",gateway:"models.dev"},llama:{url:"https://api.llama.com/compat/v1/",apiKeyEnvVar:"LLAMA_API_KEY",apiKeyHeader:"Authorization",name:"Llama",models:["cerebras-llama-4-maverick-17b-128e-instruct","cerebras-llama-4-scout-17b-16e-instruct","groq-llama-4-maverick-17b-128e-instruct","llama-3.3-70b-instruct","llama-3.3-8b-instruct","llama-4-maverick-17b-128e-instruct-fp8","llama-4-scout-17b-16e-instruct-fp8"],docUrl:"https://llama.developer.meta.com/docs/models",gateway:"models.dev"},openrouter:{url:"https://openrouter.ai/api/v1",apiKeyEnvVar:"OPENROUTER_API_KEY",name:"OpenRouter",models:["ai21/jamba-large-1.7","aion-labs/aion-1.0","aion-labs/aion-1.0-mini","aion-labs/aion-2.0","aion-labs/aion-rp-llama-3.1-8b","alfredpros/codellama-7b-instruct-solidity","alibaba/tongyi-deepresearch-30b-a3b","allenai/olmo-3-32b-think","amazon/nova-2-lite-v1","amazon/nova-lite-v1","amazon/nova-micro-v1","amazon/nova-premier-v1","amazon/nova-pro-v1","anthracite-org/magnum-v4-72b","anthropic/claude-3-haiku","anthropic/claude-3.5-haiku","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.6-fast","anthropic/claude-opus-4.7","anthropic/claude-opus-4.7-fast","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","arcee-ai/coder-large","arcee-ai/maestro-reasoning","arcee-ai/spotlight","arcee-ai/trinity-large-preview","arcee-ai/trinity-large-thinking","arcee-ai/trinity-large-thinking:free","arcee-ai/trinity-mini","arcee-ai/virtuoso-large","baidu/cobuddy:free","baidu/ernie-4.5-21b-a3b","baidu/ernie-4.5-21b-a3b-thinking","baidu/ernie-4.5-300b-a47b","baidu/ernie-4.5-vl-28b-a3b","baidu/ernie-4.5-vl-424b-a47b","baidu/qianfan-ocr-fast","bytedance-seed/seed-1.6","bytedance-seed/seed-1.6-flash","bytedance-seed/seed-2.0-lite","bytedance-seed/seed-2.0-mini","bytedance/ui-tars-1.5-7b","cognitivecomputations/dolphin-mistral-24b-venice-edition:free","cohere/command-a","cohere/command-r-08-2024","cohere/command-r-plus-08-2024","cohere/command-r7b-12-2024","deepcogito/cogito-v2.1-671b","deepseek/deepseek-chat","deepseek/deepseek-chat-v3-0324","deepseek/deepseek-chat-v3.1","deepseek/deepseek-r1","deepseek/deepseek-r1-0528","deepseek/deepseek-r1-distill-llama-70b","deepseek/deepseek-r1-distill-qwen-32b","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v3.2-speciale","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-flash:free","deepseek/deepseek-v4-pro","essentialai/rnj-1-instruct","google/gemini-2.0-flash-001","google/gemini-2.0-flash-lite-001","google/gemini-2.5-flash","google/gemini-2.5-flash-image","google/gemini-2.5-flash-lite","google/gemini-2.5-flash-lite-preview-09-2025","google/gemini-2.5-pro","google/gemini-2.5-pro-preview","google/gemini-2.5-pro-preview-05-06","google/gemini-3-flash-preview","google/gemini-3-pro-image-preview","google/gemini-3.1-flash-image-preview","google/gemini-3.1-flash-lite","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","google/gemini-3.1-pro-preview-customtools","google/gemma-2-27b-it","google/gemma-3-12b-it","google/gemma-3-27b-it","google/gemma-3-4b-it","google/gemma-3n-e4b-it","google/gemma-4-26b-a4b-it","google/gemma-4-26b-a4b-it:free","google/gemma-4-31b-it","google/gemma-4-31b-it:free","google/lyria-3-clip-preview","google/lyria-3-pro-preview","gryphe/mythomax-l2-13b","ibm-granite/granite-4.0-h-micro","ibm-granite/granite-4.1-8b","inception/mercury-2","inclusionai/ling-2.6-1t","inclusionai/ling-2.6-flash","inclusionai/ring-2.6-1t:free","inflection/inflection-3-pi","inflection/inflection-3-productivity","kwaipilot/kat-coder-pro-v2","liquid/lfm-2-24b-a2b","liquid/lfm-2.5-1.2b-instruct:free","liquid/lfm-2.5-1.2b-thinking:free","mancer/weaver","meta-llama/llama-3-70b-instruct","meta-llama/llama-3-8b-instruct","meta-llama/llama-3.1-70b-instruct","meta-llama/llama-3.1-8b-instruct","meta-llama/llama-3.2-11b-vision-instruct","meta-llama/llama-3.2-1b-instruct","meta-llama/llama-3.2-3b-instruct","meta-llama/llama-3.2-3b-instruct:free","meta-llama/llama-3.3-70b-instruct","meta-llama/llama-3.3-70b-instruct:free","meta-llama/llama-4-maverick","meta-llama/llama-4-scout","meta-llama/llama-guard-3-8b","meta-llama/llama-guard-4-12b","microsoft/phi-4","microsoft/phi-4-mini-instruct","microsoft/wizardlm-2-8x22b","minimax/minimax-01","minimax/minimax-m1","minimax/minimax-m2","minimax/minimax-m2-her","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.5:free","minimax/minimax-m2.7","mistralai/codestral-2508","mistralai/devstral-2512","mistralai/devstral-medium","mistralai/devstral-small","mistralai/ministral-14b-2512","mistralai/ministral-3b-2512","mistralai/ministral-8b-2512","mistralai/mistral-7b-instruct-v0.1","mistralai/mistral-large","mistralai/mistral-large-2407","mistralai/mistral-large-2411","mistralai/mistral-large-2512","mistralai/mistral-medium-3","mistralai/mistral-medium-3-5","mistralai/mistral-medium-3.1","mistralai/mistral-nemo","mistralai/mistral-saba","mistralai/mistral-small-24b-instruct-2501","mistralai/mistral-small-2603","mistralai/mistral-small-3.1-24b-instruct","mistralai/mistral-small-3.2-24b-instruct","mistralai/mixtral-8x22b-instruct","mistralai/pixtral-large-2411","mistralai/voxtral-small-24b-2507","moonshotai/kimi-k2","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","morph/morph-v3-fast","morph/morph-v3-large","nex-agi/deepseek-v3.1-nex-n1","nousresearch/hermes-2-pro-llama-3-8b","nousresearch/hermes-3-llama-3.1-405b","nousresearch/hermes-3-llama-3.1-405b:free","nousresearch/hermes-3-llama-3.1-70b","nousresearch/hermes-4-405b","nousresearch/hermes-4-70b","nvidia/llama-3.3-nemotron-super-49b-v1.5","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-nano-30b-a3b:free","nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-3-super-120b-a12b:free","nvidia/nemotron-nano-12b-v2-vl:free","nvidia/nemotron-nano-9b-v2","nvidia/nemotron-nano-9b-v2:free","openai/gpt-3.5-turbo","openai/gpt-3.5-turbo-0613","openai/gpt-3.5-turbo-16k","openai/gpt-3.5-turbo-instruct","openai/gpt-4","openai/gpt-4-0314","openai/gpt-4-1106-preview","openai/gpt-4-turbo","openai/gpt-4-turbo-preview","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-2024-05-13","openai/gpt-4o-2024-08-06","openai/gpt-4o-2024-11-20","openai/gpt-4o-audio-preview","openai/gpt-4o-mini","openai/gpt-4o-mini-2024-07-18","openai/gpt-4o-mini-search-preview","openai/gpt-4o-search-preview","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-image","openai/gpt-5-image-mini","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-chat","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-image-2","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","openai/gpt-audio","openai/gpt-audio-mini","openai/gpt-chat-latest","openai/gpt-oss-120b","openai/gpt-oss-120b:free","openai/gpt-oss-20b","openai/gpt-oss-20b:free","openai/gpt-oss-safeguard-20b","openai/o1","openai/o1-pro","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-mini-high","openai/o3-pro","openai/o4-mini","openai/o4-mini-deep-research","openai/o4-mini-high","openrouter/auto","openrouter/bodybuilder","openrouter/free","openrouter/owl-alpha","openrouter/pareto-code","perceptron/perceptron-mk1","perplexity/sonar","perplexity/sonar-deep-research","perplexity/sonar-pro","perplexity/sonar-pro-search","perplexity/sonar-reasoning-pro","poolside/laguna-m.1:free","poolside/laguna-xs.2:free","prime-intellect/intellect-3","qwen/qwen-2.5-72b-instruct","qwen/qwen-2.5-7b-instruct","qwen/qwen-2.5-coder-32b-instruct","qwen/qwen-plus","qwen/qwen-plus-2025-07-28","qwen/qwen-plus-2025-07-28:thinking","qwen/qwen2.5-vl-72b-instruct","qwen/qwen3-14b","qwen/qwen3-235b-a22b","qwen/qwen3-235b-a22b-2507","qwen/qwen3-235b-a22b-thinking-2507","qwen/qwen3-30b-a3b","qwen/qwen3-30b-a3b-instruct-2507","qwen/qwen3-30b-a3b-thinking-2507","qwen/qwen3-32b","qwen/qwen3-8b","qwen/qwen3-coder","qwen/qwen3-coder-30b-a3b-instruct","qwen/qwen3-coder-flash","qwen/qwen3-coder-next","qwen/qwen3-coder-plus","qwen/qwen3-coder:free","qwen/qwen3-max","qwen/qwen3-max-thinking","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-instruct:free","qwen/qwen3-next-80b-a3b-thinking","qwen/qwen3-vl-235b-a22b-instruct","qwen/qwen3-vl-235b-a22b-thinking","qwen/qwen3-vl-30b-a3b-instruct","qwen/qwen3-vl-30b-a3b-thinking","qwen/qwen3-vl-32b-instruct","qwen/qwen3-vl-8b-instruct","qwen/qwen3-vl-8b-thinking","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","qwen/qwen3.5-9b","qwen/qwen3.5-flash-02-23","qwen/qwen3.5-plus-02-15","qwen/qwen3.5-plus-20260420","qwen/qwen3.6-27b","qwen/qwen3.6-35b-a3b","qwen/qwen3.6-flash","qwen/qwen3.6-max-preview","qwen/qwen3.6-plus","rekaai/reka-edge","rekaai/reka-flash-3","relace/relace-apply-3","relace/relace-search","sao10k/l3-euryale-70b","sao10k/l3-lunaris-8b","sao10k/l3.1-70b-hanami-x1","sao10k/l3.1-euryale-70b","sao10k/l3.3-euryale-70b","stepfun/step-3.5-flash","switchpoint/router","tencent/hunyuan-a13b-instruct","tencent/hy3-preview","thedrummer/cydonia-24b-v4.1","thedrummer/rocinante-12b","thedrummer/skyfall-36b-v2","thedrummer/unslopnemo-12b","undi95/remm-slerp-l2-13b","upstage/solar-pro-3","writer/palmyra-x5","x-ai/grok-3","x-ai/grok-3-beta","x-ai/grok-3-mini","x-ai/grok-3-mini-beta","x-ai/grok-4","x-ai/grok-4-fast","x-ai/grok-4.1-fast","x-ai/grok-4.20","x-ai/grok-4.20-multi-agent","x-ai/grok-4.3","x-ai/grok-code-fast-1","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-omni","xiaomi/mimo-v2-pro","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","z-ai/glm-4-32b","z-ai/glm-4.5","z-ai/glm-4.5-air","z-ai/glm-4.5-air:free","z-ai/glm-4.5v","z-ai/glm-4.6","z-ai/glm-4.6v","z-ai/glm-4.7","z-ai/glm-4.7-flash","z-ai/glm-5","z-ai/glm-5-turbo","z-ai/glm-5.1","z-ai/glm-5v-turbo","~anthropic/claude-haiku-latest","~anthropic/claude-opus-latest","~anthropic/claude-sonnet-latest","~google/gemini-flash-latest","~google/gemini-pro-latest","~moonshotai/kimi-latest","~openai/gpt-latest","~openai/gpt-mini-latest"],docUrl:"https://openrouter.ai/models",gateway:"models.dev",npm:"@openrouter/ai-sdk-provider"},"fireworks-ai":{url:"https://api.fireworks.ai/inference/v1/",apiKeyEnvVar:"FIREWORKS_API_KEY",apiKeyHeader:"Authorization",name:"Fireworks AI",models:["accounts/fireworks/models/deepseek-v3p1","accounts/fireworks/models/deepseek-v3p2","accounts/fireworks/models/deepseek-v4-pro","accounts/fireworks/models/glm-4p5","accounts/fireworks/models/glm-4p5-air","accounts/fireworks/models/glm-4p7","accounts/fireworks/models/glm-5","accounts/fireworks/models/glm-5p1","accounts/fireworks/models/gpt-oss-120b","accounts/fireworks/models/gpt-oss-20b","accounts/fireworks/models/kimi-k2-instruct","accounts/fireworks/models/kimi-k2-thinking","accounts/fireworks/models/kimi-k2p5","accounts/fireworks/models/kimi-k2p6","accounts/fireworks/models/minimax-m2p1","accounts/fireworks/models/minimax-m2p5","accounts/fireworks/models/minimax-m2p7","accounts/fireworks/models/qwen3p6-plus","accounts/fireworks/routers/kimi-k2p5-turbo"],docUrl:"https://fireworks.ai/docs/",gateway:"models.dev"},ambient:{url:"https://api.ambient.xyz/v1",apiKeyEnvVar:"AMBIENT_API_KEY",apiKeyHeader:"Authorization",name:"Ambient",models:["moonshotai/kimi-k2.6","zai-org/GLM-5.1-FP8"],docUrl:"https://ambient.xyz",gateway:"models.dev"},"kimi-for-coding":{url:"https://api.kimi.com/coding/v1",apiKeyEnvVar:"KIMI_API_KEY",apiKeyHeader:"Authorization",name:"Kimi For Coding",models:["k2p5","k2p6","kimi-k2-thinking"],docUrl:"https://www.kimi.com/coding/docs/en/third-party-agents.html",gateway:"models.dev",npm:"@ai-sdk/anthropic"},moark:{url:"https://moark.com/v1",apiKeyEnvVar:"MOARK_API_KEY",apiKeyHeader:"Authorization",name:"Moark",models:["GLM-4.7","MiniMax-M2.1"],docUrl:"https://moark.com/docs/openapi/v1#tag/%E6%96%87%E6%9C%AC%E7%94%9F%E6%88%90",gateway:"models.dev"},"opencode-go":{url:"https://opencode.ai/zen/go/v1",apiKeyEnvVar:"OPENCODE_API_KEY",apiKeyHeader:"Authorization",name:"OpenCode Go",models:["deepseek-v4-flash","deepseek-v4-pro","glm-5","glm-5.1","kimi-k2.5","kimi-k2.6","mimo-v2.5","mimo-v2.5-pro","minimax-m2.5","minimax-m2.7","qwen3.5-plus","qwen3.6-plus"],docUrl:"https://opencode.ai/docs/zen",gateway:"models.dev"},databricks:{url:"https://${DATABRICKS_HOST}/ai-gateway/mlflow/v1",apiKeyEnvVar:"DATABRICKS_TOKEN",apiKeyHeader:"Authorization",name:"Databricks",models:["databricks-claude-haiku-4-5","databricks-claude-opus-4-1","databricks-claude-opus-4-5","databricks-claude-opus-4-6","databricks-claude-opus-4-7","databricks-claude-sonnet-4","databricks-claude-sonnet-4-5","databricks-claude-sonnet-4-6","databricks-gemini-2-5-flash","databricks-gemini-2-5-pro","databricks-gemini-3-1-flash-lite","databricks-gemini-3-1-pro","databricks-gemini-3-flash","databricks-gemini-3-pro","databricks-gpt-5","databricks-gpt-5-1","databricks-gpt-5-2","databricks-gpt-5-4","databricks-gpt-5-4-mini","databricks-gpt-5-4-nano","databricks-gpt-5-5","databricks-gpt-5-mini","databricks-gpt-5-nano","databricks-gpt-oss-120b","databricks-gpt-oss-20b"],docUrl:"https://docs.databricks.com/aws/en/machine-learning/foundation-models/",gateway:"models.dev"},"io-net":{url:"https://api.intelligence.io.solutions/api/v1",apiKeyEnvVar:"IOINTELLIGENCE_API_KEY",apiKeyHeader:"Authorization",name:"IO.NET",models:["Intel/Qwen3-Coder-480B-A35B-Instruct-int4-mixed-ar","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-Next-80B-A3B-Instruct","deepseek-ai/DeepSeek-R1-0528","meta-llama/Llama-3.2-90B-Vision-Instruct","meta-llama/Llama-3.3-70B-Instruct","meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8","mistralai/Devstral-Small-2505","mistralai/Magistral-Small-2506","mistralai/Mistral-Large-Instruct-2411","mistralai/Mistral-Nemo-Instruct-2407","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","openai/gpt-oss-120b","openai/gpt-oss-20b","zai-org/GLM-4.6"],docUrl:"https://io.net/docs/guides/intelligence/io-intelligence",gateway:"models.dev"},"alibaba-cn":{url:"https://dashscope.aliyuncs.com/compatible-mode/v1",apiKeyEnvVar:"DASHSCOPE_API_KEY",apiKeyHeader:"Authorization",name:"Alibaba (China)",models:["MiniMax-M2.5","MiniMax/MiniMax-M2.7","deepseek-r1","deepseek-r1-0528","deepseek-r1-distill-llama-70b","deepseek-r1-distill-llama-8b","deepseek-r1-distill-qwen-1-5b","deepseek-r1-distill-qwen-14b","deepseek-r1-distill-qwen-32b","deepseek-r1-distill-qwen-7b","deepseek-v3","deepseek-v3-1","deepseek-v3-2-exp","deepseek-v4-flash","deepseek-v4-pro","glm-5","glm-5.1","kimi-k2-thinking","kimi-k2.5","kimi-k2.6","kimi/kimi-k2.5","moonshot-kimi-k2-instruct","qvq-max","qwen-deep-research","qwen-doc-turbo","qwen-flash","qwen-long","qwen-math-plus","qwen-math-turbo","qwen-max","qwen-mt-plus","qwen-mt-turbo","qwen-omni-turbo","qwen-omni-turbo-realtime","qwen-plus","qwen-plus-character","qwen-turbo","qwen-vl-max","qwen-vl-ocr","qwen-vl-plus","qwen2-5-14b-instruct","qwen2-5-32b-instruct","qwen2-5-72b-instruct","qwen2-5-7b-instruct","qwen2-5-coder-32b-instruct","qwen2-5-coder-7b-instruct","qwen2-5-math-72b-instruct","qwen2-5-math-7b-instruct","qwen2-5-omni-7b","qwen2-5-vl-72b-instruct","qwen2-5-vl-7b-instruct","qwen3-14b","qwen3-235b-a22b","qwen3-32b","qwen3-8b","qwen3-asr-flash","qwen3-coder-30b-a3b-instruct","qwen3-coder-480b-a35b-instruct","qwen3-coder-flash","qwen3-coder-plus","qwen3-max","qwen3-next-80b-a3b-instruct","qwen3-next-80b-a3b-thinking","qwen3-omni-flash","qwen3-omni-flash-realtime","qwen3-vl-235b-a22b","qwen3-vl-30b-a3b","qwen3-vl-plus","qwen3.5-397b-a17b","qwen3.5-flash","qwen3.5-plus","qwen3.6-max-preview","qwen3.6-plus","qwq-32b","qwq-plus","siliconflow/deepseek-r1-0528","siliconflow/deepseek-v3-0324","siliconflow/deepseek-v3.1-terminus","siliconflow/deepseek-v3.2","tongyi-intent-detect-v3"],docUrl:"https://www.alibabacloud.com/help/en/model-studio/models",gateway:"models.dev"},firepass:{url:"https://api.fireworks.ai/inference/v1/",apiKeyEnvVar:"FIREPASS_API_KEY",apiKeyHeader:"Authorization",name:"Fireworks (Firepass)",models:["accounts/fireworks/routers/kimi-k2p6-turbo"],docUrl:"https://docs.fireworks.ai/firepass",gateway:"models.dev"},"minimax-cn-coding-plan":{url:"https://api.minimaxi.com/anthropic/v1",apiKeyEnvVar:"MINIMAX_API_KEY",apiKeyHeader:"Authorization",name:"MiniMax Token Plan (minimaxi.com)",models:["MiniMax-M2","MiniMax-M2.1","MiniMax-M2.5","MiniMax-M2.5-highspeed","MiniMax-M2.7","MiniMax-M2.7-highspeed"],docUrl:"https://platform.minimaxi.com/docs/token-plan/intro",gateway:"models.dev",npm:"@ai-sdk/anthropic"},jiekou:{url:"https://api.jiekou.ai/openai",apiKeyEnvVar:"JIEKOU_API_KEY",apiKeyHeader:"Authorization",name:"Jiekou.AI",models:["baidu/ernie-4.5-300b-a47b-paddle","baidu/ernie-4.5-vl-424b-a47b","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-6","claude-sonnet-4-20250514","claude-sonnet-4-5-20250929","deepseek/deepseek-r1-0528","deepseek/deepseek-v3-0324","deepseek/deepseek-v3.1","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.5-flash-lite-preview-06-17","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-flash-preview-05-20","gemini-2.5-pro","gemini-2.5-pro-preview-06-05","gemini-3-flash-preview","gemini-3-pro-preview","gpt-5-chat-latest","gpt-5-codex","gpt-5-mini","gpt-5-nano","gpt-5-pro","gpt-5.1","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.1-codex-mini","gpt-5.2","gpt-5.2-codex","gpt-5.2-pro","grok-4-0709","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-fast-non-reasoning","grok-4-fast-reasoning","grok-code-fast-1","minimax/minimax-m2.1","minimaxai/minimax-m1-80k","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-instruct","moonshotai/kimi-k2.5","o3","o3-mini","o4-mini","qwen/qwen3-235b-a22b-fp8","qwen/qwen3-235b-a22b-instruct-2507","qwen/qwen3-235b-a22b-thinking-2507","qwen/qwen3-30b-a3b-fp8","qwen/qwen3-32b-fp8","qwen/qwen3-coder-480b-a35b-instruct","qwen/qwen3-coder-next","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-thinking","xiaomimimo/mimo-v2-flash","zai-org/glm-4.5","zai-org/glm-4.5v","zai-org/glm-4.7","zai-org/glm-4.7-flash"],docUrl:"https://docs.jiekou.ai/docs/support/quickstart?utm_source=github_models.dev",gateway:"models.dev"},bailing:{url:"https://api.tbox.cn/api/llm/v1/chat/completions",apiKeyEnvVar:"BAILING_API_TOKEN",apiKeyHeader:"Authorization",name:"Bailing",models:["Ling-1T","Ring-1T"],docUrl:"https://alipaytbox.yuque.com/sxs0ba/ling/intro",gateway:"models.dev"},iflowcn:{url:"https://apis.iflow.cn/v1",apiKeyEnvVar:"IFLOW_API_KEY",apiKeyHeader:"Authorization",name:"iFlow",models:["deepseek-r1","deepseek-v3","deepseek-v3.2","glm-4.6","kimi-k2","kimi-k2-0905","qwen3-235b","qwen3-235b-a22b-instruct","qwen3-235b-a22b-thinking-2507","qwen3-32b","qwen3-coder-plus","qwen3-max","qwen3-max-preview","qwen3-vl-plus"],docUrl:"https://platform.iflow.cn/en/docs",gateway:"models.dev"},orcarouter:{url:"https://api.orcarouter.ai/v1",apiKeyEnvVar:"ORCAROUTER_API_KEY",apiKeyHeader:"Authorization",name:"OrcaRouter",models:["anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","deepseek/deepseek-chat","deepseek/deepseek-reasoner","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","google/gemini-2.5-flash","google/gemini-2.5-flash-lite","google/gemini-2.5-pro","google/gemini-3-flash-preview","google/gemini-3-pro-preview","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","google/gemini-3.1-pro-preview-customtools","google/gemini-flash-latest","google/gemini-flash-lite-latest","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","grok/grok-4.3","kimi/kimi-k2.5","kimi/kimi-k2.6","minimax/minimax-m2.5","minimax/minimax-m2.5-highspeed","minimax/minimax-m2.7","minimax/minimax-m2.7-highspeed","openai/gpt-3.5-turbo","openai/gpt-4","openai/gpt-4-turbo","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-2024-05-13","openai/gpt-4o-2024-08-06","openai/gpt-4o-2024-11-20","openai/gpt-4o-mini","openai/gpt-5","openai/gpt-5-chat-latest","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-chat-latest","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat-latest","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat-latest","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","orcarouter/auto","qwen/qwen3-max","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","qwen/qwen3.5-plus","qwen/qwen3.6-35b-a3b","qwen/qwen3.6-plus","z-ai/glm-4.5","z-ai/glm-4.5-air","z-ai/glm-4.6","z-ai/glm-4.7","z-ai/glm-5","z-ai/glm-5.1"],docUrl:"https://docs.orcarouter.ai",gateway:"models.dev"},huggingface:{url:"https://router.huggingface.co/v1",apiKeyEnvVar:"HF_TOKEN",apiKeyHeader:"Authorization",name:"Hugging Face",models:["MiniMaxAI/MiniMax-M2.1","MiniMaxAI/MiniMax-M2.5","MiniMaxAI/MiniMax-M2.7","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-Coder-480B-A35B-Instruct","Qwen/Qwen3-Coder-Next","Qwen/Qwen3-Embedding-4B","Qwen/Qwen3-Embedding-8B","Qwen/Qwen3-Next-80B-A3B-Instruct","Qwen/Qwen3-Next-80B-A3B-Thinking","Qwen/Qwen3.5-397B-A17B","XiaomiMiMo/MiMo-V2-Flash","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V4-Pro","moonshotai/Kimi-K2-Instruct","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","zai-org/GLM-4.7","zai-org/GLM-4.7-Flash","zai-org/GLM-5","zai-org/GLM-5.1"],docUrl:"https://huggingface.co/docs/inference-providers",gateway:"models.dev"},zenmux:{url:"https://zenmux.ai/api/v1",apiKeyEnvVar:"ZENMUX_API_KEY",apiKeyHeader:"Authorization",name:"ZenMux",models:["anthropic/claude-3.5-haiku","anthropic/claude-3.7-sonnet","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","baidu/ernie-5.0-thinking-preview","deepseek/deepseek-chat","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","google/gemini-2.5-flash","google/gemini-2.5-flash-lite","google/gemini-2.5-pro","google/gemini-3-flash-preview","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","inclusionai/ling-1t","inclusionai/ring-1t","kuaishou/kat-coder-pro-v2","minimax/minimax-m2","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.5-lightning","minimax/minimax-m2.7","minimax/minimax-m2.7-highspeed","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2-thinking-turbo","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","openai/gpt-5","openai/gpt-5-codex","openai/gpt-5.1","openai/gpt-5.1-chat","openai/gpt-5.1-codex","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","qwen/qwen3-coder-plus","qwen/qwen3-max","qwen/qwen3.5-flash","qwen/qwen3.5-plus","qwen/qwen3.6-plus","sapiens-ai/agnes-1.5-lite","sapiens-ai/agnes-1.5-pro","stepfun/step-3","stepfun/step-3.5-flash","stepfun/step-3.5-flash-free","tencent/hy3-preview","volcengine/doubao-seed-1.8","volcengine/doubao-seed-2.0-code","volcengine/doubao-seed-2.0-lite","volcengine/doubao-seed-2.0-mini","volcengine/doubao-seed-2.0-pro","volcengine/doubao-seed-code","x-ai/grok-4","x-ai/grok-4-fast","x-ai/grok-4.1-fast","x-ai/grok-4.1-fast-non-reasoning","x-ai/grok-4.2-fast","x-ai/grok-4.2-fast-non-reasoning","x-ai/grok-code-fast-1","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-omni","xiaomi/mimo-v2-pro","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","z-ai/glm-4.5","z-ai/glm-4.5-air","z-ai/glm-4.6","z-ai/glm-4.6v","z-ai/glm-4.6v-flash","z-ai/glm-4.6v-flash-free","z-ai/glm-4.7","z-ai/glm-4.7-flash-free","z-ai/glm-4.7-flashx","z-ai/glm-5","z-ai/glm-5-turbo","z-ai/glm-5.1","z-ai/glm-5v-turbo"],docUrl:"https://docs.zenmux.ai",gateway:"models.dev"},upstage:{url:"https://api.upstage.ai/v1/solar",apiKeyEnvVar:"UPSTAGE_API_KEY",apiKeyHeader:"Authorization",name:"Upstage",models:["solar-mini","solar-pro2","solar-pro3"],docUrl:"https://developers.upstage.ai/docs/apis/chat",gateway:"models.dev"},"novita-ai":{url:"https://api.novita.ai/openai",apiKeyEnvVar:"NOVITA_API_KEY",apiKeyHeader:"Authorization",name:"NovitaAI",models:["Sao10K/L3-8B-Stheno-v3.2","baichuan/baichuan-m2-32b","baidu/ernie-4.5-21B-a3b","baidu/ernie-4.5-21B-a3b-thinking","baidu/ernie-4.5-300b-a47b-paddle","baidu/ernie-4.5-vl-28b-a3b","baidu/ernie-4.5-vl-28b-a3b-thinking","baidu/ernie-4.5-vl-424b-a47b","deepseek/deepseek-ocr","deepseek/deepseek-ocr-2","deepseek/deepseek-prover-v2-671b","deepseek/deepseek-r1-0528","deepseek/deepseek-r1-0528-qwen3-8b","deepseek/deepseek-r1-distill-llama-70b","deepseek/deepseek-r1-distill-qwen-14b","deepseek/deepseek-r1-distill-qwen-32b","deepseek/deepseek-r1-turbo","deepseek/deepseek-v3-0324","deepseek/deepseek-v3-turbo","deepseek/deepseek-v3.1","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","google/gemma-3-12b-it","google/gemma-3-27b-it","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","gryphe/mythomax-l2-13b","inclusionai/ling-2.6-1t","inclusionai/ling-2.6-flash","kwaipilot/kat-coder-pro","meta-llama/llama-3-70b-instruct","meta-llama/llama-3-8b-instruct","meta-llama/llama-3.1-8b-instruct","meta-llama/llama-3.2-3b-instruct","meta-llama/llama-3.3-70b-instruct","meta-llama/llama-4-maverick-17b-128e-instruct-fp8","meta-llama/llama-4-scout-17b-16e-instruct","microsoft/wizardlm-2-8x22b","minimax/minimax-m2","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.5-highspeed","minimax/minimax-m2.7","minimaxai/minimax-m1-80k","mistralai/mistral-nemo","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-instruct","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","nousresearch/hermes-2-pro-llama-3-8b","openai/gpt-oss-120b","openai/gpt-oss-20b","paddlepaddle/paddleocr-vl","qwen/qwen-2.5-72b-instruct","qwen/qwen-mt-plus","qwen/qwen2.5-7b-instruct","qwen/qwen2.5-vl-72b-instruct","qwen/qwen3-235b-a22b-fp8","qwen/qwen3-235b-a22b-instruct-2507","qwen/qwen3-235b-a22b-thinking-2507","qwen/qwen3-30b-a3b-fp8","qwen/qwen3-32b-fp8","qwen/qwen3-4b-fp8","qwen/qwen3-8b-fp8","qwen/qwen3-coder-30b-a3b-instruct","qwen/qwen3-coder-480b-a35b-instruct","qwen/qwen3-coder-next","qwen/qwen3-max","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-thinking","qwen/qwen3-omni-30b-a3b-instruct","qwen/qwen3-omni-30b-a3b-thinking","qwen/qwen3-vl-235b-a22b-instruct","qwen/qwen3-vl-235b-a22b-thinking","qwen/qwen3-vl-30b-a3b-instruct","qwen/qwen3-vl-30b-a3b-thinking","qwen/qwen3-vl-8b-instruct","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","sao10k/l3-70b-euryale-v2.1","sao10k/l3-8b-lunaris","sao10k/l31-70b-euryale-v2.2","xiaomimimo/mimo-v2-flash","zai-org/autoglm-phone-9b-multilingual","zai-org/glm-4.5","zai-org/glm-4.5-air","zai-org/glm-4.5v","zai-org/glm-4.6","zai-org/glm-4.6v","zai-org/glm-4.7","zai-org/glm-4.7-flash","zai-org/glm-5","zai-org/glm-5.1"],docUrl:"https://novita.ai/docs/guides/introduction",gateway:"models.dev"},"xiaomi-token-plan-cn":{url:"https://token-plan-cn.xiaomimimo.com/v1",apiKeyEnvVar:"XIAOMI_API_KEY",apiKeyHeader:"Authorization",name:"Xiaomi Token Plan (China)",models:["mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2-tts","mimo-v2.5","mimo-v2.5-pro"],docUrl:"https://platform.xiaomimimo.com/#/docs",gateway:"models.dev"},wandb:{url:"https://api.inference.wandb.ai/v1",apiKeyEnvVar:"WANDB_API_KEY",apiKeyHeader:"Authorization",name:"Weights & Biases",models:["MiniMaxAI/MiniMax-M2.5","OpenPipe/Qwen3-14B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-Coder-480B-A35B-Instruct","deepseek-ai/DeepSeek-V3.1","meta-llama/Llama-3.1-70B-Instruct","meta-llama/Llama-3.1-8B-Instruct","meta-llama/Llama-3.3-70B-Instruct","meta-llama/Llama-4-Scout-17B-16E-Instruct","microsoft/Phi-4-mini-instruct","moonshotai/Kimi-K2.5","nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-FP8","openai/gpt-oss-120b","openai/gpt-oss-20b","zai-org/GLM-5-FP8","zai-org/GLM-5.1"],docUrl:"https://docs.wandb.ai/guides/integrations/inference/",gateway:"models.dev"},chutes:{url:"https://llm.chutes.ai/v1",apiKeyEnvVar:"CHUTES_API_KEY",apiKeyHeader:"Authorization",name:"Chutes",models:["MiniMaxAI/MiniMax-M2.5-TEE","NousResearch/DeepHermes-3-Mistral-24B-Preview","NousResearch/Hermes-4-14B","Qwen/Qwen2.5-72B-Instruct","Qwen/Qwen2.5-Coder-32B-Instruct","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507-TEE","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B","Qwen/Qwen3-32B-TEE","Qwen/Qwen3-Coder-Next-TEE","Qwen/Qwen3-Next-80B-A3B-Instruct","Qwen/Qwen3.5-397B-A17B-TEE","Qwen/Qwen3.6-27B-TEE","Qwen/Qwen3Guard-Gen-0.6B","XiaomiMiMo/MiMo-V2-Flash-TEE","deepseek-ai/DeepSeek-R1-0528-TEE","deepseek-ai/DeepSeek-R1-Distill-Llama-70B","deepseek-ai/DeepSeek-V3-0324-TEE","deepseek-ai/DeepSeek-V3.1-TEE","deepseek-ai/DeepSeek-V3.2-TEE","google/gemma-4-31B-turbo-TEE","moonshotai/Kimi-K2.5-TEE","moonshotai/Kimi-K2.6-TEE","openai/gpt-oss-120b-TEE","rednote-hilab/dots.ocr","tngtech/DeepSeek-TNG-R1T2-Chimera-TEE","unsloth/Llama-3.2-1B-Instruct","unsloth/Llama-3.2-3B-Instruct","unsloth/Mistral-Nemo-Instruct-2407","unsloth/gemma-3-12b-it","unsloth/gemma-3-27b-it","unsloth/gemma-3-4b-it","zai-org/GLM-4.6V","zai-org/GLM-4.7-FP8","zai-org/GLM-4.7-TEE","zai-org/GLM-5-TEE","zai-org/GLM-5-Turbo","zai-org/GLM-5.1-TEE"],docUrl:"https://llm.chutes.ai/v1/models",gateway:"models.dev"},dinference:{url:"https://api.dinference.com/v1",apiKeyEnvVar:"DINFERENCE_API_KEY",apiKeyHeader:"Authorization",name:"DInference",models:["glm-4.7","glm-5","glm-5.1","gpt-oss-120b","minimax-m2.5"],docUrl:"https://dinference.com",gateway:"models.dev"},vivgrid:{url:"https://api.vivgrid.com/v1",apiKeyEnvVar:"VIVGRID_API_KEY",apiKeyHeader:"Authorization",name:"Vivgrid",models:["deepseek-v3.2","deepseek-v4-pro","gemini-3.1-flash-lite-preview","gemini-3.1-pro-preview","gpt-5-mini","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.2-codex","gpt-5.3-codex","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.5"],docUrl:"https://docs.vivgrid.com/models",gateway:"models.dev",npm:"@ai-sdk/openai"},deepinfra:{apiKeyEnvVar:"DEEPINFRA_API_KEY",name:"Deep Infra",models:["MiniMaxAI/MiniMax-M2","MiniMaxAI/MiniMax-M2.1","MiniMaxAI/MiniMax-M2.5","Qwen/Qwen3-Coder-480B-A35B-Instruct","Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo","Qwen/Qwen3.5-35B-A3B","Qwen/Qwen3.5-397B-A17B","Qwen/Qwen3.6-35B-A3B","anthropic/claude-3-7-sonnet-latest","anthropic/claude-4-opus","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V4-Flash","deepseek-ai/DeepSeek-V4-Pro","google/gemma-4-26B-A4B-it","google/gemma-4-31B-it","meta-llama/Llama-3.1-70B-Instruct","meta-llama/Llama-3.1-70B-Instruct-Turbo","meta-llama/Llama-3.1-8B-Instruct","meta-llama/Llama-3.1-8B-Instruct-Turbo","meta-llama/Llama-3.3-70B-Instruct-Turbo","meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8","meta-llama/Llama-4-Scout-17B-16E-Instruct","moonshotai/Kimi-K2-Instruct","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","openai/gpt-oss-120b","openai/gpt-oss-20b","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","zai-org/GLM-4.6","zai-org/GLM-4.6V","zai-org/GLM-4.7","zai-org/GLM-4.7-Flash","zai-org/GLM-5","zai-org/GLM-5.1"],docUrl:"https://deepinfra.com/models",gateway:"models.dev",npm:"@ai-sdk/deepinfra"},"qiniu-ai":{url:"https://api.qnaigc.com/v1",apiKeyEnvVar:"QINIU_API_KEY",apiKeyHeader:"Authorization",name:"Qiniu",models:["MiniMax-M1","claude-3.5-haiku","claude-3.5-sonnet","claude-3.7-sonnet","claude-4.0-opus","claude-4.0-sonnet","claude-4.1-opus","claude-4.5-haiku","claude-4.5-opus","claude-4.5-sonnet","deepseek-r1","deepseek-r1-0528","deepseek-v3","deepseek-v3-0324","deepseek-v3.1","deepseek/deepseek-math-v2","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.1-terminus-thinking","deepseek/deepseek-v3.2-251201","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v3.2-exp-thinking","doubao-1.5-pro-32k","doubao-1.5-thinking-pro","doubao-1.5-vision-pro","doubao-seed-1.6","doubao-seed-1.6-flash","doubao-seed-1.6-thinking","doubao-seed-2.0-code","doubao-seed-2.0-lite","doubao-seed-2.0-mini","doubao-seed-2.0-pro","gemini-2.0-flash","gemini-2.0-flash-lite","gemini-2.5-flash","gemini-2.5-flash-image","gemini-2.5-flash-lite","gemini-2.5-pro","gemini-3.0-flash-preview","gemini-3.0-pro-image-preview","gemini-3.0-pro-preview","glm-4.5","glm-4.5-air","gpt-oss-120b","gpt-oss-20b","kimi-k2","kling-v2-6","meituan/longcat-flash-chat","meituan/longcat-flash-lite","mimo-v2-flash","minimax/minimax-m2","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.5-highspeed","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.5","openai/gpt-5","openai/gpt-5.2","qwen-max-2025-01-25","qwen-turbo","qwen-vl-max-2025-01-25","qwen2.5-vl-72b-instruct","qwen2.5-vl-7b-instruct","qwen3-235b-a22b","qwen3-235b-a22b-instruct-2507","qwen3-235b-a22b-thinking-2507","qwen3-30b-a3b","qwen3-30b-a3b-instruct-2507","qwen3-30b-a3b-thinking-2507","qwen3-32b","qwen3-coder-480b-a35b-instruct","qwen3-max","qwen3-max-preview","qwen3-next-80b-a3b-instruct","qwen3-next-80b-a3b-thinking","qwen3-vl-30b-a3b-thinking","qwen3.5-397b-a17b","stepfun-ai/gelab-zero-4b-preview","stepfun/step-3.5-flash","x-ai/grok-4-fast","x-ai/grok-4-fast-non-reasoning","x-ai/grok-4-fast-reasoning","x-ai/grok-4.1-fast","x-ai/grok-4.1-fast-non-reasoning","x-ai/grok-4.1-fast-reasoning","x-ai/grok-code-fast-1","xiaomi/mimo-v2-flash","z-ai/autoglm-phone-9b","z-ai/glm-4.6","z-ai/glm-4.7","z-ai/glm-5"],docUrl:"https://developer.qiniu.com/aitokenapi",gateway:"models.dev"},kilo:{url:"https://api.kilo.ai/api/gateway",apiKeyEnvVar:"KILO_API_KEY",apiKeyHeader:"Authorization",name:"Kilo Gateway",models:["ai21/jamba-large-1.7","aion-labs/aion-1.0","aion-labs/aion-1.0-mini","aion-labs/aion-2.0","aion-labs/aion-rp-llama-3.1-8b","alfredpros/codellama-7b-instruct-solidity","alibaba/tongyi-deepresearch-30b-a3b","allenai/olmo-3-32b-think","alpindale/goliath-120b","amazon/nova-2-lite-v1","amazon/nova-lite-v1","amazon/nova-micro-v1","amazon/nova-premier-v1","amazon/nova-pro-v1","anthracite-org/magnum-v4-72b","anthropic/claude-3-haiku","anthropic/claude-3.5-haiku","anthropic/claude-3.7-sonnet","anthropic/claude-3.7-sonnet:thinking","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.6-fast","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","arcee-ai/coder-large","arcee-ai/maestro-reasoning","arcee-ai/spotlight","arcee-ai/trinity-large-preview","arcee-ai/trinity-large-thinking","arcee-ai/trinity-mini","arcee-ai/virtuoso-large","baidu/cobuddy:free","baidu/ernie-4.5-21b-a3b","baidu/ernie-4.5-21b-a3b-thinking","baidu/ernie-4.5-300b-a47b","baidu/ernie-4.5-vl-28b-a3b","baidu/ernie-4.5-vl-424b-a47b","baidu/qianfan-ocr-fast:free","bytedance-seed/seed-1.6","bytedance-seed/seed-1.6-flash","bytedance-seed/seed-2.0-lite","bytedance-seed/seed-2.0-mini","bytedance/ui-tars-1.5-7b","cohere/command-a","cohere/command-r-08-2024","cohere/command-r-plus-08-2024","cohere/command-r7b-12-2024","deepcogito/cogito-v2.1-671b","deepseek/deepseek-chat","deepseek/deepseek-chat-v3-0324","deepseek/deepseek-chat-v3.1","deepseek/deepseek-r1","deepseek/deepseek-r1-0528","deepseek/deepseek-r1-distill-llama-70b","deepseek/deepseek-r1-distill-qwen-32b","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v3.2-speciale","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","essentialai/rnj-1-instruct","google/gemini-2.0-flash-001","google/gemini-2.0-flash-lite-001","google/gemini-2.5-flash","google/gemini-2.5-flash-image","google/gemini-2.5-flash-lite","google/gemini-2.5-flash-lite-preview-09-2025","google/gemini-2.5-pro","google/gemini-2.5-pro-preview","google/gemini-2.5-pro-preview-05-06","google/gemini-3-flash-preview","google/gemini-3-pro-image-preview","google/gemini-3.1-flash-image-preview","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","google/gemini-3.1-pro-preview-customtools","google/gemma-2-27b-it","google/gemma-3-12b-it","google/gemma-3-27b-it","google/gemma-3-4b-it","google/gemma-3n-e4b-it","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","google/lyria-3-clip-preview","google/lyria-3-pro-preview","gryphe/mythomax-l2-13b","ibm-granite/granite-4.0-h-micro","ibm-granite/granite-4.1-8b","inception/mercury-2","inclusionai/ling-2.6-1t:free","inclusionai/ling-2.6-flash","inflection/inflection-3-pi","inflection/inflection-3-productivity","kilo-auto/balanced","kilo-auto/free","kilo-auto/frontier","kilo-auto/small","kwaipilot/kat-coder-pro-v2","liquid/lfm-2-24b-a2b","mancer/weaver","meta-llama/llama-3-70b-instruct","meta-llama/llama-3-8b-instruct","meta-llama/llama-3.1-70b-instruct","meta-llama/llama-3.1-8b-instruct","meta-llama/llama-3.2-11b-vision-instruct","meta-llama/llama-3.2-1b-instruct","meta-llama/llama-3.2-3b-instruct","meta-llama/llama-3.3-70b-instruct","meta-llama/llama-4-maverick","meta-llama/llama-4-scout","meta-llama/llama-guard-3-8b","meta-llama/llama-guard-4-12b","microsoft/phi-4","microsoft/phi-4-mini-instruct","microsoft/wizardlm-2-8x22b","minimax/minimax-01","minimax/minimax-m1","minimax/minimax-m2","minimax/minimax-m2-her","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.7","mistralai/codestral-2508","mistralai/devstral-2512","mistralai/devstral-medium","mistralai/devstral-small","mistralai/ministral-14b-2512","mistralai/ministral-3b-2512","mistralai/ministral-8b-2512","mistralai/mistral-7b-instruct-v0.1","mistralai/mistral-large","mistralai/mistral-large-2407","mistralai/mistral-large-2411","mistralai/mistral-large-2512","mistralai/mistral-medium-3","mistralai/mistral-medium-3-5","mistralai/mistral-medium-3.1","mistralai/mistral-nemo","mistralai/mistral-saba","mistralai/mistral-small-24b-instruct-2501","mistralai/mistral-small-2603","mistralai/mistral-small-3.1-24b-instruct","mistralai/mistral-small-3.2-24b-instruct","mistralai/mixtral-8x22b-instruct","mistralai/mixtral-8x7b-instruct","mistralai/pixtral-large-2411","mistralai/voxtral-small-24b-2507","moonshotai/kimi-k2","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","morph/morph-v3-fast","morph/morph-v3-large","nex-agi/deepseek-v3.1-nex-n1","nousresearch/hermes-2-pro-llama-3-8b","nousresearch/hermes-3-llama-3.1-405b","nousresearch/hermes-3-llama-3.1-70b","nousresearch/hermes-4-405b","nousresearch/hermes-4-70b","nvidia/llama-3.1-nemotron-70b-instruct","nvidia/llama-3.3-nemotron-super-49b-v1.5","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-3-super-120b-a12b:free","nvidia/nemotron-nano-9b-v2","openai/gpt-3.5-turbo","openai/gpt-3.5-turbo-0613","openai/gpt-3.5-turbo-16k","openai/gpt-3.5-turbo-instruct","openai/gpt-4","openai/gpt-4-0314","openai/gpt-4-1106-preview","openai/gpt-4-turbo","openai/gpt-4-turbo-preview","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-2024-05-13","openai/gpt-4o-2024-08-06","openai/gpt-4o-2024-11-20","openai/gpt-4o-audio-preview","openai/gpt-4o-mini","openai/gpt-4o-mini-2024-07-18","openai/gpt-4o-mini-search-preview","openai/gpt-4o-search-preview","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-image","openai/gpt-5-image-mini","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-chat","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-image-2","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","openai/gpt-audio","openai/gpt-audio-mini","openai/gpt-chat-latest","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/gpt-oss-safeguard-20b","openai/o1","openai/o1-pro","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-mini-high","openai/o3-pro","openai/o4-mini","openai/o4-mini-deep-research","openai/o4-mini-high","openrouter/auto","openrouter/bodybuilder","openrouter/free","openrouter/owl-alpha","openrouter/pareto-code","perplexity/sonar","perplexity/sonar-deep-research","perplexity/sonar-pro","perplexity/sonar-pro-search","perplexity/sonar-reasoning-pro","poolside/laguna-m.1:free","poolside/laguna-xs.2:free","prime-intellect/intellect-3","qwen/qwen-2.5-72b-instruct","qwen/qwen-2.5-7b-instruct","qwen/qwen-2.5-coder-32b-instruct","qwen/qwen-max","qwen/qwen-plus","qwen/qwen-plus-2025-07-28","qwen/qwen-plus-2025-07-28:thinking","qwen/qwen-turbo","qwen/qwen-vl-max","qwen/qwen-vl-plus","qwen/qwen2.5-vl-72b-instruct","qwen/qwen3-14b","qwen/qwen3-235b-a22b","qwen/qwen3-235b-a22b-2507","qwen/qwen3-235b-a22b-thinking-2507","qwen/qwen3-30b-a3b","qwen/qwen3-30b-a3b-instruct-2507","qwen/qwen3-30b-a3b-thinking-2507","qwen/qwen3-32b","qwen/qwen3-8b","qwen/qwen3-coder","qwen/qwen3-coder-30b-a3b-instruct","qwen/qwen3-coder-flash","qwen/qwen3-coder-next","qwen/qwen3-coder-plus","qwen/qwen3-max","qwen/qwen3-max-thinking","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-thinking","qwen/qwen3-vl-235b-a22b-instruct","qwen/qwen3-vl-235b-a22b-thinking","qwen/qwen3-vl-30b-a3b-instruct","qwen/qwen3-vl-30b-a3b-thinking","qwen/qwen3-vl-32b-instruct","qwen/qwen3-vl-8b-instruct","qwen/qwen3-vl-8b-thinking","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","qwen/qwen3.5-9b","qwen/qwen3.5-flash-02-23","qwen/qwen3.5-plus-02-15","qwen/qwen3.5-plus-20260420","qwen/qwen3.6-27b","qwen/qwen3.6-35b-a3b","qwen/qwen3.6-flash","qwen/qwen3.6-max-preview","qwen/qwen3.6-plus","rekaai/reka-edge","rekaai/reka-flash-3","relace/relace-apply-3","relace/relace-search","sao10k/l3-euryale-70b","sao10k/l3-lunaris-8b","sao10k/l3.1-70b-hanami-x1","sao10k/l3.1-euryale-70b","sao10k/l3.3-euryale-70b","stepfun/step-3.5-flash","stepfun/step-3.5-flash:free","switchpoint/router","tencent/hunyuan-a13b-instruct","tencent/hy3-preview:free","thedrummer/cydonia-24b-v4.1","thedrummer/rocinante-12b","thedrummer/skyfall-36b-v2","thedrummer/unslopnemo-12b","tngtech/deepseek-r1t2-chimera","undi95/remm-slerp-l2-13b","upstage/solar-pro-3","writer/palmyra-x5","x-ai/grok-3","x-ai/grok-3-beta","x-ai/grok-3-mini","x-ai/grok-3-mini-beta","x-ai/grok-4","x-ai/grok-4-fast","x-ai/grok-4.1-fast","x-ai/grok-4.20","x-ai/grok-4.20-multi-agent","x-ai/grok-4.3","x-ai/grok-code-fast-1","x-ai/grok-code-fast-1:optimized:free","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-omni","xiaomi/mimo-v2-pro","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","z-ai/glm-4-32b","z-ai/glm-4.5","z-ai/glm-4.5-air","z-ai/glm-4.5v","z-ai/glm-4.6","z-ai/glm-4.6v","z-ai/glm-4.7","z-ai/glm-4.7-flash","z-ai/glm-5","z-ai/glm-5-turbo","z-ai/glm-5.1","z-ai/glm-5v-turbo","~anthropic/claude-haiku-latest","~anthropic/claude-opus-latest","~anthropic/claude-sonnet-latest","~google/gemini-flash-latest","~google/gemini-pro-latest","~moonshotai/kimi-latest","~openai/gpt-latest","~openai/gpt-mini-latest"],docUrl:"https://kilo.ai",gateway:"models.dev"},auriko:{url:"https://api.auriko.ai/v1",apiKeyEnvVar:"AURIKO_API_KEY",apiKeyHeader:"Authorization",name:"Auriko",models:["claude-opus-4-6","claude-opus-4-7","claude-sonnet-4-6","deepseek-v4-flash","deepseek-v4-pro","gemini-2.5-flash","gemini-2.5-pro","gemini-3.1-pro-preview","glm-5.1","grok-4.3","kimi-k2.5","kimi-k2.6","minimax-m2-7","minimax-m2-7-highspeed","qwen-3.6-plus"],docUrl:"https://docs.auriko.ai",gateway:"models.dev"},morph:{url:"https://api.morphllm.com/v1",apiKeyEnvVar:"MORPH_API_KEY",apiKeyHeader:"Authorization",name:"Morph",models:["auto","morph-v3-fast","morph-v3-large"],docUrl:"https://docs.morphllm.com/api-reference/introduction",gateway:"models.dev"},mixlayer:{url:"https://models.mixlayer.ai/v1",apiKeyEnvVar:"MIXLAYER_API_KEY",apiKeyHeader:"Authorization",name:"Mixlayer",models:["qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","qwen/qwen3.5-9b"],docUrl:"https://docs.mixlayer.com",gateway:"models.dev"},"xiaomi-token-plan-sgp":{url:"https://token-plan-sgp.xiaomimimo.com/v1",apiKeyEnvVar:"XIAOMI_API_KEY",apiKeyHeader:"Authorization",name:"Xiaomi Token Plan (Singapore)",models:["mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2-tts","mimo-v2.5","mimo-v2.5-pro"],docUrl:"https://platform.xiaomimimo.com/#/docs",gateway:"models.dev"},zai:{url:"https://api.z.ai/api/paas/v4",apiKeyEnvVar:"ZHIPU_API_KEY",apiKeyHeader:"Authorization",name:"Z.AI",models:["glm-4.5","glm-4.5-air","glm-4.5-flash","glm-4.5v","glm-4.6","glm-4.6v","glm-4.7","glm-4.7-flash","glm-4.7-flashx","glm-5","glm-5-turbo","glm-5.1","glm-5v-turbo"],docUrl:"https://docs.z.ai/guides/overview/pricing",gateway:"models.dev"},opencode:{url:"https://opencode.ai/zen/v1",apiKeyEnvVar:"OPENCODE_API_KEY",apiKeyHeader:"Authorization",name:"OpenCode Zen",models:["big-pickle","claude-haiku-4-5","claude-opus-4-1","claude-opus-4-5","claude-opus-4-6","claude-opus-4-7","claude-sonnet-4","claude-sonnet-4-5","claude-sonnet-4-6","deepseek-v4-flash-free","gemini-3-flash","gemini-3.1-pro","glm-5","glm-5.1","gpt-5","gpt-5-codex","gpt-5-nano","gpt-5.1","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.1-codex-mini","gpt-5.2","gpt-5.2-codex","gpt-5.3-codex","gpt-5.3-codex-spark","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.4-pro","gpt-5.5","gpt-5.5-pro","kimi-k2.5","kimi-k2.6","minimax-m2.5","minimax-m2.5-free","minimax-m2.7","nemotron-3-super-free","qwen3.5-plus","qwen3.6-plus","qwen3.6-plus-free"],docUrl:"https://opencode.ai/docs/zen",gateway:"models.dev"},stepfun:{url:"https://api.stepfun.com/v1",apiKeyEnvVar:"STEPFUN_API_KEY",apiKeyHeader:"Authorization",name:"StepFun",models:["step-1-32k","step-2-16k","step-3.5-flash","step-3.5-flash-2603"],docUrl:"https://platform.stepfun.com/docs/zh/overview/concept",gateway:"models.dev"},nebius:{url:"https://api.tokenfactory.nebius.com/v1",apiKeyEnvVar:"NEBIUS_API_KEY",apiKeyHeader:"Authorization",name:"Nebius Token Factory",models:["MiniMaxAI/MiniMax-M2.5","MiniMaxAI/MiniMax-M2.5-fast","NousResearch/Hermes-4-405B","NousResearch/Hermes-4-70B","PrimeIntellect/INTELLECT-3","Qwen/Qwen2.5-VL-72B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507-fast","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-32B","Qwen/Qwen3-Embedding-8B","Qwen/Qwen3-Next-80B-A3B-Thinking","Qwen/Qwen3-Next-80B-A3B-Thinking-fast","Qwen/Qwen3.5-397B-A17B","Qwen/Qwen3.5-397B-A17B-fast","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V3.2-fast","deepseek-ai/DeepSeek-V4-Pro","google/gemma-2-2b-it","google/gemma-3-27b-it","meta-llama/Llama-3.3-70B-Instruct","meta-llama/Meta-Llama-3.1-8B-Instruct","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.5-fast","nvidia/Llama-3_1-Nemotron-Ultra-253B-v1","nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B","nvidia/Nemotron-3-Nano-Omni","nvidia/nemotron-3-super-120b-a12b","openai/gpt-oss-120b","openai/gpt-oss-120b-fast","zai-org/GLM-5"],docUrl:"https://docs.tokenfactory.nebius.com/",gateway:"models.dev"},poe:{url:"https://api.poe.com/v1",apiKeyEnvVar:"POE_API_KEY",apiKeyHeader:"Authorization",name:"Poe",models:["anthropic/claude-haiku-3","anthropic/claude-haiku-3.5","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-3.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","cerebras/gpt-oss-120b-cs","cerebras/llama-3.1-8b-cs","elevenlabs/elevenlabs-music","elevenlabs/elevenlabs-v2.5-turbo","elevenlabs/elevenlabs-v3","empiriolabs/deepseek-v4-flash-el","empiriolabs/deepseek-v4-pro-el","fireworks-ai/kimi-k2.5-fw","google/gemini-2.0-flash","google/gemini-2.0-flash-lite","google/gemini-2.5-flash","google/gemini-2.5-flash-lite","google/gemini-2.5-pro","google/gemini-3-flash","google/gemini-3.1-flash-lite","google/gemini-3.1-pro","google/gemma-4-31b","google/imagen-3","google/imagen-3-fast","google/imagen-4","google/imagen-4-fast","google/imagen-4-ultra","google/lyria","google/nano-banana","google/nano-banana-pro","google/veo-2","google/veo-3","google/veo-3-fast","google/veo-3.1","google/veo-3.1-fast","ideogramai/ideogram","ideogramai/ideogram-v2","ideogramai/ideogram-v2a","ideogramai/ideogram-v2a-turbo","lumalabs/ray2","novita/deepseek-v3.2","novita/glm-4.6","novita/glm-4.6v","novita/glm-4.7-flash","novita/glm-4.7-n","novita/glm-5","novita/kimi-k2-thinking","novita/kimi-k2.5","novita/kimi-k2.6","novita/minimax-m2.1","openai/dall-e-3","openai/gpt-3.5-turbo","openai/gpt-3.5-turbo-instruct","openai/gpt-3.5-turbo-raw","openai/gpt-4-turbo","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-aug","openai/gpt-4o-mini","openai/gpt-4o-mini-search","openai/gpt-4o-search","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.1-instant","openai/gpt-5.2","openai/gpt-5.2-codex","openai/gpt-5.2-instant","openai/gpt-5.2-pro","openai/gpt-5.3-codex","openai/gpt-5.3-codex-spark","openai/gpt-5.3-instant","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","openai/gpt-image-1","openai/gpt-image-1-mini","openai/gpt-image-1.5","openai/gpt-image-2","openai/o1","openai/o1-pro","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-mini-high","openai/o3-pro","openai/o4-mini","openai/o4-mini-deep-research","openai/sora-2","openai/sora-2-pro","poetools/claude-code","runwayml/runway","runwayml/runway-gen-4-turbo","stabilityai/stablediffusionxl","topazlabs-co/topazlabs","trytako/tako","xai/grok-3","xai/grok-3-mini","xai/grok-4","xai/grok-4-fast-non-reasoning","xai/grok-4-fast-reasoning","xai/grok-4.1-fast-non-reasoning","xai/grok-4.1-fast-reasoning","xai/grok-4.20-multi-agent","xai/grok-code-fast-1"],docUrl:"https://creator.poe.com/docs/external-applications/openai-compatible-api",gateway:"models.dev"},helicone:{url:"https://ai-gateway.helicone.ai/v1",apiKeyEnvVar:"HELICONE_API_KEY",apiKeyHeader:"Authorization",name:"Helicone",models:["chatgpt-4o-latest","claude-3-haiku-20240307","claude-3.5-haiku","claude-3.5-sonnet-v2","claude-3.7-sonnet","claude-4.5-haiku","claude-4.5-opus","claude-4.5-sonnet","claude-haiku-4-5-20251001","claude-opus-4","claude-opus-4-1","claude-opus-4-1-20250805","claude-sonnet-4","claude-sonnet-4-5-20250929","deepseek-r1-distill-llama-70b","deepseek-reasoner","deepseek-tng-r1t2-chimera","deepseek-v3","deepseek-v3.1-terminus","deepseek-v3.2","ernie-4.5-21b-a3b-thinking","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.5-pro","gemini-3-pro-preview","gemma-3-12b-it","gemma2-9b-it","glm-4.6","gpt-4.1","gpt-4.1-mini","gpt-4.1-mini-2025-04-14","gpt-4.1-nano","gpt-4o","gpt-4o-mini","gpt-5","gpt-5-chat-latest","gpt-5-codex","gpt-5-mini","gpt-5-nano","gpt-5-pro","gpt-5.1","gpt-5.1-chat-latest","gpt-5.1-codex","gpt-5.1-codex-mini","gpt-oss-120b","gpt-oss-20b","grok-3","grok-3-mini","grok-4","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-fast-non-reasoning","grok-4-fast-reasoning","grok-code-fast-1","hermes-2-pro-llama-3-8b","kimi-k2-0711","kimi-k2-0905","kimi-k2-thinking","llama-3.1-8b-instant","llama-3.1-8b-instruct","llama-3.1-8b-instruct-turbo","llama-3.3-70b-instruct","llama-3.3-70b-versatile","llama-4-maverick","llama-4-scout","llama-guard-4","llama-prompt-guard-2-22m","llama-prompt-guard-2-86m","mistral-large-2411","mistral-nemo","mistral-small","o1","o1-mini","o3","o3-mini","o3-pro","o4-mini","qwen2.5-coder-7b-fast","qwen3-235b-a22b-thinking","qwen3-30b-a3b","qwen3-32b","qwen3-coder","qwen3-coder-30b-a3b-instruct","qwen3-next-80b-a3b-instruct","qwen3-vl-235b-a22b-instruct","sonar","sonar-deep-research","sonar-pro","sonar-reasoning","sonar-reasoning-pro"],docUrl:"https://helicone.ai/models",gateway:"models.dev"},"ollama-cloud":{url:"https://ollama.com/v1",apiKeyEnvVar:"OLLAMA_API_KEY",apiKeyHeader:"Authorization",name:"Ollama Cloud",models:["cogito-2.1:671b","deepseek-v3.1:671b","deepseek-v3.2","deepseek-v4-flash","deepseek-v4-pro","devstral-2:123b","devstral-small-2:24b","gemini-3-flash-preview","gemma3:12b","gemma3:27b","gemma3:4b","gemma4:31b","glm-4.6","glm-4.7","glm-5","glm-5.1","gpt-oss:120b","gpt-oss:20b","kimi-k2-thinking","kimi-k2.5","kimi-k2.6","kimi-k2:1t","minimax-m2","minimax-m2.1","minimax-m2.5","minimax-m2.7","ministral-3:14b","ministral-3:3b","ministral-3:8b","mistral-large-3:675b","nemotron-3-nano:30b","nemotron-3-super","qwen3-coder-next","qwen3-coder:480b","qwen3-next:80b","qwen3-vl:235b","qwen3-vl:235b-instruct","qwen3.5:397b","rnj-1:8b"],docUrl:"https://docs.ollama.com/cloud",gateway:"models.dev"},"zai-coding-plan":{url:"https://api.z.ai/api/coding/paas/v4",apiKeyEnvVar:"ZHIPU_API_KEY",apiKeyHeader:"Authorization",name:"Z.AI Coding Plan",models:["glm-4.5-air","glm-4.7","glm-5-turbo","glm-5.1","glm-5v-turbo"],docUrl:"https://docs.z.ai/devpack/overview",gateway:"models.dev"},"umans-ai-coding-plan":{url:"https://api.code.umans.ai/v1",apiKeyEnvVar:"UMANS_AI_CODING_PLAN_API_KEY",apiKeyHeader:"Authorization",name:"Umans AI Coding Plan",models:["umans-coder","umans-flash","umans-glm-5.1","umans-kimi-k2.6","umans-qwen3.6-35b-a3b"],docUrl:"https://app.umans.ai/offers/code/docs",gateway:"models.dev"},"the-grid-ai":{url:"https://api.thegrid.ai/v1",apiKeyEnvVar:"THEGRIDAI_API_KEY",apiKeyHeader:"Authorization",name:"The Grid AI",models:["text-max","text-prime","text-standard"],docUrl:"https://thegrid.ai/docs",gateway:"models.dev"},baseten:{url:"https://inference.baseten.co/v1",apiKeyEnvVar:"BASETEN_API_KEY",apiKeyHeader:"Authorization",name:"Baseten",models:["MiniMaxAI/MiniMax-M2.5","deepseek-ai/DeepSeek-V3-0324","deepseek-ai/DeepSeek-V3.1","deepseek-ai/DeepSeek-V4-Pro","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","nvidia/Nemotron-120B-A12B","openai/gpt-oss-120b","zai-org/GLM-4.6","zai-org/GLM-4.7","zai-org/GLM-5"],docUrl:"https://docs.baseten.co/development/model-apis/overview",gateway:"models.dev"},frogbot:{url:"https://app.frogbot.ai/api/v1",apiKeyEnvVar:"FROGBOT_API_KEY",apiKeyHeader:"Authorization",name:"FrogBot",models:["claude-haiku-4-5","claude-opus-4-6","claude-opus-4-7","claude-sonnet-4-6","deepseek-v4-pro","gemini-2.5-flash","gemini-2.5-pro","gemini-3-1-pro-preview","gemini-3-flash-preview","gpt-4o","gpt-5-3-codex","gpt-5-4-mini","gpt-5-4-nano","gpt-5-5","gpt-oss-120b","gpt-oss-20b","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-3","grok-code-fast-1","kimi-k2-6","kimi-k2.5","minimax-m2-5","minimax-m2-7","qwen-3-6-plus","zai-glm-5-1"],docUrl:"https://docs.frogbot.ai",gateway:"models.dev"},"zhipuai-coding-plan":{url:"https://open.bigmodel.cn/api/coding/paas/v4",apiKeyEnvVar:"ZHIPU_API_KEY",apiKeyHeader:"Authorization",name:"Zhipu AI Coding Plan",models:["glm-4.5-air","glm-4.7","glm-5-turbo","glm-5.1","glm-5v-turbo"],docUrl:"https://docs.bigmodel.cn/cn/coding-plan/overview",gateway:"models.dev"},"alibaba-coding-plan":{url:"https://coding-intl.dashscope.aliyuncs.com/v1",apiKeyEnvVar:"ALIBABA_CODING_PLAN_API_KEY",apiKeyHeader:"Authorization",name:"Alibaba Coding Plan",models:["MiniMax-M2.5","glm-4.7","glm-5","kimi-k2.5","qwen3-coder-next","qwen3-coder-plus","qwen3-max-2026-01-23","qwen3.5-plus","qwen3.6-plus"],docUrl:"https://www.alibabacloud.com/help/en/model-studio/coding-plan",gateway:"models.dev"},cerebras:{apiKeyEnvVar:"CEREBRAS_API_KEY",name:"Cerebras",models:["gpt-oss-120b","llama3.1-8b","qwen-3-235b-a22b-instruct-2507","zai-glm-4.7"],docUrl:"https://inference-docs.cerebras.ai/models/overview",gateway:"models.dev",npm:"@ai-sdk/cerebras"},lmstudio:{url:"http://127.0.0.1:1234/v1",apiKeyEnvVar:"LMSTUDIO_API_KEY",apiKeyHeader:"Authorization",name:"LMStudio",models:["openai/gpt-oss-20b","qwen/qwen3-30b-a3b-2507","qwen/qwen3-coder-30b"],docUrl:"https://lmstudio.ai/models",gateway:"models.dev"},lucidquery:{url:"https://lucidquery.com/api/v1",apiKeyEnvVar:"LUCIDQUERY_API_KEY",apiKeyHeader:"Authorization",name:"LucidQuery AI",models:["lucidnova-rf1-100b","lucidquery-nexus-coder"],docUrl:"https://lucidquery.com/api/docs",gateway:"models.dev"},"moonshotai-cn":{url:"https://api.moonshot.cn/anthropic/v1",apiKeyEnvVar:"MOONSHOT_API_KEY",apiKeyHeader:"Authorization",name:"Moonshot AI (China)",models:["kimi-k2-0711-preview","kimi-k2-0905-preview","kimi-k2-thinking","kimi-k2-thinking-turbo","kimi-k2-turbo-preview","kimi-k2.5","kimi-k2.6"],docUrl:"https://platform.moonshot.cn/docs/api/chat",gateway:"models.dev",npm:"@ai-sdk/anthropic"},gmicloud:{url:"https://api.gmi-serving.com/v1",apiKeyEnvVar:"GMICLOUD_API_KEY",apiKeyHeader:"Authorization",name:"GMI Cloud",models:["anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4.6","deepseek-ai/DeepSeek-V4-Flash","deepseek-ai/DeepSeek-V4-Pro","moonshotai/Kimi-K2.6","zai-org/GLM-5-FP8","zai-org/GLM-5.1-FP8"],docUrl:"https://docs.gmicloud.ai/inference-engine/api-reference/llm-api-reference",gateway:"models.dev"},"abliteration-ai":{url:"https://api.abliteration.ai/v1",apiKeyEnvVar:"ABLIT_KEY",apiKeyHeader:"Authorization",name:"abliteration.ai",models:["abliterated-model"],docUrl:"https://docs.abliteration.ai/models",gateway:"models.dev"},"wafer.ai":{url:"https://pass.wafer.ai/v1",apiKeyEnvVar:"WAFER_API_KEY",apiKeyHeader:"Authorization",name:"Wafer",models:["GLM-5.1","Qwen3.5-397B-A17B"],docUrl:"https://docs.wafer.ai/wafer-pass",gateway:"models.dev"},xpersona:{url:"https://xpersona.co/v1",apiKeyEnvVar:"XPERSONA_API_KEY",apiKeyHeader:"Authorization",name:"Xpersona",models:["xpersona-frieren-coder"],docUrl:"https://xpersona.co/docs",gateway:"models.dev"},"cloudferro-sherlock":{url:"https://api-sherlock.cloudferro.com/openai/v1/",apiKeyEnvVar:"CLOUDFERRO_SHERLOCK_API_KEY",apiKeyHeader:"Authorization",name:"CloudFerro Sherlock",models:["MiniMaxAI/MiniMax-M2.5","meta-llama/Llama-3.3-70B-Instruct","openai/gpt-oss-120b","speakleash/Bielik-11B-v2.6-Instruct","speakleash/Bielik-11B-v3.0-Instruct"],docUrl:"https://docs.sherlock.cloudferro.com/",gateway:"models.dev"},"kuae-cloud-coding-plan":{url:"https://coding-plan-endpoint.kuaecloud.net/v1",apiKeyEnvVar:"KUAE_API_KEY",apiKeyHeader:"Authorization",name:"KUAE Cloud Coding Plan",models:["GLM-4.7"],docUrl:"https://docs.mthreads.com/kuaecloud/kuaecloud-doc-online/coding_plan/",gateway:"models.dev"},xai:{apiKeyEnvVar:"XAI_API_KEY",name:"xAI",models:["grok-2","grok-2-1212","grok-2-latest","grok-2-vision","grok-2-vision-1212","grok-2-vision-latest","grok-3","grok-3-fast","grok-3-fast-latest","grok-3-latest","grok-3-mini","grok-3-mini-fast","grok-3-mini-fast-latest","grok-3-mini-latest","grok-4","grok-4-1-fast","grok-4-1-fast-non-reasoning","grok-4-fast","grok-4-fast-non-reasoning","grok-4.20-0309-non-reasoning","grok-4.20-0309-reasoning","grok-4.20-multi-agent-0309","grok-4.3","grok-beta","grok-code-fast-1","grok-vision-beta"],docUrl:"https://docs.x.ai/docs/models",gateway:"models.dev",npm:"@ai-sdk/xai"},meganova:{url:"https://api.meganova.ai/v1",apiKeyEnvVar:"MEGANOVA_API_KEY",apiKeyHeader:"Authorization",name:"Meganova",models:["MiniMaxAI/MiniMax-M2.1","MiniMaxAI/MiniMax-M2.5","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3.5-Plus","XiaomiMiMo/MiMo-V2-Flash","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3-0324","deepseek-ai/DeepSeek-V3.1","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V3.2-Exp","meta-llama/Llama-3.3-70B-Instruct","mistralai/Mistral-Nemo-Instruct-2407","mistralai/Mistral-Small-3.2-24B-Instruct-2506","moonshotai/Kimi-K2-Thinking","moonshotai/Kimi-K2.5","zai-org/GLM-4.6","zai-org/GLM-4.7","zai-org/GLM-5"],docUrl:"https://docs.meganova.ai",gateway:"models.dev"},evroc:{url:"https://models.think.evroc.com/v1",apiKeyEnvVar:"EVROC_API_KEY",apiKeyHeader:"Authorization",name:"evroc",models:["KBLab/kb-whisper-large","Qwen/Qwen3-30B-A3B-Instruct-2507-FP8","Qwen/Qwen3-Embedding-8B","Qwen/Qwen3-VL-30B-A3B-Instruct","intfloat/multilingual-e5-large-instruct","microsoft/Phi-4-multimodal-instruct","mistralai/Magistral-Small-2509","mistralai/Voxtral-Small-24B-2507","mistralai/devstral-small-2-24b-instruct-2512","moonshotai/Kimi-K2.5","nvidia/Llama-3.3-70B-Instruct-FP8","openai/gpt-oss-120b","openai/whisper-large-v3"],docUrl:"https://docs.evroc.com/products/think/overview.html",gateway:"models.dev"},nearai:{url:"https://cloud-api.near.ai/v1",apiKeyEnvVar:"NEARAI_API_KEY",apiKeyHeader:"Authorization",name:"NEAR AI Cloud",models:["Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-Embedding-0.6B","Qwen/Qwen3-Reranker-0.6B","Qwen/Qwen3-VL-30B-A3B-Instruct","Qwen/Qwen3.5-122B-A10B","anthropic/claude-haiku-4-5","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","black-forest-labs/FLUX.2-klein-4B","google/gemini-2.5-flash","google/gemini-2.5-flash-lite","google/gemini-2.5-pro","google/gemini-3.1-flash-lite","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-5","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5.1","openai/gpt-5.2","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.5","openai/gpt-oss-120b","openai/o3","openai/o3-mini","openai/o4-mini","openai/whisper-large-v3","zai-org/GLM-5.1-FP8"],docUrl:"https://docs.near.ai/",gateway:"models.dev"},synthetic:{url:"https://api.synthetic.new/openai/v1",apiKeyEnvVar:"SYNTHETIC_API_KEY",apiKeyHeader:"Authorization",name:"Synthetic",models:["hf:MiniMaxAI/MiniMax-M2","hf:MiniMaxAI/MiniMax-M2.1","hf:MiniMaxAI/MiniMax-M2.5","hf:Qwen/Qwen2.5-Coder-32B-Instruct","hf:Qwen/Qwen3-235B-A22B-Instruct-2507","hf:Qwen/Qwen3-235B-A22B-Thinking-2507","hf:Qwen/Qwen3-Coder-480B-A35B-Instruct","hf:Qwen/Qwen3.5-397B-A17B","hf:deepseek-ai/DeepSeek-R1","hf:deepseek-ai/DeepSeek-R1-0528","hf:deepseek-ai/DeepSeek-V3","hf:deepseek-ai/DeepSeek-V3-0324","hf:deepseek-ai/DeepSeek-V3.1","hf:deepseek-ai/DeepSeek-V3.1-Terminus","hf:deepseek-ai/DeepSeek-V3.2","hf:meta-llama/Llama-3.1-405B-Instruct","hf:meta-llama/Llama-3.1-70B-Instruct","hf:meta-llama/Llama-3.1-8B-Instruct","hf:meta-llama/Llama-3.3-70B-Instruct","hf:meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8","hf:meta-llama/Llama-4-Scout-17B-16E-Instruct","hf:moonshotai/Kimi-K2-Instruct-0905","hf:moonshotai/Kimi-K2-Thinking","hf:moonshotai/Kimi-K2.5","hf:moonshotai/Kimi-K2.6","hf:nvidia/Kimi-K2.5-NVFP4","hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4","hf:openai/gpt-oss-120b","hf:zai-org/GLM-4.6","hf:zai-org/GLM-4.7","hf:zai-org/GLM-4.7-Flash","hf:zai-org/GLM-5","hf:zai-org/GLM-5.1"],docUrl:"https://synthetic.new/pricing",gateway:"models.dev"},nvidia:{url:"https://integrate.api.nvidia.com/v1",apiKeyEnvVar:"NVIDIA_API_KEY",apiKeyHeader:"Authorization",name:"Nvidia",models:["abacusai/dracarys-llama-3_1-70b-instruct","baai/bge-m3","black-forest-labs/flux.1-dev","black-forest-labs/flux_1-kontext-dev","black-forest-labs/flux_1-schnell","black-forest-labs/flux_2-klein-4b","bytedance/seed-oss-36b-instruct","deepseek-ai/deepseek-v3.1-terminus","deepseek-ai/deepseek-v3.2","deepseek-ai/deepseek-v4-flash","deepseek-ai/deepseek-v4-pro","google/gemma-2-2b-it","google/gemma-3-27b-it","google/gemma-3n-e2b-it","google/gemma-3n-e4b-it","google/gemma-4-31b-it","google/google-paligemma","meta/esm2-650m","meta/esmfold","meta/llama-3.1-70b-instruct","meta/llama-3.1-8b-instruct","meta/llama-3.2-11b-vision-instruct","meta/llama-3.2-1b-instruct","meta/llama-3.2-3b-instruct","meta/llama-3.2-90b-vision-instruct","meta/llama-3.3-70b-instruct","meta/llama-4-maverick-17b-128e-instruct","meta/llama-guard-4-12b","microsoft/phi-4-mini-instruct","microsoft/phi-4-multimodal-instruct","minimaxai/minimax-m2.5","minimaxai/minimax-m2.7","mistralai/devstral-2-123b-instruct-2512","mistralai/magistral-small-2506","mistralai/mistral-7b-instruct-v03","mistralai/mistral-large-3-675b-instruct-2512","mistralai/mistral-medium-3-instruct","mistralai/mistral-nemotron","mistralai/mistral-small-4-119b-2603","mistralai/mixtral-8x22b-instruct","mistralai/mixtral-8x7b-instruct","moonshotai/kimi-k2-instruct","moonshotai/kimi-k2-instruct-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.6","nvidia/active-speaker-detection","nvidia/bevformer","nvidia/cosmos-predict1-5b","nvidia/cosmos-transfer1-7b","nvidia/cosmos-transfer2_5-2b","nvidia/gliner-pii","nvidia/llama-3_1-nemotron-safety-guard-8b-v3","nvidia/llama-3_2-nemoretriever-300m-embed-v1","nvidia/llama-3_3-nemotron-super-49b-v1","nvidia/llama-3_3-nemotron-super-49b-v1_5","nvidia/llama-nemotron-embed-vl-1b-v2","nvidia/llama-nemotron-rerank-vl-1b-v2","nvidia/magpie-tts-zeroshot","nvidia/nemotron-3-content-safety","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-content-safety-reasoning-4b","nvidia/nemotron-mini-4b-instruct","nvidia/nemotron-voicechat","nvidia/nv-embed-v1","nvidia/nv-embedcode-7b-v1","nvidia/nvidia-nemotron-nano-9b-v2","nvidia/rerank-qa-mistral-4b","nvidia/riva-translate-4b-instruct-v1_1","nvidia/sparsedrive","nvidia/streampetr","nvidia/studiovoice","nvidia/synthetic-video-detector","nvidia/usdcode","nvidia/usdvalidate","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/whisper-large-v3","qwen/qwen-image","qwen/qwen-image-edit","qwen/qwen2.5-coder-32b-instruct","qwen/qwen3-coder-480b-a35b-instruct","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-thinking","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-397b-a17b","sarvamai/sarvam-m","stepfun-ai/step-3.5-flash","upstage/solar-10_7b-instruct","z-ai/glm-5.1","z-ai/glm4.7"],docUrl:"https://docs.api.nvidia.com/nim/",gateway:"models.dev"},inference:{url:"https://inference.net/v1",apiKeyEnvVar:"INFERENCE_API_KEY",apiKeyHeader:"Authorization",name:"Inference",models:["google/gemma-3","meta/llama-3.1-8b-instruct","meta/llama-3.2-11b-vision-instruct","meta/llama-3.2-1b-instruct","meta/llama-3.2-3b-instruct","mistral/mistral-nemo-12b-instruct","osmosis/osmosis-structure-0.6b","qwen/qwen-2.5-7b-vision-instruct","qwen/qwen3-embedding-4b"],docUrl:"https://inference.net/models",gateway:"models.dev"},inception:{url:"https://api.inceptionlabs.ai/v1/",apiKeyEnvVar:"INCEPTION_API_KEY",apiKeyHeader:"Authorization",name:"Inception",models:["mercury-2","mercury-edit-2"],docUrl:"https://platform.inceptionlabs.ai/docs",gateway:"models.dev"},openai:{apiKeyEnvVar:"OPENAI_API_KEY",name:"OpenAI",models:["chatgpt-image-latest","gpt-3.5-turbo","gpt-4","gpt-4-turbo","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-4o-2024-05-13","gpt-4o-2024-08-06","gpt-4o-2024-11-20","gpt-4o-mini","gpt-5","gpt-5-chat-latest","gpt-5-codex","gpt-5-mini","gpt-5-nano","gpt-5-pro","gpt-5.1","gpt-5.1-chat-latest","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.1-codex-mini","gpt-5.2","gpt-5.2-chat-latest","gpt-5.2-codex","gpt-5.2-pro","gpt-5.3-chat-latest","gpt-5.3-codex","gpt-5.3-codex-spark","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.4-pro","gpt-5.5","gpt-5.5-pro","gpt-image-1","gpt-image-1-mini","gpt-image-1.5","o1","o1-mini","o1-preview","o1-pro","o3","o3-deep-research","o3-mini","o3-pro","o4-mini","o4-mini-deep-research","text-embedding-3-large","text-embedding-3-small","text-embedding-ada-002"],docUrl:"https://platform.openai.com/docs/models",gateway:"models.dev",npm:"@ai-sdk/openai"},requesty:{url:"https://router.requesty.ai/v1",apiKeyEnvVar:"REQUESTY_API_KEY",apiKeyHeader:"Authorization",name:"Requesty",models:["anthropic/claude-3-7-sonnet","anthropic/claude-haiku-4-5","anthropic/claude-opus-4","anthropic/claude-opus-4-1","anthropic/claude-opus-4-5","anthropic/claude-opus-4-6","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","google/gemini-2.5-flash","google/gemini-2.5-pro","google/gemini-3-flash-preview","google/gemini-3-pro-preview","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4o-mini","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-image","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-chat","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-pro","openai/o4-mini","xai/grok-4","xai/grok-4-fast"],docUrl:"https://requesty.ai/solution/llm-routing/models",gateway:"models.dev"},digitalocean:{url:"https://inference.do-ai.run/v1",apiKeyEnvVar:"DIGITALOCEAN_ACCESS_TOKEN",apiKeyHeader:"Authorization",name:"DigitalOcean",models:["alibaba-qwen3-32b","all-mini-lm-l6-v2","anthropic-claude-4.1-opus","anthropic-claude-4.5-haiku","anthropic-claude-4.5-sonnet","anthropic-claude-4.6-sonnet","anthropic-claude-haiku-4.5","anthropic-claude-opus-4","anthropic-claude-opus-4.5","anthropic-claude-opus-4.6","anthropic-claude-opus-4.7","anthropic-claude-sonnet-4","arcee-trinity-large-thinking","bge-m3","bge-reranker-v2-m3","deepseek-3.2","deepseek-r1-distill-llama-70b","deepseek-v3","deepseek-v4-pro","e5-large-v2","fal-ai/elevenlabs/tts/multilingual-v2","fal-ai/fast-sdxl","fal-ai/flux/schnell","fal-ai/stable-audio-25/text-to-audio","gemma-4-31B-it","glm-5","gte-large-en-v1.5","kimi-k2.5","kimi-k2.6","llama-4-maverick","llama3-8b-instruct","llama3.3-70b-instruct","minimax-m2.5","ministral-3-8b-instruct-2512","mistral-3-14B","mistral-7b-instruct-v0.3","multi-qa-mpnet-base-dot-v1","nemotron-3-nano-30b","nemotron-3-nano-omni","nemotron-nano-12b-v2-vl","nvidia-nemotron-3-super-120b","openai-gpt-4.1","openai-gpt-4o","openai-gpt-4o-mini","openai-gpt-5","openai-gpt-5-mini","openai-gpt-5-nano","openai-gpt-5.1-codex-max","openai-gpt-5.2","openai-gpt-5.2-pro","openai-gpt-5.3-codex","openai-gpt-5.4","openai-gpt-5.4-mini","openai-gpt-5.4-nano","openai-gpt-5.4-pro","openai-gpt-5.5","openai-gpt-image-1","openai-gpt-image-1.5","openai-gpt-image-2","openai-gpt-oss-120b","openai-gpt-oss-20b","openai-o1","openai-o3","openai-o3-mini","qwen-2.5-14b-instruct","qwen3-coder-flash","qwen3-embedding-0.6b","qwen3-tts-voicedesign","qwen3.5-397b-a17b","stable-diffusion-3.5-large","wan2-2-t2v-a14b"],docUrl:"https://docs.digitalocean.com/products/gradient-ai-platform/details/models/",gateway:"models.dev"},vultr:{url:"https://api.vultrinference.com/v1",apiKeyEnvVar:"VULTR_API_KEY",apiKeyHeader:"Authorization",name:"Vultr",models:["DeepSeek-V3.2","GLM-5-FP8","Kimi-K2.5","MiniMax-M2.5","gpt-oss-120b"],docUrl:"https://api.vultrinference.com/",gateway:"models.dev"},"alibaba-coding-plan-cn":{url:"https://coding.dashscope.aliyuncs.com/v1",apiKeyEnvVar:"ALIBABA_CODING_PLAN_API_KEY",apiKeyHeader:"Authorization",name:"Alibaba Coding Plan (China)",models:["MiniMax-M2.5","glm-4.7","glm-5","kimi-k2.5","qwen3-coder-next","qwen3-coder-plus","qwen3-max-2026-01-23","qwen3.5-plus","qwen3.6-plus"],docUrl:"https://help.aliyun.com/zh/model-studio/coding-plan",gateway:"models.dev"},mistral:{url:"https://api.mistral.ai/v1",apiKeyEnvVar:"MISTRAL_API_KEY",name:"Mistral",models:["codestral-latest","devstral-2512","devstral-medium-2507","devstral-medium-latest","devstral-small-2505","devstral-small-2507","labs-devstral-small-2512","magistral-medium-latest","magistral-small","ministral-3b-latest","ministral-8b-latest","mistral-embed","mistral-large-2411","mistral-large-2512","mistral-large-latest","mistral-medium-2505","mistral-medium-2508","mistral-medium-2604","mistral-medium-latest","mistral-nemo","mistral-small-2506","mistral-small-2603","mistral-small-latest","open-mistral-7b","open-mixtral-8x22b","open-mixtral-8x7b","pixtral-12b","pixtral-large-latest"],docUrl:"https://docs.mistral.ai/getting-started/models/",gateway:"models.dev",npm:"@ai-sdk/mistral"},ovhcloud:{url:"https://oai.endpoints.kepler.ai.cloud.ovh.net/v1",apiKeyEnvVar:"OVHCLOUD_API_KEY",apiKeyHeader:"Authorization",name:"OVHcloud AI Endpoints",models:["gpt-oss-120b","gpt-oss-20b","llama-3.1-8b-instruct","meta-llama-3_3-70b-instruct","mistral-7b-instruct-v0.3","mistral-nemo-instruct-2407","mistral-small-3.2-24b-instruct-2506","qwen2.5-vl-72b-instruct","qwen3-32b","qwen3-coder-30b-a3b-instruct","qwen3.5-9b"],docUrl:"https://www.ovhcloud.com/en/public-cloud/ai-endpoints/catalog//",gateway:"models.dev"},friendli:{url:"https://api.friendli.ai/serverless/v1",apiKeyEnvVar:"FRIENDLI_TOKEN",apiKeyHeader:"Authorization",name:"Friendli",models:["MiniMaxAI/MiniMax-M2.5","Qwen/Qwen3-235B-A22B-Instruct-2507","meta-llama/Llama-3.1-8B-Instruct","meta-llama/Llama-3.3-70B-Instruct","zai-org/GLM-5","zai-org/GLM-5.1"],docUrl:"https://friendli.ai/docs/guides/serverless_endpoints/introduction",gateway:"models.dev"},cortecs:{url:"https://api.cortecs.ai/v1",apiKeyEnvVar:"CORTECS_API_KEY",apiKeyHeader:"Authorization",name:"Cortecs",models:["claude-4-5-sonnet","claude-4-6-sonnet","claude-haiku-4-5","claude-opus4-5","claude-opus4-6","claude-opus4-7","claude-sonnet-4","codestral-2508","deepseek-r1-0528","deepseek-v3-0324","deepseek-v3.2","deepseek-v4-flash","deepseek-v4-pro","devstral-2512","devstral-small-2512","gemini-2.5-pro","glm-4.5","glm-4.5-air","glm-4.7","glm-4.7-flash","glm-5","glm-5.1","gpt-4.1","gpt-oss-120b","hermes-4-70b","intellect-3","kimi-k2-instruct","kimi-k2-thinking","kimi-k2.5","kimi-k2.6","llama-3.1-405b-instruct","llama-3.3-70b-instruct","minimax-m2","minimax-m2.1","minimax-m2.5","minimax-m2.7","mistral-large-2512","mixtral-8x7B-instruct-v0.1","nemotron-3-super-120b-a12b","nova-pro-v1","qwen-2.5-72b-instruct","qwen3-235b-a22b-instruct-2507","qwen3-32b","qwen3-coder-30b-a3b-instruct","qwen3-coder-480b-a35b-instruct","qwen3-coder-next","qwen3-next-80b-a3b-thinking","qwen3.5-122b-a10b","qwen3.5-397b-a17b"],docUrl:"https://api.cortecs.ai/v1/models",gateway:"models.dev"},siliconflow:{url:"https://api.siliconflow.com/v1",apiKeyEnvVar:"SILICONFLOW_API_KEY",apiKeyHeader:"Authorization",name:"SiliconFlow",models:["ByteDance-Seed/Seed-OSS-36B-Instruct","MiniMaxAI/MiniMax-M2.1","MiniMaxAI/MiniMax-M2.5","Qwen/QwQ-32B","Qwen/Qwen2.5-14B-Instruct","Qwen/Qwen2.5-32B-Instruct","Qwen/Qwen2.5-72B-Instruct","Qwen/Qwen2.5-72B-Instruct-128K","Qwen/Qwen2.5-7B-Instruct","Qwen/Qwen2.5-Coder-32B-Instruct","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen2.5-VL-72B-Instruct","Qwen/Qwen2.5-VL-7B-Instruct","Qwen/Qwen3-14B","Qwen/Qwen3-235B-A22B","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-30B-A3B-Thinking-2507","Qwen/Qwen3-32B","Qwen/Qwen3-8B","Qwen/Qwen3-Coder-30B-A3B-Instruct","Qwen/Qwen3-Coder-480B-A35B-Instruct","Qwen/Qwen3-Next-80B-A3B-Instruct","Qwen/Qwen3-Next-80B-A3B-Thinking","Qwen/Qwen3-Omni-30B-A3B-Captioner","Qwen/Qwen3-Omni-30B-A3B-Instruct","Qwen/Qwen3-Omni-30B-A3B-Thinking","Qwen/Qwen3-VL-235B-A22B-Instruct","Qwen/Qwen3-VL-235B-A22B-Thinking","Qwen/Qwen3-VL-30B-A3B-Instruct","Qwen/Qwen3-VL-30B-A3B-Thinking","Qwen/Qwen3-VL-32B-Instruct","Qwen/Qwen3-VL-32B-Thinking","Qwen/Qwen3-VL-8B-Instruct","Qwen/Qwen3-VL-8B-Thinking","THUDM/GLM-4-32B-0414","THUDM/GLM-4-9B-0414","THUDM/GLM-Z1-32B-0414","THUDM/GLM-Z1-9B-0414","baidu/ERNIE-4.5-300B-A47B","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-R1-Distill-Qwen-14B","deepseek-ai/DeepSeek-R1-Distill-Qwen-32B","deepseek-ai/DeepSeek-V3","deepseek-ai/DeepSeek-V3.1","deepseek-ai/DeepSeek-V3.1-Terminus","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V3.2-Exp","deepseek-ai/deepseek-v4-flash","deepseek-ai/deepseek-v4-pro","deepseek-ai/deepseek-vl2","inclusionAI/Ling-flash-2.0","inclusionAI/Ling-mini-2.0","inclusionAI/Ring-flash-2.0","meta-llama/Meta-Llama-3.1-8B-Instruct","moonshotai/Kimi-K2-Instruct","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","nex-agi/DeepSeek-V3.1-Nex-N1","openai/gpt-oss-120b","openai/gpt-oss-20b","stepfun-ai/Step-3.5-Flash","tencent/Hunyuan-A13B-Instruct","tencent/Hunyuan-MT-7B","zai-org/GLM-4.5","zai-org/GLM-4.5-Air","zai-org/GLM-4.5V","zai-org/GLM-4.6","zai-org/GLM-4.6V","zai-org/GLM-4.7","zai-org/GLM-5","zai-org/GLM-5.1","zai-org/GLM-5V-Turbo"],docUrl:"https://cloud.siliconflow.com/models",gateway:"models.dev"},vercel:{apiKeyEnvVar:"AI_GATEWAY_API_KEY",name:"Vercel AI Gateway",models:["alibaba/qwen-3-14b","alibaba/qwen-3-235b","alibaba/qwen-3-30b","alibaba/qwen-3-32b","alibaba/qwen-3.6-max-preview","alibaba/qwen3-235b-a22b-thinking","alibaba/qwen3-coder","alibaba/qwen3-coder-30b-a3b","alibaba/qwen3-coder-next","alibaba/qwen3-coder-plus","alibaba/qwen3-embedding-0.6b","alibaba/qwen3-embedding-4b","alibaba/qwen3-embedding-8b","alibaba/qwen3-max","alibaba/qwen3-max-preview","alibaba/qwen3-max-thinking","alibaba/qwen3-next-80b-a3b-instruct","alibaba/qwen3-next-80b-a3b-thinking","alibaba/qwen3-vl-235b-a22b-instruct","alibaba/qwen3-vl-instruct","alibaba/qwen3-vl-thinking","alibaba/qwen3.5-flash","alibaba/qwen3.5-plus","alibaba/qwen3.6-27b","alibaba/qwen3.6-plus","amazon/nova-2-lite","amazon/nova-lite","amazon/nova-micro","amazon/nova-pro","amazon/titan-embed-text-v2","anthropic/claude-3-haiku","anthropic/claude-3-opus","anthropic/claude-3.5-haiku","anthropic/claude-3.5-sonnet","anthropic/claude-3.5-sonnet-20240620","anthropic/claude-3.7-sonnet","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","arcee-ai/trinity-large-preview","arcee-ai/trinity-large-thinking","arcee-ai/trinity-mini","bfl/flux-kontext-max","bfl/flux-kontext-pro","bfl/flux-pro-1.0-fill","bfl/flux-pro-1.1","bfl/flux-pro-1.1-ultra","bytedance/seed-1.6","bytedance/seed-1.8","cohere/command-a","cohere/embed-v4.0","deepseek/deepseek-r1","deepseek/deepseek-v3","deepseek/deepseek-v3.1","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v3.2-thinking","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","google/gemini-2.0-flash","google/gemini-2.0-flash-lite","google/gemini-2.5-flash","google/gemini-2.5-flash-image","google/gemini-2.5-flash-image-preview","google/gemini-2.5-flash-lite","google/gemini-2.5-flash-lite-preview-09-2025","google/gemini-2.5-flash-preview-09-2025","google/gemini-2.5-pro","google/gemini-3-flash","google/gemini-3-pro-image","google/gemini-3-pro-preview","google/gemini-3.1-flash-image-preview","google/gemini-3.1-flash-lite","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","google/gemini-embedding-001","google/gemini-embedding-2","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","google/imagen-4.0-fast-generate-001","google/imagen-4.0-generate-001","google/imagen-4.0-ultra-generate-001","google/text-embedding-005","google/text-multilingual-embedding-002","inception/mercury-2","inception/mercury-coder-small","inception/mercury-edit-2","interfaze/interfaze-beta","kwaipilot/kat-coder-pro-v1","kwaipilot/kat-coder-pro-v2","meituan/longcat-flash-chat","meituan/longcat-flash-thinking","meituan/longcat-flash-thinking-2601","meta/llama-3.1-70b","meta/llama-3.1-8b","meta/llama-3.2-11b","meta/llama-3.2-1b","meta/llama-3.2-3b","meta/llama-3.2-90b","meta/llama-3.3-70b","meta/llama-4-maverick","meta/llama-4-scout","minimax/minimax-m2","minimax/minimax-m2.1","minimax/minimax-m2.1-lightning","minimax/minimax-m2.5","minimax/minimax-m2.5-highspeed","minimax/minimax-m2.7","minimax/minimax-m2.7-highspeed","mistral/codestral","mistral/codestral-embed","mistral/devstral-2","mistral/devstral-small","mistral/devstral-small-2","mistral/magistral-medium","mistral/magistral-small","mistral/ministral-14b","mistral/ministral-3b","mistral/ministral-8b","mistral/mistral-embed","mistral/mistral-large-3","mistral/mistral-medium","mistral/mistral-nemo","mistral/mistral-small","mistral/mixtral-8x22b-instruct","mistral/pixtral-12b","mistral/pixtral-large","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2-thinking-turbo","moonshotai/kimi-k2-turbo","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","morph/morph-v3-fast","morph/morph-v3-large","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-nano-12b-v2-vl","nvidia/nemotron-nano-9b-v2","openai/codex-mini","openai/gpt-3.5-turbo","openai/gpt-3.5-turbo-instruct","openai/gpt-4-turbo","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-mini","openai/gpt-4o-mini-search-preview","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.1-instant","openai/gpt-5.1-thinking","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/gpt-oss-safeguard-20b","openai/o1","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-pro","openai/o4-mini","openai/text-embedding-3-large","openai/text-embedding-3-small","openai/text-embedding-ada-002","perplexity/sonar","perplexity/sonar-pro","perplexity/sonar-reasoning","perplexity/sonar-reasoning-pro","prime-intellect/intellect-3","recraft/recraft-v2","recraft/recraft-v3","vercel/v0-1.0-md","vercel/v0-1.5-md","voyage/voyage-3-large","voyage/voyage-3.5","voyage/voyage-3.5-lite","voyage/voyage-4","voyage/voyage-4-large","voyage/voyage-4-lite","voyage/voyage-code-2","voyage/voyage-code-3","voyage/voyage-finance-2","voyage/voyage-law-2","xai/grok-2-vision","xai/grok-3","xai/grok-3-fast","xai/grok-3-mini","xai/grok-3-mini-fast","xai/grok-4","xai/grok-4-fast-non-reasoning","xai/grok-4-fast-reasoning","xai/grok-4.1-fast-non-reasoning","xai/grok-4.1-fast-reasoning","xai/grok-4.20-multi-agent","xai/grok-4.20-multi-agent-beta","xai/grok-4.20-non-reasoning","xai/grok-4.20-non-reasoning-beta","xai/grok-4.20-reasoning","xai/grok-4.20-reasoning-beta","xai/grok-4.3","xai/grok-code-fast-1","xai/grok-imagine-image","xai/grok-imagine-image-pro","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-pro","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","zai/glm-4.5","zai/glm-4.5-air","zai/glm-4.5v","zai/glm-4.6","zai/glm-4.6v","zai/glm-4.6v-flash","zai/glm-4.7","zai/glm-4.7-flash","zai/glm-4.7-flashx","zai/glm-5","zai/glm-5-turbo","zai/glm-5.1","zai/glm-5v-turbo"],docUrl:"https://github.com/vercel/ai/tree/5eb85cc45a259553501f535b8ac79a77d0e79223/packages/gateway",gateway:"models.dev"},minimax:{url:"https://api.minimax.io/anthropic/v1",apiKeyEnvVar:"MINIMAX_API_KEY",apiKeyHeader:"Authorization",name:"MiniMax (minimax.io)",models:["MiniMax-M2","MiniMax-M2.1","MiniMax-M2.5","MiniMax-M2.5-highspeed","MiniMax-M2.7","MiniMax-M2.7-highspeed"],docUrl:"https://platform.minimax.io/docs/guides/quickstart",gateway:"models.dev",npm:"@ai-sdk/anthropic"},llmgateway:{url:"https://api.llmgateway.io/v1",apiKeyEnvVar:"LLMGATEWAY_API_KEY",apiKeyHeader:"Authorization",name:"LLM Gateway",models:["auto","claude-3-5-sonnet-20241022","claude-3-7-sonnet","claude-3-7-sonnet-20250219","claude-3-opus","claude-haiku-4-5","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-7","claude-sonnet-4-20250514","claude-sonnet-4-5","claude-sonnet-4-5-20250929","claude-sonnet-4-6","codestral-2508","custom","deepseek-r1-0528","deepseek-v3.1","deepseek-v3.2","deepseek-v4-flash","deepseek-v4-pro","devstral-2512","devstral-small-2507","gemini-2.0-flash","gemini-2.0-flash-lite","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-pro","gemini-3-flash-preview","gemini-3.1-flash-lite","gemini-3.1-flash-lite-preview","gemini-3.1-pro-preview","gemini-pro-latest","gemma-2-27b-it-together","gemma-3-12b-it","gemma-3-1b-it","gemma-3-27b","gemma-3-4b-it","gemma-3n-e2b-it","gemma-3n-e4b-it","glm-4-32b-0414-128k","glm-4.5","glm-4.5-air","glm-4.5-airx","glm-4.5-flash","glm-4.5-x","glm-4.5v","glm-4.6","glm-4.6v","glm-4.6v-flash","glm-4.6v-flashx","glm-4.7","glm-4.7-flash","glm-4.7-flashx","glm-5","glm-5.1","gpt-3.5-turbo","gpt-4","gpt-4-turbo","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-4o-mini","gpt-4o-mini-search-preview","gpt-4o-search-preview","gpt-5","gpt-5-chat-latest","gpt-5-mini","gpt-5-nano","gpt-5-pro","gpt-5.1","gpt-5.1-codex","gpt-5.1-codex-mini","gpt-5.2","gpt-5.2-chat-latest","gpt-5.2-codex","gpt-5.2-pro","gpt-5.3-chat-latest","gpt-5.3-codex","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.4-pro","gpt-5.5","gpt-5.5-pro","gpt-oss-120b","gpt-oss-20b","grok-3","grok-4","grok-4-0709","grok-4-1-fast","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-20-beta-0309-non-reasoning","grok-4-20-beta-0309-reasoning","grok-4-3","grok-4-fast","grok-4-fast-non-reasoning","grok-4-fast-reasoning","grok-code-fast-1","hermes-2-pro-llama-3-8b","kimi-k2","kimi-k2-thinking","kimi-k2-thinking-turbo","kimi-k2.5","kimi-k2.6","llama-3-70b-instruct","llama-3-8b-instruct","llama-3.1-70b-instruct","llama-3.1-8b-instruct","llama-3.1-nemotron-ultra-253b","llama-3.2-11b-instruct","llama-3.2-3b-instruct","llama-3.3-70b-instruct","llama-4-maverick-17b-instruct","llama-4-scout","llama-4-scout-17b-instruct","mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2.5","mimo-v2.5-pro","minimax-m2","minimax-m2.1","minimax-m2.1-lightning","minimax-m2.5","minimax-m2.5-highspeed","minimax-m2.7","minimax-m2.7-highspeed","minimax-text-01","ministral-14b-2512","ministral-3b-2512","ministral-8b-2512","mistral-large-2512","mistral-large-latest","mistral-small-2506","o1","o3","o3-mini","o4-mini","pixtral-large-latest","qwen-coder-plus","qwen-flash","qwen-max","qwen-max-latest","qwen-omni-turbo","qwen-plus","qwen-plus-latest","qwen-turbo","qwen-vl-max","qwen-vl-plus","qwen2-5-vl-32b-instruct","qwen2-5-vl-72b-instruct","qwen25-coder-7b","qwen3-235b-a22b-fp8","qwen3-235b-a22b-instruct-2507","qwen3-235b-a22b-thinking-2507","qwen3-30b-a3b-fp8","qwen3-30b-a3b-instruct-2507","qwen3-30b-a3b-thinking-2507","qwen3-32b","qwen3-32b-fp8","qwen3-4b-fp8","qwen3-coder-30b-a3b-instruct","qwen3-coder-480b-a35b-instruct","qwen3-coder-flash","qwen3-coder-next","qwen3-coder-plus","qwen3-max","qwen3-max-2026-01-23","qwen3-next-80b-a3b-instruct","qwen3-next-80b-a3b-thinking","qwen3-vl-235b-a22b-instruct","qwen3-vl-235b-a22b-thinking","qwen3-vl-30b-a3b-instruct","qwen3-vl-30b-a3b-thinking","qwen3-vl-8b-instruct","qwen3-vl-flash","qwen3-vl-plus","qwen3.6-35b-a3b","qwen3.6-max-preview","qwen3.6-plus","qwen35-397b-a17b","qwq-plus","seed-1-6-250615","seed-1-6-250915","seed-1-6-flash-250715","seed-1-8-251228","sonar","sonar-pro","sonar-reasoning-pro"],docUrl:"https://llmgateway.io/docs",gateway:"models.dev"},"cloudflare-workers-ai":{url:"https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/ai/v1",apiKeyEnvVar:"CLOUDFLARE_API_KEY",apiKeyHeader:"Authorization",name:"Cloudflare Workers AI",models:["@cf/google/gemma-4-26b-a4b-it","@cf/meta/llama-4-scout-17b-16e-instruct","@cf/moonshotai/kimi-k2.5","@cf/moonshotai/kimi-k2.6","@cf/nvidia/nemotron-3-120b-a12b","@cf/openai/gpt-oss-120b","@cf/openai/gpt-oss-20b","@cf/zai-org/glm-4.7-flash"],docUrl:"https://developers.cloudflare.com/workers-ai/models/",gateway:"models.dev"},groq:{url:"https://api.groq.com/openai/v1",apiKeyEnvVar:"GROQ_API_KEY",name:"Groq",models:["allam-2-7b","canopylabs/orpheus-arabic-saudi","canopylabs/orpheus-v1-english","groq/compound","groq/compound-mini","llama-3.1-8b-instant","llama-3.3-70b-versatile","meta-llama/llama-4-scout-17b-16e-instruct","meta-llama/llama-prompt-guard-2-22m","meta-llama/llama-prompt-guard-2-86m","moonshotai/kimi-k2-instruct-0905","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/gpt-oss-safeguard-20b","qwen/qwen3-32b","whisper-large-v3","whisper-large-v3-turbo"],docUrl:"https://console.groq.com/docs/models",gateway:"models.dev",npm:"@ai-sdk/groq"},fastrouter:{url:"https://go.fastrouter.ai/api/v1",apiKeyEnvVar:"FASTROUTER_API_KEY",apiKeyHeader:"Authorization",name:"FastRouter",models:["anthropic/claude-opus-4.1","anthropic/claude-sonnet-4","deepseek-ai/deepseek-r1-distill-llama-70b","google/gemini-2.5-flash","google/gemini-2.5-pro","moonshotai/kimi-k2","openai/gpt-4.1","openai/gpt-5","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-oss-120b","openai/gpt-oss-20b","qwen/qwen3-coder","x-ai/grok-4","z-ai/glm-5"],docUrl:"https://fastrouter.ai/models",gateway:"models.dev"},stackit:{url:"https://api.openai-compat.model-serving.eu01.onstackit.cloud/v1",apiKeyEnvVar:"STACKIT_API_KEY",apiKeyHeader:"Authorization",name:"STACKIT",models:["Qwen/Qwen3-VL-235B-A22B-Instruct-FP8","Qwen/Qwen3-VL-Embedding-8B","cortecs/Llama-3.3-70B-Instruct-FP8-Dynamic","google/gemma-3-27b-it","intfloat/e5-mistral-7b-instruct","neuralmagic/Meta-Llama-3.1-8B-Instruct-FP8","neuralmagic/Mistral-Nemo-Instruct-2407-FP8","openai/gpt-oss-120b"],docUrl:"https://docs.stackit.cloud/products/data-and-ai/ai-model-serving/basics/available-shared-models",gateway:"models.dev"},"tencent-coding-plan":{url:"https://api.lkeap.cloud.tencent.com/coding/v3",apiKeyEnvVar:"TENCENT_CODING_PLAN_API_KEY",apiKeyHeader:"Authorization",name:"Tencent Coding Plan (China)",models:["glm-5","hunyuan-2.0-instruct","hunyuan-2.0-thinking","hunyuan-t1","hunyuan-turbos","kimi-k2.5","minimax-m2.5","tc-code-latest"],docUrl:"https://cloud.tencent.com/document/product/1772/128947",gateway:"models.dev"},"privatemode-ai":{url:"http://localhost:8080/v1",apiKeyEnvVar:"PRIVATEMODE_API_KEY",apiKeyHeader:"Authorization",name:"Privatemode AI",models:["gemma-3-27b","gpt-oss-120b","qwen3-coder-30b-a3b","qwen3-embedding-4b","whisper-large-v3"],docUrl:"https://docs.privatemode.ai/api/overview",gateway:"models.dev"},google:{apiKeyEnvVar:"GOOGLE_GENERATIVE_AI_API_KEY",name:"Google",models:["gemini-1.5-flash","gemini-1.5-flash-8b","gemini-1.5-pro","gemini-2.0-flash","gemini-2.0-flash-lite","gemini-2.5-flash","gemini-2.5-flash-image","gemini-2.5-flash-image-preview","gemini-2.5-flash-lite","gemini-2.5-flash-lite-preview-06-17","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-flash-preview-04-17","gemini-2.5-flash-preview-05-20","gemini-2.5-flash-preview-09-2025","gemini-2.5-flash-preview-tts","gemini-2.5-pro","gemini-2.5-pro-preview-05-06","gemini-2.5-pro-preview-06-05","gemini-2.5-pro-preview-tts","gemini-3-flash-preview","gemini-3-pro-preview","gemini-3.1-flash-image-preview","gemini-3.1-flash-lite","gemini-3.1-flash-lite-preview","gemini-3.1-pro-preview","gemini-3.1-pro-preview-customtools","gemini-embedding-001","gemini-flash-latest","gemini-flash-lite-latest","gemini-live-2.5-flash","gemini-live-2.5-flash-preview-native-audio","gemma-3-12b-it","gemma-3-27b-it","gemma-3-4b-it","gemma-3n-e2b-it","gemma-3n-e4b-it","gemma-4-26b-a4b-it","gemma-4-31b-it"],docUrl:"https://ai.google.dev/gemini-api/docs/models",gateway:"models.dev",npm:"@ai-sdk/google"},drun:{url:"https://chat.d.run/v1",apiKeyEnvVar:"DRUN_API_KEY",apiKeyHeader:"Authorization",name:"D.Run (China)",models:["public/deepseek-r1","public/deepseek-v3","public/minimax-m25"],docUrl:"https://www.d.run",gateway:"models.dev"},moonshotai:{url:"https://api.moonshot.ai/anthropic/v1",apiKeyEnvVar:"MOONSHOT_API_KEY",apiKeyHeader:"Authorization",name:"Moonshot AI",models:["kimi-k2-0711-preview","kimi-k2-0905-preview","kimi-k2-thinking","kimi-k2-thinking-turbo","kimi-k2-turbo-preview","kimi-k2.5","kimi-k2.6"],docUrl:"https://platform.moonshot.ai/docs/api/chat",gateway:"models.dev",npm:"@ai-sdk/anthropic"},berget:{url:"https://api.berget.ai/v1",apiKeyEnvVar:"BERGET_API_KEY",apiKeyHeader:"Authorization",name:"Berget.AI",models:["google/gemma-4-31B-it","meta-llama/Llama-3.3-70B-Instruct","mistralai/Mistral-Medium-3.5-128B","mistralai/Mistral-Small-3.2-24B-Instruct-2506","openai/gpt-oss-120b","zai-org/GLM-4.7"],docUrl:"https://api.berget.ai",gateway:"models.dev"},"github-models":{url:"https://models.github.ai/inference",apiKeyEnvVar:"GITHUB_TOKEN",apiKeyHeader:"Authorization",name:"GitHub Models",models:["ai21-labs/ai21-jamba-1.5-large","ai21-labs/ai21-jamba-1.5-mini","cohere/cohere-command-a","cohere/cohere-command-r","cohere/cohere-command-r-08-2024","cohere/cohere-command-r-plus","cohere/cohere-command-r-plus-08-2024","core42/jais-30b-chat","deepseek/deepseek-r1","deepseek/deepseek-r1-0528","deepseek/deepseek-v3-0324","meta/llama-3.2-11b-vision-instruct","meta/llama-3.2-90b-vision-instruct","meta/llama-3.3-70b-instruct","meta/llama-4-maverick-17b-128e-instruct-fp8","meta/llama-4-scout-17b-16e-instruct","meta/meta-llama-3-70b-instruct","meta/meta-llama-3-8b-instruct","meta/meta-llama-3.1-405b-instruct","meta/meta-llama-3.1-70b-instruct","meta/meta-llama-3.1-8b-instruct","microsoft/mai-ds-r1","microsoft/phi-3-medium-128k-instruct","microsoft/phi-3-medium-4k-instruct","microsoft/phi-3-mini-128k-instruct","microsoft/phi-3-mini-4k-instruct","microsoft/phi-3-small-128k-instruct","microsoft/phi-3-small-8k-instruct","microsoft/phi-3.5-mini-instruct","microsoft/phi-3.5-moe-instruct","microsoft/phi-3.5-vision-instruct","microsoft/phi-4","microsoft/phi-4-mini-instruct","microsoft/phi-4-mini-reasoning","microsoft/phi-4-multimodal-instruct","microsoft/phi-4-reasoning","mistral-ai/codestral-2501","mistral-ai/ministral-3b","mistral-ai/mistral-large-2411","mistral-ai/mistral-medium-2505","mistral-ai/mistral-nemo","mistral-ai/mistral-small-2503","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-mini","openai/o1","openai/o1-mini","openai/o1-preview","openai/o3","openai/o3-mini","openai/o4-mini","xai/grok-3","xai/grok-3-mini"],docUrl:"https://docs.github.com/en/github-models",gateway:"models.dev"},neuralwatt:{url:"https://api.neuralwatt.com/v1",apiKeyEnvVar:"NEURALWATT_API_KEY",apiKeyHeader:"Authorization",name:"Neuralwatt",models:["MiniMaxAI/MiniMax-M2.5","Qwen/Qwen3.5-397B-A17B-FP8","Qwen/Qwen3.6-35B-A3B","glm-5-fast","glm-5.1-fast","kimi-k2.5-fast","kimi-k2.6-fast","mistralai/Devstral-Small-2-24B-Instruct-2512","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","openai/gpt-oss-20b","qwen3.5-397b-fast","qwen3.6-35b-fast","zai-org/GLM-5.1-FP8"],docUrl:"https://portal.neuralwatt.com/docs",gateway:"models.dev"},sarvam:{url:"https://api.sarvam.ai/v1",apiKeyEnvVar:"SARVAM_API_KEY",apiKeyHeader:"Authorization",name:"Sarvam AI",models:["sarvam-105b","sarvam-30b"],docUrl:"https://docs.sarvam.ai/api-reference-docs/getting-started/models",gateway:"models.dev"},togetherai:{apiKeyEnvVar:"TOGETHER_API_KEY",name:"Together AI",models:["MiniMaxAI/MiniMax-M2.5","MiniMaxAI/MiniMax-M2.7","Qwen/Qwen3-235B-A22B-Instruct-2507-tput","Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8","Qwen/Qwen3-Coder-Next-FP8","Qwen/Qwen3.5-397B-A17B","Qwen/Qwen3.6-Plus","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-V3","deepseek-ai/DeepSeek-V3-1","deepseek-ai/DeepSeek-V4-Pro","essentialai/Rnj-1-Instruct","google/gemma-4-31B-it","meta-llama/Llama-3.3-70B-Instruct-Turbo","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","openai/gpt-oss-120b","zai-org/GLM-5.1"],docUrl:"https://docs.together.ai/docs/serverless-models",gateway:"models.dev",npm:"@ai-sdk/togetherai"},"qihang-ai":{url:"https://api.qhaigc.net/v1",apiKeyEnvVar:"QIHANG_API_KEY",apiKeyHeader:"Authorization",name:"QiHang",models:["claude-haiku-4-5-20251001","claude-opus-4-5-20251101","claude-sonnet-4-5-20250929","gemini-2.5-flash","gemini-3-flash-preview","gemini-3-pro-preview","gpt-5-mini","gpt-5.2","gpt-5.2-codex"],docUrl:"https://www.qhaigc.net/docs",gateway:"models.dev"},"tencent-tokenhub":{url:"https://tokenhub.tencentmaas.com/v1",apiKeyEnvVar:"TENCENT_TOKENHUB_API_KEY",apiKeyHeader:"Authorization",name:"Tencent TokenHub",models:["hy3-preview"],docUrl:"https://cloud.tencent.com/document/product/1823/130050",gateway:"models.dev"},anthropic:{apiKeyEnvVar:"ANTHROPIC_API_KEY",name:"Anthropic",models:["claude-3-5-haiku-20241022","claude-3-5-haiku-latest","claude-3-5-sonnet-20240620","claude-3-5-sonnet-20241022","claude-3-7-sonnet-20250219","claude-3-haiku-20240307","claude-3-opus-20240229","claude-3-sonnet-20240229","claude-haiku-4-5","claude-haiku-4-5-20251001","claude-opus-4-0","claude-opus-4-1","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-7","claude-sonnet-4-0","claude-sonnet-4-20250514","claude-sonnet-4-5","claude-sonnet-4-5-20250929","claude-sonnet-4-6"],docUrl:"https://docs.anthropic.com/en/docs/about-claude/models",gateway:"models.dev",npm:"@ai-sdk/anthropic"},modelscope:{url:"https://api-inference.modelscope.cn/v1",apiKeyEnvVar:"MODELSCOPE_API_KEY",apiKeyHeader:"Authorization",name:"ModelScope",models:["Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-30B-A3B-Thinking-2507","Qwen/Qwen3-Coder-30B-A3B-Instruct","ZhipuAI/GLM-4.5","ZhipuAI/GLM-4.6"],docUrl:"https://modelscope.cn/docs/model-service/API-Inference/intro",gateway:"models.dev"},"hpc-ai":{url:"https://api.hpc-ai.com/inference/v1",apiKeyEnvVar:"HPC_AI_API_KEY",apiKeyHeader:"Authorization",name:"HPC-AI",models:["minimax/minimax-m2.5","moonshotai/kimi-k2.5","zai-org/glm-5.1"],docUrl:"https://www.hpc-ai.com/doc/docs/quickstart/",gateway:"models.dev"},xiaomi:{url:"https://api.xiaomimimo.com/v1",apiKeyEnvVar:"XIAOMI_API_KEY",apiKeyHeader:"Authorization",name:"Xiaomi",models:["mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2.5","mimo-v2.5-pro"],docUrl:"https://platform.xiaomimimo.com/#/docs",gateway:"models.dev"},clarifai:{url:"https://api.clarifai.com/v2/ext/openai/v1",apiKeyEnvVar:"CLARIFAI_PAT",apiKeyHeader:"Authorization",name:"Clarifai",models:["arcee_ai/AFM/models/trinity-mini","clarifai/main/models/mm-poly-8b","deepseek-ai/deepseek-ocr/models/DeepSeek-OCR","minimaxai/chat-completion/models/MiniMax-M2_5-high-throughput","mistralai/completion/models/Ministral-3-14B-Reasoning-2512","mistralai/completion/models/Ministral-3-3B-Reasoning-2512","moonshotai/chat-completion/models/Kimi-K2_6","openai/chat-completion/models/gpt-oss-120b-high-throughput","openai/chat-completion/models/gpt-oss-20b","qwen/qwenCoder/models/Qwen3-Coder-30B-A3B-Instruct","qwen/qwenLM/models/Qwen3-30B-A3B-Instruct-2507","qwen/qwenLM/models/Qwen3-30B-A3B-Thinking-2507"],docUrl:"https://docs.clarifai.com/compute/inference/",gateway:"models.dev"},"minimax-cn":{url:"https://api.minimaxi.com/anthropic/v1",apiKeyEnvVar:"MINIMAX_API_KEY",apiKeyHeader:"Authorization",name:"MiniMax (minimaxi.com)",models:["MiniMax-M2","MiniMax-M2.1","MiniMax-M2.5","MiniMax-M2.5-highspeed","MiniMax-M2.7","MiniMax-M2.7-highspeed"],docUrl:"https://platform.minimaxi.com/docs/guides/quickstart",gateway:"models.dev",npm:"@ai-sdk/anthropic"},"regolo-ai":{url:"https://api.regolo.ai/v1",apiKeyEnvVar:"REGOLO_API_KEY",apiKeyHeader:"Authorization",name:"Regolo AI",models:["gpt-oss-120b","gpt-oss-20b","llama-3.1-8b-instruct","llama-3.3-70b-instruct","minimax-m2.5","mistral-small-4-119b","mistral-small3.2","qwen-image","qwen3-coder-next","qwen3-embedding-8b","qwen3-reranker-4b","qwen3.5-122b","qwen3.5-9b"],docUrl:"https://docs.regolo.ai/",gateway:"models.dev"},"xiaomi-token-plan-ams":{url:"https://token-plan-ams.xiaomimimo.com/v1",apiKeyEnvVar:"XIAOMI_API_KEY",apiKeyHeader:"Authorization",name:"Xiaomi Token Plan (Europe)",models:["mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2-tts","mimo-v2.5","mimo-v2.5-pro"],docUrl:"https://platform.xiaomimimo.com/#/docs",gateway:"models.dev"},zhipuai:{url:"https://open.bigmodel.cn/api/paas/v4",apiKeyEnvVar:"ZHIPU_API_KEY",apiKeyHeader:"Authorization",name:"Zhipu AI",models:["glm-4.5","glm-4.5-air","glm-4.5-flash","glm-4.5v","glm-4.6","glm-4.6v","glm-4.7","glm-4.7-flash","glm-4.7-flashx","glm-5","glm-5.1","glm-5v-turbo"],docUrl:"https://docs.z.ai/guides/overview/pricing",gateway:"models.dev"},nova:{url:"https://api.nova.amazon.com/v1",apiKeyEnvVar:"NOVA_API_KEY",apiKeyHeader:"Authorization",name:"Nova",models:["nova-2-lite-v1","nova-2-pro-v1"],docUrl:"https://nova.amazon.com/dev/documentation",gateway:"models.dev"},"atomic-chat":{url:"http://127.0.0.1:1337/v1",apiKeyEnvVar:"ATOMIC_CHAT_API_KEY",apiKeyHeader:"Authorization",name:"Atomic Chat",models:["Meta-Llama-3_1-8B-Instruct-GGUF","Qwen3_5-9B-MLX-4bit","Qwen3_5-9B-Q4_K_M","gemma-4-E4B-it-IQ4_XS","gemma-4-E4B-it-MLX-4bit"],docUrl:"https://atomic.chat",gateway:"models.dev"},netlify:{apiKeyEnvVar:["NETLIFY_TOKEN","NETLIFY_SITE_ID"],apiKeyHeader:"Authorization",name:"Netlify",gateway:"netlify",models:["anthropic/claude-haiku-4-5","anthropic/claude-haiku-4-5-20251001","anthropic/claude-opus-4-1-20250805","anthropic/claude-opus-4-20250514","anthropic/claude-opus-4-5","anthropic/claude-opus-4-5-20251101","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-sonnet-4-0","anthropic/claude-sonnet-4-20250514","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-5-20250929","anthropic/claude-sonnet-4-6","gemini/gemini-2.0-flash","gemini/gemini-2.0-flash-lite","gemini/gemini-2.5-flash","gemini/gemini-2.5-flash-image","gemini/gemini-2.5-flash-lite","gemini/gemini-2.5-pro","gemini/gemini-3-flash-preview","gemini/gemini-3-pro-image-preview","gemini/gemini-3.1-flash-image-preview","gemini/gemini-3.1-flash-lite","gemini/gemini-3.1-flash-lite-preview","gemini/gemini-3.1-pro-preview","gemini/gemini-3.1-pro-preview-customtools","gemini/gemini-flash-latest","gemini/gemini-flash-lite-latest","openai/chat-latest","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-mini","openai/gpt-5","openai/gpt-5-2025-08-07","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-mini-2025-08-07","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-2025-11-13","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-2025-12-11","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.2-pro-2025-12-11","openai/gpt-5.3-chat-latest","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-2026-03-05","openai/gpt-5.4-mini","openai/gpt-5.4-mini-2026-03-17","openai/gpt-5.4-nano","openai/gpt-5.4-nano-2026-03-17","openai/gpt-5.4-pro","openai/gpt-5.4-pro-2026-03-05","openai/gpt-5.5","openai/gpt-5.5-2026-04-23","openai/gpt-5.5-pro","openai/gpt-5.5-pro-2026-04-23","openai/o3","openai/o3-mini","openai/o4-mini"],docUrl:"https://docs.netlify.com/build/ai-gateway/overview/"}},models:{"302ai":["MiniMax-M1","MiniMax-M2","MiniMax-M2.1","MiniMax-M2.7","MiniMax-M2.7-highspeed","chatgpt-4o-latest","claude-3-5-haiku-20241022","claude-3-5-haiku-latest","claude-haiku-4-5","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-1-20250805-thinking","claude-opus-4-20250514","claude-opus-4-5","claude-opus-4-5-20251101","claude-opus-4-5-20251101-thinking","claude-opus-4-6","claude-opus-4-6-thinking","claude-opus-4-7","claude-sonnet-4-20250514","claude-sonnet-4-5","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929-thinking","claude-sonnet-4-6","claude-sonnet-4-6-thinking","deepseek-chat","deepseek-reasoner","deepseek-v3.2","deepseek-v3.2-thinking","doubao-seed-1-6-thinking-250715","doubao-seed-1-6-vision-250815","doubao-seed-1-8-251215","doubao-seed-code-preview-251028","gemini-2.0-flash-lite","gemini-2.5-flash","gemini-2.5-flash-image","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-flash-nothink","gemini-2.5-flash-preview-09-2025","gemini-2.5-pro","gemini-3-flash-preview","gemini-3-pro-image-preview","gemini-3-pro-preview","gemini-3.1-flash-image-preview","glm-4.5","glm-4.5-air","glm-4.5-airx","glm-4.5-x","glm-4.5v","glm-4.6","glm-4.6v","glm-4.7","glm-4.7-flashx","glm-5","glm-5-turbo","glm-5.1","glm-5v-turbo","glm-for-coding","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-5","gpt-5-mini","gpt-5-pro","gpt-5-thinking","gpt-5.1","gpt-5.1-chat-latest","gpt-5.2","gpt-5.2-chat-latest","gpt-5.4","gpt-5.4-mini","gpt-5.4-mini-2026-03-17","gpt-5.4-nano","gpt-5.4-nano-2026-03-17","gpt-5.4-pro","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-fast-non-reasoning","grok-4-fast-reasoning","grok-4.1","grok-4.20-beta-0309-non-reasoning","grok-4.20-beta-0309-reasoning","grok-4.20-multi-agent-beta-0309","kimi-k2-0905-preview","kimi-k2-thinking","kimi-k2-thinking-turbo","ministral-14b-2512","mistral-large-2512","qwen-flash","qwen-max-latest","qwen-plus","qwen3-235b-a22b","qwen3-235b-a22b-instruct-2507","qwen3-30b-a3b","qwen3-coder-480b-a35b-instruct","qwen3-max-2025-09-23"],alibaba:["qvq-max","qwen-flash","qwen-max","qwen-mt-plus","qwen-mt-turbo","qwen-omni-turbo","qwen-omni-turbo-realtime","qwen-plus","qwen-plus-character-ja","qwen-turbo","qwen-vl-max","qwen-vl-ocr","qwen-vl-plus","qwen2-5-14b-instruct","qwen2-5-32b-instruct","qwen2-5-72b-instruct","qwen2-5-7b-instruct","qwen2-5-omni-7b","qwen2-5-vl-72b-instruct","qwen2-5-vl-7b-instruct","qwen3-14b","qwen3-235b-a22b","qwen3-32b","qwen3-8b","qwen3-asr-flash","qwen3-coder-30b-a3b-instruct","qwen3-coder-480b-a35b-instruct","qwen3-coder-flash","qwen3-coder-plus","qwen3-livetranslate-flash-realtime","qwen3-max","qwen3-next-80b-a3b-instruct","qwen3-next-80b-a3b-thinking","qwen3-omni-flash","qwen3-omni-flash-realtime","qwen3-vl-235b-a22b","qwen3-vl-30b-a3b","qwen3-vl-plus","qwen3.5-122b-a10b","qwen3.5-27b","qwen3.5-35b-a3b","qwen3.5-397b-a17b","qwen3.5-plus","qwen3.6-27b","qwen3.6-35b-a3b","qwen3.6-max-preview","qwen3.6-plus","qwq-plus"],scaleway:["bge-multilingual-gemma2","deepseek-r1-distill-llama-70b","devstral-2-123b-instruct-2512","gemma-3-27b-it","gpt-oss-120b","llama-3.1-8b-instruct","llama-3.3-70b-instruct","mistral-nemo-instruct-2407","mistral-small-3.2-24b-instruct-2506","pixtral-12b-2409","qwen3-235b-a22b-instruct-2507","qwen3-coder-30b-a3b-instruct","qwen3-embedding-8b","qwen3.5-397b-a17b","voxtral-small-24b-2507","whisper-large-v3"],"nano-gpt":["Alibaba-NLP/Tongyi-DeepResearch-30B-A3B","Baichuan-M2","Baichuan4-Air","Baichuan4-Turbo","CrucibleLab/L3.3-70B-Loki-V2.0","Doctor-Shotgun/MS3.2-24B-Magnum-Diamond","EVA-UNIT-01/EVA-LLaMA-3.33-70B-v0.0","EVA-UNIT-01/EVA-LLaMA-3.33-70B-v0.1","EVA-UNIT-01/EVA-Qwen2.5-32B-v0.2","EVA-UNIT-01/EVA-Qwen2.5-72B-v0.2","Envoid/Llama-3.05-NT-Storybreaker-Ministral-70B","Envoid/Llama-3.05-Nemotron-Tenyxchat-Storybreaker-70B","GLM-4.5-Air-Derestricted","GLM-4.5-Air-Derestricted-Iceblink","GLM-4.5-Air-Derestricted-Iceblink-ReExtract","GLM-4.5-Air-Derestricted-Iceblink-v2","GLM-4.5-Air-Derestricted-Iceblink-v2-ReExtract","GLM-4.5-Air-Derestricted-Steam","GLM-4.5-Air-Derestricted-Steam-ReExtract","GLM-4.6-Derestricted-v5","GalrionSoftworks/MN-LooseCannon-12B-v1","Gemma-3-27B-ArliAI-RPMax-v3","Gemma-3-27B-Big-Tiger-v3","Gemma-3-27B-CardProjector-v4","Gemma-3-27B-Glitter","Gemma-3-27B-Nidum-Uncensored","Gemma-3-27B-it","Gemma-3-27B-it-Abliterated","Gryphe/MythoMax-L2-13b","Infermatic/MN-12B-Inferor-v0.0","KAT-Coder-Air-V1","KAT-Coder-Exp-72B-1010","KAT-Coder-Pro-V1","LLM360/K2-Think","LatitudeGames/Wayfarer-Large-70B-Llama-3.3","Llama-3.3+(3.1v3.3)-70B-Hanami-x1","Llama-3.3+(3.1v3.3)-70B-New-Dawn-v1.1","Llama-3.3+(3v3.3)-70B-TenyxChat-DaybreakStorywriter","Llama-3.3-70B-Anthrobomination","Llama-3.3-70B-Argunaut-1-SFT","Llama-3.3-70B-ArliAI-RPMax-v1.4","Llama-3.3-70B-ArliAI-RPMax-v2","Llama-3.3-70B-ArliAI-RPMax-v3","Llama-3.3-70B-Aurora-Borealis","Llama-3.3-70B-Bigger-Body","Llama-3.3-70B-Cirrus-x1","Llama-3.3-70B-Cu-Mai-R1","Llama-3.3-70B-Damascus-R1","Llama-3.3-70B-Dark-Ages-v0.1","Llama-3.3-70B-Electra-R1","Llama-3.3-70B-Electranova-v1.0","Llama-3.3-70B-Fallen-R1-v1","Llama-3.3-70B-Fallen-v1","Llama-3.3-70B-Forgotten-Abomination-v5.0","Llama-3.3-70B-Forgotten-Safeword-3.6","Llama-3.3-70B-GeneticLemonade-Opus","Llama-3.3-70B-GeneticLemonade-Unleashed-v3","Llama-3.3-70B-Ignition-v0.1","Llama-3.3-70B-Incandescent-Malevolence","Llama-3.3-70B-Legion-V2.1","Llama-3.3-70B-MS-Nevoria","Llama-3.3-70B-Magnum-v4-SE","Llama-3.3-70B-Magnum-v4-SE-Cirrus-x1-SLERP","Llama-3.3-70B-Mhnnn-x1","Llama-3.3-70B-MiraiFanfare","Llama-3.3-70B-Mokume-Gane-R1","Llama-3.3-70B-Nova","Llama-3.3-70B-Predatorial-Extasy","Llama-3.3-70B-Progenitor-V3.3","Llama-3.3-70B-RAWMAW","Llama-3.3-70B-Sapphira-0.1","Llama-3.3-70B-Sapphira-0.2","Llama-3.3-70B-Shakudo","Llama-3.3-70B-StrawberryLemonade-v1.0","Llama-3.3-70B-Strawberrylemonade-v1.2","Llama-3.3-70B-The-Omega-Directive-Unslop-v2.0","Llama-3.3-70B-The-Omega-Directive-Unslop-v2.1","Llama-3.3-70B-Vulpecula-R1","Magistral-Small-2506","MarinaraSpaghetti/NemoMix-Unleashed-12B","Meta-Llama-3-1-8B-Instruct-FP8","MiniMax-M1","MiniMax-M2","MiniMaxAI/MiniMax-M1-80k","Mistral-Nemo-12B-Instruct-2407","NeverSleep/Llama-3-Lumimaid-70B-v0.1","NeverSleep/Lumimaid-v0.2-70B","NousResearch 2/DeepHermes-3-Mistral-24B-Preview","NousResearch 2/Hermes-4-70B:thinking","NousResearch 2/hermes-3-llama-3.1-70b","NousResearch 2/hermes-4-405b","NousResearch 2/hermes-4-405b:thinking","NousResearch 2/hermes-4-70b","QwQ-32B-ArliAI-RpR-v1","Qwen2.5-32B-EVA-v0.2","ReadyArt/MS3.2-The-Omega-Directive-24B-Unslop-v2.0","ReadyArt/The-Omega-Abomination-L-70B-v1.0","Salesforce/Llama-xLAM-2-70b-fc-r","Sao10K/L3-8B-Stheno-v3.2","Sao10K/L3.1-70B-Euryale-v2.2","Sao10K/L3.1-70B-Hanami-x1","Sao10K/L3.3-70B-Euryale-v2.3","Steelskull/L3.3-Cu-Mai-R1-70b","Steelskull/L3.3-Electra-R1-70b","Steelskull/L3.3-MS-Evalebis-70b","Steelskull/L3.3-MS-Evayale-70B","Steelskull/L3.3-MS-Nevoria-70b","Steelskull/L3.3-Nevoria-R1-70b","TEE/deepseek-r1-0528","TEE/deepseek-v3.1","TEE/deepseek-v3.2","TEE/gemma-3-27b-it","TEE/glm-4.6","TEE/glm-4.7","TEE/glm-4.7-flash","TEE/glm-5","TEE/gpt-oss-120b","TEE/gpt-oss-20b","TEE/kimi-k2-thinking","TEE/kimi-k2.5","TEE/kimi-k2.5-thinking","TEE/llama3-3-70b","TEE/minimax-m2.1","TEE/qwen2.5-vl-72b-instruct","TEE/qwen3-30b-a3b-instruct-2507","TEE/qwen3-coder","TEE/qwen3.5-397b-a17b","THUDM/GLM-4-32B-0414","THUDM/GLM-4-9B-0414","THUDM/GLM-Z1-32B-0414","THUDM/GLM-Z1-9B-0414","THUDM/GLM-Z1-Rumination-32B-0414","TheDrummer 2/Anubis-70B-v1","TheDrummer 2/Anubis-70B-v1.1","TheDrummer 2/Cydonia-24B-v2","TheDrummer 2/Cydonia-24B-v4","TheDrummer 2/Cydonia-24B-v4.1","TheDrummer 2/Cydonia-24B-v4.3","TheDrummer 2/Magidonia-24B-v4.3","TheDrummer 2/Rocinante-12B-v1.1","TheDrummer 2/UnslopNemo-12B-v4.1","TheDrummer 2/skyfall-36b-v2","Tongyi-Zhiwen/QwenLong-L1-32B","VongolaChouko/Starcannon-Unleashed-12B-v1.0","abacusai/Dracarys-72B-Instruct","aion-labs/aion-1.0","aion-labs/aion-1.0-mini","aion-labs/aion-rp-llama-3.1-8b","alibaba/qwen3.6-flash","allenai/molmo-2-8b","allenai/olmo-3-32b-think","allenai/olmo-3.1-32b-instruct","allenai/olmo-3.1-32b-think","amazon/nova-2-lite-v1","amazon/nova-lite-v1","amazon/nova-micro-v1","amazon/nova-pro-v1","anthracite-org/magnum-v2-72b","anthracite-org/magnum-v4-72b","anthropic/claude-opus-4.6","anthropic/claude-opus-4.6:thinking","anthropic/claude-opus-4.6:thinking:low","anthropic/claude-opus-4.6:thinking:max","anthropic/claude-opus-4.6:thinking:medium","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet-4.6:thinking","arcee-ai/trinity-large","arcee-ai/trinity-mini","asi1-mini","auto-model","auto-model-basic","auto-model-premium","auto-model-standard","azure-gpt-4-turbo","azure-gpt-4o","azure-gpt-4o-mini","azure-o1","azure-o3-mini","baidu/ernie-4.5-300b-a47b","baidu/ernie-4.5-vl-28b-a3b","baseten/Kimi-K2-Instruct-FP4","brave","brave-pro","brave-research","chroma","chutesai/Mistral-Small-3.2-24B-Instruct-2506","claude-3-5-haiku-20241022","claude-3-5-sonnet-20240620","claude-3-5-sonnet-20241022","claude-3-7-sonnet-20250219","claude-3-7-sonnet-reasoner","claude-3-7-sonnet-thinking","claude-3-7-sonnet-thinking:1024","claude-3-7-sonnet-thinking:128000","claude-3-7-sonnet-thinking:32768","claude-3-7-sonnet-thinking:8192","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-1-thinking","claude-opus-4-1-thinking:1024","claude-opus-4-1-thinking:32000","claude-opus-4-1-thinking:32768","claude-opus-4-1-thinking:8192","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-5-20251101:thinking","claude-opus-4-thinking","claude-opus-4-thinking:1024","claude-opus-4-thinking:32000","claude-opus-4-thinking:32768","claude-opus-4-thinking:8192","claude-sonnet-4-20250514","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929-thinking","claude-sonnet-4-thinking","claude-sonnet-4-thinking:1024","claude-sonnet-4-thinking:32768","claude-sonnet-4-thinking:64000","claude-sonnet-4-thinking:8192","cognitivecomputations/dolphin-2.9.2-qwen2-72b","cohere/command-r","cohere/command-r-plus-08-2024","command-a-reasoning-08-2025","deepclaude","deepcogito/cogito-v1-preview-qwen-32B","deepcogito/cogito-v2.1-671b","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3.1","deepseek-ai/DeepSeek-V3.1-Terminus","deepseek-ai/DeepSeek-V3.1-Terminus:thinking","deepseek-ai/DeepSeek-V3.1:thinking","deepseek-ai/deepseek-v3.2-exp","deepseek-ai/deepseek-v3.2-exp-thinking","deepseek-chat","deepseek-chat-cheaper","deepseek-math-v2","deepseek-r1","deepseek-r1-sambanova","deepseek-reasoner","deepseek-reasoner-cheaper","deepseek-v3-0324","deepseek/deepseek-prover-v2-671b","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-speciale","deepseek/deepseek-v3.2:thinking","dmind/dmind-1","dmind/dmind-1-mini","doubao-1-5-thinking-pro-250415","doubao-1-5-thinking-pro-vision-250415","doubao-1-5-thinking-vision-pro-250428","doubao-1.5-pro-256k","doubao-1.5-pro-32k","doubao-1.5-vision-pro-32k","doubao-seed-1-6-250615","doubao-seed-1-6-flash-250615","doubao-seed-1-6-thinking-250615","doubao-seed-1-8-251215","doubao-seed-2-0-code-preview-260215","doubao-seed-2-0-lite-260215","doubao-seed-2-0-mini-260215","doubao-seed-2-0-pro-260215","doubao-seed-code-preview-latest","ernie-4.5-8k-preview","ernie-4.5-turbo-128k","ernie-4.5-turbo-vl-32k","ernie-5.0-thinking-latest","ernie-5.0-thinking-preview","ernie-x1-32k","ernie-x1-32k-preview","ernie-x1-turbo-32k","ernie-x1.1-preview","essentialai/rnj-1-instruct","exa-answer","exa-research","exa-research-pro","failspy/Meta-Llama-3-70B-Instruct-abliterated-v3.5","fastgpt","featherless-ai/Qwerky-72B","gemini-2.0-flash-001","gemini-2.0-flash-exp-image-generation","gemini-2.0-flash-lite","gemini-2.0-flash-thinking-exp-01-21","gemini-2.0-flash-thinking-exp-1219","gemini-2.0-pro-exp-02-05","gemini-2.0-pro-reasoner","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.5-flash-lite-preview-06-17","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-flash-lite-preview-09-2025-thinking","gemini-2.5-flash-nothinking","gemini-2.5-flash-preview-04-17","gemini-2.5-flash-preview-04-17:thinking","gemini-2.5-flash-preview-05-20","gemini-2.5-flash-preview-05-20:thinking","gemini-2.5-flash-preview-09-2025","gemini-2.5-flash-preview-09-2025-thinking","gemini-2.5-pro","gemini-2.5-pro-exp-03-25","gemini-2.5-pro-preview-03-25","gemini-2.5-pro-preview-05-06","gemini-2.5-pro-preview-06-05","gemini-3-pro-image-preview","gemini-3-pro-preview","gemini-3-pro-preview-thinking","gemini-exp-1206","glm-4","glm-4-air","glm-4-air-0111","glm-4-airx","glm-4-flash","glm-4-long","glm-4-plus","glm-4-plus-0111","glm-4.1v-thinking-flash","glm-4.1v-thinking-flashx","glm-z1-air","glm-z1-airx","glm-zero-preview","google/gemini-3-flash-preview","google/gemini-3-flash-preview-thinking","google/gemini-flash-1.5","grok-3-beta","grok-3-fast-beta","grok-3-mini-beta","grok-3-mini-fast-beta","hidream","huihui-ai/DeepSeek-R1-Distill-Llama-70B-abliterated","huihui-ai/DeepSeek-R1-Distill-Qwen-32B-abliterated","huihui-ai/Llama-3.1-Nemotron-70B-Instruct-HF-abliterated","huihui-ai/Llama-3.3-70B-Instruct-abliterated","huihui-ai/Qwen2.5-32B-Instruct-abliterated","hunyuan-t1-latest","hunyuan-turbos-20250226","inflatebot/MN-12B-Mag-Mell-R1","inflection/inflection-3-pi","inflection/inflection-3-productivity","jamba-large","jamba-large-1.6","jamba-large-1.7","jamba-mini","jamba-mini-1.6","jamba-mini-1.7","kimi-k2-instruct-fast","kimi-thinking-preview","learnlm-1.5-pro-experimental","meganova-ai/manta-flash-1.0","meganova-ai/manta-mini-1.0","meganova-ai/manta-pro-1.0","meituan-longcat/LongCat-Flash-Chat-FP8","meta-llama/llama-3.1-8b-instruct","meta-llama/llama-3.2-3b-instruct","meta-llama/llama-3.2-90b-vision-instruct","meta-llama/llama-3.3-70b-instruct","meta-llama/llama-4-maverick","meta-llama/llama-4-scout","microsoft/MAI-DS-R1-FP8","microsoft/wizardlm-2-8x22b","minimax/minimax-01","minimax/minimax-m2-her","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.7","miromind-ai/mirothinker-v1.5-235b","mistral-small-31-24b-instruct","mistralai/Devstral-Small-2505","mistralai/Mistral-Nemo-Instruct-2407","mistralai/codestral-2508","mistralai/devstral-2-123b-instruct-2512","mistralai/ministral-14b-2512","mistralai/ministral-14b-instruct-2512","mistralai/ministral-3b-2512","mistralai/ministral-8b-2512","mistralai/mistral-7b-instruct","mistralai/mistral-large","mistralai/mistral-large-3-675b-instruct-2512","mistralai/mistral-medium-3","mistralai/mistral-medium-3.1","mistralai/mistral-saba","mistralai/mistral-small-creative","mistralai/mistral-tiny","mistralai/mixtral-8x22b-instruct-v0.1","mistralai/mixtral-8x7b-instruct-v0.1","mlabonne/NeuralDaredevil-8B-abliterated","moonshotai/Kimi-Dev-72B","moonshotai/Kimi-K2-Instruct-0905","moonshotai/kimi-k2-instruct","moonshotai/kimi-k2-instruct-0711","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2-thinking-original","moonshotai/kimi-k2-thinking-turbo-original","moonshotai/kimi-k2.5","moonshotai/kimi-k2.5:thinking","moonshotai/kimi-k2.6","moonshotai/kimi-k2.6:thinking","nex-agi/deepseek-v3.1-nex-n1","nothingiisreal/L3.1-70B-Celeste-V0.1-BF16","nvidia/Llama-3.1-Nemotron-70B-Instruct-HF","nvidia/Llama-3.1-Nemotron-Ultra-253B-v1","nvidia/Llama-3.3-Nemotron-Super-49B-v1","nvidia/Llama-3_3-Nemotron-Super-49B-v1_5","nvidia/nemotron-3-nano-30b-a3b","nvidia/nvidia-nemotron-nano-9b-v2","openai/chatgpt-4o-latest","openai/gpt-3.5-turbo","openai/gpt-4-turbo","openai/gpt-4-turbo-preview","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-2024-08-06","openai/gpt-4o-2024-11-20","openai/gpt-4o-mini","openai/gpt-4o-mini-search-preview","openai/gpt-4o-search-preview","openai/gpt-5","openai/gpt-5-chat-latest","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-2025-11-13","openai/gpt-5.1-chat","openai/gpt-5.1-chat-latest","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/gpt-oss-safeguard-20b","openai/o1","openai/o1-preview","openai/o1-pro","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-mini-high","openai/o3-mini-low","openai/o3-pro-2025-06-10","openai/o4-mini","openai/o4-mini-deep-research","openai/o4-mini-high","pamanseau/OpenReasoning-Nemotron-32B","phi-4-mini-instruct","phi-4-multimodal-instruct","qvq-max","qwen-3.6-plus","qwen-image","qwen-long","qwen-max","qwen-plus","qwen-turbo","qwen/Qwen3.6-35B-A3B","qwen/Qwen3.6-35B-A3B:thinking","qwen/qwen3.5-397b-a17b","qwen25-vl-72b-instruct","qwen3-30b-a3b-instruct-2507","qwen3-coder-30b-a3b-instruct","qwen3-max-2026-01-23","qwen3-vl-235b-a22b-instruct-original","qwen3-vl-235b-a22b-thinking","qwen3.6-max-preview","qwq-32b","raifle/sorcererlm-8x22b","sarvan-medium","shisa-ai/shisa-v2-llama3.3-70b","shisa-ai/shisa-v2.1-llama3.3-70b","sonar","sonar-deep-research","sonar-pro","sonar-reasoning-pro","soob3123/GrayLine-Qwen3-8B","soob3123/Veiled-Calla-12B","soob3123/amoral-gemma3-27B-v2","step-2-16k-exp","step-2-mini","step-3","step-r1-v-mini","stepfun-ai/step-3.5-flash","stepfun-ai/step-3.5-flash:thinking","study_gpt-chatgpt-4o-latest","tencent/Hunyuan-MT-7B","tngtech/DeepSeek-TNG-R1T2-Chimera","tngtech/tng-r1t-chimera","undi95/remm-slerp-l2-13b","universal-summarizer","unsloth/gemma-3-12b-it","unsloth/gemma-3-1b-it","unsloth/gemma-3-27b-it","unsloth/gemma-3-4b-it","v0-1.0-md","v0-1.5-lg","v0-1.5-md","venice-uncensored","venice-uncensored:web","x-ai/grok-4-07-09","x-ai/grok-4-fast","x-ai/grok-4-fast:thinking","x-ai/grok-4.1-fast","x-ai/grok-4.1-fast-reasoning","x-ai/grok-code-fast-1","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-flash-original","xiaomi/mimo-v2-flash-thinking","xiaomi/mimo-v2-flash-thinking-original","yi-large","yi-lightning","yi-medium-200k","z-ai/glm-4.5v","z-ai/glm-4.5v:thinking","z-ai/glm-4.6","z-ai/glm-4.6:thinking","z-image-turbo","zai-org/glm-4.7","zai-org/glm-4.7-flash","zai-org/glm-5","zai-org/glm-5.1","zai-org/glm-5.1:thinking","zai-org/glm-5:thinking"],abacus:["Qwen/QwQ-32B","Qwen/Qwen2.5-72B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-32B","Qwen/qwen3-coder-480b-a35b-instruct","claude-3-7-sonnet-20250219","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-6","claude-sonnet-4-20250514","claude-sonnet-4-5-20250929","claude-sonnet-4-6","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-V3.1-Terminus","deepseek-ai/DeepSeek-V3.2","deepseek/deepseek-v3.1","gemini-2.5-flash","gemini-2.5-pro","gemini-3-flash-preview","gemini-3.1-flash-lite-preview","gemini-3.1-pro-preview","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-4o-2024-11-20","gpt-4o-mini","gpt-5","gpt-5-codex","gpt-5-mini","gpt-5-nano","gpt-5.1","gpt-5.1-chat-latest","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.2","gpt-5.2-chat-latest","gpt-5.2-codex","gpt-5.3-chat-latest","gpt-5.3-codex","gpt-5.3-codex-xhigh","gpt-5.4","grok-4-0709","grok-4-1-fast-non-reasoning","grok-4-fast-non-reasoning","grok-code-fast-1","kimi-k2-turbo-preview","kimi-k2.5","llama-3.3-70b-versatile","meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8","meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo","meta-llama/Meta-Llama-3.1-8B-Instruct","o3","o3-mini","o3-pro","o4-mini","openai/gpt-oss-120b","qwen-2.5-coder-32b","qwen3-max","route-llm","zai-org/glm-4.5","zai-org/glm-4.6","zai-org/glm-4.7","zai-org/glm-5"],"perplexity-agent":["anthropic/claude-haiku-4-5","anthropic/claude-opus-4-5","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","google/gemini-2.5-flash","google/gemini-2.5-pro","google/gemini-3-flash-preview","google/gemini-3.1-pro-preview","nvidia/nemotron-3-super-120b-a12b","openai/gpt-5-mini","openai/gpt-5.1","openai/gpt-5.2","openai/gpt-5.4","openai/gpt-5.5","perplexity/sonar","xai/grok-4-1-fast-non-reasoning"],"siliconflow-cn":["ByteDance-Seed/Seed-OSS-36B-Instruct","Kwaipilot/KAT-Dev","PaddlePaddle/PaddleOCR-VL","PaddlePaddle/PaddleOCR-VL-1.5","Pro/MiniMaxAI/MiniMax-M2.1","Pro/MiniMaxAI/MiniMax-M2.5","Pro/deepseek-ai/DeepSeek-R1","Pro/deepseek-ai/DeepSeek-V3","Pro/deepseek-ai/DeepSeek-V3.1-Terminus","Pro/deepseek-ai/DeepSeek-V3.2","Pro/moonshotai/Kimi-K2-Instruct-0905","Pro/moonshotai/Kimi-K2-Thinking","Pro/moonshotai/Kimi-K2.5","Pro/moonshotai/Kimi-K2.6","Pro/zai-org/GLM-4.7","Pro/zai-org/GLM-5","Pro/zai-org/GLM-5.1","Qwen/QwQ-32B","Qwen/Qwen2.5-14B-Instruct","Qwen/Qwen2.5-32B-Instruct","Qwen/Qwen2.5-72B-Instruct","Qwen/Qwen2.5-72B-Instruct-128K","Qwen/Qwen2.5-7B-Instruct","Qwen/Qwen2.5-Coder-32B-Instruct","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen2.5-VL-72B-Instruct","Qwen/Qwen3-14B","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-30B-A3B-Thinking-2507","Qwen/Qwen3-32B","Qwen/Qwen3-8B","Qwen/Qwen3-Coder-30B-A3B-Instruct","Qwen/Qwen3-Coder-480B-A35B-Instruct","Qwen/Qwen3-Next-80B-A3B-Instruct","Qwen/Qwen3-Next-80B-A3B-Thinking","Qwen/Qwen3-Omni-30B-A3B-Captioner","Qwen/Qwen3-Omni-30B-A3B-Instruct","Qwen/Qwen3-Omni-30B-A3B-Thinking","Qwen/Qwen3-VL-235B-A22B-Instruct","Qwen/Qwen3-VL-235B-A22B-Thinking","Qwen/Qwen3-VL-30B-A3B-Instruct","Qwen/Qwen3-VL-30B-A3B-Thinking","Qwen/Qwen3-VL-32B-Instruct","Qwen/Qwen3-VL-32B-Thinking","Qwen/Qwen3-VL-8B-Instruct","Qwen/Qwen3-VL-8B-Thinking","Qwen/Qwen3.5-122B-A10B","Qwen/Qwen3.5-27B","Qwen/Qwen3.5-35B-A3B","Qwen/Qwen3.5-397B-A17B","Qwen/Qwen3.5-4B","Qwen/Qwen3.5-9B","Qwen/Qwen3.6-35B-A3B","THUDM/GLM-4-32B-0414","THUDM/GLM-4-9B-0414","THUDM/GLM-Z1-32B-0414","THUDM/GLM-Z1-9B-0414","ascend-tribe/pangu-pro-moe","baidu/ERNIE-4.5-300B-A47B","deepseek-ai/DeepSeek-OCR","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-R1-Distill-Qwen-14B","deepseek-ai/DeepSeek-R1-Distill-Qwen-32B","deepseek-ai/DeepSeek-V3","deepseek-ai/DeepSeek-V3.1-Terminus","deepseek-ai/DeepSeek-V3.2","deepseek-ai/deepseek-vl2","inclusionAI/Ling-flash-2.0","inclusionAI/Ling-mini-2.0","inclusionAI/Ring-flash-2.0","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","stepfun-ai/Step-3.5-Flash","tencent/Hunyuan-A13B-Instruct","tencent/Hunyuan-MT-7B","zai-org/GLM-4.5-Air","zai-org/GLM-4.5V","zai-org/GLM-4.6","zai-org/GLM-4.6V"],submodel:["Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3-0324","deepseek-ai/DeepSeek-V3.1","openai/gpt-oss-120b","zai-org/GLM-4.5-Air","zai-org/GLM-4.5-FP8"],"minimax-coding-plan":["MiniMax-M2","MiniMax-M2.1","MiniMax-M2.5","MiniMax-M2.5-highspeed","MiniMax-M2.7","MiniMax-M2.7-highspeed"],claudinio:["claudinio"],perplexity:["sonar","sonar-deep-research","sonar-pro","sonar-reasoning-pro"],deepseek:["deepseek-chat","deepseek-reasoner","deepseek-v4-flash","deepseek-v4-pro"],llama:["cerebras-llama-4-maverick-17b-128e-instruct","cerebras-llama-4-scout-17b-16e-instruct","groq-llama-4-maverick-17b-128e-instruct","llama-3.3-70b-instruct","llama-3.3-8b-instruct","llama-4-maverick-17b-128e-instruct-fp8","llama-4-scout-17b-16e-instruct-fp8"],openrouter:["ai21/jamba-large-1.7","aion-labs/aion-1.0","aion-labs/aion-1.0-mini","aion-labs/aion-2.0","aion-labs/aion-rp-llama-3.1-8b","alfredpros/codellama-7b-instruct-solidity","alibaba/tongyi-deepresearch-30b-a3b","allenai/olmo-3-32b-think","amazon/nova-2-lite-v1","amazon/nova-lite-v1","amazon/nova-micro-v1","amazon/nova-premier-v1","amazon/nova-pro-v1","anthracite-org/magnum-v4-72b","anthropic/claude-3-haiku","anthropic/claude-3.5-haiku","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.6-fast","anthropic/claude-opus-4.7","anthropic/claude-opus-4.7-fast","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","arcee-ai/coder-large","arcee-ai/maestro-reasoning","arcee-ai/spotlight","arcee-ai/trinity-large-preview","arcee-ai/trinity-large-thinking","arcee-ai/trinity-large-thinking:free","arcee-ai/trinity-mini","arcee-ai/virtuoso-large","baidu/cobuddy:free","baidu/ernie-4.5-21b-a3b","baidu/ernie-4.5-21b-a3b-thinking","baidu/ernie-4.5-300b-a47b","baidu/ernie-4.5-vl-28b-a3b","baidu/ernie-4.5-vl-424b-a47b","baidu/qianfan-ocr-fast","bytedance-seed/seed-1.6","bytedance-seed/seed-1.6-flash","bytedance-seed/seed-2.0-lite","bytedance-seed/seed-2.0-mini","bytedance/ui-tars-1.5-7b","cognitivecomputations/dolphin-mistral-24b-venice-edition:free","cohere/command-a","cohere/command-r-08-2024","cohere/command-r-plus-08-2024","cohere/command-r7b-12-2024","deepcogito/cogito-v2.1-671b","deepseek/deepseek-chat","deepseek/deepseek-chat-v3-0324","deepseek/deepseek-chat-v3.1","deepseek/deepseek-r1","deepseek/deepseek-r1-0528","deepseek/deepseek-r1-distill-llama-70b","deepseek/deepseek-r1-distill-qwen-32b","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v3.2-speciale","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-flash:free","deepseek/deepseek-v4-pro","essentialai/rnj-1-instruct","google/gemini-2.0-flash-001","google/gemini-2.0-flash-lite-001","google/gemini-2.5-flash","google/gemini-2.5-flash-image","google/gemini-2.5-flash-lite","google/gemini-2.5-flash-lite-preview-09-2025","google/gemini-2.5-pro","google/gemini-2.5-pro-preview","google/gemini-2.5-pro-preview-05-06","google/gemini-3-flash-preview","google/gemini-3-pro-image-preview","google/gemini-3.1-flash-image-preview","google/gemini-3.1-flash-lite","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","google/gemini-3.1-pro-preview-customtools","google/gemma-2-27b-it","google/gemma-3-12b-it","google/gemma-3-27b-it","google/gemma-3-4b-it","google/gemma-3n-e4b-it","google/gemma-4-26b-a4b-it","google/gemma-4-26b-a4b-it:free","google/gemma-4-31b-it","google/gemma-4-31b-it:free","google/lyria-3-clip-preview","google/lyria-3-pro-preview","gryphe/mythomax-l2-13b","ibm-granite/granite-4.0-h-micro","ibm-granite/granite-4.1-8b","inception/mercury-2","inclusionai/ling-2.6-1t","inclusionai/ling-2.6-flash","inclusionai/ring-2.6-1t:free","inflection/inflection-3-pi","inflection/inflection-3-productivity","kwaipilot/kat-coder-pro-v2","liquid/lfm-2-24b-a2b","liquid/lfm-2.5-1.2b-instruct:free","liquid/lfm-2.5-1.2b-thinking:free","mancer/weaver","meta-llama/llama-3-70b-instruct","meta-llama/llama-3-8b-instruct","meta-llama/llama-3.1-70b-instruct","meta-llama/llama-3.1-8b-instruct","meta-llama/llama-3.2-11b-vision-instruct","meta-llama/llama-3.2-1b-instruct","meta-llama/llama-3.2-3b-instruct","meta-llama/llama-3.2-3b-instruct:free","meta-llama/llama-3.3-70b-instruct","meta-llama/llama-3.3-70b-instruct:free","meta-llama/llama-4-maverick","meta-llama/llama-4-scout","meta-llama/llama-guard-3-8b","meta-llama/llama-guard-4-12b","microsoft/phi-4","microsoft/phi-4-mini-instruct","microsoft/wizardlm-2-8x22b","minimax/minimax-01","minimax/minimax-m1","minimax/minimax-m2","minimax/minimax-m2-her","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.5:free","minimax/minimax-m2.7","mistralai/codestral-2508","mistralai/devstral-2512","mistralai/devstral-medium","mistralai/devstral-small","mistralai/ministral-14b-2512","mistralai/ministral-3b-2512","mistralai/ministral-8b-2512","mistralai/mistral-7b-instruct-v0.1","mistralai/mistral-large","mistralai/mistral-large-2407","mistralai/mistral-large-2411","mistralai/mistral-large-2512","mistralai/mistral-medium-3","mistralai/mistral-medium-3-5","mistralai/mistral-medium-3.1","mistralai/mistral-nemo","mistralai/mistral-saba","mistralai/mistral-small-24b-instruct-2501","mistralai/mistral-small-2603","mistralai/mistral-small-3.1-24b-instruct","mistralai/mistral-small-3.2-24b-instruct","mistralai/mixtral-8x22b-instruct","mistralai/pixtral-large-2411","mistralai/voxtral-small-24b-2507","moonshotai/kimi-k2","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","morph/morph-v3-fast","morph/morph-v3-large","nex-agi/deepseek-v3.1-nex-n1","nousresearch/hermes-2-pro-llama-3-8b","nousresearch/hermes-3-llama-3.1-405b","nousresearch/hermes-3-llama-3.1-405b:free","nousresearch/hermes-3-llama-3.1-70b","nousresearch/hermes-4-405b","nousresearch/hermes-4-70b","nvidia/llama-3.3-nemotron-super-49b-v1.5","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-nano-30b-a3b:free","nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-3-super-120b-a12b:free","nvidia/nemotron-nano-12b-v2-vl:free","nvidia/nemotron-nano-9b-v2","nvidia/nemotron-nano-9b-v2:free","openai/gpt-3.5-turbo","openai/gpt-3.5-turbo-0613","openai/gpt-3.5-turbo-16k","openai/gpt-3.5-turbo-instruct","openai/gpt-4","openai/gpt-4-0314","openai/gpt-4-1106-preview","openai/gpt-4-turbo","openai/gpt-4-turbo-preview","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-2024-05-13","openai/gpt-4o-2024-08-06","openai/gpt-4o-2024-11-20","openai/gpt-4o-audio-preview","openai/gpt-4o-mini","openai/gpt-4o-mini-2024-07-18","openai/gpt-4o-mini-search-preview","openai/gpt-4o-search-preview","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-image","openai/gpt-5-image-mini","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-chat","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-image-2","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","openai/gpt-audio","openai/gpt-audio-mini","openai/gpt-chat-latest","openai/gpt-oss-120b","openai/gpt-oss-120b:free","openai/gpt-oss-20b","openai/gpt-oss-20b:free","openai/gpt-oss-safeguard-20b","openai/o1","openai/o1-pro","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-mini-high","openai/o3-pro","openai/o4-mini","openai/o4-mini-deep-research","openai/o4-mini-high","openrouter/auto","openrouter/bodybuilder","openrouter/free","openrouter/owl-alpha","openrouter/pareto-code","perceptron/perceptron-mk1","perplexity/sonar","perplexity/sonar-deep-research","perplexity/sonar-pro","perplexity/sonar-pro-search","perplexity/sonar-reasoning-pro","poolside/laguna-m.1:free","poolside/laguna-xs.2:free","prime-intellect/intellect-3","qwen/qwen-2.5-72b-instruct","qwen/qwen-2.5-7b-instruct","qwen/qwen-2.5-coder-32b-instruct","qwen/qwen-plus","qwen/qwen-plus-2025-07-28","qwen/qwen-plus-2025-07-28:thinking","qwen/qwen2.5-vl-72b-instruct","qwen/qwen3-14b","qwen/qwen3-235b-a22b","qwen/qwen3-235b-a22b-2507","qwen/qwen3-235b-a22b-thinking-2507","qwen/qwen3-30b-a3b","qwen/qwen3-30b-a3b-instruct-2507","qwen/qwen3-30b-a3b-thinking-2507","qwen/qwen3-32b","qwen/qwen3-8b","qwen/qwen3-coder","qwen/qwen3-coder-30b-a3b-instruct","qwen/qwen3-coder-flash","qwen/qwen3-coder-next","qwen/qwen3-coder-plus","qwen/qwen3-coder:free","qwen/qwen3-max","qwen/qwen3-max-thinking","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-instruct:free","qwen/qwen3-next-80b-a3b-thinking","qwen/qwen3-vl-235b-a22b-instruct","qwen/qwen3-vl-235b-a22b-thinking","qwen/qwen3-vl-30b-a3b-instruct","qwen/qwen3-vl-30b-a3b-thinking","qwen/qwen3-vl-32b-instruct","qwen/qwen3-vl-8b-instruct","qwen/qwen3-vl-8b-thinking","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","qwen/qwen3.5-9b","qwen/qwen3.5-flash-02-23","qwen/qwen3.5-plus-02-15","qwen/qwen3.5-plus-20260420","qwen/qwen3.6-27b","qwen/qwen3.6-35b-a3b","qwen/qwen3.6-flash","qwen/qwen3.6-max-preview","qwen/qwen3.6-plus","rekaai/reka-edge","rekaai/reka-flash-3","relace/relace-apply-3","relace/relace-search","sao10k/l3-euryale-70b","sao10k/l3-lunaris-8b","sao10k/l3.1-70b-hanami-x1","sao10k/l3.1-euryale-70b","sao10k/l3.3-euryale-70b","stepfun/step-3.5-flash","switchpoint/router","tencent/hunyuan-a13b-instruct","tencent/hy3-preview","thedrummer/cydonia-24b-v4.1","thedrummer/rocinante-12b","thedrummer/skyfall-36b-v2","thedrummer/unslopnemo-12b","undi95/remm-slerp-l2-13b","upstage/solar-pro-3","writer/palmyra-x5","x-ai/grok-3","x-ai/grok-3-beta","x-ai/grok-3-mini","x-ai/grok-3-mini-beta","x-ai/grok-4","x-ai/grok-4-fast","x-ai/grok-4.1-fast","x-ai/grok-4.20","x-ai/grok-4.20-multi-agent","x-ai/grok-4.3","x-ai/grok-code-fast-1","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-omni","xiaomi/mimo-v2-pro","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","z-ai/glm-4-32b","z-ai/glm-4.5","z-ai/glm-4.5-air","z-ai/glm-4.5-air:free","z-ai/glm-4.5v","z-ai/glm-4.6","z-ai/glm-4.6v","z-ai/glm-4.7","z-ai/glm-4.7-flash","z-ai/glm-5","z-ai/glm-5-turbo","z-ai/glm-5.1","z-ai/glm-5v-turbo","~anthropic/claude-haiku-latest","~anthropic/claude-opus-latest","~anthropic/claude-sonnet-latest","~google/gemini-flash-latest","~google/gemini-pro-latest","~moonshotai/kimi-latest","~openai/gpt-latest","~openai/gpt-mini-latest"],"fireworks-ai":["accounts/fireworks/models/deepseek-v3p1","accounts/fireworks/models/deepseek-v3p2","accounts/fireworks/models/deepseek-v4-pro","accounts/fireworks/models/glm-4p5","accounts/fireworks/models/glm-4p5-air","accounts/fireworks/models/glm-4p7","accounts/fireworks/models/glm-5","accounts/fireworks/models/glm-5p1","accounts/fireworks/models/gpt-oss-120b","accounts/fireworks/models/gpt-oss-20b","accounts/fireworks/models/kimi-k2-instruct","accounts/fireworks/models/kimi-k2-thinking","accounts/fireworks/models/kimi-k2p5","accounts/fireworks/models/kimi-k2p6","accounts/fireworks/models/minimax-m2p1","accounts/fireworks/models/minimax-m2p5","accounts/fireworks/models/minimax-m2p7","accounts/fireworks/models/qwen3p6-plus","accounts/fireworks/routers/kimi-k2p5-turbo"],ambient:["moonshotai/kimi-k2.6","zai-org/GLM-5.1-FP8"],"kimi-for-coding":["k2p5","k2p6","kimi-k2-thinking"],moark:["GLM-4.7","MiniMax-M2.1"],"opencode-go":["deepseek-v4-flash","deepseek-v4-pro","glm-5","glm-5.1","kimi-k2.5","kimi-k2.6","mimo-v2.5","mimo-v2.5-pro","minimax-m2.5","minimax-m2.7","qwen3.5-plus","qwen3.6-plus"],databricks:["databricks-claude-haiku-4-5","databricks-claude-opus-4-1","databricks-claude-opus-4-5","databricks-claude-opus-4-6","databricks-claude-opus-4-7","databricks-claude-sonnet-4","databricks-claude-sonnet-4-5","databricks-claude-sonnet-4-6","databricks-gemini-2-5-flash","databricks-gemini-2-5-pro","databricks-gemini-3-1-flash-lite","databricks-gemini-3-1-pro","databricks-gemini-3-flash","databricks-gemini-3-pro","databricks-gpt-5","databricks-gpt-5-1","databricks-gpt-5-2","databricks-gpt-5-4","databricks-gpt-5-4-mini","databricks-gpt-5-4-nano","databricks-gpt-5-5","databricks-gpt-5-mini","databricks-gpt-5-nano","databricks-gpt-oss-120b","databricks-gpt-oss-20b"],"io-net":["Intel/Qwen3-Coder-480B-A35B-Instruct-int4-mixed-ar","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-Next-80B-A3B-Instruct","deepseek-ai/DeepSeek-R1-0528","meta-llama/Llama-3.2-90B-Vision-Instruct","meta-llama/Llama-3.3-70B-Instruct","meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8","mistralai/Devstral-Small-2505","mistralai/Magistral-Small-2506","mistralai/Mistral-Large-Instruct-2411","mistralai/Mistral-Nemo-Instruct-2407","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","openai/gpt-oss-120b","openai/gpt-oss-20b","zai-org/GLM-4.6"],"alibaba-cn":["MiniMax-M2.5","MiniMax/MiniMax-M2.7","deepseek-r1","deepseek-r1-0528","deepseek-r1-distill-llama-70b","deepseek-r1-distill-llama-8b","deepseek-r1-distill-qwen-1-5b","deepseek-r1-distill-qwen-14b","deepseek-r1-distill-qwen-32b","deepseek-r1-distill-qwen-7b","deepseek-v3","deepseek-v3-1","deepseek-v3-2-exp","deepseek-v4-flash","deepseek-v4-pro","glm-5","glm-5.1","kimi-k2-thinking","kimi-k2.5","kimi-k2.6","kimi/kimi-k2.5","moonshot-kimi-k2-instruct","qvq-max","qwen-deep-research","qwen-doc-turbo","qwen-flash","qwen-long","qwen-math-plus","qwen-math-turbo","qwen-max","qwen-mt-plus","qwen-mt-turbo","qwen-omni-turbo","qwen-omni-turbo-realtime","qwen-plus","qwen-plus-character","qwen-turbo","qwen-vl-max","qwen-vl-ocr","qwen-vl-plus","qwen2-5-14b-instruct","qwen2-5-32b-instruct","qwen2-5-72b-instruct","qwen2-5-7b-instruct","qwen2-5-coder-32b-instruct","qwen2-5-coder-7b-instruct","qwen2-5-math-72b-instruct","qwen2-5-math-7b-instruct","qwen2-5-omni-7b","qwen2-5-vl-72b-instruct","qwen2-5-vl-7b-instruct","qwen3-14b","qwen3-235b-a22b","qwen3-32b","qwen3-8b","qwen3-asr-flash","qwen3-coder-30b-a3b-instruct","qwen3-coder-480b-a35b-instruct","qwen3-coder-flash","qwen3-coder-plus","qwen3-max","qwen3-next-80b-a3b-instruct","qwen3-next-80b-a3b-thinking","qwen3-omni-flash","qwen3-omni-flash-realtime","qwen3-vl-235b-a22b","qwen3-vl-30b-a3b","qwen3-vl-plus","qwen3.5-397b-a17b","qwen3.5-flash","qwen3.5-plus","qwen3.6-max-preview","qwen3.6-plus","qwq-32b","qwq-plus","siliconflow/deepseek-r1-0528","siliconflow/deepseek-v3-0324","siliconflow/deepseek-v3.1-terminus","siliconflow/deepseek-v3.2","tongyi-intent-detect-v3"],firepass:["accounts/fireworks/routers/kimi-k2p6-turbo"],"minimax-cn-coding-plan":["MiniMax-M2","MiniMax-M2.1","MiniMax-M2.5","MiniMax-M2.5-highspeed","MiniMax-M2.7","MiniMax-M2.7-highspeed"],jiekou:["baidu/ernie-4.5-300b-a47b-paddle","baidu/ernie-4.5-vl-424b-a47b","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-6","claude-sonnet-4-20250514","claude-sonnet-4-5-20250929","deepseek/deepseek-r1-0528","deepseek/deepseek-v3-0324","deepseek/deepseek-v3.1","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.5-flash-lite-preview-06-17","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-flash-preview-05-20","gemini-2.5-pro","gemini-2.5-pro-preview-06-05","gemini-3-flash-preview","gemini-3-pro-preview","gpt-5-chat-latest","gpt-5-codex","gpt-5-mini","gpt-5-nano","gpt-5-pro","gpt-5.1","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.1-codex-mini","gpt-5.2","gpt-5.2-codex","gpt-5.2-pro","grok-4-0709","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-fast-non-reasoning","grok-4-fast-reasoning","grok-code-fast-1","minimax/minimax-m2.1","minimaxai/minimax-m1-80k","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-instruct","moonshotai/kimi-k2.5","o3","o3-mini","o4-mini","qwen/qwen3-235b-a22b-fp8","qwen/qwen3-235b-a22b-instruct-2507","qwen/qwen3-235b-a22b-thinking-2507","qwen/qwen3-30b-a3b-fp8","qwen/qwen3-32b-fp8","qwen/qwen3-coder-480b-a35b-instruct","qwen/qwen3-coder-next","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-thinking","xiaomimimo/mimo-v2-flash","zai-org/glm-4.5","zai-org/glm-4.5v","zai-org/glm-4.7","zai-org/glm-4.7-flash"],bailing:["Ling-1T","Ring-1T"],iflowcn:["deepseek-r1","deepseek-v3","deepseek-v3.2","glm-4.6","kimi-k2","kimi-k2-0905","qwen3-235b","qwen3-235b-a22b-instruct","qwen3-235b-a22b-thinking-2507","qwen3-32b","qwen3-coder-plus","qwen3-max","qwen3-max-preview","qwen3-vl-plus"],orcarouter:["anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","deepseek/deepseek-chat","deepseek/deepseek-reasoner","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","google/gemini-2.5-flash","google/gemini-2.5-flash-lite","google/gemini-2.5-pro","google/gemini-3-flash-preview","google/gemini-3-pro-preview","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","google/gemini-3.1-pro-preview-customtools","google/gemini-flash-latest","google/gemini-flash-lite-latest","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","grok/grok-4.3","kimi/kimi-k2.5","kimi/kimi-k2.6","minimax/minimax-m2.5","minimax/minimax-m2.5-highspeed","minimax/minimax-m2.7","minimax/minimax-m2.7-highspeed","openai/gpt-3.5-turbo","openai/gpt-4","openai/gpt-4-turbo","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-2024-05-13","openai/gpt-4o-2024-08-06","openai/gpt-4o-2024-11-20","openai/gpt-4o-mini","openai/gpt-5","openai/gpt-5-chat-latest","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-chat-latest","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat-latest","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat-latest","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","orcarouter/auto","qwen/qwen3-max","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","qwen/qwen3.5-plus","qwen/qwen3.6-35b-a3b","qwen/qwen3.6-plus","z-ai/glm-4.5","z-ai/glm-4.5-air","z-ai/glm-4.6","z-ai/glm-4.7","z-ai/glm-5","z-ai/glm-5.1"],huggingface:["MiniMaxAI/MiniMax-M2.1","MiniMaxAI/MiniMax-M2.5","MiniMaxAI/MiniMax-M2.7","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-Coder-480B-A35B-Instruct","Qwen/Qwen3-Coder-Next","Qwen/Qwen3-Embedding-4B","Qwen/Qwen3-Embedding-8B","Qwen/Qwen3-Next-80B-A3B-Instruct","Qwen/Qwen3-Next-80B-A3B-Thinking","Qwen/Qwen3.5-397B-A17B","XiaomiMiMo/MiMo-V2-Flash","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V4-Pro","moonshotai/Kimi-K2-Instruct","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","zai-org/GLM-4.7","zai-org/GLM-4.7-Flash","zai-org/GLM-5","zai-org/GLM-5.1"],zenmux:["anthropic/claude-3.5-haiku","anthropic/claude-3.7-sonnet","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","baidu/ernie-5.0-thinking-preview","deepseek/deepseek-chat","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","google/gemini-2.5-flash","google/gemini-2.5-flash-lite","google/gemini-2.5-pro","google/gemini-3-flash-preview","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","inclusionai/ling-1t","inclusionai/ring-1t","kuaishou/kat-coder-pro-v2","minimax/minimax-m2","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.5-lightning","minimax/minimax-m2.7","minimax/minimax-m2.7-highspeed","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2-thinking-turbo","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","openai/gpt-5","openai/gpt-5-codex","openai/gpt-5.1","openai/gpt-5.1-chat","openai/gpt-5.1-codex","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","qwen/qwen3-coder-plus","qwen/qwen3-max","qwen/qwen3.5-flash","qwen/qwen3.5-plus","qwen/qwen3.6-plus","sapiens-ai/agnes-1.5-lite","sapiens-ai/agnes-1.5-pro","stepfun/step-3","stepfun/step-3.5-flash","stepfun/step-3.5-flash-free","tencent/hy3-preview","volcengine/doubao-seed-1.8","volcengine/doubao-seed-2.0-code","volcengine/doubao-seed-2.0-lite","volcengine/doubao-seed-2.0-mini","volcengine/doubao-seed-2.0-pro","volcengine/doubao-seed-code","x-ai/grok-4","x-ai/grok-4-fast","x-ai/grok-4.1-fast","x-ai/grok-4.1-fast-non-reasoning","x-ai/grok-4.2-fast","x-ai/grok-4.2-fast-non-reasoning","x-ai/grok-code-fast-1","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-omni","xiaomi/mimo-v2-pro","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","z-ai/glm-4.5","z-ai/glm-4.5-air","z-ai/glm-4.6","z-ai/glm-4.6v","z-ai/glm-4.6v-flash","z-ai/glm-4.6v-flash-free","z-ai/glm-4.7","z-ai/glm-4.7-flash-free","z-ai/glm-4.7-flashx","z-ai/glm-5","z-ai/glm-5-turbo","z-ai/glm-5.1","z-ai/glm-5v-turbo"],upstage:["solar-mini","solar-pro2","solar-pro3"],"novita-ai":["Sao10K/L3-8B-Stheno-v3.2","baichuan/baichuan-m2-32b","baidu/ernie-4.5-21B-a3b","baidu/ernie-4.5-21B-a3b-thinking","baidu/ernie-4.5-300b-a47b-paddle","baidu/ernie-4.5-vl-28b-a3b","baidu/ernie-4.5-vl-28b-a3b-thinking","baidu/ernie-4.5-vl-424b-a47b","deepseek/deepseek-ocr","deepseek/deepseek-ocr-2","deepseek/deepseek-prover-v2-671b","deepseek/deepseek-r1-0528","deepseek/deepseek-r1-0528-qwen3-8b","deepseek/deepseek-r1-distill-llama-70b","deepseek/deepseek-r1-distill-qwen-14b","deepseek/deepseek-r1-distill-qwen-32b","deepseek/deepseek-r1-turbo","deepseek/deepseek-v3-0324","deepseek/deepseek-v3-turbo","deepseek/deepseek-v3.1","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","google/gemma-3-12b-it","google/gemma-3-27b-it","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","gryphe/mythomax-l2-13b","inclusionai/ling-2.6-1t","inclusionai/ling-2.6-flash","kwaipilot/kat-coder-pro","meta-llama/llama-3-70b-instruct","meta-llama/llama-3-8b-instruct","meta-llama/llama-3.1-8b-instruct","meta-llama/llama-3.2-3b-instruct","meta-llama/llama-3.3-70b-instruct","meta-llama/llama-4-maverick-17b-128e-instruct-fp8","meta-llama/llama-4-scout-17b-16e-instruct","microsoft/wizardlm-2-8x22b","minimax/minimax-m2","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.5-highspeed","minimax/minimax-m2.7","minimaxai/minimax-m1-80k","mistralai/mistral-nemo","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-instruct","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","nousresearch/hermes-2-pro-llama-3-8b","openai/gpt-oss-120b","openai/gpt-oss-20b","paddlepaddle/paddleocr-vl","qwen/qwen-2.5-72b-instruct","qwen/qwen-mt-plus","qwen/qwen2.5-7b-instruct","qwen/qwen2.5-vl-72b-instruct","qwen/qwen3-235b-a22b-fp8","qwen/qwen3-235b-a22b-instruct-2507","qwen/qwen3-235b-a22b-thinking-2507","qwen/qwen3-30b-a3b-fp8","qwen/qwen3-32b-fp8","qwen/qwen3-4b-fp8","qwen/qwen3-8b-fp8","qwen/qwen3-coder-30b-a3b-instruct","qwen/qwen3-coder-480b-a35b-instruct","qwen/qwen3-coder-next","qwen/qwen3-max","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-thinking","qwen/qwen3-omni-30b-a3b-instruct","qwen/qwen3-omni-30b-a3b-thinking","qwen/qwen3-vl-235b-a22b-instruct","qwen/qwen3-vl-235b-a22b-thinking","qwen/qwen3-vl-30b-a3b-instruct","qwen/qwen3-vl-30b-a3b-thinking","qwen/qwen3-vl-8b-instruct","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","sao10k/l3-70b-euryale-v2.1","sao10k/l3-8b-lunaris","sao10k/l31-70b-euryale-v2.2","xiaomimimo/mimo-v2-flash","zai-org/autoglm-phone-9b-multilingual","zai-org/glm-4.5","zai-org/glm-4.5-air","zai-org/glm-4.5v","zai-org/glm-4.6","zai-org/glm-4.6v","zai-org/glm-4.7","zai-org/glm-4.7-flash","zai-org/glm-5","zai-org/glm-5.1"],"xiaomi-token-plan-cn":["mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2-tts","mimo-v2.5","mimo-v2.5-pro"],wandb:["MiniMaxAI/MiniMax-M2.5","OpenPipe/Qwen3-14B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-Coder-480B-A35B-Instruct","deepseek-ai/DeepSeek-V3.1","meta-llama/Llama-3.1-70B-Instruct","meta-llama/Llama-3.1-8B-Instruct","meta-llama/Llama-3.3-70B-Instruct","meta-llama/Llama-4-Scout-17B-16E-Instruct","microsoft/Phi-4-mini-instruct","moonshotai/Kimi-K2.5","nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-FP8","openai/gpt-oss-120b","openai/gpt-oss-20b","zai-org/GLM-5-FP8","zai-org/GLM-5.1"],chutes:["MiniMaxAI/MiniMax-M2.5-TEE","NousResearch/DeepHermes-3-Mistral-24B-Preview","NousResearch/Hermes-4-14B","Qwen/Qwen2.5-72B-Instruct","Qwen/Qwen2.5-Coder-32B-Instruct","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507-TEE","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B","Qwen/Qwen3-32B-TEE","Qwen/Qwen3-Coder-Next-TEE","Qwen/Qwen3-Next-80B-A3B-Instruct","Qwen/Qwen3.5-397B-A17B-TEE","Qwen/Qwen3.6-27B-TEE","Qwen/Qwen3Guard-Gen-0.6B","XiaomiMiMo/MiMo-V2-Flash-TEE","deepseek-ai/DeepSeek-R1-0528-TEE","deepseek-ai/DeepSeek-R1-Distill-Llama-70B","deepseek-ai/DeepSeek-V3-0324-TEE","deepseek-ai/DeepSeek-V3.1-TEE","deepseek-ai/DeepSeek-V3.2-TEE","google/gemma-4-31B-turbo-TEE","moonshotai/Kimi-K2.5-TEE","moonshotai/Kimi-K2.6-TEE","openai/gpt-oss-120b-TEE","rednote-hilab/dots.ocr","tngtech/DeepSeek-TNG-R1T2-Chimera-TEE","unsloth/Llama-3.2-1B-Instruct","unsloth/Llama-3.2-3B-Instruct","unsloth/Mistral-Nemo-Instruct-2407","unsloth/gemma-3-12b-it","unsloth/gemma-3-27b-it","unsloth/gemma-3-4b-it","zai-org/GLM-4.6V","zai-org/GLM-4.7-FP8","zai-org/GLM-4.7-TEE","zai-org/GLM-5-TEE","zai-org/GLM-5-Turbo","zai-org/GLM-5.1-TEE"],dinference:["glm-4.7","glm-5","glm-5.1","gpt-oss-120b","minimax-m2.5"],vivgrid:["deepseek-v3.2","deepseek-v4-pro","gemini-3.1-flash-lite-preview","gemini-3.1-pro-preview","gpt-5-mini","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.2-codex","gpt-5.3-codex","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.5"],deepinfra:["MiniMaxAI/MiniMax-M2","MiniMaxAI/MiniMax-M2.1","MiniMaxAI/MiniMax-M2.5","Qwen/Qwen3-Coder-480B-A35B-Instruct","Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo","Qwen/Qwen3.5-35B-A3B","Qwen/Qwen3.5-397B-A17B","Qwen/Qwen3.6-35B-A3B","anthropic/claude-3-7-sonnet-latest","anthropic/claude-4-opus","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V4-Flash","deepseek-ai/DeepSeek-V4-Pro","google/gemma-4-26B-A4B-it","google/gemma-4-31B-it","meta-llama/Llama-3.1-70B-Instruct","meta-llama/Llama-3.1-70B-Instruct-Turbo","meta-llama/Llama-3.1-8B-Instruct","meta-llama/Llama-3.1-8B-Instruct-Turbo","meta-llama/Llama-3.3-70B-Instruct-Turbo","meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8","meta-llama/Llama-4-Scout-17B-16E-Instruct","moonshotai/Kimi-K2-Instruct","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","openai/gpt-oss-120b","openai/gpt-oss-20b","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","zai-org/GLM-4.6","zai-org/GLM-4.6V","zai-org/GLM-4.7","zai-org/GLM-4.7-Flash","zai-org/GLM-5","zai-org/GLM-5.1"],"qiniu-ai":["MiniMax-M1","claude-3.5-haiku","claude-3.5-sonnet","claude-3.7-sonnet","claude-4.0-opus","claude-4.0-sonnet","claude-4.1-opus","claude-4.5-haiku","claude-4.5-opus","claude-4.5-sonnet","deepseek-r1","deepseek-r1-0528","deepseek-v3","deepseek-v3-0324","deepseek-v3.1","deepseek/deepseek-math-v2","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.1-terminus-thinking","deepseek/deepseek-v3.2-251201","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v3.2-exp-thinking","doubao-1.5-pro-32k","doubao-1.5-thinking-pro","doubao-1.5-vision-pro","doubao-seed-1.6","doubao-seed-1.6-flash","doubao-seed-1.6-thinking","doubao-seed-2.0-code","doubao-seed-2.0-lite","doubao-seed-2.0-mini","doubao-seed-2.0-pro","gemini-2.0-flash","gemini-2.0-flash-lite","gemini-2.5-flash","gemini-2.5-flash-image","gemini-2.5-flash-lite","gemini-2.5-pro","gemini-3.0-flash-preview","gemini-3.0-pro-image-preview","gemini-3.0-pro-preview","glm-4.5","glm-4.5-air","gpt-oss-120b","gpt-oss-20b","kimi-k2","kling-v2-6","meituan/longcat-flash-chat","meituan/longcat-flash-lite","mimo-v2-flash","minimax/minimax-m2","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.5-highspeed","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.5","openai/gpt-5","openai/gpt-5.2","qwen-max-2025-01-25","qwen-turbo","qwen-vl-max-2025-01-25","qwen2.5-vl-72b-instruct","qwen2.5-vl-7b-instruct","qwen3-235b-a22b","qwen3-235b-a22b-instruct-2507","qwen3-235b-a22b-thinking-2507","qwen3-30b-a3b","qwen3-30b-a3b-instruct-2507","qwen3-30b-a3b-thinking-2507","qwen3-32b","qwen3-coder-480b-a35b-instruct","qwen3-max","qwen3-max-preview","qwen3-next-80b-a3b-instruct","qwen3-next-80b-a3b-thinking","qwen3-vl-30b-a3b-thinking","qwen3.5-397b-a17b","stepfun-ai/gelab-zero-4b-preview","stepfun/step-3.5-flash","x-ai/grok-4-fast","x-ai/grok-4-fast-non-reasoning","x-ai/grok-4-fast-reasoning","x-ai/grok-4.1-fast","x-ai/grok-4.1-fast-non-reasoning","x-ai/grok-4.1-fast-reasoning","x-ai/grok-code-fast-1","xiaomi/mimo-v2-flash","z-ai/autoglm-phone-9b","z-ai/glm-4.6","z-ai/glm-4.7","z-ai/glm-5"],kilo:["ai21/jamba-large-1.7","aion-labs/aion-1.0","aion-labs/aion-1.0-mini","aion-labs/aion-2.0","aion-labs/aion-rp-llama-3.1-8b","alfredpros/codellama-7b-instruct-solidity","alibaba/tongyi-deepresearch-30b-a3b","allenai/olmo-3-32b-think","alpindale/goliath-120b","amazon/nova-2-lite-v1","amazon/nova-lite-v1","amazon/nova-micro-v1","amazon/nova-premier-v1","amazon/nova-pro-v1","anthracite-org/magnum-v4-72b","anthropic/claude-3-haiku","anthropic/claude-3.5-haiku","anthropic/claude-3.7-sonnet","anthropic/claude-3.7-sonnet:thinking","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.6-fast","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","arcee-ai/coder-large","arcee-ai/maestro-reasoning","arcee-ai/spotlight","arcee-ai/trinity-large-preview","arcee-ai/trinity-large-thinking","arcee-ai/trinity-mini","arcee-ai/virtuoso-large","baidu/cobuddy:free","baidu/ernie-4.5-21b-a3b","baidu/ernie-4.5-21b-a3b-thinking","baidu/ernie-4.5-300b-a47b","baidu/ernie-4.5-vl-28b-a3b","baidu/ernie-4.5-vl-424b-a47b","baidu/qianfan-ocr-fast:free","bytedance-seed/seed-1.6","bytedance-seed/seed-1.6-flash","bytedance-seed/seed-2.0-lite","bytedance-seed/seed-2.0-mini","bytedance/ui-tars-1.5-7b","cohere/command-a","cohere/command-r-08-2024","cohere/command-r-plus-08-2024","cohere/command-r7b-12-2024","deepcogito/cogito-v2.1-671b","deepseek/deepseek-chat","deepseek/deepseek-chat-v3-0324","deepseek/deepseek-chat-v3.1","deepseek/deepseek-r1","deepseek/deepseek-r1-0528","deepseek/deepseek-r1-distill-llama-70b","deepseek/deepseek-r1-distill-qwen-32b","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v3.2-speciale","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","essentialai/rnj-1-instruct","google/gemini-2.0-flash-001","google/gemini-2.0-flash-lite-001","google/gemini-2.5-flash","google/gemini-2.5-flash-image","google/gemini-2.5-flash-lite","google/gemini-2.5-flash-lite-preview-09-2025","google/gemini-2.5-pro","google/gemini-2.5-pro-preview","google/gemini-2.5-pro-preview-05-06","google/gemini-3-flash-preview","google/gemini-3-pro-image-preview","google/gemini-3.1-flash-image-preview","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","google/gemini-3.1-pro-preview-customtools","google/gemma-2-27b-it","google/gemma-3-12b-it","google/gemma-3-27b-it","google/gemma-3-4b-it","google/gemma-3n-e4b-it","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","google/lyria-3-clip-preview","google/lyria-3-pro-preview","gryphe/mythomax-l2-13b","ibm-granite/granite-4.0-h-micro","ibm-granite/granite-4.1-8b","inception/mercury-2","inclusionai/ling-2.6-1t:free","inclusionai/ling-2.6-flash","inflection/inflection-3-pi","inflection/inflection-3-productivity","kilo-auto/balanced","kilo-auto/free","kilo-auto/frontier","kilo-auto/small","kwaipilot/kat-coder-pro-v2","liquid/lfm-2-24b-a2b","mancer/weaver","meta-llama/llama-3-70b-instruct","meta-llama/llama-3-8b-instruct","meta-llama/llama-3.1-70b-instruct","meta-llama/llama-3.1-8b-instruct","meta-llama/llama-3.2-11b-vision-instruct","meta-llama/llama-3.2-1b-instruct","meta-llama/llama-3.2-3b-instruct","meta-llama/llama-3.3-70b-instruct","meta-llama/llama-4-maverick","meta-llama/llama-4-scout","meta-llama/llama-guard-3-8b","meta-llama/llama-guard-4-12b","microsoft/phi-4","microsoft/phi-4-mini-instruct","microsoft/wizardlm-2-8x22b","minimax/minimax-01","minimax/minimax-m1","minimax/minimax-m2","minimax/minimax-m2-her","minimax/minimax-m2.1","minimax/minimax-m2.5","minimax/minimax-m2.7","mistralai/codestral-2508","mistralai/devstral-2512","mistralai/devstral-medium","mistralai/devstral-small","mistralai/ministral-14b-2512","mistralai/ministral-3b-2512","mistralai/ministral-8b-2512","mistralai/mistral-7b-instruct-v0.1","mistralai/mistral-large","mistralai/mistral-large-2407","mistralai/mistral-large-2411","mistralai/mistral-large-2512","mistralai/mistral-medium-3","mistralai/mistral-medium-3-5","mistralai/mistral-medium-3.1","mistralai/mistral-nemo","mistralai/mistral-saba","mistralai/mistral-small-24b-instruct-2501","mistralai/mistral-small-2603","mistralai/mistral-small-3.1-24b-instruct","mistralai/mistral-small-3.2-24b-instruct","mistralai/mixtral-8x22b-instruct","mistralai/mixtral-8x7b-instruct","mistralai/pixtral-large-2411","mistralai/voxtral-small-24b-2507","moonshotai/kimi-k2","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","morph/morph-v3-fast","morph/morph-v3-large","nex-agi/deepseek-v3.1-nex-n1","nousresearch/hermes-2-pro-llama-3-8b","nousresearch/hermes-3-llama-3.1-405b","nousresearch/hermes-3-llama-3.1-70b","nousresearch/hermes-4-405b","nousresearch/hermes-4-70b","nvidia/llama-3.1-nemotron-70b-instruct","nvidia/llama-3.3-nemotron-super-49b-v1.5","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-3-super-120b-a12b:free","nvidia/nemotron-nano-9b-v2","openai/gpt-3.5-turbo","openai/gpt-3.5-turbo-0613","openai/gpt-3.5-turbo-16k","openai/gpt-3.5-turbo-instruct","openai/gpt-4","openai/gpt-4-0314","openai/gpt-4-1106-preview","openai/gpt-4-turbo","openai/gpt-4-turbo-preview","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-2024-05-13","openai/gpt-4o-2024-08-06","openai/gpt-4o-2024-11-20","openai/gpt-4o-audio-preview","openai/gpt-4o-mini","openai/gpt-4o-mini-2024-07-18","openai/gpt-4o-mini-search-preview","openai/gpt-4o-search-preview","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-image","openai/gpt-5-image-mini","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-chat","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-image-2","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","openai/gpt-audio","openai/gpt-audio-mini","openai/gpt-chat-latest","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/gpt-oss-safeguard-20b","openai/o1","openai/o1-pro","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-mini-high","openai/o3-pro","openai/o4-mini","openai/o4-mini-deep-research","openai/o4-mini-high","openrouter/auto","openrouter/bodybuilder","openrouter/free","openrouter/owl-alpha","openrouter/pareto-code","perplexity/sonar","perplexity/sonar-deep-research","perplexity/sonar-pro","perplexity/sonar-pro-search","perplexity/sonar-reasoning-pro","poolside/laguna-m.1:free","poolside/laguna-xs.2:free","prime-intellect/intellect-3","qwen/qwen-2.5-72b-instruct","qwen/qwen-2.5-7b-instruct","qwen/qwen-2.5-coder-32b-instruct","qwen/qwen-max","qwen/qwen-plus","qwen/qwen-plus-2025-07-28","qwen/qwen-plus-2025-07-28:thinking","qwen/qwen-turbo","qwen/qwen-vl-max","qwen/qwen-vl-plus","qwen/qwen2.5-vl-72b-instruct","qwen/qwen3-14b","qwen/qwen3-235b-a22b","qwen/qwen3-235b-a22b-2507","qwen/qwen3-235b-a22b-thinking-2507","qwen/qwen3-30b-a3b","qwen/qwen3-30b-a3b-instruct-2507","qwen/qwen3-30b-a3b-thinking-2507","qwen/qwen3-32b","qwen/qwen3-8b","qwen/qwen3-coder","qwen/qwen3-coder-30b-a3b-instruct","qwen/qwen3-coder-flash","qwen/qwen3-coder-next","qwen/qwen3-coder-plus","qwen/qwen3-max","qwen/qwen3-max-thinking","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-thinking","qwen/qwen3-vl-235b-a22b-instruct","qwen/qwen3-vl-235b-a22b-thinking","qwen/qwen3-vl-30b-a3b-instruct","qwen/qwen3-vl-30b-a3b-thinking","qwen/qwen3-vl-32b-instruct","qwen/qwen3-vl-8b-instruct","qwen/qwen3-vl-8b-thinking","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","qwen/qwen3.5-9b","qwen/qwen3.5-flash-02-23","qwen/qwen3.5-plus-02-15","qwen/qwen3.5-plus-20260420","qwen/qwen3.6-27b","qwen/qwen3.6-35b-a3b","qwen/qwen3.6-flash","qwen/qwen3.6-max-preview","qwen/qwen3.6-plus","rekaai/reka-edge","rekaai/reka-flash-3","relace/relace-apply-3","relace/relace-search","sao10k/l3-euryale-70b","sao10k/l3-lunaris-8b","sao10k/l3.1-70b-hanami-x1","sao10k/l3.1-euryale-70b","sao10k/l3.3-euryale-70b","stepfun/step-3.5-flash","stepfun/step-3.5-flash:free","switchpoint/router","tencent/hunyuan-a13b-instruct","tencent/hy3-preview:free","thedrummer/cydonia-24b-v4.1","thedrummer/rocinante-12b","thedrummer/skyfall-36b-v2","thedrummer/unslopnemo-12b","tngtech/deepseek-r1t2-chimera","undi95/remm-slerp-l2-13b","upstage/solar-pro-3","writer/palmyra-x5","x-ai/grok-3","x-ai/grok-3-beta","x-ai/grok-3-mini","x-ai/grok-3-mini-beta","x-ai/grok-4","x-ai/grok-4-fast","x-ai/grok-4.1-fast","x-ai/grok-4.20","x-ai/grok-4.20-multi-agent","x-ai/grok-4.3","x-ai/grok-code-fast-1","x-ai/grok-code-fast-1:optimized:free","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-omni","xiaomi/mimo-v2-pro","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","z-ai/glm-4-32b","z-ai/glm-4.5","z-ai/glm-4.5-air","z-ai/glm-4.5v","z-ai/glm-4.6","z-ai/glm-4.6v","z-ai/glm-4.7","z-ai/glm-4.7-flash","z-ai/glm-5","z-ai/glm-5-turbo","z-ai/glm-5.1","z-ai/glm-5v-turbo","~anthropic/claude-haiku-latest","~anthropic/claude-opus-latest","~anthropic/claude-sonnet-latest","~google/gemini-flash-latest","~google/gemini-pro-latest","~moonshotai/kimi-latest","~openai/gpt-latest","~openai/gpt-mini-latest"],auriko:["claude-opus-4-6","claude-opus-4-7","claude-sonnet-4-6","deepseek-v4-flash","deepseek-v4-pro","gemini-2.5-flash","gemini-2.5-pro","gemini-3.1-pro-preview","glm-5.1","grok-4.3","kimi-k2.5","kimi-k2.6","minimax-m2-7","minimax-m2-7-highspeed","qwen-3.6-plus"],morph:["auto","morph-v3-fast","morph-v3-large"],mixlayer:["qwen/qwen3.5-122b-a10b","qwen/qwen3.5-27b","qwen/qwen3.5-35b-a3b","qwen/qwen3.5-397b-a17b","qwen/qwen3.5-9b"],"xiaomi-token-plan-sgp":["mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2-tts","mimo-v2.5","mimo-v2.5-pro"],zai:["glm-4.5","glm-4.5-air","glm-4.5-flash","glm-4.5v","glm-4.6","glm-4.6v","glm-4.7","glm-4.7-flash","glm-4.7-flashx","glm-5","glm-5-turbo","glm-5.1","glm-5v-turbo"],opencode:["big-pickle","claude-haiku-4-5","claude-opus-4-1","claude-opus-4-5","claude-opus-4-6","claude-opus-4-7","claude-sonnet-4","claude-sonnet-4-5","claude-sonnet-4-6","deepseek-v4-flash-free","gemini-3-flash","gemini-3.1-pro","glm-5","glm-5.1","gpt-5","gpt-5-codex","gpt-5-nano","gpt-5.1","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.1-codex-mini","gpt-5.2","gpt-5.2-codex","gpt-5.3-codex","gpt-5.3-codex-spark","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.4-pro","gpt-5.5","gpt-5.5-pro","kimi-k2.5","kimi-k2.6","minimax-m2.5","minimax-m2.5-free","minimax-m2.7","nemotron-3-super-free","qwen3.5-plus","qwen3.6-plus","qwen3.6-plus-free"],stepfun:["step-1-32k","step-2-16k","step-3.5-flash","step-3.5-flash-2603"],nebius:["MiniMaxAI/MiniMax-M2.5","MiniMaxAI/MiniMax-M2.5-fast","NousResearch/Hermes-4-405B","NousResearch/Hermes-4-70B","PrimeIntellect/INTELLECT-3","Qwen/Qwen2.5-VL-72B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507-fast","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-32B","Qwen/Qwen3-Embedding-8B","Qwen/Qwen3-Next-80B-A3B-Thinking","Qwen/Qwen3-Next-80B-A3B-Thinking-fast","Qwen/Qwen3.5-397B-A17B","Qwen/Qwen3.5-397B-A17B-fast","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V3.2-fast","deepseek-ai/DeepSeek-V4-Pro","google/gemma-2-2b-it","google/gemma-3-27b-it","meta-llama/Llama-3.3-70B-Instruct","meta-llama/Meta-Llama-3.1-8B-Instruct","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.5-fast","nvidia/Llama-3_1-Nemotron-Ultra-253B-v1","nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B","nvidia/Nemotron-3-Nano-Omni","nvidia/nemotron-3-super-120b-a12b","openai/gpt-oss-120b","openai/gpt-oss-120b-fast","zai-org/GLM-5"],poe:["anthropic/claude-haiku-3","anthropic/claude-haiku-3.5","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-3.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","cerebras/gpt-oss-120b-cs","cerebras/llama-3.1-8b-cs","elevenlabs/elevenlabs-music","elevenlabs/elevenlabs-v2.5-turbo","elevenlabs/elevenlabs-v3","empiriolabs/deepseek-v4-flash-el","empiriolabs/deepseek-v4-pro-el","fireworks-ai/kimi-k2.5-fw","google/gemini-2.0-flash","google/gemini-2.0-flash-lite","google/gemini-2.5-flash","google/gemini-2.5-flash-lite","google/gemini-2.5-pro","google/gemini-3-flash","google/gemini-3.1-flash-lite","google/gemini-3.1-pro","google/gemma-4-31b","google/imagen-3","google/imagen-3-fast","google/imagen-4","google/imagen-4-fast","google/imagen-4-ultra","google/lyria","google/nano-banana","google/nano-banana-pro","google/veo-2","google/veo-3","google/veo-3-fast","google/veo-3.1","google/veo-3.1-fast","ideogramai/ideogram","ideogramai/ideogram-v2","ideogramai/ideogram-v2a","ideogramai/ideogram-v2a-turbo","lumalabs/ray2","novita/deepseek-v3.2","novita/glm-4.6","novita/glm-4.6v","novita/glm-4.7-flash","novita/glm-4.7-n","novita/glm-5","novita/kimi-k2-thinking","novita/kimi-k2.5","novita/kimi-k2.6","novita/minimax-m2.1","openai/dall-e-3","openai/gpt-3.5-turbo","openai/gpt-3.5-turbo-instruct","openai/gpt-3.5-turbo-raw","openai/gpt-4-turbo","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-aug","openai/gpt-4o-mini","openai/gpt-4o-mini-search","openai/gpt-4o-search","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.1-instant","openai/gpt-5.2","openai/gpt-5.2-codex","openai/gpt-5.2-instant","openai/gpt-5.2-pro","openai/gpt-5.3-codex","openai/gpt-5.3-codex-spark","openai/gpt-5.3-instant","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","openai/gpt-image-1","openai/gpt-image-1-mini","openai/gpt-image-1.5","openai/gpt-image-2","openai/o1","openai/o1-pro","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-mini-high","openai/o3-pro","openai/o4-mini","openai/o4-mini-deep-research","openai/sora-2","openai/sora-2-pro","poetools/claude-code","runwayml/runway","runwayml/runway-gen-4-turbo","stabilityai/stablediffusionxl","topazlabs-co/topazlabs","trytako/tako","xai/grok-3","xai/grok-3-mini","xai/grok-4","xai/grok-4-fast-non-reasoning","xai/grok-4-fast-reasoning","xai/grok-4.1-fast-non-reasoning","xai/grok-4.1-fast-reasoning","xai/grok-4.20-multi-agent","xai/grok-code-fast-1"],helicone:["chatgpt-4o-latest","claude-3-haiku-20240307","claude-3.5-haiku","claude-3.5-sonnet-v2","claude-3.7-sonnet","claude-4.5-haiku","claude-4.5-opus","claude-4.5-sonnet","claude-haiku-4-5-20251001","claude-opus-4","claude-opus-4-1","claude-opus-4-1-20250805","claude-sonnet-4","claude-sonnet-4-5-20250929","deepseek-r1-distill-llama-70b","deepseek-reasoner","deepseek-tng-r1t2-chimera","deepseek-v3","deepseek-v3.1-terminus","deepseek-v3.2","ernie-4.5-21b-a3b-thinking","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.5-pro","gemini-3-pro-preview","gemma-3-12b-it","gemma2-9b-it","glm-4.6","gpt-4.1","gpt-4.1-mini","gpt-4.1-mini-2025-04-14","gpt-4.1-nano","gpt-4o","gpt-4o-mini","gpt-5","gpt-5-chat-latest","gpt-5-codex","gpt-5-mini","gpt-5-nano","gpt-5-pro","gpt-5.1","gpt-5.1-chat-latest","gpt-5.1-codex","gpt-5.1-codex-mini","gpt-oss-120b","gpt-oss-20b","grok-3","grok-3-mini","grok-4","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-fast-non-reasoning","grok-4-fast-reasoning","grok-code-fast-1","hermes-2-pro-llama-3-8b","kimi-k2-0711","kimi-k2-0905","kimi-k2-thinking","llama-3.1-8b-instant","llama-3.1-8b-instruct","llama-3.1-8b-instruct-turbo","llama-3.3-70b-instruct","llama-3.3-70b-versatile","llama-4-maverick","llama-4-scout","llama-guard-4","llama-prompt-guard-2-22m","llama-prompt-guard-2-86m","mistral-large-2411","mistral-nemo","mistral-small","o1","o1-mini","o3","o3-mini","o3-pro","o4-mini","qwen2.5-coder-7b-fast","qwen3-235b-a22b-thinking","qwen3-30b-a3b","qwen3-32b","qwen3-coder","qwen3-coder-30b-a3b-instruct","qwen3-next-80b-a3b-instruct","qwen3-vl-235b-a22b-instruct","sonar","sonar-deep-research","sonar-pro","sonar-reasoning","sonar-reasoning-pro"],"ollama-cloud":["cogito-2.1:671b","deepseek-v3.1:671b","deepseek-v3.2","deepseek-v4-flash","deepseek-v4-pro","devstral-2:123b","devstral-small-2:24b","gemini-3-flash-preview","gemma3:12b","gemma3:27b","gemma3:4b","gemma4:31b","glm-4.6","glm-4.7","glm-5","glm-5.1","gpt-oss:120b","gpt-oss:20b","kimi-k2-thinking","kimi-k2.5","kimi-k2.6","kimi-k2:1t","minimax-m2","minimax-m2.1","minimax-m2.5","minimax-m2.7","ministral-3:14b","ministral-3:3b","ministral-3:8b","mistral-large-3:675b","nemotron-3-nano:30b","nemotron-3-super","qwen3-coder-next","qwen3-coder:480b","qwen3-next:80b","qwen3-vl:235b","qwen3-vl:235b-instruct","qwen3.5:397b","rnj-1:8b"],"zai-coding-plan":["glm-4.5-air","glm-4.7","glm-5-turbo","glm-5.1","glm-5v-turbo"],"umans-ai-coding-plan":["umans-coder","umans-flash","umans-glm-5.1","umans-kimi-k2.6","umans-qwen3.6-35b-a3b"],"the-grid-ai":["text-max","text-prime","text-standard"],baseten:["MiniMaxAI/MiniMax-M2.5","deepseek-ai/DeepSeek-V3-0324","deepseek-ai/DeepSeek-V3.1","deepseek-ai/DeepSeek-V4-Pro","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","nvidia/Nemotron-120B-A12B","openai/gpt-oss-120b","zai-org/GLM-4.6","zai-org/GLM-4.7","zai-org/GLM-5"],frogbot:["claude-haiku-4-5","claude-opus-4-6","claude-opus-4-7","claude-sonnet-4-6","deepseek-v4-pro","gemini-2.5-flash","gemini-2.5-pro","gemini-3-1-pro-preview","gemini-3-flash-preview","gpt-4o","gpt-5-3-codex","gpt-5-4-mini","gpt-5-4-nano","gpt-5-5","gpt-oss-120b","gpt-oss-20b","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-3","grok-code-fast-1","kimi-k2-6","kimi-k2.5","minimax-m2-5","minimax-m2-7","qwen-3-6-plus","zai-glm-5-1"],"zhipuai-coding-plan":["glm-4.5-air","glm-4.7","glm-5-turbo","glm-5.1","glm-5v-turbo"],"alibaba-coding-plan":["MiniMax-M2.5","glm-4.7","glm-5","kimi-k2.5","qwen3-coder-next","qwen3-coder-plus","qwen3-max-2026-01-23","qwen3.5-plus","qwen3.6-plus"],cerebras:["gpt-oss-120b","llama3.1-8b","qwen-3-235b-a22b-instruct-2507","zai-glm-4.7"],lmstudio:["openai/gpt-oss-20b","qwen/qwen3-30b-a3b-2507","qwen/qwen3-coder-30b"],lucidquery:["lucidnova-rf1-100b","lucidquery-nexus-coder"],"moonshotai-cn":["kimi-k2-0711-preview","kimi-k2-0905-preview","kimi-k2-thinking","kimi-k2-thinking-turbo","kimi-k2-turbo-preview","kimi-k2.5","kimi-k2.6"],gmicloud:["anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4.6","deepseek-ai/DeepSeek-V4-Flash","deepseek-ai/DeepSeek-V4-Pro","moonshotai/Kimi-K2.6","zai-org/GLM-5-FP8","zai-org/GLM-5.1-FP8"],"abliteration-ai":["abliterated-model"],"wafer.ai":["GLM-5.1","Qwen3.5-397B-A17B"],xpersona:["xpersona-frieren-coder"],"cloudferro-sherlock":["MiniMaxAI/MiniMax-M2.5","meta-llama/Llama-3.3-70B-Instruct","openai/gpt-oss-120b","speakleash/Bielik-11B-v2.6-Instruct","speakleash/Bielik-11B-v3.0-Instruct"],"kuae-cloud-coding-plan":["GLM-4.7"],xai:["grok-2","grok-2-1212","grok-2-latest","grok-2-vision","grok-2-vision-1212","grok-2-vision-latest","grok-3","grok-3-fast","grok-3-fast-latest","grok-3-latest","grok-3-mini","grok-3-mini-fast","grok-3-mini-fast-latest","grok-3-mini-latest","grok-4","grok-4-1-fast","grok-4-1-fast-non-reasoning","grok-4-fast","grok-4-fast-non-reasoning","grok-4.20-0309-non-reasoning","grok-4.20-0309-reasoning","grok-4.20-multi-agent-0309","grok-4.3","grok-beta","grok-code-fast-1","grok-vision-beta"],meganova:["MiniMaxAI/MiniMax-M2.1","MiniMaxAI/MiniMax-M2.5","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3.5-Plus","XiaomiMiMo/MiMo-V2-Flash","deepseek-ai/DeepSeek-R1-0528","deepseek-ai/DeepSeek-V3-0324","deepseek-ai/DeepSeek-V3.1","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V3.2-Exp","meta-llama/Llama-3.3-70B-Instruct","mistralai/Mistral-Nemo-Instruct-2407","mistralai/Mistral-Small-3.2-24B-Instruct-2506","moonshotai/Kimi-K2-Thinking","moonshotai/Kimi-K2.5","zai-org/GLM-4.6","zai-org/GLM-4.7","zai-org/GLM-5"],evroc:["KBLab/kb-whisper-large","Qwen/Qwen3-30B-A3B-Instruct-2507-FP8","Qwen/Qwen3-Embedding-8B","Qwen/Qwen3-VL-30B-A3B-Instruct","intfloat/multilingual-e5-large-instruct","microsoft/Phi-4-multimodal-instruct","mistralai/Magistral-Small-2509","mistralai/Voxtral-Small-24B-2507","mistralai/devstral-small-2-24b-instruct-2512","moonshotai/Kimi-K2.5","nvidia/Llama-3.3-70B-Instruct-FP8","openai/gpt-oss-120b","openai/whisper-large-v3"],nearai:["Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-Embedding-0.6B","Qwen/Qwen3-Reranker-0.6B","Qwen/Qwen3-VL-30B-A3B-Instruct","Qwen/Qwen3.5-122B-A10B","anthropic/claude-haiku-4-5","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","black-forest-labs/FLUX.2-klein-4B","google/gemini-2.5-flash","google/gemini-2.5-flash-lite","google/gemini-2.5-pro","google/gemini-3.1-flash-lite","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-5","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5.1","openai/gpt-5.2","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.5","openai/gpt-oss-120b","openai/o3","openai/o3-mini","openai/o4-mini","openai/whisper-large-v3","zai-org/GLM-5.1-FP8"],synthetic:["hf:MiniMaxAI/MiniMax-M2","hf:MiniMaxAI/MiniMax-M2.1","hf:MiniMaxAI/MiniMax-M2.5","hf:Qwen/Qwen2.5-Coder-32B-Instruct","hf:Qwen/Qwen3-235B-A22B-Instruct-2507","hf:Qwen/Qwen3-235B-A22B-Thinking-2507","hf:Qwen/Qwen3-Coder-480B-A35B-Instruct","hf:Qwen/Qwen3.5-397B-A17B","hf:deepseek-ai/DeepSeek-R1","hf:deepseek-ai/DeepSeek-R1-0528","hf:deepseek-ai/DeepSeek-V3","hf:deepseek-ai/DeepSeek-V3-0324","hf:deepseek-ai/DeepSeek-V3.1","hf:deepseek-ai/DeepSeek-V3.1-Terminus","hf:deepseek-ai/DeepSeek-V3.2","hf:meta-llama/Llama-3.1-405B-Instruct","hf:meta-llama/Llama-3.1-70B-Instruct","hf:meta-llama/Llama-3.1-8B-Instruct","hf:meta-llama/Llama-3.3-70B-Instruct","hf:meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8","hf:meta-llama/Llama-4-Scout-17B-16E-Instruct","hf:moonshotai/Kimi-K2-Instruct-0905","hf:moonshotai/Kimi-K2-Thinking","hf:moonshotai/Kimi-K2.5","hf:moonshotai/Kimi-K2.6","hf:nvidia/Kimi-K2.5-NVFP4","hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4","hf:openai/gpt-oss-120b","hf:zai-org/GLM-4.6","hf:zai-org/GLM-4.7","hf:zai-org/GLM-4.7-Flash","hf:zai-org/GLM-5","hf:zai-org/GLM-5.1"],nvidia:["abacusai/dracarys-llama-3_1-70b-instruct","baai/bge-m3","black-forest-labs/flux.1-dev","black-forest-labs/flux_1-kontext-dev","black-forest-labs/flux_1-schnell","black-forest-labs/flux_2-klein-4b","bytedance/seed-oss-36b-instruct","deepseek-ai/deepseek-v3.1-terminus","deepseek-ai/deepseek-v3.2","deepseek-ai/deepseek-v4-flash","deepseek-ai/deepseek-v4-pro","google/gemma-2-2b-it","google/gemma-3-27b-it","google/gemma-3n-e2b-it","google/gemma-3n-e4b-it","google/gemma-4-31b-it","google/google-paligemma","meta/esm2-650m","meta/esmfold","meta/llama-3.1-70b-instruct","meta/llama-3.1-8b-instruct","meta/llama-3.2-11b-vision-instruct","meta/llama-3.2-1b-instruct","meta/llama-3.2-3b-instruct","meta/llama-3.2-90b-vision-instruct","meta/llama-3.3-70b-instruct","meta/llama-4-maverick-17b-128e-instruct","meta/llama-guard-4-12b","microsoft/phi-4-mini-instruct","microsoft/phi-4-multimodal-instruct","minimaxai/minimax-m2.5","minimaxai/minimax-m2.7","mistralai/devstral-2-123b-instruct-2512","mistralai/magistral-small-2506","mistralai/mistral-7b-instruct-v03","mistralai/mistral-large-3-675b-instruct-2512","mistralai/mistral-medium-3-instruct","mistralai/mistral-nemotron","mistralai/mistral-small-4-119b-2603","mistralai/mixtral-8x22b-instruct","mistralai/mixtral-8x7b-instruct","moonshotai/kimi-k2-instruct","moonshotai/kimi-k2-instruct-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2.6","nvidia/active-speaker-detection","nvidia/bevformer","nvidia/cosmos-predict1-5b","nvidia/cosmos-transfer1-7b","nvidia/cosmos-transfer2_5-2b","nvidia/gliner-pii","nvidia/llama-3_1-nemotron-safety-guard-8b-v3","nvidia/llama-3_2-nemoretriever-300m-embed-v1","nvidia/llama-3_3-nemotron-super-49b-v1","nvidia/llama-3_3-nemotron-super-49b-v1_5","nvidia/llama-nemotron-embed-vl-1b-v2","nvidia/llama-nemotron-rerank-vl-1b-v2","nvidia/magpie-tts-zeroshot","nvidia/nemotron-3-content-safety","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-content-safety-reasoning-4b","nvidia/nemotron-mini-4b-instruct","nvidia/nemotron-voicechat","nvidia/nv-embed-v1","nvidia/nv-embedcode-7b-v1","nvidia/nvidia-nemotron-nano-9b-v2","nvidia/rerank-qa-mistral-4b","nvidia/riva-translate-4b-instruct-v1_1","nvidia/sparsedrive","nvidia/streampetr","nvidia/studiovoice","nvidia/synthetic-video-detector","nvidia/usdcode","nvidia/usdvalidate","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/whisper-large-v3","qwen/qwen-image","qwen/qwen-image-edit","qwen/qwen2.5-coder-32b-instruct","qwen/qwen3-coder-480b-a35b-instruct","qwen/qwen3-next-80b-a3b-instruct","qwen/qwen3-next-80b-a3b-thinking","qwen/qwen3.5-122b-a10b","qwen/qwen3.5-397b-a17b","sarvamai/sarvam-m","stepfun-ai/step-3.5-flash","upstage/solar-10_7b-instruct","z-ai/glm-5.1","z-ai/glm4.7"],inference:["google/gemma-3","meta/llama-3.1-8b-instruct","meta/llama-3.2-11b-vision-instruct","meta/llama-3.2-1b-instruct","meta/llama-3.2-3b-instruct","mistral/mistral-nemo-12b-instruct","osmosis/osmosis-structure-0.6b","qwen/qwen-2.5-7b-vision-instruct","qwen/qwen3-embedding-4b"],inception:["mercury-2","mercury-edit-2"],openai:["chatgpt-image-latest","gpt-3.5-turbo","gpt-4","gpt-4-turbo","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-4o-2024-05-13","gpt-4o-2024-08-06","gpt-4o-2024-11-20","gpt-4o-mini","gpt-5","gpt-5-chat-latest","gpt-5-codex","gpt-5-mini","gpt-5-nano","gpt-5-pro","gpt-5.1","gpt-5.1-chat-latest","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.1-codex-mini","gpt-5.2","gpt-5.2-chat-latest","gpt-5.2-codex","gpt-5.2-pro","gpt-5.3-chat-latest","gpt-5.3-codex","gpt-5.3-codex-spark","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.4-pro","gpt-5.5","gpt-5.5-pro","gpt-image-1","gpt-image-1-mini","gpt-image-1.5","o1","o1-mini","o1-preview","o1-pro","o3","o3-deep-research","o3-mini","o3-pro","o4-mini","o4-mini-deep-research","text-embedding-3-large","text-embedding-3-small","text-embedding-ada-002"],requesty:["anthropic/claude-3-7-sonnet","anthropic/claude-haiku-4-5","anthropic/claude-opus-4","anthropic/claude-opus-4-1","anthropic/claude-opus-4-5","anthropic/claude-opus-4-6","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","google/gemini-2.5-flash","google/gemini-2.5-pro","google/gemini-3-flash-preview","google/gemini-3-pro-preview","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4o-mini","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-image","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-chat","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-pro","openai/o4-mini","xai/grok-4","xai/grok-4-fast"],digitalocean:["alibaba-qwen3-32b","all-mini-lm-l6-v2","anthropic-claude-4.1-opus","anthropic-claude-4.5-haiku","anthropic-claude-4.5-sonnet","anthropic-claude-4.6-sonnet","anthropic-claude-haiku-4.5","anthropic-claude-opus-4","anthropic-claude-opus-4.5","anthropic-claude-opus-4.6","anthropic-claude-opus-4.7","anthropic-claude-sonnet-4","arcee-trinity-large-thinking","bge-m3","bge-reranker-v2-m3","deepseek-3.2","deepseek-r1-distill-llama-70b","deepseek-v3","deepseek-v4-pro","e5-large-v2","fal-ai/elevenlabs/tts/multilingual-v2","fal-ai/fast-sdxl","fal-ai/flux/schnell","fal-ai/stable-audio-25/text-to-audio","gemma-4-31B-it","glm-5","gte-large-en-v1.5","kimi-k2.5","kimi-k2.6","llama-4-maverick","llama3-8b-instruct","llama3.3-70b-instruct","minimax-m2.5","ministral-3-8b-instruct-2512","mistral-3-14B","mistral-7b-instruct-v0.3","multi-qa-mpnet-base-dot-v1","nemotron-3-nano-30b","nemotron-3-nano-omni","nemotron-nano-12b-v2-vl","nvidia-nemotron-3-super-120b","openai-gpt-4.1","openai-gpt-4o","openai-gpt-4o-mini","openai-gpt-5","openai-gpt-5-mini","openai-gpt-5-nano","openai-gpt-5.1-codex-max","openai-gpt-5.2","openai-gpt-5.2-pro","openai-gpt-5.3-codex","openai-gpt-5.4","openai-gpt-5.4-mini","openai-gpt-5.4-nano","openai-gpt-5.4-pro","openai-gpt-5.5","openai-gpt-image-1","openai-gpt-image-1.5","openai-gpt-image-2","openai-gpt-oss-120b","openai-gpt-oss-20b","openai-o1","openai-o3","openai-o3-mini","qwen-2.5-14b-instruct","qwen3-coder-flash","qwen3-embedding-0.6b","qwen3-tts-voicedesign","qwen3.5-397b-a17b","stable-diffusion-3.5-large","wan2-2-t2v-a14b"],vultr:["DeepSeek-V3.2","GLM-5-FP8","Kimi-K2.5","MiniMax-M2.5","gpt-oss-120b"],"alibaba-coding-plan-cn":["MiniMax-M2.5","glm-4.7","glm-5","kimi-k2.5","qwen3-coder-next","qwen3-coder-plus","qwen3-max-2026-01-23","qwen3.5-plus","qwen3.6-plus"],mistral:["codestral-latest","devstral-2512","devstral-medium-2507","devstral-medium-latest","devstral-small-2505","devstral-small-2507","labs-devstral-small-2512","magistral-medium-latest","magistral-small","ministral-3b-latest","ministral-8b-latest","mistral-embed","mistral-large-2411","mistral-large-2512","mistral-large-latest","mistral-medium-2505","mistral-medium-2508","mistral-medium-2604","mistral-medium-latest","mistral-nemo","mistral-small-2506","mistral-small-2603","mistral-small-latest","open-mistral-7b","open-mixtral-8x22b","open-mixtral-8x7b","pixtral-12b","pixtral-large-latest"],ovhcloud:["gpt-oss-120b","gpt-oss-20b","llama-3.1-8b-instruct","meta-llama-3_3-70b-instruct","mistral-7b-instruct-v0.3","mistral-nemo-instruct-2407","mistral-small-3.2-24b-instruct-2506","qwen2.5-vl-72b-instruct","qwen3-32b","qwen3-coder-30b-a3b-instruct","qwen3.5-9b"],friendli:["MiniMaxAI/MiniMax-M2.5","Qwen/Qwen3-235B-A22B-Instruct-2507","meta-llama/Llama-3.1-8B-Instruct","meta-llama/Llama-3.3-70B-Instruct","zai-org/GLM-5","zai-org/GLM-5.1"],cortecs:["claude-4-5-sonnet","claude-4-6-sonnet","claude-haiku-4-5","claude-opus4-5","claude-opus4-6","claude-opus4-7","claude-sonnet-4","codestral-2508","deepseek-r1-0528","deepseek-v3-0324","deepseek-v3.2","deepseek-v4-flash","deepseek-v4-pro","devstral-2512","devstral-small-2512","gemini-2.5-pro","glm-4.5","glm-4.5-air","glm-4.7","glm-4.7-flash","glm-5","glm-5.1","gpt-4.1","gpt-oss-120b","hermes-4-70b","intellect-3","kimi-k2-instruct","kimi-k2-thinking","kimi-k2.5","kimi-k2.6","llama-3.1-405b-instruct","llama-3.3-70b-instruct","minimax-m2","minimax-m2.1","minimax-m2.5","minimax-m2.7","mistral-large-2512","mixtral-8x7B-instruct-v0.1","nemotron-3-super-120b-a12b","nova-pro-v1","qwen-2.5-72b-instruct","qwen3-235b-a22b-instruct-2507","qwen3-32b","qwen3-coder-30b-a3b-instruct","qwen3-coder-480b-a35b-instruct","qwen3-coder-next","qwen3-next-80b-a3b-thinking","qwen3.5-122b-a10b","qwen3.5-397b-a17b"],siliconflow:["ByteDance-Seed/Seed-OSS-36B-Instruct","MiniMaxAI/MiniMax-M2.1","MiniMaxAI/MiniMax-M2.5","Qwen/QwQ-32B","Qwen/Qwen2.5-14B-Instruct","Qwen/Qwen2.5-32B-Instruct","Qwen/Qwen2.5-72B-Instruct","Qwen/Qwen2.5-72B-Instruct-128K","Qwen/Qwen2.5-7B-Instruct","Qwen/Qwen2.5-Coder-32B-Instruct","Qwen/Qwen2.5-VL-32B-Instruct","Qwen/Qwen2.5-VL-72B-Instruct","Qwen/Qwen2.5-VL-7B-Instruct","Qwen/Qwen3-14B","Qwen/Qwen3-235B-A22B","Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-30B-A3B-Thinking-2507","Qwen/Qwen3-32B","Qwen/Qwen3-8B","Qwen/Qwen3-Coder-30B-A3B-Instruct","Qwen/Qwen3-Coder-480B-A35B-Instruct","Qwen/Qwen3-Next-80B-A3B-Instruct","Qwen/Qwen3-Next-80B-A3B-Thinking","Qwen/Qwen3-Omni-30B-A3B-Captioner","Qwen/Qwen3-Omni-30B-A3B-Instruct","Qwen/Qwen3-Omni-30B-A3B-Thinking","Qwen/Qwen3-VL-235B-A22B-Instruct","Qwen/Qwen3-VL-235B-A22B-Thinking","Qwen/Qwen3-VL-30B-A3B-Instruct","Qwen/Qwen3-VL-30B-A3B-Thinking","Qwen/Qwen3-VL-32B-Instruct","Qwen/Qwen3-VL-32B-Thinking","Qwen/Qwen3-VL-8B-Instruct","Qwen/Qwen3-VL-8B-Thinking","THUDM/GLM-4-32B-0414","THUDM/GLM-4-9B-0414","THUDM/GLM-Z1-32B-0414","THUDM/GLM-Z1-9B-0414","baidu/ERNIE-4.5-300B-A47B","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-R1-Distill-Qwen-14B","deepseek-ai/DeepSeek-R1-Distill-Qwen-32B","deepseek-ai/DeepSeek-V3","deepseek-ai/DeepSeek-V3.1","deepseek-ai/DeepSeek-V3.1-Terminus","deepseek-ai/DeepSeek-V3.2","deepseek-ai/DeepSeek-V3.2-Exp","deepseek-ai/deepseek-v4-flash","deepseek-ai/deepseek-v4-pro","deepseek-ai/deepseek-vl2","inclusionAI/Ling-flash-2.0","inclusionAI/Ling-mini-2.0","inclusionAI/Ring-flash-2.0","meta-llama/Meta-Llama-3.1-8B-Instruct","moonshotai/Kimi-K2-Instruct","moonshotai/Kimi-K2-Instruct-0905","moonshotai/Kimi-K2-Thinking","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","nex-agi/DeepSeek-V3.1-Nex-N1","openai/gpt-oss-120b","openai/gpt-oss-20b","stepfun-ai/Step-3.5-Flash","tencent/Hunyuan-A13B-Instruct","tencent/Hunyuan-MT-7B","zai-org/GLM-4.5","zai-org/GLM-4.5-Air","zai-org/GLM-4.5V","zai-org/GLM-4.6","zai-org/GLM-4.6V","zai-org/GLM-4.7","zai-org/GLM-5","zai-org/GLM-5.1","zai-org/GLM-5V-Turbo"],vercel:["alibaba/qwen-3-14b","alibaba/qwen-3-235b","alibaba/qwen-3-30b","alibaba/qwen-3-32b","alibaba/qwen-3.6-max-preview","alibaba/qwen3-235b-a22b-thinking","alibaba/qwen3-coder","alibaba/qwen3-coder-30b-a3b","alibaba/qwen3-coder-next","alibaba/qwen3-coder-plus","alibaba/qwen3-embedding-0.6b","alibaba/qwen3-embedding-4b","alibaba/qwen3-embedding-8b","alibaba/qwen3-max","alibaba/qwen3-max-preview","alibaba/qwen3-max-thinking","alibaba/qwen3-next-80b-a3b-instruct","alibaba/qwen3-next-80b-a3b-thinking","alibaba/qwen3-vl-235b-a22b-instruct","alibaba/qwen3-vl-instruct","alibaba/qwen3-vl-thinking","alibaba/qwen3.5-flash","alibaba/qwen3.5-plus","alibaba/qwen3.6-27b","alibaba/qwen3.6-plus","amazon/nova-2-lite","amazon/nova-lite","amazon/nova-micro","amazon/nova-pro","amazon/titan-embed-text-v2","anthropic/claude-3-haiku","anthropic/claude-3-opus","anthropic/claude-3.5-haiku","anthropic/claude-3.5-sonnet","anthropic/claude-3.5-sonnet-20240620","anthropic/claude-3.7-sonnet","anthropic/claude-haiku-4.5","anthropic/claude-opus-4","anthropic/claude-opus-4.1","anthropic/claude-opus-4.5","anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.6","arcee-ai/trinity-large-preview","arcee-ai/trinity-large-thinking","arcee-ai/trinity-mini","bfl/flux-kontext-max","bfl/flux-kontext-pro","bfl/flux-pro-1.0-fill","bfl/flux-pro-1.1","bfl/flux-pro-1.1-ultra","bytedance/seed-1.6","bytedance/seed-1.8","cohere/command-a","cohere/embed-v4.0","deepseek/deepseek-r1","deepseek/deepseek-v3","deepseek/deepseek-v3.1","deepseek/deepseek-v3.1-terminus","deepseek/deepseek-v3.2","deepseek/deepseek-v3.2-exp","deepseek/deepseek-v3.2-thinking","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","google/gemini-2.0-flash","google/gemini-2.0-flash-lite","google/gemini-2.5-flash","google/gemini-2.5-flash-image","google/gemini-2.5-flash-image-preview","google/gemini-2.5-flash-lite","google/gemini-2.5-flash-lite-preview-09-2025","google/gemini-2.5-flash-preview-09-2025","google/gemini-2.5-pro","google/gemini-3-flash","google/gemini-3-pro-image","google/gemini-3-pro-preview","google/gemini-3.1-flash-image-preview","google/gemini-3.1-flash-lite","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-pro-preview","google/gemini-embedding-001","google/gemini-embedding-2","google/gemma-4-26b-a4b-it","google/gemma-4-31b-it","google/imagen-4.0-fast-generate-001","google/imagen-4.0-generate-001","google/imagen-4.0-ultra-generate-001","google/text-embedding-005","google/text-multilingual-embedding-002","inception/mercury-2","inception/mercury-coder-small","inception/mercury-edit-2","interfaze/interfaze-beta","kwaipilot/kat-coder-pro-v1","kwaipilot/kat-coder-pro-v2","meituan/longcat-flash-chat","meituan/longcat-flash-thinking","meituan/longcat-flash-thinking-2601","meta/llama-3.1-70b","meta/llama-3.1-8b","meta/llama-3.2-11b","meta/llama-3.2-1b","meta/llama-3.2-3b","meta/llama-3.2-90b","meta/llama-3.3-70b","meta/llama-4-maverick","meta/llama-4-scout","minimax/minimax-m2","minimax/minimax-m2.1","minimax/minimax-m2.1-lightning","minimax/minimax-m2.5","minimax/minimax-m2.5-highspeed","minimax/minimax-m2.7","minimax/minimax-m2.7-highspeed","mistral/codestral","mistral/codestral-embed","mistral/devstral-2","mistral/devstral-small","mistral/devstral-small-2","mistral/magistral-medium","mistral/magistral-small","mistral/ministral-14b","mistral/ministral-3b","mistral/ministral-8b","mistral/mistral-embed","mistral/mistral-large-3","mistral/mistral-medium","mistral/mistral-nemo","mistral/mistral-small","mistral/mixtral-8x22b-instruct","mistral/pixtral-12b","mistral/pixtral-large","moonshotai/kimi-k2-0905","moonshotai/kimi-k2-thinking","moonshotai/kimi-k2-thinking-turbo","moonshotai/kimi-k2-turbo","moonshotai/kimi-k2.5","moonshotai/kimi-k2.6","morph/morph-v3-fast","morph/morph-v3-large","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-nano-12b-v2-vl","nvidia/nemotron-nano-9b-v2","openai/codex-mini","openai/gpt-3.5-turbo","openai/gpt-3.5-turbo-instruct","openai/gpt-4-turbo","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-mini","openai/gpt-4o-mini-search-preview","openai/gpt-5","openai/gpt-5-chat","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.1-instant","openai/gpt-5.1-thinking","openai/gpt-5.2","openai/gpt-5.2-chat","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.3-chat","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.4-pro","openai/gpt-5.5","openai/gpt-5.5-pro","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/gpt-oss-safeguard-20b","openai/o1","openai/o3","openai/o3-deep-research","openai/o3-mini","openai/o3-pro","openai/o4-mini","openai/text-embedding-3-large","openai/text-embedding-3-small","openai/text-embedding-ada-002","perplexity/sonar","perplexity/sonar-pro","perplexity/sonar-reasoning","perplexity/sonar-reasoning-pro","prime-intellect/intellect-3","recraft/recraft-v2","recraft/recraft-v3","vercel/v0-1.0-md","vercel/v0-1.5-md","voyage/voyage-3-large","voyage/voyage-3.5","voyage/voyage-3.5-lite","voyage/voyage-4","voyage/voyage-4-large","voyage/voyage-4-lite","voyage/voyage-code-2","voyage/voyage-code-3","voyage/voyage-finance-2","voyage/voyage-law-2","xai/grok-2-vision","xai/grok-3","xai/grok-3-fast","xai/grok-3-mini","xai/grok-3-mini-fast","xai/grok-4","xai/grok-4-fast-non-reasoning","xai/grok-4-fast-reasoning","xai/grok-4.1-fast-non-reasoning","xai/grok-4.1-fast-reasoning","xai/grok-4.20-multi-agent","xai/grok-4.20-multi-agent-beta","xai/grok-4.20-non-reasoning","xai/grok-4.20-non-reasoning-beta","xai/grok-4.20-reasoning","xai/grok-4.20-reasoning-beta","xai/grok-4.3","xai/grok-code-fast-1","xai/grok-imagine-image","xai/grok-imagine-image-pro","xiaomi/mimo-v2-flash","xiaomi/mimo-v2-pro","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","zai/glm-4.5","zai/glm-4.5-air","zai/glm-4.5v","zai/glm-4.6","zai/glm-4.6v","zai/glm-4.6v-flash","zai/glm-4.7","zai/glm-4.7-flash","zai/glm-4.7-flashx","zai/glm-5","zai/glm-5-turbo","zai/glm-5.1","zai/glm-5v-turbo"],minimax:["MiniMax-M2","MiniMax-M2.1","MiniMax-M2.5","MiniMax-M2.5-highspeed","MiniMax-M2.7","MiniMax-M2.7-highspeed"],llmgateway:["auto","claude-3-5-sonnet-20241022","claude-3-7-sonnet","claude-3-7-sonnet-20250219","claude-3-opus","claude-haiku-4-5","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-7","claude-sonnet-4-20250514","claude-sonnet-4-5","claude-sonnet-4-5-20250929","claude-sonnet-4-6","codestral-2508","custom","deepseek-r1-0528","deepseek-v3.1","deepseek-v3.2","deepseek-v4-flash","deepseek-v4-pro","devstral-2512","devstral-small-2507","gemini-2.0-flash","gemini-2.0-flash-lite","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-pro","gemini-3-flash-preview","gemini-3.1-flash-lite","gemini-3.1-flash-lite-preview","gemini-3.1-pro-preview","gemini-pro-latest","gemma-2-27b-it-together","gemma-3-12b-it","gemma-3-1b-it","gemma-3-27b","gemma-3-4b-it","gemma-3n-e2b-it","gemma-3n-e4b-it","glm-4-32b-0414-128k","glm-4.5","glm-4.5-air","glm-4.5-airx","glm-4.5-flash","glm-4.5-x","glm-4.5v","glm-4.6","glm-4.6v","glm-4.6v-flash","glm-4.6v-flashx","glm-4.7","glm-4.7-flash","glm-4.7-flashx","glm-5","glm-5.1","gpt-3.5-turbo","gpt-4","gpt-4-turbo","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-4o","gpt-4o-mini","gpt-4o-mini-search-preview","gpt-4o-search-preview","gpt-5","gpt-5-chat-latest","gpt-5-mini","gpt-5-nano","gpt-5-pro","gpt-5.1","gpt-5.1-codex","gpt-5.1-codex-mini","gpt-5.2","gpt-5.2-chat-latest","gpt-5.2-codex","gpt-5.2-pro","gpt-5.3-chat-latest","gpt-5.3-codex","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.4-pro","gpt-5.5","gpt-5.5-pro","gpt-oss-120b","gpt-oss-20b","grok-3","grok-4","grok-4-0709","grok-4-1-fast","grok-4-1-fast-non-reasoning","grok-4-1-fast-reasoning","grok-4-20-beta-0309-non-reasoning","grok-4-20-beta-0309-reasoning","grok-4-3","grok-4-fast","grok-4-fast-non-reasoning","grok-4-fast-reasoning","grok-code-fast-1","hermes-2-pro-llama-3-8b","kimi-k2","kimi-k2-thinking","kimi-k2-thinking-turbo","kimi-k2.5","kimi-k2.6","llama-3-70b-instruct","llama-3-8b-instruct","llama-3.1-70b-instruct","llama-3.1-8b-instruct","llama-3.1-nemotron-ultra-253b","llama-3.2-11b-instruct","llama-3.2-3b-instruct","llama-3.3-70b-instruct","llama-4-maverick-17b-instruct","llama-4-scout","llama-4-scout-17b-instruct","mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2.5","mimo-v2.5-pro","minimax-m2","minimax-m2.1","minimax-m2.1-lightning","minimax-m2.5","minimax-m2.5-highspeed","minimax-m2.7","minimax-m2.7-highspeed","minimax-text-01","ministral-14b-2512","ministral-3b-2512","ministral-8b-2512","mistral-large-2512","mistral-large-latest","mistral-small-2506","o1","o3","o3-mini","o4-mini","pixtral-large-latest","qwen-coder-plus","qwen-flash","qwen-max","qwen-max-latest","qwen-omni-turbo","qwen-plus","qwen-plus-latest","qwen-turbo","qwen-vl-max","qwen-vl-plus","qwen2-5-vl-32b-instruct","qwen2-5-vl-72b-instruct","qwen25-coder-7b","qwen3-235b-a22b-fp8","qwen3-235b-a22b-instruct-2507","qwen3-235b-a22b-thinking-2507","qwen3-30b-a3b-fp8","qwen3-30b-a3b-instruct-2507","qwen3-30b-a3b-thinking-2507","qwen3-32b","qwen3-32b-fp8","qwen3-4b-fp8","qwen3-coder-30b-a3b-instruct","qwen3-coder-480b-a35b-instruct","qwen3-coder-flash","qwen3-coder-next","qwen3-coder-plus","qwen3-max","qwen3-max-2026-01-23","qwen3-next-80b-a3b-instruct","qwen3-next-80b-a3b-thinking","qwen3-vl-235b-a22b-instruct","qwen3-vl-235b-a22b-thinking","qwen3-vl-30b-a3b-instruct","qwen3-vl-30b-a3b-thinking","qwen3-vl-8b-instruct","qwen3-vl-flash","qwen3-vl-plus","qwen3.6-35b-a3b","qwen3.6-max-preview","qwen3.6-plus","qwen35-397b-a17b","qwq-plus","seed-1-6-250615","seed-1-6-250915","seed-1-6-flash-250715","seed-1-8-251228","sonar","sonar-pro","sonar-reasoning-pro"],"cloudflare-workers-ai":["@cf/google/gemma-4-26b-a4b-it","@cf/meta/llama-4-scout-17b-16e-instruct","@cf/moonshotai/kimi-k2.5","@cf/moonshotai/kimi-k2.6","@cf/nvidia/nemotron-3-120b-a12b","@cf/openai/gpt-oss-120b","@cf/openai/gpt-oss-20b","@cf/zai-org/glm-4.7-flash"],groq:["allam-2-7b","canopylabs/orpheus-arabic-saudi","canopylabs/orpheus-v1-english","groq/compound","groq/compound-mini","llama-3.1-8b-instant","llama-3.3-70b-versatile","meta-llama/llama-4-scout-17b-16e-instruct","meta-llama/llama-prompt-guard-2-22m","meta-llama/llama-prompt-guard-2-86m","moonshotai/kimi-k2-instruct-0905","openai/gpt-oss-120b","openai/gpt-oss-20b","openai/gpt-oss-safeguard-20b","qwen/qwen3-32b","whisper-large-v3","whisper-large-v3-turbo"],fastrouter:["anthropic/claude-opus-4.1","anthropic/claude-sonnet-4","deepseek-ai/deepseek-r1-distill-llama-70b","google/gemini-2.5-flash","google/gemini-2.5-pro","moonshotai/kimi-k2","openai/gpt-4.1","openai/gpt-5","openai/gpt-5-mini","openai/gpt-5-nano","openai/gpt-oss-120b","openai/gpt-oss-20b","qwen/qwen3-coder","x-ai/grok-4","z-ai/glm-5"],stackit:["Qwen/Qwen3-VL-235B-A22B-Instruct-FP8","Qwen/Qwen3-VL-Embedding-8B","cortecs/Llama-3.3-70B-Instruct-FP8-Dynamic","google/gemma-3-27b-it","intfloat/e5-mistral-7b-instruct","neuralmagic/Meta-Llama-3.1-8B-Instruct-FP8","neuralmagic/Mistral-Nemo-Instruct-2407-FP8","openai/gpt-oss-120b"],"tencent-coding-plan":["glm-5","hunyuan-2.0-instruct","hunyuan-2.0-thinking","hunyuan-t1","hunyuan-turbos","kimi-k2.5","minimax-m2.5","tc-code-latest"],"privatemode-ai":["gemma-3-27b","gpt-oss-120b","qwen3-coder-30b-a3b","qwen3-embedding-4b","whisper-large-v3"],google:["gemini-1.5-flash","gemini-1.5-flash-8b","gemini-1.5-pro","gemini-2.0-flash","gemini-2.0-flash-lite","gemini-2.5-flash","gemini-2.5-flash-image","gemini-2.5-flash-image-preview","gemini-2.5-flash-lite","gemini-2.5-flash-lite-preview-06-17","gemini-2.5-flash-lite-preview-09-2025","gemini-2.5-flash-preview-04-17","gemini-2.5-flash-preview-05-20","gemini-2.5-flash-preview-09-2025","gemini-2.5-flash-preview-tts","gemini-2.5-pro","gemini-2.5-pro-preview-05-06","gemini-2.5-pro-preview-06-05","gemini-2.5-pro-preview-tts","gemini-3-flash-preview","gemini-3-pro-preview","gemini-3.1-flash-image-preview","gemini-3.1-flash-lite","gemini-3.1-flash-lite-preview","gemini-3.1-pro-preview","gemini-3.1-pro-preview-customtools","gemini-embedding-001","gemini-flash-latest","gemini-flash-lite-latest","gemini-live-2.5-flash","gemini-live-2.5-flash-preview-native-audio","gemma-3-12b-it","gemma-3-27b-it","gemma-3-4b-it","gemma-3n-e2b-it","gemma-3n-e4b-it","gemma-4-26b-a4b-it","gemma-4-31b-it"],drun:["public/deepseek-r1","public/deepseek-v3","public/minimax-m25"],moonshotai:["kimi-k2-0711-preview","kimi-k2-0905-preview","kimi-k2-thinking","kimi-k2-thinking-turbo","kimi-k2-turbo-preview","kimi-k2.5","kimi-k2.6"],berget:["google/gemma-4-31B-it","meta-llama/Llama-3.3-70B-Instruct","mistralai/Mistral-Medium-3.5-128B","mistralai/Mistral-Small-3.2-24B-Instruct-2506","openai/gpt-oss-120b","zai-org/GLM-4.7"],"github-models":["ai21-labs/ai21-jamba-1.5-large","ai21-labs/ai21-jamba-1.5-mini","cohere/cohere-command-a","cohere/cohere-command-r","cohere/cohere-command-r-08-2024","cohere/cohere-command-r-plus","cohere/cohere-command-r-plus-08-2024","core42/jais-30b-chat","deepseek/deepseek-r1","deepseek/deepseek-r1-0528","deepseek/deepseek-v3-0324","meta/llama-3.2-11b-vision-instruct","meta/llama-3.2-90b-vision-instruct","meta/llama-3.3-70b-instruct","meta/llama-4-maverick-17b-128e-instruct-fp8","meta/llama-4-scout-17b-16e-instruct","meta/meta-llama-3-70b-instruct","meta/meta-llama-3-8b-instruct","meta/meta-llama-3.1-405b-instruct","meta/meta-llama-3.1-70b-instruct","meta/meta-llama-3.1-8b-instruct","microsoft/mai-ds-r1","microsoft/phi-3-medium-128k-instruct","microsoft/phi-3-medium-4k-instruct","microsoft/phi-3-mini-128k-instruct","microsoft/phi-3-mini-4k-instruct","microsoft/phi-3-small-128k-instruct","microsoft/phi-3-small-8k-instruct","microsoft/phi-3.5-mini-instruct","microsoft/phi-3.5-moe-instruct","microsoft/phi-3.5-vision-instruct","microsoft/phi-4","microsoft/phi-4-mini-instruct","microsoft/phi-4-mini-reasoning","microsoft/phi-4-multimodal-instruct","microsoft/phi-4-reasoning","mistral-ai/codestral-2501","mistral-ai/ministral-3b","mistral-ai/mistral-large-2411","mistral-ai/mistral-medium-2505","mistral-ai/mistral-nemo","mistral-ai/mistral-small-2503","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-mini","openai/o1","openai/o1-mini","openai/o1-preview","openai/o3","openai/o3-mini","openai/o4-mini","xai/grok-3","xai/grok-3-mini"],neuralwatt:["MiniMaxAI/MiniMax-M2.5","Qwen/Qwen3.5-397B-A17B-FP8","Qwen/Qwen3.6-35B-A3B","glm-5-fast","glm-5.1-fast","kimi-k2.5-fast","kimi-k2.6-fast","mistralai/Devstral-Small-2-24B-Instruct-2512","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","openai/gpt-oss-20b","qwen3.5-397b-fast","qwen3.6-35b-fast","zai-org/GLM-5.1-FP8"],sarvam:["sarvam-105b","sarvam-30b"],togetherai:["MiniMaxAI/MiniMax-M2.5","MiniMaxAI/MiniMax-M2.7","Qwen/Qwen3-235B-A22B-Instruct-2507-tput","Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8","Qwen/Qwen3-Coder-Next-FP8","Qwen/Qwen3.5-397B-A17B","Qwen/Qwen3.6-Plus","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-V3","deepseek-ai/DeepSeek-V3-1","deepseek-ai/DeepSeek-V4-Pro","essentialai/Rnj-1-Instruct","google/gemma-4-31B-it","meta-llama/Llama-3.3-70B-Instruct-Turbo","moonshotai/Kimi-K2.5","moonshotai/Kimi-K2.6","openai/gpt-oss-120b","zai-org/GLM-5.1"],"qihang-ai":["claude-haiku-4-5-20251001","claude-opus-4-5-20251101","claude-sonnet-4-5-20250929","gemini-2.5-flash","gemini-3-flash-preview","gemini-3-pro-preview","gpt-5-mini","gpt-5.2","gpt-5.2-codex"],"tencent-tokenhub":["hy3-preview"],anthropic:["claude-3-5-haiku-20241022","claude-3-5-haiku-latest","claude-3-5-sonnet-20240620","claude-3-5-sonnet-20241022","claude-3-7-sonnet-20250219","claude-3-haiku-20240307","claude-3-opus-20240229","claude-3-sonnet-20240229","claude-haiku-4-5","claude-haiku-4-5-20251001","claude-opus-4-0","claude-opus-4-1","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-7","claude-sonnet-4-0","claude-sonnet-4-20250514","claude-sonnet-4-5","claude-sonnet-4-5-20250929","claude-sonnet-4-6"],modelscope:["Qwen/Qwen3-235B-A22B-Instruct-2507","Qwen/Qwen3-235B-A22B-Thinking-2507","Qwen/Qwen3-30B-A3B-Instruct-2507","Qwen/Qwen3-30B-A3B-Thinking-2507","Qwen/Qwen3-Coder-30B-A3B-Instruct","ZhipuAI/GLM-4.5","ZhipuAI/GLM-4.6"],"hpc-ai":["minimax/minimax-m2.5","moonshotai/kimi-k2.5","zai-org/glm-5.1"],xiaomi:["mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2.5","mimo-v2.5-pro"],clarifai:["arcee_ai/AFM/models/trinity-mini","clarifai/main/models/mm-poly-8b","deepseek-ai/deepseek-ocr/models/DeepSeek-OCR","minimaxai/chat-completion/models/MiniMax-M2_5-high-throughput","mistralai/completion/models/Ministral-3-14B-Reasoning-2512","mistralai/completion/models/Ministral-3-3B-Reasoning-2512","moonshotai/chat-completion/models/Kimi-K2_6","openai/chat-completion/models/gpt-oss-120b-high-throughput","openai/chat-completion/models/gpt-oss-20b","qwen/qwenCoder/models/Qwen3-Coder-30B-A3B-Instruct","qwen/qwenLM/models/Qwen3-30B-A3B-Instruct-2507","qwen/qwenLM/models/Qwen3-30B-A3B-Thinking-2507"],"minimax-cn":["MiniMax-M2","MiniMax-M2.1","MiniMax-M2.5","MiniMax-M2.5-highspeed","MiniMax-M2.7","MiniMax-M2.7-highspeed"],"regolo-ai":["gpt-oss-120b","gpt-oss-20b","llama-3.1-8b-instruct","llama-3.3-70b-instruct","minimax-m2.5","mistral-small-4-119b","mistral-small3.2","qwen-image","qwen3-coder-next","qwen3-embedding-8b","qwen3-reranker-4b","qwen3.5-122b","qwen3.5-9b"],"xiaomi-token-plan-ams":["mimo-v2-flash","mimo-v2-omni","mimo-v2-pro","mimo-v2-tts","mimo-v2.5","mimo-v2.5-pro"],zhipuai:["glm-4.5","glm-4.5-air","glm-4.5-flash","glm-4.5v","glm-4.6","glm-4.6v","glm-4.7","glm-4.7-flash","glm-4.7-flashx","glm-5","glm-5.1","glm-5v-turbo"],nova:["nova-2-lite-v1","nova-2-pro-v1"],"atomic-chat":["Meta-Llama-3_1-8B-Instruct-GGUF","Qwen3_5-9B-MLX-4bit","Qwen3_5-9B-Q4_K_M","gemma-4-E4B-it-IQ4_XS","gemma-4-E4B-it-MLX-4bit"],netlify:["anthropic/claude-haiku-4-5","anthropic/claude-haiku-4-5-20251001","anthropic/claude-opus-4-1-20250805","anthropic/claude-opus-4-20250514","anthropic/claude-opus-4-5","anthropic/claude-opus-4-5-20251101","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-sonnet-4-0","anthropic/claude-sonnet-4-20250514","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-5-20250929","anthropic/claude-sonnet-4-6","gemini/gemini-2.0-flash","gemini/gemini-2.0-flash-lite","gemini/gemini-2.5-flash","gemini/gemini-2.5-flash-image","gemini/gemini-2.5-flash-lite","gemini/gemini-2.5-pro","gemini/gemini-3-flash-preview","gemini/gemini-3-pro-image-preview","gemini/gemini-3.1-flash-image-preview","gemini/gemini-3.1-flash-lite","gemini/gemini-3.1-flash-lite-preview","gemini/gemini-3.1-pro-preview","gemini/gemini-3.1-pro-preview-customtools","gemini/gemini-flash-latest","gemini/gemini-flash-lite-latest","openai/chat-latest","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-4o","openai/gpt-4o-mini","openai/gpt-5","openai/gpt-5-2025-08-07","openai/gpt-5-codex","openai/gpt-5-mini","openai/gpt-5-mini-2025-08-07","openai/gpt-5-nano","openai/gpt-5-pro","openai/gpt-5.1","openai/gpt-5.1-2025-11-13","openai/gpt-5.1-codex","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-mini","openai/gpt-5.2","openai/gpt-5.2-2025-12-11","openai/gpt-5.2-codex","openai/gpt-5.2-pro","openai/gpt-5.2-pro-2025-12-11","openai/gpt-5.3-chat-latest","openai/gpt-5.3-codex","openai/gpt-5.4","openai/gpt-5.4-2026-03-05","openai/gpt-5.4-mini","openai/gpt-5.4-mini-2026-03-17","openai/gpt-5.4-nano","openai/gpt-5.4-nano-2026-03-17","openai/gpt-5.4-pro","openai/gpt-5.4-pro-2026-03-05","openai/gpt-5.5","openai/gpt-5.5-2026-04-23","openai/gpt-5.5-pro","openai/gpt-5.5-pro-2026-04-23","openai/o3","openai/o3-mini","openai/o4-mini"]},version:"1.0.0"};_b0=new Proxy({},{get($,Y){return eZ.getInstance().getProviders()[Y]},ownKeys(){let Y=eZ.getInstance().getProviders();return Object.keys(Y)},has($,Y){let G=eZ.getInstance().getProviders();return Y in G},getOwnPropertyDescriptor($,Y){let G=eZ.getInstance().getProviders();if(Y in G)return{enumerable:!0,configurable:!0};return}}),f4$=new Proxy({},{get($,Y){return eZ.getInstance().getModels()[Y]},ownKeys(){let Y=eZ.getInstance().getModels();return Object.keys(Y)},has($,Y){let G=eZ.getInstance().getModels();return Y in G},getOwnPropertyDescriptor($,Y){let G=eZ.getInstance().getModels();if(Y in G)return{enumerable:!0,configurable:!0};return}}),PY4=process.env.MASTRA_DEV==="true"||process.env.MASTRA_DEV==="1",yn8=!qb0()&&(process.env.MASTRA_AUTO_REFRESH_PROVIDERS==="true"||process.env.MASTRA_AUTO_REFRESH_PROVIDERS!=="false"&&PY4);if(yn8)eZ.getInstance({useDynamicLoading:PY4}).startAutoRefresh()});import{randomUUID as wY4}from"crypto";function jb0($){if(!$)return{};return{inputTokens:$.promptTokens,outputTokens:$.completionTokens}}function Tb0($){return new ReadableStream({start(Y){Y.enqueue({type:"stream-start",warnings:$.warnings}),Y.enqueue({type:"response-metadata",id:$.response?.id,modelId:$.response?.modelId,timestamp:$.response?.timestamp});let X={};for(let G of $.content)if(G.type==="tool-call"){let J=G;X[J.toolCallId]={providerExecuted:J.providerExecuted},Y.enqueue({type:"tool-input-start",id:J.toolCallId,toolName:J.toolName,providerExecuted:J.providerExecuted,dynamic:J.dynamic,providerMetadata:J.providerMetadata}),Y.enqueue({type:"tool-input-delta",id:J.toolCallId,delta:J.input,providerMetadata:J.providerMetadata}),Y.enqueue({type:"tool-input-end",id:J.toolCallId,providerMetadata:J.providerMetadata}),Y.enqueue(J)}else if(G.type==="tool-result"){let J=G,Q=X[J.toolCallId];if(Q?.providerExecuted)Y.enqueue({...J,providerExecuted:Q.providerExecuted});else Y.enqueue(G)}else if(G.type==="text"){let J=G,Q=`msg_${wY4()}`;Y.enqueue({type:"text-start",id:Q,providerMetadata:J.providerMetadata}),Y.enqueue({type:"text-delta",id:Q,delta:J.text}),Y.enqueue({type:"text-end",id:Q})}else if(G.type==="reasoning"){let J=`reasoning_${wY4()}`,Q=G;Y.enqueue({type:"reasoning-start",id:J,providerMetadata:Q.providerMetadata}),Y.enqueue({type:"reasoning-delta",id:J,delta:Q.text,providerMetadata:Q.providerMetadata}),Y.enqueue({type:"reasoning-end",id:J,providerMetadata:Q.providerMetadata})}else if(G.type==="file"){let J=G;Y.enqueue({type:"file",mediaType:J.mediaType,data:J.data})}else if(G.type==="source"){let J=G;if(J.sourceType==="url")Y.enqueue({type:"source",id:J.id,sourceType:"url",url:J.url,title:J.title,providerMetadata:J.providerMetadata});else Y.enqueue({type:"source",id:J.id,sourceType:"document",mediaType:J.mediaType,filename:J.filename,title:J.title,providerMetadata:J.providerMetadata})}Y.enqueue({type:"finish",finishReason:$.finishReason,usage:$.usage,providerMetadata:$.providerMetadata}),Y.close()}})}function _Y4($){if(!$.tools?.length)return $;let Y=!1,X=$.tools.map((J)=>{if(J.type!=="function"||!("strict"in J))return J;if(J.strict===!0)Y=!0;let{strict:Q,...W}=J;return W}),G={...$,tools:X};if(Y){let J=$.providerOptions?.openai??{};if(J.strictJsonSchema==null)G={...G,providerOptions:{...$.providerOptions,openai:{...J,strictJsonSchema:!0}}}}return G}var jY4,UT=class{specificationVersion="v2";provider;modelId;gatewayId;supportedUrls;#$;constructor($){this.#$=$,this.provider=this.#$.provider,this.modelId=this.#$.modelId,this.gatewayId=$.gatewayId,this.supportedUrls=this.#$.supportedUrls}async doGenerate($){let Y=await this.#$.doGenerate(_Y4($));return{...Y,request:Y.request,response:Y.response,stream:Tb0(Y)}}async doStream($){return await this.#$.doStream(_Y4($))}serializeForSpan(){return{specificationVersion:this.specificationVersion,modelId:this.modelId,provider:this.provider,gatewayId:this.gatewayId}}};var Ib0=V0(()=>{v3();$f();VO();n_();TO();p2();ck0();OW();x80();jY4=class extends u8{#$;#Y;#X;constructor({model:$,mastra:Y,options:X}){super({name:"aisdk"});if(this.#$=$,this.#X=X,Y){if(this.#Y=Y,Y.getLogger())this.__setLogger(this.#Y.getLogger())}}__registerPrimitives($){if($.logger)this.__setLogger($.logger)}__registerMastra($){this.#Y=$}getProvider(){return this.#$.provider}getModelId(){return this.#$.modelId}getModel(){return this.#$}_applySchemaCompat($){let Y=this.#$,X=[];if(Y){let G={modelId:Y.modelId,supportsStructuredOutputs:Y.supportsStructuredOutputs??!1,provider:Y.provider};X.push(new C80(G),new Ig(G),new k80(G),new kj(G),new S80(G),new v80(G))}return GE({schema:$,compatLayers:X,mode:"aiSdkSchema"})}async __text({runId:$,messages:Y,maxSteps:X=5,tools:G={},temperature:J,toolChoice:Q="auto",onStepFinish:W,experimental_output:K,threadId:Z,resourceId:H,requestContext:z,...V}){let F=this.#$,L=e1(V);this.logger.debug("Generating text",{runId:$,messages:Y,maxSteps:X,threadId:Z,resourceId:H,tools:Object.keys(G)});let N=void 0;if(K)if(this.logger.debug("Using experimental output",{runId:$}),y80(K)){if(N=K,fL(N))N=eh(N).type;let B=Q4(N),O=$6(B);N=BX(O)}else N=BX(K);if(G&&Object.keys(G).length>0){for(let B of Object.values(G))if(B.parameters)if("validate"in B.parameters)B.parameters=B.parameters;else if(z5(B.parameters))B.parameters=BX($6(B.parameters));else B.parameters=BX(B.parameters)}let D=L.tracingContext.currentSpan?.createChildSpan({name:`llm: '${F.modelId}'`,type:"model_generation",input:{messages:Y,schema:N},attributes:{model:F.modelId,provider:F.provider,parameters:{temperature:J,maxOutputTokens:V.maxTokens,topP:V.topP,frequencyPenalty:V.frequencyPenalty,presencePenalty:V.presencePenalty},streaming:!1},metadata:{runId:$,threadId:Z,resourceId:H},tracingPolicy:this.#X?.tracingPolicy,requestContext:z}),A={...V,messages:Y,model:F,temperature:J,tools:{...G},toolChoice:Q,maxSteps:X,onStepFinish:async(B)=>{try{await W?.({...B,runId:$})}catch(E){throw new G0({id:"LLM_TEXT_ON_STEP_FINISH_CALLBACK_EXECUTION_FAILED",domain:"LLM",category:"USER",details:{modelId:F.modelId,modelProvider:F.provider,runId:$??"unknown",threadId:Z??"unknown",resourceId:H??"unknown",finishReason:B?.finishReason,toolCalls:B?.toolCalls?JSON.stringify(B.toolCalls):"",toolResults:B?.toolResults?JSON.stringify(B.toolResults):"",usage:B?.usage?JSON.stringify(B.usage):""}},E)}this.logger.debug("Text step change",{text:B?.text,toolCalls:B?.toolCalls,toolResults:B?.toolResults,finishReason:B?.finishReason,usage:B?.usage,runId:$});let O=parseInt(B?.response?.headers?.["x-ratelimit-remaining-tokens"]??"",10);if(!isNaN(O)&&O>0&&O<2000)this.logger.warn("Rate limit approaching, waiting 10 seconds",{runId:$}),await vj(1e4)},experimental_output:N?g60.object({schema:N}):void 0};try{let B=await DQ({span:D,fn:()=>Ft1(A)});if(N&&B.finishReason==="stop")B.object=B.experimental_output;return D?.end({output:{text:B.text,object:B.object,reasoning:B.reasoningDetails,reasoningText:B.reasoning,files:B.files,sources:B.sources,toolCalls:B.toolCalls,warnings:B.warnings},attributes:{finishReason:B.finishReason,responseId:B.response?.id,responseModel:B.response?.modelId,usage:jb0(B.usage)}}),B}catch(B){let O=new G0({id:"LLM_GENERATE_TEXT_AI_SDK_EXECUTION_FAILED",domain:"LLM",category:"THIRD_PARTY",details:{modelId:F.modelId,modelProvider:F.provider,runId:$??"unknown",threadId:Z??"unknown",resourceId:H??"unknown"}},B);throw this.logger.error("Generate text failed",{error:O,runId:$,threadId:Z,resourceId:H,modelId:F.modelId,modelProvider:F.provider}),D?.error({error:O}),O}}async __textObject({messages:$,structuredOutput:Y,runId:X,threadId:G,resourceId:J,requestContext:Q,...W}){let K=this.#$,Z=e1(W);this.logger.debug("Generating text object",{runId:X});let H=Z.tracingContext.currentSpan?.createChildSpan({name:`llm: '${K.modelId}'`,type:"model_generation",input:{messages:$},attributes:{model:K.modelId,provider:K.provider,parameters:{temperature:W.temperature,maxOutputTokens:W.maxTokens,topP:W.topP,frequencyPenalty:W.frequencyPenalty,presencePenalty:W.presencePenalty},streaming:!1},metadata:{runId:X,threadId:G,resourceId:J},tracingPolicy:this.#X?.tracingPolicy,requestContext:Q});try{let z="object";if(fL(Y)){z="array";let L=eh(Y);if("element"in L)Y=L.element;else Y=L.type}let V=this._applySchemaCompat(Y);H?.update({input:{messages:$,schema:V}});let F={...W,messages:$,model:K,output:z,schema:V};try{let L=await po1(F);return H?.end({output:{object:L.object,warnings:L.warnings},attributes:{finishReason:L.finishReason,responseId:L.response?.id,responseModel:L.response?.modelId,usage:jb0(L.usage)}}),L}catch(L){let N=new G0({id:"LLM_GENERATE_OBJECT_AI_SDK_EXECUTION_FAILED",domain:"LLM",category:"THIRD_PARTY",details:{modelId:K.modelId,modelProvider:K.provider,runId:X??"unknown",threadId:G??"unknown",resourceId:J??"unknown"}},L);throw this.logger.error("Generate object failed",{error:N,runId:X,threadId:G,resourceId:J,modelId:K.modelId,modelProvider:K.provider}),H?.error({error:N}),N}}catch(z){if(z instanceof G0)throw z;let V=new G0({id:"LLM_GENERATE_OBJECT_AI_SDK_SCHEMA_CONVERSION_FAILED",domain:"LLM",category:"USER",details:{modelId:K.modelId,modelProvider:K.provider,runId:X??"unknown",threadId:G??"unknown",resourceId:J??"unknown"}},z);throw this.logger.error("Generate object schema conversion failed",{error:V,runId:X,threadId:G,resourceId:J,modelId:K.modelId,modelProvider:K.provider}),H?.error({error:V}),V}}__stream({messages:$,onStepFinish:Y,onFinish:X,maxSteps:G=5,tools:J={},runId:Q,temperature:W,toolChoice:K="auto",experimental_output:Z,threadId:H,resourceId:z,requestContext:V,...F}){let L=this.#$,N=e1(F),D;if(Z)if(typeof Z.parse==="function"){if(D=Z,fL(D))D=eh(D).type}else D=BX(Z);let A=N.tracingContext.currentSpan?.createChildSpan({name:`llm: '${L.modelId}'`,type:"model_generation",input:{messages:$},attributes:{model:L.modelId,provider:L.provider,parameters:{temperature:W,maxOutputTokens:F.maxTokens,topP:F.topP,frequencyPenalty:F.frequencyPenalty,presencePenalty:F.presencePenalty},streaming:!0},metadata:{runId:Q,threadId:H,resourceId:z},tracingPolicy:this.#X?.tracingPolicy,requestContext:V});if(A)jO({span:A,fn:()=>this.logger.debug("Streaming text",{runId:Q,threadId:H,resourceId:z,messages:$,maxSteps:G,tools:Object.keys(J||{})})});if(J&&Object.keys(J).length>0){for(let O of Object.values(J))if(O.parameters)if("validate"in O.parameters)O.parameters=O.parameters;else if(z5(O.parameters))O.parameters=BX($6(O.parameters));else O.parameters=BX(O.parameters)}let B={model:L,temperature:W,tools:{...J},maxSteps:G,toolChoice:K,onStepFinish:async(O)=>{try{await Y?.({...O,runId:Q})}catch(M){let R=new G0({id:"LLM_STREAM_ON_STEP_FINISH_CALLBACK_EXECUTION_FAILED",domain:"LLM",category:"USER",details:{modelId:L.modelId,modelProvider:L.provider,runId:Q??"unknown",threadId:H??"unknown",resourceId:z??"unknown",finishReason:O?.finishReason,toolCalls:O?.toolCalls?JSON.stringify(O.toolCalls):"",toolResults:O?.toolResults?JSON.stringify(O.toolResults):"",usage:O?.usage?JSON.stringify(O.usage):""}},M);throw this.logger.trackException(R),A?.error({error:R}),R}this.logger.debug("Stream step change",{text:O?.text,toolCalls:O?.toolCalls,toolResults:O?.toolResults,finishReason:O?.finishReason,usage:O?.usage,runId:Q});let E=parseInt(O?.response?.headers?.["x-ratelimit-remaining-tokens"]??"",10);if(!isNaN(E)&&E>0&&E<2000)this.logger.warn("Rate limit approaching, waiting 10 seconds",{runId:Q}),await vj(1e4)},onFinish:async(O)=>{A?.end({output:{text:O?.text,reasoning:O?.reasoningDetails,reasoningText:O?.reasoning,files:O?.files,sources:O?.sources,toolCalls:O?.toolCalls,warnings:O?.warnings},attributes:{finishReason:O?.finishReason,usage:jb0(O?.usage)}});try{await X?.({...O,runId:Q})}catch(E){let M=new G0({id:"LLM_STREAM_ON_FINISH_CALLBACK_EXECUTION_FAILED",domain:"LLM",category:"USER",details:{modelId:L.modelId,modelProvider:L.provider,runId:Q??"unknown",threadId:H??"unknown",resourceId:z??"unknown",finishReason:O?.finishReason,toolCalls:O?.toolCalls?JSON.stringify(O.toolCalls):"",toolResults:O?.toolResults?JSON.stringify(O.toolResults):"",usage:O?.usage?JSON.stringify(O.usage):""}},E);throw A?.error({error:M}),this.logger.trackException(M),M}this.logger.debug("Stream finished",{text:O?.text,toolCalls:O?.toolCalls,toolResults:O?.toolResults,finishReason:O?.finishReason,usage:O?.usage,runId:Q,threadId:H,resourceId:z})},onError:({error:O})=>{let E=new G0({id:"LLM_STREAM_TEXT_AI_SDK_STREAMING_ERROR",domain:"LLM",category:"THIRD_PARTY",details:{modelId:L.modelId,modelProvider:L.provider,runId:Q??"unknown",threadId:H??"unknown",resourceId:z??"unknown"}},O);this.logger.error("Stream text error",{error:E,runId:Q,threadId:H,resourceId:z,modelId:L.modelId,modelProvider:L.provider}),A?.error({error:E})},...F,messages:$,experimental_output:D?g60.object({schema:D}):void 0};try{return jO({span:A,fn:()=>At1(B)})}catch(O){let E=new G0({id:"LLM_STREAM_TEXT_AI_SDK_EXECUTION_FAILED",domain:"LLM",category:"THIRD_PARTY",details:{modelId:L.modelId,modelProvider:L.provider,runId:Q??"unknown",threadId:H??"unknown",resourceId:z??"unknown"}},O);throw this.logger.error("Stream text failed",{error:E,runId:Q,threadId:H,resourceId:z,modelId:L.modelId,modelProvider:L.provider}),A?.error({error:E}),E}}__streamObject({messages:$,runId:Y,requestContext:X,threadId:G,resourceId:J,onFinish:Q,structuredOutput:W,...K}){let Z=this.#$,H=e1(K);this.logger.debug("Streaming structured output",{runId:Y,messages:$});let z=H.tracingContext.currentSpan?.createChildSpan({name:`llm: '${Z.modelId}'`,type:"model_generation",input:{messages:$},attributes:{model:Z.modelId,provider:Z.provider,parameters:{temperature:K.temperature,maxOutputTokens:K.maxTokens,topP:K.topP,frequencyPenalty:K.frequencyPenalty,presencePenalty:K.presencePenalty},streaming:!0},metadata:{runId:Y,threadId:G,resourceId:J},tracingPolicy:this.#X?.tracingPolicy,requestContext:X});try{let V="object";if(fL(W))V="array",W=eh(W).type;let F=this._applySchemaCompat(W);z?.update({input:{messages:$,schema:F}});let L={...K,model:Z,onFinish:async(N)=>{z?.end({output:{text:N?.text,object:N?.object,reasoning:N?.reasoningDetails,reasoningText:N?.reasoning,files:N?.files,sources:N?.sources,warnings:N?.warnings},attributes:{finishReason:N?.finishReason,usage:N?.usage}});try{await Q?.({...N,runId:Y})}catch(D){let A=new G0({id:"LLM_STREAM_OBJECT_ON_FINISH_CALLBACK_EXECUTION_FAILED",domain:"LLM",category:"USER",details:{modelId:Z.modelId,modelProvider:Z.provider,runId:Y??"unknown",threadId:G??"unknown",resourceId:J??"unknown",toolCalls:"",toolResults:"",finishReason:"",usage:N?.usage?JSON.stringify(N.usage):""}},D);throw this.logger.trackException(A),z?.error({error:A}),A}this.logger.debug("Object stream finished",{usage:N?.usage,runId:Y,threadId:G,resourceId:J})},onError:({error:N})=>{let D=new G0({id:"LLM_STREAM_OBJECT_AI_SDK_STREAMING_ERROR",domain:"LLM",category:"THIRD_PARTY",details:{modelId:Z.modelId,modelProvider:Z.provider,runId:Y??"unknown",threadId:G??"unknown",resourceId:J??"unknown"}},N);this.logger.error("Stream object error",{error:D,runId:Y,threadId:G,resourceId:J,modelId:Z.modelId,modelProvider:Z.provider}),z?.error({error:D})},messages:$,output:V,schema:F};try{return lo1(L)}catch(N){let D=new G0({id:"LLM_STREAM_OBJECT_AI_SDK_EXECUTION_FAILED",domain:"LLM",category:"THIRD_PARTY",details:{modelId:Z.modelId,modelProvider:Z.provider,runId:Y??"unknown",threadId:G??"unknown",resourceId:J??"unknown"}},N);throw this.logger.error("Stream object failed",{error:D,runId:Y,threadId:G,resourceId:J,modelId:Z.modelId,modelProvider:Z.provider}),z?.error({error:D}),D}}catch(V){if(V instanceof G0)throw z?.error({error:V}),V;let F=new G0({id:"LLM_STREAM_OBJECT_AI_SDK_SCHEMA_CONVERSION_FAILED",domain:"LLM",category:"USER",details:{modelId:Z.modelId,modelProvider:Z.provider,runId:Y??"unknown",threadId:G??"unknown",resourceId:J??"unknown"}},V);throw this.logger.error("Stream object schema conversion failed",{error:F,runId:Y,threadId:G,resourceId:J,modelId:Z.modelId,modelProvider:Z.provider}),z?.error({error:F}),F}}convertToMessages($){if(Array.isArray($))return $.map((Y)=>{if(typeof Y==="string")return{role:"user",content:Y};return Y});return[{role:"user",content:$}]}async generate($,Y){let X=this.convertToMessages($),{output:G,...J}=Y??{};if(!G)return await this.__text({messages:X,...J});return await this.__textObject({messages:X,structuredOutput:G,...J})}stream($,Y){let X=this.convertToMessages($),{output:G,...J}=Y??{};if(!G){let{maxSteps:K=5,onFinish:Z,...H}=J;return this.__stream({messages:X,maxSteps:K,onFinish:Z,...H})}let{onFinish:Q,...W}=J;return this.__streamObject({messages:X,structuredOutput:G,onFinish:Q,...W})}}});import{createHash as bn8}from"crypto";import Cb0 from"ws";function V50($,Y){if(!Y)return;Object.defineProperty($,GX4,{configurable:!0,value:Y})}function bb0($){return $?.[GX4]}function TY4($){if(!$.tools?.length)return $;let Y=$.tools.map((X)=>{if(X.type==="provider-defined")return{...X,type:"provider"};return X});return{...$,tools:Y}}function JX4($){let Y=$.startsWith("o3")||$.startsWith("o4-mini")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-chat"),X=$.startsWith("gpt-4")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-nano")&&!$.startsWith("gpt-5-chat")&&!$.startsWith("gpt-5.4-nano")||$.startsWith("o3")||$.startsWith("o4-mini"),G=!($.startsWith("gpt-3")||$.startsWith("gpt-4")||$.startsWith("chatgpt-4o")||$.startsWith("gpt-5-chat")),J=$.startsWith("gpt-5.1")||$.startsWith("gpt-5.2")||$.startsWith("gpt-5.3")||$.startsWith("gpt-5.4");return{supportsFlexProcessing:Y,supportsPriorityProcessing:X,isReasoningModel:G,systemMessageMode:G?"developer":"system",supportsNonReasoningParameters:J}}function hn8({prompt:$,systemMessageMode:Y="system"}){let X=[],G=[];for(let{role:J,content:Q}of $)switch(J){case"system":{switch(Y){case"system":{X.push({role:"system",content:Q});break}case"developer":{X.push({role:"developer",content:Q});break}case"remove":{G.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Y}`)}break}case"user":{if(Q.length===1&&Q[0].type==="text"){X.push({role:"user",content:Q[0].text});break}X.push({role:"user",content:Q.map((W,K)=>{var Z,H,z;switch(W.type){case"text":return{type:"text",text:W.text};case"file":if(W.mediaType.startsWith("image/")){let V=W.mediaType==="image/*"?"image/jpeg":W.mediaType;return{type:"image_url",image_url:{url:W.data instanceof URL?W.data.toString():`data:${V};base64,${RX(W.data)}`,detail:(H=(Z=W.providerOptions)==null?void 0:Z.openai)==null?void 0:H.imageDetail}}}else if(W.mediaType.startsWith("audio/")){if(W.data instanceof URL)throw new _9({functionality:"audio file parts with URLs"});switch(W.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:RX(W.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:RX(W.data),format:"mp3"}};default:throw new _9({functionality:`audio content parts with media type ${W.mediaType}`})}}else if(W.mediaType==="application/pdf"){if(W.data instanceof URL)throw new _9({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof W.data==="string"&&W.data.startsWith("file-")?{file_id:W.data}:{filename:(z=W.filename)!=null?z:`part-${K}.pdf`,file_data:`data:application/pdf;base64,${RX(W.data)}`}}}else throw new _9({functionality:`file part media type ${W.mediaType}`})}})});break}case"assistant":{let W="",K=[];for(let Z of Q)switch(Z.type){case"text":{W+=Z.text;break}case"tool-call":{K.push({id:Z.toolCallId,type:"function",function:{name:Z.toolName,arguments:JSON.stringify(Z.input)}});break}}X.push({role:"assistant",content:W,tool_calls:K.length>0?K:void 0});break}case"tool":{for(let W of Q){let K=W.output,Z;switch(K.type){case"text":case"error-text":Z=K.value;break;case"content":case"json":case"error-json":Z=JSON.stringify(K.value);break}X.push({role:"tool",tool_call_id:W.toolCallId,content:Z})}break}default:throw Error(`Unsupported role: ${J}`)}return{messages:X,warnings:G}}function Sb0({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X?new Date(X*1000):void 0}}function IY4($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"unknown"}}function un8({tools:$,toolChoice:Y,structuredOutputs:X,strictJsonSchema:G}){$=($==null?void 0:$.length)?$:void 0;let J=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:J};let Q=[];for(let K of $)switch(K.type){case"function":Q.push({type:"function",function:{name:K.name,description:K.description,parameters:K.inputSchema,strict:X?G:void 0}});break;default:J.push({type:"unsupported-tool",tool:K});break}if(Y==null)return{tools:Q,toolChoice:void 0,toolWarnings:J};let W=Y.type;switch(W){case"auto":case"none":case"required":return{tools:Q,toolChoice:W,toolWarnings:J};case"tool":return{tools:Q,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:J};default:throw new _9({functionality:`tool choice type: ${W}`})}}function dn8({prompt:$,user:Y="user",assistant:X="assistant"}){let G="";if($[0].role==="system")G+=`${$[0].content}

`,$=$.slice(1);for(let{role:J,content:Q}of $)switch(J){case"system":throw new I90({message:"Unexpected system message in prompt: ${content}",prompt:$});case"user":{let W=Q.map((K)=>{switch(K.type){case"text":return K.text}}).filter(Boolean).join("");G+=`${Y}:
${W}

`;break}case"assistant":{let W=Q.map((K)=>{switch(K.type){case"text":return K.text;case"tool-call":throw new _9({functionality:"tool-call messages"})}}).join("");G+=`${X}:
${W}

`;break}case"tool":throw new _9({functionality:"tool messages"});default:throw Error(`Unsupported role: ${J}`)}return G+=`${X}:
`,{prompt:G,stopSequences:[`
${Y}:`]}}function CY4({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function SY4($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"unknown"}}function Yr8($,Y,X){if($==null)return{};let G={},J=$.input_tokens_details;if((J==null?void 0:J.image_tokens)!=null){let Q=Math.floor(J.image_tokens/X),W=J.image_tokens-Q*(X-1);G.imageTokens=Y===X-1?W:Q}if((J==null?void 0:J.text_tokens)!=null){let Q=Math.floor(J.text_tokens/X),W=J.text_tokens-Q*(X-1);G.textTokens=Y===X-1?W:Q}if($.input_tokens!=null){let Q=Math.floor($.input_tokens/X),W=$.input_tokens-Q*(X-1);G.inputTokens=Y===X-1?W:Q}if($.output_tokens!=null){let Q=Math.floor($.output_tokens/X),W=$.output_tokens-Q*(X-1);G.outputTokens=Y===X-1?W:Q}return G}function xY4($,Y){if(!Y)return!1;return Y.some((X)=>$.startsWith(X))}async function Kr8({prompt:$,systemMessageMode:Y,fileIdPrefixes:X,store:G,hasLocalShellTool:J=!1}){var Q,W,K,Z,H,z;let V=[],F=[];for(let{role:L,content:N}of $)switch(L){case"system":{switch(Y){case"system":{V.push({role:"system",content:N});break}case"developer":{V.push({role:"developer",content:N});break}case"remove":{F.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Y}`)}break}case"user":{V.push({role:"user",content:N.map((D,A)=>{var B,O,E;switch(D.type){case"text":return{type:"input_text",text:D.text};case"file":if(D.mediaType.startsWith("image/")){let M=D.mediaType==="image/*"?"image/jpeg":D.mediaType;return{type:"input_image",...D.data instanceof URL?{image_url:D.data.toString()}:typeof D.data==="string"&&xY4(D.data,X)?{file_id:D.data}:{image_url:`data:${M};base64,${RX(D.data)}`},detail:(O=(B=D.providerOptions)==null?void 0:B.openai)==null?void 0:O.imageDetail}}else if(D.mediaType==="application/pdf"){if(D.data instanceof URL)return{type:"input_file",file_url:D.data.toString()};return{type:"input_file",...typeof D.data==="string"&&xY4(D.data,X)?{file_id:D.data}:{filename:(E=D.filename)!=null?E:`part-${A}.pdf`,file_data:`data:application/pdf;base64,${RX(D.data)}`}}}else throw new _9({functionality:`file part media type ${D.mediaType}`})}})});break}case"assistant":{let D={};for(let A of N)switch(A.type){case"text":{let B=(W=(Q=A.providerOptions)==null?void 0:Q.openai)==null?void 0:W.itemId,O=(Z=(K=A.providerOptions)==null?void 0:K.openai)==null?void 0:Z.phase;if(G&&B!=null){V.push({type:"item_reference",id:B});break}V.push({role:"assistant",content:[{type:"output_text",text:A.text}],id:B,...O!=null&&{phase:O}});break}case"tool-call":{if(A.providerExecuted)break;let B=(z=(H=A.providerOptions)==null?void 0:H.openai)==null?void 0:z.itemId;if(G&&B!=null){V.push({type:"item_reference",id:B});break}if(J&&A.toolName==="local_shell"){let O=await MX({value:A.input,schema:WX4});V.push({type:"local_shell_call",call_id:A.toolCallId,id:B,action:{type:"exec",command:O.action.command,timeout_ms:O.action.timeoutMs,user:O.action.user,working_directory:O.action.workingDirectory,env:O.action.env}});break}V.push({type:"function_call",call_id:A.toolCallId,name:A.toolName,arguments:JSON.stringify(A.input),id:B});break}case"tool-result":{if(G)V.push({type:"item_reference",id:A.toolCallId});else F.push({type:"other",message:`Results for OpenAI tool ${A.toolName} are not sent to the API when store is false`});break}case"reasoning":{let B=await j9({provider:"openai",providerOptions:A.providerOptions,schema:Zr8}),O=B==null?void 0:B.itemId;if(O!=null){let E=D[O];if(G){if(E===void 0)V.push({type:"item_reference",id:O}),D[O]={type:"reasoning",id:O,summary:[]}}else{let M=[];if(A.text.length>0)M.push({type:"summary_text",text:A.text});else if(E!==void 0)F.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(A)}.`});if(E===void 0)D[O]={type:"reasoning",id:O,encrypted_content:B==null?void 0:B.reasoningEncryptedContent,summary:M},V.push(D[O]);else if(E.summary.push(...M),(B==null?void 0:B.reasoningEncryptedContent)!=null)E.encrypted_content=B.reasoningEncryptedContent}}else F.push({type:"other",message:`Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(A)}.`});break}}break}case"tool":{for(let D of N){let A=D.output;if(J&&D.toolName==="local_shell"&&A.type==="json"){let O=await MX({value:A.value,schema:KX4});V.push({type:"local_shell_call_output",call_id:D.toolCallId,output:O.output});break}let B;switch(A.type){case"text":case"error-text":B=A.value;break;case"json":case"error-json":B=JSON.stringify(A.value);break;case"content":B=A.value.map((O)=>{switch(O.type){case"text":return{type:"input_text",text:O.text};case"media":return O.mediaType.startsWith("image/")?{type:"input_image",image_url:`data:${O.mediaType};base64,${O.data}`}:{type:"input_file",filename:"data",file_data:`data:${O.mediaType};base64,${O.data}`}}});break}V.push({type:"function_call_output",call_id:D.toolCallId,output:B})}break}default:throw Error(`Unsupported role: ${L}`)}if(!G&&V.some((L)=>("type"in L)&&L.type==="reasoning"&&L.encrypted_content==null))F.push({type:"other",message:"Reasoning parts without encrypted content are not supported when store is false. Skipping reasoning parts."}),V=V.filter((L)=>!("type"in L)||L.type!=="reasoning"||L.encrypted_content!=null);return{input:V,warnings:F}}function yY4({finishReason:$,hasFunctionCall:Y}){switch($){case void 0:case null:return Y?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return Y?"tool-calls":"unknown"}}async function kr8({tools:$,toolChoice:Y,strictJsonSchema:X}){$=($==null?void 0:$.length)?$:void 0;let G=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:G};let J=[];for(let W of $)switch(W.type){case"function":J.push({type:"function",name:W.name,description:W.description,parameters:W.inputSchema,strict:X});break;case"provider-defined":{switch(W.id){case"openai.file_search":{let K=await MX({value:W.args,schema:Ar8});J.push({type:"file_search",vector_store_ids:K.vectorStoreIds,max_num_results:K.maxNumResults,ranking_options:K.ranking?{ranker:K.ranking.ranker,score_threshold:K.ranking.scoreThreshold}:void 0,filters:K.filters});break}case"openai.local_shell":{J.push({type:"local_shell"});break}case"openai.web_search_preview":{let K=await MX({value:W.args,schema:qr8});J.push({type:"web_search_preview",search_context_size:K.searchContextSize,user_location:K.userLocation});break}case"openai.web_search":{let K=await MX({value:W.args,schema:Er8});J.push({type:"web_search",filters:K.filters!=null?{allowed_domains:K.filters.allowedDomains}:void 0,external_web_access:K.externalWebAccess,search_context_size:K.searchContextSize,user_location:K.userLocation});break}case"openai.code_interpreter":{let K=await MX({value:W.args,schema:Lr8});J.push({type:"code_interpreter",container:K.container==null?{type:"auto",file_ids:void 0}:typeof K.container==="string"?K.container:{type:"auto",file_ids:K.container.fileIds}});break}case"openai.image_generation":{let K=await MX({value:W.args,schema:jr8});J.push({type:"image_generation",background:K.background,input_fidelity:K.inputFidelity,input_image_mask:K.inputImageMask?{file_id:K.inputImageMask.fileId,image_url:K.inputImageMask.imageUrl}:void 0,model:K.model,size:K.size,quality:K.quality,moderation:K.moderation,output_format:K.outputFormat,output_compression:K.outputCompression});break}}break}default:G.push({type:"unsupported-tool",tool:W});break}if(Y==null)return{tools:J,toolChoice:void 0,toolWarnings:G};let Q=Y.type;switch(Q){case"auto":case"none":case"required":return{tools:J,toolChoice:Q,toolWarnings:G};case"tool":return{tools:J,toolChoice:Y.toolName==="code_interpreter"||Y.toolName==="file_search"||Y.toolName==="image_generation"||Y.toolName==="web_search_preview"||Y.toolName==="web_search"?{type:Y.toolName}:{type:"function",name:Y.toolName},toolWarnings:G};default:throw new _9({functionality:`tool choice type: ${Q}`})}}function xr8($){return $.type==="response.output_text.delta"}function yr8($){return $.type==="response.output_item.done"}function br8($){return $.type==="response.completed"||$.type==="response.incomplete"}function hr8($){return $.type==="response.created"}function fr8($){return $.type==="response.function_call_arguments.delta"}function gr8($){return $.type==="response.code_interpreter_call_code.delta"}function mr8($){return $.type==="response.code_interpreter_call_code.done"}function bY4($){return $.type==="response.output_item.added"}function ur8($){return $.type==="response.output_text.annotation.added"}function pr8($){return $.type==="error"}function hY4($){var Y;if($==null)return{};switch($.type){case"search":return{action:{type:"search",query:(Y=$.query)!=null?Y:void 0},...$.sources!=null&&{sources:$.sources}};case"open_page":return{action:{type:"openPage",url:$.url}};case"find_in_page":return{action:{type:"findInPage",url:$.url,pattern:$.pattern}}}}function zX4($={}){var Y;let X=()=>{let N={"api-key":rZ({apiKey:$.apiKey,environmentVariableName:"AZURE_API_KEY",description:"Azure OpenAI"}),...$.headers};return _Q(N,`ai-sdk/azure/${cr8}`)},G=()=>fy0({settingValue:$.resourceName,settingName:"resourceName",environmentVariableName:"AZURE_RESOURCE_NAME",description:"Azure OpenAI resource name"}),J=(Y=$.apiVersion)!=null?Y:"v1",Q=({path:N,modelId:D})=>{var A;let B=(A=$.baseURL)!=null?A:`https://${G()}.openai.azure.com/openai`,O;if($.useDeploymentBasedUrls)O=new URL(`${B}/deployments/${D}${N}`);else O=new URL(`${B}/v1${N}`);return O.searchParams.set("api-version",J),O.toString()},W=(N)=>new pn8(N,{provider:"azure.chat",url:Q,headers:X,fetch:$.fetch}),K=(N)=>new in8(N,{provider:"azure.completion",url:Q,headers:X,fetch:$.fetch}),Z=(N)=>new an8(N,{provider:"azure.embeddings",headers:X,url:Q,fetch:$.fetch}),H=(N)=>new vr8(N,{provider:"azure.responses",url:Q,headers:X,fetch:$.fetch,fileIdPrefixes:["assistant-"]}),z=(N)=>new $r8(N,{provider:"azure.image",url:Q,headers:X,fetch:$.fetch}),V=(N)=>new Jr8(N,{provider:"azure.transcription",url:Q,headers:X,fetch:$.fetch}),F=(N)=>new Wr8(N,{provider:"azure.speech",url:Q,headers:X,fetch:$.fetch}),L=function(N){if(new.target)throw Error("The Azure OpenAI model function cannot be called with the new keyword.");return W(N)};return L.languageModel=W,L.chat=W,L.completion=K,L.embedding=Z,L.image=z,L.imageModel=z,L.textEmbedding=Z,L.textEmbeddingModel=Z,L.responses=H,L.transcription=V,L.speech=F,L.tools=dr8,L}function VX4($){let Y=$?.url??"wss://api.openai.com/v1/responses",X=$?.betaHeader===void 0?"responses_websockets=2026-02-06":$.betaHeader,G=$?.apiKeyQueryParam??!1,J=null,Q=null,W=null,K=0,Z=new Map,H=!1;function z(L){if(!L)return"";let N=Z.get(L);if(N)return N;let D=String(++K);return Z.set(L,D),D}function V(L,N,D){if(D?.aborted)return Promise.reject(kb0(D));let A={...fY4($?.headers),...N},B=A["api-key"];if(delete A.authorization,delete A["openai-beta"],$?.apiKeyAsBearer||G)delete A["api-key"];let O=G?`${G}:${z(B)}`:"",E=ar8(L,A,O);if(J?.readyState===Cb0.OPEN&&W===E)return Promise.resolve(J);if(J?.readyState===Cb0.OPEN&&W!==E)J.close(),J=null,W=null;if(Q&&W===E)return Q;return W=E,Q=new Promise((M,R)=>{let q=!1,_=new Cb0(nr8(Y,G,B),{headers:{...A,...L?{Authorization:L}:{},...X?{"OpenAI-Beta":X}:{}}});function P(){D?.removeEventListener("abort",j)}function w(C,k=!0){if(q)return;if(q=!0,Q=null,W=null,P(),k)_.close();R(C)}function j(){w(kb0(D))}D?.addEventListener("abort",j,{once:!0}),_.on("open",()=>{if(D?.aborted){w(kb0(D));return}q=!0,J=_,Q=null,P(),M(_)}),_.on("error",(C)=>{w(C,!1)}),_.on("close",()=>{if(q)return;w(Error("WebSocket closed before the connection opened"),!1)}),_.on("close",()=>{if(J===_)J=null;if(J===null)W=null})}),Q}async function F(L,N){let D=L instanceof URL?L.toString():typeof L==="string"?L:L.url;if(N?.method!=="POST"||!ir8(D))return globalThis.fetch(L,N);let A;try{A=JSON.parse(typeof N.body==="string"?N.body:"")}catch{return globalThis.fetch(L,N)}if(!A.stream)return globalThis.fetch(L,N);if(H){if(A.previous_response_id)throw Error("Cannot start an overlapping WebSocket Responses continuation. Wait for the active stream to finish before sending previous_response_id.");return globalThis.fetch(L,N)}let B=fY4(N.headers),O=B.authorization??($?.apiKeyAsBearer&&B["api-key"]?`Bearer ${B["api-key"]}`:"");H=!0;let E;try{E=await V(O,B,N?.signal)}catch(j){throw H=!1,j}let{stream:M,background:R,...q}=A,_=new TextEncoder,P,w=new ReadableStream({start(j){let C=!1,k;function S({closeSocket:d=!1}={}){if(C)return;if(C=!0,E.off("message",I),E.off("error",v),E.off("close",x),k)N?.signal?.removeEventListener("abort",k),k=void 0;if(d&&J===E)E.close(),J=null,W=null;H=!1,P=void 0}P=S;function I(d){let u=d.toString();j.enqueue(_.encode(rr8(u)));try{let b=JSON.parse(u);if(sr8(b))j.enqueue(_.encode(`data: [DONE]

`)),S({closeSocket:or8(b)}),j.close()}catch{}}function v(d){S(),j.error(d)}function x(){S();try{j.close()}catch{}}E.on("message",I),E.on("error",v),E.on("close",x);let y=N?.signal;if(y){if(y.aborted){S({closeSocket:!0}),j.error(y.reason??new DOMException("Aborted","AbortError"));return}k=()=>{S({closeSocket:!0});try{j.error(y.reason??new DOMException("Aborted","AbortError"))}catch{}},y.addEventListener("abort",k,{once:!0})}E.send(JSON.stringify({type:"response.create",...q}))},cancel(){P?.({closeSocket:!0})}});return new Response(w,{status:200,headers:{"content-type":"text/event-stream"}})}return Object.assign(F,{close(){if(J)J.close(),J=null;W=null,Q=null}})}function ir8($){try{return new URL($).pathname.endsWith("/responses")}catch{return $.split("?")[0]?.endsWith("/responses")??!1}}function nr8($,Y,X){if(!Y||!X)return $;let G=new URL($);return G.searchParams.set(Y,X),G.toString()}function rr8($){return`${$.split(/\r?\n/).map((Y)=>`data: ${Y}`).join(`
`)}

`}function ar8($,Y,X=""){return JSON.stringify({authorization:$,queryCredential:X,headers:Object.entries(Y).sort(([G],[J])=>G.localeCompare(J))})}function sr8($){return typeof $==="object"&&$!==null&&"type"in $&&typeof $.type==="string"&&lr8.has($.type)}function or8($){if(typeof $!=="object"||$===null||!("error"in $))return!1;let Y=$.error;return typeof Y==="object"&&Y!==null&&"code"in Y&&Y.code==="websocket_connection_limit_reached"}function kb0($){return $?.reason??new DOMException("Aborted","AbortError")}function fY4($){let Y={};if(!$)return Y;if($ instanceof Headers)$.forEach((X,G)=>{Y[G.toLowerCase()]=X});else if(Array.isArray($))for(let[X,G]of $)Y[X.toLowerCase()]=G;else for(let[X,G]of Object.entries($))if(G!=null)Y[X.toLowerCase()]=G;return Y}function vb0($){return typeof $==="object"&&$!==null&&!Array.isArray($)}function L50($){if(!vb0($)||!vb0($.azure))return $;let Y=vb0($.openai)?$.openai:{};return{...$,openai:{...Y,...$.azure}}}function gY4($){let Y=!1,X=$.map((G)=>{let J=G,Q=L50(J.providerOptions),W=Q!==J.providerOptions;if(!Array.isArray(G.content)){if(W)return Y=!0,{...G,providerOptions:Q};return G}let K=!1,Z=G.content.map((H)=>{if(!("providerOptions"in H))return H;let z=L50(H.providerOptions);if(z===H.providerOptions)return H;return K=!0,{...H,providerOptions:z}});if(!K){if(W)return Y=!0,{...G,providerOptions:Q};return G}return Y=!0,{...G,...W?{providerOptions:Q}:{},content:Z}});return Y?X:$}function tr8($){return new Proxy($,{get(Y,X,G){if(X==="doGenerate")return(J)=>Y.doGenerate({...J,providerOptions:L50(J.providerOptions),prompt:gY4(J.prompt)});if(X==="doStream")return(J)=>Y.doStream({...J,providerOptions:L50(J.providerOptions),prompt:gY4(J.prompt)});return Reflect.get(Y,X,G)}})}function $a8($,Y){let X=Y.find((J)=>J.id!=="models.dev"&&(J.id===$||$.startsWith(`${J.id}/`)));if(X)return X;let G=Y.find((J)=>J.id==="models.dev");if(G)return G;throw new G0({id:"MODEL_ROUTER_NO_GATEWAY_FOUND",category:"USER",domain:"MODEL_ROUTER",text:`No Mastra model router gateway found for model id ${$}`})}function mY4($){return $.specificationVersion==="v3"}function uY4(){return{modelInstances:new Map,webSocketFetches:new Map,gatewayStreamTransports:new Map}}function Ga8($,Y){let X=Y==="azure-openai"?$?.azure:$?.openai;return{transport:X?.transport??"fetch",websocket:X?.websocket}}function Ja8($){if(!$)return!0;try{return new URL($).hostname===Xa8}catch{return!1}}function pY4($){if(!$)return"";let Y=Object.entries($);if(Y.length===0)return"";return JSON.stringify(Y.sort(([X],[G])=>X.localeCompare(G)))}function Qa8($){return Object.fromEntries(Object.entries(_b0).filter(([Y,X])=>X.gateway===$))}function Wa8($){return $[ay0]}function Ka8($){if(typeof $==="object"&&"specificationVersion"in $)return!1;if(typeof $==="object"&&!("model"in $)){if("id"in $)return!0;if("providerId"in $&&"modelId"in $)return!0}return!1}async function RE($,Y=new p1,X){if(typeof $==="function")$=await $({requestContext:Y,mastra:X});if($ instanceof ME||$ instanceof dY4||$ instanceof UT||$ instanceof F50)return $;if(typeof $==="object"&&"specificationVersion"in $){if($.specificationVersion==="v2")return new UT($);if($.specificationVersion==="v3")return new F50($);if($.specificationVersion==="v1")return new dY4($);if(typeof $.doStream==="function"&&typeof $.doGenerate==="function")return new UT($);return $}let G=X?.listGateways(),J=G?Object.values(G):void 0;if(typeof $==="string"||Ka8($))return new ME($,J);throw Error("Invalid model configuration provided")}function h3($,Y=!0){if($==null)return;if(Da8($)){if(Y)return;if(typeof $==="object"&&$.description)return{type:"object",description:$.description};return{type:"object"}}if(typeof $==="boolean")return{type:"boolean",properties:{}};let{type:X,description:G,required:J,properties:Q,items:W,allOf:K,anyOf:Z,oneOf:H,format:z,const:V,minLength:F,enum:L}=$,N={};if(G)N.description=G;if(J)N.required=J;if(z)N.format=z;if(V!==void 0)N.enum=[V];if(X)if(Array.isArray(X)){let D=X.includes("null"),A=X.filter((B)=>B!=="null");if(A.length===0)N.type="null";else if(N.anyOf=A.map((B)=>({type:B})),D)N.nullable=!0}else N.type=X;if(L!==void 0)N.enum=L;if(Q!=null)N.properties=Object.entries(Q).reduce((D,[A,B])=>{return D[A]=h3(B,!1),D},{});if(W)N.items=Array.isArray(W)?W.map((D)=>h3(D,!1)):h3(W,!1);if(K)N.allOf=K.map((D)=>h3(D,!1));if(Z)if(Z.some((D)=>typeof D==="object"&&(D==null?void 0:D.type)==="null")){let D=Z.filter((A)=>!(typeof A==="object"&&(A==null?void 0:A.type)==="null"));if(D.length===1){let A=h3(D[0],!1);if(typeof A==="object")N.nullable=!0,Object.assign(N,A)}else N.anyOf=D.map((A)=>h3(A,!1)),N.nullable=!0}else N.anyOf=Z.map((D)=>h3(D,!1));if(H)N.oneOf=H.map((D)=>h3(D,!1));if(F!==void 0)N.minLength=F;return N}function Da8($){return $!=null&&typeof $==="object"&&$.type==="object"&&($.properties==null||Object.keys($.properties).length===0)&&!$.additionalProperties}function Na8($,Y){var X,G;let J=[],Q=[],W=!0,K=(X=Y==null?void 0:Y.isGemmaModel)!=null?X:!1,Z=(G=Y==null?void 0:Y.supportsFunctionResponseParts)!=null?G:!0;for(let{role:H,content:z}of $)switch(H){case"system":{if(!W)throw new _9({functionality:"system messages are only supported at the beginning of the conversation"});J.push({text:z});break}case"user":{W=!1;let V=[];for(let F of z)switch(F.type){case"text":{V.push({text:F.text});break}case"file":{let L=F.mediaType==="image/*"?"image/jpeg":F.mediaType;V.push(F.data instanceof URL?{fileData:{mimeType:L,fileUri:F.data.toString()}}:{inlineData:{mimeType:L,data:RX(F.data)}});break}}Q.push({role:"user",parts:V});break}case"assistant":{W=!1,Q.push({role:"model",parts:z.map((V)=>{var F,L,N;let D=((L=(F=V.providerOptions)==null?void 0:F.google)==null?void 0:L.thoughtSignature)!=null?String((N=V.providerOptions.google)==null?void 0:N.thoughtSignature):void 0;switch(V.type){case"text":return V.text.length===0?void 0:{text:V.text,thoughtSignature:D};case"reasoning":return V.text.length===0?void 0:{text:V.text,thought:!0,thoughtSignature:D};case"file":{if(V.mediaType!=="image/png")throw new _9({functionality:"Only PNG images are supported in assistant messages"});if(V.data instanceof URL)throw new _9({functionality:"File data URLs in assistant messages are not supported"});return{inlineData:{mimeType:V.mediaType,data:RX(V.data)}}}case"tool-call":return{functionCall:{name:V.toolName,args:V.input},thoughtSignature:D}}}).filter((V)=>V!==void 0)});break}case"tool":{W=!1;let V=[];for(let F of z){let L=F.output;if(L.type==="content")if(Z)Aa8({parts:V,part:F,output:L});else Ba8({parts:V,part:F,output:L});else V.push({functionResponse:{name:F.toolName,response:{name:F.toolName,content:L.value}}})}Q.push({role:"user",parts:V});break}}if(K&&J.length>0&&Q.length>0&&Q[0].role==="user"){let H=J.map((z)=>z.text).join(`

`);Q[0].parts.unshift({text:H+`

`})}return{systemInstruction:J.length>0&&!K?{parts:J}:void 0,contents:Q}}function Aa8({parts:$,part:Y,output:X}){let G=[],J=[];for(let W of X.value)switch(W.type){case"text":G.push(W.text);break;case"media":J.push({inlineData:{mimeType:W.mediaType,data:W.data}});break}let Q=G.length>0?G.join(`
`):"Tool executed successfully.";$.push({functionResponse:{name:Y.toolName,response:{name:Y.toolName,content:Q},...J.length>0?{parts:J}:{}}})}function Ba8({parts:$,part:Y,output:X}){for(let G of X.value)switch(G.type){case"text":$.push({functionResponse:{name:Y.toolName,response:{name:Y.toolName,content:G.text}}});break;case"media":$.push({inlineData:{mimeType:G.mediaType,data:G.data}},{text:"Tool executed successfully and returned this image as a response"});break;default:$.push({text:JSON.stringify(G)});break}}function cY4($){return $.includes("/")?$:`models/${$}`}function Ma8({tools:$,toolChoice:Y,modelId:X}){var G;$=($==null?void 0:$.length)?$:void 0;let J=[],Q=["gemini-flash-latest","gemini-flash-lite-latest","gemini-pro-latest"].some((L)=>L===X),W=X.includes("gemini-2")||X.includes("gemini-3")||X.includes("nano-banana")||Q,K=X.includes("gemini-2.5")||X.includes("gemini-3");if($==null)return{tools:void 0,toolConfig:void 0,toolWarnings:J};let Z=$.some((L)=>L.type==="function"),H=$.some((L)=>L.type==="provider-defined");if(Z&&H){let L=$.filter((N)=>N.type==="function");J.push({type:"unsupported-tool",tool:$.find((N)=>N.type==="function"),details:`Cannot mix function tools with provider-defined tools in the same request. Falling back to provider-defined tools only. The following function tools will be ignored: ${L.map((N)=>N.name).join(", ")}. Please use either function tools or provider-defined tools, but not both.`})}if(H){let L=[];return $.filter((D)=>D.type==="provider-defined").forEach((D)=>{switch(D.id){case"google.google_search":if(W)L.push({googleSearch:{...D.args}});else J.push({type:"unsupported-tool",tool:D,details:"Google Search requires Gemini 2.0 or newer."});break;case"google.enterprise_web_search":if(W)L.push({enterpriseWebSearch:{}});else J.push({type:"unsupported-tool",tool:D,details:"Enterprise Web Search requires Gemini 2.0 or newer."});break;case"google.url_context":if(W)L.push({urlContext:{}});else J.push({type:"unsupported-tool",tool:D,details:"The URL context tool is not supported with other Gemini models than Gemini 2."});break;case"google.code_execution":if(W)L.push({codeExecution:{}});else J.push({type:"unsupported-tool",tool:D,details:"The code execution tools is not supported with other Gemini models than Gemini 2."});break;case"google.file_search":if(K)L.push({fileSearch:{...D.args}});else J.push({type:"unsupported-tool",tool:D,details:"The file search tool is only supported with Gemini 2.5 models."});break;case"google.vertex_rag_store":if(W)L.push({retrieval:{vertex_rag_store:{rag_resources:{rag_corpus:D.args.ragCorpus},similarity_top_k:D.args.topK}}});else J.push({type:"unsupported-tool",tool:D,details:"The RAG store tool is not supported with other Gemini models than Gemini 2."});break;case"google.google_maps":if(W)L.push({googleMaps:{}});else J.push({type:"unsupported-tool",tool:D,details:"The Google Maps grounding tool is not supported with Gemini models other than Gemini 2 or newer."});break;default:J.push({type:"unsupported-tool",tool:D});break}}),{tools:L.length>0?L:void 0,toolConfig:void 0,toolWarnings:J}}let z=[],V=!1;for(let L of $)switch(L.type){case"function":if(z.push({name:L.name,description:(G=L.description)!=null?G:"",parameters:h3(L.inputSchema)}),L.strict===!0)V=!0;break;default:J.push({type:"unsupported-tool",tool:L});break}if(Y==null)return{tools:[{functionDeclarations:z}],toolConfig:V?{functionCallingConfig:{mode:"VALIDATED"}}:void 0,toolWarnings:J};let F=Y.type;switch(F){case"auto":return{tools:[{functionDeclarations:z}],toolConfig:{functionCallingConfig:{mode:V?"VALIDATED":"AUTO"}},toolWarnings:J};case"none":return{tools:[{functionDeclarations:z}],toolConfig:{functionCallingConfig:{mode:"NONE"}},toolWarnings:J};case"required":return{tools:[{functionDeclarations:z}],toolConfig:{functionCallingConfig:{mode:V?"VALIDATED":"ANY"}},toolWarnings:J};case"tool":return{tools:[{functionDeclarations:z}],toolConfig:{functionCallingConfig:{mode:V?"VALIDATED":"ANY",allowedFunctionNames:[Y.toolName]}},toolWarnings:J};default:throw new _9({functionality:`tool choice type: ${F}`})}}function lY4({finishReason:$,hasToolCalls:Y}){switch($){case"STOP":return Y?"tool-calls":"stop";case"MAX_TOKENS":return"length";case"IMAGE_SAFETY":case"RECITATION":case"SAFETY":case"BLOCKLIST":case"PROHIBITED_CONTENT":case"SPII":return"content-filter";case"FINISH_REASON_UNSPECIFIED":case"OTHER":return"other";case"MALFORMED_FUNCTION_CALL":return"error";default:return"unknown"}}function qa8({parts:$,generateId:Y}){let X=$==null?void 0:$.filter((G)=>("functionCall"in G));return X==null||X.length===0?void 0:X.map((G)=>({type:"tool-call",toolCallId:Y(),toolName:G.functionCall.name,args:JSON.stringify(G.functionCall.args),providerMetadata:G.thoughtSignature?{google:{thoughtSignature:G.thoughtSignature}}:void 0}))}function iY4({groundingMetadata:$,generateId:Y}){var X,G,J,Q,W,K;if(!($==null?void 0:$.groundingChunks))return;let Z=[];for(let H of $.groundingChunks)if(H.web!=null)Z.push({type:"source",sourceType:"url",id:Y(),url:H.web.uri,title:(X=H.web.title)!=null?X:void 0});else if(H.image!=null)Z.push({type:"source",sourceType:"url",id:Y(),url:H.image.sourceUri,title:(G=H.image.title)!=null?G:void 0});else if(H.retrievedContext!=null){let z=H.retrievedContext.uri,V=H.retrievedContext.fileSearchStore;if(z&&(z.startsWith("http://")||z.startsWith("https://")))Z.push({type:"source",sourceType:"url",id:Y(),url:z,title:(J=H.retrievedContext.title)!=null?J:void 0});else if(z){let F=(Q=H.retrievedContext.title)!=null?Q:"Unknown Document",L="application/octet-stream",N=void 0;if(z.endsWith(".pdf"))L="application/pdf",N=z.split("/").pop();else if(z.endsWith(".txt"))L="text/plain",N=z.split("/").pop();else if(z.endsWith(".docx"))L="application/vnd.openxmlformats-officedocument.wordprocessingml.document",N=z.split("/").pop();else if(z.endsWith(".doc"))L="application/msword",N=z.split("/").pop();else if(z.match(/\.(md|markdown)$/))L="text/markdown",N=z.split("/").pop();else N=z.split("/").pop();Z.push({type:"source",sourceType:"document",id:Y(),mediaType:L,title:F,filename:N})}else if(V){let F=(W=H.retrievedContext.title)!=null?W:"Unknown Document";Z.push({type:"source",sourceType:"document",id:Y(),mediaType:"application/octet-stream",title:F,filename:V.split("/").pop()})}}else if(H.maps!=null){if(H.maps.uri)Z.push({type:"source",sourceType:"url",id:Y(),url:H.maps.uri,title:(K=H.maps.title)!=null?K:void 0})}return Z.length>0?Z:void 0}function AX4($={}){var Y,X;let G=(Y=aZ($.baseURL))!=null?Y:"https://generativelanguage.googleapis.com/v1beta",J=(X=$.name)!=null?X:"google.generative-ai",Q=()=>_Q({"x-goog-api-key":rZ({apiKey:$.apiKey,environmentVariableName:"GOOGLE_GENERATIVE_AI_API_KEY",description:"Google Generative AI"}),...$.headers},`ai-sdk/google/${Za8}`),W=(z)=>{var V;return new Ra8(z,{provider:J,baseURL:G,headers:Q,generateId:(V=$.generateId)!=null?V:_8,supportedUrls:()=>({"*":[new RegExp(`^${G}/files/.*$`),new RegExp("^https://(?:www\\.)?youtube\\.com/watch\\?v=[\\w-]+(?:&[\\w=&.-]*)?$"),new RegExp("^https://youtu\\.be/[\\w-]+(?:\\?[\\w=&.-]*)?$")]}),fetch:$.fetch})},K=(z)=>new Va8(z,{provider:J,baseURL:G,headers:Q,fetch:$.fetch}),Z=(z,V={})=>new fa8(z,V,{provider:J,baseURL:G,headers:Q,fetch:$.fetch}),H=function(z){if(new.target)throw Error("The Google Generative AI model function cannot be called with the new keyword.");return W(z)};return H.languageModel=W,H.chat=W,H.generativeAI=W,H.embedding=K,H.textEmbedding=K,H.textEmbeddingModel=K,H.image=Z,H.imageModel=Z,H.tools=ha8,H}function BX4($){let Y=$.startsWith("o3")||$.startsWith("o4-mini")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-chat"),X=$.startsWith("gpt-4")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-nano")&&!$.startsWith("gpt-5-chat")&&!$.startsWith("gpt-5.4-nano")||$.startsWith("o3")||$.startsWith("o4-mini"),G=!($.startsWith("gpt-3")||$.startsWith("gpt-4")||$.startsWith("chatgpt-4o")||$.startsWith("gpt-5-chat")),J=$.startsWith("gpt-5.1")||$.startsWith("gpt-5.2")||$.startsWith("gpt-5.3")||$.startsWith("gpt-5.4");return{supportsFlexProcessing:Y,supportsPriorityProcessing:X,isReasoningModel:G,systemMessageMode:G?"developer":"system",supportsNonReasoningParameters:J}}function ua8({prompt:$,systemMessageMode:Y="system"}){let X=[],G=[];for(let{role:J,content:Q}of $)switch(J){case"system":{switch(Y){case"system":{X.push({role:"system",content:Q});break}case"developer":{X.push({role:"developer",content:Q});break}case"remove":{G.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Y}`)}break}case"user":{if(Q.length===1&&Q[0].type==="text"){X.push({role:"user",content:Q[0].text});break}X.push({role:"user",content:Q.map((W,K)=>{var Z,H,z;switch(W.type){case"text":return{type:"text",text:W.text};case"file":if(W.mediaType.startsWith("image/")){let V=W.mediaType==="image/*"?"image/jpeg":W.mediaType;return{type:"image_url",image_url:{url:W.data instanceof URL?W.data.toString():`data:${V};base64,${RX(W.data)}`,detail:(H=(Z=W.providerOptions)==null?void 0:Z.openai)==null?void 0:H.imageDetail}}}else if(W.mediaType.startsWith("audio/")){if(W.data instanceof URL)throw new _9({functionality:"audio file parts with URLs"});switch(W.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:RX(W.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:RX(W.data),format:"mp3"}};default:throw new _9({functionality:`audio content parts with media type ${W.mediaType}`})}}else if(W.mediaType==="application/pdf"){if(W.data instanceof URL)throw new _9({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof W.data==="string"&&W.data.startsWith("file-")?{file_id:W.data}:{filename:(z=W.filename)!=null?z:`part-${K}.pdf`,file_data:`data:application/pdf;base64,${RX(W.data)}`}}}else throw new _9({functionality:`file part media type ${W.mediaType}`})}})});break}case"assistant":{let W="",K=[];for(let Z of Q)switch(Z.type){case"text":{W+=Z.text;break}case"tool-call":{K.push({id:Z.toolCallId,type:"function",function:{name:Z.toolName,arguments:JSON.stringify(Z.input)}});break}}X.push({role:"assistant",content:W,tool_calls:K.length>0?K:void 0});break}case"tool":{for(let W of Q){let K=W.output,Z;switch(K.type){case"text":case"error-text":Z=K.value;break;case"content":case"json":case"error-json":Z=JSON.stringify(K.value);break}X.push({role:"tool",tool_call_id:W.toolCallId,content:Z})}break}default:throw Error(`Unsupported role: ${J}`)}return{messages:X,warnings:G}}function xb0({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X?new Date(X*1000):void 0}}function rY4($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"unknown"}}function la8({tools:$,toolChoice:Y,structuredOutputs:X,strictJsonSchema:G}){$=($==null?void 0:$.length)?$:void 0;let J=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:J};let Q=[];for(let K of $)switch(K.type){case"function":Q.push({type:"function",function:{name:K.name,description:K.description,parameters:K.inputSchema,strict:X?G:void 0}});break;default:J.push({type:"unsupported-tool",tool:K});break}if(Y==null)return{tools:Q,toolChoice:void 0,toolWarnings:J};let W=Y.type;switch(W){case"auto":case"none":case"required":return{tools:Q,toolChoice:W,toolWarnings:J};case"tool":return{tools:Q,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:J};default:throw new _9({functionality:`tool choice type: ${W}`})}}function na8({prompt:$,user:Y="user",assistant:X="assistant"}){let G="";if($[0].role==="system")G+=`${$[0].content}

`,$=$.slice(1);for(let{role:J,content:Q}of $)switch(J){case"system":throw new I90({message:"Unexpected system message in prompt: ${content}",prompt:$});case"user":{let W=Q.map((K)=>{switch(K.type){case"text":return K.text}}).filter(Boolean).join("");G+=`${Y}:
${W}

`;break}case"assistant":{let W=Q.map((K)=>{switch(K.type){case"text":return K.text;case"tool-call":throw new _9({functionality:"tool-call messages"})}}).join("");G+=`${X}:
${W}

`;break}case"tool":throw new _9({functionality:"tool messages"});default:throw Error(`Unsupported role: ${J}`)}return G+=`${X}:
`,{prompt:G,stopSequences:[`
${Y}:`]}}function aY4({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function sY4($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"unknown"}}function Qs8($,Y,X){if($==null)return{};let G={},J=$.input_tokens_details;if((J==null?void 0:J.image_tokens)!=null){let Q=Math.floor(J.image_tokens/X),W=J.image_tokens-Q*(X-1);G.imageTokens=Y===X-1?W:Q}if((J==null?void 0:J.text_tokens)!=null){let Q=Math.floor(J.text_tokens/X),W=J.text_tokens-Q*(X-1);G.textTokens=Y===X-1?W:Q}if($.input_tokens!=null){let Q=Math.floor($.input_tokens/X),W=$.input_tokens-Q*(X-1);G.inputTokens=Y===X-1?W:Q}if($.output_tokens!=null){let Q=Math.floor($.output_tokens/X),W=$.output_tokens-Q*(X-1);G.outputTokens=Y===X-1?W:Q}return G}function tY4($,Y){if(!Y)return!1;return Y.some((X)=>$.startsWith(X))}async function Cs8({prompt:$,systemMessageMode:Y,fileIdPrefixes:X,store:G,hasLocalShellTool:J=!1}){var Q,W,K,Z,H,z;let V=[],F=[];for(let{role:L,content:N}of $)switch(L){case"system":{switch(Y){case"system":{V.push({role:"system",content:N});break}case"developer":{V.push({role:"developer",content:N});break}case"remove":{F.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Y}`)}break}case"user":{V.push({role:"user",content:N.map((D,A)=>{var B,O,E;switch(D.type){case"text":return{type:"input_text",text:D.text};case"file":if(D.mediaType.startsWith("image/")){let M=D.mediaType==="image/*"?"image/jpeg":D.mediaType;return{type:"input_image",...D.data instanceof URL?{image_url:D.data.toString()}:typeof D.data==="string"&&tY4(D.data,X)?{file_id:D.data}:{image_url:`data:${M};base64,${RX(D.data)}`},detail:(O=(B=D.providerOptions)==null?void 0:B.openai)==null?void 0:O.imageDetail}}else if(D.mediaType==="application/pdf"){if(D.data instanceof URL)return{type:"input_file",file_url:D.data.toString()};return{type:"input_file",...typeof D.data==="string"&&tY4(D.data,X)?{file_id:D.data}:{filename:(E=D.filename)!=null?E:`part-${A}.pdf`,file_data:`data:application/pdf;base64,${RX(D.data)}`}}}else throw new _9({functionality:`file part media type ${D.mediaType}`})}})});break}case"assistant":{let D={};for(let A of N)switch(A.type){case"text":{let B=(W=(Q=A.providerOptions)==null?void 0:Q.openai)==null?void 0:W.itemId,O=(Z=(K=A.providerOptions)==null?void 0:K.openai)==null?void 0:Z.phase;if(G&&B!=null){V.push({type:"item_reference",id:B});break}V.push({role:"assistant",content:[{type:"output_text",text:A.text}],id:B,...O!=null&&{phase:O}});break}case"tool-call":{if(A.providerExecuted)break;let B=(z=(H=A.providerOptions)==null?void 0:H.openai)==null?void 0:z.itemId;if(G&&B!=null){V.push({type:"item_reference",id:B});break}if(J&&A.toolName==="local_shell"){let O=await MX({value:A.input,schema:RX4});V.push({type:"local_shell_call",call_id:A.toolCallId,id:B,action:{type:"exec",command:O.action.command,timeout_ms:O.action.timeoutMs,user:O.action.user,working_directory:O.action.workingDirectory,env:O.action.env}});break}V.push({type:"function_call",call_id:A.toolCallId,name:A.toolName,arguments:JSON.stringify(A.input),id:B});break}case"tool-result":{if(G)V.push({type:"item_reference",id:A.toolCallId});else F.push({type:"other",message:`Results for OpenAI tool ${A.toolName} are not sent to the API when store is false`});break}case"reasoning":{let B=await j9({provider:"openai",providerOptions:A.providerOptions,schema:Ss8}),O=B==null?void 0:B.itemId;if(O!=null){let E=D[O];if(G){if(E===void 0)V.push({type:"item_reference",id:O}),D[O]={type:"reasoning",id:O,summary:[]}}else{let M=[];if(A.text.length>0)M.push({type:"summary_text",text:A.text});else if(E!==void 0)F.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(A)}.`});if(E===void 0)D[O]={type:"reasoning",id:O,encrypted_content:B==null?void 0:B.reasoningEncryptedContent,summary:M},V.push(D[O]);else if(E.summary.push(...M),(B==null?void 0:B.reasoningEncryptedContent)!=null)E.encrypted_content=B.reasoningEncryptedContent}}else F.push({type:"other",message:`Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(A)}.`});break}}break}case"tool":{for(let D of N){let A=D.output;if(J&&D.toolName==="local_shell"&&A.type==="json"){let O=await MX({value:A.value,schema:qX4});V.push({type:"local_shell_call_output",call_id:D.toolCallId,output:O.output});break}let B;switch(A.type){case"text":case"error-text":B=A.value;break;case"json":case"error-json":B=JSON.stringify(A.value);break;case"content":B=A.value.map((O)=>{switch(O.type){case"text":return{type:"input_text",text:O.text};case"media":return O.mediaType.startsWith("image/")?{type:"input_image",image_url:`data:${O.mediaType};base64,${O.data}`}:{type:"input_file",filename:"data",file_data:`data:${O.mediaType};base64,${O.data}`}}});break}V.push({type:"function_call_output",call_id:D.toolCallId,output:B})}break}default:throw Error(`Unsupported role: ${L}`)}if(!G&&V.some((L)=>("type"in L)&&L.type==="reasoning"&&L.encrypted_content==null))F.push({type:"other",message:"Reasoning parts without encrypted content are not supported when store is false. Skipping reasoning parts."}),V=V.filter((L)=>!("type"in L)||L.type!=="reasoning"||L.encrypted_content!=null);return{input:V,warnings:F}}function eY4({finishReason:$,hasFunctionCall:Y}){switch($){case void 0:case null:return Y?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return Y?"tool-calls":"unknown"}}async function ys8({tools:$,toolChoice:Y,strictJsonSchema:X}){$=($==null?void 0:$.length)?$:void 0;let G=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:G};let J=[];for(let W of $)switch(W.type){case"function":J.push({type:"function",name:W.name,description:W.description,parameters:W.inputSchema,strict:X});break;case"provider-defined":{switch(W.id){case"openai.file_search":{let K=await MX({value:W.args,schema:zs8});J.push({type:"file_search",vector_store_ids:K.vectorStoreIds,max_num_results:K.maxNumResults,ranking_options:K.ranking?{ranker:K.ranking.ranker,score_threshold:K.ranking.scoreThreshold}:void 0,filters:K.filters});break}case"openai.local_shell":{J.push({type:"local_shell"});break}case"openai.web_search_preview":{let K=await MX({value:W.args,schema:ws8});J.push({type:"web_search_preview",search_context_size:K.searchContextSize,user_location:K.userLocation});break}case"openai.web_search":{let K=await MX({value:W.args,schema:Es8});J.push({type:"web_search",filters:K.filters!=null?{allowed_domains:K.filters.allowedDomains}:void 0,external_web_access:K.externalWebAccess,search_context_size:K.searchContextSize,user_location:K.userLocation});break}case"openai.code_interpreter":{let K=await MX({value:W.args,schema:Zs8});J.push({type:"code_interpreter",container:K.container==null?{type:"auto",file_ids:void 0}:typeof K.container==="string"?K.container:{type:"auto",file_ids:K.container.fileIds}});break}case"openai.image_generation":{let K=await MX({value:W.args,schema:Ls8});J.push({type:"image_generation",background:K.background,input_fidelity:K.inputFidelity,input_image_mask:K.inputImageMask?{file_id:K.inputImageMask.fileId,image_url:K.inputImageMask.imageUrl}:void 0,model:K.model,size:K.size,quality:K.quality,moderation:K.moderation,output_format:K.outputFormat,output_compression:K.outputCompression});break}}break}default:G.push({type:"unsupported-tool",tool:W});break}if(Y==null)return{tools:J,toolChoice:void 0,toolWarnings:G};let Q=Y.type;switch(Q){case"auto":case"none":case"required":return{tools:J,toolChoice:Q,toolWarnings:G};case"tool":return{tools:J,toolChoice:Y.toolName==="code_interpreter"||Y.toolName==="file_search"||Y.toolName==="image_generation"||Y.toolName==="web_search_preview"||Y.toolName==="web_search"?{type:Y.toolName}:{type:"function",name:Y.toolName},toolWarnings:G};default:throw new _9({functionality:`tool choice type: ${Q}`})}}function hs8($){return $.type==="response.output_text.delta"}function fs8($){return $.type==="response.output_item.done"}function gs8($){return $.type==="response.completed"||$.type==="response.incomplete"}function ms8($){return $.type==="response.created"}function us8($){return $.type==="response.function_call_arguments.delta"}function ps8($){return $.type==="response.code_interpreter_call_code.delta"}function ds8($){return $.type==="response.code_interpreter_call_code.done"}function $X4($){return $.type==="response.output_item.added"}function cs8($){return $.type==="response.output_text.annotation.added"}function ls8($){return $.type==="error"}function YX4($){var Y;if($==null)return{};switch($.type){case"search":return{action:{type:"search",query:(Y=$.query)!=null?Y:void 0},...$.sources!=null&&{sources:$.sources}};case"open_page":return{action:{type:"openPage",url:$.url}};case"find_in_page":return{action:{type:"findInPage",url:$.url,pattern:$.pattern}}}}function wX4($={}){var Y,X;let G=(Y=aZ(hy0({settingValue:$.baseURL,environmentVariableName:"OPENAI_BASE_URL"})))!=null?Y:"https://api.openai.com/v1",J=(X=$.name)!=null?X:"openai",Q=()=>_Q({Authorization:`Bearer ${rZ({apiKey:$.apiKey,environmentVariableName:"OPENAI_API_KEY",description:"OpenAI"})}`,"OpenAI-Organization":$.organization,"OpenAI-Project":$.project,...$.headers},`ai-sdk/openai/${os8}`),W=(D)=>new ia8(D,{provider:`${J}.chat`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch}),K=(D)=>new sa8(D,{provider:`${J}.completion`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch}),Z=(D)=>new ea8(D,{provider:`${J}.embedding`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch}),H=(D)=>new Js8(D,{provider:`${J}.image`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch}),z=(D)=>new ss8(D,{provider:`${J}.transcription`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch}),V=(D)=>new ns8(D,{provider:`${J}.speech`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch}),F=(D)=>{if(new.target)throw Error("The OpenAI model function cannot be called with the new keyword.");return L(D)},L=(D)=>{return new bs8(D,{provider:`${J}.responses`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch,fileIdPrefixes:["file-"]})},N=function(D){return F(D)};return N.languageModel=F,N.chat=W,N.completion=K,N.responses=L,N.embedding=Z,N.textEmbedding=Z,N.textEmbeddingModel=Z,N.image=H,N.imageModel=H,N.transcription=z,N.transcriptionModel=z,N.speech=V,N.speechModel=V,N.tools=Is8,N}var GX4,F50=class{specificationVersion="v3";provider;modelId;supportedUrls;#$;constructor($){this.#$=$,this.provider=this.#$.provider,this.modelId=this.#$.modelId,this.supportedUrls=this.#$.supportedUrls}async doGenerate($){let Y=await this.#$.doGenerate(TY4($));return{...Y,request:Y.request,response:Y.response,stream:Tb0(Y)}}async doStream($){return await this.#$.doStream(TY4($))}serializeForSpan(){return{specificationVersion:this.specificationVersion,modelId:this.modelId,provider:this.provider}}},hb0,f3,fn8,gn8,mn8,pn8=class{constructor($,Y){this.specificationVersion="v2",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:K,responseFormat:Z,seed:H,tools:z,toolChoice:V,providerOptions:F}){var L,N,D,A;let B=[],O=(L=await j9({provider:"openai",providerOptions:F,schema:mn8}))!=null?L:{},E=(N=O.structuredOutputs)!=null?N:!0,M=JX4(this.modelId);if(J!=null)B.push({type:"unsupported-setting",setting:"topK"});if((Z==null?void 0:Z.type)==="json"&&Z.schema!=null&&!E)B.push({type:"unsupported-setting",setting:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{messages:R,warnings:q}=hn8({prompt:$,systemMessageMode:M.systemMessageMode});B.push(...q);let _=(D=O.strictJsonSchema)!=null?D:!1,P={model:this.modelId,logit_bias:O.logitBias,logprobs:O.logprobs===!0||typeof O.logprobs==="number"?!0:void 0,top_logprobs:typeof O.logprobs==="number"?O.logprobs:typeof O.logprobs==="boolean"?O.logprobs?0:void 0:void 0,user:O.user,parallel_tool_calls:O.parallelToolCalls,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,response_format:(Z==null?void 0:Z.type)==="json"?E&&Z.schema!=null?{type:"json_schema",json_schema:{schema:Z.schema,strict:_,name:(A=Z.name)!=null?A:"response",description:Z.description}}:{type:"json_object"}:void 0,stop:K,seed:H,verbosity:O.textVerbosity,max_completion_tokens:O.maxCompletionTokens,store:O.store,metadata:O.metadata,prediction:O.prediction,reasoning_effort:O.reasoningEffort,service_tier:O.serviceTier,prompt_cache_key:O.promptCacheKey,prompt_cache_retention:O.promptCacheRetention,safety_identifier:O.safetyIdentifier,messages:R};if(M.isReasoningModel){if(O.reasoningEffort!=="none"||!M.supportsNonReasoningParameters){if(P.temperature!=null)P.temperature=void 0,B.push({type:"unsupported-setting",setting:"temperature",details:"temperature is not supported for reasoning models"});if(P.top_p!=null)P.top_p=void 0,B.push({type:"unsupported-setting",setting:"topP",details:"topP is not supported for reasoning models"});if(P.logprobs!=null)P.logprobs=void 0,B.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(P.frequency_penalty!=null)P.frequency_penalty=void 0,B.push({type:"unsupported-setting",setting:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(P.presence_penalty!=null)P.presence_penalty=void 0,B.push({type:"unsupported-setting",setting:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(P.logit_bias!=null)P.logit_bias=void 0,B.push({type:"other",message:"logitBias is not supported for reasoning models"});if(P.top_logprobs!=null)P.top_logprobs=void 0,B.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(P.max_tokens!=null){if(P.max_completion_tokens==null)P.max_completion_tokens=P.max_tokens;P.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(P.temperature!=null)P.temperature=void 0,B.push({type:"unsupported-setting",setting:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(O.serviceTier==="flex"&&!M.supportsFlexProcessing)B.push({type:"unsupported-setting",setting:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),P.service_tier=void 0;if(O.serviceTier==="priority"&&!M.supportsPriorityProcessing)B.push({type:"unsupported-setting",setting:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),P.service_tier=void 0;let{tools:w,toolChoice:j,toolWarnings:C}=un8({tools:z,toolChoice:V,structuredOutputs:E,strictJsonSchema:_});return{args:{...P,tools:w,tool_choice:j},warnings:[...B,...C]}}async doGenerate($){var Y,X,G,J,Q,W,K,Z,H,z,V,F,L,N;let{args:D,warnings:A}=await this.getArgs($),{responseHeaders:B,value:O,rawValue:E}=await G8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:D,failedResponseHandler:f3,successfulResponseHandler:C5(fn8),abortSignal:$.abortSignal,fetch:this.config.fetch}),M=O.choices[0],R=[],q=M.message.content;if(q!=null&&q.length>0)R.push({type:"text",text:q});for(let j of(Y=M.message.tool_calls)!=null?Y:[])R.push({type:"tool-call",toolCallId:(X=j.id)!=null?X:_8(),toolName:j.function.name,input:j.function.arguments});for(let j of(G=M.message.annotations)!=null?G:[])R.push({type:"source",sourceType:"url",id:_8(),url:j.url_citation.url,title:j.url_citation.title});let _=(J=O.usage)==null?void 0:J.completion_tokens_details,P=(Q=O.usage)==null?void 0:Q.prompt_tokens_details,w={openai:{}};if((_==null?void 0:_.accepted_prediction_tokens)!=null)w.openai.acceptedPredictionTokens=_==null?void 0:_.accepted_prediction_tokens;if((_==null?void 0:_.rejected_prediction_tokens)!=null)w.openai.rejectedPredictionTokens=_==null?void 0:_.rejected_prediction_tokens;if(((W=M.logprobs)==null?void 0:W.content)!=null)w.openai.logprobs=M.logprobs.content;return{content:R,finishReason:IY4(M.finish_reason),usage:{inputTokens:(Z=(K=O.usage)==null?void 0:K.prompt_tokens)!=null?Z:void 0,outputTokens:(z=(H=O.usage)==null?void 0:H.completion_tokens)!=null?z:void 0,totalTokens:(F=(V=O.usage)==null?void 0:V.total_tokens)!=null?F:void 0,reasoningTokens:(L=_==null?void 0:_.reasoning_tokens)!=null?L:void 0,cachedInputTokens:(N=P==null?void 0:P.cached_tokens)!=null?N:void 0},request:{body:D},response:{...Sb0(O),headers:B,body:E},warnings:A,providerMetadata:w}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:Q}=await G8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:G,failedResponseHandler:f3,successfulResponseHandler:jQ(gn8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W=[],K="unknown",Z={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},H=!1,z=!1,V={openai:{}};return{stream:Q.pipeThrough(new TransformStream({start(F){F.enqueue({type:"stream-start",warnings:X})},transform(F,L){var N,D,A,B,O,E,M,R,q,_,P,w,j,C,k,S,I,v,x,y,d,u,b,g;if($.includeRawChunks)L.enqueue({type:"raw",rawValue:F.rawValue});if(!F.success){K="error",L.enqueue({type:"error",error:F.error});return}let p=F.value;if("error"in p){K="error",L.enqueue({type:"error",error:p.error});return}if(!H){let t=Sb0(p);if(Object.values(t).some(Boolean))H=!0,L.enqueue({type:"response-metadata",...Sb0(p)})}if(p.usage!=null){if(Z.inputTokens=(N=p.usage.prompt_tokens)!=null?N:void 0,Z.outputTokens=(D=p.usage.completion_tokens)!=null?D:void 0,Z.totalTokens=(A=p.usage.total_tokens)!=null?A:void 0,Z.reasoningTokens=(O=(B=p.usage.completion_tokens_details)==null?void 0:B.reasoning_tokens)!=null?O:void 0,Z.cachedInputTokens=(M=(E=p.usage.prompt_tokens_details)==null?void 0:E.cached_tokens)!=null?M:void 0,((R=p.usage.completion_tokens_details)==null?void 0:R.accepted_prediction_tokens)!=null)V.openai.acceptedPredictionTokens=(q=p.usage.completion_tokens_details)==null?void 0:q.accepted_prediction_tokens;if(((_=p.usage.completion_tokens_details)==null?void 0:_.rejected_prediction_tokens)!=null)V.openai.rejectedPredictionTokens=(P=p.usage.completion_tokens_details)==null?void 0:P.rejected_prediction_tokens}let h=p.choices[0];if((h==null?void 0:h.finish_reason)!=null)K=IY4(h.finish_reason);if(((w=h==null?void 0:h.logprobs)==null?void 0:w.content)!=null)V.openai.logprobs=h.logprobs.content;if((h==null?void 0:h.delta)==null)return;let n=h.delta;if(n.content!=null){if(!z)L.enqueue({type:"text-start",id:"0"}),z=!0;L.enqueue({type:"text-delta",id:"0",delta:n.content})}if(n.tool_calls!=null)for(let t of n.tool_calls){let s=t.index;if(W[s]==null){if(t.type!=null&&t.type!=="function")throw new s2({data:t,message:"Expected 'function' type."});if(t.id==null)throw new s2({data:t,message:"Expected 'id' to be a string."});if(((j=t.function)==null?void 0:j.name)==null)throw new s2({data:t,message:"Expected 'function.name' to be a string."});L.enqueue({type:"tool-input-start",id:t.id,toolName:t.function.name}),W[s]={id:t.id,type:"function",function:{name:t.function.name,arguments:(C=t.function.arguments)!=null?C:""},hasFinished:!1};let X0=W[s];if(((k=X0.function)==null?void 0:k.name)!=null&&((S=X0.function)==null?void 0:S.arguments)!=null){if(X0.function.arguments.length>0)L.enqueue({type:"tool-input-delta",id:X0.id,delta:X0.function.arguments});if(iZ(X0.function.arguments))L.enqueue({type:"tool-input-end",id:X0.id}),L.enqueue({type:"tool-call",toolCallId:(I=X0.id)!=null?I:_8(),toolName:X0.function.name,input:X0.function.arguments}),X0.hasFinished=!0}continue}let K0=W[s];if(K0.hasFinished)continue;if(((v=t.function)==null?void 0:v.arguments)!=null)K0.function.arguments+=(y=(x=t.function)==null?void 0:x.arguments)!=null?y:"";if(L.enqueue({type:"tool-input-delta",id:K0.id,delta:(d=t.function.arguments)!=null?d:""}),((u=K0.function)==null?void 0:u.name)!=null&&((b=K0.function)==null?void 0:b.arguments)!=null&&iZ(K0.function.arguments))L.enqueue({type:"tool-input-end",id:K0.id}),L.enqueue({type:"tool-call",toolCallId:(g=K0.id)!=null?g:_8(),toolName:K0.function.name,input:K0.function.arguments}),K0.hasFinished=!0}if(n.annotations!=null)for(let t of n.annotations)L.enqueue({type:"source",sourceType:"url",id:_8(),url:t.url_citation.url,title:t.url_citation.title})},flush(F){if(z)F.enqueue({type:"text-end",id:"0"});F.enqueue({type:"finish",finishReason:K,usage:Z,...V!=null?{providerMetadata:V}:{}})}})),request:{body:G},response:{headers:J}}}},cn8,ln8,kY4,in8=class{constructor($,Y){this.specificationVersion="v2",this.supportedUrls={},this.modelId=$,this.config=Y}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:K,responseFormat:Z,tools:H,toolChoice:z,seed:V,providerOptions:F}){let L=[],N={...await j9({provider:"openai",providerOptions:F,schema:kY4}),...await j9({provider:this.providerOptionsName,providerOptions:F,schema:kY4})};if(J!=null)L.push({type:"unsupported-setting",setting:"topK"});if(H==null?void 0:H.length)L.push({type:"unsupported-setting",setting:"tools"});if(z!=null)L.push({type:"unsupported-setting",setting:"toolChoice"});if(Z!=null&&Z.type!=="text")L.push({type:"unsupported-setting",setting:"responseFormat",details:"JSON response format is not supported."});let{prompt:D,stopSequences:A}=dn8({prompt:$}),B=[...A!=null?A:[],...K!=null?K:[]];return{args:{model:this.modelId,echo:N.echo,logit_bias:N.logitBias,logprobs:(N==null?void 0:N.logprobs)===!0?0:(N==null?void 0:N.logprobs)===!1?void 0:N==null?void 0:N.logprobs,suffix:N.suffix,user:N.user,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,seed:V,prompt:D,stop:B.length>0?B:void 0},warnings:L}}async doGenerate($){var Y,X,G;let{args:J,warnings:Q}=await this.getArgs($),{responseHeaders:W,value:K,rawValue:Z}=await G8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:J,failedResponseHandler:f3,successfulResponseHandler:C5(cn8),abortSignal:$.abortSignal,fetch:this.config.fetch}),H=K.choices[0],z={openai:{}};if(H.logprobs!=null)z.openai.logprobs=H.logprobs;return{content:[{type:"text",text:H.text}],usage:{inputTokens:(Y=K.usage)==null?void 0:Y.prompt_tokens,outputTokens:(X=K.usage)==null?void 0:X.completion_tokens,totalTokens:(G=K.usage)==null?void 0:G.total_tokens},finishReason:SY4(H.finish_reason),request:{body:J},response:{...CY4(K),headers:W,body:Z},providerMetadata:z,warnings:Q}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:Q}=await G8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:G,failedResponseHandler:f3,successfulResponseHandler:jQ(ln8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W="unknown",K={openai:{}},Z={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},H=!0;return{stream:Q.pipeThrough(new TransformStream({start(z){z.enqueue({type:"stream-start",warnings:X})},transform(z,V){if($.includeRawChunks)V.enqueue({type:"raw",rawValue:z.rawValue});if(!z.success){W="error",V.enqueue({type:"error",error:z.error});return}let F=z.value;if("error"in F){W="error",V.enqueue({type:"error",error:F.error});return}if(H)H=!1,V.enqueue({type:"response-metadata",...CY4(F)}),V.enqueue({type:"text-start",id:"0"});if(F.usage!=null)Z.inputTokens=F.usage.prompt_tokens,Z.outputTokens=F.usage.completion_tokens,Z.totalTokens=F.usage.total_tokens;let L=F.choices[0];if((L==null?void 0:L.finish_reason)!=null)W=SY4(L.finish_reason);if((L==null?void 0:L.logprobs)!=null)K.openai.logprobs=L.logprobs;if((L==null?void 0:L.text)!=null&&L.text.length>0)V.enqueue({type:"text-delta",id:"0",delta:L.text})},flush(z){if(!H)z.enqueue({type:"text-end",id:"0"});z.enqueue({type:"finish",finishReason:W,providerMetadata:K,usage:Z})}})),request:{body:G},response:{headers:J}}}},nn8,rn8,an8=class{constructor($,Y){this.specificationVersion="v2",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=$,this.config=Y}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J;if($.length>this.maxEmbeddingsPerCall)throw new Hm({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:$});let Q=(J=await j9({provider:"openai",providerOptions:G,schema:nn8}))!=null?J:{},{responseHeaders:W,value:K,rawValue:Z}=await G8({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:o6(this.config.headers(),Y),body:{model:this.modelId,input:$,encoding_format:"float",dimensions:Q.dimensions,user:Q.user},failedResponseHandler:f3,successfulResponseHandler:C5(rn8),abortSignal:X,fetch:this.config.fetch});return{embeddings:K.data.map((H)=>H.embedding),usage:K.usage?{tokens:K.usage.prompt_tokens}:void 0,response:{headers:W,body:Z}}}},sn8,on8,tn8,QX4,en8,$r8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2"}get maxImagesPerCall(){var $;return($=on8[this.modelId])!=null?$:1}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,providerOptions:Q,headers:W,abortSignal:K}){var Z,H,z,V;let F=[];if(G!=null)F.push({type:"unsupported-setting",setting:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."});if(J!=null)F.push({type:"unsupported-setting",setting:"seed"});let L=(z=(H=(Z=this.config._internal)==null?void 0:Z.currentDate)==null?void 0:H.call(Z))!=null?z:new Date,N=(V=await j9({provider:"openai",providerOptions:Q,schema:en8}))!=null?V:{},{value:D,responseHeaders:A}=await G8({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:o6(this.config.headers(),W),body:{model:this.modelId,prompt:$,n:Y,size:X,quality:N.quality,style:N.style,background:N.background,moderation:N.moderation,output_format:N.outputFormat,output_compression:N.outputCompression,user:N.user,...!tn8.has(this.modelId)?{response_format:"b64_json"}:{}},failedResponseHandler:f3,successfulResponseHandler:C5(sn8),abortSignal:K,fetch:this.config.fetch});return{images:D.data.map((B)=>B.b64_json),warnings:F,response:{timestamp:L,modelId:this.modelId,headers:A},providerMetadata:{openai:{images:D.data.map((B,O)=>({...B.revised_prompt?{revisedPrompt:B.revised_prompt}:{},...D.created!=null?{created:D.created}:{},...D.size!=null?{size:D.size}:{},...D.quality!=null?{quality:D.quality}:{},...D.background!=null?{background:D.background}:{},...D.output_format!=null?{outputFormat:D.output_format}:{},...Yr8(D.usage,O,D.data.length)}))}}}}},Xr8,Gr8,vY4,Jr8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2"}get provider(){return this.config.provider}async getArgs({audio:$,mediaType:Y,providerOptions:X}){let G=[],J=await j9({provider:"openai",providerOptions:X,schema:Gr8}),Q=new FormData,W=$ instanceof Uint8Array?new Blob([$]):new Blob([b90($)]);Q.append("model",this.modelId);let K=C90(Y);if(Q.append("file",new File([W],"audio",{type:Y}),`audio.${K}`),J){let Z={include:J.include,language:J.language,prompt:J.prompt,response_format:["gpt-4o-transcribe","gpt-4o-mini-transcribe"].includes(this.modelId)?"json":"verbose_json",temperature:J.temperature,timestamp_granularities:J.timestampGranularities};for(let[H,z]of Object.entries(Z))if(z!=null)if(Array.isArray(z))for(let V of z)Q.append(`${H}[]`,String(V));else Q.append(H,String(z))}return{formData:Q,warnings:G}}async doGenerate($){var Y,X,G,J,Q,W,K,Z;let H=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,{formData:z,warnings:V}=await this.getArgs($),{value:F,responseHeaders:L,rawValue:N}=await v90({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),formData:z,failedResponseHandler:f3,successfulResponseHandler:C5(Xr8),abortSignal:$.abortSignal,fetch:this.config.fetch}),D=F.language!=null&&F.language in vY4?vY4[F.language]:void 0;return{text:F.text,segments:(K=(W=(J=F.segments)==null?void 0:J.map((A)=>({text:A.text,startSecond:A.start,endSecond:A.end})))!=null?W:(Q=F.words)==null?void 0:Q.map((A)=>({text:A.word,startSecond:A.start,endSecond:A.end})))!=null?K:[],language:D,durationInSeconds:(Z=F.duration)!=null?Z:void 0,warnings:V,response:{timestamp:H,modelId:this.modelId,headers:L,body:N}}}},Qr8,Wr8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2"}get provider(){return this.config.provider}async getArgs({text:$,voice:Y="alloy",outputFormat:X="mp3",speed:G,instructions:J,language:Q,providerOptions:W}){let K=[],Z=await j9({provider:"openai",providerOptions:W,schema:Qr8}),H={model:this.modelId,input:$,voice:Y,response_format:"mp3",speed:G,instructions:J};if(X)if(["mp3","opus","aac","flac","wav","pcm"].includes(X))H.response_format=X;else K.push({type:"unsupported-setting",setting:"outputFormat",details:`Unsupported output format: ${X}. Using mp3 instead.`});if(Z){let z={};for(let V in z){let F=z[V];if(F!==void 0)H[V]=F}}if(Q)K.push({type:"unsupported-setting",setting:"language",details:`OpenAI speech models do not support language selection. Language parameter "${Q}" was ignored.`});return{requestBody:H,warnings:K}}async doGenerate($){var Y,X,G;let J=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,{requestBody:Q,warnings:W}=await this.getArgs($),{value:K,responseHeaders:Z,rawValue:H}=await G8({url:this.config.url({path:"/audio/speech",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:Q,failedResponseHandler:f3,successfulResponseHandler:x90(),abortSignal:$.abortSignal,fetch:this.config.fetch});return{audio:K,warnings:W,request:{body:JSON.stringify(Q)},response:{timestamp:J,modelId:this.modelId,headers:Z,body:H}}}},WX4,KX4,Zr8,Ur8,Hr8,ZX4=20,zr8,Vr8,Fr8,Lr8,Dr8,Nr8=($={})=>{return Dr8($)},UX4,HX4,Ar8,Br8,Or8,Er8,Mr8,Rr8,qr8,Pr8,wr8,_r8,jr8,Tr8,Ir8,Cr8,Sr8=($={})=>{return Cr8($)},vr8=class{constructor($,Y){this.specificationVersion="v2",this.supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({maxOutputTokens:$,temperature:Y,stopSequences:X,topP:G,topK:J,presencePenalty:Q,frequencyPenalty:W,seed:K,prompt:Z,providerOptions:H,tools:z,toolChoice:V,responseFormat:F}){var L,N,D,A;let B=[],O=JX4(this.modelId);if(J!=null)B.push({type:"unsupported-setting",setting:"topK"});if(K!=null)B.push({type:"unsupported-setting",setting:"seed"});if(Q!=null)B.push({type:"unsupported-setting",setting:"presencePenalty"});if(W!=null)B.push({type:"unsupported-setting",setting:"frequencyPenalty"});if(X!=null)B.push({type:"unsupported-setting",setting:"stopSequences"});let E=await j9({provider:"openai",providerOptions:H,schema:zr8});if((E==null?void 0:E.conversation)&&(E==null?void 0:E.previousResponseId))B.push({type:"unsupported-setting",setting:"conversation",details:"conversation and previousResponseId cannot be used together"});let{input:M,warnings:R}=await Kr8({prompt:Z,systemMessageMode:O.systemMessageMode,fileIdPrefixes:this.config.fileIdPrefixes,store:(L=E==null?void 0:E.store)!=null?L:!0,hasLocalShellTool:w("openai.local_shell")});B.push(...R);let q=(N=E==null?void 0:E.strictJsonSchema)!=null?N:!1,_=E==null?void 0:E.include;function P(y){if(_==null)_=[y];else if(!_.includes(y))_=[..._,y]}function w(y){return(z==null?void 0:z.find((d)=>d.type==="provider-defined"&&d.id===y))!=null}let j=typeof(E==null?void 0:E.logprobs)==="number"?E==null?void 0:E.logprobs:(E==null?void 0:E.logprobs)===!0?ZX4:void 0;if(j)P("message.output_text.logprobs");let C=(D=z==null?void 0:z.find((y)=>y.type==="provider-defined"&&(y.id==="openai.web_search"||y.id==="openai.web_search_preview")))==null?void 0:D.name;if(C)P("web_search_call.action.sources");if(w("openai.code_interpreter"))P("code_interpreter_call.outputs");let k=E==null?void 0:E.store;if(k===!1&&O.isReasoningModel)P("reasoning.encrypted_content");let S={model:this.modelId,input:M,temperature:Y,top_p:G,max_output_tokens:$,...((F==null?void 0:F.type)==="json"||(E==null?void 0:E.textVerbosity))&&{text:{...(F==null?void 0:F.type)==="json"&&{format:F.schema!=null?{type:"json_schema",strict:q,name:(A=F.name)!=null?A:"response",description:F.description,schema:F.schema}:{type:"json_object"}},...(E==null?void 0:E.textVerbosity)&&{verbosity:E.textVerbosity}}},conversation:E==null?void 0:E.conversation,max_tool_calls:E==null?void 0:E.maxToolCalls,metadata:E==null?void 0:E.metadata,parallel_tool_calls:E==null?void 0:E.parallelToolCalls,previous_response_id:E==null?void 0:E.previousResponseId,store:k,user:E==null?void 0:E.user,instructions:E==null?void 0:E.instructions,service_tier:E==null?void 0:E.serviceTier,include:_,prompt_cache_key:E==null?void 0:E.promptCacheKey,prompt_cache_retention:E==null?void 0:E.promptCacheRetention,safety_identifier:E==null?void 0:E.safetyIdentifier,top_logprobs:j,truncation:E==null?void 0:E.truncation,...O.isReasoningModel&&((E==null?void 0:E.reasoningEffort)!=null||(E==null?void 0:E.reasoningSummary)!=null)&&{reasoning:{...(E==null?void 0:E.reasoningEffort)!=null&&{effort:E.reasoningEffort},...(E==null?void 0:E.reasoningSummary)!=null&&{summary:E.reasoningSummary}}}};if(O.isReasoningModel){if(!((E==null?void 0:E.reasoningEffort)==="none"&&O.supportsNonReasoningParameters)){if(S.temperature!=null)S.temperature=void 0,B.push({type:"unsupported-setting",setting:"temperature",details:"temperature is not supported for reasoning models"});if(S.top_p!=null)S.top_p=void 0,B.push({type:"unsupported-setting",setting:"topP",details:"topP is not supported for reasoning models"})}}else{if((E==null?void 0:E.reasoningEffort)!=null)B.push({type:"unsupported-setting",setting:"reasoningEffort",details:"reasoningEffort is not supported for non-reasoning models"});if((E==null?void 0:E.reasoningSummary)!=null)B.push({type:"unsupported-setting",setting:"reasoningSummary",details:"reasoningSummary is not supported for non-reasoning models"})}if((E==null?void 0:E.serviceTier)==="flex"&&!O.supportsFlexProcessing)B.push({type:"unsupported-setting",setting:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),delete S.service_tier;if((E==null?void 0:E.serviceTier)==="priority"&&!O.supportsPriorityProcessing)B.push({type:"unsupported-setting",setting:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),delete S.service_tier;let{tools:I,toolChoice:v,toolWarnings:x}=await kr8({tools:z,toolChoice:V,strictJsonSchema:q});return{webSearchToolName:C,args:{...S,tools:I,tool_choice:v},warnings:[...B,...x],store:k}}async doGenerate($){var Y,X,G,J,Q,W,K,Z,H,z,V,F,L,N,D,A,B,O,E,M,R,q,_,P,w,j,C,k;let{args:S,warnings:I,webSearchToolName:v}=await this.getArgs($),x=this.config.url({path:"/responses",modelId:this.modelId}),y=this.config.provider.replace(".responses",""),{responseHeaders:d,value:u,rawValue:b}=await G8({url:x,headers:o6(this.config.headers(),$.headers),body:S,failedResponseHandler:f3,successfulResponseHandler:C5(Hr8),abortSignal:$.abortSignal,fetch:this.config.fetch});if(u.error)throw new FY({message:u.error.message,url:x,requestBodyValues:S,statusCode:400,responseHeaders:d,responseBody:b,isRetryable:!1});let g=[],p=[],h=!1;for(let s of u.output)switch(s.type){case"reasoning":{if(s.summary.length===0)s.summary.push({type:"summary_text",text:""});for(let K0 of s.summary)g.push({type:"reasoning",text:K0.text,providerMetadata:{[y]:{itemId:s.id,reasoningEncryptedContent:(Y=s.encrypted_content)!=null?Y:null}}});break}case"image_generation_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:"image_generation",input:"{}",providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:"image_generation",result:{result:s.result},providerExecuted:!0});break}case"local_shell_call":{g.push({type:"tool-call",toolCallId:s.call_id,toolName:"local_shell",input:JSON.stringify({action:s.action}),providerMetadata:{[y]:{itemId:s.id}}});break}case"message":{for(let K0 of s.content){if(((G=(X=$.providerOptions)==null?void 0:X.openai)==null?void 0:G.logprobs)&&K0.logprobs)p.push(K0.logprobs);g.push({type:"text",text:K0.text,providerMetadata:{[y]:{itemId:s.id,...s.phase!=null&&{phase:s.phase}}}});for(let X0 of K0.annotations)if(X0.type==="url_citation")g.push({type:"source",sourceType:"url",id:(W=(Q=(J=this.config).generateId)==null?void 0:Q.call(J))!=null?W:_8(),url:X0.url,title:X0.title});else if(X0.type==="file_citation")g.push({type:"source",sourceType:"document",id:(H=(Z=(K=this.config).generateId)==null?void 0:Z.call(K))!=null?H:_8(),mediaType:"text/plain",title:(V=(z=X0.quote)!=null?z:X0.filename)!=null?V:"Document",filename:(F=X0.filename)!=null?F:X0.file_id,...X0.file_id?{providerMetadata:{[y]:{fileId:X0.file_id}}}:{}});else if(X0.type==="container_file_citation")g.push({type:"source",sourceType:"document",id:(D=(N=(L=this.config).generateId)==null?void 0:N.call(L))!=null?D:_8(),mediaType:"text/plain",title:(B=(A=X0.filename)!=null?A:X0.file_id)!=null?B:"Document",filename:(O=X0.filename)!=null?O:X0.file_id,providerMetadata:{[y]:{fileId:X0.file_id,containerId:X0.container_id,...X0.index!=null?{index:X0.index}:{}}}});else if(X0.type==="file_path")g.push({type:"source",sourceType:"document",id:(R=(M=(E=this.config).generateId)==null?void 0:M.call(E))!=null?R:_8(),mediaType:"application/octet-stream",title:X0.file_id,filename:X0.file_id,providerMetadata:{[y]:{fileId:X0.file_id,...X0.index!=null?{index:X0.index}:{}}}})}break}case"function_call":{h=!0,g.push({type:"tool-call",toolCallId:s.call_id,toolName:s.name,input:s.arguments,providerMetadata:{[y]:{itemId:s.id}}});break}case"web_search_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:v!=null?v:"web_search",input:JSON.stringify({}),providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:v!=null?v:"web_search",result:hY4(s.action),providerExecuted:!0});break}case"computer_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:"computer_use",input:"",providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:s.status||"completed"},providerExecuted:!0});break}case"file_search_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:"file_search",input:"{}",providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:"file_search",result:{queries:s.queries,results:(_=(q=s.results)==null?void 0:q.map((K0)=>({attributes:K0.attributes,fileId:K0.file_id,filename:K0.filename,score:K0.score,text:K0.text})))!=null?_:null},providerExecuted:!0});break}case"code_interpreter_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:"code_interpreter",input:JSON.stringify({code:s.code,containerId:s.container_id}),providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:"code_interpreter",result:{outputs:s.outputs},providerExecuted:!0});break}}let n={[y]:{...u.id!=null?{responseId:u.id}:{}}};if(p.length>0)n[y].logprobs=p;if(typeof u.service_tier==="string")n[y].serviceTier=u.service_tier;let t=u.usage;return{content:g,finishReason:yY4({finishReason:(P=u.incomplete_details)==null?void 0:P.reason,hasFunctionCall:h}),usage:{inputTokens:t.input_tokens,outputTokens:t.output_tokens,totalTokens:t.input_tokens+t.output_tokens,reasoningTokens:(j=(w=t.output_tokens_details)==null?void 0:w.reasoning_tokens)!=null?j:void 0,cachedInputTokens:(k=(C=t.input_tokens_details)==null?void 0:C.cached_tokens)!=null?k:void 0},request:{body:S},response:{id:u.id,timestamp:new Date(u.created_at*1000),modelId:u.model,headers:d,body:b},providerMetadata:n,warnings:I}}async doStream($){let{args:Y,warnings:X,webSearchToolName:G,store:J}=await this.getArgs($),{responseHeaders:Q,value:W}=await G8({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:{...Y,stream:!0},failedResponseHandler:f3,successfulResponseHandler:jQ(Ur8),abortSignal:$.abortSignal,fetch:this.config.fetch}),K=this,Z=this.config.provider.replace(".responses",""),H="unknown",z={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},V=[],F=null,L={},N=[],D,A=!1,B={},O;return{stream:W.pipeThrough(new TransformStream({start(E){E.enqueue({type:"stream-start",warnings:X})},transform(E,M){var R,q,_,P,w,j,C,k,S,I,v,x,y,d,u,b,g,p,h,n,t,s,K0,X0;if($.includeRawChunks)M.enqueue({type:"raw",rawValue:E.rawValue});if(!E.success){H="error",M.enqueue({type:"error",error:E.error});return}let a=E.value;if(bY4(a)){if(a.item.type==="function_call")L[a.output_index]={toolName:a.item.name,toolCallId:a.item.call_id},M.enqueue({type:"tool-input-start",id:a.item.call_id,toolName:a.item.name});else if(a.item.type==="web_search_call")L[a.output_index]={toolName:G!=null?G:"web_search",toolCallId:a.item.id},M.enqueue({type:"tool-input-start",id:a.item.id,toolName:G!=null?G:"web_search",providerExecuted:!0}),M.enqueue({type:"tool-input-end",id:a.item.id}),M.enqueue({type:"tool-call",toolCallId:a.item.id,toolName:G!=null?G:"web_search",input:JSON.stringify({}),providerExecuted:!0});else if(a.item.type==="computer_call")L[a.output_index]={toolName:"computer_use",toolCallId:a.item.id},M.enqueue({type:"tool-input-start",id:a.item.id,toolName:"computer_use",providerExecuted:!0});else if(a.item.type==="code_interpreter_call")L[a.output_index]={toolName:"code_interpreter",toolCallId:a.item.id,codeInterpreter:{containerId:a.item.container_id}},M.enqueue({type:"tool-input-start",id:a.item.id,toolName:"code_interpreter",providerExecuted:!0}),M.enqueue({type:"tool-input-delta",id:a.item.id,delta:`{"containerId":"${a.item.container_id}","code":"`});else if(a.item.type==="file_search_call")M.enqueue({type:"tool-call",toolCallId:a.item.id,toolName:"file_search",input:"{}",providerExecuted:!0});else if(a.item.type==="image_generation_call")M.enqueue({type:"tool-call",toolCallId:a.item.id,toolName:"image_generation",input:"{}",providerExecuted:!0});else if(a.item.type==="message")N.splice(0,N.length),D=(R=a.item.phase)!=null?R:void 0,M.enqueue({type:"text-start",id:a.item.id,providerMetadata:{[Z]:{itemId:a.item.id,...a.item.phase!=null&&{phase:a.item.phase}}}});else if(bY4(a)&&a.item.type==="reasoning")B[a.item.id]={encryptedContent:a.item.encrypted_content,summaryParts:{0:"active"}},M.enqueue({type:"reasoning-start",id:`${a.item.id}:0`,providerMetadata:{[Z]:{itemId:a.item.id,reasoningEncryptedContent:(q=a.item.encrypted_content)!=null?q:null}}})}else if(yr8(a)){if(a.item.type==="message"){let Q0=(_=a.item.phase)!=null?_:D;D=void 0,M.enqueue({type:"text-end",id:a.item.id,providerMetadata:{[Z]:{itemId:a.item.id,...Q0!=null&&{phase:Q0},...N.length>0&&{annotations:N}}}})}else if(a.item.type==="function_call")L[a.output_index]=void 0,A=!0,M.enqueue({type:"tool-input-end",id:a.item.call_id}),M.enqueue({type:"tool-call",toolCallId:a.item.call_id,toolName:a.item.name,input:a.item.arguments,providerMetadata:{[Z]:{itemId:a.item.id}}});else if(a.item.type==="web_search_call")L[a.output_index]=void 0,M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:G!=null?G:"web_search",result:hY4(a.item.action),providerExecuted:!0});else if(a.item.type==="computer_call")L[a.output_index]=void 0,M.enqueue({type:"tool-input-end",id:a.item.id}),M.enqueue({type:"tool-call",toolCallId:a.item.id,toolName:"computer_use",input:"",providerExecuted:!0}),M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:a.item.status||"completed"},providerExecuted:!0});else if(a.item.type==="file_search_call")L[a.output_index]=void 0,M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:"file_search",result:{queries:a.item.queries,results:(w=(P=a.item.results)==null?void 0:P.map((Q0)=>({attributes:Q0.attributes,fileId:Q0.file_id,filename:Q0.filename,score:Q0.score,text:Q0.text})))!=null?w:null},providerExecuted:!0});else if(a.item.type==="code_interpreter_call")L[a.output_index]=void 0,M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:"code_interpreter",result:{outputs:a.item.outputs},providerExecuted:!0});else if(a.item.type==="image_generation_call")M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:"image_generation",result:{result:a.item.result},providerExecuted:!0});else if(a.item.type==="local_shell_call")L[a.output_index]=void 0,M.enqueue({type:"tool-call",toolCallId:a.item.call_id,toolName:"local_shell",input:JSON.stringify({action:{type:"exec",command:a.item.action.command,timeoutMs:a.item.action.timeout_ms,user:a.item.action.user,workingDirectory:a.item.action.working_directory,env:a.item.action.env}}),providerMetadata:{[Z]:{itemId:a.item.id}}});else if(a.item.type==="reasoning"){let Q0=B[a.item.id],e=Object.entries(Q0.summaryParts).filter(([m,$0])=>$0==="active"||$0==="can-conclude").map(([m])=>m);for(let m of e)M.enqueue({type:"reasoning-end",id:`${a.item.id}:${m}`,providerMetadata:{[Z]:{itemId:a.item.id,reasoningEncryptedContent:(j=a.item.encrypted_content)!=null?j:null}}});delete B[a.item.id]}}else if(fr8(a)){let Q0=L[a.output_index];if(Q0!=null)M.enqueue({type:"tool-input-delta",id:Q0.toolCallId,delta:a.delta})}else if(gr8(a)){let Q0=L[a.output_index];if(Q0!=null)M.enqueue({type:"tool-input-delta",id:Q0.toolCallId,delta:JSON.stringify(a.delta).slice(1,-1)})}else if(mr8(a)){let Q0=L[a.output_index];if(Q0!=null)M.enqueue({type:"tool-input-delta",id:Q0.toolCallId,delta:'"}'}),M.enqueue({type:"tool-input-end",id:Q0.toolCallId}),M.enqueue({type:"tool-call",toolCallId:Q0.toolCallId,toolName:"code_interpreter",input:JSON.stringify({code:a.code,containerId:Q0.codeInterpreter.containerId}),providerExecuted:!0})}else if(hr8(a))F=a.response.id,M.enqueue({type:"response-metadata",id:a.response.id,timestamp:new Date(a.response.created_at*1000),modelId:a.response.model});else if(xr8(a)){if(M.enqueue({type:"text-delta",id:a.item_id,delta:a.delta}),((k=(C=$.providerOptions)==null?void 0:C.openai)==null?void 0:k.logprobs)&&a.logprobs)V.push(a.logprobs)}else if(a.type==="response.reasoning_summary_part.added"){if(a.summary_index>0){let Q0=B[a.item_id];Q0.summaryParts[a.summary_index]="active";for(let e of Object.keys(Q0.summaryParts))if(Q0.summaryParts[e]==="can-conclude")M.enqueue({type:"reasoning-end",id:`${a.item_id}:${e}`,providerMetadata:{[Z]:{itemId:a.item_id}}}),Q0.summaryParts[e]="concluded";M.enqueue({type:"reasoning-start",id:`${a.item_id}:${a.summary_index}`,providerMetadata:{[Z]:{itemId:a.item_id,reasoningEncryptedContent:(I=(S=B[a.item_id])==null?void 0:S.encryptedContent)!=null?I:null}}})}}else if(a.type==="response.reasoning_summary_text.delta")M.enqueue({type:"reasoning-delta",id:`${a.item_id}:${a.summary_index}`,delta:a.delta,providerMetadata:{[Z]:{itemId:a.item_id}}});else if(a.type==="response.reasoning_summary_part.done")if(J)M.enqueue({type:"reasoning-end",id:`${a.item_id}:${a.summary_index}`,providerMetadata:{[Z]:{itemId:a.item_id}}}),B[a.item_id].summaryParts[a.summary_index]="concluded";else B[a.item_id].summaryParts[a.summary_index]="can-conclude";else if(br8(a)){if(H=yY4({finishReason:(v=a.response.incomplete_details)==null?void 0:v.reason,hasFunctionCall:A}),z.inputTokens=a.response.usage.input_tokens,z.outputTokens=a.response.usage.output_tokens,z.totalTokens=a.response.usage.input_tokens+a.response.usage.output_tokens,z.reasoningTokens=(y=(x=a.response.usage.output_tokens_details)==null?void 0:x.reasoning_tokens)!=null?y:void 0,z.cachedInputTokens=(u=(d=a.response.usage.input_tokens_details)==null?void 0:d.cached_tokens)!=null?u:void 0,typeof a.response.service_tier==="string")O=a.response.service_tier}else if(ur8(a)){if(N.push(a.annotation),a.annotation.type==="url_citation")M.enqueue({type:"source",sourceType:"url",id:(p=(g=(b=K.config).generateId)==null?void 0:g.call(b))!=null?p:_8(),url:a.annotation.url,title:a.annotation.title});else if(a.annotation.type==="file_citation")M.enqueue({type:"source",sourceType:"document",id:(t=(n=(h=K.config).generateId)==null?void 0:n.call(h))!=null?t:_8(),mediaType:"text/plain",title:(K0=(s=a.annotation.quote)!=null?s:a.annotation.filename)!=null?K0:"Document",filename:(X0=a.annotation.filename)!=null?X0:a.annotation.file_id,...a.annotation.file_id?{providerMetadata:{[Z]:{fileId:a.annotation.file_id}}}:{}})}else if(pr8(a))M.enqueue({type:"error",error:a})},flush(E){let M={[Z]:{responseId:F}};if(V.length>0)M[Z].logprobs=V;if(O!==void 0)M[Z].serviceTier=O;E.enqueue({type:"finish",finishReason:H,usage:z,providerMetadata:M})}})),request:{body:Y},response:{headers:Q}}}},dr8,cr8="2.0.108",lr8,er8,Ya8,Xa8="api.openai.com",yb0,ME,dY4=class{specificationVersion="v1";provider;modelId;defaultObjectGenerationMode;supportsImageUrls;supportsStructuredOutputs;#$;constructor($){this.#$=$,this.provider=$.provider,this.modelId=$.modelId,this.defaultObjectGenerationMode=$.defaultObjectGenerationMode,this.supportsImageUrls=$.supportsImageUrls,this.supportsStructuredOutputs=$.supportsStructuredOutputs}supportsUrl($){return this.#$.supportsUrl?.($)??!1}doGenerate($){return this.#$.doGenerate($)}doStream($){return this.#$.doStream($)}serializeForSpan(){return{specificationVersion:this.specificationVersion,modelId:this.modelId,provider:this.provider}}},Za8="2.0.72",Ua8,wm,Ha8,za8,Va8=class{constructor($,Y){this.specificationVersion="v2",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=$,this.config=Y}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){let J=await j9({provider:"google",providerOptions:G,schema:za8});if($.length>this.maxEmbeddingsPerCall)throw new Hm({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:$});let Q=o6(await XT(this.config.headers),Y),W=J==null?void 0:J.content;if(W!=null&&W.length!==$.length)throw Error(`The number of multimodal content entries (${W.length}) must match the number of values (${$.length}).`);if($.length===1){let z=W==null?void 0:W[0],V=$[0]?[{text:$[0]}]:[],F=z!=null?[...V,...z]:[{text:$[0]}],{responseHeaders:L,value:N,rawValue:D}=await G8({url:`${this.config.baseURL}/models/${this.modelId}:embedContent`,headers:Q,body:{model:`models/${this.modelId}`,content:{parts:F},outputDimensionality:J==null?void 0:J.outputDimensionality,taskType:J==null?void 0:J.taskType},failedResponseHandler:wm,successfulResponseHandler:C5(La8),abortSignal:X,fetch:this.config.fetch});return{embeddings:[N.embedding.values],usage:void 0,response:{headers:L,body:D}}}let{responseHeaders:K,value:Z,rawValue:H}=await G8({url:`${this.config.baseURL}/models/${this.modelId}:batchEmbedContents`,headers:Q,body:{requests:$.map((z,V)=>{let F=W==null?void 0:W[V],L=z?[{text:z}]:[];return{model:`models/${this.modelId}`,content:{role:"user",parts:F!=null?[...L,...F]:[{text:z}]},outputDimensionality:J==null?void 0:J.outputDimensionality,taskType:J==null?void 0:J.taskType}})},failedResponseHandler:wm,successfulResponseHandler:C5(Fa8),abortSignal:X,fetch:this.config.fetch});return{embeddings:Z.embeddings.map((z)=>z.values),usage:void 0,response:{headers:K,body:H}}}},Fa8,La8,Oa8,Ea8,Ra8=class{constructor($,Y){this.specificationVersion="v2";var X;this.modelId=$,this.config=Y,this.generateId=(X=Y.generateId)!=null?X:_8}get provider(){return this.config.provider}get supportedUrls(){var $,Y,X;return(X=(Y=($=this.config).supportedUrls)==null?void 0:Y.call($))!=null?X:{}}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:K,responseFormat:Z,seed:H,tools:z,toolChoice:V,providerOptions:F}){var L;let N=[],D=await j9({provider:"google",providerOptions:F,schema:Oa8}),A=this.config.provider.startsWith("google.vertex.");if((z==null?void 0:z.some((w)=>w.type==="provider-defined"&&w.id==="google.vertex_rag_store"))&&!A)N.push({type:"other",message:`The 'vertex_rag_store' tool is only supported with the Google Vertex provider and might not be supported or could behave unexpectedly with the current Google provider (${this.config.provider}).`});let B=D==null?void 0:D.serviceTier;if((D==null?void 0:D.serviceTier)&&A)B=Ea8[D.serviceTier];let O=this.modelId.toLowerCase().startsWith("gemma-"),E=this.modelId.startsWith("gemini-3"),{contents:M,systemInstruction:R}=Na8($,{isGemmaModel:O,supportsFunctionResponseParts:E}),{tools:q,toolConfig:_,toolWarnings:P}=Ma8({tools:z,toolChoice:V,modelId:this.modelId});return{args:{generationConfig:{maxOutputTokens:Y,temperature:X,topK:J,topP:G,frequencyPenalty:Q,presencePenalty:W,stopSequences:K,seed:H,responseMimeType:(Z==null?void 0:Z.type)==="json"?"application/json":void 0,responseSchema:(Z==null?void 0:Z.type)==="json"&&Z.schema!=null&&((L=D==null?void 0:D.structuredOutputs)!=null?L:!0)?h3(Z.schema):void 0,...(D==null?void 0:D.audioTimestamp)&&{audioTimestamp:D.audioTimestamp},responseModalities:D==null?void 0:D.responseModalities,thinkingConfig:D==null?void 0:D.thinkingConfig,...(D==null?void 0:D.imageConfig)&&{imageConfig:D.imageConfig},...(D==null?void 0:D.mediaResolution)&&{mediaResolution:D.mediaResolution}},contents:M,systemInstruction:O?void 0:R,safetySettings:D==null?void 0:D.safetySettings,tools:q,toolConfig:(D==null?void 0:D.retrievalConfig)?{..._,retrievalConfig:D.retrievalConfig}:_,cachedContent:D==null?void 0:D.cachedContent,labels:D==null?void 0:D.labels,serviceTier:B},warnings:[...N,...P]}}async doGenerate($){var Y,X,G,J,Q,W,K,Z,H,z,V,F,L,N;let{args:D,warnings:A}=await this.getArgs($),B=JSON.stringify(D),O=o6(await XT(this.config.headers),$.headers),{responseHeaders:E,value:M,rawValue:R}=await G8({url:`${this.config.baseURL}/${cY4(this.modelId)}:generateContent`,headers:O,body:D,failedResponseHandler:wm,successfulResponseHandler:C5(Pa8),abortSignal:$.abortSignal,fetch:this.config.fetch}),q=M.candidates[0],_=[],P=(X=(Y=q.content)==null?void 0:Y.parts)!=null?X:[],w=M.usageMetadata,j;for(let k of P)if("executableCode"in k&&((G=k.executableCode)==null?void 0:G.code)){let S=this.config.generateId();j=S,_.push({type:"tool-call",toolCallId:S,toolName:"code_execution",input:JSON.stringify(k.executableCode),providerExecuted:!0})}else if("codeExecutionResult"in k&&k.codeExecutionResult)_.push({type:"tool-result",toolCallId:j,toolName:"code_execution",result:{outcome:k.codeExecutionResult.outcome,output:k.codeExecutionResult.output},providerExecuted:!0}),j=void 0;else if("text"in k&&k.text!=null){let S=k.thoughtSignature?{google:{thoughtSignature:k.thoughtSignature}}:void 0;if(k.text.length===0){if(S!=null&&_.length>0){let I=_[_.length-1];if(I.type!=="file")I.providerMetadata=S}}else _.push({type:k.thought===!0?"reasoning":"text",text:k.text,providerMetadata:S})}else if("functionCall"in k)_.push({type:"tool-call",toolCallId:this.config.generateId(),toolName:k.functionCall.name,input:JSON.stringify(k.functionCall.args),providerMetadata:k.thoughtSignature?{google:{thoughtSignature:k.thoughtSignature}}:void 0});else if("inlineData"in k)_.push({type:"file",data:k.inlineData.data,mediaType:k.inlineData.mimeType});let C=(J=iY4({groundingMetadata:q.groundingMetadata,generateId:this.config.generateId}))!=null?J:[];for(let k of C)_.push(k);return{content:_,finishReason:lY4({finishReason:q.finishReason,hasToolCalls:_.some((k)=>k.type==="tool-call")}),usage:{inputTokens:(Q=w==null?void 0:w.promptTokenCount)!=null?Q:void 0,outputTokens:(W=w==null?void 0:w.candidatesTokenCount)!=null?W:void 0,totalTokens:(K=w==null?void 0:w.totalTokenCount)!=null?K:void 0,reasoningTokens:(Z=w==null?void 0:w.thoughtsTokenCount)!=null?Z:void 0,cachedInputTokens:(H=w==null?void 0:w.cachedContentTokenCount)!=null?H:void 0},warnings:A,providerMetadata:{google:{promptFeedback:(z=M.promptFeedback)!=null?z:null,groundingMetadata:(V=q.groundingMetadata)!=null?V:null,urlContextMetadata:(F=q.urlContextMetadata)!=null?F:null,safetyRatings:(L=q.safetyRatings)!=null?L:null,serviceTier:(N=M.serviceTier)!=null?N:null}},request:{body:B},response:{headers:E,body:R}}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G=JSON.stringify(Y),J=o6(await XT(this.config.headers),$.headers),{responseHeaders:Q,value:W}=await G8({url:`${this.config.baseURL}/${cY4(this.modelId)}:streamGenerateContent?alt=sse`,headers:J,body:Y,failedResponseHandler:wm,successfulResponseHandler:jQ(wa8),abortSignal:$.abortSignal,fetch:this.config.fetch}),K="unknown",Z={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},H=void 0,z=null,V=null,F=null,L=this.config.generateId,N=!1,D=null,A=null,B=0,O=new Set,E;return{stream:W.pipeThrough(new TransformStream({start(M){M.enqueue({type:"stream-start",warnings:X})},transform(M,R){var q,_,P,w,j,C,k,S,I,v;if($.includeRawChunks)R.enqueue({type:"raw",rawValue:M.rawValue});if(!M.success){R.enqueue({type:"error",error:M.error});return}let x=M.value,y=x.usageMetadata;if(y!=null)Z.inputTokens=(q=y.promptTokenCount)!=null?q:void 0,Z.outputTokens=(_=y.candidatesTokenCount)!=null?_:void 0,Z.totalTokens=(P=y.totalTokenCount)!=null?P:void 0,Z.reasoningTokens=(w=y.thoughtsTokenCount)!=null?w:void 0,Z.cachedInputTokens=(j=y.cachedContentTokenCount)!=null?j:void 0;if(x.serviceTier!=null)F=x.serviceTier;let d=(C=x.candidates)==null?void 0:C[0];if(d==null)return;let u=d.content;if(d.groundingMetadata!=null)z=d.groundingMetadata;if(d.urlContextMetadata!=null)V=d.urlContextMetadata;let b=iY4({groundingMetadata:d.groundingMetadata,generateId:L});if(b!=null){for(let g of b)if(g.sourceType==="url"&&!O.has(g.url))O.add(g.url),R.enqueue(g)}if(u!=null){let g=(k=u.parts)!=null?k:[];for(let h of g)if("executableCode"in h&&((S=h.executableCode)==null?void 0:S.code)){let n=L();E=n,R.enqueue({type:"tool-call",toolCallId:n,toolName:"code_execution",input:JSON.stringify(h.executableCode),providerExecuted:!0}),N=!0}else if("codeExecutionResult"in h&&h.codeExecutionResult){let n=E;if(n)R.enqueue({type:"tool-result",toolCallId:n,toolName:"code_execution",result:{outcome:h.codeExecutionResult.outcome,output:h.codeExecutionResult.output},providerExecuted:!0}),E=void 0}else if("text"in h&&h.text!=null){let n=h.thoughtSignature?{google:{thoughtSignature:h.thoughtSignature}}:void 0;if(h.text.length===0){if(n!=null&&D!==null)R.enqueue({type:"text-delta",id:D,delta:"",providerMetadata:n})}else if(h.thought===!0){if(D!==null)R.enqueue({type:"text-end",id:D}),D=null;if(A===null)A=String(B++),R.enqueue({type:"reasoning-start",id:A,providerMetadata:n});R.enqueue({type:"reasoning-delta",id:A,delta:h.text,providerMetadata:n})}else{if(A!==null)R.enqueue({type:"reasoning-end",id:A}),A=null;if(D===null)D=String(B++),R.enqueue({type:"text-start",id:D,providerMetadata:n});R.enqueue({type:"text-delta",id:D,delta:h.text,providerMetadata:n})}}else if("inlineData"in h)R.enqueue({type:"file",mediaType:h.inlineData.mimeType,data:h.inlineData.data});let p=qa8({parts:u.parts,generateId:L});if(p!=null)for(let h of p)R.enqueue({type:"tool-input-start",id:h.toolCallId,toolName:h.toolName,providerMetadata:h.providerMetadata}),R.enqueue({type:"tool-input-delta",id:h.toolCallId,delta:h.args,providerMetadata:h.providerMetadata}),R.enqueue({type:"tool-input-end",id:h.toolCallId,providerMetadata:h.providerMetadata}),R.enqueue({type:"tool-call",toolCallId:h.toolCallId,toolName:h.toolName,input:h.args,providerMetadata:h.providerMetadata}),N=!0}if(d.finishReason!=null){if(K=lY4({finishReason:d.finishReason,hasToolCalls:N}),H={google:{promptFeedback:(I=x.promptFeedback)!=null?I:null,groundingMetadata:z,urlContextMetadata:V,safetyRatings:(v=d.safetyRatings)!=null?v:null,serviceTier:F}},y!=null)H.google.usageMetadata=y}},flush(M){if(D!==null)M.enqueue({type:"text-end",id:D});if(A!==null)M.enqueue({type:"reasoning-end",id:A});M.enqueue({type:"finish",finishReason:K,usage:Z,providerMetadata:H})}})),response:{headers:Q},request:{body:G}}}},FX4=()=>U.object({webSearchQueries:U.array(U.string()).nullish(),imageSearchQueries:U.array(U.string()).nullish(),retrievalQueries:U.array(U.string()).nullish(),searchEntryPoint:U.object({renderedContent:U.string()}).nullish(),groundingChunks:U.array(U.object({web:U.object({uri:U.string(),title:U.string().nullish()}).nullish(),image:U.object({sourceUri:U.string(),imageUri:U.string(),title:U.string().nullish(),domain:U.string().nullish()}).nullish(),retrievedContext:U.object({uri:U.string().nullish(),title:U.string().nullish(),text:U.string().nullish(),fileSearchStore:U.string().nullish()}).nullish(),maps:U.object({uri:U.string().nullish(),title:U.string().nullish(),text:U.string().nullish(),placeId:U.string().nullish()}).nullish()})).nullish(),groundingSupports:U.array(U.object({segment:U.object({startIndex:U.number().nullish(),endIndex:U.number().nullish(),text:U.string().nullish()}).nullish(),segment_text:U.string().nullish(),groundingChunkIndices:U.array(U.number()).nullish(),supportChunkIndices:U.array(U.number()).nullish(),confidenceScores:U.array(U.number()).nullish(),confidenceScore:U.array(U.number()).nullish()})).nullish(),retrievalMetadata:U.union([U.object({webDynamicRetrievalScore:U.number()}),U.object({})]).nullish()}),LX4=()=>U.object({parts:U.array(U.union([U.object({functionCall:U.object({name:U.string(),args:U.unknown()}),thoughtSignature:U.string().nullish()}),U.object({inlineData:U.object({mimeType:U.string(),data:U.string()})}),U.object({executableCode:U.object({language:U.string(),code:U.string()}).nullish(),codeExecutionResult:U.object({outcome:U.string(),output:U.string()}).nullish(),text:U.string().nullish(),thought:U.boolean().nullish(),thoughtSignature:U.string().nullish()})])).nullish()}),D50=()=>U.object({category:U.string().nullish(),probability:U.string().nullish(),probabilityScore:U.number().nullish(),severity:U.string().nullish(),severityScore:U.number().nullish(),blocked:U.boolean().nullish()}),nY4,DX4,NX4=()=>U.object({urlMetadata:U.array(U.object({retrievedUrl:U.string(),urlRetrievalStatus:U.string()}))}),Pa8,wa8,_a8,ja8,Ta8,Ia8,Ca8,Sa8,ka8,va8,xa8,ya8,ba8,ha8,fa8=class{constructor($,Y,X){this.modelId=$,this.settings=Y,this.config=X,this.specificationVersion="v2"}get maxImagesPerCall(){var $;return($=this.settings.maxImagesPerCall)!=null?$:4}get provider(){return this.config.provider}async doGenerate($){var Y,X,G;let{prompt:J,n:Q=1,size:W="1024x1024",aspectRatio:K="1:1",seed:Z,providerOptions:H,headers:z,abortSignal:V}=$,F=[];if(W!=null)F.push({type:"unsupported-setting",setting:"size",details:"This model does not support the `size` option. Use `aspectRatio` instead."});if(Z!=null)F.push({type:"unsupported-setting",setting:"seed",details:"This model does not support the `seed` option through this provider."});let L=await j9({provider:"google",providerOptions:H,schema:ma8}),N=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,D={sampleCount:Q};if(K!=null)D.aspectRatio=K;if(L)Object.assign(D,L);let A={instances:[{prompt:J}],parameters:D},{responseHeaders:B,value:O}=await G8({url:`${this.config.baseURL}/models/${this.modelId}:predict`,headers:o6(await XT(this.config.headers),z),body:A,failedResponseHandler:wm,successfulResponseHandler:C5(ga8),abortSignal:V,fetch:this.config.fetch});return{images:O.predictions.map((E)=>E.bytesBase64Encoded),warnings:F!=null?F:[],providerMetadata:{google:{images:O.predictions.map((E)=>({}))}},response:{timestamp:N,modelId:this.modelId,headers:B}}}},ga8,ma8,fb0,g3,pa8,da8,ca8,ia8=class{constructor($,Y){this.specificationVersion="v2",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:K,responseFormat:Z,seed:H,tools:z,toolChoice:V,providerOptions:F}){var L,N,D,A;let B=[],O=(L=await j9({provider:"openai",providerOptions:F,schema:ca8}))!=null?L:{},E=(N=O.structuredOutputs)!=null?N:!0,M=BX4(this.modelId);if(J!=null)B.push({type:"unsupported-setting",setting:"topK"});if((Z==null?void 0:Z.type)==="json"&&Z.schema!=null&&!E)B.push({type:"unsupported-setting",setting:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{messages:R,warnings:q}=ua8({prompt:$,systemMessageMode:M.systemMessageMode});B.push(...q);let _=(D=O.strictJsonSchema)!=null?D:!1,P={model:this.modelId,logit_bias:O.logitBias,logprobs:O.logprobs===!0||typeof O.logprobs==="number"?!0:void 0,top_logprobs:typeof O.logprobs==="number"?O.logprobs:typeof O.logprobs==="boolean"?O.logprobs?0:void 0:void 0,user:O.user,parallel_tool_calls:O.parallelToolCalls,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,response_format:(Z==null?void 0:Z.type)==="json"?E&&Z.schema!=null?{type:"json_schema",json_schema:{schema:Z.schema,strict:_,name:(A=Z.name)!=null?A:"response",description:Z.description}}:{type:"json_object"}:void 0,stop:K,seed:H,verbosity:O.textVerbosity,max_completion_tokens:O.maxCompletionTokens,store:O.store,metadata:O.metadata,prediction:O.prediction,reasoning_effort:O.reasoningEffort,service_tier:O.serviceTier,prompt_cache_key:O.promptCacheKey,prompt_cache_retention:O.promptCacheRetention,safety_identifier:O.safetyIdentifier,messages:R};if(M.isReasoningModel){if(O.reasoningEffort!=="none"||!M.supportsNonReasoningParameters){if(P.temperature!=null)P.temperature=void 0,B.push({type:"unsupported-setting",setting:"temperature",details:"temperature is not supported for reasoning models"});if(P.top_p!=null)P.top_p=void 0,B.push({type:"unsupported-setting",setting:"topP",details:"topP is not supported for reasoning models"});if(P.logprobs!=null)P.logprobs=void 0,B.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(P.frequency_penalty!=null)P.frequency_penalty=void 0,B.push({type:"unsupported-setting",setting:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(P.presence_penalty!=null)P.presence_penalty=void 0,B.push({type:"unsupported-setting",setting:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(P.logit_bias!=null)P.logit_bias=void 0,B.push({type:"other",message:"logitBias is not supported for reasoning models"});if(P.top_logprobs!=null)P.top_logprobs=void 0,B.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(P.max_tokens!=null){if(P.max_completion_tokens==null)P.max_completion_tokens=P.max_tokens;P.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(P.temperature!=null)P.temperature=void 0,B.push({type:"unsupported-setting",setting:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(O.serviceTier==="flex"&&!M.supportsFlexProcessing)B.push({type:"unsupported-setting",setting:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),P.service_tier=void 0;if(O.serviceTier==="priority"&&!M.supportsPriorityProcessing)B.push({type:"unsupported-setting",setting:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),P.service_tier=void 0;let{tools:w,toolChoice:j,toolWarnings:C}=la8({tools:z,toolChoice:V,structuredOutputs:E,strictJsonSchema:_});return{args:{...P,tools:w,tool_choice:j},warnings:[...B,...C]}}async doGenerate($){var Y,X,G,J,Q,W,K,Z,H,z,V,F,L,N;let{args:D,warnings:A}=await this.getArgs($),{responseHeaders:B,value:O,rawValue:E}=await G8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:D,failedResponseHandler:g3,successfulResponseHandler:C5(pa8),abortSignal:$.abortSignal,fetch:this.config.fetch}),M=O.choices[0],R=[],q=M.message.content;if(q!=null&&q.length>0)R.push({type:"text",text:q});for(let j of(Y=M.message.tool_calls)!=null?Y:[])R.push({type:"tool-call",toolCallId:(X=j.id)!=null?X:_8(),toolName:j.function.name,input:j.function.arguments});for(let j of(G=M.message.annotations)!=null?G:[])R.push({type:"source",sourceType:"url",id:_8(),url:j.url_citation.url,title:j.url_citation.title});let _=(J=O.usage)==null?void 0:J.completion_tokens_details,P=(Q=O.usage)==null?void 0:Q.prompt_tokens_details,w={openai:{}};if((_==null?void 0:_.accepted_prediction_tokens)!=null)w.openai.acceptedPredictionTokens=_==null?void 0:_.accepted_prediction_tokens;if((_==null?void 0:_.rejected_prediction_tokens)!=null)w.openai.rejectedPredictionTokens=_==null?void 0:_.rejected_prediction_tokens;if(((W=M.logprobs)==null?void 0:W.content)!=null)w.openai.logprobs=M.logprobs.content;return{content:R,finishReason:rY4(M.finish_reason),usage:{inputTokens:(Z=(K=O.usage)==null?void 0:K.prompt_tokens)!=null?Z:void 0,outputTokens:(z=(H=O.usage)==null?void 0:H.completion_tokens)!=null?z:void 0,totalTokens:(F=(V=O.usage)==null?void 0:V.total_tokens)!=null?F:void 0,reasoningTokens:(L=_==null?void 0:_.reasoning_tokens)!=null?L:void 0,cachedInputTokens:(N=P==null?void 0:P.cached_tokens)!=null?N:void 0},request:{body:D},response:{...xb0(O),headers:B,body:E},warnings:A,providerMetadata:w}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:Q}=await G8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:G,failedResponseHandler:g3,successfulResponseHandler:jQ(da8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W=[],K="unknown",Z={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},H=!1,z=!1,V={openai:{}};return{stream:Q.pipeThrough(new TransformStream({start(F){F.enqueue({type:"stream-start",warnings:X})},transform(F,L){var N,D,A,B,O,E,M,R,q,_,P,w,j,C,k,S,I,v,x,y,d,u,b,g;if($.includeRawChunks)L.enqueue({type:"raw",rawValue:F.rawValue});if(!F.success){K="error",L.enqueue({type:"error",error:F.error});return}let p=F.value;if("error"in p){K="error",L.enqueue({type:"error",error:p.error});return}if(!H){let t=xb0(p);if(Object.values(t).some(Boolean))H=!0,L.enqueue({type:"response-metadata",...xb0(p)})}if(p.usage!=null){if(Z.inputTokens=(N=p.usage.prompt_tokens)!=null?N:void 0,Z.outputTokens=(D=p.usage.completion_tokens)!=null?D:void 0,Z.totalTokens=(A=p.usage.total_tokens)!=null?A:void 0,Z.reasoningTokens=(O=(B=p.usage.completion_tokens_details)==null?void 0:B.reasoning_tokens)!=null?O:void 0,Z.cachedInputTokens=(M=(E=p.usage.prompt_tokens_details)==null?void 0:E.cached_tokens)!=null?M:void 0,((R=p.usage.completion_tokens_details)==null?void 0:R.accepted_prediction_tokens)!=null)V.openai.acceptedPredictionTokens=(q=p.usage.completion_tokens_details)==null?void 0:q.accepted_prediction_tokens;if(((_=p.usage.completion_tokens_details)==null?void 0:_.rejected_prediction_tokens)!=null)V.openai.rejectedPredictionTokens=(P=p.usage.completion_tokens_details)==null?void 0:P.rejected_prediction_tokens}let h=p.choices[0];if((h==null?void 0:h.finish_reason)!=null)K=rY4(h.finish_reason);if(((w=h==null?void 0:h.logprobs)==null?void 0:w.content)!=null)V.openai.logprobs=h.logprobs.content;if((h==null?void 0:h.delta)==null)return;let n=h.delta;if(n.content!=null){if(!z)L.enqueue({type:"text-start",id:"0"}),z=!0;L.enqueue({type:"text-delta",id:"0",delta:n.content})}if(n.tool_calls!=null)for(let t of n.tool_calls){let s=t.index;if(W[s]==null){if(t.type!=null&&t.type!=="function")throw new s2({data:t,message:"Expected 'function' type."});if(t.id==null)throw new s2({data:t,message:"Expected 'id' to be a string."});if(((j=t.function)==null?void 0:j.name)==null)throw new s2({data:t,message:"Expected 'function.name' to be a string."});L.enqueue({type:"tool-input-start",id:t.id,toolName:t.function.name}),W[s]={id:t.id,type:"function",function:{name:t.function.name,arguments:(C=t.function.arguments)!=null?C:""},hasFinished:!1};let X0=W[s];if(((k=X0.function)==null?void 0:k.name)!=null&&((S=X0.function)==null?void 0:S.arguments)!=null){if(X0.function.arguments.length>0)L.enqueue({type:"tool-input-delta",id:X0.id,delta:X0.function.arguments});if(iZ(X0.function.arguments))L.enqueue({type:"tool-input-end",id:X0.id}),L.enqueue({type:"tool-call",toolCallId:(I=X0.id)!=null?I:_8(),toolName:X0.function.name,input:X0.function.arguments}),X0.hasFinished=!0}continue}let K0=W[s];if(K0.hasFinished)continue;if(((v=t.function)==null?void 0:v.arguments)!=null)K0.function.arguments+=(y=(x=t.function)==null?void 0:x.arguments)!=null?y:"";if(L.enqueue({type:"tool-input-delta",id:K0.id,delta:(d=t.function.arguments)!=null?d:""}),((u=K0.function)==null?void 0:u.name)!=null&&((b=K0.function)==null?void 0:b.arguments)!=null&&iZ(K0.function.arguments))L.enqueue({type:"tool-input-end",id:K0.id}),L.enqueue({type:"tool-call",toolCallId:(g=K0.id)!=null?g:_8(),toolName:K0.function.name,input:K0.function.arguments}),K0.hasFinished=!0}if(n.annotations!=null)for(let t of n.annotations)L.enqueue({type:"source",sourceType:"url",id:_8(),url:t.url_citation.url,title:t.url_citation.title})},flush(F){if(z)F.enqueue({type:"text-end",id:"0"});F.enqueue({type:"finish",finishReason:K,usage:Z,...V!=null?{providerMetadata:V}:{}})}})),request:{body:G},response:{headers:J}}}},ra8,aa8,oY4,sa8=class{constructor($,Y){this.specificationVersion="v2",this.supportedUrls={},this.modelId=$,this.config=Y}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:K,responseFormat:Z,tools:H,toolChoice:z,seed:V,providerOptions:F}){let L=[],N={...await j9({provider:"openai",providerOptions:F,schema:oY4}),...await j9({provider:this.providerOptionsName,providerOptions:F,schema:oY4})};if(J!=null)L.push({type:"unsupported-setting",setting:"topK"});if(H==null?void 0:H.length)L.push({type:"unsupported-setting",setting:"tools"});if(z!=null)L.push({type:"unsupported-setting",setting:"toolChoice"});if(Z!=null&&Z.type!=="text")L.push({type:"unsupported-setting",setting:"responseFormat",details:"JSON response format is not supported."});let{prompt:D,stopSequences:A}=na8({prompt:$}),B=[...A!=null?A:[],...K!=null?K:[]];return{args:{model:this.modelId,echo:N.echo,logit_bias:N.logitBias,logprobs:(N==null?void 0:N.logprobs)===!0?0:(N==null?void 0:N.logprobs)===!1?void 0:N==null?void 0:N.logprobs,suffix:N.suffix,user:N.user,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,seed:V,prompt:D,stop:B.length>0?B:void 0},warnings:L}}async doGenerate($){var Y,X,G;let{args:J,warnings:Q}=await this.getArgs($),{responseHeaders:W,value:K,rawValue:Z}=await G8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:J,failedResponseHandler:g3,successfulResponseHandler:C5(ra8),abortSignal:$.abortSignal,fetch:this.config.fetch}),H=K.choices[0],z={openai:{}};if(H.logprobs!=null)z.openai.logprobs=H.logprobs;return{content:[{type:"text",text:H.text}],usage:{inputTokens:(Y=K.usage)==null?void 0:Y.prompt_tokens,outputTokens:(X=K.usage)==null?void 0:X.completion_tokens,totalTokens:(G=K.usage)==null?void 0:G.total_tokens},finishReason:sY4(H.finish_reason),request:{body:J},response:{...aY4(K),headers:W,body:Z},providerMetadata:z,warnings:Q}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:Q}=await G8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:G,failedResponseHandler:g3,successfulResponseHandler:jQ(aa8),abortSignal:$.abortSignal,fetch:this.config.fetch}),W="unknown",K={openai:{}},Z={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},H=!0;return{stream:Q.pipeThrough(new TransformStream({start(z){z.enqueue({type:"stream-start",warnings:X})},transform(z,V){if($.includeRawChunks)V.enqueue({type:"raw",rawValue:z.rawValue});if(!z.success){W="error",V.enqueue({type:"error",error:z.error});return}let F=z.value;if("error"in F){W="error",V.enqueue({type:"error",error:F.error});return}if(H)H=!1,V.enqueue({type:"response-metadata",...aY4(F)}),V.enqueue({type:"text-start",id:"0"});if(F.usage!=null)Z.inputTokens=F.usage.prompt_tokens,Z.outputTokens=F.usage.completion_tokens,Z.totalTokens=F.usage.total_tokens;let L=F.choices[0];if((L==null?void 0:L.finish_reason)!=null)W=sY4(L.finish_reason);if((L==null?void 0:L.logprobs)!=null)K.openai.logprobs=L.logprobs;if((L==null?void 0:L.text)!=null&&L.text.length>0)V.enqueue({type:"text-delta",id:"0",delta:L.text})},flush(z){if(!H)z.enqueue({type:"text-end",id:"0"});z.enqueue({type:"finish",finishReason:W,providerMetadata:K,usage:Z})}})),request:{body:G},response:{headers:J}}}},oa8,ta8,ea8=class{constructor($,Y){this.specificationVersion="v2",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=$,this.config=Y}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J;if($.length>this.maxEmbeddingsPerCall)throw new Hm({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:$});let Q=(J=await j9({provider:"openai",providerOptions:G,schema:oa8}))!=null?J:{},{responseHeaders:W,value:K,rawValue:Z}=await G8({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:o6(this.config.headers(),Y),body:{model:this.modelId,input:$,encoding_format:"float",dimensions:Q.dimensions,user:Q.user},failedResponseHandler:g3,successfulResponseHandler:C5(ta8),abortSignal:X,fetch:this.config.fetch});return{embeddings:K.data.map((H)=>H.embedding),usage:K.usage?{tokens:K.usage.prompt_tokens}:void 0,response:{headers:W,body:Z}}}},$s8,Ys8,Xs8,OX4,Gs8,Js8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2"}get maxImagesPerCall(){var $;return($=Ys8[this.modelId])!=null?$:1}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,providerOptions:Q,headers:W,abortSignal:K}){var Z,H,z,V;let F=[];if(G!=null)F.push({type:"unsupported-setting",setting:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."});if(J!=null)F.push({type:"unsupported-setting",setting:"seed"});let L=(z=(H=(Z=this.config._internal)==null?void 0:Z.currentDate)==null?void 0:H.call(Z))!=null?z:new Date,N=(V=await j9({provider:"openai",providerOptions:Q,schema:Gs8}))!=null?V:{},{value:D,responseHeaders:A}=await G8({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:o6(this.config.headers(),W),body:{model:this.modelId,prompt:$,n:Y,size:X,quality:N.quality,style:N.style,background:N.background,moderation:N.moderation,output_format:N.outputFormat,output_compression:N.outputCompression,user:N.user,...!Xs8.has(this.modelId)?{response_format:"b64_json"}:{}},failedResponseHandler:g3,successfulResponseHandler:C5($s8),abortSignal:K,fetch:this.config.fetch});return{images:D.data.map((B)=>B.b64_json),warnings:F,response:{timestamp:L,modelId:this.modelId,headers:A},providerMetadata:{openai:{images:D.data.map((B,O)=>({...B.revised_prompt?{revisedPrompt:B.revised_prompt}:{},...D.created!=null?{created:D.created}:{},...D.size!=null?{size:D.size}:{},...D.quality!=null?{quality:D.quality}:{},...D.background!=null?{background:D.background}:{},...D.output_format!=null?{outputFormat:D.output_format}:{},...Qs8(D.usage,O,D.data.length)}))}}}}},Ws8,Ks8,Zs8,Us8,Hs8=($={})=>{return Us8($)},EX4,MX4,zs8,Vs8,Fs8,Ls8,Ds8,Ns8,As8,Bs8=($={})=>{return As8($)},RX4,qX4,Os8,Es8,Ms8,Rs8,qs8,Ps8=($={})=>qs8($),ws8,_s8,js8,Ts8,Is8,Ss8,ks8,vs8,PX4=20,xs8,bs8=class{constructor($,Y){this.specificationVersion="v2",this.supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({maxOutputTokens:$,temperature:Y,stopSequences:X,topP:G,topK:J,presencePenalty:Q,frequencyPenalty:W,seed:K,prompt:Z,providerOptions:H,tools:z,toolChoice:V,responseFormat:F}){var L,N,D,A;let B=[],O=BX4(this.modelId);if(J!=null)B.push({type:"unsupported-setting",setting:"topK"});if(K!=null)B.push({type:"unsupported-setting",setting:"seed"});if(Q!=null)B.push({type:"unsupported-setting",setting:"presencePenalty"});if(W!=null)B.push({type:"unsupported-setting",setting:"frequencyPenalty"});if(X!=null)B.push({type:"unsupported-setting",setting:"stopSequences"});let E=await j9({provider:"openai",providerOptions:H,schema:xs8});if((E==null?void 0:E.conversation)&&(E==null?void 0:E.previousResponseId))B.push({type:"unsupported-setting",setting:"conversation",details:"conversation and previousResponseId cannot be used together"});let{input:M,warnings:R}=await Cs8({prompt:Z,systemMessageMode:O.systemMessageMode,fileIdPrefixes:this.config.fileIdPrefixes,store:(L=E==null?void 0:E.store)!=null?L:!0,hasLocalShellTool:w("openai.local_shell")});B.push(...R);let q=(N=E==null?void 0:E.strictJsonSchema)!=null?N:!1,_=E==null?void 0:E.include;function P(y){if(_==null)_=[y];else if(!_.includes(y))_=[..._,y]}function w(y){return(z==null?void 0:z.find((d)=>d.type==="provider-defined"&&d.id===y))!=null}let j=typeof(E==null?void 0:E.logprobs)==="number"?E==null?void 0:E.logprobs:(E==null?void 0:E.logprobs)===!0?PX4:void 0;if(j)P("message.output_text.logprobs");let C=(D=z==null?void 0:z.find((y)=>y.type==="provider-defined"&&(y.id==="openai.web_search"||y.id==="openai.web_search_preview")))==null?void 0:D.name;if(C)P("web_search_call.action.sources");if(w("openai.code_interpreter"))P("code_interpreter_call.outputs");let k=E==null?void 0:E.store;if(k===!1&&O.isReasoningModel)P("reasoning.encrypted_content");let S={model:this.modelId,input:M,temperature:Y,top_p:G,max_output_tokens:$,...((F==null?void 0:F.type)==="json"||(E==null?void 0:E.textVerbosity))&&{text:{...(F==null?void 0:F.type)==="json"&&{format:F.schema!=null?{type:"json_schema",strict:q,name:(A=F.name)!=null?A:"response",description:F.description,schema:F.schema}:{type:"json_object"}},...(E==null?void 0:E.textVerbosity)&&{verbosity:E.textVerbosity}}},conversation:E==null?void 0:E.conversation,max_tool_calls:E==null?void 0:E.maxToolCalls,metadata:E==null?void 0:E.metadata,parallel_tool_calls:E==null?void 0:E.parallelToolCalls,previous_response_id:E==null?void 0:E.previousResponseId,store:k,user:E==null?void 0:E.user,instructions:E==null?void 0:E.instructions,service_tier:E==null?void 0:E.serviceTier,include:_,prompt_cache_key:E==null?void 0:E.promptCacheKey,prompt_cache_retention:E==null?void 0:E.promptCacheRetention,safety_identifier:E==null?void 0:E.safetyIdentifier,top_logprobs:j,truncation:E==null?void 0:E.truncation,...O.isReasoningModel&&((E==null?void 0:E.reasoningEffort)!=null||(E==null?void 0:E.reasoningSummary)!=null)&&{reasoning:{...(E==null?void 0:E.reasoningEffort)!=null&&{effort:E.reasoningEffort},...(E==null?void 0:E.reasoningSummary)!=null&&{summary:E.reasoningSummary}}}};if(O.isReasoningModel){if(!((E==null?void 0:E.reasoningEffort)==="none"&&O.supportsNonReasoningParameters)){if(S.temperature!=null)S.temperature=void 0,B.push({type:"unsupported-setting",setting:"temperature",details:"temperature is not supported for reasoning models"});if(S.top_p!=null)S.top_p=void 0,B.push({type:"unsupported-setting",setting:"topP",details:"topP is not supported for reasoning models"})}}else{if((E==null?void 0:E.reasoningEffort)!=null)B.push({type:"unsupported-setting",setting:"reasoningEffort",details:"reasoningEffort is not supported for non-reasoning models"});if((E==null?void 0:E.reasoningSummary)!=null)B.push({type:"unsupported-setting",setting:"reasoningSummary",details:"reasoningSummary is not supported for non-reasoning models"})}if((E==null?void 0:E.serviceTier)==="flex"&&!O.supportsFlexProcessing)B.push({type:"unsupported-setting",setting:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),delete S.service_tier;if((E==null?void 0:E.serviceTier)==="priority"&&!O.supportsPriorityProcessing)B.push({type:"unsupported-setting",setting:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),delete S.service_tier;let{tools:I,toolChoice:v,toolWarnings:x}=await ys8({tools:z,toolChoice:V,strictJsonSchema:q});return{webSearchToolName:C,args:{...S,tools:I,tool_choice:v},warnings:[...B,...x],store:k}}async doGenerate($){var Y,X,G,J,Q,W,K,Z,H,z,V,F,L,N,D,A,B,O,E,M,R,q,_,P,w,j,C,k;let{args:S,warnings:I,webSearchToolName:v}=await this.getArgs($),x=this.config.url({path:"/responses",modelId:this.modelId}),y=this.config.provider.replace(".responses",""),{responseHeaders:d,value:u,rawValue:b}=await G8({url:x,headers:o6(this.config.headers(),$.headers),body:S,failedResponseHandler:g3,successfulResponseHandler:C5(vs8),abortSignal:$.abortSignal,fetch:this.config.fetch});if(u.error)throw new FY({message:u.error.message,url:x,requestBodyValues:S,statusCode:400,responseHeaders:d,responseBody:b,isRetryable:!1});let g=[],p=[],h=!1;for(let s of u.output)switch(s.type){case"reasoning":{if(s.summary.length===0)s.summary.push({type:"summary_text",text:""});for(let K0 of s.summary)g.push({type:"reasoning",text:K0.text,providerMetadata:{[y]:{itemId:s.id,reasoningEncryptedContent:(Y=s.encrypted_content)!=null?Y:null}}});break}case"image_generation_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:"image_generation",input:"{}",providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:"image_generation",result:{result:s.result},providerExecuted:!0});break}case"local_shell_call":{g.push({type:"tool-call",toolCallId:s.call_id,toolName:"local_shell",input:JSON.stringify({action:s.action}),providerMetadata:{[y]:{itemId:s.id}}});break}case"message":{for(let K0 of s.content){if(((G=(X=$.providerOptions)==null?void 0:X.openai)==null?void 0:G.logprobs)&&K0.logprobs)p.push(K0.logprobs);g.push({type:"text",text:K0.text,providerMetadata:{[y]:{itemId:s.id,...s.phase!=null&&{phase:s.phase}}}});for(let X0 of K0.annotations)if(X0.type==="url_citation")g.push({type:"source",sourceType:"url",id:(W=(Q=(J=this.config).generateId)==null?void 0:Q.call(J))!=null?W:_8(),url:X0.url,title:X0.title});else if(X0.type==="file_citation")g.push({type:"source",sourceType:"document",id:(H=(Z=(K=this.config).generateId)==null?void 0:Z.call(K))!=null?H:_8(),mediaType:"text/plain",title:(V=(z=X0.quote)!=null?z:X0.filename)!=null?V:"Document",filename:(F=X0.filename)!=null?F:X0.file_id,...X0.file_id?{providerMetadata:{[y]:{fileId:X0.file_id}}}:{}});else if(X0.type==="container_file_citation")g.push({type:"source",sourceType:"document",id:(D=(N=(L=this.config).generateId)==null?void 0:N.call(L))!=null?D:_8(),mediaType:"text/plain",title:(B=(A=X0.filename)!=null?A:X0.file_id)!=null?B:"Document",filename:(O=X0.filename)!=null?O:X0.file_id,providerMetadata:{[y]:{fileId:X0.file_id,containerId:X0.container_id,...X0.index!=null?{index:X0.index}:{}}}});else if(X0.type==="file_path")g.push({type:"source",sourceType:"document",id:(R=(M=(E=this.config).generateId)==null?void 0:M.call(E))!=null?R:_8(),mediaType:"application/octet-stream",title:X0.file_id,filename:X0.file_id,providerMetadata:{[y]:{fileId:X0.file_id,...X0.index!=null?{index:X0.index}:{}}}})}break}case"function_call":{h=!0,g.push({type:"tool-call",toolCallId:s.call_id,toolName:s.name,input:s.arguments,providerMetadata:{[y]:{itemId:s.id}}});break}case"web_search_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:v!=null?v:"web_search",input:JSON.stringify({}),providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:v!=null?v:"web_search",result:YX4(s.action),providerExecuted:!0});break}case"computer_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:"computer_use",input:"",providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:s.status||"completed"},providerExecuted:!0});break}case"file_search_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:"file_search",input:"{}",providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:"file_search",result:{queries:s.queries,results:(_=(q=s.results)==null?void 0:q.map((K0)=>({attributes:K0.attributes,fileId:K0.file_id,filename:K0.filename,score:K0.score,text:K0.text})))!=null?_:null},providerExecuted:!0});break}case"code_interpreter_call":{g.push({type:"tool-call",toolCallId:s.id,toolName:"code_interpreter",input:JSON.stringify({code:s.code,containerId:s.container_id}),providerExecuted:!0}),g.push({type:"tool-result",toolCallId:s.id,toolName:"code_interpreter",result:{outputs:s.outputs},providerExecuted:!0});break}}let n={[y]:{...u.id!=null?{responseId:u.id}:{}}};if(p.length>0)n[y].logprobs=p;if(typeof u.service_tier==="string")n[y].serviceTier=u.service_tier;let t=u.usage;return{content:g,finishReason:eY4({finishReason:(P=u.incomplete_details)==null?void 0:P.reason,hasFunctionCall:h}),usage:{inputTokens:t.input_tokens,outputTokens:t.output_tokens,totalTokens:t.input_tokens+t.output_tokens,reasoningTokens:(j=(w=t.output_tokens_details)==null?void 0:w.reasoning_tokens)!=null?j:void 0,cachedInputTokens:(k=(C=t.input_tokens_details)==null?void 0:C.cached_tokens)!=null?k:void 0},request:{body:S},response:{id:u.id,timestamp:new Date(u.created_at*1000),modelId:u.model,headers:d,body:b},providerMetadata:n,warnings:I}}async doStream($){let{args:Y,warnings:X,webSearchToolName:G,store:J}=await this.getArgs($),{responseHeaders:Q,value:W}=await G8({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:{...Y,stream:!0},failedResponseHandler:g3,successfulResponseHandler:jQ(ks8),abortSignal:$.abortSignal,fetch:this.config.fetch}),K=this,Z=this.config.provider.replace(".responses",""),H="unknown",z={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},V=[],F=null,L={},N=[],D,A=!1,B={},O;return{stream:W.pipeThrough(new TransformStream({start(E){E.enqueue({type:"stream-start",warnings:X})},transform(E,M){var R,q,_,P,w,j,C,k,S,I,v,x,y,d,u,b,g,p,h,n,t,s,K0,X0;if($.includeRawChunks)M.enqueue({type:"raw",rawValue:E.rawValue});if(!E.success){H="error",M.enqueue({type:"error",error:E.error});return}let a=E.value;if($X4(a)){if(a.item.type==="function_call")L[a.output_index]={toolName:a.item.name,toolCallId:a.item.call_id},M.enqueue({type:"tool-input-start",id:a.item.call_id,toolName:a.item.name});else if(a.item.type==="web_search_call")L[a.output_index]={toolName:G!=null?G:"web_search",toolCallId:a.item.id},M.enqueue({type:"tool-input-start",id:a.item.id,toolName:G!=null?G:"web_search",providerExecuted:!0}),M.enqueue({type:"tool-input-end",id:a.item.id}),M.enqueue({type:"tool-call",toolCallId:a.item.id,toolName:G!=null?G:"web_search",input:JSON.stringify({}),providerExecuted:!0});else if(a.item.type==="computer_call")L[a.output_index]={toolName:"computer_use",toolCallId:a.item.id},M.enqueue({type:"tool-input-start",id:a.item.id,toolName:"computer_use",providerExecuted:!0});else if(a.item.type==="code_interpreter_call")L[a.output_index]={toolName:"code_interpreter",toolCallId:a.item.id,codeInterpreter:{containerId:a.item.container_id}},M.enqueue({type:"tool-input-start",id:a.item.id,toolName:"code_interpreter",providerExecuted:!0}),M.enqueue({type:"tool-input-delta",id:a.item.id,delta:`{"containerId":"${a.item.container_id}","code":"`});else if(a.item.type==="file_search_call")M.enqueue({type:"tool-call",toolCallId:a.item.id,toolName:"file_search",input:"{}",providerExecuted:!0});else if(a.item.type==="image_generation_call")M.enqueue({type:"tool-call",toolCallId:a.item.id,toolName:"image_generation",input:"{}",providerExecuted:!0});else if(a.item.type==="message")N.splice(0,N.length),D=(R=a.item.phase)!=null?R:void 0,M.enqueue({type:"text-start",id:a.item.id,providerMetadata:{[Z]:{itemId:a.item.id,...a.item.phase!=null&&{phase:a.item.phase}}}});else if($X4(a)&&a.item.type==="reasoning")B[a.item.id]={encryptedContent:a.item.encrypted_content,summaryParts:{0:"active"}},M.enqueue({type:"reasoning-start",id:`${a.item.id}:0`,providerMetadata:{[Z]:{itemId:a.item.id,reasoningEncryptedContent:(q=a.item.encrypted_content)!=null?q:null}}})}else if(fs8(a)){if(a.item.type==="message"){let Q0=(_=a.item.phase)!=null?_:D;D=void 0,M.enqueue({type:"text-end",id:a.item.id,providerMetadata:{[Z]:{itemId:a.item.id,...Q0!=null&&{phase:Q0},...N.length>0&&{annotations:N}}}})}else if(a.item.type==="function_call")L[a.output_index]=void 0,A=!0,M.enqueue({type:"tool-input-end",id:a.item.call_id}),M.enqueue({type:"tool-call",toolCallId:a.item.call_id,toolName:a.item.name,input:a.item.arguments,providerMetadata:{[Z]:{itemId:a.item.id}}});else if(a.item.type==="web_search_call")L[a.output_index]=void 0,M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:G!=null?G:"web_search",result:YX4(a.item.action),providerExecuted:!0});else if(a.item.type==="computer_call")L[a.output_index]=void 0,M.enqueue({type:"tool-input-end",id:a.item.id}),M.enqueue({type:"tool-call",toolCallId:a.item.id,toolName:"computer_use",input:"",providerExecuted:!0}),M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:a.item.status||"completed"},providerExecuted:!0});else if(a.item.type==="file_search_call")L[a.output_index]=void 0,M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:"file_search",result:{queries:a.item.queries,results:(w=(P=a.item.results)==null?void 0:P.map((Q0)=>({attributes:Q0.attributes,fileId:Q0.file_id,filename:Q0.filename,score:Q0.score,text:Q0.text})))!=null?w:null},providerExecuted:!0});else if(a.item.type==="code_interpreter_call")L[a.output_index]=void 0,M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:"code_interpreter",result:{outputs:a.item.outputs},providerExecuted:!0});else if(a.item.type==="image_generation_call")M.enqueue({type:"tool-result",toolCallId:a.item.id,toolName:"image_generation",result:{result:a.item.result},providerExecuted:!0});else if(a.item.type==="local_shell_call")L[a.output_index]=void 0,M.enqueue({type:"tool-call",toolCallId:a.item.call_id,toolName:"local_shell",input:JSON.stringify({action:{type:"exec",command:a.item.action.command,timeoutMs:a.item.action.timeout_ms,user:a.item.action.user,workingDirectory:a.item.action.working_directory,env:a.item.action.env}}),providerMetadata:{[Z]:{itemId:a.item.id}}});else if(a.item.type==="reasoning"){let Q0=B[a.item.id],e=Object.entries(Q0.summaryParts).filter(([m,$0])=>$0==="active"||$0==="can-conclude").map(([m])=>m);for(let m of e)M.enqueue({type:"reasoning-end",id:`${a.item.id}:${m}`,providerMetadata:{[Z]:{itemId:a.item.id,reasoningEncryptedContent:(j=a.item.encrypted_content)!=null?j:null}}});delete B[a.item.id]}}else if(us8(a)){let Q0=L[a.output_index];if(Q0!=null)M.enqueue({type:"tool-input-delta",id:Q0.toolCallId,delta:a.delta})}else if(ps8(a)){let Q0=L[a.output_index];if(Q0!=null)M.enqueue({type:"tool-input-delta",id:Q0.toolCallId,delta:JSON.stringify(a.delta).slice(1,-1)})}else if(ds8(a)){let Q0=L[a.output_index];if(Q0!=null)M.enqueue({type:"tool-input-delta",id:Q0.toolCallId,delta:'"}'}),M.enqueue({type:"tool-input-end",id:Q0.toolCallId}),M.enqueue({type:"tool-call",toolCallId:Q0.toolCallId,toolName:"code_interpreter",input:JSON.stringify({code:a.code,containerId:Q0.codeInterpreter.containerId}),providerExecuted:!0})}else if(ms8(a))F=a.response.id,M.enqueue({type:"response-metadata",id:a.response.id,timestamp:new Date(a.response.created_at*1000),modelId:a.response.model});else if(hs8(a)){if(M.enqueue({type:"text-delta",id:a.item_id,delta:a.delta}),((k=(C=$.providerOptions)==null?void 0:C.openai)==null?void 0:k.logprobs)&&a.logprobs)V.push(a.logprobs)}else if(a.type==="response.reasoning_summary_part.added"){if(a.summary_index>0){let Q0=B[a.item_id];Q0.summaryParts[a.summary_index]="active";for(let e of Object.keys(Q0.summaryParts))if(Q0.summaryParts[e]==="can-conclude")M.enqueue({type:"reasoning-end",id:`${a.item_id}:${e}`,providerMetadata:{[Z]:{itemId:a.item_id}}}),Q0.summaryParts[e]="concluded";M.enqueue({type:"reasoning-start",id:`${a.item_id}:${a.summary_index}`,providerMetadata:{[Z]:{itemId:a.item_id,reasoningEncryptedContent:(I=(S=B[a.item_id])==null?void 0:S.encryptedContent)!=null?I:null}}})}}else if(a.type==="response.reasoning_summary_text.delta")M.enqueue({type:"reasoning-delta",id:`${a.item_id}:${a.summary_index}`,delta:a.delta,providerMetadata:{[Z]:{itemId:a.item_id}}});else if(a.type==="response.reasoning_summary_part.done")if(J)M.enqueue({type:"reasoning-end",id:`${a.item_id}:${a.summary_index}`,providerMetadata:{[Z]:{itemId:a.item_id}}}),B[a.item_id].summaryParts[a.summary_index]="concluded";else B[a.item_id].summaryParts[a.summary_index]="can-conclude";else if(gs8(a)){if(H=eY4({finishReason:(v=a.response.incomplete_details)==null?void 0:v.reason,hasFunctionCall:A}),z.inputTokens=a.response.usage.input_tokens,z.outputTokens=a.response.usage.output_tokens,z.totalTokens=a.response.usage.input_tokens+a.response.usage.output_tokens,z.reasoningTokens=(y=(x=a.response.usage.output_tokens_details)==null?void 0:x.reasoning_tokens)!=null?y:void 0,z.cachedInputTokens=(u=(d=a.response.usage.input_tokens_details)==null?void 0:d.cached_tokens)!=null?u:void 0,typeof a.response.service_tier==="string")O=a.response.service_tier}else if(cs8(a)){if(N.push(a.annotation),a.annotation.type==="url_citation")M.enqueue({type:"source",sourceType:"url",id:(p=(g=(b=K.config).generateId)==null?void 0:g.call(b))!=null?p:_8(),url:a.annotation.url,title:a.annotation.title});else if(a.annotation.type==="file_citation")M.enqueue({type:"source",sourceType:"document",id:(t=(n=(h=K.config).generateId)==null?void 0:n.call(h))!=null?t:_8(),mediaType:"text/plain",title:(K0=(s=a.annotation.quote)!=null?s:a.annotation.filename)!=null?K0:"Document",filename:(X0=a.annotation.filename)!=null?X0:a.annotation.file_id,...a.annotation.file_id?{providerMetadata:{[Z]:{fileId:a.annotation.file_id}}}:{}})}else if(ls8(a))M.enqueue({type:"error",error:a})},flush(E){let M={[Z]:{responseId:F}};if(V.length>0)M[Z].logprobs=V;if(O!==void 0)M[Z].serviceTier=O;E.enqueue({type:"finish",finishReason:H,usage:z,providerMetadata:M})}})),request:{body:Y},response:{headers:Q}}}},is8,ns8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2"}get provider(){return this.config.provider}async getArgs({text:$,voice:Y="alloy",outputFormat:X="mp3",speed:G,instructions:J,language:Q,providerOptions:W}){let K=[],Z=await j9({provider:"openai",providerOptions:W,schema:is8}),H={model:this.modelId,input:$,voice:Y,response_format:"mp3",speed:G,instructions:J};if(X)if(["mp3","opus","aac","flac","wav","pcm"].includes(X))H.response_format=X;else K.push({type:"unsupported-setting",setting:"outputFormat",details:`Unsupported output format: ${X}. Using mp3 instead.`});if(Z){let z={};for(let V in z){let F=z[V];if(F!==void 0)H[V]=F}}if(Q)K.push({type:"unsupported-setting",setting:"language",details:`OpenAI speech models do not support language selection. Language parameter "${Q}" was ignored.`});return{requestBody:H,warnings:K}}async doGenerate($){var Y,X,G;let J=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,{requestBody:Q,warnings:W}=await this.getArgs($),{value:K,responseHeaders:Z,rawValue:H}=await G8({url:this.config.url({path:"/audio/speech",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),body:Q,failedResponseHandler:g3,successfulResponseHandler:x90(),abortSignal:$.abortSignal,fetch:this.config.fetch});return{audio:K,warnings:W,request:{body:JSON.stringify(Q)},response:{timestamp:J,modelId:this.modelId,headers:Z,body:H}}}},rs8,as8,XX4,ss8=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2"}get provider(){return this.config.provider}async getArgs({audio:$,mediaType:Y,providerOptions:X}){let G=[],J=await j9({provider:"openai",providerOptions:X,schema:as8}),Q=new FormData,W=$ instanceof Uint8Array?new Blob([$]):new Blob([b90($)]);Q.append("model",this.modelId);let K=C90(Y);if(Q.append("file",new File([W],"audio",{type:Y}),`audio.${K}`),J){let Z={include:J.include,language:J.language,prompt:J.prompt,response_format:["gpt-4o-transcribe","gpt-4o-mini-transcribe"].includes(this.modelId)?"json":"verbose_json",temperature:J.temperature,timestamp_granularities:J.timestampGranularities};for(let[H,z]of Object.entries(Z))if(z!=null)if(Array.isArray(z))for(let V of z)Q.append(`${H}[]`,String(V));else Q.append(H,String(z))}return{formData:Q,warnings:G}}async doGenerate($){var Y,X,G,J,Q,W,K,Z;let H=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,{formData:z,warnings:V}=await this.getArgs($),{value:F,responseHeaders:L,rawValue:N}=await v90({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:o6(this.config.headers(),$.headers),formData:z,failedResponseHandler:g3,successfulResponseHandler:C5(rs8),abortSignal:$.abortSignal,fetch:this.config.fetch}),D=F.language!=null&&F.language in XX4?XX4[F.language]:void 0;return{text:F.text,segments:(K=(W=(J=F.segments)==null?void 0:J.map((A)=>({text:A.text,startSecond:A.start,endSecond:A.end})))!=null?W:(Q=F.words)==null?void 0:Q.map((A)=>({text:A.word,startSecond:A.start,endSecond:A.end})))!=null?K:[],language:D,durationInSeconds:(Z=F.duration)!=null?Z:void 0,warnings:V,response:{timestamp:H,modelId:this.modelId,headers:L,body:N}}}},os8="2.0.106",_m=class{specificationVersion="v2";modelId;provider;maxEmbeddingsPerCall=2048;supportsParallelCalls=!0;providerModel;constructor($){let Y;if(typeof $==="string"){let X=$.split("/");if(X.length!==2)throw Error(`Invalid model string format: "${$}". Expected format: "provider/model"`);let[G,J]=X;Y={providerId:G,modelId:J}}else if("providerId"in $&&"modelId"in $)Y={providerId:$.providerId,modelId:$.modelId,url:$.url,apiKey:$.apiKey,headers:$.headers};else{let X=$.id.split("/");if(X.length!==2)throw Error(`Invalid model string format: "${$.id}". Expected format: "provider/model"`);let[G,J]=X;Y={providerId:G,modelId:J,url:$.url,apiKey:$.apiKey,headers:$.headers}}if(this.provider=Y.providerId,this.modelId=Y.modelId,Y.url){let X=Y.apiKey||"";this.providerModel=ND({name:Y.providerId,apiKey:X,baseURL:Y.url,headers:Y.headers}).textEmbeddingModel(Y.modelId)}else{let G=eZ.getInstance().getProviderConfig(Y.providerId);if(!G)throw Error(`Unknown provider: ${Y.providerId}`);let J=Y.apiKey;if(!J){let Q=G.apiKeyEnvVar;if(Array.isArray(Q)){for(let W of Q)if(J=process.env[W],J)break}else J=process.env[Q]}if(!J){let Q=Array.isArray(G.apiKeyEnvVar)?G.apiKeyEnvVar.join(" or "):G.apiKeyEnvVar;throw Error(`API key not found for provider ${Y.providerId}. Set ${Q}`)}if(Y.providerId==="openai")this.providerModel=wX4({apiKey:J}).textEmbeddingModel(Y.modelId);else if(Y.providerId==="google")this.providerModel=AX4({apiKey:J}).textEmbedding(Y.modelId);else{if(!G.url)throw Error(`Provider ${Y.providerId} does not have a URL configured`);this.providerModel=ND({name:Y.providerId,apiKey:J,baseURL:G.url}).textEmbeddingModel(Y.modelId)}}if(this.providerModel.maxEmbeddingsPerCall!==void 0)this.maxEmbeddingsPerCall=this.providerModel.maxEmbeddingsPerCall;if(this.providerModel.supportsParallelCalls!==void 0)this.supportsParallelCalls=this.providerModel.supportsParallelCalls}async doEmbed($){let Y=await this.providerModel.doEmbed($),X=Y.warnings??[];return{...Y,warnings:X}}};var gb0=V0(()=>{Eb0();X50();W50();Dm();Ib0();Ob0();OW();qL();O1();GX4=Symbol.for("@mastra/core.modelStreamTransport");hb0=U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.any().nullish(),code:U.union([U.string(),U.number()]).nullish()})}),f3=zJ({errorSchema:hb0,errorToMessage:($)=>$.error.message});fn8=j8(()=>v1(U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({role:U.literal("assistant").nullish(),content:U.string().nullish(),tool_calls:U.array(U.object({id:U.string().nullish(),type:U.literal("function"),function:U.object({name:U.string(),arguments:U.string()})})).nullish(),annotations:U.array(U.object({type:U.literal("url_citation"),url_citation:U.object({start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()})})).nullish()}),index:U.number(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}).nullish(),finish_reason:U.string().nullish()})),usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish()}))),gn8=j8(()=>v1(U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).nullish(),content:U.string().nullish(),tool_calls:U.array(U.object({index:U.number(),id:U.string().nullish(),type:U.literal("function").nullish(),function:U.object({name:U.string().nullish(),arguments:U.string().nullish()})})).nullish(),annotations:U.array(U.object({type:U.literal("url_citation"),url_citation:U.object({start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()})})).nullish()}).nullish(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}).nullish(),finish_reason:U.string().nullish(),index:U.number()})),usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish()}),hb0]))),mn8=j8(()=>v1(U.object({logitBias:U.record(U.coerce.number(),U.number()).optional(),logprobs:U.union([U.boolean(),U.number()]).optional(),parallelToolCalls:U.boolean().optional(),user:U.string().optional(),reasoningEffort:U.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:U.number().optional(),store:U.boolean().optional(),metadata:U.record(U.string().max(64),U.string().max(512)).optional(),prediction:U.record(U.string(),U.any()).optional(),structuredOutputs:U.boolean().optional(),serviceTier:U.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:U.boolean().optional(),textVerbosity:U.enum(["low","medium","high"]).optional(),promptCacheKey:U.string().optional(),promptCacheRetention:U.enum(["in_memory","24h"]).optional(),safetyIdentifier:U.string().optional()})));cn8=j8(()=>v1(U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string(),logprobs:U.object({tokens:U.array(U.string()),token_logprobs:U.array(U.number()),top_logprobs:U.array(U.record(U.string(),U.number())).nullish()}).nullish()})),usage:U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}).nullish()}))),ln8=j8(()=>v1(U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string().nullish(),index:U.number(),logprobs:U.object({tokens:U.array(U.string()),token_logprobs:U.array(U.number()),top_logprobs:U.array(U.record(U.string(),U.number())).nullish()}).nullish()})),usage:U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}).nullish()}),hb0]))),kY4=j8(()=>v1(U.object({echo:U.boolean().optional(),logitBias:U.record(U.string(),U.number()).optional(),suffix:U.string().optional(),user:U.string().optional(),logprobs:U.union([U.boolean(),U.number()]).optional()}))),nn8=j8(()=>v1(U.object({dimensions:U.number().optional(),user:U.string().optional()}))),rn8=j8(()=>v1(U.object({data:U.array(U.object({embedding:U.array(U.number())})),usage:U.object({prompt_tokens:U.number()}).nullish()}))),sn8=j8(()=>v1(U.object({created:U.number().nullish(),data:U.array(U.object({b64_json:U.string(),revised_prompt:U.string().nullish()})),background:U.string().nullish(),output_format:U.string().nullish(),size:U.string().nullish(),quality:U.string().nullish(),usage:U.object({input_tokens:U.number().nullish(),output_tokens:U.number().nullish(),total_tokens:U.number().nullish(),input_tokens_details:U.object({image_tokens:U.number().nullish(),text_tokens:U.number().nullish()}).nullish()}).nullish()}))),on8={"dall-e-3":1,"dall-e-2":10,"gpt-image-1":10,"gpt-image-1-mini":10,"gpt-image-1.5":10,"gpt-image-2":10},tn8=new Set(["gpt-image-1","gpt-image-1-mini","gpt-image-1.5","gpt-image-2"]),QX4=U.object({quality:U.enum(["standard","hd","low","medium","high","auto"]).optional(),background:U.enum(["transparent","opaque","auto"]).optional(),outputFormat:U.enum(["png","jpeg","webp"]).optional(),outputCompression:U.number().int().min(0).max(100).optional(),user:U.string().optional()});j8(()=>v1(QX4));en8=j8(()=>v1(QX4.extend({style:U.enum(["vivid","natural"]).optional(),moderation:U.enum(["auto","low"]).optional()})));Xr8=j8(()=>v1(U.object({text:U.string(),language:U.string().nullish(),duration:U.number().nullish(),words:U.array(U.object({word:U.string(),start:U.number(),end:U.number()})).nullish(),segments:U.array(U.object({id:U.number(),seek:U.number(),start:U.number(),end:U.number(),text:U.string(),tokens:U.array(U.number()),temperature:U.number(),avg_logprob:U.number(),compression_ratio:U.number(),no_speech_prob:U.number()})).nullish()}))),Gr8=j8(()=>v1(U.object({include:U.array(U.string()).optional(),language:U.string().optional(),prompt:U.string().optional(),temperature:U.number().min(0).max(1).default(0).optional(),timestampGranularities:U.array(U.enum(["word","segment"])).default(["segment"]).optional()}))),vY4={afrikaans:"af",arabic:"ar",armenian:"hy",azerbaijani:"az",belarusian:"be",bosnian:"bs",bulgarian:"bg",catalan:"ca",chinese:"zh",croatian:"hr",czech:"cs",danish:"da",dutch:"nl",english:"en",estonian:"et",finnish:"fi",french:"fr",galician:"gl",german:"de",greek:"el",hebrew:"he",hindi:"hi",hungarian:"hu",icelandic:"is",indonesian:"id",italian:"it",japanese:"ja",kannada:"kn",kazakh:"kk",korean:"ko",latvian:"lv",lithuanian:"lt",macedonian:"mk",malay:"ms",marathi:"mr",maori:"mi",nepali:"ne",norwegian:"no",persian:"fa",polish:"pl",portuguese:"pt",romanian:"ro",russian:"ru",serbian:"sr",slovak:"sk",slovenian:"sl",spanish:"es",swahili:"sw",swedish:"sv",tagalog:"tl",tamil:"ta",thai:"th",turkish:"tr",ukrainian:"uk",urdu:"ur",vietnamese:"vi",welsh:"cy"},Qr8=j8(()=>v1(U.object({instructions:U.string().nullish(),speed:U.number().min(0.25).max(4).default(1).nullish()}))),WX4=Y6(()=>v1(U.object({action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeoutMs:U.number().optional(),user:U.string().optional(),workingDirectory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}))),KX4=Y6(()=>v1(U.object({output:U.string()})));HJ({id:"openai.local_shell",name:"local_shell",inputSchema:WX4,outputSchema:KX4});Zr8=U.object({itemId:U.string().nullish(),reasoningEncryptedContent:U.string().nullish()});Ur8=j8(()=>v1(U.union([U.object({type:U.literal("response.output_text.delta"),item_id:U.string(),delta:U.string(),logprobs:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}),U.object({type:U.enum(["response.completed","response.incomplete"]),response:U.object({incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.created"),response:U.object({id:U.string(),created_at:U.number(),model:U.string(),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.output_item.added"),output_index:U.number(),item:U.discriminatedUnion("type",[U.object({type:U.literal("message"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish()}),U.object({type:U.literal("function_call"),id:U.string(),call_id:U.string(),name:U.string(),arguments:U.string()}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string()}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.string()}),U.object({type:U.literal("file_search_call"),id:U.string()}),U.object({type:U.literal("image_generation_call"),id:U.string()}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),container_id:U.string(),code:U.string().nullable(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable(),status:U.string()})])}),U.object({type:U.literal("response.output_item.done"),output_index:U.number(),item:U.discriminatedUnion("type",[U.object({type:U.literal("message"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish()}),U.object({type:U.literal("function_call"),id:U.string(),call_id:U.string(),name:U.string(),arguments:U.string(),status:U.literal("completed")}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),code:U.string().nullable(),container_id:U.string(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable()}),U.object({type:U.literal("image_generation_call"),id:U.string(),result:U.string()}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string(),action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().nullish(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).nullish()}),U.object({type:U.literal("open_page"),url:U.string().nullish()}),U.object({type:U.literal("find_in_page"),url:U.string().nullish(),pattern:U.string().nullish()})]).nullish()}),U.object({type:U.literal("file_search_call"),id:U.string(),queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.unknown()),file_id:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullish()}),U.object({type:U.literal("local_shell_call"),id:U.string(),call_id:U.string(),action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeout_ms:U.number().optional(),user:U.string().optional(),working_directory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.literal("completed")})])}),U.object({type:U.literal("response.function_call_arguments.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.image_generation_call.partial_image"),item_id:U.string(),output_index:U.number(),partial_image_b64:U.string()}),U.object({type:U.literal("response.code_interpreter_call_code.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.code_interpreter_call_code.done"),item_id:U.string(),output_index:U.number(),code:U.string()}),U.object({type:U.literal("response.output_text.annotation.added"),annotation:U.discriminatedUnion("type",[U.object({type:U.literal("url_citation"),start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()}),U.object({type:U.literal("file_citation"),file_id:U.string(),filename:U.string().nullish(),index:U.number().nullish(),start_index:U.number().nullish(),end_index:U.number().nullish(),quote:U.string().nullish()})])}),U.object({type:U.literal("response.reasoning_summary_part.added"),item_id:U.string(),summary_index:U.number()}),U.object({type:U.literal("response.reasoning_summary_text.delta"),item_id:U.string(),summary_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.reasoning_summary_part.done"),item_id:U.string(),summary_index:U.number()}),U.object({type:U.literal("error"),sequence_number:U.number(),error:U.object({type:U.string(),code:U.string(),message:U.string(),param:U.string().nullish()})}),U.object({type:U.string()}).loose().transform(($)=>({type:"unknown_chunk",message:$.type}))]))),Hr8=j8(()=>v1(U.object({id:U.string().optional(),created_at:U.number().optional(),error:U.object({message:U.string(),type:U.string(),param:U.string().nullish(),code:U.string()}).nullish(),model:U.string().optional(),output:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("message"),role:U.literal("assistant"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish(),content:U.array(U.object({type:U.literal("output_text"),text:U.string(),logprobs:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish(),annotations:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url_citation"),start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()}),U.object({type:U.literal("file_citation"),file_id:U.string(),filename:U.string().nullish(),index:U.number().nullish(),start_index:U.number().nullish(),end_index:U.number().nullish(),quote:U.string().nullish()}),U.object({type:U.literal("container_file_citation"),container_id:U.string(),file_id:U.string(),filename:U.string().nullish(),start_index:U.number().nullish(),end_index:U.number().nullish(),index:U.number().nullish()}),U.object({type:U.literal("file_path"),file_id:U.string(),index:U.number().nullish()})]))}))}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string(),action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().nullish(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).nullish()}),U.object({type:U.literal("open_page"),url:U.string().nullish()}),U.object({type:U.literal("find_in_page"),url:U.string().nullish(),pattern:U.string().nullish()})]).nullish()}),U.object({type:U.literal("file_search_call"),id:U.string(),queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.union([U.string(),U.number(),U.boolean()])),file_id:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullish()}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),code:U.string().nullable(),container_id:U.string(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable()}),U.object({type:U.literal("image_generation_call"),id:U.string(),result:U.string()}),U.object({type:U.literal("local_shell_call"),id:U.string(),call_id:U.string(),action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeout_ms:U.number().optional(),user:U.string().optional(),working_directory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}),U.object({type:U.literal("function_call"),call_id:U.string(),name:U.string(),arguments:U.string(),id:U.string()}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.string().optional()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish(),summary:U.array(U.object({type:U.literal("summary_text"),text:U.string()}))})])).optional(),service_tier:U.string().nullish(),incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}).optional()}))),zr8=j8(()=>v1(U.object({conversation:U.string().nullish(),include:U.array(U.enum(["reasoning.encrypted_content","file_search_call.results","message.output_text.logprobs"])).nullish(),instructions:U.string().nullish(),logprobs:U.union([U.boolean(),U.number().min(1).max(ZX4)]).optional(),maxToolCalls:U.number().nullish(),metadata:U.any().nullish(),parallelToolCalls:U.boolean().nullish(),previousResponseId:U.string().nullish(),promptCacheKey:U.string().nullish(),promptCacheRetention:U.enum(["in_memory","24h"]).nullish(),reasoningEffort:U.string().nullish(),reasoningSummary:U.string().nullish(),safetyIdentifier:U.string().nullish(),serviceTier:U.enum(["auto","flex","priority","default"]).nullish(),store:U.boolean().nullish(),strictJsonSchema:U.boolean().nullish(),textVerbosity:U.enum(["low","medium","high"]).nullish(),truncation:U.enum(["auto","disabled"]).nullish(),user:U.string().nullish()}))),Vr8=Y6(()=>v1(U.object({code:U.string().nullish(),containerId:U.string()}))),Fr8=Y6(()=>v1(U.object({outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullish()}))),Lr8=Y6(()=>v1(U.object({container:U.union([U.string(),U.object({fileIds:U.array(U.string()).optional()})]).optional()}))),Dr8=HJ({id:"openai.code_interpreter",name:"code_interpreter",inputSchema:Vr8,outputSchema:Fr8}),UX4=U.object({key:U.string(),type:U.enum(["eq","ne","gt","gte","lt","lte","in","nin"]),value:U.union([U.string(),U.number(),U.boolean(),U.array(U.string())])}),HX4=U.object({type:U.enum(["and","or"]),filters:U.array(U.union([UX4,U.lazy(()=>HX4)]))}),Ar8=Y6(()=>v1(U.object({vectorStoreIds:U.array(U.string()),maxNumResults:U.number().optional(),ranking:U.object({ranker:U.string().optional(),scoreThreshold:U.number().optional()}).optional(),filters:U.union([UX4,HX4]).optional()}))),Br8=Y6(()=>v1(U.object({queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.unknown()),fileId:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullable()}))),Or8=HJ({id:"openai.file_search",name:"file_search",inputSchema:U.object({}),outputSchema:Br8}),Er8=Y6(()=>v1(U.object({externalWebAccess:U.boolean().optional(),filters:U.object({allowedDomains:U.array(U.string()).optional()}).optional(),searchContextSize:U.enum(["low","medium","high"]).optional(),userLocation:U.object({type:U.literal("approximate"),country:U.string().optional(),city:U.string().optional(),region:U.string().optional(),timezone:U.string().optional()}).optional()}))),Mr8=Y6(()=>v1(U.object({}))),Rr8=Y6(()=>v1(U.object({action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().optional()}),U.object({type:U.literal("openPage"),url:U.string().nullish()}),U.object({type:U.literal("findInPage"),url:U.string().nullish(),pattern:U.string().nullish()})]).optional(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).optional()})));HJ({id:"openai.web_search",name:"web_search",inputSchema:Mr8,outputSchema:Rr8});qr8=Y6(()=>v1(U.object({searchContextSize:U.enum(["low","medium","high"]).optional(),userLocation:U.object({type:U.literal("approximate"),country:U.string().optional(),city:U.string().optional(),region:U.string().optional(),timezone:U.string().optional()}).optional()}))),Pr8=Y6(()=>v1(U.object({}))),wr8=Y6(()=>v1(U.object({action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().optional()}),U.object({type:U.literal("openPage"),url:U.string().nullish()}),U.object({type:U.literal("findInPage"),url:U.string().nullish(),pattern:U.string().nullish()})]).optional()}))),_r8=HJ({id:"openai.web_search_preview",name:"web_search_preview",inputSchema:Pr8,outputSchema:wr8}),jr8=Y6(()=>v1(U.object({background:U.enum(["auto","opaque","transparent"]).optional(),inputFidelity:U.enum(["low","high"]).optional(),inputImageMask:U.object({fileId:U.string().optional(),imageUrl:U.string().optional()}).optional(),model:U.string().optional(),moderation:U.enum(["auto"]).optional(),outputCompression:U.number().int().min(0).max(100).optional(),outputFormat:U.enum(["png","jpeg","webp"]).optional(),partialImages:U.number().int().min(0).max(3).optional(),quality:U.enum(["auto","low","medium","high"]).optional(),size:U.enum(["1024x1024","1024x1536","1536x1024","auto"]).optional()}).strict())),Tr8=Y6(()=>v1(U.object({}))),Ir8=Y6(()=>v1(U.object({result:U.string()}))),Cr8=HJ({id:"openai.image_generation",name:"image_generation",inputSchema:Tr8,outputSchema:Ir8});dr8={codeInterpreter:Nr8,fileSearch:Or8,imageGeneration:Sr8,webSearchPreview:_r8};zX4();lr8=new Set(["response.completed","response.failed","response.incomplete","error"]);er8=class extends BD{constructor($){super();this.config=$,this.validateConfig()}config;id="azure-openai";name="azure-openai";tokenCache=new Q50;entraIdTokenRequests=new Map;validateConfig(){if(!this.config.resourceName)throw new G0({id:"AZURE_GATEWAY_INVALID_CONFIG",domain:"LLM",category:"UNKNOWN",text:"resourceName is required for Azure OpenAI gateway"});if(!this.config.apiKey&&this.config.authentication?.type!=="entraId")throw new G0({id:"AZURE_GATEWAY_INVALID_CONFIG",domain:"LLM",category:"UNKNOWN",text:"apiKey or Entra ID authentication is required for Azure OpenAI gateway"});if(this.config.authentication?.type==="entraId"&&!this.config.authentication.credential)throw new G0({id:"AZURE_GATEWAY_INVALID_CONFIG",domain:"LLM",category:"UNKNOWN",text:"credential is required for Azure OpenAI Entra ID authentication"});if(this.config.apiKey&&this.config.authentication?.type==="entraId")console.warn("[AzureOpenAIGateway] Both apiKey and Entra ID authentication provided. Using Entra ID authentication and ignoring apiKey.");if(this.config.useResponsesAPI&&this.config.useDeploymentBasedUrls===!0)throw new G0({id:"AZURE_GATEWAY_INVALID_CONFIG",domain:"LLM",category:"UNKNOWN",text:"useResponsesAPI: true cannot be combined with useDeploymentBasedUrls: true. Omit useDeploymentBasedUrls or set it to false."});if(this.config.useResponsesAPI&&this.config.apiVersion&&!["v1","preview"].includes(this.config.apiVersion))throw new G0({id:"AZURE_GATEWAY_INVALID_CONFIG",domain:"LLM",category:"UNKNOWN",text:'useResponsesAPI: true requires apiVersion: "v1" or apiVersion: "preview". Omit apiVersion to use "v1".'});if(this.config.useDeploymentBasedUrls===!1&&this.config.apiVersion&&!["v1","preview"].includes(this.config.apiVersion))throw new G0({id:"AZURE_GATEWAY_INVALID_CONFIG",domain:"LLM",category:"UNKNOWN",text:'useDeploymentBasedUrls: false requires apiVersion: "v1" or apiVersion: "preview". Omit apiVersion to use "v1".'});let $=this.config.deployments&&this.config.deployments.length>0,Y=this.config.management!==void 0;if($&&Y)console.warn("[AzureOpenAIGateway] Both deployments and management credentials provided. Using static deployments list and ignoring management API.");if(Y)this.getManagementCredentials(this.config.management)}async fetchProviders(){if(this.config.deployments&&this.config.deployments.length>0)return{"azure-openai":{apiKeyEnvVar:[],apiKeyHeader:"api-key",name:"Azure OpenAI",models:this.config.deployments,docUrl:"https://learn.microsoft.com/en-us/azure/ai-services/openai/",gateway:"azure-openai"}};if(!this.config.management)return{"azure-openai":{apiKeyEnvVar:[],apiKeyHeader:"api-key",name:"Azure OpenAI",models:[],docUrl:"https://learn.microsoft.com/en-us/azure/ai-services/openai/",gateway:"azure-openai"}};try{let $=this.getManagementCredentials(this.config.management),Y=await this.getAzureADToken({tenantId:$.tenantId,clientId:$.clientId,clientSecret:$.clientSecret}),X=await this.fetchDeployments(Y,{subscriptionId:$.subscriptionId,resourceGroup:$.resourceGroup,resourceName:this.config.resourceName});return{"azure-openai":{apiKeyEnvVar:[],apiKeyHeader:"api-key",name:"Azure OpenAI",models:X.map((G)=>G.name),docUrl:"https://learn.microsoft.com/en-us/azure/ai-services/openai/",gateway:"azure-openai"}}}catch($){let Y=$ instanceof Error?$.message:String($);return console.warn(`[AzureOpenAIGateway] Deployment discovery failed: ${Y}`,`
Returning fallback configuration. Azure OpenAI can still be used by manually specifying deployment names.`),{"azure-openai":{apiKeyEnvVar:[],apiKeyHeader:"api-key",name:"Azure OpenAI",models:[],docUrl:"https://learn.microsoft.com/en-us/azure/ai-services/openai/",gateway:"azure-openai"}}}}getManagementCredentials($){let{tenantId:Y,clientId:X,clientSecret:G,subscriptionId:J,resourceGroup:Q}=$,W=[];if(!Y)W.push("tenantId");if(!X)W.push("clientId");if(!G)W.push("clientSecret");if(!J)W.push("subscriptionId");if(!Q)W.push("resourceGroup");if(W.length>0)throw new G0({id:"AZURE_MANAGEMENT_CREDENTIALS_MISSING",domain:"LLM",category:"UNKNOWN",text:`Management credentials incomplete. Missing: ${W.join(", ")}. Required fields: tenantId, clientId, clientSecret, subscriptionId, resourceGroup.`});return{tenantId:Y,clientId:X,clientSecret:G,subscriptionId:J,resourceGroup:Q}}async getAzureADToken($){let{tenantId:Y,clientId:X,clientSecret:G}=$,J=`azure-mgmt-token:${Y}:${X}`,Q=await this.tokenCache.get(J);if(Q&&Q.expiresAt>Date.now()/1000+60)return Q.token;let W=`https://login.microsoftonline.com/${Y}/oauth2/v2.0/token`,K=new URLSearchParams({grant_type:"client_credentials",client_id:X,client_secret:G,scope:"https://management.azure.com/.default"}),Z=await fetch(W,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:K.toString()});if(!Z.ok){let V=await Z.text();throw new G0({id:"AZURE_AD_TOKEN_ERROR",domain:"LLM",category:"UNKNOWN",text:`Failed to get Azure AD token: ${Z.status} ${V}`})}let H=await Z.json(),z=Math.floor(Date.now()/1000)+H.expires_in;return await this.tokenCache.set(J,{token:H.access_token,expiresAt:z}),H.access_token}async fetchDeployments($,Y){let{subscriptionId:X,resourceGroup:G,resourceName:J}=Y,Q=`https://management.azure.com/subscriptions/${X}/resourceGroups/${G}/providers/Microsoft.CognitiveServices/accounts/${J}/deployments?api-version=2024-10-01`,W=[];while(Q){let Z=await fetch(Q,{headers:{Authorization:`Bearer ${$}`,"Content-Type":"application/json"}});if(!Z.ok){let z=await Z.text();throw new G0({id:"AZURE_DEPLOYMENTS_FETCH_ERROR",domain:"LLM",category:"UNKNOWN",text:`Failed to fetch Azure deployments: ${Z.status} ${z}`})}let H=await Z.json();W.push(...H.value),Q=H.nextLink}return W.filter((Z)=>Z.properties.provisioningState==="Succeeded")}buildUrl($,Y){return}async getApiKey($){return this.config.authentication?.type==="entraId"?"":this.config.apiKey??""}async getEntraIdToken(){if(this.config.authentication?.type!=="entraId")throw new G0({id:"AZURE_ENTRA_ID_AUTH_NOT_CONFIGURED",domain:"LLM",category:"UNKNOWN",text:"Entra ID authentication is not configured for Azure OpenAI gateway"});let $=this.config.authentication.scope??"https://cognitiveservices.azure.com/.default",Y=`azure-openai-token:${$}`,X=await this.tokenCache.get(Y);if(X&&X.expiresAt>Date.now()/1000+60)return X.token;let G=this.entraIdTokenRequests.get(Y);if(!G)G=this.fetchEntraIdToken($,Y),this.entraIdTokenRequests.set(Y,G);try{return(await G).token}finally{this.entraIdTokenRequests.delete(Y)}}async fetchEntraIdToken($,Y){if(this.config.authentication?.type!=="entraId")throw new G0({id:"AZURE_ENTRA_ID_AUTH_NOT_CONFIGURED",domain:"LLM",category:"UNKNOWN",text:"Entra ID authentication is not configured for Azure OpenAI gateway"});let X=await this.config.authentication.credential.getToken($);if(!X?.token)throw new G0({id:"AZURE_ENTRA_ID_TOKEN_ERROR",domain:"LLM",category:"UNKNOWN",text:"Failed to get Entra ID token for Azure OpenAI gateway"});let G={token:X.token,expiresAt:X.expiresOnTimestamp?Math.floor(X.expiresOnTimestamp/1000):Math.floor(Date.now()/1000)+300};return await this.tokenCache.set(Y,G),G}createEntraIdFetch($=fetch){return async(Y,X)=>{let G=await this.getEntraIdToken(),J=new Headers(X?.headers);return J.delete("api-key"),J.set("Authorization",`Bearer ${G}`),$(Y,{...X,headers:J})}}createAzureResponsesWebSocketFetch({useEntraId:$,responsesWebSocket:Y}){let X=VX4({url:Y?.url??`wss://${this.config.resourceName}.openai.azure.com/openai/v1/responses`,headers:Y?.headers,apiKeyQueryParam:$?!1:"api-key",betaHeader:!1});return $?Object.assign(this.createEntraIdFetch(X),{close:X.close}):X}async resolveLanguageModel({modelId:$,apiKey:Y,headers:X,transport:G,responsesWebSocket:J}){let Q=this.config.useResponsesAPI??!1,W=this.config.apiVersion||(Q||this.config.useDeploymentBasedUrls===!1?"v1":"2024-04-01-preview"),K=this.config.useDeploymentBasedUrls??(Q?!1:!0),Z=this.config.authentication?.type==="entraId",z=Q&&G==="websocket"?this.createAzureResponsesWebSocketFetch({useEntraId:Z,responsesWebSocket:J}):void 0,V={resourceName:this.config.resourceName,apiKey:Z?"":Y,apiVersion:W,useDeploymentBasedUrls:K,headers:{"User-Agent":b3,...X},...z&&!Z?{fetch:z}:{}},F=zX4(Z?{...V,fetch:z??this.createEntraIdFetch()}:V);if(Q){let L=tr8(F.responses($));if(z)Object.defineProperty(L,ay0,{configurable:!0,value:{type:"openai-websocket",close:z.close}});return L}return F($)}};Ya8=new Set(["openai"]);yb0=[new KT,new qm,new WT(Qa8("models.dev"))],ME=class ${specificationVersion="v2";defaultObjectGenerationMode="json";supportsStructuredOutputs=!0;supportsImageUrls=!0;supportedUrls;modelId;provider;gatewayId;config;gateway;_supportedUrlsPromise=null;instanceGatewayCache=uY4();#$;constructor(Y,X){let G;if(typeof Y==="string")G={id:Y};else if("providerId"in Y&&"modelId"in Y)G={id:`${Y.providerId}/${Y.modelId}`,url:Y.url,apiKey:Y.apiKey,headers:Y.headers};else G={id:Y.id,url:Y.url,apiKey:Y.apiKey,headers:Y.headers};let J={...G,routerId:G.id},Q=X?.length?[...X,...yb0.filter((H)=>!X.some((z)=>z.id===H.id))]:yb0;this.gateway=$a8(G.id,Q),this.gatewayId=this.gateway.id;let W=this.gateway.id==="models.dev"?void 0:this.gateway.id,K=QT(G.id,W);if(this.provider=K.providerId||"openai-compatible",K.providerId&&K.modelId!==G.id)J.id=K.modelId;this.modelId=J.id,this.config=J;let Z=this;this.supportedUrls={then(H,z){return Z._resolveSupportedUrls().then(H,z)}}}async _resolveSupportedUrls(){if(this._supportedUrlsPromise)return this._supportedUrlsPromise;return this._supportedUrlsPromise=this._fetchSupportedUrls(),this._supportedUrlsPromise}async _fetchSupportedUrls(){let Y;try{if(this.config.url)Y=this.config.apiKey||"";else Y=this.config.apiKey||await this.gateway.getApiKey(this.config.routerId)}catch{return{}}try{let X=this.gateway.id==="models.dev"?void 0:this.gateway.id,J=(await this.resolveLanguageModel({apiKey:Y,headers:this.config.headers,...QT(this.config.routerId,X)})).supportedUrls;if(!J)return{};if(typeof J.then==="function")return await J??{};return J??{}}catch{return{}}}_getStreamTransport(){return this.#$}serializeForSpan(){return{specificationVersion:this.specificationVersion,modelId:this.modelId,provider:this.provider,gatewayId:this.gatewayId}}getGatewayCache(){let Y=$.gatewayCaches.get(this.gateway);if(!Y)Y=uY4(),$.gatewayCaches.set(this.gateway,Y);return Y}setStreamTransportHandle({resolvedTransport:Y,transport:X,responsesWebSocket:G}){if(Y!=="websocket"){this.#$=void 0;return}if(!X){this.#$=void 0;return}this.#$={type:X.type,close:X.close,closeOnFinish:G?.closeOnFinish??!0}}setStreamTransportFromCache({cache:Y,resolvedTransport:X,key:G,responsesWebSocket:J}){let Q=Y.webSocketFetches.get(G),W=Y.gatewayStreamTransports.get(G),K=Q?{type:"openai-websocket",close:()=>Q.close()}:W;this.setStreamTransportHandle({resolvedTransport:X,transport:K,responsesWebSocket:J})}async doGenerate(Y){let X;try{if(this.config.url)X=this.config.apiKey||"";else X=this.config.apiKey||await this.gateway.getApiKey(this.config.routerId)}catch(W){return{stream:new ReadableStream({start(K){K.enqueue({type:"error",error:W}),K.close()}})}}let G=this.gateway.id==="models.dev"?void 0:this.gateway.id,J=await this.resolveLanguageModel({apiKey:X,headers:this.config.headers,...QT(this.config.routerId,G)});if(mY4(J))return new F50(J).doGenerate(Y);return new UT(J).doGenerate(Y)}async doStream(Y){let X;try{if(this.config.url)X=this.config.apiKey||"";else X=this.config.apiKey||await this.gateway.getApiKey(this.config.routerId)}catch(N){return{stream:new ReadableStream({start(D){D.enqueue({type:"error",error:N}),D.close()}})}}let G=this.gateway.id==="models.dev"?void 0:this.gateway.id,J=QT(this.config.routerId,G),{transport:Q,websocket:W}=Ga8(Y.providerOptions,J.providerId),H=(Q==="auto"?"websocket":Q)==="websocket"&&!this.config.url&&(this.gateway.id==="models.dev"&&Ya8.has(this.provider)||this.gateway.id==="azure-openai")?"websocket":"fetch",z=await this.resolveLanguageModel({apiKey:X,headers:this.config.headers,transport:H,responsesWebSocket:W,...J}),V=this.#$;if(mY4(z)){let D=await new F50(z).doStream(Y);return V50(D,V),D}let L=await new UT(z).doStream(Y);return V50(L,V),L}async resolveLanguageModel({modelId:Y,providerId:X,apiKey:G,headers:J,transport:Q,responsesWebSocket:W}){let K=Q??"fetch",Z=K==="websocket"?`${W?.url??""}:${pY4(W?.headers)}`:"",z=this.config.apiKey!==void 0?this.instanceGatewayCache:this.getGatewayCache(),V=bn8("sha256").update(JSON.stringify([this.gateway.id,Y,X,this.config.url||"",pY4(J),K,Z])).digest("hex");if(z.modelInstances.has(V))return this.setStreamTransportFromCache({cache:z,resolvedTransport:K,key:V,responsesWebSocket:W}),z.modelInstances.get(V);if(this.config.url){let N=ND({name:X,apiKey:G,baseURL:this.config.url,headers:this.config.headers,supportsStructuredOutputs:!0}).chatModel(Y);return z.modelInstances.set(V,N),this.setStreamTransportHandle({resolvedTransport:K,responsesWebSocket:W}),N}if(K==="websocket"&&X==="openai"&&this.gateway.id==="models.dev"){let N=await this.gateway.buildUrl(this.config.routerId,process.env);if(Ja8(N)){let{modelInstance:D,wsFetch:A}=this.resolveOpenAIWebSocketModel({modelId:Y,apiKey:G,baseURL:N,headers:J,responsesWebSocket:W});return z.modelInstances.set(V,D),z.webSocketFetches.set(V,A),this.setStreamTransportFromCache({cache:z,resolvedTransport:K,key:V,responsesWebSocket:W}),D}}let F=await this.gateway.resolveLanguageModel({modelId:Y,providerId:X,apiKey:G,headers:J,transport:K,responsesWebSocket:W}),L=Wa8(F);if(z.modelInstances.set(V,F),L)z.gatewayStreamTransports.set(V,L);return this.setStreamTransportHandle({resolvedTransport:K,transport:L,responsesWebSocket:W}),F}resolveOpenAIWebSocketModel({modelId:Y,apiKey:X,baseURL:G,headers:J,responsesWebSocket:Q}){let W=VX4({url:Q?.url,headers:Q?.headers});return{modelInstance:AD({apiKey:X,baseURL:G,headers:J,fetch:W}).responses(Y),wsFetch:W}}static _clearCachesForTests(){$.gatewayCaches=new WeakMap}static gatewayCaches=new WeakMap};Ua8=Y6(()=>v1(U.object({error:U.object({code:U.number().nullable(),message:U.string(),status:U.string()})}))),wm=zJ({errorSchema:Ua8,errorToMessage:($)=>$.error.message}),Ha8=U.union([U.object({text:U.string()}),U.object({inlineData:U.object({mimeType:U.string(),data:U.string()})})]),za8=Y6(()=>v1(U.object({outputDimensionality:U.number().optional(),taskType:U.enum(["SEMANTIC_SIMILARITY","CLASSIFICATION","CLUSTERING","RETRIEVAL_DOCUMENT","RETRIEVAL_QUERY","QUESTION_ANSWERING","FACT_VERIFICATION","CODE_RETRIEVAL_QUERY"]).optional(),content:U.array(U.array(Ha8).min(1).nullable()).optional()}))),Fa8=Y6(()=>v1(U.object({embeddings:U.array(U.object({values:U.array(U.number())}))}))),La8=Y6(()=>v1(U.object({embedding:U.object({values:U.array(U.number())})})));Oa8=Y6(()=>v1(U.object({responseModalities:U.array(U.enum(["TEXT","IMAGE"])).optional(),thinkingConfig:U.object({thinkingBudget:U.number().optional(),includeThoughts:U.boolean().optional(),thinkingLevel:U.enum(["minimal","low","medium","high"]).optional()}).optional(),cachedContent:U.string().optional(),structuredOutputs:U.boolean().optional(),safetySettings:U.array(U.object({category:U.enum(["HARM_CATEGORY_UNSPECIFIED","HARM_CATEGORY_HATE_SPEECH","HARM_CATEGORY_DANGEROUS_CONTENT","HARM_CATEGORY_HARASSMENT","HARM_CATEGORY_SEXUALLY_EXPLICIT","HARM_CATEGORY_CIVIC_INTEGRITY"]),threshold:U.enum(["HARM_BLOCK_THRESHOLD_UNSPECIFIED","BLOCK_LOW_AND_ABOVE","BLOCK_MEDIUM_AND_ABOVE","BLOCK_ONLY_HIGH","BLOCK_NONE","OFF"])})).optional(),threshold:U.enum(["HARM_BLOCK_THRESHOLD_UNSPECIFIED","BLOCK_LOW_AND_ABOVE","BLOCK_MEDIUM_AND_ABOVE","BLOCK_ONLY_HIGH","BLOCK_NONE","OFF"]).optional(),audioTimestamp:U.boolean().optional(),labels:U.record(U.string(),U.string()).optional(),mediaResolution:U.enum(["MEDIA_RESOLUTION_UNSPECIFIED","MEDIA_RESOLUTION_LOW","MEDIA_RESOLUTION_MEDIUM","MEDIA_RESOLUTION_HIGH"]).optional(),imageConfig:U.object({aspectRatio:U.enum(["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9","1:8","8:1","1:4","4:1"]).optional(),imageSize:U.enum(["1K","2K","4K","512"]).optional()}).optional(),retrievalConfig:U.object({latLng:U.object({latitude:U.number(),longitude:U.number()}).optional()}).optional(),serviceTier:U.enum(["standard","flex","priority"]).optional()}))),Ea8={standard:"SERVICE_TIER_STANDARD",flex:"SERVICE_TIER_FLEX",priority:"SERVICE_TIER_PRIORITY"};nY4=U.array(U.object({modality:U.string(),tokenCount:U.number()})).nullish(),DX4=U.object({cachedContentTokenCount:U.number().nullish(),thoughtsTokenCount:U.number().nullish(),promptTokenCount:U.number().nullish(),candidatesTokenCount:U.number().nullish(),totalTokenCount:U.number().nullish(),trafficType:U.string().nullish(),promptTokensDetails:nY4,candidatesTokensDetails:nY4}),Pa8=Y6(()=>v1(U.object({candidates:U.array(U.object({content:LX4().nullish().or(U.object({}).strict()),finishReason:U.string().nullish(),safetyRatings:U.array(D50()).nullish(),groundingMetadata:FX4().nullish(),urlContextMetadata:NX4().nullish()})),usageMetadata:DX4.nullish(),promptFeedback:U.object({blockReason:U.string().nullish(),safetyRatings:U.array(D50()).nullish()}).nullish(),serviceTier:U.string().nullish()}))),wa8=Y6(()=>v1(U.object({candidates:U.array(U.object({content:LX4().nullish(),finishReason:U.string().nullish(),safetyRatings:U.array(D50()).nullish(),groundingMetadata:FX4().nullish(),urlContextMetadata:NX4().nullish()})).nullish(),usageMetadata:DX4.nullish(),promptFeedback:U.object({blockReason:U.string().nullish(),safetyRatings:U.array(D50()).nullish()}).nullish(),serviceTier:U.string().nullish()}))),_a8=HJ({id:"google.code_execution",name:"code_execution",inputSchema:U.object({language:U.string().describe("The programming language of the code."),code:U.string().describe("The code to be executed.")}),outputSchema:U.object({outcome:U.string().describe('The outcome of the execution (e.g., "OUTCOME_OK").'),output:U.string().describe("The output from the code execution.")})}),ja8=DD({id:"google.enterprise_web_search",name:"enterprise_web_search",inputSchema:Y6(()=>v1(U.object({})))}),Ta8=U.object({fileSearchStoreNames:U.array(U.string()).describe("The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`"),topK:U.number().int().positive().describe("The number of file search retrieval chunks to retrieve.").optional(),metadataFilter:U.string().describe("Metadata filter to apply to the file search retrieval documents. See https://google.aip.dev/160 for the syntax of the filter expression.").optional()}).passthrough(),Ia8=Y6(()=>v1(Ta8)),Ca8=DD({id:"google.file_search",name:"file_search",inputSchema:Ia8}),Sa8=DD({id:"google.google_maps",name:"google_maps",inputSchema:Y6(()=>v1(U.object({})))}),ka8=U.object({searchTypes:U.object({webSearch:U.object({}).optional(),imageSearch:U.object({}).optional()}).optional(),timeRangeFilter:U.object({startTime:U.string(),endTime:U.string()}).optional()}).passthrough(),va8=Y6(()=>v1(ka8)),xa8=DD({id:"google.google_search",name:"google_search",inputSchema:va8}),ya8=DD({id:"google.url_context",name:"url_context",inputSchema:Y6(()=>v1(U.object({})))}),ba8=DD({id:"google.vertex_rag_store",name:"vertex_rag_store",inputSchema:U.object({ragCorpus:U.string(),topK:U.number().optional()})}),ha8={googleSearch:xa8,enterpriseWebSearch:ja8,googleMaps:Sa8,urlContext:ya8,fileSearch:Ca8,codeExecution:_a8,vertexRagStore:ba8},ga8=Y6(()=>v1(U.object({predictions:U.array(U.object({bytesBase64Encoded:U.string()})).default([])}))),ma8=Y6(()=>v1(U.object({personGeneration:U.enum(["dont_allow","allow_adult","allow_all"]).nullish(),aspectRatio:U.enum(["1:1","3:4","4:3","9:16","16:9"]).nullish()})));AX4();fb0=U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.any().nullish(),code:U.union([U.string(),U.number()]).nullish()})}),g3=zJ({errorSchema:fb0,errorToMessage:($)=>$.error.message});pa8=j8(()=>v1(U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({role:U.literal("assistant").nullish(),content:U.string().nullish(),tool_calls:U.array(U.object({id:U.string().nullish(),type:U.literal("function"),function:U.object({name:U.string(),arguments:U.string()})})).nullish(),annotations:U.array(U.object({type:U.literal("url_citation"),url_citation:U.object({start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()})})).nullish()}),index:U.number(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}).nullish(),finish_reason:U.string().nullish()})),usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish()}))),da8=j8(()=>v1(U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).nullish(),content:U.string().nullish(),tool_calls:U.array(U.object({index:U.number(),id:U.string().nullish(),type:U.literal("function").nullish(),function:U.object({name:U.string().nullish(),arguments:U.string().nullish()})})).nullish(),annotations:U.array(U.object({type:U.literal("url_citation"),url_citation:U.object({start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()})})).nullish()}).nullish(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}).nullish(),finish_reason:U.string().nullish(),index:U.number()})),usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish()}),fb0]))),ca8=j8(()=>v1(U.object({logitBias:U.record(U.coerce.number(),U.number()).optional(),logprobs:U.union([U.boolean(),U.number()]).optional(),parallelToolCalls:U.boolean().optional(),user:U.string().optional(),reasoningEffort:U.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:U.number().optional(),store:U.boolean().optional(),metadata:U.record(U.string().max(64),U.string().max(512)).optional(),prediction:U.record(U.string(),U.any()).optional(),structuredOutputs:U.boolean().optional(),serviceTier:U.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:U.boolean().optional(),textVerbosity:U.enum(["low","medium","high"]).optional(),promptCacheKey:U.string().optional(),promptCacheRetention:U.enum(["in_memory","24h"]).optional(),safetyIdentifier:U.string().optional()})));ra8=j8(()=>v1(U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string(),logprobs:U.object({tokens:U.array(U.string()),token_logprobs:U.array(U.number()),top_logprobs:U.array(U.record(U.string(),U.number())).nullish()}).nullish()})),usage:U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}).nullish()}))),aa8=j8(()=>v1(U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string().nullish(),index:U.number(),logprobs:U.object({tokens:U.array(U.string()),token_logprobs:U.array(U.number()),top_logprobs:U.array(U.record(U.string(),U.number())).nullish()}).nullish()})),usage:U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}).nullish()}),fb0]))),oY4=j8(()=>v1(U.object({echo:U.boolean().optional(),logitBias:U.record(U.string(),U.number()).optional(),suffix:U.string().optional(),user:U.string().optional(),logprobs:U.union([U.boolean(),U.number()]).optional()}))),oa8=j8(()=>v1(U.object({dimensions:U.number().optional(),user:U.string().optional()}))),ta8=j8(()=>v1(U.object({data:U.array(U.object({embedding:U.array(U.number())})),usage:U.object({prompt_tokens:U.number()}).nullish()}))),$s8=j8(()=>v1(U.object({created:U.number().nullish(),data:U.array(U.object({b64_json:U.string(),revised_prompt:U.string().nullish()})),background:U.string().nullish(),output_format:U.string().nullish(),size:U.string().nullish(),quality:U.string().nullish(),usage:U.object({input_tokens:U.number().nullish(),output_tokens:U.number().nullish(),total_tokens:U.number().nullish(),input_tokens_details:U.object({image_tokens:U.number().nullish(),text_tokens:U.number().nullish()}).nullish()}).nullish()}))),Ys8={"dall-e-3":1,"dall-e-2":10,"gpt-image-1":10,"gpt-image-1-mini":10,"gpt-image-1.5":10,"gpt-image-2":10},Xs8=new Set(["gpt-image-1","gpt-image-1-mini","gpt-image-1.5","gpt-image-2"]),OX4=U.object({quality:U.enum(["standard","hd","low","medium","high","auto"]).optional(),background:U.enum(["transparent","opaque","auto"]).optional(),outputFormat:U.enum(["png","jpeg","webp"]).optional(),outputCompression:U.number().int().min(0).max(100).optional(),user:U.string().optional()});j8(()=>v1(OX4));Gs8=j8(()=>v1(OX4.extend({style:U.enum(["vivid","natural"]).optional(),moderation:U.enum(["auto","low"]).optional()})));Ws8=Y6(()=>v1(U.object({code:U.string().nullish(),containerId:U.string()}))),Ks8=Y6(()=>v1(U.object({outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullish()}))),Zs8=Y6(()=>v1(U.object({container:U.union([U.string(),U.object({fileIds:U.array(U.string()).optional()})]).optional()}))),Us8=HJ({id:"openai.code_interpreter",name:"code_interpreter",inputSchema:Ws8,outputSchema:Ks8}),EX4=U.object({key:U.string(),type:U.enum(["eq","ne","gt","gte","lt","lte","in","nin"]),value:U.union([U.string(),U.number(),U.boolean(),U.array(U.string())])}),MX4=U.object({type:U.enum(["and","or"]),filters:U.array(U.union([EX4,U.lazy(()=>MX4)]))}),zs8=Y6(()=>v1(U.object({vectorStoreIds:U.array(U.string()),maxNumResults:U.number().optional(),ranking:U.object({ranker:U.string().optional(),scoreThreshold:U.number().optional()}).optional(),filters:U.union([EX4,MX4]).optional()}))),Vs8=Y6(()=>v1(U.object({queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.unknown()),fileId:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullable()}))),Fs8=HJ({id:"openai.file_search",name:"file_search",inputSchema:U.object({}),outputSchema:Vs8}),Ls8=Y6(()=>v1(U.object({background:U.enum(["auto","opaque","transparent"]).optional(),inputFidelity:U.enum(["low","high"]).optional(),inputImageMask:U.object({fileId:U.string().optional(),imageUrl:U.string().optional()}).optional(),model:U.string().optional(),moderation:U.enum(["auto"]).optional(),outputCompression:U.number().int().min(0).max(100).optional(),outputFormat:U.enum(["png","jpeg","webp"]).optional(),partialImages:U.number().int().min(0).max(3).optional(),quality:U.enum(["auto","low","medium","high"]).optional(),size:U.enum(["1024x1024","1024x1536","1536x1024","auto"]).optional()}).strict())),Ds8=Y6(()=>v1(U.object({}))),Ns8=Y6(()=>v1(U.object({result:U.string()}))),As8=HJ({id:"openai.image_generation",name:"image_generation",inputSchema:Ds8,outputSchema:Ns8}),RX4=Y6(()=>v1(U.object({action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeoutMs:U.number().optional(),user:U.string().optional(),workingDirectory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}))),qX4=Y6(()=>v1(U.object({output:U.string()}))),Os8=HJ({id:"openai.local_shell",name:"local_shell",inputSchema:RX4,outputSchema:qX4}),Es8=Y6(()=>v1(U.object({externalWebAccess:U.boolean().optional(),filters:U.object({allowedDomains:U.array(U.string()).optional()}).optional(),searchContextSize:U.enum(["low","medium","high"]).optional(),userLocation:U.object({type:U.literal("approximate"),country:U.string().optional(),city:U.string().optional(),region:U.string().optional(),timezone:U.string().optional()}).optional()}))),Ms8=Y6(()=>v1(U.object({}))),Rs8=Y6(()=>v1(U.object({action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().optional()}),U.object({type:U.literal("openPage"),url:U.string().nullish()}),U.object({type:U.literal("findInPage"),url:U.string().nullish(),pattern:U.string().nullish()})]).optional(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).optional()}))),qs8=HJ({id:"openai.web_search",name:"web_search",inputSchema:Ms8,outputSchema:Rs8}),ws8=Y6(()=>v1(U.object({searchContextSize:U.enum(["low","medium","high"]).optional(),userLocation:U.object({type:U.literal("approximate"),country:U.string().optional(),city:U.string().optional(),region:U.string().optional(),timezone:U.string().optional()}).optional()}))),_s8=Y6(()=>v1(U.object({}))),js8=Y6(()=>v1(U.object({action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().optional()}),U.object({type:U.literal("openPage"),url:U.string().nullish()}),U.object({type:U.literal("findInPage"),url:U.string().nullish(),pattern:U.string().nullish()})]).optional()}))),Ts8=HJ({id:"openai.web_search_preview",name:"web_search_preview",inputSchema:_s8,outputSchema:js8}),Is8={codeInterpreter:Hs8,fileSearch:Fs8,imageGeneration:Bs8,localShell:Os8,webSearchPreview:Ts8,webSearch:Ps8};Ss8=U.object({itemId:U.string().nullish(),reasoningEncryptedContent:U.string().nullish()});ks8=j8(()=>v1(U.union([U.object({type:U.literal("response.output_text.delta"),item_id:U.string(),delta:U.string(),logprobs:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}),U.object({type:U.enum(["response.completed","response.incomplete"]),response:U.object({incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.created"),response:U.object({id:U.string(),created_at:U.number(),model:U.string(),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.output_item.added"),output_index:U.number(),item:U.discriminatedUnion("type",[U.object({type:U.literal("message"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish()}),U.object({type:U.literal("function_call"),id:U.string(),call_id:U.string(),name:U.string(),arguments:U.string()}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string()}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.string()}),U.object({type:U.literal("file_search_call"),id:U.string()}),U.object({type:U.literal("image_generation_call"),id:U.string()}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),container_id:U.string(),code:U.string().nullable(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable(),status:U.string()})])}),U.object({type:U.literal("response.output_item.done"),output_index:U.number(),item:U.discriminatedUnion("type",[U.object({type:U.literal("message"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish()}),U.object({type:U.literal("function_call"),id:U.string(),call_id:U.string(),name:U.string(),arguments:U.string(),status:U.literal("completed")}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),code:U.string().nullable(),container_id:U.string(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable()}),U.object({type:U.literal("image_generation_call"),id:U.string(),result:U.string()}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string(),action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().nullish(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).nullish()}),U.object({type:U.literal("open_page"),url:U.string().nullish()}),U.object({type:U.literal("find_in_page"),url:U.string().nullish(),pattern:U.string().nullish()})]).nullish()}),U.object({type:U.literal("file_search_call"),id:U.string(),queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.unknown()),file_id:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullish()}),U.object({type:U.literal("local_shell_call"),id:U.string(),call_id:U.string(),action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeout_ms:U.number().optional(),user:U.string().optional(),working_directory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.literal("completed")})])}),U.object({type:U.literal("response.function_call_arguments.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.image_generation_call.partial_image"),item_id:U.string(),output_index:U.number(),partial_image_b64:U.string()}),U.object({type:U.literal("response.code_interpreter_call_code.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.code_interpreter_call_code.done"),item_id:U.string(),output_index:U.number(),code:U.string()}),U.object({type:U.literal("response.output_text.annotation.added"),annotation:U.discriminatedUnion("type",[U.object({type:U.literal("url_citation"),start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()}),U.object({type:U.literal("file_citation"),file_id:U.string(),filename:U.string().nullish(),index:U.number().nullish(),start_index:U.number().nullish(),end_index:U.number().nullish(),quote:U.string().nullish()})])}),U.object({type:U.literal("response.reasoning_summary_part.added"),item_id:U.string(),summary_index:U.number()}),U.object({type:U.literal("response.reasoning_summary_text.delta"),item_id:U.string(),summary_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.reasoning_summary_part.done"),item_id:U.string(),summary_index:U.number()}),U.object({type:U.literal("error"),sequence_number:U.number(),error:U.object({type:U.string(),code:U.string(),message:U.string(),param:U.string().nullish()})}),U.object({type:U.string()}).loose().transform(($)=>({type:"unknown_chunk",message:$.type}))]))),vs8=j8(()=>v1(U.object({id:U.string().optional(),created_at:U.number().optional(),error:U.object({message:U.string(),type:U.string(),param:U.string().nullish(),code:U.string()}).nullish(),model:U.string().optional(),output:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("message"),role:U.literal("assistant"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish(),content:U.array(U.object({type:U.literal("output_text"),text:U.string(),logprobs:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish(),annotations:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url_citation"),start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()}),U.object({type:U.literal("file_citation"),file_id:U.string(),filename:U.string().nullish(),index:U.number().nullish(),start_index:U.number().nullish(),end_index:U.number().nullish(),quote:U.string().nullish()}),U.object({type:U.literal("container_file_citation"),container_id:U.string(),file_id:U.string(),filename:U.string().nullish(),start_index:U.number().nullish(),end_index:U.number().nullish(),index:U.number().nullish()}),U.object({type:U.literal("file_path"),file_id:U.string(),index:U.number().nullish()})]))}))}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string(),action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().nullish(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).nullish()}),U.object({type:U.literal("open_page"),url:U.string().nullish()}),U.object({type:U.literal("find_in_page"),url:U.string().nullish(),pattern:U.string().nullish()})]).nullish()}),U.object({type:U.literal("file_search_call"),id:U.string(),queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.union([U.string(),U.number(),U.boolean()])),file_id:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullish()}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),code:U.string().nullable(),container_id:U.string(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable()}),U.object({type:U.literal("image_generation_call"),id:U.string(),result:U.string()}),U.object({type:U.literal("local_shell_call"),id:U.string(),call_id:U.string(),action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeout_ms:U.number().optional(),user:U.string().optional(),working_directory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}),U.object({type:U.literal("function_call"),call_id:U.string(),name:U.string(),arguments:U.string(),id:U.string()}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.string().optional()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish(),summary:U.array(U.object({type:U.literal("summary_text"),text:U.string()}))})])).optional(),service_tier:U.string().nullish(),incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}).optional()}))),xs8=j8(()=>v1(U.object({conversation:U.string().nullish(),include:U.array(U.enum(["reasoning.encrypted_content","file_search_call.results","message.output_text.logprobs"])).nullish(),instructions:U.string().nullish(),logprobs:U.union([U.boolean(),U.number().min(1).max(PX4)]).optional(),maxToolCalls:U.number().nullish(),metadata:U.any().nullish(),parallelToolCalls:U.boolean().nullish(),previousResponseId:U.string().nullish(),promptCacheKey:U.string().nullish(),promptCacheRetention:U.enum(["in_memory","24h"]).nullish(),reasoningEffort:U.string().nullish(),reasoningSummary:U.string().nullish(),safetyIdentifier:U.string().nullish(),serviceTier:U.enum(["auto","flex","priority","default"]).nullish(),store:U.boolean().nullish(),strictJsonSchema:U.boolean().nullish(),textVerbosity:U.enum(["low","medium","high"]).nullish(),truncation:U.enum(["auto","disabled"]).nullish(),user:U.string().nullish()})));is8=j8(()=>v1(U.object({instructions:U.string().nullish(),speed:U.number().min(0.25).max(4).default(1).nullish()}))),rs8=j8(()=>v1(U.object({text:U.string(),language:U.string().nullish(),duration:U.number().nullish(),words:U.array(U.object({word:U.string(),start:U.number(),end:U.number()})).nullish(),segments:U.array(U.object({id:U.number(),seek:U.number(),start:U.number(),end:U.number(),text:U.string(),tokens:U.array(U.number()),temperature:U.number(),avg_logprob:U.number(),compression_ratio:U.number(),no_speech_prob:U.number()})).nullish()}))),as8=j8(()=>v1(U.object({include:U.array(U.string()).optional(),language:U.string().optional(),prompt:U.string().optional(),temperature:U.number().min(0).max(1).default(0).optional(),timestampGranularities:U.array(U.enum(["word","segment"])).default(["segment"]).optional()}))),XX4={afrikaans:"af",arabic:"ar",armenian:"hy",azerbaijani:"az",belarusian:"be",bosnian:"bs",bulgarian:"bg",catalan:"ca",chinese:"zh",croatian:"hr",czech:"cs",danish:"da",dutch:"nl",english:"en",estonian:"et",finnish:"fi",french:"fr",galician:"gl",german:"de",greek:"el",hebrew:"he",hindi:"hi",hungarian:"hu",icelandic:"is",indonesian:"id",italian:"it",japanese:"ja",kannada:"kn",kazakh:"kk",korean:"ko",latvian:"lv",lithuanian:"lt",macedonian:"mk",malay:"ms",marathi:"mr",maori:"mi",nepali:"ne",norwegian:"no",persian:"fa",polish:"pl",portuguese:"pt",romanian:"ro",russian:"ru",serbian:"sr",slovak:"sk",slovenian:"sl",spanish:"es",swahili:"sw",swedish:"sv",tagalog:"tl",tamil:"ta",thai:"th",turkish:"tr",ukrainian:"uk",urdu:"ur",vietnamese:"vi",welsh:"cy"};wX4()});async function qE(){return function($){let{exports:{mem:Y,xxh32:X,xxh64:G,init32:J,update32:Q,digest32:W,init64:K,update64:Z,digest64:H}}=$,z=new Uint8Array(Y.buffer);function V(R,q){if(Y.buffer.byteLength<R+q){let _=Math.ceil((R+q-Y.buffer.byteLength)/65536);Y.grow(_),z=new Uint8Array(Y.buffer)}}function F(R,q,_,P,w,j){V(R);let C=new Uint8Array(R);return z.set(C),_(0,q),C.set(z.subarray(0,R)),{update(k){let S;return z.set(C),typeof k=="string"?(V(3*k.length,R),S=A.encodeInto(k,z.subarray(R)).written):(V(k.byteLength,R),z.set(k,R),S=k.byteLength),P(0,R,S),C.set(z.subarray(0,R)),this},digest:()=>(z.set(C),j(w(0)))}}function L(R){return R>>>0}let N=2n**64n-1n;function D(R){return R&N}let A=new TextEncoder,B=0,O=0n;function E(R,q=B){return V(3*R.length,0),L(X(0,A.encodeInto(R,z).written,q))}function M(R,q=O){return V(3*R.length,0),D(G(0,A.encodeInto(R,z).written,q))}return{h32:E,h32ToString:(R,q=B)=>E(R,q).toString(16).padStart(8,"0"),h32Raw:(R,q=B)=>(V(R.byteLength,0),z.set(R),L(X(0,R.byteLength,q))),create32:(R=B)=>F(48,R,J,Q,W,L),h64:M,h64ToString:(R,q=O)=>M(R,q).toString(16).padStart(16,"0"),h64Raw:(R,q=O)=>(V(R.byteLength,0),z.set(R),D(G(0,R.byteLength,q))),create64:(R=O)=>F(88,R,K,Z,H,D)}}((await WebAssembly.instantiate(ts8)).instance)}var ts8;var N50=V0(()=>{ts8=new Uint8Array([0,97,115,109,1,0,0,0,1,48,8,96,3,127,127,127,1,127,96,3,127,127,127,0,96,2,127,127,0,96,1,127,1,127,96,3,127,127,126,1,126,96,3,126,127,127,1,126,96,2,127,126,0,96,1,127,1,126,3,11,10,0,0,2,1,3,4,5,6,1,7,5,3,1,0,1,7,85,9,3,109,101,109,2,0,5,120,120,104,51,50,0,0,6,105,110,105,116,51,50,0,2,8,117,112,100,97,116,101,51,50,0,3,8,100,105,103,101,115,116,51,50,0,4,5,120,120,104,54,52,0,5,6,105,110,105,116,54,52,0,7,8,117,112,100,97,116,101,54,52,0,8,8,100,105,103,101,115,116,54,52,0,9,10,251,22,10,242,1,1,4,127,32,0,32,1,106,33,3,32,1,65,16,79,4,127,32,3,65,16,107,33,6,32,2,65,168,136,141,161,2,106,33,3,32,2,65,137,235,208,208,7,107,33,4,32,2,65,207,140,162,142,6,106,33,5,3,64,32,3,32,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,3,32,4,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,4,32,2,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,2,32,5,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,5,32,6,32,0,65,4,106,34,0,79,13,0,11,32,2,65,12,119,32,5,65,18,119,106,32,4,65,7,119,106,32,3,65,1,119,106,5,32,2,65,177,207,217,178,1,106,11,32,1,106,32,0,32,1,65,15,113,16,1,11,146,1,0,32,1,32,2,106,33,2,3,64,32,1,65,4,106,32,2,75,69,4,64,32,0,32,1,40,2,0,65,189,220,202,149,124,108,106,65,17,119,65,175,214,211,190,2,108,33,0,32,1,65,4,106,33,1,12,1,11,11,3,64,32,1,32,2,79,69,4,64,32,0,32,1,45,0,0,65,177,207,217,178,1,108,106,65,11,119,65,177,243,221,241,121,108,33,0,32,1,65,1,106,33,1,12,1,11,11,32,0,32,0,65,15,118,115,65,247,148,175,175,120,108,34,0,65,13,118,32,0,115,65,189,220,202,149,124,108,34,0,65,16,118,32,0,115,11,63,0,32,0,65,8,106,32,1,65,168,136,141,161,2,106,54,2,0,32,0,65,12,106,32,1,65,137,235,208,208,7,107,54,2,0,32,0,65,16,106,32,1,54,2,0,32,0,65,20,106,32,1,65,207,140,162,142,6,106,54,2,0,11,195,4,1,6,127,32,1,32,2,106,33,6,32,0,65,24,106,33,4,32,0,65,40,106,40,2,0,33,3,32,0,32,0,40,2,0,32,2,106,54,2,0,32,0,65,4,106,34,5,32,5,40,2,0,32,2,65,16,79,32,0,40,2,0,65,16,79,114,114,54,2,0,32,2,32,3,106,65,16,73,4,64,32,3,32,4,106,32,1,32,2,252,10,0,0,32,0,65,40,106,32,2,32,3,106,54,2,0,15,11,32,3,4,64,32,3,32,4,106,32,1,65,16,32,3,107,34,2,252,10,0,0,32,0,65,8,106,34,3,32,3,40,2,0,32,4,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,12,106,34,3,32,3,40,2,0,32,4,65,4,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,16,106,34,3,32,3,40,2,0,32,4,65,8,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,20,106,34,3,32,3,40,2,0,32,4,65,12,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,40,106,65,0,54,2,0,32,1,32,2,106,33,1,11,32,1,32,6,65,16,107,77,4,64,32,6,65,16,107,33,8,32,0,65,8,106,40,2,0,33,2,32,0,65,12,106,40,2,0,33,3,32,0,65,16,106,40,2,0,33,5,32,0,65,20,106,40,2,0,33,7,3,64,32,2,32,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,2,32,3,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,3,32,5,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,5,32,7,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,7,32,8,32,1,65,4,106,34,1,79,13,0,11,32,0,65,8,106,32,2,54,2,0,32,0,65,12,106,32,3,54,2,0,32,0,65,16,106,32,5,54,2,0,32,0,65,20,106,32,7,54,2,0,11,32,1,32,6,73,4,64,32,4,32,1,32,6,32,1,107,34,1,252,10,0,0,32,0,65,40,106,32,1,54,2,0,11,11,97,1,1,127,32,0,65,16,106,40,2,0,33,1,32,0,65,4,106,40,2,0,4,127,32,1,65,12,119,32,0,65,20,106,40,2,0,65,18,119,106,32,0,65,12,106,40,2,0,65,7,119,106,32,0,65,8,106,40,2,0,65,1,119,106,5,32,1,65,177,207,217,178,1,106,11,32,0,40,2,0,106,32,0,65,24,106,32,0,65,40,106,40,2,0,16,1,11,255,3,2,3,126,1,127,32,0,32,1,106,33,6,32,1,65,32,79,4,126,32,6,65,32,107,33,6,32,2,66,214,235,130,238,234,253,137,245,224,0,124,33,3,32,2,66,177,169,172,193,173,184,212,166,61,125,33,4,32,2,66,249,234,208,208,231,201,161,228,225,0,124,33,5,3,64,32,3,32,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,3,32,4,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,4,32,2,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,2,32,5,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,5,32,6,32,0,65,8,106,34,0,79,13,0,11,32,2,66,12,137,32,5,66,18,137,124,32,4,66,7,137,124,32,3,66,1,137,124,32,3,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,4,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,2,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,5,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,5,32,2,66,197,207,217,178,241,229,186,234,39,124,11,32,1,173,124,32,0,32,1,65,31,113,16,6,11,134,2,0,32,1,32,2,106,33,2,3,64,32,2,32,1,65,8,106,79,4,64,32,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,32,0,133,66,27,137,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,33,0,32,1,65,8,106,33,1,12,1,11,11,32,1,65,4,106,32,2,77,4,64,32,0,32,1,53,2,0,66,135,149,175,175,152,182,222,155,158,127,126,133,66,23,137,66,207,214,211,190,210,199,171,217,66,126,66,249,243,221,241,153,246,153,171,22,124,33,0,32,1,65,4,106,33,1,11,3,64,32,1,32,2,73,4,64,32,0,32,1,49,0,0,66,197,207,217,178,241,229,186,234,39,126,133,66,11,137,66,135,149,175,175,152,182,222,155,158,127,126,33,0,32,1,65,1,106,33,1,12,1,11,11,32,0,32,0,66,33,136,133,66,207,214,211,190,210,199,171,217,66,126,34,0,32,0,66,29,136,133,66,249,243,221,241,153,246,153,171,22,126,34,0,32,0,66,32,136,133,11,77,0,32,0,65,8,106,32,1,66,214,235,130,238,234,253,137,245,224,0,124,55,3,0,32,0,65,16,106,32,1,66,177,169,172,193,173,184,212,166,61,125,55,3,0,32,0,65,24,106,32,1,55,3,0,32,0,65,32,106,32,1,66,249,234,208,208,231,201,161,228,225,0,124,55,3,0,11,244,4,2,3,127,4,126,32,1,32,2,106,33,5,32,0,65,40,106,33,4,32,0,65,200,0,106,40,2,0,33,3,32,0,32,0,41,3,0,32,2,173,124,55,3,0,32,2,32,3,106,65,32,73,4,64,32,3,32,4,106,32,1,32,2,252,10,0,0,32,0,65,200,0,106,32,2,32,3,106,54,2,0,15,11,32,3,4,64,32,3,32,4,106,32,1,65,32,32,3,107,34,2,252,10,0,0,32,0,65,8,106,34,3,32,3,41,3,0,32,4,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,16,106,34,3,32,3,41,3,0,32,4,65,8,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,24,106,34,3,32,3,41,3,0,32,4,65,16,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,32,106,34,3,32,3,41,3,0,32,4,65,24,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,200,0,106,65,0,54,2,0,32,1,32,2,106,33,1,11,32,1,65,32,106,32,5,77,4,64,32,5,65,32,107,33,2,32,0,65,8,106,41,3,0,33,6,32,0,65,16,106,41,3,0,33,7,32,0,65,24,106,41,3,0,33,8,32,0,65,32,106,41,3,0,33,9,3,64,32,6,32,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,6,32,7,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,7,32,8,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,8,32,9,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,9,32,2,32,1,65,8,106,34,1,79,13,0,11,32,0,65,8,106,32,6,55,3,0,32,0,65,16,106,32,7,55,3,0,32,0,65,24,106,32,8,55,3,0,32,0,65,32,106,32,9,55,3,0,11,32,1,32,5,73,4,64,32,4,32,1,32,5,32,1,107,34,1,252,10,0,0,32,0,65,200,0,106,32,1,54,2,0,11,11,188,2,1,5,126,32,0,65,24,106,41,3,0,33,1,32,0,41,3,0,34,2,66,32,90,4,126,32,0,65,8,106,41,3,0,34,3,66,1,137,32,0,65,16,106,41,3,0,34,4,66,7,137,124,32,1,66,12,137,32,0,65,32,106,41,3,0,34,5,66,18,137,124,124,32,3,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,4,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,1,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,5,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,5,32,1,66,197,207,217,178,241,229,186,234,39,124,11,32,2,124,32,0,65,40,106,32,2,66,31,131,167,16,6,11])});var jX4=o((x6$,_X4)=>{function es8($){var Y=new $,X=Y;function G(){var Q=Y;if(Q.next)Y=Q.next;else Y=new $,X=Y;return Q.next=null,Q}function J(Q){X.next=Q,X=Q}return{get:G,release:J}}_X4.exports=es8});var IX4=o((y6$,mb0)=>{var $o8=jX4();function TX4($,Y,X){if(typeof $==="function")X=Y,Y=$,$=null;if(!(X>=1))throw Error("fastqueue concurrency must be equal to or greater than 1");var G=$o8(Yo8),J=null,Q=null,W=0,K=null,Z={push:D,drain:TQ,saturated:TQ,pause:z,paused:!1,get concurrency(){return X},set concurrency(q){if(!(q>=1))throw Error("fastqueue concurrency must be equal to or greater than 1");if(X=q,Z.paused)return;for(;J&&W<X;)W++,B()},running:H,resume:L,idle:N,length:V,getQueue:F,unshift:A,empty:TQ,kill:O,killAndDrain:E,error:R,abort:M};return Z;function H(){return W}function z(){Z.paused=!0}function V(){var q=J,_=0;while(q)q=q.next,_++;return _}function F(){var q=J,_=[];while(q)_.push(q.value),q=q.next;return _}function L(){if(!Z.paused)return;if(Z.paused=!1,J===null){W++,B();return}for(;J&&W<X;)W++,B()}function N(){return W===0&&Z.length()===0}function D(q,_){var P=G.get();if(P.context=$,P.release=B,P.value=q,P.callback=_||TQ,P.errorHandler=K,W>=X||Z.paused)if(Q)Q.next=P,Q=P;else J=P,Q=P,Z.saturated();else W++,Y.call($,P.value,P.worked)}function A(q,_){var P=G.get();if(P.context=$,P.release=B,P.value=q,P.callback=_||TQ,P.errorHandler=K,W>=X||Z.paused)if(J)P.next=J,J=P;else J=P,Q=P,Z.saturated();else W++,Y.call($,P.value,P.worked)}function B(q){if(q)G.release(q);var _=J;if(_&&W<=X)if(!Z.paused){if(Q===J)Q=null;if(J=_.next,_.next=null,Y.call($,_.value,_.worked),Q===null)Z.empty()}else W--;else if(--W===0)Z.drain()}function O(){J=null,Q=null,Z.drain=TQ}function E(){J=null,Q=null,Z.drain(),Z.drain=TQ}function M(){var q=J;J=null,Q=null;while(q){var{next:_,callback:P,errorHandler:w,value:j,context:C}=q;if(q.value=null,q.callback=TQ,q.errorHandler=null,w)w(Error("abort"),j);P.call(C,Error("abort")),q.release(q),q=_}Z.drain=TQ}function R(q){K=q}}function TQ(){}function Yo8(){this.value=null,this.callback=TQ,this.next=null,this.release=TQ,this.context=null,this.errorHandler=null;var $=this;this.worked=function(X,G){var{callback:J,errorHandler:Q,value:W}=$;if($.value=null,$.callback=TQ,$.errorHandler)Q(X,W);J.call($.context,X,G),$.release($)}}function Xo8($,Y,X){if(typeof $==="function")X=Y,Y=$,$=null;function G(z,V){Y.call(this,z).then(function(F){V(null,F)},V)}var J=TX4($,G,X),Q=J.push,W=J.unshift;return J.push=K,J.unshift=Z,J.drained=H,J;function K(z){var V=new Promise(function(F,L){Q(z,function(N,D){if(N){L(N);return}F(D)})});return V.catch(TQ),V}function Z(z){var V=new Promise(function(F,L){W(z,function(N,D){if(N){L(N);return}F(D)})});return V.catch(TQ),V}function H(){var z=new Promise(function(V){process.nextTick(function(){if(J.idle())V();else{var F=J.drain;J.drain=function(){if(typeof F==="function")F();V(),J.drain=F}}})});return z}}mb0.exports=TX4;mb0.exports.promise=Xo8});async function A50($){let{fgaProvider:Y,user:X,resource:G,permission:J,context:Q}=$;if(!Y)return;await Y.require(X,{resource:G,permission:J,context:Q})}var B50;var ub0=V0(()=>{B50=class extends Error{user;resource;permission;status;constructor($,Y,X){let G=$?.id||$?.workosId||"unknown";super(`FGA authorization denied: user ${G} cannot ${X} on ${Y.type}:${Y.id}`);this.name="FGADeniedError",this.user=$,this.resource=Y,this.permission=X,this.status=403}}});var HT={};W8(HT,{checkFGA:()=>A50,FGADeniedError:()=>B50});var zT=V0(()=>{ub0()});function $U($,Y){let X=Y||Go8,G=typeof X.includeImageAlt==="boolean"?X.includeImageAlt:!0,J=typeof X.includeHtml==="boolean"?X.includeHtml:!0;return SX4($,G,J)}function SX4($,Y,X){if(Jo8($)){if("value"in $)return $.type==="html"&&!X?"":$.value;if(Y&&"alt"in $&&$.alt)return $.alt;if("children"in $)return CX4($.children,Y,X)}if(Array.isArray($))return CX4($,Y,X);return""}function CX4($,Y,X){let G=[],J=-1;while(++J<$.length)G[J]=SX4($[J],Y,X);return G.join("")}function Jo8($){return Boolean($&&typeof $==="object")}var Go8;var kX4=V0(()=>{Go8={}});var jm=V0(()=>{kX4()});function pb0($,Y){let X=String($);if(typeof Y!=="string")throw TypeError("Expected character");let G=0,J=X.indexOf(Y);while(J!==-1)G++,J=X.indexOf(Y,J+Y.length);return G}function PX(){}function PE($){return $!==null&&($<32||$===127)}function G4($){return $!==null&&$<-2}function J8($){return $!==null&&($<0||$===32)}function d4($){return $===-2||$===-1||$===32}function MD($){return Y;function Y(X){return X!==null&&X>-1&&$.test(String.fromCharCode(X))}}var DY,NY,vX4,Tm,xX4,yX4,wE,m3;var i8=V0(()=>{DY=MD(/[A-Za-z]/),NY=MD(/[\dA-Za-z]/),vX4=MD(/[#-'*+\--9=?A-Z^-~]/);Tm=MD(/\d/),xX4=MD(/[\dA-Fa-f]/),yX4=MD(/[!-/:-@[-`{-~]/);wE=MD(/\p{P}|\p{S}/u),m3=MD(/\s/)});function RD($){if(typeof $!=="string")throw TypeError("Expected a string");return $.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Qo8($){let Y=[],X=-1;while(++X<$.length)Y[X]=qD($[X]);return O50(G);function G(...J){let Q=-1;while(++Q<Y.length)if(Y[Q].apply(this,J))return!0;return!1}}function Wo8($){let Y=$;return O50(X);function X(G){let J=G,Q;for(Q in $)if(J[Q]!==Y[Q])return!1;return!0}}function Ko8($){return O50(Y);function Y(X){return X&&X.type===$}}function O50($){return Y;function Y(X,G,J){return Boolean(Uo8(X)&&$.call(this,X,typeof G==="number"?G:void 0,J||void 0))}}function Zo8(){return!0}function Uo8($){return $!==null&&typeof $==="object"&&"type"in $}var qD=function($){if($===null||$===void 0)return Zo8;if(typeof $==="function")return O50($);if(typeof $==="object")return Array.isArray($)?Qo8($):Wo8($);if(typeof $==="string")return Ko8($);throw Error("Expected function, string, or object as test")};var E50=()=>{};function bX4($){return"\x1B[33m"+$+"\x1B[39m"}function Im($,Y,X,G){let J;if(typeof Y==="function"&&typeof X!=="function")G=X,X=Y;else J=Y;let Q=qD(J),W=G?-1:1;K($,void 0,[])();function K(Z,H,z){let V=Z&&typeof Z==="object"?Z:{};if(typeof V.type==="string"){let L=typeof V.tagName==="string"?V.tagName:typeof V.name==="string"?V.name:void 0;Object.defineProperty(F,"name",{value:"node ("+bX4(Z.type+(L?"<"+L+">":""))+")"})}return F;function F(){let L=hX4,N,D,A;if(!Y||Q(Z,H,z[z.length-1]||void 0)){if(L=Ho8(X(Z,z)),L[0]===_E)return L}if("children"in Z&&Z.children){let B=Z;if(B.children&&L[0]!==R50){D=(G?B.children.length:-1)+W,A=z.concat(B);while(D>-1&&D<B.children.length){let O=B.children[D];if(N=K(O,D,A)(),N[0]===_E)return N;D=typeof N[1]==="number"?N[1]:D+W}}}return L}}}function Ho8($){if(Array.isArray($))return $;if(typeof $==="number")return[M50,$];return $===null||$===void 0?hX4:[$]}var hX4,M50=!0,_E=!1,R50="skip";var fX4=V0(()=>{E50();hX4=[]});var q50=V0(()=>{fX4()});function db0($,Y,X){let J=qD((X||{}).ignore||[]),Q=zo8(Y),W=-1;while(++W<Q.length)Im($,"text",K);function K(H,z){let V=-1,F;while(++V<z.length){let L=z[V],N=F?F.children:void 0;if(J(L,N?N.indexOf(L):void 0,F))return;F=L}if(F)return Z(H,z)}function Z(H,z){let V=z[z.length-1],F=Q[W][0],L=Q[W][1],N=0,A=V.children.indexOf(H),B=!1,O=[];F.lastIndex=0;let E=F.exec(H.value);while(E){let M=E.index,R={index:E.index,input:E.input,stack:[...z,H]},q=L(...E,R);if(typeof q==="string")q=q.length>0?{type:"text",value:q}:void 0;if(q===!1)F.lastIndex=M+1;else{if(N!==M)O.push({type:"text",value:H.value.slice(N,M)});if(Array.isArray(q))O.push(...q);else if(q)O.push(q);N=M+E[0].length,B=!0}if(!F.global)break;E=F.exec(H.value)}if(B){if(N<H.value.length)O.push({type:"text",value:H.value.slice(N)});V.children.splice(A,1,...O)}else O=[H];return A+O.length}}function zo8($){let Y=[];if(!Array.isArray($))throw TypeError("Expected find and replace tuple or list of tuples");let X=!$[0]||Array.isArray($[0])?$:[$],G=-1;while(++G<X.length){let J=X[G];Y.push([Vo8(J[0]),Fo8(J[1])])}return Y}function Vo8($){return typeof $==="string"?new RegExp(RD($),"g"):$}function Fo8($){return typeof $==="function"?$:function(){return $}}var gX4=V0(()=>{q50();E50()});var mX4=V0(()=>{gX4()});function nb0(){return{transforms:[Oo8],enter:{literalAutolink:Lo8,literalAutolinkEmail:ib0,literalAutolinkHttp:ib0,literalAutolinkWww:ib0},exit:{literalAutolink:Bo8,literalAutolinkEmail:Ao8,literalAutolinkHttp:Do8,literalAutolinkWww:No8}}}function rb0(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:cb0,notInConstruct:lb0},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:cb0,notInConstruct:lb0},{character:":",before:"[ps]",after:"\\/",inConstruct:cb0,notInConstruct:lb0}]}}function Lo8($){this.enter({type:"link",title:null,url:"",children:[]},$)}function ib0($){this.config.enter.autolinkProtocol.call(this,$)}function Do8($){this.config.exit.autolinkProtocol.call(this,$)}function No8($){this.config.exit.data.call(this,$);let Y=this.stack[this.stack.length-1];PX(Y.type==="link"),Y.url="http://"+this.sliceSerialize($)}function Ao8($){this.config.exit.autolinkEmail.call(this,$)}function Bo8($){this.exit($)}function Oo8($){db0($,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Eo8],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Mo8]],{ignore:["link","linkReference"]})}function Eo8($,Y,X,G,J){let Q="";if(!uX4(J))return!1;if(/^w/i.test(Y))X=Y+X,Y="",Q="http://";if(!Ro8(X))return!1;let W=qo8(X+G);if(!W[0])return!1;let K={type:"link",title:null,url:Q+Y+W[0],children:[{type:"text",value:Y+W[0]}]};if(W[1])return[K,{type:"text",value:W[1]}];return K}function Mo8($,Y,X,G){if(!uX4(G,!0)||/[-\d_]$/.test(X))return!1;return{type:"link",title:null,url:"mailto:"+Y+"@"+X,children:[{type:"text",value:Y+"@"+X}]}}function Ro8($){let Y=$.split(".");if(Y.length<2||Y[Y.length-1]&&(/_/.test(Y[Y.length-1])||!/[a-zA-Z\d]/.test(Y[Y.length-1]))||Y[Y.length-2]&&(/_/.test(Y[Y.length-2])||!/[a-zA-Z\d]/.test(Y[Y.length-2])))return!1;return!0}function qo8($){let Y=/[!"&'),.:;<>?\]}]+$/.exec($);if(!Y)return[$,void 0];$=$.slice(0,Y.index);let X=Y[0],G=X.indexOf(")"),J=pb0($,"("),Q=pb0($,")");while(G!==-1&&J>Q)$+=X.slice(0,G+1),X=X.slice(G+1),G=X.indexOf(")"),Q++;return[$,X]}function uX4($,Y){let X=$.input.charCodeAt($.index-1);return($.index===0||m3(X)||wE(X))&&(!Y||X!==47)}var cb0="phrasing",lb0;var pX4=V0(()=>{i8();mX4();lb0=["autolink","link","image","label"]});var dX4=V0(()=>{pX4()});function FG($){return $.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function Po8(){this.buffer()}function wo8($){this.enter({type:"footnoteReference",identifier:"",label:""},$)}function _o8(){this.buffer()}function jo8($){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},$)}function To8($){let Y=this.resume(),X=this.stack[this.stack.length-1];PX(X.type==="footnoteReference"),X.identifier=FG(this.sliceSerialize($)).toLowerCase(),X.label=Y}function Io8($){this.exit($)}function Co8($){let Y=this.resume(),X=this.stack[this.stack.length-1];PX(X.type==="footnoteDefinition"),X.identifier=FG(this.sliceSerialize($)).toLowerCase(),X.label=Y}function So8($){this.exit($)}function ko8(){return"["}function cX4($,Y,X,G){let J=X.createTracker(G),Q=J.move("[^"),W=X.enter("footnoteReference"),K=X.enter("reference");return Q+=J.move(X.safe(X.associationId($),{after:"]",before:Q})),K(),W(),Q+=J.move("]"),Q}function ab0(){return{enter:{gfmFootnoteCallString:Po8,gfmFootnoteCall:wo8,gfmFootnoteDefinitionLabelString:_o8,gfmFootnoteDefinition:jo8},exit:{gfmFootnoteCallString:To8,gfmFootnoteCall:Io8,gfmFootnoteDefinitionLabelString:Co8,gfmFootnoteDefinition:So8}}}function sb0($){let Y=!1;if($&&$.firstLineBlank)Y=!0;return{handlers:{footnoteDefinition:X,footnoteReference:cX4},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function X(G,J,Q,W){let K=Q.createTracker(W),Z=K.move("[^"),H=Q.enter("footnoteDefinition"),z=Q.enter("label");if(Z+=K.move(Q.safe(Q.associationId(G),{before:Z,after:"]"})),z(),Z+=K.move("]:"),G.children&&G.children.length>0)K.shift(4),Z+=K.move((Y?`
`:" ")+Q.indentLines(Q.containerFlow(G,K.current()),Y?lX4:vo8));return H(),Z}}function vo8($,Y,X){return Y===0?$:lX4($,Y,X)}function lX4($,Y,X){return(X?"":"    ")+$}var iX4=V0(()=>{cX4.peek=ko8});var nX4=V0(()=>{iX4()});function ob0(){return{canContainEols:["delete"],enter:{strikethrough:yo8},exit:{strikethrough:bo8}}}function tb0(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:xo8}],handlers:{delete:rX4}}}function yo8($){this.enter({type:"delete",children:[]},$)}function bo8($){this.exit($)}function rX4($,Y,X,G){let J=X.createTracker(G),Q=X.enter("strikethrough"),W=J.move("~~");return W+=X.containerPhrasing($,{...J.current(),before:W,after:"~"}),W+=J.move("~~"),Q(),W}function ho8(){return"~"}var xo8;var aX4=V0(()=>{xo8=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];rX4.peek=ho8});var sX4=V0(()=>{aX4()});function fo8($){return $.length}function tX4($,Y){let X=Y||{},G=(X.align||[]).concat(),J=X.stringLength||fo8,Q=[],W=[],K=[],Z=[],H=0,z=-1;while(++z<$.length){let D=[],A=[],B=-1;if($[z].length>H)H=$[z].length;while(++B<$[z].length){let O=go8($[z][B]);if(X.alignDelimiters!==!1){let E=J(O);if(A[B]=E,Z[B]===void 0||E>Z[B])Z[B]=E}D.push(O)}W[z]=D,K[z]=A}let V=-1;if(typeof G==="object"&&"length"in G)while(++V<H)Q[V]=oX4(G[V]);else{let D=oX4(G);while(++V<H)Q[V]=D}V=-1;let F=[],L=[];while(++V<H){let D=Q[V],A="",B="";if(D===99)A=":",B=":";else if(D===108)A=":";else if(D===114)B=":";let O=X.alignDelimiters===!1?1:Math.max(1,Z[V]-A.length-B.length),E=A+"-".repeat(O)+B;if(X.alignDelimiters!==!1){if(O=A.length+O+B.length,O>Z[V])Z[V]=O;L[V]=O}F[V]=E}W.splice(1,0,F),K.splice(1,0,L),z=-1;let N=[];while(++z<W.length){let D=W[z],A=K[z];V=-1;let B=[];while(++V<H){let O=D[V]||"",E="",M="";if(X.alignDelimiters!==!1){let R=Z[V]-(A[V]||0),q=Q[V];if(q===114)E=" ".repeat(R);else if(q===99)if(R%2)E=" ".repeat(R/2+0.5),M=" ".repeat(R/2-0.5);else E=" ".repeat(R/2),M=E;else M=" ".repeat(R)}if(X.delimiterStart!==!1&&!V)B.push("|");if(X.padding!==!1&&!(X.alignDelimiters===!1&&O==="")&&(X.delimiterStart!==!1||V))B.push(" ");if(X.alignDelimiters!==!1)B.push(E);if(B.push(O),X.alignDelimiters!==!1)B.push(M);if(X.padding!==!1)B.push(" ");if(X.delimiterEnd!==!1||V!==H-1)B.push("|")}N.push(X.delimiterEnd===!1?B.join("").replace(/ +$/,""):B.join(""))}return N.join(`
`)}function go8($){return $===null||$===void 0?"":String($)}function oX4($){let Y=typeof $==="string"?$.codePointAt(0):0;return Y===67||Y===99?99:Y===76||Y===108?108:Y===82||Y===114?114:0}function $G4($,Y){let X=Y||{};function G(J,...Q){let{invalid:W,handlers:K}=G;if(J&&eX4.call(J,$)){let Z=String(J[$]);W=eX4.call(K,Z)?K[Z]:G.unknown}if(W)return W.call(this,J,...Q)}return G.handlers=X.handlers||{},G.invalid=X.invalid,G.unknown=X.unknown,G}var eX4;var YG4=V0(()=>{eX4={}.hasOwnProperty});function eb0($,Y){let X=-1,G;if(Y.extensions)while(++X<Y.extensions.length)eb0($,Y.extensions[X]);for(G in Y)if(mo8.call(Y,G))switch(G){case"extensions":break;case"unsafe":{XG4($[G],Y[G]);break}case"join":{XG4($[G],Y[G]);break}case"handlers":{uo8($[G],Y[G]);break}default:$.options[G]=Y[G]}return $}function XG4($,Y){if(Y)$.push(...Y)}function uo8($,Y){if(Y)Object.assign($,Y)}var mo8;var GG4=V0(()=>{mo8={}.hasOwnProperty});function JG4($,Y,X,G){let J=X.enter("blockquote"),Q=X.createTracker(G);Q.move("> "),Q.shift(2);let W=X.indentLines(X.containerFlow($,Q.current()),po8);return J(),W}function po8($,Y,X){return">"+(X?"":" ")+$}function P50($,Y){return QG4($,Y.inConstruct,!0)&&!QG4($,Y.notInConstruct,!1)}function QG4($,Y,X){if(typeof Y==="string")Y=[Y];if(!Y||Y.length===0)return X;let G=-1;while(++G<Y.length)if($.includes(Y[G]))return!0;return!1}function $h0($,Y,X,G){let J=-1;while(++J<X.unsafe.length)if(X.unsafe[J].character===`
`&&P50(X.stack,X.unsafe[J]))return/[ \t]/.test(G.before)?"":" ";return"\\\n"}var WG4=()=>{};function KG4($,Y){let X=String($),G=X.indexOf(Y),J=G,Q=0,W=0;if(typeof Y!=="string")throw TypeError("Expected substring");while(G!==-1){if(G===J){if(++Q>W)W=Q}else Q=1;J=G+Y.length,G=X.indexOf(Y,J)}return W}function Cm($,Y){return Boolean(Y.options.fences===!1&&$.value&&!$.lang&&/[^ \r\n]/.test($.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test($.value))}function ZG4($){let Y=$.options.fence||"`";if(Y!=="`"&&Y!=="~")throw Error("Cannot serialize code with `"+Y+"` for `options.fence`, expected `` ` `` or `~`");return Y}function UG4($,Y,X,G){let J=ZG4(X),Q=$.value||"",W=J==="`"?"GraveAccent":"Tilde";if(Cm($,X)){let V=X.enter("codeIndented"),F=X.indentLines(Q,do8);return V(),F}let K=X.createTracker(G),Z=J.repeat(Math.max(KG4(Q,J)+1,3)),H=X.enter("codeFenced"),z=K.move(Z);if($.lang){let V=X.enter(`codeFencedLang${W}`);z+=K.move(X.safe($.lang,{before:z,after:" ",encode:["`"],...K.current()})),V()}if($.lang&&$.meta){let V=X.enter(`codeFencedMeta${W}`);z+=K.move(" "),z+=K.move(X.safe($.meta,{before:z,after:`
`,encode:["`"],...K.current()})),V()}if(z+=K.move(`
`),Q)z+=K.move(Q+`
`);return z+=K.move(Z),H(),z}function do8($,Y,X){return(X?"":"    ")+$}var HG4=()=>{};function VT($){let Y=$.options.quote||'"';if(Y!=='"'&&Y!=="'")throw Error("Cannot serialize title with `"+Y+"` for `options.quote`, expected `\"`, or `'`");return Y}function zG4($,Y,X,G){let J=VT(X),Q=J==='"'?"Quote":"Apostrophe",W=X.enter("definition"),K=X.enter("label"),Z=X.createTracker(G),H=Z.move("[");if(H+=Z.move(X.safe(X.associationId($),{before:H,after:"]",...Z.current()})),H+=Z.move("]: "),K(),!$.url||/[\0- \u007F]/.test($.url))K=X.enter("destinationLiteral"),H+=Z.move("<"),H+=Z.move(X.safe($.url,{before:H,after:">",...Z.current()})),H+=Z.move(">");else K=X.enter("destinationRaw"),H+=Z.move(X.safe($.url,{before:H,after:$.title?" ":`
`,...Z.current()}));if(K(),$.title)K=X.enter(`title${Q}`),H+=Z.move(" "+J),H+=Z.move(X.safe($.title,{before:H,after:J,...Z.current()})),H+=Z.move(J),K();return W(),H}var VG4=()=>{};function FG4($){let Y=$.options.emphasis||"*";if(Y!=="*"&&Y!=="_")throw Error("Cannot serialize emphasis with `"+Y+"` for `options.emphasis`, expected `*`, or `_`");return Y}function xW($){return"&#x"+$.toString(16).toUpperCase()+";"}function KV($){if($===null||J8($)||m3($))return 1;if(wE($))return 2}var w50=V0(()=>{i8()});function FT($,Y,X){let G=KV($),J=KV(Y);if(G===void 0)return J===void 0?X==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:J===1?{inside:!0,outside:!0}:{inside:!1,outside:!0};if(G===1)return J===void 0?{inside:!1,outside:!1}:J===1?{inside:!0,outside:!0}:{inside:!1,outside:!1};return J===void 0?{inside:!1,outside:!1}:J===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}var Yh0=V0(()=>{w50()});function Xh0($,Y,X,G){let J=FG4(X),Q=X.enter("emphasis"),W=X.createTracker(G),K=W.move(J),Z=W.move(X.containerPhrasing($,{after:J,before:K,...W.current()})),H=Z.charCodeAt(0),z=FT(G.before.charCodeAt(G.before.length-1),H,J);if(z.inside)Z=xW(H)+Z.slice(1);let V=Z.charCodeAt(Z.length-1),F=FT(G.after.charCodeAt(0),V,J);if(F.inside)Z=Z.slice(0,-1)+xW(V);let L=W.move(J);return Q(),X.attentionEncodeSurroundingInfo={after:F.outside,before:z.outside},K+Z+L}function co8($,Y,X){return X.options.emphasis||"*"}var LG4=V0(()=>{Yh0();Xh0.peek=co8});function Gh0($,Y,X,G){let J,Q,W;if(typeof Y==="function"&&typeof X!=="function")Q=void 0,W=Y,J=X;else Q=Y,W=X,J=G;Im($,Q,K,J);function K(Z,H){let z=H[H.length-1],V=z?z.children.indexOf(Z):void 0;return W(Z,V,z)}}var DG4=V0(()=>{q50();q50()});var NG4=V0(()=>{DG4()});function _50($,Y){let X=!1;return Gh0($,function(G){if("value"in G&&/\r?\n|\r/.test(G.value)||G.type==="break")return X=!0,_E}),Boolean((!$.depth||$.depth<3)&&$U($)&&(Y.options.setext||X))}var Jh0=V0(()=>{NG4();jm()});function AG4($,Y,X,G){let J=Math.max(Math.min(6,$.depth||1),1),Q=X.createTracker(G);if(_50($,X)){let z=X.enter("headingSetext"),V=X.enter("phrasing"),F=X.containerPhrasing($,{...Q.current(),before:`
`,after:`
`});return V(),z(),F+`
`+(J===1?"=":"-").repeat(F.length-(Math.max(F.lastIndexOf("\r"),F.lastIndexOf(`
`))+1))}let W="#".repeat(J),K=X.enter("headingAtx"),Z=X.enter("phrasing");Q.move(W+" ");let H=X.containerPhrasing($,{before:"# ",after:`
`,...Q.current()});if(/^[\t ]/.test(H))H=xW(H.charCodeAt(0))+H.slice(1);if(H=H?W+" "+H:W,X.options.closeAtx)H+=" "+W;return Z(),K(),H}var BG4=V0(()=>{Jh0()});function Qh0($){return $.value||""}function lo8(){return"<"}var OG4=V0(()=>{Qh0.peek=lo8});function Wh0($,Y,X,G){let J=VT(X),Q=J==='"'?"Quote":"Apostrophe",W=X.enter("image"),K=X.enter("label"),Z=X.createTracker(G),H=Z.move("![");if(H+=Z.move(X.safe($.alt,{before:H,after:"]",...Z.current()})),H+=Z.move("]("),K(),!$.url&&$.title||/[\0- \u007F]/.test($.url))K=X.enter("destinationLiteral"),H+=Z.move("<"),H+=Z.move(X.safe($.url,{before:H,after:">",...Z.current()})),H+=Z.move(">");else K=X.enter("destinationRaw"),H+=Z.move(X.safe($.url,{before:H,after:$.title?" ":")",...Z.current()}));if(K(),$.title)K=X.enter(`title${Q}`),H+=Z.move(" "+J),H+=Z.move(X.safe($.title,{before:H,after:J,...Z.current()})),H+=Z.move(J),K();return H+=Z.move(")"),W(),H}function io8(){return"!"}var EG4=V0(()=>{Wh0.peek=io8});function Kh0($,Y,X,G){let J=$.referenceType,Q=X.enter("imageReference"),W=X.enter("label"),K=X.createTracker(G),Z=K.move("!["),H=X.safe($.alt,{before:Z,after:"]",...K.current()});Z+=K.move(H+"]["),W();let z=X.stack;X.stack=[],W=X.enter("reference");let V=X.safe(X.associationId($),{before:Z,after:"]",...K.current()});if(W(),X.stack=z,Q(),J==="full"||!H||H!==V)Z+=K.move(V+"]");else if(J==="shortcut")Z=Z.slice(0,-1);else Z+=K.move("]");return Z}function no8(){return"!"}var MG4=V0(()=>{Kh0.peek=no8});function Zh0($,Y,X){let G=$.value||"",J="`",Q=-1;while(new RegExp("(^|[^`])"+J+"([^`]|$)").test(G))J+="`";if(/[^ \r\n]/.test(G)&&(/^[ \r\n]/.test(G)&&/[ \r\n]$/.test(G)||/^`|`$/.test(G)))G=" "+G+" ";while(++Q<X.unsafe.length){let W=X.unsafe[Q],K=X.compilePattern(W),Z;if(!W.atBreak)continue;while(Z=K.exec(G)){let H=Z.index;if(G.charCodeAt(H)===10&&G.charCodeAt(H-1)===13)H--;G=G.slice(0,H)+" "+G.slice(Z.index+1)}}return J+G+J}function ro8(){return"`"}var RG4=V0(()=>{Zh0.peek=ro8});function Uh0($,Y){let X=$U($);return Boolean(!Y.options.resourceLink&&$.url&&!$.title&&$.children&&$.children.length===1&&$.children[0].type==="text"&&(X===$.url||"mailto:"+X===$.url)&&/^[a-z][a-z+.-]+:/i.test($.url)&&!/[\0- <>\u007F]/.test($.url))}var qG4=V0(()=>{jm()});function Hh0($,Y,X,G){let J=VT(X),Q=J==='"'?"Quote":"Apostrophe",W=X.createTracker(G),K,Z;if(Uh0($,X)){let z=X.stack;X.stack=[],K=X.enter("autolink");let V=W.move("<");return V+=W.move(X.containerPhrasing($,{before:V,after:">",...W.current()})),V+=W.move(">"),K(),X.stack=z,V}K=X.enter("link"),Z=X.enter("label");let H=W.move("[");if(H+=W.move(X.containerPhrasing($,{before:H,after:"](",...W.current()})),H+=W.move("]("),Z(),!$.url&&$.title||/[\0- \u007F]/.test($.url))Z=X.enter("destinationLiteral"),H+=W.move("<"),H+=W.move(X.safe($.url,{before:H,after:">",...W.current()})),H+=W.move(">");else Z=X.enter("destinationRaw"),H+=W.move(X.safe($.url,{before:H,after:$.title?" ":")",...W.current()}));if(Z(),$.title)Z=X.enter(`title${Q}`),H+=W.move(" "+J),H+=W.move(X.safe($.title,{before:H,after:J,...W.current()})),H+=W.move(J),Z();return H+=W.move(")"),K(),H}function ao8($,Y,X){return Uh0($,X)?"<":"["}var PG4=V0(()=>{qG4();Hh0.peek=ao8});function zh0($,Y,X,G){let J=$.referenceType,Q=X.enter("linkReference"),W=X.enter("label"),K=X.createTracker(G),Z=K.move("["),H=X.containerPhrasing($,{before:Z,after:"]",...K.current()});Z+=K.move(H+"]["),W();let z=X.stack;X.stack=[],W=X.enter("reference");let V=X.safe(X.associationId($),{before:Z,after:"]",...K.current()});if(W(),X.stack=z,Q(),J==="full"||!H||H!==V)Z+=K.move(V+"]");else if(J==="shortcut")Z=Z.slice(0,-1);else Z+=K.move("]");return Z}function so8(){return"["}var wG4=V0(()=>{zh0.peek=so8});function LT($){let Y=$.options.bullet||"*";if(Y!=="*"&&Y!=="+"&&Y!=="-")throw Error("Cannot serialize items with `"+Y+"` for `options.bullet`, expected `*`, `+`, or `-`");return Y}function _G4($){let Y=LT($),X=$.options.bulletOther;if(!X)return Y==="*"?"-":"*";if(X!=="*"&&X!=="+"&&X!=="-")throw Error("Cannot serialize items with `"+X+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(X===Y)throw Error("Expected `bullet` (`"+Y+"`) and `bulletOther` (`"+X+"`) to be different");return X}var jG4=()=>{};function TG4($){let Y=$.options.bulletOrdered||".";if(Y!=="."&&Y!==")")throw Error("Cannot serialize items with `"+Y+"` for `options.bulletOrdered`, expected `.` or `)`");return Y}function j50($){let Y=$.options.rule||"*";if(Y!=="*"&&Y!=="-"&&Y!=="_")throw Error("Cannot serialize rules with `"+Y+"` for `options.rule`, expected `*`, `-`, or `_`");return Y}function IG4($,Y,X,G){let J=X.enter("list"),Q=X.bulletCurrent,W=$.ordered?TG4(X):LT(X),K=$.ordered?W==="."?")":".":_G4(X),Z=Y&&X.bulletLastUsed?W===X.bulletLastUsed:!1;if(!$.ordered){let z=$.children?$.children[0]:void 0;if((W==="*"||W==="-")&&z&&(!z.children||!z.children[0])&&X.stack[X.stack.length-1]==="list"&&X.stack[X.stack.length-2]==="listItem"&&X.stack[X.stack.length-3]==="list"&&X.stack[X.stack.length-4]==="listItem"&&X.indexStack[X.indexStack.length-1]===0&&X.indexStack[X.indexStack.length-2]===0&&X.indexStack[X.indexStack.length-3]===0)Z=!0;if(j50(X)===W&&z){let V=-1;while(++V<$.children.length){let F=$.children[V];if(F&&F.type==="listItem"&&F.children&&F.children[0]&&F.children[0].type==="thematicBreak"){Z=!0;break}}}}if(Z)W=K;X.bulletCurrent=W;let H=X.containerFlow($,G);return X.bulletLastUsed=W,X.bulletCurrent=Q,J(),H}var CG4=V0(()=>{jG4()});function SG4($){let Y=$.options.listItemIndent||"one";if(Y!=="tab"&&Y!=="one"&&Y!=="mixed")throw Error("Cannot serialize items with `"+Y+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return Y}function kG4($,Y,X,G){let J=SG4(X),Q=X.bulletCurrent||LT(X);if(Y&&Y.type==="list"&&Y.ordered)Q=(typeof Y.start==="number"&&Y.start>-1?Y.start:1)+(X.options.incrementListMarker===!1?0:Y.children.indexOf($))+Q;let W=Q.length+1;if(J==="tab"||J==="mixed"&&(Y&&Y.type==="list"&&Y.spread||$.spread))W=Math.ceil(W/4)*4;let K=X.createTracker(G);K.move(Q+" ".repeat(W-Q.length)),K.shift(W);let Z=X.enter("listItem"),H=X.indentLines(X.containerFlow($,K.current()),z);return Z(),H;function z(V,F,L){if(F)return(L?"":" ".repeat(W))+V;return(L?Q:Q+" ".repeat(W-Q.length))+V}}var vG4=()=>{};function xG4($,Y,X,G){let J=X.enter("paragraph"),Q=X.enter("phrasing"),W=X.containerPhrasing($,G);return Q(),J(),W}var Vh0;var yG4=V0(()=>{E50();Vh0=qD(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"])});var bG4=V0(()=>{yG4()});function hG4($,Y,X,G){return($.children.some(function(W){return Vh0(W)})?X.containerPhrasing:X.containerFlow).call(X,$,G)}var fG4=V0(()=>{bG4()});function gG4($){let Y=$.options.strong||"*";if(Y!=="*"&&Y!=="_")throw Error("Cannot serialize strong with `"+Y+"` for `options.strong`, expected `*`, or `_`");return Y}function Fh0($,Y,X,G){let J=gG4(X),Q=X.enter("strong"),W=X.createTracker(G),K=W.move(J+J),Z=W.move(X.containerPhrasing($,{after:J,before:K,...W.current()})),H=Z.charCodeAt(0),z=FT(G.before.charCodeAt(G.before.length-1),H,J);if(z.inside)Z=xW(H)+Z.slice(1);let V=Z.charCodeAt(Z.length-1),F=FT(G.after.charCodeAt(0),V,J);if(F.inside)Z=Z.slice(0,-1)+xW(V);let L=W.move(J+J);return Q(),X.attentionEncodeSurroundingInfo={after:F.outside,before:z.outside},K+Z+L}function oo8($,Y,X){return X.options.strong||"*"}var mG4=V0(()=>{Yh0();Fh0.peek=oo8});function uG4($,Y,X,G){return X.safe($.value,G)}function pG4($){let Y=$.options.ruleRepetition||3;if(Y<3)throw Error("Cannot serialize rules with repetition `"+Y+"` for `options.ruleRepetition`, expected `3` or more");return Y}function dG4($,Y,X){let G=(j50(X)+(X.options.ruleSpaces?" ":"")).repeat(pG4(X));return X.options.ruleSpaces?G.slice(0,-1):G}var cG4=()=>{};var jE;var Lh0=V0(()=>{WG4();HG4();VG4();LG4();BG4();OG4();EG4();MG4();RG4();PG4();wG4();CG4();vG4();fG4();mG4();cG4();jE={blockquote:JG4,break:$h0,code:UG4,definition:zG4,emphasis:Xh0,hardBreak:$h0,heading:AG4,html:Qh0,image:Wh0,imageReference:Kh0,inlineCode:Zh0,link:Hh0,linkReference:zh0,list:IG4,listItem:kG4,paragraph:xG4,root:hG4,strong:Fh0,text:uG4,thematicBreak:dG4}});function to8($,Y,X,G){if(Y.type==="code"&&Cm(Y,G)&&($.type==="list"||$.type===Y.type&&Cm($,G)))return!1;if("spread"in X&&typeof X.spread==="boolean"){if($.type==="paragraph"&&($.type===Y.type||Y.type==="definition"||Y.type==="heading"&&_50(Y,G)))return;return X.spread?1:0}}var lG4;var iG4=V0(()=>{Jh0();lG4=[to8]});var TE,nG4;var rG4=V0(()=>{TE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],nG4=[{character:"\t",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"\t",before:"[\\r\\n]",inConstruct:"phrasing"},{character:"\t",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:TE},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:TE},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ 	\r
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:TE},{atBreak:!0,character:"+",after:`(?:[ 	\r
])`},{atBreak:!0,character:"-",after:`(?:[ 	\r
-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ 	\r
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:TE},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:TE},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:TE},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:TE},{atBreak:!0,character:"~"}]});var Dh0;var aG4=V0(()=>{Dh0={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\uD835\uDD04",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\uD835\uDD38",ApplyFunction:"\u2061",Aring:"\xC5",Ascr:"\uD835\uDC9C",Assign:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\uD835\uDD05",Bopf:"\uD835\uDD39",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",CenterDot:"\xB7",Cfr:"\u212D",Chi:"\u03A7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2A74",Congruent:"\u2261",Conint:"\u222F",ContourIntegral:"\u222E",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2A2F",Cscr:"\uD835\uDC9E",Cup:"\u22D3",CupCap:"\u224D",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\uD835\uDD07",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",Diamond:"\u22C4",DifferentialD:"\u2146",Dopf:"\uD835\uDD3B",Dot:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",Downarrow:"\u21D3",Dscr:"\uD835\uDC9F",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\uD835\uDD08",Egrave:"\xC8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\uD835\uDD3C",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",Equilibrium:"\u21CC",Escr:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\uD835\uDD09",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",Fopf:"\uD835\uDD3D",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\uD835\uDD0A",Gg:"\u22D9",Gopf:"\uD835\uDD3E",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\uD835\uDCA2",Gt:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",HilbertSpace:"\u210B",Hopf:"\u210D",HorizontalLine:"\u2500",Hscr:"\u210B",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrave:"\xCC",Im:"\u2111",Imacr:"\u012A",ImaginaryI:"\u2148",Implies:"\u21D2",Int:"\u222C",Integral:"\u222B",Intersection:"\u22C2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012E",Iopf:"\uD835\uDD40",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\uD835\uDD0D",Jopf:"\uD835\uDD41",Jscr:"\uD835\uDCA5",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\uD835\uDD0E",Kopf:"\uD835\uDD42",Kscr:"\uD835\uDCA6",LJcy:"\u0409",LT:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Larr:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",LeftRightArrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",Leftarrow:"\u21D0",Leftrightarrow:"\u21D4",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",Lfr:"\uD835\uDD0F",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\uD835\uDD43",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\uD835\uDD10",MinusPlus:"\u2213",Mopf:"\uD835\uDD44",Mscr:"\u2133",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
`,Nfr:"\uD835\uDD11",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\uD835\uDCA9",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\uD835\uDD12",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\uD835\uDD46",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\uD835\uDCAA",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\uD835\uDD13",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\uD835\uDCAB",Psi:"\u03A8",QUOT:'"',Qfr:"\uD835\uDD14",Qopf:"\u211A",Qscr:"\uD835\uDCAC",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\uD835\uDD16",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\uD835\uDD4A",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\uD835\uDCAE",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:"\t",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\uD835\uDD17",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\uD835\uDD4B",TripleDot:"\u20DB",Tscr:"\uD835\uDCAF",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\uD835\uDD18",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\uD835\uDD4C",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\uD835\uDCB0",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\uD835\uDD19",Vopf:"\uD835\uDD4D",Vscr:"\uD835\uDCB1",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\uD835\uDD1A",Wopf:"\uD835\uDD4E",Wscr:"\uD835\uDCB2",Xfr:"\uD835\uDD1B",Xi:"\u039E",Xopf:"\uD835\uDD4F",Xscr:"\uD835\uDCB3",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\uD835\uDD1C",Yopf:"\uD835\uDD50",Yscr:"\uD835\uDCB4",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\uD835\uDCB5",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acute:"\xB4",acy:"\u0430",aelig:"\xE6",af:"\u2061",afr:"\uD835\uDD1E",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",amp:"&",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",aopf:"\uD835\uDD52",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",ascr:"\uD835\uDCB6",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",beta:"\u03B2",beth:"\u2136",between:"\u226C",bfr:"\uD835\uDD1F",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\uD835\uDD53",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",bprime:"\u2035",breve:"\u02D8",brvbar:"\xA6",bscr:"\uD835\uDCB7",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",bumpeq:"\u224F",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cedil:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",cfr:"\uD835\uDD20",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledR:"\xAE",circledS:"\u24C8",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",conint:"\u222E",copf:"\uD835\uDD54",coprod:"\u2210",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\uD835\uDCB8",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dArr:"\u21D3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",ddotseq:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\uD835\uDD21",dharl:"\u21C3",dharr:"\u21C2",diam:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\uD835\uDD55",dot:"\u02D9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\uD835\uDCB9",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eDDot:"\u2A77",eDot:"\u2251",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",ecirc:"\xEA",ecolon:"\u2255",ecy:"\u044D",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\uD835\uDD22",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\uD835\uDD56",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",equals:"=",equest:"\u225F",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",erarr:"\u2971",escr:"\u212F",esdot:"\u2250",esim:"\u2242",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\uD835\uDD23",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\uD835\uDD57",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\uD835\uDCBB",gE:"\u2267",gEl:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gammad:"\u03DD",gap:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\uD835\uDD24",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\uD835\uDD58",grave:"`",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hArr:"\u21D4",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",hbar:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\uD835\uDD25",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\uD835\uDD59",horbar:"\u2015",hscr:"\uD835\uDCBD",hslash:"\u210F",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",ic:"\u2063",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",ifr:"\uD835\uDD26",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",intcal:"\u22BA",integers:"\u2124",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\uD835\uDD5A",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\uD835\uDCBE",isin:"\u2208",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\uD835\uDD27",jmath:"\u0237",jopf:"\uD835\uDD5B",jscr:"\uD835\uDCBF",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\uD835\uDD28",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\uD835\uDD5C",kscr:"\uD835\uDCC0",lAarr:"\u21DA",lArr:"\u21D0",lAtail:"\u291B",lBarr:"\u290E",lE:"\u2266",lEg:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",laquo:"\xAB",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lceil:"\u2308",lcub:"{",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21A2",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",leftthreetimes:"\u22CB",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\uD835\uDD29",lg:"\u2276",lgE:"\u2A91",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\uD835\uDD5D",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\uD835\uDCC1",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",measuredangle:"\u2221",mfr:"\uD835\uDD2A",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\uD835\uDD5E",mp:"\u2213",mscr:"\uD835\uDCC2",mstpos:"\u223E",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nGtv:"\u226B\u0338",nLeftarrow:"\u21CD",nLeftrightarrow:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nLtv:"\u226A\u0338",nRightarrow:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",neArr:"\u21D7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\uD835\uDD2B",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",ngsim:"\u2275",ngt:"\u226F",ngtr:"\u226F",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",nlArr:"\u21CD",nlE:"\u2266\u0338",nlarr:"\u219A",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219A",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nlsim:"\u2274",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nmid:"\u2224",nopf:"\uD835\uDD5F",not:"\xAC",notin:"\u2209",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\uD835\uDCC3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24C8",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",ocy:"\u043E",odash:"\u229D",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\uD835\uDD2C",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",oopf:"\uD835\uDD60",opar:"\u29B7",operp:"\u29B9",oplus:"\u2295",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oscr:"\u2134",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimes:"\u2297",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\uD835\uDD2D",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",pointint:"\u2A15",popf:"\uD835\uDD61",pound:"\xA3",pr:"\u227A",prE:"\u2AB3",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",primes:"\u2119",prnE:"\u2AB5",prnap:"\u2AB9",prnsim:"\u22E8",prod:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\uD835\uDCC5",psi:"\u03C8",puncsp:"\u2008",qfr:"\uD835\uDD2E",qint:"\u2A0C",qopf:"\uD835\uDD62",qprime:"\u2057",qscr:"\uD835\uDCC6",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',rAarr:"\u21DB",rArr:"\u21D2",rAtail:"\u291C",rBarr:"\u290F",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",rfisht:"\u297D",rfloor:"\u230B",rfr:"\uD835\uDD2F",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",rightarrow:"\u2192",rightarrowtail:"\u21A3",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",rightthreetimes:"\u22CC",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\uD835\uDD63",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\uD835\uDCC7",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",sbquo:"\u201A",sc:"\u227B",scE:"\u2AB4",scap:"\u2AB8",scaron:"\u0161",sccue:"\u227D",sce:"\u2AB0",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",scnap:"\u2ABA",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",seArr:"\u21D8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\uD835\uDD30",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\uD835\uDD64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\uD835\uDCC8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",subE:"\u2AC5",subdot:"\u2ABD",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",sum:"\u2211",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",supE:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tbrk:"\u23B4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",tfr:"\uD835\uDD31",there4:"\u2234",therefore:"\u2234",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",tilde:"\u02DC",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\uD835\uDD65",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\uD835\uDCC9",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uArr:"\u21D1",uHar:"\u2963",uacute:"\xFA",uarr:"\u2191",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udarr:"\u21C5",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",ufr:"\uD835\uDD32",ugrave:"\xF9",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uml:"\xA8",uogon:"\u0173",uopf:"\uD835\uDD66",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",upsi:"\u03C5",upsih:"\u03D2",upsilon:"\u03C5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\uD835\uDCCA",utdot:"\u22F0",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",uwangle:"\u29A7",vArr:"\u21D5",vBar:"\u2AE8",vBarv:"\u2AE9",vDash:"\u22A8",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vcy:"\u0432",vdash:"\u22A2",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",vert:"|",vfr:"\uD835\uDD33",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\uD835\uDD67",vprop:"\u221D",vrtri:"\u22B3",vscr:"\uD835\uDCCB",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\uD835\uDD34",wopf:"\uD835\uDD68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\uD835\uDCCC",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\uD835\uDD35",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\uD835\uDD69",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\uD835\uDCCD",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\uD835\uDD36",yicy:"\u0457",yopf:"\uD835\uDD6A",yscr:"\uD835\uDCCE",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\uD835\uDD37",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\uD835\uDD6B",zscr:"\uD835\uDCCF",zwj:"\u200D",zwnj:"\u200C"}});function DT($){return eo8.call(Dh0,$)?Dh0[$]:!1}var eo8;var T50=V0(()=>{aG4();eo8={}.hasOwnProperty});function I50($,Y){let X=Number.parseInt($,Y);if(X<9||X===11||X>13&&X<32||X>126&&X<160||X>55295&&X<57344||X>64975&&X<65008||(X&65535)===65535||(X&65535)===65534||X>1114111)return"\uFFFD";return String.fromCodePoint(X)}function C50($){return $.replace($t8,Yt8)}function Yt8($,Y,X){if(Y)return Y;if(X.charCodeAt(0)===35){let J=X.charCodeAt(1),Q=J===120||J===88;return I50(X.slice(Q?2:1),Q?16:10)}return DT(X)||$}var $t8;var Nh0=V0(()=>{T50();$t8=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi});function sG4($){if($.label||!$.identifier)return $.label||"";return C50($.identifier)}var oG4=V0(()=>{Nh0()});function tG4($){if(!$._compiled){let Y=($.atBreak?"[\\r\\n][\\t ]*":"")+($.before?"(?:"+$.before+")":"");$._compiled=new RegExp((Y?"("+Y+")":"")+(/[|\\{}()[\]^$+*?.-]/.test($.character)?"\\":"")+$.character+($.after?"(?:"+$.after+")":""),"g")}return $._compiled}function eG4($,Y,X){let G=Y.indexStack,J=$.children||[],Q=[],W=-1,K=X.before,Z;G.push(-1);let H=Y.createTracker(X);while(++W<J.length){let z=J[W],V;if(G[G.length-1]=W,W+1<J.length){let N=Y.handle.handlers[J[W+1].type];if(N&&N.peek)N=N.peek;V=N?N(J[W+1],$,Y,{before:"",after:"",...H.current()}).charAt(0):""}else V=X.after;if(Q.length>0&&(K==="\r"||K===`
`)&&z.type==="html")Q[Q.length-1]=Q[Q.length-1].replace(/(\r?\n|\r)$/," "),K=" ",H=Y.createTracker(X),H.move(Q.join(""));let F=Y.handle(z,$,Y,{...H.current(),after:V,before:K});if(Z&&Z===F.slice(0,1))F=xW(Z.charCodeAt(0))+F.slice(1);let L=Y.attentionEncodeSurroundingInfo;if(Y.attentionEncodeSurroundingInfo=void 0,Z=void 0,L){if(Q.length>0&&L.before&&K===Q[Q.length-1].slice(-1))Q[Q.length-1]=Q[Q.length-1].slice(0,-1)+xW(K.charCodeAt(0));if(L.after)Z=V}H.move(F),Q.push(F),K=F.slice(-1)}return G.pop(),Q.join("")}var $J4=()=>{};function YJ4($,Y,X){let G=Y.indexStack,J=$.children||[],Q=Y.createTracker(X),W=[],K=-1;G.push(-1);while(++K<J.length){let Z=J[K];if(G[G.length-1]=K,W.push(Q.move(Y.handle(Z,$,Y,{before:`
`,after:`
`,...Q.current()}))),Z.type!=="list")Y.bulletLastUsed=void 0;if(K<J.length-1)W.push(Q.move(Xt8(Z,J[K+1],$,Y)))}return G.pop(),W.join("")}function Xt8($,Y,X,G){let J=G.join.length;while(J--){let Q=G.join[J]($,Y,X,G);if(Q===!0||Q===1)break;if(typeof Q==="number")return`
`.repeat(1+Q);if(Q===!1)return`

<!---->

`}return`

`}function XJ4($,Y){let X=[],G=0,J=0,Q;while(Q=Gt8.exec($))W($.slice(G,Q.index)),X.push(Q[0]),G=Q.index+Q[0].length,J++;return W($.slice(G)),X.join("");function W(K){X.push(Y(K,J,!K))}}var Gt8;var GJ4=V0(()=>{Gt8=/\r?\n|\r/g});function QJ4($,Y,X){let G=(X.before||"")+(Y||"")+(X.after||""),J=[],Q=[],W={},K=-1;while(++K<$.unsafe.length){let z=$.unsafe[K];if(!P50($.stack,z))continue;let V=$.compilePattern(z),F;while(F=V.exec(G)){let L="before"in z||Boolean(z.atBreak),N="after"in z,D=F.index+(L?F[1].length:0);if(J.includes(D)){if(W[D].before&&!L)W[D].before=!1;if(W[D].after&&!N)W[D].after=!1}else J.push(D),W[D]={before:L,after:N}}}J.sort(Jt8);let Z=X.before?X.before.length:0,H=G.length-(X.after?X.after.length:0);K=-1;while(++K<J.length){let z=J[K];if(z<Z||z>=H)continue;if(z+1<H&&J[K+1]===z+1&&W[z].after&&!W[z+1].before&&!W[z+1].after||J[K-1]===z-1&&W[z].before&&!W[z-1].before&&!W[z-1].after)continue;if(Z!==z)Q.push(JJ4(G.slice(Z,z),"\\"));if(Z=z,/[!-/:-@[-`{-~]/.test(G.charAt(z))&&(!X.encode||!X.encode.includes(G.charAt(z))))Q.push("\\");else Q.push(xW(G.charCodeAt(z))),Z++}return Q.push(JJ4(G.slice(Z,H),X.after)),Q.join("")}function Jt8($,Y){return $-Y}function JJ4($,Y){let X=/\\(?=[!-/:-@[-`{-~])/g,G=[],J=[],Q=$+Y,W=-1,K=0,Z;while(Z=X.exec(Q))G.push(Z.index);while(++W<G.length){if(K!==G[W])J.push($.slice(K,G[W]));J.push("\\"),K=G[W]}return J.push($.slice(K)),J.join("")}var WJ4=()=>{};function KJ4($){let Y=$||{},X=Y.now||{},G=Y.lineShift||0,J=X.line||1,Q=X.column||1;return{move:Z,current:W,shift:K};function W(){return{now:{line:J,column:Q},lineShift:G}}function K(H){G+=H}function Z(H){let z=H||"",V=z.split(/\r?\n|\r/g),F=V[V.length-1];return J+=V.length-1,Q=V.length===1?Q+F.length:1+F.length+G,z}}function Ah0($,Y){let X=Y||{},G={associationId:sG4,containerPhrasing:Zt8,containerFlow:Ut8,createTracker:KJ4,compilePattern:tG4,enter:Q,handlers:{...jE},handle:void 0,indentLines:XJ4,indexStack:[],join:[...lG4],options:{},safe:Ht8,stack:[],unsafe:[...nG4]};if(eb0(G,X),G.options.tightDefinitions)G.join.push(Kt8);G.handle=$G4("type",{invalid:Qt8,unknown:Wt8,handlers:G.handlers});let J=G.handle($,void 0,G,{before:`
`,after:`
`,now:{line:1,column:1},lineShift:0});if(J&&J.charCodeAt(J.length-1)!==10&&J.charCodeAt(J.length-1)!==13)J+=`
`;return J;function Q(W){return G.stack.push(W),K;function K(){G.stack.pop()}}}function Qt8($){throw Error("Cannot handle value `"+$+"`, expected node")}function Wt8($){throw Error("Cannot handle unknown node `"+$.type+"`")}function Kt8($,Y){if($.type==="definition"&&$.type===Y.type)return 0}function Zt8($,Y){return eG4($,this,Y)}function Ut8($,Y){return YJ4($,this,Y)}function Ht8($,Y){return QJ4(this,$,Y)}var ZJ4=V0(()=>{YG4();GG4();Lh0();iG4();rG4();oG4();$J4();GJ4();WJ4()});var S50=V0(()=>{ZJ4();Lh0()});function Oh0(){return{enter:{table:zt8,tableData:UJ4,tableHeader:UJ4,tableRow:Ft8},exit:{codeText:Lt8,table:Vt8,tableData:Bh0,tableHeader:Bh0,tableRow:Bh0}}}function zt8($){let Y=$._align;PX(Y,"expected `_align` on table"),this.enter({type:"table",align:Y.map(function(X){return X==="none"?null:X}),children:[]},$),this.data.inTable=!0}function Vt8($){this.exit($),this.data.inTable=void 0}function Ft8($){this.enter({type:"tableRow",children:[]},$)}function Bh0($){this.exit($)}function UJ4($){this.enter({type:"tableCell",children:[]},$)}function Lt8($){let Y=this.resume();if(this.data.inTable)Y=Y.replace(/\\([\\|])/g,Dt8);let X=this.stack[this.stack.length-1];PX(X.type==="inlineCode"),X.value=Y,this.exit($)}function Dt8($,Y){return Y==="|"?Y:$}function Eh0($){let Y=$||{},X=Y.tableCellPadding,G=Y.tablePipeAlign,J=Y.stringLength,Q=X?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:F,table:W,tableCell:Z,tableRow:K}};function W(L,N,D,A){return H(z(L,D,A),L.align)}function K(L,N,D,A){let B=V(L,D,A),O=H([B]);return O.slice(0,O.indexOf(`
`))}function Z(L,N,D,A){let B=D.enter("tableCell"),O=D.enter("phrasing"),E=D.containerPhrasing(L,{...A,before:Q,after:Q});return O(),B(),E}function H(L,N){return tX4(L,{align:N,alignDelimiters:G,padding:X,stringLength:J})}function z(L,N,D){let A=L.children,B=-1,O=[],E=N.enter("table");while(++B<A.length)O[B]=V(A[B],N,D);return E(),O}function V(L,N,D){let A=L.children,B=-1,O=[],E=N.enter("tableRow");while(++B<A.length)O[B]=Z(A[B],L,N,D);return E(),O}function F(L,N,D){let A=jE.inlineCode(L,N,D);if(D.stack.includes("tableCell"))A=A.replace(/\|/g,"\\$&");return A}}var HJ4=V0(()=>{S50()});var zJ4=V0(()=>{HJ4()});function Mh0(){return{exit:{taskListCheckValueChecked:VJ4,taskListCheckValueUnchecked:VJ4,paragraph:Nt8}}}function Rh0(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:At8}}}function VJ4($){let Y=this.stack[this.stack.length-2];PX(Y.type==="listItem"),Y.checked=$.type==="taskListCheckValueChecked"}function Nt8($){let Y=this.stack[this.stack.length-2];if(Y&&Y.type==="listItem"&&typeof Y.checked==="boolean"){let X=this.stack[this.stack.length-1];PX(X.type==="paragraph");let G=X.children[0];if(G&&G.type==="text"){let J=Y.children,Q=-1,W;while(++Q<J.length){let K=J[Q];if(K.type==="paragraph"){W=K;break}}if(W===X){if(G.value=G.value.slice(1),G.value.length===0)X.children.shift();else if(X.position&&G.position&&typeof G.position.start.offset==="number")G.position.start.column++,G.position.start.offset++,X.position.start=Object.assign({},G.position.start)}}}this.exit($)}function At8($,Y,X,G){let J=$.children[0],Q=typeof $.checked==="boolean"&&J&&J.type==="paragraph",W="["+($.checked?"x":" ")+"] ",K=X.createTracker(G);if(Q)K.move(W);let Z=jE.listItem($,Y,X,{...G,...K.current()});if(Q)Z=Z.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,H);return Z;function H(z){return z+W}}var FJ4=V0(()=>{S50()});var LJ4=V0(()=>{FJ4()});function qh0(){return[nb0(),ab0(),ob0(),Oh0(),Mh0()]}function Ph0($){return{extensions:[rb0(),sb0($),tb0(),Eh0($),Rh0()]}}var DJ4=V0(()=>{dX4();nX4();sX4();zJ4();LJ4()});var NJ4=V0(()=>{DJ4()});function j7($,Y,X,G){let J=$.length,Q=0,W;if(Y<0)Y=-Y>J?0:J+Y;else Y=Y>J?J:Y;if(X=X>0?X:0,G.length<1e4)W=Array.from(G),W.unshift(Y,X),$.splice(...W);else{if(X)$.splice(Y,X);while(Q<G.length)W=G.slice(Q,Q+1e4),W.unshift(Y,0),$.splice(...W),Q+=1e4,Y+=1e4}}function VJ($,Y){if($.length>0)return j7($,$.length,0,Y),$;return Y}function k50($){let Y={},X=-1;while(++X<$.length)Bt8(Y,$[X]);return Y}function Bt8($,Y){let X;for(X in Y){let J=(AJ4.call($,X)?$[X]:void 0)||($[X]={}),Q=Y[X],W;if(Q)for(W in Q){if(!AJ4.call(J,W))J[W]=[];let K=Q[W];Ot8(J[W],Array.isArray(K)?K:K?[K]:[])}}}function Ot8($,Y){let X=-1,G=[];while(++X<Y.length)(Y[X].add==="after"?$:G).push(Y[X]);j7($,0,0,G)}var AJ4;var wh0=V0(()=>{AJ4={}.hasOwnProperty});function jh0(){return{text:u3}}function Rt8($,Y,X){let G=this,J,Q;return W;function W(V){if(!_h0(V)||!wJ4.call(G,G.previous)||Th0(G.events))return X(V);return $.enter("literalAutolink"),$.enter("literalAutolinkEmail"),K(V)}function K(V){if(_h0(V))return $.consume(V),K;if(V===64)return $.consume(V),Z;return X(V)}function Z(V){if(V===46)return $.check(Mt8,z,H)(V);if(V===45||V===95||NY(V))return Q=!0,$.consume(V),Z;return z(V)}function H(V){return $.consume(V),J=!0,Z}function z(V){if(Q&&J&&DY(G.previous))return $.exit("literalAutolinkEmail"),$.exit("literalAutolink"),Y(V);return X(V)}}function qt8($,Y,X){let G=this;return J;function J(W){if(W!==87&&W!==119||!qJ4.call(G,G.previous)||Th0(G.events))return X(W);return $.enter("literalAutolink"),$.enter("literalAutolinkWww"),$.check(Et8,$.attempt(BJ4,$.attempt(OJ4,Q),X),X)(W)}function Q(W){return $.exit("literalAutolinkWww"),$.exit("literalAutolink"),Y(W)}}function Pt8($,Y,X){let G=this,J="",Q=!1;return W;function W(V){if((V===72||V===104)&&PJ4.call(G,G.previous)&&!Th0(G.events))return $.enter("literalAutolink"),$.enter("literalAutolinkHttp"),J+=String.fromCodePoint(V),$.consume(V),K;return X(V)}function K(V){if(DY(V)&&J.length<5)return J+=String.fromCodePoint(V),$.consume(V),K;if(V===58){let F=J.toLowerCase();if(F==="http"||F==="https")return $.consume(V),Z}return X(V)}function Z(V){if(V===47){if($.consume(V),Q)return H;return Q=!0,Z}return X(V)}function H(V){return V===null||PE(V)||J8(V)||m3(V)||wE(V)?X(V):$.attempt(BJ4,$.attempt(OJ4,z),X)(V)}function z(V){return $.exit("literalAutolinkHttp"),$.exit("literalAutolink"),Y(V)}}function wt8($,Y,X){let G=0;return J;function J(W){if((W===87||W===119)&&G<3)return G++,$.consume(W),J;if(W===46&&G===3)return $.consume(W),Q;return X(W)}function Q(W){return W===null?X(W):Y(W)}}function _t8($,Y,X){let G,J,Q;return W;function W(H){if(H===46||H===95)return $.check(EJ4,Z,K)(H);if(H===null||J8(H)||m3(H)||H!==45&&wE(H))return Z(H);return Q=!0,$.consume(H),W}function K(H){if(H===95)G=!0;else J=G,G=void 0;return $.consume(H),W}function Z(H){if(J||G||!Q)return X(H);return Y(H)}}function jt8($,Y){let X=0,G=0;return J;function J(W){if(W===40)return X++,$.consume(W),J;if(W===41&&G<X)return Q(W);if(W===33||W===34||W===38||W===39||W===41||W===42||W===44||W===46||W===58||W===59||W===60||W===63||W===93||W===95||W===126)return $.check(EJ4,Y,Q)(W);if(W===null||J8(W)||m3(W))return Y(W);return $.consume(W),J}function Q(W){if(W===41)G++;return $.consume(W),J}}function Tt8($,Y,X){return G;function G(K){if(K===33||K===34||K===39||K===41||K===42||K===44||K===46||K===58||K===59||K===63||K===95||K===126)return $.consume(K),G;if(K===38)return $.consume(K),Q;if(K===93)return $.consume(K),J;if(K===60||K===null||J8(K)||m3(K))return Y(K);return X(K)}function J(K){if(K===null||K===40||K===91||J8(K)||m3(K))return Y(K);return G(K)}function Q(K){return DY(K)?W(K):X(K)}function W(K){if(K===59)return $.consume(K),G;if(DY(K))return $.consume(K),W;return X(K)}}function It8($,Y,X){return G;function G(Q){return $.consume(Q),J}function J(Q){return NY(Q)?X(Q):Y(Q)}}function qJ4($){return $===null||$===40||$===42||$===95||$===91||$===93||$===126||J8($)}function PJ4($){return!DY($)}function wJ4($){return!($===47||_h0($))}function _h0($){return $===43||$===45||$===46||$===95||NY($)}function Th0($){let Y=$.length,X=!1;while(Y--){let G=$[Y][1];if((G.type==="labelLink"||G.type==="labelImage")&&!G._balanced){X=!0;break}if(G._gfmAutolinkLiteralWalkedInto){X=!1;break}}if($.length>0&&!X)$[$.length-1][1]._gfmAutolinkLiteralWalkedInto=!0;return X}var Et8,BJ4,OJ4,EJ4,Mt8,MJ4,RJ4,ZV,u3,IE=48;var _J4=V0(()=>{i8();Et8={tokenize:wt8,partial:!0},BJ4={tokenize:_t8,partial:!0},OJ4={tokenize:jt8,partial:!0},EJ4={tokenize:Tt8,partial:!0},Mt8={tokenize:It8,partial:!0},MJ4={name:"wwwAutolink",tokenize:qt8,previous:qJ4},RJ4={name:"protocolAutolink",tokenize:Pt8,previous:PJ4},ZV={name:"emailAutolink",tokenize:Rt8,previous:wJ4},u3={};while(IE<123)if(u3[IE]=ZV,IE++,IE===58)IE=65;else if(IE===91)IE=97;u3[43]=ZV;u3[45]=ZV;u3[46]=ZV;u3[95]=ZV;u3[72]=[ZV,RJ4];u3[104]=[ZV,RJ4];u3[87]=[ZV,MJ4];u3[119]=[ZV,MJ4]});var jJ4=V0(()=>{_J4()});function PD($,Y,X){let G=[],J=-1;while(++J<$.length){let Q=$[J].resolveAll;if(Q&&!G.includes(Q))Y=Q(Y,X),G.push(Q)}return Y}function Ct8($,Y){let X=-1,G,J,Q,W,K,Z,H,z;while(++X<$.length)if($[X][0]==="enter"&&$[X][1].type==="attentionSequence"&&$[X][1]._close){G=X;while(G--)if($[G][0]==="exit"&&$[G][1].type==="attentionSequence"&&$[G][1]._open&&Y.sliceSerialize($[G][1]).charCodeAt(0)===Y.sliceSerialize($[X][1]).charCodeAt(0)){if(($[G][1]._close||$[X][1]._open)&&($[X][1].end.offset-$[X][1].start.offset)%3&&!(($[G][1].end.offset-$[G][1].start.offset+$[X][1].end.offset-$[X][1].start.offset)%3))continue;Z=$[G][1].end.offset-$[G][1].start.offset>1&&$[X][1].end.offset-$[X][1].start.offset>1?2:1;let V={...$[G][1].end},F={...$[X][1].start};if(TJ4(V,-Z),TJ4(F,Z),W={type:Z>1?"strongSequence":"emphasisSequence",start:V,end:{...$[G][1].end}},K={type:Z>1?"strongSequence":"emphasisSequence",start:{...$[X][1].start},end:F},Q={type:Z>1?"strongText":"emphasisText",start:{...$[G][1].end},end:{...$[X][1].start}},J={type:Z>1?"strong":"emphasis",start:{...W.start},end:{...K.end}},$[G][1].end={...W.start},$[X][1].start={...K.end},H=[],$[G][1].end.offset-$[G][1].start.offset)H=VJ(H,[["enter",$[G][1],Y],["exit",$[G][1],Y]]);if(H=VJ(H,[["enter",J,Y],["enter",W,Y],["exit",W,Y],["enter",Q,Y]]),H=VJ(H,PD(Y.parser.constructs.insideSpan.null,$.slice(G+1,X),Y)),H=VJ(H,[["exit",Q,Y],["enter",K,Y],["exit",K,Y],["exit",J,Y]]),$[X][1].end.offset-$[X][1].start.offset)z=2,H=VJ(H,[["enter",$[X][1],Y],["exit",$[X][1],Y]]);else z=0;j7($,G-1,X-G+3,H),X=G+H.length-z-2;break}}X=-1;while(++X<$.length)if($[X][1].type==="attentionSequence")$[X][1].type="data";return $}function St8($,Y){let X=this.parser.constructs.attentionMarkers.null,G=this.previous,J=KV(G),Q;return W;function W(Z){return Q=Z,$.enter("attentionSequence"),K(Z)}function K(Z){if(Z===Q)return $.consume(Z),K;let H=$.exit("attentionSequence"),z=KV(Z),V=!z||z===2&&J||X.includes(Z),F=!J||J===2&&z||X.includes(G);return H._open=Boolean(Q===42?V:V&&(J||!F)),H._close=Boolean(Q===42?F:F&&(z||!V)),Y(Z)}}function TJ4($,Y){$.column+=Y,$.offset+=Y,$._bufferIndex+=Y}var Sm;var IJ4=V0(()=>{w50();Sm={name:"attention",resolveAll:Ct8,tokenize:St8}});function kt8($,Y,X){let G=0;return J;function J(L){return $.enter("autolink"),$.enter("autolinkMarker"),$.consume(L),$.exit("autolinkMarker"),$.enter("autolinkProtocol"),Q}function Q(L){if(DY(L))return $.consume(L),W;if(L===64)return X(L);return H(L)}function W(L){if(L===43||L===45||L===46||NY(L))return G=1,K(L);return H(L)}function K(L){if(L===58)return $.consume(L),G=0,Z;if((L===43||L===45||L===46||NY(L))&&G++<32)return $.consume(L),K;return G=0,H(L)}function Z(L){if(L===62)return $.exit("autolinkProtocol"),$.enter("autolinkMarker"),$.consume(L),$.exit("autolinkMarker"),$.exit("autolink"),Y;if(L===null||L===32||L===60||PE(L))return X(L);return $.consume(L),Z}function H(L){if(L===64)return $.consume(L),z;if(vX4(L))return $.consume(L),H;return X(L)}function z(L){return NY(L)?V(L):X(L)}function V(L){if(L===46)return $.consume(L),G=0,z;if(L===62)return $.exit("autolinkProtocol").type="autolinkEmail",$.enter("autolinkMarker"),$.consume(L),$.exit("autolinkMarker"),$.exit("autolink"),Y;return F(L)}function F(L){if((L===45||NY(L))&&G++<63){let N=L===45?F:V;return $.consume(L),N}return X(L)}}var Ih0;var CJ4=V0(()=>{i8();Ih0={name:"autolink",tokenize:kt8}});function u4($,Y,X,G){let J=G?G-1:Number.POSITIVE_INFINITY,Q=0;return W;function W(Z){if(d4(Z))return $.enter(X),K(Z);return Y(Z)}function K(Z){if(d4(Z)&&Q++<J)return $.consume(Z),K;return $.exit(X),Y(Z)}}var T7=V0(()=>{i8()});function vt8($,Y,X){return G;function G(Q){return d4(Q)?u4($,J,"linePrefix")(Q):J(Q)}function J(Q){return Q===null||G4(Q)?Y(Q):X(Q)}}var p3;var v50=V0(()=>{T7();i8();p3={partial:!0,tokenize:vt8}});function xt8($,Y,X){let G=this;return J;function J(W){if(W===62){let K=G.containerState;if(!K.open)$.enter("blockQuote",{_container:!0}),K.open=!0;return $.enter("blockQuotePrefix"),$.enter("blockQuoteMarker"),$.consume(W),$.exit("blockQuoteMarker"),Q}return X(W)}function Q(W){if(d4(W))return $.enter("blockQuotePrefixWhitespace"),$.consume(W),$.exit("blockQuotePrefixWhitespace"),$.exit("blockQuotePrefix"),Y;return $.exit("blockQuotePrefix"),Y(W)}}function yt8($,Y,X){let G=this;return J;function J(W){if(d4(W))return u4($,Q,"linePrefix",G.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W);return Q(W)}function Q(W){return $.attempt(x50,Y,X)(W)}}function bt8($){$.exit("blockQuote")}var x50;var SJ4=V0(()=>{T7();i8();x50={continuation:{tokenize:yt8},exit:bt8,name:"blockQuote",tokenize:xt8}});function ht8($,Y,X){return G;function G(Q){return $.enter("characterEscape"),$.enter("escapeMarker"),$.consume(Q),$.exit("escapeMarker"),J}function J(Q){if(yX4(Q))return $.enter("characterEscapeValue"),$.consume(Q),$.exit("characterEscapeValue"),$.exit("characterEscape"),Y;return X(Q)}}var y50;var kJ4=V0(()=>{i8();y50={name:"characterEscape",tokenize:ht8}});function ft8($,Y,X){let G=this,J=0,Q,W;return K;function K(V){return $.enter("characterReference"),$.enter("characterReferenceMarker"),$.consume(V),$.exit("characterReferenceMarker"),Z}function Z(V){if(V===35)return $.enter("characterReferenceMarkerNumeric"),$.consume(V),$.exit("characterReferenceMarkerNumeric"),H;return $.enter("characterReferenceValue"),Q=31,W=NY,z(V)}function H(V){if(V===88||V===120)return $.enter("characterReferenceMarkerHexadecimal"),$.consume(V),$.exit("characterReferenceMarkerHexadecimal"),$.enter("characterReferenceValue"),Q=6,W=xX4,z;return $.enter("characterReferenceValue"),Q=7,W=Tm,z(V)}function z(V){if(V===59&&J){let F=$.exit("characterReferenceValue");if(W===NY&&!DT(G.sliceSerialize(F)))return X(V);return $.enter("characterReferenceMarker"),$.consume(V),$.exit("characterReferenceMarker"),$.exit("characterReference"),Y}if(W(V)&&J++<Q)return $.consume(V),z;return X(V)}}var b50;var vJ4=V0(()=>{T50();i8();b50={name:"characterReference",tokenize:ft8}});function gt8($,Y,X){let G=this,J={partial:!0,tokenize:R},Q=0,W=0,K;return Z;function Z(q){return H(q)}function H(q){let _=G.events[G.events.length-1];return Q=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,K=q,$.enter("codeFenced"),$.enter("codeFencedFence"),$.enter("codeFencedFenceSequence"),z(q)}function z(q){if(q===K)return W++,$.consume(q),z;if(W<3)return X(q);return $.exit("codeFencedFenceSequence"),d4(q)?u4($,V,"whitespace")(q):V(q)}function V(q){if(q===null||G4(q))return $.exit("codeFencedFence"),G.interrupt?Y(q):$.check(xJ4,D,M)(q);return $.enter("codeFencedFenceInfo"),$.enter("chunkString",{contentType:"string"}),F(q)}function F(q){if(q===null||G4(q))return $.exit("chunkString"),$.exit("codeFencedFenceInfo"),V(q);if(d4(q))return $.exit("chunkString"),$.exit("codeFencedFenceInfo"),u4($,L,"whitespace")(q);if(q===96&&q===K)return X(q);return $.consume(q),F}function L(q){if(q===null||G4(q))return V(q);return $.enter("codeFencedFenceMeta"),$.enter("chunkString",{contentType:"string"}),N(q)}function N(q){if(q===null||G4(q))return $.exit("chunkString"),$.exit("codeFencedFenceMeta"),V(q);if(q===96&&q===K)return X(q);return $.consume(q),N}function D(q){return $.attempt(J,M,A)(q)}function A(q){return $.enter("lineEnding"),$.consume(q),$.exit("lineEnding"),B}function B(q){return Q>0&&d4(q)?u4($,O,"linePrefix",Q+1)(q):O(q)}function O(q){if(q===null||G4(q))return $.check(xJ4,D,M)(q);return $.enter("codeFlowValue"),E(q)}function E(q){if(q===null||G4(q))return $.exit("codeFlowValue"),O(q);return $.consume(q),E}function M(q){return $.exit("codeFenced"),Y(q)}function R(q,_,P){let w=0;return j;function j(v){return q.enter("lineEnding"),q.consume(v),q.exit("lineEnding"),C}function C(v){return q.enter("codeFencedFence"),d4(v)?u4(q,k,"linePrefix",G.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):k(v)}function k(v){if(v===K)return q.enter("codeFencedFenceSequence"),S(v);return P(v)}function S(v){if(v===K)return w++,q.consume(v),S;if(w>=W)return q.exit("codeFencedFenceSequence"),d4(v)?u4(q,I,"whitespace")(v):I(v);return P(v)}function I(v){if(v===null||G4(v))return q.exit("codeFencedFence"),_(v);return P(v)}}}function mt8($,Y,X){let G=this;return J;function J(W){if(W===null)return X(W);return $.enter("lineEnding"),$.consume(W),$.exit("lineEnding"),Q}function Q(W){return G.parser.lazy[G.now().line]?X(W):Y(W)}}var xJ4,h50;var yJ4=V0(()=>{T7();i8();xJ4={partial:!0,tokenize:mt8},h50={concrete:!0,name:"codeFenced",tokenize:gt8}});function pt8($,Y,X){let G=this;return J;function J(H){return $.enter("codeIndented"),u4($,Q,"linePrefix",5)(H)}function Q(H){let z=G.events[G.events.length-1];return z&&z[1].type==="linePrefix"&&z[2].sliceSerialize(z[1],!0).length>=4?W(H):X(H)}function W(H){if(H===null)return Z(H);if(G4(H))return $.attempt(ut8,W,Z)(H);return $.enter("codeFlowValue"),K(H)}function K(H){if(H===null||G4(H))return $.exit("codeFlowValue"),W(H);return $.consume(H),K}function Z(H){return $.exit("codeIndented"),Y(H)}}function dt8($,Y,X){let G=this;return J;function J(W){if(G.parser.lazy[G.now().line])return X(W);if(G4(W))return $.enter("lineEnding"),$.consume(W),$.exit("lineEnding"),J;return u4($,Q,"linePrefix",5)(W)}function Q(W){let K=G.events[G.events.length-1];return K&&K[1].type==="linePrefix"&&K[2].sliceSerialize(K[1],!0).length>=4?Y(W):G4(W)?J(W):X(W)}}var km,ut8;var bJ4=V0(()=>{T7();i8();km={name:"codeIndented",tokenize:pt8},ut8={partial:!0,tokenize:dt8}});function ct8($){let Y=$.length-4,X=3,G,J;if(($[X][1].type==="lineEnding"||$[X][1].type==="space")&&($[Y][1].type==="lineEnding"||$[Y][1].type==="space")){G=X;while(++G<Y)if($[G][1].type==="codeTextData"){$[X][1].type="codeTextPadding",$[Y][1].type="codeTextPadding",X+=2,Y-=2;break}}G=X-1,Y++;while(++G<=Y)if(J===void 0){if(G!==Y&&$[G][1].type!=="lineEnding")J=G}else if(G===Y||$[G][1].type==="lineEnding"){if($[J][1].type="codeTextData",G!==J+2)$[J][1].end=$[G-1][1].end,$.splice(J+2,G-J-2),Y-=G-J-2,G=J+2;J=void 0}return $}function lt8($){return $!==96||this.events[this.events.length-1][1].type==="characterEscape"}function it8($,Y,X){let G=this,J=0,Q,W;return K;function K(F){return $.enter("codeText"),$.enter("codeTextSequence"),Z(F)}function Z(F){if(F===96)return $.consume(F),J++,Z;return $.exit("codeTextSequence"),H(F)}function H(F){if(F===null)return X(F);if(F===32)return $.enter("space"),$.consume(F),$.exit("space"),H;if(F===96)return W=$.enter("codeTextSequence"),Q=0,V(F);if(G4(F))return $.enter("lineEnding"),$.consume(F),$.exit("lineEnding"),H;return $.enter("codeTextData"),z(F)}function z(F){if(F===null||F===32||F===96||G4(F))return $.exit("codeTextData"),H(F);return $.consume(F),z}function V(F){if(F===96)return $.consume(F),Q++,V;if(Q===J)return $.exit("codeTextSequence"),$.exit("codeText"),Y(F);return W.type="codeTextData",z(F)}}var Ch0;var hJ4=V0(()=>{i8();Ch0={name:"codeText",previous:lt8,resolve:ct8,tokenize:it8}});class Sh0{constructor($){this.left=$?[...$]:[],this.right=[]}get($){if($<0||$>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+$+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");if($<this.left.length)return this.left[$];return this.right[this.right.length-$+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice($,Y){let X=Y===null||Y===void 0?Number.POSITIVE_INFINITY:Y;if(X<this.left.length)return this.left.slice($,X);if($>this.left.length)return this.right.slice(this.right.length-X+this.left.length,this.right.length-$+this.left.length).reverse();return this.left.slice($).concat(this.right.slice(this.right.length-X+this.left.length).reverse())}splice($,Y,X){let G=Y||0;this.setCursor(Math.trunc($));let J=this.right.splice(this.right.length-G,Number.POSITIVE_INFINITY);if(X)vm(this.left,X);return J.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push($){this.setCursor(Number.POSITIVE_INFINITY),this.left.push($)}pushMany($){this.setCursor(Number.POSITIVE_INFINITY),vm(this.left,$)}unshift($){this.setCursor(0),this.right.push($)}unshiftMany($){this.setCursor(0),vm(this.right,$.reverse())}setCursor($){if($===this.left.length||$>this.left.length&&this.right.length===0||$<0&&this.left.length===0)return;if($<this.left.length){let Y=this.left.splice($,Number.POSITIVE_INFINITY);vm(this.right,Y.reverse())}else{let Y=this.right.splice(this.left.length+this.right.length-$,Number.POSITIVE_INFINITY);vm(this.left,Y.reverse())}}}function vm($,Y){let X=0;if(Y.length<1e4)$.push(...Y);else while(X<Y.length)$.push(...Y.slice(X,X+1e4)),X+=1e4}function f50($){let Y={},X=-1,G,J,Q,W,K,Z,H,z=new Sh0($);while(++X<z.length){while(X in Y)X=Y[X];if(G=z.get(X),X&&G[1].type==="chunkFlow"&&z.get(X-1)[1].type==="listItemPrefix"){if(Z=G[1]._tokenizer.events,Q=0,Q<Z.length&&Z[Q][1].type==="lineEndingBlank")Q+=2;if(Q<Z.length&&Z[Q][1].type==="content")while(++Q<Z.length){if(Z[Q][1].type==="content")break;if(Z[Q][1].type==="chunkText")Z[Q][1]._isInFirstContentOfListItem=!0,Q++}}if(G[0]==="enter"){if(G[1].contentType)Object.assign(Y,nt8(z,X)),X=Y[X],H=!0}else if(G[1]._container){Q=X,J=void 0;while(Q--)if(W=z.get(Q),W[1].type==="lineEnding"||W[1].type==="lineEndingBlank"){if(W[0]==="enter"){if(J)z.get(J)[1].type="lineEndingBlank";W[1].type="lineEnding",J=Q}}else if(W[1].type==="linePrefix"||W[1].type==="listItemIndent");else break;if(J)G[1].end={...z.get(J)[1].start},K=z.slice(J,X),K.unshift(G),z.splice(J,X-J+1,K)}}return j7($,0,Number.POSITIVE_INFINITY,z.slice(0)),!H}function nt8($,Y){let X=$.get(Y)[1],G=$.get(Y)[2],J=Y-1,Q=[],W=X._tokenizer;if(!W){if(W=G.parser[X.contentType](X.start),X._contentTypeTextTrailing)W._contentTypeTextTrailing=!0}let K=W.events,Z=[],H={},z,V,F=-1,L=X,N=0,D=0,A=[D];while(L){while($.get(++J)[1]!==L);if(Q.push(J),!L._tokenizer){if(z=G.sliceStream(L),!L.next)z.push(null);if(V)W.defineSkip(L.start);if(L._isInFirstContentOfListItem)W._gfmTasklistFirstContentOfListItem=!0;if(W.write(z),L._isInFirstContentOfListItem)W._gfmTasklistFirstContentOfListItem=void 0}V=L,L=L.next}L=X;while(++F<K.length)if(K[F][0]==="exit"&&K[F-1][0]==="enter"&&K[F][1].type===K[F-1][1].type&&K[F][1].start.line!==K[F][1].end.line)D=F+1,A.push(D),L._tokenizer=void 0,L.previous=void 0,L=L.next;if(W.events=[],L)L._tokenizer=void 0,L.previous=void 0;else A.pop();F=A.length;while(F--){let B=K.slice(A[F],A[F+1]),O=Q.pop();Z.push([O,O+B.length-1]),$.splice(O,2,B)}Z.reverse(),F=-1;while(++F<Z.length)H[N+Z[F][0]]=N+Z[F][1],N+=Z[F][1]-Z[F][0]-1;return H}var kh0=()=>{};function at8($){return f50($),$}function st8($,Y){let X;return G;function G(K){return $.enter("content"),X=$.enter("chunkContent",{contentType:"content"}),J(K)}function J(K){if(K===null)return Q(K);if(G4(K))return $.check(rt8,W,Q)(K);return $.consume(K),J}function Q(K){return $.exit("chunkContent"),$.exit("content"),Y(K)}function W(K){return $.consume(K),$.exit("chunkContent"),X.next=$.enter("chunkContent",{contentType:"content",previous:X}),X=X.next,J}}function ot8($,Y,X){let G=this;return J;function J(W){return $.exit("chunkContent"),$.enter("lineEnding"),$.consume(W),$.exit("lineEnding"),u4($,Q,"linePrefix")}function Q(W){if(W===null||G4(W))return X(W);let K=G.events[G.events.length-1];if(!G.parser.constructs.disable.null.includes("codeIndented")&&K&&K[1].type==="linePrefix"&&K[2].sliceSerialize(K[1],!0).length>=4)return Y(W);return $.interrupt(G.parser.constructs.flow,X,Y)(W)}}var vh0,rt8;var fJ4=V0(()=>{T7();i8();kh0();vh0={resolve:at8,tokenize:st8},rt8={partial:!0,tokenize:ot8}});function g50($,Y,X,G,J,Q,W,K,Z){let H=Z||Number.POSITIVE_INFINITY,z=0;return V;function V(B){if(B===60)return $.enter(G),$.enter(J),$.enter(Q),$.consume(B),$.exit(Q),F;if(B===null||B===32||B===41||PE(B))return X(B);return $.enter(G),$.enter(W),$.enter(K),$.enter("chunkString",{contentType:"string"}),D(B)}function F(B){if(B===62)return $.enter(Q),$.consume(B),$.exit(Q),$.exit(J),$.exit(G),Y;return $.enter(K),$.enter("chunkString",{contentType:"string"}),L(B)}function L(B){if(B===62)return $.exit("chunkString"),$.exit(K),F(B);if(B===null||B===60||G4(B))return X(B);return $.consume(B),B===92?N:L}function N(B){if(B===60||B===62||B===92)return $.consume(B),L;return L(B)}function D(B){if(!z&&(B===null||B===41||J8(B)))return $.exit("chunkString"),$.exit(K),$.exit(W),$.exit(G),Y(B);if(z<H&&B===40)return $.consume(B),z++,D;if(B===41)return $.consume(B),z--,D;if(B===null||B===32||B===40||PE(B))return X(B);return $.consume(B),B===92?A:D}function A(B){if(B===40||B===41||B===92)return $.consume(B),D;return D(B)}}var xh0=V0(()=>{i8()});function m50($,Y,X,G,J,Q){let W=this,K=0,Z;return H;function H(L){return $.enter(G),$.enter(J),$.consume(L),$.exit(J),$.enter(Q),z}function z(L){if(K>999||L===null||L===91||L===93&&!Z||L===94&&!K&&"_hiddenFootnoteSupport"in W.parser.constructs)return X(L);if(L===93)return $.exit(Q),$.enter(J),$.consume(L),$.exit(J),$.exit(G),Y;if(G4(L))return $.enter("lineEnding"),$.consume(L),$.exit("lineEnding"),z;return $.enter("chunkString",{contentType:"string"}),V(L)}function V(L){if(L===null||L===91||L===93||G4(L)||K++>999)return $.exit("chunkString"),z(L);if($.consume(L),!Z)Z=!d4(L);return L===92?F:V}function F(L){if(L===91||L===92||L===93)return $.consume(L),K++,V;return V(L)}}var yh0=V0(()=>{i8()});function u50($,Y,X,G,J,Q){let W;return K;function K(F){if(F===34||F===39||F===40)return $.enter(G),$.enter(J),$.consume(F),$.exit(J),W=F===40?41:F,Z;return X(F)}function Z(F){if(F===W)return $.enter(J),$.consume(F),$.exit(J),$.exit(G),Y;return $.enter(Q),H(F)}function H(F){if(F===W)return $.exit(Q),Z(W);if(F===null)return X(F);if(G4(F))return $.enter("lineEnding"),$.consume(F),$.exit("lineEnding"),u4($,H,"linePrefix");return $.enter("chunkString",{contentType:"string"}),z(F)}function z(F){if(F===W||F===null||G4(F))return $.exit("chunkString"),H(F);return $.consume(F),F===92?V:z}function V(F){if(F===W||F===92)return $.consume(F),z;return z(F)}}var bh0=V0(()=>{T7();i8()});function CE($,Y){let X;return G;function G(J){if(G4(J))return $.enter("lineEnding"),$.consume(J),$.exit("lineEnding"),X=!0,G;if(d4(J))return u4($,G,X?"linePrefix":"lineSuffix")(J);return Y(J)}}var hh0=V0(()=>{T7();i8()});function et8($,Y,X){let G=this,J;return Q;function Q(L){return $.enter("definition"),W(L)}function W(L){return m50.call(G,$,K,X,"definitionLabel","definitionLabelMarker","definitionLabelString")(L)}function K(L){if(J=FG(G.sliceSerialize(G.events[G.events.length-1][1]).slice(1,-1)),L===58)return $.enter("definitionMarker"),$.consume(L),$.exit("definitionMarker"),Z;return X(L)}function Z(L){return J8(L)?CE($,H)(L):H(L)}function H(L){return g50($,z,X,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(L)}function z(L){return $.attempt(tt8,V,V)(L)}function V(L){return d4(L)?u4($,F,"whitespace")(L):F(L)}function F(L){if(L===null||G4(L))return $.exit("definition"),G.parser.defined.push(J),Y(L);return X(L)}}function $e8($,Y,X){return G;function G(K){return J8(K)?CE($,J)(K):X(K)}function J(K){return u50($,Q,X,"definitionTitle","definitionTitleMarker","definitionTitleString")(K)}function Q(K){return d4(K)?u4($,W,"whitespace")(K):W(K)}function W(K){return K===null||G4(K)?Y(K):X(K)}}var fh0,tt8;var gJ4=V0(()=>{xh0();yh0();T7();bh0();hh0();i8();fh0={name:"definition",tokenize:et8},tt8={partial:!0,tokenize:$e8}});function Ye8($,Y,X){return G;function G(Q){return $.enter("hardBreakEscape"),$.consume(Q),J}function J(Q){if(G4(Q))return $.exit("hardBreakEscape"),Y(Q);return X(Q)}}var gh0;var mJ4=V0(()=>{i8();gh0={name:"hardBreakEscape",tokenize:Ye8}});function Xe8($,Y){let X=$.length-2,G=3,J,Q;if($[G][1].type==="whitespace")G+=2;if(X-2>G&&$[X][1].type==="whitespace")X-=2;if($[X][1].type==="atxHeadingSequence"&&(G===X-1||X-4>G&&$[X-2][1].type==="whitespace"))X-=G+1===X?2:4;if(X>G)J={type:"atxHeadingText",start:$[G][1].start,end:$[X][1].end},Q={type:"chunkText",start:$[G][1].start,end:$[X][1].end,contentType:"text"},j7($,G,X-G+1,[["enter",J,Y],["enter",Q,Y],["exit",Q,Y],["exit",J,Y]]);return $}function Ge8($,Y,X){let G=0;return J;function J(z){return $.enter("atxHeading"),Q(z)}function Q(z){return $.enter("atxHeadingSequence"),W(z)}function W(z){if(z===35&&G++<6)return $.consume(z),W;if(z===null||J8(z))return $.exit("atxHeadingSequence"),K(z);return X(z)}function K(z){if(z===35)return $.enter("atxHeadingSequence"),Z(z);if(z===null||G4(z))return $.exit("atxHeading"),Y(z);if(d4(z))return u4($,K,"whitespace")(z);return $.enter("atxHeadingText"),H(z)}function Z(z){if(z===35)return $.consume(z),Z;return $.exit("atxHeadingSequence"),K(z)}function H(z){if(z===null||z===35||J8(z))return $.exit("atxHeadingText"),K(z);return $.consume(z),H}}var mh0;var uJ4=V0(()=>{T7();i8();mh0={name:"headingAtx",resolve:Xe8,tokenize:Ge8}});var pJ4,uh0;var dJ4=V0(()=>{pJ4=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],uh0=["pre","script","style","textarea"]});function We8($){let Y=$.length;while(Y--)if($[Y][0]==="enter"&&$[Y][1].type==="htmlFlow")break;if(Y>1&&$[Y-2][1].type==="linePrefix")$[Y][1].start=$[Y-2][1].start,$[Y+1][1].start=$[Y-2][1].start,$.splice(Y-2,2);return $}function Ke8($,Y,X){let G=this,J,Q,W,K,Z;return H;function H(h){return z(h)}function z(h){return $.enter("htmlFlow"),$.enter("htmlFlowData"),$.consume(h),V}function V(h){if(h===33)return $.consume(h),F;if(h===47)return $.consume(h),Q=!0,D;if(h===63)return $.consume(h),J=3,G.interrupt?Y:b;if(DY(h))return $.consume(h),W=String.fromCharCode(h),A;return X(h)}function F(h){if(h===45)return $.consume(h),J=2,L;if(h===91)return $.consume(h),J=5,K=0,N;if(DY(h))return $.consume(h),J=4,G.interrupt?Y:b;return X(h)}function L(h){if(h===45)return $.consume(h),G.interrupt?Y:b;return X(h)}function N(h){if(h==="CDATA[".charCodeAt(K++)){if($.consume(h),K===6)return G.interrupt?Y:k;return N}return X(h)}function D(h){if(DY(h))return $.consume(h),W=String.fromCharCode(h),A;return X(h)}function A(h){if(h===null||h===47||h===62||J8(h)){let n=h===47,t=W.toLowerCase();if(!n&&!Q&&uh0.includes(t))return J=1,G.interrupt?Y(h):k(h);if(pJ4.includes(W.toLowerCase())){if(J=6,n)return $.consume(h),B;return G.interrupt?Y(h):k(h)}return J=7,G.interrupt&&!G.parser.lazy[G.now().line]?X(h):Q?O(h):E(h)}if(h===45||NY(h))return $.consume(h),W+=String.fromCharCode(h),A;return X(h)}function B(h){if(h===62)return $.consume(h),G.interrupt?Y:k;return X(h)}function O(h){if(d4(h))return $.consume(h),O;return j(h)}function E(h){if(h===47)return $.consume(h),j;if(h===58||h===95||DY(h))return $.consume(h),M;if(d4(h))return $.consume(h),E;return j(h)}function M(h){if(h===45||h===46||h===58||h===95||NY(h))return $.consume(h),M;return R(h)}function R(h){if(h===61)return $.consume(h),q;if(d4(h))return $.consume(h),R;return E(h)}function q(h){if(h===null||h===60||h===61||h===62||h===96)return X(h);if(h===34||h===39)return $.consume(h),Z=h,_;if(d4(h))return $.consume(h),q;return P(h)}function _(h){if(h===Z)return $.consume(h),Z=null,w;if(h===null||G4(h))return X(h);return $.consume(h),_}function P(h){if(h===null||h===34||h===39||h===47||h===60||h===61||h===62||h===96||J8(h))return R(h);return $.consume(h),P}function w(h){if(h===47||h===62||d4(h))return E(h);return X(h)}function j(h){if(h===62)return $.consume(h),C;return X(h)}function C(h){if(h===null||G4(h))return k(h);if(d4(h))return $.consume(h),C;return X(h)}function k(h){if(h===45&&J===2)return $.consume(h),x;if(h===60&&J===1)return $.consume(h),y;if(h===62&&J===4)return $.consume(h),g;if(h===63&&J===3)return $.consume(h),b;if(h===93&&J===5)return $.consume(h),u;if(G4(h)&&(J===6||J===7))return $.exit("htmlFlowData"),$.check(Je8,p,S)(h);if(h===null||G4(h))return $.exit("htmlFlowData"),S(h);return $.consume(h),k}function S(h){return $.check(Qe8,I,p)(h)}function I(h){return $.enter("lineEnding"),$.consume(h),$.exit("lineEnding"),v}function v(h){if(h===null||G4(h))return S(h);return $.enter("htmlFlowData"),k(h)}function x(h){if(h===45)return $.consume(h),b;return k(h)}function y(h){if(h===47)return $.consume(h),W="",d;return k(h)}function d(h){if(h===62){let n=W.toLowerCase();if(uh0.includes(n))return $.consume(h),g;return k(h)}if(DY(h)&&W.length<8)return $.consume(h),W+=String.fromCharCode(h),d;return k(h)}function u(h){if(h===93)return $.consume(h),b;return k(h)}function b(h){if(h===62)return $.consume(h),g;if(h===45&&J===2)return $.consume(h),b;return k(h)}function g(h){if(h===null||G4(h))return $.exit("htmlFlowData"),p(h);return $.consume(h),g}function p(h){return $.exit("htmlFlow"),Y(h)}}function Ze8($,Y,X){let G=this;return J;function J(W){if(G4(W))return $.enter("lineEnding"),$.consume(W),$.exit("lineEnding"),Q;return X(W)}function Q(W){return G.parser.lazy[G.now().line]?X(W):Y(W)}}function Ue8($,Y,X){return G;function G(J){return $.enter("lineEnding"),$.consume(J),$.exit("lineEnding"),$.attempt(p3,Y,X)}}var ph0,Je8,Qe8;var cJ4=V0(()=>{i8();dJ4();v50();ph0={concrete:!0,name:"htmlFlow",resolveTo:We8,tokenize:Ke8},Je8={partial:!0,tokenize:Ue8},Qe8={partial:!0,tokenize:Ze8}});function He8($,Y,X){let G=this,J,Q,W;return K;function K(b){return $.enter("htmlText"),$.enter("htmlTextData"),$.consume(b),Z}function Z(b){if(b===33)return $.consume(b),H;if(b===47)return $.consume(b),R;if(b===63)return $.consume(b),E;if(DY(b))return $.consume(b),P;return X(b)}function H(b){if(b===45)return $.consume(b),z;if(b===91)return $.consume(b),Q=0,N;if(DY(b))return $.consume(b),O;return X(b)}function z(b){if(b===45)return $.consume(b),L;return X(b)}function V(b){if(b===null)return X(b);if(b===45)return $.consume(b),F;if(G4(b))return W=V,y(b);return $.consume(b),V}function F(b){if(b===45)return $.consume(b),L;return V(b)}function L(b){return b===62?x(b):b===45?F(b):V(b)}function N(b){if(b==="CDATA[".charCodeAt(Q++))return $.consume(b),Q===6?D:N;return X(b)}function D(b){if(b===null)return X(b);if(b===93)return $.consume(b),A;if(G4(b))return W=D,y(b);return $.consume(b),D}function A(b){if(b===93)return $.consume(b),B;return D(b)}function B(b){if(b===62)return x(b);if(b===93)return $.consume(b),B;return D(b)}function O(b){if(b===null||b===62)return x(b);if(G4(b))return W=O,y(b);return $.consume(b),O}function E(b){if(b===null)return X(b);if(b===63)return $.consume(b),M;if(G4(b))return W=E,y(b);return $.consume(b),E}function M(b){return b===62?x(b):E(b)}function R(b){if(DY(b))return $.consume(b),q;return X(b)}function q(b){if(b===45||NY(b))return $.consume(b),q;return _(b)}function _(b){if(G4(b))return W=_,y(b);if(d4(b))return $.consume(b),_;return x(b)}function P(b){if(b===45||NY(b))return $.consume(b),P;if(b===47||b===62||J8(b))return w(b);return X(b)}function w(b){if(b===47)return $.consume(b),x;if(b===58||b===95||DY(b))return $.consume(b),j;if(G4(b))return W=w,y(b);if(d4(b))return $.consume(b),w;return x(b)}function j(b){if(b===45||b===46||b===58||b===95||NY(b))return $.consume(b),j;return C(b)}function C(b){if(b===61)return $.consume(b),k;if(G4(b))return W=C,y(b);if(d4(b))return $.consume(b),C;return w(b)}function k(b){if(b===null||b===60||b===61||b===62||b===96)return X(b);if(b===34||b===39)return $.consume(b),J=b,S;if(G4(b))return W=k,y(b);if(d4(b))return $.consume(b),k;return $.consume(b),I}function S(b){if(b===J)return $.consume(b),J=void 0,v;if(b===null)return X(b);if(G4(b))return W=S,y(b);return $.consume(b),S}function I(b){if(b===null||b===34||b===39||b===60||b===61||b===96)return X(b);if(b===47||b===62||J8(b))return w(b);return $.consume(b),I}function v(b){if(b===47||b===62||J8(b))return w(b);return X(b)}function x(b){if(b===62)return $.consume(b),$.exit("htmlTextData"),$.exit("htmlText"),Y;return X(b)}function y(b){return $.exit("htmlTextData"),$.enter("lineEnding"),$.consume(b),$.exit("lineEnding"),d}function d(b){return d4(b)?u4($,u,"linePrefix",G.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):u(b)}function u(b){return $.enter("htmlTextData"),W(b)}}var dh0;var lJ4=V0(()=>{T7();i8();dh0={name:"htmlText",tokenize:He8}});function Le8($){let Y=-1,X=[];while(++Y<$.length){let G=$[Y][1];if(X.push($[Y]),G.type==="labelImage"||G.type==="labelLink"||G.type==="labelEnd"){let J=G.type==="labelImage"?4:2;G.type="data",Y+=J}}if($.length!==X.length)j7($,0,$.length,X);return $}function De8($,Y){let X=$.length,G=0,J,Q,W,K;while(X--)if(J=$[X][1],Q){if(J.type==="link"||J.type==="labelLink"&&J._inactive)break;if($[X][0]==="enter"&&J.type==="labelLink")J._inactive=!0}else if(W){if($[X][0]==="enter"&&(J.type==="labelImage"||J.type==="labelLink")&&!J._balanced){if(Q=X,J.type!=="labelLink"){G=2;break}}}else if(J.type==="labelEnd")W=X;let Z={type:$[Q][1].type==="labelLink"?"link":"image",start:{...$[Q][1].start},end:{...$[$.length-1][1].end}},H={type:"label",start:{...$[Q][1].start},end:{...$[W][1].end}},z={type:"labelText",start:{...$[Q+G+2][1].end},end:{...$[W-2][1].start}};return K=[["enter",Z,Y],["enter",H,Y]],K=VJ(K,$.slice(Q+1,Q+G+3)),K=VJ(K,[["enter",z,Y]]),K=VJ(K,PD(Y.parser.constructs.insideSpan.null,$.slice(Q+G+4,W-3),Y)),K=VJ(K,[["exit",z,Y],$[W-2],$[W-1],["exit",H,Y]]),K=VJ(K,$.slice(W+1)),K=VJ(K,[["exit",Z,Y]]),j7($,Q,$.length,K),$}function Ne8($,Y,X){let G=this,J=G.events.length,Q,W;while(J--)if((G.events[J][1].type==="labelImage"||G.events[J][1].type==="labelLink")&&!G.events[J][1]._balanced){Q=G.events[J][1];break}return K;function K(F){if(!Q)return X(F);if(Q._inactive)return V(F);return W=G.parser.defined.includes(FG(G.sliceSerialize({start:Q.end,end:G.now()}))),$.enter("labelEnd"),$.enter("labelMarker"),$.consume(F),$.exit("labelMarker"),$.exit("labelEnd"),Z}function Z(F){if(F===40)return $.attempt(ze8,z,W?z:V)(F);if(F===91)return $.attempt(Ve8,z,W?H:V)(F);return W?z(F):V(F)}function H(F){return $.attempt(Fe8,z,V)(F)}function z(F){return Y(F)}function V(F){return Q._balanced=!0,X(F)}}function Ae8($,Y,X){return G;function G(V){return $.enter("resource"),$.enter("resourceMarker"),$.consume(V),$.exit("resourceMarker"),J}function J(V){return J8(V)?CE($,Q)(V):Q(V)}function Q(V){if(V===41)return z(V);return g50($,W,K,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(V)}function W(V){return J8(V)?CE($,Z)(V):z(V)}function K(V){return X(V)}function Z(V){if(V===34||V===39||V===40)return u50($,H,X,"resourceTitle","resourceTitleMarker","resourceTitleString")(V);return z(V)}function H(V){return J8(V)?CE($,z)(V):z(V)}function z(V){if(V===41)return $.enter("resourceMarker"),$.consume(V),$.exit("resourceMarker"),$.exit("resource"),Y;return X(V)}}function Be8($,Y,X){let G=this;return J;function J(K){return m50.call(G,$,Q,W,"reference","referenceMarker","referenceString")(K)}function Q(K){return G.parser.defined.includes(FG(G.sliceSerialize(G.events[G.events.length-1][1]).slice(1,-1)))?Y(K):X(K)}function W(K){return X(K)}}function Oe8($,Y,X){return G;function G(Q){return $.enter("reference"),$.enter("referenceMarker"),$.consume(Q),$.exit("referenceMarker"),J}function J(Q){if(Q===93)return $.enter("referenceMarker"),$.consume(Q),$.exit("referenceMarker"),$.exit("reference"),Y;return X(Q)}}var SE,ze8,Ve8,Fe8;var p50=V0(()=>{xh0();yh0();bh0();hh0();i8();SE={name:"labelEnd",resolveAll:Le8,resolveTo:De8,tokenize:Ne8},ze8={tokenize:Ae8},Ve8={tokenize:Be8},Fe8={tokenize:Oe8}});function Ee8($,Y,X){let G=this;return J;function J(K){return $.enter("labelImage"),$.enter("labelImageMarker"),$.consume(K),$.exit("labelImageMarker"),Q}function Q(K){if(K===91)return $.enter("labelMarker"),$.consume(K),$.exit("labelMarker"),$.exit("labelImage"),W;return X(K)}function W(K){return K===94&&"_hiddenFootnoteSupport"in G.parser.constructs?X(K):Y(K)}}var ch0;var iJ4=V0(()=>{p50();ch0={name:"labelStartImage",resolveAll:SE.resolveAll,tokenize:Ee8}});function Me8($,Y,X){let G=this;return J;function J(W){return $.enter("labelLink"),$.enter("labelMarker"),$.consume(W),$.exit("labelMarker"),$.exit("labelLink"),Q}function Q(W){return W===94&&"_hiddenFootnoteSupport"in G.parser.constructs?X(W):Y(W)}}var lh0;var nJ4=V0(()=>{p50();lh0={name:"labelStartLink",resolveAll:SE.resolveAll,tokenize:Me8}});function Re8($,Y){return X;function X(G){return $.enter("lineEnding"),$.consume(G),$.exit("lineEnding"),u4($,Y,"linePrefix")}}var xm;var rJ4=V0(()=>{T7();xm={name:"lineEnding",tokenize:Re8}});function qe8($,Y,X){let G=0,J;return Q;function Q(H){return $.enter("thematicBreak"),W(H)}function W(H){return J=H,K(H)}function K(H){if(H===J)return $.enter("thematicBreakSequence"),Z(H);if(G>=3&&(H===null||G4(H)))return $.exit("thematicBreak"),Y(H);return X(H)}function Z(H){if(H===J)return $.consume(H),G++,Z;return $.exit("thematicBreakSequence"),d4(H)?u4($,K,"whitespace")(H):K(H)}}var kE;var ih0=V0(()=>{T7();i8();kE={name:"thematicBreak",tokenize:qe8}});function _e8($,Y,X){let G=this,J=G.events[G.events.length-1],Q=J&&J[1].type==="linePrefix"?J[2].sliceSerialize(J[1],!0).length:0,W=0;return K;function K(L){let N=G.containerState.type||(L===42||L===43||L===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!G.containerState.marker||L===G.containerState.marker:Tm(L)){if(!G.containerState.type)G.containerState.type=N,$.enter(N,{_container:!0});if(N==="listUnordered")return $.enter("listItemPrefix"),L===42||L===45?$.check(kE,X,H)(L):H(L);if(!G.interrupt||L===49)return $.enter("listItemPrefix"),$.enter("listItemValue"),Z(L)}return X(L)}function Z(L){if(Tm(L)&&++W<10)return $.consume(L),Z;if((!G.interrupt||W<2)&&(G.containerState.marker?L===G.containerState.marker:L===41||L===46))return $.exit("listItemValue"),H(L);return X(L)}function H(L){return $.enter("listItemMarker"),$.consume(L),$.exit("listItemMarker"),G.containerState.marker=G.containerState.marker||L,$.check(p3,G.interrupt?X:z,$.attempt(Pe8,F,V))}function z(L){return G.containerState.initialBlankLine=!0,Q++,F(L)}function V(L){if(d4(L))return $.enter("listItemPrefixWhitespace"),$.consume(L),$.exit("listItemPrefixWhitespace"),F;return X(L)}function F(L){return G.containerState.size=Q+G.sliceSerialize($.exit("listItemPrefix"),!0).length,Y(L)}}function je8($,Y,X){let G=this;return G.containerState._closeFlow=void 0,$.check(p3,J,Q);function J(K){return G.containerState.furtherBlankLines=G.containerState.furtherBlankLines||G.containerState.initialBlankLine,u4($,Y,"listItemIndent",G.containerState.size+1)(K)}function Q(K){if(G.containerState.furtherBlankLines||!d4(K))return G.containerState.furtherBlankLines=void 0,G.containerState.initialBlankLine=void 0,W(K);return G.containerState.furtherBlankLines=void 0,G.containerState.initialBlankLine=void 0,$.attempt(we8,Y,W)(K)}function W(K){return G.containerState._closeFlow=!0,G.interrupt=void 0,u4($,$.attempt(LG,Y,X),"linePrefix",G.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K)}}function Te8($,Y,X){let G=this;return u4($,J,"listItemIndent",G.containerState.size+1);function J(Q){let W=G.events[G.events.length-1];return W&&W[1].type==="listItemIndent"&&W[2].sliceSerialize(W[1],!0).length===G.containerState.size?Y(Q):X(Q)}}function Ie8($){$.exit(this.containerState.type)}function Ce8($,Y,X){let G=this;return u4($,J,"listItemPrefixWhitespace",G.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function J(Q){let W=G.events[G.events.length-1];return!d4(Q)&&W&&W[1].type==="listItemPrefixWhitespace"?Y(Q):X(Q)}}var LG,Pe8,we8;var aJ4=V0(()=>{T7();i8();v50();ih0();LG={continuation:{tokenize:je8},exit:Ie8,name:"list",tokenize:_e8},Pe8={partial:!0,tokenize:Ce8},we8={partial:!0,tokenize:Te8}});function Se8($,Y){let X=$.length,G,J,Q;while(X--)if($[X][0]==="enter"){if($[X][1].type==="content"){G=X;break}if($[X][1].type==="paragraph")J=X}else{if($[X][1].type==="content")$.splice(X,1);if(!Q&&$[X][1].type==="definition")Q=X}let W={type:"setextHeading",start:{...$[G][1].start},end:{...$[$.length-1][1].end}};if($[J][1].type="setextHeadingText",Q)$.splice(J,0,["enter",W,Y]),$.splice(Q+1,0,["exit",$[G][1],Y]),$[G][1].end={...$[Q][1].end};else $[G][1]=W;return $.push(["exit",W,Y]),$}function ke8($,Y,X){let G=this,J;return Q;function Q(H){let z=G.events.length,V;while(z--)if(G.events[z][1].type!=="lineEnding"&&G.events[z][1].type!=="linePrefix"&&G.events[z][1].type!=="content"){V=G.events[z][1].type==="paragraph";break}if(!G.parser.lazy[G.now().line]&&(G.interrupt||V))return $.enter("setextHeadingLine"),J=H,W(H);return X(H)}function W(H){return $.enter("setextHeadingLineSequence"),K(H)}function K(H){if(H===J)return $.consume(H),K;return $.exit("setextHeadingLineSequence"),d4(H)?u4($,Z,"lineSuffix")(H):Z(H)}function Z(H){if(H===null||G4(H))return $.exit("setextHeadingLine"),Y(H);return X(H)}}var d50;var sJ4=V0(()=>{T7();i8();d50={name:"setextUnderline",resolveTo:Se8,tokenize:ke8}});var c50=V0(()=>{IJ4();CJ4();v50();SJ4();kJ4();vJ4();yJ4();bJ4();hJ4();fJ4();gJ4();mJ4();uJ4();cJ4();lJ4();p50();iJ4();nJ4();rJ4();aJ4();sJ4();ih0()});function nh0(){return{document:{[91]:{name:"gfmFootnoteDefinition",tokenize:he8,continuation:{tokenize:fe8},exit:ge8}},text:{[91]:{name:"gfmFootnoteCall",tokenize:be8},[93]:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:xe8,resolveTo:ye8}}}}function xe8($,Y,X){let G=this,J=G.events.length,Q=G.parser.gfmFootnotes||(G.parser.gfmFootnotes=[]),W;while(J--){let Z=G.events[J][1];if(Z.type==="labelImage"){W=Z;break}if(Z.type==="gfmFootnoteCall"||Z.type==="labelLink"||Z.type==="label"||Z.type==="image"||Z.type==="link")break}return K;function K(Z){if(!W||!W._balanced)return X(Z);let H=FG(G.sliceSerialize({start:W.end,end:G.now()}));if(H.codePointAt(0)!==94||!Q.includes(H.slice(1)))return X(Z);return $.enter("gfmFootnoteCallLabelMarker"),$.consume(Z),$.exit("gfmFootnoteCallLabelMarker"),Y(Z)}}function ye8($,Y){let X=$.length,G;while(X--)if($[X][1].type==="labelImage"&&$[X][0]==="enter"){G=$[X][1];break}$[X+1][1].type="data",$[X+3][1].type="gfmFootnoteCallLabelMarker";let J={type:"gfmFootnoteCall",start:Object.assign({},$[X+3][1].start),end:Object.assign({},$[$.length-1][1].end)},Q={type:"gfmFootnoteCallMarker",start:Object.assign({},$[X+3][1].end),end:Object.assign({},$[X+3][1].end)};Q.end.column++,Q.end.offset++,Q.end._bufferIndex++;let W={type:"gfmFootnoteCallString",start:Object.assign({},Q.end),end:Object.assign({},$[$.length-1][1].start)},K={type:"chunkString",contentType:"string",start:Object.assign({},W.start),end:Object.assign({},W.end)},Z=[$[X+1],$[X+2],["enter",J,Y],$[X+3],$[X+4],["enter",Q,Y],["exit",Q,Y],["enter",W,Y],["enter",K,Y],["exit",K,Y],["exit",W,Y],$[$.length-2],$[$.length-1],["exit",J,Y]];return $.splice(X,$.length-X+1,...Z),$}function be8($,Y,X){let G=this,J=G.parser.gfmFootnotes||(G.parser.gfmFootnotes=[]),Q=0,W;return K;function K(V){return $.enter("gfmFootnoteCall"),$.enter("gfmFootnoteCallLabelMarker"),$.consume(V),$.exit("gfmFootnoteCallLabelMarker"),Z}function Z(V){if(V!==94)return X(V);return $.enter("gfmFootnoteCallMarker"),$.consume(V),$.exit("gfmFootnoteCallMarker"),$.enter("gfmFootnoteCallString"),$.enter("chunkString").contentType="string",H}function H(V){if(Q>999||V===93&&!W||V===null||V===91||J8(V))return X(V);if(V===93){$.exit("chunkString");let F=$.exit("gfmFootnoteCallString");if(!J.includes(FG(G.sliceSerialize(F))))return X(V);return $.enter("gfmFootnoteCallLabelMarker"),$.consume(V),$.exit("gfmFootnoteCallLabelMarker"),$.exit("gfmFootnoteCall"),Y}if(!J8(V))W=!0;return Q++,$.consume(V),V===92?z:H}function z(V){if(V===91||V===92||V===93)return $.consume(V),Q++,H;return H(V)}}function he8($,Y,X){let G=this,J=G.parser.gfmFootnotes||(G.parser.gfmFootnotes=[]),Q,W=0,K;return Z;function Z(N){return $.enter("gfmFootnoteDefinition")._container=!0,$.enter("gfmFootnoteDefinitionLabel"),$.enter("gfmFootnoteDefinitionLabelMarker"),$.consume(N),$.exit("gfmFootnoteDefinitionLabelMarker"),H}function H(N){if(N===94)return $.enter("gfmFootnoteDefinitionMarker"),$.consume(N),$.exit("gfmFootnoteDefinitionMarker"),$.enter("gfmFootnoteDefinitionLabelString"),$.enter("chunkString").contentType="string",z;return X(N)}function z(N){if(W>999||N===93&&!K||N===null||N===91||J8(N))return X(N);if(N===93){$.exit("chunkString");let D=$.exit("gfmFootnoteDefinitionLabelString");return Q=FG(G.sliceSerialize(D)),$.enter("gfmFootnoteDefinitionLabelMarker"),$.consume(N),$.exit("gfmFootnoteDefinitionLabelMarker"),$.exit("gfmFootnoteDefinitionLabel"),F}if(!J8(N))K=!0;return W++,$.consume(N),N===92?V:z}function V(N){if(N===91||N===92||N===93)return $.consume(N),W++,z;return z(N)}function F(N){if(N===58){if($.enter("definitionMarker"),$.consume(N),$.exit("definitionMarker"),!J.includes(Q))J.push(Q);return u4($,L,"gfmFootnoteDefinitionWhitespace")}return X(N)}function L(N){return Y(N)}}function fe8($,Y,X){return $.check(p3,Y,$.attempt(ve8,Y,X))}function ge8($){$.exit("gfmFootnoteDefinition")}function me8($,Y,X){let G=this;return u4($,J,"gfmFootnoteDefinitionIndent",5);function J(Q){let W=G.events[G.events.length-1];return W&&W[1].type==="gfmFootnoteDefinitionIndent"&&W[2].sliceSerialize(W[1],!0).length===4?Y(Q):X(Q)}}var ve8;var oJ4=V0(()=>{c50();T7();i8();ve8={tokenize:me8,partial:!0}});var tJ4=V0(()=>{oJ4()});function rh0($){let X=($||{}).singleTilde,G={name:"strikethrough",tokenize:Q,resolveAll:J};if(X===null||X===void 0)X=!0;return{text:{[126]:G},insideSpan:{null:[G]},attentionMarkers:{null:[126]}};function J(W,K){let Z=-1;while(++Z<W.length)if(W[Z][0]==="enter"&&W[Z][1].type==="strikethroughSequenceTemporary"&&W[Z][1]._close){let H=Z;while(H--)if(W[H][0]==="exit"&&W[H][1].type==="strikethroughSequenceTemporary"&&W[H][1]._open&&W[Z][1].end.offset-W[Z][1].start.offset===W[H][1].end.offset-W[H][1].start.offset){W[Z][1].type="strikethroughSequence",W[H][1].type="strikethroughSequence";let z={type:"strikethrough",start:Object.assign({},W[H][1].start),end:Object.assign({},W[Z][1].end)},V={type:"strikethroughText",start:Object.assign({},W[H][1].end),end:Object.assign({},W[Z][1].start)},F=[["enter",z,K],["enter",W[H][1],K],["exit",W[H][1],K],["enter",V,K]],L=K.parser.constructs.insideSpan.null;if(L)j7(F,F.length,0,PD(L,W.slice(H+1,Z),K));j7(F,F.length,0,[["exit",V,K],["enter",W[Z][1],K],["exit",W[Z][1],K],["exit",z,K]]),j7(W,H-1,Z-H+3,F),Z=H+F.length-2;break}}Z=-1;while(++Z<W.length)if(W[Z][1].type==="strikethroughSequenceTemporary")W[Z][1].type="data";return W}function Q(W,K,Z){let H=this.previous,z=this.events,V=0;return F;function F(N){if(H===126&&z[z.length-1][1].type!=="characterEscape")return Z(N);return W.enter("strikethroughSequenceTemporary"),L(N)}function L(N){let D=KV(H);if(N===126){if(V>1)return Z(N);return W.consume(N),V++,L}if(V<2&&!X)return Z(N);let A=W.exit("strikethroughSequenceTemporary"),B=KV(N);return A._open=!B||B===2&&Boolean(D),A._close=!D||D===2&&Boolean(B),K(N)}}}var eJ4=V0(()=>{w50()});var $Q4=V0(()=>{eJ4()});class ah0{constructor(){this.map=[]}add($,Y,X){ue8(this,$,Y,X)}consume($){if(this.map.sort(function(J,Q){return J[0]-Q[0]}),this.map.length===0)return;let Y=this.map.length,X=[];while(Y>0)Y-=1,X.push($.slice(this.map[Y][0]+this.map[Y][1]),this.map[Y][2]),$.length=this.map[Y][0];X.push($.slice()),$.length=0;let G=X.pop();while(G){for(let J of G)$.push(J);G=X.pop()}this.map.length=0}}function ue8($,Y,X,G){let J=0;if(X===0&&G.length===0)return;while(J<$.map.length){if($.map[J][0]===Y){$.map[J][1]+=X,$.map[J][2].push(...G);return}J+=1}$.map.push([Y,X,G])}function YQ4($,Y){let X=!1,G=[];while(Y<$.length){let J=$[Y];if(X){if(J[0]==="enter"){if(J[1].type==="tableContent")G.push($[Y+1][1].type==="tableDelimiterMarker"?"left":"none")}else if(J[1].type==="tableContent"){if($[Y-1][1].type==="tableDelimiterMarker"){let Q=G.length-1;G[Q]=G[Q]==="left"?"center":"right"}}else if(J[1].type==="tableDelimiterRow")break}else if(J[0]==="enter"&&J[1].type==="tableDelimiterRow")X=!0;Y+=1}return G}function sh0(){return{flow:{null:{name:"table",tokenize:pe8,resolveAll:de8}}}}function pe8($,Y,X){let G=this,J=0,Q=0,W;return K;function K(j){let C=G.events.length-1;while(C>-1){let I=G.events[C][1].type;if(I==="lineEnding"||I==="linePrefix")C--;else break}let k=C>-1?G.events[C][1].type:null,S=k==="tableHead"||k==="tableRow"?q:Z;if(S===q&&G.parser.lazy[G.now().line])return X(j);return S(j)}function Z(j){return $.enter("tableHead"),$.enter("tableRow"),H(j)}function H(j){if(j===124)return z(j);return W=!0,Q+=1,z(j)}function z(j){if(j===null)return X(j);if(G4(j)){if(Q>1)return Q=0,G.interrupt=!0,$.exit("tableRow"),$.enter("lineEnding"),$.consume(j),$.exit("lineEnding"),L;return X(j)}if(d4(j))return u4($,z,"whitespace")(j);if(Q+=1,W)W=!1,J+=1;if(j===124)return $.enter("tableCellDivider"),$.consume(j),$.exit("tableCellDivider"),W=!0,z;return $.enter("data"),V(j)}function V(j){if(j===null||j===124||J8(j))return $.exit("data"),z(j);return $.consume(j),j===92?F:V}function F(j){if(j===92||j===124)return $.consume(j),V;return V(j)}function L(j){if(G.interrupt=!1,G.parser.lazy[G.now().line])return X(j);if($.enter("tableDelimiterRow"),W=!1,d4(j))return u4($,N,"linePrefix",G.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j);return N(j)}function N(j){if(j===45||j===58)return A(j);if(j===124)return W=!0,$.enter("tableCellDivider"),$.consume(j),$.exit("tableCellDivider"),D;return R(j)}function D(j){if(d4(j))return u4($,A,"whitespace")(j);return A(j)}function A(j){if(j===58)return Q+=1,W=!0,$.enter("tableDelimiterMarker"),$.consume(j),$.exit("tableDelimiterMarker"),B;if(j===45)return Q+=1,B(j);if(j===null||G4(j))return M(j);return R(j)}function B(j){if(j===45)return $.enter("tableDelimiterFiller"),O(j);return R(j)}function O(j){if(j===45)return $.consume(j),O;if(j===58)return W=!0,$.exit("tableDelimiterFiller"),$.enter("tableDelimiterMarker"),$.consume(j),$.exit("tableDelimiterMarker"),E;return $.exit("tableDelimiterFiller"),E(j)}function E(j){if(d4(j))return u4($,M,"whitespace")(j);return M(j)}function M(j){if(j===124)return N(j);if(j===null||G4(j)){if(!W||J!==Q)return R(j);return $.exit("tableDelimiterRow"),$.exit("tableHead"),Y(j)}return R(j)}function R(j){return X(j)}function q(j){return $.enter("tableRow"),_(j)}function _(j){if(j===124)return $.enter("tableCellDivider"),$.consume(j),$.exit("tableCellDivider"),_;if(j===null||G4(j))return $.exit("tableRow"),Y(j);if(d4(j))return u4($,_,"whitespace")(j);return $.enter("data"),P(j)}function P(j){if(j===null||j===124||J8(j))return $.exit("data"),_(j);return $.consume(j),j===92?w:P}function w(j){if(j===92||j===124)return $.consume(j),P;return P(j)}}function de8($,Y){let X=-1,G=!0,J=0,Q=[0,0,0,0],W=[0,0,0,0],K=!1,Z=0,H,z,V,F=new ah0;while(++X<$.length){let L=$[X],N=L[1];if(L[0]==="enter"){if(N.type==="tableHead"){if(K=!1,Z!==0)XQ4(F,Y,Z,H,z),z=void 0,Z=0;H={type:"table",start:Object.assign({},N.start),end:Object.assign({},N.end)},F.add(X,0,[["enter",H,Y]])}else if(N.type==="tableRow"||N.type==="tableDelimiterRow"){if(G=!0,V=void 0,Q=[0,0,0,0],W=[0,X+1,0,0],K)K=!1,z={type:"tableBody",start:Object.assign({},N.start),end:Object.assign({},N.end)},F.add(X,0,[["enter",z,Y]]);J=N.type==="tableDelimiterRow"?2:z?3:1}else if(J&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")){if(G=!1,W[2]===0){if(Q[1]!==0)W[0]=W[1],V=l50(F,Y,Q,J,void 0,V),Q=[0,0,0,0];W[2]=X}}else if(N.type==="tableCellDivider")if(G)G=!1;else{if(Q[1]!==0)W[0]=W[1],V=l50(F,Y,Q,J,void 0,V);Q=W,W=[Q[1],X,0,0]}}else if(N.type==="tableHead")K=!0,Z=X;else if(N.type==="tableRow"||N.type==="tableDelimiterRow"){if(Z=X,Q[1]!==0)W[0]=W[1],V=l50(F,Y,Q,J,X,V);else if(W[1]!==0)V=l50(F,Y,W,J,X,V);J=0}else if(J&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller"))W[3]=X}if(Z!==0)XQ4(F,Y,Z,H,z);F.consume(Y.events),X=-1;while(++X<Y.events.length){let L=Y.events[X];if(L[0]==="enter"&&L[1].type==="table")L[1]._align=YQ4(Y.events,X)}return $}function l50($,Y,X,G,J,Q){let W=G===1?"tableHeader":G===2?"tableDelimiter":"tableData",K="tableContent";if(X[0]!==0)Q.end=Object.assign({},NT(Y.events,X[0])),$.add(X[0],0,[["exit",Q,Y]]);let Z=NT(Y.events,X[1]);if(Q={type:W,start:Object.assign({},Z),end:Object.assign({},Z)},$.add(X[1],0,[["enter",Q,Y]]),X[2]!==0){let H=NT(Y.events,X[2]),z=NT(Y.events,X[3]),V={type:"tableContent",start:Object.assign({},H),end:Object.assign({},z)};if($.add(X[2],0,[["enter",V,Y]]),G!==2){let F=Y.events[X[2]],L=Y.events[X[3]];if(F[1].end=Object.assign({},L[1].end),F[1].type="chunkText",F[1].contentType="text",X[3]>X[2]+1){let N=X[2]+1,D=X[3]-X[2]-1;$.add(N,D,[])}}$.add(X[3]+1,0,[["exit",V,Y]])}if(J!==void 0)Q.end=Object.assign({},NT(Y.events,J)),$.add(J,0,[["exit",Q,Y]]),Q=void 0;return Q}function XQ4($,Y,X,G,J){let Q=[],W=NT(Y.events,X);if(J)J.end=Object.assign({},W),Q.push(["exit",J,Y]);G.end=Object.assign({},W),Q.push(["exit",G,Y]),$.add(X+1,0,Q)}function NT($,Y){let X=$[Y],G=X[0]==="enter"?"start":"end";return X[1][G]}var GQ4=V0(()=>{T7();i8()});var JQ4=V0(()=>{GQ4()});function oh0(){return{text:{[91]:ce8}}}function le8($,Y,X){let G=this;return J;function J(Z){if(G.previous!==null||!G._gfmTasklistFirstContentOfListItem)return X(Z);return $.enter("taskListCheck"),$.enter("taskListCheckMarker"),$.consume(Z),$.exit("taskListCheckMarker"),Q}function Q(Z){if(J8(Z))return $.enter("taskListCheckValueUnchecked"),$.consume(Z),$.exit("taskListCheckValueUnchecked"),W;if(Z===88||Z===120)return $.enter("taskListCheckValueChecked"),$.consume(Z),$.exit("taskListCheckValueChecked"),W;return X(Z)}function W(Z){if(Z===93)return $.enter("taskListCheckMarker"),$.consume(Z),$.exit("taskListCheckMarker"),$.exit("taskListCheck"),K;return X(Z)}function K(Z){if(G4(Z))return Y(Z);if(d4(Z))return $.check({tokenize:ie8},Y,X)(Z);return X(Z)}}function ie8($,Y,X){return u4($,G,"whitespace");function G(J){return J===null?X(J):Y(J)}}var ce8;var QQ4=V0(()=>{T7();i8();ce8={name:"tasklistCheck",tokenize:le8}});var WQ4=V0(()=>{QQ4()});function KQ4($){return k50([jh0(),nh0(),rh0($),sh0(),oh0()])}var ZQ4=V0(()=>{wh0();jJ4();tJ4();$Q4();JQ4();WQ4()});function ym($){let Y=this,X=$||ne8,G=Y.data(),J=G.micromarkExtensions||(G.micromarkExtensions=[]),Q=G.fromMarkdownExtensions||(G.fromMarkdownExtensions=[]),W=G.toMarkdownExtensions||(G.toMarkdownExtensions=[]);J.push(KQ4(X)),Q.push(qh0()),W.push(Ph0(X))}var ne8;var UQ4=V0(()=>{NJ4();ZQ4();ne8={}});var HQ4=V0(()=>{UQ4()});function re8($){let Y=$.attempt(this.parser.constructs.contentInitial,G,J),X;return Y;function G(K){if(K===null){$.consume(K);return}return $.enter("lineEnding"),$.consume(K),$.exit("lineEnding"),u4($,Y,"linePrefix")}function J(K){return $.enter("paragraph"),Q(K)}function Q(K){let Z=$.enter("chunkText",{contentType:"text",previous:X});if(X)X.next=Z;return X=Z,W(K)}function W(K){if(K===null){$.exit("chunkText"),$.exit("paragraph"),$.consume(K);return}if(G4(K))return $.consume(K),$.exit("chunkText"),Q;return $.consume(K),W}}var zQ4;var VQ4=V0(()=>{T7();i8();zQ4={tokenize:re8}});function ae8($){let Y=this,X=[],G=0,J,Q,W;return K;function K(E){if(G<X.length){let M=X[G];return Y.containerState=M[1],$.attempt(M[0].continuation,Z,H)(E)}return H(E)}function Z(E){if(G++,Y.containerState._closeFlow){if(Y.containerState._closeFlow=void 0,J)O();let M=Y.events.length,R=M,q;while(R--)if(Y.events[R][0]==="exit"&&Y.events[R][1].type==="chunkFlow"){q=Y.events[R][1].end;break}B(G);let _=M;while(_<Y.events.length)Y.events[_][1].end={...q},_++;return j7(Y.events,R+1,0,Y.events.slice(M)),Y.events.length=_,H(E)}return K(E)}function H(E){if(G===X.length){if(!J)return F(E);if(J.currentConstruct&&J.currentConstruct.concrete)return N(E);Y.interrupt=Boolean(J.currentConstruct&&!J._gfmTableDynamicInterruptHack)}return Y.containerState={},$.check(FQ4,z,V)(E)}function z(E){if(J)O();return B(G),F(E)}function V(E){return Y.parser.lazy[Y.now().line]=G!==X.length,W=Y.now().offset,N(E)}function F(E){return Y.containerState={},$.attempt(FQ4,L,N)(E)}function L(E){return G++,X.push([Y.currentConstruct,Y.containerState]),F(E)}function N(E){if(E===null){if(J)O();B(0),$.consume(E);return}return J=J||Y.parser.flow(Y.now()),$.enter("chunkFlow",{_tokenizer:J,contentType:"flow",previous:Q}),D(E)}function D(E){if(E===null){A($.exit("chunkFlow"),!0),B(0),$.consume(E);return}if(G4(E))return $.consume(E),A($.exit("chunkFlow")),G=0,Y.interrupt=void 0,K;return $.consume(E),D}function A(E,M){let R=Y.sliceStream(E);if(M)R.push(null);if(E.previous=Q,Q)Q.next=E;if(Q=E,J.defineSkip(E.start),J.write(R),Y.parser.lazy[E.start.line]){let q=J.events.length;while(q--)if(J.events[q][1].start.offset<W&&(!J.events[q][1].end||J.events[q][1].end.offset>W))return;let _=Y.events.length,P=_,w,j;while(P--)if(Y.events[P][0]==="exit"&&Y.events[P][1].type==="chunkFlow"){if(w){j=Y.events[P][1].end;break}w=!0}B(G),q=_;while(q<Y.events.length)Y.events[q][1].end={...j},q++;j7(Y.events,P+1,0,Y.events.slice(_)),Y.events.length=q}}function B(E){let M=X.length;while(M-- >E){let R=X[M];Y.containerState=R[1],R[0].exit.call(Y,$)}X.length=E}function O(){J.write([null]),Q=void 0,J=void 0,Y.containerState._closeFlow=void 0}}function se8($,Y,X){return u4($,$.attempt(this.parser.constructs.document,Y,X),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var LQ4,FQ4;var DQ4=V0(()=>{T7();i8();LQ4={tokenize:ae8},FQ4={tokenize:se8}});function oe8($){let Y=this,X=$.attempt(p3,G,$.attempt(this.parser.constructs.flowInitial,J,u4($,$.attempt(this.parser.constructs.flow,J,$.attempt(vh0,J)),"linePrefix")));return X;function G(Q){if(Q===null){$.consume(Q);return}return $.enter("lineEndingBlank"),$.consume(Q),$.exit("lineEndingBlank"),Y.currentConstruct=void 0,X}function J(Q){if(Q===null){$.consume(Q);return}return $.enter("lineEnding"),$.consume(Q),$.exit("lineEnding"),Y.currentConstruct=void 0,X}}var NQ4;var AQ4=V0(()=>{c50();T7();NQ4={tokenize:oe8}});function MQ4($){return{resolveAll:RQ4($==="text"?te8:void 0),tokenize:Y};function Y(X){let G=this,J=this.parser.constructs[$],Q=X.attempt(J,W,K);return W;function W(z){return H(z)?Q(z):K(z)}function K(z){if(z===null){X.consume(z);return}return X.enter("data"),X.consume(z),Z}function Z(z){if(H(z))return X.exit("data"),Q(z);return X.consume(z),Z}function H(z){if(z===null)return!0;let V=J[z],F=-1;if(V)while(++F<V.length){let L=V[F];if(!L.previous||L.previous.call(G,G.previous))return!0}return!1}}}function RQ4($){return Y;function Y(X,G){let J=-1,Q;while(++J<=X.length)if(Q===void 0){if(X[J]&&X[J][1].type==="data")Q=J,J++}else if(!X[J]||X[J][1].type!=="data"){if(J!==Q+2)X[Q][1].end=X[J-1][1].end,X.splice(Q+2,J-Q-2),J=Q+2;Q=void 0}return $?$(X,G):X}}function te8($,Y){let X=0;while(++X<=$.length)if((X===$.length||$[X][1].type==="lineEnding")&&$[X-1][1].type==="data"){let G=$[X-1][1],J=Y.sliceStream(G),Q=J.length,W=-1,K=0,Z;while(Q--){let H=J[Q];if(typeof H==="string"){W=H.length;while(H.charCodeAt(W-1)===32)K++,W--;if(W)break;W=-1}else if(H===-2)Z=!0,K++;else if(H===-1);else{Q++;break}}if(Y._contentTypeTextTrailing&&X===$.length)K=0;if(K){let H={type:X===$.length||Z||K<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:Q?W:G.start._bufferIndex+W,_index:G.start._index+Q,line:G.end.line,column:G.end.column-K,offset:G.end.offset-K},end:{...G.end}};if(G.end={...H.start},G.start.offset===G.end.offset)Object.assign(G,H);else $.splice(X,0,["enter",H,Y],["exit",H,Y]),X+=2}X++}return $}var BQ4,OQ4,EQ4;var th0=V0(()=>{BQ4={resolveAll:RQ4()},OQ4=MQ4("string"),EQ4=MQ4("text")});var eh0={};W8(eh0,{text:()=>J09,string:()=>G09,insideSpan:()=>Q09,flowInitial:()=>Y09,flow:()=>X09,document:()=>ee8,disable:()=>K09,contentInitial:()=>$09,attentionMarkers:()=>W09});var ee8,$09,Y09,X09,G09,J09,Q09,W09,K09;var qQ4=V0(()=>{c50();th0();ee8={[42]:LG,[43]:LG,[45]:LG,[48]:LG,[49]:LG,[50]:LG,[51]:LG,[52]:LG,[53]:LG,[54]:LG,[55]:LG,[56]:LG,[57]:LG,[62]:x50},$09={[91]:fh0},Y09={[-2]:km,[-1]:km,[32]:km},X09={[35]:mh0,[42]:kE,[45]:[d50,kE],[60]:ph0,[61]:d50,[95]:kE,[96]:h50,[126]:h50},G09={[38]:b50,[92]:y50},J09={[-5]:xm,[-4]:xm,[-3]:xm,[33]:ch0,[38]:b50,[42]:Sm,[60]:[Ih0,dh0],[91]:lh0,[92]:[gh0,y50],[93]:SE,[95]:Sm,[96]:Ch0},Q09={null:[Sm,BQ4]},W09={null:[42,95]},K09={null:[]}});function PQ4($,Y,X){let G={_bufferIndex:-1,_index:0,line:X&&X.line||1,column:X&&X.column||1,offset:X&&X.offset||0},J={},Q=[],W=[],K=[],Z=!0,H={attempt:w(_),check:w(P),consume:M,enter:R,exit:q,interrupt:w(P,{interrupt:!0})},z={code:null,containerState:{},defineSkip:B,events:[],now:A,parser:$,previous:null,sliceSerialize:N,sliceStream:D,write:L},V=Y.tokenize.call(z,H),F;if(Y.resolveAll)Q.push(Y);return z;function L(S){if(W=VJ(W,S),O(),W[W.length-1]!==null)return[];return j(Y,0),z.events=PD(Q,z.events,z),z.events}function N(S,I){return U09(D(S),I)}function D(S){return Z09(W,S)}function A(){let{_bufferIndex:S,_index:I,line:v,column:x,offset:y}=G;return{_bufferIndex:S,_index:I,line:v,column:x,offset:y}}function B(S){J[S.line]=S.column,k()}function O(){let S;while(G._index<W.length){let I=W[G._index];if(typeof I==="string"){if(S=G._index,G._bufferIndex<0)G._bufferIndex=0;while(G._index===S&&G._bufferIndex<I.length)E(I.charCodeAt(G._bufferIndex))}else E(I)}}function E(S){Z=void 0,F=S,V=V(S)}function M(S){if(G4(S))G.line++,G.column=1,G.offset+=S===-3?2:1,k();else if(S!==-1)G.column++,G.offset++;if(G._bufferIndex<0)G._index++;else if(G._bufferIndex++,G._bufferIndex===W[G._index].length)G._bufferIndex=-1,G._index++;z.previous=S,Z=!0}function R(S,I){let v=I||{};return v.type=S,v.start=A(),z.events.push(["enter",v,z]),K.push(v),v}function q(S){let I=K.pop();return I.end=A(),z.events.push(["exit",I,z]),I}function _(S,I){j(S,I.from)}function P(S,I){I.restore()}function w(S,I){return v;function v(x,y,d){let u,b,g,p;return Array.isArray(x)?n(x):("tokenize"in x)?n([x]):h(x);function h(X0){return a;function a(Q0){let e=Q0!==null&&X0[Q0],m=Q0!==null&&X0.null,$0=[...Array.isArray(e)?e:e?[e]:[],...Array.isArray(m)?m:m?[m]:[]];return n($0)(Q0)}}function n(X0){if(u=X0,b=0,X0.length===0)return d;return t(X0[b])}function t(X0){return a;function a(Q0){if(p=C(),g=X0,!X0.partial)z.currentConstruct=X0;if(X0.name&&z.parser.constructs.disable.null.includes(X0.name))return K0(Q0);return X0.tokenize.call(I?Object.assign(Object.create(z),I):z,H,s,K0)(Q0)}}function s(X0){return Z=!0,S(g,p),y}function K0(X0){if(Z=!0,p.restore(),++b<u.length)return t(u[b]);return d}}}function j(S,I){if(S.resolveAll&&!Q.includes(S))Q.push(S);if(S.resolve)j7(z.events,I,z.events.length-I,S.resolve(z.events.slice(I),z));if(S.resolveTo)z.events=S.resolveTo(z.events,z)}function C(){let S=A(),I=z.previous,v=z.currentConstruct,x=z.events.length,y=Array.from(K);return{from:x,restore:d};function d(){G=S,z.previous=I,z.currentConstruct=v,z.events.length=x,K=y,k()}}function k(){if(G.line in J&&G.column<2)G.column=J[G.line],G.offset+=J[G.line]-1}}function Z09($,Y){let X=Y.start._index,G=Y.start._bufferIndex,J=Y.end._index,Q=Y.end._bufferIndex,W;if(X===J)W=[$[X].slice(G,Q)];else{if(W=$.slice(X,J),G>-1){let K=W[0];if(typeof K==="string")W[0]=K.slice(G);else W.shift()}if(Q>0)W.push($[J].slice(0,Q))}return W}function U09($,Y){let X=-1,G=[],J;while(++X<$.length){let Q=$[X],W;if(typeof Q==="string")W=Q;else switch(Q){case-5:{W="\r";break}case-4:{W=`
`;break}case-3:{W=`\r
`;break}case-2:{W=Y?" ":"\t";break}case-1:{if(!Y&&J)continue;W=" ";break}default:W=String.fromCharCode(Q)}J=Q===-2,G.push(W)}return G.join("")}var wQ4=V0(()=>{i8()});function $f0($){let G={constructs:k50([eh0,...($||{}).extensions||[]]),content:J(zQ4),defined:[],document:J(LQ4),flow:J(NQ4),lazy:{},string:J(OQ4),text:J(EQ4)};return G;function J(Q){return W;function W(K){return PQ4(G,Q,K)}}}var _Q4=V0(()=>{wh0();VQ4();DQ4();AQ4();th0();qQ4();wQ4()});function Yf0($){while(!f50($));return $}var jQ4=V0(()=>{kh0()});function Xf0(){let $=1,Y="",X=!0,G;return J;function J(Q,W,K){let Z=[],H,z,V,F,L;if(Q=Y+(typeof Q==="string"?Q.toString():new TextDecoder(W||void 0).decode(Q)),V=0,Y="",X){if(Q.charCodeAt(0)===65279)V++;X=void 0}while(V<Q.length){if(TQ4.lastIndex=V,H=TQ4.exec(Q),F=H&&H.index!==void 0?H.index:Q.length,L=Q.charCodeAt(F),!H){Y=Q.slice(V);break}if(L===10&&V===F&&G)Z.push(-3),G=void 0;else{if(G)Z.push(-5),G=void 0;if(V<F)Z.push(Q.slice(V,F)),$+=F-V;switch(L){case 0:{Z.push(65533),$++;break}case 9:{z=Math.ceil($/4)*4,Z.push(-2);while($++<z)Z.push(-1);break}case 10:{Z.push(-4),$=1;break}default:G=!0,$=1}}V=F+1}if(K){if(G)Z.push(-5);if(Y)Z.push(Y);Z.push(null)}return Z}}var TQ4;var IQ4=V0(()=>{TQ4=/[\0\t\n\r]/g});var CQ4=V0(()=>{_Q4();jQ4();IQ4()});function wD($){if(!$||typeof $!=="object")return"";if("position"in $||"type"in $)return SQ4($.position);if("start"in $||"end"in $)return SQ4($);if("line"in $||"column"in $)return Gf0($);return""}function Gf0($){return kQ4($&&$.line)+":"+kQ4($&&$.column)}function SQ4($){return Gf0($&&$.start)+"-"+Gf0($&&$.end)}function kQ4($){return $&&typeof $==="number"?$:1}var Jf0=()=>{};function Qf0($,Y,X){if(Y&&typeof Y==="object")X=Y,Y=void 0;return H09(X)(Yf0($f0(X).document().write(Xf0()($,Y,!0))))}function H09($){let Y={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:Q(R0),autolinkProtocol:w,autolinkEmail:w,atxHeading:Q(Z0),blockQuote:Q(Q0),characterEscape:w,characterReference:w,codeFenced:Q(e),codeFencedFenceInfo:W,codeFencedFenceMeta:W,codeIndented:Q(e,W),codeText:Q(m,W),codeTextData:w,data:w,codeFlowValue:w,definition:Q($0),definitionDestinationString:W,definitionLabelString:W,definitionTitleString:W,emphasis:Q(Y0),hardBreakEscape:Q(F0),hardBreakTrailing:Q(F0),htmlFlow:Q(D0,W),htmlFlowData:w,htmlText:Q(D0,W),htmlTextData:w,image:Q(O0),label:W,link:Q(R0),listItem:Q(f0),listItemValue:F,listOrdered:Q(P0,V),listUnordered:Q(P0),paragraph:Q(p0),reference:h,referenceString:W,resourceDestinationString:W,resourceTitleString:W,setextHeading:Q(Z0),strong:Q(U4),thematicBreak:Q(d1)},exit:{atxHeading:Z(),atxHeadingSequence:R,autolink:Z(),autolinkEmail:a,autolinkProtocol:X0,blockQuote:Z(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:t,characterReferenceMarkerNumeric:t,characterReferenceValue:s,characterReference:K0,codeFenced:Z(A),codeFencedFence:D,codeFencedFenceInfo:L,codeFencedFenceMeta:N,codeFlowValue:j,codeIndented:Z(B),codeText:Z(v),codeTextData:j,data:j,definition:Z(),definitionDestinationString:M,definitionLabelString:O,definitionTitleString:E,emphasis:Z(),hardBreakEscape:Z(k),hardBreakTrailing:Z(k),htmlFlow:Z(S),htmlFlowData:j,htmlText:Z(I),htmlTextData:j,image:Z(y),label:u,labelText:d,lineEnding:C,link:Z(x),listItem:Z(),listOrdered:Z(),listUnordered:Z(),paragraph:Z(),referenceString:n,resourceDestinationString:b,resourceTitleString:g,resource:p,setextHeading:Z(P),setextHeadingLineSequence:_,setextHeadingText:q,strong:Z(),thematicBreak:Z()}};yQ4(Y,($||{}).mdastExtensions||[]);let X={};return G;function G(C0){let n0={type:"root",children:[]},J0={stack:[n0],tokenStack:[],config:Y,enter:K,exit:H,buffer:W,resume:z,data:X},B0=[],Y1=-1;while(++Y1<C0.length)if(C0[Y1][1].type==="listOrdered"||C0[Y1][1].type==="listUnordered")if(C0[Y1][0]==="enter")B0.push(Y1);else{let c1=B0.pop();Y1=J(C0,c1,Y1)}Y1=-1;while(++Y1<C0.length){let c1=Y[C0[Y1][0]];if(xQ4.call(c1,C0[Y1][1].type))c1[C0[Y1][1].type].call(Object.assign({sliceSerialize:C0[Y1][2].sliceSerialize},J0),C0[Y1][1])}if(J0.tokenStack.length>0){let c1=J0.tokenStack[J0.tokenStack.length-1];(c1[1]||vQ4).call(J0,void 0,c1[0])}n0.position={start:_D(C0.length>0?C0[0][1].start:{line:1,column:1,offset:0}),end:_D(C0.length>0?C0[C0.length-2][1].end:{line:1,column:1,offset:0})},Y1=-1;while(++Y1<Y.transforms.length)n0=Y.transforms[Y1](n0)||n0;return n0}function J(C0,n0,J0){let B0=n0-1,Y1=-1,c1=!1,C4,c4,r4,T6;while(++B0<=J0){let p6=C0[B0];switch(p6[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{if(p6[0]==="enter")Y1++;else Y1--;T6=void 0;break}case"lineEndingBlank":{if(p6[0]==="enter"){if(C4&&!T6&&!Y1&&!r4)r4=B0;T6=void 0}break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:T6=void 0}if(!Y1&&p6[0]==="enter"&&p6[1].type==="listItemPrefix"||Y1===-1&&p6[0]==="exit"&&(p6[1].type==="listUnordered"||p6[1].type==="listOrdered")){if(C4){let n6=B0;c4=void 0;while(n6--){let Z1=C0[n6];if(Z1[1].type==="lineEnding"||Z1[1].type==="lineEndingBlank"){if(Z1[0]==="exit")continue;if(c4)C0[c4][1].type="lineEndingBlank",c1=!0;Z1[1].type="lineEnding",c4=n6}else if(Z1[1].type==="linePrefix"||Z1[1].type==="blockQuotePrefix"||Z1[1].type==="blockQuotePrefixWhitespace"||Z1[1].type==="blockQuoteMarker"||Z1[1].type==="listItemIndent");else break}if(r4&&(!c4||r4<c4))C4._spread=!0;C4.end=Object.assign({},c4?C0[c4][1].start:p6[1].end),C0.splice(c4||B0,0,["exit",C4,p6[2]]),B0++,J0++}if(p6[1].type==="listItemPrefix"){let n6={type:"listItem",_spread:!1,start:Object.assign({},p6[1].start),end:void 0};C4=n6,C0.splice(B0,0,["enter",n6,p6[2]]),B0++,J0++,r4=void 0,T6=!0}}}return C0[n0][1]._spread=c1,J0}function Q(C0,n0){return J0;function J0(B0){if(K.call(this,C0(B0),B0),n0)n0.call(this,B0)}}function W(){this.stack.push({type:"fragment",children:[]})}function K(C0,n0,J0){this.stack[this.stack.length-1].children.push(C0),this.stack.push(C0),this.tokenStack.push([n0,J0||void 0]),C0.position={start:_D(n0.start),end:void 0}}function Z(C0){return n0;function n0(J0){if(C0)C0.call(this,J0);H.call(this,J0)}}function H(C0,n0){let J0=this.stack.pop(),B0=this.tokenStack.pop();if(!B0)throw Error("Cannot close `"+C0.type+"` ("+wD({start:C0.start,end:C0.end})+"): it\u2019s not open");else if(B0[0].type!==C0.type)if(n0)n0.call(this,C0,B0[0]);else(B0[1]||vQ4).call(this,C0,B0[0]);J0.position.end=_D(C0.end)}function z(){return $U(this.stack.pop())}function V(){this.data.expectingFirstListItemValue=!0}function F(C0){if(this.data.expectingFirstListItemValue){let n0=this.stack[this.stack.length-2];n0.start=Number.parseInt(this.sliceSerialize(C0),10),this.data.expectingFirstListItemValue=void 0}}function L(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.lang=C0}function N(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.meta=C0}function D(){if(this.data.flowCodeInside)return;this.buffer(),this.data.flowCodeInside=!0}function A(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.value=C0.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function B(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.value=C0.replace(/(\r?\n|\r)$/g,"")}function O(C0){let n0=this.resume(),J0=this.stack[this.stack.length-1];J0.label=n0,J0.identifier=FG(this.sliceSerialize(C0)).toLowerCase()}function E(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.title=C0}function M(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.url=C0}function R(C0){let n0=this.stack[this.stack.length-1];if(!n0.depth){let J0=this.sliceSerialize(C0).length;n0.depth=J0}}function q(){this.data.setextHeadingSlurpLineEnding=!0}function _(C0){let n0=this.stack[this.stack.length-1];n0.depth=this.sliceSerialize(C0).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function w(C0){let J0=this.stack[this.stack.length-1].children,B0=J0[J0.length-1];if(!B0||B0.type!=="text")B0=P1(),B0.position={start:_D(C0.start),end:void 0},J0.push(B0);this.stack.push(B0)}function j(C0){let n0=this.stack.pop();n0.value+=this.sliceSerialize(C0),n0.position.end=_D(C0.end)}function C(C0){let n0=this.stack[this.stack.length-1];if(this.data.atHardBreak){let J0=n0.children[n0.children.length-1];J0.position.end=_D(C0.end),this.data.atHardBreak=void 0;return}if(!this.data.setextHeadingSlurpLineEnding&&Y.canContainEols.includes(n0.type))w.call(this,C0),j.call(this,C0)}function k(){this.data.atHardBreak=!0}function S(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.value=C0}function I(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.value=C0}function v(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.value=C0}function x(){let C0=this.stack[this.stack.length-1];if(this.data.inReference){let n0=this.data.referenceType||"shortcut";C0.type+="Reference",C0.referenceType=n0,delete C0.url,delete C0.title}else delete C0.identifier,delete C0.label;this.data.referenceType=void 0}function y(){let C0=this.stack[this.stack.length-1];if(this.data.inReference){let n0=this.data.referenceType||"shortcut";C0.type+="Reference",C0.referenceType=n0,delete C0.url,delete C0.title}else delete C0.identifier,delete C0.label;this.data.referenceType=void 0}function d(C0){let n0=this.sliceSerialize(C0),J0=this.stack[this.stack.length-2];J0.label=C50(n0),J0.identifier=FG(n0).toLowerCase()}function u(){let C0=this.stack[this.stack.length-1],n0=this.resume(),J0=this.stack[this.stack.length-1];if(this.data.inReference=!0,J0.type==="link"){let B0=C0.children;J0.children=B0}else J0.alt=n0}function b(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.url=C0}function g(){let C0=this.resume(),n0=this.stack[this.stack.length-1];n0.title=C0}function p(){this.data.inReference=void 0}function h(){this.data.referenceType="collapsed"}function n(C0){let n0=this.resume(),J0=this.stack[this.stack.length-1];J0.label=n0,J0.identifier=FG(this.sliceSerialize(C0)).toLowerCase(),this.data.referenceType="full"}function t(C0){this.data.characterReferenceType=C0.type}function s(C0){let n0=this.sliceSerialize(C0),J0=this.data.characterReferenceType,B0;if(J0)B0=I50(n0,J0==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0;else B0=DT(n0);let Y1=this.stack[this.stack.length-1];Y1.value+=B0}function K0(C0){let n0=this.stack.pop();n0.position.end=_D(C0.end)}function X0(C0){j.call(this,C0);let n0=this.stack[this.stack.length-1];n0.url=this.sliceSerialize(C0)}function a(C0){j.call(this,C0);let n0=this.stack[this.stack.length-1];n0.url="mailto:"+this.sliceSerialize(C0)}function Q0(){return{type:"blockquote",children:[]}}function e(){return{type:"code",lang:null,meta:null,value:""}}function m(){return{type:"inlineCode",value:""}}function $0(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Y0(){return{type:"emphasis",children:[]}}function Z0(){return{type:"heading",depth:0,children:[]}}function F0(){return{type:"break"}}function D0(){return{type:"html",value:""}}function O0(){return{type:"image",title:null,url:"",alt:null}}function R0(){return{type:"link",title:null,url:"",children:[]}}function P0(C0){return{type:"list",ordered:C0.type==="listOrdered",start:null,spread:C0._spread,children:[]}}function f0(C0){return{type:"listItem",spread:C0._spread,checked:null,children:[]}}function p0(){return{type:"paragraph",children:[]}}function U4(){return{type:"strong",children:[]}}function P1(){return{type:"text",value:""}}function d1(){return{type:"thematicBreak"}}}function _D($){return{line:$.line,column:$.column,offset:$.offset}}function yQ4($,Y){let X=-1;while(++X<Y.length){let G=Y[X];if(Array.isArray(G))yQ4($,G);else z09($,G)}}function z09($,Y){let X;for(X in Y)if(xQ4.call(Y,X))switch(X){case"canContainEols":{let G=Y[X];if(G)$[X].push(...G);break}case"transforms":{let G=Y[X];if(G)$[X].push(...G);break}case"enter":case"exit":{let G=Y[X];if(G)Object.assign($[X],G);break}}}function vQ4($,Y){if($)throw Error("Cannot close `"+$.type+"` ("+wD({start:$.start,end:$.end})+"): a different token (`"+Y.type+"`, "+wD({start:Y.start,end:Y.end})+") is open");else throw Error("Cannot close document, a token (`"+Y.type+"`, "+wD({start:Y.start,end:Y.end})+") is still open")}var xQ4;var bQ4=V0(()=>{jm();CQ4();Nh0();T50();Jf0();xQ4={}.hasOwnProperty});var hQ4=V0(()=>{bQ4()});function i50($){let Y=this;Y.parser=X;function X(G){return Qf0(G,{...Y.data("settings"),...$,extensions:Y.data("micromarkExtensions")||[],mdastExtensions:Y.data("fromMarkdownExtensions")||[]})}}var fQ4=V0(()=>{hQ4()});var gQ4=V0(()=>{fQ4()});function n50($){let Y=this;Y.compiler=X;function X(G){return Ah0(G,{...Y.data("settings"),...$,extensions:Y.data("toMarkdownExtensions")||[]})}}var mQ4=V0(()=>{S50()});var uQ4=V0(()=>{mQ4()});function Wf0($){if($)throw $}var sQ4=o((wG$,aQ4)=>{var r50=Object.prototype.hasOwnProperty,rQ4=Object.prototype.toString,pQ4=Object.defineProperty,dQ4=Object.getOwnPropertyDescriptor,cQ4=function(Y){if(typeof Array.isArray==="function")return Array.isArray(Y);return rQ4.call(Y)==="[object Array]"},lQ4=function(Y){if(!Y||rQ4.call(Y)!=="[object Object]")return!1;var X=r50.call(Y,"constructor"),G=Y.constructor&&Y.constructor.prototype&&r50.call(Y.constructor.prototype,"isPrototypeOf");if(Y.constructor&&!X&&!G)return!1;var J;for(J in Y);return typeof J>"u"||r50.call(Y,J)},iQ4=function(Y,X){if(pQ4&&X.name==="__proto__")pQ4(Y,X.name,{enumerable:!0,configurable:!0,value:X.newValue,writable:!0});else Y[X.name]=X.newValue},nQ4=function(Y,X){if(X==="__proto__"){if(!r50.call(Y,X))return;else if(dQ4)return dQ4(Y,X).value}return Y[X]};aQ4.exports=function $(){var Y,X,G,J,Q,W,K=arguments[0],Z=1,H=arguments.length,z=!1;if(typeof K==="boolean")z=K,K=arguments[1]||{},Z=2;if(K==null||typeof K!=="object"&&typeof K!=="function")K={};for(;Z<H;++Z)if(Y=arguments[Z],Y!=null){for(X in Y)if(G=nQ4(K,X),J=nQ4(Y,X),K!==J){if(z&&J&&(lQ4(J)||(Q=cQ4(J)))){if(Q)Q=!1,W=G&&cQ4(G)?G:[];else W=G&&lQ4(G)?G:{};iQ4(K,{name:X,newValue:$(z,W,J)})}else if(typeof J<"u")iQ4(K,{name:X,newValue:J})}}return K}});function bm($){if(typeof $!=="object"||$===null)return!1;let Y=Object.getPrototypeOf($);return(Y===null||Y===Object.prototype||Object.getPrototypeOf(Y)===null)&&!(Symbol.toStringTag in $)&&!(Symbol.iterator in $)}function Kf0(){let $=[],Y={run:X,use:G};return Y;function X(...J){let Q=-1,W=J.pop();if(typeof W!=="function")throw TypeError("Expected function as last argument, not "+W);K(null,...J);function K(Z,...H){let z=$[++Q],V=-1;if(Z){W(Z);return}while(++V<J.length)if(H[V]===null||H[V]===void 0)H[V]=J[V];if(J=H,z)oQ4(z,K)(...H);else W(null,...H)}}function G(J){if(typeof J!=="function")throw TypeError("Expected `middelware` to be a function, not "+J);return $.push(J),Y}}function oQ4($,Y){let X;return G;function G(...W){let K=$.length>W.length,Z;if(K)W.push(J);try{Z=$.apply(this,W)}catch(H){let z=H;if(K&&X)throw z;return J(z)}if(!K)if(Z&&Z.then&&typeof Z.then==="function")Z.then(Q,J);else if(Z instanceof Error)J(Z);else Q(Z)}function J(W,...K){if(!X)X=!0,Y(W,...K)}function Q(W){J(null,W)}}var tQ4=()=>{};var wX;var eQ4=V0(()=>{Jf0();wX=class wX extends Error{constructor($,Y,X){super();if(typeof Y==="string")X=Y,Y=void 0;let G="",J={},Q=!1;if(Y)if("line"in Y&&"column"in Y)J={place:Y};else if("start"in Y&&"end"in Y)J={place:Y};else if("type"in Y)J={ancestors:[Y],place:Y.position};else J={...Y};if(typeof $==="string")G=$;else if(!J.cause&&$)Q=!0,G=$.message,J.cause=$;if(!J.ruleId&&!J.source&&typeof X==="string"){let K=X.indexOf(":");if(K===-1)J.ruleId=X;else J.source=X.slice(0,K),J.ruleId=X.slice(K+1)}if(!J.place&&J.ancestors&&J.ancestors){let K=J.ancestors[J.ancestors.length-1];if(K)J.place=K.position}let W=J.place&&"start"in J.place?J.place.start:J.place;this.ancestors=J.ancestors||void 0,this.cause=J.cause||void 0,this.column=W?W.column:void 0,this.fatal=void 0,this.file="",this.message=G,this.line=W?W.line:void 0,this.name=wD(J.place)||"1:1",this.place=J.place||void 0,this.reason=this.message,this.ruleId=J.ruleId||void 0,this.source=J.source||void 0,this.stack=Q&&J.cause&&typeof J.cause.stack==="string"?J.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};wX.prototype.file="";wX.prototype.name="";wX.prototype.reason="";wX.prototype.message="";wX.prototype.stack="";wX.prototype.column=void 0;wX.prototype.line=void 0;wX.prototype.ancestors=void 0;wX.prototype.cause=void 0;wX.prototype.fatal=void 0;wX.prototype.place=void 0;wX.prototype.ruleId=void 0;wX.prototype.source=void 0});var $W4=V0(()=>{eQ4()});import{default as YU}from"path";var YW4=()=>{};import{default as XW4}from"process";var GW4=()=>{};function a50($){return Boolean($!==null&&typeof $==="object"&&"href"in $&&$.href&&"protocol"in $&&$.protocol&&$.auth===void 0)}import{fileURLToPath as JW4}from"url";var QW4=()=>{};class s50{constructor($){let Y;if(!$)Y={};else if(a50($))Y={path:$};else if(typeof $==="string"||V09($))Y={value:$};else Y=$;this.cwd="cwd"in Y?"":XW4.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let X=-1;while(++X<Zf0.length){let J=Zf0[X];if(J in Y&&Y[J]!==void 0&&Y[J]!==null)this[J]=J==="history"?[...Y[J]]:Y[J]}let G;for(G in Y)if(!Zf0.includes(G))this[G]=Y[G]}get basename(){return typeof this.path==="string"?YU.basename(this.path):void 0}set basename($){Hf0($,"basename"),Uf0($,"basename"),this.path=YU.join(this.dirname||"",$)}get dirname(){return typeof this.path==="string"?YU.dirname(this.path):void 0}set dirname($){WW4(this.basename,"dirname"),this.path=YU.join($||"",this.basename)}get extname(){return typeof this.path==="string"?YU.extname(this.path):void 0}set extname($){if(Uf0($,"extname"),WW4(this.dirname,"extname"),$){if($.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if($.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=YU.join(this.dirname,this.stem+($||""))}get path(){return this.history[this.history.length-1]}set path($){if(a50($))$=JW4($);if(Hf0($,"path"),this.path!==$)this.history.push($)}get stem(){return typeof this.path==="string"?YU.basename(this.path,this.extname):void 0}set stem($){Hf0($,"stem"),Uf0($,"stem"),this.path=YU.join(this.dirname||"",$+(this.extname||""))}fail($,Y,X){let G=this.message($,Y,X);throw G.fatal=!0,G}info($,Y,X){let G=this.message($,Y,X);return G.fatal=void 0,G}message($,Y,X){let G=new wX($,Y,X);if(this.path)G.name=this.path+":"+G.name,G.file=this.path;return G.fatal=!1,this.messages.push(G),G}toString($){if(this.value===void 0)return"";if(typeof this.value==="string")return this.value;return new TextDecoder($||void 0).decode(this.value)}}function Uf0($,Y){if($&&$.includes(YU.sep))throw Error("`"+Y+"` cannot be a path: did not expect `"+YU.sep+"`")}function Hf0($,Y){if(!$)throw Error("`"+Y+"` cannot be empty")}function WW4($,Y){if(!$)throw Error("Setting `"+Y+"` requires `path` to be set too")}function V09($){return Boolean($&&typeof $==="object"&&"byteLength"in $&&"byteOffset"in $)}var Zf0;var KW4=V0(()=>{$W4();YW4();GW4();QW4();Zf0=["history","path","basename","stem","extname","dirname"]});var ZW4=V0(()=>{KW4()});var UW4=function($){let G=this.constructor.prototype,J=G[$],Q=function(){return J.apply(Q,arguments)};return Object.setPrototypeOf(Q,G),Q};function zf0($,Y){if(typeof Y!=="function")throw TypeError("Cannot `"+$+"` without `parser`")}function Vf0($,Y){if(typeof Y!=="function")throw TypeError("Cannot `"+$+"` without `compiler`")}function Ff0($,Y){if(Y)throw Error("Cannot call `"+$+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function HW4($){if(!bm($)||typeof $.type!=="string")throw TypeError("Expected node, got `"+$+"`")}function zW4($,Y,X){if(!X)throw Error("`"+$+"` finished async. Use `"+Y+"` instead")}function o50($){return L09($)?$:new s50($)}function L09($){return Boolean($&&typeof $==="object"&&"message"in $&&"messages"in $)}function D09($){return typeof $==="string"||N09($)}function N09($){return Boolean($&&typeof $==="object"&&"byteLength"in $&&"byteOffset"in $)}var t50,F09,Lf0,e50;var VW4=V0(()=>{tQ4();ZW4();t50=U6(sQ4(),1),F09={}.hasOwnProperty;Lf0=class Lf0 extends UW4{constructor(){super("copy");this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Kf0()}copy(){let $=new Lf0,Y=-1;while(++Y<this.attachers.length){let X=this.attachers[Y];$.use(...X)}return $.data(t50.default(!0,{},this.namespace)),$}data($,Y){if(typeof $==="string"){if(arguments.length===2)return Ff0("data",this.frozen),this.namespace[$]=Y,this;return F09.call(this.namespace,$)&&this.namespace[$]||void 0}if($)return Ff0("data",this.frozen),this.namespace=$,this;return this.namespace}freeze(){if(this.frozen)return this;let $=this;while(++this.freezeIndex<this.attachers.length){let[Y,...X]=this.attachers[this.freezeIndex];if(X[0]===!1)continue;if(X[0]===!0)X[0]=void 0;let G=Y.call($,...X);if(typeof G==="function")this.transformers.use(G)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse($){this.freeze();let Y=o50($),X=this.parser||this.Parser;return zf0("parse",X),X(String(Y),Y)}process($,Y){let X=this;return this.freeze(),zf0("process",this.parser||this.Parser),Vf0("process",this.compiler||this.Compiler),Y?G(void 0,Y):new Promise(G);function G(J,Q){let W=o50($),K=X.parse(W);X.run(K,W,function(H,z,V){if(H||!z||!V)return Z(H);let F=z,L=X.stringify(F,V);if(D09(L))V.value=L;else V.result=L;Z(H,V)});function Z(H,z){if(H||!z)Q(H);else if(J)J(z);else PX(Y,"`done` is defined if `resolve` is not"),Y(void 0,z)}}}processSync($){let Y=!1,X;return this.freeze(),zf0("processSync",this.parser||this.Parser),Vf0("processSync",this.compiler||this.Compiler),this.process($,G),zW4("processSync","process",Y),PX(X,"we either bailed on an error or have a tree"),X;function G(J,Q){Y=!0,Wf0(J),X=Q}}run($,Y,X){HW4($),this.freeze();let G=this.transformers;if(!X&&typeof Y==="function")X=Y,Y=void 0;return X?J(void 0,X):new Promise(J);function J(Q,W){PX(typeof Y!=="function","`file` can\u2019t be a `done` anymore, we checked");let K=o50(Y);G.run($,K,Z);function Z(H,z,V){let F=z||$;if(H)W(H);else if(Q)Q(F);else PX(X,"`done` is defined if `resolve` is not"),X(void 0,F,V)}}}runSync($,Y){let X=!1,G;return this.run($,Y,J),zW4("runSync","run",X),PX(G,"we either bailed on an error or have a tree"),G;function J(Q,W){Wf0(Q),G=W,X=!0}}stringify($,Y){this.freeze();let X=o50(Y),G=this.compiler||this.Compiler;return Vf0("stringify",G),HW4($),G($,X)}use($,...Y){let X=this.attachers,G=this.namespace;if(Ff0("use",this.frozen),$===null||$===void 0);else if(typeof $==="function")K($,Y);else if(typeof $==="object")if(Array.isArray($))W($);else Q($);else throw TypeError("Expected usable value, not `"+$+"`");return this;function J(Z){if(typeof Z==="function")K(Z,[]);else if(typeof Z==="object")if(Array.isArray(Z)){let[H,...z]=Z;K(H,z)}else Q(Z);else throw TypeError("Expected usable value, not `"+Z+"`")}function Q(Z){if(!("plugins"in Z)&&!("settings"in Z))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");if(W(Z.plugins),Z.settings)G.settings=t50.default(!0,G.settings,Z.settings)}function W(Z){let H=-1;if(Z===null||Z===void 0);else if(Array.isArray(Z))while(++H<Z.length){let z=Z[H];J(z)}else throw TypeError("Expected a list of plugins, not `"+Z+"`")}function K(Z,H){let z=-1,V=-1;while(++z<X.length)if(X[z][0]===Z){V=z;break}if(V===-1)X.push([Z,...H]);else if(H.length>0){let[F,...L]=H,N=X[V][1];if(bm(N)&&bm(F))F=t50.default(!0,N,F);X[V]=[Z,F,...L]}}}};e50=new Lf0().freeze()});var FW4=V0(()=>{VW4()});function DW4($){return $.type==="text"}function NW4($){return $.type==="paragraph"}function AW4($){return $.type==="strong"}function BW4($){return $.type==="emphasis"}function OW4($){return $.type==="delete"}function EW4($){return $.type==="inlineCode"}function MW4($){return $.type==="code"}function RW4($){return $.type==="link"}function qW4($){return $.type==="blockquote"}function Af0($){return $.type==="list"}function PW4($){return $.type==="listItem"}function wW4($){return $.type==="table"}function _W4($){return $.type==="tableRow"}function jW4($){return $.type==="tableCell"}function TW4($){let Y=[];for(let J of $.children){let Q=[];for(let W of J.children)Q.push($U(W));Y.push(Q)}if(Y.length===0)return"";let X=Y[0],G=Y.slice(1);return mm(X,G)}function mm($,Y){let X=[$,...Y],G=Math.max(...X.map((K)=>K.length));if(G===0)return"";let J=Array.from({length:G},()=>0);for(let K of X)for(let Z=0;Z<G;Z++){let H=(K[Z]||"").length;if(H>J[Z])J[Z]=H}let Q=(K)=>Array.from({length:G},(Z,H)=>(K[H]||"").padEnd(J[H])).join(" | ").trimEnd(),W=[];W.push(Q($)),W.push(J.map((K)=>"-".repeat(K)).join("-|-"));for(let K of Y)W.push(Q(K));return W.join(`
`)}function fm($){if("children"in $&&Array.isArray($.children))return $.children;return[]}function Bf0($){if("value"in $&&typeof $.value==="string")return $.value;return""}function vE($){return e50().use(i50).use(ym).parse($)}function Of0($,Y){return e50().use(n50,Y).use(ym).stringify($)}function UV($){return $U($)}function IW4($){let Y=vE($);return $U(Y)}function Ef0($,Y){if("children"in $&&Array.isArray($.children))$.children=$.children.map((X)=>{let G=Y(X);if(G===null)return null;return Ef0(G,Y)}).filter((X)=>X!==null);return $}function d3($){return{type:"text",value:$}}function CW4($){return{type:"strong",children:$}}function SW4($){return{type:"emphasis",children:$}}function kW4($){return{type:"delete",children:$}}function vW4($){return{type:"inlineCode",value:$}}function xW4($,Y){return{type:"code",value:$,lang:Y}}function yW4($,Y,X){return{type:"link",url:$,children:Y,title:X}}function bW4($){return{type:"blockquote",children:$}}function c3($){return{type:"paragraph",children:$}}function l3($){return{type:"root",children:$}}function Mf0($){return typeof $==="object"&&$!==null&&"type"in $&&$.type==="card"}function um($={}){return{type:"card",title:$.title,subtitle:$.subtitle,imageUrl:$.imageUrl,children:$.children??[]}}function gm($,Y={}){return{type:"text",content:$,style:Y.style}}function AT($){return{type:"image",url:$.url,alt:$.alt}}function BT(){return{type:"divider"}}function OT($){return{type:"section",children:$}}function ET($){return{type:"actions",children:$}}function MT($){return{type:"button",id:$.id,label:$.label,style:$.style,value:$.value,disabled:$.disabled,actionType:$.actionType,callbackUrl:$.callbackUrl}}function RT($){return{type:"link-button",url:$.url,label:$.label,style:$.style}}function qT($){return{type:"field",label:$.label,value:$.value}}function PT($){return{type:"fields",children:$}}function wT($){return{type:"table",headers:$.headers,rows:$.rows,align:$.align}}function _T($){return{type:"link",url:$.url,label:$.label}}function A09($){if(typeof $!=="object"||$===null)return!1;let Y=$;if(typeof Y.$$typeof!=="symbol")return!1;let X=Y.$$typeof.toString();return X.includes("react.element")||X.includes("react.transitional.element")}function Rf0($){if(!A09($)){if(Mf0($))return $;if(typeof $==="object"&&$!==null&&"type"in $)return $;return null}let{type:Y,props:X}=$,G=B09.get(Y);if(!G){if(typeof Y==="string")throw Error(`HTML element <${Y}> is not supported in card elements. Use Card, Text, Section, Actions, Button, Fields, Field, Image, or Divider components instead.`);if(X.children)return Df0(X.children)[0]??null;return null}let J=X.children?Df0(X.children):[],Q=(W)=>W.type!=="card"&&W.type!=="button"&&W.type!=="link-button"&&W.type!=="field"&&W.type!=="select"&&W.type!=="radio_select";switch(G){case"Card":return um({title:X.title,subtitle:X.subtitle,imageUrl:X.imageUrl,children:J.filter(Q)});case"Text":{let W=hm(X.children);return gm(W,{style:X.style})}case"Image":return AT({url:X.url,alt:X.alt});case"Divider":return BT();case"Section":return OT(J.filter(Q));case"Actions":return ET(J.filter((W)=>W.type==="button"||W.type==="link-button"||W.type==="select"||W.type==="radio_select"));case"Button":{let W=hm(X.children);return MT({id:X.id,label:X.label??W,style:X.style,value:X.value,actionType:X.actionType,disabled:X.disabled})}case"LinkButton":{let W=hm(X.children);return RT({url:X.url,label:X.label??W,style:X.style})}case"CardLink":{let W=hm(X.children);return _T({url:X.url,label:X.label??W})}case"Field":return qT({label:X.label,value:X.value});case"Fields":return PT(J.filter((W)=>W.type==="field"));case"Table":return wT({headers:X.headers,rows:X.rows,align:X.align});default:return null}}function Df0($){if($==null)return[];if(Array.isArray($))return $.flatMap(Df0);let Y=Rf0($);if(Y&&typeof Y==="object"&&"type"in Y){if(Y.type==="card")return Y.children;return[Y]}return[]}function hm($){if(typeof $==="string")return $;if(typeof $==="number")return String($);if(Array.isArray($))return $.map(hm).join("");return""}function pm($){let Y=[];if($.title)Y.push(`**${$.title}**`);if($.subtitle)Y.push($.subtitle);for(let X of $.children){let G=$$0(X);if(G)Y.push(G)}return Y.join(`
`)}function $$0($){switch($.type){case"text":return $.content;case"link":return`${$.label} (${$.url})`;case"fields":return $.children.map((Y)=>`${Y.label}: ${Y.value}`).join(`
`);case"actions":return null;case"table":return mm($.headers,$.rows);case"section":return $.children.map((Y)=>$$0(Y)).filter(Boolean).join(`
`);default:return null}}function dm($){return typeof $==="object"&&$!==null&&"type"in $&&$.type==="modal"}function gW4($){let Y=$.filter((X)=>typeof X==="object"&&X!==null&&("type"in X)&&O09.includes(X.type));if(Y.length<$.length)console.warn("[chat] Modal contains unsupported child elements that were ignored");return Y}function jT($){return{type:"modal",callbackId:$.callbackId,callbackUrl:$.callbackUrl,title:$.title,submitLabel:$.submitLabel,closeLabel:$.closeLabel,notifyOnClose:$.notifyOnClose,privateMetadata:$.privateMetadata,children:$.children??[]}}function TT($){return{type:"text_input",id:$.id,label:$.label,placeholder:$.placeholder,initialValue:$.initialValue,multiline:$.multiline,optional:$.optional,maxLength:$.maxLength}}function IT($){if(!$.options||$.options.length===0)throw Error("Select requires at least one option");return{type:"select",id:$.id,label:$.label,placeholder:$.placeholder,options:$.options,initialOption:$.initialOption,optional:$.optional}}function CT($){return{type:"external_select",id:$.id,initialOption:$.initialOption,label:$.label,placeholder:$.placeholder,minQueryLength:$.minQueryLength,optional:$.optional}}function ST($){return{label:$.label,value:$.value,description:$.description}}function kT($){if(!$.options||$.options.length===0)throw Error("RadioSelect requires at least one option");return{type:"radio_select",id:$.id,label:$.label,options:$.options,initialOption:$.initialOption,optional:$.optional}}function E09($){if(typeof $!=="object"||$===null)return!1;let Y=$;if(typeof Y.$$typeof!=="symbol")return!1;let X=Y.$$typeof.toString();return X.includes("react.element")||X.includes("react.transitional.element")}function qf0($){if(!E09($)){if(dm($))return $;if(typeof $==="object"&&$!==null&&"type"in $)return $;return null}let{type:Y,props:X}=$,G=M09.get(Y);if(!G){if(X.children)return Nf0(X.children)[0]??null;return null}let J=X.children?Nf0(X.children):[];switch(G){case"Modal":return jT({callbackId:X.callbackId,title:X.title,submitLabel:X.submitLabel,closeLabel:X.closeLabel,notifyOnClose:X.notifyOnClose,privateMetadata:X.privateMetadata,children:gW4(J)});case"TextInput":return TT({id:X.id,label:X.label,placeholder:X.placeholder,initialValue:X.initialValue,multiline:X.multiline,optional:X.optional,maxLength:X.maxLength});case"Select":return IT({id:X.id,label:X.label,placeholder:X.placeholder,options:J.filter((Q)=>Q!==null&&("label"in Q)&&("value"in Q)&&!("type"in Q)),initialOption:X.initialOption,optional:X.optional});case"ExternalSelect":return CT({id:X.id,initialOption:X.initialOption,label:X.label,placeholder:X.placeholder,minQueryLength:X.minQueryLength,optional:X.optional});case"RadioSelect":return kT({id:X.id,label:X.label,options:J.filter((Q)=>Q!==null&&("label"in Q)&&("value"in Q)&&!("type"in Q)),initialOption:X.initialOption,optional:X.optional});case"SelectOption":return ST({label:X.label,value:X.value,description:X.description});default:return null}}function Nf0($){if($==null)return[];if(Array.isArray($))return $.flatMap(Nf0);let Y=qf0($);if(Y){if(dm(Y))return Y.children;return[Y]}return[]}function Y$0($){return typeof $==="object"&&$!==null&&$.$$typeof===R09}function mW4($){if($==null)return[];if(Array.isArray($))return $.flatMap(mW4);if(Y$0($)){let Y=Pf0($);if(Y)return[Y];return[]}if(typeof $==="object"&&"type"in $)return[$];if(typeof $==="string"||typeof $==="number")return[String($)];return[]}function q09($){return!(("id"in $)||("url"in $)||("label"in $))}function P09($){return"id"in $&&typeof $.id==="string"&&!("url"in $)}function w09($){return"url"in $&&typeof $.url==="string"&&!("id"in $)}function _09($){return"url"in $&&typeof $.url==="string"&&!("id"in $)&&!("alt"in $)&&!("style"in $)}function j09($){return"url"in $&&typeof $.url==="string"}function T09($){return"label"in $&&"value"in $&&typeof $.label==="string"&&typeof $.value==="string"}function I09($){return!(("id"in $)||("url"in $)||("callbackId"in $))&&(("title"in $)||("subtitle"in $)||("imageUrl"in $))}function C09($){return"callbackId"in $&&"title"in $}function S09($){return"id"in $&&"label"in $&&!("options"in $)&&!("value"in $)}function LW4($){return"id"in $&&"label"in $&&!("value"in $)}function k09($){return"id"in $&&"label"in $&&!("value"in $)&&!("children"in $)}function v09($){return"label"in $&&"value"in $&&!("id"in $)}function Pf0($){let{type:Y,props:X,children:G}=$,J=mW4(G);if(Y===gm){let W=q09(X)?X:{style:void 0},K=J.length>0?J.map(String).join(""):String(W.children??"");return gm(K,{style:W.style})}if(Y===OT)return OT(J);if(Y===ET)return ET(J);if(Y===PT)return PT(J);if(Y===MT){if(!P09(X))throw Error("Button requires an 'id' prop");let W=J.length>0?J.map(String).join(""):X.label??"";return MT({id:X.id,label:W,style:X.style,value:X.value,actionType:X.actionType,callbackUrl:X.callbackUrl,disabled:X.disabled})}if(Y===RT){if(!w09(X))throw Error("LinkButton requires a 'url' prop");let W=J.length>0?J.map(String).join(""):X.label??"";return RT({url:X.url,label:W,style:X.style})}if(Y===_T){if(!_09(X))throw Error("CardLink requires a 'url' prop");let W=J.length>0?J.map(String).join(""):X.label??"";return _T({url:X.url,label:W})}if(Y===AT){if(!j09(X))throw Error("Image requires a 'url' prop");return AT({url:X.url,alt:X.alt})}if(Y===qT){if(!T09(X))throw Error("Field requires 'label' and 'value' props");return qT({label:X.label,value:X.value})}if(Y===BT)return BT();if(Y===jT){if(!C09(X))throw Error("Modal requires 'callbackId' and 'title' props");return jT({callbackId:X.callbackId,callbackUrl:X.callbackUrl,title:X.title,submitLabel:X.submitLabel,closeLabel:X.closeLabel,notifyOnClose:X.notifyOnClose,privateMetadata:X.privateMetadata,children:gW4(J)})}if(Y===TT){if(!S09(X))throw Error("TextInput requires 'id' and 'label' props");return TT({id:X.id,label:X.label,placeholder:X.placeholder,initialValue:X.initialValue,multiline:X.multiline,optional:X.optional,maxLength:X.maxLength})}if(Y===IT){if(!LW4(X))throw Error("Select requires 'id' and 'label' props");return IT({id:X.id,label:X.label,placeholder:X.placeholder,initialOption:X.initialOption,optional:X.optional,options:J})}if(Y===CT){if(!k09(X))throw Error("ExternalSelect requires 'id' and 'label' props");return CT({id:X.id,initialOption:X.initialOption,label:X.label,placeholder:X.placeholder,minQueryLength:X.minQueryLength,optional:X.optional})}if(Y===kT){if(!LW4(X))throw Error("RadioSelect requires 'id' and 'label' props");return kT({id:X.id,label:X.label,initialOption:X.initialOption,optional:X.optional,options:J})}if(Y===ST){if(!v09(X))throw Error("SelectOption requires 'label' and 'value' props");return ST({label:X.label,value:X.value,description:X.description})}if(Y===wT){let W=X;return wT({headers:W.headers,rows:W.rows})}let Q=I09(X)?X:{};return um({title:Q.title,subtitle:Q.subtitle,imageUrl:Q.imageUrl,children:J})}function XU($){if(Y$0($)){let Y=Pf0($);if(Y&&typeof Y==="object"&&"type"in Y&&Y.type==="card")return Y}if(typeof $==="object"&&$!==null&&"type"in $&&$.type==="card")return $;return null}function X$0($){if(Y$0($)){let Y=Pf0($);if(Y&&typeof Y==="object"&&"type"in Y&&Y.type==="modal")return Y}if(dm($))return $;return null}function yW($){if(Y$0($))return!0;if(typeof $==="object"&&$!==null&&"$$typeof"in $&&typeof $.$$typeof==="symbol"){let Y=$.$$typeof.toString();return Y.includes("react.element")||Y.includes("react.transitional.element")}return!1}var hW4=class{renderList($,Y,X,G="-"){let J="  ".repeat(Y),Q=$.start??1,W=[];for(let[K,Z]of fm($).entries()){let H=$.ordered?`${Q+K}.`:G,z=!0;for(let V of fm(Z)){if(Af0(V)){W.push(this.renderList(V,Y+1,X,G));continue}let F=X(V);if(!F.trim())continue;if(z)W.push(`${J}${H} ${F}`),z=!1;else W.push(`${J}  ${F}`)}}return W.join(`
`)}defaultNodeToText($,Y){let X=fm($);if(X.length>0)return X.map(Y).join("");return Bf0($)}fromAstWithNodeConverter($,Y){let X=[];for(let G of $.children)X.push(Y(G));return X.join(`

`)}extractPlainText($){return UV(this.toAst($))}fromMarkdown($){return this.fromAst(vE($))}toMarkdown($){return Of0(this.toAst($))}toPlainText($){return this.extractPlainText($)}renderPostable($){if(typeof $==="string")return $;if("raw"in $)return $.raw;if("markdown"in $)return this.fromMarkdown($.markdown);if("ast"in $)return this.fromAst($.ast);if("card"in $)return $.fallbackText||this.cardToFallbackText($.card);if("type"in $&&$.type==="card")return this.cardToFallbackText($);throw Error("Invalid PostableMessage format")}cardToFallbackText($){let Y=[];if($.title)Y.push(`**${$.title}**`);if($.subtitle)Y.push($.subtitle);for(let X of $.children){let G=this.cardChildToFallbackText(X);if(G)Y.push(G)}return Y.join(`
`)}cardChildToFallbackText($){switch($.type){case"text":return $.content;case"fields":return $.children.map((Y)=>`**${Y.label}**: ${Y.value}`).join(`
`);case"actions":return null;case"table":return mm($.headers,$.rows);case"section":return $.children.map((Y)=>this.cardChildToFallbackText(Y)).filter(Boolean).join(`
`);default:return null}}},fW4,B09,O09,M09,R09;var uW4=V0(()=>{jm();HQ4();gQ4();uQ4();FW4();fW4=gm;B09=new Map([[um,"Card"],[gm,"Text"],[AT,"Image"],[BT,"Divider"],[OT,"Section"],[ET,"Actions"],[MT,"Button"],[RT,"LinkButton"],[_T,"CardLink"],[qT,"Field"],[PT,"Fields"],[wT,"Table"]]);O09=["text_input","select","external_select","radio_select","text","fields"];M09=new Map([[jT,"Modal"],[TT,"TextInput"],[IT,"Select"],[CT,"ExternalSelect"],[kT,"RadioSelect"],[ST,"SelectOption"]]);R09=Symbol.for("chat.jsx.element")});var vT,xT;var G$0=V0(()=>{vT=Symbol.for("workflow-serialize"),xT=Symbol.for("workflow-deserialize")});var x09,y09,b09,pW4,h09,f09,dW4=($,Y,X)=>(Y in $)?x09($,Y,{enumerable:!0,configurable:!0,writable:!0,value:X}):$[Y]=X,nW4=($,Y)=>{for(var X in Y||(Y={}))h09.call(Y,X)&&dW4($,X,Y[X]);if(pW4)for(var X of pW4(Y))f09.call(Y,X)&&dW4($,X,Y[X]);return $},rW4=($,Y)=>y09($,b09(Y)),LJ=($,Y)=>{let X=!1,G=!1;for(let J=0;J<Y;J+=1){if($[J]==="\\"&&J+1<$.length&&$[J+1]==="`"){J+=1;continue}if($.substring(J,J+3)==="```"){G=!G,J+=2;continue}!G&&$[J]==="`"&&(X=!X)}return X||G},g09=($,Y)=>{let X=$.substring(Y,Y+3)==="```",G=Y>0&&$.substring(Y-1,Y+2)==="```",J=Y>1&&$.substring(Y-2,Y+1)==="```";return X||G||J},m09=($)=>{let Y=0;for(let X=0;X<$.length;X+=1){if($[X]==="\\"&&X+1<$.length&&$[X+1]==="`"){X+=1;continue}$[X]==="`"&&!g09($,X)&&(Y+=1)}return Y},jD=($,Y)=>{let X=!1,G=!1,J=-1;for(let Q=0;Q<$.length;Q+=1){if($[Q]==="\\"&&Q+1<$.length&&$[Q+1]==="`"){Q+=1;continue}if($.substring(Q,Q+3)==="```"){G=!G,Q+=2;continue}if(!G&&$[Q]==="`")if(X){if(J<Y&&Y<Q)return!0;X=!1,J=-1}else X=!0,J=Q}return!1},u09,p09=($)=>!$||typeof $!="string"||!$.includes(">")?$:$.replace(u09,(Y,X,G,J)=>LJ($,J)?Y:`${X}\\>${G}`),d09,c09,l09,i09,n09,r09,a09,xE,aW4,s09,o09,t09,e09,$19,cW4,TD=($)=>{if(!$)return!1;let Y=$.charCodeAt(0);return Y>=48&&Y<=57||Y>=65&&Y<=90||Y>=97&&Y<=122||Y===95?!0:s09.test($)},Y19=($,Y)=>{let X=1;for(let G=Y-1;G>=0;G-=1)if($[G]==="]")X+=1;else if($[G]==="["&&(X-=1,X===0))return G;return-1},sW4=($,Y)=>{let X=1;for(let G=Y+1;G<$.length;G+=1)if($[G]==="[")X+=1;else if($[G]==="]"&&(X-=1,X===0))return G;return-1},J$0=($,Y)=>{let X=!1,G=!1;for(let J=0;J<$.length&&J<Y;J+=1){if($[J]==="\\"&&$[J+1]==="$"){J+=1;continue}$[J]==="$"&&($[J+1]==="$"?(G=!G,J+=1,X=!1):G||(X=!X))}return X||G},X19=($,Y)=>{for(let X=Y;X<$.length;X+=1){if($[X]===")")return!0;if($[X]===`
`)return!1}return!1},oW4=($,Y)=>{for(let X=Y-1;X>=0;X-=1){if($[X]===")")return!1;if($[X]==="(")return X>0&&$[X-1]==="]"?X19($,Y):!1;if($[X]===`
`)return!1}return!1},G19=($,Y)=>{for(let X=Y-1;X>=0;X-=1){if($[X]===">")return!1;if($[X]==="<"){let G=X+1<$.length?$[X+1]:"";return G>="a"&&G<="z"||G>="A"&&G<="Z"||G==="/"}if($[X]===`
`)return!1}return!1},_f0=($,Y,X)=>{let G=0;for(let Z=Y-1;Z>=0;Z-=1)if($[Z]===`
`){G=Z+1;break}let J=$.length;for(let Z=Y;Z<$.length;Z+=1)if($[Z]===`
`){J=Z;break}let Q=$.substring(G,J),W=0,K=!1;for(let Z of Q)if(Z===X)W+=1;else if(Z!==" "&&Z!=="\t"){K=!0;break}return W>=3&&!K},J19=($,Y,X,G)=>X==="\\"||$.includes("$")&&J$0($,Y)?!0:X!=="*"&&G==="*"?(Y<$.length-2?$[Y+2]:"")!=="*":!!(X==="*"||X&&G&&TD(X)&&TD(G)||(!X||X===" "||X==="\t"||X===`
`)&&(!G||G===" "||G==="\t"||G===`
`)),tW4=($)=>{let Y=0,X=!1,G=$.length;for(let J=0;J<G;J+=1){if($[J]==="`"&&J+2<G&&$[J+1]==="`"&&$[J+2]==="`"){X=!X,J+=2;continue}if(X||$[J]!=="*")continue;let Q=J>0?$[J-1]:"",W=J<G-1?$[J+1]:"";J19($,J,Q,W)||(Y+=1)}return Y},Q19=($,Y,X,G)=>!!(X==="\\"||$.includes("$")&&J$0($,Y)||oW4($,Y)||G19($,Y)||X==="_"||G==="_"||X&&G&&TD(X)&&TD(G)),W19=($)=>{let Y=0,X=!1,G=$.length;for(let J=0;J<G;J+=1){if($[J]==="`"&&J+2<G&&$[J+1]==="`"&&$[J+2]==="`"){X=!X,J+=2;continue}if(X||$[J]!=="_")continue;let Q=J>0?$[J-1]:"",W=J<G-1?$[J+1]:"";Q19($,J,Q,W)||(Y+=1)}return Y},K19=($)=>{let Y=0,X=0,G=!1;for(let J=0;J<$.length;J+=1){if($[J]==="`"&&J+2<$.length&&$[J+1]==="`"&&$[J+2]==="`"){X>=3&&(Y+=Math.floor(X/3)),X=0,G=!G,J+=2;continue}G||($[J]==="*"?X+=1:(X>=3&&(Y+=Math.floor(X/3)),X=0))}return X>=3&&(Y+=Math.floor(X/3)),Y},jf0=($)=>{let Y=0,X=!1;for(let G=0;G<$.length;G+=1){if($[G]==="`"&&G+2<$.length&&$[G+1]==="`"&&$[G+2]==="`"){X=!X,G+=2;continue}X||$[G]==="*"&&G+1<$.length&&$[G+1]==="*"&&(Y+=1,G+=1)}return Y},lW4=($)=>{let Y=0,X=!1;for(let G=0;G<$.length;G+=1){if($[G]==="`"&&G+2<$.length&&$[G+1]==="`"&&$[G+2]==="`"){X=!X,G+=2;continue}X||$[G]==="_"&&G+1<$.length&&$[G+1]==="_"&&(Y+=1,G+=1)}return Y},Z19=($,Y,X)=>{if(!Y||xE.test(Y))return!0;let G=$.substring(0,X).lastIndexOf(`
`),J=G===-1?0:G+1,Q=$.substring(J,X);return aW4.test(Q)&&Y.includes(`
`)?!0:_f0($,X,"*")},U19=($)=>{let Y=$.match(d09);if(!Y)return $;let X=Y[2],G=$.lastIndexOf(Y[1]);return LJ($,G)||jD($,G)||Z19($,X,G)?$:jf0($)%2===1?X.endsWith("*")?`${$}*`:`${$}**`:$},H19=($,Y,X)=>{if(!Y||xE.test(Y))return!0;let G=$.substring(0,X).lastIndexOf(`
`),J=G===-1?0:G+1,Q=$.substring(J,X);return aW4.test(Q)&&Y.includes(`
`)?!0:_f0($,X,"_")},z19=($)=>{let Y=$.match(c09);if(!Y){let J=$.match(e09);if(J){let Q=$.lastIndexOf(J[1]);if(!(LJ($,Q)||jD($,Q))&&lW4($)%2===1)return`${$}_`}return $}let X=Y[2],G=$.lastIndexOf(Y[1]);return LJ($,G)||jD($,G)||H19($,X,G)?$:lW4($)%2===1?`${$}__`:$},V19=($)=>{let Y=!1;for(let X=0;X<$.length;X+=1){if($[X]==="`"&&X+2<$.length&&$[X+1]==="`"&&$[X+2]==="`"){Y=!Y,X+=2;continue}if(!Y&&$[X]==="*"&&$[X-1]!=="*"&&$[X+1]!=="*"&&$[X-1]!=="\\"&&!J$0($,X)){let G=X>0?$[X-1]:"",J=X<$.length-1?$[X+1]:"";if((!G||G===" "||G==="\t"||G===`
`)&&(!J||J===" "||J==="\t"||J===`
`)||G&&J&&TD(G)&&TD(J))continue;return X}}return-1},F19=($)=>{if(!$.match(i09))return $;let Y=V19($);if(Y===-1||LJ($,Y)||jD($,Y))return $;let X=$.substring(Y+1);return!X||xE.test(X)?$:tW4($)%2===1?`${$}*`:$},eW4=($)=>{let Y=!1;for(let X=0;X<$.length;X+=1){if($[X]==="`"&&X+2<$.length&&$[X+1]==="`"&&$[X+2]==="`"){Y=!Y,X+=2;continue}if(!Y&&$[X]==="_"&&$[X-1]!=="_"&&$[X+1]!=="_"&&$[X-1]!=="\\"&&!J$0($,X)&&!oW4($,X)){let G=X>0?$[X-1]:"",J=X<$.length-1?$[X+1]:"";if(G&&J&&TD(G)&&TD(J))continue;return X}}return-1},L19=($)=>{let Y=$.length;for(;Y>0&&$[Y-1]===`
`;)Y-=1;if(Y<$.length){let X=$.slice(0,Y),G=$.slice(Y);return`${X}_${G}`}return`${$}_`},D19=($)=>{if(!$.endsWith("**"))return null;let Y=$.slice(0,-2);if(jf0(Y)%2!==1)return null;let X=Y.indexOf("**"),G=eW4(Y);return X!==-1&&G!==-1&&X<G?`${Y}_**`:null},N19=($)=>{if(!$.match(n09))return $;let Y=eW4($);if(Y===-1)return $;let X=$.substring(Y+1);if(!X||xE.test(X)||LJ($,Y)||jD($,Y))return $;if(W19($)%2===1){let G=D19($);return G!==null?G:L19($)}return $},A19=($)=>{let Y=jf0($),X=tW4($);return Y%2===0&&X%2===0},B19=($,Y,X)=>!Y||xE.test(Y)||LJ($,X)||jD($,X)?!0:_f0($,X,"*"),O19=($)=>{if(t09.test($))return $;let Y=$.match(l09);if(!Y)return $;let X=Y[2],G=$.lastIndexOf(Y[1]);return B19($,X,G)?$:K19($)%2===1?A19($)?$:`${$}***`:$},E19,M19=($)=>{let Y=$.match(E19);return!Y||Y.index===void 0||LJ($,Y.index)?$:$.substring(0,Y.index).trimEnd()},R19=($)=>!$.match(o09)||$.includes(`
`)?null:$.endsWith("``")&&!$.endsWith("```")?`${$}\``:$,q19=($)=>($.match(/```/g)||[]).length%2===1,P19=($)=>{let Y=R19($);if(Y!==null)return Y;let X=$.match(r09);if(X&&!q19($)){let G=X[2];if(!G||xE.test(G))return $;if(m09($)%2===1)return`${$}\``}return $},$24=($,Y)=>Y>=2&&$.substring(Y-2,Y+1)==="```"||Y>=1&&$.substring(Y-1,Y+2)==="```"||Y<=$.length-3&&$.substring(Y,Y+3)==="```",w19=($)=>{let Y=0,X=!1;for(let G=0;G<$.length-1;G+=1)$[G]==="`"&&!$24($,G)&&(X=!X),!X&&$[G]==="$"&&$[G+1]==="$"&&(Y+=1,G+=1);return Y},_19=($)=>{let Y=0,X=!1;for(let G=0;G<$.length;G+=1){if($[G]==="\\"){G+=1;continue}if($[G]==="`"&&!$24($,G)){X=!X;continue}!X&&$[G]==="$"&&(G+1<$.length&&$[G+1]==="$"?G+=1:Y+=1)}return Y},j19=($)=>{if($.endsWith("$")&&!$.endsWith("$$"))return`${$}$`;let Y=$.indexOf("$$");return Y!==-1&&$.indexOf(`
`,Y)!==-1&&!$.endsWith(`
`)?`${$}
$$`:`${$}$$`},T19=($)=>w19($)%2===0?$:j19($),I19=($)=>_19($)%2===1?`${$}$`:$,C19=($,Y,X)=>{if($.substring(Y+2).includes(")"))return null;let G=Y19($,Y);if(G===-1||LJ($,G))return null;let J=G>0&&$[G-1]==="!",Q=J?G-1:G,W=$.substring(0,Q);if(J)return W;let K=$.substring(G+1,Y);return X==="text-only"?`${W}${K}`:`${W}[${K}](streamdown:incomplete-link)`},iW4=($,Y)=>{for(let X=0;X<Y;X++)if($[X]==="["&&!LJ($,X)){if(X>0&&$[X-1]==="!")continue;let G=sW4($,X);if(G===-1)return X;if(G+1<$.length&&$[G+1]==="("){let J=$.indexOf(")",G+2);J!==-1&&(X=J)}}return Y},S19=($,Y,X)=>{let G=Y>0&&$[Y-1]==="!",J=G?Y-1:Y;if(!$.substring(Y+1).includes("]")){let Q=$.substring(0,J);if(G)return Q;if(X==="text-only"){let W=iW4($,Y);return $.substring(0,W)+$.substring(W+1)}return`${$}](streamdown:incomplete-link)`}if(sW4($,Y)===-1){let Q=$.substring(0,J);if(G)return Q;if(X==="text-only"){let W=iW4($,Y);return $.substring(0,W)+$.substring(W+1)}return`${$}](streamdown:incomplete-link)`}return null},Y24=($,Y="protocol")=>{let X=$.lastIndexOf("](");if(X!==-1&&!LJ($,X)){let G=C19($,X,Y);if(G!==null)return G}for(let G=$.length-1;G>=0;G-=1)if($[G]==="["&&!LJ($,G)){let J=S19($,G,Y);if(J!==null)return J}return $},k19,v19,x19,y19,b19=($)=>{if(!$||typeof $!="string")return $;let Y=$.lastIndexOf(`
`);if(Y===-1)return $;let X=$.substring(Y+1),G=$.substring(0,Y),J=X.trim();if(k19.test(J)&&!X.match(v19)){let Q=G.split(`
`).at(-1);if(Q&&Q.trim().length>0)return`${$}\u200B`}if(x19.test(J)&&!X.match(y19)){let Q=G.split(`
`).at(-1);if(Q&&Q.trim().length>0)return`${$}\u200B`}return $},h19,f19=($)=>!$||typeof $!="string"||!$.includes("~")?$:$.replace(h19,(Y,X)=>LJ($,X)?Y:"\\~"),g19=($)=>{var Y,X;let G=$.match(a09);if(G){let J=G[2];if(!J||xE.test(J))return $;let Q=$.lastIndexOf(G[1]);if(LJ($,Q)||jD($,Q))return $;if(((Y=$.match(cW4))==null?void 0:Y.length)%2===1)return`${$}~~`}else{let J=$.match($19);if(J){let Q=$.lastIndexOf(J[0].slice(0,2));if(LJ($,Q)||jD($,Q))return $;if(((X=$.match(cW4))==null?void 0:X.length)%2===1)return`${$}~`}}return $},wf0=($)=>$!==!1,m19=($)=>$===!0,FJ,u19,p19=($)=>{var Y;let X=(Y=$==null?void 0:$.linkMode)!=null?Y:"protocol";return u19.filter(({handler:G,optionKey:J})=>G.name==="links"?wf0($==null?void 0:$.links)||wf0($==null?void 0:$.images):G.name==="inlineKatex"?m19($==null?void 0:$.inlineKatex):wf0($==null?void 0:$[J])).map(({handler:G,earlyReturn:J})=>G.name==="links"?{handler:rW4(nW4({},G),{handle:(Q)=>Y24(Q,X)}),earlyReturn:X==="protocol"?J:void 0}:{handler:G,earlyReturn:J})},d19=($,Y)=>{var X;if(!$||typeof $!="string")return $;let G=$.endsWith(" ")&&!$.endsWith("  ")?$.slice(0,-1):$,J=p19(Y),Q=((X=Y==null?void 0:Y.handlers)!=null?X:[]).map((K)=>{var Z;return{handler:rW4(nW4({},K),{priority:(Z=K.priority)!=null?Z:FJ.DEFAULT}),earlyReturn:void 0}}),W=[...J,...Q].sort((K,Z)=>{var H,z;return((H=K.handler.priority)!=null?H:0)-((z=Z.handler.priority)!=null?z:0)});for(let{handler:K,earlyReturn:Z}of W)if(G=K.handle(G),Z!=null&&Z(G))return G;return G},cm;var X24=V0(()=>{x09=Object.defineProperty,y09=Object.defineProperties,b09=Object.getOwnPropertyDescriptors,pW4=Object.getOwnPropertySymbols,h09=Object.prototype.hasOwnProperty,f09=Object.prototype.propertyIsEnumerable,u09=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,d09=/(\*\*)([^*]*\*?)$/,c09=/(__)([^_]*?)$/,l09=/(\*\*\*)([^*]*?)$/,i09=/(\*)([^*]*?)$/,n09=/(_)([^_]*?)$/,r09=/(`)([^`]*?)$/,a09=/(~~)([^~]*?)$/,xE=/^[\s_~*`]*$/,aW4=/^[\s]*[-*+][\s]+$/,s09=/[\p{L}\p{N}_]/u,o09=/^```[^`\n]*```?$/,t09=/^\*{4,}$/,e09=/(__)([^_]+)_$/,$19=/(~~)([^~]+)~$/,cW4=/~~/g,E19=/<[a-zA-Z/][^>]*$/,k19=/^-{1,2}$/,v19=/^[\s]*-{1,2}[\s]+$/,x19=/^={1,2}$/,y19=/^[\s]*={1,2}[\s]+$/,h19=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),FJ={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},u19=[{handler:{name:"singleTilde",handle:f19,priority:FJ.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:p09,priority:FJ.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:M19,priority:FJ.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:b19,priority:FJ.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Y24,priority:FJ.LINKS},optionKey:"links",earlyReturn:($)=>$.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:O19,priority:FJ.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:U19,priority:FJ.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:z19,priority:FJ.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:F19,priority:FJ.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:N19,priority:FJ.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:P19,priority:FJ.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:g19,priority:FJ.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:T19,priority:FJ.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:I19,priority:FJ.INLINE_KATEX},optionKey:"inlineKatex"}],cm=d19});var q24={};W8(q24,{walkAst:()=>Ef0,toPlainText:()=>UV,toModalElement:()=>e49,toCardElement:()=>t49,toAiMessages:()=>n19,text:()=>d3,tableToAscii:()=>TW4,tableElementToAscii:()=>mm,strong:()=>CW4,stringifyMarkdown:()=>Of0,strikethrough:()=>kW4,root:()=>l3,reviver:()=>B24,parseMarkdown:()=>vE,paragraph:()=>c3,markdownToPlainText:()=>IW4,link:()=>yW4,isTextNode:()=>DW4,isTableRowNode:()=>_W4,isTableNode:()=>wW4,isTableCellNode:()=>jW4,isStrongNode:()=>AW4,isPostableObject:()=>hf0,isParagraphNode:()=>NW4,isModalElement:()=>Y69,isListNode:()=>Af0,isListItemNode:()=>PW4,isLinkNode:()=>RW4,isJSX:()=>r49,isInlineCodeNode:()=>EW4,isEmphasisNode:()=>BW4,isDeleteNode:()=>OW4,isCodeNode:()=>MW4,isCardElement:()=>n49,isBlockquoteNode:()=>qW4,inlineCode:()=>vW4,getNodeValue:()=>Bf0,getNodeChildren:()=>fm,getEmoji:()=>yE,fromReactModalElement:()=>$69,fromReactElement:()=>l49,fromFullStream:()=>yf0,emphasis:()=>SW4,emoji:()=>y49,deriveChannelId:()=>N24,defaultEmojiResolver:()=>mf0,createEmoji:()=>R24,convertEmojiPlaceholders:()=>x49,codeBlock:()=>xW4,cardChildToFallbackText:()=>g49,blockquote:()=>bW4,ThreadImpl:()=>U$0,ThreadHistoryCache:()=>gf0,TextInput:()=>K69,Table:()=>o49,THREAD_STATE_TTL_MS:()=>nm,StreamingPlan:()=>k49,StreamingMarkdownRenderer:()=>A24,SelectOption:()=>W69,Select:()=>Q69,Section:()=>s49,RateLimitError:()=>G49,RadioSelect:()=>J69,Plan:()=>S49,NotImplementedError:()=>ff0,Modal:()=>G69,MessageHistoryCache:()=>C49,Message:()=>_X,LockError:()=>D24,LinkButton:()=>a49,Image:()=>i49,Fields:()=>c49,Field:()=>d49,ExternalSelect:()=>X69,EmojiResolver:()=>M24,Divider:()=>p49,DEFAULT_EMOJI_MAP:()=>E24,ConsoleLogger:()=>kf0,ChatError:()=>o2,Chat:()=>I49,ChannelImpl:()=>yT,CardText:()=>u49,CardLink:()=>m49,Card:()=>f49,Button:()=>h49,BaseFormatConverter:()=>hW4,Actions:()=>b49});function l19($){return c19.some((Y)=>$===Y||$.startsWith(Y))}async function i19($){if($.type==="image"){if($.fetchData)try{let Y=await $.fetchData(),X=$.mimeType??"image/png";return{type:"file",data:`data:${X};base64,${Y.toString("base64")}`,mediaType:X,filename:$.name}}catch(Y){return console.error("toAiMessages: failed to fetch image data",Y),null}return null}if($.type==="file"&&$.mimeType&&l19($.mimeType)){if($.fetchData)try{let Y=await $.fetchData();return{type:"file",data:`data:${$.mimeType};base64,${Y.toString("base64")}`,filename:$.name,mediaType:$.mimeType}}catch(Y){return console.error("toAiMessages: failed to fetch file data",Y),null}return null}return null}async function n19($,Y){let X=Y?.includeNames??!1,G=Y?.transformMessage,J=Y?.onUnsupportedAttachment??((Z)=>{console.warn(`toAiMessages: unsupported attachment type "${Z.type}"${Z.name?` (${Z.name})`:""} \u2014 skipped`)}),W=[...$].sort((Z,H)=>(Z.metadata.dateSent?.getTime()??0)-(H.metadata.dateSent?.getTime()??0)).filter((Z)=>Z.text.trim());return(await Promise.all(W.map(async(Z)=>{let H=Z.author.isMe?"assistant":"user",z=X&&H==="user"?`[${Z.author.userName}]: ${Z.text}`:Z.text;if(Z.links&&Z.links.length>0){let F=Z.links.map((L)=>{let N=L.fetchMessage?[`[Embedded message: ${L.url}]`]:[L.url];if(L.title)N.push(`Title: ${L.title}`);if(L.description)N.push(`Description: ${L.description}`);if(L.siteName)N.push(`Site: ${L.siteName}`);return N.join(`
`)}).join(`

`);z+=`

Links:
${F}`}let V;if(H==="user"){let F=[];for(let L of Z.attachments??[]){let N=await i19(L);if(N)F.push(N);else if(L.type==="video"||L.type==="audio")J(L,Z)}if(F.length>0)V={role:H,content:[{type:"text",text:z},...F]};else V={role:H,content:z}}else V={role:H,content:z};if(G)return{result:await G(V,Z),source:Z};return{result:V,source:Z}}))).filter((Z)=>Z.result!=null).map((Z)=>Z.result)}function a19($){return`${Sf0}${$}`}function s19($){if(!$?.startsWith(Sf0))return{callbackToken:void 0};return{callbackToken:$.slice(Sf0.length)}}function o19(){return crypto.randomUUID().replace(/-/g,"").slice(0,16)}async function t19($,Y){return{type:"actions",children:await Promise.all($.children.map(async(X)=>{if(X.type!=="button"||!X.callbackUrl)return X;let G=o19(),J={url:X.callbackUrl,originalValue:X.value};return await Y.set(`${H24}${G}`,J,r19),{type:"button",id:X.id,label:X.label,style:X.style,disabled:X.disabled,value:a19(G),actionType:X.actionType}}))}}function z24($){for(let Y of $){if(Y.type==="actions"){for(let X of Y.children)if(X.type==="button"&&X.callbackUrl)return!0}if(Y.type==="section"&&"children"in Y&&z24(Y.children))return!0}return!1}async function V24($,Y){let X=[];for(let G of $)if(G.type==="actions")X.push(await t19(G,Y));else if(G.type==="section"&&"children"in G)X.push({...G,children:await V24(G.children,Y)});else X.push(G);return X}async function K$0($,Y){if(!z24($.children))return $;return{...$,children:await V24($.children,Y)}}async function e19($,Y){let X=await Y.get(`${H24}${$}`);if(!X)return null;if(typeof X==="string")return{url:X};return X}async function G24($,Y){try{let X=await fetch($,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Y)});if(!X.ok)return{error:Error(`Callback URL returned ${X.status}: ${await X.text().catch(()=>"")}`),status:X.status};return{status:X.status}}catch(X){return{error:X}}}function $49($){Z$0=$}function im(){if(!Z$0)throw Error("No Chat singleton registered. Call chat.registerSingleton() first.");return Z$0}function Y49(){return Z$0!==null}async function*yf0($){let Y=!1,X=!1;for await(let G of $){if(typeof G==="string"){yield G;continue}if(G===null||typeof G!=="object"||!("type"in G))continue;let J=G;if(X49.has(J.type)){yield G;continue}let Q=J.text??J.delta??J.textDelta;if(J.type==="text-delta"&&typeof Q==="string"){if(Y&&X)yield`

`;Y=!1,X=!0,yield Q}else if(J.type==="finish-step")Y=!0}}function Tf0($,Y){F24.set($,Y)}function hf0($){return typeof $==="object"&&$!==null&&$.$$typeof===bf0}async function L24($,Y,X,G,J){let Q=(W)=>({adapter:Y,logger:J,messageId:W.id,threadId:W.threadId??X});if($.isSupported(Y)&&Y.postObject){let W=await Y.postObject(X,$.kind,$.getPostData());$.onPosted(Q(W))}else{let W=await G(X,$.getFallbackText());$.onPosted(Q(W))}}function J49($){return"adapterName"in $&&!("adapter"in $)}function Q49($){return $!==null&&typeof $==="object"&&Symbol.asyncIterator in $}function N24($,Y){return $.channelIdFromThreadId(Y)}function W49($){if(typeof $==="string")return{plainText:$,formatted:l3([c3([d3($)])]),attachments:[]};if("raw"in $)return{plainText:$.raw,formatted:l3([c3([d3($.raw)])]),attachments:$.attachments||[]};if("markdown"in $){let Y=vE($.markdown);return{plainText:UV(Y),formatted:Y,attachments:$.attachments||[]}}if("ast"in $)return{plainText:UV($.ast),formatted:$.ast,attachments:$.attachments||[]};if("card"in $){let Y=$.fallbackText||pm($.card);return{plainText:Y,formatted:l3([c3([d3(Y)])]),attachments:[]}}if("type"in $&&$.type==="card"){let Y=pm($);return{plainText:Y,formatted:l3([c3([d3(Y)])]),attachments:[]}}throw Error("Invalid PostableMessage format")}function Q24($){return cm($).length<=$.length}function Z49($){if($.length===0||Q24($))return $;for(let Y=$.length-1;Y>=0;Y--)if(K49.has($[Y])){while(Y>0&&$[Y-1]===$[Y])Y--;let X=$.slice(0,Y);if(Q24(X))return X}return""}function If0($){let Y=!1;for(let X of $.split(`
`)){let G=X.trimStart();if(G.startsWith("```")||G.startsWith("~~~"))Y=!Y}return Y}function W24($){let Y=$.endsWith(`
`),X=$.split(`
`);if(!Y&&X.length>0)X.pop();if(Y&&X.length>0&&X.at(-1)==="")X.pop();let G=0,J=!1;for(let Z=X.length-1;Z>=0;Z--){let H=X[Z].trim();if(H==="")break;if(xf0.test(H)){J=!0;break}if(vf0.test(H))G++;else break}if(J||G===0)return $;let Q=X.length-G,W=X.slice(0,Q),K=W.join(`
`);if(W.length>0)K+=`
`;return K}function U49($,Y=!1){let X=$.endsWith(`
`),G=$.split(`
`);if(X&&G.length>0&&G.at(-1)==="")G.pop();let J=[],Q=!1,W=!1;for(let Z=0;Z<G.length;Z++){let H=G[Z].trim();if(!Q&&(H.startsWith("```")||H.startsWith("~~~"))){W=!W,J.push(G[Z]);continue}if(W){J.push(G[Z]);continue}let z=H!==""&&(vf0.test(H)||xf0.test(H));if(z&&!Q){let V=!1;for(let F=Z;F<G.length;F++){let L=G[F].trim();if(xf0.test(L)){V=!0;break}if(L===""||!vf0.test(L))break}if(V)J.push("```"),Q=!0}else if(!z&&Q)J.push("```"),Q=!1;J.push(G[Z])}if(Q&&Y)J.push("```");let K=J.join(`
`);if(X)K+=`
`;return K}function H49($){return"adapterName"in $&&!("adapter"in $)}function z49($){return $!==null&&typeof $==="object"&&Symbol.asyncIterator in $}function V49($){if(typeof $==="string")return{plainText:$,formatted:l3([c3([d3($)])]),attachments:[]};if("raw"in $)return{plainText:$.raw,formatted:l3([c3([d3($.raw)])]),attachments:$.attachments||[]};if("markdown"in $){let Y=vE($.markdown);return{plainText:UV(Y),formatted:Y,attachments:$.attachments||[]}}if("ast"in $)return{plainText:UV($.ast),formatted:$.ast,attachments:$.attachments||[]};if("card"in $){let Y=$.fallbackText||pm($.card);return{plainText:Y,formatted:l3([c3([d3(Y)])]),attachments:[]}}if("type"in $&&$.type==="card"){let Y=pm($);return{plainText:Y,formatted:l3([c3([d3(Y)])]),attachments:[]}}throw Error("Invalid PostableMessage format")}function B24($,Y){if(Y&&typeof Y==="object"&&"_type"in Y){let X=Y;if(X._type==="chat:Thread")return U$0.fromJSON(Y);if(X._type==="chat:Channel")return yT.fromJSON(Y);if(X._type==="chat:Message")return _X.fromJSON(Y)}return Y}function Cf0($){return typeof $==="object"&&$!==null&&$[O24]===!0}function Q$0($){return`${D49}${$}`}function M49($){if($===void 0)return;if(typeof $==="number")return $;let Y=B49.exec($);if(!Y)throw Error(`Invalid duration: ${$} (expected number of ms, or "<n>[smhd]")`);let X=Number.parseInt(Y[1],10),G=Y[2];return X*O49[G]}function R49($){return new Promise((Y)=>setTimeout(Y,$))}function W$0($){if(!$)return"";if(Array.isArray($))return $.join(" ").trim();if(typeof $==="string")return $;if("markdown"in $)return UV(vE($.markdown));if("ast"in $)return UV($.ast);return""}function yE($){let Y=U24.get($);if(!Y)Y=Object.freeze({name:$,toString:()=>`{{emoji:${$}}}`,toJSON:()=>`{{emoji:${$}}}`}),U24.set($,Y);return Y}function x49($,Y,X=mf0){return $.replace(v49,(G,J)=>{switch(Y){case"slack":return`:${X.toSlack(J)}:`;case"gchat":return X.toGChat(J);case"teams":return X.toGChat(J);case"discord":return X.toDiscord(J);case"messenger":return X.toGChat(J);case"github":return X.toGChat(J);case"linear":return X.toGChat(J);case"whatsapp":return X.toGChat(J);default:return X.toGChat(J)}})}function R24($){let Y=["thumbs_up","thumbs_down","clap","wave","pray","muscle","ok_hand","point_up","point_down","point_left","point_right","raised_hands","shrug","facepalm","heart","smile","laugh","thinking","sad","cry","angry","love_eyes","cool","wink","surprised","worried","confused","neutral","sleeping","sick","mind_blown","relieved","grimace","rolling_eyes","hug","zany","check","x","question","exclamation","warning","stop","info","100","fire","star","sparkles","lightning","boom","eyes","green_circle","yellow_circle","red_circle","blue_circle","white_circle","black_circle","rocket","party","confetti","balloon","gift","trophy","medal","lightbulb","gear","wrench","hammer","bug","link","lock","unlock","key","pin","memo","clipboard","calendar","clock","hourglass","bell","megaphone","speech_bubble","email","inbox","outbox","package","folder","file","chart_up","chart_down","coffee","pizza","beer","arrow_up","arrow_down","arrow_left","arrow_right","refresh","sun","cloud","rain","snow","rainbow"],X={custom:(G)=>yE(G)};for(let G of Y)X[G]=yE(G);if($){for(let G of Object.keys($))X[G]=yE(G);mf0.extend($)}return X}var c19,Sf0="__cb:",H24="chat:callback:",r19=2592000000,Z$0=null,X49,F24,_X,bf0,o2,G49,D24,ff0,kf0=class ${prefix;level;constructor(Y="info",X="chat-sdk"){this.level=Y,this.prefix=X}shouldLog(Y){let X=["debug","info","warn","error","silent"];return X.indexOf(Y)>=X.indexOf(this.level)}child(Y){return new $(this.level,`${this.prefix}:${Y}`)}debug(Y,...X){if(this.shouldLog("debug"))console.debug(`[${this.prefix}] ${Y}`,...X)}info(Y,...X){if(this.shouldLog("info"))console.info(`[${this.prefix}] ${Y}`,...X)}warn(Y,...X){if(this.shouldLog("warn"))console.warn(`[${this.prefix}] ${Y}`,...X)}error(Y,...X){if(this.shouldLog("error"))console.error(`[${this.prefix}] ${Y}`,...X)}},nm=2592000000,J24="channel-state:",yT,A24=class{accumulated="";dirty=!0;cachedRender="";finished=!1;fenceToggles=0;incompleteLine="";options;constructor($={}){this.options={wrapTablesForAppend:$.wrapTablesForAppend??!0}}push($){this.accumulated+=$,this.dirty=!0,this.incompleteLine+=$;let Y=this.incompleteLine.split(`
`);this.incompleteLine=Y.pop()??"";for(let X of Y){let G=X.trimStart();if(G.startsWith("```")||G.startsWith("~~~"))this.fenceToggles++}}isAccumulatedInsideFence(){let $=this.fenceToggles%2===1,Y=this.incompleteLine.trimStart();if(Y.startsWith("```")||Y.startsWith("~~~"))$=!$;return $}render(){if(!this.dirty)return this.cachedRender;if(this.dirty=!1,this.finished)return this.cachedRender=cm(this.accumulated),this.cachedRender;if(this.isAccumulatedInsideFence())return this.cachedRender=cm(this.accumulated),this.cachedRender;let $=W24(this.accumulated);return this.cachedRender=cm($),this.cachedRender}getCommittableText(){if(this.finished)return this.formatAppendOnlyText(this.accumulated,!0);let $=this.accumulated;if($.length>0&&!$.endsWith(`
`)){let G=$.lastIndexOf(`
`),J=G>=0?$.slice(0,G+1):"";if(If0(J))return this.formatAppendOnlyText($);$=J}if(If0($))return this.formatAppendOnlyText($);let Y=W24($),X=this.formatAppendOnlyText(Y);if(If0(X))return X;return Z49(X)}getText(){return this.accumulated}finish(){return this.finished=!0,this.dirty=!0,this.render()}formatAppendOnlyText($,Y=!1){if(!this.options.wrapTablesForAppend)return $;return U49($,Y)}},K49,vf0,xf0,K24="thread-state:",U$0,F49=100,L49=604800000,Z24="msg-history:",gf0=class{state;maxMessages;ttlMs;constructor($,Y){this.state=$,this.maxMessages=Y?.maxMessages??F49,this.ttlMs=Y?.ttlMs??L49}async append($,Y){let X=`${Z24}${$}`,G=Y.toJSON();G.raw=null,await this.state.appendToList(X,G,{maxLength:this.maxMessages,ttlMs:this.ttlMs})}async getMessages($,Y){let X=`${Z24}${$}`,G=await this.state.getList(X);return(Y&&G.length>Y?G.slice(G.length-Y):G).map((Q)=>_X.fromJSON(Q))}},D49="transcripts:user:",N49=200,A49=50,B49,O24="__chatSdkTombstone",O49,E49=class{state;maxPerUser;retentionMs;storeFormatted;constructor($,Y){this.state=$,this.maxPerUser=Y.maxPerUser??N49,this.retentionMs=M49(Y.retention),this.storeFormatted=Y.storeFormatted??!1}async append($,Y,X){let G=Y instanceof _X,J,Q,W;if(G){if(J=Y.userKey,Q="user",W=Y.id,!J)return null}else if(J=X?.userKey,Q=Y.role,W=Y.platformMessageId,!J)throw Error("transcripts.append: options.userKey is required when appending an AppendInput");let K={id:crypto.randomUUID(),userKey:J,role:Q,text:Y.text,platform:$.adapter.name,threadId:$.id,timestamp:Date.now()};if(this.storeFormatted&&Y.formatted)K.formatted=Y.formatted;if(W!==void 0)K.platformMessageId=W;return await this.state.appendToList(Q$0(J),K,{maxLength:this.maxPerUser,ttlMs:this.retentionMs}),K}async list($){let X=(await this.state.getList(Q$0($.userKey))).filter((J)=>!Cf0(J));if($.platforms&&$.platforms.length>0){let J=new Set($.platforms);X=X.filter((Q)=>J.has(Q.platform))}if($.threadId!==void 0){let J=$.threadId;X=X.filter((Q)=>Q.threadId===J)}if($.roles&&$.roles.length>0){let J=new Set($.roles);X=X.filter((Q)=>J.has(Q.role))}let G=$.limit??A49;if(X.length>G)X=X.slice(X.length-G);return X}async count($){return(await this.state.getList(Q$0($.userKey))).filter((X)=>!Cf0(X)).length}async delete($){let Y=Q$0($.userKey),G=(await this.state.getList(Y)).filter((Q)=>!Cf0(Q)).length,J={[O24]:!0};return await this.state.appendToList(Y,J,{maxLength:1,ttlMs:this.retentionMs}),{deleted:G}}},lm=30000,q49,P49,w49,_49,j49=300000,T49=86400000,I49=class{registerSingleton(){return $49(this),this}get transcripts(){if(!this._transcripts)throw Error("chat.transcripts is not configured \u2014 pass `transcripts` and `identity` to ChatConfig to enable it");return this._transcripts}static getSingleton(){return im()}static hasSingleton(){return Y49()}adapters;_stateAdapter;userName;logger;_streamingUpdateIntervalMs;_fallbackStreamingPlaceholderText;_dedupeTtlMs;_onLockConflict;_threadHistory;_identity;_transcripts;_concurrencyStrategy;_concurrencyConfig;_concurrentSlots=new Map;_lockScope;mentionHandlers=[];directMessageHandlers=[];messagePatterns=[];subscribedMessageHandlers=[];reactionHandlers=[];actionHandlers=[];optionsLoadHandlers=[];modalSubmitHandlers=[];modalCloseHandlers=[];slashCommandHandlers=[];assistantThreadStartedHandlers=[];assistantContextChangedHandlers=[];appHomeOpenedHandlers=[];memberJoinedChannelHandlers=[];initPromise=null;initialized=!1;webhooks;constructor($){if(this.userName=$.userName,this._stateAdapter=$.state,this.adapters=new Map,this._streamingUpdateIntervalMs=$.streamingUpdateIntervalMs??500,this._fallbackStreamingPlaceholderText=$.fallbackStreamingPlaceholderText!==void 0?$.fallbackStreamingPlaceholderText:"...",this._dedupeTtlMs=$.dedupeTtlMs??j49,this._onLockConflict=$.onLockConflict,this._lockScope=$.lockScope,typeof $.logger==="string")this.logger=new kf0($.logger);else this.logger=$.logger||new kf0("info");let Y=$.concurrency;if(Y)if(typeof Y==="string")this._concurrencyStrategy=Y,this._concurrencyConfig={debounceMs:1500,maxConcurrent:Number.POSITIVE_INFINITY,maxQueueSize:10,onQueueFull:"drop-oldest",queueEntryTtlMs:90000};else{if(Y.maxConcurrent!==void 0&&Y.maxConcurrent<1)throw Error(`concurrency.maxConcurrent must be >= 1 (got ${Y.maxConcurrent})`);if(Y.maxConcurrent!==void 0&&Y.strategy!=="concurrent")this.logger.warn(`concurrency.maxConcurrent has no effect when strategy is "${Y.strategy}" \u2014 it only applies to the "concurrent" strategy.`);this._concurrencyStrategy=Y.strategy,this._concurrencyConfig={debounceMs:Y.debounceMs??1500,maxConcurrent:Y.maxConcurrent??Number.POSITIVE_INFINITY,maxQueueSize:Y.maxQueueSize??10,onQueueFull:Y.onQueueFull??"drop-oldest",queueEntryTtlMs:Y.queueEntryTtlMs??90000}}else this._concurrencyStrategy="drop",this._concurrencyConfig={debounceMs:1500,maxConcurrent:Number.POSITIVE_INFINITY,maxQueueSize:10,onQueueFull:"drop-oldest",queueEntryTtlMs:90000};if(this._threadHistory=new gf0(this._stateAdapter,$.threadHistory??$.messageHistory),$.transcripts){if(!$.identity)throw Error("ChatConfig.transcripts requires ChatConfig.identity to be set \u2014 the cross-platform user key must be resolvable");this._identity=$.identity,this._transcripts=new E49(this._stateAdapter,$.transcripts)}else this._identity=$.identity;let X={};for(let[G,J]of Object.entries($.adapters))this.adapters.set(G,J),X[G]=(Q,W)=>this.handleWebhook(G,Q,W);this.webhooks=X,this.logger.debug("Chat instance created",{adapters:Object.keys($.adapters)})}async handleWebhook($,Y,X){await this.ensureInitialized();let G=this.adapters.get($);if(!G)return new Response(`Unknown adapter: ${$}`,{status:404});return G.handleWebhook(Y,X)}async ensureInitialized(){if(this.initialized)return;if(!this.initPromise)this.initPromise=this.doInitialize();await this.initPromise}async doInitialize(){this.logger.info("Initializing chat instance..."),await this._stateAdapter.connect(),this.logger.debug("State connected");let $=Array.from(this.adapters.values()).map(async(Y)=>{this.logger.debug("Initializing adapter",Y.name);let X=await Y.initialize(this);return this.logger.debug("Adapter initialized",Y.name),X});await Promise.all($),this.initialized=!0,this.logger.info("Chat instance initialized",{adapters:Array.from(this.adapters.keys())})}async shutdown(){this.logger.info("Shutting down chat instance...");let $=Array.from(this.adapters.values()).map(async(X)=>{if(!X.disconnect)return;this.logger.debug("Disconnecting adapter",X.name),await X.disconnect(),this.logger.debug("Adapter disconnected",X.name)}),Y=await Promise.allSettled($);for(let X of Y)if(X.status==="rejected")this.logger.error("Adapter disconnect failed",X.reason);await this._stateAdapter.disconnect(),this.initialized=!1,this.initPromise=null,this.logger.info("Chat instance shut down")}async initialize(){await this.ensureInitialized()}onNewMention($){this.mentionHandlers.push($),this.logger.debug("Registered mention handler")}onDirectMessage($){this.directMessageHandlers.push($),this.logger.debug("Registered direct message handler")}onNewMessage($,Y){this.messagePatterns.push({pattern:$,handler:Y}),this.logger.debug("Registered message pattern handler",{pattern:$.toString()})}onSubscribedMessage($){this.subscribedMessageHandlers.push($),this.logger.debug("Registered subscribed message handler")}onReaction($,Y){if(typeof $==="function")this.reactionHandlers.push({emoji:[],handler:$}),this.logger.debug("Registered reaction handler for all emoji");else if(Y)this.reactionHandlers.push({emoji:$,handler:Y}),this.logger.debug("Registered reaction handler",{emoji:$.map((X)=>typeof X==="string"?X:X.name)})}onAction($,Y){if(typeof $==="function")this.actionHandlers.push({actionIds:[],handler:$}),this.logger.debug("Registered action handler for all actions");else if(Y){let X=Array.isArray($)?$:[$];this.actionHandlers.push({actionIds:X,handler:Y}),this.logger.debug("Registered action handler",{actionIds:X})}}onOptionsLoad($,Y){if(typeof $==="function")this.optionsLoadHandlers.push({actionIds:[],handler:$}),this.logger.debug("Registered options load handler for all action IDs");else if(Y){let X=Array.isArray($)?$:[$];this.optionsLoadHandlers.push({actionIds:X,handler:Y}),this.logger.debug("Registered options load handler",{actionIds:X})}}onModalSubmit($,Y){if(typeof $==="function")this.modalSubmitHandlers.push({callbackIds:[],handler:$}),this.logger.debug("Registered modal submit handler for all modals");else if(Y){let X=Array.isArray($)?$:[$];this.modalSubmitHandlers.push({callbackIds:X,handler:Y}),this.logger.debug("Registered modal submit handler",{callbackIds:X})}}onModalClose($,Y){if(typeof $==="function")this.modalCloseHandlers.push({callbackIds:[],handler:$}),this.logger.debug("Registered modal close handler for all modals");else if(Y){let X=Array.isArray($)?$:[$];this.modalCloseHandlers.push({callbackIds:X,handler:Y}),this.logger.debug("Registered modal close handler",{callbackIds:X})}}onSlashCommand($,Y){if(typeof $==="function")this.slashCommandHandlers.push({commands:[],handler:$}),this.logger.debug("Registered slash command handler for all commands");else if(Y){let G=(Array.isArray($)?$:[$]).map((J)=>J.startsWith("/")?J:`/${J}`);this.slashCommandHandlers.push({commands:G,handler:Y}),this.logger.debug("Registered slash command handler",{commands:G})}}onAssistantThreadStarted($){this.assistantThreadStartedHandlers.push($),this.logger.debug("Registered assistant thread started handler")}onAssistantContextChanged($){this.assistantContextChangedHandlers.push($),this.logger.debug("Registered assistant context changed handler")}onAppHomeOpened($){this.appHomeOpenedHandlers.push($),this.logger.debug("Registered app home opened handler")}onMemberJoinedChannel($){this.memberJoinedChannelHandlers.push($),this.logger.debug("Registered member joined channel handler")}getAdapter($){return this.adapters.get($)}reviver(){return this.registerSingleton(),B24}processMessage($,Y,X,G){let J=(async()=>{let W=typeof X==="function"?await X():X;await this.handleIncomingMessage($,Y,W)})(),Q=J.catch((W)=>{this.logger.error("Message processing error",{error:W,threadId:Y})});if(G?.waitUntil)G.waitUntil(Q);return J}processReaction($,Y){let X=this.handleReactionEvent($).catch((G)=>{this.logger.error("Reaction processing error",{error:G,emoji:$.emoji,messageId:$.messageId})});if(Y?.waitUntil)Y.waitUntil(X)}processAction($,Y){let X=this.handleActionEvent($,Y).catch((G)=>{this.logger.error("Action processing error",{error:G,actionId:$.actionId,messageId:$.messageId})});if(Y?.waitUntil)Y.waitUntil(X);return X}async processOptionsLoad($,Y){let X=[...this.optionsLoadHandlers.filter(({actionIds:G})=>G.length>0&&G.includes($.actionId)),...this.optionsLoadHandlers.filter(({actionIds:G})=>G.length===0)];for(let{handler:G}of X)try{let J=await G($);if(J)return J}catch(J){this.logger.error("Options load handler error",{error:J,actionId:$.actionId})}}async processModalSubmit($,Y,X){let{callbackUrl:G,relatedThread:J,relatedMessage:Q,relatedChannel:W}=await this.retrieveModalContext($.adapter.name,Y),K={...$,relatedThread:J,relatedMessage:Q,relatedChannel:W},Z;for(let{callbackIds:H,handler:z}of this.modalSubmitHandlers)if(H.length===0||H.includes($.callbackId))try{let V=await z(K);if(V){Z=V;break}}catch(V){this.logger.error("Modal submit handler error",{error:V,callbackId:$.callbackId})}if(G&&Z?.action!=="errors"){let H=G24(G,{type:"modal_submit",callbackId:$.callbackId,values:$.values,user:{id:$.user.userId,name:$.user.userName}}).then(({error:z})=>{if(z)this.logger.error("Modal callbackUrl POST failed",{callbackUrl:G,error:z})}).catch((z)=>{this.logger.error("Modal callbackUrl POST failed",{callbackUrl:G,error:z})});if(X?.waitUntil)X.waitUntil(H)}return Z}processModalClose($,Y,X){let G=(async()=>{let{relatedThread:J,relatedMessage:Q,relatedChannel:W}=await this.retrieveModalContext($.adapter.name,Y),K={...$,relatedThread:J,relatedMessage:Q,relatedChannel:W};for(let{callbackIds:Z,handler:H}of this.modalCloseHandlers)if(Z.length===0||Z.includes($.callbackId))await H(K)})().catch((J)=>{this.logger.error("Modal close handler error",{error:J,callbackId:$.callbackId})});if(X?.waitUntil)X.waitUntil(G)}processSlashCommand($,Y){let X=this.handleSlashCommandEvent($,Y).catch((G)=>{this.logger.error("Slash command processing error",{error:G,command:$.command,text:$.text})});if(Y?.waitUntil)Y.waitUntil(X)}processAssistantThreadStarted($,Y){let X=(async()=>{for(let G of this.assistantThreadStartedHandlers)await G($)})().catch((G)=>{this.logger.error("Assistant thread started handler error",{error:G,threadId:$.threadId})});if(Y?.waitUntil)Y.waitUntil(X)}processAssistantContextChanged($,Y){let X=(async()=>{for(let G of this.assistantContextChangedHandlers)await G($)})().catch((G)=>{this.logger.error("Assistant context changed handler error",{error:G,threadId:$.threadId})});if(Y?.waitUntil)Y.waitUntil(X)}processAppHomeOpened($,Y){let X=(async()=>{for(let G of this.appHomeOpenedHandlers)await G($)})().catch((G)=>{this.logger.error("App home opened handler error",{error:G,userId:$.userId})});if(Y?.waitUntil)Y.waitUntil(X)}processMemberJoinedChannel($,Y){let X=(async()=>{for(let G of this.memberJoinedChannelHandlers)await G($)})().catch((G)=>{this.logger.error("Member joined channel handler error",{error:G,channelId:$.channelId,userId:$.userId})});if(Y?.waitUntil)Y.waitUntil(X)}async handleSlashCommandEvent($,Y){if(this.logger.debug("Incoming slash command",{adapter:$.adapter.name,command:$.command,text:$.text,user:$.user.userName}),$.user.isMe){this.logger.debug("Skipping slash command from self",{command:$.command});return}let X=new yT({id:$.channelId,adapter:$.adapter,stateAdapter:this._stateAdapter}),G={...$,channel:X,openModal:async(J)=>{if(!($.triggerId||Y?.onOpenModal)){this.logger.warn("Cannot open modal: no triggerId available");return}if(!(Y?.onOpenModal||$.adapter.openModal)){this.logger.warn(`Cannot open modal: ${$.adapter.name} does not support modals`);return}let Q=J;if(yW(J)){let K=X$0(J);if(!K)throw Error("Invalid JSX element: must be a Modal element");Q=K}let W=crypto.randomUUID();if(await this.storeModalContext($.adapter.name,W,void 0,void 0,X,Q.callbackUrl),Y?.onOpenModal)return Y.onOpenModal(Q,W);if($.triggerId&&$.adapter.openModal)return $.adapter.openModal($.triggerId,Q,W);return}};this.logger.debug("Checking slash command handlers",{handlerCount:this.slashCommandHandlers.length,command:$.command});for(let{commands:J,handler:Q}of this.slashCommandHandlers){if(J.length===0){this.logger.debug("Running catch-all slash command handler"),await Q(G);continue}if(J.includes($.command))this.logger.debug("Running matched slash command handler",{command:$.command}),await Q(G)}}async storeModalContext($,Y,X,G,J,Q){let W=`modal-context:${$}:${Y}`,K={thread:X?.toJSON(),message:G?.toJSON(),channel:J?.toJSON(),callbackUrl:Q};try{await this._stateAdapter.set(W,K,T49)}catch(Z){this.logger.error("Failed to store modal context",{contextId:Y,error:Z})}}async retrieveModalContext($,Y){if(!Y)return{callbackUrl:void 0,relatedThread:void 0,relatedMessage:void 0,relatedChannel:void 0};let X=`modal-context:${$}:${Y}`,G=await this._stateAdapter.get(X);if(!G)return{callbackUrl:void 0,relatedThread:void 0,relatedMessage:void 0,relatedChannel:void 0};await this._stateAdapter.delete(X);let J=this.adapters.get($),Q;if(G.thread)Q=U$0.fromJSON(G.thread,J);let W;if(G.message&&Q){let Z=_X.fromJSON(G.message);W=Q.createSentMessageFromMessage(Z)}let K;if(G.channel)K=yT.fromJSON(G.channel,J);return{callbackUrl:G.callbackUrl,relatedThread:Q,relatedMessage:W,relatedChannel:K}}async handleActionEvent($,Y){if(this.logger.debug("Incoming action",{adapter:$.adapter.name,actionId:$.actionId,value:$.value,user:$.user.userName,messageId:$.messageId,threadId:$.threadId}),$.user.isMe){this.logger.debug("Skipping action from self",{actionId:$.actionId});return}let{callbackToken:X}=s19($.value),G=null;if(X)G=await e19(X,this._stateAdapter);let J=G?{...$,value:G.originalValue}:$,Q;if(G){let z=G.url;Q=(async()=>{let{error:V}=await G24(z,{type:"action",actionId:$.actionId,value:G.originalValue,user:{id:$.user.userId,name:$.user.userName},threadId:$.threadId,messageId:$.messageId});if(V)this.logger.error("Button callbackUrl POST failed",{callbackUrl:z,actionId:$.actionId,error:V})})()}let W=!1,K=$.messageId?new _X({id:$.messageId,threadId:$.threadId,text:"",formatted:{type:"root",children:[]},raw:$.raw,author:$.user,metadata:{dateSent:new Date,edited:!1},attachments:[]}):{},Z=$.threadId?await this.createThread($.adapter,$.threadId,K,W):null,H={...J,thread:Z,openModal:async(z)=>{if(!($.triggerId||Y?.onOpenModal)){this.logger.warn("Cannot open modal: no triggerId available");return}if(!(Y?.onOpenModal||$.adapter.openModal)){this.logger.warn(`Cannot open modal: ${$.adapter.name} does not support modals`);return}let V=z;if(yW(z)){let D=X$0(z);if(!D)throw Error("Invalid JSX element: must be a Modal element");V=D}let F;if(Z){if($.messageId?.startsWith("ephemeral:")){let A=Z.recentMessages[0];if(A&&typeof A.toJSON==="function")F=A}else if($.messageId&&$.adapter.fetchMessage){let A=await $.adapter.fetchMessage($.threadId,$.messageId).catch(()=>null);if(A)F=new _X(A);else{let B=Z.recentMessages[0];if(B&&typeof B.toJSON==="function")F=B}}}let L=crypto.randomUUID(),N=Z?Z.channel:void 0;if(await this.storeModalContext($.adapter.name,L,Z?Z:void 0,F,N,V.callbackUrl),Y?.onOpenModal)return Y.onOpenModal(V,L);if($.triggerId&&$.adapter.openModal)return $.adapter.openModal($.triggerId,V,L);return}};this.logger.debug("Checking action handlers",{handlerCount:this.actionHandlers.length,actionId:$.actionId});for(let{actionIds:z,handler:V}of this.actionHandlers){if(z.length===0){this.logger.debug("Running catch-all action handler"),await V(H);continue}if(z.includes($.actionId))this.logger.debug("Running matched action handler",{actionId:$.actionId}),await V(H)}if(Q)await Q}async handleReactionEvent($){if(this.logger.debug("Incoming reaction",{adapter:$.adapter?.name,emoji:$.emoji,rawEmoji:$.rawEmoji,added:$.added,user:$.user.userName,messageId:$.messageId,threadId:$.threadId}),$.user.isMe){this.logger.debug("Skipping reaction from self",{emoji:$.emoji});return}if(!$.adapter){this.logger.error("Reaction event missing adapter");return}let Y=await this._stateAdapter.isSubscribed($.threadId),X=await this.createThread($.adapter,$.threadId,$.message??{},Y),G={...$,adapter:$.adapter,thread:X};this.logger.debug("Checking reaction handlers",{handlerCount:this.reactionHandlers.length,emoji:$.emoji.name,rawEmoji:$.rawEmoji});for(let{emoji:J,handler:Q}of this.reactionHandlers){if(J.length===0){this.logger.debug("Running catch-all reaction handler"),await Q(G);continue}let W=J.some((K)=>{if(K===G.emoji)return!0;let Z=typeof K==="string"?K:K.name;return Z===G.emoji.name||Z===G.rawEmoji});if(this.logger.debug("Reaction filter check",{filterEmoji:J.map((K)=>typeof K==="string"?K:K.name),eventEmoji:G.emoji.name,matches:W}),W)this.logger.debug("Running matched reaction handler"),await Q(G)}}getState(){return this._stateAdapter}getUserName(){return this.userName}getLogger($){if($)return this.logger.child($);return this.logger}async openDM($){let Y=typeof $==="string"?$:$.userId,X=this.inferAdapterFromUserId(Y);if(!X.openDM)throw new o2(`Adapter "${X.name}" does not support openDM`,"NOT_SUPPORTED");let G=await X.openDM(Y);return this.createThread(X,G,{},!1)}async getUser($){let Y=typeof $==="string"?$:$.userId,X=this.inferAdapterFromUserId(Y);if(!X.getUser)throw new o2(`Adapter "${X.name}" does not support getUser`,"NOT_SUPPORTED");return X.getUser(Y)}channel($){let Y=$.split(":")[0];if(!Y)throw new o2(`Invalid channel ID: ${$}`,"INVALID_CHANNEL_ID");let X=this.adapters.get(Y);if(!X)throw new o2(`Adapter "${Y}" not found for channel ID "${$}"`,"ADAPTER_NOT_FOUND");return new yT({id:$,adapter:X,stateAdapter:this._stateAdapter})}thread($){let Y=$.split(":")[0];if(!Y)throw new o2(`Invalid thread ID: ${$}`,"INVALID_THREAD_ID");let X=this.adapters.get(Y);if(!X)throw new o2(`Adapter "${Y}" not found for thread ID "${$}"`,"ADAPTER_NOT_FOUND");return this.createThread(X,$,{},!1)}inferAdapterFromUserId($){if($.startsWith("users/")){let Y=this.adapters.get("gchat");if(Y)return Y}if($.startsWith("29:")){let Y=this.adapters.get("teams");if(Y)return Y}if(w49.test($)){let Y=this.adapters.get("linear");if(Y)return Y}if(q49.test($)){let Y=this.adapters.get("slack");if(Y)return Y}if(_49.test($)){let Y=[];if(P49.test($)&&this.adapters.has("discord"))Y.push("discord");if(this.adapters.has("telegram"))Y.push("telegram");if(this.adapters.has("github"))Y.push("github");if(Y.length===1){let X=this.adapters.get(Y[0]);if(X)return X}if(Y.length>1)throw new o2(`Numeric userId "${$}" is ambiguous between adapters: ${Y.join(", ")}. Call the platform's adapter directly (e.g. \`adapter.getUser(userId)\`).`,"AMBIGUOUS_USER_ID")}throw new o2(`Cannot infer adapter from userId "${$}". Expected: Slack ("U..."), Teams ("29:..."), Google Chat ("users/..."), Linear (UUID), or Discord/Telegram/GitHub (numeric).`,"UNKNOWN_USER_ID_FORMAT")}async getLockKey($,Y){let X=$.channelIdFromThreadId(Y),G;if(typeof this._lockScope==="function"){let J=$.isDM?.(Y)??!1;G=await this._lockScope({adapter:$,channelId:X,isDM:J,threadId:Y})}else G=this._lockScope??$.lockScope??"thread";return G==="channel"?X:Y}async handleIncomingMessage($,Y,X){if(Tf0(X,$),this.logger.debug("Incoming message",{adapter:$.name,threadId:Y,messageId:X.id,text:X.text,author:X.author.userName,authorUserId:X.author.userId,isBot:X.author.isBot,isMe:X.author.isMe}),X.author.isMe){this.logger.debug("Skipping message from self (isMe=true)",{adapter:$.name,threadId:Y,author:X.author.userName});return}let G=`dedupe:${$.name}:${X.id}`;if(!await this._stateAdapter.setIfNotExists(G,!0,this._dedupeTtlMs)){this.logger.debug("Skipping duplicate message",{adapter:$.name,messageId:X.id});return}if($.persistThreadHistory||$.persistMessageHistory){let K=$.channelIdFromThreadId(Y),Z=[this._threadHistory.append(Y,X)];if(K!==Y)Z.push(this._threadHistory.append(K,X));await Promise.all(Z)}let Q=await this.getLockKey($,Y),W=this._concurrencyStrategy;if(W==="concurrent"){await this.handleConcurrent($,Y,X);return}if(W==="queue"||W==="debounce"){await this.handleQueueOrDebounce($,Y,Q,X,W);return}await this.handleDrop($,Y,Q,X)}async handleDrop($,Y,X,G){let J=await this._stateAdapter.acquireLock(X,lm);if(!J){if((typeof this._onLockConflict==="function"?await this._onLockConflict(Y,G):this._onLockConflict??"drop")==="force")this.logger.info("Force-releasing lock on thread",{threadId:Y,lockKey:X}),await this._stateAdapter.forceReleaseLock(X),J=await this._stateAdapter.acquireLock(X,lm);if(!J)throw this.logger.warn("Could not acquire lock on thread",{threadId:Y,lockKey:X}),new D24(`Could not acquire lock on thread ${Y}. Another instance may be processing.`)}this.logger.debug("Lock acquired",{threadId:Y,lockKey:X,token:J.token});try{await this.dispatchToHandlers($,Y,G)}finally{await this._stateAdapter.releaseLock(J),this.logger.debug("Lock released",{threadId:Y,lockKey:X})}}async handleQueueOrDebounce($,Y,X,G,J){let{maxQueueSize:Q,queueEntryTtlMs:W,onQueueFull:K,debounceMs:Z}=this._concurrencyConfig,H=await this._stateAdapter.acquireLock(X,lm);if(!H){let z=J==="debounce"?1:Q,V=await this._stateAdapter.queueDepth(X);if(V>=z&&J!=="debounce"&&K==="drop-newest"){this.logger.info("message-dropped",{threadId:Y,lockKey:X,messageId:G.id,reason:"queue-full"});return}await this._stateAdapter.enqueue(X,{message:G,enqueuedAt:Date.now(),expiresAt:Date.now()+W},z),this.logger.info(J==="debounce"?"message-debounce-reset":"message-queued",{threadId:Y,lockKey:X,messageId:G.id,queueDepth:Math.min(V+1,z)});return}this.logger.debug("Lock acquired",{threadId:Y,lockKey:X,token:H.token});try{if(J==="debounce")await this._stateAdapter.enqueue(X,{message:G,enqueuedAt:Date.now(),expiresAt:Date.now()+W},1),this.logger.info("message-debouncing",{threadId:Y,lockKey:X,messageId:G.id,debounceMs:Z}),await this.debounceLoop(H,$,Y,X);else await this.dispatchToHandlers($,Y,G),await this.drainQueue(H,$,Y,X)}finally{await this._stateAdapter.releaseLock(H),this.logger.debug("Lock released",{threadId:Y,lockKey:X})}}async debounceLoop($,Y,X,G){let{debounceMs:J}=this._concurrencyConfig;while(!0){await R49(J),await this._stateAdapter.extendLock($,lm);let Q=await this._stateAdapter.dequeue(G);if(!Q)break;let W=this.rehydrateMessage(Q.message,Y);if(Date.now()>Q.expiresAt){this.logger.info("message-expired",{threadId:X,lockKey:G,messageId:W.id});continue}if(await this._stateAdapter.queueDepth(G)>0){this.logger.info("message-superseded",{threadId:X,lockKey:G,droppedId:W.id});continue}this.logger.info("message-dequeued",{threadId:X,lockKey:G,messageId:W.id}),await this.dispatchToHandlers(Y,X,W);break}}async drainQueue($,Y,X,G){while(!0){let J=[];while(!0){let Z=await this._stateAdapter.dequeue(G);if(!Z)break;let H=this.rehydrateMessage(Z.message,Y);if(Date.now()<=Z.expiresAt)J.push({message:H,expiresAt:Z.expiresAt});else this.logger.info("message-expired",{threadId:X,lockKey:G,messageId:H.id})}if(J.length===0)return;await this._stateAdapter.extendLock($,lm);let Q=J.at(-1);if(!Q)return;let W=J.slice(0,-1).map((Z)=>Z.message);this.logger.info("message-dequeued",{threadId:X,lockKey:G,messageId:Q.message.id,skippedCount:W.length,totalSinceLastHandler:J.length});let K={skipped:W,totalSinceLastHandler:J.length};await this.dispatchToHandlers(Y,X,Q.message,K)}}async handleConcurrent($,Y,X){let{maxConcurrent:G}=this._concurrencyConfig;if(!Number.isFinite(G)){await this.dispatchToHandlers($,Y,X);return}await this.acquireConcurrentSlot(Y,G);try{await this.dispatchToHandlers($,Y,X)}finally{this.releaseConcurrentSlot(Y)}}acquireConcurrentSlot($,Y){let X=this._concurrentSlots.get($);if(!X)X={inFlight:0,waiters:[]},this._concurrentSlots.set($,X);if(X.inFlight<Y)return X.inFlight++,Promise.resolve();return new Promise((G)=>{X.waiters.push(G)})}releaseConcurrentSlot($){let Y=this._concurrentSlots.get($);if(!Y)return;let X=Y.waiters.shift();if(X){X();return}if(Y.inFlight--,Y.inFlight===0&&Y.waiters.length===0)this._concurrentSlots.delete($)}async dispatchToHandlers($,Y,X,G){X.isMention=X.isMention||this.detectMention($,X);let J=await this._stateAdapter.isSubscribed(Y);this.logger.debug("Subscription check",{threadId:Y,isSubscribed:J,subscribedHandlerCount:this.subscribedMessageHandlers.length});let Q=await this.createThread($,Y,X,J);if(this._identity&&X.userKey===void 0)try{let Z=await this._identity({adapter:$.name,author:X.author,message:X});if(Z)X.userKey=Z}catch(Z){this.logger.warn("Identity resolver threw; skipping userKey",{error:Z,adapter:$.name,threadId:Y,authorUserId:X.author.userId})}let W=$.isDM?.(Y)??!1;if(W&&this.directMessageHandlers.length>0){this.logger.debug("Direct message received - calling handlers",{threadId:Y,handlerCount:this.directMessageHandlers.length});let Z=Q.channel;for(let H of this.directMessageHandlers)await H(Q,X,Z,G);return}if(W)X.isMention=!0;if(J){this.logger.debug("Message in subscribed thread - calling handlers",{threadId:Y,handlerCount:this.subscribedMessageHandlers.length}),await this.runHandlers(this.subscribedMessageHandlers,Q,X,G);return}if(X.isMention){this.logger.debug("Bot mentioned",{threadId:Y,text:X.text.slice(0,100)}),await this.runHandlers(this.mentionHandlers,Q,X,G);return}this.logger.debug("Checking message patterns",{patternCount:this.messagePatterns.length,patterns:this.messagePatterns.map((Z)=>Z.pattern.toString()),messageText:X.text});let K=!1;for(let{pattern:Z,handler:H}of this.messagePatterns){let z=Z.test(X.text);if(this.logger.debug("Pattern test",{pattern:Z.toString(),text:X.text,matches:z}),z)this.logger.debug("Message matched pattern - calling handler",{pattern:Z.toString()}),K=!0,await H(Q,X,G)}if(!K)this.logger.debug("No handlers matched message",{threadId:Y,text:X.text.slice(0,100)})}createThread($,Y,X,G=!1){let J=$.channelIdFromThreadId(Y),Q=$.isDM?.(Y)??!1,W=$.getChannelVisibility?.(Y)??"unknown";return new U$0({id:Y,adapter:$,channelId:J,stateAdapter:this._stateAdapter,initialMessage:X,isSubscribedContext:G,isDM:Q,channelVisibility:W,currentMessage:X,logger:this.logger,streamingUpdateIntervalMs:this._streamingUpdateIntervalMs,fallbackStreamingPlaceholderText:this._fallbackStreamingPlaceholderText,threadHistory:$.persistThreadHistory||$.persistMessageHistory?this._threadHistory:void 0})}detectMention($,Y){let X=$.userName||this.userName,G=$.botUserId;if(new RegExp(`@${this.escapeRegex(X)}\\b`,"i").test(Y.text))return!0;if(G){if(new RegExp(`@${this.escapeRegex(G)}\\b`,"i").test(Y.text))return!0;if(new RegExp(`<@!?${this.escapeRegex(G)}>`,"i").test(Y.text))return!0}return!1}escapeRegex($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}rehydrateMessage($,Y){if($ instanceof _X){if(Y)Tf0($,Y);return $}let X=$,G;if(X._type==="chat:Message")G=_X.fromJSON(X);else{let Q=X.metadata,W=Q.dateSent,K=Q.editedAt;G=new _X({id:X.id,threadId:X.threadId,text:X.text,formatted:X.formatted,raw:X.raw,author:X.author,metadata:{dateSent:W instanceof Date?W:new Date(W),edited:Q.edited,editedAt:K?new Date(K instanceof Date?K.toISOString():K):void 0},attachments:X.attachments??[],isMention:X.isMention,links:X.links??[]})}if(Y)Tf0(G,Y);let J=Y?.rehydrateAttachment?.bind(Y);if(J&&G.attachments.length>0)G.attachments=G.attachments.map((Q)=>Q.fetchData?Q:J(Q));return G}async runHandlers($,Y,X,G){for(let J of $)await J(Y,X,G)}},C49,S49=class{$$typeof=bf0;kind="plan";_model;_bound=null;constructor($){let Y=W$0($.initialMessage)||"Plan",X={id:crypto.randomUUID(),title:Y,status:"in_progress"};this._model={title:Y,tasks:[X]}}isSupported($){return!!$.postObject&&!!$.editObject}getPostData(){return this._model}getFallbackText(){let $=[];$.push(`\uD83D\uDCCB ${this._model.title||"Plan"}`);for(let Y of this._model.tasks){let G={complete:"\u2705",in_progress:"\uD83D\uDD04",error:"\u274C"}[Y.status]??"\u2B1C";$.push(`${G} ${Y.title}`)}return $.join(`
`)}onPosted($){this._bound={adapter:$.adapter,fallback:!this.isSupported($.adapter),logger:$.logger,messageId:$.messageId,threadId:$.threadId,updateChain:Promise.resolve()}}get id(){return this._bound?.messageId??""}get threadId(){return this._bound?.threadId??""}get title(){return this._model.title}get tasks(){return this._model.tasks.map(($)=>({id:$.id,title:$.title,status:$.status}))}get currentTask(){let $;for(let Y=this._model.tasks.length-1;Y>=0;Y--)if(this._model.tasks[Y].status==="in_progress"){$=this._model.tasks[Y];break}if($??=this._model.tasks.at(-1),!$)return null;return{id:$.id,title:$.title,status:$.status}}async addTask($){if(!this.canMutate())return null;let Y=W$0($.title)||"Task";for(let G of this._model.tasks)if(G.status==="in_progress")G.status="complete";let X={id:crypto.randomUUID(),title:Y,status:"in_progress",details:$.children};return this._model.tasks.push(X),this._model.title=Y,await this.enqueueEdit(),{id:X.id,title:X.title,status:X.status}}async updateTask($){if(!this.canMutate())return null;let Y;if(typeof $==="object"&&$!==null&&"id"in $&&$.id)Y=this._model.tasks.find((X)=>X.id===$.id);else{for(let X=this._model.tasks.length-1;X>=0;X--)if(this._model.tasks[X].status==="in_progress"){Y=this._model.tasks[X];break}Y??=this._model.tasks.at(-1)}if(!Y)return null;if($!==void 0)if(typeof $==="object"&&$!==null&&"output"in $){if($.output!==void 0)Y.output=$.output;if($.status)Y.status=$.status}else Y.output=$;return await this.enqueueEdit(),{id:Y.id,title:Y.title,status:Y.status}}async reset($){if(!this.canMutate())return null;let Y=W$0($.initialMessage)||"Plan",X={id:crypto.randomUUID(),title:Y,status:"in_progress"};return this._model={title:Y,tasks:[X]},await this.enqueueEdit(),{id:X.id,title:X.title,status:X.status}}async complete($){if(!this.canMutate())return;for(let Y of this._model.tasks)if(Y.status==="in_progress")Y.status="complete";this._model.title=W$0($.completeMessage)||this._model.title,await this.enqueueEdit()}canMutate(){return!!this._bound}enqueueEdit(){if(!this._bound)return Promise.resolve();let $=this._bound,Y=async()=>{if($.fallback)await $.adapter.editMessage($.threadId,$.messageId,this.getFallbackText());else{let G=$.adapter.editObject;if(!G)return;await G.call($.adapter,$.threadId,$.messageId,this.kind,this._model)}},X=$.updateChain.then(Y,Y);return $.updateChain=X.then(()=>{return},(G)=>{$.logger?.warn("Failed to edit plan",G)}),X}},k49=class{$$typeof=bf0;kind="stream";_stream;_options;constructor($,Y={}){this._stream=$,this._options=Y}get stream(){return this._stream}get options(){return this._options}getFallbackText(){return""}getPostData(){return{stream:this._stream,options:this._options}}isSupported($){return!0}onPosted($){}},U24,E24,M24=class{emojiMap;slackToNormalized;gchatToNormalized;constructor($){this.emojiMap={...E24,...$},this.slackToNormalized=new Map,this.gchatToNormalized=new Map,this.buildReverseMaps()}buildReverseMaps(){for(let[$,Y]of Object.entries(this.emojiMap)){let X=Array.isArray(Y.slack)?Y.slack:[Y.slack];for(let J of X)this.slackToNormalized.set(J.toLowerCase(),$);let G=Array.isArray(Y.gchat)?Y.gchat:[Y.gchat];for(let J of G)this.gchatToNormalized.set(J,$)}}fromSlack($){let Y=$.replace(/^:|:$/g,"").toLowerCase(),X=this.slackToNormalized.get(Y)??$;return yE(X)}fromGChat($){let Y=this.gchatToNormalized.get($)??$;return yE(Y)}fromTeams($){let X={like:"thumbs_up",heart:"heart",laugh:"laugh",surprised:"surprised",sad:"sad",angry:"angry"}[$]??$;return yE(X)}toSlack($){let Y=typeof $==="string"?$:$.name,X=this.emojiMap[Y];if(!X)return Y;return Array.isArray(X.slack)?X.slack[0]:X.slack}toGChat($){let Y=typeof $==="string"?$:$.name,X=this.emojiMap[Y];if(!X)return Y;return Array.isArray(X.gchat)?X.gchat[0]:X.gchat}toDiscord($){return this.toGChat($)}matches($,Y){let X=typeof Y==="string"?Y:Y.name,G=this.emojiMap[X];if(!G)return $===X;let J=Array.isArray(G.slack)?G.slack:[G.slack],Q=Array.isArray(G.gchat)?G.gchat:[G.gchat],W=$.replace(/^:|:$/g,"").toLowerCase();return J.some((K)=>K.toLowerCase()===W)||Q.includes($)}extend($){Object.assign(this.emojiMap,$),this.buildReverseMaps()}},mf0,v49,y49,b49,h49,f49,g49,m49,u49,p49,d49,c49,l49,i49,n49,r49,a49,s49,o49,t49,e49,$69,Y69,X69,G69,J69,Q69,W69,K69;var P24=V0(()=>{uW4();G$0();G$0();G$0();X24();c19=["text/","application/json","application/xml","application/javascript","application/typescript","application/yaml","application/x-yaml","application/toml"];X49=new Set(["markdown_text","task_update","plan_update"]);F24=new WeakMap;_X=class ${id;threadId;text;formatted;raw;author;metadata;attachments;isMention;userKey;links;_subjectPromise;get subject(){if(this._subjectPromise)return this._subjectPromise;let Y=F24.get(this);if(!Y?.fetchSubject)return this._subjectPromise=Promise.resolve(null),this._subjectPromise;return this._subjectPromise=Y.fetchSubject(this.raw).catch(()=>null),this._subjectPromise}constructor(Y){this.id=Y.id,this.threadId=Y.threadId,this.text=Y.text,this.formatted=Y.formatted,this.raw=Y.raw,this.author=Y.author,this.metadata=Y.metadata,this.attachments=Y.attachments,this.isMention=Y.isMention,this.links=Y.links??[]}toJSON(){return{_type:"chat:Message",id:this.id,threadId:this.threadId,text:this.text,formatted:this.formatted,raw:this.raw,author:{userId:this.author.userId,userName:this.author.userName,fullName:this.author.fullName,isBot:this.author.isBot,isMe:this.author.isMe},metadata:{dateSent:this.metadata.dateSent.toISOString(),edited:this.metadata.edited,editedAt:this.metadata.editedAt?.toISOString()},attachments:this.attachments.map((Y)=>({type:Y.type,url:Y.url,name:Y.name,mimeType:Y.mimeType,size:Y.size,width:Y.width,height:Y.height,fetchMetadata:Y.fetchMetadata})),isMention:this.isMention,links:this.links.length>0?this.links.map((Y)=>({url:Y.url,title:Y.title,description:Y.description,imageUrl:Y.imageUrl,siteName:Y.siteName})):void 0}}static fromJSON(Y){return new $({id:Y.id,threadId:Y.threadId,text:Y.text,formatted:Y.formatted,raw:Y.raw,author:Y.author,metadata:{dateSent:new Date(Y.metadata.dateSent),edited:Y.metadata.edited,editedAt:Y.metadata.editedAt?new Date(Y.metadata.editedAt):void 0},attachments:Y.attachments,isMention:Y.isMention,links:Y.links})}static[vT](Y){return Y.toJSON()}static[xT](Y){return $.fromJSON(Y)}},bf0=Symbol.for("chat.postable");o2=class extends Error{code;cause;constructor($,Y,X){super($);this.name="ChatError",this.code=Y,this.cause=X}},G49=class extends o2{retryAfterMs;constructor($,Y,X){super($,"RATE_LIMITED",X);this.name="RateLimitError",this.retryAfterMs=Y}},D24=class extends o2{constructor($,Y){super($,"LOCK_FAILED",Y);this.name="LockError"}},ff0=class extends o2{feature;constructor($,Y,X){super($,"NOT_IMPLEMENTED",X);this.name="NotImplementedError",this.feature=Y}};yT=class ${id;isDM;channelVisibility;_adapter;_adapterName;_stateAdapterInstance;_name=null;_threadHistory;constructor(Y){if(this.id=Y.id,this.isDM=Y.isDM??!1,this.channelVisibility=Y.channelVisibility??"unknown",J49(Y))this._adapterName=Y.adapterName;else this._adapter=Y.adapter,this._stateAdapterInstance=Y.stateAdapter,this._threadHistory=Y.threadHistory}get adapter(){if(this._adapter)return this._adapter;if(!this._adapterName)throw Error("Channel has no adapter configured");let X=im().getAdapter(this._adapterName);if(!X)throw Error(`Adapter "${this._adapterName}" not found in Chat singleton`);return this._adapter=X,X}get _stateAdapter(){if(this._stateAdapterInstance)return this._stateAdapterInstance;let Y=im();return this._stateAdapterInstance=Y.getState(),this._stateAdapterInstance}get name(){return this._name}get state(){return this._stateAdapter.get(`${J24}${this.id}`)}async setState(Y,X){let G=`${J24}${this.id}`;if(X?.replace)await this._stateAdapter.set(G,Y,nm);else{let Q={...await this._stateAdapter.get(G),...Y};await this._stateAdapter.set(G,Q,nm)}}get messages(){let Y=this.adapter,X=this.id,G=this._threadHistory;return{async*[Symbol.asyncIterator](){let J,Q=!1;while(!0){let W={cursor:J,direction:"backward"},K=Y.fetchChannelMessages?await Y.fetchChannelMessages(X,W):await Y.fetchMessages(X,W),Z=[...K.messages].reverse();for(let H of Z)Q=!0,yield H;if(!K.nextCursor||K.messages.length===0)break;J=K.nextCursor}if(!Q&&G){let W=await G.getMessages(X);for(let K=W.length-1;K>=0;K--)yield W[K]}}}}threads(){let Y=this.adapter,X=this.id;return{async*[Symbol.asyncIterator](){if(!Y.listThreads)return;let G;while(!0){let J=await Y.listThreads(X,{cursor:G});for(let Q of J.threads)yield Q;if(!J.nextCursor||J.threads.length===0)break;G=J.nextCursor}}}}async fetchMetadata(){if(this.adapter.fetchChannelInfo){let Y=await this.adapter.fetchChannelInfo(this.id);return this._name=Y.name??null,Y}return{id:this.id,isDM:this.isDM,metadata:{}}}async post(Y){if(hf0(Y))return await this.handlePostableObject(Y),Y;if(Q49(Y)){let G="";for await(let J of yf0(Y))if(typeof J==="string")G+=J;else if(J.type==="markdown_text")G+=J.text;return this.postSingleMessage({markdown:G})}let X=Y;if(yW(Y)){let G=XU(Y);if(!G)throw Error("Invalid JSX element: must be a Card element");X=G}return X=await this.processCallbackUrls(X),this.postSingleMessage(X)}async handlePostableObject(Y){await L24(Y,this.adapter,this.id,(X,G)=>this.adapter.postChannelMessage?this.adapter.postChannelMessage(X,G):this.adapter.postMessage(X,G))}async postSingleMessage(Y){let X=this.adapter.postChannelMessage?await this.adapter.postChannelMessage(this.id,Y):await this.adapter.postMessage(this.id,Y),G=this.createSentMessage(X.id,Y,X.threadId);if(this._threadHistory)await this._threadHistory.append(this.id,new _X(G));return G}async postEphemeral(Y,X,G){let{fallbackToDM:J}=G,Q=typeof Y==="string"?Y:Y.userId,W;if(yW(X)){let K=XU(X);if(!K)throw Error("Invalid JSX element: must be a Card element");W=K}else W=X;if(W=await this.processCallbackUrls(W),this.adapter.postEphemeral)return this.adapter.postEphemeral(this.id,Q,W);if(!J)return null;if(this.adapter.openDM){let K=await this.adapter.openDM(Q),Z=await this.adapter.postMessage(K,W);return{id:Z.id,threadId:K,usedFallback:!0,raw:Z.raw}}return null}async schedule(Y,X){let G;if(yW(Y)){let J=XU(Y);if(!J)throw Error("Invalid JSX element: must be a Card element");G=J}else G=Y;if(G=await this.processCallbackUrls(G),!this.adapter.scheduleMessage)throw new ff0("Scheduled messages are not supported by this adapter","scheduling");return this.adapter.scheduleMessage(this.id,G,X)}async processCallbackUrls(Y){if(typeof Y==="string")return Y;if("type"in Y&&Y.type==="card")return K$0(Y,this._stateAdapter);if("card"in Y&&Y.card?.type==="card"){let X=await K$0(Y.card,this._stateAdapter);if(X!==Y.card)return{...Y,card:X}}return Y}async startTyping(Y){await this.adapter.startTyping(this.id,Y)}mentionUser(Y){return`<@${Y}>`}toJSON(){return{_type:"chat:Channel",id:this.id,adapterName:this._adapterName??this.adapter.name,channelVisibility:this.channelVisibility,isDM:this.isDM}}static fromJSON(Y,X){let G=new $({id:Y.id,adapterName:Y.adapterName,channelVisibility:Y.channelVisibility,isDM:Y.isDM});if(X)G._adapter=X;return G}static[vT](Y){return Y.toJSON()}static[xT](Y){return $.fromJSON(Y)}createSentMessage(Y,X,G){let J=this.adapter,Q=G||this.id,W=this,{plainText:K,formatted:Z,attachments:H}=W49(X);return{id:Y,threadId:Q,text:K,formatted:Z,raw:null,author:{userId:"self",userName:J.userName,fullName:J.userName,isBot:!0,isMe:!0},metadata:{dateSent:new Date,edited:!1},attachments:H,links:[],toJSON(){return new _X(this).toJSON()},async edit(V){let F=V;if(yW(V)){let L=XU(V);if(!L)throw Error("Invalid JSX element: must be a Card element");F=L}return F=await W.processCallbackUrls(F),await J.editMessage(Q,Y,F),W.createSentMessage(Y,F)},async delete(){await J.deleteMessage(Q,Y)},async addReaction(V){await J.addReaction(Q,Y,V)},async removeReaction(V){await J.removeReaction(Q,Y,V)}}}};K49=new Set(["*","~","`","["]);vf0=/^\|.*\|$/,xf0=/^\|[\s:]*-{1,}[\s:]*(\|[\s:]*-{1,}[\s:]*)*\|$/;U$0=class ${id;channelId;isDM;channelVisibility;_adapter;_adapterName;_stateAdapterInstance;_recentMessages=[];_isSubscribedContext;_currentMessage;_streamingUpdateIntervalMs;_fallbackStreamingPlaceholderText;_channel;_threadHistory;_logger;constructor(Y){if(this.id=Y.id,this.channelId=Y.channelId,this.isDM=Y.isDM??!1,this.channelVisibility=Y.channelVisibility??"unknown",this._isSubscribedContext=Y.isSubscribedContext??!1,this._currentMessage=Y.currentMessage,this._logger=Y.logger,this._streamingUpdateIntervalMs=Y.streamingUpdateIntervalMs??500,this._fallbackStreamingPlaceholderText=Y.fallbackStreamingPlaceholderText!==void 0?Y.fallbackStreamingPlaceholderText:"...",H49(Y))this._adapterName=Y.adapterName;else this._adapter=Y.adapter,this._stateAdapterInstance=Y.stateAdapter,this._threadHistory=Y.threadHistory;if(Y.initialMessage)this._recentMessages=[Y.initialMessage]}get adapter(){if(this._adapter)return this._adapter;if(!this._adapterName)throw Error("Thread has no adapter configured");let X=im().getAdapter(this._adapterName);if(!X)throw Error(`Adapter "${this._adapterName}" not found in Chat singleton`);return this._adapter=X,X}get _stateAdapter(){if(this._stateAdapterInstance)return this._stateAdapterInstance;let Y=im();return this._stateAdapterInstance=Y.getState(),this._stateAdapterInstance}get recentMessages(){return this._recentMessages}set recentMessages(Y){this._recentMessages=Y}get state(){return this._stateAdapter.get(`${K24}${this.id}`)}async setState(Y,X){let G=`${K24}${this.id}`;if(X?.replace)await this._stateAdapter.set(G,Y,nm);else{let Q={...await this._stateAdapter.get(G),...Y};await this._stateAdapter.set(G,Q,nm)}}get channel(){if(!this._channel){let Y=N24(this.adapter,this.id);this._channel=new yT({id:Y,adapter:this.adapter,stateAdapter:this._stateAdapter,isDM:this.isDM,channelVisibility:this.channelVisibility,threadHistory:this._threadHistory})}return this._channel}get messages(){let Y=this.adapter,X=this.id,G=this._threadHistory;return{async*[Symbol.asyncIterator](){let J,Q=!1;while(!0){let W=await Y.fetchMessages(X,{cursor:J,direction:"backward"}),K=[...W.messages].reverse();for(let Z of K)Q=!0,yield Z;if(!W.nextCursor||W.messages.length===0)break;J=W.nextCursor}if(!Q&&G){let W=await G.getMessages(X);for(let K=W.length-1;K>=0;K--)yield W[K]}}}}get allMessages(){let Y=this.adapter,X=this.id,G=this._threadHistory;return{async*[Symbol.asyncIterator](){let J,Q=!1;while(!0){let W=await Y.fetchMessages(X,{limit:100,cursor:J,direction:"forward"});for(let K of W.messages)Q=!0,yield K;if(!W.nextCursor||W.messages.length===0)break;J=W.nextCursor}if(!Q&&G){let W=await G.getMessages(X);for(let K of W)yield K}}}}async getParticipants(){let Y=new Map;if(this._currentMessage&&!this._currentMessage.author.isMe&&!this._currentMessage.author.isBot)Y.set(this._currentMessage.author.userId,this._currentMessage.author);for await(let X of this.allMessages){if(X.author.isMe||X.author.isBot||Y.has(X.author.userId))continue;Y.set(X.author.userId,X.author)}return[...Y.values()]}async isSubscribed(){if(this._isSubscribedContext)return!0;return this._stateAdapter.isSubscribed(this.id)}async subscribe(){if(await this._stateAdapter.subscribe(this.id),this.adapter.onThreadSubscribe)await this.adapter.onThreadSubscribe(this.id)}async unsubscribe(){await this._stateAdapter.unsubscribe(this.id)}async post(Y){if(hf0(Y)){if(Y.kind==="stream"){let Q=Y.getPostData(),W={...Q.options.updateIntervalMs?{updateIntervalMs:Q.options.updateIntervalMs}:{},...Q.options.groupTasks?{taskDisplayMode:Q.options.groupTasks}:{},...Q.options.endWith?{stopBlocks:Q.options.endWith}:{}};return await this.handleStream(Q.stream,W),Y}return await this.handlePostableObject(Y),Y}if(z49(Y))return this.handleStream(Y);let X=Y;if(yW(Y)){let Q=XU(Y);if(!Q)throw Error("Invalid JSX element: must be a Card element");X=Q}X=await this.processCallbackUrls(X);let G=await this.adapter.postMessage(this.id,X),J=this.createSentMessage(G.id,X,G.threadId);if(this._threadHistory)await this._threadHistory.append(this.id,new _X(J));return J}async handlePostableObject(Y){await L24(Y,this.adapter,this.id,(X,G)=>this.adapter.postMessage(X,G),this._logger)}async postEphemeral(Y,X,G){let{fallbackToDM:J}=G,Q=typeof Y==="string"?Y:Y.userId,W;if(yW(X)){let K=XU(X);if(!K)throw Error("Invalid JSX element: must be a Card element");W=K}else W=X;if(W=await this.processCallbackUrls(W),this.adapter.postEphemeral)return this.adapter.postEphemeral(this.id,Q,W);if(!J)return null;if(this.adapter.openDM){let K=await this.adapter.openDM(Q),Z=await this.adapter.postMessage(K,W);return{id:Z.id,threadId:K,usedFallback:!0,raw:Z.raw}}return null}async processCallbackUrls(Y){if(typeof Y==="string")return Y;if("type"in Y&&Y.type==="card")return K$0(Y,this._stateAdapter);if("card"in Y&&Y.card?.type==="card"){let X=await K$0(Y.card,this._stateAdapter);if(X!==Y.card)return{...Y,card:X}}return Y}async schedule(Y,X){let G;if(yW(Y)){let J=XU(Y);if(!J)throw Error("Invalid JSX element: must be a Card element");G=J}else G=Y;if(G=await this.processCallbackUrls(G),!this.adapter.scheduleMessage)throw new ff0("Scheduled messages are not supported by this adapter","scheduling");return this.adapter.scheduleMessage(this.id,G,X)}async handleStream(Y,X){let G=yf0(Y),J={...X};if(this._currentMessage)J.recipientUserId=this._currentMessage.author.userId,J.recipientTeamId=this.extractSlackRecipientTeamId(this._currentMessage.raw);if(this.adapter.stream){let W="",K={[Symbol.asyncIterator]:()=>{let z=G[Symbol.asyncIterator]();return{async next(){let V=await z.next();if(!V.done){let F=V.value;if(typeof F==="string")W+=F;else if(F.type==="markdown_text")W+=F.text}return V}}}},Z=await this.adapter.stream(this.id,K,J),H=this.createSentMessage(Z.id,{markdown:W},Z.threadId);if(this._threadHistory)await this._threadHistory.append(this.id,new _X(H));return H}let Q={[Symbol.asyncIterator]:()=>{let W=G[Symbol.asyncIterator]();return{async next(){while(!0){let K=await W.next();if(K.done)return{value:void 0,done:!0};let Z=K.value;if(typeof Z==="string")return{value:Z,done:!1};if(Z.type==="markdown_text")return{value:Z.text,done:!1}}}}}};return this.fallbackStream(Q,J)}extractSlackRecipientTeamId(Y){if(!Y||typeof Y!=="object")return;let X=Y;if(typeof X.team_id==="string"&&X.team_id)return X.team_id;if(typeof X.team==="string"&&X.team)return X.team;if(X.team&&typeof X.team==="object"&&typeof X.team.id==="string"&&X.team.id)return X.team.id;if(typeof X.user?.team_id==="string"&&X.user.team_id)return X.user.team_id;return}async startTyping(Y){await this.adapter.startTyping(this.id,Y)}async fallbackStream(Y,X){let G=X?.updateIntervalMs??this._streamingUpdateIntervalMs,J=this._fallbackStreamingPlaceholderText,Q=J===null?null:await this.adapter.postMessage(this.id,J),W=this.id,K=new A24,Z="",H=!1,z=null,V=null;if(Q)W=Q.threadId||this.id,Z=J??"";let F=()=>{V=setTimeout(()=>{z=L()},G)},L=async()=>{if(H||!Q)return;let B=K.render();if(B.trim()&&B!==Z)try{await this.adapter.editMessage(W,Q.id,{markdown:B}),Z=B}catch(O){this._logger?.warn("fallbackStream edit failed",O)}if(!H)F()};if(Q)F();try{for await(let B of Y)if(K.push(B),!Q){let O=K.render();if(O.trim())Q=await this.adapter.postMessage(this.id,{markdown:O}),W=Q.threadId||this.id,Z=O,F()}}finally{if(H=!0,V)clearTimeout(V),V=null}if(z)await z;let N=K.getText(),D=K.finish();if(!Q)Q=await this.adapter.postMessage(this.id,{markdown:N.trim()?N:" "}),W=Q.threadId||this.id,Z=N;if(D.trim()&&D!==Z)await this.adapter.editMessage(W,Q.id,{markdown:N});let A=this.createSentMessage(Q.id,{markdown:N},W);if(this._threadHistory)await this._threadHistory.append(this.id,new _X(A));return A}async refresh(){let Y=await this.adapter.fetchMessages(this.id,{limit:50});if(Y.messages.length>0)this._recentMessages=Y.messages;else if(this._threadHistory)this._recentMessages=await this._threadHistory.getMessages(this.id,50);else this._recentMessages=[]}mentionUser(Y){return`<@${Y}>`}toJSON(){return{_type:"chat:Thread",id:this.id,channelId:this.channelId,channelVisibility:this.channelVisibility,currentMessage:this._currentMessage?.toJSON(),isDM:this.isDM,adapterName:this._adapterName??this.adapter.name}}static fromJSON(Y,X){let G=new $({id:Y.id,adapterName:Y.adapterName,channelId:Y.channelId,channelVisibility:Y.channelVisibility,currentMessage:Y.currentMessage?_X.fromJSON(Y.currentMessage):void 0,isDM:Y.isDM});if(X)G._adapter=X;return G}static[vT](Y){return Y.toJSON()}static[xT](Y){return $.fromJSON(Y)}createSentMessage(Y,X,G){let J=this.adapter,Q=G||this.id,W=this,{plainText:K,formatted:Z,attachments:H}=V49(X);return{id:Y,threadId:Q,text:K,formatted:Z,raw:null,links:[],author:{userId:"self",userName:J.userName,fullName:J.userName,isBot:!0,isMe:!0},metadata:{dateSent:new Date,edited:!1},attachments:H,toJSON(){return new _X(this).toJSON()},async edit(V){let F=V;if(yW(V)){let L=XU(V);if(!L)throw Error("Invalid JSX element: must be a Card element");F=L}return F=await W.processCallbackUrls(F),await J.editMessage(Q,Y,F),W.createSentMessage(Y,F)},async delete(){await J.deleteMessage(Q,Y)},async addReaction(V){await J.addReaction(Q,Y,V)},async removeReaction(V){await J.removeReaction(Q,Y,V)}}}createSentMessageFromMessage(Y){let X=this.adapter,G=this.id,J=Y.id,Q=this;return{id:Y.id,threadId:Y.threadId,text:Y.text,formatted:Y.formatted,raw:Y.raw,author:Y.author,metadata:Y.metadata,attachments:Y.attachments,links:Y.links,isMention:Y.isMention,toJSON(){return Y.toJSON()},async edit(W){let K=W;if(yW(W)){let Z=XU(W);if(!Z)throw Error("Invalid JSX element: must be a Card element");K=Z}return K=await Q.processCallbackUrls(K),await X.editMessage(G,J,K),Q.createSentMessage(J,K,G)},async delete(){await X.deleteMessage(G,J)},async addReaction(W){await X.addReaction(G,J,W)},async removeReaction(W){await X.removeReaction(G,J,W)}}}};B49=/^(\d+)([smhd])$/;O49={s:1000,m:60000,h:3600000,d:86400000};q49=/^[UW][A-Z0-9]+$/,P49=/^\d{17,19}$/,w49=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,_49=/^\d+$/,C49=gf0;U24=new Map;E24={thumbs_up:{slack:["+1","thumbsup"],gchat:"\uD83D\uDC4D"},thumbs_down:{slack:["-1","thumbsdown"],gchat:"\uD83D\uDC4E"},clap:{slack:"clap",gchat:"\uD83D\uDC4F"},wave:{slack:"wave",gchat:"\uD83D\uDC4B"},pray:{slack:"pray",gchat:"\uD83D\uDE4F"},muscle:{slack:"muscle",gchat:"\uD83D\uDCAA"},ok_hand:{slack:"ok_hand",gchat:"\uD83D\uDC4C"},point_up:{slack:"point_up",gchat:"\uD83D\uDC46"},point_down:{slack:"point_down",gchat:"\uD83D\uDC47"},point_left:{slack:"point_left",gchat:"\uD83D\uDC48"},point_right:{slack:"point_right",gchat:"\uD83D\uDC49"},raised_hands:{slack:"raised_hands",gchat:"\uD83D\uDE4C"},shrug:{slack:"shrug",gchat:"\uD83E\uDD37"},facepalm:{slack:"facepalm",gchat:"\uD83E\uDD26"},heart:{slack:"heart",gchat:["\u2764\uFE0F","\u2764"]},smile:{slack:["smile","slightly_smiling_face"],gchat:"\uD83D\uDE0A"},laugh:{slack:["laughing","satisfied","joy"],gchat:["\uD83D\uDE02","\uD83D\uDE06"]},thinking:{slack:"thinking_face",gchat:"\uD83E\uDD14"},sad:{slack:["cry","sad","white_frowning_face"],gchat:"\uD83D\uDE22"},cry:{slack:"sob",gchat:"\uD83D\uDE2D"},angry:{slack:"angry",gchat:"\uD83D\uDE20"},love_eyes:{slack:"heart_eyes",gchat:"\uD83D\uDE0D"},cool:{slack:"sunglasses",gchat:"\uD83D\uDE0E"},wink:{slack:"wink",gchat:"\uD83D\uDE09"},surprised:{slack:"open_mouth",gchat:"\uD83D\uDE2E"},worried:{slack:"worried",gchat:"\uD83D\uDE1F"},confused:{slack:"confused",gchat:"\uD83D\uDE15"},neutral:{slack:"neutral_face",gchat:"\uD83D\uDE10"},sleeping:{slack:"sleeping",gchat:"\uD83D\uDE34"},sick:{slack:"nauseated_face",gchat:"\uD83E\uDD22"},mind_blown:{slack:"exploding_head",gchat:"\uD83E\uDD2F"},relieved:{slack:"relieved",gchat:"\uD83D\uDE0C"},grimace:{slack:"grimacing",gchat:"\uD83D\uDE2C"},rolling_eyes:{slack:"rolling_eyes",gchat:"\uD83D\uDE44"},hug:{slack:"hugging_face",gchat:"\uD83E\uDD17"},zany:{slack:"zany_face",gchat:"\uD83E\uDD2A"},check:{slack:["white_check_mark","heavy_check_mark"],gchat:["\u2705","\u2714\uFE0F"]},x:{slack:["x","heavy_multiplication_x"],gchat:["\u274C","\u2716\uFE0F"]},question:{slack:"question",gchat:["\u2753","?"]},exclamation:{slack:"exclamation",gchat:"\u2757"},warning:{slack:"warning",gchat:"\u26A0\uFE0F"},stop:{slack:"octagonal_sign",gchat:"\uD83D\uDED1"},info:{slack:"information_source",gchat:"\u2139\uFE0F"},"100":{slack:"100",gchat:"\uD83D\uDCAF"},fire:{slack:"fire",gchat:"\uD83D\uDD25"},star:{slack:"star",gchat:"\u2B50"},sparkles:{slack:"sparkles",gchat:"\u2728"},lightning:{slack:"zap",gchat:"\u26A1"},boom:{slack:"boom",gchat:"\uD83D\uDCA5"},eyes:{slack:"eyes",gchat:"\uD83D\uDC40"},green_circle:{slack:"large_green_circle",gchat:"\uD83D\uDFE2"},yellow_circle:{slack:"large_yellow_circle",gchat:"\uD83D\uDFE1"},red_circle:{slack:"red_circle",gchat:"\uD83D\uDD34"},blue_circle:{slack:"large_blue_circle",gchat:"\uD83D\uDD35"},white_circle:{slack:"white_circle",gchat:"\u26AA"},black_circle:{slack:"black_circle",gchat:"\u26AB"},rocket:{slack:"rocket",gchat:"\uD83D\uDE80"},party:{slack:["tada","partying_face"],gchat:["\uD83C\uDF89","\uD83E\uDD73"]},confetti:{slack:"confetti_ball",gchat:"\uD83C\uDF8A"},balloon:{slack:"balloon",gchat:"\uD83C\uDF88"},gift:{slack:"gift",gchat:"\uD83C\uDF81"},trophy:{slack:"trophy",gchat:"\uD83C\uDFC6"},medal:{slack:"first_place_medal",gchat:"\uD83E\uDD47"},lightbulb:{slack:"bulb",gchat:"\uD83D\uDCA1"},gear:{slack:"gear",gchat:"\u2699\uFE0F"},wrench:{slack:"wrench",gchat:"\uD83D\uDD27"},hammer:{slack:"hammer",gchat:"\uD83D\uDD28"},bug:{slack:"bug",gchat:"\uD83D\uDC1B"},link:{slack:"link",gchat:"\uD83D\uDD17"},lock:{slack:"lock",gchat:"\uD83D\uDD12"},unlock:{slack:"unlock",gchat:"\uD83D\uDD13"},key:{slack:"key",gchat:"\uD83D\uDD11"},pin:{slack:"pushpin",gchat:"\uD83D\uDCCC"},memo:{slack:"memo",gchat:"\uD83D\uDCDD"},clipboard:{slack:"clipboard",gchat:"\uD83D\uDCCB"},calendar:{slack:"calendar",gchat:"\uD83D\uDCC5"},clock:{slack:"clock1",gchat:"\uD83D\uDD50"},hourglass:{slack:"hourglass",gchat:"\u23F3"},bell:{slack:"bell",gchat:"\uD83D\uDD14"},megaphone:{slack:"mega",gchat:"\uD83D\uDCE2"},speech_bubble:{slack:"speech_balloon",gchat:"\uD83D\uDCAC"},email:{slack:"email",gchat:"\uD83D\uDCE7"},inbox:{slack:"inbox_tray",gchat:"\uD83D\uDCE5"},outbox:{slack:"outbox_tray",gchat:"\uD83D\uDCE4"},package:{slack:"package",gchat:"\uD83D\uDCE6"},folder:{slack:"file_folder",gchat:"\uD83D\uDCC1"},file:{slack:"page_facing_up",gchat:"\uD83D\uDCC4"},chart_up:{slack:"chart_with_upwards_trend",gchat:"\uD83D\uDCC8"},chart_down:{slack:"chart_with_downwards_trend",gchat:"\uD83D\uDCC9"},coffee:{slack:"coffee",gchat:"\u2615"},pizza:{slack:"pizza",gchat:"\uD83C\uDF55"},beer:{slack:"beer",gchat:"\uD83C\uDF7A"},arrow_up:{slack:"arrow_up",gchat:"\u2B06\uFE0F"},arrow_down:{slack:"arrow_down",gchat:"\u2B07\uFE0F"},arrow_left:{slack:"arrow_left",gchat:"\u2B05\uFE0F"},arrow_right:{slack:"arrow_right",gchat:"\u27A1\uFE0F"},refresh:{slack:"arrows_counterclockwise",gchat:"\uD83D\uDD04"},sun:{slack:"sunny",gchat:"\u2600\uFE0F"},cloud:{slack:"cloud",gchat:"\u2601\uFE0F"},rain:{slack:"rain_cloud",gchat:"\uD83C\uDF27\uFE0F"},snow:{slack:"snowflake",gchat:"\u2744\uFE0F"},rainbow:{slack:"rainbow",gchat:"\uD83C\uDF08"}},mf0=new M24,v49=/\{\{emoji:([a-z0-9_]+)\}\}/gi;y49=R24(),b49=ET,h49=MT,f49=um,g49=$$0,m49=_T,u49=fW4,p49=BT,d49=qT,c49=PT,l49=Rf0,i49=AT,n49=Mf0,r49=yW,a49=RT,s49=OT,o49=wT,t49=XU,e49=X$0,$69=qf0,Y69=dm,X69=CT,G69=jT,J69=kT,Q69=IT,W69=ST,K69=TT});function uf0($){if(!($&&U69($)&&$.name==="TypeError"&&typeof $.message==="string"))return!1;let{message:X,stack:G}=$;if(X==="Load failed"||X.startsWith("Load failed (")&&X.endsWith(")"))return G===void 0||"__sentry_captured__"in $;if(X.startsWith("error sending request for url"))return!0;if(X==="Failed to fetch"||X.startsWith("Failed to fetch (")&&X.endsWith(")"))return!0;return H69.has(X)}var Z69,U69=($)=>Z69.call($)==="[object Error]",H69;var w24=V0(()=>{Z69=Object.prototype.toString,H69=new Set(["network error","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"])});var j24={};W8(j24,{makeRetriable:()=>L69,default:()=>df0,AbortError:()=>pf0});function z69($){if(typeof $==="number"){if($<0)throw TypeError("Expected `retries` to be a non-negative number.");if(Number.isNaN($))throw TypeError("Expected `retries` to be a valid number or Infinity, got NaN.")}else if($!==void 0)throw TypeError("Expected `retries` to be a number or Infinity.")}function H$0($,Y,{min:X=0,allowInfinity:G=!1}={}){if(Y===void 0)return;if(typeof Y!=="number"||Number.isNaN(Y))throw TypeError(`Expected \`${$}\` to be a number${G?" or Infinity":""}.`);if(!G&&!Number.isFinite(Y))throw TypeError(`Expected \`${$}\` to be a finite number.`);if(Y<X)throw TypeError(`Expected \`${$}\` to be \u2265 ${X}.`)}function V69($,Y){let X=Math.max(1,$+1),G=Y.randomize?Math.random()+1:1,J=Math.round(G*Y.minTimeout*Y.factor**(X-1));return J=Math.min(J,Y.maxTimeout),J}function _24($,Y){if(!Number.isFinite(Y))return Y;return Y-(performance.now()-$)}async function F69({error:$,attemptNumber:Y,retriesConsumed:X,startTime:G,options:J}){let Q=$ instanceof Error?$:TypeError(`Non-error was thrown: "${$}". You should only throw errors.`);if(Q instanceof pf0)throw Q.originalError;let W=Number.isFinite(J.retries)?Math.max(0,J.retries-X):J.retries,K=J.maxRetryTime??Number.POSITIVE_INFINITY,Z=Object.freeze({error:Q,attemptNumber:Y,retriesLeft:W,retriesConsumed:X});if(await J.onFailedAttempt(Z),_24(G,K)<=0)throw Q;let H=await J.shouldConsumeRetry(Z),z=_24(G,K);if(z<=0||W<=0)throw Q;if(Q instanceof TypeError&&!uf0(Q)){if(H)throw Q;return J.signal?.throwIfAborted(),!1}if(!await J.shouldRetry(Z))throw Q;if(!H)return J.signal?.throwIfAborted(),!1;let V=V69(X,J),F=Math.min(V,z);if(J.signal?.throwIfAborted(),F>0)await new Promise((L,N)=>{let D=()=>{clearTimeout(A),J.signal?.removeEventListener("abort",D),N(J.signal.reason)},A=setTimeout(()=>{J.signal?.removeEventListener("abort",D),L()},F);if(J.unref)A.unref?.();J.signal?.addEventListener("abort",D,{once:!0})});return J.signal?.throwIfAborted(),!0}async function df0($,Y={}){if(Y={...Y},z69(Y.retries),Object.hasOwn(Y,"forever"))throw Error("The `forever` option is no longer supported. For many use-cases, you can set `retries: Infinity` instead.");if(Y.retries??=10,Y.factor??=2,Y.minTimeout??=1000,Y.maxTimeout??=Number.POSITIVE_INFINITY,Y.maxRetryTime??=Number.POSITIVE_INFINITY,Y.randomize??=!1,Y.onFailedAttempt??=()=>{},Y.shouldRetry??=()=>!0,Y.shouldConsumeRetry??=()=>!0,H$0("factor",Y.factor,{min:0,allowInfinity:!1}),H$0("minTimeout",Y.minTimeout,{min:0,allowInfinity:!1}),H$0("maxTimeout",Y.maxTimeout,{min:0,allowInfinity:!0}),H$0("maxRetryTime",Y.maxRetryTime,{min:0,allowInfinity:!0}),!(Y.factor>0))Y.factor=1;Y.signal?.throwIfAborted();let X=0,G=0,J=performance.now();while(Number.isFinite(Y.retries)?G<=Y.retries:!0){X++;try{Y.signal?.throwIfAborted();let Q=await $(X);return Y.signal?.throwIfAborted(),Q}catch(Q){if(await F69({error:Q,attemptNumber:X,retriesConsumed:G,startTime:J,options:Y}))G++}}throw Error("Retry attempts exhausted without throwing an error.")}function L69($,Y){return function(...X){return df0(()=>$.apply(this,X),Y)}}var pf0;var T24=V0(()=>{w24();pf0=class pf0 extends Error{constructor($){super();if($ instanceof Error)this.originalError=$,{message:$}=$;else this.originalError=Error($),this.originalError.stack=this.stack;this.name="AbortError",this.message=$}}});var D69,I24;var C24=V0(()=>{D69=[["\xDF","ss"],["\u1E9E","Ss"],["\xE4","ae"],["\xC4","Ae"],["\xF6","oe"],["\xD6","Oe"],["\xFC","ue"],["\xDC","Ue"],["\xC0","A"],["\xC1","A"],["\xC2","A"],["\xC3","A"],["\xC4","Ae"],["\xC5","A"],["\xC6","AE"],["\xC7","C"],["\xC8","E"],["\xC9","E"],["\xCA","E"],["\xCB","E"],["\xCC","I"],["\xCD","I"],["\xCE","I"],["\xCF","I"],["\xD0","D"],["\xD1","N"],["\xD2","O"],["\xD3","O"],["\xD4","O"],["\xD5","O"],["\xD6","Oe"],["\u0150","O"],["\xD8","O"],["\xD9","U"],["\xDA","U"],["\xDB","U"],["\xDC","Ue"],["\u0170","U"],["\xDD","Y"],["\xDE","TH"],["\xDF","ss"],["\xE0","a"],["\xE1","a"],["\xE2","a"],["\xE3","a"],["\xE4","ae"],["\xE5","a"],["\xE6","ae"],["\xE7","c"],["\xE8","e"],["\xE9","e"],["\xEA","e"],["\xEB","e"],["\xEC","i"],["\xED","i"],["\xEE","i"],["\xEF","i"],["\xF0","d"],["\xF1","n"],["\xF2","o"],["\xF3","o"],["\xF4","o"],["\xF5","o"],["\xF6","oe"],["\u0151","o"],["\xF8","o"],["\xF9","u"],["\xFA","u"],["\xFB","u"],["\xFC","ue"],["\u0171","u"],["\xFD","y"],["\xFE","th"],["\xFF","y"],["\u1E9E","SS"],["\xE0","a"],["\xC0","A"],["\xE1","a"],["\xC1","A"],["\xE2","a"],["\xC2","A"],["\xE3","a"],["\xC3","A"],["\xE8","e"],["\xC8","E"],["\xE9","e"],["\xC9","E"],["\xEA","e"],["\xCA","E"],["\xEC","i"],["\xCC","I"],["\xED","i"],["\xCD","I"],["\xF2","o"],["\xD2","O"],["\xF3","o"],["\xD3","O"],["\xF4","o"],["\xD4","O"],["\xF5","o"],["\xD5","O"],["\xF9","u"],["\xD9","U"],["\xFA","u"],["\xDA","U"],["\xFD","y"],["\xDD","Y"],["\u0103","a"],["\u0102","A"],["\u0110","D"],["\u0111","d"],["\u0129","i"],["\u0128","I"],["\u0169","u"],["\u0168","U"],["\u01A1","o"],["\u01A0","O"],["\u01B0","u"],["\u01AF","U"],["\u1EA1","a"],["\u1EA0","A"],["\u1EA3","a"],["\u1EA2","A"],["\u1EA5","a"],["\u1EA4","A"],["\u1EA7","a"],["\u1EA6","A"],["\u1EA9","a"],["\u1EA8","A"],["\u1EAB","a"],["\u1EAA","A"],["\u1EAD","a"],["\u1EAC","A"],["\u1EAF","a"],["\u1EAE","A"],["\u1EB1","a"],["\u1EB0","A"],["\u1EB3","a"],["\u1EB2","A"],["\u1EB5","a"],["\u1EB4","A"],["\u1EB7","a"],["\u1EB6","A"],["\u1EB9","e"],["\u1EB8","E"],["\u1EBB","e"],["\u1EBA","E"],["\u1EBD","e"],["\u1EBC","E"],["\u1EBF","e"],["\u1EBE","E"],["\u1EC1","e"],["\u1EC0","E"],["\u1EC3","e"],["\u1EC2","E"],["\u1EC5","e"],["\u1EC4","E"],["\u1EC7","e"],["\u1EC6","E"],["\u1EC9","i"],["\u1EC8","I"],["\u1ECB","i"],["\u1ECA","I"],["\u1ECD","o"],["\u1ECC","O"],["\u1ECF","o"],["\u1ECE","O"],["\u1ED1","o"],["\u1ED0","O"],["\u1ED3","o"],["\u1ED2","O"],["\u1ED5","o"],["\u1ED4","O"],["\u1ED7","o"],["\u1ED6","O"],["\u1ED9","o"],["\u1ED8","O"],["\u1EDB","o"],["\u1EDA","O"],["\u1EDD","o"],["\u1EDC","O"],["\u1EDF","o"],["\u1EDE","O"],["\u1EE1","o"],["\u1EE0","O"],["\u1EE3","o"],["\u1EE2","O"],["\u1EE5","u"],["\u1EE4","U"],["\u1EE7","u"],["\u1EE6","U"],["\u1EE9","u"],["\u1EE8","U"],["\u1EEB","u"],["\u1EEA","U"],["\u1EED","u"],["\u1EEC","U"],["\u1EEF","u"],["\u1EEE","U"],["\u1EF1","u"],["\u1EF0","U"],["\u1EF3","y"],["\u1EF2","Y"],["\u1EF5","y"],["\u1EF4","Y"],["\u1EF7","y"],["\u1EF6","Y"],["\u1EF9","y"],["\u1EF8","Y"],["\u0621","e"],["\u0622","a"],["\u0623","a"],["\u0624","w"],["\u0625","i"],["\u0626","y"],["\u0627","a"],["\u0628","b"],["\u0629","t"],["\u062A","t"],["\u062B","th"],["\u062C","j"],["\u062D","h"],["\u062E","kh"],["\u062F","d"],["\u0630","dh"],["\u0631","r"],["\u0632","z"],["\u0633","s"],["\u0634","sh"],["\u0635","s"],["\u0636","d"],["\u0637","t"],["\u0638","z"],["\u0639","e"],["\u063A","gh"],["\u0640","_"],["\u0641","f"],["\u0642","q"],["\u0643","k"],["\u0644","l"],["\u0645","m"],["\u0646","n"],["\u0647","h"],["\u0648","w"],["\u0649","a"],["\u064A","y"],["\u064E\u200E","a"],["\u064F","u"],["\u0650\u200E","i"],["\u0660","0"],["\u0661","1"],["\u0662","2"],["\u0663","3"],["\u0664","4"],["\u0665","5"],["\u0666","6"],["\u0667","7"],["\u0668","8"],["\u0669","9"],["\u0686","ch"],["\u06A9","k"],["\u06AF","g"],["\u067E","p"],["\u0698","zh"],["\u06CC","y"],["\u06F0","0"],["\u06F1","1"],["\u06F2","2"],["\u06F3","3"],["\u06F4","4"],["\u06F5","5"],["\u06F6","6"],["\u06F7","7"],["\u06F8","8"],["\u06F9","9"],["\u067C","p"],["\u0681","z"],["\u0685","c"],["\u0689","d"],["\uFEAB","d"],["\uFEAD","r"],["\u0693","r"],["\uFEAF","z"],["\u0696","g"],["\u069A","x"],["\u06AB","g"],["\u06BC","n"],["\u06C0","e"],["\u06D0","e"],["\u06CD","ai"],["\u0679","t"],["\u0688","d"],["\u0691","r"],["\u06BA","n"],["\u06C1","h"],["\u06BE","h"],["\u06D2","e"],["\u0410","A"],["\u0430","a"],["\u0411","B"],["\u0431","b"],["\u0412","V"],["\u0432","v"],["\u0413","G"],["\u0433","g"],["\u0414","D"],["\u0434","d"],["\u044A\u0435","ye"],["\u042A\u0435","Ye"],["\u044A\u0415","yE"],["\u042A\u0415","YE"],["\u0415","E"],["\u0435","e"],["\u0401","Yo"],["\u0451","yo"],["\u0416","Zh"],["\u0436","zh"],["\u0417","Z"],["\u0437","z"],["\u0418","I"],["\u0438","i"],["\u044B\u0439","iy"],["\u042B\u0439","Iy"],["\u042B\u0419","IY"],["\u044B\u0419","iY"],["\u0419","Y"],["\u0439","y"],["\u041A","K"],["\u043A","k"],["\u041B","L"],["\u043B","l"],["\u041C","M"],["\u043C","m"],["\u041D","N"],["\u043D","n"],["\u041E","O"],["\u043E","o"],["\u041F","P"],["\u043F","p"],["\u0420","R"],["\u0440","r"],["\u0421","S"],["\u0441","s"],["\u0422","T"],["\u0442","t"],["\u0423","U"],["\u0443","u"],["\u0424","F"],["\u0444","f"],["\u0425","Kh"],["\u0445","kh"],["\u0426","Ts"],["\u0446","ts"],["\u0427","Ch"],["\u0447","ch"],["\u0428","Sh"],["\u0448","sh"],["\u0429","Sch"],["\u0449","sch"],["\u042A",""],["\u044A",""],["\u042B","Y"],["\u044B","y"],["\u042C",""],["\u044C",""],["\u042D","E"],["\u044D","e"],["\u042E","Yu"],["\u044E","yu"],["\u042F","Ya"],["\u044F","ya"],["\u0103","a"],["\u0102","A"],["\u0219","s"],["\u0218","S"],["\u021B","t"],["\u021A","T"],["\u0163","t"],["\u0162","T"],["\u015F","s"],["\u015E","S"],["\xE7","c"],["\xC7","C"],["\u011F","g"],["\u011E","G"],["\u0131","i"],["\u0130","I"],["\u0561","a"],["\u0531","A"],["\u0562","b"],["\u0532","B"],["\u0563","g"],["\u0533","G"],["\u0564","d"],["\u0534","D"],["\u0565","ye"],["\u0535","Ye"],["\u0566","z"],["\u0536","Z"],["\u0567","e"],["\u0537","E"],["\u0568","y"],["\u0538","Y"],["\u0569","t"],["\u0539","T"],["\u056A","zh"],["\u053A","Zh"],["\u056B","i"],["\u053B","I"],["\u056C","l"],["\u053C","L"],["\u056D","kh"],["\u053D","Kh"],["\u056E","ts"],["\u053E","Ts"],["\u056F","k"],["\u053F","K"],["\u0570","h"],["\u0540","H"],["\u0571","dz"],["\u0541","Dz"],["\u0572","gh"],["\u0542","Gh"],["\u0573","tch"],["\u0543","Tch"],["\u0574","m"],["\u0544","M"],["\u0575","y"],["\u0545","Y"],["\u0576","n"],["\u0546","N"],["\u0577","sh"],["\u0547","Sh"],["\u0578","vo"],["\u0548","Vo"],["\u0579","ch"],["\u0549","Ch"],["\u057A","p"],["\u054A","P"],["\u057B","j"],["\u054B","J"],["\u057C","r"],["\u054C","R"],["\u057D","s"],["\u054D","S"],["\u057E","v"],["\u054E","V"],["\u057F","t"],["\u054F","T"],["\u0580","r"],["\u0550","R"],["\u0581","c"],["\u0551","C"],["\u0578\u0582","u"],["\u0548\u0552","U"],["\u0548\u0582","U"],["\u0583","p"],["\u0553","P"],["\u0584","q"],["\u0554","Q"],["\u0585","o"],["\u0555","O"],["\u0586","f"],["\u0556","F"],["\u0587","yev"],["\u10D0","a"],["\u10D1","b"],["\u10D2","g"],["\u10D3","d"],["\u10D4","e"],["\u10D5","v"],["\u10D6","z"],["\u10D7","t"],["\u10D8","i"],["\u10D9","k"],["\u10DA","l"],["\u10DB","m"],["\u10DC","n"],["\u10DD","o"],["\u10DE","p"],["\u10DF","zh"],["\u10E0","r"],["\u10E1","s"],["\u10E2","t"],["\u10E3","u"],["\u10E4","ph"],["\u10E5","q"],["\u10E6","gh"],["\u10E7","k"],["\u10E8","sh"],["\u10E9","ch"],["\u10EA","ts"],["\u10EB","dz"],["\u10EC","ts"],["\u10ED","tch"],["\u10EE","kh"],["\u10EF","j"],["\u10F0","h"],["\u010D","c"],["\u010F","d"],["\u011B","e"],["\u0148","n"],["\u0159","r"],["\u0161","s"],["\u0165","t"],["\u016F","u"],["\u017E","z"],["\u010C","C"],["\u010E","D"],["\u011A","E"],["\u0147","N"],["\u0158","R"],["\u0160","S"],["\u0164","T"],["\u016E","U"],["\u017D","Z"],["\u0780","h"],["\u0781","sh"],["\u0782","n"],["\u0783","r"],["\u0784","b"],["\u0785","lh"],["\u0786","k"],["\u0787","a"],["\u0788","v"],["\u0789","m"],["\u078A","f"],["\u078B","dh"],["\u078C","th"],["\u078D","l"],["\u078E","g"],["\u078F","gn"],["\u0790","s"],["\u0791","d"],["\u0792","z"],["\u0793","t"],["\u0794","y"],["\u0795","p"],["\u0796","j"],["\u0797","ch"],["\u0798","tt"],["\u0799","hh"],["\u079A","kh"],["\u079B","th"],["\u079C","z"],["\u079D","sh"],["\u079E","s"],["\u079F","d"],["\u07A0","t"],["\u07A1","z"],["\u07A2","a"],["\u07A3","gh"],["\u07A4","q"],["\u07A5","w"],["\u07A6","a"],["\u07A7","aa"],["\u07A8","i"],["\u07A9","ee"],["\u07AA","u"],["\u07AB","oo"],["\u07AC","e"],["\u07AD","ey"],["\u07AE","o"],["\u07AF","oa"],["\u07B0",""],["\u03B1","a"],["\u03B2","v"],["\u03B3","g"],["\u03B4","d"],["\u03B5","e"],["\u03B6","z"],["\u03B7","i"],["\u03B8","th"],["\u03B9","i"],["\u03BA","k"],["\u03BB","l"],["\u03BC","m"],["\u03BD","n"],["\u03BE","ks"],["\u03BF","o"],["\u03C0","p"],["\u03C1","r"],["\u03C3","s"],["\u03C4","t"],["\u03C5","y"],["\u03C6","f"],["\u03C7","x"],["\u03C8","ps"],["\u03C9","o"],["\u03AC","a"],["\u03AD","e"],["\u03AF","i"],["\u03CC","o"],["\u03CD","y"],["\u03AE","i"],["\u03CE","o"],["\u03C2","s"],["\u03CA","i"],["\u03B0","y"],["\u03CB","y"],["\u0390","i"],["\u0391","A"],["\u0392","B"],["\u0393","G"],["\u0394","D"],["\u0395","E"],["\u0396","Z"],["\u0397","I"],["\u0398","TH"],["\u0399","I"],["\u039A","K"],["\u039B","L"],["\u039C","M"],["\u039D","N"],["\u039E","KS"],["\u039F","O"],["\u03A0","P"],["\u03A1","R"],["\u03A3","S"],["\u03A4","T"],["\u03A5","Y"],["\u03A6","F"],["\u03A7","X"],["\u03A8","PS"],["\u03A9","O"],["\u0386","A"],["\u0388","E"],["\u038A","I"],["\u038C","O"],["\u038E","Y"],["\u0389","I"],["\u038F","O"],["\u03AA","I"],["\u03AB","Y"],["\u0101","a"],["\u0113","e"],["\u0123","g"],["\u012B","i"],["\u0137","k"],["\u013C","l"],["\u0146","n"],["\u016B","u"],["\u0100","A"],["\u0112","E"],["\u0122","G"],["\u012A","I"],["\u0136","K"],["\u013B","L"],["\u0145","N"],["\u016A","U"],["\u010D","c"],["\u0161","s"],["\u017E","z"],["\u010C","C"],["\u0160","S"],["\u017D","Z"],["\u0105","a"],["\u010D","c"],["\u0119","e"],["\u0117","e"],["\u012F","i"],["\u0161","s"],["\u0173","u"],["\u016B","u"],["\u017E","z"],["\u0104","A"],["\u010C","C"],["\u0118","E"],["\u0116","E"],["\u012E","I"],["\u0160","S"],["\u0172","U"],["\u016A","U"],["\u040C","Kj"],["\u045C","kj"],["\u0409","Lj"],["\u0459","lj"],["\u040A","Nj"],["\u045A","nj"],["\u0422\u0441","Ts"],["\u0442\u0441","ts"],["\u0105","a"],["\u0107","c"],["\u0119","e"],["\u0142","l"],["\u0144","n"],["\u015B","s"],["\u017A","z"],["\u017C","z"],["\u0104","A"],["\u0106","C"],["\u0118","E"],["\u0141","L"],["\u0143","N"],["\u015A","S"],["\u0179","Z"],["\u017B","Z"],["\u0404","Ye"],["\u0406","I"],["\u0407","Yi"],["\u0490","G"],["\u0454","ye"],["\u0456","i"],["\u0457","yi"],["\u0491","g"],["\u0132","IJ"],["\u0133","ij"],["\xA2","c"],["\xA5","Y"],["\u07FF","b"],["\u09F3","t"],["\u0AF1","Bo"],["\u0E3F","B"],["\u20A0","CE"],["\u20A1","C"],["\u20A2","Cr"],["\u20A3","F"],["\u20A5","m"],["\u20A6","N"],["\u20A7","Pt"],["\u20A8","Rs"],["\u20A9","W"],["\u20AB","s"],["\u20AC","E"],["\u20AD","K"],["\u20AE","T"],["\u20AF","Dp"],["\u20B0","S"],["\u20B1","P"],["\u20B2","G"],["\u20B3","A"],["\u20B4","S"],["\u20B5","C"],["\u20B6","tt"],["\u20B7","S"],["\u20B8","T"],["\u20B9","R"],["\u20BA","L"],["\u20BD","P"],["\u20BF","B"],["\uFE69","$"],["\uFFE0","c"],["\uFFE5","Y"],["\uFFE6","W"],["\uD835\uDC00","A"],["\uD835\uDC01","B"],["\uD835\uDC02","C"],["\uD835\uDC03","D"],["\uD835\uDC04","E"],["\uD835\uDC05","F"],["\uD835\uDC06","G"],["\uD835\uDC07","H"],["\uD835\uDC08","I"],["\uD835\uDC09","J"],["\uD835\uDC0A","K"],["\uD835\uDC0B","L"],["\uD835\uDC0C","M"],["\uD835\uDC0D","N"],["\uD835\uDC0E","O"],["\uD835\uDC0F","P"],["\uD835\uDC10","Q"],["\uD835\uDC11","R"],["\uD835\uDC12","S"],["\uD835\uDC13","T"],["\uD835\uDC14","U"],["\uD835\uDC15","V"],["\uD835\uDC16","W"],["\uD835\uDC17","X"],["\uD835\uDC18","Y"],["\uD835\uDC19","Z"],["\uD835\uDC1A","a"],["\uD835\uDC1B","b"],["\uD835\uDC1C","c"],["\uD835\uDC1D","d"],["\uD835\uDC1E","e"],["\uD835\uDC1F","f"],["\uD835\uDC20","g"],["\uD835\uDC21","h"],["\uD835\uDC22","i"],["\uD835\uDC23","j"],["\uD835\uDC24","k"],["\uD835\uDC25","l"],["\uD835\uDC26","m"],["\uD835\uDC27","n"],["\uD835\uDC28","o"],["\uD835\uDC29","p"],["\uD835\uDC2A","q"],["\uD835\uDC2B","r"],["\uD835\uDC2C","s"],["\uD835\uDC2D","t"],["\uD835\uDC2E","u"],["\uD835\uDC2F","v"],["\uD835\uDC30","w"],["\uD835\uDC31","x"],["\uD835\uDC32","y"],["\uD835\uDC33","z"],["\uD835\uDC34","A"],["\uD835\uDC35","B"],["\uD835\uDC36","C"],["\uD835\uDC37","D"],["\uD835\uDC38","E"],["\uD835\uDC39","F"],["\uD835\uDC3A","G"],["\uD835\uDC3B","H"],["\uD835\uDC3C","I"],["\uD835\uDC3D","J"],["\uD835\uDC3E","K"],["\uD835\uDC3F","L"],["\uD835\uDC40","M"],["\uD835\uDC41","N"],["\uD835\uDC42","O"],["\uD835\uDC43","P"],["\uD835\uDC44","Q"],["\uD835\uDC45","R"],["\uD835\uDC46","S"],["\uD835\uDC47","T"],["\uD835\uDC48","U"],["\uD835\uDC49","V"],["\uD835\uDC4A","W"],["\uD835\uDC4B","X"],["\uD835\uDC4C","Y"],["\uD835\uDC4D","Z"],["\uD835\uDC4E","a"],["\uD835\uDC4F","b"],["\uD835\uDC50","c"],["\uD835\uDC51","d"],["\uD835\uDC52","e"],["\uD835\uDC53","f"],["\uD835\uDC54","g"],["\uD835\uDC56","i"],["\uD835\uDC57","j"],["\uD835\uDC58","k"],["\uD835\uDC59","l"],["\uD835\uDC5A","m"],["\uD835\uDC5B","n"],["\uD835\uDC5C","o"],["\uD835\uDC5D","p"],["\uD835\uDC5E","q"],["\uD835\uDC5F","r"],["\uD835\uDC60","s"],["\uD835\uDC61","t"],["\uD835\uDC62","u"],["\uD835\uDC63","v"],["\uD835\uDC64","w"],["\uD835\uDC65","x"],["\uD835\uDC66","y"],["\uD835\uDC67","z"],["\uD835\uDC68","A"],["\uD835\uDC69","B"],["\uD835\uDC6A","C"],["\uD835\uDC6B","D"],["\uD835\uDC6C","E"],["\uD835\uDC6D","F"],["\uD835\uDC6E","G"],["\uD835\uDC6F","H"],["\uD835\uDC70","I"],["\uD835\uDC71","J"],["\uD835\uDC72","K"],["\uD835\uDC73","L"],["\uD835\uDC74","M"],["\uD835\uDC75","N"],["\uD835\uDC76","O"],["\uD835\uDC77","P"],["\uD835\uDC78","Q"],["\uD835\uDC79","R"],["\uD835\uDC7A","S"],["\uD835\uDC7B","T"],["\uD835\uDC7C","U"],["\uD835\uDC7D","V"],["\uD835\uDC7E","W"],["\uD835\uDC7F","X"],["\uD835\uDC80","Y"],["\uD835\uDC81","Z"],["\uD835\uDC82","a"],["\uD835\uDC83","b"],["\uD835\uDC84","c"],["\uD835\uDC85","d"],["\uD835\uDC86","e"],["\uD835\uDC87","f"],["\uD835\uDC88","g"],["\uD835\uDC89","h"],["\uD835\uDC8A","i"],["\uD835\uDC8B","j"],["\uD835\uDC8C","k"],["\uD835\uDC8D","l"],["\uD835\uDC8E","m"],["\uD835\uDC8F","n"],["\uD835\uDC90","o"],["\uD835\uDC91","p"],["\uD835\uDC92","q"],["\uD835\uDC93","r"],["\uD835\uDC94","s"],["\uD835\uDC95","t"],["\uD835\uDC96","u"],["\uD835\uDC97","v"],["\uD835\uDC98","w"],["\uD835\uDC99","x"],["\uD835\uDC9A","y"],["\uD835\uDC9B","z"],["\uD835\uDC9C","A"],["\uD835\uDC9E","C"],["\uD835\uDC9F","D"],["\uD835\uDCA2","g"],["\uD835\uDCA5","J"],["\uD835\uDCA6","K"],["\uD835\uDCA9","N"],["\uD835\uDCAA","O"],["\uD835\uDCAB","P"],["\uD835\uDCAC","Q"],["\uD835\uDCAE","S"],["\uD835\uDCAF","T"],["\uD835\uDCB0","U"],["\uD835\uDCB1","V"],["\uD835\uDCB2","W"],["\uD835\uDCB3","X"],["\uD835\uDCB4","Y"],["\uD835\uDCB5","Z"],["\uD835\uDCB6","a"],["\uD835\uDCB7","b"],["\uD835\uDCB8","c"],["\uD835\uDCB9","d"],["\uD835\uDCBB","f"],["\uD835\uDCBD","h"],["\uD835\uDCBE","i"],["\uD835\uDCBF","j"],["\uD835\uDCC0","h"],["\uD835\uDCC1","l"],["\uD835\uDCC2","m"],["\uD835\uDCC3","n"],["\uD835\uDCC5","p"],["\uD835\uDCC6","q"],["\uD835\uDCC7","r"],["\uD835\uDCC8","s"],["\uD835\uDCC9","t"],["\uD835\uDCCA","u"],["\uD835\uDCCB","v"],["\uD835\uDCCC","w"],["\uD835\uDCCD","x"],["\uD835\uDCCE","y"],["\uD835\uDCCF","z"],["\uD835\uDCD0","A"],["\uD835\uDCD1","B"],["\uD835\uDCD2","C"],["\uD835\uDCD3","D"],["\uD835\uDCD4","E"],["\uD835\uDCD5","F"],["\uD835\uDCD6","G"],["\uD835\uDCD7","H"],["\uD835\uDCD8","I"],["\uD835\uDCD9","J"],["\uD835\uDCDA","K"],["\uD835\uDCDB","L"],["\uD835\uDCDC","M"],["\uD835\uDCDD","N"],["\uD835\uDCDE","O"],["\uD835\uDCDF","P"],["\uD835\uDCE0","Q"],["\uD835\uDCE1","R"],["\uD835\uDCE2","S"],["\uD835\uDCE3","T"],["\uD835\uDCE4","U"],["\uD835\uDCE5","V"],["\uD835\uDCE6","W"],["\uD835\uDCE7","X"],["\uD835\uDCE8","Y"],["\uD835\uDCE9","Z"],["\uD835\uDCEA","a"],["\uD835\uDCEB","b"],["\uD835\uDCEC","c"],["\uD835\uDCED","d"],["\uD835\uDCEE","e"],["\uD835\uDCEF","f"],["\uD835\uDCF0","g"],["\uD835\uDCF1","h"],["\uD835\uDCF2","i"],["\uD835\uDCF3","j"],["\uD835\uDCF4","k"],["\uD835\uDCF5","l"],["\uD835\uDCF6","m"],["\uD835\uDCF7","n"],["\uD835\uDCF8","o"],["\uD835\uDCF9","p"],["\uD835\uDCFA","q"],["\uD835\uDCFB","r"],["\uD835\uDCFC","s"],["\uD835\uDCFD","t"],["\uD835\uDCFE","u"],["\uD835\uDCFF","v"],["\uD835\uDD00","w"],["\uD835\uDD01","x"],["\uD835\uDD02","y"],["\uD835\uDD03","z"],["\uD835\uDD04","A"],["\uD835\uDD05","B"],["\uD835\uDD07","D"],["\uD835\uDD08","E"],["\uD835\uDD09","F"],["\uD835\uDD0A","G"],["\uD835\uDD0D","J"],["\uD835\uDD0E","K"],["\uD835\uDD0F","L"],["\uD835\uDD10","M"],["\uD835\uDD11","N"],["\uD835\uDD12","O"],["\uD835\uDD13","P"],["\uD835\uDD14","Q"],["\uD835\uDD16","S"],["\uD835\uDD17","T"],["\uD835\uDD18","U"],["\uD835\uDD19","V"],["\uD835\uDD1A","W"],["\uD835\uDD1B","X"],["\uD835\uDD1C","Y"],["\uD835\uDD1E","a"],["\uD835\uDD1F","b"],["\uD835\uDD20","c"],["\uD835\uDD21","d"],["\uD835\uDD22","e"],["\uD835\uDD23","f"],["\uD835\uDD24","g"],["\uD835\uDD25","h"],["\uD835\uDD26","i"],["\uD835\uDD27","j"],["\uD835\uDD28","k"],["\uD835\uDD29","l"],["\uD835\uDD2A","m"],["\uD835\uDD2B","n"],["\uD835\uDD2C","o"],["\uD835\uDD2D","p"],["\uD835\uDD2E","q"],["\uD835\uDD2F","r"],["\uD835\uDD30","s"],["\uD835\uDD31","t"],["\uD835\uDD32","u"],["\uD835\uDD33","v"],["\uD835\uDD34","w"],["\uD835\uDD35","x"],["\uD835\uDD36","y"],["\uD835\uDD37","z"],["\uD835\uDD38","A"],["\uD835\uDD39","B"],["\uD835\uDD3B","D"],["\uD835\uDD3C","E"],["\uD835\uDD3D","F"],["\uD835\uDD3E","G"],["\uD835\uDD40","I"],["\uD835\uDD41","J"],["\uD835\uDD42","K"],["\uD835\uDD43","L"],["\uD835\uDD44","M"],["\uD835\uDD46","N"],["\uD835\uDD4A","S"],["\uD835\uDD4B","T"],["\uD835\uDD4C","U"],["\uD835\uDD4D","V"],["\uD835\uDD4E","W"],["\uD835\uDD4F","X"],["\uD835\uDD50","Y"],["\uD835\uDD52","a"],["\uD835\uDD53","b"],["\uD835\uDD54","c"],["\uD835\uDD55","d"],["\uD835\uDD56","e"],["\uD835\uDD57","f"],["\uD835\uDD58","g"],["\uD835\uDD59","h"],["\uD835\uDD5A","i"],["\uD835\uDD5B","j"],["\uD835\uDD5C","k"],["\uD835\uDD5D","l"],["\uD835\uDD5E","m"],["\uD835\uDD5F","n"],["\uD835\uDD60","o"],["\uD835\uDD61","p"],["\uD835\uDD62","q"],["\uD835\uDD63","r"],["\uD835\uDD64","s"],["\uD835\uDD65","t"],["\uD835\uDD66","u"],["\uD835\uDD67","v"],["\uD835\uDD68","w"],["\uD835\uDD69","x"],["\uD835\uDD6A","y"],["\uD835\uDD6B","z"],["\uD835\uDD6C","A"],["\uD835\uDD6D","B"],["\uD835\uDD6E","C"],["\uD835\uDD6F","D"],["\uD835\uDD70","E"],["\uD835\uDD71","F"],["\uD835\uDD72","G"],["\uD835\uDD73","H"],["\uD835\uDD74","I"],["\uD835\uDD75","J"],["\uD835\uDD76","K"],["\uD835\uDD77","L"],["\uD835\uDD78","M"],["\uD835\uDD79","N"],["\uD835\uDD7A","O"],["\uD835\uDD7B","P"],["\uD835\uDD7C","Q"],["\uD835\uDD7D","R"],["\uD835\uDD7E","S"],["\uD835\uDD7F","T"],["\uD835\uDD80","U"],["\uD835\uDD81","V"],["\uD835\uDD82","W"],["\uD835\uDD83","X"],["\uD835\uDD84","Y"],["\uD835\uDD85","Z"],["\uD835\uDD86","a"],["\uD835\uDD87","b"],["\uD835\uDD88","c"],["\uD835\uDD89","d"],["\uD835\uDD8A","e"],["\uD835\uDD8B","f"],["\uD835\uDD8C","g"],["\uD835\uDD8D","h"],["\uD835\uDD8E","i"],["\uD835\uDD8F","j"],["\uD835\uDD90","k"],["\uD835\uDD91","l"],["\uD835\uDD92","m"],["\uD835\uDD93","n"],["\uD835\uDD94","o"],["\uD835\uDD95","p"],["\uD835\uDD96","q"],["\uD835\uDD97","r"],["\uD835\uDD98","s"],["\uD835\uDD99","t"],["\uD835\uDD9A","u"],["\uD835\uDD9B","v"],["\uD835\uDD9C","w"],["\uD835\uDD9D","x"],["\uD835\uDD9E","y"],["\uD835\uDD9F","z"],["\uD835\uDDA0","A"],["\uD835\uDDA1","B"],["\uD835\uDDA2","C"],["\uD835\uDDA3","D"],["\uD835\uDDA4","E"],["\uD835\uDDA5","F"],["\uD835\uDDA6","G"],["\uD835\uDDA7","H"],["\uD835\uDDA8","I"],["\uD835\uDDA9","J"],["\uD835\uDDAA","K"],["\uD835\uDDAB","L"],["\uD835\uDDAC","M"],["\uD835\uDDAD","N"],["\uD835\uDDAE","O"],["\uD835\uDDAF","P"],["\uD835\uDDB0","Q"],["\uD835\uDDB1","R"],["\uD835\uDDB2","S"],["\uD835\uDDB3","T"],["\uD835\uDDB4","U"],["\uD835\uDDB5","V"],["\uD835\uDDB6","W"],["\uD835\uDDB7","X"],["\uD835\uDDB8","Y"],["\uD835\uDDB9","Z"],["\uD835\uDDBA","a"],["\uD835\uDDBB","b"],["\uD835\uDDBC","c"],["\uD835\uDDBD","d"],["\uD835\uDDBE","e"],["\uD835\uDDBF","f"],["\uD835\uDDC0","g"],["\uD835\uDDC1","h"],["\uD835\uDDC2","i"],["\uD835\uDDC3","j"],["\uD835\uDDC4","k"],["\uD835\uDDC5","l"],["\uD835\uDDC6","m"],["\uD835\uDDC7","n"],["\uD835\uDDC8","o"],["\uD835\uDDC9","p"],["\uD835\uDDCA","q"],["\uD835\uDDCB","r"],["\uD835\uDDCC","s"],["\uD835\uDDCD","t"],["\uD835\uDDCE","u"],["\uD835\uDDCF","v"],["\uD835\uDDD0","w"],["\uD835\uDDD1","x"],["\uD835\uDDD2","y"],["\uD835\uDDD3","z"],["\uD835\uDDD4","A"],["\uD835\uDDD5","B"],["\uD835\uDDD6","C"],["\uD835\uDDD7","D"],["\uD835\uDDD8","E"],["\uD835\uDDD9","F"],["\uD835\uDDDA","G"],["\uD835\uDDDB","H"],["\uD835\uDDDC","I"],["\uD835\uDDDD","J"],["\uD835\uDDDE","K"],["\uD835\uDDDF","L"],["\uD835\uDDE0","M"],["\uD835\uDDE1","N"],["\uD835\uDDE2","O"],["\uD835\uDDE3","P"],["\uD835\uDDE4","Q"],["\uD835\uDDE5","R"],["\uD835\uDDE6","S"],["\uD835\uDDE7","T"],["\uD835\uDDE8","U"],["\uD835\uDDE9","V"],["\uD835\uDDEA","W"],["\uD835\uDDEB","X"],["\uD835\uDDEC","Y"],["\uD835\uDDED","Z"],["\uD835\uDDEE","a"],["\uD835\uDDEF","b"],["\uD835\uDDF0","c"],["\uD835\uDDF1","d"],["\uD835\uDDF2","e"],["\uD835\uDDF3","f"],["\uD835\uDDF4","g"],["\uD835\uDDF5","h"],["\uD835\uDDF6","i"],["\uD835\uDDF7","j"],["\uD835\uDDF8","k"],["\uD835\uDDF9","l"],["\uD835\uDDFA","m"],["\uD835\uDDFB","n"],["\uD835\uDDFC","o"],["\uD835\uDDFD","p"],["\uD835\uDDFE","q"],["\uD835\uDDFF","r"],["\uD835\uDE00","s"],["\uD835\uDE01","t"],["\uD835\uDE02","u"],["\uD835\uDE03","v"],["\uD835\uDE04","w"],["\uD835\uDE05","x"],["\uD835\uDE06","y"],["\uD835\uDE07","z"],["\uD835\uDE08","A"],["\uD835\uDE09","B"],["\uD835\uDE0A","C"],["\uD835\uDE0B","D"],["\uD835\uDE0C","E"],["\uD835\uDE0D","F"],["\uD835\uDE0E","G"],["\uD835\uDE0F","H"],["\uD835\uDE10","I"],["\uD835\uDE11","J"],["\uD835\uDE12","K"],["\uD835\uDE13","L"],["\uD835\uDE14","M"],["\uD835\uDE15","N"],["\uD835\uDE16","O"],["\uD835\uDE17","P"],["\uD835\uDE18","Q"],["\uD835\uDE19","R"],["\uD835\uDE1A","S"],["\uD835\uDE1B","T"],["\uD835\uDE1C","U"],["\uD835\uDE1D","V"],["\uD835\uDE1E","W"],["\uD835\uDE1F","X"],["\uD835\uDE20","Y"],["\uD835\uDE21","Z"],["\uD835\uDE22","a"],["\uD835\uDE23","b"],["\uD835\uDE24","c"],["\uD835\uDE25","d"],["\uD835\uDE26","e"],["\uD835\uDE27","f"],["\uD835\uDE28","g"],["\uD835\uDE29","h"],["\uD835\uDE2A","i"],["\uD835\uDE2B","j"],["\uD835\uDE2C","k"],["\uD835\uDE2D","l"],["\uD835\uDE2E","m"],["\uD835\uDE2F","n"],["\uD835\uDE30","o"],["\uD835\uDE31","p"],["\uD835\uDE32","q"],["\uD835\uDE33","r"],["\uD835\uDE34","s"],["\uD835\uDE35","t"],["\uD835\uDE36","u"],["\uD835\uDE37","v"],["\uD835\uDE38","w"],["\uD835\uDE39","x"],["\uD835\uDE3A","y"],["\uD835\uDE3B","z"],["\uD835\uDE3C","A"],["\uD835\uDE3D","B"],["\uD835\uDE3E","C"],["\uD835\uDE3F","D"],["\uD835\uDE40","E"],["\uD835\uDE41","F"],["\uD835\uDE42","G"],["\uD835\uDE43","H"],["\uD835\uDE44","I"],["\uD835\uDE45","J"],["\uD835\uDE46","K"],["\uD835\uDE47","L"],["\uD835\uDE48","M"],["\uD835\uDE49","N"],["\uD835\uDE4A","O"],["\uD835\uDE4B","P"],["\uD835\uDE4C","Q"],["\uD835\uDE4D","R"],["\uD835\uDE4E","S"],["\uD835\uDE4F","T"],["\uD835\uDE50","U"],["\uD835\uDE51","V"],["\uD835\uDE52","W"],["\uD835\uDE53","X"],["\uD835\uDE54","Y"],["\uD835\uDE55","Z"],["\uD835\uDE56","a"],["\uD835\uDE57","b"],["\uD835\uDE58","c"],["\uD835\uDE59","d"],["\uD835\uDE5A","e"],["\uD835\uDE5B","f"],["\uD835\uDE5C","g"],["\uD835\uDE5D","h"],["\uD835\uDE5E","i"],["\uD835\uDE5F","j"],["\uD835\uDE60","k"],["\uD835\uDE61","l"],["\uD835\uDE62","m"],["\uD835\uDE63","n"],["\uD835\uDE64","o"],["\uD835\uDE65","p"],["\uD835\uDE66","q"],["\uD835\uDE67","r"],["\uD835\uDE68","s"],["\uD835\uDE69","t"],["\uD835\uDE6A","u"],["\uD835\uDE6B","v"],["\uD835\uDE6C","w"],["\uD835\uDE6D","x"],["\uD835\uDE6E","y"],["\uD835\uDE6F","z"],["\uD835\uDE70","A"],["\uD835\uDE71","B"],["\uD835\uDE72","C"],["\uD835\uDE73","D"],["\uD835\uDE74","E"],["\uD835\uDE75","F"],["\uD835\uDE76","G"],["\uD835\uDE77","H"],["\uD835\uDE78","I"],["\uD835\uDE79","J"],["\uD835\uDE7A","K"],["\uD835\uDE7B","L"],["\uD835\uDE7C","M"],["\uD835\uDE7D","N"],["\uD835\uDE7E","O"],["\uD835\uDE7F","P"],["\uD835\uDE80","Q"],["\uD835\uDE81","R"],["\uD835\uDE82","S"],["\uD835\uDE83","T"],["\uD835\uDE84","U"],["\uD835\uDE85","V"],["\uD835\uDE86","W"],["\uD835\uDE87","X"],["\uD835\uDE88","Y"],["\uD835\uDE89","Z"],["\uD835\uDE8A","a"],["\uD835\uDE8B","b"],["\uD835\uDE8C","c"],["\uD835\uDE8D","d"],["\uD835\uDE8E","e"],["\uD835\uDE8F","f"],["\uD835\uDE90","g"],["\uD835\uDE91","h"],["\uD835\uDE92","i"],["\uD835\uDE93","j"],["\uD835\uDE94","k"],["\uD835\uDE95","l"],["\uD835\uDE96","m"],["\uD835\uDE97","n"],["\uD835\uDE98","o"],["\uD835\uDE99","p"],["\uD835\uDE9A","q"],["\uD835\uDE9B","r"],["\uD835\uDE9C","s"],["\uD835\uDE9D","t"],["\uD835\uDE9E","u"],["\uD835\uDE9F","v"],["\uD835\uDEA0","w"],["\uD835\uDEA1","x"],["\uD835\uDEA2","y"],["\uD835\uDEA3","z"],["\uD835\uDEA4","l"],["\uD835\uDEA5","j"],["\uD835\uDEE2","A"],["\uD835\uDEE3","B"],["\uD835\uDEE4","G"],["\uD835\uDEE5","D"],["\uD835\uDEE6","E"],["\uD835\uDEE7","Z"],["\uD835\uDEE8","I"],["\uD835\uDEE9","TH"],["\uD835\uDEEA","I"],["\uD835\uDEEB","K"],["\uD835\uDEEC","L"],["\uD835\uDEED","M"],["\uD835\uDEEE","N"],["\uD835\uDEEF","KS"],["\uD835\uDEF0","O"],["\uD835\uDEF1","P"],["\uD835\uDEF2","R"],["\uD835\uDEF3","TH"],["\uD835\uDEF4","S"],["\uD835\uDEF5","T"],["\uD835\uDEF6","Y"],["\uD835\uDEF7","F"],["\uD835\uDEF8","x"],["\uD835\uDEF9","PS"],["\uD835\uDEFA","O"],["\uD835\uDEFB","D"],["\uD835\uDEFC","a"],["\uD835\uDEFD","b"],["\uD835\uDEFE","g"],["\uD835\uDEFF","d"],["\uD835\uDF00","e"],["\uD835\uDF01","z"],["\uD835\uDF02","i"],["\uD835\uDF03","th"],["\uD835\uDF04","i"],["\uD835\uDF05","k"],["\uD835\uDF06","l"],["\uD835\uDF07","m"],["\uD835\uDF08","n"],["\uD835\uDF09","ks"],["\uD835\uDF0A","o"],["\uD835\uDF0B","p"],["\uD835\uDF0C","r"],["\uD835\uDF0D","s"],["\uD835\uDF0E","s"],["\uD835\uDF0F","t"],["\uD835\uDF10","y"],["\uD835\uDF11","f"],["\uD835\uDF12","x"],["\uD835\uDF13","ps"],["\uD835\uDF14","o"],["\uD835\uDF15","d"],["\uD835\uDF16","E"],["\uD835\uDF17","TH"],["\uD835\uDF18","K"],["\uD835\uDF19","f"],["\uD835\uDF1A","r"],["\uD835\uDF1B","p"],["\uD835\uDF1C","A"],["\uD835\uDF1D","V"],["\uD835\uDF1E","G"],["\uD835\uDF1F","D"],["\uD835\uDF20","E"],["\uD835\uDF21","Z"],["\uD835\uDF22","I"],["\uD835\uDF23","TH"],["\uD835\uDF24","I"],["\uD835\uDF25","K"],["\uD835\uDF26","L"],["\uD835\uDF27","M"],["\uD835\uDF28","N"],["\uD835\uDF29","KS"],["\uD835\uDF2A","O"],["\uD835\uDF2B","P"],["\uD835\uDF2C","S"],["\uD835\uDF2D","TH"],["\uD835\uDF2E","S"],["\uD835\uDF2F","T"],["\uD835\uDF30","Y"],["\uD835\uDF31","F"],["\uD835\uDF32","X"],["\uD835\uDF33","PS"],["\uD835\uDF34","O"],["\uD835\uDF35","D"],["\uD835\uDF36","a"],["\uD835\uDF37","v"],["\uD835\uDF38","g"],["\uD835\uDF39","d"],["\uD835\uDF3A","e"],["\uD835\uDF3B","z"],["\uD835\uDF3C","i"],["\uD835\uDF3D","th"],["\uD835\uDF3E","i"],["\uD835\uDF3F","k"],["\uD835\uDF40","l"],["\uD835\uDF41","m"],["\uD835\uDF42","n"],["\uD835\uDF43","ks"],["\uD835\uDF44","o"],["\uD835\uDF45","p"],["\uD835\uDF46","r"],["\uD835\uDF47","s"],["\uD835\uDF48","s"],["\uD835\uDF49","t"],["\uD835\uDF4A","y"],["\uD835\uDF4B","f"],["\uD835\uDF4C","x"],["\uD835\uDF4D","ps"],["\uD835\uDF4E","o"],["\uD835\uDF4F","a"],["\uD835\uDF50","e"],["\uD835\uDF51","i"],["\uD835\uDF52","k"],["\uD835\uDF53","f"],["\uD835\uDF54","r"],["\uD835\uDF55","p"],["\uD835\uDF56","A"],["\uD835\uDF57","B"],["\uD835\uDF58","G"],["\uD835\uDF59","D"],["\uD835\uDF5A","E"],["\uD835\uDF5B","Z"],["\uD835\uDF5C","I"],["\uD835\uDF5D","TH"],["\uD835\uDF5E","I"],["\uD835\uDF5F","K"],["\uD835\uDF60","L"],["\uD835\uDF61","M"],["\uD835\uDF62","N"],["\uD835\uDF63","KS"],["\uD835\uDF64","O"],["\uD835\uDF65","P"],["\uD835\uDF66","R"],["\uD835\uDF67","TH"],["\uD835\uDF68","S"],["\uD835\uDF69","T"],["\uD835\uDF6A","Y"],["\uD835\uDF6B","F"],["\uD835\uDF6C","X"],["\uD835\uDF6D","PS"],["\uD835\uDF6E","O"],["\uD835\uDF6F","D"],["\uD835\uDF70","a"],["\uD835\uDF71","v"],["\uD835\uDF72","g"],["\uD835\uDF73","d"],["\uD835\uDF74","e"],["\uD835\uDF75","z"],["\uD835\uDF76","i"],["\uD835\uDF77","th"],["\uD835\uDF78","i"],["\uD835\uDF79","k"],["\uD835\uDF7A","l"],["\uD835\uDF7B","m"],["\uD835\uDF7C","n"],["\uD835\uDF7D","ks"],["\uD835\uDF7E","o"],["\uD835\uDF7F","p"],["\uD835\uDF80","r"],["\uD835\uDF81","s"],["\uD835\uDF82","s"],["\uD835\uDF83","t"],["\uD835\uDF84","y"],["\uD835\uDF85","f"],["\uD835\uDF86","x"],["\uD835\uDF87","ps"],["\uD835\uDF88","o"],["\uD835\uDF89","a"],["\uD835\uDF8A","e"],["\uD835\uDF8B","i"],["\uD835\uDF8C","k"],["\uD835\uDF8D","f"],["\uD835\uDF8E","r"],["\uD835\uDF8F","p"],["\uD835\uDF90","A"],["\uD835\uDF91","V"],["\uD835\uDF92","G"],["\uD835\uDF93","D"],["\uD835\uDF94","E"],["\uD835\uDF95","Z"],["\uD835\uDF96","I"],["\uD835\uDF97","TH"],["\uD835\uDF98","I"],["\uD835\uDF99","K"],["\uD835\uDF9A","L"],["\uD835\uDF9B","M"],["\uD835\uDF9C","N"],["\uD835\uDF9D","KS"],["\uD835\uDF9E","O"],["\uD835\uDF9F","P"],["\uD835\uDFA0","S"],["\uD835\uDFA1","TH"],["\uD835\uDFA2","S"],["\uD835\uDFA3","T"],["\uD835\uDFA4","Y"],["\uD835\uDFA5","F"],["\uD835\uDFA6","X"],["\uD835\uDFA7","PS"],["\uD835\uDFA8","O"],["\uD835\uDFA9","D"],["\uD835\uDFAA","av"],["\uD835\uDFAB","g"],["\uD835\uDFAC","d"],["\uD835\uDFAD","e"],["\uD835\uDFAE","z"],["\uD835\uDFAF","i"],["\uD835\uDFB0","i"],["\uD835\uDFB1","th"],["\uD835\uDFB2","i"],["\uD835\uDFB3","k"],["\uD835\uDFB4","l"],["\uD835\uDFB5","m"],["\uD835\uDFB6","n"],["\uD835\uDFB7","ks"],["\uD835\uDFB8","o"],["\uD835\uDFB9","p"],["\uD835\uDFBA","r"],["\uD835\uDFBB","s"],["\uD835\uDFBC","s"],["\uD835\uDFBD","t"],["\uD835\uDFBE","y"],["\uD835\uDFBF","f"],["\uD835\uDFC0","x"],["\uD835\uDFC1","ps"],["\uD835\uDFC2","o"],["\uD835\uDFC3","a"],["\uD835\uDFC4","e"],["\uD835\uDFC5","i"],["\uD835\uDFC6","k"],["\uD835\uDFC7","f"],["\uD835\uDFC8","r"],["\uD835\uDFC9","p"],["\uD835\uDFCA","F"],["\uD835\uDFCB","f"],["\u249C","(a)"],["\u249D","(b)"],["\u249E","(c)"],["\u249F","(d)"],["\u24A0","(e)"],["\u24A1","(f)"],["\u24A2","(g)"],["\u24A3","(h)"],["\u24A4","(i)"],["\u24A5","(j)"],["\u24A6","(k)"],["\u24A7","(l)"],["\u24A8","(m)"],["\u24A9","(n)"],["\u24AA","(o)"],["\u24AB","(p)"],["\u24AC","(q)"],["\u24AD","(r)"],["\u24AE","(s)"],["\u24AF","(t)"],["\u24B0","(u)"],["\u24B1","(v)"],["\u24B2","(w)"],["\u24B3","(x)"],["\u24B4","(y)"],["\u24B5","(z)"],["\u24B6","(A)"],["\u24B7","(B)"],["\u24B8","(C)"],["\u24B9","(D)"],["\u24BA","(E)"],["\u24BB","(F)"],["\u24BC","(G)"],["\u24BD","(H)"],["\u24BE","(I)"],["\u24BF","(J)"],["\u24C0","(K)"],["\u24C1","(L)"],["\u24C3","(N)"],["\u24C4","(O)"],["\u24C5","(P)"],["\u24C6","(Q)"],["\u24C7","(R)"],["\u24C8","(S)"],["\u24C9","(T)"],["\u24CA","(U)"],["\u24CB","(V)"],["\u24CC","(W)"],["\u24CD","(X)"],["\u24CE","(Y)"],["\u24CF","(Z)"],["\u24D0","(a)"],["\u24D1","(b)"],["\u24D2","(b)"],["\u24D3","(c)"],["\u24D4","(e)"],["\u24D5","(f)"],["\u24D6","(g)"],["\u24D7","(h)"],["\u24D8","(i)"],["\u24D9","(j)"],["\u24DA","(k)"],["\u24DB","(l)"],["\u24DC","(m)"],["\u24DD","(n)"],["\u24DE","(o)"],["\u24DF","(p)"],["\u24E0","(q)"],["\u24E1","(r)"],["\u24E2","(s)"],["\u24E3","(t)"],["\u24E4","(u)"],["\u24E5","(v)"],["\u24E6","(w)"],["\u24E7","(x)"],["\u24E8","(y)"],["\u24E9","(z)"],["\u010A","C"],["\u010B","c"],["\u0120","G"],["\u0121","g"],["\u0126","H"],["\u0127","h"],["\u017B","Z"],["\u017C","z"],["\uD835\uDFCE","0"],["\uD835\uDFCF","1"],["\uD835\uDFD0","2"],["\uD835\uDFD1","3"],["\uD835\uDFD2","4"],["\uD835\uDFD3","5"],["\uD835\uDFD4","6"],["\uD835\uDFD5","7"],["\uD835\uDFD6","8"],["\uD835\uDFD7","9"],["\uD835\uDFD8","0"],["\uD835\uDFD9","1"],["\uD835\uDFDA","2"],["\uD835\uDFDB","3"],["\uD835\uDFDC","4"],["\uD835\uDFDD","5"],["\uD835\uDFDE","6"],["\uD835\uDFDF","7"],["\uD835\uDFE0","8"],["\uD835\uDFE1","9"],["\uD835\uDFE2","0"],["\uD835\uDFE3","1"],["\uD835\uDFE4","2"],["\uD835\uDFE5","3"],["\uD835\uDFE6","4"],["\uD835\uDFE7","5"],["\uD835\uDFE8","6"],["\uD835\uDFE9","7"],["\uD835\uDFEA","8"],["\uD835\uDFEB","9"],["\uD835\uDFEC","0"],["\uD835\uDFED","1"],["\uD835\uDFEE","2"],["\uD835\uDFEF","3"],["\uD835\uDFF0","4"],["\uD835\uDFF1","5"],["\uD835\uDFF2","6"],["\uD835\uDFF3","7"],["\uD835\uDFF4","8"],["\uD835\uDFF5","9"],["\uD835\uDFF6","0"],["\uD835\uDFF7","1"],["\uD835\uDFF8","2"],["\uD835\uDFF9","3"],["\uD835\uDFFA","4"],["\uD835\uDFFB","5"],["\uD835\uDFFC","6"],["\uD835\uDFFD","7"],["\uD835\uDFFE","8"],["\uD835\uDFFF","9"],["\u2460","1"],["\u2461","2"],["\u2462","3"],["\u2463","4"],["\u2464","5"],["\u2465","6"],["\u2466","7"],["\u2467","8"],["\u2468","9"],["\u2469","10"],["\u246A","11"],["\u246B","12"],["\u246C","13"],["\u246D","14"],["\u246E","15"],["\u246F","16"],["\u2470","17"],["\u2471","18"],["\u2472","19"],["\u2473","20"],["\u2474","1"],["\u2475","2"],["\u2476","3"],["\u2477","4"],["\u2478","5"],["\u2479","6"],["\u247A","7"],["\u247B","8"],["\u247C","9"],["\u247D","10"],["\u247E","11"],["\u247F","12"],["\u2480","13"],["\u2481","14"],["\u2482","15"],["\u2483","16"],["\u2484","17"],["\u2485","18"],["\u2486","19"],["\u2487","20"],["\u2488","1."],["\u2489","2."],["\u248A","3."],["\u248B","4."],["\u248C","5."],["\u248D","6."],["\u248E","7."],["\u248F","8."],["\u2490","9."],["\u2491","10."],["\u2492","11."],["\u2493","12."],["\u2494","13."],["\u2495","14."],["\u2496","15."],["\u2497","16."],["\u2498","17."],["\u2499","18."],["\u249A","19."],["\u249B","20."],["\u24EA","0"],["\u24EB","11"],["\u24EC","12"],["\u24ED","13"],["\u24EE","14"],["\u24EF","15"],["\u24F0","16"],["\u24F1","17"],["\u24F2","18"],["\u24F3","19"],["\u24F4","20"],["\u24F5","1"],["\u24F6","2"],["\u24F7","3"],["\u24F8","4"],["\u24F9","5"],["\u24FA","6"],["\u24FB","7"],["\u24FC","8"],["\u24FD","9"],["\u24FE","10"],["\u24FF","0"],["\uD83D\uDE70","&"],["\uD83D\uDE71","&"],["\uD83D\uDE72","&"],["\uD83D\uDE73","&"],["\uD83D\uDE74","&"],["\uD83D\uDE75","&"],["\uD83D\uDE76",'"'],["\uD83D\uDE77",'"'],["\uD83D\uDE78",'"'],["\u203D","?!"],["\uD83D\uDE79","?!"],["\uD83D\uDE7A","?!"],["\uD83D\uDE7B","?!"],["\uD83D\uDE7C","/"],["\uD83D\uDE7D","\\"],["\uD83D\uDF07","AR"],["\uD83D\uDF08","V"],["\uD83D\uDF09","V"],["\uD83D\uDF06","VR"],["\uD83D\uDF05","VF"],["\uD83D\uDF29","2"],["\uD83D\uDF2A","5"],["\uD83D\uDF61","f"],["\uD83D\uDF62","W"],["\uD83D\uDF63","U"],["\uD83D\uDF67","V"],["\uD83D\uDF68","T"],["\uD83D\uDF6A","V"],["\uD83D\uDF6B","MB"],["\uD83D\uDF6C","VB"],["\uD83D\uDF72","3B"],["\uD83D\uDF73","3B"],["\uD83D\uDCAF","100"],["\uD83D\uDD19","BACK"],["\uD83D\uDD1A","END"],["\uD83D\uDD1B","ON!"],["\uD83D\uDD1C","SOON"],["\uD83D\uDD1D","TOP"],["\uD83D\uDD1E","18"],["\uD83D\uDD24","abc"],["\uD83D\uDD20","ABCD"],["\uD83D\uDD21","abcd"],["\uD83D\uDD22","1234"],["\uD83D\uDD23","T&@%"],["#\uFE0F\u20E3","#"],["*\uFE0F\u20E3","*"],["0\uFE0F\u20E3","0"],["1\uFE0F\u20E3","1"],["2\uFE0F\u20E3","2"],["3\uFE0F\u20E3","3"],["4\uFE0F\u20E3","4"],["5\uFE0F\u20E3","5"],["6\uFE0F\u20E3","6"],["7\uFE0F\u20E3","7"],["8\uFE0F\u20E3","8"],["9\uFE0F\u20E3","9"],["\uD83D\uDD1F","10"],["\uD83C\uDD70\uFE0F","A"],["\uD83C\uDD71\uFE0F","B"],["\uD83C\uDD8E","AB"],["\uD83C\uDD91","CL"],["\uD83C\uDD7E\uFE0F","O"],["\uD83C\uDD7F","P"],["\uD83C\uDD98","SOS"],["\uD83C\uDD72","C"],["\uD83C\uDD73","D"],["\uD83C\uDD74","E"],["\uD83C\uDD75","F"],["\uD83C\uDD76","G"],["\uD83C\uDD77","H"],["\uD83C\uDD78","I"],["\uD83C\uDD79","J"],["\uD83C\uDD7A","K"],["\uD83C\uDD7B","L"],["\uD83C\uDD7C","M"],["\uD83C\uDD7D","N"],["\uD83C\uDD80","Q"],["\uD83C\uDD81","R"],["\uD83C\uDD82","S"],["\uD83C\uDD83","T"],["\uD83C\uDD84","U"],["\uD83C\uDD85","V"],["\uD83C\uDD86","W"],["\uD83C\uDD87","X"],["\uD83C\uDD88","Y"],["\uD83C\uDD89","Z"]],I24=D69});function cf0($,Y){if(typeof $!=="string")throw TypeError(`Expected a string, got \`${typeof $}\``);Y={customReplacements:[],...Y};let X=new Map([...I24,...Y.customReplacements]);return $=$.normalize(),$=N69($,X),$=$.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),$}var N69=($,Y)=>{for(let[X,G]of Y)$=$.replace(new RegExp(RD(X),"g"),G);return $};var S24=V0(()=>{C24()});var A69,k24;var v24=V0(()=>{A69=[["&"," and "],["\uD83E\uDD84"," unicorn "],["\u2665"," love "]],k24=A69});var x24={};W8(x24,{slugifyWithCounter:()=>M69,default:()=>rm});function rm($,Y){if(typeof $!=="string")throw TypeError(`Expected a string, got \`${typeof $}\``);Y={separator:"-",lowercase:!0,decamelize:!0,customReplacements:[],preserveLeadingUnderscore:!1,preserveTrailingDash:!1,preserveCharacters:[],...Y};let X=Y.preserveLeadingUnderscore&&$.startsWith("_"),G=Y.preserveTrailingDash&&$.endsWith("-"),J=new Map([...k24,...Y.customReplacements]);if($=cf0($,{customReplacements:J}),Y.decamelize)$=B69($);let Q=E69(Y);if(Y.lowercase)$=$.toLowerCase();if($=$.replace(/([a-zA-Z\d]+)'([ts])(\s|$)/g,"$1$2$3"),$=$.replace(Q,Y.separator),$=$.replace(/\\/g,""),Y.separator)$=O69($,Y.separator);if(X)$=`_${$}`;if(G)$=`${$}-`;return $}function M69(){let $=new Map,Y=(X,G)=>{if(X=rm(X,G),!X)return"";let J=X.toLowerCase(),Q=$.get(J.replace(/(?:-\d+?)+?$/,""))||0,W=$.get(J);$.set(J,typeof W==="number"?W+1:1);let K=$.get(J)||2;if(K>=2||Q>2)X=`${X}-${K}`;return X};return Y.reset=()=>{$.clear()},Y}var B69=($)=>{return $.replace(/([A-Z]{2,})(\d+)/g,"$1 $2").replace(/([a-z\d]+)([A-Z]{2,})/g,"$1 $2").replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-rt-z\d]+)/g,"$1 $2")},O69=($,Y)=>{let X=RD(Y);return $.replace(new RegExp(`${X}{2,}`,"g"),Y).replace(new RegExp(`^${X}|${X}$`,"g"),"")},E69=($)=>{let Y="a-z\\d";if(Y+=$.lowercase?"":"A-Z",$.preserveCharacters.length>0)for(let X of $.preserveCharacters){if(X===$.separator)throw Error(`The separator character \`${$.separator}\` cannot be included in preserved characters: ${$.preserveCharacters}`);Y+=RD(X)}return new RegExp(`[^${Y}]+`,"g")};var lf0=V0(()=>{S24();v24()});import{createHash as FQ$,randomUUID as E6}from"crypto";import{ReadableStream as e2,WritableStream as y24,TransformStream as HV}from"stream/web";import R69,{EventEmitter as q69}from"events";function F$0($){if(typeof $!=="object"||$===null)return $;let Y={...$};if(Y.properties&&typeof Y.properties==="object"&&!Array.isArray(Y.properties))Y.properties=Object.fromEntries(Object.entries(Y.properties).map(([X,G])=>{if(typeof G!=="object"||G===null||Array.isArray(G))return[X,G];let J=G,Q="type"in J,W="$ref"in J,K="anyOf"in J,Z="oneOf"in J,H="allOf"in J;if(!Q&&!W&&!K&&!Z&&!H){let{items:z,...V}=J;return[X,{...V,type:["string","number","integer","boolean","object","null"]}]}return[X,F$0(J)]}));if(Y.items){if(Array.isArray(Y.items))Y.items=Y.items.map((X)=>F$0(X));else if(typeof Y.items==="object")Y.items=F$0(Y.items)}return Y}function P69({tools:$,toolChoice:Y,activeTools:X,targetVersion:G="v2"}){if(Y==="none")return{tools:void 0,toolChoice:{type:"none"}};if(Object.keys($||{}).length===0)return{tools:void 0,toolChoice:void 0};let J=X!=null?Object.entries($||{}).filter(([W])=>X.includes(W)):Object.entries($||{}),Q=G==="v3"?"provider":"provider-defined";return{tools:J.map(([W,K])=>{try{if(N_(K)){let F=K.name??W;return{type:Q,name:F,id:K.id,args:K.args??{}}}let Z;if("inputSchema"in K)Z=K.inputSchema;else if("parameters"in K)Z=K.parameters;let H=aT0({type:"function",...K,inputSchema:Z}),z="strict"in K?K.strict:void 0,V=H?.type??"function";switch(V){case void 0:case"dynamic":case"function":let F;if(H.inputSchema){if("$schema"in H.inputSchema&&typeof H.inputSchema.$schema==="string"&&H.inputSchema.$schema.startsWith("http://json-schema.org/"))F=H.inputSchema;else if(z5(H.inputSchema))F=$6(H.inputSchema,{io:"input",target:"draft-07"});else F=o10(H.inputSchema).jsonSchema;if(F&&typeof F==="object"&&"$schema"in F&&F.$schema!=="http://json-schema.org/draft-07/schema#")F.$schema="http://json-schema.org/draft-07/schema#"}else F={type:"object",properties:{},additionalProperties:!1};return{type:"function",name:W,description:H.description,inputSchema:F$0(F),...z!=null?{strict:z}:{},providerOptions:H.providerOptions};case"provider-defined":{let L=H.id,N=H.name??W;return{type:Q,name:N,id:L,args:H.args}}default:throw Error(`Unsupported tool type: ${V}`)}}catch(Z){return console.error("Error preparing tool",Z),null}}).filter((W)=>W!==null),toolChoice:Y==null?{type:"auto"}:typeof Y==="string"?{type:Y}:{type:"tool",toolName:Y.toolName}}}async function w69({stream:$,onError:Y,logger:X}){let G=$.getReader();try{while(!0){let{done:J}=await G.read();if(J)break}}catch(J){X?.error("consumeStream error",J),Y?.(J)}finally{G.releaseLock()}}function bE($){return typeof $==="object"&&$!==null}function tf0($,Y){let X=$[Y];return typeof X==="string"?X:void 0}function S69($){if($ instanceof Error)return $.cause;if(!bE($))return;return $.cause}function k69($){if(!bE($))return;if($.type==="error"&&bE($.error))return $.error;if($.type==="response.failed"&&bE($.response)){let Y=$.response.error;return bE(Y)?Y:void 0}return}function v69($){let Y=tf0($,"code")??tf0($,"type");if(!Y)return!1;let X=Y.toLowerCase();return T69.some((G)=>X.includes(G))}function x69($){let Y=tf0($,"message");return Y!==void 0&&I69.test(Y)}function UK4($){let Y=k69($);if(!Y)return!1;return v69(Y)||x69(Y)}function y69($){return(M7.isInstance($)?$.isRetryable:bE($)&&typeof $.isRetryable==="boolean"?$.isRetryable:void 0)===!0}function b69($,Y){let X=new WeakSet;function G(J){if(bE(J)){if(X.has(J))return!1;X.add(J)}if(y69(J))return!0;if(Y.some((W)=>W(J)))return!0;let Q=S69(J);return Q!==void 0&&G(Q)}return G($)}function D$0($){return typeof $==="object"&&$!==null&&!Array.isArray($)}function fE($){if(!$)return;let Y=$.mastra;if(!D$0(Y))return;let X=Y.om;if(!D$0(X))return;return X}function fT($,Y){let X=$??{},G=D$0(X.mastra)?X.mastra:{},J=D$0(G.om)?G.om:{};return{...X,mastra:{...G,om:{...J,...Y}}}}function n3($){if(!$)return null;let Y=$.get("MastraMemory");if(!Y)return null;if(typeof Y!=="object"||Y===null)throw Error(`Invalid MemoryRequestContext: expected object, got ${typeof Y}`);let X=Y;if(X.thread!==void 0){if(typeof X.thread!=="object"||X.thread===null)throw Error(`Invalid MemoryRequestContext.thread: expected object, got ${typeof X.thread}`);let G=X.thread;if(typeof G.id!=="string")throw Error(`Invalid MemoryRequestContext.thread.id: expected string, got ${typeof G.id}`)}if(X.resourceId!==void 0&&typeof X.resourceId!=="string")throw Error(`Invalid MemoryRequestContext.resourceId: expected string, got ${typeof X.resourceId}`);return Y}function ef0($){if($===!0)return!0;if($===!1||$===void 0)return!1;return $.enabled!==!1}function h24($){let Y=null,X=async()=>{if($.disableInit)return;if(process.env.MASTRA_DISABLE_STORAGE_INIT==="true")return;if(!Y)Y=$.init();await Y};if($[b24])return $;return new Proxy($,{get(J,Q){if(Q===b24)return!0;let W=J[Q];if(typeof W==="function"){if(Q==="init")return async(...K)=>{if(!Y)Y=Reflect.apply(W,J,K);return Y};return async(...K)=>{return await X(),Reflect.apply(W,J,K)}}return Reflect.get(J,Q)}})}function if0($){if(typeof $==="string")return $;if(typeof $==="function")return;if($&&typeof $==="object"&&"id"in $&&typeof $.id==="string")return $.id;return}function Xg0($){let Y="",X=0;while(X<$.length){let G=$.indexOf($g0,X);if(G===-1){Y+=$.substring(X);break}Y+=$.substring(X,G);let J=$.indexOf(Yg0,G+$g0.length);if(J===-1){Y+=$.substring(G);break}X=J+Yg0.length}return Y}function V9($){return $!==null&&typeof $==="object"&&"id"in $&&typeof $.id==="string"&&"inputSchema"in $&&"outputSchema"in $&&"execute"in $&&typeof $.execute==="function"&&!("processInput"in $)&&!("processInputStep"in $)&&!("processOutputStream"in $)&&!("processOutputResult"in $)&&!("processOutputStep"in $)&&!("processLLMRequest"in $)&&!("processAPIError"in $)}async function c69(){if(sm)return sm;if(!nf0)nf0=(async()=>{let Y=await Promise.resolve().then(() => (P24(),q24));return sm=Y,Y})();return nf0}function l69(){if(!sm)throw Error("chat module not loaded yet \u2014 call getChatModule() first");return sm}function z$0($){for(let Y of i69)if($.startsWith(Y))return $.slice(Y.length);return $}function V$0($){try{let Y=typeof $==="string"?JSON.parse($):$;if(!Y||typeof Y!=="object")return"";let X=Object.entries(Y).filter(([Q,W])=>Q!=="__mastraMetadata"&&W!=null&&W!==!1&&W!=="");if(X.length===0)return"";let[,G]=X[0],J=typeof G==="string"?G:JSON.stringify(G);if(J.length>g24)J=J.slice(0,g24)+"\u2026";return J}catch{return""}}function n69($,Y){let X=Y?"Error: ":"";if($==null)return`${X}(no output)`;let G=typeof $==="string"?$:JSON.stringify($,null,2);if(G=G.trim(),G.length>m24)G=G.slice(0,m24)+"\u2026";return`${X}${G}`}function r69($){if($<1000)return`${$}ms`;return`${($/1000).toFixed(1)}s`}function Xu($,Y){return Y?`*${$}* \`${Y}\``:`*${$}*`}function a69($,Y,X){let G=Xu($,Y);if(X)return TX().Card({children:[TX().CardText(`${G} \u22EF`)]});return`${G} \u22EF`}function s69($,Y,X,G,J,Q){let W=J!=null?`${r69(J)} ${G?"\u2717":"\u2713"}`:G?"\u2717":"\u2713",K=Xu($,Y);if(Q){let H=`${K} \xB7 ${W}`,z=G?X:`\`\`\`
${X}
\`\`\``;return TX().Card({children:[TX().CardText(H),TX().CardText(z,{style:G?"bold":"plain"})]})}let Z=G&&!X.startsWith("Error: ")?`Error: ${X}`:X;return`${K} \xB7 ${W}
${Z}`}function o69($,Y,X,G){let J=Xu($,Y);if(G)return TX().Card({children:[TX().CardText(J),TX().CardText("Requires approval to run."),TX().Actions([TX().Button({id:`tool_approve:${X}`,label:"Approve",style:"primary"}),TX().Button({id:`tool_deny:${X}`,label:"Deny",style:"danger"})])]});return`${J}
\u23F8 Requires approval to run. Reply "approve" or "deny".`}function t69($,Y,X){let G=Xu($,Y);if(X)return TX().Card({children:[TX().CardText(`${G} \u22EF`),TX().CardText("\u2713 Approved")]});return`${G} \u22EF
\u2713 Approved`}function e69($,Y,X,G){let J=Xu($,Y),Q=X?` by ${X}`:"";if(G)return TX().Card({children:[TX().CardText(`${J} \u2717`),TX().CardText(`\u2717 Denied${Q}`)]});return`${J} \u2717
\u2717 Denied${Q}`}function X89($){if(typeof $==="function")return $;let Y=$??["image/*"];return(X)=>{return Y.some((G)=>{if(G==="*"||G==="*/*")return!0;if(G.endsWith("/*"))return X.startsWith(G.slice(0,-1));return X===G})}}function G89($){if($==null||$.length===0)return;return $.map((Y)=>typeof Y==="string"?{match:Y}:{match:Y.match,forcedMimeType:Y.mimeType})}function J89($,Y){if(Y==="*")return!0;try{let X=new URL($).hostname;return X===Y||X.endsWith(`.${Y}`)}catch{return!1}}function Q89($,Y){return Y.find((X)=>J89($,X.match))}function K89($){return Array.from($.matchAll(W89),(Y)=>Y[0])}async function Z89($,Y){try{let X=await fetch($,{method:"HEAD",redirect:"follow"});if(!X.ok)return;return X.headers.get("content-type")?.split(";")[0]?.trim()||void 0}catch(X){Y?.debug("[CHANNEL] HEAD request failed for link",{url:$,error:String(X)});return}}function TK4({runId:$,scorerId:Y,scorerObject:X,input:G,output:J,requestContext:Q,entity:W,structuredOutput:K,source:Z,entityType:H,threadId:z,resourceId:V,...F}){let L=!1;if(!X?.sampling||X?.sampling?.type==="none")L=!0;if(X?.sampling?.type)switch(X?.sampling?.type){case"ratio":L=Math.random()<X?.sampling?.rate;break;default:L=!0}if(!L)return;let N={};if(Q){let B=new WeakSet,O=(E,M,R=0)=>{if(R>8)return;if(B.has(E))return;B.add(E);let q=typeof E.entries==="function"?E.entries():Object.entries(E);for(let[_,P]of q){let w=M?`${M}.${_}`:_;if(typeof P==="string"||typeof P==="number"||typeof P==="boolean")N[w]=P;else if(P&&typeof P==="object"&&!Array.isArray(P))O(P,w,R+1)}};O(Q)}let D={scorer:{id:X.scorer?.id||Y,name:X.scorer?.name,description:X.scorer.description},input:G,output:J,requestContext:N,runId:$,source:Z,entity:W,structuredOutput:K,entityType:H,threadId:z,resourceId:V,...F};D64("onScorerRun",D)}function F9($,Y){try{return $.enqueue(Y),!0}catch{return!1}}function N$0($){try{return $.close(),!0}catch{return!1}}function U89($,Y){try{return $.error(Y),!0}catch{return!1}}function e60($){if(typeof $!=="object"||$===null)return!1;let Y=$;return typeof Y.id==="string"&&Y.id.length>0&&typeof Y.generate==="function"&&typeof Y.stream==="function"&&typeof Y.getDescription==="function"&&typeof Y.getModel==="function"&&typeof Y.hasOwnMemory==="function"&&typeof Y.__setMemory==="function"&&typeof Y.getMemory==="function"&&typeof Y.getInstructions==="function"&&typeof Y.resumeGenerate==="function"&&typeof Y.resumeStream==="function"}function mT($){if($===null||typeof $!=="object"||Array.isArray($))return!1;let Y=Object.getPrototypeOf($);return Y===Object.prototype||Y===null}function bW($){return typeof $==="string"?$:void 0}function z89($,Y){if(!mT(Y))return{id:$,name:$};let X=bW(Y.id)??$,G=bW(Y.name)??X,J=bW(Y.description);return{id:X,name:G,...J!==void 0?{description:J}:{}}}function pO($){if(!mT($))return;let Y=bW($.modelId)??bW($.id),X=bW($.provider),G=bW($.specificationVersion);if(Y===void 0&&X===void 0&&G===void 0)return;return{...Y!==void 0?{modelId:Y}:{},...X!==void 0?{provider:X}:{},...G!==void 0?{specificationVersion:G}:{}}}function GD($){if(!mT($))return;return Object.entries($).map(([Y,X])=>z89(Y,X))}function IK4($){if(!mT($))return;let Y=GD($);if(!Y)return;return Object.keys($).map((X,G)=>({registryKey:X,summary:Y[G]}))}function CK4($,Y){return $.find((X)=>X.summary.id===Y||X.summary.name===Y||X.registryKey===Y)}function dO($,Y){if(!Array.isArray($))return;let X=IK4(Y)??[];return $.map((J)=>{let Q=bW(J);if(Q===void 0)return;let W=CK4(X,Q);return{id:W?.summary.id??Q,name:W?.summary.name??Q}}).filter((J)=>J!==void 0)}function cO($,Y){if(typeof $==="string")return{type:$};if(!mT($))return;let X=bW($.type);if(X===void 0)return;if(X!=="tool")return{type:X};let G=bW($.toolName)??bW($.toolId);if(G===void 0)return{type:X};let J=IK4(Y)??[],Q=CK4(J,G),W=bW($.toolId)??G,K=bW($.toolName)??G;return{type:X,tool:Q?{id:Q.summary.id,name:Q.summary.name}:{id:W,name:K}}}function $80($){if(!mT($))return;let Y={};for(let X of["text","object","finishReason","toolCalls","toolResults","warnings","files","sources","reasoning","reasoningText","tripwire"])if($[X]!==void 0)Y[X]=$[X];if(Array.isArray($.steps))Y.stepCount=$.steps.length;return Object.keys(Y).length>0?Y:void 0}async function V89({stream:$,onError:Y}){let X=$.getReader();try{while(!0){let{done:G}=await X.read();if(G)break}}catch(G){Y==null||Y(G)}finally{X.releaseLock()}}async function Gu($,Y){let X=$["~standard"].validate(Y),G=X instanceof Promise?await X:X;if("issues"in G&&G.issues)return{success:!1,issues:G.issues.map((J)=>({path:J.path?.map((Q)=>typeof Q==="object"&&("key"in Q)?Q.key:Q),message:J.message}))};return{success:!0,data:G.value}}async function X80({prevOutput:$,step:Y,validateInputs:X}){let G=$,J,Q=Y.inputSchema;if(X&&Q){let W=await Gu(Q,$);if(!W.success){let K=W.issues.map((Z)=>`- ${Z.path?.join(".")}: ${Z.message}`).join(`
`);J=new G0({id:"WORKFLOW_STEP_INPUT_VALIDATION_FAILED",domain:"MASTRA_WORKFLOW",category:"USER",text:`Step input validation failed: 
`+K},{issues:W.issues})}else G=W.data!==null&&typeof W.data==="object"&&!Array.isArray(W.data)&&Object.keys(W.data).length===0?$:W.data}return{inputData:G,validationError:J}}async function G80({resumeData:$,step:Y}){if(!$)return{resumeData:void 0,validationError:void 0};let X,G=Y.resumeSchema;if(G){let J=await Gu(G,$);if(!J.success){let Q=J.issues.map((W)=>`- ${W.path?.join(".")}: ${W.message}`).join(`
`);X=new G0({id:"WORKFLOW_STEP_RESUME_DATA_VALIDATION_FAILED",domain:"MASTRA_WORKFLOW",category:"USER",text:`Step resume data validation failed: 
`+Q})}else $=J.data}return{resumeData:$,validationError:X}}async function J80({suspendData:$,step:Y,validateInputs:X}){if(!$)return{suspendData:void 0,validationError:void 0};let G,J=Y.suspendSchema;if(J&&X){let Q=await Gu(J,$);if(!Q.success){let W=Q.issues.map((K)=>`- ${K.path?.join(".")}: ${K.message}`).join(`
`);G=new G0({id:"WORKFLOW_STEP_SUSPEND_DATA_VALIDATION_FAILED",domain:"MASTRA_WORKFLOW",category:"USER",text:`Step suspend data validation failed: 
`+W})}else $=Q.data}return{suspendData:$,validationError:G}}async function SK4({stateData:$,step:Y,validateInputs:X}){if(!$)return{stateData:void 0,validationError:void 0};let G,J=Y.stateSchema;if(J&&X){let Q=await Gu(J,$);if(!Q.success){let W=Q.issues.map((K)=>`- ${K.path?.join(".")}: ${K.message}`).join(`
`);G=Error(`Step state data validation failed: 
`+W)}else $=Q.data}return{stateData:$,validationError:G}}async function kK4({requestContext:$,step:Y,validateInputs:X}){let G,J=Y.requestContextSchema;if(J&&X){let Q=$?.all??{},W=await Gu(J,Q);if(!W.success){let K=W.issues.map((Z)=>`- ${Z.path?.join(".")}: ${Z.message}`).join(`
`);G=new G0({id:"WORKFLOW_STEP_REQUEST_CONTEXT_VALIDATION_FAILED",domain:"MASTRA_WORKFLOW",category:"USER",text:`Step request context validation failed for step '${Y.id}': 
`+K})}}return{validationError:G}}function vK4($,Y){return Object.entries($).filter(([X,G])=>G.stepId===Y).reduce((X,[G,J])=>{return X[G]=J,X},{})}function lz($,{paramName:Y,deprecationMessage:X,logger:G}){return new Proxy($,{get(J,Q,W){if(Q===Y&&!p24.has(Y))if(p24.add(Y),G)G.warn("\x1B[33m%s\x1B[0m",X);else console.warn("\x1B[33m%s\x1B[0m",X);return Reflect.get(J,Q,W)}})}function Lv0($){if($){for(let Y of Object.values($))if(Y.status==="failed"&&"error"in Y&&Y.error)Y.error=XG(Y.error,{serializeStack:!1})}return $}function rf0($){let{__state:Y,metadata:X,...G}=$;if(X&&typeof X==="object"&&!Array.isArray(X)){let{nestedRunId:J,...Q}=X;if(Object.keys(Q).length>0)return{...G,metadata:Q}}return G}function K80($){if($===null||$===void 0)return $;if(typeof $!=="object")return $;if(Array.isArray($))return $.map((G)=>{if(G&&typeof G==="object"&&!Array.isArray(G))return rf0(G);return G});let X=rf0($);if(Array.isArray(X.output))X.output=X.output.map((G)=>{if(G&&typeof G==="object"&&!Array.isArray(G))return rf0(G);return G});return X}async function F89($,Y){let{workflowId:X,runId:G,resourceId:J,entry:Q,prevStep:W,serializedStepGraph:K,stepResults:Z,resume:H,restart:z,timeTravel:V,executionContext:F,pubsub:L,abortController:N,requestContext:D,outputWriter:A,disableScorers:B,perStep:O,...E}=Y,M=e1(E),R=await $.createChildSpan({parentSpan:M.tracingContext.currentSpan,operationId:`workflow.${X}.run.${G}.parallel.${F.executionPath.join("-")}.span.start`,options:{type:"workflow_parallel",name:`parallel: '${Q.steps.length} branches'`,input:$.getStepOutput(Z,W),attributes:{branchCount:Q.steps.length,parallelSteps:Q.steps.map((C)=>C.type==="step"?C.step.id:`control-${C.type}`)},tracingPolicy:$.options?.tracingPolicy},executionContext:F}),q=$.getStepOutput(Z,W);for(let[C,k]of Q.steps.entries()){let S=!0;if(z)S=!!z.activeStepsPath[k.step.id];if(V&&V.executionPath.length>0)S=V.steps[0]===k.step.id;if(!S)break;let I=H?.steps[0]===k.step.id?void 0:Date.now(),v=H?.steps[0]===k.step.id?Date.now():void 0;if(Z[k.step.id]={...Z[k.step.id],status:"running",...v?{resumePayload:H?.resumePayload}:{payload:q},...I?{startedAt:I}:{},...v?{resumedAt:v}:{}},F.activeStepsPath[k.step.id]=[...F.executionPath,C],O)break}if(V&&V.executionPath.length>0)V.executionPath.shift();let _,P=await Promise.all(Q.steps.map(async(C,k)=>{let S=Z[C.step.id];if(S&&S.status!=="running")return S;if(!S&&(O||V))return{};let I=await $.executeStep({workflowId:X,runId:G,resourceId:J,step:C.step,prevOutput:q,stepResults:Z,serializedStepGraph:K,restart:z,timeTravel:V,resume:H,executionContext:{activeStepsPath:F.activeStepsPath,workflowId:X,runId:G,executionPath:[...F.executionPath,k],stepExecutionPath:F.stepExecutionPath,suspendedPaths:F.suspendedPaths,resumeLabels:F.resumeLabels,retryConfig:F.retryConfig,state:F.state,tracingIds:F.tracingIds},...g4({currentSpan:R}),pubsub:L,abortController:N,requestContext:D,outputWriter:A,disableScorers:B,perStep:O});return $.applyMutableContext(F,I.mutableContext),Object.assign(Z,I.stepResults),I.result})),w=P.find((C)=>C.status==="failed"),j=P.find((C)=>C.status==="suspended");if(w)_={status:"failed",error:w.error,tripwire:w.tripwire};else if(j)_={status:"suspended",suspendPayload:j.suspendPayload,...j.suspendOutput?{suspendOutput:j.suspendOutput}:{}};else if(N?.signal?.aborted)_={status:"canceled"};else _={status:"success",output:P.reduce((C,k,S)=>{if(k.status==="success")C[Q.steps[S].step.id]=k.output;return C},{})};if(_.status==="failed")await $.errorChildSpan({span:R,operationId:`workflow.${X}.run.${G}.parallel.${F.executionPath.join("-")}.span.error`,errorOptions:{error:_.error}});else await $.endChildSpan({span:R,operationId:`workflow.${X}.run.${G}.parallel.${F.executionPath.join("-")}.span.end`,endOptions:{output:_.output||_}});return _}async function L89($,Y){let{workflowId:X,runId:G,resourceId:J,entry:Q,prevOutput:W,serializedStepGraph:K,stepResults:Z,resume:H,restart:z,timeTravel:V,executionContext:F,pubsub:L,abortController:N,requestContext:D,outputWriter:A,disableScorers:B,perStep:O,...E}=Y,M=e1(E),R=await $.createChildSpan({parentSpan:M.tracingContext.currentSpan,operationId:`workflow.${X}.run.${G}.conditional.${F.executionPath.join("-")}.span.start`,options:{type:"workflow_conditional",name:`conditional: '${Q.conditions.length} conditions'`,input:W,attributes:{conditionCount:Q.conditions.length},tracingPolicy:$.options?.tracingPolicy},executionContext:F}),q,_=(await Promise.all(Q.conditions.map(async(k,S)=>{let I=await $.createChildSpan({parentSpan:R,operationId:`workflow.${X}.run.${G}.conditional.${F.executionPath.join("-")}.eval.${S}.span.start`,options:{type:"workflow_conditional_eval",name:`condition '${S}'`,input:W,attributes:{conditionIndex:S},tracingPolicy:$.options?.tracingPolicy},executionContext:F}),v=`workflow.${X}.conditional.${S}`,x=lz({runId:G,workflowId:X,mastra:$.mastra,requestContext:D,inputData:W,state:F.state,retryCount:-1,...g4({currentSpan:I}),getInitData:()=>Z?.input,getStepResult:a2.bind(null,Z),bail:()=>{},abort:()=>{N?.abort()},[VQ]:L,[EW]:F.format,engine:$.getEngineContext(),abortSignal:N?.signal,writer:new PW({prefix:"workflow-step",callId:E6(),name:"conditional",runId:G},A)},{paramName:"runCount",deprecationMessage:cz,logger:$.getLogger()});try{let y=await $.evaluateCondition(k,S,x,v);return await $.endChildSpan({span:I,operationId:`workflow.${X}.run.${G}.conditional.${F.executionPath.join("-")}.eval.${S}.span.end`,endOptions:{output:y!==null,attributes:{result:y!==null}}}),y}catch(y){let d=XG(y,{serializeStack:!1}),u=new G0({id:"WORKFLOW_CONDITION_EVALUATION_FAILED",domain:"MASTRA_WORKFLOW",category:"USER",details:{workflowId:X,runId:G}},d);return $.getLogger()?.trackException(u),$.getLogger()?.error("Error evaluating condition: "+d.stack),await $.errorChildSpan({span:I,operationId:`workflow.${X}.run.${G}.conditional.${F.executionPath.join("-")}.eval.${S}.span.error`,errorOptions:{error:u,attributes:{result:!1}}}),null}}))).filter((k)=>k!==null),P=Q.steps.filter((k,S)=>_.includes(S));if(O||V&&V.executionPath.length>0){let S=P.filter((I)=>{let v=Z[I.step.id];if(V&&V.executionPath.length>0)return V.steps[0]===I.step.id;return!v})?.[0];P=S?[S]:P}R?.update({attributes:{truthyIndexes:_,selectedSteps:P.map((k)=>k.type==="step"?k.step.id:`control-${k.type}`)}});let w=await Promise.all(P.map(async(k)=>{let S=Z[k.step.id],I=z?!!z.activeStepsPath[k.step.id]:void 0;if(S&&V&&V.executionPath.length>0){if(V.steps[0]!==k.step.id)return S}if(S&&["success","failed"].includes(S.status)&&I===void 0)return S;let v=await $.executeStep({workflowId:X,runId:G,resourceId:J,step:k.step,prevOutput:W,stepResults:Z,serializedStepGraph:K,resume:H,restart:z,timeTravel:V,executionContext:{workflowId:X,runId:G,executionPath:[...F.executionPath,Q.steps.indexOf(k)],stepExecutionPath:F.stepExecutionPath,activeStepsPath:F.activeStepsPath,suspendedPaths:F.suspendedPaths,resumeLabels:F.resumeLabels,retryConfig:F.retryConfig,state:F.state,tracingIds:F.tracingIds},...g4({currentSpan:R}),pubsub:L,abortController:N,requestContext:D,outputWriter:A,disableScorers:B,perStep:O});return $.applyMutableContext(F,v.mutableContext),Object.assign(Z,v.stepResults),v.result})),j=w.find((k)=>k.status==="failed"),C=w.find((k)=>k.status==="suspended");if(j)q={status:"failed",error:j.error,tripwire:j.tripwire};else if(C)q={status:"suspended",suspendPayload:C.suspendPayload,...C.suspendOutput?{suspendOutput:C.suspendOutput}:{},suspendedAt:C.suspendedAt};else if(N?.signal?.aborted)q={status:"canceled"};else q={status:"success",output:w.reduce((k,S,I)=>{if(S.status==="success")k[P[I].step.id]=S.output;return k},{})};if(q.status==="failed")await $.errorChildSpan({span:R,operationId:`workflow.${X}.run.${G}.conditional.${F.executionPath.join("-")}.span.error`,errorOptions:{error:q.error}});else await $.endChildSpan({span:R,operationId:`workflow.${X}.run.${G}.conditional.${F.executionPath.join("-")}.span.end`,endOptions:{output:q.output||q}});return q}async function D89($,Y){let{workflowId:X,runId:G,resourceId:J,entry:Q,prevOutput:W,stepResults:K,resume:Z,restart:H,timeTravel:z,executionContext:V,pubsub:F,abortController:L,requestContext:N,outputWriter:D,disableScorers:A,serializedStepGraph:B,perStep:O,...E}=Y,M=e1(E),{step:R,condition:q}=Q,_=await $.createChildSpan({parentSpan:M.tracingContext.currentSpan,operationId:`workflow.${X}.run.${G}.loop.${V.executionPath.join("-")}.span.start`,options:{type:"workflow_loop",name:`loop: '${Q.loopType}'`,input:W,attributes:{loopType:Q.loopType},tracingPolicy:$.options?.tracingPolicy},executionContext:V}),P=!0,w=K[R.id]?.metadata?.iterationCount,j=w?w-1:0,C=K[R.id],S={status:"success",output:C&&Object.prototype.hasOwnProperty.call(C,"payload")?C.payload:W},I=Z,v=H,x=z;do{if(L?.signal?.aborted)return await $.endChildSpan({span:_,operationId:`workflow.${X}.run.${G}.loop.${V.executionPath.join("-")}.span.end.early`,endOptions:{attributes:{totalIterations:j}}}),{status:"canceled"};let y=await $.executeStep({workflowId:X,runId:G,resourceId:J,step:R,stepResults:K,executionContext:V,restart:v,resume:I,timeTravel:x,prevOutput:S.output,...g4({currentSpan:_}),pubsub:F,abortController:L,requestContext:N,outputWriter:D,disableScorers:A,serializedStepGraph:B,iterationCount:j+1,perStep:O});if($.applyMutableContext(V,y.mutableContext),Object.assign(K,y.stepResults),S=y.result,v=void 0,x=void 0,I&&S.status!=="suspended")I=void 0;if(S.status!=="success")return await $.endChildSpan({span:_,operationId:`workflow.${X}.run.${G}.loop.${V.executionPath.join("-")}.span.end.early`,endOptions:{attributes:{totalIterations:j}}}),S;if(L?.signal?.aborted)return await $.endChildSpan({span:_,operationId:`workflow.${X}.run.${G}.loop.${V.executionPath.join("-")}.span.end.early`,endOptions:{attributes:{totalIterations:j+1}}}),{status:"canceled"};let d=await $.createChildSpan({parentSpan:_,operationId:`workflow.${X}.run.${G}.loop.${V.executionPath.join("-")}.eval.${j}.span.start`,options:{type:"workflow_conditional_eval",name:`condition: '${Q.loopType}'`,input:zx0(S.output,["stepResult","output.text","output.object","messages"]),attributes:{conditionIndex:j},tracingPolicy:$.options?.tracingPolicy},executionContext:V});if(P=await q(lz({workflowId:X,runId:G,mastra:$.mastra,requestContext:N,inputData:S.output,state:V.state,retryCount:-1,...g4({currentSpan:d}),iterationCount:j+1,getInitData:()=>K?.input,getStepResult:a2.bind(null,K),bail:()=>{},abort:()=>{L?.abort()},[VQ]:F,[EW]:V.format,engine:$.getEngineContext(),abortSignal:L?.signal,writer:new PW({prefix:"workflow-step",callId:E6(),name:"loop",runId:G},D)},{paramName:"runCount",deprecationMessage:cz,logger:$.getLogger()})),await $.endChildSpan({span:d,operationId:`workflow.${X}.run.${G}.loop.${V.executionPath.join("-")}.eval.${j}.span.end`,endOptions:{output:P}}),j++,L?.signal?.aborted)return await $.endChildSpan({span:_,operationId:`workflow.${X}.run.${G}.loop.${V.executionPath.join("-")}.span.end.early`,endOptions:{attributes:{totalIterations:j}}}),{status:"canceled"}}while(Q.loopType==="dowhile"?P:!P);return await $.endChildSpan({span:_,operationId:`workflow.${X}.run.${G}.loop.${V.executionPath.join("-")}.span.end`,endOptions:{output:S.output,attributes:{totalIterations:j}}}),S}async function N89($,Y){let{workflowId:X,runId:G,resourceId:J,entry:Q,prevOutput:W,stepResults:K,restart:Z,resume:H,timeTravel:z,executionContext:V,pubsub:F,abortController:L,requestContext:N,outputWriter:D,disableScorers:A,serializedStepGraph:B,perStep:O,...E}=Y,M=e1(E),{step:R,opts:q}=Q,_=[],P=q.concurrency,w=H?.steps[0]===R.id?void 0:Date.now(),j=H?.steps[0]===R.id?Date.now():void 0,C={...K[R.id],...H?.steps[0]===R.id?{resumePayload:H?.resumePayload}:{payload:W},...w?{startedAt:w}:{},...j?{resumedAt:j}:{}},k=await $.createChildSpan({parentSpan:M.tracingContext.currentSpan,operationId:`workflow.${X}.run.${G}.foreach.${V.executionPath.join("-")}.span.start`,options:{type:"workflow_loop",name:"loop: 'foreach'",input:W,attributes:{loopType:"foreach",concurrency:P},tracingPolicy:$.options?.tracingPolicy},executionContext:V});await F.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-start",payload:{id:R.id,...C,status:"running"}}});let S=K[R.id],I={},v=S?.status==="suspended"?S?.suspendPayload?.__workflow_meta?.foreachIndex||0:0,x=S?.suspendPayload?.__workflow_meta?.foreachOutput||[],y=S?.suspendPayload?.__workflow_meta?.resumeLabels||{},d=vK4(y,R.id),u=W.length,b=0,g=null,p=null,h=null,n=0,t,s=(Y0,Z0,F0)=>F.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-progress",payload:{id:R.id,completedCount:b,totalCount:u,currentIndex:Y0,iterationStatus:Z0,...F0!==void 0?{iterationOutput:F0}:{}}}}),K0=()=>{n-=m.length(),m.kill()},X0=(Y0,Z0,F0)=>$.executeStep({workflowId:X,runId:G,resourceId:J,step:R,stepResults:K,restart:Z,timeTravel:z,executionContext:{...V,foreachIndex:Z0},resume:F0,prevOutput:Y0,...g4({currentSpan:k}),pubsub:F,abortController:L,requestContext:N,skipEmits:!0,outputWriter:D,disableScorers:A,serializedStepGraph:B,perStep:O}),a=async(Y0,Z0)=>{if(Y0.status==="suspended"){if(!I[Z0])I[Z0]={status:Y0.status,suspendPayload:Y0.suspendPayload,suspendedAt:Y0.suspendedAt};await s(Z0,"suspended")}else if(Y0.status==="failed"){if(b++,await s(Z0,"failed"),!g)g=Y0}else if(Y0.status!=="success"){if(b++,await s(Z0,"failed"),!p)p=Y0}K0()},Q0=async(Y0,Z0)=>{b++,await s(Z0,"success",Y0.output);let F0=Object.keys(d).find((D0)=>d[D0]?.foreachIndex===Z0);if(F0!==void 0)delete d[F0]},m=JK4.default(async(Y0,Z0)=>{let{item:F0,k:D0,resumeToUse:O0}=Y0;try{if(L?.signal?.aborted){if(!h)h={...C,status:"canceled",output:_,endedAt:Date.now()};if(K0(),n--,Z0(null),n===0)t?.();return}let R0=await X0(F0,D0,O0);$.applyMutableContext(V,R0.mutableContext),Object.assign(K,R0.stepResults);let P0=R0.result;if(P0.status!=="success")await a(P0,D0);else await Q0(P0,D0);if(P0.status==="success"&&P0.output!==void 0)_[D0]=P0.output;x[D0]=P0.status==="suspended"?P0:{...P0,suspendPayload:{}}}catch(R0){if(!g)g={status:"failed",error:R0 instanceof Error?R0:Error(String(R0)),payload:void 0,startedAt:Date.now(),endedAt:Date.now()};K0()}if(n--,Z0(null),n===0)t?.()},P);for(let Y0=0;Y0<W.length;Y0++){let Z0=x[Y0];if(Z0?.status==="success"||Z0?.status==="suspended"&&H?.forEachIndex!==Y0&&H?.forEachIndex!==void 0){if(Z0?.status==="success"){let D0=Object.keys(d).find((O0)=>d[O0]?.foreachIndex===Y0);if(D0!==void 0)delete d[D0]}else I[Y0]={status:Z0.status,suspendPayload:Z0.suspendPayload,suspendedAt:Z0.suspendedAt};if(Z0.status==="success"&&Z0.output!==void 0)_[Y0]=Z0.output;x[Y0]=Z0.status==="suspended"?Z0:{...Z0,suspendPayload:{}};continue}let F0=void 0;if(H?.forEachIndex!==void 0)F0=H.forEachIndex===Y0?H:void 0;else if(Z0?.status==="suspended"||v===Y0)F0=H;n++,m.push({item:W[Y0],k:Y0,resumeToUse:F0})}if(n>0)await new Promise((Y0)=>{t=Y0});if(h)return await $.endChildSpan({span:k,operationId:`workflow.${X}.run.${G}.foreach.${V.executionPath.join("-")}.span.end.early`,endOptions:{output:_}}),h;if(L?.signal?.aborted)return await $.endChildSpan({span:k,operationId:`workflow.${X}.run.${G}.foreach.${V.executionPath.join("-")}.span.end.early`,endOptions:{output:_}}),{...C,status:"canceled",output:_,endedAt:Date.now()};let $0=g;if($0){let Y0={status:$0.status,error:$0.error,suspendPayload:$0.suspendPayload,suspendedAt:$0.suspendedAt,endedAt:$0.endedAt};return await $.errorChildSpan({span:k,operationId:`workflow.${X}.run.${G}.foreach.${V.executionPath.join("-")}.span.error`,errorOptions:{error:$0.error}}),await F.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-result",payload:{id:R.id,...Y0}}}),await F.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-finish",payload:{id:R.id,metadata:{}}}}),$0}if(p)return await $.endChildSpan({span:k,operationId:`workflow.${X}.run.${G}.foreach.${V.executionPath.join("-")}.span.end.early`,endOptions:{output:"output"in p?p.output:void 0}}),await F.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-result",payload:{id:R.id,...p}}}),await F.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-finish",payload:{id:R.id,metadata:{}}}}),p;if(Object.keys(I).length>0){let Z0=Object.keys(I).map(Number)[0];return await $.endChildSpan({span:k,operationId:`workflow.${X}.run.${G}.foreach.${V.executionPath.join("-")}.span.end`,endOptions:{output:I[Z0]}}),await F.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-suspended",payload:{id:R.id,...I[Z0]}}}),V.suspendedPaths[R.id]=V.executionPath,V.resumeLabels={...d,...V.resumeLabels},{...C,suspendedAt:Date.now(),status:"suspended",...I[Z0].suspendOutput?{suspendOutput:I[Z0].suspendOutput}:{},suspendPayload:{...I[Z0].suspendPayload,__workflow_meta:{...I[Z0].suspendPayload?.__workflow_meta,foreachIndex:Z0,foreachOutput:x,resumeLabels:V.resumeLabels}}}}return await F.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-result",payload:{id:R.id,status:"success",output:_,endedAt:Date.now()}}}),await F.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-finish",payload:{id:R.id,metadata:{}}}}),await $.endChildSpan({span:k,operationId:`workflow.${X}.run.${G}.foreach.${V.executionPath.join("-")}.span.end`,endOptions:{output:_}}),{...C,status:"success",output:_,endedAt:Date.now()}}function d24($,Y,X,G){let J=G?.onlyExecutedSteps?$.filter((K)=>K.type==="step"&&Y[K.step.id]!==void 0):$,Q=J.every((K)=>{if(K.type==="step"){let Z=Y[K.step.id];return Z&&Z.status==="success"}return!0}),W;if(Q)W={status:"success",output:$.reduce((K,Z)=>{if(Z.type==="step"){let H=Y[Z.step.id];if(H&&H.status==="success")K[Z.step.id]=H.output}return K},{})};else{let K=J.find((Z)=>Z.type==="step"&&Y[Z.step.id]?.status==="failed");if(K&&K.type==="step"){let Z=Y[K.step.id];W={status:"failed",error:Z?.error??Error("Workflow step failed after resume"),tripwire:Z?.tripwire}}else{let Z=$.find((z)=>z.type==="step"&&Y[z.step.id]?.status==="suspended"),H=Z&&Z.type==="step"?Y[Z.step.id]?.suspendPayload:{};W={status:"suspended",payload:H,suspendPayload:H,suspendedAt:Date.now()}}}if(W.status==="suspended")$.forEach((K,Z)=>{if(K.type==="step"&&Y[K.step.id]?.status==="suspended")X.suspendedPaths[K.step.id]=[...X.executionPath,Z]});return W}function af0({isResumedStep:$,stepId:Y,stepResults:X,prevOutput:G}){if(!$)return G;let J=X[Y];return J&&Object.prototype.hasOwnProperty.call(J,"payload")?J.payload:G}async function A89($,Y){let{workflowId:X,runId:G,resourceId:J,stepResults:Q,serializedStepGraph:W,executionContext:K,workflowStatus:Z,result:H,error:z,requestContext:V,tracingContext:F}=Y,L=`workflow.${X}.run.${G}.path.${JSON.stringify(K.executionPath)}.stepUpdate`;await $.wrapDurableOperation(L,async()=>{if(!$.options?.shouldPersistSnapshot?.({stepResults:Q,workflowStatus:Z}))return;let D=$.serializeRequestContext(V);await(await $.mastra?.getStorage()?.getStore("workflows"))?.persistWorkflowSnapshot({workflowName:X,runId:G,resourceId:J,snapshot:{runId:G,status:Z,value:K.state,context:Q,activePaths:K.executionPath,stepExecutionPath:K.stepExecutionPath,activeStepsPath:K.activeStepsPath,serializedStepGraph:W,suspendedPaths:K.suspendedPaths,waitingPaths:{},resumeLabels:K.resumeLabels,result:H,error:z,requestContext:D,timestamp:Date.now(),tracingContext:F}})})}async function Qg0($,Y){let{workflowId:X,runId:G,resourceId:J,entry:Q,prevStep:W,serializedStepGraph:K,stepResults:Z,restart:H,timeTravel:z,resume:V,executionContext:F,pubsub:L,abortController:N,requestContext:D,outputWriter:A,disableScorers:B,perStep:O,...E}=Y,M=e1(E),R=$.getStepOutput(Z,W),q,_;if(Q.type==="step"){let P=V?.steps?.includes(Q.step.id)??!1;if(!P)F.stepExecutionPath?.push(Q.step.id);let{step:w}=Q,j=af0({isResumedStep:P,stepId:w.id,stepResults:Z,prevOutput:R}),C=await $.executeStep({workflowId:X,runId:G,resourceId:J,step:w,stepResults:Z,executionContext:F,timeTravel:z,restart:H,resume:V,prevOutput:j,...M,pubsub:L,abortController:N,requestContext:D,outputWriter:A,disableScorers:B,serializedStepGraph:K,perStep:O});q=C.result,$.applyMutableContext(F,C.mutableContext),Object.assign(Z,C.stepResults),_=C.requestContext}else if(V?.resumePath?.length&&Q.type==="parallel"){let P=V.resumePath.shift(),w=await Qg0($,{workflowId:X,runId:G,resourceId:J,entry:Q.steps[P],prevStep:W,serializedStepGraph:K,stepResults:Z,resume:V,executionContext:{workflowId:X,runId:G,executionPath:[...F.executionPath,P],stepExecutionPath:F.stepExecutionPath?[...F.stepExecutionPath]:void 0,suspendedPaths:F.suspendedPaths,resumeLabels:F.resumeLabels,retryConfig:F.retryConfig,activeStepsPath:F.activeStepsPath,state:F.state},...M,pubsub:L,abortController:N,requestContext:D,outputWriter:A,disableScorers:B,perStep:O});return $.applyMutableContext(F,w.mutableContext),Object.assign(Z,w.stepResults),q=d24(Q.steps,Z,F),{result:q,stepResults:Z,mutableContext:$.buildMutableContext(F),requestContext:w.requestContext}}else if(Q.type==="parallel")q=await $.executeParallel({workflowId:X,runId:G,resourceId:J,entry:Q,prevStep:W,stepResults:Z,serializedStepGraph:K,timeTravel:z,restart:H,resume:V,executionContext:F,...M,pubsub:L,abortController:N,requestContext:D,outputWriter:A,disableScorers:B,perStep:O});else if(V?.resumePath?.length&&Q.type==="conditional"){let P=V.resumePath.shift(),w=Q.steps[P],j;if(w.type!=="step")j=await Qg0($,{workflowId:X,runId:G,resourceId:J,entry:w,prevStep:W,serializedStepGraph:K,stepResults:Z,resume:V,executionContext:{workflowId:X,runId:G,executionPath:[...F.executionPath,P],stepExecutionPath:F.stepExecutionPath?[...F.stepExecutionPath]:void 0,suspendedPaths:F.suspendedPaths,resumeLabels:F.resumeLabels,retryConfig:F.retryConfig,activeStepsPath:F.activeStepsPath,state:F.state},...M,pubsub:L,abortController:N,requestContext:D,outputWriter:A,disableScorers:B,perStep:O});else{let C=af0({isResumedStep:!0,stepId:w.step.id,stepResults:Z,prevOutput:R});j=await $.executeStep({workflowId:X,runId:G,resourceId:J,step:w.step,prevOutput:C,stepResults:Z,serializedStepGraph:K,resume:V,restart:H,timeTravel:z,executionContext:{workflowId:X,runId:G,executionPath:[...F.executionPath,P],stepExecutionPath:F.stepExecutionPath?[...F.stepExecutionPath]:void 0,suspendedPaths:F.suspendedPaths,resumeLabels:F.resumeLabels,retryConfig:F.retryConfig,activeStepsPath:F.activeStepsPath,state:F.state},...M,pubsub:L,abortController:N,requestContext:D,outputWriter:A,disableScorers:B,perStep:O})}return $.applyMutableContext(F,j.mutableContext),Object.assign(Z,j.stepResults),q=d24(Q.steps,Z,F,{onlyExecutedSteps:!0}),{result:q,stepResults:Z,mutableContext:$.buildMutableContext(F),requestContext:j.requestContext}}else if(Q.type==="conditional")q=await $.executeConditional({workflowId:X,runId:G,resourceId:J,entry:Q,prevOutput:R,stepResults:Z,serializedStepGraph:K,timeTravel:z,restart:H,resume:V,executionContext:F,...M,pubsub:L,abortController:N,requestContext:D,outputWriter:A,disableScorers:B,perStep:O});else if(Q.type==="loop")q=await $.executeLoop({workflowId:X,runId:G,resourceId:J,entry:Q,prevStep:W,prevOutput:R,stepResults:Z,timeTravel:z,restart:H,resume:V,executionContext:F,...M,pubsub:L,abortController:N,requestContext:D,outputWriter:A,disableScorers:B,serializedStepGraph:K,perStep:O});else if(Q.type==="foreach"){let P=af0({isResumedStep:V?.steps?.includes(Q.step.id)??!1,stepId:Q.step.id,stepResults:Z,prevOutput:R});q=await $.executeForeach({workflowId:X,runId:G,resourceId:J,entry:Q,prevStep:W,prevOutput:P,stepResults:Z,timeTravel:z,restart:H,resume:V,executionContext:F,...M,pubsub:L,abortController:N,requestContext:D,outputWriter:A,disableScorers:B,serializedStepGraph:K,perStep:O})}else if(Q.type==="sleep"){F.stepExecutionPath?.push(Q.id);let P=Date.now(),w=`workflow.${X}.run.${G}.sleep.${Q.id}.waiting_ev`;await $.wrapDurableOperation(w,async()=>{await L.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-waiting",payload:{id:Q.id,payload:R,startedAt:P,status:"waiting"}}})}),Z[Q.id]={status:"waiting",payload:R,startedAt:P},F.activeStepsPath[Q.id]=F.executionPath,await $.persistStepUpdate({workflowId:X,runId:G,resourceId:J,serializedStepGraph:K,stepResults:Z,executionContext:F,workflowStatus:"waiting",requestContext:D}),await $.executeSleep({workflowId:X,runId:G,entry:Q,prevStep:W,prevOutput:R,stepResults:Z,serializedStepGraph:K,resume:V,executionContext:F,...M,pubsub:L,abortController:N,requestContext:D,outputWriter:A}),delete F.activeStepsPath[Q.id],await $.persistStepUpdate({workflowId:X,runId:G,resourceId:J,serializedStepGraph:K,stepResults:Z,executionContext:F,workflowStatus:"running",requestContext:D});let j=Date.now(),C={payload:R,startedAt:P,endedAt:j};q={...C,status:"success",output:R},Z[Q.id]={...C,status:"success",output:R};let k=`workflow.${X}.run.${G}.sleep.${Q.id}.result_ev`;await $.wrapDurableOperation(k,async()=>{await L.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-result",payload:{id:Q.id,endedAt:j,status:"success",output:R}}}),await L.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-finish",payload:{id:Q.id,metadata:{}}}})})}else if(Q.type==="sleepUntil"){F.stepExecutionPath?.push(Q.id);let P=Date.now(),w=`workflow.${X}.run.${G}.sleepUntil.${Q.id}.waiting_ev`;await $.wrapDurableOperation(w,async()=>{await L.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-waiting",payload:{id:Q.id,payload:R,startedAt:P,status:"waiting"}}})}),Z[Q.id]={status:"waiting",payload:R,startedAt:P},F.activeStepsPath[Q.id]=F.executionPath,await $.persistStepUpdate({workflowId:X,runId:G,resourceId:J,serializedStepGraph:K,stepResults:Z,executionContext:F,workflowStatus:"waiting",requestContext:D}),await $.executeSleepUntil({workflowId:X,runId:G,entry:Q,prevStep:W,prevOutput:R,stepResults:Z,serializedStepGraph:K,resume:V,executionContext:F,...M,pubsub:L,abortController:N,requestContext:D,outputWriter:A}),delete F.activeStepsPath[Q.id],await $.persistStepUpdate({workflowId:X,runId:G,resourceId:J,serializedStepGraph:K,stepResults:Z,executionContext:F,workflowStatus:"running",requestContext:D});let j=Date.now(),C={payload:R,startedAt:P,endedAt:j};q={...C,status:"success",output:R},Z[Q.id]={...C,status:"success",output:R};let k=`workflow.${X}.run.${G}.sleepUntil.${Q.id}.result_ev`;await $.wrapDurableOperation(k,async()=>{await L.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-result",payload:{id:Q.id,endedAt:j,status:"success",output:R}}}),await L.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-step-finish",payload:{id:Q.id,metadata:{}}}})})}if(Q.type==="step"||Q.type==="loop"||Q.type==="foreach")Z[Q.step.id]=q;if(N?.signal?.aborted)q={...q,status:"canceled"};if(await $.persistStepUpdate({workflowId:X,runId:G,resourceId:J,serializedStepGraph:K,stepResults:Z,executionContext:F,workflowStatus:q.status==="success"?"running":q.status,requestContext:D}),q.status==="canceled")await L.publish(`workflow.events.v2.${G}`,{type:"watch",runId:G,data:{type:"workflow-canceled",payload:{}}});return{result:q,stepResults:Z,mutableContext:$.buildMutableContext(F),requestContext:_??$.serializeRequestContext(D)}}async function B89($,Y){let{workflowId:X,runId:G,entry:J,prevOutput:Q,stepResults:W,pubsub:K,abortController:Z,requestContext:H,executionContext:z,outputWriter:V,...F}=Y,L=e1(F),{duration:N,fn:D}=J,A=await $.createChildSpan({parentSpan:L.tracingContext.currentSpan,operationId:`workflow.${X}.run.${G}.sleep.${J.id}.span.start`,options:{type:"workflow_sleep",name:`sleep: ${N?`${N}ms`:"dynamic"}`,attributes:{durationMs:N,sleepType:D?"dynamic":"fixed"}},executionContext:z});if(D){let B=E6();N=await $.wrapDurableOperation(`workflow.${X}.sleep.${J.id}`,async()=>{return D({runId:G,workflowId:X,mastra:$.mastra,requestContext:H,inputData:Q,state:z.state,setState:async(O)=>{z.state=O},retryCount:-1,...g4({currentSpan:A}),getInitData:()=>W?.input,getStepResult:a2.bind(null,W),suspend:async(O)=>{},bail:()=>{},abort:()=>{Z?.abort()},[VQ]:K,[EW]:z.format,engine:$.getEngineContext(),abortSignal:Z?.signal,writer:new PW({prefix:"workflow-step",callId:B,name:"sleep",runId:G},V)})}),A?.update({attributes:{durationMs:N}})}try{await $.executeSleepDuration(!N||N<0?0:N,J.id,X),await $.endChildSpan({span:A,operationId:`workflow.${X}.run.${G}.sleep.${J.id}.span.end`})}catch(B){throw await $.errorChildSpan({span:A,operationId:`workflow.${X}.run.${G}.sleep.${J.id}.span.error`,errorOptions:{error:B}}),B}}async function O89($,Y){let{workflowId:X,runId:G,entry:J,prevOutput:Q,stepResults:W,pubsub:K,abortController:Z,requestContext:H,executionContext:z,outputWriter:V,...F}=Y,L=e1(F),{date:N,fn:D}=J,A=await $.createChildSpan({parentSpan:L.tracingContext.currentSpan,operationId:`workflow.${X}.run.${G}.sleepUntil.${J.id}.span.start`,options:{type:"workflow_sleep",name:`sleepUntil: ${N?N.toISOString():"dynamic"}`,attributes:{untilDate:N,durationMs:N?Math.max(0,N.getTime()-Date.now()):void 0,sleepType:D?"dynamic":"fixed"}},executionContext:z});if(D){let B=E6(),O=await $.wrapDurableOperation(`workflow.${X}.sleepUntil.${J.id}`,async()=>{return D({runId:G,workflowId:X,mastra:$.mastra,requestContext:H,inputData:Q,state:z.state,setState:async(M)=>{z.state=M},retryCount:-1,...g4({currentSpan:A}),getInitData:()=>W?.input,getStepResult:a2.bind(null,W),suspend:async(M)=>{},bail:()=>{},abort:()=>{Z?.abort()},[VQ]:K,[EW]:z.format,engine:$.getEngineContext(),abortSignal:Z?.signal,writer:new PW({prefix:"workflow-step",callId:B,name:"sleepUntil",runId:G},V)})});N=O instanceof Date?O:new Date(O);let E=!N?0:N.getTime()-Date.now();A?.update({attributes:{durationMs:Math.max(0,E)}})}if(!N){await $.endChildSpan({span:A,operationId:`workflow.${X}.run.${G}.sleepUntil.${J.id}.span.end.nodate`});return}try{await $.executeSleepUntilDate(N,J.id,X),await $.endChildSpan({span:A,operationId:`workflow.${X}.run.${G}.sleepUntil.${J.id}.span.end`})}catch(B){throw await $.errorChildSpan({span:A,operationId:`workflow.${X}.run.${G}.sleepUntil.${J.id}.span.error`,errorOptions:{error:B}}),B}}async function E89($,Y){let{workflowId:X,runId:G,resourceId:J,step:Q,stepResults:W,executionContext:K,restart:Z,resume:H,timeTravel:z,prevOutput:V,pubsub:F,abortController:L,requestContext:N,skipEmits:D=!1,outputWriter:A,disableScorers:B,serializedStepGraph:O,iterationCount:E,perStep:M,...R}=Y,q=e1(R),_=E6(),{inputData:P,validationError:w}=await X80({prevOutput:V,step:Q,validateInputs:$.options?.validateInputs??!0}),{validationError:j}=await kK4({requestContext:N,step:Q,validateInputs:$.options?.validateInputs??!0}),C=w||j,{resumeData:k,validationError:S}=await G80({resumeData:z?.stepResults[Q.id]?.status==="suspended"?z?.resumeData:void 0,step:Q}),I;if(k&&!S)I=k;else if(k&&S)$.getLogger().warn("Time travel resume data validation failed",{stepId:Q.id,error:S.message});else if(H?.steps[0]===Q.id)I=H?.resumePayload;let v=W[Q.id]?.status==="suspended"?W[Q.id]?.suspendPayload:void 0;if(v&&"__workflow_meta"in v){let{__workflow_meta:K0,...X0}=v;v=X0}let x=I?void 0:Date.now(),y=I?Date.now():void 0,d={...W[Q.id],...I?{resumePayload:I}:{payload:P},...x?{startedAt:x}:{},...y?{resumedAt:y}:{},status:"running",...E?{metadata:{iterationCount:E}}:{}};K.activeStepsPath[Q.id]=K.executionPath;let u=await $.createStepSpan({parentSpan:q.tracingContext.currentSpan,stepId:Q.id,operationId:`workflow.${X}.run.${G}.step.${Q.id}.span.start`,options:{name:`workflow step: '${Q.id}'`,type:"workflow_step",entityType:J6.WORKFLOW_STEP,entityId:Q.id,input:P,tracingPolicy:$.options?.tracingPolicy,requestContext:N},executionContext:K}),b=`workflow.${X}.run.${G}.step.${Q.id}.running_ev`;if(await $.onStepExecutionStart({step:Q,inputData:P,pubsub:F,executionContext:K,stepCallId:_,stepInfo:d,operationId:b,skipEmits:D}),await $.persistStepUpdate({workflowId:X,runId:G,resourceId:J,serializedStepGraph:O,stepResults:{...W,[Q.id]:d},executionContext:K,workflowStatus:"running",requestContext:N}),$.isNestedWorkflowStep(Q)){let K0=await $.executeWorkflowStep({step:Q,stepResults:W,executionContext:K,resume:H,timeTravel:z,prevOutput:V,inputData:P,pubsub:F,startedAt:x??Date.now(),abortController:L,requestContext:N,...q,outputWriter:A,stepSpan:u,perStep:M});if(K0!==null){if(u)if(K0.status==="failed")await $.errorStepSpan({span:u,operationId:`workflow.${X}.run.${G}.step.${Q.id}.span.error`,errorOptions:{error:K0.error instanceof Error?K0.error:Error(String(K0.error)),attributes:{status:"failed"}}});else{let a=K0.status==="success"?K0.output:K0.suspendOutput;await $.endStepSpan({span:u,operationId:`workflow.${X}.run.${G}.step.${Q.id}.span.end`,endOptions:{output:a,attributes:{status:K0.status}}})}let X0={...d,...K0};return{result:X0,stepResults:{[Q.id]:X0},mutableContext:$.buildMutableContext(K),requestContext:$.serializeRequestContext(N)}}}let g=async(K0)=>{let X0=lz(K0,{paramName:"runCount",deprecationMessage:cz,logger:$.getLogger()});return DQ({span:u,fn:()=>Q.execute(X0)})},p,h=Q.retries??K.retryConfig.attempts??0,n=K.retryConfig.delay??0,t=await $.executeStepWithRetry(`workflow.${X}.step.${Q.id}`,async()=>{if(C)throw C;let K0=$.getOrGenerateRetryCount(Q.id),X0=[];if(z&&z.steps.length>0)X0=z.steps[0]===Q.id?z.steps.slice(1):[];let a,Q0,e={suspendedPaths:{},resumeLabels:{},stateUpdate:null,requestContextUpdate:null},m=Q.component==="WORKFLOW",$0=$.mastra?m?$.mastra:Sf($.mastra,{currentSpan:u}):void 0,Y0=await g({runId:G,resourceId:J,workflowId:X,mastra:$0,requestContext:N,inputData:P,state:K.state,setState:async(D0)=>{let{stateData:O0,validationError:R0}=await SK4({stateData:D0,step:Q,validateInputs:$.options?.validateInputs??!0});if(R0)throw R0;e.stateUpdate=O0},retryCount:K0,resumeData:I,suspendData:v,...g4({currentSpan:u}),getInitData:()=>W?.input,getStepResult:a2.bind(null,W),suspend:async(D0,O0)=>{let{suspendData:R0,validationError:P0}=await J80({suspendData:D0,step:Q,validateInputs:$.options?.validateInputs??!0});if(P0)throw P0;if(e.suspendedPaths[Q.id]=K.executionPath,K.suspendedPaths[Q.id]=K.executionPath,O0?.resumeLabel){let f0=Array.isArray(O0.resumeLabel)?O0.resumeLabel:[O0.resumeLabel];for(let p0 of f0){let U4={stepId:Q.id,foreachIndex:K.foreachIndex};e.resumeLabels[p0]=U4,K.resumeLabels[p0]=U4}}a={payload:R0}},bail:(D0)=>{Q0={payload:D0}},abort:()=>{L?.abort()},resume:W[Q.id]?.status==="suspended"?{steps:H?.steps?.slice(1)||[],resumePayload:H?.resumePayload,runId:W[Q.id]?.suspendPayload?.__workflow_meta?.runId,label:H?.label,forEachIndex:H?.forEachIndex}:void 0,restart:!!Z?.activeStepsPath?.[Q.id],timeTravel:X0.length>0?{inputData:z?.inputData,steps:X0,nestedStepResults:z?.nestedStepResults,resumeData:z?.resumeData}:void 0,[VQ]:F,[EW]:K.format,engine:$.getEngineContext(),abortSignal:L?.signal,writer:new PW({prefix:"workflow-step",callId:_,name:Q.id,runId:G},A),outputWriter:A,scorers:B===!1?void 0:Q.scorers,validateInputs:$.options?.validateInputs,perStep:M});if($.requiresDurableContextSerialization())e.requestContextUpdate=$.serializeRequestContext(N);let F0=Q.component==="WORKFLOW"&&M;return{output:Y0,suspended:a,bailed:Q0,contextMutations:e,nestedWflowStepPaused:F0}},{retries:h,delay:n,stepSpan:u,workflowId:X,runId:G});if(!t.ok)p=t.error;else{let{result:K0}=t;if(Object.assign(K.suspendedPaths,K0.contextMutations.suspendedPaths),Object.assign(K.resumeLabels,K0.contextMutations.resumeLabels),$.requiresDurableContextSerialization()&&K0.contextMutations.requestContextUpdate){N.clear();for(let[X0,a]of Object.entries(K0.contextMutations.requestContextUpdate))N.set(X0,a)}if(Q.scorers)await M89({engine:$,scorers:Q.scorers,runId:G,input:P,output:K0.output,workflowId:X,stepId:Q.id,requestContext:N,disableScorers:B,...g4({currentSpan:u})});if(K0.suspended)p={status:"suspended",suspendPayload:K0.suspended.payload,...K0.output?{suspendOutput:K0.output}:{},suspendedAt:Date.now()};else if(K0.bailed)p={status:"bailed",output:K0.bailed.payload,endedAt:Date.now()};else if(K0.nestedWflowStepPaused)p={status:"paused"};else p={status:"success",output:K0.output,endedAt:Date.now()}}if(delete K.activeStepsPath[Q.id],!D){let K0=`workflow.${X}.run.${G}.step.${Q.id}.emit_result`;await $.wrapDurableOperation(K0,async()=>{await R89({stepId:Q.id,stepCallId:_,execResults:{...d,...p},pubsub:F,runId:G})})}if(p.status!="failed")await $.endStepSpan({span:u,operationId:`workflow.${X}.run.${G}.step.${Q.id}.span.end`,endOptions:{output:p.output,attributes:{status:p.status}}});let s={...d,...p};return{result:s,stepResults:{[Q.id]:s},mutableContext:$.buildMutableContext({...K,state:t.ok?t.result.contextMutations.stateUpdate??K.state:K.state}),requestContext:$.serializeRequestContext(N)}}async function M89($){let{engine:Y,scorers:X,runId:G,input:J,output:Q,workflowId:W,stepId:K,requestContext:Z,disableScorers:H,...z}=$,V=e1(z),F=X;if(typeof F==="function")try{F=await F({requestContext:Z})}catch(L){let N=XG(L,{serializeStack:!1}),D=new G0({id:"WORKFLOW_FAILED_TO_FETCH_SCORERS",domain:"MASTRA_WORKFLOW",category:"USER",details:{runId:G,workflowId:W,stepId:K}},N);Y.getLogger()?.trackException(D),Y.getLogger()?.error("Error fetching scorers: "+N?.stack)}if(!H&&F&&Object.keys(F||{}).length>0)for(let[L,N]of Object.entries(F||{})){if(Y.mastra)N.scorer.__registerMastra(Y.mastra),Y.mastra.addScorer(N.scorer,void 0,{source:"code"});TK4({scorerId:N.scorer.id,scorerObject:N,runId:G,input:J,output:Q,requestContext:Z,entity:{id:W,stepId:K},structuredOutput:!0,source:"LIVE",entityType:"WORKFLOW",...V})}}async function R89($){let{stepId:Y,stepCallId:X,execResults:G,pubsub:J,runId:Q}=$,W=X?{id:Y,stepCallId:X}:{id:Y};if(G.status==="suspended")await J.publish(`workflow.events.v2.${Q}`,{type:"watch",runId:Q,data:{type:"workflow-step-suspended",payload:{...W,...G}}});else await J.publish(`workflow.events.v2.${Q}`,{type:"watch",runId:Q,data:{type:"workflow-step-result",payload:{...W,...G}}}),await J.publish(`workflow.events.v2.${Q}`,{type:"watch",runId:Q,data:{type:"workflow-step-finish",payload:{...W,metadata:{}}}})}async function Dv0({writer:$,chunk:Y}){if(!$)return;await $.write(Y)}function q89($){return $ instanceof MW}function P89($){return $!==null&&typeof $==="object"&&"id"in $&&"execute"in $&&!($ instanceof YJ)&&!($ instanceof MW)}function bT($,Y){if($===Y)return!0;if(!$||!Y)return $===Y;return $.length===Y.length&&$.every((X,G)=>YD(X,Y[G]))}function yK4($,Y){for(let X of $){if("step"in X&&X.step?.id===Y)return X;if((X.type==="conditional"||X.type==="parallel")&&"steps"in X){let G=yK4(X.steps,Y);if(G)return G}}return}function o9($,Y){if(e60($))return _89($,Y);if(q89($))return j89($,Y);if(P89($))return w89($);if(om($)){let X=T89($);return X.providesSkillDiscovery=$.providesSkillDiscovery,X}throw Error("Invalid input: expected StepParams, Agent, ToolStep, or Processor")}function w89($){let Y={id:$.id,description:$.description,inputSchema:$.inputSchema?Q4($.inputSchema):$.inputSchema,stateSchema:$.stateSchema?Q4($.stateSchema):void 0,outputSchema:$.outputSchema?Q4($.outputSchema):$.outputSchema,resumeSchema:$.resumeSchema?Q4($.resumeSchema):void 0,suspendSchema:$.suspendSchema?Q4($.suspendSchema):void 0,requestContextSchema:$.requestContextSchema?Q4($.requestContextSchema):void 0,scorers:$.scorers,retries:$.retries,metadata:$.metadata,execute:$.execute.bind($)},X=$;if(X.steps||X.children||X.stepGraph)Object.assign(Y,{steps:X.steps,children:X.children,stepGraph:X.stepGraph});return Y}function _89($,Y){let X=Y??{},G=Q4(X?.structuredOutput?.schema??U.object({text:U.string()})),{retries:J,scorers:Q,metadata:W,...K}=X??{};return{id:$.id,description:$.getDescription(),inputSchema:Q4(U.object({prompt:U.string()})),outputSchema:Q4(G),retries:J,scorers:Q,metadata:W,execute:async({inputData:Z,runId:H,[VQ]:z,[EW]:V,requestContext:F,abortSignal:L,abort:N,writer:D,...A})=>{let B=e1(A),O={};O.promise=new Promise((P,w)=>{O.resolve=P,O.reject=w});let E=null,M={name:$.name,args:Z},R,q=(P)=>{let w=P;if(K?.structuredOutput?.schema&&w.object)E=w.object;O.resolve(P.text),K?.onFinish?.(P)};if((await $.getModel()).specificationVersion==="v1"&&typeof $.streamLegacy==="function"){let{fullStream:P}=await $.streamLegacy(Z.prompt,{...K,requestContext:F,...B,onFinish:q,abortSignal:L});R=P}else{let P=await $.stream(Z.prompt,{...K,requestContext:F,...B,onFinish:q,abortSignal:L});P.text.then(O.resolve,O.reject),R=P.fullStream}let _=null;if(V==="legacy"){await z.publish(`workflow.events.v2.${H}`,{type:"watch",runId:H,data:{type:"tool-call-streaming-start",...M??{}}});for await(let P of R){if(P.type==="tripwire"){_=P;break}if(P.type==="text-delta")await z.publish(`workflow.events.v2.${H}`,{type:"watch",runId:H,data:{type:"tool-call-delta",...M??{},argsTextDelta:P.textDelta}})}await z.publish(`workflow.events.v2.${H}`,{type:"watch",runId:H,data:{type:"tool-call-streaming-finish",...M??{}}})}else for await(let P of R)if(await Dv0({writer:D,chunk:P}),P.type==="tripwire"){_=P;break}if(_)throw new u6(_.payload?.reason||"Agent tripwire triggered",{retry:_.payload?.retry,metadata:_.payload?.metadata},_.payload?.processorId);if(L.aborted)return N();if(E!==null)return E;return{text:await O.promise}},component:"AGENT"}}function j89($,Y){if(!$.inputSchema||!$.outputSchema)throw Error("Tool must have input and output schemas defined");return{id:$.id,description:$.description,inputSchema:$.inputSchema,outputSchema:$.outputSchema,resumeSchema:$.resumeSchema,suspendSchema:$.suspendSchema,retries:Y?.retries,scorers:Y?.scorers,metadata:Y?.metadata,execute:async({inputData:X,mastra:G,requestContext:J,suspend:Q,resumeData:W,runId:K,workflowId:Z,state:H,setState:z,...V})=>{let F=e1(V),L={mastra:G,requestContext:J,...F,resumeData:W,workflow:{runId:K,suspend:Q,resumeData:W,workflowId:Z,state:H,setState:z}};return $.execute(X,L)},component:"TOOL"}}function T89($){let Y=(W)=>{switch(W){case"input":return J6.INPUT_PROCESSOR;case"inputStep":return J6.INPUT_STEP_PROCESSOR;case"outputStream":case"outputResult":return J6.OUTPUT_PROCESSOR;case"outputStep":return J6.OUTPUT_STEP_PROCESSOR;default:return J6.OUTPUT_PROCESSOR}},X=(W)=>{switch(W){case"input":return"input processor";case"inputStep":return"input step processor";case"outputStream":return"output stream processor";case"outputResult":return"output processor";case"outputStep":return"output step processor";default:return"processor"}},G=(W)=>{switch(W){case"input":return!!$.processInput;case"inputStep":return!!$.processInputStep;case"outputStream":return!!$.processOutputStream;case"outputResult":return!!$.processOutputResult;case"outputStep":return!!$.processOutputStep;default:return!1}},J={id:`processor:${$.id}`,description:$.name??`Processor ${$.id}`,inputSchema:Q4(zg0),outputSchema:Q4(t60),execute:async({inputData:W,requestContext:K,tracingContext:Z,outputWriter:H})=>{let z=W,{phase:V,messages:F,messageList:L,stepNumber:N,systemMessages:D,part:A,streamParts:B,state:O,result:E,finishReason:M,toolCalls:R,text:q,retryCount:_,model:P,tools:w,toolChoice:j,activeTools:C,providerOptions:k,modelSettings:S,structuredOutput:I,steps:v,usage:x,messageId:y,rotateResponseMessageId:d,processorStates:u,abortSignal:b}=z,g=(D0,O0)=>{throw new u6(D0||`Tripwire triggered by ${$.id}`,O0,$.id)},p=y,h=y,n=d?()=>{return h=d(),h}:void 0,t={text:"",usage:{inputTokens:0,outputTokens:0,totalTokens:0},finishReason:"unknown",steps:[]},s=()=>{switch(V){case"input":return{messages:F??[],...D?{systemMessages:D}:{},..._!==void 0?{retryCount:_}:{}};case"inputStep":{let D0=pO(P),O0=GD(w),R0=cO(j,w),P0=dO(C,w);return{messages:F??[],...D?{systemMessages:D}:{},...N!==void 0?{stepNumber:N}:{},...h?{messageId:h}:{},..._!==void 0?{retryCount:_}:{},...D0?{model:D0}:{},...O0?{tools:O0}:{},...R0?{toolChoice:R0}:{},...P0?{activeTools:P0}:{}}}case"outputResult":{let D0=$80(E??t);return{messages:F??[],...D0?{result:D0}:{},..._!==void 0?{retryCount:_}:{}}}case"outputStep":return{messages:F??[],...D?{systemMessages:D}:{},...N!==void 0?{stepNumber:N}:{},...M!==void 0?{finishReason:M}:{},...q!==void 0?{text:q}:{},...R!==void 0?{toolCalls:R}:{},..._!==void 0?{retryCount:_}:{}};default:return}},K0=(D0)=>{if(D0===null||typeof D0!=="object"||Array.isArray(D0))return D0;let O0=D0;switch(V){case"input":return{...Array.isArray(O0.messages)&&!bT(F,O0.messages)?{messages:O0.messages}:{},...Array.isArray(O0.systemMessages)&&!bT(D,O0.systemMessages)?{systemMessages:O0.systemMessages}:{}};case"inputStep":{let R0={};if(Array.isArray(O0.messages)&&!bT(F,O0.messages))R0.messages=O0.messages;if(Array.isArray(O0.systemMessages)&&!bT(D,O0.systemMessages))R0.systemMessages=O0.systemMessages;if(O0.messageId!==void 0&&O0.messageId!==p)R0.messageId=O0.messageId;if(O0.model!==void 0&&O0.model!==P){let P0=pO(O0.model);if(P0)R0.model=P0}if(O0.tools!==void 0&&O0.tools!==w){let P0=GD(O0.tools);if(P0)R0.tools=P0}if(O0.toolChoice!==void 0&&O0.toolChoice!==j){let P0=cO(O0.toolChoice,O0.tools??w);if(P0)R0.toolChoice=P0}if(O0.activeTools!==void 0&&O0.activeTools!==C){let P0=dO(O0.activeTools,O0.tools??w);if(P0)R0.activeTools=P0}if(O0.retryCount!==void 0&&O0.retryCount!==_)R0.retryCount=O0.retryCount;return R0}case"outputResult":case"outputStep":return{...Array.isArray(O0.messages)&&!bT(F,O0.messages)?{messages:O0.messages}:{},...Array.isArray(O0.systemMessages)&&!bT(D,O0.systemMessages)?{systemMessages:O0.systemMessages}:{}};default:return}};if(!G(V))return z;let X0=Z?.currentSpan,a=V==="inputStep"||V==="outputStep"?X0?.findParent("model_step")||X0:X0?.findParent("agent_run")||X0,Q0=V!=="outputStream"?a?.createChildSpan({type:"processor_run",name:`${X(V)}: ${$.id}`,entityType:Y(V),entityId:$.id,entityName:$.name??$.id,input:s(),attributes:{processorExecutor:"workflow",processorIndex:$.processorIndex}}):void 0,e=g4(Q0?{currentSpan:Q0}:Z),m=H?{custom:async(D0)=>{await H(D0)}}:void 0,$0;if(u){let D0=u.get($.id);if(!D0)D0=new JD,u.set($.id,D0);$0=D0.customState}else $0=O??{};let Y0={abort:g,retryCount:_??0,requestContext:K,...e,state:$0,writer:m,abortSignal:b,messageId:h,rotateResponseMessageId:n},Z0={phase:V,messageList:L??(Array.isArray(F)?new l6().add(F,"input").addSystem(D??[]):void 0),stepNumber:N,systemMessages:D,streamParts:B,state:$0,processorStates:u,result:E,finishReason:M,toolCalls:R,text:q,retryCount:_,model:P,tools:w,toolChoice:j,activeTools:C,providerOptions:k,modelSettings:S,structuredOutput:I,steps:v,usage:x,messageId:h,rotateResponseMessageId:n};return(async(D0)=>{try{let O0=await DQ({span:Q0,fn:D0});return Q0?.end({output:K0(O0)}),O0}catch(O0){if(O0 instanceof u6)Q0?.end({output:{tripwire:O0.message}});else Q0?.error({error:O0,endSpan:!0});throw O0}})(async()=>{switch(V){case"input":{if($.processInput){if(!Z0.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_MISSING_MESSAGE_LIST",text:`Processor ${$.id} requires messageList or messages for processInput phase`});let D0=Z0.messageList,O0=F.map((f0)=>f0.id),R0=D0.makeMessageSourceChecker(),P0=await $.processInput({...Y0,messages:F,messageList:D0,systemMessages:D??[]});if(P0 instanceof l6){if(P0!==D0)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${$.id} returned a MessageList instance other than the one passed in. Use the messageList argument instead.`});return{...Z0,messages:P0.get.all.db(),systemMessages:P0.getAllSystemMessages()}}else if(Array.isArray(P0))return V5.applyMessagesToMessageList(P0,D0,O0,R0,"input"),{...Z0,messages:P0};else if(P0&&"messages"in P0&&"systemMessages"in P0){let f0=P0;return V5.applyMessagesToMessageList(f0.messages,D0,O0,R0,"input"),D0.replaceAllSystemMessages(f0.systemMessages),{...Z0,messages:f0.messages,systemMessages:f0.systemMessages}}return{...Z0,messages:F}}return{...Z0,messages:F}}case"inputStep":{if($.processInputStep){if(!Z0.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_MISSING_MESSAGE_LIST",text:`Processor ${$.id} requires messageList or messages for processInputStep phase`});let D0=Z0.messageList,O0=F.map((p0)=>p0.id),R0=D0.makeMessageSourceChecker(),P0=await $.processInputStep({...Y0,messages:F,messageList:D0,stepNumber:N??0,systemMessages:D??[],model:P,tools:w,toolChoice:j,activeTools:C,providerOptions:k,modelSettings:S,structuredOutput:I,steps:v??[],messageId:h,rotateResponseMessageId:n}),f0=await V5.validateAndFormatProcessInputStepResult(P0,{messageList:D0,processor:$,stepNumber:N??0});if(f0.messages)V5.applyMessagesToMessageList(f0.messages,D0,O0,R0);if(f0.systemMessages)D0.replaceAllSystemMessages(f0.systemMessages);return{...Z0,messages:F,...f0,...h?{messageId:f0.messageId??h}:{}}}return{...Z0,messages:F}}case"outputStream":{if(A&&A.type.startsWith("data-")&&!$.processDataParts)return{...Z0,part:A};if($.processOutputStream&&A){let D0=`__outputStreamSpan_${$.id}`,O0=$0,R0=O0[D0];if(!R0&&a)R0=a.createChildSpan({type:"processor_run",name:`output stream processor: ${$.id}`,entityType:J6.OUTPUT_PROCESSOR,entityId:$.id,entityName:$.name??$.id,attributes:{processorExecutor:"workflow",processorIndex:$.processorIndex}}),O0[D0]=R0;let P0=g4(R0?{currentSpan:R0}:Y0.tracingContext),f0;try{if(f0=await $.processOutputStream({...Y0,...P0,part:A,streamParts:B??[],state:O0,messageList:Z0.messageList}),A&&A.type==="finish")R0?.end({output:{totalChunks:(B??[]).length}}),delete O0[D0]}catch(p0){if(p0 instanceof u6)R0?.end({output:{tripwire:p0.message}});else R0?.error({error:p0,endSpan:!0});throw delete O0[D0],p0}return{...Z0,state:O0,part:f0}}return{...Z0,part:A}}case"outputResult":{if($.processOutputResult){if(!Z0.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_MISSING_MESSAGE_LIST",text:`Processor ${$.id} requires messageList or messages for processOutputResult phase`});let D0=F.map((f0)=>f0.id),O0=Z0.messageList.makeMessageSourceChecker(),R0={text:"",usage:{inputTokens:0,outputTokens:0,totalTokens:0},finishReason:"unknown",steps:[]},P0=await $.processOutputResult({...Y0,messages:F,messageList:Z0.messageList,result:Z0.result??R0});if(P0 instanceof l6){if(P0!==Z0.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${$.id} returned a MessageList instance other than the one passed in. Use the messageList argument instead.`});return{...Z0,messages:P0.get.all.db(),systemMessages:P0.getAllSystemMessages()}}else if(Array.isArray(P0))return V5.applyMessagesToMessageList(P0,Z0.messageList,D0,O0,"response"),{...Z0,messages:P0};else if(P0&&"messages"in P0&&"systemMessages"in P0){let f0=P0;return V5.applyMessagesToMessageList(f0.messages,Z0.messageList,D0,O0,"response"),Z0.messageList.replaceAllSystemMessages(f0.systemMessages),{...Z0,messages:f0.messages,systemMessages:f0.systemMessages}}return{...Z0,messages:F}}return{...Z0,messages:F}}case"outputStep":{if($.processOutputStep){if(!Z0.messageList)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_MISSING_MESSAGE_LIST",text:`Processor ${$.id} requires messageList or messages for processOutputStep phase`});let D0=Z0.messageList,O0=F.map((p0)=>p0.id),R0=D0.makeMessageSourceChecker(),P0={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},f0=await $.processOutputStep({...Y0,messages:F,messageList:D0,stepNumber:N??0,finishReason:M,toolCalls:R,text:q,usage:x??P0,systemMessages:D??[],steps:v??[]});if(f0 instanceof l6){if(f0!==D0)throw new G0({category:"USER",domain:"MASTRA_WORKFLOW",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${$.id} returned a MessageList instance other than the one passed in. Use the messageList argument instead.`});return{...Z0,messages:f0.get.all.db(),systemMessages:f0.getAllSystemMessages()}}else if(Array.isArray(f0))return V5.applyMessagesToMessageList(f0,D0,O0,R0,"response"),{...Z0,messages:f0};else if(f0&&"messages"in f0&&"systemMessages"in f0){let p0=f0;return V5.applyMessagesToMessageList(p0.messages,D0,O0,R0,"response"),D0.replaceAllSystemMessages(p0.systemMessages),{...Z0,messages:p0.messages,systemMessages:p0.systemMessages}}return{...Z0,messages:F}}return{...Z0,messages:F}}default:return{...Z0,messages:F}}})},component:"PROCESSOR"},Q=$;if(typeof Q.getLoadedToolsForRequestContext==="function")J.getLoadedToolsForRequestContext=Q.getLoadedToolsForRequestContext.bind($);return J}function om($){return $!==null&&typeof $==="object"&&"id"in $&&typeof $.id==="string"&&!($ instanceof YJ)&&!($ instanceof MW)&&(typeof $.processInput==="function"||typeof $.processInputStep==="function"||typeof $.processOutputStream==="function"||typeof $.processOutputResult==="function"||typeof $.processOutputStep==="function"||typeof $.processAPIError==="function")}function Nv0($){Wg0=$}function IQ($){if($.schedule){if(!Wg0)throw new G0({id:"MASTRA_WORKFLOW_SCHEDULE_EVENTED_MODULE_NOT_LOADED",domain:"MASTRA_WORKFLOW",category:"USER",text:`Workflow "${$.id}" declares a schedule, which auto-promotes it to the evented execution engine, but the evented module has not been loaded. This usually means you imported \`createWorkflow\` from a deep path. Import from \`@mastra/core/workflows\` or add \`import '@mastra/core/workflows/evented';\` to your entry file.`,details:{workflowId:String($.id??"")}});return Wg0($)}return new Z80($)}function C89({_internal:$,controller:Y,runId:X,agentId:G}){return o9({id:"backgroundTaskCheckStep",inputSchema:hW,outputSchema:hW,execute:async({inputData:J,retryCount:Q})=>{let W=J,{threadId:K,resourceId:Z}=$||{},H=$?.backgroundTaskManager;if(!H)return W;let V=(await H?.listTasks({agentId:G,status:"running",threadId:K,resourceId:Z}))?.tasks;if(!V||V.length===0)return W;if($?.skipBgTaskWait)return{...W,backgroundTaskPending:!0};let F=V.map((A)=>A.id),L=$?.agentBackgroundConfig,N=$?.backgroundTaskManagerConfig,D=L?.waitTimeoutMs??N?.waitTimeoutMs;if(Q===0||!D)return{...W,backgroundTaskPending:!0};try{Y.enqueue({type:"background-task-progress",runId:X,from:"AGENT",payload:{taskIds:F,runningCount:V.length,elapsedMs:0}})}catch{}try{await H.waitForNextTask(F,{timeoutMs:D,onProgress:(A)=>{try{Y.enqueue({type:"background-task-progress",runId:X,from:"AGENT",payload:{taskIds:F,runningCount:V.length,elapsedMs:A}})}catch{}},progressIntervalMs:3000})}catch{return W}if(W.stepResult)W.stepResult.isContinued=!0;return{...W,backgroundTaskPending:!0}}})}async function A$0($,Y,X){if(!X.structuredOutput?.schema)throw new G0({id:"STRUCTURED_OUTPUT_OPTIONS_REQUIRED",domain:"AGENT",category:"USER",text:"structuredOutput is required to use tryGenerateWithJsonFallback"});try{return await $.generate(Y,X)}catch(G){return console.warn("Error in tryGenerateWithJsonFallback. Attempting fallback.",G),await $.generate(Y,{...X,structuredOutput:{...X.structuredOutput,jsonPromptInjection:!0}})}}function Vg0($){let Y;if($?.memory?.thread){if(typeof $.memory.thread==="string")Y={id:$.memory.thread};else if(typeof $.memory.thread==="object"&&$.memory.thread.id)Y=$.memory.thread}if(!Y&&$?.threadId)Y={id:$.threadId};if($.overrideId)return{...Y||{},id:$.overrideId};return Y}async function c24($,Y){let X=Date.now();try{let G=await $.run({runId:Y.runId,input:Y,output:Y.primitiveResult,requestContext:Y.customContext}),J=typeof G.score==="number"?G.score:0,Q=typeof G.reason==="string"?G.reason:void 0;return{score:J,passed:J===1,reason:Q,scorerId:$.id,scorerName:$.name??$.id,duration:Date.now()-X}}catch(G){return{score:0,passed:!1,reason:`Scorer threw an error: ${G.message}`,scorerId:$.id,scorerName:$.name??$.id,duration:Date.now()-X}}}async function gK4($,Y,X){let G=X?.strategy??"all",J=X?.parallel??!0,Q=X?.timeout??600000,W=Date.now(),K=[],Z=!1,H=new Promise((L)=>{setTimeout(()=>L("timeout"),Q)});if(J){let L=$.map((D)=>c24(D,Y)),N=await Promise.race([Promise.all(L),H]);if(N==="timeout"){Z=!0;let D=await Promise.allSettled(L);for(let A of D)if(A.status==="fulfilled")K.push(A.value)}else K.push(...N)}else for(let L of $){if(Date.now()-W>Q){Z=!0;break}let N=await c24(L,Y);if(K.push(N),G==="all"&&!N.passed)break;if(G==="any"&&N.passed)break}let z=G==="all"?K.length===$.length&&K.every((L)=>L.passed):K.some((L)=>L.passed),F=(K.find((L)=>L.passed)||K[0])?.reason;return{complete:z,completionReason:F,scorers:K,totalDuration:Date.now()-W,timedOut:Z}}async function S89($,Y){let X=await gK4($.scorers||[],Y,{strategy:$.strategy,parallel:$.parallel,timeout:$.timeout});return await $.onComplete?.(X),X}function k89($,Y){let X=[];if(X.push("#### Completion Check Results"),X.push(""),X.push(`Overall: ${$.complete?"\u2705 COMPLETE":"\u274C NOT COMPLETE"}`),X.push(`Duration: ${$.totalDuration}ms`),$.timedOut)X.push("\u26A0\uFE0F Scoring timed out");X.push("");for(let G of $.scorers){if(X.push(`###### ${G.scorerName} (${G.scorerId})`),X.push(`Score: ${G.score} ${G.passed?"\u2705":"\u274C"}`),G.reason)X.push(`Reason: ${G.reason}`);X.push("")}if($.complete)X.push(`

\u2705 The task is complete.`);else if(Y)X.push(`

\u26A0\uFE0F Max iterations reached.`);else X.push(`

\uD83D\uDD04 Will continue working on the task.`);return X.join(`
`)}async function x89($,Y,X,G,J){let Q=Date.now(),W=Y.messages.map((H)=>{try{if(typeof H.content==="string")return null;let z=H.content.parts?.[0]?.type==="text"?H.content.parts?.[0]?.text:null;if(z?.includes('"isNetwork":true')){let V=JSON.parse(z);if(V.isNetwork)return`${V.primitiveType} "${V.primitiveId}"`}}catch{}return null}).filter(Boolean),K=W.length>0?`

Primitives already executed: ${W.join(", ")}`:"",Z=`
    The ${Y.selectedPrimitive.type} ${Y.selectedPrimitive.id} has contributed to the task.
    This is the result: ${JE(Y.primitiveResult)}
    
    ${K}

    You need to evaluate if the task is complete. Pay very close attention to the SYSTEM INSTRUCTIONS for when the task is considered complete. 
    Only return true if the task is complete according to the system instructions.
    Original task: ${Y.originalTask}

    If no primitive (type = 'none'), the task is complete because we can't run any primitive to further task completion.

    Also, if the ${Y.selectedPrimitive.type} ${Y.selectedPrimitive.id} has declined the tool call in its response, then the task is complete as the primitive tool-call was declined by the user.

    IMPORTANT: If the above result is from an AGENT PRIMITIVE and it is a suitable final result itself considering the original task, then finalResult should be an empty string or undefined.
    
    If the task is complete and the result is not from an AGENT PRIMITIVE, always generate a finalResult.
    IF the task is complete and the result is from an AGENT PRIMITIVE, but the AGENT PRIMITIVE response is not comprehensive enough to accomplish the user's original task, then generate a finalResult.

    IMPORTANT: The generated finalResult should not be the exact primitive result. You should craft a comprehensive response based on the message history.
    The finalResult field should be written in natural language.

    You must return this JSON shape:
    {
      "isComplete": boolean,
      "completionReason": string,
      "finalResult": string,
    }
  `;try{let H=await $.stream(Z,{maxSteps:1,structuredOutput:{schema:v89},abortSignal:G,onAbort:J}),z="",V=0,{writer:F,stepId:L,runId:N}=X??{},D=F&&L&&N;if(D)await F.write({type:"routing-agent-text-start",payload:{runId:L},from:"NETWORK",runId:N});for await(let O of H.objectStream){if(O?.finalResult)z=O.finalResult;if(D){let E=z.slice(V);if(O?.isComplete&&E.length)await F.write({type:"routing-agent-text-delta",payload:{text:E},from:"NETWORK",runId:N}),V=z.length}}let B=(await H.getFullOutput()).object;return{score:B?.isComplete?1:0,passed:B?.isComplete??!1,reason:B?.completionReason,finalResult:B?.finalResult,scorerId:"default-completion",scorerName:"Default LLM Completion",duration:Date.now()-Q}}catch(H){return{score:0,passed:!1,reason:`LLM completion check failed: ${H.message}`,scorerId:"default-completion",scorerName:"Default LLM Completion",duration:Date.now()-Q}}}async function b89($,Y,X,G,J){let Q=`
    The task has been completed successfully.
    Original task: ${Y.originalTask}

    The ${Y.selectedPrimitive.type} ${Y.selectedPrimitive.id} produced this result:
    ${JE(Y.primitiveResult)}

    IMPORTANT: If the above result is from an AGENT PRIMITIVE and it is a suitable final result itself considering the original task, then finalResult should be an empty string or undefined.
    You should evaluate if the above result is comprehensive enough to accomplish the user's original task.
    Otherwise, generate the finalResult object. If the result is not from an AGENT PRIMITIVE, always generate a finalResult.

    The generated finalResult should not be the exact primitive result. You should craft a comprehensive response based on the message history.
    The response should be written in natural language.

    Return JSON:
    {
      "finalResult": string,
    }
  `,W=await $.stream(Q,{maxSteps:1,structuredOutput:{schema:y89},abortSignal:G,onAbort:J}),K="",Z=0,{writer:H,stepId:z,runId:V}=X??{},F=H&&z&&V;if(F)await H.write({type:"routing-agent-text-start",payload:{runId:z},from:"NETWORK",runId:V});for await(let N of W.objectStream){if(N?.finalResult)K=N.finalResult;if(F){let D=K.slice(Z);if(D.length)await H.write({type:"routing-agent-text-delta",payload:{text:D},from:"NETWORK",runId:V}),Z=K.length}}return(await W.getFullOutput()).object?.finalResult}async function l24($,Y,X,G,J,Q){let W=`
    The task has been completed successfully.
    Original task: ${Y.originalTask}

    The ${Y.selectedPrimitive.type} ${Y.selectedPrimitive.id} produced this result:
    ${JE(Y.primitiveResult)}

    Based on the task and result above, generate a structured response according to the provided schema.
    Use the conversation history and primitive results to craft the response.
  `,K=await $.stream(W,{maxSteps:1,structuredOutput:X,abortSignal:J,onAbort:Q}),{writer:Z,stepId:H,runId:z}=G??{},V=Z&&H&&z;for await(let N of K.objectStream)if(V&&N)await Z.write({type:"network-object",payload:{object:N},from:"NETWORK",runId:z});let L=(await K.getFullOutput()).object;if(V&&L)await Z.write({type:"network-object-result",payload:{object:L},from:"NETWORK",runId:z});return{text:L?JSON.stringify(L):void 0,object:L}}async function h89($,Y,X){let G={iteration:Y.iteration,maxIterations:Y.maxIterations,messages:Y.messages,originalTask:Y.originalTask,selectedPrimitive:{id:"stream",type:"agent"},primitivePrompt:Y.originalTask,primitiveResult:Y.currentText,networkName:Y.agentName||Y.agentId||"stream",runId:Y.runId,threadId:Y.threadId,resourceId:Y.resourceId,customContext:{...Y.customContext,toolCalls:Y.toolCalls,toolResults:Y.toolResults,agentId:Y.agentId,agentName:Y.agentName}};return gK4($,G,X)}function f89($,Y){let X=[];if(X.push("#### Completion Check Results"),X.push(""),X.push(`Overall: ${$.complete?"\u2705 COMPLETE":"\u274C NOT COMPLETE"}`),X.push(`Duration: ${$.totalDuration}ms`),$.timedOut)X.push("\u26A0\uFE0F Scoring timed out");X.push("");for(let G of $.scorers){if(X.push(`**${G.scorerName}** (${G.scorerId})`),X.push(`Score: ${G.score} ${G.passed?"\u2705":"\u274C"}`),G.reason)X.push(`Reason: ${G.reason}`);X.push("")}if($.complete)X.push("\u2705 The task is complete.");else if(Y)X.push("\u26A0\uFE0F Max iterations reached.");else X.push("\uD83D\uDD04 The task is not yet complete. Please continue working based on the feedback above.");return X.join(`
`)}function g89($){let{isTaskComplete:Y,maxSteps:X,messageList:G,requestContext:J,mastra:Q,controller:W,runId:K,_internal:Z,agentId:H,agentName:z}=$,V=0;return o9({id:"isTaskCompleteStep",inputSchema:hW,outputSchema:hW,execute:async({inputData:F})=>{if(V++,F.backgroundTaskPending)return F;if(!(Y?.scorers&&Y.scorers.length>0)||F.stepResult?.isContinued)return F;let N=F.output.toolCalls||[],D=(w)=>w==="updateWorkingMemory"||w==="update-working-memory";if(N.length>0&&N.every((w)=>D(w.toolName)))return F;let B=G.get.input.db()[0],O="Unknown task";if(B){if(typeof B.content==="string")O=B.content;else if(B.content?.parts?.[0]?.type==="text")O=B.content.parts[0].text}let E=F.output.toolCalls||[],M=F.output.toolResults||[],R={iteration:V,maxIterations:X,originalTask:O,currentText:F.output.text||"",toolCalls:E.map((w)=>({name:w.toolName,args:w.args||{}})),messages:G.get.all.db(),toolResults:M.map((w)=>({name:w.toolName,result:w.result})),agentId:H||"",agentName:z||"",runId:K,threadId:Z?.threadId,resourceId:Z?.resourceId,customContext:J?Object.fromEntries(J.entries()):void 0},q=await h89(Y.scorers,R,{strategy:Y.strategy,parallel:Y.parallel,timeout:Y.timeout});if(Y.onComplete)await Y.onComplete(q);if(q.complete){if(F.stepResult)F.stepResult.isContinued=!1}else if(F.stepResult)F.stepResult.isContinued=!0;let _=X?V>=X:!1,P=f89(q,_);return G.add({id:Q?.generateId(),createdAt:new Date,type:"text",role:"assistant",content:{parts:[{type:"text",text:P}],metadata:{mode:"stream",completionResult:{passed:q.complete,suppressFeedback:!!Y.suppressFeedback}},format:2}},"response"),W.enqueue({type:"is-task-complete",runId:K,from:"AGENT",payload:{iteration:V,passed:q.complete,results:q.scorers,duration:q.totalDuration,timedOut:q.timedOut,reason:q.completionReason,maxIterationReached:!!_,suppressFeedback:!!Y.suppressFeedback}}),{...F,isTaskCompleteCheckFailed:!q.complete}}})}function i24($,Y){if(!$)return Y;if(!Y)return $;return mK4($,Y)}function n24($){if($===null||typeof $!=="object")return!1;let Y=Object.getPrototypeOf($);return Y===null||Y===Object.prototype}function mK4($,Y){if(Y===void 0)return $;if($===void 0)return Y;if(n24($)&&n24(Y)){let X={...$};for(let G of Object.keys(Y))X[G]=mK4($[G],Y[G]);return X}return Y}function u89($){if(!$)return;if(z5($))return $6($,{io:"input",target:"draft-07"});return $}function E$0($,Y){if(!$)return;let X=Y?.model?GE({schema:$,compatLayers:[new kj(Y.model)],mode:"jsonSchema"}):u89($);if(!X)return;let{$schema:G,...J}=X;if(J.type==="array"){let Q=J.items;return{jsonSchema:{$schema:G,type:"object",properties:{elements:{type:"array",items:Q}},required:["elements"],additionalProperties:!1},outputFormat:"array"}}if(J.enum&&Array.isArray(J.enum))return{jsonSchema:{$schema:G,type:"object",properties:{result:{type:J.type||"string",enum:J.enum}},required:["result"],additionalProperties:!1},outputFormat:"enum"};return{jsonSchema:X,outputFormat:X.type}}function p89($,Y){if($)return{type:"json",schema:E$0($,Y)?.jsonSchema};return{type:"text"}}function d89($){try{return JSON.parse($),$}catch{return $.replace(/[\s]*<\|[^|]*\|>[\s]*/g,"").trim()}}function c89($){let Y=$.trim();Y=Y.replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)"/g,(X,G,J)=>{if(G.trimEnd().endsWith('"'))return X;return`${G}"${J}"`}),Y=Y.replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)\s*:/g,'$1"$2":'),Y=Y.replace(/'/g,'"'),Y=Y.replace(/,(\s*[}\]])/g,"$1"),Y=Y.replace(/:\s*(\d{4}-\d{2}-\d{2}(?:T[\d:]+)?)\s*([,}])/g,': "$1"$2');try{return JSON.parse(Y)}catch{return null}}function l89($,Y){switch($.type){case"response-metadata":return{type:"response-metadata",runId:Y.runId,from:"AGENT",payload:{...$}};case"text-start":return{type:"text-start",runId:Y.runId,from:"AGENT",payload:{id:$.id,providerMetadata:$.providerMetadata}};case"text-delta":if($.delta)return{type:"text-delta",runId:Y.runId,from:"AGENT",payload:{id:$.id,providerMetadata:$.providerMetadata,text:$.delta}};return;case"text-end":return{type:"text-end",runId:Y.runId,from:"AGENT",payload:$};case"reasoning-start":return{type:"reasoning-start",runId:Y.runId,from:"AGENT",payload:{id:$.id,providerMetadata:$.providerMetadata}};case"reasoning-delta":return{type:"reasoning-delta",runId:Y.runId,from:"AGENT",payload:{id:$.id,providerMetadata:$.providerMetadata,text:$.delta}};case"reasoning-end":return{type:"reasoning-end",runId:Y.runId,from:"AGENT",payload:{id:$.id,providerMetadata:$.providerMetadata}};case"source":return{type:"source",runId:Y.runId,from:"AGENT",payload:{id:$.id,sourceType:$.sourceType,title:$.title||"",mimeType:$.sourceType==="document"?$.mediaType:void 0,filename:$.sourceType==="document"?$.filename:void 0,url:$.sourceType==="url"?$.url:void 0,providerMetadata:$.providerMetadata}};case"file":{let K=$.providerMetadata;return{type:"file",runId:Y.runId,from:"AGENT",payload:{data:$.data,base64:typeof $.data==="string"?$.data:void 0,mimeType:$.mediaType,...K!=null?{providerMetadata:K}:{}}}}case"tool-call":{let K=void 0;if($.input){let Z=d89($.input);if(Z)try{K=JSON.parse(Z)}catch{let H=c89(Z);if(H)K=H;else console.error("Error converting tool call input to JSON",{input:$.input}),K=void 0}}return{type:"tool-call",runId:Y.runId,from:"AGENT",payload:{toolCallId:$.toolCallId,toolName:$.toolName,args:K,providerExecuted:$.providerExecuted,providerMetadata:$.providerMetadata}}}case"tool-result":return{type:"tool-result",runId:Y.runId,from:"AGENT",payload:{toolCallId:$.toolCallId,toolName:$.toolName,result:$.result,isError:$.isError,providerExecuted:$.providerExecuted,providerMetadata:$.providerMetadata}};case"tool-input-start":return{type:"tool-call-input-streaming-start",runId:Y.runId,from:"AGENT",payload:{toolCallId:$.id,toolName:$.toolName,providerExecuted:$.providerExecuted,providerMetadata:$.providerMetadata,dynamic:$.dynamic}};case"tool-input-delta":if($.delta)return{type:"tool-call-delta",runId:Y.runId,from:"AGENT",payload:{argsTextDelta:$.delta,toolCallId:$.id,providerMetadata:$.providerMetadata}};return;case"tool-input-end":return{type:"tool-call-input-streaming-end",runId:Y.runId,from:"AGENT",payload:{toolCallId:$.id,providerMetadata:$.providerMetadata}};case"finish":let{finishReason:X,usage:G,providerMetadata:J,messages:Q,...W}=$;return{type:"finish",runId:Y.runId,from:"AGENT",payload:{providerMetadata:$.providerMetadata,stepResult:{reason:a89($.finishReason)},output:{usage:n89($.usage)},metadata:{providerMetadata:$.providerMetadata},messages:Q??{all:[],user:[],nonUser:[]},...W}};case"error":return{type:"error",runId:Y.runId,from:"AGENT",payload:$};case"raw":return{type:"raw",runId:Y.runId,from:"AGENT",payload:$.rawValue}}return}function i89($){if(!$||typeof $!=="object")return!1;let Y=$;return typeof Y.inputTokens==="object"&&Y.inputTokens!==null&&"total"in Y.inputTokens&&typeof Y.outputTokens==="object"&&Y.outputTokens!==null&&"total"in Y.outputTokens}function n89($){if(!$)return{inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0,cacheCreationInputTokens:void 0,raw:void 0};if(i89($)){let X=$.inputTokens.total,G=$.outputTokens.total;return{inputTokens:X,outputTokens:G,totalTokens:(X??0)+(G??0),reasoningTokens:$.outputTokens.reasoning,cachedInputTokens:$.inputTokens.cacheRead,cacheCreationInputTokens:$.inputTokens.cacheWrite,raw:$}}let Y=$;return{inputTokens:Y.inputTokens,outputTokens:Y.outputTokens,totalTokens:Y.totalTokens??(Y.inputTokens??0)+(Y.outputTokens??0),reasoningTokens:Y.reasoningTokens,cachedInputTokens:Y.cachedInputTokens,cacheCreationInputTokens:Y.cacheCreationInputTokens,raw:$}}function r89($){return typeof $==="object"&&$!==null&&"unified"in $}function a89($){if(!$)return"other";if($==="tripwire"||$==="retry")return $;if(r89($))return $.unified;return $==="unknown"?"other":$}function s89($){return/^\d+$/.test($)}function t89($,Y){let X={...$};for(let G of Y)delete X[G];return X}function e89({runId:$,model:Y,providerOptions:X,inputMessages:G,tools:J,toolChoice:Q,activeTools:W,options:K,onResult:Z,includeRawChunks:H,modelSettings:z,structuredOutput:V,headers:F,shouldThrowError:L,methodType:N,generateId:D}){let A=new o89({component:"LLM",name:Y.modelId,generateId:D}),B=Y.specificationVersion==="v3"?"v3":"v2",O=P69({tools:J,toolChoice:Q,activeTools:W,targetVersion:B}),E=V?.schema?V?.model?"processor":"direct":void 0,M=V?.schema?p89(V?.schema,{model:{provider:Y.provider,modelId:Y.modelId,supportsStructuredOutputs:!0}}):void 0,R=G;if(E==="direct"&&M?.type==="json"&&V?.jsonPromptInjection)R=ek0({messages:G,schema:M.schema});if(E==="processor"&&M?.type==="json"&&M?.schema&&!V?.useAgent)R=ek0({messages:G,schema:M.schema,schemaPrefix:`Your response will be processed by another agent to extract structured data. Please ensure your response contains comprehensive information for all the following fields that will be extracted:
`,schemaSuffix:`

You don't need to format your response as JSON unless the user asks you to. Just ensure your natural language response includes relevant information for each field in the schema above.`});let q=Y.provider.startsWith("openai")&&M?.type==="json"&&!V?.jsonPromptInjection;if(q&&M?.schema)M.schema=Sv0(M.schema);let _=q?{...X??{},openai:{strictJsonSchema:!0,...X?.openai??{}}}:X;return A.initialize({runId:$,onResult:Z,createStream:async()=>{try{let w=t89(z||{},["maxRetries","headers"]),j=K?.abortSignal;return await(await Promise.resolve().then(() => (T24(),j24))).default(async()=>{return await(N==="stream"?Y.doStream:Y.doGenerate).bind(Y)({...O,prompt:R,providerOptions:_,abortSignal:j,includeRawChunks:H,responseFormat:E==="direct"&&!V?.jsonPromptInjection?M:void 0,...w,headers:F})},{retries:z?.maxRetries??2,signal:j,shouldRetry(k){if(M7.isInstance(k.error))return k.error.isRetryable;return!0}})}catch(w){if(L)throw w;return{stream:new ReadableStream({start:async(j)=>{j.enqueue({type:"error",error:w}),j.close()}}),warnings:[],request:{},rawResponse:{}}}}})}function hE($,Y){if(!$)return;return Object.values($).find((X)=>FO(X)&&(dp1(X.id)===Y||X.name===Y))}function B$0($,Y){if($!==void 0)return $;if(!FO(Y))return;return!(typeof Y==="object"&&Y!==null&&("execute"in Y)&&typeof Y.execute==="function")}function Y99({chunks:$,messageId:Y,responseModelMetadata:X,tools:G,createdAt:J=new Date}){let Q=[],W=new Map;for(let D of $)if(D.type==="tool-result"&&D.payload.result!=null){let A=D.payload;W.set(A.toolCallId,{result:A.result,args:A.args,providerMetadata:n2(A.providerMetadata,D.metadata),providerExecuted:A.providerExecuted,toolName:A.toolName})}let K=new Map,Z=new Map,H=new Map,z=new Map;for(let D of $)switch(D.type){case"text-start":{let A=D.payload;K.set(A.id,A.providerMetadata);break}case"text-delta":{let A=D.payload,B=H.get(A.id);if(!B)B={type:"text",text:"",providerMetadata:K.get(A.id)??A.providerMetadata},H.set(A.id,B),Q.push(B);if(B.text+=A.text,A.providerMetadata)B.providerMetadata=A.providerMetadata;break}case"text-end":{let A=D.payload,B=H.get(A.id);if(B){if(A.providerMetadata)B.providerMetadata=A.providerMetadata;if(!B.providerMetadata)delete B.providerMetadata}K.delete(A.id),H.delete(A.id);break}case"reasoning-start":{let A=D.payload;if(Object.values(A.providerMetadata||{}).some((O)=>O?.redactedData)){let O={type:"reasoning",reasoning:"",details:[{type:"redacted",data:""}],providerMetadata:A.providerMetadata};z.set(A.id,O),Q.push(O)}else Z.set(A.id,A.providerMetadata);break}case"reasoning-delta":{let A=D.payload,B=z.get(A.id);if(!B)B={type:"reasoning",reasoning:"",details:[{type:"text",text:""}],providerMetadata:Z.get(A.id)??A.providerMetadata},z.set(A.id,B),Q.push(B);let O=B.details[0];if(O&&O.type==="text")O.text+=A.text;if(A.providerMetadata)B.providerMetadata=A.providerMetadata;break}case"reasoning-end":{let A=D.payload,B=z.get(A.id);if(B){if(A.providerMetadata)B.providerMetadata=A.providerMetadata}else{let O={type:"reasoning",reasoning:"",details:[{type:"text",text:""}],providerMetadata:A.providerMetadata??Z.get(A.id)};Q.push(O)}Z.delete(A.id),z.delete(A.id);break}case"redacted-reasoning":{let A=D.payload;Q.push({type:"reasoning",reasoning:"",details:[{type:"redacted",data:""}],providerMetadata:A.providerMetadata});break}case"source":{let A=D.payload;Q.push({type:"source",source:{sourceType:"url",id:A.id,url:A.url||"",title:A.title,providerMetadata:A.providerMetadata}});break}case"file":{let A=D.payload;Q.push({type:"file",data:A.data,mimeType:A.mimeType,...A.providerMetadata?{providerMetadata:A.providerMetadata}:{}});break}case"tool-call":{let A=D.payload,B=G?.[A.toolName]||hE(G,A.toolName),O=B$0(A.providerExecuted,B),E=n2(A.providerMetadata,D.metadata),M=W.get(A.toolCallId);if(M){let R=B$0(M.providerExecuted,B);Q.push({type:"tool-invocation",toolInvocation:{state:"result",toolCallId:A.toolCallId,toolName:A.toolName,args:A.args,result:M.result},providerMetadata:M.providerMetadata??E,providerExecuted:R})}else Q.push({type:"tool-invocation",toolInvocation:{state:"call",toolCallId:A.toolCallId,toolName:A.toolName,args:A.args},providerMetadata:E,providerExecuted:O});break}}for(let[D]of Z)if(!z.has(D)){let A={type:"reasoning",reasoning:"",details:[{type:"text",text:""}],providerMetadata:Z.get(D)};Q.push(A)}for(let[,D]of H)if(!D.providerMetadata)delete D.providerMetadata;let V=Q.filter((D)=>!(D.type==="text"&&D.text==="")),F=[];for(let D=0;D<V.length;D++){let A=V[D];if(A.type==="text"&&F.length>0&&F[F.length-1]?.type==="tool-invocation")F.push({type:"step-start"});F.push(A)}if(F.length===0)return[];let L=F.filter((D)=>D.type==="text").map((D)=>D.text).join(`
`);return[{id:Y,role:"assistant",content:{format:2,parts:F,...L?{content:L}:{},...X},createdAt:J}]}function pK4($){return $&&$>0?$:10}function X99({requireToolApproval:$,tools:Y,activeTools:X}){if($)return!0;if(!Y)return!1;return(X===void 0?Object.entries(Y):X.flatMap((J)=>{let Q=Y[J];return Q?[[J,Q]]:[]})).some(([,J])=>{let Q=J;return Boolean(Q.hasSuspendSchema||Q.requireApproval)})}function dK4({requireToolApproval:$,tools:Y,activeTools:X,configuredConcurrency:G}){return X99({requireToolApproval:$,tools:Y,activeTools:X})?1:G}function G99($,Y){$.concurrency=dK4(Y)}function J99({inputProcessors:$,llmRequestInputProcessors:Y}){if(!Y?.length)return $||[];if(!$?.length)return Y;let X=new Set(Y.filter((J)=>!V9(J)).map((J)=>J.id)),G=$.filter((J)=>!V9(J)&&!X.has(J.id));return G.length?[...Y,...G]:Y}async function Q99($,{tools:Y,policy:X,logger:G}){let J="payload"in $?$.payload:void 0;if(!J||typeof J!=="object")return $;let{toolName:Q,toolCallId:W}=J;if(typeof Q!=="string"||typeof W!=="string")return $;let K=Y?.[Q]||hE(Y,Q)||Object.values(Y||{}).find((z)=>("id"in z)&&z.id===Q),Z={policy:X,toolTransform:K?.transform},H;if($.type==="tool-call")H=await NQ({phase:"input-available",toolName:Q,toolCallId:W,input:J.args,providerMetadata:J.providerMetadata},Z,G);else if($.type==="tool-call-delta")H=await NQ({phase:"input-delta",toolName:Q,toolCallId:W,inputTextDelta:J.argsTextDelta,providerMetadata:J.providerMetadata},Z,G);else if($.type==="tool-result")$=RZ($,await NQ({phase:"input-available",toolName:Q,toolCallId:W,input:J.args,providerMetadata:J.providerMetadata},Z,G)),H=await NQ({phase:"output-available",toolName:Q,toolCallId:W,input:J.args,output:J.result,providerMetadata:J.providerMetadata},Z,G);else if($.type==="tool-error")$=RZ($,await NQ({phase:"input-available",toolName:Q,toolCallId:W,input:J.args,providerMetadata:J.providerMetadata},Z,G)),H=await NQ({phase:"error",toolName:Q,toolCallId:W,input:J.args,error:J.error,providerMetadata:J.providerMetadata},Z,G);return RZ($,H)}function W99($,Y){let X={},G=Y?.modelId??$.state.responseMetadata?.modelId;if(G)X.modelId=G;if(Y?.provider)X.provider=Y.provider;return Object.keys(X).length>0?{metadata:X}:void 0}function sf0({error:$,controller:Y,runId:X,model:G,messageList:J,messageId:Q,stepTools:W,_internal:K}){let Z={type:"tripwire",runId:X,from:"AGENT",payload:{reason:$.message,retry:$.options?.retry,metadata:$.options?.metadata,processorId:$.processorId}};F9(Y,Z);let H=new uK4({_internal:K,model:G});return{callBail:!0,outputStream:new uT({model:{modelId:G.modelId,provider:G.provider,version:G.specificationVersion},stream:new e2({start(z){z.enqueue(Z),z.close()}}),messageList:J,messageId:Q,options:{runId:X}}),runState:H,stepTools:W}}async function K99({tools:$,messageId:Y,messageList:X,outputStream:G,runState:J,options:Q,controller:W,responseFromModel:K,includeRawChunks:Z,logger:H,transportRef:z,transportResolver:V,toolPayloadTransform:F}){let L=!1,N=[];for await(let D of G._getBaseStream()){if(Q?.abortSignal?.aborted)break;if(!D)continue;if(!L&&z&&V){let A=V();if(A)z.current=A,L=!0}if(D.type=="object"||D.type=="object-result"){W.enqueue(D);continue}switch(D=await Q99(D,{tools:$,policy:F,logger:H}),N.push({type:D.type,payload:"payload"in D?D.payload:void 0,metadata:D.metadata}),D.type){case"response-metadata":J.setState({responseMetadata:{id:D.payload.id,timestamp:D.payload.timestamp,modelId:D.payload.modelId,headers:D.payload.headers}});break;case"tool-call-input-streaming-start":{let A=$?.[D.payload.toolName]||Object.values($||{})?.find((B)=>("id"in B)&&B.id===D.payload.toolName);if(A&&"onInputStart"in A)try{await A?.onInputStart?.({toolCallId:D.payload.toolCallId,messages:X.get.input.aiV5.model(),abortSignal:Q?.abortSignal})}catch(B){H?.error("Error calling onInputStart",B)}F9(W,D);break}case"tool-call-delta":{let A=$?.[D.payload.toolName||""]||Object.values($||{})?.find((B)=>("id"in B)&&B.id===D.payload.toolName);if(A&&"onInputDelta"in A)try{await A?.onInputDelta?.({inputTextDelta:D.payload.argsTextDelta,toolCallId:D.payload.toolCallId,messages:X.get.input.aiV5.model(),abortSignal:Q?.abortSignal})}catch(B){H?.error("Error calling onInputDelta",B)}F9(W,D);break}case"finish":J.setState({providerOptions:D.payload.metadata?.providerMetadata??D.payload.providerMetadata,stepResult:{reason:D.payload.reason,logprobs:D.payload.logprobs,warnings:K.warnings,totalUsage:D.payload.totalUsage,headers:K.rawResponse?.headers,messageId:Y,isContinued:!["stop","error","length"].includes(D.payload.stepResult.reason),request:K.request}});break;case"error":if(tk0(D.payload.error)&&Q?.abortSignal?.aborted)break;J.setState({hasErrored:!0,apiError:D.payload.error}),J.setState({stepResult:{isContinued:!1,reason:"error"}}),J.setState({deferredErrorChunk:D});break;case"tool-result":{if(D.payload.result!=null){let A=$?.[D.payload.toolName]||hE($,D.payload.toolName);X.updateToolInvocation({type:"tool-invocation",toolInvocation:{state:"result",toolCallId:D.payload.toolCallId,toolName:D.payload.toolName,args:D.payload.args,result:D.payload.result},providerMetadata:n2(D.payload.providerMetadata,D.metadata),providerExecuted:B$0(D.payload.providerExecuted,A)})}F9(W,D);break}default:F9(W,D)}if(["text-delta","reasoning-delta","source","tool-call","tool-call-input-streaming-start","tool-call-delta","tool-call-input-streaming-end","raw"].includes(D.type)){if(D.type==="raw"&&!Z)continue;await Q?.onChunk?.(D)}if(J.state.hasErrored)break}return{collectedChunks:N}}function Z99($,Y,X=0){return async(G)=>{let J=X,Q,W=!1,K;for(let Z of $.slice(X)){if(J++,W)break;try{let H=J===$.length;Q=await G(Z,H),W=!0}catch(H){if(H instanceof u6)throw H;K=H,Y?.error(`Error executing model ${Z.model.modelId}`,H)}}if(typeof Q>"u"){let H=`Exhausted all fallback models. Last error: ${K instanceof Error?K.message:String(K)}`;throw Y?.error(H),Error(H,{cause:K})}return Q}}function U99({models:$,_internal:Y,messageId:X,runId:G,tools:J,toolChoice:Q,activeTools:W,messageList:K,includeRawChunks:Z,modelSettings:H,providerOptions:z,options:V,toolCallStreaming:F,controller:L,structuredOutput:N,outputProcessors:D,inputProcessors:A,llmRequestInputProcessors:B,errorProcessors:O,logger:E,agentId:M,downloadRetries:R,downloadConcurrency:q,processorStates:_,requestContext:P,methodType:w,requireToolApproval:j,toolCallConcurrency:C,toolCallForeachOptions:k,modelSpanTracker:S,autoResumeSuspendedTools:I,maxProcessorRetries:v,workspace:x,outputWriter:y}){let d=K.getAllSystemMessages(),u=pK4(C),b=0;return o9({id:"llm-execution",inputSchema:hW,outputSchema:hW,execute:async({inputData:g,bail:p,tracingContext:h})=>{if(b++,b>1)K.stepStart();let n=g.isTaskCompleteCheckFailed?`${X}-${b}`:g.messageId||X;S?.startStep();let t,s,K0,X0,a=g.fallbackModelIndex||0,Q0,e=v??(O?.length?10:void 0),{outputStream:m,callBail:$0,runState:Y0,stepTools:Z0,stepWorkspace:F0,processAPIErrorRetry:D0}=await Z99($,E,a)(async(I1,M4)=>{a=$.findIndex(($4)=>$4.id===I1.id);let{model:w4,headers:z6}=I1;if(S&&a>0)S.updateGeneration({name:`llm: '${w4.modelId}'`,attributes:{model:w4.modelId,provider:w4.provider}});if(d)K.replaceAllSystemMessages(d);if(g.processorRetryFeedback)K.addSystem(g.processorRetryFeedback,"processor-retry-feedback");let K4=Y?.initialSignalEchoes?.splice(0)??[];for(let $4 of K4)F9(L,$4.toDataPart());if((g.output?.steps?.length??0)===0){let $4=Y?.drainPendingSignals?.(G)??[];if($4.length>0)n=Y?.generateId?.()??KO();for(let i4 of $4){let C9=K.addSignal(i4);F9(L,C9.toDataPart())}}let N0={messageId:n,createdAt:new Date,model:w4,tools:J,toolChoice:Q,activeTools:W,providerOptions:z,modelSettings:H,structuredOutput:N,workspace:x},h0=()=>{return n=Y?.generateId?.()??KO(),N0.messageId=n,n},a0=[...A||[],...V?.prepareStep?[new m89({prepareStep:V.prepareStep})]:[]];if(a0&&a0.length>0){let $4=new V5({inputProcessors:a0,outputProcessors:[],logger:E||new z3({level:"error"}),agentName:M||"unknown",processorStates:_});try{let i4=S?.getTracingContext()??h,C9=y?{custom:async(u$,t6)=>y(u$,{...t6,messageId:N0.messageId})}:void 0,R6=await $4.runProcessInputStep({messageList:K,stepNumber:g.output?.steps?.length||0,...g4(i4),requestContext:P,model:w4,steps:g.output?.steps||[],messageId:N0.messageId,rotateResponseMessageId:h0,tools:J,toolChoice:Q,activeTools:W,providerOptions:z,modelSettings:H,structuredOutput:N,retryCount:g.processorRetryCount||0,writer:C9,abortSignal:V?.abortSignal});Object.assign(N0,R6),Q0=N0.model.provider&&N0.model.modelId?`${N0.model.provider}/${N0.model.modelId}`:void 0;let R4=R6.model&&R6.model!==w4,y8=R6.modelSettings&&R6.modelSettings!==H;if(S&&(R4||y8))S.updateGeneration({...R4?{name:`llm: '${N0.model.modelId}'`}:{},attributes:{...R4?{model:N0.model.modelId,provider:N0.model.provider}:{},...y8?{parameters:N0.modelSettings}:{}}});let A5=R6.tools&&R6.tools!==J,X$=R6.activeTools&&R6.activeTools!==W;if(A5||X$){let u$=h?.currentSpan?.findParent("agent_run");if(u$){let t6=X$?R6.activeTools:N0.tools?Object.keys(N0.tools):void 0;if(t6!==void 0)u$.update({attributes:{availableTools:t6}})}}if(R6.tools&&N0.tools){let u$={};for(let[t6,bX]of Object.entries(N0.tools))if(Kf(bX))u$[t6]=VY(bX,{name:t6,runId:G,threadId:Y?.threadId,resourceId:Y?.resourceId,logger:E,agentName:M,requestContext:P||new p1,outputWriter:y,workspace:N0.workspace,requireApproval:bX.requireApproval,backgroundConfig:bX.background},void 0,I);else u$[t6]=bX;N0.tools=u$}}catch(i4){if(i4 instanceof u6)return E?.warn("Streaming input processor tripwire triggered",{reason:i4.message,processorId:i4.processorId,retry:i4.options?.retry}),sf0({error:i4,controller:L,runId:G,model:w4,messageList:K,messageId:N0.messageId,stepTools:J,_internal:Y});throw E?.error("Error in processInputStep processors:",i4),i4}}if(Y)Y.stepActiveTools=N0.activeTools;if(k)G99(k,{requireToolApproval:j,tools:N0.tools,activeTools:N0.activeTools,configuredConcurrency:u});let c0=new uK4({_internal:Y,model:N0.model}),L1,E1=N0.model?.supportedUrls;if(E1)if(typeof E1.then==="function")L1=await E1;else L1=E1;let l4={downloadRetries:R,downloadConcurrency:q,supportedUrls:L1},Q1=await K.get.all.aiV5.llmPrompt(l4);if(I){let C9=[...K.get.all.db()].reverse().filter((R6)=>R6.role==="assistant").find((R6)=>{if(R6.content.metadata?.suspendedTools||R6.content.metadata?.pendingToolApprovals)return!0;let y8=R6.content.parts?.filter((A5)=>(A5.type==="data-tool-call-suspended"||A5.type==="data-tool-call-approval")&&!A5.data.resumed);if(y8&&y8.length>0)return!0;return!1});if(C9){let R6=C9.content.metadata,R4=R6?.suspendedTools||R6?.pendingToolApprovals;if(!R4)R4=C9.content.parts?.filter((A5)=>A5.type==="data-tool-call-suspended"||A5.type==="data-tool-call-approval")?.reduce((A5,X$)=>{if((X$.type==="data-tool-call-suspended"||X$.type==="data-tool-call-approval")&&!X$.data.resumed)A5[X$.data.toolName]=X$.data;return A5},{});let y8=Object.values(R4);if(y8.length>0)Q1=Q1.map((A5,X$)=>{if(A5.role==="system"&&X$===0)A5.content=A5.content+`

Analyse the suspended tools: ${JSON.stringify(y8)}, using the messages available to you and the resumeSchema of each suspended tool, find the tool whose resumeData you can construct properly.
                      resumeData can not be an empty object nor null/undefined.
                      When you find that and call that tool, add the resumeData to the tool call arguments/input.
                      Also, add the runId of the suspended tool as suspendedToolRunId to the tool call arguments/input.
                      If the suspendedTool.type is 'approval', resumeData will be an object that contains 'approved' which can either be true or false depending on the user's message. If you can't construct resumeData from the message for approval type, set approved to true and add resumeData: { approved: true } to the tool call arguments/input.

                      IMPORTANT: If you're able to construct resumeData and get suspendedToolRunId, get the previous arguments/input of the tool call from args in the suspended tool, and spread it in the new arguments/input created, do not add duplicate data. 
                      `;return A5})}}if(Y?.backgroundTaskManager&&N0.tools){let $4=A04(N0.tools,Y?.agentBackgroundConfig);Q1=Q1.map((i4,C9)=>{if(i4.role==="system"&&C9===0)i4.content=i4.content+`

${$4}`;return i4})}let C1=new V5({inputProcessors:J99({inputProcessors:A,llmRequestInputProcessors:B}),outputProcessors:[],logger:E||new z3({level:"error"}),agentName:M||"unknown",processorStates:_}),f4=y?{custom:async($4,i4)=>y($4,{...i4,messageId:N0.messageId})}:void 0,A6;try{let $4=await C1.runProcessLLMRequest({prompt:Q1,model:N0.model,stepNumber:g.output?.steps?.length||0,steps:g.output?.steps||[],retryCount:g.processorRetryCount||0,requestContext:P,tracingContext:S?.getTracingContext()??h,writer:f4,abortSignal:V?.abortSignal});Q1=$4.prompt,A6=$4.response}catch($4){if($4 instanceof u6)return E?.warn("Streaming request processor tripwire triggered",{reason:$4.message,processorId:$4.processorId,retry:$4.options?.retry}),sf0({error:$4,controller:L,runId:G,model:N0.model,messageList:K,messageId:N0.messageId,stepTools:N0.tools,_internal:Y});throw E?.error("Error in processLLMRequest processors:",$4),$4}if(A6){s=A6.warnings??[],K0=A6.request??{},X0=A6.rawResponse,S?.updateStep?.({request:K0||{},inputMessages:Q1,warnings:s||[],messageId:N0.messageId});let $4=A6.chunks;t=new e2({start(i4){for(let C9 of $4)i4.enqueue({...C9,runId:G,from:"AGENT"});i4.close()}})}else if(ZG(N0.model))S?.setInferenceContext?.({parameters:{...N0.modelSettings,...I1.modelSettings},providerOptions:i24(N0.providerOptions,I1.providerOptions),availableTools:vS0(N0.tools,N0.activeTools),toolChoice:N0.toolChoice,responseFormat:N0.structuredOutput?"json_schema":void 0}),S?.startInference?.(),t=jO({span:S?.getTracingContext()?.currentSpan,fn:()=>e89({runId:G,model:N0.model,providerOptions:i24(N0.providerOptions,I1.providerOptions),inputMessages:Q1,tools:N0.tools,toolChoice:N0.toolChoice,activeTools:N0.activeTools,options:V,modelSettings:{...N0.modelSettings,...I1.modelSettings,maxRetries:I1.maxRetries},includeRawChunks:Z,structuredOutput:N0.structuredOutput,headers:(()=>{let $4={};if(Y?.threadId)$4["x-thread-id"]=Y.threadId;if(Y?.resourceId)$4["x-resource-id"]=Y.resourceId;let i4={...$4,...z6,...N0.modelSettings?.headers};return Object.keys(i4).length>0?i4:void 0})(),methodType:w,generateId:Y?.generateId,onResult:({warnings:$4,request:i4,rawResponse:C9})=>{s=$4,K0=i4||{},X0=C9,S?.updateStep?.({request:K0||{},inputMessages:Q1,warnings:s||[],messageId:N0.messageId}),F9(L,{runId:G,from:"AGENT",type:"step-start",payload:{request:K0||{},warnings:s||[],messageId:N0.messageId}})},shouldThrowError:!M4})});else throw Error(`Unsupported model version: ${N0.model.specificationVersion}. Supported versions: ${SD.join(", ")}`);let J9=new uT({model:{modelId:N0.model.modelId,provider:N0.model.provider,version:N0.model.specificationVersion},stream:t,messageList:K,messageId:N0.messageId,options:{runId:G,toolCallStreaming:F,includeRawChunks:Z,structuredOutput:N0.structuredOutput,outputProcessors:A6?[]:D,isLLMExecutionStep:!0,tracingContext:h,processorStates:_,requestContext:P}}),o7;if(N0.model instanceof ME){let $4=N0.model;o7=()=>bb0(t)??$4._getStreamTransport()}try{let{collectedChunks:$4}=await K99({outputStream:J9,includeRawChunks:Z,tools:N0.tools,messageId:N0.messageId,messageList:K,runState:c0,options:V,controller:L,responseFromModel:{warnings:s,request:K0,rawResponse:X0},logger:E,transportRef:Y?.transportRef,transportResolver:o7,toolPayloadTransform:Y?.toolPayloadTransform}),i4=Y99({chunks:$4,messageId:N0.messageId,responseModelMetadata:W99(c0,N0.model),tools:N0.tools,createdAt:N0.createdAt});for(let R6 of i4)K.add(R6,"response");let C9=J9._getImmediateObject();if(C9!==void 0){let R4=[...K.get.response.db()].reverse().find((y8)=>y8.role==="assistant");if(R4){if(!R4.content.metadata)R4.content.metadata={};R4.content.metadata.structuredOutput=C9}}if(!A6)try{await C1.runProcessLLMResponse({chunks:$4,model:N0.model,stepNumber:g.output?.steps?.length||0,steps:g.output?.steps||[],warnings:s,request:K0,rawResponse:X0,fromCache:!1,retryCount:g.processorRetryCount||0,requestContext:P,tracingContext:S?.getTracingContext()??h,writer:f4,abortSignal:V?.abortSignal})}catch(R6){if(R6 instanceof u6)return E?.warn("Streaming response processor tripwire triggered",{reason:R6.message,processorId:R6.processorId,retry:R6.options?.retry}),sf0({error:R6,controller:L,runId:G,model:N0.model,messageList:K,messageId:N0.messageId,stepTools:N0.tools,_internal:Y});throw E?.error("Error in processLLMResponse processors:",R6),R6}}catch($4){let i4=w4?.provider,C9=w4?.modelId;if(tk0($4)&&V?.abortSignal?.aborted)return E?.debug?.("LLM execution aborted",{runId:G}),await V?.onAbort?.({steps:g?.output?.steps??[]}),F9(L,{type:"abort",runId:G,from:"AGENT",payload:{}}),{callBail:!0,outputStream:J9,runState:c0,stepTools:N0.tools};if(M7.isInstance($4)){let R4=i4?` from ${i4}`:"",y8=C9?` (model: ${C9})`:"";E?.error(`Upstream LLM API error${R4}${y8}`,{error:$4,runId:G,...i4&&{provider:i4},...C9&&{modelId:C9}})}else E?.error("Error in LLM execution",{error:$4,runId:G,...i4&&{provider:i4},...C9&&{modelId:C9}});if(M4)c0.setState({hasErrored:!0,apiError:$4,deferredErrorChunk:{type:"error",runId:G,from:"AGENT",payload:{error:$4}},stepResult:{isContinued:!1,reason:"error"}});else{let R4=new V5({inputProcessors:A||[],outputProcessors:D||[],errorProcessors:O||[],logger:E||new z3({level:"error"}),agentName:M||"unknown",processorStates:_}),y8=g.processorRetryCount||0,A5=e!==void 0&&y8<e,X$=y?{custom:async(t6,bX)=>y(t6,{...bX,messageId:n})}:void 0;if((await R4.runProcessAPIError({error:$4,messages:K.get.all.db(),messageList:K,stepNumber:g.output?.steps?.length||0,steps:g.output?.steps||[],retryCount:y8,requestContext:P,writer:X$,abortSignal:V?.abortSignal,messageId:n,rotateResponseMessageId:()=>{return n=Y?.generateId?.()??KO(),J9.messageId=n,n}})).retry&&A5)return c0.setState({hasErrored:!1,apiError:void 0}),{outputStream:J9,callBail:!1,runState:c0,stepTools:N0.tools,stepWorkspace:N0.workspace,processAPIErrorRetry:{retry:!0}};throw $4}}if(V?.abortSignal?.aborted)return await V?.onAbort?.({steps:g?.output?.steps??[]}),F9(L,{type:"abort",runId:G,from:"AGENT",payload:{}}),{callBail:!0,outputStream:J9,runState:c0,stepTools:N0.tools};return{outputStream:J9,callBail:!1,runState:c0,stepTools:N0.tools,stepWorkspace:N0.workspace}});if(Q0)K.enrichLastStepStart(Q0);if(Y)Y.stepTools=Z0,Y.stepWorkspace=F0??Y.stepWorkspace;if($0){let I1=m._getImmediateUsage(),M4=Y0.state.responseMetadata,w4=m._getImmediateText();return p({messageId:m.messageId,stepResult:{reason:"tripwire",warnings:s,isContinued:!1},metadata:{providerMetadata:Y0.state.providerOptions,...M4,modelMetadata:Y0.state.modelMetadata,headers:X0?.headers,request:K0},output:{text:w4,toolCalls:[],usage:I1??g.output.usage,steps:[]},messages:{all:K.get.all.aiV5.model(),user:K.get.input.aiV5.model(),nonUser:K.get.response.aiV5.model()}})}let O0=D0;if(!O0&&Y0.state.hasErrored&&Y0.state.apiError){let I1=g.processorRetryCount||0,M4=e!==void 0&&I1<e,w4=new V5({inputProcessors:A||[],outputProcessors:D||[],errorProcessors:O||[],logger:E||new z3({level:"error"}),agentName:M||"unknown",processorStates:_}),z6=y?{custom:async(b4,N0)=>y(b4,{...N0,messageId:n})}:void 0,K4=await w4.runProcessAPIError({error:Y0.state.apiError,messages:K.get.all.db(),messageList:K,stepNumber:g.output?.steps?.length||0,steps:g.output?.steps||[],retryCount:I1,requestContext:P,writer:z6,abortSignal:V?.abortSignal,messageId:n,rotateResponseMessageId:()=>{return n=Y?.generateId?.()??KO(),m.messageId=n,n}});if(K4.retry&&M4)O0=K4,Y0.setState({hasErrored:!1,apiError:void 0,deferredErrorChunk:void 0})}if(O0?.retry){let I1=g.processorRetryCount||0,M4=g.output?.steps||[],w4=I1+1,z6={all:K.get.all.aiV5.model(),user:K.get.input.aiV5.model(),nonUser:[]};return{messageId:m.messageId,stepResult:{reason:"retry",warnings:s,isContinued:!0},metadata:{providerMetadata:Y0.state.providerOptions,...Y0.state.responseMetadata,modelMetadata:Y0.state.modelMetadata,headers:X0?.headers,request:K0},output:{text:"",toolCalls:[],usage:m._getImmediateUsage()??g.output?.usage,steps:M4},messages:z6,processorRetryCount:w4,...a>0?{fallbackModelIndex:a}:{}}}if(Y0.state.deferredErrorChunk&&Y0.state.hasErrored){let I1=Y0.state.deferredErrorChunk,M4=XG(I1.payload.error,{fallbackMessage:"Unknown error in agent stream"});F9(L,{...I1,payload:{...I1.payload,error:M4}}),await V?.onError?.({error:M4}),Y0.setState({deferredErrorChunk:void 0})}if(m.tripwire)Y0.setState({stepResult:{isContinued:!1,reason:"tripwire"}});let R0=(m._getImmediateToolCalls()??[]).map((I1)=>{let M4=Z0?.[I1.payload.toolName]||hE(Z0,I1.payload.toolName);return{...I1.payload,providerExecuted:B$0(I1.payload.providerExecuted,M4)}}),P0=null;if(D&&D.length>0){let I1=new V5({inputProcessors:[],outputProcessors:D,logger:E||new z3({level:"error"}),agentName:M||"unknown",processorStates:_});try{let M4=g.output?.steps?.length||0,w4=m._getImmediateText(),z6=m._getImmediateFinishReason(),K4=R0.map((a0)=>({toolName:a0.toolName,toolCallId:a0.toolCallId,args:a0.args})),b4=g.processorRetryCount||0,N0=S?.getTracingContext()??h,h0=y?{custom:async(a0,c0)=>y(a0,{...c0,messageId:m.messageId})}:void 0;await I1.runProcessOutputStep({steps:g.output?.steps??[],messages:K.get.all.db(),messageList:K,stepNumber:M4,finishReason:z6,toolCalls:K4.length>0?K4:void 0,text:w4,usage:m._getImmediateUsage(),...g4(N0),requestContext:P,retryCount:b4,writer:h0})}catch(M4){if(M4 instanceof u6)P0=M4,E?.warn("Output step processor tripwire triggered",{reason:M4.message,processorId:M4.processorId,retry:M4.options?.retry});else throw E?.error("Error in processOutputStep processors:",M4),M4}}let f0=Y0?.state?.stepResult?.reason??m._getImmediateFinishReason(),p0=Y0.state.hasErrored,U4=m._getImmediateUsage(),P1=Y0.state.responseMetadata,d1=m._getImmediateText(),C0=m._getImmediateObject(),n0=m.tripwire||P0!==null,J0=g.processorRetryCount||0,B0=P0?.options?.retry===!0,Y1=v!==void 0&&J0<v,c1=B0&&Y1;if(B0&&!Y1)if(v===void 0)E?.warn?.("Processor requested retry but maxProcessorRetries is not set. Treating as abort.");else E?.warn?.(`Processor requested retry but maxProcessorRetries (${v}) exceeded. Current count: ${J0}. Treating as abort.`);let C4=g.output?.steps||[],c4=g.messages?.nonUser?.length||0,T6=K.get.response.aiV5.modelContent(C4.length).slice(c4),p6=P0?{reason:P0.message,retry:P0.options?.retry,metadata:P0.options?.metadata,processorId:P0.processorId}:void 0;if(C4.push(new $99({warnings:m._getImmediateWarnings(),providerMetadata:Y0.state.providerOptions,finishReason:Y0.state.stepResult?.reason,content:T6,response:{...P1,...X0,messages:K.get.response.aiV5.model()},request:K0,usage:m._getImmediateUsage(),tripwire:p6})),c1)K.removeByIds([m.messageId]);let n6=c1&&P0?`[Processor Feedback] Your previous response was not accepted: ${P0.message}. Please try again with the feedback in mind.`:void 0,Z1={all:K.get.all.aiV5.model(),user:K.get.input.aiV5.model(),nonUser:K.get.response.aiV5.model()},J4=c1?"retry":n0?"tripwire":p0?"error":f0,I6=c1?a:0,t4=R0&&R0.some((I1)=>!I1.providerExecuted)&&f0!=="length",a1=c1||!n0&&(t4||!["stop","error","length"].includes(f0)),F1=c1?J0+1:0;return{messageId:m.messageId,stepResult:{reason:J4,warnings:s,isContinued:a1,...c1&&P0?{retryReason:P0.message,retryMetadata:P0.options?.metadata,retryProcessorId:P0.processorId}:{}},metadata:{providerMetadata:Y0.state.providerOptions,...P1,...X0,modelMetadata:Y0.state.modelMetadata,headers:X0?.headers,request:K0},output:{text:d1,toolCalls:c1?[]:R0,usage:U4??g.output?.usage,steps:C4,...C0?{object:C0}:{}},messages:Z1,processorRetryCount:F1,processorRetryFeedback:n6,...I6>0?{fallbackModelIndex:I6}:{}}}})}function H99({models:$,_internal:Y,...X},G){let J=X.outputProcessors?.length&&X.logger?new V5({inputProcessors:[],outputProcessors:X.outputProcessors,logger:X.logger,agentName:"LLMMappingStep",processorStates:X.processorStates}):void 0,Q=g4(X.modelSpanTracker?.getTracingContext()),W=X.outputWriter?{custom:async(Z)=>X.outputWriter(Z)}:void 0;async function K(Z){if(J&&X.processorStates){let{part:H,blocked:z,reason:V,tripwireOptions:F,processorId:L}=await J.processPart(Z,X.processorStates,Q,X.requestContext,X.messageList,0,W);if(z)return X.controller.enqueue({type:"tripwire",payload:{reason:V||"Output processor blocked content",retry:F?.retry,metadata:F?.metadata,processorId:L}}),null;if(H)return X.controller.enqueue(H),H;return null}else return X.controller.enqueue(Z),Z}return o9({id:"llmExecutionMappingStep",inputSchema:U.array(fK4),outputSchema:hW,execute:async({inputData:Z,getStepResult:H,bail:z})=>{let V=H(G);function F(D){if(D==null||typeof D!=="object")return D;let A=D;if(A.type!=="content"||!Array.isArray(A.value))return D;return{...A,value:A.value.map((B)=>{if(B==null||typeof B!=="object")return B;let O=B;if(O.type!=="media")return O;if(typeof O.mediaType==="string"&&O.mediaType.startsWith("image/"))return{type:"image-data",data:O.data,mediaType:O.mediaType};return{type:"file-data",data:O.data,mediaType:O.mediaType}})}}async function L(D){let A=Y?.stepTools?.[D.toolName]??X.tools?.[D.toolName],B;if(A?.toModelOutput&&D.result!=null){let q=Q?.tracingContext?.currentSpan?.createChildSpan({type:"mapping",name:`tool output mapping: '${D.toolName}'`,entityType:J6.TOOL,entityId:D.toolName,entityName:D.toolName,input:D.result,attributes:{mappingType:"toModelOutput",toolCallId:D.toolCallId}});try{B=await A.toModelOutput(D.result),B=F(B),q?.end({output:B})}catch(_){throw q?.error({error:_,endSpan:!0}),_}}let O=D.providerMetadata?.mastra,E={...D.providerMetadata,...B!=null?{mastra:{...O,modelOutput:B}}:{}};return Object.keys(E).length>0?E:void 0}async function N(D,A,B){let O=Y?.stepTools,E=O?.[A.toolName]||hE(O,A.toolName)||Object.values(O||{}).find((_)=>("id"in _)&&_.id===A.toolName)||X.tools?.[A.toolName]||hE(X.tools,A.toolName)||Object.values(X.tools||{}).find((_)=>("id"in _)&&_.id===A.toolName),M={policy:Y?.toolPayloadTransform,toolTransform:E?.transform},R=await NQ({phase:"input-available",toolName:A.toolName,toolCallId:A.toolCallId,input:A.args,providerMetadata:A.providerMetadata},M,X.logger),q=await NQ({phase:B,toolName:A.toolName,toolCallId:A.toolCallId,input:A.args,output:A.result,error:A.error,providerMetadata:A.providerMetadata},M,X.logger);return RZ(RZ(D,R),q)}if(Z?.some((D)=>D?.result===void 0&&!D.providerExecuted)){let D=Z.filter((B)=>B?.error&&!B.providerExecuted);if(D?.length)for(let B of D){let O=await N({type:"tool-error",runId:X.runId,from:"AGENT",payload:{error:B.error,args:B.args,toolCallId:B.toolCallId,toolName:B.toolName,providerMetadata:B.providerMetadata}},B,"error"),E=await K(O);if(E)await X.options?.onChunk?.(E);X.messageList.updateToolInvocation({type:"tool-invocation",toolInvocation:{state:"result",toolCallId:B.toolCallId,toolName:P7(B.toolName),args:B.args,result:B.error?.message??B.error},...n2(B.providerMetadata,O.metadata)?{providerMetadata:n2(B.providerMetadata,O.metadata)}:{}})}let A=Z.some((B)=>B.result===void 0&&!B.error&&!B.providerExecuted);if(D?.length>0&&!A){let B=Z.filter((O)=>O.result!==void 0);if(B.length)for(let O of B){let E=!O.providerExecuted?await L(O):void 0,M=E??O.providerMetadata,R=await N({type:"tool-result",runId:X.runId,from:"AGENT",payload:{args:O.args,toolCallId:O.toolCallId,toolName:O.toolName,result:O.result,providerMetadata:M,providerExecuted:O.providerExecuted}},O,"output-available"),q=await K(R);if(q)await X.options?.onChunk?.(q);if(!O.providerExecuted)X.messageList.updateToolInvocation({type:"tool-invocation",toolInvocation:{state:"result",toolCallId:O.toolCallId,toolName:P7(O.toolName),args:O.args,result:O.result},...n2(E,R.metadata)?{providerMetadata:n2(E,R.metadata)}:{}})}return V.stepResult.isContinued=!0,V.stepResult.reason="tool-calls",{...V,messages:{all:X.messageList.get.all.aiV5.model(),user:X.messageList.get.input.aiV5.model(),nonUser:X.messageList.get.response.aiV5.model()}}}if(V.stepResult.reason!=="retry")V.stepResult.isContinued=!1;return z({...V,messages:{all:X.messageList.get.all.aiV5.model(),user:X.messageList.get.input.aiV5.model(),nonUser:X.messageList.get.response.aiV5.model()}})}if(Z?.length){for(let D of Z){if(D.result===void 0)continue;let A=!D.providerExecuted?await L(D):void 0,B=A??D.providerMetadata,O=await N({type:"tool-result",runId:X.runId,from:"AGENT",payload:{args:D.args,toolCallId:D.toolCallId,toolName:D.toolName,result:D.result,providerMetadata:B,providerExecuted:D.providerExecuted}},D,"output-available"),E=await K(O);if(E)await X.options?.onChunk?.(E);if(!D.providerExecuted)X.messageList.updateToolInvocation({type:"tool-invocation",toolInvocation:{state:"result",toolCallId:D.toolCallId,toolName:P7(D.toolName),args:D.args,result:D.result},...n2(A,O.metadata)?{providerMetadata:n2(A,O.metadata)}:{}})}if(X.requestContext?.get("__mastra_delegationBailed")&&Y)Y._delegationBailed=!0,X.requestContext.set("__mastra_delegationBailed",!1);return{...V,messages:{all:X.messageList.get.all.aiV5.model(),user:X.messageList.get.input.aiV5.model(),nonUser:X.messageList.get.response.aiV5.model()}}}return V}})}function z99({_internal:$,controller:Y,runId:X,messageList:G,mastra:J}){return o9({id:"signalDrainStep",inputSchema:hW,outputSchema:hW,execute:async({inputData:Q})=>{let W=Q,K=$?.drainPendingSignals?.(X)??[];if(K.length===0)return W;G.markResponseMessageBoundary(W.stepResult?.messageId??W.messageId);for(let Z of K){let H=G.addSignal(Z);Y.enqueue(H.toDataPart())}return{...W,messageId:$?.generateId?.()??J?.generateId?.()??W.messageId,stepResult:{...W.stepResult,reason:"other",isContinued:!0},messages:{all:G.get.all.aiV5.model(),user:G.get.input.aiV5.model(),nonUser:G.get.response.aiV5.model()}}}})}function V99({tools:$,messageList:Y,options:X,outputWriter:G,controller:J,runId:Q,streamState:W,modelSpanTracker:K,_internal:Z,logger:H,agentId:z,mastra:V}){return o9({id:"toolCallStep",inputSchema:hK4,outputSchema:fK4,execute:async({inputData:F,suspend:L,resumeData:N,requestContext:D})=>{let A=Z?.stepTools||$,B=Z?.stepActiveTools,O=A?.[F.toolName]||hE(A,F.toolName)||Object.values(A||{})?.find((j)=>("id"in j)&&j.id===F.toolName),E={policy:Z?.toolPayloadTransform,toolTransform:O?.transform},M=async(j,C,k)=>{let S="payload"in j?j.payload:{},I=S.args??F.args,v=typeof S.toolName==="string"?S.toolName:F.toolName,x=typeof S.toolCallId==="string"?S.toolCallId:F.toolCallId,y=S.providerMetadata??F.providerMetadata,d=await NQ({phase:"input-available",toolName:v,toolCallId:x,input:I,providerMetadata:y},E,H),u=C==="input-available"?void 0:await NQ({phase:C,toolName:v,toolCallId:x,input:I,output:k?.output,error:k?.error,suspendPayload:k?.suspendPayload,providerMetadata:y},E,H);return RZ(RZ(j,d),u)},R=({toolCallId:j,toolName:C,args:k,suspendPayload:S,resumeSchema:I,type:v,suspendedToolRunId:x,metadata:y})=>{let d=v==="suspension"?"suspendedTools":"pendingToolApprovals",b=[...Y.get.response.db()].reverse().find((g)=>g.role==="assistant");if(b){if(!b.content)return;let p=typeof b.content.metadata==="object"&&b.content.metadata!==null?b.content.metadata:{};p[d]=p[d]||{};let h=uY(y,"transcript","input-available")?.transformed,n=uY(y,"transcript","approval")?.transformed,t=uY(y,"transcript","suspend")?.transformed,s=v==="approval"?n??h??k:h??t??k,K0=v==="suspension"?t??S:void 0;p[d][C]={toolCallId:j,toolName:C,args:s,type:v,runId:x??Q,...v==="suspension"?{suspendPayload:K0}:{},resumeSchema:I,...y?{metadata:y}:{}},b.content.metadata=p}},q=async(j,C)=>{let{saveQueueManager:k,memoryConfig:S,threadId:I}=Z||{};if(!k||!I)return;let v=(u)=>{let b=u.content;if(!b)return;return typeof b.metadata==="object"&&b.metadata!==null?b.metadata:void 0},x=C==="suspension"?"suspendedTools":"pendingToolApprovals",d=[...Y.get.all.db()].reverse().find((u)=>{if(!!v(u)?.[x]?.[j])return!0;let h=u.content.parts?.filter((n)=>n.type==="data-tool-call-suspended"||n.type==="data-tool-call-approval");if(h&&h.length>0){if(h.find((t)=>t.data.toolName===j))return!0}return!1});if(d){let u=v(d),b=u?.[x];if(!b)b=d.content.parts?.filter((g)=>g.type==="data-tool-call-suspended"||g.type==="data-tool-call-approval")?.reduce((g,p)=>{if(p.type==="data-tool-call-suspended"||p.type==="data-tool-call-approval")g[p.data.toolName]=p.data;return g},{});if(b&&typeof b==="object"){if(u)delete b[j];else d.content.parts=d.content.parts?.map((g)=>{if(g.type==="data-tool-call-suspended"||g.type==="data-tool-call-approval"){if(g.data.toolName===j)return{...g,data:{...g.data,resumed:!0}}}return g});if(u&&Object.keys(b).length===0)delete u[x];try{await k.flushMessages(Y,I,S)}catch(g){H?.error("Error removing tool suspension metadata:",g)}}}},_=async()=>{let{saveQueueManager:j,memoryConfig:C,threadId:k,resourceId:S,memory:I}=Z||{};if(!j||!k)return;try{if(I&&!Z.threadExists&&S){if(!await I.getThreadById?.({threadId:k}))await I.createThread?.({threadId:k,resourceId:S,memoryConfig:C});Z.threadExists=!0}await j.flushMessages(Y,k,C)}catch(v){H?.error("Error flushing messages before suspension:",v)}};if(F.providerExecuted)return F;let P=A?.[F.toolName]?F.toolName:Object.entries(A||{}).find(([j,C])=>C===O)?.[0],w=B&&P&&!B.includes(P);if(!O||w){let j=B??Object.keys(A||{}),C=j.length>0?` Available tools: ${j.join(", ")}`:"";return{error:new r24(`Tool "${F.toolName}" not found.${C}. Call tools by their exact name only \u2014 never add prefixes, namespaces, or colons.`),...F}}if(O&&"onInputAvailable"in O)try{await O?.onInputAvailable?.({toolCallId:F.toolCallId,input:F.args,messages:Y.get.input.aiV5.model(),abortSignal:X?.abortSignal})}catch(j){H?.error("Error calling onInputAvailable",j)}if(!O.execute)return F;try{let j=D.get("__mastra_requireToolApproval"),C=void 0,k=F.args;if(typeof F.args==="object"&&F.args!==null){let{resumeData:X0,...a}=F.args;k=a,C=X0}let S=C??N,I=!!C,v=j||O.requireApproval;if(O.needsApprovalFn)try{v=await O.needsApprovalFn(k,{requestContext:D?Object.fromEntries(D.entries()):{},workspace:Z?.stepWorkspace})}catch(X0){H?.error(`Error evaluating needsApprovalFn for tool ${F.toolName}:`,X0),v=!0}let x=Q4(U.object({approved:U.boolean().describe("Controls if the tool call is approved or not, should be true when approved and false when declined")}));if(v){if(!S){let X0=await M({type:"tool-call-approval",runId:Q,from:"AGENT",payload:{toolCallId:F.toolCallId,toolName:F.toolName,args:F.args,resumeSchema:JSON.stringify($6(x))}},"approval");return F9(J,X0),R({toolCallId:F.toolCallId,toolName:F.toolName,args:F.args,type:"approval",resumeSchema:JSON.stringify($6(x)),metadata:X0.metadata}),await _(),L({requireToolApproval:{toolCallId:F.toolCallId,toolName:F.toolName,args:F.args},__streamState:W.serialize()},{resumeLabel:F.toolCallId})}else if(await q(F.toolName,"approval"),!S.approved)return{result:"Tool call was not approved by the user",...F}}let y=F.toolName?.startsWith("agent-"),d=F.toolName?.startsWith("workflow-"),u=!y&&v&&Object.keys(S).length===1&&"approved"in S?void 0:S,b={abortSignal:X?.abortSignal,toolCallId:F.toolCallId,messages:y?Y.get.all.aiV5.model():Y.get.input.aiV5.model(),outputWriter:G,tracingContext:K?.getTracingContext(),workspace:Z?.stepWorkspace,requestContext:D,flushMessages:Z?.saveQueueManager&&Z?.threadId?()=>Z.saveQueueManager.flushMessages(Y,Z.threadId,Z.memoryConfig):void 0,suspend:async(X0,a)=>{if(a?.requireToolApproval){let Q0=await M({type:"tool-call-approval",runId:Q,from:"AGENT",payload:{toolCallId:F.toolCallId,toolName:F.toolName,args:F.args,resumeSchema:JSON.stringify($6(Q4(U.object({approved:U.boolean().describe("Controls if the tool call is approved or not, should be true when approved and false when declined")}))))}},"approval");return F9(J,Q0),R({toolCallId:F.toolCallId,toolName:F.toolName,args:F.args,type:"approval",suspendedToolRunId:a.runId,resumeSchema:JSON.stringify($6(Q4(U.object({approved:U.boolean().describe("Controls if the tool call is approved or not, should be true when approved and false when declined")})))),metadata:Q0.metadata}),await _(),L({requireToolApproval:{toolCallId:F.toolCallId,toolName:F.toolName,args:F.args},__streamState:W.serialize()},{resumeLabel:F.toolCallId})}else{let Q0=await M({type:"tool-call-suspended",runId:Q,from:"AGENT",payload:{toolCallId:F.toolCallId,toolName:F.toolName,suspendPayload:X0,args:F.args,resumeSchema:a?.resumeSchema}},"suspend",{suspendPayload:X0});return F9(J,Q0),R({toolCallId:F.toolCallId,toolName:F.toolName,args:k,suspendPayload:X0,suspendedToolRunId:a?.runId,type:"suspension",resumeSchema:a?.resumeSchema,metadata:Q0.metadata}),await _(),await L({toolCallSuspended:X0,__streamState:W.serialize(),toolName:F.toolName,resumeLabel:a?.resumeLabel},{resumeLabel:F.toolCallId})}},resumeData:u};if(u&&(y||d)){let X0="",a=!I||!k.suspendedToolRunId,e=[...Y.get.all.db()].reverse().filter((m)=>m.role==="assistant");for(let m of e){let $0=m.content.metadata?.suspendedTools||m.content.metadata?.pendingToolApprovals;if($0&&$0[F.toolName]){X0=$0[F.toolName].runId;break}if(a){let Y0=m.content.parts?.filter((Z0)=>(Z0.type==="data-tool-call-suspended"||Z0.type==="data-tool-call-approval")&&!Z0.data.resumed);if(Y0&&Y0.length>0){let Z0=Y0.find((F0)=>F0.data.toolName===F.toolName);if(Z0){X0=Z0.data.runId;break}}}}if(X0)k.suspendedToolRunId=X0}if(!v&&I)await q(F.toolName,"suspension");if(k===null||k===void 0)return{error:Error(`Tool "${F.toolName}" received invalid arguments \u2014 the provided JSON could not be parsed. Please provide valid JSON arguments.`),...F};if(y){if(typeof k==="object"&&k!==null&&"prompt"in k)k.threadId=Z?.threadId,k.resourceId=Z?.resourceId}let p=V?.getServer?.()?.fga;if(p){let X0=D?.get("user"),{checkFGA:a,FGADeniedError:Q0}=await Promise.resolve().then(() => (zT(),HT));if(!X0)throw new Q0({id:"unknown"},{type:"tool",id:F.toolName},qz.TOOLS_EXECUTE);await a({fgaProvider:p,user:X0,resource:{type:"tool",id:F.toolName},permission:qz.TOOLS_EXECUTE})}let h=typeof k==="object"&&k!==null&&"_background"in k?k._background:void 0;if(h)delete k._background;let n=Z?.backgroundTaskManager,t=Z?.agentBackgroundConfig;if(n&&!t?.disabled&&typeof k==="object"&&k!==null){let X0=O.backgroundConfig,a=t,Q0=Z?.backgroundTaskManagerConfig,e=L04({llmBgOverrides:h,toolName:F.toolName,toolConfig:X0,agentConfig:a,managerConfig:Q0});if(e.runInBackground){let m=Z?.stepTools||$,$0=m?.[F.toolName]||Object.values(m||{})?.find((P0)=>("id"in P0)&&P0.id===F.toolName);if(!$0?.execute)throw new r24(F.toolName);let Y0=Promise.resolve(),Z0=new Set,F0=F04(n,{toolName:F.toolName,toolCallId:F.toolCallId,args:k,agentId:z,threadId:Z?.threadId,resourceId:Z?.resourceId,timeoutMs:e.timeoutMs,maxRetries:e.maxRetries,runId:Q,context:{executor:{execute:(P0,f0)=>{return $0.execute(P0,{...b,...f0?.resumeData!==void 0?{resumeData:f0.resumeData}:{},suspend:async(p0,U4)=>{return await b.suspend?.(p0,U4),f0?.suspend?.(p0,U4)},outputWriter:async(p0)=>{return await f0?.onProgress?.(p0),b.outputWriter?.(p0)},abortSignal:f0?.abortSignal})}},onChunk:(P0)=>{Y0=Y0.then(async()=>{let f0=P0.payload.runId,p0=`${f0}:${P0.payload.toolCallId}`;if((f0!==Q||f0===Q&&N)&&!Z0.has(p0))F9(J,await M({type:"tool-call",runId:f0,from:"AGENT",payload:{toolCallId:P0.payload.toolCallId,toolName:P0.payload.toolName,args:F.args,providerMetadata:F.providerMetadata,providerExecuted:F.providerExecuted}},"input-available")),Z0.add(p0);if(P0.type==="background-task-completed")F9(J,await M({type:"tool-result",runId:f0,from:"AGENT",payload:{toolCallId:P0.payload.toolCallId,toolName:P0.payload.toolName,args:F.args,result:P0.payload.result,providerMetadata:F.providerMetadata,providerExecuted:F.providerExecuted}},"output-available",{output:P0.payload.result}));else if(P0.type==="background-task-failed")F9(J,await M({type:"tool-error",runId:f0,from:"AGENT",payload:{toolCallId:P0.payload.toolCallId,toolName:P0.payload.toolName,error:P0.payload.error,args:F.args,providerMetadata:F.providerMetadata,providerExecuted:F.providerExecuted}},"error",{error:P0.payload.error}))}).catch((f0)=>{H?.warn?.("Error transforming background task stream chunk",{toolCallId:P0.payload.toolCallId,toolName:P0.payload.toolName,runId:P0.payload.runId,error:f0,errorMessage:f0 instanceof Error?f0.message:void 0,errorStack:f0 instanceof Error?f0.stack:void 0})})},onResult:async(P0)=>{let f0=P0.status==="failed"?`Background task failed: ${P0.error?.message??"Unknown error"}`:P0.result,p0=RZ({metadata:{}},await NQ({phase:"input-available",toolName:P0.toolName,toolCallId:P0.toolCallId,input:k,providerMetadata:F.providerMetadata},E,H));p0=RZ(p0,await NQ({phase:P0.status==="failed"?"error":"output-available",toolName:P0.toolName,toolCallId:P0.toolCallId,input:k,output:P0.status==="failed"?void 0:P0.result,error:P0.status==="failed"?P0.error:void 0,providerMetadata:F.providerMetadata},E,H));let U4=uY(p0.metadata,"transcript","input-available"),P1=uY(p0.metadata,"transcript",P0.status==="failed"?"error":"output-available"),d1=f7(U4)?U4.transformed:k,C0=f7(P1)?P1.transformed:f0,n0=n2(F.providerMetadata,p0.metadata);if(!Y.updateToolInvocation({type:"tool-invocation",toolInvocation:{state:"result",toolCallId:P0.toolCallId,toolName:P0.toolName,args:k,result:f0},...n0?{providerMetadata:n0}:{}},{mode:"stream",backgroundTasks:{[P0.toolCallId]:{startedAt:P0.startedAt,completedAt:P0.completedAt,taskId:P0.taskId}}})){if(P0.runId!==Q||P0.runId===Q&&N)Y.add([{role:"tool",type:"tool-call",id:Z?.generateId?.()??E6(),createdAt:new Date,content:[{type:"tool-call",toolCallId:P0.toolCallId,toolName:P0.toolName,args:d1}]}],"response");Y.add([{role:"tool",content:[{type:"tool-result",toolCallId:P0.toolCallId,toolName:P0.toolName,result:C0,isError:P0.status==="failed"}]}],"response")}if(Z?.saveQueueManager&&Z?.threadId)await Z.saveQueueManager.flushMessages(Y,Z.threadId,Z.memoryConfig)},onExecution:async(P0)=>{let f0=await NQ({phase:"input-available",toolName:P0.toolName,toolCallId:P0.toolCallId,input:k,providerMetadata:F.providerMetadata},E,H),p0=RZ({metadata:{}},f0),U4=n2(F.providerMetadata,p0.metadata);Y.updateToolInvocation({type:"tool-invocation",toolInvocation:{state:"call",toolCallId:P0.toolCallId,toolName:P0.toolName,args:k},...U4?{providerMetadata:U4}:{}},{mode:"stream",backgroundTasks:{[P0.toolCallId]:{startedAt:P0.startedAt,suspendedAt:P0.suspendedAt,taskId:P0.taskId}}})},onComplete:X0?.onComplete??a?.onTaskComplete,onFailed:X0?.onFailed??a?.onTaskFailed}});if(await F0.checkIfSuspended({toolCallId:F.toolCallId,runId:Q,agentId:z,threadId:Z?.threadId,resourceId:Z?.resourceId,toolName:F.toolName})&&u)return{result:`Background task resumed. Task ID: ${(await F0.resume(u)).id}. The tool "${F.toolName}" is running in the background. You will be notified when it completes.`,...F};let{task:O0,fallbackToSync:R0}=await F0.dispatch();if(!R0)return F9(J,{type:"background-task-started",runId:Q,from:"AGENT",payload:{taskId:O0.id,toolName:F.toolName,toolCallId:F.toolCallId}}),{result:`Background task started. Task ID: ${O0.id}. The tool "${F.toolName}" is running in the background. You will be notified when it completes.`,...F}}}let s=await O.execute(k,b),K0=Ux0(s);if(O&&"onOutput"in O&&typeof O.onOutput==="function")try{await O.onOutput({toolCallId:F.toolCallId,toolName:F.toolName,output:K0,abortSignal:X?.abortSignal})}catch(X0){H?.error("Error calling onOutput",X0)}return{result:K0,...F}}catch(j){if(j instanceof Error&&j.name==="FGADeniedError")throw j;return{error:j,...F}}}})}function F99({models:$,_internal:Y,...X}){let G=pK4(X.toolCallConcurrency),J={concurrency:dK4({requireToolApproval:X.requireToolApproval,tools:X.tools,activeTools:X.activeTools,configuredConcurrency:G})},Q=U99({models:$,_internal:Y,toolCallForeachOptions:J,...X}),W=V99({_internal:Y,...X}),K=H99({models:$,_internal:Y,...X},Q),Z=C89({_internal:Y,...X}),H=z99({_internal:Y,...X}),z=g89({_internal:Y,...X});return IQ({id:"executionWorkflow",inputSchema:hW,outputSchema:hW,options:{tracingPolicy:{internal:1},shouldPersistSnapshot:({workflowStatus:V})=>V==="suspended",validateInputs:!1}}).then(Q).map(async({inputData:V})=>{return V.output.toolCalls||[]},{id:"map-tool-calls"}).foreach(W,J).then(K).then(Z).then(H).then(z).commit()}function L99($){let{models:Y,_internal:X,messageId:G,runId:J,toolChoice:Q,messageList:W,modelSettings:K,controller:Z,outputWriter:H,...z}=$,V=[],F=0,L=!1,N=F99({messageId:G,models:Y,_internal:X,modelSettings:K,toolChoice:Q,controller:Z,outputWriter:H,messageList:W,runId:J,...z});return IQ({id:"agentic-loop",inputSchema:hW,outputSchema:hW,options:{tracingPolicy:{internal:1},shouldPersistSnapshot:(D)=>{return D.workflowStatus==="pending"||D.workflowStatus==="paused"||D.workflowStatus==="suspended"},validateInputs:!1}}).dowhile(N,async({inputData:D})=>{let A=D,B=!1,O=X.drainPendingSignals?.(J)??[];if(O.length>0){A.messageId=X?.generateId?.()??E6();for(let j of O)W.add(j.toLLMMessage(),"input"),F9(Z,j.toDataPart());if(A.stepResult)A.stepResult.isContinued=!0}if(L)B=!0,L=!1;let E=A.messages.nonUser.flatMap((j)=>j.content),M=E.slice(F);F=E.length;let R=M.filter((j)=>j.type==="tool-result"),q={content:M,usage:A.output.usage||{inputTokens:0,outputTokens:0,totalTokens:0},finishReason:A.stepResult?.reason||"unknown",warnings:A.stepResult?.warnings||[],request:A.metadata?.request||{},response:{...A.metadata,modelId:A.metadata?.modelId||A.metadata?.model||"",messages:[]},text:A.output.text||"",reasoning:A.output.reasoning||[],reasoningText:A.output.reasoningText||"",files:A.output.files||[],toolCalls:A.output.toolCalls||[],toolResults:R,sources:A.output.sources||[],staticToolCalls:A.output.staticToolCalls||[],dynamicToolCalls:A.output.dynamicToolCalls||[],staticToolResults:R.filter((j)=>j.dynamic===!1),dynamicToolResults:R.filter((j)=>j.dynamic===!0),providerMetadata:A.metadata?.providerMetadata};if(V.push(q),z.stopWhen&&A.stepResult?.isContinued&&V.length>0){let j=V,k=(await Promise.all((Array.isArray(z.stopWhen)?z.stopWhen:[z.stopWhen]).map((S)=>{return S({steps:j})}))).some((S)=>S);B=B||k}if(z.onIterationComplete&&!A.backgroundTaskPending){let j=!A.stepResult?.isContinued||B,C={iteration:V.length,maxIterations:z.maxSteps,text:A.output.text||"",toolCalls:(A.output.toolCalls||[]).map((k)=>({id:k.toolCallId||k.id||"",name:k.toolName||k.name||"",args:k.args||{}})),toolResults:(A.output.toolResults||[]).map((k)=>({id:k.toolCallId||k.id||"",name:k.toolName||k.name||"",result:k.result,error:k.error})),isFinal:j,finishReason:A.stepResult?.reason||"unknown",runId:J,threadId:X?.threadId,resourceId:X?.resourceId,agentId:z.agentId,agentName:z.agentName||z.agentId,messages:W.get.all.db()};try{let k=await z.onIterationComplete(C);if(k){if(k.feedback&&A.stepResult?.isContinued){if(W.add({id:z.mastra?.generateId()||E6(),createdAt:new Date,type:"text",role:"assistant",content:{parts:[{type:"text",text:k.feedback}],metadata:{mode:"stream",completionResult:{suppressFeedback:!0}},format:2}},"response"),k.continue===!1)L=!0;else if(!B&&z.maxSteps&&V.length<z.maxSteps)B=!1,A.stepResult.isContinued=!0}else if(k.continue===!1&&!B)B=!0;else if(k.continue===!0&&(B||!A.stepResult?.isContinued)){if(z.maxSteps&&V.length<z.maxSteps||!z.maxSteps){if(B=!1,A.stepResult)A.stepResult.isContinued=!0}}}}catch(k){z.logger?.error("Error in onIterationComplete hook:",k)}}if(!B&&X?._delegationBailed)B=!0,X._delegationBailed=!1;if(A.stepResult)A.stepResult.isContinued=B?!1:A.stepResult.isContinued;let _=(A.output?.steps?.length??0)>0;if(A.stepResult?.reason!=="tripwire"||_)F9(Z,{type:"step-finish",runId:J,from:"AGENT",payload:A});if(A.stepResult?.reason===void 0)return!1;return A.stepResult?.isContinued??!1}).commit()}function D99({resumeContext:$,requireToolApproval:Y,models:X,toolChoice:G,modelSettings:J,_internal:Q,messageId:W,runId:K,messageList:Z,startTimestamp:H,streamState:z,agentId:V,toolCallId:F,toolCallConcurrency:L,...N}){return new e2({start:async(D)=>{let A=N.requestContext??new p1,B=N.outputProcessors&&N.outputProcessors.length>0,O=B?new V5({outputProcessors:N.outputProcessors,logger:N.logger||new z3({level:"error"}),agentName:V||"unknown"}):void 0,E=B?new Map:void 0,M={custom:async(j)=>{F9(D,j)}},q=L99({resumeContext:$,messageId:W,models:X,_internal:Q,modelSettings:J,toolChoice:G,controller:D,outputWriter:async(j,C)=>{if(j.type.startsWith("data-")){let k=j;if(O){let{part:I,blocked:v,reason:x,tripwireOptions:y,processorId:d}=await O.processPart(j,N.processorStates??E,void 0,A,Z,0,M);if(v){F9(D,{type:"tripwire",runId:K,from:"AGENT",payload:{reason:x||"Output processor blocked content",retry:y?.retry,metadata:y?.metadata,processorId:d}});return}if(I)k=I;else return}let S=C?.messageId??W;if(typeof k.type==="string"&&k.type.startsWith("data-")&&S&&!(("transient"in k)&&k.transient)){let I={type:k.type,data:"data"in k?k.data:void 0},v={id:S,role:"assistant",content:{format:2,parts:[I]},createdAt:new Date,threadId:Q?.threadId,resourceId:Q?.resourceId};Z.add(v,"response")}F9(D,k);return}if(O){let{part:k,blocked:S,reason:I,tripwireOptions:v,processorId:x}=await O.processPart(j,N.processorStates??E,void 0,A,Z,0,M);if(S){F9(D,{type:"tripwire",runId:K,from:"AGENT",payload:{reason:I||"Output processor blocked content",retry:v?.retry,metadata:v?.metadata,processorId:x}});return}if(!k)return;F9(D,k);return}F9(D,j)},runId:K,messageList:Z,startTimestamp:H,streamState:z,agentId:V,requireToolApproval:Y,toolCallConcurrency:L,...N});if(N.mastra)q.__registerMastra(N.mastra);let _={messageId:W,messages:{all:Z.get.all.aiV5.model(),user:Z.get.input.aiV5.model(),nonUser:[]},output:{steps:[],usage:{inputTokens:0,outputTokens:0,totalTokens:0}},metadata:{},stepResult:{reason:"undefined",warnings:[],isContinued:!0,totalUsage:{inputTokens:0,outputTokens:0,totalTokens:0}}};if(!$)F9(D,{type:"start",runId:K,from:"AGENT",payload:{id:V,messageId:W}});let P=await q.createRun({runId:K,resourceId:Q?.resourceId});if(Y)A.set("__mastra_requireToolApproval",!0);let w=$?await P.resume({resumeData:$.resumeData,...g4(N.modelSpanTracker?.getTracingContext()),requestContext:A,label:F}):await P.start({inputData:_,...g4(N.modelSpanTracker?.getTracingContext()),requestContext:A});if(w.status!=="success"){if(w.status==="failed"){let j=XG(w.error,{fallbackMessage:"Unknown error in agent workflow stream"});if(F9(D,{type:"error",runId:K,from:"AGENT",payload:{error:j}}),N.options?.onError)await N.options?.onError?.({error:j})}if(w.status!=="suspended")await q.deleteWorkflowRunById(K);N$0(D);return}await q.deleteWorkflowRunById(K),F9(D,{type:"finish",runId:K,from:"AGENT",payload:{...w.result,stepResult:{...w.result.stepResult,reason:w.result.stepResult.reason}}}),N$0(D)}})}function N99({resumeContext:$,models:Y,logger:X,runId:G,idGenerator:J,messageList:Q,includeRawChunks:W,modelSettings:K,tools:Z,_internal:H,outputProcessors:z,returnScorerData:V,requireToolApproval:F,agentId:L,toolCallConcurrency:N,...D}){let A=X||new z3({level:"debug"});if(Y.length===0||!Y[0]){let x=new G0({id:"LOOP_MODELS_EMPTY",domain:"LLM",category:"USER"});throw A.trackException(x),x}let B=Y[0],O=G;if(!O)O=J?.({idType:"run",source:"agent",entityId:L,threadId:H?.threadId,resourceId:H?.resourceId})||crypto.randomUUID();let E={now:H?.now||(()=>Date.now()),generateId:H?.generateId||(()=>KO()),currentDate:H?.currentDate||(()=>new Date),saveQueueManager:H?.saveQueueManager,memoryConfig:H?.memoryConfig,threadId:H?.threadId,resourceId:H?.resourceId,memory:H?.memory,threadExists:H?.threadExists,transportRef:H?.transportRef??{},backgroundTaskManager:H?.backgroundTaskManager,agentBackgroundConfig:H?.agentBackgroundConfig,backgroundTaskManagerConfig:H?.backgroundTaskManagerConfig,skipBgTaskWait:H?.skipBgTaskWait,drainPendingSignals:H?.drainPendingSignals,initialSignalEchoes:H?.initialSignalEchoes?[...H.initialSignalEchoes]:void 0},M=E.now?.(),R=D.experimental_generateMessageId?.()||E.generateId?.(),q,_=()=>{return q?.serializeState()},P=(x)=>{q?.deserializeState(x)},w=D.processorStates??new Map,j={resumeContext:$,models:Y,runId:O,logger:A,startTimestamp:M,messageList:Q,includeRawChunks:!!W,_internal:E,tools:Z,modelSettings:K,outputProcessors:z,messageId:R,agentId:L,requireToolApproval:F,toolCallConcurrency:N,streamState:{serialize:_,deserialize:P},processorStates:w,...D},C=$?.snapshot,k;if(C)for(let x in C?.context){let y=C?.context[x];if(y&&y.status==="suspended"&&y.suspendPayload?.__streamState){k=y.suspendPayload?.__streamState;break}}let S=D99(j),I=D.modelSpanTracker?.wrapStream(S)??S,v=g4(D.modelSpanTracker?.getTracingContext());return q=new uT({model:{modelId:B.model.modelId,provider:B.model.provider,version:B.model.specificationVersion},stream:I,messageList:Q,messageId:R,options:{runId:O,toolCallStreaming:D.toolCallStreaming,onFinish:D.options?.onFinish,onStepFinish:D.options?.onStepFinish,includeRawChunks:!!W,structuredOutput:D.structuredOutput,outputProcessors:z,returnScorerData:V,...v,requestContext:D.requestContext,processorStates:w,transportRef:E.transportRef},initialState:k}),t99(q)}function cK4($){let Y="",X=!1,G=0;while(G<$.length){let J=$[G];if(J==="\\"&&G+1<$.length){Y+=J+$[G+1],G+=2;continue}if(J==='"'){X=!X,Y+=J,G++;continue}if(X){if(J===`
`){Y+="\\n",G++;continue}if(J==="\r"){Y+="\\r",G++;continue}if(J==="\t"){Y+="\\t",G++;continue}}Y+=J,G++}return Y}function M99({schema:$}){let Y=$?Q4($):void 0;switch(E$0(Y)?.outputFormat){case"array":return new O99(Y);case"enum":return new E99(Y);case"object":default:return new B99(Y)}}function R99({structuredOutput:$,logger:Y}){let X=M99({schema:$?.schema}),G="",J=void 0,Q,W;return new HV({async transform(Z,H){if(Z.runId)Q=Z.runId;if(Z.type==="text-delta"&&typeof Z.payload?.text==="string"){G+=Z.payload.text;let z=await X.processPartialChunk({accumulatedText:G,previousObject:J});if(z.shouldEmit){J=z.newPreviousResult??J;let V={from:Z.from,runId:Z.runId,type:"object",object:z.emitValue};H.enqueue(V)}}if(Z.type==="text-end"){if(H.enqueue(Z),G?.trim()&&!W){if(W=await X.validateAndTransformFinal(G),W.success)H.enqueue({from:"AGENT",runId:Q??"",type:"object-result",object:W.value})}return}H.enqueue(Z)},async flush(Z){if(W&&!W.success)K(W.error,Z);if(G?.trim()&&!W)if(W=await X.validateAndTransformFinal(G),W.success)Z.enqueue({from:"AGENT",runId:Q??"",type:"object-result",object:W.value});else K(W.error,Z)}});function K(Z,H){if($?.errorStrategy==="warn")Y?.warn(Z.message);else if($?.errorStrategy==="fallback")H.enqueue({from:"AGENT",runId:Q??"",type:"object-result",object:$.fallbackValue});else H.enqueue({from:"AGENT",runId:Q??"",type:"error",payload:{error:Z}})}}function q99($){let Y=0,X=!1,G=0,J=E$0($);return new HV({transform(Q,W){if(Q.type!=="object"||!Q.object)return;if(J?.outputFormat==="array"&&Array.isArray(Q.object)){if(G++,G===1){if(Q.object.length>0){W.enqueue(JSON.stringify(Q.object)),Y=Q.object.length,X=!0;return}}if(!X)W.enqueue("["),X=!0;for(let K=Y;K<Q.object.length;K++){let Z=JSON.stringify(Q.object[K]);if(K>0)W.enqueue(","+Z);else W.enqueue(Z)}Y=Q.object.length}else W.enqueue(JSON.stringify(Q.object))},flush(Q){if(X&&J?.outputFormat==="array"&&G>1)Q.enqueue("]")}})}function tm($){if(z5($))return $6($);try{let Y=Q4($);return $6(Y)}catch{throw Error("We could not convert the schema to a JSONSchema")}}function a24($){if($===!0)return!0;if(!$||$===!1)return!1;if(typeof $!=="object")return!1;return $.enabled!==!1}function M$0($,Y){let X=typeof $?.getConfig==="function"?$.getConfig().observationalMemory:void 0,G=Y&&typeof Y==="object"&&"observationalMemory"in Y?Y.observationalMemory:void 0;if(a24(G)||G===void 0&&a24(X))throw new G0({id:"AGENT_NETWORK_OBSERVATIONAL_MEMORY_UNSUPPORTED",domain:"AGENT_NETWORK",category:"USER",text:P99,details:{status:400}})}async function Kg0($){if(!$?.trim())return null;let Y=cK4($),{value:X,state:G}=await bL(Y);if(G==="successful-parse"||G==="repaired-parse")return X;return null}function w99($){return $.filter((Y)=>{if(Y.role==="user")return!0;if(Y.role==="assistant"){let X=Y.content?.metadata;if(X?.mode==="network"||X?.completionResult)return!1;let G=Y.content?.parts??[];for(let J of G)if(J?.type==="text"&&J?.text)try{let Q=JSON.parse(J.text);if(Q.isNetwork)return!1;if(Q.primitiveId&&Q.selectionReason)return!1}catch{}return!0}return!1})}async function Zg0({requestContext:$,agent:Y,routingConfig:X,memoryConfig:G}){let J=await Y.getInstructions({requestContext:$}),Q=await Y.listAgents({requestContext:$}),W=await Y.listWorkflows({requestContext:$}),K=await Y.listTools({requestContext:$}),Z=await Y.getModel({requestContext:$}),H=await Y.getMemory({requestContext:$});M$0(H,G);let z=(await Y.getDefaultOptions({requestContext:$}))?.clientTools,V=await Y.listConfiguredInputProcessors($),F=await Y.listConfiguredOutputProcessors($),L=Object.entries(Q).map(([E,M])=>{return` - **${E}**: ${M.getDescription()}`}).join(`
`),N=Object.entries(W).map(([E,M])=>{return` - **${E}**: ${M.description}, input schema: ${JSON.stringify(tm(M.inputSchema??U.object({})))}`}).join(`
`),D=await H?.listTools?.(),A=Object.entries({...K,...D,...z||{}}).map(([E,M])=>{let R="inputSchema"in M?M.inputSchema??U.object({}):U.object({});return` - **${E}**: ${M.description}, input schema: ${JSON.stringify(tm(R))}`}).join(`
`),B=X?.additionalInstructions?`
## Additional Instructions
${X.additionalInstructions}`:"",O=`
          You are a router in a network of specialized AI agents.
          Your job is to decide which agent should handle each step of a task.
          If asking for completion of a task, make sure to follow system instructions closely.

          Every step will result in a prompt message. It will be a JSON object with a "selectionReason" and "finalResult" property. Make your decision based on previous decision history, as well as the overall task criteria. If you already called a primitive, you shouldn't need to call it again, unless you strongly believe it adds something to the task completion criteria. Make sure to call enough primitives to complete the task.

          ## System Instructions
          ${J}
          You can only pick agents and workflows that are available in the lists below. Never call any agents or workflows that are not available in the lists below.
          ## Available Agents in Network
          ${L}
          ## Available Workflows in Network (make sure to use inputs corresponding to the input schema when calling a workflow)
          ${N}
          ## Available Tools in Network (make sure to use inputs corresponding to the input schema when calling a tool)
          ${A}
          If you have multiple entries that need to be called with a workflow or agent, call them separately with each input.
          When calling a workflow, the prompt should be a JSON value that corresponds to the input schema of the workflow. The JSON value is stringified.
          When calling a tool, the prompt should be a JSON value that corresponds to the input schema of the tool. The JSON value is stringified.
          When calling an agent, the prompt should be a text value, like you would call an LLM in a chat interface.
          Keep in mind that the user only sees the final result of the task. When reviewing completion, you should know that the user will not see the intermediate results.
          ${B}
        `;return new YJ({id:"routing-agent",name:"Routing Agent",instructions:O,model:Z,memory:H,inputProcessors:V,outputProcessors:F,_agentNetworkAppend:!0})}function _99($){let Y="";if(typeof $==="string")Y=$;else{let X=Array.isArray($)?$[$.length-1]:$;if(typeof X==="string")Y=X;else if(X&&"content"in X&&X?.content){let G=X.content;if(typeof G==="string")Y=G;else if(Array.isArray(G)){let J=G[G.length-1];if(J?.type==="text")Y=J.text}}else if(X&&"parts"in X&&X?.parts){let G=X.parts;if(Array.isArray(G)){let J=G[G.length-1];if(J?.type==="text"&&J?.text)Y=J.text}}}return Y}async function j99({threadId:$,resourceId:Y,messages:X,routingAgent:G,requestContext:J,generateId:Q,memoryConfig:W,...K}){let Z=e1(K),H=await G.getMemory({requestContext:J});M$0(H,W);let z=await H?.getThreadById({threadId:$});if(!z)z=await H?.createThread({threadId:$,title:`New Thread ${new Date().toISOString()}`,resourceId:Y});let V,F=[];if(typeof X==="string"){if(V=X,H)F.push(H.saveMessages({messages:[{id:Q({idType:"message",source:"agent",threadId:z?.id,resourceId:z?.resourceId,role:"user"}),type:"text",role:"user",content:{parts:[{type:"text",text:X}],format:2},createdAt:new Date,threadId:z?.id,resourceId:z?.resourceId}],observabilityContext:Z}))}else{let L=new l6({threadId:z?.id,resourceId:z?.resourceId});L.add(X,"user");let N=L.get.all.db();if(H)F.push(H.saveMessages({messages:N,observabilityContext:Z}));let D=L.get.all.ui();V=G.getMostRecentUserMessage(D)?.content}if(z&&H){let L=H.getMergedThreadConfig(W||{}),{shouldGenerate:N,model:D,instructions:A}=G.resolveTitleGenerationConfig(L?.generateTitle);if(N&&V){if((await H.recall({threadId:z.id,resourceId:z.resourceId,observabilityContext:Z})).messages.filter((M)=>M.role==="user").length===0)F.push(G.genTitle(V,J,Z,D,A).then((M)=>{if(M)return H.createThread({threadId:z.id,resourceId:z.resourceId,memoryConfig:W,title:M,metadata:z.metadata})}))}}return await Promise.all(F),{thread:z}}async function CD($,Y,X,G){if(!$)return;let{requestContext:J,...Q}=G??{},W=e1(Q);if(!X||Y.length===0){await $.saveMessages({messages:Y,observabilityContext:W});return}let K=new l6;for(let H of Y)K.add(H,"response");await X.runOutputProcessors(K,W,J);let Z=K.get.response.db();await $.saveMessages({messages:Z,observabilityContext:W})}async function s24({memory:$,finalResult:Y,threadId:X,resourceId:G,generateId:J,processorRunner:Q,requestContext:W}){if($&&Y)await CD($,[{id:J(),type:"text",role:"assistant",content:{parts:[{type:"text",text:Y}],format:2},createdAt:new Date,threadId:X,resourceId:G}],Q,{requestContext:W})}async function T99({networkName:$,requestContext:Y,runId:X,agent:G,generateId:J,routingAgentOptions:Q,routingAgentMemoryConfig:W,routing:K,onStepFinish:Z,onError:H,onAbort:z,abortSignal:V}){M$0(await G.getMemory({requestContext:Y}),W);async function F(R){return await z?.({primitiveType:R.primitiveType,primitiveId:R.primitiveId,iteration:R.iteration}),await R.writer?.write({type:R.eventType,runId:X,from:"NETWORK",payload:{primitiveType:R.primitiveType,primitiveId:R.primitiveId}}),{task:R.task,primitiveId:R.primitiveId,primitiveType:R.primitiveType,result:"Aborted",isComplete:!0,iteration:R.iteration}}let L=await G.listConfiguredOutputProcessors(Y),N=L.length>0?new V5({outputProcessors:L,inputProcessors:[],logger:G.getMastraInstance()?.getLogger()||Ky0,agentName:G.name}):null,D=o9({id:"routing-agent-step",inputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:jX,result:U.string().optional(),iteration:U.number(),threadId:U.string().optional(),threadResourceId:U.string().optional(),isOneOff:U.boolean(),verboseIntrospection:U.boolean()}),outputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:jX,prompt:U.string(),result:U.string(),isComplete:U.boolean().optional(),selectionReason:U.string(),iteration:U.number(),conversationContext:U.array(U.any()).optional()}),execute:async({inputData:R,getInitData:q,writer:_})=>{if(V?.aborted)return{...await F({writer:_,eventType:"routing-agent-abort",primitiveType:"routing",primitiveId:"routing-agent",iteration:R.iteration,task:R.task}),primitiveId:"none",primitiveType:"none",prompt:"",selectionReason:"Aborted",conversationContext:[]};let P=await q(),w=await Zg0({requestContext:Y,agent:G,routingConfig:K,memoryConfig:W}),j=(R.iteration??-1)+1,C=J({idType:"step",source:"agent",stepType:"routing-agent"});await _.write({type:"routing-agent-start",payload:{networkId:G.id,agentId:w.id,runId:C,inputData:{...R,iteration:j}},runId:X,from:"NETWORK"});let k=[{role:"assistant",content:`
                    ${R.isOneOff?"You are executing just one primitive based on the user task. Make sure to pick the primitive that is the best suited to accomplish the whole task. Primitives that execute only part of the task should be avoided.":"You will be calling just *one* primitive at a time to accomplish the user task, every call to you is one decision in the process of accomplishing the user task. Make sure to pick primitives that are the best suited to accomplish the whole task. Completeness is the highest priority."}

                    The user has given you the following task:
                    ${R.task}

                    # Rules:

                    ## Agent:
                    - prompt should be a text value, like you would call an LLM in a chat interface.
                    - If you are calling the same agent again, make sure to adjust the prompt to be more specific.

                    ## Workflow/Tool:
                    - prompt should be a JSON value that corresponds to the input schema of the workflow or tool. The JSON value is stringified.
                    - Make sure to use inputs corresponding to the input schema when calling a workflow or tool.

                    DO NOT CALL THE PRIMITIVE YOURSELF. Make sure to not call the same primitive twice, unless you call it with different arguments and believe it adds something to the task completion criteria. Take into account previous decision making history and results in your decision making and final result. These are messages whose text is a JSON structure with "isNetwork" true.

                    Please select the most appropriate primitive to handle this task and the prompt to be sent to the primitive. If no primitive is appropriate, return "none" for the primitiveId and "none" for the primitiveType.

                    {
                        "primitiveId": string,
                        "primitiveType": "agent" | "workflow" | "tool",
                        "prompt": string,
                        "selectionReason": string
                    }

                    The 'selectionReason' property should explain why you picked the primitive${R.verboseIntrospection?", as well as why the other primitives were not picked.":"."}
                    `.trim()}],S={structuredOutput:{schema:U.object({primitiveId:U.string().describe("The id of the primitive to be called"),primitiveType:jX.describe("The type of the primitive to be called"),prompt:U.string().describe("The json string or text value to be sent to the primitive"),selectionReason:U.string().describe("The reason you picked the primitive")})},requestContext:Y,maxSteps:1,memory:{thread:P?.threadId??X,resource:P?.threadResourceId??$,options:{readOnly:!0,workingMemory:{enabled:!1}}},...Q,abortSignal:V,onAbort:z},I;try{I=await A$0(w,k,S)}catch(u){if(V?.aborted)return{...await F({writer:_,eventType:"routing-agent-abort",primitiveType:"routing",primitiveId:"routing-agent",iteration:j,task:R.task}),primitiveId:"none",primitiveType:"none",prompt:"",selectionReason:"Aborted",conversationContext:[]};throw u}if(V?.aborted)return{...await F({writer:_,eventType:"routing-agent-abort",primitiveType:"routing",primitiveId:"routing-agent",iteration:j,task:R.task}),primitiveId:"none",primitiveType:"none",prompt:"",selectionReason:"Aborted",conversationContext:[]};let v=await I.object;if(!v)throw new G0({id:"AGENT_NETWORK_ROUTING_AGENT_INVALID_OUTPUT",domain:"AGENT_NETWORK",category:"SYSTEM",text:"Routing agent returned undefined for 'object'. This may indicate an issue with the model's response or structured output parsing.",details:{finishReason:I.finishReason??null,usage:JSON.stringify(I.usage)??null}});let x=v.primitiveId==="none"&&v.primitiveType==="none",y=w99(I.rememberedMessages??[]),d={task:R.task,result:x?v.selectionReason:"",primitiveId:v.primitiveId,primitiveType:v.primitiveType,prompt:v.prompt,isComplete:x,selectionReason:v.selectionReason,iteration:j,runId:C,conversationContext:y};return await _.write({type:"routing-agent-end",payload:{...d,usage:I.usage},from:"NETWORK",runId:X}),d}}),A=o9({id:"agent-execution-step",inputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:jX,prompt:U.string(),result:U.string(),isComplete:U.boolean().optional(),selectionReason:U.string(),iteration:U.number(),conversationContext:U.array(U.any()).optional()}),outputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:jX,result:U.string(),isComplete:U.boolean().optional(),iteration:U.number()}),execute:async({inputData:R,writer:q,getInitData:_,suspend:P,resumeData:w})=>{if(V?.aborted)return F({writer:q,eventType:"agent-execution-abort",primitiveType:"agent",primitiveId:R.primitiveId,iteration:R.iteration,task:R.task});let C=(await G.listAgents({requestContext:Y}))[R.primitiveId];if(!C)throw new G0({id:"AGENT_NETWORK_AGENT_EXECUTION_STEP_INVALID_TASK_INPUT",domain:"AGENT_NETWORK",category:"USER",text:`Agent ${R.primitiveId} not found`});let k=C.id,S=J({idType:"step",source:"agent",entityId:k,stepType:"agent-execution"});await q.write({type:"agent-execution-start",payload:{agentId:k,args:R,runId:S},from:"NETWORK",runId:X});let I=await _(),v=I?.threadId||X,x=I?.threadResourceId||$,d=[...R.conversationContext??[],{role:"user",content:R.prompt}],u=await(w?C.resumeStream(w,{requestContext:Y,runId:X,memory:{thread:v,resource:x,options:{lastMessages:0}},onStepFinish:Z,onError:H,abortSignal:V,onAbort:z}):C.stream(d,{requestContext:Y,runId:X,memory:{thread:v,resource:x,options:{lastMessages:0}},onStepFinish:Z,onError:H,abortSignal:V,onAbort:z})),b,g,p=!1,h=!1;for await(let K0 of u.fullStream){if(await q.write({type:`agent-execution-event-${K0.type}`,payload:{...K0,runId:S},from:"NETWORK",runId:X}),K0.type==="tool-call-approval")b={...b??{},[R.primitiveId]:{resumeSchema:K0.payload.resumeSchema,args:{prompt:R.prompt},toolName:R.primitiveId,toolCallId:R.primitiveId,runId:X,type:"approval",primitiveType:"agent",primitiveId:R.primitiveId}};if(K0.type==="tool-call-suspended")g={...g??{},[R.primitiveId]:{suspendPayload:K0.payload.suspendPayload,resumeSchema:K0.payload.resumeSchema,toolName:R.primitiveId,toolCallId:R.primitiveId,args:{prompt:R.prompt},runId:X,type:"suspension",primitiveType:"agent",primitiveId:R.primitiveId}};if(K0.type==="tool-result"){if(K0.payload.result==="Tool call was not approved by the user")p=!0}if(K0.type==="abort")h=!0}let n=await G.getMemory({requestContext:Y}),t=u.messageList.get.all.v1(),s=await u.text;if(p)s=s+`

Tool call was not approved by the user`;if(h)return F({writer:q,eventType:"agent-execution-abort",primitiveType:"agent",primitiveId:R.primitiveId,iteration:R.iteration,task:R.task});if(await CD(n,[{id:J({idType:"message",source:"agent",entityId:k,threadId:I?.threadId||X,resourceId:I?.threadResourceId||$,role:"assistant"}),type:"text",role:"assistant",content:{parts:[{type:"text",text:JSON.stringify({isNetwork:!0,selectionReason:R.selectionReason,primitiveType:R.primitiveType,primitiveId:R.primitiveId,input:R.prompt,finalResult:{text:s,messages:t}})}],format:2,metadata:{mode:"network",...b?{requireApprovalMetadata:b}:{},...g?{suspendedTools:g}:{}}},createdAt:new Date,threadId:I?.threadId||X,resourceId:I?.threadResourceId||$}],N,{requestContext:Y}),b||g)return await q.write({type:b?"agent-execution-approval":"agent-execution-suspended",payload:{args:{prompt:R.prompt},agentId:k,runId:S,toolName:R.primitiveId,toolCallId:R.primitiveId,usage:await u.usage,selectionReason:R.selectionReason,...b?{resumeSchema:b[R.primitiveId].resumeSchema}:{},...g?{resumeSchema:g[R.primitiveId].resumeSchema,suspendPayload:g[R.primitiveId].suspendPayload}:{}},from:"NETWORK",runId:X}),await P({...b?{requireToolApproval:b[R.primitiveId]}:{},...g?{toolCallSuspended:g[R.primitiveId].suspendPayload,args:R.prompt,agentId:k}:{},runId:S});else{let K0={task:R.task,agentId:k,result:s,isComplete:!1,iteration:R.iteration,runId:S};return await q.write({type:"agent-execution-end",payload:{...K0,usage:await u.usage},from:"NETWORK",runId:X}),{task:R.task,primitiveId:R.primitiveId,primitiveType:R.primitiveType,result:s,isComplete:!1,iteration:R.iteration}}}}),B=o9({id:"workflow-execution-step",inputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:jX,prompt:U.string(),result:U.string(),isComplete:U.boolean().optional(),selectionReason:U.string(),iteration:U.number(),conversationContext:U.array(U.any()).optional()}),outputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:jX,result:U.string(),isComplete:U.boolean().optional(),iteration:U.number()}),execute:async({inputData:R,writer:q,getInitData:_,suspend:P,resumeData:w,mastra:j})=>{if(V?.aborted)return F({writer:q,eventType:"workflow-execution-abort",primitiveType:"workflow",primitiveId:R.primitiveId,iteration:R.iteration,task:R.task});let C=await G.listWorkflows({requestContext:Y}),k=R.primitiveId,S=C[k];if(!S)throw new G0({id:"AGENT_NETWORK_WORKFLOW_EXECUTION_STEP_INVALID_TASK_INPUT",domain:"AGENT_NETWORK",category:"USER",text:`Workflow ${k} not found`});let I=await Kg0(R.prompt);if(I===null)return j?.getLogger()?.warn(`Workflow execution step received invalid JSON prompt for workflow "${R.primitiveId}". Prompt was: "${R.prompt}". Returning error to routing agent for retry.`),{task:R.task,primitiveId:R.primitiveId,primitiveType:R.primitiveType,result:`Error: The prompt provided for workflow "${R.primitiveId}" is not valid JSON. Received: "${R.prompt}". Workflows require a valid JSON string matching their input schema. Please provide the prompt as properly formatted JSON (e.g., {"key": "value"}).`,isComplete:!1,iteration:R.iteration};let v=J({idType:"step",source:"workflow",entityId:S.id,stepType:"workflow-execution"}),x=await S.createRun({runId:X}),y=async()=>{await x.cancel(),await z?.({primitiveType:"workflow",primitiveId:R.primitiveId,iteration:R.iteration})};if(V)V.addEventListener("abort",y);let d={workflowId:S.id,args:R,runId:v};await q?.write({type:"workflow-execution-start",payload:d,from:"NETWORK",runId:X});let u=w?x.resumeStream({resumeData:w,requestContext:Y}):x.stream({inputData:I,requestContext:Y}),b=!1,g=[];for await(let a of u.fullStream)if(g.push(a),await q?.write({type:`workflow-execution-event-${a.type}`,payload:{...a,runId:v},from:"NETWORK",runId:X}),a.type==="workflow-canceled")b=!0;let p=!0,h=await u.result;if(!h?.status||h?.status==="failed")p=!1;let n,t;if(h?.status==="suspended"){let a=h?.suspended?.[0]?.[0];if(t=h?.steps?.[a]?.suspendPayload,t?.__workflow_meta)delete t.__workflow_meta;let Q0=[...h?.suspended?.[0]??[]],e=S;while(Q0.length>0){let $0=Q0.shift();if($0){if(!e.steps[$0]){j?.getLogger()?.warn(`Suspended step '${$0}' not found in workflow '${k}'`);break}e=e.steps[$0]}}let m=e?.resumeSchema;if(m)n=JSON.stringify(tm(m));else n=""}let s=JSON.stringify({isNetwork:!0,primitiveType:R.primitiveType,primitiveId:R.primitiveId,selectionReason:R.selectionReason,input:I,finalResult:{runId:x.runId,runResult:h,chunks:g,runSuccess:p}}),K0=await G.getMemory({requestContext:Y}),X0=await _();if(b&&V?.aborted)return F({writer:q,eventType:"workflow-execution-abort",primitiveType:"workflow",primitiveId:R.primitiveId,iteration:R.iteration,task:R.task});if(await CD(K0,[{id:J({idType:"message",source:"workflow",entityId:S.id,threadId:X0?.threadId||X,resourceId:X0?.threadResourceId||$,role:"assistant"}),type:"text",role:"assistant",content:{parts:[{type:"text",text:s}],format:2,metadata:{mode:"network",...t?{suspendedTools:{[R.primitiveId]:{args:I,suspendPayload:t,runId:X,type:"suspension",resumeSchema:n,workflowId:k,primitiveType:"workflow",primitiveId:R.primitiveId,toolName:R.primitiveId,toolCallId:R.primitiveId}}}:{}}},createdAt:new Date,threadId:X0?.threadId||X,resourceId:X0?.threadResourceId||$}],N,{requestContext:Y}),t)return await q?.write({type:"workflow-execution-suspended",payload:{args:I,workflowId:k,suspendPayload:t,resumeSchema:n,name:S.name,runId:v,usage:await u.usage,selectionReason:R.selectionReason,toolName:R.primitiveId,toolCallId:R.primitiveId},from:"NETWORK",runId:X}),P({...d,workflowSuspended:t});else{let a={task:R.task,primitiveId:R.primitiveId,primitiveType:R.primitiveType,result:s,isComplete:!1,iteration:R.iteration};return await q?.write({type:"workflow-execution-end",payload:{...a,result:h,name:S.name,runId:v,usage:await u.usage},from:"NETWORK",runId:X}),a}}}),O=o9({id:"tool-execution-step",inputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:jX,prompt:U.string(),result:U.string(),isComplete:U.boolean().optional(),selectionReason:U.string(),iteration:U.number(),conversationContext:U.array(U.any()).optional()}),outputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:jX,result:U.string(),isComplete:U.boolean().optional(),iteration:U.number()}),resumeSchema:U.object({approved:U.boolean().describe("Controls if the tool call is approved or not, should be true when approved and false when declined")}),execute:async({inputData:R,getInitData:q,writer:_,resumeData:P,mastra:w,suspend:j})=>{let C=await q(),k=w?.getLogger();if(V?.aborted)return F({writer:_,eventType:"tool-execution-abort",primitiveType:"tool",primitiveId:R.primitiveId,iteration:R.iteration,task:R.task});let S=await G.listTools({requestContext:Y}),I=await G.getMemory({requestContext:Y}),v=await I?.listTools?.(),x=(await G.getDefaultOptions({requestContext:Y}))?.clientTools,d={...S,...v,...x||{}}[R.primitiveId];if(!d)throw new G0({id:"AGENT_NETWORK_TOOL_EXECUTION_STEP_INVALID_TASK_INPUT",domain:"AGENT_NETWORK",category:"USER",text:`Tool ${R.primitiveId} not found`});if(!d.execute)throw new G0({id:"AGENT_NETWORK_TOOL_EXECUTION_STEP_INVALID_TASK_INPUT",domain:"AGENT_NETWORK",category:"USER",text:`Tool ${R.primitiveId} does not have an execute function`});let u="id"in d&&typeof d.id==="string"?d.id:R.primitiveId,b=await Kg0(R.prompt);if(b===null)return k?.warn(`Tool execution step received invalid JSON prompt for tool "${u}". Prompt was: "${R.prompt}". Returning error to routing agent for retry.`),{task:R.task,primitiveId:R.primitiveId,primitiveType:R.primitiveType,result:`Error: The prompt provided for tool "${u}" is not valid JSON. Received: "${R.prompt}". Tools require a valid JSON string matching their input schema. Please provide the prompt as properly formatted JSON (e.g., {"key": "value"}).`,isComplete:!1,iteration:R.iteration};let g=J({idType:"step",source:"agent",entityId:u,stepType:"tool-execution"});await _?.write({type:"tool-execution-start",payload:{args:{...R,args:b,toolName:u,toolCallId:g},runId:X},from:"NETWORK",runId:X});let p=d.requireApproval;if(d.needsApprovalFn)try{p=await d.needsApprovalFn(b)}catch(s){k?.error(`Error evaluating needsApprovalFn for tool ${u}:`,s),p=!0}if(p){if(V?.aborted)return F({writer:_,eventType:"tool-execution-abort",primitiveType:"tool",primitiveId:R.primitiveId,iteration:R.iteration,task:R.task});if(!P){let s=U.object({approved:U.boolean().describe("Controls if the tool call is approved or not, should be true when approved and false when declined")}),K0=JSON.stringify($6(Q4(s)));return await CD(I,[{id:J(),type:"text",role:"assistant",content:{parts:[{type:"text",text:JSON.stringify({isNetwork:!0,selectionReason:R.selectionReason,primitiveType:R.primitiveType,primitiveId:R.primitiveId,finalResult:{result:"",toolCallId:g},input:b})}],format:2,metadata:{mode:"network",requireApprovalMetadata:{[R.primitiveId]:{toolCallId:g,toolName:R.primitiveId,args:b,type:"approval",resumeSchema:K0,runId:X,primitiveType:"tool",primitiveId:R.primitiveId}}}},createdAt:new Date,threadId:C.threadId||X,resourceId:C.threadResourceId||$}],N,{requestContext:Y}),await _?.write({type:"tool-execution-approval",payload:{toolName:R.primitiveId,toolCallId:g,args:b,selectionReason:R.selectionReason,resumeSchema:K0,runId:X}}),j({requireToolApproval:{toolName:R.primitiveId,args:b,toolCallId:g}})}else if(!P.approved){await CD(I,[{id:J(),type:"text",role:"assistant",content:{parts:[{type:"text",text:JSON.stringify({isNetwork:!0,selectionReason:R.selectionReason,primitiveType:R.primitiveType,primitiveId:R.primitiveId,finalResult:{result:"Tool call was not approved by the user",toolCallId:g},input:b})}],format:2,metadata:{mode:"network"}},createdAt:new Date,threadId:C.threadId||X,resourceId:C.threadResourceId||$}],N,{requestContext:Y});let K0={task:R.task,primitiveId:R.primitiveId,primitiveType:R.primitiveType,result:"Tool call was not approved by the user",isComplete:!1,iteration:R.iteration,toolCallId:g,toolName:u};return await _?.write({type:"tool-execution-end",payload:K0,from:"NETWORK",runId:X}),K0}}if(V?.aborted)return F({writer:_,eventType:"tool-execution-abort",primitiveType:"tool",primitiveId:R.primitiveId,iteration:R.iteration,task:R.task});let h,n=await d.execute(b,{abortSignal:V,requestContext:Y,mastra:G.getMastraInstance(),agent:{agentId:G.id,resourceId:C.threadResourceId||$,toolCallId:g,threadId:C.threadId,suspend:async(s,K0)=>{await CD(I,[{id:J(),type:"text",role:"assistant",content:{parts:[{type:"text",text:JSON.stringify({isNetwork:!0,selectionReason:R.selectionReason,primitiveType:R.primitiveType,primitiveId:u,finalResult:{result:"",toolCallId:g},input:b})}],format:2,metadata:{mode:"network",suspendedTools:{[R.primitiveId]:{toolCallId:g,toolName:R.primitiveId,args:b,suspendPayload:s,type:"suspension",resumeSchema:K0?.resumeSchema??JSON.stringify(tm(d.resumeSchema)),runId:X,primitiveType:"tool",primitiveId:R.primitiveId}}}},createdAt:new Date,threadId:C.threadId||X,resourceId:C.threadResourceId||$}],N,{requestContext:Y}),await _?.write({type:"tool-execution-suspended",payload:{toolName:R.primitiveId,toolCallId:g,args:b,resumeSchema:K0?.resumeSchema??JSON.stringify(tm(d.resumeSchema)),suspendPayload:s,runId:X,selectionReason:R.selectionReason}}),h=s},resumeData:P},runId:X,memory:I,context:b,...g4({currentSpan:void 0}),writer:_},{toolCallId:g,messages:[]});if(h)return await j({toolCallSuspended:h,toolName:R.primitiveId,args:b,toolCallId:g});if(V?.aborted)return F({writer:_,eventType:"tool-execution-abort",primitiveType:"tool",primitiveId:R.primitiveId,iteration:R.iteration,task:R.task});await CD(I,[{id:J({idType:"message",source:"agent",entityId:u,threadId:C.threadId,resourceId:C.threadResourceId||$,role:"assistant"}),type:"text",role:"assistant",content:{parts:[{type:"text",text:JSON.stringify({isNetwork:!0,selectionReason:R.selectionReason,primitiveType:R.primitiveType,primitiveId:u,finalResult:{result:n,toolCallId:g},input:b})}],format:2,metadata:{mode:"network"}},createdAt:new Date,threadId:C.threadId||X,resourceId:C.threadResourceId||$}],N,{requestContext:Y});let t={task:R.task,primitiveId:R.primitiveId,primitiveType:R.primitiveType,result:n,isComplete:!1,iteration:R.iteration,toolCallId:g,toolName:u};return await _?.write({type:"tool-execution-end",payload:t,from:"NETWORK",runId:X}),t}}),E=o9({id:"finish-step",inputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:jX,prompt:U.string(),result:U.string(),isComplete:U.boolean().optional(),selectionReason:U.string(),iteration:U.number(),conversationContext:U.array(U.any()).optional()}),outputSchema:U.object({task:U.string(),result:U.string(),isComplete:U.boolean(),iteration:U.number()}),execute:async({inputData:R,writer:q})=>{let _=R.result;if(R.primitiveId==="none"&&R.primitiveType==="none"&&!R.result)_=R.selectionReason;let P={task:R.task,result:_,isComplete:!!R.isComplete,iteration:R.iteration,runId:X};return await q?.write({type:"network-execution-event-step-finish",payload:P,from:"NETWORK",runId:X}),P}}),M=IQ({id:"Agent-Network-Outer-Workflow",inputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:jX,result:U.string().optional(),iteration:U.number(),threadId:U.string().optional(),threadResourceId:U.string().optional(),isOneOff:U.boolean(),verboseIntrospection:U.boolean()}),outputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:jX,prompt:U.string(),result:U.string(),isComplete:U.boolean().optional(),completionReason:U.string().optional(),iteration:U.number(),threadId:U.string().optional(),threadResourceId:U.string().optional(),isOneOff:U.boolean()}),options:{shouldPersistSnapshot:({workflowStatus:R})=>R==="suspended",validateInputs:!1}});return M.then(D).branch([[async({inputData:R})=>!R.isComplete&&R.primitiveType==="agent",A],[async({inputData:R})=>!R.isComplete&&R.primitiveType==="workflow",B],[async({inputData:R})=>!R.isComplete&&R.primitiveType==="tool",O],[async({inputData:R})=>!!R.isComplete,E]]).map({task:{step:[D,A,B,O],path:"task"},isComplete:{step:[A,B,O,E],path:"isComplete"},completionReason:{step:[D,A,B,O,E],path:"completionReason"},result:{step:[A,B,O,E],path:"result"},primitiveId:{step:[D,A,B,O],path:"primitiveId"},primitiveType:{step:[D,A,B,O],path:"primitiveType"},iteration:{step:[D,A,B,O],path:"iteration"},isOneOff:{initData:M,path:"isOneOff"},threadId:{initData:M,path:"threadId"},threadResourceId:{initData:M,path:"threadResourceId"}}).commit(),{networkWorkflow:M,processorRunner:N}}async function o24({networkName:$,requestContext:Y,runId:X,routingAgent:G,routingAgentOptions:J,generateId:Q,maxIterations:W,threadId:K,resourceId:Z,messages:H,validation:z,routing:V,onIterationComplete:F,resumeData:L,autoResumeSuspendedTools:N,mastra:D,structuredOutput:A,onStepFinish:B,onError:O,onAbort:E,abortSignal:M}){let R=await G.getMemory({requestContext:Y});if(!R)throw new G0({id:"AGENT_NETWORK_MEMORY_REQUIRED",domain:"AGENT_NETWORK",category:"USER",text:"Memory is required for the agent network to function properly. Please configure memory for the agent.",details:{status:400}});M$0(R,J?.memory?.options);let q=_99(H),_,P;if(N&&K){let p,h,n,t=await G.getMemory({requestContext:Y});if(await t?.getThreadById({threadId:K})){let K0=await t?.recall({threadId:K,resourceId:Z||$});if(K0&&K0.messages?.length>0)p=([...K0.messages].reverse()?.filter((a)=>a.role==="assistant"))[0];if(p){let{metadata:X0}=p.content;if(X0?.requireApprovalMetadata)h=X0.requireApprovalMetadata;if(X0?.suspendedTools)n=X0.suspendedTools;if(h||n){let Q0=Object.values({...n,...h})[0];if(Q0.resumeSchema)try{let e=await G.getLLM({requestContext:Y}),m=`
            You are an assistant used to resume a suspended tool call.
            Your job is to construct the resumeData for the tool call using the messages available to you and the schema passed.
            You will generate an object that matches this schema: ${Q0.resumeSchema}.
            The resumeData generated should be a JSON value that is constructed from the messages, using the schema as guide. The JSON value is stringified.

            {
              "resumeData": "string"
            }
          `,$0=new l6;$0.addSystem(m),$0.add(q,"user");let Z0=await e.stream({methodType:"generate",requestContext:Y,messageList:$0,agentId:G.id,...e1(J??{}),structuredOutput:{schema:U.object({resumeData:U.string()})}}).object,F0=await Kg0(Z0.resumeData);if(F0!==null&&typeof F0==="object"&&Object.keys(F0).length>0)_=F0,P=Q0.runId}catch(e){D?.getLogger()?.error(`Error generating resume data for network agent ${G.id}`,e)}}}}}let w=P??X,j=_??L,{memory:C,...k}=J||{},{networkWorkflow:S,processorRunner:I}=await T99({networkName:$,requestContext:Y,runId:w,agent:G,routingAgentOptions:k,routingAgentMemoryConfig:C?.options,generateId:Q,routing:V,onStepFinish:B,onError:O,onAbort:E,abortSignal:M}),v=o9({id:"validation-step",inputSchema:S.outputSchema,outputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:jX,prompt:U.string(),result:U.string(),structuredObject:U.any().optional(),isComplete:U.boolean().optional(),completionReason:U.string().optional(),iteration:U.number(),validationPassed:U.boolean().optional(),validationFeedback:U.string().optional()}),execute:async({inputData:p,writer:h})=>{let n=z?.scorers||[],t=await G.getMemory({requestContext:Y}),s=t?await t.recall({threadId:p.threadId||w}):{messages:[]},K0={iteration:p.iteration,maxIterations:W,messages:s.messages,originalTask:p.task,selectedPrimitive:{id:p.primitiveId,type:p.primitiveType},primitivePrompt:p.prompt,primitiveResult:p.result,networkName:$,runId:w,threadId:p.threadId,resourceId:p.threadResourceId,customContext:Y?.toJSON?.()},X0=n.length>0;await h?.write({type:"network-validation-start",payload:{runId:w,iteration:p.iteration,checksCount:X0?n.length:1},from:"NETWORK",runId:X});let a,Q0,e;if(p.result==="Aborted")a={complete:!0,completionReason:"Task aborted",scorers:[],totalDuration:0,timedOut:!1};else if(X0){if(a=await S89({...z,scorers:n},K0),a.complete){let F0=await Zg0({requestContext:Y,agent:G,routingConfig:V,memoryConfig:C?.options});if(A?.schema){let D0=await l24(F0,K0,A,{writer:h,stepId:Q(),runId:w},M,E);Q0=D0.text,e=D0.object}else Q0=await b89(F0,K0,{writer:h,stepId:Q(),runId:w},M,E);await s24({memory:await G.getMemory({requestContext:Y}),finalResult:Q0,threadId:p.threadId||w,resourceId:p.threadResourceId||$,generateId:Q,processorRunner:I,requestContext:Y})}}else{let F0=await Zg0({requestContext:Y,agent:G,routingConfig:V,memoryConfig:C?.options}),D0=await x89(F0,K0,{writer:h,stepId:Q(),runId:w},M,E);if(a={complete:D0.passed,completionReason:D0.reason,scorers:[D0],totalDuration:D0.duration,timedOut:!1},Q0=D0.finalResult,D0.passed&&A?.schema){let O0=await l24(F0,K0,A,{writer:h,stepId:Q(),runId:X},M,E);if(O0.text)Q0=O0.text;e=O0.object}if(D0.passed)await s24({memory:await G.getMemory({requestContext:Y}),finalResult:Q0||D0.finalResult,threadId:p.threadId||w,resourceId:p.threadResourceId||$,generateId:Q,processorRunner:I,requestContext:Y})}let m=W&&p.iteration>=W;await h?.write({type:"network-validation-end",payload:{runId:X,iteration:p.iteration,passed:a.complete,results:a.scorers,duration:a.totalDuration,timedOut:a.timedOut,reason:a.completionReason,maxIterationReached:!!m,suppressFeedback:!!z?.suppressFeedback},from:"NETWORK",runId:w});let $0=a.complete;if(F)await F({iteration:p.iteration,primitiveId:p.primitiveId,primitiveType:p.primitiveType,result:p.result,isComplete:$0});let Y0=k89(a,!!m),Z0=await G.getMemory({requestContext:Y});if(await CD(Z0,[{id:Q(),type:"text",role:"assistant",content:{parts:[{type:"text",text:Y0}],format:2,metadata:{mode:"network",completionResult:{passed:a.complete,suppressFeedback:!!z?.suppressFeedback}}},createdAt:new Date,threadId:p.threadId||w,resourceId:p.threadResourceId||$}],I,{requestContext:Y}),await new Promise((F0)=>setTimeout(F0,10)),$0)return{...p,...Q0?{result:Q0}:{},...e!==void 0?{structuredObject:e}:{},isComplete:!0,validationPassed:!0,completionReason:a.completionReason||"Task complete"};else return{...p,isComplete:!1,validationPassed:!1,validationFeedback:Y0}}}),x=o9({id:"final-step",inputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:jX,prompt:U.string(),result:U.string(),structuredObject:U.any().optional(),isComplete:U.boolean().optional(),completionReason:U.string().optional(),iteration:U.number(),validationPassed:U.boolean().optional(),validationFeedback:U.string().optional()}),outputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:jX,prompt:U.string(),result:U.string(),object:U.any().optional(),isComplete:U.boolean().optional(),completionReason:U.string().optional(),iteration:U.number(),validationPassed:U.boolean().optional()}),execute:async({inputData:p,writer:h})=>{let{structuredObject:n,...t}=p,s={...t,...n!==void 0?{object:n}:{},...W&&p.iteration>=W?{completionReason:`Max iterations reached: ${W}`}:{}};return await h?.write({type:"network-execution-event-finish",payload:s,from:"NETWORK",runId:w}),s}}),y=IQ({id:"iteration-with-validation",inputSchema:S.inputSchema,outputSchema:v.outputSchema,options:{shouldPersistSnapshot:({workflowStatus:p})=>p==="suspended",validateInputs:!1}}).then(S).then(v).commit(),d=IQ({id:"agent-loop-main-workflow",inputSchema:U.object({iteration:U.number(),task:U.string(),primitiveId:U.string(),primitiveType:jX,result:U.string().optional(),threadId:U.string().optional(),threadResourceId:U.string().optional(),isOneOff:U.boolean(),verboseIntrospection:U.boolean()}),outputSchema:U.object({task:U.string(),primitiveId:U.string(),primitiveType:jX,prompt:U.string(),result:U.string(),isComplete:U.boolean().optional(),completionReason:U.string().optional(),iteration:U.number(),validationPassed:U.boolean().optional()}),options:{shouldPersistSnapshot:({workflowStatus:p})=>p==="suspended",validateInputs:!1}}).dountil(y,async({inputData:p})=>{let h=p.isComplete===!0,n=p.validationPassed!==!1,t=Boolean(W&&p.iteration>=W);return h&&n||t}).then(x).commit(),u=G.getMastraInstance();if(u)d.__registerMastra(u),S.__registerMastra(u);let b=await d.createRun({runId:w}),{thread:g}=await j99({requestContext:Y,threadId:K||b.runId,resourceId:Z||$,messages:H,routingAgent:G,generateId:Q,...e1(J??{}),memoryConfig:C?.options});return new _69({run:b,createStream:()=>{if(j)return b.resumeStream({resumeData:j,requestContext:Y}).fullStream;return b.stream({inputData:{task:q,primitiveId:"",primitiveType:"none",iteration:-1,threadResourceId:g?.resourceId,threadId:g?.id,isOneOff:!1,verboseIntrospection:!0},requestContext:Y}).fullStream}})}async function k99($,Y){let X=Y?.requestContext??new p1;if(!await $.getMemory({requestContext:X}))return null;let J=X.get(DX),Q=X.get(eX),W=typeof Y?.memory?.thread==="string"?Y.memory.thread:Y?.memory?.thread?.id,K=J??W,Z=Q??Y?.memory?.resource,H=K||Z?`${K??""}|${Z??""}`:null;return{threadId:K,resourceId:Z,scopeKey:H}}function v99($){let Y=$.map((J)=>{let Q=J.payload??{};return{toolCallId:Q.toolCallId,toolName:Q.toolName,isSuspended:!!Q.suspendedAt}}).filter((J)=>!!J.toolCallId),X=Y.filter((J)=>!J.isSuspended).map((J)=>`${J.toolCallId} (${J.toolName})`).join(", "),G=Y.filter((J)=>J.isSuspended).map((J)=>`${J.toolCallId} (${J.toolName})`).join(", ");return`Background task(s) you previously dispatched have completed. Process ONLY these tool-call IDs (their results are now in the conversation): ${X}. IMPORTANT: Do NOT process any tool-call IDs that were not in the list, and do NOT call the same tool again \u2014 the result is already available. Use these result(s) to answer the user's original question.IMPORTANT: The following tool-call IDs are suspended: ${G}. Do not attempt to resume them; let the user know they are waiting for explicit resume input.`}function x99($,Y,X){let G=v99(X);return{...$,context:[...Y??[],{role:"user",content:G}]}}function y99($,Y,X){if(!Y)return;$.get(Y)?.(),$.set(Y,X)}function b99($,Y,X){if(!Y)return;if($.get(Y)===X)$.delete(Y)}async function lK4($,Y,X,G){let{maxIdleMs:J,...Q}=Y??{},W=await $.getDefaultOptions({requestContext:Y?.requestContext}),K=tz(W,Q??{}),Z=await k99($,K);if(!X.bgManager||!Z)return G(Q);let{threadId:H,resourceId:z,scopeKey:V}=Z,F=J??300000,L={...Q??{},onFinish:void 0,_skipBgTaskWait:!0},N={...Q??{},_skipBgTaskWait:!0},D=new Set,A=[],B=new Set,O=!1,E=!1,M,R,q=new AbortController,_=()=>{if(E)return;if(E=!0,M)clearTimeout(M),M=void 0;q.abort();try{R.close()}catch{}b99(X.activeStreams,V,_)},P=()=>{if(E)return;if(O)return;if(D.size>0)return;if(A.length>0)return;_()},w=()=>{if(M)clearTimeout(M),M=void 0},j=()=>{if(E)return;if(w(),O)return;if(D.size===0)return;if(A.length>0)return;M=setTimeout(_,F)},C=async(y)=>{let d=y.getReader();try{while(!0){if(q.signal.aborted)break;let{done:u,value:b}=await d.read();if(u)break;w();try{R.enqueue(b)}catch{break}if(b&&typeof b==="object"&&b.type==="background-task-started"){let g=b.payload?.taskId;if(g)D.add(g)}}}finally{d.releaseLock()}},k=async()=>{if(O||E||A.length===0)return;O=!0;try{let y=A.splice(0,A.length);for(let b of y){let g=b.payload?.taskId,p=b.type;if(g&&p)B.add(`${g}:${p}`)}let d=x99(L,Q?.context,y),u=await $.stream([],d);await C(u.fullStream)}catch(y){try{R.error(y)}catch{}}finally{if(O=!1,A.length>0)k();else P(),j()}};y99(X.activeStreams,V,_),Y?.abortSignal?.addEventListener("abort",_);let S=new ReadableStream({start(y){R=y},cancel(){E=!0,q.abort(),w()}}),v=X.bgManager.stream({agentId:$.id,threadId:H,resourceId:z,abortSignal:q.signal}).getReader();(async()=>{try{while(!0){if(q.signal.aborted)break;let{done:y,value:d}=await v.read();if(y)break;let u=d;if(!u||typeof u!=="object"||typeof u.type!=="string")continue;let b=u.payload?.taskId,g=b&&t24.has(u.type)?`${b}:${u.type}`:void 0;if(g&&B.has(g))continue;j();try{R.enqueue(u)}catch{break}if(!b)continue;if(u.type==="background-task-running"||u.type==="background-task-resumed")D.add(b);else if(t24.has(u.type))D.delete(b),A.push(u),k()}}catch{}finally{v.releaseLock()}})(),O=!0,w();let x;try{x=await G(N)}catch(y){throw _(),y}return(async()=>{try{await C(x.fullStream)}catch(y){try{R.error(y)}catch{}}if(O=!1,A.length>0)k();else P(),j()})(),new Proxy(x,{get(y,d){if(d==="fullStream")return S;let u=Reflect.get(y,d,y);return typeof u==="function"?u.bind(y):u}})}async function h99($,Y,X,G){return lK4($,X,G,(J)=>$.stream(Y,J))}async function f99($,Y,X,G){return lK4($,X,G,(J)=>$.resumeStream(Y,J))}function of0($,Y,X){return{...$&&typeof $==="object"?$:{},resource:$?.resource??Y,thread:$?.thread??X}}function iK4($){if($==="generate"||$==="generateLegacy")return"generate";else if($==="stream"||$==="streamLegacy")return"stream";else throw new G0({id:"INVALID_METHOD_TYPE",domain:"AGENT",category:"USER"})}function p99({capabilities:$,options:Y,resourceId:X,threadId:G,runId:J,requestContext:Q,memory:W,memoryConfig:K,agentSpan:Z,agentId:H,methodType:z,saveQueueManager:V}){return async({inputData:F,bail:L,...N})=>{let D=F["prepare-tools-step"],A=F["prepare-memory-step"],B=!1,O={...Y,tools:D.convertedTools,toolChoice:Y.toolChoice,thread:A.thread,threadId:A.thread?.id??G,resourceId:X,requestContext:Q,onStepFinish:async(j)=>{if(Y.savePerStep&&!K?.observationalMemory&&!K?.readOnly){if(!A.threadExists&&!B&&W&&A.thread)await W.createThread({threadId:A.thread?.id,title:A.thread?.title,metadata:A.thread?.metadata,resourceId:A.thread?.resourceId,memoryConfig:K}),B=!0;if(V&&A.thread?.id)await V.flushMessages(A.messageList,A.thread.id,K)}return Y.onStepFinish?.({...j,runId:J})},...A.tripwire&&{tripwire:A.tripwire}};if(O.tripwire)try{let j=await $.getModel({requestContext:O.requestContext});if(!ZG(j))throw new G0({id:"MAP_RESULTS_STEP_UNSUPPORTED_MODEL",domain:"AGENT",category:"USER",text:"Tripwire handling requires a v2/v3 model"});let C=await e99({tripwire:A.tripwire,runId:J,...g4({currentSpan:Z}),options:Y,model:j,messageList:A.messageList});return Z?.end({output:{tripwire:A.tripwire},attributes:{tripwireAbort:{reason:A.tripwire?.reason,processorId:A.tripwire?.processorId,retry:A.tripwire?.retry,metadata:A.tripwire?.metadata}}}),L(C)}catch(j){throw Z?.error({error:j,endSpan:!0,attributes:{tripwireAbort:{reason:A.tripwire?.reason,processorId:A.tripwire?.processorId,retry:A.tripwire?.retry,metadata:A.tripwire?.metadata}}}),j}let E=$.outputProcessors?typeof $.outputProcessors==="function"?await $.outputProcessors({requestContext:O.requestContext,overrides:Y.outputProcessors}):Y.outputProcessors||$.outputProcessors:Y.outputProcessors||[];if(Y.structuredOutput?.model){let j=new WK4({...Y.structuredOutput,logger:$.logger});if($.mastra)j.__registerMastra($.mastra);if(Y.structuredOutput.useAgent)j.setAgent($.agent);E=E?[...E,j]:[j]}let M=$.inputProcessors?typeof $.inputProcessors==="function"?await $.inputProcessors({requestContext:O.requestContext,overrides:Y.inputProcessors}):Y.inputProcessors||$.inputProcessors:Y.inputProcessors||[],R=$.llmRequestInputProcessors?typeof $.llmRequestInputProcessors==="function"?await $.llmRequestInputProcessors({requestContext:O.requestContext,overrides:Y.inputProcessors}):Y.inputProcessors||$.llmRequestInputProcessors:M,q=$.errorProcessors?typeof $.errorProcessors==="function"?await $.errorProcessors({requestContext:O.requestContext,overrides:Y.errorProcessors}):Y.errorProcessors||$.errorProcessors:Y.errorProcessors||[],_=A.messageList;return{methodType:iK4(z),agentId:H,requestContext:O.requestContext,...g4({currentSpan:Z}),runId:J,toolChoice:O.toolChoice,tools:O.tools,resourceId:O.resourceId,threadId:O.threadId,stopWhen:O.stopWhen,maxSteps:O.maxSteps,providerOptions:O.providerOptions,includeRawChunks:Y.includeRawChunks,options:{...Y.prepareStep&&{prepareStep:Y.prepareStep},onFinish:async(j)=>{if(j.finishReason==="error"){let k=j.model?.provider,S=j.model?.modelId,I=j.error instanceof Error?j.error:new G0({id:"AGENT_STREAM_ERROR",text:j.error==null?'Agent stream finished with finishReason "error" but no error payload was provided':void 0,domain:"AGENT",category:"SYSTEM",details:{runId:J,...k&&{provider:k},...S&&{modelId:S}}},j.error);if(M7.isInstance(I))$.logger.error("Upstream LLM API error",{error:I,runId:J,...k&&{provider:k},...S&&{modelId:S}});else $.logger.error("Error in agent stream",{error:I,runId:J,...k&&{provider:k},...S&&{modelId:S}});Z?.error({error:I,endSpan:!0});return}if(!Y.abortSignal?.aborted)try{let k=Y.structuredOutput?.schema&&j.object!=null?JSON.stringify(j.object):j.text??"";await $.executeOnFinish({result:j,outputText:k,thread:O.thread,threadId:O.threadId,readOnlyMemory:K?.readOnly,resourceId:X,memoryConfig:K,requestContext:Q,agentSpan:Z,runId:J,messageList:_,threadExists:A.threadExists,structuredOutput:!!Y.structuredOutput?.schema,overrideScorers:Y.scorers})}catch(k){$.logger.error("Error saving memory on finish",{error:k,runId:J});let S=k instanceof Error?k:new G0({id:"AGENT_ON_FINISH_ERROR",domain:"AGENT",category:"SYSTEM",details:{runId:J}},k);Z?.error({error:S,endSpan:!0})}else Z?.end();await Y?.onFinish?.({...j,runId:J,messages:_.get.response.aiV5.model(),usage:j.usage,totalUsage:j.totalUsage})},onStepFinish:O.onStepFinish,onChunk:Y.onChunk,onError:Y.onError,onAbort:Y.onAbort,abortSignal:Y.abortSignal},activeTools:Y.activeTools,structuredOutput:Y.structuredOutput,inputProcessors:M,llmRequestInputProcessors:R,outputProcessors:E,errorProcessors:q,modelSettings:{...Y.modelSettings||{}},messageList:A.messageList,initialSignalEchoes:A.initialSignalEchoes,maxProcessorRetries:Y.maxProcessorRetries,isTaskComplete:Y.isTaskComplete,onIterationComplete:Y.onIterationComplete,processorStates:A.processorStates}}}function e24($,Y,X){if(!Y)return;if(Array.isArray(Y))for(let G of Y)$.addSystem(G,X);else $.addSystem(Y,X)}function $K4($){let Y=$.makeMessageSourceChecker().input;return $.get.all.db().filter((X)=>X.role==="signal"&&Y.has(X.id)).map(r60)}function n99({capabilities:$,options:Y,threadFromArgs:X,resourceId:G,runId:J,requestContext:Q,instructions:W,memoryConfig:K,memory:Z,isResume:H}){return o9({id:"prepare-memory-step",inputSchema:U.object({}),outputSchema:i99,execute:async({...z})=>{let V=e1(z),F=X,L=new l6({threadId:F?.id,resourceId:G,generateMessageId:$.generateMessageId,logger:$.logger,filterIncompleteToolCalls:K?.filterIncompleteToolCalls,_agentNetworkAppend:$._agentNetworkAppend}),N=new Map;if(e24(L,W),L.add(Y.context||[],"context"),e24(L,Y.system,"user-provided"),!Z||!F?.id&&!G){L.add(Y.messages,"input");let E=$K4(L),M;if(!H)({tripwire:M}=await $.runInputProcessors({requestContext:Q,...V,messageList:L,inputProcessorOverrides:Y.inputProcessors,processorStates:N}));return{threadExists:!1,thread:F,messageList:L,processorStates:N,tripwire:M,initialSignalEchoes:E}}if(!F?.id||!G){let E=new G0({id:"AGENT_MEMORY_MISSING_RESOURCE_ID",domain:"AGENT",category:"USER",details:{agentName:$.agentName,threadId:F?.id||"",resourceId:G||""},text:`A resourceId and a threadId must be provided when using Memory. Saw threadId "${F?.id}" and resourceId "${G}"`});throw $.logger.trackException(E),E}let D=void 0,A=await Z.getThreadById({threadId:F?.id});if(A)if(!A.metadata&&F.metadata||F.metadata&&!(0,d99.default)(A.metadata,F.metadata))D=await Z.saveThread({thread:{...A,metadata:F.metadata},memoryConfig:K});else D=A;else D=await Z.createThread({threadId:F?.id,metadata:F.metadata,title:F.title,memoryConfig:K,resourceId:G,saveThread:!0});Q.set("MastraMemory",{thread:D,resourceId:G,memoryConfig:K}),L.add(Y.messages,"input");let B=$K4(L),O;if(!H)({tripwire:O}=await $.runInputProcessors({requestContext:Q,...V,messageList:L,inputProcessorOverrides:Y.inputProcessors,processorStates:N}));return{thread:D,messageList:L,processorStates:N,tripwire:O,initialSignalEchoes:B,threadExists:!!A}}})}function r99({capabilities:$,options:Y,threadFromArgs:X,resourceId:G,runId:J,requestContext:Q,agentSpan:W,methodType:K,memory:Z,backgroundTaskEnabled:H}){return o9({id:"prepare-tools-step",inputSchema:U.object({}),outputSchema:l99,execute:async()=>{let z=X?.id,V=await $.convertTools({toolsets:Y?.toolsets,clientTools:Y?.clientTools,threadId:z,resourceId:G,runId:J,requestContext:Q,...g4({currentSpan:W}),outputWriter:Y.outputWriter,methodType:K,memoryConfig:Y.memory?.options,autoResumeSuspendedTools:Y.autoResumeSuspendedTools,delegation:Y.delegation,backgroundTaskEnabled:H,inputProcessors:Y.inputProcessors}),F=Object.keys(V);if(F.length>0)W?.update({attributes:{availableTools:F}});return{convertedTools:V}}})}function a99({capabilities:$,runId:Y,returnScorerData:X,requireToolApproval:G,toolCallConcurrency:J,resumeContext:Q,agentId:W,agentName:K,toolCallId:Z,methodType:H,saveQueueManager:z,memoryConfig:V,memory:F,resourceId:L,autoResumeSuspendedTools:N,workspace:D,backgroundTaskManager:A,agentBackgroundConfig:B,toolPayloadTransform:O,skipBgTaskWait:E,drainPendingSignals:M}){return o9({id:"stream-text-step",inputSchema:U.any(),outputSchema:U.instanceof(uT),execute:async({inputData:R,...q})=>{let _=R,P=_.outputProcessors||($.outputProcessors?typeof $.outputProcessors==="function"?await $.outputProcessors({requestContext:_.requestContext||new p1}):$.outputProcessors:[]),w=iK4(H);return $.llm.stream({..._,outputProcessors:P,returnScorerData:X,...e1(q),requireToolApproval:G,toolCallConcurrency:J,resumeContext:Q,_internal:{generateId:$.generateMessageId,saveQueueManager:z,memoryConfig:V,threadId:_.threadId,resourceId:L,memory:F,backgroundTaskManager:A,agentBackgroundConfig:B,backgroundTaskManagerConfig:A?.config,toolPayloadTransform:O,skipBgTaskWait:E,drainPendingSignals:M,initialSignalEchoes:_.initialSignalEchoes},agentId:W,agentName:K,toolCallId:Z,methodType:w,autoResumeSuspendedTools:N,workspace:D})}})}function s99({capabilities:$,options:Y,threadFromArgs:X,resourceId:G,runId:J,requestContext:Q,agentSpan:W,methodType:K,instructions:Z,memoryConfig:H,memory:z,returnScorerData:V,saveQueueManager:F,requireToolApproval:L,toolCallConcurrency:N,resumeContext:D,agentId:A,agentName:B,toolCallId:O,workspace:E,backgroundTaskManager:M,agentBackgroundConfig:R,toolPayloadTransform:q,skipBgTaskWait:_,drainPendingSignals:P}){let w=r99({capabilities:$,options:Y,threadFromArgs:X,resourceId:G,runId:J,requestContext:Q,agentSpan:W,methodType:K,memory:z,backgroundTaskEnabled:M?.config?.enabled}),j=n99({capabilities:$,options:Y,threadFromArgs:X,resourceId:G,runId:J,requestContext:Q,instructions:Z,memoryConfig:H,memory:z,isResume:!!D}),C=a99({capabilities:$,runId:J,returnScorerData:V,requireToolApproval:L,toolCallConcurrency:N,resumeContext:D,agentId:A,agentName:B,toolCallId:O,methodType:K,saveQueueManager:F,memoryConfig:H,memory:z,resourceId:G,autoResumeSuspendedTools:Y.autoResumeSuspendedTools,workspace:E,backgroundTaskManager:M,agentBackgroundConfig:R,toolPayloadTransform:q,skipBgTaskWait:_,drainPendingSignals:P}),k=p99({capabilities:$,options:Y,resourceId:G,threadId:X?.id,runId:J,requestContext:Q,memory:z,memoryConfig:H,agentSpan:W,agentId:A,methodType:K,saveQueueManager:F});return IQ({id:"execution-workflow",inputSchema:U.object({}),outputSchema:U.instanceof(uT),steps:[w,j,C],options:{tracingPolicy:{internal:1},validateInputs:!1}}).parallel([w,j]).map(k).then(C).commit()}function t2($,Y){if($ instanceof Promise||$!=null&&typeof $.then==="function")return Promise.resolve($).then(Y);return Y($)}function o99($){let Y=$,X=[],G=new Set,J=(W)=>{if(!W||G.has(W))return;G.add(W),X.push(W)},Q=(W)=>{if(Array.isArray(W)){W.forEach(J);return}Object.values(W??{}).forEach(J)};Q(Y.steps),Q(Y.children);for(let W of Y.stepGraph??[]){J(W.step);for(let K of W.steps??[])J(K&&typeof K==="object"&&"step"in K?K.step:K)}return X}function Lg0($,Y){return $.some((X)=>{let G=X,J=V9(X),Q=[...Object.values(G.steps??{}),...(G.stepGraph??[]).flatMap((W)=>{if(W.type==="step")return W.step?[W.step]:[];return W.steps?.map((K)=>K.step).filter(Boolean)??[]})];if(!J||Q.length===0){let W=typeof X.id==="string"&&X.id.startsWith("processor:")?X.id.slice(10):X.id;return Y({...X,id:W,providesSkillDiscovery:X.providesSkillDiscovery})}return Q.some((W)=>{if(V9(W))return Lg0([W],Y);let K=typeof W.id==="string"?W.id:void 0;if(!K?.startsWith("processor:"))return!1;let Z=K.slice(10);return Y({id:Z,providesSkillDiscovery:W.providesSkillDiscovery})})})}function YK4($){return Lg0($,(Y)=>Y.id==="skills-processor")}function XK4($){return Lg0($,(Y)=>Y.providesSkillDiscovery==="on-demand")}function t99($){return new Proxy($,{get(Y,X,G){let J=Reflect.get(Y,X,Y);if(typeof J==="function")return J.bind(Y);return J}})}function nK4($){if(typeof $==="function")return!0;if(Array.isArray($))return $.some((Y)=>nK4(Y.model??Y));if(typeof $==="string")return $.startsWith("anthropic")&&GK4.test($);if($&&typeof $==="object"&&"provider"in $&&"modelId"in $){let{provider:Y,modelId:X}=$;return Y.startsWith("anthropic")&&GK4.test(X)}return!0}async function ID($,Y){if(!$.onViolation)return;try{let X={processorId:Y.processorId??$.id,message:Y.message,detail:Y.options?.metadata};await $.onViolation(X)}catch{}}function i3($,Y){if($===Y)return!0;if(!$||!Y)return $===Y;return $.length===Y.length&&$.every((X,G)=>YD(X,Y[G]))}function am($){return async(Y)=>{let X=Wj(Y);return $.rotateResponseMessageId?.(),$.messageList.add(X.toDBMessage(),"input"),await $.writer?.custom(X.toDataPart()),X}}function Y59($){let Y=pO($.model),X=GD($.tools),G=cO($.toolChoice,$.tools),J=dO($.activeTools,$.tools);return{messages:$.messages,systemMessages:$.systemMessages,stepNumber:$.stepNumber,...$.messageId?{messageId:$.messageId}:{},retryCount:$.retryCount,...Y?{model:Y}:{},...X?{tools:X}:{},...G?{toolChoice:G}:{},...J?{activeTools:J}:{}}}function X59($){let Y={};if(!i3($.beforeMessages,$.messages))Y.messages=$.messages;if(!i3($.beforeSystemMessages,$.systemMessages))Y.systemMessages=$.systemMessages;if($.afterStepInput.messageId!==$.beforeStepInput.messageId)Y.messageId=$.afterStepInput.messageId;if($.result.model!==void 0||$.afterStepInput.model!==$.beforeStepInput.model){let X=pO($.afterStepInput.model);if(X)Y.model=X}if($.result.tools!==void 0||$.afterStepInput.tools!==$.beforeStepInput.tools){let X=GD($.afterStepInput.tools);if(X)Y.tools=X}if($.result.toolChoice!==void 0||$.afterStepInput.toolChoice!==$.beforeStepInput.toolChoice||$.afterStepInput.tools!==$.beforeStepInput.tools){let X=cO($.afterStepInput.toolChoice,$.afterStepInput.tools);if(X)Y.toolChoice=X}if($.result.activeTools!==void 0||$.afterStepInput.activeTools!==$.beforeStepInput.activeTools||$.afterStepInput.tools!==$.beforeStepInput.tools){let X=dO($.afterStepInput.activeTools,$.afterStepInput.tools);if(X)Y.activeTools=X}if($.result.retryCount!==void 0)Y.retryCount=$.result.retryCount;return Y}var JK4,QK4,f$=class{status={type:"pending"};_promise;_resolve=void 0;_reject=void 0;get promise(){if(this._promise)return this._promise;return this._promise=new Promise(($,Y)=>{if(this.status.type==="resolved")$(this.status.value);else if(this.status.type==="rejected")Y(this.status.error);this._resolve=$,this._reject=Y}),this._promise}resolve($){if(this.status={type:"resolved",value:$},this._promise)this._resolve?.($)}reject($){if(this.status={type:"rejected",error:$},this._promise)this._reject?.($)}},_69,hT="structured-output",WK4=class{id=hT;name="Structured Output";schema;structuringAgent;structuringModel;structuringInstructions;agent;useAgent=!1;errorStrategy;fallbackValue;isStructuringAgentStreamStarted=!1;jsonPromptInjection;providerOptions;logger;constructor($){if(!$.schema)throw new G0({id:"STRUCTURED_OUTPUT_PROCESSOR_SCHEMA_REQUIRED",domain:"AGENT",category:"USER",text:"StructuredOutputProcessor requires a schema to be provided"});if(!$.model)throw new G0({id:"STRUCTURED_OUTPUT_PROCESSOR_MODEL_REQUIRED",domain:"AGENT",category:"USER",text:"StructuredOutputProcessor requires a model to be provided either in options or as fallback"});this.schema=$.schema,this.structuringModel=$.model,this.useAgent=$.useAgent??!1,this.errorStrategy=$.errorStrategy??"strict",this.fallbackValue=$.fallbackValue,this.jsonPromptInjection=$.jsonPromptInjection,this.providerOptions=$.providerOptions,this.logger=$.logger,this.structuringInstructions=$.instructions||this.generateInstructions(),this.structuringAgent=new YJ({id:"structured-output-structurer",name:"structured-output-structurer",instructions:this.structuringInstructions,model:$.model,options:{tracingPolicy:{internal:15}}})}__registerMastra($){this.structuringAgent.__registerMastra($)}setAgent($){this.agent=$}async processOutputStream($){let{part:Y,state:X,streamParts:G,abort:J,requestContext:Q,messageList:W,...K}=$,Z=e1(K),H=X.controller;switch(Y.type){case"finish":return await this.processAndEmitStructuredOutput(G,H,J,Z,Q,W),Y;default:return Y}}async processAndEmitStructuredOutput($,Y,X,G,J,Q){if(this.isStructuringAgentStreamStarted)return;this.isStructuringAgentStreamStarted=!0;try{let W=await this.getStructuringStream($,J,Q,G),K=["start","finish","text-start","text-delta","text-end","step-start","step-finish"];for await(let Z of W.fullStream){if(K.includes(Z.type)||Z.type.startsWith("data-"))continue;if(Z.type==="error"){if(this.handleError("Structuring failed",Z.payload.error,X),this.errorStrategy==="warn")break;if(this.errorStrategy==="fallback"&&this.fallbackValue!==void 0){let z={runId:Z.runId,from:"AGENT",type:"object-result",object:this.fallbackValue,metadata:{from:"structured-output",fallback:!0}};Y?.enqueue(z);break}}let H={...Z,metadata:{from:"structured-output"}};Y?.enqueue(H)}}catch(W){this.handleError("Structured output processing failed",W,X)}}async getStructuringStream($,Y,X,G){let J=Y?.get(DX),Q=Y?.get(eX),W=X?.serialize().memoryInfo,K=typeof J==="string"?J:typeof W?.threadId==="string"?W.threadId:void 0,Z=typeof Q==="string"?Q:typeof W?.resourceId==="string"?W.resourceId:void 0;if(this.useAgent&&this.agent&&K){let H={role:"user",content:[{type:"text",text:"Extract and structure information from the conversation so far. keep the original meaning and details. Rely on the provided text and conversation history"}]},z=[...X?.get?.input?.db()||[],...X?.get?.response?.db()||[],H],V=Y?new p1(Y.entries()):void 0;return this.agent.stream(z,{model:this.structuringModel,requestContext:V,toolChoice:"none",structuredOutput:{schema:this.schema,jsonPromptInjection:this.jsonPromptInjection},memory:{thread:K,...Z?{resource:Z}:{},options:{readOnly:!0}},providerOptions:this.providerOptions,...G})}return this.structuringAgent.stream(`Extract and structure the key information from the following text according to the specified schema. Keep the original meaning and details. Rely on the provided text and conversation history.

${this.buildStructuringPrompt($)}`,{structuredOutput:{schema:this.schema,jsonPromptInjection:this.jsonPromptInjection},providerOptions:this.providerOptions,...G})}buildStructuringPrompt($){let Y=[],X=[],G=[],J=[];for(let W of $)switch(W.type){case"text-delta":Y.push(W.payload.text);break;case"reasoning-delta":X.push(W.payload.text);break;case"tool-call":G.push(W);break;case"tool-result":J.push(W);break}let Q=[];if(X.length>0)Q.push(`# Assistant Reasoning
${X.join("")}`);if(G.length>0){let W=G.map((K)=>{let Z=typeof K.payload.args==="object"?JSON.stringify(K.payload.args,null):K.payload.args,H=K.payload.output!==void 0?`${typeof K.payload.output==="object"?JSON.stringify(K.payload.output,null):K.payload.output}`:"";return`## ${K.payload.toolName}
### Input: ${Z}
### Output: ${H}`}).join(`
`);Q.push(`# Tool Calls
${W}`)}if(J.length>0){let W=J.map((K)=>{let Z=K.payload.result;if(Z===void 0||Z===null)return`${K.payload.toolName}: null`;return`${K.payload.toolName}: ${typeof Z==="object"?JSON.stringify(Z,null,2):Z}`}).join(`
`);Q.push(`# Tool Results
${W}`)}if(Y.length>0)Q.push(`# Assistant Response
${Y.join("")}`);return Q.join(`

`)}generateInstructions(){return`You are a data structuring specialist. Your job is to convert unstructured text into a specific JSON format.

TASK: Convert the provided unstructured text into valid JSON that matches the following schema:

REQUIREMENTS:
- Return ONLY valid JSON, no additional text or explanation
- Extract relevant information from the input text
- If information is missing, use reasonable defaults or null values
- Maintain data types as specified in the schema
- Be consistent and accurate in your conversions

The input text may be in any format (sentences, bullet points, paragraphs, etc.). Extract the relevant data and structure it according to the schema.`}handleError($,Y,X){let G=this.getErrorMessage(Y),J=`[StructuredOutputProcessor] ${$}: ${G}`;switch(this.errorStrategy){case"strict":this.logger?.error(J,Y),X(J);break;case"warn":this.logger?.warn(J,Y);break;case"fallback":this.logger?.info(`${J} (using fallback)`,Y);break}}getErrorMessage($){if($&&typeof $==="object"&&"message"in $&&typeof $.message==="string")return $.message;if($ instanceof Error)return $.message;return String($)}},KK4=class{id="skills-processor";name="Skills Processor";_workspace;_format;constructor($){this._workspace=$.workspace,this._format=$.format??"xml"}get skills(){return this._workspace.skills}async listSkills(){let $=await this.skills?.list();if(!$)return[];return $.map((Y)=>({name:Y.name,description:Y.description,license:Y.license}))}formatLocation($){return`${$.path}/SKILL.md`}formatSourceType($){return $.source.type}async formatAvailableSkills(){let $=await this.skills?.list();if(!$||$.length===0)return"";let Y=$.map((J)=>this.skills?.get(J.path)),X=(await Promise.all(Y)).filter((J)=>J!==void 0&&J!==null),G=Array.from(new Map(X.map((J)=>[J.path,J])).values());switch(G.sort((J,Q)=>J.name.localeCompare(Q.name)),this._format){case"xml":return`<available_skills>
${G.map((Q)=>`  <skill>
    <name>${this.escapeXml(Q.name)}</name>
    <description>${this.escapeXml(Q.description)}</description>
    <location>${this.escapeXml(this.formatLocation(Q))}</location>
    <source>${this.escapeXml(this.formatSourceType(Q))}</source>
  </skill>`).join(`
`)}
</available_skills>`;case"json":return`Available Skills:

${JSON.stringify(G.map((J)=>({name:J.name,description:J.description,location:this.formatLocation(J),source:this.formatSourceType(J)})),null,2)}`;case"markdown":return`# Available Skills

${G.map((Q)=>`- **${Q.name}** [${this.formatSourceType(Q)}] (${this.formatLocation(Q)}): ${Q.description}`).join(`
`)}`;default:return this._format}}escapeXml($){return $.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}async processInputStep({messageList:$,stepNumber:Y,requestContext:X}){if(Y===0)await this.skills?.maybeRefresh({requestContext:X});let G=await this.skills?.list();if(G&&G.length>0){let Q=await this.formatAvailableSkills();if(Q)$.addSystem({role:"system",content:Q});$.addSystem({role:"system",content:'IMPORTANT: Skills are NOT tools. Do not call skill names directly as tool names. To use a skill, call the `skill` tool with the skill name as the "name" parameter. If multiple skills share the same name, use the skill path (shown in the location field) instead of the name to disambiguate. When a user asks about a topic covered by an available skill, activate it immediately without asking for permission first.'})}}},ZK4=class{id="workspace-instructions-processor";name="Workspace Instructions Processor";_workspace;constructor($){this._workspace=$.workspace}async processInputStep({messageList:$,requestContext:Y}){let X=this._workspace.getInstructions({requestContext:Y});if(X)$.addSystem({role:"system",content:X});return{messageList:$}}},j69=1,T69,I69,C69,h69=class{id="stream-error-retry-processor";name="Stream Error Retry Processor";#$;#Y;constructor($={}){this.#$=$.maxRetries??j69,this.#Y=[...C69,...$.matchers??[]]}async processAPIError({error:$,retryCount:Y}){if(Y>=this.#$)return;if(!b69($,this.#Y))return;return{retry:!0}}},b24,HK4,Ug0,$g0="<working_memory>",Yg0="</working_memory>",em=class{id="message-history";name="MessageHistory";storage;lastMessages;constructor($){this.storage=$.storage,this.lastMessages=$.lastMessages}getMemoryContext($,Y){let X=n3($);if(X?.thread?.id)return{threadId:X.thread.id,resourceId:X.resourceId};let G=Y.serialize();if(G.memoryInfo?.threadId)return{threadId:G.memoryInfo.threadId,resourceId:G.memoryInfo.resourceId};return null}createMemorySpan($,Y,X,G){let J=Y?.tracingContext?.currentSpan;if(!J)return;return J.createChildSpan({type:"memory_operation",name:`memory: ${$}`,entityType:J6.MEMORY,entityName:"Memory",input:X,attributes:{operationType:$,...G}})}async processInput($){let{messageList:Y,requestContext:X,...G}=$,J=this.getMemoryContext(X,Y);if(!J)return Y;let{threadId:Q,resourceId:W}=J,K=this.createMemorySpan("recall",G,{threadId:Q,resourceId:W},{lastMessages:this.lastMessages});try{let H=(await this.storage.listMessages({threadId:Q,resourceId:W,page:0,perPage:this.lastMessages,orderBy:{field:"createdAt",direction:"DESC"}})).messages.filter((N)=>{return N.role!=="system"}),z=Y.get.all.db(),V=new Set(z.map((N)=>N.id).filter(Boolean)),L=H.filter((N)=>!N.id||!V.has(N.id)).reverse();if(L.length===0)return K?.end({output:{success:!0},attributes:{messageCount:0}}),Y;for(let N of L)if(N.role==="system")continue;else Y.add(N,"memory");return K?.end({output:{success:!0},attributes:{messageCount:L.length}}),Y}catch(Z){throw K?.error({error:Z,endSpan:!0}),Z}}filterMessagesForPersistence($){return $.filter((Y)=>Y.role!=="system").map((Y)=>{let X={...Y};if(Y.content&&typeof Y.content==="object"&&!Array.isArray(Y.content))X.content={...Y.content};if(typeof X.content?.content==="string"&&X.content.content.length>0)X.content.content=Xg0(X.content.content).trim();if(Array.isArray(X.content?.parts)){if(X.content.parts=X.content.parts.map((G)=>{if(G.type==="tool-invocation"&&G.toolInvocation.state==="partial-call")return null;if(G.type==="tool-invocation"&&G.toolInvocation.toolName==="updateWorkingMemory")return null;if(G.type==="text"){let J=typeof G.text==="string"?G.text:"";return{...G,text:Xg0(J).trim()}}return G}).filter((G)=>Boolean(G)),X.content.parts.length===0)return null}return X}).filter((Y)=>Boolean(Y))}async processOutputResult($){let{messageList:Y,requestContext:X,...G}=$,J=this.getMemoryContext(X,Y),W=n3(X)?.memoryConfig?.readOnly;if(!J||W)return Y;let{threadId:K,resourceId:Z}=J,H=Y.get.input.db(),z=Y.get.response.db(),V=[...H,...z];if(V.length===0)return Y;let F=this.createMemorySpan("save",G,void 0,{messageCount:V.length});try{return await this.persistMessages({messages:V,threadId:K,resourceId:Z}),await new Promise((L)=>setTimeout(L,10)),F?.end({output:{success:!0}}),Y}catch(L){throw F?.error({error:L,endSpan:!0}),L}}async persistMessages($){let{messages:Y,threadId:X,resourceId:G}=$;if(Y.length===0)return;let J=this.filterMessagesForPersistence(Y);if(J.length===0)return;let Q=await this.storage.getThreadById({threadId:X});if(Q)await this.storage.updateThread({id:X,title:Q.title||"",metadata:Q.metadata||{}});else await this.storage.saveThread({thread:{id:X,resourceId:G||X,title:"",metadata:{},createdAt:new Date,updatedAt:new Date}});await this.storage.saveMessages({messages:J})}},zK4=class{constructor($){this.options=$,this.logger=$.logger}options;id="working-memory";name="WorkingMemory";defaultWorkingMemoryTemplate=`
# User Information
- **First Name**: 
- **Last Name**: 
- **Location**: 
- **Occupation**: 
- **Interests**: 
- **Goals**: 
- **Events**: 
- **Facts**: 
- **Projects**: 
`;logger;async processInput($){let{messageList:Y,requestContext:X}=$,G=n3(X),J=G?.thread?.id,Q=G?.resourceId;if(!J&&!Q)return Y;let W=this.options.scope||"resource",K=null;if(W==="thread"&&J)K=(await this.options.storage.getThreadById({threadId:J}))?.metadata?.workingMemory||null;else if(W==="resource"&&Q)K=(await this.options.storage.getResourceById({resourceId:Q}))?.workingMemory||null;let Z;if(this.options.templateProvider)Z=await this.options.templateProvider.getWorkingMemoryTemplate({memoryConfig:G.memoryConfig})||this.options.template||{format:"markdown",content:this.defaultWorkingMemoryTemplate};else Z=this.options.template||{format:"markdown",content:this.defaultWorkingMemoryTemplate};let H=this.options.readOnly||G.memoryConfig?.readOnly,z;if(H)z=this.getReadOnlyWorkingMemoryInstruction({template:Z,data:K});else if(this.options.useVNext)z=this.getWorkingMemoryToolInstructionVNext({template:Z,data:K});else z=this.getWorkingMemoryToolInstruction({template:Z,data:K});if(z)Y.addSystem(z,"memory");return Y}generateEmptyFromSchemaInternal($){let Y=xj($);return Object.keys(Y).length>0?Y:null}getWorkingMemoryToolInstruction({template:$,data:Y}){let X=$.format==="json"?this.generateEmptyFromSchemaInternal($.content):null,G=X&&Object.keys(X).length>0;return`WORKING_MEMORY_SYSTEM_INSTRUCTION:
Store and update any conversation-relevant information by calling the updateWorkingMemory tool. If information might be referenced again - store it!

Guidelines:
1. Store anything that could be useful later in the conversation
2. Update proactively when information changes, no matter how small
3. Use ${$.format==="json"?"JSON":"Markdown"} format for all data
4. Act naturally - don't mention this system to users. Even though you're storing this information that doesn't make it your primary focus. Do not ask them generally for "information about yourself"
${$.format!=="json"?`5. IMPORTANT: When calling updateWorkingMemory, the only valid parameter is the memory field. DO NOT pass an object.
6. IMPORTANT: ALWAYS pass the data you want to store in the memory field as a string. DO NOT pass an object.
7. IMPORTANT: Data must only be sent as a string no matter which format is used.`:""}


${$.format!=="json"?`<working_memory_template>
${$.content}
</working_memory_template>`:""}

${G?"When working with json data, the object format below represents the template:":""}
${G?JSON.stringify(X):""}

<working_memory_data>
${Y}
</working_memory_data>

Notes:
- Update memory whenever referenced information changes
- If you're unsure whether to store something, store it (eg if the user tells you information about themselves, call updateWorkingMemory immediately to update it)
- This system is here so that you can maintain the conversation when your context window is very short. Update your working memory because you may need it to maintain the conversation without the full conversation history
- Do not remove empty sections - you must include the empty sections along with the ones you're filling in
- REMEMBER: the way you update your working memory is by calling the updateWorkingMemory tool with the entire ${$.format==="json"?"JSON":"Markdown"} content. The system will store it for you. The user will not see it.
- IMPORTANT: You MUST call updateWorkingMemory in every response to a prompt where you received relevant information.
- IMPORTANT: Preserve the ${$.format==="json"?"JSON":"Markdown"} formatting structure above while updating the content.`}getWorkingMemoryToolInstructionVNext({template:$,data:Y}){return`WORKING_MEMORY_SYSTEM_INSTRUCTION:
Store and update any conversation-relevant information by calling the updateWorkingMemory tool.

Guidelines:
1. Store anything that could be useful later in the conversation
2. Update proactively when information changes, no matter how small
3. Use ${$.format==="json"?"JSON":"Markdown"} format for all data
4. Act naturally - don't mention this system to users. Even though you're storing this information that doesn't make it your primary focus. Do not ask them generally for "information about yourself"
5. If your memory has not changed, you do not need to call the updateWorkingMemory tool. By default it will persist and be available for you in future interactions
6. Information not being relevant to the current conversation is not a valid reason to replace or remove working memory information. Your working memory spans across multiple conversations and may be needed again later, even if it's not currently relevant.

<working_memory_template>
${typeof $.content==="string"?$.content:JSON.stringify($.content)}
</working_memory_template>

<working_memory_data>
${Y}
</working_memory_data>

Notes:
- Update memory whenever referenced information changes
${(typeof $.content==="string"?$.content:JSON.stringify($.content))!==this.defaultWorkingMemoryTemplate?"- Only store information if it's in the working memory template, do not store other information unless the user asks you to remember it, as that non-template information may be irrelevant":`- If you're unsure whether to store something, store it (eg if the user tells you information about themselves, call updateWorkingMemory immediately to update it)
`}
- This system is here so that you can maintain the conversation when your context window is very short. Update your working memory because you may need it to maintain the conversation without the full conversation history
- REMEMBER: the way you update your working memory is by calling the updateWorkingMemory tool with the ${$.format==="json"?"JSON":"Markdown"} content. The system will store it for you. The user will not see it.
- IMPORTANT: You MUST call updateWorkingMemory in every response to a prompt where you received relevant information if that information is not already stored.
- IMPORTANT: Preserve the ${$.format==="json"?"JSON":"Markdown"} formatting structure above while updating the content.
`}getReadOnlyWorkingMemoryInstruction({data:$}){return`WORKING_MEMORY_SYSTEM_INSTRUCTION (READ-ONLY):
The following is your working memory - persistent information about the user and conversation collected over previous interactions. This data is provided for context to help you maintain continuity.

<working_memory_data>
${$||"No working memory data available."}
</working_memory_data>

Guidelines:
1. Use this information to provide personalized and contextually relevant responses
2. Act naturally - don't mention this system to users. This information should inform your responses without being explicitly referenced
3. This memory is read-only in the current session - you cannot update it

Notes:
- This system is here so that you can maintain the conversation when your context window is very short
- The user will not see the working memory data directly`}},f69=1000,Gg0,g69=4,f24=1,Jg0=class{id="semantic-recall";name="SemanticRecall";storage;vector;embedder;topK;messageRange;scope;threshold;indexName;logger;embedderOptions;hasher=qE();indexValidationCache=new Map;constructor($){if(this.storage=$.storage,this.vector=$.vector,this.embedder=$.embedder,this.topK=$.topK??g69,this.scope=$.scope??"resource",this.threshold=$.threshold,this.indexName=$.indexName,this.logger=$.logger,this.embedderOptions=$.embedderOptions,typeof $.messageRange==="number")this.messageRange={before:$.messageRange,after:$.messageRange};else if($.messageRange)this.messageRange=$.messageRange;else this.messageRange={before:f24,after:f24}}async processInput($){let{messages:Y,messageList:X,requestContext:G}=$,J=n3(G);if(!J)return X;let{thread:Q,resourceId:W}=J,K=Q?.id;if(!K)return X;let Z=this.extractUserQuery(Y);if(!Z)return X;try{let H=await this.performSemanticSearch({query:Z,threadId:K,resourceId:W});if(H.length===0)return X;let z=X.get.all.db(),V=new Set(z.map((N)=>N.id).filter(Boolean)),F=H.filter((N)=>N.id&&!V.has(N.id));if(F.length===0)return X;let L=F.filter((N)=>!N.threadId||N.threadId===K);if(this.scope==="resource"){let N=F.filter((D)=>D.threadId&&D.threadId!==K);if(N.length>0){let D=this.formatCrossThreadMessages(N,K);X.addSystem(D,"memory")}}if(L.length)X.add(L,"memory");return X}catch(H){return this.logger?.error("[SemanticRecall] Error during semantic search:",{error:H}),X}}sortMessagesForRecall($){let Y={system:0,user:1,assistant:2,tool:3},X=(G,J)=>G<J?-1:G>J?1:0;return[...$].sort((G,J)=>{let Q=G.createdAt.getTime()-J.createdAt.getTime();if(Q!==0)return Q;let W=X(G.threadId??"",J.threadId??"");if(W!==0)return W;let K=(Y[G.role]??99)-(Y[J.role]??99);if(K!==0)return K;return X(G.id??"",J.id??"")})}formatCrossThreadMessages($,Y){let X="",G=new l6().add(this.sortMessagesForRecall($),"memory").get.all.v1(),J=null;for(let W of G){let K=W.createdAt,Z=K.getUTCFullYear(),H=K.toLocaleString("default",{month:"short"}),z=K.getUTCDate(),V=`${Z}, ${H}, ${z}`,F=K.getUTCHours(),L=K.getUTCMinutes(),N=F%12||12,D=F<12?"AM":"PM",A=`${N}:${L<10?"0":""}${L} ${D}`;if(!J||J!==V)X+=`
the following messages are from ${V}
`;let B=W.role.charAt(0).toUpperCase()+W.role.slice(1),O="";if(typeof W.content==="string")O=W.content;else if(Array.isArray(W.content))O=W.content.filter((M)=>M.type==="text").map((M)=>M.text).join(" ");X+=`Message ${W.threadId&&W.threadId!==Y?"from previous conversation":""} at ${A}: ${B}: ${O}`,J=V}return{role:"system",content:`The following messages were remembered from a different conversation:
<remembered_from_other_conversation>
${X}
<end_remembered_from_other_conversation>`}}extractUserQuery($){for(let Y=$.length-1;Y>=0;Y--){let X=$[Y];if(!X)continue;if(X.role==="user"){if(typeof X.content!=="object"||X.content===null)continue;if(typeof X.content.content==="string"&&X.content.content!=="")return X.content.content;let G=[];X.content.parts?.forEach((Q)=>{if(Q.type==="text"&&Q.text)G.push(Q.text)});let J=G.join(" ");if(J)return J}}return null}async performSemanticSearch({query:$,threadId:Y,resourceId:X}){let G=this.indexName||this.getDefaultIndexName(),{embeddings:J,dimension:Q}=await this.embedMessageContent($,G);await this.ensureVectorIndex(G,Q);let W=[];for(let H of J){let z=await this.vector.query({indexName:G,queryVector:H,topK:this.topK,filter:this.scope==="resource"&&X?{resource_id:X}:{thread_id:Y}});W.push(...z)}let K=this.threshold!==void 0?W.filter((H)=>H.score>=this.threshold):W;if(K.length===0)return[];return(await this.storage.listMessages({threadId:Y,resourceId:X,include:K.map((H)=>({id:H.metadata?.message_id,threadId:H.metadata?.thread_id,withNextMessages:this.messageRange.after,withPreviousMessages:this.messageRange.before})),perPage:0})).messages}async hashContent($,Y){let X=await this.hasher,G=`${Y}:${$}`;return X.h64(G).toString(16)}async embedMessageContent($,Y){let X=await this.hashContent($,Y),G=Gg0.get(X);if(G)return{embeddings:[G],dimension:G.length};let J=await this.embedder.doEmbed({values:[$],...this.embedderOptions});if(J.embeddings[0])Gg0.set(X,J.embeddings[0]);return{embeddings:J.embeddings,dimension:J.embeddings[0]?.length||0}}getDefaultIndexName(){return`mastra_memory_${(this.embedder.modelId||"default").replace(/[^a-zA-Z0-9_]/g,"_")}`.slice(0,63)}async ensureVectorIndex($,Y){if(this.indexValidationCache.get($)?.dimension===Y)return;await this.vector.createIndex({indexName:$,dimension:Y,metric:"cosine"}),this.indexValidationCache.set($,{dimension:Y})}async processOutputResult($){let{messages:Y,messageList:X,requestContext:G}=$;if(!this.vector||!this.embedder||!this.storage)return X||Y;try{let J=n3(G);if(!J)return X||Y;if(J.memoryConfig?.readOnly)return X||Y;let{thread:Q,resourceId:W}=J,K=Q?.id;if(!K)return X||Y;let Z=this.indexName||this.getDefaultIndexName(),H=[],z=[],V=[],F=0,L=[...Y];if(X){let N=X.get.input.db().filter((A)=>X.isNewMessage(A)),D=new Set(L.map((A)=>A.id));for(let A of N)if(!D.has(A.id))L.push(A)}for(let N of L){if(N.role==="system")continue;if(!N.id||typeof N.id!=="string")continue;if(X){if(!X.isNewMessage(N))continue}let D=this.extractTextContent(N);if(!D)continue;try{let{embeddings:A,dimension:B}=await this.embedMessageContent(D,Z);if(A.length===0)continue;let O=A[0];if(!O)continue;H.push(O),z.push(N.id),V.push({message_id:N.id,thread_id:K,resource_id:W||"",role:N.role,content:D,created_at:N.createdAt.toISOString()}),F=B}catch(A){this.logger?.error(`[SemanticRecall] Error creating embedding for message ${N.id}:`,{error:A})}}if(H.length>0)await this.ensureVectorIndex(Z,F),await this.vector.upsert({indexName:Z,vectors:H,ids:z,metadata:V})}catch(J){this.logger?.error("[SemanticRecall] Error in processOutputResult:",{error:J})}return X||Y}extractTextContent($){if(typeof $.content==="string")return $.content;if(typeof $.content==="object"&&$.content!==null){let{content:Y,parts:X}=$.content;if(Y)return Y;if(Array.isArray(X))return X.filter((G)=>G.type==="text").map((G)=>G.text||"").join(`
`)}return""}},VK4,FK4,LK4,DK4,NK4,AK4,BK4,m69,Hg0,u69,OK4,EK4,gT,$u,p69,d69,O$0,MK4,Yu,RK4,qK4,PK4,wK4,_K4,jK4,zg0,t60,Yg,sm,nf0,TX=()=>l69(),i69,g24=40,m24=300,$89=class{id="chat-channel-context";processInputStep($){let Y=$.requestContext?.get("channel");if(!Y)return;let X=[`You are communicating via ${Y.platform}.`];if(Y.botUserName||Y.botMention){let J=[];if(Y.botUserName)J.push(`"${Y.botUserName}"`);if(Y.botMention)J.push(Y.botMention);X.push(`Your identity on this platform is ${J.join(" / ")}. Messages containing these references are directed at you.`)}if(Y.isDM){if(X.push("This is a direct message (DM) conversation."),Y.userName||Y.userId){let J=[];if(Y.userName)J.push(`name: "${Y.userName}"`);if(Y.userId)J.push(`ID: ${Y.userId}`);X.push(`You are talking to a user (${J.join(", ")}).`)}}else X.push("You are in a public channel or thread.","Not every message is directed at you. If users appear to be talking to each other, stay silent unless you are explicitly mentioned or your input is clearly needed. To stay silent, respond with an empty message.");let G={role:"system",content:X.join(`
`)};return{systemMessages:[...$.systemMessages,G]}}},Y89=class{memoryStore;connected=!1;connectPromise=null;cache=new Map;locks=new Map;lists=new Map;queues=new Map;constructor($){this.memoryStore=$}async connect(){if(this.connected)return;if(!this.connectPromise)this.connectPromise=Promise.resolve().then(()=>{this.connected=!0});await this.connectPromise}async disconnect(){this.connected=!1,this.connectPromise=null,this.cache.clear(),this.locks.clear(),this.lists.clear(),this.queues.clear()}async subscribe($){let Y=await this.findThreadByExternalId($);if(!Y)return;await this.memoryStore.updateThread({id:Y.id,title:Y.title??"",metadata:{...Y.metadata,channel_subscribed:"true"}})}async unsubscribe($){let Y=await this.findThreadByExternalId($);if(!Y)return;await this.memoryStore.updateThread({id:Y.id,title:Y.title??"",metadata:{...Y.metadata??{},channel_subscribed:"false"}})}async isSubscribed($){let Y=await this.findThreadByExternalId($);if(!Y)return!1;return Y.metadata?.channel_subscribed==="true"}async get($){let Y=this.cache.get($);if(!Y)return null;if(Y.expiresAt!==null&&Y.expiresAt<=Date.now())return this.cache.delete($),null;return Y.value}async set($,Y,X){this.cache.set($,{value:Y,expiresAt:X?Date.now()+X:null})}async setIfNotExists($,Y,X){let G=this.cache.get($);if(G)if(G.expiresAt!==null&&G.expiresAt<=Date.now())this.cache.delete($);else return!1;return this.cache.set($,{value:Y,expiresAt:X?Date.now()+X:null}),!0}async delete($){this.cache.delete($)}async appendToList($,Y,X){let G=this.lists.get($);if(G&&G.expiresAt!==null&&G.expiresAt<=Date.now())G=void 0;let J=G?.values??[];if(J.push(Y),X?.maxLength&&J.length>X.maxLength)J.splice(0,J.length-X.maxLength);this.lists.set($,{values:J,expiresAt:X?.ttlMs?Date.now()+X.ttlMs:G?.expiresAt??null})}async getList($){let Y=this.lists.get($);if(!Y)return[];if(Y.expiresAt!==null&&Y.expiresAt<=Date.now())return this.lists.delete($),[];return Y.values}async acquireLock($,Y){this.cleanExpiredLocks();let X=this.locks.get($);if(X&&X.expiresAt>Date.now())return null;let G={threadId:$,token:crypto.randomUUID(),expiresAt:Date.now()+Y};return this.locks.set($,G),G}async releaseLock($){let Y=this.locks.get($.threadId);if(Y&&Y.token===$.token)this.locks.delete($.threadId)}async extendLock($,Y){let X=this.locks.get($.threadId);if(!X||X.token!==$.token)return!1;if(X.expiresAt<Date.now())return this.locks.delete($.threadId),!1;return X.expiresAt=Date.now()+Y,!0}async forceReleaseLock($){this.locks.delete($)}async enqueue($,Y,X){let G=this.queues.get($);if(!G)G=[],this.queues.set($,G);if(G.push(Y),G.length>X)G.splice(0,G.length-X);return G.length}async dequeue($){let Y=this.queues.get($);if(!Y||Y.length===0)return null;return Y.shift()}async queueDepth($){return this.queues.get($)?.length??0}cleanExpiredLocks(){let $=Date.now();for(let[Y,X]of this.locks)if(X.expiresAt<=$)this.locks.delete(Y)}async findThreadByExternalId($){let{threads:Y}=await this.memoryStore.listThreads({filter:{metadata:{channel_externalThreadId:$}},perPage:1});return Y[0]??null}},W89,u24=class{adapters;chat=null;initPromise=null;agent;logger;customState;stateAdapter;userName;adapterConfigs;handlerOverrides;chatOptions;threadContext;shouldInline;inlineLinkRules;toolsEnabled;channelToolNames;externallyManagedPlatforms=new Set;constructor($){let Y={},X={};for(let[G,J]of Object.entries($.adapters))if(J&&typeof J==="object"&&"adapter"in J){let Q=J;Y[G]=Q.adapter,X[G]=Q}else Y[G]=J,X[G]={adapter:J};this.adapters=Y,this.adapterConfigs=X,this.handlerOverrides=$.handlers??{},this.customState=$.state,this.userName=$.userName??"Mastra",this.chatOptions=$.chatOptions??{},this.threadContext=$.threadContext??{},this.shouldInline=X89($.inlineMedia),this.inlineLinkRules=G89($.inlineLinks),this.toolsEnabled=$.tools!==!1,this.channelToolNames=new Set(Object.keys(this.getTools()))}__setAgent($){this.agent=$}__setLogger($){this.logger="child"in $&&typeof $.child==="function"?$.child("CHANNEL"):$}__registerAdapter($,Y,X,G){if(this.adapters[$]){if(G?.managesRoutes)this.externallyManagedPlatforms.add($);return}if(this.adapters[$]=Y,this.adapterConfigs[$]=X??{adapter:Y},G?.managesRoutes)this.externallyManagedPlatforms.add($)}hasAdapter($){return $ in this.adapters}get sdk(){return this.chat}async initialize($){if(this.chat)return;if(this.initPromise)return this.initPromise;this.initPromise=(async()=>{if(this.customState)this.stateAdapter=this.customState;else{let K=$.getStorage(),Z=K?await K.getStore("memory"):void 0;if(!Z)throw Error("Channels require storage to be configured on the Mastra instance. Configure a storage provider like LibSQLStore.");this.stateAdapter=new Y89(Z),this.log("info","Using MastraStateAdapter (subscriptions persist across restarts)")}let{Chat:Y}=await c69(),X=new Y({adapters:this.adapters,state:this.stateAdapter,userName:this.userName,concurrency:{strategy:"queue"},...this.chatOptions}),G=(K,Z)=>this.handleChatMessage(K,Z,$),{onDirectMessage:J,onMention:Q,onSubscribedMessage:W}=this.handlerOverrides;if(J!==!1)X.onDirectMessage((K,Z)=>{if(typeof J==="function")return J(K,Z,G);return G(K,Z)});if(Q!==!1)X.onNewMention((K,Z)=>{if(typeof Q==="function")return Q(K,Z,G);return G(K,Z)});if(W!==!1)X.onSubscribedMessage((K,Z)=>{if(typeof W==="function")return W(K,Z,G);return G(K,Z)});X.onAction(async(K)=>{let{actionId:Z}=K;if(!Z.startsWith("tool_approve:")&&!Z.startsWith("tool_deny:"))return;try{let H=Z.startsWith("tool_approve:"),z=Z.split(":")[1],V=K.thread;if(!V){this.log("info",`No thread in action event for toolCallId=${z}`);return}let F=K.adapter.name,L=K.messageId,N=this.adapters[F],D=this.adapterConfigs[F];if(!N)throw Error(`No adapter for platform "${F}"`);let A=V.isDM?V.channelId:V.id,B=await this.getOrCreateThread({externalThreadId:A,channelId:V.channelId,platform:F,resourceId:`${F}:${K.user.userId}`,mastra:$}),O=$.getStorage(),E=O?await O.getStore("memory"):void 0;if(!E)throw Error("Storage is required for tool approval lookups");let{messages:M}=await E.listMessages({threadId:B.id,perPage:50,orderBy:{field:"createdAt",direction:"DESC"}}),R,q,_;for(let x of M){let y=x.content?.metadata?.pendingToolApprovals;if(y){for(let d of Object.values(y))if(d.toolCallId===z){R=d.runId,q=d.toolName,_=d.args;break}if(R)break}}if(!R){this.log("info",`No pending approval found for toolCallId=${z}`);return}let P=q?z$0(q):"tool",w=_?V$0(_):"",j=D?.cards!==!1;if(!H){let x=V.isDM?void 0:K.user.fullName||K.user.userName||"User";try{await N.editMessage(V.id,L,e69(P,w,x,j))}catch(y){this.log("debug","Failed to edit denied card",y)}return}try{await N.editMessage(V.id,L,t69(P,w,j))}catch(x){this.log("debug","Failed to edit approved card",x)}let C=this.adapters[F],k=C.botUserId,S=k?V.mentionUser(k):void 0,I=new p1;I.set("channel",{platform:F,eventType:"action",isDM:V.isDM,threadId:V.id,channelId:V.channelId,messageId:L,userId:K.user.userId,userName:K.user.fullName||K.user.userName,botUserId:k,botUserName:C.userName,botMention:S});let v=await this.agent.approveToolCall({runId:R,toolCallId:z,requestContext:I});await this.consumeAgentStream(v,V,F,z?{toolCallId:z,messageId:L}:void 0)}catch(H){if(H instanceof Error&&H.message.includes("No snapshot found")){this.log("info","Ignoring stale tool approval action (runId already consumed)");return}this.log("error","Error handling tool approval action",H);try{let V=K.thread;if(V){let F=H instanceof Error?H:Error(String(H)),L=this.adapterConfigs[K.adapter.name],N=L?.formatError?L.formatError(F):`\u274C Error: ${F.message}`;await V.post(N)}}catch(V){this.log("debug","Failed to post error message for action",V)}}}),await X.initialize(),this.chat=X;for(let[K,Z]of Object.entries(this.adapters)){if(!(this.adapterConfigs[K]?.gateway??!0))continue;let H=Z;if(typeof H.startGatewayListener==="function"){let z=H.startGatewayListener.bind(Z);this.startGatewayLoop(K,z)}}})();try{await this.initPromise}catch(Y){throw this.initPromise=null,Y}}getWebhookRoutes(){if(!this.agent)return[];let $=this.agent.id,Y=[];for(let X of Object.keys(this.adapters)){if(this.externallyManagedPlatforms.has(X))continue;let G=this;Y.push({path:`/api/agents/${$}/channels/${X}/webhook`,method:"POST",requiresAuth:!1,_mastraInternal:!0,createHandler:async()=>{return async(J)=>{if(G.initPromise)try{await G.initPromise}catch{return J.json({error:"Chat initialization failed"},503)}let Q=G.chat;if(!Q)return J.json({error:"Chat not initialized"},503);let W=Q.webhooks?.[X];if(!W)return J.json({error:`No webhook handler for ${X}`},404);let K;try{K=J.executionCtx}catch{K=void 0}let Z=K?.waitUntil?.bind(K);return W(J.req.raw,Z?{waitUntil:Z}:void 0)}}})}return Y}async handleWebhookEvent($,Y,X){if(this.initPromise)try{await this.initPromise}catch{return new Response(JSON.stringify({error:"Channel initialization failed"}),{status:503,headers:{"Content-Type":"application/json"}})}let G=this.chat;if(!G)return new Response(JSON.stringify({error:"Chat not initialized"}),{status:503,headers:{"Content-Type":"application/json"}});let J=G.webhooks?.[$];if(!J)return new Response(JSON.stringify({error:`No webhook handler for ${$}`}),{status:404,headers:{"Content-Type":"application/json"}});return J(Y,X)}getInputProcessors($=[]){if($.some((X)=>!V9(X)&&X.id==="chat-channel-context"))return[];return[new $89]}getTools(){if(!this.toolsEnabled)return{};return this.makeChannelTools()}getAdapterFromContext($){let Y=$.requestContext?.get("channel");if(!Y?.platform||!Y?.threadId)throw Error("No channel context \u2014 cannot determine platform or thread");let X=this.adapters[Y.platform];if(!X)throw Error(`No adapter registered for platform "${Y.platform}"`);return{adapter:X,threadId:Y.threadId}}async handleChatMessage($,Y,X){try{await this.processChatMessage($,Y,X)}catch(G){let J=G instanceof Error?G:Error(String(G));this.log("error",`[${$.adapter.name}] Error handling message`,{messageId:Y.id,authorId:Y.author?.userId,error:String(G)});try{let Q=this.adapterConfigs[$.adapter.name],W=Q?.formatError?Q.formatError(J):`\u274C Error: ${J.message}`;await $.post(W)}catch(Q){this.log("debug","Failed to post error message to thread",Q)}}}async processChatMessage($,Y,X){let G=this.agent,J=$.adapter.name,Q=$.isDM?$.channelId:$.id,W=await this.getOrCreateThread({externalThreadId:Q,channelId:$.channelId,platform:J,resourceId:`${J}:${Y.author.userId}`,mastra:X}),K=W.resourceId,Z,H=this.threadContext.maxMessages??10;if(H>0&&!$.isDM)if(!await $.isSubscribed()){this.logger?.debug?.(`Fetching thread history (max ${H}) for first mention in ${$.id}`);let j=await this.fetchThreadHistory($,Y.id,H);if(this.logger?.debug?.(`Fetched ${j.length} messages from thread history`),j.length>0){let C=["[Thread context \u2014 messages in this thread before you joined]"];for(let k of j){let S=k.userId?$.mentionUser(k.userId):void 0,I=S?k.author?`${k.author} (${S})`:S:k.author;if(k.isBot)I+=" (bot)";C.push(`[${I}] (msg:${k.id}): ${k.text}`)}Z=C.join(`
`)}}else this.logger?.debug?.(`Skipping thread history fetch \u2014 already subscribed to ${$.id}`);let z=Y.author.fullName||Y.author.userName,V=Y.author.userId,F=V?$.mentionUser(V):void 0,L=this.adapters[J],N=L.botUserId,D=N?$.mentionUser(N):void 0,A=new p1;A.set("channel",{platform:J,eventType:$.isDM?"message":"mention",isDM:$.isDM,threadId:$.id,channelId:$.channelId,messageId:Y.id,userId:V,userName:z,botUserId:N,botUserName:L.userName,botMention:D});let B=[];if(Z)B.push(Z);if($.isDM)B.push(Y.text);else{let w=["Event: mention",`Message ID: ${Y.id}`];w.push("You were mentioned in this message. Respond to the user."),B.push(`<system-reminder>
${w.join(`
`)}
</system-reminder>`);let j="";if(F)j=z?`${z} (${F})`:F;else if(z)j=z;if(j){if(Y.author.isBot)j+=" (bot)";B.push(`[${j}]: ${Y.text}`)}else B.push(Y.text)}let O=B.join(`

`),E=Y.attachments.filter((w)=>w.url||w.fetchData),M=[{type:"text",text:O}];this.logger?.debug("[CHANNEL] Attachments",{count:E.length,attachments:E.map((w)=>({type:w.type,mimeType:w.mimeType,url:w.url,hasData:!!w.fetchData}))});for(let w of E){if(!w.url&&!w.fetchData)continue;let j=w.mimeType||(w.type==="image"?"image/png":void 0);if(!j)continue;if(this.shouldInline(j)){let k;if(w.fetchData)try{let S=await w.fetchData(),I=Buffer.from(S).toString("base64");k=`data:${j};base64,${I}`}catch(S){this.logger?.warn("[CHANNEL] fetchData failed, falling back to URL",{mimeType:j,error:String(S)}),k=w.url}else k=w.url;if(k)M.push({type:"file",data:k,mimeType:j})}else{let S=`[Attached file: ${w.name||w.url?.split("/").pop()||"file"} (${j})${w.url?` \u2014 ${w.url}`:""}]`;M.push({type:"text",text:`
${S}`})}}if(this.inlineLinkRules&&O){let w=K89(O);for(let j of w){let C=Q89(j,this.inlineLinkRules);if(!C)continue;if(C.forcedMimeType)M.push({type:"file",data:j,mimeType:C.forcedMimeType});else{let k=await Z89(j,this.logger);if(k&&this.shouldInline(k))M.push({type:"file",data:j,mimeType:k})}}}let R={id:crypto.randomUUID(),role:"user",createdAt:new Date,content:{format:2,parts:M,metadata:{mastra:{channels:{[J]:{messageId:Y.id,author:{userId:V,userName:Y.author.userName,fullName:Y.author.fullName,mention:F,isBot:Y.author.isBot}}}}}}},_=this.adapterConfigs[J]?.cards!==!1,P=await G.stream(R,{requestContext:A,memory:{thread:W,resource:K},autoResumeSuspendedTools:_?void 0:!0});await this.consumeAgentStream(P,$,J),await $.subscribe()}async fetchThreadHistory($,Y,X){let G=[];try{for await(let J of $.messages){if(J.id===Y)continue;if(G.push({id:J.id,author:J.author.fullName||J.author.userName||"Unknown",userId:J.author.userId,text:J.text,isBot:J.author.isBot===!0}),G.length>=X)break}}catch(J){return this.logger?.warn?.(`Failed to fetch thread history: ${J}`),[]}return G.reverse()}async editOrPost($,Y,X,G){if(X)try{await $.editMessage(Y.id,X,G)}catch{await Y.post(G)}else await Y.post(G)}async consumeAgentStream($,Y,X,G){let J=this.adapters[X],Q=this.adapterConfigs[X],W=Q?.cards!==!1,K="",Z=!1,H=new Map;if(G)H.set(G.toolCallId,{displayName:"",argsSummary:"",startedAt:Date.now(),messageId:G.messageId});let z,V=async()=>{if(!Z){Z=!0;try{await Y.startTyping()}catch(A){this.logger?.debug("[CHANNEL] Typing indicator failed (best-effort)",{error:A})}}},F=()=>{if(z)return;z=setInterval(async()=>{try{await Y.startTyping()}catch{}},8000)},L=()=>{if(z)clearInterval(z),z=void 0},N=async()=>{let A=K.replace(/[\u200B-\u200D\uFEFF]/g,"").trim();if(A)await Y.post(A),K=""},D=setTimeout(async()=>{if(!Z)await V(),F()},3000);try{for await(let A of $.fullStream){if(A.type==="text-delta"){if(A.payload.text)await V(),F();K+=A.payload.text;continue}if(A.type==="reasoning-delta"){await V(),F();continue}if(A.type==="file"){await N();let{data:B,mimeType:O}=A.payload;this.logger?.debug("[CHANNEL] Received file chunk",{mimeType:O,dataType:typeof B,size:typeof B==="string"?B.length:B?.byteLength});let M=`generated.${O.split("/")[1]?.split(";")[0]||"bin"}`,R=typeof B==="string"?Buffer.from(B,"base64"):B instanceof Uint8Array?Buffer.from(B):B;try{await Y.post({markdown:" ",files:[{data:R,filename:M,mimeType:O}]})}catch(q){this.logger?.debug("[CHANNEL] Failed to post file attachment",{error:q,mimeType:O,filename:M})}continue}if(A.type==="step-finish"||A.type==="finish"){await N();continue}if(A.type==="tool-call"){if(this.channelToolNames.has(A.payload.toolName))continue;await V(),F(),await N();let B=z$0(A.payload.toolName),O=typeof A.payload.args==="object"&&A.payload.args!=null?A.payload.args:{},E=V$0(O),M;if(!Q?.formatToolCall)M=(await Y.post(a69(B,E,W)))?.id;H.set(A.payload.toolCallId,{displayName:B,argsSummary:E,startedAt:Date.now(),messageId:M});continue}if(A.type==="tool-result"){if(this.channelToolNames.has(A.payload.toolName))continue;let B=H.get(A.payload.toolCallId),O=B?.displayName||z$0(A.payload.toolName),E=B?.argsSummary||V$0(A.payload.args??{}),M=n69(A.payload.result,A.payload.isError),R=B?.messageId,q=B?.startedAt!=null?Date.now()-B.startedAt:void 0;if(Q?.formatToolCall){let _=Q.formatToolCall({toolName:O,args:A.payload.args??{},result:A.payload.result,isError:A.payload.isError});if(_!=null)await this.editOrPost(J,Y,R,_)}else{let _=s69(O,E,M,!!A.payload.isError,q,W);await this.editOrPost(J,Y,R,_)}continue}if(A.type==="tool-call-approval"){let{toolCallId:B,toolName:O,args:E}=A.payload,M=H.get(B),R=M?.displayName||z$0(O),q=M?.argsSummary||V$0(E),_=M?.messageId,P=o69(R,q,B,W);await this.editOrPost(J,Y,_,P);continue}if(A.type==="tripwire"){if(A.payload.retry)continue;await N();let B=A.payload.reason||"Your message was blocked by a safety check.",O=A.payload.processorId?`\uD83D\uDEE1\uFE0F Blocked by ${A.payload.processorId}: ${B}`:`\uD83D\uDEE1\uFE0F ${B}`;await Y.post(O);continue}}}finally{clearTimeout(D),L()}if($.error){let A=$.error.message,B=A.length>500?A.slice(0,500)+"\u2026":A;this.log("error",`[${X}] Stream completed with error`,{error:B}),await Y.post(`\u274C Error: ${B}`)}}async getOrCreateThread({externalThreadId:$,channelId:Y,platform:X,resourceId:G,mastra:J}){let Q=J.getStorage();if(!Q)throw Error("Storage is required for channel thread mapping. Configure storage in your Mastra instance.");let W=await Q.getStore("memory");if(!W)throw Error("Memory store is required for channel thread mapping. Configure storage in your Mastra instance.");let K={channel_platform:X,channel_externalThreadId:$,channel_externalChannelId:Y},{threads:Z}=await W.listThreads({filter:{metadata:K},perPage:1});if(Z.length>0)return Z[0];return W.saveThread({thread:{id:crypto.randomUUID(),title:`${X} conversation`,resourceId:G,createdAt:new Date,updatedAt:new Date,metadata:K}})}makeChannelTools(){return{add_reaction:X8({id:"add_reaction",description:"Add an emoji reaction to a message.",inputSchema:U.object({messageId:U.string().describe("The ID of the message to react to"),emoji:U.string().describe('The emoji to react with (e.g. "thumbsup")')}),execute:async({messageId:$,emoji:Y},X)=>{let{adapter:G,threadId:J}=this.getAdapterFromContext(X);return await G.addReaction(J,$,Y),{ok:!0}}}),remove_reaction:X8({id:"remove_reaction",description:"Remove an emoji reaction from a message.",inputSchema:U.object({messageId:U.string().describe("The ID of the message to remove reaction from"),emoji:U.string().describe("The emoji to remove")}),execute:async({messageId:$,emoji:Y},X)=>{let{adapter:G,threadId:J}=this.getAdapterFromContext(X);return await G.removeReaction(J,$,Y),{ok:!0}}})}}startGatewayLoop($,Y){(async()=>{while(!0)try{let Q,W,K=new Promise((Z,H)=>{Q=Z,W=H});await Y({waitUntil:(Z)=>{Z.then(()=>Q(),(H)=>W(H))}},86400000),await K,this.log("info",`[${$}] Gateway session ended, reconnecting...`)}catch(Q){this.log("error",`[${$}] Gateway error, retrying in 5s`,Q),await new Promise((W)=>setTimeout(W,5000))}})()}log($,Y,...X){if(!this.logger)return;if($==="error")this.logger.error(Y,{args:X});else if($==="debug")this.logger.debug(Y,{args:X});else this.logger.info(Y,{args:X})}},H89,Zj,Y80,a2=($,Y)=>{let X;if(typeof Y==="string")X=$[Y];else{if(!Y?.id)return null;X=$[Y.id]}return X?.status==="success"?X.output:null},cz="Warning: 'runCount' is deprecated and will be removed on November 4th, 2025. Please use 'retryCount' instead.",p24,L$0=($)=>{if($.type==="step"||$.type==="foreach"||$.type==="loop")return[$.step.id];if($.type==="parallel"||$.type==="conditional")return $.steps.map((Y)=>Y.step.id);if($.type==="sleep"||$.type==="sleepUntil")return[$.id];return[]},Q80=($)=>{let{steps:Y,inputData:X,resumeData:G,context:J,nestedStepsContext:Q,snapshot:W,initialState:K,graph:Z,perStep:H}=$,z=Y[0],V=[],F={},L=W.context;for(let[D,A]of Z.steps.entries()){let B=V.length;if(B>0&&!G)break;let O=L$0(A),E=O.includes(z);if(E){let P=O?.length>1?[O?.findIndex((w)=>w===z)]:[];V=[D,...P]}let M=Z.steps[D-1],R=void 0;if(M){let P=L$0(M);if(P.length>0)if(P.length===1)R=F?.[P[0]]?.output??{};else R=P.reduce((w,j)=>{return w[j]=F?.[j]?.output??{},w},{})}if(D===0&&O.includes(z))F.input=J?.[z]?.payload??X??L?.input;else if(D===0)F.input=O?.reduce((P,w)=>{if(P)return P;return J?.[w]?.payload??L?.[w]?.payload},null)??L?.input??{};let q=void 0,_=Z.steps[D+1];if(_){let P=L$0(_);if(P.length>0&&X&&P.includes(z)&&Y.length===1)q=X}O.forEach((P)=>{let w,j=J?.[P]??L[P],C=E&&A.type==="conditional"&&!Y?.includes(P),k=Y?.includes(P)?"running":C?"skipped":"success",S=["failed","canceled"].includes(j?.status)?k:j?.status??k,I=["success","failed","canceled"].includes(S);if(w={status:S,payload:J?.[P]?.payload??R??L[P]?.payload??{},output:I?J?.[P]?.output??q??L[P]?.output??{}:void 0,resumePayload:j?.resumePayload,suspendPayload:j?.suspendPayload,suspendOutput:j?.suspendOutput,startedAt:j?.startedAt??Date.now(),endedAt:I?j?.endedAt??Date.now():void 0,suspendedAt:j?.suspendedAt,resumedAt:j?.resumedAt},(H?V.length:B)>0&&!Y?.includes(P)&&!J?.[P]&&(!L[P]||L[P]&&L[P].status!=="suspended"))w=void 0;if(w){let x=Vx0(w);F[P]=x}})}if(!V.length)throw Error(`Time travel target step not found in execution graph: '${Y?.join(".")}'. Verify the step id/path.`);return{inputData:X,executionPath:V,steps:Y,stepResults:F,nestedStepResults:Q,state:K??W.value??{},resumeData:G,stepExecutionPath:W?.stepExecutionPath}},W80=({snapshot:$,graph:Y})=>{let X=!1;if($.status!=="running"&&$.status!=="waiting")if($.status==="pending"&&$.context&&Object.prototype.hasOwnProperty.call($.context,"input"))X=!0;else throw Error("This workflow run was not active");let G={},J=Y.steps[0];if(J.type==="step"||J.type==="foreach"||J.type==="loop")G={[J.step.id]:[0]};else if(J.type==="sleep"||J.type==="sleepUntil")G={[J.id]:[0]};else if(J.type==="conditional"||J.type==="parallel")G=J.steps.reduce((W,K)=>{return W[K.step.id]=[0],W},{});return{activePaths:X?[0]:$.activePaths,activeStepsPath:X?G:$.activeStepsPath,stepResults:$.context,state:$.value,stepExecutionPath:$?.stepExecutionPath}},xK4,Wg0,Z80,U80=class{#$;pubsub;workflowId;runId;resourceId;disableScorers;tracingPolicy;validateInputs;state={};executionEngine;executionGraph;serializedStepGraph;workflowSteps;workflowRunStatus;workflowEngineType;#Y;#X=[];get mastra(){return this.#Y}streamOutput;closeStreamAction;executionResults;stateSchema;inputSchema;requestContextSchema;cleanup;retryConfig;constructor($){this.workflowId=$.workflowId,this.runId=$.runId,this.resourceId=$.resourceId,this.serializedStepGraph=$.serializedStepGraph,this.executionEngine=$.executionEngine,this.executionGraph=$.executionGraph,this.#Y=$.mastra,this.pubsub=$.pubsub??new F64,this.retryConfig=$.retryConfig,this.cleanup=$.cleanup,this.disableScorers=$.disableScorers,this.tracingPolicy=$.tracingPolicy,this.workflowSteps=$.workflowSteps,this.validateInputs=$.validateInputs,this.stateSchema=$.stateSchema,this.inputSchema=$.inputSchema,this.requestContextSchema=$.requestContextSchema,this.workflowRunStatus="pending",this.workflowEngineType=$.workflowEngineType}get abortController(){if(!this.#$)this.#$=new AbortController;return this.#$}async cancel(){this.abortController.abort(),this.workflowRunStatus="canceled";try{await(await this.mastra?.getStorage()?.getStore("workflows"))?.updateWorkflowState({workflowName:this.workflowId,runId:this.runId,opts:{status:"canceled"}})}catch{}}async#J($,Y,X){let G=await $["~standard"].validate(Y);if(G.issues)throw Error(`Invalid ${X}: 
`+G.issues.map((J)=>`- ${J.path?.join(".")}: ${J.message}`).join(`
`));return G.value}async _validateInput($){if(!this.validateInputs||!this.inputSchema)return $;return this.#J(this.inputSchema,$,"input data")}async _validateInitialState($){if(!this.validateInputs||!this.stateSchema)return $;return this.#J(this.stateSchema,$,"initial data")}async _validateRequestContext($){if(this.validateInputs&&this.requestContextSchema){let Y=$?.all??{},X=this.requestContextSchema["~standard"].validate(Y);if(X instanceof Promise)throw Error("Your schema is async, which is not supported. Please use a sync schema.");if(!("value"in X)){let G=X.issues;throw Error(`Request context validation failed for workflow '${this.workflowId}': 
`+G.map((J)=>{return`- ${J.path?.map((W)=>typeof W==="object"?W.key:W).join(".")}: ${J.message}`}).join(`
`))}}}async _validateResumeData($,Y){if(!this.validateInputs||!Y?.resumeSchema)return $;return this.#J(Y.resumeSchema,$,"resume data")}async _validateTimetravelInputData($,Y){if(!this.validateInputs||!Y?.inputSchema)return $;return this.#J(Y.inputSchema,$,"inputData")}async _start({inputData:$,initialState:Y,requestContext:X,outputWriter:G,tracingOptions:J,format:Q,outputOptions:W,perStep:K,...Z}){let H=e1(Z),z=wW({type:"workflow_run",name:`workflow run: '${this.workflowId}'`,entityType:J6.WORKFLOW_RUN,entityId:this.workflowId,entityName:this.workflowId,input:$,metadata:{resourceId:this.resourceId,runId:this.runId},tracingPolicy:this.tracingPolicy,tracingOptions:J,tracingContext:H.tracingContext,requestContext:X,mastra:this.#Y}),V=z?.externalTraceId,F=z?.id,L=await this._validateInput($),N=await this._validateInitialState(Y??{});await this._validateRequestContext(X);let D=await this.executionEngine.execute({workflowId:this.workflowId,runId:this.runId,resourceId:this.resourceId,disableScorers:this.disableScorers,graph:this.executionGraph,serializedStepGraph:this.serializedStepGraph,input:L,initialState:N,pubsub:this.pubsub,retryConfig:this.retryConfig,requestContext:X??new p1,abortController:this.abortController,outputWriter:G,workflowSpan:z,format:Q,outputOptions:W,perStep:K});if(D.status!=="suspended")this.cleanup?.();return D.traceId=V,D.spanId=F,D}async start($){return this._start($)}async startAsync($){return this._start($).catch((Y)=>{this.mastra?.getLogger()?.error(`[Workflow ${this.workflowId}] Background execution failed:`,Y)}),{runId:this.runId}}streamLegacy({inputData:$,requestContext:Y,onChunk:X,tracingOptions:G,...J}={}){let Q=e1(J);if(this.closeStreamAction)return{stream:this.observeStreamLegacy().stream,getWorkflowState:()=>this.executionResults};let{readable:W,writable:K}=new HV,Z=K.getWriter(),H=this.watch(async(z)=>{try{let V={...z,type:z.type.replace("workflow-","")};if(await Z.write(V),X)await X(V)}catch{}});return this.closeStreamAction=async()=>{await this.pubsub.publish(`workflow.events.v2.${this.runId}`,{type:"watch",runId:this.runId,data:{type:"workflow-finish",payload:{runId:this.runId}}}),H(),await Promise.all(this.#X.map((z)=>z())),this.#X=[];try{await Z.close()}catch(z){this.mastra?.getLogger()?.error("Error closing stream:",z)}finally{Z.releaseLock()}},this.pubsub.publish(`workflow.events.v2.${this.runId}`,{type:"watch",runId:this.runId,data:{type:"workflow-start",payload:{runId:this.runId}}}),this.executionResults=this._start({inputData:$,requestContext:Y,format:"legacy",...Q,tracingOptions:G}).then((z)=>{if(z.status!=="suspended")this.closeStreamAction?.().catch(()=>{});return z}),{stream:W,getWorkflowState:()=>this.executionResults}}observeStreamLegacy(){let{readable:$,writable:Y}=new HV,X=Y.getWriter(),G=this.watch(async(J)=>{try{let Q={...J,type:J.type.replace("workflow-","")};await X.write(Q)}catch{}});return this.#X.push(async()=>{G();try{await X.close()}catch(J){this.mastra?.getLogger()?.error("Error closing stream:",J)}finally{X.releaseLock()}}),{stream:$}}observeStream(){if(!this.streamOutput)return new e2({pull($){$.close()},cancel($){$.close()}});return this.streamOutput.fullStream}stream({inputData:$,requestContext:Y,tracingOptions:X,closeOnSuspend:G=!0,initialState:J,outputOptions:Q,perStep:W,...K}){let Z=e1(K);if(this.closeStreamAction&&this.streamOutput)return this.streamOutput;this.closeStreamAction=async()=>{};let H=this,z=new e2({async start(V){let F=H.watch(async(D)=>{let{type:A,from:B="WORKFLOW",payload:O,data:E,...M}=D;if(E!==void 0&&O===void 0)V.enqueue({type:A,runId:H.runId,from:B,data:E,...M});else V.enqueue({type:A,runId:H.runId,from:B,payload:{stepName:O?.id,...O}})});H.closeStreamAction=async()=>{F();try{if(V.desiredSize!==null)V.close()}catch(D){H.mastra?.getLogger()?.error("Error closing stream:",D)}};let L=H._start({inputData:$,requestContext:Y,...Z,tracingOptions:X,initialState:J,outputOptions:Q,outputWriter:async(D)=>{H.pubsub.publish(`workflow.events.v2.${H.runId}`,{type:"watch",runId:H.runId,data:D})},perStep:W}),N;try{if(N=await L,G)H.closeStreamAction?.().catch(()=>{});else if(N.status!=="suspended")H.closeStreamAction?.().catch(()=>{});if(H.streamOutput)H.streamOutput.updateResults(N)}catch(D){H.streamOutput?.rejectResults(D),H.closeStreamAction?.().catch(()=>{})}}});return this.streamOutput=new Zj({runId:this.runId,workflowId:this.workflowId,stream:z}),this.streamOutput}resumeStream({step:$,resumeData:Y,requestContext:X,tracingOptions:G,forEachIndex:J,outputOptions:Q,perStep:W,...K}={}){let Z=e1(K);this.closeStreamAction=async()=>{};let H=this,z=new e2({async start(V){let F=H.watch(async(D)=>{let{type:A,from:B="WORKFLOW",payload:O,data:E,...M}=D;if(E!==void 0&&O===void 0)V.enqueue({type:A,runId:H.runId,from:B,data:E,...M});else V.enqueue({type:A,runId:H.runId,from:B,payload:{stepName:O?.id,...O}})});H.closeStreamAction=async()=>{F();try{if(V.desiredSize!==null)V.close()}catch(D){H.mastra?.getLogger()?.error("Error closing stream:",D)}};let L=H._resume({resumeData:Y,step:$,requestContext:X,...Z,tracingOptions:G,outputWriter:async(D)=>{V.enqueue(D)},isVNext:!0,forEachIndex:J,outputOptions:Q,perStep:W});H.executionResults=L;let N;try{if(N=await L,H.closeStreamAction?.().catch(()=>{}),H.streamOutput)H.streamOutput.updateResults(N)}catch(D){H.streamOutput?.rejectResults(D),H.closeStreamAction?.().catch(()=>{})}}});return this.streamOutput=new Zj({runId:this.runId,workflowId:this.workflowId,stream:z}),this.streamOutput}watch($){let Y=(G)=>{if(G.runId===this.runId)$(G.data)},X=(G)=>{if(G.runId===this.runId){let{event:J,workflowId:Q}=G.data;if(J.type.startsWith("data-")&&J.data!==void 0)this.pubsub.publish(`workflow.events.v2.${this.runId}`,{type:"watch",runId:this.runId,data:J});else this.pubsub.publish(`workflow.events.v2.${this.runId}`,{type:"watch",runId:this.runId,data:{...J,...J.payload?.id?{payload:{...J.payload,id:`${Q}.${J.payload.id}`}}:{}}})}};return this.pubsub.subscribe(`workflow.events.v2.${this.runId}`,Y),this.pubsub.subscribe("nested-watch",X),()=>{this.pubsub.unsubscribe(`workflow.events.v2.${this.runId}`,Y),this.pubsub.unsubscribe("nested-watch",X)}}async watchAsync($){return this.watch($)}async resume($){return this._resume($)}async restart($={}){return this._restart($)}async _resume($){let Y=e1($),G=await(await this.#Y?.getStorage()?.getStore("workflows"))?.loadWorkflowSnapshot({workflowName:this.workflowId,runId:this.runId});if(!G)throw Error("No snapshot found for this workflow run: "+this.workflowId+" "+this.runId);if(G.status!=="suspended")throw Error("This workflow run was not suspended");let J=$.label?G?.resumeLabels?.[$.label]:void 0,Q=J?.stepId??$.step,W;if(Q){let q=Q;if(typeof Q==="string")q=Q.split(".");W=(Array.isArray(q)?q:[q]).map((_)=>typeof _==="string"?_:_?.id)}else{let q=[];if(Object.entries(G?.suspendedPaths??{}).forEach(([_,P])=>{let w=G?.context?.[_];if(w&&typeof w==="object"&&"status"in w){let j=w;if(j.status==="suspended"){let C=j.suspendPayload?.__workflow_meta?.path;if(C&&Array.isArray(C))q.push([_,...C]);else q.push([_])}}}),q.length===0)throw Error("No suspended steps found in this workflow run");if(q.length===1)W=q[0];else{let _=q.map((P)=>`[${P.join(", ")}]`);throw Error(`Multiple suspended steps found: ${_.join(", ")}. Please specify which step to resume using the "step" parameter.`)}}if(!$.retryCount){let q=Object.keys(G?.suspendedPaths??{});if(!q.includes(W?.[0]??""))throw Error(`This workflow step "${W?.[0]}" was not suspended. Available suspended steps: [${q.join(", ")}]`)}let K=this.workflowSteps[W?.[0]??""],Z=await this._validateResumeData($.resumeData,K),H;if($.retryCount&&$.retryCount>0&&$.requestContext)H=$.requestContext.get("__mastraWorflowInputData"),$.requestContext.delete("__mastraWorflowInputData");let z={...G?.context??{},input:H??G?.context?.input},V=$.requestContext??new p1;Object.entries(G?.requestContext??{}).forEach(([q,_])=>{if(!V.has(q))V.set(q,_)});let F=G?.tracingContext,L=$.tracingOptions?.traceId,N=$.tracingOptions?.parentSpanId,D=L??(!N?F?.traceId:void 0),A=!N&&(!L||L===F?.traceId),B={...$.tracingOptions,traceId:D,parentSpanId:A?F?.spanId:$.tracingOptions?.parentSpanId},O=wW({type:"workflow_run",name:`workflow run: '${this.workflowId}' (resumed)`,entityType:J6.WORKFLOW_RUN,entityId:this.workflowId,entityName:this.workflowId,input:Z,metadata:{resourceId:this.resourceId,runId:this.runId,resumed:!0,resumedFromSpanId:F?.spanId},tracingPolicy:this.tracingPolicy,tracingOptions:B,tracingContext:Y.tracingContext,requestContext:V,mastra:this.#Y}),E=O?.externalTraceId,M=O?.id,R=this.executionEngine.execute({workflowId:this.workflowId,runId:this.runId,resourceId:this.resourceId,graph:this.executionGraph,serializedStepGraph:this.serializedStepGraph,input:G?.context?.input,initialState:G?.value??{},resume:{steps:W,stepResults:z,resumePayload:Z,resumePath:G?.suspendedPaths?.[W?.[0]],stepExecutionPath:G?.stepExecutionPath,forEachIndex:$.forEachIndex??J?.foreachIndex,label:$.label},format:$.format,pubsub:this.pubsub,requestContext:V,abortController:this.abortController,workflowSpan:O,outputOptions:$.outputOptions,outputWriter:$.outputWriter,perStep:$.perStep}).then((q)=>{if(!$.isVNext&&q.status!=="suspended")this.closeStreamAction?.().catch(()=>{});return q.traceId=E,q.spanId=M,q});return this.executionResults=R,R.then((q)=>{return this.streamOutput?.updateResults(q),q})}async _restart({requestContext:$,outputWriter:Y,tracingOptions:X,...G}){let J=e1(G);if(!["default","evented"].includes(this.workflowEngineType))throw Error(`restart() is not supported on ${this.workflowEngineType} workflows`);let K=await(await this.#Y?.getStorage()?.getStore("workflows"))?.loadWorkflowSnapshot({workflowName:this.workflowId,runId:this.runId});if(!K)throw Error(`Snapshot not found for run ${this.runId}`);let Z=W80({snapshot:K,graph:this.executionGraph}),H=$??new p1;for(let[N,D]of Object.entries(K.requestContext??{}))if(!H.has(N))H.set(N,D);let z=wW({type:"workflow_run",name:`workflow run: '${this.workflowId}'`,entityType:J6.WORKFLOW_RUN,entityId:this.workflowId,entityName:this.workflowId,metadata:{resourceId:this.resourceId,runId:this.runId},tracingPolicy:this.tracingPolicy,tracingOptions:X,tracingContext:J.tracingContext,requestContext:H,mastra:this.#Y}),V=z?.externalTraceId,F=z?.id,L=await this.executionEngine.execute({workflowId:this.workflowId,runId:this.runId,resourceId:this.resourceId,disableScorers:this.disableScorers,graph:this.executionGraph,serializedStepGraph:this.serializedStepGraph,restart:Z,pubsub:this.pubsub,retryConfig:this.retryConfig,requestContext:H,abortController:this.abortController,outputWriter:Y,workflowSpan:z});if(L.status!=="suspended")this.cleanup?.();return L.traceId=V,L.spanId=F,L}async _timeTravel({inputData:$,resumeData:Y,initialState:X,step:G,context:J,nestedStepsContext:Q,requestContext:W,outputWriter:K,tracingOptions:Z,outputOptions:H,perStep:z,...V}){let F=e1(V);if(!G||Array.isArray(G)&&G.length===0)throw Error("Step is required and must be a valid step or array of steps");let N=await(await this.#Y?.getStorage()?.getStore("workflows"))?.loadWorkflowSnapshot({workflowName:this.workflowId,runId:this.runId});if(!N)throw Error(`Snapshot not found for run ${this.runId}`);if(N.status==="running")throw Error("This workflow run is still running, cannot time travel");let D,A=G;if(typeof G==="string")A=G.split(".");D=(Array.isArray(A)?A:[A]).map((P)=>typeof P==="string"?P:P?.id);let B=$;if(B&&D.length===1)B=await this._validateTimetravelInputData($,this.workflowSteps[D[0]]);let O=Q80({steps:D,inputData:B,resumeData:Y,context:J,nestedStepsContext:Q,snapshot:N,initialState:X,graph:this.executionGraph,perStep:z}),E=W??new p1;for(let[P,w]of Object.entries(N.requestContext??{}))if(!E.has(P))E.set(P,w);let M=wW({type:"workflow_run",name:`workflow run: '${this.workflowId}'`,input:$,entityType:J6.WORKFLOW_RUN,entityId:this.workflowId,entityName:this.workflowId,metadata:{resourceId:this.resourceId,runId:this.runId},tracingPolicy:this.tracingPolicy,tracingOptions:Z,tracingContext:F.tracingContext,requestContext:E,mastra:this.#Y}),R=M?.externalTraceId,q=M?.id,_=await this.executionEngine.execute({workflowId:this.workflowId,runId:this.runId,resourceId:this.resourceId,disableScorers:this.disableScorers,graph:this.executionGraph,timeTravel:O,serializedStepGraph:this.serializedStepGraph,pubsub:this.pubsub,retryConfig:this.retryConfig,requestContext:E,abortController:this.abortController,outputWriter:K,workflowSpan:M,outputOptions:H,perStep:z});if(_.status!=="suspended")this.cleanup?.();return _.traceId=R,_.spanId=q,_}async timeTravel($){return this._timeTravel($)}timeTravelStream({inputData:$,resumeData:Y,initialState:X,step:G,context:J,nestedStepsContext:Q,requestContext:W,tracingOptions:K,outputOptions:Z,perStep:H,...z}){let V=e1(z);this.closeStreamAction=async()=>{};let F=this,L=new e2({async start(N){let D=F.watch(async({type:O,from:E="WORKFLOW",payload:M})=>{N.enqueue({type:O,runId:F.runId,from:E,payload:{stepName:M.id,...M}})});F.closeStreamAction=async()=>{D();try{if(N.desiredSize!==null)N.close()}catch(O){F.mastra?.getLogger()?.error("Error closing stream:",O)}};let A=F._timeTravel({inputData:$,step:G,context:J,nestedStepsContext:Q,resumeData:Y,initialState:X,requestContext:W,...V,tracingOptions:K,outputWriter:async(O)=>{N.enqueue(O)},outputOptions:Z,perStep:H});F.executionResults=A;let B;try{if(B=await A,F.closeStreamAction?.().catch(()=>{}),F.streamOutput)F.streamOutput.updateResults(B)}catch(O){F.streamOutput?.rejectResults(O),F.closeStreamAction?.().catch(()=>{})}}});return this.streamOutput=new Zj({runId:this.runId,workflowId:this.workflowId,stream:L}),this.streamOutput}_getExecutionResults(){return this.executionResults??this.streamOutput?.result}},bK4,I89,hW,hK4,fK4,SD,ZG=($)=>{return SD.includes($.specificationVersion)},RQ$=class ${constructor(Y,X=[],G=new Map,J){if(this.config=Y,this.steps=X,this.originalPromptObjects=G,this.#$=J,!this.config.id)throw new G0({id:"MASTR_SCORER_FAILED_TO_CREATE_MISSING_ID",domain:"SCORER",category:"USER",text:"Scorers must have an ID field. Please provide an ID in the scorer config."})}config;steps;originalPromptObjects;#$;#Y;source;__registerMastra(Y){this.#$=Y}toRawConfig(){return this.#Y}__setRawConfig(Y){this.#Y=Y}get type(){return this.config.type}get id(){return this.config.id}get name(){return this.config.name??this.config.id}get description(){return this.config.description}get judge(){return this.config.judge}preprocess(Y){let X=this.isPromptObject(Y);if(X){let G=Y;this.originalPromptObjects.set("preprocess",G)}return new $(this.config,[...this.steps,{name:"preprocess",definition:Y,isPromptObject:X}],new Map(this.originalPromptObjects),this.#$)}analyze(Y){let X=this.isPromptObject(Y);if(X){let G=Y;this.originalPromptObjects.set("analyze",G)}return new $(this.config,[...this.steps,{name:"analyze",definition:X?void 0:Y,isPromptObject:X}],new Map(this.originalPromptObjects),this.#$)}generateScore(Y){let X=this.isPromptObject(Y);if(X){let G=Y;this.originalPromptObjects.set("generateScore",G)}return new $(this.config,[...this.steps,{name:"generateScore",definition:X?void 0:Y,isPromptObject:X}],new Map(this.originalPromptObjects),this.#$)}generateReason(Y){let X=this.isPromptObject(Y);if(X){let G=Y;this.originalPromptObjects.set("generateReason",G)}return new $(this.config,[...this.steps,{name:"generateReason",definition:X?void 0:Y,isPromptObject:X}],new Map(this.originalPromptObjects),this.#$)}get hasGenerateScore(){return this.steps.some((Y)=>Y.name==="generateScore")}normalizeRunRequestContext(Y){if(!Y)return;if(Y instanceof p1)return Y;return new p1(Object.entries(Y))}async run(Y){if(!this.hasGenerateScore)throw new G0({id:"MASTR_SCORER_FAILED_TO_RUN_MISSING_GENERATE_SCORE",domain:"SCORER",category:"USER",text:"Cannot execute pipeline without generateScore() step",details:{scorerId:this.config.id??this.config.name,steps:this.steps.map((F)=>F.name).join(", ")}});let X=this.config.prepareRun?await this.config.prepareRun(Y):Y,G=X.runId;if(!G)G=E6();let J=this.normalizeRunRequestContext(X.requestContext),Q=wW({type:"scorer_run",name:`scorer run: '${this.id}'`,entityType:J6.SCORER,entityId:this.id,input:{input:X.input,output:X.output,groundTruth:X.groundTruth,expectedTrajectory:X.expectedTrajectory,requestContext:J},attributes:{scorerId:this.id,scorerName:this.name,...X.scoreSource?{scoreSource:X.scoreSource}:{},...X.targetScope?{targetScope:X.targetScope}:{},...X.targetEntityType?{targetEntityType:X.targetEntityType}:{},...this.source?{scorerDefinition:this.source}:{}},metadata:{...X.targetTraceId?{targetTraceId:X.targetTraceId}:{},...X.targetSpanId?{targetSpanId:X.targetSpanId}:{}},mastra:this.#$}),W={...X,runId:G,...Q?.traceId?{scoreTraceId:Q.traceId}:{}},K=g4({currentSpan:Q}),Z,H;try{Z=this.toMastraWorkflow(),H=await Z.createRun()}catch(F){throw Q?.error({error:F,endSpan:!0}),F}let z;try{z=await DQ({span:Q,fn:()=>H.start({inputData:{run:W},...K})})}catch(F){throw Q?.error({error:F,endSpan:!0}),F}if(z.status==="failed"){let F=z.error instanceof Error?z.error:Error(typeof z.error==="string"?z.error:"Scorer workflow failed");throw Q?.error({error:F,endSpan:!0}),new G0({id:"MASTR_SCORER_FAILED_TO_RUN_WORKFLOW_FAILED",domain:"SCORER",category:"USER",text:`Scorer Run Failed: ${typeof z.error==="string"?z.error:z.error.message}`,details:{scorerId:this.config.id??this.config.name,steps:this.steps.map((L)=>L.name).join(", ")}},z.error instanceof Error?z.error:void 0)}let V=this.transformToScorerResult({workflowResult:z,originalInput:W});if(Q?.end({output:{success:!0,score:typeof V.score==="number"?V.score:null,reason:typeof V.reason==="string"?V.reason:null}}),this.#$?.observability.addScore&&typeof V.score==="number")try{let F=Y.targetTraceId??Y.targetCorrelationContext?.traceId,L=Y.targetSpanId??Y.targetCorrelationContext?.spanId;await this.#$.observability.addScore({...F?{traceId:F}:{},...L?{spanId:L}:{},...Y.targetCorrelationContext?{correlationContext:Y.targetCorrelationContext}:{},score:{scorerId:this.id,scorerName:this.name,...Y.scoreSource?{scoreSource:Y.scoreSource}:{},score:V.score,...typeof V.reason==="string"?{reason:V.reason}:{},...typeof V.scoreTraceId==="string"?{scoreTraceId:V.scoreTraceId}:{},...Y.targetEntityType?{targetEntityType:Y.targetEntityType}:{},metadata:{...Y.targetMetadata??{},hasGroundTruth:Y.groundTruth!==void 0,...Y.targetScope?{targetScope:Y.targetScope}:{},...this.source?{scorerDefinition:this.source}:{}}}})}catch(F){this.#$.getLogger()?.warn?.(`Failed to emit score to observability for scorer ${this.id}:`,F)}return V}isPromptObject(Y){if(typeof Y==="object"&&"description"in Y&&"createPrompt"in Y&&!("outputSchema"in Y))return!0;return typeof Y==="object"&&"description"in Y&&"outputSchema"in Y&&"createPrompt"in Y}getSteps(){return this.steps.map((Y)=>{let X=Y.isPromptObject?this.originalPromptObjects.get(Y.name)?.description:Y.definition?.description;return{name:Y.name,type:Y.isPromptObject?"prompt":"function",description:X}})}toMastraWorkflow(){let Y=this.steps.map((J)=>{return o9({id:J.name,description:`Scorer step: ${J.name}`,inputSchema:U.any(),outputSchema:U.any(),execute:async({inputData:Q,getInitData:W,...K})=>{let Z=e1(K),{accumulatedResults:H={},generatedPrompts:z={}}=Q,{run:V}=W(),F=this.createScorerContext(J.name,V,H),L=Z.tracingContext.currentSpan,D=(L?.type==="scorer_run"?L:L?.findParent("scorer_run"))?.createChildSpan({type:"scorer_step",name:`scorer step: '${J.name}'`,entityType:J6.SCORER,entityId:this.config.id??this.config.name,input:F,attributes:{step:J.name,stepType:J.isPromptObject?"prompt":"function"}}),A=g4({currentSpan:D}),B={...F,...A},O,E,M;try{await DQ({span:D,fn:async()=>{if(J.isPromptObject){let _=await this.executePromptStep(J,A,B);O=_.result,E=_.prompt,M=_.judgeModel}else O=await this.executeFunctionStep(J,B)}})}catch(_){throw D?.error({error:_,endSpan:!0}),_}if(E!==void 0||M!==void 0)D?.update({attributes:{...E!==void 0?{prompt:E}:{},...M!==void 0?{judgeModel:M}:{}}});D?.end({output:O});let R=E!==void 0?{...z,[`${J.name}Prompt`]:E}:z,q={...H,[`${J.name}StepResult`]:O};return{stepResult:O,accumulatedResults:q,generatedPrompts:R}}})}),X=IQ({id:`scorer-${this.config.id??this.config.name}`,description:this.config.description,inputSchema:U.object({run:U.any()}),outputSchema:U.object({run:U.any(),score:U.number(),reason:U.string().optional(),preprocessResult:U.any().optional(),analyzeResult:U.any().optional(),preprocessPrompt:U.string().optional(),analyzePrompt:U.string().optional(),generateScorePrompt:U.string().optional(),generateReasonPrompt:U.string().optional()}),options:{validateInputs:!1}});X.__setLogger(this.#$?.getLogger()??Ky0);let G=X;for(let J of Y)G=G.then(J);return G.commit()}createScorerContext(Y,X,G){if(Y==="generateReason"){let J=G.generateScoreStepResult;return{run:X,results:G,score:J}}return{run:X,results:G}}async executeFunctionStep(Y,X){return await Y.definition(X)}async executePromptStep(Y,X,G){let J=this.originalPromptObjects.get(Y.name);if(!J)throw Error(`Step "${Y.name}" is not a prompt object`);let Q=await J.createPrompt(G),W=J.judge?.model??this.config.judge?.model,K=J.judge?.instructions??this.config.judge?.instructions;if(!W||!K)throw new G0({id:"MASTR_SCORER_FAILED_TO_RUN_MISSING_MODEL_OR_INSTRUCTIONS",domain:"SCORER",category:"USER",text:`Step "${Y.name}" requires a model and instructions`,details:{scorerId:this.config.id??this.config.name,step:Y.name}});let Z=await RE(W,void 0,this.#$),H=Z.modelId,z=new YJ({id:"judge",name:"judge",model:Z,instructions:K});if(Y.name==="generateScore"){let V;if(ZG(Z))V=await A$0(z,Q,{structuredOutput:{schema:U.object({score:U.number()})},...X});else{let F=U.object({score:U.number()}),L=Q4(F);V=await z.generateLegacy(Q,{output:$6(L),...X})}return{result:V.object.score,prompt:Q,judgeModel:H}}else if(Y.name==="generateReason"){let V;if(ZG(Z))V=await z.generate(Q,{...X});else V=await z.generateLegacy(Q,{...X});return{result:V.text,prompt:Q,judgeModel:H}}else{let F=Q4(J.outputSchema),L;if(ZG(Z))L=await A$0(z,Q,{structuredOutput:{schema:F},...X});else L=await z.generateLegacy(Q,{output:$6(F),...X});return{result:L.object,prompt:Q,judgeModel:H}}}transformToScorerResult({workflowResult:Y,originalInput:X}){let G=Y.result,J=G?.accumulatedResults||{},Q=G?.generatedPrompts||{};return{...X,score:J.generateScoreStepResult,generateScorePrompt:Q.generateScorePrompt,reason:J.generateReasonStepResult,generateReasonPrompt:Q.generateReasonPrompt,preprocessStepResult:J.preprocessStepResult,preprocessPrompt:Q.preprocessPrompt,analyzeStepResult:J.analyzeStepResult,analyzePrompt:Q.analyzePrompt}}},v89,y89,m89=class{id="prepare-step";name="Prepare Step Processor";prepareStep;constructor($){this.prepareStep=$.prepareStep}async processInputStep($){return this.prepareStep($)}},o89,$99=class{content;finishReason;usage;warnings;request;response;providerMetadata;tripwire;constructor({content:$,finishReason:Y,usage:X,warnings:G,request:J,response:Q,providerMetadata:W,tripwire:K}){this.content=$,this.finishReason=Y,this.usage=X,this.warnings=G,this.request=J,this.response=Q,this.providerMetadata=W,this.tripwire=K}get text(){if(this.tripwire)return"";return this.content.filter(($)=>$.type==="text").map(($)=>$.text).join("")}get reasoning(){return this.content.filter(($)=>$.type==="reasoning")}get reasoningText(){return this.reasoning.length===0?void 0:this.reasoning.map(($)=>$.text).join("")}get files(){return this.content.filter(($)=>$.type==="file").map(($)=>$.file)}get sources(){return this.content.filter(($)=>$.type==="source")}get toolCalls(){return this.content.filter(($)=>$.type==="tool-call")}get staticToolCalls(){return this.toolCalls.filter(($)=>$.dynamic===!1)}get dynamicToolCalls(){return this.toolCalls.filter(($)=>$.dynamic===!0)}get toolResults(){return this.content.filter(($)=>$.type==="tool-result")}get staticToolResults(){return this.toolResults.filter(($)=>$.dynamic===!1)}get dynamicToolResults(){return this.toolResults.filter(($)=>$.dynamic===!0)}},uK4=class{#$;constructor({_internal:$,model:Y}){this.#$={responseMetadata:{id:$?.generateId?.(),timestamp:$?.currentDate?.(),modelId:Y.modelId,modelVersion:Y.specificationVersion,modelProvider:Y.provider,headers:void 0},modelMetadata:{modelId:Y.modelId,modelVersion:Y.specificationVersion,modelProvider:Y.provider},providerOptions:void 0,hasErrored:!1,apiError:void 0,deferredErrorChunk:void 0,stepResult:void 0}}setState($){this.#$={...this.#$,...$}}get state(){return this.#$}},r24,A99,Fg0=class{schema;validatePartialChunks=!1;partialSchema;constructor($,Y={}){if(this.schema=$,Y.validatePartialChunks&&this.isZodSchema($)&&"partial"in $&&typeof $.partial==="function")this.partialSchema=$.partial(),this.validatePartialChunks=!0}isZodSchema($){return T80($)}async validateValue($){if(!this.schema)return{success:!0,value:$};if(this.isZodSchema(this.schema))try{let Y=await this.schema["~standard"].validate($);if(!Y.issues)return{success:!0,value:Y.value};let X=Y.issues.map((Q)=>`- ${Q.path?.join(".")||"root"}: ${Q.message}`).join(`
`),G=this.schema.safeParse($),J=!G.success?G.error:void 0;return{success:!1,error:new G0({domain:"AGENT",category:"SYSTEM",id:"STRUCTURED_OUTPUT_SCHEMA_VALIDATION_FAILED",text:`Structured output validation failed: ${X}`,details:{value:typeof $==="object"?JSON.stringify($):String($)}},J)}}catch(Y){return{success:!1,error:Y instanceof Error?Y:Error("Zod validation failed",{cause:Y})}}try{let Y=await this.schema["~standard"].validate($);if(!Y.issues)return{success:!0,value:Y.value};let X=Y.issues.map((G)=>`- ${G.path?.join(".")||"root"}: ${G.message}`).join(`
`);return{success:!1,error:new G0({domain:"AGENT",category:"SYSTEM",id:"STRUCTURED_OUTPUT_SCHEMA_VALIDATION_FAILED",text:`Structured output validation failed: ${X}`,details:{value:typeof $==="object"?JSON.stringify($):String($)}})}}catch(Y){return{success:!1,error:Y instanceof Error?Y:Error("Validation failed",{cause:Y})}}}preprocessText($){let Y=$;if(Y.includes("<|message|>")){let G=Y.match(/<\|message\|>([\s\S]+)$/);if(G&&G[1])Y=G[1]}let X=Y.trimStart();if(/^```json\b/.test(X)){let G=X.match(/^```json\s*\n?([\s\S]*?)\n?\s*```\s*$/);if(G&&G[1])Y=G[1].trim();else Y=X.replace(/^```json\s*\n?/,"")}return Y=cK4(Y),Y}},B99,O99,E99,jX,P99="Observational Memory is not supported with agent network. Agent network does not propagate the threadId/resourceId context Observational Memory requires. Disable observationalMemory before using agent.network().",I99,C99=class{constructor($){this.capabilities=$}capabilities;__primitive({instructions:$,messages:Y,context:X,thread:G,memoryConfig:J,resourceId:Q,runId:W,toolsets:K,clientTools:Z,requestContext:H,writableStream:z,methodType:V,tracingOptions:F,inputProcessors:L,...N}){let D=e1(N);return{before:async()=>{let A=wW({type:"agent_run",name:`agent run: '${this.capabilities.id}'`,entityType:J6.AGENT,entityId:this.capabilities.id,entityName:this.capabilities.name,input:{messages:Y},attributes:{instructions:this.capabilities.convertInstructionsToString($),availableTools:[...K?Object.keys(K):[],...Z?Object.keys(Z):[]],...this.capabilities.resolvedVersionId?{resolvedVersionId:this.capabilities.resolvedVersionId}:{}},metadata:{runId:W,resourceId:Q,threadId:G?G.id:void 0},tracingPolicy:this.capabilities.tracingPolicy,tracingOptions:F,tracingContext:D.tracingContext,requestContext:H,mastra:this.capabilities.mastra}),B=g4({currentSpan:A}),O=await this.capabilities.getMemory({requestContext:H}),E=G?.id,M=await this.capabilities.convertTools({toolsets:K,clientTools:Z,threadId:E,resourceId:Q,runId:W,requestContext:H,...B,writableStream:z,methodType:V==="generate"?"generateLegacy":"streamLegacy",memoryConfig:J,inputProcessors:L}),R=new l6({threadId:E,resourceId:Q,generateMessageId:this.capabilities.mastra?.generateId?.bind(this.capabilities.mastra),_agentNetworkAppend:this.capabilities._agentNetworkAppend}).addSystem($||await this.capabilities.getInstructions({requestContext:H})).add(X||[],"context");if(!O||!E&&!Q){R.add(Y,"user");let{tripwire:C}=await this.capabilities.__runInputProcessors({requestContext:H,...B,messageList:R,inputProcessorOverrides:L});if(!C){let k=await this.capabilities.__runProcessInputStep({requestContext:H,...B,messageList:R,stepNumber:0,inputProcessorOverrides:L,tools:M,runId:W,threadId:E,resourceId:Q});if(k.tools)M=k.tools;if(k.tripwire)return{messageObjects:[],convertedTools:M,threadExists:!1,thread:void 0,messageList:R,agentSpan:A,tripwire:k.tripwire}}return{messageObjects:C?[]:R.get.all.prompt(),convertedTools:M,threadExists:!1,thread:void 0,messageList:R,agentSpan:A,tripwire:C}}if(!E||!Q){let C=new G0({id:"AGENT_MEMORY_MISSING_RESOURCE_ID",domain:"AGENT",category:"USER",details:{agentName:this.capabilities.name,threadId:E||"",resourceId:Q||""},text:`A resourceId and a threadId must be provided when using Memory. Saw threadId "${E}" and resourceId "${Q}"`});throw this.capabilities.logger.trackException(C),A?.error({error:C}),C}let q=void 0,_=await O.getThreadById({threadId:E});if(_)if(!_.metadata&&G.metadata||G.metadata&&!(0,I99.default)(_.metadata,G.metadata))q=await O.saveThread({thread:{..._,metadata:G.metadata},memoryConfig:J});else q=_;else q=await O.createThread({threadId:E,metadata:G.metadata,title:G.title,memoryConfig:J,resourceId:Q,saveThread:!0});H.set("MastraMemory",{thread:q,resourceId:Q,memoryConfig:J}),R.add(Y,"user");let{messageList:P,tripwire:w}=await this.capabilities.__runInputProcessors({requestContext:H,...B,messageList:R,inputProcessorOverrides:L});if(R=P,!w){let C=await this.capabilities.__runProcessInputStep({requestContext:H,...B,messageList:R,stepNumber:0,inputProcessorOverrides:L,tools:M,runId:W,threadId:E,resourceId:Q});if(C.tools)M=C.tools;if(C.tripwire)return{convertedTools:M,thread:q,messageList:R,messageObjects:[],agentSpan:A,tripwire:C.tripwire,threadExists:!!_}}let j=R.get.all.prompt();return{convertedTools:M,thread:q,messageList:R,messageObjects:j,agentSpan:A,tripwire:w,threadExists:!!_}},after:async({result:A,thread:B,threadId:O,memoryConfig:E,outputText:M,runId:R,messageList:q,threadExists:_,structuredOutput:P=!1,overrideScorers:w,agentSpan:j})=>{let C={text:A?.text,object:A?.object,toolResults:A?.toolResults,toolCalls:A?.toolCalls,usage:A?.usage,steps:A?.steps?.map((y)=>{return{stepType:y?.stepType,text:A?.text,object:A?.object,toolResults:A?.toolResults,toolCalls:A?.toolCalls,usage:A?.usage}})};this.capabilities.logger.debug("Post processing LLM response",{agentName:this.capabilities.name,runId:R,result:C,threadId:O});let S=new l6({threadId:O,resourceId:Q,generateMessageId:this.capabilities.mastra?.generateId?.bind(this.capabilities.mastra),_agentNetworkAppend:this.capabilities._agentNetworkAppend}).add(A.response.messages,"response").get.all.core()?.some((y)=>y.role==="tool"&&y?.content?.some((d)=>d?.toolName==="updateWorkingMemory")),I=await this.capabilities.getMemory({requestContext:H}),v=S?O?await I?.getThreadById({threadId:O}):void 0:B;if(I&&Q&&v)try{let y=A.response.messages;if(!y&&A.object)y=[{role:"assistant",content:[{type:"text",text:M}]}];if(y)q.add(y,"response");if(!_)await I.createThread({threadId:v.id,metadata:v.metadata,title:v.title,memoryConfig:E,resourceId:v.resourceId});let d=[],u=I.getMergedThreadConfig(E),{shouldGenerate:b,model:g,instructions:p,minMessages:h}=this.capabilities.resolveTitleGenerationConfig(u?.generateTitle),n=q.get.all.ui(),t=q.get.all.core(),s=h??1;if(b&&!v.title&&t.length>=s){let K0=this.capabilities.getMostRecentUserMessage(n);if(K0){let X0=g4({currentSpan:j});d.push(this.capabilities.genTitle(K0,H,X0,g,p).then((a)=>{if(a)return I.createThread({threadId:v.id,resourceId:Q,memoryConfig:E,title:a,metadata:v.metadata})}))}}if(d.length>0)await Promise.all(d)}catch(y){if(y instanceof G0)throw j?.error({error:y}),y;let d=new G0({id:"AGENT_MEMORY_PERSIST_RESPONSE_MESSAGES_FAILED",domain:"AGENT",category:"SYSTEM",details:{agentName:this.capabilities.name,runId:R||"",threadId:O||"",result:JSON.stringify(C)}},y);throw this.capabilities.logger.trackException(d),j?.error({error:d}),d}else{let y=A.response.messages;if(!y&&A.object)y=[{role:"assistant",content:[{type:"text",text:M}]}];if(y)q.add(y,"response")}await this.capabilities.runScorers({messageList:q,runId:R,requestContext:H,structuredOutput:P,overrideScorers:w,threadId:O,resourceId:Q,...g4({currentSpan:j})});let x={input:{inputMessages:q.getPersisted.input.ui(),rememberedMessages:q.getPersisted.remembered.ui(),systemMessages:q.getSystemMessages(),taggedSystemMessages:q.getPersisted.taggedSystemMessages},output:q.getPersisted.response.ui()};return j?.end({output:{text:A?.text,object:A?.object,files:A?.files}}),{scoringData:x}}}}async prepareLLMOptions($,Y,X){let{context:G,memoryOptions:J,resourceId:Q,maxSteps:W,onStepFinish:K,toolsets:Z,clientTools:H,temperature:z,toolChoice:V="auto",requestContext:F=new p1,tracingOptions:L,savePerStep:N,writableStream:D,inputProcessors:A,...B}=Y,O=F.get(eX),E=F.get(DX),M=Vg0({threadId:B.threadId,memory:B.memory,overrideId:E}),R=O||B.memory?.resource||Q,q=B.memory?.options||J;if(R&&M&&!this.capabilities.hasOwnMemory())this.capabilities.logger.warn("No memory configured but resourceId and threadId were passed in args",{agent:this.capabilities.name});let _=B.runId||this.capabilities.mastra?.generateId({idType:"run",source:"agent",entityId:this.capabilities.id,threadId:M?.id,resourceId:R})||E6(),P=B.instructions||await this.capabilities.getInstructions({requestContext:F}),w=await this.capabilities.getLLM({requestContext:F,model:B.model}),j=await this.capabilities.getMemory({requestContext:F}),{before:C,after:k}=this.__primitive({messages:$,instructions:P,context:G,thread:M,memoryConfig:q,resourceId:R,runId:_,toolsets:Z,clientTools:H,requestContext:F,writableStream:D,methodType:X,tracingOptions:L,inputProcessors:A,...e1(B)}),S,I,v,x=!1;return{llm:w,before:async()=>{let y=await C(),{messageObjects:d,convertedTools:u,agentSpan:b}=y;v=y.threadExists||!1,x=!1,S=y.messageList,I=y.thread;let g=I?.id;return{...{...Y,messages:d,tools:u,runId:_,temperature:z,toolChoice:V,threadId:g,resourceId:R,requestContext:F,onStepFinish:async(h)=>{if(N){if(!v&&!x&&j&&I)await j.createThread({threadId:g,title:I.title,metadata:I.metadata,resourceId:I.resourceId,memoryConfig:q}),x=!0}return K?.({...h,runId:_})},tripwire:y.tripwire,...B,agentSpan:b},messageList:S,requestContext:F}},after:async({result:y,outputText:d,structuredOutput:u=!1,agentSpan:b,overrideScorers:g})=>{return await k({result:y,outputText:d,threadId:I?.id,thread:I,memoryConfig:q,runId:_,messageList:S,structuredOutput:u,threadExists:v,agentSpan:b,overrideScorers:g})}}}async generateLegacy($,Y={}){if("structuredOutput"in Y&&Y.structuredOutput)throw new G0({id:"AGENT_GENERATE_LEGACY_STRUCTURED_OUTPUT_NOT_SUPPORTED",domain:"AGENT",category:"USER",text:"This method does not support structured output. Please use generate() instead."});let X=await Promise.resolve(this.capabilities.getDefaultGenerateOptionsLegacy({requestContext:Y.requestContext})),G={...X,...Y,experimental_generateMessageId:X.experimental_generateMessageId||this.capabilities.mastra?.generateId?.bind(this.capabilities.mastra)},{llm:J,before:Q,after:W}=await this.prepareLLMOptions($,G,"generate");if(J.getModel().specificationVersion!=="v1"){let w=J.getModel().specificationVersion;throw this.capabilities.logger.error(`Models with specificationVersion "${w}" are not supported for generateLegacy. Please use generate() instead.`,{modelId:J.getModel().modelId,specificationVersion:w}),new G0({id:"AGENT_GENERATE_V2_MODEL_NOT_SUPPORTED",domain:"AGENT",category:"USER",details:{modelId:J.getModel().modelId,specificationVersion:w},text:`Models with specificationVersion "${w}" are not supported for generateLegacy(). Please use generate() instead.`})}let K=J,Z=await Q(),{messageList:H,requestContext:z}=Z,V=Z.agentSpan?.externalTraceId,F=Z.agentSpan?.id;if(Z.tripwire)return Z.agentSpan?.end({output:{tripwire:Z.tripwire},attributes:{tripwireAbort:{reason:Z.tripwire.reason,processorId:Z.tripwire.processorId,retry:Z.tripwire.retry,metadata:Z.tripwire.metadata}}}),{text:"",object:void 0,usage:{totalTokens:0,promptTokens:0,completionTokens:0},finishReason:"other",response:{id:E6(),timestamp:new Date,modelId:"tripwire",messages:[]},responseMessages:[],toolCalls:[],toolResults:[],warnings:void 0,request:{body:JSON.stringify({messages:[]})},experimental_output:void 0,steps:void 0,experimental_providerMetadata:void 0,tripwire:Z.tripwire,traceId:V,spanId:F};let{experimental_output:L,output:N,agentSpan:D,...A}=Z,B=g4({currentSpan:D}),O=G.outputProcessors;if(!N||L){let w=await K.__text({...A,...B,experimental_output:L});H.add({role:"assistant",content:[{type:"text",text:w.text}]},"response");let j=await this.capabilities.__runOutputProcessors({requestContext:z||new p1,...B,outputProcessorOverrides:O,messageList:H});if(j.tripwire)return D?.end({output:{tripwire:j.tripwire},attributes:{tripwireAbort:{reason:j.tripwire.reason,processorId:j.tripwire.processorId,retry:j.tripwire.retry,metadata:j.tripwire.metadata}}}),{text:"",object:void 0,usage:{totalTokens:0,promptTokens:0,completionTokens:0},finishReason:"other",response:{id:E6(),timestamp:new Date,modelId:"tripwire",messages:[]},responseMessages:[],toolCalls:[],toolResults:[],warnings:void 0,request:{body:JSON.stringify({messages:[]})},experimental_output:void 0,steps:void 0,experimental_providerMetadata:void 0,tripwire:j.tripwire,traceId:V,spanId:F};let C=j.messageList.get.response.db().map((I)=>I.content.parts.map((v)=>v.type==="text"?v.text:"").join("")).join("");if(w.text=C,O&&O.length>0){let I=j.messageList.get.response.db();this.capabilities.logger.debug("Checking messages for experimentalOutput metadata:",I.map((x)=>({role:x.role,hasContentMetadata:!!x.content.metadata,contentMetadata:x.content.metadata})));let v=I.filter((x)=>x.content.metadata&&x.content.metadata.structuredOutput);if(this.capabilities.logger.debug("Messages with structured data:",v.length),v[0]&&v[0].content.metadata?.structuredOutput)w.object=v[0].content.metadata.structuredOutput,this.capabilities.logger.debug("Using structured data from processor metadata for result.object");else try{let x=JSON.parse(C);w.object=x,this.capabilities.logger.debug("Using fallback JSON parsing for result.object")}catch(x){this.capabilities.logger.warn("Failed to parse processed output as JSON, updating text only",{error:x})}}let k=G.scorers,S=await W({result:w,outputText:C,agentSpan:D,...k?{overrideScorers:k}:{}});if(Y.returnScorerData)w.scoringData=S.scoringData;return w.traceId=V,w.spanId=F,w}let E=await K.__textObject({...A,...B,structuredOutput:N}),M=JSON.stringify(E.object);H.add({role:"assistant",content:[{type:"text",text:M}]},"response");let R=await this.capabilities.__runOutputProcessors({requestContext:z||new p1,...B,messageList:H});if(R.tripwire)return D?.end({output:{tripwire:R.tripwire},attributes:{tripwireAbort:{reason:R.tripwire.reason,processorId:R.tripwire.processorId,retry:R.tripwire.retry,metadata:R.tripwire.metadata}}}),{text:"",object:void 0,usage:{totalTokens:0,promptTokens:0,completionTokens:0},finishReason:"other",response:{id:E6(),timestamp:new Date,modelId:"tripwire",messages:[]},responseMessages:[],toolCalls:[],toolResults:[],warnings:void 0,request:{body:JSON.stringify({messages:[]})},experimental_output:void 0,steps:void 0,experimental_providerMetadata:void 0,tripwire:R.tripwire,traceId:V,spanId:F};let q=R.messageList.get.response.db().map((w)=>w.content.parts.map((j)=>j.type==="text"?j.text:"").join("")).join("");try{let w=JSON.parse(q);E.object=w}catch(w){this.capabilities.logger.warn("Failed to parse processed output as JSON, keeping original object",{error:w})}let _=G.scorers,P=await W({result:E,outputText:q,structuredOutput:!0,agentSpan:D,..._?{overrideScorers:_}:{}});if(Y.returnScorerData)E.scoringData=P.scoringData;return E.traceId=V,E.spanId=F,E}async streamLegacy($,Y={}){let X=await Promise.resolve(this.capabilities.getDefaultStreamOptionsLegacy({requestContext:Y.requestContext})),G={...X,...Y,experimental_generateMessageId:X.experimental_generateMessageId||this.capabilities.mastra?.generateId?.bind(this.capabilities.mastra)},{llm:J,before:Q,after:W}=await this.prepareLLMOptions($,G,"stream");if(J.getModel().specificationVersion!=="v1"){let R=J.getModel().specificationVersion;throw this.capabilities.logger.error(`Models with specificationVersion "${R}" are not supported for streamLegacy. Please use stream() instead.`,{modelId:J.getModel().modelId,specificationVersion:R}),new G0({id:"AGENT_STREAM_V2_MODEL_NOT_SUPPORTED",domain:"AGENT",category:"USER",details:{modelId:J.getModel().modelId,specificationVersion:R},text:`Models with specificationVersion "${R}" are not supported for streamLegacy(). Please use stream() instead.`})}let K=await Q(),Z=K.agentSpan?.externalTraceId,H=K.agentSpan?.id;if(K.tripwire)return K.agentSpan?.end({output:{tripwire:K.tripwire},attributes:{tripwireAbort:{reason:K.tripwire.reason,processorId:K.tripwire.processorId,retry:K.tripwire.retry,metadata:K.tripwire.metadata}}}),{textStream:async function*(){}(),fullStream:Promise.resolve("").then(()=>{return new globalThis.ReadableStream({start(_){_.close()}})}),text:Promise.resolve(""),usage:Promise.resolve({totalTokens:0,promptTokens:0,completionTokens:0}),finishReason:Promise.resolve("other"),tripwire:K.tripwire,response:{id:E6(),timestamp:new Date,modelId:"tripwire",messages:[]},toolCalls:Promise.resolve([]),toolResults:Promise.resolve([]),warnings:Promise.resolve(void 0),request:{body:JSON.stringify({messages:[]})},experimental_output:void 0,steps:void 0,experimental_providerMetadata:void 0,traceId:Z,spanId:H,toAIStream:()=>Promise.resolve("").then(()=>{return new globalThis.ReadableStream({start(_){_.close()}})}),get experimental_partialOutputStream(){return async function*(){}()},pipeDataStreamToResponse:()=>Promise.resolve(),pipeTextStreamToResponse:()=>Promise.resolve(),toDataStreamResponse:()=>new Response("",{status:200,headers:{"Content-Type":"text/plain"}}),toTextStreamResponse:()=>new Response("",{status:200,headers:{"Content-Type":"text/plain"}})};let{onFinish:z,runId:V,output:F,experimental_output:L,agentSpan:N,messageList:D,requestContext:A,...B}=K,O=G.scorers,E=g4({currentSpan:N});if(!F||L){let R=J.__stream({...B,experimental_output:L,...E,requestContext:A,outputProcessors:await this.capabilities.listResolvedOutputProcessors(A),onFinish:async(q)=>{try{D.add(q.response.messages,"response");let _=await this.capabilities.__runOutputProcessors({requestContext:A,...E,messageList:D});if(_.tripwire){N?.end({output:{tripwire:_.tripwire},attributes:{tripwireAbort:{reason:_.tripwire.reason,processorId:_.tripwire.processorId,retry:_.tripwire.retry,metadata:_.tripwire.metadata}}}),await z?.({...q,runId:V});return}let P=q.text;await W({result:q,outputText:P,agentSpan:N,...O?{overrideScorers:O}:{}})}catch(_){this.capabilities.logger.error("Error saving memory on finish",{error:_,runId:V})}await z?.({...q,runId:V})},runId:V});return R.traceId=Z,R.spanId=H,R}this.capabilities.logger.debug("Starting LLM streamObject call",{agent:this.capabilities.name,runId:V});let M=J.__streamObject({...B,...E,requestContext:A,onFinish:async(R)=>{try{if(R.object){let P=[{role:"assistant",content:[{type:"text",text:JSON.stringify(R.object)}]}];D.add(P,"response")}let q=await this.capabilities.__runOutputProcessors({requestContext:A,...E,messageList:D});if(q.tripwire){N?.end({output:{tripwire:q.tripwire},attributes:{tripwireAbort:{reason:q.tripwire.reason,processorId:q.tripwire.processorId,retry:q.tripwire.retry,metadata:q.tripwire.metadata}}}),await z?.({...R,runId:V});return}let _=JSON.stringify(R.object);await W({result:R,outputText:_,structuredOutput:!0,agentSpan:N,...O?{overrideScorers:O}:{}})}catch(q){this.capabilities.logger.error("Error saving memory on finish",{error:q,runId:V})}await z?.({...R,runId:V})},runId:V,structuredOutput:F});return M.traceId=Z,M.spanId=H,M}},S99=class ${logger;debounceMs;memory;static MAX_STALENESS_MS=1000;constructor({logger:Y,debounceMs:X,memory:G}){this.logger=Y,this.debounceMs=X||100,this.memory=G}saveQueues=new Map;saveDebounceTimers=new Map;debounceSave(Y,X,G){return new Promise((J,Q)=>{if(this.saveDebounceTimers.has(Y))clearTimeout(this.saveDebounceTimers.get(Y));this.saveDebounceTimers.set(Y,setTimeout(()=>{this.enqueueSave(Y,X,G).then(J).catch((W)=>{this.logger?.error?.("Error in debounceSave",{err:W,threadId:Y}),Q(W)}).finally(()=>{this.saveDebounceTimers.delete(Y)})},this.debounceMs))})}enqueueSave(Y,X,G){let Q=(this.saveQueues.get(Y)||Promise.resolve()).then(()=>this.persistUnsavedMessages(X,G)).catch((W)=>{this.logger?.error?.("Error in enqueueSave",{err:W,threadId:Y})}).then(()=>{if(this.saveQueues.get(Y)===Q)this.saveQueues.delete(Y)});return this.saveQueues.set(Y,Q),Q}clearDebounce(Y){if(this.saveDebounceTimers.has(Y))clearTimeout(this.saveDebounceTimers.get(Y)),this.saveDebounceTimers.delete(Y)}async persistUnsavedMessages(Y,X){let G=Y.drainUnsavedMessages();if(G.length>0&&this.memory)await this.memory.saveMessages({messages:G,memoryConfig:X})}async batchMessages(Y,X,G){if(!X)return;let J=Y.getEarliestUnsavedMessageTimestamp(),Q=Date.now();if(J&&Q-J>$.MAX_STALENESS_MS)return this.flushMessages(Y,X,G);else return this.debounceSave(X,Y,G)}async flushMessages(Y,X,G){if(!X)return;return this.clearDebounce(X),this.enqueueSave(X,Y,G)}},t24,g99="\x00",m99=class{#$=new Map;#Y=new Map;#X=new Map;#J=new Map;#G=new Map;#Q=new Map;#U=new Set;#Z=new Map;#W=new Set;#H($,Y){return[$??"",Y].join(g99)}#F($){let Y=$?.memory?.thread,X=$?.requestContext?.get(DX)||(typeof Y==="string"?Y:Y?.id),G=$?.requestContext?.get(eX)||$?.memory?.resource;return{threadId:X,resourceId:G}}prepareRunOptions($){let{threadId:Y}=this.#F($);if(!Y||!$.runId)return $;let X=new AbortController,G=$.abortSignal,J=()=>X.abort();if(G?.aborted)J();else G?.addEventListener("abort",J,{once:!0});if(this.#Z.set($.runId,{abortController:X,cleanup:()=>G?.removeEventListener("abort",J)}),this.#W.has($.runId))J();return{...$,abortSignal:X.signal}}abortRun($){let Y=this.#Z.get($);if(!Y)return this.#W.add($),!1;return Y.abortController.abort(),this.#W.add($),!0}abortThread($){let Y=this.#H($.resourceId,$.threadId),X=this.#X.get(Y);if(!X)return!1;return this.abortRun(X)}resetForTests(){this.#Z.forEach(($)=>{$.abortController.abort(),$.cleanup()}),this.#$.clear(),this.#Y.clear(),this.#X.clear(),this.#J.clear(),this.#G.clear(),this.#Q.clear(),this.#U.clear(),this.#Z.clear(),this.#W.clear()}#V($){this.#Z.get($)?.cleanup(),this.#Z.delete($),this.#W.delete($)}#K($){let Y=this.#H($.resourceId,$.threadId);this.#J.get(Y)?.forEach((X)=>X($))}async#A($,Y,X,G,J){let Q=await $.getMemory({requestContext:J});if(!Q)return;await Q.saveMessages({messages:[Y.toDBMessage({resourceId:X,threadId:G})]})}registerRun($,Y,X){let{threadId:G,resourceId:J}=this.#F(X);if(!G)return;let Q=this.#H(J,G),W={agent:$,output:Y,runId:Y.runId,threadId:G,resourceId:J,streamOptions:X};this.#$.set(Y.runId,W),this.#Y.set(Y.runId,Q),this.#X.set(Q,Y.runId),this.#K(W),this.#O(Q,W)}#O($,Y){if(this.#U.has(Y.runId))return;this.#U.add(Y.runId),Y.output._waitUntilFinished().finally(()=>{if(this.#U.delete(Y.runId),this.#$.delete(Y.runId),this.#Y.delete(Y.runId),this.#V(Y.runId),this.#X.get($)===Y.runId)this.#X.delete($);this.#N($,Y)})}async#N($,Y){if(this.#X.has($))return;let X=this.#G.get($),G=X?.shift();if(G&&X){if(X.length===0)this.#G.delete($);let W=await Y.agent.stream(G,{...Y.streamOptions,runId:E6(),memory:of0(Y.streamOptions.memory,Y.resourceId??"",Y.threadId??"")});if(X.length>0){let K=this.#$.get(W.runId);if(K)this.#O($,K)}return}let J=this.#Q.get($),Q=J?.shift();if(!Q||!J)return;if(J.length===0)this.#Q.delete($);this.#X.set($,Q.runId),this.#Y.set(Q.runId,$);try{let W=await Q.agent.stream(Q.signal,{...Q.streamOptions,runId:Q.runId,memory:of0(Q.streamOptions?.memory,Q.resourceId,Q.threadId)});if((J?.length??0)>0){let K=this.#$.get(W.runId);if(K)this.#O($,K)}}catch{if(this.#Y.delete(Q.runId),this.#V(Q.runId),this.#X.get($)===Q.runId)this.#X.delete($)}}drainPendingSignals($){let Y=this.#$.get($),X=Y?this.#H(Y.resourceId,Y.threadId):this.#Y.get($);if(!X)return[];let G=this.#G.get(X);if(!G||G.length===0)return[];return this.#G.delete(X),G}async waitForCrossAgentThreadRun($,Y){let{threadId:X,resourceId:G}=this.#F(Y);if(!X)return;let J=this.#H(G,X);while(!0){let Q=this.#X.get(J),W=Q?this.#$.get(Q):void 0;if(!W||W.agent.id===$.id||W.output.status!=="running")return;await W.output._waitUntilFinished().catch(()=>{})}}async subscribeToThread($,Y){let X=this.#H(Y.resourceId,Y.threadId),G=new Set,J=[],Q=[],W=!1,K=()=>{while(Q.length)Q.shift()?.()},Z=()=>{let N=this.#X.get(X);if(!N)return null;let D=this.#$.get(N);if(!D)return null;return D.output.status==="running"?N:null},H=(N)=>{if(W||G.has(N.runId))return;G.add(N.runId),J.push(N),K()},z=this.#J.get(X)??new Set;z.add(H),this.#J.set(X,z);let V=Z(),F=V?this.#$.get(V):void 0;if(F)H(F);let L=()=>{if(W)return;if(W=!0,z.delete(H),z.size===0)this.#J.delete(X);K()};return{activeRunId:Z,abort:()=>this.abortThread(Y),unsubscribe:L,stream:async function*(){try{while(!W||J.length>0){if(J.length===0){await new Promise((D)=>Q.push(D));continue}let N=J.shift();for await(let D of N.output.fullStream)if(yield D,W)break}}finally{L()}}()}}sendSignal($,Y,X){let G=Wj({...Y,acceptedAt:new Date}),J,Q=X.runId,W=X.ifActive?.behavior??"deliver",K=X.ifIdle?.behavior??"wake",Z;if(X.resourceId&&X.threadId){J=this.#H(X.resourceId,X.threadId);let F=this.#X.get(J);if(Z=F?this.#$.get(F):void 0,Z&&Z.output.status!=="running")this.#X.delete(J),Z=void 0;if(Z&&Z.agent.id===$.id)Q=Z.runId;else if(F&&!Z)Q=F}let H=Boolean(Q&&(Z?.output.status==="running"||J&&this.#X.get(J)===Q)),z=X.resourceId??Z?.resourceId,V=X.threadId??Z?.threadId;if(H&&W!=="deliver"){if(W==="persist"){if(!z||!V)throw Error("resourceId and threadId are required to persist an active signal");let F=this.#A($,G,z,V,X.ifIdle?.streamOptions?.requestContext);return F.catch(()=>{}),{accepted:!0,runId:Q,signal:G,persisted:F}}return{accepted:!0,runId:Q,signal:G}}if(Q){if(Z??=this.#$.get(Q),Z?.output.status==="running"){if(J??=this.#H(Z.resourceId,Z.threadId),Z.agent.id===$.id){let F=this.#G.get(J)??[];return F.push(G),this.#G.set(J,F),this.#O(J,Z),{accepted:!0,runId:Q,signal:G}}}if(J&&this.#X.get(J)===Q){let F=this.#G.get(J)??[];return F.push(G),this.#G.set(J,F),{accepted:!0,runId:Q,signal:G}}}if(!z||!V)throw Error("No active agent run found for signal target");if(Q=E6(),K!=="wake"){if(K==="persist"){let F=this.#A($,G,z,V,X.ifIdle?.streamOptions?.requestContext);return F.catch(()=>{}),{accepted:!0,runId:Q,signal:G,persisted:F}}return{accepted:!0,runId:Q,signal:G}}if(J??=this.#H(z,V),this.#X.has(J)){let F=this.#Q.get(J)??[];if(F.push({agent:$,signal:G,runId:Q,resourceId:z,threadId:V,streamOptions:X.ifIdle?.streamOptions}),this.#Q.set(J,F),Z)this.#O(J,Z);return{accepted:!0,runId:Q,signal:G}}return this.#X.set(J,Q),this.#Y.set(Q,J),$.stream(G,{...X.ifIdle?.streamOptions,runId:Q,memory:of0(X.ifIdle?.streamOptions?.memory,z,V)}).catch(()=>{if(this.#Y.delete(Q),this.#V(Q),this.#X.get(J)===Q)this.#X.delete(J)}),{accepted:!0,runId:Q,signal:G}}},u99,d99,c99,l99,i99,YJ,uT,u6,e99=async({tripwire:$,runId:Y,options:X,model:G,messageList:J,...Q})=>{let W=e1(Q),K=new e2({start(H){H.enqueue({type:"tripwire",runId:Y,from:"AGENT",payload:{reason:$.reason||"",retry:$.retry,metadata:$.metadata,processorId:$.processorId}}),H.close()}});return new uT({model:{modelId:G.modelId,provider:G.provider,version:G.specificationVersion},stream:K,messageList:J,options:{runId:Y,structuredOutput:X.structuredOutput,...W,onFinish:X.onFinish,onStepFinish:X.onStepFinish,returnScorerData:X.returnScorerData,requestContext:X.requestContext},messageId:E6()})},GK4,$59=class{id="trailing-assistant-guard";name="Trailing Assistant Guard";processInputStep({messages:$,structuredOutput:Y}){if(!(Y?.schema&&!Y?.model&&!Y?.jsonPromptInjection))return;let G=$[$.length-1];if(!G||G.role!=="assistant")return;return{messages:[...$,{id:E6(),role:"user",content:{format:2,parts:[{type:"text",text:"Generate the structured response."}]},createdAt:new Date}]}}},JD=class{inputAccumulatedText="";outputAccumulatedText="";outputChunkCount=0;customState={};streamParts=[];span;constructor($){if(!$?.createSpan||!$.processorName)return;let Y=$.tracingContext?.currentSpan,X=Y?.findParent("agent_run")||Y?.parent||Y;this.span=X?.createChildSpan({type:"processor_run",name:`output stream processor: ${$.processorName}`,entityType:J6.OUTPUT_PROCESSOR,entityName:$.processorName,attributes:{processorExecutor:"legacy",processorIndex:$.processorIndex??0},input:{totalChunks:0}})}addInputPart($){if($.type==="text-delta")this.inputAccumulatedText+=$.payload.text;if(this.streamParts.push($),this.span)this.span.input={totalChunks:this.streamParts.length,accumulatedText:this.inputAccumulatedText}}addOutputPart($){if(!$)return;if(this.outputChunkCount++,$.type==="text-delta")this.outputAccumulatedText+=$.payload.text}getFinalOutput(){return{totalChunks:this.outputChunkCount,accumulatedText:this.outputAccumulatedText}}},V5=class ${inputProcessors;outputProcessors;errorProcessors;logger;agentName;processorStates;constructor({inputProcessors:Y,outputProcessors:X,errorProcessors:G,logger:J,agentName:Q,processorStates:W}){this.inputProcessors=Y??[],this.outputProcessors=X??[],this.errorProcessors=G??[],this.logger=J,this.agentName=Q,this.processorStates=W??new Map}getProcessorState(Y){let X=this.processorStates.get(Y);if(!X)X=new JD,this.processorStates.set(Y,X);return X}async executeWorkflowAsProcessor(Y,X,G,J,Q,W){let Z=await(await Y.createRun()).start({inputData:{...X,processorStates:this.processorStates,abortSignal:W},...G,requestContext:J,outputWriter:Q?(z)=>Q.custom(z):void 0});if(Z.status==="tripwire"){let z=Z.tripwire;throw new u6(z?.reason||`Tripwire triggered in workflow ${Y.id}`,{retry:z?.retry,metadata:z?.metadata},z?.processorId||Y.id)}if(Z.status!=="success"){let z=[];if(Z.status==="failed"){if(Z.error)z.push(Z.error.message||JSON.stringify(Z.error));for(let[F,L]of Object.entries(Z.steps))if(L.status==="failed"&&L.error?.message)z.push(`step ${F}: ${L.error.message}`)}let V=z.length>0?` \u2014 ${z.join("; ")}`:"";throw new G0({category:"USER",domain:"AGENT",id:"PROCESSOR_WORKFLOW_FAILED",text:`Processor workflow ${Y.id} failed with status: ${Z.status}${V}`})}let H=Z.result;if(!H||typeof H!=="object")return X;if(!("phase"in H)||!(("messages"in H)||("part"in H)||("messageList"in H)))throw new G0({category:"USER",domain:"AGENT",id:"PROCESSOR_WORKFLOW_INVALID_OUTPUT",text:`Processor workflow ${Y.id} returned invalid output format. Expected ProcessorStepOutput.`});return H}async runOutputProcessors(Y,X,G,J=0,Q,W){for(let[K,Z]of this.outputProcessors.entries()){let z=[...Y.get.response.db()],V=z.map((_)=>_.id),F=Y.makeMessageSourceChecker();if(V9(Z)){await this.executeWorkflowAsProcessor(Z,{phase:"outputResult",messages:z,messageList:Y,retryCount:J,result:W},X,G,Q);continue}let L=Z,N=(_,P)=>{throw new u6(_||`Tripwire triggered by ${L.id}`,P,L.id)},D=L.processOutputResult?.bind(L);if(!D)continue;let A=z,B=Y.getAllSystemMessages(),O={text:"",usage:{inputTokens:0,outputTokens:0,totalTokens:0},finishReason:"unknown",steps:[]},E=W?$80(W):void 0,M=X?.tracingContext?.currentSpan,q=(M?.findParent("agent_run")||M?.parent||M)?.createChildSpan({type:"processor_run",name:`output processor: ${L.id}`,entityType:J6.OUTPUT_PROCESSOR,entityId:L.id,entityName:L.name,attributes:{processorExecutor:"legacy",processorIndex:K},input:{messages:z,...E?{result:E}:{},retryCount:J}});Y.startRecording();try{let _=this.getProcessorState(L.id),P=await D({messages:z,messageList:Y,state:_.customState,result:W??O,abort:N,...g4({currentSpan:q}),requestContext:G,retryCount:J,writer:Q,sendSignal:am({messageList:Y,writer:Q})}),w=Y.stopRecording();if(P instanceof l6){if(P!==Y)throw new G0({category:"USER",domain:"AGENT",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${L.id} returned a MessageList instance other than the one that was passed in as an argument. New external message list instances are not supported. Use the messageList argument instead.`});if(w.length>0)z=P.get.response.db()}else if(P){let j=V.filter((C)=>!P.some((k)=>k.id===C));if(j.length)Y.removeByIds(j);z=P||[];for(let C of P)Y.removeByIds([C.id]),Y.add(C,F.getSource(C)||"response")}q?.end({output:{...!i3(A,z)?{messages:z}:{},...!i3(B,Y.getAllSystemMessages())?{systemMessages:Y.getAllSystemMessages()}:{}},attributes:w.length>0?{messageListMutations:w}:void 0})}catch(_){if(Y.stopRecording(),_ instanceof u6)throw q?.error({error:_,endSpan:!0,attributes:{tripwireAbort:{reason:_.message,retry:_.options?.retry,metadata:_.options?.metadata}}}),await ID(L,_),_;throw q?.error({error:_,endSpan:!0}),_}}return Y}async processPart(Y,X,G,J,Q,W=0,K){if(!this.outputProcessors.length)return{part:Y,blocked:!1};try{let Z=Y,H=Y.type==="finish";for(let[z,V]of this.outputProcessors.entries()){if(V9(V)){if(!Z)continue;let L=V.id,N=X.get(L);if(!N)N=new JD,X.set(L,N);N.addInputPart(Z);try{let D=await this.executeWorkflowAsProcessor(V,{phase:"outputStream",part:Z,streamParts:N.streamParts,state:N.customState,messageList:Q,retryCount:W},G,J,K);if("part"in D)Z=D.part;N.addOutputPart(Z)}catch(D){if(D instanceof u6)return{part:null,blocked:!0,reason:D.message,tripwireOptions:D.options,processorId:D.processorId||L};this.logger.error("Output processor workflow failed",{agent:this.agentName,workflowId:L,error:D})}continue}let F=V;try{if(F.processOutputStream&&Z){let L=X.get(F.id);if(!L)L=new JD({processorName:F.name??F.id,...G,processorIndex:z,createSpan:!0}),X.set(F.id,L);L.addInputPart(Z),Z=await F.processOutputStream({part:Z,streamParts:L.streamParts,state:L.customState,abort:(D,A)=>{throw new u6(D||`Stream part blocked by ${F.id}`,A,F.id)},...g4({currentSpan:L.span}),requestContext:J,messageList:Q,retryCount:W,writer:K}),L.addOutputPart(Z)}}catch(L){if(L instanceof u6)return X.get(F.id)?.span?.error({error:L,endSpan:!0,attributes:{tripwireAbort:{reason:L.message,retry:L.options?.retry,metadata:L.options?.metadata}}}),await ID(F,L),{part:null,blocked:!0,reason:L.message,tripwireOptions:L.options,processorId:F.id};X.get(F.id)?.span?.error({error:L,endSpan:!0}),this.logger.error("Output processor failed",{agent:this.agentName,processorId:F.id,error:L})}}if(H){for(let z of X.values())if(z.span)z.span.end({output:z.getFinalOutput()})}return{part:Z,blocked:!1}}catch(Z){this.logger.error("Stream part processing failed",{agent:this.agentName,error:Z});for(let H of X.values())H.span?.error({error:Z,endSpan:!0});return{part:Y,blocked:!1}}}async runOutputProcessorsForStream(Y,X,G){return new ReadableStream({start:async(J)=>{let Q=Y.fullStream.getReader(),W=new Map,K=G??{custom:async(Z)=>J.enqueue(Z)};try{while(!0){let{done:Z,value:H}=await Q.read();if(Z){J.close();break}let{part:z,blocked:V,reason:F,tripwireOptions:L,processorId:N}=await this.processPart(H,W,X,void 0,void 0,0,K);if(V){this.logger.debug("Stream part blocked by output processor",{agent:this.agentName,reason:F,originalPart:H}),J.enqueue({type:"tripwire",payload:{reason:F||"Output processor blocked content",retry:L?.retry,metadata:L?.metadata,processorId:N}}),J.close();break}else if(z!=null)J.enqueue(z)}}catch(Z){J.error(Z)}}})}async runInputProcessors(Y,X,G,J=0){for(let[Q,W]of this.inputProcessors.entries()){let K=Y.get.input.db(),Z=K.map((E)=>E.id),H=Y.makeMessageSourceChecker();if(V9(W)){let E=Y.getAllSystemMessages();await this.executeWorkflowAsProcessor(W,{phase:"input",messages:K,messageList:Y,systemMessages:E,retryCount:J},X,G);continue}let z=W,V=(E,M)=>{throw new u6(E||`Tripwire triggered by ${z.id}`,M,z.id)},F=z.processInput?.bind(z);if(!F)continue;let L=Y.getAllSystemMessages(),N=K,D=L,A=X?.tracingContext?.currentSpan,O=(A?.findParent("agent_run")||A?.parent||A)?.createChildSpan({type:"processor_run",name:`input processor: ${z.id}`,entityType:J6.INPUT_PROCESSOR,entityId:z.id,entityName:z.name,attributes:{processorExecutor:"legacy",processorIndex:Q},input:{messages:K,systemMessages:L}});Y.startRecording();try{let E=this.getProcessorState(z.id),M=await F({messages:K,systemMessages:L,state:E.customState,abort:V,...g4({currentSpan:O}),messageList:Y,requestContext:G,retryCount:J,sendSignal:am({messageList:Y})}),R;if(M instanceof l6){if(M!==Y)throw new G0({category:"USER",domain:"AGENT",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${z.id} returned a MessageList instance other than the one that was passed in as an argument. New external message list instances are not supported. Use the messageList argument instead.`});if(R=Y.stopRecording(),R.length>0)K=Y.get.input.db()}else if(this.isProcessInputResultWithSystemMessages(M)){R=Y.stopRecording(),Y.replaceAllSystemMessages(M.systemMessages);let q=M.messages;if(q){let _=Z.filter((j)=>!q.some((C)=>C.id===j));if(_.length)Y.removeByIds(_);let P=q.filter((j)=>j.role==="system"),w=q.filter((j)=>j.role!=="system");for(let j of P){let C=j.content.content??j.content.parts?.map((k)=>k.type==="text"?k.text:"").join(`
`)??"";Y.addSystem(C)}if(w.length>0)for(let j of w)Y.removeByIds([j.id]),Y.add(j,H.getSource(j)||"input")}K=Y.get.input.db()}else if(R=Y.stopRecording(),M){let q=Z.filter((w)=>!M.some((j)=>j.id===w));if(q.length)Y.removeByIds(q);let _=M.filter((w)=>w.role==="system"),P=M.filter((w)=>w.role!=="system");for(let w of _){let j=w.content.content??w.content.parts?.map((C)=>C.type==="text"?C.text:"").join(`
`)??"";Y.addSystem(j)}if(P.length>0)for(let w of P)Y.removeByIds([w.id]),Y.add(w,H.getSource(w)||"input");K=Y.get.input.db()}O?.end({output:{...!i3(N,K)?{messages:K}:{},...!i3(D,Y.getAllSystemMessages())?{systemMessages:Y.getAllSystemMessages()}:{}},attributes:R.length>0?{messageListMutations:R}:void 0})}catch(E){if(Y.stopRecording(),E instanceof u6)throw O?.error({error:E,endSpan:!0,attributes:{tripwireAbort:{reason:E.message,retry:E.options?.retry,metadata:E.options?.metadata}}}),await ID(z,E),E;throw O?.error({error:E,endSpan:!0}),E}}return Y}async runProcessInputStep(Y){let{messageList:X,stepNumber:G,steps:J,requestContext:Q,writer:W}=Y,K=e1(Y),Z={messageId:Y.messageId,tools:Y.tools,toolChoice:Y.toolChoice,model:Y.model,activeTools:Y.activeTools,providerOptions:Y.providerOptions,modelSettings:Y.modelSettings,structuredOutput:Y.structuredOutput,retryCount:Y.retryCount??0},H=Z.model&&nK4(Z.model)?[...this.inputProcessors,new $59]:this.inputProcessors;for(let[z,V]of H.entries()){let F=X.get.all.db(),L=F.map((q)=>q.id),N=X.makeMessageSourceChecker();if(V9(V)){let q=X.getAllSystemMessages(),_=await this.executeWorkflowAsProcessor(V,{phase:"inputStep",messages:F,messageList:X,stepNumber:G,steps:J,systemMessages:q,rotateResponseMessageId:Y.rotateResponseMessageId?()=>{let P=Y.rotateResponseMessageId();return Z.messageId=P,P}:void 0,...Z},K,Q,W,Y.abortSignal);Object.assign(Z,_);continue}let D=V,A=D.processInputStep?.bind(D);if(!A)continue;let B=(q,_)=>{throw new u6(q||`Tripwire triggered by ${D.id}`,_,D.id)},O=X.getAllSystemMessages(),E={messages:F,stepNumber:G,steps:J,messageId:Z.messageId,systemMessages:O,tools:Z.tools,toolChoice:Z.toolChoice,model:Z.model,activeTools:Z.activeTools,providerOptions:Z.providerOptions,modelSettings:Z.modelSettings,structuredOutput:Z.structuredOutput,requestContext:Q},R=K.tracingContext?.currentSpan?.createChildSpan({type:"processor_run",name:`input step processor: ${D.id}`,entityType:J6.INPUT_STEP_PROCESSOR,entityId:D.id,entityName:D.name,attributes:{processorExecutor:"legacy",processorIndex:z},input:Y59({messages:E.messages,systemMessages:E.systemMessages,stepNumber:E.stepNumber,messageId:E.messageId,retryCount:Y.retryCount??0,model:E.model,tools:E.tools,toolChoice:E.toolChoice,activeTools:E.activeTools})});X.startRecording();try{let q=this.getProcessorState(D.id),_={messageId:E.messageId,model:E.model,tools:E.tools,toolChoice:E.toolChoice,activeTools:E.activeTools},P=Y.rotateResponseMessageId?()=>{let v=Y.rotateResponseMessageId();return Z.messageId=v,v}:void 0,w={messageList:X,...E,state:q.customState,abort:B,...P?{rotateResponseMessageId:P}:{},...g4({currentSpan:R}),retryCount:Y.retryCount??0,writer:W,abortSignal:Y.abortSignal,sendSignal:am({messageList:X,writer:W,rotateResponseMessageId:P})},j=await $.validateAndFormatProcessInputStepResult(await A(w),{messageList:X,processor:D,stepNumber:G}),{messages:C,systemMessages:k,...S}=j;if(C)$.applyMessagesToMessageList(C,X,L,N);if(k)X.replaceAllSystemMessages(k);Object.assign(Z,S);let I=X.stopRecording();R?.end({output:X59({result:j,beforeStepInput:_,afterStepInput:Z,beforeMessages:E.messages,beforeSystemMessages:E.systemMessages,messages:X.get.all.db(),systemMessages:X.getAllSystemMessages()}),attributes:I.length>0?{messageListMutations:I}:void 0})}catch(q){if(X.stopRecording(),q instanceof u6)throw R?.error({error:q,endSpan:!0,attributes:{tripwireAbort:{reason:q.message,retry:q.options?.retry,metadata:q.options?.metadata}}}),await ID(D,q),q;throw R?.error({error:q,endSpan:!0}),q}}return Z}async runProcessLLMRequest(Y){e1({tracingContext:Y.tracingContext});let X=Y.prompt,G;for(let J of this.inputProcessors){if(V9(J))continue;let Q=J,W=Q.processLLMRequest?.bind(Q);if(!W)continue;let K=(Z,H)=>{throw new u6(Z||`Tripwire triggered by ${Q.id}`,H,Q.id)};try{let Z=this.getProcessorState(Q.id),H=await W({prompt:X,model:Y.model,stepNumber:Y.stepNumber,steps:Y.steps,state:Z.customState,retryCount:Y.retryCount??0,requestContext:Y.requestContext,abort:K,abortSignal:Y.abortSignal,writer:Y.writer,...g4(Y.tracingContext)});if(H&&typeof H==="object"){if(Object.prototype.hasOwnProperty.call(H,"prompt"))X=H.prompt;if(H.response&&!G)G=H.response}}catch(Z){if(Z instanceof u6)await ID(Q,Z);throw Z}}return{prompt:X,response:G}}async runProcessLLMResponse(Y){e1({tracingContext:Y.tracingContext});for(let X of this.inputProcessors){if(V9(X))continue;let G=X,J=G.processLLMResponse?.bind(G);if(!J)continue;let Q=(W,K)=>{throw new u6(W||`Tripwire triggered by ${G.id}`,K,G.id)};try{let W=this.getProcessorState(G.id);await J({chunks:Y.chunks,model:Y.model,stepNumber:Y.stepNumber,steps:Y.steps,state:W.customState,warnings:Y.warnings,request:Y.request,rawResponse:Y.rawResponse,fromCache:Y.fromCache,retryCount:Y.retryCount??0,requestContext:Y.requestContext,abort:Q,abortSignal:Y.abortSignal,writer:Y.writer,...g4(Y.tracingContext)})}catch(W){if(W instanceof u6)await ID(G,W);throw W}}}isProcessInputResultWithSystemMessages(Y){return Y!==null&&typeof Y==="object"&&"messages"in Y&&"systemMessages"in Y&&Array.isArray(Y.messages)&&Array.isArray(Y.systemMessages)}async runProcessOutputStep(Y){let{steps:X,messageList:G,stepNumber:J,finishReason:Q,toolCalls:W,text:K,usage:Z,requestContext:H,retryCount:z=0,writer:V}=Y,F=e1(Y);for(let[L,N]of this.outputProcessors.entries()){let D=G.get.all.db(),A=D.map((C)=>C.id),B=G.makeMessageSourceChecker();if(V9(N)){let C=G.getAllSystemMessages();await this.executeWorkflowAsProcessor(N,{phase:"outputStep",messages:D,messageList:G,stepNumber:J,finishReason:Q,toolCalls:W,text:K,usage:Z,systemMessages:C,steps:X,retryCount:z},F,H,V);continue}let O=N,E=O.processOutputStep?.bind(O);if(!E)continue;let M=(C,k)=>{throw new u6(C||`Tripwire triggered by ${O.id}`,k,O.id)},R=G.getAllSystemMessages(),q={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},_=F.tracingContext?.currentSpan,w=(_?.findParent("agent_run")||_?.parent||_)?.createChildSpan({type:"processor_run",name:`output step processor: ${O.id}`,entityType:J6.OUTPUT_STEP_PROCESSOR,entityId:O.id,entityName:O.name,attributes:{processorExecutor:"legacy",processorIndex:L},input:{messages:D,systemMessages:R,stepNumber:J,...Q!==void 0?{finishReason:Q}:{},...W!==void 0?{toolCalls:W}:{},...K!==void 0?{text:K}:{}}});G.startRecording();let j=this.getProcessorState(O.id);try{let C=await E({messages:D,messageList:G,stepNumber:J,finishReason:Q,toolCalls:W,text:K,usage:Z??q,systemMessages:R,steps:X,state:j.customState,abort:M,...g4({currentSpan:w}),requestContext:H,retryCount:z,writer:V,sendSignal:am({messageList:G,writer:V})}),k=G.stopRecording();if(C instanceof l6){if(C!==G)throw new G0({category:"USER",domain:"AGENT",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${O.id} returned a MessageList instance other than the one that was passed in as an argument. New external message list instances are not supported. Use the messageList argument instead.`})}else if(C){let S=A.filter((I)=>!C.some((v)=>v.id===I));if(S.length)G.removeByIds(S);for(let I of C)if(G.removeByIds([I.id]),I.role==="system"){let v=I.content.content??I.content.parts?.map((x)=>x.type==="text"?x.text:"").join(`
`)??"";G.addSystem(v)}else G.add(I,B.getSource(I)||"response")}w?.end({output:{...!i3(D,G.get.all.db())?{messages:G.get.all.db()}:{},...!i3(R,G.getAllSystemMessages())?{systemMessages:G.getAllSystemMessages()}:{}},attributes:k.length>0?{messageListMutations:k}:void 0})}catch(C){if(G.stopRecording(),C instanceof u6)throw w?.error({error:C,endSpan:!0,attributes:{tripwireAbort:{reason:C.message,retry:C.options?.retry,metadata:C.options?.metadata}}}),await ID(O,C),C;throw w?.error({error:C,endSpan:!0}),C}}return G}async runProcessAPIError(Y){let{error:X,messageList:G,stepNumber:J,steps:Q,requestContext:W,retryCount:K=0,writer:Z,abortSignal:H}=Y,z=e1(Y),V=[...this.inputProcessors,...this.outputProcessors,...this.errorProcessors];for(let[F,L]of V.entries()){if(V9(L))continue;let N=L,D=N.processAPIError?.bind(N);if(!D)continue;let A=(w,j)=>{throw new u6(w||`Tripwire triggered by ${N.id}`,j,N.id)},B=G.get.all.db(),O=G.getAllSystemMessages(),E=Y.messageId,M=Y.messageId,R=z.tracingContext?.currentSpan,_=(R?.findParent("agent_run")||R?.parent||R)?.createChildSpan({type:"processor_run",name:`request error processor: ${N.id}`,entityType:J6.OUTPUT_STEP_PROCESSOR,entityId:N.id,entityName:N.name,attributes:{processorExecutor:"legacy",processorIndex:F},input:{messages:B,error:X instanceof Error?X.message:String(X),stepNumber:J,...Y.messageId?{messageId:Y.messageId}:{},retryCount:K}});G.startRecording();let P=this.getProcessorState(N.id);try{let w=Y.rotateResponseMessageId?()=>{let v=Y.rotateResponseMessageId();return M=v,v}:void 0,j=await D({messages:B,messageList:G,stepNumber:J,steps:Q,state:P.customState,error:X,abort:A,...g4({currentSpan:_}),requestContext:W,retryCount:K,writer:Z,abortSignal:H,messageId:Y.messageId,...w?{rotateResponseMessageId:w}:{},sendSignal:am({messageList:G,writer:Z,rotateResponseMessageId:w})}),C=G.stopRecording(),k=G.get.all.db(),S=G.getAllSystemMessages(),I={retry:j?.retry??!1};if(!i3(B,k))I.messages=k;if(!i3(O,S))I.systemMessages=S;if(M!==E)I.messageId=M;if(_?.end({output:I,attributes:C.length>0?{messageListMutations:C}:void 0}),j?.retry)return{retry:!0}}catch(w){if(G.stopRecording(),w instanceof u6)throw _?.error({error:w,endSpan:!0,attributes:{tripwireAbort:{reason:w.message,retry:w.options?.retry,metadata:w.options?.metadata}}}),await ID(N,w),w;_?.error({error:w,endSpan:!0}),this.logger.error(`[Agent:${this.agentName}] - Request error processor ${N.id} failed:`,w)}}return{retry:!1}}static applyMessagesToMessageList(Y,X,G,J,Q="input"){let W=G.filter((K)=>!Y.some((Z)=>Z.id===K));if(W.length)X.removeByIds(W);for(let K of Y)if(X.removeByIds([K.id]),K.role==="system"){let Z=K.content.content??K.content.parts?.map((H)=>H.type==="text"?H.text:"").join(`
`)??"";X.addSystem(Z)}else X.add(K,J.getSource(K)||Q)}static async validateAndFormatProcessInputStepResult(Y,{messageList:X,processor:G,stepNumber:J}){if(Y instanceof l6){if(Y!==X)throw new G0({category:"USER",domain:"AGENT",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${G.id} returned a MessageList instance other than the one that was passed in as an argument. New external message list instances are not supported. Use the messageList argument instead.`});return{messageList:Y}}else if(Array.isArray(Y))return{messages:Y};else if(Y){if(Y.messageList&&Y.messageList!==X)throw new G0({category:"USER",domain:"AGENT",id:"PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST",text:`Processor ${G.id} returned a MessageList instance other than the one that was passed in as an argument. New external message list instances are not supported. Use the messageList argument instead.`});if(Y.messages&&Y.messageList)throw new G0({category:"USER",domain:"AGENT",id:"PROCESSOR_RETURNED_MESSAGES_AND_MESSAGE_LIST",text:`Processor ${G.id} returned both messages and messageList. Only one of these is allowed.`});let{model:Q,...W}=Y;if(Y.model){let K=await RE(Y.model);if(!ZG(K))throw new G0({category:"USER",domain:"AGENT",id:"PROCESSOR_RETURNED_UNSUPPORTED_MODEL",text:`Processor ${G.id} returned an unsupported model version ${K.specificationVersion} in step ${J}. Only ${SD.join(", ")} models are supported in processInputStep.`});return{model:K,...W}}return W}return{}}};var Uj=V0(()=>{vT0();vu1();EI0();Ti1();V64();L64();N64();gb0();Ib0();v3();i40();A_();VO();n_();TO();hz();Xg();p2();kh();$g();AI0();eT0();hS0();OW();qL();Uk0();x80();O1();ZY();N50();ON();Yv0();JK4=U6(IX4(),1),QK4=Ns1({"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"($,Y){Y.exports=function X(G,J){if(G===J)return!0;if(G&&J&&typeof G=="object"&&typeof J=="object"){if(G.constructor!==J.constructor)return!1;var Q,W,K;if(Array.isArray(G)){if(Q=G.length,Q!=J.length)return!1;for(W=Q;W--!==0;)if(!X(G[W],J[W]))return!1;return!0}if(G.constructor===RegExp)return G.source===J.source&&G.flags===J.flags;if(G.valueOf!==Object.prototype.valueOf)return G.valueOf()===J.valueOf();if(G.toString!==Object.prototype.toString)return G.toString()===J.toString();if(K=Object.keys(G),Q=K.length,Q!==Object.keys(J).length)return!1;for(W=Q;W--!==0;)if(!Object.prototype.hasOwnProperty.call(J,K[W]))return!1;for(W=Q;W--!==0;){var Z=K[W];if(!X(G[Z],J[Z]))return!1}return!0}return G!==G&&J!==J}}});_69=class extends e2{#$={inputTokens:0,outputTokens:0,totalTokens:0,cachedInputTokens:0,cacheCreationInputTokens:0,reasoningTokens:0};#Y;#X;#J=null;#G=null;#Q;runId;constructor({createStream:$,run:Y}){let X={promise:null,resolve:null,reject:null};X.promise=new Promise((W,K)=>{X.resolve=W,X.reject=K});let G={promise:null,resolve:null,reject:null};G.promise=new Promise((W,K)=>{G.resolve=W,G.reject=K});let J=null,Q=(W)=>{this.#$.inputTokens+=parseInt(W?.inputTokens?.toString()??"0",10),this.#$.outputTokens+=parseInt(W?.outputTokens?.toString()??"0",10),this.#$.totalTokens+=parseInt(W?.totalTokens?.toString()??"0",10),this.#$.reasoningTokens+=parseInt(W?.reasoningTokens?.toString()??"0",10),this.#$.cachedInputTokens+=parseInt(W?.cachedInputTokens?.toString()??"0",10),this.#$.cacheCreationInputTokens+=parseInt(W?.cacheCreationInputTokens?.toString()??"0",10)};super({start:async(W)=>{try{let K=new WritableStream({write:(V)=>{if(V.type==="step-output"&&V.payload?.output?.from==="AGENT"&&V.payload?.output?.type==="finish"||V.type==="step-output"&&V.payload?.output?.from==="WORKFLOW"&&V.payload?.output?.type==="finish"){let F=V.payload?.output;if(F&&"payload"in F&&F.payload){let L=F.payload;if("usage"in L&&L.usage)Q(L.usage);else if("output"in L&&L.output){let N=L.output;if("usage"in N&&N.usage)Q(N.usage)}}}W.enqueue(V)}}),Z=await $(K),H=(V)=>{if(V.type==="workflow-step-output")return H(V.payload.output);return V},z=!1;for await(let V of Z)if(V.type==="workflow-step-output"){let F=H(V);if(F.type==="routing-agent-end"||F.type==="agent-execution-end"||F.type==="workflow-execution-end"){if(F.payload?.usage)Q(F.payload.usage)}if(F.type==="network-object"){if(J)J.enqueue(F.payload?.object);W.enqueue(F)}else if(F.type==="network-object-result"){if(!z){if(z=!0,G.resolve(F.payload?.object),J)J.close()}W.enqueue(F)}else if(F.type==="network-execution-event-finish"){let L={...F.payload,usage:this.#$};W.enqueue({...F,payload:L})}else W.enqueue(F)}if(!z){if(G.resolve(void 0),J)J.close()}W.close(),X.resolve()}catch(K){if(W.error(K),X.reject(K),G.reject(K),J)J.error(K)}}});this.#Q=Y,this.#Y=X,this.runId=Y.runId,this.#X=G,this.#G=new e2({start:(W)=>{J=W,this.#J=W}})}get status(){return this.#Y.promise.then(()=>this.#Q._getExecutionResults()).then(($)=>$.status)}get result(){return this.#Y.promise.then(()=>this.#Q._getExecutionResults())}get usage(){return this.#Y.promise.then(()=>this.#$)}get object(){return this.#X.promise}get objectStream(){return this.#G}},T69=["rate_limit","server_error","internal_error","timeout","temporarily_unavailable","service_unavailable","overloaded"],I69=/you can retry your request/i,C69=[UK4];b24=Symbol("isAugmented");HK4={lastMessages:10,semanticRecall:!1,generateTitle:!1,workingMemory:{enabled:!1,template:`
# User Information
- **First Name**: 
- **Last Name**: 
- **Location**: 
- **Occupation**: 
- **Interests**: 
- **Goals**: 
- **Events**: 
- **Facts**: 
- **Projects**: 
`}},Ug0=class extends u8{id;MAX_CONTEXT_TOKENS;_storage;vector;embedder;embedderOptions;threadConfig={...HK4};#$;constructor($){super({component:"MEMORY",name:$.name});if(this.id=$.id??$.name??"default-memory",$.options)this.threadConfig=this.getMergedThreadConfig($.options);if($.processors)throw Error(`The 'processors' option in Memory is deprecated and has been removed.
      
Please use the new Input/Output processor system instead:

OLD (deprecated):
  new Memory({
    processors: [new TokenLimiter(100000)]
  })

NEW (use this):
  new Agent({
    memory,
    outputProcessors: [
      new TokenLimiterProcessor(100000)
    ]
  })

Or pass memory directly to processor arrays:
  new Agent({
    inputProcessors: [memory],
    outputProcessors: [memory]
  })

See: https://mastra.ai/en/docs/memory/processors`);if($.storage)this._storage=h24($.storage),this._hasOwnStorage=!0;if(this.threadConfig.semanticRecall){if(!$.vector)throw Error(`Semantic recall requires a vector store to be configured.

https://mastra.ai/en/docs/memory/semantic-recall`);if(this.vector=$.vector,!$.embedder)throw Error(`Semantic recall requires an embedder to be configured.

https://mastra.ai/en/docs/memory/semantic-recall`);if(typeof $.embedder==="string")this.embedder=new _m($.embedder);else this.embedder=$.embedder;if($.embedderOptions)this.embedderOptions=$.embedderOptions}else{if($.vector)this.vector=$.vector;if($.embedder)if(typeof $.embedder==="string")this.embedder=new _m($.embedder);else this.embedder=$.embedder;if($.embedderOptions)this.embedderOptions=$.embedderOptions}}__registerMastra($){this.#$=$}_hasOwnStorage=!1;get hasOwnStorage(){return this._hasOwnStorage}get storage(){if(!this._storage)throw Error(`Memory requires a storage provider to function. Add a storage configuration to Memory or to your Mastra instance.

https://mastra.ai/en/docs/memory/overview`);return this._storage}setStorage($){this._storage=h24($)}setVector($){this.vector=$}setEmbedder($,Y){if(typeof $==="string")this.embedder=new _m($);else this.embedder=$;if(Y)this.embedderOptions=Y}async getSystemMessage($){return null}listTools($){return{}}_embeddingDimensionPromise;async getEmbeddingDimension(){if(!this.embedder)return;if(!this._embeddingDimensionPromise)this._embeddingDimensionPromise=(async()=>{try{return(await this.embedder.doEmbed({values:["a"],...this.embedderOptions||{}})).embeddings[0]?.length}catch($){console.warn(`[Mastra Memory] Failed to probe embedder for dimension, falling back to default. This may cause index name mismatches if the embedder uses non-default dimensions. Error: ${$}`);return}})();return this._embeddingDimensionPromise}getEmbeddingIndexName($){let X=$??1536,G=X===1536,J=this.vector?.indexSeparator??"_";return G?`memory${J}messages`:`memory${J}messages${J}${X}`}async createEmbeddingIndex($,Y){let G=$??1536,J=this.getEmbeddingIndexName($);if(typeof this.vector>"u")throw Error("Tried to create embedding index but no vector db is attached to this Memory instance.");let W=(typeof Y?.semanticRecall==="object"?Y.semanticRecall:void 0)?.indexConfig,K={indexName:J,dimension:G,...W?.metric&&{metric:W.metric}};if(W&&(W.type||W.ivf||W.hnsw)){if(K.indexConfig={},W.type)K.indexConfig.type=W.type;if(W.ivf)K.indexConfig.ivf=W.ivf;if(W.hnsw)K.indexConfig.hnsw=W.hnsw}return K.metadataIndexes=["thread_id","resource_id"],await this.vector.createIndex(K),{indexName:J}}getMergedThreadConfig($){if($?.workingMemory&&typeof $.workingMemory==="object"&&"use"in $.workingMemory)throw Error("The workingMemory.use option has been removed. Working memory always uses tool-call mode.");if($?.threads?.generateTitle!==void 0)throw Error("The threads.generateTitle option has been moved. Use the top-level generateTitle option instead.");let Y=tz(this.threadConfig,$||{});if(typeof $?.workingMemory==="object"&&$.workingMemory?.schema&&typeof Y.workingMemory==="object")Y.workingMemory.schema=$.workingMemory.schema;return Y}estimateTokens($){return Math.ceil($.split(" ").length*1.3)}async createThread({threadId:$,resourceId:Y,title:X,metadata:G,memoryConfig:J,saveThread:Q=!0}){let W={id:$||this.generateId({idType:"thread",source:"memory",resourceId:Y}),title:X||"",resourceId:Y,createdAt:new Date,updatedAt:new Date,metadata:G};return Q?this.saveThread({thread:W,memoryConfig:J}):W}async addMessage($){throw Error("addMessage is deprecated. Please use saveMessages instead.")}generateId($){return this.#$?.generateId($)||crypto.randomUUID()}static async checkThreadFGA($){let{mastra:Y,user:X,threadId:G,resourceId:J,requestContext:Q,permission:W=qz.MEMORY_READ}=$,K=Y?.getServer()?.fga;if(!K)return;let{checkFGA:Z}=await Promise.resolve().then(() => (zT(),HT));await Z({fgaProvider:K,user:X,resource:{type:"thread",id:G},permission:W,context:J||Q?{resourceId:J,requestContext:Q}:void 0})}async getInputProcessors($=[],Y){let X=await this.storage.getStore("memory"),G=[],Q=Y?.get("MastraMemory")?.memoryConfig,W=Q?this.getMergedThreadConfig(Q):this.threadConfig;if(typeof W.workingMemory==="object"&&W.workingMemory.enabled!==!1){if(!X)throw new G0({category:"USER",domain:"STORAGE",id:"WORKING_MEMORY_MISSING_STORAGE_ADAPTER",text:"Using Mastra Memory working memory requires a storage adapter but no attached adapter was detected."});if(!$.some((z)=>!V9(z)&&z.id==="working-memory")){let z;if(typeof W.workingMemory==="object"&&W.workingMemory.template)z={format:"markdown",content:W.workingMemory.template};G.push(new zK4({storage:X,template:z,scope:typeof W.workingMemory==="object"?W.workingMemory.scope:void 0,useVNext:typeof W.workingMemory==="object"&&"version"in W.workingMemory&&W.workingMemory.version==="vnext",templateProvider:this}))}}let Z=W.lastMessages;if(Z){if(!X)throw new G0({category:"USER",domain:"STORAGE",id:"MESSAGE_HISTORY_MISSING_STORAGE_ADAPTER",text:"Using Mastra Memory message history requires a storage adapter but no attached adapter was detected."});let H=$.some((V)=>!V9(V)&&V.id==="message-history"),z=$.some((V)=>!V9(V)&&V.id==="observational-memory")||ef0(W.observationalMemory);if(!H&&!z)G.push(new em({storage:X,lastMessages:typeof Z==="number"?Z:void 0}))}if(W.semanticRecall){if(!X)throw new G0({category:"USER",domain:"STORAGE",id:"SEMANTIC_RECALL_MISSING_STORAGE_ADAPTER",text:"Using Mastra Memory semantic recall requires a storage adapter but no attached adapter was detected."});if(!this.vector)throw new G0({category:"USER",domain:"MASTRA_VECTOR",id:"SEMANTIC_RECALL_MISSING_VECTOR_ADAPTER",text:"Using Mastra Memory semantic recall requires a vector adapter but no attached adapter was detected."});if(!this.embedder)throw new G0({category:"USER",domain:"MASTRA_VECTOR",id:"SEMANTIC_RECALL_MISSING_EMBEDDER",text:"Using Mastra Memory semantic recall requires an embedder but no attached embedder was detected."});if(!$.some((z)=>!V9(z)&&z.id==="semantic-recall")){let z=typeof W.semanticRecall==="object"?W.semanticRecall:{},V=await this.getEmbeddingDimension(),F=this.getEmbeddingIndexName(V);G.push(new Jg0({storage:X,vector:this.vector,embedder:this.embedder,embedderOptions:this.embedderOptions,indexName:F,...z}))}}return G}async getOutputProcessors($=[],Y){let X=await this.storage.getStore("memory"),G=[],Q=Y?.get("MastraMemory")?.memoryConfig,W=Q?this.getMergedThreadConfig(Q):this.threadConfig;if(W.semanticRecall){if(!X)throw new G0({category:"USER",domain:"STORAGE",id:"SEMANTIC_RECALL_MISSING_STORAGE_ADAPTER",text:"Using Mastra Memory semantic recall requires a storage adapter but no attached adapter was detected."});if(!this.vector)throw new G0({category:"USER",domain:"MASTRA_VECTOR",id:"SEMANTIC_RECALL_MISSING_VECTOR_ADAPTER",text:"Using Mastra Memory semantic recall requires a vector adapter but no attached adapter was detected."});if(!this.embedder)throw new G0({category:"USER",domain:"MASTRA_VECTOR",id:"SEMANTIC_RECALL_MISSING_EMBEDDER",text:"Using Mastra Memory semantic recall requires an embedder but no attached embedder was detected."});if(!$.some((H)=>!V9(H)&&H.id==="semantic-recall")){let H=typeof W.semanticRecall==="object"?W.semanticRecall:{},z=await this.getEmbeddingDimension(),V=this.getEmbeddingIndexName(z);G.push(new Jg0({storage:X,vector:this.vector,embedder:this.embedder,embedderOptions:this.embedderOptions,indexName:V,...H}))}}let K=W.lastMessages;if(K){if(!X)throw new G0({category:"USER",domain:"STORAGE",id:"MESSAGE_HISTORY_MISSING_STORAGE_ADAPTER",text:"Using Mastra Memory message history requires a storage adapter but no attached adapter was detected."});let Z=$.some((z)=>!V9(z)&&z.id==="message-history"),H=$.some((z)=>!V9(z)&&z.id==="observational-memory")||ef0(W.observationalMemory);if(!Z&&!H)G.push(new em({storage:X,lastMessages:typeof K==="number"?K:void 0}))}return G}getConfig(){let{generateTitle:$,workingMemory:Y,threads:X,observationalMemory:G,...J}=this.threadConfig,Q={vector:this.vector?.id,options:{...J}};if($!==void 0&&Q.options){if(typeof $==="boolean")Q.options.generateTitle=$;else if(typeof $==="object"&&$.model){let W=$.model,K;if(typeof W==="string")K=W;else if(typeof W==="function")K=void 0;else if(W&&typeof W==="object"){if("id"in W&&typeof W.id==="string")K=W.id}if(K&&Q.options)Q.options.generateTitle={model:K,instructions:typeof $.instructions==="string"?$.instructions:void 0}}}if(this.embedder)Q.embedder=this.embedder;if(this.embedderOptions){let{telemetry:W,...K}=this.embedderOptions;Q.embedderOptions=K}if(G!==void 0)Q.observationalMemory=this.serializeObservationalMemory(G);return Q}serializeObservationalMemory($){if(typeof $==="boolean")return $;if($.enabled===!1)return!1;let Y={scope:$.scope,activateAfterIdle:$.activateAfterIdle,activateOnProviderChange:$.activateOnProviderChange,shareTokenBudget:$.shareTokenBudget,temporalMarkers:$.temporalMarkers,retrieval:$.retrieval},X=if0($.model);if(X)Y.model=X;if($.observation){let G=$.observation;Y.observation={messageTokens:G.messageTokens,modelSettings:G.modelSettings,providerOptions:G.providerOptions,maxTokensPerBatch:G.maxTokensPerBatch,bufferTokens:G.bufferTokens,bufferActivation:G.bufferActivation,blockAfter:G.blockAfter,previousObserverTokens:G.previousObserverTokens};let J=if0(G.model);if(J)Y.observation.model=J}if($.reflection){let G=$.reflection;Y.reflection={observationTokens:G.observationTokens,modelSettings:G.modelSettings,providerOptions:G.providerOptions,blockAfter:G.blockAfter,bufferActivation:G.bufferActivation};let J=if0(G.model);if(J)Y.reflection.model=J}return Y}};Gg0=new eW({max:f69}),VK4=U.object({type:U.literal("text"),text:U.string()}).passthrough(),FK4=U.object({type:U.literal("image"),image:U.union([U.string(),U.instanceof(URL),U.instanceof(Uint8Array)]),mimeType:U.string().optional()}).passthrough(),LK4=U.object({type:U.literal("file"),data:U.union([U.string(),U.instanceof(URL),U.instanceof(Uint8Array)]),mimeType:U.string()}).passthrough(),DK4=U.object({type:U.literal("tool-invocation"),toolInvocation:U.object({toolCallId:U.string(),toolName:U.string(),args:U.unknown(),state:U.enum(["partial-call","call","result"]),result:U.unknown().optional()})}).passthrough(),NK4=U.object({type:U.literal("reasoning"),reasoning:U.string(),details:U.array(U.object({type:U.enum(["text","redacted"]),text:U.string().optional(),data:U.string().optional()}))}).passthrough(),AK4=U.object({type:U.literal("source"),source:U.object({sourceType:U.string(),id:U.string(),url:U.string().optional(),title:U.string().optional()})}).passthrough(),BK4=U.object({type:U.literal("step-start")}).passthrough(),m69=U.object({type:U.string().refine(($)=>$.startsWith("data-"),{message:'Type must start with "data-"'}),id:U.string().optional(),data:U.unknown()}).passthrough(),Hg0=U.union([VK4,FK4,LK4,DK4,NK4,AK4,BK4,m69]),u69=U.object({format:U.literal(2),parts:U.array(Hg0),content:U.string().optional(),metadata:U.record(U.string(),U.unknown()).optional(),providerMetadata:U.record(U.string(),U.unknown()).optional()}),OK4=U.object({format:U.literal(2),parts:U.array(Hg0),content:U.string().optional(),metadata:U.record(U.string(),U.unknown()).optional(),providerMetadata:U.record(U.string(),U.unknown()).optional()}).passthrough(),EK4=U.object({id:U.string(),role:U.enum(["user","assistant","system","tool","signal"]),createdAt:U.coerce.date(),threadId:U.string().optional(),resourceId:U.string().optional(),type:U.string().optional(),content:OK4}).passthrough(),gT=U.custom().describe("MessageList instance for managing message sources"),$u=U.array(EK4),p69=U.object({type:U.literal("text"),text:U.string()}).passthrough();U.object({role:U.literal("system"),content:U.union([U.string(),U.array(p69)]),experimental_providerMetadata:U.record(U.string(),U.unknown()).optional()}).passthrough();d69=U.object({role:U.enum(["system","user","assistant","tool"]),content:U.unknown()}).passthrough(),O$0=U.array(d69),MK4=U.object({toolName:U.string(),toolCallId:U.string(),args:U.unknown()}),Yu=U.number().optional(),RK4=U.object({phase:U.literal("input"),messages:$u,messageList:gT,systemMessages:O$0.optional(),retryCount:Yu}),qK4=U.object({phase:U.literal("inputStep"),messages:$u,messageList:gT,stepNumber:U.number().describe("The current step number (0-indexed)"),systemMessages:O$0.optional(),retryCount:Yu,messageId:U.string().optional().describe("The active assistant response message ID for this step"),rotateResponseMessageId:U.custom().optional().describe("Rotate the active assistant response message ID when supported by the caller"),model:U.custom().optional().describe("Current model for this step"),tools:U.custom().optional().describe("Current tools available for this step"),toolChoice:U.custom().optional().describe("Current tool choice setting"),activeTools:U.array(U.string()).optional().describe("Currently active tools"),providerOptions:U.custom().optional().describe("Provider-specific options"),modelSettings:U.custom().optional().describe("Model settings (temperature, etc.)"),structuredOutput:U.custom().optional().describe("Structured output configuration"),steps:U.custom().optional().describe("Results from previous steps")}),PK4=U.object({phase:U.literal("outputStream"),part:U.unknown().nullable().describe("The current chunk being processed. Can be null to skip."),streamParts:U.array(U.unknown()).describe("All chunks seen so far"),state:U.record(U.string(),U.unknown()).describe("Mutable state object that persists across chunks"),messageList:gT.optional(),retryCount:Yu}),wK4=U.object({text:U.string().describe("The accumulated text from all steps"),usage:U.record(U.string(),U.unknown()).describe("Token usage (cumulative across all steps)"),finishReason:U.string().describe("Why the generation finished"),steps:U.array(U.unknown()).describe("All LLM step results")}),_K4=U.object({phase:U.literal("outputResult"),messages:$u,messageList:gT,retryCount:Yu,result:wK4.optional()}),jK4=U.object({phase:U.literal("outputStep"),messages:$u,messageList:gT,stepNumber:U.number().describe("The current step number (0-indexed)"),finishReason:U.string().optional().describe("The finish reason from the LLM (stop, tool-use, length, etc.)"),toolCalls:U.array(MK4).optional().describe("Tool calls made in this step (if any)"),text:U.string().optional().describe("Generated text from this step"),usage:U.record(U.string(),U.unknown()).optional().describe("Token usage for the current step (inputTokens, outputTokens, totalTokens, etc.)"),systemMessages:O$0.optional(),retryCount:Yu}),zg0=U.discriminatedUnion("phase",[RK4,qK4,PK4,_K4,jK4]),t60=U.object({phase:U.enum(["input","inputStep","outputStream","outputResult","outputStep"]),messages:$u.optional(),messageList:gT.optional(),systemMessages:O$0.optional(),stepNumber:U.number().optional(),part:U.unknown().nullable().optional(),streamParts:U.array(U.unknown()).optional(),state:U.record(U.string(),U.unknown()).optional(),result:wK4.optional(),finishReason:U.string().optional(),toolCalls:U.array(MK4).optional(),text:U.string().optional(),usage:U.record(U.string(),U.unknown()).optional(),retryCount:U.number().optional(),model:U.custom().optional(),tools:U.custom().optional(),toolChoice:U.custom().optional(),activeTools:U.array(U.string()).optional(),providerOptions:U.custom().optional(),modelSettings:U.custom().optional(),structuredOutput:U.custom().optional(),steps:U.custom().optional(),messageId:U.string().optional(),rotateResponseMessageId:U.custom().optional()}),Yg=zg0;i69=["mastra_workspace_"];W89=/https?:\/\/[^\s<>)"']+/gi;H89=class extends u8{initialize({runId:$,createStream:Y,onResult:X}){let G=this,J;return J=new ReadableStream({async start(Q){try{let W=await Y();V50(J,bb0(W)),X({warnings:W.warnings,request:W.request,rawResponse:W.rawResponse||W.response||{}}),await G.transform({runId:$,stream:W.stream,controller:Q}),N$0(Q)}catch(W){U89(Q,W)}}}),J}};Zj=class{#$="running";#Y;#X={inputTokens:0,outputTokens:0,totalTokens:0,cachedInputTokens:0,cacheCreationInputTokens:0,reasoningTokens:0};#J=!1;#G;#Q=new R69;#U=[];#Z=!1;#W;#H={usage:new f$,result:new f$};runId;workflowId;constructor({runId:$,workflowId:Y,stream:X}){let G=this;this.runId=$,this.workflowId=Y,this.#G=X,X.pipeTo(new y24({start(){let J={type:"workflow-start",runId:G.runId,from:"WORKFLOW",payload:{workflowId:G.workflowId}};G.#U.push(J),G.#Q.emit("chunk",J)},write(J){if(J.type!=="workflow-step-finish")G.#U.push(J),G.#Q.emit("chunk",J);if(J.type==="workflow-step-output"){if("output"in J.payload&&J.payload.output){let Q=J.payload.output;if(Q.type==="finish"){if(Q.payload&&"usage"in Q.payload&&Q.payload.usage)G.#V(Q.payload.usage);else if(Q.payload&&"output"in Q.payload&&Q.payload.output){let W=Q.payload.output;if("usage"in W&&W.usage)G.#V(W.usage)}}}}else if(J.type==="workflow-canceled")G.#$="canceled";else if(J.type==="workflow-step-suspended")G.#$="suspended";else if(J.type==="workflow-step-result"&&J.payload.status==="failed")if(J.payload.tripwire)G.#$="tripwire",G.#Y=J.payload.tripwire;else G.#$="failed";else if(J.type==="workflow-paused")G.#$="paused"},close(){if(G.#$==="running")G.#$="success";G.#Q.emit("chunk",{type:"workflow-finish",runId:G.runId,from:"WORKFLOW",payload:{workflowStatus:G.#$,metadata:G.#W?{error:G.#W,errorMessage:G.#W?.message}:{},output:{usage:G.#X},...G.#$==="tripwire"&&G.#Y?{tripwire:G.#Y}:{}}}),G.#H.usage.resolve(G.#X),Object.entries(G.#H).forEach(([J,Q])=>{if(Q.status.type==="pending")Q.reject(Error(`promise '${J}' was not resolved or rejected when stream finished`))}),G.#Z=!0,G.#Q.emit("finish")}})).catch((J)=>{console.log(" something went wrong",J)})}#F($){if(!this.#J)this.consumeStream();return $.promise}#V($){let Y={inputTokens:this.#X.inputTokens??0,outputTokens:this.#X.outputTokens??0,totalTokens:this.#X.totalTokens??0,reasoningTokens:this.#X.reasoningTokens??0,cachedInputTokens:this.#X.cachedInputTokens??0,cacheCreationInputTokens:this.#X.cacheCreationInputTokens??0};if("inputTokens"in $)Y.inputTokens+=parseInt($?.inputTokens?.toString()??"0",10),Y.outputTokens+=parseInt($?.outputTokens?.toString()??"0",10);else if("promptTokens"in $)Y.inputTokens+=parseInt($?.promptTokens?.toString()??"0",10),Y.outputTokens+=parseInt($?.completionTokens?.toString()??"0",10);Y.totalTokens+=parseInt($?.totalTokens?.toString()??"0",10),Y.reasoningTokens+=parseInt($?.reasoningTokens?.toString()??"0",10),Y.cachedInputTokens+=parseInt($?.cachedInputTokens?.toString()??"0",10),Y.cacheCreationInputTokens+=parseInt($?.cacheCreationInputTokens?.toString()??"0",10),this.#X=Y}updateResults($){this.#H.result.resolve($)}rejectResults($){this.#H.result.reject($),this.#$="failed",this.#W=$}resume($){this.#G=$,this.#Z=!1,this.#J=!1,this.#$="running",this.#H={usage:new f$,result:new f$};let Y=this;$.pipeTo(new y24({start(){let X={type:"workflow-start",runId:Y.runId,from:"WORKFLOW",payload:{workflowId:Y.workflowId}};Y.#U.push(X),Y.#Q.emit("chunk",X)},write(X){if(X.type!=="workflow-step-finish")Y.#U.push(X),Y.#Q.emit("chunk",X);if(X.type==="workflow-step-output"){if("output"in X.payload&&X.payload.output){let G=X.payload.output;if(G.type==="finish"){if(G.payload&&"usage"in G.payload&&G.payload.usage)Y.#V(G.payload.usage);else if(G.payload&&"output"in G.payload&&G.payload.output){let J=G.payload.output;if("usage"in J&&J.usage)Y.#V(J.usage)}}}}else if(X.type==="workflow-canceled")Y.#$="canceled";else if(X.type==="workflow-step-suspended")Y.#$="suspended";else if(X.type==="workflow-step-result"&&X.payload.status==="failed")if(X.payload.tripwire)Y.#$="tripwire",Y.#Y=X.payload.tripwire;else Y.#$="failed";else if(X.type==="workflow-paused")Y.#$="paused"},close(){if(Y.#$==="running")Y.#$="success";Y.#Q.emit("chunk",{type:"workflow-finish",runId:Y.runId,from:"WORKFLOW",payload:{workflowStatus:Y.#$,metadata:Y.#W?{error:Y.#W,errorMessage:Y.#W?.message}:{},output:{usage:Y.#X},...Y.#$==="tripwire"&&Y.#Y?{tripwire:Y.#Y}:{}}}),Y.#Z=!0,Y.#Q.emit("finish")}})).catch((X)=>{console.log(" something went wrong",X)})}async consumeStream($){if(this.#J)return;this.#J=!0;try{await V89({stream:this.#G,onError:$?.onError})}catch(Y){$?.onError?.(Y)}}get fullStream(){let $=this;return new e2({start(Y){if($.#U.forEach((J)=>{Y.enqueue(J)}),$.#Z){Y.close();return}let X=(J)=>{Y.enqueue(J)},G=()=>{$.#Q.off("chunk",X),$.#Q.off("finish",G),Y.close()};$.#Q.on("chunk",X),$.#Q.on("finish",G)},pull(Y){if(!$.#J)$.consumeStream()},cancel(){$.#Q.removeAllListeners()}})}get status(){return this.#$}get result(){return this.#F(this.#H.result)}get usage(){return this.#F(this.#H.usage)}get locked(){return console.warn("WorkflowRunOutput.locked is deprecated. Use fullStream.locked instead."),this.fullStream.locked}cancel($){return console.warn("WorkflowRunOutput.cancel() is deprecated. Use fullStream.cancel() instead."),this.fullStream.cancel($)}getReader($){return console.warn("WorkflowRunOutput.getReader() is deprecated. Use fullStream.getReader() instead."),this.fullStream.getReader($)}pipeThrough($,Y){return console.warn("WorkflowRunOutput.pipeThrough() is deprecated. Use fullStream.pipeThrough() instead."),this.fullStream.pipeThrough($,Y)}pipeTo($,Y){return console.warn("WorkflowRunOutput.pipeTo() is deprecated. Use fullStream.pipeTo() instead."),this.fullStream.pipeTo($,Y)}tee(){return console.warn("WorkflowRunOutput.tee() is deprecated. Use fullStream.tee() instead."),this.fullStream.tee()}[Symbol.asyncIterator](){return console.warn("WorkflowRunOutput[Symbol.asyncIterator]() is deprecated. Use fullStream[Symbol.asyncIterator]() instead."),this.fullStream[Symbol.asyncIterator]()}toReadableStream(){return console.warn("WorkflowRunOutput.toReadableStream() is deprecated. Use fullStream directly instead."),this.fullStream}},Y80=class extends u8{mastra;options;constructor({mastra:$,options:Y}){super({name:"ExecutionEngine",component:VZ.WORKFLOW});this.mastra=$,this.options=Y}__registerMastra($){this.mastra=$;let Y=$?.getLogger();if(Y)this.__setLogger(Y)}getLogger(){return this.logger}async invokeLifecycleCallbacks($){let{onFinish:Y,onError:X}=this.options,G={runId:$.runId,workflowId:$.workflowId,resourceId:$.resourceId,getInitData:()=>$.input,mastra:this.mastra,requestContext:$.requestContext,logger:this.logger,state:$.state,stepExecutionPath:$.stepExecutionPath};if(Y)try{await Promise.resolve(Y({status:$.status,result:$.result,error:$.error,steps:$.steps,tripwire:$.tripwire,...G}))}catch(J){this.logger.error("Error in onFinish callback",{error:J})}if(X&&($.status==="failed"||$.status==="tripwire"))try{await Promise.resolve(X({status:$.status,error:$.error,steps:$.steps,tripwire:$.tripwire,...G}))}catch(J){this.logger.error("Error in onError callback",{error:J})}}};p24=new Set;xK4=class extends Y80{retryCounts=new Map;getOrGenerateRetryCount($){if(this.retryCounts.has($)){let G=this.retryCounts.get($)+1;return this.retryCounts.set($,G),G}let Y=0;return this.retryCounts.set($,Y),Y}isNestedWorkflowStep($){return!1}async executeSleepDuration($,Y,X){await new Promise((G)=>setTimeout(G,$<0?0:$))}async executeSleepUntilDate($,Y,X){let G=$.getTime()-Date.now();await new Promise((J)=>setTimeout(J,G<0?0:G))}async wrapDurableOperation($,Y){return Y()}getEngineContext(){return{}}async evaluateCondition($,Y,X,G){return this.wrapDurableOperation(G,async()=>{return await $(X)?Y:null})}async onStepExecutionStart($){return this.wrapDurableOperation($.operationId,async()=>{let Y=Date.now();if(!$.skipEmits)await $.pubsub.publish(`workflow.events.v2.${$.executionContext.runId}`,{type:"watch",runId:$.executionContext.runId,data:{type:"workflow-step-start",payload:{id:$.step.id,stepCallId:$.stepCallId,...$.stepInfo}}});return Y})}async executeWorkflowStep($){return null}async createStepSpan($){return $.parentSpan?.createChildSpan($.options)}async endStepSpan($){$.span?.end($.endOptions)}async errorStepSpan($){$.span?.error($.errorOptions)}async createChildSpan($){return $.parentSpan?.createChildSpan($.options)}async endChildSpan($){$.span?.end($.endOptions)}async errorChildSpan($){$.span?.error($.errorOptions)}async executeStepWithRetry($,Y,X){for(let G=0;G<X.retries+1;G++){if(G>0&&X.delay)await new Promise((J)=>setTimeout(J,X.delay));try{return{ok:!0,result:await this.wrapDurableOperation($,Y)}}catch(J){if(G===X.retries){let Q=XG(J,{serializeStack:!1,fallbackMessage:"Unknown step execution error"}),W=new G0({id:"WORKFLOW_STEP_INVOKE_FAILED",domain:"MASTRA_WORKFLOW",category:"USER",details:{workflowId:X.workflowId,runId:X.runId,stepId:$}},Q);return this.logger?.trackException(W),this.logger?.error(`Error executing step ${$}: `+Q?.stack),X.stepSpan?.error({error:W,attributes:{status:"failed"}}),{ok:!1,error:{status:"failed",error:Q,endedAt:Date.now(),tripwire:J instanceof u6?{reason:J.message,retry:J.options?.retry,metadata:J.options?.metadata,processorId:J.processorId}:void 0}}}}}return{ok:!1,error:{status:"failed",error:Error("Unknown error"),endedAt:Date.now()}}}formatResultError($,Y){let X=Y?.error;return XG($||X,{serializeStack:!1,fallbackMessage:"Unknown workflow error"}).toJSON()}async fmtReturnValue($,Y,X,G,J){let Q={};for(let[K,Z]of Object.entries(Y))if(Z&&typeof Z==="object"&&!Array.isArray(Z)&&"metadata"in Z){let{metadata:H,...z}=Z;if(H){let{nestedRunId:V,...F}=H;if(Object.keys(F).length>0)Q[K]={...z,metadata:F};else Q[K]=z}else Q[K]=Z}else Q[K]=Z;let W={status:X.status,steps:Q,input:Q.input};if(J){W.stepExecutionPath=J;let K={...Q},Z,H="input"in Q;if(H)Z=Q.input;for(let z of J){let V=Q[z];if(!V)continue;let F={...V},L=!1;if(H)try{L=F.payload===Z||JSON.stringify(F.payload)===JSON.stringify(Z)}catch{}if(L)delete F.payload;if(F.status==="success")Z=F.output,H=!0;K[z]=F}W.steps=K}if(X.status==="success")W.result=X.output;else if(X.status==="failed"){let K=X?.tripwire;if(K instanceof u6)W.status="tripwire",W.tripwire={reason:K.message,retry:K.options?.retry,metadata:K.options?.metadata,processorId:K.processorId};else if(K&&typeof K==="object"&&"reason"in K)W.status="tripwire",W.tripwire=K;else W.error=this.formatResultError(G,X)}else if(X.status==="suspended"){let K={},Z=Object.entries(Y).flatMap(([H,z])=>{if(z?.status==="suspended"){let{__workflow_meta:V,...F}=z?.suspendPayload??{};K[H]=F;let L=V?.path;return L?[[H,...L]]:[[H]]}return[]});W.suspended=Z,W.suspendPayload=K}return W}serializeRequestContext($){if(typeof $.toJSON==="function")return $.toJSON();let Y={};return $.forEach((X,G)=>{Y[G]=X}),Y}deserializeRequestContext($){let Y=new p1;for(let[X,G]of Object.entries($))Y.set(X,G);return Y}requiresDurableContextSerialization(){return!1}buildMutableContext($){return{state:$.state,suspendedPaths:$.suspendedPaths,resumeLabels:$.resumeLabels}}applyMutableContext($,Y){Object.assign($.state,Y.state),Object.assign($.suspendedPaths,Y.suspendedPaths),Object.assign($.resumeLabels,Y.resumeLabels)}async execute($){let{workflowId:Y,runId:X,resourceId:G,graph:J,input:Q,initialState:W,resume:K,retryConfig:Z,workflowSpan:H,disableScorers:z,restart:V,timeTravel:F,perStep:L}=$,{attempts:N=0,delay:D=0}=Z??{},A=J.steps;if(this.retryCounts.clear(),A.length===0){let w=new G0({id:"WORKFLOW_EXECUTE_EMPTY_GRAPH",text:"Workflow must have at least one step",domain:"MASTRA_WORKFLOW",category:"USER"});throw H?.error({error:w}),w}let B=0;if(F)B=F.executionPath[0],F.executionPath.shift();else if(V)B=V.activePaths[0],V.activePaths.shift();else if(K?.resumePath)B=K.resumePath[0],K.resumePath.shift();let O=F?.stepResults||V?.stepResults||K?.stepResults||{input:Q},E=F?.stepExecutionPath||V?.stepExecutionPath||K?.stepExecutionPath||[],M,R=F?.state??V?.state??W??{},q,_=$.requestContext;for(let w=B;w<A.length;w++){let j=A[w],C={workflowId:Y,runId:X,executionPath:[w],stepExecutionPath:E,activeStepsPath:{},suspendedPaths:{},resumeLabels:{},retryConfig:{attempts:N,delay:D},format:$.format,state:R??W,tracingIds:$.tracingIds};if(q=C,M=await this.executeEntry({workflowId:Y,runId:X,resourceId:G,entry:j,executionContext:C,serializedStepGraph:$.serializedStepGraph,prevStep:A[w-1],stepResults:O,resume:K,timeTravel:F,restart:V,...g4({currentSpan:H}),abortController:$.abortController,pubsub:$.pubsub,requestContext:_,outputWriter:$.outputWriter,disableScorers:z,perStep:L}),this.applyMutableContext(C,M.mutableContext),R=M.mutableContext.state,this.requiresDurableContextSerialization()&&M.requestContext)_=this.deserializeRequestContext(M.requestContext);if(M.result.status!=="success"){if(M.result.status==="bailed")M.result.status="success";let k=await this.fmtReturnValue($.pubsub,O,M.result,void 0,E),S=k.status==="suspended"&&H?{traceId:H.traceId,spanId:H.id,parentSpanId:H.getParentSpanId()}:{};if(await this.persistStepUpdate({workflowId:Y,runId:X,resourceId:G,stepResults:M.stepResults,serializedStepGraph:$.serializedStepGraph,executionContext:C,workflowStatus:k.status,result:k.result,error:k.error,requestContext:_,tracingContext:S}),k.error)H?.error({error:k.error,attributes:{status:k.status}});else H?.end({output:k.result,attributes:{status:k.status}});if(M.result.status!=="paused")await this.invokeLifecycleCallbacks({status:k.status,result:k.result,error:k.error,steps:k.steps,tripwire:k.tripwire,runId:X,workflowId:Y,resourceId:G,input:Q,requestContext:_,state:R,stepExecutionPath:E});if(M.result.status==="paused")await $.pubsub.publish(`workflow.events.v2.${X}`,{type:"watch",runId:X,data:{type:"workflow-paused",payload:{}}});return{...k,...M.result.status==="suspended"&&$.outputOptions?.includeResumeLabels?{resumeLabels:M.mutableContext.resumeLabels}:{},...$.outputOptions?.includeState?{state:R}:{}}}if(L){let k=await this.fmtReturnValue($.pubsub,O,M.result,void 0,E);return await this.persistStepUpdate({workflowId:Y,runId:X,resourceId:G,stepResults:M.stepResults,serializedStepGraph:$.serializedStepGraph,executionContext:q,workflowStatus:"paused",requestContext:_}),await $.pubsub.publish(`workflow.events.v2.${X}`,{type:"watch",runId:X,data:{type:"workflow-paused",payload:{}}}),H?.end({attributes:{status:"paused"}}),delete k.result,{...k,status:"paused",...$.outputOptions?.includeState?{state:R}:{}}}}let P=await this.fmtReturnValue($.pubsub,O,M.result,void 0,E);if(await this.persistStepUpdate({workflowId:Y,runId:X,resourceId:G,stepResults:M.stepResults,serializedStepGraph:$.serializedStepGraph,executionContext:q,workflowStatus:P.status,result:P.result,error:P.error,requestContext:_}),H?.end({output:P.result,attributes:{status:P.status}}),await this.invokeLifecycleCallbacks({status:P.status,result:P.result,error:P.error,steps:P.steps,tripwire:P.tripwire,runId:X,workflowId:Y,resourceId:G,input:Q,requestContext:_,state:R,stepExecutionPath:E}),$.outputOptions?.includeState)return{...P,state:R};return P}getStepOutput($,Y){if(!Y)return $.input;else if(Y.type==="step")return $[Y.step.id]?.output;else if(Y.type==="sleep"||Y.type==="sleepUntil")return $[Y.id]?.output;else if(Y.type==="parallel"||Y.type==="conditional")return Y.steps.reduce((X,G)=>{return X[G.step.id]=$[G.step.id]?.output,X},{});else if(Y.type==="loop")return $[Y.step.id]?.output;else if(Y.type==="foreach")return $[Y.step.id]?.output}async executeSleep($){return B89(this,$)}async executeSleepUntil($){return O89(this,$)}async executeStep($){return E89(this,$)}async executeParallel($){return F89(this,$)}async executeConditional($){return L89(this,$)}async executeLoop($){return D89(this,$)}async executeForeach($){return N89(this,$)}async persistStepUpdate($){return A89(this,$)}async executeEntry($){return Qg0(this,$)}};Z80=class extends u8{id;description;inputSchema;outputSchema;stateSchema;requestContextSchema;steps;stepDefs;engineType="default";type="default";#$;committed=!1;stepFlow;serializedStepFlow;executionEngine;executionGraph;#Y;retryConfig;#X;#J=new Map;constructor({mastra:$,id:Y,inputSchema:X,outputSchema:G,stateSchema:J,requestContextSchema:Q,description:W,executionEngine:K,retryConfig:Z,steps:H,options:z={},type:V}){super({name:Y,component:VZ.WORKFLOW});if(this.id=Y,this.description=W,this.inputSchema=X?Q4(X):X,this.outputSchema=G?Q4(G):G,this.stateSchema=J?Q4(J):void 0,this.requestContextSchema=Q?Q4(Q):void 0,this.retryConfig=Z??{attempts:0,delay:0},this.executionGraph=this.buildExecutionGraph(),this.stepFlow=[],this.serializedStepFlow=[],this.#X=$,this.steps={},this.stepDefs=H,this.type=V??"default",this.#Y={validateInputs:z.validateInputs??!0,shouldPersistSnapshot:z.shouldPersistSnapshot??(()=>!0),tracingPolicy:z.tracingPolicy,onFinish:z.onFinish,onError:z.onError,sharePubsub:z.sharePubsub},!K)this.executionEngine=new xK4({mastra:this.#X,options:this.#Y});else this.executionEngine=K;this.engineType="default",this.#J=new Map}get runs(){return this.#J}get mastra(){return this.#X}get options(){return this.#Y}__registerMastra($){this.#X=$,this.executionEngine.__registerMastra($)}__registerPrimitives($){if($.logger)this.__setLogger($.logger)}__setLogger($){super.__setLogger($),this.executionEngine.__setLogger($)}setStepFlow($){this.stepFlow=$}then($){return this.stepFlow.push({type:"step",step:$}),this.serializedStepFlow.push({type:"step",step:{id:$.id,description:$.description,metadata:$.metadata,component:$.component,serializedStepFlow:$.serializedStepFlow,canSuspend:Boolean($.suspendSchema||$.resumeSchema)}}),this.steps[$.id]=$,this}sleep($){let Y=`sleep_${this.#X?.generateId({idType:"step",source:"workflow",entityId:this.id,stepType:"sleep"})||E6()}`,X=typeof $==="function"?{type:"sleep",id:Y,fn:$}:{type:"sleep",id:Y,duration:$},G=typeof $==="function"?{type:"sleep",id:Y,fn:$.toString()}:{type:"sleep",id:Y,duration:$};return this.stepFlow.push(X),this.serializedStepFlow.push(G),this.steps[Y]=o9({id:Y,inputSchema:U.object({}),outputSchema:U.object({}),execute:async()=>{return{}}}),this}sleepUntil($){let Y=`sleep_${this.#X?.generateId({idType:"step",source:"workflow",entityId:this.id,stepType:"sleep-until"})||E6()}`,X=typeof $==="function"?{type:"sleepUntil",id:Y,fn:$}:{type:"sleepUntil",id:Y,date:$},G=typeof $==="function"?{type:"sleepUntil",id:Y,fn:$.toString()}:{type:"sleepUntil",id:Y,date:$};return this.stepFlow.push(X),this.serializedStepFlow.push(G),this.steps[Y]=o9({id:Y,inputSchema:U.object({}),outputSchema:U.object({}),execute:async()=>{return{}}}),this}waitForEvent($,Y,X){throw new G0({id:"WORKFLOW_WAIT_FOR_EVENT_REMOVED",domain:"MASTRA_WORKFLOW",category:"USER",text:"waitForEvent has been removed. Please use suspend & resume flow instead. See https://mastra.ai/en/docs/workflows/suspend-and-resume for more details."})}map($,Y){if(typeof $==="function"){let J=o9({id:Y?.id||`mapping_${this.#X?.generateId({idType:"step",source:"workflow",entityId:this.id,stepType:"mapping"})||E6()}`,inputSchema:U.any(),outputSchema:U.any(),execute:$});return this.stepFlow.push({type:"step",step:J}),this.serializedStepFlow.push({type:"step",step:{id:J.id,mapConfig:$.toString()?.length>1000?$.toString().slice(0,1000)+`...
}`:$.toString()}}),this}let X=Object.entries($).reduce((J,[Q,W])=>{let K=W;if(K.value!==void 0)J[Q]=K;else if(K.fn!==void 0)J[Q]={fn:K.fn.toString(),schema:K.schema};else if(K.requestContextPath)J[Q]={requestContextPath:K.requestContextPath,schema:K.schema};else J[Q]=K;return J},{}),G=o9({id:Y?.id||`mapping_${this.#X?.generateId({idType:"step",source:"workflow",entityId:this.id,stepType:"mapping"})||E6()}`,inputSchema:U.any(),outputSchema:U.any(),execute:async(J)=>{let{getStepResult:Q,getInitData:W,requestContext:K}=J,Z={};for(let[H,z]of Object.entries($)){let V=z;if(V.value!==void 0){Z[H]=V.value;continue}if(V.fn!==void 0){Z[H]=await V.fn(J);continue}if(V.requestContextPath){Z[H]=K.get(V.requestContextPath);continue}let F=V.initData?W():Q(Array.isArray(V.step)?V.step.find((D)=>{let A=Q(D);if(typeof A==="object"&&A!==null)return Object.keys(A).length>0;return A}):V.step);if(V.path==="."){Z[H]=F;continue}let L=V.path.split("."),N=F;for(let D of L)if(typeof N==="object"&&N!==null)N=N[D];else throw Error(`Invalid path ${V.path} in step ${V?.step?.id??"initData"}`);Z[H]=N}return Z}});return this.stepFlow.push({type:"step",step:G}),this.serializedStepFlow.push({type:"step",step:{id:G.id,mapConfig:JSON.stringify(X,null,2)?.length>1000?JSON.stringify(X,null,2).slice(0,1000)+`...
}`:JSON.stringify(X,null,2)}}),this}parallel($){return this.stepFlow.push({type:"parallel",steps:$.map((Y)=>({type:"step",step:Y}))}),this.serializedStepFlow.push({type:"parallel",steps:$.map((Y)=>({type:"step",step:{id:Y.id,description:Y.description,metadata:Y.metadata,component:Y.component,serializedStepFlow:Y.serializedStepFlow,canSuspend:Boolean(Y.suspendSchema||Y.resumeSchema)}}))}),$.forEach((Y)=>{this.steps[Y.id]=Y}),this}branch($){return this.stepFlow.push({type:"conditional",steps:$.map(([Y,X])=>({type:"step",step:X})),conditions:$.map(([Y])=>Y),serializedConditions:$.map(([Y,X])=>({id:`${X.id}-condition`,fn:Y.toString()}))}),this.serializedStepFlow.push({type:"conditional",steps:$.map(([Y,X])=>({type:"step",step:{id:X.id,description:X.description,metadata:X.metadata,component:X.component,serializedStepFlow:X.serializedStepFlow,canSuspend:Boolean(X.suspendSchema||X.resumeSchema)}})),serializedConditions:$.map(([Y,X])=>({id:`${X.id}-condition`,fn:Y.toString()}))}),$.forEach(([Y,X])=>{this.steps[X.id]=X}),this}dowhile($,Y){return this.stepFlow.push({type:"loop",step:$,condition:Y,loopType:"dowhile",serializedCondition:{id:`${$.id}-condition`,fn:Y.toString()}}),this.serializedStepFlow.push({type:"loop",step:{id:$.id,description:$.description,metadata:$.metadata,component:$.component,serializedStepFlow:$.serializedStepFlow,canSuspend:Boolean($.suspendSchema||$.resumeSchema)},serializedCondition:{id:`${$.id}-condition`,fn:Y.toString()},loopType:"dowhile"}),this.steps[$.id]=$,this}dountil($,Y){return this.stepFlow.push({type:"loop",step:$,condition:Y,loopType:"dountil",serializedCondition:{id:`${$.id}-condition`,fn:Y.toString()}}),this.serializedStepFlow.push({type:"loop",step:{id:$.id,description:$.description,metadata:$.metadata,component:$.component,serializedStepFlow:$.serializedStepFlow,canSuspend:Boolean($.suspendSchema||$.resumeSchema)},serializedCondition:{id:`${$.id}-condition`,fn:Y.toString()},loopType:"dountil"}),this.steps[$.id]=$,this}foreach($,Y){let X=$;return this.stepFlow.push({type:"foreach",step:$,opts:Y??{concurrency:1}}),this.serializedStepFlow.push({type:"foreach",step:{id:$.id,description:$.description,metadata:$.metadata,component:$.component,serializedStepFlow:$.serializedStepFlow,canSuspend:Boolean(X.suspendSchema||X.resumeSchema)},opts:Y??{concurrency:1}}),this.steps[$.id]=$,this}buildExecutionGraph(){return{id:this.id,steps:this.stepFlow}}commit(){return this.executionGraph=this.buildExecutionGraph(),this.committed=!0,this}get stepGraph(){return this.stepFlow}get serializedStepGraph(){return this.serializedStepFlow}async createRun($){if(this.stepFlow.length===0)throw Error("Execution flow of workflow is not defined. Add steps to the workflow via .then(), .branch(), etc.");if(!this.executionGraph.steps)throw Error("Uncommitted step flow changes detected. Call .commit() to register the steps.");let Y=$?.runId||this.#X?.generateId({idType:"run",source:"workflow",entityId:this.id,resourceId:$?.resourceId})||E6(),X=this.#J.get(Y)??new U80({workflowId:this.id,stateSchema:this.stateSchema,inputSchema:this.inputSchema,requestContextSchema:this.requestContextSchema,runId:Y,resourceId:$?.resourceId,executionEngine:this.executionEngine,executionGraph:this.executionGraph,mastra:this.#X,retryConfig:this.retryConfig,serializedStepGraph:this.serializedStepGraph,disableScorers:$?.disableScorers,cleanup:()=>this.#J.delete(Y),tracingPolicy:this.#Y?.tracingPolicy,workflowSteps:this.steps,validateInputs:this.#Y?.validateInputs,workflowEngineType:this.engineType,pubsub:$?.pubsub});this.#J.set(Y,X);let G=this.#Y.shouldPersistSnapshot({workflowStatus:X.workflowRunStatus,stepResults:{}}),J=await this.getWorkflowRunById(Y,{withNestedWorkflows:!1}),Q=J&&!J.isFromInMemory;if(Q&&J.status)X.workflowRunStatus=J.status;if(!Q&&G)await(await this.mastra?.getStorage()?.getStore("workflows"))?.persistWorkflowSnapshot({workflowName:this.id,runId:Y,resourceId:$?.resourceId,snapshot:{runId:Y,status:"pending",value:{},context:this.#$?{input:this.#$}:{},activePaths:[],activeStepsPath:{},serializedStepGraph:this.serializedStepGraph,suspendedPaths:{},resumeLabels:{},waitingPaths:{},result:void 0,error:void 0,timestamp:Date.now()}});return X}async listScorers({requestContext:$=new p1}={}){let Y=this.steps;if(!Y||Object.keys(Y).length===0)return{};let X={};for(let G of Object.values(Y))if(G.scorers){let J=G.scorers;if(typeof J==="function")J=await J({requestContext:$});for(let[Q,W]of Object.entries(J))X[Q]=W}return X}async execute({runId:$,resourceId:Y,inputData:X,resumeData:G,state:J,setState:Q,suspend:W,restart:K,resume:Z,timeTravel:H,[VQ]:z,mastra:V,requestContext:F,abort:L,abortSignal:N,retryCount:D,outputWriter:A,validateInputs:B,perStep:O,engine:E,bail:M,...R}){let q=e1(R);this.__registerMastra(V);let _=V?.getServer()?.fga;if(_){let u=F?.get("user");if(u){let{checkFGA:b}=await Promise.resolve().then(() => (zT(),HT));await b({fgaProvider:_,user:u,resource:{type:"workflow",id:this.id},permission:qz.WORKFLOWS_EXECUTE})}}let P=B??this.#Y.validateInputs??!0;this.#Y={...this.#Y||{},validateInputs:P},this.executionEngine.options={...this.executionEngine.options||{},validateInputs:P};let w=!!(Z?.steps&&Z.steps.length>0)||!!Z?.label||!!(Z?.steps&&Z.steps.length===0&&(!D||D===0));if(!K&&!w)this.#$=X;let j=!!(H&&H.steps.length>0),C=!!this.#Y?.sharePubsub,k=C?z:void 0,S=w?await this.createRun({runId:Z.runId,resourceId:Y,pubsub:k}):await this.createRun({runId:$,resourceId:Y,pubsub:k}),I=()=>{L()},v=async()=>{S.abortController.signal.removeEventListener("abort",I),await S.cancel()};S.abortController.signal.addEventListener("abort",I),N.addEventListener("abort",v);let x=C?()=>{}:S.watch((u)=>{z.publish("nested-watch",{type:"nested-watch",runId:S.runId,data:{event:u,workflowId:this.id}})});if(D&&D>0&&w&&F)F.set("__mastraWorflowInputData",X);let y;try{if(j)y=await S.timeTravel({inputData:H?.inputData,resumeData:H?.resumeData,initialState:J,step:H?.steps,context:H?.nestedStepResults?.[this.id]??{},nestedStepsContext:H?.nestedStepResults,requestContext:F,...q,outputWriter:A,outputOptions:{includeState:!0,includeResumeLabels:!0},perStep:O});else if(K)y=await S.restart({requestContext:F,...q,outputWriter:A});else if(w)y=await S.resume({resumeData:G,step:Z.steps?.length>0?Z.steps:void 0,requestContext:F,...q,outputWriter:A,outputOptions:{includeState:!0,includeResumeLabels:!0},label:Z.label,perStep:O});else y=await S.start({inputData:X,requestContext:F,...q,outputWriter:A,initialState:J,outputOptions:{includeState:!0,includeResumeLabels:!0},perStep:O})}finally{S.abortController.signal.removeEventListener("abort",I),N.removeEventListener("abort",v),x()}let d=Object.entries(y.steps).filter(([u,b])=>{return b?.status==="suspended"});if(y.state)await Q(y.state);if(d?.length)for(let[u,b]of d){let g=[u,...b?.suspendPayload?.__workflow_meta?.path??[]];await W({...b?.suspendPayload,__workflow_meta:{runId:S.runId,path:g}},{resumeLabel:Object.keys(y.resumeLabels??{})})}if(y.status==="failed")throw y.error;if(y.status==="tripwire"){let u=y.tripwire;throw new u6(u?.reason||"Processor tripwire triggered",{retry:u?.retry,metadata:u?.metadata},u?.processorId)}return y.status==="success"?y.result:void 0}async listWorkflowRuns($){let Y=this.#X?.getStorage();if(!Y)return this.logger.debug("Cannot get workflow runs. Mastra storage is not initialized"),{runs:[],total:0};let X=await Y.getStore("workflows");if(!X)return this.logger.debug("Cannot get workflow runs. Workflows storage domain is not available"),{runs:[],total:0};return X.listWorkflowRuns({workflowName:this.id,...$??{}})}async listActiveWorkflowRuns(){let $=await this.listWorkflowRuns({status:"running"}),Y=await this.listWorkflowRuns({status:"waiting"});return{runs:[...$.runs,...Y.runs],total:$.total+Y.total}}async restartAllActiveWorkflowRuns(){if(this.engineType!=="default"){this.logger.debug("Cannot restart active workflow runs for engine type",{engineType:this.engineType});return}let $=await this.listActiveWorkflowRuns();if($.runs.length>0)this.logger.debug("Restarting active workflow runs",{count:$.runs.length});for(let Y of $.runs)try{await(await this.createRun({runId:Y.runId})).restart(),this.logger.debug("Restarted workflow run",{workflowId:this.id,runId:Y.runId})}catch(X){this.logger.error("Failed to restart workflow run",{workflowId:this.id,runId:Y.runId,error:X})}}async deleteWorkflowRunById($){let Y=this.#X?.getStorage();if(!Y){this.logger.debug("Cannot delete workflow run by ID. Mastra storage is not initialized");return}let X=await Y.getStore("workflows");if(!X){this.logger.debug("Cannot delete workflow run. Workflows storage domain is not available");return}await X.deleteWorkflowRunById({runId:$,workflowName:this.id}),this.#J.delete($)}async getWorkflowRunSteps({runId:$,workflowId:Y}){let X=this.#X?.getStorage();if(!X)return this.logger.debug("Cannot get workflow run steps. Mastra storage is not initialized"),{};let G=await X.getStore("workflows");if(!G)return this.logger.debug("Cannot get workflow run steps. Workflows storage domain is not available"),{};let Q=(await G.getWorkflowRunById({runId:$,workflowName:Y}))?.snapshot;if(!Q)return{};if(typeof Q==="string")try{Q=JSON.parse(Q)}catch(V){return this.logger.debug("Cannot get workflow run execution result. Snapshot is not a valid JSON string",{error:V}),{}}let{serializedStepGraph:W,context:K}=Q,{input:Z,...H}=K,z={};for(let V of Object.keys(H)){let F=yK4(W,V);if(z[V]=H[V],F&&F?.step?.component==="WORKFLOW"){let N=H[V]?.metadata?.nestedRunId??$,D=await this.getWorkflowRunSteps({runId:N,workflowId:V});if(D){let A=Object.entries(D).reduce((B,[O,E])=>{return B[`${V}.${O}`]=E,B},{});z={...z,...A}}}}return z}#G($){let Y=this.#J.get($);if(!Y)return null;return{runId:$,workflowName:this.id,resourceId:Y.resourceId,createdAt:new Date,updatedAt:new Date,isFromInMemory:!0,status:Y.workflowRunStatus,steps:{}}}async getWorkflowRunById($,Y={}){let{withNestedWorkflows:X=!0,fields:G}=Y,J=this.#X?.getStorage();if(!J)return this.logger.debug("Cannot get workflow run. Mastra storage is not initialized"),this.#G($);let Q=await J.getStore("workflows");if(!Q)return this.logger.debug("Cannot get workflow run. Workflows storage domain is not available"),this.#G($);let W=await Q.getWorkflowRunById({runId:$,workflowName:this.id});if(!W)return this.#G($);let K=W.snapshot;if(typeof K==="string")try{K=JSON.parse(K)}catch(L){return this.logger.debug("Cannot parse workflow run snapshot. Snapshot is not valid JSON",{error:L}),null}let Z=K,H=!G||G.length===0,z=new Set(G??[]),V={};if(H||z.has("steps")){let L;if(X)L=await this.getWorkflowRunSteps({runId:$,workflowId:this.id});else{let{input:A,...B}=Z.context||{};L=B}let{__state:N,...D}=L;for(let[A,B]of Object.entries(D))V[A]=K80(B)}let F={runId:W.runId,workflowName:W.workflowName,resourceId:W.resourceId,createdAt:W.createdAt,updatedAt:W.updatedAt,status:Z.status,initialState:Object.keys(Z.value).length>0?Z.value:void 0,result:H||z.has("result")?Z.result:void 0,error:H||z.has("error")?Z.error:void 0,payload:H||z.has("payload")?Z.context?.input:void 0,steps:V,activeStepsPath:H||z.has("activeStepsPath")?Z.activeStepsPath:void 0,serializedStepGraph:H||z.has("serializedStepGraph")?Z.serializedStepGraph:void 0,suspendedPaths:H||z.has("suspendedPaths")?Z.suspendedPaths:void 0,resumeLabels:H||z.has("resumeLabels")?Z.resumeLabels:void 0,waitingPaths:H||z.has("waitingPaths")?Z.waitingPaths:void 0,...z.has("requestContext")?{requestContext:Z.requestContext}:{},...z.has("tracingContext")?{tracingContext:Z.tracingContext}:{}};if(G&&G.length>0){if(F.initialState===void 0)delete F.initialState;if(F.result===void 0)delete F.result;if(F.error===void 0)delete F.error;if(F.payload===void 0)delete F.payload;if(!z.has("steps"))delete F.steps;if(F.activeStepsPath===void 0)delete F.activeStepsPath;if(F.serializedStepGraph===void 0)delete F.serializedStepGraph;if(F.suspendedPaths===void 0)delete F.suspendedPaths;if(F.resumeLabels===void 0)delete F.resumeLabels;if(F.waitingPaths===void 0)delete F.waitingPaths;if(F.requestContext===void 0)delete F.requestContext;if(F.tracingContext===void 0)delete F.tracingContext}return F}},bK4=U.object({inputTokens:U.number().optional(),outputTokens:U.number().optional(),totalTokens:U.number().optional(),reasoningTokens:U.number().optional(),cachedInputTokens:U.number().optional(),cacheCreationInputTokens:U.number().optional()}),I89=U.object({reason:U.string(),warnings:U.array(U.any()),isContinued:U.boolean(),logprobs:U.any().optional(),totalUsage:bK4.optional(),headers:U.record(U.string(),U.string()).optional(),messageId:U.string().optional(),request:U.record(U.string(),U.any()).optional()}),hW=U.object({messageId:U.string(),messages:U.object({all:U.array(U.any()),user:U.array(U.any()),nonUser:U.array(U.any())}),output:U.object({text:U.string().optional(),reasoning:U.array(U.any()).optional(),reasoningText:U.string().optional(),files:U.array(U.any()).optional(),toolCalls:U.array(U.any()).optional(),toolResults:U.array(U.any()).optional(),sources:U.array(U.any()).optional(),staticToolCalls:U.array(U.any()).optional(),dynamicToolCalls:U.array(U.any()).optional(),staticToolResults:U.array(U.any()).optional(),dynamicToolResults:U.array(U.any()).optional(),usage:bK4,steps:U.array(U.any())}),metadata:U.object({id:U.string().optional(),model:U.string().optional(),modelId:U.string().optional(),modelMetadata:U.object({modelId:U.string(),modelVersion:U.string(),modelProvider:U.string()}).optional(),timestamp:U.date().optional(),providerMetadata:U.record(U.string(),U.any()).optional(),headers:U.record(U.string(),U.string()).optional(),request:U.record(U.string(),U.any()).optional()}),stepResult:I89,processorRetryCount:U.number().optional(),fallbackModelIndex:U.number().optional(),processorRetryFeedback:U.string().optional(),isTaskCompleteCheckFailed:U.boolean().optional(),backgroundTaskPending:U.boolean().optional()}),hK4=U.object({toolCallId:U.string(),toolName:U.string(),args:U.record(U.string(),U.any()),providerMetadata:U.record(U.string(),U.any()).optional(),providerExecuted:U.boolean().optional(),output:U.any().optional()}),fK4=hK4.extend({result:U.any().optional(),error:U.any().optional()});SD=["v2","v3"];v89=U.object({isComplete:U.boolean().describe("Whether the task is complete"),completionReason:U.string().describe("Explanation of why the task is or is not complete"),finalResult:U.string().optional().describe("The final result text to return to the user. omit if primitive result is sufficient")});y89=U.object({finalResult:U.string().optional().describe("The final result text to return to the user, omit if primitive result is sufficient")});o89=class extends H89{#$;constructor({component:$,name:Y,generateId:X}){super({component:$,name:Y});this.#$=X??KO}async transform({runId:$,stream:Y,controller:X}){let G=new Map;for await(let J of Y){let Q=J;if(Q.type==="stream-start")G.clear();let W=l89(Q,{runId:$});if(W){if((W.type==="text-start"||W.type==="text-delta"||W.type==="text-end")&&W.payload?.id&&s89(W.payload.id)){let K=W.payload.id;if(!G.has(K))G.set(K,this.#$());W.payload.id=G.get(K)}F9(X,W)}}}};r24=class extends Error{constructor($){super($);this.name="ToolNotFoundError"}};A99=class extends u8{#$;#Y;#X;#J;constructor({mastra:$,models:Y,options:X}){super({name:"aisdk"});if(this.#X=X,$){if(this.#Y=$,$.getLogger())this.__setLogger(this.#Y.getLogger())}if(Y.length===0||!Y[0]){let G=new G0({id:"LLM_LOOP_MODELS_EMPTY",domain:"LLM",category:"USER"});throw this.logger.trackException(G),G}else this.#$=Y,this.#J=Y[0]}__registerPrimitives($){if($.logger)this.__setLogger($.logger)}__registerMastra($){this.#Y=$}getProvider(){return this.#J.model.provider}getModelId(){return this.#J.model.modelId}getModel(){return this.#J.model}convertToMessages($){if(Array.isArray($))return $.map((Y)=>{if(typeof Y==="string")return{role:"user",content:Y};return Y});return[{role:"user",content:$}]}stream({resumeContext:$,runId:Y,stopWhen:X=LI0(5),maxSteps:G,tools:J={},modelSettings:Q,toolChoice:W="auto",threadId:K,resourceId:Z,structuredOutput:H,options:z,inputProcessors:V,llmRequestInputProcessors:F,outputProcessors:L,errorProcessors:N,returnScorerData:D,providerOptions:A,messageList:B,requireToolApproval:O,toolCallConcurrency:E,_internal:M,agentId:R,agentName:q,toolCallId:_,requestContext:P,methodType:w,includeRawChunks:j,autoResumeSuspendedTools:C,maxProcessorRetries:k,processorStates:S,activeTools:I,isTaskComplete:v,onIterationComplete:x,workspace:y,...d}){let u=e1(d),b;if(G&&typeof G==="number")b=LI0(G);else b=X;let g=B.get.all.aiV5.model(),p=this.#J.model,h=u.tracingContext.currentSpan?.createChildSpan({name:`llm: '${p.modelId}'`,type:"model_generation",input:{messages:[...B.getAllSystemMessages(),...g]},attributes:{model:p.modelId,provider:p.provider,streaming:!0,parameters:Q},metadata:{runId:Y,threadId:K,resourceId:Z},tracingPolicy:this.#X?.tracingPolicy,requestContext:P});if(h)jO({span:h,fn:()=>this.logger.debug("Streaming text",{runId:Y,threadId:K,resourceId:Z,messages:g,tools:Object.keys(J||{})})});let n=h?.createTracker();try{let t={mastra:this.#Y,resumeContext:$,runId:Y,toolCallId:_,messageList:B,models:this.#$,logger:this.logger,tools:J,stopWhen:b,toolChoice:W,modelSettings:Q,providerOptions:A,_internal:M,structuredOutput:H,inputProcessors:V,llmRequestInputProcessors:F,outputProcessors:L,errorProcessors:N,returnScorerData:D,modelSpanTracker:n,requireToolApproval:O,toolCallConcurrency:E,agentId:R,agentName:q,requestContext:P,methodType:w,includeRawChunks:j,autoResumeSuspendedTools:C,maxProcessorRetries:k,processorStates:S,activeTools:I,isTaskComplete:v,onIterationComplete:x,workspace:y,...u,options:{...z,onStepFinish:async(s)=>{try{await z?.onStepFinish?.({...s,runId:Y})}catch(X0){let a=new G0({id:"LLM_STREAM_ON_STEP_FINISH_CALLBACK_EXECUTION_FAILED",domain:"LLM",category:"USER",details:{modelId:s.model?.modelId,modelProvider:s.model?.provider,runId:Y??"unknown",threadId:K??"unknown",resourceId:Z??"unknown",finishReason:s?.finishReason,toolCalls:s?.toolCalls?JSON.stringify(s.toolCalls):"",toolResults:s?.toolResults?JSON.stringify(s.toolResults):"",usage:s?.usage?JSON.stringify(s.usage):""}},X0);throw n?.reportGenerationError({error:a}),this.logger.trackException(a),a}this.logger.debug("Stream step change",{text:s?.text,toolCalls:s?.toolCalls,toolResults:s?.toolResults,finishReason:s?.finishReason,usage:s?.usage,runId:Y});let K0=parseInt(s?.response?.headers?.["x-ratelimit-remaining-tokens"]??"",10);if(!isNaN(K0)&&K0>0&&K0<2000)this.logger.warn("Rate limit approaching, waiting 10 seconds",{runId:Y}),await vj(1e4)},onFinish:async(s)=>{n?.endGeneration({output:{files:s?.files,object:s?.object,reasoning:s?.reasoning,reasoningText:s?.reasoningText,sources:s?.sources,text:s?.text,warnings:s?.warnings},attributes:{finishReason:s?.finishReason,responseId:s?.response.id,responseModel:s?.response.modelId},usage:s?.totalUsage,providerMetadata:s?.providerMetadata});try{await z?.onFinish?.({...s,runId:Y})}catch(K0){let X0=new G0({id:"LLM_STREAM_ON_FINISH_CALLBACK_EXECUTION_FAILED",domain:"LLM",category:"USER",details:{modelId:s.model?.modelId,modelProvider:s.model?.provider,runId:Y??"unknown",threadId:K??"unknown",resourceId:Z??"unknown",finishReason:s?.finishReason,toolCalls:s?.toolCalls?JSON.stringify(s.toolCalls):"",toolResults:s?.toolResults?JSON.stringify(s.toolResults):"",usage:s?.usage?JSON.stringify(s.usage):""}},K0);throw n?.reportGenerationError({error:X0}),this.logger.trackException(X0),X0}this.logger.debug("Stream finished",{text:s?.text,toolCalls:s?.toolCalls,toolResults:s?.toolResults,finishReason:s?.finishReason,usage:s?.usage,runId:Y,threadId:K,resourceId:Z})}},maxSteps:G};return N99(t)}catch(t){let s=new G0({id:"LLM_STREAM_TEXT_AI_SDK_EXECUTION_FAILED",domain:"LLM",category:"THIRD_PARTY",details:{modelId:p.modelId,modelProvider:p.provider,runId:Y??"unknown",threadId:K??"unknown",resourceId:Z??"unknown"}},t);throw n?.reportGenerationError({error:s}),s}}};B99=class extends Fg0{type="object";async processPartialChunk({accumulatedText:$,previousObject:Y}){let X=this.preprocessText($),{value:G,state:J}=await bL(X);if(this.validatePartialChunks&&this.partialSchema){let Q=this.partialSchema?.safeParse(G);if(Q.success&&Q.data&&Q.data!==void 0&&!yL(Y,Q.data))return{shouldEmit:!0,emitValue:Q.data,newPreviousResult:Q.data};return{shouldEmit:!1}}if(G!==void 0&&G!==null&&typeof G==="object"&&!yL(Y,G))return{shouldEmit:["successful-parse","repaired-parse"].includes(J),emitValue:G,newPreviousResult:G};return{shouldEmit:!1}}async validateAndTransformFinal($){if(!$)return{success:!1,error:Error("No object generated: could not parse the response.")};let Y=this.preprocessText($),{value:X}=await bL(Y);return this.validateValue(X)}},O99=class extends Fg0{type="array";textPreviousFilteredArray=[];hasEmittedInitialArray=!1;async processPartialChunk({accumulatedText:$,previousObject:Y}){let X=this.preprocessText($),{value:G,state:J}=await bL(X);if(G!==void 0&&!yL(Y,G)){let Q=G&&typeof G==="object"&&"elements"in G&&Array.isArray(G.elements)?G.elements:[],W=[];for(let K=0;K<Q.length;K++){let Z=Q[K];if(K===Q.length-1&&J!=="successful-parse"){if(Z&&typeof Z==="object"&&Object.keys(Z).length>0)W.push(Z)}else if(Z&&typeof Z==="object"&&Object.keys(Z).length>0)W.push(Z)}if(!this.hasEmittedInitialArray){if(this.hasEmittedInitialArray=!0,W.length===0)return this.textPreviousFilteredArray=[],{shouldEmit:!0,emitValue:[],newPreviousResult:G}}if(!yL(this.textPreviousFilteredArray,W))return this.textPreviousFilteredArray=[...W],{shouldEmit:!0,emitValue:W,newPreviousResult:G}}return{shouldEmit:!1}}async validateAndTransformFinal($){let Y=this.textPreviousFilteredArray;if(!Y)return{success:!1,error:Error("No object generated: could not parse the response.")};return this.validateValue(Y)}},E99=class extends Fg0{type="enum";textPreviousEnumResult;findBestEnumMatch($){if(!this.schema)return;let X=$6(this.schema)?.enum;if(!X)return;let G=X.filter((Q)=>typeof Q==="string").filter((Q)=>Q.startsWith($));if(G.length===0)return;let J=G[0];return G.length===1&&J!==void 0?J:$}async processPartialChunk({accumulatedText:$,previousObject:Y}){let X=this.preprocessText($),{value:G}=await bL(X);if(G!==void 0&&G!==null&&typeof G==="object"&&!Array.isArray(G)&&"result"in G&&typeof G.result==="string"&&!yL(Y,G)){let J=G.result,Q=this.findBestEnumMatch(J);if(J.length>0&&Q&&Q!==this.textPreviousEnumResult)return this.textPreviousEnumResult=Q,{shouldEmit:!0,emitValue:Q,newPreviousResult:G}}return{shouldEmit:!1}}async validateAndTransformFinal($){let Y=this.preprocessText($),{value:X}=await bL(Y);if(!(typeof X==="object"&&X!==null&&("result"in X)))return{success:!1,error:Error("Invalid enum format: expected object with result property")};let G=X;if(!G||typeof G!=="object"||typeof G.result!=="string")return{success:!1,error:Error("Invalid enum format: expected object with result property")};return this.validateValue(G.result)}};jX=U.enum(["agent","workflow","none","tool"]);I99=Zk0(QK4(),1),t24=new Set(["background-task-completed","background-task-failed","background-task-cancelled","background-task-suspended"]);u99=new m99;d99=Zk0(QK4(),1),c99=U.object({id:U.string(),title:U.string().optional(),resourceId:U.string(),createdAt:U.date(),updatedAt:U.date(),metadata:U.record(U.string(),U.any()).optional()}),l99=U.object({convertedTools:U.record(U.string(),U.any())}),i99=U.object({threadExists:U.boolean(),thread:c99.optional(),messageList:U.instanceof(l6),processorStates:U.instanceof(Map),tripwire:U.object({reason:U.string(),retry:U.boolean().optional(),metadata:U.unknown().optional(),processorId:U.string().optional()}).optional(),initialSignalEchoes:U.array(U.custom()).optional()});YJ=class $ extends u8{id;name;source;#$;#Y;#X;model;#J;maxRetries;#G;#Q;#U;#Z;#W;#H;#F;#V;#K;#A;#O;#N;#B=null;#R;#D;#L;#w;#M;#P;#z=!1;#v;#_;#g;#E=new Map;#j;#h;#f;_agentNetworkAppend=!1;constructor(Y){super({component:VZ.AGENT,rawConfig:Y.rawConfig});if(this.#f=Y,this.name=Y.name,this.id=Y.id??Y.name,this.source="code",this.#$=Y.instructions,this.#Y=Y.description,this.#X=Y.metadata,this.#j=Y.options,!Y.model){let X=new G0({id:"AGENT_CONSTRUCTOR_MODEL_REQUIRED",domain:"AGENT",category:"USER",details:{agentName:Y.name},text:"LanguageModel is required to create an Agent. Please provide the 'model'."});throw this.logger.trackException(X),X}if(Array.isArray(Y.model)){if(Y.model.length===0){let X=new G0({id:"AGENT_CONSTRUCTOR_MODEL_ARRAY_EMPTY",domain:"AGENT",category:"USER",details:{agentName:Y.name},text:"Model array is empty. Please provide at least one model."});throw this.logger.trackException(X),X}this.model=Y.model.map((X)=>$.toFallbackEntry(X,Y?.maxRetries??0)),this.#J=[...this.model]}else this.model=Y.model,this.#J=Y.model;if(this.maxRetries=Y.maxRetries??0,Y.workflows)this.#Z=Y.workflows;if(this.#W=Y.defaultGenerateOptionsLegacy||{},this.#H=Y.defaultStreamOptionsLegacy||{},this.#F=Y.defaultOptions||{},this.#V=Y.defaultNetworkOptions||{},this.#g=O60(Y.transform??Y.toolPayloadProjection),this.#K=Y.tools||{},Y.mastra)this.__registerMastra(Y.mastra),this.__registerPrimitives({logger:Y.mastra.getLogger()});if(this.#A=Y.scorers||{},this.#O=Y.agents||{},Y.memory)this.#Q=Y.memory;if(Y.skillsFormat)this.#U=Y.skillsFormat;if(Y.voice){if(this.#N=Y.voice,typeof Y.tools!=="function")this.#N?.addTools(this.#K);if(typeof Y.instructions==="string")this.#N?.addInstructions(Y.instructions)}else this.#N=new OI0;if(Y.channels){if(Y.channels instanceof u24)this.#B=Y.channels,this.#B.__setAgent(this);else if("adapters"in Y.channels&&Y.channels.adapters&&Object.keys(Y.channels.adapters).length>0){let X=Y.channels;this.#B=new u24({...X,userName:X.userName??Y.name}),this.#B.__setAgent(this)}}if(Y.browser){if(Y.browser.providerType!=="sdk"){let X=new G0({id:"AGENT_INVALID_BROWSER_PROVIDER",domain:"AGENT",category:"USER",details:{agentName:Y.name,providerType:Y.browser.providerType},text:`Agent.browser requires an SDK provider (providerType: 'sdk'), but received '${Y.browser.providerType}'. Use @mastra/agent-browser or @mastra/stagehand for Agent.browser. For CLI providers like @mastra/browser-viewer, use Workspace.browser instead.`});throw this.logger.trackException(X),X}this.#P=Y.browser,this.#z=!0}if(Y.workspace)this.#R=Y.workspace;if(Y.inputProcessors)this.#D=Y.inputProcessors;if(Y.outputProcessors)this.#L=Y.outputProcessors;if(Y.maxProcessorRetries!==void 0)this.#w=Y.maxProcessorRetries;if(Y.errorProcessors)this.#M=Y.errorProcessors;if(Y.requestContextSchema)this.#v=Q4(Y.requestContextSchema);if(Y.backgroundTasks)this.#_=Y.backgroundTasks;this._agentNetworkAppend=Y._agentNetworkAppend||!1}getMastraInstance(){return this.#G}getBackgroundTasksConfig(){return this.#_}__getStaticAgents(){if(typeof this.#O==="function")return;return this.#O}__hasSubAgentsConfigured(){if(typeof this.#O==="function")return!0;let Y=this.#O;return!!Y&&Object.keys(Y).length>0}disableBackgroundTasks(){this.#_={...this.#_??{},disabled:!0}}enableBackgroundTasks(){if(this.#_)this.#_={...this.#_,disabled:!1}}async deriveSubAgentBackgroundConfig(Y,X){try{let G=Y.getBackgroundTasksConfig?.();if(G?.disabled!==!0&&G?.tools){if(G.tools==="all")return{enabled:!0,waitTimeoutMs:G.waitTimeoutMs};if(Object.values(G.tools).some((Q)=>{if(typeof Q==="boolean")return Q;return Q?.enabled===!0}))return{enabled:!0,waitTimeoutMs:G.waitTimeoutMs}}if(Y instanceof $){let J=await Y.getToolsForExecution({requestContext:X});if(J&&typeof J==="object"){for(let Q of Object.values(J))if(Q?.background?.enabled===!0)return{enabled:!0,waitTimeoutMs:G?.waitTimeoutMs}}}}catch{}return}getChannels(){return this.#B}setChannels(Y){if(this.#B&&this.#B!==Y)this.logger?.debug(`Replacing existing AgentChannels on agent "${this.name}"`);this.#B=Y,Y.__setAgent(this)}get browser(){return this.#P}setBrowser(Y){this.#P=Y,this.#z=!0}hasOwnBrowser(){return this.#z}async getSkillsProcessors(Y,X){let G=await this.getWorkspace({requestContext:X||new p1});if(!G?.skills)return[];let J=YK4(Y),Q=XK4(Y);if(J||Q)return[];return[new KK4({workspace:G,format:this.#U})]}async getWorkspaceInstructionsProcessors(Y,X){let G=await this.getWorkspace({requestContext:X||new p1});if(!G)return[];if(!G.filesystem&&!G.sandbox)return[];if(Y.some((Q)=>!V9(Q)&&("id"in Q)&&Q.id==="workspace-instructions-processor"))return[];return[new ZK4({workspace:G})]}async#T(Y){if(this.#v){let X=Y?.all??{},G=await this.#v["~standard"].validate(X);if(G.issues){let Q=G.issues.map((W)=>{return`- ${W.path?.map((Z)=>typeof Z==="object"?Z.key:Z).join(".")}: ${W.message}`}).join(`
`);throw new G0({id:"AGENT_REQUEST_CONTEXT_VALIDATION_FAILED",domain:"AGENT",category:"USER",text:`Request context validation failed for agent '${this.id}':
${Q}`,details:{agentId:this.id,agentName:this.name}})}}}listAgents({requestContext:Y=new p1}={}){let X=this.#O?typeof this.#O==="function"?this.#O({requestContext:Y}):this.#O:{};return t2(X,(G)=>{if(!G){let J=new G0({id:"AGENT_GET_AGENTS_FUNCTION_EMPTY_RETURN",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Function-based agents returned empty value`});throw this.logger.trackException(J),J}return Object.entries(G||{}).forEach(([J,Q])=>{if(this.#G)Q.__registerMastra?.(this.#G)}),G})}async getProcessorRunner({requestContext:Y,inputProcessorOverrides:X,outputProcessorOverrides:G,errorProcessorOverrides:J,processorStates:Q}){let W=await this.listResolvedInputProcessors(Y,X),K=await this.listResolvedOutputProcessors(Y,G),Z=J??(this.#M?typeof this.#M==="function"?await this.#M({requestContext:Y}):this.#M:[]);return new V5({inputProcessors:W,outputProcessors:K,errorProcessors:Z,logger:this.logger,agentName:this.name,processorStates:Q})}combineProcessorsIntoWorkflow(Y,X){if(Y.length===0)return[];if(Y.length===1&&V9(Y[0])){let Q=Y[0];if(!Q.type)Q.type="processor";return[Q]}let G=Y.filter((Q)=>V9(Q)||om(Q));if(G.length===0)return[];if(G.length===1&&V9(G[0])){let Q=G[0];if(!Q.type)Q.type="processor";return[Q]}let J=IQ({id:X,inputSchema:Yg,outputSchema:Yg,type:"processor",options:{validateInputs:!1,tracingPolicy:{internal:1}}});J.__setLogger(this.logger);for(let[Q,W]of G.entries()){let K;if(V9(W))K=W;else{let Z=W;Z.processorIndex=Q,K=o9(Z);let H=Z;if(typeof H.getLoadedToolsForRequestContext==="function")K.getLoadedToolsForRequestContext=H.getLoadedToolsForRequestContext.bind(Z)}J=J.then(K)}return[J.commit()]}async listResolvedOutputProcessors(Y,X){let G=X?X:this.#L?typeof this.#L==="function"?await this.#L({requestContext:Y||new p1}):this.#L:[],J=await this.getMemory({requestContext:Y||new p1}),Q=J?await J.getOutputProcessors(G,Y):[],W=[...G,...Q];return this.combineProcessorsIntoWorkflow(W,`${this.id}-output-processor`)}async resolveInputProcessors(Y,X){let G=X?X:this.#D?typeof this.#D==="function"?await this.#D({requestContext:Y||new p1}):this.#D:[],J=await this.getMemory({requestContext:Y||new p1}),Q=J?await J.getInputProcessors(G,Y):[],W=await this.getWorkspaceInstructionsProcessors(G,Y),K=await this.getSkillsProcessors(G,Y),Z=this.#B?this.#B.getInputProcessors(G):[],H=this.#P?this.#P.getInputProcessors(G):[];return[...Q,...W,...K,...Z,...H,...G]}async listResolvedInputProcessors(Y,X){let G=await this.resolveInputProcessors(Y,X);return this.combineProcessorsIntoWorkflow(G,`${this.id}-input-processor`)}async listResolvedLLMRequestProcessors(Y,X){return this.resolveInputProcessors(Y,X)}async listInputProcessors(Y){return this.listResolvedInputProcessors(Y)}async listOutputProcessors(Y){return this.listResolvedOutputProcessors(Y)}async listErrorProcessors(Y){if(!this.#M)return[];return typeof this.#M==="function"?await this.#M({requestContext:Y}):this.#M}async resolveProcessorById(Y,X){let G=X||new p1,J=this.#D?typeof this.#D==="function"?await this.#D({requestContext:G}):this.#D:[],Q=await this.getMemory({requestContext:G}),W=Q?await Q.getInputProcessors(J,G):[];for(let H of[...W,...J])if(!V9(H)&&om(H)&&H.id===Y)return H;let K=this.#L?typeof this.#L==="function"?await this.#L({requestContext:G}):this.#L:[],Z=Q?await Q.getOutputProcessors(K,G):[];for(let H of[...Z,...K])if(!V9(H)&&om(H)&&H.id===Y)return H;return null}async listConfiguredInputProcessors(Y){if(!this.#D)return[];return typeof this.#D==="function"?await this.#D({requestContext:Y||new p1}):this.#D}async listConfiguredOutputProcessors(Y){if(!this.#L)return[];return typeof this.#L==="function"?await this.#L({requestContext:Y||new p1}):this.#L}async getConfiguredProcessorIds(Y){let X=Y||new p1,G=[];if(this.#D)G=(typeof this.#D==="function"?await this.#D({requestContext:X}):this.#D).map((K)=>K.id).filter(Boolean);let J=[];if(this.#L)J=(typeof this.#L==="function"?await this.#L({requestContext:X}):this.#L).map((K)=>K.id).filter(Boolean);let Q=[];if(this.#M)Q=(typeof this.#M==="function"?await this.#M({requestContext:X}):this.#M).map((K)=>K.id).filter(Boolean);return{inputProcessorIds:G,outputProcessorIds:J,errorProcessorIds:Q}}async getConfiguredProcessorWorkflows(){let Y=[];if(this.#D){let X=typeof this.#D==="function"?await this.#D({requestContext:new p1}):this.#D,G=this.combineProcessorsIntoWorkflow(X,`${this.id}-input-processor`);for(let J of G)if(V9(J))Y.push(J)}if(this.#L){let X=typeof this.#L==="function"?await this.#L({requestContext:new p1}):this.#L,G=this.combineProcessorsIntoWorkflow(X,`${this.id}-output-processor`);for(let J of G)if(V9(J))Y.push(J)}return Y}hasOwnMemory(){return Boolean(this.#Q)}async getMemory({requestContext:Y=new p1}={}){if(!this.#Q)return;let X;if(typeof this.#Q!=="function")X=this.#Q;else{let G=this.#Q({requestContext:Y,mastra:this.#G});if(X=await Promise.resolve(G),!X){let J=new G0({id:"AGENT_GET_MEMORY_FUNCTION_EMPTY_RETURN",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Function-based memory returned empty value`});throw this.logger.trackException(J),J}}if(this.#G&&X){if(X.__registerMastra(this.#G),!X.hasOwnStorage){let G=this.#G.getStorage();if(G)X.setStorage(G)}}return X}hasOwnWorkspace(){return Boolean(this.#R)}async getWorkspace({requestContext:Y=new p1}={}){if(this.#R){if(typeof this.#R!=="function")return this.#k(this.#R),this.#R;let G=this.#R({requestContext:Y,mastra:this.#G}),J=await Promise.resolve(G);if(!J){if(!this.#z)this.#P=void 0;return}if(J.__setLogger(this.logger),this.#G)this.#G.addWorkspace(J,void 0,{source:"agent",agentId:this.id,agentName:this.name});return this.#k(J),J}let X=this.#G?.getWorkspace();if(X)this.#k(X);else if(!this.#z)this.#P=void 0;return X}#k(Y){if(this.#z)return;this.#P=Y.browser}get voice(){if(typeof this.#$==="function"){let Y=new G0({id:"AGENT_VOICE_INCOMPATIBLE_WITH_FUNCTION_INSTRUCTIONS",domain:"AGENT",category:"USER",details:{agentName:this.name},text:"Voice is not compatible when instructions are a function. Please use getVoice() instead."});throw this.logger.trackException(Y),Y}return this.#N}get requestContextSchema(){return this.#v}async listWorkflows({requestContext:Y=new p1}={}){let X;if(typeof this.#Z==="function")X=await Promise.resolve(this.#Z({requestContext:Y,mastra:this.#G}));else X=this.#Z??{};return Object.entries(X||{}).forEach(([G,J])=>{if(this.#G)J.__registerMastra(this.#G)}),X}async listScorers({requestContext:Y=new p1}={}){if(typeof this.#A!=="function")return this.#A;let X=this.#A({requestContext:Y,mastra:this.#G});return t2(X,(G)=>{if(!G){let J=new G0({id:"AGENT_GET_SCORERS_FUNCTION_EMPTY_RETURN",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Function-based scorers returned empty value`});throw this.logger.trackException(J),J}return G})}async getVoice({requestContext:Y}={}){if(this.#N){let X=this.#N;X?.addTools(await this.listTools({requestContext:Y}));let G=await this.getInstructions({requestContext:Y});return X?.addInstructions(this.#b(G)),X}else return new OI0}getInstructions({requestContext:Y=new p1}={}){if(typeof this.#$==="function"){let X=this.#$({requestContext:Y,mastra:this.#G});return t2(X,(G)=>{if(!G){let J=new G0({id:"AGENT_GET_INSTRUCTIONS_FUNCTION_EMPTY_RETURN",domain:"AGENT",category:"USER",details:{agentName:this.name},text:"Instructions are required to use an Agent. The function-based instructions returned an empty value."});throw this.logger.trackException(J),J}return G})}return this.#$}#b(Y){if(typeof Y==="string")return Y;if(Array.isArray(Y))return Y.map((X)=>{if(typeof X==="string")return X;return typeof X.content==="string"?X.content:""}).filter((X)=>X).join(`

`);return typeof Y.content==="string"?Y.content:""}getDescription(){return this.#Y??""}getMetadata({requestContext:Y=new p1}={}){if(this.#X===void 0)return;if(typeof this.#X!=="function")return this.#X;let X=this.#X({requestContext:Y,mastra:this.#G});return t2(X,(G)=>G)}getLegacyHandler(){if(!this.#h)this.#h=new C99({logger:this.logger,name:this.name,id:this.id,mastra:this.#G,getDefaultGenerateOptionsLegacy:this.getDefaultGenerateOptionsLegacy.bind(this),getDefaultStreamOptionsLegacy:this.getDefaultStreamOptionsLegacy.bind(this),hasOwnMemory:this.hasOwnMemory.bind(this),getInstructions:async(Y)=>{return await this.getInstructions(Y)},getLLM:this.getLLM.bind(this),getMemory:this.getMemory.bind(this),convertTools:this.convertTools.bind(this),getMemoryMessages:(...Y)=>this.getMemoryMessages(...Y),__runInputProcessors:this.__runInputProcessors.bind(this),__runProcessInputStep:this.__runProcessInputStep.bind(this),getMostRecentUserMessage:this.getMostRecentUserMessage.bind(this),genTitle:this.genTitle.bind(this),resolveTitleGenerationConfig:this.resolveTitleGenerationConfig.bind(this),convertInstructionsToString:this.#b.bind(this),tracingPolicy:this.#j?.tracingPolicy,resolvedVersionId:this.toRawConfig()?.resolvedVersionId,_agentNetworkAppend:this._agentNetworkAppend,listResolvedOutputProcessors:this.listResolvedOutputProcessors.bind(this),__runOutputProcessors:this.__runOutputProcessors.bind(this),runScorers:this.#C.bind(this)});return this.#h}getDefaultGenerateOptionsLegacy({requestContext:Y=new p1}={}){if(typeof this.#W!=="function")return this.#W;let X=this.#W({requestContext:Y,mastra:this.#G});return t2(X,(G)=>{if(!G){let J=new G0({id:"AGENT_GET_DEFAULT_GENERATE_OPTIONS_FUNCTION_EMPTY_RETURN",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Function-based default generate options returned empty value`});throw this.logger.trackException(J),J}return G})}getDefaultStreamOptionsLegacy({requestContext:Y=new p1}={}){if(typeof this.#H!=="function")return this.#H;let X=this.#H({requestContext:Y,mastra:this.#G});return t2(X,(G)=>{if(!G){let J=new G0({id:"AGENT_GET_DEFAULT_STREAM_OPTIONS_FUNCTION_EMPTY_RETURN",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Function-based default stream options returned empty value`});throw this.logger.trackException(J),J}return G})}getDefaultOptions({requestContext:Y=new p1}={}){if(typeof this.#F!=="function")return this.#F;let X=this.#F({requestContext:Y,mastra:this.#G});return t2(X,(G)=>{if(!G){let J=new G0({id:"AGENT_GET_DEFAULT_OPTIONS_FUNCTION_EMPTY_RETURN",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Function-based default options returned empty value`});throw this.logger.trackException(J),J}return G})}getDefaultNetworkOptions({requestContext:Y=new p1}={}){if(typeof this.#V!=="function")return this.#V;let X=this.#V({requestContext:Y,mastra:this.#G});return t2(X,(G)=>{if(!G){let J=new G0({id:"AGENT_GET_DEFAULT_NETWORK_OPTIONS_FUNCTION_EMPTY_RETURN",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Function-based default network options returned empty value`});throw this.logger.trackException(J),J}return G})}listTools({requestContext:Y=new p1}={}){if(typeof this.#K!=="function")return b80(this.#K);let X=this.#K({requestContext:Y,mastra:this.#G});return t2(X,(G)=>{if(!G){let J=new G0({id:"AGENT_GET_TOOLS_FUNCTION_EMPTY_RETURN",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Function-based tools returned empty value`});throw this.logger.trackException(J),J}return b80(G)})}getLLM({requestContext:Y=new p1,model:X}={}){return(X?this.resolveModelSelection(X,Y):this.resolveModelSelection(this.model,Y)).then((J)=>{let Q=Array.isArray(J)?J.find((K)=>K.enabled)?.model:J;if(!Q){let K=new G0({id:"AGENT_GET_LLM_NO_ENABLED_MODELS",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - No enabled models found in model list`});throw this.logger.trackException(K),K}let W=this.resolveModelConfig(Q,Y);return t2(W,(K)=>{let Z;if(ZG(K)){let H=Array.isArray(J)?J.filter((z)=>z.enabled):J;Z=this.prepareModels(Y,H).then((z)=>{return new A99({models:z,mastra:this.#G,options:{tracingPolicy:this.#j?.tracingPolicy}})})}else Z=new jY4({model:K,mastra:this.#G,options:{tracingPolicy:this.#j?.tracingPolicy}});return t2(Z,(H)=>{if(this.#q)H.__registerPrimitives(this.#q);if(this.#G)H.__registerMastra(this.#G);return H})})})}async resolveModelConfig(Y,X){try{return await RE(Y,X,this.#G)}catch(G){let J=new G0({id:"AGENT_GET_MODEL_MISSING_MODEL_INSTANCE",domain:"AGENT",category:"USER",details:{agentName:this.name,originalError:G instanceof Error?G.message:String(G)},text:`[Agent:${this.name}] - Failed to resolve model configuration`});throw this.logger.trackException(J),J}}isModelFallbacks(Y){if(Y.length===0)return!1;return Y.every((X)=>typeof X.id==="string"&&typeof X.model<"u"&&typeof X.maxRetries==="number"&&typeof X.enabled==="boolean")}normalizeModelFallbacks(Y){if(this.isModelFallbacks(Y))return Y;return Y.map((X)=>$.toFallbackEntry(X,this.maxRetries??0))}static toFallbackEntry(Y,X){return{id:Y.id??E6(),model:Y.model,maxRetries:Y.maxRetries??X,enabled:Y.enabled??!0,modelSettings:Y.modelSettings,providerOptions:Y.providerOptions,headers:Y.headers}}assertSupportsPreparedModels(Y){if(!ZG(Y)){let X=new G0({id:"AGENT_PREPARE_MODELS_INCOMPATIBLE_WITH_MODEL_ARRAY_V1",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Only v2/v3 models are allowed when an array of models is provided`});throw this.logger.trackException(X),X}}async resolveModelSelection(Y,X){if(typeof Y==="function"){let G=await Y({requestContext:X,mastra:this.#G});if(Array.isArray(G)){if(G.length===0){let J=new G0({id:"AGENT_RESOLVE_MODEL_EMPTY_ARRAY",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Dynamic function returned empty model array`});throw this.logger.trackException(J),J}return this.normalizeModelFallbacks(G)}return G}if(Array.isArray(Y)){if(Y.length===0){let G=new G0({id:"AGENT_RESOLVE_MODEL_EMPTY_ARRAY",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Empty model array provided`});throw this.logger.trackException(G),G}return this.normalizeModelFallbacks(Y)}return Y}getModel({requestContext:Y=new p1,modelConfig:X=this.model}={}){return this.resolveModelSelection(X,Y).then((G)=>{if(!Array.isArray(G))return this.resolveModelConfig(G,Y);let J=G.find((Q)=>Q.enabled);if(!J){let Q=new G0({id:"AGENT_GET_MODEL_MISSING_MODEL_INSTANCE",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - No enabled models found in model list`});throw this.logger.trackException(Q),Q}return this.resolveModelConfig(J.model,Y)})}async getModelList(Y=new p1){if(typeof this.model==="function"){let X=await this.resolveModelSelection(this.model,Y);if(!Array.isArray(X))return null;return this.prepareModels(Y,X)}if(!Array.isArray(this.model))return null;return this.prepareModels(Y)}__updateInstructions(Y){this.#$=Y}__updateModel({model:Y}){this.model=Y,this.logger.debug(`[Agents:${this.name}] Model updated.`,{model:this.model,name:this.name})}__resetToOriginalModel(){this.model=Array.isArray(this.#J)?[...this.#J]:this.#J}__getOverridableFields(){return{instructions:this.#$,model:this.model,tools:this.#K,workspace:this.#R}}reorderModels(Y){if(!Array.isArray(this.model)){this.logger.warn("Model is not an array",{agent:this.name});return}this.model=this.model.sort((X,G)=>{let J=Y.indexOf(X.id),Q=Y.indexOf(G.id);return(J===-1?1/0:J)-(Q===-1?1/0:Q)})}updateModelInModelList({id:Y,model:X,enabled:G,maxRetries:J}){if(!Array.isArray(this.model)){this.logger.warn("Model is not an array",{agent:this.name});return}let Q=this.model;if(!Q.find((K)=>K.id===Y)){this.logger.warn("Model not found",{agent:this.name,modelId:Y});return}this.model=Q.map((K)=>{if(K.id===Y)return{...K,model:X??K.model,enabled:G??K.enabled,maxRetries:J??K.maxRetries};return K})}#q;__registerPrimitives(Y){if(Y.logger)this.__setLogger(Y.logger);this.#q=Y}__registerMastra(Y){if(this.#G=Y,this.#R&&typeof this.#R!=="function")this.#R.__setLogger(this.logger);if(this.#K&&typeof this.#K==="object")Object.entries(this.#K).forEach(([X,G])=>{try{if(G&&typeof G==="object"&&"id"in G){let J=typeof G.id==="string"?G.id:X;Y.addTool(G,J)}}catch(J){if(J instanceof G0&&J.id!=="MASTRA_ADD_TOOL_DUPLICATE_KEY")throw J}});if(this.#D&&Array.isArray(this.#D))this.#D.forEach((X)=>{try{Y.addProcessor(X)}catch(G){if(G instanceof G0&&G.id!=="MASTRA_ADD_PROCESSOR_DUPLICATE_KEY")throw G}Y.addProcessorConfiguration(X,this.id,"input")});if(this.#L&&Array.isArray(this.#L))this.#L.forEach((X)=>{try{Y.addProcessor(X)}catch(G){if(G instanceof G0&&G.id!=="MASTRA_ADD_PROCESSOR_DUPLICATE_KEY")throw G}Y.addProcessorConfiguration(X,this.id,"output")})}__setTools(Y){this.#K=Y}__fork(){let Y=new $({...this.#f,rawConfig:this.toRawConfig()});if(this.#G&&!this.#f.mastra)Y.#G=this.#G;if(this.#q)Y.#q=this.#q;return Y.source=this.source,Y._agentNetworkAppend=this._agentNetworkAppend,Y}formatMessagePartsForTitle(Y,X){let G=[];for(let J of Y)if(J.type==="text")G.push(`${X}: ${J.text}`);else if(J.type==="tool-invocation"){let Q=J.toolInvocation;if(Q.state==="result"){let W=typeof Q.result==="string"?Q.result:JSON.stringify(Q.result);G.push(`Tool Result ${Q.toolName}: ${W.slice(0,200)}`)}else G.push(`Tool Call ${Q.toolName}: ${JSON.stringify(Q.args).slice(0,200)}`)}else if(J.type==="reasoning"){if(J.reasoning)G.push(`Reasoning: ${J.reasoning}`)}else if(J.type==="source-url")G.push(`${X}: User added URL: ${J.url.substring(0,100)}`);else if(J.type==="file")G.push(`${X}: User added ${J.mediaType} file: ${J.url.slice(0,100)}`);return G}formatMessagesForTitle(Y){let X=[];for(let G of Y){let J=G.role.charAt(0).toUpperCase()+G.role.slice(1);if(typeof G.content==="string"&&G.content)X.push(`${J}: ${G.content}`);if(G.parts&&Array.isArray(G.parts)&&G.parts.length>0)X.push(...this.formatMessagePartsForTitle(G.parts,J))}return X.join(`
`)}async generateTitleFromUserMessage({message:Y,messages:X,requestContext:G=new p1,model:J,instructions:Q,...W}){let K=e1(W),Z=await this.getLLM({requestContext:G,model:J}),H;if(X&&X.length>0)H=this.formatMessagesForTitle(X);else if(Y){let L=new l6().add(Y,"user").get.all.aiV5.ui().at(-1);if(!L)throw Error(`Could not generate title from input ${JSON.stringify(Y)}`);H=this.formatMessagesForTitle([L])}else throw Error("Either message or messages must be provided");if(!H)return;let z=await this.resolveTitleInstructions(G,Q),V="";if(ZG(Z.getModel())){let L=new l6().add([{role:"system",content:z}],"system").add([{role:"user",content:H}],"input");V=await Z.stream({methodType:"generate",requestContext:G,...K,messageList:L,agentId:this.id,agentName:this.name}).text}else V=(await Z.__text({requestContext:G,...K,messages:[{role:"system",content:z},{role:"user",content:H}]})).text;return V.replace(/<think>[\s\S]*?<\/think>/g,"").trim()}getMostRecentUserMessage(Y){return Y.filter((G)=>G.role==="user").at(-1)}async genTitle(Y,X,G,J,Q,W){try{if(W&&W.length>0)return await this.generateTitleFromUserMessage({messages:W,requestContext:X,...G,model:J,instructions:Q});if(Y){let K=new l6().add(Y,"user").get.all.ui().at(-1);if(K)return await this.generateTitleFromUserMessage({message:K,requestContext:X,...G,model:J,instructions:Q})}return}catch(K){this.logger.error("Error generating title",{agent:this.name,error:K});return}}__setMemory(Y){this.#Q=Y}__setWorkspace(Y){if(this.#R=Y,this.#G&&Y&&typeof Y!=="function")Y.__setLogger(this.logger),this.#G.addWorkspace(Y,void 0,{source:"agent",agentId:this.id,agentName:this.name})}async listMemoryTools({runId:Y,resourceId:X,threadId:G,requestContext:J,mastraProxy:Q,memoryConfig:W,autoResumeSuspendedTools:K,backgroundTaskEnabled:Z,...H}){let z=e1(H),V={};if(this._agentNetworkAppend)return this.logger.debug("Skipping memory tools (agent network context)",{agent:this.name,runId:Y}),V;let F=await this.getMemory({requestContext:J});if(!G&&!X)return this.logger.debug("Skipping memory tools (no thread or resource context)",{agent:this.name,runId:Y}),V;let L=F?.listTools?.(W);if(L)for(let[N,D]of Object.entries(L)){let A=D,B={name:N,runId:Y,threadId:G,resourceId:X,logger:this.logger,mastra:Q,memory:F,agentName:this.name,agentId:this.id,requestContext:J,...z,model:await this.getModel({requestContext:J}),tracingPolicy:this.#j?.tracingPolicy,requireApproval:A.requireApproval,backgroundConfig:A.background},O=VY(A,B,void 0,K,Z);V[N]=O}return V}async listWorkspaceTools({runId:Y,resourceId:X,threadId:G,requestContext:J,mastraProxy:Q,autoResumeSuspendedTools:W,backgroundTaskEnabled:K,...Z}){let H=e1(Z),z={};if(this._agentNetworkAppend)return this.logger.debug("Skipping workspace tools (agent network context)",{agent:this.name,runId:Y}),z;let V=await this.getWorkspace({requestContext:J});if(!V)return z;let F=await ji1(V,{requestContext:J?Object.fromEntries(J.entries()):{},workspace:V});if(Object.keys(F).length>0){this.logger.debug("Adding workspace tools",{agent:this.name,tools:Object.keys(F),runId:Y});for(let[L,N]of Object.entries(F)){let D=N,A={name:L,runId:Y,threadId:G,resourceId:X,logger:this.logger,mastra:Q,agentName:this.name,agentId:this.id,requestContext:J,...H,model:await this.getModel({requestContext:J}),tracingPolicy:this.#j?.tracingPolicy,requireApproval:D.requireApproval,backgroundConfig:D.background,workspace:V},B=VY(D,A,void 0,W,K);z[L]=B}}return z}async listChannelTools({runId:Y,resourceId:X,threadId:G,requestContext:J,mastraProxy:Q,autoResumeSuspendedTools:W,backgroundTaskEnabled:K,...Z}){let H=e1(Z),z={};if(!this.#B)return z;let V=this.#B.getTools();if(Object.keys(V).length>0){let F=await this.getMemory({requestContext:J});for(let[L,N]of Object.entries(V)){let D={name:L,runId:Y,threadId:G,resourceId:X,logger:this.logger,mastra:Q,memory:F,agentName:this.name,requestContext:J,...H,tracingPolicy:this.#j?.tracingPolicy};z[L]=VY(N,D,void 0,W,K)}}return z}async listSkillTools({runId:Y,resourceId:X,threadId:G,requestContext:J,mastraProxy:Q,autoResumeSuspendedTools:W,backgroundTaskEnabled:K,suppressEagerSkillTools:Z,...H}){let z=e1(H),V={};if(this._agentNetworkAppend)return V;let F=await this.getWorkspace({requestContext:J});if(!F?.skills)return V;let L=Ni1(F.skills);if(Object.keys(L).length>0){this.logger.debug("Adding skill tools",{agent:this.name,tools:Object.keys(L),runId:Y});for(let[N,D]of Object.entries(L)){if(Z&&(N==="skill"||N==="skill_search"))continue;let A=D,B={name:N,runId:Y,threadId:G,resourceId:X,logger:this.logger,mastra:Q,agentName:this.name,agentId:this.id,requestContext:J,...z,model:await this.getModel({requestContext:J}),tracingPolicy:this.#j?.tracingPolicy,requireApproval:!1,backgroundConfig:A.background,workspace:F},O=VY(A,B,void 0,W,K);V[N]=O}}return V}async listBrowserTools({runId:Y,resourceId:X,threadId:G,requestContext:J,autoResumeSuspendedTools:Q,backgroundTaskEnabled:W,...K}){let Z=e1(K),H={};if(this._agentNetworkAppend)return H;if(!this.#P)return H;let z=this.#P.getTools();if(Object.keys(z).length>0){this.logger.debug(`[Agent:${this.name}] - Adding browser tools: ${Object.keys(z).join(", ")}`,{runId:Y});for(let[V,F]of Object.entries(z)){let L=F,N={name:V,runId:Y,threadId:G,resourceId:X,logger:this.logger,mastra:void 0,agentName:this.name,agentId:this.id,requestContext:J,...Z,model:await this.getModel({requestContext:J}),tracingPolicy:this.#j?.tracingPolicy,requireApproval:L.requireApproval,backgroundConfig:L.background},D=VY(L,N,void 0,Q,W);H[V]=D}}return H}async listInputProcessorLoadedTools({processors:Y,runId:X,resourceId:G,threadId:J,requestContext:Q,mastraProxy:W,outputWriter:K,autoResumeSuspendedTools:Z,backgroundTaskEnabled:H,...z}){let V=e1(z),F={},L=async(N)=>{if(V9(N))for(let M of o99(N))await L(M);let D=N;if(typeof D.getLoadedToolsForRequestContext!=="function")return;let A=await D.getLoadedToolsForRequestContext({requestContext:Q});if(!A||Object.keys(A).length===0)return;let B=await this.getWorkspace({requestContext:Q}),O=await this.getMemory({requestContext:Q}),E=await this.getModel({requestContext:Q});for(let[M,R]of Object.entries(A))if(Kf(R)||FO(R))F[M]=VY(R,{name:M,runId:X,threadId:J,resourceId:G,logger:this.logger,mastra:W,memory:O,agentName:this.name,agentId:this.id,requestContext:Q,...V,model:E,outputWriter:K,tracingPolicy:this.#j?.tracingPolicy,requireApproval:R.requireApproval,backgroundConfig:R.background,workspace:B},void 0,Z,H);else F[M]=R};for(let N of Y)await L(N);return F}async __runInputProcessors({requestContext:Y,messageList:X,inputProcessorOverrides:G,processorStates:J,...Q}){let W;if(G?.length||this.#D||this.#Q||this.#R||this.#G?.getWorkspace()||this.#P||this.#B){let K=await this.getProcessorRunner({requestContext:Y,inputProcessorOverrides:G,processorStates:J});try{X=await K.runInputProcessors(X,Q,Y,0)}catch(Z){if(Z instanceof u6)W={reason:Z.message,retry:Z.options?.retry,metadata:Z.options?.metadata,processorId:Z.processorId},this.logger.warn("Input processor tripwire triggered",{agent:this.name,reason:Z.message,processorId:Z.processorId,retry:Z.options?.retry});else throw new G0({id:"AGENT_INPUT_PROCESSOR_ERROR",domain:"AGENT",category:"USER",text:`[Agent:${this.name}] - Input processor error`},Z)}}return{messageList:X,tripwire:W}}async __runProcessInputStep(Y){let{requestContext:X,messageList:G,stepNumber:J=0,inputProcessorOverrides:Q,processorStates:W,tools:K,runId:Z,threadId:H,resourceId:z,outputWriter:V,autoResumeSuspendedTools:F,backgroundTaskEnabled:L,...N}=Y,D=e1(N),A,B=K;if(Q?.length||this.#D||this.#Q){let O=await this.getProcessorRunner({requestContext:X,inputProcessorOverrides:Q,processorStates:W});try{let M=(await this.getLLM({requestContext:X})).getModel(),R=await O.runProcessInputStep({messageList:G,stepNumber:J,steps:[],...D,requestContext:X,model:M,tools:K,retryCount:0});if(R.tools){let q=await this.getWorkspace({requestContext:X}),_=await this.getMemory({requestContext:X}),P=this.#G?h80({mastra:this.#G,logger:this.logger}):void 0,w={};for(let[j,C]of Object.entries(R.tools))if(Kf(C)||FO(C))w[j]=VY(C,{name:j,runId:Z,threadId:H,resourceId:z,logger:this.logger,mastra:P,memory:_,agentName:this.name,agentId:this.id,requestContext:X,...D,model:await this.getModel({requestContext:X}),outputWriter:V,tracingPolicy:this.#j?.tracingPolicy,requireApproval:C.requireApproval,backgroundConfig:C.background,workspace:q},void 0,F,L);else w[j]=C;B=w}}catch(E){if(E instanceof u6)A={reason:E.message,retry:E.options?.retry,metadata:E.options?.metadata,processorId:E.processorId},this.logger.warn("Input step processor tripwire triggered",{agent:this.name,reason:E.message,processorId:E.processorId,retry:E.options?.retry});else throw new G0({id:"AGENT_INPUT_STEP_PROCESSOR_ERROR",domain:"AGENT",category:"USER",text:`[Agent:${this.name}] - Input step processor error`},E)}}return{messageList:G,tools:B,tripwire:A}}async __runOutputProcessors({requestContext:Y,messageList:X,outputProcessorOverrides:G,...J}){let Q;if(G?.length||this.#L||this.#Q){let W=await this.getProcessorRunner({requestContext:Y,outputProcessorOverrides:G});try{X=await W.runOutputProcessors(X,J,Y)}catch(K){if(K instanceof u6)Q={reason:K.message,retry:K.options?.retry,metadata:K.options?.metadata,processorId:K.processorId},this.logger.warn("Output processor tripwire triggered",{agent:this.name,reason:K.message,processorId:K.processorId,retry:K.options?.retry});else throw K}}return{messageList:X,tripwire:Q}}async getMemoryMessages({resourceId:Y,threadId:X,vectorMessageSearch:G,memoryConfig:J,requestContext:Q}){let W=await this.getMemory({requestContext:Q});if(!W)return{messages:[]};let K=W.getMergedThreadConfig(J||{});if(!K.lastMessages&&!K.semanticRecall)return{messages:[]};return W.recall({threadId:X,resourceId:Y,...typeof K.lastMessages==="number"?{perPage:K.lastMessages}:{},threadConfig:J,vectorSearchString:K.semanticRecall&&G?G:void 0})}async listAssignedTools({runId:Y,resourceId:X,threadId:G,requestContext:J,mastraProxy:Q,outputWriter:W,autoResumeSuspendedTools:K,backgroundTaskEnabled:Z,...H}){let z=e1(H),V={},F=await this.getMemory({requestContext:J}),L=await this.listTools({requestContext:J}),N=Object.entries(L||{}),D=await Promise.all(N.map(async([B,O])=>{if(!O)return;let E={name:B,runId:Y,threadId:G,resourceId:X,logger:this.logger,mastra:Q,memory:F,agentName:this.name,agentId:this.id,requestContext:J,...z,model:await this.getModel({requestContext:J}),outputWriter:W,tracingPolicy:this.#j?.tracingPolicy,requireApproval:O.requireApproval,backgroundConfig:O.background};return[B,VY(O,E,void 0,K,Z)]}));return V={...Object.fromEntries(D.filter((B)=>Boolean(B)))},V}async listToolsets({runId:Y,threadId:X,resourceId:G,toolsets:J,requestContext:Q,mastraProxy:W,autoResumeSuspendedTools:K,backgroundTaskEnabled:Z,...H}){let z=e1(H),V={},F=await this.getMemory({requestContext:Q}),L=Object.values(J||{});if(L.length>0){this.logger.debug("Adding tools from toolsets",{agent:this.name,toolsets:Object.keys(J||{}),runId:Y});for(let N of L)for(let[D,A]of Object.entries(N)){let B=A,O={name:D,runId:Y,threadId:X,resourceId:G,logger:this.logger,mastra:W,memory:F,agentName:this.name,agentId:this.id,requestContext:Q,...z,model:await this.getModel({requestContext:Q}),tracingPolicy:this.#j?.tracingPolicy,requireApproval:B.requireApproval,backgroundConfig:B.background},E=VY(B,O,"toolset",K,Z);V[D]=E}}return V}async listClientTools({runId:Y,threadId:X,resourceId:G,requestContext:J,mastraProxy:Q,clientTools:W,autoResumeSuspendedTools:K,backgroundTaskEnabled:Z,...H}){let z=e1(H),V={},F=await this.getMemory({requestContext:J}),L=Object.entries(W||{});if(L.length>0){this.logger.debug("Adding client tools",{agent:this.name,tools:Object.keys(W||{}),runId:Y});for(let[N,D]of L){let{execute:A,...B}=D,O=FO(D)?D:B,E={name:N,runId:Y,threadId:X,resourceId:G,logger:this.logger,mastra:Q,memory:F,agentName:this.name,agentId:this.id,requestContext:J,...z,model:await this.getModel({requestContext:J}),tracingPolicy:this.#j?.tracingPolicy,requireApproval:D.requireApproval,backgroundConfig:D.background},M=VY(O,E,"client-tool",K,Z);V[N]=M}}return V}stripParentToolParts(Y){return Y.map((X)=>{if(X.role==="assistant"){let G=X.content,J=Array.isArray(G)?G:G?.parts;if(!Array.isArray(J))return X;let Q=J.filter((W)=>W?.type!=="tool-call");if(Q.length===0)return null;if(Array.isArray(G))return{...X,content:Q};return{...X,content:{...G,parts:Q}}}if(X.role==="tool")return null;return X}).filter((X)=>Boolean(X))}async listAgentTools({runId:Y,threadId:X,resourceId:G,requestContext:J,methodType:Q,autoResumeSuspendedTools:W,delegation:K,backgroundTaskEnabled:Z,...H}){let z=e1(H),V={},F=await this.listAgents({requestContext:J});if(Object.keys(F).length>0)for(let[L,N]of Object.entries(F)){let D=U.object({prompt:U.string().describe("The prompt to send to the agent"),threadId:U.string().nullish().describe("Thread ID for conversation continuity for memory messages"),resourceId:U.string().nullish().describe("Resource/user identifier for memory messages"),instructions:U.string().nullish().describe("Additional instructions to append to the agent instructions. Only provide if you have specific guidance beyond what the agent already knows. Leave empty in most cases."),maxSteps:U.number().min(3).nullish().describe("Maximum number of execution steps for the sub-agent")}),A=U.object({text:U.string().describe("The response from the agent"),subAgentThreadId:U.string().describe("The thread ID of the agent").optional(),subAgentResourceId:U.string().describe("The resource ID of the agent").optional(),subAgentToolResults:U.array(U.object({toolName:U.string().describe("The name of the tool"),toolCallId:U.string().describe("The ID of the tool call"),result:U.unknown().describe("The result of the tool call"),args:U.unknown().describe("The arguments of the tool call").optional(),isError:U.boolean().describe("Whether the tool call resulted in an error").optional()})).describe("The results from the agent's tool calls").optional()}),B=K?.includeSubAgentToolResultsInModelContext?void 0:(R)=>({type:"text",value:R.text}),O=X8({id:`agent-${L}`,description:N.getDescription()||`Agent: ${L}`,inputSchema:D,outputSchema:A,mastra:this.#G,...B?{toModelOutput:B}:{},execute:async(R,q)=>{let _=Date.now(),P=q?.agent?.toolCallId||E6(),w=q?.agent?.messages||[],j=this.stripParentToolParts(w),C=j,k=Math.max(1,j.filter((a)=>a.role==="assistant").length),S={primitiveId:N.id,primitiveType:"agent",prompt:R.prompt,params:{threadId:R.threadId||void 0,resourceId:R.resourceId||void 0,instructions:R.instructions||void 0,maxSteps:R.maxSteps||void 0},iteration:k,runId:Y||E6(),threadId:X,resourceId:G,parentAgentId:this.id,parentAgentName:this.name,toolCallId:P,messages:j},I=await Promise.resolve().then(() => (lf0(),x24)),v=R.threadId?`${R.threadId}-${E6()}`:q?.mastra?.generateId({idType:"thread",source:"agent",entityId:L,resourceId:G})||E6(),x=R.resourceId?`${R.resourceId}-${L}`:q?.mastra?.generateId({idType:"generic",source:"agent",entityId:L})||`${I.default(this.id)}-${L}`,y=J.get("MastraMemory"),d=J.get(DX),u=J.get(eX);if(d!==void 0)J.delete(DX);if(u!==void 0)J.delete(eX);let b=N,p=J.get(Sh)?.agents?.[N.id];if(p&&this.#G&&N instanceof $)try{b=await this.#G.resolveVersionedAgent(N,p)}catch(a){this.logger.warn("Failed to resolve versioned sub-agent, using code-defined default",{agent:this.name,targetAgent:L,targetAgentId:N.id,versionSelector:p,error:a})}let h=(await b.getModel({requestContext:J})).specificationVersion,t=("getDefaultOptions"in b?await b.getDefaultOptions({requestContext:J}):{})?.memory!==void 0;if((Q==="generate"||Q==="generateLegacy"||Q==="stream"||Q==="streamLegacy")&&SD.includes(h)){if(!b.hasOwnMemory()&&this.#Q)b.__setMemory(this.#Q)}let{prompt:s,instructions:K0,maxSteps:X0}=R;if(K?.onDelegationStart)try{let a=await K.onDelegationStart(S);if(a){if(a.proceed===!1){let Q0=a.rejectionReason||"Delegation rejected by onDelegationStart hook";if(this.logger.debug("Delegation rejected",{agent:this.name,targetAgent:L,reason:Q0}),(Q==="stream"||Q==="streamLegacy")&&SD.includes(h))await q.writer?.write({type:"text-delta",payload:{id:E6(),text:`[Delegation Rejected] ${Q0}`},runId:Y,from:"AGENT"});let e=await b.getMemory({requestContext:J});if(e)try{let m={id:this.#G?.generateId()||E6(),role:"user",type:"text",createdAt:new Date,threadId:v,resourceId:x,content:{format:2,parts:[{type:"text",text:s}]}},$0={id:this.#G?.generateId()||E6(),role:"assistant",type:"text",createdAt:new Date(new Date().getTime()+1),threadId:v,resourceId:x,content:{format:2,parts:[{type:"text",text:`[Delegation Rejected] ${Q0}`}]}};await e.createThread({resourceId:x,threadId:v}),await e.saveMessages({messages:[m,$0]})}catch(m){this.logger.error("Failed to save rejection to sub-agent memory",{agent:this.name,error:m})}if(d!==void 0)J.set(DX,d);if(u!==void 0)J.set(eX,u);return{text:`[Delegation Rejected] ${Q0}`,subAgentThreadId:v,subAgentResourceId:x}}if(a.modifiedPrompt!==void 0)s=a.modifiedPrompt;if(a.modifiedInstructions!==void 0)K0=a.modifiedInstructions;if(a.modifiedMaxSteps!==void 0)X0=a.modifiedMaxSteps}}catch(a){this.logger.error("onDelegationStart hook error",{agent:this.name,error:a})}if(this.logger.debug("Delegation accepted",{agent:this.name,targetAgent:L,modifiedPrompt:s!==R.prompt,modifiedInstructions:K0!==R.instructions,modifiedMaxSteps:X0!==R.maxSteps}),K0){let a=await b.getInstructions({requestContext:J});if(a){let Q0=this.#b(a);if(Q0)K0=`${Q0}

${K0}`}}try{this.logger.debug("Executing agent as tool",{agent:this.name,targetAgent:L,args:R,runId:Y,threadId:X,resourceId:G});let a,Q0=R.suspendedToolRunId,{resumeData:e,suspend:m}=q?.agent??{},$0=j;if(K?.messageFilter)try{$0=await K.messageFilter({messages:j,primitiveId:N.id,primitiveType:"agent",prompt:s,iteration:k,runId:Y||E6(),threadId:X,resourceId:G,parentAgentId:this.id,parentAgentName:this.name,toolCallId:P})}catch(F0){this.logger.error("messageFilter error",{agent:this.name,error:F0})}let Y0=[{role:"user",content:s}],Z0=new Date;if((Q==="generate"||Q==="generateLegacy")&&SD.includes(h)){let F0=e?await b.resumeGenerate(e,{runId:Q0,requestContext:J,...e1(q??{}),...K0&&{instructions:K0},...X0&&{maxSteps:X0},context:$0,...G&&X&&!t?{memory:{resource:x,thread:v,options:{lastMessages:!1}}}:{},disableBackgroundTasks:!0}):await b.generate(Y0,{requestContext:J,...e1(q??{}),...K0&&{instructions:K0},...X0&&{maxSteps:X0},context:$0,...G&&X&&!t?{memory:{resource:x,thread:v,options:{lastMessages:!1}}}:{},disableBackgroundTasks:!0}),D0=F0.response.dbMessages??[],O0=F0.toolResults?.map((f0)=>({toolName:f0.payload.toolName,toolCallId:f0.payload.toolCallId,result:f0.payload.result,args:f0.payload.args,isError:f0.payload.isError}));C=[{id:this.#G?.generateId()||E6(),role:"user",type:"text",createdAt:Z0,threadId:v,resourceId:x,content:{format:2,parts:[{type:"text",text:s}]}},...D0];let P0=await b.getMemory({requestContext:J});if(P0)try{await P0.createThread({resourceId:x,threadId:v}),await P0.saveMessages({messages:C})}catch(f0){this.logger.error("Failed to save messages to sub-agent memory",{agent:this.name,error:f0})}if(F0.finishReason==="suspended"){if(d!==void 0)J.set(DX,d);if(u!==void 0)J.set(eX,u);return m?.(F0.suspendPayload,{resumeSchema:F0.resumeSchema,runId:F0.runId,isAgentSuspend:!0})}a={text:F0.text,subAgentThreadId:v,subAgentResourceId:x,subAgentToolResults:O0}}else if((Q==="generate"||Q==="generateLegacy")&&h==="v1"){if(typeof b.generateLegacy!=="function")throw Error(`Sub-agent ${N.id} returned a v1 model but does not implement generateLegacy`);a={text:(await b.generateLegacy(Y0,{requestContext:J,...e1(q??{}),context:$0})).text}}else if((Q==="stream"||Q==="streamLegacy")&&SD.includes(h)){let F0=e?await b.resumeStream(e,{runId:Q0,requestContext:J,...e1(q??{}),...K0&&{instructions:K0},...X0&&{maxSteps:X0},context:$0,...G&&X&&!t?{memory:{resource:x,thread:v,options:{lastMessages:!1}}}:{},disableBackgroundTasks:!0}):await b.stream(Y0,{requestContext:J,...e1(q??{}),...K0&&{instructions:K0},...X0&&{maxSteps:X0},context:$0,...G&&X&&!t?{memory:{resource:x,thread:v,options:{lastMessages:!1}}}:{},disableBackgroundTasks:!0}),D0,O0,R0;for await(let d1 of F0.fullStream)if(q?.writer)if(d1.type.startsWith("data-")){if(await q.writer.custom(d1),d1.type==="data-tool-call-approval")O0={},D0=!0;if(d1.type==="data-tool-call-suspended")O0=d1.data.suspendPayload,R0=d1.data.resumeSchema}else{if(await q.writer.write(d1),d1.type==="tool-call-approval")O0={},D0=!0;if(d1.type==="tool-call-suspended")O0=d1.payload.suspendPayload,R0=d1.payload.resumeSchema}let P0=(await F0.toolResults)?.map((d1)=>({toolName:d1.payload.toolName,toolCallId:d1.payload.toolCallId,result:d1.payload.result,args:d1.payload.args,isError:d1.payload.isError})),f0=F0.messageList.get.response.db();C=[{id:this.#G?.generateId()||E6(),role:"user",type:"text",createdAt:Z0,threadId:v,resourceId:x,content:{format:2,parts:[{type:"text",text:s}]}},...f0];let U4=await b.getMemory({requestContext:J});if(U4)try{await U4.createThread({resourceId:x,threadId:v}),await U4.saveMessages({messages:C})}catch(d1){this.logger.error("Failed to save messages to sub-agent memory",{agent:this.name,error:d1})}if(D0||O0||R0){if(d!==void 0)J.set(DX,d);if(u!==void 0)J.set(eX,u);return m?.(O0,{resumeSchema:R0,requireToolApproval:D0,runId:F0.runId,isAgentSuspend:!0})}a={text:await F0.text,subAgentThreadId:v,subAgentResourceId:x,subAgentToolResults:P0}}else{if(typeof b.streamLegacy!=="function")throw Error(`Sub-agent ${N.id} returned a v1 model but does not implement streamLegacy`);let F0=await b.streamLegacy(s,{requestContext:J,...e1(q??{})}),D0="";for await(let O0 of F0.fullStream){if(q?.writer)if(O0.type.startsWith("data-"))await q.writer.custom(O0);else await q.writer.write(O0);if(O0.type==="text-delta")D0+=O0.textDelta}a={text:D0}}if(K?.onDelegationComplete)try{let F0=!1,D0={primitiveId:N.id,primitiveType:"agent",prompt:s,result:a,duration:Date.now()-_,success:!0,iteration:k,runId:Y||E6(),toolCallId:P,parentAgentId:this.id,parentAgentName:this.name,messages:C,bail:()=>{F0=!0}},O0=await K.onDelegationComplete(D0);if(F0)J.set("__mastra_delegationBailed",!0);if(O0?.feedback){let R0={id:this.#G?.generateId()||E6(),role:"assistant",type:"text",createdAt:new Date,content:{format:2,parts:[{type:"text",text:O0.feedback}],metadata:{mode:"stream",completionResult:{suppressFeedback:!0}}},threadId:X,resourceId:G},P0=await this.getMemory({requestContext:J});if(P0)try{await P0.saveMessages({messages:[R0]})}catch(f0){this.logger.error("Failed to save feedback to supervisor memory",{agent:this.name,error:f0})}}}catch(F0){this.logger.error("onDelegationComplete hook error",{agent:this.name,error:F0})}if(y!==void 0)J.set("MastraMemory",y);if(d!==void 0)J.set(DX,d);if(u!==void 0)J.set(eX,u);return a}catch(a){let Q0=!1;if(K?.onDelegationComplete)try{let m={primitiveId:N.id,primitiveType:"agent",prompt:s,result:{text:""},duration:Date.now()-_,success:!1,error:a instanceof Error?a:Error(String(a)),iteration:k,runId:Y||E6(),toolCallId:P,parentAgentId:this.id,parentAgentName:this.name,messages:C,bail:()=>{Q0=!0}},$0=await K.onDelegationComplete(m);if(Q0)J.set("__mastra_delegationBailed",!0);if($0?.feedback){let Y0={id:this.#G?.generateId()||E6(),role:"assistant",type:"text",createdAt:new Date,content:{format:2,parts:[{type:"text",text:$0.feedback}],metadata:{mode:"stream",completionResult:{suppressFeedback:!0}}},threadId:X,resourceId:G},Z0=await this.getMemory({requestContext:J});if(Z0)try{await Z0.saveMessages({messages:[Y0]})}catch(F0){this.logger.error("Failed to save feedback to supervisor memory",{agent:this.name,error:F0})}}}catch(m){this.logger.error("onDelegationComplete hook error on failure",{agent:this.name,error:m})}if(y!==void 0)J.set("MastraMemory",y);if(d!==void 0)J.set(DX,d);if(u!==void 0)J.set(eX,u);let e=new G0({id:"AGENT_AGENT_TOOL_EXECUTION_FAILED",domain:"AGENT",category:"USER",details:{agentName:this.name,subAgentName:N.name??N.id,runId:Y||"",threadId:X||"",resourceId:G||""},text:`[Agent:${this.name}] - Failed agent tool execution for ${L}`},a);throw this.logger.trackException(e),e}}}),E=await this.deriveSubAgentBackgroundConfig(N,J),M={name:`agent-${L}`,runId:Y,threadId:X,resourceId:G,logger:this.logger,mastra:this.#G,memory:await this.getMemory({requestContext:J}),agentName:this.name,agentId:this.id,requestContext:J,model:await this.getModel({requestContext:J}),...z,tracingPolicy:this.#j?.tracingPolicy,backgroundConfig:E};V[`agent-${L}`]=VY(O,M,void 0,W,Z)}return V}async listWorkflowTools({runId:Y,threadId:X,resourceId:G,requestContext:J,methodType:Q,autoResumeSuspendedTools:W,backgroundTaskEnabled:K,...Z}){let H=e1(Z),z={},V=await this.listWorkflows({requestContext:J});if(Object.keys(V).length>0)for(let[F,L]of Object.entries(V)){let D={inputData:L.inputSchema?$6(L.inputSchema,{io:"input"}):{type:"object",additionalProperties:!0}},A=["inputData"];if(L.stateSchema)D.initialState=$6(L.stateSchema,{io:"input"});let B={type:"object",properties:D,required:A,additionalProperties:!0},O={runId:{type:"string",description:"Unique identifier for the workflow run"}};if(L.outputSchema)O.result=$6(L.outputSchema,{io:"output"});let E={anyOf:[{type:"object",properties:O,required:["runId"]},{type:"object",properties:{runId:{type:"string",description:"Unique identifier for the workflow run"},error:{type:"string",description:"Error message if workflow execution failed"}},required:["runId","error"]}]},M=X8({id:`workflow-${F}`,description:L.description||`Workflow: ${F}`,inputSchema:B,outputSchema:E,mastra:this.#G,execute:async(q,_)=>{let P=J.get("MastraMemory");try{let{initialState:w,inputData:j,suspendedToolRunId:C}=q,k=C||E6();this.logger.debug("Executing workflow as tool",{agent:this.name,workflow:F,description:L.description,args:q,runId:k,threadId:X,resourceId:G});let S=await L.createRun({runId:k,resourceId:G}),{resumeData:I,suspend:v}=_?.agent??{},x=void 0;if(Q==="generate"||Q==="generateLegacy")if(I)x=await S.resume({resumeData:I,requestContext:J,...e1(_??{})});else x=await S.start({inputData:j,requestContext:J,...e1(_??{}),...w&&{initialState:w}});else if(Q==="streamLegacy"){let y=S.streamLegacy({inputData:j,requestContext:J,...e1(_??{})});if(_?.writer)await y.stream.pipeTo(_.writer);else for await(let d of y.stream);x=await y.getWorkflowState()}else if(Q==="stream"){let y=I?S.resumeStream({resumeData:I,requestContext:J,...e1(_??{})}):S.stream({inputData:j,requestContext:J,...e1(_??{}),...w&&{initialState:w}});if(_?.writer)await y.fullStream.pipeTo(_.writer);x=await y.result}if(P!==void 0)J.set("MastraMemory",P);if(x?.status==="success")return{result:x?.result||x,runId:S.runId};else if(x?.status==="failed"){let y=x?.error;return{error:y?.message||String(y)||"Workflow execution failed",runId:S.runId}}else if(x?.status==="suspended"){let y=x?.suspended?.[0]?.[0],d=x?.steps?.[y]?.suspendPayload,u=x?.suspended?.map((n)=>n.join(".")),b=[...x?.suspended?.[0]??[]],g=L;while(b.length>0){let n=b.shift();if(n){if(!g.steps[n]){this.logger.warn("Suspended step not found in workflow",{agent:this.name,step:n,workflow:F});break}g=g.steps[n]}}let p=g?.resumeSchema;if(d?.__workflow_meta)delete d.__workflow_meta;let h=p?Q4(p):void 0;return v?.(d,{resumeLabel:u,resumeSchema:h?JSON.stringify($6(h)):void 0,runId:k})}else return{error:"Workflow should never reach this path, workflow returned no status",runId:S.runId}}catch(w){if(P!==void 0)J.set("MastraMemory",P);let j=new G0({id:"AGENT_WORKFLOW_TOOL_EXECUTION_FAILED",domain:"AGENT",category:"USER",details:{agentName:this.name,runId:q.suspendedToolRunId||Y||"",threadId:X||"",resourceId:G||""},text:`[Agent:${this.name}] - Failed workflow tool execution`},w);throw this.logger.trackException(j),j}}}),R={name:`workflow-${F}`,runId:Y,threadId:X,resourceId:G,logger:this.logger,mastra:this.#G,memory:await this.getMemory({requestContext:J}),agentName:this.name,agentId:this.id,requestContext:J,model:await this.getModel({requestContext:J}),...H,tracingPolicy:this.#j?.tracingPolicy};z[`workflow-${F}`]=VY(M,R,void 0,W,K)}return z}async getToolsForExecution(Y){let X=Y.requestContext??new p1;return this.convertTools({...Y,requestContext:X,methodType:"stream"})}async convertTools({toolsets:Y,clientTools:X,threadId:G,resourceId:J,runId:Q,requestContext:W,outputWriter:K,methodType:Z,memoryConfig:H,autoResumeSuspendedTools:z,delegation:V,backgroundTaskEnabled:F,inputProcessors:L,...N}){let D=e1(N),A=void 0,B=this.logger;if(this.#G)A=h80({mastra:this.#G,logger:B});let O=await this.listAssignedTools({runId:Q,resourceId:J,threadId:G,requestContext:W,...D,mastraProxy:A,outputWriter:K,autoResumeSuspendedTools:z,backgroundTaskEnabled:F}),E=await this.listMemoryTools({runId:Q,resourceId:J,threadId:G,requestContext:W,...D,mastraProxy:A,memoryConfig:H,autoResumeSuspendedTools:z,backgroundTaskEnabled:F}),M=await this.listToolsets({runId:Q,resourceId:J,threadId:G,requestContext:W,...D,mastraProxy:A,toolsets:Y,autoResumeSuspendedTools:z,backgroundTaskEnabled:F}),R=await this.listClientTools({runId:Q,resourceId:J,threadId:G,requestContext:W,...D,mastraProxy:A,clientTools:X,autoResumeSuspendedTools:z,backgroundTaskEnabled:F}),q=await this.listAgentTools({runId:Q,resourceId:J,threadId:G,requestContext:W,methodType:Z,...D,autoResumeSuspendedTools:z,delegation:V}),_=await this.listWorkflowTools({runId:Q,resourceId:J,threadId:G,requestContext:W,methodType:Z,...D,autoResumeSuspendedTools:z}),P=await this.listWorkspaceTools({runId:Q,resourceId:J,threadId:G,requestContext:W,...D,mastraProxy:A,autoResumeSuspendedTools:z,backgroundTaskEnabled:F}),w=L??await this.listConfiguredInputProcessors(W),j=XK4(w),C=YK4(w),k=await this.listSkillTools({runId:Q,resourceId:J,threadId:G,requestContext:W,...D,mastraProxy:A,autoResumeSuspendedTools:z,backgroundTaskEnabled:F,suppressEagerSkillTools:j&&!C}),S=await this.listChannelTools({runId:Q,resourceId:J,threadId:G,requestContext:W,...D,mastraProxy:A,autoResumeSuspendedTools:z,backgroundTaskEnabled:F}),I=await this.listBrowserTools({runId:Q,resourceId:J,threadId:G,requestContext:W,...D,autoResumeSuspendedTools:z,backgroundTaskEnabled:F}),v=await this.listInputProcessorLoadedTools({processors:w,runId:Q,resourceId:J,threadId:G,requestContext:W,...D,mastraProxy:A,outputWriter:K,autoResumeSuspendedTools:z,backgroundTaskEnabled:F}),x={...O,...E,...M,...R,...q,..._,...P,...k,...S,...I,...v};return this.formatTools(x)}formatTools(Y){let X=/[^a-zA-Z0-9_\-]/g,G=/[a-zA-Z_]/;for(let J of Object.keys(Y))if(Y[J]&&(J.length>63||J.match(X)||!J[0].match(G))){let Q=J.replace(X,"_");if(!Q[0].match(G))Q="_"+Q;if(Q=Q.slice(0,63),Y[Q]){let W=new G0({id:"AGENT_TOOL_NAME_COLLISION",domain:"AGENT",category:"USER",details:{agentName:this.name,toolName:Q},text:`Two or more tools resolve to the same name "${Q}". Please rename one of the tools to avoid this collision.`});throw this.logger.trackException(W),W}Y[Q]=Y[J],delete Y[J]}return Y}async#C({messageList:Y,runId:X,requestContext:G,structuredOutput:J,overrideScorers:Q,threadId:W,resourceId:K,...Z}){let H={};try{H=Q?this.resolveOverrideScorerReferences(Q):await this.listScorers({requestContext:G})}catch(F){this.logger.warn("Failed to get scorers",{agent:this.name,error:F});return}let z={inputMessages:Y.getPersisted.input.db(),rememberedMessages:Y.getPersisted.remembered.db(),systemMessages:Y.getSystemMessages(),taggedSystemMessages:Y.getPersisted.taggedSystemMessages},V=Y.getPersisted.response.db();if(Object.keys(H||{}).length>0)for(let[F,L]of Object.entries(H))TK4({scorerId:L.scorer.id,scorerObject:L,runId:X,input:z,output:V,requestContext:G,entity:{id:this.id,name:this.name},source:"LIVE",entityType:"AGENT",structuredOutput:!!J,threadId:W,resourceId:K,...Z})}resolveOverrideScorerReferences(Y){let X={};for(let[G,J]of Object.entries(Y))if(typeof J.scorer==="string")try{if(!this.#G)throw new G0({id:"AGENT_GENEREATE_SCORER_NOT_FOUND",domain:"AGENT",category:"USER",text:"Mastra not found when fetching scorer. Make sure to fetch agent from mastra.getAgent()"});let Q=this.#G.getScorerById(J.scorer);X[G]={scorer:Q,sampling:J.sampling}}catch(Q){this.logger.warn("Failed to get scorer",{agent:this.name,scorer:J.scorer,error:Q})}else X[G]=J;if(Object.keys(X).length===0&&Object.keys(Y).length>0)throw new G0({id:"AGENT_GENEREATE_SCORER_NOT_FOUND",domain:"AGENT",category:"USER",text:"No scorers found in overrideScorers"});return X}async prepareModels(Y,X){let G=X??await this.resolveModelSelection(this.model,Y);if(!Array.isArray(G)){let Q=await this.resolveModelConfig(G,Y);this.assertSupportsPreparedModels(Q);let W;if(Q instanceof ME)W=Q.config?.headers;return[{id:"main",model:Q,maxRetries:this.maxRetries??0,enabled:!0,headers:W}]}return await Promise.all(G.map(async(Q)=>{let W=await this.resolveModelConfig(Q.model,Y);this.assertSupportsPreparedModels(W);let K=Q.id||W.modelId;if(!K){let N=new G0({id:"AGENT_PREPARE_MODELS_MISSING_MODEL_ID",domain:"AGENT",category:"USER",details:{agentName:this.name},text:`[Agent:${this.name}] - Unable to determine model ID. Please provide an explicit ID in the model configuration.`});throw this.logger.trackException(N),N}let Z;if(W instanceof ME)Z=W.config?.headers;let H=Q.enabled??!0,[z,V,F]=H?await Promise.all([this.resolveFallbackDynamic(Q.modelSettings,Y),this.resolveFallbackDynamic(Q.providerOptions,Y),this.resolveFallbackDynamic(Q.headers,Y)]):[void 0,void 0,void 0],L=Z||F?{...Z??{},...F??{}}:void 0;return{id:K,model:W,maxRetries:Q.maxRetries??0,enabled:H,headers:L,modelSettings:z,providerOptions:V}}))}async resolveFallbackDynamic(Y,X){if(Y===void 0)return;if(typeof Y==="function")return await Y({requestContext:X,mastra:this.#G});return Y}async#x({runId:Y,method:X}){let G=await this.#G?.getStorage()?.getStore("workflows"),J=await G?.loadWorkflowSnapshot({workflowName:"agentic-loop",runId:Y});if(!J){let Q=!!G;throw new G0({id:"AGENT_RESUME_NO_SNAPSHOT_FOUND",domain:"AGENT",category:"USER",text:`Agent "${this.name}" ${X}() could not find a suspended run for runId "${Y}". `+(Q?"The run may have already completed, never suspended, or the runId is invalid. ":"No storage is configured on this Mastra instance, so workflow snapshots cannot be persisted. Register the agent on a Mastra instance with persistent storage (e.g. PostgreSQL, LibSQL). ")+`Ensure you are calling ${X}() only with a runId from a currently-suspended run.`,details:{runId:Y,agentName:this.name,hasStorage:Q}})}return J}async#S({methodType:Y,resumeContext:X,...G}){let J=X?.snapshot,Q;if(J)for(let v in J?.context){let x=J?.context[v];if(x&&x.status==="suspended"&&x.suspendPayload?.__streamState){Q=x.suspendPayload?.__streamState?.messageList?.memoryInfo;break}}let W=G.requestContext||new p1,K=W.get(Sh),Z=y10(this.#G?.getVersionOverrides(),K);if(G.versions)Z=y10(Z,G.versions);if(Z)W.set(Sh,Z);let H=await this.getWorkspace({requestContext:W}),z=this.#P??H?.browser;if(z&&!W.has("browser")){let v=G.memory?.thread,x=typeof v==="string"?v:v?.id,y=W.get(DX)||x||Q?.threadId,d=y?z.hasThreadSession(y)&&z.isBrowserRunning(y):z.isBrowserRunning(),u={provider:z.provider,providerType:z.providerType,sessionId:z.getSessionId(y),headless:z.headless,currentUrl:d?await z.getCurrentUrl(y)??void 0:void 0,cdpUrl:z.providerType==="cli"&&d?z.getCdpUrl(y)??void 0:void 0};W.set("browser",u)}let V=W.get(eX),F=W.get(DX),L=Vg0({memory:{...G.memory,thread:G.memory?.thread||Q?.threadId},overrideId:F}),N=V||G.memory?.resource||Q?.resourceId,D=G.memory?.options,A=await this.getLLM({requestContext:W,model:G.model}),B=A.getModel(),O=typeof B==="object"&&B!==null&&"gatewayId"in B&&B.gatewayId==="mastra";if(N&&L&&!this.hasOwnMemory()&&!O)this.logger.warn("No memory is configured but resourceId and threadId were passed in args",{agent:this.name});if("structuredOutput"in G&&G.structuredOutput?.schema&&!G.structuredOutput?.model){let v=A.getModel(),x=v.provider,y=v.modelId;if(x.includes("openai")||y?.includes("openai"))G={...G,structuredOutput:{...G.structuredOutput,schema:Y44(G.structuredOutput.schema)}}}let E=G.runId||this.#G?.generateId({idType:"run",source:"agent",entityId:this.id,threadId:L?.id,resourceId:N})||E6(),M=G.instructions||await this.getInstructions({requestContext:W}),R=wW({type:"agent_run",name:`agent run: '${this.id}'`,entityType:J6.AGENT,entityId:this.id,entityName:this.name,input:G.messages,attributes:{conversationId:L?.id,instructions:this.#b(M),...this.toRawConfig()?.resolvedVersionId?{resolvedVersionId:this.toRawConfig().resolvedVersionId}:{}},metadata:{runId:E,resourceId:N,threadId:L?.id,...this.toRawConfig()?.resolvedVersionId?{entityVersionId:this.toRawConfig().resolvedVersionId}:{}},tracingPolicy:this.#j?.tracingPolicy,tracingOptions:G.tracingOptions,tracingContext:G.tracingContext,requestContext:W,mastra:this.#G}),q=await this.getMemory({requestContext:W}),_=H,P=new S99({logger:this.logger,memory:q}),w={agent:this,agentName:this.name,logger:this.logger,getMemory:this.getMemory.bind(this),getModel:this.getModel.bind(this),generateMessageId:this.#G?.generateId?.bind(this.#G)||(()=>E6()),mastra:this.#G,_agentNetworkAppend:"_agentNetworkAppend"in this?Boolean(this._agentNetworkAppend):void 0,convertTools:this.convertTools.bind(this),getMemoryMessages:this.getMemoryMessages.bind(this),runInputProcessors:this.__runInputProcessors.bind(this),executeOnFinish:this.#u.bind(this),inputProcessors:async({requestContext:v,overrides:x})=>this.listResolvedInputProcessors(v,x),llmRequestInputProcessors:async({requestContext:v,overrides:x})=>this.listResolvedLLMRequestProcessors(v,x),outputProcessors:async({requestContext:v,overrides:x})=>this.listResolvedOutputProcessors(v,x),errorProcessors:async({requestContext:v,overrides:x})=>x??(this.#M?typeof this.#M==="function"?await this.#M({requestContext:v}):this.#M:[]),llm:A},j=O60(G.transform??G.toolPayloadProjection)??this.#g??O60(this.#G?.getToolPayloadTransform?.()??this.#G?.getToolPayloadProjection?.()),k=await s99({capabilities:w,options:{...G,methodType:Y},threadFromArgs:L,resourceId:N,runId:E,requestContext:W,agentSpan:R,methodType:Y,instructions:M,memoryConfig:D,memory:q,saveQueueManager:P,returnScorerData:G.returnScorerData,requireToolApproval:G.requireToolApproval,toolCallConcurrency:G.toolCallConcurrency,resumeContext:X,agentId:this.id,agentName:this.name,toolCallId:G.toolCallId,workspace:_,toolPayloadTransform:j,...G.disableBackgroundTasks?{}:{backgroundTaskManager:this.#G?.backgroundTaskManager,agentBackgroundConfig:this.#_},skipBgTaskWait:G._skipBgTaskWait,drainPendingSignals:this.#y().drainPendingSignals.bind(this.#y())}).createRun(),S=g4({currentSpan:R});return await k.start({...S})}async#u({result:Y,readOnlyMemory:X,thread:G,threadId:J,resourceId:Q,memoryConfig:W,outputText:K,requestContext:Z,agentSpan:H,runId:z,messageList:V,threadExists:F,structuredOutput:L=!1,overrideScorers:N}){let D=g4({currentSpan:H}),A={text:Y.text,object:Y.object,toolResults:Y.toolResults,toolCalls:Y.toolCalls,usage:Y.usage,steps:Y.steps.map((q)=>{return{stepType:q.stepType,text:q.text,toolResults:q.toolResults,toolCalls:q.toolCalls,usage:q.usage}})};this.logger.debug("Post processing LLM response",{agent:this.name,runId:z,result:A,threadId:J,resourceId:Q});let O=V.get.response.aiV4.core().some((q)=>q.role==="tool"&&q.content.some((_)=>_.toolName==="updateWorkingMemory")),E=await this.getMemory({requestContext:Z}),M=O?J?await E?.getThreadById({threadId:J}):void 0:G,R=Y.response.dbMessages?.length?Y.response.dbMessages:Y.response.messages;if((!R||R.length===0)&&Y.object)R=[{id:Y.response.id,role:"assistant",content:[{type:"text",text:K}]}];if(R?.length)V.add(R,"response");if(E&&Q&&M&&!X)try{if(!F)await E.createThread({threadId:M.id,metadata:M.metadata,title:M.title,memoryConfig:W,resourceId:M.resourceId});let q=E.getMergedThreadConfig(W),{shouldGenerate:_,model:P,instructions:w,minMessages:j}=this.resolveTitleGenerationConfig(q?.generateTitle),C=V.get.all.ui(),k=V.get.all.core(),S=j??1;if(_&&!M.title&&k.length>=S){let I=this.getMostRecentUserMessage(C);if(I)this.genTitle(I,Z,D,P,w,C).then(async(v)=>{if(v)await E.createThread({threadId:M.id,resourceId:Q,memoryConfig:W,title:v,metadata:M.metadata})},(v)=>{this.logger.error("Error persisting generated title:",v)})}}catch(q){if(q instanceof G0)throw q;let _=new G0({id:"AGENT_MEMORY_PERSIST_RESPONSE_MESSAGES_FAILED",domain:"AGENT",category:"SYSTEM",details:{agentName:this.name,runId:z||"",threadId:J||"",result:JSON.stringify(A)}},q);throw this.logger.trackException(_),_}await this.#C({messageList:V,runId:z,requestContext:Z,structuredOutput:L,overrideScorers:N,threadId:J,resourceId:Q,...D}),H?.end({output:{text:Y.text,object:Y.object,files:Y.files,...Y.tripwire?{tripwire:Y.tripwire}:{}},...Y.tripwire?{attributes:{tripwireAbort:{reason:Y.tripwire.reason,processorId:Y.tripwire.processorId,retry:Y.tripwire.retry,metadata:Y.tripwire.metadata}}}:{}})}async network(Y,X){let G=X?.requestContext||new p1,J=await this.getDefaultNetworkOptions({requestContext:G}),Q={...J,...X,routing:{...J?.routing,...X?.routing},completion:{...J?.completion,...X?.completion}},W=Q?.runId||this.#G?.generateId()||E6(),K=G.get(eX),H=G.get(DX)||(typeof Q?.memory?.thread==="string"?Q?.memory?.thread:Q?.memory?.thread?.id),z=K||Q?.memory?.resource;return await o24({networkName:this.name,requestContext:G,runId:W,routingAgent:this,routingAgentOptions:{modelSettings:Q?.modelSettings,memory:Q?.memory},generateId:(V)=>this.#G?.generateId(V)||E6(),maxIterations:Q?.maxSteps||1,messages:Y,threadId:H,resourceId:z,validation:Q?.completion,routing:Q?.routing,onIterationComplete:Q?.onIterationComplete,autoResumeSuspendedTools:Q?.autoResumeSuspendedTools,mastra:this.#G,structuredOutput:Q?.structuredOutput,onStepFinish:Q?.onStepFinish,onError:Q?.onError,onAbort:Q?.onAbort,abortSignal:Q?.abortSignal})}async resumeNetwork(Y,X){let G=X.runId,J=X?.requestContext||new p1,Q=await this.getDefaultNetworkOptions({requestContext:J}),W={...Q,...X,routing:{...Q?.routing,...X?.routing},completion:{...Q?.completion,...X?.completion}},K=J.get(eX),H=J.get(DX)||(typeof W?.memory?.thread==="string"?W?.memory?.thread:W?.memory?.thread?.id),z=K||W?.memory?.resource;return await o24({networkName:this.name,requestContext:J,runId:G,routingAgent:this,routingAgentOptions:{modelSettings:W?.modelSettings,memory:W?.memory},generateId:(V)=>this.#G?.generateId(V)||E6(),maxIterations:W?.maxSteps||1,messages:[],threadId:H,resourceId:z,resumeData:Y,validation:W?.completion,routing:W?.routing,onIterationComplete:W?.onIterationComplete,autoResumeSuspendedTools:W?.autoResumeSuspendedTools,mastra:this.#G,onStepFinish:W?.onStepFinish,onError:W?.onError,onAbort:W?.onAbort,abortSignal:W?.abortSignal})}async approveNetworkToolCall(Y){return this.resumeNetwork({approved:!0},Y)}async declineNetworkToolCall(Y){return this.resumeNetwork({approved:!1},Y)}async generate(Y,X){await this.#T(X?.requestContext);let G=this.#G?.getServer()?.fga;if(G){let F=X?.requestContext?.get("user");if(F){let{checkFGA:L}=await Promise.resolve().then(() => (zT(),HT));await L({fgaProvider:G,user:F,resource:{type:"agent",id:this.id},permission:qz.AGENTS_EXECUTE})}}let J=await this.getDefaultOptions({requestContext:X?.requestContext}),Q=tz(J,X??{}),K=(await this.getLLM({requestContext:Q.requestContext,model:Q.model})).getModel();if(!ZG(K)){let F=K.modelId||"unknown",L=K.provider||"unknown",N=K.specificationVersion;throw new G0({id:"AGENT_GENERATE_V1_MODEL_NOT_SUPPORTED",domain:"AGENT",category:"USER",text:N==="v1"?`Agent "${this.name}" is using AI SDK v4 model (${L}:${F}) which is not compatible with generate(). Please use AI SDK v5+ models or call the generateLegacy() method instead. See https://mastra.ai/en/docs/streaming/overview for more information.`:`Agent "${this.name}" has a model (${L}:${F}) with unrecognized specificationVersion "${N}". Supported versions: v1 (legacy), v2 (AI SDK v5), v3 (AI SDK v6). Please ensure your AI SDK provider is compatible with this version of Mastra.`,details:{agentName:this.name,modelId:F,provider:L,specificationVersion:N}})}let Z={...Q,structuredOutput:Q.structuredOutput?{...Q.structuredOutput,schema:Q4(Q.structuredOutput.schema)}:void 0,messages:Y,methodType:"generate",maxProcessorRetries:Q.maxProcessorRetries??this.#w},H=await this.#S(Z);if(H.status!=="success"){if(H.status==="failed")throw new G0({id:"AGENT_GENERATE_FAILED",domain:"AGENT",category:"USER"},H.error);throw new G0({id:"AGENT_GENERATE_UNKNOWN_ERROR",domain:"AGENT",category:"USER",text:"An unknown error occurred while streaming"})}let z=await H.result.getFullOutput(),V=z.error;if(V)throw V;return z}#y(){return u99}async subscribeToThread(Y){return this.#y().subscribeToThread(this,Y)}abortThreadStream(Y){return this.#y().abortThread(Y)}abortRunStream(Y){return this.#y().abortRun(Y)}sendSignal(Y,X){return this.#y().sendSignal(this,Y,X)}async stream(Y,X){await this.#T(X?.requestContext);let G=this.#G?.getServer()?.fga;if(G){let V=X?.requestContext?.get("user");if(V){let{checkFGA:F}=await Promise.resolve().then(() => (zT(),HT));await F({fgaProvider:G,user:V,resource:{type:"agent",id:this.id},permission:qz.AGENTS_EXECUTE})}}let J=await this.getDefaultOptions({requestContext:X?.requestContext}),Q=tz(J,X??{}),K=(await this.getLLM({requestContext:Q.requestContext,model:Q.model})).getModel();if(!ZG(K)){let V=K.modelId||"unknown",F=K.provider||"unknown",L=K.specificationVersion;throw new G0({id:"AGENT_STREAM_V1_MODEL_NOT_SUPPORTED",domain:"AGENT",category:"USER",text:L==="v1"?`Agent "${this.name}" is using AI SDK v4 model (${F}:${V}) which is not compatible with stream(). Please use AI SDK v5+ models or call the streamLegacy() method instead. See https://mastra.ai/en/docs/streaming/overview for more information.`:`Agent "${this.name}" has a model (${F}:${V}) with unrecognized specificationVersion "${L}". Supported versions: v1 (legacy), v2 (AI SDK v5), v3 (AI SDK v6). Please ensure your AI SDK provider is compatible with this version of Mastra.`,details:{agentName:this.name,modelId:V,provider:F,specificationVersion:L}})}await this.#y().waitForCrossAgentThreadRun(this,Q),Q.runId??=this.#G?.generateId({idType:"run",source:"agent",entityId:this.id})??E6();let Z=this.#y().prepareRunOptions(Q),H={...Z,structuredOutput:Q.structuredOutput?{...Q.structuredOutput,schema:Q4(Q.structuredOutput.schema)}:void 0,messages:Y,methodType:"stream",maxProcessorRetries:Q.maxProcessorRetries??this.#w},z=await this.#S(H);if(z.status!=="success"){if(z.status==="failed")throw new G0({id:"AGENT_STREAM_FAILED",domain:"AGENT",category:"USER"},z.error);throw new G0({id:"AGENT_STREAM_UNKNOWN_ERROR",domain:"AGENT",category:"USER",text:"An unknown error occurred while streaming"})}return this.#y().registerRun(this,z.result,Z),z.result}async streamUntilIdle(Y,X){return h99(this,Y,X,{activeStreams:this.#E,bgManager:this.#G?.backgroundTaskManager})}async resumeStreamUntilIdle(Y,X){return f99(this,Y,X,{activeStreams:this.#E,bgManager:this.#G?.backgroundTaskManager})}async resumeStream(Y,X){let G=await this.getDefaultOptions({requestContext:X?.requestContext}),J=tz(G,X??{}),Q=await this.getLLM({requestContext:J.requestContext,model:J.model});if(!ZG(Q.getModel())){let z=Q.getModel(),V=z.specificationVersion;throw new G0({id:"AGENT_STREAM_V1_MODEL_NOT_SUPPORTED",domain:"AGENT",category:"USER",text:V==="v1"?"V1 models are not supported for resumeStream. Please use streamLegacy instead.":`Model has unrecognized specificationVersion "${V}". Supported versions: v1 (legacy), v2 (AI SDK v5), v3 (AI SDK v6). Please ensure your AI SDK provider is compatible with this version of Mastra.`,details:{modelId:z.modelId,provider:z.provider,specificationVersion:V}})}let W=X?.runId??"",K=await this.#x({runId:W,method:"resumeStream"});await this.#y().waitForCrossAgentThreadRun(this,J);let Z=this.#y().prepareRunOptions(J),H=await this.#S({...Z,structuredOutput:J.structuredOutput?{...J.structuredOutput,schema:Q4(J.structuredOutput.schema)}:void 0,messages:[],resumeContext:{resumeData:Y,snapshot:K},methodType:"stream",maxProcessorRetries:J.maxProcessorRetries??this.#w});if(H.status!=="success"){if(H.status==="failed")throw new G0({id:"AGENT_STREAM_FAILED",domain:"AGENT",category:"USER"},H.error);throw new G0({id:"AGENT_STREAM_UNKNOWN_ERROR",domain:"AGENT",category:"USER",text:"An unknown error occurred while streaming"})}return this.#y().registerRun(this,H.result,Z),H.result}async resumeGenerate(Y,X){let G=await this.getDefaultOptions({requestContext:X?.requestContext}),J=tz(G,X??{}),W=(await this.getLLM({requestContext:J.requestContext,model:J.model})).getModel();if(!ZG(W)){let F=W.modelId||"unknown",L=W.provider||"unknown",N=W.specificationVersion;throw new G0({id:"AGENT_GENERATE_V1_MODEL_NOT_SUPPORTED",domain:"AGENT",category:"USER",text:N==="v1"?`Agent "${this.name}" is using AI SDK v4 model (${L}:${F}) which is not compatible with generate(). Please use AI SDK v5+ models or call the generateLegacy() method instead. See https://mastra.ai/en/docs/streaming/overview for more information.`:`Agent "${this.name}" has a model (${L}:${F}) with unrecognized specificationVersion "${N}". Supported versions: v1 (legacy), v2 (AI SDK v5), v3 (AI SDK v6). Please ensure your AI SDK provider is compatible with this version of Mastra.`,details:{agentName:this.name,modelId:F,provider:L,specificationVersion:N}})}let K=X?.runId??"",Z=await this.#x({runId:K,method:"resumeGenerate"}),H=await this.#S({...J,structuredOutput:J.structuredOutput?{...J.structuredOutput,schema:Q4(J.structuredOutput.schema)}:void 0,messages:[],resumeContext:{resumeData:Y,snapshot:Z},methodType:"generate",maxProcessorRetries:J.maxProcessorRetries??this.#w});if(H.status!=="success"){if(H.status==="failed")throw new G0({id:"AGENT_GENERATE_FAILED",domain:"AGENT",category:"USER"},H.error);throw new G0({id:"AGENT_GENERATE_UNKNOWN_ERROR",domain:"AGENT",category:"USER",text:"An unknown error occurred while generating"})}let z=await H.result.getFullOutput(),V=z.error;if(V)throw V;return z}async approveToolCall(Y){return this.resumeStream({approved:!0},Y)}async declineToolCall(Y){return this.resumeStream({approved:!1},Y)}async approveToolCallGenerate(Y){return this.resumeGenerate({approved:!0},Y)}async declineToolCallGenerate(Y){return this.resumeGenerate({approved:!1},Y)}async generateLegacy(Y,X={}){return this.getLegacyHandler().generateLegacy(Y,X)}async streamLegacy(Y,X={}){return this.getLegacyHandler().streamLegacy(Y,X)}resolveTitleGenerationConfig(Y){if(typeof Y==="boolean")return{shouldGenerate:Y};if(typeof Y==="object"&&Y!==null)return{shouldGenerate:!0,model:Y.model,instructions:Y.instructions,minMessages:Y.minMessages};return{shouldGenerate:!1}}async resolveTitleInstructions(Y,X){if(!X)return`
      - you will generate a short title based on the first message a user begins a conversation with
      - ensure it is not more than 80 characters long
      - the title should be a summary of the user's message
      - do not use quotes or colons
      - the entire text you return will be used as the title`;if(typeof X==="string")return X;else{let J=X({requestContext:Y,mastra:this.#G});return t2(J,(Q)=>{return Q||`
      - you will generate a short title based on the first message a user begins a conversation with
      - ensure it is not more than 80 characters long
      - the title should be a summary of the user's message
      - do not use quotes or colons
      - the entire text you return will be used as the title`})}}};uT=class extends u8{#$="running";#Y;#X;#J=[];#G=!1;#Q=new q69;#U=[];#Z={};#W={text:"",reasoning:[],sources:[],files:[],toolCalls:[],toolResults:[],dynamicToolCalls:[],dynamicToolResults:[],staticToolCalls:[],staticToolResults:[],content:[],usage:{inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},warnings:[],request:{},response:{id:"",timestamp:new Date,modelId:"",messages:[],uiMessages:[]},reasoningText:"",providerMetadata:void 0,finishReason:void 0};#H=[];#F;#V={};#K=[];#A=[];#O=[];#N={};#B={};#R={};#D=[];#L=[];#w=[];#M=void 0;#P={};#z={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0};#v=void 0;#_;#g=!1;#E={suspendPayload:new f$,resumeSchema:new f$,object:new f$,finishReason:new f$,usage:new f$,warnings:new f$,providerMetadata:new f$,response:new f$,request:new f$,text:new f$,reasoning:new f$,reasoningText:new f$,sources:new f$,files:new f$,toolCalls:new f$,toolResults:new f$,steps:new f$,totalUsage:new f$,content:new f$};#j=!1;#h=!1;#f=void 0;#T;runId;#k;processorRunner;messageList;traceId;spanId;messageId;constructor({model:$,stream:Y,messageList:X,options:G,messageId:J,initialState:Q}){super({component:"LLM",name:"MastraModelOutput"});this.#k=G,this.#_=G.transportRef,this.#h=!!G.returnScorerData,this.runId=G.runId;let W=xS0(G.tracingContext?.currentSpan);if(this.traceId=W?.externalTraceId,this.spanId=W?.id,this.#T=$,this.messageId=J,G.structuredOutput?.schema)this.#f=G.structuredOutput.model?"processor":"direct";if(G.outputProcessors?.length)this.processorRunner=new V5({inputProcessors:[],outputProcessors:G.outputProcessors,logger:this.logger,agentName:"MastraModelOutput",processorStates:G.processorStates});this.messageList=X;let K=this,Z=Y,H=this.processorRunner;if(H&&G.isLLMExecutionStep){let z=G.processorStates||new Map;Z=Y.pipeThrough(new HV({async transform(V,F){if(V.type==="finish"&&V.payload?.stepResult?.reason==="tool-calls"){F.enqueue(V);return}else{if(!z.has(hT)){let E=H.outputProcessors.findIndex((M)=>M.id===hT);if(E!==-1){let M=H.outputProcessors[E],R=new JD({processorName:M?.name??hT,tracingContext:G.tracingContext,processorIndex:E,createSpan:!0});R.customState={controller:F},z.set(hT,R)}}else{let E=z.get(hT);if(E)E.customState.controller=F}let L={custom:async(E)=>F.enqueue(E)},{part:N,blocked:D,reason:A,tripwireOptions:B,processorId:O}=await H.processPart(V,z,e1(G),G.requestContext,K.messageList,0,L);if(D){F.enqueue({type:"tripwire",payload:{reason:A||"Output processor blocked content",retry:B?.retry,metadata:B?.metadata,processorId:O}});return}if(N)F.enqueue(N)}}}))}if(K.#f==="direct"&&K.#k.isLLMExecutionStep)Z=Z.pipeThrough(R99({structuredOutput:K.#k.structuredOutput,logger:K.logger}));if(this.#X=Z.pipeThrough(new HV({transform:async(z,V)=>{switch(z.type){case"tool-call-suspended":case"tool-call-approval":K.#$="suspended",K.#E.suspendPayload.resolve(z.payload),K.#E.resumeSchema.resolve(z.payload.resumeSchema);break;case"raw":if(!K.#k.includeRawChunks)return;break;case"object-result":if(K.#F=z.object,K.#E.object.status.type==="pending")K.#E.object.resolve(z.object);break;case"source":K.#K.push(z),K.#W.sources.push(z);break;case"text-delta":if(K.#H.push(z.payload.text),K.#W.text+=z.payload.text,z.payload.id){let B=K.#V[z.payload.id]??[];B.push(z.payload.text),K.#V[z.payload.id]=B}break;case"tool-call-input-streaming-start":K.#B[z.payload.toolCallId]=z.payload.toolName,K.#R[z.payload.toolCallId]={toolName:z.payload.toolName,providerExecuted:z.payload.providerExecuted,providerMetadata:z.payload.providerMetadata,dynamic:z.payload.dynamic};break;case"tool-call-input-streaming-end":{let B=z.payload.toolCallId,O=K.#R[B],E=K.#N[B],M={};if(E?.length)try{let R=E.join("");M=typeof R==="string"&&R.length>0?JSON.parse(R):{}}catch{M={}}if(delete K.#R[B],delete K.#N[B],delete K.#B[B],O){let R={type:"tool-call",runId:z.runId,from:z.from,payload:{toolCallId:B,toolName:O.toolName,args:M,providerExecuted:O.providerExecuted,providerMetadata:O.providerMetadata,dynamic:O.dynamic}};K.#D.push(R),K.#W.toolCalls.push(R),K.#x(z),V.enqueue(z),K.#x(R),V.enqueue(R);return}break}case"tool-call-delta":if(!K.#N[z.payload.toolCallId])K.#N[z.payload.toolCallId]=[];K.#N?.[z.payload.toolCallId]?.push(z.payload.argsTextDelta),z.payload.toolName||=K.#B[z.payload.toolCallId];break;case"file":K.#O.push(z),K.#W.files.push(z);break;case"reasoning-start":K.#Z[z.payload.id]={type:"reasoning",runId:z.runId,from:z.from,payload:{id:z.payload.id,providerMetadata:z.payload.providerMetadata,text:""}};break;case"reasoning-delta":{K.#A.push({type:"reasoning",runId:z.runId,from:z.from,payload:z.payload}),K.#W.reasoning.push({type:"reasoning",runId:z.runId,from:z.from,payload:z.payload});let B=K.#Z[z.payload.id];if(B){if(B.payload.text+=z.payload.text,z.payload.providerMetadata)B.payload.providerMetadata=z.payload.providerMetadata}break}case"reasoning-end":{let B=K.#Z[z.payload.id];if(z.payload.providerMetadata&&B)B.payload.providerMetadata=z.payload.providerMetadata;break}case"tool-call":{let B=K.#D.find((E)=>E.payload.toolCallId===z.payload.toolCallId);if(B){if(z.payload.args&&Object.keys(B.payload.args||{}).length===0)B.payload.args=z.payload.args;if(z.payload.providerMetadata&&!B.payload.providerMetadata)B.payload.providerMetadata=z.payload.providerMetadata;if(z.payload.dynamic!=null&&B.payload.dynamic==null)B.payload.dynamic=z.payload.dynamic;return}K.#D.push(z),K.#W.toolCalls.push(z);let O=z.payload;if(O?.output?.from==="AGENT"&&O?.output?.type==="finish"){let E=O.output.payload;if(E?.usage)K.updateUsageCount(E.usage)}break}case"tool-result":K.#L.push(z),K.#W.toolResults.push(z);break;case"step-finish":{if(K.updateUsageCount(z.payload.output.usage),K.#w=z.payload.stepResult.warnings||[],z.payload.metadata.request)K.#P=z.payload.metadata.request;let{providerMetadata:B,request:O,...E}=z.payload.metadata,M=z.payload.output?.steps||[],q=M[M.length-1]?.tripwire,_=q?"":K.#W.text,P={stepType:K.#U.length===0?"initial":"tool-result",sources:K.#W.sources,files:K.#W.files,toolCalls:K.#W.toolCalls,toolResults:K.#W.toolResults,content:X.get.response.aiV5.modelContent(-1),text:_,tripwire:q,reasoningText:K.#A.map((w)=>w.payload.text).join(""),reasoning:Object.values(K.#Z),get staticToolCalls(){return K.#W.toolCalls.filter((w)=>w.type==="tool-call"&&w.payload?.dynamic===!1)},get dynamicToolCalls(){return K.#W.toolCalls.filter((w)=>w.type==="tool-call"&&w.payload?.dynamic===!0)},get staticToolResults(){return K.#W.toolResults.filter((w)=>w.type==="tool-result"&&w.payload?.dynamic===!1)},get dynamicToolResults(){return K.#W.toolResults.filter((w)=>w.type==="tool-result"&&w.payload?.dynamic===!0)},finishReason:z.payload.stepResult.reason,usage:z.payload.output.usage,warnings:K.#w,request:O||{},response:{id:z.payload.id||"",timestamp:z.payload.metadata?.timestamp||new Date,modelId:z.payload.metadata?.modelId||z.payload.metadata?.model||"",...E,messages:z.payload.messages?.nonUser||[],dbMessages:K.messageList.get.response.db(),uiMessages:X.get.response.aiV5.ui()},providerMetadata:B??z.payload.providerMetadata};await G?.onStepFinish?.({...K.#T.modelId&&K.#T.provider&&K.#T.version?{model:K.#T}:{},...P}),K.#U.push(P),K.#W={text:"",reasoning:[],sources:[],files:[],toolCalls:[],toolResults:[],dynamicToolCalls:[],dynamicToolResults:[],staticToolCalls:[],staticToolResults:[],content:[],usage:{inputTokens:void 0,outputTokens:void 0,totalTokens:void 0},warnings:[],request:{},response:{id:"",timestamp:new Date,modelId:"",messages:[],uiMessages:[]},reasoningText:"",providerMetadata:void 0,finishReason:void 0};break}case"tripwire":K.#v={reason:z.payload?.reason||"Content blocked",retry:z.payload?.retry,metadata:z.payload?.metadata,processorId:z.payload?.processorId},K.#M="other",K.#G=!0,K.resolvePromises({text:K.#H.join(""),finishReason:"other",object:void 0,usage:K.#z,warnings:K.#w,providerMetadata:void 0,response:{dbMessages:K.messageList.get.response.db()},request:{},reasoning:[],reasoningText:void 0,sources:[],files:[],toolCalls:[],toolResults:[],steps:K.#U,totalUsage:K.#z,content:[],suspendPayload:void 0,resumeSchema:void 0}),K.#b(),K.#x(z),V.enqueue(z),K.#Q.emit("finish"),V.terminate();return;case"finish":if(K.#$="success",z.payload.stepResult.reason)K.#M=z.payload.stepResult.reason;let F=z.payload.metadata?.providerMetadata??z.payload.providerMetadata;if(z.payload.stepResult.reason==="tripwire"){let B=z.payload.output?.steps,E=B?.[B?.length-1]?.tripwire;K.#v={reason:E?.reason||"Processor tripwire triggered",retry:E?.retry,metadata:E?.metadata,processorId:E?.processorId}}if(K.#F!==void 0){let O=[...X.get.response.db()].reverse().find((E)=>E.role==="assistant");if(O){if(!O.content.metadata)O.content.metadata={};O.content.metadata.structuredOutput=K.#F}}let L={};if(z.payload.metadata){let{providerMetadata:B,request:O,...E}=z.payload.metadata;L={...E,messages:X.get.response.aiV5.model(),uiMessages:X.get.response.aiV5.ui()}}this.populateUsageCount(z.payload.output.usage),z.payload.output.usage={inputTokens:K.#z.inputTokens??0,outputTokens:K.#z.outputTokens??0,totalTokens:K.#z.totalTokens??0,...K.#z.reasoningTokens!==void 0&&{reasoningTokens:K.#z.reasoningTokens},...K.#z.cachedInputTokens!==void 0&&{cachedInputTokens:K.#z.cachedInputTokens},...K.#z.cacheCreationInputTokens!==void 0&&{cacheCreationInputTokens:K.#z.cacheCreationInputTokens},...K.#z.raw!==void 0&&{raw:K.#z.raw}};try{if(K.processorRunner&&!K.#k.isLLMExecutionStep){let B=K.#U[K.#U.length-1],O=B?.text||"",E={custom:async(P)=>{K.#x(P),V.enqueue(P)}},M={text:K.#H.join(""),usage:z.payload.output.usage,finishReason:K.#M||"unknown",steps:[...K.#U]};K.messageList=await K.processorRunner.runOutputProcessors(K.messageList,e1(G),K.#k.requestContext,0,E,M);let R=K.messageList.get.response.aiV4.core(),q=R[R.length-1],_=q?Zv0(q.content):"";if(B&&_&&_!==O)B.text=_;if(this.resolvePromises({text:_||O,finishReason:K.#M}),z.payload.metadata){let{providerMetadata:P,request:w,...j}=z.payload.metadata;L={...j,messages:X.get.response.aiV5.model(),uiMessages:X.get.response.aiV5.ui()}}z.payload.response=L}else if(!K.#k.isLLMExecutionStep)this.resolvePromises({text:K.#H.join(""),finishReason:K.#M})}catch(B){if(B instanceof u6)K.#v={reason:B.message,retry:B.options?.retry,metadata:B.options?.metadata,processorId:B.processorId},K.resolvePromises({finishReason:"other",text:""});else K.#Y=XG(B,{fallbackMessage:"Unknown error in stream"}),K.resolvePromises({finishReason:"error",text:""});if(K.#E.object.status.type!=="resolved")K.#E.object.resolve(void 0)}let N=K.#A.length>0?K.#A.map((B)=>B.payload.text).join(""):void 0,D=K.#U[K.#U.length-1];if(D&&D.providerMetadata===void 0&&F!==void 0)D.providerMetadata=F;if(this.resolvePromises({usage:K.#z,warnings:K.#w,providerMetadata:F,response:{...L,dbMessages:K.messageList.get.response.db()},request:K.#P||{},reasoningText:N,reasoning:Object.values(K.#Z||{}),sources:K.#K,files:K.#O,toolCalls:K.#D,toolResults:K.#L,steps:K.#U,totalUsage:K.#C(),content:X.get.response.aiV5.stepContent(),suspendPayload:void 0,resumeSchema:void 0}),D){let B={providerMetadata:D.providerMetadata??F,text:K.#H.join(""),warnings:D.warnings??[],finishReason:z.payload.stepResult.reason,content:X.get.response.aiV5.stepContent(),request:await K.request,error:K.error,reasoning:await K.reasoning,reasoningText:await K.reasoningText,sources:await K.sources,files:await K.files,steps:K.#U,response:{...await K.response,...D.response,messages:X.get.response.aiV5.model(),dbMessages:K.messageList.get.response.db()},usage:z.payload.output.usage,totalUsage:K.#C(),toolCalls:await K.toolCalls,toolResults:await K.toolResults,staticToolCalls:(await K.toolCalls).filter((O)=>O?.payload?.dynamic===!1),staticToolResults:(await K.toolResults).filter((O)=>O?.payload?.dynamic===!1),dynamicToolCalls:(await K.toolCalls).filter((O)=>O?.payload?.dynamic===!0),dynamicToolResults:(await K.toolResults).filter((O)=>O?.payload?.dynamic===!0),...K.#T.modelId&&K.#T.provider&&K.#T.version?{model:K.#T}:{},object:K.#E.object.status.type==="rejected"?void 0:K.#E.object.status.type==="resolved"?K.#E.object.status.value:K.#f==="direct"&&D.text?(()=>{try{return JSON.parse(D.text)}catch{return}})():void 0};await G?.onFinish?.(B)}K.#b();break;case"error":let A=XG(z.payload.error,{fallbackMessage:"Unknown error chunk in stream"});K.#Y=A,K.#$="failed",K.#G=!0,Object.values(K.#E).forEach((B)=>{if(B.status.type==="pending")B.reject(K.#Y)}),K.#b();break}K.#x(z),V.enqueue(z)},flush:()=>{if(K.#E.object.status.type==="pending")K.#E.object.resolve(void 0);if(K.#$==="suspended"){let z=K.#A.length>0?K.#A.map((V)=>V.payload.text).join(""):void 0;K.resolvePromises({toolResults:K.#L,toolCalls:K.#D,text:K.#H.join(""),reasoning:Object.values(K.#Z||{}),reasoningText:z,sources:K.#K,files:K.#O,steps:K.#U,usage:K.#z,totalUsage:K.#C(),warnings:K.#w,finishReason:"suspended",content:K.messageList.get.response.aiV5.stepContent(),object:void 0,request:K.#P,response:{dbMessages:K.messageList.get.response.db()},providerMetadata:void 0})}Object.entries(K.#E).forEach(([z,V])=>{if(V.status.type==="pending")V.reject(Error(`promise '${z}' was not resolved or rejected when stream finished`))}),K.#b(),K.#G=!0,K.#Q.emit("finish")}})),Q)this.deserializeState(Q)}resolvePromise($,Y){if(!($ in this.#E))throw new G0({id:"MASTRA_MODEL_OUTPUT_INVALID_PROMISE_KEY",domain:"LLM",category:"SYSTEM",text:`Attempted to resolve invalid promise key '${$}' with value '${typeof Y==="object"?JSON.stringify(Y,null,2):Y}'`});this.#E[$].resolve(Y)}resolvePromises($){for(let Y in $){let X=Y;this.resolvePromise(X,$[X])}}#b(){let $=this.#_?.current;if(!$||!$.closeOnFinish||this.#g)return;this.#g=!0;try{$.close()}catch{}}#q($){if(!this.#j)this.consumeStream();return $.promise}get text(){return this.#q(this.#E.text)}get reasoning(){return this.#q(this.#E.reasoning)}get reasoningText(){return this.#q(this.#E.reasoningText)}get sources(){return this.#q(this.#E.sources)}get files(){return this.#q(this.#E.files)}get steps(){return this.#q(this.#E.steps)}get suspendPayload(){return this.#q(this.#E.suspendPayload)}get resumeSchema(){return this.#q(this.#E.resumeSchema)}get fullStream(){return this.#S()}get finishReason(){return this.#q(this.#E.finishReason)}get toolCalls(){return this.#q(this.#E.toolCalls)}get toolResults(){return this.#q(this.#E.toolResults)}get usage(){return this.#q(this.#E.usage)}get warnings(){return this.#q(this.#E.warnings)}get providerMetadata(){return this.#q(this.#E.providerMetadata)}get response(){return this.#q(this.#E.response)}get request(){return this.#q(this.#E.request)}get transport(){return this.#_?.current}get error(){return this.#Y}updateUsageCount($){if(!$)return;if($.inputTokens!==void 0)this.#z.inputTokens=(this.#z.inputTokens??0)+$.inputTokens;if($.outputTokens!==void 0)this.#z.outputTokens=(this.#z.outputTokens??0)+$.outputTokens;if($.totalTokens!==void 0)this.#z.totalTokens=(this.#z.totalTokens??0)+$.totalTokens;if($.reasoningTokens!==void 0)this.#z.reasoningTokens=(this.#z.reasoningTokens??0)+$.reasoningTokens;if($.cachedInputTokens!==void 0)this.#z.cachedInputTokens=(this.#z.cachedInputTokens??0)+$.cachedInputTokens;if($.cacheCreationInputTokens!==void 0)this.#z.cacheCreationInputTokens=(this.#z.cacheCreationInputTokens??0)+$.cacheCreationInputTokens;if($.raw!==void 0)this.#z.raw=$.raw}populateUsageCount($){if(!$)return;if($.inputTokens!==void 0&&this.#z.inputTokens===void 0)this.#z.inputTokens=$.inputTokens;if($.outputTokens!==void 0&&this.#z.outputTokens===void 0)this.#z.outputTokens=$.outputTokens;if($.totalTokens!==void 0&&this.#z.totalTokens===void 0)this.#z.totalTokens=$.totalTokens;if($.reasoningTokens!==void 0&&this.#z.reasoningTokens===void 0)this.#z.reasoningTokens=$.reasoningTokens;if($.cachedInputTokens!==void 0&&this.#z.cachedInputTokens===void 0)this.#z.cachedInputTokens=$.cachedInputTokens;if($.cacheCreationInputTokens!==void 0&&this.#z.cacheCreationInputTokens===void 0)this.#z.cacheCreationInputTokens=$.cacheCreationInputTokens;if($.raw!==void 0&&this.#z.raw===void 0)this.#z.raw=$.raw}async consumeStream($){if(this.#j)return;this.#j=!0;try{await w69({stream:this.#X,onError:$?.onError,logger:this.logger})}catch(Y){$?.onError?.(Y)}}async getFullOutput(){await this.consumeStream({onError:(J)=>{throw this.logger.error("Error consuming stream",J),J}});let $;if(this.#h)$={input:{inputMessages:this.messageList.getPersisted.input.db(),rememberedMessages:this.messageList.getPersisted.remembered.db(),systemMessages:this.messageList.getSystemMessages(),taggedSystemMessages:this.messageList.getPersisted.taggedSystemMessages},output:this.messageList.getPersisted.response.db()};let Y=await this.steps;return{text:Y.map((J)=>J.text||"").join(""),usage:await this.usage,steps:Y,finishReason:await this.finishReason,warnings:await this.warnings,providerMetadata:await this.providerMetadata,request:await this.request,reasoning:await this.reasoning,reasoningText:await this.reasoningText,toolCalls:await this.toolCalls,toolResults:await this.toolResults,sources:await this.sources,files:await this.files,response:await this.response,totalUsage:await this.totalUsage,object:await this.object,error:this.error,tripwire:this.#v,...$?{scoringData:$}:{},traceId:this.traceId,spanId:this.spanId,runId:this.runId,suspendPayload:await this.suspendPayload,resumeSchema:await this.resumeSchema,messages:this.messageList.get.all.db(),rememberedMessages:this.messageList.get.remembered.db()}}get tripwire(){return this.#v}get totalUsage(){return this.#q(this.#E.totalUsage)}get content(){return this.#q(this.#E.content)}get objectStream(){return this.#S().pipeThrough(new HV({transform($,Y){if($.type==="object")Y.enqueue($.object)}}))}get elementStream(){let $=0;return this.#S().pipeThrough(new HV({transform(Y,X){if(Y.type==="object"){if(Array.isArray(Y.object))for(;$<Y.object.length;$++)X.enqueue(Y.object[$])}}}))}get textStream(){if(this.#f==="direct"){if(E$0(this.#k.structuredOutput?.schema)?.outputFormat==="array")return this.#S().pipeThrough(q99(this.#k.structuredOutput?.schema))}return this.#S().pipeThrough(new HV({transform($,Y){if($.type==="text-delta")Y.enqueue($.payload.text)}}))}get object(){if(!this.processorRunner&&!this.#k.structuredOutput?.schema&&this.#E.object.status.type==="pending")this.#E.object.resolve(void 0);return this.#q(this.#E.object)}_getImmediateToolCalls(){return this.#D}_getImmediateToolResults(){return this.#L}_getImmediateText(){return this.#H.join("")}_getImmediateObject(){return this.#F}_getImmediateUsage(){return this.#z}_getImmediateWarnings(){return this.#w}_getImmediateFinishReason(){return this.#M}_getBaseStream(){return this.#X}_waitUntilFinished(){if(this.#G)return Promise.resolve();return new Promise(($)=>{this.#Q.once("finish",$)})}#C(){let $=this.#z.totalTokens;if($===void 0){let Y=this.#z.inputTokens??0,X=this.#z.outputTokens??0,G=this.#z.reasoningTokens??0;$=Y+X+G}return{inputTokens:this.#z.inputTokens,outputTokens:this.#z.outputTokens,totalTokens:$,reasoningTokens:this.#z.reasoningTokens,cachedInputTokens:this.#z.cachedInputTokens,cacheCreationInputTokens:this.#z.cacheCreationInputTokens,...this.#z.raw!==void 0&&{raw:this.#z.raw}}}#x($){this.#J.push($),this.#Q.emit("chunk",$)}#S(){let $=this;return new e2({start(Y){if($.#J.forEach((J)=>{Y.enqueue(J)}),$.#G){Y.close();return}let X=(J)=>{F9(Y,J)},G=()=>{$.#Q.off("chunk",X),$.#Q.off("finish",G),N$0(Y)};$.#Q.on("chunk",X),$.#Q.on("finish",G)},pull(Y){if(!$.#j)$.consumeStream()},cancel(){$.#Q.removeAllListeners()}})}get status(){return this.#$}serializeState(){return{status:this.#$,bufferedSteps:this.#U,bufferedReasoningDetails:this.#Z,bufferedByStep:this.#W,bufferedText:this.#H,bufferedTextChunks:this.#V,bufferedSources:this.#K,bufferedReasoning:this.#A,bufferedFiles:this.#O,toolCallArgsDeltas:this.#N,toolCallDeltaIdNameMap:this.#B,toolCallStreamingMeta:this.#R,toolCalls:this.#D,toolResults:this.#L,warnings:this.#w,finishReason:this.#M,request:this.#P,usageCount:this.#z,tripwire:this.#v,messageList:this.messageList.serialize()}}deserializeState($){this.#$=$.status,this.#U=$.bufferedSteps,this.#Z=$.bufferedReasoningDetails,this.#W=$.bufferedByStep,this.#H=$.bufferedText,this.#V=$.bufferedTextChunks,this.#K=$.bufferedSources,this.#A=$.bufferedReasoning,this.#O=$.bufferedFiles,this.#N=$.toolCallArgsDeltas,this.#B=$.toolCallDeltaIdNameMap,this.#R=$.toolCallStreamingMeta??{},this.#D=$.toolCalls,this.#L=$.toolResults,this.#w=$.warnings,this.#M=$.finishReason,this.#P=$.request,this.#z=$.usageCount,this.#v=$.tripwire,this.messageList=this.messageList.deserialize($.messageList)}},u6=class extends Error{options;processorId;constructor($,Y={},X){super($);this.options=Y,this.processorId=X,Object.setPrototypeOf(this,new.target.prototype)}},GK4=/[^0-9]4[.-]6/});var vU4={};W8(vU4,{isTaskAugmentedRequestParams:()=>yg0,isJSONRPCResultResponse:()=>CX,isJSONRPCResponse:()=>K$9,isJSONRPCRequest:()=>DJ,isJSONRPCNotification:()=>fg0,isJSONRPCErrorResponse:()=>XK,isJSONRPCError:()=>U$9,isInitializedNotification:()=>gg0,isInitializeRequest:()=>iT,assertCompleteRequestResourceTemplate:()=>ag0,assertCompleteRequestPrompt:()=>rg0,UrlElicitationRequiredError:()=>sg0,UntitledSingleSelectEnumSchemaSchema:()=>DU4,UntitledMultiSelectEnumSchemaSchema:()=>OU4,UnsubscribeRequestSchema:()=>u$0,UnsubscribeRequestParamsSchema:()=>rZ4,ToolUseContentSchema:()=>tZ4,ToolSchema:()=>qu,ToolResultContentSchema:()=>ZU4,ToolListChangedNotificationSchema:()=>s$0,ToolExecutionSchema:()=>YU4,ToolChoiceSchema:()=>KU4,ToolAnnotationsSchema:()=>$U4,TitledSingleSelectEnumSchemaSchema:()=>NU4,TitledMultiSelectEnumSchemaSchema:()=>EU4,TextResourceContentsSchema:()=>pg0,TextContentSchema:()=>c$0,TaskStatusSchema:()=>dZ4,TaskStatusNotificationSchema:()=>sT,TaskStatusNotificationParamsSchema:()=>cZ4,TaskSchema:()=>aT,TaskMetadataSchema:()=>SZ4,TaskCreationParamsSchema:()=>W$9,TaskAugmentedRequestParamsSchema:()=>dT,SubscribeRequestSchema:()=>m$0,SubscribeRequestParamsSchema:()=>nZ4,StringSchemaSchema:()=>FU4,SingleSelectEnumSchemaSchema:()=>BU4,SetLevelRequestSchema:()=>JI,SetLevelRequestParamsSchema:()=>GU4,ServerTasksCapabilitySchema:()=>bZ4,ServerResultSchema:()=>M$9,ServerRequestSchema:()=>O$9,ServerNotificationSchema:()=>E$9,ServerCapabilitiesSchema:()=>gZ4,SamplingMessageSchema:()=>HU4,SamplingMessageContentBlockSchema:()=>Hu,SamplingContentSchema:()=>UU4,SUPPORTED_PROTOCOL_VERSIONS:()=>$K,RootsListChangedNotificationSchema:()=>kU4,RootSchema:()=>SU4,RoleSchema:()=>oT,ResultSchema:()=>aY,ResourceUpdatedNotificationSchema:()=>p$0,ResourceUpdatedNotificationParamsSchema:()=>aZ4,ResourceTemplateSchema:()=>lZ4,ResourceTemplateReferenceSchema:()=>ng0,ResourceSchema:()=>lg0,ResourceRequestParamsSchema:()=>g$0,ResourceReferenceSchema:()=>D$9,ResourceListChangedNotificationSchema:()=>eT,ResourceLinkSchema:()=>r$0,ResourceContentsSchema:()=>ug0,RequestSchema:()=>rY,RequestIdSchema:()=>cE,RelatedTaskMetadataSchema:()=>kZ4,ReadResourceResultSchema:()=>vD,ReadResourceRequestSchema:()=>sE,ReadResourceRequestParamsSchema:()=>iZ4,RELATED_TASK_META_KEY:()=>FV,PromptSchema:()=>d$0,PromptReferenceSchema:()=>IU4,PromptMessageSchema:()=>eZ4,PromptListChangedNotificationSchema:()=>XI,PromptArgumentSchema:()=>sZ4,ProgressTokenSchema:()=>kg0,ProgressSchema:()=>mZ4,ProgressNotificationSchema:()=>iE,ProgressNotificationParamsSchema:()=>uZ4,PrimitiveSchemaDefinitionSchema:()=>qU4,PingRequestSchema:()=>lE,PaginatedResultSchema:()=>rT,PaginatedRequestSchema:()=>nT,PaginatedRequestParamsSchema:()=>pZ4,NumberSchemaSchema:()=>LU4,NotificationSchema:()=>gW,MultiSelectEnumSchemaSchema:()=>MU4,ModelPreferencesSchema:()=>WU4,ModelHintSchema:()=>QU4,McpError:()=>r1,LoggingMessageNotificationSchema:()=>o$0,LoggingMessageNotificationParamsSchema:()=>JU4,LoggingLevelSchema:()=>GI,ListToolsResultSchema:()=>a$0,ListToolsRequestSchema:()=>LV,ListTasksResultSchema:()=>Mu,ListTasksRequestSchema:()=>Eu,ListRootsResultSchema:()=>Y70,ListRootsRequestSchema:()=>$70,ListResourcesResultSchema:()=>kD,ListResourcesRequestSchema:()=>rE,ListResourceTemplatesResultSchema:()=>tT,ListResourceTemplatesRequestSchema:()=>aE,ListPromptsResultSchema:()=>$I,ListPromptsRequestSchema:()=>oE,ListChangedOptionsBaseSchema:()=>ig0,LegacyTitledEnumSchemaSchema:()=>AU4,LATEST_PROTOCOL_VERSION:()=>VV,JSONRPC_VERSION:()=>Vu,JSONRPCResultResponseSchema:()=>h$0,JSONRPCResponseSchema:()=>H$9,JSONRPCRequestSchema:()=>bg0,JSONRPCNotificationSchema:()=>hg0,JSONRPCMessageSchema:()=>C7,JSONRPCErrorSchema:()=>Z$9,JSONRPCErrorResponseSchema:()=>Fu,InitializedNotificationSchema:()=>Nu,InitializeResultSchema:()=>f$0,InitializeRequestSchema:()=>Du,InitializeRequestParamsSchema:()=>fZ4,ImplementationSchema:()=>lT,ImageContentSchema:()=>l$0,IconsSchema:()=>cT,IconSchema:()=>xZ4,GetTaskResultSchema:()=>Bu,GetTaskRequestSchema:()=>Au,GetTaskPayloadResultSchema:()=>F$9,GetTaskPayloadRequestSchema:()=>Ou,GetPromptResultSchema:()=>YI,GetPromptRequestSchema:()=>tE,GetPromptRequestParamsSchema:()=>oZ4,ErrorCode:()=>j1,EnumSchemaSchema:()=>RU4,EmptyResultSchema:()=>NJ,EmbeddedResourceSchema:()=>n$0,ElicitationCompleteNotificationSchema:()=>TU4,ElicitationCompleteNotificationParamsSchema:()=>jU4,ElicitResultSchema:()=>DV,ElicitRequestURLParamsSchema:()=>wU4,ElicitRequestSchema:()=>QI,ElicitRequestParamsSchema:()=>_U4,ElicitRequestFormParamsSchema:()=>PU4,DEFAULT_NEGOTIATED_PROTOCOL_VERSION:()=>zu,CursorSchema:()=>vg0,CreateTaskResultSchema:()=>a3,CreateMessageResultWithToolsSchema:()=>xD,CreateMessageResultSchema:()=>s3,CreateMessageRequestSchema:()=>t$0,CreateMessageRequestParamsSchema:()=>zU4,ContentBlockSchema:()=>eE,CompleteResultSchema:()=>e$0,CompleteRequestSchema:()=>Pu,CompleteRequestParamsSchema:()=>CU4,CompatibilityCallToolResultSchema:()=>L$9,ClientTasksCapabilitySchema:()=>yZ4,ClientResultSchema:()=>B$9,ClientRequestSchema:()=>N$9,ClientNotificationSchema:()=>A$9,ClientCapabilitiesSchema:()=>hZ4,CancelledNotificationSchema:()=>Lu,CancelledNotificationParamsSchema:()=>vZ4,CancelTaskResultSchema:()=>mg0,CancelTaskRequestSchema:()=>Ru,CallToolResultSchema:()=>AJ,CallToolRequestSchema:()=>GU,CallToolRequestParamsSchema:()=>XU4,BooleanSchemaSchema:()=>VU4,BlobResourceContentsSchema:()=>cg0,BaseMetadataSchema:()=>dE,AudioContentSchema:()=>i$0,AnnotationsSchema:()=>nE});function rg0($){if($.params.ref.type!=="ref/prompt")throw TypeError(`Expected CompleteRequestPrompt, but got ${$.params.ref.type}`)}function ag0($){if($.params.ref.type!=="ref/resource")throw TypeError(`Expected CompleteRequestResourceTemplate, but got ${$.params.ref.type}`)}var VV="2025-11-25",zu="2025-03-26",$K,FV="io.modelcontextprotocol/related-task",Vu="2.0",AY,kg0,vg0,W$9,SZ4,kZ4,xg0,fW,dT,yg0=($)=>dT.safeParse($).success,rY,YK,gW,aY,cE,bg0,DJ=($)=>bg0.safeParse($).success,hg0,fg0=($)=>hg0.safeParse($).success,h$0,CX=($)=>h$0.safeParse($).success,K$9,j1,Fu,Z$9,XK=($)=>Fu.safeParse($).success,U$9,C7,H$9,NJ,vZ4,Lu,xZ4,cT,dE,lT,z$9,V$9,yZ4,bZ4,hZ4,fZ4,Du,iT=($)=>Du.safeParse($).success,gZ4,f$0,Nu,gg0=($)=>Nu.safeParse($).success,lE,mZ4,uZ4,iE,pZ4,nT,rT,dZ4,aT,a3,cZ4,sT,Au,Bu,Ou,F$9,Eu,Mu,Ru,mg0,ug0,pg0,dg0,cg0,oT,nE,lg0,lZ4,rE,kD,aE,tT,g$0,iZ4,sE,vD,eT,nZ4,m$0,rZ4,u$0,aZ4,p$0,sZ4,d$0,oE,$I,oZ4,tE,c$0,l$0,i$0,tZ4,n$0,r$0,eE,eZ4,YI,XI,$U4,YU4,qu,LV,a$0,AJ,L$9,XU4,GU,s$0,ig0,GI,GU4,JI,JU4,o$0,QU4,WU4,KU4,ZU4,UU4,Hu,HU4,zU4,t$0,s3,xD,VU4,FU4,LU4,DU4,NU4,AU4,BU4,OU4,EU4,MU4,RU4,qU4,PU4,wU4,_U4,QI,jU4,TU4,DV,ng0,D$9,IU4,CU4,Pu,e$0,SU4,$70,Y70,kU4,N$9,A$9,B$9,O$9,E$9,M$9,r1,sg0;var BY=V0(()=>{O1();$K=[VV,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],AY=Ih(($)=>$!==null&&(typeof $==="object"||typeof $==="function")),kg0=p9([T0(),H8().int()]),vg0=T0(),W$9=$7({ttl:H8().optional(),pollInterval:H8().optional()}),SZ4=k1({ttl:H8().optional()}),kZ4=k1({taskId:T0()}),xg0=$7({progressToken:kg0.optional(),[FV]:kZ4.optional()}),fW=k1({_meta:xg0.optional()}),dT=fW.extend({task:SZ4.optional()}),rY=k1({method:T0(),params:fW.loose().optional()}),YK=k1({_meta:xg0.optional()}),gW=k1({method:T0(),params:YK.loose().optional()}),aY=$7({_meta:xg0.optional()}),cE=p9([T0(),H8().int()]),bg0=k1({jsonrpc:A4(Vu),id:cE,...rY.shape}).strict(),hg0=k1({jsonrpc:A4(Vu),...gW.shape}).strict(),h$0=k1({jsonrpc:A4(Vu),id:cE,result:aY}).strict(),K$9=CX;(function($){$[$.ConnectionClosed=-32000]="ConnectionClosed",$[$.RequestTimeout=-32001]="RequestTimeout",$[$.ParseError=-32700]="ParseError",$[$.InvalidRequest=-32600]="InvalidRequest",$[$.MethodNotFound=-32601]="MethodNotFound",$[$.InvalidParams=-32602]="InvalidParams",$[$.InternalError=-32603]="InternalError",$[$.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(j1||(j1={}));Fu=k1({jsonrpc:A4(Vu),id:cE.optional(),error:k1({code:H8().int(),message:T0(),data:u9().optional()})}).strict(),Z$9=Fu,U$9=XK,C7=p9([bg0,hg0,h$0,Fu]),H$9=p9([h$0,Fu]),NJ=aY.strict(),vZ4=YK.extend({requestId:cE.optional(),reason:T0().optional()}),Lu=gW.extend({method:A4("notifications/cancelled"),params:vZ4}),xZ4=k1({src:T0(),mimeType:T0().optional(),sizes:y1(T0()).optional(),theme:gY(["light","dark"]).optional()}),cT=k1({icons:y1(xZ4).optional()}),dE=k1({name:T0(),title:T0().optional()}),lT=dE.extend({...dE.shape,...cT.shape,version:T0(),websiteUrl:T0().optional(),description:T0().optional()}),z$9=$O(k1({applyDefaults:U9().optional()}),q9(T0(),u9())),V$9=rw(($)=>{if($&&typeof $==="object"&&!Array.isArray($)){if(Object.keys($).length===0)return{form:{}}}return $},$O(k1({form:z$9.optional(),url:AY.optional()}),q9(T0(),u9()).optional())),yZ4=$7({list:AY.optional(),cancel:AY.optional(),requests:$7({sampling:$7({createMessage:AY.optional()}).optional(),elicitation:$7({create:AY.optional()}).optional()}).optional()}),bZ4=$7({list:AY.optional(),cancel:AY.optional(),requests:$7({tools:$7({call:AY.optional()}).optional()}).optional()}),hZ4=k1({experimental:q9(T0(),AY).optional(),sampling:k1({context:AY.optional(),tools:AY.optional()}).optional(),elicitation:V$9.optional(),roots:k1({listChanged:U9().optional()}).optional(),tasks:yZ4.optional(),extensions:q9(T0(),AY).optional()}),fZ4=fW.extend({protocolVersion:T0(),capabilities:hZ4,clientInfo:lT}),Du=rY.extend({method:A4("initialize"),params:fZ4}),gZ4=k1({experimental:q9(T0(),AY).optional(),logging:AY.optional(),completions:AY.optional(),prompts:k1({listChanged:U9().optional()}).optional(),resources:k1({subscribe:U9().optional(),listChanged:U9().optional()}).optional(),tools:k1({listChanged:U9().optional()}).optional(),tasks:bZ4.optional(),extensions:q9(T0(),AY).optional()}),f$0=aY.extend({protocolVersion:T0(),capabilities:gZ4,serverInfo:lT,instructions:T0().optional()}),Nu=gW.extend({method:A4("notifications/initialized"),params:YK.optional()}),lE=rY.extend({method:A4("ping"),params:fW.optional()}),mZ4=k1({progress:H8(),total:H5(H8()),message:H5(T0())}),uZ4=k1({...YK.shape,...mZ4.shape,progressToken:kg0}),iE=gW.extend({method:A4("notifications/progress"),params:uZ4}),pZ4=fW.extend({cursor:vg0.optional()}),nT=rY.extend({params:pZ4.optional()}),rT=aY.extend({nextCursor:vg0.optional()}),dZ4=gY(["working","input_required","completed","failed","cancelled"]),aT=k1({taskId:T0(),status:dZ4,ttl:p9([H8(),mw()]),createdAt:T0(),lastUpdatedAt:T0(),pollInterval:H5(H8()),statusMessage:H5(T0())}),a3=aY.extend({task:aT}),cZ4=YK.merge(aT),sT=gW.extend({method:A4("notifications/tasks/status"),params:cZ4}),Au=rY.extend({method:A4("tasks/get"),params:fW.extend({taskId:T0()})}),Bu=aY.merge(aT),Ou=rY.extend({method:A4("tasks/result"),params:fW.extend({taskId:T0()})}),F$9=aY.loose(),Eu=nT.extend({method:A4("tasks/list")}),Mu=rT.extend({tasks:y1(aT)}),Ru=rY.extend({method:A4("tasks/cancel"),params:fW.extend({taskId:T0()})}),mg0=aY.merge(aT),ug0=k1({uri:T0(),mimeType:H5(T0()),_meta:q9(T0(),u9()).optional()}),pg0=ug0.extend({text:T0()}),dg0=T0().refine(($)=>{try{return atob($),!0}catch{return!1}},{message:"Invalid Base64 string"}),cg0=ug0.extend({blob:dg0}),oT=gY(["user","assistant"]),nE=k1({audience:y1(oT).optional(),priority:H8().min(0).max(1).optional(),lastModified:Az.datetime({offset:!0}).optional()}),lg0=k1({...dE.shape,...cT.shape,uri:T0(),description:H5(T0()),mimeType:H5(T0()),size:H5(H8()),annotations:nE.optional(),_meta:H5($7({}))}),lZ4=k1({...dE.shape,...cT.shape,uriTemplate:T0(),description:H5(T0()),mimeType:H5(T0()),annotations:nE.optional(),_meta:H5($7({}))}),rE=nT.extend({method:A4("resources/list")}),kD=rT.extend({resources:y1(lg0)}),aE=nT.extend({method:A4("resources/templates/list")}),tT=rT.extend({resourceTemplates:y1(lZ4)}),g$0=fW.extend({uri:T0()}),iZ4=g$0,sE=rY.extend({method:A4("resources/read"),params:iZ4}),vD=aY.extend({contents:y1(p9([pg0,cg0]))}),eT=gW.extend({method:A4("notifications/resources/list_changed"),params:YK.optional()}),nZ4=g$0,m$0=rY.extend({method:A4("resources/subscribe"),params:nZ4}),rZ4=g$0,u$0=rY.extend({method:A4("resources/unsubscribe"),params:rZ4}),aZ4=YK.extend({uri:T0()}),p$0=gW.extend({method:A4("notifications/resources/updated"),params:aZ4}),sZ4=k1({name:T0(),description:H5(T0()),required:H5(U9())}),d$0=k1({...dE.shape,...cT.shape,description:H5(T0()),arguments:H5(y1(sZ4)),_meta:H5($7({}))}),oE=nT.extend({method:A4("prompts/list")}),$I=rT.extend({prompts:y1(d$0)}),oZ4=fW.extend({name:T0(),arguments:q9(T0(),T0()).optional()}),tE=rY.extend({method:A4("prompts/get"),params:oZ4}),c$0=k1({type:A4("text"),text:T0(),annotations:nE.optional(),_meta:q9(T0(),u9()).optional()}),l$0=k1({type:A4("image"),data:dg0,mimeType:T0(),annotations:nE.optional(),_meta:q9(T0(),u9()).optional()}),i$0=k1({type:A4("audio"),data:dg0,mimeType:T0(),annotations:nE.optional(),_meta:q9(T0(),u9()).optional()}),tZ4=k1({type:A4("tool_use"),name:T0(),id:T0(),input:q9(T0(),u9()),_meta:q9(T0(),u9()).optional()}),n$0=k1({type:A4("resource"),resource:p9([pg0,cg0]),annotations:nE.optional(),_meta:q9(T0(),u9()).optional()}),r$0=lg0.extend({type:A4("resource_link")}),eE=p9([c$0,l$0,i$0,r$0,n$0]),eZ4=k1({role:oT,content:eE}),YI=aY.extend({description:T0().optional(),messages:y1(eZ4)}),XI=gW.extend({method:A4("notifications/prompts/list_changed"),params:YK.optional()}),$U4=k1({title:T0().optional(),readOnlyHint:U9().optional(),destructiveHint:U9().optional(),idempotentHint:U9().optional(),openWorldHint:U9().optional()}),YU4=k1({taskSupport:gY(["required","optional","forbidden"]).optional()}),qu=k1({...dE.shape,...cT.shape,description:T0().optional(),inputSchema:k1({type:A4("object"),properties:q9(T0(),AY).optional(),required:y1(T0()).optional()}).catchall(u9()),outputSchema:k1({type:A4("object"),properties:q9(T0(),AY).optional(),required:y1(T0()).optional()}).catchall(u9()).optional(),annotations:$U4.optional(),execution:YU4.optional(),_meta:q9(T0(),u9()).optional()}),LV=nT.extend({method:A4("tools/list")}),a$0=rT.extend({tools:y1(qu)}),AJ=aY.extend({content:y1(eE).default([]),structuredContent:q9(T0(),u9()).optional(),isError:U9().optional()}),L$9=AJ.or(aY.extend({toolResult:u9()})),XU4=dT.extend({name:T0(),arguments:q9(T0(),u9()).optional()}),GU=rY.extend({method:A4("tools/call"),params:XU4}),s$0=gW.extend({method:A4("notifications/tools/list_changed"),params:YK.optional()}),ig0=k1({autoRefresh:U9().default(!0),debounceMs:H8().int().nonnegative().default(300)}),GI=gY(["debug","info","notice","warning","error","critical","alert","emergency"]),GU4=fW.extend({level:GI}),JI=rY.extend({method:A4("logging/setLevel"),params:GU4}),JU4=YK.extend({level:GI,logger:T0().optional(),data:u9()}),o$0=gW.extend({method:A4("notifications/message"),params:JU4}),QU4=k1({name:T0().optional()}),WU4=k1({hints:y1(QU4).optional(),costPriority:H8().min(0).max(1).optional(),speedPriority:H8().min(0).max(1).optional(),intelligencePriority:H8().min(0).max(1).optional()}),KU4=k1({mode:gY(["auto","required","none"]).optional()}),ZU4=k1({type:A4("tool_result"),toolUseId:T0().describe("The unique identifier for the corresponding tool call."),content:y1(eE).default([]),structuredContent:k1({}).loose().optional(),isError:U9().optional(),_meta:q9(T0(),u9()).optional()}),UU4=pw("type",[c$0,l$0,i$0]),Hu=pw("type",[c$0,l$0,i$0,tZ4,ZU4]),HU4=k1({role:oT,content:p9([Hu,y1(Hu)]),_meta:q9(T0(),u9()).optional()}),zU4=dT.extend({messages:y1(HU4),modelPreferences:WU4.optional(),systemPrompt:T0().optional(),includeContext:gY(["none","thisServer","allServers"]).optional(),temperature:H8().optional(),maxTokens:H8().int(),stopSequences:y1(T0()).optional(),metadata:AY.optional(),tools:y1(qu).optional(),toolChoice:KU4.optional()}),t$0=rY.extend({method:A4("sampling/createMessage"),params:zU4}),s3=aY.extend({model:T0(),stopReason:H5(gY(["endTurn","stopSequence","maxTokens"]).or(T0())),role:oT,content:UU4}),xD=aY.extend({model:T0(),stopReason:H5(gY(["endTurn","stopSequence","maxTokens","toolUse"]).or(T0())),role:oT,content:p9([Hu,y1(Hu)])}),VU4=k1({type:A4("boolean"),title:T0().optional(),description:T0().optional(),default:U9().optional()}),FU4=k1({type:A4("string"),title:T0().optional(),description:T0().optional(),minLength:H8().optional(),maxLength:H8().optional(),format:gY(["email","uri","date","date-time"]).optional(),default:T0().optional()}),LU4=k1({type:gY(["number","integer"]),title:T0().optional(),description:T0().optional(),minimum:H8().optional(),maximum:H8().optional(),default:H8().optional()}),DU4=k1({type:A4("string"),title:T0().optional(),description:T0().optional(),enum:y1(T0()),default:T0().optional()}),NU4=k1({type:A4("string"),title:T0().optional(),description:T0().optional(),oneOf:y1(k1({const:T0(),title:T0()})),default:T0().optional()}),AU4=k1({type:A4("string"),title:T0().optional(),description:T0().optional(),enum:y1(T0()),enumNames:y1(T0()).optional(),default:T0().optional()}),BU4=p9([DU4,NU4]),OU4=k1({type:A4("array"),title:T0().optional(),description:T0().optional(),minItems:H8().optional(),maxItems:H8().optional(),items:k1({type:A4("string"),enum:y1(T0())}),default:y1(T0()).optional()}),EU4=k1({type:A4("array"),title:T0().optional(),description:T0().optional(),minItems:H8().optional(),maxItems:H8().optional(),items:k1({anyOf:y1(k1({const:T0(),title:T0()}))}),default:y1(T0()).optional()}),MU4=p9([OU4,EU4]),RU4=p9([AU4,BU4,MU4]),qU4=p9([RU4,VU4,FU4,LU4]),PU4=dT.extend({mode:A4("form").optional(),message:T0(),requestedSchema:k1({type:A4("object"),properties:q9(T0(),qU4),required:y1(T0()).optional()})}),wU4=dT.extend({mode:A4("url"),message:T0(),elicitationId:T0(),url:T0().url()}),_U4=p9([PU4,wU4]),QI=rY.extend({method:A4("elicitation/create"),params:_U4}),jU4=YK.extend({elicitationId:T0()}),TU4=gW.extend({method:A4("notifications/elicitation/complete"),params:jU4}),DV=aY.extend({action:gY(["accept","decline","cancel"]),content:rw(($)=>$===null?void 0:$,q9(T0(),p9([T0(),H8(),U9(),y1(T0())])).optional())}),ng0=k1({type:A4("ref/resource"),uri:T0()}),D$9=ng0,IU4=k1({type:A4("ref/prompt"),name:T0()}),CU4=fW.extend({ref:p9([IU4,ng0]),argument:k1({name:T0(),value:T0()}),context:k1({arguments:q9(T0(),T0()).optional()}).optional()}),Pu=rY.extend({method:A4("completion/complete"),params:CU4});e$0=aY.extend({completion:$7({values:y1(T0()).max(100),total:H5(H8().int()),hasMore:H5(U9())})}),SU4=k1({uri:T0().startsWith("file://"),name:T0().optional(),_meta:q9(T0(),u9()).optional()}),$70=rY.extend({method:A4("roots/list"),params:fW.optional()}),Y70=aY.extend({roots:y1(SU4)}),kU4=gW.extend({method:A4("notifications/roots/list_changed"),params:YK.optional()}),N$9=p9([lE,Du,Pu,JI,tE,oE,rE,aE,sE,m$0,u$0,GU,LV,Au,Ou,Eu,Ru]),A$9=p9([Lu,iE,Nu,kU4,sT]),B$9=p9([NJ,s3,xD,DV,Y70,Bu,Mu,a3]),O$9=p9([lE,t$0,QI,$70,Au,Ou,Eu,Ru]),E$9=p9([Lu,iE,o$0,p$0,eT,s$0,XI,sT,TU4]),M$9=p9([NJ,f$0,e$0,YI,$I,kD,tT,vD,AJ,a$0,Bu,Mu,a3]);r1=class r1 extends Error{constructor($,Y,X){super(`MCP error ${$}: ${Y}`);this.code=$,this.data=X,this.name="McpError"}static fromError($,Y,X){if($===j1.UrlElicitationRequired&&X){let G=X;if(G.elicitations)return new sg0(G.elicitations,Y)}return new r1($,Y,X)}};sg0=class sg0 extends r1{constructor($,Y=`URL elicitation${$.length>1?"s":""} required`){super(j1.UrlElicitationRequired,Y,{elicitations:$})}get elicitations(){return this.data?.elicitations??[]}}});var aU4=o((nU4)=>{Object.defineProperty(nU4,"__esModule",{value:!0});nU4.formatNames=nU4.fastFormats=nU4.fullFormats=void 0;function t3($,Y){return{validate:$,compare:Y}}nU4.fullFormats={date:t3(dU4,Qm0),time:t3(Gm0(!0),Wm0),"date-time":t3(mU4(!0),lU4),"iso-time":t3(Gm0(),cU4),"iso-date-time":t3(mU4(),iU4),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:y$9,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:p$9,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:b$9,int32:{type:"number",validate:g$9},int64:{type:"number",validate:m$9},float:{type:"number",validate:pU4},double:{type:"number",validate:pU4},password:!0,binary:!0};nU4.fastFormats={...nU4.fullFormats,date:t3(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Qm0),time:t3(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Wm0),"date-time":t3(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,lU4),"iso-time":t3(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,cU4),"iso-date-time":t3(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,iU4),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};nU4.formatNames=Object.keys(nU4.fullFormats);function C$9($){return $%4===0&&($%100!==0||$%400===0)}var S$9=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,k$9=[0,31,28,31,30,31,30,31,31,30,31,30,31];function dU4($){let Y=S$9.exec($);if(!Y)return!1;let X=+Y[1],G=+Y[2],J=+Y[3];return G>=1&&G<=12&&J>=1&&J<=(G===2&&C$9(X)?29:k$9[G])}function Qm0($,Y){if(!($&&Y))return;if($>Y)return 1;if($<Y)return-1;return 0}var Xm0=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Gm0($){return function(X){let G=Xm0.exec(X);if(!G)return!1;let J=+G[1],Q=+G[2],W=+G[3],K=G[4],Z=G[5]==="-"?-1:1,H=+(G[6]||0),z=+(G[7]||0);if(H>23||z>59||$&&!K)return!1;if(J<=23&&Q<=59&&W<60)return!0;let V=Q-z*Z,F=J-H*Z-(V<0?1:0);return(F===23||F===-1)&&(V===59||V===-1)&&W<61}}function Wm0($,Y){if(!($&&Y))return;let X=new Date("2020-01-01T"+$).valueOf(),G=new Date("2020-01-01T"+Y).valueOf();if(!(X&&G))return;return X-G}function cU4($,Y){if(!($&&Y))return;let X=Xm0.exec($),G=Xm0.exec(Y);if(!(X&&G))return;if($=X[1]+X[2]+X[3],Y=G[1]+G[2]+G[3],$>Y)return 1;if($<Y)return-1;return 0}var Jm0=/t|\s/i;function mU4($){let Y=Gm0($);return function(G){let J=G.split(Jm0);return J.length===2&&dU4(J[0])&&Y(J[1])}}function lU4($,Y){if(!($&&Y))return;let X=new Date($).valueOf(),G=new Date(Y).valueOf();if(!(X&&G))return;return X-G}function iU4($,Y){if(!($&&Y))return;let[X,G]=$.split(Jm0),[J,Q]=Y.split(Jm0),W=Qm0(X,J);if(W===void 0)return;return W||Wm0(G,Q)}var v$9=/\/|:/,x$9=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function y$9($){return v$9.test($)&&x$9.test($)}var uU4=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function b$9($){return uU4.lastIndex=0,uU4.test($)}var h$9=-2147483648,f$9=2147483647;function g$9($){return Number.isInteger($)&&$<=f$9&&$>=h$9}function m$9($){return Number.isInteger($)}function pU4(){return!0}var u$9=/[^\\]\\Z/;function p$9($){if(u$9.test($))return!1;try{return new RegExp($),!0}catch(Y){return!1}}});var oU4=o((sU4)=>{Object.defineProperty(sU4,"__esModule",{value:!0});sU4.formatLimitDefinition=void 0;var c$9=Xt(),JU=d6(),bD=JU.operators,H70={formatMaximum:{okStr:"<=",ok:bD.LTE,fail:bD.GT},formatMinimum:{okStr:">=",ok:bD.GTE,fail:bD.LT},formatExclusiveMaximum:{okStr:"<",ok:bD.LT,fail:bD.GTE},formatExclusiveMinimum:{okStr:">",ok:bD.GT,fail:bD.LTE}},l$9={message:({keyword:$,schemaCode:Y})=>JU.str`should be ${H70[$].okStr} ${Y}`,params:({keyword:$,schemaCode:Y})=>JU._`{comparison: ${H70[$].okStr}, limit: ${Y}}`};sU4.formatLimitDefinition={keyword:Object.keys(H70),type:"string",schemaType:"string",$data:!0,error:l$9,code($){let{gen:Y,data:X,schemaCode:G,keyword:J,it:Q}=$,{opts:W,self:K}=Q;if(!W.validateFormats)return;let Z=new c$9.KeywordCxt(Q,K.RULES.all.format.definition,"format");if(Z.$data)H();else z();function H(){let F=Y.scopeValue("formats",{ref:K.formats,code:W.code.formats}),L=Y.const("fmt",JU._`${F}[${Z.schemaCode}]`);$.fail$data((0,JU.or)(JU._`typeof ${L} != "object"`,JU._`${L} instanceof RegExp`,JU._`typeof ${L}.compare != "function"`,V(L)))}function z(){let F=Z.schema,L=K.formats[F];if(!L||L===!0)return;if(typeof L!="object"||L instanceof RegExp||typeof L.compare!="function")throw Error(`"${J}": format "${F}" does not define "compare" function`);let N=Y.scopeValue("formats",{key:F,ref:L,code:W.code.formats?JU._`${W.code.formats}${(0,JU.getProperty)(F)}`:void 0});$.fail$data(V(N))}function V(F){return JU._`${F}.compare(${X}, ${G}) ${H70[J].fail} 0`}},dependencies:["format"]};var i$9=($)=>{return $.addKeyword(sU4.formatLimitDefinition),$};sU4.default=i$9});var Y34=o((wu,$34)=>{Object.defineProperty(wu,"__esModule",{value:!0});var ZI=aU4(),r$9=oU4(),Um0=d6(),tU4=new Um0.Name("fullFormats"),a$9=new Um0.Name("fastFormats"),Hm0=($,Y={keywords:!0})=>{if(Array.isArray(Y))return eU4($,Y,ZI.fullFormats,tU4),$;let[X,G]=Y.mode==="fast"?[ZI.fastFormats,a$9]:[ZI.fullFormats,tU4],J=Y.formats||ZI.formatNames;if(eU4($,J,X,G),Y.keywords)(0,r$9.default)($);return $};Hm0.get=($,Y="full")=>{let G=(Y==="fast"?ZI.fastFormats:ZI.fullFormats)[$];if(!G)throw Error(`Unknown format "${$}"`);return G};function eU4($,Y,X,G){var J,Q;(J=(Q=$.opts.code).formats)!==null&&J!==void 0||(Q.formats=Um0._`require("ajv-formats/dist/formats").${G}`);for(let W of Y)$.addFormat(W,X[W])}$34.exports=wu=Hm0;Object.defineProperty(wu,"__esModule",{value:!0});wu.default=Hm0});var C34=o(($3$,I34)=>{I34.exports=T34;T34.sync=P79;var _34=A0("fs");function q79($,Y){var X=Y.pathExt!==void 0?Y.pathExt:process.env.PATHEXT;if(!X)return!0;if(X=X.split(";"),X.indexOf("")!==-1)return!0;for(var G=0;G<X.length;G++){var J=X[G].toLowerCase();if(J&&$.substr(-J.length).toLowerCase()===J)return!0}return!1}function j34($,Y,X){if(!$.isSymbolicLink()&&!$.isFile())return!1;return q79(Y,X)}function T34($,Y,X){_34.stat($,function(G,J){X(G,G?!1:j34(J,$,Y))})}function P79($,Y){return j34(_34.statSync($),$,Y)}});var y34=o((Y3$,x34)=>{x34.exports=k34;k34.sync=w79;var S34=A0("fs");function k34($,Y,X){S34.stat($,function(G,J){X(G,G?!1:v34(J,Y))})}function w79($,Y){return v34(S34.statSync($),Y)}function v34($,Y){return $.isFile()&&_79($,Y)}function _79($,Y){var{mode:X,uid:G,gid:J}=$,Q=Y.uid!==void 0?Y.uid:process.getuid&&process.getuid(),W=Y.gid!==void 0?Y.gid:process.getgid&&process.getgid(),K=parseInt("100",8),Z=parseInt("010",8),H=parseInt("001",8),z=K|Z,V=X&H||X&Z&&J===W||X&K&&G===Q||X&z&&Q===0;return V}});var h34=o((G3$,b34)=>{var X3$=A0("fs"),A70;if(process.platform==="win32"||global.TESTING_WINDOWS)A70=C34();else A70=y34();b34.exports=fm0;fm0.sync=j79;function fm0($,Y,X){if(typeof Y==="function")X=Y,Y={};if(!X){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(G,J){fm0($,Y||{},function(Q,W){if(Q)J(Q);else G(W)})})}A70($,Y||{},function(G,J){if(G){if(G.code==="EACCES"||Y&&Y.ignoreErrors)G=null,J=!1}X(G,J)})}function j79($,Y){try{return A70.sync($,Y||{})}catch(X){if(Y&&Y.ignoreErrors||X.code==="EACCES")return!1;else throw X}}});var c34=o((J3$,d34)=>{var BI=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",f34=A0("path"),T79=BI?";":":",g34=h34(),m34=($)=>Object.assign(Error(`not found: ${$}`),{code:"ENOENT"}),u34=($,Y)=>{let X=Y.colon||T79,G=$.match(/\//)||BI&&$.match(/\\/)?[""]:[...BI?[process.cwd()]:[],...(Y.path||process.env.PATH||"").split(X)],J=BI?Y.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",Q=BI?J.split(X):[""];if(BI){if($.indexOf(".")!==-1&&Q[0]!=="")Q.unshift("")}return{pathEnv:G,pathExt:Q,pathExtExe:J}},p34=($,Y,X)=>{if(typeof Y==="function")X=Y,Y={};if(!Y)Y={};let{pathEnv:G,pathExt:J,pathExtExe:Q}=u34($,Y),W=[],K=(H)=>new Promise((z,V)=>{if(H===G.length)return Y.all&&W.length?z(W):V(m34($));let F=G[H],L=/^".*"$/.test(F)?F.slice(1,-1):F,N=f34.join(L,$),D=!L&&/^\.[\\\/]/.test($)?$.slice(0,2)+N:N;z(Z(D,H,0))}),Z=(H,z,V)=>new Promise((F,L)=>{if(V===J.length)return F(K(z+1));let N=J[V];g34(H+N,{pathExt:Q},(D,A)=>{if(!D&&A)if(Y.all)W.push(H+N);else return F(H+N);return F(Z(H,z,V+1))})});return X?K(0).then((H)=>X(null,H),X):K(0)},I79=($,Y)=>{Y=Y||{};let{pathEnv:X,pathExt:G,pathExtExe:J}=u34($,Y),Q=[];for(let W=0;W<X.length;W++){let K=X[W],Z=/^".*"$/.test(K)?K.slice(1,-1):K,H=f34.join(Z,$),z=!Z&&/^\.[\\\/]/.test($)?$.slice(0,2)+H:H;for(let V=0;V<G.length;V++){let F=z+G[V];try{if(g34.sync(F,{pathExt:J}))if(Y.all)Q.push(F);else return F}catch(L){}}}if(Y.all&&Q.length)return Q;if(Y.nothrow)return null;throw m34($)};d34.exports=p34;p34.sync=I79});var i34=o((Q3$,gm0)=>{var l34=($={})=>{let Y=$.env||process.env;if(($.platform||process.platform)!=="win32")return"PATH";return Object.keys(Y).reverse().find((G)=>G.toUpperCase()==="PATH")||"Path"};gm0.exports=l34;gm0.exports.default=l34});var s34=o((W3$,a34)=>{var n34=A0("path"),C79=c34(),S79=i34();function r34($,Y){let X=$.options.env||process.env,G=process.cwd(),J=$.options.cwd!=null,Q=J&&process.chdir!==void 0&&!process.chdir.disabled;if(Q)try{process.chdir($.options.cwd)}catch(K){}let W;try{W=C79.sync($.command,{path:X[S79({env:X})],pathExt:Y?n34.delimiter:void 0})}catch(K){}finally{if(Q)process.chdir(G)}if(W)W=n34.resolve(J?$.options.cwd:"",W);return W}function k79($){return r34($)||r34($,!0)}a34.exports=k79});var o34=o((y79,um0)=>{var mm0=/([()\][%!^"`<>&|;, *?])/g;function v79($){return $=$.replace(mm0,"^$1"),$}function x79($,Y){if($=`${$}`,$=$.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),$=$.replace(/(?=(\\+?)?)\1$/,"$1$1"),$=`"${$}"`,$=$.replace(mm0,"^$1"),Y)$=$.replace(mm0,"^$1");return $}y79.command=v79;y79.argument=x79});var e34=o((K3$,t34)=>{t34.exports=/^#!(.*)/});var YH4=o((Z3$,$H4)=>{var f79=e34();$H4.exports=($="")=>{let Y=$.match(f79);if(!Y)return null;let[X,G]=Y[0].replace(/#! ?/,"").split(" "),J=X.split("/").pop();if(J==="env")return G;return G?`${J} ${G}`:J}});var GH4=o((U3$,XH4)=>{var pm0=A0("fs"),g79=YH4();function m79($){let X=Buffer.alloc(150),G;try{G=pm0.openSync($,"r"),pm0.readSync(G,X,0,150,0),pm0.closeSync(G)}catch(J){}return g79(X.toString())}XH4.exports=m79});var KH4=o((H3$,WH4)=>{var u79=A0("path"),JH4=s34(),QH4=o34(),p79=GH4(),d79=process.platform==="win32",c79=/\.(?:com|exe)$/i,l79=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function i79($){$.file=JH4($);let Y=$.file&&p79($.file);if(Y)return $.args.unshift($.file),$.command=Y,JH4($);return $.file}function n79($){if(!d79)return $;let Y=i79($),X=!c79.test(Y);if($.options.forceShell||X){let G=l79.test(Y);$.command=u79.normalize($.command),$.command=QH4.command($.command),$.args=$.args.map((Q)=>QH4.argument(Q,G));let J=[$.command].concat($.args).join(" ");$.args=["/d","/s","/c",`"${J}"`],$.command=process.env.comspec||"cmd.exe",$.options.windowsVerbatimArguments=!0}return $}function r79($,Y,X){if(Y&&!Array.isArray(Y))X=Y,Y=null;Y=Y?Y.slice(0):[],X=Object.assign({},X);let G={command:$,args:Y,options:X,file:void 0,original:{command:$,args:Y}};return X.shell?G:n79(G)}WH4.exports=r79});var HH4=o((z3$,UH4)=>{var dm0=process.platform==="win32";function cm0($,Y){return Object.assign(Error(`${Y} ${$.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${Y} ${$.command}`,path:$.command,spawnargs:$.args})}function a79($,Y){if(!dm0)return;let X=$.emit;$.emit=function(G,J){if(G==="exit"){let Q=ZH4(J,Y);if(Q)return X.call($,"error",Q)}return X.apply($,arguments)}}function ZH4($,Y){if(dm0&&$===1&&!Y.file)return cm0(Y.original,"spawn");return null}function s79($,Y){if(dm0&&$===1&&!Y.file)return cm0(Y.original,"spawnSync");return null}UH4.exports={hookChildProcess:a79,verifyENOENT:ZH4,verifyENOENTSync:s79,notFoundError:cm0}});var FH4=o((V3$,OI)=>{var zH4=A0("child_process"),lm0=KH4(),im0=HH4();function VH4($,Y,X){let G=lm0($,Y,X),J=zH4.spawn(G.command,G.args,G.options);return im0.hookChildProcess(J,G),J}function o79($,Y,X){let G=lm0($,Y,X),J=zH4.spawnSync(G.command,G.args,G.options);return J.error=J.error||im0.verifyENOENTSync(J.status,G),J}OI.exports=VH4;OI.exports.spawn=VH4;OI.exports.sync=o79;OI.exports._parse=lm0;OI.exports._enoent=im0});var TH4=o((qH$,R70)=>{/*!
 * bytes
 * Copyright(c) 2012-2014 TJ Holowaychuk
 * Copyright(c) 2015 Jed Watson
 * MIT Licensed
 */R70.exports=CY9;R70.exports.format=_H4;R70.exports.parse=jH4;var jY9=/\B(?=(\d{3})+(?!\d))/g,TY9=/(?:\.0*|(\.[^0]+)0+)$/,gD={b:1,kb:1024,mb:1048576,gb:1073741824,tb:Math.pow(1024,4),pb:Math.pow(1024,5)},IY9=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function CY9($,Y){if(typeof $==="string")return jH4($);if(typeof $==="number")return _H4($,Y);return null}function _H4($,Y){if(!Number.isFinite($))return null;var X=Math.abs($),G=Y&&Y.thousandsSeparator||"",J=Y&&Y.unitSeparator||"",Q=Y&&Y.decimalPlaces!==void 0?Y.decimalPlaces:2,W=Boolean(Y&&Y.fixedDecimals),K=Y&&Y.unit||"";if(!K||!gD[K.toLowerCase()])if(X>=gD.pb)K="PB";else if(X>=gD.tb)K="TB";else if(X>=gD.gb)K="GB";else if(X>=gD.mb)K="MB";else if(X>=gD.kb)K="KB";else K="B";var Z=$/gD[K.toLowerCase()],H=Z.toFixed(Q);if(!W)H=H.replace(TY9,"$1");if(G)H=H.split(".").map(function(z,V){return V===0?z.replace(jY9,G):z}).join(".");return H+J+K}function jH4($){if(typeof $==="number"&&!isNaN($))return $;if(typeof $!=="string")return null;var Y=IY9.exec($),X,G="b";if(!Y)X=parseInt($,10),G="b";else X=parseFloat(Y[1]),G=Y[4].toLowerCase();if(isNaN(X))return null;return Math.floor(gD[G]*X)}});var vH4=o((PH$,kH4)=>{/*!
 * depd
 * Copyright(c) 2014-2018 Douglas Christopher Wilson
 * MIT Licensed
 */var SY9=A0("path").relative;kH4.exports=bY9;var kY9=process.cwd();function CH4($,Y){var X=$.split(/[ ,]+/),G=String(Y).toLowerCase();for(var J=0;J<X.length;J++){var Q=X[J];if(Q&&(Q==="*"||Q.toLowerCase()===G))return!0}return!1}function vY9($,Y,X){var G=Object.getOwnPropertyDescriptor($,Y),J=G.value;if(G.get=function(){return J},G.writable)G.set=function(W){return J=W};return delete G.value,delete G.writable,Object.defineProperty($,Y,G),G}function xY9($){var Y="";for(var X=0;X<$;X++)Y+=", arg"+X;return Y.substr(2)}function yY9($){var Y=this.name+": "+this.namespace;if(this.message)Y+=" deprecated "+this.message;for(var X=0;X<$.length;X++)Y+=`
    at `+$[X].toString();return Y}function bY9($){if(!$)throw TypeError("argument namespace is required");var Y=P70(),X=MI(Y[1]),G=X[0];function J(Q){q70.call(J,Q)}return J._file=G,J._ignored=fY9($),J._namespace=$,J._traced=gY9($),J._warned=Object.create(null),J.function=dY9,J.property=cY9,J}function hY9($,Y){var X=typeof $.listenerCount!=="function"?$.listeners(Y).length:$.listenerCount(Y);return X>0}function fY9($){if(process.noDeprecation)return!0;var Y=process.env.NO_DEPRECATION||"";return CH4(Y,$)}function gY9($){if(process.traceDeprecation)return!0;var Y=process.env.TRACE_DEPRECATION||"";return CH4(Y,$)}function q70($,Y){var X=hY9(process,"deprecation");if(!X&&this._ignored)return;var G,J,Q,W,K=0,Z=!1,H=P70(),z=this._file;if(Y)W=Y,Q=MI(H[1]),Q.name=W.name,z=Q[0];else K=2,W=MI(H[K]),Q=W;for(;K<H.length;K++)if(G=MI(H[K]),J=G[0],J===z)Z=!0;else if(J===this._file)z=this._file;else if(Z)break;var V=G?W.join(":")+"__"+G.join(":"):void 0;if(V!==void 0&&V in this._warned)return;this._warned[V]=!0;var F=$;if(!F)F=Q===W||!Q.name?IH4(W):IH4(Q);if(X){var L=SH4(this._namespace,F,H.slice(K));process.emit("deprecation",L);return}var N=process.stderr.isTTY?uY9:mY9,D=N.call(this,F,G,H.slice(K));process.stderr.write(D+`
`,"utf8")}function MI($){var Y=$.getFileName()||"<anonymous>",X=$.getLineNumber(),G=$.getColumnNumber();if($.isEval())Y=$.getEvalOrigin()+", "+Y;var J=[Y,X,G];return J.callSite=$,J.name=$.getFunctionName(),J}function IH4($){var{callSite:Y,name:X}=$;if(!X)X="<anonymous@"+Yu0($)+">";var G=Y.getThis(),J=G&&Y.getTypeName();if(J==="Object")J=void 0;if(J==="Function")J=G.name||J;return J&&Y.getMethodName()?J+"."+X:X}function mY9($,Y,X){var G=new Date().toUTCString(),J=G+" "+this._namespace+" deprecated "+$;if(this._traced){for(var Q=0;Q<X.length;Q++)J+=`
    at `+X[Q].toString();return J}if(Y)J+=" at "+Yu0(Y);return J}function uY9($,Y,X){var G="\x1B[36;1m"+this._namespace+"\x1B[22;39m \x1B[33;1mdeprecated\x1B[22;39m \x1B[0m"+$+"\x1B[39m";if(this._traced){for(var J=0;J<X.length;J++)G+=`
    \x1B[36mat `+X[J].toString()+"\x1B[39m";return G}if(Y)G+=" \x1B[36m"+Yu0(Y)+"\x1B[39m";return G}function Yu0($){return SY9(kY9,$[0])+":"+$[1]+":"+$[2]}function P70(){var $=Error.stackTraceLimit,Y={},X=Error.prepareStackTrace;Error.prepareStackTrace=pY9,Error.stackTraceLimit=Math.max(10,$),Error.captureStackTrace(Y);var G=Y.stack.slice(1);return Error.prepareStackTrace=X,Error.stackTraceLimit=$,G}function pY9($,Y){return Y}function dY9($,Y){if(typeof $!=="function")throw TypeError("argument fn must be a function");var X=xY9($.length),G=P70(),J=MI(G[1]);J.name=$.name;var Q=Function("fn","log","deprecate","message","site",`"use strict"
return function (`+X+`) {log.call(deprecate, message, site)
return fn.apply(this, arguments)
}`)($,q70,this,Y,J);return Q}function cY9($,Y,X){if(!$||typeof $!=="object"&&typeof $!=="function")throw TypeError("argument obj must be object");var G=Object.getOwnPropertyDescriptor($,Y);if(!G)throw TypeError("must call property on owner object");if(!G.configurable)throw TypeError("property must be configurable");var J=this,Q=P70(),W=MI(Q[1]);if(W.name=Y,"value"in G)G=vY9($,Y,X);var{get:K,set:Z}=G;if(typeof K==="function")G.get=function(){return q70.call(J,X,W),K.apply(this,arguments)};if(typeof Z==="function")G.set=function(){return q70.call(J,X,W),Z.apply(this,arguments)};Object.defineProperty($,Y,G)}function SH4($,Y,X){var G=Error(),J;return Object.defineProperty(G,"constructor",{value:SH4}),Object.defineProperty(G,"message",{configurable:!0,enumerable:!1,value:Y,writable:!0}),Object.defineProperty(G,"name",{enumerable:!1,configurable:!0,value:"DeprecationError",writable:!0}),Object.defineProperty(G,"namespace",{configurable:!0,enumerable:!1,value:$,writable:!0}),Object.defineProperty(G,"stack",{configurable:!0,enumerable:!1,get:function(){if(J!==void 0)return J;return J=yY9.call(this,X)},set:function(W){J=W}}),G}});var yH4=o((wH$,xH4)=>{xH4.exports=Object.setPrototypeOf||({__proto__:[]}instanceof Array?lY9:iY9);function lY9($,Y){return $.__proto__=Y,$}function iY9($,Y){for(var X in Y)if(!Object.prototype.hasOwnProperty.call($,X))$[X]=Y[X];return $}});var bH4=o((_H$,nY9)=>{nY9.exports={"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a Teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Too Early","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}});var gH4=o((jH$,fH4)=>{/*!
 * statuses
 * Copyright(c) 2014 Jonathan Ong
 * Copyright(c) 2016 Douglas Christopher Wilson
 * MIT Licensed
 */var Xu0=bH4();fH4.exports=WU;WU.message=Xu0;WU.code=rY9(Xu0);WU.codes=aY9(Xu0);WU.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0};WU.empty={204:!0,205:!0,304:!0};WU.retry={502:!0,503:!0,504:!0};function rY9($){var Y={};return Object.keys($).forEach(function(G){var J=$[G],Q=Number(G);Y[J.toLowerCase()]=Q}),Y}function aY9($){return Object.keys($).map(function(X){return Number(X)})}function sY9($){var Y=$.toLowerCase();if(!Object.prototype.hasOwnProperty.call(WU.code,Y))throw Error('invalid status message: "'+$+'"');return WU.code[Y]}function hH4($){if(!Object.prototype.hasOwnProperty.call(WU.message,$))throw Error("invalid status code: "+$);return WU.message[$]}function WU($){if(typeof $==="number")return hH4($);if(typeof $!=="string")throw TypeError("code must be a number or string");var Y=parseInt($,10);if(!isNaN(Y))return hH4(Y);return sY9($)}});var uH4=o((TH$,mH4)=>{/*!
 * toidentifier
 * Copyright(c) 2016 Douglas Christopher Wilson
 * MIT Licensed
 */mH4.exports=oY9;function oY9($){return $.split(" ").map(function(Y){return Y.slice(0,1).toUpperCase()+Y.slice(1)}).join("").replace(/[^ _0-9a-z]/gi,"")}});var iH4=o((IH$,JM)=>{/*!
 * http-errors
 * Copyright(c) 2014 Jonathan Ong
 * Copyright(c) 2016 Douglas Christopher Wilson
 * MIT Licensed
 */var tY9=vH4()("http-errors"),pH4=yH4(),RI=gH4(),Gu0=$A(),eY9=uH4();JM.exports=w70;JM.exports.HttpError=$X9();JM.exports.isHttpError=XX9(JM.exports.HttpError);JX9(JM.exports,RI.codes,JM.exports.HttpError);function dH4($){return Number(String($).charAt(0)+"00")}function w70(){var $,Y,X=500,G={};for(var J=0;J<arguments.length;J++){var Q=arguments[J],W=typeof Q;if(W==="object"&&Q instanceof Error)$=Q,X=$.status||$.statusCode||X;else if(W==="number"&&J===0)X=Q;else if(W==="string")Y=Q;else if(W==="object")G=Q;else throw TypeError("argument #"+(J+1)+" unsupported type "+W)}if(typeof X==="number"&&(X<400||X>=600))tY9("non-error status code; use only 4xx or 5xx status codes");if(typeof X!=="number"||!RI.message[X]&&(X<400||X>=600))X=500;var K=w70[X]||w70[dH4(X)];if(!$)$=K?new K(Y):Error(Y||RI.message[X]),Error.captureStackTrace($,w70);if(!K||!($ instanceof K)||$.status!==X)$.expose=X<500,$.status=$.statusCode=X;for(var Z in G)if(Z!=="status"&&Z!=="statusCode")$[Z]=G[Z];return $}function $X9(){function $(){throw TypeError("cannot construct abstract class")}return Gu0($,Error),$}function YX9($,Y,X){var G=lH4(Y);function J(Q){var W=Q!=null?Q:RI.message[X],K=Error(W);return Error.captureStackTrace(K,J),pH4(K,J.prototype),Object.defineProperty(K,"message",{enumerable:!0,configurable:!0,value:W,writable:!0}),Object.defineProperty(K,"name",{enumerable:!1,configurable:!0,value:G,writable:!0}),K}return Gu0(J,$),cH4(J,G),J.prototype.status=X,J.prototype.statusCode=X,J.prototype.expose=!0,J}function XX9($){return function(X){if(!X||typeof X!=="object")return!1;if(X instanceof $)return!0;return X instanceof Error&&typeof X.expose==="boolean"&&typeof X.statusCode==="number"&&X.status===X.statusCode}}function GX9($,Y,X){var G=lH4(Y);function J(Q){var W=Q!=null?Q:RI.message[X],K=Error(W);return Error.captureStackTrace(K,J),pH4(K,J.prototype),Object.defineProperty(K,"message",{enumerable:!0,configurable:!0,value:W,writable:!0}),Object.defineProperty(K,"name",{enumerable:!1,configurable:!0,value:G,writable:!0}),K}return Gu0(J,$),cH4(J,G),J.prototype.status=X,J.prototype.statusCode=X,J.prototype.expose=!1,J}function cH4($,Y){var X=Object.getOwnPropertyDescriptor($,"name");if(X&&X.configurable)X.value=Y,Object.defineProperty($,"name",X)}function JX9($,Y,X){Y.forEach(function(J){var Q,W=eY9(RI.message[J]);switch(dH4(J)){case 400:Q=YX9(X,W,J);break;case 500:Q=GX9(X,W,J);break}if(Q)$[J]=Q,$[W]=Q})}function lH4($){return $.slice(-5)==="Error"?$:$+"Error"}});var rH4=o((CH$,nH4)=>{/*!
 * unpipe
 * Copyright(c) 2015 Douglas Christopher Wilson
 * MIT Licensed
 */nH4.exports=WX9;function QX9($){var Y=$.listeners("data");for(var X=0;X<Y.length;X++)if(Y[X].name==="ondata")return!0;return!1}function WX9($){if(!$)throw TypeError("argument stream is required");if(typeof $.unpipe==="function"){$.unpipe();return}if(!QX9($))return;var Y,X=$.listeners("close");for(var G=0;G<X.length;G++){if(Y=X[G],Y.name!=="cleanup"&&Y.name!=="onclose")continue;Y.call($)}}});var tH4=o((SH$,oH4)=>{/*!
 * raw-body
 * Copyright(c) 2013-2014 Jonathan Ong
 * Copyright(c) 2014-2022 Douglas Christopher Wilson
 * MIT Licensed
 */var aH4=LX9(),KX9=TH4(),QM=iH4(),ZX9=rU0(),UX9=rH4();oH4.exports=VX9;var HX9=/^Encoding not recognized: /;function zX9($){if(!$)return null;try{return ZX9.getDecoder($)}catch(Y){if(!HX9.test(Y.message))throw Y;throw QM(415,"specified encoding unsupported",{encoding:$,type:"encoding.unsupported"})}}function VX9($,Y,X){var G=X,J=Y||{};if($===void 0)throw TypeError("argument stream is required");else if(typeof $!=="object"||$===null||typeof $.on!=="function")throw TypeError("argument stream must be a stream");if(Y===!0||typeof Y==="string")J={encoding:Y};if(typeof Y==="function")G=Y,J={};if(G!==void 0&&typeof G!=="function")throw TypeError("argument callback must be a function");if(!G&&!global.Promise)throw TypeError("argument callback is required");var Q=J.encoding!==!0?J.encoding:"utf-8",W=KX9.parse(J.limit),K=J.length!=null&&!isNaN(J.length)?parseInt(J.length,10):null;if(G)return sH4($,Q,K,W,DX9(G));return new Promise(function(H,z){sH4($,Q,K,W,function(F,L){if(F)return z(F);H(L)})})}function FX9($){if(UX9($),typeof $.pause==="function")$.pause()}function sH4($,Y,X,G,J){var Q=!1,W=!0;if(G!==null&&X!==null&&X>G)return V(QM(413,"request entity too large",{expected:X,length:X,limit:G,type:"entity.too.large"}));var K=$._readableState;if($._decoder||K&&(K.encoding||K.decoder))return V(QM(500,"stream encoding should not be set",{type:"stream.encoding.set"}));if(typeof $.readable<"u"&&!$.readable)return V(QM(500,"stream is not readable",{type:"stream.not.readable"}));var Z=0,H;try{H=zX9(Y)}catch(A){return V(A)}var z=H?"":[];$.on("aborted",F),$.on("close",D),$.on("data",L),$.on("end",N),$.on("error",N),W=!1;function V(){var A=Array(arguments.length);for(var B=0;B<A.length;B++)A[B]=arguments[B];if(Q=!0,W)process.nextTick(O);else O();function O(){if(D(),A[0])FX9($);J.apply(null,A)}}function F(){if(Q)return;V(QM(400,"request aborted",{code:"ECONNABORTED",expected:X,length:X,received:Z,type:"request.aborted"}))}function L(A){if(Q)return;if(Z+=A.length,G!==null&&Z>G)V(QM(413,"request entity too large",{limit:G,received:Z,type:"entity.too.large"}));else if(H)z+=H.write(A);else z.push(A)}function N(A){if(Q)return;if(A)return V(A);if(X!==null&&Z!==X)V(QM(400,"request size did not match content length",{expected:X,length:X,received:Z,type:"request.size.invalid"}));else{var B=H?z+(H.end()||""):Buffer.concat(z);V(null,B)}}function D(){z=null,$.removeListener("aborted",F),$.removeListener("data",L),$.removeListener("end",N),$.removeListener("error",N),$.removeListener("close",D)}}function LX9(){try{return A0("async_hooks")}catch($){return{}}}function DX9($){var Y;if(aH4.AsyncResource)Y=new aH4.AsyncResource($.name||"bound-anonymous-fn");if(!Y||!Y.runInAsyncScope)return $;return Y.runInAsyncScope.bind(Y,$,null)}});var Xz4=o((PX9)=>{/*!
 * content-type
 * Copyright(c) 2015 Douglas Christopher Wilson
 * MIT Licensed
 */var eH4=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,NX9=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,$z4=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,AX9=/\\([\u000b\u0020-\u00ff])/g,BX9=/([\\"])/g,Yz4=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;PX9.format=OX9;PX9.parse=EX9;function OX9($){if(!$||typeof $!=="object")throw TypeError("argument obj is required");var{parameters:Y,type:X}=$;if(!X||!Yz4.test(X))throw TypeError("invalid type");var G=X;if(Y&&typeof Y==="object"){var J,Q=Object.keys(Y).sort();for(var W=0;W<Q.length;W++){if(J=Q[W],!$z4.test(J))throw TypeError("invalid parameter name");G+="; "+J+"="+RX9(Y[J])}}return G}function EX9($){if(!$)throw TypeError("argument string is required");var Y=typeof $==="object"?MX9($):$;if(typeof Y!=="string")throw TypeError("argument string is required to be a string");var X=Y.indexOf(";"),G=X!==-1?Y.slice(0,X).trim():Y.trim();if(!Yz4.test(G))throw TypeError("invalid media type");var J=new qX9(G.toLowerCase());if(X!==-1){var Q,W,K;eH4.lastIndex=X;while(W=eH4.exec(Y)){if(W.index!==X)throw TypeError("invalid parameter format");if(X+=W[0].length,Q=W[1].toLowerCase(),K=W[2],K.charCodeAt(0)===34){if(K=K.slice(1,-1),K.indexOf("\\")!==-1)K=K.replace(AX9,"$1")}J.parameters[Q]=K}if(X!==Y.length)throw TypeError("invalid parameter format")}return J}function MX9($){var Y;if(typeof $.getHeader==="function")Y=$.getHeader("content-type");else if(typeof $.headers==="object")Y=$.headers&&$.headers["content-type"];if(typeof Y!=="string")throw TypeError("content-type header is missing from object");return Y}function RX9($){var Y=String($);if($z4.test(Y))return Y;if(Y.length>0&&!NX9.test(Y))throw TypeError("invalid parameter value");return'"'+Y.replace(BX9,"\\$1")+'"'}function qX9($){this.parameters=Object.create(null),this.type=$}});var Nz4={};W8(Nz4,{validatePermissions:()=>Zg1,validateLicense:()=>kT0,resolvePermissionsFromMapping:()=>h10,resolvePermissions:()=>b10,matchesPermission:()=>XO,isValidPermissionPattern:()=>ST0,isLicenseValid:()=>ow,isFeatureEnabled:()=>Hg1,isEELicenseValid:()=>Ug1,isEEEnabled:()=>zg1,isDevEnvironment:()=>f10,isAuthenticated:()=>Vg1,hasPermission:()=>Dg1,getDefaultRole:()=>Lg1,checkFGA:()=>A50,buildCapabilities:()=>Fg1,StaticRBACProvider:()=>Ng1,RESOURCES:()=>Qg1,PERMISSION_PATTERNS:()=>CT0,PERMISSIONS:()=>Kg1,MastraFGAPermissions:()=>qz,FGADeniedError:()=>B50,DEFAULT_ROLES:()=>g10,ACTIONS:()=>Wg1});var Az4=V0(()=>{vT0();ub0()});var hu=V0(()=>{Uj();$g()});var XL4=o((KK)=>{var V29=KK&&KK.__createBinding||(Object.create?function($,Y,X,G){if(G===void 0)G=X;var J=Object.getOwnPropertyDescriptor(Y,X);if(!J||("get"in J?!Y.__esModule:J.writable||J.configurable))J={enumerable:!0,get:function(){return Y[X]}};Object.defineProperty($,G,J)}:function($,Y,X,G){if(G===void 0)G=X;$[G]=Y[X]}),F29=KK&&KK.__setModuleDefault||(Object.create?function($,Y){Object.defineProperty($,"default",{enumerable:!0,value:Y})}:function($,Y){$.default=Y}),YL4=KK&&KK.__importStar||function($){if($&&$.__esModule)return $;var Y={};if($!=null){for(var X in $)if(X!=="default"&&Object.prototype.hasOwnProperty.call($,X))V29(Y,$,X)}return F29(Y,$),Y};Object.defineProperty(KK,"__esModule",{value:!0});KK.load=KK.currentTarget=void 0;var L29=YL4(A0("path")),D29=YL4(A0("fs"));function N29(){let $=null;switch(process.platform){case"android":switch(process.arch){case"arm":return"android-arm-eabi";case"arm64":return"android-arm64"}$="Android";break;case"win32":switch(process.arch){case"x64":return"win32-x64-msvc";case"arm64":return"win32-arm64-msvc";case"ia32":return"win32-ia32-msvc"}$="Windows";break;case"darwin":switch(process.arch){case"x64":return"darwin-x64";case"arm64":return"darwin-arm64"}$="macOS";break;case"linux":switch(process.arch){case"x64":case"arm64":return A29()?`linux-${process.arch}-gnu`:`linux-${process.arch}-musl`;case"arm":return"linux-arm-gnueabihf"}$="Linux";break;case"freebsd":if(process.arch==="x64")return"freebsd-x64";$="FreeBSD";break}if($)throw Error(`Neon: unsupported ${$} architecture: ${process.arch}`);throw Error(`Neon: unsupported system: ${process.platform}`)}KK.currentTarget=N29;function A29(){let $=process.report?.getReport();if(typeof $!=="object"||!$||!("header"in $))return!1;let Y=$.header;return typeof Y==="object"&&!!Y&&"glibcVersionRuntime"in Y}function B29($){let Y=L29.join($,"index.node");return D29.existsSync(Y)?A0(Y):null}KK.load=B29});var JL4=o(($D$,GL4)=>{var O29={ALLOW:0,DENY:1};GL4.exports=O29});var WL4=o((YD$,QL4)=>{var mu0={value:"SqliteError",writable:!0,enumerable:!1,configurable:!0};function LM($,Y,X){if(new.target!==LM)return new LM($,Y);if(typeof Y!=="string")throw TypeError("Expected second argument to be a string");Error.call(this,$),mu0.value=""+$,Object.defineProperty(this,"message",mu0),Error.captureStackTrace(this,LM),this.code=Y,this.rawCode=X}Object.setPrototypeOf(LM,Error);Object.setPrototypeOf(LM.prototype,Error.prototype);Object.defineProperty(LM.prototype,"name",mu0);QL4.exports=LM});var LL4=o((XD$,f70)=>{var __dirname="/root/package_linux_2.0/node_modules/libsql",{load:E29,currentTarget:M29}=XL4(),{familySync:KL4,GLIBC:R29,MUSL:q29}=PJ0();function P29(){if(process.env.LIBSQL_JS_DEV)return E29(__dirname);let $=M29();if(KL4()==R29)switch($){case"linux-x64-musl":$="linux-x64-gnu";break;case"linux-arm64-musl":$="linux-arm64-gnu";break}if($==="linux-arm-gnueabihf"&&KL4()==q29)$="linux-arm-musleabihf";return A0(`@libsql/${$}`)}var{databaseOpen:w29,databaseOpenWithSync:_29,databaseInTransaction:j29,databaseInterrupt:T29,databaseClose:I29,databaseSyncSync:C29,databaseSyncUntilSync:S29,databaseExecSync:k29,databasePrepareSync:v29,databaseDefaultSafeIntegers:x29,databaseAuthorizer:y29,databaseLoadExtension:b29,databaseMaxWriteReplicationIndex:h29,statementRaw:f29,statementIsReader:g29,statementGet:ZL4,statementRun:UL4,statementInterrupt:m29,statementRowsSync:HL4,statementColumns:u29,statementSafeIntegers:p29,rowsNext:d29}=P29(),c29=JL4(),zL4=WL4();function bI($){if($.libsqlError)return new zL4($.message,$.code,$.rawCode);return $}class VL4{constructor($,Y){let X=Y?.encryptionCipher??"aes256cbc";if(Y&&Y.syncUrl){var G="";if(Y.syncAuth)console.warn("Warning: The `syncAuth` option is deprecated, please use `authToken` option instead."),G=Y.syncAuth;else if(Y.authToken)G=Y.authToken;let Q=Y?.encryptionKey??"",W=Y?.syncPeriod??0,K=Y?.readYourWrites??!0,Z=Y?.offline??!1,H=Y?.remoteEncryptionKey??"";this.db=_29($,Y.syncUrl,G,X,Q,W,K,Z,H)}else{let Q=Y?.authToken??"",W=Y?.encryptionKey??"",K=Y?.timeout??0,Z=Y?.remoteEncryptionKey??"";this.db=w29($,Q,X,W,K,Z)}this.memory=$===":memory:",this.readonly=!1,this.name="",this.open=!0;let J=this.db;Object.defineProperties(this,{inTransaction:{get(){return j29(J)}}})}sync(){return C29.call(this.db)}syncUntil($){return S29.call(this.db,$)}prepare($){try{let Y=v29.call(this.db,$);return new FL4(Y)}catch(Y){throw bI(Y)}}transaction($){if(typeof $!=="function")throw TypeError("Expected first argument to be a function");let Y=this,X=(J)=>{return(...Q)=>{Y.exec("BEGIN "+J);try{let W=$(...Q);return Y.exec("COMMIT"),W}catch(W){throw Y.exec("ROLLBACK"),W}}},G={default:{value:X("")},deferred:{value:X("DEFERRED")},immediate:{value:X("IMMEDIATE")},exclusive:{value:X("EXCLUSIVE")},database:{value:this,enumerable:!0}};return Object.defineProperties(G.default.value,G),Object.defineProperties(G.deferred.value,G),Object.defineProperties(G.immediate.value,G),Object.defineProperties(G.exclusive.value,G),G.default.value}pragma($,Y){if(Y==null)Y={};if(typeof $!=="string")throw TypeError("Expected first argument to be a string");if(typeof Y!=="object")throw TypeError("Expected second argument to be an options object");let X=Y.simple,G=this.prepare(`PRAGMA ${$}`,this,!0);return X?G.pluck().get():G.all()}backup($,Y){throw Error("not implemented")}serialize($){throw Error("not implemented")}function($,Y,X){if(Y==null)Y={};if(typeof Y==="function")X=Y,Y={};if(typeof $!=="string")throw TypeError("Expected first argument to be a string");if(typeof X!=="function")throw TypeError("Expected last argument to be a function");if(typeof Y!=="object")throw TypeError("Expected second argument to be an options object");if(!$)throw TypeError("User-defined function name cannot be an empty string");throw Error("not implemented")}aggregate($,Y){if(typeof $!=="string")throw TypeError("Expected first argument to be a string");if(typeof Y!=="object"||Y===null)throw TypeError("Expected second argument to be an options object");if(!$)throw TypeError("User-defined function name cannot be an empty string");throw Error("not implemented")}table($,Y){if(typeof $!=="string")throw TypeError("Expected first argument to be a string");if(!$)throw TypeError("Virtual table module name cannot be an empty string");throw Error("not implemented")}authorizer($){y29.call(this.db,$)}loadExtension(...$){b29.call(this.db,...$)}maxWriteReplicationIndex(){return h29.call(this.db)}exec($){try{k29.call(this.db,$)}catch(Y){throw bI(Y)}}interrupt(){T29.call(this.db)}close(){I29.call(this.db),this.open=!1}defaultSafeIntegers($){return x29.call(this.db,$??!0),this}unsafeMode(...$){throw Error("not implemented")}}class FL4{constructor($){this.stmt=$,this.pluckMode=!1}raw($){return f29.call(this.stmt,$??!0),this}pluck($){return this.pluckMode=$??!0,this}get reader(){return g29.call(this.stmt)}run(...$){try{if($.length==1&&typeof $[0]==="object")return UL4.call(this.stmt,$[0]);else return UL4.call(this.stmt,$.flat())}catch(Y){throw bI(Y)}}get(...$){try{if($.length==1&&typeof $[0]==="object")return ZL4.call(this.stmt,$[0]);else return ZL4.call(this.stmt,$.flat())}catch(Y){throw bI(Y)}}iterate(...$){var Y=void 0;if($.length==1&&typeof $[0]==="object")Y=HL4.call(this.stmt,$[0]);else Y=HL4.call(this.stmt,$.flat());return{nextRows:Array(100),nextRowIndex:100,next(){try{if(this.nextRowIndex===100)d29.call(Y,this.nextRows),this.nextRowIndex=0;let G=this.nextRows[this.nextRowIndex];if(this.nextRows[this.nextRowIndex]=void 0,!G)return{done:!0};return this.nextRowIndex++,{value:G,done:!1}}catch(G){throw bI(G)}},[Symbol.iterator](){return this}}}all(...$){try{let Y=[];for(let X of this.iterate(...$))if(this.pluckMode)Y.push(X[Object.keys(X)[0]]);else Y.push(X);return Y}catch(Y){throw bI(Y)}}interrupt(){m29.call(this.stmt)}columns(){return u29.call(this.stmt)}safeIntegers($){return p29.call(this.stmt,$??!0),this}}f70.exports=VL4;f70.exports.Authorization=c29;f70.exports.SqliteError=zL4});var Xp0=o((WB$,$D4)=>{function zZ9($){var Y=0,X=[];function G(){if(Y--,Y<$)J()}function J(){var Z=X.shift();if(K.queue=X.length,Z)W(Z.fn).then(Z.resolve).catch(Z.reject)}function Q(Z){return new Promise(function(H,z){X.push({fn:Z,resolve:H,reject:z}),K.queue=X.length})}function W(Z){Y++;try{return Promise.resolve(Z()).then(function(H){return G(),H},function(H){throw G(),H})}catch(H){return G(),Promise.reject(H)}}var K=function(Z){if(Y>=$)return Q(Z);else return W(Z)};return K}function VZ9($,Y){var X=!1,G=this;return Promise.all($.map(function(){var J=arguments;return G(function(){if(!X)return Y.apply(void 0,J).catch(function(Q){throw X=!0,Q})})}))}function eL4($){return $.queue=0,$.map=VZ9,$}$D4.exports=function($){if($)return eL4(zZ9($));else return eL4(function(Y){return Y()})}});var zD4={};W8(zD4,{userIdField:()=>a40,updatedAtField:()=>ZS0,updateSpanRecordSchema:()=>W90,updateSpanArgsSchema:()=>f44,transformScoreRow:()=>V90,transformRow:()=>cx0,tracesOrderBySchema:()=>Cx0,tracesOrderByFieldSchema:()=>Ix0,tracesFilterSchema:()=>Tx0,traceSpanSchema:()=>X90,traceIdField:()=>k$,toTraceSpans:()=>cj,toTraceSpan:()=>dj,toEntityType:()=>ZE,threadIdField:()=>$60,tagsField:()=>u_,spanRecordSchema:()=>x3,spanIdsSchema:()=>R44,spanIds:()=>pj,spanIdField:()=>LQ,spanContextFields:()=>PO,sourceField:()=>DS0,sortDirectionSchema:()=>R3,sessionIdField:()=>e40,serviceNameField:()=>J60,serializeSpanAttributes:()=>D90,serializeDate:()=>Y64,scoresOrderBySchema:()=>PS0,scoresOrderByFieldSchema:()=>qS0,scoresFilterSchema:()=>wO,scoreTracesResponseSchema:()=>d44,scoreTracesRequestSchema:()=>p44,scoreRecordSchema:()=>z60,scoreInputSchema:()=>ii1,scopeField:()=>BS0,safelyParseJSON:()=>N8,runIdField:()=>t40,rootEntityTypeField:()=>K60,rootEntityNameField:()=>Z60,rootEntityIdField:()=>AS0,resourceIdField:()=>o40,requestIdField:()=>Y60,parentEntityTypeField:()=>Q60,parentEntityNameField:()=>W60,parentEntityIdField:()=>NS0,paginationInfoSchema:()=>l2,paginationArgsSchema:()=>xz,organizationIdField:()=>s40,normalizePerPage:()=>F4,metricsOrderBySchema:()=>CS0,metricsOrderByFieldSchema:()=>IS0,metricsFilterSchema:()=>_O,metricsAggregationSchema:()=>vn1,metricTypeSchema:()=>Pn1,metricRecordSchema:()=>N60,metricInputSchema:()=>Sn1,metadataField:()=>m_,logsOrderBySchema:()=>RS0,logsOrderByFieldSchema:()=>MS0,logsFilterSchema:()=>ES0,logRecordSchema:()=>U60,logRecordInputSchema:()=>gi1,logLevelSchema:()=>y_,listTracesResponseSchema:()=>y44,listTracesLightResponseSchema:()=>b44,listTracesArgsSchema:()=>lj,listScoresResponseSchema:()=>oi1,listScoresBySpanResponseSchema:()=>u44,listScoresArgsSchema:()=>V60,listMetricsResponseSchema:()=>xn1,listMetricsArgsSchema:()=>A60,listLogsResponseSchema:()=>ui1,listLogsArgsSchema:()=>H60,listFeedbackResponseSchema:()=>Dn1,listFeedbackArgsSchema:()=>D60,listBranchesResponseSchema:()=>h44,listBranchesArgsSchema:()=>Q90,lightSpanRecordSchema:()=>J90,jsonValueEquals:()=>$V,getTraceResponseSchema:()=>k44,getTraceLightResponseSchema:()=>x44,getTraceArgsSchema:()=>S44,getTagsResponseSchema:()=>Jr1,getTagsArgsSchema:()=>Gr1,getStructureResponseSchema:()=>jx0,getStringOrNull:()=>u5,getSqlType:()=>L90,getSpansResponseSchema:()=>T44,getSpansArgsSchema:()=>j44,getSpanResponseSchema:()=>_44,getSpanArgsSchema:()=>w44,getServiceNamesResponseSchema:()=>$r1,getServiceNamesArgsSchema:()=>en1,getScoreTimeSeriesResponseSchema:()=>Gn1,getScoreTimeSeriesArgsSchema:()=>Xn1,getScorePercentilesResponseSchema:()=>Qn1,getScorePercentilesArgsSchema:()=>Jn1,getScoreBreakdownResponseSchema:()=>Yn1,getScoreBreakdownArgsSchema:()=>$n1,getScoreAggregateResponseSchema:()=>ei1,getScoreAggregateArgsSchema:()=>ti1,getRootSpanResponseSchema:()=>C44,getRootSpanArgsSchema:()=>I44,getObjectOrNull:()=>nx0,getMetricTimeSeriesResponseSchema:()=>mn1,getMetricTimeSeriesArgsSchema:()=>gn1,getMetricPercentilesResponseSchema:()=>pn1,getMetricPercentilesArgsSchema:()=>un1,getMetricNamesResponseSchema:()=>cn1,getMetricNamesArgsSchema:()=>dn1,getMetricLabelValuesResponseSchema:()=>rn1,getMetricLabelValuesArgsSchema:()=>nn1,getMetricLabelKeysResponseSchema:()=>in1,getMetricLabelKeysArgsSchema:()=>ln1,getMetricBreakdownResponseSchema:()=>fn1,getMetricBreakdownArgsSchema:()=>hn1,getMetricAggregateResponseSchema:()=>bn1,getMetricAggregateArgsSchema:()=>yn1,getFeedbackTimeSeriesResponseSchema:()=>Mn1,getFeedbackTimeSeriesArgsSchema:()=>En1,getFeedbackPercentilesResponseSchema:()=>qn1,getFeedbackPercentilesArgsSchema:()=>Rn1,getFeedbackBreakdownResponseSchema:()=>On1,getFeedbackBreakdownArgsSchema:()=>Bn1,getFeedbackAggregateResponseSchema:()=>An1,getFeedbackAggregateArgsSchema:()=>Nn1,getEnvironmentsResponseSchema:()=>Xr1,getEnvironmentsArgsSchema:()=>Yr1,getEntityTypesResponseSchema:()=>sn1,getEntityTypesArgsSchema:()=>an1,getEntityNamesResponseSchema:()=>tn1,getEntityNamesArgsSchema:()=>on1,getDefaultValue:()=>$64,getBranchResponseSchema:()=>v44,getBranchArgsSchema:()=>G90,filterByDateRange:()=>z90,feedbackRecordSchema:()=>L60,feedbackOrderBySchema:()=>jS0,feedbackOrderByFieldSchema:()=>_S0,feedbackInputSchema:()=>Zn1,feedbackFilterSchema:()=>i_,extractBranchSpans:()=>vg,experimentIdField:()=>g_,executionSourceField:()=>G60,environmentField:()=>X60,entityTypeField:()=>iL,entityNameField:()=>r40,entityIdField:()=>LS0,ensureDate:()=>i7,distinctColumnSchema:()=>Cf,dbTimestamps:()=>RO,dateRangeSchema:()=>lL,createdAtField:()=>KS0,createVectorErrorId:()=>lx0,createStoreErrorId:()=>F90,createStorageErrorId:()=>w0,createSpanRecordSchema:()=>kg,createSpanArgsSchema:()=>q44,createScoreResponseSchema:()=>ai1,createScoreRecordSchema:()=>If,createScoreBodySchema:()=>ri1,createScoreArgsSchema:()=>ni1,createMetricRecordSchema:()=>TS0,createLogRecordSchema:()=>OS0,createFeedbackResponseSchema:()=>Vn1,createFeedbackRecordSchema:()=>Un1,createFeedbackBodySchema:()=>zn1,createFeedbackArgsSchema:()=>Hn1,contextFields:()=>p_,computeTraceStatus:()=>_x0,comparePeriodSchema:()=>Tf,commonFilterFields:()=>d_,calculatePagination:()=>B4,buildUpdateSpanRecord:()=>G64,buildStorageSchema:()=>yx0,buildScoreRecord:()=>W64,buildMetricRecord:()=>J64,buildLogRecord:()=>Q64,buildFeedbackRecord:()=>K64,buildCreateSpanRecord:()=>X64,branchesOrderBySchema:()=>xx0,branchesOrderByFieldSchema:()=>vx0,branchesFilterSchema:()=>kx0,batchUpdateSpansArgsSchema:()=>g44,batchDeleteTracesArgsSchema:()=>m44,batchCreateSpansArgsSchema:()=>P44,batchCreateScoresArgsSchema:()=>si1,batchCreateMetricsArgsSchema:()=>kn1,batchCreateLogsArgsSchema:()=>mi1,batchCreateFeedbackArgsSchema:()=>Fn1,aggregationTypeSchema:()=>i2,aggregationIntervalSchema:()=>yz,WorkspacesStorage:()=>gj,WorkflowsStorage:()=>Gm,WorkflowsInMemory:()=>Gy0,WORKSPACE_VERSIONS_SCHEMA:()=>dg,WORKSPACES_SCHEMA:()=>pg,VersionedStorageDomain:()=>QG,TraceStatus:()=>VD,TABLE_WORKSPACE_VERSIONS:()=>d7,TABLE_WORKSPACES:()=>WJ,TABLE_WORKFLOW_SNAPSHOT:()=>L$,TABLE_TRACES:()=>bx0,TABLE_THREADS:()=>OX,TABLE_SPANS:()=>H6,TABLE_SKILL_VERSIONS:()=>_7,TABLE_SKILL_BLOBS:()=>KJ,TABLE_SKILLS:()=>cY,TABLE_SCORER_DEFINITION_VERSIONS:()=>m7,TABLE_SCORER_DEFINITIONS:()=>wQ,TABLE_SCORERS:()=>D$,TABLE_SCHEMAS:()=>F5,TABLE_SCHEDULE_TRIGGERS:()=>bZ,TABLE_SCHEDULES:()=>EX,TABLE_RESOURCES:()=>y3,TABLE_PROMPT_BLOCK_VERSIONS:()=>w7,TABLE_PROMPT_BLOCKS:()=>PQ,TABLE_OBSERVATIONAL_MEMORY:()=>hx0,TABLE_MESSAGES:()=>T5,TABLE_MCP_SERVER_VERSIONS:()=>p7,TABLE_MCP_SERVERS:()=>QJ,TABLE_MCP_CLIENT_VERSIONS:()=>u7,TABLE_MCP_CLIENTS:()=>JJ,TABLE_FAVORITES:()=>zG,TABLE_EXPERIMENT_RESULTS:()=>c7,TABLE_EXPERIMENTS:()=>iY,TABLE_DATASET_VERSIONS:()=>lY,TABLE_DATASET_ITEMS:()=>P8,TABLE_DATASETS:()=>D8,TABLE_CONFIGS:()=>n44,TABLE_CHANNEL_INSTALLATIONS:()=>VG,TABLE_CHANNEL_CONFIG:()=>hZ,TABLE_BACKGROUND_TASKS:()=>l7,TABLE_AGENT_VERSIONS:()=>m5,TABLE_AGENTS:()=>N$,StoreOperationsInMemory:()=>z64,StoreOperations:()=>Wy0,StorageDomain:()=>qW,SkillsStorage:()=>fj,ScoresStorage:()=>Xm,ScoresInMemory:()=>Xy0,ScorerDefinitionsStorage:()=>hj,SchedulesStorage:()=>Ym,STORAGE_VISIBILITY_VALUES:()=>c44,STORAGE_FAVORITE_ENTITY_TYPES:()=>l44,SPAN_SCHEMA:()=>nj,SKILL_VERSIONS_SCHEMA:()=>oj,SKILL_BLOBS_SCHEMA:()=>cg,SKILLS_SCHEMA:()=>aj,SCORER_DEFINITION_VERSIONS_SCHEMA:()=>hg,SCORER_DEFINITIONS_SCHEMA:()=>bg,SCORERS_SCHEMA:()=>ij,PromptBlocksStorage:()=>bj,PROMPT_BLOCK_VERSIONS_SCHEMA:()=>rj,PROMPT_BLOCKS_SCHEMA:()=>yg,ObservabilityStorage:()=>rg,ObservabilityInMemory:()=>ix0,OLD_SPAN_SCHEMA:()=>i44,OBSERVATIONAL_MEMORY_TABLE_SCHEMA:()=>r44,OBSERVATIONAL_MEMORY_SCHEMA:()=>fx0,MockStore:()=>Z64,MemoryStorage:()=>$m,MastraStorage:()=>ki1,MastraCompositeStore:()=>cL,METRIC_DISTINCT_COLUMNS:()=>SS0,MCP_SERVER_VERSIONS_SCHEMA:()=>ug,MCP_SERVERS_SCHEMA:()=>mg,MCP_CLIENT_VERSIONS_SCHEMA:()=>gg,MCP_CLIENTS_SCHEMA:()=>fg,MCPServersStorage:()=>yj,MCPClientsStorage:()=>uj,InMemoryWorkspacesStorage:()=>i80,InMemoryStore:()=>Jy0,InMemorySkillsStorage:()=>c80,InMemoryScorerDefinitionsStorage:()=>p80,InMemorySchedulesStorage:()=>Yy0,InMemoryPromptBlocksStorage:()=>m80,InMemoryMemory:()=>$y0,InMemoryMCPServersStorage:()=>f80,InMemoryMCPClientsStorage:()=>t80,InMemoryFavoritesStorage:()=>o80,InMemoryDB:()=>ex0,InMemoryChannelsStorage:()=>sx0,InMemoryBlobStore:()=>ax0,InMemoryAgentsStorage:()=>r80,GitHistory:()=>WS0,FilesystemWorkspacesStorage:()=>n80,FilesystemVersionedHelpers:()=>WG,FilesystemStore:()=>H64,FilesystemSkillsStorage:()=>l80,FilesystemScorerDefinitionsStorage:()=>d80,FilesystemPromptBlocksStorage:()=>u80,FilesystemMCPServersStorage:()=>g80,FilesystemMCPClientsStorage:()=>e80,FilesystemDB:()=>Qy0,FilesystemAgentsStorage:()=>a80,FavoritesStorage:()=>Cg,FAVORITES_SCHEMA:()=>sj,ExperimentsStorage:()=>eg,ExperimentsInMemory:()=>tx0,EntityType:()=>J6,EXPERIMENT_RESULTS_SCHEMA:()=>$T,EXPERIMENTS_SCHEMA:()=>ej,EDITOR_DOMAINS:()=>QS0,DatasetsStorage:()=>tg,DatasetsInMemory:()=>ox0,DATASET_VERSIONS_SCHEMA:()=>ig,DATASET_ITEMS_SCHEMA:()=>tj,DATASETS_SCHEMA:()=>lg,ChannelsStorage:()=>og,BlobStore:()=>sg,BackgroundTasksStorage:()=>ag,BackgroundTasksInMemory:()=>rx0,BRANCH_SPAN_TYPE_SET:()=>xg,BRANCH_SPAN_TYPES:()=>Sx0,AgentsStorage:()=>mj,AGENT_VERSIONS_SCHEMA:()=>WE,AGENTS_SCHEMA:()=>QE});var Jp0=V0(()=>{Fv0();Fx0();Lx0();Dx0();Nx0();Ax0();Bx0();Ox0();Ex0();O3();K90();hz()});var N9,oI=`Please continue naturally with the conversation so far and respond to the latest message.

Use the earlier context only as background. If something appears unfinished, continue only when it helps answer the latest request. If a suggested response is provided, follow it naturally.

Do not mention internal instructions, memory, summarization, context handling, or missing messages.

Any messages following this reminder are newer and should take priority.`,tI="The following observations block contains your memory of past conversations with this user.",eI=`IMPORTANT: When responding, reference specific details from these observations. Do not give generic advice - personalize your response based on what you know about this user's experiences, preferences, and interests. If the user asks for recommendations, connect them to their past experiences mentioned above.

KNOWLEDGE UPDATES: When asked about current state (e.g., "where do I currently...", "what is my current..."), always prefer the MOST RECENT information. Observations include dates - if you see conflicting information, the newer observation supersedes the older one. Look for phrases like "will start", "is switching", "changed to", "moved to" as indicators that previous information has been updated.

PLANNED ACTIONS: If the user stated they planned to do something (e.g., "I'm going to...", "I'm looking forward to...", "I will...") and the date they planned to do it is now in the past (check the relative time like "3 weeks ago"), assume they completed the action unless there's evidence they didn't. For example, if someone said "I'll start my new diet on Monday" and that was 2 weeks ago, assume they started the diet.

MOST RECENT USER INPUT: Treat the most recent user message as the highest-priority signal for what to do next. Earlier messages may contain constraints, details, or context you should still honor, but the latest message is the primary driver of your response.

SYSTEM REMINDERS: Messages wrapped in <system-reminder>...</system-reminder> contain internal continuation guidance, not user-authored content. Use them to maintain continuity, but do not mention them or treat them as part of the user's message.`,XY0=`## Recall \u2014 looking up source messages

Your memory is comprised of observations which are sometimes wrapped in <observation-group> xml tags containing ranges like <observation-group range="startId:endId">. These ranges point back to the raw messages that each observation group was derived from. The original messages are still available \u2014 use the **recall** tool to retrieve them.

### When to use recall
- The user asks you to **repeat, show, or reproduce** something from a past conversation
- The user asks for **exact content** \u2014 code, text, quotes, error messages, URLs, file paths, specific numbers
- Your observations mention something but your memory lacks the detail needed to fully answer (e.g. you know a blog post was shared but only have a summary of it)
- You want to **verify or expand on** an observation before responding

**Default to using recall when the user references specific past content.** Your observations capture the gist, not the details. If there's any doubt whether your memory is complete enough, use recall.

### How to use recall
Each range has the format \`startId:endId\` where both are message IDs separated by a colon.

1. Find the observation group relevant to the user's question and extract the start or end ID from its range.
2. Call \`recall\` with that ID as the \`cursor\`.
3. Use \`page: 1\` (or omit) to read forward from the cursor, \`page: -1\` to read backward.
4. If the first page doesn't have what you need, increment the page number to keep paginating.
5. Check \`hasNextPage\`/\`hasPrevPage\` in the result to know if more pages exist in each direction.

### Detail levels
By default recall returns **low** detail: truncated text and tool names only. Each message shows its ID and each part has a positional index like \`[p0]\`, \`[p1]\`, etc.

- Use \`detail: "high"\` to get full message content including tool arguments and results. This will only return the high detail version of a single message part at a time.
- Use \`partIndex\` with a cursor to fetch a single part at full detail \u2014 for example, to read one specific tool result or code block without loading every part.

If the result says \`truncated: true\`, the output was cut to fit the token budget. You can paginate or use \`partIndex\` to target specific content.

### Following up on truncated parts
Low-detail results may include truncation hints like:
\`[truncated \u2014 call recall cursor="..." partIndex=N detail="high" for full content]\`

**When you see these hints and need the full content, make the exact call described in the hint.** This is the normal workflow: first recall at low detail to scan, then drill into specific parts at high detail. Do not stop at the low-detail result if the user asked for exact content.

### When recall is NOT needed
- The user is asking for a high-level summary and your observations already cover it
- The question is about general preferences or facts that don't require source text
- There is no relevant range in your observations for the topic

Observation groups with range IDs and your recall tool allows you to think back and remember details you're fuzzy on.`;var GY0=V0(()=>{N9={observation:{model:"google/gemini-2.5-flash",messageTokens:30000,modelSettings:{temperature:0.3,maxOutputTokens:1e5},providerOptions:{google:{thinkingConfig:{thinkingBudget:215}}},maxTokensPerBatch:1e4,bufferTokens:0.2,bufferActivation:0.8},reflection:{model:"google/gemini-2.5-flash",observationTokens:40000,modelSettings:{temperature:0,maxOutputTokens:1e5},providerOptions:{google:{thinkingConfig:{thinkingBudget:1024}}},bufferActivation:0.5}}});var MM;var Up0=V0(()=>{MM=new Set(["observationalMemory","asyncBuffering","request-response-id-rotation","workspaces-v1","datasets","observability:v1.13.2","channels","deploy-diagnosis","model-inference-span"])});var qD4=V0(()=>{gb0()});var Hp0=V0(()=>{Uj()});var PD4=V0(()=>{Uj()});var zp0=V0(()=>{n_();TO();hz()});function xQ($,Y,X=0,G=!1){let Q=`readUInt${Y}${G?"BE":"LE"}`;return sZ9[Q]($,X)}function oZ9($,Y){if($.length-Y<4)return;let X=tY($,Y);if($.length-Y<X)return;return{name:N5($,4+Y,8+Y),offset:Y,size:X}}function UK($,Y,X){while(X<$.length){let G=oZ9($,X);if(!G)break;if(G.name===Y)return G;X+=G.size>0?G.size:8}}function jD4($,Y){let X=$[Y];return X===0?256:X}function TD4($,Y){let X=$U9+Y*YU9;return{height:jD4($,X+1),width:jD4($,X)}}function FU9($,Y){let X=Y+zU9;return[N5($,Y,X),tY($,X)]}function LU9($){let Y=VU9[$];return{width:Y,height:Y,type:$}}function PU9($){return $C($,2,6)===BU9}function wU9($,Y){return{height:QY0($,Y),width:QY0($,Y+2)}}function _U9($,Y){let G=Fp0+8,J=xQ($,16,G,Y);for(let Q=0;Q<J;Q++){let W=G+qU9+Q*ID4,K=W+ID4;if(W>$.length)return;let Z=$.slice(W,K);if(xQ(Z,16,0,Y)===274){if(xQ(Z,16,2,Y)!==3)return;if(xQ(Z,32,4,Y)!==1)return;return xQ(Z,16,8,Y)}}}function jU9($,Y){let X=$.slice(OU9,Y),G=$C(X,Fp0,Fp0+EU9),J=G===MU9;if(J||G===RU9)return _U9(X,J)}function TU9($,Y){if(Y>$.length)throw TypeError("Corrupt JPG, exceeded buffer limits")}function xD4($,Y){if(Y)return 8*(1+$.getBits(5));let X=$.getBits(2),G=[9,13,18,30][X];return 1+$.getBits(G)}function SU9($,Y,X,G){if(Y&&X===0)return 8*(1+$.getBits(5));if(X===0)return xD4($,!1);return Math.floor(G*[1,1.2,1.3333333333333333,1.5,1.7777777777777777,1.25,2][X-1])}function kU9($){let Y=UK($,"jxlc",0);if(Y)return $.slice(Y.offset+8,Y.offset+Y.size);let X=vU9($);if(X.length>0)return xU9(X);return}function vU9($){let Y=[],X=0;while(X<$.length){let G=UK($,"jxlp",X);if(!G)break;Y.push($.slice(G.offset+12,G.offset+G.size)),X=G.offset+G.size}return Y}function xU9($){let Y=$.reduce((J,Q)=>J+Q.length,0),X=new Uint8Array(Y),G=0;for(let J of $)X.set(J,G),G+=J.length;return X}function WY0($){let Y=pU9.exec($);if(!Y)return;return Math.round(Number(Y[1])*(hD4[Y[2]]||1))}function dU9($){let Y=$.split(" ");return{height:WY0(Y[3]),width:WY0(Y[2])}}function cU9($){let Y=$.match(JY0.width),X=$.match(JY0.height),G=$.match(JY0.viewbox);return{height:X&&WY0(X[2]),viewbox:G&&dU9(G[2]),width:Y&&WY0(Y[2])}}function lU9($){return{height:$.height,width:$.width}}function iU9($,Y){let X=Y.width/Y.height;if($.width)return{height:Math.floor($.width/X),width:$.width};if($.height)return{height:$.height,width:Math.floor($.height*X)};return{height:Y.height,width:Y.width}}function aU9($,{isBigEndian:Y,isBigTiff:X}){let G=X?Number(Lp0($,8,Y)):xQ($,32,4,Y),J=X?bQ.COUNT_SIZE.BIG:bQ.COUNT_SIZE.STANDARD;return $.slice(G+J)}function sU9($,Y,X,G){switch(Y){case bQ.TYPE.SHORT:return xQ($,16,X,G);case bQ.TYPE.LONG:return xQ($,32,X,G);case bQ.TYPE.LONG8:{let J=Number(Lp0($,X,G));if(J>Number.MAX_SAFE_INTEGER)throw TypeError("Value too large");return J}default:return 0}}function oU9($,Y){let X=Y?bQ.ENTRY_SIZE.BIG:bQ.ENTRY_SIZE.STANDARD;if($.length>X)return $.slice(X)}function tU9($,{isBigEndian:Y,isBigTiff:X}){let G={},J=$;while(J?.length){let Q=xQ(J,16,0,Y),W=xQ(J,16,2,Y),K=X?Number(Lp0(J,4,Y)):xQ(J,32,4,Y);if(Q===0)break;if(K===1&&(W===bQ.TYPE.SHORT||W===bQ.TYPE.LONG||X&&W===bQ.TYPE.LONG8)){let Z=X?12:8;G[Q]=sU9(J,W,Z,Y)}J=oU9(J,X)}return G}function eU9($){let Y=N5($,0,2),X=xQ($,16,2,Y==="MM");return{isBigEndian:Y==="MM",isBigTiff:X===43}}function $39($,Y){let X=xQ($,16,4,Y),G=xQ($,16,6,Y);if(X!==8||G!==0)throw TypeError("Invalid BigTIFF header")}function G39($){return{height:1+_D4($,7),width:1+_D4($,4)}}function J39($){return{height:1+(($[4]&15)<<10|$[3]<<2|($[2]&192)>>6),width:1+(($[2]&63)<<8|$[1])}}function Q39($){return{height:wD4($,8)&16383,width:wD4($,6)&16383}}function U39($){let Y=$[0],X=Z39.get(Y);if(X&&KY0.get(X).validate($))return X;return K39.find((G)=>KY0.get(G).validate($))}function fD4($){let Y=U39($);if(typeof Y<"u"){if(H39.disabledTypes.indexOf(Y)>-1)throw TypeError(`disabled file type: ${Y}`);let X=KY0.get(Y).calculate($);if(X!==void 0){if(X.type=X.type??Y,X.images&&X.images.length>1){let G=X.images.reduce((J,Q)=>{return Q.width*Q.height>J.width*J.height?Q:J},X.images[0]);X.width=G.width,X.height=G.height}return X}}throw TypeError(`unsupported file type: ${Y}`)}var rZ9,N5=($,Y=0,X=$.length)=>rZ9.decode($.slice(Y,X)),$C=($,Y=0,X=$.length)=>$.slice(Y,X).reduce((G,J)=>G+`0${J.toString(16)}`.slice(-2),""),oD=($,Y)=>new DataView($.buffer,$.byteOffset+Y),wD4=($,Y=0)=>oD($,Y).getInt16(0,!0),QY0=($,Y=0)=>oD($,Y).getUint16(0,!1),yQ=($,Y=0)=>oD($,Y).getUint16(0,!0),_D4=($,Y=0)=>{let X=oD($,Y);return X.getUint16(0,!0)+(X.getUint8(2)<<16)},aZ9=($,Y=0)=>oD($,Y).getInt32(0,!0),tY=($,Y=0)=>oD($,Y).getUint32(0,!1),RM=($,Y=0)=>oD($,Y).getUint32(0,!0),Lp0=($,Y,X)=>oD($,Y).getBigUint64(0,!X),sZ9,tZ9,eZ9=1,$U9=6,YU9=16,vD4,XU9=2,GU9,JU9,QU9,WU9,KU9,ZU9,UU9=8,HU9=4,zU9=4,VU9,DU9,NU9,AU9,BU9="45786966",OU9=2,Fp0=6,EU9=2,MU9="4d4d",RU9="4949",ID4=12,qU9=2,IU9,CU9=class{constructor($,Y){this.input=$,this.endianness=Y,this.byteOffset=2,this.bitOffset=0}getBits($=1){let Y=0,X=0;while(X<$){if(this.byteOffset>=this.input.length)throw Error("Reached end of input");let G=this.input[this.byteOffset],J=8-this.bitOffset,Q=Math.min($-X,J);if(this.endianness==="little-endian"){let W=(1<<Q)-1,K=G>>this.bitOffset&W;Y|=K<<X}else{let W=(1<<Q)-1<<8-this.bitOffset-Q,K=(G&W)>>8-this.bitOffset-Q;Y=Y<<Q|K}if(X+=Q,this.bitOffset+=Q,this.bitOffset===8)this.byteOffset++,this.bitOffset=0}return Y}},yD4,yU9,bU9,hU9=`PNG\r
\x1A
`,fU9="IHDR",CD4="CgBI",gU9,SD4,kD4,mU9,uU9,bD4,JY0,Vp0=2.54,hD4,pU9,nU9,rU9,bQ,Y39,X39,W39,KY0,K39,Z39,H39;var gD4=V0(()=>{rZ9=new TextDecoder,sZ9={readUInt16BE:QY0,readUInt16LE:yQ,readUInt32BE:tY,readUInt32LE:RM};tZ9={validate:($)=>N5($,0,2)==="BM",calculate:($)=>({height:Math.abs(aZ9($,22)),width:RM($,18)})};vD4={validate($){let Y=yQ($,0),X=yQ($,4);if(Y!==0||X===0)return!1;return yQ($,2)===eZ9},calculate($){let Y=yQ($,4),X=TD4($,0);if(Y===1)return X;let G=[];for(let J=0;J<Y;J+=1)G.push(TD4($,J));return{width:X.width,height:X.height,images:G}}},GU9={validate($){let Y=yQ($,0),X=yQ($,4);if(Y!==0||X===0)return!1;return yQ($,2)===XU9},calculate:($)=>vD4.calculate($)},JU9={validate:($)=>RM($,0)===542327876,calculate:($)=>({height:RM($,12),width:RM($,16)})},QU9=/^GIF8[79]a/,WU9={validate:($)=>QU9.test(N5($,0,6)),calculate:($)=>({height:yQ($,8),width:yQ($,6)})},KU9={avif:"avif",mif1:"heif",msf1:"heif",heic:"heic",heix:"heic",hevc:"heic",hevx:"heic"},ZU9={validate($){if(N5($,4,8)!=="ftyp")return!1;let X=UK($,"ftyp",0);if(!X)return!1;return N5($,X.offset+8,X.offset+12)in KU9},calculate($){let Y=UK($,"meta",0),X=Y&&UK($,"iprp",Y.offset+12),G=X&&UK($,"ipco",X.offset+8);if(!G)throw TypeError("Invalid HEIF, no ipco box found");let J=N5($,8,12),Q=[],W=G.offset+8;while(W<G.offset+G.size){let K=UK($,"ispe",W);if(!K)break;let Z=tY($,K.offset+12),H=tY($,K.offset+16),z=UK($,"clap",W),V=Z,F=H;if(z&&z.offset<G.offset+G.size){let L=tY($,z.offset+12);V=Z-L}Q.push({height:F,width:V}),W=K.offset+K.size}if(Q.length===0)throw TypeError("Invalid HEIF, no sizes found");return{width:Q[0].width,height:Q[0].height,type:J,...Q.length>1?{images:Q}:{}}}},VU9={ICON:32,"ICN#":32,"icm#":16,icm4:16,icm8:16,"ics#":16,ics4:16,ics8:16,is32:16,s8mk:16,icp4:16,icl4:32,icl8:32,il32:32,l8mk:32,icp5:32,ic11:32,ich4:48,ich8:48,ih32:48,h8mk:48,icp6:64,ic12:32,it32:128,t8mk:128,ic07:128,ic08:256,ic13:256,ic09:512,ic14:512,ic10:1024};DU9={validate:($)=>N5($,0,4)==="icns",calculate($){let Y=$.length,X=tY($,HU9),G=UU9,J=[];while(G<X&&G<Y){let Q=FU9($,G),W=LU9(Q[0]);J.push(W),G+=Q[1]}if(J.length===0)throw TypeError("Invalid ICNS, no sizes found");return{width:J[0].width,height:J[0].height,...J.length>1?{images:J}:{}}}},NU9={validate:($)=>tY($,0)===4283432785,calculate:($)=>({height:tY($,12),width:tY($,8)})},AU9={validate($){if(N5($,4,8)!=="jP  ")return!1;let X=UK($,"ftyp",0);if(!X)return!1;return N5($,X.offset+8,X.offset+12)==="jp2 "},calculate($){let Y=UK($,"jp2h",0),X=Y&&UK($,"ihdr",Y.offset+8);if(X)return{height:tY($,X.offset+8),width:tY($,X.offset+12)};throw TypeError("Unsupported JPEG 2000 format")}};IU9={validate:($)=>$C($,0,2)==="ffd8",calculate($){let Y=$.slice(4),X,G;while(Y.length){let J=QY0(Y,0);if(TU9(Y,J),Y[J]!==255){Y=Y.slice(1);continue}if(PU9(Y))X=jU9(Y,J);if(G=Y[J+1],G===192||G===193||G===194){let Q=wU9(Y,J+5);if(!X)return Q;return{height:Q.height,orientation:X,width:Q.width}}Y=Y.slice(J+2)}throw TypeError("Invalid JPG, no size found")}};yD4={validate:($)=>{return $C($,0,2)==="ff0a"},calculate($){let Y=new CU9($,"little-endian"),X=Y.getBits(1)===1,G=xD4(Y,X),J=Y.getBits(3);return{width:SU9(Y,X,J,G),height:G}}};yU9={validate:($)=>{if(N5($,4,8)!=="JXL ")return!1;let X=UK($,"ftyp",0);if(!X)return!1;return N5($,X.offset+8,X.offset+12)==="jxl "},calculate($){let Y=kU9($);if(Y)return yD4.calculate(Y);throw Error("No codestream found in JXL container")}},bU9={validate:($)=>{let Y=N5($,1,7);return["KTX 11","KTX 20"].includes(Y)},calculate:($)=>{let Y=$[5]===49?"ktx":"ktx2",X=Y==="ktx"?36:20;return{height:RM($,X+4),width:RM($,X),type:Y}}},gU9={validate($){if(hU9===N5($,1,8)){let Y=N5($,12,16);if(Y===CD4)Y=N5($,28,32);if(Y!==fU9)throw TypeError("Invalid PNG");return!0}return!1},calculate($){if(N5($,12,16)===CD4)return{height:tY($,36),width:tY($,32)};return{height:tY($,20),width:tY($,16)}}},SD4={P1:"pbm/ascii",P2:"pgm/ascii",P3:"ppm/ascii",P4:"pbm",P5:"pgm",P6:"ppm",P7:"pam",PF:"pfm"},kD4={default:($)=>{let Y=[];while($.length>0){let X=$.shift();if(X[0]==="#")continue;Y=X.split(" ");break}if(Y.length===2)return{height:Number.parseInt(Y[1],10),width:Number.parseInt(Y[0],10)};throw TypeError("Invalid PNM")},pam:($)=>{let Y={};while($.length>0){let X=$.shift();if(X.length>16||X.charCodeAt(0)>128)continue;let[G,J]=X.split(" ");if(G&&J)Y[G.toLowerCase()]=Number.parseInt(J,10);if(Y.height&&Y.width)break}if(Y.height&&Y.width)return{height:Y.height,width:Y.width};throw TypeError("Invalid PAM")}},mU9={validate:($)=>(N5($,0,2)in SD4),calculate($){let Y=N5($,0,2),X=SD4[Y],G=N5($,3).split(/[\r\n]+/);return(kD4[X]||kD4.default)(G)}},uU9={validate:($)=>N5($,0,4)==="8BPS",calculate:($)=>({height:tY($,14),width:tY($,18)})},bD4=/<svg\s([^>"']|"[^"]*"|'[^']*')*>/,JY0={height:/\sheight=(['"])([^%]+?)\1/,root:bD4,viewbox:/\sviewBox=(['"])(.+?)\1/i,width:/\swidth=(['"])([^%]+?)\1/},hD4={in:96,cm:96/Vp0,em:16,ex:8,m:96/Vp0*100,mm:96/Vp0/10,pc:0.1111111111111111,pt:1.3333333333333333,px:1},pU9=new RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(hD4).join("|")})?$`);nU9={validate:($)=>bD4.test(N5($,0,1000)),calculate($){let Y=N5($).match(JY0.root);if(Y){let X=cU9(Y[0]);if(X.width&&X.height)return lU9(X);if(X.viewbox)return iU9(X,X.viewbox)}throw TypeError("Invalid SVG")}},rU9={validate($){return yQ($,0)===0&&yQ($,4)===0},calculate($){return{height:yQ($,14),width:yQ($,12)}}},bQ={TAG:{WIDTH:256,HEIGHT:257,COMPRESSION:259},TYPE:{SHORT:3,LONG:4,LONG8:16},ENTRY_SIZE:{STANDARD:12,BIG:20},COUNT_SIZE:{STANDARD:2,BIG:8}};Y39=new Set(["49492a00","4d4d002a","49492b00","4d4d002b"]),X39={validate:($)=>{let Y=$C($,0,4);return Y39.has(Y)},calculate($){let Y=eU9($);if(Y.isBigTiff)$39($,Y.isBigEndian);let X=aU9($,Y),G=tU9(X,Y),J={height:G[bQ.TAG.HEIGHT],width:G[bQ.TAG.WIDTH],type:Y.isBigTiff?"bigtiff":"tiff"};if(G[bQ.TAG.COMPRESSION])J.compression=G[bQ.TAG.COMPRESSION];if(!J.width||!J.height)throw TypeError("Invalid Tiff. Missing tags");return J}};W39={validate($){let Y=N5($,0,4)==="RIFF",X=N5($,8,12)==="WEBP",G=N5($,12,15)==="VP8";return Y&&X&&G},calculate($){let Y=N5($,12,16),X=$.slice(20,30);if(Y==="VP8X"){let J=X[0],Q=(J&192)===0,W=(J&1)===0;if(Q&&W)return G39(X);throw TypeError("Invalid WebP")}if(Y==="VP8 "&&X[0]!==47)return Q39(X);let G=$C(X,3,6);if(Y==="VP8L"&&G!=="9d012a")return J39(X);throw TypeError("Invalid WebP")}},KY0=new Map([["bmp",tZ9],["cur",GU9],["dds",JU9],["gif",WU9],["heif",ZU9],["icns",DU9],["ico",vD4],["j2c",NU9],["jp2",AU9],["jpg",IU9],["jxl",yU9],["jxl-stream",yD4],["ktx",bU9],["png",gU9],["pnm",mU9],["psd",uU9],["svg",nU9],["tga",rU9],["tiff",X39],["webp",W39]]),K39=Array.from(KY0.keys()),Z39=new Map([[0,"heif"],[56,"psd"],[66,"bmp"],[68,"dds"],[71,"gif"],[73,"tiff"],[77,"tiff"],[82,"webp"],[105,"icns"],[137,"png"],[255,"jpg"]]);H39={disabledTypes:[]}});var uD4=o((lE$,mD4)=>{var Op=1000,Ep=Op*60,Mp=Ep*60,Rp=Mp*24,z39=Rp*365.25;mD4.exports=function($,Y){Y=Y||{};var X=typeof $;if(X==="string"&&$.length>0)return V39($);else if(X==="number"&&isNaN($)===!1)return Y.long?L39($):F39($);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify($))};function V39($){if($=String($),$.length>100)return;var Y=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec($);if(!Y)return;var X=parseFloat(Y[1]),G=(Y[2]||"ms").toLowerCase();switch(G){case"years":case"year":case"yrs":case"yr":case"y":return X*z39;case"days":case"day":case"d":return X*Rp;case"hours":case"hour":case"hrs":case"hr":case"h":return X*Mp;case"minutes":case"minute":case"mins":case"min":case"m":return X*Ep;case"seconds":case"second":case"secs":case"sec":case"s":return X*Op;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return X;default:return}}function F39($){if($>=Rp)return Math.round($/Rp)+"d";if($>=Mp)return Math.round($/Mp)+"h";if($>=Ep)return Math.round($/Ep)+"m";if($>=Op)return Math.round($/Op)+"s";return $+"ms"}function L39($){return ZY0($,Rp,"day")||ZY0($,Mp,"hour")||ZY0($,Ep,"minute")||ZY0($,Op,"second")||$+" ms"}function ZY0($,Y,X){if($<Y)return;if($<Y*1.5)return Math.floor($/Y)+" "+X;return Math.ceil($/Y)+" "+X+"s"}});var Ap0=o((I9,pD4)=>{I9=pD4.exports=Np0.debug=Np0.default=Np0;I9.coerce=O39;I9.disable=A39;I9.enable=N39;I9.enabled=B39;I9.humanize=uD4();I9.names=[];I9.skips=[];I9.formatters={};var Dp0;function D39($){var Y=0,X;for(X in $)Y=(Y<<5)-Y+$.charCodeAt(X),Y|=0;return I9.colors[Math.abs(Y)%I9.colors.length]}function Np0($){function Y(){if(!Y.enabled)return;var X=Y,G=+new Date,J=G-(Dp0||G);X.diff=J,X.prev=Dp0,X.curr=G,Dp0=G;var Q=Array(arguments.length);for(var W=0;W<Q.length;W++)Q[W]=arguments[W];if(Q[0]=I9.coerce(Q[0]),typeof Q[0]!=="string")Q.unshift("%O");var K=0;Q[0]=Q[0].replace(/%([a-zA-Z%])/g,function(H,z){if(H==="%%")return H;K++;var V=I9.formatters[z];if(typeof V==="function"){var F=Q[K];H=V.call(X,F),Q.splice(K,1),K--}return H}),I9.formatArgs.call(X,Q);var Z=Y.log||I9.log||console.log.bind(console);Z.apply(X,Q)}if(Y.namespace=$,Y.enabled=I9.enabled($),Y.useColors=I9.useColors(),Y.color=D39($),typeof I9.init==="function")I9.init(Y);return Y}function N39($){I9.save($),I9.names=[],I9.skips=[];var Y=(typeof $==="string"?$:"").split(/[\s,]+/),X=Y.length;for(var G=0;G<X;G++){if(!Y[G])continue;if($=Y[G].replace(/\*/g,".*?"),$[0]==="-")I9.skips.push(new RegExp("^"+$.substr(1)+"$"));else I9.names.push(new RegExp("^"+$+"$"))}}function A39(){I9.enable("")}function B39($){var Y,X;for(Y=0,X=I9.skips.length;Y<X;Y++)if(I9.skips[Y].test($))return!1;for(Y=0,X=I9.names.length;Y<X;Y++)if(I9.names[Y].test($))return!0;return!1}function O39($){if($ instanceof Error)return $.stack||$.message;return $}});var lD4=o((qJ,cD4)=>{qJ=cD4.exports=Ap0();qJ.log=R39;qJ.formatArgs=M39;qJ.save=q39;qJ.load=dD4;qJ.useColors=E39;qJ.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:P39();qJ.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function E39(){if(typeof window<"u"&&window.process&&window.process.type==="renderer")return!0;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}qJ.formatters.j=function($){try{return JSON.stringify($)}catch(Y){return"[UnexpectedJSONParseError]: "+Y.message}};function M39($){var Y=this.useColors;if($[0]=(Y?"%c":"")+this.namespace+(Y?" %c":" ")+$[0]+(Y?"%c ":" ")+"+"+qJ.humanize(this.diff),!Y)return;var X="color: "+this.color;$.splice(1,0,X,"color: inherit");var G=0,J=0;$[0].replace(/%[a-zA-Z%]/g,function(Q){if(Q==="%%")return;if(G++,Q==="%c")J=G}),$.splice(J,0,X)}function R39(){return typeof console==="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function q39($){try{if($==null)qJ.storage.removeItem("debug");else qJ.storage.debug=$}catch(Y){}}function dD4(){var $;try{$=qJ.storage.debug}catch(Y){}if(!$&&typeof process<"u"&&"env"in process)$=process.env.DEBUG;return $}qJ.enable(dD4());function P39(){try{return window.localStorage}catch($){}}});var aD4=o((eY,rD4)=>{var iD4=A0("tty"),qp=A0("util");eY=rD4.exports=Ap0();eY.init=S39;eY.log=T39;eY.formatArgs=j39;eY.save=I39;eY.load=nD4;eY.useColors=_39;eY.colors=[6,2,3,4,5,1];eY.inspectOpts=Object.keys(process.env).filter(function($){return/^debug_/i.test($)}).reduce(function($,Y){var X=Y.substring(6).toLowerCase().replace(/_([a-z])/g,function(J,Q){return Q.toUpperCase()}),G=process.env[Y];if(/^(yes|on|true|enabled)$/i.test(G))G=!0;else if(/^(no|off|false|disabled)$/i.test(G))G=!1;else if(G==="null")G=null;else G=Number(G);return $[X]=G,$},{});var YC=parseInt(process.env.DEBUG_FD,10)||2;if(YC!==1&&YC!==2)qp.deprecate(function(){},"except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();var w39=YC===1?process.stdout:YC===2?process.stderr:C39(YC);function _39(){return"colors"in eY.inspectOpts?Boolean(eY.inspectOpts.colors):iD4.isatty(YC)}eY.formatters.o=function($){return this.inspectOpts.colors=this.useColors,qp.inspect($,this.inspectOpts).split(`
`).map(function(Y){return Y.trim()}).join(" ")};eY.formatters.O=function($){return this.inspectOpts.colors=this.useColors,qp.inspect($,this.inspectOpts)};function j39($){var Y=this.namespace,X=this.useColors;if(X){var G=this.color,J="  \x1B[3"+G+";1m"+Y+" \x1B[0m";$[0]=J+$[0].split(`
`).join(`
`+J),$.push("\x1B[3"+G+"m+"+eY.humanize(this.diff)+"\x1B[0m")}else $[0]=new Date().toUTCString()+" "+Y+" "+$[0]}function T39(){return w39.write(qp.format.apply(qp,arguments)+`
`)}function I39($){if($==null)delete process.env.DEBUG;else process.env.DEBUG=$}function nD4(){return process.env.DEBUG}function C39($){var Y,X=process.binding("tty_wrap");switch(X.guessHandleType($)){case"TTY":if(Y=new iD4.WriteStream($),Y._type="tty",Y._handle&&Y._handle.unref)Y._handle.unref();break;case"FILE":var G=A0("fs");Y=new G.SyncWriteStream($,{autoClose:!1}),Y._type="fs";break;case"PIPE":case"TCP":var J=A0("net");if(Y=new J.Socket({fd:$,readable:!1,writable:!0}),Y.readable=!1,Y.read=null,Y._type="pipe",Y._handle&&Y._handle.unref)Y._handle.unref();break;default:throw Error("Implement me. Unknown stream file type!")}return Y.fd=$,Y._isStdio=!0,Y}function S39($){$.inspectOpts={};var Y=Object.keys(eY.inspectOpts);for(var X=0;X<Y.length;X++)$.inspectOpts[Y[X]]=eY.inspectOpts[Y[X]]}eY.enable(nD4())});var sD4=o((iE$,Bp0)=>{if(typeof process<"u"&&process.type==="renderer")Bp0.exports=lD4();else Bp0.exports=aD4()});var JN4=o((nE$,GN4)=>{var XC=A0("assert"),tD=sD4()("stream-parser");GN4.exports=v39;var tD4=-1,UY0=0,k39=1,eD4=2;function v39($){var Y=$&&typeof $._transform=="function",X=$&&typeof $._write=="function";if(!Y&&!X)throw Error("must pass a Writable or Transform stream in");if(tD("extending Parser into stream"),$._bytes=x39,$._skipBytes=y39,Y)$._passthrough=b39;if(Y)$._transform=f39;else $._write=h39}function Pp($){if(tD("initializing parser stream"),$._parserBytesLeft=0,$._parserBuffers=[],$._parserBuffered=0,$._parserState=tD4,$._parserCallback=null,typeof $.push=="function")$._parserOutput=$.push.bind($);$._parserInit=!0}function x39($,Y){if(XC(!this._parserCallback,'there is already a "callback" set!'),XC(isFinite($)&&$>0,'can only buffer a finite number of bytes > 0, got "'+$+'"'),!this._parserInit)Pp(this);tD("buffering %o bytes",$),this._parserBytesLeft=$,this._parserCallback=Y,this._parserState=UY0}function y39($,Y){if(XC(!this._parserCallback,'there is already a "callback" set!'),XC($>0,'can only skip > 0 bytes, got "'+$+'"'),!this._parserInit)Pp(this);tD("skipping %o bytes",$),this._parserBytesLeft=$,this._parserCallback=Y,this._parserState=k39}function b39($,Y){if(XC(!this._parserCallback,'There is already a "callback" set!'),XC($>0,'can only pass through > 0 bytes, got "'+$+'"'),!this._parserInit)Pp(this);tD("passing through %o bytes",$),this._parserBytesLeft=$,this._parserCallback=Y,this._parserState=eD4}function h39($,Y,X){if(!this._parserInit)Pp(this);if(tD("write(%o bytes)",$.length),typeof Y=="function")X=Y;YN4(this,$,null,X)}function f39($,Y,X){if(!this._parserInit)Pp(this);if(tD("transform(%o bytes)",$.length),typeof Y!="function")Y=this._parserOutput;YN4(this,$,Y,X)}function $N4($,Y,X,G){if($._parserBytesLeft<=0)return G(Error("got data but not currently parsing anything"));if(Y.length<=$._parserBytesLeft)return function(){return oD4($,Y,X,G)};else return function(){var J=Y.slice(0,$._parserBytesLeft);return oD4($,J,X,function(Q){if(Q)return G(Q);if(Y.length>J.length)return function(){return $N4($,Y.slice(J.length),X,G)}})}}function oD4($,Y,X,G){if($._parserBytesLeft-=Y.length,tD("%o bytes left for stream piece",$._parserBytesLeft),$._parserState===UY0)$._parserBuffers.push(Y),$._parserBuffered+=Y.length;else if($._parserState===eD4)X(Y);if($._parserBytesLeft===0){var J=$._parserCallback;if(J&&$._parserState===UY0&&$._parserBuffers.length>1)Y=Buffer.concat($._parserBuffers,$._parserBuffered);if($._parserState!==UY0)Y=null;if($._parserCallback=null,$._parserBuffered=0,$._parserState=tD4,$._parserBuffers.splice(0),J){var Q=[];if(Y)Q.push(Y);if(X)Q.push(X);var W=J.length>Q.length;if(W)Q.push(XN4(G));var K=J.apply($,Q);if(!W||G===K)return G}}else return G}var YN4=XN4($N4);function XN4($){return function(){var Y=$.apply(this,arguments);while(typeof Y=="function")Y=Y();return Y}}});var P4=o((m39)=>{var QN4=A0("stream").Transform,g39=JN4();function wp(){QN4.call(this,{readableObjectMode:!0})}wp.prototype=Object.create(QN4.prototype);wp.prototype.constructor=wp;g39(wp.prototype);m39.ParserStream=wp;m39.sliceEq=function($,Y,X){for(var G=Y,J=0;J<X.length;)if($[G++]!==X[J++])return!1;return!0};m39.str2arr=function($,Y){var X=[],G=0;if(Y&&Y==="hex")while(G<$.length)X.push(parseInt($.slice(G,G+2),16)),G+=2;else for(;G<$.length;G++)X.push($.charCodeAt(G)&255);return X};m39.readUInt16LE=function($,Y){return $[Y]|$[Y+1]<<8};m39.readUInt16BE=function($,Y){return $[Y]<<8|$[Y+1]};m39.readInt16LE=function($,Y){return m39.readUInt16LE($,Y)<<16>>16};m39.readInt16BE=function($,Y){return m39.readUInt16BE($,Y)<<16>>16};m39.readUInt32LE=function($,Y){return($[Y]|$[Y+1]<<8|$[Y+2]<<16)+$[Y+3]*16777216};m39.readUInt32BE=function($,Y){return $[Y]*16777216+($[Y+1]<<16|$[Y+2]<<8|$[Y+3])};m39.readInt32LE=function($,Y){return m39.readUInt32LE($,Y)|0};m39.readInt32BE=function($,Y){return m39.readUInt32BE($,Y)|0};function HY0($,Y,X){if(Error.call(this),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||"";if(this.name=this.constructor.name,this.message=$,Y)this.code=Y;if(X)this.statusCode=X}HY0.prototype=Object.create(Error.prototype);HY0.prototype.constructor=HY0;m39.ProbeError=HY0});var Mp0=o((YH9,zY0)=>{var GC=P4().readUInt16BE,Ep0=P4().readUInt32BE;function _p($,Y){if($.length<4+Y)return null;var X=Ep0($,Y);if($.length<X+Y||X<8)return null;return{boxtype:String.fromCharCode.apply(null,$.slice(Y+4,Y+8)),data:$.slice(Y+8,Y+X),end:Y+X}}YH9.unbox=_p;function a39($,Y){var X=0;for(;;){var G=_p($,X);if(!G)break;switch(G.boxtype){case"ispe":Y.sizes.push({width:Ep0(G.data,4),height:Ep0(G.data,8)});break;case"irot":Y.transforms.push({type:"irot",value:G.data[0]&3});break;case"imir":Y.transforms.push({type:"imir",value:G.data[0]&1});break}X=G.end}}function Op0($,Y,X){var G=0;for(var J=0;J<X;J++)G=G*256+($[Y+J]||0);return G}function s39($,Y){var X=$[4]>>4&15,G=$[4]&15,J=$[5]>>4&15,Q=GC($,6),W=8;for(var K=0;K<Q;K++){var Z=GC($,W);W+=2;var H=GC($,W);W+=2;var z=Op0($,W,J);W+=J;var V=GC($,W);if(W+=2,H===0&&V===1){var F=Op0($,W,X),L=Op0($,W+X,G);Y.item_loc[Z]={length:L,offset:F+z}}W+=V*(X+G)}}function o39($,Y){var X=GC($,4),G=6;for(var J=0;J<X;J++){var Q=_p($,G);if(!Q)break;if(Q.boxtype==="infe"){var W=GC(Q.data,4),K="";for(var Z=8;Z<Q.data.length&&Q.data[Z];Z++)K+=String.fromCharCode(Q.data[Z]);Y.item_inf[K]=W}G=Q.end}}function t39($,Y){var X=0;for(;;){var G=_p($,X);if(!G)break;if(G.boxtype==="ipco")a39(G.data,Y);X=G.end}}function e39($,Y){var X=4;for(;;){var G=_p($,X);if(!G)break;if(G.boxtype==="iprp")t39(G.data,Y);if(G.boxtype==="iloc")s39(G.data,Y);if(G.boxtype==="iinf")o39(G.data,Y);X=G.end}}function $H9($){var Y=$.reduce(function(J,Q){return J.width>Q.width||J.width===Q.width&&J.height>Q.height?J:Q}),X=$.reduce(function(J,Q){return J.height>Q.height||J.height===Q.height&&J.width>Q.width?J:Q}),G;if(Y.width>X.height||Y.width===X.height&&Y.height>X.width)G=Y;else G=X;return G}YH9.readSizeFromMeta=function($){var Y={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(e39($,Y),!Y.sizes.length)return;var X=$H9(Y.sizes),G=1;Y.transforms.forEach(function(Q){var W={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},K={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(Q.type==="imir")if(Q.value===0)G=K[G];else G=K[G],G=W[G],G=W[G];if(Q.type==="irot")for(var Z=0;Z<Q.value;Z++)G=W[G]});var J=null;if(Y.item_inf.Exif)J=Y.item_loc[Y.item_inf.Exif];return{width:X.width,height:X.height,orientation:Y.transforms.length?G:null,variants:Y.sizes,exif_location:J}};YH9.getMimeType=function($){var Y=String.fromCharCode.apply(null,$.slice(0,4)),X={};X[Y]=!0;for(var G=8;G<$.length;G+=4)X[String.fromCharCode.apply(null,$.slice(G,G+4))]=!0;if(!X.mif1&&!X.msf1&&!X.miaf)return;if(Y==="avif"||Y==="avis"||Y==="avio")return{type:"avif",mime:"image/avif"};if(Y==="heic"||Y==="heix")return{type:"heic",mime:"image/heic"};if(Y==="hevc"||Y==="hevx")return{type:"heic",mime:"image/heic-sequence"};if(X.avif||X.avis)return{type:"avif",mime:"image/avif"};if(X.heic||X.heix||X.hevc||X.hevx||X.heis){if(X.msf1)return{type:"heif",mime:"image/heif-sequence"};return{type:"heif",mime:"image/heif"}}return{type:"avif",mime:"image/avif"}}});var qM=o((WH9,Rp0)=>{function VY0($,Y){var X=Error($);return X.code=Y,X}function QH9($){try{return decodeURIComponent(escape($))}catch(Y){return $}}function MV($,Y,X){this.input=$.subarray(Y,X),this.start=Y;var G=String.fromCharCode.apply(null,this.input.subarray(0,4));if(G!=="II*\x00"&&G!=="MM\x00*")throw VY0("invalid TIFF signature","EBADDATA");this.big_endian=G[0]==="M"}MV.prototype.each=function($){this.aborted=!1;var Y=this.read_uint32(4);this.ifds_to_read=[{id:0,offset:Y}];while(this.ifds_to_read.length>0&&!this.aborted){var X=this.ifds_to_read.shift();if(!X.offset)continue;this.scan_ifd(X.id,X.offset,$)}};MV.prototype.read_uint16=function($){var Y=this.input;if($+2>Y.length)throw VY0("unexpected EOF","EBADDATA");return this.big_endian?Y[$]*256+Y[$+1]:Y[$]+Y[$+1]*256};MV.prototype.read_uint32=function($){var Y=this.input;if($+4>Y.length)throw VY0("unexpected EOF","EBADDATA");return this.big_endian?Y[$]*16777216+Y[$+1]*65536+Y[$+2]*256+Y[$+3]:Y[$]+Y[$+1]*256+Y[$+2]*65536+Y[$+3]*16777216};MV.prototype.is_subifd_link=function($,Y){return $===0&&Y===34665||$===0&&Y===34853||$===34665&&Y===40965};MV.prototype.exif_format_length=function($){switch($){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}};MV.prototype.exif_format_read=function($,Y){var X;switch($){case 1:case 2:return X=this.input[Y],X;case 6:return X=this.input[Y],X|(X&128)*33554430;case 3:return X=this.read_uint16(Y),X;case 8:return X=this.read_uint16(Y),X|(X&32768)*131070;case 4:return X=this.read_uint32(Y),X;case 9:return X=this.read_uint32(Y),X|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}};MV.prototype.scan_ifd=function($,Y,X){var G=this.read_uint16(Y);Y+=2;for(var J=0;J<G;J++){var Q=this.read_uint16(Y),W=this.read_uint16(Y+2),K=this.read_uint32(Y+4),Z=this.exif_format_length(W),H=K*Z,z=H<=4?Y+8:this.read_uint32(Y+8),V=!1;if(z+H>this.input.length)throw VY0("unexpected EOF","EBADDATA");var F=[],L=z;for(var N=0;N<K;N++,L+=Z){var D=this.exif_format_read(W,L);if(D===null){F=null;break}F.push(D)}if(Array.isArray(F)&&W===2){if(F=QH9(String.fromCharCode.apply(null,F)),F&&F[F.length-1]==="\x00")F=F.slice(0,-1)}if(this.is_subifd_link($,Q)){if(Array.isArray(F)&&Number.isInteger(F[0])&&F[0]>0)this.ifds_to_read.push({id:Q,offset:F[0]}),V=!0}var A={is_big_endian:this.big_endian,ifd:$,tag:Q,format:W,count:K,entry_offset:Y+this.start,data_length:H,data_offset:z+this.start,value:F,is_subifd_link:V};if(X(A)===!1){this.aborted=!0;return}Y+=12}if($===0)this.ifds_to_read.push({id:1,offset:this.read_uint32(Y)})};WH9.ExifParser=MV;WH9.get_orientation=function($){var Y=0;try{return new MV($,0,$.length).each(function(X){if(X.ifd===0&&X.tag===274&&Array.isArray(X.value))return Y=X.value[0],!1}),Y}catch(X){return-1}}});var LN4=o((aE$,FN4)=>{var UH9=P4().ParserStream,HH9=P4().str2arr,zH9=P4().sliceEq,qp0=P4().readUInt32BE,HN4=Mp0(),VH9=qM(),FH9=HH9("ftyp");function zN4($,Y,X){if(Y===0){X();return}$._skipBytes(Y,X)}function LH9($,Y,X){if(!Y.exif_location||Y.exif_location.offset<=Y.offset){X(0);return}$._skipBytes(Y.exif_location.offset-Y.offset,function(){Y.offset=Y.exif_location.offset,$._bytes(4,function(G){Y.offset+=4;var J=qp0(G,0);zN4($,J,function(){Y.offset+=J;var Q=Y.exif_location.length-J-4;if(Q<=0){X(0);return}$._bytes(Q,function(W){Y.offset+=Q,X(VH9.get_orientation(W))})})})})}function VN4($,Y){$._bytes(8,function(X){Y.offset+=8;var G=qp0(X,0)-8,J=String.fromCharCode.apply(null,X.slice(4,8));if(J==="mdat"){$._skipBytes(1/0),$.push(null);return}if(G<0){$._skipBytes(1/0),$.push(null);return}if(J==="meta"&&G>0)$._bytes(G,function(Q){Y.offset+=G;var W=HN4.readSizeFromMeta(Q);if(!W){$._skipBytes(1/0),$.push(null);return}var K={width:W.width,height:W.height,type:Y.fileType.type,mime:Y.fileType.mime,wUnits:"px",hUnits:"px"};if(W.variants.length>1)K.variants=W.variants;if(W.orientation)K.orientation=W.orientation;Y.exif_location=W.exif_location,LH9($,Y,function(Z){if(Z>0)K.orientation=Z;$._skipBytes(1/0),$.push(K),$.push(null)})});else zN4($,G,function(){Y.offset+=G,VN4($,Y)})})}FN4.exports=function(){var $=new UH9,Y={offset:0,fileType:null};return $._bytes(8,function(X){if(Y.offset+=8,!zH9(X,4,FH9)){$._skipBytes(1/0),$.push(null);return}var G=qp0(X,0)-8;if(G<=0){$._skipBytes(1/0),$.push(null);return}$._bytes(G,function(J){if(Y.offset+=G,Y.fileType=HN4.getMimeType(J),!Y.fileType){$._skipBytes(1/0),$.push(null);return}VN4($,Y)})}),$}});var NN4=o((sE$,DN4)=>{var DH9=P4().ParserStream,NH9=P4().str2arr,AH9=P4().sliceEq,BH9=NH9("BM");DN4.exports=function(){var $=new DH9;return $._bytes(26,function(Y){if($._skipBytes(1/0),!AH9(Y,0,BH9)){$.push(null);return}var X,G,J=Y.readUInt32LE(14);if(J===12)X=Y.readInt16LE(18),G=Y.readInt16LE(20);else if(J>12)X=Y.readInt32LE(18),G=Y.readInt32LE(22);else{$.push(null);return}$.push({width:X,height:Math.abs(G),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}),$.push(null)}),$}});var EN4=o((oE$,ON4)=>{var OH9=P4().ParserStream,BN4=P4().str2arr,AN4=P4().sliceEq,EH9=BN4("GIF87a"),MH9=BN4("GIF89a");ON4.exports=function(){var $=new OH9;return $._bytes(10,function(Y){if($._skipBytes(1/0),!AN4(Y,0,EH9)&&!AN4(Y,0,MH9)){$.push(null);return}$.push({width:Y.readUInt16LE(6),height:Y.readUInt16LE(8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}),$.push(null)}),$}});var RN4=o((tE$,MN4)=>{var RH9=P4().ParserStream,qH9=0,PH9=1,Pp0=16;MN4.exports=function(){var $=new RH9;return $._bytes(6,function(Y){var X=Y.readUInt16LE(0),G=Y.readUInt16LE(2),J=Y.readUInt16LE(4);if(X!==qH9||G!==PH9||!J){$._skipBytes(1/0),$.push(null);return}$._bytes(J*Pp0,function(Q){$._skipBytes(1/0);var W=[],K={width:0,height:0};for(var Z=0;Z<J;Z++){var H=Q.readUInt8(Pp0*Z+0)||256,z=Q.readUInt8(Pp0*Z+1)||256,V={width:H,height:z};if(W.push(V),H>K.width||z>K.height)K=V}$.push({width:K.width,height:K.height,variants:W,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}),$.push(null)})}),$}});var _N4=o((eE$,wN4)=>{var wH9=P4().ParserStream,_H9=P4().str2arr,jH9=P4().sliceEq,TH9=qM(),IH9=_H9("Exif\x00\x00");function qN4($,Y){$._bytes(1,function(X){var G=X[0];if(G===255){qN4($,Y);return}if(G>=208&&G<=217||G===1){Y(G,0);return}if(G>=192&&G<=254){$._bytes(2,function(J){Y(G,J.readUInt16BE(0)-2)});return}Y()})}function PN4($,Y,X){var G=Y.start;Y.start=!1,$._bytes(1,function(J){if(J[0]!==255){if(G)X();else PN4($,Y,X);return}qN4($,X)})}function FY0($,Y){PN4($,Y,function(X,G){if(!X||G<0){$._skipBytes(1/0),$.push(null);return}if(X===217||X===218){$._skipBytes(1/0),$.push(null);return}if(X===225&&G>=10){$._bytes(G,function(J){if(jH9(J,0,IH9))Y.orientation=TH9.get_orientation(J.slice(6,6+G));FY0($,Y)});return}if(G<=0){FY0($,Y);return}if(G>=5&&(X>=192&&X<=207)&&X!==196&&X!==200&&X!==204){$._bytes(G,function(J){$._skipBytes(1/0);var Q={width:J.readUInt16BE(3),height:J.readUInt16BE(1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};if(Y.orientation>0)Q.orientation=Y.orientation;$.push(Q),$.push(null)});return}$._skipBytes(G,function(){FY0($,Y)})})}wN4.exports=function(){var $=new wH9;return $._bytes(2,function(Y){if(Y[0]!==255||Y[1]!==216){$._skipBytes(1/0),$.push(null);return}FY0($,{start:!0})}),$}});var CN4=o(($M$,IN4)=>{var CH9=P4().ParserStream,TN4=P4().str2arr,jN4=P4().sliceEq,SH9=TN4(`\x89PNG\r
\x1A
`),kH9=TN4("IHDR");IN4.exports=function(){var $=new CH9;return $._bytes(24,function(Y){if($._skipBytes(1/0),!jN4(Y,0,SH9)){$.push(null);return}if(!jN4(Y,12,kH9)){$.push(null);return}$.push({width:Y.readUInt32BE(16),height:Y.readUInt32BE(20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}),$.push(null)}),$}});var kN4=o((YM$,SN4)=>{var vH9=P4().ParserStream,xH9=P4().str2arr,yH9=P4().sliceEq,bH9=xH9("8BPS\x00\x01");SN4.exports=function(){var $=new vH9;return $._bytes(6,function(Y){if(!yH9(Y,0,bH9)){$._skipBytes(1/0),$.push(null);return}$._bytes(16,function(X){$._skipBytes(1/0),$.push({width:X.readUInt32BE(12),height:X.readUInt32BE(8),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}),$.push(null)})}),$}});var fN4=o((XM$,hN4)=>{var hH9=A0("stream").Transform,vN4=0,xN4=1,jp=2,yN4=65536,fH9=/<[-_.:a-zA-Z0-9][^>]*>/,gH9=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,mH9=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,uH9=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,pH9=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,bN4=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function dH9($){return $===32||$===9||$===13||$===10}function JC($){return typeof $==="number"&&isFinite($)&&$>0}function cH9($){var Y=$.match(mH9),X=$.match(uH9),G=$.match(pH9);return{width:Y&&(Y[1]||Y[2]),height:X&&(X[1]||X[2]),viewbox:G&&(G[1]||G[2])}}function WH($){if(!bN4.test($))return"px";return $.match(bN4)[0]}function lH9($){var Y=($.match(fH9)||[""])[0];if(!gH9.test(Y))return;var X=cH9(Y),G=parseFloat(X.width),J=parseFloat(X.height);if(X.width&&X.height){if(!JC(G)||!JC(J))return;return{width:G,height:J,type:"svg",mime:"image/svg+xml",wUnits:WH(X.width),hUnits:WH(X.height)}}var Q=(X.viewbox||"").split(" "),W={width:Q[2],height:Q[3]},K=parseFloat(W.width),Z=parseFloat(W.height);if(!JC(K)||!JC(Z))return;if(WH(W.width)!==WH(W.height))return;var H=K/Z;if(X.width){if(!JC(G))return;return{width:G,height:G/H,type:"svg",mime:"image/svg+xml",wUnits:WH(X.width),hUnits:WH(X.width)}}if(X.height){if(!JC(J))return;return{width:J*H,height:J,type:"svg",mime:"image/svg+xml",wUnits:WH(X.height),hUnits:WH(X.height)}}return{width:K,height:Z,type:"svg",mime:"image/svg+xml",wUnits:WH(W.width),hUnits:WH(W.height)}}hN4.exports=function(){var $=vN4,Y=0,X="",G=null,J=new hH9({readableObjectMode:!0,transform:function Q(W,K,Z){switch($){case vN4:if(G)W=Buffer.concat([G,W]),G=null;if(Y===0&&W.length<4){G=W;break}var H=0,z=W.length;if(Y===0&&W[0]===239&&W[1]===187&&W[2]===191)H=3;while(H<z&&dH9(W[H]))H++;if(H>=z){if(Y+=W.length,Y>yN4)$=jp,J.push(null)}else if(W[H]===60)return $=xN4,Q(W,K,Z);else $=jp,J.push(null);break;case xN4:X+=W.toString();var V=lH9(X);if(V){$=jp,J.push(V),J.push(null);break}if(Y+=W.length,Y>yN4)$=jp,J.push(null);break}Z()},flush:function(){$=jp,J.push(null)}});return J}});var dN4=o((GM$,pN4)=>{var iH9=P4().ParserStream,uN4=P4().str2arr,gN4=P4().sliceEq,nH9=uN4("II*\x00"),rH9=uN4("MM\x00*");function LY0($,Y,X){return X?$.readUInt16BE(Y):$.readUInt16LE(Y)}function wp0($,Y,X){return X?$.readUInt32BE(Y):$.readUInt32LE(Y)}function mN4($,Y,X){var G=LY0($,Y+2,X),J=wp0($,Y+4,X);if(J!==1||G!==3&&G!==4)return null;if(G===3)return LY0($,Y+8,X);return wp0($,Y+8,X)}pN4.exports=function(){var $=new iH9;return $._bytes(8,function(Y){if(!gN4(Y,0,nH9)&&!gN4(Y,0,rH9)){$._skipBytes(1/0),$.push(null);return}var X=Y[0]===77,G=wp0(Y,4,X)-8;if(G<0){$._skipBytes(1/0),$.push(null);return}function J(Q,W,K){if(W===0){K();return}Q._skipBytes(W,K)}J($,G,function(){$._bytes(2,function(Q){var W=LY0(Q,0,X)*12;if(W<=0){$._skipBytes(1/0),$.push(null);return}$._bytes(W,function(K){$._skipBytes(1/0);var Z,H,z,V;for(Z=0;Z<W;Z+=12)if(V=LY0(K,Z,X),V===256)H=mN4(K,Z,X);else if(V===257)z=mN4(K,Z,X);if(H&&z)$.push({width:H,height:z,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"});$.push(null)})})})}),$}});var nN4=o((JM$,iN4)=>{var aH9=P4().ParserStream,lN4=P4().str2arr,cN4=P4().sliceEq,sH9=qM(),oH9=lN4("RIFF"),tH9=lN4("WEBP");function DY0($,Y,X){if(Y===0){X();return}$._skipBytes(Y,X)}function eH9($,Y,X){$._bytes(10,function(G){if(G[3]===157&&G[4]===1&&G[5]===42)X.result=X.result||{width:G.readUInt16LE(6)&16383,height:G.readUInt16LE(8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"};DY0($,Y-10,function(){X.offset+=Y,PM($,X)})})}function $z9($,Y,X){$._bytes(5,function(G){if(G[0]===47){var J=G.readUInt32LE(1);X.result=X.result||{width:(J&16383)+1,height:(J>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}DY0($,Y-5,function(){X.offset+=Y,PM($,X)})})}function Yz9($,Y,X){$._bytes(10,function(G){X.result=X.result||{width:(G[6]<<16|G[5]<<8|G[4])+1,height:(G[9]<<16|G[8]<<8|G[7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"},DY0($,Y-10,function(){X.offset+=Y,PM($,X)})})}function Xz9($,Y,X){$._bytes(Y,function(G){X.offset=1/0,X.exif_orientation=sH9.get_orientation(G),PM($,X)})}function PM($,Y){if(Y.fileLength-8<=Y.offset){if($._skipBytes(1/0),Y.result){var X=Y.result;if(Y.exif_orientation>0)X.orientation=Y.exif_orientation;$.push(X)}$.push(null);return}$._bytes(4-Y.bufferedChunkHeader.length,function(G){Y.offset+=4-Y.bufferedChunkHeader.length;var J=Y.bufferedChunkHeader+String.fromCharCode.apply(null,G);if(J=J.replace(/^\0+/,""),J.length<4){Y.bufferedChunkHeader=J,PM($,Y);return}Y.bufferedChunkHeader="",$._bytes(4,function(Q){Y.offset+=4;var W=Q.readUInt32LE(0);if(J==="VP8 "&&W>=10)eH9($,W,Y);else if(J==="VP8L"&&W>=5)$z9($,W,Y);else if(J==="VP8X"&&W>=10)Yz9($,W,Y);else if(J==="EXIF"&&W>=4)Xz9($,W,Y);else DY0($,W,function(){Y.offset+=W,PM($,Y)})})})}iN4.exports=function(){var $=new aH9;return $._bytes(12,function(Y){if(cN4(Y,0,oH9)&&cN4(Y,8,tH9))PM($,{fileLength:Y.readUInt32LE(4)+8,offset:12,exif_orientation:0,bufferedChunkHeader:""});else $._skipBytes(1/0),$.push(null)}),$}});var NY0=o((QM$,rN4)=>{rN4.exports={avif:LN4(),bmp:NN4(),gif:EN4(),ico:RN4(),jpeg:_N4(),png:CN4(),psd:kN4(),svg:fN4(),tiff:dN4(),webp:nN4()}});var jp0=o((WM$,_p0)=>{var Gz9=P4().ProbeError,AY0=NY0(),Jz9=A0("stream").PassThrough,Qz9=A0("stream").pipeline;_p0.exports=function(Y,X){var G=new Jz9;G.setMaxListeners(Object.keys(AY0).length+10);var J=new Promise(function(W,K){Y.on("error",K),G.on("error",K);var Z=[],H;function z(V){var F=Z.indexOf[this];if(F<0)return;if(V)H=V;if(G.unpipe(this),this.removeAllListeners(),Z.splice(F,1),Z.length)return;K(H||new Gz9("unrecognized file format","ECONTENT"))}Object.keys(AY0).forEach(function(V){var F=AY0[V]();Z.push(F),F.once("data",function(L){if(L.width>0&&L.height>0){W(L);return}z.call(F)}),F.once("end",z),F.on("error",z),G.pipe(F)})});function Q(){if(X&&typeof Y.unpipe==="function")Y.unpipe(G);G.destroy()}if(J.then(Q).catch(Q),X)Y.pipe(G);else Qz9(Y,G,function(){});return J};_p0.exports.parsers=AY0});var Tp0=o((KM$,aN4)=>{function Wz9($){X.debug=X,X.default=X,X.coerce=Z,X.disable=W,X.enable=Q,X.enabled=K,X.humanize=$i(),Object.keys($).forEach(function(H){X[H]=$[H]}),X.instances=[],X.names=[],X.skips=[],X.formatters={};function Y(H){var z=0;for(var V=0;V<H.length;V++)z=(z<<5)-z+H.charCodeAt(V),z|=0;return X.colors[Math.abs(z)%X.colors.length]}X.selectColor=Y;function X(H){var z;function V(){if(!V.enabled)return;for(var F=arguments.length,L=Array(F),N=0;N<F;N++)L[N]=arguments[N];var D=V,A=Number(new Date),B=A-(z||A);if(D.diff=B,D.prev=z,D.curr=A,z=A,L[0]=X.coerce(L[0]),typeof L[0]!=="string")L.unshift("%O");var O=0;L[0]=L[0].replace(/%([a-zA-Z%])/g,function(M,R){if(M==="%%")return M;O++;var q=X.formatters[R];if(typeof q==="function"){var _=L[O];M=q.call(D,_),L.splice(O,1),O--}return M}),X.formatArgs.call(D,L);var E=D.log||X.log;E.apply(D,L)}if(V.namespace=H,V.enabled=X.enabled(H),V.useColors=X.useColors(),V.color=Y(H),V.destroy=G,V.extend=J,typeof X.init==="function")X.init(V);return X.instances.push(V),V}function G(){var H=X.instances.indexOf(this);if(H!==-1)return X.instances.splice(H,1),!0;return!1}function J(H,z){return X(this.namespace+(typeof z>"u"?":":z)+H)}function Q(H){X.save(H),X.names=[],X.skips=[];var z,V=(typeof H==="string"?H:"").split(/[\s,]+/),F=V.length;for(z=0;z<F;z++){if(!V[z])continue;if(H=V[z].replace(/\*/g,".*?"),H[0]==="-")X.skips.push(new RegExp("^"+H.substr(1)+"$"));else X.names.push(new RegExp("^"+H+"$"))}for(z=0;z<X.instances.length;z++){var L=X.instances[z];L.enabled=X.enabled(L.namespace)}}function W(){X.enable("")}function K(H){if(H[H.length-1]==="*")return!0;var z,V;for(z=0,V=X.skips.length;z<V;z++)if(X.skips[z].test(H))return!1;for(z=0,V=X.names.length;z<V;z++)if(X.names[z].test(H))return!0;return!1}function Z(H){if(H instanceof Error)return H.stack||H.message;return H}return X.enable(X.load()),X}aN4.exports=Wz9});var oN4=o((sN4,EY0)=>{function BY0($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")BY0=function(X){return typeof X};else BY0=function(X){return X&&typeof Symbol==="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X};return BY0($)}sN4.log=Uz9;sN4.formatArgs=Zz9;sN4.save=Hz9;sN4.load=zz9;sN4.useColors=Kz9;sN4.storage=Vz9();sN4.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Kz9(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Zz9($){if($[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+$[0]+(this.useColors?"%c ":" ")+"+"+EY0.exports.humanize(this.diff),!this.useColors)return;var Y="color: "+this.color;$.splice(1,0,Y,"color: inherit");var X=0,G=0;$[0].replace(/%[a-zA-Z%]/g,function(J){if(J==="%%")return;if(X++,J==="%c")G=X}),$.splice(G,0,Y)}function Uz9(){var $;return(typeof console>"u"?"undefined":BY0(console))==="object"&&console.log&&($=console).log.apply($,arguments)}function Hz9($){try{if($)sN4.storage.setItem("debug",$);else sN4.storage.removeItem("debug")}catch(Y){}}function zz9(){var $;try{$=sN4.storage.getItem("debug")}catch(Y){}if(!$&&typeof process<"u"&&"env"in process)$=process.env.DEBUG;return $}function Vz9(){try{return localStorage}catch($){}}EY0.exports=Tp0()(sN4);var Fz9=EY0.exports.formatters;Fz9.j=function($){try{return JSON.stringify($)}catch(Y){return"[UnexpectedJSONParseError]: "+Y.message}}});var YA4=o((eN4,RY0)=>{var Ez9=A0("tty"),MY0=A0("util");eN4.init=jz9;eN4.log=Pz9;eN4.formatArgs=Rz9;eN4.save=wz9;eN4.load=_z9;eN4.useColors=Mz9;eN4.colors=[6,2,3,4,5,1];try{if(Tp=XL0(),Tp&&(Tp.stderr||Tp).level>=2)eN4.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch($){}var Tp;eN4.inspectOpts=Object.keys(process.env).filter(function($){return/^debug_/i.test($)}).reduce(function($,Y){var X=Y.substring(6).toLowerCase().replace(/_([a-z])/g,function(J,Q){return Q.toUpperCase()}),G=process.env[Y];if(/^(yes|on|true|enabled)$/i.test(G))G=!0;else if(/^(no|off|false|disabled)$/i.test(G))G=!1;else if(G==="null")G=null;else G=Number(G);return $[X]=G,$},{});function Mz9(){return"colors"in eN4.inspectOpts?Boolean(eN4.inspectOpts.colors):Ez9.isatty(process.stderr.fd)}function Rz9($){var Y=this.namespace,X=this.useColors;if(X){var G=this.color,J="\x1B[3"+(G<8?G:"8;5;"+G),Q="  ".concat(J,";1m").concat(Y," \x1B[0m");$[0]=Q+$[0].split(`
`).join(`
`+Q),$.push(J+"m+"+RY0.exports.humanize(this.diff)+"\x1B[0m")}else $[0]=qz9()+Y+" "+$[0]}function qz9(){if(eN4.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function Pz9(){return process.stderr.write(MY0.format.apply(MY0,arguments)+`
`)}function wz9($){if($)process.env.DEBUG=$;else delete process.env.DEBUG}function _z9(){return process.env.DEBUG}function jz9($){$.inspectOpts={};var Y=Object.keys(eN4.inspectOpts);for(var X=0;X<Y.length;X++)$.inspectOpts[Y[X]]=eN4.inspectOpts[Y[X]]}RY0.exports=Tp0()(eN4);var tN4=RY0.exports.formatters;tN4.o=function($){return this.inspectOpts.colors=this.useColors,MY0.inspect($,this.inspectOpts).split(`
`).map(function(Y){return Y.trim()}).join(" ")};tN4.O=function($){return this.inspectOpts.colors=this.useColors,MY0.inspect($,this.inspectOpts)}});var XA4=o((HM$,Ip0)=>{if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)Ip0.exports=oN4();else Ip0.exports=YA4()});var GA4=o((bz9)=>{var Cp0=Object.prototype.toString;function qY0($,Y){if(Y&&($===null||typeof $>"u"))return Y+"=";else if(Cp0.call($)=="[object Array]")return xz9($,Y);else if(Cp0.call($)=="[object Object]")return yz9($,Y);else if(Cp0.call($)=="[object Date]")return $.toISOString();else if(Y)return Y+"="+encodeURIComponent(String($));else if(String($).indexOf("=")!==-1)return String($);else throw TypeError("Cannot build a querystring out of: "+$)}function xz9($,Y){var X=[];for(var G=0,J=$.length;G<J;G++)if(Y)X.push(qY0($[G],Y+"[]"));else X.push(qY0($[G]));return X.join("&")}function yz9($,Y){var X=[];return Object.keys($).forEach(function(G){X.push(qY0($[G],Y?Y+"["+encodeURIComponent(G)+"]":encodeURIComponent(G)))}),X.join("&")}bz9.build=qY0});var WA4=o((mz9)=>{var fz9=A0("fs").readFile,gz9=A0("path").basename;mz9.build=function($,Y,X){if(typeof $!="object"||typeof $.pipe=="function")return X(Error("Multipart builder expects data as key/val object."));var G="",J=QA4($),Q=Object.keys(J).length;if(Q===0)return X(Error("Empty multipart body. Invalid data."));function W(z,V){if(z)return X(z);if(V)G+=V;--Q||X(null,G+"--"+Y+"--")}for(var K in J){var Z=J[K];if(Z===null||typeof Z>"u")W();else if(Buffer.isBuffer(Z)){var H={buffer:Z,content_type:"application/octet-stream"};JA4(K,H,Y,W)}else{var H=Z.buffer||Z.file||Z.content_type?Z:{value:Z};JA4(K,H,Y,W)}}};function JA4($,Y,X,G){var J="--"+X+`\r
`;J+='Content-Disposition: form-data; name="'+$+'"';function Q(K,Z){if(K){var H=Y.content_type.indexOf("text")==-1;if(J+='; filename="'+encodeURIComponent(Z)+`"\r
`,H)J+=`Content-Transfer-Encoding: binary\r
`;J+="Content-Type: "+Y.content_type+`\r
\r
`,J+=H?K.toString("binary"):K.toString("utf8")}G(null,J+`\r
`)}if((Y.file||Y.buffer)&&Y.content_type){var W=Y.filename?Y.filename:Y.file?gz9(Y.file):$;if(Y.buffer)return Q(Y.buffer,W);fz9(Y.file,function(K,Z){if(K)return G(K);Q(Z,W)})}else{if(typeof Y.value=="object")return G(Error("Object received for "+$+", expected string."));if(Y.content_type)J+=`\r
`,J+="Content-Type: "+Y.content_type;J+=`\r
\r
`,J+=Buffer.from(String(Y.value),"utf8").toString("binary"),Q()}}function QA4($,Y,X){Y=Y||{};for(var G in $){var J=X?X+"["+G+"]":G,Q=$[G];if(Q&&typeof Q==="object"&&!(Q.buffer||Q.file||Q.content_type))QA4(Q,Y,J);else Y[J]=Q}return Y}});var UA4=o((FM$,ZA4)=>{var pz9=A0("crypto").createHash;function dz9($,Y,X){var G=$.split(" ")[0],J=Y[0],Q=Y[1];if(G=="Digest")return wM.generate($,J,Q,X.method,X.path);else if(G=="Basic")return KA4(J,Q)}function PY0($){return pz9("md5").update($).digest("hex")}function KA4($,Y){var X=typeof Y>"u"?$:[$,Y].join(":");return"Basic "+Buffer.from(X).toString("base64")}var wM={};wM.parse_header=function($){var Y={},X=$.match(/([a-z0-9_-]+)="?([a-z0-9_=\/\.@\s-\+)()]+)"?/gi);for(var G=0,J=X.length;G<J;G++){var Q=X[G].split("="),W=Q.shift(),K=Q.join("=").replace(/^"/,"").replace(/"$/,"");Y[W]=K}return Y};wM.update_nc=function($){var Y=99999999;if($++,$>Y)$=1;var X=[,,,,,,,,].join("0")+"";return $=$+"",X.substr(0,8-$.length)+$};wM.generate=function($,Y,X,G,J){var Q=1,W=null,K=wM.parse_header($),Z=PY0(Y+":"+K.realm+":"+X),H=PY0(G.toUpperCase()+":"+J),z=[Z,K.nonce];if(typeof K.qop==="string")W=PY0(Math.random().toString(36)).substr(0,8),Q=wM.update_nc(Q),z=z.concat(Q,W),z=z.concat(K.qop,H);else z=z.concat(H);var V={uri:J,realm:K.realm,nonce:K.nonce,username:Y,response:PY0(z.join(":"))};if(K.qop)V.qop=K.qop;if(K.opaque)V.opaque=K.opaque;if(W)V.nc=Q,V.cnonce=W;$=[];for(var F in V)$.push(F+'="'+V[F]+'"');return"Digest "+$.join(", ")};ZA4.exports={header:dz9,basic:KA4,digest:wM.generate}});var FA4=o((tz9)=>{var HA4=A0("querystring").unescape,cz9=/^([^=\s]+)\s*=\s*("?)\s*(.*)\s*\2\s*$/,lz9=/[\x00-\x1F\x7F\x3B\x3B\s\"\,\\"%]/g,iz9=1,zA4=3;function nz9($){return $.trim().replace(/\x3B+$/,"")}function rz9($){var Y=$.indexOf(";");return Y===-1?$:$.substr(0,Y)}function VA4($){return $.toString().replace(lz9,encodeURIComponent)}function az9($){$=nz9($),$=rz9($);var Y=cz9.exec($);if(!Y||!Y[zA4])return null;return{name:HA4(Y[iz9]),value:HA4(Y[zA4])}}function sz9($){if(!$)return{};return $=Array.isArray($)?$:[$],$.reduce(function(Y,X){var G=az9(X);if(G)Y[G.name]=G.value;return Y},{})}function oz9($){return Object.keys($).reduce(function(Y,X){var G=VA4(X),J=VA4($[X]);return Y+=(Y?"; ":"")+G+"="+J,Y},"")}tz9.read=sz9;tz9.write=oz9});var LA4=o((wY0)=>{(function($){$.parser=function(e,m){return new X(e,m)},$.SAXParser=X,$.SAXStream=z,$.createStream=Z,$.MAX_BUFFER_LENGTH=65536;var Y=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];$.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function X(e,m){if(!(this instanceof X))return new X(e,m);var $0=this;if(J($0),$0.q=$0.c="",$0.bufferCheckPosition=$.MAX_BUFFER_LENGTH,$0.encoding=null,$0.opt=m||{},$0.opt.lowercase=$0.opt.lowercase||$0.opt.lowercasetags,$0.looseCase=$0.opt.lowercase?"toLowerCase":"toUpperCase",$0.opt.maxEntityCount=$0.opt.maxEntityCount||512,$0.opt.maxEntityDepth=$0.opt.maxEntityDepth||4,$0.entityCount=$0.entityDepth=0,$0.tags=[],$0.closed=$0.closedRoot=$0.sawRoot=!1,$0.tag=$0.error=null,$0.strict=!!e,$0.noscript=!!(e||$0.opt.noscript),$0.state=w.BEGIN,$0.strictEntities=$0.opt.strictEntities,$0.ENTITIES=$0.strictEntities?Object.create($.XML_ENTITIES):Object.create($.ENTITIES),$0.attribList=[],$0.opt.xmlns)$0.ns=Object.create(D);if($0.opt.unquotedAttributeValues===void 0)$0.opt.unquotedAttributeValues=!e;if($0.trackPosition=$0.opt.position!==!1,$0.trackPosition)$0.position=$0.line=$0.column=0;C($0,"onready")}if(!Object.create)Object.create=function(e){function m(){}m.prototype=e;var $0=new m;return $0};if(!Object.keys)Object.keys=function(e){var m=[];for(var $0 in e)if(e.hasOwnProperty($0))m.push($0);return m};function G(e){var m=Math.max($.MAX_BUFFER_LENGTH,10),$0=0;for(var Y0=0,Z0=Y.length;Y0<Z0;Y0++){var F0=e[Y[Y0]].length;if(F0>m)switch(Y[Y0]){case"textNode":y(e);break;case"cdata":x(e,"oncdata",e.cdata),e.cdata="";break;case"script":x(e,"onscript",e.script),e.script="";break;default:u(e,"Max buffer length exceeded: "+Y[Y0])}$0=Math.max($0,F0)}var D0=$.MAX_BUFFER_LENGTH-$0;e.bufferCheckPosition=D0+e.position}function J(e){for(var m=0,$0=Y.length;m<$0;m++)e[Y[m]]=""}function Q(e){if(y(e),e.cdata!=="")x(e,"oncdata",e.cdata),e.cdata="";if(e.script!=="")x(e,"onscript",e.script),e.script=""}X.prototype={end:function(){b(this)},write:Q0,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){Q(this)}};var W;try{W=A0("stream").Stream}catch(e){W=function(){}}if(!W)W=function(){};var K=$.EVENTS.filter(function(e){return e!=="error"&&e!=="end"});function Z(e,m){return new z(e,m)}function H(e,m){if(e.length>=2){if(e[0]===255&&e[1]===254)return"utf-16le";if(e[0]===254&&e[1]===255)return"utf-16be"}if(e.length>=3&&e[0]===239&&e[1]===187&&e[2]===191)return"utf8";if(e.length>=4){if(e[0]===60&&e[1]===0&&e[2]===63&&e[3]===0)return"utf-16le";if(e[0]===0&&e[1]===60&&e[2]===0&&e[3]===63)return"utf-16be";return"utf8"}return m?"utf8":null}function z(e,m){if(!(this instanceof z))return new z(e,m);W.apply(this),this._parser=new X(e,m),this.writable=!0,this.readable=!0;var $0=this;this._parser.onend=function(){$0.emit("end")},this._parser.onerror=function(Y0){$0.emit("error",Y0),$0._parser.error=null},this._decoder=null,this._decoderBuffer=null,K.forEach(function(Y0){Object.defineProperty($0,"on"+Y0,{get:function(){return $0._parser["on"+Y0]},set:function(Z0){if(!Z0)return $0.removeAllListeners(Y0),$0._parser["on"+Y0]=Z0,Z0;$0.on(Y0,Z0)},enumerable:!0,configurable:!1})})}z.prototype=Object.create(W.prototype,{constructor:{value:z}}),z.prototype._decodeBuffer=function(e,m){if(this._decoderBuffer)e=Buffer.concat([this._decoderBuffer,e]),this._decoderBuffer=null;if(!this._decoder){var $0=H(e,m);if(!$0)return this._decoderBuffer=e,"";this._parser.encoding=$0,this._decoder=new TextDecoder($0)}return this._decoder.decode(e,{stream:!m})},z.prototype.write=function(e){if(typeof Buffer==="function"&&typeof Buffer.isBuffer==="function"&&Buffer.isBuffer(e))e=this._decodeBuffer(e,!1);else if(this._decoderBuffer){var m=this._decodeBuffer(Buffer.alloc(0),!0);if(m)this._parser.write(m),this.emit("data",m)}return this._parser.write(e.toString()),this.emit("data",e),!0},z.prototype.end=function(e){if(e&&e.length)this.write(e);if(this._decoderBuffer){var m=this._decodeBuffer(Buffer.alloc(0),!0);if(m)this._parser.write(m),this.emit("data",m)}else if(this._decoder){var $0=this._decoder.decode();if($0)this._parser.write($0),this.emit("data",$0)}return this._parser.end(),!0},z.prototype.on=function(e,m){var $0=this;if(!$0._parser["on"+e]&&K.indexOf(e)!==-1)$0._parser["on"+e]=function(){var Y0=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Y0.splice(0,0,e),$0.emit.apply($0,Y0)};return W.prototype.on.call($0,e,m)};var V="[CDATA[",F="DOCTYPE",L="http://www.w3.org/XML/1998/namespace",N="http://www.w3.org/2000/xmlns/",D={xml:L,xmlns:N},A=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,B=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,O=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,E=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function M(e){return e===" "||e===`
`||e==="\r"||e==="\t"}function R(e){return e==='"'||e==="'"}function q(e){return e===">"||M(e)}function _(e,m){return e.test(m)}function P(e,m){return!_(e,m)}var w=0;$.STATE={BEGIN:w++,BEGIN_WHITESPACE:w++,TEXT:w++,TEXT_ENTITY:w++,OPEN_WAKA:w++,SGML_DECL:w++,SGML_DECL_QUOTED:w++,DOCTYPE:w++,DOCTYPE_QUOTED:w++,DOCTYPE_DTD:w++,DOCTYPE_DTD_QUOTED:w++,COMMENT_STARTING:w++,COMMENT:w++,COMMENT_ENDING:w++,COMMENT_ENDED:w++,CDATA:w++,CDATA_ENDING:w++,CDATA_ENDING_2:w++,PROC_INST:w++,PROC_INST_BODY:w++,PROC_INST_ENDING:w++,OPEN_TAG:w++,OPEN_TAG_SLASH:w++,ATTRIB:w++,ATTRIB_NAME:w++,ATTRIB_NAME_SAW_WHITE:w++,ATTRIB_VALUE:w++,ATTRIB_VALUE_QUOTED:w++,ATTRIB_VALUE_CLOSED:w++,ATTRIB_VALUE_UNQUOTED:w++,ATTRIB_VALUE_ENTITY_Q:w++,ATTRIB_VALUE_ENTITY_U:w++,CLOSE_TAG:w++,CLOSE_TAG_SAW_WHITE:w++,SCRIPT:w++,SCRIPT_ENDING:w++},$.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},$.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys($.ENTITIES).forEach(function(e){var m=$.ENTITIES[e],$0=typeof m==="number"?String.fromCharCode(m):m;$.ENTITIES[e]=$0});for(var j in $.STATE)$.STATE[$.STATE[j]]=j;w=$.STATE;function C(e,m,$0){e[m]&&e[m]($0)}function k(e){var m=e&&e.match(/(?:^|\s)encoding\s*=\s*(['"])([^'"]+)\1/i);return m?m[2]:null}function S(e){if(!e)return null;return e.toLowerCase().replace(/[^a-z0-9]/g,"")}function I(e,m){let $0=S(e),Y0=S(m);if(!$0||!Y0)return!0;if(Y0==="utf16")return $0==="utf16le"||$0==="utf16be";return $0===Y0}function v(e,m){if(!e.strict||!e.encoding||!m||m.name!=="xml")return;var $0=k(m.body);if($0&&!I(e.encoding,$0))g(e,"XML declaration encoding "+$0+" does not match detected stream encoding "+e.encoding.toUpperCase())}function x(e,m,$0){if(e.textNode)y(e);C(e,m,$0)}function y(e){if(e.textNode=d(e.opt,e.textNode),e.textNode)C(e,"ontext",e.textNode);e.textNode=""}function d(e,m){if(e.trim)m=m.trim();if(e.normalize)m=m.replace(/\s+/g," ");return m}function u(e,m){if(y(e),e.trackPosition)m+=`
Line: `+e.line+`
Column: `+e.column+`
Char: `+e.c;return m=Error(m),e.error=m,C(e,"onerror",m),e}function b(e){if(e.sawRoot&&!e.closedRoot)g(e,"Unclosed root tag");if(e.state!==w.BEGIN&&e.state!==w.BEGIN_WHITESPACE&&e.state!==w.TEXT)u(e,"Unexpected end");return y(e),e.c="",e.closed=!0,C(e,"onend"),X.call(e,e.strict,e.opt),e}function g(e,m){if(typeof e!=="object"||!(e instanceof X))throw Error("bad call to strictFail");if(e.strict)u(e,m)}function p(e){if(!e.strict)e.tagName=e.tagName[e.looseCase]();var m=e.tags[e.tags.length-1]||e,$0=e.tag={name:e.tagName,attributes:{}};if(e.opt.xmlns)$0.ns=m.ns;e.attribList.length=0,x(e,"onopentagstart",$0)}function h(e,m){var $0=e.indexOf(":"),Y0=$0<0?["",e]:e.split(":"),Z0=Y0[0],F0=Y0[1];if(m&&e==="xmlns")Z0="xmlns",F0="";return{prefix:Z0,local:F0}}function n(e){if(!e.strict)e.attribName=e.attribName[e.looseCase]();if(e.attribList.indexOf(e.attribName)!==-1||e.tag.attributes.hasOwnProperty(e.attribName)){e.attribName=e.attribValue="";return}if(e.opt.xmlns){var m=h(e.attribName,!0),$0=m.prefix,Y0=m.local;if($0==="xmlns")if(Y0==="xml"&&e.attribValue!==L)g(e,"xml: prefix must be bound to "+L+`
Actual: `+e.attribValue);else if(Y0==="xmlns"&&e.attribValue!==N)g(e,"xmlns: prefix must be bound to "+N+`
Actual: `+e.attribValue);else{var Z0=e.tag,F0=e.tags[e.tags.length-1]||e;if(Z0.ns===F0.ns)Z0.ns=Object.create(F0.ns);Z0.ns[Y0]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,x(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}function t(e,m){if(e.opt.xmlns){var $0=e.tag,Y0=h(e.tagName);if($0.prefix=Y0.prefix,$0.local=Y0.local,$0.uri=$0.ns[Y0.prefix]||"",$0.prefix&&!$0.uri)g(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),$0.uri=Y0.prefix;var Z0=e.tags[e.tags.length-1]||e;if($0.ns&&Z0.ns!==$0.ns)Object.keys($0.ns).forEach(function(C0){x(e,"onopennamespace",{prefix:C0,uri:$0.ns[C0]})});for(var F0=0,D0=e.attribList.length;F0<D0;F0++){var O0=e.attribList[F0],R0=O0[0],P0=O0[1],f0=h(R0,!0),p0=f0.prefix,U4=f0.local,P1=p0===""?"":$0.ns[p0]||"",d1={name:R0,value:P0,prefix:p0,local:U4,uri:P1};if(p0&&p0!=="xmlns"&&!P1)g(e,"Unbound namespace prefix: "+JSON.stringify(p0)),d1.uri=p0;e.tag.attributes[R0]=d1,x(e,"onattribute",d1)}e.attribList.length=0}if(e.tag.isSelfClosing=!!m,e.sawRoot=!0,e.tags.push(e.tag),x(e,"onopentag",e.tag),!m){if(!e.noscript&&e.tagName.toLowerCase()==="script")e.state=w.SCRIPT;else e.state=w.TEXT;e.tag=null,e.tagName=""}e.attribName=e.attribValue="",e.attribList.length=0}function s(e){if(!e.tagName){g(e,"Weird empty close tag."),e.textNode+="</>",e.state=w.TEXT;return}if(e.script){if(e.tagName!=="script"){e.script+="</"+e.tagName+">",e.tagName="",e.state=w.SCRIPT;return}x(e,"onscript",e.script),e.script=""}var m=e.tags.length,$0=e.tagName;if(!e.strict)$0=$0[e.looseCase]();var Y0=$0;while(m--){var Z0=e.tags[m];if(Z0.name!==Y0)g(e,"Unexpected close tag");else break}if(m<0){g(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",e.state=w.TEXT;return}e.tagName=$0;var F0=e.tags.length;while(F0-- >m){var D0=e.tag=e.tags.pop();e.tagName=e.tag.name,x(e,"onclosetag",e.tagName);var O0={};for(var R0 in D0.ns)O0[R0]=D0.ns[R0];var P0=e.tags[e.tags.length-1]||e;if(e.opt.xmlns&&D0.ns!==P0.ns)Object.keys(D0.ns).forEach(function(f0){var p0=D0.ns[f0];x(e,"onclosenamespace",{prefix:f0,uri:p0})})}if(m===0)e.closedRoot=!0;e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=w.TEXT}function K0(e){var m=e.entity,$0=m.toLowerCase(),Y0,Z0="";if(e.ENTITIES[m])return e.ENTITIES[m];if(e.ENTITIES[$0])return e.ENTITIES[$0];if(m=$0,m.charAt(0)==="#")if(m.charAt(1)==="x")m=m.slice(2),Y0=parseInt(m,16),Z0=Y0.toString(16);else m=m.slice(1),Y0=parseInt(m,10),Z0=Y0.toString(10);if(m=m.replace(/^0+/,""),isNaN(Y0)||Z0.toLowerCase()!==m||Y0<0||Y0>1114111)return g(e,"Invalid character entity"),"&"+e.entity+";";return String.fromCodePoint(Y0)}function X0(e,m){if(m==="<")e.state=w.OPEN_WAKA,e.startTagPosition=e.position;else if(!M(m))g(e,"Non-whitespace before first tag."),e.textNode=m,e.state=w.TEXT}function a(e,m){var $0="";if(m<e.length)$0=e.charAt(m);return $0}function Q0(e){var m=this;if(this.error)throw this.error;if(m.closed)return u(m,"Cannot write after close. Assign an onready handler.");if(e===null)return b(m);if(typeof e==="object")e=e.toString();var $0=0,Y0="";while(!0){if(Y0=a(e,$0++),m.c=Y0,!Y0)break;if(m.trackPosition)if(m.position++,Y0===`
`)m.line++,m.column=0;else m.column++;switch(m.state){case w.BEGIN:if(m.state=w.BEGIN_WHITESPACE,Y0==="\uFEFF")continue;X0(m,Y0);continue;case w.BEGIN_WHITESPACE:X0(m,Y0);continue;case w.TEXT:if(m.sawRoot&&!m.closedRoot){var F0=$0-1;while(Y0&&Y0!=="<"&&Y0!=="&")if(Y0=a(e,$0++),Y0&&m.trackPosition)if(m.position++,Y0===`
`)m.line++,m.column=0;else m.column++;m.textNode+=e.substring(F0,$0-1)}if(Y0==="<"&&!(m.sawRoot&&m.closedRoot&&!m.strict))m.state=w.OPEN_WAKA,m.startTagPosition=m.position;else{if(!M(Y0)&&(!m.sawRoot||m.closedRoot))g(m,"Text data outside of root node.");if(Y0==="&")m.state=w.TEXT_ENTITY;else m.textNode+=Y0}continue;case w.SCRIPT:if(Y0==="<")m.state=w.SCRIPT_ENDING;else m.script+=Y0;continue;case w.SCRIPT_ENDING:if(Y0==="/")m.state=w.CLOSE_TAG;else m.script+="<"+Y0,m.state=w.SCRIPT;continue;case w.OPEN_WAKA:if(Y0==="!")m.state=w.SGML_DECL,m.sgmlDecl="";else if(M(Y0));else if(_(A,Y0))m.state=w.OPEN_TAG,m.tagName=Y0;else if(Y0==="/")m.state=w.CLOSE_TAG,m.tagName="";else if(Y0==="?")m.state=w.PROC_INST,m.procInstName=m.procInstBody="";else{if(g(m,"Unencoded <"),m.startTagPosition+1<m.position){var Z0=m.position-m.startTagPosition;Y0=Array(Z0).join(" ")+Y0}m.textNode+="<"+Y0,m.state=w.TEXT}continue;case w.SGML_DECL:if(m.sgmlDecl+Y0==="--"){m.state=w.COMMENT,m.comment="",m.sgmlDecl="";continue}if(m.doctype&&m.doctype!==!0&&m.sgmlDecl)m.state=w.DOCTYPE_DTD,m.doctype+="<!"+m.sgmlDecl+Y0,m.sgmlDecl="";else if((m.sgmlDecl+Y0).toUpperCase()===V)x(m,"onopencdata"),m.state=w.CDATA,m.sgmlDecl="",m.cdata="";else if((m.sgmlDecl+Y0).toUpperCase()===F){if(m.state=w.DOCTYPE,m.doctype||m.sawRoot)g(m,"Inappropriately located doctype declaration");m.doctype="",m.sgmlDecl=""}else if(Y0===">")x(m,"onsgmldeclaration",m.sgmlDecl),m.sgmlDecl="",m.state=w.TEXT;else if(R(Y0))m.state=w.SGML_DECL_QUOTED,m.sgmlDecl+=Y0;else m.sgmlDecl+=Y0;continue;case w.SGML_DECL_QUOTED:if(Y0===m.q)m.state=w.SGML_DECL,m.q="";m.sgmlDecl+=Y0;continue;case w.DOCTYPE:if(Y0===">")m.state=w.TEXT,x(m,"ondoctype",m.doctype),m.doctype=!0;else if(m.doctype+=Y0,Y0==="[")m.state=w.DOCTYPE_DTD;else if(R(Y0))m.state=w.DOCTYPE_QUOTED,m.q=Y0;continue;case w.DOCTYPE_QUOTED:if(m.doctype+=Y0,Y0===m.q)m.q="",m.state=w.DOCTYPE;continue;case w.DOCTYPE_DTD:if(Y0==="]")m.doctype+=Y0,m.state=w.DOCTYPE;else if(Y0==="<")m.state=w.OPEN_WAKA,m.startTagPosition=m.position;else if(R(Y0))m.doctype+=Y0,m.state=w.DOCTYPE_DTD_QUOTED,m.q=Y0;else m.doctype+=Y0;continue;case w.DOCTYPE_DTD_QUOTED:if(m.doctype+=Y0,Y0===m.q)m.state=w.DOCTYPE_DTD,m.q="";continue;case w.COMMENT:if(Y0==="-")m.state=w.COMMENT_ENDING;else m.comment+=Y0;continue;case w.COMMENT_ENDING:if(Y0==="-"){if(m.state=w.COMMENT_ENDED,m.comment=d(m.opt,m.comment),m.comment)x(m,"oncomment",m.comment);m.comment=""}else m.comment+="-"+Y0,m.state=w.COMMENT;continue;case w.COMMENT_ENDED:if(Y0!==">")g(m,"Malformed comment"),m.comment+="--"+Y0,m.state=w.COMMENT;else if(m.doctype&&m.doctype!==!0)m.state=w.DOCTYPE_DTD;else m.state=w.TEXT;continue;case w.CDATA:var F0=$0-1;while(Y0&&Y0!=="]")if(Y0=a(e,$0++),Y0&&m.trackPosition)if(m.position++,Y0===`
`)m.line++,m.column=0;else m.column++;if(m.cdata+=e.substring(F0,$0-1),Y0==="]")m.state=w.CDATA_ENDING;continue;case w.CDATA_ENDING:if(Y0==="]")m.state=w.CDATA_ENDING_2;else m.cdata+="]"+Y0,m.state=w.CDATA;continue;case w.CDATA_ENDING_2:if(Y0===">"){if(m.cdata)x(m,"oncdata",m.cdata);x(m,"onclosecdata"),m.cdata="",m.state=w.TEXT}else if(Y0==="]")m.cdata+="]";else m.cdata+="]]"+Y0,m.state=w.CDATA;continue;case w.PROC_INST:if(Y0==="?")m.state=w.PROC_INST_ENDING;else if(M(Y0))m.state=w.PROC_INST_BODY;else m.procInstName+=Y0;continue;case w.PROC_INST_BODY:if(!m.procInstBody&&M(Y0))continue;else if(Y0==="?")m.state=w.PROC_INST_ENDING;else m.procInstBody+=Y0;continue;case w.PROC_INST_ENDING:if(Y0===">"){let P0={name:m.procInstName,body:m.procInstBody};v(m,P0),x(m,"onprocessinginstruction",P0),m.procInstName=m.procInstBody="",m.state=w.TEXT}else m.procInstBody+="?"+Y0,m.state=w.PROC_INST_BODY;continue;case w.OPEN_TAG:if(_(B,Y0))m.tagName+=Y0;else if(p(m),Y0===">")t(m);else if(Y0==="/")m.state=w.OPEN_TAG_SLASH;else{if(!M(Y0))g(m,"Invalid character in tag name");m.state=w.ATTRIB}continue;case w.OPEN_TAG_SLASH:if(Y0===">")t(m,!0),s(m);else g(m,"Forward-slash in opening tag not followed by >"),m.state=w.ATTRIB;continue;case w.ATTRIB:if(M(Y0))continue;else if(Y0===">")t(m);else if(Y0==="/")m.state=w.OPEN_TAG_SLASH;else if(_(A,Y0))m.attribName=Y0,m.attribValue="",m.state=w.ATTRIB_NAME;else g(m,"Invalid attribute name");continue;case w.ATTRIB_NAME:if(Y0==="=")m.state=w.ATTRIB_VALUE;else if(Y0===">")g(m,"Attribute without value"),m.attribValue=m.attribName,n(m),t(m);else if(M(Y0))m.state=w.ATTRIB_NAME_SAW_WHITE;else if(_(B,Y0))m.attribName+=Y0;else g(m,"Invalid attribute name");continue;case w.ATTRIB_NAME_SAW_WHITE:if(Y0==="=")m.state=w.ATTRIB_VALUE;else if(M(Y0))continue;else if(g(m,"Attribute without value"),m.tag.attributes[m.attribName]="",m.attribValue="",x(m,"onattribute",{name:m.attribName,value:""}),m.attribName="",Y0===">")t(m);else if(_(A,Y0))m.attribName=Y0,m.state=w.ATTRIB_NAME;else g(m,"Invalid attribute name"),m.state=w.ATTRIB;continue;case w.ATTRIB_VALUE:if(M(Y0))continue;else if(R(Y0))m.q=Y0,m.state=w.ATTRIB_VALUE_QUOTED;else{if(!m.opt.unquotedAttributeValues)u(m,"Unquoted attribute value");m.state=w.ATTRIB_VALUE_UNQUOTED,m.attribValue=Y0}continue;case w.ATTRIB_VALUE_QUOTED:if(Y0!==m.q){if(Y0==="&")m.state=w.ATTRIB_VALUE_ENTITY_Q;else m.attribValue+=Y0;continue}n(m),m.q="",m.state=w.ATTRIB_VALUE_CLOSED;continue;case w.ATTRIB_VALUE_CLOSED:if(M(Y0))m.state=w.ATTRIB;else if(Y0===">")t(m);else if(Y0==="/")m.state=w.OPEN_TAG_SLASH;else if(_(A,Y0))g(m,"No whitespace between attributes"),m.attribName=Y0,m.attribValue="",m.state=w.ATTRIB_NAME;else g(m,"Invalid attribute name");continue;case w.ATTRIB_VALUE_UNQUOTED:if(!q(Y0)){if(Y0==="&")m.state=w.ATTRIB_VALUE_ENTITY_U;else m.attribValue+=Y0;continue}if(n(m),Y0===">")t(m);else m.state=w.ATTRIB;continue;case w.CLOSE_TAG:if(!m.tagName)if(M(Y0))continue;else if(P(A,Y0))if(m.script)m.script+="</"+Y0,m.state=w.SCRIPT;else g(m,"Invalid tagname in closing tag.");else m.tagName=Y0;else if(Y0===">")s(m);else if(_(B,Y0))m.tagName+=Y0;else if(m.script)m.script+="</"+m.tagName+Y0,m.tagName="",m.state=w.SCRIPT;else{if(!M(Y0))g(m,"Invalid tagname in closing tag");m.state=w.CLOSE_TAG_SAW_WHITE}continue;case w.CLOSE_TAG_SAW_WHITE:if(M(Y0))continue;if(Y0===">")s(m);else g(m,"Invalid characters in closing tag");continue;case w.TEXT_ENTITY:case w.ATTRIB_VALUE_ENTITY_Q:case w.ATTRIB_VALUE_ENTITY_U:var D0,O0;switch(m.state){case w.TEXT_ENTITY:D0=w.TEXT,O0="textNode";break;case w.ATTRIB_VALUE_ENTITY_Q:D0=w.ATTRIB_VALUE_QUOTED,O0="attribValue";break;case w.ATTRIB_VALUE_ENTITY_U:D0=w.ATTRIB_VALUE_UNQUOTED,O0="attribValue";break}if(Y0===";"){var R0=K0(m);if(m.opt.unparsedEntities&&!Object.values($.XML_ENTITIES).includes(R0)){if((m.entityCount+=1)>m.opt.maxEntityCount)u(m,"Parsed entity count exceeds max entity count");if((m.entityDepth+=1)>m.opt.maxEntityDepth)u(m,"Parsed entity depth exceeds max entity depth");m.entity="",m.state=D0,m.write(R0),m.entityDepth-=1}else m[O0]+=R0,m.entity="",m.state=D0}else if(_(m.entity.length?E:O,Y0))m.entity+=Y0;else g(m,"Invalid character in entity name"),m[O0]+="&"+m.entity+Y0,m.entity="",m.state=D0;continue;default:throw Error(m,"Unknown state: "+m.state)}}if(m.position>=m.bufferCheckPosition)G(m);return m}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */if(!String.fromCodePoint)(function(){var e=String.fromCharCode,m=Math.floor,$0=function(){var Y0=16384,Z0=[],F0,D0,O0=-1,R0=arguments.length;if(!R0)return"";var P0="";while(++O0<R0){var f0=Number(arguments[O0]);if(!isFinite(f0)||f0<0||f0>1114111||m(f0)!==f0)throw RangeError("Invalid code point: "+f0);if(f0<=65535)Z0.push(f0);else f0-=65536,F0=(f0>>10)+55296,D0=f0%1024+56320,Z0.push(F0,D0);if(O0+1===R0||Z0.length>Y0)P0+=e.apply(null,Z0),Z0.length=0}return P0};if(Object.defineProperty)Object.defineProperty(String,"fromCodePoint",{value:$0,configurable:!0,writable:!0});else String.fromCodePoint=$0})()})(typeof wY0>"u"?wY0.sax={}:wY0)});var NA4=o((NM$,kp0)=>{var YV9=A0("stream").Transform,XV9=LA4();function GV9($,Y){var X,G,J=XV9.parser(!0,{trim:!0,lowercase:!0});J.onerror=J.onend=Q;function Q(K){J.onerror=J.onend=function(){},Y(K,X)}function W(K,Z){return{name:K||"",value:"",attributes:Z||{},children:[]}}J.oncdata=J.ontext=function(K){if(G)G.value+=K},J.onopentag=function(K){var Z=W(K.name,K.attributes);if(G)Z.parent=G,G.children.push(Z);else X=Z;G=Z},J.onclosetag=function(){if(typeof G.parent<"u"){var K=G;G=G.parent,delete K.parent}},J.write($).close()}function JV9($,Y){function X(){var G=[],J=new YV9({objectMode:!0});return J._transform=function(Q,W,K){G.push(Q),K()},J._flush=function(Q){var W=this,K=Buffer.concat(G);try{Y(K,function(Z,H){if(Z)throw Z;W.push(H)})}catch(Z){W.push(K)}finally{Q()}},J}return{fn:X,name:$}}var DA4={};function Sp0($,Y,X){var G=JV9($,X);Y.forEach(function(J){DA4[J]=G})}Sp0("json",["application/json","text/javascript","application/vnd.api+json"],function($,Y){var X,G;try{G=JSON.parse($)}catch(J){X=J}Y(X,G)});Sp0("xml",["text/xml","application/xml","application/rdf+xml","application/rss+xml","application/atom+xml"],function($,Y){GV9($.toString(),function(X,G){Y(X,G)})});kp0.exports=DA4;kp0.exports.use=Sp0});var BA4=o((QV9)=>{var AA4="\uFEFF";QV9.PrependBOM=vp0;function vp0($,Y){this.encoder=$,this.addBOM=!0}vp0.prototype.write=function($){if(this.addBOM)$=AA4+$,this.addBOM=!1;return this.encoder.write($)};vp0.prototype.end=function(){return this.encoder.end()};QV9.StripBOM=xp0;function xp0($,Y){this.decoder=$,this.pass=!1,this.options=Y||{}}xp0.prototype.write=function($){var Y=this.decoder.write($);if(this.pass||!Y)return Y;if(Y[0]===AA4){if(Y=Y.slice(1),typeof this.options.stripBOM==="function")this.options.stripBOM()}return this.pass=!0,Y};xp0.prototype.end=function(){return this.decoder.end()}});var MA4=o((BM$,EA4)=>{var Ip=qG().Buffer;EA4.exports={utf8:{type:"_internal",bomAware:!0},cesu8:{type:"_internal",bomAware:!0},unicode11utf8:"utf8",ucs2:{type:"_internal",bomAware:!0},utf16le:"ucs2",binary:{type:"_internal"},base64:{type:"_internal"},hex:{type:"_internal"},_internal:yp0};function yp0($,Y){if(this.enc=$.encodingName,this.bomAware=$.bomAware,this.enc==="base64")this.encoder=hp0;else if(this.enc==="cesu8"){if(this.enc="utf8",this.encoder=fp0,Ip.from("eda0bdedb2a9","hex").toString()!=="\uD83D\uDCA9")this.decoder=gp0,this.defaultCharUnicode=Y.defaultCharUnicode}}yp0.prototype.encoder=bp0;yp0.prototype.decoder=OA4;var _Y0=A0("string_decoder").StringDecoder;if(!_Y0.prototype.end)_Y0.prototype.end=function(){};function OA4($,Y){_Y0.call(this,Y.enc)}OA4.prototype=_Y0.prototype;function bp0($,Y){this.enc=Y.enc}bp0.prototype.write=function($){return Ip.from($,this.enc)};bp0.prototype.end=function(){};function hp0($,Y){this.prevStr=""}hp0.prototype.write=function($){$=this.prevStr+$;var Y=$.length-$.length%4;return this.prevStr=$.slice(Y),$=$.slice(0,Y),Ip.from($,"base64")};hp0.prototype.end=function(){return Ip.from(this.prevStr,"base64")};function fp0($,Y){}fp0.prototype.write=function($){var Y=Ip.alloc($.length*3),X=0;for(var G=0;G<$.length;G++){var J=$.charCodeAt(G);if(J<128)Y[X++]=J;else if(J<2048)Y[X++]=192+(J>>>6),Y[X++]=128+(J&63);else Y[X++]=224+(J>>>12),Y[X++]=128+(J>>>6&63),Y[X++]=128+(J&63)}return Y.slice(0,X)};fp0.prototype.end=function(){};function gp0($,Y){this.acc=0,this.contBytes=0,this.accBytes=0,this.defaultCharUnicode=Y.defaultCharUnicode}gp0.prototype.write=function($){var Y=this.acc,X=this.contBytes,G=this.accBytes,J="";for(var Q=0;Q<$.length;Q++){var W=$[Q];if((W&192)!==128){if(X>0)J+=this.defaultCharUnicode,X=0;if(W<128)J+=String.fromCharCode(W);else if(W<224)Y=W&31,X=1,G=1;else if(W<240)Y=W&15,X=2,G=1;else J+=this.defaultCharUnicode}else if(X>0){if(Y=Y<<6|W&63,X--,G++,X===0)if(G===2&&Y<128&&Y>0)J+=this.defaultCharUnicode;else if(G===3&&Y<2048)J+=this.defaultCharUnicode;else J+=String.fromCharCode(Y)}else J+=this.defaultCharUnicode}return this.acc=Y,this.contBytes=X,this.accBytes=G,J};gp0.prototype.end=function(){var $=0;if(this.contBytes>0)$+=this.defaultCharUnicode;return $}});var qA4=o((ZV9)=>{var jY0=qG().Buffer;ZV9.utf16be=TY0;function TY0(){}TY0.prototype.encoder=mp0;TY0.prototype.decoder=up0;TY0.prototype.bomAware=!0;function mp0(){}mp0.prototype.write=function($){var Y=jY0.from($,"ucs2");for(var X=0;X<Y.length;X+=2){var G=Y[X];Y[X]=Y[X+1],Y[X+1]=G}return Y};mp0.prototype.end=function(){};function up0(){this.overflowByte=-1}up0.prototype.write=function($){if($.length==0)return"";var Y=jY0.alloc($.length+1),X=0,G=0;if(this.overflowByte!==-1)Y[0]=$[0],Y[1]=this.overflowByte,X=1,G=2;for(;X<$.length-1;X+=2,G+=2)Y[G]=$[X+1],Y[G+1]=$[X];return this.overflowByte=X==$.length-1?$[$.length-1]:-1,Y.slice(0,G).toString("ucs2")};up0.prototype.end=function(){};ZV9.utf16=pp0;function pp0($,Y){this.iconv=Y}pp0.prototype.encoder=dp0;pp0.prototype.decoder=cp0;function dp0($,Y){if($=$||{},$.addBOM===void 0)$.addBOM=!0;this.encoder=Y.iconv.getEncoder("utf-16le",$)}dp0.prototype.write=function($){return this.encoder.write($)};dp0.prototype.end=function(){return this.encoder.end()};function cp0($,Y){this.decoder=null,this.initialBytes=[],this.initialBytesLen=0,this.options=$||{},this.iconv=Y.iconv}cp0.prototype.write=function($){if(!this.decoder){if(this.initialBytes.push($),this.initialBytesLen+=$.length,this.initialBytesLen<16)return"";var $=jY0.concat(this.initialBytes),Y=RA4($,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(Y,this.options),this.initialBytes.length=this.initialBytesLen=0}return this.decoder.write($)};cp0.prototype.end=function(){if(!this.decoder){var $=jY0.concat(this.initialBytes),Y=RA4($,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(Y,this.options);var X=this.decoder.write($),G=this.decoder.end();return G?X+G:X}return this.decoder.end()};function RA4($,Y){var X=Y||"utf-16le";if($.length>=2)if($[0]==254&&$[1]==255)X="utf-16be";else if($[0]==255&&$[1]==254)X="utf-16le";else{var G=0,J=0,Q=Math.min($.length-$.length%2,64);for(var W=0;W<Q;W+=2){if($[W]===0&&$[W+1]!==0)J++;if($[W]!==0&&$[W+1]===0)G++}if(J>G)X="utf-16be";else if(J<G)X="utf-16le"}return X}});var wA4=o((LV9)=>{var KH=qG().Buffer;LV9.utf7=IY0;LV9.unicode11utf7="utf7";function IY0($,Y){this.iconv=Y}IY0.prototype.encoder=ip0;IY0.prototype.decoder=np0;IY0.prototype.bomAware=!0;var zV9=/[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g;function ip0($,Y){this.iconv=Y.iconv}ip0.prototype.write=function($){return KH.from($.replace(zV9,function(Y){return"+"+(Y==="+"?"":this.iconv.encode(Y,"utf16-be").toString("base64").replace(/=+$/,""))+"-"}.bind(this)))};ip0.prototype.end=function(){};function np0($,Y){this.iconv=Y.iconv,this.inBase64=!1,this.base64Accum=""}var VV9=/[A-Za-z0-9\/+]/,rp0=[];for(WC=0;WC<256;WC++)rp0[WC]=VV9.test(String.fromCharCode(WC));var WC,FV9=43,_M=45,lp0=38;np0.prototype.write=function($){var Y="",X=0,G=this.inBase64,J=this.base64Accum;for(var Q=0;Q<$.length;Q++)if(!G){if($[Q]==FV9)Y+=this.iconv.decode($.slice(X,Q),"ascii"),X=Q+1,G=!0}else if(!rp0[$[Q]]){if(Q==X&&$[Q]==_M)Y+="+";else{var W=J+$.slice(X,Q).toString();Y+=this.iconv.decode(KH.from(W,"base64"),"utf16-be")}if($[Q]!=_M)Q--;X=Q+1,G=!1,J=""}if(!G)Y+=this.iconv.decode($.slice(X),"ascii");else{var W=J+$.slice(X).toString(),K=W.length-W.length%8;J=W.slice(K),W=W.slice(0,K),Y+=this.iconv.decode(KH.from(W,"base64"),"utf16-be")}return this.inBase64=G,this.base64Accum=J,Y};np0.prototype.end=function(){var $="";if(this.inBase64&&this.base64Accum.length>0)$=this.iconv.decode(KH.from(this.base64Accum,"base64"),"utf16-be");return this.inBase64=!1,this.base64Accum="",$};LV9.utf7imap=CY0;function CY0($,Y){this.iconv=Y}CY0.prototype.encoder=ap0;CY0.prototype.decoder=sp0;CY0.prototype.bomAware=!0;function ap0($,Y){this.iconv=Y.iconv,this.inBase64=!1,this.base64Accum=KH.alloc(6),this.base64AccumIdx=0}ap0.prototype.write=function($){var Y=this.inBase64,X=this.base64Accum,G=this.base64AccumIdx,J=KH.alloc($.length*5+10),Q=0;for(var W=0;W<$.length;W++){var K=$.charCodeAt(W);if(32<=K&&K<=126){if(Y){if(G>0)Q+=J.write(X.slice(0,G).toString("base64").replace(/\//g,",").replace(/=+$/,""),Q),G=0;J[Q++]=_M,Y=!1}if(!Y){if(J[Q++]=K,K===lp0)J[Q++]=_M}}else{if(!Y)J[Q++]=lp0,Y=!0;if(Y){if(X[G++]=K>>8,X[G++]=K&255,G==X.length)Q+=J.write(X.toString("base64").replace(/\//g,","),Q),G=0}}}return this.inBase64=Y,this.base64AccumIdx=G,J.slice(0,Q)};ap0.prototype.end=function(){var $=KH.alloc(10),Y=0;if(this.inBase64){if(this.base64AccumIdx>0)Y+=$.write(this.base64Accum.slice(0,this.base64AccumIdx).toString("base64").replace(/\//g,",").replace(/=+$/,""),Y),this.base64AccumIdx=0;$[Y++]=_M,this.inBase64=!1}return $.slice(0,Y)};function sp0($,Y){this.iconv=Y.iconv,this.inBase64=!1,this.base64Accum=""}var PA4=rp0.slice();PA4[44]=!0;sp0.prototype.write=function($){var Y="",X=0,G=this.inBase64,J=this.base64Accum;for(var Q=0;Q<$.length;Q++)if(!G){if($[Q]==lp0)Y+=this.iconv.decode($.slice(X,Q),"ascii"),X=Q+1,G=!0}else if(!PA4[$[Q]]){if(Q==X&&$[Q]==_M)Y+="&";else{var W=J+$.slice(X,Q).toString().replace(/,/g,"/");Y+=this.iconv.decode(KH.from(W,"base64"),"utf16-be")}if($[Q]!=_M)Q--;X=Q+1,G=!1,J=""}if(!G)Y+=this.iconv.decode($.slice(X),"ascii");else{var W=J+$.slice(X).toString().replace(/,/g,"/"),K=W.length-W.length%8;J=W.slice(K),W=W.slice(0,K),Y+=this.iconv.decode(KH.from(W,"base64"),"utf16-be")}return this.inBase64=G,this.base64Accum=J,Y};sp0.prototype.end=function(){var $="";if(this.inBase64&&this.base64Accum.length>0)$=this.iconv.decode(KH.from(this.base64Accum,"base64"),"utf16-be");return this.inBase64=!1,this.base64Accum="",$}});var _A4=o((BV9)=>{var SY0=qG().Buffer;BV9._sbcs=op0;function op0($,Y){if(!$)throw Error("SBCS codec is called without the data.");if(!$.chars||$.chars.length!==128&&$.chars.length!==256)throw Error("Encoding '"+$.type+"' has incorrect 'chars' (must be of len 128 or 256)");if($.chars.length===128){var X="";for(var G=0;G<128;G++)X+=String.fromCharCode(G);$.chars=X+$.chars}this.decodeBuf=SY0.from($.chars,"ucs2");var J=SY0.alloc(65536,Y.defaultCharSingleByte.charCodeAt(0));for(var G=0;G<$.chars.length;G++)J[$.chars.charCodeAt(G)]=G;this.encodeBuf=J}op0.prototype.encoder=tp0;op0.prototype.decoder=ep0;function tp0($,Y){this.encodeBuf=Y.encodeBuf}tp0.prototype.write=function($){var Y=SY0.alloc($.length);for(var X=0;X<$.length;X++)Y[X]=this.encodeBuf[$.charCodeAt(X)];return Y};tp0.prototype.end=function(){};function ep0($,Y){this.decodeBuf=Y.decodeBuf}ep0.prototype.write=function($){var Y=this.decodeBuf,X=SY0.alloc($.length*2),G=0,J=0;for(var Q=0;Q<$.length;Q++)G=$[Q]*2,J=Q*2,X[J]=Y[G],X[J+1]=Y[G+1];return X.toString("ucs2")};ep0.prototype.end=function(){}});var TA4=o((RM$,jA4)=>{jA4.exports={"10029":"maccenteuro",maccenteuro:{type:"_sbcs",chars:"\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026\xA0\u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7"},"808":"cp808",ibm808:"cp808",cp808:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0404\u0454\u0407\u0457\u040E\u045E\xB0\u2219\xB7\u221A\u2116\u20AC\u25A0\xA0"},mik:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2514\u2534\u252C\u251C\u2500\u253C\u2563\u2551\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2510\u2591\u2592\u2593\u2502\u2524\u2116\xA7\u2557\u255D\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ascii8bit:"ascii",usascii:"ascii",ansix34:"ascii",ansix341968:"ascii",ansix341986:"ascii",csascii:"ascii",cp367:"ascii",ibm367:"ascii",isoir6:"ascii",iso646us:"ascii",iso646irv:"ascii",us:"ascii",latin1:"iso88591",latin2:"iso88592",latin3:"iso88593",latin4:"iso88594",latin5:"iso88599",latin6:"iso885910",latin7:"iso885913",latin8:"iso885914",latin9:"iso885915",latin10:"iso885916",csisolatin1:"iso88591",csisolatin2:"iso88592",csisolatin3:"iso88593",csisolatin4:"iso88594",csisolatincyrillic:"iso88595",csisolatinarabic:"iso88596",csisolatingreek:"iso88597",csisolatinhebrew:"iso88598",csisolatin5:"iso88599",csisolatin6:"iso885910",l1:"iso88591",l2:"iso88592",l3:"iso88593",l4:"iso88594",l5:"iso88599",l6:"iso885910",l7:"iso885913",l8:"iso885914",l9:"iso885915",l10:"iso885916",isoir14:"iso646jp",isoir57:"iso646cn",isoir100:"iso88591",isoir101:"iso88592",isoir109:"iso88593",isoir110:"iso88594",isoir144:"iso88595",isoir127:"iso88596",isoir126:"iso88597",isoir138:"iso88598",isoir148:"iso88599",isoir157:"iso885910",isoir166:"tis620",isoir179:"iso885913",isoir199:"iso885914",isoir203:"iso885915",isoir226:"iso885916",cp819:"iso88591",ibm819:"iso88591",cyrillic:"iso88595",arabic:"iso88596",arabic8:"iso88596",ecma114:"iso88596",asmo708:"iso88596",greek:"iso88597",greek8:"iso88597",ecma118:"iso88597",elot928:"iso88597",hebrew:"iso88598",hebrew8:"iso88598",turkish:"iso88599",turkish8:"iso88599",thai:"iso885911",thai8:"iso885911",celtic:"iso885914",celtic8:"iso885914",isoceltic:"iso885914",tis6200:"tis620",tis62025291:"tis620",tis62025330:"tis620","10000":"macroman","10006":"macgreek","10007":"maccyrillic","10079":"maciceland","10081":"macturkish",cspc8codepage437:"cp437",cspc775baltic:"cp775",cspc850multilingual:"cp850",cspcp852:"cp852",cspc862latinhebrew:"cp862",cpgr:"cp869",msee:"cp1250",mscyrl:"cp1251",msansi:"cp1252",msgreek:"cp1253",msturk:"cp1254",mshebr:"cp1255",msarab:"cp1256",winbaltrim:"cp1257",cp20866:"koi8r","20866":"koi8r",ibm878:"koi8r",cskoi8r:"koi8r",cp21866:"koi8u","21866":"koi8u",ibm1168:"koi8u",strk10482002:"rk1048",tcvn5712:"tcvn",tcvn57121:"tcvn",gb198880:"iso646cn",cn:"iso646cn",csiso14jisc6220ro:"iso646jp",jisc62201969ro:"iso646jp",jp:"iso646jp",cshproman8:"hproman8",r8:"hproman8",roman8:"hproman8",xroman8:"hproman8",ibm1051:"hproman8",mac:"macintosh",csmacintosh:"macintosh"}});var CA4=o((qM$,IA4)=>{IA4.exports={"437":"cp437","737":"cp737","775":"cp775","850":"cp850","852":"cp852","855":"cp855","856":"cp856","857":"cp857","858":"cp858","860":"cp860","861":"cp861","862":"cp862","863":"cp863","864":"cp864","865":"cp865","866":"cp866","869":"cp869","874":"windows874","922":"cp922","1046":"cp1046","1124":"cp1124","1125":"cp1125","1129":"cp1129","1133":"cp1133","1161":"cp1161","1162":"cp1162","1163":"cp1163","1250":"windows1250","1251":"windows1251","1252":"windows1252","1253":"windows1253","1254":"windows1254","1255":"windows1255","1256":"windows1256","1257":"windows1257","1258":"windows1258","28591":"iso88591","28592":"iso88592","28593":"iso88593","28594":"iso88594","28595":"iso88595","28596":"iso88596","28597":"iso88597","28598":"iso88598","28599":"iso88599","28600":"iso885910","28601":"iso885911","28603":"iso885913","28604":"iso885914","28605":"iso885915","28606":"iso885916",windows874:{type:"_sbcs",chars:"\u20AC\uFFFD\uFFFD\uFFFD\uFFFD\u2026\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"},win874:"windows874",cp874:"windows874",windows1250:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\uFFFD\u201E\u2026\u2020\u2021\uFFFD\u2030\u0160\u2039\u015A\u0164\u017D\u0179\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0161\u203A\u015B\u0165\u017E\u017A\xA0\u02C7\u02D8\u0141\xA4\u0104\xA6\xA7\xA8\xA9\u015E\xAB\xAC\xAD\xAE\u017B\xB0\xB1\u02DB\u0142\xB4\xB5\xB6\xB7\xB8\u0105\u015F\xBB\u013D\u02DD\u013E\u017C\u0154\xC1\xC2\u0102\xC4\u0139\u0106\xC7\u010C\xC9\u0118\xCB\u011A\xCD\xCE\u010E\u0110\u0143\u0147\xD3\xD4\u0150\xD6\xD7\u0158\u016E\xDA\u0170\xDC\xDD\u0162\xDF\u0155\xE1\xE2\u0103\xE4\u013A\u0107\xE7\u010D\xE9\u0119\xEB\u011B\xED\xEE\u010F\u0111\u0144\u0148\xF3\xF4\u0151\xF6\xF7\u0159\u016F\xFA\u0171\xFC\xFD\u0163\u02D9"},win1250:"windows1250",cp1250:"windows1250",windows1251:{type:"_sbcs",chars:"\u0402\u0403\u201A\u0453\u201E\u2026\u2020\u2021\u20AC\u2030\u0409\u2039\u040A\u040C\u040B\u040F\u0452\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0459\u203A\u045A\u045C\u045B\u045F\xA0\u040E\u045E\u0408\xA4\u0490\xA6\xA7\u0401\xA9\u0404\xAB\xAC\xAD\xAE\u0407\xB0\xB1\u0406\u0456\u0491\xB5\xB6\xB7\u0451\u2116\u0454\xBB\u0458\u0405\u0455\u0457\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F"},win1251:"windows1251",cp1251:"windows1251",windows1252:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\uFFFD\u017D\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\uFFFD\u017E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},win1252:"windows1252",cp1252:"windows1252",windows1253:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\uFFFD\u2030\uFFFD\u2039\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\xA0\u0385\u0386\xA3\xA4\xA5\xA6\xA7\xA8\xA9\uFFFD\xAB\xAC\xAD\xAE\u2015\xB0\xB1\xB2\xB3\u0384\xB5\xB6\xB7\u0388\u0389\u038A\xBB\u038C\xBD\u038E\u038F\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\uFFFD\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03AA\u03AB\u03AC\u03AD\u03AE\u03AF\u03B0\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u03CA\u03CB\u03CC\u03CD\u03CE\uFFFD"},win1253:"windows1253",cp1253:"windows1253",windows1254:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\uFFFD\uFFFD\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u011E\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u0130\u015E\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u011F\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u0131\u015F\xFF"},win1254:"windows1254",cp1254:"windows1254",windows1255:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\uFFFD\u2039\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\xA0\xA1\xA2\xA3\u20AA\xA5\xA6\xA7\xA8\xA9\xD7\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xF7\xBB\xBC\xBD\xBE\xBF\u05B0\u05B1\u05B2\u05B3\u05B4\u05B5\u05B6\u05B7\u05B8\u05B9\u05BA\u05BB\u05BC\u05BD\u05BE\u05BF\u05C0\u05C1\u05C2\u05C3\u05F0\u05F1\u05F2\u05F3\u05F4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\uFFFD\u200E\u200F\uFFFD"},win1255:"windows1255",cp1255:"windows1255",windows1256:{type:"_sbcs",chars:"\u20AC\u067E\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0679\u2039\u0152\u0686\u0698\u0688\u06AF\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u06A9\u2122\u0691\u203A\u0153\u200C\u200D\u06BA\xA0\u060C\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\u06BE\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\u061B\xBB\xBC\xBD\xBE\u061F\u06C1\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\xD7\u0637\u0638\u0639\u063A\u0640\u0641\u0642\u0643\xE0\u0644\xE2\u0645\u0646\u0647\u0648\xE7\xE8\xE9\xEA\xEB\u0649\u064A\xEE\xEF\u064B\u064C\u064D\u064E\xF4\u064F\u0650\xF7\u0651\xF9\u0652\xFB\xFC\u200E\u200F\u06D2"},win1256:"windows1256",cp1256:"windows1256",windows1257:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\uFFFD\u201E\u2026\u2020\u2021\uFFFD\u2030\uFFFD\u2039\uFFFD\xA8\u02C7\xB8\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\xAF\u02DB\uFFFD\xA0\uFFFD\xA2\xA3\xA4\uFFFD\xA6\xA7\xD8\xA9\u0156\xAB\xAC\xAD\xAE\xC6\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xF8\xB9\u0157\xBB\xBC\xBD\xBE\xE6\u0104\u012E\u0100\u0106\xC4\xC5\u0118\u0112\u010C\xC9\u0179\u0116\u0122\u0136\u012A\u013B\u0160\u0143\u0145\xD3\u014C\xD5\xD6\xD7\u0172\u0141\u015A\u016A\xDC\u017B\u017D\xDF\u0105\u012F\u0101\u0107\xE4\xE5\u0119\u0113\u010D\xE9\u017A\u0117\u0123\u0137\u012B\u013C\u0161\u0144\u0146\xF3\u014D\xF5\xF6\xF7\u0173\u0142\u015B\u016B\xFC\u017C\u017E\u02D9"},win1257:"windows1257",cp1257:"windows1257",windows1258:{type:"_sbcs",chars:"\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\uFFFD\u2039\u0152\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\uFFFD\u203A\u0153\uFFFD\uFFFD\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF"},win1258:"windows1258",cp1258:"windows1258",iso88591:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},cp28591:"iso88591",iso88592:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u02D8\u0141\xA4\u013D\u015A\xA7\xA8\u0160\u015E\u0164\u0179\xAD\u017D\u017B\xB0\u0105\u02DB\u0142\xB4\u013E\u015B\u02C7\xB8\u0161\u015F\u0165\u017A\u02DD\u017E\u017C\u0154\xC1\xC2\u0102\xC4\u0139\u0106\xC7\u010C\xC9\u0118\xCB\u011A\xCD\xCE\u010E\u0110\u0143\u0147\xD3\xD4\u0150\xD6\xD7\u0158\u016E\xDA\u0170\xDC\xDD\u0162\xDF\u0155\xE1\xE2\u0103\xE4\u013A\u0107\xE7\u010D\xE9\u0119\xEB\u011B\xED\xEE\u010F\u0111\u0144\u0148\xF3\xF4\u0151\xF6\xF7\u0159\u016F\xFA\u0171\xFC\xFD\u0163\u02D9"},cp28592:"iso88592",iso88593:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0126\u02D8\xA3\xA4\uFFFD\u0124\xA7\xA8\u0130\u015E\u011E\u0134\xAD\uFFFD\u017B\xB0\u0127\xB2\xB3\xB4\xB5\u0125\xB7\xB8\u0131\u015F\u011F\u0135\xBD\uFFFD\u017C\xC0\xC1\xC2\uFFFD\xC4\u010A\u0108\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\uFFFD\xD1\xD2\xD3\xD4\u0120\xD6\xD7\u011C\xD9\xDA\xDB\xDC\u016C\u015C\xDF\xE0\xE1\xE2\uFFFD\xE4\u010B\u0109\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\uFFFD\xF1\xF2\xF3\xF4\u0121\xF6\xF7\u011D\xF9\xFA\xFB\xFC\u016D\u015D\u02D9"},cp28593:"iso88593",iso88594:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0138\u0156\xA4\u0128\u013B\xA7\xA8\u0160\u0112\u0122\u0166\xAD\u017D\xAF\xB0\u0105\u02DB\u0157\xB4\u0129\u013C\u02C7\xB8\u0161\u0113\u0123\u0167\u014A\u017E\u014B\u0100\xC1\xC2\xC3\xC4\xC5\xC6\u012E\u010C\xC9\u0118\xCB\u0116\xCD\xCE\u012A\u0110\u0145\u014C\u0136\xD4\xD5\xD6\xD7\xD8\u0172\xDA\xDB\xDC\u0168\u016A\xDF\u0101\xE1\xE2\xE3\xE4\xE5\xE6\u012F\u010D\xE9\u0119\xEB\u0117\xED\xEE\u012B\u0111\u0146\u014D\u0137\xF4\xF5\xF6\xF7\xF8\u0173\xFA\xFB\xFC\u0169\u016B\u02D9"},cp28594:"iso88594",iso88595:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0401\u0402\u0403\u0404\u0405\u0406\u0407\u0408\u0409\u040A\u040B\u040C\xAD\u040E\u040F\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2116\u0451\u0452\u0453\u0454\u0455\u0456\u0457\u0458\u0459\u045A\u045B\u045C\xA7\u045E\u045F"},cp28595:"iso88595",iso88596:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\uFFFD\uFFFD\xA4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u060C\xAD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u061B\uFFFD\uFFFD\uFFFD\u061F\uFFFD\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"},cp28596:"iso88596",iso88597:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u2018\u2019\xA3\u20AC\u20AF\xA6\xA7\xA8\xA9\u037A\xAB\xAC\xAD\uFFFD\u2015\xB0\xB1\xB2\xB3\u0384\u0385\u0386\xB7\u0388\u0389\u038A\xBB\u038C\xBD\u038E\u038F\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\uFFFD\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03AA\u03AB\u03AC\u03AD\u03AE\u03AF\u03B0\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u03CA\u03CB\u03CC\u03CD\u03CE\uFFFD"},cp28597:"iso88597",iso88598:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xD7\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xF7\xBB\xBC\xBD\xBE\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2017\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\uFFFD\u200E\u200F\uFFFD"},cp28598:"iso88598",iso88599:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u011E\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u0130\u015E\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u011F\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u0131\u015F\xFF"},cp28599:"iso88599",iso885910:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0112\u0122\u012A\u0128\u0136\xA7\u013B\u0110\u0160\u0166\u017D\xAD\u016A\u014A\xB0\u0105\u0113\u0123\u012B\u0129\u0137\xB7\u013C\u0111\u0161\u0167\u017E\u2015\u016B\u014B\u0100\xC1\xC2\xC3\xC4\xC5\xC6\u012E\u010C\xC9\u0118\xCB\u0116\xCD\xCE\xCF\xD0\u0145\u014C\xD3\xD4\xD5\xD6\u0168\xD8\u0172\xDA\xDB\xDC\xDD\xDE\xDF\u0101\xE1\xE2\xE3\xE4\xE5\xE6\u012F\u010D\xE9\u0119\xEB\u0117\xED\xEE\xEF\xF0\u0146\u014D\xF3\xF4\xF5\xF6\u0169\xF8\u0173\xFA\xFB\xFC\xFD\xFE\u0138"},cp28600:"iso885910",iso885911:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"},cp28601:"iso885911",iso885913:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u201D\xA2\xA3\xA4\u201E\xA6\xA7\xD8\xA9\u0156\xAB\xAC\xAD\xAE\xC6\xB0\xB1\xB2\xB3\u201C\xB5\xB6\xB7\xF8\xB9\u0157\xBB\xBC\xBD\xBE\xE6\u0104\u012E\u0100\u0106\xC4\xC5\u0118\u0112\u010C\xC9\u0179\u0116\u0122\u0136\u012A\u013B\u0160\u0143\u0145\xD3\u014C\xD5\xD6\xD7\u0172\u0141\u015A\u016A\xDC\u017B\u017D\xDF\u0105\u012F\u0101\u0107\xE4\xE5\u0119\u0113\u010D\xE9\u017A\u0117\u0123\u0137\u012B\u013C\u0161\u0144\u0146\xF3\u014D\xF5\xF6\xF7\u0173\u0142\u015B\u016B\xFC\u017C\u017E\u2019"},cp28603:"iso885913",iso885914:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u1E02\u1E03\xA3\u010A\u010B\u1E0A\xA7\u1E80\xA9\u1E82\u1E0B\u1EF2\xAD\xAE\u0178\u1E1E\u1E1F\u0120\u0121\u1E40\u1E41\xB6\u1E56\u1E81\u1E57\u1E83\u1E60\u1EF3\u1E84\u1E85\u1E61\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0174\xD1\xD2\xD3\xD4\xD5\xD6\u1E6A\xD8\xD9\xDA\xDB\xDC\xDD\u0176\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0175\xF1\xF2\xF3\xF4\xF5\xF6\u1E6B\xF8\xF9\xFA\xFB\xFC\xFD\u0177\xFF"},cp28604:"iso885914",iso885915:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\u20AC\xA5\u0160\xA7\u0161\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u017D\xB5\xB6\xB7\u017E\xB9\xBA\xBB\u0152\u0153\u0178\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},cp28605:"iso885915",iso885916:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0105\u0141\u20AC\u201E\u0160\xA7\u0161\xA9\u0218\xAB\u0179\xAD\u017A\u017B\xB0\xB1\u010C\u0142\u017D\u201D\xB6\xB7\u017E\u010D\u0219\xBB\u0152\u0153\u0178\u017C\xC0\xC1\xC2\u0102\xC4\u0106\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0110\u0143\xD2\xD3\xD4\u0150\xD6\u015A\u0170\xD9\xDA\xDB\xDC\u0118\u021A\xDF\xE0\xE1\xE2\u0103\xE4\u0107\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0111\u0144\xF2\xF3\xF4\u0151\xF6\u015B\u0171\xF9\xFA\xFB\xFC\u0119\u021B\xFF"},cp28606:"iso885916",cp437:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm437:"cp437",csibm437:"cp437",cp737:{type:"_sbcs",chars:"\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C2\u03C4\u03C5\u03C6\u03C7\u03C8\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03C9\u03AC\u03AD\u03AE\u03CA\u03AF\u03CC\u03CD\u03CB\u03CE\u0386\u0388\u0389\u038A\u038C\u038E\u038F\xB1\u2265\u2264\u03AA\u03AB\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm737:"cp737",csibm737:"cp737",cp775:{type:"_sbcs",chars:"\u0106\xFC\xE9\u0101\xE4\u0123\xE5\u0107\u0142\u0113\u0156\u0157\u012B\u0179\xC4\xC5\xC9\xE6\xC6\u014D\xF6\u0122\xA2\u015A\u015B\xD6\xDC\xF8\xA3\xD8\xD7\xA4\u0100\u012A\xF3\u017B\u017C\u017A\u201D\xA6\xA9\xAE\xAC\xBD\xBC\u0141\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u0104\u010C\u0118\u0116\u2563\u2551\u2557\u255D\u012E\u0160\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u0172\u016A\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u017D\u0105\u010D\u0119\u0117\u012F\u0161\u0173\u016B\u017E\u2518\u250C\u2588\u2584\u258C\u2590\u2580\xD3\xDF\u014C\u0143\xF5\xD5\xB5\u0144\u0136\u0137\u013B\u013C\u0146\u0112\u0145\u2019\xAD\xB1\u201C\xBE\xB6\xA7\xF7\u201E\xB0\u2219\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm775:"cp775",csibm775:"cp775",cp850:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\xD7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xF0\xD0\xCA\xCB\xC8\u0131\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\xFE\xDE\xDA\xDB\xD9\xFD\xDD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm850:"cp850",csibm850:"cp850",cp852:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\u016F\u0107\xE7\u0142\xEB\u0150\u0151\xEE\u0179\xC4\u0106\xC9\u0139\u013A\xF4\xF6\u013D\u013E\u015A\u015B\xD6\xDC\u0164\u0165\u0141\xD7\u010D\xE1\xED\xF3\xFA\u0104\u0105\u017D\u017E\u0118\u0119\xAC\u017A\u010C\u015F\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\u011A\u015E\u2563\u2551\u2557\u255D\u017B\u017C\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u0102\u0103\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\u0111\u0110\u010E\xCB\u010F\u0147\xCD\xCE\u011B\u2518\u250C\u2588\u2584\u0162\u016E\u2580\xD3\xDF\xD4\u0143\u0144\u0148\u0160\u0161\u0154\xDA\u0155\u0170\xFD\xDD\u0163\xB4\xAD\u02DD\u02DB\u02C7\u02D8\xA7\xF7\xB8\xB0\xA8\u02D9\u0171\u0158\u0159\u25A0\xA0"},ibm852:"cp852",csibm852:"cp852",cp855:{type:"_sbcs",chars:"\u0452\u0402\u0453\u0403\u0451\u0401\u0454\u0404\u0455\u0405\u0456\u0406\u0457\u0407\u0458\u0408\u0459\u0409\u045A\u040A\u045B\u040B\u045C\u040C\u045E\u040E\u045F\u040F\u044E\u042E\u044A\u042A\u0430\u0410\u0431\u0411\u0446\u0426\u0434\u0414\u0435\u0415\u0444\u0424\u0433\u0413\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u0445\u0425\u0438\u0418\u2563\u2551\u2557\u255D\u0439\u0419\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u043A\u041A\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\u043B\u041B\u043C\u041C\u043D\u041D\u043E\u041E\u043F\u2518\u250C\u2588\u2584\u041F\u044F\u2580\u042F\u0440\u0420\u0441\u0421\u0442\u0422\u0443\u0423\u0436\u0416\u0432\u0412\u044C\u042C\u2116\xAD\u044B\u042B\u0437\u0417\u0448\u0428\u044D\u042D\u0449\u0429\u0447\u0427\xA7\u25A0\xA0"},ibm855:"cp855",csibm855:"cp855",cp856:{type:"_sbcs",chars:"\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\xA3\uFFFD\xD7\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xAE\xAC\xBD\xBC\uFFFD\xAB\xBB\u2591\u2592\u2593\u2502\u2524\uFFFD\uFFFD\uFFFD\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\uFFFD\uFFFD\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2518\u250C\u2588\u2584\xA6\uFFFD\u2580\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xB5\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm856:"cp856",csibm856:"cp856",cp857:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\u0131\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\u0130\xD6\xDC\xF8\xA3\xD8\u015E\u015F\xE1\xED\xF3\xFA\xF1\xD1\u011E\u011F\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xBA\xAA\xCA\xCB\xC8\uFFFD\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\uFFFD\xD7\xDA\xDB\xD9\xEC\xFF\xAF\xB4\xAD\xB1\uFFFD\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm857:"cp857",csibm857:"cp857",cp858:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\xD7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xF0\xD0\xCA\xCB\xC8\u20AC\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\xFE\xDE\xDA\xDB\xD9\xFD\xDD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0"},ibm858:"cp858",csibm858:"cp858",cp860:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE3\xE0\xC1\xE7\xEA\xCA\xE8\xCD\xD4\xEC\xC3\xC2\xC9\xC0\xC8\xF4\xF5\xF2\xDA\xF9\xCC\xD5\xDC\xA2\xA3\xD9\u20A7\xD3\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xD2\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm860:"cp860",csibm860:"cp860",cp861:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xD0\xF0\xDE\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xFE\xFB\xDD\xFD\xD6\xDC\xF8\xA3\xD8\u20A7\u0192\xE1\xED\xF3\xFA\xC1\xCD\xD3\xDA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm861:"cp861",csibm861:"cp861",cp862:{type:"_sbcs",chars:"\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm862:"cp862",csibm862:"cp862",cp863:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xC2\xE0\xB6\xE7\xEA\xEB\xE8\xEF\xEE\u2017\xC0\xA7\xC9\xC8\xCA\xF4\xCB\xCF\xFB\xF9\xA4\xD4\xDC\xA2\xA3\xD9\xDB\u0192\xA6\xB4\xF3\xFA\xA8\xB8\xB3\xAF\xCE\u2310\xAC\xBD\xBC\xBE\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm863:"cp863",csibm863:"cp863",cp864:{type:"_sbcs",chars:`\x00\x01\x02\x03\x04\x05\x06\x07\b	
\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#$\u066A&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\xB0\xB7\u2219\u221A\u2592\u2500\u2502\u253C\u2524\u252C\u251C\u2534\u2510\u250C\u2514\u2518\u03B2\u221E\u03C6\xB1\xBD\xBC\u2248\xAB\xBB\uFEF7\uFEF8\uFFFD\uFFFD\uFEFB\uFEFC\uFFFD\xA0\xAD\uFE82\xA3\xA4\uFE84\uFFFD\uFFFD\uFE8E\uFE8F\uFE95\uFE99\u060C\uFE9D\uFEA1\uFEA5\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\uFED1\u061B\uFEB1\uFEB5\uFEB9\u061F\xA2\uFE80\uFE81\uFE83\uFE85\uFECA\uFE8B\uFE8D\uFE91\uFE93\uFE97\uFE9B\uFE9F\uFEA3\uFEA7\uFEA9\uFEAB\uFEAD\uFEAF\uFEB3\uFEB7\uFEBB\uFEBF\uFEC1\uFEC5\uFECB\uFECF\xA6\xAC\xF7\xD7\uFEC9\u0640\uFED3\uFED7\uFEDB\uFEDF\uFEE3\uFEE7\uFEEB\uFEED\uFEEF\uFEF3\uFEBD\uFECC\uFECE\uFECD\uFEE1\uFE7D\u0651\uFEE5\uFEE9\uFEEC\uFEF0\uFEF2\uFED0\uFED5\uFEF5\uFEF6\uFEDD\uFED9\uFEF1\u25A0\uFFFD`},ibm864:"cp864",csibm864:"cp864",cp865:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xA4\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm865:"cp865",csibm865:"cp865",cp866:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0404\u0454\u0407\u0457\u040E\u045E\xB0\u2219\xB7\u221A\u2116\xA4\u25A0\xA0"},ibm866:"cp866",csibm866:"cp866",cp869:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0386\uFFFD\xB7\xAC\xA6\u2018\u2019\u0388\u2015\u0389\u038A\u03AA\u038C\uFFFD\uFFFD\u038E\u03AB\xA9\u038F\xB2\xB3\u03AC\xA3\u03AD\u03AE\u03AF\u03CA\u0390\u03CC\u03CD\u0391\u0392\u0393\u0394\u0395\u0396\u0397\xBD\u0398\u0399\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u039A\u039B\u039C\u039D\u2563\u2551\u2557\u255D\u039E\u039F\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u03A0\u03A1\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B1\u03B2\u03B3\u2518\u250C\u2588\u2584\u03B4\u03B5\u2580\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C2\u03C4\u0384\xAD\xB1\u03C5\u03C6\u03C7\xA7\u03C8\u0385\xB0\xA8\u03C9\u03CB\u03B0\u03CE\u25A0\xA0"},ibm869:"cp869",csibm869:"cp869",cp922:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\u203E\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0160\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\u017D\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0161\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\u017E\xFF"},ibm922:"cp922",csibm922:"cp922",cp1046:{type:"_sbcs",chars:"\uFE88\xD7\xF7\uF8F6\uF8F5\uF8F4\uF8F7\uFE71\x88\u25A0\u2502\u2500\u2510\u250C\u2514\u2518\uFE79\uFE7B\uFE7D\uFE7F\uFE77\uFE8A\uFEF0\uFEF3\uFEF2\uFECE\uFECF\uFED0\uFEF6\uFEF8\uFEFA\uFEFC\xA0\uF8FA\uF8F9\uF8F8\xA4\uF8FB\uFE8B\uFE91\uFE97\uFE9B\uFE9F\uFEA3\u060C\xAD\uFEA7\uFEB3\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\uFEB7\u061B\uFEBB\uFEBF\uFECA\u061F\uFECB\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\uFEC7\u0639\u063A\uFECC\uFE82\uFE84\uFE8E\uFED3\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\uFED7\uFEDB\uFEDF\uF8FC\uFEF5\uFEF7\uFEF9\uFEFB\uFEE3\uFEE7\uFEEC\uFEE9\uFFFD"},ibm1046:"cp1046",csibm1046:"cp1046",cp1124:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0401\u0402\u0490\u0404\u0405\u0406\u0407\u0408\u0409\u040A\u040B\u040C\xAD\u040E\u040F\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2116\u0451\u0452\u0491\u0454\u0455\u0456\u0457\u0458\u0459\u045A\u045B\u045C\xA7\u045E\u045F"},ibm1124:"cp1124",csibm1124:"cp1124",cp1125:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0490\u0491\u0404\u0454\u0406\u0456\u0407\u0457\xB7\u221A\u2116\xA4\u25A0\xA0"},ibm1125:"cp1125",csibm1125:"cp1125",cp1129:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\u0153\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u0178\xB5\xB6\xB7\u0152\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF"},ibm1129:"cp1129",csibm1129:"cp1129",cp1133:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E81\u0E82\u0E84\u0E87\u0E88\u0EAA\u0E8A\u0E8D\u0E94\u0E95\u0E96\u0E97\u0E99\u0E9A\u0E9B\u0E9C\u0E9D\u0E9E\u0E9F\u0EA1\u0EA2\u0EA3\u0EA5\u0EA7\u0EAB\u0EAD\u0EAE\uFFFD\uFFFD\uFFFD\u0EAF\u0EB0\u0EB2\u0EB3\u0EB4\u0EB5\u0EB6\u0EB7\u0EB8\u0EB9\u0EBC\u0EB1\u0EBB\u0EBD\uFFFD\uFFFD\uFFFD\u0EC0\u0EC1\u0EC2\u0EC3\u0EC4\u0EC8\u0EC9\u0ECA\u0ECB\u0ECC\u0ECD\u0EC6\uFFFD\u0EDC\u0EDD\u20AD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0ED0\u0ED1\u0ED2\u0ED3\u0ED4\u0ED5\u0ED6\u0ED7\u0ED8\u0ED9\uFFFD\uFFFD\xA2\xAC\xA6\uFFFD"},ibm1133:"cp1133",csibm1133:"cp1133",cp1161:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0E48\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\u0E49\u0E4A\u0E4B\u20AC\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\xA2\xAC\xA6\xA0"},ibm1161:"cp1161",csibm1161:"cp1161",cp1162:{type:"_sbcs",chars:"\u20AC\x81\x82\x83\x84\u2026\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"},ibm1162:"cp1162",csibm1162:"cp1162",cp1163:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\u20AC\xA5\xA6\xA7\u0153\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u0178\xB5\xB6\xB7\u0152\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF"},ibm1163:"cp1163",csibm1163:"cp1163",maccroatian:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\u0160\u2122\xB4\xA8\u2260\u017D\xD8\u221E\xB1\u2264\u2265\u2206\xB5\u2202\u2211\u220F\u0161\u222B\xAA\xBA\u2126\u017E\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u0106\xAB\u010C\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\uFFFD\xA9\u2044\xA4\u2039\u203A\xC6\xBB\u2013\xB7\u201A\u201E\u2030\xC2\u0107\xC1\u010D\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u0111\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u03C0\xCB\u02DA\xB8\xCA\xE6\u02C7"},maccyrillic:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\xA2\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u2202\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\xA4"},macgreek:{type:"_sbcs",chars:"\xC4\xB9\xB2\xC9\xB3\xD6\xDC\u0385\xE0\xE2\xE4\u0384\xA8\xE7\xE9\xE8\xEA\xEB\xA3\u2122\xEE\xEF\u2022\xBD\u2030\xF4\xF6\xA6\xAD\xF9\xFB\xFC\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xDF\xAE\xA9\u03A3\u03AA\xA7\u2260\xB0\u0387\u0391\xB1\u2264\u2265\xA5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xAC\u039F\u03A1\u2248\u03A4\xAB\xBB\u2026\xA0\u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xF7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\uFFFD"},maciceland:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\xDD\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\xD0\xF0\xDE\xFE\xFD\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macroman:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macromania:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\u0102\u015E\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\u0103\u015F\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\u0162\u0163\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macthai:{type:"_sbcs",chars:"\xAB\xBB\u2026\uF88C\uF88F\uF892\uF895\uF898\uF88B\uF88E\uF891\uF894\uF897\u201C\u201D\uF899\uFFFD\u2022\uF884\uF889\uF885\uF886\uF887\uF888\uF88A\uF88D\uF890\uF893\uF896\u2018\u2019\uFFFD\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFEFF\u200B\u2013\u2014\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u2122\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\xAE\xA9\uFFFD\uFFFD\uFFFD\uFFFD"},macturkish:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\uFFFD\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},macukraine:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\u0490\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\xA4"},koi8r:{type:"_sbcs",chars:"\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u2553\u2554\u2555\u2556\u2557\u2558\u2559\u255A\u255B\u255C\u255D\u255E\u255F\u2560\u2561\u0401\u2562\u2563\u2564\u2565\u2566\u2567\u2568\u2569\u256A\u256B\u256C\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},koi8u:{type:"_sbcs",chars:"\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255A\u255B\u0491\u255D\u255E\u255F\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256A\u0490\u256C\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},koi8ru:{type:"_sbcs",chars:"\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255A\u255B\u0491\u045E\u255E\u255F\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256A\u0490\u040E\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},koi8t:{type:"_sbcs",chars:"\u049B\u0493\u201A\u0492\u201E\u2026\u2020\u2021\uFFFD\u2030\u04B3\u2039\u04B2\u04B7\u04B6\uFFFD\u049A\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u04EF\u04EE\u0451\xA4\u04E3\xA6\xA7\uFFFD\uFFFD\uFFFD\xAB\xAC\xAD\xAE\uFFFD\xB0\xB1\xB2\u0401\uFFFD\u04E2\xB6\xB7\uFFFD\u2116\uFFFD\xBB\uFFFD\uFFFD\uFFFD\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A"},armscii8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\u0587\u0589)(\xBB\xAB\u2014.\u055D,-\u058A\u2026\u055C\u055B\u055E\u0531\u0561\u0532\u0562\u0533\u0563\u0534\u0564\u0535\u0565\u0536\u0566\u0537\u0567\u0538\u0568\u0539\u0569\u053A\u056A\u053B\u056B\u053C\u056C\u053D\u056D\u053E\u056E\u053F\u056F\u0540\u0570\u0541\u0571\u0542\u0572\u0543\u0573\u0544\u0574\u0545\u0575\u0546\u0576\u0547\u0577\u0548\u0578\u0549\u0579\u054A\u057A\u054B\u057B\u054C\u057C\u054D\u057D\u054E\u057E\u054F\u057F\u0550\u0580\u0551\u0581\u0552\u0582\u0553\u0583\u0554\u0584\u0555\u0585\u0556\u0586\u055A\uFFFD"},rk1048:{type:"_sbcs",chars:"\u0402\u0403\u201A\u0453\u201E\u2026\u2020\u2021\u20AC\u2030\u0409\u2039\u040A\u049A\u04BA\u040F\u0452\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0459\u203A\u045A\u049B\u04BB\u045F\xA0\u04B0\u04B1\u04D8\xA4\u04E8\xA6\xA7\u0401\xA9\u0492\xAB\xAC\xAD\xAE\u04AE\xB0\xB1\u0406\u0456\u04E9\xB5\xB6\xB7\u0451\u2116\u0493\xBB\u04D9\u04A2\u04A3\u04AF\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F"},tcvn:{type:"_sbcs",chars:`\x00\xDA\u1EE4\x03\u1EEA\u1EEC\u1EEE\x07\b	
\v\f\r\x0E\x0F\x10\u1EE8\u1EF0\u1EF2\u1EF6\u1EF8\xDD\u1EF4\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\xC0\u1EA2\xC3\xC1\u1EA0\u1EB6\u1EAC\xC8\u1EBA\u1EBC\xC9\u1EB8\u1EC6\xCC\u1EC8\u0128\xCD\u1ECA\xD2\u1ECE\xD5\xD3\u1ECC\u1ED8\u1EDC\u1EDE\u1EE0\u1EDA\u1EE2\xD9\u1EE6\u0168\xA0\u0102\xC2\xCA\xD4\u01A0\u01AF\u0110\u0103\xE2\xEA\xF4\u01A1\u01B0\u0111\u1EB0\u0300\u0309\u0303\u0301\u0323\xE0\u1EA3\xE3\xE1\u1EA1\u1EB2\u1EB1\u1EB3\u1EB5\u1EAF\u1EB4\u1EAE\u1EA6\u1EA8\u1EAA\u1EA4\u1EC0\u1EB7\u1EA7\u1EA9\u1EAB\u1EA5\u1EAD\xE8\u1EC2\u1EBB\u1EBD\xE9\u1EB9\u1EC1\u1EC3\u1EC5\u1EBF\u1EC7\xEC\u1EC9\u1EC4\u1EBE\u1ED2\u0129\xED\u1ECB\xF2\u1ED4\u1ECF\xF5\xF3\u1ECD\u1ED3\u1ED5\u1ED7\u1ED1\u1ED9\u1EDD\u1EDF\u1EE1\u1EDB\u1EE3\xF9\u1ED6\u1EE7\u0169\xFA\u1EE5\u1EEB\u1EED\u1EEF\u1EE9\u1EF1\u1EF3\u1EF7\u1EF9\xFD\u1EF5\u1ED0`},georgianacademy:{type:"_sbcs",chars:"\x80\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\x9E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10D7\u10D8\u10D9\u10DA\u10DB\u10DC\u10DD\u10DE\u10DF\u10E0\u10E1\u10E2\u10E3\u10E4\u10E5\u10E6\u10E7\u10E8\u10E9\u10EA\u10EB\u10EC\u10ED\u10EE\u10EF\u10F0\u10F1\u10F2\u10F3\u10F4\u10F5\u10F6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},georgianps:{type:"_sbcs",chars:"\x80\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\x9E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10F1\u10D7\u10D8\u10D9\u10DA\u10DB\u10DC\u10F2\u10DD\u10DE\u10DF\u10E0\u10E1\u10E2\u10F3\u10E3\u10E4\u10E5\u10E6\u10E7\u10E8\u10E9\u10EA\u10EB\u10EC\u10ED\u10EE\u10F4\u10EF\u10F0\u10F5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},pt154:{type:"_sbcs",chars:"\u0496\u0492\u04EE\u0493\u201E\u2026\u04B6\u04AE\u04B2\u04AF\u04A0\u04E2\u04A2\u049A\u04BA\u04B8\u0497\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u04B3\u04B7\u04A1\u04E3\u04A3\u049B\u04BB\u04B9\xA0\u040E\u045E\u0408\u04E8\u0498\u04B0\xA7\u0401\xA9\u04D8\xAB\xAC\u04EF\xAE\u049C\xB0\u04B1\u0406\u0456\u0499\u04E9\xB6\xB7\u0451\u2116\u04D9\xBB\u0458\u04AA\u04AB\u049D\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F"},viscii:{type:"_sbcs",chars:`\x00\x01\u1EB2\x03\x04\u1EB4\u1EAA\x07\b	
\v\f\r\x0E\x0F\x10\x11\x12\x13\u1EF6\x15\x16\x17\x18\u1EF8\x1A\x1B\x1C\x1D\u1EF4\x1F !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\u1EA0\u1EAE\u1EB0\u1EB6\u1EA4\u1EA6\u1EA8\u1EAC\u1EBC\u1EB8\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EE2\u1EDA\u1EDC\u1EDE\u1ECA\u1ECE\u1ECC\u1EC8\u1EE6\u0168\u1EE4\u1EF2\xD5\u1EAF\u1EB1\u1EB7\u1EA5\u1EA7\u1EA9\u1EAD\u1EBD\u1EB9\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1ED1\u1ED3\u1ED5\u1ED7\u1EE0\u01A0\u1ED9\u1EDD\u1EDF\u1ECB\u1EF0\u1EE8\u1EEA\u1EEC\u01A1\u1EDB\u01AF\xC0\xC1\xC2\xC3\u1EA2\u0102\u1EB3\u1EB5\xC8\xC9\xCA\u1EBA\xCC\xCD\u0128\u1EF3\u0110\u1EE9\xD2\xD3\xD4\u1EA1\u1EF7\u1EEB\u1EED\xD9\xDA\u1EF9\u1EF5\xDD\u1EE1\u01B0\xE0\xE1\xE2\xE3\u1EA3\u0103\u1EEF\u1EAB\xE8\xE9\xEA\u1EBB\xEC\xED\u0129\u1EC9\u0111\u1EF1\xF2\xF3\xF4\xF5\u1ECF\u1ECD\u1EE5\xF9\xFA\u0169\u1EE7\xFD\u1EE3\u1EEE`},iso646cn:{type:"_sbcs",chars:`\x00\x01\x02\x03\x04\x05\x06\x07\b	
\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#\xA5%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD`},iso646jp:{type:"_sbcs",chars:`\x00\x01\x02\x03\x04\x05\x06\x07\b	
\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\xA5]^_\`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD`},hproman8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xC0\xC2\xC8\xCA\xCB\xCE\xCF\xB4\u02CB\u02C6\xA8\u02DC\xD9\xDB\u20A4\xAF\xDD\xFD\xB0\xC7\xE7\xD1\xF1\xA1\xBF\xA4\xA3\xA5\xA7\u0192\xA2\xE2\xEA\xF4\xFB\xE1\xE9\xF3\xFA\xE0\xE8\xF2\xF9\xE4\xEB\xF6\xFC\xC5\xEE\xD8\xC6\xE5\xED\xF8\xE6\xC4\xEC\xD6\xDC\xC9\xEF\xDF\xD4\xC1\xC3\xE3\xD0\xF0\xCD\xCC\xD3\xD2\xD5\xF5\u0160\u0161\xDA\u0178\xFF\xDE\xFE\xB7\xB5\xB6\xBE\u2014\xBC\xBD\xAA\xBA\xAB\u25A0\xBB\xB1\uFFFD"},macintosh:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},ascii:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"},tis620:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"}}});var kA4=o((EV9)=>{var ZC=qG().Buffer;EV9._dbcs=RV;var hQ=-1,SA4=-2,HK=-10,ZH=-1000,KC=Array(256),Sp=-1;for(Cp=0;Cp<256;Cp++)KC[Cp]=hQ;var Cp;function RV($,Y){if(this.encodingName=$.encodingName,!$)throw Error("DBCS codec is called without the data.");if(!$.table)throw Error("Encoding '"+this.encodingName+"' has no data.");var X=$.table();this.decodeTables=[],this.decodeTables[0]=KC.slice(0),this.decodeTableSeq=[];for(var G=0;G<X.length;G++)this._addDecodeChunk(X[G]);this.defaultCharUnicode=Y.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var J={};if($.encodeSkipVals)for(var G=0;G<$.encodeSkipVals.length;G++){var Q=$.encodeSkipVals[G];if(typeof Q==="number")J[Q]=!0;else for(var W=Q.from;W<=Q.to;W++)J[W]=!0}if(this._fillEncodeTable(0,0,J),$.encodeAdd){for(var K in $.encodeAdd)if(Object.prototype.hasOwnProperty.call($.encodeAdd,K))this._setEncodeChar(K.charCodeAt(0),$.encodeAdd[K])}if(this.defCharSB=this.encodeTable[0][Y.defaultCharSingleByte.charCodeAt(0)],this.defCharSB===hQ)this.defCharSB=this.encodeTable[0]["?"];if(this.defCharSB===hQ)this.defCharSB=63;if(typeof $.gb18030==="function"){this.gb18030=$.gb18030();var Z=this.decodeTables.length,H=this.decodeTables[Z]=KC.slice(0),z=this.decodeTables.length,V=this.decodeTables[z]=KC.slice(0);for(var G=129;G<=254;G++){var F=ZH-this.decodeTables[0][G],L=this.decodeTables[F];for(var W=48;W<=57;W++)L[W]=ZH-Z}for(var G=129;G<=254;G++)H[G]=ZH-z;for(var G=48;G<=57;G++)V[G]=SA4}}RV.prototype.encoder=kY0;RV.prototype.decoder=$d0;RV.prototype._getDecodeTrieNode=function($){var Y=[];for(;$>0;$>>=8)Y.push($&255);if(Y.length==0)Y.push(0);var X=this.decodeTables[0];for(var G=Y.length-1;G>0;G--){var J=X[Y[G]];if(J==hQ)X[Y[G]]=ZH-this.decodeTables.length,this.decodeTables.push(X=KC.slice(0));else if(J<=ZH)X=this.decodeTables[ZH-J];else throw Error("Overwrite byte in "+this.encodingName+", addr: "+$.toString(16))}return X};RV.prototype._addDecodeChunk=function($){var Y=parseInt($[0],16),X=this._getDecodeTrieNode(Y);Y=Y&255;for(var G=1;G<$.length;G++){var J=$[G];if(typeof J==="string")for(var Q=0;Q<J.length;){var W=J.charCodeAt(Q++);if(55296<=W&&W<56320){var K=J.charCodeAt(Q++);if(56320<=K&&K<57344)X[Y++]=65536+(W-55296)*1024+(K-56320);else throw Error("Incorrect surrogate pair in "+this.encodingName+" at chunk "+$[0])}else if(4080<W&&W<=4095){var Z=4095-W+2,H=[];for(var z=0;z<Z;z++)H.push(J.charCodeAt(Q++));X[Y++]=HK-this.decodeTableSeq.length,this.decodeTableSeq.push(H)}else X[Y++]=W}else if(typeof J==="number"){var V=X[Y-1]+1;for(var Q=0;Q<J;Q++)X[Y++]=V++}else throw Error("Incorrect type '"+typeof J+"' given in "+this.encodingName+" at chunk "+$[0])}if(Y>255)throw Error("Incorrect chunk in "+this.encodingName+" at addr "+$[0]+": too long"+Y)};RV.prototype._getEncodeBucket=function($){var Y=$>>8;if(this.encodeTable[Y]===void 0)this.encodeTable[Y]=KC.slice(0);return this.encodeTable[Y]};RV.prototype._setEncodeChar=function($,Y){var X=this._getEncodeBucket($),G=$&255;if(X[G]<=HK)this.encodeTableSeq[HK-X[G]][Sp]=Y;else if(X[G]==hQ)X[G]=Y};RV.prototype._setEncodeSequence=function($,Y){var X=$[0],G=this._getEncodeBucket(X),J=X&255,Q;if(G[J]<=HK)Q=this.encodeTableSeq[HK-G[J]];else{if(Q={},G[J]!==hQ)Q[Sp]=G[J];G[J]=HK-this.encodeTableSeq.length,this.encodeTableSeq.push(Q)}for(var W=1;W<$.length-1;W++){var K=Q[X];if(typeof K==="object")Q=K;else if(Q=Q[X]={},K!==void 0)Q[Sp]=K}X=$[$.length-1],Q[X]=Y};RV.prototype._fillEncodeTable=function($,Y,X){var G=this.decodeTables[$];for(var J=0;J<256;J++){var Q=G[J],W=Y+J;if(X[W])continue;if(Q>=0)this._setEncodeChar(Q,W);else if(Q<=ZH)this._fillEncodeTable(ZH-Q,W<<8,X);else if(Q<=HK)this._setEncodeSequence(this.decodeTableSeq[HK-Q],W)}};function kY0($,Y){this.leadSurrogate=-1,this.seqObj=void 0,this.encodeTable=Y.encodeTable,this.encodeTableSeq=Y.encodeTableSeq,this.defaultCharSingleByte=Y.defCharSB,this.gb18030=Y.gb18030}kY0.prototype.write=function($){var Y=ZC.alloc($.length*(this.gb18030?4:3)),X=this.leadSurrogate,G=this.seqObj,J=-1,Q=0,W=0;while(!0){if(J===-1){if(Q==$.length)break;var K=$.charCodeAt(Q++)}else{var K=J;J=-1}if(55296<=K&&K<57344)if(K<56320)if(X===-1){X=K;continue}else X=K,K=hQ;else if(X!==-1)K=65536+(X-55296)*1024+(K-56320),X=-1;else K=hQ;else if(X!==-1)J=K,K=hQ,X=-1;var Z=hQ;if(G!==void 0&&K!=hQ){var H=G[K];if(typeof H==="object"){G=H;continue}else if(typeof H=="number")Z=H;else if(H==null){if(H=G[Sp],H!==void 0)Z=H,J=K}G=void 0}else if(K>=0){var z=this.encodeTable[K>>8];if(z!==void 0)Z=z[K&255];if(Z<=HK){G=this.encodeTableSeq[HK-Z];continue}if(Z==hQ&&this.gb18030){var V=Yd0(this.gb18030.uChars,K);if(V!=-1){var Z=this.gb18030.gbChars[V]+(K-this.gb18030.uChars[V]);Y[W++]=129+Math.floor(Z/12600),Z=Z%12600,Y[W++]=48+Math.floor(Z/1260),Z=Z%1260,Y[W++]=129+Math.floor(Z/10),Z=Z%10,Y[W++]=48+Z;continue}}}if(Z===hQ)Z=this.defaultCharSingleByte;if(Z<256)Y[W++]=Z;else if(Z<65536)Y[W++]=Z>>8,Y[W++]=Z&255;else Y[W++]=Z>>16,Y[W++]=Z>>8&255,Y[W++]=Z&255}return this.seqObj=G,this.leadSurrogate=X,Y.slice(0,W)};kY0.prototype.end=function(){if(this.leadSurrogate===-1&&this.seqObj===void 0)return;var $=ZC.alloc(10),Y=0;if(this.seqObj){var X=this.seqObj[Sp];if(X!==void 0)if(X<256)$[Y++]=X;else $[Y++]=X>>8,$[Y++]=X&255;this.seqObj=void 0}if(this.leadSurrogate!==-1)$[Y++]=this.defaultCharSingleByte,this.leadSurrogate=-1;return $.slice(0,Y)};kY0.prototype.findIdx=Yd0;function $d0($,Y){this.nodeIdx=0,this.prevBuf=ZC.alloc(0),this.decodeTables=Y.decodeTables,this.decodeTableSeq=Y.decodeTableSeq,this.defaultCharUnicode=Y.defaultCharUnicode,this.gb18030=Y.gb18030}$d0.prototype.write=function($){var Y=ZC.alloc($.length*2),X=this.nodeIdx,G=this.prevBuf,J=this.prevBuf.length,Q=-this.prevBuf.length,W;if(J>0)G=ZC.concat([G,$.slice(0,10)]);for(var K=0,Z=0;K<$.length;K++){var H=K>=0?$[K]:G[K+J],W=this.decodeTables[X][H];if(W>=0);else if(W===hQ)K=Q,W=this.defaultCharUnicode.charCodeAt(0);else if(W===SA4){var z=Q>=0?$.slice(Q,K+1):G.slice(Q+J,K+1+J),V=(z[0]-129)*12600+(z[1]-48)*1260+(z[2]-129)*10+(z[3]-48),F=Yd0(this.gb18030.gbChars,V);W=this.gb18030.uChars[F]+V-this.gb18030.gbChars[F]}else if(W<=ZH){X=ZH-W;continue}else if(W<=HK){var L=this.decodeTableSeq[HK-W];for(var N=0;N<L.length-1;N++)W=L[N],Y[Z++]=W&255,Y[Z++]=W>>8;W=L[L.length-1]}else throw Error("iconv-lite internal error: invalid decoding table value "+W+" at "+X+"/"+H);if(W>65535){W-=65536;var D=55296+Math.floor(W/1024);Y[Z++]=D&255,Y[Z++]=D>>8,W=56320+W%1024}Y[Z++]=W&255,Y[Z++]=W>>8,X=0,Q=K+1}return this.nodeIdx=X,this.prevBuf=Q>=0?$.slice(Q):G.slice(Q+J),Y.slice(0,Z).toString("ucs2")};$d0.prototype.end=function(){var $="";while(this.prevBuf.length>0){$+=this.defaultCharUnicode;var Y=this.prevBuf.slice(1);if(this.prevBuf=ZC.alloc(0),this.nodeIdx=0,Y.length>0)$+=this.write(Y)}return this.nodeIdx=0,$};function Yd0($,Y){if($[0]>Y)return-1;var X=0,G=$.length;while(X<G-1){var J=X+Math.floor((G-X+1)/2);if($[J]<=Y)X=J;else G=J}return X}});var vA4=o((wM$,RV9)=>{RV9.exports=[["0","\x00",128],["a1","\uFF61",62],["8140","\u3000\u3001\u3002\uFF0C\uFF0E\u30FB\uFF1A\uFF1B\uFF1F\uFF01\u309B\u309C\xB4\uFF40\xA8\uFF3E\uFFE3\uFF3F\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\u2015\u2010\uFF0F\uFF3C\uFF5E\u2225\uFF5C\u2026\u2025\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\uFF3B\uFF3D\uFF5B\uFF5D\u3008",9,"\uFF0B\uFF0D\xB1\xD7"],["8180","\xF7\uFF1D\u2260\uFF1C\uFF1E\u2266\u2267\u221E\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFFE5\uFF04\uFFE0\uFFE1\uFF05\uFF03\uFF06\uFF0A\uFF20\xA7\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u203B\u3012\u2192\u2190\u2191\u2193\u3013"],["81b8","\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229"],["81c8","\u2227\u2228\uFFE2\u21D2\u21D4\u2200\u2203"],["81da","\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C"],["81f0","\u212B\u2030\u266F\u266D\u266A\u2020\u2021\xB6"],["81fc","\u25EF"],["824f","\uFF10",9],["8260","\uFF21",25],["8281","\uFF41",25],["829f","\u3041",82],["8340","\u30A1",62],["8380","\u30E0",22],["839f","\u0391",16,"\u03A3",6],["83bf","\u03B1",16,"\u03C3",6],["8440","\u0410",5,"\u0401\u0416",25],["8470","\u0430",5,"\u0451\u0436",7],["8480","\u043E",17],["849f","\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542"],["8740","\u2460",19,"\u2160",9],["875f","\u3349\u3314\u3322\u334D\u3318\u3327\u3303\u3336\u3351\u3357\u330D\u3326\u3323\u332B\u334A\u333B\u339C\u339D\u339E\u338E\u338F\u33C4\u33A1"],["877e","\u337B"],["8780","\u301D\u301F\u2116\u33CD\u2121\u32A4",4,"\u3231\u3232\u3239\u337E\u337D\u337C\u2252\u2261\u222B\u222E\u2211\u221A\u22A5\u2220\u221F\u22BF\u2235\u2229\u222A"],["889f","\u4E9C\u5516\u5A03\u963F\u54C0\u611B\u6328\u59F6\u9022\u8475\u831C\u7A50\u60AA\u63E1\u6E25\u65ED\u8466\u82A6\u9BF5\u6893\u5727\u65A1\u6271\u5B9B\u59D0\u867B\u98F4\u7D62\u7DBE\u9B8E\u6216\u7C9F\u88B7\u5B89\u5EB5\u6309\u6697\u6848\u95C7\u978D\u674F\u4EE5\u4F0A\u4F4D\u4F9D\u5049\u56F2\u5937\u59D4\u5A01\u5C09\u60DF\u610F\u6170\u6613\u6905\u70BA\u754F\u7570\u79FB\u7DAD\u7DEF\u80C3\u840E\u8863\u8B02\u9055\u907A\u533B\u4E95\u4EA5\u57DF\u80B2\u90C1\u78EF\u4E00\u58F1\u6EA2\u9038\u7A32\u8328\u828B\u9C2F\u5141\u5370\u54BD\u54E1\u56E0\u59FB\u5F15\u98F2\u6DEB\u80E4\u852D"],["8940","\u9662\u9670\u96A0\u97FB\u540B\u53F3\u5B87\u70CF\u7FBD\u8FC2\u96E8\u536F\u9D5C\u7ABA\u4E11\u7893\u81FC\u6E26\u5618\u5504\u6B1D\u851A\u9C3B\u59E5\u53A9\u6D66\u74DC\u958F\u5642\u4E91\u904B\u96F2\u834F\u990C\u53E1\u55B6\u5B30\u5F71\u6620\u66F3\u6804\u6C38\u6CF3\u6D29\u745B\u76C8\u7A4E\u9834\u82F1\u885B\u8A60\u92ED\u6DB2\u75AB\u76CA\u99C5\u60A6\u8B01\u8D8A\u95B2\u698E\u53AD\u5186"],["8980","\u5712\u5830\u5944\u5BB4\u5EF6\u6028\u63A9\u63F4\u6CBF\u6F14\u708E\u7114\u7159\u71D5\u733F\u7E01\u8276\u82D1\u8597\u9060\u925B\u9D1B\u5869\u65BC\u6C5A\u7525\u51F9\u592E\u5965\u5F80\u5FDC\u62BC\u65FA\u6A2A\u6B27\u6BB4\u738B\u7FC1\u8956\u9D2C\u9D0E\u9EC4\u5CA1\u6C96\u837B\u5104\u5C4B\u61B6\u81C6\u6876\u7261\u4E59\u4FFA\u5378\u6069\u6E29\u7A4F\u97F3\u4E0B\u5316\u4EEE\u4F55\u4F3D\u4FA1\u4F73\u52A0\u53EF\u5609\u590F\u5AC1\u5BB6\u5BE1\u79D1\u6687\u679C\u67B6\u6B4C\u6CB3\u706B\u73C2\u798D\u79BE\u7A3C\u7B87\u82B1\u82DB\u8304\u8377\u83EF\u83D3\u8766\u8AB2\u5629\u8CA8\u8FE6\u904E\u971E\u868A\u4FC4\u5CE8\u6211\u7259\u753B\u81E5\u82BD\u86FE\u8CC0\u96C5\u9913\u99D5\u4ECB\u4F1A\u89E3\u56DE\u584A\u58CA\u5EFB\u5FEB\u602A\u6094\u6062\u61D0\u6212\u62D0\u6539"],["8a40","\u9B41\u6666\u68B0\u6D77\u7070\u754C\u7686\u7D75\u82A5\u87F9\u958B\u968E\u8C9D\u51F1\u52BE\u5916\u54B3\u5BB3\u5D16\u6168\u6982\u6DAF\u788D\u84CB\u8857\u8A72\u93A7\u9AB8\u6D6C\u99A8\u86D9\u57A3\u67FF\u86CE\u920E\u5283\u5687\u5404\u5ED3\u62E1\u64B9\u683C\u6838\u6BBB\u7372\u78BA\u7A6B\u899A\u89D2\u8D6B\u8F03\u90ED\u95A3\u9694\u9769\u5B66\u5CB3\u697D\u984D\u984E\u639B\u7B20\u6A2B"],["8a80","\u6A7F\u68B6\u9C0D\u6F5F\u5272\u559D\u6070\u62EC\u6D3B\u6E07\u6ED1\u845B\u8910\u8F44\u4E14\u9C39\u53F6\u691B\u6A3A\u9784\u682A\u515C\u7AC3\u84B2\u91DC\u938C\u565B\u9D28\u6822\u8305\u8431\u7CA5\u5208\u82C5\u74E6\u4E7E\u4F83\u51A0\u5BD2\u520A\u52D8\u52E7\u5DFB\u559A\u582A\u59E6\u5B8C\u5B98\u5BDB\u5E72\u5E79\u60A3\u611F\u6163\u61BE\u63DB\u6562\u67D1\u6853\u68FA\u6B3E\u6B53\u6C57\u6F22\u6F97\u6F45\u74B0\u7518\u76E3\u770B\u7AFF\u7BA1\u7C21\u7DE9\u7F36\u7FF0\u809D\u8266\u839E\u89B3\u8ACC\u8CAB\u9084\u9451\u9593\u9591\u95A2\u9665\u97D3\u9928\u8218\u4E38\u542B\u5CB8\u5DCC\u73A9\u764C\u773C\u5CA9\u7FEB\u8D0B\u96C1\u9811\u9854\u9858\u4F01\u4F0E\u5371\u559C\u5668\u57FA\u5947\u5B09\u5BC4\u5C90\u5E0C\u5E7E\u5FCC\u63EE\u673A\u65D7\u65E2\u671F\u68CB\u68C4"],["8b40","\u6A5F\u5E30\u6BC5\u6C17\u6C7D\u757F\u7948\u5B63\u7A00\u7D00\u5FBD\u898F\u8A18\u8CB4\u8D77\u8ECC\u8F1D\u98E2\u9A0E\u9B3C\u4E80\u507D\u5100\u5993\u5B9C\u622F\u6280\u64EC\u6B3A\u72A0\u7591\u7947\u7FA9\u87FB\u8ABC\u8B70\u63AC\u83CA\u97A0\u5409\u5403\u55AB\u6854\u6A58\u8A70\u7827\u6775\u9ECD\u5374\u5BA2\u811A\u8650\u9006\u4E18\u4E45\u4EC7\u4F11\u53CA\u5438\u5BAE\u5F13\u6025\u6551"],["8b80","\u673D\u6C42\u6C72\u6CE3\u7078\u7403\u7A76\u7AAE\u7B08\u7D1A\u7CFE\u7D66\u65E7\u725B\u53BB\u5C45\u5DE8\u62D2\u62E0\u6319\u6E20\u865A\u8A31\u8DDD\u92F8\u6F01\u79A6\u9B5A\u4EA8\u4EAB\u4EAC\u4F9B\u4FA0\u50D1\u5147\u7AF6\u5171\u51F6\u5354\u5321\u537F\u53EB\u55AC\u5883\u5CE1\u5F37\u5F4A\u602F\u6050\u606D\u631F\u6559\u6A4B\u6CC1\u72C2\u72ED\u77EF\u80F8\u8105\u8208\u854E\u90F7\u93E1\u97FF\u9957\u9A5A\u4EF0\u51DD\u5C2D\u6681\u696D\u5C40\u66F2\u6975\u7389\u6850\u7C81\u50C5\u52E4\u5747\u5DFE\u9326\u65A4\u6B23\u6B3D\u7434\u7981\u79BD\u7B4B\u7DCA\u82B9\u83CC\u887F\u895F\u8B39\u8FD1\u91D1\u541F\u9280\u4E5D\u5036\u53E5\u533A\u72D7\u7396\u77E9\u82E6\u8EAF\u99C6\u99C8\u99D2\u5177\u611A\u865E\u55B0\u7A7A\u5076\u5BD3\u9047\u9685\u4E32\u6ADB\u91E7\u5C51\u5C48"],["8c40","\u6398\u7A9F\u6C93\u9774\u8F61\u7AAA\u718A\u9688\u7C82\u6817\u7E70\u6851\u936C\u52F2\u541B\u85AB\u8A13\u7FA4\u8ECD\u90E1\u5366\u8888\u7941\u4FC2\u50BE\u5211\u5144\u5553\u572D\u73EA\u578B\u5951\u5F62\u5F84\u6075\u6176\u6167\u61A9\u63B2\u643A\u656C\u666F\u6842\u6E13\u7566\u7A3D\u7CFB\u7D4C\u7D99\u7E4B\u7F6B\u830E\u834A\u86CD\u8A08\u8A63\u8B66\u8EFD\u981A\u9D8F\u82B8\u8FCE\u9BE8"],["8c80","\u5287\u621F\u6483\u6FC0\u9699\u6841\u5091\u6B20\u6C7A\u6F54\u7A74\u7D50\u8840\u8A23\u6708\u4EF6\u5039\u5026\u5065\u517C\u5238\u5263\u55A7\u570F\u5805\u5ACC\u5EFA\u61B2\u61F8\u62F3\u6372\u691C\u6A29\u727D\u72AC\u732E\u7814\u786F\u7D79\u770C\u80A9\u898B\u8B19\u8CE2\u8ED2\u9063\u9375\u967A\u9855\u9A13\u9E78\u5143\u539F\u53B3\u5E7B\u5F26\u6E1B\u6E90\u7384\u73FE\u7D43\u8237\u8A00\u8AFA\u9650\u4E4E\u500B\u53E4\u547C\u56FA\u59D1\u5B64\u5DF1\u5EAB\u5F27\u6238\u6545\u67AF\u6E56\u72D0\u7CCA\u88B4\u80A1\u80E1\u83F0\u864E\u8A87\u8DE8\u9237\u96C7\u9867\u9F13\u4E94\u4E92\u4F0D\u5348\u5449\u543E\u5A2F\u5F8C\u5FA1\u609F\u68A7\u6A8E\u745A\u7881\u8A9E\u8AA4\u8B77\u9190\u4E5E\u9BC9\u4EA4\u4F7C\u4FAF\u5019\u5016\u5149\u516C\u529F\u52B9\u52FE\u539A\u53E3\u5411"],["8d40","\u540E\u5589\u5751\u57A2\u597D\u5B54\u5B5D\u5B8F\u5DE5\u5DE7\u5DF7\u5E78\u5E83\u5E9A\u5EB7\u5F18\u6052\u614C\u6297\u62D8\u63A7\u653B\u6602\u6643\u66F4\u676D\u6821\u6897\u69CB\u6C5F\u6D2A\u6D69\u6E2F\u6E9D\u7532\u7687\u786C\u7A3F\u7CE0\u7D05\u7D18\u7D5E\u7DB1\u8015\u8003\u80AF\u80B1\u8154\u818F\u822A\u8352\u884C\u8861\u8B1B\u8CA2\u8CFC\u90CA\u9175\u9271\u783F\u92FC\u95A4\u964D"],["8d80","\u9805\u9999\u9AD8\u9D3B\u525B\u52AB\u53F7\u5408\u58D5\u62F7\u6FE0\u8C6A\u8F5F\u9EB9\u514B\u523B\u544A\u56FD\u7A40\u9177\u9D60\u9ED2\u7344\u6F09\u8170\u7511\u5FFD\u60DA\u9AA8\u72DB\u8FBC\u6B64\u9803\u4ECA\u56F0\u5764\u58BE\u5A5A\u6068\u61C7\u660F\u6606\u6839\u68B1\u6DF7\u75D5\u7D3A\u826E\u9B42\u4E9B\u4F50\u53C9\u5506\u5D6F\u5DE6\u5DEE\u67FB\u6C99\u7473\u7802\u8A50\u9396\u88DF\u5750\u5EA7\u632B\u50B5\u50AC\u518D\u6700\u54C9\u585E\u59BB\u5BB0\u5F69\u624D\u63A1\u683D\u6B73\u6E08\u707D\u91C7\u7280\u7815\u7826\u796D\u658E\u7D30\u83DC\u88C1\u8F09\u969B\u5264\u5728\u6750\u7F6A\u8CA1\u51B4\u5742\u962A\u583A\u698A\u80B4\u54B2\u5D0E\u57FC\u7895\u9DFA\u4F5C\u524A\u548B\u643E\u6628\u6714\u67F5\u7A84\u7B56\u7D22\u932F\u685C\u9BAD\u7B39\u5319\u518A\u5237"],["8e40","\u5BDF\u62F6\u64AE\u64E6\u672D\u6BBA\u85A9\u96D1\u7690\u9BD6\u634C\u9306\u9BAB\u76BF\u6652\u4E09\u5098\u53C2\u5C71\u60E8\u6492\u6563\u685F\u71E6\u73CA\u7523\u7B97\u7E82\u8695\u8B83\u8CDB\u9178\u9910\u65AC\u66AB\u6B8B\u4ED5\u4ED4\u4F3A\u4F7F\u523A\u53F8\u53F2\u55E3\u56DB\u58EB\u59CB\u59C9\u59FF\u5B50\u5C4D\u5E02\u5E2B\u5FD7\u601D\u6307\u652F\u5B5C\u65AF\u65BD\u65E8\u679D\u6B62"],["8e80","\u6B7B\u6C0F\u7345\u7949\u79C1\u7CF8\u7D19\u7D2B\u80A2\u8102\u81F3\u8996\u8A5E\u8A69\u8A66\u8A8C\u8AEE\u8CC7\u8CDC\u96CC\u98FC\u6B6F\u4E8B\u4F3C\u4F8D\u5150\u5B57\u5BFA\u6148\u6301\u6642\u6B21\u6ECB\u6CBB\u723E\u74BD\u75D4\u78C1\u793A\u800C\u8033\u81EA\u8494\u8F9E\u6C50\u9E7F\u5F0F\u8B58\u9D2B\u7AFA\u8EF8\u5B8D\u96EB\u4E03\u53F1\u57F7\u5931\u5AC9\u5BA4\u6089\u6E7F\u6F06\u75BE\u8CEA\u5B9F\u8500\u7BE0\u5072\u67F4\u829D\u5C61\u854A\u7E1E\u820E\u5199\u5C04\u6368\u8D66\u659C\u716E\u793E\u7D17\u8005\u8B1D\u8ECA\u906E\u86C7\u90AA\u501F\u52FA\u5C3A\u6753\u707C\u7235\u914C\u91C8\u932B\u82E5\u5BC2\u5F31\u60F9\u4E3B\u53D6\u5B88\u624B\u6731\u6B8A\u72E9\u73E0\u7A2E\u816B\u8DA3\u9152\u9996\u5112\u53D7\u546A\u5BFF\u6388\u6A39\u7DAC\u9700\u56DA\u53CE\u5468"],["8f40","\u5B97\u5C31\u5DDE\u4FEE\u6101\u62FE\u6D32\u79C0\u79CB\u7D42\u7E4D\u7FD2\u81ED\u821F\u8490\u8846\u8972\u8B90\u8E74\u8F2F\u9031\u914B\u916C\u96C6\u919C\u4EC0\u4F4F\u5145\u5341\u5F93\u620E\u67D4\u6C41\u6E0B\u7363\u7E26\u91CD\u9283\u53D4\u5919\u5BBF\u6DD1\u795D\u7E2E\u7C9B\u587E\u719F\u51FA\u8853\u8FF0\u4FCA\u5CFB\u6625\u77AC\u7AE3\u821C\u99FF\u51C6\u5FAA\u65EC\u696F\u6B89\u6DF3"],["8f80","\u6E96\u6F64\u76FE\u7D14\u5DE1\u9075\u9187\u9806\u51E6\u521D\u6240\u6691\u66D9\u6E1A\u5EB6\u7DD2\u7F72\u66F8\u85AF\u85F7\u8AF8\u52A9\u53D9\u5973\u5E8F\u5F90\u6055\u92E4\u9664\u50B7\u511F\u52DD\u5320\u5347\u53EC\u54E8\u5546\u5531\u5617\u5968\u59BE\u5A3C\u5BB5\u5C06\u5C0F\u5C11\u5C1A\u5E84\u5E8A\u5EE0\u5F70\u627F\u6284\u62DB\u638C\u6377\u6607\u660C\u662D\u6676\u677E\u68A2\u6A1F\u6A35\u6CBC\u6D88\u6E09\u6E58\u713C\u7126\u7167\u75C7\u7701\u785D\u7901\u7965\u79F0\u7AE0\u7B11\u7CA7\u7D39\u8096\u83D6\u848B\u8549\u885D\u88F3\u8A1F\u8A3C\u8A54\u8A73\u8C61\u8CDE\u91A4\u9266\u937E\u9418\u969C\u9798\u4E0A\u4E08\u4E1E\u4E57\u5197\u5270\u57CE\u5834\u58CC\u5B22\u5E38\u60C5\u64FE\u6761\u6756\u6D44\u72B6\u7573\u7A63\u84B8\u8B72\u91B8\u9320\u5631\u57F4\u98FE"],["9040","\u62ED\u690D\u6B96\u71ED\u7E54\u8077\u8272\u89E6\u98DF\u8755\u8FB1\u5C3B\u4F38\u4FE1\u4FB5\u5507\u5A20\u5BDD\u5BE9\u5FC3\u614E\u632F\u65B0\u664B\u68EE\u699B\u6D78\u6DF1\u7533\u75B9\u771F\u795E\u79E6\u7D33\u81E3\u82AF\u85AA\u89AA\u8A3A\u8EAB\u8F9B\u9032\u91DD\u9707\u4EBA\u4EC1\u5203\u5875\u58EC\u5C0B\u751A\u5C3D\u814E\u8A0A\u8FC5\u9663\u976D\u7B25\u8ACF\u9808\u9162\u56F3\u53A8"],["9080","\u9017\u5439\u5782\u5E25\u63A8\u6C34\u708A\u7761\u7C8B\u7FE0\u8870\u9042\u9154\u9310\u9318\u968F\u745E\u9AC4\u5D07\u5D69\u6570\u67A2\u8DA8\u96DB\u636E\u6749\u6919\u83C5\u9817\u96C0\u88FE\u6F84\u647A\u5BF8\u4E16\u702C\u755D\u662F\u51C4\u5236\u52E2\u59D3\u5F81\u6027\u6210\u653F\u6574\u661F\u6674\u68F2\u6816\u6B63\u6E05\u7272\u751F\u76DB\u7CBE\u8056\u58F0\u88FD\u897F\u8AA0\u8A93\u8ACB\u901D\u9192\u9752\u9759\u6589\u7A0E\u8106\u96BB\u5E2D\u60DC\u621A\u65A5\u6614\u6790\u77F3\u7A4D\u7C4D\u7E3E\u810A\u8CAC\u8D64\u8DE1\u8E5F\u78A9\u5207\u62D9\u63A5\u6442\u6298\u8A2D\u7A83\u7BC0\u8AAC\u96EA\u7D76\u820C\u8749\u4ED9\u5148\u5343\u5360\u5BA3\u5C02\u5C16\u5DDD\u6226\u6247\u64B0\u6813\u6834\u6CC9\u6D45\u6D17\u67D3\u6F5C\u714E\u717D\u65CB\u7A7F\u7BAD\u7DDA"],["9140","\u7E4A\u7FA8\u817A\u821B\u8239\u85A6\u8A6E\u8CCE\u8DF5\u9078\u9077\u92AD\u9291\u9583\u9BAE\u524D\u5584\u6F38\u7136\u5168\u7985\u7E55\u81B3\u7CCE\u564C\u5851\u5CA8\u63AA\u66FE\u66FD\u695A\u72D9\u758F\u758E\u790E\u7956\u79DF\u7C97\u7D20\u7D44\u8607\u8A34\u963B\u9061\u9F20\u50E7\u5275\u53CC\u53E2\u5009\u55AA\u58EE\u594F\u723D\u5B8B\u5C64\u531D\u60E3\u60F3\u635C\u6383\u633F\u63BB"],["9180","\u64CD\u65E9\u66F9\u5DE3\u69CD\u69FD\u6F15\u71E5\u4E89\u75E9\u76F8\u7A93\u7CDF\u7DCF\u7D9C\u8061\u8349\u8358\u846C\u84BC\u85FB\u88C5\u8D70\u9001\u906D\u9397\u971C\u9A12\u50CF\u5897\u618E\u81D3\u8535\u8D08\u9020\u4FC3\u5074\u5247\u5373\u606F\u6349\u675F\u6E2C\u8DB3\u901F\u4FD7\u5C5E\u8CCA\u65CF\u7D9A\u5352\u8896\u5176\u63C3\u5B58\u5B6B\u5C0A\u640D\u6751\u905C\u4ED6\u591A\u592A\u6C70\u8A51\u553E\u5815\u59A5\u60F0\u6253\u67C1\u8235\u6955\u9640\u99C4\u9A28\u4F53\u5806\u5BFE\u8010\u5CB1\u5E2F\u5F85\u6020\u614B\u6234\u66FF\u6CF0\u6EDE\u80CE\u817F\u82D4\u888B\u8CB8\u9000\u902E\u968A\u9EDB\u9BDB\u4EE3\u53F0\u5927\u7B2C\u918D\u984C\u9DF9\u6EDD\u7027\u5353\u5544\u5B85\u6258\u629E\u62D3\u6CA2\u6FEF\u7422\u8A17\u9438\u6FC1\u8AFE\u8338\u51E7\u86F8\u53EA"],["9240","\u53E9\u4F46\u9054\u8FB0\u596A\u8131\u5DFD\u7AEA\u8FBF\u68DA\u8C37\u72F8\u9C48\u6A3D\u8AB0\u4E39\u5358\u5606\u5766\u62C5\u63A2\u65E6\u6B4E\u6DE1\u6E5B\u70AD\u77ED\u7AEF\u7BAA\u7DBB\u803D\u80C6\u86CB\u8A95\u935B\u56E3\u58C7\u5F3E\u65AD\u6696\u6A80\u6BB5\u7537\u8AC7\u5024\u77E5\u5730\u5F1B\u6065\u667A\u6C60\u75F4\u7A1A\u7F6E\u81F4\u8718\u9045\u99B3\u7BC9\u755C\u7AF9\u7B51\u84C4"],["9280","\u9010\u79E9\u7A92\u8336\u5AE1\u7740\u4E2D\u4EF2\u5B99\u5FE0\u62BD\u663C\u67F1\u6CE8\u866B\u8877\u8A3B\u914E\u92F3\u99D0\u6A17\u7026\u732A\u82E7\u8457\u8CAF\u4E01\u5146\u51CB\u558B\u5BF5\u5E16\u5E33\u5E81\u5F14\u5F35\u5F6B\u5FB4\u61F2\u6311\u66A2\u671D\u6F6E\u7252\u753A\u773A\u8074\u8139\u8178\u8776\u8ABF\u8ADC\u8D85\u8DF3\u929A\u9577\u9802\u9CE5\u52C5\u6357\u76F4\u6715\u6C88\u73CD\u8CC3\u93AE\u9673\u6D25\u589C\u690E\u69CC\u8FFD\u939A\u75DB\u901A\u585A\u6802\u63B4\u69FB\u4F43\u6F2C\u67D8\u8FBB\u8526\u7DB4\u9354\u693F\u6F70\u576A\u58F7\u5B2C\u7D2C\u722A\u540A\u91E3\u9DB4\u4EAD\u4F4E\u505C\u5075\u5243\u8C9E\u5448\u5824\u5B9A\u5E1D\u5E95\u5EAD\u5EF7\u5F1F\u608C\u62B5\u633A\u63D0\u68AF\u6C40\u7887\u798E\u7A0B\u7DE0\u8247\u8A02\u8AE6\u8E44\u9013"],["9340","\u90B8\u912D\u91D8\u9F0E\u6CE5\u6458\u64E2\u6575\u6EF4\u7684\u7B1B\u9069\u93D1\u6EBA\u54F2\u5FB9\u64A4\u8F4D\u8FED\u9244\u5178\u586B\u5929\u5C55\u5E97\u6DFB\u7E8F\u751C\u8CBC\u8EE2\u985B\u70B9\u4F1D\u6BBF\u6FB1\u7530\u96FB\u514E\u5410\u5835\u5857\u59AC\u5C60\u5F92\u6597\u675C\u6E21\u767B\u83DF\u8CED\u9014\u90FD\u934D\u7825\u783A\u52AA\u5EA6\u571F\u5974\u6012\u5012\u515A\u51AC"],["9380","\u51CD\u5200\u5510\u5854\u5858\u5957\u5B95\u5CF6\u5D8B\u60BC\u6295\u642D\u6771\u6843\u68BC\u68DF\u76D7\u6DD8\u6E6F\u6D9B\u706F\u71C8\u5F53\u75D8\u7977\u7B49\u7B54\u7B52\u7CD6\u7D71\u5230\u8463\u8569\u85E4\u8A0E\u8B04\u8C46\u8E0F\u9003\u900F\u9419\u9676\u982D\u9A30\u95D8\u50CD\u52D5\u540C\u5802\u5C0E\u61A7\u649E\u6D1E\u77B3\u7AE5\u80F4\u8404\u9053\u9285\u5CE0\u9D07\u533F\u5F97\u5FB3\u6D9C\u7279\u7763\u79BF\u7BE4\u6BD2\u72EC\u8AAD\u6803\u6A61\u51F8\u7A81\u6934\u5C4A\u9CF6\u82EB\u5BC5\u9149\u701E\u5678\u5C6F\u60C7\u6566\u6C8C\u8C5A\u9041\u9813\u5451\u66C7\u920D\u5948\u90A3\u5185\u4E4D\u51EA\u8599\u8B0E\u7058\u637A\u934B\u6962\u99B4\u7E04\u7577\u5357\u6960\u8EDF\u96E3\u6C5D\u4E8C\u5C3C\u5F10\u8FE9\u5302\u8CD1\u8089\u8679\u5EFF\u65E5\u4E73\u5165"],["9440","\u5982\u5C3F\u97EE\u4EFB\u598A\u5FCD\u8A8D\u6FE1\u79B0\u7962\u5BE7\u8471\u732B\u71B1\u5E74\u5FF5\u637B\u649A\u71C3\u7C98\u4E43\u5EFC\u4E4B\u57DC\u56A2\u60A9\u6FC3\u7D0D\u80FD\u8133\u81BF\u8FB2\u8997\u86A4\u5DF4\u628A\u64AD\u8987\u6777\u6CE2\u6D3E\u7436\u7834\u5A46\u7F75\u82AD\u99AC\u4FF3\u5EC3\u62DD\u6392\u6557\u676F\u76C3\u724C\u80CC\u80BA\u8F29\u914D\u500D\u57F9\u5A92\u6885"],["9480","\u6973\u7164\u72FD\u8CB7\u58F2\u8CE0\u966A\u9019\u877F\u79E4\u77E7\u8429\u4F2F\u5265\u535A\u62CD\u67CF\u6CCA\u767D\u7B94\u7C95\u8236\u8584\u8FEB\u66DD\u6F20\u7206\u7E1B\u83AB\u99C1\u9EA6\u51FD\u7BB1\u7872\u7BB8\u8087\u7B48\u6AE8\u5E61\u808C\u7551\u7560\u516B\u9262\u6E8C\u767A\u9197\u9AEA\u4F10\u7F70\u629C\u7B4F\u95A5\u9CE9\u567A\u5859\u86E4\u96BC\u4F34\u5224\u534A\u53CD\u53DB\u5E06\u642C\u6591\u677F\u6C3E\u6C4E\u7248\u72AF\u73ED\u7554\u7E41\u822C\u85E9\u8CA9\u7BC4\u91C6\u7169\u9812\u98EF\u633D\u6669\u756A\u76E4\u78D0\u8543\u86EE\u532A\u5351\u5426\u5983\u5E87\u5F7C\u60B2\u6249\u6279\u62AB\u6590\u6BD4\u6CCC\u75B2\u76AE\u7891\u79D8\u7DCB\u7F77\u80A5\u88AB\u8AB9\u8CBB\u907F\u975E\u98DB\u6A0B\u7C38\u5099\u5C3E\u5FAE\u6787\u6BD8\u7435\u7709\u7F8E"],["9540","\u9F3B\u67CA\u7A17\u5339\u758B\u9AED\u5F66\u819D\u83F1\u8098\u5F3C\u5FC5\u7562\u7B46\u903C\u6867\u59EB\u5A9B\u7D10\u767E\u8B2C\u4FF5\u5F6A\u6A19\u6C37\u6F02\u74E2\u7968\u8868\u8A55\u8C79\u5EDF\u63CF\u75C5\u79D2\u82D7\u9328\u92F2\u849C\u86ED\u9C2D\u54C1\u5F6C\u658C\u6D5C\u7015\u8CA7\u8CD3\u983B\u654F\u74F6\u4E0D\u4ED8\u57E0\u592B\u5A66\u5BCC\u51A8\u5E03\u5E9C\u6016\u6276\u6577"],["9580","\u65A7\u666E\u6D6E\u7236\u7B26\u8150\u819A\u8299\u8B5C\u8CA0\u8CE6\u8D74\u961C\u9644\u4FAE\u64AB\u6B66\u821E\u8461\u856A\u90E8\u5C01\u6953\u98A8\u847A\u8557\u4F0F\u526F\u5FA9\u5E45\u670D\u798F\u8179\u8907\u8986\u6DF5\u5F17\u6255\u6CB8\u4ECF\u7269\u9B92\u5206\u543B\u5674\u58B3\u61A4\u626E\u711A\u596E\u7C89\u7CDE\u7D1B\u96F0\u6587\u805E\u4E19\u4F75\u5175\u5840\u5E63\u5E73\u5F0A\u67C4\u4E26\u853D\u9589\u965B\u7C73\u9801\u50FB\u58C1\u7656\u78A7\u5225\u77A5\u8511\u7B86\u504F\u5909\u7247\u7BC7\u7DE8\u8FBA\u8FD4\u904D\u4FBF\u52C9\u5A29\u5F01\u97AD\u4FDD\u8217\u92EA\u5703\u6355\u6B69\u752B\u88DC\u8F14\u7A42\u52DF\u5893\u6155\u620A\u66AE\u6BCD\u7C3F\u83E9\u5023\u4FF8\u5305\u5446\u5831\u5949\u5B9D\u5CF0\u5CEF\u5D29\u5E96\u62B1\u6367\u653E\u65B9\u670B"],["9640","\u6CD5\u6CE1\u70F9\u7832\u7E2B\u80DE\u82B3\u840C\u84EC\u8702\u8912\u8A2A\u8C4A\u90A6\u92D2\u98FD\u9CF3\u9D6C\u4E4F\u4EA1\u508D\u5256\u574A\u59A8\u5E3D\u5FD8\u5FD9\u623F\u66B4\u671B\u67D0\u68D2\u5192\u7D21\u80AA\u81A8\u8B00\u8C8C\u8CBF\u927E\u9632\u5420\u982C\u5317\u50D5\u535C\u58A8\u64B2\u6734\u7267\u7766\u7A46\u91E6\u52C3\u6CA1\u6B86\u5800\u5E4C\u5954\u672C\u7FFB\u51E1\u76C6"],["9680","\u6469\u78E8\u9B54\u9EBB\u57CB\u59B9\u6627\u679A\u6BCE\u54E9\u69D9\u5E55\u819C\u6795\u9BAA\u67FE\u9C52\u685D\u4EA6\u4FE3\u53C8\u62B9\u672B\u6CAB\u8FC4\u4FAD\u7E6D\u9EBF\u4E07\u6162\u6E80\u6F2B\u8513\u5473\u672A\u9B45\u5DF3\u7B95\u5CAC\u5BC6\u871C\u6E4A\u84D1\u7A14\u8108\u5999\u7C8D\u6C11\u7720\u52D9\u5922\u7121\u725F\u77DB\u9727\u9D61\u690B\u5A7F\u5A18\u51A5\u540D\u547D\u660E\u76DF\u8FF7\u9298\u9CF4\u59EA\u725D\u6EC5\u514D\u68C9\u7DBF\u7DEC\u9762\u9EBA\u6478\u6A21\u8302\u5984\u5B5F\u6BDB\u731B\u76F2\u7DB2\u8017\u8499\u5132\u6728\u9ED9\u76EE\u6762\u52FF\u9905\u5C24\u623B\u7C7E\u8CB0\u554F\u60B6\u7D0B\u9580\u5301\u4E5F\u51B6\u591C\u723A\u8036\u91CE\u5F25\u77E2\u5384\u5F79\u7D04\u85AC\u8A33\u8E8D\u9756\u67F3\u85AE\u9453\u6109\u6108\u6CB9\u7652"],["9740","\u8AED\u8F38\u552F\u4F51\u512A\u52C7\u53CB\u5BA5\u5E7D\u60A0\u6182\u63D6\u6709\u67DA\u6E67\u6D8C\u7336\u7337\u7531\u7950\u88D5\u8A98\u904A\u9091\u90F5\u96C4\u878D\u5915\u4E88\u4F59\u4E0E\u8A89\u8F3F\u9810\u50AD\u5E7C\u5996\u5BB9\u5EB8\u63DA\u63FA\u64C1\u66DC\u694A\u69D8\u6D0B\u6EB6\u7194\u7528\u7AAF\u7F8A\u8000\u8449\u84C9\u8981\u8B21\u8E0A\u9065\u967D\u990A\u617E\u6291\u6B32"],["9780","\u6C83\u6D74\u7FCC\u7FFC\u6DC0\u7F85\u87BA\u88F8\u6765\u83B1\u983C\u96F7\u6D1B\u7D61\u843D\u916A\u4E71\u5375\u5D50\u6B04\u6FEB\u85CD\u862D\u89A7\u5229\u540F\u5C65\u674E\u68A8\u7406\u7483\u75E2\u88CF\u88E1\u91CC\u96E2\u9678\u5F8B\u7387\u7ACB\u844E\u63A0\u7565\u5289\u6D41\u6E9C\u7409\u7559\u786B\u7C92\u9686\u7ADC\u9F8D\u4FB6\u616E\u65C5\u865C\u4E86\u4EAE\u50DA\u4E21\u51CC\u5BEE\u6599\u6881\u6DBC\u731F\u7642\u77AD\u7A1C\u7CE7\u826F\u8AD2\u907C\u91CF\u9675\u9818\u529B\u7DD1\u502B\u5398\u6797\u6DCB\u71D0\u7433\u81E8\u8F2A\u96A3\u9C57\u9E9F\u7460\u5841\u6D99\u7D2F\u985E\u4EE4\u4F36\u4F8B\u51B7\u52B1\u5DBA\u601C\u73B2\u793C\u82D3\u9234\u96B7\u96F6\u970A\u9E97\u9F62\u66A6\u6B74\u5217\u52A3\u70C8\u88C2\u5EC9\u604B\u6190\u6F23\u7149\u7C3E\u7DF4\u806F"],["9840","\u84EE\u9023\u932C\u5442\u9B6F\u6AD3\u7089\u8CC2\u8DEF\u9732\u52B4\u5A41\u5ECA\u5F04\u6717\u697C\u6994\u6D6A\u6F0F\u7262\u72FC\u7BED\u8001\u807E\u874B\u90CE\u516D\u9E93\u7984\u808B\u9332\u8AD6\u502D\u548C\u8A71\u6B6A\u8CC4\u8107\u60D1\u67A0\u9DF2\u4E99\u4E98\u9C10\u8A6B\u85C1\u8568\u6900\u6E7E\u7897\u8155"],["989f","\u5F0C\u4E10\u4E15\u4E2A\u4E31\u4E36\u4E3C\u4E3F\u4E42\u4E56\u4E58\u4E82\u4E85\u8C6B\u4E8A\u8212\u5F0D\u4E8E\u4E9E\u4E9F\u4EA0\u4EA2\u4EB0\u4EB3\u4EB6\u4ECE\u4ECD\u4EC4\u4EC6\u4EC2\u4ED7\u4EDE\u4EED\u4EDF\u4EF7\u4F09\u4F5A\u4F30\u4F5B\u4F5D\u4F57\u4F47\u4F76\u4F88\u4F8F\u4F98\u4F7B\u4F69\u4F70\u4F91\u4F6F\u4F86\u4F96\u5118\u4FD4\u4FDF\u4FCE\u4FD8\u4FDB\u4FD1\u4FDA\u4FD0\u4FE4\u4FE5\u501A\u5028\u5014\u502A\u5025\u5005\u4F1C\u4FF6\u5021\u5029\u502C\u4FFE\u4FEF\u5011\u5006\u5043\u5047\u6703\u5055\u5050\u5048\u505A\u5056\u506C\u5078\u5080\u509A\u5085\u50B4\u50B2"],["9940","\u50C9\u50CA\u50B3\u50C2\u50D6\u50DE\u50E5\u50ED\u50E3\u50EE\u50F9\u50F5\u5109\u5101\u5102\u5116\u5115\u5114\u511A\u5121\u513A\u5137\u513C\u513B\u513F\u5140\u5152\u514C\u5154\u5162\u7AF8\u5169\u516A\u516E\u5180\u5182\u56D8\u518C\u5189\u518F\u5191\u5193\u5195\u5196\u51A4\u51A6\u51A2\u51A9\u51AA\u51AB\u51B3\u51B1\u51B2\u51B0\u51B5\u51BD\u51C5\u51C9\u51DB\u51E0\u8655\u51E9\u51ED"],["9980","\u51F0\u51F5\u51FE\u5204\u520B\u5214\u520E\u5227\u522A\u522E\u5233\u5239\u524F\u5244\u524B\u524C\u525E\u5254\u526A\u5274\u5269\u5273\u527F\u527D\u528D\u5294\u5292\u5271\u5288\u5291\u8FA8\u8FA7\u52AC\u52AD\u52BC\u52B5\u52C1\u52CD\u52D7\u52DE\u52E3\u52E6\u98ED\u52E0\u52F3\u52F5\u52F8\u52F9\u5306\u5308\u7538\u530D\u5310\u530F\u5315\u531A\u5323\u532F\u5331\u5333\u5338\u5340\u5346\u5345\u4E17\u5349\u534D\u51D6\u535E\u5369\u536E\u5918\u537B\u5377\u5382\u5396\u53A0\u53A6\u53A5\u53AE\u53B0\u53B6\u53C3\u7C12\u96D9\u53DF\u66FC\u71EE\u53EE\u53E8\u53ED\u53FA\u5401\u543D\u5440\u542C\u542D\u543C\u542E\u5436\u5429\u541D\u544E\u548F\u5475\u548E\u545F\u5471\u5477\u5470\u5492\u547B\u5480\u5476\u5484\u5490\u5486\u54C7\u54A2\u54B8\u54A5\u54AC\u54C4\u54C8\u54A8"],["9a40","\u54AB\u54C2\u54A4\u54BE\u54BC\u54D8\u54E5\u54E6\u550F\u5514\u54FD\u54EE\u54ED\u54FA\u54E2\u5539\u5540\u5563\u554C\u552E\u555C\u5545\u5556\u5557\u5538\u5533\u555D\u5599\u5580\u54AF\u558A\u559F\u557B\u557E\u5598\u559E\u55AE\u557C\u5583\u55A9\u5587\u55A8\u55DA\u55C5\u55DF\u55C4\u55DC\u55E4\u55D4\u5614\u55F7\u5616\u55FE\u55FD\u561B\u55F9\u564E\u5650\u71DF\u5634\u5636\u5632\u5638"],["9a80","\u566B\u5664\u562F\u566C\u566A\u5686\u5680\u568A\u56A0\u5694\u568F\u56A5\u56AE\u56B6\u56B4\u56C2\u56BC\u56C1\u56C3\u56C0\u56C8\u56CE\u56D1\u56D3\u56D7\u56EE\u56F9\u5700\u56FF\u5704\u5709\u5708\u570B\u570D\u5713\u5718\u5716\u55C7\u571C\u5726\u5737\u5738\u574E\u573B\u5740\u574F\u5769\u57C0\u5788\u5761\u577F\u5789\u5793\u57A0\u57B3\u57A4\u57AA\u57B0\u57C3\u57C6\u57D4\u57D2\u57D3\u580A\u57D6\u57E3\u580B\u5819\u581D\u5872\u5821\u5862\u584B\u5870\u6BC0\u5852\u583D\u5879\u5885\u58B9\u589F\u58AB\u58BA\u58DE\u58BB\u58B8\u58AE\u58C5\u58D3\u58D1\u58D7\u58D9\u58D8\u58E5\u58DC\u58E4\u58DF\u58EF\u58FA\u58F9\u58FB\u58FC\u58FD\u5902\u590A\u5910\u591B\u68A6\u5925\u592C\u592D\u5932\u5938\u593E\u7AD2\u5955\u5950\u594E\u595A\u5958\u5962\u5960\u5967\u596C\u5969"],["9b40","\u5978\u5981\u599D\u4F5E\u4FAB\u59A3\u59B2\u59C6\u59E8\u59DC\u598D\u59D9\u59DA\u5A25\u5A1F\u5A11\u5A1C\u5A09\u5A1A\u5A40\u5A6C\u5A49\u5A35\u5A36\u5A62\u5A6A\u5A9A\u5ABC\u5ABE\u5ACB\u5AC2\u5ABD\u5AE3\u5AD7\u5AE6\u5AE9\u5AD6\u5AFA\u5AFB\u5B0C\u5B0B\u5B16\u5B32\u5AD0\u5B2A\u5B36\u5B3E\u5B43\u5B45\u5B40\u5B51\u5B55\u5B5A\u5B5B\u5B65\u5B69\u5B70\u5B73\u5B75\u5B78\u6588\u5B7A\u5B80"],["9b80","\u5B83\u5BA6\u5BB8\u5BC3\u5BC7\u5BC9\u5BD4\u5BD0\u5BE4\u5BE6\u5BE2\u5BDE\u5BE5\u5BEB\u5BF0\u5BF6\u5BF3\u5C05\u5C07\u5C08\u5C0D\u5C13\u5C20\u5C22\u5C28\u5C38\u5C39\u5C41\u5C46\u5C4E\u5C53\u5C50\u5C4F\u5B71\u5C6C\u5C6E\u4E62\u5C76\u5C79\u5C8C\u5C91\u5C94\u599B\u5CAB\u5CBB\u5CB6\u5CBC\u5CB7\u5CC5\u5CBE\u5CC7\u5CD9\u5CE9\u5CFD\u5CFA\u5CED\u5D8C\u5CEA\u5D0B\u5D15\u5D17\u5D5C\u5D1F\u5D1B\u5D11\u5D14\u5D22\u5D1A\u5D19\u5D18\u5D4C\u5D52\u5D4E\u5D4B\u5D6C\u5D73\u5D76\u5D87\u5D84\u5D82\u5DA2\u5D9D\u5DAC\u5DAE\u5DBD\u5D90\u5DB7\u5DBC\u5DC9\u5DCD\u5DD3\u5DD2\u5DD6\u5DDB\u5DEB\u5DF2\u5DF5\u5E0B\u5E1A\u5E19\u5E11\u5E1B\u5E36\u5E37\u5E44\u5E43\u5E40\u5E4E\u5E57\u5E54\u5E5F\u5E62\u5E64\u5E47\u5E75\u5E76\u5E7A\u9EBC\u5E7F\u5EA0\u5EC1\u5EC2\u5EC8\u5ED0\u5ECF"],["9c40","\u5ED6\u5EE3\u5EDD\u5EDA\u5EDB\u5EE2\u5EE1\u5EE8\u5EE9\u5EEC\u5EF1\u5EF3\u5EF0\u5EF4\u5EF8\u5EFE\u5F03\u5F09\u5F5D\u5F5C\u5F0B\u5F11\u5F16\u5F29\u5F2D\u5F38\u5F41\u5F48\u5F4C\u5F4E\u5F2F\u5F51\u5F56\u5F57\u5F59\u5F61\u5F6D\u5F73\u5F77\u5F83\u5F82\u5F7F\u5F8A\u5F88\u5F91\u5F87\u5F9E\u5F99\u5F98\u5FA0\u5FA8\u5FAD\u5FBC\u5FD6\u5FFB\u5FE4\u5FF8\u5FF1\u5FDD\u60B3\u5FFF\u6021\u6060"],["9c80","\u6019\u6010\u6029\u600E\u6031\u601B\u6015\u602B\u6026\u600F\u603A\u605A\u6041\u606A\u6077\u605F\u604A\u6046\u604D\u6063\u6043\u6064\u6042\u606C\u606B\u6059\u6081\u608D\u60E7\u6083\u609A\u6084\u609B\u6096\u6097\u6092\u60A7\u608B\u60E1\u60B8\u60E0\u60D3\u60B4\u5FF0\u60BD\u60C6\u60B5\u60D8\u614D\u6115\u6106\u60F6\u60F7\u6100\u60F4\u60FA\u6103\u6121\u60FB\u60F1\u610D\u610E\u6147\u613E\u6128\u6127\u614A\u613F\u613C\u612C\u6134\u613D\u6142\u6144\u6173\u6177\u6158\u6159\u615A\u616B\u6174\u616F\u6165\u6171\u615F\u615D\u6153\u6175\u6199\u6196\u6187\u61AC\u6194\u619A\u618A\u6191\u61AB\u61AE\u61CC\u61CA\u61C9\u61F7\u61C8\u61C3\u61C6\u61BA\u61CB\u7F79\u61CD\u61E6\u61E3\u61F6\u61FA\u61F4\u61FF\u61FD\u61FC\u61FE\u6200\u6208\u6209\u620D\u620C\u6214\u621B"],["9d40","\u621E\u6221\u622A\u622E\u6230\u6232\u6233\u6241\u624E\u625E\u6263\u625B\u6260\u6268\u627C\u6282\u6289\u627E\u6292\u6293\u6296\u62D4\u6283\u6294\u62D7\u62D1\u62BB\u62CF\u62FF\u62C6\u64D4\u62C8\u62DC\u62CC\u62CA\u62C2\u62C7\u629B\u62C9\u630C\u62EE\u62F1\u6327\u6302\u6308\u62EF\u62F5\u6350\u633E\u634D\u641C\u634F\u6396\u638E\u6380\u63AB\u6376\u63A3\u638F\u6389\u639F\u63B5\u636B"],["9d80","\u6369\u63BE\u63E9\u63C0\u63C6\u63E3\u63C9\u63D2\u63F6\u63C4\u6416\u6434\u6406\u6413\u6426\u6436\u651D\u6417\u6428\u640F\u6467\u646F\u6476\u644E\u652A\u6495\u6493\u64A5\u64A9\u6488\u64BC\u64DA\u64D2\u64C5\u64C7\u64BB\u64D8\u64C2\u64F1\u64E7\u8209\u64E0\u64E1\u62AC\u64E3\u64EF\u652C\u64F6\u64F4\u64F2\u64FA\u6500\u64FD\u6518\u651C\u6505\u6524\u6523\u652B\u6534\u6535\u6537\u6536\u6538\u754B\u6548\u6556\u6555\u654D\u6558\u655E\u655D\u6572\u6578\u6582\u6583\u8B8A\u659B\u659F\u65AB\u65B7\u65C3\u65C6\u65C1\u65C4\u65CC\u65D2\u65DB\u65D9\u65E0\u65E1\u65F1\u6772\u660A\u6603\u65FB\u6773\u6635\u6636\u6634\u661C\u664F\u6644\u6649\u6641\u665E\u665D\u6664\u6667\u6668\u665F\u6662\u6670\u6683\u6688\u668E\u6689\u6684\u6698\u669D\u66C1\u66B9\u66C9\u66BE\u66BC"],["9e40","\u66C4\u66B8\u66D6\u66DA\u66E0\u663F\u66E6\u66E9\u66F0\u66F5\u66F7\u670F\u6716\u671E\u6726\u6727\u9738\u672E\u673F\u6736\u6741\u6738\u6737\u6746\u675E\u6760\u6759\u6763\u6764\u6789\u6770\u67A9\u677C\u676A\u678C\u678B\u67A6\u67A1\u6785\u67B7\u67EF\u67B4\u67EC\u67B3\u67E9\u67B8\u67E4\u67DE\u67DD\u67E2\u67EE\u67B9\u67CE\u67C6\u67E7\u6A9C\u681E\u6846\u6829\u6840\u684D\u6832\u684E"],["9e80","\u68B3\u682B\u6859\u6863\u6877\u687F\u689F\u688F\u68AD\u6894\u689D\u689B\u6883\u6AAE\u68B9\u6874\u68B5\u68A0\u68BA\u690F\u688D\u687E\u6901\u68CA\u6908\u68D8\u6922\u6926\u68E1\u690C\u68CD\u68D4\u68E7\u68D5\u6936\u6912\u6904\u68D7\u68E3\u6925\u68F9\u68E0\u68EF\u6928\u692A\u691A\u6923\u6921\u68C6\u6979\u6977\u695C\u6978\u696B\u6954\u697E\u696E\u6939\u6974\u693D\u6959\u6930\u6961\u695E\u695D\u6981\u696A\u69B2\u69AE\u69D0\u69BF\u69C1\u69D3\u69BE\u69CE\u5BE8\u69CA\u69DD\u69BB\u69C3\u69A7\u6A2E\u6991\u69A0\u699C\u6995\u69B4\u69DE\u69E8\u6A02\u6A1B\u69FF\u6B0A\u69F9\u69F2\u69E7\u6A05\u69B1\u6A1E\u69ED\u6A14\u69EB\u6A0A\u6A12\u6AC1\u6A23\u6A13\u6A44\u6A0C\u6A72\u6A36\u6A78\u6A47\u6A62\u6A59\u6A66\u6A48\u6A38\u6A22\u6A90\u6A8D\u6AA0\u6A84\u6AA2\u6AA3"],["9f40","\u6A97\u8617\u6ABB\u6AC3\u6AC2\u6AB8\u6AB3\u6AAC\u6ADE\u6AD1\u6ADF\u6AAA\u6ADA\u6AEA\u6AFB\u6B05\u8616\u6AFA\u6B12\u6B16\u9B31\u6B1F\u6B38\u6B37\u76DC\u6B39\u98EE\u6B47\u6B43\u6B49\u6B50\u6B59\u6B54\u6B5B\u6B5F\u6B61\u6B78\u6B79\u6B7F\u6B80\u6B84\u6B83\u6B8D\u6B98\u6B95\u6B9E\u6BA4\u6BAA\u6BAB\u6BAF\u6BB2\u6BB1\u6BB3\u6BB7\u6BBC\u6BC6\u6BCB\u6BD3\u6BDF\u6BEC\u6BEB\u6BF3\u6BEF"],["9f80","\u9EBE\u6C08\u6C13\u6C14\u6C1B\u6C24\u6C23\u6C5E\u6C55\u6C62\u6C6A\u6C82\u6C8D\u6C9A\u6C81\u6C9B\u6C7E\u6C68\u6C73\u6C92\u6C90\u6CC4\u6CF1\u6CD3\u6CBD\u6CD7\u6CC5\u6CDD\u6CAE\u6CB1\u6CBE\u6CBA\u6CDB\u6CEF\u6CD9\u6CEA\u6D1F\u884D\u6D36\u6D2B\u6D3D\u6D38\u6D19\u6D35\u6D33\u6D12\u6D0C\u6D63\u6D93\u6D64\u6D5A\u6D79\u6D59\u6D8E\u6D95\u6FE4\u6D85\u6DF9\u6E15\u6E0A\u6DB5\u6DC7\u6DE6\u6DB8\u6DC6\u6DEC\u6DDE\u6DCC\u6DE8\u6DD2\u6DC5\u6DFA\u6DD9\u6DE4\u6DD5\u6DEA\u6DEE\u6E2D\u6E6E\u6E2E\u6E19\u6E72\u6E5F\u6E3E\u6E23\u6E6B\u6E2B\u6E76\u6E4D\u6E1F\u6E43\u6E3A\u6E4E\u6E24\u6EFF\u6E1D\u6E38\u6E82\u6EAA\u6E98\u6EC9\u6EB7\u6ED3\u6EBD\u6EAF\u6EC4\u6EB2\u6ED4\u6ED5\u6E8F\u6EA5\u6EC2\u6E9F\u6F41\u6F11\u704C\u6EEC\u6EF8\u6EFE\u6F3F\u6EF2\u6F31\u6EEF\u6F32\u6ECC"],["e040","\u6F3E\u6F13\u6EF7\u6F86\u6F7A\u6F78\u6F81\u6F80\u6F6F\u6F5B\u6FF3\u6F6D\u6F82\u6F7C\u6F58\u6F8E\u6F91\u6FC2\u6F66\u6FB3\u6FA3\u6FA1\u6FA4\u6FB9\u6FC6\u6FAA\u6FDF\u6FD5\u6FEC\u6FD4\u6FD8\u6FF1\u6FEE\u6FDB\u7009\u700B\u6FFA\u7011\u7001\u700F\u6FFE\u701B\u701A\u6F74\u701D\u7018\u701F\u7030\u703E\u7032\u7051\u7063\u7099\u7092\u70AF\u70F1\u70AC\u70B8\u70B3\u70AE\u70DF\u70CB\u70DD"],["e080","\u70D9\u7109\u70FD\u711C\u7119\u7165\u7155\u7188\u7166\u7162\u714C\u7156\u716C\u718F\u71FB\u7184\u7195\u71A8\u71AC\u71D7\u71B9\u71BE\u71D2\u71C9\u71D4\u71CE\u71E0\u71EC\u71E7\u71F5\u71FC\u71F9\u71FF\u720D\u7210\u721B\u7228\u722D\u722C\u7230\u7232\u723B\u723C\u723F\u7240\u7246\u724B\u7258\u7274\u727E\u7282\u7281\u7287\u7292\u7296\u72A2\u72A7\u72B9\u72B2\u72C3\u72C6\u72C4\u72CE\u72D2\u72E2\u72E0\u72E1\u72F9\u72F7\u500F\u7317\u730A\u731C\u7316\u731D\u7334\u732F\u7329\u7325\u733E\u734E\u734F\u9ED8\u7357\u736A\u7368\u7370\u7378\u7375\u737B\u737A\u73C8\u73B3\u73CE\u73BB\u73C0\u73E5\u73EE\u73DE\u74A2\u7405\u746F\u7425\u73F8\u7432\u743A\u7455\u743F\u745F\u7459\u7441\u745C\u7469\u7470\u7463\u746A\u7476\u747E\u748B\u749E\u74A7\u74CA\u74CF\u74D4\u73F1"],["e140","\u74E0\u74E3\u74E7\u74E9\u74EE\u74F2\u74F0\u74F1\u74F8\u74F7\u7504\u7503\u7505\u750C\u750E\u750D\u7515\u7513\u751E\u7526\u752C\u753C\u7544\u754D\u754A\u7549\u755B\u7546\u755A\u7569\u7564\u7567\u756B\u756D\u7578\u7576\u7586\u7587\u7574\u758A\u7589\u7582\u7594\u759A\u759D\u75A5\u75A3\u75C2\u75B3\u75C3\u75B5\u75BD\u75B8\u75BC\u75B1\u75CD\u75CA\u75D2\u75D9\u75E3\u75DE\u75FE\u75FF"],["e180","\u75FC\u7601\u75F0\u75FA\u75F2\u75F3\u760B\u760D\u7609\u761F\u7627\u7620\u7621\u7622\u7624\u7634\u7630\u763B\u7647\u7648\u7646\u765C\u7658\u7661\u7662\u7668\u7669\u766A\u7667\u766C\u7670\u7672\u7676\u7678\u767C\u7680\u7683\u7688\u768B\u768E\u7696\u7693\u7699\u769A\u76B0\u76B4\u76B8\u76B9\u76BA\u76C2\u76CD\u76D6\u76D2\u76DE\u76E1\u76E5\u76E7\u76EA\u862F\u76FB\u7708\u7707\u7704\u7729\u7724\u771E\u7725\u7726\u771B\u7737\u7738\u7747\u775A\u7768\u776B\u775B\u7765\u777F\u777E\u7779\u778E\u778B\u7791\u77A0\u779E\u77B0\u77B6\u77B9\u77BF\u77BC\u77BD\u77BB\u77C7\u77CD\u77D7\u77DA\u77DC\u77E3\u77EE\u77FC\u780C\u7812\u7926\u7820\u792A\u7845\u788E\u7874\u7886\u787C\u789A\u788C\u78A3\u78B5\u78AA\u78AF\u78D1\u78C6\u78CB\u78D4\u78BE\u78BC\u78C5\u78CA\u78EC"],["e240","\u78E7\u78DA\u78FD\u78F4\u7907\u7912\u7911\u7919\u792C\u792B\u7940\u7960\u7957\u795F\u795A\u7955\u7953\u797A\u797F\u798A\u799D\u79A7\u9F4B\u79AA\u79AE\u79B3\u79B9\u79BA\u79C9\u79D5\u79E7\u79EC\u79E1\u79E3\u7A08\u7A0D\u7A18\u7A19\u7A20\u7A1F\u7980\u7A31\u7A3B\u7A3E\u7A37\u7A43\u7A57\u7A49\u7A61\u7A62\u7A69\u9F9D\u7A70\u7A79\u7A7D\u7A88\u7A97\u7A95\u7A98\u7A96\u7AA9\u7AC8\u7AB0"],["e280","\u7AB6\u7AC5\u7AC4\u7ABF\u9083\u7AC7\u7ACA\u7ACD\u7ACF\u7AD5\u7AD3\u7AD9\u7ADA\u7ADD\u7AE1\u7AE2\u7AE6\u7AED\u7AF0\u7B02\u7B0F\u7B0A\u7B06\u7B33\u7B18\u7B19\u7B1E\u7B35\u7B28\u7B36\u7B50\u7B7A\u7B04\u7B4D\u7B0B\u7B4C\u7B45\u7B75\u7B65\u7B74\u7B67\u7B70\u7B71\u7B6C\u7B6E\u7B9D\u7B98\u7B9F\u7B8D\u7B9C\u7B9A\u7B8B\u7B92\u7B8F\u7B5D\u7B99\u7BCB\u7BC1\u7BCC\u7BCF\u7BB4\u7BC6\u7BDD\u7BE9\u7C11\u7C14\u7BE6\u7BE5\u7C60\u7C00\u7C07\u7C13\u7BF3\u7BF7\u7C17\u7C0D\u7BF6\u7C23\u7C27\u7C2A\u7C1F\u7C37\u7C2B\u7C3D\u7C4C\u7C43\u7C54\u7C4F\u7C40\u7C50\u7C58\u7C5F\u7C64\u7C56\u7C65\u7C6C\u7C75\u7C83\u7C90\u7CA4\u7CAD\u7CA2\u7CAB\u7CA1\u7CA8\u7CB3\u7CB2\u7CB1\u7CAE\u7CB9\u7CBD\u7CC0\u7CC5\u7CC2\u7CD8\u7CD2\u7CDC\u7CE2\u9B3B\u7CEF\u7CF2\u7CF4\u7CF6\u7CFA\u7D06"],["e340","\u7D02\u7D1C\u7D15\u7D0A\u7D45\u7D4B\u7D2E\u7D32\u7D3F\u7D35\u7D46\u7D73\u7D56\u7D4E\u7D72\u7D68\u7D6E\u7D4F\u7D63\u7D93\u7D89\u7D5B\u7D8F\u7D7D\u7D9B\u7DBA\u7DAE\u7DA3\u7DB5\u7DC7\u7DBD\u7DAB\u7E3D\u7DA2\u7DAF\u7DDC\u7DB8\u7D9F\u7DB0\u7DD8\u7DDD\u7DE4\u7DDE\u7DFB\u7DF2\u7DE1\u7E05\u7E0A\u7E23\u7E21\u7E12\u7E31\u7E1F\u7E09\u7E0B\u7E22\u7E46\u7E66\u7E3B\u7E35\u7E39\u7E43\u7E37"],["e380","\u7E32\u7E3A\u7E67\u7E5D\u7E56\u7E5E\u7E59\u7E5A\u7E79\u7E6A\u7E69\u7E7C\u7E7B\u7E83\u7DD5\u7E7D\u8FAE\u7E7F\u7E88\u7E89\u7E8C\u7E92\u7E90\u7E93\u7E94\u7E96\u7E8E\u7E9B\u7E9C\u7F38\u7F3A\u7F45\u7F4C\u7F4D\u7F4E\u7F50\u7F51\u7F55\u7F54\u7F58\u7F5F\u7F60\u7F68\u7F69\u7F67\u7F78\u7F82\u7F86\u7F83\u7F88\u7F87\u7F8C\u7F94\u7F9E\u7F9D\u7F9A\u7FA3\u7FAF\u7FB2\u7FB9\u7FAE\u7FB6\u7FB8\u8B71\u7FC5\u7FC6\u7FCA\u7FD5\u7FD4\u7FE1\u7FE6\u7FE9\u7FF3\u7FF9\u98DC\u8006\u8004\u800B\u8012\u8018\u8019\u801C\u8021\u8028\u803F\u803B\u804A\u8046\u8052\u8058\u805A\u805F\u8062\u8068\u8073\u8072\u8070\u8076\u8079\u807D\u807F\u8084\u8086\u8085\u809B\u8093\u809A\u80AD\u5190\u80AC\u80DB\u80E5\u80D9\u80DD\u80C4\u80DA\u80D6\u8109\u80EF\u80F1\u811B\u8129\u8123\u812F\u814B"],["e440","\u968B\u8146\u813E\u8153\u8151\u80FC\u8171\u816E\u8165\u8166\u8174\u8183\u8188\u818A\u8180\u8182\u81A0\u8195\u81A4\u81A3\u815F\u8193\u81A9\u81B0\u81B5\u81BE\u81B8\u81BD\u81C0\u81C2\u81BA\u81C9\u81CD\u81D1\u81D9\u81D8\u81C8\u81DA\u81DF\u81E0\u81E7\u81FA\u81FB\u81FE\u8201\u8202\u8205\u8207\u820A\u820D\u8210\u8216\u8229\u822B\u8238\u8233\u8240\u8259\u8258\u825D\u825A\u825F\u8264"],["e480","\u8262\u8268\u826A\u826B\u822E\u8271\u8277\u8278\u827E\u828D\u8292\u82AB\u829F\u82BB\u82AC\u82E1\u82E3\u82DF\u82D2\u82F4\u82F3\u82FA\u8393\u8303\u82FB\u82F9\u82DE\u8306\u82DC\u8309\u82D9\u8335\u8334\u8316\u8332\u8331\u8340\u8339\u8350\u8345\u832F\u832B\u8317\u8318\u8385\u839A\u83AA\u839F\u83A2\u8396\u8323\u838E\u8387\u838A\u837C\u83B5\u8373\u8375\u83A0\u8389\u83A8\u83F4\u8413\u83EB\u83CE\u83FD\u8403\u83D8\u840B\u83C1\u83F7\u8407\u83E0\u83F2\u840D\u8422\u8420\u83BD\u8438\u8506\u83FB\u846D\u842A\u843C\u855A\u8484\u8477\u846B\u84AD\u846E\u8482\u8469\u8446\u842C\u846F\u8479\u8435\u84CA\u8462\u84B9\u84BF\u849F\u84D9\u84CD\u84BB\u84DA\u84D0\u84C1\u84C6\u84D6\u84A1\u8521\u84FF\u84F4\u8517\u8518\u852C\u851F\u8515\u8514\u84FC\u8540\u8563\u8558\u8548"],["e540","\u8541\u8602\u854B\u8555\u8580\u85A4\u8588\u8591\u858A\u85A8\u856D\u8594\u859B\u85EA\u8587\u859C\u8577\u857E\u8590\u85C9\u85BA\u85CF\u85B9\u85D0\u85D5\u85DD\u85E5\u85DC\u85F9\u860A\u8613\u860B\u85FE\u85FA\u8606\u8622\u861A\u8630\u863F\u864D\u4E55\u8654\u865F\u8667\u8671\u8693\u86A3\u86A9\u86AA\u868B\u868C\u86B6\u86AF\u86C4\u86C6\u86B0\u86C9\u8823\u86AB\u86D4\u86DE\u86E9\u86EC"],["e580","\u86DF\u86DB\u86EF\u8712\u8706\u8708\u8700\u8703\u86FB\u8711\u8709\u870D\u86F9\u870A\u8734\u873F\u8737\u873B\u8725\u8729\u871A\u8760\u875F\u8778\u874C\u874E\u8774\u8757\u8768\u876E\u8759\u8753\u8763\u876A\u8805\u87A2\u879F\u8782\u87AF\u87CB\u87BD\u87C0\u87D0\u96D6\u87AB\u87C4\u87B3\u87C7\u87C6\u87BB\u87EF\u87F2\u87E0\u880F\u880D\u87FE\u87F6\u87F7\u880E\u87D2\u8811\u8816\u8815\u8822\u8821\u8831\u8836\u8839\u8827\u883B\u8844\u8842\u8852\u8859\u885E\u8862\u886B\u8881\u887E\u889E\u8875\u887D\u88B5\u8872\u8882\u8897\u8892\u88AE\u8899\u88A2\u888D\u88A4\u88B0\u88BF\u88B1\u88C3\u88C4\u88D4\u88D8\u88D9\u88DD\u88F9\u8902\u88FC\u88F4\u88E8\u88F2\u8904\u890C\u890A\u8913\u8943\u891E\u8925\u892A\u892B\u8941\u8944\u893B\u8936\u8938\u894C\u891D\u8960\u895E"],["e640","\u8966\u8964\u896D\u896A\u896F\u8974\u8977\u897E\u8983\u8988\u898A\u8993\u8998\u89A1\u89A9\u89A6\u89AC\u89AF\u89B2\u89BA\u89BD\u89BF\u89C0\u89DA\u89DC\u89DD\u89E7\u89F4\u89F8\u8A03\u8A16\u8A10\u8A0C\u8A1B\u8A1D\u8A25\u8A36\u8A41\u8A5B\u8A52\u8A46\u8A48\u8A7C\u8A6D\u8A6C\u8A62\u8A85\u8A82\u8A84\u8AA8\u8AA1\u8A91\u8AA5\u8AA6\u8A9A\u8AA3\u8AC4\u8ACD\u8AC2\u8ADA\u8AEB\u8AF3\u8AE7"],["e680","\u8AE4\u8AF1\u8B14\u8AE0\u8AE2\u8AF7\u8ADE\u8ADB\u8B0C\u8B07\u8B1A\u8AE1\u8B16\u8B10\u8B17\u8B20\u8B33\u97AB\u8B26\u8B2B\u8B3E\u8B28\u8B41\u8B4C\u8B4F\u8B4E\u8B49\u8B56\u8B5B\u8B5A\u8B6B\u8B5F\u8B6C\u8B6F\u8B74\u8B7D\u8B80\u8B8C\u8B8E\u8B92\u8B93\u8B96\u8B99\u8B9A\u8C3A\u8C41\u8C3F\u8C48\u8C4C\u8C4E\u8C50\u8C55\u8C62\u8C6C\u8C78\u8C7A\u8C82\u8C89\u8C85\u8C8A\u8C8D\u8C8E\u8C94\u8C7C\u8C98\u621D\u8CAD\u8CAA\u8CBD\u8CB2\u8CB3\u8CAE\u8CB6\u8CC8\u8CC1\u8CE4\u8CE3\u8CDA\u8CFD\u8CFA\u8CFB\u8D04\u8D05\u8D0A\u8D07\u8D0F\u8D0D\u8D10\u9F4E\u8D13\u8CCD\u8D14\u8D16\u8D67\u8D6D\u8D71\u8D73\u8D81\u8D99\u8DC2\u8DBE\u8DBA\u8DCF\u8DDA\u8DD6\u8DCC\u8DDB\u8DCB\u8DEA\u8DEB\u8DDF\u8DE3\u8DFC\u8E08\u8E09\u8DFF\u8E1D\u8E1E\u8E10\u8E1F\u8E42\u8E35\u8E30\u8E34\u8E4A"],["e740","\u8E47\u8E49\u8E4C\u8E50\u8E48\u8E59\u8E64\u8E60\u8E2A\u8E63\u8E55\u8E76\u8E72\u8E7C\u8E81\u8E87\u8E85\u8E84\u8E8B\u8E8A\u8E93\u8E91\u8E94\u8E99\u8EAA\u8EA1\u8EAC\u8EB0\u8EC6\u8EB1\u8EBE\u8EC5\u8EC8\u8ECB\u8EDB\u8EE3\u8EFC\u8EFB\u8EEB\u8EFE\u8F0A\u8F05\u8F15\u8F12\u8F19\u8F13\u8F1C\u8F1F\u8F1B\u8F0C\u8F26\u8F33\u8F3B\u8F39\u8F45\u8F42\u8F3E\u8F4C\u8F49\u8F46\u8F4E\u8F57\u8F5C"],["e780","\u8F62\u8F63\u8F64\u8F9C\u8F9F\u8FA3\u8FAD\u8FAF\u8FB7\u8FDA\u8FE5\u8FE2\u8FEA\u8FEF\u9087\u8FF4\u9005\u8FF9\u8FFA\u9011\u9015\u9021\u900D\u901E\u9016\u900B\u9027\u9036\u9035\u9039\u8FF8\u904F\u9050\u9051\u9052\u900E\u9049\u903E\u9056\u9058\u905E\u9068\u906F\u9076\u96A8\u9072\u9082\u907D\u9081\u9080\u908A\u9089\u908F\u90A8\u90AF\u90B1\u90B5\u90E2\u90E4\u6248\u90DB\u9102\u9112\u9119\u9132\u9130\u914A\u9156\u9158\u9163\u9165\u9169\u9173\u9172\u918B\u9189\u9182\u91A2\u91AB\u91AF\u91AA\u91B5\u91B4\u91BA\u91C0\u91C1\u91C9\u91CB\u91D0\u91D6\u91DF\u91E1\u91DB\u91FC\u91F5\u91F6\u921E\u91FF\u9214\u922C\u9215\u9211\u925E\u9257\u9245\u9249\u9264\u9248\u9295\u923F\u924B\u9250\u929C\u9296\u9293\u929B\u925A\u92CF\u92B9\u92B7\u92E9\u930F\u92FA\u9344\u932E"],["e840","\u9319\u9322\u931A\u9323\u933A\u9335\u933B\u935C\u9360\u937C\u936E\u9356\u93B0\u93AC\u93AD\u9394\u93B9\u93D6\u93D7\u93E8\u93E5\u93D8\u93C3\u93DD\u93D0\u93C8\u93E4\u941A\u9414\u9413\u9403\u9407\u9410\u9436\u942B\u9435\u9421\u943A\u9441\u9452\u9444\u945B\u9460\u9462\u945E\u946A\u9229\u9470\u9475\u9477\u947D\u945A\u947C\u947E\u9481\u947F\u9582\u9587\u958A\u9594\u9596\u9598\u9599"],["e880","\u95A0\u95A8\u95A7\u95AD\u95BC\u95BB\u95B9\u95BE\u95CA\u6FF6\u95C3\u95CD\u95CC\u95D5\u95D4\u95D6\u95DC\u95E1\u95E5\u95E2\u9621\u9628\u962E\u962F\u9642\u964C\u964F\u964B\u9677\u965C\u965E\u965D\u965F\u9666\u9672\u966C\u968D\u9698\u9695\u9697\u96AA\u96A7\u96B1\u96B2\u96B0\u96B4\u96B6\u96B8\u96B9\u96CE\u96CB\u96C9\u96CD\u894D\u96DC\u970D\u96D5\u96F9\u9704\u9706\u9708\u9713\u970E\u9711\u970F\u9716\u9719\u9724\u972A\u9730\u9739\u973D\u973E\u9744\u9746\u9748\u9742\u9749\u975C\u9760\u9764\u9766\u9768\u52D2\u976B\u9771\u9779\u9785\u977C\u9781\u977A\u9786\u978B\u978F\u9790\u979C\u97A8\u97A6\u97A3\u97B3\u97B4\u97C3\u97C6\u97C8\u97CB\u97DC\u97ED\u9F4F\u97F2\u7ADF\u97F6\u97F5\u980F\u980C\u9838\u9824\u9821\u9837\u983D\u9846\u984F\u984B\u986B\u986F\u9870"],["e940","\u9871\u9874\u9873\u98AA\u98AF\u98B1\u98B6\u98C4\u98C3\u98C6\u98E9\u98EB\u9903\u9909\u9912\u9914\u9918\u9921\u991D\u991E\u9924\u9920\u992C\u992E\u993D\u993E\u9942\u9949\u9945\u9950\u994B\u9951\u9952\u994C\u9955\u9997\u9998\u99A5\u99AD\u99AE\u99BC\u99DF\u99DB\u99DD\u99D8\u99D1\u99ED\u99EE\u99F1\u99F2\u99FB\u99F8\u9A01\u9A0F\u9A05\u99E2\u9A19\u9A2B\u9A37\u9A45\u9A42\u9A40\u9A43"],["e980","\u9A3E\u9A55\u9A4D\u9A5B\u9A57\u9A5F\u9A62\u9A65\u9A64\u9A69\u9A6B\u9A6A\u9AAD\u9AB0\u9ABC\u9AC0\u9ACF\u9AD1\u9AD3\u9AD4\u9ADE\u9ADF\u9AE2\u9AE3\u9AE6\u9AEF\u9AEB\u9AEE\u9AF4\u9AF1\u9AF7\u9AFB\u9B06\u9B18\u9B1A\u9B1F\u9B22\u9B23\u9B25\u9B27\u9B28\u9B29\u9B2A\u9B2E\u9B2F\u9B32\u9B44\u9B43\u9B4F\u9B4D\u9B4E\u9B51\u9B58\u9B74\u9B93\u9B83\u9B91\u9B96\u9B97\u9B9F\u9BA0\u9BA8\u9BB4\u9BC0\u9BCA\u9BB9\u9BC6\u9BCF\u9BD1\u9BD2\u9BE3\u9BE2\u9BE4\u9BD4\u9BE1\u9C3A\u9BF2\u9BF1\u9BF0\u9C15\u9C14\u9C09\u9C13\u9C0C\u9C06\u9C08\u9C12\u9C0A\u9C04\u9C2E\u9C1B\u9C25\u9C24\u9C21\u9C30\u9C47\u9C32\u9C46\u9C3E\u9C5A\u9C60\u9C67\u9C76\u9C78\u9CE7\u9CEC\u9CF0\u9D09\u9D08\u9CEB\u9D03\u9D06\u9D2A\u9D26\u9DAF\u9D23\u9D1F\u9D44\u9D15\u9D12\u9D41\u9D3F\u9D3E\u9D46\u9D48"],["ea40","\u9D5D\u9D5E\u9D64\u9D51\u9D50\u9D59\u9D72\u9D89\u9D87\u9DAB\u9D6F\u9D7A\u9D9A\u9DA4\u9DA9\u9DB2\u9DC4\u9DC1\u9DBB\u9DB8\u9DBA\u9DC6\u9DCF\u9DC2\u9DD9\u9DD3\u9DF8\u9DE6\u9DED\u9DEF\u9DFD\u9E1A\u9E1B\u9E1E\u9E75\u9E79\u9E7D\u9E81\u9E88\u9E8B\u9E8C\u9E92\u9E95\u9E91\u9E9D\u9EA5\u9EA9\u9EB8\u9EAA\u9EAD\u9761\u9ECC\u9ECE\u9ECF\u9ED0\u9ED4\u9EDC\u9EDE\u9EDD\u9EE0\u9EE5\u9EE8\u9EEF"],["ea80","\u9EF4\u9EF6\u9EF7\u9EF9\u9EFB\u9EFC\u9EFD\u9F07\u9F08\u76B7\u9F15\u9F21\u9F2C\u9F3E\u9F4A\u9F52\u9F54\u9F63\u9F5F\u9F60\u9F61\u9F66\u9F67\u9F6C\u9F6A\u9F77\u9F72\u9F76\u9F95\u9F9C\u9FA0\u582F\u69C7\u9059\u7464\u51DC\u7199"],["ed40","\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F"],["ed80","\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1"],["ee40","\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559"],["ee80","\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"],["eeef","\u2170",9,"\uFFE2\uFFE4\uFF07\uFF02"],["f040","\uE000",62],["f080","\uE03F",124],["f140","\uE0BC",62],["f180","\uE0FB",124],["f240","\uE178",62],["f280","\uE1B7",124],["f340","\uE234",62],["f380","\uE273",124],["f440","\uE2F0",62],["f480","\uE32F",124],["f540","\uE3AC",62],["f580","\uE3EB",124],["f640","\uE468",62],["f680","\uE4A7",124],["f740","\uE524",62],["f780","\uE563",124],["f840","\uE5E0",62],["f880","\uE61F",124],["f940","\uE69C"],["fa40","\u2170",9,"\u2160",9,"\uFFE2\uFFE4\uFF07\uFF02\u3231\u2116\u2121\u2235\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A"],["fa80","\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F"],["fb40","\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19"],["fb80","\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9"],["fc40","\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"]]});var xA4=o((_M$,qV9)=>{qV9.exports=[["0","\x00",127],["8ea1","\uFF61",62],["a1a1","\u3000\u3001\u3002\uFF0C\uFF0E\u30FB\uFF1A\uFF1B\uFF1F\uFF01\u309B\u309C\xB4\uFF40\xA8\uFF3E\uFFE3\uFF3F\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\u2015\u2010\uFF0F\uFF3C\uFF5E\u2225\uFF5C\u2026\u2025\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\uFF3B\uFF3D\uFF5B\uFF5D\u3008",9,"\uFF0B\uFF0D\xB1\xD7\xF7\uFF1D\u2260\uFF1C\uFF1E\u2266\u2267\u221E\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFFE5\uFF04\uFFE0\uFFE1\uFF05\uFF03\uFF06\uFF0A\uFF20\xA7\u2606\u2605\u25CB\u25CF\u25CE\u25C7"],["a2a1","\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u203B\u3012\u2192\u2190\u2191\u2193\u3013"],["a2ba","\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229"],["a2ca","\u2227\u2228\uFFE2\u21D2\u21D4\u2200\u2203"],["a2dc","\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C"],["a2f2","\u212B\u2030\u266F\u266D\u266A\u2020\u2021\xB6"],["a2fe","\u25EF"],["a3b0","\uFF10",9],["a3c1","\uFF21",25],["a3e1","\uFF41",25],["a4a1","\u3041",82],["a5a1","\u30A1",85],["a6a1","\u0391",16,"\u03A3",6],["a6c1","\u03B1",16,"\u03C3",6],["a7a1","\u0410",5,"\u0401\u0416",25],["a7d1","\u0430",5,"\u0451\u0436",25],["a8a1","\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542"],["ada1","\u2460",19,"\u2160",9],["adc0","\u3349\u3314\u3322\u334D\u3318\u3327\u3303\u3336\u3351\u3357\u330D\u3326\u3323\u332B\u334A\u333B\u339C\u339D\u339E\u338E\u338F\u33C4\u33A1"],["addf","\u337B\u301D\u301F\u2116\u33CD\u2121\u32A4",4,"\u3231\u3232\u3239\u337E\u337D\u337C\u2252\u2261\u222B\u222E\u2211\u221A\u22A5\u2220\u221F\u22BF\u2235\u2229\u222A"],["b0a1","\u4E9C\u5516\u5A03\u963F\u54C0\u611B\u6328\u59F6\u9022\u8475\u831C\u7A50\u60AA\u63E1\u6E25\u65ED\u8466\u82A6\u9BF5\u6893\u5727\u65A1\u6271\u5B9B\u59D0\u867B\u98F4\u7D62\u7DBE\u9B8E\u6216\u7C9F\u88B7\u5B89\u5EB5\u6309\u6697\u6848\u95C7\u978D\u674F\u4EE5\u4F0A\u4F4D\u4F9D\u5049\u56F2\u5937\u59D4\u5A01\u5C09\u60DF\u610F\u6170\u6613\u6905\u70BA\u754F\u7570\u79FB\u7DAD\u7DEF\u80C3\u840E\u8863\u8B02\u9055\u907A\u533B\u4E95\u4EA5\u57DF\u80B2\u90C1\u78EF\u4E00\u58F1\u6EA2\u9038\u7A32\u8328\u828B\u9C2F\u5141\u5370\u54BD\u54E1\u56E0\u59FB\u5F15\u98F2\u6DEB\u80E4\u852D"],["b1a1","\u9662\u9670\u96A0\u97FB\u540B\u53F3\u5B87\u70CF\u7FBD\u8FC2\u96E8\u536F\u9D5C\u7ABA\u4E11\u7893\u81FC\u6E26\u5618\u5504\u6B1D\u851A\u9C3B\u59E5\u53A9\u6D66\u74DC\u958F\u5642\u4E91\u904B\u96F2\u834F\u990C\u53E1\u55B6\u5B30\u5F71\u6620\u66F3\u6804\u6C38\u6CF3\u6D29\u745B\u76C8\u7A4E\u9834\u82F1\u885B\u8A60\u92ED\u6DB2\u75AB\u76CA\u99C5\u60A6\u8B01\u8D8A\u95B2\u698E\u53AD\u5186\u5712\u5830\u5944\u5BB4\u5EF6\u6028\u63A9\u63F4\u6CBF\u6F14\u708E\u7114\u7159\u71D5\u733F\u7E01\u8276\u82D1\u8597\u9060\u925B\u9D1B\u5869\u65BC\u6C5A\u7525\u51F9\u592E\u5965\u5F80\u5FDC"],["b2a1","\u62BC\u65FA\u6A2A\u6B27\u6BB4\u738B\u7FC1\u8956\u9D2C\u9D0E\u9EC4\u5CA1\u6C96\u837B\u5104\u5C4B\u61B6\u81C6\u6876\u7261\u4E59\u4FFA\u5378\u6069\u6E29\u7A4F\u97F3\u4E0B\u5316\u4EEE\u4F55\u4F3D\u4FA1\u4F73\u52A0\u53EF\u5609\u590F\u5AC1\u5BB6\u5BE1\u79D1\u6687\u679C\u67B6\u6B4C\u6CB3\u706B\u73C2\u798D\u79BE\u7A3C\u7B87\u82B1\u82DB\u8304\u8377\u83EF\u83D3\u8766\u8AB2\u5629\u8CA8\u8FE6\u904E\u971E\u868A\u4FC4\u5CE8\u6211\u7259\u753B\u81E5\u82BD\u86FE\u8CC0\u96C5\u9913\u99D5\u4ECB\u4F1A\u89E3\u56DE\u584A\u58CA\u5EFB\u5FEB\u602A\u6094\u6062\u61D0\u6212\u62D0\u6539"],["b3a1","\u9B41\u6666\u68B0\u6D77\u7070\u754C\u7686\u7D75\u82A5\u87F9\u958B\u968E\u8C9D\u51F1\u52BE\u5916\u54B3\u5BB3\u5D16\u6168\u6982\u6DAF\u788D\u84CB\u8857\u8A72\u93A7\u9AB8\u6D6C\u99A8\u86D9\u57A3\u67FF\u86CE\u920E\u5283\u5687\u5404\u5ED3\u62E1\u64B9\u683C\u6838\u6BBB\u7372\u78BA\u7A6B\u899A\u89D2\u8D6B\u8F03\u90ED\u95A3\u9694\u9769\u5B66\u5CB3\u697D\u984D\u984E\u639B\u7B20\u6A2B\u6A7F\u68B6\u9C0D\u6F5F\u5272\u559D\u6070\u62EC\u6D3B\u6E07\u6ED1\u845B\u8910\u8F44\u4E14\u9C39\u53F6\u691B\u6A3A\u9784\u682A\u515C\u7AC3\u84B2\u91DC\u938C\u565B\u9D28\u6822\u8305\u8431"],["b4a1","\u7CA5\u5208\u82C5\u74E6\u4E7E\u4F83\u51A0\u5BD2\u520A\u52D8\u52E7\u5DFB\u559A\u582A\u59E6\u5B8C\u5B98\u5BDB\u5E72\u5E79\u60A3\u611F\u6163\u61BE\u63DB\u6562\u67D1\u6853\u68FA\u6B3E\u6B53\u6C57\u6F22\u6F97\u6F45\u74B0\u7518\u76E3\u770B\u7AFF\u7BA1\u7C21\u7DE9\u7F36\u7FF0\u809D\u8266\u839E\u89B3\u8ACC\u8CAB\u9084\u9451\u9593\u9591\u95A2\u9665\u97D3\u9928\u8218\u4E38\u542B\u5CB8\u5DCC\u73A9\u764C\u773C\u5CA9\u7FEB\u8D0B\u96C1\u9811\u9854\u9858\u4F01\u4F0E\u5371\u559C\u5668\u57FA\u5947\u5B09\u5BC4\u5C90\u5E0C\u5E7E\u5FCC\u63EE\u673A\u65D7\u65E2\u671F\u68CB\u68C4"],["b5a1","\u6A5F\u5E30\u6BC5\u6C17\u6C7D\u757F\u7948\u5B63\u7A00\u7D00\u5FBD\u898F\u8A18\u8CB4\u8D77\u8ECC\u8F1D\u98E2\u9A0E\u9B3C\u4E80\u507D\u5100\u5993\u5B9C\u622F\u6280\u64EC\u6B3A\u72A0\u7591\u7947\u7FA9\u87FB\u8ABC\u8B70\u63AC\u83CA\u97A0\u5409\u5403\u55AB\u6854\u6A58\u8A70\u7827\u6775\u9ECD\u5374\u5BA2\u811A\u8650\u9006\u4E18\u4E45\u4EC7\u4F11\u53CA\u5438\u5BAE\u5F13\u6025\u6551\u673D\u6C42\u6C72\u6CE3\u7078\u7403\u7A76\u7AAE\u7B08\u7D1A\u7CFE\u7D66\u65E7\u725B\u53BB\u5C45\u5DE8\u62D2\u62E0\u6319\u6E20\u865A\u8A31\u8DDD\u92F8\u6F01\u79A6\u9B5A\u4EA8\u4EAB\u4EAC"],["b6a1","\u4F9B\u4FA0\u50D1\u5147\u7AF6\u5171\u51F6\u5354\u5321\u537F\u53EB\u55AC\u5883\u5CE1\u5F37\u5F4A\u602F\u6050\u606D\u631F\u6559\u6A4B\u6CC1\u72C2\u72ED\u77EF\u80F8\u8105\u8208\u854E\u90F7\u93E1\u97FF\u9957\u9A5A\u4EF0\u51DD\u5C2D\u6681\u696D\u5C40\u66F2\u6975\u7389\u6850\u7C81\u50C5\u52E4\u5747\u5DFE\u9326\u65A4\u6B23\u6B3D\u7434\u7981\u79BD\u7B4B\u7DCA\u82B9\u83CC\u887F\u895F\u8B39\u8FD1\u91D1\u541F\u9280\u4E5D\u5036\u53E5\u533A\u72D7\u7396\u77E9\u82E6\u8EAF\u99C6\u99C8\u99D2\u5177\u611A\u865E\u55B0\u7A7A\u5076\u5BD3\u9047\u9685\u4E32\u6ADB\u91E7\u5C51\u5C48"],["b7a1","\u6398\u7A9F\u6C93\u9774\u8F61\u7AAA\u718A\u9688\u7C82\u6817\u7E70\u6851\u936C\u52F2\u541B\u85AB\u8A13\u7FA4\u8ECD\u90E1\u5366\u8888\u7941\u4FC2\u50BE\u5211\u5144\u5553\u572D\u73EA\u578B\u5951\u5F62\u5F84\u6075\u6176\u6167\u61A9\u63B2\u643A\u656C\u666F\u6842\u6E13\u7566\u7A3D\u7CFB\u7D4C\u7D99\u7E4B\u7F6B\u830E\u834A\u86CD\u8A08\u8A63\u8B66\u8EFD\u981A\u9D8F\u82B8\u8FCE\u9BE8\u5287\u621F\u6483\u6FC0\u9699\u6841\u5091\u6B20\u6C7A\u6F54\u7A74\u7D50\u8840\u8A23\u6708\u4EF6\u5039\u5026\u5065\u517C\u5238\u5263\u55A7\u570F\u5805\u5ACC\u5EFA\u61B2\u61F8\u62F3\u6372"],["b8a1","\u691C\u6A29\u727D\u72AC\u732E\u7814\u786F\u7D79\u770C\u80A9\u898B\u8B19\u8CE2\u8ED2\u9063\u9375\u967A\u9855\u9A13\u9E78\u5143\u539F\u53B3\u5E7B\u5F26\u6E1B\u6E90\u7384\u73FE\u7D43\u8237\u8A00\u8AFA\u9650\u4E4E\u500B\u53E4\u547C\u56FA\u59D1\u5B64\u5DF1\u5EAB\u5F27\u6238\u6545\u67AF\u6E56\u72D0\u7CCA\u88B4\u80A1\u80E1\u83F0\u864E\u8A87\u8DE8\u9237\u96C7\u9867\u9F13\u4E94\u4E92\u4F0D\u5348\u5449\u543E\u5A2F\u5F8C\u5FA1\u609F\u68A7\u6A8E\u745A\u7881\u8A9E\u8AA4\u8B77\u9190\u4E5E\u9BC9\u4EA4\u4F7C\u4FAF\u5019\u5016\u5149\u516C\u529F\u52B9\u52FE\u539A\u53E3\u5411"],["b9a1","\u540E\u5589\u5751\u57A2\u597D\u5B54\u5B5D\u5B8F\u5DE5\u5DE7\u5DF7\u5E78\u5E83\u5E9A\u5EB7\u5F18\u6052\u614C\u6297\u62D8\u63A7\u653B\u6602\u6643\u66F4\u676D\u6821\u6897\u69CB\u6C5F\u6D2A\u6D69\u6E2F\u6E9D\u7532\u7687\u786C\u7A3F\u7CE0\u7D05\u7D18\u7D5E\u7DB1\u8015\u8003\u80AF\u80B1\u8154\u818F\u822A\u8352\u884C\u8861\u8B1B\u8CA2\u8CFC\u90CA\u9175\u9271\u783F\u92FC\u95A4\u964D\u9805\u9999\u9AD8\u9D3B\u525B\u52AB\u53F7\u5408\u58D5\u62F7\u6FE0\u8C6A\u8F5F\u9EB9\u514B\u523B\u544A\u56FD\u7A40\u9177\u9D60\u9ED2\u7344\u6F09\u8170\u7511\u5FFD\u60DA\u9AA8\u72DB\u8FBC"],["baa1","\u6B64\u9803\u4ECA\u56F0\u5764\u58BE\u5A5A\u6068\u61C7\u660F\u6606\u6839\u68B1\u6DF7\u75D5\u7D3A\u826E\u9B42\u4E9B\u4F50\u53C9\u5506\u5D6F\u5DE6\u5DEE\u67FB\u6C99\u7473\u7802\u8A50\u9396\u88DF\u5750\u5EA7\u632B\u50B5\u50AC\u518D\u6700\u54C9\u585E\u59BB\u5BB0\u5F69\u624D\u63A1\u683D\u6B73\u6E08\u707D\u91C7\u7280\u7815\u7826\u796D\u658E\u7D30\u83DC\u88C1\u8F09\u969B\u5264\u5728\u6750\u7F6A\u8CA1\u51B4\u5742\u962A\u583A\u698A\u80B4\u54B2\u5D0E\u57FC\u7895\u9DFA\u4F5C\u524A\u548B\u643E\u6628\u6714\u67F5\u7A84\u7B56\u7D22\u932F\u685C\u9BAD\u7B39\u5319\u518A\u5237"],["bba1","\u5BDF\u62F6\u64AE\u64E6\u672D\u6BBA\u85A9\u96D1\u7690\u9BD6\u634C\u9306\u9BAB\u76BF\u6652\u4E09\u5098\u53C2\u5C71\u60E8\u6492\u6563\u685F\u71E6\u73CA\u7523\u7B97\u7E82\u8695\u8B83\u8CDB\u9178\u9910\u65AC\u66AB\u6B8B\u4ED5\u4ED4\u4F3A\u4F7F\u523A\u53F8\u53F2\u55E3\u56DB\u58EB\u59CB\u59C9\u59FF\u5B50\u5C4D\u5E02\u5E2B\u5FD7\u601D\u6307\u652F\u5B5C\u65AF\u65BD\u65E8\u679D\u6B62\u6B7B\u6C0F\u7345\u7949\u79C1\u7CF8\u7D19\u7D2B\u80A2\u8102\u81F3\u8996\u8A5E\u8A69\u8A66\u8A8C\u8AEE\u8CC7\u8CDC\u96CC\u98FC\u6B6F\u4E8B\u4F3C\u4F8D\u5150\u5B57\u5BFA\u6148\u6301\u6642"],["bca1","\u6B21\u6ECB\u6CBB\u723E\u74BD\u75D4\u78C1\u793A\u800C\u8033\u81EA\u8494\u8F9E\u6C50\u9E7F\u5F0F\u8B58\u9D2B\u7AFA\u8EF8\u5B8D\u96EB\u4E03\u53F1\u57F7\u5931\u5AC9\u5BA4\u6089\u6E7F\u6F06\u75BE\u8CEA\u5B9F\u8500\u7BE0\u5072\u67F4\u829D\u5C61\u854A\u7E1E\u820E\u5199\u5C04\u6368\u8D66\u659C\u716E\u793E\u7D17\u8005\u8B1D\u8ECA\u906E\u86C7\u90AA\u501F\u52FA\u5C3A\u6753\u707C\u7235\u914C\u91C8\u932B\u82E5\u5BC2\u5F31\u60F9\u4E3B\u53D6\u5B88\u624B\u6731\u6B8A\u72E9\u73E0\u7A2E\u816B\u8DA3\u9152\u9996\u5112\u53D7\u546A\u5BFF\u6388\u6A39\u7DAC\u9700\u56DA\u53CE\u5468"],["bda1","\u5B97\u5C31\u5DDE\u4FEE\u6101\u62FE\u6D32\u79C0\u79CB\u7D42\u7E4D\u7FD2\u81ED\u821F\u8490\u8846\u8972\u8B90\u8E74\u8F2F\u9031\u914B\u916C\u96C6\u919C\u4EC0\u4F4F\u5145\u5341\u5F93\u620E\u67D4\u6C41\u6E0B\u7363\u7E26\u91CD\u9283\u53D4\u5919\u5BBF\u6DD1\u795D\u7E2E\u7C9B\u587E\u719F\u51FA\u8853\u8FF0\u4FCA\u5CFB\u6625\u77AC\u7AE3\u821C\u99FF\u51C6\u5FAA\u65EC\u696F\u6B89\u6DF3\u6E96\u6F64\u76FE\u7D14\u5DE1\u9075\u9187\u9806\u51E6\u521D\u6240\u6691\u66D9\u6E1A\u5EB6\u7DD2\u7F72\u66F8\u85AF\u85F7\u8AF8\u52A9\u53D9\u5973\u5E8F\u5F90\u6055\u92E4\u9664\u50B7\u511F"],["bea1","\u52DD\u5320\u5347\u53EC\u54E8\u5546\u5531\u5617\u5968\u59BE\u5A3C\u5BB5\u5C06\u5C0F\u5C11\u5C1A\u5E84\u5E8A\u5EE0\u5F70\u627F\u6284\u62DB\u638C\u6377\u6607\u660C\u662D\u6676\u677E\u68A2\u6A1F\u6A35\u6CBC\u6D88\u6E09\u6E58\u713C\u7126\u7167\u75C7\u7701\u785D\u7901\u7965\u79F0\u7AE0\u7B11\u7CA7\u7D39\u8096\u83D6\u848B\u8549\u885D\u88F3\u8A1F\u8A3C\u8A54\u8A73\u8C61\u8CDE\u91A4\u9266\u937E\u9418\u969C\u9798\u4E0A\u4E08\u4E1E\u4E57\u5197\u5270\u57CE\u5834\u58CC\u5B22\u5E38\u60C5\u64FE\u6761\u6756\u6D44\u72B6\u7573\u7A63\u84B8\u8B72\u91B8\u9320\u5631\u57F4\u98FE"],["bfa1","\u62ED\u690D\u6B96\u71ED\u7E54\u8077\u8272\u89E6\u98DF\u8755\u8FB1\u5C3B\u4F38\u4FE1\u4FB5\u5507\u5A20\u5BDD\u5BE9\u5FC3\u614E\u632F\u65B0\u664B\u68EE\u699B\u6D78\u6DF1\u7533\u75B9\u771F\u795E\u79E6\u7D33\u81E3\u82AF\u85AA\u89AA\u8A3A\u8EAB\u8F9B\u9032\u91DD\u9707\u4EBA\u4EC1\u5203\u5875\u58EC\u5C0B\u751A\u5C3D\u814E\u8A0A\u8FC5\u9663\u976D\u7B25\u8ACF\u9808\u9162\u56F3\u53A8\u9017\u5439\u5782\u5E25\u63A8\u6C34\u708A\u7761\u7C8B\u7FE0\u8870\u9042\u9154\u9310\u9318\u968F\u745E\u9AC4\u5D07\u5D69\u6570\u67A2\u8DA8\u96DB\u636E\u6749\u6919\u83C5\u9817\u96C0\u88FE"],["c0a1","\u6F84\u647A\u5BF8\u4E16\u702C\u755D\u662F\u51C4\u5236\u52E2\u59D3\u5F81\u6027\u6210\u653F\u6574\u661F\u6674\u68F2\u6816\u6B63\u6E05\u7272\u751F\u76DB\u7CBE\u8056\u58F0\u88FD\u897F\u8AA0\u8A93\u8ACB\u901D\u9192\u9752\u9759\u6589\u7A0E\u8106\u96BB\u5E2D\u60DC\u621A\u65A5\u6614\u6790\u77F3\u7A4D\u7C4D\u7E3E\u810A\u8CAC\u8D64\u8DE1\u8E5F\u78A9\u5207\u62D9\u63A5\u6442\u6298\u8A2D\u7A83\u7BC0\u8AAC\u96EA\u7D76\u820C\u8749\u4ED9\u5148\u5343\u5360\u5BA3\u5C02\u5C16\u5DDD\u6226\u6247\u64B0\u6813\u6834\u6CC9\u6D45\u6D17\u67D3\u6F5C\u714E\u717D\u65CB\u7A7F\u7BAD\u7DDA"],["c1a1","\u7E4A\u7FA8\u817A\u821B\u8239\u85A6\u8A6E\u8CCE\u8DF5\u9078\u9077\u92AD\u9291\u9583\u9BAE\u524D\u5584\u6F38\u7136\u5168\u7985\u7E55\u81B3\u7CCE\u564C\u5851\u5CA8\u63AA\u66FE\u66FD\u695A\u72D9\u758F\u758E\u790E\u7956\u79DF\u7C97\u7D20\u7D44\u8607\u8A34\u963B\u9061\u9F20\u50E7\u5275\u53CC\u53E2\u5009\u55AA\u58EE\u594F\u723D\u5B8B\u5C64\u531D\u60E3\u60F3\u635C\u6383\u633F\u63BB\u64CD\u65E9\u66F9\u5DE3\u69CD\u69FD\u6F15\u71E5\u4E89\u75E9\u76F8\u7A93\u7CDF\u7DCF\u7D9C\u8061\u8349\u8358\u846C\u84BC\u85FB\u88C5\u8D70\u9001\u906D\u9397\u971C\u9A12\u50CF\u5897\u618E"],["c2a1","\u81D3\u8535\u8D08\u9020\u4FC3\u5074\u5247\u5373\u606F\u6349\u675F\u6E2C\u8DB3\u901F\u4FD7\u5C5E\u8CCA\u65CF\u7D9A\u5352\u8896\u5176\u63C3\u5B58\u5B6B\u5C0A\u640D\u6751\u905C\u4ED6\u591A\u592A\u6C70\u8A51\u553E\u5815\u59A5\u60F0\u6253\u67C1\u8235\u6955\u9640\u99C4\u9A28\u4F53\u5806\u5BFE\u8010\u5CB1\u5E2F\u5F85\u6020\u614B\u6234\u66FF\u6CF0\u6EDE\u80CE\u817F\u82D4\u888B\u8CB8\u9000\u902E\u968A\u9EDB\u9BDB\u4EE3\u53F0\u5927\u7B2C\u918D\u984C\u9DF9\u6EDD\u7027\u5353\u5544\u5B85\u6258\u629E\u62D3\u6CA2\u6FEF\u7422\u8A17\u9438\u6FC1\u8AFE\u8338\u51E7\u86F8\u53EA"],["c3a1","\u53E9\u4F46\u9054\u8FB0\u596A\u8131\u5DFD\u7AEA\u8FBF\u68DA\u8C37\u72F8\u9C48\u6A3D\u8AB0\u4E39\u5358\u5606\u5766\u62C5\u63A2\u65E6\u6B4E\u6DE1\u6E5B\u70AD\u77ED\u7AEF\u7BAA\u7DBB\u803D\u80C6\u86CB\u8A95\u935B\u56E3\u58C7\u5F3E\u65AD\u6696\u6A80\u6BB5\u7537\u8AC7\u5024\u77E5\u5730\u5F1B\u6065\u667A\u6C60\u75F4\u7A1A\u7F6E\u81F4\u8718\u9045\u99B3\u7BC9\u755C\u7AF9\u7B51\u84C4\u9010\u79E9\u7A92\u8336\u5AE1\u7740\u4E2D\u4EF2\u5B99\u5FE0\u62BD\u663C\u67F1\u6CE8\u866B\u8877\u8A3B\u914E\u92F3\u99D0\u6A17\u7026\u732A\u82E7\u8457\u8CAF\u4E01\u5146\u51CB\u558B\u5BF5"],["c4a1","\u5E16\u5E33\u5E81\u5F14\u5F35\u5F6B\u5FB4\u61F2\u6311\u66A2\u671D\u6F6E\u7252\u753A\u773A\u8074\u8139\u8178\u8776\u8ABF\u8ADC\u8D85\u8DF3\u929A\u9577\u9802\u9CE5\u52C5\u6357\u76F4\u6715\u6C88\u73CD\u8CC3\u93AE\u9673\u6D25\u589C\u690E\u69CC\u8FFD\u939A\u75DB\u901A\u585A\u6802\u63B4\u69FB\u4F43\u6F2C\u67D8\u8FBB\u8526\u7DB4\u9354\u693F\u6F70\u576A\u58F7\u5B2C\u7D2C\u722A\u540A\u91E3\u9DB4\u4EAD\u4F4E\u505C\u5075\u5243\u8C9E\u5448\u5824\u5B9A\u5E1D\u5E95\u5EAD\u5EF7\u5F1F\u608C\u62B5\u633A\u63D0\u68AF\u6C40\u7887\u798E\u7A0B\u7DE0\u8247\u8A02\u8AE6\u8E44\u9013"],["c5a1","\u90B8\u912D\u91D8\u9F0E\u6CE5\u6458\u64E2\u6575\u6EF4\u7684\u7B1B\u9069\u93D1\u6EBA\u54F2\u5FB9\u64A4\u8F4D\u8FED\u9244\u5178\u586B\u5929\u5C55\u5E97\u6DFB\u7E8F\u751C\u8CBC\u8EE2\u985B\u70B9\u4F1D\u6BBF\u6FB1\u7530\u96FB\u514E\u5410\u5835\u5857\u59AC\u5C60\u5F92\u6597\u675C\u6E21\u767B\u83DF\u8CED\u9014\u90FD\u934D\u7825\u783A\u52AA\u5EA6\u571F\u5974\u6012\u5012\u515A\u51AC\u51CD\u5200\u5510\u5854\u5858\u5957\u5B95\u5CF6\u5D8B\u60BC\u6295\u642D\u6771\u6843\u68BC\u68DF\u76D7\u6DD8\u6E6F\u6D9B\u706F\u71C8\u5F53\u75D8\u7977\u7B49\u7B54\u7B52\u7CD6\u7D71\u5230"],["c6a1","\u8463\u8569\u85E4\u8A0E\u8B04\u8C46\u8E0F\u9003\u900F\u9419\u9676\u982D\u9A30\u95D8\u50CD\u52D5\u540C\u5802\u5C0E\u61A7\u649E\u6D1E\u77B3\u7AE5\u80F4\u8404\u9053\u9285\u5CE0\u9D07\u533F\u5F97\u5FB3\u6D9C\u7279\u7763\u79BF\u7BE4\u6BD2\u72EC\u8AAD\u6803\u6A61\u51F8\u7A81\u6934\u5C4A\u9CF6\u82EB\u5BC5\u9149\u701E\u5678\u5C6F\u60C7\u6566\u6C8C\u8C5A\u9041\u9813\u5451\u66C7\u920D\u5948\u90A3\u5185\u4E4D\u51EA\u8599\u8B0E\u7058\u637A\u934B\u6962\u99B4\u7E04\u7577\u5357\u6960\u8EDF\u96E3\u6C5D\u4E8C\u5C3C\u5F10\u8FE9\u5302\u8CD1\u8089\u8679\u5EFF\u65E5\u4E73\u5165"],["c7a1","\u5982\u5C3F\u97EE\u4EFB\u598A\u5FCD\u8A8D\u6FE1\u79B0\u7962\u5BE7\u8471\u732B\u71B1\u5E74\u5FF5\u637B\u649A\u71C3\u7C98\u4E43\u5EFC\u4E4B\u57DC\u56A2\u60A9\u6FC3\u7D0D\u80FD\u8133\u81BF\u8FB2\u8997\u86A4\u5DF4\u628A\u64AD\u8987\u6777\u6CE2\u6D3E\u7436\u7834\u5A46\u7F75\u82AD\u99AC\u4FF3\u5EC3\u62DD\u6392\u6557\u676F\u76C3\u724C\u80CC\u80BA\u8F29\u914D\u500D\u57F9\u5A92\u6885\u6973\u7164\u72FD\u8CB7\u58F2\u8CE0\u966A\u9019\u877F\u79E4\u77E7\u8429\u4F2F\u5265\u535A\u62CD\u67CF\u6CCA\u767D\u7B94\u7C95\u8236\u8584\u8FEB\u66DD\u6F20\u7206\u7E1B\u83AB\u99C1\u9EA6"],["c8a1","\u51FD\u7BB1\u7872\u7BB8\u8087\u7B48\u6AE8\u5E61\u808C\u7551\u7560\u516B\u9262\u6E8C\u767A\u9197\u9AEA\u4F10\u7F70\u629C\u7B4F\u95A5\u9CE9\u567A\u5859\u86E4\u96BC\u4F34\u5224\u534A\u53CD\u53DB\u5E06\u642C\u6591\u677F\u6C3E\u6C4E\u7248\u72AF\u73ED\u7554\u7E41\u822C\u85E9\u8CA9\u7BC4\u91C6\u7169\u9812\u98EF\u633D\u6669\u756A\u76E4\u78D0\u8543\u86EE\u532A\u5351\u5426\u5983\u5E87\u5F7C\u60B2\u6249\u6279\u62AB\u6590\u6BD4\u6CCC\u75B2\u76AE\u7891\u79D8\u7DCB\u7F77\u80A5\u88AB\u8AB9\u8CBB\u907F\u975E\u98DB\u6A0B\u7C38\u5099\u5C3E\u5FAE\u6787\u6BD8\u7435\u7709\u7F8E"],["c9a1","\u9F3B\u67CA\u7A17\u5339\u758B\u9AED\u5F66\u819D\u83F1\u8098\u5F3C\u5FC5\u7562\u7B46\u903C\u6867\u59EB\u5A9B\u7D10\u767E\u8B2C\u4FF5\u5F6A\u6A19\u6C37\u6F02\u74E2\u7968\u8868\u8A55\u8C79\u5EDF\u63CF\u75C5\u79D2\u82D7\u9328\u92F2\u849C\u86ED\u9C2D\u54C1\u5F6C\u658C\u6D5C\u7015\u8CA7\u8CD3\u983B\u654F\u74F6\u4E0D\u4ED8\u57E0\u592B\u5A66\u5BCC\u51A8\u5E03\u5E9C\u6016\u6276\u6577\u65A7\u666E\u6D6E\u7236\u7B26\u8150\u819A\u8299\u8B5C\u8CA0\u8CE6\u8D74\u961C\u9644\u4FAE\u64AB\u6B66\u821E\u8461\u856A\u90E8\u5C01\u6953\u98A8\u847A\u8557\u4F0F\u526F\u5FA9\u5E45\u670D"],["caa1","\u798F\u8179\u8907\u8986\u6DF5\u5F17\u6255\u6CB8\u4ECF\u7269\u9B92\u5206\u543B\u5674\u58B3\u61A4\u626E\u711A\u596E\u7C89\u7CDE\u7D1B\u96F0\u6587\u805E\u4E19\u4F75\u5175\u5840\u5E63\u5E73\u5F0A\u67C4\u4E26\u853D\u9589\u965B\u7C73\u9801\u50FB\u58C1\u7656\u78A7\u5225\u77A5\u8511\u7B86\u504F\u5909\u7247\u7BC7\u7DE8\u8FBA\u8FD4\u904D\u4FBF\u52C9\u5A29\u5F01\u97AD\u4FDD\u8217\u92EA\u5703\u6355\u6B69\u752B\u88DC\u8F14\u7A42\u52DF\u5893\u6155\u620A\u66AE\u6BCD\u7C3F\u83E9\u5023\u4FF8\u5305\u5446\u5831\u5949\u5B9D\u5CF0\u5CEF\u5D29\u5E96\u62B1\u6367\u653E\u65B9\u670B"],["cba1","\u6CD5\u6CE1\u70F9\u7832\u7E2B\u80DE\u82B3\u840C\u84EC\u8702\u8912\u8A2A\u8C4A\u90A6\u92D2\u98FD\u9CF3\u9D6C\u4E4F\u4EA1\u508D\u5256\u574A\u59A8\u5E3D\u5FD8\u5FD9\u623F\u66B4\u671B\u67D0\u68D2\u5192\u7D21\u80AA\u81A8\u8B00\u8C8C\u8CBF\u927E\u9632\u5420\u982C\u5317\u50D5\u535C\u58A8\u64B2\u6734\u7267\u7766\u7A46\u91E6\u52C3\u6CA1\u6B86\u5800\u5E4C\u5954\u672C\u7FFB\u51E1\u76C6\u6469\u78E8\u9B54\u9EBB\u57CB\u59B9\u6627\u679A\u6BCE\u54E9\u69D9\u5E55\u819C\u6795\u9BAA\u67FE\u9C52\u685D\u4EA6\u4FE3\u53C8\u62B9\u672B\u6CAB\u8FC4\u4FAD\u7E6D\u9EBF\u4E07\u6162\u6E80"],["cca1","\u6F2B\u8513\u5473\u672A\u9B45\u5DF3\u7B95\u5CAC\u5BC6\u871C\u6E4A\u84D1\u7A14\u8108\u5999\u7C8D\u6C11\u7720\u52D9\u5922\u7121\u725F\u77DB\u9727\u9D61\u690B\u5A7F\u5A18\u51A5\u540D\u547D\u660E\u76DF\u8FF7\u9298\u9CF4\u59EA\u725D\u6EC5\u514D\u68C9\u7DBF\u7DEC\u9762\u9EBA\u6478\u6A21\u8302\u5984\u5B5F\u6BDB\u731B\u76F2\u7DB2\u8017\u8499\u5132\u6728\u9ED9\u76EE\u6762\u52FF\u9905\u5C24\u623B\u7C7E\u8CB0\u554F\u60B6\u7D0B\u9580\u5301\u4E5F\u51B6\u591C\u723A\u8036\u91CE\u5F25\u77E2\u5384\u5F79\u7D04\u85AC\u8A33\u8E8D\u9756\u67F3\u85AE\u9453\u6109\u6108\u6CB9\u7652"],["cda1","\u8AED\u8F38\u552F\u4F51\u512A\u52C7\u53CB\u5BA5\u5E7D\u60A0\u6182\u63D6\u6709\u67DA\u6E67\u6D8C\u7336\u7337\u7531\u7950\u88D5\u8A98\u904A\u9091\u90F5\u96C4\u878D\u5915\u4E88\u4F59\u4E0E\u8A89\u8F3F\u9810\u50AD\u5E7C\u5996\u5BB9\u5EB8\u63DA\u63FA\u64C1\u66DC\u694A\u69D8\u6D0B\u6EB6\u7194\u7528\u7AAF\u7F8A\u8000\u8449\u84C9\u8981\u8B21\u8E0A\u9065\u967D\u990A\u617E\u6291\u6B32\u6C83\u6D74\u7FCC\u7FFC\u6DC0\u7F85\u87BA\u88F8\u6765\u83B1\u983C\u96F7\u6D1B\u7D61\u843D\u916A\u4E71\u5375\u5D50\u6B04\u6FEB\u85CD\u862D\u89A7\u5229\u540F\u5C65\u674E\u68A8\u7406\u7483"],["cea1","\u75E2\u88CF\u88E1\u91CC\u96E2\u9678\u5F8B\u7387\u7ACB\u844E\u63A0\u7565\u5289\u6D41\u6E9C\u7409\u7559\u786B\u7C92\u9686\u7ADC\u9F8D\u4FB6\u616E\u65C5\u865C\u4E86\u4EAE\u50DA\u4E21\u51CC\u5BEE\u6599\u6881\u6DBC\u731F\u7642\u77AD\u7A1C\u7CE7\u826F\u8AD2\u907C\u91CF\u9675\u9818\u529B\u7DD1\u502B\u5398\u6797\u6DCB\u71D0\u7433\u81E8\u8F2A\u96A3\u9C57\u9E9F\u7460\u5841\u6D99\u7D2F\u985E\u4EE4\u4F36\u4F8B\u51B7\u52B1\u5DBA\u601C\u73B2\u793C\u82D3\u9234\u96B7\u96F6\u970A\u9E97\u9F62\u66A6\u6B74\u5217\u52A3\u70C8\u88C2\u5EC9\u604B\u6190\u6F23\u7149\u7C3E\u7DF4\u806F"],["cfa1","\u84EE\u9023\u932C\u5442\u9B6F\u6AD3\u7089\u8CC2\u8DEF\u9732\u52B4\u5A41\u5ECA\u5F04\u6717\u697C\u6994\u6D6A\u6F0F\u7262\u72FC\u7BED\u8001\u807E\u874B\u90CE\u516D\u9E93\u7984\u808B\u9332\u8AD6\u502D\u548C\u8A71\u6B6A\u8CC4\u8107\u60D1\u67A0\u9DF2\u4E99\u4E98\u9C10\u8A6B\u85C1\u8568\u6900\u6E7E\u7897\u8155"],["d0a1","\u5F0C\u4E10\u4E15\u4E2A\u4E31\u4E36\u4E3C\u4E3F\u4E42\u4E56\u4E58\u4E82\u4E85\u8C6B\u4E8A\u8212\u5F0D\u4E8E\u4E9E\u4E9F\u4EA0\u4EA2\u4EB0\u4EB3\u4EB6\u4ECE\u4ECD\u4EC4\u4EC6\u4EC2\u4ED7\u4EDE\u4EED\u4EDF\u4EF7\u4F09\u4F5A\u4F30\u4F5B\u4F5D\u4F57\u4F47\u4F76\u4F88\u4F8F\u4F98\u4F7B\u4F69\u4F70\u4F91\u4F6F\u4F86\u4F96\u5118\u4FD4\u4FDF\u4FCE\u4FD8\u4FDB\u4FD1\u4FDA\u4FD0\u4FE4\u4FE5\u501A\u5028\u5014\u502A\u5025\u5005\u4F1C\u4FF6\u5021\u5029\u502C\u4FFE\u4FEF\u5011\u5006\u5043\u5047\u6703\u5055\u5050\u5048\u505A\u5056\u506C\u5078\u5080\u509A\u5085\u50B4\u50B2"],["d1a1","\u50C9\u50CA\u50B3\u50C2\u50D6\u50DE\u50E5\u50ED\u50E3\u50EE\u50F9\u50F5\u5109\u5101\u5102\u5116\u5115\u5114\u511A\u5121\u513A\u5137\u513C\u513B\u513F\u5140\u5152\u514C\u5154\u5162\u7AF8\u5169\u516A\u516E\u5180\u5182\u56D8\u518C\u5189\u518F\u5191\u5193\u5195\u5196\u51A4\u51A6\u51A2\u51A9\u51AA\u51AB\u51B3\u51B1\u51B2\u51B0\u51B5\u51BD\u51C5\u51C9\u51DB\u51E0\u8655\u51E9\u51ED\u51F0\u51F5\u51FE\u5204\u520B\u5214\u520E\u5227\u522A\u522E\u5233\u5239\u524F\u5244\u524B\u524C\u525E\u5254\u526A\u5274\u5269\u5273\u527F\u527D\u528D\u5294\u5292\u5271\u5288\u5291\u8FA8"],["d2a1","\u8FA7\u52AC\u52AD\u52BC\u52B5\u52C1\u52CD\u52D7\u52DE\u52E3\u52E6\u98ED\u52E0\u52F3\u52F5\u52F8\u52F9\u5306\u5308\u7538\u530D\u5310\u530F\u5315\u531A\u5323\u532F\u5331\u5333\u5338\u5340\u5346\u5345\u4E17\u5349\u534D\u51D6\u535E\u5369\u536E\u5918\u537B\u5377\u5382\u5396\u53A0\u53A6\u53A5\u53AE\u53B0\u53B6\u53C3\u7C12\u96D9\u53DF\u66FC\u71EE\u53EE\u53E8\u53ED\u53FA\u5401\u543D\u5440\u542C\u542D\u543C\u542E\u5436\u5429\u541D\u544E\u548F\u5475\u548E\u545F\u5471\u5477\u5470\u5492\u547B\u5480\u5476\u5484\u5490\u5486\u54C7\u54A2\u54B8\u54A5\u54AC\u54C4\u54C8\u54A8"],["d3a1","\u54AB\u54C2\u54A4\u54BE\u54BC\u54D8\u54E5\u54E6\u550F\u5514\u54FD\u54EE\u54ED\u54FA\u54E2\u5539\u5540\u5563\u554C\u552E\u555C\u5545\u5556\u5557\u5538\u5533\u555D\u5599\u5580\u54AF\u558A\u559F\u557B\u557E\u5598\u559E\u55AE\u557C\u5583\u55A9\u5587\u55A8\u55DA\u55C5\u55DF\u55C4\u55DC\u55E4\u55D4\u5614\u55F7\u5616\u55FE\u55FD\u561B\u55F9\u564E\u5650\u71DF\u5634\u5636\u5632\u5638\u566B\u5664\u562F\u566C\u566A\u5686\u5680\u568A\u56A0\u5694\u568F\u56A5\u56AE\u56B6\u56B4\u56C2\u56BC\u56C1\u56C3\u56C0\u56C8\u56CE\u56D1\u56D3\u56D7\u56EE\u56F9\u5700\u56FF\u5704\u5709"],["d4a1","\u5708\u570B\u570D\u5713\u5718\u5716\u55C7\u571C\u5726\u5737\u5738\u574E\u573B\u5740\u574F\u5769\u57C0\u5788\u5761\u577F\u5789\u5793\u57A0\u57B3\u57A4\u57AA\u57B0\u57C3\u57C6\u57D4\u57D2\u57D3\u580A\u57D6\u57E3\u580B\u5819\u581D\u5872\u5821\u5862\u584B\u5870\u6BC0\u5852\u583D\u5879\u5885\u58B9\u589F\u58AB\u58BA\u58DE\u58BB\u58B8\u58AE\u58C5\u58D3\u58D1\u58D7\u58D9\u58D8\u58E5\u58DC\u58E4\u58DF\u58EF\u58FA\u58F9\u58FB\u58FC\u58FD\u5902\u590A\u5910\u591B\u68A6\u5925\u592C\u592D\u5932\u5938\u593E\u7AD2\u5955\u5950\u594E\u595A\u5958\u5962\u5960\u5967\u596C\u5969"],["d5a1","\u5978\u5981\u599D\u4F5E\u4FAB\u59A3\u59B2\u59C6\u59E8\u59DC\u598D\u59D9\u59DA\u5A25\u5A1F\u5A11\u5A1C\u5A09\u5A1A\u5A40\u5A6C\u5A49\u5A35\u5A36\u5A62\u5A6A\u5A9A\u5ABC\u5ABE\u5ACB\u5AC2\u5ABD\u5AE3\u5AD7\u5AE6\u5AE9\u5AD6\u5AFA\u5AFB\u5B0C\u5B0B\u5B16\u5B32\u5AD0\u5B2A\u5B36\u5B3E\u5B43\u5B45\u5B40\u5B51\u5B55\u5B5A\u5B5B\u5B65\u5B69\u5B70\u5B73\u5B75\u5B78\u6588\u5B7A\u5B80\u5B83\u5BA6\u5BB8\u5BC3\u5BC7\u5BC9\u5BD4\u5BD0\u5BE4\u5BE6\u5BE2\u5BDE\u5BE5\u5BEB\u5BF0\u5BF6\u5BF3\u5C05\u5C07\u5C08\u5C0D\u5C13\u5C20\u5C22\u5C28\u5C38\u5C39\u5C41\u5C46\u5C4E\u5C53"],["d6a1","\u5C50\u5C4F\u5B71\u5C6C\u5C6E\u4E62\u5C76\u5C79\u5C8C\u5C91\u5C94\u599B\u5CAB\u5CBB\u5CB6\u5CBC\u5CB7\u5CC5\u5CBE\u5CC7\u5CD9\u5CE9\u5CFD\u5CFA\u5CED\u5D8C\u5CEA\u5D0B\u5D15\u5D17\u5D5C\u5D1F\u5D1B\u5D11\u5D14\u5D22\u5D1A\u5D19\u5D18\u5D4C\u5D52\u5D4E\u5D4B\u5D6C\u5D73\u5D76\u5D87\u5D84\u5D82\u5DA2\u5D9D\u5DAC\u5DAE\u5DBD\u5D90\u5DB7\u5DBC\u5DC9\u5DCD\u5DD3\u5DD2\u5DD6\u5DDB\u5DEB\u5DF2\u5DF5\u5E0B\u5E1A\u5E19\u5E11\u5E1B\u5E36\u5E37\u5E44\u5E43\u5E40\u5E4E\u5E57\u5E54\u5E5F\u5E62\u5E64\u5E47\u5E75\u5E76\u5E7A\u9EBC\u5E7F\u5EA0\u5EC1\u5EC2\u5EC8\u5ED0\u5ECF"],["d7a1","\u5ED6\u5EE3\u5EDD\u5EDA\u5EDB\u5EE2\u5EE1\u5EE8\u5EE9\u5EEC\u5EF1\u5EF3\u5EF0\u5EF4\u5EF8\u5EFE\u5F03\u5F09\u5F5D\u5F5C\u5F0B\u5F11\u5F16\u5F29\u5F2D\u5F38\u5F41\u5F48\u5F4C\u5F4E\u5F2F\u5F51\u5F56\u5F57\u5F59\u5F61\u5F6D\u5F73\u5F77\u5F83\u5F82\u5F7F\u5F8A\u5F88\u5F91\u5F87\u5F9E\u5F99\u5F98\u5FA0\u5FA8\u5FAD\u5FBC\u5FD6\u5FFB\u5FE4\u5FF8\u5FF1\u5FDD\u60B3\u5FFF\u6021\u6060\u6019\u6010\u6029\u600E\u6031\u601B\u6015\u602B\u6026\u600F\u603A\u605A\u6041\u606A\u6077\u605F\u604A\u6046\u604D\u6063\u6043\u6064\u6042\u606C\u606B\u6059\u6081\u608D\u60E7\u6083\u609A"],["d8a1","\u6084\u609B\u6096\u6097\u6092\u60A7\u608B\u60E1\u60B8\u60E0\u60D3\u60B4\u5FF0\u60BD\u60C6\u60B5\u60D8\u614D\u6115\u6106\u60F6\u60F7\u6100\u60F4\u60FA\u6103\u6121\u60FB\u60F1\u610D\u610E\u6147\u613E\u6128\u6127\u614A\u613F\u613C\u612C\u6134\u613D\u6142\u6144\u6173\u6177\u6158\u6159\u615A\u616B\u6174\u616F\u6165\u6171\u615F\u615D\u6153\u6175\u6199\u6196\u6187\u61AC\u6194\u619A\u618A\u6191\u61AB\u61AE\u61CC\u61CA\u61C9\u61F7\u61C8\u61C3\u61C6\u61BA\u61CB\u7F79\u61CD\u61E6\u61E3\u61F6\u61FA\u61F4\u61FF\u61FD\u61FC\u61FE\u6200\u6208\u6209\u620D\u620C\u6214\u621B"],["d9a1","\u621E\u6221\u622A\u622E\u6230\u6232\u6233\u6241\u624E\u625E\u6263\u625B\u6260\u6268\u627C\u6282\u6289\u627E\u6292\u6293\u6296\u62D4\u6283\u6294\u62D7\u62D1\u62BB\u62CF\u62FF\u62C6\u64D4\u62C8\u62DC\u62CC\u62CA\u62C2\u62C7\u629B\u62C9\u630C\u62EE\u62F1\u6327\u6302\u6308\u62EF\u62F5\u6350\u633E\u634D\u641C\u634F\u6396\u638E\u6380\u63AB\u6376\u63A3\u638F\u6389\u639F\u63B5\u636B\u6369\u63BE\u63E9\u63C0\u63C6\u63E3\u63C9\u63D2\u63F6\u63C4\u6416\u6434\u6406\u6413\u6426\u6436\u651D\u6417\u6428\u640F\u6467\u646F\u6476\u644E\u652A\u6495\u6493\u64A5\u64A9\u6488\u64BC"],["daa1","\u64DA\u64D2\u64C5\u64C7\u64BB\u64D8\u64C2\u64F1\u64E7\u8209\u64E0\u64E1\u62AC\u64E3\u64EF\u652C\u64F6\u64F4\u64F2\u64FA\u6500\u64FD\u6518\u651C\u6505\u6524\u6523\u652B\u6534\u6535\u6537\u6536\u6538\u754B\u6548\u6556\u6555\u654D\u6558\u655E\u655D\u6572\u6578\u6582\u6583\u8B8A\u659B\u659F\u65AB\u65B7\u65C3\u65C6\u65C1\u65C4\u65CC\u65D2\u65DB\u65D9\u65E0\u65E1\u65F1\u6772\u660A\u6603\u65FB\u6773\u6635\u6636\u6634\u661C\u664F\u6644\u6649\u6641\u665E\u665D\u6664\u6667\u6668\u665F\u6662\u6670\u6683\u6688\u668E\u6689\u6684\u6698\u669D\u66C1\u66B9\u66C9\u66BE\u66BC"],["dba1","\u66C4\u66B8\u66D6\u66DA\u66E0\u663F\u66E6\u66E9\u66F0\u66F5\u66F7\u670F\u6716\u671E\u6726\u6727\u9738\u672E\u673F\u6736\u6741\u6738\u6737\u6746\u675E\u6760\u6759\u6763\u6764\u6789\u6770\u67A9\u677C\u676A\u678C\u678B\u67A6\u67A1\u6785\u67B7\u67EF\u67B4\u67EC\u67B3\u67E9\u67B8\u67E4\u67DE\u67DD\u67E2\u67EE\u67B9\u67CE\u67C6\u67E7\u6A9C\u681E\u6846\u6829\u6840\u684D\u6832\u684E\u68B3\u682B\u6859\u6863\u6877\u687F\u689F\u688F\u68AD\u6894\u689D\u689B\u6883\u6AAE\u68B9\u6874\u68B5\u68A0\u68BA\u690F\u688D\u687E\u6901\u68CA\u6908\u68D8\u6922\u6926\u68E1\u690C\u68CD"],["dca1","\u68D4\u68E7\u68D5\u6936\u6912\u6904\u68D7\u68E3\u6925\u68F9\u68E0\u68EF\u6928\u692A\u691A\u6923\u6921\u68C6\u6979\u6977\u695C\u6978\u696B\u6954\u697E\u696E\u6939\u6974\u693D\u6959\u6930\u6961\u695E\u695D\u6981\u696A\u69B2\u69AE\u69D0\u69BF\u69C1\u69D3\u69BE\u69CE\u5BE8\u69CA\u69DD\u69BB\u69C3\u69A7\u6A2E\u6991\u69A0\u699C\u6995\u69B4\u69DE\u69E8\u6A02\u6A1B\u69FF\u6B0A\u69F9\u69F2\u69E7\u6A05\u69B1\u6A1E\u69ED\u6A14\u69EB\u6A0A\u6A12\u6AC1\u6A23\u6A13\u6A44\u6A0C\u6A72\u6A36\u6A78\u6A47\u6A62\u6A59\u6A66\u6A48\u6A38\u6A22\u6A90\u6A8D\u6AA0\u6A84\u6AA2\u6AA3"],["dda1","\u6A97\u8617\u6ABB\u6AC3\u6AC2\u6AB8\u6AB3\u6AAC\u6ADE\u6AD1\u6ADF\u6AAA\u6ADA\u6AEA\u6AFB\u6B05\u8616\u6AFA\u6B12\u6B16\u9B31\u6B1F\u6B38\u6B37\u76DC\u6B39\u98EE\u6B47\u6B43\u6B49\u6B50\u6B59\u6B54\u6B5B\u6B5F\u6B61\u6B78\u6B79\u6B7F\u6B80\u6B84\u6B83\u6B8D\u6B98\u6B95\u6B9E\u6BA4\u6BAA\u6BAB\u6BAF\u6BB2\u6BB1\u6BB3\u6BB7\u6BBC\u6BC6\u6BCB\u6BD3\u6BDF\u6BEC\u6BEB\u6BF3\u6BEF\u9EBE\u6C08\u6C13\u6C14\u6C1B\u6C24\u6C23\u6C5E\u6C55\u6C62\u6C6A\u6C82\u6C8D\u6C9A\u6C81\u6C9B\u6C7E\u6C68\u6C73\u6C92\u6C90\u6CC4\u6CF1\u6CD3\u6CBD\u6CD7\u6CC5\u6CDD\u6CAE\u6CB1\u6CBE"],["dea1","\u6CBA\u6CDB\u6CEF\u6CD9\u6CEA\u6D1F\u884D\u6D36\u6D2B\u6D3D\u6D38\u6D19\u6D35\u6D33\u6D12\u6D0C\u6D63\u6D93\u6D64\u6D5A\u6D79\u6D59\u6D8E\u6D95\u6FE4\u6D85\u6DF9\u6E15\u6E0A\u6DB5\u6DC7\u6DE6\u6DB8\u6DC6\u6DEC\u6DDE\u6DCC\u6DE8\u6DD2\u6DC5\u6DFA\u6DD9\u6DE4\u6DD5\u6DEA\u6DEE\u6E2D\u6E6E\u6E2E\u6E19\u6E72\u6E5F\u6E3E\u6E23\u6E6B\u6E2B\u6E76\u6E4D\u6E1F\u6E43\u6E3A\u6E4E\u6E24\u6EFF\u6E1D\u6E38\u6E82\u6EAA\u6E98\u6EC9\u6EB7\u6ED3\u6EBD\u6EAF\u6EC4\u6EB2\u6ED4\u6ED5\u6E8F\u6EA5\u6EC2\u6E9F\u6F41\u6F11\u704C\u6EEC\u6EF8\u6EFE\u6F3F\u6EF2\u6F31\u6EEF\u6F32\u6ECC"],["dfa1","\u6F3E\u6F13\u6EF7\u6F86\u6F7A\u6F78\u6F81\u6F80\u6F6F\u6F5B\u6FF3\u6F6D\u6F82\u6F7C\u6F58\u6F8E\u6F91\u6FC2\u6F66\u6FB3\u6FA3\u6FA1\u6FA4\u6FB9\u6FC6\u6FAA\u6FDF\u6FD5\u6FEC\u6FD4\u6FD8\u6FF1\u6FEE\u6FDB\u7009\u700B\u6FFA\u7011\u7001\u700F\u6FFE\u701B\u701A\u6F74\u701D\u7018\u701F\u7030\u703E\u7032\u7051\u7063\u7099\u7092\u70AF\u70F1\u70AC\u70B8\u70B3\u70AE\u70DF\u70CB\u70DD\u70D9\u7109\u70FD\u711C\u7119\u7165\u7155\u7188\u7166\u7162\u714C\u7156\u716C\u718F\u71FB\u7184\u7195\u71A8\u71AC\u71D7\u71B9\u71BE\u71D2\u71C9\u71D4\u71CE\u71E0\u71EC\u71E7\u71F5\u71FC"],["e0a1","\u71F9\u71FF\u720D\u7210\u721B\u7228\u722D\u722C\u7230\u7232\u723B\u723C\u723F\u7240\u7246\u724B\u7258\u7274\u727E\u7282\u7281\u7287\u7292\u7296\u72A2\u72A7\u72B9\u72B2\u72C3\u72C6\u72C4\u72CE\u72D2\u72E2\u72E0\u72E1\u72F9\u72F7\u500F\u7317\u730A\u731C\u7316\u731D\u7334\u732F\u7329\u7325\u733E\u734E\u734F\u9ED8\u7357\u736A\u7368\u7370\u7378\u7375\u737B\u737A\u73C8\u73B3\u73CE\u73BB\u73C0\u73E5\u73EE\u73DE\u74A2\u7405\u746F\u7425\u73F8\u7432\u743A\u7455\u743F\u745F\u7459\u7441\u745C\u7469\u7470\u7463\u746A\u7476\u747E\u748B\u749E\u74A7\u74CA\u74CF\u74D4\u73F1"],["e1a1","\u74E0\u74E3\u74E7\u74E9\u74EE\u74F2\u74F0\u74F1\u74F8\u74F7\u7504\u7503\u7505\u750C\u750E\u750D\u7515\u7513\u751E\u7526\u752C\u753C\u7544\u754D\u754A\u7549\u755B\u7546\u755A\u7569\u7564\u7567\u756B\u756D\u7578\u7576\u7586\u7587\u7574\u758A\u7589\u7582\u7594\u759A\u759D\u75A5\u75A3\u75C2\u75B3\u75C3\u75B5\u75BD\u75B8\u75BC\u75B1\u75CD\u75CA\u75D2\u75D9\u75E3\u75DE\u75FE\u75FF\u75FC\u7601\u75F0\u75FA\u75F2\u75F3\u760B\u760D\u7609\u761F\u7627\u7620\u7621\u7622\u7624\u7634\u7630\u763B\u7647\u7648\u7646\u765C\u7658\u7661\u7662\u7668\u7669\u766A\u7667\u766C\u7670"],["e2a1","\u7672\u7676\u7678\u767C\u7680\u7683\u7688\u768B\u768E\u7696\u7693\u7699\u769A\u76B0\u76B4\u76B8\u76B9\u76BA\u76C2\u76CD\u76D6\u76D2\u76DE\u76E1\u76E5\u76E7\u76EA\u862F\u76FB\u7708\u7707\u7704\u7729\u7724\u771E\u7725\u7726\u771B\u7737\u7738\u7747\u775A\u7768\u776B\u775B\u7765\u777F\u777E\u7779\u778E\u778B\u7791\u77A0\u779E\u77B0\u77B6\u77B9\u77BF\u77BC\u77BD\u77BB\u77C7\u77CD\u77D7\u77DA\u77DC\u77E3\u77EE\u77FC\u780C\u7812\u7926\u7820\u792A\u7845\u788E\u7874\u7886\u787C\u789A\u788C\u78A3\u78B5\u78AA\u78AF\u78D1\u78C6\u78CB\u78D4\u78BE\u78BC\u78C5\u78CA\u78EC"],["e3a1","\u78E7\u78DA\u78FD\u78F4\u7907\u7912\u7911\u7919\u792C\u792B\u7940\u7960\u7957\u795F\u795A\u7955\u7953\u797A\u797F\u798A\u799D\u79A7\u9F4B\u79AA\u79AE\u79B3\u79B9\u79BA\u79C9\u79D5\u79E7\u79EC\u79E1\u79E3\u7A08\u7A0D\u7A18\u7A19\u7A20\u7A1F\u7980\u7A31\u7A3B\u7A3E\u7A37\u7A43\u7A57\u7A49\u7A61\u7A62\u7A69\u9F9D\u7A70\u7A79\u7A7D\u7A88\u7A97\u7A95\u7A98\u7A96\u7AA9\u7AC8\u7AB0\u7AB6\u7AC5\u7AC4\u7ABF\u9083\u7AC7\u7ACA\u7ACD\u7ACF\u7AD5\u7AD3\u7AD9\u7ADA\u7ADD\u7AE1\u7AE2\u7AE6\u7AED\u7AF0\u7B02\u7B0F\u7B0A\u7B06\u7B33\u7B18\u7B19\u7B1E\u7B35\u7B28\u7B36\u7B50"],["e4a1","\u7B7A\u7B04\u7B4D\u7B0B\u7B4C\u7B45\u7B75\u7B65\u7B74\u7B67\u7B70\u7B71\u7B6C\u7B6E\u7B9D\u7B98\u7B9F\u7B8D\u7B9C\u7B9A\u7B8B\u7B92\u7B8F\u7B5D\u7B99\u7BCB\u7BC1\u7BCC\u7BCF\u7BB4\u7BC6\u7BDD\u7BE9\u7C11\u7C14\u7BE6\u7BE5\u7C60\u7C00\u7C07\u7C13\u7BF3\u7BF7\u7C17\u7C0D\u7BF6\u7C23\u7C27\u7C2A\u7C1F\u7C37\u7C2B\u7C3D\u7C4C\u7C43\u7C54\u7C4F\u7C40\u7C50\u7C58\u7C5F\u7C64\u7C56\u7C65\u7C6C\u7C75\u7C83\u7C90\u7CA4\u7CAD\u7CA2\u7CAB\u7CA1\u7CA8\u7CB3\u7CB2\u7CB1\u7CAE\u7CB9\u7CBD\u7CC0\u7CC5\u7CC2\u7CD8\u7CD2\u7CDC\u7CE2\u9B3B\u7CEF\u7CF2\u7CF4\u7CF6\u7CFA\u7D06"],["e5a1","\u7D02\u7D1C\u7D15\u7D0A\u7D45\u7D4B\u7D2E\u7D32\u7D3F\u7D35\u7D46\u7D73\u7D56\u7D4E\u7D72\u7D68\u7D6E\u7D4F\u7D63\u7D93\u7D89\u7D5B\u7D8F\u7D7D\u7D9B\u7DBA\u7DAE\u7DA3\u7DB5\u7DC7\u7DBD\u7DAB\u7E3D\u7DA2\u7DAF\u7DDC\u7DB8\u7D9F\u7DB0\u7DD8\u7DDD\u7DE4\u7DDE\u7DFB\u7DF2\u7DE1\u7E05\u7E0A\u7E23\u7E21\u7E12\u7E31\u7E1F\u7E09\u7E0B\u7E22\u7E46\u7E66\u7E3B\u7E35\u7E39\u7E43\u7E37\u7E32\u7E3A\u7E67\u7E5D\u7E56\u7E5E\u7E59\u7E5A\u7E79\u7E6A\u7E69\u7E7C\u7E7B\u7E83\u7DD5\u7E7D\u8FAE\u7E7F\u7E88\u7E89\u7E8C\u7E92\u7E90\u7E93\u7E94\u7E96\u7E8E\u7E9B\u7E9C\u7F38\u7F3A"],["e6a1","\u7F45\u7F4C\u7F4D\u7F4E\u7F50\u7F51\u7F55\u7F54\u7F58\u7F5F\u7F60\u7F68\u7F69\u7F67\u7F78\u7F82\u7F86\u7F83\u7F88\u7F87\u7F8C\u7F94\u7F9E\u7F9D\u7F9A\u7FA3\u7FAF\u7FB2\u7FB9\u7FAE\u7FB6\u7FB8\u8B71\u7FC5\u7FC6\u7FCA\u7FD5\u7FD4\u7FE1\u7FE6\u7FE9\u7FF3\u7FF9\u98DC\u8006\u8004\u800B\u8012\u8018\u8019\u801C\u8021\u8028\u803F\u803B\u804A\u8046\u8052\u8058\u805A\u805F\u8062\u8068\u8073\u8072\u8070\u8076\u8079\u807D\u807F\u8084\u8086\u8085\u809B\u8093\u809A\u80AD\u5190\u80AC\u80DB\u80E5\u80D9\u80DD\u80C4\u80DA\u80D6\u8109\u80EF\u80F1\u811B\u8129\u8123\u812F\u814B"],["e7a1","\u968B\u8146\u813E\u8153\u8151\u80FC\u8171\u816E\u8165\u8166\u8174\u8183\u8188\u818A\u8180\u8182\u81A0\u8195\u81A4\u81A3\u815F\u8193\u81A9\u81B0\u81B5\u81BE\u81B8\u81BD\u81C0\u81C2\u81BA\u81C9\u81CD\u81D1\u81D9\u81D8\u81C8\u81DA\u81DF\u81E0\u81E7\u81FA\u81FB\u81FE\u8201\u8202\u8205\u8207\u820A\u820D\u8210\u8216\u8229\u822B\u8238\u8233\u8240\u8259\u8258\u825D\u825A\u825F\u8264\u8262\u8268\u826A\u826B\u822E\u8271\u8277\u8278\u827E\u828D\u8292\u82AB\u829F\u82BB\u82AC\u82E1\u82E3\u82DF\u82D2\u82F4\u82F3\u82FA\u8393\u8303\u82FB\u82F9\u82DE\u8306\u82DC\u8309\u82D9"],["e8a1","\u8335\u8334\u8316\u8332\u8331\u8340\u8339\u8350\u8345\u832F\u832B\u8317\u8318\u8385\u839A\u83AA\u839F\u83A2\u8396\u8323\u838E\u8387\u838A\u837C\u83B5\u8373\u8375\u83A0\u8389\u83A8\u83F4\u8413\u83EB\u83CE\u83FD\u8403\u83D8\u840B\u83C1\u83F7\u8407\u83E0\u83F2\u840D\u8422\u8420\u83BD\u8438\u8506\u83FB\u846D\u842A\u843C\u855A\u8484\u8477\u846B\u84AD\u846E\u8482\u8469\u8446\u842C\u846F\u8479\u8435\u84CA\u8462\u84B9\u84BF\u849F\u84D9\u84CD\u84BB\u84DA\u84D0\u84C1\u84C6\u84D6\u84A1\u8521\u84FF\u84F4\u8517\u8518\u852C\u851F\u8515\u8514\u84FC\u8540\u8563\u8558\u8548"],["e9a1","\u8541\u8602\u854B\u8555\u8580\u85A4\u8588\u8591\u858A\u85A8\u856D\u8594\u859B\u85EA\u8587\u859C\u8577\u857E\u8590\u85C9\u85BA\u85CF\u85B9\u85D0\u85D5\u85DD\u85E5\u85DC\u85F9\u860A\u8613\u860B\u85FE\u85FA\u8606\u8622\u861A\u8630\u863F\u864D\u4E55\u8654\u865F\u8667\u8671\u8693\u86A3\u86A9\u86AA\u868B\u868C\u86B6\u86AF\u86C4\u86C6\u86B0\u86C9\u8823\u86AB\u86D4\u86DE\u86E9\u86EC\u86DF\u86DB\u86EF\u8712\u8706\u8708\u8700\u8703\u86FB\u8711\u8709\u870D\u86F9\u870A\u8734\u873F\u8737\u873B\u8725\u8729\u871A\u8760\u875F\u8778\u874C\u874E\u8774\u8757\u8768\u876E\u8759"],["eaa1","\u8753\u8763\u876A\u8805\u87A2\u879F\u8782\u87AF\u87CB\u87BD\u87C0\u87D0\u96D6\u87AB\u87C4\u87B3\u87C7\u87C6\u87BB\u87EF\u87F2\u87E0\u880F\u880D\u87FE\u87F6\u87F7\u880E\u87D2\u8811\u8816\u8815\u8822\u8821\u8831\u8836\u8839\u8827\u883B\u8844\u8842\u8852\u8859\u885E\u8862\u886B\u8881\u887E\u889E\u8875\u887D\u88B5\u8872\u8882\u8897\u8892\u88AE\u8899\u88A2\u888D\u88A4\u88B0\u88BF\u88B1\u88C3\u88C4\u88D4\u88D8\u88D9\u88DD\u88F9\u8902\u88FC\u88F4\u88E8\u88F2\u8904\u890C\u890A\u8913\u8943\u891E\u8925\u892A\u892B\u8941\u8944\u893B\u8936\u8938\u894C\u891D\u8960\u895E"],["eba1","\u8966\u8964\u896D\u896A\u896F\u8974\u8977\u897E\u8983\u8988\u898A\u8993\u8998\u89A1\u89A9\u89A6\u89AC\u89AF\u89B2\u89BA\u89BD\u89BF\u89C0\u89DA\u89DC\u89DD\u89E7\u89F4\u89F8\u8A03\u8A16\u8A10\u8A0C\u8A1B\u8A1D\u8A25\u8A36\u8A41\u8A5B\u8A52\u8A46\u8A48\u8A7C\u8A6D\u8A6C\u8A62\u8A85\u8A82\u8A84\u8AA8\u8AA1\u8A91\u8AA5\u8AA6\u8A9A\u8AA3\u8AC4\u8ACD\u8AC2\u8ADA\u8AEB\u8AF3\u8AE7\u8AE4\u8AF1\u8B14\u8AE0\u8AE2\u8AF7\u8ADE\u8ADB\u8B0C\u8B07\u8B1A\u8AE1\u8B16\u8B10\u8B17\u8B20\u8B33\u97AB\u8B26\u8B2B\u8B3E\u8B28\u8B41\u8B4C\u8B4F\u8B4E\u8B49\u8B56\u8B5B\u8B5A\u8B6B"],["eca1","\u8B5F\u8B6C\u8B6F\u8B74\u8B7D\u8B80\u8B8C\u8B8E\u8B92\u8B93\u8B96\u8B99\u8B9A\u8C3A\u8C41\u8C3F\u8C48\u8C4C\u8C4E\u8C50\u8C55\u8C62\u8C6C\u8C78\u8C7A\u8C82\u8C89\u8C85\u8C8A\u8C8D\u8C8E\u8C94\u8C7C\u8C98\u621D\u8CAD\u8CAA\u8CBD\u8CB2\u8CB3\u8CAE\u8CB6\u8CC8\u8CC1\u8CE4\u8CE3\u8CDA\u8CFD\u8CFA\u8CFB\u8D04\u8D05\u8D0A\u8D07\u8D0F\u8D0D\u8D10\u9F4E\u8D13\u8CCD\u8D14\u8D16\u8D67\u8D6D\u8D71\u8D73\u8D81\u8D99\u8DC2\u8DBE\u8DBA\u8DCF\u8DDA\u8DD6\u8DCC\u8DDB\u8DCB\u8DEA\u8DEB\u8DDF\u8DE3\u8DFC\u8E08\u8E09\u8DFF\u8E1D\u8E1E\u8E10\u8E1F\u8E42\u8E35\u8E30\u8E34\u8E4A"],["eda1","\u8E47\u8E49\u8E4C\u8E50\u8E48\u8E59\u8E64\u8E60\u8E2A\u8E63\u8E55\u8E76\u8E72\u8E7C\u8E81\u8E87\u8E85\u8E84\u8E8B\u8E8A\u8E93\u8E91\u8E94\u8E99\u8EAA\u8EA1\u8EAC\u8EB0\u8EC6\u8EB1\u8EBE\u8EC5\u8EC8\u8ECB\u8EDB\u8EE3\u8EFC\u8EFB\u8EEB\u8EFE\u8F0A\u8F05\u8F15\u8F12\u8F19\u8F13\u8F1C\u8F1F\u8F1B\u8F0C\u8F26\u8F33\u8F3B\u8F39\u8F45\u8F42\u8F3E\u8F4C\u8F49\u8F46\u8F4E\u8F57\u8F5C\u8F62\u8F63\u8F64\u8F9C\u8F9F\u8FA3\u8FAD\u8FAF\u8FB7\u8FDA\u8FE5\u8FE2\u8FEA\u8FEF\u9087\u8FF4\u9005\u8FF9\u8FFA\u9011\u9015\u9021\u900D\u901E\u9016\u900B\u9027\u9036\u9035\u9039\u8FF8"],["eea1","\u904F\u9050\u9051\u9052\u900E\u9049\u903E\u9056\u9058\u905E\u9068\u906F\u9076\u96A8\u9072\u9082\u907D\u9081\u9080\u908A\u9089\u908F\u90A8\u90AF\u90B1\u90B5\u90E2\u90E4\u6248\u90DB\u9102\u9112\u9119\u9132\u9130\u914A\u9156\u9158\u9163\u9165\u9169\u9173\u9172\u918B\u9189\u9182\u91A2\u91AB\u91AF\u91AA\u91B5\u91B4\u91BA\u91C0\u91C1\u91C9\u91CB\u91D0\u91D6\u91DF\u91E1\u91DB\u91FC\u91F5\u91F6\u921E\u91FF\u9214\u922C\u9215\u9211\u925E\u9257\u9245\u9249\u9264\u9248\u9295\u923F\u924B\u9250\u929C\u9296\u9293\u929B\u925A\u92CF\u92B9\u92B7\u92E9\u930F\u92FA\u9344\u932E"],["efa1","\u9319\u9322\u931A\u9323\u933A\u9335\u933B\u935C\u9360\u937C\u936E\u9356\u93B0\u93AC\u93AD\u9394\u93B9\u93D6\u93D7\u93E8\u93E5\u93D8\u93C3\u93DD\u93D0\u93C8\u93E4\u941A\u9414\u9413\u9403\u9407\u9410\u9436\u942B\u9435\u9421\u943A\u9441\u9452\u9444\u945B\u9460\u9462\u945E\u946A\u9229\u9470\u9475\u9477\u947D\u945A\u947C\u947E\u9481\u947F\u9582\u9587\u958A\u9594\u9596\u9598\u9599\u95A0\u95A8\u95A7\u95AD\u95BC\u95BB\u95B9\u95BE\u95CA\u6FF6\u95C3\u95CD\u95CC\u95D5\u95D4\u95D6\u95DC\u95E1\u95E5\u95E2\u9621\u9628\u962E\u962F\u9642\u964C\u964F\u964B\u9677\u965C\u965E"],["f0a1","\u965D\u965F\u9666\u9672\u966C\u968D\u9698\u9695\u9697\u96AA\u96A7\u96B1\u96B2\u96B0\u96B4\u96B6\u96B8\u96B9\u96CE\u96CB\u96C9\u96CD\u894D\u96DC\u970D\u96D5\u96F9\u9704\u9706\u9708\u9713\u970E\u9711\u970F\u9716\u9719\u9724\u972A\u9730\u9739\u973D\u973E\u9744\u9746\u9748\u9742\u9749\u975C\u9760\u9764\u9766\u9768\u52D2\u976B\u9771\u9779\u9785\u977C\u9781\u977A\u9786\u978B\u978F\u9790\u979C\u97A8\u97A6\u97A3\u97B3\u97B4\u97C3\u97C6\u97C8\u97CB\u97DC\u97ED\u9F4F\u97F2\u7ADF\u97F6\u97F5\u980F\u980C\u9838\u9824\u9821\u9837\u983D\u9846\u984F\u984B\u986B\u986F\u9870"],["f1a1","\u9871\u9874\u9873\u98AA\u98AF\u98B1\u98B6\u98C4\u98C3\u98C6\u98E9\u98EB\u9903\u9909\u9912\u9914\u9918\u9921\u991D\u991E\u9924\u9920\u992C\u992E\u993D\u993E\u9942\u9949\u9945\u9950\u994B\u9951\u9952\u994C\u9955\u9997\u9998\u99A5\u99AD\u99AE\u99BC\u99DF\u99DB\u99DD\u99D8\u99D1\u99ED\u99EE\u99F1\u99F2\u99FB\u99F8\u9A01\u9A0F\u9A05\u99E2\u9A19\u9A2B\u9A37\u9A45\u9A42\u9A40\u9A43\u9A3E\u9A55\u9A4D\u9A5B\u9A57\u9A5F\u9A62\u9A65\u9A64\u9A69\u9A6B\u9A6A\u9AAD\u9AB0\u9ABC\u9AC0\u9ACF\u9AD1\u9AD3\u9AD4\u9ADE\u9ADF\u9AE2\u9AE3\u9AE6\u9AEF\u9AEB\u9AEE\u9AF4\u9AF1\u9AF7"],["f2a1","\u9AFB\u9B06\u9B18\u9B1A\u9B1F\u9B22\u9B23\u9B25\u9B27\u9B28\u9B29\u9B2A\u9B2E\u9B2F\u9B32\u9B44\u9B43\u9B4F\u9B4D\u9B4E\u9B51\u9B58\u9B74\u9B93\u9B83\u9B91\u9B96\u9B97\u9B9F\u9BA0\u9BA8\u9BB4\u9BC0\u9BCA\u9BB9\u9BC6\u9BCF\u9BD1\u9BD2\u9BE3\u9BE2\u9BE4\u9BD4\u9BE1\u9C3A\u9BF2\u9BF1\u9BF0\u9C15\u9C14\u9C09\u9C13\u9C0C\u9C06\u9C08\u9C12\u9C0A\u9C04\u9C2E\u9C1B\u9C25\u9C24\u9C21\u9C30\u9C47\u9C32\u9C46\u9C3E\u9C5A\u9C60\u9C67\u9C76\u9C78\u9CE7\u9CEC\u9CF0\u9D09\u9D08\u9CEB\u9D03\u9D06\u9D2A\u9D26\u9DAF\u9D23\u9D1F\u9D44\u9D15\u9D12\u9D41\u9D3F\u9D3E\u9D46\u9D48"],["f3a1","\u9D5D\u9D5E\u9D64\u9D51\u9D50\u9D59\u9D72\u9D89\u9D87\u9DAB\u9D6F\u9D7A\u9D9A\u9DA4\u9DA9\u9DB2\u9DC4\u9DC1\u9DBB\u9DB8\u9DBA\u9DC6\u9DCF\u9DC2\u9DD9\u9DD3\u9DF8\u9DE6\u9DED\u9DEF\u9DFD\u9E1A\u9E1B\u9E1E\u9E75\u9E79\u9E7D\u9E81\u9E88\u9E8B\u9E8C\u9E92\u9E95\u9E91\u9E9D\u9EA5\u9EA9\u9EB8\u9EAA\u9EAD\u9761\u9ECC\u9ECE\u9ECF\u9ED0\u9ED4\u9EDC\u9EDE\u9EDD\u9EE0\u9EE5\u9EE8\u9EEF\u9EF4\u9EF6\u9EF7\u9EF9\u9EFB\u9EFC\u9EFD\u9F07\u9F08\u76B7\u9F15\u9F21\u9F2C\u9F3E\u9F4A\u9F52\u9F54\u9F63\u9F5F\u9F60\u9F61\u9F66\u9F67\u9F6C\u9F6A\u9F77\u9F72\u9F76\u9F95\u9F9C\u9FA0"],["f4a1","\u582F\u69C7\u9059\u7464\u51DC\u7199"],["f9a1","\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7"],["faa1","\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1"],["fba1","\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA"],["fca1","\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"],["fcf1","\u2170",9,"\uFFE2\uFFE4\uFF07\uFF02"],["8fa2af","\u02D8\u02C7\xB8\u02D9\u02DD\xAF\u02DB\u02DA\uFF5E\u0384\u0385"],["8fa2c2","\xA1\xA6\xBF"],["8fa2eb","\xBA\xAA\xA9\xAE\u2122\xA4\u2116"],["8fa6e1","\u0386\u0388\u0389\u038A\u03AA"],["8fa6e7","\u038C"],["8fa6e9","\u038E\u03AB"],["8fa6ec","\u038F"],["8fa6f1","\u03AC\u03AD\u03AE\u03AF\u03CA\u0390\u03CC\u03C2\u03CD\u03CB\u03B0\u03CE"],["8fa7c2","\u0402",10,"\u040E\u040F"],["8fa7f2","\u0452",10,"\u045E\u045F"],["8fa9a1","\xC6\u0110"],["8fa9a4","\u0126"],["8fa9a6","\u0132"],["8fa9a8","\u0141\u013F"],["8fa9ab","\u014A\xD8\u0152"],["8fa9af","\u0166\xDE"],["8fa9c1","\xE6\u0111\xF0\u0127\u0131\u0133\u0138\u0142\u0140\u0149\u014B\xF8\u0153\xDF\u0167\xFE"],["8faaa1","\xC1\xC0\xC4\xC2\u0102\u01CD\u0100\u0104\xC5\xC3\u0106\u0108\u010C\xC7\u010A\u010E\xC9\xC8\xCB\xCA\u011A\u0116\u0112\u0118"],["8faaba","\u011C\u011E\u0122\u0120\u0124\xCD\xCC\xCF\xCE\u01CF\u0130\u012A\u012E\u0128\u0134\u0136\u0139\u013D\u013B\u0143\u0147\u0145\xD1\xD3\xD2\xD6\xD4\u01D1\u0150\u014C\xD5\u0154\u0158\u0156\u015A\u015C\u0160\u015E\u0164\u0162\xDA\xD9\xDC\xDB\u016C\u01D3\u0170\u016A\u0172\u016E\u0168\u01D7\u01DB\u01D9\u01D5\u0174\xDD\u0178\u0176\u0179\u017D\u017B"],["8faba1","\xE1\xE0\xE4\xE2\u0103\u01CE\u0101\u0105\xE5\xE3\u0107\u0109\u010D\xE7\u010B\u010F\xE9\xE8\xEB\xEA\u011B\u0117\u0113\u0119\u01F5\u011D\u011F"],["8fabbd","\u0121\u0125\xED\xEC\xEF\xEE\u01D0"],["8fabc5","\u012B\u012F\u0129\u0135\u0137\u013A\u013E\u013C\u0144\u0148\u0146\xF1\xF3\xF2\xF6\xF4\u01D2\u0151\u014D\xF5\u0155\u0159\u0157\u015B\u015D\u0161\u015F\u0165\u0163\xFA\xF9\xFC\xFB\u016D\u01D4\u0171\u016B\u0173\u016F\u0169\u01D8\u01DC\u01DA\u01D6\u0175\xFD\xFF\u0177\u017A\u017E\u017C"],["8fb0a1","\u4E02\u4E04\u4E05\u4E0C\u4E12\u4E1F\u4E23\u4E24\u4E28\u4E2B\u4E2E\u4E2F\u4E30\u4E35\u4E40\u4E41\u4E44\u4E47\u4E51\u4E5A\u4E5C\u4E63\u4E68\u4E69\u4E74\u4E75\u4E79\u4E7F\u4E8D\u4E96\u4E97\u4E9D\u4EAF\u4EB9\u4EC3\u4ED0\u4EDA\u4EDB\u4EE0\u4EE1\u4EE2\u4EE8\u4EEF\u4EF1\u4EF3\u4EF5\u4EFD\u4EFE\u4EFF\u4F00\u4F02\u4F03\u4F08\u4F0B\u4F0C\u4F12\u4F15\u4F16\u4F17\u4F19\u4F2E\u4F31\u4F60\u4F33\u4F35\u4F37\u4F39\u4F3B\u4F3E\u4F40\u4F42\u4F48\u4F49\u4F4B\u4F4C\u4F52\u4F54\u4F56\u4F58\u4F5F\u4F63\u4F6A\u4F6C\u4F6E\u4F71\u4F77\u4F78\u4F79\u4F7A\u4F7D\u4F7E\u4F81\u4F82\u4F84"],["8fb1a1","\u4F85\u4F89\u4F8A\u4F8C\u4F8E\u4F90\u4F92\u4F93\u4F94\u4F97\u4F99\u4F9A\u4F9E\u4F9F\u4FB2\u4FB7\u4FB9\u4FBB\u4FBC\u4FBD\u4FBE\u4FC0\u4FC1\u4FC5\u4FC6\u4FC8\u4FC9\u4FCB\u4FCC\u4FCD\u4FCF\u4FD2\u4FDC\u4FE0\u4FE2\u4FF0\u4FF2\u4FFC\u4FFD\u4FFF\u5000\u5001\u5004\u5007\u500A\u500C\u500E\u5010\u5013\u5017\u5018\u501B\u501C\u501D\u501E\u5022\u5027\u502E\u5030\u5032\u5033\u5035\u5040\u5041\u5042\u5045\u5046\u504A\u504C\u504E\u5051\u5052\u5053\u5057\u5059\u505F\u5060\u5062\u5063\u5066\u5067\u506A\u506D\u5070\u5071\u503B\u5081\u5083\u5084\u5086\u508A\u508E\u508F\u5090"],["8fb2a1","\u5092\u5093\u5094\u5096\u509B\u509C\u509E",4,"\u50AA\u50AF\u50B0\u50B9\u50BA\u50BD\u50C0\u50C3\u50C4\u50C7\u50CC\u50CE\u50D0\u50D3\u50D4\u50D8\u50DC\u50DD\u50DF\u50E2\u50E4\u50E6\u50E8\u50E9\u50EF\u50F1\u50F6\u50FA\u50FE\u5103\u5106\u5107\u5108\u510B\u510C\u510D\u510E\u50F2\u5110\u5117\u5119\u511B\u511C\u511D\u511E\u5123\u5127\u5128\u512C\u512D\u512F\u5131\u5133\u5134\u5135\u5138\u5139\u5142\u514A\u514F\u5153\u5155\u5157\u5158\u515F\u5164\u5166\u517E\u5183\u5184\u518B\u518E\u5198\u519D\u51A1\u51A3\u51AD\u51B8\u51BA\u51BC\u51BE\u51BF\u51C2"],["8fb3a1","\u51C8\u51CF\u51D1\u51D2\u51D3\u51D5\u51D8\u51DE\u51E2\u51E5\u51EE\u51F2\u51F3\u51F4\u51F7\u5201\u5202\u5205\u5212\u5213\u5215\u5216\u5218\u5222\u5228\u5231\u5232\u5235\u523C\u5245\u5249\u5255\u5257\u5258\u525A\u525C\u525F\u5260\u5261\u5266\u526E\u5277\u5278\u5279\u5280\u5282\u5285\u528A\u528C\u5293\u5295\u5296\u5297\u5298\u529A\u529C\u52A4\u52A5\u52A6\u52A7\u52AF\u52B0\u52B6\u52B7\u52B8\u52BA\u52BB\u52BD\u52C0\u52C4\u52C6\u52C8\u52CC\u52CF\u52D1\u52D4\u52D6\u52DB\u52DC\u52E1\u52E5\u52E8\u52E9\u52EA\u52EC\u52F0\u52F1\u52F4\u52F6\u52F7\u5300\u5303\u530A\u530B"],["8fb4a1","\u530C\u5311\u5313\u5318\u531B\u531C\u531E\u531F\u5325\u5327\u5328\u5329\u532B\u532C\u532D\u5330\u5332\u5335\u533C\u533D\u533E\u5342\u534C\u534B\u5359\u535B\u5361\u5363\u5365\u536C\u536D\u5372\u5379\u537E\u5383\u5387\u5388\u538E\u5393\u5394\u5399\u539D\u53A1\u53A4\u53AA\u53AB\u53AF\u53B2\u53B4\u53B5\u53B7\u53B8\u53BA\u53BD\u53C0\u53C5\u53CF\u53D2\u53D3\u53D5\u53DA\u53DD\u53DE\u53E0\u53E6\u53E7\u53F5\u5402\u5413\u541A\u5421\u5427\u5428\u542A\u542F\u5431\u5434\u5435\u5443\u5444\u5447\u544D\u544F\u545E\u5462\u5464\u5466\u5467\u5469\u546B\u546D\u546E\u5474\u547F"],["8fb5a1","\u5481\u5483\u5485\u5488\u5489\u548D\u5491\u5495\u5496\u549C\u549F\u54A1\u54A6\u54A7\u54A9\u54AA\u54AD\u54AE\u54B1\u54B7\u54B9\u54BA\u54BB\u54BF\u54C6\u54CA\u54CD\u54CE\u54E0\u54EA\u54EC\u54EF\u54F6\u54FC\u54FE\u54FF\u5500\u5501\u5505\u5508\u5509\u550C\u550D\u550E\u5515\u552A\u552B\u5532\u5535\u5536\u553B\u553C\u553D\u5541\u5547\u5549\u554A\u554D\u5550\u5551\u5558\u555A\u555B\u555E\u5560\u5561\u5564\u5566\u557F\u5581\u5582\u5586\u5588\u558E\u558F\u5591\u5592\u5593\u5594\u5597\u55A3\u55A4\u55AD\u55B2\u55BF\u55C1\u55C3\u55C6\u55C9\u55CB\u55CC\u55CE\u55D1\u55D2"],["8fb6a1","\u55D3\u55D7\u55D8\u55DB\u55DE\u55E2\u55E9\u55F6\u55FF\u5605\u5608\u560A\u560D",5,"\u5619\u562C\u5630\u5633\u5635\u5637\u5639\u563B\u563C\u563D\u563F\u5640\u5641\u5643\u5644\u5646\u5649\u564B\u564D\u564F\u5654\u565E\u5660\u5661\u5662\u5663\u5666\u5669\u566D\u566F\u5671\u5672\u5675\u5684\u5685\u5688\u568B\u568C\u5695\u5699\u569A\u569D\u569E\u569F\u56A6\u56A7\u56A8\u56A9\u56AB\u56AC\u56AD\u56B1\u56B3\u56B7\u56BE\u56C5\u56C9\u56CA\u56CB\u56CF\u56D0\u56CC\u56CD\u56D9\u56DC\u56DD\u56DF\u56E1\u56E4",4,"\u56F1\u56EB\u56ED"],["8fb7a1","\u56F6\u56F7\u5701\u5702\u5707\u570A\u570C\u5711\u5715\u571A\u571B\u571D\u5720\u5722\u5723\u5724\u5725\u5729\u572A\u572C\u572E\u572F\u5733\u5734\u573D\u573E\u573F\u5745\u5746\u574C\u574D\u5752\u5762\u5765\u5767\u5768\u576B\u576D",4,"\u5773\u5774\u5775\u5777\u5779\u577A\u577B\u577C\u577E\u5781\u5783\u578C\u5794\u5797\u5799\u579A\u579C\u579D\u579E\u579F\u57A1\u5795\u57A7\u57A8\u57A9\u57AC\u57B8\u57BD\u57C7\u57C8\u57CC\u57CF\u57D5\u57DD\u57DE\u57E4\u57E6\u57E7\u57E9\u57ED\u57F0\u57F5\u57F6\u57F8\u57FD\u57FE\u57FF\u5803\u5804\u5808\u5809\u57E1"],["8fb8a1","\u580C\u580D\u581B\u581E\u581F\u5820\u5826\u5827\u582D\u5832\u5839\u583F\u5849\u584C\u584D\u584F\u5850\u5855\u585F\u5861\u5864\u5867\u5868\u5878\u587C\u587F\u5880\u5881\u5887\u5888\u5889\u588A\u588C\u588D\u588F\u5890\u5894\u5896\u589D\u58A0\u58A1\u58A2\u58A6\u58A9\u58B1\u58B2\u58C4\u58BC\u58C2\u58C8\u58CD\u58CE\u58D0\u58D2\u58D4\u58D6\u58DA\u58DD\u58E1\u58E2\u58E9\u58F3\u5905\u5906\u590B\u590C\u5912\u5913\u5914\u8641\u591D\u5921\u5923\u5924\u5928\u592F\u5930\u5933\u5935\u5936\u593F\u5943\u5946\u5952\u5953\u5959\u595B\u595D\u595E\u595F\u5961\u5963\u596B\u596D"],["8fb9a1","\u596F\u5972\u5975\u5976\u5979\u597B\u597C\u598B\u598C\u598E\u5992\u5995\u5997\u599F\u59A4\u59A7\u59AD\u59AE\u59AF\u59B0\u59B3\u59B7\u59BA\u59BC\u59C1\u59C3\u59C4\u59C8\u59CA\u59CD\u59D2\u59DD\u59DE\u59DF\u59E3\u59E4\u59E7\u59EE\u59EF\u59F1\u59F2\u59F4\u59F7\u5A00\u5A04\u5A0C\u5A0D\u5A0E\u5A12\u5A13\u5A1E\u5A23\u5A24\u5A27\u5A28\u5A2A\u5A2D\u5A30\u5A44\u5A45\u5A47\u5A48\u5A4C\u5A50\u5A55\u5A5E\u5A63\u5A65\u5A67\u5A6D\u5A77\u5A7A\u5A7B\u5A7E\u5A8B\u5A90\u5A93\u5A96\u5A99\u5A9C\u5A9E\u5A9F\u5AA0\u5AA2\u5AA7\u5AAC\u5AB1\u5AB2\u5AB3\u5AB5\u5AB8\u5ABA\u5ABB\u5ABF"],["8fbaa1","\u5AC4\u5AC6\u5AC8\u5ACF\u5ADA\u5ADC\u5AE0\u5AE5\u5AEA\u5AEE\u5AF5\u5AF6\u5AFD\u5B00\u5B01\u5B08\u5B17\u5B34\u5B19\u5B1B\u5B1D\u5B21\u5B25\u5B2D\u5B38\u5B41\u5B4B\u5B4C\u5B52\u5B56\u5B5E\u5B68\u5B6E\u5B6F\u5B7C\u5B7D\u5B7E\u5B7F\u5B81\u5B84\u5B86\u5B8A\u5B8E\u5B90\u5B91\u5B93\u5B94\u5B96\u5BA8\u5BA9\u5BAC\u5BAD\u5BAF\u5BB1\u5BB2\u5BB7\u5BBA\u5BBC\u5BC0\u5BC1\u5BCD\u5BCF\u5BD6",4,"\u5BE0\u5BEF\u5BF1\u5BF4\u5BFD\u5C0C\u5C17\u5C1E\u5C1F\u5C23\u5C26\u5C29\u5C2B\u5C2C\u5C2E\u5C30\u5C32\u5C35\u5C36\u5C59\u5C5A\u5C5C\u5C62\u5C63\u5C67\u5C68\u5C69"],["8fbba1","\u5C6D\u5C70\u5C74\u5C75\u5C7A\u5C7B\u5C7C\u5C7D\u5C87\u5C88\u5C8A\u5C8F\u5C92\u5C9D\u5C9F\u5CA0\u5CA2\u5CA3\u5CA6\u5CAA\u5CB2\u5CB4\u5CB5\u5CBA\u5CC9\u5CCB\u5CD2\u5CDD\u5CD7\u5CEE\u5CF1\u5CF2\u5CF4\u5D01\u5D06\u5D0D\u5D12\u5D2B\u5D23\u5D24\u5D26\u5D27\u5D31\u5D34\u5D39\u5D3D\u5D3F\u5D42\u5D43\u5D46\u5D48\u5D55\u5D51\u5D59\u5D4A\u5D5F\u5D60\u5D61\u5D62\u5D64\u5D6A\u5D6D\u5D70\u5D79\u5D7A\u5D7E\u5D7F\u5D81\u5D83\u5D88\u5D8A\u5D92\u5D93\u5D94\u5D95\u5D99\u5D9B\u5D9F\u5DA0\u5DA7\u5DAB\u5DB0\u5DB4\u5DB8\u5DB9\u5DC3\u5DC7\u5DCB\u5DD0\u5DCE\u5DD8\u5DD9\u5DE0\u5DE4"],["8fbca1","\u5DE9\u5DF8\u5DF9\u5E00\u5E07\u5E0D\u5E12\u5E14\u5E15\u5E18\u5E1F\u5E20\u5E2E\u5E28\u5E32\u5E35\u5E3E\u5E4B\u5E50\u5E49\u5E51\u5E56\u5E58\u5E5B\u5E5C\u5E5E\u5E68\u5E6A",4,"\u5E70\u5E80\u5E8B\u5E8E\u5EA2\u5EA4\u5EA5\u5EA8\u5EAA\u5EAC\u5EB1\u5EB3\u5EBD\u5EBE\u5EBF\u5EC6\u5ECC\u5ECB\u5ECE\u5ED1\u5ED2\u5ED4\u5ED5\u5EDC\u5EDE\u5EE5\u5EEB\u5F02\u5F06\u5F07\u5F08\u5F0E\u5F19\u5F1C\u5F1D\u5F21\u5F22\u5F23\u5F24\u5F28\u5F2B\u5F2C\u5F2E\u5F30\u5F34\u5F36\u5F3B\u5F3D\u5F3F\u5F40\u5F44\u5F45\u5F47\u5F4D\u5F50\u5F54\u5F58\u5F5B\u5F60\u5F63\u5F64\u5F67"],["8fbda1","\u5F6F\u5F72\u5F74\u5F75\u5F78\u5F7A\u5F7D\u5F7E\u5F89\u5F8D\u5F8F\u5F96\u5F9C\u5F9D\u5FA2\u5FA7\u5FAB\u5FA4\u5FAC\u5FAF\u5FB0\u5FB1\u5FB8\u5FC4\u5FC7\u5FC8\u5FC9\u5FCB\u5FD0",4,"\u5FDE\u5FE1\u5FE2\u5FE8\u5FE9\u5FEA\u5FEC\u5FED\u5FEE\u5FEF\u5FF2\u5FF3\u5FF6\u5FFA\u5FFC\u6007\u600A\u600D\u6013\u6014\u6017\u6018\u601A\u601F\u6024\u602D\u6033\u6035\u6040\u6047\u6048\u6049\u604C\u6051\u6054\u6056\u6057\u605D\u6061\u6067\u6071\u607E\u607F\u6082\u6086\u6088\u608A\u608E\u6091\u6093\u6095\u6098\u609D\u609E\u60A2\u60A4\u60A5\u60A8\u60B0\u60B1\u60B7"],["8fbea1","\u60BB\u60BE\u60C2\u60C4\u60C8\u60C9\u60CA\u60CB\u60CE\u60CF\u60D4\u60D5\u60D9\u60DB\u60DD\u60DE\u60E2\u60E5\u60F2\u60F5\u60F8\u60FC\u60FD\u6102\u6107\u610A\u610C\u6110",4,"\u6116\u6117\u6119\u611C\u611E\u6122\u612A\u612B\u6130\u6131\u6135\u6136\u6137\u6139\u6141\u6145\u6146\u6149\u615E\u6160\u616C\u6172\u6178\u617B\u617C\u617F\u6180\u6181\u6183\u6184\u618B\u618D\u6192\u6193\u6197\u6198\u619C\u619D\u619F\u61A0\u61A5\u61A8\u61AA\u61AD\u61B8\u61B9\u61BC\u61C0\u61C1\u61C2\u61CE\u61CF\u61D5\u61DC\u61DD\u61DE\u61DF\u61E1\u61E2\u61E7\u61E9\u61E5"],["8fbfa1","\u61EC\u61ED\u61EF\u6201\u6203\u6204\u6207\u6213\u6215\u621C\u6220\u6222\u6223\u6227\u6229\u622B\u6239\u623D\u6242\u6243\u6244\u6246\u624C\u6250\u6251\u6252\u6254\u6256\u625A\u625C\u6264\u626D\u626F\u6273\u627A\u627D\u628D\u628E\u628F\u6290\u62A6\u62A8\u62B3\u62B6\u62B7\u62BA\u62BE\u62BF\u62C4\u62CE\u62D5\u62D6\u62DA\u62EA\u62F2\u62F4\u62FC\u62FD\u6303\u6304\u630A\u630B\u630D\u6310\u6313\u6316\u6318\u6329\u632A\u632D\u6335\u6336\u6339\u633C\u6341\u6342\u6343\u6344\u6346\u634A\u634B\u634E\u6352\u6353\u6354\u6358\u635B\u6365\u6366\u636C\u636D\u6371\u6374\u6375"],["8fc0a1","\u6378\u637C\u637D\u637F\u6382\u6384\u6387\u638A\u6390\u6394\u6395\u6399\u639A\u639E\u63A4\u63A6\u63AD\u63AE\u63AF\u63BD\u63C1\u63C5\u63C8\u63CE\u63D1\u63D3\u63D4\u63D5\u63DC\u63E0\u63E5\u63EA\u63EC\u63F2\u63F3\u63F5\u63F8\u63F9\u6409\u640A\u6410\u6412\u6414\u6418\u641E\u6420\u6422\u6424\u6425\u6429\u642A\u642F\u6430\u6435\u643D\u643F\u644B\u644F\u6451\u6452\u6453\u6454\u645A\u645B\u645C\u645D\u645F\u6460\u6461\u6463\u646D\u6473\u6474\u647B\u647D\u6485\u6487\u648F\u6490\u6491\u6498\u6499\u649B\u649D\u649F\u64A1\u64A3\u64A6\u64A8\u64AC\u64B3\u64BD\u64BE\u64BF"],["8fc1a1","\u64C4\u64C9\u64CA\u64CB\u64CC\u64CE\u64D0\u64D1\u64D5\u64D7\u64E4\u64E5\u64E9\u64EA\u64ED\u64F0\u64F5\u64F7\u64FB\u64FF\u6501\u6504\u6508\u6509\u650A\u650F\u6513\u6514\u6516\u6519\u651B\u651E\u651F\u6522\u6526\u6529\u652E\u6531\u653A\u653C\u653D\u6543\u6547\u6549\u6550\u6552\u6554\u655F\u6560\u6567\u656B\u657A\u657D\u6581\u6585\u658A\u6592\u6595\u6598\u659D\u65A0\u65A3\u65A6\u65AE\u65B2\u65B3\u65B4\u65BF\u65C2\u65C8\u65C9\u65CE\u65D0\u65D4\u65D6\u65D8\u65DF\u65F0\u65F2\u65F4\u65F5\u65F9\u65FE\u65FF\u6600\u6604\u6608\u6609\u660D\u6611\u6612\u6615\u6616\u661D"],["8fc2a1","\u661E\u6621\u6622\u6623\u6624\u6626\u6629\u662A\u662B\u662C\u662E\u6630\u6631\u6633\u6639\u6637\u6640\u6645\u6646\u664A\u664C\u6651\u664E\u6657\u6658\u6659\u665B\u665C\u6660\u6661\u66FB\u666A\u666B\u666C\u667E\u6673\u6675\u667F\u6677\u6678\u6679\u667B\u6680\u667C\u668B\u668C\u668D\u6690\u6692\u6699\u669A\u669B\u669C\u669F\u66A0\u66A4\u66AD\u66B1\u66B2\u66B5\u66BB\u66BF\u66C0\u66C2\u66C3\u66C8\u66CC\u66CE\u66CF\u66D4\u66DB\u66DF\u66E8\u66EB\u66EC\u66EE\u66FA\u6705\u6707\u670E\u6713\u6719\u671C\u6720\u6722\u6733\u673E\u6745\u6747\u6748\u674C\u6754\u6755\u675D"],["8fc3a1","\u6766\u676C\u676E\u6774\u6776\u677B\u6781\u6784\u678E\u678F\u6791\u6793\u6796\u6798\u6799\u679B\u67B0\u67B1\u67B2\u67B5\u67BB\u67BC\u67BD\u67F9\u67C0\u67C2\u67C3\u67C5\u67C8\u67C9\u67D2\u67D7\u67D9\u67DC\u67E1\u67E6\u67F0\u67F2\u67F6\u67F7\u6852\u6814\u6819\u681D\u681F\u6828\u6827\u682C\u682D\u682F\u6830\u6831\u6833\u683B\u683F\u6844\u6845\u684A\u684C\u6855\u6857\u6858\u685B\u686B\u686E",4,"\u6875\u6879\u687A\u687B\u687C\u6882\u6884\u6886\u6888\u6896\u6898\u689A\u689C\u68A1\u68A3\u68A5\u68A9\u68AA\u68AE\u68B2\u68BB\u68C5\u68C8\u68CC\u68CF"],["8fc4a1","\u68D0\u68D1\u68D3\u68D6\u68D9\u68DC\u68DD\u68E5\u68E8\u68EA\u68EB\u68EC\u68ED\u68F0\u68F1\u68F5\u68F6\u68FB\u68FC\u68FD\u6906\u6909\u690A\u6910\u6911\u6913\u6916\u6917\u6931\u6933\u6935\u6938\u693B\u6942\u6945\u6949\u694E\u6957\u695B\u6963\u6964\u6965\u6966\u6968\u6969\u696C\u6970\u6971\u6972\u697A\u697B\u697F\u6980\u698D\u6992\u6996\u6998\u69A1\u69A5\u69A6\u69A8\u69AB\u69AD\u69AF\u69B7\u69B8\u69BA\u69BC\u69C5\u69C8\u69D1\u69D6\u69D7\u69E2\u69E5\u69EE\u69EF\u69F1\u69F3\u69F5\u69FE\u6A00\u6A01\u6A03\u6A0F\u6A11\u6A15\u6A1A\u6A1D\u6A20\u6A24\u6A28\u6A30\u6A32"],["8fc5a1","\u6A34\u6A37\u6A3B\u6A3E\u6A3F\u6A45\u6A46\u6A49\u6A4A\u6A4E\u6A50\u6A51\u6A52\u6A55\u6A56\u6A5B\u6A64\u6A67\u6A6A\u6A71\u6A73\u6A7E\u6A81\u6A83\u6A86\u6A87\u6A89\u6A8B\u6A91\u6A9B\u6A9D\u6A9E\u6A9F\u6AA5\u6AAB\u6AAF\u6AB0\u6AB1\u6AB4\u6ABD\u6ABE\u6ABF\u6AC6\u6AC9\u6AC8\u6ACC\u6AD0\u6AD4\u6AD5\u6AD6\u6ADC\u6ADD\u6AE4\u6AE7\u6AEC\u6AF0\u6AF1\u6AF2\u6AFC\u6AFD\u6B02\u6B03\u6B06\u6B07\u6B09\u6B0F\u6B10\u6B11\u6B17\u6B1B\u6B1E\u6B24\u6B28\u6B2B\u6B2C\u6B2F\u6B35\u6B36\u6B3B\u6B3F\u6B46\u6B4A\u6B4D\u6B52\u6B56\u6B58\u6B5D\u6B60\u6B67\u6B6B\u6B6E\u6B70\u6B75\u6B7D"],["8fc6a1","\u6B7E\u6B82\u6B85\u6B97\u6B9B\u6B9F\u6BA0\u6BA2\u6BA3\u6BA8\u6BA9\u6BAC\u6BAD\u6BAE\u6BB0\u6BB8\u6BB9\u6BBD\u6BBE\u6BC3\u6BC4\u6BC9\u6BCC\u6BD6\u6BDA\u6BE1\u6BE3\u6BE6\u6BE7\u6BEE\u6BF1\u6BF7\u6BF9\u6BFF\u6C02\u6C04\u6C05\u6C09\u6C0D\u6C0E\u6C10\u6C12\u6C19\u6C1F\u6C26\u6C27\u6C28\u6C2C\u6C2E\u6C33\u6C35\u6C36\u6C3A\u6C3B\u6C3F\u6C4A\u6C4B\u6C4D\u6C4F\u6C52\u6C54\u6C59\u6C5B\u6C5C\u6C6B\u6C6D\u6C6F\u6C74\u6C76\u6C78\u6C79\u6C7B\u6C85\u6C86\u6C87\u6C89\u6C94\u6C95\u6C97\u6C98\u6C9C\u6C9F\u6CB0\u6CB2\u6CB4\u6CC2\u6CC6\u6CCD\u6CCF\u6CD0\u6CD1\u6CD2\u6CD4\u6CD6"],["8fc7a1","\u6CDA\u6CDC\u6CE0\u6CE7\u6CE9\u6CEB\u6CEC\u6CEE\u6CF2\u6CF4\u6D04\u6D07\u6D0A\u6D0E\u6D0F\u6D11\u6D13\u6D1A\u6D26\u6D27\u6D28\u6C67\u6D2E\u6D2F\u6D31\u6D39\u6D3C\u6D3F\u6D57\u6D5E\u6D5F\u6D61\u6D65\u6D67\u6D6F\u6D70\u6D7C\u6D82\u6D87\u6D91\u6D92\u6D94\u6D96\u6D97\u6D98\u6DAA\u6DAC\u6DB4\u6DB7\u6DB9\u6DBD\u6DBF\u6DC4\u6DC8\u6DCA\u6DCE\u6DCF\u6DD6\u6DDB\u6DDD\u6DDF\u6DE0\u6DE2\u6DE5\u6DE9\u6DEF\u6DF0\u6DF4\u6DF6\u6DFC\u6E00\u6E04\u6E1E\u6E22\u6E27\u6E32\u6E36\u6E39\u6E3B\u6E3C\u6E44\u6E45\u6E48\u6E49\u6E4B\u6E4F\u6E51\u6E52\u6E53\u6E54\u6E57\u6E5C\u6E5D\u6E5E"],["8fc8a1","\u6E62\u6E63\u6E68\u6E73\u6E7B\u6E7D\u6E8D\u6E93\u6E99\u6EA0\u6EA7\u6EAD\u6EAE\u6EB1\u6EB3\u6EBB\u6EBF\u6EC0\u6EC1\u6EC3\u6EC7\u6EC8\u6ECA\u6ECD\u6ECE\u6ECF\u6EEB\u6EED\u6EEE\u6EF9\u6EFB\u6EFD\u6F04\u6F08\u6F0A\u6F0C\u6F0D\u6F16\u6F18\u6F1A\u6F1B\u6F26\u6F29\u6F2A\u6F2F\u6F30\u6F33\u6F36\u6F3B\u6F3C\u6F2D\u6F4F\u6F51\u6F52\u6F53\u6F57\u6F59\u6F5A\u6F5D\u6F5E\u6F61\u6F62\u6F68\u6F6C\u6F7D\u6F7E\u6F83\u6F87\u6F88\u6F8B\u6F8C\u6F8D\u6F90\u6F92\u6F93\u6F94\u6F96\u6F9A\u6F9F\u6FA0\u6FA5\u6FA6\u6FA7\u6FA8\u6FAE\u6FAF\u6FB0\u6FB5\u6FB6\u6FBC\u6FC5\u6FC7\u6FC8\u6FCA"],["8fc9a1","\u6FDA\u6FDE\u6FE8\u6FE9\u6FF0\u6FF5\u6FF9\u6FFC\u6FFD\u7000\u7005\u7006\u7007\u700D\u7017\u7020\u7023\u702F\u7034\u7037\u7039\u703C\u7043\u7044\u7048\u7049\u704A\u704B\u7054\u7055\u705D\u705E\u704E\u7064\u7065\u706C\u706E\u7075\u7076\u707E\u7081\u7085\u7086\u7094",4,"\u709B\u70A4\u70AB\u70B0\u70B1\u70B4\u70B7\u70CA\u70D1\u70D3\u70D4\u70D5\u70D6\u70D8\u70DC\u70E4\u70FA\u7103",4,"\u710B\u710C\u710F\u711E\u7120\u712B\u712D\u712F\u7130\u7131\u7138\u7141\u7145\u7146\u7147\u714A\u714B\u7150\u7152\u7157\u715A\u715C\u715E\u7160"],["8fcaa1","\u7168\u7179\u7180\u7185\u7187\u718C\u7192\u719A\u719B\u71A0\u71A2\u71AF\u71B0\u71B2\u71B3\u71BA\u71BF\u71C0\u71C1\u71C4\u71CB\u71CC\u71D3\u71D6\u71D9\u71DA\u71DC\u71F8\u71FE\u7200\u7207\u7208\u7209\u7213\u7217\u721A\u721D\u721F\u7224\u722B\u722F\u7234\u7238\u7239\u7241\u7242\u7243\u7245\u724E\u724F\u7250\u7253\u7255\u7256\u725A\u725C\u725E\u7260\u7263\u7268\u726B\u726E\u726F\u7271\u7277\u7278\u727B\u727C\u727F\u7284\u7289\u728D\u728E\u7293\u729B\u72A8\u72AD\u72AE\u72B1\u72B4\u72BE\u72C1\u72C7\u72C9\u72CC\u72D5\u72D6\u72D8\u72DF\u72E5\u72F3\u72F4\u72FA\u72FB"],["8fcba1","\u72FE\u7302\u7304\u7305\u7307\u730B\u730D\u7312\u7313\u7318\u7319\u731E\u7322\u7324\u7327\u7328\u732C\u7331\u7332\u7335\u733A\u733B\u733D\u7343\u734D\u7350\u7352\u7356\u7358\u735D\u735E\u735F\u7360\u7366\u7367\u7369\u736B\u736C\u736E\u736F\u7371\u7377\u7379\u737C\u7380\u7381\u7383\u7385\u7386\u738E\u7390\u7393\u7395\u7397\u7398\u739C\u739E\u739F\u73A0\u73A2\u73A5\u73A6\u73AA\u73AB\u73AD\u73B5\u73B7\u73B9\u73BC\u73BD\u73BF\u73C5\u73C6\u73C9\u73CB\u73CC\u73CF\u73D2\u73D3\u73D6\u73D9\u73DD\u73E1\u73E3\u73E6\u73E7\u73E9\u73F4\u73F5\u73F7\u73F9\u73FA\u73FB\u73FD"],["8fcca1","\u73FF\u7400\u7401\u7404\u7407\u740A\u7411\u741A\u741B\u7424\u7426\u7428",9,"\u7439\u7440\u7443\u7444\u7446\u7447\u744B\u744D\u7451\u7452\u7457\u745D\u7462\u7466\u7467\u7468\u746B\u746D\u746E\u7471\u7472\u7480\u7481\u7485\u7486\u7487\u7489\u748F\u7490\u7491\u7492\u7498\u7499\u749A\u749C\u749F\u74A0\u74A1\u74A3\u74A6\u74A8\u74A9\u74AA\u74AB\u74AE\u74AF\u74B1\u74B2\u74B5\u74B9\u74BB\u74BF\u74C8\u74C9\u74CC\u74D0\u74D3\u74D8\u74DA\u74DB\u74DE\u74DF\u74E4\u74E8\u74EA\u74EB\u74EF\u74F4\u74FA\u74FB\u74FC\u74FF\u7506"],["8fcda1","\u7512\u7516\u7517\u7520\u7521\u7524\u7527\u7529\u752A\u752F\u7536\u7539\u753D\u753E\u753F\u7540\u7543\u7547\u7548\u754E\u7550\u7552\u7557\u755E\u755F\u7561\u756F\u7571\u7579",5,"\u7581\u7585\u7590\u7592\u7593\u7595\u7599\u759C\u75A2\u75A4\u75B4\u75BA\u75BF\u75C0\u75C1\u75C4\u75C6\u75CC\u75CE\u75CF\u75D7\u75DC\u75DF\u75E0\u75E1\u75E4\u75E7\u75EC\u75EE\u75EF\u75F1\u75F9\u7600\u7602\u7603\u7604\u7607\u7608\u760A\u760C\u760F\u7612\u7613\u7615\u7616\u7619\u761B\u761C\u761D\u761E\u7623\u7625\u7626\u7629\u762D\u7632\u7633\u7635\u7638\u7639"],["8fcea1","\u763A\u763C\u764A\u7640\u7641\u7643\u7644\u7645\u7649\u764B\u7655\u7659\u765F\u7664\u7665\u766D\u766E\u766F\u7671\u7674\u7681\u7685\u768C\u768D\u7695\u769B\u769C\u769D\u769F\u76A0\u76A2",6,"\u76AA\u76AD\u76BD\u76C1\u76C5\u76C9\u76CB\u76CC\u76CE\u76D4\u76D9\u76E0\u76E6\u76E8\u76EC\u76F0\u76F1\u76F6\u76F9\u76FC\u7700\u7706\u770A\u770E\u7712\u7714\u7715\u7717\u7719\u771A\u771C\u7722\u7728\u772D\u772E\u772F\u7734\u7735\u7736\u7739\u773D\u773E\u7742\u7745\u7746\u774A\u774D\u774E\u774F\u7752\u7756\u7757\u775C\u775E\u775F\u7760\u7762"],["8fcfa1","\u7764\u7767\u776A\u776C\u7770\u7772\u7773\u7774\u777A\u777D\u7780\u7784\u778C\u778D\u7794\u7795\u7796\u779A\u779F\u77A2\u77A7\u77AA\u77AE\u77AF\u77B1\u77B5\u77BE\u77C3\u77C9\u77D1\u77D2\u77D5\u77D9\u77DE\u77DF\u77E0\u77E4\u77E6\u77EA\u77EC\u77F0\u77F1\u77F4\u77F8\u77FB\u7805\u7806\u7809\u780D\u780E\u7811\u781D\u7821\u7822\u7823\u782D\u782E\u7830\u7835\u7837\u7843\u7844\u7847\u7848\u784C\u784E\u7852\u785C\u785E\u7860\u7861\u7863\u7864\u7868\u786A\u786E\u787A\u787E\u788A\u788F\u7894\u7898\u78A1\u789D\u789E\u789F\u78A4\u78A8\u78AC\u78AD\u78B0\u78B1\u78B2\u78B3"],["8fd0a1","\u78BB\u78BD\u78BF\u78C7\u78C8\u78C9\u78CC\u78CE\u78D2\u78D3\u78D5\u78D6\u78E4\u78DB\u78DF\u78E0\u78E1\u78E6\u78EA\u78F2\u78F3\u7900\u78F6\u78F7\u78FA\u78FB\u78FF\u7906\u790C\u7910\u791A\u791C\u791E\u791F\u7920\u7925\u7927\u7929\u792D\u7931\u7934\u7935\u793B\u793D\u793F\u7944\u7945\u7946\u794A\u794B\u794F\u7951\u7954\u7958\u795B\u795C\u7967\u7969\u796B\u7972\u7979\u797B\u797C\u797E\u798B\u798C\u7991\u7993\u7994\u7995\u7996\u7998\u799B\u799C\u79A1\u79A8\u79A9\u79AB\u79AF\u79B1\u79B4\u79B8\u79BB\u79C2\u79C4\u79C7\u79C8\u79CA\u79CF\u79D4\u79D6\u79DA\u79DD\u79DE"],["8fd1a1","\u79E0\u79E2\u79E5\u79EA\u79EB\u79ED\u79F1\u79F8\u79FC\u7A02\u7A03\u7A07\u7A09\u7A0A\u7A0C\u7A11\u7A15\u7A1B\u7A1E\u7A21\u7A27\u7A2B\u7A2D\u7A2F\u7A30\u7A34\u7A35\u7A38\u7A39\u7A3A\u7A44\u7A45\u7A47\u7A48\u7A4C\u7A55\u7A56\u7A59\u7A5C\u7A5D\u7A5F\u7A60\u7A65\u7A67\u7A6A\u7A6D\u7A75\u7A78\u7A7E\u7A80\u7A82\u7A85\u7A86\u7A8A\u7A8B\u7A90\u7A91\u7A94\u7A9E\u7AA0\u7AA3\u7AAC\u7AB3\u7AB5\u7AB9\u7ABB\u7ABC\u7AC6\u7AC9\u7ACC\u7ACE\u7AD1\u7ADB\u7AE8\u7AE9\u7AEB\u7AEC\u7AF1\u7AF4\u7AFB\u7AFD\u7AFE\u7B07\u7B14\u7B1F\u7B23\u7B27\u7B29\u7B2A\u7B2B\u7B2D\u7B2E\u7B2F\u7B30"],["8fd2a1","\u7B31\u7B34\u7B3D\u7B3F\u7B40\u7B41\u7B47\u7B4E\u7B55\u7B60\u7B64\u7B66\u7B69\u7B6A\u7B6D\u7B6F\u7B72\u7B73\u7B77\u7B84\u7B89\u7B8E\u7B90\u7B91\u7B96\u7B9B\u7B9E\u7BA0\u7BA5\u7BAC\u7BAF\u7BB0\u7BB2\u7BB5\u7BB6\u7BBA\u7BBB\u7BBC\u7BBD\u7BC2\u7BC5\u7BC8\u7BCA\u7BD4\u7BD6\u7BD7\u7BD9\u7BDA\u7BDB\u7BE8\u7BEA\u7BF2\u7BF4\u7BF5\u7BF8\u7BF9\u7BFA\u7BFC\u7BFE\u7C01\u7C02\u7C03\u7C04\u7C06\u7C09\u7C0B\u7C0C\u7C0E\u7C0F\u7C19\u7C1B\u7C20\u7C25\u7C26\u7C28\u7C2C\u7C31\u7C33\u7C34\u7C36\u7C39\u7C3A\u7C46\u7C4A\u7C55\u7C51\u7C52\u7C53\u7C59",5],["8fd3a1","\u7C61\u7C63\u7C67\u7C69\u7C6D\u7C6E\u7C70\u7C72\u7C79\u7C7C\u7C7D\u7C86\u7C87\u7C8F\u7C94\u7C9E\u7CA0\u7CA6\u7CB0\u7CB6\u7CB7\u7CBA\u7CBB\u7CBC\u7CBF\u7CC4\u7CC7\u7CC8\u7CC9\u7CCD\u7CCF\u7CD3\u7CD4\u7CD5\u7CD7\u7CD9\u7CDA\u7CDD\u7CE6\u7CE9\u7CEB\u7CF5\u7D03\u7D07\u7D08\u7D09\u7D0F\u7D11\u7D12\u7D13\u7D16\u7D1D\u7D1E\u7D23\u7D26\u7D2A\u7D2D\u7D31\u7D3C\u7D3D\u7D3E\u7D40\u7D41\u7D47\u7D48\u7D4D\u7D51\u7D53\u7D57\u7D59\u7D5A\u7D5C\u7D5D\u7D65\u7D67\u7D6A\u7D70\u7D78\u7D7A\u7D7B\u7D7F\u7D81\u7D82\u7D83\u7D85\u7D86\u7D88\u7D8B\u7D8C\u7D8D\u7D91\u7D96\u7D97\u7D9D"],["8fd4a1","\u7D9E\u7DA6\u7DA7\u7DAA\u7DB3\u7DB6\u7DB7\u7DB9\u7DC2",4,"\u7DCC\u7DCD\u7DCE\u7DD7\u7DD9\u7E00\u7DE2\u7DE5\u7DE6\u7DEA\u7DEB\u7DED\u7DF1\u7DF5\u7DF6\u7DF9\u7DFA\u7E08\u7E10\u7E11\u7E15\u7E17\u7E1C\u7E1D\u7E20\u7E27\u7E28\u7E2C\u7E2D\u7E2F\u7E33\u7E36\u7E3F\u7E44\u7E45\u7E47\u7E4E\u7E50\u7E52\u7E58\u7E5F\u7E61\u7E62\u7E65\u7E6B\u7E6E\u7E6F\u7E73\u7E78\u7E7E\u7E81\u7E86\u7E87\u7E8A\u7E8D\u7E91\u7E95\u7E98\u7E9A\u7E9D\u7E9E\u7F3C\u7F3B\u7F3D\u7F3E\u7F3F\u7F43\u7F44\u7F47\u7F4F\u7F52\u7F53\u7F5B\u7F5C\u7F5D\u7F61\u7F63\u7F64\u7F65\u7F66\u7F6D"],["8fd5a1","\u7F71\u7F7D\u7F7E\u7F7F\u7F80\u7F8B\u7F8D\u7F8F\u7F90\u7F91\u7F96\u7F97\u7F9C\u7FA1\u7FA2\u7FA6\u7FAA\u7FAD\u7FB4\u7FBC\u7FBF\u7FC0\u7FC3\u7FC8\u7FCE\u7FCF\u7FDB\u7FDF\u7FE3\u7FE5\u7FE8\u7FEC\u7FEE\u7FEF\u7FF2\u7FFA\u7FFD\u7FFE\u7FFF\u8007\u8008\u800A\u800D\u800E\u800F\u8011\u8013\u8014\u8016\u801D\u801E\u801F\u8020\u8024\u8026\u802C\u802E\u8030\u8034\u8035\u8037\u8039\u803A\u803C\u803E\u8040\u8044\u8060\u8064\u8066\u806D\u8071\u8075\u8081\u8088\u808E\u809C\u809E\u80A6\u80A7\u80AB\u80B8\u80B9\u80C8\u80CD\u80CF\u80D2\u80D4\u80D5\u80D7\u80D8\u80E0\u80ED\u80EE"],["8fd6a1","\u80F0\u80F2\u80F3\u80F6\u80F9\u80FA\u80FE\u8103\u810B\u8116\u8117\u8118\u811C\u811E\u8120\u8124\u8127\u812C\u8130\u8135\u813A\u813C\u8145\u8147\u814A\u814C\u8152\u8157\u8160\u8161\u8167\u8168\u8169\u816D\u816F\u8177\u8181\u8190\u8184\u8185\u8186\u818B\u818E\u8196\u8198\u819B\u819E\u81A2\u81AE\u81B2\u81B4\u81BB\u81CB\u81C3\u81C5\u81CA\u81CE\u81CF\u81D5\u81D7\u81DB\u81DD\u81DE\u81E1\u81E4\u81EB\u81EC\u81F0\u81F1\u81F2\u81F5\u81F6\u81F8\u81F9\u81FD\u81FF\u8200\u8203\u820F\u8213\u8214\u8219\u821A\u821D\u8221\u8222\u8228\u8232\u8234\u823A\u8243\u8244\u8245\u8246"],["8fd7a1","\u824B\u824E\u824F\u8251\u8256\u825C\u8260\u8263\u8267\u826D\u8274\u827B\u827D\u827F\u8280\u8281\u8283\u8284\u8287\u8289\u828A\u828E\u8291\u8294\u8296\u8298\u829A\u829B\u82A0\u82A1\u82A3\u82A4\u82A7\u82A8\u82A9\u82AA\u82AE\u82B0\u82B2\u82B4\u82B7\u82BA\u82BC\u82BE\u82BF\u82C6\u82D0\u82D5\u82DA\u82E0\u82E2\u82E4\u82E8\u82EA\u82ED\u82EF\u82F6\u82F7\u82FD\u82FE\u8300\u8301\u8307\u8308\u830A\u830B\u8354\u831B\u831D\u831E\u831F\u8321\u8322\u832C\u832D\u832E\u8330\u8333\u8337\u833A\u833C\u833D\u8342\u8343\u8344\u8347\u834D\u834E\u8351\u8355\u8356\u8357\u8370\u8378"],["8fd8a1","\u837D\u837F\u8380\u8382\u8384\u8386\u838D\u8392\u8394\u8395\u8398\u8399\u839B\u839C\u839D\u83A6\u83A7\u83A9\u83AC\u83BE\u83BF\u83C0\u83C7\u83C9\u83CF\u83D0\u83D1\u83D4\u83DD\u8353\u83E8\u83EA\u83F6\u83F8\u83F9\u83FC\u8401\u8406\u840A\u840F\u8411\u8415\u8419\u83AD\u842F\u8439\u8445\u8447\u8448\u844A\u844D\u844F\u8451\u8452\u8456\u8458\u8459\u845A\u845C\u8460\u8464\u8465\u8467\u846A\u8470\u8473\u8474\u8476\u8478\u847C\u847D\u8481\u8485\u8492\u8493\u8495\u849E\u84A6\u84A8\u84A9\u84AA\u84AF\u84B1\u84B4\u84BA\u84BD\u84BE\u84C0\u84C2\u84C7\u84C8\u84CC\u84CF\u84D3"],["8fd9a1","\u84DC\u84E7\u84EA\u84EF\u84F0\u84F1\u84F2\u84F7\u8532\u84FA\u84FB\u84FD\u8502\u8503\u8507\u850C\u850E\u8510\u851C\u851E\u8522\u8523\u8524\u8525\u8527\u852A\u852B\u852F\u8533\u8534\u8536\u853F\u8546\u854F",4,"\u8556\u8559\u855C",6,"\u8564\u856B\u856F\u8579\u857A\u857B\u857D\u857F\u8581\u8585\u8586\u8589\u858B\u858C\u858F\u8593\u8598\u859D\u859F\u85A0\u85A2\u85A5\u85A7\u85B4\u85B6\u85B7\u85B8\u85BC\u85BD\u85BE\u85BF\u85C2\u85C7\u85CA\u85CB\u85CE\u85AD\u85D8\u85DA\u85DF\u85E0\u85E6\u85E8\u85ED\u85F3\u85F6\u85FC"],["8fdaa1","\u85FF\u8600\u8604\u8605\u860D\u860E\u8610\u8611\u8612\u8618\u8619\u861B\u861E\u8621\u8627\u8629\u8636\u8638\u863A\u863C\u863D\u8640\u8642\u8646\u8652\u8653\u8656\u8657\u8658\u8659\u865D\u8660",4,"\u8669\u866C\u866F\u8675\u8676\u8677\u867A\u868D\u8691\u8696\u8698\u869A\u869C\u86A1\u86A6\u86A7\u86A8\u86AD\u86B1\u86B3\u86B4\u86B5\u86B7\u86B8\u86B9\u86BF\u86C0\u86C1\u86C3\u86C5\u86D1\u86D2\u86D5\u86D7\u86DA\u86DC\u86E0\u86E3\u86E5\u86E7\u8688\u86FA\u86FC\u86FD\u8704\u8705\u8707\u870B\u870E\u870F\u8710\u8713\u8714\u8719\u871E\u871F\u8721\u8723"],["8fdba1","\u8728\u872E\u872F\u8731\u8732\u8739\u873A\u873C\u873D\u873E\u8740\u8743\u8745\u874D\u8758\u875D\u8761\u8764\u8765\u876F\u8771\u8772\u877B\u8783",6,"\u878B\u878C\u8790\u8793\u8795\u8797\u8798\u8799\u879E\u87A0\u87A3\u87A7\u87AC\u87AD\u87AE\u87B1\u87B5\u87BE\u87BF\u87C1\u87C8\u87C9\u87CA\u87CE\u87D5\u87D6\u87D9\u87DA\u87DC\u87DF\u87E2\u87E3\u87E4\u87EA\u87EB\u87ED\u87F1\u87F3\u87F8\u87FA\u87FF\u8801\u8803\u8806\u8809\u880A\u880B\u8810\u8819\u8812\u8813\u8814\u8818\u881A\u881B\u881C\u881E\u881F\u8828\u882D\u882E\u8830\u8832\u8835"],["8fdca1","\u883A\u883C\u8841\u8843\u8845\u8848\u8849\u884A\u884B\u884E\u8851\u8855\u8856\u8858\u885A\u885C\u885F\u8860\u8864\u8869\u8871\u8879\u887B\u8880\u8898\u889A\u889B\u889C\u889F\u88A0\u88A8\u88AA\u88BA\u88BD\u88BE\u88C0\u88CA",4,"\u88D1\u88D2\u88D3\u88DB\u88DE\u88E7\u88EF\u88F0\u88F1\u88F5\u88F7\u8901\u8906\u890D\u890E\u890F\u8915\u8916\u8918\u8919\u891A\u891C\u8920\u8926\u8927\u8928\u8930\u8931\u8932\u8935\u8939\u893A\u893E\u8940\u8942\u8945\u8946\u8949\u894F\u8952\u8957\u895A\u895B\u895C\u8961\u8962\u8963\u896B\u896E\u8970\u8973\u8975\u897A"],["8fdda1","\u897B\u897C\u897D\u8989\u898D\u8990\u8994\u8995\u899B\u899C\u899F\u89A0\u89A5\u89B0\u89B4\u89B5\u89B6\u89B7\u89BC\u89D4",4,"\u89E5\u89E9\u89EB\u89ED\u89F1\u89F3\u89F6\u89F9\u89FD\u89FF\u8A04\u8A05\u8A07\u8A0F\u8A11\u8A12\u8A14\u8A15\u8A1E\u8A20\u8A22\u8A24\u8A26\u8A2B\u8A2C\u8A2F\u8A35\u8A37\u8A3D\u8A3E\u8A40\u8A43\u8A45\u8A47\u8A49\u8A4D\u8A4E\u8A53\u8A56\u8A57\u8A58\u8A5C\u8A5D\u8A61\u8A65\u8A67\u8A75\u8A76\u8A77\u8A79\u8A7A\u8A7B\u8A7E\u8A7F\u8A80\u8A83\u8A86\u8A8B\u8A8F\u8A90\u8A92\u8A96\u8A97\u8A99\u8A9F\u8AA7\u8AA9\u8AAE\u8AAF\u8AB3"],["8fdea1","\u8AB6\u8AB7\u8ABB\u8ABE\u8AC3\u8AC6\u8AC8\u8AC9\u8ACA\u8AD1\u8AD3\u8AD4\u8AD5\u8AD7\u8ADD\u8ADF\u8AEC\u8AF0\u8AF4\u8AF5\u8AF6\u8AFC\u8AFF\u8B05\u8B06\u8B0B\u8B11\u8B1C\u8B1E\u8B1F\u8B0A\u8B2D\u8B30\u8B37\u8B3C\u8B42",4,"\u8B48\u8B52\u8B53\u8B54\u8B59\u8B4D\u8B5E\u8B63\u8B6D\u8B76\u8B78\u8B79\u8B7C\u8B7E\u8B81\u8B84\u8B85\u8B8B\u8B8D\u8B8F\u8B94\u8B95\u8B9C\u8B9E\u8B9F\u8C38\u8C39\u8C3D\u8C3E\u8C45\u8C47\u8C49\u8C4B\u8C4F\u8C51\u8C53\u8C54\u8C57\u8C58\u8C5B\u8C5D\u8C59\u8C63\u8C64\u8C66\u8C68\u8C69\u8C6D\u8C73\u8C75\u8C76\u8C7B\u8C7E\u8C86"],["8fdfa1","\u8C87\u8C8B\u8C90\u8C92\u8C93\u8C99\u8C9B\u8C9C\u8CA4\u8CB9\u8CBA\u8CC5\u8CC6\u8CC9\u8CCB\u8CCF\u8CD6\u8CD5\u8CD9\u8CDD\u8CE1\u8CE8\u8CEC\u8CEF\u8CF0\u8CF2\u8CF5\u8CF7\u8CF8\u8CFE\u8CFF\u8D01\u8D03\u8D09\u8D12\u8D17\u8D1B\u8D65\u8D69\u8D6C\u8D6E\u8D7F\u8D82\u8D84\u8D88\u8D8D\u8D90\u8D91\u8D95\u8D9E\u8D9F\u8DA0\u8DA6\u8DAB\u8DAC\u8DAF\u8DB2\u8DB5\u8DB7\u8DB9\u8DBB\u8DC0\u8DC5\u8DC6\u8DC7\u8DC8\u8DCA\u8DCE\u8DD1\u8DD4\u8DD5\u8DD7\u8DD9\u8DE4\u8DE5\u8DE7\u8DEC\u8DF0\u8DBC\u8DF1\u8DF2\u8DF4\u8DFD\u8E01\u8E04\u8E05\u8E06\u8E0B\u8E11\u8E14\u8E16\u8E20\u8E21\u8E22"],["8fe0a1","\u8E23\u8E26\u8E27\u8E31\u8E33\u8E36\u8E37\u8E38\u8E39\u8E3D\u8E40\u8E41\u8E4B\u8E4D\u8E4E\u8E4F\u8E54\u8E5B\u8E5C\u8E5D\u8E5E\u8E61\u8E62\u8E69\u8E6C\u8E6D\u8E6F\u8E70\u8E71\u8E79\u8E7A\u8E7B\u8E82\u8E83\u8E89\u8E90\u8E92\u8E95\u8E9A\u8E9B\u8E9D\u8E9E\u8EA2\u8EA7\u8EA9\u8EAD\u8EAE\u8EB3\u8EB5\u8EBA\u8EBB\u8EC0\u8EC1\u8EC3\u8EC4\u8EC7\u8ECF\u8ED1\u8ED4\u8EDC\u8EE8\u8EEE\u8EF0\u8EF1\u8EF7\u8EF9\u8EFA\u8EED\u8F00\u8F02\u8F07\u8F08\u8F0F\u8F10\u8F16\u8F17\u8F18\u8F1E\u8F20\u8F21\u8F23\u8F25\u8F27\u8F28\u8F2C\u8F2D\u8F2E\u8F34\u8F35\u8F36\u8F37\u8F3A\u8F40\u8F41"],["8fe1a1","\u8F43\u8F47\u8F4F\u8F51",4,"\u8F58\u8F5D\u8F5E\u8F65\u8F9D\u8FA0\u8FA1\u8FA4\u8FA5\u8FA6\u8FB5\u8FB6\u8FB8\u8FBE\u8FC0\u8FC1\u8FC6\u8FCA\u8FCB\u8FCD\u8FD0\u8FD2\u8FD3\u8FD5\u8FE0\u8FE3\u8FE4\u8FE8\u8FEE\u8FF1\u8FF5\u8FF6\u8FFB\u8FFE\u9002\u9004\u9008\u900C\u9018\u901B\u9028\u9029\u902F\u902A\u902C\u902D\u9033\u9034\u9037\u903F\u9043\u9044\u904C\u905B\u905D\u9062\u9066\u9067\u906C\u9070\u9074\u9079\u9085\u9088\u908B\u908C\u908E\u9090\u9095\u9097\u9098\u9099\u909B\u90A0\u90A1\u90A2\u90A5\u90B0\u90B2\u90B3\u90B4\u90B6\u90BD\u90CC\u90BE\u90C3"],["8fe2a1","\u90C4\u90C5\u90C7\u90C8\u90D5\u90D7\u90D8\u90D9\u90DC\u90DD\u90DF\u90E5\u90D2\u90F6\u90EB\u90EF\u90F0\u90F4\u90FE\u90FF\u9100\u9104\u9105\u9106\u9108\u910D\u9110\u9114\u9116\u9117\u9118\u911A\u911C\u911E\u9120\u9125\u9122\u9123\u9127\u9129\u912E\u912F\u9131\u9134\u9136\u9137\u9139\u913A\u913C\u913D\u9143\u9147\u9148\u914F\u9153\u9157\u9159\u915A\u915B\u9161\u9164\u9167\u916D\u9174\u9179\u917A\u917B\u9181\u9183\u9185\u9186\u918A\u918E\u9191\u9193\u9194\u9195\u9198\u919E\u91A1\u91A6\u91A8\u91AC\u91AD\u91AE\u91B0\u91B1\u91B2\u91B3\u91B6\u91BB\u91BC\u91BD\u91BF"],["8fe3a1","\u91C2\u91C3\u91C5\u91D3\u91D4\u91D7\u91D9\u91DA\u91DE\u91E4\u91E5\u91E9\u91EA\u91EC",5,"\u91F7\u91F9\u91FB\u91FD\u9200\u9201\u9204\u9205\u9206\u9207\u9209\u920A\u920C\u9210\u9212\u9213\u9216\u9218\u921C\u921D\u9223\u9224\u9225\u9226\u9228\u922E\u922F\u9230\u9233\u9235\u9236\u9238\u9239\u923A\u923C\u923E\u9240\u9242\u9243\u9246\u9247\u924A\u924D\u924E\u924F\u9251\u9258\u9259\u925C\u925D\u9260\u9261\u9265\u9267\u9268\u9269\u926E\u926F\u9270\u9275",4,"\u927B\u927C\u927D\u927F\u9288\u9289\u928A\u928D\u928E\u9292\u9297"],["8fe4a1","\u9299\u929F\u92A0\u92A4\u92A5\u92A7\u92A8\u92AB\u92AF\u92B2\u92B6\u92B8\u92BA\u92BB\u92BC\u92BD\u92BF",4,"\u92C5\u92C6\u92C7\u92C8\u92CB\u92CC\u92CD\u92CE\u92D0\u92D3\u92D5\u92D7\u92D8\u92D9\u92DC\u92DD\u92DF\u92E0\u92E1\u92E3\u92E5\u92E7\u92E8\u92EC\u92EE\u92F0\u92F9\u92FB\u92FF\u9300\u9302\u9308\u930D\u9311\u9314\u9315\u931C\u931D\u931E\u931F\u9321\u9324\u9325\u9327\u9329\u932A\u9333\u9334\u9336\u9337\u9347\u9348\u9349\u9350\u9351\u9352\u9355\u9357\u9358\u935A\u935E\u9364\u9365\u9367\u9369\u936A\u936D\u936F\u9370\u9371\u9373\u9374\u9376"],["8fe5a1","\u937A\u937D\u937F\u9380\u9381\u9382\u9388\u938A\u938B\u938D\u938F\u9392\u9395\u9398\u939B\u939E\u93A1\u93A3\u93A4\u93A6\u93A8\u93AB\u93B4\u93B5\u93B6\u93BA\u93A9\u93C1\u93C4\u93C5\u93C6\u93C7\u93C9",4,"\u93D3\u93D9\u93DC\u93DE\u93DF\u93E2\u93E6\u93E7\u93F9\u93F7\u93F8\u93FA\u93FB\u93FD\u9401\u9402\u9404\u9408\u9409\u940D\u940E\u940F\u9415\u9416\u9417\u941F\u942E\u942F\u9431\u9432\u9433\u9434\u943B\u943F\u943D\u9443\u9445\u9448\u944A\u944C\u9455\u9459\u945C\u945F\u9461\u9463\u9468\u946B\u946D\u946E\u946F\u9471\u9472\u9484\u9483\u9578\u9579"],["8fe6a1","\u957E\u9584\u9588\u958C\u958D\u958E\u959D\u959E\u959F\u95A1\u95A6\u95A9\u95AB\u95AC\u95B4\u95B6\u95BA\u95BD\u95BF\u95C6\u95C8\u95C9\u95CB\u95D0\u95D1\u95D2\u95D3\u95D9\u95DA\u95DD\u95DE\u95DF\u95E0\u95E4\u95E6\u961D\u961E\u9622\u9624\u9625\u9626\u962C\u9631\u9633\u9637\u9638\u9639\u963A\u963C\u963D\u9641\u9652\u9654\u9656\u9657\u9658\u9661\u966E\u9674\u967B\u967C\u967E\u967F\u9681\u9682\u9683\u9684\u9689\u9691\u9696\u969A\u969D\u969F\u96A4\u96A5\u96A6\u96A9\u96AE\u96AF\u96B3\u96BA\u96CA\u96D2\u5DB2\u96D8\u96DA\u96DD\u96DE\u96DF\u96E9\u96EF\u96F1\u96FA\u9702"],["8fe7a1","\u9703\u9705\u9709\u971A\u971B\u971D\u9721\u9722\u9723\u9728\u9731\u9733\u9741\u9743\u974A\u974E\u974F\u9755\u9757\u9758\u975A\u975B\u9763\u9767\u976A\u976E\u9773\u9776\u9777\u9778\u977B\u977D\u977F\u9780\u9789\u9795\u9796\u9797\u9799\u979A\u979E\u979F\u97A2\u97AC\u97AE\u97B1\u97B2\u97B5\u97B6\u97B8\u97B9\u97BA\u97BC\u97BE\u97BF\u97C1\u97C4\u97C5\u97C7\u97C9\u97CA\u97CC\u97CD\u97CE\u97D0\u97D1\u97D4\u97D7\u97D8\u97D9\u97DD\u97DE\u97E0\u97DB\u97E1\u97E4\u97EF\u97F1\u97F4\u97F7\u97F8\u97FA\u9807\u980A\u9819\u980D\u980E\u9814\u9816\u981C\u981E\u9820\u9823\u9826"],["8fe8a1","\u982B\u982E\u982F\u9830\u9832\u9833\u9835\u9825\u983E\u9844\u9847\u984A\u9851\u9852\u9853\u9856\u9857\u9859\u985A\u9862\u9863\u9865\u9866\u986A\u986C\u98AB\u98AD\u98AE\u98B0\u98B4\u98B7\u98B8\u98BA\u98BB\u98BF\u98C2\u98C5\u98C8\u98CC\u98E1\u98E3\u98E5\u98E6\u98E7\u98EA\u98F3\u98F6\u9902\u9907\u9908\u9911\u9915\u9916\u9917\u991A\u991B\u991C\u991F\u9922\u9926\u9927\u992B\u9931",4,"\u9939\u993A\u993B\u993C\u9940\u9941\u9946\u9947\u9948\u994D\u994E\u9954\u9958\u9959\u995B\u995C\u995E\u995F\u9960\u999B\u999D\u999F\u99A6\u99B0\u99B1\u99B2\u99B5"],["8fe9a1","\u99B9\u99BA\u99BD\u99BF\u99C3\u99C9\u99D3\u99D4\u99D9\u99DA\u99DC\u99DE\u99E7\u99EA\u99EB\u99EC\u99F0\u99F4\u99F5\u99F9\u99FD\u99FE\u9A02\u9A03\u9A04\u9A0B\u9A0C\u9A10\u9A11\u9A16\u9A1E\u9A20\u9A22\u9A23\u9A24\u9A27\u9A2D\u9A2E\u9A33\u9A35\u9A36\u9A38\u9A47\u9A41\u9A44\u9A4A\u9A4B\u9A4C\u9A4E\u9A51\u9A54\u9A56\u9A5D\u9AAA\u9AAC\u9AAE\u9AAF\u9AB2\u9AB4\u9AB5\u9AB6\u9AB9\u9ABB\u9ABE\u9ABF\u9AC1\u9AC3\u9AC6\u9AC8\u9ACE\u9AD0\u9AD2\u9AD5\u9AD6\u9AD7\u9ADB\u9ADC\u9AE0\u9AE4\u9AE5\u9AE7\u9AE9\u9AEC\u9AF2\u9AF3\u9AF5\u9AF9\u9AFA\u9AFD\u9AFF",4],["8feaa1","\u9B04\u9B05\u9B08\u9B09\u9B0B\u9B0C\u9B0D\u9B0E\u9B10\u9B12\u9B16\u9B19\u9B1B\u9B1C\u9B20\u9B26\u9B2B\u9B2D\u9B33\u9B34\u9B35\u9B37\u9B39\u9B3A\u9B3D\u9B48\u9B4B\u9B4C\u9B55\u9B56\u9B57\u9B5B\u9B5E\u9B61\u9B63\u9B65\u9B66\u9B68\u9B6A",4,"\u9B73\u9B75\u9B77\u9B78\u9B79\u9B7F\u9B80\u9B84\u9B85\u9B86\u9B87\u9B89\u9B8A\u9B8B\u9B8D\u9B8F\u9B90\u9B94\u9B9A\u9B9D\u9B9E\u9BA6\u9BA7\u9BA9\u9BAC\u9BB0\u9BB1\u9BB2\u9BB7\u9BB8\u9BBB\u9BBC\u9BBE\u9BBF\u9BC1\u9BC7\u9BC8\u9BCE\u9BD0\u9BD7\u9BD8\u9BDD\u9BDF\u9BE5\u9BE7\u9BEA\u9BEB\u9BEF\u9BF3\u9BF7\u9BF8"],["8feba1","\u9BF9\u9BFA\u9BFD\u9BFF\u9C00\u9C02\u9C0B\u9C0F\u9C11\u9C16\u9C18\u9C19\u9C1A\u9C1C\u9C1E\u9C22\u9C23\u9C26",4,"\u9C31\u9C35\u9C36\u9C37\u9C3D\u9C41\u9C43\u9C44\u9C45\u9C49\u9C4A\u9C4E\u9C4F\u9C50\u9C53\u9C54\u9C56\u9C58\u9C5B\u9C5D\u9C5E\u9C5F\u9C63\u9C69\u9C6A\u9C5C\u9C6B\u9C68\u9C6E\u9C70\u9C72\u9C75\u9C77\u9C7B\u9CE6\u9CF2\u9CF7\u9CF9\u9D0B\u9D02\u9D11\u9D17\u9D18\u9D1C\u9D1D\u9D1E\u9D2F\u9D30\u9D32\u9D33\u9D34\u9D3A\u9D3C\u9D45\u9D3D\u9D42\u9D43\u9D47\u9D4A\u9D53\u9D54\u9D5F\u9D63\u9D62\u9D65\u9D69\u9D6A\u9D6B\u9D70\u9D76\u9D77\u9D7B"],["8feca1","\u9D7C\u9D7E\u9D83\u9D84\u9D86\u9D8A\u9D8D\u9D8E\u9D92\u9D93\u9D95\u9D96\u9D97\u9D98\u9DA1\u9DAA\u9DAC\u9DAE\u9DB1\u9DB5\u9DB9\u9DBC\u9DBF\u9DC3\u9DC7\u9DC9\u9DCA\u9DD4\u9DD5\u9DD6\u9DD7\u9DDA\u9DDE\u9DDF\u9DE0\u9DE5\u9DE7\u9DE9\u9DEB\u9DEE\u9DF0\u9DF3\u9DF4\u9DFE\u9E0A\u9E02\u9E07\u9E0E\u9E10\u9E11\u9E12\u9E15\u9E16\u9E19\u9E1C\u9E1D\u9E7A\u9E7B\u9E7C\u9E80\u9E82\u9E83\u9E84\u9E85\u9E87\u9E8E\u9E8F\u9E96\u9E98\u9E9B\u9E9E\u9EA4\u9EA8\u9EAC\u9EAE\u9EAF\u9EB0\u9EB3\u9EB4\u9EB5\u9EC6\u9EC8\u9ECB\u9ED5\u9EDF\u9EE4\u9EE7\u9EEC\u9EED\u9EEE\u9EF0\u9EF1\u9EF2\u9EF5"],["8feda1","\u9EF8\u9EFF\u9F02\u9F03\u9F09\u9F0F\u9F10\u9F11\u9F12\u9F14\u9F16\u9F17\u9F19\u9F1A\u9F1B\u9F1F\u9F22\u9F26\u9F2A\u9F2B\u9F2F\u9F31\u9F32\u9F34\u9F37\u9F39\u9F3A\u9F3C\u9F3D\u9F3F\u9F41\u9F43",4,"\u9F53\u9F55\u9F56\u9F57\u9F58\u9F5A\u9F5D\u9F5E\u9F68\u9F69\u9F6D",4,"\u9F73\u9F75\u9F7A\u9F7D\u9F8F\u9F90\u9F91\u9F92\u9F94\u9F96\u9F97\u9F9E\u9FA1\u9FA2\u9FA3\u9FA5"]]});var vY0=o((jM$,PV9)=>{PV9.exports=[["0","\x00",127,"\u20AC"],["8140","\u4E02\u4E04\u4E05\u4E06\u4E0F\u4E12\u4E17\u4E1F\u4E20\u4E21\u4E23\u4E26\u4E29\u4E2E\u4E2F\u4E31\u4E33\u4E35\u4E37\u4E3C\u4E40\u4E41\u4E42\u4E44\u4E46\u4E4A\u4E51\u4E55\u4E57\u4E5A\u4E5B\u4E62\u4E63\u4E64\u4E65\u4E67\u4E68\u4E6A",5,"\u4E72\u4E74",9,"\u4E7F",6,"\u4E87\u4E8A"],["8180","\u4E90\u4E96\u4E97\u4E99\u4E9C\u4E9D\u4E9E\u4EA3\u4EAA\u4EAF\u4EB0\u4EB1\u4EB4\u4EB6\u4EB7\u4EB8\u4EB9\u4EBC\u4EBD\u4EBE\u4EC8\u4ECC\u4ECF\u4ED0\u4ED2\u4EDA\u4EDB\u4EDC\u4EE0\u4EE2\u4EE6\u4EE7\u4EE9\u4EED\u4EEE\u4EEF\u4EF1\u4EF4\u4EF8\u4EF9\u4EFA\u4EFC\u4EFE\u4F00\u4F02",6,"\u4F0B\u4F0C\u4F12",4,"\u4F1C\u4F1D\u4F21\u4F23\u4F28\u4F29\u4F2C\u4F2D\u4F2E\u4F31\u4F33\u4F35\u4F37\u4F39\u4F3B\u4F3E",4,"\u4F44\u4F45\u4F47",5,"\u4F52\u4F54\u4F56\u4F61\u4F62\u4F66\u4F68\u4F6A\u4F6B\u4F6D\u4F6E\u4F71\u4F72\u4F75\u4F77\u4F78\u4F79\u4F7A\u4F7D\u4F80\u4F81\u4F82\u4F85\u4F86\u4F87\u4F8A\u4F8C\u4F8E\u4F90\u4F92\u4F93\u4F95\u4F96\u4F98\u4F99\u4F9A\u4F9C\u4F9E\u4F9F\u4FA1\u4FA2"],["8240","\u4FA4\u4FAB\u4FAD\u4FB0",4,"\u4FB6",8,"\u4FC0\u4FC1\u4FC2\u4FC6\u4FC7\u4FC8\u4FC9\u4FCB\u4FCC\u4FCD\u4FD2",4,"\u4FD9\u4FDB\u4FE0\u4FE2\u4FE4\u4FE5\u4FE7\u4FEB\u4FEC\u4FF0\u4FF2\u4FF4\u4FF5\u4FF6\u4FF7\u4FF9\u4FFB\u4FFC\u4FFD\u4FFF",11],["8280","\u500B\u500E\u5010\u5011\u5013\u5015\u5016\u5017\u501B\u501D\u501E\u5020\u5022\u5023\u5024\u5027\u502B\u502F",10,"\u503B\u503D\u503F\u5040\u5041\u5042\u5044\u5045\u5046\u5049\u504A\u504B\u504D\u5050",4,"\u5056\u5057\u5058\u5059\u505B\u505D",7,"\u5066",5,"\u506D",8,"\u5078\u5079\u507A\u507C\u507D\u5081\u5082\u5083\u5084\u5086\u5087\u5089\u508A\u508B\u508C\u508E",20,"\u50A4\u50A6\u50AA\u50AB\u50AD",4,"\u50B3",6,"\u50BC"],["8340","\u50BD",17,"\u50D0",5,"\u50D7\u50D8\u50D9\u50DB",10,"\u50E8\u50E9\u50EA\u50EB\u50EF\u50F0\u50F1\u50F2\u50F4\u50F6",4,"\u50FC",9,"\u5108"],["8380","\u5109\u510A\u510C",5,"\u5113",13,"\u5122",28,"\u5142\u5147\u514A\u514C\u514E\u514F\u5150\u5152\u5153\u5157\u5158\u5159\u515B\u515D",4,"\u5163\u5164\u5166\u5167\u5169\u516A\u516F\u5172\u517A\u517E\u517F\u5183\u5184\u5186\u5187\u518A\u518B\u518E\u518F\u5190\u5191\u5193\u5194\u5198\u519A\u519D\u519E\u519F\u51A1\u51A3\u51A6",4,"\u51AD\u51AE\u51B4\u51B8\u51B9\u51BA\u51BE\u51BF\u51C1\u51C2\u51C3\u51C5\u51C8\u51CA\u51CD\u51CE\u51D0\u51D2",5],["8440","\u51D8\u51D9\u51DA\u51DC\u51DE\u51DF\u51E2\u51E3\u51E5",5,"\u51EC\u51EE\u51F1\u51F2\u51F4\u51F7\u51FE\u5204\u5205\u5209\u520B\u520C\u520F\u5210\u5213\u5214\u5215\u521C\u521E\u521F\u5221\u5222\u5223\u5225\u5226\u5227\u522A\u522C\u522F\u5231\u5232\u5234\u5235\u523C\u523E\u5244",5,"\u524B\u524E\u524F\u5252\u5253\u5255\u5257\u5258"],["8480","\u5259\u525A\u525B\u525D\u525F\u5260\u5262\u5263\u5264\u5266\u5268\u526B\u526C\u526D\u526E\u5270\u5271\u5273",9,"\u527E\u5280\u5283",4,"\u5289",6,"\u5291\u5292\u5294",6,"\u529C\u52A4\u52A5\u52A6\u52A7\u52AE\u52AF\u52B0\u52B4",9,"\u52C0\u52C1\u52C2\u52C4\u52C5\u52C6\u52C8\u52CA\u52CC\u52CD\u52CE\u52CF\u52D1\u52D3\u52D4\u52D5\u52D7\u52D9",5,"\u52E0\u52E1\u52E2\u52E3\u52E5",10,"\u52F1",7,"\u52FB\u52FC\u52FD\u5301\u5302\u5303\u5304\u5307\u5309\u530A\u530B\u530C\u530E"],["8540","\u5311\u5312\u5313\u5314\u5318\u531B\u531C\u531E\u531F\u5322\u5324\u5325\u5327\u5328\u5329\u532B\u532C\u532D\u532F",9,"\u533C\u533D\u5340\u5342\u5344\u5346\u534B\u534C\u534D\u5350\u5354\u5358\u5359\u535B\u535D\u5365\u5368\u536A\u536C\u536D\u5372\u5376\u5379\u537B\u537C\u537D\u537E\u5380\u5381\u5383\u5387\u5388\u538A\u538E\u538F"],["8580","\u5390",4,"\u5396\u5397\u5399\u539B\u539C\u539E\u53A0\u53A1\u53A4\u53A7\u53AA\u53AB\u53AC\u53AD\u53AF",6,"\u53B7\u53B8\u53B9\u53BA\u53BC\u53BD\u53BE\u53C0\u53C3",4,"\u53CE\u53CF\u53D0\u53D2\u53D3\u53D5\u53DA\u53DC\u53DD\u53DE\u53E1\u53E2\u53E7\u53F4\u53FA\u53FE\u53FF\u5400\u5402\u5405\u5407\u540B\u5414\u5418\u5419\u541A\u541C\u5422\u5424\u5425\u542A\u5430\u5433\u5436\u5437\u543A\u543D\u543F\u5441\u5442\u5444\u5445\u5447\u5449\u544C\u544D\u544E\u544F\u5451\u545A\u545D",4,"\u5463\u5465\u5467\u5469",7,"\u5474\u5479\u547A\u547E\u547F\u5481\u5483\u5485\u5487\u5488\u5489\u548A\u548D\u5491\u5493\u5497\u5498\u549C\u549E\u549F\u54A0\u54A1"],["8640","\u54A2\u54A5\u54AE\u54B0\u54B2\u54B5\u54B6\u54B7\u54B9\u54BA\u54BC\u54BE\u54C3\u54C5\u54CA\u54CB\u54D6\u54D8\u54DB\u54E0",4,"\u54EB\u54EC\u54EF\u54F0\u54F1\u54F4",5,"\u54FB\u54FE\u5500\u5502\u5503\u5504\u5505\u5508\u550A",4,"\u5512\u5513\u5515",5,"\u551C\u551D\u551E\u551F\u5521\u5525\u5526"],["8680","\u5528\u5529\u552B\u552D\u5532\u5534\u5535\u5536\u5538\u5539\u553A\u553B\u553D\u5540\u5542\u5545\u5547\u5548\u554B",4,"\u5551\u5552\u5553\u5554\u5557",4,"\u555D\u555E\u555F\u5560\u5562\u5563\u5568\u5569\u556B\u556F",5,"\u5579\u557A\u557D\u557F\u5585\u5586\u558C\u558D\u558E\u5590\u5592\u5593\u5595\u5596\u5597\u559A\u559B\u559E\u55A0",6,"\u55A8",8,"\u55B2\u55B4\u55B6\u55B8\u55BA\u55BC\u55BF",4,"\u55C6\u55C7\u55C8\u55CA\u55CB\u55CE\u55CF\u55D0\u55D5\u55D7",4,"\u55DE\u55E0\u55E2\u55E7\u55E9\u55ED\u55EE\u55F0\u55F1\u55F4\u55F6\u55F8",4,"\u55FF\u5602\u5603\u5604\u5605"],["8740","\u5606\u5607\u560A\u560B\u560D\u5610",7,"\u5619\u561A\u561C\u561D\u5620\u5621\u5622\u5625\u5626\u5628\u5629\u562A\u562B\u562E\u562F\u5630\u5633\u5635\u5637\u5638\u563A\u563C\u563D\u563E\u5640",11,"\u564F",4,"\u5655\u5656\u565A\u565B\u565D",4],["8780","\u5663\u5665\u5666\u5667\u566D\u566E\u566F\u5670\u5672\u5673\u5674\u5675\u5677\u5678\u5679\u567A\u567D",7,"\u5687",6,"\u5690\u5691\u5692\u5694",14,"\u56A4",10,"\u56B0",6,"\u56B8\u56B9\u56BA\u56BB\u56BD",12,"\u56CB",8,"\u56D5\u56D6\u56D8\u56D9\u56DC\u56E3\u56E5",5,"\u56EC\u56EE\u56EF\u56F2\u56F3\u56F6\u56F7\u56F8\u56FB\u56FC\u5700\u5701\u5702\u5705\u5707\u570B",6],["8840","\u5712",9,"\u571D\u571E\u5720\u5721\u5722\u5724\u5725\u5726\u5727\u572B\u5731\u5732\u5734",4,"\u573C\u573D\u573F\u5741\u5743\u5744\u5745\u5746\u5748\u5749\u574B\u5752",4,"\u5758\u5759\u5762\u5763\u5765\u5767\u576C\u576E\u5770\u5771\u5772\u5774\u5775\u5778\u5779\u577A\u577D\u577E\u577F\u5780"],["8880","\u5781\u5787\u5788\u5789\u578A\u578D",4,"\u5794",6,"\u579C\u579D\u579E\u579F\u57A5\u57A8\u57AA\u57AC\u57AF\u57B0\u57B1\u57B3\u57B5\u57B6\u57B7\u57B9",8,"\u57C4",6,"\u57CC\u57CD\u57D0\u57D1\u57D3\u57D6\u57D7\u57DB\u57DC\u57DE\u57E1\u57E2\u57E3\u57E5",7,"\u57EE\u57F0\u57F1\u57F2\u57F3\u57F5\u57F6\u57F7\u57FB\u57FC\u57FE\u57FF\u5801\u5803\u5804\u5805\u5808\u5809\u580A\u580C\u580E\u580F\u5810\u5812\u5813\u5814\u5816\u5817\u5818\u581A\u581B\u581C\u581D\u581F\u5822\u5823\u5825",4,"\u582B",4,"\u5831\u5832\u5833\u5834\u5836",7],["8940","\u583E",5,"\u5845",6,"\u584E\u584F\u5850\u5852\u5853\u5855\u5856\u5857\u5859",4,"\u585F",5,"\u5866",4,"\u586D",16,"\u587F\u5882\u5884\u5886\u5887\u5888\u588A\u588B\u588C"],["8980","\u588D",4,"\u5894",4,"\u589B\u589C\u589D\u58A0",7,"\u58AA",17,"\u58BD\u58BE\u58BF\u58C0\u58C2\u58C3\u58C4\u58C6",10,"\u58D2\u58D3\u58D4\u58D6",13,"\u58E5",5,"\u58ED\u58EF\u58F1\u58F2\u58F4\u58F5\u58F7\u58F8\u58FA",7,"\u5903\u5905\u5906\u5908",4,"\u590E\u5910\u5911\u5912\u5913\u5917\u5918\u591B\u591D\u591E\u5920\u5921\u5922\u5923\u5926\u5928\u592C\u5930\u5932\u5933\u5935\u5936\u593B"],["8a40","\u593D\u593E\u593F\u5940\u5943\u5945\u5946\u594A\u594C\u594D\u5950\u5952\u5953\u5959\u595B",4,"\u5961\u5963\u5964\u5966",12,"\u5975\u5977\u597A\u597B\u597C\u597E\u597F\u5980\u5985\u5989\u598B\u598C\u598E\u598F\u5990\u5991\u5994\u5995\u5998\u599A\u599B\u599C\u599D\u599F\u59A0\u59A1\u59A2\u59A6"],["8a80","\u59A7\u59AC\u59AD\u59B0\u59B1\u59B3",5,"\u59BA\u59BC\u59BD\u59BF",6,"\u59C7\u59C8\u59C9\u59CC\u59CD\u59CE\u59CF\u59D5\u59D6\u59D9\u59DB\u59DE",4,"\u59E4\u59E6\u59E7\u59E9\u59EA\u59EB\u59ED",11,"\u59FA\u59FC\u59FD\u59FE\u5A00\u5A02\u5A0A\u5A0B\u5A0D\u5A0E\u5A0F\u5A10\u5A12\u5A14\u5A15\u5A16\u5A17\u5A19\u5A1A\u5A1B\u5A1D\u5A1E\u5A21\u5A22\u5A24\u5A26\u5A27\u5A28\u5A2A",6,"\u5A33\u5A35\u5A37",4,"\u5A3D\u5A3E\u5A3F\u5A41",4,"\u5A47\u5A48\u5A4B",9,"\u5A56\u5A57\u5A58\u5A59\u5A5B",5],["8b40","\u5A61\u5A63\u5A64\u5A65\u5A66\u5A68\u5A69\u5A6B",8,"\u5A78\u5A79\u5A7B\u5A7C\u5A7D\u5A7E\u5A80",17,"\u5A93",6,"\u5A9C",13,"\u5AAB\u5AAC"],["8b80","\u5AAD",4,"\u5AB4\u5AB6\u5AB7\u5AB9",4,"\u5ABF\u5AC0\u5AC3",5,"\u5ACA\u5ACB\u5ACD",4,"\u5AD3\u5AD5\u5AD7\u5AD9\u5ADA\u5ADB\u5ADD\u5ADE\u5ADF\u5AE2\u5AE4\u5AE5\u5AE7\u5AE8\u5AEA\u5AEC",4,"\u5AF2",22,"\u5B0A",11,"\u5B18",25,"\u5B33\u5B35\u5B36\u5B38",7,"\u5B41",6],["8c40","\u5B48",7,"\u5B52\u5B56\u5B5E\u5B60\u5B61\u5B67\u5B68\u5B6B\u5B6D\u5B6E\u5B6F\u5B72\u5B74\u5B76\u5B77\u5B78\u5B79\u5B7B\u5B7C\u5B7E\u5B7F\u5B82\u5B86\u5B8A\u5B8D\u5B8E\u5B90\u5B91\u5B92\u5B94\u5B96\u5B9F\u5BA7\u5BA8\u5BA9\u5BAC\u5BAD\u5BAE\u5BAF\u5BB1\u5BB2\u5BB7\u5BBA\u5BBB\u5BBC\u5BC0\u5BC1\u5BC3\u5BC8\u5BC9\u5BCA\u5BCB\u5BCD\u5BCE\u5BCF"],["8c80","\u5BD1\u5BD4",8,"\u5BE0\u5BE2\u5BE3\u5BE6\u5BE7\u5BE9",4,"\u5BEF\u5BF1",6,"\u5BFD\u5BFE\u5C00\u5C02\u5C03\u5C05\u5C07\u5C08\u5C0B\u5C0C\u5C0D\u5C0E\u5C10\u5C12\u5C13\u5C17\u5C19\u5C1B\u5C1E\u5C1F\u5C20\u5C21\u5C23\u5C26\u5C28\u5C29\u5C2A\u5C2B\u5C2D\u5C2E\u5C2F\u5C30\u5C32\u5C33\u5C35\u5C36\u5C37\u5C43\u5C44\u5C46\u5C47\u5C4C\u5C4D\u5C52\u5C53\u5C54\u5C56\u5C57\u5C58\u5C5A\u5C5B\u5C5C\u5C5D\u5C5F\u5C62\u5C64\u5C67",6,"\u5C70\u5C72",6,"\u5C7B\u5C7C\u5C7D\u5C7E\u5C80\u5C83",4,"\u5C89\u5C8A\u5C8B\u5C8E\u5C8F\u5C92\u5C93\u5C95\u5C9D",4,"\u5CA4",4],["8d40","\u5CAA\u5CAE\u5CAF\u5CB0\u5CB2\u5CB4\u5CB6\u5CB9\u5CBA\u5CBB\u5CBC\u5CBE\u5CC0\u5CC2\u5CC3\u5CC5",5,"\u5CCC",5,"\u5CD3",5,"\u5CDA",6,"\u5CE2\u5CE3\u5CE7\u5CE9\u5CEB\u5CEC\u5CEE\u5CEF\u5CF1",9,"\u5CFC",4],["8d80","\u5D01\u5D04\u5D05\u5D08",5,"\u5D0F",4,"\u5D15\u5D17\u5D18\u5D19\u5D1A\u5D1C\u5D1D\u5D1F",4,"\u5D25\u5D28\u5D2A\u5D2B\u5D2C\u5D2F",4,"\u5D35",7,"\u5D3F",7,"\u5D48\u5D49\u5D4D",10,"\u5D59\u5D5A\u5D5C\u5D5E",10,"\u5D6A\u5D6D\u5D6E\u5D70\u5D71\u5D72\u5D73\u5D75",12,"\u5D83",21,"\u5D9A\u5D9B\u5D9C\u5D9E\u5D9F\u5DA0"],["8e40","\u5DA1",21,"\u5DB8",12,"\u5DC6",6,"\u5DCE",12,"\u5DDC\u5DDF\u5DE0\u5DE3\u5DE4\u5DEA\u5DEC\u5DED"],["8e80","\u5DF0\u5DF5\u5DF6\u5DF8",4,"\u5DFF\u5E00\u5E04\u5E07\u5E09\u5E0A\u5E0B\u5E0D\u5E0E\u5E12\u5E13\u5E17\u5E1E",7,"\u5E28",4,"\u5E2F\u5E30\u5E32",4,"\u5E39\u5E3A\u5E3E\u5E3F\u5E40\u5E41\u5E43\u5E46",5,"\u5E4D",6,"\u5E56",4,"\u5E5C\u5E5D\u5E5F\u5E60\u5E63",14,"\u5E75\u5E77\u5E79\u5E7E\u5E81\u5E82\u5E83\u5E85\u5E88\u5E89\u5E8C\u5E8D\u5E8E\u5E92\u5E98\u5E9B\u5E9D\u5EA1\u5EA2\u5EA3\u5EA4\u5EA8",4,"\u5EAE",4,"\u5EB4\u5EBA\u5EBB\u5EBC\u5EBD\u5EBF",6],["8f40","\u5EC6\u5EC7\u5EC8\u5ECB",5,"\u5ED4\u5ED5\u5ED7\u5ED8\u5ED9\u5EDA\u5EDC",11,"\u5EE9\u5EEB",8,"\u5EF5\u5EF8\u5EF9\u5EFB\u5EFC\u5EFD\u5F05\u5F06\u5F07\u5F09\u5F0C\u5F0D\u5F0E\u5F10\u5F12\u5F14\u5F16\u5F19\u5F1A\u5F1C\u5F1D\u5F1E\u5F21\u5F22\u5F23\u5F24"],["8f80","\u5F28\u5F2B\u5F2C\u5F2E\u5F30\u5F32",6,"\u5F3B\u5F3D\u5F3E\u5F3F\u5F41",14,"\u5F51\u5F54\u5F59\u5F5A\u5F5B\u5F5C\u5F5E\u5F5F\u5F60\u5F63\u5F65\u5F67\u5F68\u5F6B\u5F6E\u5F6F\u5F72\u5F74\u5F75\u5F76\u5F78\u5F7A\u5F7D\u5F7E\u5F7F\u5F83\u5F86\u5F8D\u5F8E\u5F8F\u5F91\u5F93\u5F94\u5F96\u5F9A\u5F9B\u5F9D\u5F9E\u5F9F\u5FA0\u5FA2",5,"\u5FA9\u5FAB\u5FAC\u5FAF",5,"\u5FB6\u5FB8\u5FB9\u5FBA\u5FBB\u5FBE",4,"\u5FC7\u5FC8\u5FCA\u5FCB\u5FCE\u5FD3\u5FD4\u5FD5\u5FDA\u5FDB\u5FDC\u5FDE\u5FDF\u5FE2\u5FE3\u5FE5\u5FE6\u5FE8\u5FE9\u5FEC\u5FEF\u5FF0\u5FF2\u5FF3\u5FF4\u5FF6\u5FF7\u5FF9\u5FFA\u5FFC\u6007"],["9040","\u6008\u6009\u600B\u600C\u6010\u6011\u6013\u6017\u6018\u601A\u601E\u601F\u6022\u6023\u6024\u602C\u602D\u602E\u6030",4,"\u6036",4,"\u603D\u603E\u6040\u6044",6,"\u604C\u604E\u604F\u6051\u6053\u6054\u6056\u6057\u6058\u605B\u605C\u605E\u605F\u6060\u6061\u6065\u6066\u606E\u6071\u6072\u6074\u6075\u6077\u607E\u6080"],["9080","\u6081\u6082\u6085\u6086\u6087\u6088\u608A\u608B\u608E\u608F\u6090\u6091\u6093\u6095\u6097\u6098\u6099\u609C\u609E\u60A1\u60A2\u60A4\u60A5\u60A7\u60A9\u60AA\u60AE\u60B0\u60B3\u60B5\u60B6\u60B7\u60B9\u60BA\u60BD",7,"\u60C7\u60C8\u60C9\u60CC",4,"\u60D2\u60D3\u60D4\u60D6\u60D7\u60D9\u60DB\u60DE\u60E1",4,"\u60EA\u60F1\u60F2\u60F5\u60F7\u60F8\u60FB",4,"\u6102\u6103\u6104\u6105\u6107\u610A\u610B\u610C\u6110",4,"\u6116\u6117\u6118\u6119\u611B\u611C\u611D\u611E\u6121\u6122\u6125\u6128\u6129\u612A\u612C",18,"\u6140",6],["9140","\u6147\u6149\u614B\u614D\u614F\u6150\u6152\u6153\u6154\u6156",6,"\u615E\u615F\u6160\u6161\u6163\u6164\u6165\u6166\u6169",6,"\u6171\u6172\u6173\u6174\u6176\u6178",18,"\u618C\u618D\u618F",4,"\u6195"],["9180","\u6196",6,"\u619E",8,"\u61AA\u61AB\u61AD",9,"\u61B8",5,"\u61BF\u61C0\u61C1\u61C3",4,"\u61C9\u61CC",4,"\u61D3\u61D5",16,"\u61E7",13,"\u61F6",8,"\u6200",5,"\u6207\u6209\u6213\u6214\u6219\u621C\u621D\u621E\u6220\u6223\u6226\u6227\u6228\u6229\u622B\u622D\u622F\u6230\u6231\u6232\u6235\u6236\u6238",4,"\u6242\u6244\u6245\u6246\u624A"],["9240","\u624F\u6250\u6255\u6256\u6257\u6259\u625A\u625C",6,"\u6264\u6265\u6268\u6271\u6272\u6274\u6275\u6277\u6278\u627A\u627B\u627D\u6281\u6282\u6283\u6285\u6286\u6287\u6288\u628B",5,"\u6294\u6299\u629C\u629D\u629E\u62A3\u62A6\u62A7\u62A9\u62AA\u62AD\u62AE\u62AF\u62B0\u62B2\u62B3\u62B4\u62B6\u62B7\u62B8\u62BA\u62BE\u62C0\u62C1"],["9280","\u62C3\u62CB\u62CF\u62D1\u62D5\u62DD\u62DE\u62E0\u62E1\u62E4\u62EA\u62EB\u62F0\u62F2\u62F5\u62F8\u62F9\u62FA\u62FB\u6300\u6303\u6304\u6305\u6306\u630A\u630B\u630C\u630D\u630F\u6310\u6312\u6313\u6314\u6315\u6317\u6318\u6319\u631C\u6326\u6327\u6329\u632C\u632D\u632E\u6330\u6331\u6333",5,"\u633B\u633C\u633E\u633F\u6340\u6341\u6344\u6347\u6348\u634A\u6351\u6352\u6353\u6354\u6356",7,"\u6360\u6364\u6365\u6366\u6368\u636A\u636B\u636C\u636F\u6370\u6372\u6373\u6374\u6375\u6378\u6379\u637C\u637D\u637E\u637F\u6381\u6383\u6384\u6385\u6386\u638B\u638D\u6391\u6393\u6394\u6395\u6397\u6399",6,"\u63A1\u63A4\u63A6\u63AB\u63AF\u63B1\u63B2\u63B5\u63B6\u63B9\u63BB\u63BD\u63BF\u63C0"],["9340","\u63C1\u63C2\u63C3\u63C5\u63C7\u63C8\u63CA\u63CB\u63CC\u63D1\u63D3\u63D4\u63D5\u63D7",6,"\u63DF\u63E2\u63E4",4,"\u63EB\u63EC\u63EE\u63EF\u63F0\u63F1\u63F3\u63F5\u63F7\u63F9\u63FA\u63FB\u63FC\u63FE\u6403\u6404\u6406",4,"\u640D\u640E\u6411\u6412\u6415",5,"\u641D\u641F\u6422\u6423\u6424"],["9380","\u6425\u6427\u6428\u6429\u642B\u642E",5,"\u6435",4,"\u643B\u643C\u643E\u6440\u6442\u6443\u6449\u644B",6,"\u6453\u6455\u6456\u6457\u6459",4,"\u645F",7,"\u6468\u646A\u646B\u646C\u646E",9,"\u647B",6,"\u6483\u6486\u6488",8,"\u6493\u6494\u6497\u6498\u649A\u649B\u649C\u649D\u649F",4,"\u64A5\u64A6\u64A7\u64A8\u64AA\u64AB\u64AF\u64B1\u64B2\u64B3\u64B4\u64B6\u64B9\u64BB\u64BD\u64BE\u64BF\u64C1\u64C3\u64C4\u64C6",6,"\u64CF\u64D1\u64D3\u64D4\u64D5\u64D6\u64D9\u64DA"],["9440","\u64DB\u64DC\u64DD\u64DF\u64E0\u64E1\u64E3\u64E5\u64E7",24,"\u6501",7,"\u650A",7,"\u6513",4,"\u6519",8],["9480","\u6522\u6523\u6524\u6526",4,"\u652C\u652D\u6530\u6531\u6532\u6533\u6537\u653A\u653C\u653D\u6540",4,"\u6546\u6547\u654A\u654B\u654D\u654E\u6550\u6552\u6553\u6554\u6557\u6558\u655A\u655C\u655F\u6560\u6561\u6564\u6565\u6567\u6568\u6569\u656A\u656D\u656E\u656F\u6571\u6573\u6575\u6576\u6578",14,"\u6588\u6589\u658A\u658D\u658E\u658F\u6592\u6594\u6595\u6596\u6598\u659A\u659D\u659E\u65A0\u65A2\u65A3\u65A6\u65A8\u65AA\u65AC\u65AE\u65B1",7,"\u65BA\u65BB\u65BE\u65BF\u65C0\u65C2\u65C7\u65C8\u65C9\u65CA\u65CD\u65D0\u65D1\u65D3\u65D4\u65D5\u65D8",7,"\u65E1\u65E3\u65E4\u65EA\u65EB"],["9540","\u65F2\u65F3\u65F4\u65F5\u65F8\u65F9\u65FB",4,"\u6601\u6604\u6605\u6607\u6608\u6609\u660B\u660D\u6610\u6611\u6612\u6616\u6617\u6618\u661A\u661B\u661C\u661E\u6621\u6622\u6623\u6624\u6626\u6629\u662A\u662B\u662C\u662E\u6630\u6632\u6633\u6637",4,"\u663D\u663F\u6640\u6642\u6644",6,"\u664D\u664E\u6650\u6651\u6658"],["9580","\u6659\u665B\u665C\u665D\u665E\u6660\u6662\u6663\u6665\u6667\u6669",4,"\u6671\u6672\u6673\u6675\u6678\u6679\u667B\u667C\u667D\u667F\u6680\u6681\u6683\u6685\u6686\u6688\u6689\u668A\u668B\u668D\u668E\u668F\u6690\u6692\u6693\u6694\u6695\u6698",4,"\u669E",8,"\u66A9",4,"\u66AF",4,"\u66B5\u66B6\u66B7\u66B8\u66BA\u66BB\u66BC\u66BD\u66BF",25,"\u66DA\u66DE",7,"\u66E7\u66E8\u66EA",5,"\u66F1\u66F5\u66F6\u66F8\u66FA\u66FB\u66FD\u6701\u6702\u6703"],["9640","\u6704\u6705\u6706\u6707\u670C\u670E\u670F\u6711\u6712\u6713\u6716\u6718\u6719\u671A\u671C\u671E\u6720",5,"\u6727\u6729\u672E\u6730\u6732\u6733\u6736\u6737\u6738\u6739\u673B\u673C\u673E\u673F\u6741\u6744\u6745\u6747\u674A\u674B\u674D\u6752\u6754\u6755\u6757",4,"\u675D\u6762\u6763\u6764\u6766\u6767\u676B\u676C\u676E\u6771\u6774\u6776"],["9680","\u6778\u6779\u677A\u677B\u677D\u6780\u6782\u6783\u6785\u6786\u6788\u678A\u678C\u678D\u678E\u678F\u6791\u6792\u6793\u6794\u6796\u6799\u679B\u679F\u67A0\u67A1\u67A4\u67A6\u67A9\u67AC\u67AE\u67B1\u67B2\u67B4\u67B9",7,"\u67C2\u67C5",9,"\u67D5\u67D6\u67D7\u67DB\u67DF\u67E1\u67E3\u67E4\u67E6\u67E7\u67E8\u67EA\u67EB\u67ED\u67EE\u67F2\u67F5",7,"\u67FE\u6801\u6802\u6803\u6804\u6806\u680D\u6810\u6812\u6814\u6815\u6818",4,"\u681E\u681F\u6820\u6822",6,"\u682B",6,"\u6834\u6835\u6836\u683A\u683B\u683F\u6847\u684B\u684D\u684F\u6852\u6856",5],["9740","\u685C\u685D\u685E\u685F\u686A\u686C",7,"\u6875\u6878",8,"\u6882\u6884\u6887",7,"\u6890\u6891\u6892\u6894\u6895\u6896\u6898",9,"\u68A3\u68A4\u68A5\u68A9\u68AA\u68AB\u68AC\u68AE\u68B1\u68B2\u68B4\u68B6\u68B7\u68B8"],["9780","\u68B9",6,"\u68C1\u68C3",5,"\u68CA\u68CC\u68CE\u68CF\u68D0\u68D1\u68D3\u68D4\u68D6\u68D7\u68D9\u68DB",4,"\u68E1\u68E2\u68E4",9,"\u68EF\u68F2\u68F3\u68F4\u68F6\u68F7\u68F8\u68FB\u68FD\u68FE\u68FF\u6900\u6902\u6903\u6904\u6906",4,"\u690C\u690F\u6911\u6913",11,"\u6921\u6922\u6923\u6925",7,"\u692E\u692F\u6931\u6932\u6933\u6935\u6936\u6937\u6938\u693A\u693B\u693C\u693E\u6940\u6941\u6943",16,"\u6955\u6956\u6958\u6959\u695B\u695C\u695F"],["9840","\u6961\u6962\u6964\u6965\u6967\u6968\u6969\u696A\u696C\u696D\u696F\u6970\u6972",4,"\u697A\u697B\u697D\u697E\u697F\u6981\u6983\u6985\u698A\u698B\u698C\u698E",5,"\u6996\u6997\u6999\u699A\u699D",9,"\u69A9\u69AA\u69AC\u69AE\u69AF\u69B0\u69B2\u69B3\u69B5\u69B6\u69B8\u69B9\u69BA\u69BC\u69BD"],["9880","\u69BE\u69BF\u69C0\u69C2",7,"\u69CB\u69CD\u69CF\u69D1\u69D2\u69D3\u69D5",5,"\u69DC\u69DD\u69DE\u69E1",11,"\u69EE\u69EF\u69F0\u69F1\u69F3",9,"\u69FE\u6A00",9,"\u6A0B",11,"\u6A19",5,"\u6A20\u6A22",5,"\u6A29\u6A2B\u6A2C\u6A2D\u6A2E\u6A30\u6A32\u6A33\u6A34\u6A36",6,"\u6A3F",4,"\u6A45\u6A46\u6A48",7,"\u6A51",6,"\u6A5A"],["9940","\u6A5C",4,"\u6A62\u6A63\u6A64\u6A66",10,"\u6A72",6,"\u6A7A\u6A7B\u6A7D\u6A7E\u6A7F\u6A81\u6A82\u6A83\u6A85",8,"\u6A8F\u6A92",4,"\u6A98",7,"\u6AA1",5],["9980","\u6AA7\u6AA8\u6AAA\u6AAD",114,"\u6B25\u6B26\u6B28",6],["9a40","\u6B2F\u6B30\u6B31\u6B33\u6B34\u6B35\u6B36\u6B38\u6B3B\u6B3C\u6B3D\u6B3F\u6B40\u6B41\u6B42\u6B44\u6B45\u6B48\u6B4A\u6B4B\u6B4D",11,"\u6B5A",7,"\u6B68\u6B69\u6B6B",13,"\u6B7A\u6B7D\u6B7E\u6B7F\u6B80\u6B85\u6B88"],["9a80","\u6B8C\u6B8E\u6B8F\u6B90\u6B91\u6B94\u6B95\u6B97\u6B98\u6B99\u6B9C",4,"\u6BA2",7,"\u6BAB",7,"\u6BB6\u6BB8",6,"\u6BC0\u6BC3\u6BC4\u6BC6",4,"\u6BCC\u6BCE\u6BD0\u6BD1\u6BD8\u6BDA\u6BDC",4,"\u6BE2",7,"\u6BEC\u6BED\u6BEE\u6BF0\u6BF1\u6BF2\u6BF4\u6BF6\u6BF7\u6BF8\u6BFA\u6BFB\u6BFC\u6BFE",6,"\u6C08",4,"\u6C0E\u6C12\u6C17\u6C1C\u6C1D\u6C1E\u6C20\u6C23\u6C25\u6C2B\u6C2C\u6C2D\u6C31\u6C33\u6C36\u6C37\u6C39\u6C3A\u6C3B\u6C3C\u6C3E\u6C3F\u6C43\u6C44\u6C45\u6C48\u6C4B",4,"\u6C51\u6C52\u6C53\u6C56\u6C58"],["9b40","\u6C59\u6C5A\u6C62\u6C63\u6C65\u6C66\u6C67\u6C6B",4,"\u6C71\u6C73\u6C75\u6C77\u6C78\u6C7A\u6C7B\u6C7C\u6C7F\u6C80\u6C84\u6C87\u6C8A\u6C8B\u6C8D\u6C8E\u6C91\u6C92\u6C95\u6C96\u6C97\u6C98\u6C9A\u6C9C\u6C9D\u6C9E\u6CA0\u6CA2\u6CA8\u6CAC\u6CAF\u6CB0\u6CB4\u6CB5\u6CB6\u6CB7\u6CBA\u6CC0\u6CC1\u6CC2\u6CC3\u6CC6\u6CC7\u6CC8\u6CCB\u6CCD\u6CCE\u6CCF\u6CD1\u6CD2\u6CD8"],["9b80","\u6CD9\u6CDA\u6CDC\u6CDD\u6CDF\u6CE4\u6CE6\u6CE7\u6CE9\u6CEC\u6CED\u6CF2\u6CF4\u6CF9\u6CFF\u6D00\u6D02\u6D03\u6D05\u6D06\u6D08\u6D09\u6D0A\u6D0D\u6D0F\u6D10\u6D11\u6D13\u6D14\u6D15\u6D16\u6D18\u6D1C\u6D1D\u6D1F",5,"\u6D26\u6D28\u6D29\u6D2C\u6D2D\u6D2F\u6D30\u6D34\u6D36\u6D37\u6D38\u6D3A\u6D3F\u6D40\u6D42\u6D44\u6D49\u6D4C\u6D50\u6D55\u6D56\u6D57\u6D58\u6D5B\u6D5D\u6D5F\u6D61\u6D62\u6D64\u6D65\u6D67\u6D68\u6D6B\u6D6C\u6D6D\u6D70\u6D71\u6D72\u6D73\u6D75\u6D76\u6D79\u6D7A\u6D7B\u6D7D",4,"\u6D83\u6D84\u6D86\u6D87\u6D8A\u6D8B\u6D8D\u6D8F\u6D90\u6D92\u6D96",4,"\u6D9C\u6DA2\u6DA5\u6DAC\u6DAD\u6DB0\u6DB1\u6DB3\u6DB4\u6DB6\u6DB7\u6DB9",5,"\u6DC1\u6DC2\u6DC3\u6DC8\u6DC9\u6DCA"],["9c40","\u6DCD\u6DCE\u6DCF\u6DD0\u6DD2\u6DD3\u6DD4\u6DD5\u6DD7\u6DDA\u6DDB\u6DDC\u6DDF\u6DE2\u6DE3\u6DE5\u6DE7\u6DE8\u6DE9\u6DEA\u6DED\u6DEF\u6DF0\u6DF2\u6DF4\u6DF5\u6DF6\u6DF8\u6DFA\u6DFD",7,"\u6E06\u6E07\u6E08\u6E09\u6E0B\u6E0F\u6E12\u6E13\u6E15\u6E18\u6E19\u6E1B\u6E1C\u6E1E\u6E1F\u6E22\u6E26\u6E27\u6E28\u6E2A\u6E2C\u6E2E\u6E30\u6E31\u6E33\u6E35"],["9c80","\u6E36\u6E37\u6E39\u6E3B",7,"\u6E45",7,"\u6E4F\u6E50\u6E51\u6E52\u6E55\u6E57\u6E59\u6E5A\u6E5C\u6E5D\u6E5E\u6E60",10,"\u6E6C\u6E6D\u6E6F",14,"\u6E80\u6E81\u6E82\u6E84\u6E87\u6E88\u6E8A",4,"\u6E91",6,"\u6E99\u6E9A\u6E9B\u6E9D\u6E9E\u6EA0\u6EA1\u6EA3\u6EA4\u6EA6\u6EA8\u6EA9\u6EAB\u6EAC\u6EAD\u6EAE\u6EB0\u6EB3\u6EB5\u6EB8\u6EB9\u6EBC\u6EBE\u6EBF\u6EC0\u6EC3\u6EC4\u6EC5\u6EC6\u6EC8\u6EC9\u6ECA\u6ECC\u6ECD\u6ECE\u6ED0\u6ED2\u6ED6\u6ED8\u6ED9\u6EDB\u6EDC\u6EDD\u6EE3\u6EE7\u6EEA",5],["9d40","\u6EF0\u6EF1\u6EF2\u6EF3\u6EF5\u6EF6\u6EF7\u6EF8\u6EFA",7,"\u6F03\u6F04\u6F05\u6F07\u6F08\u6F0A",4,"\u6F10\u6F11\u6F12\u6F16",9,"\u6F21\u6F22\u6F23\u6F25\u6F26\u6F27\u6F28\u6F2C\u6F2E\u6F30\u6F32\u6F34\u6F35\u6F37",6,"\u6F3F\u6F40\u6F41\u6F42"],["9d80","\u6F43\u6F44\u6F45\u6F48\u6F49\u6F4A\u6F4C\u6F4E",9,"\u6F59\u6F5A\u6F5B\u6F5D\u6F5F\u6F60\u6F61\u6F63\u6F64\u6F65\u6F67",5,"\u6F6F\u6F70\u6F71\u6F73\u6F75\u6F76\u6F77\u6F79\u6F7B\u6F7D",6,"\u6F85\u6F86\u6F87\u6F8A\u6F8B\u6F8F",12,"\u6F9D\u6F9E\u6F9F\u6FA0\u6FA2",4,"\u6FA8",10,"\u6FB4\u6FB5\u6FB7\u6FB8\u6FBA",5,"\u6FC1\u6FC3",5,"\u6FCA",6,"\u6FD3",10,"\u6FDF\u6FE2\u6FE3\u6FE4\u6FE5"],["9e40","\u6FE6",7,"\u6FF0",32,"\u7012",7,"\u701C",6,"\u7024",6],["9e80","\u702B",9,"\u7036\u7037\u7038\u703A",17,"\u704D\u704E\u7050",13,"\u705F",11,"\u706E\u7071\u7072\u7073\u7074\u7077\u7079\u707A\u707B\u707D\u7081\u7082\u7083\u7084\u7086\u7087\u7088\u708B\u708C\u708D\u708F\u7090\u7091\u7093\u7097\u7098\u709A\u709B\u709E",12,"\u70B0\u70B2\u70B4\u70B5\u70B6\u70BA\u70BE\u70BF\u70C4\u70C5\u70C6\u70C7\u70C9\u70CB",12,"\u70DA"],["9f40","\u70DC\u70DD\u70DE\u70E0\u70E1\u70E2\u70E3\u70E5\u70EA\u70EE\u70F0",6,"\u70F8\u70FA\u70FB\u70FC\u70FE",10,"\u710B",4,"\u7111\u7112\u7114\u7117\u711B",10,"\u7127",7,"\u7132\u7133\u7134"],["9f80","\u7135\u7137",13,"\u7146\u7147\u7148\u7149\u714B\u714D\u714F",12,"\u715D\u715F",4,"\u7165\u7169",4,"\u716F\u7170\u7171\u7174\u7175\u7176\u7177\u7179\u717B\u717C\u717E",5,"\u7185",4,"\u718B\u718C\u718D\u718E\u7190\u7191\u7192\u7193\u7195\u7196\u7197\u719A",4,"\u71A1",6,"\u71A9\u71AA\u71AB\u71AD",5,"\u71B4\u71B6\u71B7\u71B8\u71BA",8,"\u71C4",9,"\u71CF",4],["a040","\u71D6",9,"\u71E1\u71E2\u71E3\u71E4\u71E6\u71E8",5,"\u71EF",9,"\u71FA",11,"\u7207",19],["a080","\u721B\u721C\u721E",9,"\u7229\u722B\u722D\u722E\u722F\u7232\u7233\u7234\u723A\u723C\u723E\u7240",6,"\u7249\u724A\u724B\u724E\u724F\u7250\u7251\u7253\u7254\u7255\u7257\u7258\u725A\u725C\u725E\u7260\u7263\u7264\u7265\u7268\u726A\u726B\u726C\u726D\u7270\u7271\u7273\u7274\u7276\u7277\u7278\u727B\u727C\u727D\u7282\u7283\u7285",4,"\u728C\u728E\u7290\u7291\u7293",11,"\u72A0",11,"\u72AE\u72B1\u72B2\u72B3\u72B5\u72BA",6,"\u72C5\u72C6\u72C7\u72C9\u72CA\u72CB\u72CC\u72CF\u72D1\u72D3\u72D4\u72D5\u72D6\u72D8\u72DA\u72DB"],["a1a1","\u3000\u3001\u3002\xB7\u02C9\u02C7\xA8\u3003\u3005\u2014\uFF5E\u2016\u2026\u2018\u2019\u201C\u201D\u3014\u3015\u3008",7,"\u3016\u3017\u3010\u3011\xB1\xD7\xF7\u2236\u2227\u2228\u2211\u220F\u222A\u2229\u2208\u2237\u221A\u22A5\u2225\u2220\u2312\u2299\u222B\u222E\u2261\u224C\u2248\u223D\u221D\u2260\u226E\u226F\u2264\u2265\u221E\u2235\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFF04\xA4\uFFE0\uFFE1\u2030\xA7\u2116\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u203B\u2192\u2190\u2191\u2193\u3013"],["a2a1","\u2170",9],["a2b1","\u2488",19,"\u2474",19,"\u2460",9],["a2e5","\u3220",9],["a2f1","\u2160",11],["a3a1","\uFF01\uFF02\uFF03\uFFE5\uFF05",88,"\uFFE3"],["a4a1","\u3041",82],["a5a1","\u30A1",85],["a6a1","\u0391",16,"\u03A3",6],["a6c1","\u03B1",16,"\u03C3",6],["a6e0","\uFE35\uFE36\uFE39\uFE3A\uFE3F\uFE40\uFE3D\uFE3E\uFE41\uFE42\uFE43\uFE44"],["a6ee","\uFE3B\uFE3C\uFE37\uFE38\uFE31"],["a6f4","\uFE33\uFE34"],["a7a1","\u0410",5,"\u0401\u0416",25],["a7d1","\u0430",5,"\u0451\u0436",25],["a840","\u02CA\u02CB\u02D9\u2013\u2015\u2025\u2035\u2105\u2109\u2196\u2197\u2198\u2199\u2215\u221F\u2223\u2252\u2266\u2267\u22BF\u2550",35,"\u2581",6],["a880","\u2588",7,"\u2593\u2594\u2595\u25BC\u25BD\u25E2\u25E3\u25E4\u25E5\u2609\u2295\u3012\u301D\u301E"],["a8a1","\u0101\xE1\u01CE\xE0\u0113\xE9\u011B\xE8\u012B\xED\u01D0\xEC\u014D\xF3\u01D2\xF2\u016B\xFA\u01D4\xF9\u01D6\u01D8\u01DA\u01DC\xFC\xEA\u0251"],["a8bd","\u0144\u0148"],["a8c0","\u0261"],["a8c5","\u3105",36],["a940","\u3021",8,"\u32A3\u338E\u338F\u339C\u339D\u339E\u33A1\u33C4\u33CE\u33D1\u33D2\u33D5\uFE30\uFFE2\uFFE4"],["a959","\u2121\u3231"],["a95c","\u2010"],["a960","\u30FC\u309B\u309C\u30FD\u30FE\u3006\u309D\u309E\uFE49",9,"\uFE54\uFE55\uFE56\uFE57\uFE59",8],["a980","\uFE62",4,"\uFE68\uFE69\uFE6A\uFE6B"],["a996","\u3007"],["a9a4","\u2500",75],["aa40","\u72DC\u72DD\u72DF\u72E2",5,"\u72EA\u72EB\u72F5\u72F6\u72F9\u72FD\u72FE\u72FF\u7300\u7302\u7304",5,"\u730B\u730C\u730D\u730F\u7310\u7311\u7312\u7314\u7318\u7319\u731A\u731F\u7320\u7323\u7324\u7326\u7327\u7328\u732D\u732F\u7330\u7332\u7333\u7335\u7336\u733A\u733B\u733C\u733D\u7340",8],["aa80","\u7349\u734A\u734B\u734C\u734E\u734F\u7351\u7353\u7354\u7355\u7356\u7358",7,"\u7361",10,"\u736E\u7370\u7371"],["ab40","\u7372",11,"\u737F",4,"\u7385\u7386\u7388\u738A\u738C\u738D\u738F\u7390\u7392\u7393\u7394\u7395\u7397\u7398\u7399\u739A\u739C\u739D\u739E\u73A0\u73A1\u73A3",5,"\u73AA\u73AC\u73AD\u73B1\u73B4\u73B5\u73B6\u73B8\u73B9\u73BC\u73BD\u73BE\u73BF\u73C1\u73C3",4],["ab80","\u73CB\u73CC\u73CE\u73D2",6,"\u73DA\u73DB\u73DC\u73DD\u73DF\u73E1\u73E2\u73E3\u73E4\u73E6\u73E8\u73EA\u73EB\u73EC\u73EE\u73EF\u73F0\u73F1\u73F3",4],["ac40","\u73F8",10,"\u7404\u7407\u7408\u740B\u740C\u740D\u740E\u7411",8,"\u741C",5,"\u7423\u7424\u7427\u7429\u742B\u742D\u742F\u7431\u7432\u7437",4,"\u743D\u743E\u743F\u7440\u7442",11],["ac80","\u744E",6,"\u7456\u7458\u745D\u7460",12,"\u746E\u746F\u7471",4,"\u7478\u7479\u747A"],["ad40","\u747B\u747C\u747D\u747F\u7482\u7484\u7485\u7486\u7488\u7489\u748A\u748C\u748D\u748F\u7491",10,"\u749D\u749F",7,"\u74AA",15,"\u74BB",12],["ad80","\u74C8",9,"\u74D3",8,"\u74DD\u74DF\u74E1\u74E5\u74E7",6,"\u74F0\u74F1\u74F2"],["ae40","\u74F3\u74F5\u74F8",6,"\u7500\u7501\u7502\u7503\u7505",7,"\u750E\u7510\u7512\u7514\u7515\u7516\u7517\u751B\u751D\u751E\u7520",4,"\u7526\u7527\u752A\u752E\u7534\u7536\u7539\u753C\u753D\u753F\u7541\u7542\u7543\u7544\u7546\u7547\u7549\u754A\u754D\u7550\u7551\u7552\u7553\u7555\u7556\u7557\u7558"],["ae80","\u755D",7,"\u7567\u7568\u7569\u756B",6,"\u7573\u7575\u7576\u7577\u757A",4,"\u7580\u7581\u7582\u7584\u7585\u7587"],["af40","\u7588\u7589\u758A\u758C\u758D\u758E\u7590\u7593\u7595\u7598\u759B\u759C\u759E\u75A2\u75A6",4,"\u75AD\u75B6\u75B7\u75BA\u75BB\u75BF\u75C0\u75C1\u75C6\u75CB\u75CC\u75CE\u75CF\u75D0\u75D1\u75D3\u75D7\u75D9\u75DA\u75DC\u75DD\u75DF\u75E0\u75E1\u75E5\u75E9\u75EC\u75ED\u75EE\u75EF\u75F2\u75F3\u75F5\u75F6\u75F7\u75F8\u75FA\u75FB\u75FD\u75FE\u7602\u7604\u7606\u7607"],["af80","\u7608\u7609\u760B\u760D\u760E\u760F\u7611\u7612\u7613\u7614\u7616\u761A\u761C\u761D\u761E\u7621\u7623\u7627\u7628\u762C\u762E\u762F\u7631\u7632\u7636\u7637\u7639\u763A\u763B\u763D\u7641\u7642\u7644"],["b040","\u7645",6,"\u764E",5,"\u7655\u7657",4,"\u765D\u765F\u7660\u7661\u7662\u7664",6,"\u766C\u766D\u766E\u7670",7,"\u7679\u767A\u767C\u767F\u7680\u7681\u7683\u7685\u7689\u768A\u768C\u768D\u768F\u7690\u7692\u7694\u7695\u7697\u7698\u769A\u769B"],["b080","\u769C",7,"\u76A5",8,"\u76AF\u76B0\u76B3\u76B5",9,"\u76C0\u76C1\u76C3\u554A\u963F\u57C3\u6328\u54CE\u5509\u54C0\u7691\u764C\u853C\u77EE\u827E\u788D\u7231\u9698\u978D\u6C28\u5B89\u4FFA\u6309\u6697\u5CB8\u80FA\u6848\u80AE\u6602\u76CE\u51F9\u6556\u71AC\u7FF1\u8884\u50B2\u5965\u61CA\u6FB3\u82AD\u634C\u6252\u53ED\u5427\u7B06\u516B\u75A4\u5DF4\u62D4\u8DCB\u9776\u628A\u8019\u575D\u9738\u7F62\u7238\u767D\u67CF\u767E\u6446\u4F70\u8D25\u62DC\u7A17\u6591\u73ED\u642C\u6273\u822C\u9881\u677F\u7248\u626E\u62CC\u4F34\u74E3\u534A\u529E\u7ECA\u90A6\u5E2E\u6886\u699C\u8180\u7ED1\u68D2\u78C5\u868C\u9551\u508D\u8C24\u82DE\u80DE\u5305\u8912\u5265"],["b140","\u76C4\u76C7\u76C9\u76CB\u76CC\u76D3\u76D5\u76D9\u76DA\u76DC\u76DD\u76DE\u76E0",4,"\u76E6",7,"\u76F0\u76F3\u76F5\u76F6\u76F7\u76FA\u76FB\u76FD\u76FF\u7700\u7702\u7703\u7705\u7706\u770A\u770C\u770E",10,"\u771B\u771C\u771D\u771E\u7721\u7723\u7724\u7725\u7727\u772A\u772B"],["b180","\u772C\u772E\u7730",4,"\u7739\u773B\u773D\u773E\u773F\u7742\u7744\u7745\u7746\u7748",7,"\u7752",7,"\u775C\u8584\u96F9\u4FDD\u5821\u9971\u5B9D\u62B1\u62A5\u66B4\u8C79\u9C8D\u7206\u676F\u7891\u60B2\u5351\u5317\u8F88\u80CC\u8D1D\u94A1\u500D\u72C8\u5907\u60EB\u7119\u88AB\u5954\u82EF\u672C\u7B28\u5D29\u7EF7\u752D\u6CF5\u8E66\u8FF8\u903C\u9F3B\u6BD4\u9119\u7B14\u5F7C\u78A7\u84D6\u853D\u6BD5\u6BD9\u6BD6\u5E01\u5E87\u75F9\u95ED\u655D\u5F0A\u5FC5\u8F9F\u58C1\u81C2\u907F\u965B\u97AD\u8FB9\u7F16\u8D2C\u6241\u4FBF\u53D8\u535E\u8FA8\u8FA9\u8FAB\u904D\u6807\u5F6A\u8198\u8868\u9CD6\u618B\u522B\u762A\u5F6C\u658C\u6FD2\u6EE8\u5BBE\u6448\u5175\u51B0\u67C4\u4E19\u79C9\u997C\u70B3"],["b240","\u775D\u775E\u775F\u7760\u7764\u7767\u7769\u776A\u776D",11,"\u777A\u777B\u777C\u7781\u7782\u7783\u7786",5,"\u778F\u7790\u7793",11,"\u77A1\u77A3\u77A4\u77A6\u77A8\u77AB\u77AD\u77AE\u77AF\u77B1\u77B2\u77B4\u77B6",4],["b280","\u77BC\u77BE\u77C0",12,"\u77CE",8,"\u77D8\u77D9\u77DA\u77DD",4,"\u77E4\u75C5\u5E76\u73BB\u83E0\u64AD\u62E8\u94B5\u6CE2\u535A\u52C3\u640F\u94C2\u7B94\u4F2F\u5E1B\u8236\u8116\u818A\u6E24\u6CCA\u9A73\u6355\u535C\u54FA\u8865\u57E0\u4E0D\u5E03\u6B65\u7C3F\u90E8\u6016\u64E6\u731C\u88C1\u6750\u624D\u8D22\u776C\u8E29\u91C7\u5F69\u83DC\u8521\u9910\u53C2\u8695\u6B8B\u60ED\u60E8\u707F\u82CD\u8231\u4ED3\u6CA7\u85CF\u64CD\u7CD9\u69FD\u66F9\u8349\u5395\u7B56\u4FA7\u518C\u6D4B\u5C42\u8E6D\u63D2\u53C9\u832C\u8336\u67E5\u78B4\u643D\u5BDF\u5C94\u5DEE\u8BE7\u62C6\u67F4\u8C7A\u6400\u63BA\u8749\u998B\u8C17\u7F20\u94F2\u4EA7\u9610\u98A4\u660C\u7316"],["b340","\u77E6\u77E8\u77EA\u77EF\u77F0\u77F1\u77F2\u77F4\u77F5\u77F7\u77F9\u77FA\u77FB\u77FC\u7803",5,"\u780A\u780B\u780E\u780F\u7810\u7813\u7815\u7819\u781B\u781E\u7820\u7821\u7822\u7824\u7828\u782A\u782B\u782E\u782F\u7831\u7832\u7833\u7835\u7836\u783D\u783F\u7841\u7842\u7843\u7844\u7846\u7848\u7849\u784A\u784B\u784D\u784F\u7851\u7853\u7854\u7858\u7859\u785A"],["b380","\u785B\u785C\u785E",11,"\u786F",7,"\u7878\u7879\u787A\u787B\u787D",6,"\u573A\u5C1D\u5E38\u957F\u507F\u80A0\u5382\u655E\u7545\u5531\u5021\u8D85\u6284\u949E\u671D\u5632\u6F6E\u5DE2\u5435\u7092\u8F66\u626F\u64A4\u63A3\u5F7B\u6F88\u90F4\u81E3\u8FB0\u5C18\u6668\u5FF1\u6C89\u9648\u8D81\u886C\u6491\u79F0\u57CE\u6A59\u6210\u5448\u4E58\u7A0B\u60E9\u6F84\u8BDA\u627F\u901E\u9A8B\u79E4\u5403\u75F4\u6301\u5319\u6C60\u8FDF\u5F1B\u9A70\u803B\u9F7F\u4F88\u5C3A\u8D64\u7FC5\u65A5\u70BD\u5145\u51B2\u866B\u5D07\u5BA0\u62BD\u916C\u7574\u8E0C\u7A20\u6101\u7B79\u4EC7\u7EF8\u7785\u4E11\u81ED\u521D\u51FA\u6A71\u53A8\u8E87\u9504\u96CF\u6EC1\u9664\u695A"],["b440","\u7884\u7885\u7886\u7888\u788A\u788B\u788F\u7890\u7892\u7894\u7895\u7896\u7899\u789D\u789E\u78A0\u78A2\u78A4\u78A6\u78A8",7,"\u78B5\u78B6\u78B7\u78B8\u78BA\u78BB\u78BC\u78BD\u78BF\u78C0\u78C2\u78C3\u78C4\u78C6\u78C7\u78C8\u78CC\u78CD\u78CE\u78CF\u78D1\u78D2\u78D3\u78D6\u78D7\u78D8\u78DA",9],["b480","\u78E4\u78E5\u78E6\u78E7\u78E9\u78EA\u78EB\u78ED",4,"\u78F3\u78F5\u78F6\u78F8\u78F9\u78FB",5,"\u7902\u7903\u7904\u7906",6,"\u7840\u50A8\u77D7\u6410\u89E6\u5904\u63E3\u5DDD\u7A7F\u693D\u4F20\u8239\u5598\u4E32\u75AE\u7A97\u5E62\u5E8A\u95EF\u521B\u5439\u708A\u6376\u9524\u5782\u6625\u693F\u9187\u5507\u6DF3\u7EAF\u8822\u6233\u7EF0\u75B5\u8328\u78C1\u96CC\u8F9E\u6148\u74F7\u8BCD\u6B64\u523A\u8D50\u6B21\u806A\u8471\u56F1\u5306\u4ECE\u4E1B\u51D1\u7C97\u918B\u7C07\u4FC3\u8E7F\u7BE1\u7A9C\u6467\u5D14\u50AC\u8106\u7601\u7CB9\u6DEC\u7FE0\u6751\u5B58\u5BF8\u78CB\u64AE\u6413\u63AA\u632B\u9519\u642D\u8FBE\u7B54\u7629\u6253\u5927\u5446\u6B79\u50A3\u6234\u5E26\u6B86\u4EE3\u8D37\u888B\u5F85\u902E"],["b540","\u790D",5,"\u7914",9,"\u791F",4,"\u7925",14,"\u7935",4,"\u793D\u793F\u7942\u7943\u7944\u7945\u7947\u794A",8,"\u7954\u7955\u7958\u7959\u7961\u7963"],["b580","\u7964\u7966\u7969\u796A\u796B\u796C\u796E\u7970",6,"\u7979\u797B",4,"\u7982\u7983\u7986\u7987\u7988\u7989\u798B\u798C\u798D\u798E\u7990\u7991\u7992\u6020\u803D\u62C5\u4E39\u5355\u90F8\u63B8\u80C6\u65E6\u6C2E\u4F46\u60EE\u6DE1\u8BDE\u5F39\u86CB\u5F53\u6321\u515A\u8361\u6863\u5200\u6363\u8E48\u5012\u5C9B\u7977\u5BFC\u5230\u7A3B\u60BC\u9053\u76D7\u5FB7\u5F97\u7684\u8E6C\u706F\u767B\u7B49\u77AA\u51F3\u9093\u5824\u4F4E\u6EF4\u8FEA\u654C\u7B1B\u72C4\u6DA4\u7FDF\u5AE1\u62B5\u5E95\u5730\u8482\u7B2C\u5E1D\u5F1F\u9012\u7F14\u98A0\u6382\u6EC7\u7898\u70B9\u5178\u975B\u57AB\u7535\u4F43\u7538\u5E97\u60E6\u5960\u6DC0\u6BBF\u7889\u53FC\u96D5\u51CB\u5201\u6389\u540A\u9493\u8C03\u8DCC\u7239\u789F\u8776\u8FED\u8C0D\u53E0"],["b640","\u7993",6,"\u799B",11,"\u79A8",10,"\u79B4",4,"\u79BC\u79BF\u79C2\u79C4\u79C5\u79C7\u79C8\u79CA\u79CC\u79CE\u79CF\u79D0\u79D3\u79D4\u79D6\u79D7\u79D9",5,"\u79E0\u79E1\u79E2\u79E5\u79E8\u79EA"],["b680","\u79EC\u79EE\u79F1",6,"\u79F9\u79FA\u79FC\u79FE\u79FF\u7A01\u7A04\u7A05\u7A07\u7A08\u7A09\u7A0A\u7A0C\u7A0F",4,"\u7A15\u7A16\u7A18\u7A19\u7A1B\u7A1C\u4E01\u76EF\u53EE\u9489\u9876\u9F0E\u952D\u5B9A\u8BA2\u4E22\u4E1C\u51AC\u8463\u61C2\u52A8\u680B\u4F97\u606B\u51BB\u6D1E\u515C\u6296\u6597\u9661\u8C46\u9017\u75D8\u90FD\u7763\u6BD2\u728A\u72EC\u8BFB\u5835\u7779\u8D4C\u675C\u9540\u809A\u5EA6\u6E21\u5992\u7AEF\u77ED\u953B\u6BB5\u65AD\u7F0E\u5806\u5151\u961F\u5BF9\u58A9\u5428\u8E72\u6566\u987F\u56E4\u949D\u76FE\u9041\u6387\u54C6\u591A\u593A\u579B\u8EB2\u6735\u8DFA\u8235\u5241\u60F0\u5815\u86FE\u5CE8\u9E45\u4FC4\u989D\u8BB9\u5A25\u6076\u5384\u627C\u904F\u9102\u997F\u6069\u800C\u513F\u8033\u5C14\u9975\u6D31\u4E8C"],["b740","\u7A1D\u7A1F\u7A21\u7A22\u7A24",14,"\u7A34\u7A35\u7A36\u7A38\u7A3A\u7A3E\u7A40",5,"\u7A47",9,"\u7A52",4,"\u7A58",16],["b780","\u7A69",6,"\u7A71\u7A72\u7A73\u7A75\u7A7B\u7A7C\u7A7D\u7A7E\u7A82\u7A85\u7A87\u7A89\u7A8A\u7A8B\u7A8C\u7A8E\u7A8F\u7A90\u7A93\u7A94\u7A99\u7A9A\u7A9B\u7A9E\u7AA1\u7AA2\u8D30\u53D1\u7F5A\u7B4F\u4F10\u4E4F\u9600\u6CD5\u73D0\u85E9\u5E06\u756A\u7FFB\u6A0A\u77FE\u9492\u7E41\u51E1\u70E6\u53CD\u8FD4\u8303\u8D29\u72AF\u996D\u6CDB\u574A\u82B3\u65B9\u80AA\u623F\u9632\u59A8\u4EFF\u8BBF\u7EBA\u653E\u83F2\u975E\u5561\u98DE\u80A5\u532A\u8BFD\u5420\u80BA\u5E9F\u6CB8\u8D39\u82AC\u915A\u5429\u6C1B\u5206\u7EB7\u575F\u711A\u6C7E\u7C89\u594B\u4EFD\u5FFF\u6124\u7CAA\u4E30\u5C01\u67AB\u8702\u5CF0\u950B\u98CE\u75AF\u70FD\u9022\u51AF\u7F1D\u8BBD\u5949\u51E4\u4F5B\u5426\u592B\u6577\u80A4\u5B75\u6276\u62C2\u8F90\u5E45\u6C1F\u7B26\u4F0F\u4FD8\u670D"],["b840","\u7AA3\u7AA4\u7AA7\u7AA9\u7AAA\u7AAB\u7AAE",4,"\u7AB4",10,"\u7AC0",10,"\u7ACC",9,"\u7AD7\u7AD8\u7ADA\u7ADB\u7ADC\u7ADD\u7AE1\u7AE2\u7AE4\u7AE7",5,"\u7AEE\u7AF0\u7AF1\u7AF2\u7AF3"],["b880","\u7AF4",4,"\u7AFB\u7AFC\u7AFE\u7B00\u7B01\u7B02\u7B05\u7B07\u7B09\u7B0C\u7B0D\u7B0E\u7B10\u7B12\u7B13\u7B16\u7B17\u7B18\u7B1A\u7B1C\u7B1D\u7B1F\u7B21\u7B22\u7B23\u7B27\u7B29\u7B2D\u6D6E\u6DAA\u798F\u88B1\u5F17\u752B\u629A\u8F85\u4FEF\u91DC\u65A7\u812F\u8151\u5E9C\u8150\u8D74\u526F\u8986\u8D4B\u590D\u5085\u4ED8\u961C\u7236\u8179\u8D1F\u5BCC\u8BA3\u9644\u5987\u7F1A\u5490\u5676\u560E\u8BE5\u6539\u6982\u9499\u76D6\u6E89\u5E72\u7518\u6746\u67D1\u7AFF\u809D\u8D76\u611F\u79C6\u6562\u8D63\u5188\u521A\u94A2\u7F38\u809B\u7EB2\u5C97\u6E2F\u6760\u7BD9\u768B\u9AD8\u818F\u7F94\u7CD5\u641E\u9550\u7A3F\u544A\u54E5\u6B4C\u6401\u6208\u9E3D\u80F3\u7599\u5272\u9769\u845B\u683C\u86E4\u9601\u9694\u94EC\u4E2A\u5404\u7ED9\u6839\u8DDF\u8015\u66F4\u5E9A\u7FB9"],["b940","\u7B2F\u7B30\u7B32\u7B34\u7B35\u7B36\u7B37\u7B39\u7B3B\u7B3D\u7B3F",5,"\u7B46\u7B48\u7B4A\u7B4D\u7B4E\u7B53\u7B55\u7B57\u7B59\u7B5C\u7B5E\u7B5F\u7B61\u7B63",10,"\u7B6F\u7B70\u7B73\u7B74\u7B76\u7B78\u7B7A\u7B7C\u7B7D\u7B7F\u7B81\u7B82\u7B83\u7B84\u7B86",6,"\u7B8E\u7B8F"],["b980","\u7B91\u7B92\u7B93\u7B96\u7B98\u7B99\u7B9A\u7B9B\u7B9E\u7B9F\u7BA0\u7BA3\u7BA4\u7BA5\u7BAE\u7BAF\u7BB0\u7BB2\u7BB3\u7BB5\u7BB6\u7BB7\u7BB9",7,"\u7BC2\u7BC3\u7BC4\u57C2\u803F\u6897\u5DE5\u653B\u529F\u606D\u9F9A\u4F9B\u8EAC\u516C\u5BAB\u5F13\u5DE9\u6C5E\u62F1\u8D21\u5171\u94A9\u52FE\u6C9F\u82DF\u72D7\u57A2\u6784\u8D2D\u591F\u8F9C\u83C7\u5495\u7B8D\u4F30\u6CBD\u5B64\u59D1\u9F13\u53E4\u86CA\u9AA8\u8C37\u80A1\u6545\u987E\u56FA\u96C7\u522E\u74DC\u5250\u5BE1\u6302\u8902\u4E56\u62D0\u602A\u68FA\u5173\u5B98\u51A0\u89C2\u7BA1\u9986\u7F50\u60EF\u704C\u8D2F\u5149\u5E7F\u901B\u7470\u89C4\u572D\u7845\u5F52\u9F9F\u95FA\u8F68\u9B3C\u8BE1\u7678\u6842\u67DC\u8DEA\u8D35\u523D\u8F8A\u6EDA\u68CD\u9505\u90ED\u56FD\u679C\u88F9\u8FC7\u54C8"],["ba40","\u7BC5\u7BC8\u7BC9\u7BCA\u7BCB\u7BCD\u7BCE\u7BCF\u7BD0\u7BD2\u7BD4",4,"\u7BDB\u7BDC\u7BDE\u7BDF\u7BE0\u7BE2\u7BE3\u7BE4\u7BE7\u7BE8\u7BE9\u7BEB\u7BEC\u7BED\u7BEF\u7BF0\u7BF2",4,"\u7BF8\u7BF9\u7BFA\u7BFB\u7BFD\u7BFF",7,"\u7C08\u7C09\u7C0A\u7C0D\u7C0E\u7C10",5,"\u7C17\u7C18\u7C19"],["ba80","\u7C1A",4,"\u7C20",5,"\u7C28\u7C29\u7C2B",12,"\u7C39",5,"\u7C42\u9AB8\u5B69\u6D77\u6C26\u4EA5\u5BB3\u9A87\u9163\u61A8\u90AF\u97E9\u542B\u6DB5\u5BD2\u51FD\u558A\u7F55\u7FF0\u64BC\u634D\u65F1\u61BE\u608D\u710A\u6C57\u6C49\u592F\u676D\u822A\u58D5\u568E\u8C6A\u6BEB\u90DD\u597D\u8017\u53F7\u6D69\u5475\u559D\u8377\u83CF\u6838\u79BE\u548C\u4F55\u5408\u76D2\u8C89\u9602\u6CB3\u6DB8\u8D6B\u8910\u9E64\u8D3A\u563F\u9ED1\u75D5\u5F88\u72E0\u6068\u54FC\u4EA8\u6A2A\u8861\u6052\u8F70\u54C4\u70D8\u8679\u9E3F\u6D2A\u5B8F\u5F18\u7EA2\u5589\u4FAF\u7334\u543C\u539A\u5019\u540E\u547C\u4E4E\u5FFD\u745A\u58F6\u846B\u80E1\u8774\u72D0\u7CCA\u6E56"],["bb40","\u7C43",9,"\u7C4E",36,"\u7C75",5,"\u7C7E",9],["bb80","\u7C88\u7C8A",6,"\u7C93\u7C94\u7C96\u7C99\u7C9A\u7C9B\u7CA0\u7CA1\u7CA3\u7CA6\u7CA7\u7CA8\u7CA9\u7CAB\u7CAC\u7CAD\u7CAF\u7CB0\u7CB4",4,"\u7CBA\u7CBB\u5F27\u864E\u552C\u62A4\u4E92\u6CAA\u6237\u82B1\u54D7\u534E\u733E\u6ED1\u753B\u5212\u5316\u8BDD\u69D0\u5F8A\u6000\u6DEE\u574F\u6B22\u73AF\u6853\u8FD8\u7F13\u6362\u60A3\u5524\u75EA\u8C62\u7115\u6DA3\u5BA6\u5E7B\u8352\u614C\u9EC4\u78FA\u8757\u7C27\u7687\u51F0\u60F6\u714C\u6643\u5E4C\u604D\u8C0E\u7070\u6325\u8F89\u5FBD\u6062\u86D4\u56DE\u6BC1\u6094\u6167\u5349\u60E0\u6666\u8D3F\u79FD\u4F1A\u70E9\u6C47\u8BB3\u8BF2\u7ED8\u8364\u660F\u5A5A\u9B42\u6D51\u6DF7\u8C41\u6D3B\u4F19\u706B\u83B7\u6216\u60D1\u970D\u8D27\u7978\u51FB\u573E\u57FA\u673A\u7578\u7A3D\u79EF\u7B95"],["bc40","\u7CBF\u7CC0\u7CC2\u7CC3\u7CC4\u7CC6\u7CC9\u7CCB\u7CCE",6,"\u7CD8\u7CDA\u7CDB\u7CDD\u7CDE\u7CE1",6,"\u7CE9",5,"\u7CF0",7,"\u7CF9\u7CFA\u7CFC",13,"\u7D0B",5],["bc80","\u7D11",14,"\u7D21\u7D23\u7D24\u7D25\u7D26\u7D28\u7D29\u7D2A\u7D2C\u7D2D\u7D2E\u7D30",6,"\u808C\u9965\u8FF9\u6FC0\u8BA5\u9E21\u59EC\u7EE9\u7F09\u5409\u6781\u68D8\u8F91\u7C4D\u96C6\u53CA\u6025\u75BE\u6C72\u5373\u5AC9\u7EA7\u6324\u51E0\u810A\u5DF1\u84DF\u6280\u5180\u5B63\u4F0E\u796D\u5242\u60B8\u6D4E\u5BC4\u5BC2\u8BA1\u8BB0\u65E2\u5FCC\u9645\u5993\u7EE7\u7EAA\u5609\u67B7\u5939\u4F73\u5BB6\u52A0\u835A\u988A\u8D3E\u7532\u94BE\u5047\u7A3C\u4EF7\u67B6\u9A7E\u5AC1\u6B7C\u76D1\u575A\u5C16\u7B3A\u95F4\u714E\u517C\u80A9\u8270\u5978\u7F04\u8327\u68C0\u67EC\u78B1\u7877\u62E3\u6361\u7B80\u4FED\u526A\u51CF\u8350\u69DB\u9274\u8DF5\u8D31\u89C1\u952E\u7BAD\u4EF6"],["bd40","\u7D37",54,"\u7D6F",7],["bd80","\u7D78",32,"\u5065\u8230\u5251\u996F\u6E10\u6E85\u6DA7\u5EFA\u50F5\u59DC\u5C06\u6D46\u6C5F\u7586\u848B\u6868\u5956\u8BB2\u5320\u9171\u964D\u8549\u6912\u7901\u7126\u80F6\u4EA4\u90CA\u6D47\u9A84\u5A07\u56BC\u6405\u94F0\u77EB\u4FA5\u811A\u72E1\u89D2\u997A\u7F34\u7EDE\u527F\u6559\u9175\u8F7F\u8F83\u53EB\u7A96\u63ED\u63A5\u7686\u79F8\u8857\u9636\u622A\u52AB\u8282\u6854\u6770\u6377\u776B\u7AED\u6D01\u7ED3\u89E3\u59D0\u6212\u85C9\u82A5\u754C\u501F\u4ECB\u75A5\u8BEB\u5C4A\u5DFE\u7B4B\u65A4\u91D1\u4ECA\u6D25\u895F\u7D27\u9526\u4EC5\u8C28\u8FDB\u9773\u664B\u7981\u8FD1\u70EC\u6D78"],["be40","\u7D99",12,"\u7DA7",6,"\u7DAF",42],["be80","\u7DDA",32,"\u5C3D\u52B2\u8346\u5162\u830E\u775B\u6676\u9CB8\u4EAC\u60CA\u7CBE\u7CB3\u7ECF\u4E95\u8B66\u666F\u9888\u9759\u5883\u656C\u955C\u5F84\u75C9\u9756\u7ADF\u7ADE\u51C0\u70AF\u7A98\u63EA\u7A76\u7EA0\u7396\u97ED\u4E45\u7078\u4E5D\u9152\u53A9\u6551\u65E7\u81FC\u8205\u548E\u5C31\u759A\u97A0\u62D8\u72D9\u75BD\u5C45\u9A79\u83CA\u5C40\u5480\u77E9\u4E3E\u6CAE\u805A\u62D2\u636E\u5DE8\u5177\u8DDD\u8E1E\u952F\u4FF1\u53E5\u60E7\u70AC\u5267\u6350\u9E43\u5A1F\u5026\u7737\u5377\u7EE2\u6485\u652B\u6289\u6398\u5014\u7235\u89C9\u51B3\u8BC0\u7EDD\u5747\u83CC\u94A7\u519B\u541B\u5CFB"],["bf40","\u7DFB",62],["bf80","\u7E3A\u7E3C",4,"\u7E42",4,"\u7E48",21,"\u4FCA\u7AE3\u6D5A\u90E1\u9A8F\u5580\u5496\u5361\u54AF\u5F00\u63E9\u6977\u51EF\u6168\u520A\u582A\u52D8\u574E\u780D\u770B\u5EB7\u6177\u7CE0\u625B\u6297\u4EA2\u7095\u8003\u62F7\u70E4\u9760\u5777\u82DB\u67EF\u68F5\u78D5\u9897\u79D1\u58F3\u54B3\u53EF\u6E34\u514B\u523B\u5BA2\u8BFE\u80AF\u5543\u57A6\u6073\u5751\u542D\u7A7A\u6050\u5B54\u63A7\u62A0\u53E3\u6263\u5BC7\u67AF\u54ED\u7A9F\u82E6\u9177\u5E93\u88E4\u5938\u57AE\u630E\u8DE8\u80EF\u5757\u7B77\u4FA9\u5FEB\u5BBD\u6B3E\u5321\u7B50\u72C2\u6846\u77FF\u7736\u65F7\u51B5\u4E8F\u76D4\u5CBF\u7AA5\u8475\u594E\u9B41\u5080"],["c040","\u7E5E",35,"\u7E83",23,"\u7E9C\u7E9D\u7E9E"],["c080","\u7EAE\u7EB4\u7EBB\u7EBC\u7ED6\u7EE4\u7EEC\u7EF9\u7F0A\u7F10\u7F1E\u7F37\u7F39\u7F3B",6,"\u7F43\u7F46",9,"\u7F52\u7F53\u9988\u6127\u6E83\u5764\u6606\u6346\u56F0\u62EC\u6269\u5ED3\u9614\u5783\u62C9\u5587\u8721\u814A\u8FA3\u5566\u83B1\u6765\u8D56\u84DD\u5A6A\u680F\u62E6\u7BEE\u9611\u5170\u6F9C\u8C30\u63FD\u89C8\u61D2\u7F06\u70C2\u6EE5\u7405\u6994\u72FC\u5ECA\u90CE\u6717\u6D6A\u635E\u52B3\u7262\u8001\u4F6C\u59E5\u916A\u70D9\u6D9D\u52D2\u4E50\u96F7\u956D\u857E\u78CA\u7D2F\u5121\u5792\u64C2\u808B\u7C7B\u6CEA\u68F1\u695E\u51B7\u5398\u68A8\u7281\u9ECE\u7BF1\u72F8\u79BB\u6F13\u7406\u674E\u91CC\u9CA4\u793C\u8389\u8354\u540F\u6817\u4E3D\u5389\u52B1\u783E\u5386\u5229\u5088\u4F8B\u4FD0"],["c140","\u7F56\u7F59\u7F5B\u7F5C\u7F5D\u7F5E\u7F60\u7F63",4,"\u7F6B\u7F6C\u7F6D\u7F6F\u7F70\u7F73\u7F75\u7F76\u7F77\u7F78\u7F7A\u7F7B\u7F7C\u7F7D\u7F7F\u7F80\u7F82",7,"\u7F8B\u7F8D\u7F8F",4,"\u7F95",4,"\u7F9B\u7F9C\u7FA0\u7FA2\u7FA3\u7FA5\u7FA6\u7FA8",6,"\u7FB1"],["c180","\u7FB3",4,"\u7FBA\u7FBB\u7FBE\u7FC0\u7FC2\u7FC3\u7FC4\u7FC6\u7FC7\u7FC8\u7FC9\u7FCB\u7FCD\u7FCF",4,"\u7FD6\u7FD7\u7FD9",5,"\u7FE2\u7FE3\u75E2\u7ACB\u7C92\u6CA5\u96B6\u529B\u7483\u54E9\u4FE9\u8054\u83B2\u8FDE\u9570\u5EC9\u601C\u6D9F\u5E18\u655B\u8138\u94FE\u604B\u70BC\u7EC3\u7CAE\u51C9\u6881\u7CB1\u826F\u4E24\u8F86\u91CF\u667E\u4EAE\u8C05\u64A9\u804A\u50DA\u7597\u71CE\u5BE5\u8FBD\u6F66\u4E86\u6482\u9563\u5ED6\u6599\u5217\u88C2\u70C8\u52A3\u730E\u7433\u6797\u78F7\u9716\u4E34\u90BB\u9CDE\u6DCB\u51DB\u8D41\u541D\u62CE\u73B2\u83F1\u96F6\u9F84\u94C3\u4F36\u7F9A\u51CC\u7075\u9675\u5CAD\u9886\u53E6\u4EE4\u6E9C\u7409\u69B4\u786B\u998F\u7559\u5218\u7624\u6D41\u67F3\u516D\u9F99\u804B\u5499\u7B3C\u7ABF"],["c240","\u7FE4\u7FE7\u7FE8\u7FEA\u7FEB\u7FEC\u7FED\u7FEF\u7FF2\u7FF4",6,"\u7FFD\u7FFE\u7FFF\u8002\u8007\u8008\u8009\u800A\u800E\u800F\u8011\u8013\u801A\u801B\u801D\u801E\u801F\u8021\u8023\u8024\u802B",5,"\u8032\u8034\u8039\u803A\u803C\u803E\u8040\u8041\u8044\u8045\u8047\u8048\u8049\u804E\u804F\u8050\u8051\u8053\u8055\u8056\u8057"],["c280","\u8059\u805B",13,"\u806B",5,"\u8072",11,"\u9686\u5784\u62E2\u9647\u697C\u5A04\u6402\u7BD3\u6F0F\u964B\u82A6\u5362\u9885\u5E90\u7089\u63B3\u5364\u864F\u9C81\u9E93\u788C\u9732\u8DEF\u8D42\u9E7F\u6F5E\u7984\u5F55\u9646\u622E\u9A74\u5415\u94DD\u4FA3\u65C5\u5C65\u5C61\u7F15\u8651\u6C2F\u5F8B\u7387\u6EE4\u7EFF\u5CE6\u631B\u5B6A\u6EE6\u5375\u4E71\u63A0\u7565\u62A1\u8F6E\u4F26\u4ED1\u6CA6\u7EB6\u8BBA\u841D\u87BA\u7F57\u903B\u9523\u7BA9\u9AA1\u88F8\u843D\u6D1B\u9A86\u7EDC\u5988\u9EBB\u739B\u7801\u8682\u9A6C\u9A82\u561B\u5417\u57CB\u4E70\u9EA6\u5356\u8FC8\u8109\u7792\u9992\u86EE\u6EE1\u8513\u66FC\u6162\u6F2B"],["c340","\u807E\u8081\u8082\u8085\u8088\u808A\u808D",5,"\u8094\u8095\u8097\u8099\u809E\u80A3\u80A6\u80A7\u80A8\u80AC\u80B0\u80B3\u80B5\u80B6\u80B8\u80B9\u80BB\u80C5\u80C7",4,"\u80CF",6,"\u80D8\u80DF\u80E0\u80E2\u80E3\u80E6\u80EE\u80F5\u80F7\u80F9\u80FB\u80FE\u80FF\u8100\u8101\u8103\u8104\u8105\u8107\u8108\u810B"],["c380","\u810C\u8115\u8117\u8119\u811B\u811C\u811D\u811F",12,"\u812D\u812E\u8130\u8133\u8134\u8135\u8137\u8139",4,"\u813F\u8C29\u8292\u832B\u76F2\u6C13\u5FD9\u83BD\u732B\u8305\u951A\u6BDB\u77DB\u94C6\u536F\u8302\u5192\u5E3D\u8C8C\u8D38\u4E48\u73AB\u679A\u6885\u9176\u9709\u7164\u6CA1\u7709\u5A92\u9541\u6BCF\u7F8E\u6627\u5BD0\u59B9\u5A9A\u95E8\u95F7\u4EEC\u840C\u8499\u6AAC\u76DF\u9530\u731B\u68A6\u5B5F\u772F\u919A\u9761\u7CDC\u8FF7\u8C1C\u5F25\u7C73\u79D8\u89C5\u6CCC\u871C\u5BC6\u5E42\u68C9\u7720\u7EF5\u5195\u514D\u52C9\u5A29\u7F05\u9762\u82D7\u63CF\u7784\u85D0\u79D2\u6E3A\u5E99\u5999\u8511\u706D\u6C11\u62BF\u76BF\u654F\u60AF\u95FD\u660E\u879F\u9E23\u94ED\u540D\u547D\u8C2C\u6478"],["c440","\u8140",5,"\u8147\u8149\u814D\u814E\u814F\u8152\u8156\u8157\u8158\u815B",4,"\u8161\u8162\u8163\u8164\u8166\u8168\u816A\u816B\u816C\u816F\u8172\u8173\u8175\u8176\u8177\u8178\u8181\u8183",4,"\u8189\u818B\u818C\u818D\u818E\u8190\u8192",5,"\u8199\u819A\u819E",4,"\u81A4\u81A5"],["c480","\u81A7\u81A9\u81AB",7,"\u81B4",5,"\u81BC\u81BD\u81BE\u81BF\u81C4\u81C5\u81C7\u81C8\u81C9\u81CB\u81CD",6,"\u6479\u8611\u6A21\u819C\u78E8\u6469\u9B54\u62B9\u672B\u83AB\u58A8\u9ED8\u6CAB\u6F20\u5BDE\u964C\u8C0B\u725F\u67D0\u62C7\u7261\u4EA9\u59C6\u6BCD\u5893\u66AE\u5E55\u52DF\u6155\u6728\u76EE\u7766\u7267\u7A46\u62FF\u54EA\u5450\u94A0\u90A3\u5A1C\u7EB3\u6C16\u4E43\u5976\u8010\u5948\u5357\u7537\u96BE\u56CA\u6320\u8111\u607C\u95F9\u6DD6\u5462\u9981\u5185\u5AE9\u80FD\u59AE\u9713\u502A\u6CE5\u5C3C\u62DF\u4F60\u533F\u817B\u9006\u6EBA\u852B\u62C8\u5E74\u78BE\u64B5\u637B\u5FF5\u5A18\u917F\u9E1F\u5C3F\u634F\u8042\u5B7D\u556E\u954A\u954D\u6D85\u60A8\u67E0\u72DE\u51DD\u5B81"],["c540","\u81D4",14,"\u81E4\u81E5\u81E6\u81E8\u81E9\u81EB\u81EE",4,"\u81F5",5,"\u81FD\u81FF\u8203\u8207",4,"\u820E\u820F\u8211\u8213\u8215",5,"\u821D\u8220\u8224\u8225\u8226\u8227\u8229\u822E\u8232\u823A\u823C\u823D\u823F"],["c580","\u8240\u8241\u8242\u8243\u8245\u8246\u8248\u824A\u824C\u824D\u824E\u8250",7,"\u8259\u825B\u825C\u825D\u825E\u8260",7,"\u8269\u62E7\u6CDE\u725B\u626D\u94AE\u7EBD\u8113\u6D53\u519C\u5F04\u5974\u52AA\u6012\u5973\u6696\u8650\u759F\u632A\u61E6\u7CEF\u8BFA\u54E6\u6B27\u9E25\u6BB4\u85D5\u5455\u5076\u6CA4\u556A\u8DB4\u722C\u5E15\u6015\u7436\u62CD\u6392\u724C\u5F98\u6E43\u6D3E\u6500\u6F58\u76D8\u78D0\u76FC\u7554\u5224\u53DB\u4E53\u5E9E\u65C1\u802A\u80D6\u629B\u5486\u5228\u70AE\u888D\u8DD1\u6CE1\u5478\u80DA\u57F9\u88F4\u8D54\u966A\u914D\u4F69\u6C9B\u55B7\u76C6\u7830\u62A8\u70F9\u6F8E\u5F6D\u84EC\u68DA\u787C\u7BF7\u81A8\u670B\u9E4F\u6367\u78B0\u576F\u7812\u9739\u6279\u62AB\u5288\u7435\u6BD7"],["c640","\u826A\u826B\u826C\u826D\u8271\u8275\u8276\u8277\u8278\u827B\u827C\u8280\u8281\u8283\u8285\u8286\u8287\u8289\u828C\u8290\u8293\u8294\u8295\u8296\u829A\u829B\u829E\u82A0\u82A2\u82A3\u82A7\u82B2\u82B5\u82B6\u82BA\u82BB\u82BC\u82BF\u82C0\u82C2\u82C3\u82C5\u82C6\u82C9\u82D0\u82D6\u82D9\u82DA\u82DD\u82E2\u82E7\u82E8\u82E9\u82EA\u82EC\u82ED\u82EE\u82F0\u82F2\u82F3\u82F5\u82F6\u82F8"],["c680","\u82FA\u82FC",4,"\u830A\u830B\u830D\u8310\u8312\u8313\u8316\u8318\u8319\u831D",9,"\u8329\u832A\u832E\u8330\u8332\u8337\u833B\u833D\u5564\u813E\u75B2\u76AE\u5339\u75DE\u50FB\u5C41\u8B6C\u7BC7\u504F\u7247\u9A97\u98D8\u6F02\u74E2\u7968\u6487\u77A5\u62FC\u9891\u8D2B\u54C1\u8058\u4E52\u576A\u82F9\u840D\u5E73\u51ED\u74F6\u8BC4\u5C4F\u5761\u6CFC\u9887\u5A46\u7834\u9B44\u8FEB\u7C95\u5256\u6251\u94FA\u4EC6\u8386\u8461\u83E9\u84B2\u57D4\u6734\u5703\u666E\u6D66\u8C31\u66DD\u7011\u671F\u6B3A\u6816\u621A\u59BB\u4E03\u51C4\u6F06\u67D2\u6C8F\u5176\u68CB\u5947\u6B67\u7566\u5D0E\u8110\u9F50\u65D7\u7948\u7941\u9A91\u8D77\u5C82\u4E5E\u4F01\u542F\u5951\u780C\u5668\u6C14\u8FC4\u5F03\u6C7D\u6CE3\u8BAB\u6390"],["c740","\u833E\u833F\u8341\u8342\u8344\u8345\u8348\u834A",4,"\u8353\u8355",4,"\u835D\u8362\u8370",6,"\u8379\u837A\u837E",6,"\u8387\u8388\u838A\u838B\u838C\u838D\u838F\u8390\u8391\u8394\u8395\u8396\u8397\u8399\u839A\u839D\u839F\u83A1",6,"\u83AC\u83AD\u83AE"],["c780","\u83AF\u83B5\u83BB\u83BE\u83BF\u83C2\u83C3\u83C4\u83C6\u83C8\u83C9\u83CB\u83CD\u83CE\u83D0\u83D1\u83D2\u83D3\u83D5\u83D7\u83D9\u83DA\u83DB\u83DE\u83E2\u83E3\u83E4\u83E6\u83E7\u83E8\u83EB\u83EC\u83ED\u6070\u6D3D\u7275\u6266\u948E\u94C5\u5343\u8FC1\u7B7E\u4EDF\u8C26\u4E7E\u9ED4\u94B1\u94B3\u524D\u6F5C\u9063\u6D45\u8C34\u5811\u5D4C\u6B20\u6B49\u67AA\u545B\u8154\u7F8C\u5899\u8537\u5F3A\u62A2\u6A47\u9539\u6572\u6084\u6865\u77A7\u4E54\u4FA8\u5DE7\u9798\u64AC\u7FD8\u5CED\u4FCF\u7A8D\u5207\u8304\u4E14\u602F\u7A83\u94A6\u4FB5\u4EB2\u79E6\u7434\u52E4\u82B9\u64D2\u79BD\u5BDD\u6C81\u9752\u8F7B\u6C22\u503E\u537F\u6E05\u64CE\u6674\u6C30\u60C5\u9877\u8BF7\u5E86\u743C\u7A77\u79CB\u4E18\u90B1\u7403\u6C42\u56DA\u914B\u6CC5\u8D8B\u533A\u86C6\u66F2\u8EAF\u5C48\u9A71\u6E20"],["c840","\u83EE\u83EF\u83F3",4,"\u83FA\u83FB\u83FC\u83FE\u83FF\u8400\u8402\u8405\u8407\u8408\u8409\u840A\u8410\u8412",5,"\u8419\u841A\u841B\u841E",5,"\u8429",7,"\u8432",5,"\u8439\u843A\u843B\u843E",7,"\u8447\u8448\u8449"],["c880","\u844A",6,"\u8452",4,"\u8458\u845D\u845E\u845F\u8460\u8462\u8464",4,"\u846A\u846E\u846F\u8470\u8472\u8474\u8477\u8479\u847B\u847C\u53D6\u5A36\u9F8B\u8DA3\u53BB\u5708\u98A7\u6743\u919B\u6CC9\u5168\u75CA\u62F3\u72AC\u5238\u529D\u7F3A\u7094\u7638\u5374\u9E4A\u69B7\u786E\u96C0\u88D9\u7FA4\u7136\u71C3\u5189\u67D3\u74E4\u58E4\u6518\u56B7\u8BA9\u9976\u6270\u7ED5\u60F9\u70ED\u58EC\u4EC1\u4EBA\u5FCD\u97E7\u4EFB\u8BA4\u5203\u598A\u7EAB\u6254\u4ECD\u65E5\u620E\u8338\u84C9\u8363\u878D\u7194\u6EB6\u5BB9\u7ED2\u5197\u63C9\u67D4\u8089\u8339\u8815\u5112\u5B7A\u5982\u8FB1\u4E73\u6C5D\u5165\u8925\u8F6F\u962E\u854A\u745E\u9510\u95F0\u6DA6\u82E5\u5F31\u6492\u6D12\u8428\u816E\u9CC3\u585E\u8D5B\u4E09\u53C1"],["c940","\u847D",4,"\u8483\u8484\u8485\u8486\u848A\u848D\u848F",7,"\u8498\u849A\u849B\u849D\u849E\u849F\u84A0\u84A2",12,"\u84B0\u84B1\u84B3\u84B5\u84B6\u84B7\u84BB\u84BC\u84BE\u84C0\u84C2\u84C3\u84C5\u84C6\u84C7\u84C8\u84CB\u84CC\u84CE\u84CF\u84D2\u84D4\u84D5\u84D7"],["c980","\u84D8",4,"\u84DE\u84E1\u84E2\u84E4\u84E7",4,"\u84ED\u84EE\u84EF\u84F1",10,"\u84FD\u84FE\u8500\u8501\u8502\u4F1E\u6563\u6851\u55D3\u4E27\u6414\u9A9A\u626B\u5AC2\u745F\u8272\u6DA9\u68EE\u50E7\u838E\u7802\u6740\u5239\u6C99\u7EB1\u50BB\u5565\u715E\u7B5B\u6652\u73CA\u82EB\u6749\u5C71\u5220\u717D\u886B\u95EA\u9655\u64C5\u8D61\u81B3\u5584\u6C55\u6247\u7F2E\u5892\u4F24\u5546\u8D4F\u664C\u4E0A\u5C1A\u88F3\u68A2\u634E\u7A0D\u70E7\u828D\u52FA\u97F6\u5C11\u54E8\u90B5\u7ECD\u5962\u8D4A\u86C7\u820C\u820D\u8D66\u6444\u5C04\u6151\u6D89\u793E\u8BBE\u7837\u7533\u547B\u4F38\u8EAB\u6DF1\u5A20\u7EC5\u795E\u6C88\u5BA1\u5A76\u751A\u80BE\u614E\u6E17\u58F0\u751F\u7525\u7272\u5347\u7EF3"],["ca40","\u8503",8,"\u850D\u850E\u850F\u8510\u8512\u8514\u8515\u8516\u8518\u8519\u851B\u851C\u851D\u851E\u8520\u8522",8,"\u852D",9,"\u853E",4,"\u8544\u8545\u8546\u8547\u854B",10],["ca80","\u8557\u8558\u855A\u855B\u855C\u855D\u855F",4,"\u8565\u8566\u8567\u8569",8,"\u8573\u8575\u8576\u8577\u8578\u857C\u857D\u857F\u8580\u8581\u7701\u76DB\u5269\u80DC\u5723\u5E08\u5931\u72EE\u65BD\u6E7F\u8BD7\u5C38\u8671\u5341\u77F3\u62FE\u65F6\u4EC0\u98DF\u8680\u5B9E\u8BC6\u53F2\u77E2\u4F7F\u5C4E\u9A76\u59CB\u5F0F\u793A\u58EB\u4E16\u67FF\u4E8B\u62ED\u8A93\u901D\u52BF\u662F\u55DC\u566C\u9002\u4ED5\u4F8D\u91CA\u9970\u6C0F\u5E02\u6043\u5BA4\u89C6\u8BD5\u6536\u624B\u9996\u5B88\u5BFF\u6388\u552E\u53D7\u7626\u517D\u852C\u67A2\u68B3\u6B8A\u6292\u8F93\u53D4\u8212\u6DD1\u758F\u4E66\u8D4E\u5B70\u719F\u85AF\u6691\u66D9\u7F72\u8700\u9ECD\u9F20\u5C5E\u672F\u8FF0\u6811\u675F\u620D\u7AD6\u5885\u5EB6\u6570\u6F31"],["cb40","\u8582\u8583\u8586\u8588",6,"\u8590",10,"\u859D",6,"\u85A5\u85A6\u85A7\u85A9\u85AB\u85AC\u85AD\u85B1",5,"\u85B8\u85BA",6,"\u85C2",6,"\u85CA",4,"\u85D1\u85D2"],["cb80","\u85D4\u85D6",5,"\u85DD",6,"\u85E5\u85E6\u85E7\u85E8\u85EA",14,"\u6055\u5237\u800D\u6454\u8870\u7529\u5E05\u6813\u62F4\u971C\u53CC\u723D\u8C01\u6C34\u7761\u7A0E\u542E\u77AC\u987A\u821C\u8BF4\u7855\u6714\u70C1\u65AF\u6495\u5636\u601D\u79C1\u53F8\u4E1D\u6B7B\u8086\u5BFA\u55E3\u56DB\u4F3A\u4F3C\u9972\u5DF3\u677E\u8038\u6002\u9882\u9001\u5B8B\u8BBC\u8BF5\u641C\u8258\u64DE\u55FD\u82CF\u9165\u4FD7\u7D20\u901F\u7C9F\u50F3\u5851\u6EAF\u5BBF\u8BC9\u8083\u9178\u849C\u7B97\u867D\u968B\u968F\u7EE5\u9AD3\u788E\u5C81\u7A57\u9042\u96A7\u795F\u5B59\u635F\u7B0B\u84D1\u68AD\u5506\u7F29\u7410\u7D22\u9501\u6240\u584C\u4ED6\u5B83\u5979\u5854"],["cc40","\u85F9\u85FA\u85FC\u85FD\u85FE\u8600",4,"\u8606",10,"\u8612\u8613\u8614\u8615\u8617",15,"\u8628\u862A",13,"\u8639\u863A\u863B\u863D\u863E\u863F\u8640"],["cc80","\u8641",11,"\u8652\u8653\u8655",4,"\u865B\u865C\u865D\u865F\u8660\u8661\u8663",7,"\u736D\u631E\u8E4B\u8E0F\u80CE\u82D4\u62AC\u53F0\u6CF0\u915E\u592A\u6001\u6C70\u574D\u644A\u8D2A\u762B\u6EE9\u575B\u6A80\u75F0\u6F6D\u8C2D\u8C08\u5766\u6BEF\u8892\u78B3\u63A2\u53F9\u70AD\u6C64\u5858\u642A\u5802\u68E0\u819B\u5510\u7CD6\u5018\u8EBA\u6DCC\u8D9F\u70EB\u638F\u6D9B\u6ED4\u7EE6\u8404\u6843\u9003\u6DD8\u9676\u8BA8\u5957\u7279\u85E4\u817E\u75BC\u8A8A\u68AF\u5254\u8E22\u9511\u63D0\u9898\u8E44\u557C\u4F53\u66FF\u568F\u60D5\u6D95\u5243\u5C49\u5929\u6DFB\u586B\u7530\u751C\u606C\u8214\u8146\u6311\u6761\u8FE2\u773A\u8DF3\u8D34\u94C1\u5E16\u5385\u542C\u70C3"],["cd40","\u866D\u866F\u8670\u8672",6,"\u8683",6,"\u868E",4,"\u8694\u8696",5,"\u869E",4,"\u86A5\u86A6\u86AB\u86AD\u86AE\u86B2\u86B3\u86B7\u86B8\u86B9\u86BB",4,"\u86C1\u86C2\u86C3\u86C5\u86C8\u86CC\u86CD\u86D2\u86D3\u86D5\u86D6\u86D7\u86DA\u86DC"],["cd80","\u86DD\u86E0\u86E1\u86E2\u86E3\u86E5\u86E6\u86E7\u86E8\u86EA\u86EB\u86EC\u86EF\u86F5\u86F6\u86F7\u86FA\u86FB\u86FC\u86FD\u86FF\u8701\u8704\u8705\u8706\u870B\u870C\u870E\u870F\u8710\u8711\u8714\u8716\u6C40\u5EF7\u505C\u4EAD\u5EAD\u633A\u8247\u901A\u6850\u916E\u77B3\u540C\u94DC\u5F64\u7AE5\u6876\u6345\u7B52\u7EDF\u75DB\u5077\u6295\u5934\u900F\u51F8\u79C3\u7A81\u56FE\u5F92\u9014\u6D82\u5C60\u571F\u5410\u5154\u6E4D\u56E2\u63A8\u9893\u817F\u8715\u892A\u9000\u541E\u5C6F\u81C0\u62D6\u6258\u8131\u9E35\u9640\u9A6E\u9A7C\u692D\u59A5\u62D3\u553E\u6316\u54C7\u86D9\u6D3C\u5A03\u74E6\u889C\u6B6A\u5916\u8C4C\u5F2F\u6E7E\u73A9\u987D\u4E38\u70F7\u5B8C\u7897\u633D\u665A\u7696\u60CB\u5B9B\u5A49\u4E07\u8155\u6C6A\u738B\u4EA1\u6789\u7F51\u5F80\u65FA\u671B\u5FD8\u5984\u5A01"],["ce40","\u8719\u871B\u871D\u871F\u8720\u8724\u8726\u8727\u8728\u872A\u872B\u872C\u872D\u872F\u8730\u8732\u8733\u8735\u8736\u8738\u8739\u873A\u873C\u873D\u8740",6,"\u874A\u874B\u874D\u874F\u8750\u8751\u8752\u8754\u8755\u8756\u8758\u875A",5,"\u8761\u8762\u8766",7,"\u876F\u8771\u8772\u8773\u8775"],["ce80","\u8777\u8778\u8779\u877A\u877F\u8780\u8781\u8784\u8786\u8787\u8789\u878A\u878C\u878E",4,"\u8794\u8795\u8796\u8798",6,"\u87A0",4,"\u5DCD\u5FAE\u5371\u97E6\u8FDD\u6845\u56F4\u552F\u60DF\u4E3A\u6F4D\u7EF4\u82C7\u840E\u59D4\u4F1F\u4F2A\u5C3E\u7EAC\u672A\u851A\u5473\u754F\u80C3\u5582\u9B4F\u4F4D\u6E2D\u8C13\u5C09\u6170\u536B\u761F\u6E29\u868A\u6587\u95FB\u7EB9\u543B\u7A33\u7D0A\u95EE\u55E1\u7FC1\u74EE\u631D\u8717\u6DA1\u7A9D\u6211\u65A1\u5367\u63E1\u6C83\u5DEB\u545C\u94A8\u4E4C\u6C61\u8BEC\u5C4B\u65E0\u829C\u68A7\u543E\u5434\u6BCB\u6B66\u4E94\u6342\u5348\u821E\u4F0D\u4FAE\u575E\u620A\u96FE\u6664\u7269\u52FF\u52A1\u609F\u8BEF\u6614\u7199\u6790\u897F\u7852\u77FD\u6670\u563B\u5438\u9521\u727A"],["cf40","\u87A5\u87A6\u87A7\u87A9\u87AA\u87AE\u87B0\u87B1\u87B2\u87B4\u87B6\u87B7\u87B8\u87B9\u87BB\u87BC\u87BE\u87BF\u87C1",4,"\u87C7\u87C8\u87C9\u87CC",4,"\u87D4",6,"\u87DC\u87DD\u87DE\u87DF\u87E1\u87E2\u87E3\u87E4\u87E6\u87E7\u87E8\u87E9\u87EB\u87EC\u87ED\u87EF",9],["cf80","\u87FA\u87FB\u87FC\u87FD\u87FF\u8800\u8801\u8802\u8804",5,"\u880B",7,"\u8814\u8817\u8818\u8819\u881A\u881C",4,"\u8823\u7A00\u606F\u5E0C\u6089\u819D\u5915\u60DC\u7184\u70EF\u6EAA\u6C50\u7280\u6A84\u88AD\u5E2D\u4E60\u5AB3\u559C\u94E3\u6D17\u7CFB\u9699\u620F\u7EC6\u778E\u867E\u5323\u971E\u8F96\u6687\u5CE1\u4FA0\u72ED\u4E0B\u53A6\u590F\u5413\u6380\u9528\u5148\u4ED9\u9C9C\u7EA4\u54B8\u8D24\u8854\u8237\u95F2\u6D8E\u5F26\u5ACC\u663E\u9669\u73B0\u732E\u53BF\u817A\u9985\u7FA1\u5BAA\u9677\u9650\u7EBF\u76F8\u53A2\u9576\u9999\u7BB1\u8944\u6E58\u4E61\u7FD4\u7965\u8BE6\u60F3\u54CD\u4EAB\u9879\u5DF7\u6A61\u50CF\u5411\u8C61\u8427\u785D\u9704\u524A\u54EE\u56A3\u9500\u6D88\u5BB5\u6DC6\u6653"],["d040","\u8824",13,"\u8833",5,"\u883A\u883B\u883D\u883E\u883F\u8841\u8842\u8843\u8846",5,"\u884E",5,"\u8855\u8856\u8858\u885A",6,"\u8866\u8867\u886A\u886D\u886F\u8871\u8873\u8874\u8875\u8876\u8878\u8879\u887A"],["d080","\u887B\u887C\u8880\u8883\u8886\u8887\u8889\u888A\u888C\u888E\u888F\u8890\u8891\u8893\u8894\u8895\u8897",4,"\u889D",4,"\u88A3\u88A5",5,"\u5C0F\u5B5D\u6821\u8096\u5578\u7B11\u6548\u6954\u4E9B\u6B47\u874E\u978B\u534F\u631F\u643A\u90AA\u659C\u80C1\u8C10\u5199\u68B0\u5378\u87F9\u61C8\u6CC4\u6CFB\u8C22\u5C51\u85AA\u82AF\u950C\u6B23\u8F9B\u65B0\u5FFB\u5FC3\u4FE1\u8845\u661F\u8165\u7329\u60FA\u5174\u5211\u578B\u5F62\u90A2\u884C\u9192\u5E78\u674F\u6027\u59D3\u5144\u51F6\u80F8\u5308\u6C79\u96C4\u718A\u4F11\u4FEE\u7F9E\u673D\u55C5\u9508\u79C0\u8896\u7EE3\u589F\u620C\u9700\u865A\u5618\u987B\u5F90\u8BB8\u84C4\u9157\u53D9\u65ED\u5E8F\u755C\u6064\u7D6E\u5A7F\u7EEA\u7EED\u8F69\u55A7\u5BA3\u60AC\u65CB\u7384"],["d140","\u88AC\u88AE\u88AF\u88B0\u88B2",4,"\u88B8\u88B9\u88BA\u88BB\u88BD\u88BE\u88BF\u88C0\u88C3\u88C4\u88C7\u88C8\u88CA\u88CB\u88CC\u88CD\u88CF\u88D0\u88D1\u88D3\u88D6\u88D7\u88DA",4,"\u88E0\u88E1\u88E6\u88E7\u88E9",6,"\u88F2\u88F5\u88F6\u88F7\u88FA\u88FB\u88FD\u88FF\u8900\u8901\u8903",5],["d180","\u8909\u890B",4,"\u8911\u8914",4,"\u891C",4,"\u8922\u8923\u8924\u8926\u8927\u8928\u8929\u892C\u892D\u892E\u892F\u8931\u8932\u8933\u8935\u8937\u9009\u7663\u7729\u7EDA\u9774\u859B\u5B66\u7A74\u96EA\u8840\u52CB\u718F\u5FAA\u65EC\u8BE2\u5BFB\u9A6F\u5DE1\u6B89\u6C5B\u8BAD\u8BAF\u900A\u8FC5\u538B\u62BC\u9E26\u9E2D\u5440\u4E2B\u82BD\u7259\u869C\u5D16\u8859\u6DAF\u96C5\u54D1\u4E9A\u8BB6\u7109\u54BD\u9609\u70DF\u6DF9\u76D0\u4E25\u7814\u8712\u5CA9\u5EF6\u8A00\u989C\u960E\u708E\u6CBF\u5944\u63A9\u773C\u884D\u6F14\u8273\u5830\u71D5\u538C\u781A\u96C1\u5501\u5F66\u7130\u5BB4\u8C1A\u9A8C\u6B83\u592E\u9E2F\u79E7\u6768\u626C\u4F6F\u75A1\u7F8A\u6D0B\u9633\u6C27\u4EF0\u75D2\u517B\u6837\u6F3E\u9080\u8170\u5996\u7476"],["d240","\u8938",8,"\u8942\u8943\u8945",24,"\u8960",5,"\u8967",19,"\u897C"],["d280","\u897D\u897E\u8980\u8982\u8984\u8985\u8987",26,"\u6447\u5C27\u9065\u7A91\u8C23\u59DA\u54AC\u8200\u836F\u8981\u8000\u6930\u564E\u8036\u7237\u91CE\u51B6\u4E5F\u9875\u6396\u4E1A\u53F6\u66F3\u814B\u591C\u6DB2\u4E00\u58F9\u533B\u63D6\u94F1\u4F9D\u4F0A\u8863\u9890\u5937\u9057\u79FB\u4EEA\u80F0\u7591\u6C82\u5B9C\u59E8\u5F5D\u6905\u8681\u501A\u5DF2\u4E59\u77E3\u4EE5\u827A\u6291\u6613\u9091\u5C79\u4EBF\u5F79\u81C6\u9038\u8084\u75AB\u4EA6\u88D4\u610F\u6BC5\u5FC6\u4E49\u76CA\u6EA2\u8BE3\u8BAE\u8C0A\u8BD1\u5F02\u7FFC\u7FCC\u7ECE\u8335\u836B\u56E0\u6BB7\u97F3\u9634\u59FB\u541F\u94F6\u6DEB\u5BC5\u996E\u5C39\u5F15\u9690"],["d340","\u89A2",30,"\u89C3\u89CD\u89D3\u89D4\u89D5\u89D7\u89D8\u89D9\u89DB\u89DD\u89DF\u89E0\u89E1\u89E2\u89E4\u89E7\u89E8\u89E9\u89EA\u89EC\u89ED\u89EE\u89F0\u89F1\u89F2\u89F4",6],["d380","\u89FB",4,"\u8A01",5,"\u8A08",21,"\u5370\u82F1\u6A31\u5A74\u9E70\u5E94\u7F28\u83B9\u8424\u8425\u8367\u8747\u8FCE\u8D62\u76C8\u5F71\u9896\u786C\u6620\u54DF\u62E5\u4F63\u81C3\u75C8\u5EB8\u96CD\u8E0A\u86F9\u548F\u6CF3\u6D8C\u6C38\u607F\u52C7\u7528\u5E7D\u4F18\u60A0\u5FE7\u5C24\u7531\u90AE\u94C0\u72B9\u6CB9\u6E38\u9149\u6709\u53CB\u53F3\u4F51\u91C9\u8BF1\u53C8\u5E7C\u8FC2\u6DE4\u4E8E\u76C2\u6986\u865E\u611A\u8206\u4F59\u4FDE\u903E\u9C7C\u6109\u6E1D\u6E14\u9685\u4E88\u5A31\u96E8\u4E0E\u5C7F\u79B9\u5B87\u8BED\u7FBD\u7389\u57DF\u828B\u90C1\u5401\u9047\u55BB\u5CEA\u5FA1\u6108\u6B32\u72F1\u80B2\u8A89"],["d440","\u8A1E",31,"\u8A3F",8,"\u8A49",21],["d480","\u8A5F",25,"\u8A7A",6,"\u6D74\u5BD3\u88D5\u9884\u8C6B\u9A6D\u9E33\u6E0A\u51A4\u5143\u57A3\u8881\u539F\u63F4\u8F95\u56ED\u5458\u5706\u733F\u6E90\u7F18\u8FDC\u82D1\u613F\u6028\u9662\u66F0\u7EA6\u8D8A\u8DC3\u94A5\u5CB3\u7CA4\u6708\u60A6\u9605\u8018\u4E91\u90E7\u5300\u9668\u5141\u8FD0\u8574\u915D\u6655\u97F5\u5B55\u531D\u7838\u6742\u683D\u54C9\u707E\u5BB0\u8F7D\u518D\u5728\u54B1\u6512\u6682\u8D5E\u8D43\u810F\u846C\u906D\u7CDF\u51FF\u85FB\u67A3\u65E9\u6FA1\u86A4\u8E81\u566A\u9020\u7682\u7076\u71E5\u8D23\u62E9\u5219\u6CFD\u8D3C\u600E\u589E\u618E\u66FE\u8D60\u624E\u55B3\u6E23\u672D\u8F67"],["d540","\u8A81",7,"\u8A8B",7,"\u8A94",46],["d580","\u8AC3",32,"\u94E1\u95F8\u7728\u6805\u69A8\u548B\u4E4D\u70B8\u8BC8\u6458\u658B\u5B85\u7A84\u503A\u5BE8\u77BB\u6BE1\u8A79\u7C98\u6CBE\u76CF\u65A9\u8F97\u5D2D\u5C55\u8638\u6808\u5360\u6218\u7AD9\u6E5B\u7EFD\u6A1F\u7AE0\u5F70\u6F33\u5F20\u638C\u6DA8\u6756\u4E08\u5E10\u8D26\u4ED7\u80C0\u7634\u969C\u62DB\u662D\u627E\u6CBC\u8D75\u7167\u7F69\u5146\u8087\u53EC\u906E\u6298\u54F2\u86F0\u8F99\u8005\u9517\u8517\u8FD9\u6D59\u73CD\u659F\u771F\u7504\u7827\u81FB\u8D1E\u9488\u4FA6\u6795\u75B9\u8BCA\u9707\u632F\u9547\u9635\u84B8\u6323\u7741\u5F81\u72F0\u4E89\u6014\u6574\u62EF\u6B63\u653F"],["d640","\u8AE4",34,"\u8B08",27],["d680","\u8B24\u8B25\u8B27",30,"\u5E27\u75C7\u90D1\u8BC1\u829D\u679D\u652F\u5431\u8718\u77E5\u80A2\u8102\u6C41\u4E4B\u7EC7\u804C\u76F4\u690D\u6B96\u6267\u503C\u4F84\u5740\u6307\u6B62\u8DBE\u53EA\u65E8\u7EB8\u5FD7\u631A\u63B7\u81F3\u81F4\u7F6E\u5E1C\u5CD9\u5236\u667A\u79E9\u7A1A\u8D28\u7099\u75D4\u6EDE\u6CBB\u7A92\u4E2D\u76C5\u5FE0\u949F\u8877\u7EC8\u79CD\u80BF\u91CD\u4EF2\u4F17\u821F\u5468\u5DDE\u6D32\u8BCC\u7CA5\u8F74\u8098\u5E1A\u5492\u76B1\u5B99\u663C\u9AA4\u73E0\u682A\u86DB\u6731\u732A\u8BF8\u8BDB\u9010\u7AF9\u70DB\u716E\u62C4\u77A9\u5631\u4E3B\u8457\u67F1\u52A9\u86C0\u8D2E\u94F8\u7B51"],["d740","\u8B46",31,"\u8B67",4,"\u8B6D",25],["d780","\u8B87",24,"\u8BAC\u8BB1\u8BBB\u8BC7\u8BD0\u8BEA\u8C09\u8C1E\u4F4F\u6CE8\u795D\u9A7B\u6293\u722A\u62FD\u4E13\u7816\u8F6C\u64B0\u8D5A\u7BC6\u6869\u5E84\u88C5\u5986\u649E\u58EE\u72B6\u690E\u9525\u8FFD\u8D58\u5760\u7F00\u8C06\u51C6\u6349\u62D9\u5353\u684C\u7422\u8301\u914C\u5544\u7740\u707C\u6D4A\u5179\u54A8\u8D44\u59FF\u6ECB\u6DC4\u5B5C\u7D2B\u4ED4\u7C7D\u6ED3\u5B50\u81EA\u6E0D\u5B57\u9B03\u68D5\u8E2A\u5B97\u7EFC\u603B\u7EB5\u90B9\u8D70\u594F\u63CD\u79DF\u8DB3\u5352\u65CF\u7956\u8BC5\u963B\u7EC4\u94BB\u7E82\u5634\u9189\u6700\u7F6A\u5C0A\u9075\u6628\u5DE6\u4F50\u67DE\u505A\u4F5C\u5750\u5EA7"],["d840","\u8C38",8,"\u8C42\u8C43\u8C44\u8C45\u8C48\u8C4A\u8C4B\u8C4D",7,"\u8C56\u8C57\u8C58\u8C59\u8C5B",5,"\u8C63",6,"\u8C6C",6,"\u8C74\u8C75\u8C76\u8C77\u8C7B",6,"\u8C83\u8C84\u8C86\u8C87"],["d880","\u8C88\u8C8B\u8C8D",6,"\u8C95\u8C96\u8C97\u8C99",20,"\u4E8D\u4E0C\u5140\u4E10\u5EFF\u5345\u4E15\u4E98\u4E1E\u9B32\u5B6C\u5669\u4E28\u79BA\u4E3F\u5315\u4E47\u592D\u723B\u536E\u6C10\u56DF\u80E4\u9997\u6BD3\u777E\u9F17\u4E36\u4E9F\u9F10\u4E5C\u4E69\u4E93\u8288\u5B5B\u556C\u560F\u4EC4\u538D\u539D\u53A3\u53A5\u53AE\u9765\u8D5D\u531A\u53F5\u5326\u532E\u533E\u8D5C\u5366\u5363\u5202\u5208\u520E\u522D\u5233\u523F\u5240\u524C\u525E\u5261\u525C\u84AF\u527D\u5282\u5281\u5290\u5293\u5182\u7F54\u4EBB\u4EC3\u4EC9\u4EC2\u4EE8\u4EE1\u4EEB\u4EDE\u4F1B\u4EF3\u4F22\u4F64\u4EF5\u4F25\u4F27\u4F09\u4F2B\u4F5E\u4F67\u6538\u4F5A\u4F5D"],["d940","\u8CAE",62],["d980","\u8CED",32,"\u4F5F\u4F57\u4F32\u4F3D\u4F76\u4F74\u4F91\u4F89\u4F83\u4F8F\u4F7E\u4F7B\u4FAA\u4F7C\u4FAC\u4F94\u4FE6\u4FE8\u4FEA\u4FC5\u4FDA\u4FE3\u4FDC\u4FD1\u4FDF\u4FF8\u5029\u504C\u4FF3\u502C\u500F\u502E\u502D\u4FFE\u501C\u500C\u5025\u5028\u507E\u5043\u5055\u5048\u504E\u506C\u507B\u50A5\u50A7\u50A9\u50BA\u50D6\u5106\u50ED\u50EC\u50E6\u50EE\u5107\u510B\u4EDD\u6C3D\u4F58\u4F65\u4FCE\u9FA0\u6C46\u7C74\u516E\u5DFD\u9EC9\u9998\u5181\u5914\u52F9\u530D\u8A07\u5310\u51EB\u5919\u5155\u4EA0\u5156\u4EB3\u886E\u88A4\u4EB5\u8114\u88D2\u7980\u5B34\u8803\u7FB8\u51AB\u51B1\u51BD\u51BC"],["da40","\u8D0E",14,"\u8D20\u8D51\u8D52\u8D57\u8D5F\u8D65\u8D68\u8D69\u8D6A\u8D6C\u8D6E\u8D6F\u8D71\u8D72\u8D78",8,"\u8D82\u8D83\u8D86\u8D87\u8D88\u8D89\u8D8C",4,"\u8D92\u8D93\u8D95",9,"\u8DA0\u8DA1"],["da80","\u8DA2\u8DA4",12,"\u8DB2\u8DB6\u8DB7\u8DB9\u8DBB\u8DBD\u8DC0\u8DC1\u8DC2\u8DC5\u8DC7\u8DC8\u8DC9\u8DCA\u8DCD\u8DD0\u8DD2\u8DD3\u8DD4\u51C7\u5196\u51A2\u51A5\u8BA0\u8BA6\u8BA7\u8BAA\u8BB4\u8BB5\u8BB7\u8BC2\u8BC3\u8BCB\u8BCF\u8BCE\u8BD2\u8BD3\u8BD4\u8BD6\u8BD8\u8BD9\u8BDC\u8BDF\u8BE0\u8BE4\u8BE8\u8BE9\u8BEE\u8BF0\u8BF3\u8BF6\u8BF9\u8BFC\u8BFF\u8C00\u8C02\u8C04\u8C07\u8C0C\u8C0F\u8C11\u8C12\u8C14\u8C15\u8C16\u8C19\u8C1B\u8C18\u8C1D\u8C1F\u8C20\u8C21\u8C25\u8C27\u8C2A\u8C2B\u8C2E\u8C2F\u8C32\u8C33\u8C35\u8C36\u5369\u537A\u961D\u9622\u9621\u9631\u962A\u963D\u963C\u9642\u9649\u9654\u965F\u9667\u966C\u9672\u9674\u9688\u968D\u9697\u96B0\u9097\u909B\u909D\u9099\u90AC\u90A1\u90B4\u90B3\u90B6\u90BA"],["db40","\u8DD5\u8DD8\u8DD9\u8DDC\u8DE0\u8DE1\u8DE2\u8DE5\u8DE6\u8DE7\u8DE9\u8DED\u8DEE\u8DF0\u8DF1\u8DF2\u8DF4\u8DF6\u8DFC\u8DFE",6,"\u8E06\u8E07\u8E08\u8E0B\u8E0D\u8E0E\u8E10\u8E11\u8E12\u8E13\u8E15",7,"\u8E20\u8E21\u8E24",4,"\u8E2B\u8E2D\u8E30\u8E32\u8E33\u8E34\u8E36\u8E37\u8E38\u8E3B\u8E3C\u8E3E"],["db80","\u8E3F\u8E43\u8E45\u8E46\u8E4C",4,"\u8E53",5,"\u8E5A",11,"\u8E67\u8E68\u8E6A\u8E6B\u8E6E\u8E71\u90B8\u90B0\u90CF\u90C5\u90BE\u90D0\u90C4\u90C7\u90D3\u90E6\u90E2\u90DC\u90D7\u90DB\u90EB\u90EF\u90FE\u9104\u9122\u911E\u9123\u9131\u912F\u9139\u9143\u9146\u520D\u5942\u52A2\u52AC\u52AD\u52BE\u54FF\u52D0\u52D6\u52F0\u53DF\u71EE\u77CD\u5EF4\u51F5\u51FC\u9B2F\u53B6\u5F01\u755A\u5DEF\u574C\u57A9\u57A1\u587E\u58BC\u58C5\u58D1\u5729\u572C\u572A\u5733\u5739\u572E\u572F\u575C\u573B\u5742\u5769\u5785\u576B\u5786\u577C\u577B\u5768\u576D\u5776\u5773\u57AD\u57A4\u578C\u57B2\u57CF\u57A7\u57B4\u5793\u57A0\u57D5\u57D8\u57DA\u57D9\u57D2\u57B8\u57F4\u57EF\u57F8\u57E4\u57DD"],["dc40","\u8E73\u8E75\u8E77",4,"\u8E7D\u8E7E\u8E80\u8E82\u8E83\u8E84\u8E86\u8E88",6,"\u8E91\u8E92\u8E93\u8E95",6,"\u8E9D\u8E9F",11,"\u8EAD\u8EAE\u8EB0\u8EB1\u8EB3",6,"\u8EBB",7],["dc80","\u8EC3",10,"\u8ECF",21,"\u580B\u580D\u57FD\u57ED\u5800\u581E\u5819\u5844\u5820\u5865\u586C\u5881\u5889\u589A\u5880\u99A8\u9F19\u61FF\u8279\u827D\u827F\u828F\u828A\u82A8\u8284\u828E\u8291\u8297\u8299\u82AB\u82B8\u82BE\u82B0\u82C8\u82CA\u82E3\u8298\u82B7\u82AE\u82CB\u82CC\u82C1\u82A9\u82B4\u82A1\u82AA\u829F\u82C4\u82CE\u82A4\u82E1\u8309\u82F7\u82E4\u830F\u8307\u82DC\u82F4\u82D2\u82D8\u830C\u82FB\u82D3\u8311\u831A\u8306\u8314\u8315\u82E0\u82D5\u831C\u8351\u835B\u835C\u8308\u8392\u833C\u8334\u8331\u839B\u835E\u832F\u834F\u8347\u8343\u835F\u8340\u8317\u8360\u832D\u833A\u8333\u8366\u8365"],["dd40","\u8EE5",62],["dd80","\u8F24",32,"\u8368\u831B\u8369\u836C\u836A\u836D\u836E\u83B0\u8378\u83B3\u83B4\u83A0\u83AA\u8393\u839C\u8385\u837C\u83B6\u83A9\u837D\u83B8\u837B\u8398\u839E\u83A8\u83BA\u83BC\u83C1\u8401\u83E5\u83D8\u5807\u8418\u840B\u83DD\u83FD\u83D6\u841C\u8438\u8411\u8406\u83D4\u83DF\u840F\u8403\u83F8\u83F9\u83EA\u83C5\u83C0\u8426\u83F0\u83E1\u845C\u8451\u845A\u8459\u8473\u8487\u8488\u847A\u8489\u8478\u843C\u8446\u8469\u8476\u848C\u848E\u8431\u846D\u84C1\u84CD\u84D0\u84E6\u84BD\u84D3\u84CA\u84BF\u84BA\u84E0\u84A1\u84B9\u84B4\u8497\u84E5\u84E3\u850C\u750D\u8538\u84F0\u8539\u851F\u853A"],["de40","\u8F45",32,"\u8F6A\u8F80\u8F8C\u8F92\u8F9D\u8FA0\u8FA1\u8FA2\u8FA4\u8FA5\u8FA6\u8FA7\u8FAA\u8FAC\u8FAD\u8FAE\u8FAF\u8FB2\u8FB3\u8FB4\u8FB5\u8FB7\u8FB8\u8FBA\u8FBB\u8FBC\u8FBF\u8FC0\u8FC3\u8FC6"],["de80","\u8FC9",4,"\u8FCF\u8FD2\u8FD6\u8FD7\u8FDA\u8FE0\u8FE1\u8FE3\u8FE7\u8FEC\u8FEF\u8FF1\u8FF2\u8FF4\u8FF5\u8FF6\u8FFA\u8FFB\u8FFC\u8FFE\u8FFF\u9007\u9008\u900C\u900E\u9013\u9015\u9018\u8556\u853B\u84FF\u84FC\u8559\u8548\u8568\u8564\u855E\u857A\u77A2\u8543\u8572\u857B\u85A4\u85A8\u8587\u858F\u8579\u85AE\u859C\u8585\u85B9\u85B7\u85B0\u85D3\u85C1\u85DC\u85FF\u8627\u8605\u8629\u8616\u863C\u5EFE\u5F08\u593C\u5941\u8037\u5955\u595A\u5958\u530F\u5C22\u5C25\u5C2C\u5C34\u624C\u626A\u629F\u62BB\u62CA\u62DA\u62D7\u62EE\u6322\u62F6\u6339\u634B\u6343\u63AD\u63F6\u6371\u637A\u638E\u63B4\u636D\u63AC\u638A\u6369\u63AE\u63BC\u63F2\u63F8\u63E0\u63FF\u63C4\u63DE\u63CE\u6452\u63C6\u63BE\u6445\u6441\u640B\u641B\u6420\u640C\u6426\u6421\u645E\u6484\u646D\u6496"],["df40","\u9019\u901C\u9023\u9024\u9025\u9027",5,"\u9030",4,"\u9037\u9039\u903A\u903D\u903F\u9040\u9043\u9045\u9046\u9048",4,"\u904E\u9054\u9055\u9056\u9059\u905A\u905C",5,"\u9064\u9066\u9067\u9069\u906A\u906B\u906C\u906F",4,"\u9076",6,"\u907E\u9081"],["df80","\u9084\u9085\u9086\u9087\u9089\u908A\u908C",4,"\u9092\u9094\u9096\u9098\u909A\u909C\u909E\u909F\u90A0\u90A4\u90A5\u90A7\u90A8\u90A9\u90AB\u90AD\u90B2\u90B7\u90BC\u90BD\u90BF\u90C0\u647A\u64B7\u64B8\u6499\u64BA\u64C0\u64D0\u64D7\u64E4\u64E2\u6509\u6525\u652E\u5F0B\u5FD2\u7519\u5F11\u535F\u53F1\u53FD\u53E9\u53E8\u53FB\u5412\u5416\u5406\u544B\u5452\u5453\u5454\u5456\u5443\u5421\u5457\u5459\u5423\u5432\u5482\u5494\u5477\u5471\u5464\u549A\u549B\u5484\u5476\u5466\u549D\u54D0\u54AD\u54C2\u54B4\u54D2\u54A7\u54A6\u54D3\u54D4\u5472\u54A3\u54D5\u54BB\u54BF\u54CC\u54D9\u54DA\u54DC\u54A9\u54AA\u54A4\u54DD\u54CF\u54DE\u551B\u54E7\u5520\u54FD\u5514\u54F3\u5522\u5523\u550F\u5511\u5527\u552A\u5567\u558F\u55B5\u5549\u556D\u5541\u5555\u553F\u5550\u553C"],["e040","\u90C2\u90C3\u90C6\u90C8\u90C9\u90CB\u90CC\u90CD\u90D2\u90D4\u90D5\u90D6\u90D8\u90D9\u90DA\u90DE\u90DF\u90E0\u90E3\u90E4\u90E5\u90E9\u90EA\u90EC\u90EE\u90F0\u90F1\u90F2\u90F3\u90F5\u90F6\u90F7\u90F9\u90FA\u90FB\u90FC\u90FF\u9100\u9101\u9103\u9105",19,"\u911A\u911B\u911C"],["e080","\u911D\u911F\u9120\u9121\u9124",10,"\u9130\u9132",6,"\u913A",8,"\u9144\u5537\u5556\u5575\u5576\u5577\u5533\u5530\u555C\u558B\u55D2\u5583\u55B1\u55B9\u5588\u5581\u559F\u557E\u55D6\u5591\u557B\u55DF\u55BD\u55BE\u5594\u5599\u55EA\u55F7\u55C9\u561F\u55D1\u55EB\u55EC\u55D4\u55E6\u55DD\u55C4\u55EF\u55E5\u55F2\u55F3\u55CC\u55CD\u55E8\u55F5\u55E4\u8F94\u561E\u5608\u560C\u5601\u5624\u5623\u55FE\u5600\u5627\u562D\u5658\u5639\u5657\u562C\u564D\u5662\u5659\u565C\u564C\u5654\u5686\u5664\u5671\u566B\u567B\u567C\u5685\u5693\u56AF\u56D4\u56D7\u56DD\u56E1\u56F5\u56EB\u56F9\u56FF\u5704\u570A\u5709\u571C\u5E0F\u5E19\u5E14\u5E11\u5E31\u5E3B\u5E3C"],["e140","\u9145\u9147\u9148\u9151\u9153\u9154\u9155\u9156\u9158\u9159\u915B\u915C\u915F\u9160\u9166\u9167\u9168\u916B\u916D\u9173\u917A\u917B\u917C\u9180",4,"\u9186\u9188\u918A\u918E\u918F\u9193",6,"\u919C",5,"\u91A4",5,"\u91AB\u91AC\u91B0\u91B1\u91B2\u91B3\u91B6\u91B7\u91B8\u91B9\u91BB"],["e180","\u91BC",10,"\u91C8\u91CB\u91D0\u91D2",9,"\u91DD",8,"\u5E37\u5E44\u5E54\u5E5B\u5E5E\u5E61\u5C8C\u5C7A\u5C8D\u5C90\u5C96\u5C88\u5C98\u5C99\u5C91\u5C9A\u5C9C\u5CB5\u5CA2\u5CBD\u5CAC\u5CAB\u5CB1\u5CA3\u5CC1\u5CB7\u5CC4\u5CD2\u5CE4\u5CCB\u5CE5\u5D02\u5D03\u5D27\u5D26\u5D2E\u5D24\u5D1E\u5D06\u5D1B\u5D58\u5D3E\u5D34\u5D3D\u5D6C\u5D5B\u5D6F\u5D5D\u5D6B\u5D4B\u5D4A\u5D69\u5D74\u5D82\u5D99\u5D9D\u8C73\u5DB7\u5DC5\u5F73\u5F77\u5F82\u5F87\u5F89\u5F8C\u5F95\u5F99\u5F9C\u5FA8\u5FAD\u5FB5\u5FBC\u8862\u5F61\u72AD\u72B0\u72B4\u72B7\u72B8\u72C3\u72C1\u72CE\u72CD\u72D2\u72E8\u72EF\u72E9\u72F2\u72F4\u72F7\u7301\u72F3\u7303\u72FA"],["e240","\u91E6",62],["e280","\u9225",32,"\u72FB\u7317\u7313\u7321\u730A\u731E\u731D\u7315\u7322\u7339\u7325\u732C\u7338\u7331\u7350\u734D\u7357\u7360\u736C\u736F\u737E\u821B\u5925\u98E7\u5924\u5902\u9963\u9967",5,"\u9974\u9977\u997D\u9980\u9984\u9987\u998A\u998D\u9990\u9991\u9993\u9994\u9995\u5E80\u5E91\u5E8B\u5E96\u5EA5\u5EA0\u5EB9\u5EB5\u5EBE\u5EB3\u8D53\u5ED2\u5ED1\u5EDB\u5EE8\u5EEA\u81BA\u5FC4\u5FC9\u5FD6\u5FCF\u6003\u5FEE\u6004\u5FE1\u5FE4\u5FFE\u6005\u6006\u5FEA\u5FED\u5FF8\u6019\u6035\u6026\u601B\u600F\u600D\u6029\u602B\u600A\u603F\u6021\u6078\u6079\u607B\u607A\u6042"],["e340","\u9246",45,"\u9275",16],["e380","\u9286",7,"\u928F",24,"\u606A\u607D\u6096\u609A\u60AD\u609D\u6083\u6092\u608C\u609B\u60EC\u60BB\u60B1\u60DD\u60D8\u60C6\u60DA\u60B4\u6120\u6126\u6115\u6123\u60F4\u6100\u610E\u612B\u614A\u6175\u61AC\u6194\u61A7\u61B7\u61D4\u61F5\u5FDD\u96B3\u95E9\u95EB\u95F1\u95F3\u95F5\u95F6\u95FC\u95FE\u9603\u9604\u9606\u9608\u960A\u960B\u960C\u960D\u960F\u9612\u9615\u9616\u9617\u9619\u961A\u4E2C\u723F\u6215\u6C35\u6C54\u6C5C\u6C4A\u6CA3\u6C85\u6C90\u6C94\u6C8C\u6C68\u6C69\u6C74\u6C76\u6C86\u6CA9\u6CD0\u6CD4\u6CAD\u6CF7\u6CF8\u6CF1\u6CD7\u6CB2\u6CE0\u6CD6\u6CFA\u6CEB\u6CEE\u6CB1\u6CD3\u6CEF\u6CFE"],["e440","\u92A8",5,"\u92AF",24,"\u92C9",31],["e480","\u92E9",32,"\u6D39\u6D27\u6D0C\u6D43\u6D48\u6D07\u6D04\u6D19\u6D0E\u6D2B\u6D4D\u6D2E\u6D35\u6D1A\u6D4F\u6D52\u6D54\u6D33\u6D91\u6D6F\u6D9E\u6DA0\u6D5E\u6D93\u6D94\u6D5C\u6D60\u6D7C\u6D63\u6E1A\u6DC7\u6DC5\u6DDE\u6E0E\u6DBF\u6DE0\u6E11\u6DE6\u6DDD\u6DD9\u6E16\u6DAB\u6E0C\u6DAE\u6E2B\u6E6E\u6E4E\u6E6B\u6EB2\u6E5F\u6E86\u6E53\u6E54\u6E32\u6E25\u6E44\u6EDF\u6EB1\u6E98\u6EE0\u6F2D\u6EE2\u6EA5\u6EA7\u6EBD\u6EBB\u6EB7\u6ED7\u6EB4\u6ECF\u6E8F\u6EC2\u6E9F\u6F62\u6F46\u6F47\u6F24\u6F15\u6EF9\u6F2F\u6F36\u6F4B\u6F74\u6F2A\u6F09\u6F29\u6F89\u6F8D\u6F8C\u6F78\u6F72\u6F7C\u6F7A\u6FD1"],["e540","\u930A",51,"\u933F",10],["e580","\u934A",31,"\u936B\u6FC9\u6FA7\u6FB9\u6FB6\u6FC2\u6FE1\u6FEE\u6FDE\u6FE0\u6FEF\u701A\u7023\u701B\u7039\u7035\u704F\u705E\u5B80\u5B84\u5B95\u5B93\u5BA5\u5BB8\u752F\u9A9E\u6434\u5BE4\u5BEE\u8930\u5BF0\u8E47\u8B07\u8FB6\u8FD3\u8FD5\u8FE5\u8FEE\u8FE4\u8FE9\u8FE6\u8FF3\u8FE8\u9005\u9004\u900B\u9026\u9011\u900D\u9016\u9021\u9035\u9036\u902D\u902F\u9044\u9051\u9052\u9050\u9068\u9058\u9062\u905B\u66B9\u9074\u907D\u9082\u9088\u9083\u908B\u5F50\u5F57\u5F56\u5F58\u5C3B\u54AB\u5C50\u5C59\u5B71\u5C63\u5C66\u7FBC\u5F2A\u5F29\u5F2D\u8274\u5F3C\u9B3B\u5C6E\u5981\u5983\u598D\u59A9\u59AA\u59A3"],["e640","\u936C",34,"\u9390",27],["e680","\u93AC",29,"\u93CB\u93CC\u93CD\u5997\u59CA\u59AB\u599E\u59A4\u59D2\u59B2\u59AF\u59D7\u59BE\u5A05\u5A06\u59DD\u5A08\u59E3\u59D8\u59F9\u5A0C\u5A09\u5A32\u5A34\u5A11\u5A23\u5A13\u5A40\u5A67\u5A4A\u5A55\u5A3C\u5A62\u5A75\u80EC\u5AAA\u5A9B\u5A77\u5A7A\u5ABE\u5AEB\u5AB2\u5AD2\u5AD4\u5AB8\u5AE0\u5AE3\u5AF1\u5AD6\u5AE6\u5AD8\u5ADC\u5B09\u5B17\u5B16\u5B32\u5B37\u5B40\u5C15\u5C1C\u5B5A\u5B65\u5B73\u5B51\u5B53\u5B62\u9A75\u9A77\u9A78\u9A7A\u9A7F\u9A7D\u9A80\u9A81\u9A85\u9A88\u9A8A\u9A90\u9A92\u9A93\u9A96\u9A98\u9A9B\u9A9C\u9A9D\u9A9F\u9AA0\u9AA2\u9AA3\u9AA5\u9AA7\u7E9F\u7EA1\u7EA3\u7EA5\u7EA8\u7EA9"],["e740","\u93CE",7,"\u93D7",54],["e780","\u940E",32,"\u7EAD\u7EB0\u7EBE\u7EC0\u7EC1\u7EC2\u7EC9\u7ECB\u7ECC\u7ED0\u7ED4\u7ED7\u7EDB\u7EE0\u7EE1\u7EE8\u7EEB\u7EEE\u7EEF\u7EF1\u7EF2\u7F0D\u7EF6\u7EFA\u7EFB\u7EFE\u7F01\u7F02\u7F03\u7F07\u7F08\u7F0B\u7F0C\u7F0F\u7F11\u7F12\u7F17\u7F19\u7F1C\u7F1B\u7F1F\u7F21",6,"\u7F2A\u7F2B\u7F2C\u7F2D\u7F2F",4,"\u7F35\u5E7A\u757F\u5DDB\u753E\u9095\u738E\u7391\u73AE\u73A2\u739F\u73CF\u73C2\u73D1\u73B7\u73B3\u73C0\u73C9\u73C8\u73E5\u73D9\u987C\u740A\u73E9\u73E7\u73DE\u73BA\u73F2\u740F\u742A\u745B\u7426\u7425\u7428\u7430\u742E\u742C"],["e840","\u942F",14,"\u943F",43,"\u946C\u946D\u946E\u946F"],["e880","\u9470",20,"\u9491\u9496\u9498\u94C7\u94CF\u94D3\u94D4\u94DA\u94E6\u94FB\u951C\u9520\u741B\u741A\u7441\u745C\u7457\u7455\u7459\u7477\u746D\u747E\u749C\u748E\u7480\u7481\u7487\u748B\u749E\u74A8\u74A9\u7490\u74A7\u74D2\u74BA\u97EA\u97EB\u97EC\u674C\u6753\u675E\u6748\u6769\u67A5\u6787\u676A\u6773\u6798\u67A7\u6775\u67A8\u679E\u67AD\u678B\u6777\u677C\u67F0\u6809\u67D8\u680A\u67E9\u67B0\u680C\u67D9\u67B5\u67DA\u67B3\u67DD\u6800\u67C3\u67B8\u67E2\u680E\u67C1\u67FD\u6832\u6833\u6860\u6861\u684E\u6862\u6844\u6864\u6883\u681D\u6855\u6866\u6841\u6867\u6840\u683E\u684A\u6849\u6829\u68B5\u688F\u6874\u6877\u6893\u686B\u68C2\u696E\u68FC\u691F\u6920\u68F9"],["e940","\u9527\u9533\u953D\u9543\u9548\u954B\u9555\u955A\u9560\u956E\u9574\u9575\u9577",7,"\u9580",42],["e980","\u95AB",32,"\u6924\u68F0\u690B\u6901\u6957\u68E3\u6910\u6971\u6939\u6960\u6942\u695D\u6984\u696B\u6980\u6998\u6978\u6934\u69CC\u6987\u6988\u69CE\u6989\u6966\u6963\u6979\u699B\u69A7\u69BB\u69AB\u69AD\u69D4\u69B1\u69C1\u69CA\u69DF\u6995\u69E0\u698D\u69FF\u6A2F\u69ED\u6A17\u6A18\u6A65\u69F2\u6A44\u6A3E\u6AA0\u6A50\u6A5B\u6A35\u6A8E\u6A79\u6A3D\u6A28\u6A58\u6A7C\u6A91\u6A90\u6AA9\u6A97\u6AAB\u7337\u7352\u6B81\u6B82\u6B87\u6B84\u6B92\u6B93\u6B8D\u6B9A\u6B9B\u6BA1\u6BAA\u8F6B\u8F6D\u8F71\u8F72\u8F73\u8F75\u8F76\u8F78\u8F77\u8F79\u8F7A\u8F7C\u8F7E\u8F81\u8F82\u8F84\u8F87\u8F8B"],["ea40","\u95CC",27,"\u95EC\u95FF\u9607\u9613\u9618\u961B\u961E\u9620\u9623",6,"\u962B\u962C\u962D\u962F\u9630\u9637\u9638\u9639\u963A\u963E\u9641\u9643\u964A\u964E\u964F\u9651\u9652\u9653\u9656\u9657"],["ea80","\u9658\u9659\u965A\u965C\u965D\u965E\u9660\u9663\u9665\u9666\u966B\u966D",4,"\u9673\u9678",12,"\u9687\u9689\u968A\u8F8D\u8F8E\u8F8F\u8F98\u8F9A\u8ECE\u620B\u6217\u621B\u621F\u6222\u6221\u6225\u6224\u622C\u81E7\u74EF\u74F4\u74FF\u750F\u7511\u7513\u6534\u65EE\u65EF\u65F0\u660A\u6619\u6772\u6603\u6615\u6600\u7085\u66F7\u661D\u6634\u6631\u6636\u6635\u8006\u665F\u6654\u6641\u664F\u6656\u6661\u6657\u6677\u6684\u668C\u66A7\u669D\u66BE\u66DB\u66DC\u66E6\u66E9\u8D32\u8D33\u8D36\u8D3B\u8D3D\u8D40\u8D45\u8D46\u8D48\u8D49\u8D47\u8D4D\u8D55\u8D59\u89C7\u89CA\u89CB\u89CC\u89CE\u89CF\u89D0\u89D1\u726E\u729F\u725D\u7266\u726F\u727E\u727F\u7284\u728B\u728D\u728F\u7292\u6308\u6332\u63B0"],["eb40","\u968C\u968E\u9691\u9692\u9693\u9695\u9696\u969A\u969B\u969D",9,"\u96A8",7,"\u96B1\u96B2\u96B4\u96B5\u96B7\u96B8\u96BA\u96BB\u96BF\u96C2\u96C3\u96C8\u96CA\u96CB\u96D0\u96D1\u96D3\u96D4\u96D6",9,"\u96E1",6,"\u96EB"],["eb80","\u96EC\u96ED\u96EE\u96F0\u96F1\u96F2\u96F4\u96F5\u96F8\u96FA\u96FB\u96FC\u96FD\u96FF\u9702\u9703\u9705\u970A\u970B\u970C\u9710\u9711\u9712\u9714\u9715\u9717",4,"\u971D\u971F\u9720\u643F\u64D8\u8004\u6BEA\u6BF3\u6BFD\u6BF5\u6BF9\u6C05\u6C07\u6C06\u6C0D\u6C15\u6C18\u6C19\u6C1A\u6C21\u6C29\u6C24\u6C2A\u6C32\u6535\u6555\u656B\u724D\u7252\u7256\u7230\u8662\u5216\u809F\u809C\u8093\u80BC\u670A\u80BD\u80B1\u80AB\u80AD\u80B4\u80B7\u80E7\u80E8\u80E9\u80EA\u80DB\u80C2\u80C4\u80D9\u80CD\u80D7\u6710\u80DD\u80EB\u80F1\u80F4\u80ED\u810D\u810E\u80F2\u80FC\u6715\u8112\u8C5A\u8136\u811E\u812C\u8118\u8132\u8148\u814C\u8153\u8174\u8159\u815A\u8171\u8160\u8169\u817C\u817D\u816D\u8167\u584D\u5AB5\u8188\u8182\u8191\u6ED5\u81A3\u81AA\u81CC\u6726\u81CA\u81BB"],["ec40","\u9721",8,"\u972B\u972C\u972E\u972F\u9731\u9733",4,"\u973A\u973B\u973C\u973D\u973F",18,"\u9754\u9755\u9757\u9758\u975A\u975C\u975D\u975F\u9763\u9764\u9766\u9767\u9768\u976A",7],["ec80","\u9772\u9775\u9777",4,"\u977D",7,"\u9786",4,"\u978C\u978E\u978F\u9790\u9793\u9795\u9796\u9797\u9799",4,"\u81C1\u81A6\u6B24\u6B37\u6B39\u6B43\u6B46\u6B59\u98D1\u98D2\u98D3\u98D5\u98D9\u98DA\u6BB3\u5F40\u6BC2\u89F3\u6590\u9F51\u6593\u65BC\u65C6\u65C4\u65C3\u65CC\u65CE\u65D2\u65D6\u7080\u709C\u7096\u709D\u70BB\u70C0\u70B7\u70AB\u70B1\u70E8\u70CA\u7110\u7113\u7116\u712F\u7131\u7173\u715C\u7168\u7145\u7172\u714A\u7178\u717A\u7198\u71B3\u71B5\u71A8\u71A0\u71E0\u71D4\u71E7\u71F9\u721D\u7228\u706C\u7118\u7166\u71B9\u623E\u623D\u6243\u6248\u6249\u793B\u7940\u7946\u7949\u795B\u795C\u7953\u795A\u7962\u7957\u7960\u796F\u7967\u797A\u7985\u798A\u799A\u79A7\u79B3\u5FD1\u5FD0"],["ed40","\u979E\u979F\u97A1\u97A2\u97A4",6,"\u97AC\u97AE\u97B0\u97B1\u97B3\u97B5",46],["ed80","\u97E4\u97E5\u97E8\u97EE",4,"\u97F4\u97F7",23,"\u603C\u605D\u605A\u6067\u6041\u6059\u6063\u60AB\u6106\u610D\u615D\u61A9\u619D\u61CB\u61D1\u6206\u8080\u807F\u6C93\u6CF6\u6DFC\u77F6\u77F8\u7800\u7809\u7817\u7818\u7811\u65AB\u782D\u781C\u781D\u7839\u783A\u783B\u781F\u783C\u7825\u782C\u7823\u7829\u784E\u786D\u7856\u7857\u7826\u7850\u7847\u784C\u786A\u789B\u7893\u789A\u7887\u789C\u78A1\u78A3\u78B2\u78B9\u78A5\u78D4\u78D9\u78C9\u78EC\u78F2\u7905\u78F4\u7913\u7924\u791E\u7934\u9F9B\u9EF9\u9EFB\u9EFC\u76F1\u7704\u770D\u76F9\u7707\u7708\u771A\u7722\u7719\u772D\u7726\u7735\u7738\u7750\u7751\u7747\u7743\u775A\u7768"],["ee40","\u980F",62],["ee80","\u984E",32,"\u7762\u7765\u777F\u778D\u777D\u7780\u778C\u7791\u779F\u77A0\u77B0\u77B5\u77BD\u753A\u7540\u754E\u754B\u7548\u755B\u7572\u7579\u7583\u7F58\u7F61\u7F5F\u8A48\u7F68\u7F74\u7F71\u7F79\u7F81\u7F7E\u76CD\u76E5\u8832\u9485\u9486\u9487\u948B\u948A\u948C\u948D\u948F\u9490\u9494\u9497\u9495\u949A\u949B\u949C\u94A3\u94A4\u94AB\u94AA\u94AD\u94AC\u94AF\u94B0\u94B2\u94B4\u94B6",4,"\u94BC\u94BD\u94BF\u94C4\u94C8",6,"\u94D0\u94D1\u94D2\u94D5\u94D6\u94D7\u94D9\u94D8\u94DB\u94DE\u94DF\u94E0\u94E2\u94E4\u94E5\u94E7\u94E8\u94EA"],["ef40","\u986F",5,"\u988B\u988E\u9892\u9895\u9899\u98A3\u98A8",37,"\u98CF\u98D0\u98D4\u98D6\u98D7\u98DB\u98DC\u98DD\u98E0",4],["ef80","\u98E5\u98E6\u98E9",30,"\u94E9\u94EB\u94EE\u94EF\u94F3\u94F4\u94F5\u94F7\u94F9\u94FC\u94FD\u94FF\u9503\u9502\u9506\u9507\u9509\u950A\u950D\u950E\u950F\u9512",4,"\u9518\u951B\u951D\u951E\u951F\u9522\u952A\u952B\u9529\u952C\u9531\u9532\u9534\u9536\u9537\u9538\u953C\u953E\u953F\u9542\u9535\u9544\u9545\u9546\u9549\u954C\u954E\u954F\u9552\u9553\u9554\u9556\u9557\u9558\u9559\u955B\u955E\u955F\u955D\u9561\u9562\u9564",8,"\u956F\u9571\u9572\u9573\u953A\u77E7\u77EC\u96C9\u79D5\u79ED\u79E3\u79EB\u7A06\u5D47\u7A03\u7A02\u7A1E\u7A14"],["f040","\u9908",4,"\u990E\u990F\u9911",28,"\u992F",26],["f080","\u994A",9,"\u9956",12,"\u9964\u9966\u9973\u9978\u9979\u997B\u997E\u9982\u9983\u9989\u7A39\u7A37\u7A51\u9ECF\u99A5\u7A70\u7688\u768E\u7693\u7699\u76A4\u74DE\u74E0\u752C\u9E20\u9E22\u9E28",4,"\u9E32\u9E31\u9E36\u9E38\u9E37\u9E39\u9E3A\u9E3E\u9E41\u9E42\u9E44\u9E46\u9E47\u9E48\u9E49\u9E4B\u9E4C\u9E4E\u9E51\u9E55\u9E57\u9E5A\u9E5B\u9E5C\u9E5E\u9E63\u9E66",6,"\u9E71\u9E6D\u9E73\u7592\u7594\u7596\u75A0\u759D\u75AC\u75A3\u75B3\u75B4\u75B8\u75C4\u75B1\u75B0\u75C3\u75C2\u75D6\u75CD\u75E3\u75E8\u75E6\u75E4\u75EB\u75E7\u7603\u75F1\u75FC\u75FF\u7610\u7600\u7605\u760C\u7617\u760A\u7625\u7618\u7615\u7619"],["f140","\u998C\u998E\u999A",10,"\u99A6\u99A7\u99A9",47],["f180","\u99D9",32,"\u761B\u763C\u7622\u7620\u7640\u762D\u7630\u763F\u7635\u7643\u763E\u7633\u764D\u765E\u7654\u765C\u7656\u766B\u766F\u7FCA\u7AE6\u7A78\u7A79\u7A80\u7A86\u7A88\u7A95\u7AA6\u7AA0\u7AAC\u7AA8\u7AAD\u7AB3\u8864\u8869\u8872\u887D\u887F\u8882\u88A2\u88C6\u88B7\u88BC\u88C9\u88E2\u88CE\u88E3\u88E5\u88F1\u891A\u88FC\u88E8\u88FE\u88F0\u8921\u8919\u8913\u891B\u890A\u8934\u892B\u8936\u8941\u8966\u897B\u758B\u80E5\u76B2\u76B4\u77DC\u8012\u8014\u8016\u801C\u8020\u8022\u8025\u8026\u8027\u8029\u8028\u8031\u800B\u8035\u8043\u8046\u804D\u8052\u8069\u8071\u8983\u9878\u9880\u9883"],["f240","\u99FA",62],["f280","\u9A39",32,"\u9889\u988C\u988D\u988F\u9894\u989A\u989B\u989E\u989F\u98A1\u98A2\u98A5\u98A6\u864D\u8654\u866C\u866E\u867F\u867A\u867C\u867B\u86A8\u868D\u868B\u86AC\u869D\u86A7\u86A3\u86AA\u8693\u86A9\u86B6\u86C4\u86B5\u86CE\u86B0\u86BA\u86B1\u86AF\u86C9\u86CF\u86B4\u86E9\u86F1\u86F2\u86ED\u86F3\u86D0\u8713\u86DE\u86F4\u86DF\u86D8\u86D1\u8703\u8707\u86F8\u8708\u870A\u870D\u8709\u8723\u873B\u871E\u8725\u872E\u871A\u873E\u8748\u8734\u8731\u8729\u8737\u873F\u8782\u8722\u877D\u877E\u877B\u8760\u8770\u874C\u876E\u878B\u8753\u8763\u877C\u8764\u8759\u8765\u8793\u87AF\u87A8\u87D2"],["f340","\u9A5A",17,"\u9A72\u9A83\u9A89\u9A8D\u9A8E\u9A94\u9A95\u9A99\u9AA6\u9AA9",6,"\u9AB2\u9AB3\u9AB4\u9AB5\u9AB9\u9ABB\u9ABD\u9ABE\u9ABF\u9AC3\u9AC4\u9AC6",4,"\u9ACD\u9ACE\u9ACF\u9AD0\u9AD2\u9AD4\u9AD5\u9AD6\u9AD7\u9AD9\u9ADA\u9ADB\u9ADC"],["f380","\u9ADD\u9ADE\u9AE0\u9AE2\u9AE3\u9AE4\u9AE5\u9AE7\u9AE8\u9AE9\u9AEA\u9AEC\u9AEE\u9AF0",8,"\u9AFA\u9AFC",6,"\u9B04\u9B05\u9B06\u87C6\u8788\u8785\u87AD\u8797\u8783\u87AB\u87E5\u87AC\u87B5\u87B3\u87CB\u87D3\u87BD\u87D1\u87C0\u87CA\u87DB\u87EA\u87E0\u87EE\u8816\u8813\u87FE\u880A\u881B\u8821\u8839\u883C\u7F36\u7F42\u7F44\u7F45\u8210\u7AFA\u7AFD\u7B08\u7B03\u7B04\u7B15\u7B0A\u7B2B\u7B0F\u7B47\u7B38\u7B2A\u7B19\u7B2E\u7B31\u7B20\u7B25\u7B24\u7B33\u7B3E\u7B1E\u7B58\u7B5A\u7B45\u7B75\u7B4C\u7B5D\u7B60\u7B6E\u7B7B\u7B62\u7B72\u7B71\u7B90\u7BA6\u7BA7\u7BB8\u7BAC\u7B9D\u7BA8\u7B85\u7BAA\u7B9C\u7BA2\u7BAB\u7BB4\u7BD1\u7BC1\u7BCC\u7BDD\u7BDA\u7BE5\u7BE6\u7BEA\u7C0C\u7BFE\u7BFC\u7C0F\u7C16\u7C0B"],["f440","\u9B07\u9B09",5,"\u9B10\u9B11\u9B12\u9B14",10,"\u9B20\u9B21\u9B22\u9B24",10,"\u9B30\u9B31\u9B33",7,"\u9B3D\u9B3E\u9B3F\u9B40\u9B46\u9B4A\u9B4B\u9B4C\u9B4E\u9B50\u9B52\u9B53\u9B55",5],["f480","\u9B5B",32,"\u7C1F\u7C2A\u7C26\u7C38\u7C41\u7C40\u81FE\u8201\u8202\u8204\u81EC\u8844\u8221\u8222\u8223\u822D\u822F\u8228\u822B\u8238\u823B\u8233\u8234\u823E\u8244\u8249\u824B\u824F\u825A\u825F\u8268\u887E\u8885\u8888\u88D8\u88DF\u895E\u7F9D\u7F9F\u7FA7\u7FAF\u7FB0\u7FB2\u7C7C\u6549\u7C91\u7C9D\u7C9C\u7C9E\u7CA2\u7CB2\u7CBC\u7CBD\u7CC1\u7CC7\u7CCC\u7CCD\u7CC8\u7CC5\u7CD7\u7CE8\u826E\u66A8\u7FBF\u7FCE\u7FD5\u7FE5\u7FE1\u7FE6\u7FE9\u7FEE\u7FF3\u7CF8\u7D77\u7DA6\u7DAE\u7E47\u7E9B\u9EB8\u9EB4\u8D73\u8D84\u8D94\u8D91\u8DB1\u8D67\u8D6D\u8C47\u8C49\u914A\u9150\u914E\u914F\u9164"],["f540","\u9B7C",62],["f580","\u9BBB",32,"\u9162\u9161\u9170\u9169\u916F\u917D\u917E\u9172\u9174\u9179\u918C\u9185\u9190\u918D\u9191\u91A2\u91A3\u91AA\u91AD\u91AE\u91AF\u91B5\u91B4\u91BA\u8C55\u9E7E\u8DB8\u8DEB\u8E05\u8E59\u8E69\u8DB5\u8DBF\u8DBC\u8DBA\u8DC4\u8DD6\u8DD7\u8DDA\u8DDE\u8DCE\u8DCF\u8DDB\u8DC6\u8DEC\u8DF7\u8DF8\u8DE3\u8DF9\u8DFB\u8DE4\u8E09\u8DFD\u8E14\u8E1D\u8E1F\u8E2C\u8E2E\u8E23\u8E2F\u8E3A\u8E40\u8E39\u8E35\u8E3D\u8E31\u8E49\u8E41\u8E42\u8E51\u8E52\u8E4A\u8E70\u8E76\u8E7C\u8E6F\u8E74\u8E85\u8E8F\u8E94\u8E90\u8E9C\u8E9E\u8C78\u8C82\u8C8A\u8C85\u8C98\u8C94\u659B\u89D6\u89DE\u89DA\u89DC"],["f640","\u9BDC",62],["f680","\u9C1B",32,"\u89E5\u89EB\u89EF\u8A3E\u8B26\u9753\u96E9\u96F3\u96EF\u9706\u9701\u9708\u970F\u970E\u972A\u972D\u9730\u973E\u9F80\u9F83\u9F85",5,"\u9F8C\u9EFE\u9F0B\u9F0D\u96B9\u96BC\u96BD\u96CE\u96D2\u77BF\u96E0\u928E\u92AE\u92C8\u933E\u936A\u93CA\u938F\u943E\u946B\u9C7F\u9C82\u9C85\u9C86\u9C87\u9C88\u7A23\u9C8B\u9C8E\u9C90\u9C91\u9C92\u9C94\u9C95\u9C9A\u9C9B\u9C9E",5,"\u9CA5",4,"\u9CAB\u9CAD\u9CAE\u9CB0",7,"\u9CBA\u9CBB\u9CBC\u9CBD\u9CC4\u9CC5\u9CC6\u9CC7\u9CCA\u9CCB"],["f740","\u9C3C",62],["f780","\u9C7B\u9C7D\u9C7E\u9C80\u9C83\u9C84\u9C89\u9C8A\u9C8C\u9C8F\u9C93\u9C96\u9C97\u9C98\u9C99\u9C9D\u9CAA\u9CAC\u9CAF\u9CB9\u9CBE",4,"\u9CC8\u9CC9\u9CD1\u9CD2\u9CDA\u9CDB\u9CE0\u9CE1\u9CCC",4,"\u9CD3\u9CD4\u9CD5\u9CD7\u9CD8\u9CD9\u9CDC\u9CDD\u9CDF\u9CE2\u977C\u9785\u9791\u9792\u9794\u97AF\u97AB\u97A3\u97B2\u97B4\u9AB1\u9AB0\u9AB7\u9E58\u9AB6\u9ABA\u9ABC\u9AC1\u9AC0\u9AC5\u9AC2\u9ACB\u9ACC\u9AD1\u9B45\u9B43\u9B47\u9B49\u9B48\u9B4D\u9B51\u98E8\u990D\u992E\u9955\u9954\u9ADF\u9AE1\u9AE6\u9AEF\u9AEB\u9AFB\u9AED\u9AF9\u9B08\u9B0F\u9B13\u9B1F\u9B23\u9EBD\u9EBE\u7E3B\u9E82\u9E87\u9E88\u9E8B\u9E92\u93D6\u9E9D\u9E9F\u9EDB\u9EDC\u9EDD\u9EE0\u9EDF\u9EE2\u9EE9\u9EE7\u9EE5\u9EEA\u9EEF\u9F22\u9F2C\u9F2F\u9F39\u9F37\u9F3D\u9F3E\u9F44"],["f840","\u9CE3",62],["f880","\u9D22",32],["f940","\u9D43",62],["f980","\u9D82",32],["fa40","\u9DA3",62],["fa80","\u9DE2",32],["fb40","\u9E03",27,"\u9E24\u9E27\u9E2E\u9E30\u9E34\u9E3B\u9E3C\u9E40\u9E4D\u9E50\u9E52\u9E53\u9E54\u9E56\u9E59\u9E5D\u9E5F\u9E60\u9E61\u9E62\u9E65\u9E6E\u9E6F\u9E72\u9E74",9,"\u9E80"],["fb80","\u9E81\u9E83\u9E84\u9E85\u9E86\u9E89\u9E8A\u9E8C",5,"\u9E94",8,"\u9E9E\u9EA0",5,"\u9EA7\u9EA8\u9EA9\u9EAA"],["fc40","\u9EAB",8,"\u9EB5\u9EB6\u9EB7\u9EB9\u9EBA\u9EBC\u9EBF",4,"\u9EC5\u9EC6\u9EC7\u9EC8\u9ECA\u9ECB\u9ECC\u9ED0\u9ED2\u9ED3\u9ED5\u9ED6\u9ED7\u9ED9\u9EDA\u9EDE\u9EE1\u9EE3\u9EE4\u9EE6\u9EE8\u9EEB\u9EEC\u9EED\u9EEE\u9EF0",8,"\u9EFA\u9EFD\u9EFF",6],["fc80","\u9F06",4,"\u9F0C\u9F0F\u9F11\u9F12\u9F14\u9F15\u9F16\u9F18\u9F1A",5,"\u9F21\u9F23",8,"\u9F2D\u9F2E\u9F30\u9F31"],["fd40","\u9F32",4,"\u9F38\u9F3A\u9F3C\u9F3F",4,"\u9F45",10,"\u9F52",38],["fd80","\u9F79",5,"\u9F81\u9F82\u9F8D",11,"\u9F9C\u9F9D\u9F9E\u9FA1",4,"\uF92C\uF979\uF995\uF9E7\uF9F1"],["fe40","\uFA0C\uFA0D\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA18\uFA1F\uFA20\uFA21\uFA23\uFA24\uFA27\uFA28\uFA29"]]});var Xd0=o((TM$,wV9)=>{wV9.exports=[["a140","\uE4C6",62],["a180","\uE505",32],["a240","\uE526",62],["a280","\uE565",32],["a2ab","\uE766",5],["a2e3","\u20AC\uE76D"],["a2ef","\uE76E\uE76F"],["a2fd","\uE770\uE771"],["a340","\uE586",62],["a380","\uE5C5",31,"\u3000"],["a440","\uE5E6",62],["a480","\uE625",32],["a4f4","\uE772",10],["a540","\uE646",62],["a580","\uE685",32],["a5f7","\uE77D",7],["a640","\uE6A6",62],["a680","\uE6E5",32],["a6b9","\uE785",7],["a6d9","\uE78D",6],["a6ec","\uE794\uE795"],["a6f3","\uE796"],["a6f6","\uE797",8],["a740","\uE706",62],["a780","\uE745",32],["a7c2","\uE7A0",14],["a7f2","\uE7AF",12],["a896","\uE7BC",10],["a8bc","\uE7C7"],["a8bf","\u01F9"],["a8c1","\uE7C9\uE7CA\uE7CB\uE7CC"],["a8ea","\uE7CD",20],["a958","\uE7E2"],["a95b","\uE7E3"],["a95d","\uE7E4\uE7E5\uE7E6"],["a989","\u303E\u2FF0",11],["a997","\uE7F4",12],["a9f0","\uE801",14],["aaa1","\uE000",93],["aba1","\uE05E",93],["aca1","\uE0BC",93],["ada1","\uE11A",93],["aea1","\uE178",93],["afa1","\uE1D6",93],["d7fa","\uE810",4],["f8a1","\uE234",93],["f9a1","\uE292",93],["faa1","\uE2F0",93],["fba1","\uE34E",93],["fca1","\uE3AC",93],["fda1","\uE40A",93],["fe50","\u2E81\uE816\uE817\uE818\u2E84\u3473\u3447\u2E88\u2E8B\uE81E\u359E\u361A\u360E\u2E8C\u2E97\u396E\u3918\uE826\u39CF\u39DF\u3A73\u39D0\uE82B\uE82C\u3B4E\u3C6E\u3CE0\u2EA7\uE831\uE832\u2EAA\u4056\u415F\u2EAE\u4337\u2EB3\u2EB6\u2EB7\uE83B\u43B1\u43AC\u2EBB\u43DD\u44D6\u4661\u464C\uE843"],["fe80","\u4723\u4729\u477C\u478D\u2ECA\u4947\u497A\u497D\u4982\u4983\u4985\u4986\u499F\u499B\u49B7\u49B6\uE854\uE855\u4CA3\u4C9F\u4CA0\u4CA1\u4C77\u4CA2\u4D13",6,"\u4DAE\uE864\uE468",93]]});var yA4=o((IM$,_V9)=>{_V9.exports={uChars:[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],gbChars:[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]}});var bA4=o((CM$,jV9)=>{jV9.exports=[["0","\x00",127],["8141","\uAC02\uAC03\uAC05\uAC06\uAC0B",4,"\uAC18\uAC1E\uAC1F\uAC21\uAC22\uAC23\uAC25",6,"\uAC2E\uAC32\uAC33\uAC34"],["8161","\uAC35\uAC36\uAC37\uAC3A\uAC3B\uAC3D\uAC3E\uAC3F\uAC41",9,"\uAC4C\uAC4E",5,"\uAC55"],["8181","\uAC56\uAC57\uAC59\uAC5A\uAC5B\uAC5D",18,"\uAC72\uAC73\uAC75\uAC76\uAC79\uAC7B",4,"\uAC82\uAC87\uAC88\uAC8D\uAC8E\uAC8F\uAC91\uAC92\uAC93\uAC95",6,"\uAC9E\uACA2",5,"\uACAB\uACAD\uACAE\uACB1",6,"\uACBA\uACBE\uACBF\uACC0\uACC2\uACC3\uACC5\uACC6\uACC7\uACC9\uACCA\uACCB\uACCD",7,"\uACD6\uACD8",7,"\uACE2\uACE3\uACE5\uACE6\uACE9\uACEB\uACED\uACEE\uACF2\uACF4\uACF7",4,"\uACFE\uACFF\uAD01\uAD02\uAD03\uAD05\uAD07",4,"\uAD0E\uAD10\uAD12\uAD13"],["8241","\uAD14\uAD15\uAD16\uAD17\uAD19\uAD1A\uAD1B\uAD1D\uAD1E\uAD1F\uAD21",7,"\uAD2A\uAD2B\uAD2E",5],["8261","\uAD36\uAD37\uAD39\uAD3A\uAD3B\uAD3D",6,"\uAD46\uAD48\uAD4A",5,"\uAD51\uAD52\uAD53\uAD55\uAD56\uAD57"],["8281","\uAD59",7,"\uAD62\uAD64",7,"\uAD6E\uAD6F\uAD71\uAD72\uAD77\uAD78\uAD79\uAD7A\uAD7E\uAD80\uAD83",4,"\uAD8A\uAD8B\uAD8D\uAD8E\uAD8F\uAD91",10,"\uAD9E",5,"\uADA5",17,"\uADB8",7,"\uADC2\uADC3\uADC5\uADC6\uADC7\uADC9",6,"\uADD2\uADD4",7,"\uADDD\uADDE\uADDF\uADE1\uADE2\uADE3\uADE5",18],["8341","\uADFA\uADFB\uADFD\uADFE\uAE02",5,"\uAE0A\uAE0C\uAE0E",5,"\uAE15",7],["8361","\uAE1D",18,"\uAE32\uAE33\uAE35\uAE36\uAE39\uAE3B\uAE3C"],["8381","\uAE3D\uAE3E\uAE3F\uAE42\uAE44\uAE47\uAE48\uAE49\uAE4B\uAE4F\uAE51\uAE52\uAE53\uAE55\uAE57",4,"\uAE5E\uAE62\uAE63\uAE64\uAE66\uAE67\uAE6A\uAE6B\uAE6D\uAE6E\uAE6F\uAE71",6,"\uAE7A\uAE7E",5,"\uAE86",5,"\uAE8D",46,"\uAEBF\uAEC1\uAEC2\uAEC3\uAEC5",6,"\uAECE\uAED2",5,"\uAEDA\uAEDB\uAEDD",8],["8441","\uAEE6\uAEE7\uAEE9\uAEEA\uAEEC\uAEEE",5,"\uAEF5\uAEF6\uAEF7\uAEF9\uAEFA\uAEFB\uAEFD",8],["8461","\uAF06\uAF09\uAF0A\uAF0B\uAF0C\uAF0E\uAF0F\uAF11",18],["8481","\uAF24",7,"\uAF2E\uAF2F\uAF31\uAF33\uAF35",6,"\uAF3E\uAF40\uAF44\uAF45\uAF46\uAF47\uAF4A",5,"\uAF51",10,"\uAF5E",5,"\uAF66",18,"\uAF7A",5,"\uAF81\uAF82\uAF83\uAF85\uAF86\uAF87\uAF89",6,"\uAF92\uAF93\uAF94\uAF96",5,"\uAF9D",26,"\uAFBA\uAFBB\uAFBD\uAFBE"],["8541","\uAFBF\uAFC1",5,"\uAFCA\uAFCC\uAFCF",4,"\uAFD5",6,"\uAFDD",4],["8561","\uAFE2",5,"\uAFEA",5,"\uAFF2\uAFF3\uAFF5\uAFF6\uAFF7\uAFF9",6,"\uB002\uB003"],["8581","\uB005",6,"\uB00D\uB00E\uB00F\uB011\uB012\uB013\uB015",6,"\uB01E",9,"\uB029",26,"\uB046\uB047\uB049\uB04B\uB04D\uB04F\uB050\uB051\uB052\uB056\uB058\uB05A\uB05B\uB05C\uB05E",29,"\uB07E\uB07F\uB081\uB082\uB083\uB085",6,"\uB08E\uB090\uB092",5,"\uB09B\uB09D\uB09E\uB0A3\uB0A4"],["8641","\uB0A5\uB0A6\uB0A7\uB0AA\uB0B0\uB0B2\uB0B6\uB0B7\uB0B9\uB0BA\uB0BB\uB0BD",6,"\uB0C6\uB0CA",5,"\uB0D2"],["8661","\uB0D3\uB0D5\uB0D6\uB0D7\uB0D9",6,"\uB0E1\uB0E2\uB0E3\uB0E4\uB0E6",10],["8681","\uB0F1",22,"\uB10A\uB10D\uB10E\uB10F\uB111\uB114\uB115\uB116\uB117\uB11A\uB11E",4,"\uB126\uB127\uB129\uB12A\uB12B\uB12D",6,"\uB136\uB13A",5,"\uB142\uB143\uB145\uB146\uB147\uB149",6,"\uB152\uB153\uB156\uB157\uB159\uB15A\uB15B\uB15D\uB15E\uB15F\uB161",22,"\uB17A\uB17B\uB17D\uB17E\uB17F\uB181\uB183",4,"\uB18A\uB18C\uB18E\uB18F\uB190\uB191\uB195\uB196\uB197\uB199\uB19A\uB19B\uB19D"],["8741","\uB19E",9,"\uB1A9",15],["8761","\uB1B9",18,"\uB1CD\uB1CE\uB1CF\uB1D1\uB1D2\uB1D3\uB1D5"],["8781","\uB1D6",5,"\uB1DE\uB1E0",7,"\uB1EA\uB1EB\uB1ED\uB1EE\uB1EF\uB1F1",7,"\uB1FA\uB1FC\uB1FE",5,"\uB206\uB207\uB209\uB20A\uB20D",6,"\uB216\uB218\uB21A",5,"\uB221",18,"\uB235",6,"\uB23D",26,"\uB259\uB25A\uB25B\uB25D\uB25E\uB25F\uB261",6,"\uB26A",4],["8841","\uB26F",4,"\uB276",5,"\uB27D",6,"\uB286\uB287\uB288\uB28A",4],["8861","\uB28F\uB292\uB293\uB295\uB296\uB297\uB29B",4,"\uB2A2\uB2A4\uB2A7\uB2A8\uB2A9\uB2AB\uB2AD\uB2AE\uB2AF\uB2B1\uB2B2\uB2B3\uB2B5\uB2B6\uB2B7"],["8881","\uB2B8",15,"\uB2CA\uB2CB\uB2CD\uB2CE\uB2CF\uB2D1\uB2D3",4,"\uB2DA\uB2DC\uB2DE\uB2DF\uB2E0\uB2E1\uB2E3\uB2E7\uB2E9\uB2EA\uB2F0\uB2F1\uB2F2\uB2F6\uB2FC\uB2FD\uB2FE\uB302\uB303\uB305\uB306\uB307\uB309",6,"\uB312\uB316",5,"\uB31D",54,"\uB357\uB359\uB35A\uB35D\uB360\uB361\uB362\uB363"],["8941","\uB366\uB368\uB36A\uB36C\uB36D\uB36F\uB372\uB373\uB375\uB376\uB377\uB379",6,"\uB382\uB386",5,"\uB38D"],["8961","\uB38E\uB38F\uB391\uB392\uB393\uB395",10,"\uB3A2",5,"\uB3A9\uB3AA\uB3AB\uB3AD"],["8981","\uB3AE",21,"\uB3C6\uB3C7\uB3C9\uB3CA\uB3CD\uB3CF\uB3D1\uB3D2\uB3D3\uB3D6\uB3D8\uB3DA\uB3DC\uB3DE\uB3DF\uB3E1\uB3E2\uB3E3\uB3E5\uB3E6\uB3E7\uB3E9",18,"\uB3FD",18,"\uB411",6,"\uB419\uB41A\uB41B\uB41D\uB41E\uB41F\uB421",6,"\uB42A\uB42C",7,"\uB435",15],["8a41","\uB445",10,"\uB452\uB453\uB455\uB456\uB457\uB459",6,"\uB462\uB464\uB466"],["8a61","\uB467",4,"\uB46D",18,"\uB481\uB482"],["8a81","\uB483",4,"\uB489",19,"\uB49E",5,"\uB4A5\uB4A6\uB4A7\uB4A9\uB4AA\uB4AB\uB4AD",7,"\uB4B6\uB4B8\uB4BA",5,"\uB4C1\uB4C2\uB4C3\uB4C5\uB4C6\uB4C7\uB4C9",6,"\uB4D1\uB4D2\uB4D3\uB4D4\uB4D6",5,"\uB4DE\uB4DF\uB4E1\uB4E2\uB4E5\uB4E7",4,"\uB4EE\uB4F0\uB4F2",5,"\uB4F9",26,"\uB516\uB517\uB519\uB51A\uB51D"],["8b41","\uB51E",5,"\uB526\uB52B",4,"\uB532\uB533\uB535\uB536\uB537\uB539",6,"\uB542\uB546"],["8b61","\uB547\uB548\uB549\uB54A\uB54E\uB54F\uB551\uB552\uB553\uB555",6,"\uB55E\uB562",8],["8b81","\uB56B",52,"\uB5A2\uB5A3\uB5A5\uB5A6\uB5A7\uB5A9\uB5AC\uB5AD\uB5AE\uB5AF\uB5B2\uB5B6",4,"\uB5BE\uB5BF\uB5C1\uB5C2\uB5C3\uB5C5",6,"\uB5CE\uB5D2",5,"\uB5D9",18,"\uB5ED",18],["8c41","\uB600",15,"\uB612\uB613\uB615\uB616\uB617\uB619",4],["8c61","\uB61E",6,"\uB626",5,"\uB62D",6,"\uB635",5],["8c81","\uB63B",12,"\uB649",26,"\uB665\uB666\uB667\uB669",50,"\uB69E\uB69F\uB6A1\uB6A2\uB6A3\uB6A5",5,"\uB6AD\uB6AE\uB6AF\uB6B0\uB6B2",16],["8d41","\uB6C3",16,"\uB6D5",8],["8d61","\uB6DE",17,"\uB6F1\uB6F2\uB6F3\uB6F5\uB6F6\uB6F7\uB6F9\uB6FA"],["8d81","\uB6FB",4,"\uB702\uB703\uB704\uB706",33,"\uB72A\uB72B\uB72D\uB72E\uB731",6,"\uB73A\uB73C",7,"\uB745\uB746\uB747\uB749\uB74A\uB74B\uB74D",6,"\uB756",9,"\uB761\uB762\uB763\uB765\uB766\uB767\uB769",6,"\uB772\uB774\uB776",5,"\uB77E\uB77F\uB781\uB782\uB783\uB785",6,"\uB78E\uB793\uB794\uB795\uB79A\uB79B\uB79D\uB79E"],["8e41","\uB79F\uB7A1",6,"\uB7AA\uB7AE",5,"\uB7B6\uB7B7\uB7B9",8],["8e61","\uB7C2",4,"\uB7C8\uB7CA",19],["8e81","\uB7DE",13,"\uB7EE\uB7EF\uB7F1\uB7F2\uB7F3\uB7F5",6,"\uB7FE\uB802",4,"\uB80A\uB80B\uB80D\uB80E\uB80F\uB811",6,"\uB81A\uB81C\uB81E",5,"\uB826\uB827\uB829\uB82A\uB82B\uB82D",6,"\uB836\uB83A",5,"\uB841\uB842\uB843\uB845",11,"\uB852\uB854",7,"\uB85E\uB85F\uB861\uB862\uB863\uB865",6,"\uB86E\uB870\uB872",5,"\uB879\uB87A\uB87B\uB87D",7],["8f41","\uB885",7,"\uB88E",17],["8f61","\uB8A0",7,"\uB8A9",6,"\uB8B1\uB8B2\uB8B3\uB8B5\uB8B6\uB8B7\uB8B9",4],["8f81","\uB8BE\uB8BF\uB8C2\uB8C4\uB8C6",5,"\uB8CD\uB8CE\uB8CF\uB8D1\uB8D2\uB8D3\uB8D5",7,"\uB8DE\uB8E0\uB8E2",5,"\uB8EA\uB8EB\uB8ED\uB8EE\uB8EF\uB8F1",6,"\uB8FA\uB8FC\uB8FE",5,"\uB905",18,"\uB919",6,"\uB921",26,"\uB93E\uB93F\uB941\uB942\uB943\uB945",6,"\uB94D\uB94E\uB950\uB952",5],["9041","\uB95A\uB95B\uB95D\uB95E\uB95F\uB961",6,"\uB96A\uB96C\uB96E",5,"\uB976\uB977\uB979\uB97A\uB97B\uB97D"],["9061","\uB97E",5,"\uB986\uB988\uB98B\uB98C\uB98F",15],["9081","\uB99F",12,"\uB9AE\uB9AF\uB9B1\uB9B2\uB9B3\uB9B5",6,"\uB9BE\uB9C0\uB9C2",5,"\uB9CA\uB9CB\uB9CD\uB9D3",4,"\uB9DA\uB9DC\uB9DF\uB9E0\uB9E2\uB9E6\uB9E7\uB9E9\uB9EA\uB9EB\uB9ED",6,"\uB9F6\uB9FB",4,"\uBA02",5,"\uBA09",11,"\uBA16",33,"\uBA3A\uBA3B\uBA3D\uBA3E\uBA3F\uBA41\uBA43\uBA44\uBA45\uBA46"],["9141","\uBA47\uBA4A\uBA4C\uBA4F\uBA50\uBA51\uBA52\uBA56\uBA57\uBA59\uBA5A\uBA5B\uBA5D",6,"\uBA66\uBA6A",5],["9161","\uBA72\uBA73\uBA75\uBA76\uBA77\uBA79",9,"\uBA86\uBA88\uBA89\uBA8A\uBA8B\uBA8D",5],["9181","\uBA93",20,"\uBAAA\uBAAD\uBAAE\uBAAF\uBAB1\uBAB3",4,"\uBABA\uBABC\uBABE",5,"\uBAC5\uBAC6\uBAC7\uBAC9",14,"\uBADA",33,"\uBAFD\uBAFE\uBAFF\uBB01\uBB02\uBB03\uBB05",7,"\uBB0E\uBB10\uBB12",5,"\uBB19\uBB1A\uBB1B\uBB1D\uBB1E\uBB1F\uBB21",6],["9241","\uBB28\uBB2A\uBB2C",7,"\uBB37\uBB39\uBB3A\uBB3F",4,"\uBB46\uBB48\uBB4A\uBB4B\uBB4C\uBB4E\uBB51\uBB52"],["9261","\uBB53\uBB55\uBB56\uBB57\uBB59",7,"\uBB62\uBB64",7,"\uBB6D",4],["9281","\uBB72",21,"\uBB89\uBB8A\uBB8B\uBB8D\uBB8E\uBB8F\uBB91",18,"\uBBA5\uBBA6\uBBA7\uBBA9\uBBAA\uBBAB\uBBAD",6,"\uBBB5\uBBB6\uBBB8",7,"\uBBC1\uBBC2\uBBC3\uBBC5\uBBC6\uBBC7\uBBC9",6,"\uBBD1\uBBD2\uBBD4",35,"\uBBFA\uBBFB\uBBFD\uBBFE\uBC01"],["9341","\uBC03",4,"\uBC0A\uBC0E\uBC10\uBC12\uBC13\uBC19\uBC1A\uBC20\uBC21\uBC22\uBC23\uBC26\uBC28\uBC2A\uBC2B\uBC2C\uBC2E\uBC2F\uBC32\uBC33\uBC35"],["9361","\uBC36\uBC37\uBC39",6,"\uBC42\uBC46\uBC47\uBC48\uBC4A\uBC4B\uBC4E\uBC4F\uBC51",8],["9381","\uBC5A\uBC5B\uBC5C\uBC5E",37,"\uBC86\uBC87\uBC89\uBC8A\uBC8D\uBC8F",4,"\uBC96\uBC98\uBC9B",4,"\uBCA2\uBCA3\uBCA5\uBCA6\uBCA9",6,"\uBCB2\uBCB6",5,"\uBCBE\uBCBF\uBCC1\uBCC2\uBCC3\uBCC5",7,"\uBCCE\uBCD2\uBCD3\uBCD4\uBCD6\uBCD7\uBCD9\uBCDA\uBCDB\uBCDD",22,"\uBCF7\uBCF9\uBCFA\uBCFB\uBCFD"],["9441","\uBCFE",5,"\uBD06\uBD08\uBD0A",5,"\uBD11\uBD12\uBD13\uBD15",8],["9461","\uBD1E",5,"\uBD25",6,"\uBD2D",12],["9481","\uBD3A",5,"\uBD41",6,"\uBD4A\uBD4B\uBD4D\uBD4E\uBD4F\uBD51",6,"\uBD5A",9,"\uBD65\uBD66\uBD67\uBD69",22,"\uBD82\uBD83\uBD85\uBD86\uBD8B",4,"\uBD92\uBD94\uBD96\uBD97\uBD98\uBD9B\uBD9D",6,"\uBDA5",10,"\uBDB1",6,"\uBDB9",24],["9541","\uBDD2\uBDD3\uBDD6\uBDD7\uBDD9\uBDDA\uBDDB\uBDDD",11,"\uBDEA",5,"\uBDF1"],["9561","\uBDF2\uBDF3\uBDF5\uBDF6\uBDF7\uBDF9",6,"\uBE01\uBE02\uBE04\uBE06",5,"\uBE0E\uBE0F\uBE11\uBE12\uBE13"],["9581","\uBE15",6,"\uBE1E\uBE20",35,"\uBE46\uBE47\uBE49\uBE4A\uBE4B\uBE4D\uBE4F",4,"\uBE56\uBE58\uBE5C\uBE5D\uBE5E\uBE5F\uBE62\uBE63\uBE65\uBE66\uBE67\uBE69\uBE6B",4,"\uBE72\uBE76",4,"\uBE7E\uBE7F\uBE81\uBE82\uBE83\uBE85",6,"\uBE8E\uBE92",5,"\uBE9A",13,"\uBEA9",14],["9641","\uBEB8",23,"\uBED2\uBED3"],["9661","\uBED5\uBED6\uBED9",6,"\uBEE1\uBEE2\uBEE6",5,"\uBEED",8],["9681","\uBEF6",10,"\uBF02",5,"\uBF0A",13,"\uBF1A\uBF1E",33,"\uBF42\uBF43\uBF45\uBF46\uBF47\uBF49",6,"\uBF52\uBF53\uBF54\uBF56",44],["9741","\uBF83",16,"\uBF95",8],["9761","\uBF9E",17,"\uBFB1",7],["9781","\uBFB9",11,"\uBFC6",5,"\uBFCE\uBFCF\uBFD1\uBFD2\uBFD3\uBFD5",6,"\uBFDD\uBFDE\uBFE0\uBFE2",89,"\uC03D\uC03E\uC03F"],["9841","\uC040",16,"\uC052",5,"\uC059\uC05A\uC05B"],["9861","\uC05D\uC05E\uC05F\uC061",6,"\uC06A",15],["9881","\uC07A",21,"\uC092\uC093\uC095\uC096\uC097\uC099",6,"\uC0A2\uC0A4\uC0A6",5,"\uC0AE\uC0B1\uC0B2\uC0B7",4,"\uC0BE\uC0C2\uC0C3\uC0C4\uC0C6\uC0C7\uC0CA\uC0CB\uC0CD\uC0CE\uC0CF\uC0D1",6,"\uC0DA\uC0DE",5,"\uC0E6\uC0E7\uC0E9\uC0EA\uC0EB\uC0ED",6,"\uC0F6\uC0F8\uC0FA",5,"\uC101\uC102\uC103\uC105\uC106\uC107\uC109",6,"\uC111\uC112\uC113\uC114\uC116",5,"\uC121\uC122\uC125\uC128\uC129\uC12A\uC12B\uC12E"],["9941","\uC132\uC133\uC134\uC135\uC137\uC13A\uC13B\uC13D\uC13E\uC13F\uC141",6,"\uC14A\uC14E",5,"\uC156\uC157"],["9961","\uC159\uC15A\uC15B\uC15D",6,"\uC166\uC16A",5,"\uC171\uC172\uC173\uC175\uC176\uC177\uC179\uC17A\uC17B"],["9981","\uC17C",8,"\uC186",5,"\uC18F\uC191\uC192\uC193\uC195\uC197",4,"\uC19E\uC1A0\uC1A2\uC1A3\uC1A4\uC1A6\uC1A7\uC1AA\uC1AB\uC1AD\uC1AE\uC1AF\uC1B1",11,"\uC1BE",5,"\uC1C5\uC1C6\uC1C7\uC1C9\uC1CA\uC1CB\uC1CD",6,"\uC1D5\uC1D6\uC1D9",6,"\uC1E1\uC1E2\uC1E3\uC1E5\uC1E6\uC1E7\uC1E9",6,"\uC1F2\uC1F4",7,"\uC1FE\uC1FF\uC201\uC202\uC203\uC205",6,"\uC20E\uC210\uC212",5,"\uC21A\uC21B\uC21D\uC21E\uC221\uC222\uC223"],["9a41","\uC224\uC225\uC226\uC227\uC22A\uC22C\uC22E\uC230\uC233\uC235",16],["9a61","\uC246\uC247\uC249",6,"\uC252\uC253\uC255\uC256\uC257\uC259",6,"\uC261\uC262\uC263\uC264\uC266"],["9a81","\uC267",4,"\uC26E\uC26F\uC271\uC272\uC273\uC275",6,"\uC27E\uC280\uC282",5,"\uC28A",5,"\uC291",6,"\uC299\uC29A\uC29C\uC29E",5,"\uC2A6\uC2A7\uC2A9\uC2AA\uC2AB\uC2AE",5,"\uC2B6\uC2B8\uC2BA",33,"\uC2DE\uC2DF\uC2E1\uC2E2\uC2E5",5,"\uC2EE\uC2F0\uC2F2\uC2F3\uC2F4\uC2F5\uC2F7\uC2FA\uC2FD\uC2FE\uC2FF\uC301",6,"\uC30A\uC30B\uC30E\uC30F"],["9b41","\uC310\uC311\uC312\uC316\uC317\uC319\uC31A\uC31B\uC31D",6,"\uC326\uC327\uC32A",8],["9b61","\uC333",17,"\uC346",7],["9b81","\uC34E",25,"\uC36A\uC36B\uC36D\uC36E\uC36F\uC371\uC373",4,"\uC37A\uC37B\uC37E",5,"\uC385\uC386\uC387\uC389\uC38A\uC38B\uC38D",50,"\uC3C1",22,"\uC3DA"],["9c41","\uC3DB\uC3DD\uC3DE\uC3E1\uC3E3",4,"\uC3EA\uC3EB\uC3EC\uC3EE",5,"\uC3F6\uC3F7\uC3F9",5],["9c61","\uC3FF",8,"\uC409",6,"\uC411",9],["9c81","\uC41B",8,"\uC425",6,"\uC42D\uC42E\uC42F\uC431\uC432\uC433\uC435",6,"\uC43E",9,"\uC449",26,"\uC466\uC467\uC469\uC46A\uC46B\uC46D",6,"\uC476\uC477\uC478\uC47A",5,"\uC481",18,"\uC495",6,"\uC49D",12],["9d41","\uC4AA",13,"\uC4B9\uC4BA\uC4BB\uC4BD",8],["9d61","\uC4C6",25],["9d81","\uC4E0",8,"\uC4EA",5,"\uC4F2\uC4F3\uC4F5\uC4F6\uC4F7\uC4F9\uC4FB\uC4FC\uC4FD\uC4FE\uC502",9,"\uC50D\uC50E\uC50F\uC511\uC512\uC513\uC515",6,"\uC51D",10,"\uC52A\uC52B\uC52D\uC52E\uC52F\uC531",6,"\uC53A\uC53C\uC53E",5,"\uC546\uC547\uC54B\uC54F\uC550\uC551\uC552\uC556\uC55A\uC55B\uC55C\uC55F\uC562\uC563\uC565\uC566\uC567\uC569",6,"\uC572\uC576",5,"\uC57E\uC57F\uC581\uC582\uC583\uC585\uC586\uC588\uC589\uC58A\uC58B\uC58E\uC590\uC592\uC593\uC594"],["9e41","\uC596\uC599\uC59A\uC59B\uC59D\uC59E\uC59F\uC5A1",7,"\uC5AA",9,"\uC5B6"],["9e61","\uC5B7\uC5BA\uC5BF",4,"\uC5CB\uC5CD\uC5CF\uC5D2\uC5D3\uC5D5\uC5D6\uC5D7\uC5D9",6,"\uC5E2\uC5E4\uC5E6\uC5E7"],["9e81","\uC5E8\uC5E9\uC5EA\uC5EB\uC5EF\uC5F1\uC5F2\uC5F3\uC5F5\uC5F8\uC5F9\uC5FA\uC5FB\uC602\uC603\uC604\uC609\uC60A\uC60B\uC60D\uC60E\uC60F\uC611",6,"\uC61A\uC61D",6,"\uC626\uC627\uC629\uC62A\uC62B\uC62F\uC631\uC632\uC636\uC638\uC63A\uC63C\uC63D\uC63E\uC63F\uC642\uC643\uC645\uC646\uC647\uC649",6,"\uC652\uC656",5,"\uC65E\uC65F\uC661",10,"\uC66D\uC66E\uC670\uC672",5,"\uC67A\uC67B\uC67D\uC67E\uC67F\uC681",6,"\uC68A\uC68C\uC68E",5,"\uC696\uC697\uC699\uC69A\uC69B\uC69D",6,"\uC6A6"],["9f41","\uC6A8\uC6AA",5,"\uC6B2\uC6B3\uC6B5\uC6B6\uC6B7\uC6BB",4,"\uC6C2\uC6C4\uC6C6",5,"\uC6CE"],["9f61","\uC6CF\uC6D1\uC6D2\uC6D3\uC6D5",6,"\uC6DE\uC6DF\uC6E2",5,"\uC6EA\uC6EB\uC6ED\uC6EE\uC6EF\uC6F1\uC6F2"],["9f81","\uC6F3",4,"\uC6FA\uC6FB\uC6FC\uC6FE",5,"\uC706\uC707\uC709\uC70A\uC70B\uC70D",6,"\uC716\uC718\uC71A",5,"\uC722\uC723\uC725\uC726\uC727\uC729",6,"\uC732\uC734\uC736\uC738\uC739\uC73A\uC73B\uC73E\uC73F\uC741\uC742\uC743\uC745",4,"\uC74B\uC74E\uC750\uC759\uC75A\uC75B\uC75D\uC75E\uC75F\uC761",6,"\uC769\uC76A\uC76C",7,"\uC776\uC777\uC779\uC77A\uC77B\uC77F\uC780\uC781\uC782\uC786\uC78B\uC78C\uC78D\uC78F\uC792\uC793\uC795\uC799\uC79B",4,"\uC7A2\uC7A7",4,"\uC7AE\uC7AF\uC7B1\uC7B2\uC7B3\uC7B5\uC7B6\uC7B7"],["a041","\uC7B8\uC7B9\uC7BA\uC7BB\uC7BE\uC7C2",5,"\uC7CA\uC7CB\uC7CD\uC7CF\uC7D1",6,"\uC7D9\uC7DA\uC7DB\uC7DC"],["a061","\uC7DE",5,"\uC7E5\uC7E6\uC7E7\uC7E9\uC7EA\uC7EB\uC7ED",13],["a081","\uC7FB",4,"\uC802\uC803\uC805\uC806\uC807\uC809\uC80B",4,"\uC812\uC814\uC817",4,"\uC81E\uC81F\uC821\uC822\uC823\uC825",6,"\uC82E\uC830\uC832",5,"\uC839\uC83A\uC83B\uC83D\uC83E\uC83F\uC841",6,"\uC84A\uC84B\uC84E",5,"\uC855",26,"\uC872\uC873\uC875\uC876\uC877\uC879\uC87B",4,"\uC882\uC884\uC888\uC889\uC88A\uC88E",5,"\uC895",7,"\uC89E\uC8A0\uC8A2\uC8A3\uC8A4"],["a141","\uC8A5\uC8A6\uC8A7\uC8A9",18,"\uC8BE\uC8BF\uC8C0\uC8C1"],["a161","\uC8C2\uC8C3\uC8C5\uC8C6\uC8C7\uC8C9\uC8CA\uC8CB\uC8CD",6,"\uC8D6\uC8D8\uC8DA",5,"\uC8E2\uC8E3\uC8E5"],["a181","\uC8E6",14,"\uC8F6",5,"\uC8FE\uC8FF\uC901\uC902\uC903\uC907",4,"\uC90E\u3000\u3001\u3002\xB7\u2025\u2026\xA8\u3003\xAD\u2015\u2225\uFF3C\u223C\u2018\u2019\u201C\u201D\u3014\u3015\u3008",9,"\xB1\xD7\xF7\u2260\u2264\u2265\u221E\u2234\xB0\u2032\u2033\u2103\u212B\uFFE0\uFFE1\uFFE5\u2642\u2640\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\xA7\u203B\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u2192\u2190\u2191\u2193\u2194\u3013\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229\u2227\u2228\uFFE2"],["a241","\uC910\uC912",5,"\uC919",18],["a261","\uC92D",6,"\uC935",18],["a281","\uC948",7,"\uC952\uC953\uC955\uC956\uC957\uC959",6,"\uC962\uC964",7,"\uC96D\uC96E\uC96F\u21D2\u21D4\u2200\u2203\xB4\uFF5E\u02C7\u02D8\u02DD\u02DA\u02D9\xB8\u02DB\xA1\xBF\u02D0\u222E\u2211\u220F\xA4\u2109\u2030\u25C1\u25C0\u25B7\u25B6\u2664\u2660\u2661\u2665\u2667\u2663\u2299\u25C8\u25A3\u25D0\u25D1\u2592\u25A4\u25A5\u25A8\u25A7\u25A6\u25A9\u2668\u260F\u260E\u261C\u261E\xB6\u2020\u2021\u2195\u2197\u2199\u2196\u2198\u266D\u2669\u266A\u266C\u327F\u321C\u2116\u33C7\u2122\u33C2\u33D8\u2121\u20AC\xAE"],["a341","\uC971\uC972\uC973\uC975",6,"\uC97D",10,"\uC98A\uC98B\uC98D\uC98E\uC98F"],["a361","\uC991",6,"\uC99A\uC99C\uC99E",16],["a381","\uC9AF",16,"\uC9C2\uC9C3\uC9C5\uC9C6\uC9C9\uC9CB",4,"\uC9D2\uC9D4\uC9D7\uC9D8\uC9DB\uFF01",58,"\uFFE6\uFF3D",32,"\uFFE3"],["a441","\uC9DE\uC9DF\uC9E1\uC9E3\uC9E5\uC9E6\uC9E8\uC9E9\uC9EA\uC9EB\uC9EE\uC9F2",5,"\uC9FA\uC9FB\uC9FD\uC9FE\uC9FF\uCA01\uCA02\uCA03\uCA04"],["a461","\uCA05\uCA06\uCA07\uCA0A\uCA0E",5,"\uCA15\uCA16\uCA17\uCA19",12],["a481","\uCA26\uCA27\uCA28\uCA2A",28,"\u3131",93],["a541","\uCA47",4,"\uCA4E\uCA4F\uCA51\uCA52\uCA53\uCA55",6,"\uCA5E\uCA62",5,"\uCA69\uCA6A"],["a561","\uCA6B",17,"\uCA7E",5,"\uCA85\uCA86"],["a581","\uCA87",16,"\uCA99",14,"\u2170",9],["a5b0","\u2160",9],["a5c1","\u0391",16,"\u03A3",6],["a5e1","\u03B1",16,"\u03C3",6],["a641","\uCAA8",19,"\uCABE\uCABF\uCAC1\uCAC2\uCAC3\uCAC5"],["a661","\uCAC6",5,"\uCACE\uCAD0\uCAD2\uCAD4\uCAD5\uCAD6\uCAD7\uCADA",5,"\uCAE1",6],["a681","\uCAE8\uCAE9\uCAEA\uCAEB\uCAED",6,"\uCAF5",18,"\uCB09\uCB0A\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542\u2512\u2511\u251A\u2519\u2516\u2515\u250E\u250D\u251E\u251F\u2521\u2522\u2526\u2527\u2529\u252A\u252D\u252E\u2531\u2532\u2535\u2536\u2539\u253A\u253D\u253E\u2540\u2541\u2543",7],["a741","\uCB0B",4,"\uCB11\uCB12\uCB13\uCB15\uCB16\uCB17\uCB19",6,"\uCB22",7],["a761","\uCB2A",22,"\uCB42\uCB43\uCB44"],["a781","\uCB45\uCB46\uCB47\uCB4A\uCB4B\uCB4D\uCB4E\uCB4F\uCB51",6,"\uCB5A\uCB5B\uCB5C\uCB5E",5,"\uCB65",7,"\u3395\u3396\u3397\u2113\u3398\u33C4\u33A3\u33A4\u33A5\u33A6\u3399",9,"\u33CA\u338D\u338E\u338F\u33CF\u3388\u3389\u33C8\u33A7\u33A8\u33B0",9,"\u3380",4,"\u33BA",5,"\u3390",4,"\u2126\u33C0\u33C1\u338A\u338B\u338C\u33D6\u33C5\u33AD\u33AE\u33AF\u33DB\u33A9\u33AA\u33AB\u33AC\u33DD\u33D0\u33D3\u33C3\u33C9\u33DC\u33C6"],["a841","\uCB6D",10,"\uCB7A",14],["a861","\uCB89",18,"\uCB9D",6],["a881","\uCBA4",19,"\uCBB9",11,"\xC6\xD0\xAA\u0126"],["a8a6","\u0132"],["a8a8","\u013F\u0141\xD8\u0152\xBA\xDE\u0166\u014A"],["a8b1","\u3260",27,"\u24D0",25,"\u2460",14,"\xBD\u2153\u2154\xBC\xBE\u215B\u215C\u215D\u215E"],["a941","\uCBC5",14,"\uCBD5",10],["a961","\uCBE0\uCBE1\uCBE2\uCBE3\uCBE5\uCBE6\uCBE8\uCBEA",18],["a981","\uCBFD",14,"\uCC0E\uCC0F\uCC11\uCC12\uCC13\uCC15",6,"\uCC1E\uCC1F\uCC20\uCC23\uCC24\xE6\u0111\xF0\u0127\u0131\u0133\u0138\u0140\u0142\xF8\u0153\xDF\xFE\u0167\u014B\u0149\u3200",27,"\u249C",25,"\u2474",14,"\xB9\xB2\xB3\u2074\u207F\u2081\u2082\u2083\u2084"],["aa41","\uCC25\uCC26\uCC2A\uCC2B\uCC2D\uCC2F\uCC31",6,"\uCC3A\uCC3F",4,"\uCC46\uCC47\uCC49\uCC4A\uCC4B\uCC4D\uCC4E"],["aa61","\uCC4F",4,"\uCC56\uCC5A",5,"\uCC61\uCC62\uCC63\uCC65\uCC67\uCC69",6,"\uCC71\uCC72"],["aa81","\uCC73\uCC74\uCC76",29,"\u3041",82],["ab41","\uCC94\uCC95\uCC96\uCC97\uCC9A\uCC9B\uCC9D\uCC9E\uCC9F\uCCA1",6,"\uCCAA\uCCAE",5,"\uCCB6\uCCB7\uCCB9"],["ab61","\uCCBA\uCCBB\uCCBD",6,"\uCCC6\uCCC8\uCCCA",5,"\uCCD1\uCCD2\uCCD3\uCCD5",5],["ab81","\uCCDB",8,"\uCCE5",6,"\uCCED\uCCEE\uCCEF\uCCF1",12,"\u30A1",85],["ac41","\uCCFE\uCCFF\uCD00\uCD02",5,"\uCD0A\uCD0B\uCD0D\uCD0E\uCD0F\uCD11",6,"\uCD1A\uCD1C\uCD1E\uCD1F\uCD20"],["ac61","\uCD21\uCD22\uCD23\uCD25\uCD26\uCD27\uCD29\uCD2A\uCD2B\uCD2D",11,"\uCD3A",4],["ac81","\uCD3F",28,"\uCD5D\uCD5E\uCD5F\u0410",5,"\u0401\u0416",25],["acd1","\u0430",5,"\u0451\u0436",25],["ad41","\uCD61\uCD62\uCD63\uCD65",6,"\uCD6E\uCD70\uCD72",5,"\uCD79",7],["ad61","\uCD81",6,"\uCD89",10,"\uCD96\uCD97\uCD99\uCD9A\uCD9B\uCD9D\uCD9E\uCD9F"],["ad81","\uCDA0\uCDA1\uCDA2\uCDA3\uCDA6\uCDA8\uCDAA",5,"\uCDB1",18,"\uCDC5"],["ae41","\uCDC6",5,"\uCDCD\uCDCE\uCDCF\uCDD1",16],["ae61","\uCDE2",5,"\uCDE9\uCDEA\uCDEB\uCDED\uCDEE\uCDEF\uCDF1",6,"\uCDFA\uCDFC\uCDFE",4],["ae81","\uCE03\uCE05\uCE06\uCE07\uCE09\uCE0A\uCE0B\uCE0D",6,"\uCE15\uCE16\uCE17\uCE18\uCE1A",5,"\uCE22\uCE23\uCE25\uCE26\uCE27\uCE29\uCE2A\uCE2B"],["af41","\uCE2C\uCE2D\uCE2E\uCE2F\uCE32\uCE34\uCE36",19],["af61","\uCE4A",13,"\uCE5A\uCE5B\uCE5D\uCE5E\uCE62",5,"\uCE6A\uCE6C"],["af81","\uCE6E",5,"\uCE76\uCE77\uCE79\uCE7A\uCE7B\uCE7D",6,"\uCE86\uCE88\uCE8A",5,"\uCE92\uCE93\uCE95\uCE96\uCE97\uCE99"],["b041","\uCE9A",5,"\uCEA2\uCEA6",5,"\uCEAE",12],["b061","\uCEBB",5,"\uCEC2",19],["b081","\uCED6",13,"\uCEE6\uCEE7\uCEE9\uCEEA\uCEED",6,"\uCEF6\uCEFA",5,"\uAC00\uAC01\uAC04\uAC07\uAC08\uAC09\uAC0A\uAC10",7,"\uAC19",4,"\uAC20\uAC24\uAC2C\uAC2D\uAC2F\uAC30\uAC31\uAC38\uAC39\uAC3C\uAC40\uAC4B\uAC4D\uAC54\uAC58\uAC5C\uAC70\uAC71\uAC74\uAC77\uAC78\uAC7A\uAC80\uAC81\uAC83\uAC84\uAC85\uAC86\uAC89\uAC8A\uAC8B\uAC8C\uAC90\uAC94\uAC9C\uAC9D\uAC9F\uACA0\uACA1\uACA8\uACA9\uACAA\uACAC\uACAF\uACB0\uACB8\uACB9\uACBB\uACBC\uACBD\uACC1\uACC4\uACC8\uACCC\uACD5\uACD7\uACE0\uACE1\uACE4\uACE7\uACE8\uACEA\uACEC\uACEF\uACF0\uACF1\uACF3\uACF5\uACF6\uACFC\uACFD\uAD00\uAD04\uAD06"],["b141","\uCF02\uCF03\uCF05\uCF06\uCF07\uCF09",6,"\uCF12\uCF14\uCF16",5,"\uCF1D\uCF1E\uCF1F\uCF21\uCF22\uCF23"],["b161","\uCF25",6,"\uCF2E\uCF32",5,"\uCF39",11],["b181","\uCF45",14,"\uCF56\uCF57\uCF59\uCF5A\uCF5B\uCF5D",6,"\uCF66\uCF68\uCF6A\uCF6B\uCF6C\uAD0C\uAD0D\uAD0F\uAD11\uAD18\uAD1C\uAD20\uAD29\uAD2C\uAD2D\uAD34\uAD35\uAD38\uAD3C\uAD44\uAD45\uAD47\uAD49\uAD50\uAD54\uAD58\uAD61\uAD63\uAD6C\uAD6D\uAD70\uAD73\uAD74\uAD75\uAD76\uAD7B\uAD7C\uAD7D\uAD7F\uAD81\uAD82\uAD88\uAD89\uAD8C\uAD90\uAD9C\uAD9D\uADA4\uADB7\uADC0\uADC1\uADC4\uADC8\uADD0\uADD1\uADD3\uADDC\uADE0\uADE4\uADF8\uADF9\uADFC\uADFF\uAE00\uAE01\uAE08\uAE09\uAE0B\uAE0D\uAE14\uAE30\uAE31\uAE34\uAE37\uAE38\uAE3A\uAE40\uAE41\uAE43\uAE45\uAE46\uAE4A\uAE4C\uAE4D\uAE4E\uAE50\uAE54\uAE56\uAE5C\uAE5D\uAE5F\uAE60\uAE61\uAE65\uAE68\uAE69\uAE6C\uAE70\uAE78"],["b241","\uCF6D\uCF6E\uCF6F\uCF72\uCF73\uCF75\uCF76\uCF77\uCF79",6,"\uCF81\uCF82\uCF83\uCF84\uCF86",5,"\uCF8D"],["b261","\uCF8E",18,"\uCFA2",5,"\uCFA9"],["b281","\uCFAA",5,"\uCFB1",18,"\uCFC5",6,"\uAE79\uAE7B\uAE7C\uAE7D\uAE84\uAE85\uAE8C\uAEBC\uAEBD\uAEBE\uAEC0\uAEC4\uAECC\uAECD\uAECF\uAED0\uAED1\uAED8\uAED9\uAEDC\uAEE8\uAEEB\uAEED\uAEF4\uAEF8\uAEFC\uAF07\uAF08\uAF0D\uAF10\uAF2C\uAF2D\uAF30\uAF32\uAF34\uAF3C\uAF3D\uAF3F\uAF41\uAF42\uAF43\uAF48\uAF49\uAF50\uAF5C\uAF5D\uAF64\uAF65\uAF79\uAF80\uAF84\uAF88\uAF90\uAF91\uAF95\uAF9C\uAFB8\uAFB9\uAFBC\uAFC0\uAFC7\uAFC8\uAFC9\uAFCB\uAFCD\uAFCE\uAFD4\uAFDC\uAFE8\uAFE9\uAFF0\uAFF1\uAFF4\uAFF8\uB000\uB001\uB004\uB00C\uB010\uB014\uB01C\uB01D\uB028\uB044\uB045\uB048\uB04A\uB04C\uB04E\uB053\uB054\uB055\uB057\uB059"],["b341","\uCFCC",19,"\uCFE2\uCFE3\uCFE5\uCFE6\uCFE7\uCFE9"],["b361","\uCFEA",5,"\uCFF2\uCFF4\uCFF6",5,"\uCFFD\uCFFE\uCFFF\uD001\uD002\uD003\uD005",5],["b381","\uD00B",5,"\uD012",5,"\uD019",19,"\uB05D\uB07C\uB07D\uB080\uB084\uB08C\uB08D\uB08F\uB091\uB098\uB099\uB09A\uB09C\uB09F\uB0A0\uB0A1\uB0A2\uB0A8\uB0A9\uB0AB",4,"\uB0B1\uB0B3\uB0B4\uB0B5\uB0B8\uB0BC\uB0C4\uB0C5\uB0C7\uB0C8\uB0C9\uB0D0\uB0D1\uB0D4\uB0D8\uB0E0\uB0E5\uB108\uB109\uB10B\uB10C\uB110\uB112\uB113\uB118\uB119\uB11B\uB11C\uB11D\uB123\uB124\uB125\uB128\uB12C\uB134\uB135\uB137\uB138\uB139\uB140\uB141\uB144\uB148\uB150\uB151\uB154\uB155\uB158\uB15C\uB160\uB178\uB179\uB17C\uB180\uB182\uB188\uB189\uB18B\uB18D\uB192\uB193\uB194\uB198\uB19C\uB1A8\uB1CC\uB1D0\uB1D4\uB1DC\uB1DD"],["b441","\uD02E",5,"\uD036\uD037\uD039\uD03A\uD03B\uD03D",6,"\uD046\uD048\uD04A",5],["b461","\uD051\uD052\uD053\uD055\uD056\uD057\uD059",6,"\uD061",10,"\uD06E\uD06F"],["b481","\uD071\uD072\uD073\uD075",6,"\uD07E\uD07F\uD080\uD082",18,"\uB1DF\uB1E8\uB1E9\uB1EC\uB1F0\uB1F9\uB1FB\uB1FD\uB204\uB205\uB208\uB20B\uB20C\uB214\uB215\uB217\uB219\uB220\uB234\uB23C\uB258\uB25C\uB260\uB268\uB269\uB274\uB275\uB27C\uB284\uB285\uB289\uB290\uB291\uB294\uB298\uB299\uB29A\uB2A0\uB2A1\uB2A3\uB2A5\uB2A6\uB2AA\uB2AC\uB2B0\uB2B4\uB2C8\uB2C9\uB2CC\uB2D0\uB2D2\uB2D8\uB2D9\uB2DB\uB2DD\uB2E2\uB2E4\uB2E5\uB2E6\uB2E8\uB2EB",4,"\uB2F3\uB2F4\uB2F5\uB2F7",4,"\uB2FF\uB300\uB301\uB304\uB308\uB310\uB311\uB313\uB314\uB315\uB31C\uB354\uB355\uB356\uB358\uB35B\uB35C\uB35E\uB35F\uB364\uB365"],["b541","\uD095",14,"\uD0A6\uD0A7\uD0A9\uD0AA\uD0AB\uD0AD",5],["b561","\uD0B3\uD0B6\uD0B8\uD0BA",5,"\uD0C2\uD0C3\uD0C5\uD0C6\uD0C7\uD0CA",5,"\uD0D2\uD0D6",4],["b581","\uD0DB\uD0DE\uD0DF\uD0E1\uD0E2\uD0E3\uD0E5",6,"\uD0EE\uD0F2",5,"\uD0F9",11,"\uB367\uB369\uB36B\uB36E\uB370\uB371\uB374\uB378\uB380\uB381\uB383\uB384\uB385\uB38C\uB390\uB394\uB3A0\uB3A1\uB3A8\uB3AC\uB3C4\uB3C5\uB3C8\uB3CB\uB3CC\uB3CE\uB3D0\uB3D4\uB3D5\uB3D7\uB3D9\uB3DB\uB3DD\uB3E0\uB3E4\uB3E8\uB3FC\uB410\uB418\uB41C\uB420\uB428\uB429\uB42B\uB434\uB450\uB451\uB454\uB458\uB460\uB461\uB463\uB465\uB46C\uB480\uB488\uB49D\uB4A4\uB4A8\uB4AC\uB4B5\uB4B7\uB4B9\uB4C0\uB4C4\uB4C8\uB4D0\uB4D5\uB4DC\uB4DD\uB4E0\uB4E3\uB4E4\uB4E6\uB4EC\uB4ED\uB4EF\uB4F1\uB4F8\uB514\uB515\uB518\uB51B\uB51C\uB524\uB525\uB527\uB528\uB529\uB52A\uB530\uB531\uB534\uB538"],["b641","\uD105",7,"\uD10E",17],["b661","\uD120",15,"\uD132\uD133\uD135\uD136\uD137\uD139\uD13B\uD13C\uD13D\uD13E"],["b681","\uD13F\uD142\uD146",5,"\uD14E\uD14F\uD151\uD152\uD153\uD155",6,"\uD15E\uD160\uD162",5,"\uD169\uD16A\uD16B\uD16D\uB540\uB541\uB543\uB544\uB545\uB54B\uB54C\uB54D\uB550\uB554\uB55C\uB55D\uB55F\uB560\uB561\uB5A0\uB5A1\uB5A4\uB5A8\uB5AA\uB5AB\uB5B0\uB5B1\uB5B3\uB5B4\uB5B5\uB5BB\uB5BC\uB5BD\uB5C0\uB5C4\uB5CC\uB5CD\uB5CF\uB5D0\uB5D1\uB5D8\uB5EC\uB610\uB611\uB614\uB618\uB625\uB62C\uB634\uB648\uB664\uB668\uB69C\uB69D\uB6A0\uB6A4\uB6AB\uB6AC\uB6B1\uB6D4\uB6F0\uB6F4\uB6F8\uB700\uB701\uB705\uB728\uB729\uB72C\uB72F\uB730\uB738\uB739\uB73B\uB744\uB748\uB74C\uB754\uB755\uB760\uB764\uB768\uB770\uB771\uB773\uB775\uB77C\uB77D\uB780\uB784\uB78C\uB78D\uB78F\uB790\uB791\uB792\uB796\uB797"],["b741","\uD16E",13,"\uD17D",6,"\uD185\uD186\uD187\uD189\uD18A"],["b761","\uD18B",20,"\uD1A2\uD1A3\uD1A5\uD1A6\uD1A7"],["b781","\uD1A9",6,"\uD1B2\uD1B4\uD1B6\uD1B7\uD1B8\uD1B9\uD1BB\uD1BD\uD1BE\uD1BF\uD1C1",14,"\uB798\uB799\uB79C\uB7A0\uB7A8\uB7A9\uB7AB\uB7AC\uB7AD\uB7B4\uB7B5\uB7B8\uB7C7\uB7C9\uB7EC\uB7ED\uB7F0\uB7F4\uB7FC\uB7FD\uB7FF\uB800\uB801\uB807\uB808\uB809\uB80C\uB810\uB818\uB819\uB81B\uB81D\uB824\uB825\uB828\uB82C\uB834\uB835\uB837\uB838\uB839\uB840\uB844\uB851\uB853\uB85C\uB85D\uB860\uB864\uB86C\uB86D\uB86F\uB871\uB878\uB87C\uB88D\uB8A8\uB8B0\uB8B4\uB8B8\uB8C0\uB8C1\uB8C3\uB8C5\uB8CC\uB8D0\uB8D4\uB8DD\uB8DF\uB8E1\uB8E8\uB8E9\uB8EC\uB8F0\uB8F8\uB8F9\uB8FB\uB8FD\uB904\uB918\uB920\uB93C\uB93D\uB940\uB944\uB94C\uB94F\uB951\uB958\uB959\uB95C\uB960\uB968\uB969"],["b841","\uD1D0",7,"\uD1D9",17],["b861","\uD1EB",8,"\uD1F5\uD1F6\uD1F7\uD1F9",13],["b881","\uD208\uD20A",5,"\uD211",24,"\uB96B\uB96D\uB974\uB975\uB978\uB97C\uB984\uB985\uB987\uB989\uB98A\uB98D\uB98E\uB9AC\uB9AD\uB9B0\uB9B4\uB9BC\uB9BD\uB9BF\uB9C1\uB9C8\uB9C9\uB9CC\uB9CE",4,"\uB9D8\uB9D9\uB9DB\uB9DD\uB9DE\uB9E1\uB9E3\uB9E4\uB9E5\uB9E8\uB9EC\uB9F4\uB9F5\uB9F7\uB9F8\uB9F9\uB9FA\uBA00\uBA01\uBA08\uBA15\uBA38\uBA39\uBA3C\uBA40\uBA42\uBA48\uBA49\uBA4B\uBA4D\uBA4E\uBA53\uBA54\uBA55\uBA58\uBA5C\uBA64\uBA65\uBA67\uBA68\uBA69\uBA70\uBA71\uBA74\uBA78\uBA83\uBA84\uBA85\uBA87\uBA8C\uBAA8\uBAA9\uBAAB\uBAAC\uBAB0\uBAB2\uBAB8\uBAB9\uBABB\uBABD\uBAC4\uBAC8\uBAD8\uBAD9\uBAFC"],["b941","\uD22A\uD22B\uD22E\uD22F\uD231\uD232\uD233\uD235",6,"\uD23E\uD240\uD242",5,"\uD249\uD24A\uD24B\uD24C"],["b961","\uD24D",14,"\uD25D",6,"\uD265\uD266\uD267\uD268"],["b981","\uD269",22,"\uD282\uD283\uD285\uD286\uD287\uD289\uD28A\uD28B\uD28C\uBB00\uBB04\uBB0D\uBB0F\uBB11\uBB18\uBB1C\uBB20\uBB29\uBB2B\uBB34\uBB35\uBB36\uBB38\uBB3B\uBB3C\uBB3D\uBB3E\uBB44\uBB45\uBB47\uBB49\uBB4D\uBB4F\uBB50\uBB54\uBB58\uBB61\uBB63\uBB6C\uBB88\uBB8C\uBB90\uBBA4\uBBA8\uBBAC\uBBB4\uBBB7\uBBC0\uBBC4\uBBC8\uBBD0\uBBD3\uBBF8\uBBF9\uBBFC\uBBFF\uBC00\uBC02\uBC08\uBC09\uBC0B\uBC0C\uBC0D\uBC0F\uBC11\uBC14",4,"\uBC1B",4,"\uBC24\uBC25\uBC27\uBC29\uBC2D\uBC30\uBC31\uBC34\uBC38\uBC40\uBC41\uBC43\uBC44\uBC45\uBC49\uBC4C\uBC4D\uBC50\uBC5D\uBC84\uBC85\uBC88\uBC8B\uBC8C\uBC8E\uBC94\uBC95\uBC97"],["ba41","\uD28D\uD28E\uD28F\uD292\uD293\uD294\uD296",5,"\uD29D\uD29E\uD29F\uD2A1\uD2A2\uD2A3\uD2A5",6,"\uD2AD"],["ba61","\uD2AE\uD2AF\uD2B0\uD2B2",5,"\uD2BA\uD2BB\uD2BD\uD2BE\uD2C1\uD2C3",4,"\uD2CA\uD2CC",5],["ba81","\uD2D2\uD2D3\uD2D5\uD2D6\uD2D7\uD2D9\uD2DA\uD2DB\uD2DD",6,"\uD2E6",9,"\uD2F2\uD2F3\uD2F5\uD2F6\uD2F7\uD2F9\uD2FA\uBC99\uBC9A\uBCA0\uBCA1\uBCA4\uBCA7\uBCA8\uBCB0\uBCB1\uBCB3\uBCB4\uBCB5\uBCBC\uBCBD\uBCC0\uBCC4\uBCCD\uBCCF\uBCD0\uBCD1\uBCD5\uBCD8\uBCDC\uBCF4\uBCF5\uBCF6\uBCF8\uBCFC\uBD04\uBD05\uBD07\uBD09\uBD10\uBD14\uBD24\uBD2C\uBD40\uBD48\uBD49\uBD4C\uBD50\uBD58\uBD59\uBD64\uBD68\uBD80\uBD81\uBD84\uBD87\uBD88\uBD89\uBD8A\uBD90\uBD91\uBD93\uBD95\uBD99\uBD9A\uBD9C\uBDA4\uBDB0\uBDB8\uBDD4\uBDD5\uBDD8\uBDDC\uBDE9\uBDF0\uBDF4\uBDF8\uBE00\uBE03\uBE05\uBE0C\uBE0D\uBE10\uBE14\uBE1C\uBE1D\uBE1F\uBE44\uBE45\uBE48\uBE4C\uBE4E\uBE54\uBE55\uBE57\uBE59\uBE5A\uBE5B\uBE60\uBE61\uBE64"],["bb41","\uD2FB",4,"\uD302\uD304\uD306",5,"\uD30F\uD311\uD312\uD313\uD315\uD317",4,"\uD31E\uD322\uD323"],["bb61","\uD324\uD326\uD327\uD32A\uD32B\uD32D\uD32E\uD32F\uD331",6,"\uD33A\uD33E",5,"\uD346\uD347\uD348\uD349"],["bb81","\uD34A",31,"\uBE68\uBE6A\uBE70\uBE71\uBE73\uBE74\uBE75\uBE7B\uBE7C\uBE7D\uBE80\uBE84\uBE8C\uBE8D\uBE8F\uBE90\uBE91\uBE98\uBE99\uBEA8\uBED0\uBED1\uBED4\uBED7\uBED8\uBEE0\uBEE3\uBEE4\uBEE5\uBEEC\uBF01\uBF08\uBF09\uBF18\uBF19\uBF1B\uBF1C\uBF1D\uBF40\uBF41\uBF44\uBF48\uBF50\uBF51\uBF55\uBF94\uBFB0\uBFC5\uBFCC\uBFCD\uBFD0\uBFD4\uBFDC\uBFDF\uBFE1\uC03C\uC051\uC058\uC05C\uC060\uC068\uC069\uC090\uC091\uC094\uC098\uC0A0\uC0A1\uC0A3\uC0A5\uC0AC\uC0AD\uC0AF\uC0B0\uC0B3\uC0B4\uC0B5\uC0B6\uC0BC\uC0BD\uC0BF\uC0C0\uC0C1\uC0C5\uC0C8\uC0C9\uC0CC\uC0D0\uC0D8\uC0D9\uC0DB\uC0DC\uC0DD\uC0E4"],["bc41","\uD36A",17,"\uD37E\uD37F\uD381\uD382\uD383\uD385\uD386\uD387"],["bc61","\uD388\uD389\uD38A\uD38B\uD38E\uD392",5,"\uD39A\uD39B\uD39D\uD39E\uD39F\uD3A1",6,"\uD3AA\uD3AC\uD3AE"],["bc81","\uD3AF",4,"\uD3B5\uD3B6\uD3B7\uD3B9\uD3BA\uD3BB\uD3BD",6,"\uD3C6\uD3C7\uD3CA",5,"\uD3D1",5,"\uC0E5\uC0E8\uC0EC\uC0F4\uC0F5\uC0F7\uC0F9\uC100\uC104\uC108\uC110\uC115\uC11C",4,"\uC123\uC124\uC126\uC127\uC12C\uC12D\uC12F\uC130\uC131\uC136\uC138\uC139\uC13C\uC140\uC148\uC149\uC14B\uC14C\uC14D\uC154\uC155\uC158\uC15C\uC164\uC165\uC167\uC168\uC169\uC170\uC174\uC178\uC185\uC18C\uC18D\uC18E\uC190\uC194\uC196\uC19C\uC19D\uC19F\uC1A1\uC1A5\uC1A8\uC1A9\uC1AC\uC1B0\uC1BD\uC1C4\uC1C8\uC1CC\uC1D4\uC1D7\uC1D8\uC1E0\uC1E4\uC1E8\uC1F0\uC1F1\uC1F3\uC1FC\uC1FD\uC200\uC204\uC20C\uC20D\uC20F\uC211\uC218\uC219\uC21C\uC21F\uC220\uC228\uC229\uC22B\uC22D"],["bd41","\uD3D7\uD3D9",7,"\uD3E2\uD3E4",7,"\uD3EE\uD3EF\uD3F1\uD3F2\uD3F3\uD3F5\uD3F6\uD3F7"],["bd61","\uD3F8\uD3F9\uD3FA\uD3FB\uD3FE\uD400\uD402",5,"\uD409",13],["bd81","\uD417",5,"\uD41E",25,"\uC22F\uC231\uC232\uC234\uC248\uC250\uC251\uC254\uC258\uC260\uC265\uC26C\uC26D\uC270\uC274\uC27C\uC27D\uC27F\uC281\uC288\uC289\uC290\uC298\uC29B\uC29D\uC2A4\uC2A5\uC2A8\uC2AC\uC2AD\uC2B4\uC2B5\uC2B7\uC2B9\uC2DC\uC2DD\uC2E0\uC2E3\uC2E4\uC2EB\uC2EC\uC2ED\uC2EF\uC2F1\uC2F6\uC2F8\uC2F9\uC2FB\uC2FC\uC300\uC308\uC309\uC30C\uC30D\uC313\uC314\uC315\uC318\uC31C\uC324\uC325\uC328\uC329\uC345\uC368\uC369\uC36C\uC370\uC372\uC378\uC379\uC37C\uC37D\uC384\uC388\uC38C\uC3C0\uC3D8\uC3D9\uC3DC\uC3DF\uC3E0\uC3E2\uC3E8\uC3E9\uC3ED\uC3F4\uC3F5\uC3F8\uC408\uC410\uC424\uC42C\uC430"],["be41","\uD438",7,"\uD441\uD442\uD443\uD445",14],["be61","\uD454",7,"\uD45D\uD45E\uD45F\uD461\uD462\uD463\uD465",7,"\uD46E\uD470\uD471\uD472"],["be81","\uD473",4,"\uD47A\uD47B\uD47D\uD47E\uD481\uD483",4,"\uD48A\uD48C\uD48E",5,"\uD495",8,"\uC434\uC43C\uC43D\uC448\uC464\uC465\uC468\uC46C\uC474\uC475\uC479\uC480\uC494\uC49C\uC4B8\uC4BC\uC4E9\uC4F0\uC4F1\uC4F4\uC4F8\uC4FA\uC4FF\uC500\uC501\uC50C\uC510\uC514\uC51C\uC528\uC529\uC52C\uC530\uC538\uC539\uC53B\uC53D\uC544\uC545\uC548\uC549\uC54A\uC54C\uC54D\uC54E\uC553\uC554\uC555\uC557\uC558\uC559\uC55D\uC55E\uC560\uC561\uC564\uC568\uC570\uC571\uC573\uC574\uC575\uC57C\uC57D\uC580\uC584\uC587\uC58C\uC58D\uC58F\uC591\uC595\uC597\uC598\uC59C\uC5A0\uC5A9\uC5B4\uC5B5\uC5B8\uC5B9\uC5BB\uC5BC\uC5BD\uC5BE\uC5C4",6,"\uC5CC\uC5CE"],["bf41","\uD49E",10,"\uD4AA",14],["bf61","\uD4B9",18,"\uD4CD\uD4CE\uD4CF\uD4D1\uD4D2\uD4D3\uD4D5"],["bf81","\uD4D6",5,"\uD4DD\uD4DE\uD4E0",7,"\uD4E9\uD4EA\uD4EB\uD4ED\uD4EE\uD4EF\uD4F1",6,"\uD4F9\uD4FA\uD4FC\uC5D0\uC5D1\uC5D4\uC5D8\uC5E0\uC5E1\uC5E3\uC5E5\uC5EC\uC5ED\uC5EE\uC5F0\uC5F4\uC5F6\uC5F7\uC5FC",5,"\uC605\uC606\uC607\uC608\uC60C\uC610\uC618\uC619\uC61B\uC61C\uC624\uC625\uC628\uC62C\uC62D\uC62E\uC630\uC633\uC634\uC635\uC637\uC639\uC63B\uC640\uC641\uC644\uC648\uC650\uC651\uC653\uC654\uC655\uC65C\uC65D\uC660\uC66C\uC66F\uC671\uC678\uC679\uC67C\uC680\uC688\uC689\uC68B\uC68D\uC694\uC695\uC698\uC69C\uC6A4\uC6A5\uC6A7\uC6A9\uC6B0\uC6B1\uC6B4\uC6B8\uC6B9\uC6BA\uC6C0\uC6C1\uC6C3\uC6C5\uC6CC\uC6CD\uC6D0\uC6D4\uC6DC\uC6DD\uC6E0\uC6E1\uC6E8"],["c041","\uD4FE",5,"\uD505\uD506\uD507\uD509\uD50A\uD50B\uD50D",6,"\uD516\uD518",5],["c061","\uD51E",25],["c081","\uD538\uD539\uD53A\uD53B\uD53E\uD53F\uD541\uD542\uD543\uD545",6,"\uD54E\uD550\uD552",5,"\uD55A\uD55B\uD55D\uD55E\uD55F\uD561\uD562\uD563\uC6E9\uC6EC\uC6F0\uC6F8\uC6F9\uC6FD\uC704\uC705\uC708\uC70C\uC714\uC715\uC717\uC719\uC720\uC721\uC724\uC728\uC730\uC731\uC733\uC735\uC737\uC73C\uC73D\uC740\uC744\uC74A\uC74C\uC74D\uC74F\uC751",7,"\uC75C\uC760\uC768\uC76B\uC774\uC775\uC778\uC77C\uC77D\uC77E\uC783\uC784\uC785\uC787\uC788\uC789\uC78A\uC78E\uC790\uC791\uC794\uC796\uC797\uC798\uC79A\uC7A0\uC7A1\uC7A3\uC7A4\uC7A5\uC7A6\uC7AC\uC7AD\uC7B0\uC7B4\uC7BC\uC7BD\uC7BF\uC7C0\uC7C1\uC7C8\uC7C9\uC7CC\uC7CE\uC7D0\uC7D8\uC7DD\uC7E4\uC7E8\uC7EC\uC800\uC801\uC804\uC808\uC80A"],["c141","\uD564\uD566\uD567\uD56A\uD56C\uD56E",5,"\uD576\uD577\uD579\uD57A\uD57B\uD57D",6,"\uD586\uD58A\uD58B"],["c161","\uD58C\uD58D\uD58E\uD58F\uD591",19,"\uD5A6\uD5A7"],["c181","\uD5A8",31,"\uC810\uC811\uC813\uC815\uC816\uC81C\uC81D\uC820\uC824\uC82C\uC82D\uC82F\uC831\uC838\uC83C\uC840\uC848\uC849\uC84C\uC84D\uC854\uC870\uC871\uC874\uC878\uC87A\uC880\uC881\uC883\uC885\uC886\uC887\uC88B\uC88C\uC88D\uC894\uC89D\uC89F\uC8A1\uC8A8\uC8BC\uC8BD\uC8C4\uC8C8\uC8CC\uC8D4\uC8D5\uC8D7\uC8D9\uC8E0\uC8E1\uC8E4\uC8F5\uC8FC\uC8FD\uC900\uC904\uC905\uC906\uC90C\uC90D\uC90F\uC911\uC918\uC92C\uC934\uC950\uC951\uC954\uC958\uC960\uC961\uC963\uC96C\uC970\uC974\uC97C\uC988\uC989\uC98C\uC990\uC998\uC999\uC99B\uC99D\uC9C0\uC9C1\uC9C4\uC9C7\uC9C8\uC9CA\uC9D0\uC9D1\uC9D3"],["c241","\uD5CA\uD5CB\uD5CD\uD5CE\uD5CF\uD5D1\uD5D3",4,"\uD5DA\uD5DC\uD5DE",5,"\uD5E6\uD5E7\uD5E9\uD5EA\uD5EB\uD5ED\uD5EE"],["c261","\uD5EF",4,"\uD5F6\uD5F8\uD5FA",5,"\uD602\uD603\uD605\uD606\uD607\uD609",6,"\uD612"],["c281","\uD616",5,"\uD61D\uD61E\uD61F\uD621\uD622\uD623\uD625",7,"\uD62E",9,"\uD63A\uD63B\uC9D5\uC9D6\uC9D9\uC9DA\uC9DC\uC9DD\uC9E0\uC9E2\uC9E4\uC9E7\uC9EC\uC9ED\uC9EF\uC9F0\uC9F1\uC9F8\uC9F9\uC9FC\uCA00\uCA08\uCA09\uCA0B\uCA0C\uCA0D\uCA14\uCA18\uCA29\uCA4C\uCA4D\uCA50\uCA54\uCA5C\uCA5D\uCA5F\uCA60\uCA61\uCA68\uCA7D\uCA84\uCA98\uCABC\uCABD\uCAC0\uCAC4\uCACC\uCACD\uCACF\uCAD1\uCAD3\uCAD8\uCAD9\uCAE0\uCAEC\uCAF4\uCB08\uCB10\uCB14\uCB18\uCB20\uCB21\uCB41\uCB48\uCB49\uCB4C\uCB50\uCB58\uCB59\uCB5D\uCB64\uCB78\uCB79\uCB9C\uCBB8\uCBD4\uCBE4\uCBE7\uCBE9\uCC0C\uCC0D\uCC10\uCC14\uCC1C\uCC1D\uCC21\uCC22\uCC27\uCC28\uCC29\uCC2C\uCC2E\uCC30\uCC38\uCC39\uCC3B"],["c341","\uD63D\uD63E\uD63F\uD641\uD642\uD643\uD644\uD646\uD647\uD64A\uD64C\uD64E\uD64F\uD650\uD652\uD653\uD656\uD657\uD659\uD65A\uD65B\uD65D",4],["c361","\uD662",4,"\uD668\uD66A",5,"\uD672\uD673\uD675",11],["c381","\uD681\uD682\uD684\uD686",5,"\uD68E\uD68F\uD691\uD692\uD693\uD695",7,"\uD69E\uD6A0\uD6A2",5,"\uD6A9\uD6AA\uCC3C\uCC3D\uCC3E\uCC44\uCC45\uCC48\uCC4C\uCC54\uCC55\uCC57\uCC58\uCC59\uCC60\uCC64\uCC66\uCC68\uCC70\uCC75\uCC98\uCC99\uCC9C\uCCA0\uCCA8\uCCA9\uCCAB\uCCAC\uCCAD\uCCB4\uCCB5\uCCB8\uCCBC\uCCC4\uCCC5\uCCC7\uCCC9\uCCD0\uCCD4\uCCE4\uCCEC\uCCF0\uCD01\uCD08\uCD09\uCD0C\uCD10\uCD18\uCD19\uCD1B\uCD1D\uCD24\uCD28\uCD2C\uCD39\uCD5C\uCD60\uCD64\uCD6C\uCD6D\uCD6F\uCD71\uCD78\uCD88\uCD94\uCD95\uCD98\uCD9C\uCDA4\uCDA5\uCDA7\uCDA9\uCDB0\uCDC4\uCDCC\uCDD0\uCDE8\uCDEC\uCDF0\uCDF8\uCDF9\uCDFB\uCDFD\uCE04\uCE08\uCE0C\uCE14\uCE19\uCE20\uCE21\uCE24\uCE28\uCE30\uCE31\uCE33\uCE35"],["c441","\uD6AB\uD6AD\uD6AE\uD6AF\uD6B1",7,"\uD6BA\uD6BC",7,"\uD6C6\uD6C7\uD6C9\uD6CA\uD6CB"],["c461","\uD6CD\uD6CE\uD6CF\uD6D0\uD6D2\uD6D3\uD6D5\uD6D6\uD6D8\uD6DA",5,"\uD6E1\uD6E2\uD6E3\uD6E5\uD6E6\uD6E7\uD6E9",4],["c481","\uD6EE\uD6EF\uD6F1\uD6F2\uD6F3\uD6F4\uD6F6",5,"\uD6FE\uD6FF\uD701\uD702\uD703\uD705",11,"\uD712\uD713\uD714\uCE58\uCE59\uCE5C\uCE5F\uCE60\uCE61\uCE68\uCE69\uCE6B\uCE6D\uCE74\uCE75\uCE78\uCE7C\uCE84\uCE85\uCE87\uCE89\uCE90\uCE91\uCE94\uCE98\uCEA0\uCEA1\uCEA3\uCEA4\uCEA5\uCEAC\uCEAD\uCEC1\uCEE4\uCEE5\uCEE8\uCEEB\uCEEC\uCEF4\uCEF5\uCEF7\uCEF8\uCEF9\uCF00\uCF01\uCF04\uCF08\uCF10\uCF11\uCF13\uCF15\uCF1C\uCF20\uCF24\uCF2C\uCF2D\uCF2F\uCF30\uCF31\uCF38\uCF54\uCF55\uCF58\uCF5C\uCF64\uCF65\uCF67\uCF69\uCF70\uCF71\uCF74\uCF78\uCF80\uCF85\uCF8C\uCFA1\uCFA8\uCFB0\uCFC4\uCFE0\uCFE1\uCFE4\uCFE8\uCFF0\uCFF1\uCFF3\uCFF5\uCFFC\uD000\uD004\uD011\uD018\uD02D\uD034\uD035\uD038\uD03C"],["c541","\uD715\uD716\uD717\uD71A\uD71B\uD71D\uD71E\uD71F\uD721",6,"\uD72A\uD72C\uD72E",5,"\uD736\uD737\uD739"],["c561","\uD73A\uD73B\uD73D",6,"\uD745\uD746\uD748\uD74A",5,"\uD752\uD753\uD755\uD75A",4],["c581","\uD75F\uD762\uD764\uD766\uD767\uD768\uD76A\uD76B\uD76D\uD76E\uD76F\uD771\uD772\uD773\uD775",6,"\uD77E\uD77F\uD780\uD782",5,"\uD78A\uD78B\uD044\uD045\uD047\uD049\uD050\uD054\uD058\uD060\uD06C\uD06D\uD070\uD074\uD07C\uD07D\uD081\uD0A4\uD0A5\uD0A8\uD0AC\uD0B4\uD0B5\uD0B7\uD0B9\uD0C0\uD0C1\uD0C4\uD0C8\uD0C9\uD0D0\uD0D1\uD0D3\uD0D4\uD0D5\uD0DC\uD0DD\uD0E0\uD0E4\uD0EC\uD0ED\uD0EF\uD0F0\uD0F1\uD0F8\uD10D\uD130\uD131\uD134\uD138\uD13A\uD140\uD141\uD143\uD144\uD145\uD14C\uD14D\uD150\uD154\uD15C\uD15D\uD15F\uD161\uD168\uD16C\uD17C\uD184\uD188\uD1A0\uD1A1\uD1A4\uD1A8\uD1B0\uD1B1\uD1B3\uD1B5\uD1BA\uD1BC\uD1C0\uD1D8\uD1F4\uD1F8\uD207\uD209\uD210\uD22C\uD22D\uD230\uD234\uD23C\uD23D\uD23F\uD241\uD248\uD25C"],["c641","\uD78D\uD78E\uD78F\uD791",6,"\uD79A\uD79C\uD79E",5],["c6a1","\uD264\uD280\uD281\uD284\uD288\uD290\uD291\uD295\uD29C\uD2A0\uD2A4\uD2AC\uD2B1\uD2B8\uD2B9\uD2BC\uD2BF\uD2C0\uD2C2\uD2C8\uD2C9\uD2CB\uD2D4\uD2D8\uD2DC\uD2E4\uD2E5\uD2F0\uD2F1\uD2F4\uD2F8\uD300\uD301\uD303\uD305\uD30C\uD30D\uD30E\uD310\uD314\uD316\uD31C\uD31D\uD31F\uD320\uD321\uD325\uD328\uD329\uD32C\uD330\uD338\uD339\uD33B\uD33C\uD33D\uD344\uD345\uD37C\uD37D\uD380\uD384\uD38C\uD38D\uD38F\uD390\uD391\uD398\uD399\uD39C\uD3A0\uD3A8\uD3A9\uD3AB\uD3AD\uD3B4\uD3B8\uD3BC\uD3C4\uD3C5\uD3C8\uD3C9\uD3D0\uD3D8\uD3E1\uD3E3\uD3EC\uD3ED\uD3F0\uD3F4\uD3FC\uD3FD\uD3FF\uD401"],["c7a1","\uD408\uD41D\uD440\uD444\uD45C\uD460\uD464\uD46D\uD46F\uD478\uD479\uD47C\uD47F\uD480\uD482\uD488\uD489\uD48B\uD48D\uD494\uD4A9\uD4CC\uD4D0\uD4D4\uD4DC\uD4DF\uD4E8\uD4EC\uD4F0\uD4F8\uD4FB\uD4FD\uD504\uD508\uD50C\uD514\uD515\uD517\uD53C\uD53D\uD540\uD544\uD54C\uD54D\uD54F\uD551\uD558\uD559\uD55C\uD560\uD565\uD568\uD569\uD56B\uD56D\uD574\uD575\uD578\uD57C\uD584\uD585\uD587\uD588\uD589\uD590\uD5A5\uD5C8\uD5C9\uD5CC\uD5D0\uD5D2\uD5D8\uD5D9\uD5DB\uD5DD\uD5E4\uD5E5\uD5E8\uD5EC\uD5F4\uD5F5\uD5F7\uD5F9\uD600\uD601\uD604\uD608\uD610\uD611\uD613\uD614\uD615\uD61C\uD620"],["c8a1","\uD624\uD62D\uD638\uD639\uD63C\uD640\uD645\uD648\uD649\uD64B\uD64D\uD651\uD654\uD655\uD658\uD65C\uD667\uD669\uD670\uD671\uD674\uD683\uD685\uD68C\uD68D\uD690\uD694\uD69D\uD69F\uD6A1\uD6A8\uD6AC\uD6B0\uD6B9\uD6BB\uD6C4\uD6C5\uD6C8\uD6CC\uD6D1\uD6D4\uD6D7\uD6D9\uD6E0\uD6E4\uD6E8\uD6F0\uD6F5\uD6FC\uD6FD\uD700\uD704\uD711\uD718\uD719\uD71C\uD720\uD728\uD729\uD72B\uD72D\uD734\uD735\uD738\uD73C\uD744\uD747\uD749\uD750\uD751\uD754\uD756\uD757\uD758\uD759\uD760\uD761\uD763\uD765\uD769\uD76C\uD770\uD774\uD77C\uD77D\uD781\uD788\uD789\uD78C\uD790\uD798\uD799\uD79B\uD79D"],["caa1","\u4F3D\u4F73\u5047\u50F9\u52A0\u53EF\u5475\u54E5\u5609\u5AC1\u5BB6\u6687\u67B6\u67B7\u67EF\u6B4C\u73C2\u75C2\u7A3C\u82DB\u8304\u8857\u8888\u8A36\u8CC8\u8DCF\u8EFB\u8FE6\u99D5\u523B\u5374\u5404\u606A\u6164\u6BBC\u73CF\u811A\u89BA\u89D2\u95A3\u4F83\u520A\u58BE\u5978\u59E6\u5E72\u5E79\u61C7\u63C0\u6746\u67EC\u687F\u6F97\u764E\u770B\u78F5\u7A08\u7AFF\u7C21\u809D\u826E\u8271\u8AEB\u9593\u4E6B\u559D\u66F7\u6E34\u78A3\u7AED\u845B\u8910\u874E\u97A8\u52D8\u574E\u582A\u5D4C\u611F\u61BE\u6221\u6562\u67D1\u6A44\u6E1B\u7518\u75B3\u76E3\u77B0\u7D3A\u90AF\u9451\u9452\u9F95"],["cba1","\u5323\u5CAC\u7532\u80DB\u9240\u9598\u525B\u5808\u59DC\u5CA1\u5D17\u5EB7\u5F3A\u5F4A\u6177\u6C5F\u757A\u7586\u7CE0\u7D73\u7DB1\u7F8C\u8154\u8221\u8591\u8941\u8B1B\u92FC\u964D\u9C47\u4ECB\u4EF7\u500B\u51F1\u584F\u6137\u613E\u6168\u6539\u69EA\u6F11\u75A5\u7686\u76D6\u7B87\u82A5\u84CB\uF900\u93A7\u958B\u5580\u5BA2\u5751\uF901\u7CB3\u7FB9\u91B5\u5028\u53BB\u5C45\u5DE8\u62D2\u636E\u64DA\u64E7\u6E20\u70AC\u795B\u8DDD\u8E1E\uF902\u907D\u9245\u92F8\u4E7E\u4EF6\u5065\u5DFE\u5EFA\u6106\u6957\u8171\u8654\u8E47\u9375\u9A2B\u4E5E\u5091\u6770\u6840\u5109\u528D\u5292\u6AA2"],["cca1","\u77BC\u9210\u9ED4\u52AB\u602F\u8FF2\u5048\u61A9\u63ED\u64CA\u683C\u6A84\u6FC0\u8188\u89A1\u9694\u5805\u727D\u72AC\u7504\u7D79\u7E6D\u80A9\u898B\u8B74\u9063\u9D51\u6289\u6C7A\u6F54\u7D50\u7F3A\u8A23\u517C\u614A\u7B9D\u8B19\u9257\u938C\u4EAC\u4FD3\u501E\u50BE\u5106\u52C1\u52CD\u537F\u5770\u5883\u5E9A\u5F91\u6176\u61AC\u64CE\u656C\u666F\u66BB\u66F4\u6897\u6D87\u7085\u70F1\u749F\u74A5\u74CA\u75D9\u786C\u78EC\u7ADF\u7AF6\u7D45\u7D93\u8015\u803F\u811B\u8396\u8B66\u8F15\u9015\u93E1\u9803\u9838\u9A5A\u9BE8\u4FC2\u5553\u583A\u5951\u5B63\u5C46\u60B8\u6212\u6842\u68B0"],["cda1","\u68E8\u6EAA\u754C\u7678\u78CE\u7A3D\u7CFB\u7E6B\u7E7C\u8A08\u8AA1\u8C3F\u968E\u9DC4\u53E4\u53E9\u544A\u5471\u56FA\u59D1\u5B64\u5C3B\u5EAB\u62F7\u6537\u6545\u6572\u66A0\u67AF\u69C1\u6CBD\u75FC\u7690\u777E\u7A3F\u7F94\u8003\u80A1\u818F\u82E6\u82FD\u83F0\u85C1\u8831\u88B4\u8AA5\uF903\u8F9C\u932E\u96C7\u9867\u9AD8\u9F13\u54ED\u659B\u66F2\u688F\u7A40\u8C37\u9D60\u56F0\u5764\u5D11\u6606\u68B1\u68CD\u6EFE\u7428\u889E\u9BE4\u6C68\uF904\u9AA8\u4F9B\u516C\u5171\u529F\u5B54\u5DE5\u6050\u606D\u62F1\u63A7\u653B\u73D9\u7A7A\u86A3\u8CA2\u978F\u4E32\u5BE1\u6208\u679C\u74DC"],["cea1","\u79D1\u83D3\u8A87\u8AB2\u8DE8\u904E\u934B\u9846\u5ED3\u69E8\u85FF\u90ED\uF905\u51A0\u5B98\u5BEC\u6163\u68FA\u6B3E\u704C\u742F\u74D8\u7BA1\u7F50\u83C5\u89C0\u8CAB\u95DC\u9928\u522E\u605D\u62EC\u9002\u4F8A\u5149\u5321\u58D9\u5EE3\u66E0\u6D38\u709A\u72C2\u73D6\u7B50\u80F1\u945B\u5366\u639B\u7F6B\u4E56\u5080\u584A\u58DE\u602A\u6127\u62D0\u69D0\u9B41\u5B8F\u7D18\u80B1\u8F5F\u4EA4\u50D1\u54AC\u55AC\u5B0C\u5DA0\u5DE7\u652A\u654E\u6821\u6A4B\u72E1\u768E\u77EF\u7D5E\u7FF9\u81A0\u854E\u86DF\u8F03\u8F4E\u90CA\u9903\u9A55\u9BAB\u4E18\u4E45\u4E5D\u4EC7\u4FF1\u5177\u52FE"],["cfa1","\u5340\u53E3\u53E5\u548E\u5614\u5775\u57A2\u5BC7\u5D87\u5ED0\u61FC\u62D8\u6551\u67B8\u67E9\u69CB\u6B50\u6BC6\u6BEC\u6C42\u6E9D\u7078\u72D7\u7396\u7403\u77BF\u77E9\u7A76\u7D7F\u8009\u81FC\u8205\u820A\u82DF\u8862\u8B33\u8CFC\u8EC0\u9011\u90B1\u9264\u92B6\u99D2\u9A45\u9CE9\u9DD7\u9F9C\u570B\u5C40\u83CA\u97A0\u97AB\u9EB4\u541B\u7A98\u7FA4\u88D9\u8ECD\u90E1\u5800\u5C48\u6398\u7A9F\u5BAE\u5F13\u7A79\u7AAE\u828E\u8EAC\u5026\u5238\u52F8\u5377\u5708\u62F3\u6372\u6B0A\u6DC3\u7737\u53A5\u7357\u8568\u8E76\u95D5\u673A\u6AC3\u6F70\u8A6D\u8ECC\u994B\uF906\u6677\u6B78\u8CB4"],["d0a1","\u9B3C\uF907\u53EB\u572D\u594E\u63C6\u69FB\u73EA\u7845\u7ABA\u7AC5\u7CFE\u8475\u898F\u8D73\u9035\u95A8\u52FB\u5747\u7547\u7B60\u83CC\u921E\uF908\u6A58\u514B\u524B\u5287\u621F\u68D8\u6975\u9699\u50C5\u52A4\u52E4\u61C3\u65A4\u6839\u69FF\u747E\u7B4B\u82B9\u83EB\u89B2\u8B39\u8FD1\u9949\uF909\u4ECA\u5997\u64D2\u6611\u6A8E\u7434\u7981\u79BD\u82A9\u887E\u887F\u895F\uF90A\u9326\u4F0B\u53CA\u6025\u6271\u6C72\u7D1A\u7D66\u4E98\u5162\u77DC\u80AF\u4F01\u4F0E\u5176\u5180\u55DC\u5668\u573B\u57FA\u57FC\u5914\u5947\u5993\u5BC4\u5C90\u5D0E\u5DF1\u5E7E\u5FCC\u6280\u65D7\u65E3"],["d1a1","\u671E\u671F\u675E\u68CB\u68C4\u6A5F\u6B3A\u6C23\u6C7D\u6C82\u6DC7\u7398\u7426\u742A\u7482\u74A3\u7578\u757F\u7881\u78EF\u7941\u7947\u7948\u797A\u7B95\u7D00\u7DBA\u7F88\u8006\u802D\u808C\u8A18\u8B4F\u8C48\u8D77\u9321\u9324\u98E2\u9951\u9A0E\u9A0F\u9A65\u9E92\u7DCA\u4F76\u5409\u62EE\u6854\u91D1\u55AB\u513A\uF90B\uF90C\u5A1C\u61E6\uF90D\u62CF\u62FF\uF90E",5,"\u90A3\uF914",4,"\u8AFE\uF919\uF91A\uF91B\uF91C\u6696\uF91D\u7156\uF91E\uF91F\u96E3\uF920\u634F\u637A\u5357\uF921\u678F\u6960\u6E73\uF922\u7537\uF923\uF924\uF925"],["d2a1","\u7D0D\uF926\uF927\u8872\u56CA\u5A18\uF928",4,"\u4E43\uF92D\u5167\u5948\u67F0\u8010\uF92E\u5973\u5E74\u649A\u79CA\u5FF5\u606C\u62C8\u637B\u5BE7\u5BD7\u52AA\uF92F\u5974\u5F29\u6012\uF930\uF931\uF932\u7459\uF933",5,"\u99D1\uF939",10,"\u6FC3\uF944\uF945\u81BF\u8FB2\u60F1\uF946\uF947\u8166\uF948\uF949\u5C3F\uF94A",7,"\u5AE9\u8A25\u677B\u7D10\uF952",5,"\u80FD\uF958\uF959\u5C3C\u6CE5\u533F\u6EBA\u591A\u8336"],["d3a1","\u4E39\u4EB6\u4F46\u55AE\u5718\u58C7\u5F56\u65B7\u65E6\u6A80\u6BB5\u6E4D\u77ED\u7AEF\u7C1E\u7DDE\u86CB\u8892\u9132\u935B\u64BB\u6FBE\u737A\u75B8\u9054\u5556\u574D\u61BA\u64D4\u66C7\u6DE1\u6E5B\u6F6D\u6FB9\u75F0\u8043\u81BD\u8541\u8983\u8AC7\u8B5A\u931F\u6C93\u7553\u7B54\u8E0F\u905D\u5510\u5802\u5858\u5E62\u6207\u649E\u68E0\u7576\u7CD6\u87B3\u9EE8\u4EE3\u5788\u576E\u5927\u5C0D\u5CB1\u5E36\u5F85\u6234\u64E1\u73B3\u81FA\u888B\u8CB8\u968A\u9EDB\u5B85\u5FB7\u60B3\u5012\u5200\u5230\u5716\u5835\u5857\u5C0E\u5C60\u5CF6\u5D8B\u5EA6\u5F92\u60BC\u6311\u6389\u6417\u6843"],["d4a1","\u68F9\u6AC2\u6DD8\u6E21\u6ED4\u6FE4\u71FE\u76DC\u7779\u79B1\u7A3B\u8404\u89A9\u8CED\u8DF3\u8E48\u9003\u9014\u9053\u90FD\u934D\u9676\u97DC\u6BD2\u7006\u7258\u72A2\u7368\u7763\u79BF\u7BE4\u7E9B\u8B80\u58A9\u60C7\u6566\u65FD\u66BE\u6C8C\u711E\u71C9\u8C5A\u9813\u4E6D\u7A81\u4EDD\u51AC\u51CD\u52D5\u540C\u61A7\u6771\u6850\u68DF\u6D1E\u6F7C\u75BC\u77B3\u7AE5\u80F4\u8463\u9285\u515C\u6597\u675C\u6793\u75D8\u7AC7\u8373\uF95A\u8C46\u9017\u982D\u5C6F\u81C0\u829A\u9041\u906F\u920D\u5F97\u5D9D\u6A59\u71C8\u767B\u7B49\u85E4\u8B04\u9127\u9A30\u5587\u61F6\uF95B\u7669\u7F85"],["d5a1","\u863F\u87BA\u88F8\u908F\uF95C\u6D1B\u70D9\u73DE\u7D61\u843D\uF95D\u916A\u99F1\uF95E\u4E82\u5375\u6B04\u6B12\u703E\u721B\u862D\u9E1E\u524C\u8FA3\u5D50\u64E5\u652C\u6B16\u6FEB\u7C43\u7E9C\u85CD\u8964\u89BD\u62C9\u81D8\u881F\u5ECA\u6717\u6D6A\u72FC\u7405\u746F\u8782\u90DE\u4F86\u5D0D\u5FA0\u840A\u51B7\u63A0\u7565\u4EAE\u5006\u5169\u51C9\u6881\u6A11\u7CAE\u7CB1\u7CE7\u826F\u8AD2\u8F1B\u91CF\u4FB6\u5137\u52F5\u5442\u5EEC\u616E\u623E\u65C5\u6ADA\u6FFE\u792A\u85DC\u8823\u95AD\u9A62\u9A6A\u9E97\u9ECE\u529B\u66C6\u6B77\u701D\u792B\u8F62\u9742\u6190\u6200\u6523\u6F23"],["d6a1","\u7149\u7489\u7DF4\u806F\u84EE\u8F26\u9023\u934A\u51BD\u5217\u52A3\u6D0C\u70C8\u88C2\u5EC9\u6582\u6BAE\u6FC2\u7C3E\u7375\u4EE4\u4F36\u56F9\uF95F\u5CBA\u5DBA\u601C\u73B2\u7B2D\u7F9A\u7FCE\u8046\u901E\u9234\u96F6\u9748\u9818\u9F61\u4F8B\u6FA7\u79AE\u91B4\u96B7\u52DE\uF960\u6488\u64C4\u6AD3\u6F5E\u7018\u7210\u76E7\u8001\u8606\u865C\u8DEF\u8F05\u9732\u9B6F\u9DFA\u9E75\u788C\u797F\u7DA0\u83C9\u9304\u9E7F\u9E93\u8AD6\u58DF\u5F04\u6727\u7027\u74CF\u7C60\u807E\u5121\u7028\u7262\u78CA\u8CC2\u8CDA\u8CF4\u96F7\u4E86\u50DA\u5BEE\u5ED6\u6599\u71CE\u7642\u77AD\u804A\u84FC"],["d7a1","\u907C\u9B27\u9F8D\u58D8\u5A41\u5C62\u6A13\u6DDA\u6F0F\u763B\u7D2F\u7E37\u851E\u8938\u93E4\u964B\u5289\u65D2\u67F3\u69B4\u6D41\u6E9C\u700F\u7409\u7460\u7559\u7624\u786B\u8B2C\u985E\u516D\u622E\u9678\u4F96\u502B\u5D19\u6DEA\u7DB8\u8F2A\u5F8B\u6144\u6817\uF961\u9686\u52D2\u808B\u51DC\u51CC\u695E\u7A1C\u7DBE\u83F1\u9675\u4FDA\u5229\u5398\u540F\u550E\u5C65\u60A7\u674E\u68A8\u6D6C\u7281\u72F8\u7406\u7483\uF962\u75E2\u7C6C\u7F79\u7FB8\u8389\u88CF\u88E1\u91CC\u91D0\u96E2\u9BC9\u541D\u6F7E\u71D0\u7498\u85FA\u8EAA\u96A3\u9C57\u9E9F\u6797\u6DCB\u7433\u81E8\u9716\u782C"],["d8a1","\u7ACB\u7B20\u7C92\u6469\u746A\u75F2\u78BC\u78E8\u99AC\u9B54\u9EBB\u5BDE\u5E55\u6F20\u819C\u83AB\u9088\u4E07\u534D\u5A29\u5DD2\u5F4E\u6162\u633D\u6669\u66FC\u6EFF\u6F2B\u7063\u779E\u842C\u8513\u883B\u8F13\u9945\u9C3B\u551C\u62B9\u672B\u6CAB\u8309\u896A\u977A\u4EA1\u5984\u5FD8\u5FD9\u671B\u7DB2\u7F54\u8292\u832B\u83BD\u8F1E\u9099\u57CB\u59B9\u5A92\u5BD0\u6627\u679A\u6885\u6BCF\u7164\u7F75\u8CB7\u8CE3\u9081\u9B45\u8108\u8C8A\u964C\u9A40\u9EA5\u5B5F\u6C13\u731B\u76F2\u76DF\u840C\u51AA\u8993\u514D\u5195\u52C9\u68C9\u6C94\u7704\u7720\u7DBF\u7DEC\u9762\u9EB5\u6EC5"],["d9a1","\u8511\u51A5\u540D\u547D\u660E\u669D\u6927\u6E9F\u76BF\u7791\u8317\u84C2\u879F\u9169\u9298\u9CF4\u8882\u4FAE\u5192\u52DF\u59C6\u5E3D\u6155\u6478\u6479\u66AE\u67D0\u6A21\u6BCD\u6BDB\u725F\u7261\u7441\u7738\u77DB\u8017\u82BC\u8305\u8B00\u8B28\u8C8C\u6728\u6C90\u7267\u76EE\u7766\u7A46\u9DA9\u6B7F\u6C92\u5922\u6726\u8499\u536F\u5893\u5999\u5EDF\u63CF\u6634\u6773\u6E3A\u732B\u7AD7\u82D7\u9328\u52D9\u5DEB\u61AE\u61CB\u620A\u62C7\u64AB\u65E0\u6959\u6B66\u6BCB\u7121\u73F7\u755D\u7E46\u821E\u8302\u856A\u8AA3\u8CBF\u9727\u9D61\u58A8\u9ED8\u5011\u520E\u543B\u554F\u6587"],["daa1","\u6C76\u7D0A\u7D0B\u805E\u868A\u9580\u96EF\u52FF\u6C95\u7269\u5473\u5A9A\u5C3E\u5D4B\u5F4C\u5FAE\u672A\u68B6\u6963\u6E3C\u6E44\u7709\u7C73\u7F8E\u8587\u8B0E\u8FF7\u9761\u9EF4\u5CB7\u60B6\u610D\u61AB\u654F\u65FB\u65FC\u6C11\u6CEF\u739F\u73C9\u7DE1\u9594\u5BC6\u871C\u8B10\u525D\u535A\u62CD\u640F\u64B2\u6734\u6A38\u6CCA\u73C0\u749E\u7B94\u7C95\u7E1B\u818A\u8236\u8584\u8FEB\u96F9\u99C1\u4F34\u534A\u53CD\u53DB\u62CC\u642C\u6500\u6591\u69C3\u6CEE\u6F58\u73ED\u7554\u7622\u76E4\u76FC\u78D0\u78FB\u792C\u7D46\u822C\u87E0\u8FD4\u9812\u98EF\u52C3\u62D4\u64A5\u6E24\u6F51"],["dba1","\u767C\u8DCB\u91B1\u9262\u9AEE\u9B43\u5023\u508D\u574A\u59A8\u5C28\u5E47\u5F77\u623F\u653E\u65B9\u65C1\u6609\u678B\u699C\u6EC2\u78C5\u7D21\u80AA\u8180\u822B\u82B3\u84A1\u868C\u8A2A\u8B17\u90A6\u9632\u9F90\u500D\u4FF3\uF963\u57F9\u5F98\u62DC\u6392\u676F\u6E43\u7119\u76C3\u80CC\u80DA\u88F4\u88F5\u8919\u8CE0\u8F29\u914D\u966A\u4F2F\u4F70\u5E1B\u67CF\u6822\u767D\u767E\u9B44\u5E61\u6A0A\u7169\u71D4\u756A\uF964\u7E41\u8543\u85E9\u98DC\u4F10\u7B4F\u7F70\u95A5\u51E1\u5E06\u68B5\u6C3E\u6C4E\u6CDB\u72AF\u7BC4\u8303\u6CD5\u743A\u50FB\u5288\u58C1\u64D8\u6A97\u74A7\u7656"],["dca1","\u78A7\u8617\u95E2\u9739\uF965\u535E\u5F01\u8B8A\u8FA8\u8FAF\u908A\u5225\u77A5\u9C49\u9F08\u4E19\u5002\u5175\u5C5B\u5E77\u661E\u663A\u67C4\u68C5\u70B3\u7501\u75C5\u79C9\u7ADD\u8F27\u9920\u9A08\u4FDD\u5821\u5831\u5BF6\u666E\u6B65\u6D11\u6E7A\u6F7D\u73E4\u752B\u83E9\u88DC\u8913\u8B5C\u8F14\u4F0F\u50D5\u5310\u535C\u5B93\u5FA9\u670D\u798F\u8179\u832F\u8514\u8907\u8986\u8F39\u8F3B\u99A5\u9C12\u672C\u4E76\u4FF8\u5949\u5C01\u5CEF\u5CF0\u6367\u68D2\u70FD\u71A2\u742B\u7E2B\u84EC\u8702\u9022\u92D2\u9CF3\u4E0D\u4ED8\u4FEF\u5085\u5256\u526F\u5426\u5490\u57E0\u592B\u5A66"],["dda1","\u5B5A\u5B75\u5BCC\u5E9C\uF966\u6276\u6577\u65A7\u6D6E\u6EA5\u7236\u7B26\u7C3F\u7F36\u8150\u8151\u819A\u8240\u8299\u83A9\u8A03\u8CA0\u8CE6\u8CFB\u8D74\u8DBA\u90E8\u91DC\u961C\u9644\u99D9\u9CE7\u5317\u5206\u5429\u5674\u58B3\u5954\u596E\u5FFF\u61A4\u626E\u6610\u6C7E\u711A\u76C6\u7C89\u7CDE\u7D1B\u82AC\u8CC1\u96F0\uF967\u4F5B\u5F17\u5F7F\u62C2\u5D29\u670B\u68DA\u787C\u7E43\u9D6C\u4E15\u5099\u5315\u532A\u5351\u5983\u5A62\u5E87\u60B2\u618A\u6249\u6279\u6590\u6787\u69A7\u6BD4\u6BD6\u6BD7\u6BD8\u6CB8\uF968\u7435\u75FA\u7812\u7891\u79D5\u79D8\u7C83\u7DCB\u7FE1\u80A5"],["dea1","\u813E\u81C2\u83F2\u871A\u88E8\u8AB9\u8B6C\u8CBB\u9119\u975E\u98DB\u9F3B\u56AC\u5B2A\u5F6C\u658C\u6AB3\u6BAF\u6D5C\u6FF1\u7015\u725D\u73AD\u8CA7\u8CD3\u983B\u6191\u6C37\u8058\u9A01\u4E4D\u4E8B\u4E9B\u4ED5\u4F3A\u4F3C\u4F7F\u4FDF\u50FF\u53F2\u53F8\u5506\u55E3\u56DB\u58EB\u5962\u5A11\u5BEB\u5BFA\u5C04\u5DF3\u5E2B\u5F99\u601D\u6368\u659C\u65AF\u67F6\u67FB\u68AD\u6B7B\u6C99\u6CD7\u6E23\u7009\u7345\u7802\u793E\u7940\u7960\u79C1\u7BE9\u7D17\u7D72\u8086\u820D\u838E\u84D1\u86C7\u88DF\u8A50\u8A5E\u8B1D\u8CDC\u8D66\u8FAD\u90AA\u98FC\u99DF\u9E9D\u524A\uF969\u6714\uF96A"],["dfa1","\u5098\u522A\u5C71\u6563\u6C55\u73CA\u7523\u759D\u7B97\u849C\u9178\u9730\u4E77\u6492\u6BBA\u715E\u85A9\u4E09\uF96B\u6749\u68EE\u6E17\u829F\u8518\u886B\u63F7\u6F81\u9212\u98AF\u4E0A\u50B7\u50CF\u511F\u5546\u55AA\u5617\u5B40\u5C19\u5CE0\u5E38\u5E8A\u5EA0\u5EC2\u60F3\u6851\u6A61\u6E58\u723D\u7240\u72C0\u76F8\u7965\u7BB1\u7FD4\u88F3\u89F4\u8A73\u8C61\u8CDE\u971C\u585E\u74BD\u8CFD\u55C7\uF96C\u7A61\u7D22\u8272\u7272\u751F\u7525\uF96D\u7B19\u5885\u58FB\u5DBC\u5E8F\u5EB6\u5F90\u6055\u6292\u637F\u654D\u6691\u66D9\u66F8\u6816\u68F2\u7280\u745E\u7B6E\u7D6E\u7DD6\u7F72"],["e0a1","\u80E5\u8212\u85AF\u897F\u8A93\u901D\u92E4\u9ECD\u9F20\u5915\u596D\u5E2D\u60DC\u6614\u6673\u6790\u6C50\u6DC5\u6F5F\u77F3\u78A9\u84C6\u91CB\u932B\u4ED9\u50CA\u5148\u5584\u5B0B\u5BA3\u6247\u657E\u65CB\u6E32\u717D\u7401\u7444\u7487\u74BF\u766C\u79AA\u7DDA\u7E55\u7FA8\u817A\u81B3\u8239\u861A\u87EC\u8A75\u8DE3\u9078\u9291\u9425\u994D\u9BAE\u5368\u5C51\u6954\u6CC4\u6D29\u6E2B\u820C\u859B\u893B\u8A2D\u8AAA\u96EA\u9F67\u5261\u66B9\u6BB2\u7E96\u87FE\u8D0D\u9583\u965D\u651D\u6D89\u71EE\uF96E\u57CE\u59D3\u5BAC\u6027\u60FA\u6210\u661F\u665F\u7329\u73F9\u76DB\u7701\u7B6C"],["e1a1","\u8056\u8072\u8165\u8AA0\u9192\u4E16\u52E2\u6B72\u6D17\u7A05\u7B39\u7D30\uF96F\u8CB0\u53EC\u562F\u5851\u5BB5\u5C0F\u5C11\u5DE2\u6240\u6383\u6414\u662D\u68B3\u6CBC\u6D88\u6EAF\u701F\u70A4\u71D2\u7526\u758F\u758E\u7619\u7B11\u7BE0\u7C2B\u7D20\u7D39\u852C\u856D\u8607\u8A34\u900D\u9061\u90B5\u92B7\u97F6\u9A37\u4FD7\u5C6C\u675F\u6D91\u7C9F\u7E8C\u8B16\u8D16\u901F\u5B6B\u5DFD\u640D\u84C0\u905C\u98E1\u7387\u5B8B\u609A\u677E\u6DDE\u8A1F\u8AA6\u9001\u980C\u5237\uF970\u7051\u788E\u9396\u8870\u91D7\u4FEE\u53D7\u55FD\u56DA\u5782\u58FD\u5AC2\u5B88\u5CAB\u5CC0\u5E25\u6101"],["e2a1","\u620D\u624B\u6388\u641C\u6536\u6578\u6A39\u6B8A\u6C34\u6D19\u6F31\u71E7\u72E9\u7378\u7407\u74B2\u7626\u7761\u79C0\u7A57\u7AEA\u7CB9\u7D8F\u7DAC\u7E61\u7F9E\u8129\u8331\u8490\u84DA\u85EA\u8896\u8AB0\u8B90\u8F38\u9042\u9083\u916C\u9296\u92B9\u968B\u96A7\u96A8\u96D6\u9700\u9808\u9996\u9AD3\u9B1A\u53D4\u587E\u5919\u5B70\u5BBF\u6DD1\u6F5A\u719F\u7421\u74B9\u8085\u83FD\u5DE1\u5F87\u5FAA\u6042\u65EC\u6812\u696F\u6A53\u6B89\u6D35\u6DF3\u73E3\u76FE\u77AC\u7B4D\u7D14\u8123\u821C\u8340\u84F4\u8563\u8A62\u8AC4\u9187\u931E\u9806\u99B4\u620C\u8853\u8FF0\u9265\u5D07\u5D27"],["e3a1","\u5D69\u745F\u819D\u8768\u6FD5\u62FE\u7FD2\u8936\u8972\u4E1E\u4E58\u50E7\u52DD\u5347\u627F\u6607\u7E69\u8805\u965E\u4F8D\u5319\u5636\u59CB\u5AA4\u5C38\u5C4E\u5C4D\u5E02\u5F11\u6043\u65BD\u662F\u6642\u67BE\u67F4\u731C\u77E2\u793A\u7FC5\u8494\u84CD\u8996\u8A66\u8A69\u8AE1\u8C55\u8C7A\u57F4\u5BD4\u5F0F\u606F\u62ED\u690D\u6B96\u6E5C\u7184\u7BD2\u8755\u8B58\u8EFE\u98DF\u98FE\u4F38\u4F81\u4FE1\u547B\u5A20\u5BB8\u613C\u65B0\u6668\u71FC\u7533\u795E\u7D33\u814E\u81E3\u8398\u85AA\u85CE\u8703\u8A0A\u8EAB\u8F9B\uF971\u8FC5\u5931\u5BA4\u5BE6\u6089\u5BE9\u5C0B\u5FC3\u6C81"],["e4a1","\uF972\u6DF1\u700B\u751A\u82AF\u8AF6\u4EC0\u5341\uF973\u96D9\u6C0F\u4E9E\u4FC4\u5152\u555E\u5A25\u5CE8\u6211\u7259\u82BD\u83AA\u86FE\u8859\u8A1D\u963F\u96C5\u9913\u9D09\u9D5D\u580A\u5CB3\u5DBD\u5E44\u60E1\u6115\u63E1\u6A02\u6E25\u9102\u9354\u984E\u9C10\u9F77\u5B89\u5CB8\u6309\u664F\u6848\u773C\u96C1\u978D\u9854\u9B9F\u65A1\u8B01\u8ECB\u95BC\u5535\u5CA9\u5DD6\u5EB5\u6697\u764C\u83F4\u95C7\u58D3\u62BC\u72CE\u9D28\u4EF0\u592E\u600F\u663B\u6B83\u79E7\u9D26\u5393\u54C0\u57C3\u5D16\u611B\u66D6\u6DAF\u788D\u827E\u9698\u9744\u5384\u627C\u6396\u6DB2\u7E0A\u814B\u984D"],["e5a1","\u6AFB\u7F4C\u9DAF\u9E1A\u4E5F\u503B\u51B6\u591C\u60F9\u63F6\u6930\u723A\u8036\uF974\u91CE\u5F31\uF975\uF976\u7D04\u82E5\u846F\u84BB\u85E5\u8E8D\uF977\u4F6F\uF978\uF979\u58E4\u5B43\u6059\u63DA\u6518\u656D\u6698\uF97A\u694A\u6A23\u6D0B\u7001\u716C\u75D2\u760D\u79B3\u7A70\uF97B\u7F8A\uF97C\u8944\uF97D\u8B93\u91C0\u967D\uF97E\u990A\u5704\u5FA1\u65BC\u6F01\u7600\u79A6\u8A9E\u99AD\u9B5A\u9F6C\u5104\u61B6\u6291\u6A8D\u81C6\u5043\u5830\u5F66\u7109\u8A00\u8AFA\u5B7C\u8616\u4FFA\u513C\u56B4\u5944\u63A9\u6DF9\u5DAA\u696D\u5186\u4E88\u4F59\uF97F\uF980\uF981\u5982\uF982"],["e6a1","\uF983\u6B5F\u6C5D\uF984\u74B5\u7916\uF985\u8207\u8245\u8339\u8F3F\u8F5D\uF986\u9918\uF987\uF988\uF989\u4EA6\uF98A\u57DF\u5F79\u6613\uF98B\uF98C\u75AB\u7E79\u8B6F\uF98D\u9006\u9A5B\u56A5\u5827\u59F8\u5A1F\u5BB4\uF98E\u5EF6\uF98F\uF990\u6350\u633B\uF991\u693D\u6C87\u6CBF\u6D8E\u6D93\u6DF5\u6F14\uF992\u70DF\u7136\u7159\uF993\u71C3\u71D5\uF994\u784F\u786F\uF995\u7B75\u7DE3\uF996\u7E2F\uF997\u884D\u8EDF\uF998\uF999\uF99A\u925B\uF99B\u9CF6\uF99C\uF99D\uF99E\u6085\u6D85\uF99F\u71B1\uF9A0\uF9A1\u95B1\u53AD\uF9A2\uF9A3\uF9A4\u67D3\uF9A5\u708E\u7130\u7430\u8276\u82D2"],["e7a1","\uF9A6\u95BB\u9AE5\u9E7D\u66C4\uF9A7\u71C1\u8449\uF9A8\uF9A9\u584B\uF9AA\uF9AB\u5DB8\u5F71\uF9AC\u6620\u668E\u6979\u69AE\u6C38\u6CF3\u6E36\u6F41\u6FDA\u701B\u702F\u7150\u71DF\u7370\uF9AD\u745B\uF9AE\u74D4\u76C8\u7A4E\u7E93\uF9AF\uF9B0\u82F1\u8A60\u8FCE\uF9B1\u9348\uF9B2\u9719\uF9B3\uF9B4\u4E42\u502A\uF9B5\u5208\u53E1\u66F3\u6C6D\u6FCA\u730A\u777F\u7A62\u82AE\u85DD\u8602\uF9B6\u88D4\u8A63\u8B7D\u8C6B\uF9B7\u92B3\uF9B8\u9713\u9810\u4E94\u4F0D\u4FC9\u50B2\u5348\u543E\u5433\u55DA\u5862\u58BA\u5967\u5A1B\u5BE4\u609F\uF9B9\u61CA\u6556\u65FF\u6664\u68A7\u6C5A\u6FB3"],["e8a1","\u70CF\u71AC\u7352\u7B7D\u8708\u8AA4\u9C32\u9F07\u5C4B\u6C83\u7344\u7389\u923A\u6EAB\u7465\u761F\u7A69\u7E15\u860A\u5140\u58C5\u64C1\u74EE\u7515\u7670\u7FC1\u9095\u96CD\u9954\u6E26\u74E6\u7AA9\u7AAA\u81E5\u86D9\u8778\u8A1B\u5A49\u5B8C\u5B9B\u68A1\u6900\u6D63\u73A9\u7413\u742C\u7897\u7DE9\u7FEB\u8118\u8155\u839E\u8C4C\u962E\u9811\u66F0\u5F80\u65FA\u6789\u6C6A\u738B\u502D\u5A03\u6B6A\u77EE\u5916\u5D6C\u5DCD\u7325\u754F\uF9BA\uF9BB\u50E5\u51F9\u582F\u592D\u5996\u59DA\u5BE5\uF9BC\uF9BD\u5DA2\u62D7\u6416\u6493\u64FE\uF9BE\u66DC\uF9BF\u6A48\uF9C0\u71FF\u7464\uF9C1"],["e9a1","\u7A88\u7AAF\u7E47\u7E5E\u8000\u8170\uF9C2\u87EF\u8981\u8B20\u9059\uF9C3\u9080\u9952\u617E\u6B32\u6D74\u7E1F\u8925\u8FB1\u4FD1\u50AD\u5197\u52C7\u57C7\u5889\u5BB9\u5EB8\u6142\u6995\u6D8C\u6E67\u6EB6\u7194\u7462\u7528\u752C\u8073\u8338\u84C9\u8E0A\u9394\u93DE\uF9C4\u4E8E\u4F51\u5076\u512A\u53C8\u53CB\u53F3\u5B87\u5BD3\u5C24\u611A\u6182\u65F4\u725B\u7397\u7440\u76C2\u7950\u7991\u79B9\u7D06\u7FBD\u828B\u85D5\u865E\u8FC2\u9047\u90F5\u91EA\u9685\u96E8\u96E9\u52D6\u5F67\u65ED\u6631\u682F\u715C\u7A36\u90C1\u980A\u4E91\uF9C5\u6A52\u6B9E\u6F90\u7189\u8018\u82B8\u8553"],["eaa1","\u904B\u9695\u96F2\u97FB\u851A\u9B31\u4E90\u718A\u96C4\u5143\u539F\u54E1\u5713\u5712\u57A3\u5A9B\u5AC4\u5BC3\u6028\u613F\u63F4\u6C85\u6D39\u6E72\u6E90\u7230\u733F\u7457\u82D1\u8881\u8F45\u9060\uF9C6\u9662\u9858\u9D1B\u6708\u8D8A\u925E\u4F4D\u5049\u50DE\u5371\u570D\u59D4\u5A01\u5C09\u6170\u6690\u6E2D\u7232\u744B\u7DEF\u80C3\u840E\u8466\u853F\u875F\u885B\u8918\u8B02\u9055\u97CB\u9B4F\u4E73\u4F91\u5112\u516A\uF9C7\u552F\u55A9\u5B7A\u5BA5\u5E7C\u5E7D\u5EBE\u60A0\u60DF\u6108\u6109\u63C4\u6538\u6709\uF9C8\u67D4\u67DA\uF9C9\u6961\u6962\u6CB9\u6D27\uF9CA\u6E38\uF9CB"],["eba1","\u6FE1\u7336\u7337\uF9CC\u745C\u7531\uF9CD\u7652\uF9CE\uF9CF\u7DAD\u81FE\u8438\u88D5\u8A98\u8ADB\u8AED\u8E30\u8E42\u904A\u903E\u907A\u9149\u91C9\u936E\uF9D0\uF9D1\u5809\uF9D2\u6BD3\u8089\u80B2\uF9D3\uF9D4\u5141\u596B\u5C39\uF9D5\uF9D6\u6F64\u73A7\u80E4\u8D07\uF9D7\u9217\u958F\uF9D8\uF9D9\uF9DA\uF9DB\u807F\u620E\u701C\u7D68\u878D\uF9DC\u57A0\u6069\u6147\u6BB7\u8ABE\u9280\u96B1\u4E59\u541F\u6DEB\u852D\u9670\u97F3\u98EE\u63D6\u6CE3\u9091\u51DD\u61C9\u81BA\u9DF9\u4F9D\u501A\u5100\u5B9C\u610F\u61FF\u64EC\u6905\u6BC5\u7591\u77E3\u7FA9\u8264\u858F\u87FB\u8863\u8ABC"],["eca1","\u8B70\u91AB\u4E8C\u4EE5\u4F0A\uF9DD\uF9DE\u5937\u59E8\uF9DF\u5DF2\u5F1B\u5F5B\u6021\uF9E0\uF9E1\uF9E2\uF9E3\u723E\u73E5\uF9E4\u7570\u75CD\uF9E5\u79FB\uF9E6\u800C\u8033\u8084\u82E1\u8351\uF9E7\uF9E8\u8CBD\u8CB3\u9087\uF9E9\uF9EA\u98F4\u990C\uF9EB\uF9EC\u7037\u76CA\u7FCA\u7FCC\u7FFC\u8B1A\u4EBA\u4EC1\u5203\u5370\uF9ED\u54BD\u56E0\u59FB\u5BC5\u5F15\u5FCD\u6E6E\uF9EE\uF9EF\u7D6A\u8335\uF9F0\u8693\u8A8D\uF9F1\u976D\u9777\uF9F2\uF9F3\u4E00\u4F5A\u4F7E\u58F9\u65E5\u6EA2\u9038\u93B0\u99B9\u4EFB\u58EC\u598A\u59D9\u6041\uF9F4\uF9F5\u7A14\uF9F6\u834F\u8CC3\u5165\u5344"],["eda1","\uF9F7\uF9F8\uF9F9\u4ECD\u5269\u5B55\u82BF\u4ED4\u523A\u54A8\u59C9\u59FF\u5B50\u5B57\u5B5C\u6063\u6148\u6ECB\u7099\u716E\u7386\u74F7\u75B5\u78C1\u7D2B\u8005\u81EA\u8328\u8517\u85C9\u8AEE\u8CC7\u96CC\u4F5C\u52FA\u56BC\u65AB\u6628\u707C\u70B8\u7235\u7DBD\u828D\u914C\u96C0\u9D72\u5B71\u68E7\u6B98\u6F7A\u76DE\u5C91\u66AB\u6F5B\u7BB4\u7C2A\u8836\u96DC\u4E08\u4ED7\u5320\u5834\u58BB\u58EF\u596C\u5C07\u5E33\u5E84\u5F35\u638C\u66B2\u6756\u6A1F\u6AA3\u6B0C\u6F3F\u7246\uF9FA\u7350\u748B\u7AE0\u7CA7\u8178\u81DF\u81E7\u838A\u846C\u8523\u8594\u85CF\u88DD\u8D13\u91AC\u9577"],["eea1","\u969C\u518D\u54C9\u5728\u5BB0\u624D\u6750\u683D\u6893\u6E3D\u6ED3\u707D\u7E21\u88C1\u8CA1\u8F09\u9F4B\u9F4E\u722D\u7B8F\u8ACD\u931A\u4F47\u4F4E\u5132\u5480\u59D0\u5E95\u62B5\u6775\u696E\u6A17\u6CAE\u6E1A\u72D9\u732A\u75BD\u7BB8\u7D35\u82E7\u83F9\u8457\u85F7\u8A5B\u8CAF\u8E87\u9019\u90B8\u96CE\u9F5F\u52E3\u540A\u5AE1\u5BC2\u6458\u6575\u6EF4\u72C4\uF9FB\u7684\u7A4D\u7B1B\u7C4D\u7E3E\u7FDF\u837B\u8B2B\u8CCA\u8D64\u8DE1\u8E5F\u8FEA\u8FF9\u9069\u93D1\u4F43\u4F7A\u50B3\u5168\u5178\u524D\u526A\u5861\u587C\u5960\u5C08\u5C55\u5EDB\u609B\u6230\u6813\u6BBF\u6C08\u6FB1"],["efa1","\u714E\u7420\u7530\u7538\u7551\u7672\u7B4C\u7B8B\u7BAD\u7BC6\u7E8F\u8A6E\u8F3E\u8F49\u923F\u9293\u9322\u942B\u96FB\u985A\u986B\u991E\u5207\u622A\u6298\u6D59\u7664\u7ACA\u7BC0\u7D76\u5360\u5CBE\u5E97\u6F38\u70B9\u7C98\u9711\u9B8E\u9EDE\u63A5\u647A\u8776\u4E01\u4E95\u4EAD\u505C\u5075\u5448\u59C3\u5B9A\u5E40\u5EAD\u5EF7\u5F81\u60C5\u633A\u653F\u6574\u65CC\u6676\u6678\u67FE\u6968\u6A89\u6B63\u6C40\u6DC0\u6DE8\u6E1F\u6E5E\u701E\u70A1\u738E\u73FD\u753A\u775B\u7887\u798E\u7A0B\u7A7D\u7CBE\u7D8E\u8247\u8A02\u8AEA\u8C9E\u912D\u914A\u91D8\u9266\u92CC\u9320\u9706\u9756"],["f0a1","\u975C\u9802\u9F0E\u5236\u5291\u557C\u5824\u5E1D\u5F1F\u608C\u63D0\u68AF\u6FDF\u796D\u7B2C\u81CD\u85BA\u88FD\u8AF8\u8E44\u918D\u9664\u969B\u973D\u984C\u9F4A\u4FCE\u5146\u51CB\u52A9\u5632\u5F14\u5F6B\u63AA\u64CD\u65E9\u6641\u66FA\u66F9\u671D\u689D\u68D7\u69FD\u6F15\u6F6E\u7167\u71E5\u722A\u74AA\u773A\u7956\u795A\u79DF\u7A20\u7A95\u7C97\u7CDF\u7D44\u7E70\u8087\u85FB\u86A4\u8A54\u8ABF\u8D99\u8E81\u9020\u906D\u91E3\u963B\u96D5\u9CE5\u65CF\u7C07\u8DB3\u93C3\u5B58\u5C0A\u5352\u62D9\u731D\u5027\u5B97\u5F9E\u60B0\u616B\u68D5\u6DD9\u742E\u7A2E\u7D42\u7D9C\u7E31\u816B"],["f1a1","\u8E2A\u8E35\u937E\u9418\u4F50\u5750\u5DE6\u5EA7\u632B\u7F6A\u4E3B\u4F4F\u4F8F\u505A\u59DD\u80C4\u546A\u5468\u55FE\u594F\u5B99\u5DDE\u5EDA\u665D\u6731\u67F1\u682A\u6CE8\u6D32\u6E4A\u6F8D\u70B7\u73E0\u7587\u7C4C\u7D02\u7D2C\u7DA2\u821F\u86DB\u8A3B\u8A85\u8D70\u8E8A\u8F33\u9031\u914E\u9152\u9444\u99D0\u7AF9\u7CA5\u4FCA\u5101\u51C6\u57C8\u5BEF\u5CFB\u6659\u6A3D\u6D5A\u6E96\u6FEC\u710C\u756F\u7AE3\u8822\u9021\u9075\u96CB\u99FF\u8301\u4E2D\u4EF2\u8846\u91CD\u537D\u6ADB\u696B\u6C41\u847A\u589E\u618E\u66FE\u62EF\u70DD\u7511\u75C7\u7E52\u84B8\u8B49\u8D08\u4E4B\u53EA"],["f2a1","\u54AB\u5730\u5740\u5FD7\u6301\u6307\u646F\u652F\u65E8\u667A\u679D\u67B3\u6B62\u6C60\u6C9A\u6F2C\u77E5\u7825\u7949\u7957\u7D19\u80A2\u8102\u81F3\u829D\u82B7\u8718\u8A8C\uF9FC\u8D04\u8DBE\u9072\u76F4\u7A19\u7A37\u7E54\u8077\u5507\u55D4\u5875\u632F\u6422\u6649\u664B\u686D\u699B\u6B84\u6D25\u6EB1\u73CD\u7468\u74A1\u755B\u75B9\u76E1\u771E\u778B\u79E6\u7E09\u7E1D\u81FB\u852F\u8897\u8A3A\u8CD1\u8EEB\u8FB0\u9032\u93AD\u9663\u9673\u9707\u4F84\u53F1\u59EA\u5AC9\u5E19\u684E\u74C6\u75BE\u79E9\u7A92\u81A3\u86ED\u8CEA\u8DCC\u8FED\u659F\u6715\uF9FD\u57F7\u6F57\u7DDD\u8F2F"],["f3a1","\u93F6\u96C6\u5FB5\u61F2\u6F84\u4E14\u4F98\u501F\u53C9\u55DF\u5D6F\u5DEE\u6B21\u6B64\u78CB\u7B9A\uF9FE\u8E49\u8ECA\u906E\u6349\u643E\u7740\u7A84\u932F\u947F\u9F6A\u64B0\u6FAF\u71E6\u74A8\u74DA\u7AC4\u7C12\u7E82\u7CB2\u7E98\u8B9A\u8D0A\u947D\u9910\u994C\u5239\u5BDF\u64E6\u672D\u7D2E\u50ED\u53C3\u5879\u6158\u6159\u61FA\u65AC\u7AD9\u8B92\u8B96\u5009\u5021\u5275\u5531\u5A3C\u5EE0\u5F70\u6134\u655E\u660C\u6636\u66A2\u69CD\u6EC4\u6F32\u7316\u7621\u7A93\u8139\u8259\u83D6\u84BC\u50B5\u57F0\u5BC0\u5BE8\u5F69\u63A1\u7826\u7DB5\u83DC\u8521\u91C7\u91F5\u518A\u67F5\u7B56"],["f4a1","\u8CAC\u51C4\u59BB\u60BD\u8655\u501C\uF9FF\u5254\u5C3A\u617D\u621A\u62D3\u64F2\u65A5\u6ECC\u7620\u810A\u8E60\u965F\u96BB\u4EDF\u5343\u5598\u5929\u5DDD\u64C5\u6CC9\u6DFA\u7394\u7A7F\u821B\u85A6\u8CE4\u8E10\u9077\u91E7\u95E1\u9621\u97C6\u51F8\u54F2\u5586\u5FB9\u64A4\u6F88\u7DB4\u8F1F\u8F4D\u9435\u50C9\u5C16\u6CBE\u6DFB\u751B\u77BB\u7C3D\u7C64\u8A79\u8AC2\u581E\u59BE\u5E16\u6377\u7252\u758A\u776B\u8ADC\u8CBC\u8F12\u5EF3\u6674\u6DF8\u807D\u83C1\u8ACB\u9751\u9BD6\uFA00\u5243\u66FF\u6D95\u6EEF\u7DE0\u8AE6\u902E\u905E\u9AD4\u521D\u527F\u54E8\u6194\u6284\u62DB\u68A2"],["f5a1","\u6912\u695A\u6A35\u7092\u7126\u785D\u7901\u790E\u79D2\u7A0D\u8096\u8278\u82D5\u8349\u8549\u8C82\u8D85\u9162\u918B\u91AE\u4FC3\u56D1\u71ED\u77D7\u8700\u89F8\u5BF8\u5FD6\u6751\u90A8\u53E2\u585A\u5BF5\u60A4\u6181\u6460\u7E3D\u8070\u8525\u9283\u64AE\u50AC\u5D14\u6700\u589C\u62BD\u63A8\u690E\u6978\u6A1E\u6E6B\u76BA\u79CB\u82BB\u8429\u8ACF\u8DA8\u8FFD\u9112\u914B\u919C\u9310\u9318\u939A\u96DB\u9A36\u9C0D\u4E11\u755C\u795D\u7AFA\u7B51\u7BC9\u7E2E\u84C4\u8E59\u8E74\u8EF8\u9010\u6625\u693F\u7443\u51FA\u672E\u9EDC\u5145\u5FE0\u6C96\u87F2\u885D\u8877\u60B4\u81B5\u8403"],["f6a1","\u8D05\u53D6\u5439\u5634\u5A36\u5C31\u708A\u7FE0\u805A\u8106\u81ED\u8DA3\u9189\u9A5F\u9DF2\u5074\u4EC4\u53A0\u60FB\u6E2C\u5C64\u4F88\u5024\u55E4\u5CD9\u5E5F\u6065\u6894\u6CBB\u6DC4\u71BE\u75D4\u75F4\u7661\u7A1A\u7A49\u7DC7\u7DFB\u7F6E\u81F4\u86A9\u8F1C\u96C9\u99B3\u9F52\u5247\u52C5\u98ED\u89AA\u4E03\u67D2\u6F06\u4FB5\u5BE2\u6795\u6C88\u6D78\u741B\u7827\u91DD\u937C\u87C4\u79E4\u7A31\u5FEB\u4ED6\u54A4\u553E\u58AE\u59A5\u60F0\u6253\u62D6\u6736\u6955\u8235\u9640\u99B1\u99DD\u502C\u5353\u5544\u577C\uFA01\u6258\uFA02\u64E2\u666B\u67DD\u6FC1\u6FEF\u7422\u7438\u8A17"],["f7a1","\u9438\u5451\u5606\u5766\u5F48\u619A\u6B4E\u7058\u70AD\u7DBB\u8A95\u596A\u812B\u63A2\u7708\u803D\u8CAA\u5854\u642D\u69BB\u5B95\u5E11\u6E6F\uFA03\u8569\u514C\u53F0\u592A\u6020\u614B\u6B86\u6C70\u6CF0\u7B1E\u80CE\u82D4\u8DC6\u90B0\u98B1\uFA04\u64C7\u6FA4\u6491\u6504\u514E\u5410\u571F\u8A0E\u615F\u6876\uFA05\u75DB\u7B52\u7D71\u901A\u5806\u69CC\u817F\u892A\u9000\u9839\u5078\u5957\u59AC\u6295\u900F\u9B2A\u615D\u7279\u95D6\u5761\u5A46\u5DF4\u628A\u64AD\u64FA\u6777\u6CE2\u6D3E\u722C\u7436\u7834\u7F77\u82AD\u8DDB\u9817\u5224\u5742\u677F\u7248\u74E3\u8CA9\u8FA6\u9211"],["f8a1","\u962A\u516B\u53ED\u634C\u4F69\u5504\u6096\u6557\u6C9B\u6D7F\u724C\u72FD\u7A17\u8987\u8C9D\u5F6D\u6F8E\u70F9\u81A8\u610E\u4FBF\u504F\u6241\u7247\u7BC7\u7DE8\u7FE9\u904D\u97AD\u9A19\u8CB6\u576A\u5E73\u67B0\u840D\u8A55\u5420\u5B16\u5E63\u5EE2\u5F0A\u6583\u80BA\u853D\u9589\u965B\u4F48\u5305\u530D\u530F\u5486\u54FA\u5703\u5E03\u6016\u629B\u62B1\u6355\uFA06\u6CE1\u6D66\u75B1\u7832\u80DE\u812F\u82DE\u8461\u84B2\u888D\u8912\u900B\u92EA\u98FD\u9B91\u5E45\u66B4\u66DD\u7011\u7206\uFA07\u4FF5\u527D\u5F6A\u6153\u6753\u6A19\u6F02\u74E2\u7968\u8868\u8C79\u98C7\u98C4\u9A43"],["f9a1","\u54C1\u7A1F\u6953\u8AF7\u8C4A\u98A8\u99AE\u5F7C\u62AB\u75B2\u76AE\u88AB\u907F\u9642\u5339\u5F3C\u5FC5\u6CCC\u73CC\u7562\u758B\u7B46\u82FE\u999D\u4E4F\u903C\u4E0B\u4F55\u53A6\u590F\u5EC8\u6630\u6CB3\u7455\u8377\u8766\u8CC0\u9050\u971E\u9C15\u58D1\u5B78\u8650\u8B14\u9DB4\u5BD2\u6068\u608D\u65F1\u6C57\u6F22\u6FA3\u701A\u7F55\u7FF0\u9591\u9592\u9650\u97D3\u5272\u8F44\u51FD\u542B\u54B8\u5563\u558A\u6ABB\u6DB5\u7DD8\u8266\u929C\u9677\u9E79\u5408\u54C8\u76D2\u86E4\u95A4\u95D4\u965C\u4EA2\u4F09\u59EE\u5AE6\u5DF7\u6052\u6297\u676D\u6841\u6C86\u6E2F\u7F38\u809B\u822A"],["faa1","\uFA08\uFA09\u9805\u4EA5\u5055\u54B3\u5793\u595A\u5B69\u5BB3\u61C8\u6977\u6D77\u7023\u87F9\u89E3\u8A72\u8AE7\u9082\u99ED\u9AB8\u52BE\u6838\u5016\u5E78\u674F\u8347\u884C\u4EAB\u5411\u56AE\u73E6\u9115\u97FF\u9909\u9957\u9999\u5653\u589F\u865B\u8A31\u61B2\u6AF6\u737B\u8ED2\u6B47\u96AA\u9A57\u5955\u7200\u8D6B\u9769\u4FD4\u5CF4\u5F26\u61F8\u665B\u6CEB\u70AB\u7384\u73B9\u73FE\u7729\u774D\u7D43\u7D62\u7E23\u8237\u8852\uFA0A\u8CE2\u9249\u986F\u5B51\u7A74\u8840\u9801\u5ACC\u4FE0\u5354\u593E\u5CFD\u633E\u6D79\u72F9\u8105\u8107\u83A2\u92CF\u9830\u4EA8\u5144\u5211\u578B"],["fba1","\u5F62\u6CC2\u6ECE\u7005\u7050\u70AF\u7192\u73E9\u7469\u834A\u87A2\u8861\u9008\u90A2\u93A3\u99A8\u516E\u5F57\u60E0\u6167\u66B3\u8559\u8E4A\u91AF\u978B\u4E4E\u4E92\u547C\u58D5\u58FA\u597D\u5CB5\u5F27\u6236\u6248\u660A\u6667\u6BEB\u6D69\u6DCF\u6E56\u6EF8\u6F94\u6FE0\u6FE9\u705D\u72D0\u7425\u745A\u74E0\u7693\u795C\u7CCA\u7E1E\u80E1\u82A6\u846B\u84BF\u864E\u865F\u8774\u8B77\u8C6A\u93AC\u9800\u9865\u60D1\u6216\u9177\u5A5A\u660F\u6DF7\u6E3E\u743F\u9B42\u5FFD\u60DA\u7B0F\u54C4\u5F18\u6C5E\u6CD3\u6D2A\u70D8\u7D05\u8679\u8A0C\u9D3B\u5316\u548C\u5B05\u6A3A\u706B\u7575"],["fca1","\u798D\u79BE\u82B1\u83EF\u8A71\u8B41\u8CA8\u9774\uFA0B\u64F4\u652B\u78BA\u78BB\u7A6B\u4E38\u559A\u5950\u5BA6\u5E7B\u60A3\u63DB\u6B61\u6665\u6853\u6E19\u7165\u74B0\u7D08\u9084\u9A69\u9C25\u6D3B\u6ED1\u733E\u8C41\u95CA\u51F0\u5E4C\u5FA8\u604D\u60F6\u6130\u614C\u6643\u6644\u69A5\u6CC1\u6E5F\u6EC9\u6F62\u714C\u749C\u7687\u7BC1\u7C27\u8352\u8757\u9051\u968D\u9EC3\u532F\u56DE\u5EFB\u5F8A\u6062\u6094\u61F7\u6666\u6703\u6A9C\u6DEE\u6FAE\u7070\u736A\u7E6A\u81BE\u8334\u86D4\u8AA8\u8CC4\u5283\u7372\u5B96\u6A6B\u9404\u54EE\u5686\u5B5D\u6548\u6585\u66C9\u689F\u6D8D\u6DC6"],["fda1","\u723B\u80B4\u9175\u9A4D\u4FAF\u5019\u539A\u540E\u543C\u5589\u55C5\u5E3F\u5F8C\u673D\u7166\u73DD\u9005\u52DB\u52F3\u5864\u58CE\u7104\u718F\u71FB\u85B0\u8A13\u6688\u85A8\u55A7\u6684\u714A\u8431\u5349\u5599\u6BC1\u5F59\u5FBD\u63EE\u6689\u7147\u8AF1\u8F1D\u9EBE\u4F11\u643A\u70CB\u7566\u8667\u6064\u8B4E\u9DF8\u5147\u51F6\u5308\u6D36\u80F8\u9ED1\u6615\u6B23\u7098\u75D5\u5403\u5C79\u7D07\u8A16\u6B20\u6B3D\u6B46\u5438\u6070\u6D3D\u7FD5\u8208\u50D6\u51DE\u559C\u566B\u56CD\u59EC\u5B09\u5E0C\u6199\u6198\u6231\u665E\u66E6\u7199\u71B9\u71BA\u72A7\u79A7\u7A00\u7FB2\u8A70"]]});var Gd0=o((SM$,TV9)=>{TV9.exports=[["0","\x00",127],["a140","\u3000\uFF0C\u3001\u3002\uFF0E\u2027\uFF1B\uFF1A\uFF1F\uFF01\uFE30\u2026\u2025\uFE50\uFE51\uFE52\xB7\uFE54\uFE55\uFE56\uFE57\uFF5C\u2013\uFE31\u2014\uFE33\u2574\uFE34\uFE4F\uFF08\uFF09\uFE35\uFE36\uFF5B\uFF5D\uFE37\uFE38\u3014\u3015\uFE39\uFE3A\u3010\u3011\uFE3B\uFE3C\u300A\u300B\uFE3D\uFE3E\u3008\u3009\uFE3F\uFE40\u300C\u300D\uFE41\uFE42\u300E\u300F\uFE43\uFE44\uFE59\uFE5A"],["a1a1","\uFE5B\uFE5C\uFE5D\uFE5E\u2018\u2019\u201C\u201D\u301D\u301E\u2035\u2032\uFF03\uFF06\uFF0A\u203B\xA7\u3003\u25CB\u25CF\u25B3\u25B2\u25CE\u2606\u2605\u25C7\u25C6\u25A1\u25A0\u25BD\u25BC\u32A3\u2105\xAF\uFFE3\uFF3F\u02CD\uFE49\uFE4A\uFE4D\uFE4E\uFE4B\uFE4C\uFE5F\uFE60\uFE61\uFF0B\uFF0D\xD7\xF7\xB1\u221A\uFF1C\uFF1E\uFF1D\u2266\u2267\u2260\u221E\u2252\u2261\uFE62",4,"\uFF5E\u2229\u222A\u22A5\u2220\u221F\u22BF\u33D2\u33D1\u222B\u222E\u2235\u2234\u2640\u2642\u2295\u2299\u2191\u2193\u2190\u2192\u2196\u2197\u2199\u2198\u2225\u2223\uFF0F"],["a240","\uFF3C\u2215\uFE68\uFF04\uFFE5\u3012\uFFE0\uFFE1\uFF05\uFF20\u2103\u2109\uFE69\uFE6A\uFE6B\u33D5\u339C\u339D\u339E\u33CE\u33A1\u338E\u338F\u33C4\xB0\u5159\u515B\u515E\u515D\u5161\u5163\u55E7\u74E9\u7CCE\u2581",7,"\u258F\u258E\u258D\u258C\u258B\u258A\u2589\u253C\u2534\u252C\u2524\u251C\u2594\u2500\u2502\u2595\u250C\u2510\u2514\u2518\u256D"],["a2a1","\u256E\u2570\u256F\u2550\u255E\u256A\u2561\u25E2\u25E3\u25E5\u25E4\u2571\u2572\u2573\uFF10",9,"\u2160",9,"\u3021",8,"\u5341\u5344\u5345\uFF21",25,"\uFF41",21],["a340","\uFF57\uFF58\uFF59\uFF5A\u0391",16,"\u03A3",6,"\u03B1",16,"\u03C3",6,"\u3105",10],["a3a1","\u3110",25,"\u02D9\u02C9\u02CA\u02C7\u02CB"],["a3e1","\u20AC"],["a440","\u4E00\u4E59\u4E01\u4E03\u4E43\u4E5D\u4E86\u4E8C\u4EBA\u513F\u5165\u516B\u51E0\u5200\u5201\u529B\u5315\u5341\u535C\u53C8\u4E09\u4E0B\u4E08\u4E0A\u4E2B\u4E38\u51E1\u4E45\u4E48\u4E5F\u4E5E\u4E8E\u4EA1\u5140\u5203\u52FA\u5343\u53C9\u53E3\u571F\u58EB\u5915\u5927\u5973\u5B50\u5B51\u5B53\u5BF8\u5C0F\u5C22\u5C38\u5C71\u5DDD\u5DE5\u5DF1\u5DF2\u5DF3\u5DFE\u5E72\u5EFE\u5F0B\u5F13\u624D"],["a4a1","\u4E11\u4E10\u4E0D\u4E2D\u4E30\u4E39\u4E4B\u5C39\u4E88\u4E91\u4E95\u4E92\u4E94\u4EA2\u4EC1\u4EC0\u4EC3\u4EC6\u4EC7\u4ECD\u4ECA\u4ECB\u4EC4\u5143\u5141\u5167\u516D\u516E\u516C\u5197\u51F6\u5206\u5207\u5208\u52FB\u52FE\u52FF\u5316\u5339\u5348\u5347\u5345\u535E\u5384\u53CB\u53CA\u53CD\u58EC\u5929\u592B\u592A\u592D\u5B54\u5C11\u5C24\u5C3A\u5C6F\u5DF4\u5E7B\u5EFF\u5F14\u5F15\u5FC3\u6208\u6236\u624B\u624E\u652F\u6587\u6597\u65A4\u65B9\u65E5\u66F0\u6708\u6728\u6B20\u6B62\u6B79\u6BCB\u6BD4\u6BDB\u6C0F\u6C34\u706B\u722A\u7236\u723B\u7247\u7259\u725B\u72AC\u738B\u4E19"],["a540","\u4E16\u4E15\u4E14\u4E18\u4E3B\u4E4D\u4E4F\u4E4E\u4EE5\u4ED8\u4ED4\u4ED5\u4ED6\u4ED7\u4EE3\u4EE4\u4ED9\u4EDE\u5145\u5144\u5189\u518A\u51AC\u51F9\u51FA\u51F8\u520A\u52A0\u529F\u5305\u5306\u5317\u531D\u4EDF\u534A\u5349\u5361\u5360\u536F\u536E\u53BB\u53EF\u53E4\u53F3\u53EC\u53EE\u53E9\u53E8\u53FC\u53F8\u53F5\u53EB\u53E6\u53EA\u53F2\u53F1\u53F0\u53E5\u53ED\u53FB\u56DB\u56DA\u5916"],["a5a1","\u592E\u5931\u5974\u5976\u5B55\u5B83\u5C3C\u5DE8\u5DE7\u5DE6\u5E02\u5E03\u5E73\u5E7C\u5F01\u5F18\u5F17\u5FC5\u620A\u6253\u6254\u6252\u6251\u65A5\u65E6\u672E\u672C\u672A\u672B\u672D\u6B63\u6BCD\u6C11\u6C10\u6C38\u6C41\u6C40\u6C3E\u72AF\u7384\u7389\u74DC\u74E6\u7518\u751F\u7528\u7529\u7530\u7531\u7532\u7533\u758B\u767D\u76AE\u76BF\u76EE\u77DB\u77E2\u77F3\u793A\u79BE\u7A74\u7ACB\u4E1E\u4E1F\u4E52\u4E53\u4E69\u4E99\u4EA4\u4EA6\u4EA5\u4EFF\u4F09\u4F19\u4F0A\u4F15\u4F0D\u4F10\u4F11\u4F0F\u4EF2\u4EF6\u4EFB\u4EF0\u4EF3\u4EFD\u4F01\u4F0B\u5149\u5147\u5146\u5148\u5168"],["a640","\u5171\u518D\u51B0\u5217\u5211\u5212\u520E\u5216\u52A3\u5308\u5321\u5320\u5370\u5371\u5409\u540F\u540C\u540A\u5410\u5401\u540B\u5404\u5411\u540D\u5408\u5403\u540E\u5406\u5412\u56E0\u56DE\u56DD\u5733\u5730\u5728\u572D\u572C\u572F\u5729\u5919\u591A\u5937\u5938\u5984\u5978\u5983\u597D\u5979\u5982\u5981\u5B57\u5B58\u5B87\u5B88\u5B85\u5B89\u5BFA\u5C16\u5C79\u5DDE\u5E06\u5E76\u5E74"],["a6a1","\u5F0F\u5F1B\u5FD9\u5FD6\u620E\u620C\u620D\u6210\u6263\u625B\u6258\u6536\u65E9\u65E8\u65EC\u65ED\u66F2\u66F3\u6709\u673D\u6734\u6731\u6735\u6B21\u6B64\u6B7B\u6C16\u6C5D\u6C57\u6C59\u6C5F\u6C60\u6C50\u6C55\u6C61\u6C5B\u6C4D\u6C4E\u7070\u725F\u725D\u767E\u7AF9\u7C73\u7CF8\u7F36\u7F8A\u7FBD\u8001\u8003\u800C\u8012\u8033\u807F\u8089\u808B\u808C\u81E3\u81EA\u81F3\u81FC\u820C\u821B\u821F\u826E\u8272\u827E\u866B\u8840\u884C\u8863\u897F\u9621\u4E32\u4EA8\u4F4D\u4F4F\u4F47\u4F57\u4F5E\u4F34\u4F5B\u4F55\u4F30\u4F50\u4F51\u4F3D\u4F3A\u4F38\u4F43\u4F54\u4F3C\u4F46\u4F63"],["a740","\u4F5C\u4F60\u4F2F\u4F4E\u4F36\u4F59\u4F5D\u4F48\u4F5A\u514C\u514B\u514D\u5175\u51B6\u51B7\u5225\u5224\u5229\u522A\u5228\u52AB\u52A9\u52AA\u52AC\u5323\u5373\u5375\u541D\u542D\u541E\u543E\u5426\u544E\u5427\u5446\u5443\u5433\u5448\u5442\u541B\u5429\u544A\u5439\u543B\u5438\u542E\u5435\u5436\u5420\u543C\u5440\u5431\u542B\u541F\u542C\u56EA\u56F0\u56E4\u56EB\u574A\u5751\u5740\u574D"],["a7a1","\u5747\u574E\u573E\u5750\u574F\u573B\u58EF\u593E\u599D\u5992\u59A8\u599E\u59A3\u5999\u5996\u598D\u59A4\u5993\u598A\u59A5\u5B5D\u5B5C\u5B5A\u5B5B\u5B8C\u5B8B\u5B8F\u5C2C\u5C40\u5C41\u5C3F\u5C3E\u5C90\u5C91\u5C94\u5C8C\u5DEB\u5E0C\u5E8F\u5E87\u5E8A\u5EF7\u5F04\u5F1F\u5F64\u5F62\u5F77\u5F79\u5FD8\u5FCC\u5FD7\u5FCD\u5FF1\u5FEB\u5FF8\u5FEA\u6212\u6211\u6284\u6297\u6296\u6280\u6276\u6289\u626D\u628A\u627C\u627E\u6279\u6273\u6292\u626F\u6298\u626E\u6295\u6293\u6291\u6286\u6539\u653B\u6538\u65F1\u66F4\u675F\u674E\u674F\u6750\u6751\u675C\u6756\u675E\u6749\u6746\u6760"],["a840","\u6753\u6757\u6B65\u6BCF\u6C42\u6C5E\u6C99\u6C81\u6C88\u6C89\u6C85\u6C9B\u6C6A\u6C7A\u6C90\u6C70\u6C8C\u6C68\u6C96\u6C92\u6C7D\u6C83\u6C72\u6C7E\u6C74\u6C86\u6C76\u6C8D\u6C94\u6C98\u6C82\u7076\u707C\u707D\u7078\u7262\u7261\u7260\u72C4\u72C2\u7396\u752C\u752B\u7537\u7538\u7682\u76EF\u77E3\u79C1\u79C0\u79BF\u7A76\u7CFB\u7F55\u8096\u8093\u809D\u8098\u809B\u809A\u80B2\u826F\u8292"],["a8a1","\u828B\u828D\u898B\u89D2\u8A00\u8C37\u8C46\u8C55\u8C9D\u8D64\u8D70\u8DB3\u8EAB\u8ECA\u8F9B\u8FB0\u8FC2\u8FC6\u8FC5\u8FC4\u5DE1\u9091\u90A2\u90AA\u90A6\u90A3\u9149\u91C6\u91CC\u9632\u962E\u9631\u962A\u962C\u4E26\u4E56\u4E73\u4E8B\u4E9B\u4E9E\u4EAB\u4EAC\u4F6F\u4F9D\u4F8D\u4F73\u4F7F\u4F6C\u4F9B\u4F8B\u4F86\u4F83\u4F70\u4F75\u4F88\u4F69\u4F7B\u4F96\u4F7E\u4F8F\u4F91\u4F7A\u5154\u5152\u5155\u5169\u5177\u5176\u5178\u51BD\u51FD\u523B\u5238\u5237\u523A\u5230\u522E\u5236\u5241\u52BE\u52BB\u5352\u5354\u5353\u5351\u5366\u5377\u5378\u5379\u53D6\u53D4\u53D7\u5473\u5475"],["a940","\u5496\u5478\u5495\u5480\u547B\u5477\u5484\u5492\u5486\u547C\u5490\u5471\u5476\u548C\u549A\u5462\u5468\u548B\u547D\u548E\u56FA\u5783\u5777\u576A\u5769\u5761\u5766\u5764\u577C\u591C\u5949\u5947\u5948\u5944\u5954\u59BE\u59BB\u59D4\u59B9\u59AE\u59D1\u59C6\u59D0\u59CD\u59CB\u59D3\u59CA\u59AF\u59B3\u59D2\u59C5\u5B5F\u5B64\u5B63\u5B97\u5B9A\u5B98\u5B9C\u5B99\u5B9B\u5C1A\u5C48\u5C45"],["a9a1","\u5C46\u5CB7\u5CA1\u5CB8\u5CA9\u5CAB\u5CB1\u5CB3\u5E18\u5E1A\u5E16\u5E15\u5E1B\u5E11\u5E78\u5E9A\u5E97\u5E9C\u5E95\u5E96\u5EF6\u5F26\u5F27\u5F29\u5F80\u5F81\u5F7F\u5F7C\u5FDD\u5FE0\u5FFD\u5FF5\u5FFF\u600F\u6014\u602F\u6035\u6016\u602A\u6015\u6021\u6027\u6029\u602B\u601B\u6216\u6215\u623F\u623E\u6240\u627F\u62C9\u62CC\u62C4\u62BF\u62C2\u62B9\u62D2\u62DB\u62AB\u62D3\u62D4\u62CB\u62C8\u62A8\u62BD\u62BC\u62D0\u62D9\u62C7\u62CD\u62B5\u62DA\u62B1\u62D8\u62D6\u62D7\u62C6\u62AC\u62CE\u653E\u65A7\u65BC\u65FA\u6614\u6613\u660C\u6606\u6602\u660E\u6600\u660F\u6615\u660A"],["aa40","\u6607\u670D\u670B\u676D\u678B\u6795\u6771\u679C\u6773\u6777\u6787\u679D\u6797\u676F\u6770\u677F\u6789\u677E\u6790\u6775\u679A\u6793\u677C\u676A\u6772\u6B23\u6B66\u6B67\u6B7F\u6C13\u6C1B\u6CE3\u6CE8\u6CF3\u6CB1\u6CCC\u6CE5\u6CB3\u6CBD\u6CBE\u6CBC\u6CE2\u6CAB\u6CD5\u6CD3\u6CB8\u6CC4\u6CB9\u6CC1\u6CAE\u6CD7\u6CC5\u6CF1\u6CBF\u6CBB\u6CE1\u6CDB\u6CCA\u6CAC\u6CEF\u6CDC\u6CD6\u6CE0"],["aaa1","\u7095\u708E\u7092\u708A\u7099\u722C\u722D\u7238\u7248\u7267\u7269\u72C0\u72CE\u72D9\u72D7\u72D0\u73A9\u73A8\u739F\u73AB\u73A5\u753D\u759D\u7599\u759A\u7684\u76C2\u76F2\u76F4\u77E5\u77FD\u793E\u7940\u7941\u79C9\u79C8\u7A7A\u7A79\u7AFA\u7CFE\u7F54\u7F8C\u7F8B\u8005\u80BA\u80A5\u80A2\u80B1\u80A1\u80AB\u80A9\u80B4\u80AA\u80AF\u81E5\u81FE\u820D\u82B3\u829D\u8299\u82AD\u82BD\u829F\u82B9\u82B1\u82AC\u82A5\u82AF\u82B8\u82A3\u82B0\u82BE\u82B7\u864E\u8671\u521D\u8868\u8ECB\u8FCE\u8FD4\u8FD1\u90B5\u90B8\u90B1\u90B6\u91C7\u91D1\u9577\u9580\u961C\u9640\u963F\u963B\u9644"],["ab40","\u9642\u96B9\u96E8\u9752\u975E\u4E9F\u4EAD\u4EAE\u4FE1\u4FB5\u4FAF\u4FBF\u4FE0\u4FD1\u4FCF\u4FDD\u4FC3\u4FB6\u4FD8\u4FDF\u4FCA\u4FD7\u4FAE\u4FD0\u4FC4\u4FC2\u4FDA\u4FCE\u4FDE\u4FB7\u5157\u5192\u5191\u51A0\u524E\u5243\u524A\u524D\u524C\u524B\u5247\u52C7\u52C9\u52C3\u52C1\u530D\u5357\u537B\u539A\u53DB\u54AC\u54C0\u54A8\u54CE\u54C9\u54B8\u54A6\u54B3\u54C7\u54C2\u54BD\u54AA\u54C1"],["aba1","\u54C4\u54C8\u54AF\u54AB\u54B1\u54BB\u54A9\u54A7\u54BF\u56FF\u5782\u578B\u57A0\u57A3\u57A2\u57CE\u57AE\u5793\u5955\u5951\u594F\u594E\u5950\u59DC\u59D8\u59FF\u59E3\u59E8\u5A03\u59E5\u59EA\u59DA\u59E6\u5A01\u59FB\u5B69\u5BA3\u5BA6\u5BA4\u5BA2\u5BA5\u5C01\u5C4E\u5C4F\u5C4D\u5C4B\u5CD9\u5CD2\u5DF7\u5E1D\u5E25\u5E1F\u5E7D\u5EA0\u5EA6\u5EFA\u5F08\u5F2D\u5F65\u5F88\u5F85\u5F8A\u5F8B\u5F87\u5F8C\u5F89\u6012\u601D\u6020\u6025\u600E\u6028\u604D\u6070\u6068\u6062\u6046\u6043\u606C\u606B\u606A\u6064\u6241\u62DC\u6316\u6309\u62FC\u62ED\u6301\u62EE\u62FD\u6307\u62F1\u62F7"],["ac40","\u62EF\u62EC\u62FE\u62F4\u6311\u6302\u653F\u6545\u65AB\u65BD\u65E2\u6625\u662D\u6620\u6627\u662F\u661F\u6628\u6631\u6624\u66F7\u67FF\u67D3\u67F1\u67D4\u67D0\u67EC\u67B6\u67AF\u67F5\u67E9\u67EF\u67C4\u67D1\u67B4\u67DA\u67E5\u67B8\u67CF\u67DE\u67F3\u67B0\u67D9\u67E2\u67DD\u67D2\u6B6A\u6B83\u6B86\u6BB5\u6BD2\u6BD7\u6C1F\u6CC9\u6D0B\u6D32\u6D2A\u6D41\u6D25\u6D0C\u6D31\u6D1E\u6D17"],["aca1","\u6D3B\u6D3D\u6D3E\u6D36\u6D1B\u6CF5\u6D39\u6D27\u6D38\u6D29\u6D2E\u6D35\u6D0E\u6D2B\u70AB\u70BA\u70B3\u70AC\u70AF\u70AD\u70B8\u70AE\u70A4\u7230\u7272\u726F\u7274\u72E9\u72E0\u72E1\u73B7\u73CA\u73BB\u73B2\u73CD\u73C0\u73B3\u751A\u752D\u754F\u754C\u754E\u754B\u75AB\u75A4\u75A5\u75A2\u75A3\u7678\u7686\u7687\u7688\u76C8\u76C6\u76C3\u76C5\u7701\u76F9\u76F8\u7709\u770B\u76FE\u76FC\u7707\u77DC\u7802\u7814\u780C\u780D\u7946\u7949\u7948\u7947\u79B9\u79BA\u79D1\u79D2\u79CB\u7A7F\u7A81\u7AFF\u7AFD\u7C7D\u7D02\u7D05\u7D00\u7D09\u7D07\u7D04\u7D06\u7F38\u7F8E\u7FBF\u8004"],["ad40","\u8010\u800D\u8011\u8036\u80D6\u80E5\u80DA\u80C3\u80C4\u80CC\u80E1\u80DB\u80CE\u80DE\u80E4\u80DD\u81F4\u8222\u82E7\u8303\u8305\u82E3\u82DB\u82E6\u8304\u82E5\u8302\u8309\u82D2\u82D7\u82F1\u8301\u82DC\u82D4\u82D1\u82DE\u82D3\u82DF\u82EF\u8306\u8650\u8679\u867B\u867A\u884D\u886B\u8981\u89D4\u8A08\u8A02\u8A03\u8C9E\u8CA0\u8D74\u8D73\u8DB4\u8ECD\u8ECC\u8FF0\u8FE6\u8FE2\u8FEA\u8FE5"],["ada1","\u8FED\u8FEB\u8FE4\u8FE8\u90CA\u90CE\u90C1\u90C3\u914B\u914A\u91CD\u9582\u9650\u964B\u964C\u964D\u9762\u9769\u97CB\u97ED\u97F3\u9801\u98A8\u98DB\u98DF\u9996\u9999\u4E58\u4EB3\u500C\u500D\u5023\u4FEF\u5026\u5025\u4FF8\u5029\u5016\u5006\u503C\u501F\u501A\u5012\u5011\u4FFA\u5000\u5014\u5028\u4FF1\u5021\u500B\u5019\u5018\u4FF3\u4FEE\u502D\u502A\u4FFE\u502B\u5009\u517C\u51A4\u51A5\u51A2\u51CD\u51CC\u51C6\u51CB\u5256\u525C\u5254\u525B\u525D\u532A\u537F\u539F\u539D\u53DF\u54E8\u5510\u5501\u5537\u54FC\u54E5\u54F2\u5506\u54FA\u5514\u54E9\u54ED\u54E1\u5509\u54EE\u54EA"],["ae40","\u54E6\u5527\u5507\u54FD\u550F\u5703\u5704\u57C2\u57D4\u57CB\u57C3\u5809\u590F\u5957\u5958\u595A\u5A11\u5A18\u5A1C\u5A1F\u5A1B\u5A13\u59EC\u5A20\u5A23\u5A29\u5A25\u5A0C\u5A09\u5B6B\u5C58\u5BB0\u5BB3\u5BB6\u5BB4\u5BAE\u5BB5\u5BB9\u5BB8\u5C04\u5C51\u5C55\u5C50\u5CED\u5CFD\u5CFB\u5CEA\u5CE8\u5CF0\u5CF6\u5D01\u5CF4\u5DEE\u5E2D\u5E2B\u5EAB\u5EAD\u5EA7\u5F31\u5F92\u5F91\u5F90\u6059"],["aea1","\u6063\u6065\u6050\u6055\u606D\u6069\u606F\u6084\u609F\u609A\u608D\u6094\u608C\u6085\u6096\u6247\u62F3\u6308\u62FF\u634E\u633E\u632F\u6355\u6342\u6346\u634F\u6349\u633A\u6350\u633D\u632A\u632B\u6328\u634D\u634C\u6548\u6549\u6599\u65C1\u65C5\u6642\u6649\u664F\u6643\u6652\u664C\u6645\u6641\u66F8\u6714\u6715\u6717\u6821\u6838\u6848\u6846\u6853\u6839\u6842\u6854\u6829\u68B3\u6817\u684C\u6851\u683D\u67F4\u6850\u6840\u683C\u6843\u682A\u6845\u6813\u6818\u6841\u6B8A\u6B89\u6BB7\u6C23\u6C27\u6C28\u6C26\u6C24\u6CF0\u6D6A\u6D95\u6D88\u6D87\u6D66\u6D78\u6D77\u6D59\u6D93"],["af40","\u6D6C\u6D89\u6D6E\u6D5A\u6D74\u6D69\u6D8C\u6D8A\u6D79\u6D85\u6D65\u6D94\u70CA\u70D8\u70E4\u70D9\u70C8\u70CF\u7239\u7279\u72FC\u72F9\u72FD\u72F8\u72F7\u7386\u73ED\u7409\u73EE\u73E0\u73EA\u73DE\u7554\u755D\u755C\u755A\u7559\u75BE\u75C5\u75C7\u75B2\u75B3\u75BD\u75BC\u75B9\u75C2\u75B8\u768B\u76B0\u76CA\u76CD\u76CE\u7729\u771F\u7720\u7728\u77E9\u7830\u7827\u7838\u781D\u7834\u7837"],["afa1","\u7825\u782D\u7820\u781F\u7832\u7955\u7950\u7960\u795F\u7956\u795E\u795D\u7957\u795A\u79E4\u79E3\u79E7\u79DF\u79E6\u79E9\u79D8\u7A84\u7A88\u7AD9\u7B06\u7B11\u7C89\u7D21\u7D17\u7D0B\u7D0A\u7D20\u7D22\u7D14\u7D10\u7D15\u7D1A\u7D1C\u7D0D\u7D19\u7D1B\u7F3A\u7F5F\u7F94\u7FC5\u7FC1\u8006\u8018\u8015\u8019\u8017\u803D\u803F\u80F1\u8102\u80F0\u8105\u80ED\u80F4\u8106\u80F8\u80F3\u8108\u80FD\u810A\u80FC\u80EF\u81ED\u81EC\u8200\u8210\u822A\u822B\u8228\u822C\u82BB\u832B\u8352\u8354\u834A\u8338\u8350\u8349\u8335\u8334\u834F\u8332\u8339\u8336\u8317\u8340\u8331\u8328\u8343"],["b040","\u8654\u868A\u86AA\u8693\u86A4\u86A9\u868C\u86A3\u869C\u8870\u8877\u8881\u8882\u887D\u8879\u8A18\u8A10\u8A0E\u8A0C\u8A15\u8A0A\u8A17\u8A13\u8A16\u8A0F\u8A11\u8C48\u8C7A\u8C79\u8CA1\u8CA2\u8D77\u8EAC\u8ED2\u8ED4\u8ECF\u8FB1\u9001\u9006\u8FF7\u9000\u8FFA\u8FF4\u9003\u8FFD\u9005\u8FF8\u9095\u90E1\u90DD\u90E2\u9152\u914D\u914C\u91D8\u91DD\u91D7\u91DC\u91D9\u9583\u9662\u9663\u9661"],["b0a1","\u965B\u965D\u9664\u9658\u965E\u96BB\u98E2\u99AC\u9AA8\u9AD8\u9B25\u9B32\u9B3C\u4E7E\u507A\u507D\u505C\u5047\u5043\u504C\u505A\u5049\u5065\u5076\u504E\u5055\u5075\u5074\u5077\u504F\u500F\u506F\u506D\u515C\u5195\u51F0\u526A\u526F\u52D2\u52D9\u52D8\u52D5\u5310\u530F\u5319\u533F\u5340\u533E\u53C3\u66FC\u5546\u556A\u5566\u5544\u555E\u5561\u5543\u554A\u5531\u5556\u554F\u5555\u552F\u5564\u5538\u552E\u555C\u552C\u5563\u5533\u5541\u5557\u5708\u570B\u5709\u57DF\u5805\u580A\u5806\u57E0\u57E4\u57FA\u5802\u5835\u57F7\u57F9\u5920\u5962\u5A36\u5A41\u5A49\u5A66\u5A6A\u5A40"],["b140","\u5A3C\u5A62\u5A5A\u5A46\u5A4A\u5B70\u5BC7\u5BC5\u5BC4\u5BC2\u5BBF\u5BC6\u5C09\u5C08\u5C07\u5C60\u5C5C\u5C5D\u5D07\u5D06\u5D0E\u5D1B\u5D16\u5D22\u5D11\u5D29\u5D14\u5D19\u5D24\u5D27\u5D17\u5DE2\u5E38\u5E36\u5E33\u5E37\u5EB7\u5EB8\u5EB6\u5EB5\u5EBE\u5F35\u5F37\u5F57\u5F6C\u5F69\u5F6B\u5F97\u5F99\u5F9E\u5F98\u5FA1\u5FA0\u5F9C\u607F\u60A3\u6089\u60A0\u60A8\u60CB\u60B4\u60E6\u60BD"],["b1a1","\u60C5\u60BB\u60B5\u60DC\u60BC\u60D8\u60D5\u60C6\u60DF\u60B8\u60DA\u60C7\u621A\u621B\u6248\u63A0\u63A7\u6372\u6396\u63A2\u63A5\u6377\u6367\u6398\u63AA\u6371\u63A9\u6389\u6383\u639B\u636B\u63A8\u6384\u6388\u6399\u63A1\u63AC\u6392\u638F\u6380\u637B\u6369\u6368\u637A\u655D\u6556\u6551\u6559\u6557\u555F\u654F\u6558\u6555\u6554\u659C\u659B\u65AC\u65CF\u65CB\u65CC\u65CE\u665D\u665A\u6664\u6668\u6666\u665E\u66F9\u52D7\u671B\u6881\u68AF\u68A2\u6893\u68B5\u687F\u6876\u68B1\u68A7\u6897\u68B0\u6883\u68C4\u68AD\u6886\u6885\u6894\u689D\u68A8\u689F\u68A1\u6882\u6B32\u6BBA"],["b240","\u6BEB\u6BEC\u6C2B\u6D8E\u6DBC\u6DF3\u6DD9\u6DB2\u6DE1\u6DCC\u6DE4\u6DFB\u6DFA\u6E05\u6DC7\u6DCB\u6DAF\u6DD1\u6DAE\u6DDE\u6DF9\u6DB8\u6DF7\u6DF5\u6DC5\u6DD2\u6E1A\u6DB5\u6DDA\u6DEB\u6DD8\u6DEA\u6DF1\u6DEE\u6DE8\u6DC6\u6DC4\u6DAA\u6DEC\u6DBF\u6DE6\u70F9\u7109\u710A\u70FD\u70EF\u723D\u727D\u7281\u731C\u731B\u7316\u7313\u7319\u7387\u7405\u740A\u7403\u7406\u73FE\u740D\u74E0\u74F6"],["b2a1","\u74F7\u751C\u7522\u7565\u7566\u7562\u7570\u758F\u75D4\u75D5\u75B5\u75CA\u75CD\u768E\u76D4\u76D2\u76DB\u7737\u773E\u773C\u7736\u7738\u773A\u786B\u7843\u784E\u7965\u7968\u796D\u79FB\u7A92\u7A95\u7B20\u7B28\u7B1B\u7B2C\u7B26\u7B19\u7B1E\u7B2E\u7C92\u7C97\u7C95\u7D46\u7D43\u7D71\u7D2E\u7D39\u7D3C\u7D40\u7D30\u7D33\u7D44\u7D2F\u7D42\u7D32\u7D31\u7F3D\u7F9E\u7F9A\u7FCC\u7FCE\u7FD2\u801C\u804A\u8046\u812F\u8116\u8123\u812B\u8129\u8130\u8124\u8202\u8235\u8237\u8236\u8239\u838E\u839E\u8398\u8378\u83A2\u8396\u83BD\u83AB\u8392\u838A\u8393\u8389\u83A0\u8377\u837B\u837C"],["b340","\u8386\u83A7\u8655\u5F6A\u86C7\u86C0\u86B6\u86C4\u86B5\u86C6\u86CB\u86B1\u86AF\u86C9\u8853\u889E\u8888\u88AB\u8892\u8896\u888D\u888B\u8993\u898F\u8A2A\u8A1D\u8A23\u8A25\u8A31\u8A2D\u8A1F\u8A1B\u8A22\u8C49\u8C5A\u8CA9\u8CAC\u8CAB\u8CA8\u8CAA\u8CA7\u8D67\u8D66\u8DBE\u8DBA\u8EDB\u8EDF\u9019\u900D\u901A\u9017\u9023\u901F\u901D\u9010\u9015\u901E\u9020\u900F\u9022\u9016\u901B\u9014"],["b3a1","\u90E8\u90ED\u90FD\u9157\u91CE\u91F5\u91E6\u91E3\u91E7\u91ED\u91E9\u9589\u966A\u9675\u9673\u9678\u9670\u9674\u9676\u9677\u966C\u96C0\u96EA\u96E9\u7AE0\u7ADF\u9802\u9803\u9B5A\u9CE5\u9E75\u9E7F\u9EA5\u9EBB\u50A2\u508D\u5085\u5099\u5091\u5080\u5096\u5098\u509A\u6700\u51F1\u5272\u5274\u5275\u5269\u52DE\u52DD\u52DB\u535A\u53A5\u557B\u5580\u55A7\u557C\u558A\u559D\u5598\u5582\u559C\u55AA\u5594\u5587\u558B\u5583\u55B3\u55AE\u559F\u553E\u55B2\u559A\u55BB\u55AC\u55B1\u557E\u5589\u55AB\u5599\u570D\u582F\u582A\u5834\u5824\u5830\u5831\u5821\u581D\u5820\u58F9\u58FA\u5960"],["b440","\u5A77\u5A9A\u5A7F\u5A92\u5A9B\u5AA7\u5B73\u5B71\u5BD2\u5BCC\u5BD3\u5BD0\u5C0A\u5C0B\u5C31\u5D4C\u5D50\u5D34\u5D47\u5DFD\u5E45\u5E3D\u5E40\u5E43\u5E7E\u5ECA\u5EC1\u5EC2\u5EC4\u5F3C\u5F6D\u5FA9\u5FAA\u5FA8\u60D1\u60E1\u60B2\u60B6\u60E0\u611C\u6123\u60FA\u6115\u60F0\u60FB\u60F4\u6168\u60F1\u610E\u60F6\u6109\u6100\u6112\u621F\u6249\u63A3\u638C\u63CF\u63C0\u63E9\u63C9\u63C6\u63CD"],["b4a1","\u63D2\u63E3\u63D0\u63E1\u63D6\u63ED\u63EE\u6376\u63F4\u63EA\u63DB\u6452\u63DA\u63F9\u655E\u6566\u6562\u6563\u6591\u6590\u65AF\u666E\u6670\u6674\u6676\u666F\u6691\u667A\u667E\u6677\u66FE\u66FF\u671F\u671D\u68FA\u68D5\u68E0\u68D8\u68D7\u6905\u68DF\u68F5\u68EE\u68E7\u68F9\u68D2\u68F2\u68E3\u68CB\u68CD\u690D\u6912\u690E\u68C9\u68DA\u696E\u68FB\u6B3E\u6B3A\u6B3D\u6B98\u6B96\u6BBC\u6BEF\u6C2E\u6C2F\u6C2C\u6E2F\u6E38\u6E54\u6E21\u6E32\u6E67\u6E4A\u6E20\u6E25\u6E23\u6E1B\u6E5B\u6E58\u6E24\u6E56\u6E6E\u6E2D\u6E26\u6E6F\u6E34\u6E4D\u6E3A\u6E2C\u6E43\u6E1D\u6E3E\u6ECB"],["b540","\u6E89\u6E19\u6E4E\u6E63\u6E44\u6E72\u6E69\u6E5F\u7119\u711A\u7126\u7130\u7121\u7136\u716E\u711C\u724C\u7284\u7280\u7336\u7325\u7334\u7329\u743A\u742A\u7433\u7422\u7425\u7435\u7436\u7434\u742F\u741B\u7426\u7428\u7525\u7526\u756B\u756A\u75E2\u75DB\u75E3\u75D9\u75D8\u75DE\u75E0\u767B\u767C\u7696\u7693\u76B4\u76DC\u774F\u77ED\u785D\u786C\u786F\u7A0D\u7A08\u7A0B\u7A05\u7A00\u7A98"],["b5a1","\u7A97\u7A96\u7AE5\u7AE3\u7B49\u7B56\u7B46\u7B50\u7B52\u7B54\u7B4D\u7B4B\u7B4F\u7B51\u7C9F\u7CA5\u7D5E\u7D50\u7D68\u7D55\u7D2B\u7D6E\u7D72\u7D61\u7D66\u7D62\u7D70\u7D73\u5584\u7FD4\u7FD5\u800B\u8052\u8085\u8155\u8154\u814B\u8151\u814E\u8139\u8146\u813E\u814C\u8153\u8174\u8212\u821C\u83E9\u8403\u83F8\u840D\u83E0\u83C5\u840B\u83C1\u83EF\u83F1\u83F4\u8457\u840A\u83F0\u840C\u83CC\u83FD\u83F2\u83CA\u8438\u840E\u8404\u83DC\u8407\u83D4\u83DF\u865B\u86DF\u86D9\u86ED\u86D4\u86DB\u86E4\u86D0\u86DE\u8857\u88C1\u88C2\u88B1\u8983\u8996\u8A3B\u8A60\u8A55\u8A5E\u8A3C\u8A41"],["b640","\u8A54\u8A5B\u8A50\u8A46\u8A34\u8A3A\u8A36\u8A56\u8C61\u8C82\u8CAF\u8CBC\u8CB3\u8CBD\u8CC1\u8CBB\u8CC0\u8CB4\u8CB7\u8CB6\u8CBF\u8CB8\u8D8A\u8D85\u8D81\u8DCE\u8DDD\u8DCB\u8DDA\u8DD1\u8DCC\u8DDB\u8DC6\u8EFB\u8EF8\u8EFC\u8F9C\u902E\u9035\u9031\u9038\u9032\u9036\u9102\u90F5\u9109\u90FE\u9163\u9165\u91CF\u9214\u9215\u9223\u9209\u921E\u920D\u9210\u9207\u9211\u9594\u958F\u958B\u9591"],["b6a1","\u9593\u9592\u958E\u968A\u968E\u968B\u967D\u9685\u9686\u968D\u9672\u9684\u96C1\u96C5\u96C4\u96C6\u96C7\u96EF\u96F2\u97CC\u9805\u9806\u9808\u98E7\u98EA\u98EF\u98E9\u98F2\u98ED\u99AE\u99AD\u9EC3\u9ECD\u9ED1\u4E82\u50AD\u50B5\u50B2\u50B3\u50C5\u50BE\u50AC\u50B7\u50BB\u50AF\u50C7\u527F\u5277\u527D\u52DF\u52E6\u52E4\u52E2\u52E3\u532F\u55DF\u55E8\u55D3\u55E6\u55CE\u55DC\u55C7\u55D1\u55E3\u55E4\u55EF\u55DA\u55E1\u55C5\u55C6\u55E5\u55C9\u5712\u5713\u585E\u5851\u5858\u5857\u585A\u5854\u586B\u584C\u586D\u584A\u5862\u5852\u584B\u5967\u5AC1\u5AC9\u5ACC\u5ABE\u5ABD\u5ABC"],["b740","\u5AB3\u5AC2\u5AB2\u5D69\u5D6F\u5E4C\u5E79\u5EC9\u5EC8\u5F12\u5F59\u5FAC\u5FAE\u611A\u610F\u6148\u611F\u60F3\u611B\u60F9\u6101\u6108\u614E\u614C\u6144\u614D\u613E\u6134\u6127\u610D\u6106\u6137\u6221\u6222\u6413\u643E\u641E\u642A\u642D\u643D\u642C\u640F\u641C\u6414\u640D\u6436\u6416\u6417\u6406\u656C\u659F\u65B0\u6697\u6689\u6687\u6688\u6696\u6684\u6698\u668D\u6703\u6994\u696D"],["b7a1","\u695A\u6977\u6960\u6954\u6975\u6930\u6982\u694A\u6968\u696B\u695E\u6953\u6979\u6986\u695D\u6963\u695B\u6B47\u6B72\u6BC0\u6BBF\u6BD3\u6BFD\u6EA2\u6EAF\u6ED3\u6EB6\u6EC2\u6E90\u6E9D\u6EC7\u6EC5\u6EA5\u6E98\u6EBC\u6EBA\u6EAB\u6ED1\u6E96\u6E9C\u6EC4\u6ED4\u6EAA\u6EA7\u6EB4\u714E\u7159\u7169\u7164\u7149\u7167\u715C\u716C\u7166\u714C\u7165\u715E\u7146\u7168\u7156\u723A\u7252\u7337\u7345\u733F\u733E\u746F\u745A\u7455\u745F\u745E\u7441\u743F\u7459\u745B\u745C\u7576\u7578\u7600\u75F0\u7601\u75F2\u75F1\u75FA\u75FF\u75F4\u75F3\u76DE\u76DF\u775B\u776B\u7766\u775E\u7763"],["b840","\u7779\u776A\u776C\u775C\u7765\u7768\u7762\u77EE\u788E\u78B0\u7897\u7898\u788C\u7889\u787C\u7891\u7893\u787F\u797A\u797F\u7981\u842C\u79BD\u7A1C\u7A1A\u7A20\u7A14\u7A1F\u7A1E\u7A9F\u7AA0\u7B77\u7BC0\u7B60\u7B6E\u7B67\u7CB1\u7CB3\u7CB5\u7D93\u7D79\u7D91\u7D81\u7D8F\u7D5B\u7F6E\u7F69\u7F6A\u7F72\u7FA9\u7FA8\u7FA4\u8056\u8058\u8086\u8084\u8171\u8170\u8178\u8165\u816E\u8173\u816B"],["b8a1","\u8179\u817A\u8166\u8205\u8247\u8482\u8477\u843D\u8431\u8475\u8466\u846B\u8449\u846C\u845B\u843C\u8435\u8461\u8463\u8469\u846D\u8446\u865E\u865C\u865F\u86F9\u8713\u8708\u8707\u8700\u86FE\u86FB\u8702\u8703\u8706\u870A\u8859\u88DF\u88D4\u88D9\u88DC\u88D8\u88DD\u88E1\u88CA\u88D5\u88D2\u899C\u89E3\u8A6B\u8A72\u8A73\u8A66\u8A69\u8A70\u8A87\u8A7C\u8A63\u8AA0\u8A71\u8A85\u8A6D\u8A62\u8A6E\u8A6C\u8A79\u8A7B\u8A3E\u8A68\u8C62\u8C8A\u8C89\u8CCA\u8CC7\u8CC8\u8CC4\u8CB2\u8CC3\u8CC2\u8CC5\u8DE1\u8DDF\u8DE8\u8DEF\u8DF3\u8DFA\u8DEA\u8DE4\u8DE6\u8EB2\u8F03\u8F09\u8EFE\u8F0A"],["b940","\u8F9F\u8FB2\u904B\u904A\u9053\u9042\u9054\u903C\u9055\u9050\u9047\u904F\u904E\u904D\u9051\u903E\u9041\u9112\u9117\u916C\u916A\u9169\u91C9\u9237\u9257\u9238\u923D\u9240\u923E\u925B\u924B\u9264\u9251\u9234\u9249\u924D\u9245\u9239\u923F\u925A\u9598\u9698\u9694\u9695\u96CD\u96CB\u96C9\u96CA\u96F7\u96FB\u96F9\u96F6\u9756\u9774\u9776\u9810\u9811\u9813\u980A\u9812\u980C\u98FC\u98F4"],["b9a1","\u98FD\u98FE\u99B3\u99B1\u99B4\u9AE1\u9CE9\u9E82\u9F0E\u9F13\u9F20\u50E7\u50EE\u50E5\u50D6\u50ED\u50DA\u50D5\u50CF\u50D1\u50F1\u50CE\u50E9\u5162\u51F3\u5283\u5282\u5331\u53AD\u55FE\u5600\u561B\u5617\u55FD\u5614\u5606\u5609\u560D\u560E\u55F7\u5616\u561F\u5608\u5610\u55F6\u5718\u5716\u5875\u587E\u5883\u5893\u588A\u5879\u5885\u587D\u58FD\u5925\u5922\u5924\u596A\u5969\u5AE1\u5AE6\u5AE9\u5AD7\u5AD6\u5AD8\u5AE3\u5B75\u5BDE\u5BE7\u5BE1\u5BE5\u5BE6\u5BE8\u5BE2\u5BE4\u5BDF\u5C0D\u5C62\u5D84\u5D87\u5E5B\u5E63\u5E55\u5E57\u5E54\u5ED3\u5ED6\u5F0A\u5F46\u5F70\u5FB9\u6147"],["ba40","\u613F\u614B\u6177\u6162\u6163\u615F\u615A\u6158\u6175\u622A\u6487\u6458\u6454\u64A4\u6478\u645F\u647A\u6451\u6467\u6434\u646D\u647B\u6572\u65A1\u65D7\u65D6\u66A2\u66A8\u669D\u699C\u69A8\u6995\u69C1\u69AE\u69D3\u69CB\u699B\u69B7\u69BB\u69AB\u69B4\u69D0\u69CD\u69AD\u69CC\u69A6\u69C3\u69A3\u6B49\u6B4C\u6C33\u6F33\u6F14\u6EFE\u6F13\u6EF4\u6F29\u6F3E\u6F20\u6F2C\u6F0F\u6F02\u6F22"],["baa1","\u6EFF\u6EEF\u6F06\u6F31\u6F38\u6F32\u6F23\u6F15\u6F2B\u6F2F\u6F88\u6F2A\u6EEC\u6F01\u6EF2\u6ECC\u6EF7\u7194\u7199\u717D\u718A\u7184\u7192\u723E\u7292\u7296\u7344\u7350\u7464\u7463\u746A\u7470\u746D\u7504\u7591\u7627\u760D\u760B\u7609\u7613\u76E1\u76E3\u7784\u777D\u777F\u7761\u78C1\u789F\u78A7\u78B3\u78A9\u78A3\u798E\u798F\u798D\u7A2E\u7A31\u7AAA\u7AA9\u7AED\u7AEF\u7BA1\u7B95\u7B8B\u7B75\u7B97\u7B9D\u7B94\u7B8F\u7BB8\u7B87\u7B84\u7CB9\u7CBD\u7CBE\u7DBB\u7DB0\u7D9C\u7DBD\u7DBE\u7DA0\u7DCA\u7DB4\u7DB2\u7DB1\u7DBA\u7DA2\u7DBF\u7DB5\u7DB8\u7DAD\u7DD2\u7DC7\u7DAC"],["bb40","\u7F70\u7FE0\u7FE1\u7FDF\u805E\u805A\u8087\u8150\u8180\u818F\u8188\u818A\u817F\u8182\u81E7\u81FA\u8207\u8214\u821E\u824B\u84C9\u84BF\u84C6\u84C4\u8499\u849E\u84B2\u849C\u84CB\u84B8\u84C0\u84D3\u8490\u84BC\u84D1\u84CA\u873F\u871C\u873B\u8722\u8725\u8734\u8718\u8755\u8737\u8729\u88F3\u8902\u88F4\u88F9\u88F8\u88FD\u88E8\u891A\u88EF\u8AA6\u8A8C\u8A9E\u8AA3\u8A8D\u8AA1\u8A93\u8AA4"],["bba1","\u8AAA\u8AA5\u8AA8\u8A98\u8A91\u8A9A\u8AA7\u8C6A\u8C8D\u8C8C\u8CD3\u8CD1\u8CD2\u8D6B\u8D99\u8D95\u8DFC\u8F14\u8F12\u8F15\u8F13\u8FA3\u9060\u9058\u905C\u9063\u9059\u905E\u9062\u905D\u905B\u9119\u9118\u911E\u9175\u9178\u9177\u9174\u9278\u9280\u9285\u9298\u9296\u927B\u9293\u929C\u92A8\u927C\u9291\u95A1\u95A8\u95A9\u95A3\u95A5\u95A4\u9699\u969C\u969B\u96CC\u96D2\u9700\u977C\u9785\u97F6\u9817\u9818\u98AF\u98B1\u9903\u9905\u990C\u9909\u99C1\u9AAF\u9AB0\u9AE6\u9B41\u9B42\u9CF4\u9CF6\u9CF3\u9EBC\u9F3B\u9F4A\u5104\u5100\u50FB\u50F5\u50F9\u5102\u5108\u5109\u5105\u51DC"],["bc40","\u5287\u5288\u5289\u528D\u528A\u52F0\u53B2\u562E\u563B\u5639\u5632\u563F\u5634\u5629\u5653\u564E\u5657\u5674\u5636\u562F\u5630\u5880\u589F\u589E\u58B3\u589C\u58AE\u58A9\u58A6\u596D\u5B09\u5AFB\u5B0B\u5AF5\u5B0C\u5B08\u5BEE\u5BEC\u5BE9\u5BEB\u5C64\u5C65\u5D9D\u5D94\u5E62\u5E5F\u5E61\u5EE2\u5EDA\u5EDF\u5EDD\u5EE3\u5EE0\u5F48\u5F71\u5FB7\u5FB5\u6176\u6167\u616E\u615D\u6155\u6182"],["bca1","\u617C\u6170\u616B\u617E\u61A7\u6190\u61AB\u618E\u61AC\u619A\u61A4\u6194\u61AE\u622E\u6469\u646F\u6479\u649E\u64B2\u6488\u6490\u64B0\u64A5\u6493\u6495\u64A9\u6492\u64AE\u64AD\u64AB\u649A\u64AC\u6499\u64A2\u64B3\u6575\u6577\u6578\u66AE\u66AB\u66B4\u66B1\u6A23\u6A1F\u69E8\u6A01\u6A1E\u6A19\u69FD\u6A21\u6A13\u6A0A\u69F3\u6A02\u6A05\u69ED\u6A11\u6B50\u6B4E\u6BA4\u6BC5\u6BC6\u6F3F\u6F7C\u6F84\u6F51\u6F66\u6F54\u6F86\u6F6D\u6F5B\u6F78\u6F6E\u6F8E\u6F7A\u6F70\u6F64\u6F97\u6F58\u6ED5\u6F6F\u6F60\u6F5F\u719F\u71AC\u71B1\u71A8\u7256\u729B\u734E\u7357\u7469\u748B\u7483"],["bd40","\u747E\u7480\u757F\u7620\u7629\u761F\u7624\u7626\u7621\u7622\u769A\u76BA\u76E4\u778E\u7787\u778C\u7791\u778B\u78CB\u78C5\u78BA\u78CA\u78BE\u78D5\u78BC\u78D0\u7A3F\u7A3C\u7A40\u7A3D\u7A37\u7A3B\u7AAF\u7AAE\u7BAD\u7BB1\u7BC4\u7BB4\u7BC6\u7BC7\u7BC1\u7BA0\u7BCC\u7CCA\u7DE0\u7DF4\u7DEF\u7DFB\u7DD8\u7DEC\u7DDD\u7DE8\u7DE3\u7DDA\u7DDE\u7DE9\u7D9E\u7DD9\u7DF2\u7DF9\u7F75\u7F77\u7FAF"],["bda1","\u7FE9\u8026\u819B\u819C\u819D\u81A0\u819A\u8198\u8517\u853D\u851A\u84EE\u852C\u852D\u8513\u8511\u8523\u8521\u8514\u84EC\u8525\u84FF\u8506\u8782\u8774\u8776\u8760\u8766\u8778\u8768\u8759\u8757\u874C\u8753\u885B\u885D\u8910\u8907\u8912\u8913\u8915\u890A\u8ABC\u8AD2\u8AC7\u8AC4\u8A95\u8ACB\u8AF8\u8AB2\u8AC9\u8AC2\u8ABF\u8AB0\u8AD6\u8ACD\u8AB6\u8AB9\u8ADB\u8C4C\u8C4E\u8C6C\u8CE0\u8CDE\u8CE6\u8CE4\u8CEC\u8CED\u8CE2\u8CE3\u8CDC\u8CEA\u8CE1\u8D6D\u8D9F\u8DA3\u8E2B\u8E10\u8E1D\u8E22\u8E0F\u8E29\u8E1F\u8E21\u8E1E\u8EBA\u8F1D\u8F1B\u8F1F\u8F29\u8F26\u8F2A\u8F1C\u8F1E"],["be40","\u8F25\u9069\u906E\u9068\u906D\u9077\u9130\u912D\u9127\u9131\u9187\u9189\u918B\u9183\u92C5\u92BB\u92B7\u92EA\u92AC\u92E4\u92C1\u92B3\u92BC\u92D2\u92C7\u92F0\u92B2\u95AD\u95B1\u9704\u9706\u9707\u9709\u9760\u978D\u978B\u978F\u9821\u982B\u981C\u98B3\u990A\u9913\u9912\u9918\u99DD\u99D0\u99DF\u99DB\u99D1\u99D5\u99D2\u99D9\u9AB7\u9AEE\u9AEF\u9B27\u9B45\u9B44\u9B77\u9B6F\u9D06\u9D09"],["bea1","\u9D03\u9EA9\u9EBE\u9ECE\u58A8\u9F52\u5112\u5118\u5114\u5110\u5115\u5180\u51AA\u51DD\u5291\u5293\u52F3\u5659\u566B\u5679\u5669\u5664\u5678\u566A\u5668\u5665\u5671\u566F\u566C\u5662\u5676\u58C1\u58BE\u58C7\u58C5\u596E\u5B1D\u5B34\u5B78\u5BF0\u5C0E\u5F4A\u61B2\u6191\u61A9\u618A\u61CD\u61B6\u61BE\u61CA\u61C8\u6230\u64C5\u64C1\u64CB\u64BB\u64BC\u64DA\u64C4\u64C7\u64C2\u64CD\u64BF\u64D2\u64D4\u64BE\u6574\u66C6\u66C9\u66B9\u66C4\u66C7\u66B8\u6A3D\u6A38\u6A3A\u6A59\u6A6B\u6A58\u6A39\u6A44\u6A62\u6A61\u6A4B\u6A47\u6A35\u6A5F\u6A48\u6B59\u6B77\u6C05\u6FC2\u6FB1\u6FA1"],["bf40","\u6FC3\u6FA4\u6FC1\u6FA7\u6FB3\u6FC0\u6FB9\u6FB6\u6FA6\u6FA0\u6FB4\u71BE\u71C9\u71D0\u71D2\u71C8\u71D5\u71B9\u71CE\u71D9\u71DC\u71C3\u71C4\u7368\u749C\u74A3\u7498\u749F\u749E\u74E2\u750C\u750D\u7634\u7638\u763A\u76E7\u76E5\u77A0\u779E\u779F\u77A5\u78E8\u78DA\u78EC\u78E7\u79A6\u7A4D\u7A4E\u7A46\u7A4C\u7A4B\u7ABA\u7BD9\u7C11\u7BC9\u7BE4\u7BDB\u7BE1\u7BE9\u7BE6\u7CD5\u7CD6\u7E0A"],["bfa1","\u7E11\u7E08\u7E1B\u7E23\u7E1E\u7E1D\u7E09\u7E10\u7F79\u7FB2\u7FF0\u7FF1\u7FEE\u8028\u81B3\u81A9\u81A8\u81FB\u8208\u8258\u8259\u854A\u8559\u8548\u8568\u8569\u8543\u8549\u856D\u856A\u855E\u8783\u879F\u879E\u87A2\u878D\u8861\u892A\u8932\u8925\u892B\u8921\u89AA\u89A6\u8AE6\u8AFA\u8AEB\u8AF1\u8B00\u8ADC\u8AE7\u8AEE\u8AFE\u8B01\u8B02\u8AF7\u8AED\u8AF3\u8AF6\u8AFC\u8C6B\u8C6D\u8C93\u8CF4\u8E44\u8E31\u8E34\u8E42\u8E39\u8E35\u8F3B\u8F2F\u8F38\u8F33\u8FA8\u8FA6\u9075\u9074\u9078\u9072\u907C\u907A\u9134\u9192\u9320\u9336\u92F8\u9333\u932F\u9322\u92FC\u932B\u9304\u931A"],["c040","\u9310\u9326\u9321\u9315\u932E\u9319\u95BB\u96A7\u96A8\u96AA\u96D5\u970E\u9711\u9716\u970D\u9713\u970F\u975B\u975C\u9766\u9798\u9830\u9838\u983B\u9837\u982D\u9839\u9824\u9910\u9928\u991E\u991B\u9921\u991A\u99ED\u99E2\u99F1\u9AB8\u9ABC\u9AFB\u9AED\u9B28\u9B91\u9D15\u9D23\u9D26\u9D28\u9D12\u9D1B\u9ED8\u9ED4\u9F8D\u9F9C\u512A\u511F\u5121\u5132\u52F5\u568E\u5680\u5690\u5685\u5687"],["c0a1","\u568F\u58D5\u58D3\u58D1\u58CE\u5B30\u5B2A\u5B24\u5B7A\u5C37\u5C68\u5DBC\u5DBA\u5DBD\u5DB8\u5E6B\u5F4C\u5FBD\u61C9\u61C2\u61C7\u61E6\u61CB\u6232\u6234\u64CE\u64CA\u64D8\u64E0\u64F0\u64E6\u64EC\u64F1\u64E2\u64ED\u6582\u6583\u66D9\u66D6\u6A80\u6A94\u6A84\u6AA2\u6A9C\u6ADB\u6AA3\u6A7E\u6A97\u6A90\u6AA0\u6B5C\u6BAE\u6BDA\u6C08\u6FD8\u6FF1\u6FDF\u6FE0\u6FDB\u6FE4\u6FEB\u6FEF\u6F80\u6FEC\u6FE1\u6FE9\u6FD5\u6FEE\u6FF0\u71E7\u71DF\u71EE\u71E6\u71E5\u71ED\u71EC\u71F4\u71E0\u7235\u7246\u7370\u7372\u74A9\u74B0\u74A6\u74A8\u7646\u7642\u764C\u76EA\u77B3\u77AA\u77B0\u77AC"],["c140","\u77A7\u77AD\u77EF\u78F7\u78FA\u78F4\u78EF\u7901\u79A7\u79AA\u7A57\u7ABF\u7C07\u7C0D\u7BFE\u7BF7\u7C0C\u7BE0\u7CE0\u7CDC\u7CDE\u7CE2\u7CDF\u7CD9\u7CDD\u7E2E\u7E3E\u7E46\u7E37\u7E32\u7E43\u7E2B\u7E3D\u7E31\u7E45\u7E41\u7E34\u7E39\u7E48\u7E35\u7E3F\u7E2F\u7F44\u7FF3\u7FFC\u8071\u8072\u8070\u806F\u8073\u81C6\u81C3\u81BA\u81C2\u81C0\u81BF\u81BD\u81C9\u81BE\u81E8\u8209\u8271\u85AA"],["c1a1","\u8584\u857E\u859C\u8591\u8594\u85AF\u859B\u8587\u85A8\u858A\u8667\u87C0\u87D1\u87B3\u87D2\u87C6\u87AB\u87BB\u87BA\u87C8\u87CB\u893B\u8936\u8944\u8938\u893D\u89AC\u8B0E\u8B17\u8B19\u8B1B\u8B0A\u8B20\u8B1D\u8B04\u8B10\u8C41\u8C3F\u8C73\u8CFA\u8CFD\u8CFC\u8CF8\u8CFB\u8DA8\u8E49\u8E4B\u8E48\u8E4A\u8F44\u8F3E\u8F42\u8F45\u8F3F\u907F\u907D\u9084\u9081\u9082\u9080\u9139\u91A3\u919E\u919C\u934D\u9382\u9328\u9375\u934A\u9365\u934B\u9318\u937E\u936C\u935B\u9370\u935A\u9354\u95CA\u95CB\u95CC\u95C8\u95C6\u96B1\u96B8\u96D6\u971C\u971E\u97A0\u97D3\u9846\u98B6\u9935\u9A01"],["c240","\u99FF\u9BAE\u9BAB\u9BAA\u9BAD\u9D3B\u9D3F\u9E8B\u9ECF\u9EDE\u9EDC\u9EDD\u9EDB\u9F3E\u9F4B\u53E2\u5695\u56AE\u58D9\u58D8\u5B38\u5F5D\u61E3\u6233\u64F4\u64F2\u64FE\u6506\u64FA\u64FB\u64F7\u65B7\u66DC\u6726\u6AB3\u6AAC\u6AC3\u6ABB\u6AB8\u6AC2\u6AAE\u6AAF\u6B5F\u6B78\u6BAF\u7009\u700B\u6FFE\u7006\u6FFA\u7011\u700F\u71FB\u71FC\u71FE\u71F8\u7377\u7375\u74A7\u74BF\u7515\u7656\u7658"],["c2a1","\u7652\u77BD\u77BF\u77BB\u77BC\u790E\u79AE\u7A61\u7A62\u7A60\u7AC4\u7AC5\u7C2B\u7C27\u7C2A\u7C1E\u7C23\u7C21\u7CE7\u7E54\u7E55\u7E5E\u7E5A\u7E61\u7E52\u7E59\u7F48\u7FF9\u7FFB\u8077\u8076\u81CD\u81CF\u820A\u85CF\u85A9\u85CD\u85D0\u85C9\u85B0\u85BA\u85B9\u85A6\u87EF\u87EC\u87F2\u87E0\u8986\u89B2\u89F4\u8B28\u8B39\u8B2C\u8B2B\u8C50\u8D05\u8E59\u8E63\u8E66\u8E64\u8E5F\u8E55\u8EC0\u8F49\u8F4D\u9087\u9083\u9088\u91AB\u91AC\u91D0\u9394\u938A\u9396\u93A2\u93B3\u93AE\u93AC\u93B0\u9398\u939A\u9397\u95D4\u95D6\u95D0\u95D5\u96E2\u96DC\u96D9\u96DB\u96DE\u9724\u97A3\u97A6"],["c340","\u97AD\u97F9\u984D\u984F\u984C\u984E\u9853\u98BA\u993E\u993F\u993D\u992E\u99A5\u9A0E\u9AC1\u9B03\u9B06\u9B4F\u9B4E\u9B4D\u9BCA\u9BC9\u9BFD\u9BC8\u9BC0\u9D51\u9D5D\u9D60\u9EE0\u9F15\u9F2C\u5133\u56A5\u58DE\u58DF\u58E2\u5BF5\u9F90\u5EEC\u61F2\u61F7\u61F6\u61F5\u6500\u650F\u66E0\u66DD\u6AE5\u6ADD\u6ADA\u6AD3\u701B\u701F\u7028\u701A\u701D\u7015\u7018\u7206\u720D\u7258\u72A2\u7378"],["c3a1","\u737A\u74BD\u74CA\u74E3\u7587\u7586\u765F\u7661\u77C7\u7919\u79B1\u7A6B\u7A69\u7C3E\u7C3F\u7C38\u7C3D\u7C37\u7C40\u7E6B\u7E6D\u7E79\u7E69\u7E6A\u7F85\u7E73\u7FB6\u7FB9\u7FB8\u81D8\u85E9\u85DD\u85EA\u85D5\u85E4\u85E5\u85F7\u87FB\u8805\u880D\u87F9\u87FE\u8960\u895F\u8956\u895E\u8B41\u8B5C\u8B58\u8B49\u8B5A\u8B4E\u8B4F\u8B46\u8B59\u8D08\u8D0A\u8E7C\u8E72\u8E87\u8E76\u8E6C\u8E7A\u8E74\u8F54\u8F4E\u8FAD\u908A\u908B\u91B1\u91AE\u93E1\u93D1\u93DF\u93C3\u93C8\u93DC\u93DD\u93D6\u93E2\u93CD\u93D8\u93E4\u93D7\u93E8\u95DC\u96B4\u96E3\u972A\u9727\u9761\u97DC\u97FB\u985E"],["c440","\u9858\u985B\u98BC\u9945\u9949\u9A16\u9A19\u9B0D\u9BE8\u9BE7\u9BD6\u9BDB\u9D89\u9D61\u9D72\u9D6A\u9D6C\u9E92\u9E97\u9E93\u9EB4\u52F8\u56A8\u56B7\u56B6\u56B4\u56BC\u58E4\u5B40\u5B43\u5B7D\u5BF6\u5DC9\u61F8\u61FA\u6518\u6514\u6519\u66E6\u6727\u6AEC\u703E\u7030\u7032\u7210\u737B\u74CF\u7662\u7665\u7926\u792A\u792C\u792B\u7AC7\u7AF6\u7C4C\u7C43\u7C4D\u7CEF\u7CF0\u8FAE\u7E7D\u7E7C"],["c4a1","\u7E82\u7F4C\u8000\u81DA\u8266\u85FB\u85F9\u8611\u85FA\u8606\u860B\u8607\u860A\u8814\u8815\u8964\u89BA\u89F8\u8B70\u8B6C\u8B66\u8B6F\u8B5F\u8B6B\u8D0F\u8D0D\u8E89\u8E81\u8E85\u8E82\u91B4\u91CB\u9418\u9403\u93FD\u95E1\u9730\u98C4\u9952\u9951\u99A8\u9A2B\u9A30\u9A37\u9A35\u9C13\u9C0D\u9E79\u9EB5\u9EE8\u9F2F\u9F5F\u9F63\u9F61\u5137\u5138\u56C1\u56C0\u56C2\u5914\u5C6C\u5DCD\u61FC\u61FE\u651D\u651C\u6595\u66E9\u6AFB\u6B04\u6AFA\u6BB2\u704C\u721B\u72A7\u74D6\u74D4\u7669\u77D3\u7C50\u7E8F\u7E8C\u7FBC\u8617\u862D\u861A\u8823\u8822\u8821\u881F\u896A\u896C\u89BD\u8B74"],["c540","\u8B77\u8B7D\u8D13\u8E8A\u8E8D\u8E8B\u8F5F\u8FAF\u91BA\u942E\u9433\u9435\u943A\u9438\u9432\u942B\u95E2\u9738\u9739\u9732\u97FF\u9867\u9865\u9957\u9A45\u9A43\u9A40\u9A3E\u9ACF\u9B54\u9B51\u9C2D\u9C25\u9DAF\u9DB4\u9DC2\u9DB8\u9E9D\u9EEF\u9F19\u9F5C\u9F66\u9F67\u513C\u513B\u56C8\u56CA\u56C9\u5B7F\u5DD4\u5DD2\u5F4E\u61FF\u6524\u6B0A\u6B61\u7051\u7058\u7380\u74E4\u758A\u766E\u766C"],["c5a1","\u79B3\u7C60\u7C5F\u807E\u807D\u81DF\u8972\u896F\u89FC\u8B80\u8D16\u8D17\u8E91\u8E93\u8F61\u9148\u9444\u9451\u9452\u973D\u973E\u97C3\u97C1\u986B\u9955\u9A55\u9A4D\u9AD2\u9B1A\u9C49\u9C31\u9C3E\u9C3B\u9DD3\u9DD7\u9F34\u9F6C\u9F6A\u9F94\u56CC\u5DD6\u6200\u6523\u652B\u652A\u66EC\u6B10\u74DA\u7ACA\u7C64\u7C63\u7C65\u7E93\u7E96\u7E94\u81E2\u8638\u863F\u8831\u8B8A\u9090\u908F\u9463\u9460\u9464\u9768\u986F\u995C\u9A5A\u9A5B\u9A57\u9AD3\u9AD4\u9AD1\u9C54\u9C57\u9C56\u9DE5\u9E9F\u9EF4\u56D1\u58E9\u652C\u705E\u7671\u7672\u77D7\u7F50\u7F88\u8836\u8839\u8862\u8B93\u8B92"],["c640","\u8B96\u8277\u8D1B\u91C0\u946A\u9742\u9748\u9744\u97C6\u9870\u9A5F\u9B22\u9B58\u9C5F\u9DF9\u9DFA\u9E7C\u9E7D\u9F07\u9F77\u9F72\u5EF3\u6B16\u7063\u7C6C\u7C6E\u883B\u89C0\u8EA1\u91C1\u9472\u9470\u9871\u995E\u9AD6\u9B23\u9ECC\u7064\u77DA\u8B9A\u9477\u97C9\u9A62\u9A65\u7E9C\u8B9C\u8EAA\u91C5\u947D\u947E\u947C\u9C77\u9C78\u9EF7\u8C54\u947F\u9E1A\u7228\u9A6A\u9B31\u9E1B\u9E1E\u7C72"],["c940","\u4E42\u4E5C\u51F5\u531A\u5382\u4E07\u4E0C\u4E47\u4E8D\u56D7\uFA0C\u5C6E\u5F73\u4E0F\u5187\u4E0E\u4E2E\u4E93\u4EC2\u4EC9\u4EC8\u5198\u52FC\u536C\u53B9\u5720\u5903\u592C\u5C10\u5DFF\u65E1\u6BB3\u6BCC\u6C14\u723F\u4E31\u4E3C\u4EE8\u4EDC\u4EE9\u4EE1\u4EDD\u4EDA\u520C\u531C\u534C\u5722\u5723\u5917\u592F\u5B81\u5B84\u5C12\u5C3B\u5C74\u5C73\u5E04\u5E80\u5E82\u5FC9\u6209\u6250\u6C15"],["c9a1","\u6C36\u6C43\u6C3F\u6C3B\u72AE\u72B0\u738A\u79B8\u808A\u961E\u4F0E\u4F18\u4F2C\u4EF5\u4F14\u4EF1\u4F00\u4EF7\u4F08\u4F1D\u4F02\u4F05\u4F22\u4F13\u4F04\u4EF4\u4F12\u51B1\u5213\u5209\u5210\u52A6\u5322\u531F\u534D\u538A\u5407\u56E1\u56DF\u572E\u572A\u5734\u593C\u5980\u597C\u5985\u597B\u597E\u5977\u597F\u5B56\u5C15\u5C25\u5C7C\u5C7A\u5C7B\u5C7E\u5DDF\u5E75\u5E84\u5F02\u5F1A\u5F74\u5FD5\u5FD4\u5FCF\u625C\u625E\u6264\u6261\u6266\u6262\u6259\u6260\u625A\u6265\u65EF\u65EE\u673E\u6739\u6738\u673B\u673A\u673F\u673C\u6733\u6C18\u6C46\u6C52\u6C5C\u6C4F\u6C4A\u6C54\u6C4B"],["ca40","\u6C4C\u7071\u725E\u72B4\u72B5\u738E\u752A\u767F\u7A75\u7F51\u8278\u827C\u8280\u827D\u827F\u864D\u897E\u9099\u9097\u9098\u909B\u9094\u9622\u9624\u9620\u9623\u4F56\u4F3B\u4F62\u4F49\u4F53\u4F64\u4F3E\u4F67\u4F52\u4F5F\u4F41\u4F58\u4F2D\u4F33\u4F3F\u4F61\u518F\u51B9\u521C\u521E\u5221\u52AD\u52AE\u5309\u5363\u5372\u538E\u538F\u5430\u5437\u542A\u5454\u5445\u5419\u541C\u5425\u5418"],["caa1","\u543D\u544F\u5441\u5428\u5424\u5447\u56EE\u56E7\u56E5\u5741\u5745\u574C\u5749\u574B\u5752\u5906\u5940\u59A6\u5998\u59A0\u5997\u598E\u59A2\u5990\u598F\u59A7\u59A1\u5B8E\u5B92\u5C28\u5C2A\u5C8D\u5C8F\u5C88\u5C8B\u5C89\u5C92\u5C8A\u5C86\u5C93\u5C95\u5DE0\u5E0A\u5E0E\u5E8B\u5E89\u5E8C\u5E88\u5E8D\u5F05\u5F1D\u5F78\u5F76\u5FD2\u5FD1\u5FD0\u5FED\u5FE8\u5FEE\u5FF3\u5FE1\u5FE4\u5FE3\u5FFA\u5FEF\u5FF7\u5FFB\u6000\u5FF4\u623A\u6283\u628C\u628E\u628F\u6294\u6287\u6271\u627B\u627A\u6270\u6281\u6288\u6277\u627D\u6272\u6274\u6537\u65F0\u65F4\u65F3\u65F2\u65F5\u6745\u6747"],["cb40","\u6759\u6755\u674C\u6748\u675D\u674D\u675A\u674B\u6BD0\u6C19\u6C1A\u6C78\u6C67\u6C6B\u6C84\u6C8B\u6C8F\u6C71\u6C6F\u6C69\u6C9A\u6C6D\u6C87\u6C95\u6C9C\u6C66\u6C73\u6C65\u6C7B\u6C8E\u7074\u707A\u7263\u72BF\u72BD\u72C3\u72C6\u72C1\u72BA\u72C5\u7395\u7397\u7393\u7394\u7392\u753A\u7539\u7594\u7595\u7681\u793D\u8034\u8095\u8099\u8090\u8092\u809C\u8290\u828F\u8285\u828E\u8291\u8293"],["cba1","\u828A\u8283\u8284\u8C78\u8FC9\u8FBF\u909F\u90A1\u90A5\u909E\u90A7\u90A0\u9630\u9628\u962F\u962D\u4E33\u4F98\u4F7C\u4F85\u4F7D\u4F80\u4F87\u4F76\u4F74\u4F89\u4F84\u4F77\u4F4C\u4F97\u4F6A\u4F9A\u4F79\u4F81\u4F78\u4F90\u4F9C\u4F94\u4F9E\u4F92\u4F82\u4F95\u4F6B\u4F6E\u519E\u51BC\u51BE\u5235\u5232\u5233\u5246\u5231\u52BC\u530A\u530B\u533C\u5392\u5394\u5487\u547F\u5481\u5491\u5482\u5488\u546B\u547A\u547E\u5465\u546C\u5474\u5466\u548D\u546F\u5461\u5460\u5498\u5463\u5467\u5464\u56F7\u56F9\u576F\u5772\u576D\u576B\u5771\u5770\u5776\u5780\u5775\u577B\u5773\u5774\u5762"],["cc40","\u5768\u577D\u590C\u5945\u59B5\u59BA\u59CF\u59CE\u59B2\u59CC\u59C1\u59B6\u59BC\u59C3\u59D6\u59B1\u59BD\u59C0\u59C8\u59B4\u59C7\u5B62\u5B65\u5B93\u5B95\u5C44\u5C47\u5CAE\u5CA4\u5CA0\u5CB5\u5CAF\u5CA8\u5CAC\u5C9F\u5CA3\u5CAD\u5CA2\u5CAA\u5CA7\u5C9D\u5CA5\u5CB6\u5CB0\u5CA6\u5E17\u5E14\u5E19\u5F28\u5F22\u5F23\u5F24\u5F54\u5F82\u5F7E\u5F7D\u5FDE\u5FE5\u602D\u6026\u6019\u6032\u600B"],["cca1","\u6034\u600A\u6017\u6033\u601A\u601E\u602C\u6022\u600D\u6010\u602E\u6013\u6011\u600C\u6009\u601C\u6214\u623D\u62AD\u62B4\u62D1\u62BE\u62AA\u62B6\u62CA\u62AE\u62B3\u62AF\u62BB\u62A9\u62B0\u62B8\u653D\u65A8\u65BB\u6609\u65FC\u6604\u6612\u6608\u65FB\u6603\u660B\u660D\u6605\u65FD\u6611\u6610\u66F6\u670A\u6785\u676C\u678E\u6792\u6776\u677B\u6798\u6786\u6784\u6774\u678D\u678C\u677A\u679F\u6791\u6799\u6783\u677D\u6781\u6778\u6779\u6794\u6B25\u6B80\u6B7E\u6BDE\u6C1D\u6C93\u6CEC\u6CEB\u6CEE\u6CD9\u6CB6\u6CD4\u6CAD\u6CE7\u6CB7\u6CD0\u6CC2\u6CBA\u6CC3\u6CC6\u6CED\u6CF2"],["cd40","\u6CD2\u6CDD\u6CB4\u6C8A\u6C9D\u6C80\u6CDE\u6CC0\u6D30\u6CCD\u6CC7\u6CB0\u6CF9\u6CCF\u6CE9\u6CD1\u7094\u7098\u7085\u7093\u7086\u7084\u7091\u7096\u7082\u709A\u7083\u726A\u72D6\u72CB\u72D8\u72C9\u72DC\u72D2\u72D4\u72DA\u72CC\u72D1\u73A4\u73A1\u73AD\u73A6\u73A2\u73A0\u73AC\u739D\u74DD\u74E8\u753F\u7540\u753E\u758C\u7598\u76AF\u76F3\u76F1\u76F0\u76F5\u77F8\u77FC\u77F9\u77FB\u77FA"],["cda1","\u77F7\u7942\u793F\u79C5\u7A78\u7A7B\u7AFB\u7C75\u7CFD\u8035\u808F\u80AE\u80A3\u80B8\u80B5\u80AD\u8220\u82A0\u82C0\u82AB\u829A\u8298\u829B\u82B5\u82A7\u82AE\u82BC\u829E\u82BA\u82B4\u82A8\u82A1\u82A9\u82C2\u82A4\u82C3\u82B6\u82A2\u8670\u866F\u866D\u866E\u8C56\u8FD2\u8FCB\u8FD3\u8FCD\u8FD6\u8FD5\u8FD7\u90B2\u90B4\u90AF\u90B3\u90B0\u9639\u963D\u963C\u963A\u9643\u4FCD\u4FC5\u4FD3\u4FB2\u4FC9\u4FCB\u4FC1\u4FD4\u4FDC\u4FD9\u4FBB\u4FB3\u4FDB\u4FC7\u4FD6\u4FBA\u4FC0\u4FB9\u4FEC\u5244\u5249\u52C0\u52C2\u533D\u537C\u5397\u5396\u5399\u5398\u54BA\u54A1\u54AD\u54A5\u54CF"],["ce40","\u54C3\u830D\u54B7\u54AE\u54D6\u54B6\u54C5\u54C6\u54A0\u5470\u54BC\u54A2\u54BE\u5472\u54DE\u54B0\u57B5\u579E\u579F\u57A4\u578C\u5797\u579D\u579B\u5794\u5798\u578F\u5799\u57A5\u579A\u5795\u58F4\u590D\u5953\u59E1\u59DE\u59EE\u5A00\u59F1\u59DD\u59FA\u59FD\u59FC\u59F6\u59E4\u59F2\u59F7\u59DB\u59E9\u59F3\u59F5\u59E0\u59FE\u59F4\u59ED\u5BA8\u5C4C\u5CD0\u5CD8\u5CCC\u5CD7\u5CCB\u5CDB"],["cea1","\u5CDE\u5CDA\u5CC9\u5CC7\u5CCA\u5CD6\u5CD3\u5CD4\u5CCF\u5CC8\u5CC6\u5CCE\u5CDF\u5CF8\u5DF9\u5E21\u5E22\u5E23\u5E20\u5E24\u5EB0\u5EA4\u5EA2\u5E9B\u5EA3\u5EA5\u5F07\u5F2E\u5F56\u5F86\u6037\u6039\u6054\u6072\u605E\u6045\u6053\u6047\u6049\u605B\u604C\u6040\u6042\u605F\u6024\u6044\u6058\u6066\u606E\u6242\u6243\u62CF\u630D\u630B\u62F5\u630E\u6303\u62EB\u62F9\u630F\u630C\u62F8\u62F6\u6300\u6313\u6314\u62FA\u6315\u62FB\u62F0\u6541\u6543\u65AA\u65BF\u6636\u6621\u6632\u6635\u661C\u6626\u6622\u6633\u662B\u663A\u661D\u6634\u6639\u662E\u670F\u6710\u67C1\u67F2\u67C8\u67BA"],["cf40","\u67DC\u67BB\u67F8\u67D8\u67C0\u67B7\u67C5\u67EB\u67E4\u67DF\u67B5\u67CD\u67B3\u67F7\u67F6\u67EE\u67E3\u67C2\u67B9\u67CE\u67E7\u67F0\u67B2\u67FC\u67C6\u67ED\u67CC\u67AE\u67E6\u67DB\u67FA\u67C9\u67CA\u67C3\u67EA\u67CB\u6B28\u6B82\u6B84\u6BB6\u6BD6\u6BD8\u6BE0\u6C20\u6C21\u6D28\u6D34\u6D2D\u6D1F\u6D3C\u6D3F\u6D12\u6D0A\u6CDA\u6D33\u6D04\u6D19\u6D3A\u6D1A\u6D11\u6D00\u6D1D\u6D42"],["cfa1","\u6D01\u6D18\u6D37\u6D03\u6D0F\u6D40\u6D07\u6D20\u6D2C\u6D08\u6D22\u6D09\u6D10\u70B7\u709F\u70BE\u70B1\u70B0\u70A1\u70B4\u70B5\u70A9\u7241\u7249\u724A\u726C\u7270\u7273\u726E\u72CA\u72E4\u72E8\u72EB\u72DF\u72EA\u72E6\u72E3\u7385\u73CC\u73C2\u73C8\u73C5\u73B9\u73B6\u73B5\u73B4\u73EB\u73BF\u73C7\u73BE\u73C3\u73C6\u73B8\u73CB\u74EC\u74EE\u752E\u7547\u7548\u75A7\u75AA\u7679\u76C4\u7708\u7703\u7704\u7705\u770A\u76F7\u76FB\u76FA\u77E7\u77E8\u7806\u7811\u7812\u7805\u7810\u780F\u780E\u7809\u7803\u7813\u794A\u794C\u794B\u7945\u7944\u79D5\u79CD\u79CF\u79D6\u79CE\u7A80"],["d040","\u7A7E\u7AD1\u7B00\u7B01\u7C7A\u7C78\u7C79\u7C7F\u7C80\u7C81\u7D03\u7D08\u7D01\u7F58\u7F91\u7F8D\u7FBE\u8007\u800E\u800F\u8014\u8037\u80D8\u80C7\u80E0\u80D1\u80C8\u80C2\u80D0\u80C5\u80E3\u80D9\u80DC\u80CA\u80D5\u80C9\u80CF\u80D7\u80E6\u80CD\u81FF\u8221\u8294\u82D9\u82FE\u82F9\u8307\u82E8\u8300\u82D5\u833A\u82EB\u82D6\u82F4\u82EC\u82E1\u82F2\u82F5\u830C\u82FB\u82F6\u82F0\u82EA"],["d0a1","\u82E4\u82E0\u82FA\u82F3\u82ED\u8677\u8674\u867C\u8673\u8841\u884E\u8867\u886A\u8869\u89D3\u8A04\u8A07\u8D72\u8FE3\u8FE1\u8FEE\u8FE0\u90F1\u90BD\u90BF\u90D5\u90C5\u90BE\u90C7\u90CB\u90C8\u91D4\u91D3\u9654\u964F\u9651\u9653\u964A\u964E\u501E\u5005\u5007\u5013\u5022\u5030\u501B\u4FF5\u4FF4\u5033\u5037\u502C\u4FF6\u4FF7\u5017\u501C\u5020\u5027\u5035\u502F\u5031\u500E\u515A\u5194\u5193\u51CA\u51C4\u51C5\u51C8\u51CE\u5261\u525A\u5252\u525E\u525F\u5255\u5262\u52CD\u530E\u539E\u5526\u54E2\u5517\u5512\u54E7\u54F3\u54E4\u551A\u54FF\u5504\u5508\u54EB\u5511\u5505\u54F1"],["d140","\u550A\u54FB\u54F7\u54F8\u54E0\u550E\u5503\u550B\u5701\u5702\u57CC\u5832\u57D5\u57D2\u57BA\u57C6\u57BD\u57BC\u57B8\u57B6\u57BF\u57C7\u57D0\u57B9\u57C1\u590E\u594A\u5A19\u5A16\u5A2D\u5A2E\u5A15\u5A0F\u5A17\u5A0A\u5A1E\u5A33\u5B6C\u5BA7\u5BAD\u5BAC\u5C03\u5C56\u5C54\u5CEC\u5CFF\u5CEE\u5CF1\u5CF7\u5D00\u5CF9\u5E29\u5E28\u5EA8\u5EAE\u5EAA\u5EAC\u5F33\u5F30\u5F67\u605D\u605A\u6067"],["d1a1","\u6041\u60A2\u6088\u6080\u6092\u6081\u609D\u6083\u6095\u609B\u6097\u6087\u609C\u608E\u6219\u6246\u62F2\u6310\u6356\u632C\u6344\u6345\u6336\u6343\u63E4\u6339\u634B\u634A\u633C\u6329\u6341\u6334\u6358\u6354\u6359\u632D\u6347\u6333\u635A\u6351\u6338\u6357\u6340\u6348\u654A\u6546\u65C6\u65C3\u65C4\u65C2\u664A\u665F\u6647\u6651\u6712\u6713\u681F\u681A\u6849\u6832\u6833\u683B\u684B\u684F\u6816\u6831\u681C\u6835\u682B\u682D\u682F\u684E\u6844\u6834\u681D\u6812\u6814\u6826\u6828\u682E\u684D\u683A\u6825\u6820\u6B2C\u6B2F\u6B2D\u6B31\u6B34\u6B6D\u8082\u6B88\u6BE6\u6BE4"],["d240","\u6BE8\u6BE3\u6BE2\u6BE7\u6C25\u6D7A\u6D63\u6D64\u6D76\u6D0D\u6D61\u6D92\u6D58\u6D62\u6D6D\u6D6F\u6D91\u6D8D\u6DEF\u6D7F\u6D86\u6D5E\u6D67\u6D60\u6D97\u6D70\u6D7C\u6D5F\u6D82\u6D98\u6D2F\u6D68\u6D8B\u6D7E\u6D80\u6D84\u6D16\u6D83\u6D7B\u6D7D\u6D75\u6D90\u70DC\u70D3\u70D1\u70DD\u70CB\u7F39\u70E2\u70D7\u70D2\u70DE\u70E0\u70D4\u70CD\u70C5\u70C6\u70C7\u70DA\u70CE\u70E1\u7242\u7278"],["d2a1","\u7277\u7276\u7300\u72FA\u72F4\u72FE\u72F6\u72F3\u72FB\u7301\u73D3\u73D9\u73E5\u73D6\u73BC\u73E7\u73E3\u73E9\u73DC\u73D2\u73DB\u73D4\u73DD\u73DA\u73D7\u73D8\u73E8\u74DE\u74DF\u74F4\u74F5\u7521\u755B\u755F\u75B0\u75C1\u75BB\u75C4\u75C0\u75BF\u75B6\u75BA\u768A\u76C9\u771D\u771B\u7710\u7713\u7712\u7723\u7711\u7715\u7719\u771A\u7722\u7727\u7823\u782C\u7822\u7835\u782F\u7828\u782E\u782B\u7821\u7829\u7833\u782A\u7831\u7954\u795B\u794F\u795C\u7953\u7952\u7951\u79EB\u79EC\u79E0\u79EE\u79ED\u79EA\u79DC\u79DE\u79DD\u7A86\u7A89\u7A85\u7A8B\u7A8C\u7A8A\u7A87\u7AD8\u7B10"],["d340","\u7B04\u7B13\u7B05\u7B0F\u7B08\u7B0A\u7B0E\u7B09\u7B12\u7C84\u7C91\u7C8A\u7C8C\u7C88\u7C8D\u7C85\u7D1E\u7D1D\u7D11\u7D0E\u7D18\u7D16\u7D13\u7D1F\u7D12\u7D0F\u7D0C\u7F5C\u7F61\u7F5E\u7F60\u7F5D\u7F5B\u7F96\u7F92\u7FC3\u7FC2\u7FC0\u8016\u803E\u8039\u80FA\u80F2\u80F9\u80F5\u8101\u80FB\u8100\u8201\u822F\u8225\u8333\u832D\u8344\u8319\u8351\u8325\u8356\u833F\u8341\u8326\u831C\u8322"],["d3a1","\u8342\u834E\u831B\u832A\u8308\u833C\u834D\u8316\u8324\u8320\u8337\u832F\u8329\u8347\u8345\u834C\u8353\u831E\u832C\u834B\u8327\u8348\u8653\u8652\u86A2\u86A8\u8696\u868D\u8691\u869E\u8687\u8697\u8686\u868B\u869A\u8685\u86A5\u8699\u86A1\u86A7\u8695\u8698\u868E\u869D\u8690\u8694\u8843\u8844\u886D\u8875\u8876\u8872\u8880\u8871\u887F\u886F\u8883\u887E\u8874\u887C\u8A12\u8C47\u8C57\u8C7B\u8CA4\u8CA3\u8D76\u8D78\u8DB5\u8DB7\u8DB6\u8ED1\u8ED3\u8FFE\u8FF5\u9002\u8FFF\u8FFB\u9004\u8FFC\u8FF6\u90D6\u90E0\u90D9\u90DA\u90E3\u90DF\u90E5\u90D8\u90DB\u90D7\u90DC\u90E4\u9150"],["d440","\u914E\u914F\u91D5\u91E2\u91DA\u965C\u965F\u96BC\u98E3\u9ADF\u9B2F\u4E7F\u5070\u506A\u5061\u505E\u5060\u5053\u504B\u505D\u5072\u5048\u504D\u5041\u505B\u504A\u5062\u5015\u5045\u505F\u5069\u506B\u5063\u5064\u5046\u5040\u506E\u5073\u5057\u5051\u51D0\u526B\u526D\u526C\u526E\u52D6\u52D3\u532D\u539C\u5575\u5576\u553C\u554D\u5550\u5534\u552A\u5551\u5562\u5536\u5535\u5530\u5552\u5545"],["d4a1","\u550C\u5532\u5565\u554E\u5539\u5548\u552D\u553B\u5540\u554B\u570A\u5707\u57FB\u5814\u57E2\u57F6\u57DC\u57F4\u5800\u57ED\u57FD\u5808\u57F8\u580B\u57F3\u57CF\u5807\u57EE\u57E3\u57F2\u57E5\u57EC\u57E1\u580E\u57FC\u5810\u57E7\u5801\u580C\u57F1\u57E9\u57F0\u580D\u5804\u595C\u5A60\u5A58\u5A55\u5A67\u5A5E\u5A38\u5A35\u5A6D\u5A50\u5A5F\u5A65\u5A6C\u5A53\u5A64\u5A57\u5A43\u5A5D\u5A52\u5A44\u5A5B\u5A48\u5A8E\u5A3E\u5A4D\u5A39\u5A4C\u5A70\u5A69\u5A47\u5A51\u5A56\u5A42\u5A5C\u5B72\u5B6E\u5BC1\u5BC0\u5C59\u5D1E\u5D0B\u5D1D\u5D1A\u5D20\u5D0C\u5D28\u5D0D\u5D26\u5D25\u5D0F"],["d540","\u5D30\u5D12\u5D23\u5D1F\u5D2E\u5E3E\u5E34\u5EB1\u5EB4\u5EB9\u5EB2\u5EB3\u5F36\u5F38\u5F9B\u5F96\u5F9F\u608A\u6090\u6086\u60BE\u60B0\u60BA\u60D3\u60D4\u60CF\u60E4\u60D9\u60DD\u60C8\u60B1\u60DB\u60B7\u60CA\u60BF\u60C3\u60CD\u60C0\u6332\u6365\u638A\u6382\u637D\u63BD\u639E\u63AD\u639D\u6397\u63AB\u638E\u636F\u6387\u6390\u636E\u63AF\u6375\u639C\u636D\u63AE\u637C\u63A4\u633B\u639F"],["d5a1","\u6378\u6385\u6381\u6391\u638D\u6370\u6553\u65CD\u6665\u6661\u665B\u6659\u665C\u6662\u6718\u6879\u6887\u6890\u689C\u686D\u686E\u68AE\u68AB\u6956\u686F\u68A3\u68AC\u68A9\u6875\u6874\u68B2\u688F\u6877\u6892\u687C\u686B\u6872\u68AA\u6880\u6871\u687E\u689B\u6896\u688B\u68A0\u6889\u68A4\u6878\u687B\u6891\u688C\u688A\u687D\u6B36\u6B33\u6B37\u6B38\u6B91\u6B8F\u6B8D\u6B8E\u6B8C\u6C2A\u6DC0\u6DAB\u6DB4\u6DB3\u6E74\u6DAC\u6DE9\u6DE2\u6DB7\u6DF6\u6DD4\u6E00\u6DC8\u6DE0\u6DDF\u6DD6\u6DBE\u6DE5\u6DDC\u6DDD\u6DDB\u6DF4\u6DCA\u6DBD\u6DED\u6DF0\u6DBA\u6DD5\u6DC2\u6DCF\u6DC9"],["d640","\u6DD0\u6DF2\u6DD3\u6DFD\u6DD7\u6DCD\u6DE3\u6DBB\u70FA\u710D\u70F7\u7117\u70F4\u710C\u70F0\u7104\u70F3\u7110\u70FC\u70FF\u7106\u7113\u7100\u70F8\u70F6\u710B\u7102\u710E\u727E\u727B\u727C\u727F\u731D\u7317\u7307\u7311\u7318\u730A\u7308\u72FF\u730F\u731E\u7388\u73F6\u73F8\u73F5\u7404\u7401\u73FD\u7407\u7400\u73FA\u73FC\u73FF\u740C\u740B\u73F4\u7408\u7564\u7563\u75CE\u75D2\u75CF"],["d6a1","\u75CB\u75CC\u75D1\u75D0\u768F\u7689\u76D3\u7739\u772F\u772D\u7731\u7732\u7734\u7733\u773D\u7725\u773B\u7735\u7848\u7852\u7849\u784D\u784A\u784C\u7826\u7845\u7850\u7964\u7967\u7969\u796A\u7963\u796B\u7961\u79BB\u79FA\u79F8\u79F6\u79F7\u7A8F\u7A94\u7A90\u7B35\u7B47\u7B34\u7B25\u7B30\u7B22\u7B24\u7B33\u7B18\u7B2A\u7B1D\u7B31\u7B2B\u7B2D\u7B2F\u7B32\u7B38\u7B1A\u7B23\u7C94\u7C98\u7C96\u7CA3\u7D35\u7D3D\u7D38\u7D36\u7D3A\u7D45\u7D2C\u7D29\u7D41\u7D47\u7D3E\u7D3F\u7D4A\u7D3B\u7D28\u7F63\u7F95\u7F9C\u7F9D\u7F9B\u7FCA\u7FCB\u7FCD\u7FD0\u7FD1\u7FC7\u7FCF\u7FC9\u801F"],["d740","\u801E\u801B\u8047\u8043\u8048\u8118\u8125\u8119\u811B\u812D\u811F\u812C\u811E\u8121\u8115\u8127\u811D\u8122\u8211\u8238\u8233\u823A\u8234\u8232\u8274\u8390\u83A3\u83A8\u838D\u837A\u8373\u83A4\u8374\u838F\u8381\u8395\u8399\u8375\u8394\u83A9\u837D\u8383\u838C\u839D\u839B\u83AA\u838B\u837E\u83A5\u83AF\u8388\u8397\u83B0\u837F\u83A6\u8387\u83AE\u8376\u839A\u8659\u8656\u86BF\u86B7"],["d7a1","\u86C2\u86C1\u86C5\u86BA\u86B0\u86C8\u86B9\u86B3\u86B8\u86CC\u86B4\u86BB\u86BC\u86C3\u86BD\u86BE\u8852\u8889\u8895\u88A8\u88A2\u88AA\u889A\u8891\u88A1\u889F\u8898\u88A7\u8899\u889B\u8897\u88A4\u88AC\u888C\u8893\u888E\u8982\u89D6\u89D9\u89D5\u8A30\u8A27\u8A2C\u8A1E\u8C39\u8C3B\u8C5C\u8C5D\u8C7D\u8CA5\u8D7D\u8D7B\u8D79\u8DBC\u8DC2\u8DB9\u8DBF\u8DC1\u8ED8\u8EDE\u8EDD\u8EDC\u8ED7\u8EE0\u8EE1\u9024\u900B\u9011\u901C\u900C\u9021\u90EF\u90EA\u90F0\u90F4\u90F2\u90F3\u90D4\u90EB\u90EC\u90E9\u9156\u9158\u915A\u9153\u9155\u91EC\u91F4\u91F1\u91F3\u91F8\u91E4\u91F9\u91EA"],["d840","\u91EB\u91F7\u91E8\u91EE\u957A\u9586\u9588\u967C\u966D\u966B\u9671\u966F\u96BF\u976A\u9804\u98E5\u9997\u509B\u5095\u5094\u509E\u508B\u50A3\u5083\u508C\u508E\u509D\u5068\u509C\u5092\u5082\u5087\u515F\u51D4\u5312\u5311\u53A4\u53A7\u5591\u55A8\u55A5\u55AD\u5577\u5645\u55A2\u5593\u5588\u558F\u55B5\u5581\u55A3\u5592\u55A4\u557D\u558C\u55A6\u557F\u5595\u55A1\u558E\u570C\u5829\u5837"],["d8a1","\u5819\u581E\u5827\u5823\u5828\u57F5\u5848\u5825\u581C\u581B\u5833\u583F\u5836\u582E\u5839\u5838\u582D\u582C\u583B\u5961\u5AAF\u5A94\u5A9F\u5A7A\u5AA2\u5A9E\u5A78\u5AA6\u5A7C\u5AA5\u5AAC\u5A95\u5AAE\u5A37\u5A84\u5A8A\u5A97\u5A83\u5A8B\u5AA9\u5A7B\u5A7D\u5A8C\u5A9C\u5A8F\u5A93\u5A9D\u5BEA\u5BCD\u5BCB\u5BD4\u5BD1\u5BCA\u5BCE\u5C0C\u5C30\u5D37\u5D43\u5D6B\u5D41\u5D4B\u5D3F\u5D35\u5D51\u5D4E\u5D55\u5D33\u5D3A\u5D52\u5D3D\u5D31\u5D59\u5D42\u5D39\u5D49\u5D38\u5D3C\u5D32\u5D36\u5D40\u5D45\u5E44\u5E41\u5F58\u5FA6\u5FA5\u5FAB\u60C9\u60B9\u60CC\u60E2\u60CE\u60C4\u6114"],["d940","\u60F2\u610A\u6116\u6105\u60F5\u6113\u60F8\u60FC\u60FE\u60C1\u6103\u6118\u611D\u6110\u60FF\u6104\u610B\u624A\u6394\u63B1\u63B0\u63CE\u63E5\u63E8\u63EF\u63C3\u649D\u63F3\u63CA\u63E0\u63F6\u63D5\u63F2\u63F5\u6461\u63DF\u63BE\u63DD\u63DC\u63C4\u63D8\u63D3\u63C2\u63C7\u63CC\u63CB\u63C8\u63F0\u63D7\u63D9\u6532\u6567\u656A\u6564\u655C\u6568\u6565\u658C\u659D\u659E\u65AE\u65D0\u65D2"],["d9a1","\u667C\u666C\u667B\u6680\u6671\u6679\u666A\u6672\u6701\u690C\u68D3\u6904\u68DC\u692A\u68EC\u68EA\u68F1\u690F\u68D6\u68F7\u68EB\u68E4\u68F6\u6913\u6910\u68F3\u68E1\u6907\u68CC\u6908\u6970\u68B4\u6911\u68EF\u68C6\u6914\u68F8\u68D0\u68FD\u68FC\u68E8\u690B\u690A\u6917\u68CE\u68C8\u68DD\u68DE\u68E6\u68F4\u68D1\u6906\u68D4\u68E9\u6915\u6925\u68C7\u6B39\u6B3B\u6B3F\u6B3C\u6B94\u6B97\u6B99\u6B95\u6BBD\u6BF0\u6BF2\u6BF3\u6C30\u6DFC\u6E46\u6E47\u6E1F\u6E49\u6E88\u6E3C\u6E3D\u6E45\u6E62\u6E2B\u6E3F\u6E41\u6E5D\u6E73\u6E1C\u6E33\u6E4B\u6E40\u6E51\u6E3B\u6E03\u6E2E\u6E5E"],["da40","\u6E68\u6E5C\u6E61\u6E31\u6E28\u6E60\u6E71\u6E6B\u6E39\u6E22\u6E30\u6E53\u6E65\u6E27\u6E78\u6E64\u6E77\u6E55\u6E79\u6E52\u6E66\u6E35\u6E36\u6E5A\u7120\u711E\u712F\u70FB\u712E\u7131\u7123\u7125\u7122\u7132\u711F\u7128\u713A\u711B\u724B\u725A\u7288\u7289\u7286\u7285\u728B\u7312\u730B\u7330\u7322\u7331\u7333\u7327\u7332\u732D\u7326\u7323\u7335\u730C\u742E\u742C\u7430\u742B\u7416"],["daa1","\u741A\u7421\u742D\u7431\u7424\u7423\u741D\u7429\u7420\u7432\u74FB\u752F\u756F\u756C\u75E7\u75DA\u75E1\u75E6\u75DD\u75DF\u75E4\u75D7\u7695\u7692\u76DA\u7746\u7747\u7744\u774D\u7745\u774A\u774E\u774B\u774C\u77DE\u77EC\u7860\u7864\u7865\u785C\u786D\u7871\u786A\u786E\u7870\u7869\u7868\u785E\u7862\u7974\u7973\u7972\u7970\u7A02\u7A0A\u7A03\u7A0C\u7A04\u7A99\u7AE6\u7AE4\u7B4A\u7B3B\u7B44\u7B48\u7B4C\u7B4E\u7B40\u7B58\u7B45\u7CA2\u7C9E\u7CA8\u7CA1\u7D58\u7D6F\u7D63\u7D53\u7D56\u7D67\u7D6A\u7D4F\u7D6D\u7D5C\u7D6B\u7D52\u7D54\u7D69\u7D51\u7D5F\u7D4E\u7F3E\u7F3F\u7F65"],["db40","\u7F66\u7FA2\u7FA0\u7FA1\u7FD7\u8051\u804F\u8050\u80FE\u80D4\u8143\u814A\u8152\u814F\u8147\u813D\u814D\u813A\u81E6\u81EE\u81F7\u81F8\u81F9\u8204\u823C\u823D\u823F\u8275\u833B\u83CF\u83F9\u8423\u83C0\u83E8\u8412\u83E7\u83E4\u83FC\u83F6\u8410\u83C6\u83C8\u83EB\u83E3\u83BF\u8401\u83DD\u83E5\u83D8\u83FF\u83E1\u83CB\u83CE\u83D6\u83F5\u83C9\u8409\u840F\u83DE\u8411\u8406\u83C2\u83F3"],["dba1","\u83D5\u83FA\u83C7\u83D1\u83EA\u8413\u83C3\u83EC\u83EE\u83C4\u83FB\u83D7\u83E2\u841B\u83DB\u83FE\u86D8\u86E2\u86E6\u86D3\u86E3\u86DA\u86EA\u86DD\u86EB\u86DC\u86EC\u86E9\u86D7\u86E8\u86D1\u8848\u8856\u8855\u88BA\u88D7\u88B9\u88B8\u88C0\u88BE\u88B6\u88BC\u88B7\u88BD\u88B2\u8901\u88C9\u8995\u8998\u8997\u89DD\u89DA\u89DB\u8A4E\u8A4D\u8A39\u8A59\u8A40\u8A57\u8A58\u8A44\u8A45\u8A52\u8A48\u8A51\u8A4A\u8A4C\u8A4F\u8C5F\u8C81\u8C80\u8CBA\u8CBE\u8CB0\u8CB9\u8CB5\u8D84\u8D80\u8D89\u8DD8\u8DD3\u8DCD\u8DC7\u8DD6\u8DDC\u8DCF\u8DD5\u8DD9\u8DC8\u8DD7\u8DC5\u8EEF\u8EF7\u8EFA"],["dc40","\u8EF9\u8EE6\u8EEE\u8EE5\u8EF5\u8EE7\u8EE8\u8EF6\u8EEB\u8EF1\u8EEC\u8EF4\u8EE9\u902D\u9034\u902F\u9106\u912C\u9104\u90FF\u90FC\u9108\u90F9\u90FB\u9101\u9100\u9107\u9105\u9103\u9161\u9164\u915F\u9162\u9160\u9201\u920A\u9225\u9203\u921A\u9226\u920F\u920C\u9200\u9212\u91FF\u91FD\u9206\u9204\u9227\u9202\u921C\u9224\u9219\u9217\u9205\u9216\u957B\u958D\u958C\u9590\u9687\u967E\u9688"],["dca1","\u9689\u9683\u9680\u96C2\u96C8\u96C3\u96F1\u96F0\u976C\u9770\u976E\u9807\u98A9\u98EB\u9CE6\u9EF9\u4E83\u4E84\u4EB6\u50BD\u50BF\u50C6\u50AE\u50C4\u50CA\u50B4\u50C8\u50C2\u50B0\u50C1\u50BA\u50B1\u50CB\u50C9\u50B6\u50B8\u51D7\u527A\u5278\u527B\u527C\u55C3\u55DB\u55CC\u55D0\u55CB\u55CA\u55DD\u55C0\u55D4\u55C4\u55E9\u55BF\u55D2\u558D\u55CF\u55D5\u55E2\u55D6\u55C8\u55F2\u55CD\u55D9\u55C2\u5714\u5853\u5868\u5864\u584F\u584D\u5849\u586F\u5855\u584E\u585D\u5859\u5865\u585B\u583D\u5863\u5871\u58FC\u5AC7\u5AC4\u5ACB\u5ABA\u5AB8\u5AB1\u5AB5\u5AB0\u5ABF\u5AC8\u5ABB\u5AC6"],["dd40","\u5AB7\u5AC0\u5ACA\u5AB4\u5AB6\u5ACD\u5AB9\u5A90\u5BD6\u5BD8\u5BD9\u5C1F\u5C33\u5D71\u5D63\u5D4A\u5D65\u5D72\u5D6C\u5D5E\u5D68\u5D67\u5D62\u5DF0\u5E4F\u5E4E\u5E4A\u5E4D\u5E4B\u5EC5\u5ECC\u5EC6\u5ECB\u5EC7\u5F40\u5FAF\u5FAD\u60F7\u6149\u614A\u612B\u6145\u6136\u6132\u612E\u6146\u612F\u614F\u6129\u6140\u6220\u9168\u6223\u6225\u6224\u63C5\u63F1\u63EB\u6410\u6412\u6409\u6420\u6424"],["dda1","\u6433\u6443\u641F\u6415\u6418\u6439\u6437\u6422\u6423\u640C\u6426\u6430\u6428\u6441\u6435\u642F\u640A\u641A\u6440\u6425\u6427\u640B\u63E7\u641B\u642E\u6421\u640E\u656F\u6592\u65D3\u6686\u668C\u6695\u6690\u668B\u668A\u6699\u6694\u6678\u6720\u6966\u695F\u6938\u694E\u6962\u6971\u693F\u6945\u696A\u6939\u6942\u6957\u6959\u697A\u6948\u6949\u6935\u696C\u6933\u693D\u6965\u68F0\u6978\u6934\u6969\u6940\u696F\u6944\u6976\u6958\u6941\u6974\u694C\u693B\u694B\u6937\u695C\u694F\u6951\u6932\u6952\u692F\u697B\u693C\u6B46\u6B45\u6B43\u6B42\u6B48\u6B41\u6B9B\uFA0D\u6BFB\u6BFC"],["de40","\u6BF9\u6BF7\u6BF8\u6E9B\u6ED6\u6EC8\u6E8F\u6EC0\u6E9F\u6E93\u6E94\u6EA0\u6EB1\u6EB9\u6EC6\u6ED2\u6EBD\u6EC1\u6E9E\u6EC9\u6EB7\u6EB0\u6ECD\u6EA6\u6ECF\u6EB2\u6EBE\u6EC3\u6EDC\u6ED8\u6E99\u6E92\u6E8E\u6E8D\u6EA4\u6EA1\u6EBF\u6EB3\u6ED0\u6ECA\u6E97\u6EAE\u6EA3\u7147\u7154\u7152\u7163\u7160\u7141\u715D\u7162\u7172\u7178\u716A\u7161\u7142\u7158\u7143\u714B\u7170\u715F\u7150\u7153"],["dea1","\u7144\u714D\u715A\u724F\u728D\u728C\u7291\u7290\u728E\u733C\u7342\u733B\u733A\u7340\u734A\u7349\u7444\u744A\u744B\u7452\u7451\u7457\u7440\u744F\u7450\u744E\u7442\u7446\u744D\u7454\u74E1\u74FF\u74FE\u74FD\u751D\u7579\u7577\u6983\u75EF\u760F\u7603\u75F7\u75FE\u75FC\u75F9\u75F8\u7610\u75FB\u75F6\u75ED\u75F5\u75FD\u7699\u76B5\u76DD\u7755\u775F\u7760\u7752\u7756\u775A\u7769\u7767\u7754\u7759\u776D\u77E0\u7887\u789A\u7894\u788F\u7884\u7895\u7885\u7886\u78A1\u7883\u7879\u7899\u7880\u7896\u787B\u797C\u7982\u797D\u7979\u7A11\u7A18\u7A19\u7A12\u7A17\u7A15\u7A22\u7A13"],["df40","\u7A1B\u7A10\u7AA3\u7AA2\u7A9E\u7AEB\u7B66\u7B64\u7B6D\u7B74\u7B69\u7B72\u7B65\u7B73\u7B71\u7B70\u7B61\u7B78\u7B76\u7B63\u7CB2\u7CB4\u7CAF\u7D88\u7D86\u7D80\u7D8D\u7D7F\u7D85\u7D7A\u7D8E\u7D7B\u7D83\u7D7C\u7D8C\u7D94\u7D84\u7D7D\u7D92\u7F6D\u7F6B\u7F67\u7F68\u7F6C\u7FA6\u7FA5\u7FA7\u7FDB\u7FDC\u8021\u8164\u8160\u8177\u815C\u8169\u815B\u8162\u8172\u6721\u815E\u8176\u8167\u816F"],["dfa1","\u8144\u8161\u821D\u8249\u8244\u8240\u8242\u8245\u84F1\u843F\u8456\u8476\u8479\u848F\u848D\u8465\u8451\u8440\u8486\u8467\u8430\u844D\u847D\u845A\u8459\u8474\u8473\u845D\u8507\u845E\u8437\u843A\u8434\u847A\u8443\u8478\u8432\u8445\u8429\u83D9\u844B\u842F\u8442\u842D\u845F\u8470\u8439\u844E\u844C\u8452\u846F\u84C5\u848E\u843B\u8447\u8436\u8433\u8468\u847E\u8444\u842B\u8460\u8454\u846E\u8450\u870B\u8704\u86F7\u870C\u86FA\u86D6\u86F5\u874D\u86F8\u870E\u8709\u8701\u86F6\u870D\u8705\u88D6\u88CB\u88CD\u88CE\u88DE\u88DB\u88DA\u88CC\u88D0\u8985\u899B\u89DF\u89E5\u89E4"],["e040","\u89E1\u89E0\u89E2\u89DC\u89E6\u8A76\u8A86\u8A7F\u8A61\u8A3F\u8A77\u8A82\u8A84\u8A75\u8A83\u8A81\u8A74\u8A7A\u8C3C\u8C4B\u8C4A\u8C65\u8C64\u8C66\u8C86\u8C84\u8C85\u8CCC\u8D68\u8D69\u8D91\u8D8C\u8D8E\u8D8F\u8D8D\u8D93\u8D94\u8D90\u8D92\u8DF0\u8DE0\u8DEC\u8DF1\u8DEE\u8DD0\u8DE9\u8DE3\u8DE2\u8DE7\u8DF2\u8DEB\u8DF4\u8F06\u8EFF\u8F01\u8F00\u8F05\u8F07\u8F08\u8F02\u8F0B\u9052\u903F"],["e0a1","\u9044\u9049\u903D\u9110\u910D\u910F\u9111\u9116\u9114\u910B\u910E\u916E\u916F\u9248\u9252\u9230\u923A\u9266\u9233\u9265\u925E\u9283\u922E\u924A\u9246\u926D\u926C\u924F\u9260\u9267\u926F\u9236\u9261\u9270\u9231\u9254\u9263\u9250\u9272\u924E\u9253\u924C\u9256\u9232\u959F\u959C\u959E\u959B\u9692\u9693\u9691\u9697\u96CE\u96FA\u96FD\u96F8\u96F5\u9773\u9777\u9778\u9772\u980F\u980D\u980E\u98AC\u98F6\u98F9\u99AF\u99B2\u99B0\u99B5\u9AAD\u9AAB\u9B5B\u9CEA\u9CED\u9CE7\u9E80\u9EFD\u50E6\u50D4\u50D7\u50E8\u50F3\u50DB\u50EA\u50DD\u50E4\u50D3\u50EC\u50F0\u50EF\u50E3\u50E0"],["e140","\u51D8\u5280\u5281\u52E9\u52EB\u5330\u53AC\u5627\u5615\u560C\u5612\u55FC\u560F\u561C\u5601\u5613\u5602\u55FA\u561D\u5604\u55FF\u55F9\u5889\u587C\u5890\u5898\u5886\u5881\u587F\u5874\u588B\u587A\u5887\u5891\u588E\u5876\u5882\u5888\u587B\u5894\u588F\u58FE\u596B\u5ADC\u5AEE\u5AE5\u5AD5\u5AEA\u5ADA\u5AED\u5AEB\u5AF3\u5AE2\u5AE0\u5ADB\u5AEC\u5ADE\u5ADD\u5AD9\u5AE8\u5ADF\u5B77\u5BE0"],["e1a1","\u5BE3\u5C63\u5D82\u5D80\u5D7D\u5D86\u5D7A\u5D81\u5D77\u5D8A\u5D89\u5D88\u5D7E\u5D7C\u5D8D\u5D79\u5D7F\u5E58\u5E59\u5E53\u5ED8\u5ED1\u5ED7\u5ECE\u5EDC\u5ED5\u5ED9\u5ED2\u5ED4\u5F44\u5F43\u5F6F\u5FB6\u612C\u6128\u6141\u615E\u6171\u6173\u6152\u6153\u6172\u616C\u6180\u6174\u6154\u617A\u615B\u6165\u613B\u616A\u6161\u6156\u6229\u6227\u622B\u642B\u644D\u645B\u645D\u6474\u6476\u6472\u6473\u647D\u6475\u6466\u64A6\u644E\u6482\u645E\u645C\u644B\u6453\u6460\u6450\u647F\u643F\u646C\u646B\u6459\u6465\u6477\u6573\u65A0\u66A1\u66A0\u669F\u6705\u6704\u6722\u69B1\u69B6\u69C9"],["e240","\u69A0\u69CE\u6996\u69B0\u69AC\u69BC\u6991\u6999\u698E\u69A7\u698D\u69A9\u69BE\u69AF\u69BF\u69C4\u69BD\u69A4\u69D4\u69B9\u69CA\u699A\u69CF\u69B3\u6993\u69AA\u69A1\u699E\u69D9\u6997\u6990\u69C2\u69B5\u69A5\u69C6\u6B4A\u6B4D\u6B4B\u6B9E\u6B9F\u6BA0\u6BC3\u6BC4\u6BFE\u6ECE\u6EF5\u6EF1\u6F03\u6F25\u6EF8\u6F37\u6EFB\u6F2E\u6F09\u6F4E\u6F19\u6F1A\u6F27\u6F18\u6F3B\u6F12\u6EED\u6F0A"],["e2a1","\u6F36\u6F73\u6EF9\u6EEE\u6F2D\u6F40\u6F30\u6F3C\u6F35\u6EEB\u6F07\u6F0E\u6F43\u6F05\u6EFD\u6EF6\u6F39\u6F1C\u6EFC\u6F3A\u6F1F\u6F0D\u6F1E\u6F08\u6F21\u7187\u7190\u7189\u7180\u7185\u7182\u718F\u717B\u7186\u7181\u7197\u7244\u7253\u7297\u7295\u7293\u7343\u734D\u7351\u734C\u7462\u7473\u7471\u7475\u7472\u7467\u746E\u7500\u7502\u7503\u757D\u7590\u7616\u7608\u760C\u7615\u7611\u760A\u7614\u76B8\u7781\u777C\u7785\u7782\u776E\u7780\u776F\u777E\u7783\u78B2\u78AA\u78B4\u78AD\u78A8\u787E\u78AB\u789E\u78A5\u78A0\u78AC\u78A2\u78A4\u7998\u798A\u798B\u7996\u7995\u7994\u7993"],["e340","\u7997\u7988\u7992\u7990\u7A2B\u7A4A\u7A30\u7A2F\u7A28\u7A26\u7AA8\u7AAB\u7AAC\u7AEE\u7B88\u7B9C\u7B8A\u7B91\u7B90\u7B96\u7B8D\u7B8C\u7B9B\u7B8E\u7B85\u7B98\u5284\u7B99\u7BA4\u7B82\u7CBB\u7CBF\u7CBC\u7CBA\u7DA7\u7DB7\u7DC2\u7DA3\u7DAA\u7DC1\u7DC0\u7DC5\u7D9D\u7DCE\u7DC4\u7DC6\u7DCB\u7DCC\u7DAF\u7DB9\u7D96\u7DBC\u7D9F\u7DA6\u7DAE\u7DA9\u7DA1\u7DC9\u7F73\u7FE2\u7FE3\u7FE5\u7FDE"],["e3a1","\u8024\u805D\u805C\u8189\u8186\u8183\u8187\u818D\u818C\u818B\u8215\u8497\u84A4\u84A1\u849F\u84BA\u84CE\u84C2\u84AC\u84AE\u84AB\u84B9\u84B4\u84C1\u84CD\u84AA\u849A\u84B1\u84D0\u849D\u84A7\u84BB\u84A2\u8494\u84C7\u84CC\u849B\u84A9\u84AF\u84A8\u84D6\u8498\u84B6\u84CF\u84A0\u84D7\u84D4\u84D2\u84DB\u84B0\u8491\u8661\u8733\u8723\u8728\u876B\u8740\u872E\u871E\u8721\u8719\u871B\u8743\u872C\u8741\u873E\u8746\u8720\u8732\u872A\u872D\u873C\u8712\u873A\u8731\u8735\u8742\u8726\u8727\u8738\u8724\u871A\u8730\u8711\u88F7\u88E7\u88F1\u88F2\u88FA\u88FE\u88EE\u88FC\u88F6\u88FB"],["e440","\u88F0\u88EC\u88EB\u899D\u89A1\u899F\u899E\u89E9\u89EB\u89E8\u8AAB\u8A99\u8A8B\u8A92\u8A8F\u8A96\u8C3D\u8C68\u8C69\u8CD5\u8CCF\u8CD7\u8D96\u8E09\u8E02\u8DFF\u8E0D\u8DFD\u8E0A\u8E03\u8E07\u8E06\u8E05\u8DFE\u8E00\u8E04\u8F10\u8F11\u8F0E\u8F0D\u9123\u911C\u9120\u9122\u911F\u911D\u911A\u9124\u9121\u911B\u917A\u9172\u9179\u9173\u92A5\u92A4\u9276\u929B\u927A\u92A0\u9294\u92AA\u928D"],["e4a1","\u92A6\u929A\u92AB\u9279\u9297\u927F\u92A3\u92EE\u928E\u9282\u9295\u92A2\u927D\u9288\u92A1\u928A\u9286\u928C\u9299\u92A7\u927E\u9287\u92A9\u929D\u928B\u922D\u969E\u96A1\u96FF\u9758\u977D\u977A\u977E\u9783\u9780\u9782\u977B\u9784\u9781\u977F\u97CE\u97CD\u9816\u98AD\u98AE\u9902\u9900\u9907\u999D\u999C\u99C3\u99B9\u99BB\u99BA\u99C2\u99BD\u99C7\u9AB1\u9AE3\u9AE7\u9B3E\u9B3F\u9B60\u9B61\u9B5F\u9CF1\u9CF2\u9CF5\u9EA7\u50FF\u5103\u5130\u50F8\u5106\u5107\u50F6\u50FE\u510B\u510C\u50FD\u510A\u528B\u528C\u52F1\u52EF\u5648\u5642\u564C\u5635\u5641\u564A\u5649\u5646\u5658"],["e540","\u565A\u5640\u5633\u563D\u562C\u563E\u5638\u562A\u563A\u571A\u58AB\u589D\u58B1\u58A0\u58A3\u58AF\u58AC\u58A5\u58A1\u58FF\u5AFF\u5AF4\u5AFD\u5AF7\u5AF6\u5B03\u5AF8\u5B02\u5AF9\u5B01\u5B07\u5B05\u5B0F\u5C67\u5D99\u5D97\u5D9F\u5D92\u5DA2\u5D93\u5D95\u5DA0\u5D9C\u5DA1\u5D9A\u5D9E\u5E69\u5E5D\u5E60\u5E5C\u7DF3\u5EDB\u5EDE\u5EE1\u5F49\u5FB2\u618B\u6183\u6179\u61B1\u61B0\u61A2\u6189"],["e5a1","\u619B\u6193\u61AF\u61AD\u619F\u6192\u61AA\u61A1\u618D\u6166\u61B3\u622D\u646E\u6470\u6496\u64A0\u6485\u6497\u649C\u648F\u648B\u648A\u648C\u64A3\u649F\u6468\u64B1\u6498\u6576\u657A\u6579\u657B\u65B2\u65B3\u66B5\u66B0\u66A9\u66B2\u66B7\u66AA\u66AF\u6A00\u6A06\u6A17\u69E5\u69F8\u6A15\u69F1\u69E4\u6A20\u69FF\u69EC\u69E2\u6A1B\u6A1D\u69FE\u6A27\u69F2\u69EE\u6A14\u69F7\u69E7\u6A40\u6A08\u69E6\u69FB\u6A0D\u69FC\u69EB\u6A09\u6A04\u6A18\u6A25\u6A0F\u69F6\u6A26\u6A07\u69F4\u6A16\u6B51\u6BA5\u6BA3\u6BA2\u6BA6\u6C01\u6C00\u6BFF\u6C02\u6F41\u6F26\u6F7E\u6F87\u6FC6\u6F92"],["e640","\u6F8D\u6F89\u6F8C\u6F62\u6F4F\u6F85\u6F5A\u6F96\u6F76\u6F6C\u6F82\u6F55\u6F72\u6F52\u6F50\u6F57\u6F94\u6F93\u6F5D\u6F00\u6F61\u6F6B\u6F7D\u6F67\u6F90\u6F53\u6F8B\u6F69\u6F7F\u6F95\u6F63\u6F77\u6F6A\u6F7B\u71B2\u71AF\u719B\u71B0\u71A0\u719A\u71A9\u71B5\u719D\u71A5\u719E\u71A4\u71A1\u71AA\u719C\u71A7\u71B3\u7298\u729A\u7358\u7352\u735E\u735F\u7360\u735D\u735B\u7361\u735A\u7359"],["e6a1","\u7362\u7487\u7489\u748A\u7486\u7481\u747D\u7485\u7488\u747C\u7479\u7508\u7507\u757E\u7625\u761E\u7619\u761D\u761C\u7623\u761A\u7628\u761B\u769C\u769D\u769E\u769B\u778D\u778F\u7789\u7788\u78CD\u78BB\u78CF\u78CC\u78D1\u78CE\u78D4\u78C8\u78C3\u78C4\u78C9\u799A\u79A1\u79A0\u799C\u79A2\u799B\u6B76\u7A39\u7AB2\u7AB4\u7AB3\u7BB7\u7BCB\u7BBE\u7BAC\u7BCE\u7BAF\u7BB9\u7BCA\u7BB5\u7CC5\u7CC8\u7CCC\u7CCB\u7DF7\u7DDB\u7DEA\u7DE7\u7DD7\u7DE1\u7E03\u7DFA\u7DE6\u7DF6\u7DF1\u7DF0\u7DEE\u7DDF\u7F76\u7FAC\u7FB0\u7FAD\u7FED\u7FEB\u7FEA\u7FEC\u7FE6\u7FE8\u8064\u8067\u81A3\u819F"],["e740","\u819E\u8195\u81A2\u8199\u8197\u8216\u824F\u8253\u8252\u8250\u824E\u8251\u8524\u853B\u850F\u8500\u8529\u850E\u8509\u850D\u851F\u850A\u8527\u851C\u84FB\u852B\u84FA\u8508\u850C\u84F4\u852A\u84F2\u8515\u84F7\u84EB\u84F3\u84FC\u8512\u84EA\u84E9\u8516\u84FE\u8528\u851D\u852E\u8502\u84FD\u851E\u84F6\u8531\u8526\u84E7\u84E8\u84F0\u84EF\u84F9\u8518\u8520\u8530\u850B\u8519\u852F\u8662"],["e7a1","\u8756\u8763\u8764\u8777\u87E1\u8773\u8758\u8754\u875B\u8752\u8761\u875A\u8751\u875E\u876D\u876A\u8750\u874E\u875F\u875D\u876F\u876C\u877A\u876E\u875C\u8765\u874F\u877B\u8775\u8762\u8767\u8769\u885A\u8905\u890C\u8914\u890B\u8917\u8918\u8919\u8906\u8916\u8911\u890E\u8909\u89A2\u89A4\u89A3\u89ED\u89F0\u89EC\u8ACF\u8AC6\u8AB8\u8AD3\u8AD1\u8AD4\u8AD5\u8ABB\u8AD7\u8ABE\u8AC0\u8AC5\u8AD8\u8AC3\u8ABA\u8ABD\u8AD9\u8C3E\u8C4D\u8C8F\u8CE5\u8CDF\u8CD9\u8CE8\u8CDA\u8CDD\u8CE7\u8DA0\u8D9C\u8DA1\u8D9B\u8E20\u8E23\u8E25\u8E24\u8E2E\u8E15\u8E1B\u8E16\u8E11\u8E19\u8E26\u8E27"],["e840","\u8E14\u8E12\u8E18\u8E13\u8E1C\u8E17\u8E1A\u8F2C\u8F24\u8F18\u8F1A\u8F20\u8F23\u8F16\u8F17\u9073\u9070\u906F\u9067\u906B\u912F\u912B\u9129\u912A\u9132\u9126\u912E\u9185\u9186\u918A\u9181\u9182\u9184\u9180\u92D0\u92C3\u92C4\u92C0\u92D9\u92B6\u92CF\u92F1\u92DF\u92D8\u92E9\u92D7\u92DD\u92CC\u92EF\u92C2\u92E8\u92CA\u92C8\u92CE\u92E6\u92CD\u92D5\u92C9\u92E0\u92DE\u92E7\u92D1\u92D3"],["e8a1","\u92B5\u92E1\u92C6\u92B4\u957C\u95AC\u95AB\u95AE\u95B0\u96A4\u96A2\u96D3\u9705\u9708\u9702\u975A\u978A\u978E\u9788\u97D0\u97CF\u981E\u981D\u9826\u9829\u9828\u9820\u981B\u9827\u98B2\u9908\u98FA\u9911\u9914\u9916\u9917\u9915\u99DC\u99CD\u99CF\u99D3\u99D4\u99CE\u99C9\u99D6\u99D8\u99CB\u99D7\u99CC\u9AB3\u9AEC\u9AEB\u9AF3\u9AF2\u9AF1\u9B46\u9B43\u9B67\u9B74\u9B71\u9B66\u9B76\u9B75\u9B70\u9B68\u9B64\u9B6C\u9CFC\u9CFA\u9CFD\u9CFF\u9CF7\u9D07\u9D00\u9CF9\u9CFB\u9D08\u9D05\u9D04\u9E83\u9ED3\u9F0F\u9F10\u511C\u5113\u5117\u511A\u5111\u51DE\u5334\u53E1\u5670\u5660\u566E"],["e940","\u5673\u5666\u5663\u566D\u5672\u565E\u5677\u571C\u571B\u58C8\u58BD\u58C9\u58BF\u58BA\u58C2\u58BC\u58C6\u5B17\u5B19\u5B1B\u5B21\u5B14\u5B13\u5B10\u5B16\u5B28\u5B1A\u5B20\u5B1E\u5BEF\u5DAC\u5DB1\u5DA9\u5DA7\u5DB5\u5DB0\u5DAE\u5DAA\u5DA8\u5DB2\u5DAD\u5DAF\u5DB4\u5E67\u5E68\u5E66\u5E6F\u5EE9\u5EE7\u5EE6\u5EE8\u5EE5\u5F4B\u5FBC\u619D\u61A8\u6196\u61C5\u61B4\u61C6\u61C1\u61CC\u61BA"],["e9a1","\u61BF\u61B8\u618C\u64D7\u64D6\u64D0\u64CF\u64C9\u64BD\u6489\u64C3\u64DB\u64F3\u64D9\u6533\u657F\u657C\u65A2\u66C8\u66BE\u66C0\u66CA\u66CB\u66CF\u66BD\u66BB\u66BA\u66CC\u6723\u6A34\u6A66\u6A49\u6A67\u6A32\u6A68\u6A3E\u6A5D\u6A6D\u6A76\u6A5B\u6A51\u6A28\u6A5A\u6A3B\u6A3F\u6A41\u6A6A\u6A64\u6A50\u6A4F\u6A54\u6A6F\u6A69\u6A60\u6A3C\u6A5E\u6A56\u6A55\u6A4D\u6A4E\u6A46\u6B55\u6B54\u6B56\u6BA7\u6BAA\u6BAB\u6BC8\u6BC7\u6C04\u6C03\u6C06\u6FAD\u6FCB\u6FA3\u6FC7\u6FBC\u6FCE\u6FC8\u6F5E\u6FC4\u6FBD\u6F9E\u6FCA\u6FA8\u7004\u6FA5\u6FAE\u6FBA\u6FAC\u6FAA\u6FCF\u6FBF\u6FB8"],["ea40","\u6FA2\u6FC9\u6FAB\u6FCD\u6FAF\u6FB2\u6FB0\u71C5\u71C2\u71BF\u71B8\u71D6\u71C0\u71C1\u71CB\u71D4\u71CA\u71C7\u71CF\u71BD\u71D8\u71BC\u71C6\u71DA\u71DB\u729D\u729E\u7369\u7366\u7367\u736C\u7365\u736B\u736A\u747F\u749A\u74A0\u7494\u7492\u7495\u74A1\u750B\u7580\u762F\u762D\u7631\u763D\u7633\u763C\u7635\u7632\u7630\u76BB\u76E6\u779A\u779D\u77A1\u779C\u779B\u77A2\u77A3\u7795\u7799"],["eaa1","\u7797\u78DD\u78E9\u78E5\u78EA\u78DE\u78E3\u78DB\u78E1\u78E2\u78ED\u78DF\u78E0\u79A4\u7A44\u7A48\u7A47\u7AB6\u7AB8\u7AB5\u7AB1\u7AB7\u7BDE\u7BE3\u7BE7\u7BDD\u7BD5\u7BE5\u7BDA\u7BE8\u7BF9\u7BD4\u7BEA\u7BE2\u7BDC\u7BEB\u7BD8\u7BDF\u7CD2\u7CD4\u7CD7\u7CD0\u7CD1\u7E12\u7E21\u7E17\u7E0C\u7E1F\u7E20\u7E13\u7E0E\u7E1C\u7E15\u7E1A\u7E22\u7E0B\u7E0F\u7E16\u7E0D\u7E14\u7E25\u7E24\u7F43\u7F7B\u7F7C\u7F7A\u7FB1\u7FEF\u802A\u8029\u806C\u81B1\u81A6\u81AE\u81B9\u81B5\u81AB\u81B0\u81AC\u81B4\u81B2\u81B7\u81A7\u81F2\u8255\u8256\u8257\u8556\u8545\u856B\u854D\u8553\u8561\u8558"],["eb40","\u8540\u8546\u8564\u8541\u8562\u8544\u8551\u8547\u8563\u853E\u855B\u8571\u854E\u856E\u8575\u8555\u8567\u8560\u858C\u8566\u855D\u8554\u8565\u856C\u8663\u8665\u8664\u879B\u878F\u8797\u8793\u8792\u8788\u8781\u8796\u8798\u8779\u8787\u87A3\u8785\u8790\u8791\u879D\u8784\u8794\u879C\u879A\u8789\u891E\u8926\u8930\u892D\u892E\u8927\u8931\u8922\u8929\u8923\u892F\u892C\u891F\u89F1\u8AE0"],["eba1","\u8AE2\u8AF2\u8AF4\u8AF5\u8ADD\u8B14\u8AE4\u8ADF\u8AF0\u8AC8\u8ADE\u8AE1\u8AE8\u8AFF\u8AEF\u8AFB\u8C91\u8C92\u8C90\u8CF5\u8CEE\u8CF1\u8CF0\u8CF3\u8D6C\u8D6E\u8DA5\u8DA7\u8E33\u8E3E\u8E38\u8E40\u8E45\u8E36\u8E3C\u8E3D\u8E41\u8E30\u8E3F\u8EBD\u8F36\u8F2E\u8F35\u8F32\u8F39\u8F37\u8F34\u9076\u9079\u907B\u9086\u90FA\u9133\u9135\u9136\u9193\u9190\u9191\u918D\u918F\u9327\u931E\u9308\u931F\u9306\u930F\u937A\u9338\u933C\u931B\u9323\u9312\u9301\u9346\u932D\u930E\u930D\u92CB\u931D\u92FA\u9325\u9313\u92F9\u92F7\u9334\u9302\u9324\u92FF\u9329\u9339\u9335\u932A\u9314\u930C"],["ec40","\u930B\u92FE\u9309\u9300\u92FB\u9316\u95BC\u95CD\u95BE\u95B9\u95BA\u95B6\u95BF\u95B5\u95BD\u96A9\u96D4\u970B\u9712\u9710\u9799\u9797\u9794\u97F0\u97F8\u9835\u982F\u9832\u9924\u991F\u9927\u9929\u999E\u99EE\u99EC\u99E5\u99E4\u99F0\u99E3\u99EA\u99E9\u99E7\u9AB9\u9ABF\u9AB4\u9ABB\u9AF6\u9AFA\u9AF9\u9AF7\u9B33\u9B80\u9B85\u9B87\u9B7C\u9B7E\u9B7B\u9B82\u9B93\u9B92\u9B90\u9B7A\u9B95"],["eca1","\u9B7D\u9B88\u9D25\u9D17\u9D20\u9D1E\u9D14\u9D29\u9D1D\u9D18\u9D22\u9D10\u9D19\u9D1F\u9E88\u9E86\u9E87\u9EAE\u9EAD\u9ED5\u9ED6\u9EFA\u9F12\u9F3D\u5126\u5125\u5122\u5124\u5120\u5129\u52F4\u5693\u568C\u568D\u5686\u5684\u5683\u567E\u5682\u567F\u5681\u58D6\u58D4\u58CF\u58D2\u5B2D\u5B25\u5B32\u5B23\u5B2C\u5B27\u5B26\u5B2F\u5B2E\u5B7B\u5BF1\u5BF2\u5DB7\u5E6C\u5E6A\u5FBE\u5FBB\u61C3\u61B5\u61BC\u61E7\u61E0\u61E5\u61E4\u61E8\u61DE\u64EF\u64E9\u64E3\u64EB\u64E4\u64E8\u6581\u6580\u65B6\u65DA\u66D2\u6A8D\u6A96\u6A81\u6AA5\u6A89\u6A9F\u6A9B\u6AA1\u6A9E\u6A87\u6A93\u6A8E"],["ed40","\u6A95\u6A83\u6AA8\u6AA4\u6A91\u6A7F\u6AA6\u6A9A\u6A85\u6A8C\u6A92\u6B5B\u6BAD\u6C09\u6FCC\u6FA9\u6FF4\u6FD4\u6FE3\u6FDC\u6FED\u6FE7\u6FE6\u6FDE\u6FF2\u6FDD\u6FE2\u6FE8\u71E1\u71F1\u71E8\u71F2\u71E4\u71F0\u71E2\u7373\u736E\u736F\u7497\u74B2\u74AB\u7490\u74AA\u74AD\u74B1\u74A5\u74AF\u7510\u7511\u7512\u750F\u7584\u7643\u7648\u7649\u7647\u76A4\u76E9\u77B5\u77AB\u77B2\u77B7\u77B6"],["eda1","\u77B4\u77B1\u77A8\u77F0\u78F3\u78FD\u7902\u78FB\u78FC\u78F2\u7905\u78F9\u78FE\u7904\u79AB\u79A8\u7A5C\u7A5B\u7A56\u7A58\u7A54\u7A5A\u7ABE\u7AC0\u7AC1\u7C05\u7C0F\u7BF2\u7C00\u7BFF\u7BFB\u7C0E\u7BF4\u7C0B\u7BF3\u7C02\u7C09\u7C03\u7C01\u7BF8\u7BFD\u7C06\u7BF0\u7BF1\u7C10\u7C0A\u7CE8\u7E2D\u7E3C\u7E42\u7E33\u9848\u7E38\u7E2A\u7E49\u7E40\u7E47\u7E29\u7E4C\u7E30\u7E3B\u7E36\u7E44\u7E3A\u7F45\u7F7F\u7F7E\u7F7D\u7FF4\u7FF2\u802C\u81BB\u81C4\u81CC\u81CA\u81C5\u81C7\u81BC\u81E9\u825B\u825A\u825C\u8583\u8580\u858F\u85A7\u8595\u85A0\u858B\u85A3\u857B\u85A4\u859A\u859E"],["ee40","\u8577\u857C\u8589\u85A1\u857A\u8578\u8557\u858E\u8596\u8586\u858D\u8599\u859D\u8581\u85A2\u8582\u8588\u8585\u8579\u8576\u8598\u8590\u859F\u8668\u87BE\u87AA\u87AD\u87C5\u87B0\u87AC\u87B9\u87B5\u87BC\u87AE\u87C9\u87C3\u87C2\u87CC\u87B7\u87AF\u87C4\u87CA\u87B4\u87B6\u87BF\u87B8\u87BD\u87DE\u87B2\u8935\u8933\u893C\u893E\u8941\u8952\u8937\u8942\u89AD\u89AF\u89AE\u89F2\u89F3\u8B1E"],["eea1","\u8B18\u8B16\u8B11\u8B05\u8B0B\u8B22\u8B0F\u8B12\u8B15\u8B07\u8B0D\u8B08\u8B06\u8B1C\u8B13\u8B1A\u8C4F\u8C70\u8C72\u8C71\u8C6F\u8C95\u8C94\u8CF9\u8D6F\u8E4E\u8E4D\u8E53\u8E50\u8E4C\u8E47\u8F43\u8F40\u9085\u907E\u9138\u919A\u91A2\u919B\u9199\u919F\u91A1\u919D\u91A0\u93A1\u9383\u93AF\u9364\u9356\u9347\u937C\u9358\u935C\u9376\u9349\u9350\u9351\u9360\u936D\u938F\u934C\u936A\u9379\u9357\u9355\u9352\u934F\u9371\u9377\u937B\u9361\u935E\u9363\u9367\u9380\u934E\u9359\u95C7\u95C0\u95C9\u95C3\u95C5\u95B7\u96AE\u96B0\u96AC\u9720\u971F\u9718\u971D\u9719\u979A\u97A1\u979C"],["ef40","\u979E\u979D\u97D5\u97D4\u97F1\u9841\u9844\u984A\u9849\u9845\u9843\u9925\u992B\u992C\u992A\u9933\u9932\u992F\u992D\u9931\u9930\u9998\u99A3\u99A1\u9A02\u99FA\u99F4\u99F7\u99F9\u99F8\u99F6\u99FB\u99FD\u99FE\u99FC\u9A03\u9ABE\u9AFE\u9AFD\u9B01\u9AFC\u9B48\u9B9A\u9BA8\u9B9E\u9B9B\u9BA6\u9BA1\u9BA5\u9BA4\u9B86\u9BA2\u9BA0\u9BAF\u9D33\u9D41\u9D67\u9D36\u9D2E\u9D2F\u9D31\u9D38\u9D30"],["efa1","\u9D45\u9D42\u9D43\u9D3E\u9D37\u9D40\u9D3D\u7FF5\u9D2D\u9E8A\u9E89\u9E8D\u9EB0\u9EC8\u9EDA\u9EFB\u9EFF\u9F24\u9F23\u9F22\u9F54\u9FA0\u5131\u512D\u512E\u5698\u569C\u5697\u569A\u569D\u5699\u5970\u5B3C\u5C69\u5C6A\u5DC0\u5E6D\u5E6E\u61D8\u61DF\u61ED\u61EE\u61F1\u61EA\u61F0\u61EB\u61D6\u61E9\u64FF\u6504\u64FD\u64F8\u6501\u6503\u64FC\u6594\u65DB\u66DA\u66DB\u66D8\u6AC5\u6AB9\u6ABD\u6AE1\u6AC6\u6ABA\u6AB6\u6AB7\u6AC7\u6AB4\u6AAD\u6B5E\u6BC9\u6C0B\u7007\u700C\u700D\u7001\u7005\u7014\u700E\u6FFF\u7000\u6FFB\u7026\u6FFC\u6FF7\u700A\u7201\u71FF\u71F9\u7203\u71FD\u7376"],["f040","\u74B8\u74C0\u74B5\u74C1\u74BE\u74B6\u74BB\u74C2\u7514\u7513\u765C\u7664\u7659\u7650\u7653\u7657\u765A\u76A6\u76BD\u76EC\u77C2\u77BA\u78FF\u790C\u7913\u7914\u7909\u7910\u7912\u7911\u79AD\u79AC\u7A5F\u7C1C\u7C29\u7C19\u7C20\u7C1F\u7C2D\u7C1D\u7C26\u7C28\u7C22\u7C25\u7C30\u7E5C\u7E50\u7E56\u7E63\u7E58\u7E62\u7E5F\u7E51\u7E60\u7E57\u7E53\u7FB5\u7FB3\u7FF7\u7FF8\u8075\u81D1\u81D2"],["f0a1","\u81D0\u825F\u825E\u85B4\u85C6\u85C0\u85C3\u85C2\u85B3\u85B5\u85BD\u85C7\u85C4\u85BF\u85CB\u85CE\u85C8\u85C5\u85B1\u85B6\u85D2\u8624\u85B8\u85B7\u85BE\u8669\u87E7\u87E6\u87E2\u87DB\u87EB\u87EA\u87E5\u87DF\u87F3\u87E4\u87D4\u87DC\u87D3\u87ED\u87D8\u87E3\u87A4\u87D7\u87D9\u8801\u87F4\u87E8\u87DD\u8953\u894B\u894F\u894C\u8946\u8950\u8951\u8949\u8B2A\u8B27\u8B23\u8B33\u8B30\u8B35\u8B47\u8B2F\u8B3C\u8B3E\u8B31\u8B25\u8B37\u8B26\u8B36\u8B2E\u8B24\u8B3B\u8B3D\u8B3A\u8C42\u8C75\u8C99\u8C98\u8C97\u8CFE\u8D04\u8D02\u8D00\u8E5C\u8E62\u8E60\u8E57\u8E56\u8E5E\u8E65\u8E67"],["f140","\u8E5B\u8E5A\u8E61\u8E5D\u8E69\u8E54\u8F46\u8F47\u8F48\u8F4B\u9128\u913A\u913B\u913E\u91A8\u91A5\u91A7\u91AF\u91AA\u93B5\u938C\u9392\u93B7\u939B\u939D\u9389\u93A7\u938E\u93AA\u939E\u93A6\u9395\u9388\u9399\u939F\u938D\u93B1\u9391\u93B2\u93A4\u93A8\u93B4\u93A3\u93A5\u95D2\u95D3\u95D1\u96B3\u96D7\u96DA\u5DC2\u96DF\u96D8\u96DD\u9723\u9722\u9725\u97AC\u97AE\u97A8\u97AB\u97A4\u97AA"],["f1a1","\u97A2\u97A5\u97D7\u97D9\u97D6\u97D8\u97FA\u9850\u9851\u9852\u98B8\u9941\u993C\u993A\u9A0F\u9A0B\u9A09\u9A0D\u9A04\u9A11\u9A0A\u9A05\u9A07\u9A06\u9AC0\u9ADC\u9B08\u9B04\u9B05\u9B29\u9B35\u9B4A\u9B4C\u9B4B\u9BC7\u9BC6\u9BC3\u9BBF\u9BC1\u9BB5\u9BB8\u9BD3\u9BB6\u9BC4\u9BB9\u9BBD\u9D5C\u9D53\u9D4F\u9D4A\u9D5B\u9D4B\u9D59\u9D56\u9D4C\u9D57\u9D52\u9D54\u9D5F\u9D58\u9D5A\u9E8E\u9E8C\u9EDF\u9F01\u9F00\u9F16\u9F25\u9F2B\u9F2A\u9F29\u9F28\u9F4C\u9F55\u5134\u5135\u5296\u52F7\u53B4\u56AB\u56AD\u56A6\u56A7\u56AA\u56AC\u58DA\u58DD\u58DB\u5912\u5B3D\u5B3E\u5B3F\u5DC3\u5E70"],["f240","\u5FBF\u61FB\u6507\u6510\u650D\u6509\u650C\u650E\u6584\u65DE\u65DD\u66DE\u6AE7\u6AE0\u6ACC\u6AD1\u6AD9\u6ACB\u6ADF\u6ADC\u6AD0\u6AEB\u6ACF\u6ACD\u6ADE\u6B60\u6BB0\u6C0C\u7019\u7027\u7020\u7016\u702B\u7021\u7022\u7023\u7029\u7017\u7024\u701C\u702A\u720C\u720A\u7207\u7202\u7205\u72A5\u72A6\u72A4\u72A3\u72A1\u74CB\u74C5\u74B7\u74C3\u7516\u7660\u77C9\u77CA\u77C4\u77F1\u791D\u791B"],["f2a1","\u7921\u791C\u7917\u791E\u79B0\u7A67\u7A68\u7C33\u7C3C\u7C39\u7C2C\u7C3B\u7CEC\u7CEA\u7E76\u7E75\u7E78\u7E70\u7E77\u7E6F\u7E7A\u7E72\u7E74\u7E68\u7F4B\u7F4A\u7F83\u7F86\u7FB7\u7FFD\u7FFE\u8078\u81D7\u81D5\u8264\u8261\u8263\u85EB\u85F1\u85ED\u85D9\u85E1\u85E8\u85DA\u85D7\u85EC\u85F2\u85F8\u85D8\u85DF\u85E3\u85DC\u85D1\u85F0\u85E6\u85EF\u85DE\u85E2\u8800\u87FA\u8803\u87F6\u87F7\u8809\u880C\u880B\u8806\u87FC\u8808\u87FF\u880A\u8802\u8962\u895A\u895B\u8957\u8961\u895C\u8958\u895D\u8959\u8988\u89B7\u89B6\u89F6\u8B50\u8B48\u8B4A\u8B40\u8B53\u8B56\u8B54\u8B4B\u8B55"],["f340","\u8B51\u8B42\u8B52\u8B57\u8C43\u8C77\u8C76\u8C9A\u8D06\u8D07\u8D09\u8DAC\u8DAA\u8DAD\u8DAB\u8E6D\u8E78\u8E73\u8E6A\u8E6F\u8E7B\u8EC2\u8F52\u8F51\u8F4F\u8F50\u8F53\u8FB4\u9140\u913F\u91B0\u91AD\u93DE\u93C7\u93CF\u93C2\u93DA\u93D0\u93F9\u93EC\u93CC\u93D9\u93A9\u93E6\u93CA\u93D4\u93EE\u93E3\u93D5\u93C4\u93CE\u93C0\u93D2\u93E7\u957D\u95DA\u95DB\u96E1\u9729\u972B\u972C\u9728\u9726"],["f3a1","\u97B3\u97B7\u97B6\u97DD\u97DE\u97DF\u985C\u9859\u985D\u9857\u98BF\u98BD\u98BB\u98BE\u9948\u9947\u9943\u99A6\u99A7\u9A1A\u9A15\u9A25\u9A1D\u9A24\u9A1B\u9A22\u9A20\u9A27\u9A23\u9A1E\u9A1C\u9A14\u9AC2\u9B0B\u9B0A\u9B0E\u9B0C\u9B37\u9BEA\u9BEB\u9BE0\u9BDE\u9BE4\u9BE6\u9BE2\u9BF0\u9BD4\u9BD7\u9BEC\u9BDC\u9BD9\u9BE5\u9BD5\u9BE1\u9BDA\u9D77\u9D81\u9D8A\u9D84\u9D88\u9D71\u9D80\u9D78\u9D86\u9D8B\u9D8C\u9D7D\u9D6B\u9D74\u9D75\u9D70\u9D69\u9D85\u9D73\u9D7B\u9D82\u9D6F\u9D79\u9D7F\u9D87\u9D68\u9E94\u9E91\u9EC0\u9EFC\u9F2D\u9F40\u9F41\u9F4D\u9F56\u9F57\u9F58\u5337\u56B2"],["f440","\u56B5\u56B3\u58E3\u5B45\u5DC6\u5DC7\u5EEE\u5EEF\u5FC0\u5FC1\u61F9\u6517\u6516\u6515\u6513\u65DF\u66E8\u66E3\u66E4\u6AF3\u6AF0\u6AEA\u6AE8\u6AF9\u6AF1\u6AEE\u6AEF\u703C\u7035\u702F\u7037\u7034\u7031\u7042\u7038\u703F\u703A\u7039\u7040\u703B\u7033\u7041\u7213\u7214\u72A8\u737D\u737C\u74BA\u76AB\u76AA\u76BE\u76ED\u77CC\u77CE\u77CF\u77CD\u77F2\u7925\u7923\u7927\u7928\u7924\u7929"],["f4a1","\u79B2\u7A6E\u7A6C\u7A6D\u7AF7\u7C49\u7C48\u7C4A\u7C47\u7C45\u7CEE\u7E7B\u7E7E\u7E81\u7E80\u7FBA\u7FFF\u8079\u81DB\u81D9\u820B\u8268\u8269\u8622\u85FF\u8601\u85FE\u861B\u8600\u85F6\u8604\u8609\u8605\u860C\u85FD\u8819\u8810\u8811\u8817\u8813\u8816\u8963\u8966\u89B9\u89F7\u8B60\u8B6A\u8B5D\u8B68\u8B63\u8B65\u8B67\u8B6D\u8DAE\u8E86\u8E88\u8E84\u8F59\u8F56\u8F57\u8F55\u8F58\u8F5A\u908D\u9143\u9141\u91B7\u91B5\u91B2\u91B3\u940B\u9413\u93FB\u9420\u940F\u9414\u93FE\u9415\u9410\u9428\u9419\u940D\u93F5\u9400\u93F7\u9407\u940E\u9416\u9412\u93FA\u9409\u93F8\u940A\u93FF"],["f540","\u93FC\u940C\u93F6\u9411\u9406\u95DE\u95E0\u95DF\u972E\u972F\u97B9\u97BB\u97FD\u97FE\u9860\u9862\u9863\u985F\u98C1\u98C2\u9950\u994E\u9959\u994C\u994B\u9953\u9A32\u9A34\u9A31\u9A2C\u9A2A\u9A36\u9A29\u9A2E\u9A38\u9A2D\u9AC7\u9ACA\u9AC6\u9B10\u9B12\u9B11\u9C0B\u9C08\u9BF7\u9C05\u9C12\u9BF8\u9C40\u9C07\u9C0E\u9C06\u9C17\u9C14\u9C09\u9D9F\u9D99\u9DA4\u9D9D\u9D92\u9D98\u9D90\u9D9B"],["f5a1","\u9DA0\u9D94\u9D9C\u9DAA\u9D97\u9DA1\u9D9A\u9DA2\u9DA8\u9D9E\u9DA3\u9DBF\u9DA9\u9D96\u9DA6\u9DA7\u9E99\u9E9B\u9E9A\u9EE5\u9EE4\u9EE7\u9EE6\u9F30\u9F2E\u9F5B\u9F60\u9F5E\u9F5D\u9F59\u9F91\u513A\u5139\u5298\u5297\u56C3\u56BD\u56BE\u5B48\u5B47\u5DCB\u5DCF\u5EF1\u61FD\u651B\u6B02\u6AFC\u6B03\u6AF8\u6B00\u7043\u7044\u704A\u7048\u7049\u7045\u7046\u721D\u721A\u7219\u737E\u7517\u766A\u77D0\u792D\u7931\u792F\u7C54\u7C53\u7CF2\u7E8A\u7E87\u7E88\u7E8B\u7E86\u7E8D\u7F4D\u7FBB\u8030\u81DD\u8618\u862A\u8626\u861F\u8623\u861C\u8619\u8627\u862E\u8621\u8620\u8629\u861E\u8625"],["f640","\u8829\u881D\u881B\u8820\u8824\u881C\u882B\u884A\u896D\u8969\u896E\u896B\u89FA\u8B79\u8B78\u8B45\u8B7A\u8B7B\u8D10\u8D14\u8DAF\u8E8E\u8E8C\u8F5E\u8F5B\u8F5D\u9146\u9144\u9145\u91B9\u943F\u943B\u9436\u9429\u943D\u943C\u9430\u9439\u942A\u9437\u942C\u9440\u9431\u95E5\u95E4\u95E3\u9735\u973A\u97BF\u97E1\u9864\u98C9\u98C6\u98C0\u9958\u9956\u9A39\u9A3D\u9A46\u9A44\u9A42\u9A41\u9A3A"],["f6a1","\u9A3F\u9ACD\u9B15\u9B17\u9B18\u9B16\u9B3A\u9B52\u9C2B\u9C1D\u9C1C\u9C2C\u9C23\u9C28\u9C29\u9C24\u9C21\u9DB7\u9DB6\u9DBC\u9DC1\u9DC7\u9DCA\u9DCF\u9DBE\u9DC5\u9DC3\u9DBB\u9DB5\u9DCE\u9DB9\u9DBA\u9DAC\u9DC8\u9DB1\u9DAD\u9DCC\u9DB3\u9DCD\u9DB2\u9E7A\u9E9C\u9EEB\u9EEE\u9EED\u9F1B\u9F18\u9F1A\u9F31\u9F4E\u9F65\u9F64\u9F92\u4EB9\u56C6\u56C5\u56CB\u5971\u5B4B\u5B4C\u5DD5\u5DD1\u5EF2\u6521\u6520\u6526\u6522\u6B0B\u6B08\u6B09\u6C0D\u7055\u7056\u7057\u7052\u721E\u721F\u72A9\u737F\u74D8\u74D5\u74D9\u74D7\u766D\u76AD\u7935\u79B4\u7A70\u7A71\u7C57\u7C5C\u7C59\u7C5B\u7C5A"],["f740","\u7CF4\u7CF1\u7E91\u7F4F\u7F87\u81DE\u826B\u8634\u8635\u8633\u862C\u8632\u8636\u882C\u8828\u8826\u882A\u8825\u8971\u89BF\u89BE\u89FB\u8B7E\u8B84\u8B82\u8B86\u8B85\u8B7F\u8D15\u8E95\u8E94\u8E9A\u8E92\u8E90\u8E96\u8E97\u8F60\u8F62\u9147\u944C\u9450\u944A\u944B\u944F\u9447\u9445\u9448\u9449\u9446\u973F\u97E3\u986A\u9869\u98CB\u9954\u995B\u9A4E\u9A53\u9A54\u9A4C\u9A4F\u9A48\u9A4A"],["f7a1","\u9A49\u9A52\u9A50\u9AD0\u9B19\u9B2B\u9B3B\u9B56\u9B55\u9C46\u9C48\u9C3F\u9C44\u9C39\u9C33\u9C41\u9C3C\u9C37\u9C34\u9C32\u9C3D\u9C36\u9DDB\u9DD2\u9DDE\u9DDA\u9DCB\u9DD0\u9DDC\u9DD1\u9DDF\u9DE9\u9DD9\u9DD8\u9DD6\u9DF5\u9DD5\u9DDD\u9EB6\u9EF0\u9F35\u9F33\u9F32\u9F42\u9F6B\u9F95\u9FA2\u513D\u5299\u58E8\u58E7\u5972\u5B4D\u5DD8\u882F\u5F4F\u6201\u6203\u6204\u6529\u6525\u6596\u66EB\u6B11\u6B12\u6B0F\u6BCA\u705B\u705A\u7222\u7382\u7381\u7383\u7670\u77D4\u7C67\u7C66\u7E95\u826C\u863A\u8640\u8639\u863C\u8631\u863B\u863E\u8830\u8832\u882E\u8833\u8976\u8974\u8973\u89FE"],["f840","\u8B8C\u8B8E\u8B8B\u8B88\u8C45\u8D19\u8E98\u8F64\u8F63\u91BC\u9462\u9455\u945D\u9457\u945E\u97C4\u97C5\u9800\u9A56\u9A59\u9B1E\u9B1F\u9B20\u9C52\u9C58\u9C50\u9C4A\u9C4D\u9C4B\u9C55\u9C59\u9C4C\u9C4E\u9DFB\u9DF7\u9DEF\u9DE3\u9DEB\u9DF8\u9DE4\u9DF6\u9DE1\u9DEE\u9DE6\u9DF2\u9DF0\u9DE2\u9DEC\u9DF4\u9DF3\u9DE8\u9DED\u9EC2\u9ED0\u9EF2\u9EF3\u9F06\u9F1C\u9F38\u9F37\u9F36\u9F43\u9F4F"],["f8a1","\u9F71\u9F70\u9F6E\u9F6F\u56D3\u56CD\u5B4E\u5C6D\u652D\u66ED\u66EE\u6B13\u705F\u7061\u705D\u7060\u7223\u74DB\u74E5\u77D5\u7938\u79B7\u79B6\u7C6A\u7E97\u7F89\u826D\u8643\u8838\u8837\u8835\u884B\u8B94\u8B95\u8E9E\u8E9F\u8EA0\u8E9D\u91BE\u91BD\u91C2\u946B\u9468\u9469\u96E5\u9746\u9743\u9747\u97C7\u97E5\u9A5E\u9AD5\u9B59\u9C63\u9C67\u9C66\u9C62\u9C5E\u9C60\u9E02\u9DFE\u9E07\u9E03\u9E06\u9E05\u9E00\u9E01\u9E09\u9DFF\u9DFD\u9E04\u9EA0\u9F1E\u9F46\u9F74\u9F75\u9F76\u56D4\u652E\u65B8\u6B18\u6B19\u6B17\u6B1A\u7062\u7226\u72AA\u77D8\u77D9\u7939\u7C69\u7C6B\u7CF6\u7E9A"],["f940","\u7E98\u7E9B\u7E99\u81E0\u81E1\u8646\u8647\u8648\u8979\u897A\u897C\u897B\u89FF\u8B98\u8B99\u8EA5\u8EA4\u8EA3\u946E\u946D\u946F\u9471\u9473\u9749\u9872\u995F\u9C68\u9C6E\u9C6D\u9E0B\u9E0D\u9E10\u9E0F\u9E12\u9E11\u9EA1\u9EF5\u9F09\u9F47\u9F78\u9F7B\u9F7A\u9F79\u571E\u7066\u7C6F\u883C\u8DB2\u8EA6\u91C3\u9474\u9478\u9476\u9475\u9A60\u9C74\u9C73\u9C71\u9C75\u9E14\u9E13\u9EF6\u9F0A"],["f9a1","\u9FA4\u7068\u7065\u7CF7\u866A\u883E\u883D\u883F\u8B9E\u8C9C\u8EA9\u8EC9\u974B\u9873\u9874\u98CC\u9961\u99AB\u9A64\u9A66\u9A67\u9B24\u9E15\u9E17\u9F48\u6207\u6B1E\u7227\u864C\u8EA8\u9482\u9480\u9481\u9A69\u9A68\u9B2E\u9E19\u7229\u864B\u8B9F\u9483\u9C79\u9EB7\u7675\u9A6B\u9C7A\u9E1D\u7069\u706A\u9EA4\u9F7E\u9F49\u9F98\u7881\u92B9\u88CF\u58BB\u6052\u7CA7\u5AFA\u2554\u2566\u2557\u2560\u256C\u2563\u255A\u2569\u255D\u2552\u2564\u2555\u255E\u256A\u2561\u2558\u2567\u255B\u2553\u2565\u2556\u255F\u256B\u2562\u2559\u2568\u255C\u2551\u2550\u256D\u256E\u2570\u256F\u2593"]]});var hA4=o((kM$,IV9)=>{IV9.exports=[["8740","\u43F0\u4C32\u4603\u45A6\u4578\uD85C\uDE67\u4D77\u45B3\uD85F\uDCB1\u4CE2\uD85F\uDCC5\u3B95\u4736\u4744\u4C47\u4C40\uD850\uDEBF\uD84D\uDE17\uD85C\uDF52\uD85B\uDE8B\uD85C\uDCD2\u4C57\uD868\uDF51\u474F\u45DA\u4C85\uD85F\uDC6C\u4D07\u4AA4\u46A1\uD85A\uDF23\u7225\uD856\uDE54\uD846\uDE63\uD84F\uDE06\uD84F\uDF61\u664D\u56FB"],["8767","\u7D95\u591D\uD862\uDFB9\u3DF4\u9734\uD85E\uDFEF\u5BDB\uD847\uDD5E\u5AA4\u3625\uD867\uDEB0\u5AD1\u5BB7\u5CFC\u676E\u8593\uD866\uDD45\u7461\u749D\u3875\uD847\uDD53\uD84D\uDE9E\uD858\uDC21\u3EEC"],["87a1","\uD856\uDCDE\u3AF5\u7AFC\u9F97\uD850\uDD61\uD862\uDD0D\uD84C\uDDEA\uD842\uDE8A\uD84C\uDE5E\u430A\u8484\u9F96\u942F\u4930\u8613\u5896\u974A\u9218\u79D0\u7A32\u6660\u6A29\u889D\u744C\u7BC5\u6782\u7A2C\u524F\u9046\u34E6\u73C4\uD857\uDDB9\u74C6\u9FC7\u57B3\u492F\u544C\u4131\uD84D\uDE8E\u5818\u7A72\uD85E\uDF65\u8B8F\u46AE\uD85B\uDE88\u4181\uD857\uDD99\u7BAE\uD849\uDCBC\u9FC8\uD849\uDCC1\uD849\uDCC9\uD849\uDCCC\u9FC9\u8504\uD84D\uDDBB\u40B4\u9FCA\u44E1\uD86B\uDDFF\u62C1\u706E\u9FCB"],["8840","\u31C0",4,"\uD840\uDD0C\u31C5\uD840\uDCD1\uD840\uDCCD\u31C6\u31C7\uD840\uDCCB\uD847\uDFE8\u31C8\uD840\uDCCA\u31C9\u31CA\u31CB\u31CC\uD840\uDD0E\u31CD\u31CE\u0100\xC1\u01CD\xC0\u0112\xC9\u011A\xC8\u014C\xD3\u01D1\xD2\u0FFF\xCA\u0304\u1EBE\u0FFF\xCA\u030C\u1EC0\xCA\u0101\xE1\u01CE\xE0\u0251\u0113\xE9\u011B\xE8\u012B\xED\u01D0\xEC\u014D\xF3\u01D2\xF2\u016B\xFA\u01D4\xF9\u01D6\u01D8\u01DA"],["88a1","\u01DC\xFC\u0FFF\xEA\u0304\u1EBF\u0FFF\xEA\u030C\u1EC1\xEA\u0261\u23DA\u23DB"],["8940","\uD868\uDFA9\uD844\uDD45"],["8943","\u650A"],["8946","\u4E3D\u6EDD\u9D4E\u91DF"],["894c","\uD85D\uDF35\u6491\u4F1A\u4F28\u4FA8\u5156\u5174\u519C\u51E4\u52A1\u52A8\u533B\u534E\u53D1\u53D8\u56E2\u58F0\u5904\u5907\u5932\u5934\u5B66\u5B9E\u5B9F\u5C9A\u5E86\u603B\u6589\u67FE\u6804\u6865\u6D4E\u70BC\u7535\u7EA4\u7EAC\u7EBA\u7EC7\u7ECF\u7EDF\u7F06\u7F37\u827A\u82CF\u836F\u89C6\u8BBE\u8BE2\u8F66\u8F67\u8F6E"],["89a1","\u7411\u7CFC\u7DCD\u6946\u7AC9\u5227"],["89ab","\u918C\u78B8\u915E\u80BC"],["89b0","\u8D0B\u80F6\uD842\uDDE7"],["89b5","\u809F\u9EC7\u4CCD\u9DC9\u9E0C\u4C3E\uD867\uDDF6\uD85C\uDC0E\u9E0A\uD868\uDD33\u35C1"],["89c1","\u6E9A\u823E\u7519"],["89c5","\u4911\u9A6C\u9A8F\u9F99\u7987\uD861\uDC6C\uD847\uDDCA\uD841\uDDD0\uD84A\uDEE6\u4E24\u4E81\u4E80\u4E87\u4EBF\u4EEB\u4F37\u344C\u4FBD\u3E48\u5003\u5088\u347D\u3493\u34A5\u5186\u5905\u51DB\u51FC\u5205\u4E89\u5279\u5290\u5327\u35C7\u53A9\u3551\u53B0\u3553\u53C2\u5423\u356D\u3572\u3681\u5493\u54A3\u54B4\u54B9\u54D0\u54EF\u5518\u5523\u5528\u3598\u553F\u35A5\u35BF\u55D7\u35C5"],["8a40","\uD85F\uDD84\u5525"],["8a43","\uD843\uDC42\uD843\uDD15\uD854\uDD2B\u5590\uD84B\uDCC6\u39EC\uD840\uDF41\u8E46\uD853\uDDB8\uD865\uDCE5\u4053\uD860\uDCBE\u777A\uD84B\uDC38\u3A34\u47D5\uD860\uDD5D\uD85A\uDDF2\uD853\uDDEA\u64DD\uD843\uDD7C\uD843\uDFB4\uD843\uDCD5\uD844\uDCF4\u648D\u8E7E\uD843\uDE96\uD843\uDC0B\uD843\uDF64\uD84B\uDCA9\uD860\uDE56\uD851\uDCD3"],["8a64","\uD843\uDD46\uD866\uDE4D\uD860\uDCE9\u47F4\uD853\uDEA7\uD84B\uDCC2\u9AB2\u3A67\uD865\uDDF4\u3FED\u3506\uD854\uDEC7\uD865\uDFD4\uD85E\uDCC8\uD84B\uDD44\u9D6E\u9815"],["8a76","\u43D9\uD858\uDCA5\u64B4\u54E3\uD84B\uDD4C\uD84A\uDFCA\uD844\uDC77\u39FB\uD844\uDC6F"],["8aa1","\uD859\uDEDA\uD859\uDF16\uD85E\uDDA0\u64EA\uD854\uDC52\uD843\uDC43\u8E68\uD848\uDDA1\uD862\uDF4C\uD841\uDF31"],["8aac","\u480B\uD840\uDDA9\u3FFA\u5873\uD84B\uDD8D"],["8ab2","\uD851\uDDC8\uD841\uDCFC\uD858\uDC97\uD843\uDF4C\uD843\uDD96\u5579\u40BB\u43BA"],["8abb","\u4AB4\uD84A\uDE66\uD844\uDC9D\u81AA\u98F5\uD843\uDD9C\u6379\u39FE\uD849\uDF75\u8DC0\u56A1\u647C\u3E43"],["8ac9","\uD869\uDE01\uD843\uDE09\uD84A\uDECF\uD84B\uDCC9"],["8ace","\uD844\uDCC8\uD84E\uDDC2\u3992\u3A06\uD860\uDE9B\u3578\uD857\uDE49\uD848\uDCC7\u5652\uD843\uDF31\uD84B\uDCB2\uD865\uDF20\u34BC\u6C3D\uD853\uDE3B"],["8adf","\uD85D\uDD74\uD84B\uDE8B\uD848\uDE08\uD869\uDE5B\uD863\uDCCD\uD843\uDE7A\uD843\uDC34\uD85A\uDC1C\u7F93\uD844\uDCCF\uD84A\uDC03\uD84A\uDD39\u35FB\uD854\uDDE3\uD843\uDE8C\uD843\uDF8D\uD843\uDEAA\u3F93\uD843\uDF30\uD843\uDD47\uD844\uDD4F\uD843\uDE4C"],["8af6","\uD843\uDEAB\uD842\uDFA9\uD843\uDD48\uD844\uDCC0\uD844\uDD3D\u3FF9\uD849\uDE96\u6432\uD843\uDFAD"],["8b40","\uD84C\uDFF4\uD85D\uDE39\uD84A\uDFCE\uD843\uDD7E\uD843\uDD7F\uD84B\uDC51\uD84B\uDC55\u3A18\uD843\uDE98\uD844\uDCC7\uD843\uDF2E\uD869\uDE32\uD85A\uDF50\uD863\uDCD2\uD863\uDD99\uD863\uDCCA\u95AA\u54CC\u82C4\u55B9"],["8b55","\uD867\uDEC3\u9C26\u9AB6\uD85D\uDF5E\uD84B\uDDEE\u7140\u816D\u80EC\u5C1C\uD859\uDD72\u8134\u3797\u535F\uD860\uDCBD\u91B6\uD843\uDEFA\uD843\uDE0F\uD843\uDE77\uD843\uDEFB\u35DD\uD853\uDDEB\u3609\uD843\uDCD6\u56AF\uD849\uDFB5\uD844\uDCC9\uD843\uDE10\uD843\uDE78\uD844\uDC78\uD844\uDD48\uD860\uDE07\uD845\uDC55\uD843\uDE79\uD853\uDE50\uD84B\uDDA4\u5A54\uD844\uDC1D\uD844\uDC1E\uD844\uDCF5\uD844\uDCF6\u579C\uD843\uDE11"],["8ba1","\uD85D\uDE94\uD860\uDECD\uD843\uDFB5\uD843\uDE7B\uD854\uDD7E\u3703\uD843\uDFB6\uD844\uDD80\uD854\uDED8\uD868\uDEBD\uD852\uDDDA\uD846\uDC3A\uD850\uDD77\uD860\uDE7C\u5899\u5268\u361A\uD855\uDF3D\u7BB2\u5B68\u4800\u4B2C\u9F27\u49E7\u9C1F\u9B8D\uD856\uDF74\uD84C\uDD3D\u55FB\u35F2\u5689\u4E28\u5902\uD846\uDFC1\uD87E\uDC78\u9751\uD840\uDC86\u4E5B\u4EBB\u353E\u5C23\u5F51\u5FC4\u38FA\u624C\u6535\u6B7A\u6C35\u6C3A\u706C\u722B\u4E2C\u72AD\uD852\uDCE9\u7F52\u793B\u7CF9\u7F53\uD858\uDE6A\u34C1"],["8bde","\uD858\uDF4B\u8002\u8080\uD859\uDE12\uD85A\uDD51\u535D\u8864\u89C1\uD85E\uDCB2\u8BA0\u8D1D\u9485\u9578\u957F\u95E8\uD863\uDE0F\u97E6\u9875\u98CE\u98DE\u9963\uD866\uDC10\u9C7C\u9E1F\u9EC4\u6B6F\uF907\u4E37\uD840\uDC87\u961D\u6237\u94A2"],["8c40","\u503B\u6DFE\uD867\uDC73\u9FA6\u3DC9\u888F\uD850\uDD4E\u7077\u5CF5\u4B20\uD854\uDDCD\u3559\uD857\uDD30\u6122\uD862\uDE32\u8FA7\u91F6\u7191\u6719\u73BA\uD84C\uDE81\uD868\uDD07\u3C8B\uD846\uDD80\u4B10\u78E4\u7402\u51AE\uD861\uDF0F\u4009\u6A63\uD868\uDEBA\u4223\u860F\uD842\uDE6F\u7A2A\uD866\uDD47\uD862\uDEEA\u9755\u704D\u5324\uD848\uDC7E\u93F4\u76D9\uD862\uDDE3\u9FA7\u77DD\u4EA3\u4FF0\u50BC\u4E2F\u4F17\u9FA8\u5434\u7D8B\u5892\u58D0\uD847\uDDB6\u5E92\u5E99\u5FC2\uD849\uDF12\u658B"],["8ca1","\uD84C\uDFF9\u6919\u6A43\uD84F\uDC63\u6CFF"],["8ca7","\u7200\uD851\uDD05\u738C\u3EDB\uD852\uDE13\u5B15\u74B9\u8B83\uD857\uDCA4\uD855\uDE95\u7A93\u7BEC\u7CC3\u7E6C\u82F8\u8597\u9FA9\u8890\u9FAA\u8EB9\u9FAB\u8FCF\u855F\u99E0\u9221\u9FAC\uD863\uDDB9\uD845\uDC3F\u4071\u42A2\u5A1A"],["8cc9","\u9868\u676B\u4276\u573D"],["8cce","\u85D6\uD852\uDD7B\u82BF\uD85C\uDD0D\u4C81\uD85B\uDD74\u5D7B\uD85A\uDF15\uD85B\uDFBE\u9FAD\u9FAE\u5B96\u9FAF\u66E7\u7E5B\u6E57\u79CA\u3D88\u44C3\uD84C\uDE56\uD849\uDF96\u439A\u4536"],["8ce6","\u5CD5\uD84E\uDF1A\u8AF9\u5C78\u3D12\uD84D\uDD51\u5D78\u9FB2\u7157\u4558\uD850\uDCEC\uD847\uDE23\u4C77\u3978\u344A\uD840\uDDA4\uD85B\uDC41\u8ACC\u4FB4\uD840\uDE39\u59BF\u816C\u9856\uD866\uDCFA\u5F3B"],["8d40","\uD842\uDF9F"],["8d42","\uD848\uDDC1\uD862\uDD6D\u4102\u46BB\uD864\uDC79\u3F07\u9FB3\uD868\uDDB5\u40F8\u37D6\u46F7\uD85B\uDC46\u417C\uD861\uDEB2\uD85C\uDFFF\u456D\u38D4\uD855\uDC9A\u4561\u451B\u4D89\u4C7B\u4D76\u45EA\u3FC8\uD852\uDF0F\u3661\u44DE\u44BD\u41ED\u5D3E\u5D48\u5D56\u3DFC\u380F\u5DA4\u5DB9\u3820\u3838\u5E42\u5EBD\u5F25\u5F83\u3908\u3914\u393F\u394D\u60D7\u613D\u5CE5\u3989\u61B7\u61B9\u61CF\u39B8\u622C\u6290\u62E5\u6318\u39F8\u56B1"],["8da1","\u3A03\u63E2\u63FB\u6407\u645A\u3A4B\u64C0\u5D15\u5621\u9F9F\u3A97\u6586\u3ABD\u65FF\u6653\u3AF2\u6692\u3B22\u6716\u3B42\u67A4\u6800\u3B58\u684A\u6884\u3B72\u3B71\u3B7B\u6909\u6943\u725C\u6964\u699F\u6985\u3BBC\u69D6\u3BDD\u6A65\u6A74\u6A71\u6A82\u3BEC\u6A99\u3BF2\u6AAB\u6AB5\u6AD4\u6AF6\u6B81\u6BC1\u6BEA\u6C75\u6CAA\u3CCB\u6D02\u6D06\u6D26\u6D81\u3CEF\u6DA4\u6DB1\u6E15\u6E18\u6E29\u6E86\uD862\uDDC0\u6EBB\u6EE2\u6EDA\u9F7F\u6EE8\u6EE9\u6F24\u6F34\u3D46\uD84F\uDF41\u6F81\u6FBE\u3D6A\u3D75\u71B7\u5C99\u3D8A\u702C\u3D91\u7050\u7054\u706F\u707F\u7089\uD840\uDF25\u43C1\u35F1\uD843\uDED8"],["8e40","\uD84F\uDED7\u57BE\uD85B\uDED3\u713E\uD855\uDFE0\u364E\u69A2\uD862\uDFE9\u5B74\u7A49\uD856\uDCE1\uD865\uDCD9\u7A65\u7A7D\uD856\uDDAC\u7ABB\u7AB0\u7AC2\u7AC3\u71D1\uD859\uDC8D\u41CA\u7ADA\u7ADD\u7AEA\u41EF\u54B2\uD857\uDC01\u7B0B\u7B55\u7B29\uD854\uDF0E\uD857\uDCFE\u7BA2\u7B6F\u839C\uD856\uDFB4\uD85B\uDC7F\u7BD0\u8421\u7B92\u7BB8\uD857\uDD20\u3DAD\uD857\uDC65\u8492\u7BFA\u7C06\u7C35\uD857\uDCC1\u7C44\u7C83\uD852\uDC82\u7CA6\u667D\uD851\uDD78\u7CC9\u7CC7\u7CE6\u7C74\u7CF3\u7CF5\u7CCE"],["8ea1","\u7E67\u451D\uD85B\uDE44\u7D5D\uD85B\uDED6\u748D\u7D89\u7DAB\u7135\u7DB3\u7DD2\uD850\uDC57\uD858\uDC29\u7DE4\u3D13\u7DF5\uD845\uDFF9\u7DE5\uD860\uDF6D\u7E1D\uD858\uDD21\uD858\uDD5A\u7E6E\u7E92\u432B\u946C\u7E27\u7F40\u7F41\u7F47\u7936\uD858\uDED0\u99E1\u7F97\uD858\uDF51\u7FA3\uD845\uDE61\uD840\uDC68\u455C\uD84D\uDF66\u4503\uD860\uDF3A\u7FFA\uD859\uDC89\u8005\u8008\u801D\u8028\u802F\uD868\uDC87\uD85B\uDCC3\u803B\u803C\u8061\uD849\uDF14\u4989\uD859\uDE26\uD84F\uDDE3\uD859\uDEE8\u6725\u80A7\uD862\uDE48\u8107\u811A\u58B0\uD849\uDEF6\u6C7F\uD859\uDC98\uD853\uDFB8\u64E7\uD845\uDC8A\u8218\uD846\uDC5E\u6A53\uD852\uDE65\uD852\uDE95\u447A\u8229\uD842\uDF0D\uD85A\uDE52\uD84F\uDD7E\u4FF9\uD845\uDCFD\u84E2\u8362\uD85A\uDF0A\uD852\uDDA7\uD84D\uDD30\uD845\uDF73\uD84F\uDDF8\u82AA\u691B\uD87E\uDD94\u41DB"],["8f40","\u854B\u82D0\u831A\uD843\uDE16\uD845\uDFB4\u36C1\uD84C\uDD7D\uD84D\uDD5A\u827B\u82E2\u8318\uD84F\uDE8B\uD85B\uDDA3\uD85A\uDF05\uD85A\uDF97\uD84D\uDDCE\u3DBF\u831D\u55EC\u8385\u450B\uD85B\uDDA5\u83AC\u83C1\u83D3\u347E\uD85B\uDED4\u6A57\u855A\u3496\uD85B\uDE42\uD84B\uDEEF\u8458\uD856\uDFE4\u8471\u3DD3\u44E4\u6AA7\u844A\uD84F\uDCB5\u7958\u84A8\uD85A\uDF96\uD85B\uDE77\uD85B\uDE43\u84DE\u840F\u8391\u44A0\u8493\u84E4\uD857\uDC91\u4240\uD857\uDCC0\u4543\u8534\u5AF2\uD85B\uDE99\u4527\u8573\u4516\u67BF\u8616"],["8fa1","\uD861\uDE25\uD861\uDE3B\u85C1\uD85C\uDC88\u8602\uD845\uDD82\uD85C\uDCCD\uD87E\uDDB2\u456A\u8628\u3648\uD846\uDCA2\u53F7\uD85C\uDF9A\u867E\u8771\uD868\uDCF8\u87EE\uD84B\uDC27\u87B1\u87DA\u880F\u5661\u866C\u6856\u460F\u8845\u8846\uD85D\uDDE0\uD84F\uDDB9\uD85D\uDDE4\u885E\u889C\u465B\u88B4\u88B5\u63C1\u88C5\u7777\uD85D\uDF0F\u8987\u898A\u89A6\u89A9\u89A7\u89BC\uD862\uDE25\u89E7\uD85E\uDD24\uD85E\uDEBD\u8A9C\u7793\u91FE\u8A90\uD85E\uDE59\u7AE9\uD85E\uDF3A\uD84F\uDF8F\u4713\uD85E\uDF38\u717C\u8B0C\u8B1F\uD855\uDC30\uD855\uDD65\u8B3F\u8B4C\u8B4D\u8AA9\uD852\uDE7A\u8B90\u8B9B\u8AAF\uD845\uDEDF\u4615\u884F\u8C9B\uD85F\uDD54\uD85F\uDD8F\uD87E\uDDD4\u3725\uD85F\uDD53\u8CD6\uD85F\uDD98\uD85F\uDDBD\u8D12\u8D03\uD846\uDD10\u8CDB\u705C\u8D11\uD853\uDCC9\u3ED0\u8D77"],["9040","\u8DA9\uD860\uDC02\uD844\uDC14\uD852\uDD8A\u3B7C\uD860\uDDBC\uD85C\uDD0C\u7AE7\u8EAD\u8EB6\u8EC3\u92D4\u8F19\u8F2D\uD860\uDF65\uD861\uDC12\u8FA5\u9303\uD868\uDE9F\uD842\uDE50\u8FB3\u492A\uD862\uDDDE\uD861\uDD3D\uD84F\uDDBB\u5EF8\uD84C\uDE62\u8FF9\uD868\uDC14\uD861\uDEBC\uD861\uDD01\uD848\uDF25\u3980\uD85B\uDED7\u9037\uD861\uDD3C\uD85E\uDEBE\u9061\uD861\uDD6C\uD861\uDE0B\u90A8\uD861\uDF13\u90C4\uD861\uDEE6\u90AE\u90FD\u9167\u3AF0\u91A9\u91C4\u7CAC\uD862\uDD33\uD847\uDE89\u920E\u6C9F\u9241\u9262\uD855\uDDB9\u92B9\uD862\uDEC6\uD84F\uDC9B\uD862\uDF0C\uD855\uDDDB"],["90a1","\uD843\uDD31\u932C\u936B\uD862\uDEE1\uD862\uDFEB\u708F\u5AC3\uD862\uDEE2\uD862\uDEE5\u4965\u9244\uD862\uDFEC\uD863\uDC39\uD862\uDFFF\u9373\u945B\u8EBC\u9585\u95A6\u9426\u95A0\u6FF6\u42B9\uD849\uDE7A\uD861\uDED8\uD844\uDE7C\uD84F\uDE2E\u49DF\u6C1C\u967B\u9696\u416C\u96A3\uD85B\uDED5\u61DA\u96B6\u78F5\uD862\uDEE0\u96BD\u53CC\u49A1\uD85B\uDCB8\uD840\uDE74\uD859\uDC10\uD864\uDCAF\uD864\uDCE5\uD852\uDED1\uD846\uDD15\uD84C\uDF0A\u9731\u8642\u9736\u4A0F\u453D\u4585\uD852\uDEE9\u7075\u5B41\u971B\u975C\uD864\uDDD5\u9757\u5B4A\uD864\uDDEB\u975F\u9425\u50D0\uD84C\uDCB7\uD84C\uDCBC\u9789\u979F\u97B1\u97BE\u97C0\u97D2\u97E0\uD855\uDC6C\u97EE\u741C\uD865\uDC33\u97FF\u97F5\uD865\uDC1D\uD85E\uDD7A\u4AD1\u9834\u9833\u984B\u9866\u3B0E\uD85C\uDD75\u3D51\uD841\uDE30\uD850\uDD5C"],["9140","\uD855\uDF06\u98CA\u98B7\u98C8\u98C7\u4AFF\uD85B\uDD27\uD845\uDED3\u55B0\u98E1\u98E6\u98EC\u9378\u9939\uD852\uDE29\u4B72\uD866\uDC57\uD866\uDD05\u99F5\u9A0C\u9A3B\u9A10\u9A58\uD855\uDF25\u36C4\uD864\uDCB1\uD866\uDFD5\u9AE0\u9AE2\uD866\uDF05\u9AF4\u4C0E\u9B14\u9B2D\uD861\uDE00\u5034\u9B34\uD85A\uDDA8\u38C3\uD84C\uDC7D\u9B50\u9B40\uD867\uDD3E\u5A45\uD846\uDC63\u9B8E\uD850\uDE4B\u9C02\u9BFF\u9C0C\uD867\uDE68\u9DD4\uD867\uDFB7\uD868\uDD92\uD868\uDDAB\uD868\uDCE1\uD868\uDD23\uD868\uDDDF\u9D7E\u9D83\uD868\uDD34\u9E0E\u6888"],["91a1","\u9DC4\uD848\uDD5B\uD868\uDD93\uD868\uDE20\uD846\uDD3B\uD868\uDE33\u9D39\uD868\uDCB9\uD868\uDEB4\u9E90\u9E95\u9E9E\u9EA2\u4D34\u9EAA\u9EAF\uD850\uDF64\u9EC1\u3B60\u39E5\u3D1D\u4F32\u37BE\uD863\uDC2B\u9F02\u9F08\u4B96\u9424\uD85B\uDDA2\u9F17\u9F16\u9F39\u569F\u568A\u9F45\u99B8\uD864\uDC8B\u97F2\u847F\u9F62\u9F69\u7ADC\u9F8E\u7216\u4BBE\uD852\uDD75\uD852\uDDBB\u7177\uD852\uDDF8\uD850\uDF48\uD852\uDE51\u739E\uD862\uDFDA\uD846\uDCFA\u799F\uD862\uDD7E\uD863\uDE36\u9369\u93F3\uD862\uDE44\u92EC\u9381\u93CB\uD862\uDD6C\uD851\uDCB9\u7217\u3EEB\u7772\u7A43\u70D0\uD851\uDC73\uD850\uDFF8\u717E\uD845\uDFEF\u70A3\uD846\uDCBE\uD84D\uDD99\u3EC7\uD846\uDC85\uD855\uDC2F\uD845\uDFF8\u3722\uD845\uDEFB\uD846\uDC39\u36E1\uD845\uDF74\uD846\uDCD1\uD857\uDF4B\u3723\uD845\uDEC0\u575B\uD852\uDE25\uD844\uDFFE\uD844\uDEA8"],["9240","\uD844\uDFC6\uD845\uDCB6\u8503\uD84D\uDEA6\u8503\u8455\uD852\uDD94\uD85C\uDD65\uD84F\uDE31\uD855\uDD5C\uD84F\uDEFB\uD85C\uDC52\u44F4\uD84D\uDEEE\uD866\uDD9D\uD85B\uDF26\u67F9\u3733\u3C15\u3DE7\u586C\uD846\uDD22\u6810\u4057\uD84D\uDF3F\uD850\uDCE1\uD850\uDC8B\uD850\uDD0F\uD85B\uDC21\u54CB\u569E\uD859\uDEB1\u5692\uD843\uDFDF\uD842\uDFA8\uD843\uDE0D\u93C6\uD862\uDF13\u939C\u4EF8\u512B\u3819\uD851\uDC36\u4EBC\uD841\uDC65\uD840\uDF7F\u4F4B\u4F8A\uD855\uDE51\u5A68\uD840\uDDAB\uD840\uDFCB\u3999\uD840\uDF0A\uD841\uDC14\u3435\u4F29\uD840\uDEC0\uD863\uDEB3\uD840\uDE75\u8ADA\uD840\uDE0C\u4E98"],["92a1","\u50CD\u510D\u4FA2\u4F03\uD852\uDE0E\uD84F\uDE8A\u4F42\u502E\u506C\u5081\u4FCC\u4FE5\u5058\u50FC\u5159\u515B\u515D\u515E\u6E76\uD84D\uDD95\uD84F\uDE39\uD84F\uDEBF\u6D72\uD846\uDC84\uD84F\uDE89\u51A8\u51C3\uD841\uDDE0\u44DD\uD841\uDCA3\uD841\uDC92\uD841\uDC91\u8D7A\uD862\uDE9C\uD841\uDF0E\u5259\u52A4\uD842\uDC73\u52E1\u936E\u467A\u718C\uD850\uDF8C\uD843\uDC20\uD852\uDDAC\uD844\uDCE4\u69D1\uD843\uDE1D\u7479\u3EDE\u7499\u7414\u7456\u7398\u4B8E\uD852\uDEBC\uD850\uDC8D\u53D0\u3584\u720F\uD850\uDCC9\u55B4\uD840\uDF45\u54CD\uD842\uDFC6\u571D\u925D\u96F4\u9366\u57DD\u578D\u577F\u363E\u58CB\u5A99\uD862\uDE46\uD845\uDEFA\uD845\uDF6F\uD845\uDF10\u5A2C\u59B8\u928F\u5A7E\u5ACF\u5A12\uD856\uDD46\uD846\uDDF3\uD846\uDC61\uD850\uDE95\u36F5\u6D05\u7443\u5A21\uD857\uDE83"],["9340","\u5A81\uD862\uDFD7\uD841\uDC13\u93E0\u748C\uD844\uDF03\u7105\u4972\u9408\uD862\uDDFB\u93BD\u37A0\u5C1E\u5C9E\u5E5E\u5E48\uD846\uDD96\uD846\uDD7C\uD84E\uDEEE\u5ECD\u5B4F\uD846\uDD03\uD846\uDD04\u3701\uD846\uDCA0\u36DD\uD845\uDEFE\u36D3\u812A\uD862\uDE47\uD847\uDDBA\uD84D\uDC72\uD862\uDDA8\u5F0C\u5F0E\uD846\uDD27\uD845\uDFAB\u5A6B\uD845\uDF3B\u5B44\u8614\uD85D\uDDFD\u8860\u607E\uD84A\uDC60\uD849\uDE2B\u5FDB\u3EB8\uD849\uDDAF\uD849\uDDBE\uD864\uDC88\uD85B\uDF73\u61C0\uD840\uDC3E\uD840\uDC46\uD849\uDE1B\u6199\u6198\u6075\uD84B\uDC9B\uD84B\uDD07\uD851\uDED4\uD864\uDD4D"],["93a1","\u6471\uD851\uDE65\uD84A\uDF6A\u3A29\uD84A\uDF22\uD84D\uDC50\uD866\uDCEA\uD84B\uDE78\u6337\uD869\uDC5B\u64B6\u6331\u63D1\uD852\uDDE3\uD84B\uDD67\u62A4\uD84B\uDCA1\u643B\u656B\u6972\u3BF4\uD84C\uDC8E\uD84C\uDEAD\uD852\uDD89\uD84C\uDEAB\u550D\uD84C\uDEE0\uD846\uDCD9\uD865\uDC3F\u66CE\uD84C\uDE89\uD84C\uDDB3\u3AE0\u4190\uD855\uDD84\uD862\uDF22\uD855\uDD8F\uD845\uDEFC\uD855\uDD5B\uD855\uDC25\u78EE\uD84C\uDD03\uD846\uDC2A\uD84C\uDE34\u3464\uD84C\uDE0F\uD84C\uDD82\uD850\uDEC9\u668E\uD85B\uDD24\u666B\u4B93\u6630\uD85E\uDC70\uD847\uDDEB\u6663\uD84C\uDED2\uD84C\uDEE1\u661E\uD856\uDC72\u38D1\uD84E\uDC3A\uD84D\uDFBC\u3B99\uD84D\uDFA2\uD84C\uDFFE\u74D0\u3B96\u678F\uD851\uDE2A\u68B6\u681E\u3BC4\u6ABE\u3863\uD84D\uDFD5\uD851\uDC87\u6A33\u6A52\u6AC9\u6B05\uD846\uDD12\u6511\u6898\u6A4C\u3BD7\u6A7A\u6B57\uD84F\uDFC0\uD84F\uDC9A\u93A0\u92F2\uD862\uDFEA\uD862\uDECB"],["9440","\u9289\uD860\uDC1E\uD862\uDDDC\u9467\u6DA5\u6F0B\uD852\uDDEC\u6D67\uD84F\uDF7F\u3D8F\u6E04\uD850\uDC3C\u5A3D\u6E0A\u5847\u6D24\u7842\u713B\uD850\uDF1A\uD850\uDE76\u70F1\u7250\u7287\u7294\uD851\uDF8F\uD851\uDF25\u5179\uD852\uDEA4\uD841\uDDEB\u747A\uD84F\uDEF8\uD84D\uDE5F\uD852\uDE4A\uD852\uDD17\uD857\uDFE1\u3F06\u3EB1\uD852\uDEDF\uD863\uDC23\uD84F\uDF35\u60A7\u3EF3\u74CC\u743C\u9387\u7437\u449F\uD85B\uDDEA\u4551\u7583\u3F63\uD853\uDCD9\uD853\uDD06\u3F58\u7555\u7673\uD869\uDDC6\u3B19\u7468\uD862\uDECC\uD852\uDDAB\uD852\uDD8E\u3AFB"],["94a1","\u3DCD\uD852\uDE4E\u3EFF\uD852\uDDC5\uD852\uDCF3\u91FA\u5732\u9342\uD862\uDEE3\uD846\uDC64\u50DF\uD854\uDE21\uD854\uDDE7\u7778\uD84C\uDE32\u770E\u770F\u777B\uD851\uDE97\uD84D\uDF81\u3A5E\uD852\uDCF0\u7438\u749B\u3EBF\uD852\uDEBA\uD852\uDEC7\u40C8\uD852\uDE96\uD858\uDDAE\u9307\uD855\uDD81\u781E\u788D\u7888\u78D2\u73D0\u7959\uD85D\uDF41\uD855\uDEE3\u410E\u799B\u8496\u79A5\u6A2D\uD84F\uDEFA\u7A3A\u79F4\u416E\uD845\uDEE6\u4132\u9235\u79F1\uD843\uDD4C\uD852\uDD8C\uD840\uDE99\uD84F\uDDBA\uD845\uDF6E\u3597\u556B\u3570\u36AA\uD840\uDDD4\uD843\uDC0D\u7AE2\u5A59\uD849\uDEF5\uD856\uDEAF\uD856\uDE9C\u5A0D\uD840\uDE5B\u78F0\u5A2A\uD856\uDFC6\u7AFE\u41F9\u7C5D\u7C6D\u4211\uD856\uDFB3\uD857\uDEBC\uD857\uDEA6\u7CCD\uD852\uDDF9\uD845\uDFB0\u7C8E\u7C7C\u7CAE\u6AB2\u7DDC\u7E07\u7DD3\u7F4E\uD858\uDE61"],["9540","\uD858\uDD5C\uD85E\uDF48\u7D97\uD857\uDE82\u426A\uD85A\uDF75\uD842\uDD16\u67D6\uD840\uDC4E\uD84D\uDDCF\u57C4\uD859\uDC12\uD858\uDFF8\uD852\uDD62\u7FDD\u7B27\uD842\uDC2C\uD856\uDEE9\uD857\uDD43\u7B0C\uD857\uDE0E\u99E6\u8645\u9A63\u6A1C\uD84D\uDC3F\u39E2\uD852\uDDF7\uD859\uDDAD\u9A1F\uD859\uDDA0\u8480\uD85C\uDD27\uD85B\uDCD1\u44EA\u8137\u4402\u80C6\u8109\u8142\uD859\uDFB4\u98C3\uD85A\uDE42\u8262\u8265\uD85A\uDE51\u8453\uD85B\uDDA7\u8610\uD85C\uDE1B\u5A86\u417F\uD846\uDC40\u5B2B\uD846\uDCA1\u5AE4\uD846\uDCD8\u86A0\uD87E\uDDBC\uD84F\uDD8F\u882D\uD85D\uDC22\u5A02"],["95a1","\u886E\u4F45\u8887\u88BF\u88E6\u8965\u894D\uD855\uDE83\u8954\uD85D\uDF85\uD85D\uDF84\uD862\uDFF5\uD862\uDFD9\uD862\uDF9C\uD862\uDDF9\u3EAD\u84A3\u46F5\u46CF\u37F2\u8A3D\u8A1C\uD865\uDC48\u5F4D\u922B\uD850\uDE84\u65D4\u7129\u70C4\uD846\uDC45\u9D6D\u8C9F\u8CE9\uD85F\uDDDC\u599A\u77C3\u59F0\u436E\u36D4\u8E2A\u8EA7\uD853\uDC09\u8F30\u8F4A\u42F4\u6C58\u6FBB\uD848\uDF21\u489B\u6F79\u6E8B\uD845\uDFDA\u9BE9\u36B5\uD852\uDD2F\u90BB\u9097\u5571\u4906\u91BB\u9404\uD862\uDE4B\u4062\uD862\uDEFC\u9427\uD863\uDC1D\uD863\uDC3B\u84E5\u8A2B\u9599\u95A7\u9597\u9596\uD863\uDD34\u7445\u3EC2\uD852\uDCFF\uD852\uDE42\uD850\uDFEA\u3EE7\uD84C\uDE25\u968F\uD863\uDEE7\uD863\uDE66\uD863\uDE65\u3ECC\uD852\uDDED\uD852\uDE78\uD84F\uDFEE\u7412\u746B\u3EFC\u9741\uD864\uDCB0"],["9640","\u6847\u4A1D\uD864\uDC93\uD855\uDFDF\u975D\u9368\uD862\uDD89\uD863\uDC26\uD862\uDF2F\uD858\uDFBE\u92BA\u5B11\u8B69\u493C\u73F9\uD850\uDE1B\u979B\u9771\u9938\uD843\uDF26\u5DC1\uD862\uDFC5\uD852\uDEB2\u981F\uD865\uDCDA\u92F6\uD865\uDDD7\u91E5\u44C0\uD862\uDF50\uD852\uDE67\uD862\uDF64\u98DC\uD862\uDE45\u3F00\u922A\u4925\u8414\u993B\u994D\uD85E\uDF06\u3DFD\u999B\u4B6F\u99AA\u9A5C\uD862\uDF65\uD856\uDCC8\u6A8F\u9A21\u5AFE\u9A2F\uD866\uDCF1\u4B90\uD866\uDD48\u99BC\u4BBD\u4B97\u937D\u5872\uD844\uDF02\u5822\uD852\uDDB8"],["96a1","\uD845\uDCE8\u7844\uD849\uDF1F\uD84F\uDDB8\u68C5\u3D7D\u9458\u3927\u6150\uD849\uDF81\uD84A\uDD6B\u6107\u9C4F\u9C53\u9C7B\u9C35\u9C10\u9B7F\u9BCF\uD867\uDE2D\u9B9F\uD868\uDDF5\uD868\uDCFE\u9D21\u4CAE\uD850\uDD04\u9E18\u4CB0\u9D0C\uD868\uDDB4\uD868\uDCED\uD868\uDCF3\uD866\uDD2F\u9DA5\u84BD\uD85B\uDE12\uD85B\uDFDF\uD85A\uDF82\u85FC\u4533\uD85B\uDDA4\uD85B\uDE84\uD85B\uDDF0\u8420\u85EE\uD85B\uDE00\uD84D\uDFD7\uD858\uDC64\u79E2\uD84D\uDD9C\uD84D\uDE40\u492D\uD852\uDDDE\u3D62\u93DB\u92BE\u9348\uD840\uDEBF\u78B9\u9277\u944D\u4FE4\u3440\u9064\uD855\uDD5D\u783D\u7854\u78B6\u784B\uD845\uDF57\uD84C\uDDC9\uD852\uDD41\u369A\u4F72\u6FDA\u6FD9\u701E\u701E\u5414\uD850\uDDB5\u57BB\u58F3\u578A\u9D16\u57D7\u7134\u34AF\uD850\uDDAC\u71EB\uD85B\uDC40\uD853\uDF97\u5B28\uD845\uDFB5\uD862\uDE49"],["9740","\u610C\u5ACE\u5A0B\u42BC\uD851\uDC88\u372C\u4B7B\uD862\uDDFC\u93BB\u93B8\uD846\uDCD6\uD843\uDF1D\u8472\uD85B\uDCC0\uD845\uDC13\uD850\uDEFA\uD84B\uDC26\uD850\uDFC1\u5994\uD84F\uDDB7\uD859\uDF41\u7DA8\uD858\uDD5B\uD858\uDCA4\uD852\uDDB9\uD852\uDD8B\uD862\uDDFA\u92E5\u73E2\u3EE9\u74B4\uD862\uDF63\uD846\uDC9F\u3EE1\uD852\uDEB3\u6AD8\u73F3\u73FB\u3ED6\uD852\uDE3E\uD852\uDE94\uD845\uDFD9\uD852\uDE66\uD840\uDFA7\uD845\uDC24\uD852\uDDE5\u7448\uD852\uDD16\u70A5\uD852\uDD76\u9284\u73E6\u935F\uD841\uDCFE\u9331\uD862\uDECE\uD862\uDE16\u9386\uD862\uDFE7\uD855\uDDD5\u4935\uD862\uDE82\u716B"],["97a1","\uD852\uDD43\uD843\uDCFF\u56A4\uD841\uDE1A\uD842\uDFEB\uD843\uDCB8\u5502\u79C4\uD845\uDFFA\u7DFE\uD845\uDEC2\uD852\uDE50\uD846\uDC52\u452E\u9401\u370A\uD862\uDEC0\uD852\uDDAD\u59B0\uD846\uDCBF\uD846\uDC83\uD85D\uDC84\u5AA1\u36E2\uD84F\uDD5B\u36B0\u925F\u5A79\uD862\uDE81\uD846\uDC62\u9374\u3CCD\uD842\uDEB4\u4A96\u398A\u50F4\u3D69\u3D4C\uD844\uDF9C\u7175\u42FB\uD860\uDE18\u6E0F\uD864\uDCE4\u44EB\u6D57\uD85F\uDE4F\u7067\u6CAF\u3CD6\uD84F\uDFED\uD84F\uDE2D\u6E02\u6F0C\u3D6F\uD840\uDFF5\u7551\u36BC\u34C8\u4680\u3EDA\u4871\u59C4\u926E\u493E\u8F41\uD863\uDC1C\uD85A\uDFC0\u5812\u57C8\u36D6\uD845\uDC52\u70FE\uD850\uDF62\uD852\uDE71\uD84B\uDFE3\uD844\uDEB0\uD848\uDFBD\u68B9\u6967\uD844\uDF98\uD84D\uDCE5\uD85E\uDFF4\uD84D\uDEDF\uD862\uDE83\uD84D\uDFD6\uD84C\uDFFA\uD853\uDC9F\u6A1A\uD84D\uDEAD\uD85B\uDCB7\u843E\u44DF\u44CE"],["9840","\uD85B\uDD26\uD85B\uDD51\uD85B\uDC82\uD85B\uDFDE\u6F17\uD85C\uDD09\u833D\uD845\uDF3A\u83ED\uD85B\uDC80\uD85C\uDC53\uD845\uDFDB\u5989\u5A82\uD845\uDFB3\u5A61\u5A71\uD846\uDD05\uD850\uDDFC\u372D\u59EF\uD845\uDF3C\u36C7\u718E\u9390\u669A\uD850\uDEA5\u5A6E\u5A2B\uD850\uDE93\u6A2B\uD84F\uDEF9\uD85D\uDF36\uD851\uDC5B\uD850\uDECA\u711D\uD850\uDE59\uD862\uDDE1\u4FB0\uD85B\uDD28\u5CC2\uD851\uDCCE\uD85F\uDE4D\uD850\uDFBD\u6A0C\uD850\uDE56\uD844\uDF04\u70A6\u7133\uD850\uDFE9\u3DA5\u6CDF\uD87E\uDC25\uD852\uDE4F\u7E65\u59EB\u5D2F\u3DF3\u5F5C\uD852\uDE5D\uD845\uDFDF\u7DA4\u8426"],["98a1","\u5485\uD84E\uDEFA\uD84C\uDF00\uD840\uDE14\u577E\uD842\uDCD5\uD841\uDE19\u3FE5\uD847\uDF9E\uD868\uDEB6\u7003\uD864\uDD5B\u5D70\u738F\u7CD3\uD862\uDE59\uD865\uDC20\u4FC8\u7FE7\u72CD\u7310\uD85E\uDEF4\u7338\u7339\uD855\uDEF6\u7341\u7348\u3EA9\uD85E\uDF18\u906C\u71F5\uD852\uDCF2\u73E1\u81F6\u3ECA\u770C\u3ED1\u6CA2\u56FD\u7419\u741E\u741F\u3EE2\u3EF0\u3EF4\u3EFA\u74D3\u3F0E\u3F53\u7542\u756D\u7572\u758D\u3F7C\u75C8\u75DC\u3FC0\u764D\u3FD7\u7674\u3FDC\u767A\uD853\uDF5C\u7188\u5623\u8980\u5869\u401D\u7743\u4039\u6761\u4045\u35DB\u7798\u406A\u406F\u5C5E\u77BE\u77CB\u58F2\u7818\u70B9\u781C\u40A8\u7839\u7847\u7851\u7866\u8448\uD855\uDD35\u7933\u6803\u7932\u4103"],["9940","\u4109\u7991\u7999\u8FBB\u7A06\u8FBC\u4167\u7A91\u41B2\u7ABC\u8279\u41C4\u7ACF\u7ADB\u41CF\u4E21\u7B62\u7B6C\u7B7B\u7C12\u7C1B\u4260\u427A\u7C7B\u7C9C\u428C\u7CB8\u4294\u7CED\u8F93\u70C0\uD843\uDCCF\u7DCF\u7DD4\u7DD0\u7DFD\u7FAE\u7FB4\u729F\u4397\u8020\u8025\u7B39\u802E\u8031\u8054\u3DCC\u57B4\u70A0\u80B7\u80E9\u43ED\u810C\u732A\u810E\u8112\u7560\u8114\u4401\u3B39\u8156\u8159\u815A"],["99a1","\u4413\u583A\u817C\u8184\u4425\u8193\u442D\u81A5\u57EF\u81C1\u81E4\u8254\u448F\u82A6\u8276\u82CA\u82D8\u82FF\u44B0\u8357\u9669\u698A\u8405\u70F5\u8464\u60E3\u8488\u4504\u84BE\u84E1\u84F8\u8510\u8538\u8552\u453B\u856F\u8570\u85E0\u4577\u8672\u8692\u86B2\u86EF\u9645\u878B\u4606\u4617\u88AE\u88FF\u8924\u8947\u8991\uD85E\uDD67\u8A29\u8A38\u8A94\u8AB4\u8C51\u8CD4\u8CF2\u8D1C\u4798\u585F\u8DC3\u47ED\u4EEE\u8E3A\u55D8\u5754\u8E71\u55F5\u8EB0\u4837\u8ECE\u8EE2\u8EE4\u8EED\u8EF2\u8FB7\u8FC1\u8FCA\u8FCC\u9033\u99C4\u48AD\u98E0\u9213\u491E\u9228\u9258\u926B\u92B1\u92AE\u92BF"],["9a40","\u92E3\u92EB\u92F3\u92F4\u92FD\u9343\u9384\u93AD\u4945\u4951\u9EBF\u9417\u5301\u941D\u942D\u943E\u496A\u9454\u9479\u952D\u95A2\u49A7\u95F4\u9633\u49E5\u67A0\u4A24\u9740\u4A35\u97B2\u97C2\u5654\u4AE4\u60E8\u98B9\u4B19\u98F1\u5844\u990E\u9919\u51B4\u991C\u9937\u9942\u995D\u9962\u4B70\u99C5\u4B9D\u9A3C\u9B0F\u7A83\u9B69\u9B81\u9BDD\u9BF1\u9BF4\u4C6D\u9C20\u376F\uD846\uDFC2\u9D49\u9C3A"],["9aa1","\u9EFE\u5650\u9D93\u9DBD\u9DC0\u9DFC\u94F6\u8FB6\u9E7B\u9EAC\u9EB1\u9EBD\u9EC6\u94DC\u9EE2\u9EF1\u9EF8\u7AC8\u9F44\uD840\uDC94\uD840\uDEB7\uD840\uDFA0\u691A\u94C3\u59AC\uD841\uDCD7\u5840\u94C1\u37B9\uD841\uDDD5\uD841\uDE15\uD841\uDE76\uD845\uDEBA\u5757\u7173\uD842\uDEC2\uD842\uDECD\uD842\uDFBF\u546A\uD87E\uDC3B\uD842\uDFCB\u549E\uD842\uDFFB\uD843\uDC3B\uD843\uDC53\uD843\uDC65\uD843\uDC7C\u60E7\uD843\uDC8D\u567A\uD843\uDCB5\uD843\uDCDD\uD843\uDCED\uD843\uDD6F\uD843\uDDB2\uD843\uDDC8\u6955\u9C2F\u87A5\uD843\uDE04\uD843\uDE0E\uD843\uDED7\uD843\uDF90\uD843\uDF2D\uD843\uDE73\u5C20\uD843\uDFBC\u5E0B\uD844\uDC5C\uD844\uDC4F\uD844\uDC76\u671E\uD844\uDC7B\uD844\uDC88\uD844\uDC96\u3647\uD844\uDCBF\uD844\uDCD3\uD844\uDD2F\uD844\uDD3B\u5364\u84AD\uD844\uDEE3\uD844\uDF75\uD844\uDF36\u8B81\uD845\uDD77\uD845\uDE19\uD845\uDFC3\uD845\uDFC7\u4E78\u70BB\uD846\uDC2D\uD846\uDD6A"],["9b40","\uD846\uDE2D\uD846\uDE45\uD847\uDC2A\uD847\uDC70\uD847\uDCAC\uD847\uDEC8\u62C3\uD847\uDED5\uD847\uDF15\u7198\u6855\uD848\uDC45\u69E9\u36C8\uD848\uDE7C\uD848\uDFD7\uD848\uDFFA\uD849\uDF2A\uD84A\uDC71\uD84A\uDD4F\u82FD\uD84A\uDD67\uD84A\uDD93\uD84A\uDED5\u89A5\uD84A\uDEE8\u8FA0\uD84A\uDF0E\u97B8\uD84A\uDF3F\u9847\u9ABD\uD84B\uDC4C"],["9b62","\uD84B\uDC88\uD84B\uDCB7\uD856\uDFE8\uD84B\uDD08\uD84B\uDD12\uD84B\uDDB7\uD84B\uDD95\uD84B\uDE42\uD84B\uDF74\uD84B\uDFCC\uD84C\uDC33\uD84C\uDC66\uD84C\uDF1F\uD84C\uDFDE\u5FB1\u6648\u66BF\uD85E\uDE79\uD84D\uDD67\uD84D\uDDF3\u7201\uD852\uDDBA\u77D7\uD84D\uDE1A\uD84D\uDF16\u7E87\uD840\uDF46\u58B5\u670E"],["9ba1","\u6918\uD84E\uDEA7\uD85D\uDE57\uD857\uDFE2\uD84F\uDE11\uD84F\uDEB9\uD85D\uDDFE\uD848\uDC9A\u48D0\u4AB8\uD850\uDD19\uD862\uDE9A\uD850\uDEEE\uD850\uDF0D\uD850\uDC3B\uD850\uDF34\uD850\uDF96\uD852\uDE45\uD841\uDDCA\u51D2\uD841\uDE11\u599F\uD847\uDEA8\u3BBE\uD84F\uDCFF\uD851\uDC04\uD851\uDCD6\u5788\uD851\uDE74\u399B\uD851\uDF2F\uD861\uDDE8\uD866\uDDC9\u3762\uD848\uDDC3\u8B5E\uD862\uDF4E\u99D6\uD852\uDC12\uD852\uDCFB\uD852\uDE15\u7209\uD852\uDEC0\uD843\uDC78\u5965\uD853\uDEA5\uD853\uDF86\uD841\uDF79\u8EDA\uD854\uDC2C\u528F\u573F\u7171\uD854\uDE99\uD855\uDC19\uD84F\uDF4A\uD852\uDEA7\u55BC\uD855\uDC46\uD855\uDC6E\uD85A\uDF52\u91D4\u3473\uD855\uDD3F\uD85D\uDE32\uD855\uDD5E\u4718\uD855\uDD62\uD855\uDD66\uD855\uDFC7\uD852\uDD3F\uD856\uDC5D\u5066\u34FB\uD84C\uDFCC\u60DE\uD856\uDD03\u477C\uD862\uDD48\uD856\uDEAE\uD856\uDF89\uD857\uDC06\uD847\uDD90\u57A1\u7151\u6FB6\uD858\uDD02\uD85F\uDC12\u9056\uD858\uDDB2\uD853\uDF9A\u8B62\uD859\uDC02\uD859\uDC4A"],["9c40","\u5D5B\uD85A\uDFF7\u8F36\uD859\uDC84\uD846\uDD1C\u8AEA\uD852\uDDF6\uD859\uDC88\uD84F\uDFEF\uD859\uDD12\u4BC0\uD859\uDDBF\uD859\uDEB5\uD849\uDF1B\u9465\uD855\uDFE1\u6195\u5A27\uD87E\uDCCD\u4FBB\u56B9\uD851\uDD21\uD859\uDEFC\u4E6A\uD852\uDD34\u9656\u6D8F\uD85B\uDCBD\u3618\u8977\uD859\uDF99\uD85A\uDC6E\uD859\uDC11\uD85A\uDC5E\u71DF\uD85A\uDCC7\u7B42\uD864\uDCC0\uD842\uDE11\uD85A\uDD26\u9104\uD85A\uDD39\u7A45\u9DF0\uD85A\uDDFA\u9A26\uD85A\uDE2D\u365F\uD859\uDC69\uD840\uDC21\u7983\uD85A\uDE34\uD85A\uDF5B\u5D2C\uD84D\uDD19\u83CF\uD85A\uDF9D\u46D0\uD85B\uDCA4\u753B\u8865\uD85B\uDDAE\u58B6"],["9ca1","\u371C\uD849\uDD8D\uD85C\uDC4B\uD85C\uDDCD\u3C54\uD85C\uDE80\uD85C\uDE85\u9281\uD848\uDD7A\uD85C\uDE8B\u9330\uD85C\uDEE6\uD852\uDDD0\u6C39\u949F\uD85D\uDC50\uD843\uDEF8\u8827\u88F5\uD84A\uDD26\uD861\uDC73\uD845\uDFB1\u6EB8\uD852\uDE2A\uD846\uDC20\u39A4\u36B9\u5C10\u79E3\u453F\u66B6\uD867\uDCAD\uD866\uDCA4\u8943\uD85D\uDFCC\uD85E\uDC58\u56D6\u40DF\uD845\uDE0A\u39A1\uD84D\uDF2F\uD860\uDCE8\uD844\uDFC5\u71AD\u8366\uD85E\uDDDD\uD864\uDDA8\u5A67\u4CB7\uD85C\uDCAF\uD862\uDDAB\uD85E\uDDFD\uD85E\uDE0A\uD85E\uDF0B\uD85F\uDD66\uD850\uDD7A\u7B43\u797E\uD860\uDC09\u6FB5\uD868\uDEDF\u6A03\uD860\uDF18\u53A2\uD85B\uDE07\u93BF\u6836\u975D\uD860\uDD6F\uD860\uDC23\uD85A\uDDB5\uD844\uDFED\uD84C\uDE2F\uD860\uDC48\u5D85\uD863\uDC30\uD860\uDC83\u5715\u9823\uD862\uDD49\u5DAB\uD852\uDD88\u65BE\u69D5\u53D2\uD852\uDEA5\uD84F\uDF81\u3C11\u6736\uD860\uDC90\uD860\uDCF4\uD860\uDD2E\uD847\uDFA1\uD860\uDD4F"],["9d40","\uD860\uDD89\uD860\uDDAF\uD860\uDE1A\uD860\uDF06\uD860\uDF2F\uD860\uDF8A\u35CA\uD861\uDC68\uD861\uDEAA\u48FA\u63E6\uD862\uDD56\u7808\u9255\uD862\uDDB8\u43F2\uD862\uDDE7\u43DF\uD862\uDDE8\uD862\uDF46\uD862\uDFD4\u59F8\uD863\uDC09\u8F0B\uD863\uDFC5\uD864\uDCEC\u7B51\uD864\uDD10\uD864\uDD3C\u3DF7\uD864\uDD5E\uD852\uDECA\u8FD0\u728F\u568B\uD865\uDCE7\uD865\uDDE9\uD865\uDDB0\uD865\uDDB8\uD865\uDF32\uD866\uDCD1\uD866\uDD49\uD866\uDD6A\uD866\uDDC3\uD866\uDE28\uD866\uDF0E\uD867\uDD5A\uD867\uDD9B\u7E9F\uD867\uDEF8\uD867\uDF23\u4CA4\u9547\uD868\uDE93\u71A2\uD868\uDEFF\u4D91\u9012\uD869\uDDCB\u4D9C\uD843\uDC9C\u8FBE\u55C1"],["9da1","\u8FBA\uD849\uDCB0\u8FB9\uD852\uDE93\u4509\u7E7F\u6F56\u6AB1\u4EEA\u34E4\uD862\uDF2C\uD85E\uDC9D\u373A\u8E80\uD845\uDFF5\uD860\uDC24\uD862\uDF6C\uD862\uDF99\uD85E\uDE3E\uD859\uDEAF\u3DEB\uD85D\uDE55\uD84F\uDCB7\uD855\uDE35\uD856\uDD56\u4E9A\uD857\uDE81\uD858\uDE58\u56BF\uD843\uDE6D\u8E0E\u5B6D\uD84F\uDE88\uD853\uDC9E\u63DE\u62D0\uD845\uDFF6\uD846\uDC7B\u6530\u562D\uD857\uDC4A\u541A\uD854\uDF11\u3DC6\uD867\uDD98\u4C7D\u5622\u561E\u7F49\uD857\uDED8\u5975\uD84F\uDD40\u8770\u4E1C\uD843\uDFEA\uD843\uDD49\uD84D\uDEBA\u8117\u9D5E\u8D18\u763B\u9C45\u764E\u77B9\u9345\u5432\u8148\u82F7\u5625\u8132\u8418\u80BD\u55EA\u7962\u5643\u5416\uD843\uDE9D\u35CE\u5605\u55F1\u66F1\uD860\uDEE2\u362D\u7534\u55F0\u55BA\u5497\u5572\uD843\uDC41\uD843\uDC96\u5ED0\uD854\uDD48\uD843\uDE76\uD84B\uDC62"],["9e40","\uD843\uDEA2\u9EAB\u7D5A\u55DE\uD844\uDC75\u629D\u976D\u5494\u8CCD\u71F6\u9176\u63FC\u63B9\u63FE\u5569\uD84A\uDF43\u9C72\uD84B\uDEB3\u519A\u34DF\uD843\uDDA7\u51A7\u544D\u551E\u5513\u7666\u8E2D\uD85A\uDC8A\u75B1\u80B6\u8804\u8786\u88C7\u81B6\u841C\uD844\uDCC1\u44EC\u7304\uD851\uDF06\u5B90\u830B\uD85A\uDC93\u567B\uD849\uDEF4\uD85F\uDD2F\uD850\uDDA3\uD85F\uDD73\uD85B\uDED0\uD85C\uDEB6\u9170\uD844\uDDD9\u9208\uD84F\uDCFC\uD869\uDEA9\uD843\uDEAC\uD843\uDEF9\u7266\uD847\uDCA2\u474E\uD853\uDFC2\uD85F\uDFF9\uD843\uDFEB\u40FA"],["9ea1","\u9C5D\u651F\uD84B\uDDA0\u48F3\uD851\uDFE0\uD867\uDD7C\uD843\uDFEC\uD843\uDE0A\u6062\uD85D\uDDA3\uD843\uDFED"],["9ead","\uD858\uDC48\uD844\uDD87\u71A3\u7E8E\u9D50\u4E1A\u4E04\u3577\u5B0D\u6CB2\u5367\u36AC\u39DC\u537D\u36A5\uD851\uDE18\u589A\uD852\uDF6E\u822D\u544B\u57AA\uD856\uDE95\uD842\uDD79"],["9ec5","\u3A52\uD849\uDC65\u7374\uD867\uDEAC\u4D09\u9BED\uD84F\uDCFE\uD867\uDF30\u4C5B\uD853\uDFA9\uD865\uDD9E\uD867\uDFDE\u845C\uD84F\uDDB6\uD85C\uDEB2\uD859\uDFB3\uD84D\uDF20\u632E\u7D25\uD84F\uDEF7\uD84F\uDE2C\u3A2A\u9008\u52CC\u3E74\u367A\u45E9\uD841\uDC8E\u7640\u5AF0\uD843\uDEB6\u787A\uD85F\uDF2E\u58A7\u40BF\u567C\u9B8B\u5D74\u7654\uD869\uDC34\u9E85\u4CE1\u75F9\u37FB\u6119\uD84C\uDCDA\uD850\uDFF2"],["9ef5","\u565D\uD844\uDEA9\u57A7\uD852\uDD63\uD867\uDE06\u5234\uD85C\uDCAE\u35AD\u6C4A\u9D7C"],["9f40","\u7C56\u9B39\u57DE\uD845\uDF6C\u5C53\u64D3\uD865\uDCD0\uD858\uDF35\uD85C\uDD64\u86AD\uD843\uDD28\uD85B\uDD22\uD852\uDEE2\uD843\uDD71"],["9f4f","\u51FE\uD847\uDF0F\u5D8E\u9703\uD847\uDDD1\u9E81\u904C\u7B1F\u9B02\u5CD1\u7BA3\u6268\u6335\u9AFF\u7BCF\u9B2A\u7C7E\u9B2E\u7C42\u7C86\u9C15\u7BFC\u9B09\u9F17\u9C1B\uD852\uDD3E\u9F5A\u5573\u5BC3\u4FFD\u9E98\u4FF2\u5260\u3E06\u52D1\u5767\u5056\u59B7\u5E12\u97C8\u9DAB\u8F5C\u5469\u97B4\u9940\u97BA\u532C\u6130"],["9fa1","\u692C\u53DA\u9C0A\u9D02\u4C3B\u9641\u6980\u50A6\u7546\uD845\uDF6D\u99DA\u5273"],["9fae","\u9159\u9681\u915C"],["9fb2","\u9151\uD863\uDE97\u637F\uD85B\uDD23\u6ACA\u5611\u918E\u757A\u6285\uD840\uDFFC\u734F\u7C70\uD857\uDC21\uD84F\uDCFD"],["9fc1","\uD852\uDD19\u76D6\u9B9D\u4E2A\uD843\uDCD4\u83BE\u8842"],["9fc9","\u5C4A\u69C0\u50ED\u577A\u521F\u5DF5\u4ECE\u6C31\uD840\uDDF2\u4F39\u549C\u54DA\u529A\u8D82\u35FE\u5F0C\u35F3"],["9fdb","\u6B52\u917C\u9FA5\u9B97\u982E\u98B4\u9ABA\u9EA8\u9E84\u717A\u7B14"],["9fe7","\u6BFA\u8818\u7F78"],["9feb","\u5620\uD869\uDE4A\u8E77\u9F53"],["9ff0","\u8DD4\u8E4F\u9E1C\u8E01\u6282\uD860\uDF7D\u8E28\u8E75\u7AD3\uD852\uDE77\u7A3E\u78D8\u6CEA\u8A67\u7607"],["a040","\uD862\uDE5A\u9F26\u6CCE\u87D6\u75C3\uD868\uDEB2\u7853\uD87E\uDC40\u8D0C\u72E2\u7371\u8B2D\u7302\u74F1\u8CEB\uD852\uDEBB\u862F\u5FBA\u88A0\u44B7"],["a055","\uD846\uDC3B\uD85B\uDE05"],["a058","\u8A7E\uD849\uDD1B"],["a05b","\u60FD\u7667\u9AD7\u9D44\u936E\u9B8F\u87F5"],["a063","\u880F\u8CF7\u732C\u9721\u9BB0\u35D6\u72B2\u4C07\u7C51\u994A\uD858\uDD59\u6159\u4C04\u9E96\u617D"],["a073","\u575F\u616F\u62A6\u6239\u62CE\u3A5C\u61E2\u53AA\uD84C\uDFF5\u6364\u6802\u35D2"],["a0a1","\u5D57\uD862\uDFC2\u8FDA\uD863\uDE39"],["a0a6","\u50D9\uD847\uDD46\u7906\u5332\u9638\uD843\uDF3B\u4065"],["a0ae","\u77FE"],["a0b0","\u7CC2\uD857\uDF1A\u7CDA\u7A2D\u8066\u8063\u7D4D\u7505\u74F2\u8994\u821A\u670C\u8062\uD85D\uDC86\u805B\u74F0\u8103\u7724\u8989\uD859\uDFCC\u7553\uD85B\uDED1\u87A9\u87CE\u81C8\u878C\u8A49\u8CAD\u8B43\u772B\u74F8\u84DA\u3635\u69B2\u8DA6"],["a0d4","\u89A9\u7468\u6DB9\u87C1\uD850\uDC11\u74E7\u3DDB\u7176\u60A4\u619C\u3CD1\u7162\u6077"],["a0e2","\u7F71\uD862\uDF2D\u7250\u60E9\u4B7E\u5220\u3C18\uD84F\uDCC7\uD857\uDED7\uD85D\uDE56\uD855\uDD31\uD846\uDD44\uD844\uDEFE\uD866\uDD03\uD85B\uDDDC\uD85C\uDCAD\u5CC1\uD858\uDDAD\uD862\uDE0F\uD84D\uDE77\uD840\uDCEE\uD85A\uDC46\uD853\uDF0E\u4562\u5B1F\uD858\uDF4C\u9F50\u9EA6\uD858\uDE6B"],["a3c0","\u2400",31,"\u2421"],["c6a1","\u2460",9,"\u2474",9,"\u2170",9,"\u4E36\u4E3F\u4E85\u4EA0\u5182\u5196\u51AB\u52F9\u5338\u5369\u53B6\u590A\u5B80\u5DDB\u2F33\u5E7F\u5EF4\u5F50\u5F61\u6534\u65E0\u7592\u7676\u8FB5\u96B6\xA8\u02C6\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\uFF3B\uFF3D\u273D\u3041",23],["c740","\u3059",58,"\u30A1\u30A2\u30A3\u30A4"],["c7a1","\u30A5",81,"\u0410",5,"\u0401\u0416",4],["c840","\u041B",26,"\u0451\u0436",25,"\u21E7\u21B8\u21B9\u31CF\uD840\uDCCC\u4E5A\uD840\uDC8A\u5202\u4491"],["c8a1","\u9FB0\u5188\u9FB1\uD85D\uDE07"],["c8cd","\uFFE2\uFFE4\uFF07\uFF02\u3231\u2116\u2121\u309B\u309C\u2E80\u2E84\u2E86\u2E87\u2E88\u2E8A\u2E8C\u2E8D\u2E95\u2E9C\u2E9D\u2EA5\u2EA7\u2EAA\u2EAC\u2EAE\u2EB6\u2EBC\u2EBE\u2EC6\u2ECA\u2ECC\u2ECD\u2ECF\u2ED6\u2ED7\u2EDE\u2EE3"],["c8f5","\u0283\u0250\u025B\u0254\u0275\u0153\xF8\u014B\u028A\u026A"],["f9fe","\uFFED"],["fa40","\uD841\uDD47\u92DB\uD841\uDDDF\uD84F\uDFC5\u854C\u42B5\u73EF\u51B5\u3649\uD852\uDD42\uD862\uDDE4\u9344\uD846\uDDDB\u82EE\uD84F\uDCC8\u783C\u6744\u62DF\uD852\uDD33\uD862\uDDAA\uD840\uDEA0\uD85A\uDFB3\uD844\uDF05\u4FAB\uD849\uDCED\u5008\uD85B\uDD29\uD85E\uDE84\uD84D\uDE00\uD852\uDEB1\uD849\uDD13\u5029\uD840\uDF7E\u5FA4\uD840\uDF80\uD840\uDF47\u6EDB\uD841\uDC1F\u507D\u5101\u347A\u510E\u986C\u3743\u8416\uD852\uDDA4\uD841\uDC87\u5160\uD84C\uDFB4\u516A\uD842\uDFFF\uD848\uDCFC\uD840\uDEE5\uD849\uDD30\uD841\uDD8E\uD84C\uDE33\uD846\uDD83\u5B82\u877D\uD841\uDDB3\uD84F\uDC99\u51B2\u51B8"],["faa1","\u9D34\u51C9\u51CF\u51D1\u3CDC\u51D3\uD852\uDEA6\u51B3\u51E2\u5342\u51ED\u83CD\u693E\uD84D\uDF2D\u5F7B\u520B\u5226\u523C\u52B5\u5257\u5294\u52B9\u52C5\u7C15\u8542\u52E0\u860D\uD85A\uDF13\u5305\uD862\uDEDE\u5549\u6ED9\uD84F\uDF80\uD842\uDD54\uD84F\uDFEC\u5333\u5344\uD842\uDFE2\u6CCB\uD845\uDF26\u681B\u73D5\u604A\u3EAA\u38CC\uD845\uDEE8\u71DD\u44A2\u536D\u5374\uD861\uDEAB\u537E\u537F\uD845\uDD96\uD845\uDE13\u77E6\u5393\uD862\uDE9B\u53A0\u53AB\u53AE\u73A7\uD855\uDF72\u3F59\u739C\u53C1\u53C5\u6C49\u4E49\u57FE\u53D9\u3AAB\uD842\uDF8F\u53E0\uD84F\uDFEB\uD84B\uDDA3\u53F6\uD843\uDC77\u5413\u7079\u552B\u6657\u6D5B\u546D\uD85A\uDF53\uD843\uDD74\u555D\u548F\u54A4\u47A6\uD845\uDF0D\uD843\uDEDD\u3DB4\uD843\uDD4D"],["fb40","\uD862\uDDBC\uD849\uDE98\u5547\u4CED\u542F\u7417\u5586\u55A9\u5605\uD846\uDCD7\uD850\uDC3A\u4552\uD851\uDC35\u66B3\uD844\uDCB4\u5637\u66CD\uD84C\uDE8A\u66A4\u66AD\u564D\u564F\u78F1\u56F1\u9787\u53FE\u5700\u56EF\u56ED\uD862\uDF66\u3623\uD844\uDE4F\u5746\uD850\uDDA5\u6C6E\u708B\u5742\u36B1\uD85B\uDC7E\u57E6\uD845\uDC16\u5803\uD845\uDC54\uD850\uDF63\u5826\uD852\uDFF5\u585C\u58AA\u3561\u58E0\u58DC\uD844\uDE3C\u58FB\u5BFF\u5743\uD868\uDD50\uD850\uDE78\u93D3\u35A1\u591F\u68A6\u36C3\u6E59"],["fba1","\uD845\uDE3E\u5A24\u5553\uD845\uDE92\u8505\u59C9\uD843\uDD4E\uD85B\uDC81\uD85B\uDD2A\uD845\uDFDC\u59D9\uD845\uDFFB\uD845\uDFB2\uD85B\uDDA6\u6D71\uD846\uDC28\uD845\uDED5\u59F9\uD85B\uDE45\u5AAB\u5A63\u36E6\uD852\uDDA9\u5A77\u3708\u5A96\u7465\u5AD3\uD85B\uDFA1\uD849\uDD54\u3D85\uD846\uDD11\u3732\uD845\uDEB8\u5E83\u52D0\u5B76\u6588\u5B7C\uD85E\uDE0E\u4004\u485D\uD840\uDE04\u5BD5\u6160\uD846\uDE34\uD856\uDDCC\uD841\uDDA5\u5BF3\u5B9D\u4D10\u5C05\uD846\uDF44\u5C13\u73CE\u5C14\uD847\uDCA5\uD85A\uDF28\u5C49\u48DD\u5C85\u5CE9\u5CEF\u5D8B\uD847\uDDF9\uD847\uDE37\u5D10\u5D18\u5D46\uD847\uDEA4\u5CBA\u5DD7\u82FC\u382D\uD852\uDD01\uD848\uDC49\uD848\uDD73\u8287\u3836\u3BC2\u5E2E\u6A8A\u5E75\u5E7A\uD851\uDCBC\uD843\uDCD3\u53A6\u4EB7\u5ED0\u53A8\uD845\uDF71\u5E09\u5EF4\uD861\uDC82"],["fc40","\u5EF9\u5EFB\u38A0\u5EFC\u683E\u941B\u5F0D\uD840\uDDC1\uD87E\uDC94\u3ADE\u48AE\uD844\uDF3A\u5F3A\uD85A\uDC88\uD848\uDFD0\u5F58\uD849\uDC71\u5F63\u97BD\uD85B\uDE6E\u5F72\u9340\uD862\uDE36\u5FA7\u5DB6\u3D5F\uD854\uDE50\uD847\uDF6A\uD85C\uDCF8\uD849\uDE68\u91D6\uD840\uDE9E\uD862\uDE29\u6031\u6685\uD846\uDC77\u3963\u3DC7\u3639\u5790\uD849\uDFB4\u7971\u3E40\u609E\u60A4\u60B3\uD852\uDD82\uD852\uDD8F\uD85E\uDE53\u74A4\u50E1\u5AA0\u6164\u8424\u6142\uD87E\uDCA6\uD85B\uDED2\u6181\u51F4\uD841\uDE56\u6187\u5BAA\uD84F\uDFB7"],["fca1","\uD84A\uDC5F\u61D3\uD862\uDF9D\uD866\uDD5D\u61D0\u3932\uD84A\uDD80\uD84A\uDCC1\u6023\u615C\u651E\u638B\uD840\uDD18\u62C5\uD845\uDF70\u62D5\uD84B\uDE0D\u636C\uD852\uDDDF\u3A17\u6438\u63F8\uD844\uDF8E\uD845\uDFFC\u6490\u6F8A\uD84B\uDE36\u9814\uD850\uDC8C\uD855\uDF1D\u64E1\u64E5\u947B\u3A66\u643A\u3A57\u654D\u6F16\uD852\uDE28\uD852\uDE23\u6585\u656D\u655F\uD84C\uDC7E\u65B5\uD852\uDD40\u4B37\u65D1\u40D8\uD846\uDC29\u65E0\u65E3\u5FDF\uD84D\uDC00\u6618\uD84C\uDDF7\uD84C\uDDF8\u6644\uD84C\uDDA4\uD84C\uDDA5\u664B\uD843\uDE75\u6667\uD854\uDDE6\u6673\u6674\uD847\uDE3D\uD84C\uDE31\uD861\uDDF4\uD84C\uDDC8\uD854\uDF13\u77C5\uD84A\uDCF7\u99A4\u6702\uD850\uDF9C\uD852\uDE21\u3B2B\u69FA\uD84D\uDFC2\u675E\u6767\u6762\uD850\uDDCD\uD864\uDCED\u67D7\u44E9\u6822\u6E50\u923C\u6801\uD84C\uDFE6\uD85B\uDDA0\u685D"],["fd40","\uD84D\uDC6F\u69E1\u6A0B\uD862\uDEDF\u6973\u68C3\uD84D\uDDCD\u6901\u6900\u3D32\u3A01\uD84D\uDE3C\u3B80\u67AC\u6961\uD862\uDE4A\u42FC\u6936\u6998\u3BA1\uD840\uDFC9\u8363\u5090\u69F9\uD84D\uDE59\uD848\uDD2A\u6A45\uD84D\uDF03\u6A9D\u3BF3\u67B1\u6AC8\uD864\uDD9C\u3C0D\u6B1D\uD842\uDD23\u60DE\u6B35\u6B74\uD849\uDFCD\u6EB5\uD84E\uDEDB\uD840\uDFB5\uD846\uDD58\u3740\u5421\uD84E\uDF5A\u6BE1\uD84F\uDEFC\u6BDC\u6C37\uD849\uDC8B\uD852\uDCF1\uD85A\uDF51\u6C5A\u8226\u6C79\uD84F\uDDBC\u44C5\uD84F\uDDBD\uD850\uDDA4\uD852\uDD0C\uD852\uDD00"],["fda1","\uD84F\uDCC9\u36E5\u3CEB\uD843\uDD32\u9B83\uD84C\uDDF9\uD849\uDC91\u7F8F\u6837\uD85B\uDD25\uD85B\uDDA1\uD85B\uDDEB\u6D96\u6D5C\u6E7C\u6F04\uD852\uDD7F\uD850\uDC85\uD85B\uDE72\u8533\uD85B\uDF74\u51C7\u6C9C\u6E1D\u842E\uD862\uDF21\u6E2F\uD84F\uDE2F\u7453\uD84F\uDF82\u79CC\u6E4F\u5A91\uD84C\uDC4B\u6FF8\u370D\u6F9D\uD84F\uDE30\u6EFA\uD845\uDC97\uD850\uDC3D\u4555\u93F0\u6F44\u6F5C\u3D4E\u6F74\uD864\uDD70\u3D3B\u6F9F\uD850\uDD44\u6FD3\uD850\uDC91\uD850\uDD55\uD850\uDC39\uD84F\uDFF0\uD84F\uDFB4\uD850\uDD3F\u51DF\uD850\uDD56\uD850\uDD57\uD850\uDD40\uD858\uDDDD\u704B\u707E\u70A7\u7081\u70CC\u70D5\u70D6\u70DF\u4104\u3DE8\u71B4\u7196\uD850\uDE77\u712B\u7145\u5A88\u714A\u716E\u5C9C\uD850\uDF65\u714F\u9362\uD850\uDEC1\u712C\uD851\uDC5A\uD852\uDE27\uD852\uDE22\u71BA\uD862\uDFE8\u70BD\u720E"],["fe40","\u9442\u7215\u5911\u9443\u7224\u9341\uD855\uDE05\u722E\u7240\uD852\uDD74\u68BD\u7255\u7257\u3E55\uD84C\uDC44\u680D\u6F3D\u7282\u732A\u732B\uD852\uDC23\uD862\uDC2B\u48ED\uD862\uDC04\u7328\u732E\u73CF\u73AA\uD843\uDC3A\uD85A\uDE2E\u73C9\u7449\uD850\uDDE2\uD845\uDEE7\uD852\uDE24\u6623\u36C5\uD852\uDDB7\uD852\uDD8D\uD852\uDDFB\u73F7\u7415\u6903\uD852\uDE26\u7439\uD841\uDDC3\u3ED7\u745C\uD84A\uDCAD\u7460\uD863\uDEB2\u7447\u73E4\u7476\u83B9\u746C\u3730\u7474\u93F1\u6A2C\u7482\u4953\uD852\uDE8C"],["fea1","\uD850\uDD5F\uD852\uDE79\uD862\uDF8F\u5B46\uD863\uDC03\uD846\uDC9E\u74C8\uD846\uDD88\u750E\u74E9\u751E\uD863\uDED9\uD846\uDE4B\u5BD7\uD863\uDEAC\u9385\u754D\u754A\u7567\u756E\uD853\uDF82\u3F04\uD853\uDD13\u758E\u745D\u759E\u75B4\u7602\u762C\u7651\u764F\u766F\u7676\uD858\uDFF5\u7690\u81EF\u37F8\uD85A\uDD11\uD85A\uDD0E\u76A1\u76A5\u76B7\u76CC\uD85B\uDF9F\u8462\uD854\uDC9D\uD854\uDD7D\uD847\uDE1C\u771E\u7726\u7740\u64AF\uD854\uDE20\u7758\uD84C\uDEAC\u77AF\uD862\uDD64\uD862\uDD68\uD845\uDEC1\u77F4\u7809\uD844\uDF76\uD852\uDE12\u68CA\u78AF\u78C7\u78D3\u96A5\u792E\uD855\uDDE0\u78D7\u7934\u78B1\uD85D\uDE0C\u8FB8\u8884\uD862\uDF2B\uD858\uDC83\uD849\uDE1C\u7986\u8900\u6902\u7980\uD856\uDC57\u799D\uD85E\uDF39\u793C\u79A9\u6E2A\uD85C\uDD26\u3EA8\u79C6\uD864\uDD0D\u79D4"]]});var gA4=o((vM$,fA4)=>{fA4.exports={shiftjis:{type:"_dbcs",table:function(){return vA4()},encodeAdd:{"\xA5":92,"\u203E":126},encodeSkipVals:[{from:60736,to:63808}]},csshiftjis:"shiftjis",mskanji:"shiftjis",sjis:"shiftjis",windows31j:"shiftjis",ms31j:"shiftjis",xsjis:"shiftjis",windows932:"shiftjis",ms932:"shiftjis","932":"shiftjis",cp932:"shiftjis",eucjp:{type:"_dbcs",table:function(){return xA4()},encodeAdd:{"\xA5":92,"\u203E":126}},gb2312:"cp936",gb231280:"cp936",gb23121980:"cp936",csgb2312:"cp936",csiso58gb231280:"cp936",euccn:"cp936",windows936:"cp936",ms936:"cp936","936":"cp936",cp936:{type:"_dbcs",table:function(){return vY0()}},gbk:{type:"_dbcs",table:function(){return vY0().concat(Xd0())}},xgbk:"gbk",isoir58:"gbk",gb18030:{type:"_dbcs",table:function(){return vY0().concat(Xd0())},gb18030:function(){return yA4()},encodeSkipVals:[128],encodeAdd:{"\u20AC":41699}},chinese:"gb18030",windows949:"cp949",ms949:"cp949","949":"cp949",cp949:{type:"_dbcs",table:function(){return bA4()}},cseuckr:"cp949",csksc56011987:"cp949",euckr:"cp949",isoir149:"cp949",korean:"cp949",ksc56011987:"cp949",ksc56011989:"cp949",ksc5601:"cp949",windows950:"cp950",ms950:"cp950","950":"cp950",cp950:{type:"_dbcs",table:function(){return Gd0()}},big5:"big5hkscs",big5hkscs:{type:"_dbcs",table:function(){return Gd0().concat(hA4())},encodeSkipVals:[41676]},cnbig5:"big5hkscs",csbig5:"big5hkscs",xxbig5:"big5hkscs"}});var pA4=o((uA4,jM)=>{var mA4=[MA4(),qA4(),wA4(),_A4(),TA4(),CA4(),kA4(),gA4()];for(kp=0;kp<mA4.length;kp++){jM=mA4[kp];for(vp in jM)if(Object.prototype.hasOwnProperty.call(jM,vp))uA4[vp]=jM[vp]}var jM,vp,kp});var lA4=o((xM$,cA4)=>{var dA4=A0("buffer").Buffer,xY0=A0("stream").Transform;cA4.exports=function($){$.encodeStream=function(X,G){return new TM($.getEncoder(X,G),G)},$.decodeStream=function(X,G){return new eD($.getDecoder(X,G),G)},$.supportsStreams=!0,$.IconvLiteEncoderStream=TM,$.IconvLiteDecoderStream=eD,$._collect=eD.prototype.collect};function TM($,Y){this.conv=$,Y=Y||{},Y.decodeStrings=!1,xY0.call(this,Y)}TM.prototype=Object.create(xY0.prototype,{constructor:{value:TM}});TM.prototype._transform=function($,Y,X){if(typeof $!="string")return X(Error("Iconv encoding stream needs strings as its input."));try{var G=this.conv.write($);if(G&&G.length)this.push(G);X()}catch(J){X(J)}};TM.prototype._flush=function($){try{var Y=this.conv.end();if(Y&&Y.length)this.push(Y);$()}catch(X){$(X)}};TM.prototype.collect=function($){var Y=[];return this.on("error",$),this.on("data",function(X){Y.push(X)}),this.on("end",function(){$(null,dA4.concat(Y))}),this};function eD($,Y){this.conv=$,Y=Y||{},Y.encoding=this.encoding="utf8",xY0.call(this,Y)}eD.prototype=Object.create(xY0.prototype,{constructor:{value:eD}});eD.prototype._transform=function($,Y,X){if(!dA4.isBuffer($))return X(Error("Iconv decoding stream needs buffers as its input."));try{var G=this.conv.write($);if(G&&G.length)this.push(G,this.encoding);X()}catch(J){X(J)}};eD.prototype._flush=function($){try{var Y=this.conv.end();if(Y&&Y.length)this.push(Y,this.encoding);$()}catch(X){$(X)}};eD.prototype.collect=function($){var Y="";return this.on("error",$),this.on("data",function(X){Y+=X}),this.on("end",function(){$(null,Y)}),this}});var nA4=o((yM$,iA4)=>{var U7=A0("buffer").Buffer;iA4.exports=function($){var Y=void 0;$.supportsNodeEncodingsExtension=!(U7.from||new U7(0)instanceof Uint8Array),$.extendNodeEncodings=function(){if(Y)return;if(Y={},!$.supportsNodeEncodingsExtension){console.error("ACTION NEEDED: require('iconv-lite').extendNodeEncodings() is not supported in your version of Node"),console.error("See more info at https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility");return}var G={hex:!0,utf8:!0,"utf-8":!0,ascii:!0,binary:!0,base64:!0,ucs2:!0,"ucs-2":!0,utf16le:!0,"utf-16le":!0};U7.isNativeEncoding=function(W){return W&&G[W.toLowerCase()]};var J=A0("buffer").SlowBuffer;if(Y.SlowBufferToString=J.prototype.toString,J.prototype.toString=function(W,K,Z){if(W=String(W||"utf8").toLowerCase(),U7.isNativeEncoding(W))return Y.SlowBufferToString.call(this,W,K,Z);if(typeof K>"u")K=0;if(typeof Z>"u")Z=this.length;return $.decode(this.slice(K,Z),W)},Y.SlowBufferWrite=J.prototype.write,J.prototype.write=function(W,K,Z,H){if(isFinite(K)){if(!isFinite(Z))H=Z,Z=void 0}else{var z=H;H=K,K=Z,Z=z}K=+K||0;var V=this.length-K;if(!Z)Z=V;else if(Z=+Z,Z>V)Z=V;if(H=String(H||"utf8").toLowerCase(),U7.isNativeEncoding(H))return Y.SlowBufferWrite.call(this,W,K,Z,H);if(W.length>0&&(Z<0||K<0))throw RangeError("attempt to write beyond buffer bounds");var F=$.encode(W,H);if(F.length<Z)Z=F.length;return F.copy(this,K,0,Z),Z},Y.BufferIsEncoding=U7.isEncoding,U7.isEncoding=function(W){return U7.isNativeEncoding(W)||$.encodingExists(W)},Y.BufferByteLength=U7.byteLength,U7.byteLength=J.byteLength=function(W,K){if(K=String(K||"utf8").toLowerCase(),U7.isNativeEncoding(K))return Y.BufferByteLength.call(this,W,K);return $.encode(W,K).length},Y.BufferToString=U7.prototype.toString,U7.prototype.toString=function(W,K,Z){if(W=String(W||"utf8").toLowerCase(),U7.isNativeEncoding(W))return Y.BufferToString.call(this,W,K,Z);if(typeof K>"u")K=0;if(typeof Z>"u")Z=this.length;return $.decode(this.slice(K,Z),W)},Y.BufferWrite=U7.prototype.write,U7.prototype.write=function(W,K,Z,H){var z=K,V=Z,F=H;if(isFinite(K)){if(!isFinite(Z))H=Z,Z=void 0}else{var L=H;H=K,K=Z,Z=L}if(H=String(H||"utf8").toLowerCase(),U7.isNativeEncoding(H))return Y.BufferWrite.call(this,W,z,V,F);K=+K||0;var N=this.length-K;if(!Z)Z=N;else if(Z=+Z,Z>N)Z=N;if(W.length>0&&(Z<0||K<0))throw RangeError("attempt to write beyond buffer bounds");var D=$.encode(W,H);if(D.length<Z)Z=D.length;return D.copy(this,K,0,Z),Z},$.supportsStreams){var Q=A0("stream").Readable;Y.ReadableSetEncoding=Q.prototype.setEncoding,Q.prototype.setEncoding=function(K,Z){this._readableState.decoder=$.getDecoder(K,Z),this._readableState.encoding=K},Q.prototype.collect=$._collect}},$.undoExtendNodeEncodings=function(){if(!$.supportsNodeEncodingsExtension)return;if(!Y)throw Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.");delete U7.isNativeEncoding;var G=A0("buffer").SlowBuffer;if(G.prototype.toString=Y.SlowBufferToString,G.prototype.write=Y.SlowBufferWrite,U7.isEncoding=Y.BufferIsEncoding,U7.byteLength=Y.BufferByteLength,U7.prototype.toString=Y.BufferToString,U7.prototype.write=Y.BufferWrite,$.supportsStreams){var J=A0("stream").Readable;J.prototype.setEncoding=Y.ReadableSetEncoding,delete J.prototype.collect}Y=void 0}}});var tA4=o((bM$,oA4)=>{var aA4=qG().Buffer,sA4=BA4(),A9=bM$;A9.encodings=null;A9.defaultCharUnicode="\uFFFD";A9.defaultCharSingleByte="?";A9.encode=function(Y,X,G){Y=""+(Y||"");var J=A9.getEncoder(X,G),Q=J.write(Y),W=J.end();return W&&W.length>0?aA4.concat([Q,W]):Q};A9.decode=function(Y,X,G){if(typeof Y==="string"){if(!A9.skipDecodeWarning)console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding"),A9.skipDecodeWarning=!0;Y=aA4.from(""+(Y||""),"binary")}var J=A9.getDecoder(X,G),Q=J.write(Y),W=J.end();return W?Q+W:Q};A9.encodingExists=function(Y){try{return A9.getCodec(Y),!0}catch(X){return!1}};A9.toEncoding=A9.encode;A9.fromEncoding=A9.decode;A9._codecDataCache={};A9.getCodec=function(Y){if(!A9.encodings)A9.encodings=pA4();var X=A9._canonicalizeEncoding(Y),G={};while(!0){var J=A9._codecDataCache[X];if(J)return J;var Q=A9.encodings[X];switch(typeof Q){case"string":X=Q;break;case"object":for(var W in Q)G[W]=Q[W];if(!G.encodingName)G.encodingName=X;X=Q.type;break;case"function":if(!G.encodingName)G.encodingName=X;return J=new Q(G,A9),A9._codecDataCache[G.encodingName]=J,J;default:throw Error("Encoding not recognized: '"+Y+"' (searched as: '"+X+"')")}}};A9._canonicalizeEncoding=function($){return(""+$).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g,"")};A9.getEncoder=function(Y,X){var G=A9.getCodec(Y),J=new G.encoder(X,G);if(G.bomAware&&X&&X.addBOM)J=new sA4.PrependBOM(J,X);return J};A9.getDecoder=function(Y,X){var G=A9.getCodec(Y),J=new G.decoder(X,G);if(G.bomAware&&!(X&&X.stripBOM===!1))J=new sA4.StripBOM(J,X);return J};var rA4=typeof process<"u"&&process.versions&&process.versions.node;if(rA4){if(yY0=rA4.split(".").map(Number),yY0[0]>0||yY0[1]>=10)lA4()(A9);nA4()(A9)}var yY0});var $B4=o((hM$,eA4)=>{var bY0,CV9=A0("util").inherits,Jd0=A0("stream"),SV9=/(?:charset|encoding)\s*=\s*['"]? *([\w\-]+)/i;CV9(xp,Jd0.Transform);function xp($){if(!(this instanceof xp))return new xp($);Jd0.Transform.call(this,$),this.charset=$,this.parsed_chunk=!1}xp.prototype._transform=function($,Y,X){var G,J;if(this.charset=="utf8"&&!this.parsed_chunk){this.parsed_chunk=!0;var Q=SV9.exec($.toString());if(Q)J=Q[1].toLowerCase(),this.charset=J=="utf-8"?"utf8":J}try{G=bY0.decode($,this.charset)}catch(W){G=$}this.push(G),X()};eA4.exports=function($){try{if(!bY0)bY0=tA4()}catch(Y){}if(bY0)return new xp($);else return new Jd0.PassThrough}});var YB4=o((fM$,kV9)=>{kV9.exports={name:"needle",version:"2.9.1",description:"The leanest and most handsome HTTP client in the Nodelands.",keywords:["http","https","simple","request","client","multipart","upload","proxy","deflate","timeout","charset","iconv","cookie","redirect"],tags:["http","https","simple","request","client","multipart","upload","proxy","deflate","timeout","charset","iconv","cookie","redirect"],author:"Tom\xE1s Pollak <tomas@forkhq.com>",repository:{type:"git",url:"https://github.com/tomas/needle.git"},dependencies:{debug:"^3.2.6","iconv-lite":"^0.4.4",sax:"^1.2.4"},devDependencies:{JSONStream:"^1.3.5",jschardet:"^1.6.0",mocha:"^5.2.0",pump:"^3.0.0",q:"^1.5.1",should:"^13.2.3",sinon:"^2.3.0",xml2js:"^0.4.19"},scripts:{test:"mocha test"},directories:{lib:"./lib"},main:"./lib/needle",bin:{needle:"./bin/needle"},license:"MIT",engines:{node:">= 4.4.x"}}});var UB4=o((gM$,XN)=>{var QB4=A0("fs"),Wd0=A0("http"),vV9=A0("https"),YN=A0("url"),gY0=A0("stream"),NU=XA4()("needle"),XB4=GA4().build,xV9=WA4(),Kd0=UA4(),fY0=FA4(),hY0=NA4(),yV9=$B4(),WB4=YB4().version,KB4="Needle/"+WB4;KB4+=" (Node.js "+process.version+"; "+process.platform+" "+process.arch+")";var bV9="agent pfx key passphrase cert ca ciphers rejectUnauthorized secureProtocol checkServerIdentity family",hV9=!Wd0.Agent||Wd0.Agent.defaultMaxSockets!=1/0,GB4=Object.assign?Object.assign:A0("util")._extend,fV9=[301,302,303,307,308];function yp($,Y){return $.bind(null,Y)}var $N={};try{if(dW=A0("zlib"),UC={flush:dW.Z_SYNC_FLUSH,finishFlush:dW.Z_SYNC_FLUSH},Zd0={flush:dW.BROTLI_OPERATION_FLUSH,finishFlush:dW.BROTLI_OPERATION_FLUSH},$N["x-deflate"]=yp(dW.Inflate,UC),$N.deflate=yp(dW.Inflate,UC),$N["x-gzip"]=yp(dW.Gunzip,UC),$N.gzip=yp(dW.Gunzip,UC),typeof dW.BrotliDecompress==="function")$N.br=yp(dW.BrotliDecompress,Zd0)}catch($){}var dW,UC,Zd0,kX={boundary:"--------------------NODENEEDLEHTTPCLIENT",encoding:"utf8",parse_response:"all",proxy:null,headers:{},accept:"*/*",user_agent:KB4,open_timeout:1e4,response_timeout:0,read_timeout:0,follow_max:0,stream_length:-1,compressed:!1,decode_response:!0,parse_cookies:!0,follow_set_cookies:!1,follow_set_referer:!1,follow_keep_method:!1,follow_if_same_host:!1,follow_if_same_protocol:!1,follow_if_same_location:!1},HC={options:{decode:"decode_response",parse:"parse_response",timeout:"open_timeout",follow:"follow_max"},inverted:{}};Object.keys(HC.options).map(function($){var Y=HC.options[$];HC.inverted[Y]=$});function JB4($){return Object.keys(kX).map(function(Y){if(kX[Y]!==null&&kX[Y].constructor==$)return Y}).filter(function(Y){return Y})}function gV9($){if(!$||$==="")return{};var Y,X="utf8",G=$.split(";");if(G.length>1&&(Y=G[1].match(/charset=(.+)/)))X=Y[1];return{type:G[0],charset:X}}function ZB4($){return typeof $.pipe==="function"}function mV9($,Y,X){if(Y>0)return X(Y);if($.end!==void 0&&$.end!==1/0&&$.start!==void 0)return X($.end+1-($.start||0));QB4.stat($.path,function(G,J){X(J?J.size-($.start||0):null)})}function uV9($,Y){if(YN.URL)return new YN.URL($,Y);return YN.resolve(Y,$)}function Qd0($,Y){if(gY0.pipeline)return gY0.pipeline.apply(null,$.concat(Y));var X=$.shift();while($.length)X=X.pipe($.shift()),X.once("error",function(G){Y&&Y(G),Y=null})}function GN($,Y,X,G,J){if(typeof Y!=="string")throw TypeError("URL must be a string, not "+Y);if(this.method=$.toLowerCase(),this.uri=Y,this.data=X,typeof G=="function")this.callback=G,this.options={};else this.callback=J,this.options=G}GN.prototype.setup=function($,Y){function X(H,z){if(typeof Y[H]<"u")return Y[H];return typeof Y[HC.inverted[H]]<"u"?Y[HC.inverted[H]]:z}function G(H,z){var V=X(z),F=typeof V;if(F!="undefined"&&F!=H)throw TypeError(F+" received for "+z+", but expected a "+H);return F==H?V:kX[z]}var J={http_opts:{localAddress:X("localAddress",void 0),lookup:X("lookup",void 0)},headers:{},output:Y.output,proxy:X("proxy",kX.proxy),parser:X("parse_response",kX.parse_response),encoding:Y.encoding||(Y.multipart?"binary":kX.encoding)};JB4(Boolean).forEach(function(H){J[H]=G("boolean",H)}),JB4(Number).forEach(function(H){J[H]=G("number",H)}),bV9.split(" ").forEach(function(H){if(typeof Y[H]<"u"){if(J.http_opts[H]=Y[H],typeof Y.agent>"u")J.http_opts.agent=!1}});for(var Q in kX.headers)J.headers[Q]=kX.headers[Q];if(J.headers.accept=Y.accept||kX.accept,J.headers["user-agent"]=Y.user_agent||kX.user_agent,Y.content_type)J.headers["content-type"]=Y.content_type;if(Y.connection||hV9)J.headers.connection=Y.connection||"close";if((Y.compressed||kX.compressed)&&typeof dW<"u")J.headers["accept-encoding"]=$N.br?"gzip, deflate, br":"gzip, deflate";if(Y.cookies)J.headers.cookie=fY0.write(Y.cookies);if($.match(/[^\/]@/)){var W=(YN.parse($).auth||"").split(":");Y.username=W[0],Y.password=W[1]}if(Y.username)if(Y.auth&&(Y.auth=="auto"||Y.auth=="digest"))J.credentials=[Y.username,Y.password];else J.headers.authorization=Kd0.basic(Y.username,Y.password);if(J.proxy){if(J.proxy.indexOf("http")===-1)J.proxy="http://"+J.proxy;if(J.proxy.indexOf("@")!==-1){var K=(YN.parse(J.proxy).auth||"").split(":");Y.proxy_user=K[0],Y.proxy_pass=K[1]}if(Y.proxy_user)J.headers["proxy-authorization"]=Kd0.basic(Y.proxy_user,Y.proxy_pass)}for(var Z in Y.headers)J.headers[Z.toLowerCase()]=Y.headers[Z];return J.uri_modifier=X("uri_modifier",null),J};GN.prototype.start=function(){var $=new gY0.PassThrough({objectMode:!1}),Y=this.uri,X=this.data,G=this.method,J=typeof this.options=="function"?this.options:this.callback,Q=this.options||{};if(Y.indexOf("http")===-1)Y=Y.replace(/^(\/\/)?/,"http://");var W=this,K,Z=!1,H=this.setup(Y,Q),z=Q.json||Q.json!==!1&&H.headers["content-type"]=="application/json";if(X)if(Q.multipart){var V=Q.boundary||kX.boundary;Z=!0,xV9.build(X,V,function(L,N){if(L)throw L;H.headers["content-type"]="multipart/form-data; boundary="+V,F(N)})}else if(ZB4(X)){if(G=="get")throw Error("Refusing to pipe() a stream via GET. Did you mean .post?");if(H.stream_length>0||H.stream_length===0&&X.path)Z=!0,mV9(X,H.stream_length,function(L){X.length=L,F(X)});else K=X}else if(Buffer.isBuffer(X))K=X;else if(G=="get"&&!z)Y=Y.replace(/\?.*|$/,"?"+XB4(X));else K=typeof X==="string"?X:z?JSON.stringify(X):XB4(X),K=Buffer.from(K,H.encoding);function F(L){if(L){if(L.length)H.headers["content-length"]=L.length;if(!H.headers["content-type"])H.headers["content-type"]=z?"application/json; charset=utf-8":"application/x-www-form-urlencoded"}if(Q.json&&(!Q.accept&&!(Q.headers||{}).accept))H.headers.accept="application/json";W.send_request(1,G,Y,H,L,$,J)}if(!Z)F(K);return $};GN.prototype.get_request_opts=function($,Y,X){var{http_opts:G,proxy:J}=X,Q=J?YN.parse(J):YN.parse(Y);if(G.protocol=Q.protocol,G.host=Q.hostname,G.port=Q.port||(Q.protocol=="https:"?443:80),G.path=J?Y:Q.pathname+(Q.search||""),G.method=$,G.headers=X.headers,!G.headers.host){var W=J?YN.parse(Y):Q;if(G.headers.host=W.hostname,W.port&&[80,443].indexOf(W.port)===-1)G.headers.host+=":"+W.port}return G};GN.prototype.should_follow=function($,Y,X){if(!$)return!1;function G(Q){var Q=X[Q];return $.indexOf(Q)!==-1}if(!Y.follow_if_same_location&&$===X)return!1;if(Y.follow_if_same_host&&!G("host"))return!1;if(Y.follow_if_same_protocol&&!G("protocol"))return!1;return!0};GN.prototype.send_request=function($,Y,X,G,J,Q,W){if(typeof G.uri_modifier==="function"){var K=G.uri_modifier(X);NU("Modifying request URI",X+" => "+K),X=K}var Z,H,z=0,V=this,F=this.get_request_opts(Y,X,G),L=F.protocol=="https:"?vV9:Wd0;function N(O,E){if(z++>0)return NU("Already finished, stopping here.");if(H)clearTimeout(H);if(Z.removeListener("error",D),Q.done=!0,W)return W(O,E,E?E.body:void 0);Q.emit("done",O);var M=Q._readableState.pipes||[];if(!M.forEach)M=[M];M.forEach(function(R){R.emit("done",O)})}function D(O){NU("Request error",O),Q.emit("err",O),N(O||Error("Unknown error when making request."))}function A(O,E){if(H)clearTimeout(H);if(E<=0)return;H=setTimeout(function(){if(Q.emit("timeout",O),Z.abort(),O=="read")N(Error(O+" timeout"))},E)}function B(){if(z&&!this.writable&&this.destroyed===!1)this.destroy(),D(Error("Remote end closed socket abruptly."))}if(NU("Making request #"+$,F),Z=L.request(F,function(O){var E=O.headers;if(NU("Got response",O.statusCode,E),Q.emit("response",O),A("read",G.read_timeout),G.parse_cookies&&(E["set-cookie"]||G.previous_resp_cookies))O.cookies=GB4(G.previous_resp_cookies||{},fY0.read(E["set-cookie"])),NU("Got cookies",O.cookies);if(fV9.indexOf(O.statusCode)!==-1&&V.should_follow(E.location,G,X)){if(clearTimeout(H),$<=G.follow_max){if(Q.emit("redirect",E.location),!G.follow_keep_method)Y="GET",J=null,delete G.headers["content-length"];if(G.follow_set_cookies){var M=fY0.read(G.headers.cookie);if(G.previous_resp_cookies=O.cookies,Object.keys(M).length||Object.keys(O.cookies||{}).length)G.headers.cookie=fY0.write(GB4(M,O.cookies))}else if(G.headers.cookie)NU("Clearing original request cookie",G.headers.cookie),delete G.headers.cookie;if(G.follow_set_referer)G.headers.referer=encodeURI(X);G.headers.host=null;var R=uV9(E.location,X);return NU("Redirecting to "+R.toString()),V.send_request(++$,Y,R.toString(),G,J,Q,W)}else if(G.follow_max>0)return N(Error("Max redirects reached. Possible loop in: "+E.location))}if(O.statusCode==401&&E["www-authenticate"]&&G.credentials){if(!G.headers.authorization){var q=Kd0.header(E["www-authenticate"],G.credentials,F);if(q)return G.headers.authorization=q,V.send_request($,Y,X,G,J,Q,W)}}Q.emit("header",O.statusCode,E),Q.emit("headers",E);var _=[],P=gV9(E["content-type"]),w=P.type&&(P.type.indexOf("text/")!=-1||!!P.type.match(/(\/|\+)(xml|json)$/));if(E["content-encoding"]&&$N[E["content-encoding"]]){var j=$N[E["content-encoding"]]();j.on("error",D),_.push(j)}if(G.parser&&hY0[P.type]){var C=G.parser.toString().toLowerCase();if(["xml","json"].indexOf(C)==-1||hY0[P.type].name==C)Q.parser=hY0[P.type].name,_.push(hY0[P.type].fn()),Q._writableState.objectMode=!0,Q._readableState.objectMode=!0}else if(w&&G.decode_response&&P.charset)_.push(yV9(P.charset));if(_.push(Q),Qd0([O].concat(_),function(I){if(I)NU(I);if(I&&I.message=="write after end")Z.destroy()}),G.output&&O.statusCode==200){var k=QB4.createWriteStream(G.output);k.on("error",D),Q.on("end",function(){if(k.writable)k.end()}),k.on("close",function(){delete Q.file}),Q.on("readable",function(){var I;while((I=this.read())!==null){if(k.writable)k.write(I);if(O.body)O.body.push(I)}}),Q.file=k}if(W){O.raw=[],O.body=[],O.bytes=0;var S=new gY0.PassThrough;if(S.on("readable",function(){var I;while((I=this.read())!=null)O.bytes+=I.length,O.raw.push(I)}),Qd0([O,S],function(I){if(I)NU(I)}),!G.output||O.statusCode!=200)Q.on("readable",function(){var I;while((I=this.read())!==null){if(typeof I=="string")I=Buffer.from(I);O.body.push(I)}})}Q.on("end",function(){if(O.body){if(O.raw=Buffer.concat(O.raw),O.body[0]!==void 0&&!Buffer.isBuffer(O.body[0])){if(O.body=O.body[0],Q.parser)O.parser=Q.parser}else if(O.body=Buffer.concat(O.body),w||Q.parser)O.body=O.body.toString()}if(Q.file)Q.file.on("close",function(){N(null,O)});else N(null,O)})}),A("open",G.open_timeout),Z.on("error",D),Z.once("abort",function(){if(H)clearTimeout(H)}),Z.once("socket",function(O){if(O.connecting)O.once("connect",function(){A("response",G.response_timeout)});else A("response",G.response_timeout);if(!O.on_socket_end)O.on_socket_end=B,O.once("end",function(){process.nextTick(B.bind(O))})}),J)if(ZB4(J))Qd0([J,Z],function(O){if(O)NU(O)});else Z.write(J,G.encoding),Z.end();else Z.end();return Q.abort=function(){Z.abort()},Q.request=Z,Q};if(typeof Promise<"u")XN.exports=function(){var $,Y=[].slice.call(arguments);if(Y[0].match(/\.|\//))$=Y.length>2?"post":"get";else $=Y.shift();if($.match(/get|head/i)&&Y.length==2)Y.splice(1,0,null);return new Promise(function(X,G){XN.exports.request($,Y[0],Y[1],Y[2],function(J,Q){return J?G(J):X(Q)})})};XN.exports.version=WB4;XN.exports.defaults=function($){for(var Y in $){var X=HC.options[Y]||Y;if(kX.hasOwnProperty(X)&&typeof $[Y]<"u"){if(X!="parse_response"&&X!="proxy"){var G=kX[X].constructor.name;if($[Y].constructor.name!=G)throw TypeError("Invalid type for "+Y+", should be "+G)}kX[X]=$[Y]}else throw Error("Invalid property for defaults:"+X)}return kX};"head get".split(" ").forEach(function($){XN.exports[$]=function(Y,X,G){return new GN($,Y,null,X,G).start()}});"post put patch delete".split(" ").forEach(function($){XN.exports[$]=function(Y,X,G,J){return new GN($,Y,X,G,J).start()}});XN.exports.request=function($,Y,X,G,J){return new GN($,Y,X,G,J).start()}});var fB4=o((mY0,zC)=>{var pV9=200,OB4="__lodash_hash_undefined__",dV9=800,cV9=16,EB4=9007199254740991,MB4="[object Arguments]",lV9="[object Array]",iV9="[object AsyncFunction]",nV9="[object Boolean]",rV9="[object Date]",aV9="[object Error]",RB4="[object Function]",sV9="[object GeneratorFunction]",oV9="[object Map]",tV9="[object Number]",eV9="[object Null]",qB4="[object Object]",$F9="[object Proxy]",YF9="[object RegExp]",XF9="[object Set]",GF9="[object String]",JF9="[object Undefined]",QF9="[object WeakMap]",WF9="[object ArrayBuffer]",KF9="[object DataView]",ZF9="[object Float32Array]",UF9="[object Float64Array]",HF9="[object Int8Array]",zF9="[object Int16Array]",VF9="[object Int32Array]",FF9="[object Uint8Array]",LF9="[object Uint8ClampedArray]",DF9="[object Uint16Array]",NF9="[object Uint32Array]",AF9=/[\\^$.*+?()[\]{}|]/g,BF9=/^\[object .+?Constructor\]$/,OF9=/^(?:0|[1-9]\d*)$/,Y$={};Y$[ZF9]=Y$[UF9]=Y$[HF9]=Y$[zF9]=Y$[VF9]=Y$[FF9]=Y$[LF9]=Y$[DF9]=Y$[NF9]=!0;Y$[MB4]=Y$[lV9]=Y$[WF9]=Y$[nV9]=Y$[KF9]=Y$[rV9]=Y$[aV9]=Y$[RB4]=Y$[oV9]=Y$[tV9]=Y$[qB4]=Y$[YF9]=Y$[XF9]=Y$[GF9]=Y$[QF9]=!1;var PB4=typeof global=="object"&&global&&global.Object===Object&&global,EF9=typeof self=="object"&&self&&self.Object===Object&&self,fp=PB4||EF9||Function("return this")(),wB4=typeof mY0=="object"&&mY0&&!mY0.nodeType&&mY0,bp=wB4&&typeof zC=="object"&&zC&&!zC.nodeType&&zC,_B4=bp&&bp.exports===wB4,Ud0=_B4&&PB4.process,HB4=function(){try{var $=bp&&bp.require&&bp.require("util").types;if($)return $;return Ud0&&Ud0.binding&&Ud0.binding("util")}catch(Y){}}(),zB4=HB4&&HB4.isTypedArray;function MF9($,Y,X){switch(X.length){case 0:return $.call(Y);case 1:return $.call(Y,X[0]);case 2:return $.call(Y,X[0],X[1]);case 3:return $.call(Y,X[0],X[1],X[2])}return $.apply(Y,X)}function RF9($,Y){var X=-1,G=Array($);while(++X<$)G[X]=Y(X);return G}function qF9($){return function(Y){return $(Y)}}function PF9($,Y){return $==null?void 0:$[Y]}function wF9($,Y){return function(X){return $(Y(X))}}var _F9=Array.prototype,jF9=Function.prototype,dY0=Object.prototype,Hd0=fp["__core-js_shared__"],cY0=jF9.toString,qV=dY0.hasOwnProperty,VB4=function(){var $=/[^.]+$/.exec(Hd0&&Hd0.keys&&Hd0.keys.IE_PROTO||"");return $?"Symbol(src)_1."+$:""}(),jB4=dY0.toString,TF9=cY0.call(Object),IF9=RegExp("^"+cY0.call(qV).replace(AF9,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),uY0=_B4?fp.Buffer:void 0,FB4=fp.Symbol,LB4=fp.Uint8Array,DB4=uY0?uY0.allocUnsafe:void 0,TB4=wF9(Object.getPrototypeOf,Object),NB4=Object.create,CF9=dY0.propertyIsEnumerable,SF9=_F9.splice,IM=FB4?FB4.toStringTag:void 0,pY0=function(){try{var $=Nd0(Object,"defineProperty");return $({},"",{}),$}catch(Y){}}(),kF9=uY0?uY0.isBuffer:void 0,AB4=Math.max,vF9=Date.now,IB4=Nd0(fp,"Map"),hp=Nd0(Object,"create"),xF9=function(){function $(){}return function(Y){if(!SM(Y))return{};if(NB4)return NB4(Y);$.prototype=Y;var X=new $;return $.prototype=void 0,X}}();function CM($){var Y=-1,X=$==null?0:$.length;this.clear();while(++Y<X){var G=$[Y];this.set(G[0],G[1])}}function yF9(){this.__data__=hp?hp(null):{},this.size=0}function bF9($){var Y=this.has($)&&delete this.__data__[$];return this.size-=Y?1:0,Y}function hF9($){var Y=this.__data__;if(hp){var X=Y[$];return X===OB4?void 0:X}return qV.call(Y,$)?Y[$]:void 0}function fF9($){var Y=this.__data__;return hp?Y[$]!==void 0:qV.call(Y,$)}function gF9($,Y){var X=this.__data__;return this.size+=this.has($)?0:1,X[$]=hp&&Y===void 0?OB4:Y,this}CM.prototype.clear=yF9;CM.prototype.delete=bF9;CM.prototype.get=hF9;CM.prototype.has=fF9;CM.prototype.set=gF9;function PV($){var Y=-1,X=$==null?0:$.length;this.clear();while(++Y<X){var G=$[Y];this.set(G[0],G[1])}}function mF9(){this.__data__=[],this.size=0}function uF9($){var Y=this.__data__,X=lY0(Y,$);if(X<0)return!1;var G=Y.length-1;if(X==G)Y.pop();else SF9.call(Y,X,1);return--this.size,!0}function pF9($){var Y=this.__data__,X=lY0(Y,$);return X<0?void 0:Y[X][1]}function dF9($){return lY0(this.__data__,$)>-1}function cF9($,Y){var X=this.__data__,G=lY0(X,$);if(G<0)++this.size,X.push([$,Y]);else X[G][1]=Y;return this}PV.prototype.clear=mF9;PV.prototype.delete=uF9;PV.prototype.get=pF9;PV.prototype.has=dF9;PV.prototype.set=cF9;function VC($){var Y=-1,X=$==null?0:$.length;this.clear();while(++Y<X){var G=$[Y];this.set(G[0],G[1])}}function lF9(){this.size=0,this.__data__={hash:new CM,map:new(IB4||PV),string:new CM}}function iF9($){var Y=nY0(this,$).delete($);return this.size-=Y?1:0,Y}function nF9($){return nY0(this,$).get($)}function rF9($){return nY0(this,$).has($)}function aF9($,Y){var X=nY0(this,$),G=X.size;return X.set($,Y),this.size+=X.size==G?0:1,this}VC.prototype.clear=lF9;VC.prototype.delete=iF9;VC.prototype.get=nF9;VC.prototype.has=rF9;VC.prototype.set=aF9;function FC($){var Y=this.__data__=new PV($);this.size=Y.size}function sF9(){this.__data__=new PV,this.size=0}function oF9($){var Y=this.__data__,X=Y.delete($);return this.size=Y.size,X}function tF9($){return this.__data__.get($)}function eF9($){return this.__data__.has($)}function $L9($,Y){var X=this.__data__;if(X instanceof PV){var G=X.__data__;if(!IB4||G.length<pV9-1)return G.push([$,Y]),this.size=++X.size,this;X=this.__data__=new VC(G)}return X.set($,Y),this.size=X.size,this}FC.prototype.clear=sF9;FC.prototype.delete=oF9;FC.prototype.get=tF9;FC.prototype.has=eF9;FC.prototype.set=$L9;function YL9($,Y){var X=Ld0($),G=!X&&Fd0($),J=!X&&!G&&vB4($),Q=!X&&!G&&!J&&yB4($),W=X||G||J||Q,K=W?RF9($.length,String):[],Z=K.length;for(var H in $)if((Y||qV.call($,H))&&!(W&&(H=="length"||J&&(H=="offset"||H=="parent")||Q&&(H=="buffer"||H=="byteLength"||H=="byteOffset")||SB4(H,Z))))K.push(H);return K}function zd0($,Y,X){if(X!==void 0&&!rY0($[Y],X)||X===void 0&&!(Y in $))Dd0($,Y,X)}function XL9($,Y,X){var G=$[Y];if(!(qV.call($,Y)&&rY0(G,X))||X===void 0&&!(Y in $))Dd0($,Y,X)}function lY0($,Y){var X=$.length;while(X--)if(rY0($[X][0],Y))return X;return-1}function Dd0($,Y,X){if(Y=="__proto__"&&pY0)pY0($,Y,{configurable:!0,enumerable:!0,value:X,writable:!0});else $[Y]=X}var GL9=NL9();function iY0($){if($==null)return $===void 0?JF9:eV9;return IM&&IM in Object($)?AL9($):qL9($)}function BB4($){return gp($)&&iY0($)==MB4}function JL9($){if(!SM($)||ML9($))return!1;var Y=Bd0($)?IF9:BF9;return Y.test(jL9($))}function QL9($){return gp($)&&xB4($.length)&&!!Y$[iY0($)]}function WL9($){if(!SM($))return RL9($);var Y=kB4($),X=[];for(var G in $)if(!(G=="constructor"&&(Y||!qV.call($,G))))X.push(G);return X}function CB4($,Y,X,G,J){if($===Y)return;GL9(Y,function(Q,W){if(J||(J=new FC),SM(Q))KL9($,Y,W,X,CB4,G,J);else{var K=G?G(Vd0($,W),Q,W+"",$,Y,J):void 0;if(K===void 0)K=Q;zd0($,W,K)}},bB4)}function KL9($,Y,X,G,J,Q,W){var K=Vd0($,X),Z=Vd0(Y,X),H=W.get(Z);if(H){zd0($,X,H);return}var z=Q?Q(K,Z,X+"",$,Y,W):void 0,V=z===void 0;if(V){var F=Ld0(Z),L=!F&&vB4(Z),N=!F&&!L&&yB4(Z);if(z=Z,F||L||N)if(Ld0(K))z=K;else if(TL9(K))z=FL9(K);else if(L)V=!1,z=HL9(Z,!0);else if(N)V=!1,z=VL9(Z,!0);else z=[];else if(IL9(Z)||Fd0(Z)){if(z=K,Fd0(K))z=CL9(K);else if(!SM(K)||Bd0(K))z=BL9(Z)}else V=!1}if(V)W.set(Z,z),J(z,Z,G,Q,W),W.delete(Z);zd0($,X,z)}function ZL9($,Y){return wL9(PL9($,Y,hB4),$+"")}var UL9=!pY0?hB4:function($,Y){return pY0($,"toString",{configurable:!0,enumerable:!1,value:kL9(Y),writable:!0})};function HL9($,Y){if(Y)return $.slice();var X=$.length,G=DB4?DB4(X):new $.constructor(X);return $.copy(G),G}function zL9($){var Y=new $.constructor($.byteLength);return new LB4(Y).set(new LB4($)),Y}function VL9($,Y){var X=Y?zL9($.buffer):$.buffer;return new $.constructor(X,$.byteOffset,$.length)}function FL9($,Y){var X=-1,G=$.length;Y||(Y=Array(G));while(++X<G)Y[X]=$[X];return Y}function LL9($,Y,X,G){var J=!X;X||(X={});var Q=-1,W=Y.length;while(++Q<W){var K=Y[Q],Z=G?G(X[K],$[K],K,X,$):void 0;if(Z===void 0)Z=$[K];if(J)Dd0(X,K,Z);else XL9(X,K,Z)}return X}function DL9($){return ZL9(function(Y,X){var G=-1,J=X.length,Q=J>1?X[J-1]:void 0,W=J>2?X[2]:void 0;if(Q=$.length>3&&typeof Q=="function"?(J--,Q):void 0,W&&OL9(X[0],X[1],W))Q=J<3?void 0:Q,J=1;Y=Object(Y);while(++G<J){var K=X[G];if(K)$(Y,K,G,Q)}return Y})}function NL9($){return function(Y,X,G){var J=-1,Q=Object(Y),W=G(Y),K=W.length;while(K--){var Z=W[$?K:++J];if(X(Q[Z],Z,Q)===!1)break}return Y}}function nY0($,Y){var X=$.__data__;return EL9(Y)?X[typeof Y=="string"?"string":"hash"]:X.map}function Nd0($,Y){var X=PF9($,Y);return JL9(X)?X:void 0}function AL9($){var Y=qV.call($,IM),X=$[IM];try{$[IM]=void 0;var G=!0}catch(Q){}var J=jB4.call($);if(G)if(Y)$[IM]=X;else delete $[IM];return J}function BL9($){return typeof $.constructor=="function"&&!kB4($)?xF9(TB4($)):{}}function SB4($,Y){var X=typeof $;return Y=Y==null?EB4:Y,!!Y&&(X=="number"||X!="symbol"&&OF9.test($))&&($>-1&&$%1==0&&$<Y)}function OL9($,Y,X){if(!SM(X))return!1;var G=typeof Y;if(G=="number"?Ad0(X)&&SB4(Y,X.length):G=="string"&&(Y in X))return rY0(X[Y],$);return!1}function EL9($){var Y=typeof $;return Y=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?$!=="__proto__":$===null}function ML9($){return!!VB4&&VB4 in $}function kB4($){var Y=$&&$.constructor,X=typeof Y=="function"&&Y.prototype||dY0;return $===X}function RL9($){var Y=[];if($!=null)for(var X in Object($))Y.push(X);return Y}function qL9($){return jB4.call($)}function PL9($,Y,X){return Y=AB4(Y===void 0?$.length-1:Y,0),function(){var G=arguments,J=-1,Q=AB4(G.length-Y,0),W=Array(Q);while(++J<Q)W[J]=G[Y+J];J=-1;var K=Array(Y+1);while(++J<Y)K[J]=G[J];return K[Y]=X(W),MF9($,this,K)}}function Vd0($,Y){if(Y==="constructor"&&typeof $[Y]==="function")return;if(Y=="__proto__")return;return $[Y]}var wL9=_L9(UL9);function _L9($){var Y=0,X=0;return function(){var G=vF9(),J=cV9-(G-X);if(X=G,J>0){if(++Y>=dV9)return arguments[0]}else Y=0;return $.apply(void 0,arguments)}}function jL9($){if($!=null){try{return cY0.call($)}catch(Y){}try{return $+""}catch(Y){}}return""}function rY0($,Y){return $===Y||$!==$&&Y!==Y}var Fd0=BB4(function(){return arguments}())?BB4:function($){return gp($)&&qV.call($,"callee")&&!CF9.call($,"callee")},Ld0=Array.isArray;function Ad0($){return $!=null&&xB4($.length)&&!Bd0($)}function TL9($){return gp($)&&Ad0($)}var vB4=kF9||vL9;function Bd0($){if(!SM($))return!1;var Y=iY0($);return Y==RB4||Y==sV9||Y==iV9||Y==$F9}function xB4($){return typeof $=="number"&&$>-1&&$%1==0&&$<=EB4}function SM($){var Y=typeof $;return $!=null&&(Y=="object"||Y=="function")}function gp($){return $!=null&&typeof $=="object"}function IL9($){if(!gp($)||iY0($)!=qB4)return!1;var Y=TB4($);if(Y===null)return!0;var X=qV.call(Y,"constructor")&&Y.constructor;return typeof X=="function"&&X instanceof X&&cY0.call(X)==TF9}var yB4=zB4?qF9(zB4):QL9;function CL9($){return LL9($,bB4($))}function bB4($){return Ad0($)?YL9($,!0):WL9($)}var SL9=DL9(function($,Y,X){CB4($,Y,X)});function kL9($){return function(){return $}}function hB4($){return $}function vL9(){return!1}zC.exports=SL9});var gB4=o((uM$,xL9)=>{xL9.exports={name:"probe-image-size",version:"7.3.0",description:"Get image size without full download (JPG, GIF, PNG, WebP, BMP, TIFF, PSD)",keywords:["image","size","jpg","jpeg","ico","gif","png","webp","tiff","bmp","svg","psd"],repository:"nodeca/probe-image-size",funding:[{type:"github",url:"https://github.com/sponsors/puzrin"},{type:"github",url:"https://github.com/sponsors/nodeca"}],license:"MIT",files:["index.js","http.js","stream.js","sync.js","lib/"],scripts:{lint:"eslint .",test:"npm run lint && nyc node --test",coverage:"npm run test && nyc report --reporter html","report-coveralls":"nyc --reporter=lcov node --test"},dependencies:{"lodash.merge":"^4.6.2",needle:"^2.5.2","stream-parser":"~0.3.1"},devDependencies:{eslint:"^9.39.4",neostandard:"^0.13.0",nyc:"^18.0.0"}}});var uB4=o((pM$,Od0)=>{var yL9=P4().ProbeError,bL9=UB4(),hL9=fB4(),mB4=gB4(),fL9=jp0(),gL9=A0("url").URL,mL9=mB4.name+"/"+mB4.version+"(+https://github.com/nodeca/probe-image-size)",uL9={open_timeout:1e4,response_timeout:60000,read_timeout:60000,follow_max:10,parse_response:!1,headers:{"User-Agent":mL9}};Od0.exports=function(Y,X){return new Promise(function(G,J){var Q,W,K=Y,Z=!1;function H(){if(Q&&Q.request)Q.request.abort()}function z(F,L){if(Z)return;if(Z=!0,L){J(L),H();return}G(F),H()}try{var V=hL9({},uL9,X);Q=bL9.get(Y,V)}catch(F){J(F);return}Q.on("redirect",function(F){try{K=new gL9(F,K).href}catch(L){z(null,L)}}),Q.on("header",function(F,L){if(F!==200){z(null,new yL9("bad status code: "+F,null,F));return}W=L["content-length"]}),Q.on("err",function(F){z(null,F)}),Q.on("done",function(F){if(F)z(null,F)}),fL9(Q,!0).then(function(F){if(W&&W.match(/^\d+$/))F.length=+W;F.url=K,z(F)}).catch(function(F){z(null,F)})})};Od0.exports.parsers=NY0()});var dB4=o((dM$,pB4)=>{var pL9=P4().str2arr,dL9=P4().sliceEq,cL9=P4().readUInt32BE,aY0=Mp0(),lL9=qM(),iL9=pL9("ftyp");pB4.exports=function($){if(!dL9($,4,iL9))return;var Y=aY0.unbox($,0);if(!Y)return;var X=aY0.getMimeType(Y.data);if(!X)return;var G,J=Y.end;for(;;){var Q=aY0.unbox($,J);if(!Q)break;if(J=Q.end,Q.boxtype==="mdat")return;if(Q.boxtype==="meta"){G=Q.data;break}}if(!G)return;var W=aY0.readSizeFromMeta(G);if(!W)return;var K={width:W.width,height:W.height,type:X.type,mime:X.mime,wUnits:"px",hUnits:"px"};if(W.variants.length>1)K.variants=W.variants;if(W.orientation)K.orientation=W.orientation;if(W.exif_location&&W.exif_location.offset+W.exif_location.length<=$.length){var Z=cL9($,W.exif_location.offset),H=$.slice(W.exif_location.offset+Z+4,W.exif_location.offset+W.exif_location.length),z=lL9.get_orientation(H);if(z>0)K.orientation=z}return K}});var nB4=o((cM$,iB4)=>{var nL9=P4().str2arr,rL9=P4().sliceEq,cB4=P4().readInt16LE,lB4=P4().readInt32LE,aL9=P4().readUInt32LE,sL9=nL9("BM");iB4.exports=function($){if($.length<26)return;if(!rL9($,0,sL9))return;var Y,X,G=aL9($,14);if(G===12)X=cB4($,18),Y=cB4($,20);else if(G>12)X=lB4($,18),Y=lB4($,22);else return;return{width:X,height:Math.abs(Y),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}});var tB4=o((lM$,oB4)=>{var sB4=P4().str2arr,rB4=P4().sliceEq,aB4=P4().readUInt16LE,oL9=sB4("GIF87a"),tL9=sB4("GIF89a");oB4.exports=function($){if($.length<10)return;if(!rB4($,0,oL9)&&!rB4($,0,tL9))return;return{width:aB4($,6),height:aB4($,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var $O4=o((iM$,eB4)=>{var Ed0=P4().readUInt16LE,eL9=0,$D9=1,Md0=16;eB4.exports=function($){var Y=Ed0($,0),X=Ed0($,2),G=Ed0($,4);if(Y!==eL9||X!==$D9||!G)return;if($.length<6+G*Md0)return;var J=[],Q={width:0,height:0};for(var W=0;W<G;W++){var K=$[6+Md0*W]||256,Z=$[6+Md0*W+1]||256,H={width:K,height:Z};if(J.push(H),K>Q.width||Z>Q.height)Q=H}return{width:Q.width,height:Q.height,variants:J,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}});var XO4=o((nM$,YO4)=>{var Rd0=P4().readUInt16BE,YD9=P4().str2arr,XD9=P4().sliceEq,GD9=qM(),JD9=YD9("Exif\x00\x00");YO4.exports=function($){if($.length<2)return;if($[0]!==255||$[1]!==216||$[2]!==255)return;var Y=2;for(;;){for(;;){if($.length-Y<2)return;if($[Y++]===255)break}var X=$[Y++],G;while(X===255)X=$[Y++];if(X>=208&&X<=217||X===1)G=0;else if(X>=192&&X<=254){if($.length-Y<2)return;G=Rd0($,Y)-2,Y+=2}else return;if(X===217||X===218)return;var J;if(X===225&&G>=10&&XD9($,Y,JD9))J=GD9.get_orientation($.slice(Y+6,Y+G));if(G>=5&&(X>=192&&X<=207)&&X!==196&&X!==200&&X!==204){if($.length-Y<G)return;var Q={width:Rd0($,Y+3),height:Rd0($,Y+1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};if(J>0)Q.orientation=J;return Q}Y+=G}}});var KO4=o((rM$,WO4)=>{var QO4=P4().str2arr,GO4=P4().sliceEq,JO4=P4().readUInt32BE,QD9=QO4(`\x89PNG\r
\x1A
`),WD9=QO4("IHDR");WO4.exports=function($){if($.length<24)return;if(!GO4($,0,QD9))return;if(!GO4($,12,WD9))return;return{width:JO4($,16),height:JO4($,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}});var HO4=o((aM$,UO4)=>{var KD9=P4().str2arr,ZD9=P4().sliceEq,ZO4=P4().readUInt32BE,UD9=KD9("8BPS\x00\x01");UO4.exports=function($){if($.length<22)return;if(!ZD9($,0,UD9))return;return{width:ZO4($,18),height:ZO4($,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var FO4=o((sM$,VO4)=>{function HD9($){return $===32||$===9||$===13||$===10}function LC($){return typeof $==="number"&&isFinite($)&&$>0}function zD9($){var Y=0,X=$.length;if($[0]===239&&$[1]===187&&$[2]===191)Y=3;while(Y<X&&HD9($[Y]))Y++;if(Y===X)return!1;return $[Y]===60}var VD9=/<[-_.:a-zA-Z0-9][^>]*>/,FD9=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,LD9=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,DD9=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,ND9=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,zO4=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function AD9($){var Y=$.match(LD9),X=$.match(DD9),G=$.match(ND9);return{width:Y&&(Y[1]||Y[2]),height:X&&(X[1]||X[2]),viewbox:G&&(G[1]||G[2])}}function UH($){if(!zO4.test($))return"px";return $.match(zO4)[0]}VO4.exports=function($){if(!zD9($))return;var Y="";for(var X=0;X<$.length;X++)Y+=String.fromCharCode($[X]);var G=(Y.match(VD9)||[""])[0];if(!FD9.test(G))return;var J=AD9(G),Q=parseFloat(J.width),W=parseFloat(J.height);if(J.width&&J.height){if(!LC(Q)||!LC(W))return;return{width:Q,height:W,type:"svg",mime:"image/svg+xml",wUnits:UH(J.width),hUnits:UH(J.height)}}var K=(J.viewbox||"").split(" "),Z={width:K[2],height:K[3]},H=parseFloat(Z.width),z=parseFloat(Z.height);if(!LC(H)||!LC(z))return;if(UH(Z.width)!==UH(Z.height))return;var V=H/z;if(J.width){if(!LC(Q))return;return{width:Q,height:Q/V,type:"svg",mime:"image/svg+xml",wUnits:UH(J.width),hUnits:UH(J.width)}}if(J.height){if(!LC(W))return;return{width:W*V,height:W,type:"svg",mime:"image/svg+xml",wUnits:UH(J.height),hUnits:UH(J.height)}}return{width:H,height:z,type:"svg",mime:"image/svg+xml",wUnits:UH(Z.width),hUnits:UH(Z.height)}}});var BO4=o((oM$,AO4)=>{var NO4=P4().str2arr,LO4=P4().sliceEq,BD9=P4().readUInt16LE,OD9=P4().readUInt16BE,ED9=P4().readUInt32LE,MD9=P4().readUInt32BE,RD9=NO4("II*\x00"),qD9=NO4("MM\x00*");function sY0($,Y,X){return X?OD9($,Y):BD9($,Y)}function qd0($,Y,X){return X?MD9($,Y):ED9($,Y)}function DO4($,Y,X){var G=sY0($,Y+2,X),J=qd0($,Y+4,X);if(J!==1||G!==3&&G!==4)return null;if(G===3)return sY0($,Y+8,X);return qd0($,Y+8,X)}AO4.exports=function($){if($.length<8)return;if(!LO4($,0,RD9)&&!LO4($,0,qD9))return;var Y=$[0]===77,X=qd0($,4,Y)-8;if(X<0)return;var G=X+8;if($.length-G<2)return;var J=sY0($,G+0,Y)*12;if(J<=0)return;if(G+=2,$.length-G<J)return;var Q,W,K,Z;for(Q=0;Q<J;Q+=12)if(Z=sY0($,G+Q,Y),Z===256)W=DO4($,G+Q,Y);else if(Z===257)K=DO4($,G+Q,Y);if(W&&K)return{width:W,height:K,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}}});var qO4=o((tM$,RO4)=>{var MO4=P4().str2arr,OO4=P4().sliceEq,EO4=P4().readUInt16LE,Pd0=P4().readUInt32LE,PD9=qM(),wD9=MO4("RIFF"),_D9=MO4("WEBP");function jD9($,Y){if($[Y+3]!==157||$[Y+4]!==1||$[Y+5]!==42)return;return{width:EO4($,Y+6)&16383,height:EO4($,Y+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function TD9($,Y){if($[Y]!==47)return;var X=Pd0($,Y+1);return{width:(X&16383)+1,height:(X>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function ID9($,Y){return{width:($[Y+6]<<16|$[Y+5]<<8|$[Y+4])+1,height:($[Y+9]<<16|$[Y+8]<<8|$[Y+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}RO4.exports=function($){if($.length<16)return;if(!OO4($,0,wD9)||!OO4($,8,_D9))return;var Y=12,X=null,G=0,J=Pd0($,4)+8;if(J>$.length)return;while(Y+8<J){if($[Y]===0){Y++;continue}var Q=String.fromCharCode.apply(null,$.slice(Y,Y+4)),W=Pd0($,Y+4);if(Q==="VP8 "&&W>=10)X=X||jD9($,Y+8);else if(Q==="VP8L"&&W>=5)X=X||TD9($,Y+8);else if(Q==="VP8X"&&W>=10)X=X||ID9($,Y+8);else if(Q==="EXIF")G=PD9.get_orientation($.slice(Y+8,Y+8+W)),Y=1/0;Y+=8+W}if(!X)return;if(G>0)X.orientation=G;return X}});var wO4=o((eM$,PO4)=>{PO4.exports={avif:dB4(),bmp:nB4(),gif:tB4(),ico:$O4(),jpeg:XO4(),png:KO4(),psd:HO4(),svg:FO4(),tiff:BO4(),webp:qO4()}});var _O4=o(($R$,_d0)=>{var wd0=wO4();function CD9($){var Y=Object.keys(wd0);for(var X=0;X<Y.length;X++){var G=wd0[Y[X]]($);if(G){if(G.width>0&&G.height>0)return G;return null}}return null}_d0.exports=function(Y){return CD9(Y)};_d0.exports.parsers=wd0});var jO4=o((YR$,mp)=>{var SD9=jp0(),kD9=uB4();mp.exports=function(Y,X){if(typeof Y.on==="function"&&typeof Y.emit==="function")return SD9(Y,X);return kD9(Y,X||{})};mp.exports.parsers=NY0();mp.exports.sync=_O4();mp.exports.Error=P4().ProbeError});import{appendFileSync as vD9,writeFileSync as QN,mkdirSync as xD9}from"fs";import{join as zH}from"path";import{randomBytes as yD9,createHash as nO4,randomUUID as bD9}from"crypto";import{inspect as hD9}from"util";import{AsyncLocalStorage as fD9}from"async_hooks";function S4($){if(!vd0)return;try{vD9(vd0,`[${new Date().toLocaleString()}] ${$}
`)}catch{}}function cW($,Y){let X=Y instanceof Error?Y.stack??Y.message:Y!==void 0?String(Y):"",G=X?`${$}: ${X}`:$;S4(`[OM:ERROR] ${G}`)}function nd0($,Y){return`${$}:${Y}`}function lp($,Y){let X=nd0($,Y);BC.set(X,(BC.get(X)??0)+1)}function NC($,Y){let X=nd0($,Y),G=BC.get(X);if(!G)return;if(G<=1)BC.delete(X);else BC.set(X,G-1)}function $X0($,Y){return(BC.get(nd0($,Y))??0)>0}function rO4($,Y){if($===void 0||Y===void 0)return!1;let X=$.includes("/"),G=Y.includes("/");if(X&&G)return $!==Y;let J=X?$.slice($.indexOf("/")+1):$,Q=G?Y.slice(Y.indexOf("/")+1):Y;return J!==Q}function aO4($,Y){let X=Y.getTime()-$.getTime(),G=Math.floor(X/86400000);if(G<0){let J=Math.abs(G);if(J===1)return"tomorrow";if(J<7)return`in ${J} days`;if(J<14)return"in 1 week";if(J<30)return`in ${Math.floor(J/7)} weeks`;if(J<60)return"in 1 month";if(J<365)return`in ${Math.floor(J/30)} months`;let Q=Math.floor(J/365);return`in ${Q} year${Q>1?"s":""}`}if(G===0)return"today";if(G===1)return"yesterday";if(G<7)return`${G} days ago`;if(G<14)return"1 week ago";if(G<30)return`${Math.floor(G/7)} weeks ago`;if(G<60)return"1 month ago";if(G<365)return`${Math.floor(G/30)} months ago`;return`${Math.floor(G/365)} year${Math.floor(G/365)>1?"s":""} ago`}function gD9($,Y){let X=Y.getTime()-$.getTime(),G=Math.floor(X/86400000);if(G<=1)return null;else if(G<7)return`[${G} days later]`;else if(G<14)return"[1 week later]";else if(G<30)return`[${Math.floor(G/7)} weeks later]`;else if(G<60)return"[1 month later]";else return`[${Math.floor(G/30)} months later]`}function mD9($){let Y=null,X=$.match(/([A-Z][a-z]+)\s+(\d{1,2}),?\s+(\d{4})/);if(X){let G=new Date(`${X[1]} ${X[2]}, ${X[3]}`);if(!isNaN(G.getTime()))Y=G}if(!Y){let G=$.match(/([A-Z][a-z]+)\s+(\d{1,2})-\d{1,2},?\s+(\d{4})/);if(G){let J=new Date(`${G[1]} ${G[2]}, ${G[3]}`);if(!isNaN(J.getTime()))Y=J}}if(!Y){let G=$.match(/(late|early|mid)[- ]?(?:to[- ]?(?:late|early|mid)[- ]?)?([A-Z][a-z]+)\s+(\d{4})/i);if(G){let J=G[2],Q=G[3],W=G[1].toLowerCase(),K=15;if(W==="early")K=7;if(W==="late")K=23;let Z=new Date(`${J} ${K}, ${Q}`);if(!isNaN(Z.getTime()))Y=Z}}if(!Y){let G=$.match(/([A-Z][a-z]+)\s+to\s+(?:early\s+)?([A-Z][a-z]+)\s+(\d{4})/i);if(G){let J=new Date(`${G[2]} 1, ${G[3]}`);if(!isNaN(J.getTime()))Y=J}}return Y}function uD9($){return[/\bwill\s+(?:be\s+)?(?:\w+ing|\w+)\b/i,/\bplans?\s+to\b/i,/\bplanning\s+to\b/i,/\blooking\s+forward\s+to\b/i,/\bgoing\s+to\b/i,/\bintends?\s+to\b/i,/\bwants?\s+to\b/i,/\bneeds?\s+to\b/i,/\babout\s+to\b/i].some((X)=>X.test($))}function pD9($,Y){let X=/\((estimated|meaning)\s+([^)]+\d{4})\)/gi;return $.replace(X,(G,J,Q,W)=>{let K=mD9(Q);if(K){let Z=aO4(K,Y),H=$.lastIndexOf(`
`,W)+1,z=$.slice(H,W),V=K<Y,F=uD9(z);if(V&&F)return`(${J} ${Q} - ${Z}, likely already happened)`;return`(${J} ${Q} - ${Z})`}return G})}function dD9($,Y){let X=pD9($,Y),G=/^(Date:\s*)([A-Z][a-z]+ \d{1,2}, \d{4})$/gm,J=[],Q;while((Q=G.exec(X))!==null){let Z=Q[2],H=new Date(Z);if(!isNaN(H.getTime()))J.push({index:Q.index,date:H,match:Q[0],prefix:Q[1],dateStr:Z})}if(J.length===0)return X;let W="",K=0;for(let Z=0;Z<J.length;Z++){let H=J[Z],z=Z>0?J[Z-1]:null;if(W+=X.slice(K,H.index),z){let F=gD9(z.date,H.date);if(F)W+=`
${F}

`}let V=aO4(H.date,Y);W+=`${H.prefix}${H.dateStr} (${V})`,K=H.index+H.match.length}return W+=X.slice(K),W}function lD9($){if($<cD9)return null;let Y=60000,X=60*Y,G=24*X,J=7*G,Q=30*G,W=365*G,K=(H,z)=>`${H} ${z}${H===1?"":"s"}`;if($<X){let H=Math.max(1,Math.round($/Y));return`${K(H,"minute")} later`}let Z=(H,z,V,F)=>{let L=Math.floor($/H),N=$-L*H,D=Math.floor(N/V),A=[K(L,z)];if(D>0)A.push(K(D,F));return`${A.join(" ")} later`};if($<G)return Z(X,"hour",Y,"minute");if($<J)return Z(G,"day",X,"hour");if($<Q)return Z(J,"week",G,"day");if($<W)return Z(Q,"month",J,"week");return Z(W,"year",Q,"month")}function sO4($){return $.toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"2-digit",hour12:!0,timeZoneName:"short"})}function TO4($,Y){let X=$.content?.parts?.map((G)=>("createdAt"in G)?G.createdAt:void 0).filter((G)=>typeof G==="number");if(X&&X.length>0){let G=Y==="first"?0:X.length-1,J=X[G];if(J!==void 0)return J}return new Date($.createdAt).getTime()}function YX0($){return $.id.startsWith("__temporal_")}function XX0($){return{type:"data-om-observation-start",data:{cycleId:$.cycleId,operationType:$.operationType,startedAt:new Date().toISOString(),tokensToObserve:$.tokensToObserve,recordId:$.recordId,threadId:$.threadId,threadIds:$.threadIds,config:$.config}}}function rd0($){let Y=new Date().toISOString(),X=new Date(Y).getTime()-new Date($.startedAt).getTime();return{type:"data-om-observation-end",data:{cycleId:$.cycleId,operationType:$.operationType,completedAt:Y,durationMs:X,tokensObserved:$.tokensObserved,observationTokens:$.observationTokens,observations:$.observations,currentTask:$.currentTask,suggestedResponse:$.suggestedResponse,recordId:$.recordId,threadId:$.threadId}}}function GX0($){let Y=new Date().toISOString(),X=new Date(Y).getTime()-new Date($.startedAt).getTime();return{type:"data-om-observation-failed",data:{cycleId:$.cycleId,operationType:$.operationType,failedAt:Y,durationMs:X,tokensAttempted:$.tokensAttempted,error:$.error,recordId:$.recordId,threadId:$.threadId}}}function xd0($){return{type:"data-om-buffering-start",data:{cycleId:$.cycleId,operationType:$.operationType,startedAt:new Date().toISOString(),tokensToBuffer:$.tokensToBuffer,recordId:$.recordId,threadId:$.threadId,threadIds:$.threadIds,config:$.config}}}function oO4($){let Y=new Date().toISOString(),X=new Date(Y).getTime()-new Date($.startedAt).getTime();return{type:"data-om-buffering-end",data:{cycleId:$.cycleId,operationType:$.operationType,completedAt:Y,durationMs:X,tokensBuffered:$.tokensBuffered,bufferedTokens:$.bufferedTokens,recordId:$.recordId,threadId:$.threadId,observations:$.observations}}}function tO4($){let Y=new Date().toISOString(),X=new Date(Y).getTime()-new Date($.startedAt).getTime();return{type:"data-om-buffering-failed",data:{cycleId:$.cycleId,operationType:$.operationType,failedAt:Y,durationMs:X,tokensAttempted:$.tokensAttempted,error:$.error,recordId:$.recordId,threadId:$.threadId}}}function eO4($){return{type:"data-om-activation",data:{cycleId:$.cycleId,operationType:$.operationType,activatedAt:new Date().toISOString(),chunksActivated:$.chunksActivated,tokensActivated:$.tokensActivated,observationTokens:$.observationTokens,messagesActivated:$.messagesActivated,recordId:$.recordId,threadId:$.threadId,generationCount:$.generationCount,config:$.config,observations:$.observations,triggeredBy:$.triggeredBy,lastActivityAt:$.lastActivityAt,ttlExpiredMs:$.ttlExpiredMs,previousModel:$.previousModel,currentModel:$.currentModel}}}function ad0($){return{type:"data-om-thread-update",data:{cycleId:$.cycleId,threadId:$.threadId,oldTitle:$.oldTitle,newTitle:$.newTitle,timestamp:new Date().toISOString()}}}function ip($){let Y=$.content?.parts;if(!Y||!Array.isArray(Y))return-1;for(let X=Y.length-1;X>=0;X--)if(Y[X]?.type==="data-om-observation-end")return X;return-1}function eY0($){let Y=$.content?.parts;if(!Y||!Array.isArray(Y))return[];let X=ip($);if(X===-1)return Y.filter((G)=>{return G?.type!=="data-om-observation-start"});return Y.slice(X+1).filter((G)=>{return!G?.type?.startsWith("data-om-observation-")})}function sd0($){let Y;for(let X of $){if(!X?.id||!X.createdAt)continue;if(!Y||new Date(X.createdAt).getTime()>new Date(Y.createdAt).getTime())Y=X}return Y?{createdAt:new Date(Y.createdAt).toISOString(),id:Y.id}:void 0}function iD9($,Y){if(!$.createdAt)return!1;let X=new Date($.createdAt).toISOString();if(X<Y.createdAt)return!0;if(X===Y.createdAt&&$.id===Y.id)return!0;return!1}function nD9($){let{messageList:Y,record:X}=$,G=Y.get.all.db(),J=$.useMarkerBoundaryPruning??!0,Q=-1,W=null;for(let K=G.length-1;K>=0;K--){let Z=G[K];if(!Z)continue;if(ip(Z)!==-1){Q=K,W=Z;break}}if(J&&W&&Q!==-1){let K=[];for(let H=0;H<Q;H++){let z=G[H];if(z?.id&&z.id!=="om-continuation")K.push(z.id)}if(K.length>0)Y.removeByIds(K);let Z=eY0(W);if(Z.length===0){if(W.id)Y.removeByIds([W.id])}else if(Z.length<(W.content?.parts?.length??0))W.content.parts=Z}else if(X){let K=new Set(Array.isArray(X.observedMessageIds)?X.observedMessageIds:[]),Z=$.fallbackCursor??sd0(G.filter((V)=>!!V?.id&&K.has(V.id)&&!!V.createdAt)),H=X.lastObservedAt,z=[];for(let V of G){if(!V?.id||V.id==="om-continuation")continue;if(K.has(V.id)){z.push(V.id);continue}if(Z&&iD9(V,Z)){z.push(V.id);continue}if(H&&V.createdAt){if(new Date(V.createdAt)<=H)z.push(V.id)}}if(z.length>0)Y.removeByIds(z)}}function kM($){if(!$?.bufferedObservationChunks)return[];if(Array.isArray($.bufferedObservationChunks))return $.bufferedObservationChunks;if(typeof $.bufferedObservationChunks==="string")try{let Y=JSON.parse($.bufferedObservationChunks);return Array.isArray(Y)?Y:[]}catch{return[]}return[]}function rD9($,Y){if(!$&&!Y)return;if(!$)return Y;if(!Y)return $;return`${$}

--- BUFFERED (pending activation) ---

${Y}`}function aD9($){return Array.from($.entries()).map(([Y,X])=>({threadId:Y,oldestTimestamp:Math.min(...X.map((G)=>G.createdAt?new Date(G.createdAt).getTime():Date.now()))})).sort((Y,X)=>Y.oldestTimestamp-X.oldestTimestamp).map((Y)=>Y.threadId)}function $E4($){return $.replace(/<\/?thread\b[^>]{0,1024}>/gi,"").trim()}function sD9($){if(typeof $==="string")return!0;if(!$||typeof $!=="object")return!1;return"modelId"in $||"id"in $||"providerId"in $||"provider"in $||"doGenerate"in $&&"doStream"in $}function oD9($){let Y=Object.entries($.upTo);if(Y.length===0)throw Error('ModelByInputTokens requires at least one threshold in "upTo"');for(let[X,G]of Y){let J=Number(X);if(!Number.isFinite(J)||J<=0)throw Error(`ModelByInputTokens threshold keys must be positive numbers. Got: ${X}`);if(!sD9(G))throw Error(`ModelByInputTokens requires a valid model target for threshold ${X}`)}return Y.map(([X,G])=>({limit:Number(X),model:G})).sort((X,G)=>X.limit-G.limit)}function eD9($){let Y={};for(let X of $.matchAll(tD9)){let[,G,J]=X;if(G&&J!==void 0)Y[G]=J}return Y}function $N9($){let Y=$.trim();if(!Y||!IO4.test(Y))return[];return Y.split(IO4).map((X)=>X.trim()).filter(Boolean).map((X)=>{let G=X.indexOf(`
`),J=(G>=0?X.slice(0,G):X).trim(),Q=(G>=0?X.slice(G+1):"").trim();return{heading:J,body:YN9(Q)}})}function YN9($){return $.replace(/^_range:\s*`[^`]*`_\s*\n?/m,"").trim()}function YE4(){return yD9(8).toString("hex")}function wV($,Y,X=YE4(),G,J){let Q=$.trim(),W=J?` kind="${J}"`:"";return`<observation-group id="${X}" range="${Y}"${W}>
${Q}
</observation-group>`}function ap($){if(!$)return[];let Y=[],X;while((X=od0.exec($))!==null){let G=eD9(X[1]??""),J=G.id,Q=G.range;if(!J||!Q)continue;Y.push({id:J,range:Q,kind:G.kind,content:X[2].trim()})}return Y}function td0($){if(!$)return $;return $.replace(od0,(Y,X,G)=>G.trim()).replace(/\n{3,}/g,`

`).trim()}function XN9($){return $.split(",").map((Y)=>Y.trim()).filter(Boolean)}function zX0($){let Y=$.flatMap((W)=>XN9(W.range));if(Y.length===0)return"";let X=Y[0],G=Y[Y.length-1],J=X?.split(":")[0]?.trim(),Q=G?.split(":").at(-1)?.trim();if(J&&Q)return`${J}:${Q}`;return Array.from(new Set(Y)).join(",")}function ed0($){let Y=ap($);if(Y.length===0)return null;let X=new Map(Y.map((J)=>[J.content.trim(),J]));return $.replace(od0,(J,Q,W)=>{let K=X.get(W.trim());if(!K)return W.trim();return`## Group \`${K.id}\`
_range: \`${K.range}\`_

${K.content}`}).replace(/\n{3,}/g,`

`).trim()}function GN9($,Y){return $.match(/`([^`]+)`/)?.[1]?.trim()||`derived-group-${Y+1}`}function $c0($,Y){let X=$N9($);if(X.length===0||Y.length===0)return[];return X.map((G,J)=>{let Q=new Set(G.body.split(`
`).map((z)=>z.trim()).filter(Boolean)),W=Y.filter((z)=>{return z.content.split(`
`).map((F)=>F.trim()).filter(Boolean).some((F)=>Q.has(F))}),K=Y[Math.min(J,Y.length-1)],Z=W.length>0?W:K?[K]:[];return{id:GN9(G.heading,J),range:zX0(Z),kind:"reflection",content:G.body}})}function Yc0($,Y){let X=ap(Y);if(X.length===0)return null;let G=$.trim();if(!G)return"";let J=$c0(G,X);if(J.length>0)return J.map((Q)=>wV(Q.content,Q.range,Q.id,void 0,Q.kind)).join(`

`);return wV(G,zX0(X),YE4(),void 0,"reflection")}function a7($){if(typeof $==="number")return $;return $.max}function CO4($,Y){if(typeof $==="number")return $;let{max:X,min:G}=$,J=Math.max(X-Y,G);return Math.round(J)}function JN9($,Y){if($===!1)return;if($===void 0)return;if($>0&&$<1)return Math.round(a7(Y)*$);return $}function SO4($,Y){if($===void 0)return;if($>=1&&$<100)return Math.round(a7(Y)*$);return $}function XE4($,Y){if($>=1000)return $;let X=Math.max(0,Math.min(1,$));return Y*(1-X)}function QN9($,Y){if($>=1000)return Math.max(0,Math.min(1,1-$/Y));return Math.max(0,Math.min(1,$))}function WN9($,Y,X,G){if($.length===0)return 0;let J=XE4(Y,X),Q=Math.max(0,G-J);if(Q===0)return 0;let W=0,K=0,Z=0,H=0,z=0;for(let B=0;B<$.length;B++){W+=$[B].messageTokens??0;let O=B+1;if(W>=Q){if(K===0||W<Z)K=O,Z=W}else if(W>z)H=O,z=W}let V=J*0.95,F=Z-Q,L=G-Z,N=G-z,D=Math.min(1000,J),A;if(K>0&&F<=V&&L>=D)A=Z;else if(H>0&&N>=D)A=z;else if(K>0)A=Z;else return $[0]?.messageTokens??0;return A}async function GE4({memory:$,messageList:Y,threadId:X,resourceId:G}){let J=await $.getContext({threadId:X,resourceId:G});for(let Q of J.messages)if(Q.role!=="system")Y.add(Q,"memory");return J}function BN9($,Y){return Y===0?`O${$}`:`O${$}-N${Y}`}function Xc0($){return $.match(FN9)?.[1]??null}function ON9($){let Y=$.trim();if(!Y)return!1;if(Xc0(Y))return!1;if(LN9.test(Y))return!1;if(DN9.test(Y))return!1;if(NN9.test(Y)||AN9.test(Y))return!1;return!0}function EN9($){let Y=$.match(/^\s*/)?.[0]??"";return Math.floor(Y.replace(/\t/g,"  ").length/2)}function JE4($){if(!$)return $;let Y=$.split(`
`),X=0,G=0,J=!1;for(let Q=0;Q<Y.length;Q++){let W=Y[Q];if(!ON9(W))continue;if(EN9(W)===0)X+=1,G=0;else{if(X===0)X=1;G+=1}let Z=BN9(X,G),H=W.match(/^\s*/)?.[0]??"";Y[Q]=`${H}[${Z}] ${W.slice(H.length)}`,J=!0}return J?Y.join(`
`):$}function VX0($){if(!$)return $;return $.replace(/(^|\n)([^\S\n]*)\[(O\d+(?:-N\d+)?)\][^\S\n]*/g,"$1$2")}function Gc0($,Y){if(Y<=0)return"";if(Y>=$.length)return $;let X=$.charCodeAt(Y-1),G=X>=55296&&X<=56319?Y-1:Y;return $.slice(0,G)}function qN9($){return typeof $==="object"&&$!==null}function yd0($,Y=new WeakMap){if(!qN9($))return $;if(Y.has($))return Y.get($);if(Array.isArray($)){let G=[];Y.set($,G);for(let J of $)G.push(yd0(J,Y));return G}let X={};Y.set($,X);for(let[G,J]of Object.entries($)){if(G===MN9&&typeof J==="string"&&J.length>RN9){X[G]=`[stripped encryptedContent: ${J.length} characters]`;continue}X[G]=yd0(J,Y)}return X}function PN9($){if(typeof $==="string")return $;let Y=yd0($);try{return JSON.stringify(Y,null,2)}catch{return String(Y)}}function FX0($,Y){let X=$?.providerMetadata?.mastra;if(X&&typeof X==="object"&&"modelOutput"in X)return{value:X.modelOutput,usingStoredModelOutput:!0};return{value:Y,usingStoredModelOutput:!1}}function bM($,Y){if(!$||Y<=0)return"";let X=JG($);if(X<=Y)return $;let G=(K)=>{let Z=Gc0($,K);return`${Z}
... [truncated ~${X-JG(Z)} tokens]`},J=0,Q=$.length,W=G(0);while(J<=Q){let K=Math.floor((J+Q)/2),Z=G(K);if(JG(Z)<=Y)W=Z,J=K+1;else Q=K-1}return W}function sp($,Y){let X=PN9($),G=Y?.maxTokens??QE4;return bM(X,G)}function WE4($=!1){return`Use priority levels:
- \uD83D\uDD34 High: explicit user facts, preferences, unresolved goals, critical context
- \uD83D\uDFE1 Medium: project details, learned information, tool results
- \uD83D\uDFE2 Low: minor details, uncertain observations
- \u2705 Completed: concrete task finished, question answered, issue resolved, goal achieved, or subtask completed in a way that helps the assistant know it is done

Group related observations (like tool sequences) by indenting:
* \uD83D\uDD34 (14:33) Agent debugging auth issue
  * -> ran git status, found 3 modified files
  * -> viewed auth.ts:45-60, found missing null check
  * -> applied fix, tests now pass
  * \u2705 Tests passing, auth issue resolved

Group observations by date, then list each with 24-hour time.

<observations>
Date: Dec 4, 2025
* \uD83D\uDD34 (14:30) User prefers direct answers
* \uD83D\uDD34 (14:31) Working on feature X
* \uD83D\uDFE1 (14:32) User might prefer dark mode

Date: Dec 5, 2025
* \uD83D\uDD34 (09:15) Continued work on feature X
</observations>

<current-task>
State the current task(s) explicitly. Can be single or multiple:
- Primary: What the agent is currently working on
- Secondary: Other pending tasks (mark as "waiting for user" if appropriate)

If the agent started doing something without user approval, note that it's off-task.
</current-task>

<suggested-response>
Hint for the agent's immediate next message. Examples:
- "I've updated the navigation model. Let me walk you through the changes..."
- "The assistant should wait for the user to respond before continuing."
- Call the view tool on src/example.ts to continue debugging.
</suggested-response>${$?`
<thread-title>
A short, noun-phrase title for this conversation (2-5 words). Examples:
- "Auth bug fix" \u2014 not "Fixing the auth bug"
- "Dark mode toggle" \u2014 not "User wants dark mode toggle added"
- "Deployment pipeline setup" \u2014 not "Setting up deployment pipeline for project"
Only update when the topic meaningfully changes.
</thread-title>`:""}`}function OC($=!1,Y,X=!1){let G=WE4(X),J=X?` Each thread's observations, current-task, suggested-response, and thread-title should be nested inside a <thread id="..."> block within <observations>.`:` Each thread's observations, current-task, and suggested-response should be nested inside a <thread id="..."> block within <observations>.`,Q=X?`
<thread-title>Feature X implementation</thread-title>`:"",W=X?`
<thread-title>Deployment setup</thread-title>`:"";if($)return`You are the memory consciousness of an AI assistant. Your observations will be the ONLY information the assistant has about past interactions with this user.

Extract observations that will help the assistant remember:

${bd0}

=== MULTI-THREAD INPUT ===

You will receive messages from MULTIPLE conversation threads, each wrapped in <thread id="..."> tags.
Process each thread separately and output observations for each thread.

=== OUTPUT FORMAT ===

Your output MUST use XML tags to structure the response.${J}

Use this observation format inside each thread block:

${G}

For multi-thread output, wrap each thread's observations like this:

<observations>
<thread id="thread_id_1">
Date: Dec 4, 2025
* \uD83D\uDD34 (14:30) User prefers direct answers
* \uD83D\uDD34 (14:31) Working on feature X

<current-task>
What the agent is currently working on in this thread
</current-task>

<suggested-response>
Hint for the agent's next message in this thread
</suggested-response>${Q}
</thread>

<thread id="thread_id_2">
Date: Dec 5, 2025
* \uD83D\uDD34 (09:15) User asked about deployment

<current-task>
Current task for this thread
</current-task>

<suggested-response>
Suggested response for this thread
</suggested-response>${W}
</thread>
</observations>

=== GUIDELINES ===

${hd0}

Remember: These observations are the assistant's ONLY memory. Make them count.

User messages are extremely important. If the user asks a question or gives a new task, make it clear in <current-task> that this is the priority.${Y?`

=== CUSTOM INSTRUCTIONS ===

${Y}`:""}`;return`You are the memory consciousness of an AI assistant. Your observations will be the ONLY information the assistant has about past interactions with this user.

Extract observations that will help the assistant remember:

${bd0}

=== OUTPUT FORMAT ===

Your output MUST use XML tags to structure the response. This allows the system to properly parse and manage memory over time.

${G}

=== GUIDELINES ===

${hd0}

=== IMPORTANT: THREAD ATTRIBUTION ===

Do NOT add thread identifiers, thread IDs, or <thread> tags to your observations.
Thread attribution is handled externally by the system.
Simply output your observations without any thread-related markup.

Remember: These observations are the assistant's ONLY memory. Make them count.

User messages are extremely important. If the user asks a question or gives a new task, make it clear in <current-task> that this is the priority. If the assistant needs to respond to the user, indicate in <suggested-response> that it should pause for user reply before continuing other tasks.${Y?`

=== CUSTOM INSTRUCTIONS ===

${Y}`:""}`}function jN9($){return $?`${$.toLocaleDateString("en-US",{month:"short"})} ${$.getDate()} ${$.getFullYear()}`:""}function TN9($){return $?$.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}):""}function IN9($){return($.split("#",1)[0]?.split("?",1)[0]??$).match(/\.([a-z0-9]+)$/i)?.[1]?.toLowerCase()}function jd0($){return typeof $==="string"&&_N9.has(IN9($)??"")}function ZE4($){if($.type!=="file")return!1;if(typeof $.mimeType==="string"&&$.mimeType.toLowerCase().startsWith("image/"))return!0;if(typeof $.data==="string"&&$.data.startsWith("data:image/"))return!0;if($.data instanceof URL&&jd0($.data.pathname))return!0;if(typeof $.data==="string")try{let Y=new URL($.data);if((Y.protocol==="http:"||Y.protocol==="https:")&&jd0(Y.pathname))return!0}catch{}return jd0($.filename)}function UE4($){if($.type==="image")return{type:"image",image:$.image,mimeType:$.mimeType,providerOptions:$.providerOptions,providerMetadata:$.providerMetadata,experimental_providerMetadata:$.experimental_providerMetadata};if(ZE4($))return{type:"image",image:$.data,mimeType:$.mimeType,providerOptions:$.providerOptions,providerMetadata:$.providerMetadata,experimental_providerMetadata:$.experimental_providerMetadata};return{type:"file",data:$.data,mimeType:$.mimeType,filename:$.filename,providerOptions:$.providerOptions,providerMetadata:$.providerMetadata,experimental_providerMetadata:$.experimental_providerMetadata}}function CN9($){if($.filename?.trim())return $.filename.trim();let Y=$.type==="image"?$.image:$.data;if(typeof Y!=="string"||Y.startsWith("data:"))return $.mimeType;try{let G=new URL(Y).pathname.split("/").filter(Boolean).pop();return G?decodeURIComponent(G):$.mimeType}catch{return $.mimeType}}function HE4($,Y){let X=$.type==="image"||ZE4($)?"Image":"File",G=X==="Image"?Y.nextImageId++:Y.nextFileId++,J=CN9($);return J?`[${X} #${G}: ${J}]`:`[${X} #${G}]`}function fd0($){return!!$&&typeof $==="object"}function SN9($){if(!fd0($)||typeof $.type!=="string")return;let Y=typeof $.mediaType==="string"?$.mediaType:void 0,X=typeof $.filename==="string"?$.filename:void 0;switch($.type){case"image-data":{let G=$.data;if(typeof G!=="string")return;return{type:"image",image:Y?`data:${Y};base64,${G}`:G,mimeType:Y}}case"image-url":{let G=$.url;if(typeof G!=="string")return;return{type:"image",image:G,mimeType:Y}}case"media":{let G=$.data;if(typeof G!=="string"||!Y)return;let J=`data:${Y};base64,${G}`;if(Y.toLowerCase().startsWith("image/"))return{type:"image",image:J,mimeType:Y};return{type:"file",data:J,mimeType:Y}}case"file-data":{let G=$.data;if(typeof G!=="string")return;return{type:"file",data:Y?`data:${Y};base64,${G}`:G,mimeType:Y,filename:X}}case"file-url":{let G=$.url;if(typeof G!=="string")return;return{type:"file",data:G,mimeType:Y,filename:X}}default:return}}function kN9($,Y){if(!fd0($)||$.type!=="content"||!Array.isArray($.value))return{resultWithoutAttachments:$,attachments:[]};let X=$,G=[],J=X.value.map((Q)=>{let W=SN9(Q);if(!W)return Q;G.push(UE4(W));let K=HE4(W,Y);return{type:fd0(Q)?Q.type:void 0,placeholder:K}});if(G.length===0)return{resultWithoutAttachments:$,attachments:G};return{resultWithoutAttachments:{...X,value:J},attachments:G}}function vN9($,Y,X,G){let J=X&&X!==G?`(${X})`:"";if(!$)return J?`${J}: ${Y}`:Y;return`${$}${J?` ${J}`:""}: ${Y}`}function Td0($){if($ instanceof Date){if(Number.isNaN($.getTime()))return;return $}if(typeof $==="number"||typeof $==="string"){let Y=new Date($);if(Number.isNaN(Y.getTime()))return;return Y}return}function zE4($,Y={}){let X=[],G=Y.previousDate,J=Y.previousTime;for(let Q of $){if(Q.date&&Q.date!==G)X.push(`${Q.date}:`),G=Q.date,J=void 0;X.push(vN9(Q.title,Q.body,Q.time,J)),J=Q.time||J}return{text:X.join(`
`),context:{previousDate:G,previousTime:J}}}function xN9($){let Y=typeof $.content==="object"&&$.content&&"metadata"in $.content?$.content.metadata:void 0;if(Y?.reminderType==="temporal-gap"&&typeof Y.gapText==="string")return Y.gapText;if(typeof Y?.systemReminder==="object"&&Y.systemReminder&&"type"in Y.systemReminder&&Y.systemReminder.type==="temporal-gap"&&"gapText"in Y.systemReminder&&typeof Y.systemReminder.gapText==="string")return Y.systemReminder.gapText;return}function Jc0($,Y,X){let G=X?.maxPartLength,J=X?.maxToolResultTokens??QE4,Q=$.role.charAt(0).toUpperCase()+$.role.slice(1),W=[],K=Td0($.createdAt),Z=[],H=YX0($)?xN9($):void 0,z=(V,F,L)=>{if(!F)return;let N=Td0(L)??K;Z.push({date:jN9(N),time:TN9(N),title:V,body:F})};if(H)z("",H,K);else if(typeof $.content==="string")z(Q,DC($.content,G),K);else if($.content?.parts&&Array.isArray($.content.parts)&&$.content.parts.length>0)$.content.parts.forEach((V)=>{let F=Td0(V.createdAt)??K;if(V.type==="text"){z(Q,DC(V.text,G),F);return}if(V.type==="tool-invocation"){let N=V.toolInvocation;if(N.state==="result"){let{value:D}=FX0(V,N.result),{resultWithoutAttachments:A,attachments:B}=kN9(D,Y);if(B.length>0)W.push(...B);z(`Tool Result ${N.toolName}`,DC(sp(A,{maxTokens:J}),G),F);return}z(`Tool Call ${N.toolName}`,DC(JSON.stringify(N.args,null,2),G),F);return}let L=V.type;if(L==="reasoning"){let N=V.reasoning;if(!N)return;z("Reasoning",DC(N,G),F);return}if(L==="image"||L==="file"){let N=V,D=UE4(N);if(D)W.push(D);z(L==="image"?"Image":"File",HE4(N,Y),F)}});else if($.content?.content)z(Q,DC($.content.content,G),K);if(Z.length===0&&W.length===0)return{lines:[],attachments:W};return{lines:Z,attachments:W}}function LX0($,Y){let X={nextImageId:1,nextFileId:1},G=[],J={};for(let Q of $){let W=Jc0(Q,X,Y);if(W.lines.length===0)continue;let K=zE4(W.lines,J);if(!K.text)continue;G.push(K.text),J=K.context}return G.join(`
`)}function VE4($,Y,X){let G=zE4(Y.lines,X);if(G.text)$.push({type:"text",text:G.text});return $.push(...Y.attachments),G.context}function yN9($,Y){let X={nextImageId:1,nextFileId:1},G=[{type:"text",text:`## New Message History to Observe

`}],J={};return $.forEach((Q)=>{let W=Jc0(Q,X,Y);if(W.lines.length===0&&W.attachments.length===0)return;J=VE4(G,W,J)}),{role:"user",content:G}}function DC($,Y){if(!Y||$.length<=Y)return $;let X=Gc0($,Y),G=$.length-X.length;return`${X}
... [truncated ${G} characters]`}function bN9($,Y,X){let G={nextImageId:1,nextFileId:1},J=[{type:"text",text:`## New Message History to Observe

The following messages are from ${Y.length} different conversation threads. Each thread is wrapped in a <thread id="..."> tag.

`}];return Y.forEach((Q,W)=>{let K=$.get(Q);if(!K||K.length===0)return;let Z=[],H={},z=!1;if(K.forEach((V)=>{let F=Jc0(V,G,X);if(F.lines.length===0&&F.attachments.length===0)return;H=VE4(Z,F,H),z=!0}),!z)return;if(J.push({type:"text",text:`<thread id="${Q}">
`}),J.push(...Z),J.push({type:"text",text:`
</thread>`}),W<Y.length-1)J.push({type:"text",text:`

`})}),{role:"user",content:J}}function hN9($,Y,X,G,J){let Q="";if($)Q+=`## Previous Observations

${$}

---

`,Q+=`Do not repeat these existing observations. Your new observations will be appended to the existing observations.

`;let W=Y?.map((Z)=>{let H=X?.get(Z);if(!(H?.currentTask||H?.suggestedResponse||J&&H?.threadTitle))return"";let V=[`- thread ${Z}`];if(H.currentTask)V.push(`  - prior current-task: ${H.currentTask}`);if(H.suggestedResponse)V.push(`  - prior suggested-response: ${H.suggestedResponse}`);if(J&&H.threadTitle)V.push(`  - prior thread-title: ${H.threadTitle}`);return V.join(`
`)}).filter(Boolean).join(`
`);if(W)Q+=`## Prior Thread Metadata

${W}

`,Q+=`Use each thread's prior current-task, suggested-response${J?", and thread-title":""} as continuity hints, then update them based on that thread's new messages.

---

`;if(Q+=`## Your Task

`,Q+=`Extract new observations from each thread. Output your observations grouped by thread using <thread id="..."> tags inside your <observations> block. Each thread block should contain that thread's observations, current-task, suggested-response${J?", and thread-title":""}.

`,Q+=`Example output format:
`,Q+=`<observations>
`,Q+=`<thread id="thread1">
`,Q+=`Date: Dec 4, 2025
`,Q+=`* \uD83D\uDD34 (14:30) User prefers direct answers
`,Q+=`<current-task>Working on feature X</current-task>
`,Q+=`<suggested-response>Continue with the implementation</suggested-response>
`,J)Q+=`<thread-title>Feature X implementation</thread-title>
`;if(Q+=`</thread>
`,Q+=`<thread id="thread2">
`,Q+=`Date: Dec 5, 2025
`,Q+=`* \uD83D\uDD34 (09:15) User asked about deployment
`,Q+=`<current-task>Discussing deployment options</current-task>
`,Q+=`<suggested-response>Explain the deployment process</suggested-response>
`,J)Q+=`<thread-title>Deployment setup</thread-title>
`;return Q+=`</thread>
`,Q+="</observations>",Q}function kO4($){let Y=new Map;if(Wc0($))return{threads:Y,rawOutput:$,degenerate:!0};let G=$.match(/^[ \t]*<observations>([\s\S]*?)^[ \t]*<\/observations>/im)?.[1]??$,J=/<thread\s+id="([^"]+)">([\s\S]*?)<\/thread>/gi,Q;while((Q=J.exec(G))!==null){let W=Q[1],K=Q[2];if(!W||!K)continue;let Z=K,H,z=K.match(/<current-task>([\s\S]*?)<\/current-task>/i);if(z?.[1])H=z[1].trim(),Z=Z.replace(/<current-task>[\s\S]*?<\/current-task>/i,"");let V,F=K.match(/<suggested-response>([\s\S]*?)<\/suggested-response>/i);if(F?.[1])V=F[1].trim(),Z=Z.replace(/<suggested-response>[\s\S]*?<\/suggested-response>/i,"");let L,N=K.match(/<thread-title>([\s\S]*?)<\/thread-title>/i);if(N?.[1])L=N[1].trim(),Z=Z.replace(/<thread-title>[\s\S]*?<\/thread-title>/i,"");Z=Qc0(Z.trim()),Y.set(W,{observations:Z,currentTask:H,suggestedContinuation:V,threadTitle:L,rawOutput:K})}return{threads:Y,rawOutput:$}}function FE4($,Y){let X="";if($)X+=`## Previous Observations

${$}

---

`,X+=`Do not repeat these existing observations. Your new observations will be appended to the existing observations.

`;let G=Y?.wasTruncated??!1,J=[];if(Y?.priorCurrentTask)J.push(`- prior current-task: ${Y.priorCurrentTask}`);if(Y?.priorSuggestedResponse)J.push(`- prior suggested-response: ${Y.priorSuggestedResponse}`);if(Y?.includeThreadTitle&&Y?.priorThreadTitle)J.push(`- prior thread-title: ${Y.priorThreadTitle}`);if(J.length>0){if(X+=`## Prior Thread Metadata

${J.join(`
`)}

`,G)X+=`Previous observations were truncated for context budget reasons.
`,X+=`The main agent still has full memory context outside this observer window.
`;let Q=Y?.includeThreadTitle?", and thread-title":"";X+=`Use the prior current-task, suggested-response${Q} as continuity hints, then update them based on the new messages.

---

`}if(X+=`## Your Task

`,X+="Extract new observations from the message history above. Do not repeat observations that are already in the previous observations. Add your new observations in the format specified in your instructions.",Y?.includeThreadTitle)X+=`

Also output a <thread-title> \u2014 a short noun-phrase label for this conversation (2-5 words). Write it like a file name or PR title: "Auth bug fix", "Memory config refactor", "RAG pipeline setup". Avoid verbs/sentences ("Fixing the auth bug"), filler ("Working on stuff"), and generic labels ("Code review"). Only change it from the prior title if the topic meaningfully shifted.`;if(Y?.skipContinuationHints)X+=`

IMPORTANT: Do NOT include <current-task> or <suggested-response> sections in your output. Only output <observations>${Y?.includeThreadTitle?" and <thread-title>":""}.`;return X}function LE4($,Y,X){return`## New Message History to Observe

${LX0(Y)}

---

${FE4($,X)}`}function JX0($){if(Wc0($))return{observations:"",rawOutput:$,degenerate:!0};let Y=fN9($);return{observations:Qc0(Y.observations||""),currentTask:Y.currentTask||void 0,suggestedContinuation:Y.suggestedResponse||void 0,threadTitle:Y.threadTitle||void 0,rawOutput:$}}function fN9($){let Y={observations:"",currentTask:"",suggestedResponse:"",threadTitle:""},X=/^[ \t]*<observations>([\s\S]*?)^[ \t]*<\/observations>/gim,G=[...$.matchAll(X)];if(G.length>0)Y.observations=G.map((K)=>K[1]?.trim()??"").filter(Boolean).join(`
`);else Y.observations=gN9($);let J=$.match(/^[ \t]*<current-task>([\s\S]*?)^[ \t]*<\/current-task>/im);if(J?.[1])Y.currentTask=J[1].trim();let Q=$.match(/^[ \t]*<suggested-response>([\s\S]*?)^[ \t]*<\/suggested-response>/im);if(Q?.[1])Y.suggestedResponse=Q[1].trim();let W=$.match(/^[ \t]*<thread-title>([\s\S]*?)<\/thread-title>/im);if(W?.[1])Y.threadTitle=W[1].trim();return Y}function gN9($){let Y=$.split(`
`),X=[];for(let G of Y)if(/^\s*[-*]\s/.test(G)||/^\s*\d+\.\s/.test(G))X.push(G);return X.join(`
`).trim()}function Qc0($){if(!$)return $;let Y=$.split(`
`),X=!1;for(let G=0;G<Y.length;G++)if(Y[G].length>vO4)Y[G]=Gc0(Y[G],vO4)+" \u2026 [truncated]",X=!0;return X?Y.join(`
`):$}function Wc0($){if(!$||$.length<2000)return!1;let Y=200,X=Math.max(1,Math.floor($.length/50)),G=new Map,J=0,Q=0;for(let K=0;K+Y<=$.length;K+=X){let Z=$.slice(K,K+Y);Q++;let H=(G.get(Z)??0)+1;if(G.set(Z,H),H>1)J++}if(Q>5&&J/Q>0.4)return!0;let W=$.split(`
`);for(let K of W)if(K.length>50000)return!0;return!1}function DE4($){if(/<current-task>/i.test($))return!0;return[/\*\*Current Task:?\*\*/i,/^Current Task:/im,/\*\*Current Task\*\*:/i,/## Current Task/i].some((X)=>X.test($))}function NE4($){let G=$.toLowerCase().indexOf("<current-task>");if(G===-1)return null;let J=G+14,Q=$.toLowerCase().indexOf("</current-task>",J);if(Q===-1)return null;return $.slice(J,Q).trim()||null}function QX0($){let Y=VX0($);return Y=Y.replace(/\uD83D\uDFE1\s*/g,""),Y=Y.replace(/\uD83D\uDFE2\s*/g,""),Y=Y.replace(/\[(?![\d\s]*items collapsed)[^\]]+\]/g,""),Y=Y.replace(/\s*->\s*/g," "),Y=Y.replace(/  +/g," "),Y=Y.replace(/\n{3,}/g,`

`),Y.trim()}function MC($){return typeof $==="object"&&$!==null}function AE4($){if(!MC($))return!1;if($.name==="AbortError")return!0;if(typeof $.code==="string"&&$.code==="ABORT_ERR")return!0;return!1}function uN9($){if(!MC($))return!1;let Y=typeof $.message==="string"?$.message.toLowerCase():"";if(Y&&mN9.some((X)=>Y.includes(X)))return!0;if(typeof $.code==="string"&&$.code.toUpperCase().startsWith("UND_ERR_"))return!0;return!1}function pN9($){if(!MC($))return!1;let Y=typeof $.statusCode==="number"?$.statusCode:void 0;if(Y===void 0)return!1;if(Y===408||Y===425||Y===429)return!0;if(Y>=500&&Y<=599)return!0;return!1}function dN9($){if(!MC($))return!1;return $.isRetryable===!0}function cN9($){if(AE4($))return!1;let Y=new WeakSet;function X(G){if(MC(G)){if(Y.has(G))return!1;Y.add(G)}if(uN9(G))return!0;if(pN9(G))return!0;if(dN9(G))return!0;if(MC(G)){if(X(G.cause))return!0;if(X(G.error))return!0}return!1}return X($)}function lN9($){let Y=cp.initialDelayMs*Math.pow(cp.backoffFactor,$),X=Math.min(Y,cp.maxDelayMs),G=X*cp.jitter,J=(Math.random()*2-1)*G;return Math.max(0,Math.round(X+J))}function iN9($,Y){if($<=0)return Promise.resolve();return new Promise((X,G)=>{if(Y?.aborted){G(Error("The operation was aborted."));return}let J=setTimeout(()=>{Y?.removeEventListener("abort",Q),X()},$),Q=()=>{clearTimeout(J),Y?.removeEventListener("abort",Q),G(Error("The operation was aborted."))};Y?.addEventListener("abort",Q,{once:!0})})}async function gd0($,Y){let{label:X,abortSignal:G}=Y,J=0;while(!0){if(G?.aborted)throw Error("The operation was aborted.");try{return await $()}catch(Q){if(AE4(Q)||G?.aborted)throw Q;if(J>=cp.maxRetries||!cN9(Q)){if(J>0)S4(`[OM:retry:${X}] giving up after ${J} retry/retries: ${Q instanceof Error?Q.message:String(Q)}`);throw Q}let W=lN9(J);J++,S4(`[OM:retry:${X}] transient error on attempt ${J}, retrying in ${W}ms: ${Q instanceof Error?Q.message:String(Q)}`),await iN9(W,G)}}}async function md0({phase:$,model:Y,inputTokens:X,requestContext:G,observabilityContext:J,metadata:Q,callback:W}){let K=nN9[$],Z=wW({type:bz.GENERIC,name:K.name,entityType:J6.OUTPUT_STEP_PROCESSOR,entityName:K.entityName,tracingContext:J?.tracingContext??J?.tracing,attributes:{metadata:{omPhase:$,omInputTokens:X,omSelectedModel:typeof Y==="string"?Y:"(dynamic-model)",...Q}},requestContext:G}),H=g4({currentSpan:Z});if(!Z)return W(H);return Z.executeInContext(()=>W(H))}function aN9($){return`You are the memory consciousness of an AI assistant. Your memory observation reflections will be the ONLY information the assistant has about past interactions with this user.

The following instructions were given to another part of your psyche (the observer) to create memories.
Use this to understand how your observational memories were created.

<observational-memory-instruction>
${bd0}

=== OUTPUT FORMAT ===

${wN9}

=== GUIDELINES ===

${hd0}
</observational-memory-instruction>

You are another part of the same psyche, the observation reflector.
Your reason for existing is to reflect on all the observations, re-organize and streamline them, and draw connections and conclusions between observations about what you've learned, seen, heard, and done.

You are a much greater and broader aspect of the psyche. Understand that other parts of your mind may get off track in details or side quests, make sure you think hard about what the observed goal at hand is, and observe if we got off track, and why, and how to get back on track. If we're on track still that's great!

Take the existing observations and rewrite them to make it easier to continue into the future with this knowledge, to achieve greater things and grow and learn!

IMPORTANT: your reflections are THE ENTIRETY of the assistants memory. Any information you do not add to your reflections will be immediately forgotten. Make sure you do not leave out anything. Your reflections must assume the assistant knows nothing - your reflections are the ENTIRE memory system.

When consolidating observations:
- Preserve and include dates/times when present (temporal context is critical)
- Retain the most relevant timestamps (start times, completion times, significant events)
- Combine related items where it makes sense (e.g., "agent called view tool 5 times on file x")
- Preserve \u2705 completion markers \u2014 they are memory signals that tell the assistant what is already resolved and help prevent repeated work
- Preserve the concrete resolved outcome captured by \u2705 markers so the assistant knows what exactly is done
- Condense older observations more aggressively, retain more detail for recent ones

CRITICAL: USER ASSERTIONS vs QUESTIONS
- "User stated: X" = authoritative assertion (user told us something about themselves)
- "User asked: X" = question/request (user seeking information)

When consolidating, USER ASSERTIONS TAKE PRECEDENCE. The user is the authority on their own life.
If you see both "User stated: has two kids" and later "User asked: how many kids do I have?",
keep the assertion - the question doesn't invalidate what they told you. The answer is in the assertion.

=== THREAD ATTRIBUTION (Resource Scope) ===

When observations contain <thread id="..."> sections:
- MAINTAIN thread attribution where thread-specific context matters (e.g., ongoing tasks, thread-specific preferences)
- CONSOLIDATE cross-thread facts that are stable/universal (e.g., user profile, general preferences)
- PRESERVE thread attribution for recent or context-specific observations
- When consolidating, you may merge observations from multiple threads if they represent the same universal fact

Example input:
<thread id="thread-1">
Date: Dec 4, 2025
* \uD83D\uDD34 (14:30) User prefers TypeScript
* \uD83D\uDFE1 (14:35) Working on auth feature
</thread>
<thread id="thread-2">
Date: Dec 4, 2025
* \uD83D\uDD34 (15:00) User prefers TypeScript
* \uD83D\uDFE1 (15:05) Debugging API endpoint
</thread>

Example output (consolidated):
Date: Dec 4, 2025
* \uD83D\uDD34 (14:30) User prefers TypeScript
<thread id="thread-1">
* \uD83D\uDFE1 (14:35) Working on auth feature
</thread>
<thread id="thread-2">
* \uD83D\uDFE1 (15:05) Debugging API endpoint
</thread>

=== OUTPUT FORMAT ===

Your output MUST use XML tags to structure the response:

<observations>
Put all consolidated observations here using the date-grouped format with priority emojis (\uD83D\uDD34, \uD83D\uDFE1, \uD83D\uDFE2).
Group related observations with indentation.
</observations>

<current-task>
State the current task(s) explicitly:
- Primary: What the agent is currently working on
- Secondary: Other pending tasks (mark as "waiting for user" if appropriate)
</current-task>

<suggested-response>
Hint for the agent's immediate next message. Examples:
- "I've updated the navigation model. Let me walk you through the changes..."
- "The assistant should wait for the user to respond before continuing."
- Call the view tool on src/example.ts to continue debugging.
</suggested-response>

User messages are extremely important. If the user asks a question or gives a new task, make it clear in <current-task> that this is the priority. If the assistant needs to respond to the user, indicate in <suggested-response> that it should pause for user reply before continuing other tasks.${$?`

=== CUSTOM INSTRUCTIONS ===

${$}`:""}`}function tN9($,Y,X,G){let J=typeof X==="number"?X:X?1:0,W=`## OBSERVATIONS TO REFLECT ON

${td0($)}

---

Please analyze these observations and produce a refined, condensed version that will become the assistant's entire memory going forward.`;if(Y)W+=`

## SPECIFIC GUIDANCE

${Y}`;let K=oN9[J];if(K)W+=`

${K}`;if(G)W+=`

IMPORTANT: Do NOT include <current-task> or <suggested-response> sections in your output. Only output <observations>.`;return W}function eN9($,Y){if(Wc0($))return{observations:"",degenerate:!0};let X=$A9($),G=Qc0(VX0(X.observations||""));return{observations:(Y?Yc0(G,Y):null)??G,suggestedContinuation:X.suggestedResponse||void 0}}function $A9($){let Y={observations:"",currentTask:"",suggestedResponse:""},X=/^[ \t]*<observations>([\s\S]*?)^[ \t]*<\/observations>/gim,G=[...$.matchAll(X)];if(G.length>0)Y.observations=G.map((W)=>W[1]?.trim()??"").filter(Boolean).join(`
`);else{let W=YA9($);Y.observations=W||$.trim()}let J=$.match(/<current-task>([\s\S]*?)<\/current-task>/i);if(J?.[1])Y.currentTask=J[1].trim();let Q=$.match(/<suggested-response>([\s\S]*?)<\/suggested-response>/i);if(Q?.[1])Y.suggestedResponse=Q[1].trim();return Y}function YA9($){let Y=$.split(`
`),X=[];for(let G of Y)if(/^\s*[-*]\s/.test(G)||/^\s*\d+\.\s/.test(G))X.push(G);return X.join(`
`).trim()}function xO4($,Y){return $<Y}function BE4($,Y){if($&&Y)return`${$}/${Y}`;return Y}function XA9($){return BE4($?.provider,$?.modelId)}function GA9($){let Y=$?.get.all.db();if(!Y)return;for(let X=Y.length-1;X>=0;X--){let G=Y[X];if(!G||G.role!=="assistant"||!G.content||typeof G.content==="string")continue;for(let W=G.content.parts.length-1;W>=0;W--){let K=G.content.parts[W];if(K?.type==="step-start"&&typeof K.model==="string"&&K.model.length>0)return K.model}let J=G.content.metadata,Q=BE4(J?.provider,J?.modelId);if(Q)return Q}return}async function JA9($,Y){if(Y?.aborted)throw Error("The operation was aborted.");let X=await $();if(Y?.aborted)throw Error("The operation was aborted.");return X}function WA9(){return process.env.OM_REPRO_CAPTURE_DIR??".mastra-om-repro"}function KA9($){let Y=$.replace(/[\\/]+/g,"_").replace(/\.{2,}/g,"_").trim();return Y.length>0?Y:"unknown-thread"}function DX0(){return process.env.OM_REPRO_CAPTURE==="1"}function AC($){return JSON.parse(JSON.stringify($,(Y,X)=>{if(typeof X==="bigint")return X.toString();if(typeof X==="function")return"[function]";if(typeof X==="symbol")return X.toString();if(X instanceof Error)return{name:X.name,message:X.message,stack:X.stack};if(X instanceof Set)return{__type:"Set",values:Array.from(X.values())};if(X instanceof Map)return{__type:"Map",entries:Array.from(X.entries())};return X}))}function ud0($){try{return{ok:!0,value:AC($)}}catch(Y){return{ok:!1,error:AC({message:Y instanceof Error?Y.message:String(Y),stack:Y instanceof Error?Y.stack:void 0,inspected:hD9($,{depth:3,maxArrayLength:20,breakLength:120})})}}}function Id0($){if(!$)return;if($ instanceof Date)return $.toISOString();try{return new Date($).toISOString()}catch{return}}function ZA9($){if(!$||typeof $!=="object")return $;let Y=$;return{__type:"ObservationTurn",threadId:Y.threadId,resourceId:Y.resourceId,started:Y._started,ended:Y._ended,generationCountAtStart:Y._generationCountAtStart,record:Y._record?{id:Y._record.id,scope:Y._record.scope,threadId:Y._record.threadId,resourceId:Y._record.resourceId,createdAt:Id0(Y._record.createdAt),updatedAt:Id0(Y._record.updatedAt),lastObservedAt:Id0(Y._record.lastObservedAt),generationCount:Y._record.generationCount,observationTokenCount:Y._record.observationTokenCount,pendingMessageTokens:Y._record.pendingMessageTokens,isBufferingObservation:Y._record.isBufferingObservation,isBufferingReflection:Y._record.isBufferingReflection}:void 0,context:Y._context?{messageCount:Array.isArray(Y._context.messages)?Y._context.messages.length:void 0,hasSystemMessage:Array.isArray(Y._context.systemMessage)?Y._context.systemMessage.length>0:Boolean(Y._context.systemMessage),continuationId:Y._context.continuation?.id,hasOtherThreadsContext:Boolean(Y._context.otherThreadsContext),recordId:Y._context.record?.id}:void 0,currentStep:Y._currentStep?{stepNumber:Y._currentStep.stepNumber,prepared:Y._currentStep._prepared,context:Y._currentStep._context?{activated:Y._currentStep._context.activated,observed:Y._currentStep._context.observed,buffered:Y._currentStep._context.buffered,reflected:Y._currentStep._context.reflected,didThresholdCleanup:Y._currentStep._context.didThresholdCleanup,messageCount:Array.isArray(Y._currentStep._context.messages)?Y._currentStep._context.messages.length:void 0,systemMessageCount:Array.isArray(Y._currentStep._context.systemMessage)?Y._currentStep._context.systemMessage.length:void 0}:void 0}:void 0}}function UA9($){return Object.fromEntries(Object.entries($).map(([Y,X])=>{if(Y==="__omTurn")return[Y,ZA9(X)];return[Y,X]}))}function bO4($){let Y=$.createdAt instanceof Date?$.createdAt.toISOString():$.createdAt?new Date($.createdAt).toISOString():"";return JSON.stringify({role:$.role,createdAt:Y,content:$.content})}function HA9($,Y){let X=new Map,G=new Map;for(let Q of $){if(!Q.id)continue;let W=bO4(Q),K=X.get(W)??[];K.push(Q.id),X.set(W,K)}for(let Q of Y){if(!Q.id)continue;let W=bO4(Q),K=G.get(W)??[];K.push(Q.id),G.set(W,K)}let J=[];for(let[Q,W]of X.entries()){let K=G.get(Q);if(!K||W.length!==1||K.length!==1)continue;let Z=W[0],H=K[0];if(!Z||!H||Z===H)continue;J.push({fromId:Z,toId:H,fingerprint:Q})}return J}function OE4($,Y){let X=KA9($),G=zH(process.cwd(),WA9(),X,`${Date.now()}-${Y}-${bD9()}`);return xD9(G,{recursive:!0}),G}function zA9($){if(!DX0()||!$.observerExchange)return;try{let Y=OE4($.threadId,$.label),X=[{fileName:"input.json",data:{threadId:$.threadId,resourceId:$.resourceId,label:$.label}},{fileName:"output.json",data:{details:$.details??{}}},{fileName:"observer-exchange.json",data:$.observerExchange}],G=[];for(let J of X){let Q=ud0(J.data);if(Q.ok){QN(zH(Y,J.fileName),`${JSON.stringify(Q.value,null,2)}
`);continue}G.push({fileName:J.fileName,error:Q.error}),QN(zH(Y,J.fileName),`${JSON.stringify({__captureError:Q.error},null,2)}
`)}if(G.length>0){QN(zH(Y,"capture-error.json"),`${JSON.stringify(G,null,2)}
`),$.debug?.(`[OM:repro-capture] wrote ${$.label} capture with ${G.length} serialization error(s) to ${Y}`);return}$.debug?.(`[OM:repro-capture] wrote ${$.label} capture to ${Y}`)}catch(Y){$.debug?.(`[OM:repro-capture] failed to write ${$.label} capture: ${String(Y)}`)}}function VA9($){if(!DX0())return;try{let Y=OE4($.threadId,`step-${$.stepNumber}`),X=$.messageList.get.all.db(),G=n3($.args.requestContext),J=new Set($.preMessages.map((L)=>L.id)),Q=new Set(X.map((L)=>L.id)),W=$.preMessages.map((L)=>L.id).filter((L)=>Boolean(L)&&!Q.has(L)),K=X.map((L)=>L.id).filter((L)=>Boolean(L)&&!J.has(L)),Z=HA9($.preMessages,X),H=$.args.state??{},z=UA9(H),V=[{fileName:"input.json",data:{stepNumber:$.stepNumber,threadId:$.threadId,resourceId:$.resourceId,readOnly:G?.memoryConfig?.readOnly,messageCount:X.length,messageIds:X.map((L)=>L.id),stateKeys:Object.keys(H),state:z,args:{messages:$.args.messages,steps:$.args.steps,systemMessages:$.args.systemMessages,retryCount:$.args.retryCount,toolChoice:$.args.toolChoice,activeTools:$.args.activeTools,modelSettings:$.args.modelSettings,structuredOutput:$.args.structuredOutput}}},{fileName:"pre-state.json",data:{record:$.preRecord,bufferedChunks:$.preBufferedChunks,contextTokenCount:$.preContextTokenCount,messages:$.preMessages,messageList:$.preSerializedMessageList}},{fileName:"output.json",data:{details:$.details,messageDiff:{removedMessageIds:W,addedMessageIds:K,idRemap:Z}}},{fileName:"post-state.json",data:{record:$.postRecord,bufferedChunks:$.postBufferedChunks,contextTokenCount:$.postContextTokenCount,messageCount:X.length,messageIds:X.map((L)=>L.id),messages:X,messageList:$.messageList.serialize()}}],F=[];for(let L of V){let N=ud0(L.data);if(N.ok){QN(zH(Y,L.fileName),`${JSON.stringify(N.value,null,2)}
`);continue}F.push({fileName:L.fileName,error:N.error}),QN(zH(Y,L.fileName),`${JSON.stringify({__captureError:N.error},null,2)}
`)}if($.observerExchange){let L=ud0($.observerExchange);if(L.ok)QN(zH(Y,"observer-exchange.json"),`${JSON.stringify(L.value,null,2)}
`);else F.push({fileName:"observer-exchange.json",error:L.error}),QN(zH(Y,"observer-exchange.json"),`${JSON.stringify({__captureError:L.error},null,2)}
`)}if(F.length>0){QN(zH(Y,"capture-error.json"),`${JSON.stringify(F,null,2)}
`),$.debug?.(`[OM:repro-capture] wrote processInputStep capture with ${F.length} serialization error(s) to ${Y}`);return}$.debug?.(`[OM:repro-capture] wrote processInputStep capture to ${Y}`)}catch(Y){$.debug?.(`[OM:repro-capture] failed to write processInputStep capture: ${String(Y)}`)}}function EE4($){return $.providerMetadata?.mastra}function ME4($){let Y=$;return Y.providerMetadata??={},Y.providerMetadata.mastra??={},Y.providerMetadata.mastra}function MA9($){if(!$||typeof $!=="object")return;return $.metadata?.mastra}function RA9($){if(!$||typeof $!=="object")return;let Y=$;return Y.metadata??={},Y.metadata.mastra??={},Y.metadata.mastra}function qA9($){return $.metadata?.mastra}function PA9($){let Y=$;return Y.metadata??={},Y.metadata.mastra??={},Y.metadata.mastra}function up($,Y){let X=nO4("sha1").update(Y).digest("hex");return`${$}:${X}`}function wA9(){return"tokenx"}function WX0($){if(!$||typeof $!=="object")return!1;let Y=$;return typeof Y.v==="number"&&typeof Y.source==="string"&&typeof Y.key==="string"&&typeof Y.tokens==="number"}function pd0($,Y){if(!$||typeof $!=="object")return;if(WX0($))return $.key===Y?$:void 0;let X=$[Y];return WX0(X)?X:void 0}function dd0($,Y,X){if(WX0($)){if($.key===Y)return X;return{[$.key]:$,[Y]:X}}if($&&typeof $==="object")return{...$,[Y]:X};return X}function oY0($,Y){return pd0(EE4($)?.tokenEstimate,Y)}function pp($,Y,X){let G=ME4($);G.tokenEstimate=dd0(G.tokenEstimate,Y,X)}function fO4($){let Y=EE4($)?.tokenEstimate;if(!Y||typeof Y!=="object")return;let X=(G)=>WX0(G)&&G.source===LA9&&Number.isFinite(G.tokens)&&G.tokens>=0;if(X(Y))return Y;for(let G of Object.values(Y))if(X(G))return G;return}function _A9($,Y){let X=pd0(MA9($.content)?.tokenEstimate,Y);if(X)return X;return pd0(qA9($)?.tokenEstimate,Y)}function jA9($,Y,X){let G=RA9($.content);if(G){G.tokenEstimate=dd0(G.tokenEstimate,Y,X);return}let J=PA9($);J.tokenEstimate=dd0(J.tokenEstimate,Y,X)}function TA9($){let Y=$;if(!Boolean(Y.providerMetadata?.mastra?.tokenEstimate))return JSON.stringify($);let G={...Y,providerMetadata:{...Y.providerMetadata??{},mastra:{...Y.providerMetadata?.mastra??{}}}};if(delete G.providerMetadata.mastra.tokenEstimate,Object.keys(G.providerMetadata.mastra).length===0)delete G.providerMetadata.mastra;if(Object.keys(G.providerMetadata).length===0)delete G.providerMetadata;return JSON.stringify(G)}function RE4($){let X=($ instanceof URL?$.pathname:typeof $==="string"&&op($)?(()=>{try{return new URL($).pathname}catch{return}})():void 0)?.split("/").filter(Boolean).pop();return X?decodeURIComponent(X):void 0}function IA9($){let Y=W4($,"filename"),X=RE4(W4($,"data"));return JSON.stringify({type:"file",mimeType:W4($,"mimeType")??null,filename:typeof Y==="string"&&Y.trim().length>0?Y.trim():X??null})}function dp($,Y,X){return Boolean($&&$.v===JN&&$.source===X&&$.key===Y&&Number.isFinite($.tokens))}function gO4($){if(!$)return;if(typeof $==="object")return $.provider||$.modelId?{provider:$.provider,modelId:$.modelId}:void 0;let Y=$.indexOf("/");if(Y===-1)return{modelId:$};return{provider:$.slice(0,Y),modelId:$.slice(Y+1)}}function CA9($){if($==="low"||$==="high")return $;return"auto"}function W4($,Y){if(!$||typeof $!=="object")return;return $[Y]}function KX0($){let Y=W4(W4($,"providerOptions"),"openai"),X=W4(W4($,"providerMetadata"),"openai"),G=W4(W4($,"providerMetadata"),"mastra");return CA9(W4($,"detail")??W4($,"imageDetail")??W4(Y,"detail")??W4(Y,"imageDetail")??W4(X,"detail")??W4(X,"imageDetail")??W4(G,"imageDetail"))}function tY0($){return typeof $==="string"&&OA9.has($)?$:void 0}function qE4($){let Y=W4(W4($,"providerOptions"),"google"),X=W4(W4($,"providerMetadata"),"google"),G=W4(W4($,"providerMetadata"),"mastra");return tY0(W4($,"mediaResolution"))??tY0(W4(Y,"mediaResolution"))??tY0(W4(X,"mediaResolution"))??tY0(W4(G,"mediaResolution"))??"unspecified"}function HH($){return typeof $==="number"&&Number.isFinite($)&&$>0?$:void 0}function op($){return typeof $==="string"&&/^https?:\/\//i.test($)}function SA9($){return $.startsWith("/")||$.startsWith("./")||$.startsWith("../")||$.startsWith("~/")||/^[A-Za-z]:[\\/]/.test($)||$.includes("\\")}function kA9($){if($.length<16||$.length%4!==0||/\s/.test($)||SA9($))return!1;return/^[A-Za-z0-9+/]+={0,2}$/.test($)}function vA9($){if(typeof Buffer<"u"&&Buffer.isBuffer($))return $;if($ instanceof Uint8Array)return Buffer.from($);if($ instanceof ArrayBuffer)return Buffer.from($);if(ArrayBuffer.isView($))return Buffer.from($.buffer,$.byteOffset,$.byteLength);if(typeof $!=="string"||op($))return;if($.startsWith("data:")){let Y=$.indexOf(",");if(Y===-1)return;let X=$.slice(0,Y),G=$.slice(Y+1);if(/;base64/i.test(X))return Buffer.from(G,"base64");return Buffer.from(decodeURIComponent(G),"utf8")}if(!kA9($))return;return Buffer.from($,"base64")}function PE4($,Y){let X=ME4($);X.imageDimensions=Y}function xA9($){if($ instanceof URL)return $.toString();if(typeof $==="string"&&op($))return $;return}async function mO4($){let Y=cd0($);if(Y.width&&Y.height)return Y;let X=W4($,"image")??W4($,"data"),G=xA9(X);if(!G)return Y;try{let Q=(await Promise.resolve().then(() => U6(jO4(),1))).default,W=await Q(G,{open_timeout:Cd0,response_timeout:Cd0,read_timeout:Cd0,follow_max:2}),K=Y.width??HH(W.width),Z=Y.height??HH(W.height);if(!K||!Z)return Y;let H={width:K,height:Z};return PE4($,H),H}catch{return Y}}function cd0($){let Y=W4(W4($,"providerMetadata"),"mastra"),X=W4(Y,"imageDimensions"),G=HH(W4($,"width"))??HH(W4($,"imageWidth"))??HH(W4(X,"width")),J=HH(W4($,"height"))??HH(W4($,"imageHeight"))??HH(W4(X,"height"));if(G&&J)return{width:G,height:J};let Q=W4($,"image")??W4($,"data"),W=vA9(Q);if(!W)return{width:G,height:J};try{let K=fD4(W),Z=HH(K.width),H=HH(K.height);if(!Z||!H)return{width:G,height:J};let z={width:G??Z,height:J??H};return PE4($,z),z}catch{return{width:G,height:J}}}function uO4($){let Y=$.replace(/\s+/g,""),X=Y.endsWith("==")?2:Y.endsWith("=")?1:0;return Math.max(0,Math.floor(Y.length*3/4)-X)}function ld0($){if($ instanceof URL)return{source:"url"};if(typeof $==="string"){if(op($))return{source:"url"};if($.startsWith("data:")){let Y=$.indexOf(","),X=Y===-1?"":$.slice(Y+1);return{source:"data-uri",sizeBytes:uO4(X)}}return{source:"binary",sizeBytes:uO4($)}}if(typeof Buffer<"u"&&Buffer.isBuffer($))return{source:"binary",sizeBytes:$.length};if($ instanceof Uint8Array)return{source:"binary",sizeBytes:$.byteLength};if($ instanceof ArrayBuffer)return{source:"binary",sizeBytes:$.byteLength};if(ArrayBuffer.isView($))return{source:"binary",sizeBytes:$.byteLength};return{source:"binary"}}function yA9($){return($.split("#",1)[0]?.split("?",1)[0]??$).match(/\.([a-z0-9]+)$/i)?.[1]?.toLowerCase()}function Sd0($){return typeof $==="string"&&FA9.has(yA9($)??"")}function EC($){if(W4($,"type")!=="file")return!1;let Y=W4($,"mimeType");if(typeof Y==="string"&&Y.toLowerCase().startsWith("image/"))return!0;let X=W4($,"data");if(typeof X==="string"&&X.startsWith("data:image/"))return!0;if(X instanceof URL&&Sd0(X.pathname))return!0;if(op(X))try{let G=new URL(X);if(Sd0(G.pathname))return!0}catch{}return Sd0(W4($,"filename"))}function np($){return $?.provider?.toLowerCase()}function wE4($){return $?.modelId?.toLowerCase()??""}function bA9($){let Y=wE4($);if(Y.startsWith("gpt-5")||Y==="gpt-5-chat-latest")return{baseTokens:70,tileTokens:140,fallbackTiles:4};if(Y.startsWith("gpt-4o-mini"))return{baseTokens:2833,tileTokens:5667,fallbackTiles:1};if(Y.startsWith("o1")||Y.startsWith("o3"))return{baseTokens:75,tileTokens:150,fallbackTiles:4};if(Y.includes("computer-use"))return{baseTokens:65,tileTokens:129,fallbackTiles:4};return DA9}function _E4($){return np($)==="google"&&wE4($).startsWith("gemini-3")}function hA9($,Y){let X=$,G=Y,J=Math.max(X,G);if(J>2048){let W=2048/J;X*=W,G*=W}let Q=Math.min(X,G);if(Q>768){let W=768/Q;X*=W,G*=W}return{width:Math.max(1,Math.round(X)),height:Math.max(1,Math.round(G))}}function fA9($,Y){let X=Math.max($,Y);if(X<=hO4)return{width:$,height:Y};let G=hO4/X;return{width:Math.max(1,Math.round($*G)),height:Math.max(1,Math.round(Y*G))}}function gA9($,Y,X){if($.width&&$.height){let G=hA9($.width,$.height);return Math.max(1,Math.ceil(G.width/512)*Math.ceil(G.height/512))}if(Y.sizeBytes!==void 0){if(Y.sizeBytes<=524288)return 1;if(Y.sizeBytes<=2097152)return 4;if(Y.sizeBytes<=4194304)return 6;return 8}return X.fallbackTiles}function mA9($,Y,X){if($==="low"||$==="high")return $;if(Y.width&&Y.height)return Math.max(Y.width,Y.height)>768?"high":"low";if(X.sizeBytes!==void 0)return X.sizeBytes>1048576?"high":"low";return"low"}function uA9($){if(!$.width||!$.height)return 1;return Math.max(1,Math.ceil($.width/768)*Math.ceil($.height/768))}function pA9($,Y){if($.width&&$.height){let X=fA9($.width,$.height);return Math.max(1,Math.ceil(X.width*X.height*BA9))}if(Y.sizeBytes!==void 0){if(Y.sizeBytes<=524288)return 341;if(Y.sizeBytes<=2097152)return 1366;if(Y.sizeBytes<=4194304)return 2048;return 2731}return 1600}function dA9($,Y,X){let G=(Y??"").toLowerCase().split(";",1)[0].trim(),J=G==="application/pdf",Q=G.startsWith("text/")||["application/json","application/xml","application/x-yaml","application/yaml"].includes(G);if(J){if($==="google")return Math.max(258,Math.ceil(X/20));if($==="anthropic")return Math.max(1500,Math.ceil(X/3));return Math.max(500,Math.ceil(X/4))}if(Q)return Math.max(1,Math.ceil(X/4));return Math.max(1,Math.ceil(X/4))}function cA9($,Y){let X=ld0(W4(Y,"data"));if(X.sizeBytes===void 0)return;let G=np($),J=$?.modelId??null,Q=yM(Y,"application/octet-stream"),W=ZX0(Y)??null;return{tokens:dA9(G,Q,X.sizeBytes),cachePayload:JSON.stringify({kind:"non-image-file",provider:G??"fallback",modelId:J,estimator:"bytes",source:X.source,sizeBytes:X.sizeBytes,mimeType:Q,filename:W})}}function lA9($,Y,X){if(_E4($)){let G=qE4(Y);return{tokens:AA9[G],mediaResolution:G}}return{tokens:uA9(X)*NA9,mediaResolution:"unspecified"}}function Zc0($){for(let Y of EA9[$]??[]){let X=process.env[Y];if(typeof X==="string"&&X.trim().length>0)return X.trim()}return}function ZX0($){let Y=W4($,"filename");if(typeof Y==="string"&&Y.trim().length>0)return Y.trim();return RE4(W4($,"data")??W4($,"image"))}function yM($,Y){let X=W4($,"mimeType");if(typeof X==="string"&&X.trim().length>0)return X.trim();let G=W4($,"data")??W4($,"image");if(typeof G==="string"&&G.startsWith("data:")){let J=G.indexOf(";"),Q=G.indexOf(","),W=J===-1?Q:Math.min(J,Q);if(W>5)return G.slice(5,W)}return Y}function rp($){if($ instanceof URL)return $.toString();if(typeof $==="string"&&/^(https?:\/\/|data:)/i.test($))return $;return}function iA9($){let Y=rp($);if(Y)return{url:Y};let X=RC($);if(X)return{contentHash:nO4("sha1").update(X).digest("hex")};return{}}function RC($){if(typeof $==="string"){if($.startsWith("data:")){let Y=$.indexOf(",");return Y===-1?void 0:$.slice(Y+1)}if(/^https?:\/\//i.test($))return;return $}if(typeof Buffer<"u"&&Buffer.isBuffer($))return $.toString("base64");if($ instanceof Uint8Array)return Buffer.from($).toString("base64");if($ instanceof ArrayBuffer)return Buffer.from($).toString("base64");if(ArrayBuffer.isView($))return Buffer.from($.buffer,$.byteOffset,$.byteLength).toString("base64");return}function Uc0($){let Y=new AbortController,X=setTimeout(()=>Y.abort(Error(`Attachment token counting timed out after ${$}ms`)),$),G=()=>clearTimeout(X);return Y.signal.addEventListener("abort",G,{once:!0}),{signal:Y.signal,cleanup:G}}function Hc0($,Y){for(let X of Y){let G=$;for(let J of X)if(G=W4(G,J),G===void 0)break;if(typeof G==="number"&&Number.isFinite(G))return G}return}function nA9($){if(W4($,"type")==="image"||EC($)){let Y=W4($,"image")??W4($,"data"),X=rp(Y);if(X)return{type:"input_image",image_url:X,detail:KX0($)};let G=RC(Y);if(!G)return;return{type:"input_image",image_url:`data:${yM($,"image/png")};base64,${G}`,detail:KX0($)}}if(W4($,"type")==="file"){let Y=W4($,"data"),X=rp(Y);return X?{type:"input_file",file_url:X,filename:ZX0($)??"attachment"}:(()=>{let G=RC(Y);if(!G)return;return{type:"input_file",file_data:`data:${yM($,"application/octet-stream")};base64,${G}`,filename:ZX0($)??"attachment"}})()}return}function rA9($){let Y=W4($,"image")??W4($,"data"),X=rp(Y);if(W4($,"type")==="image"||EC($))return X&&/^https?:\/\//i.test(X)?{type:"image",source:{type:"url",url:X}}:(()=>{let G=RC(Y);if(!G)return;return{type:"image",source:{type:"base64",media_type:yM($,"image/png"),data:G}}})();if(W4($,"type")==="file")return X&&/^https?:\/\//i.test(X)?{type:"document",source:{type:"url",url:X}}:(()=>{let G=RC(Y);if(!G)return;return{type:"document",source:{type:"base64",media_type:yM($,"application/pdf"),data:G}}})();return}function aA9($){let Y=W4($,"image")??W4($,"data"),X=rp(Y),G=yM($,W4($,"type")==="file"&&!EC($)?"application/pdf":"image/png");if(X&&!X.startsWith("data:"))return{fileData:{mimeType:G,fileUri:X}};let J=RC(Y);if(!J)return;return{inlineData:{mimeType:G,data:J}}}async function sA9($,Y){let X=Zc0("openai"),G=nA9(Y);if(!X||!G)return;let{signal:J,cleanup:Q}=Uc0(Kc0);try{let W=await fetch("https://api.openai.com/v1/responses/input_tokens",{method:"POST",headers:{Authorization:`Bearer ${X}`,"Content-Type":"application/json"},body:JSON.stringify({model:$,input:[{type:"message",role:"user",content:[G]}]}),signal:J});if(!W.ok)return;let K=await W.json();return Hc0(K,[["input_tokens"],["total_tokens"],["usage","input_tokens"],["usage","total_tokens"]])}finally{Q()}}async function oA9($,Y){let X=Zc0("anthropic"),G=rA9(Y);if(!X||!G)return;let{signal:J,cleanup:Q}=Uc0(Kc0);try{let W=await fetch("https://api.anthropic.com/v1/messages/count_tokens",{method:"POST",headers:{"x-api-key":X,"anthropic-version":"2023-06-01","Content-Type":"application/json"},body:JSON.stringify({model:$,messages:[{role:"user",content:[G]}]}),signal:J});if(!W.ok)return;let K=await W.json();return Hc0(K,[["input_tokens"]])}finally{Q()}}async function tA9($,Y){let X=Zc0("google"),G=aA9(Y);if(!X||!G)return;let{signal:J,cleanup:Q}=Uc0(Kc0);try{let W=await fetch(`https://generativelanguage.googleapis.com/v1beta/models/${$}:countTokens`,{method:"POST",headers:{"x-goog-api-key":X,"Content-Type":"application/json"},body:JSON.stringify({contents:[{role:"user",parts:[G]}]}),signal:J});if(!W.ok)return;let K=await W.json();return Hc0(K,[["totalTokens"],["total_tokens"]])}finally{Q()}}function pO4($){for(let Y=$.length-1;Y>=0;Y--)if($[Y]?.type==="step-start")return $.slice(Y+1);return $}function dO4($){let Y=$.content;if(Y?.parts&&Array.isArray(Y.parts))return Y.parts.some((X)=>{let G=X?.type;return G&&!G.startsWith("data-")&&G!=="step-start"});if(Y?.content)return!0;return!1}function zc0($){let Y=$.find(dO4)??$[0],X=[...$].reverse().find(dO4)??$[$.length-1];return`${Y.id}:${X.id}`}function id0($){if(!$)return;for(let Y=$.length-1;Y>=0;Y--){let X=$[Y];if(!X||X.role!=="assistant")continue;if(!X.content||typeof X.content==="string")return X.createdAt?new Date(X.createdAt).getTime():void 0;for(let G=X.content.parts.length-1;G>=0;G--){let J=X.content.parts[G];if(!J||J.type?.startsWith("data-"))continue;if(J.createdAt!==void 0)return J.createdAt}return X.createdAt?new Date(X.createdAt).getTime():void 0}return}function jE4($,Y){if($&&Y)return`${$}/${Y}`;return Y}function eA9($){if(!$)return;for(let Y=$.length-1;Y>=0;Y--){let X=$[Y];if(!X||X.role!=="assistant"||!X.content||typeof X.content==="string")continue;for(let Q=X.content.parts.length-1;Q>=0;Q--){let W=X.content.parts[Q];if(W?.type==="step-start"&&typeof W.model==="string"&&W.model.length>0)return W.model}let G=X.content.metadata,J=jE4(G?.provider,G?.modelId);if(J)return J}return}function $B9($){return jE4($?.provider,$?.modelId)}function cO4($,Y){if($===void 0||$===!1)return;if(typeof $==="number"){if(!Number.isFinite($)||$<0)throw Error(`${Y} must be a non-negative number of milliseconds or a duration string like "5m".`);return $}let G=$.trim().match(/^(\d+(?:\.\d+)?)\s*(ms|msec|msecs|millisecond|milliseconds|s|sec|secs|second|seconds|m|min|mins|minute|minutes|h|hr|hrs|hour|hours)$/i);if(!G)throw Error(`${Y} must be a non-negative number of milliseconds or a duration string like "5m" or "1hr".`);let J=G[1],Q=G[2],W=Number(J),K=Q.toLowerCase();if(!Number.isFinite(W)||W<0)throw Error(`${Y} must be a non-negative number of milliseconds or a duration string like "5m".`);return W*(K==="ms"||K==="msec"||K==="msecs"||K==="millisecond"||K==="milliseconds"?1:K==="s"||K==="sec"||K==="secs"||K==="second"||K==="seconds"?1000:K==="m"||K==="min"||K==="mins"||K==="minute"||K==="minutes"?60000:3600000)}function Vc0($,Y){return`${$} \u2014 ${sO4(new Date(Y))}`}function IE4($,Y,X,G){let J=sO4(new Date(G));return{reminderType:HX0,gapText:Y,gapMs:X,timestamp:J,timestampMs:G,precedesMessageId:$.id,systemReminder:{type:HX0,message:Vc0(Y,G),gapText:Y,gapMs:X,timestamp:J,timestampMs:G,precedesMessageId:$.id}}}function YB9($,Y){if(!YX0($))return!1;let X=$.content.metadata;if(X?.precedesMessageId===Y)return!0;return X?.systemReminder?.type===HX0&&X.systemReminder.precedesMessageId===Y}function XB9($,Y,X,G){let J=IE4($,Y,X,G);return{id:`__temporal_gap_${crypto.randomUUID()}`,role:"user",createdAt:new Date(G-1),threadId:$.threadId,resourceId:$.resourceId,content:{format:2,parts:[{type:"text",text:`<system-reminder type="${HX0}" precedesMessageId="${$.id}">${Vc0(Y,G)}</system-reminder>`}],metadata:J}}}async function GB9({messageList:$,writer:Y}){let G=$.get.input.db().filter((F)=>Boolean(F)).at(-1);if(!G||YX0(G))return;let J=$.get.all.db().filter((F)=>Boolean(F)),Q=J.findIndex((F)=>F.id===G.id);if(Q<=0)return;if(J.some((F)=>YB9(F,G.id)))return;let W;for(let F=Q-1;F>=0;F--){let L=J[F];if(L&&!YX0(L)){W=L;break}}if(!W)return;let K=TO4(G,"first"),Z=K-TO4(W,"last"),H=lD9(Z);if(!H)return;let z=IE4(G,H,Z,K);await Y?.custom({type:"data-system-reminder",data:{message:Vc0(H,K),...z},transient:!0});let V=XB9(G,H,Z,K);$.add(V,"input")}function kd0($){if(!$.tracing||!$.tracingContext||!$.loggerVNext||!$.metrics)return;return{tracing:$.tracing,tracingContext:$.tracingContext,loggerVNext:$.loggerVNext,metrics:$.metrics}}function JB9($){return typeof $==="object"&&$!==null&&"gatewayId"in $&&$.gatewayId==="mastra"}function iO4({messageList:$,systemMessages:Y,continuationMessage:X,threadId:G,resourceId:J}){if(!Y?.length)return;$.clearSystemMessages("observational-memory");for(let W of Y)$.addSystem(W,"observational-memory");let Q=X??{id:"om-continuation",role:"user",createdAt:new Date(0),content:{format:2,parts:[{type:"text",text:`<system-reminder>${oI}</system-reminder>`}]},threadId:G,resourceId:J};$.add(Q,"memory")}function Fc0($,Y){let X=$.trim();if(!X)return"";let G=X.split(QB9),J=[],Q=G[0]?.trim();if(Q)J.push(Q);for(let W=1;W<G.length;W+=2){let K=G[W],Z=G[W+1]?.trim();if(!Z)continue;let H=new Date(K);if(isNaN(H.getTime()))continue;if(H<=Y)J.push(Z)}return J.join(`

`)}var vd0,BC,$5,cD9=600000,vM=class{thresholds;constructor($){this.thresholds=oD9($)}resolve($){for(let{limit:X,model:G}of this.thresholds)if($<=X)return G;let Y=this.thresholds[this.thresholds.length-1].limit;throw Error(`ModelByInputTokens: input token count (${$}) exceeds the largest configured threshold (${Y}). Please configure a higher threshold or use a larger model.`)}getThresholds(){return this.thresholds.map(($)=>$.limit)}},od0,tD9,IO4,KN9,xM=class ${constructor(Y,X){this.deps=Y,this.opts=X,this.storage=Y.storage,this.messageHistory=Y.messageHistory,this.tokenCounter=Y.tokenCounter,this.observationConfig=Y.observationConfig,this.reflectionConfig=Y.reflectionConfig,this.scope=Y.scope,this.retrieval=Y.retrieval}deps;opts;storage;messageHistory;tokenCounter;observationConfig;reflectionConfig;scope;retrieval;static create;async run(){let{record:Y,threadId:X,abortSignal:G,writer:J,reflectionHooks:Q,requestContext:W}=this.opts,K=this.generateCycleId();try{if(this.needsLock){let F=await this.storage.getObservationalMemory(Y.threadId,Y.resourceId);if(F?.lastObservedAt&&Y.lastObservedAt&&F.lastObservedAt>Y.lastObservedAt)return{observed:!1}}let{messages:Z,existingObservations:H}=await this.prepare();await this.emitStartMarkers(K);let z=await this.observe(H,Z),V=await this.process(z,H);if(await this.persist(V),await this.emitEndMarkers(K,V),this.needsReflection)await this.deps.reflector.maybeReflect({record:{...Y,activeObservations:V.observations},observationTokens:V.observationTokens,threadId:X,writer:J,abortSignal:G,reflectionHooks:Q,requestContext:W,observabilityContext:this.opts.observabilityContext});return{observed:!0,usage:z.usage}}catch(Z){if(await this.emitFailedMarkers(K,Z),!this.rethrowOnFailure){let H={type:"data-om-observation-failed",data:{cycleId:K,operationType:"observation",startedAt:new Date().toISOString(),error:Z instanceof Error?Z.message:String(Z),recordId:Y.id,threadId:X}};if(await this.persistMarkerToStorage(H,X,this.opts.resourceId).catch(()=>{}),G?.aborted)throw Z;return cW("[OM] Observation failed",Z),{observed:!1}}throw cW("[OM] Observation failed",Z),Z}}generateCycleId(){return crypto.randomUUID()}async streamMarker(Y){if(this.opts.writer)await this.opts.writer.custom({...Y,transient:!0}).catch(()=>{});let X=Y.data?.threadId??this.opts.threadId;await this.persistMarkerToStorage(Y,X,this.opts.resourceId)}getObservationMarkerConfig(){return{messageTokens:a7(this.observationConfig.messageTokens),observationTokens:a7(this.reflectionConfig.observationTokens),scope:this.scope}}getMaxMessageTimestamp(Y){let X=0;for(let G of Y)if(G.createdAt){let J=new Date(G.createdAt).getTime();if(J>X)X=J}return X>0?new Date(X):new Date}async wrapWithThreadTag(Y,X,G){let J=$E4(X),Q=this.retrieval&&G?wV(J,G):J,W=Y;if(this.deps.obscureThreadIds)W=(await KN9).h32ToString(Y);return`<thread id="${W}">
${Q}
</thread>`}static createMessageBoundary(Y){return`

--- message boundary (${Y.toISOString()}) ---

`}wrapObservations(Y,X,G,J,Q){if(this.scope==="resource")return(async()=>{let Z=await this.wrapWithThreadTag(G,Y,Q);return this.replaceOrAppendThreadSection(X,G,Z,J)})();let W=this.retrieval&&Q?wV(Y,Q):Y;if(!X)return W;let K=J?$.createMessageBoundary(J):`

`;return`${X}${K}${W}`}replaceOrAppendThreadSection(Y,X,G,J){if(!Y)return G;let Q=G.match(/<thread id="([^"]+)">/),W=G.match(/Date:\s*([A-Za-z]+\s+\d+,\s+\d+)/);if(!Q||!W){let A=J?$.createMessageBoundary(J):`

`;return`${Y}${A}${G}`}let K=Q[1],Z=W[1],H=`<thread id="${K}">`,z="</thread>",V=Y.indexOf(H),F=null,L=-1,N=-1;if(V!==-1){let A=Y.indexOf(z,V);if(A!==-1){N=A+z.length,L=V;let B=Y.slice(V,N);if(B.includes(`Date: ${Z}`)||B.includes(`Date:${Z}`))F=B}}if(F){let A=G.indexOf(`
`,G.indexOf("Date:")),B=G.lastIndexOf(z);if(A!==-1&&B!==-1){let O=G.slice(A+1,B).trim();if(O){let M=`${F.slice(0,F.length-z.length).trimEnd()}
${O}
${z}`;return Y.slice(0,L)+M+Y.slice(N)}}}let D=J?$.createMessageBoundary(J):`

`;return`${Y}${D}${G}`}async indexObservationGroups(Y,X,G,J){if(!G||!this.deps.onIndexObservations)return;let Q=ap(Y);if(Q.length===0)return;await Promise.all(Q.map((W)=>this.deps.onIndexObservations({text:W.content,groupId:W.id,range:W.range,threadId:X,resourceId:G,observedAt:J})))}async persistMarkerToStorage(Y,X,G){try{let Q=(await this.storage.listMessages({threadId:X,perPage:20,orderBy:{field:"createdAt",direction:"DESC"}}))?.messages??[];for(let W of Q)if(W?.role==="assistant"&&W.content?.parts&&Array.isArray(W.content.parts)){let K=Y.data;if(!(K?.cycleId&&W.content.parts.some((H)=>H?.type===Y.type&&H?.data?.cycleId===K.cycleId)))W.content.parts.push(Y);await this.messageHistory.persistMessages({messages:[W],threadId:X,resourceId:G});return}}catch(J){S4(`[OM:persistMarkerToStorage] failed to save marker to DB: ${J}`)}}async persistMarkerToMessage(Y,X,G,J){if(!X)return;let Q=X.get.all.db();for(let W=Q.length-1;W>=0;W--){let K=Q[W];if(K?.role==="assistant"&&K.content?.parts&&Array.isArray(K.content.parts)){let Z=Y.data;if(!(Z?.cycleId&&K.content.parts.some((z)=>z?.type===Y.type&&z?.data?.cycleId===Z.cycleId)))K.content.parts.push(Y);try{await this.messageHistory.persistMessages({messages:[K],threadId:G,resourceId:J})}catch(z){S4(`[OM:persistMarker] failed to save marker to DB: ${z}`)}return}}}},ZN9,UN9,HN9,zN9=class{constructor($,Y){this.turn=$,this.stepNumber=Y}turn;stepNumber;_prepared=!1;_context;get prepared(){return this._prepared}get context(){if(!this._context)throw Error("Step not prepared yet \u2014 call prepare() first");return this._context}async prepare(){if(this._prepared)throw Error(`Step ${this.stepNumber} already prepared`);let{threadId:$,resourceId:Y,messageList:X}=this.turn,G=this.turn.om,J=!1,Q=!1,W=!1,K=!1,Z=!1,H;if(this.stepNumber===0){let O=X.get.all.db(),E=await G.activate({threadId:$,resourceId:Y,checkThreshold:!0,messages:O,currentModel:this.turn.actorModelContext,writer:this.turn.writer,messageList:X});if(E.activated){if(J=!0,E.activatedMessageIds?.length)X.removeByIds(E.activatedMessageIds);await G.resetBufferingState({threadId:$,resourceId:Y,recordId:E.record.id}),await this.turn.refreshRecord()}let M=this.turn.record,R=M.generationCount,q=M.observationTokenCount??0;if(await G.reflector.maybeReflect({record:M,observationTokens:q,threadId:$,writer:this.turn.writer,messageList:X,currentModel:this.turn.actorModelContext,requestContext:this.turn.requestContext,observabilityContext:this.turn.observabilityContext,lastActivityAt:id0(X.get.all.db())}),await this.turn.refreshRecord(),this.turn.record.generationCount>R)K=!0}let z=X.get.all.db(),V=z[z.length-1],F=[...X.get.input.db(),...X.get.response.db()],L=[...pO4(V?.content?.parts??[]),...F.flatMap((O)=>pO4(O.content?.parts??[]))],N=L.some((O)=>O?.type==="tool-invocation"&&O.toolInvocation?.state==="call");S4(`[OM:deferred-check] hasIncompleteToolCalls=${N}, latestStepPartsCount=${L.length}`);let D=await G.getStatus({threadId:$,resourceId:Y,messages:X.get.all.db()});if(D.shouldBuffer&&!N){let O=X.get.all.db(),E=G.getUnobservedMessages(O,D.record),M=G.getUnobservedMessages(E,D.record,{excludeBuffered:!0});if(M.length>0){G.sealMessagesForBuffering(M);try{await this.turn.hooks?.onBufferChunkSealed?.()}catch(R){S4(`[OM:buffer] onBufferChunkSealed hook failed: ${R instanceof Error?R.message:String(R)}`)}if(this.turn.memory)await this.turn.memory.persistMessages(M);X.removeByIds(M.map((R)=>R.id));for(let R of M)X.add(R,"memory")}G.buffer({threadId:$,resourceId:Y,messages:E,pendingTokens:D.pendingTokens,record:D.record,writer:this.turn.writer,requestContext:this.turn.requestContext,observabilityContext:this.turn.observabilityContext}).catch((R)=>{S4(`[OM:buffer] fire-and-forget buffer failed: ${R?.message}`)}),W=!0}if(this.stepNumber>0){let O=X.clear.input.db(),E=X.clear.response.db(),M=[...O,...E];if(M.length>0){await G.persistMessages(M,$,Y);for(let R of M)X.add(R,"memory")}if(D.shouldObserve&&!N){let R=this.turn.record.generationCount,q=await this.runThresholdObservation();if(H=q.observerExchange,q.succeeded){Q=!0,Z=!0;let _=q.activatedMessageIds??q.record.observedMessageIds??[],P=XE4(G.getObservationConfig().bufferActivation??1,D.threshold);if(await G.cleanupMessages({threadId:$,resourceId:Y,messages:X,observedMessageIds:_,retentionFloor:P}),D.asyncObservationEnabled)await G.resetBufferingState({threadId:$,resourceId:Y,recordId:q.record.id,activatedMessageIds:q.activatedMessageIds});if(await this.turn.refreshRecord(),this.turn.record.generationCount>R)K=!0}}D=await G.getStatus({threadId:$,resourceId:Y,messages:X.get.all.db()})}let A=await this.turn.refreshOtherThreadsContext(),B=await G.buildContextSystemMessages({threadId:$,resourceId:Y,record:this.turn.record,unobservedContextBlocks:A});if(!Z){let O=this.turn.record.threadId?fE((await G.getStorage().getThreadById({threadId:this.turn.record.threadId}))?.metadata)?.lastObservedMessageCursor:void 0;nD9({messageList:X,record:this.turn.record,useMarkerBoundaryPruning:this.stepNumber===0,fallbackCursor:O})}return this._context={systemMessage:B,observerExchange:H,activated:J,observed:Q,buffered:W,reflected:K,status:{pendingTokens:D.pendingTokens,threshold:D.threshold,effectiveObservationTokensThreshold:D.effectiveObservationTokensThreshold,shouldObserve:D.shouldObserve,shouldBuffer:D.shouldBuffer,shouldReflect:D.shouldReflect,canActivate:D.canActivate}},this._prepared=!0,this._context}async runThresholdObservation(){let{threadId:$,resourceId:Y,messageList:X}=this.turn,G=this.turn.om;await G.waitForBuffering($,Y);let J=await G.getStatus({threadId:$,resourceId:Y,messages:X.get.all.db()});if(!J.shouldObserve)return{succeeded:!1,record:J.record};if(J.canActivate){let W=await G.activate({threadId:$,resourceId:Y,messages:X.get.all.db(),currentModel:this.turn.actorModelContext,writer:this.turn.writer,messageList:X});if(W.activated){let K=W.record;return await G.reflector.maybeReflect({record:K,observationTokens:K.observationTokenCount??0,threadId:$,writer:this.turn.writer,messageList:X,currentModel:this.turn.actorModelContext,requestContext:this.turn.requestContext,observabilityContext:this.turn.observabilityContext,lastActivityAt:id0(X.get.all.db())}),{succeeded:!0,record:W.record,activatedMessageIds:W.activatedMessageIds}}}let Q=await G.observe({threadId:$,resourceId:Y,messages:X.get.all.db(),requestContext:this.turn.requestContext,writer:this.turn.writer,observabilityContext:this.turn.observabilityContext});if(Q.observed){let W=new Set(Q.record.observedMessageIds??[]),K=X.get.all.db(),Z=-1;for(let V=K.length-1;V>=0;V--){let F=K[V];if(F&&W.has(F.id)){Z=V;break}}let H=Z>=0?K[Z]:void 0,z=H?[H]:[];G.sealMessagesForBuffering(z);try{await this.turn.hooks?.onSyncObservationComplete?.()}catch(V){S4(`[OM:observe] onSyncObservationComplete hook failed: ${V instanceof Error?V.message:String(V)}`)}if(z.length>0)await G.persistMessages(z,$,Y)}return{succeeded:Q.observed,record:Q.record,observerExchange:G.observer.lastExchange}}},VN9=class{_record;_context;_currentStep;_started=!1;_ended=!1;_generationCountAtStart=-1;memory;writer;requestContext;observabilityContext;actorModelContext;hooks;constructor($){this.om=$.om,this.threadId=$.threadId,this.resourceId=$.resourceId,this.messageList=$.messageList,this.observabilityContext=$.observabilityContext,this.hooks=$.hooks??{}}om;threadId;resourceId;messageList;get record(){if(!this._record)throw Error("Turn not started \u2014 call start() first");return this._record}get context(){if(!this._context)throw Error("Turn not started \u2014 call start() first");return this._context}get currentStep(){return this._currentStep}addHooks($){if(!$)return;Object.assign(this.hooks,$)}async start($){if(this._started)throw Error("Turn already started");if(this._started=!0,this._record=await this.om.getOrCreateRecord(this.threadId,this.resourceId),this._generationCountAtStart=this._record.generationCount,this.memory=$,$){let Y=await GE4({memory:$,messageList:this.messageList,threadId:this.threadId,resourceId:this.resourceId});this._context={messages:Y.messages,systemMessage:Y.systemMessage,continuation:Y.continuationMessage,otherThreadsContext:Y.otherThreadsContext,record:this._record}}else this._context={messages:[],systemMessage:void 0,continuation:void 0,otherThreadsContext:void 0,record:this._record};return this._context}step($){if(!this._started)throw Error("Turn not started \u2014 call start() first");if(this._ended)throw Error("Turn already ended");return this._currentStep=new zN9(this,$),this._currentStep}async end(){if(this._ended)throw Error("Turn already ended");this._ended=!0;let $=this.messageList.get.input.db(),Y=this.messageList.get.response.db(),X=[...$,...Y];if(X.length>0)await this.om.persistMessages(X,this.threadId,this.resourceId);return{record:this._record}}async refreshRecord(){this._record=await this.om.getOrCreateRecord(this.threadId,this.resourceId)}async refreshOtherThreadsContext(){if(this.om.scope==="resource"&&this.resourceId){let $=await this.om.getOtherThreadsContext(this.resourceId,this.threadId);if(this._context)this._context.otherThreadsContext=$;return $}return this._context?.otherThreadsContext}},FN9,LN9,DN9,NN9,AN9,MN9="encryptedContent",RN9=256,QE4=1e4,bd0=`CRITICAL: DISTINGUISH USER ASSERTIONS FROM QUESTIONS

When the user TELLS you something about themselves, mark it as an assertion:
- "I have two kids" \u2192 \uD83D\uDD34 (14:30) User stated has two kids
- "I work at Acme Corp" \u2192 \uD83D\uDD34 (14:31) User stated works at Acme Corp
- "I graduated in 2019" \u2192 \uD83D\uDD34 (14:32) User stated graduated in 2019

When the user ASKS about something, mark it as a question/request:
- "Can you help me with X?" \u2192 \uD83D\uDD34 (15:00) User asked help with X
- "What's the best way to do Y?" \u2192 \uD83D\uDD34 (15:01) User asked best way to do Y

Distinguish between QUESTIONS and STATEMENTS OF INTENT:
- "Can you recommend..." \u2192 Question (extract as "User asked...")
- "I'm looking forward to [doing X]" \u2192 Statement of intent (extract as "User stated they will [do X] (include estimated/actual date if mentioned)")
- "I need to [do X]" \u2192 Statement of intent (extract as "User stated they need to [do X] (again, add date if mentioned)")

STATE CHANGES AND UPDATES:
When a user indicates they are changing something, frame it as a state change that supersedes previous information:
- "I'm going to start doing X instead of Y" \u2192 "User will start doing X (changing from Y)"
- "I'm switching from A to B" \u2192 "User is switching from A to B"
- "I moved my stuff to the new place" \u2192 "User moved their stuff to the new place (no longer at previous location)"

If the new state contradicts or updates previous information, make that explicit:
- BAD: "User plans to use the new method"
- GOOD: "User will use the new method (replacing the old approach)"

This helps distinguish current state from outdated information.

USER ASSERTIONS ARE AUTHORITATIVE. The user is the source of truth about their own life.
If a user previously stated something and later asks a question about the same topic,
the assertion is the answer - the question doesn't invalidate what they already told you.

TEMPORAL ANCHORING:
Each observation has TWO potential timestamps:

1. BEGINNING: The time the statement was made (from the message timestamp) - ALWAYS include this
2. END: The time being REFERENCED, if different from when it was said - ONLY when there's a relative time reference

ONLY add "(meaning DATE)" or "(estimated DATE)" at the END when you can provide an ACTUAL DATE:
- Past: "last week", "yesterday", "a few days ago", "last month", "in March"
- Future: "this weekend", "tomorrow", "next week"

DO NOT add end dates for:
- Present-moment statements with no time reference
- Vague references like "recently", "a while ago", "lately", "soon" - these cannot be converted to actual dates

FORMAT:
- With time reference: (TIME) [observation]. (meaning/estimated DATE)
- Without time reference: (TIME) [observation].

GOOD: (09:15) User's friend had a birthday party in March. (meaning March 20XX)
      ^ References a past event - add the referenced date at the end

GOOD: (09:15) User will visit their parents this weekend. (meaning June 17-18, 20XX)
      ^ References a future event - add the referenced date at the end

GOOD: (09:15) User prefers hiking in the mountains.
      ^ Present-moment preference, no time reference - NO end date needed

GOOD: (09:15) User is considering adopting a dog.
      ^ Present-moment thought, no time reference - NO end date needed

BAD: (09:15) User prefers hiking in the mountains. (meaning June 15, 20XX - today)
     ^ No time reference in the statement - don't repeat the message timestamp at the end

IMPORTANT: If an observation contains MULTIPLE events, split them into SEPARATE observation lines.
EACH split observation MUST have its own date at the end - even if they share the same time context.

Examples (assume message is from June 15, 20XX):

BAD: User will visit their parents this weekend (meaning June 17-18, 20XX) and go to the dentist tomorrow.
GOOD (split into two observations, each with its date):
  User will visit their parents this weekend. (meaning June 17-18, 20XX)
  User will go to the dentist tomorrow. (meaning June 16, 20XX)

BAD: User needs to clean the garage this weekend and is looking forward to setting up a new workbench.
GOOD (split, BOTH get the same date since they're related):
  User needs to clean the garage this weekend. (meaning June 17-18, 20XX)
  User will set up a new workbench this weekend. (meaning June 17-18, 20XX)

BAD: User was given a gift by their friend (estimated late May 20XX) last month.
GOOD: (09:15) User was given a gift by their friend last month. (estimated late May 20XX)
      ^ Message time at START, relative date reference at END - never in the middle

BAD: User started a new job recently and will move to a new apartment next week.
GOOD (split):
  User started a new job recently.
  User will move to a new apartment next week. (meaning June 21-27, 20XX)
  ^ "recently" is too vague for a date - omit the end date. "next week" can be calculated.

ALWAYS put the date at the END in parentheses - this is critical for temporal reasoning.
When splitting related events that share the same time context, EACH observation must have the date.

PRESERVE UNUSUAL PHRASING:
When the user uses unexpected or non-standard terminology, quote their exact words.

BAD: User exercised.
GOOD: User stated they did a "movement session" (their term for exercise).

USE PRECISE ACTION VERBS:
Replace vague verbs like "getting", "got", "have" with specific action verbs that clarify the nature of the action.
If the assistant confirms or clarifies the user's action, use the assistant's more precise language.

BAD: User is getting X.
GOOD: User subscribed to X. (if context confirms recurring delivery)
GOOD: User purchased X. (if context confirms one-time acquisition)

BAD: User got something.
GOOD: User purchased / received / was given something. (be specific)

Common clarifications:
- "getting" something regularly \u2192 "subscribed to" or "enrolled in"
- "getting" something once \u2192 "purchased" or "acquired"
- "got" \u2192 "purchased", "received as gift", "was given", "picked up"
- "signed up" \u2192 "enrolled in", "registered for", "subscribed to"
- "stopped getting" \u2192 "canceled", "unsubscribed from", "discontinued"

When the assistant interprets or confirms the user's vague language, prefer the assistant's precise terminology.

PRESERVING DETAILS IN ASSISTANT-GENERATED CONTENT:

When the assistant provides lists, recommendations, or creative content that the user explicitly requested,
preserve the DISTINGUISHING DETAILS that make each item unique and queryable later.

1. RECOMMENDATION LISTS - Preserve the key attribute that distinguishes each item:
   BAD: Assistant recommended 5 hotels in the city.
   GOOD: Assistant recommended hotels: Hotel A (near the train station), Hotel B (budget-friendly), 
         Hotel C (has rooftop pool), Hotel D (pet-friendly), Hotel E (historic building).
   
   BAD: Assistant listed 3 online stores for craft supplies.
   GOOD: Assistant listed craft stores: Store A (based in Germany, ships worldwide), 
         Store B (specializes in vintage fabrics), Store C (offers bulk discounts).

2. NAMES, HANDLES, AND IDENTIFIERS - Always preserve specific identifiers:
   BAD: Assistant provided social media accounts for several photographers.
   GOOD: Assistant provided photographer accounts: @photographer_one (portraits), 
         @photographer_two (landscapes), @photographer_three (nature).
   
   BAD: Assistant listed some authors to check out.
   GOOD: Assistant recommended authors: Jane Smith (mystery novels), 
         Bob Johnson (science fiction), Maria Garcia (historical romance).

3. CREATIVE CONTENT - Preserve structure and key sequences:
   BAD: Assistant wrote a poem with multiple verses.
   GOOD: Assistant wrote a 3-verse poem. Verse 1 theme: loss. Verse 2 theme: hope. 
         Verse 3 theme: renewal. Refrain: "The light returns."
   
   BAD: User shared their lucky numbers from a fortune cookie.
   GOOD: User's fortune cookie lucky numbers: 7, 14, 23, 38, 42, 49.

4. TECHNICAL/NUMERICAL RESULTS - Preserve specific values:
   BAD: Assistant explained the performance improvements from the optimization.
   GOOD: Assistant explained the optimization achieved 43.7% faster load times 
         and reduced memory usage from 2.8GB to 940MB.
   
   BAD: Assistant provided statistics about the dataset.
   GOOD: Assistant provided dataset stats: 7,342 samples, 89.6% accuracy, 
         23ms average inference time.

5. QUANTITIES AND COUNTS - Always preserve how many of each item:
   BAD: Assistant listed items with details but no quantities.
   GOOD: Assistant listed items: Item A (4 units, size large), Item B (2 units, size small).
   
   When listing items with attributes, always include the COUNT first before other details.

6. ROLE/PARTICIPATION STATEMENTS - When user mentions their role at an event:
   BAD: User attended the company event.
   GOOD: User was a presenter at the company event.
   
   BAD: User went to the fundraiser.
   GOOD: User volunteered at the fundraiser (helped with registration).
   
   Always capture specific roles: presenter, organizer, volunteer, team lead, 
   coordinator, participant, contributor, helper, etc.

CONVERSATION CONTEXT:
- What the user is working on or asking about
- Previous topics and their outcomes
- What user understands or needs clarification on
- Specific requirements or constraints mentioned
- Contents of assistant learnings and summaries
- Answers to users questions including full context to remember detailed summaries and explanations
- Assistant explanations, especially complex ones. observe the fine details so that the assistant does not forget what they explained
- Relevant code snippets
- User preferences (like favourites, dislikes, preferences, etc)
- Any specifically formatted text or ascii that would need to be reproduced or referenced in later interactions (preserve these verbatim in memory)
- Sequences, units, measurements, and any kind of specific relevant data
- Any blocks of any text which the user and assistant are iteratively collaborating back and forth on should be preserved verbatim
- When who/what/where/when is mentioned, note that in the observation. Example: if the user received went on a trip with someone, observe who that someone was, where the trip was, when it happened, and what happened, not just that the user went on the trip.
- For any described entity (like a person, place, thing, etc), preserve the attributes that would help identify or describe the specific entity later: location ("near X"), specialty ("focuses on Y"), unique feature ("has Z"), relationship ("owned by W"), or other details. The entity's name is important, but so are any additional details that distinguish it. If there are a list of entities, preserve these details for each of them.

USER MESSAGE CAPTURE:
- Short and medium-length user messages should be captured nearly verbatim in your own words.
- For very long user messages, summarize but quote key phrases that carry specific intent or meaning.
- This is critical for continuity: when the conversation window shrinks, the observations are the only record of what the user said.

AVOIDING REPETITIVE OBSERVATIONS:
- Do NOT repeat the same observation across multiple turns if there is no new information.
- When the agent performs repeated similar actions (e.g., browsing files, running the same tool type multiple times), group them into a single parent observation with sub-bullets for each new result.

Example \u2014 BAD (repetitive):
* \uD83D\uDFE1 (14:30) Agent used view tool on src/auth.ts
* \uD83D\uDFE1 (14:31) Agent used view tool on src/users.ts
* \uD83D\uDFE1 (14:32) Agent used view tool on src/routes.ts

Example \u2014 GOOD (grouped):
* \uD83D\uDFE1 (14:30) Agent browsed source files for auth flow
  * -> viewed src/auth.ts \u2014 found token validation logic
  * -> viewed src/users.ts \u2014 found user lookup by email
  * -> viewed src/routes.ts \u2014 found middleware chain

Only add a new observation for a repeated action if the NEW result changes the picture.

ACTIONABLE INSIGHTS:
- What worked well in explanations
- What needs follow-up or clarification
- User's stated goals or next steps (note if the user tells you not to do a next step, or asks for something specific, other next steps besides the users request should be marked as "waiting for user", unless the user explicitly says to continue all next steps)

COMPLETION TRACKING:
Completion observations are not just summaries. They are explicit memory signals to the assistant that a task, question, or subtask has been resolved.
Without clear completion markers, the assistant may forget that work is already finished and may repeat, reopen, or continue an already-completed task.

Use \u2705 to answer: "What exactly is now done?"
Choose completion observations that help the assistant know what is finished and should not be reworked unless new information appears.

Use \u2705 when:
- The user explicitly confirms something worked or was answered ("thanks, that fixed it", "got it", "perfect")
- The assistant provided a definitive, complete answer to a factual question and the user moved on
- A multi-step task reached its stated goal
- The user acknowledged receipt of requested information
- A concrete subtask, fix, deliverable, or implementation step became complete during ongoing work

Do NOT use \u2705 when:
- The assistant merely responded \u2014 the user might follow up with corrections
- The topic is paused but not resolved ("I'll try that later")
- The user's reaction is ambiguous

FORMAT:
As a sub-bullet under the related observation group:
* \uD83D\uDD34 (14:30) User asked how to configure auth middleware
  * -> Agent explained JWT setup with code example
  * \u2705 User confirmed auth is working

Or as a standalone observation when closing out a broader task:
* \u2705 (14:45) Auth configuration task completed \u2014 user confirmed middleware is working

Completion observations should be terse but specific about WHAT was completed.
Prefer concrete resolved outcomes over abstract workflow status so the assistant remembers what is already done.`,wN9,hd0=`- Be specific enough for the assistant to act on
- Good: "User prefers short, direct answers without lengthy explanations"
- Bad: "User stated a preference" (too vague)
- Add 1 to 5 observations per exchange
- Use terse language to save tokens. Sentences should be dense without unnecessary words
- Do not add repetitive observations that have already been observed. Group repeated similar actions (tool calls, file browsing) under a single parent with sub-bullets for new results
- If the agent calls tools, observe what was called, why, and what was learned
- When observing files with line numbers, include the line number if useful
- If the agent provides a detailed response, observe the contents so it could be repeated
- Make sure you start each observation with a priority emoji (\uD83D\uDD34, \uD83D\uDFE1, \uD83D\uDFE2) or a completion marker (\u2705)
- Capture the user's words closely \u2014 short/medium messages near-verbatim, long messages summarized with key quotes. User confirmations or explicit resolved outcomes should be \u2705 when they clearly signal something is done; unresolved or critical user facts remain \uD83D\uDD34
- Treat \u2705 as a memory signal that tells the assistant something is finished and should not be repeated unless new information changes it
- Make completion observations answer "What exactly is now done?"
- Prefer concrete resolved outcomes over meta-level workflow or bookkeeping updates
- When multiple concrete things were completed, capture the concrete completed work rather than collapsing it into a vague progress summary
- Observe WHAT the agent did and WHAT it means
- If the user provides detailed messages or code snippets, observe all important details`,KE4,_N9,vO4=1e4,cp,mN9,nN9,rN9=class{observationConfig;observedMessageIds;resolveModel;tokenCounter;mastra;lastExchange;constructor($){this.observationConfig=$.observationConfig,this.observedMessageIds=$.observedMessageIds,this.resolveModel=$.resolveModel,this.tokenCounter=$.tokenCounter,this.mastra=$.mastra}__registerMastra($){this.mastra=$}createAgent($,Y=!1){let X=new YJ({id:Y?"multi-thread-observer":"observational-memory-observer",name:Y?"multi-thread-observer":"Observer",instructions:OC(Y,this.observationConfig.instruction,this.observationConfig.threadTitle),model:$});if(this.mastra)X.__registerMastra(this.mastra);return X}async withAbortCheck($,Y){if(Y?.aborted)throw Error("The operation was aborted.");let X=await $();if(Y?.aborted)throw Error("The operation was aborted.");return X}async call($,Y,X,G){let J=this.tokenCounter.countMessages(Y),Q=G?.model?{model:G.model}:this.resolveModel(J),W=this.createAgent(Q.model),K=[{role:"user",content:FE4($,{...G,includeThreadTitle:this.observationConfig.threadTitle})},yN9(Y)],Z=async()=>{return gd0(()=>md0({phase:"observer",model:Q.model,inputTokens:J,requestContext:G?.requestContext,observabilityContext:G?.observabilityContext,metadata:{omPreviousObserverTokens:this.observationConfig.previousObserverTokens,omThreadTitleEnabled:this.observationConfig.threadTitle,omSkipContinuationHints:G?.skipContinuationHints??!1,omWasTruncated:G?.wasTruncated??!1,...Q.selectedThreshold!==void 0?{omSelectedThreshold:Q.selectedThreshold}:{},...Q.routingStrategy?{omRoutingStrategy:Q.routingStrategy}:{},...Q.routingThresholds?{omRoutingThresholds:Q.routingThresholds}:{}},callback:(N)=>this.withAbortCheck(async()=>{return(await W.stream(K,{modelSettings:{...this.observationConfig.modelSettings},providerOptions:this.observationConfig.providerOptions,...X?{abortSignal:X}:{},...G?.requestContext?{requestContext:G.requestContext}:{},...N})).getFullOutput()},X)}),{label:"observer",abortSignal:X})},H=await Z(),z=JX0(H.text),V=!1;if(z.degenerate){if(S4("[OM:callObserver] degenerate repetition detected, retrying once"),H=await Z(),z=JX0(H.text),V=!0,z.degenerate)throw S4("[OM:callObserver] degenerate repetition on retry, failing"),Error("Observer produced degenerate output after retry")}let F=OC(!1,this.observationConfig.instruction,this.observationConfig.threadTitle);this.lastExchange={systemPrompt:F,observerMessages:K,rawOutput:H.text,parsedResult:{observations:z.observations,currentTask:z.currentTask,suggestedContinuation:z.suggestedContinuation,threadTitle:z.threadTitle,degenerate:z.degenerate},model:String(Q.model),inputTokens:J,isMultiThread:!1,retriedDueToDegenerate:V};let L=H.totalUsage??H.usage;return{observations:z.observations,currentTask:z.currentTask,suggestedContinuation:z.suggestedContinuation,threadTitle:z.threadTitle,usage:L?{inputTokens:L.inputTokens,outputTokens:L.outputTokens,totalTokens:L.totalTokens}:void 0}}async callMultiThread($,Y,X,G,J,Q,W,K){let Z=Array.from(Y.values()).reduce((E,M)=>E+this.tokenCounter.countMessages(M),0),H=K?{model:K}:this.resolveModel(Z),z=this.createAgent(H.model,!0),V=[{role:"user",content:hN9($,X,Q,void 0,this.observationConfig.threadTitle)},bN9(Y,X)];for(let E of Y.values())for(let M of E)this.observedMessageIds.add(M.id);let F=async()=>{return gd0(()=>md0({phase:"observer-multi-thread",model:H.model,inputTokens:Z,requestContext:J,observabilityContext:W,metadata:{omThreadCount:X.length,omPreviousObserverTokens:this.observationConfig.previousObserverTokens,omThreadTitleEnabled:this.observationConfig.threadTitle,...H.selectedThreshold!==void 0?{omSelectedThreshold:H.selectedThreshold}:{},...H.routingStrategy?{omRoutingStrategy:H.routingStrategy}:{},...H.routingThresholds?{omRoutingThresholds:H.routingThresholds}:{}},callback:(E)=>this.withAbortCheck(async()=>{return(await z.stream(V,{modelSettings:{...this.observationConfig.modelSettings},providerOptions:this.observationConfig.providerOptions,...G?{abortSignal:G}:{},...J?{requestContext:J}:{},...E})).getFullOutput()},G)}),{label:"observer-multi-thread",abortSignal:G})},L=await F(),N=kO4(L.text),D=!1;if(N.degenerate){if(S4("[OM:callMultiThreadObserver] degenerate repetition detected, retrying once"),L=await F(),N=kO4(L.text),D=!0,N.degenerate)throw S4("[OM:callMultiThreadObserver] degenerate repetition on retry, failing"),Error("Multi-thread observer produced degenerate output after retry")}let A=OC(!0,this.observationConfig.instruction,this.observationConfig.threadTitle);this.lastExchange={systemPrompt:A,observerMessages:V,rawOutput:L.text,parsedResult:{observations:Array.from(N.threads.values()).map((E)=>E.observations).join(`
`),threadTitle:Array.from(N.threads.values()).map((E)=>E.threadTitle).filter(Boolean).join(", "),degenerate:N.degenerate},model:String(H.model),inputTokens:Z,isMultiThread:!0,retriedDueToDegenerate:D};let B=new Map;for(let[E,M]of N.threads)B.set(E,{observations:M.observations,currentTask:M.currentTask,suggestedContinuation:M.suggestedContinuation,threadTitle:M.threadTitle});for(let E of X)if(!B.has(E))B.set(E,{observations:""});let O=L.totalUsage??L.usage;return{results:B,usage:O?{inputTokens:O.inputTokens,outputTokens:O.outputTokens,totalTokens:O.totalTokens}:void 0}}},sN9=4,oN9,yO4=0.75,QA9=class{reflectionConfig;observationConfig;tokenCounter;resolveModel;storage;scope;buffering;emitDebugEvent;persistMarkerToStorage;persistMarkerToMessage;getCompressionStartLevel;mastra;constructor($){this.reflectionConfig=$.reflectionConfig,this.observationConfig=$.observationConfig,this.tokenCounter=$.tokenCounter,this.resolveModel=$.resolveModel,this.storage=$.storage,this.scope=$.scope,this.buffering=$.buffering,this.emitDebugEvent=$.emitDebugEvent,this.persistMarkerToStorage=$.persistMarkerToStorage,this.persistMarkerToMessage=$.persistMarkerToMessage,this.getCompressionStartLevel=$.getCompressionStartLevel,this.mastra=$.mastra}__registerMastra($){this.mastra=$}createAgent($){let Y=new YJ({id:"observational-memory-reflector",name:"Reflector",instructions:aN9(this.reflectionConfig.instruction),model:$});if(this.mastra)Y.__registerMastra(this.mastra);return Y}getObservationMarkerConfig($){return{messageTokens:a7(this.observationConfig.messageTokens),observationTokens:a7($?this.getEffectiveReflectionTokens($):this.reflectionConfig.observationTokens),scope:this.scope,activateAfterIdle:this.reflectionConfig.activateAfterIdle}}getEffectiveReflectionTokens($){let X=$.config?._overrides?.reflection?.observationTokens;if(X)return X;return this.reflectionConfig.observationTokens}async call($,Y,X,G,J,Q,W,K,Z,H){let z=this.tokenCounter.countObservations($),V=H?{model:H}:this.resolveModel(z),F=this.createAgent(V.model),L=G??a7(this.reflectionConfig.observationTokens),N={inputTokens:0,outputTokens:0,totalTokens:0},D=W??0,A=D,B=Math.min(sN9,D+3),O={observations:"",suggestedContinuation:void 0},E=0,M=0;while(A<=B){M++;let R=M>1,q=tN9($,Y,A,Q);S4(`[OM:callReflector] ${R?`retry #${M-1}`:"first attempt"}: level=${A}, originalTokens=${z}, targetThreshold=${L}, promptLen=${q.length}, skipContinuationHints=${Q}`);let _=0,P=await gd0(()=>md0({phase:"reflector",model:V.model,inputTokens:z,requestContext:K,observabilityContext:Z,metadata:{omCompressionLevel:A,omCompressionAttempt:M,omTargetThreshold:L,omSkipContinuationHints:Q??!1,...V.selectedThreshold!==void 0?{omSelectedThreshold:V.selectedThreshold}:{},...V.routingStrategy?{omRoutingStrategy:V.routingStrategy}:{},...V.routingThresholds?{omRoutingThresholds:V.routingThresholds}:{}},callback:(j)=>JA9(async()=>{return _=0,(await F.stream(q,{modelSettings:{...this.reflectionConfig.modelSettings},providerOptions:this.reflectionConfig.providerOptions,...J?{abortSignal:J}:{},...K?{requestContext:K}:{},...j,...M===1?{onChunk(k){if(_++,_===1||_%50===0){let S=k.type==="text-delta"?` text="${k.textDelta?.slice(0,80)}..."`:k.type==="tool-call"?` tool=${k.toolName}`:"";S4(`[OM:callReflector] chunk#${_}: type=${k.type}${S}`)}},onFinish(k){S4(`[OM:callReflector] onFinish: chunks=${_}, finishReason=${k.finishReason}, inputTokens=${k.usage?.inputTokens}, outputTokens=${k.usage?.outputTokens}, textLen=${k.text?.length}`)},onAbort(k){S4(`[OM:callReflector] onAbort: chunks=${_}, reason=${k?.reason??"unknown"}`)},onError({error:k}){cW(`[OM:callReflector] onError after ${_} chunks`,k)}}:{}})).getFullOutput()},J)}),{label:"reflector",abortSignal:J});S4(`[OM:callReflector] attempt #${M} returned: textLen=${P.text?.length}, textPreview="${P.text?.slice(0,120)}...", inputTokens=${P.usage?.inputTokens??P.totalUsage?.inputTokens}, outputTokens=${P.usage?.outputTokens??P.totalUsage?.outputTokens}`);let w=P.totalUsage??P.usage;if(w)N.inputTokens+=w.inputTokens??0,N.outputTokens+=w.outputTokens??0,N.totalTokens+=w.totalTokens??0;if(O=eN9(P.text,$),O.degenerate)S4(`[OM:callReflector] attempt #${M}: degenerate repetition detected, treating as compression failure`),E=z;else E=this.tokenCounter.countObservations(O.observations);if(S4(`[OM:callReflector] attempt #${M} parsed: reflectedTokens=${E}, targetThreshold=${L}, compressionValid=${xO4(E,L)}, parsedObsLen=${O.observations?.length}, degenerate=${O.degenerate??!1}`),!O.degenerate&&(xO4(E,L)||A>=B))break;if(O.degenerate&&A>=B){S4(`[OM:callReflector] degenerate output persists at maxLevel=${B}, breaking`);break}if(X?.writer){let j=GX0({cycleId:X.cycleId,operationType:"reflection",startedAt:X.startedAt,tokensAttempted:z,error:`Did not compress below threshold (${z} \u2192 ${E}, target: ${L}), retrying at level ${A+1}`,recordId:X.recordId,threadId:X.threadId});await X.writer.custom({...j,transient:!0}).catch(()=>{}),await this.persistMarkerToStorage(j,X.threadId,X.resourceId);let C=crypto.randomUUID();X.cycleId=C;let k=XX0({cycleId:C,operationType:"reflection",tokensToObserve:z,recordId:X.recordId,threadId:X.threadId,threadIds:[X.threadId],config:this.getObservationMarkerConfig()});X.startedAt=k.data.startedAt,await X.writer.custom({...k,transient:!0}).catch(()=>{}),await this.persistMarkerToStorage(k,X.threadId,X.resourceId)}A=Math.min(A+1,B)}return{observations:O.observations,suggestedContinuation:O.suggestedContinuation,usage:N.totalTokens>0?N:void 0}}startAsyncBufferedReflection($,Y,X,G,J,Q,W){let K=this.buffering.getReflectionBufferKey(X);if(this.buffering.isAsyncBufferingInProgress(K))return;$5.lastBufferedBoundary.set(K,Y),lp($.id,"bufferingReflection"),this.storage.setBufferingReflectionFlag($.id,!0).catch((H)=>{cW("[OM] Failed to set buffering reflection flag",H)}),W?.onReflectionStart?.();let Z=this.doAsyncBufferedReflection($,K,G,J,Q).then((H)=>{W?.onReflectionEnd?.({usage:H})}).catch(async(H)=>{if(G){let z=tO4({cycleId:`reflect-buf-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,operationType:"reflection",startedAt:new Date().toISOString(),tokensAttempted:Y,error:H instanceof Error?H.message:String(H),recordId:$.id,threadId:$.threadId??""});G.custom({...z,transient:!0}).catch(()=>{}),await this.persistMarkerToStorage(z,$.threadId??"",$.resourceId??void 0)}cW("[OM] Async buffered reflection failed",H),W?.onReflectionEnd?.({usage:void 0,error:H instanceof Error?H:Error(String(H))}),$5.lastBufferedBoundary.delete(K)}).finally(()=>{$5.asyncBufferingOps.delete(K),NC($.id,"bufferingReflection"),this.storage.setBufferingReflectionFlag($.id,!1).catch((H)=>{cW("[OM] Failed to clear buffering reflection flag",H)})});$5.asyncBufferingOps.set(K,Z)}async doAsyncBufferedReflection($,Y,X,G,J){let W=await this.storage.getObservationalMemory($.threadId,$.resourceId)??$,K=W.observationTokenCount??0,Z=a7(this.getEffectiveReflectionTokens(W)),H=this.reflectionConfig.bufferActivation??0.5,z=new Date().toISOString(),V=`reflect-buf-${Date.now()}-${Math.random().toString(36).slice(2,11)}`;$5.reflectionBufferCycleIds.set(Y,V);let L=(W.activeObservations??"").split(`
`),N=L.length,D=N>0?K/N:0,A=Z*H,B=D>0?Math.min(Math.floor(A/D),N):N,O=L.slice(0,B).join(`
`),E=B,M=Math.round(D*B),R=Math.round(M*0.75);if(S4(`[OM:reflect] doAsyncBufferedReflection: slicing observations for reflection \u2014 totalLines=${N}, avgTokPerLine=${D.toFixed(1)}, activationPointTokens=${A}, linesToReflect=${B}/${N}, sliceTokenEstimate=${M}, compressionTarget=${R}`),S4(`[OM:reflect] doAsyncBufferedReflection: starting reflector call, recordId=${W.id}, observationTokens=${M}, compressionTarget=${R} (inputTokens), activeObsLength=${O.length}, reflectedLineCount=${E}`),X){let w=xd0({cycleId:V,operationType:"reflection",tokensToBuffer:M,recordId:$.id,threadId:$.threadId??"",threadIds:$.threadId?[$.threadId]:[],config:this.getObservationMarkerConfig(W)});X.custom({...w,transient:!0}).catch(()=>{}),await this.persistMarkerToStorage(w,W.threadId??"",W.resourceId??void 0)}let q=await this.getCompressionStartLevel(G),_=await this.call(O,void 0,void 0,R,void 0,!0,q,G,J),P=this.tokenCounter.countObservations(_.observations);if(S4(`[OM:reflect] doAsyncBufferedReflection: reflector returned ${P} tokens (${_.observations?.length} chars), saving to recordId=${W.id}`),await this.storage.updateBufferedReflection({id:W.id,reflection:_.observations,tokenCount:P,inputTokenCount:M,reflectedObservationLineCount:E}),S4(`[OM:reflect] doAsyncBufferedReflection: bufferedReflection saved with lineCount=${E}`),X){let w=oO4({cycleId:V,operationType:"reflection",startedAt:z,tokensBuffered:M,bufferedTokens:P,recordId:W.id,threadId:W.threadId??"",observations:_.observations});X.custom({...w,transient:!0}).catch(()=>{}),await this.persistMarkerToStorage(w,W.threadId??"",W.resourceId??void 0)}return _.usage}async tryActivateBufferedReflection($,Y,X,G,J){let Q=this.buffering.getReflectionBufferKey(Y),W=$5.asyncBufferingOps.get(Q);if(W)if(J?.triggeredBy==="ttl"||J?.triggeredBy==="provider_change")S4(`[OM:reflect] tryActivateBufferedReflection: async op in progress, not blocking for ${J.triggeredBy} trigger`);else{S4("[OM:reflect] tryActivateBufferedReflection: waiting for in-progress op...");try{await Promise.race([W,new Promise((O,E)=>setTimeout(()=>E(Error("Timeout")),5000))])}catch{}}let K=await this.storage.getObservationalMemory($.threadId,$.resourceId);if(S4(`[OM:reflect] tryActivateBufferedReflection: recordId=${$.id}, hasBufferedReflection=${!!K?.bufferedReflection}, bufferedReflectionLen=${K?.bufferedReflection?.length??0}`),S4(`[OM:reflect] tryActivateBufferedReflection: freshRecord.id=${K?.id}, freshBufferedReflection=${K?.bufferedReflection?"present ("+K.bufferedReflection.length+" chars)":"empty"}, freshObsTokens=${K?.observationTokenCount}`),!K?.bufferedReflection)return S4("[OM:reflect] tryActivateBufferedReflection: no buffered reflection after re-fetch"),{status:"no-buffer"};let Z=K.observationTokenCount??0,H=K.reflectedObservationLineCount??0,F=(K.activeObservations??"").split(`
`).slice(H),L=F.join(`
`).trim(),N=L?`${K.bufferedReflection}

${L}`:K.bufferedReflection,D=this.tokenCounter.countObservations(N);if(J?.triggeredBy==="ttl"||J?.triggeredBy==="provider_change"){let O=L?this.tokenCounter.countObservations(L):0,E=K.bufferedReflectionTokens??0;if(O<E)return S4(`[OM:reflect] tryActivateBufferedReflection: suppressing early ${J.triggeredBy} activation \u2014 unreflectedTailTokens=${O} < bufferedReflectionTokens=${E}; keeping buffer for threshold activation`),{status:"suppressed",reason:"composition"};let M=this.reflectionConfig.bufferActivation,R=a7(this.getEffectiveReflectionTokens(K)),q=R*(1-M),_=Math.round(q*yO4);if(D<_)return S4(`[OM:reflect] tryActivateBufferedReflection: suppressing early ${J.triggeredBy} activation \u2014 combinedTokenCount=${D} < minCombinedTokens=${_} (${yO4*100}% of regular activation target ${Math.round(q)}, threshold=${R}, bufferActivation=${M}); keeping buffer for threshold activation`),{status:"suppressed",reason:"size"}}S4(`[OM:reflect] tryActivateBufferedReflection: activating, beforeTokens=${Z}, combinedTokenCount=${D}, reflectedLineCount=${H}, unreflectedLines=${F.length}`),await this.storage.swapBufferedReflectionToActive({currentRecord:K,tokenCount:D}),$5.lastBufferedBoundary.delete(Q);let A=await this.storage.getObservationalMemory($.threadId,$.resourceId),B=A?.observationTokenCount??0;if(S4(`[OM:reflect] tryActivateBufferedReflection: activation complete! beforeTokens=${Z}, afterTokens=${B}, newRecordId=${A?.id}, newGenCount=${A?.generationCount}`),X){let O=$5.reflectionBufferCycleIds.get(Q),E=eO4({cycleId:O??`reflect-act-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,operationType:"reflection",chunksActivated:1,tokensActivated:Z,observationTokens:B,messagesActivated:0,recordId:K.id,threadId:K.threadId??"",generationCount:A?.generationCount??K.generationCount??0,observations:A?.activeObservations,triggeredBy:J?.triggeredBy,lastActivityAt:J?.lastActivityAt,ttlExpiredMs:J?.ttlExpiredMs,previousModel:J?.previousModel,currentModel:J?.currentModel,config:this.getObservationMarkerConfig(K)});X.custom({...E,transient:!0}).catch(()=>{}),await this.persistMarkerToMessage(E,G,K.threadId??"",K.resourceId??void 0)}return $5.reflectionBufferCycleIds.delete(Q),{status:"activated"}}async maybeReflect($){let{record:Y,observationTokens:X,writer:G,abortSignal:J,messageList:Q,currentModel:W,reflectionHooks:K,requestContext:Z,observabilityContext:H,lastActivityAt:z,threadId:V}=$,F=this.buffering.getLockKey(Y.threadId,Y.resourceId),L=a7(this.getEffectiveReflectionTokens(Y));if(this.buffering.isAsyncReflectionEnabled()&&X<L){if((()=>{if(!this.buffering.isAsyncReflectionEnabled())return!1;if(Y.isBufferingReflection){if($X0(Y.id,"bufferingReflection"))return!1;S4("[OM:shouldTriggerAsyncRefl] isBufferingReflection=true but stale, clearing"),this.storage.setBufferingReflectionFlag(Y.id,!1).catch(()=>{})}let S=this.buffering.getReflectionBufferKey(F);if(this.buffering.isAsyncBufferingInProgress(S))return!1;if($5.lastBufferedBoundary.has(S))return!1;if(Y.bufferedReflection)return!1;let I=L*this.reflectionConfig.bufferActivation;return X>=I})())this.startAsyncBufferedReflection(Y,X,F,G,Z,H,K)}let N=this.reflectionConfig.activateAfterIdle,D=N!==void 0&&z!==void 0?Date.now()-z:void 0,A=D!==void 0&&N!==void 0&&D>=N,B=XA9(W),O=GA9(Q),E=this.reflectionConfig.activateOnProviderChange===!0&&rO4(B,O);if(X<L&&!A&&!E)return;let M=X>=L?"threshold":E?"provider_change":"ttl",R={triggeredBy:M,lastActivityAt:M==="ttl"?z:void 0,ttlExpiredMs:M==="ttl"?D:void 0,previousModel:M==="provider_change"?O:void 0,currentModel:M==="provider_change"?B:void 0};if(Y.isReflecting){if($X0(Y.id,"reflecting")){S4("[OM:reflect] isReflecting=true and active in this process, skipping");return}S4("[OM:reflect] isReflecting=true but NOT active in this process \u2014 stale flag from dead process, clearing"),await this.storage.setReflectingFlag(Y.id,!1)}if(this.buffering.isAsyncReflectionEnabled()){let k=await this.tryActivateBufferedReflection(Y,F,G,Q,R);if(k.status==="activated")return;if(k.status==="suppressed"){S4(`[OM:reflect] skipping sync fallback / re-buffer after suppressed early ${R.triggeredBy} activation (reason=${k.reason})`);return}if(this.reflectionConfig.blockAfter&&X>=this.reflectionConfig.blockAfter)S4(`[OM:reflect] blockAfter exceeded (${X} >= ${this.reflectionConfig.blockAfter}), falling through to sync reflection`);else{let S=L*this.reflectionConfig.bufferActivation;if(X<S){S4(`[OM:reflect] skipping async reflection \u2014 observationTokens (${X}) below activation point (${S}), triggered by ${M}`);return}S4(`[OM:reflect] async activation failed, no blockAfter or below it (obsTokens=${X}, blockAfter=${this.reflectionConfig.blockAfter}) \u2014 starting background reflection`),this.startAsyncBufferedReflection(Y,X,F,G,Z,H,K);return}}K?.onReflectionStart?.(),await this.storage.setReflectingFlag(Y.id,!0),lp(Y.id,"reflecting");let q=crypto.randomUUID(),_=new Date().toISOString(),P=V??"unknown";if(G){let k=XX0({cycleId:q,operationType:"reflection",tokensToObserve:X,recordId:Y.id,threadId:P,threadIds:[P],config:this.getObservationMarkerConfig(Y)});await G.custom({...k,transient:!0}).catch(()=>{}),await this.persistMarkerToStorage(k,P,Y.resourceId??void 0)}this.emitDebugEvent({type:"reflection_triggered",timestamp:new Date,threadId:P,resourceId:Y.resourceId??"",inputTokens:X,activeObservationsLength:Y.activeObservations?.length??0});let w=G?{writer:G,cycleId:q,startedAt:_,recordId:Y.id,threadId:P,resourceId:Y.resourceId??void 0}:void 0,j,C;try{let k=await this.getCompressionStartLevel(Z),S=await this.call(Y.activeObservations,void 0,w,L,J,void 0,k,Z,H);j=S.usage;let I=this.tokenCounter.countObservations(S.observations);if(await this.storage.createReflectionGeneration({currentRecord:Y,reflection:S.observations,tokenCount:I}),G&&w){let v=rd0({cycleId:w.cycleId,operationType:"reflection",startedAt:w.startedAt,tokensObserved:X,observationTokens:I,observations:S.observations,recordId:Y.id,threadId:P});await G.custom({...v,transient:!0}).catch(()=>{}),await this.persistMarkerToStorage(v,P,Y.resourceId??void 0)}this.emitDebugEvent({type:"reflection_complete",timestamp:new Date,threadId:P,resourceId:Y.resourceId??"",inputTokens:X,outputTokens:I,observations:S.observations,usage:S.usage})}catch(k){if(G&&w){let S=GX0({cycleId:w.cycleId,operationType:"reflection",startedAt:w.startedAt,tokensAttempted:X,error:k instanceof Error?k.message:String(k),recordId:Y.id,threadId:P});await G.custom({...S,transient:!0}).catch(()=>{}),await this.persistMarkerToStorage(S,P,Y.resourceId??void 0)}if(C=k instanceof Error?k:Error(String(k)),J?.aborted)throw k;cW("[OM] Reflection failed",k)}finally{await this.storage.setReflectingFlag(Y.id,!1),K?.onReflectionEnd?.({usage:j,error:C}),NC(Y.id,"reflecting")}}},FA9,JN=7,LA9="client",DA9,NA9=258,AA9,BA9=0.0013333333333333333,hO4=1568,OA9,Kc0=20000,Cd0=2500,EA9,UX0=class ${cacheSource;defaultModelContext;modelContextStorage=new fD9;inFlightAttachmentCounts=new Map;static TOKENS_PER_MESSAGE=3.8;static TOKENS_PER_CONVERSATION=24;constructor(Y){this.cacheSource=`v${JN}:${wA9()}`,this.defaultModelContext=gO4(Y?.model)}runWithModelContext(Y,X){return this.modelContextStorage.run(gO4(Y),X)}getModelContext(){return this.modelContextStorage.getStore()??this.defaultModelContext}countString(Y){if(!Y)return 0;return JG(Y)}readOrPersistPartEstimate(Y,X,G){let J=up(X,G),Q=oY0(Y,J);if(dp(Q,J,this.cacheSource))return Q.tokens;let W=this.countString(G);return pp(Y,J,{v:JN,source:this.cacheSource,key:J,tokens:W}),W}readOrPersistFixedPartEstimate(Y,X,G,J){let Q=up(X,G),W=oY0(Y,Q);if(dp(W,Q,this.cacheSource))return W.tokens;return pp(Y,Q,{v:JN,source:this.cacheSource,key:Q,tokens:J}),J}readOrPersistMessageEstimate(Y,X,G){let J=up(X,G),Q=_A9(Y,J);if(dp(Q,J,this.cacheSource))return Q.tokens;let W=this.countString(G);return jA9(Y,J,{v:JN,source:this.cacheSource,key:J,tokens:W}),W}resolveToolResultForTokenCounting(Y,X){return FX0(Y,X)}estimateImageAssetTokens(Y,X,G){let J=this.getModelContext(),Q=np(J),W=J?.modelId??null,K=KX0(Y),Z=cd0(Y),H=ld0(X);if(Q==="google"){let N=lA9(J,Y,Z);return{tokens:N.tokens,cachePayload:JSON.stringify({kind:G,provider:Q,modelId:W,estimator:_E4(J)?"google-gemini-3":"google-legacy",mediaResolution:N.mediaResolution,width:Z.width??null,height:Z.height??null,source:H.source,sizeBytes:H.sizeBytes??null,mimeType:W4(Y,"mimeType")??null,filename:W4(Y,"filename")??null})}}if(Q==="anthropic")return{tokens:pA9(Z,H),cachePayload:JSON.stringify({kind:G,provider:Q,modelId:W,estimator:"anthropic",width:Z.width??null,height:Z.height??null,source:H.source,sizeBytes:H.sizeBytes??null,mimeType:W4(Y,"mimeType")??null,filename:W4(Y,"filename")??null})};let z=bA9(J),V=mA9(K,Z,H),F=V==="high"?gA9(Z,H,z):0;return{tokens:z.baseTokens+F*z.tileTokens,cachePayload:JSON.stringify({kind:G,provider:Q,modelId:W,estimator:Q==="openai"?"openai":"fallback",detail:K,effectiveDetail:V,width:Z.width??null,height:Z.height??null,source:H.source,sizeBytes:H.sizeBytes??null,mimeType:W4(Y,"mimeType")??null,filename:W4(Y,"filename")??null})}}estimateImageTokens(Y){return this.estimateImageAssetTokens(Y,Y.image,"image")}estimateImageLikeFileTokens(Y){return this.estimateImageAssetTokens(Y,Y.data,"file")}countAttachmentPartSync(Y){if(Y.type==="image"||Y.type==="file"){let X=fO4(Y);if(X)return X.tokens}if(Y.type==="image"){let X=this.estimateImageTokens(Y);return this.readOrPersistFixedPartEstimate(Y,"image",X.cachePayload,X.tokens)}if(Y.type==="file"&&EC(Y)){let X=this.estimateImageLikeFileTokens(Y);return this.readOrPersistFixedPartEstimate(Y,"image-like-file",X.cachePayload,X.tokens)}if(Y.type==="file"){let X=cA9(this.getModelContext(),Y);if(X)return this.readOrPersistFixedPartEstimate(Y,"non-image-file",X.cachePayload,X.tokens);return this.readOrPersistPartEstimate(Y,"file-descriptor",IA9(Y))}return}buildRemoteAttachmentCachePayload(Y){let X=Y.type==="image"||Y.type==="file"&&EC(Y),G=Y.type==="file"&&!X;if(!X&&!G)return;let J=this.getModelContext(),Q=np(J),W=J?.modelId??null;if(!Q||!W||!["openai","google","anthropic"].includes(Q))return;let K=W4(Y,"image")??W4(Y,"data"),Z=ld0(K),H=iA9(K);return JSON.stringify({strategy:"provider-endpoint",provider:Q,modelId:W,type:W4(Y,"type")??null,detail:X?KX0(Y):null,mediaResolution:Q==="google"&&X?qE4(Y):null,mimeType:yM(Y,G?"application/pdf":"image/png"),filename:ZX0(Y)??null,source:Z.source,sizeBytes:Z.sizeBytes??null,assetUrl:H.url??null,assetHash:H.contentHash??null})}async fetchProviderAttachmentTokenEstimate(Y){let X=this.getModelContext(),G=np(X),J=X?.modelId;if(!G||!J)return;try{if(G==="openai")return await sA9(J,Y);if(G==="google")return await tA9(J,Y);if(G==="anthropic")return await oA9(J,Y)}catch{return}return}async countAttachmentPartAsync(Y){if(Y.type==="image"||Y.type==="file"){let Q=fO4(Y);if(Q)return Q.tokens}let X=Y.type==="image"||Y.type==="file"&&EC(Y),G=this.buildRemoteAttachmentCachePayload(Y);if(G){let Q=up("attachment-provider",G),W=oY0(Y,Q);if(dp(W,Q,this.cacheSource))return W.tokens;let K=this.inFlightAttachmentCounts.get(Q);if(K){let F=await K;if(typeof F==="number"&&Number.isFinite(F)&&F>0)return pp(Y,Q,{v:JN,source:this.cacheSource,key:Q,tokens:F}),F}else{let F=this.fetchProviderAttachmentTokenEstimate(Y);this.inFlightAttachmentCounts.set(Q,F);let L;try{L=await F}finally{this.inFlightAttachmentCounts.delete(Q)}if(typeof L==="number"&&Number.isFinite(L)&&L>0)return pp(Y,Q,{v:JN,source:this.cacheSource,key:Q,tokens:L}),L}if(X)await mO4(Y);let Z=JSON.stringify({...JSON.parse(G),strategy:"local-fallback",...X?cd0(Y):{}}),H=up("attachment-provider",Z),z=oY0(Y,H);if(dp(z,H,this.cacheSource))return z.tokens;let V=this.countAttachmentPartSync(Y);if(V===void 0)return;return pp(Y,H,{v:JN,source:this.cacheSource,key:H,tokens:V}),V}if(X)await mO4(Y);return this.countAttachmentPartSync(Y)}countNonAttachmentPart(Y){let X=0,G=0;if(Y.type==="text")return{tokens:this.readOrPersistPartEstimate(Y,"text",Y.text),overheadDelta:X,toolResultDelta:G};if(Y.type==="tool-invocation"){let Q=Y.toolInvocation,W=0;if(Q.state==="call"||Q.state==="partial-call"){if(Q.toolName)W+=this.readOrPersistPartEstimate(Y,`tool-${Q.state}-name`,Q.toolName);if(Q.args)if(typeof Q.args==="string")W+=this.readOrPersistPartEstimate(Y,`tool-${Q.state}-args`,Q.args);else{let K=JSON.stringify(Q.args);W+=this.readOrPersistPartEstimate(Y,`tool-${Q.state}-args-json`,K),X-=12}return{tokens:W,overheadDelta:X,toolResultDelta:G}}if(Q.state==="result"){G++;let{value:K,usingStoredModelOutput:Z}=this.resolveToolResultForTokenCounting(Y,Q.result);if(K!==void 0){let H=sp(K);if(W+=this.readOrPersistPartEstimate(Y,Z?"tool-result-model-output-json":"tool-result-json",H),typeof K!=="string")X-=12}return{tokens:W,overheadDelta:X,toolResultDelta:G}}throw Error(`Unhandled tool-invocation state '${Y.toolInvocation?.state}' in token counting for part type '${Y.type}'`)}if(typeof Y.type==="string"&&Y.type.startsWith("data-"))return{tokens:0,overheadDelta:X,toolResultDelta:G};if(Y.type==="reasoning")return{tokens:0,overheadDelta:X,toolResultDelta:G};let J=TA9(Y);return{tokens:this.readOrPersistPartEstimate(Y,`part-${Y.type}`,J),overheadDelta:X,toolResultDelta:G}}countMessage(Y){let X=this.countString(Y.role),G=$.TOKENS_PER_MESSAGE,J=0;if(typeof Y.content==="string")X+=this.readOrPersistMessageEstimate(Y,"message-content",Y.content);else if(Y.content&&typeof Y.content==="object"){if(Y.content.content&&!Array.isArray(Y.content.parts))X+=this.readOrPersistMessageEstimate(Y,"content-content",Y.content.content);else if(Array.isArray(Y.content.parts))for(let Q of Y.content.parts){let W=this.countAttachmentPartSync(Q);if(W!==void 0){X+=W;continue}let K=this.countNonAttachmentPart(Q);X+=K.tokens,G+=K.overheadDelta,J+=K.toolResultDelta}}if(J>0)G+=J*$.TOKENS_PER_MESSAGE;return Math.round(X+G)}async countMessageAsync(Y){let X=this.countString(Y.role),G=$.TOKENS_PER_MESSAGE,J=0;if(typeof Y.content==="string")X+=this.readOrPersistMessageEstimate(Y,"message-content",Y.content);else if(Y.content&&typeof Y.content==="object"){if(Y.content.content&&!Array.isArray(Y.content.parts))X+=this.readOrPersistMessageEstimate(Y,"content-content",Y.content.content);else if(Array.isArray(Y.content.parts))for(let Q of Y.content.parts){let W=await this.countAttachmentPartAsync(Q);if(W!==void 0){X+=W;continue}let K=this.countNonAttachmentPart(Q);X+=K.tokens,G+=K.overheadDelta,J+=K.toolResultDelta}}if(J>0)G+=J*$.TOKENS_PER_MESSAGE;return Math.round(X+G)}countMessages(Y){if(!Y||Y.length===0)return 0;let X=$.TOKENS_PER_CONVERSATION;for(let G of Y)X+=this.countMessage(G);return X}async countMessagesAsync(Y){if(!Y||Y.length===0)return 0;let X=await Promise.all(Y.map((G)=>this.countMessageAsync(G)));return $.TOKENS_PER_CONVERSATION+X.reduce((G,J)=>G+J,0)}countObservations(Y){return this.countString(Y)}},TE4=class ${storage;tokenCounter;scope;retrieval;observationConfig;reflectionConfig;onDebugEvent;onIndexObservations;observer;reflector;buffering;shouldObscureThreadIds=!1;hasher=qE();mastra;observedMessageIds=new Set;messageHistory;locks=new Map;async withLock(Y,X){let G=this.locks.get(Y);if(G)await G;let J,Q=new Promise((W)=>{J=W});this.locks.set(Y,Q);try{return await X()}finally{if(J(),this.locks.get(Y)===Q)this.locks.delete(Y)}}constructor(Y){if(!MM.has("request-response-id-rotation"))throw Error("Observational memory requires @mastra/core support for request-response-id-rotation. Please bump @mastra/core to a newer version.");if(Y.model&&Y.observation?.model)throw Error("Cannot set both `model` and `observation.model`. Use `model` to set both agents, or set each individually.");if(Y.model&&Y.reflection?.model)throw Error("Cannot set both `model` and `reflection.model`. Use `model` to set both agents, or set each individually.");this.shouldObscureThreadIds=Y.obscureThreadIds||!1,this.storage=Y.storage,this.scope=Y.scope??"thread",this.retrieval=Boolean(Y.retrieval),this.onIndexObservations=Y.onIndexObservations,this.mastra=Y.mastra;let X=(O,E)=>O==="default"?E:O,G=X(Y.model,N9.observation.model)??X(Y.observation?.model,N9.observation.model)??X(Y.reflection?.model,N9.observation.model)??N9.observation.model,J=X(Y.model,N9.reflection.model)??X(Y.reflection?.model,N9.reflection.model)??X(Y.observation?.model,N9.reflection.model)??N9.reflection.model,Q=Y.observation?.messageTokens??N9.observation.messageTokens,W=Y.reflection?.observationTokens??N9.reflection.observationTokens,K=Y.shareTokenBudget??!1,Z=(O)=>O===void 0||O==="default"||O instanceof vM,H=Y.model??Y.observation?.model??Y.reflection?.model,z=Y.model??Y.reflection?.model??Y.observation?.model,V=Y.observation?.modelSettings?.maxOutputTokens??(Z(H)?N9.observation.modelSettings.maxOutputTokens:void 0),F=Y.reflection?.modelSettings?.maxOutputTokens??(Z(z)?N9.reflection.modelSettings.maxOutputTokens:void 0),L=Q+W,N=Y.observation?.bufferTokens!==void 0||Y.observation?.bufferActivation!==void 0||Y.reflection?.bufferActivation!==void 0,D=Y.observation?.bufferTokens===!1||Y.scope==="resource"&&!N;if(K&&!D)if(N)throw Error(`shareTokenBudget requires async buffering to be disabled (this is a temporary limitation). Add observation: { bufferTokens: false } to your config:

  observationalMemory: {
    shareTokenBudget: true,
    observation: { bufferTokens: false },
  }

Remove any other async buffering settings (bufferTokens, bufferActivation, blockAfter).`);else throw Error(`shareTokenBudget requires async buffering to be disabled (this is a temporary limitation). Add observation: { bufferTokens: false } to your config:

  observationalMemory: {
    shareTokenBudget: true,
    observation: { bufferTokens: false },
  }
`+`
Async buffering is enabled by default \u2014 this opt-out is only needed when using shareTokenBudget.`);let A=Y.observation?.activateAfterIdle??Y.activateAfterIdle,B=Y.observation?.activateAfterIdle!==void 0?"observation.activateAfterIdle":"activateAfterIdle";this.observationConfig={model:G,messageTokens:K?{min:Q,max:L}:Q,shareTokenBudget:K,modelSettings:{temperature:Y.observation?.modelSettings?.temperature??N9.observation.modelSettings.temperature,...V!==void 0?{maxOutputTokens:V}:{}},providerOptions:Y.observation?.providerOptions??N9.observation.providerOptions,maxTokensPerBatch:Y.observation?.maxTokensPerBatch??N9.observation.maxTokensPerBatch,bufferTokens:D?void 0:JN9(Y.observation?.bufferTokens??N9.observation.bufferTokens,Y.observation?.messageTokens??N9.observation.messageTokens),bufferActivation:D?void 0:Y.observation?.bufferActivation??N9.observation.bufferActivation,activateAfterIdle:cO4(A,B),activateOnProviderChange:Y.observation?.activateOnProviderChange??Y.activateOnProviderChange??!1,blockAfter:D?void 0:SO4(Y.observation?.blockAfter??(Y.observation?.bufferTokens??N9.observation.bufferTokens?1.2:void 0),Y.observation?.messageTokens??N9.observation.messageTokens),previousObserverTokens:Y.observation?.previousObserverTokens??2000,instruction:Y.observation?.instruction,threadTitle:Y.observation?.threadTitle??!1},this.reflectionConfig={model:J,observationTokens:W,shareTokenBudget:K,modelSettings:{temperature:Y.reflection?.modelSettings?.temperature??N9.reflection.modelSettings.temperature,...F!==void 0?{maxOutputTokens:F}:{}},providerOptions:Y.reflection?.providerOptions??N9.reflection.providerOptions,bufferActivation:D?void 0:Y?.reflection?.bufferActivation??N9.reflection.bufferActivation,activateAfterIdle:cO4(Y.reflection?.activateAfterIdle,"reflection.activateAfterIdle"),activateOnProviderChange:Y.reflection?.activateOnProviderChange??!1,blockAfter:D?void 0:SO4(Y.reflection?.blockAfter??(Y.reflection?.bufferActivation??N9.reflection.bufferActivation?1.2:void 0),Y.reflection?.observationTokens??N9.reflection.observationTokens),instruction:Y.reflection?.instruction},this.tokenCounter=new UX0({model:typeof G==="string"?G:void 0}),this.onDebugEvent=Y.onDebugEvent,this.messageHistory=new em({storage:this.storage}),this.observer=new rN9({observationConfig:this.observationConfig,observedMessageIds:this.observedMessageIds,resolveModel:(O)=>this.resolveObservationModel(O),tokenCounter:this.tokenCounter,mastra:Y.mastra}),this.buffering=new $5({observationConfig:this.observationConfig,reflectionConfig:this.reflectionConfig,scope:this.scope}),this.reflector=new QA9({reflectionConfig:this.reflectionConfig,observationConfig:this.observationConfig,tokenCounter:this.tokenCounter,storage:this.storage,scope:this.scope,buffering:this.buffering,emitDebugEvent:(O)=>this.emitDebugEvent(O),persistMarkerToStorage:(O,E,M)=>this.persistMarkerToStorage(O,E,M),persistMarkerToMessage:(O,E,M,R)=>this.persistMarkerToMessage(O,E,M,R),getCompressionStartLevel:(O)=>this.getCompressionStartLevel(O),resolveModel:(O)=>this.resolveReflectionModel(O),mastra:Y.mastra}),this.validateBufferConfig(),S4(`[OM:init] new ObservationalMemory instance created \u2014 scope=${this.scope}, messageTokens=${JSON.stringify(this.observationConfig.messageTokens)}, obsAsyncEnabled=${this.buffering.isAsyncObservationEnabled()}, bufferTokens=${this.observationConfig.bufferTokens}, bufferActivation=${this.observationConfig.bufferActivation}, blockAfter=${this.observationConfig.blockAfter}, reflectionTokens=${this.reflectionConfig.observationTokens}, refAsyncEnabled=${this.buffering.isAsyncReflectionEnabled()}, refAsyncActivation=${this.reflectionConfig.bufferActivation}, refBlockAfter=${this.reflectionConfig.blockAfter}`)}__registerMastra(Y){this.mastra=Y,this.observer.__registerMastra(Y),this.reflector.__registerMastra(Y)}get config(){return{scope:this.scope,retrieval:this.retrieval,observation:{messageTokens:this.observationConfig.messageTokens,previousObserverTokens:this.observationConfig.previousObserverTokens},reflection:{observationTokens:this.reflectionConfig.observationTokens}}}async waitForBuffering(Y,X,G=30000){return $5.awaitBuffering(Y,X,this.scope,G)}getConcreteModel(Y,X){if(Y instanceof vM){if(X===void 0)throw Error("ModelByInputTokens requires inputTokens for resolution");return Y.resolve(X)}return Y}getModelToResolve(Y,X){let G=this.getConcreteModel(Y,X);if(Array.isArray(G))return G[0]?.model??"unknown";if(typeof G==="function")return async(J)=>{let Q=await G(J);if(Array.isArray(Q))return Q[0]?.model??"unknown";return Q};return G}formatModelName(Y){if(!Y.modelId)return"(unknown)";return Y.provider?`${Y.provider}/${Y.modelId}`:Y.modelId}resolveObservationModel(Y){return this.resolveTieredModel(this.observationConfig.model,Y)}resolveReflectionModel(Y){return this.resolveTieredModel(this.reflectionConfig.model,Y)}resolveTieredModel(Y,X){if(!(Y instanceof vM))return{model:Y};let G=Y.getThresholds(),J=G.find((Q)=>X<=Q)??G.at(-1);return{model:Y.resolve(X),selectedThreshold:J,routingStrategy:"model-by-input-tokens",routingThresholds:G.join(",")}}async resolveModelRouting(Y,X){try{if(Y instanceof vM){let J=await Promise.all(Y.getThresholds().map(async(Q)=>{let W=Y.resolve(Q),K=await this.resolveModelContext(W,X);return{upTo:Q,model:K?.modelId?this.formatModelName(K):"(unknown)"}}));return{model:J[0]?.model??"(unknown)",routing:J}}let G=await this.resolveModelContext(Y,X);return{model:G?.modelId?this.formatModelName(G):"(unknown)"}}catch(G){return cW("[OM] Failed to resolve model config",G),{model:"(unknown)"}}}async resolveModelContext(Y,X,G){let J=this.getModelToResolve(Y,G);if(!J)return;let Q=await RE(J,X,this.mastra);return{provider:Q.provider,modelId:Q.modelId}}async getCompressionStartLevel(Y){try{if(((await this.resolveModelContext(this.reflectionConfig.model,Y))?.modelId??"").includes("gemini-2.5-flash"))return 2;return 1}catch{return 1}}async getResolvedConfig(Y){let[X,G]=await Promise.all([this.resolveModelRouting(this.observationConfig.model,Y),this.resolveModelRouting(this.reflectionConfig.model,Y)]);return{scope:this.scope,observation:{messageTokens:this.observationConfig.messageTokens,model:X.model,previousObserverTokens:this.observationConfig.previousObserverTokens,routing:X.routing},reflection:{observationTokens:this.reflectionConfig.observationTokens,model:G.model,routing:G.routing}}}emitDebugEvent(Y){if(this.onDebugEvent)this.onDebugEvent(Y)}validateBufferConfig(){if((this.observationConfig.bufferTokens!==void 0||this.observationConfig.bufferActivation!==void 0||this.reflectionConfig.bufferActivation!==void 0)&&this.scope==="resource")throw Error("Async buffering is not yet supported with scope: 'resource'. Use scope: 'thread', or set observation: { bufferTokens: false } to disable async buffering.");let X=a7(this.observationConfig.messageTokens);if(this.observationConfig.bufferTokens!==void 0){if(this.observationConfig.bufferTokens<=0)throw Error(`observation.bufferTokens must be > 0, got ${this.observationConfig.bufferTokens}`);if(this.observationConfig.bufferTokens>=X)throw Error(`observation.bufferTokens (${this.observationConfig.bufferTokens}) must be less than messageTokens (${X})`)}if(this.observationConfig.bufferActivation!==void 0){if(this.observationConfig.bufferActivation<=0)throw Error(`observation.bufferActivation must be > 0, got ${this.observationConfig.bufferActivation}`);if(this.observationConfig.bufferActivation>1&&this.observationConfig.bufferActivation<1000)throw Error(`observation.bufferActivation must be <= 1 (ratio) or >= 1000 (absolute token retention), got ${this.observationConfig.bufferActivation}`);if(this.observationConfig.bufferActivation>=1000&&this.observationConfig.bufferActivation>=X)throw Error(`observation.bufferActivation as absolute retention (${this.observationConfig.bufferActivation}) must be less than messageTokens (${X})`)}if(this.observationConfig.blockAfter!==void 0){if(this.observationConfig.blockAfter<X)throw Error(`observation.blockAfter (${this.observationConfig.blockAfter}) must be >= messageTokens (${X})`);if(!this.observationConfig.bufferTokens)throw Error("observation.blockAfter requires observation.bufferTokens to be set (blockAfter only applies when async buffering is enabled)")}if(this.observationConfig.previousObserverTokens!==void 0&&this.observationConfig.previousObserverTokens!==!1){if(!Number.isFinite(this.observationConfig.previousObserverTokens)||this.observationConfig.previousObserverTokens<0)throw Error(`observation.previousObserverTokens must be false or a finite number >= 0, got ${this.observationConfig.previousObserverTokens}`)}if(this.reflectionConfig.bufferActivation!==void 0){if(this.reflectionConfig.bufferActivation<=0||this.reflectionConfig.bufferActivation>1)throw Error(`reflection.bufferActivation must be in range (0, 1], got ${this.reflectionConfig.bufferActivation}`)}if(this.reflectionConfig.blockAfter!==void 0){let G=a7(this.reflectionConfig.observationTokens);if(this.reflectionConfig.blockAfter<G)throw Error(`reflection.blockAfter (${this.reflectionConfig.blockAfter}) must be >= reflection.observationTokens (${G})`);if(!this.reflectionConfig.bufferActivation)throw Error("reflection.blockAfter requires reflection.bufferActivation to be set (blockAfter only applies when async reflection is enabled)")}}getEffectiveMessageTokens(Y){let G=Y.config?._overrides?.observation?.messageTokens;if(G){let J=a7(G),Q=this.observationConfig.bufferTokens;if(Q&&J<=Q)return this.observationConfig.messageTokens;let W=this.observationConfig.bufferActivation;if(W&&W>=1000&&J<=W)return this.observationConfig.messageTokens;return G}return this.observationConfig.messageTokens}getEffectiveReflectionTokens(Y){let G=Y.config?._overrides?.reflection?.observationTokens;if(G)return G;return this.reflectionConfig.observationTokens}meetsObservationThreshold(Y){let{record:X,unobservedTokens:G,extraTokens:J=0}=Y,Q=(X.pendingMessageTokens??0)+G+J,W=X.observationTokenCount??0,K=CO4(this.getEffectiveMessageTokens(X),W);return Q>=K}getStorageIds(Y,X){if(this.scope==="resource")return{threadId:null,resourceId:X??Y};if(!Y)throw Error("ObservationalMemory (scope: 'thread') requires a threadId, but received an empty value. This is a bug \u2014 getThreadContext should have caught this earlier.");return{threadId:Y,resourceId:X??Y}}async getOrCreateRecord(Y,X){let G=this.getStorageIds(Y,X),J=await this.storage.getObservationalMemory(G.threadId,G.resourceId);if(!J){let Q=Intl.DateTimeFormat().resolvedOptions().timeZone;J=await this.storage.initializeObservationalMemory({threadId:G.threadId,resourceId:G.resourceId,scope:this.scope,config:{observation:this.observationConfig,reflection:this.reflectionConfig,scope:this.scope},observedTimezone:Q})}return J}getObservationMarkerConfig(){return{messageTokens:a7(this.observationConfig.messageTokens),observationTokens:a7(this.reflectionConfig.observationTokens),scope:this.scope,activateAfterIdle:this.observationConfig.activateAfterIdle}}async persistMarkerToMessage(Y,X,G,J){if(!X)return;let Q=X.get.all.db();for(let W=Q.length-1;W>=0;W--){let K=Q[W];if(K?.role==="assistant"&&K.content?.parts&&Array.isArray(K.content.parts)){let Z=Y.data;if(!(Z?.cycleId&&K.content.parts.some((z)=>z?.type===Y.type&&z?.data?.cycleId===Z.cycleId)))K.content.parts.push(Y);try{await this.messageHistory.persistMessages({messages:[K],threadId:G,resourceId:J})}catch(z){S4(`[OM:persistMarker] failed to save marker to DB: ${z}`)}return}}}async persistMarkerToStorage(Y,X,G){try{let Q=(await this.storage.listMessages({threadId:X,perPage:20,orderBy:{field:"createdAt",direction:"DESC"}}))?.messages??[];for(let W of Q)if(W?.role==="assistant"&&W.content?.parts&&Array.isArray(W.content.parts)){let K=Y.data;if(!(K?.cycleId&&W.content.parts.some((H)=>H?.type===Y.type&&H?.data?.cycleId===K.cycleId)))W.content.parts.push(Y);await this.messageHistory.persistMessages({messages:[W],threadId:X,resourceId:G});return}}catch(J){S4(`[OM:persistMarkerToStorage] failed to save marker to DB: ${J}`)}}hasInProgressObservation(Y){let X=Y.content?.parts;if(!X||!Array.isArray(X))return!1;let G=-1,J=-1;for(let Q=X.length-1;Q>=0;Q--){let W=X[Q];if(W?.type==="data-om-observation-start"&&G===-1)G=Q;if((W?.type==="data-om-observation-end"||W?.type==="data-om-observation-failed")&&J===-1)J=Q}return G!==-1&&G>J}sealMessagesForBuffering(Y){let X=Date.now();for(let G of Y){if(!G.content?.parts?.length)continue;if(!G.content.metadata)G.content.metadata={};let J=G.content.metadata;if(!J.mastra)J.mastra={};J.mastra.sealed=!0;let Q=G.content.parts[G.content.parts.length-1];if(!Q.metadata)Q.metadata={};if(!Q.metadata.mastra)Q.metadata.mastra={};Q.metadata.mastra.sealedAt=X}}createUnobservedMessage(Y){let X=eY0(Y);if(X.length===0)return null;return{...Y,content:{...Y.content,parts:X}}}getUnobservedMessages(Y,X,G){let J=X.lastObservedAt,Q=new Set(Array.isArray(X.observedMessageIds)?X.observedMessageIds:[]);if(G?.excludeBuffered){let K=kM(X);for(let Z of K)if(Array.isArray(Z.messageIds))for(let H of Z.messageIds)Q.add(H)}let W=[];for(let K of Y){if(K.role==="system")continue;if(Q?.has(K.id))continue;let Z=ip(K);if(this.hasInProgressObservation(K))W.push(K);else if(Z!==-1){let z=this.createUnobservedMessage(K);if(z)W.push(z)}else if(!K.createdAt||!J)W.push(K);else if(new Date(K.createdAt)>J)W.push(K)}return W}prepareObserverContext(Y,X){let{previousObserverTokens:G}=this.observationConfig,J=G===void 0||G===!1?void 0:G;if(J===void 0)return{context:Y,wasTruncated:!1};let Q=X?.bufferedReflection&&X?.reflectedObservationLineCount?X.bufferedReflection:void 0;if(!Y)return{context:Q,wasTruncated:!1};let W=Y;if(Q&&X?.reflectedObservationLineCount){let z=W.split(`
`).slice(X.reflectedObservationLineCount).join(`
`).trim();W=z?`${Q}

${z}`:Q}let K=!1;if(J!==void 0){if(J===0)return{context:"",wasTruncated:!0};if(this.tokenCounter.countObservations(W)>J)W=this.truncateObservationsToTokenBudget(W,J),K=!0}return{context:W,wasTruncated:K}}truncateObservationsToTokenBudget(Y,X){if(X===0)return"";if(this.tokenCounter.countObservations(Y)<=X)return Y;let J=Y.split(`
`),Q=J.length,W=Array(Q),K=Array(Q);for(let D=0;D<Q;D++)W[D]=this.tokenCounter.countString(J[D]),K[D]=J[D].includes("\uD83D\uDD34")||J[D].includes("\u2705");let Z=Array(Q+1);Z[Q]=0;for(let D=Q-1;D>=0;D--)Z[D]=Z[D+1]+W[D];let H=[],z=(D,A)=>{let B=[...A,...Array.from({length:Q-D},(R,q)=>D+q)].sort((R,q)=>R-q);if(B.length===0)return`[${Q} observations truncated here]`;let O=[],E=-1;for(let R of B){let q=R-E-1;if(q===1)O.push(J[E+1]);else if(q>1)O.push(`[${q} observations truncated here]`);O.push(J[R]),E=R}let M=Q-E-1;if(M===1)O.push(J[Q-1]);else if(M>1)O.push(`[${M} observations truncated here]`);return O.join(`
`)},V=(D,A)=>{let B=Z[D];for(let O of A)B+=W[O];return B},F,L=-1,N=-1;for(let D=1;D<Q;D++){if(K[D-1])H.push(D-1);let A=Q-D,B=A,O=Math.min(H.length,B),E=(M)=>M>0?H.slice(Math.max(0,H.length-M)):[];while(O>0&&V(D,E(O))>X)O-=1;if(V(D,E(O))>X)continue;if(O>L||O===L&&A>N){let M=z(D,E(O));if(this.tokenCounter.countObservations(M)<=X)F=M,L=O,N=A}}if(!F)return`[${Q} observations truncated here]`;return F}formatObservationsForContext(Y,X,G,J,Q,W=!1){let K=W?ed0(Y)??QX0(Y):QX0(Y);if(Q)K=dD9(K,Q);let Z=[`${tI}

${eI}${W?`

${XY0}`:""}`];if(J)Z.push(`The following content is from OTHER conversations different from the current conversation, they're here for reference,  but they're not necessarily your focus:
START_OTHER_CONVERSATIONS_BLOCK
${J}
END_OTHER_CONVERSATIONS_BLOCK`);let H=this.splitObservationContextChunks(K);if(H.length>0)Z.push("<observations>",...H);if(X)Z.push(`<current-task>
${X}
</current-task>`);if(G)Z.push(`<suggested-response>
${G}
</suggested-response>`);return Z}splitObservationContextChunks(Y){let X=Y.trim();if(!X)return[];return X.split(/\n{2,}--- message boundary \(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z\) ---\n{2,}/).map((G)=>G.trim()).filter(Boolean)}static createMessageBoundary(Y){return`

--- message boundary (${Y.toISOString()}) ---

`}getThreadContext(Y,X){let G=Y?.get("MastraMemory");if(G?.thread?.id)return{threadId:G.thread.id,resourceId:G.resourceId};let J=X.serialize();if(J.memoryInfo?.threadId)return{threadId:J.memoryInfo.threadId,resourceId:J.memoryInfo.resourceId};if(this.scope==="thread")throw Error("ObservationalMemory (scope: 'thread') requires a threadId, but none was found in RequestContext or MessageList. Ensure the agent is configured with Memory and a valid threadId is provided.");return null}async persistMessages(Y,X,G){let J=[];for(let Q of Y)if(!!Q.content?.metadata?.mastra?.sealed){if(ip(Q)!==-1)J.push(Q)}else J.push(Q);if(J.length>0)await this.messageHistory.persistMessages({messages:J,threadId:X,resourceId:G})}async loadMessagesFromStorage(Y,X,G){let J=G?new Date(G.getTime()+1):void 0,Q;if(this.scope==="resource"&&X)Q=await this.storage.listMessagesByResourceId({resourceId:X,perPage:!1,orderBy:{field:"createdAt",direction:"ASC"},filter:J?{dateRange:{start:J}}:void 0});else Q=await this.storage.listMessages({threadId:Y,perPage:!1,orderBy:{field:"createdAt",direction:"ASC"},filter:J?{dateRange:{start:J}}:void 0});return Q.messages.filter((W)=>W.role!=="system")}async formatUnobservedContextBlocks(Y,X){let G=[];for(let[J,Q]of Y){if(J===X)continue;if(Q.length===0)continue;let W=LX0(Q,{maxPartLength:500});if(W){let K=await this.representThreadIDInContext(J);G.push(`<other-conversation id="${K}">
${W}
</other-conversation>`)}}return G.join(`

`)}async representThreadIDInContext(Y){if(this.shouldObscureThreadIds)return(await this.hasher).h32ToString(Y);return Y}getMaxMessageTimestamp(Y){let X=0;for(let G of Y)if(G.createdAt){let J=new Date(G.createdAt).getTime();if(J>X)X=J}return X>0?new Date(X):new Date}async wrapWithThreadTag(Y,X,G){let J=$E4(X),Q=this.retrieval&&G?wV(J,G):J;return`<thread id="${await this.representThreadIDInContext(Y)}">
${Q}
</thread>`}replaceOrAppendThreadSection(Y,X,G,J){if(!Y)return G;let Q=G.match(/<thread id="([^"]+)">/),W=G.match(/Date:\s*([A-Za-z]+\s+\d+,\s+\d+)/);if(!Q||!W)return`${Y}${$.createMessageBoundary(J)}${G}`;let K=Q[1],Z=W[1],H=`<thread id="${K}">`,z="</thread>",V=Y.indexOf(H),F=null,L=-1,N=-1;if(V!==-1){let D=Y.indexOf(z,V);if(D!==-1){N=D+z.length,L=V;let A=Y.slice(V,N);if(A.includes(`Date: ${Z}`)||A.includes(`Date:${Z}`))F=A}}if(F){let D=G.indexOf(`
`,G.indexOf("Date:")),A=G.lastIndexOf(z);if(D!==-1&&A!==-1){let B=G.slice(D+1,A).trim();if(B){let E=`${F.slice(0,F.length-z.length).trimEnd()}
${B}
${z}`;return Y.slice(0,L)+E+Y.slice(N)}}}return`${Y}${$.createMessageBoundary(J)}${G}`}wrapObservations(Y,X,G,J,Q){if(this.scope==="resource")return(async()=>{let K=await this.wrapWithThreadTag(G,Y,Q);return this.replaceOrAppendThreadSection(X,G,K,J??new Date)})();let W=this.retrieval&&Q?wV(Y,Q):Y;return X?`${X}

${W}`:W}async startAsyncBufferedObservation(Y,X,G,J,Q,W,K,Z){let H=this.buffering.getObservationBufferKey(J),z=W??await this.tokenCounter.countMessagesAsync(G)+(Y.pendingMessageTokens??0);$5.lastBufferedBoundary.set(H,z),lp(Y.id,"bufferingObservation"),this.storage.setBufferingObservationFlag(Y.id,!0,z).catch((F)=>{cW("[OM] Failed to set buffering observation flag",F)});let V=this.runAsyncBufferedObservation(Y,X,G,H,Q,K,Z).finally(()=>{$5.asyncBufferingOps.delete(H),NC(Y.id,"bufferingObservation"),this.storage.setBufferingObservationFlag(Y.id,!1).catch((F)=>{cW("[OM] Failed to clear buffering observation flag",F)})});$5.asyncBufferingOps.set(H,V)}async runAsyncBufferedObservation(Y,X,G,J,Q,W,K){let Z=$5.asyncBufferingOps.get(J);if(Z)try{await Z}catch{}let H=await this.storage.getObservationalMemory(Y.threadId,Y.resourceId);if(!H)return;let z=$5.lastBufferedAtTime.get(J)??H.lastBufferedAtTime??null;if(H.lastObservedAt){let _=new Date(H.lastObservedAt);if(!z||_>z)z=_}let V=this.getUnobservedMessages(G,H,{excludeBuffered:!0}),F=V.length;if(z)V=V.filter((_)=>{if(!_.createdAt)return!0;return new Date(_.createdAt)>z});S4(`[OM:bufferCursor] cursor=${z?.toISOString()??"null"}, unobserved=${G.length}, afterExcludeBuffered=${F}, afterCursorFilter=${V.length}`);let N=(this.observationConfig.bufferTokens??5000)/2;if(await this.tokenCounter.countMessagesAsync(V)<N)return;let A=V;this.sealMessagesForBuffering(A),await this.messageHistory.persistMessages({messages:A,threadId:X,resourceId:H.resourceId??void 0});let B=`buffer-obs-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,O=new Date().toISOString(),E=await this.tokenCounter.countMessagesAsync(A),M=xd0({cycleId:B,operationType:"observation",tokensToBuffer:E,recordId:H.id,threadId:X,threadIds:[X],config:this.getObservationMarkerConfig()});if(await this.persistMarkerToStorage(M,X,H.resourceId??void 0),Q)Q.custom({...M,transient:!0}).catch(()=>{});S4(`[OM:bufferInput] cycleId=${B}, msgCount=${A.length}, msgTokens=${E}, ids=${A.map((_)=>`${_.id?.slice(0,8)}@${_.createdAt?new Date(_.createdAt).toISOString():"none"}`).join(",")}`),await xM.create(this,{record:H,threadId:X,resourceId:H.resourceId??void 0,messages:A,cycleId:B,startedAt:O,writer:Q,requestContext:W,observabilityContext:K}).run();let R=this.getMaxMessageTimestamp(A),q=new Date(R.getTime()+1);$5.lastBufferedAtTime.set(J,q)}async triggerAsyncBuffering(Y){if(!this.buffering.isAsyncObservationEnabled())return!1;let X=this.buffering.getLockKey(Y.threadId,Y.resourceId),G=this.buffering.shouldTriggerAsyncObservation(Y.pendingTokens,X,Y.record,this.storage,Y.threshold);if(G)this.startAsyncBufferedObservation(Y.record,Y.threadId,Y.unobservedMessages,X,Y.writer,Y.unbufferedPendingTokens,Y.requestContext);return G}isMessageList(Y){return!!Y&&typeof Y==="object"&&"get"in Y&&"removeByIds"in Y}removeIdsFromArray(Y,X){if(X.length===0)return;let G=new Set(X);for(let J=Y.length-1;J>=0;J--){let Q=Y[J];if(Q?.id&&G.has(Q.id))Y.splice(J,1)}}async getObservedMessageIdsForCleanup(Y){let{threadId:X,resourceId:G,messages:J,observedMessageIds:Q,retentionFloor:W}=Y,K=await this.getOrCreateRecord(X,G),Z=Q&&Q.length>0?Q:Array.isArray(K.observedMessageIds)?K.observedMessageIds:[];if(Z.length===0)return[];let H=new Set(Z),z=new Set,V=[],F=0,L=!1,N=typeof W==="number"?new UX0:null;for(let D of J){if(!D?.id||D.id==="om-continuation"||!H.has(D.id))continue;let A=eY0(D),B=D.content?.parts?.length??0;if(A.length>0&&A.length<B){D.content.parts=A;continue}if(N&&typeof W==="number"){let O=J.filter((M)=>M?.id&&M.id!=="om-continuation"&&!z.has(M.id)&&M.id!==D.id);if(N.countMessages(O)<W){F+=1,L=!0;break}}z.add(D.id),V.push(D.id)}if(N&&typeof W==="number"&&z.size>0){let D=J.filter((B)=>B?.id&&B.id!=="om-continuation"&&!z.has(B.id)),A=N.countMessages(D);while(A<W&&V.length>0){let B=V.pop();z.delete(B),F+=1,L=!0,D=J.filter((O)=>O?.id&&O.id!=="om-continuation"&&!z.has(O.id)),A=N.countMessages(D)}}return S4(`[OM:cleanupActivation] matched=${z.size}, skipped=${F}, backoffTriggered=${L}`),[...z]}async cleanupMessages(Y){let{threadId:X,resourceId:G,observedMessageIds:J,retentionFloor:Q}=Y,W=this.isMessageList(Y.messages)?Y.messages:void 0,K=W?W.get.all.db():Y.messages,Z=-1,H=null;for(let z=K.length-1;z>=0;z--){let V=K[z];if(!V)continue;if(ip(V)!==-1){Z=z,H=V;break}}if(S4(`[OM:cleanupBranch] allMsgs=${K.length}, markerFound=${Z!==-1}, markerIdx=${Z}, observedMessageIds=${J?.length??"undefined"}`),J&&J.length>0){let z=await this.getObservedMessageIdsForCleanup({threadId:X,resourceId:G,messages:K,observedMessageIds:J,retentionFloor:Q});if(W){if(z.length>0)W.removeByIds(z);return W.get.all.db()}return this.removeIdsFromArray(K,z),K}if(H&&Z!==-1){let z=[],V=[];for(let L=0;L<Z;L++){let N=K[L];if(N?.id&&N.id!=="om-continuation")z.push(N.id),V.push(N)}V.push(H);let F=eY0(H);if(F.length===0){if(H.id)z.push(H.id)}else if(F.length<(H.content?.parts?.length??0))H.content.parts=F;if(W){if(z.length>0)W.removeByIds(z);if(V.length>0)await this.persistMessages(V,X,G);return S4(`[OM:cleanupMarker] removed ${z.length} messages, saved ${V.length}`),W.get.all.db()}return this.removeIdsFromArray(K,z),K}return W?W.get.all.db():K}async cleanupObservedContext(Y){let{messageList:X,threadId:G,resourceId:J,observedMessageIds:Q,retentionFloor:W}=Y;await this.cleanupMessages({threadId:G,resourceId:J,messages:X,observedMessageIds:Q,retentionFloor:W})}async resetBufferingState(Y){let{threadId:X,resourceId:G,recordId:J,activatedMessageIds:Q}=Y,W=this.buffering.getLockKey(X,G),K=this.buffering.getObservationBufferKey(W);if($5.lastBufferedBoundary.set(K,0),await this.storage.setBufferingObservationFlag(J,!1,0).catch(()=>{}),Q&&Q.length>0)this.buffering.cleanupStaticMaps(X,G,Q)}async buildContextSystemMessage(Y){return(await this.buildContextSystemMessages(Y))?.join(`

`)}async buildContextSystemMessages(Y){let{threadId:X,resourceId:G,unobservedContextBlocks:J}=Y,Q=Y.record??await this.getOrCreateRecord(X,G);if(!Q.activeObservations)return;let W=await this.storage.getThreadById({threadId:X}),K=fE(W?.metadata),Z=K?.currentTask,H=K?.suggestedResponse,z=Y.currentDate??new Date;return this.formatObservationsForContext(Q.activeObservations,Z,H,J,z,this.retrieval)}async getOtherThreadsContext(Y,X){let{threads:G}=await this.storage.listThreads({filter:{resourceId:Y}}),J=new Map,W=(await this.getRecord(X,Y))?.lastObservedAt;for(let Z of G){if(Z.id===X)continue;let z=fE(Z.metadata)?.lastObservedAt??W,V=z?new Date(new Date(z).getTime()+1):void 0,L=(await this.storage.listMessages({threadId:Z.id,perPage:!1,orderBy:{field:"createdAt",direction:"ASC"},filter:V?{dateRange:{start:V}}:void 0})).messages.filter((N)=>!this.observedMessageIds.has(N.id));if(L.length>0)J.set(Z.id,L)}if(J.size===0)return;return await this.formatUnobservedContextBlocks(J,X)||void 0}async emitProgress(Y){let{record:X,pendingTokens:G,threshold:J,effectiveObservationTokensThreshold:Q,currentObservationTokens:W,writer:K,stepNumber:Z,threadId:H,resourceId:z}=Y;if(this.emitDebugEvent({type:"step_progress",timestamp:new Date,threadId:H,resourceId:z??"",stepNumber:Z,finishReason:"unknown",pendingTokens:G,threshold:J,thresholdPercent:Math.round(G/J*100),willSave:G>=J,willObserve:G>=J}),K){let V=kM(X),F=V.reduce((E,M)=>E+(M.tokenCount??0),0),L=V.reduce((E,M)=>E+(M.messageTokens??0),0),N=Math.min(L,G),D=WN9(V,this.observationConfig.bufferActivation??1,a7(this.getEffectiveMessageTokens(X)),G),A="idle";if(X.isBufferingObservation)A="running";else if(V.length>0)A="complete";let B="idle";if(X.isBufferingReflection)B="running";else if(X.bufferedReflection&&X.bufferedReflection.length>0)B="complete";let O={type:"data-om-status",data:{windows:{active:{messages:{tokens:G,threshold:J},observations:{tokens:W,threshold:Q}},buffered:{observations:{chunks:V.length,messageTokens:N,projectedMessageRemoval:D,observationTokens:F,status:A},reflection:{inputObservationTokens:X.bufferedReflectionInputTokens??0,observationTokens:X.bufferedReflectionTokens??0,status:B}}},recordId:X.id,threadId:H,stepNumber:Z,generationCount:X.generationCount}};S4(`[OM:status] step=${Z} msgs=${G}/${J} obs=${W}/${Q} gen=${X.generationCount}`),await K.custom(O).catch(()=>{})}}async getStatus(Y){let{threadId:X,resourceId:G}=Y,J=await this.getOrCreateRecord(X,G),Q=J.observationTokenCount??0,W;if(Y.messages)W=this.getUnobservedMessages(Y.messages,J);else{let w=await this.loadMessagesFromStorage(X,G,J.lastObservedAt?new Date(J.lastObservedAt):void 0);W=this.getUnobservedMessages(w,J)}let K=await this.tokenCounter.countMessagesAsync(W),Z=0;if(this.scope==="resource"&&G){let w=await this.getOtherThreadsContext(G,X);Z=w?this.tokenCounter.countString(w):0}let H=Math.max(0,K+Z),z=CO4(this.getEffectiveMessageTokens(J),Q),V=kM(J),F=V.length,L=V.reduce((w,j)=>w+(j.messageTokens??0),0),N=this.buffering.isAsyncObservationEnabled(),D=!1;if(N&&H<z){let w=this.buffering.getLockKey(X,G);D=this.buffering.shouldTriggerAsyncObservation(H,w,J,this.storage,z)}let A=H>=z,B=a7(this.getEffectiveReflectionTokens(J)),O=Q>=B,E=F>0,M=this.getEffectiveMessageTokens(J),R=typeof M!=="number",q=R?M.max:0,_=R?Math.max(q-z,1000):B,P=Math.max(0,H-L);return{record:J,pendingTokens:H,threshold:z,effectiveObservationTokensThreshold:_,unbufferedPendingTokens:P,shouldObserve:A,shouldBuffer:D,shouldReflect:O,bufferedChunkCount:F,bufferedChunkTokens:L,canActivate:E,asyncObservationEnabled:N,asyncReflectionEnabled:this.buffering.isAsyncReflectionEnabled(),scope:this.scope}}async finalize(Y){let{threadId:X,resourceId:G,messages:J}=Y,Q=!1,W=!1,K=!1;if(await $5.awaitBuffering(X,G??null,this.scope),(await this.getStatus({threadId:X,resourceId:G,messages:J})).canActivate)Q=(await this.activate({threadId:X,resourceId:G,messages:J})).activated;if((await this.getStatus({threadId:X,resourceId:G,messages:J})).shouldObserve)W=(await this.observe({threadId:X,resourceId:G,messages:J})).observed;if((await this.getStatus({threadId:X,resourceId:G})).shouldReflect)K=(await this.reflect(X,G)).reflected;let V=await this.getOrCreateRecord(X,G);return{activated:Q,observed:W,reflected:K,record:V}}async pruneObserved(Y){let{threadId:X,resourceId:G,messages:J}=Y,Q=await this.getOrCreateRecord(X,G);return this.getUnobservedMessages(J,Q)}async loadUnobservedMessages(Y){let{threadId:X,resourceId:G}=Y,J=await this.getOrCreateRecord(X,G),Q=await this.loadMessagesFromStorage(X,G,J.lastObservedAt?new Date(J.lastObservedAt):void 0);return this.getUnobservedMessages(Q,J)}async buffer(Y){let{threadId:X,resourceId:G,requestContext:J,observabilityContext:Q}=Y,W=Y.record??await this.getOrCreateRecord(X,G);if(!this.buffering.isAsyncObservationEnabled())return{buffered:!1,record:W};if(W.isBufferingObservation&&$X0(W.id,"bufferingObservation"))return{buffered:!1,record:W};let K=Y.pendingTokens??W.pendingMessageTokens??0,Z=this.buffering.getLockKey(X,G),H=this.buffering.getObservationBufferKey(Z);if($5.lastBufferedBoundary.set(H,K),W.isBufferingObservation)await this.storage.setBufferingObservationFlag(W.id,!1).catch(()=>{});let z=$5.asyncBufferingOps.get(H);if(z)try{await z}catch{}lp(W.id,"bufferingObservation"),this.storage.setBufferingObservationFlag(W.id,!0,K).catch((N)=>{cW("[OM] Failed to set buffering observation flag",N)});let V,F=new Promise((N)=>{V=N});$5.asyncBufferingOps.set(H,F),W=await this.storage.getObservationalMemory(W.threadId,W.resourceId)??W;let L=!1;try{let N;if(Y.messages)N=this.getUnobservedMessages(Y.messages,W,{excludeBuffered:!0});else{let w=await this.loadMessagesFromStorage(X,G,W.lastObservedAt?new Date(W.lastObservedAt):void 0);N=this.getUnobservedMessages(w,W,{excludeBuffered:!0})}if(!Y.messages){let w=$5.lastBufferedAtTime.get(H)??W.lastBufferedAtTime??null;if(W.lastObservedAt){let j=new Date(W.lastObservedAt);if(!w||j>w)w=j}if(w)N=N.filter((j)=>{if(!j.createdAt)return!0;return new Date(j.createdAt)>w})}let A=(this.observationConfig.bufferTokens??5000)/2,B=await this.tokenCounter.countMessagesAsync(N);if(B<A||N.length===0)return{buffered:!1,record:W};if(Y.beforeBuffer)await Y.beforeBuffer(N);else if(Y.messages)this.sealMessagesForBuffering(N);let O=`buffer-obs-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,E=new Date().toISOString(),M=xd0({cycleId:O,operationType:"observation",tokensToBuffer:B,recordId:W.id,threadId:X,threadIds:[X],config:this.getObservationMarkerConfig()});await this.persistMarkerToStorage(M,X,W.resourceId??void 0);let R=Y.writer;if(R)R.custom({...M,transient:!0}).catch(()=>{});if(await xM.create(this,{record:W,threadId:X,resourceId:W.resourceId??void 0,messages:N,cycleId:O,startedAt:E,writer:R,requestContext:J,observabilityContext:Q}).run(),DX0())zA9({threadId:X,resourceId:W.resourceId??void 0,label:`buffer-${O}`,observerExchange:this.observer.lastExchange,details:{cycleId:O,startedAt:E,buffered:!0,candidateMessageIds:N.map((w)=>w.id),candidateMessageCount:N.length,pendingTokens:K,newTokens:B}});await this.storage.setBufferingObservationFlag(W.id,!1,B).catch(()=>{}),L=!0,$5.lastBufferedBoundary.set(H,B);let q=this.getMaxMessageTimestamp(N),_=new Date(q.getTime()+1);return $5.lastBufferedAtTime.set(H,_),{buffered:!0,record:await this.getOrCreateRecord(X,G)}}catch(N){return cW("[OM] buffer() failed",N),{buffered:!1,record:W}}finally{if(NC(W.id,"bufferingObservation"),$5.asyncBufferingOps.delete(H),V(),!L)await this.storage.setBufferingObservationFlag(W.id,!1).catch(()=>{})}}async activate(Y){let{threadId:X,resourceId:G}=Y,J=await this.getOrCreateRecord(X,G);if(this.buffering.isAsyncObservationEnabled()){let _=this.buffering.getLockKey(X,G),P=this.buffering.getObservationBufferKey(_),w=J.lastBufferedAtTokens??0;if(w>0&&Y.messages){let j=this.getUnobservedMessages(Y.messages,J),C=this.tokenCounter.countMessages(j);if(C<w*0.5)S4(`[OM:activate] resetting stale lastBufferedBoundary: dbBoundary=${w}, currentContextTokens=${C}`),$5.lastBufferedBoundary.set(P,0),await this.storage.setBufferingObservationFlag(J.id,!1,0).catch(()=>{})}}if(!kM(J).length)return{activated:!1,record:J};let W="threshold",K,Z,H,z;if(Y.checkThreshold){let _=Y.messages??await this.loadMessagesFromStorage(X,G,J.lastObservedAt?new Date(J.lastObservedAt):void 0),P=this.observationConfig.activateAfterIdle,w=id0(_),j=P!==void 0&&w!==void 0?Date.now()-w:void 0,C=j!==void 0&&P!==void 0&&j>=P,k=$B9(Y.currentModel),S=eA9(_);if(this.observationConfig.activateOnProviderChange===!0&&rO4(k,S))W="provider_change",H=S,z=k;else if(C)W="ttl",K=w,Z=j;else{let v=await this.getStatus({threadId:X,resourceId:G,messages:_});if(v.pendingTokens<v.threshold)return{activated:!1,record:J}}}if(J.isBufferingObservation){let _=this.buffering.getLockKey(X,G),P=this.buffering.getObservationBufferKey(_),w=$5.asyncBufferingOps.get(P);if(w)try{await Promise.race([w,new Promise((j,C)=>setTimeout(()=>C(Error("Timeout")),60000))])}catch{}}let V=await this.storage.getObservationalMemory(J.threadId,J.resourceId);if(!V)return{activated:!1,record:J};let F=kM(V);if(!F.length)return{activated:!1,record:J};let L=a7(this.getEffectiveMessageTokens(V)),N=this.observationConfig.bufferActivation??0.7,D=QN9(N,L),A=F.reduce((_,P)=>_+(P.messageTokens??0),0),B=V.pendingMessageTokens||A,O=!!(this.observationConfig.blockAfter&&B>=this.observationConfig.blockAfter),E=await this.storage.swapBufferedToActive({id:V.id,activationRatio:D,messageTokensThreshold:L,currentPendingTokens:B,forceMaxActivation:O,bufferedChunks:F});await this.storage.setBufferingObservationFlag(V.id,!1).catch(()=>{}),NC(V.id,"bufferingObservation");let M=await this.storage.getObservationalMemory(J.threadId,J.resourceId);if(Y.writer&&M&&E.activatedCycleIds.length>0){let _=new Map(E.perChunk?.map((P)=>[P.cycleId,P]));for(let P of E.activatedCycleIds){let w=_.get(P),j=eO4({cycleId:P,operationType:"observation",chunksActivated:1,tokensActivated:w?.messageTokens??E.messageTokensActivated,observationTokens:w?.observationTokens??E.observationTokensActivated,messagesActivated:w?.messageCount??E.messagesActivated,recordId:M.id,threadId:M.threadId??J.threadId??"",generationCount:M.generationCount??0,observations:w?.observations??E.observations,triggeredBy:W,lastActivityAt:K,ttlExpiredMs:Z,previousModel:H,currentModel:z,config:this.getObservationMarkerConfig()});Y.writer.custom({...j,transient:!0}).catch(()=>{}),await this.persistMarkerToMessage(j,Y.messageList,J.threadId??"",J.resourceId??void 0)}}let R=await this.storage.getThreadById({threadId:X});if(R){let _=F.filter((w)=>E.activatedCycleIds.includes(w.cycleId)),P=_[_.length-1];if(P){let w=P.threadTitle,j=fT(R.metadata,{suggestedResponse:P.suggestedContinuation,currentTask:P.currentTask,threadTitle:w}),C=R.title?.trim(),k=w?.trim(),S=!!k&&k.length>=3&&k!==C;await this.storage.updateThread({id:X,title:S?k:R.title??"",metadata:j})}}return{activated:!0,record:await this.getOrCreateRecord(X,G),activatedMessageIds:E.activatedMessageIds}}async observe(Y){let{threadId:X,resourceId:G,messages:J,hooks:Q,requestContext:W}=Y,K=this.buffering.getLockKey(X,G),Z=Q?{onReflectionStart:Q.onReflectionStart,onReflectionEnd:Q.onReflectionEnd}:void 0,H=!1,z,V=-1;await this.withLock(K,async()=>{let N=await this.getOrCreateRecord(X,G);V=N.generationCount;let D=J?this.getUnobservedMessages(J,N):await this.loadMessagesFromStorage(X,G,N.lastObservedAt?new Date(N.lastObservedAt):void 0);if(!this.meetsObservationThreshold({record:N,unobservedTokens:await this.tokenCounter.countMessagesAsync(D)}))return;Q?.onObservationStart?.();let A;try{let B=await xM.create(this,{record:N,threadId:X,resourceId:G,messages:D,reflectionHooks:Z,requestContext:W,writer:Y.writer,observabilityContext:Y.observabilityContext}).run();H=B.observed,z=B.usage}catch(B){throw A=B instanceof Error?B:Error(String(B)),B}finally{Q?.onObservationEnd?.({usage:z,error:A})}});let F=await this.getOrCreateRecord(X,G),L=F.generationCount>V&&V>=0;return{observed:H,reflected:L,record:F}}async reflect(Y,X,G,J,Q){let W=await this.getOrCreateRecord(Y,X);if(!W.activeObservations)return{reflected:!1,record:W,usage:void 0};await this.storage.setReflectingFlag(W.id,!0),lp(W.id,"reflecting");try{let K=a7(this.getEffectiveReflectionTokens(W)),Z=await this.reflector.call(W.activeObservations,G,void 0,K,void 0,void 0,void 0,J,Q,void 0),H=this.tokenCounter.countObservations(Z.observations);return await this.storage.createReflectionGeneration({currentRecord:W,reflection:Z.observations,tokenCount:H}),{reflected:!0,record:await this.getOrCreateRecord(Y,X),usage:Z.usage}}catch(K){return cW("[OM] reflect() failed",K),{reflected:!1,record:await this.getOrCreateRecord(Y,X),usage:void 0}}finally{await this.storage.setReflectingFlag(W.id,!1),NC(W.id,"reflecting")}}async getObservations(Y,X){let G=this.getStorageIds(Y,X);return(await this.storage.getObservationalMemory(G.threadId,G.resourceId))?.activeObservations}async getRecord(Y,X){let G=this.getStorageIds(Y,X);return this.storage.getObservationalMemory(G.threadId,G.resourceId)}async updateRecordConfig(Y,X,G){let J=this.getStorageIds(Y,X),Q=await this.storage.getObservationalMemory(J.threadId,J.resourceId);if(!Q)throw Error(`No observational memory record found for thread ${J.threadId}`);await this.storage.updateObservationalMemoryConfig({id:Q.id,config:{_overrides:G}})}async getHistory(Y,X,G,J){let Q=this.getStorageIds(Y,X);return this.storage.getObservationalMemoryHistory(Q.threadId,Q.resourceId,G,J)}async clear(Y,X){let G=this.getStorageIds(Y,X);await this.storage.clearObservationalMemory(G.threadId,G.resourceId),this.buffering.cleanupStaticMaps(G.threadId??G.resourceId,G.resourceId)}getStorage(){return this.storage}getTokenCounter(){return this.tokenCounter}getObservationConfig(){return this.observationConfig}getReflectionConfig(){return this.reflectionConfig}getMessageHistory(){return this.messageHistory}getObscureThreadIds(){return this.shouldObscureThreadIds}beginTurn(Y){return new VN9({om:this,threadId:Y.threadId,resourceId:Y.resourceId,messageList:Y.messageList,observabilityContext:Y.observabilityContext,hooks:Y.hooks})}},HX0="temporal-gap",lO4="__isGatewayModel",CE4=class{id="observational-memory";name="Observational Memory";engine;memory;temporalMarkers;turn;constructor($,Y,X){this.engine=$,this.memory=Y,this.temporalMarkers=X?.temporalMarkers??!1}async processInputStep($){let{messageList:Y,requestContext:X,stepNumber:G,state:J,writer:Q,model:W,abortSignal:K,abort:Z,rotateResponseMessageId:H}=$,z=J??{};S4(`[OM:processInputStep:ENTER] step=${G}, hasMastraMemory=${!!X?.get("MastraMemory")}, hasMemoryInfo=${!!Y?.serialize()?.memoryInfo?.threadId}`);let V=this.engine.getThreadContext(X,Y);if(!V)return S4("[OM:processInputStep:NO-CONTEXT] getThreadContext returned null \u2014 returning early"),Y;if(JB9(W))return z[lO4]=!0,S4("[OM:processInputStep:GATEWAY] gateway handles OM \u2014 skipping local processing"),Y;let{threadId:F,resourceId:L}=V,D=n3(X)?.memoryConfig?.readOnly,A=W?.modelId?{provider:W.provider,modelId:W.modelId}:void 0;return z.__omActorModelContext=A,this.engine.getTokenCounter().runWithModelContext(A,async()=>{let B=DX0(),O=B?AC(await this.engine.getOrCreateRecord(F,L)):null,E=B?AC(Y.get.all.db()):null,M=B?AC(Y.serialize()):null;if(D){let _=await GE4({memory:this.memory,messageList:Y,threadId:F,resourceId:L}),P=_.hasObservations&&_.omRecord?await this.engine.buildContextSystemMessages({threadId:F,resourceId:L,record:_.omRecord,unobservedContextBlocks:_.otherThreadsContext}):void 0;return iO4({messageList:Y,systemMessages:P,continuationMessage:_.continuationMessage,threadId:F,resourceId:L}),Y}let R=z.__omTurn??this.turn;if(R&&R.messageList!==Y){if(await R.end().catch(()=>{}),this.turn===R)this.turn=void 0;z.__omTurn=void 0}if(!this.turn||!z.__omTurn){if(this.turn&&!z.__omTurn)await this.turn.end().catch(()=>{});if(this.turn=this.engine.beginTurn({threadId:F,resourceId:L,messageList:Y,observabilityContext:kd0($),hooks:{onBufferChunkSealed:H,onSyncObservationComplete:H}}),this.turn.writer=Q,this.turn.requestContext=X,await this.turn.start(this.memory),G===0&&this.temporalMarkers)await GB9({messageList:Y,writer:Q});z.__omTurn=this.turn}this.turn.addHooks({onBufferChunkSealed:H,onSyncObservationComplete:H});let q=kd0($);z.__omObservabilityContext=q,this.turn.observabilityContext=q,this.turn.actorModelContext=A;{let _=this.turn.step(G),P;try{P=await _.prepare()}catch(x){let y=x instanceof Error?x:Error(String(x)),d=K?.aborted?"Agent execution was aborted":`Encountered error during memory observation: ${y.message}`;if(typeof Z==="function")Z(d);throw y}iO4({messageList:Y,systemMessages:P.systemMessage,continuationMessage:this.turn.context.continuation,threadId:F,resourceId:L});let w=await this.engine.getOrCreateRecord(F,L);await this.engine.emitProgress({record:w,stepNumber:G,pendingTokens:P.status.pendingTokens,threshold:P.status.threshold,effectiveObservationTokensThreshold:P.status.effectiveObservationTokensThreshold,currentObservationTokens:w.observationTokenCount??0,writer:Q,threadId:F,resourceId:L});let j=Y.get.all.db(),C=this.engine.getTokenCounter(),k=await C.countMessagesAsync(j),S=this.turn.context.otherThreadsContext,I=S?C.countString(S):0,v=k+I;if(await this.engine.getStorage().setPendingMessageTokens(w.id,v).catch(()=>{}),B)VA9({threadId:F,resourceId:L,stepNumber:G,args:$,preRecord:O,postRecord:AC(w),preMessages:E,preBufferedChunks:[],preContextTokenCount:0,preSerializedMessageList:M,postBufferedChunks:[],postContextTokenCount:v,messageList:Y,details:{},observerExchange:P.observerExchange})}return Y})}async processOutputResult($){let{messageList:Y,requestContext:X,state:G}=$,J=G??{};if(!this.engine.getThreadContext(X,Y))return Y;if(J[lO4])return Y;let W=kd0($);return J.__omObservabilityContext=W,this.engine.getTokenCounter().runWithModelContext(J.__omActorModelContext,async()=>{if(n3(X)?.memoryConfig?.readOnly)return Y;let Z=J.__omTurn??this.turn;if(Z)await Z.end(),this.turn=void 0,J.__omTurn=void 0;return Y})}get config(){return this.engine.config}async waitForBuffering($,Y,X){return this.engine.waitForBuffering($,Y,X)}async getResolvedConfig($){return this.engine.getResolvedConfig($)}},QB9;var NX0=V0(()=>{GY0();Up0();qD4();Hp0();PD4();N50();y40();hu();zp0();gD4();vd0=process.env.OM_DEBUG?zH(process.cwd(),"om-debug.log"):null;S4(`[OM:process-start] OM module loaded, pid=${process.pid}`);if(vd0){let $=console.error;console.error=(...Y)=>{S4(`[console.error] ${Y.map((X)=>{if(X instanceof Error)return X.stack??X.message;if(typeof X==="object"&&X!==null)try{return JSON.stringify(X)}catch{return String(X)}return String(X)}).join(" ")}`),$.apply(console,Y)}}BC=new Map;$5=class ${observationConfig;reflectionConfig;scope;static asyncBufferingOps=new Map;static lastBufferedBoundary=new Map;static lastBufferedAtTime=new Map;static reflectionBufferCycleIds=new Map;constructor(Y){this.observationConfig=Y.observationConfig,this.reflectionConfig=Y.reflectionConfig,this.scope=Y.scope}getLockKey(Y,X){if(this.scope==="resource"&&X)return`resource:${X}`;return`thread:${Y??"unknown"}`}isAsyncObservationEnabled(){return this.observationConfig.bufferTokens!==void 0&&this.observationConfig.bufferTokens>0}isAsyncReflectionEnabled(){return this.reflectionConfig.bufferActivation!==void 0&&this.reflectionConfig.bufferActivation>0}getObservationBufferKey(Y){return`obs:${Y}`}getReflectionBufferKey(Y){return`refl:${Y}`}isAsyncBufferingInProgress(Y){return $.asyncBufferingOps.has(Y)}cleanupStaticMaps(Y,X,G){let J=this.getLockKey(Y,X),Q=this.getObservationBufferKey(J),W=this.getReflectionBufferKey(J);if(G)$.lastBufferedBoundary.delete(Q),$.lastBufferedAtTime.delete(Q);else $.lastBufferedAtTime.delete(Q),$.lastBufferedBoundary.delete(Q),$.lastBufferedBoundary.delete(W),$.asyncBufferingOps.delete(Q),$.asyncBufferingOps.delete(W),$.reflectionBufferCycleIds.delete(W)}shouldTriggerAsyncObservation(Y,X,G,J,Q){if(!this.isAsyncObservationEnabled())return!1;if(G.isBufferingObservation){if($X0(G.id,"bufferingObservation"))return!1;S4("[OM:shouldTriggerAsyncObs] isBufferingObservation=true but stale, clearing"),J?.setBufferingObservationFlag(G.id,!1)?.catch(()=>{})}let W=this.getObservationBufferKey(X);if(this.isAsyncBufferingInProgress(W))return!1;let K=this.observationConfig.bufferTokens,Z=G.lastBufferedAtTokens??0,H=$.lastBufferedBoundary.get(W)??0,z=Math.max(Z,H),V=Q?Q-K*1.1:1/0,F=Y>=V?K/2:K,L=Math.floor(Y/F),N=Math.floor(z/F),D=L>N;return S4(`[OM:shouldTriggerAsyncObs] tokens=${Y}, bufferTokens=${K}, effectiveBufferTokens=${F}, rampPoint=${V}, currentInterval=${L}, lastInterval=${N}, lastBoundary=${z} (db=${Z}, mem=${H}), shouldTrigger=${D}`),D}static async awaitBuffering(Y,X,G,J=30000){let Q=G==="resource"&&X?`resource:${X}`:`thread:${Y??"unknown"}`,W=`obs:${Q}`,K=`refl:${Q}`,Z=[],H=$.asyncBufferingOps.get(W);if(H)Z.push(H);let z=$.asyncBufferingOps.get(K);if(z)Z.push(z);if(Z.length===0)return;let V;try{await Promise.race([Promise.allSettled(Z).then(()=>{return}),new Promise((F)=>{V=setTimeout(F,J)})])}finally{if(V!==void 0)clearTimeout(V)}}};od0=/<observation-group\s([^>]*)>([\s\S]*?)<\/observation-group>/g,tD9=/([\w][\w-]*)="([^"]*)"/g,IO4=/^##\s+Group\s+/m;KN9=qE(),ZN9=class extends xM{startedAt=new Date().toISOString();lastMessage;cycleId;tokensToObserve=0;observerResult;constructor($,Y){super($,Y);this.lastMessage=Y.messages[Y.messages.length-1]}get needsLock(){return!0}get needsReflection(){return!0}get rethrowOnFailure(){return!0}async prepare(){let{record:$,threadId:Y,messages:X}=this.opts;this.deps.emitDebugEvent({type:"observation_triggered",timestamp:new Date,threadId:Y,resourceId:$.resourceId??"",previousObservations:$.activeObservations,messages:X.map((W)=>({role:W.role,content:typeof W.content==="string"?W.content:JSON.stringify(W.content)}))});let G=this.observationConfig.bufferActivation;if(G&&G<1&&X.length>=1){let W=X[X.length-1];if(W?.content?.parts?.length){if(!W.content.metadata)W.content.metadata={};let K=W.content.metadata;if(!K.mastra)K.mastra={};K.mastra.sealed=!0,S4(`[OM:sync-obs] sealed newest message (${W.role}, ${W.content.parts.length} parts) for ratio-aware observation`)}}this.tokensToObserve=await this.tokenCounter.countMessagesAsync(X);let Q=(await this.storage.getObservationalMemory($.threadId,$.resourceId))?.activeObservations??$.activeObservations??"";return{messages:X,existingObservations:Q}}async emitStartMarkers($){if(this.cycleId=$,this.lastMessage?.id){let Y=XX0({cycleId:$,operationType:"observation",tokensToObserve:this.tokensToObserve,recordId:this.opts.record.id,threadId:this.opts.threadId,threadIds:[this.opts.threadId],config:this.getObservationMarkerConfig()});await this.streamMarker(Y)}}async observe($,Y){let X=await this.storage.getThreadById({threadId:this.opts.threadId}),G=X?fE(X.metadata):void 0,J=await this.deps.observer.call($,Y,this.opts.abortSignal,{requestContext:this.opts.requestContext,observabilityContext:this.opts.observabilityContext,priorCurrentTask:G?.currentTask,priorSuggestedResponse:G?.suggestedResponse,priorThreadTitle:G?.threadTitle});return this.observerResult=J,J}async process($,Y){let{record:X,threadId:G,messages:J}=this.opts,Q=this.getMaxMessageTimestamp(J),W=this.retrieval?zc0(J):void 0,K=await this.wrapObservations($.observations,Y,G,Q,W),Z=this.tokenCounter.countObservations(K),H=this.tokenCounter.countObservations($.observations),z=J.map((L)=>L.id),V=X.observedMessageIds??[],F=[...new Set([...Array.isArray(V)?V:[],...z])];return this.deps.emitDebugEvent({type:"observation_complete",timestamp:new Date,threadId:G,resourceId:X.resourceId??"",observations:K,rawObserverOutput:$.observations,previousObservations:X.activeObservations,messages:J.map((L)=>({role:L.role,content:typeof L.content==="string"?L.content:JSON.stringify(L.content)})),usage:$.usage}),{observations:K,observationTokens:Z,cycleObservationTokens:H,observedMessageIds:F,lastObservedAt:Q,suggestedContinuation:$.suggestedContinuation,currentTask:$.currentTask,threadTitle:$.threadTitle}}async persist($){let{record:Y,threadId:X,resourceId:G,messages:J}=this.opts,Q=await this.storage.getThreadById({threadId:X}),W;if(Q){let K=Q.title?.trim(),Z=$.threadTitle?.trim(),H=!!Z&&Z.length>=3&&Z!==K,z=fT(Q.metadata,{suggestedResponse:$.suggestedContinuation,currentTask:$.currentTask,threadTitle:$.threadTitle,lastObservedMessageCursor:sd0(J)});if(await this.storage.updateThread({id:X,title:H?Z:Q.title??"",metadata:z}),H)W=ad0({cycleId:this.cycleId??crypto.randomUUID(),threadId:X,oldTitle:K,newTitle:Z})}if(W)await this.streamMarker(W);await this.storage.updateActiveObservations({id:Y.id,observations:$.observations,tokenCount:$.observationTokens,lastObservedAt:$.lastObservedAt,observedMessageIds:$.observedMessageIds}),await this.indexObservationGroups($.observations,X,G,$.lastObservedAt)}async emitEndMarkers($,Y){let X=await this.tokenCounter.countMessagesAsync(this.opts.messages);if(this.lastMessage?.id){let G=rd0({cycleId:$,operationType:"observation",startedAt:this.startedAt,tokensObserved:X,observationTokens:Y.cycleObservationTokens,observations:this.observerResult.observations,currentTask:this.observerResult.currentTask,suggestedResponse:this.observerResult.suggestedContinuation,recordId:this.opts.record.id,threadId:this.opts.threadId});await this.streamMarker(G)}}async emitFailedMarkers($,Y){if(this.lastMessage?.id){let X=GX0({cycleId:$,operationType:"observation",startedAt:this.startedAt,tokensAttempted:this.tokensToObserve,error:Y instanceof Error?Y.message:String(Y),recordId:this.opts.record.id,threadId:this.opts.threadId});await this.streamMarker(X)}}},UN9=class extends xM{startedAt;cycleId;constructor($,Y){super($,Y);this.cycleId=Y.cycleId,this.startedAt=Y.startedAt??new Date().toISOString()}get needsLock(){return!1}get needsReflection(){return!1}get rethrowOnFailure(){return!1}generateCycleId(){return this.cycleId}async prepare(){let{record:$,messages:Y}=this.opts,G=kM($).map((Q)=>Q.observations).join(`

`),J=rD9($.activeObservations,G)??"";return{messages:Y,existingObservations:J}}async emitStartMarkers($){}async observe($,Y){return this.deps.observer.call($,Y,void 0,{skipContinuationHints:!0,requestContext:this.opts.requestContext,observabilityContext:this.opts.observabilityContext})}async process($,Y){let{threadId:X,messages:G}=this.opts;if(!$.observations)return S4("[OM:asyncBuffer] empty observations returned, skipping buffer storage"),{observations:"",observationTokens:0,cycleObservationTokens:0,observedMessageIds:[],lastObservedAt:new Date};let J=this.retrieval?zc0(G):void 0,Q;if(this.scope==="resource")Q=await this.wrapWithThreadTag(X,$.observations,J);else Q=this.retrieval&&J?wV($.observations,J):$.observations;let W=this.tokenCounter.countObservations(Q),K=G.map((z)=>z.id),Z=this.getMaxMessageTimestamp(G),H=new Date(Z.getTime()+1);return{observations:Q,observationTokens:W,cycleObservationTokens:W,observedMessageIds:K,lastObservedAt:H,suggestedContinuation:$.suggestedContinuation,currentTask:$.currentTask,threadTitle:$.threadTitle}}async persist($){if(!$.observations)return;let{record:Y,threadId:X,resourceId:G,messages:J}=this.opts,Q=await this.tokenCounter.countMessagesAsync(J);await this.storage.updateBufferedObservations({id:Y.id,chunk:{cycleId:this.cycleId,observations:$.observations,tokenCount:$.observationTokens,messageIds:$.observedMessageIds,messageTokens:Q,lastObservedAt:$.lastObservedAt,suggestedContinuation:$.suggestedContinuation,currentTask:$.currentTask,threadTitle:$.threadTitle},lastBufferedAtTime:$.lastObservedAt}),await this.indexObservationGroups($.observations,X,G,$.lastObservedAt);let W=$.threadTitle?.trim();if(W&&W.length>=3){let K=await this.storage.getThreadById({threadId:X});if(K){let Z=K.title?.trim();if(W!==Z){let H=fT(K.metadata,{threadTitle:$.threadTitle});await this.storage.updateThread({id:X,title:W,metadata:H});let z=ad0({cycleId:this.cycleId,threadId:X,oldTitle:Z,newTitle:W});await this.streamMarker(z)}}}}async emitEndMarkers($,Y){if(!Y.observations)return;let{record:X,threadId:G,messages:J}=this.opts,Q=await this.tokenCounter.countMessagesAsync(J),W=await this.storage.getObservationalMemory(X.threadId,X.resourceId),Z=kM(W).reduce((z,V)=>z+(V.tokenCount??0),0)||Y.observationTokens,H=oO4({cycleId:this.cycleId,operationType:"observation",startedAt:this.startedAt,tokensBuffered:Q,bufferedTokens:Z,recordId:X.id,threadId:G,observations:Y.observations});if(this.opts.writer)this.opts.writer.custom({...H,transient:!0}).catch(()=>{});await this.persistMarkerToStorage(H,G,X.resourceId??void 0)}async emitFailedMarkers($,Y){let{record:X,threadId:G,messages:J}=this.opts,Q=await this.tokenCounter.countMessagesAsync(J),W=tO4({cycleId:this.cycleId,operationType:"observation",startedAt:this.startedAt,tokensAttempted:Q,error:Y instanceof Error?Y.message:String(Y),recordId:X.id,threadId:G});if(this.opts.writer)this.opts.writer.custom({...W,transient:!0}).catch(()=>{});await this.persistMarkerToStorage(W,G,X.resourceId??void 0)}},HN9=class extends xM{startedAt=new Date().toISOString();cycleId;resourceId;threadsWithMessages=new Map;threadTokensToObserve=new Map;threadTokenCounts=new Map;threadOrder=[];messagesByThread=new Map;multiThreadResults=new Map;totalBatchUsage={inputTokens:0,outputTokens:0,totalTokens:0};observationResults=[];priorMetadataByThread=new Map;constructor($,Y){super($,Y);this.resourceId=Y.resourceId}get needsLock(){return!0}get needsReflection(){return!0}get rethrowOnFailure(){return!0}async prepare(){let{record:$,threadId:Y,messages:X}=this.opts,{threads:G}=await this.storage.listThreads({filter:{resourceId:this.resourceId}}),J=new Map;for(let L of G){let N=fE(L.metadata);if(J.set(L.id,{lastObservedAt:N?.lastObservedAt}),N?.currentTask||N?.suggestedResponse||N?.threadTitle)this.priorMetadataByThread.set(L.id,{currentTask:N.currentTask,suggestedResponse:N.suggestedResponse,threadTitle:N.threadTitle})}for(let L of G){let N=J.get(L.id)?.lastObservedAt,D=N?new Date(new Date(N).getTime()+1):void 0,B=(await this.storage.listMessages({threadId:L.id,perPage:!1,orderBy:{field:"createdAt",direction:"ASC"},filter:D?{dateRange:{start:D}}:void 0})).messages.filter((O)=>O.role!=="system");if(B.length>0)this.messagesByThread.set(L.id,B)}if(X.length>0){let L=this.messagesByThread.get(Y)??[],N=new Map;for(let D of L)if(D.id)N.set(D.id,D);for(let D of X)if(D.id)N.set(D.id,D);this.messagesByThread.set(Y,Array.from(N.values()))}for(let[L,N]of this.messagesByThread){let D=N.filter((A)=>!this.deps.observedMessageIds.has(A.id));if(D.length>0)this.messagesByThread.set(L,D);else this.messagesByThread.delete(L)}let Q=0;for(let L of this.messagesByThread.values())Q+=L.length;if(Q===0)return{messages:[],existingObservations:""};let W=a7(this.observationConfig.messageTokens);for(let[L,N]of this.messagesByThread){let D=await this.tokenCounter.countMessagesAsync(N);this.threadTokenCounts.set(L,D)}let K=Array.from(this.messagesByThread.keys()).sort((L,N)=>{return(this.threadTokenCounts.get(N)??0)-(this.threadTokenCounts.get(L)??0)}),Z=0,H=[];for(let L of K){let N=this.threadTokenCounts.get(L)??0;if(Z>=W)break;H.push(L),Z+=N}if(H.length===0)return{messages:[],existingObservations:""};this.threadOrder=aD9(new Map(H.map((L)=>[L,this.messagesByThread.get(L)??[]])));for(let L of this.threadOrder){let N=this.messagesByThread.get(L);if(N&&N.length>0)this.threadsWithMessages.set(L,N)}this.deps.emitDebugEvent({type:"observation_triggered",timestamp:new Date,threadId:this.threadOrder.join(","),resourceId:this.resourceId,previousObservations:$.activeObservations,messages:Array.from(this.threadsWithMessages.values()).flat().map((L)=>({role:L.role,content:typeof L.content==="string"?L.content:JSON.stringify(L.content)}))});let V=(await this.storage.getObservationalMemory(null,this.resourceId))?.activeObservations??$.activeObservations??"";return{messages:Array.from(this.threadsWithMessages.values()).flat(),existingObservations:V}}async emitStartMarkers($){this.cycleId=$;let Y=Array.from(this.threadsWithMessages.keys());for(let[X,G]of this.threadsWithMessages){let J=G[G.length-1],Q=await this.tokenCounter.countMessagesAsync(G);if(this.threadTokensToObserve.set(X,Q),J?.id){let W=XX0({cycleId:$,operationType:"observation",tokensToObserve:Q,recordId:this.opts.record.id,threadId:X,threadIds:Y,config:this.getObservationMarkerConfig()});await this.streamMarker(W)}}}async observe($,Y){let X=this.observationConfig.maxTokensPerBatch??N9.observation.maxTokensPerBatch,G=this.threadOrder.filter((Z)=>this.threadsWithMessages.has(Z)),J=[],Q={threadIds:[],threadMap:new Map},W=0;for(let Z of G){let H=this.threadsWithMessages.get(Z),z=this.threadTokenCounts.get(Z)??0;if(W+z>X&&Q.threadIds.length>0)J.push(Q),Q={threadIds:[],threadMap:new Map},W=0;Q.threadIds.push(Z),Q.threadMap.set(Z,H),W+=z}if(Q.threadIds.length>0)J.push(Q);let K=await Promise.all(J.map(async(Z)=>{return this.deps.observer.callMultiThread($,Z.threadMap,Z.threadIds,this.opts.abortSignal,this.opts.requestContext,this.priorMetadataByThread,this.opts.observabilityContext)}));for(let Z of K){for(let[H,z]of Z.results)this.multiThreadResults.set(H,z);if(Z.usage)this.totalBatchUsage.inputTokens+=Z.usage.inputTokens??0,this.totalBatchUsage.outputTokens+=Z.usage.outputTokens??0,this.totalBatchUsage.totalTokens+=Z.usage.totalTokens??0}return{observations:"",usage:this.totalBatchUsage.totalTokens>0?this.totalBatchUsage:void 0}}async process($,Y){let{record:X}=this.opts;this.observationResults=[];for(let F of this.threadOrder){let L=this.messagesByThread.get(F)??[];if(L.length===0)continue;let N=this.multiThreadResults.get(F);if(!N)continue;this.observationResults.push({threadId:F,threadMessages:L,result:N})}let G=Y,J=0,Q=[];for(let F of this.observationResults){let{threadId:L,threadMessages:N,result:D}=F;J+=this.tokenCounter.countObservations(D.observations);let A=this.retrieval?zc0(N):void 0,B=await this.wrapWithThreadTag(L,D.observations,A),O=this.getMaxMessageTimestamp(N);G=this.replaceOrAppendThreadSection(G,L,B,O),Q.push({threadId:L,lastObservedAt:O.toISOString(),suggestedResponse:D.suggestedContinuation,currentTask:D.currentTask,threadTitle:D.threadTitle,lastObservedMessageCursor:sd0(N)});let E=this.observationResults.indexOf(F)===0;this.deps.emitDebugEvent({type:"observation_complete",timestamp:new Date,threadId:L,resourceId:this.resourceId,observations:B,rawObserverOutput:D.observations,previousObservations:X.activeObservations,messages:N.map((M)=>({role:M.role,content:typeof M.content==="string"?M.content:JSON.stringify(M.content)})),usage:E&&this.totalBatchUsage.totalTokens>0?this.totalBatchUsage:void 0})}let W=this.observationResults.flatMap((F)=>F.threadMessages),K=this.getMaxMessageTimestamp(W),Z=W.map((F)=>F.id),H=X.observedMessageIds??[],z=[...new Set([...H,...Z])],V=this.tokenCounter.countObservations(G);return{observations:G,observationTokens:V,cycleObservationTokens:J,observedMessageIds:z,lastObservedAt:K,threadMetadataUpdates:Q}}async persist($){let{record:Y,resourceId:X}=this.opts,G=[];if($.threadMetadataUpdates)for(let J of $.threadMetadataUpdates){let Q=await this.storage.getThreadById({threadId:J.threadId});if(Q){let W=Q.title?.trim(),K=J.threadTitle?.trim(),Z=!!K&&K.length>=3&&K!==W,H=fT(Q.metadata,{lastObservedAt:J.lastObservedAt,suggestedResponse:J.suggestedResponse,currentTask:J.currentTask,threadTitle:J.threadTitle,lastObservedMessageCursor:J.lastObservedMessageCursor});if(await this.storage.updateThread({id:J.threadId,title:Z?K:Q.title??"",metadata:H}),Z)G.push(ad0({cycleId:this.cycleId??crypto.randomUUID(),threadId:J.threadId,oldTitle:W,newTitle:K}))}}for(let J of G)await this.streamMarker(J);if(await this.storage.updateActiveObservations({id:Y.id,observations:$.observations,tokenCount:$.observationTokens,lastObservedAt:$.lastObservedAt,observedMessageIds:$.observedMessageIds}),X)await Promise.all(this.observationResults.map(({threadId:J,threadMessages:Q,result:W})=>this.indexObservationGroups(W.observations,J,X,this.getMaxMessageTimestamp(Q))))}async emitEndMarkers($,Y){for(let X of this.observationResults){let{threadId:G,threadMessages:J,result:Q}=X;if(J[J.length-1]?.id){let K=this.threadTokensToObserve.get(G)??await this.tokenCounter.countMessagesAsync(J),Z=rd0({cycleId:$,operationType:"observation",startedAt:this.startedAt,tokensObserved:K,observationTokens:Y.cycleObservationTokens,observations:Q.observations,currentTask:Q.currentTask,suggestedResponse:Q.suggestedContinuation,recordId:this.opts.record.id,threadId:G});await this.streamMarker(Z)}}}async emitFailedMarkers($,Y){for(let[X,G]of this.threadsWithMessages)if(G[G.length-1]?.id){let Q=this.threadTokensToObserve.get(X)??0,W=GX0({cycleId:$,operationType:"observation",startedAt:this.startedAt,tokensAttempted:Q,error:Y instanceof Error?Y.message:String(Y),recordId:this.opts.record.id,threadId:X});await this.streamMarker(W)}}};xM.create=($,Y)=>{let X={storage:$.getStorage(),messageHistory:$.getMessageHistory(),tokenCounter:$.getTokenCounter(),observationConfig:$.getObservationConfig(),reflectionConfig:$.getReflectionConfig(),scope:$.scope,retrieval:$.retrieval,observer:$.observer,reflector:$.reflector,observedMessageIds:$.observedMessageIds,obscureThreadIds:$.getObscureThreadIds(),onIndexObservations:$.onIndexObservations,emitDebugEvent:(G)=>$.emitDebugEvent(G)};if(Y.cycleId)return new UN9(X,Y);if(X.scope==="resource"&&Y.resourceId)return new HN9(X,Y);return new ZN9(X,Y)};FN9=/^\[(O\d+(?:-N\d+)?)\]\s*/,LN9=/^\s*Date:\s+/,DN9=/^\s*<\/?[a-z][^>]*>\s*$/i,NN9=/^\s*##\s+Group\s+`[^`]+`\s*$/,AN9=/^\s*_range:\s*`[^`]*`_\s*$/;wN9=WE4();KE4=OC(),_N9=new Set(["png","jpg","jpeg","webp","gif","bmp","tiff","tif","heic","heif","avif"]);cp={maxRetries:8,initialDelayMs:1000,backoffFactor:2,maxDelayMs:120000,jitter:0.2},mN9=["terminated","fetch failed","econnreset","econnrefused","enotfound","eai_again","socket hang up","network error","request timed out","request timeout","connection reset","connection closed"];nN9={observer:{name:"om.observer",entityName:"Observer"},"observer-multi-thread":{name:"om.observer.multi-thread",entityName:"MultiThreadObserver"},reflector:{name:"om.reflector",entityName:"Reflector"}};oN9={0:"",1:`
## COMPRESSION REQUIRED

Your previous reflection was the same size or larger than the original observations.

Please re-process with slightly more compression:
- Towards the beginning, condense more observations into higher-level reflections
- Closer to the end, retain more fine details (recent context matters more)
- Memory is getting long - use a more condensed style throughout
- Combine related items more aggressively but do not lose important specific details of names, places, events, and people
- Combine repeated similar tool calls (e.g. multiple file views, searches, or edits in the same area) into a single summary line describing what was explored/changed and the outcome
- Preserve \u2705 completion markers \u2014 they are memory signals that tell the assistant what is already resolved and help prevent repeated work
- Preserve the concrete resolved outcome captured by \u2705 markers so the assistant knows what exactly is done

Aim for a 8/10 detail level.
`,2:`
## AGGRESSIVE COMPRESSION REQUIRED

Your previous reflection was still too large after compression guidance.

Please re-process with much more aggressive compression:
- Towards the beginning, heavily condense observations into high-level summaries
- Closer to the end, retain fine details (recent context matters more)
- Memory is getting very long - use a significantly more condensed style throughout
- Combine related items aggressively but do not lose important specific details of names, places, events, and people
- Combine repeated similar tool calls (e.g. multiple file views, searches, or edits in the same area) into a single summary line describing what was explored/changed and the outcome
- If the same file or module is mentioned across many observations, merge into one entry covering the full arc
- Preserve \u2705 completion markers \u2014 they are memory signals that tell the assistant what is already resolved and help prevent repeated work
- Preserve the concrete resolved outcome captured by \u2705 markers so the assistant knows what exactly is done
- Remove redundant information and merge overlapping observations

Aim for a 6/10 detail level.
`,3:`
## CRITICAL COMPRESSION REQUIRED

Your previous reflections have failed to compress sufficiently after multiple attempts.

Please re-process with maximum compression:
- Summarize the oldest observations (first 50-70%) into brief high-level paragraphs \u2014 only key facts, decisions, and outcomes
- For the most recent observations (last 30-50%), retain important details but still use a condensed style
- Ruthlessly merge related observations \u2014 if 10 observations are about the same topic, combine into 1-2 lines
- Combine all tool call sequences (file views, searches, edits, builds) into outcome-only summaries \u2014 drop individual steps entirely
- Drop procedural details (tool calls, retries, intermediate steps) \u2014 keep only final outcomes
- Drop observations that are no longer relevant or have been superseded by newer information
- Preserve \u2705 completion markers \u2014 they are memory signals that tell the assistant what is already resolved and help prevent repeated work
- Preserve the concrete resolved outcome captured by \u2705 markers so the assistant knows what exactly is done
- Preserve: names, dates, decisions, errors, user preferences, and architectural choices

Aim for a 4/10 detail level.
`,4:`
## EXTREME COMPRESSION REQUIRED

Multiple compression attempts have failed. The content may already be dense from a prior reflection.

You MUST dramatically reduce the number of observations while keeping the standard observation format (date groups with bullet points and priority emojis):
- Tool call observations are the biggest source of bloat. Collapse ALL tool call sequences into outcome-only observations \u2014 e.g. 10 observations about viewing/searching/editing files become 1 observation about what was actually learned or achieved (e.g. "Investigated auth module and found token validation was skipping expiry check")
- Never preserve individual tool calls (viewed file X, searched for Y, ran build) \u2014 only preserve what was discovered or accomplished
- Consolidate many related observations into single, more generic observations
- Merge all same-day date groups into at most 2-3 date groups per day
- For older content, each topic or task should be at most 1-2 observations capturing the key outcome
- For recent content, retain more detail but still merge related items aggressively
- If multiple observations describe incremental progress on the same task, keep only the final state
- Preserve \u2705 completion markers and their outcomes but merge related completions into fewer lines
- Preserve: user preferences, key decisions, architectural choices, and unresolved issues

Aim for a 2/10 detail level. Fewer, more generic observations are better than many specific ones that exceed the budget.
`};FA9=new Set(["png","jpg","jpeg","webp","gif","bmp","tiff","tif","heic","heif","avif"]),DA9={baseTokens:85,tileTokens:170,fallbackTiles:4},AA9={low:280,medium:560,high:1120,ultra_high:2240,unspecified:1120},OA9=new Set(["low","medium","high","ultra_high","unspecified"]),EA9={openai:["OPENAI_API_KEY"],google:["GOOGLE_GENERATIVE_AI_API_KEY","GOOGLE_API_KEY"],anthropic:["ANTHROPIC_API_KEY"]};QB9=/\n{2,}--- message boundary \((\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z)\) ---\n{2,}/});var vE4={};W8(vE4,{OBSERVATION_RETRIEVAL_INSTRUCTIONS:()=>XY0,OBSERVATION_CONTINUATION_HINT:()=>oI,OBSERVATION_CONTEXT_PROMPT:()=>tI,OBSERVATION_CONTEXT_INSTRUCTIONS:()=>eI,OBSERVATIONAL_MEMORY_DEFAULTS:()=>N9});var xE4=V0(()=>{GY0()});var Lc0={};W8(Lc0,{wrapInObservationGroup:()=>wV,stripObservationGroups:()=>td0,stripEphemeralAnchorIds:()=>VX0,renderObservationGroupsForReflection:()=>ed0,reconcileObservationGroupsFromReflection:()=>Yc0,parseObserverOutput:()=>JX0,parseObservationGroups:()=>ap,parseAnchorId:()=>Xc0,optimizeObservationsForContext:()=>QX0,injectAnchorIds:()=>JE4,hasCurrentTaskSection:()=>DE4,getObservationsAsOf:()=>Fc0,formatMessagesForObserver:()=>LX0,extractCurrentTask:()=>NE4,deriveObservationGroupProvenance:()=>$c0,combineObservationGroupRanges:()=>zX0,buildObserverSystemPrompt:()=>OC,buildObserverPrompt:()=>LE4,TokenCounter:()=>UX0,ObservationalMemoryProcessor:()=>CE4,ObservationalMemory:()=>TE4,OBSERVER_SYSTEM_PROMPT:()=>KE4,OBSERVATION_CONTINUATION_HINT:()=>oI,OBSERVATION_CONTEXT_PROMPT:()=>tI,OBSERVATION_CONTEXT_INSTRUCTIONS:()=>eI,OBSERVATIONAL_MEMORY_DEFAULTS:()=>N9,ModelByInputTokens:()=>vM});var Dc0=V0(()=>{NX0();GY0()});var jl0=o((oq$,cw4)=>{var{defineProperty:_l0,getOwnPropertyDescriptor:NI9,getOwnPropertyNames:AI9}=Object,BI9=Object.prototype.hasOwnProperty,OI9=($,Y)=>{for(var X in Y)_l0($,X,{get:Y[X],enumerable:!0})},EI9=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of AI9(Y))if(!BI9.call($,J)&&J!==X)_l0($,J,{get:()=>Y[J],enumerable:!(G=NI9(Y,J))||G.enumerable})}return $},MI9=($)=>EI9(_l0({},"__esModule",{value:!0}),$),pw4={};OI9(pw4,{SYMBOL_FOR_REQ_CONTEXT:()=>dw4,getContext:()=>RI9});cw4.exports=MI9(pw4);var dw4=Symbol.for("@vercel/request-context");function RI9(){return globalThis[dw4]?.get?.()??{}}});var wd=o((tq$,nw4)=>{var{defineProperty:Tl0,getOwnPropertyDescriptor:qI9,getOwnPropertyNames:PI9}=Object,wI9=Object.prototype.hasOwnProperty,_I9=($,Y)=>{for(var X in Y)Tl0($,X,{get:Y[X],enumerable:!0})},jI9=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of PI9(Y))if(!wI9.call($,J)&&J!==X)Tl0($,J,{get:()=>Y[J],enumerable:!(G=qI9(Y,J))||G.enumerable})}return $},TI9=($)=>jI9(Tl0({},"__esModule",{value:!0}),$),lw4={};_I9(lw4,{VercelOidcTokenError:()=>iw4});nw4.exports=TI9(lw4);class iw4 extends Error{constructor($,Y){super($);this.name="VercelOidcTokenError",this.cause=Y}toString(){if(this.cause)return`${this.name}: ${this.message}: ${this.cause}`;return`${this.name}: ${this.message}`}}});var ow4=o((eq$,sw4)=>{var{create:II9,defineProperty:rX0,getOwnPropertyDescriptor:CI9,getOwnPropertyNames:SI9,getPrototypeOf:kI9}=Object,vI9=Object.prototype.hasOwnProperty,xI9=($,Y)=>{for(var X in Y)rX0($,X,{get:Y[X],enumerable:!0})},rw4=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of SI9(Y))if(!vI9.call($,J)&&J!==X)rX0($,J,{get:()=>Y[J],enumerable:!(G=CI9(Y,J))||G.enumerable})}return $},Cl0=($,Y,X)=>(X=$!=null?II9(kI9($)):{},rw4(Y||!$||!$.__esModule?rX0(X,"default",{value:$,enumerable:!0}):X,$)),yI9=($)=>rw4(rX0({},"__esModule",{value:!0}),$),aw4={};xI9(aw4,{findRootDir:()=>fI9,getUserDataDir:()=>gI9});sw4.exports=yI9(aw4);var _d=Cl0(A0("path")),bI9=Cl0(A0("fs")),Il0=Cl0(A0("os")),hI9=wd();function fI9(){try{let $=process.cwd();while($!==_d.default.dirname($)){let Y=_d.default.join($,".vercel");if(bI9.default.existsSync(Y))return $;$=_d.default.dirname($)}}catch($){throw new hI9.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function gI9(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(Il0.default.platform()){case"darwin":return _d.default.join(Il0.default.homedir(),"Library/Application Support");case"linux":return _d.default.join(Il0.default.homedir(),".local/share");case"win32":if(process.env.LOCALAPPDATA)return process.env.LOCALAPPDATA;return null;default:return null}}});var J_4=o(($P$,G_4)=>{var{create:mI9,defineProperty:aX0,getOwnPropertyDescriptor:uI9,getOwnPropertyNames:pI9,getPrototypeOf:dI9}=Object,cI9=Object.prototype.hasOwnProperty,lI9=($,Y)=>{for(var X in Y)aX0($,X,{get:Y[X],enumerable:!0})},tw4=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of pI9(Y))if(!cI9.call($,J)&&J!==X)aX0($,J,{get:()=>Y[J],enumerable:!(G=uI9(Y,J))||G.enumerable})}return $},ew4=($,Y,X)=>(X=$!=null?mI9(dI9($)):{},tw4(Y||!$||!$.__esModule?aX0(X,"default",{value:$,enumerable:!0}):X,$)),iI9=($)=>tw4(aX0({},"__esModule",{value:!0}),$),$_4={};lI9($_4,{isValidAccessToken:()=>sI9,readAuthConfig:()=>rI9,writeAuthConfig:()=>aI9});G_4.exports=iI9($_4);var jd=ew4(A0("fs")),Y_4=ew4(A0("path")),nI9=Td();function X_4(){let $=(0,nI9.getVercelDataDir)();if(!$)throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return Y_4.join($,"auth.json")}function rI9(){try{let $=X_4();if(!jd.existsSync($))return null;let Y=jd.readFileSync($,"utf8");if(!Y)return null;return JSON.parse(Y)}catch($){return null}}function aI9($){let Y=X_4(),X=Y_4.dirname(Y);if(!jd.existsSync(X))jd.mkdirSync(X,{mode:504,recursive:!0});jd.writeFileSync(Y,JSON.stringify($,null,2),{mode:384})}function sI9($,Y=0){if(!$.token)return!1;if(typeof $.expiresAt!=="number")return!0;let X=Math.floor(Date.now()/1000),G=Y/1000;return $.expiresAt>=X+G}});var Z_4=o((YP$,K_4)=>{var{defineProperty:vl0,getOwnPropertyDescriptor:oI9,getOwnPropertyNames:tI9}=Object,eI9=Object.prototype.hasOwnProperty,$C9=($,Y)=>{for(var X in Y)vl0($,X,{get:Y[X],enumerable:!0})},YC9=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of tI9(Y))if(!eI9.call($,J)&&J!==X)vl0($,J,{get:()=>Y[J],enumerable:!(G=oI9(Y,J))||G.enumerable})}return $},XC9=($)=>YC9(vl0({},"__esModule",{value:!0}),$),Q_4={};$C9(Q_4,{processTokenResponse:()=>KC9,refreshTokenRequest:()=>WC9});K_4.exports=XC9(Q_4);var Sl0=A0("os"),GC9="https://vercel.com",JC9="cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",W_4=`@vercel/oidc node-${process.version} ${(0,Sl0.platform)()} (${(0,Sl0.arch)()}) ${(0,Sl0.hostname)()}`,kl0=null;async function QC9(){if(kl0)return kl0;let $=`${GC9}/.well-known/openid-configuration`,Y=await fetch($,{headers:{"user-agent":W_4}});if(!Y.ok)throw Error("Failed to discover OAuth endpoints");let X=await Y.json();if(!X||typeof X.token_endpoint!=="string")throw Error("Invalid OAuth discovery response");let G=X.token_endpoint;return kl0=G,G}async function WC9($){let Y=await QC9();return await fetch(Y,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":W_4},body:new URLSearchParams({client_id:JC9,grant_type:"refresh_token",...$})})}async function KC9($){let Y=await $.json();if(!$.ok){let X=typeof Y==="object"&&Y&&"error"in Y?String(Y.error):"Token refresh failed";return[Error(X)]}if(typeof Y!=="object"||Y===null)return[Error("Invalid token response")];if(typeof Y.access_token!=="string")return[Error("Missing access_token in response")];if(Y.token_type!=="Bearer")return[Error("Invalid token_type in response")];if(typeof Y.expires_in!=="number")return[Error("Missing expires_in in response")];return[null,Y]}});var yl0=o((XP$,V_4)=>{var{defineProperty:xl0,getOwnPropertyDescriptor:ZC9,getOwnPropertyNames:UC9}=Object,HC9=Object.prototype.hasOwnProperty,zC9=($,Y)=>{for(var X in Y)xl0($,X,{get:Y[X],enumerable:!0})},VC9=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of UC9(Y))if(!HC9.call($,J)&&J!==X)xl0($,J,{get:()=>Y[J],enumerable:!(G=ZC9(Y,J))||G.enumerable})}return $},FC9=($)=>VC9(xl0({},"__esModule",{value:!0}),$),U_4={};zC9(U_4,{AccessTokenMissingError:()=>H_4,RefreshAccessTokenFailedError:()=>z_4});V_4.exports=FC9(U_4);class H_4 extends Error{constructor(){super("No authentication found. Please log in with the Vercel CLI (vercel login).");this.name="AccessTokenMissingError"}}class z_4 extends Error{constructor($){super("Failed to refresh authentication token.",{cause:$});this.name="RefreshAccessTokenFailedError"}}});var Td=o((GP$,A_4)=>{var{create:LC9,defineProperty:sX0,getOwnPropertyDescriptor:DC9,getOwnPropertyNames:NC9,getPrototypeOf:AC9}=Object,BC9=Object.prototype.hasOwnProperty,OC9=($,Y)=>{for(var X in Y)sX0($,X,{get:Y[X],enumerable:!0})},L_4=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of NC9(Y))if(!BC9.call($,J)&&J!==X)sX0($,J,{get:()=>Y[J],enumerable:!(G=DC9(Y,J))||G.enumerable})}return $},D_4=($,Y,X)=>(X=$!=null?LC9(AC9($)):{},L_4(Y||!$||!$.__esModule?sX0(X,"default",{value:$,enumerable:!0}):X,$)),EC9=($)=>L_4(sX0({},"__esModule",{value:!0}),$),N_4={};OC9(N_4,{assertVercelOidcTokenResponse:()=>bl0,findProjectInfo:()=>PC9,getTokenPayload:()=>jC9,getVercelDataDir:()=>MC9,getVercelOidcToken:()=>qC9,getVercelToken:()=>RC9,isExpired:()=>TC9,loadToken:()=>_C9,saveToken:()=>wC9});A_4.exports=EC9(N_4);var Id=D_4(A0("path")),aM=D_4(A0("fs")),xC=wd(),oX0=ow4(),kC=J_4(),F_4=Z_4(),vC=yl0();function MC9(){let Y=(0,oX0.getUserDataDir)();if(!Y)return null;return Id.join(Y,"com.vercel.cli")}async function RC9($){let Y=(0,kC.readAuthConfig)();if(!Y?.token)throw new vC.AccessTokenMissingError;if((0,kC.isValidAccessToken)(Y,$?.expirationBufferMs))return Y.token;if(!Y.refreshToken)throw(0,kC.writeAuthConfig)({}),new vC.RefreshAccessTokenFailedError("No refresh token available");try{let X=await(0,F_4.refreshTokenRequest)({refresh_token:Y.refreshToken}),[G,J]=await(0,F_4.processTokenResponse)(X);if(G||!J)throw(0,kC.writeAuthConfig)({}),new vC.RefreshAccessTokenFailedError(G);let Q={token:J.access_token,expiresAt:Math.floor(Date.now()/1000)+J.expires_in};if(J.refresh_token)Q.refreshToken=J.refresh_token;return(0,kC.writeAuthConfig)(Q),Q.token}catch(X){if((0,kC.writeAuthConfig)({}),X instanceof vC.AccessTokenMissingError||X instanceof vC.RefreshAccessTokenFailedError)throw X;throw new vC.RefreshAccessTokenFailedError(X)}}async function qC9($,Y,X){let G=`https://api.vercel.com/v1/projects/${Y}/token?source=vercel-oidc-refresh${X?`&teamId=${X}`:""}`,J=await fetch(G,{method:"POST",headers:{Authorization:`Bearer ${$}`}});if(!J.ok)throw new xC.VercelOidcTokenError(`Failed to refresh OIDC token: ${J.statusText}`);let Q=await J.json();return bl0(Q),Q}function bl0($){if(!$||typeof $!=="object")throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in $)||typeof $.token!=="string")throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function PC9(){let $=(0,oX0.findRootDir)();if(!$)throw new xC.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let Y=Id.join($,".vercel","project.json");if(!aM.existsSync(Y))throw new xC.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let X=JSON.parse(aM.readFileSync(Y,"utf8"));if(typeof X.projectId!=="string"&&typeof X.orgId!=="string")throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:X.projectId,teamId:X.orgId}}function wC9($,Y){let X=(0,oX0.getUserDataDir)();if(!X)throw new xC.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let G=Id.join(X,"com.vercel.token",`${Y}.json`),J=JSON.stringify($);aM.mkdirSync(Id.dirname(G),{mode:504,recursive:!0}),aM.writeFileSync(G,J),aM.chmodSync(G,432);return}function _C9($){let Y=(0,oX0.getUserDataDir)();if(!Y)throw new xC.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let X=Id.join(Y,"com.vercel.token",`${$}.json`);if(!aM.existsSync(X))return null;let G=JSON.parse(aM.readFileSync(X,"utf8"));return bl0(G),G}function jC9($){let Y=$.split(".");if(Y.length!==3)throw new xC.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let X=Y[1].replace(/-/g,"+").replace(/_/g,"/"),G=X.padEnd(X.length+(4-X.length%4)%4,"=");return JSON.parse(Buffer.from(G,"base64").toString("utf8"))}function TC9($,Y=0){return $.exp*1000<Date.now()+Y}});var M_4=o((JP$,E_4)=>{var{defineProperty:hl0,getOwnPropertyDescriptor:IC9,getOwnPropertyNames:CC9}=Object,SC9=Object.prototype.hasOwnProperty,kC9=($,Y)=>{for(var X in Y)hl0($,X,{get:Y[X],enumerable:!0})},vC9=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of CC9(Y))if(!SC9.call($,J)&&J!==X)hl0($,J,{get:()=>Y[J],enumerable:!(G=IC9(Y,J))||G.enumerable})}return $},xC9=($)=>vC9(hl0({},"__esModule",{value:!0}),$),O_4={};kC9(O_4,{refreshToken:()=>yC9});E_4.exports=xC9(O_4);var B_4=wd(),VN=Td();async function yC9($){let Y=$?.project,X=$?.team;if(!Y&&!X){let J=(0,VN.findProjectInfo)();Y=J.projectId,X=J.teamId}else if(!Y||!X){let J=(0,VN.findProjectInfo)();Y=Y??J.projectId,X=X??J.teamId}if(!Y)throw new B_4.VercelOidcTokenError("Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`");let G=(0,VN.loadToken)(Y);if(!G||(0,VN.isExpired)((0,VN.getTokenPayload)(G.token),$?.expirationBufferMs)){let J=await(0,VN.getVercelToken)({expirationBufferMs:$?.expirationBufferMs});if(G=await(0,VN.getVercelOidcToken)(J,Y,X),!G)throw new B_4.VercelOidcTokenError("Failed to refresh OIDC token");(0,VN.saveToken)(G,Y)}process.env.VERCEL_OIDC_TOKEN=G.token;return}});var P_4=o((QP$,q_4)=>{var{defineProperty:gl0,getOwnPropertyDescriptor:bC9,getOwnPropertyNames:hC9}=Object,fC9=Object.prototype.hasOwnProperty,gC9=($,Y)=>{for(var X in Y)gl0($,X,{get:Y[X],enumerable:!0})},mC9=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of hC9(Y))if(!fC9.call($,J)&&J!==X)gl0($,J,{get:()=>Y[J],enumerable:!(G=bC9(Y,J))||G.enumerable})}return $},uC9=($)=>mC9(gl0({},"__esModule",{value:!0}),$),R_4={};gC9(R_4,{getVercelOidcToken:()=>cC9,getVercelOidcTokenSync:()=>fl0});q_4.exports=uC9(R_4);var pC9=jl0(),dC9=wd();async function cC9($){let Y="",X;try{Y=fl0()}catch(G){X=G}try{let[{getTokenPayload:G,isExpired:J},{refreshToken:Q}]=await Promise.all([await Promise.resolve().then(() => U6(Td())),await Promise.resolve().then(() => U6(M_4()))]);if(!Y||J(G(Y),$?.expirationBufferMs))await Q($),Y=fl0()}catch(G){let J=X instanceof Error?X.message:"";if(G instanceof Error)J=`${J}
${G.message}`;if(J)throw new dC9.VercelOidcTokenError(J);throw G}return Y}function fl0(){let $=(0,pC9.getContext)().headers?.["x-vercel-oidc-token"]??process.env.VERCEL_OIDC_TOKEN;if(!$)throw Error("The 'x-vercel-oidc-token' header is missing from the request. Do you have the OIDC option enabled in the Vercel project settings?");return $}});var ul0=o((WP$,T_4)=>{var{defineProperty:ml0,getOwnPropertyDescriptor:lC9,getOwnPropertyNames:iC9}=Object,nC9=Object.prototype.hasOwnProperty,rC9=($,Y)=>{for(var X in Y)ml0($,X,{get:Y[X],enumerable:!0})},aC9=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of iC9(Y))if(!nC9.call($,J)&&J!==X)ml0($,J,{get:()=>Y[J],enumerable:!(G=lC9(Y,J))||G.enumerable})}return $},sC9=($)=>aC9(ml0({},"__esModule",{value:!0}),$),j_4={};rC9(j_4,{AccessTokenMissingError:()=>__4.AccessTokenMissingError,RefreshAccessTokenFailedError:()=>__4.RefreshAccessTokenFailedError,getContext:()=>oC9.getContext,getVercelOidcToken:()=>w_4.getVercelOidcToken,getVercelOidcTokenSync:()=>w_4.getVercelOidcTokenSync,getVercelToken:()=>tC9.getVercelToken});T_4.exports=sC9(j_4);var w_4=P_4(),oC9=jl0(),__4=yl0(),tC9=Td()});var dl0=o((Dj4)=>{Object.defineProperty(Dj4,"__esModule",{value:!0});Dj4.VERSION=void 0;Dj4.VERSION="1.9.1"});var Mj4=o((Oj4)=>{Object.defineProperty(Oj4,"__esModule",{value:!0});Oj4.isCompatible=Oj4._makeCompatibilityCheck=void 0;var tS9=dl0(),Aj4=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function Bj4($){let Y=new Set([$]),X=new Set,G=$.match(Aj4);if(!G)return()=>!1;let J={major:+G[1],minor:+G[2],patch:+G[3],prerelease:G[4]};if(J.prerelease!=null)return function(Z){return Z===$};function Q(K){return X.add(K),!1}function W(K){return Y.add(K),!0}return function(Z){if(Y.has(Z))return!0;if(X.has(Z))return!1;let H=Z.match(Aj4);if(!H)return Q(Z);let z={major:+H[1],minor:+H[2],patch:+H[3],prerelease:H[4]};if(z.prerelease!=null)return Q(Z);if(J.major!==z.major)return Q(Z);if(J.major===0){if(J.minor===z.minor&&J.patch<=z.patch)return W(Z);return Q(Z)}if(J.minor<=z.minor)return W(Z);return Q(Z)}}Oj4._makeCompatibilityCheck=Bj4;Oj4.isCompatible=Bj4(tS9.VERSION)});var sM=o((Rj4)=>{Object.defineProperty(Rj4,"__esModule",{value:!0});Rj4.unregisterGlobal=Rj4.getGlobal=Rj4.registerGlobal=void 0;var yC=dl0(),$k9=Mj4(),Yk9=yC.VERSION.split(".")[0],Cd=Symbol.for(`opentelemetry.js.api.${Yk9}`),Sd=typeof globalThis==="object"?globalThis:typeof self==="object"?self:typeof window==="object"?window:typeof global==="object"?global:{};function Xk9($,Y,X,G=!1){var J;let Q=Sd[Cd]=(J=Sd[Cd])!==null&&J!==void 0?J:{version:yC.VERSION};if(!G&&Q[$]){let W=Error(`@opentelemetry/api: Attempted duplicate registration of API: ${$}`);return X.error(W.stack||W.message),!1}if(Q.version!==yC.VERSION){let W=Error(`@opentelemetry/api: Registration of version v${Q.version} for ${$} does not match previously registered API v${yC.VERSION}`);return X.error(W.stack||W.message),!1}return Q[$]=Y,X.debug(`@opentelemetry/api: Registered a global for ${$} v${yC.VERSION}.`),!0}Rj4.registerGlobal=Xk9;function Gk9($){var Y,X;let G=(Y=Sd[Cd])===null||Y===void 0?void 0:Y.version;if(!G||!(0,$k9.isCompatible)(G))return;return(X=Sd[Cd])===null||X===void 0?void 0:X[$]}Rj4.getGlobal=Gk9;function Jk9($,Y){Y.debug(`@opentelemetry/api: Unregistering a global for ${$} v${yC.VERSION}.`);let X=Sd[Cd];if(X)delete X[$]}Rj4.unregisterGlobal=Jk9});var jj4=o((wj4)=>{Object.defineProperty(wj4,"__esModule",{value:!0});wj4.DiagComponentLogger=void 0;var Kk9=sM();class Pj4{constructor($){this._namespace=$.namespace||"DiagComponentLogger"}debug(...$){return kd("debug",this._namespace,$)}error(...$){return kd("error",this._namespace,$)}info(...$){return kd("info",this._namespace,$)}warn(...$){return kd("warn",this._namespace,$)}verbose(...$){return kd("verbose",this._namespace,$)}}wj4.DiagComponentLogger=Pj4;function kd($,Y,X){let G=(0,Kk9.getGlobal)("diag");if(!G)return;return G[$](Y,...X)}});var eX0=o((Tj4)=>{Object.defineProperty(Tj4,"__esModule",{value:!0});Tj4.DiagLogLevel=void 0;var Zk9;(function($){$[$.NONE=0]="NONE",$[$.ERROR=30]="ERROR",$[$.WARN=50]="WARN",$[$.INFO=60]="INFO",$[$.DEBUG=70]="DEBUG",$[$.VERBOSE=80]="VERBOSE",$[$.ALL=9999]="ALL"})(Zk9=Tj4.DiagLogLevel||(Tj4.DiagLogLevel={}))});var Sj4=o((Ij4)=>{Object.defineProperty(Ij4,"__esModule",{value:!0});Ij4.createLogLevelDiagLogger=void 0;var _V=eX0();function Uk9($,Y){if($<_V.DiagLogLevel.NONE)$=_V.DiagLogLevel.NONE;else if($>_V.DiagLogLevel.ALL)$=_V.DiagLogLevel.ALL;Y=Y||{};function X(G,J){let Q=Y[G];if(typeof Q==="function"&&$>=J)return Q.bind(Y);return function(){}}return{error:X("error",_V.DiagLogLevel.ERROR),warn:X("warn",_V.DiagLogLevel.WARN),info:X("info",_V.DiagLogLevel.INFO),debug:X("debug",_V.DiagLogLevel.DEBUG),verbose:X("verbose",_V.DiagLogLevel.VERBOSE)}}Ij4.createLogLevelDiagLogger=Uk9});var oM=o((vj4)=>{Object.defineProperty(vj4,"__esModule",{value:!0});vj4.DiagAPI=void 0;var Hk9=jj4(),zk9=Sj4(),kj4=eX0(),$G0=sM(),Vk9="diag";class ll0{static instance(){if(!this._instance)this._instance=new ll0;return this._instance}constructor(){function $(G){return function(...J){let Q=(0,$G0.getGlobal)("diag");if(!Q)return;return Q[G](...J)}}let Y=this,X=(G,J={logLevel:kj4.DiagLogLevel.INFO})=>{var Q,W,K;if(G===Y){let z=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return Y.error((Q=z.stack)!==null&&Q!==void 0?Q:z.message),!1}if(typeof J==="number")J={logLevel:J};let Z=(0,$G0.getGlobal)("diag"),H=(0,zk9.createLogLevelDiagLogger)((W=J.logLevel)!==null&&W!==void 0?W:kj4.DiagLogLevel.INFO,G);if(Z&&!J.suppressOverrideMessage){let z=(K=Error().stack)!==null&&K!==void 0?K:"<failed to generate stacktrace>";Z.warn(`Current logger will be overwritten from ${z}`),H.warn(`Current logger will overwrite one already registered from ${z}`)}return(0,$G0.registerGlobal)("diag",H,Y,!0)};Y.setLogger=X,Y.disable=()=>{(0,$G0.unregisterGlobal)(Vk9,Y)},Y.createComponentLogger=(G)=>{return new Hk9.DiagComponentLogger(G)},Y.verbose=$("verbose"),Y.debug=$("debug"),Y.info=$("info"),Y.warn=$("warn"),Y.error=$("error")}}vj4.DiagAPI=ll0});var hj4=o((yj4)=>{Object.defineProperty(yj4,"__esModule",{value:!0});yj4.BaggageImpl=void 0;class bC{constructor($){this._entries=$?new Map($):new Map}getEntry($){let Y=this._entries.get($);if(!Y)return;return Object.assign({},Y)}getAllEntries(){return Array.from(this._entries.entries())}setEntry($,Y){let X=new bC(this._entries);return X._entries.set($,Y),X}removeEntry($){let Y=new bC(this._entries);return Y._entries.delete($),Y}removeEntries(...$){let Y=new bC(this._entries);for(let X of $)Y._entries.delete(X);return Y}clear(){return new bC}}yj4.BaggageImpl=bC});var mj4=o((fj4)=>{Object.defineProperty(fj4,"__esModule",{value:!0});fj4.baggageEntryMetadataSymbol=void 0;fj4.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")});var il0=o((uj4)=>{Object.defineProperty(uj4,"__esModule",{value:!0});uj4.baggageEntryMetadataFromString=uj4.createBaggage=void 0;var Fk9=oM(),Lk9=hj4(),Dk9=mj4(),Nk9=Fk9.DiagAPI.instance();function Ak9($={}){return new Lk9.BaggageImpl(new Map(Object.entries($)))}uj4.createBaggage=Ak9;function Bk9($){if(typeof $!=="string")Nk9.error(`Cannot create baggage metadata from unknown type: ${typeof $}`),$="";return{__TYPE__:Dk9.baggageEntryMetadataSymbol,toString(){return $}}}uj4.baggageEntryMetadataFromString=Bk9});var vd=o((dj4)=>{Object.defineProperty(dj4,"__esModule",{value:!0});dj4.ROOT_CONTEXT=dj4.createContextKey=void 0;function Ek9($){return Symbol.for($)}dj4.createContextKey=Ek9;class YG0{constructor($){let Y=this;Y._currentContext=$?new Map($):new Map,Y.getValue=(X)=>Y._currentContext.get(X),Y.setValue=(X,G)=>{let J=new YG0(Y._currentContext);return J._currentContext.set(X,G),J},Y.deleteValue=(X)=>{let G=new YG0(Y._currentContext);return G._currentContext.delete(X),G}}}dj4.ROOT_CONTEXT=new YG0});var rj4=o((ij4)=>{Object.defineProperty(ij4,"__esModule",{value:!0});ij4.DiagConsoleLogger=ij4._originalConsoleMethods=void 0;var nl0=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];ij4._originalConsoleMethods={};if(typeof console<"u"){let $=["error","warn","info","debug","trace","log"];for(let Y of $)if(typeof console[Y]==="function")ij4._originalConsoleMethods[Y]=console[Y]}class lj4{constructor(){function $(Y){return function(...X){let G=ij4._originalConsoleMethods[Y];if(typeof G!=="function")G=ij4._originalConsoleMethods.log;if(typeof G!=="function"&&console){if(G=console[Y],typeof G!=="function")G=console.log}if(typeof G==="function")return G.apply(console,X)}}for(let Y=0;Y<nl0.length;Y++)this[nl0[Y].n]=$(nl0[Y].c)}}ij4.DiagConsoleLogger=lj4});var Xi0=o((aj4)=>{Object.defineProperty(aj4,"__esModule",{value:!0});aj4.createNoopMeter=aj4.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=aj4.NOOP_OBSERVABLE_GAUGE_METRIC=aj4.NOOP_OBSERVABLE_COUNTER_METRIC=aj4.NOOP_UP_DOWN_COUNTER_METRIC=aj4.NOOP_HISTOGRAM_METRIC=aj4.NOOP_GAUGE_METRIC=aj4.NOOP_COUNTER_METRIC=aj4.NOOP_METER=aj4.NoopObservableUpDownCounterMetric=aj4.NoopObservableGaugeMetric=aj4.NoopObservableCounterMetric=aj4.NoopObservableMetric=aj4.NoopHistogramMetric=aj4.NoopGaugeMetric=aj4.NoopUpDownCounterMetric=aj4.NoopCounterMetric=aj4.NoopMetric=aj4.NoopMeter=void 0;class rl0{constructor(){}createGauge($,Y){return aj4.NOOP_GAUGE_METRIC}createHistogram($,Y){return aj4.NOOP_HISTOGRAM_METRIC}createCounter($,Y){return aj4.NOOP_COUNTER_METRIC}createUpDownCounter($,Y){return aj4.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge($,Y){return aj4.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter($,Y){return aj4.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter($,Y){return aj4.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback($,Y){}removeBatchObservableCallback($){}}aj4.NoopMeter=rl0;class hC{}aj4.NoopMetric=hC;class al0 extends hC{add($,Y){}}aj4.NoopCounterMetric=al0;class sl0 extends hC{add($,Y){}}aj4.NoopUpDownCounterMetric=sl0;class ol0 extends hC{record($,Y){}}aj4.NoopGaugeMetric=ol0;class tl0 extends hC{record($,Y){}}aj4.NoopHistogramMetric=tl0;class xd{addCallback($){}removeCallback($){}}aj4.NoopObservableMetric=xd;class el0 extends xd{}aj4.NoopObservableCounterMetric=el0;class $i0 extends xd{}aj4.NoopObservableGaugeMetric=$i0;class Yi0 extends xd{}aj4.NoopObservableUpDownCounterMetric=Yi0;aj4.NOOP_METER=new rl0;aj4.NOOP_COUNTER_METRIC=new al0;aj4.NOOP_GAUGE_METRIC=new ol0;aj4.NOOP_HISTOGRAM_METRIC=new tl0;aj4.NOOP_UP_DOWN_COUNTER_METRIC=new sl0;aj4.NOOP_OBSERVABLE_COUNTER_METRIC=new el0;aj4.NOOP_OBSERVABLE_GAUGE_METRIC=new $i0;aj4.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new Yi0;function Rk9(){return aj4.NOOP_METER}aj4.createNoopMeter=Rk9});var WT4=o((QT4)=>{Object.defineProperty(QT4,"__esModule",{value:!0});QT4.ValueType=void 0;var vk9;(function($){$[$.INT=0]="INT",$[$.DOUBLE=1]="DOUBLE"})(vk9=QT4.ValueType||(QT4.ValueType={}))});var Ji0=o((KT4)=>{Object.defineProperty(KT4,"__esModule",{value:!0});KT4.defaultTextMapSetter=KT4.defaultTextMapGetter=void 0;KT4.defaultTextMapGetter={get($,Y){if($==null)return;return $[Y]},keys($){if($==null)return[];return Object.keys($)}};KT4.defaultTextMapSetter={set($,Y,X){if($==null)return;$[Y]=X}}});var VT4=o((HT4)=>{Object.defineProperty(HT4,"__esModule",{value:!0});HT4.NoopContextManager=void 0;var yk9=vd();class UT4{active(){return yk9.ROOT_CONTEXT}with($,Y,X,...G){return Y.call(X,...G)}bind($,Y){return Y}enable(){return this}disable(){return this}}HT4.NoopContextManager=UT4});var yd=o((LT4)=>{Object.defineProperty(LT4,"__esModule",{value:!0});LT4.ContextAPI=void 0;var bk9=VT4(),Qi0=sM(),FT4=oM(),Wi0="context",hk9=new bk9.NoopContextManager;class Ki0{constructor(){}static getInstance(){if(!this._instance)this._instance=new Ki0;return this._instance}setGlobalContextManager($){return(0,Qi0.registerGlobal)(Wi0,$,FT4.DiagAPI.instance())}active(){return this._getContextManager().active()}with($,Y,X,...G){return this._getContextManager().with($,Y,X,...G)}bind($,Y){return this._getContextManager().bind($,Y)}_getContextManager(){return(0,Qi0.getGlobal)(Wi0)||hk9}disable(){this._getContextManager().disable(),(0,Qi0.unregisterGlobal)(Wi0,FT4.DiagAPI.instance())}}LT4.ContextAPI=Ki0});var Ui0=o((NT4)=>{Object.defineProperty(NT4,"__esModule",{value:!0});NT4.TraceFlags=void 0;var fk9;(function($){$[$.NONE=0]="NONE",$[$.SAMPLED=1]="SAMPLED"})(fk9=NT4.TraceFlags||(NT4.TraceFlags={}))});var GG0=o((AT4)=>{Object.defineProperty(AT4,"__esModule",{value:!0});AT4.INVALID_SPAN_CONTEXT=AT4.INVALID_TRACEID=AT4.INVALID_SPANID=void 0;var gk9=Ui0();AT4.INVALID_SPANID="0000000000000000";AT4.INVALID_TRACEID="00000000000000000000000000000000";AT4.INVALID_SPAN_CONTEXT={traceId:AT4.INVALID_TRACEID,spanId:AT4.INVALID_SPANID,traceFlags:gk9.TraceFlags.NONE}});var JG0=o((RT4)=>{Object.defineProperty(RT4,"__esModule",{value:!0});RT4.NonRecordingSpan=void 0;var mk9=GG0();class MT4{constructor($=mk9.INVALID_SPAN_CONTEXT){this._spanContext=$}spanContext(){return this._spanContext}setAttribute($,Y){return this}setAttributes($){return this}addEvent($,Y){return this}addLink($){return this}addLinks($){return this}setStatus($){return this}updateName($){return this}end($){}isRecording(){return!1}recordException($,Y){}}RT4.NonRecordingSpan=MT4});var Vi0=o((wT4)=>{Object.defineProperty(wT4,"__esModule",{value:!0});wT4.getSpanContext=wT4.setSpanContext=wT4.deleteSpan=wT4.setSpan=wT4.getActiveSpan=wT4.getSpan=void 0;var uk9=vd(),pk9=JG0(),dk9=yd(),Hi0=(0,uk9.createContextKey)("OpenTelemetry Context Key SPAN");function zi0($){return $.getValue(Hi0)||void 0}wT4.getSpan=zi0;function ck9(){return zi0(dk9.ContextAPI.getInstance().active())}wT4.getActiveSpan=ck9;function PT4($,Y){return $.setValue(Hi0,Y)}wT4.setSpan=PT4;function lk9($){return $.deleteValue(Hi0)}wT4.deleteSpan=lk9;function ik9($,Y){return PT4($,new pk9.NonRecordingSpan(Y))}wT4.setSpanContext=ik9;function nk9($){var Y;return(Y=zi0($))===null||Y===void 0?void 0:Y.spanContext()}wT4.getSpanContext=nk9});var WG0=o((ST4)=>{Object.defineProperty(ST4,"__esModule",{value:!0});ST4.wrapSpanContext=ST4.isSpanContextValid=ST4.isValidSpanId=ST4.isValidTraceId=void 0;var jT4=GG0(),ek9=JG0(),QG0=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1]);function TT4($,Y){if(typeof $!=="string"||$.length!==Y)return!1;let X=0;for(let G=0;G<$.length;G+=4)X+=(QG0[$.charCodeAt(G)]|0)+(QG0[$.charCodeAt(G+1)]|0)+(QG0[$.charCodeAt(G+2)]|0)+(QG0[$.charCodeAt(G+3)]|0);return X===Y}function IT4($){return TT4($,32)&&$!==jT4.INVALID_TRACEID}ST4.isValidTraceId=IT4;function CT4($){return TT4($,16)&&$!==jT4.INVALID_SPANID}ST4.isValidSpanId=CT4;function $v9($){return IT4($.traceId)&&CT4($.spanId)}ST4.isSpanContextValid=$v9;function Yv9($){return new ek9.NonRecordingSpan($)}ST4.wrapSpanContext=Yv9});var Di0=o((yT4)=>{Object.defineProperty(yT4,"__esModule",{value:!0});yT4.NoopTracer=void 0;var Qv9=yd(),vT4=Vi0(),Fi0=JG0(),Wv9=WG0(),Li0=Qv9.ContextAPI.getInstance();class xT4{startSpan($,Y,X=Li0.active()){if(Boolean(Y===null||Y===void 0?void 0:Y.root))return new Fi0.NonRecordingSpan;let J=X&&(0,vT4.getSpanContext)(X);if(Kv9(J)&&(0,Wv9.isSpanContextValid)(J))return new Fi0.NonRecordingSpan(J);else return new Fi0.NonRecordingSpan}startActiveSpan($,Y,X,G){let J,Q,W;if(arguments.length<2)return;else if(arguments.length===2)W=Y;else if(arguments.length===3)J=Y,W=X;else J=Y,Q=X,W=G;let K=Q!==null&&Q!==void 0?Q:Li0.active(),Z=this.startSpan($,J,K),H=(0,vT4.setSpan)(K,Z);return Li0.with(H,W,void 0,Z)}}yT4.NoopTracer=xT4;function Kv9($){return $!==null&&typeof $==="object"&&"spanId"in $&&typeof $.spanId==="string"&&"traceId"in $&&typeof $.traceId==="string"&&"traceFlags"in $&&typeof $.traceFlags==="number"}});var Ni0=o((fT4)=>{Object.defineProperty(fT4,"__esModule",{value:!0});fT4.ProxyTracer=void 0;var Zv9=Di0(),Uv9=new Zv9.NoopTracer;class hT4{constructor($,Y,X,G){this._provider=$,this.name=Y,this.version=X,this.options=G}startSpan($,Y,X){return this._getTracer().startSpan($,Y,X)}startActiveSpan($,Y,X,G){let J=this._getTracer();return Reflect.apply(J.startActiveSpan,J,arguments)}_getTracer(){if(this._delegate)return this._delegate;let $=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!$)return Uv9;return this._delegate=$,this._delegate}}fT4.ProxyTracer=hT4});var dT4=o((uT4)=>{Object.defineProperty(uT4,"__esModule",{value:!0});uT4.NoopTracerProvider=void 0;var Hv9=Di0();class mT4{getTracer($,Y,X){return new Hv9.NoopTracer}}uT4.NoopTracerProvider=mT4});var Ai0=o((lT4)=>{Object.defineProperty(lT4,"__esModule",{value:!0});lT4.ProxyTracerProvider=void 0;var zv9=Ni0(),Vv9=dT4(),Fv9=new Vv9.NoopTracerProvider;class cT4{getTracer($,Y,X){var G;return(G=this.getDelegateTracer($,Y,X))!==null&&G!==void 0?G:new zv9.ProxyTracer(this,$,Y,X)}getDelegate(){var $;return($=this._delegate)!==null&&$!==void 0?$:Fv9}setDelegate($){this._delegate=$}getDelegateTracer($,Y,X){var G;return(G=this._delegate)===null||G===void 0?void 0:G.getTracer($,Y,X)}}lT4.ProxyTracerProvider=cT4});var rT4=o((nT4)=>{Object.defineProperty(nT4,"__esModule",{value:!0});nT4.SamplingDecision=void 0;var Lv9;(function($){$[$.NOT_RECORD=0]="NOT_RECORD",$[$.RECORD=1]="RECORD",$[$.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Lv9=nT4.SamplingDecision||(nT4.SamplingDecision={}))});var sT4=o((aT4)=>{Object.defineProperty(aT4,"__esModule",{value:!0});aT4.SpanKind=void 0;var Dv9;(function($){$[$.INTERNAL=0]="INTERNAL",$[$.SERVER=1]="SERVER",$[$.CLIENT=2]="CLIENT",$[$.PRODUCER=3]="PRODUCER",$[$.CONSUMER=4]="CONSUMER"})(Dv9=aT4.SpanKind||(aT4.SpanKind={}))});var tT4=o((oT4)=>{Object.defineProperty(oT4,"__esModule",{value:!0});oT4.SpanStatusCode=void 0;var Nv9;(function($){$[$.UNSET=0]="UNSET",$[$.OK=1]="OK",$[$.ERROR=2]="ERROR"})(Nv9=oT4.SpanStatusCode||(oT4.SpanStatusCode={}))});var YI4=o((eT4)=>{Object.defineProperty(eT4,"__esModule",{value:!0});eT4.validateValue=eT4.validateKey=void 0;var Mi0="[_0-9a-z-*/]",Av9=`[a-z]${Mi0}{0,255}`,Bv9=`[a-z0-9]${Mi0}{0,240}@[a-z]${Mi0}{0,13}`,Ov9=new RegExp(`^(?:${Av9}|${Bv9})$`),Ev9=/^[ -~]{0,255}[!-~]$/,Mv9=/,|=/;function Rv9($){return Ov9.test($)}eT4.validateKey=Rv9;function qv9($){return Ev9.test($)&&!Mv9.test($)}eT4.validateValue=qv9});var ZI4=o((WI4)=>{Object.defineProperty(WI4,"__esModule",{value:!0});WI4.TraceStateImpl=void 0;var XI4=YI4(),GI4=32,wv9=512,JI4=",",QI4="=";class Ri0{constructor($){if(this._internalState=new Map,$)this._parse($)}set($,Y){let X=this._clone();if(X._internalState.has($))X._internalState.delete($);return X._internalState.set($,Y),X}unset($){let Y=this._clone();return Y._internalState.delete($),Y}get($){return this._internalState.get($)}serialize(){return Array.from(this._internalState.keys()).reduceRight(($,Y)=>{return $.push(Y+QI4+this.get(Y)),$},[]).join(JI4)}_parse($){if($.length>wv9)return;if(this._internalState=$.split(JI4).reduceRight((Y,X)=>{let G=X.trim(),J=G.indexOf(QI4);if(J!==-1){let Q=G.slice(0,J),W=G.slice(J+1,X.length);if((0,XI4.validateKey)(Q)&&(0,XI4.validateValue)(W))Y.set(Q,W)}return Y},new Map),this._internalState.size>GI4)this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,GI4))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let $=new Ri0;return $._internalState=new Map(this._internalState),$}}WI4.TraceStateImpl=Ri0});var zI4=o((UI4)=>{Object.defineProperty(UI4,"__esModule",{value:!0});UI4.createTraceState=void 0;var _v9=ZI4();function jv9($){return new _v9.TraceStateImpl($)}UI4.createTraceState=jv9});var LI4=o((VI4)=>{Object.defineProperty(VI4,"__esModule",{value:!0});VI4.context=void 0;var Tv9=yd();VI4.context=Tv9.ContextAPI.getInstance()});var AI4=o((DI4)=>{Object.defineProperty(DI4,"__esModule",{value:!0});DI4.diag=void 0;var Iv9=oM();DI4.diag=Iv9.DiagAPI.instance()});var EI4=o((BI4)=>{Object.defineProperty(BI4,"__esModule",{value:!0});BI4.NOOP_METER_PROVIDER=BI4.NoopMeterProvider=void 0;var Cv9=Xi0();class qi0{getMeter($,Y,X){return Cv9.NOOP_METER}}BI4.NoopMeterProvider=qi0;BI4.NOOP_METER_PROVIDER=new qi0});var PI4=o((RI4)=>{Object.defineProperty(RI4,"__esModule",{value:!0});RI4.MetricsAPI=void 0;var kv9=EI4(),Pi0=sM(),MI4=oM(),wi0="metrics";class _i0{constructor(){}static getInstance(){if(!this._instance)this._instance=new _i0;return this._instance}setGlobalMeterProvider($){return(0,Pi0.registerGlobal)(wi0,$,MI4.DiagAPI.instance())}getMeterProvider(){return(0,Pi0.getGlobal)(wi0)||kv9.NOOP_METER_PROVIDER}getMeter($,Y,X){return this.getMeterProvider().getMeter($,Y,X)}disable(){(0,Pi0.unregisterGlobal)(wi0,MI4.DiagAPI.instance())}}RI4.MetricsAPI=_i0});var jI4=o((wI4)=>{Object.defineProperty(wI4,"__esModule",{value:!0});wI4.metrics=void 0;var vv9=PI4();wI4.metrics=vv9.MetricsAPI.getInstance()});var SI4=o((II4)=>{Object.defineProperty(II4,"__esModule",{value:!0});II4.NoopTextMapPropagator=void 0;class TI4{inject($,Y){}extract($,Y){return $}fields(){return[]}}II4.NoopTextMapPropagator=TI4});var yI4=o((vI4)=>{Object.defineProperty(vI4,"__esModule",{value:!0});vI4.deleteBaggage=vI4.setBaggage=vI4.getActiveBaggage=vI4.getBaggage=void 0;var xv9=yd(),yv9=vd(),ji0=(0,yv9.createContextKey)("OpenTelemetry Baggage Key");function kI4($){return $.getValue(ji0)||void 0}vI4.getBaggage=kI4;function bv9(){return kI4(xv9.ContextAPI.getInstance().active())}vI4.getActiveBaggage=bv9;function hv9($,Y){return $.setValue(ji0,Y)}vI4.setBaggage=hv9;function fv9($){return $.deleteValue(ji0)}vI4.deleteBaggage=fv9});var mI4=o((fI4)=>{Object.defineProperty(fI4,"__esModule",{value:!0});fI4.PropagationAPI=void 0;var Ti0=sM(),pv9=SI4(),bI4=Ji0(),KG0=yI4(),dv9=il0(),hI4=oM(),Ii0="propagation",cv9=new pv9.NoopTextMapPropagator;class Ci0{constructor(){this.createBaggage=dv9.createBaggage,this.getBaggage=KG0.getBaggage,this.getActiveBaggage=KG0.getActiveBaggage,this.setBaggage=KG0.setBaggage,this.deleteBaggage=KG0.deleteBaggage}static getInstance(){if(!this._instance)this._instance=new Ci0;return this._instance}setGlobalPropagator($){return(0,Ti0.registerGlobal)(Ii0,$,hI4.DiagAPI.instance())}inject($,Y,X=bI4.defaultTextMapSetter){return this._getGlobalPropagator().inject($,Y,X)}extract($,Y,X=bI4.defaultTextMapGetter){return this._getGlobalPropagator().extract($,Y,X)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,Ti0.unregisterGlobal)(Ii0,hI4.DiagAPI.instance())}_getGlobalPropagator(){return(0,Ti0.getGlobal)(Ii0)||cv9}}fI4.PropagationAPI=Ci0});var dI4=o((uI4)=>{Object.defineProperty(uI4,"__esModule",{value:!0});uI4.propagation=void 0;var lv9=mI4();uI4.propagation=lv9.PropagationAPI.getInstance()});var aI4=o((nI4)=>{Object.defineProperty(nI4,"__esModule",{value:!0});nI4.TraceAPI=void 0;var Si0=sM(),cI4=Ai0(),lI4=WG0(),fC=Vi0(),iI4=oM(),ki0="trace";class vi0{constructor(){this._proxyTracerProvider=new cI4.ProxyTracerProvider,this.wrapSpanContext=lI4.wrapSpanContext,this.isSpanContextValid=lI4.isSpanContextValid,this.deleteSpan=fC.deleteSpan,this.getSpan=fC.getSpan,this.getActiveSpan=fC.getActiveSpan,this.getSpanContext=fC.getSpanContext,this.setSpan=fC.setSpan,this.setSpanContext=fC.setSpanContext}static getInstance(){if(!this._instance)this._instance=new vi0;return this._instance}setGlobalTracerProvider($){let Y=(0,Si0.registerGlobal)(ki0,this._proxyTracerProvider,iI4.DiagAPI.instance());if(Y)this._proxyTracerProvider.setDelegate($);return Y}getTracerProvider(){return(0,Si0.getGlobal)(ki0)||this._proxyTracerProvider}getTracer($,Y){return this.getTracerProvider().getTracer($,Y)}disable(){(0,Si0.unregisterGlobal)(ki0,iI4.DiagAPI.instance()),this._proxyTracerProvider=new cI4.ProxyTracerProvider}}nI4.TraceAPI=vi0});var tI4=o((sI4)=>{Object.defineProperty(sI4,"__esModule",{value:!0});sI4.trace=void 0;var iv9=aI4();sI4.trace=iv9.TraceAPI.getInstance()});var bi0=o((J5)=>{Object.defineProperty(J5,"__esModule",{value:!0});J5.trace=J5.propagation=J5.metrics=J5.diag=J5.context=J5.INVALID_SPAN_CONTEXT=J5.INVALID_TRACEID=J5.INVALID_SPANID=J5.isValidSpanId=J5.isValidTraceId=J5.isSpanContextValid=J5.createTraceState=J5.TraceFlags=J5.SpanStatusCode=J5.SpanKind=J5.SamplingDecision=J5.ProxyTracerProvider=J5.ProxyTracer=J5.defaultTextMapSetter=J5.defaultTextMapGetter=J5.ValueType=J5.createNoopMeter=J5.DiagLogLevel=J5.DiagConsoleLogger=J5.ROOT_CONTEXT=J5.createContextKey=J5.baggageEntryMetadataFromString=void 0;var nv9=il0();Object.defineProperty(J5,"baggageEntryMetadataFromString",{enumerable:!0,get:function(){return nv9.baggageEntryMetadataFromString}});var eI4=vd();Object.defineProperty(J5,"createContextKey",{enumerable:!0,get:function(){return eI4.createContextKey}});Object.defineProperty(J5,"ROOT_CONTEXT",{enumerable:!0,get:function(){return eI4.ROOT_CONTEXT}});var rv9=rj4();Object.defineProperty(J5,"DiagConsoleLogger",{enumerable:!0,get:function(){return rv9.DiagConsoleLogger}});var av9=eX0();Object.defineProperty(J5,"DiagLogLevel",{enumerable:!0,get:function(){return av9.DiagLogLevel}});var sv9=Xi0();Object.defineProperty(J5,"createNoopMeter",{enumerable:!0,get:function(){return sv9.createNoopMeter}});var ov9=WT4();Object.defineProperty(J5,"ValueType",{enumerable:!0,get:function(){return ov9.ValueType}});var $C4=Ji0();Object.defineProperty(J5,"defaultTextMapGetter",{enumerable:!0,get:function(){return $C4.defaultTextMapGetter}});Object.defineProperty(J5,"defaultTextMapSetter",{enumerable:!0,get:function(){return $C4.defaultTextMapSetter}});var tv9=Ni0();Object.defineProperty(J5,"ProxyTracer",{enumerable:!0,get:function(){return tv9.ProxyTracer}});var ev9=Ai0();Object.defineProperty(J5,"ProxyTracerProvider",{enumerable:!0,get:function(){return ev9.ProxyTracerProvider}});var $x9=rT4();Object.defineProperty(J5,"SamplingDecision",{enumerable:!0,get:function(){return $x9.SamplingDecision}});var Yx9=sT4();Object.defineProperty(J5,"SpanKind",{enumerable:!0,get:function(){return Yx9.SpanKind}});var Xx9=tT4();Object.defineProperty(J5,"SpanStatusCode",{enumerable:!0,get:function(){return Xx9.SpanStatusCode}});var Gx9=Ui0();Object.defineProperty(J5,"TraceFlags",{enumerable:!0,get:function(){return Gx9.TraceFlags}});var Jx9=zI4();Object.defineProperty(J5,"createTraceState",{enumerable:!0,get:function(){return Jx9.createTraceState}});var xi0=WG0();Object.defineProperty(J5,"isSpanContextValid",{enumerable:!0,get:function(){return xi0.isSpanContextValid}});Object.defineProperty(J5,"isValidTraceId",{enumerable:!0,get:function(){return xi0.isValidTraceId}});Object.defineProperty(J5,"isValidSpanId",{enumerable:!0,get:function(){return xi0.isValidSpanId}});var yi0=GG0();Object.defineProperty(J5,"INVALID_SPANID",{enumerable:!0,get:function(){return yi0.INVALID_SPANID}});Object.defineProperty(J5,"INVALID_TRACEID",{enumerable:!0,get:function(){return yi0.INVALID_TRACEID}});Object.defineProperty(J5,"INVALID_SPAN_CONTEXT",{enumerable:!0,get:function(){return yi0.INVALID_SPAN_CONTEXT}});var YC4=LI4();Object.defineProperty(J5,"context",{enumerable:!0,get:function(){return YC4.context}});var XC4=AI4();Object.defineProperty(J5,"diag",{enumerable:!0,get:function(){return XC4.diag}});var GC4=jI4();Object.defineProperty(J5,"metrics",{enumerable:!0,get:function(){return GC4.metrics}});var JC4=dI4();Object.defineProperty(J5,"propagation",{enumerable:!0,get:function(){return JC4.propagation}});var QC4=tI4();Object.defineProperty(J5,"trace",{enumerable:!0,get:function(){return QC4.trace}});J5.default={context:YC4.context,diag:XC4.diag,metrics:GC4.metrics,propagation:JC4.propagation,trace:QC4.trace}});var dG0=($,Y,X)=>{return(G,J)=>{let Q=-1;return W(0);async function W(K){if(K<=Q)throw Error("next() called multiple times");Q=K;let Z,H=!1,z;if($[K])z=$[K][0][0],G.req.routeIndex=K;else z=K===$.length&&J||void 0;if(z)try{Z=await z(G,()=>W(K+1))}catch(V){if(V instanceof Error&&Y)G.error=V,Z=await Y(V,G),H=!0;else throw V}else if(G.finalized===!1&&X)Z=await X(G);if(Z&&(G.finalized===!1||H))G.res=Z;return G}}};var v0=class extends Error{res;status;constructor($=500,Y){super(Y?.message,{cause:Y?.cause});this.res=Y?.res,this.status=$}getResponse(){if(this.res)return new Response(this.res.body,{status:this.status,headers:this.res.headers});return new Response(this.message,{status:this.status})}};var rn0=Symbol();var an0=async($,Y=Object.create(null))=>{let{all:X=!1,dot:G=!1}=Y,Q=($ instanceof Kc?$.raw.headers:$.headers).get("Content-Type");if(Q?.startsWith("multipart/form-data")||Q?.startsWith("application/x-www-form-urlencoded"))return Db4($,{all:X,dot:G});return{}};async function Db4($,Y){let X=await $.formData();if(X)return Nb4(X,Y);return{}}function Nb4($,Y){let X=Object.create(null);if($.forEach((G,J)=>{if(!(Y.all||J.endsWith("[]")))X[J]=G;else Ab4(X,J,G)}),Y.dot)Object.entries(X).forEach(([G,J])=>{if(G.includes("."))Bb4(X,G,J),delete X[G]});return X}var Ab4=($,Y,X)=>{if($[Y]!==void 0)if(Array.isArray($[Y]))$[Y].push(X);else $[Y]=[$[Y],X];else if(!Y.endsWith("[]"))$[Y]=X;else $[Y]=[X]},Bb4=($,Y,X)=>{if(/(?:^|\.)__proto__\./.test(Y))return;let G=$,J=Y.split(".");J.forEach((Q,W)=>{if(W===J.length-1)G[Q]=X;else{if(!G[Q]||typeof G[Q]!=="object"||Array.isArray(G[Q])||G[Q]instanceof File)G[Q]=Object.create(null);G=G[Q]}})};var lG0=($)=>{let Y=$.split("/");if(Y[0]==="")Y.shift();return Y},sn0=($)=>{let{groups:Y,path:X}=Ob4($),G=lG0(X);return Eb4(G,Y)},Ob4=($)=>{let Y=[];return $=$.replace(/\{[^}]+\}/g,(X,G)=>{let J=`@${G}`;return Y.push([J,X]),J}),{groups:Y,path:$}},Eb4=($,Y)=>{for(let X=Y.length-1;X>=0;X--){let[G]=Y[X];for(let J=$.length-1;J>=0;J--)if($[J].includes(G)){$[J]=$[J].replace(G,Y[X][1]);break}}return $},Zc={},on0=($,Y)=>{if($==="*")return"*";let X=$.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/);if(X){let G=`${$}#${Y}`;if(!Zc[G])if(X[2])Zc[G]=Y&&Y[0]!==":"&&Y[0]!=="*"?[G,X[1],new RegExp(`^${X[2]}(?=/${Y})`)]:[$,X[1],new RegExp(`^${X[2]}$`)];else Zc[G]=[$,X[1],!0];return Zc[G]}return null},UR=($,Y)=>{try{return Y($)}catch{return $.replace(/(?:%[0-9A-Fa-f]{2})+/g,(X)=>{try{return Y(X)}catch{return X}})}},iG0=($)=>UR($,decodeURI),nG0=($)=>{let Y=$.url,X=Y.indexOf("/",Y.indexOf(":")+4),G=X;for(;G<Y.length;G++){let J=Y.charCodeAt(G);if(J===37){let Q=Y.indexOf("?",G),W=Y.indexOf("#",G),K=Q===-1?W===-1?void 0:W:W===-1?Q:Math.min(Q,W),Z=Y.slice(X,K);return iG0(Z.includes("%25")?Z.replace(/%25/g,"%2525"):Z)}else if(J===63||J===35)break}return Y.slice(X,G)};var tn0=($)=>{let Y=nG0($);return Y.length>1&&Y.at(-1)==="/"?Y.slice(0,-1):Y},OK=($,Y,...X)=>{if(X.length)Y=OK(Y,...X);return`${$?.[0]==="/"?"":"/"}${$}${Y==="/"?"":`${$?.at(-1)==="/"?"":"/"}${Y?.[0]==="/"?Y.slice(1):Y}`}`},Uc=($)=>{if($.charCodeAt($.length-1)!==63||!$.includes(":"))return null;let Y=$.split("/"),X=[],G="";return Y.forEach((J)=>{if(J!==""&&!/\:/.test(J))G+="/"+J;else if(/\:/.test(J))if(/\?/.test(J)){if(X.length===0&&G==="")X.push("/");else X.push(G);let Q=J.replace("?","");G+="/"+Q,X.push(G)}else G+="/"+J}),X.filter((J,Q,W)=>W.indexOf(J)===Q)},cG0=($)=>{if(!/[%+]/.test($))return $;if($.indexOf("+")!==-1)$=$.replace(/\+/g," ");return $.indexOf("%")!==-1?UR($,tC):$},en0=($,Y,X)=>{let G;if(!X&&Y&&!/[%+]/.test(Y)){let W=$.indexOf("?",8);if(W===-1)return;if(!$.startsWith(Y,W+1))W=$.indexOf(`&${Y}`,W+1);while(W!==-1){let K=$.charCodeAt(W+Y.length+1);if(K===61){let Z=W+Y.length+2,H=$.indexOf("&",Z);return cG0($.slice(Z,H===-1?void 0:H))}else if(K==38||isNaN(K))return"";W=$.indexOf(`&${Y}`,W+1)}if(G=/[%+]/.test($),!G)return}let J={};G??=/[%+]/.test($);let Q=$.indexOf("?",8);while(Q!==-1){let W=$.indexOf("&",Q+1),K=$.indexOf("=",Q);if(K>W&&W!==-1)K=-1;let Z=$.slice(Q+1,K===-1?W===-1?void 0:W:K);if(G)Z=cG0(Z);if(Q=W,Z==="")continue;let H;if(K===-1)H="";else if(H=$.slice(K+1,W===-1?void 0:W),G)H=cG0(H);if(X){if(!(J[Z]&&Array.isArray(J[Z])))J[Z]=[];J[Z].push(H)}else J[Z]??=H}return Y?J[Y]:J},$r0=en0,Yr0=($,Y)=>{return en0($,Y,!0)},tC=decodeURIComponent;var Xr0=($)=>UR($,tC),Kc=class{raw;#$;#Y;routeIndex=0;path;bodyCache={};constructor($,Y="/",X=[[]]){this.raw=$,this.path=Y,this.#Y=X,this.#$={}}param($){return $?this.#X($):this.#J()}#X($){let Y=this.#Y[0][this.routeIndex][1][$],X=this.#G(Y);return X&&/\%/.test(X)?Xr0(X):X}#J(){let $={},Y=Object.keys(this.#Y[0][this.routeIndex][1]);for(let X of Y){let G=this.#G(this.#Y[0][this.routeIndex][1][X]);if(G!==void 0)$[X]=/\%/.test(G)?Xr0(G):G}return $}#G($){return this.#Y[1]?this.#Y[1][$]:$}query($){return $r0(this.url,$)}queries($){return Yr0(this.url,$)}header($){if($)return this.raw.headers.get($)??void 0;let Y={};return this.raw.headers.forEach((X,G)=>{Y[G]=X}),Y}async parseBody($){return an0(this,$)}#Q=($)=>{let{bodyCache:Y,raw:X}=this,G=Y[$];if(G)return G;let J=Object.keys(Y)[0];if(J)return Y[J].then((Q)=>{if(J==="json")Q=JSON.stringify(Q);return new Response(Q)[$]()});return Y[$]=X[$]()};json(){return this.#Q("text").then(($)=>JSON.parse($))}text(){return this.#Q("text")}arrayBuffer(){return this.#Q("arrayBuffer")}blob(){return this.#Q("blob")}formData(){return this.#Q("formData")}addValidatedData($,Y){this.#$[$]=Y}valid($){return this.#$[$]}get url(){return this.raw.url}get method(){return this.raw.method}get[rn0](){return this.#Y}get matchedRoutes(){return this.#Y[0].map(([[,$]])=>$)}get routePath(){return this.#Y[0].map(([[,$]])=>$)[this.routeIndex].path}},Gr0=async($)=>{if(!$.raw.bodyUsed)return $.raw.clone();let Y=Object.keys($.bodyCache)[0];if(!Y)throw new v0(500,{message:"Cannot clone request: body was already consumed and not cached. Please use HonoRequest methods (e.g., req.json(), req.text()) instead of consuming req.raw directly."});let X={body:await $[Y](),cache:$.raw.cache,credentials:$.raw.credentials,headers:$.header(),integrity:$.raw.integrity,keepalive:$.raw.keepalive,method:$.method,mode:$.raw.mode,redirect:$.raw.redirect,referrer:$.raw.referrer,referrerPolicy:$.raw.referrerPolicy,signal:$.raw.signal};return new Request($.url,X)};var Hc={Stringify:1,BeforeStream:2,Stream:3},Jr0=($,Y)=>{let X=new String($);return X.isEscaped=!0,X.callbacks=Y,X};var eC=async($,Y,X,G,J)=>{if(typeof $==="object"&&!($ instanceof String)){if(!($ instanceof Promise))$=$.toString();if($ instanceof Promise)$=await $}let Q=$.callbacks;if(!Q?.length)return Promise.resolve($);if(J)J[0]+=$;else J=[$];let W=Promise.all(Q.map((K)=>K({phase:Y,buffer:J,context:G}))).then((K)=>Promise.all(K.filter(Boolean).map((Z)=>eC(Z,Y,!1,G,J))).then(()=>J[0]));if(X)return Jr0(await W,Q);else return W};var Qr0="text/plain; charset=UTF-8",rG0=($,Y)=>{return{"Content-Type":$,...Y}},$S=($,Y)=>new Response($,Y),Wr0=class{#$;#Y;env={};#X;finalized=!1;error;#J;#G;#Q;#U;#Z;#W;#H;#F;#V;constructor($,Y){if(this.#$=$,Y)this.#G=Y.executionCtx,this.env=Y.env,this.#W=Y.notFoundHandler,this.#V=Y.path,this.#F=Y.matchResult}get req(){return this.#Y??=new Kc(this.#$,this.#V,this.#F),this.#Y}get event(){if(this.#G&&"respondWith"in this.#G)return this.#G;else throw Error("This context has no FetchEvent")}get executionCtx(){if(this.#G)return this.#G;else throw Error("This context has no ExecutionContext")}get res(){return this.#Q||=$S(null,{headers:this.#H??=new Headers})}set res($){if(this.#Q&&$){$=$S($.body,$);for(let[Y,X]of this.#Q.headers.entries()){if(Y==="content-type")continue;if(Y==="set-cookie"){let G=this.#Q.headers.getSetCookie();$.headers.delete("set-cookie");for(let J of G)$.headers.append("set-cookie",J)}else $.headers.set(Y,X)}}this.#Q=$,this.finalized=!0}render=(...$)=>{return this.#Z??=(Y)=>this.html(Y),this.#Z(...$)};setLayout=($)=>this.#U=$;getLayout=()=>this.#U;setRenderer=($)=>{this.#Z=$};header=($,Y,X)=>{if(this.finalized)this.#Q=$S(this.#Q.body,this.#Q);let G=this.#Q?this.#Q.headers:this.#H??=new Headers;if(Y===void 0)G.delete($);else if(X?.append)G.append($,Y);else G.set($,Y)};status=($)=>{this.#J=$};set=($,Y)=>{this.#X??=new Map,this.#X.set($,Y)};get=($)=>{return this.#X?this.#X.get($):void 0};get var(){if(!this.#X)return{};return Object.fromEntries(this.#X)}#K($,Y,X){let G=this.#Q?new Headers(this.#Q.headers):this.#H??new Headers;if(typeof Y==="object"&&"headers"in Y){let Q=Y.headers instanceof Headers?Y.headers:new Headers(Y.headers);for(let[W,K]of Q)if(W.toLowerCase()==="set-cookie")G.append(W,K);else G.set(W,K)}if(X)for(let[Q,W]of Object.entries(X))if(typeof W==="string")G.set(Q,W);else{G.delete(Q);for(let K of W)G.append(Q,K)}let J=typeof Y==="number"?Y:Y?.status??this.#J;return $S($,{status:J,headers:G})}newResponse=(...$)=>this.#K(...$);body=($,Y,X)=>this.#K($,Y,X);text=($,Y,X)=>{return!this.#H&&!this.#J&&!Y&&!X&&!this.finalized?new Response($):this.#K($,Y,rG0(Qr0,X))};json=($,Y,X)=>{return this.#K(JSON.stringify($),Y,rG0("application/json",X))};html=($,Y,X)=>{let G=(J)=>this.#K(J,Y,rG0("text/html; charset=UTF-8",X));return typeof $==="object"?eC($,Hc.Stringify,!1,{}).then(G):G($)};redirect=($,Y)=>{let X=String($);return this.header("Location",!/[^\x00-\xFF]/.test(X)?X:encodeURI(X)),this.newResponse(null,Y??302)};notFound=()=>{return this.#W??=()=>$S(),this.#W(this)}};var W5="ALL",Kr0="all",Zr0=["get","post","put","delete","options","patch"],zc="Can not add a route since the matcher is already built.",Vc=class extends Error{};var aG0="__COMPOSED_HANDLER";var Mb4=($)=>{return $.text("404 Not Found",404)},Ur0=($,Y)=>{if("getResponse"in $){let X=$.getResponse();return Y.newResponse(X.body,X)}return console.error($),Y.text("Internal Server Error",500)},Hr0=class ${get;post;put;delete;options;patch;all;on;use;router;getPath;_basePath="/";#$="/";routes=[];constructor(Y={}){[...Zr0,Kr0].forEach((Q)=>{this[Q]=(W,...K)=>{if(typeof W==="string")this.#$=W;else this.#J(Q,this.#$,W);return K.forEach((Z)=>{this.#J(Q,this.#$,Z)}),this}}),this.on=(Q,W,...K)=>{for(let Z of[W].flat()){this.#$=Z;for(let H of[Q].flat())K.map((z)=>{this.#J(H.toUpperCase(),this.#$,z)})}return this},this.use=(Q,...W)=>{if(typeof Q==="string")this.#$=Q;else this.#$="*",W.unshift(Q);return W.forEach((K)=>{this.#J(W5,this.#$,K)}),this};let{strict:G,...J}=Y;Object.assign(this,J),this.getPath=G??!0?Y.getPath??nG0:tn0}#Y(){let Y=new $({router:this.router,getPath:this.getPath});return Y.errorHandler=this.errorHandler,Y.#X=this.#X,Y.routes=this.routes,Y}#X=Mb4;errorHandler=Ur0;route(Y,X){let G=this.basePath(Y);return X.routes.map((J)=>{let Q;if(X.errorHandler===Ur0)Q=J.handler;else Q=async(W,K)=>(await dG0([],X.errorHandler)(W,()=>J.handler(W,K))).res,Q[aG0]=J.handler;G.#J(J.method,J.path,Q)}),this}basePath(Y){let X=this.#Y();return X._basePath=OK(this._basePath,Y),X}onError=(Y)=>{return this.errorHandler=Y,this};notFound=(Y)=>{return this.#X=Y,this};mount(Y,X,G){let J,Q;if(G)if(typeof G==="function")Q=G;else if(Q=G.optionHandler,G.replaceRequest===!1)J=(Z)=>Z;else J=G.replaceRequest;let W=Q?(Z)=>{let H=Q(Z);return Array.isArray(H)?H:[H]}:(Z)=>{let H=void 0;try{H=Z.executionCtx}catch{}return[Z.env,H]};J||=(()=>{let Z=OK(this._basePath,Y),H=Z==="/"?0:Z.length;return(z)=>{let V=new URL(z.url);return V.pathname=V.pathname.slice(H)||"/",new Request(V,z)}})();let K=async(Z,H)=>{let z=await X(J(Z.req.raw),...W(Z));if(z)return z;await H()};return this.#J(W5,OK(Y,"*"),K),this}#J(Y,X,G){Y=Y.toUpperCase(),X=OK(this._basePath,X);let J={basePath:this._basePath,path:X,method:Y,handler:G};this.router.add(Y,X,[G,J]),this.routes.push(J)}#G(Y,X){if(Y instanceof Error)return this.errorHandler(Y,X);throw Y}#Q(Y,X,G,J){if(J==="HEAD")return(async()=>new Response(null,await this.#Q(Y,X,G,"GET")))();let Q=this.getPath(Y,{env:G}),W=this.router.match(J,Q),K=new Wr0(Y,{path:Q,matchResult:W,env:G,executionCtx:X,notFoundHandler:this.#X});if(W[0].length===1){let H;try{H=W[0][0][0][0](K,async()=>{K.res=await this.#X(K)})}catch(z){return this.#G(z,K)}return H instanceof Promise?H.then((z)=>z||(K.finalized?K.res:this.#X(K))).catch((z)=>this.#G(z,K)):H??this.#X(K)}let Z=dG0(W[0],this.errorHandler,this.#X);return(async()=>{try{let H=await Z(K);if(!H.finalized)throw Error("Context is not finalized. Did you forget to return a Response object or `await next()`?");return H.res}catch(H){return this.#G(H,K)}})()}fetch=(Y,...X)=>{return this.#Q(Y,X[1],X[0],Y.method)};request=(Y,X,G,J)=>{if(Y instanceof Request)return this.fetch(X?new Request(Y,X):Y,G,J);return Y=Y.toString(),this.fetch(new Request(/^https?:\/\//.test(Y)?Y:`http://localhost${OK("/",Y)}`,X),G,J)};fire=()=>{addEventListener("fetch",(Y)=>{Y.respondWith(this.#Q(Y.request,Y,void 0,Y.request.method))})}};var YS=[];function Fc($,Y){let X=this.buildAllMatchers(),G=(J,Q)=>{let W=X[J]||X[W5],K=W[2][Q];if(K)return K;let Z=Q.match(W[0]);if(!Z)return[[],YS];let H=Z.indexOf("",1);return[W[1][H],Z]};return this.match=G,G($,Y)}var Lc="[^/]+",XS=".*",GS="(?:|/.*)",BN=Symbol(),Rb4=new Set(".\\+*[^]$()");function qb4($,Y){if($.length===1)return Y.length===1?$<Y?-1:1:-1;if(Y.length===1)return 1;if($===XS||$===GS)return 1;else if(Y===XS||Y===GS)return-1;if($===Lc)return 1;else if(Y===Lc)return-1;return $.length===Y.length?$<Y?-1:1:Y.length-$.length}var zr0=class ${#$;#Y;#X=Object.create(null);insert(Y,X,G,J,Q){if(Y.length===0){if(this.#$!==void 0)throw BN;if(Q)return;this.#$=X;return}let[W,...K]=Y,Z=W==="*"?K.length===0?["","",XS]:["","",Lc]:W==="/*"?["","",GS]:W.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/),H;if(Z){let z=Z[1],V=Z[2]||Lc;if(z&&Z[2]){if(V===".*")throw BN;if(V=V.replace(/^\((?!\?:)(?=[^)]+\)$)/,"(?:"),/\((?!\?:)/.test(V))throw BN}if(H=this.#X[V],!H){if(Object.keys(this.#X).some((F)=>F!==XS&&F!==GS))throw BN;if(Q)return;if(H=this.#X[V]=new $,z!=="")H.#Y=J.varIndex++}if(!Q&&z!=="")G.push([z,H.#Y])}else if(H=this.#X[W],!H){if(Object.keys(this.#X).some((z)=>z.length>1&&z!==XS&&z!==GS))throw BN;if(Q)return;H=this.#X[W]=new $}H.insert(K,X,G,J,Q)}buildRegExpStr(){let X=Object.keys(this.#X).sort(qb4).map((G)=>{let J=this.#X[G];return(typeof J.#Y==="number"?`(${G})@${J.#Y}`:Rb4.has(G)?`\\${G}`:G)+J.buildRegExpStr()});if(typeof this.#$==="number")X.unshift(`#${this.#$}`);if(X.length===0)return"";if(X.length===1)return X[0];return"(?:"+X.join("|")+")"}};var Vr0=class{#$={varIndex:0};#Y=new zr0;insert($,Y,X){let G=[],J=[];for(let W=0;;){let K=!1;if($=$.replace(/\{[^}]+\}/g,(Z)=>{let H=`@\\${W}`;return J[W]=[H,Z],W++,K=!0,H}),!K)break}let Q=$.match(/(?::[^\/]+)|(?:\/\*$)|./g)||[];for(let W=J.length-1;W>=0;W--){let[K]=J[W];for(let Z=Q.length-1;Z>=0;Z--)if(Q[Z].indexOf(K)!==-1){Q[Z]=Q[Z].replace(K,J[W][1]);break}}return this.#Y.insert(Q,Y,G,this.#$,X),G}buildRegExp(){let $=this.#Y.buildRegExpStr();if($==="")return[/^$/,[],[]];let Y=0,X=[],G=[];return $=$.replace(/#(\d+)|@(\d+)|\.\*\$/g,(J,Q,W)=>{if(Q!==void 0)return X[++Y]=Number(Q),"$()";if(W!==void 0)return G[Number(W)]=++Y,"";return""}),[new RegExp(`^${$}`),X,G]}};var Pb4=[/^$/,[],Object.create(null)],Fr0=Object.create(null);function Lr0($){return Fr0[$]??=new RegExp($==="*"?"":`^${$.replace(/\/\*$|([.\\+*[^\]$()])/g,(Y,X)=>X?`\\${X}`:"(?:|/.*)")}$`)}function wb4(){Fr0=Object.create(null)}function _b4($){let Y=new Vr0,X=[];if($.length===0)return Pb4;let G=$.map((H)=>[!/\*|\/:/.test(H[0]),...H]).sort(([H,z],[V,F])=>H?1:V?-1:z.length-F.length),J=Object.create(null);for(let H=0,z=-1,V=G.length;H<V;H++){let[F,L,N]=G[H];if(F)J[L]=[N.map(([A])=>[A,Object.create(null)]),YS];else z++;let D;try{D=Y.insert(L,z,F)}catch(A){throw A===BN?new Vc(L):A}if(F)continue;X[z]=N.map(([A,B])=>{let O=Object.create(null);B-=1;for(;B>=0;B--){let[E,M]=D[B];O[E]=M}return[A,O]})}let[Q,W,K]=Y.buildRegExp();for(let H=0,z=X.length;H<z;H++)for(let V=0,F=X[H].length;V<F;V++){let L=X[H][V]?.[1];if(!L)continue;let N=Object.keys(L);for(let D=0,A=N.length;D<A;D++)L[N[D]]=K[L[N[D]]]}let Z=[];for(let H in W)Z[H]=X[W[H]];return[Q,Z,J]}function HR($,Y){if(!$)return;for(let X of Object.keys($).sort((G,J)=>J.length-G.length))if(Lr0(X).test(Y))return[...$[X]];return}var Dc=class{name="RegExpRouter";#$;#Y;constructor(){this.#$={[W5]:Object.create(null)},this.#Y={[W5]:Object.create(null)}}add($,Y,X){let G=this.#$,J=this.#Y;if(!G||!J)throw Error(zc);if(!G[$])[G,J].forEach((K)=>{K[$]=Object.create(null),Object.keys(K[W5]).forEach((Z)=>{K[$][Z]=[...K[W5][Z]]})});if(Y==="/*")Y="*";let Q=(Y.match(/\/:/g)||[]).length;if(/\*$/.test(Y)){let K=Lr0(Y);if($===W5)Object.keys(G).forEach((Z)=>{G[Z][Y]||=HR(G[Z],Y)||HR(G[W5],Y)||[]});else G[$][Y]||=HR(G[$],Y)||HR(G[W5],Y)||[];Object.keys(G).forEach((Z)=>{if($===W5||$===Z)Object.keys(G[Z]).forEach((H)=>{K.test(H)&&G[Z][H].push([X,Q])})}),Object.keys(J).forEach((Z)=>{if($===W5||$===Z)Object.keys(J[Z]).forEach((H)=>K.test(H)&&J[Z][H].push([X,Q]))});return}let W=Uc(Y)||[Y];for(let K=0,Z=W.length;K<Z;K++){let H=W[K];Object.keys(J).forEach((z)=>{if($===W5||$===z)J[z][H]||=[...HR(G[z],H)||HR(G[W5],H)||[]],J[z][H].push([X,Q-Z+K+1])})}}match=Fc;buildAllMatchers(){let $=Object.create(null);return Object.keys(this.#Y).concat(Object.keys(this.#$)).forEach((Y)=>{$[Y]||=this.#X(Y)}),this.#$=this.#Y=void 0,wb4(),$}#X($){let Y=[],X=$===W5;if([this.#$,this.#Y].forEach((G)=>{let J=G[$]?Object.keys(G[$]).map((Q)=>[Q,G[$][Q]]):[];if(J.length!==0)X||=!0,Y.push(...J);else if($!==W5)Y.push(...Object.keys(G[W5]).map((Q)=>[Q,G[W5][Q]]))}),!X)return null;else return _b4(Y)}};var jb4=class{name="PreparedRegExpRouter";#$;#Y;constructor($,Y){this.#$=$,this.#Y=Y}#X($,Y){let X=this.#$[$];X[1].forEach((G)=>G&&G.push(Y)),Object.values(X[2]).forEach((G)=>G[0].push(Y))}#J($,Y,X,G,J){let Q=this.#$[$];if(!J)Q[2][Y][0].push([X,{}]);else G.forEach((W)=>{if(typeof W==="number")Q[1][W].push([X,J]);else Q[2][W||Y][0].push([X,J])})}add($,Y,X){if(!this.#$[$]){let J=this.#$[W5],Q={};for(let W in J[2])Q[W]=[J[2][W][0].slice(),YS];this.#$[$]=[J[0],J[1].map((W)=>Array.isArray(W)?W.slice():0),Q]}if(Y==="/*"||Y==="*"){let J=[X,{}];if($===W5)for(let Q in this.#$)this.#X(Q,J);else this.#X($,J);return}let G=this.#Y[Y];if(!G)throw Error(`Path ${Y} is not registered`);for(let[J,Q]of G)if($===W5)for(let W in this.#$)this.#J(W,Y,X,J,Q);else this.#J($,Y,X,J,Q)}buildAllMatchers(){return this.#$}match=Fc};var sG0=class{name="SmartRouter";#$=[];#Y=[];constructor($){this.#$=$.routers}add($,Y,X){if(!this.#Y)throw Error(zc);this.#Y.push([$,Y,X])}match($,Y){if(!this.#Y)throw Error("Fatal error");let X=this.#$,G=this.#Y,J=X.length,Q=0,W;for(;Q<J;Q++){let K=X[Q];try{for(let Z=0,H=G.length;Z<H;Z++)K.add(...G[Z]);W=K.match($,Y)}catch(Z){if(Z instanceof Vc)continue;throw Z}this.match=K.match.bind(K),this.#$=[K],this.#Y=void 0;break}if(Q===J)throw Error("Fatal error");return this.name=`SmartRouter + ${this.activeRouter.name}`,W}get activeRouter(){if(this.#Y||this.#$.length!==1)throw Error("No active router has been determined yet.");return this.#$[0]}};var JS=Object.create(null),Tb4=($)=>{for(let Y in $)return!0;return!1},Dr0=class ${#$;#Y;#X;#J=0;#G=JS;constructor(Y,X,G){if(this.#Y=G||Object.create(null),this.#$=[],Y&&X){let J=Object.create(null);J[Y]={handler:X,possibleKeys:[],score:0},this.#$=[J]}this.#X=[]}insert(Y,X,G){this.#J=++this.#J;let J=this,Q=sn0(X),W=[];for(let K=0,Z=Q.length;K<Z;K++){let H=Q[K],z=Q[K+1],V=on0(H,z),F=Array.isArray(V)?V[0]:H;if(F in J.#Y){if(J=J.#Y[F],V)W.push(V[1]);continue}if(J.#Y[F]=new $,V)J.#X.push(V),W.push(V[1]);J=J.#Y[F]}return J.#$.push({[Y]:{handler:G,possibleKeys:W.filter((K,Z,H)=>H.indexOf(K)===Z),score:this.#J}}),J}#Q(Y,X,G,J,Q){for(let W=0,K=X.#$.length;W<K;W++){let Z=X.#$[W],H=Z[G]||Z[W5],z={};if(H!==void 0){if(H.params=Object.create(null),Y.push(H),J!==JS||Q&&Q!==JS)for(let V=0,F=H.possibleKeys.length;V<F;V++){let L=H.possibleKeys[V],N=z[H.score];H.params[L]=Q?.[L]&&!N?Q[L]:J[L]??Q?.[L],z[H.score]=!0}}}}search(Y,X){let G=[];this.#G=JS;let Q=[this],W=lG0(X),K=[],Z=W.length,H=null;for(let z=0;z<Z;z++){let V=W[z],F=z===Z-1,L=[];for(let D=0,A=Q.length;D<A;D++){let B=Q[D],O=B.#Y[V];if(O)if(O.#G=B.#G,F){if(O.#Y["*"])this.#Q(G,O.#Y["*"],Y,B.#G);this.#Q(G,O,Y,B.#G)}else L.push(O);for(let E=0,M=B.#X.length;E<M;E++){let R=B.#X[E],q=B.#G===JS?{}:{...B.#G};if(R==="*"){let C=B.#Y["*"];if(C)this.#Q(G,C,Y,B.#G),C.#G=q,L.push(C);continue}let[_,P,w]=R;if(!V&&!(w instanceof RegExp))continue;let j=B.#Y[_];if(w instanceof RegExp){if(H===null){H=Array(Z);let S=X[0]==="/"?1:0;for(let I=0;I<Z;I++)H[I]=S,S+=W[I].length+1}let C=X.substring(H[z]),k=w.exec(C);if(k){if(q[P]=k[0],this.#Q(G,j,Y,B.#G,q),Tb4(j.#Y)){j.#G=q;let S=k[0].match(/\//)?.length??0;(K[S]||=[]).push(j)}continue}}if(w===!0||w.test(V))if(q[P]=V,F){if(this.#Q(G,j,Y,q,B.#G),j.#Y["*"])this.#Q(G,j.#Y["*"],Y,q,B.#G)}else j.#G=q,L.push(j)}}let N=K.shift();Q=N?L.concat(N):L}if(G.length>1)G.sort((z,V)=>{return z.score-V.score});return[G.map(({handler:z,params:V})=>[z,V])]}};var oG0=class{name="TrieRouter";#$;constructor(){this.#$=new Dr0}add($,Y,X){let G=Uc(Y);if(G){for(let J=0,Q=G.length;J<Q;J++)this.#$.insert($,G[J],X);return}this.#$.insert($,Y,X)}match($,Y){return this.#$.search($,Y)}};var _4=class extends Hr0{constructor($={}){super($);this.router=$.router??new sG0({routers:[new Dc,new oG0]})}};Br0();import{stat as mb4}from"fs/promises";import{join as ub4}from"path";var Or0=/^\s*(?:text\/(?!event-stream(?:[;\s]|$))[^;\s]+|application\/(?:javascript|json|xml|xml-dtd|ecmascript|dart|postscript|rtf|tar|toml|vnd\.dart|vnd\.ms-fontobject|vnd\.ms-opentype|wasm|x-httpd-php|x-javascript|x-ns-proxy-autoconfig|x-sh|x-tar|x-virtualbox-hdd|x-virtualbox-ova|x-virtualbox-ovf|x-virtualbox-vbox|x-virtualbox-vdi|x-virtualbox-vhd|x-virtualbox-vmdk|x-www-form-urlencoded)|font\/(?:otf|ttf)|image\/(?:bmp|vnd\.adobe\.photoshop|vnd\.microsoft\.icon|vnd\.ms-dds|x-icon|x-ms-bmp)|message\/rfc822|model\/gltf-binary|x-shader\/x-fragment|x-shader\/x-vertex|[^;\s]+?\+(?:json|text|xml|yaml))(?:[;\s]|$)/i;var eG0=($,Y=hb4)=>{let X=/\.([a-zA-Z0-9]+?)$/,G=$.match(X);if(!G)return;let J=Y[G[1].toLowerCase()];if(J&&J.startsWith("text"))J+="; charset=utf-8";return J};var bb4={aac:"audio/aac",avi:"video/x-msvideo",avif:"image/avif",av1:"video/av1",bin:"application/octet-stream",bmp:"image/bmp",css:"text/css",csv:"text/csv",eot:"application/vnd.ms-fontobject",epub:"application/epub+zip",gif:"image/gif",gz:"application/gzip",htm:"text/html",html:"text/html",ico:"image/x-icon",ics:"text/calendar",jpeg:"image/jpeg",jpg:"image/jpeg",js:"text/javascript",json:"application/json",jsonld:"application/ld+json",map:"application/json",mid:"audio/x-midi",midi:"audio/x-midi",mjs:"text/javascript",mp3:"audio/mpeg",mp4:"video/mp4",mpeg:"video/mpeg",oga:"audio/ogg",ogv:"video/ogg",ogx:"application/ogg",opus:"audio/opus",otf:"font/otf",pdf:"application/pdf",png:"image/png",rtf:"application/rtf",svg:"image/svg+xml",tif:"image/tiff",tiff:"image/tiff",ts:"video/mp2t",ttf:"font/ttf",txt:"text/plain",wasm:"application/wasm",webm:"video/webm",weba:"audio/webm",webmanifest:"application/manifest+json",webp:"image/webp",woff:"font/woff",woff2:"font/woff2",xhtml:"application/xhtml+xml",xml:"application/xml",zip:"application/zip","3gp":"video/3gpp","3g2":"video/3gpp2",gltf:"model/gltf+json",glb:"model/gltf-binary"},hb4=bb4;var Er0=(...$)=>{let Y=$.filter((J)=>J!=="").join("/");Y=Y.replace(/(?<=\/)\/+/g,"");let X=Y.split("/"),G=[];for(let J of X)if(J===".."&&G.length>0&&G.at(-1)!=="..")G.pop();else if(J!==".")G.push(J);return G.join("/")||"."};var Mr0={br:".br",zstd:".zst",gzip:".gz"},fb4=Object.keys(Mr0),gb4="index.html",Rr0=($)=>{let Y=$.root??"./",X=$.path,G=$.join??Er0;return async(J,Q)=>{if(J.finalized)return Q();let W;if($.path)W=$.path;else try{if(W=iG0(J.req.path),/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}/.test(W))throw Error()}catch{return await $.onNotFound?.(J.req.path,J),Q()}let K=G(Y,!X&&$.rewriteRequestPath?$.rewriteRequestPath(W):W);if($.isDir&&await $.isDir(K))K=G(K,gb4);let Z=$.getContent,H=await Z(K,J);if(H instanceof Response)return J.newResponse(H.body,H);if(H){let z=$.mimes&&eG0(K,$.mimes)||eG0(K);if(J.header("Content-Type",z||"application/octet-stream"),$.precompressed&&(!z||Or0.test(z))){let V=new Set(J.req.header("Accept-Encoding")?.split(",").map((F)=>F.trim()));for(let F of fb4){if(!V.has(F))continue;let L=await Z(K+Mr0[F],J);if(L){H=L,J.header("Content-Encoding",F),J.header("Vary","Accept-Encoding",{append:!0});break}}}return await $.onFound?.(K,J),J.body(H)}await $.onNotFound?.(K,J),await Q();return}};var z7=($)=>{return async function(X,G){return Rr0({...$,getContent:async(W)=>{let K=Bun.file(W);return await K.exists()?K:null},join:ub4,isDir:async(W)=>{let K;try{K=(await mb4(W)).isDirectory()}catch{}return K}})(X,G)}};var $J0="x-hono-disable-ssg",xf9=(()=>{try{return new Response("SSG is disabled",{status:404,headers:{[$J0]:"true"}})}catch{return null}})();var{write:Ng9}=Bun;var cb4=class{#$;constructor($){this.#$=$,this.raw=$.raw,this.url=$.url?new URL($.url):null,this.protocol=$.protocol??null}send($,Y){this.#$.send($,Y??{})}raw;binaryType="arraybuffer";get readyState(){return this.#$.readyState}url;protocol;close($,Y){this.#$.close($,Y)}};var qr0=($)=>{return(...Y)=>{if(typeof Y[0]==="function"){let[X,G]=Y;return async function(Q,W){let K=await X(Q),Z=await $(Q,K,G);if(Z)return Z;await W()}}else{let[X,G,J]=Y;return(async()=>{let Q=await $(X,G,J);if(!Q)throw Error("Failed to upgrade WebSocket");return Q})()}}};var Nc=($)=>("server"in $.env)?$.env.server:$.env;var lb4=qr0(($,Y)=>{let X=Nc($);if(!X)throw TypeError("env has to include the 2nd argument of fetch.");if(X.upgrade($.req.raw,{data:{events:Y,url:new URL($.req.url),protocol:$.req.url}}))return new Response(null);return});import{AsyncLocalStorage as ib4}from"async_hooks";var Pr0=new ib4,wr0=()=>{return async function(Y,X){await Pr0.run(Y,X)}},nb4=()=>{return Pr0.getStore()},B5=()=>{let $=nb4();if(!$)throw Error("Context is not available");return $};var YJ0=($)=>{let Y={origin:"*",allowMethods:["GET","HEAD","PUT","POST","DELETE","PATCH"],allowHeaders:[],exposeHeaders:[],...$},X=((J)=>{if(typeof J==="string")if(J==="*"){if(Y.credentials)return(Q)=>Q||null;return()=>J}else return(Q)=>J===Q?Q:null;else if(typeof J==="function")return J;else return(Q)=>J.includes(Q)?Q:null})(Y.origin),G=((J)=>{if(typeof J==="function")return J;else if(Array.isArray(J))return()=>J;else return()=>[]})(Y.allowMethods);return async function(Q,W){function K(H,z){Q.res.headers.set(H,z)}let Z=await X(Q.req.header("origin")||"",Q);if(Z)K("Access-Control-Allow-Origin",Z);if(Y.credentials)K("Access-Control-Allow-Credentials","true");if(Y.exposeHeaders?.length)K("Access-Control-Expose-Headers",Y.exposeHeaders.join(","));if(Q.req.method==="OPTIONS"){if(Y.origin!=="*"||Y.credentials)K("Vary","Origin");if(Y.maxAge!=null)K("Access-Control-Max-Age",Y.maxAge.toString());let H=await G(Q.req.header("origin")||"",Q);if(H.length)K("Access-Control-Allow-Methods",H.join(","));let z=Y.allowHeaders;if(!z?.length){let V=Q.req.header("Access-Control-Request-Headers");if(V)z=V.split(/\s*,\s*/)}if(z?.length)K("Access-Control-Allow-Headers",z.join(",")),Q.res.headers.append("Vary","Access-Control-Request-Headers");return Q.res.headers.delete("Content-Length"),Q.res.headers.delete("Content-Type"),new Response(null,{headers:Q.res.headers,status:204,statusText:"No Content"})}if(await W(),Y.origin!=="*"||Y.credentials)Q.header("Vary","Origin",{append:!0})}};var pg9=class{initApp;#$;constructor($){this.initApp=$?.initApp,this.#$=$?.defaultAppOptions}createApp=($)=>{let Y=new _4($&&this.#$?{...this.#$,...$}:$??this.#$);if(this.initApp)this.initApp(Y);return Y};createMiddleware=($)=>$;createHandlers=(...$)=>{return $.filter((Y)=>Y!==void 0)}};var _r0=($)=>$;var jr0=($)=>{let Y=$?.query??"pretty";return async function(G,J){let Q=$?.force||G.req.query(Y)||G.req.query(Y)==="";if(await J(),Q&&G.res.headers.get("Content-Type")?.startsWith("application/json")){let W=await G.res.json();G.res=new Response(JSON.stringify(W,null,$?.space??2),G.res)}}};var Tr0=["connection","keep-alive","proxy-authenticate","proxy-authorization","te","trailer","transfer-encoding","upgrade"],rb4=/^[!#$%&'*+\-.0-9A-Z^_`a-z|~]+$/,ab4=($,Y)=>{if(!$)return{};let X=new Headers($.headers);if(Y){let G=X.get("connection");if(G){let J=G.split(",").map((W)=>W.trim()),Q=J.filter((W)=>!rb4.test(W));if(Q.length>0)throw new v0(400,{message:`Invalid Connection header value: ${Q.join(", ")}`});J.forEach((W)=>{X.delete(W)})}}return Tr0.forEach((G)=>{X.delete(G)}),{method:$.method,body:$.body,duplex:$.body?"half":void 0,headers:X,signal:$.signal}},sb4=($)=>{if(!$.headers||Array.isArray($.headers)||$.headers instanceof Headers)return $;let Y=new Headers;for(let[X,G]of Object.entries($.headers))if(G==null)Y.delete(X);else Y.set(X,G);return $.headers=Y,$},zR=async($,Y)=>{let{raw:X,customFetch:G,strictConnectionProcessing:J=!1,...Q}=Y instanceof Request?{raw:Y}:Y??{},W=new Request($,{...ab4(X,J),...sb4(Q)});W.headers.delete("accept-encoding");let K=await(G||fetch)(W),Z=new Headers(K.headers);if(Tr0.forEach((H)=>{Z.delete(H)}),Z.has("content-encoding"))Z.delete("content-encoding"),Z.delete("content-length");return new Response(K.body,{status:K.status,statusText:K.statusText,headers:Z})};var XJ0=({limitLength:$=255,headerName:Y="X-Request-Id",generator:X=()=>crypto.randomUUID()}={})=>{return async function(J,Q){let W=Y?J.req.header(Y):void 0;if(!W||W.length>$||/[^\w\-=]/.test(W))W=X(J);if(J.set("requestId",W),Y)J.header(Y,W);await Q()}};var ob4=new v0(504,{message:"Gateway Timeout"}),Ir0=($,Y=ob4)=>{return async function(G,J){let Q,W=new Promise((K,Z)=>{Q=setTimeout(()=>{Z(typeof Y==="function"?Y(G):Y)},$)});try{await Promise.race([J(),W])}finally{if(Q!==void 0)clearTimeout(Q)}}};ON();var Bc={host:"localhost",port:6789,token:"",maxReconnectAttempts:1/0,reconnectDelay:100,maxReconnectDelay:30000,connectTimeout:5000,commandTimeout:30000,autoReconnect:!0,pingInterval:30000,maxPingFailures:3,pipelining:!0,maxInFlight:100};class WS{config;consecutivePingFailures=0;lastSuccessAt=null;lastErrorAt=null;connectedAt=null;totalCommands=0;totalErrors=0;latencyHistory=[];pingTimer=null;static MAX_LATENCY_HISTORY=10;constructor($){this.config=$}recordSuccess($){this.lastSuccessAt=Date.now(),this.totalCommands++,this.recordLatency($)}recordError(){this.lastErrorAt=Date.now(),this.totalErrors++}recordCommandSent(){this.totalCommands++}recordConnected(){this.connectedAt=Date.now(),this.consecutivePingFailures=0}recordPingSuccess($){this.consecutivePingFailures=0,this.recordLatency($)}recordPingFailure(){return this.consecutivePingFailures++,this.lastErrorAt=Date.now(),this.totalErrors++,this.consecutivePingFailures>=this.config.maxPingFailures}getHealth($){let Y=this.latencyHistory.length>0?this.latencyHistory.reduce((X,G)=>X+G,0)/this.latencyHistory.length:0;return{healthy:$==="connected"&&this.consecutivePingFailures<this.config.maxPingFailures,state:$,lastSuccessAt:this.lastSuccessAt,lastErrorAt:this.lastErrorAt,avgLatencyMs:Math.round(Y*100)/100,consecutivePingFailures:this.consecutivePingFailures,totalCommands:this.totalCommands,totalErrors:this.totalErrors,uptimeMs:this.connectedAt?Date.now()-this.connectedAt:0}}startPing($){if(this.config.pingInterval<=0)return;this.stopPing(),this.pingTimer=setInterval(()=>{$()},this.config.pingInterval)}stopPing(){if(this.pingTimer)clearInterval(this.pingTimer),this.pingTimer=null}recordLatency($){if(this.latencyHistory.push($),this.latencyHistory.length>WS.MAX_LATENCY_HISTORY)this.latencyHistory.shift()}}import{EventEmitter as Qh4}from"events";class Oc extends Qh4{config;on($,Y){return super.on($,Y)}once($,Y){return super.once($,Y)}reconnectAttempts=0;reconnectTimer=null;closed=!1;constructor($){super();this.config=$}setClosed($){if(this.closed=$,$)this.cancelReconnect()}isClosed(){return this.closed}reset(){this.reconnectAttempts=0}cancelReconnect(){if(this.reconnectTimer)clearTimeout(this.reconnectTimer),this.reconnectTimer=null}canReconnect(){return this.config.autoReconnect&&!this.closed}scheduleReconnect($){if(this.reconnectTimer||this.closed)return!1;if(this.reconnectAttempts++,this.reconnectAttempts>this.config.maxReconnectAttempts)return this.emit("maxReconnectAttemptsReached"),!1;let Y=Math.min(this.config.reconnectDelay*Math.pow(2,this.reconnectAttempts-1),this.config.maxReconnectDelay),X=Math.random()*0.3*Y,G=Y+X;return this.emit("reconnecting",{attempt:this.reconnectAttempts,delay:G}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,$().catch(()=>{})},G),!0}}function Wh4($){return $==="localhost"||$==="127.0.0.1"||$==="::1"||$==="[::1]"||$.endsWith(".localhost")}function Kh4($){let Y=$.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);if(!Y)return null;let[,X,G]=Y.map(Number);if(X===10)return"Webhook URL cannot point to private IP";if(X===172&&G>=16&&G<=31)return"Webhook URL cannot point to private IP";if(X===192&&G===168)return"Webhook URL cannot point to private IP";if(X===169&&G===254)return"Webhook URL cannot point to link-local IP";if(X===0)return"Webhook URL cannot point to unspecified IP";if(X===127)return"Webhook URL cannot point to loopback IP";return null}function Zh4($){return $==="169.254.169.254"||$==="metadata.google.internal"||$.endsWith(".internal")}function JJ0($){if(!$||$.length===0)return"Webhook URL is required";if($.length>2048)return"Webhook URL too long (max 2048 characters)";let Y;try{Y=new URL($)}catch{return"Invalid URL format"}if(Y.protocol!=="http:"&&Y.protocol!=="https:")return"Webhook URL must use http or https protocol";let X=Y.hostname.toLowerCase();if(Wh4(X))return"Webhook URL cannot point to localhost";let G=Kh4(X);if(G)return G;if(Zh4(X))return"Webhook URL cannot point to cloud metadata endpoints";return null}var Uh4=67108864;class Ec extends Error{requestedSize;maxSize;constructor($,Y){super(`Frame size ${$} exceeds maximum allowed size ${Y}`);this.requestedSize=$,this.maxSize=Y,this.name="FrameSizeError"}}class VR{buffer=new Uint8Array(0);maxFrameSize;constructor($=Uh4){this.maxFrameSize=$}addData($){let Y=new Uint8Array(this.buffer.length+$.length);Y.set(this.buffer),Y.set($,this.buffer.length),this.buffer=Y;let X=[];while(this.buffer.length>=4){let G=(this.buffer[0]<<24|this.buffer[1]<<16|this.buffer[2]<<8|this.buffer[3])>>>0;if(G>this.maxFrameSize)throw this.buffer=new Uint8Array(0),new Ec(G,this.maxFrameSize);if(this.buffer.length<4+G)break;X.push(this.buffer.slice(4,4+G)),this.buffer=this.buffer.slice(4+G)}return X}clear(){this.buffer=new Uint8Array(0)}static frame($){let Y=new Uint8Array(4+$.length);return Y[0]=$.length>>24&255,Y[1]=$.length>>16&255,Y[2]=$.length>>8&255,Y[3]=$.length&255,Y.set($,4),Y}}async function QJ0($,Y,X){return new Promise((G,J)=>{let Q={write:()=>{},end:()=>{},frameParser:new VR},W=!1,K=null,Z=()=>{if(K)clearTimeout(K),K=null},H=`${$.host}:${$.port}`,z={data(V,F){let L;try{L=Q.frameParser.addData(new Uint8Array(F))}catch(N){if(N instanceof Ec){X.onError(Error(`Frame too large: ${N.requestedSize} bytes exceeds maximum ${N.maxSize}`));return}throw N}for(let N of L)X.onData(N)},open(V){Z(),Q.write=(F)=>V.write(F),Q.end=()=>V.end(),W=!0,G({socket:Q,cleanup:Z})},close(){if(!W)W=!0,Z(),J(Error("Connection closed"));X.onClose()},error(V,F){if(!W)W=!0,Z(),J(Error(`Connection error: ${F.message}`));X.onError(F)},connectError(V,F){if(!W)W=!0,Z(),J(Error(`Failed to connect to ${H}: ${F.message}`))}};Bun.connect({hostname:$.host??"localhost",port:$.port??6789,socket:z}),K=setTimeout(()=>{if(!W)W=!0,J(Error(`Connection timeout to ${H}`))},Y)})}class Mc{pendingCommands=new Map;pendingQueue=[];currentCommand=null;commandIdCounter=0;inFlightByReqId=new Map;getCurrentCommand(){return this.currentCommand}setCurrentCommand($){this.currentCommand=$}hasPending(){return this.pendingCommands.size>0}getInFlightCount(){return this.inFlightByReqId.size}canSendMore($){return this.inFlightByReqId.size<$}addInFlight($){this.inFlightByReqId.set($.reqId,$)}getByReqId($){return this.inFlightByReqId.get($)}removeByReqId($){let Y=this.inFlightByReqId.get($);if(Y)this.inFlightByReqId.delete($);return Y}enqueue($){this.pendingCommands.set($.id,$),this.pendingQueue.push($.id)}nextId(){return++this.commandIdCounter}dequeue(){let $=this.pendingQueue.shift();if($===void 0)return null;let Y=this.pendingCommands.get($);if(!Y)return null;return this.pendingCommands.delete($),Y}remove($){if(!this.pendingCommands.has($))return!1;this.pendingCommands.delete($);let Y=this.pendingQueue.indexOf($);if(Y!==-1)this.pendingQueue.splice(Y,1);return!0}rejectAll($){for(let Y of this.pendingCommands.values())clearTimeout(Y.timeout),Y.promise?.catch(()=>{}),Y.reject($);this.pendingCommands.clear(),this.pendingQueue=[];for(let Y of this.inFlightByReqId.values())clearTimeout(Y.timeout),Y.promise?.catch(()=>{}),Y.reject($);if(this.inFlightByReqId.clear(),this.currentCommand)clearTimeout(this.currentCommand.timeout),this.currentCommand.reject($),this.currentCommand=null}clearCurrent($){if(this.currentCommand){if(clearTimeout(this.currentCommand.timeout),$)this.currentCommand.reject($);this.currentCommand=null}}}import{EventEmitter as $f4}from"events";var KJ0;try{KJ0=new TextDecoder}catch($){}var f1,iQ,k0=0;var zJ0=[],MN=zJ0,KS=0,O5={},C8,PH,lQ=0,$2=0,e7,wH,vJ=[],E8,vr0={useRecords:!1,mapsAsObjects:!0};class wc{}var VJ0=new wc;VJ0.name="MessagePack 0xC1";var hV=!1,xr0=2,ZJ0,UJ0,HJ0;class _H{constructor($){if($){if($.useRecords===!1&&$.mapsAsObjects===void 0)$.mapsAsObjects=!0;if($.sequential&&$.trusted!==!1){if($.trusted=!0,!$.structures&&$.useRecords!=!1){if($.structures=[],!$.maxSharedStructures)$.maxSharedStructures=0}}if($.structures)$.structures.sharedLength=$.structures.length;else if($.getStructures)($.structures=[]).uninitialized=!0,$.structures.sharedLength=0;if($.int64AsNumber)$.int64AsType="number"}Object.assign(this,$)}unpack($,Y){if(f1)return er0(()=>{return Pc(),this?this.unpack($,Y):_H.prototype.unpack.call(vr0,$,Y)});if(!$.buffer&&$.constructor===ArrayBuffer)$=typeof Buffer<"u"?Buffer.from($):new Uint8Array($);if(typeof Y==="object")iQ=Y.end||$.length,k0=Y.start||0;else k0=0,iQ=Y>-1?Y:$.length;KS=0,$2=0,PH=null,MN=zJ0,e7=null,f1=$;try{E8=$.dataView||($.dataView=new DataView($.buffer,$.byteOffset,$.byteLength))}catch(X){if(f1=null,$ instanceof Uint8Array)throw X;throw Error("Source must be a Uint8Array or Buffer but was a "+($&&typeof $=="object"?$.constructor.name:typeof $))}if(this instanceof _H){if(O5=this,this.structures)return C8=this.structures,Rc(Y);else if(!C8||C8.length>0)C8=[]}else if(O5=vr0,!C8||C8.length>0)C8=[];return Rc(Y)}unpackMultiple($,Y){let X,G=0;try{hV=!0;let J=$.length,Q=this?this.unpack($,J):_c.unpack($,J);if(Y){if(Y(Q,G,k0)===!1)return;while(k0<J)if(G=k0,Y(Rc(),G,k0)===!1)return}else{X=[Q];while(k0<J)G=k0,X.push(Rc());return X}}catch(J){throw J.lastPosition=G,J.values=X,J}finally{hV=!1,Pc()}}_mergeStructures($,Y){if(UJ0)$=UJ0.call(this,$);if($=$||[],Object.isFrozen($))$=$.map((X)=>X.slice(0));for(let X=0,G=$.length;X<G;X++){let J=$[X];if(J){if(J.isShared=!0,X>=32)J.highByte=X-32>>5}}$.sharedLength=$.length;for(let X in Y||[])if(X>=0){let G=$[X],J=Y[X];if(J){if(G)($.restoreStructures||($.restoreStructures=[]))[X]=G;$[X]=J}}return this.structures=$}decode($,Y){return this.unpack($,Y)}}function Rc($){try{if(!O5.trusted&&!hV){let X=C8.sharedLength||0;if(X<C8.length)C8.length=X}let Y;if(O5.randomAccessStructure&&f1[k0]<64&&f1[k0]>=32&&ZJ0){if(Y=ZJ0(f1,k0,iQ,O5),f1=null,!($&&$.lazy)&&Y)Y=Y.toJSON();k0=iQ}else Y=V7();if(e7)k0=e7.postBundlePosition,e7=null;if(hV)C8.restoreStructures=null;if(k0==iQ){if(C8&&C8.restoreStructures)yr0();if(C8=null,f1=null,wH)wH=null}else if(k0>iQ)throw Error("Unexpected end of MessagePack data");else if(!hV){let X;try{X=JSON.stringify(Y,(G,J)=>typeof J==="bigint"?`${J}n`:J).slice(0,100)}catch(G){X="(JSON view not available "+G+")"}throw Error("Data read, but end of buffer not reached "+X)}return Y}catch(Y){if(C8&&C8.restoreStructures)yr0();if(Pc(),Y instanceof RangeError||Y.message.startsWith("Unexpected end of buffer")||k0>iQ)Y.incomplete=!0;throw Y}}function yr0(){for(let $ in C8.restoreStructures)C8[$]=C8.restoreStructures[$];C8.restoreStructures=null}function V7(){let $=f1[k0++];if($<160)if($<128)if($<64)return $;else{let Y=C8[$&63]||O5.getStructures&&dr0()[$&63];if(Y){if(!Y.read)Y.read=FJ0(Y,$&63);return Y.read()}else return $}else if($<144)if($-=128,O5.mapsAsObjects){let Y={};for(let X=0;X<$;X++){let G=or0();if(G==="__proto__")G="__proto_";Y[G]=V7()}return Y}else{let Y=new Map;for(let X=0;X<$;X++)Y.set(V7(),V7());return Y}else{$-=144;let Y=Array($);for(let X=0;X<$;X++)Y[X]=V7();if(O5.freezeData)return Object.freeze(Y);return Y}else if($<192){let Y=$-160;if($2>=k0)return PH.slice(k0-lQ,(k0+=Y)-lQ);if($2==0&&iQ<140){let X=Y<16?LJ0(Y):sr0(Y);if(X!=null)return X}return qc(Y)}else{let Y;switch($){case 192:return null;case 193:if(e7)if(Y=V7(),Y>0)return e7[1].slice(e7.position1,e7.position1+=Y);else return e7[0].slice(e7.position0,e7.position0-=Y);return VJ0;case 194:return!1;case 195:return!0;case 196:if(Y=f1[k0++],Y===void 0)throw Error("Unexpected end of buffer");return WJ0(Y);case 197:return Y=E8.getUint16(k0),k0+=2,WJ0(Y);case 198:return Y=E8.getUint32(k0),k0+=4,WJ0(Y);case 199:return EN(f1[k0++]);case 200:return Y=E8.getUint16(k0),k0+=2,EN(Y);case 201:return Y=E8.getUint32(k0),k0+=4,EN(Y);case 202:if(Y=E8.getFloat32(k0),O5.useFloat32>2){let X=qN[(f1[k0]&127)<<1|f1[k0+1]>>7];return k0+=4,(X*Y+(Y>0?0.5:-0.5)>>0)/X}return k0+=4,Y;case 203:return Y=E8.getFloat64(k0),k0+=8,Y;case 204:return f1[k0++];case 205:return Y=E8.getUint16(k0),k0+=2,Y;case 206:return Y=E8.getUint32(k0),k0+=4,Y;case 207:if(O5.int64AsType==="number")Y=E8.getUint32(k0)*4294967296,Y+=E8.getUint32(k0+4);else if(O5.int64AsType==="string")Y=E8.getBigUint64(k0).toString();else if(O5.int64AsType==="auto"){if(Y=E8.getBigUint64(k0),Y<=BigInt(2)<<BigInt(52))Y=Number(Y)}else Y=E8.getBigUint64(k0);return k0+=8,Y;case 208:return E8.getInt8(k0++);case 209:return Y=E8.getInt16(k0),k0+=2,Y;case 210:return Y=E8.getInt32(k0),k0+=4,Y;case 211:if(O5.int64AsType==="number")Y=E8.getInt32(k0)*4294967296,Y+=E8.getUint32(k0+4);else if(O5.int64AsType==="string")Y=E8.getBigInt64(k0).toString();else if(O5.int64AsType==="auto"){if(Y=E8.getBigInt64(k0),Y>=BigInt(-2)<<BigInt(52)&&Y<=BigInt(2)<<BigInt(52))Y=Number(Y)}else Y=E8.getBigInt64(k0);return k0+=8,Y;case 212:if(Y=f1[k0++],Y==114)return ur0(f1[k0++]&63);else{let X=vJ[Y];if(X)if(X.read)return k0++,X.read(V7());else if(X.noBuffer)return k0++,X();else return X(f1.subarray(k0,++k0));else throw Error("Unknown extension "+Y)}case 213:if(Y=f1[k0],Y==114)return k0++,ur0(f1[k0++]&63,f1[k0++]);else return EN(2);case 214:return EN(4);case 215:return EN(8);case 216:return EN(16);case 217:if(Y=f1[k0++],$2>=k0)return PH.slice(k0-lQ,(k0+=Y)-lQ);return cr0(Y);case 218:if(Y=E8.getUint16(k0),k0+=2,$2>=k0)return PH.slice(k0-lQ,(k0+=Y)-lQ);return lr0(Y);case 219:if(Y=E8.getUint32(k0),k0+=4,$2>=k0)return PH.slice(k0-lQ,(k0+=Y)-lQ);return ir0(Y);case 220:return Y=E8.getUint16(k0),k0+=2,hr0(Y);case 221:return Y=E8.getUint32(k0),k0+=4,hr0(Y);case 222:return Y=E8.getUint16(k0),k0+=2,fr0(Y);case 223:return Y=E8.getUint32(k0),k0+=4,fr0(Y);default:if($>=224)return $-256;if($===void 0){let X=Error("Unexpected end of MessagePack data");throw X.incomplete=!0,X}throw Error("Unknown MessagePack token "+$)}}}var Hh4=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function FJ0($,Y){function X(){if(X.count++>xr0){let J;try{J=$.read=Function("r","return function(){return "+(O5.freezeData?"Object.freeze":"")+"({"+$.map((Q)=>Q==="__proto__"?"__proto_:r()":Hh4.test(Q)?Q+":r()":"["+JSON.stringify(Q)+"]:r()").join(",")+"})}")(V7)}catch(Q){return xr0=1/0,X()}if($.highByte===0)$.read=br0(Y,$.read);return J()}let G={};for(let J=0,Q=$.length;J<Q;J++){let W=$[J];if(W==="__proto__")W="__proto_";G[W]=V7()}if(O5.freezeData)return Object.freeze(G);return G}if(X.count=0,$.highByte===0)return br0(Y,X);return X}var br0=($,Y)=>{return function(){let X=f1[k0++];if(X===0)return Y();let G=$<32?-($+(X<<5)):$+(X<<5),J=C8[G]||dr0()[G];if(!J)throw Error("Record id is not defined for "+G);if(!J.read)J.read=FJ0(J,$);return J.read()}};function dr0(){let $=er0(()=>{return f1=null,O5.getStructures()});return C8=O5._mergeStructures($,C8)}var qc=RN,cr0=RN,lr0=RN,ir0=RN,nr0=!1;function rr0($){nr0=!0,qc=Y(1),cr0=Y(2),lr0=Y(3),ir0=Y(5);function Y(X){return function(J){let Q=MN[KS++];if(Q==null){if(e7)return RN(J);let K=f1.byteOffset,Z=$(k0-X+K,iQ+K,f1.buffer);if(typeof Z=="string")Q=Z,MN=zJ0;else if(MN=Z,KS=1,$2=1,Q=MN[0],Q===void 0)throw Error("Unexpected end of buffer")}let W=Q.length;if(W<=J)return k0+=J,Q;return PH=Q,lQ=k0,$2=k0+W,k0+=J,Q.slice(0,J)}}}function RN($){let Y;if($<16){if(Y=LJ0($))return Y}if($>64&&KJ0)return KJ0.decode(f1.subarray(k0,k0+=$));let X=k0+$,G=[];Y="";while(k0<X){let J=f1[k0++];if((J&128)===0)G.push(J);else if((J&224)===192){let Q=f1[k0++]&63,W=(J&31)<<6|Q;if(W<128)G.push(65533);else G.push(W)}else if((J&240)===224){let Q=f1[k0++]&63,W=f1[k0++]&63,K=(J&31)<<12|Q<<6|W;if(K<2048||K>=55296&&K<=57343)G.push(65533);else G.push(K)}else if((J&248)===240){let Q=f1[k0++]&63,W=f1[k0++]&63,K=f1[k0++]&63,Z=(J&7)<<18|Q<<12|W<<6|K;if(Z<65536||Z>1114111)G.push(65533);else if(Z>65535)Z-=65536,G.push(Z>>>10&1023|55296),Z=56320|Z&1023,G.push(Z);else G.push(Z)}else G.push(65533);if(G.length>=4096)Y+=RY.apply(String,G),G.length=0}if(G.length>0)Y+=RY.apply(String,G);return Y}function ar0($,Y,X){let G=f1;f1=$,k0=Y;try{return RN(X)}finally{f1=G}}function hr0($){let Y=Array($);for(let X=0;X<$;X++)Y[X]=V7();if(O5.freezeData)return Object.freeze(Y);return Y}function fr0($){if(O5.mapsAsObjects){let Y={};for(let X=0;X<$;X++){let G=or0();if(G==="__proto__")G="__proto_";Y[G]=V7()}return Y}else{let Y=new Map;for(let X=0;X<$;X++)Y.set(V7(),V7());return Y}}var RY=String.fromCharCode;function sr0($){let Y=k0,X=Array($);for(let G=0;G<$;G++){let J=f1[k0++];if((J&128)>0){k0=Y;return}X[G]=J}return RY.apply(String,X)}function LJ0($){if($<4)if($<2)if($===0)return"";else{let Y=f1[k0++];if((Y&128)>1){k0-=1;return}return RY(Y)}else{let Y=f1[k0++],X=f1[k0++];if((Y&128)>0||(X&128)>0){k0-=2;return}if($<3)return RY(Y,X);let G=f1[k0++];if((G&128)>0){k0-=3;return}return RY(Y,X,G)}else{let Y=f1[k0++],X=f1[k0++],G=f1[k0++],J=f1[k0++];if((Y&128)>0||(X&128)>0||(G&128)>0||(J&128)>0){k0-=4;return}if($<6)if($===4)return RY(Y,X,G,J);else{let Q=f1[k0++];if((Q&128)>0){k0-=5;return}return RY(Y,X,G,J,Q)}else if($<8){let Q=f1[k0++],W=f1[k0++];if((Q&128)>0||(W&128)>0){k0-=6;return}if($<7)return RY(Y,X,G,J,Q,W);let K=f1[k0++];if((K&128)>0){k0-=7;return}return RY(Y,X,G,J,Q,W,K)}else{let Q=f1[k0++],W=f1[k0++],K=f1[k0++],Z=f1[k0++];if((Q&128)>0||(W&128)>0||(K&128)>0||(Z&128)>0){k0-=8;return}if($<10)if($===8)return RY(Y,X,G,J,Q,W,K,Z);else{let H=f1[k0++];if((H&128)>0){k0-=9;return}return RY(Y,X,G,J,Q,W,K,Z,H)}else if($<12){let H=f1[k0++],z=f1[k0++];if((H&128)>0||(z&128)>0){k0-=10;return}if($<11)return RY(Y,X,G,J,Q,W,K,Z,H,z);let V=f1[k0++];if((V&128)>0){k0-=11;return}return RY(Y,X,G,J,Q,W,K,Z,H,z,V)}else{let H=f1[k0++],z=f1[k0++],V=f1[k0++],F=f1[k0++];if((H&128)>0||(z&128)>0||(V&128)>0||(F&128)>0){k0-=12;return}if($<14)if($===12)return RY(Y,X,G,J,Q,W,K,Z,H,z,V,F);else{let L=f1[k0++];if((L&128)>0){k0-=13;return}return RY(Y,X,G,J,Q,W,K,Z,H,z,V,F,L)}else{let L=f1[k0++],N=f1[k0++];if((L&128)>0||(N&128)>0){k0-=14;return}if($<15)return RY(Y,X,G,J,Q,W,K,Z,H,z,V,F,L,N);let D=f1[k0++];if((D&128)>0){k0-=15;return}return RY(Y,X,G,J,Q,W,K,Z,H,z,V,F,L,N,D)}}}}}function gr0(){let $=f1[k0++],Y;if($<192)Y=$-160;else switch($){case 217:Y=f1[k0++];break;case 218:Y=E8.getUint16(k0),k0+=2;break;case 219:Y=E8.getUint32(k0),k0+=4;break;default:throw Error("Expected string")}return RN(Y)}function WJ0($){return O5.copyBuffers?Uint8Array.prototype.slice.call(f1,k0,k0+=$):f1.subarray(k0,k0+=$)}function EN($){let Y=f1[k0++];if(vJ[Y]){let X;return vJ[Y](f1.subarray(k0,X=k0+=$),(G)=>{k0=G;try{return V7()}finally{k0=X}})}else throw Error("Unknown extension type "+Y)}var mr0=Array(4096);function or0(){let $=f1[k0++];if($>=160&&$<192){if($=$-160,$2>=k0)return PH.slice(k0-lQ,(k0+=$)-lQ);else if(!($2==0&&iQ<180))return qc($)}else return k0--,tr0(V7());let Y=($<<5^($>1?E8.getUint16(k0):$>0?f1[k0]:0))&4095,X=mr0[Y],G=k0,J=k0+$-3,Q,W=0;if(X&&X.bytes==$){while(G<J){if(Q=E8.getUint32(G),Q!=X[W++]){G=1879048192;break}G+=4}J+=3;while(G<J)if(Q=f1[G++],Q!=X[W++]){G=1879048192;break}if(G===J)return k0=G,X.string;J-=3,G=k0}X=[],mr0[Y]=X,X.bytes=$;while(G<J)Q=E8.getUint32(G),X.push(Q),G+=4;J+=3;while(G<J)Q=f1[G++],X.push(Q);let K=$<16?LJ0($):sr0($);if(K!=null)return X.string=K;return X.string=qc($)}function tr0($){if(typeof $==="string")return $;if(typeof $==="number"||typeof $==="boolean"||typeof $==="bigint")return $.toString();if($==null)return $+"";if(O5.allowArraysInMapKeys&&Array.isArray($)&&$.flat().every((Y)=>["string","number","boolean","bigint"].includes(typeof Y)))return $.flat().toString();throw Error(`Invalid property type for record: ${typeof $}`)}var ur0=($,Y)=>{let X=V7().map(tr0),G=$;if(Y!==void 0)$=$<32?-((Y<<5)+$):(Y<<5)+$,X.highByte=Y;let J=C8[$];if(J&&(J.isShared||hV))(C8.restoreStructures||(C8.restoreStructures=[]))[$]=J;return C8[$]=X,X.read=FJ0(X,G),X.read()};vJ[0]=()=>{};vJ[0].noBuffer=!0;vJ[66]=($)=>{let Y=$.byteLength%8||8,X=BigInt($[0]&128?$[0]-256:$[0]);for(let G=1;G<Y;G++)X<<=BigInt(8),X+=BigInt($[G]);if($.byteLength!==Y){let G=new DataView($.buffer,$.byteOffset,$.byteLength),J=(Q,W)=>{let K=W-Q;if(K<=40){let V=G.getBigUint64(Q);for(let F=Q+8;F<W;F+=8)V<<=BigInt(64),V|=G.getBigUint64(F);return V}let Z=Q+(K>>4<<3),H=J(Q,Z),z=J(Z,W);return H<<BigInt((W-Z)*8)|z};X=X<<BigInt((G.byteLength-Y)*8)|J(Y,G.byteLength)}return X};var pr0={Error,EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,AggregateError:typeof AggregateError==="function"?AggregateError:null};vJ[101]=()=>{let $=V7();if(!pr0[$[0]]){let Y=Error($[1],{cause:$[2]});return Y.name=$[0],Y}return pr0[$[0]]($[1],{cause:$[2]})};vJ[105]=($)=>{if(O5.structuredClone===!1)throw Error("Structured clone extension is disabled");let Y=E8.getUint32(k0-4);if(!wH)wH=new Map;let X=f1[k0],G;if(X>=144&&X<160||X==220||X==221)G=[];else if(X>=128&&X<144||X==222||X==223)G=new Map;else if((X>=199&&X<=201||X>=212&&X<=216)&&f1[k0+1]===115)G=new Set;else G={};let J={target:G};wH.set(Y,J);let Q=V7();if(!J.used)return J.target=Q;else Object.assign(G,Q);if(G instanceof Map)for(let[W,K]of Q.entries())G.set(W,K);if(G instanceof Set)for(let W of Array.from(Q))G.add(W);return G};vJ[112]=($)=>{if(O5.structuredClone===!1)throw Error("Structured clone extension is disabled");let Y=E8.getUint32(k0-4),X=wH.get(Y);return X.used=!0,X.target};vJ[115]=()=>new Set(V7());var DJ0=["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64","BigInt64","BigUint64"].map(($)=>$+"Array"),zh4=typeof globalThis==="object"?globalThis:window;vJ[116]=($)=>{let Y=$[0],X=Uint8Array.prototype.slice.call($,1).buffer,G=DJ0[Y];if(!G){if(Y===16)return X;if(Y===17)return new DataView(X);throw Error("Could not find typed array for code "+Y)}return new zh4[G](X)};vJ[120]=()=>{let $=V7();return new RegExp($[0],$[1])};var Vh4=[];vJ[98]=($)=>{let Y=($[0]<<24)+($[1]<<16)+($[2]<<8)+$[3],X=k0;return k0+=Y-$.length,e7=Vh4,e7=[gr0(),gr0()],e7.position0=0,e7.position1=0,e7.postBundlePosition=k0,k0=X,V7()};vJ[255]=($)=>{if($.length==4)return new Date(($[0]*16777216+($[1]<<16)+($[2]<<8)+$[3])*1000);else if($.length==8)return new Date((($[0]<<22)+($[1]<<14)+($[2]<<6)+($[3]>>2))/1e6+(($[3]&3)*4294967296+$[4]*16777216+($[5]<<16)+($[6]<<8)+$[7])*1000);else if($.length==12)return new Date((($[0]<<24)+($[1]<<16)+($[2]<<8)+$[3])/1e6+(($[4]&128?-281474976710656:0)+$[6]*1099511627776+$[7]*4294967296+$[8]*16777216+($[9]<<16)+($[10]<<8)+$[11])*1000);else return new Date("invalid")};function er0($){if(HJ0)HJ0();let Y=iQ,X=k0,G=KS,J=lQ,Q=$2,W=PH,K=MN,Z=wH,H=e7,z=new Uint8Array(f1.slice(0,iQ)),V=C8,F=C8.slice(0,C8.length),L=O5,N=hV,D=$();return iQ=Y,k0=X,KS=G,lQ=J,$2=Q,PH=W,MN=K,wH=Z,e7=H,f1=z,hV=N,C8=V,C8.splice(0,C8.length,...F),O5=L,E8=new DataView(f1.buffer,f1.byteOffset,f1.byteLength),D}function Pc(){f1=null,wH=null,C8=null}var qN=Array(147);for(let $=0;$<256;$++)qN[$]=+("1e"+Math.floor(45.15-$*0.30103));var _c=new _H({useRecords:!1}),ZS=_c.unpack,Fh4=_c.unpackMultiple,Lh4=_c.unpack;var Dh4=new Float32Array(1),Im9=new Uint8Array(Dh4.buffer,0,4);function $a0($,Y,X){ZJ0=$,UJ0=Y,HJ0=X}var Tc;try{Tc=new TextEncoder}catch($){}var BJ0,OJ0,FR=typeof Buffer<"u",jc=FR?function($){return Buffer.allocUnsafeSlow($)}:Uint8Array,Qa0=FR?Buffer:Uint8Array,Ya0=FR?4294967296:2144337920,l0,US,E5,y0=0,hX,O$=null,Wa0,Nh4=21760,Ah4=/[\u0080-\uFFFF]/,TU=Symbol("record-id");class HS extends _H{constructor($){super($);this.offset=0;let Y,X,G,J,Q,W=Qa0.prototype.utf8Write?function(S,I){return l0.utf8Write(S,I,l0.byteLength-I)}:Tc&&Tc.encodeInto?function(S,I){return Tc.encodeInto(S,l0.subarray(I)).written}:!1,K=this;if(!$)$={};let Z=$&&$.sequential,H=$.structures||$.saveStructures,z=$.maxSharedStructures;if(z==null)z=H?32:0;if(z>8160)throw Error("Maximum maxSharedStructure is 8160");if($.structuredClone&&$.moreTypes==null)this.moreTypes=!0;let V=$.maxOwnStructures;if(V==null)V=H?32:64;if(!this.structures&&$.useRecords!=!1)this.structures=[];let F=z>32||V+z>64,L=z+64,N=z+V+64;if(N>8256)throw Error("Maximum maxSharedStructure + maxOwnStructure is 8192");let D=[],A=0,B=0;this.pack=this.encode=function(S,I){if(!l0)l0=new jc(8192),E5=l0.dataView||(l0.dataView=new DataView(l0.buffer,0,8192)),y0=0;if(hX=l0.length-10,hX-y0<2048)l0=new jc(l0.length),E5=l0.dataView||(l0.dataView=new DataView(l0.buffer,0,l0.length)),hX=l0.length-10,y0=0;else y0=y0+7&2147483640;if(X=y0,I&Va0)y0+=I&255;if(Q=K.structuredClone?new Map:null,K.bundleStrings&&typeof S!=="string")O$=[],O$.size=1/0;else O$=null;if(J=K.structures,J){if(J.uninitialized)J=K._mergeStructures(K.getStructures());let x=J.sharedLength||0;if(x>z)throw Error("Shared structures is larger than maximum shared structures, try increasing maxSharedStructures to "+J.sharedLength);if(!J.transitions){J.transitions=Object.create(null);for(let y=0;y<x;y++){let d=J[y];if(!d)continue;let u,b=J.transitions;for(let g=0,p=d.length;g<p;g++){let h=d[g];if(u=b[h],!u)u=b[h]=Object.create(null);b=u}b[TU]=y+64}this.lastNamedStructuresLength=x}if(!Z)J.nextId=x+64}if(G)G=!1;let v;try{if(K.randomAccessStructure&&S&&typeof S==="object")if(S.constructor===Object)k(S);else if(S.constructor!==Map&&!Array.isArray(S)&&!OJ0.some((y)=>S instanceof y))k(S.toJSON?S.toJSON():S);else M(S);else M(S);let x=O$;if(O$)Ga0(X,M,0);if(Q&&Q.idsToInsert){let y=Q.idsToInsert.sort((g,p)=>g.offset>p.offset?1:-1),d=y.length,u=-1;while(x&&d>0){let g=y[--d].offset+X;if(g<x.stringsPosition+X&&u===-1)u=0;if(g>x.position+X){if(u>=0)u+=6}else{if(u>=0)E5.setUint32(x.position+X,E5.getUint32(x.position+X)+u),u=-1;x=x.previous,d++}}if(u>=0&&x)E5.setUint32(x.position+X,E5.getUint32(x.position+X)+u);if(y0+=y.length*6,y0>hX)w(y0);K.offset=y0;let b=Bh4(l0.subarray(X,y0),y);return Q=null,b}if(K.offset=y0,I&Ha0)return l0.start=X,l0.end=y0,l0;return l0.subarray(X,y0)}catch(x){throw v=x,x}finally{if(J){if(O(),G&&K.saveStructures){let x=J.sharedLength||0,y=l0.subarray(X,y0),d=Ka0(J,K);if(!v){if(K.saveStructures(d,d.isCompatible)===!1)return K.pack(S,I);if(K.lastNamedStructuresLength=x,l0.length>1073741824)l0=null;return y}}}if(l0.length>1073741824)l0=null;if(I&za0)y0=X}};let O=()=>{if(B<10)B++;let S=J.sharedLength||0;if(J.length>S&&!Z)J.length=S;if(A>1e4){if(J.transitions=null,B=0,A=0,D.length>0)D=[]}else if(D.length>0&&!Z){for(let I=0,v=D.length;I<v;I++)D[I][TU]=0;D=[]}},E=(S)=>{var I=S.length;if(I<16)l0[y0++]=144|I;else if(I<65536)l0[y0++]=220,l0[y0++]=I>>8,l0[y0++]=I&255;else l0[y0++]=221,E5.setUint32(y0,I),y0+=4;for(let v=0;v<I;v++)M(S[v])},M=(S)=>{if(y0>hX)l0=w(y0);var I=typeof S,v;if(I==="string"){let x=S.length;if(O$&&x>=4&&x<4096){if((O$.size+=x)>Nh4){let b,g=(O$[0]?O$[0].length*3+O$[1].length:0)+10;if(y0+g>hX)l0=w(y0+g);let p;if(O$.position)p=O$,l0[y0]=200,y0+=3,l0[y0++]=98,b=y0-X,y0+=4,Ga0(X,M,0),E5.setUint16(b+X-3,y0-X-b);else l0[y0++]=214,l0[y0++]=98,b=y0-X,y0+=4;O$=["",""],O$.previous=p,O$.size=0,O$.position=b}let u=Ah4.test(S);O$[u?0:1]+=S,l0[y0++]=193,M(u?-x:x);return}let y;if(x<32)y=1;else if(x<256)y=2;else if(x<65536)y=3;else y=5;let d=x*3;if(y0+d>hX)l0=w(y0+d);if(x<64||!W){let u,b,g,p=y0+y;for(u=0;u<x;u++)if(b=S.charCodeAt(u),b<128)l0[p++]=b;else if(b<2048)l0[p++]=b>>6|192,l0[p++]=b&63|128;else if((b&64512)===55296&&((g=S.charCodeAt(u+1))&64512)===56320)b=65536+((b&1023)<<10)+(g&1023),u++,l0[p++]=b>>18|240,l0[p++]=b>>12&63|128,l0[p++]=b>>6&63|128,l0[p++]=b&63|128;else l0[p++]=b>>12|224,l0[p++]=b>>6&63|128,l0[p++]=b&63|128;v=p-y0-y}else v=W(S,y0+y);if(v<32)l0[y0++]=160|v;else if(v<256){if(y<2)l0.copyWithin(y0+2,y0+1,y0+1+v);l0[y0++]=217,l0[y0++]=v}else if(v<65536){if(y<3)l0.copyWithin(y0+3,y0+2,y0+2+v);l0[y0++]=218,l0[y0++]=v>>8,l0[y0++]=v&255}else{if(y<5)l0.copyWithin(y0+5,y0+3,y0+3+v);l0[y0++]=219,E5.setUint32(y0,v),y0+=4}y0+=v}else if(I==="number")if(S>>>0===S)if(S<32||S<128&&this.useRecords===!1||S<64&&!this.randomAccessStructure)l0[y0++]=S;else if(S<256)l0[y0++]=204,l0[y0++]=S;else if(S<65536)l0[y0++]=205,l0[y0++]=S>>8,l0[y0++]=S&255;else l0[y0++]=206,E5.setUint32(y0,S),y0+=4;else if(S>>0===S)if(S>=-32)l0[y0++]=256+S;else if(S>=-128)l0[y0++]=208,l0[y0++]=S+256;else if(S>=-32768)l0[y0++]=209,E5.setInt16(y0,S),y0+=2;else l0[y0++]=210,E5.setInt32(y0,S),y0+=4;else{let x;if((x=this.useFloat32)>0&&S<4294967296&&S>=-2147483648){l0[y0++]=202,E5.setFloat32(y0,S);let y;if(x<4||(y=S*qN[(l0[y0]&127)<<1|l0[y0+1]>>7])>>0===y){y0+=4;return}else y0--}l0[y0++]=203,E5.setFloat64(y0,S),y0+=8}else if(I==="object"||I==="function")if(!S)l0[y0++]=192;else{if(Q){let y=Q.get(S);if(y){if(!y.id){let d=Q.idsToInsert||(Q.idsToInsert=[]);y.id=d.push(y)}l0[y0++]=214,l0[y0++]=112,E5.setUint32(y0,y.id),y0+=4;return}else Q.set(S,{offset:y0-X})}let x=S.constructor;if(x===Object)P(S);else if(x===Array)E(S);else if(x===Map)if(this.mapAsEmptyObject)l0[y0++]=128;else{if(v=S.size,v<16)l0[y0++]=128|v;else if(v<65536)l0[y0++]=222,l0[y0++]=v>>8,l0[y0++]=v&255;else l0[y0++]=223,E5.setUint32(y0,v),y0+=4;for(let[y,d]of S)M(y),M(d)}else{for(let y=0,d=BJ0.length;y<d;y++){let u=OJ0[y];if(S instanceof u){let b=BJ0[y];if(b.write){if(b.type)l0[y0++]=212,l0[y0++]=b.type,l0[y0++]=0;let t=b.write.call(this,S);if(t===S)if(Array.isArray(S))E(S);else P(S);else M(t);return}let g=l0,p=E5,h=y0;l0=null;let n;try{n=b.pack.call(this,S,(t)=>{if(l0=g,g=null,y0+=t,y0>hX)w(y0);return{target:l0,targetView:E5,position:y0-t}},M)}finally{if(g)l0=g,E5=p,y0=h,hX=l0.length-10}if(n){if(n.length+y0>hX)w(n.length+y0);y0=Xa0(n,l0,y0,b.type)}return}}if(Array.isArray(S))E(S);else{if(S.toJSON){let y=S.toJSON();if(y!==S)return M(y)}if(I==="function")return M(this.writeFunction&&this.writeFunction(S));P(S)}}}else if(I==="boolean")l0[y0++]=S?195:194;else if(I==="bigint"){if(S<9223372036854776000&&S>=-9223372036854776000)l0[y0++]=211,E5.setBigInt64(y0,S);else if(S<18446744073709552000&&S>0)l0[y0++]=207,E5.setBigUint64(y0,S);else if(this.largeBigIntToFloat)l0[y0++]=203,E5.setFloat64(y0,Number(S));else if(this.largeBigIntToString)return M(S.toString());else if(this.useBigIntExtension||this.moreTypes){let x=S<0?BigInt(-1):BigInt(0),y;if(S>>BigInt(65536)===x){let d=BigInt(18446744073709552000)-BigInt(1),u=[];while(!0){if(u.push(S&d),S>>BigInt(63)===x)break;S>>=BigInt(64)}y=new Uint8Array(new BigUint64Array(u).buffer),y.reverse()}else{let d=S<0,u=(d?~S:S).toString(16);if(u.length%2)u="0"+u;else if(parseInt(u.charAt(0),16)>=8)u="00"+u;if(FR)y=Buffer.from(u,"hex");else{y=new Uint8Array(u.length/2);for(let b=0;b<y.length;b++)y[b]=parseInt(u.slice(b*2,b*2+2),16)}if(d)for(let b=0;b<y.length;b++)y[b]=~y[b]}if(y.length+y0>hX)w(y.length+y0);y0=Xa0(y,l0,y0,66);return}else throw RangeError(S+" was too large to fit in MessagePack 64-bit integer format, use useBigIntExtension, or set largeBigIntToFloat to convert to float-64, or set largeBigIntToString to convert to string");y0+=8}else if(I==="undefined")if(this.encodeUndefinedAsNil)l0[y0++]=192;else l0[y0++]=212,l0[y0++]=0,l0[y0++]=0;else throw Error("Unknown type: "+I)},R=this.variableMapSize||this.coercibleKeyAsNumber||this.skipValues?(S)=>{let I;if(this.skipValues){I=[];for(let y in S)if((typeof S.hasOwnProperty!=="function"||S.hasOwnProperty(y))&&!this.skipValues.includes(S[y]))I.push(y)}else I=Object.keys(S);let v=I.length;if(v<16)l0[y0++]=128|v;else if(v<65536)l0[y0++]=222,l0[y0++]=v>>8,l0[y0++]=v&255;else l0[y0++]=223,E5.setUint32(y0,v),y0+=4;let x;if(this.coercibleKeyAsNumber)for(let y=0;y<v;y++){x=I[y];let d=Number(x);M(isNaN(d)?x:d),M(S[x])}else for(let y=0;y<v;y++)M(x=I[y]),M(S[x])}:(S)=>{l0[y0++]=222;let I=y0-X;y0+=2;let v=0;for(let x in S)if(typeof S.hasOwnProperty!=="function"||S.hasOwnProperty(x))M(x),M(S[x]),v++;if(v>65535)throw Error('Object is too large to serialize with fast 16-bit map size, use the "variableMapSize" option to serialize this object');l0[I+++X]=v>>8,l0[I+X]=v&255},q=this.useRecords===!1?R:$.progressiveRecords&&!F?(S)=>{let I,v=J.transitions||(J.transitions=Object.create(null)),x=y0++-X,y;for(let d in S)if(typeof S.hasOwnProperty!=="function"||S.hasOwnProperty(d)){if(I=v[d],I)v=I;else{let u=Object.keys(S),b=v;v=J.transitions;let g=0;for(let p=0,h=u.length;p<h;p++){let n=u[p];if(I=v[n],!I)I=v[n]=Object.create(null),g++;v=I}if(x+X+1==y0)y0--,j(v,u,g);else C(v,u,x,g);y=!0,v=b[d]}M(S[d])}if(!y){let d=v[TU];if(d)l0[x+X]=d;else C(v,Object.keys(S),x,0)}}:(S)=>{let I,v=J.transitions||(J.transitions=Object.create(null)),x=0;for(let d in S)if(typeof S.hasOwnProperty!=="function"||S.hasOwnProperty(d)){if(I=v[d],!I)I=v[d]=Object.create(null),x++;v=I}let y=v[TU];if(y)if(y>=96&&F)l0[y0++]=((y-=96)&31)+96,l0[y0++]=y>>5;else l0[y0++]=y;else j(v,v.__keys__||Object.keys(S),x);for(let d in S)if(typeof S.hasOwnProperty!=="function"||S.hasOwnProperty(d))M(S[d])},_=typeof this.useRecords=="function"&&this.useRecords,P=_?(S)=>{_(S)?q(S):R(S)}:q,w=(S)=>{let I;if(S>16777216){if(S-X>Ya0)throw Error("Packed buffer would be larger than maximum buffer size");I=Math.min(Ya0,Math.round(Math.max((S-X)*(S>67108864?1.25:2),4194304)/4096)*4096)}else I=(Math.max(S-X<<2,l0.length-1)>>12)+1<<12;let v=new jc(I);if(E5=v.dataView||(v.dataView=new DataView(v.buffer,0,I)),S=Math.min(S,l0.length),l0.copy)l0.copy(v,0,X,S);else v.set(l0.slice(X,S));return y0-=X,X=0,hX=v.length-10,l0=v},j=(S,I,v)=>{let x=J.nextId;if(!x)x=64;if(x<L&&this.shouldShareStructure&&!this.shouldShareStructure(I)){if(x=J.nextOwnId,!(x<N))x=L;J.nextOwnId=x+1}else{if(x>=N)x=L;J.nextId=x+1}let y=I.highByte=x>=96&&F?x-96>>5:-1;if(S[TU]=x,S.__keys__=I,J[x-64]=I,x<L)if(I.isShared=!0,J.sharedLength=x-63,G=!0,y>=0)l0[y0++]=(x&31)+96,l0[y0++]=y;else l0[y0++]=x;else{if(y>=0)l0[y0++]=213,l0[y0++]=114,l0[y0++]=(x&31)+96,l0[y0++]=y;else l0[y0++]=212,l0[y0++]=114,l0[y0++]=x;if(v)A+=B*v;if(D.length>=V)D.shift()[TU]=0;D.push(S),M(I)}},C=(S,I,v,x)=>{let y=l0,d=y0,u=hX,b=X;if(l0=US,y0=0,X=0,!l0)US=l0=new jc(8192);hX=l0.length-10,j(S,I,x),US=l0;let g=y0;if(l0=y,y0=d,hX=u,X=b,g>1){let p=y0+g-1;if(p>hX)w(p);let h=v+X;l0.copyWithin(h+g,h+1,y0),l0.set(US.slice(0,g),h),y0=p}else l0[v+X]=US[0]},k=(S)=>{let I=Wa0(S,l0,X,y0,J,w,(v,x,y)=>{if(y)return G=!0;y0=x;let d=l0;if(M(v),O(),d!==l0)return{position:y0,targetView:E5,target:l0};return y0},this);if(I===0)return P(S);y0=I}}useBuffer($){l0=$,l0.dataView||(l0.dataView=new DataView(l0.buffer,l0.byteOffset,l0.byteLength)),E5=l0.dataView,y0=0}set position($){y0=$}get position(){return y0}clearSharedData(){if(this.structures)this.structures=[];if(this.typedStructs)this.typedStructs=[]}}OJ0=[Date,Set,Error,RegExp,ArrayBuffer,Object.getPrototypeOf(Uint8Array.prototype).constructor,DataView,wc];BJ0=[{pack($,Y,X){let G=$.getTime()/1000;if((this.useTimestamp32||$.getMilliseconds()===0)&&G>=0&&G<4294967296){let{target:J,targetView:Q,position:W}=Y(6);J[W++]=214,J[W++]=255,Q.setUint32(W,G)}else if(G>0&&G<4294967296){let{target:J,targetView:Q,position:W}=Y(10);J[W++]=215,J[W++]=255,Q.setUint32(W,$.getMilliseconds()*4000000+(G/1000/4294967296>>0)),Q.setUint32(W+4,G)}else if(isNaN(G)){if(this.onInvalidDate)return Y(0),X(this.onInvalidDate());let{target:J,targetView:Q,position:W}=Y(3);J[W++]=212,J[W++]=255,J[W++]=255}else{let{target:J,targetView:Q,position:W}=Y(15);J[W++]=199,J[W++]=12,J[W++]=255,Q.setUint32(W,$.getMilliseconds()*1e6),Q.setBigInt64(W+4,BigInt(Math.floor(G)))}}},{pack($,Y,X){if(this.setAsEmptyObject)return Y(0),X({});let G=Array.from($),{target:J,position:Q}=Y(this.moreTypes?3:0);if(this.moreTypes)J[Q++]=212,J[Q++]=115,J[Q++]=0;X(G)}},{pack($,Y,X){let{target:G,position:J}=Y(this.moreTypes?3:0);if(this.moreTypes)G[J++]=212,G[J++]=101,G[J++]=0;X([$.name,$.message,$.cause])}},{pack($,Y,X){let{target:G,position:J}=Y(this.moreTypes?3:0);if(this.moreTypes)G[J++]=212,G[J++]=120,G[J++]=0;X([$.source,$.flags])}},{pack($,Y){if(this.moreTypes)NJ0($,16,Y);else AJ0(FR?Buffer.from($):new Uint8Array($),Y)}},{pack($,Y){let X=$.constructor;if(X!==Qa0&&this.moreTypes)NJ0($,DJ0.indexOf(X.name),Y);else AJ0($,Y)}},{pack($,Y){if(this.moreTypes)NJ0($,17,Y);else AJ0(FR?Buffer.from($):new Uint8Array($),Y)}},{pack($,Y){let{target:X,position:G}=Y(1);X[G]=193}}];function NJ0($,Y,X,G){let J=$.byteLength;if(J+1<256){var{target:Q,position:W}=X(4+J);Q[W++]=199,Q[W++]=J+1}else if(J+1<65536){var{target:Q,position:W}=X(5+J);Q[W++]=200,Q[W++]=J+1>>8,Q[W++]=J+1&255}else{var{target:Q,position:W,targetView:K}=X(7+J);Q[W++]=201,K.setUint32(W,J+1),W+=4}if(Q[W++]=116,Q[W++]=Y,!$.buffer)$=new Uint8Array($);Q.set(new Uint8Array($.buffer,$.byteOffset,$.byteLength),W)}function AJ0($,Y){let X=$.byteLength;var G,J;if(X<256){var{target:G,position:J}=Y(X+2);G[J++]=196,G[J++]=X}else if(X<65536){var{target:G,position:J}=Y(X+3);G[J++]=197,G[J++]=X>>8,G[J++]=X&255}else{var{target:G,position:J,targetView:Q}=Y(X+5);G[J++]=198,Q.setUint32(J,X),J+=4}G.set($,J)}function Xa0($,Y,X,G){let J=$.length;switch(J){case 1:Y[X++]=212;break;case 2:Y[X++]=213;break;case 4:Y[X++]=214;break;case 8:Y[X++]=215;break;case 16:Y[X++]=216;break;default:if(J<256)Y[X++]=199,Y[X++]=J;else if(J<65536)Y[X++]=200,Y[X++]=J>>8,Y[X++]=J&255;else Y[X++]=201,Y[X++]=J>>24,Y[X++]=J>>16&255,Y[X++]=J>>8&255,Y[X++]=J&255}return Y[X++]=G,Y.set($,X),X+=J,X}function Bh4($,Y){let X,G=Y.length*6,J=$.length-G;while(X=Y.pop()){let{offset:Q,id:W}=X;$.copyWithin(Q+G,Q,J),G-=6;let K=Q+G;$[K++]=214,$[K++]=105,$[K++]=W>>24,$[K++]=W>>16&255,$[K++]=W>>8&255,$[K++]=W&255,J=Q}return $}function Ga0($,Y,X){if(O$.length>0){E5.setUint32(O$.position+$,y0+X-O$.position-$),O$.stringsPosition=y0-$;let G=O$;O$=null,Y(G[0]),Y(G[1])}}function Ka0($,Y){return $.isCompatible=(X)=>{let G=!X||(Y.lastNamedStructuresLength||0)===X.length;if(!G)Y._mergeStructures(X);return G},$}function Za0($,Y){Wa0=$,Ka0=Y}var Ua0=new HS({useRecords:!1}),LR=Ua0.pack,Oh4=Ua0.pack;var Ha0=512,za0=1024,Va0=2048;var EJ0=3,NR=0,zS=2,Ic=1,RJ0=16,La0=["num","object","string","ascii"];La0[RJ0]="date";var Mh4=[!1,!0,!0,!1,!1,!0,!0,!1],Da0;try{Function(""),Da0=!0}catch($){}var PN,Rh4=typeof Buffer<"u",Cc,IU;try{Cc=new TextEncoder}catch($){}var qh4=Rh4?function($,Y,X){return $.utf8Write(Y,X,$.byteLength-X)}:Cc&&Cc.encodeInto?function($,Y,X){return Cc.encodeInto(Y,$.subarray(X)).written}:!1,fm9=Symbol("type"),gm9=Symbol("parent");Za0(Na0,Th4);function Na0($,Y,X,G,J,Q,W,K){let Z=K.typedStructs||(K.typedStructs=[]),H=Y.dataView,z=(Z.lastStringStart||100)+G,V=Y.length-10,F=G;if(G>V)Y=Q(G),H=Y.dataView,G-=X,F-=X,z-=X,X=0,V=Y.length-10;let L,N=z,D=Z.transitions||(Z.transitions=Object.create(null)),A=Z.nextId||Z.length,B=A<15?1:A<240?2:A<61440?3:A<15728640?4:0;if(B===0)return 0;G+=B;let O=[],E,M=0;for(let q in $){let _=$[q],P=D[q];if(!P)D[q]=P={key:q,parent:D,enumerationOffset:0,ascii0:null,ascii8:null,num8:null,string16:null,object16:null,num32:null,float64:null,date64:null};if(G>V)Y=Q(G),H=Y.dataView,G-=X,F-=X,z-=X,N-=X,X=0,V=Y.length-10;switch(typeof _){case"number":let w=_;if(A<200||!P.num64){if(w>>0===w&&w<536870912&&w>-520093696){if(w<246&&w>=0&&(P.num8&&!(A>200&&P.num32)||w<32&&!P.num32))D=P.num8||xJ(P,NR,1),Y[G++]=w;else D=P.num32||xJ(P,NR,4),H.setUint32(G,w,!0),G+=4;break}else if(w<4294967296&&w>=-2147483648){if(H.setFloat32(G,w,!0),Mh4[Y[G+3]>>>5]){let S;if((S=w*qN[(Y[G+3]&127)<<1|Y[G+2]>>7])>>0===S){D=P.num32||xJ(P,NR,4),G+=4;break}}}}D=P.num64||xJ(P,NR,8),H.setFloat64(G,w,!0),G+=8;break;case"string":let j=_.length;if(L=N-z,(j<<2)+N>V)Y=Q((j<<2)+N),H=Y.dataView,G-=X,F-=X,z-=X,N-=X,X=0,V=Y.length-10;if(j>65280+L>>2){O.push(q,_,G-F);break}let C,k=N;if(j<64){let S,I,v;for(S=0;S<j;S++)if(I=_.charCodeAt(S),I<128)Y[N++]=I;else if(I<2048)C=!0,Y[N++]=I>>6|192,Y[N++]=I&63|128;else if((I&64512)===55296&&((v=_.charCodeAt(S+1))&64512)===56320)C=!0,I=65536+((I&1023)<<10)+(v&1023),S++,Y[N++]=I>>18|240,Y[N++]=I>>12&63|128,Y[N++]=I>>6&63|128,Y[N++]=I&63|128;else C=!0,Y[N++]=I>>12|224,Y[N++]=I>>6&63|128,Y[N++]=I&63|128}else N+=qh4(Y,_,N),C=N-k>j;if(L<160||L<246&&(P.ascii8||P.string8)){if(C){if(!(D=P.string8))if(Z.length>10&&(D=P.ascii8))D.__type=zS,P.ascii8=null,P.string8=D,W(null,0,!0);else D=xJ(P,zS,1)}else if(L===0&&!E){E=!0,D=P.ascii0||xJ(P,EJ0,0);break}else if(!(D=P.ascii8)&&!(Z.length>10&&(D=P.string8)))D=xJ(P,EJ0,1);Y[G++]=L}else D=P.string16||xJ(P,zS,2),H.setUint16(G,L,!0),G+=2;break;case"object":if(_){if(_.constructor===Date)D=P.date64||xJ(P,RJ0,8),H.setFloat64(G,_.getTime(),!0),G+=8;else O.push(q,_,M);break}else if(P=Fa0(P,G,H,-10),P)D=P,G=PN;else O.push(q,_,M);break;case"boolean":D=P.num8||P.ascii8||xJ(P,NR,1),Y[G++]=_?249:248;break;case"undefined":if(P=Fa0(P,G,H,-9),P)D=P,G=PN;else O.push(q,_,M);break;default:O.push(q,_,M)}M++}for(let q=0,_=O.length;q<_;){let P=O[q++],w=O[q++],j=O[q++],C=D[P];if(!C)D[P]=C={key:P,parent:D,enumerationOffset:j-M,ascii0:null,ascii8:null,num8:null,string16:null,object16:null,num32:null,float64:null};let k;if(w){let S;if(L=N-z,L<65280)if(D=C.object16,D)S=2;else if(D=C.object32)S=4;else D=xJ(C,Ic,2),S=2;else D=C.object32||xJ(C,Ic,4),S=4;if(k=W(w,N),typeof k==="object")N=k.position,H=k.targetView,Y=k.target,z-=X,G-=X,F-=X,X=0;else N=k;if(S===2)H.setUint16(G,L,!0),G+=2;else H.setUint32(G,L,!0),G+=4}else D=C.object16||xJ(C,Ic,2),H.setInt16(G,w===null?-10:-9,!0),G+=2;M++}let R=D[TU];if(R==null){R=K.typedStructs.length;let q=[],_=D,P,w;while((w=_.__type)!==void 0){let j=_.__size;_=_.__parent,P=_.key;let C=[w,j,P];if(_.enumerationOffset)C.push(_.enumerationOffset);q.push(C),_=_.parent}q.reverse(),D[TU]=R,K.typedStructs[R]=q,W(null,0,!0)}switch(B){case 1:if(R>=16)return 0;Y[F]=R+32;break;case 2:if(R>=256)return 0;Y[F]=56,Y[F+1]=R;break;case 3:if(R>=65536)return 0;Y[F]=57,H.setUint16(F+1,R,!0);break;case 4:if(R>=16777216)return 0;H.setUint32(F,(R<<8)+58,!0);break}if(G<z){if(z===N)return G;Y.copyWithin(G,z,N),N+=G-z,Z.lastStringStart=G-F}else if(G>z){if(z===N)return G;return Z.lastStringStart=G-F,Na0($,Y,X,F,J,Q,W,K)}return N}function Fa0($,Y,X,G){let J;if(J=$.ascii8||$.num8)return X.setInt8(Y,G,!0),PN=Y+1,J;if(J=$.string16||$.object16)return X.setInt16(Y,G,!0),PN=Y+2,J;if(J=$.num32)return X.setUint32(Y,3758096640+G,!0),PN=Y+4,J;if(J=$.num64)return X.setFloat64(Y,NaN,!0),X.setInt8(Y,G),PN=Y+8,J;PN=Y;return}function xJ($,Y,X){let G=La0[Y]+(X<<3),J=$[G]||($[G]=Object.create(null));return J.__type=Y,J.__size=X,J.__parent=$,J}function Ph4($){if(!($ instanceof Map))return $;let Y=$.get("typed")||[];if(Object.isFrozen(Y))Y=Y.map((J)=>J.slice(0));let X=$.get("named"),G=Object.create(null);for(let J=0,Q=Y.length;J<Q;J++){let W=Y[J],K=G;for(let[Z,H,z]of W){let V=K[z];if(!V)K[z]=V={key:z,parent:K,enumerationOffset:0,ascii0:null,ascii8:null,num8:null,string16:null,object16:null,num32:null,float64:null,date64:null};K=xJ(V,Z,H)}K[TU]=J}return Y.transitions=G,this.typedStructs=Y,this.lastTypedStructuresLength=Y.length,X}var MJ0=Symbol.for("source");function wh4($,Y,X,G){let J=$[Y++]-32;if(J>=24)switch(J){case 24:J=$[Y++];break;case 25:J=$[Y++]+($[Y++]<<8);break;case 26:J=$[Y++]+($[Y++]<<8)+($[Y++]<<16);break;case 27:J=$[Y++]+($[Y++]<<8)+($[Y++]<<16)+($[Y++]<<24);break}let Q=G.typedStructs&&G.typedStructs[J];if(!Q){if($=Uint8Array.prototype.slice.call($,Y,X),X-=Y,Y=0,!G.getStructures)throw Error(`Reference to shared structure ${J} without getStructures method`);if(G._mergeStructures(G.getStructures()),!G.typedStructs)throw Error("Could not find any shared typed structures");if(G.lastTypedStructuresLength=G.typedStructs.length,Q=G.typedStructs[J],!Q)throw Error("Could not find typed structure "+J)}var{construct:W,fullConstruct:K}=Q;if(!W){W=Q.construct=function(){},K=Q.fullConstruct=function(){},K.prototype=G.structPrototype||{};var Z=W.prototype=G.structPrototype?Object.create(G.structPrototype):{};let z=[],V=0,F;for(let L=0,N=Q.length;L<N;L++){let D=Q[L],[A,B,O,E]=D;if(O==="__proto__")O="__proto_";let M={key:O,offset:V};if(E)z.splice(L+E,0,M);else z.push(M);let R;switch(B){case 0:R=()=>0;break;case 1:R=(_,P)=>{let w=_.bytes[P+M.offset];return w>=246?DR(w):w};break;case 2:R=(_,P)=>{let w=_.bytes,C=(w.dataView||(w.dataView=new DataView(w.buffer,w.byteOffset,w.byteLength))).getUint16(P+M.offset,!0);return C>=65280?DR(C&255):C};break;case 4:R=(_,P)=>{let w=_.bytes,C=(w.dataView||(w.dataView=new DataView(w.buffer,w.byteOffset,w.byteLength))).getUint32(P+M.offset,!0);return C>=4294967040?DR(C&255):C};break}M.getRef=R,V+=B;let q;switch(A){case EJ0:if(F&&!F.next)F.next=M;F=M,M.multiGetCount=0,q=function(_){let{bytes:P,position:w}=_,j=V+w,C=R(_,w);if(typeof C!=="number")return C;let k,S=M.next;while(S){if(k=S.getRef(_,w),typeof k==="number")break;else k=null;S=S.next}if(k==null)k=_.bytesEnd-j;if(_.srcString)return _.srcString.slice(C,k);return ar0(P,C+j,k-C)};break;case zS:case Ic:if(F&&!F.next)F.next=M;F=M,q=function(_){let P=_.position,w=V+P,j=R(_,P);if(typeof j!=="number")return j;let C=_.bytes,k,S=M.next;while(S){if(k=S.getRef(_,P),typeof k==="number")break;else k=null;S=S.next}if(k==null)k=_.bytesEnd-w;if(A===zS)return C.toString("utf8",j+w,k+w);else{IU=_;try{return G.unpack(C,{start:j+w,end:k+w})}finally{IU=null}}};break;case NR:switch(B){case 4:q=function(_){let P=_.bytes,w=P.dataView||(P.dataView=new DataView(P.buffer,P.byteOffset,P.byteLength)),j=_.position+M.offset,C=w.getInt32(j,!0);if(C<536870912){if(C>-520093696)return C;if(C>-536870912)return DR(C&255)}let k=w.getFloat32(j,!0),S=qN[(P[j+3]&127)<<1|P[j+2]>>7];return(S*k+(k>0?0.5:-0.5)>>0)/S};break;case 8:q=function(_){let P=_.bytes,j=(P.dataView||(P.dataView=new DataView(P.buffer,P.byteOffset,P.byteLength))).getFloat64(_.position+M.offset,!0);if(isNaN(j)){let C=P[_.position+M.offset];if(C>=246)return DR(C)}return j};break;case 1:q=function(_){let w=_.bytes[_.position+M.offset];return w<246?w:DR(w)};break}break;case RJ0:q=function(_){let P=_.bytes,w=P.dataView||(P.dataView=new DataView(P.buffer,P.byteOffset,P.byteLength));return new Date(w.getFloat64(_.position+M.offset,!0))};break}M.get=q}if(Da0){let L=[],N=[],D=0,A;for(let O of z){if(G.alwaysLazyProperty&&G.alwaysLazyProperty(O.key)){A=!0;continue}Object.defineProperty(Z,O.key,{get:_h4(O.get),enumerable:!0});let E="v"+D++;N.push(E),L.push("o["+JSON.stringify(O.key)+"]="+E+"(s)")}if(A)L.push("__proto__:this");let B=Function(...N,"var c=this;return function(s){var o=new c();"+L.join(";")+";return o;}").apply(K,z.map((O)=>O.get));Object.defineProperty(Z,"toJSON",{value(O){return B.call(this,this[MJ0])}})}else Object.defineProperty(Z,"toJSON",{value(L){let N={};for(let D=0,A=z.length;D<A;D++){let B=z[D].key;N[B]=this[B]}return N}})}var H=new W;return H[MJ0]={bytes:$,position:Y,srcString:"",bytesEnd:X},H}function DR($){switch($){case 246:return null;case 247:return;case 248:return!1;case 249:return!0}throw Error("Unknown constant")}function _h4($){return function(){return $(this[MJ0])}}function jh4(){if(IU)IU.bytes=Uint8Array.prototype.slice.call(IU.bytes,IU.position,IU.bytesEnd),IU.position=0,IU.bytesEnd=IU.bytes.length}function Th4($,Y){if(Y.typedStructs){let G=new Map;G.set("named",$),G.set("typed",Y.typedStructs),$=G}let X=Y.lastTypedStructuresLength||0;return $.isCompatible=(G)=>{let J=!0;if(G instanceof Map){if((G.get("named")||[]).length!==(Y.lastNamedStructuresLength||0))J=!1;if((G.get("typed")||[]).length!==X)J=!1}else if(G instanceof Array||Array.isArray(G)){if(G.length!==(Y.lastNamedStructuresLength||0))J=!1}if(!J)Y._mergeStructures(G);return J},Y.lastTypedStructuresLength=Y.typedStructs&&Y.typedStructs.length,$}$a0(wh4,Ph4,jh4);var eh4=process.env.MSGPACKR_NATIVE_ACCELERATION_DISABLED!==void 0&&process.env.MSGPACKR_NATIVE_ACCELERATION_DISABLED.toLowerCase()==="true";if(!eh4){let $;try{if($=Ys0(),$)rr0($.extractStrings)}catch(Y){}}class kJ0 extends Error{constructor($="Client closed"){super($);this.name="ClientClosedError"}}var Xs0=!1;function Yf4(){if(Xs0)return;Xs0=!0,process.on("unhandledRejection",($)=>{if($ instanceof kJ0)return})}class BR extends $f4{on($,Y){return super.on($,Y)}once($,Y){return super.once($,Y)}socket=null;connected=!1;connecting=!1;options;health;reconnect;commands;reqIdCounter=0;constructor($={}){super();this.options={...Bc,...$},this.commands=new Mc,this.health=new WS({pingInterval:this.options.pingInterval,maxPingFailures:this.options.maxPingFailures}),this.reconnect=new Oc({maxReconnectAttempts:this.options.maxReconnectAttempts,reconnectDelay:this.options.reconnectDelay,maxReconnectDelay:this.options.maxReconnectDelay,autoReconnect:this.options.autoReconnect}),this.reconnect.on("reconnecting",(Y)=>this.emit("reconnecting",Y)),this.reconnect.on("maxReconnectAttemptsReached",()=>{this.emit("maxReconnectAttemptsReached"),this.commands.rejectAll(Error("Max reconnection attempts reached"))})}async connect(){if(this.connected)return;if(this.connecting)return this.waitForConnection();this.connecting=!0,this.reconnect.setClosed(!1);try{await this.doConnect(),this.reconnect.reset(),this.emit("connected"),this.health.startPing(async()=>{await this.ping()}),this.processQueue()}catch($){if(this.connecting=!1,this.reconnect.canReconnect())this.reconnect.scheduleReconnect(()=>this.connect());throw $}}waitForConnection(){return new Promise(($,Y)=>{let X=()=>{this.off("error",G),$()},G=(J)=>{this.off("connected",X),Y(J)};this.once("connected",X),this.once("error",G)})}async doConnect(){let{socket:$}=await QJ0({host:this.options.host,port:this.options.port},this.options.connectTimeout,{onData:(Y)=>{this.handleData(Y)},onClose:()=>{this.handleClose()},onError:(Y)=>this.emit("error",Y)});if(this.socket=$,this.options.token)try{await this.authenticate()}catch(Y){throw this.socket.end(),this.socket=null,Y}this.connected=!0,this.connecting=!1,this.health.recordConnected()}async authenticate(){if(!(await this.sendDirect({cmd:"Auth",token:this.options.token})).ok)throw Error("Authentication failed")}handleData($){try{let Y=ZS($),X=Y.reqId;if(X){let J=this.commands.removeByReqId(X);if(J){clearTimeout(J.timeout),J.resolve(Y),this.processQueue();return}}let G=this.commands.getCurrentCommand();if(G){clearTimeout(G.timeout),G.resolve(Y),this.commands.setCurrentCommand(null),this.processQueue();return}this.emit("warning",{type:"unknown_response",reqId:X})}catch{let Y=this.commands.getCurrentCommand();if(Y)clearTimeout(Y.timeout),Y.reject(Error("Invalid response from server")),this.commands.setCurrentCommand(null),this.processQueue()}}handleClose(){let $=this.connected;if(this.connected=!1,this.connecting=!1,this.socket=null,this.health.stopPing(),this.commands.rejectAll(Error("Connection lost")),$){if(this.emit("disconnected"),this.reconnect.canReconnect())this.reconnect.scheduleReconnect(()=>this.connect())}}async ping(){if(!this.connected)return!1;try{let $=Date.now(),G=(await this.send({cmd:"Ping"})).data?.pong===!0;if(G)this.health.recordPingSuccess(Date.now()-$),this.emit("health",{type:"ping_success",latency:Date.now()-$});else this.handlePingFailure();return G}catch{return this.handlePingFailure(),!1}}handlePingFailure(){if(this.health.recordPingFailure())this.emit("health",{type:"unhealthy",reason:"max_ping_failures"}),this.forceReconnect();else this.emit("health",{type:"ping_failed"})}forceReconnect(){if(this.reconnect.isClosed())return;if(this.socket)this.socket.end(),this.socket=null;if(this.connected=!1,this.health.stopPing(),this.reconnect.canReconnect())this.reconnect.scheduleReconnect(()=>this.connect())}getHealth(){return this.health.getHealth(this.getState())}generateReqId(){return this.reqIdCounter=this.reqIdCounter+1&2147483647,String(this.reqIdCounter)}sendDirect($){if(!this.socket)return Promise.reject(Error("Not connected"));let Y=Date.now();this.health.recordCommandSent();let X=this.generateReqId(),G={...$,reqId:X},J,Q=new Promise((W,K)=>{let Z=setTimeout(()=>{if(this.commands.removeByReqId(X))this.health.recordError(),K(Error("Command timeout"))},this.options.commandTimeout);J={id:0,reqId:X,command:G,resolve:(H)=>{this.health.recordSuccess(Date.now()-Y),W(H)},reject:(H)=>{this.health.recordError(),K(H)},timeout:Z}});return J.promise=Q,this.commands.addInFlight(J),this.socket.write(VR.frame(LR(G))),Q}processQueue(){if(!this.connected||!this.socket)return;while(this.commands.hasPending()&&this.commands.canSendMore(this.options.maxInFlight)){let $=this.commands.dequeue();if(!$)break;clearTimeout($.timeout);let Y=setTimeout(()=>{if(this.commands.removeByReqId($.reqId))this.health.recordError(),$.reject(Error("Command timeout"))},this.options.commandTimeout);$.timeout=Y,this.commands.addInFlight($),this.socket.write(VR.frame(LR($.command)))}}async send($){let Y=Date.now();this.health.recordCommandSent();let X=this.generateReqId(),G={...$,reqId:X},J=this.commands.nextId(),Q,W=new Promise((K,Z)=>{let H=setTimeout(()=>{if(this.commands.remove(J)){this.health.recordError(),Z(Error("Command timeout"));return}if(this.commands.removeByReqId(X))this.health.recordError(),Z(Error("Command timeout"))},this.options.commandTimeout);Q={id:J,reqId:X,command:G,resolve:(z)=>{this.health.recordSuccess(Date.now()-Y),K(z)},reject:(z)=>{this.health.recordError(),Z(z)},timeout:H}});if(Q.promise=W,this.commands.enqueue(Q),!this.connected&&!this.connecting)this.connect().catch(()=>{});else if(this.connected)this.processQueue();return W}close(){if(this.reconnect.setClosed(!0),this.health.stopPing(),this.reconnect.cancelReconnect(),Yf4(),this.commands.rejectAll(new kJ0),this.socket)this.socket.end(),this.socket=null,this.connected=!1}isConnected(){return this.connected}getState(){if(this.reconnect.isClosed())return"closed";if(this.connected)return"connected";if(this.connecting)return"connecting";return"disconnected"}getInFlightCount(){return this.commands.getInFlightCount()}}class TH{clients=[];options;currentIndex=0;closed=!1;refCount=0;poolKey=null;constructor($={}){let Y=Math.max(1,$.poolSize??4);this.options={host:$.host??"localhost",port:$.port??6789,token:$.token??"",poolSize:Y,maxReconnectAttempts:$.maxReconnectAttempts??1/0,reconnectDelay:$.reconnectDelay??100,maxReconnectDelay:$.maxReconnectDelay??30000,connectTimeout:$.connectTimeout??5000,commandTimeout:$.commandTimeout??30000,autoReconnect:$.autoReconnect??!0,pingInterval:$.pingInterval??30000,maxPingFailures:$.maxPingFailures??3,pipelining:$.pipelining??!0,maxInFlight:$.maxInFlight??100};for(let X=0;X<this.options.poolSize;X++){let G=new BR({host:this.options.host,port:this.options.port,token:this.options.token,maxReconnectAttempts:this.options.maxReconnectAttempts,reconnectDelay:this.options.reconnectDelay,maxReconnectDelay:this.options.maxReconnectDelay,connectTimeout:this.options.connectTimeout,commandTimeout:this.options.commandTimeout,autoReconnect:this.options.autoReconnect,pingInterval:this.options.pingInterval,maxPingFailures:this.options.maxPingFailures});this.clients.push(G)}}async connect(){await Promise.all(this.clients.map(($)=>$.connect()))}getNextClient(){let $=this.clients.length;for(let X=0;X<$;X++){let G=(this.currentIndex+X)%$,J=this.clients[G];if(J.isConnected())return this.currentIndex=(G+1)%$,J}let Y=this.clients[this.currentIndex];return this.currentIndex=(this.currentIndex+1)%$,Y}async send($){if(this.closed)throw Error("Connection pool is closed");return this.getNextClient().send($)}async sendParallel($){if(this.closed)throw Error("Connection pool is closed");let Y=$.map((X,G)=>{return this.clients[G%this.clients.length].send(X)});return Promise.all(Y)}isConnected(){return this.clients.some(($)=>$.isConnected())}getConnectedCount(){return this.clients.filter(($)=>$.isConnected()).length}getPoolSize(){return this.clients.length}addRef(){this.refCount++}release(){if(this.refCount--,this.refCount<=0)this.close()}setPoolKey($){this.poolKey=$}close(){if(this.closed)return;if(this.closed=!0,this.poolKey)xc.delete(this.poolKey),this.poolKey=null;for(let $ of this.clients)$.close();this.clients.length=0}isClosed(){return this.closed}getHealth(){let $=this.clients.map((K)=>K.getHealth()),Y=$.filter((K)=>K.state==="connected").length,X=$.filter((K)=>K.healthy).length,G=$.reduce((K,Z)=>K+Z.totalCommands,0),J=$.reduce((K,Z)=>K+Z.totalErrors,0),Q=$.filter((K)=>K.avgLatencyMs>0).map((K)=>K.avgLatencyMs),W=Q.length>0?Q.reduce((K,Z)=>K+Z,0)/Q.length:0;return{healthy:X>0,connectedCount:Y,totalCount:this.clients.length,clients:$,avgLatencyMs:Math.round(W*100)/100,totalCommands:G,totalErrors:J}}}var xc=new Map;function Gf4($){let Y=$?.host??"localhost",X=$?.port??6789,G=$?.poolSize??4,J=$?.token??"",Q=J?String(Number(Bun.hash(J))&65535):"0";return`${Y}:${X}:${G}:${Q}`}function OR($){let Y=Gf4($),X=xc.get(Y);if(X&&!X.isClosed())return X.addRef(),X;if(X)xc.delete(Y);return X=new TH($),X.setPoolKey(Y),xc.set(Y,X),X.addRef(),X}function VS($){$.release()}function Js0($){let Y=2166136261;for(let X=0;X<$.length;X++)Y^=$.charCodeAt(X),Y=Math.imul(Y,16777619);return Y>>>0}function Jf4(){let $=navigator.hardwareConcurrency||4,Y=1;while(Y<$&&Y<64)Y*=2;return Y}var E$=Jf4(),Qs0=E$-1;function l1($){return Js0($)&Qs0}function v5($){return Js0($)&Qs0}function yc(){return Bun.randomUUIDv7()}var Ws0=Bun.env.BUNQUEUE_EMBEDDED==="1";function Ks0($){return $.shards}function vJ0($,Y){let X=l1(Y);return Ks0($)[X]}function ER($){return{shards:Ks0($),jobIndex:$.getJobIndex()}}function xJ0($){if(!$)return;return $}function Zs0($){return $}class yJ0{maxPending;pending=[];timer=null;config;flushCb;stopped=!1;flushing=!1;inFlightFlushes=new Set;constructor($,Y){this.config=$,this.maxPending=$.maxPending??1e4,this.flushCb=Y}enqueue($,Y,X){return new Promise((G,J)=>{if(this.stopped){J(Error("AddBatcher stopped"));return}if(this.pending.length>=this.maxPending){let Q=this.pending.splice(0,Math.floor(this.maxPending*0.1));for(let W of Q)W.reject(Error("Add buffer overflow - oldest entries dropped"))}if(this.pending.push({name:$,data:Y,opts:X,resolve:G,reject:J}),this.pending.length>=this.config.maxSize)this.triggerFlush();else if(!this.flushing)this.triggerFlush();else this.timer??=setTimeout(()=>{this.timer=null,this.triggerFlush()},this.config.maxDelayMs)})}triggerFlush(){if(this.timer)clearTimeout(this.timer),this.timer=null;let $=this.doFlush().catch((Y)=>{console.error("[bunqueue] Flush failed:",Y instanceof Error?Y.message:String(Y))});this.inFlightFlushes.add($),$.finally(()=>this.inFlightFlushes.delete($))}async doFlush(){if(this.pending.length===0)return;this.flushing=!0;try{while(this.pending.length>0&&!this.stopped)await this.flushOnce()}finally{this.flushing=!1}}async flush(){await this.doFlush()}async flushOnce(){let $=this.pending.splice(0,this.pending.length);if($.length===0)return;if(this.timer)clearTimeout(this.timer),this.timer=null;try{let Y=await this.flushCb($.map((X)=>({name:X.name,data:X.data,opts:X.opts})));for(let X=0;X<$.length;X++)$[X].resolve(Y[X])}catch(Y){let X=Y instanceof Error?Y:Error(String(Y));for(let G of $)G.reject(X)}}stop(){if(this.stopped=!0,this.timer)clearTimeout(this.timer),this.timer=null;let $=Error("AddBatcher stopped"),Y=this.pending.splice(0,this.pending.length);for(let X of Y)X.reject($)}async waitForInFlight(){if(this.inFlightFlushes.size===0)return;await Promise.all(this.inFlightFlushes)}hasPending(){return this.pending.length>0}}function bc($){if($)return $;let Y=Bun.env.BQ_TOKEN;if(Y)return Y;let X=Bun.env.BUNQUEUE_TOKEN;if(X)return X;return}function d0($){return $}function Us0(){return Bun.randomUUIDv7()}var Qf4=3600000,qY=20,_N={priority:0,maxAttempts:3,backoff:1000,lifo:!1,removeOnComplete:!1,removeOnFail:!1,stackTraceLimit:10};function Wf4($){if(typeof $==="object")return{backoff:$.delay,backoffConfig:{type:$.type,delay:$.delay}};return{backoff:$??_N.backoff,backoffConfig:null}}function Kf4($){if(!$)return null;return{every:$.every,limit:$.limit,pattern:$.pattern,count:$.count??0,startDate:$.startDate,endDate:$.endDate,tz:$.tz,immediately:$.immediately,prevMillis:$.prevMillis,offset:$.offset,jobId:$.jobId}}function Zf4($){return{priority:$.priority??_N.priority,lifo:$.lifo??_N.lifo,maxAttempts:$.maxAttempts??_N.maxAttempts,removeOnComplete:$.removeOnComplete??_N.removeOnComplete,removeOnFail:$.removeOnFail??_N.removeOnFail}}function Uf4($){return{ttl:$.ttl??null,timeout:$.timeout??null,uniqueKey:$.uniqueKey??null,customId:$.customId??null,parentId:$.parentId??null,groupId:$.groupId??null,stallTimeout:$.stallTimeout??null}}function Hf4($){return{stackTraceLimit:$.stackTraceLimit??_N.stackTraceLimit,keepLogs:$.keepLogs??null,sizeLimit:$.sizeLimit??null,failParentOnFailure:$.failParentOnFailure??!1,removeDependencyOnFailure:$.removeDependencyOnFailure??!1,continueParentOnFailure:$.continueParentOnFailure??!1,ignoreDependencyOnFailure:$.ignoreDependencyOnFailure??!1,deduplicationTtl:$.dedup?.ttl??null,deduplicationExtend:$.dedup?.extend??!1,deduplicationReplace:$.dedup?.replace??!1,debounceId:$.debounceId??null,debounceTtl:$.debounceTtl??null}}function bJ0($,Y,X,G=Date.now()){let{backoff:J,backoffConfig:Q}=Wf4(X.backoff),W=Zf4(X),K=Uf4(X),Z=Hf4(X),H=X.timestamp??G;return{id:$,queue:Y,data:X.data,createdAt:H,runAt:H+(X.delay??0),startedAt:null,completedAt:null,attempts:0,backoff:J,backoffConfig:Q,dependsOn:X.dependsOn??[],childrenIds:X.childrenIds??[],childrenCompleted:0,tags:X.tags??[],progress:0,progressMessage:null,repeat:Kf4(X.repeat),lastHeartbeat:H,stallCount:0,...W,...K,...Z,timeline:[]}}function Hs0($,Y=Date.now()){return $.runAt<=Y}function zs0($,Y=Date.now()){if($.ttl===null)return!1;return Y>$.createdAt+$.ttl}function MR($){let Y=$.backoffConfig?.maxDelay??Qf4;if($.backoffConfig)if($.backoffConfig.type==="fixed"){let Q=$.backoffConfig.delay*(0.8+Math.random()*0.4);return Math.min(Q,Y)}else{let Q=$.backoffConfig.delay*Math.pow(2,$.attempts)*(0.5+Math.random());return Math.min(Q,Y)}let G=$.backoff*Math.pow(2,$.attempts)*(0.5+Math.random());return Math.min(G,Y)}function Vs0($){return $.attempts<$.maxAttempts}function zf4(){return Bun.randomUUIDv7()}var jN=30000;function Fs0($,Y,X=jN,G=Date.now()){return{jobId:$,token:zf4(),owner:Y,createdAt:G,expiresAt:G+X,lastRenewalAt:G,renewalCount:0,ttl:X}}function FS($,Y=Date.now()){return Y>=$.expiresAt}function Ls0($,Y,X=Date.now()){let G=Y??$.ttl;$.expiresAt=X+G,$.lastRenewalAt=X,$.renewalCount++}function Ds0($,Y){if($.priority!==Y.priority)return Y.priority-$.priority;if($.lifo&&Y.lifo){if(Y.jobId>$.jobId)return 1;if(Y.jobId<$.jobId)return-1;return 0}if($.runAt!==Y.runAt)return $.runAt-Y.runAt;if($.jobId<Y.jobId)return-1;if($.jobId>Y.jobId)return 1;return 0}class RR{static D=4;heap=[];index=new Map;generation=0n;get size(){return this.index.size}get isEmpty(){return this.index.size===0}push($){let Y=this.generation++;this.index.set($.id,{job:$,generation:Y});let X={jobId:$.id,priority:$.priority,runAt:$.runAt,lifo:$.lifo,generation:Y};this.heap.push(X),this.bubbleUp(this.heap.length-1)}pop(){while(this.heap.length>0){let $=this.heap[0],Y=this.index.get($.jobId);if(Y?.generation!==$.generation){this.removeTop();continue}return this.removeTop(),this.index.delete($.jobId),Y.job}return null}peek(){while(this.heap.length>0){let $=this.heap[0],Y=this.index.get($.jobId);if(Y?.generation!==$.generation){this.removeTop();continue}return Y.job}return null}find($){return this.index.get($)?.job??null}has($){return this.index.has($)}remove($){let Y=this.index.get($);if(!Y)return null;return this.index.delete($),Y.job}updatePriority($,Y){let X=this.index.get($);if(!X)return!1;let G={...X.job,priority:Y},J=this.generation++;this.index.set($,{job:G,generation:J});let Q={jobId:G.id,priority:Y,runAt:G.runAt,lifo:G.lifo,generation:J};return this.heap.push(Q),this.bubbleUp(this.heap.length-1),!0}updateRunAt($,Y){let X=this.index.get($);if(!X)return!1;let G={...X.job,runAt:Y},J=this.generation++;this.index.set($,{job:G,generation:J});let Q={jobId:G.id,priority:G.priority,runAt:Y,lifo:G.lifo,generation:J};return this.heap.push(Q),this.bubbleUp(this.heap.length-1),!0}values(){return Array.from(this.index.values()).map(($)=>$.job)}clear(){this.heap=[],this.index.clear(),this.generation=0n}getStaleRatio(){if(this.heap.length===0)return 0;return 1-this.index.size/this.heap.length}compact(){if(this.heap.length===0)return;let $=[];for(let Y of this.heap)if(this.index.get(Y.jobId)?.generation===Y.generation)$.push(Y);this.heap=$,this.heapify()}heapify(){let $=RR.D;for(let Y=Math.floor((this.heap.length-2)/$);Y>=0;Y--)this.bubbleDown(Y)}needsCompaction($=0.2){return this.getStaleRatio()>$}removeTop(){if(this.heap.length<=1){this.heap.pop();return}this.heap[0]=this.heap.pop(),this.bubbleDown(0)}bubbleUp($){let Y=RR.D;while($>0){let X=Math.floor(($-1)/Y);if(Ds0(this.heap[$],this.heap[X])>=0)break;this.swap($,X),$=X}}bubbleDown($){let Y=RR.D,X=this.heap.length,G=this.heap;while(!0){let J=Y*$+1;if(J>=X)break;let Q=$,W=Math.min(J+Y,X);for(let K=J;K<W;K++)if(Ds0(G[K],G[Q])<0)Q=K;if(Q===$)break;this.swap($,Q),$=Q}}swap($,Y){let X=this.heap[$];this.heap[$]=this.heap[Y],this.heap[Y]=X}}function hc($,Y=Date.now()){return $.expiresAt!==null&&$.expiresAt<=Y}function hJ0($,Y=Date.now()){return $!==void 0?Y+$:null}class fJ0{keys=new Map;isAvailable($,Y){let X=this.keys.get($)?.get(Y);if(!X)return!0;if(hc(X))return this.keys.get($)?.delete(Y),!0;return!1}getEntry($,Y){let X=this.keys.get($)?.get(Y);if(!X)return null;if(hc(X))return this.keys.get($)?.delete(Y),null;return X}register($,Y,X){this.registerWithTtl($,Y,X,void 0)}registerWithTtl($,Y,X,G){let J=this.keys.get($);if(!J)J=new Map,this.keys.set($,J);let Q=Date.now();J.set(Y,{jobId:X,expiresAt:hJ0(G,Q),registeredAt:Q})}extendTtl($,Y,X){let G=this.keys.get($)?.get(Y);if(!G)return!1;return G.expiresAt=hJ0(X),!0}release($,Y){this.keys.get($)?.delete(Y)}cleanExpired(){let $=0,Y=Date.now();for(let[X,G]of this.keys)for(let[J,Q]of G)if(hc(Q,Y))G.delete(J),$++;return $}clearQueue($){this.keys.delete($)}getMap(){return this.keys}}var gJ0={autoRetry:!1,autoRetryInterval:3600000,maxAutoRetries:3,maxAge:604800000,maxEntries:1e4};function Ns0($,Y,X,G=gJ0){let J=Date.now(),Q={attempt:$.attempts,startedAt:$.startedAt??$.createdAt,failedAt:J,reason:Y,error:X,duration:$.startedAt?J-$.startedAt:0};return{job:$,enteredAt:J,reason:Y,error:X,attempts:[Q],retryCount:0,lastRetryAt:null,nextRetryAt:G.autoRetry?J+G.autoRetryInterval:null,expiresAt:G.maxAge?J+G.maxAge:null}}function fc($,Y=Date.now()){return $.expiresAt!==null&&Y>=$.expiresAt}function mJ0($,Y,X=Date.now()){if(!Y.autoRetry)return!1;if($.retryCount>=Y.maxAutoRetries)return!1;if($.nextRetryAt===null)return!1;return X>=$.nextRetryAt}function As0($,Y){let X=Date.now();if($.retryCount++,$.lastRetryAt=X,$.retryCount<Y.maxAutoRetries){let G=Math.pow(2,$.retryCount-1);$.nextRetryAt=X+Y.autoRetryInterval*G}else $.nextRetryAt=null}var gc={enabled:!0,stallInterval:30000,maxStalls:3,gracePeriod:5000};function Vf4($,Y=gc,X=Date.now()){if($.startedAt===null)return{isStalled:!1,stalledFor:0,shouldMoveToDlq:!1,newStallCount:$.stallCount};if(X-$.startedAt<Y.gracePeriod)return{isStalled:!1,stalledFor:0,shouldMoveToDlq:!1,newStallCount:$.stallCount};let G=$.stallTimeout??Y.stallInterval,J=X-$.lastHeartbeat;if(!(J>G))return{isStalled:!1,stalledFor:J,shouldMoveToDlq:!1,newStallCount:$.stallCount};let W=$.stallCount+1,K=W>=Y.maxStalls;return{isStalled:!0,stalledFor:J,shouldMoveToDlq:K,newStallCount:W}}function uJ0($,Y=gc,X=Date.now()){let G=Vf4($,Y,X);if(!G.isStalled)return"keep";if(G.shouldMoveToDlq)return"move_to_dlq";return"retry"}function Bs0($){return $.stallCount++,$.stallCount}class pJ0{dlq=new Map;dlqConfig=new Map;stallConfig=new Map;stats;constructor($){this.stats=$}getConfig($){return this.dlqConfig.get($)??gJ0}setConfig($,Y){let X=this.getConfig($);this.dlqConfig.set($,{...X,...Y})}getStallConfig($){return this.stallConfig.get($)??gc}setStallConfig($,Y){let X=this.getStallConfig($);this.stallConfig.set($,{...X,...Y})}add($,Y="unknown",X=null){let G=this.dlq.get($.queue);if(!G)G=[],this.dlq.set($.queue,G);let J=this.getConfig($.queue),Q=Ns0($,Y,X,J);while(G.length>=J.maxEntries)G.shift(),this.stats.decrementDlq();return G.push(Q),this.stats.incrementDlq(),Q}restoreEntry($,Y){let X=this.dlq.get($);if(!X)X=[],this.dlq.set($,X);X.push(Y),this.stats.incrementDlq()}getEntries($){return this.dlq.get($)??[]}getJobs($,Y){let X=this.dlq.get($);if(!X)return[];return(Y?X.slice(0,Y):X).map((J)=>J.job)}getFiltered($,Y){let X=this.dlq.get($);if(!X)return[];let G=Date.now(),J=X.filter((Q)=>{if(Y.reason&&Q.reason!==Y.reason)return!1;if(Y.olderThan&&Q.enteredAt>Y.olderThan)return!1;if(Y.newerThan&&Q.enteredAt<Y.newerThan)return!1;if(Y.retriable&&!mJ0(Q,this.getConfig($),G))return!1;if(Y.expired&&!fc(Q,G))return!1;return!0});if(Y.offset)J=J.slice(Y.offset);if(Y.limit)J=J.slice(0,Y.limit);return J}remove($,Y){let X=this.dlq.get($);if(!X)return null;let G=X.findIndex((J)=>J.job.id===Y);if(G===-1)return null;return this.stats.decrementDlq(),X.splice(G,1)[0]}getAutoRetryEntries($,Y=Date.now()){let X=this.dlq.get($);if(!X)return[];let G=this.getConfig($);return X.filter((J)=>mJ0(J,G,Y))}getExpiredEntries($,Y=Date.now()){let X=this.dlq.get($);if(!X)return[];return X.filter((G)=>fc(G,Y))}purgeExpired($,Y=Date.now()){let X=this.dlq.get($);if(!X)return 0;let G=X.length,J=X.filter((Q)=>!fc(Q,Y));if(J.length<G){this.dlq.set($,J);let Q=G-J.length;return this.stats.decrementDlq(Q),Q}return 0}clear($){let Y=this.dlq.get($);if(!Y)return 0;let X=Y.length;return this.dlq.delete($),this.stats.decrementDlq(X),X}getCount($){return this.dlq.get($)?.length??0}getQueueNames(){return Array.from(this.dlq.keys())}deleteQueue($){let X=this.dlq.get($)?.length??0;return this.dlq.delete($),this.dlqConfig.delete($),this.stallConfig.delete($),X}}function Os0($){return{name:$,paused:!1,rateLimit:null,concurrencyLimit:null,activeCount:0}}class dJ0{capacity;refillRate;tokens;lastRefill;constructor($,Y=$){this.capacity=$,this.refillRate=Y,this.tokens=$,this.lastRefill=Date.now()}tryAcquire(){if(this.refill(),this.tokens>=1)return this.tokens-=1,!0;return!1}refill(){let $=Date.now(),X=($-this.lastRefill)/1000*this.refillRate;this.tokens=Math.min(this.capacity,this.tokens+X),this.lastRefill=$}getTokens(){return this.refill(),this.tokens}}class cJ0{limit;active=0;constructor($){this.limit=$}tryAcquire(){if(this.active<this.limit)return this.active+=1,!0;return!1}release(){if(this.active>0)this.active-=1}getActive(){return this.active}getLimit(){return this.limit}setLimit($){this.limit=$}}class lJ0{queueState=new Map;rateLimiters=new Map;concurrencyLimiters=new Map;getState($){let Y=this.queueState.get($);if(!Y)Y=Os0($),this.queueState.set($,Y);return Y}isPaused($){return this.queueState.get($)?.paused??!1}pause($){this.getState($).paused=!0}resume($){this.getState($).paused=!1}setRateLimit($,Y){this.rateLimiters.set($,new dJ0(Y)),this.getState($).rateLimit=Y}clearRateLimit($){this.rateLimiters.delete($);let Y=this.queueState.get($);if(Y)Y.rateLimit=null}tryAcquireRateLimit($){let Y=this.rateLimiters.get($);return!Y||Y.tryAcquire()}setConcurrency($,Y){let X=this.concurrencyLimiters.get($);if(X)X.setLimit(Y);else X=new cJ0(Y),this.concurrencyLimiters.set($,X);this.getState($).concurrencyLimit=Y}clearConcurrency($){this.concurrencyLimiters.delete($);let Y=this.queueState.get($);if(Y)Y.concurrencyLimit=null}tryAcquireConcurrency($){let Y=this.concurrencyLimiters.get($);return!Y||Y.tryAcquire()}releaseConcurrency($){this.concurrencyLimiters.get($)?.release()}getQueueNames(){return Array.from(this.queueState.keys())}deleteQueue($){this.queueState.delete($),this.rateLimiters.delete($),this.concurrencyLimiters.delete($)}getStateMap(){return this.queueState}}class iJ0{waitingDeps=new Map;dependencyIndex=new Map;waitingChildren=new Map;registerDependencies($,Y){for(let X of Y){let G=this.dependencyIndex.get(X);if(!G)G=new Set,this.dependencyIndex.set(X,G);G.add($)}}unregisterDependencies($,Y){for(let X of Y){let G=this.dependencyIndex.get(X);if(G){if(G.delete($),G.size===0)this.dependencyIndex.delete(X)}}}getJobsWaitingFor($){return this.dependencyIndex.get($)}addWaitingJob($){if(this.waitingDeps.set($.id,$),$.dependsOn&&$.dependsOn.length>0)this.registerDependencies($.id,$.dependsOn)}removeWaitingJob($){let Y=this.waitingDeps.get($);if(Y){if(this.waitingDeps.delete($),Y.dependsOn&&Y.dependsOn.length>0)this.unregisterDependencies($,Y.dependsOn)}return Y}getWaitingJob($){return this.waitingDeps.get($)}isWaiting($){return this.waitingDeps.has($)}addWaitingParent($){this.waitingChildren.set($.id,$)}removeWaitingParent($){let Y=this.waitingChildren.get($);if(Y)this.waitingChildren.delete($);return Y}getWaitingParent($){return this.waitingChildren.get($)}isParentWaiting($){return this.waitingChildren.has($)}getCounts(){return{waitingDeps:this.waitingDeps.size,dependencyIndex:this.dependencyIndex.size,waitingChildren:this.waitingChildren.size}}}function Es0($){let Y=[];for(let X=0;X<=$;X++)Y.push(null);return{value:null,forward:Y}}class nJ0{maxLevel;probability;compare;equals;head;level=0;_size=0;constructor($,Y=16,X=0.5,G){this.compare=$,this.maxLevel=Y,this.probability=X,this.equals=G,this.head=Es0(Y)}get size(){return this._size}get isEmpty(){return this._size===0}randomLevel(){let $=0;while(Math.random()<this.probability&&$<this.maxLevel)$++;return $}insert($){let Y=[];for(let W=0;W<=this.maxLevel;W++)Y.push(null);let X=this.head;for(let W=this.level;W>=0;W--){let K=X.forward[W];while(K!==null&&this.compare(K.value,$)<0)X=K,K=X.forward[W];Y[W]=X}if(this.equals){let W=X.forward[0];while(W!==null&&this.compare(W.value,$)===0){if(this.equals(W.value,$))return!1;W=W.forward[0]}}let G=this.randomLevel();if(G>this.level){for(let W=this.level+1;W<=G;W++)Y[W]=this.head;this.level=G}let J=[];for(let W=0;W<=G;W++)J.push(null);let Q={value:$,forward:J};for(let W=0;W<=G;W++){let K=Y[W];if(K)Q.forward[W]=K.forward[W],K.forward[W]=Q}return this._size++,!0}delete($){let Y=[];for(let J=0;J<=this.maxLevel;J++)Y.push(null);let X=this.head;for(let J=this.level;J>=0;J--){let Q=X.forward[J];while(Q!==null&&this.compare(Q.value,$)<0)X=Q,Q=X.forward[J];Y[J]=X}let G=X.forward[0];if(G===null||this.compare(G.value,$)!==0)return!1;for(let J=0;J<=this.level;J++){let Q=Y[J];if(Q?.forward[J]===G)Q.forward[J]=G.forward[J];else break}while(this.level>0&&this.head.forward[this.level]===null)this.level--;return this._size--,!0}deleteWhere($){let Y=this.head.forward[0];while(Y!==null){if($(Y.value))return this.delete(Y.value),Y.value;Y=Y.forward[0]}return null}find($){let Y=this.head;for(let G=this.level;G>=0;G--){let J=Y.forward[G];while(J!==null&&this.compare(J.value,$)<0)Y=J,J=Y.forward[G]}let X=Y.forward[0];if(X!==null&&this.compare(X.value,$)===0)return X.value;return null}has($){return this.find($)!==null}first(){return this.head.forward[0]?.value??null}shift(){let $=this.head.forward[0];if($===null)return null;return this.delete($.value),$.value}rangeUntil($,Y){let X=[],G=this.head.forward[0];while(G!==null&&this.compare(G.value,$)<=0){if(X.push(G.value),Y!==void 0&&X.length>=Y)break;G=G.forward[0]}return X}takeWhile($,Y){let X=[],G=this.head.forward[0];while(G!==null&&$(G.value)){if(X.push(G.value),Y!==void 0&&X.length>=Y)break;G=G.forward[0]}return X}*values(){let $=this.head.forward[0];while($!==null)yield $.value,$=$.forward[0]}toArray(){return Array.from(this.values())}clear(){this.head=Es0(this.maxLevel),this.level=0,this._size=0}removeAll($){let Y=[],X=this.head.forward[0];while(X!==null){let G=X.forward[0];if($(X.value))Y.push(X.value),this.delete(X.value);X=G}return Y}}class vU{heap=[];compare;static D=4;constructor($){this.compare=$}get size(){return this.heap.length}get isEmpty(){return this.heap.length===0}push($){this.heap.push($),this.bubbleUp(this.heap.length-1)}pop(){if(this.heap.length===0)return;if(this.heap.length===1)return this.heap.pop();let $=this.heap[0],Y=this.heap.pop();if(Y!==void 0)this.heap[0]=Y,this.bubbleDown(0);return $}peek(){return this.heap[0]}clear(){this.heap=[]}toArray(){return[...this.heap]}buildFrom($){this.heap=[...$];let Y=vU.D;for(let X=Math.floor((this.heap.length-2)/Y);X>=0;X--)this.bubbleDown(X)}removeWhere($){let Y=this.heap.findIndex($);if(Y===-1)return;let X=this.heap[Y];if(Y===this.heap.length-1)this.heap.pop();else{let G=this.heap.pop();if(G!==void 0)this.heap[Y]=G,this.bubbleUp(Y),this.bubbleDown(Y)}return X}bubbleUp($){let Y=vU.D;while($>0){let X=Math.floor(($-1)/Y);if(this.compare(this.heap[$],this.heap[X])>=0)break;this.swap($,X),$=X}}bubbleDown($){let Y=vU.D,X=this.heap.length,G=this.heap,J=this.compare;while(!0){let Q=Y*$+1;if(Q>=X)break;let W=$,K=Math.min(Q+Y,X);for(let Z=Q;Z<K;Z++)if(J(G[Z],G[W])<0)W=Z;if(W===$)break;this.swap($,W),$=W}}swap($,Y){let X=this.heap[$];this.heap[$]=this.heap[Y],this.heap[Y]=X}}class rJ0{temporalIndex=new nJ0(($,Y)=>$.createdAt-Y.createdAt,16,0.5,($,Y)=>$.jobId===Y.jobId);delayedJobIds=new Set;delayedHeap=new vU(($,Y)=>$.runAt-Y.runAt);delayedRunAt=new Map;addToIndex($,Y,X){this.temporalIndex.insert({createdAt:$,jobId:Y,queue:X})}getOldJobs($,Y,X){let J=Date.now()-Y,Q=[];for(let W of this.temporalIndex.values()){if(W.createdAt>J)break;if(W.queue===$){if(Q.push({jobId:W.jobId,createdAt:W.createdAt}),Q.length>=X)break}}return Q}removeFromIndex($){this.temporalIndex.deleteWhere((Y)=>Y.jobId===$)}clearIndexForQueue($){this.temporalIndex.removeAll((Y)=>Y.queue===$)}cleanOrphaned($){if(this.temporalIndex.size===0)return 0;let Y=this.temporalIndex.size;return this.temporalIndex.removeAll((X)=>!$.has(X.jobId)),Y-this.temporalIndex.size}get indexSize(){return this.temporalIndex.size}isDelayed($){return this.delayedJobIds.has($)}addDelayed($,Y){this.delayedJobIds.add($),this.delayedHeap.push({jobId:$,runAt:Y}),this.delayedRunAt.set($,Y)}removeDelayed($){if(this.delayedJobIds.has($))return this.delayedJobIds.delete($),this.delayedRunAt.delete($),!0;return!1}refreshDelayed($){let Y=0;while(!this.delayedHeap.isEmpty){let X=this.delayedHeap.peek();if(!X||X.runAt>$)break;this.delayedHeap.pop();let G=this.delayedRunAt.get(X.jobId);if(G===void 0)continue;if(G!==X.runAt)continue;this.delayedJobIds.delete(X.jobId),this.delayedRunAt.delete(X.jobId),Y++}return Y}get delayedCount(){return this.delayedJobIds.size}clearDelayed(){this.delayedJobIds.clear(),this.delayedHeap.clear(),this.delayedRunAt.clear()}clear(){this.clearDelayed(),this.temporalIndex.removeAll(()=>!0)}getSizes(){return{delayedJobIds:this.delayedJobIds.size,delayedHeap:this.delayedHeap.size,delayedRunAt:this.delayedRunAt.size,temporalIndex:this.temporalIndex.size}}}class aJ0{waiters=[];pendingNotifications=0;notifyBatch($){for(let Y=0;Y<$;Y++)this.notify()}notify(){while(this.waiters.length>0&&this.waiters[0].cancelled)this.waiters.shift();let $=this.waiters.shift();if($&&!$.cancelled)$.resolve();else this.pendingNotifications++;if(this.waiters.length>1000)this.cleanupWaiters()}waitForJob($){if($<=0)return Promise.resolve();if(this.pendingNotifications>0)return this.pendingNotifications--,Promise.resolve();return new Promise((Y)=>{let X={resolve:Y,cancelled:!1},G=()=>{if(X.cancelled)return;X.cancelled=!0,Y()};this.waiters.push(X),setTimeout(G,$)})}cleanupWaiters(){let $=this.waiters.filter((Y)=>!Y.cancelled);this.waiters.length=0,this.waiters.push(...$)}get length(){return this.waiters.length}}class sJ0{temporalManager;stats={queuedJobs:0,delayedJobs:0,dlqJobs:0};constructor($){this.temporalManager=$}getStats(){return{...this.stats}}incrementQueued($,Y,X,G,J){if(this.stats.queuedJobs++,Y){if(this.stats.delayedJobs++,J!==void 0)this.temporalManager.addDelayed($,J)}if(X!==void 0&&G!==void 0)this.temporalManager.addToIndex(X,$,G)}decrementQueued($){if(this.stats.queuedJobs=Math.max(0,this.stats.queuedJobs-1),this.temporalManager.removeDelayed($))this.stats.delayedJobs=Math.max(0,this.stats.delayedJobs-1)}incrementDlq(){this.stats.dlqJobs++}decrementDlq($=1){this.stats.dlqJobs=Math.max(0,this.stats.dlqJobs-$)}refreshDelayedCount($){let Y=this.temporalManager.refreshDelayed($);this.stats.delayedJobs=Math.max(0,this.stats.delayedJobs-Y)}resetQueuedCounters(){this.stats.queuedJobs=0,this.stats.delayedJobs=0,this.temporalManager.clearDelayed()}resetDlqCounter(){this.stats.dlqJobs=0}adjustQueued($){this.stats.queuedJobs=Math.max(0,this.stats.queuedJobs+$)}adjustDlq($){this.stats.dlqJobs=Math.max(0,this.stats.dlqJobs+$)}syncDelayedCount(){this.stats.delayedJobs=this.temporalManager.delayedCount}}class oJ0{queues=new Map;uniqueKeyManager=new fJ0;dlqManager;limiterManager=new lJ0;dependencyTracker=new iJ0;temporalManager=new rJ0;waiterManager=new aJ0;counters;activeGroups=new Map;constructor(){this.counters=new sJ0(this.temporalManager),this.dlqManager=new pJ0({incrementDlq:()=>{this.counters.incrementDlq()},decrementDlq:($)=>{this.counters.decrementDlq($)}})}notify(){this.waiterManager.notify()}notifyBatch($){this.waiterManager.notifyBatch($)}waitForJob($){return this.waiterManager.waitForJob($)}getQueue($){let Y=this.queues.get($);if(!Y)Y=new RR,this.queues.set($,Y);return Y}getState($){return this.limiterManager.getState($)}isPaused($){return this.limiterManager.isPaused($)}pause($){this.limiterManager.pause($)}resume($){this.limiterManager.resume($),this.waiterManager.notify()}isUniqueAvailable($,Y){return this.uniqueKeyManager.isAvailable($,Y)}getUniqueKeyEntry($,Y){return this.uniqueKeyManager.getEntry($,Y)}registerUniqueKey($,Y,X){this.uniqueKeyManager.register($,Y,X)}registerUniqueKeyWithTtl($,Y,X,G){this.uniqueKeyManager.registerWithTtl($,Y,X,G)}extendUniqueKeyTtl($,Y,X){return this.uniqueKeyManager.extendTtl($,Y,X)}releaseUniqueKey($,Y){this.uniqueKeyManager.release($,Y)}cleanExpiredUniqueKeys(){return this.uniqueKeyManager.cleanExpired()}get uniqueKeys(){return this.uniqueKeyManager.getMap()}isGroupActive($,Y){return this.activeGroups.get($)?.has(Y)??!1}activateGroup($,Y){let X=this.activeGroups.get($);if(!X)X=new Set,this.activeGroups.set($,X);X.add(Y)}releaseGroup($,Y){this.activeGroups.get($)?.delete(Y)}setRateLimit($,Y){this.limiterManager.setRateLimit($,Y)}clearRateLimit($){this.limiterManager.clearRateLimit($)}tryAcquireRateLimit($){return this.limiterManager.tryAcquireRateLimit($)}setConcurrency($,Y){this.limiterManager.setConcurrency($,Y)}clearConcurrency($){this.limiterManager.clearConcurrency($)}tryAcquireConcurrency($){return this.limiterManager.tryAcquireConcurrency($)}releaseConcurrency($){this.limiterManager.releaseConcurrency($)}get queueState(){return this.limiterManager.getStateMap()}clearQueueLimiters($){this.limiterManager.deleteQueue($)}releaseJobResources($,Y,X){if(Y)this.releaseUniqueKey($,Y);if(X)this.releaseGroup($,X);this.releaseConcurrency($)}get waitingDeps(){return this.dependencyTracker.waitingDeps}get dependencyIndex(){return this.dependencyTracker.dependencyIndex}get waitingChildren(){return this.dependencyTracker.waitingChildren}registerDependencies($,Y){this.dependencyTracker.registerDependencies($,Y)}unregisterDependencies($,Y){this.dependencyTracker.unregisterDependencies($,Y)}getJobsWaitingFor($){return this.dependencyTracker.getJobsWaitingFor($)}get dlq(){let $=new Map;for(let Y of this.dlqManager.getQueueNames())$.set(Y,this.dlqManager.getEntries(Y));for(let Y of this.queues.keys())if(!$.has(Y))$.set(Y,[]);return $}get dlqConfig(){let $=new Map;for(let Y of this.getQueueNames())$.set(Y,this.dlqManager.getConfig(Y));return $}get stallConfig(){let $=new Map;for(let Y of this.getQueueNames())$.set(Y,this.dlqManager.getStallConfig(Y));return $}getDlqConfig($){return this.dlqManager.getConfig($)}setDlqConfig($,Y){this.dlqManager.setConfig($,Y)}getStallConfig($){return this.dlqManager.getStallConfig($)}setStallConfig($,Y){this.dlqManager.setStallConfig($,Y)}addToDlq($,Y="unknown",X=null){return this.dlqManager.add($,Y,X)}restoreDlqEntry($,Y){this.dlqManager.restoreEntry($,Y)}getDlqEntries($){return this.dlqManager.getEntries($)}getDlq($,Y){return this.dlqManager.getJobs($,Y)}getDlqFiltered($,Y){return this.dlqManager.getFiltered($,Y)}removeFromDlq($,Y){return this.dlqManager.remove($,Y)}getAutoRetryEntries($,Y=Date.now()){return this.dlqManager.getAutoRetryEntries($,Y)}getExpiredEntries($,Y=Date.now()){return this.dlqManager.getExpiredEntries($,Y)}purgeExpired($,Y=Date.now()){return this.dlqManager.purgeExpired($,Y)}clearDlq($){return this.dlqManager.clear($)}getWaitingCount($){return this.queues.get($)?.size??0}getDlqCount($){return this.dlqManager.getCount($)}getQueueNames(){let $=new Set;for(let Y of this.queues.keys())$.add(Y);for(let Y of this.dlqManager.getQueueNames())$.add(Y);for(let Y of this.limiterManager.getQueueNames())$.add(Y);return Array.from($)}getCountsPerPriority($){let Y=this.queues.get($),X=new Map;if(!Y)return X;for(let G of Y.values()){let J=X.get(G.priority)??0;X.set(G.priority,J+1)}return X}getStats(){return this.counters.getStats()}getInternalSizes(){return{...this.temporalManager.getSizes(),waiters:this.waiterManager.length}}incrementQueued($,Y,X,G,J){this.counters.incrementQueued($,Y,X,G,J)}decrementQueued($){this.counters.decrementQueued($)}incrementDlq(){this.counters.incrementDlq()}decrementDlq($=1){this.counters.decrementDlq($)}refreshDelayedCount($){this.counters.refreshDelayedCount($)}resetQueuedCounters(){this.counters.resetQueuedCounters()}resetDlqCounter(){this.counters.resetDlqCounter()}getOldJobs($,Y,X){return this.temporalManager.getOldJobs($,Y,X)}removeFromTemporalIndex($){this.temporalManager.removeFromIndex($)}clearTemporalIndexForQueue($){this.temporalManager.clearIndexForQueue($)}cleanOrphanedTemporalEntries(){if(this.temporalManager.indexSize===0)return 0;let $=new Set;for(let Y of this.queues.values())for(let X of Y.values())$.add(X.id);return this.temporalManager.cleanOrphaned($)}drain($){let Y=this.queues.get($);if(!Y)return{count:0,jobIds:[]};let X=Y.size,G=[];for(let J of Y.values())G.push(J.id),this.temporalManager.removeDelayed(J.id);return Y.clear(),this.temporalManager.clearIndexForQueue($),this.counters.adjustQueued(-X),this.counters.syncDelayedCount(),{count:X,jobIds:G}}obliterate($){let Y=this.queues.get($);if(Y){for(let G of Y.values())this.temporalManager.removeDelayed(G.id);this.counters.adjustQueued(-Y.size)}let X=this.dlqManager.deleteQueue($);if(X>0)this.counters.adjustDlq(-X);this.counters.syncDelayedCount(),this.temporalManager.clearIndexForQueue($),this.queues.delete($),this.uniqueKeyManager.clearQueue($),this.limiterManager.deleteQueue($),this.activeGroups.delete($)}}import{Database as Lf4}from"bun:sqlite";var Ms0=`
PRAGMA journal_mode = WAL;
PRAGMA synchronous = NORMAL;
PRAGMA cache_size = -64000;
PRAGMA temp_store = MEMORY;
PRAGMA mmap_size = 268435456;
PRAGMA page_size = 4096;
PRAGMA busy_timeout = 5000;
`,Rs0=`
-- Jobs table (using UUIDv7 for job IDs)
-- Uses BLOB for data fields (MessagePack serialization for ~2-3x faster than JSON)
CREATE TABLE IF NOT EXISTS jobs (
    id TEXT PRIMARY KEY,
    queue TEXT NOT NULL,
    data BLOB NOT NULL,
    priority INTEGER NOT NULL DEFAULT 0,
    created_at INTEGER NOT NULL,
    run_at INTEGER NOT NULL,
    started_at INTEGER,
    completed_at INTEGER,
    attempts INTEGER NOT NULL DEFAULT 0,
    max_attempts INTEGER NOT NULL DEFAULT 3,
    backoff INTEGER NOT NULL DEFAULT 1000,
    ttl INTEGER,
    timeout INTEGER,
    unique_key TEXT,
    custom_id TEXT,
    depends_on BLOB,
    parent_id TEXT,
    children_ids BLOB,
    tags BLOB,
    state TEXT NOT NULL DEFAULT 'waiting',
    lifo INTEGER NOT NULL DEFAULT 0,
    group_id TEXT,
    progress INTEGER DEFAULT 0,
    progress_msg TEXT,
    remove_on_complete INTEGER DEFAULT 0,
    remove_on_fail INTEGER DEFAULT 0,
    stall_timeout INTEGER,
    last_heartbeat INTEGER,
    timeline BLOB
);

-- Indexes for common queries
CREATE INDEX IF NOT EXISTS idx_jobs_queue_state
    ON jobs(queue, state);
CREATE INDEX IF NOT EXISTS idx_jobs_run_at
    ON jobs(run_at) WHERE state IN ('waiting', 'delayed');
CREATE INDEX IF NOT EXISTS idx_jobs_unique
    ON jobs(queue, unique_key) WHERE unique_key IS NOT NULL;
CREATE INDEX IF NOT EXISTS idx_jobs_custom_id
    ON jobs(custom_id) WHERE custom_id IS NOT NULL;
CREATE INDEX IF NOT EXISTS idx_jobs_parent
    ON jobs(parent_id) WHERE parent_id IS NOT NULL;

-- Job results storage (BLOB for MessagePack)
CREATE TABLE IF NOT EXISTS job_results (
    job_id TEXT PRIMARY KEY,
    result BLOB,
    completed_at INTEGER NOT NULL
);

-- Dead letter queue (BLOB for MessagePack - stores full DlqEntry)
CREATE TABLE IF NOT EXISTS dlq (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    job_id TEXT NOT NULL,
    queue TEXT NOT NULL,
    entry BLOB NOT NULL,
    entered_at INTEGER NOT NULL
);

CREATE INDEX IF NOT EXISTS idx_dlq_queue ON dlq(queue);
CREATE INDEX IF NOT EXISTS idx_dlq_job_id ON dlq(job_id);
CREATE INDEX IF NOT EXISTS idx_dlq_entered_at ON dlq(entered_at);

-- Performance indexes for high-throughput operations
-- Stall detection: runs every 5s, needs fast lookup of active jobs by started_at
CREATE INDEX IF NOT EXISTS idx_jobs_state_started
    ON jobs(state, started_at) WHERE state = 'active';

-- Group operations: fast lookup by group_id
CREATE INDEX IF NOT EXISTS idx_jobs_group_id
    ON jobs(group_id) WHERE group_id IS NOT NULL;

-- Pending jobs: compound index for priority-ordered retrieval
CREATE INDEX IF NOT EXISTS idx_jobs_pending_priority
    ON jobs(queue, state, priority DESC, run_at ASC) WHERE state IN ('waiting', 'delayed');

-- Completed jobs: index for recovery ordering (issue #84)
CREATE INDEX IF NOT EXISTS idx_jobs_completed_order
    ON jobs(completed_at DESC) WHERE state = 'completed';

-- Cron jobs (BLOB for MessagePack)
CREATE TABLE IF NOT EXISTS cron_jobs (
    name TEXT PRIMARY KEY,
    queue TEXT NOT NULL,
    data BLOB NOT NULL,
    schedule TEXT,
    repeat_every INTEGER,
    priority INTEGER NOT NULL DEFAULT 0,
    next_run INTEGER NOT NULL,
    executions INTEGER NOT NULL DEFAULT 0,
    max_limit INTEGER,
    timezone TEXT,
    unique_key TEXT,
    dedup BLOB,
    skip_missed_on_restart INTEGER NOT NULL DEFAULT 0,
    skip_if_no_worker INTEGER NOT NULL DEFAULT 0,
    prevent_overlap INTEGER NOT NULL DEFAULT 1
);

-- Queue state persistence (optional)
CREATE TABLE IF NOT EXISTS queue_state (
    name TEXT PRIMARY KEY,
    paused INTEGER NOT NULL DEFAULT 0,
    rate_limit INTEGER,
    concurrency_limit INTEGER
);
`,qs0=`
CREATE TABLE IF NOT EXISTS migrations (
    version INTEGER PRIMARY KEY,
    applied_at INTEGER NOT NULL
);
`,tJ0=11,Ps0={1:`
-- Jobs table (using UUIDv7 for job IDs)
-- Uses BLOB for data fields (MessagePack serialization for ~2-3x faster than JSON)
CREATE TABLE IF NOT EXISTS jobs (
    id TEXT PRIMARY KEY,
    queue TEXT NOT NULL,
    data BLOB NOT NULL,
    priority INTEGER NOT NULL DEFAULT 0,
    created_at INTEGER NOT NULL,
    run_at INTEGER NOT NULL,
    started_at INTEGER,
    completed_at INTEGER,
    attempts INTEGER NOT NULL DEFAULT 0,
    max_attempts INTEGER NOT NULL DEFAULT 3,
    backoff INTEGER NOT NULL DEFAULT 1000,
    ttl INTEGER,
    timeout INTEGER,
    unique_key TEXT,
    custom_id TEXT,
    depends_on BLOB,
    parent_id TEXT,
    children_ids BLOB,
    tags BLOB,
    state TEXT NOT NULL DEFAULT 'waiting',
    lifo INTEGER NOT NULL DEFAULT 0,
    group_id TEXT,
    progress INTEGER DEFAULT 0,
    progress_msg TEXT,
    remove_on_complete INTEGER DEFAULT 0,
    remove_on_fail INTEGER DEFAULT 0,
    stall_timeout INTEGER,
    last_heartbeat INTEGER,
    timeline BLOB
);

-- Indexes for common queries
CREATE INDEX IF NOT EXISTS idx_jobs_queue_state
    ON jobs(queue, state);
CREATE INDEX IF NOT EXISTS idx_jobs_run_at
    ON jobs(run_at) WHERE state IN ('waiting', 'delayed');
CREATE INDEX IF NOT EXISTS idx_jobs_unique
    ON jobs(queue, unique_key) WHERE unique_key IS NOT NULL;
CREATE INDEX IF NOT EXISTS idx_jobs_custom_id
    ON jobs(custom_id) WHERE custom_id IS NOT NULL;
CREATE INDEX IF NOT EXISTS idx_jobs_parent
    ON jobs(parent_id) WHERE parent_id IS NOT NULL;

-- Job results storage (BLOB for MessagePack)
CREATE TABLE IF NOT EXISTS job_results (
    job_id TEXT PRIMARY KEY,
    result BLOB,
    completed_at INTEGER NOT NULL
);

-- Dead letter queue (BLOB for MessagePack - stores full DlqEntry)
CREATE TABLE IF NOT EXISTS dlq (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    job_id TEXT NOT NULL,
    queue TEXT NOT NULL,
    entry BLOB NOT NULL,
    entered_at INTEGER NOT NULL
);

CREATE INDEX IF NOT EXISTS idx_dlq_queue ON dlq(queue);
CREATE INDEX IF NOT EXISTS idx_dlq_job_id ON dlq(job_id);
CREATE INDEX IF NOT EXISTS idx_dlq_entered_at ON dlq(entered_at);

-- Performance indexes for high-throughput operations
-- Stall detection: runs every 5s, needs fast lookup of active jobs by started_at
CREATE INDEX IF NOT EXISTS idx_jobs_state_started
    ON jobs(state, started_at) WHERE state = 'active';

-- Group operations: fast lookup by group_id
CREATE INDEX IF NOT EXISTS idx_jobs_group_id
    ON jobs(group_id) WHERE group_id IS NOT NULL;

-- Pending jobs: compound index for priority-ordered retrieval
CREATE INDEX IF NOT EXISTS idx_jobs_pending_priority
    ON jobs(queue, state, priority DESC, run_at ASC) WHERE state IN ('waiting', 'delayed');

-- Completed jobs: index for recovery ordering (issue #84)
CREATE INDEX IF NOT EXISTS idx_jobs_completed_order
    ON jobs(completed_at DESC) WHERE state = 'completed';

-- Cron jobs (BLOB for MessagePack)
CREATE TABLE IF NOT EXISTS cron_jobs (
    name TEXT PRIMARY KEY,
    queue TEXT NOT NULL,
    data BLOB NOT NULL,
    schedule TEXT,
    repeat_every INTEGER,
    priority INTEGER NOT NULL DEFAULT 0,
    next_run INTEGER NOT NULL,
    executions INTEGER NOT NULL DEFAULT 0,
    max_limit INTEGER,
    timezone TEXT,
    unique_key TEXT,
    dedup BLOB,
    skip_missed_on_restart INTEGER NOT NULL DEFAULT 0,
    skip_if_no_worker INTEGER NOT NULL DEFAULT 0,
    prevent_overlap INTEGER NOT NULL DEFAULT 1
);

-- Queue state persistence (optional)
CREATE TABLE IF NOT EXISTS queue_state (
    name TEXT PRIMARY KEY,
    paused INTEGER NOT NULL DEFAULT 0,
    rate_limit INTEGER,
    concurrency_limit INTEGER
);
`,5:`
-- DLQ expiration cleanup: O(log n) instead of O(n) table scan
CREATE INDEX IF NOT EXISTS idx_dlq_entered_at ON dlq(entered_at);

-- Stall detection: runs every 5s, needs fast lookup of active jobs
CREATE INDEX IF NOT EXISTS idx_jobs_state_started
    ON jobs(state, started_at) WHERE state = 'active';

-- Group operations: fast lookup by group_id
CREATE INDEX IF NOT EXISTS idx_jobs_group_id
    ON jobs(group_id) WHERE group_id IS NOT NULL;

-- Pending jobs: compound index for priority-ordered retrieval
CREATE INDEX IF NOT EXISTS idx_jobs_pending_priority
    ON jobs(queue, state, priority DESC, run_at ASC) WHERE state IN ('waiting', 'delayed');
`,6:`
ALTER TABLE cron_jobs ADD COLUMN unique_key TEXT;
ALTER TABLE cron_jobs ADD COLUMN dedup BLOB;
`,7:`
ALTER TABLE jobs ADD COLUMN timeline BLOB;
`,8:`
ALTER TABLE cron_jobs ADD COLUMN skip_missed_on_restart INTEGER NOT NULL DEFAULT 0;
`,9:`
ALTER TABLE cron_jobs ADD COLUMN skip_if_no_worker INTEGER NOT NULL DEFAULT 0;
`,10:`
ALTER TABLE cron_jobs ADD COLUMN prevent_overlap INTEGER NOT NULL DEFAULT 1;
`,11:`
CREATE INDEX IF NOT EXISTS idx_jobs_completed_order
    ON jobs(completed_at DESC) WHERE state = 'completed';
`};var Ff4={insertJob:`
    INSERT INTO jobs (
      id, queue, data, priority, created_at, run_at, attempts,
      max_attempts, backoff, ttl, timeout, unique_key, custom_id,
      depends_on, parent_id, children_ids, tags, state, lifo, group_id,
      remove_on_complete, remove_on_fail, stall_timeout, timeline
    ) VALUES (
      ?, ?, ?, ?, ?, ?, ?,
      ?, ?, ?, ?, ?, ?,
      ?, ?, ?, ?, ?, ?, ?,
      ?, ?, ?, ?
    )
  `,updateJobState:"UPDATE jobs SET state = ?, started_at = ?, timeline = ? WHERE id = ?",completeJob:"UPDATE jobs SET state = ?, completed_at = ?, progress = 100, timeline = ? WHERE id = ?",deleteJob:"DELETE FROM jobs WHERE id = ?",deleteJobResult:"DELETE FROM job_results WHERE job_id = ?",getJob:"SELECT * FROM jobs WHERE id = ?",insertResult:"INSERT OR REPLACE INTO job_results (job_id, result, completed_at) VALUES (?, ?, ?)",getResult:"SELECT result FROM job_results WHERE job_id = ?",insertDlq:"INSERT INTO dlq (job_id, queue, entry, entered_at) VALUES (?, ?, ?, ?)",loadDlq:"SELECT * FROM dlq ORDER BY entered_at",deleteDlqEntry:"DELETE FROM dlq WHERE job_id = ?",clearDlqQueue:"DELETE FROM dlq WHERE queue = ?",insertCron:`
    INSERT OR REPLACE INTO cron_jobs
    (name, queue, data, schedule, repeat_every, priority, next_run, executions, max_limit, timezone, unique_key, dedup, skip_missed_on_restart, skip_if_no_worker, prevent_overlap)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
  `,updateCron:"UPDATE cron_jobs SET executions = ?, next_run = ? WHERE name = ?"};function ws0($){let Y=new Map;for(let[X,G]of Object.entries(Ff4))Y.set(X,$.prepare(G));return Y}var _s0={debug:0,info:1,warn:2,error:3};class TN{component;static jsonMode=!1;static level="info";constructor($){this.component=$}static enableJsonMode(){TN.jsonMode=!0}static disableJsonMode(){TN.jsonMode=!1}static setLevel($){TN.level=$}debug($,Y){this.log("debug",$,Y)}info($,Y){this.log("info",$,Y)}warn($,Y){this.log("warn",$,Y)}error($,Y){this.log("error",$,Y)}log($,Y,X){if(_s0[$]<_s0[TN.level])return;if(TN.jsonMode){let G={timestamp:new Date().toISOString(),level:$,component:this.component,message:Y,...X&&{data:X}};console.log(JSON.stringify(G))}else{let G=`[${this.component}]`,J=X?` ${JSON.stringify(X)}`:"";switch($){case"debug":console.debug(`${G} ${Y}${J}`);break;case"info":console.log(`${G} ${Y}${J}`);break;case"warn":console.warn(`${G} ${Y}${J}`);break;case"error":console.error(`${G} ${Y}${J}`);break}}}}function xU($){return new TN($)}var Mp9=xU("Server"),Rp9=xU("TCP"),qp9=xU("HTTP"),Pp9=xU("WS"),eJ0=xU("Cron"),wp9=xU("Stats"),MK=xU("Storage"),gV=xU("Queue"),qR=xU("Webhook"),_p9=xU("Backup");function p$($){return LR($)}function RK($,Y,X){if(!$)return Y;try{return ZS($)}catch(G){return MK.error("MessagePack decode error",{context:X,error:String(G)}),Y}}function PR($){let Y=`rowToJob:${$.id}`,X=$.depends_on?RK($.depends_on,[],`${Y}:dependsOn`):[],G=$.children_ids?RK($.children_ids,[],`${Y}:childrenIds`):[],J=$.tags?RK($.tags,[],`${Y}:tags`):[];return{id:d0($.id),queue:$.queue,data:RK($.data,{},`${Y}:data`),priority:$.priority,createdAt:$.created_at,runAt:$.run_at,startedAt:$.started_at,completedAt:$.completed_at,attempts:$.attempts,maxAttempts:$.max_attempts,backoff:$.backoff,backoffConfig:null,ttl:$.ttl,timeout:$.timeout,uniqueKey:$.unique_key,customId:$.custom_id,dependsOn:X.map((Q)=>d0(Q)),parentId:$.parent_id?d0($.parent_id):null,childrenIds:G.map((Q)=>d0(Q)),childrenCompleted:0,tags:J,lifo:$.lifo===1,groupId:$.group_id,progress:$.progress??0,progressMessage:$.progress_msg,removeOnComplete:$.remove_on_complete===1,removeOnFail:$.remove_on_fail===1,repeat:null,lastHeartbeat:$.last_heartbeat??$.created_at,stallTimeout:$.stall_timeout,stallCount:0,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:$.timeline?RK($.timeline,[],`${Y}:timeline`):[]}}function $Q0($){return{...$,job:{...$.job,id:d0(String($.job.id)),dependsOn:$.job.dependsOn.map((Y)=>d0(String(Y))),parentId:$.job.parentId?d0(String($.job.parentId)):null,childrenIds:$.job.childrenIds.map((Y)=>d0(String(Y)))}}}class YQ0{db;cache=new Map;constructor($){this.db=$}insertJobsBatch($){if($.length===0)return;let Y=Date.now(),G=Math.floor(999/24);this.db.transaction(()=>{for(let J=0;J<$.length;J+=G){let Q=$.slice(J,J+G);this.insertJobsChunk(Q,Y)}})()}getBatchInsertStmt($){let Y=this.cache.get($);if(!Y){let J=`INSERT INTO jobs (
        id, queue, data, priority, created_at, run_at, attempts, max_attempts,
        backoff, ttl, timeout, unique_key, custom_id, depends_on, parent_id,
        children_ids, tags, state, lifo, group_id, remove_on_complete, remove_on_fail, stall_timeout, timeline
      ) VALUES ${Array($).fill("(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)").join(", ")}`;if(Y=this.db.prepare(J),$<=100)this.cache.set($,Y)}return Y}insertJobsChunk($,Y){let X=this.getBatchInsertStmt($.length),G=[];for(let J of $)G.push(J.id,J.queue,p$(J.data),J.priority,J.createdAt,J.runAt,J.attempts,J.maxAttempts,J.backoff,J.ttl,J.timeout,J.uniqueKey,J.customId,J.dependsOn.length>0?p$(J.dependsOn):null,J.parentId,J.childrenIds.length>0?p$(J.childrenIds):null,J.tags.length>0?p$(J.tags):null,J.runAt>Y?"delayed":"waiting",J.lifo?1:0,J.groupId,J.removeOnComplete?1:0,J.removeOnFail?1:0,J.stallTimeout,J.timeline.length>0?p$(J.timeline):null);X.run(...G)}}class XQ0{activeBuffer=[];flushBuffer=[];flushing=!1;stopped=!1;timer=null;batchManager;bufferSize;onError;onCriticalError;retryCount=0;currentBackoffMs=100;initialBackoffMs=100;maxBackoffMs=30000;maxRetries=10;lastError=null;backoffTimer=null;constructor($,Y,X,G,J){this.batchManager=$,this.bufferSize=Y,this.onError=G,this.onCriticalError=J,this.timer=setInterval(()=>{if(this.stopped||this.backoffTimer)return;try{this.flush()}catch{}},X)}add($){if(this.activeBuffer.push($),this.activeBuffer.length>=this.bufferSize)this.flush()}addBatch($){for(let Y of $)this.activeBuffer.push(Y);if(this.activeBuffer.length>=this.bufferSize)this.flush()}flush(){if(this.stopped||this.flushing)return 0;if(this.activeBuffer.length===0)return 0;this.flushing=!0,this.flushBuffer=this.activeBuffer,this.activeBuffer=[];let $=this.flushBuffer.length;try{return this.batchManager.insertJobsBatch(this.flushBuffer),this.flushBuffer=[],this.retryCount=0,this.currentBackoffMs=this.initialBackoffMs,this.lastError=null,$}catch(Y){let X=Y instanceof Error?Y:Error(String(Y));if(this.lastError=X,this.retryCount++,this.activeBuffer=this.flushBuffer.concat(this.activeBuffer),this.flushBuffer=[],this.retryCount>=this.maxRetries){let J=[...this.activeBuffer];if(this.activeBuffer=[],this.onCriticalError)this.onCriticalError(J,X,this.retryCount);throw this.onError(X,J.length,{retryCount:this.retryCount,nextBackoffMs:0,maxRetries:this.maxRetries}),this.retryCount=0,this.currentBackoffMs=this.initialBackoffMs,this.lastError=null,Y}let G=Math.min(this.currentBackoffMs*2,this.maxBackoffMs);throw this.onError(X,$,{retryCount:this.retryCount,nextBackoffMs:G,maxRetries:this.maxRetries}),this.scheduleBackoffRetry(),Y}finally{this.flushing=!1}}scheduleBackoffRetry(){if(this.backoffTimer)clearTimeout(this.backoffTimer);this.currentBackoffMs=Math.min(this.currentBackoffMs*2,this.maxBackoffMs),this.backoffTimer=setTimeout(()=>{this.backoffTimer=null;try{this.flush()}catch{}},this.currentBackoffMs)}get pendingCount(){return this.activeBuffer.length+this.flushBuffer.length}removePending($){let Y=this.activeBuffer.findIndex((G)=>G.id===$);if(Y!==-1)this.activeBuffer.splice(Y,1);let X=this.flushBuffer.findIndex((G)=>G.id===$);if(X!==-1)this.flushBuffer.splice(X,1)}hasPending($){for(let Y of this.activeBuffer)if(Y.id===$)return!0;for(let Y of this.flushBuffer)if(Y.id===$)return!0;return!1}stop(){if(this.timer)clearInterval(this.timer),this.timer=null;if(this.pendingCount>0)try{this.flush()}catch{}if(this.stopped=!0,this.backoffTimer)clearTimeout(this.backoffTimer),this.backoffTimer=null;this.reportLostJobs()}async stopGracefully($=5000){if(this.backoffTimer)clearTimeout(this.backoffTimer),this.backoffTimer=null;if(this.timer)clearInterval(this.timer),this.timer=null;if(this.pendingCount===0)return this.stopped=!0,0;return new Promise((X)=>{let G=setTimeout(()=>{this.stopped=!0,this.reportLostJobs(),X(-1)},$);try{let J=this.flush();clearTimeout(G),this.stopped=!0,X(J)}catch{if(this.backoffTimer)clearTimeout(this.backoffTimer),this.backoffTimer=null;clearTimeout(G),this.stopped=!0,this.reportLostJobs(),X(0)}})}reportLostJobs(){let $=this.activeBuffer.concat(this.flushBuffer);if($.length>0&&this.onCriticalError)this.onCriticalError($,this.lastError??Error("Flush failed during shutdown"),this.retryCount),this.activeBuffer=[],this.flushBuffer=[]}getRetryState(){return{retryCount:this.retryCount,currentBackoffMs:this.currentBackoffMs,lastError:this.lastError}}}function js0($){if(!($ instanceof Error))return!1;let Y=$.message;return Y.includes("SQLITE_FULL")||Y.includes("database or disk is full")}class mc{db;statements;batchManager;writeBuffer;_diskFull=!1;_lastDiskFullError=null;_lastDiskFullAt=null;_criticalLosses=[];_onCriticalLoss;static MAX_RETAINED_LOSSES=100;constructor($){this.db=new Lf4($.path,{create:!0}),this.db.run(Ms0),this.migrate(),this.statements=ws0(this.db),this._onCriticalLoss=$.onCriticalLoss,this.batchManager=new YQ0(this.db),this.writeBuffer=new XQ0(this.batchManager,$.writeBufferSize??100,$.writeBufferFlushMs??10,(Y,X)=>{if(js0(Y))this.setDiskFull(Y.message);MK.error("Write buffer flush failed",{jobCount:X,error:Y.message,diskFull:this._diskFull})},(Y,X,G)=>{this.handleCriticalLoss(Y,X,G)})}handleCriticalLoss($,Y,X){MK.error("CRITICAL: WriteBuffer dropped jobs after exhausting retries",{lostJobCount:$.length,attempts:X,error:Y.message,diskFull:this._diskFull});for(let G of $)MK.error("Lost job (recover from this log if needed)",{id:String(G.id),queue:G.queue,customId:G.customId,priority:G.priority,createdAt:G.createdAt,attempts:G.attempts,dataPreview:this.previewJobData(G.data)});this._criticalLosses.push({jobs:$,error:Y.message,attempts:X,at:Date.now()});while(this._criticalLosses.length>mc.MAX_RETAINED_LOSSES)this._criticalLosses.shift();if(this._onCriticalLoss)try{this._onCriticalLoss($,Y,X)}catch(G){MK.error("onCriticalLoss callback threw",{error:G instanceof Error?G.message:String(G)})}}previewJobData($){try{let Y=JSON.stringify($);return Y.length>500?Y.slice(0,500)+"...[truncated]":Y}catch{return"[unserializable]"}}getCriticalLosses(){return this._criticalLosses}clearCriticalLosses(){this._criticalLosses.length=0}setDiskFull($){if(!this._diskFull)MK.error("DISK FULL: SQLite cannot write, persistence degraded",{error:$});this._diskFull=!0,this._lastDiskFullError=$,this._lastDiskFullAt=Date.now()}safeWrite($){try{if($(),this._diskFull)this._diskFull=!1,this._lastDiskFullError=null,MK.info("Disk full condition cleared - writes succeeding again")}catch(Y){if(js0(Y))this.setDiskFull(Y instanceof Error?Y.message:String(Y));throw Y}}get diskFull(){return this._diskFull}getDiskFullStatus(){return{diskFull:this._diskFull,error:this._lastDiskFullError,since:this._lastDiskFullAt}}flushWriteBuffer(){return this.writeBuffer.flush()}migrate(){this.db.run(qs0);let $=this.db.query("SELECT MAX(version) as version FROM migrations").get()?.version??0;if($<tJ0){this.db.run(Rs0);for(let[Y,X]of Object.entries(Ps0)){let G=Number(Y);if(G>$&&G>1)try{this.db.run(X)}catch{}}this.db.prepare("INSERT INTO migrations (version, applied_at) VALUES (?, ?)").run(tJ0,Date.now())}}insertJob($,Y){if(Y){this.insertJobImmediate($);return}this.writeBuffer.add($)}insertJobImmediate($){this.safeWrite(()=>{this.statements.get("insertJob").run($.id,$.queue,p$($.data),$.priority,$.createdAt,$.runAt,$.attempts,$.maxAttempts,$.backoff,$.ttl,$.timeout,$.uniqueKey,$.customId,$.dependsOn.length>0?p$($.dependsOn):null,$.parentId,$.childrenIds.length>0?p$($.childrenIds):null,$.tags.length>0?p$($.tags):null,$.runAt>Date.now()?"delayed":"waiting",$.lifo?1:0,$.groupId,$.removeOnComplete?1:0,$.removeOnFail?1:0,$.stallTimeout,$.timeline.length>0?p$($.timeline):null)})}flushIfBuffered($){if(this.writeBuffer.hasPending(String($)))try{this.writeBuffer.flush()}catch{}}markActive($,Y,X){this.flushIfBuffered($),this.safeWrite(()=>{this.statements.get("updateJobState").run("active",Y,X&&X.length>0?p$(X):null,$)})}markCompleted($,Y,X){this.flushIfBuffered($),this.safeWrite(()=>{this.statements.get("completeJob").run("completed",Y,X&&X.length>0?p$(X):null,$)})}markFailed($,Y){this.flushIfBuffered($.id),this.safeWrite(()=>{this.statements.get("insertDlq").run($.id,$.queue,p$({job:$,error:Y}),Date.now())})}saveDlqEntry($){this.safeWrite(()=>{this.statements.get("insertDlq").run($.job.id,$.job.queue,p$($),$.enteredAt)})}deleteDlqEntry($){this.safeWrite(()=>{this.statements.get("deleteDlqEntry").run($)})}clearDlqQueue($){this.safeWrite(()=>{this.statements.get("clearDlqQueue").run($)})}loadDlq(){let $=this.statements.get("loadDlq").all(),Y=new Map;for(let X of $){let G=RK(X.entry,null,`loadDlq:${X.job_id}`);if(!G?.job)continue;let J=$Q0(G),Q=Y.get(X.queue);if(!Q)Q=[],Y.set(X.queue,Q);Q.push(J)}return Y}updateForRetry($){this.safeWrite(()=>{this.db.prepare("UPDATE jobs SET attempts = ?, run_at = ?, state = ?, timeline = ? WHERE id = ?").run($.attempts,$.runAt,"waiting",$.timeline.length>0?p$($.timeline):null,$.id)})}deleteJob($){this.writeBuffer.removePending($),this.safeWrite(()=>{let Y=this.statements.get("deleteJob"),X=this.statements.get("deleteJobResult");this.db.transaction((J)=>{Y.run(J),X.run(J)})($)})}updateJobData($,Y){this.safeWrite(()=>{this.db.prepare("UPDATE jobs SET data = ? WHERE id = ?").run(p$(Y),$)})}updateJobChildrenIds($,Y){this.safeWrite(()=>{this.db.prepare("UPDATE jobs SET children_ids = ? WHERE id = ?").run(Y.length>0?p$(Y):null,$)})}getJob($){let Y=this.statements.get("getJob").get($);return Y?PR(Y):null}storeResult($,Y){this.safeWrite(()=>{this.statements.get("insertResult").run($,p$(Y),Date.now())})}getResult($){let Y=this.statements.get("getResult").get($);return Y?RK(Y.result,null,`getResult:${$}`):null}hasResult($){return this.db.query("SELECT job_id FROM job_results WHERE job_id = ?").get(String($))!==null}hasDlqEntry($){return this.db.query("SELECT job_id FROM dlq WHERE job_id = ? LIMIT 1").get(String($))!==null}getDlqEntry($){let Y=this.db.query("SELECT entry FROM dlq WHERE job_id = ? ORDER BY entered_at DESC LIMIT 1").get(String($));if(!Y)return null;let X=RK(Y.entry,null,`getDlqEntry:${String($)}`);return X?.job?$Q0(X):null}loadDlqJobIds(){let $=this.db.query("SELECT job_id FROM dlq").all();return new Set($.map((Y)=>Y.job_id))}getJobStateRaw($){return this.db.query("SELECT state FROM jobs WHERE id = ?").get(String($))?.state??null}loadCompletedJobIds(){let $=this.db.query("SELECT job_id FROM job_results").all();return new Set($.map((Y)=>Y.job_id))}insertJobsBatch($){this.writeBuffer.addBatch($)}queryJobs($,Y){let X=Y.asc?"ASC":"DESC",G;if(Y.states&&Y.states.length>0){let J=Y.states.map(()=>"?").join(",");G=this.db.query(`SELECT * FROM jobs WHERE queue = ? AND state IN (${J}) ORDER BY created_at ${X} LIMIT ? OFFSET ?`).all($,...Y.states,Y.limit,Y.offset)}else if(Y.state)G=this.db.query(`SELECT * FROM jobs WHERE queue = ? AND state = ? ORDER BY created_at ${X} LIMIT ? OFFSET ?`).all($,Y.state,Y.limit,Y.offset);else G=this.db.query(`SELECT * FROM jobs WHERE queue = ? ORDER BY created_at ${X} LIMIT ? OFFSET ?`).all($,Y.limit,Y.offset);return G.map((J)=>PR(J))}loadPendingJobs($=1e4,Y=0){return this.db.query("SELECT * FROM jobs WHERE state IN ('waiting', 'delayed') ORDER BY priority DESC, run_at ASC LIMIT ? OFFSET ?").all($,Y).map((G)=>PR(G))}loadActiveJobs($=1e4,Y=0){return this.db.query("SELECT * FROM jobs WHERE state = 'active' ORDER BY started_at ASC LIMIT ? OFFSET ?").all($,Y).map((G)=>PR(G))}loadCompletedJobs($=1e4,Y=0){return this.db.query("SELECT * FROM jobs WHERE state = 'completed' ORDER BY completed_at DESC LIMIT ? OFFSET ?").all($,Y).map((G)=>PR(G))}countPendingJobs(){return this.db.query("SELECT COUNT(*) as count FROM jobs WHERE state IN ('waiting', 'delayed')").get()?.count??0}countActiveJobs(){return this.db.query("SELECT COUNT(*) as count FROM jobs WHERE state = 'active'").get()?.count??0}saveCron($){this.safeWrite(()=>{this.statements.get("insertCron").run($.name,$.queue,p$($.data),$.schedule,$.repeatEvery,$.priority,$.nextRun,$.executions,$.maxLimit,$.timezone,$.uniqueKey,$.dedup?p$($.dedup):null,$.skipMissedOnRestart?1:0,$.skipIfNoWorker?1:0,$.preventOverlap?1:0)})}loadCronJobs(){return this.db.query("SELECT * FROM cron_jobs").all().map((Y)=>({name:Y.name,queue:Y.queue,data:RK(Y.data,{},`loadCronJobs:${Y.name}`),schedule:Y.schedule,repeatEvery:Y.repeat_every,priority:Y.priority,timezone:Y.timezone,nextRun:Y.next_run,executions:Y.executions,maxLimit:Y.max_limit,uniqueKey:Y.unique_key??null,dedup:Y.dedup?RK(Y.dedup,null,`loadCronDedup:${Y.name}`):null,skipMissedOnRestart:Y.skip_missed_on_restart===1,skipIfNoWorker:Y.skip_if_no_worker===1,preventOverlap:Y.prevent_overlap===1}))}deleteCron($){this.safeWrite(()=>{this.db.prepare("DELETE FROM cron_jobs WHERE name = ?").run($)})}updateCron($,Y,X){this.safeWrite(()=>{this.statements.get("updateCron").run(Y,X,$)})}close(){this.writeBuffer.stop();try{this.writeBuffer.flush()}catch($){MK.error("Failed to flush write buffer on close",{bufferedJobs:this.writeBuffer.pendingCount,error:$ instanceof Error?$.message:String($)})}try{this.db.run("PRAGMA wal_checkpoint(TRUNCATE)")}catch($){MK.error("WAL checkpoint failed on close",{error:$ instanceof Error?$.message:String($)})}this.db.close()}getSize(){return Bun.file(this.db.filename).size}}function Ts0($,Y){if(!$.schedule&&!$.repeatEvery)throw Error("Cron job must have either schedule or repeatEvery");return{name:$.name,queue:$.queue,data:$.data,schedule:$.schedule??null,repeatEvery:$.repeatEvery??null,priority:$.priority??0,timezone:$.timezone??null,nextRun:Y,executions:0,maxLimit:$.maxLimit??null,uniqueKey:$.uniqueKey??null,dedup:$.dedup??null,skipMissedOnRestart:$.skipMissedOnRestart??!0,skipIfNoWorker:$.skipIfNoWorker??!1,preventOverlap:$.preventOverlap??!0}}function uc($){if($.maxLimit===null)return!1;return $.executions>=$.maxLimit}WQ0();function xs0($,Y){try{return new AS($,{timezone:Y}),null}catch(X){return X instanceof Error?X.message:"Invalid cron expression"}}function dc($,Y=Date.now(),X){let J=new AS($,{timezone:X}).nextRun(new Date(Y));return J?J.getTime():0}function cc($,Y=Date.now()){return Y+$}var Of4={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *"};function lc($){let Y=$.trim().toLowerCase();return Of4[Y]??$}var Ef4=60000;class KQ0{cronJobs=new Map;cronHeap=new vU(($,Y)=>$.cron.nextRun-Y.cron.nextRun);generation=0;nextTimer=null;safetyInterval=null;started=!1;pushJob=null;persistCron=null;hasWorkers=null;dashboardEmit=null;lastFiredAt=new Map;constructor($){}setPushCallback($){this.pushJob=$}setPersistCallback($){this.persistCron=$}setWorkerCheckCallback($){this.hasWorkers=$}setDashboardEmit($){this.dashboardEmit=$}start(){if(this.started)return;this.started=!0,this.safetyInterval=setInterval(()=>{this.tick()},Ef4),this.scheduleNext()}stop(){if(this.started=!1,this.nextTimer!==null)clearTimeout(this.nextTimer),this.nextTimer=null;if(this.safetyInterval!==null)clearInterval(this.safetyInterval),this.safetyInterval=null}add($){if(!$.schedule&&!$.repeatEvery)throw Error("Cron job must have either schedule or repeatEvery");if($.schedule){let W=lc($.schedule),K=xs0(W,$.timezone);if(K)throw Error(`Invalid cron expression: ${K}`)}let Y=Date.now(),X;if($.schedule){let W=lc($.schedule);X=dc(W,Y,$.timezone)}else X=cc($.repeatEvery,Y);let G=Ts0($,X),J=this.cronJobs.get(G.name);if(J)G.executions=J.cron.executions;if($.immediately&&!J)G.nextRun=Date.now();let Q=this.generation++;if(this.cronJobs.set(G.name,{cron:G,generation:Q}),this.cronHeap.push({cron:G,generation:Q}),this.started)this.scheduleNext();return G}remove($){if(!this.cronJobs.get($))return!1;if(this.cronJobs.delete($),this.started)this.scheduleNext();return!0}get($){return this.cronJobs.get($)?.cron}list(){return Array.from(this.cronJobs.values()).map(($)=>$.cron)}load($){let Y=Date.now(),X=[];for(let G of $){if((G.skipMissedOnRestart||G.skipIfNoWorker)&&G.nextRun<Y){if(G.schedule)G.nextRun=dc(G.schedule,Y,G.timezone??void 0);else if(G.repeatEvery)G.nextRun=cc(G.repeatEvery,Y);this.persistCron?.(G.name,G.executions,G.nextRun)}let J=this.generation++;this.cronJobs.set(G.name,{cron:G,generation:J}),X.push({cron:G,generation:J})}if(this.cronHeap.buildFrom(X),this.started)this.scheduleNext()}scheduleNext(){if(!this.started)return;if(this.nextTimer!==null)clearTimeout(this.nextTimer),this.nextTimer=null;while(!this.cronHeap.isEmpty){let $=this.cronHeap.peek();if(!$)return;if(this.cronJobs.get($.cron.name)?.generation!==$.generation){this.cronHeap.pop();continue}let Y=Math.max(0,$.cron.nextRun-Date.now());this.nextTimer=setTimeout(()=>{this.nextTimer=null,this.tick()},Y);return}}async tick(){if(!this.pushJob)return;let $=Date.now(),Y=[],X=[];while(!this.cronHeap.isEmpty){let G=this.cronHeap.peek();if(!G||G.cron.nextRun>$)break;if(this.cronHeap.pop(),this.cronJobs.get(G.cron.name)?.generation!==G.generation)continue;let Q=G.cron;if(uc(Q)){X.push(Q.name);continue}try{let W=Q.executions+1,K=Date.now(),Z;if(Q.schedule){let H=lc(Q.schedule);Z=dc(H,K,Q.timezone??void 0)}else if(Q.repeatEvery)Z=cc(Q.repeatEvery,K);else Z=K;if(this.persistCron)try{this.persistCron(Q.name,W,Z)}catch(H){eJ0.error("Failed to persist cron state, skipping job push",{name:Q.name,error:String(H)}),this.dashboardEmit?.("cron:missed",{name:Q.name,queue:Q.queue,error:String(H)}),Y.push(G);continue}Q.executions=W,Q.nextRun=Z,await this.fireCronJob(Q,$),Y.push(G)}catch(W){eJ0.error("Failed to push cron job (state already persisted)",{name:Q.name,error:String(W)}),this.dashboardEmit?.("cron:missed",{name:Q.name,queue:Q.queue,error:String(W)}),Y.push(G)}}for(let G of Y)this.cronHeap.push(G);for(let G of X)this.cronJobs.delete(G);this.scheduleNext()}async fireCronJob($,Y){if($.skipIfNoWorker&&this.hasWorkers&&!this.hasWorkers($.queue)){this.dashboardEmit?.("cron:skipped",{name:$.name,queue:$.queue,reason:"no-worker"});return}let X=this.lastFiredAt.get($.name),G=$.repeatEvery??60000;if(X&&Y-X<G*0.8){this.dashboardEmit?.("cron:skipped",{name:$.name,queue:$.queue,reason:"overlap"});return}let J=$.uniqueKey??($.preventOverlap?`cron:${$.name}`:void 0);await this.pushJob($.queue,{data:$.data,priority:$.priority,uniqueKey:J,dedup:$.dedup??void 0}),this.lastFiredAt.set($.name,Y),this.dashboardEmit?.("cron:fired",{name:$.name,queue:$.queue})}getStats(){let $=null,Y=this.cronHeap.peek();if(Y){if(this.cronJobs.get(Y.cron.name)?.generation===Y.generation&&!uc(Y.cron))$=Y.cron.nextRun}let X=0;for(let{cron:G}of this.cronJobs.values())if(!uc(G))X++;return{total:this.cronJobs.size,pending:X,nextRun:$}}}function ys0($,Y,X,G){return{id:yc(),url:$,events:Y,queue:X??null,secret:G??null,createdAt:Date.now(),lastTriggered:null,successCount:0,failureCount:0,enabled:!0}}var Mf4=parseInt(Bun.env.WEBHOOK_MAX_RETRIES??"3",10),Rf4=parseInt(Bun.env.WEBHOOK_RETRY_DELAY_MS??"1000",10);function qf4($,Y){let X=new Bun.CryptoHasher("sha256",Y);return X.update($),X.digest("hex")}class ZQ0{webhooks=new Map;maxRetries=Mf4;retryDelay=Rf4;validateUrls;dashboardEmit=null;enabledCount=0;constructor($){this.validateUrls=$?.validateUrls!==!1}setDashboardEmit($){this.dashboardEmit=$}add($,Y,X,G){if(this.validateUrls){let Q=JJ0($);if(Q)throw Error(Q)}let J=ys0($,Y,X,G);if(this.webhooks.set(J.id,J),J.enabled)this.enabledCount++;return J}remove($){if(this.webhooks.get($)?.enabled)this.enabledCount--;return this.webhooks.delete($)}get($){return this.webhooks.get($)}setEnabled($,Y){let X=this.webhooks.get($);if(!X)return!1;if(X.enabled!==Y)X.enabled=Y,this.enabledCount+=Y?1:-1,this.dashboardEmit?.(Y?"webhook:enabled":"webhook:disabled",{webhookId:$});return!0}list(){return Array.from(this.webhooks.values())}async trigger($,Y,X,G){let J={event:$,timestamp:Date.now(),jobId:Y,queue:X,...G},Q=Array.from(this.webhooks.values()).filter((W)=>W.enabled&&W.events.includes($)&&(W.queue===null||W.queue===X));for(let W of Q)this.sendWebhook(W,J).catch((K)=>{qR.error("Failed to send webhook",{url:W.url,error:String(K)})})}async sendWebhook($,Y){let X=JSON.stringify(Y),G={"Content-Type":"application/json","X-Webhook-Event":Y.event,"X-Webhook-Timestamp":String(Y.timestamp)};if($.secret)G["X-Webhook-Signature"]=qf4(X,$.secret);let J=null;for(let Q=0;Q<this.maxRetries;Q++){try{let W=await fetch($.url,{method:"POST",headers:G,body:X,signal:AbortSignal.timeout(1e4)});if(W.ok){$.lastTriggered=Date.now(),$.successCount++,this.dashboardEmit?.("webhook:fired",{webhookId:$.id,url:$.url,event:Y.event});return}J=Error(`HTTP ${W.status}`)}catch(W){J=W instanceof Error?W:Error(String(W))}if(Q<this.maxRetries-1)await Bun.sleep(this.retryDelay*(Q+1))}throw $.failureCount++,this.dashboardEmit?.("webhook:failed",{webhookId:$.id,url:$.url,event:Y.event,error:J?.message??"Webhook delivery failed after max retries"}),J??Error("Webhook delivery failed after max retries")}hasEnabledWebhooks(){return this.enabledCount>0}getStats(){return{total:this.webhooks.size,enabled:this.enabledCount}}}function bs0($,Y,X=1,G){let J=Date.now();return{id:G?.workerId??yc(),name:$,queues:Y??[],concurrency:X,hostname:G?.hostname??"unknown",pid:G?.pid??0,registeredAt:G?.startedAt??J,lastSeen:J,activeJobs:0,processedJobs:0,failedJobs:0,currentJob:null,clientId:G?.clientId??null}}function hs0($,Y="info"){return{timestamp:Date.now(),level:Y,message:$}}var ic=parseInt(Bun.env.WORKER_TIMEOUT_MS??"30000",10),Pf4=parseInt(Bun.env.WORKER_CLEANUP_INTERVAL_MS??"60000",10);class UQ0{workers=new Map;cleanupInterval=null;dashboardEmit=null;totalProcessedCounter=0;totalFailedCounter=0;totalActiveJobsCounter=0;constructor(){this.startCleanup()}setDashboardEmit($){this.dashboardEmit=$}register($,Y,X=1,G){if(G?.workerId){let Q=this.workers.get(G.workerId);if(Q){if(Q.queues=Y,Q.concurrency=X,Q.lastSeen=Date.now(),G.hostname)Q.hostname=G.hostname;if(G.pid)Q.pid=G.pid;return Q}}let J=bs0($,Y,X,G);return this.workers.set(J.id,J),J}unregister($){let Y=this.workers.get($);if(Y)this.totalActiveJobsCounter-=Y.activeJobs;return this.workers.delete($)}unregisterByClientId($){let Y=0;for(let[X,G]of this.workers)if(G.clientId===$)this.totalActiveJobsCounter-=G.activeJobs,this.workers.delete(X),this.dashboardEmit?.("worker:disconnected",{workerId:X,name:G.name,clientId:$}),Y++;return Y}get($){return this.workers.get($)}heartbeat($,Y){let X=this.workers.get($);if(!X)return!1;if(X.lastSeen=Date.now(),Y){if(Y.activeJobs!==void 0)this.totalActiveJobsCounter-=X.activeJobs,X.activeJobs=Y.activeJobs,this.totalActiveJobsCounter+=Y.activeJobs;if(Y.processed!==void 0)this.totalProcessedCounter-=X.processedJobs,X.processedJobs=Y.processed,this.totalProcessedCounter+=Y.processed;if(Y.failed!==void 0)this.totalFailedCounter-=X.failedJobs,X.failedJobs=Y.failed,this.totalFailedCounter+=Y.failed}return!0}incrementActive($,Y){let X=this.workers.get($);if(X){if(X.activeJobs++,this.totalActiveJobsCounter++,X.lastSeen=Date.now(),Y)X.currentJob=Y}}jobCompleted($){let Y=this.workers.get($);if(Y){if(Y.activeJobs>0)Y.activeJobs--,this.totalActiveJobsCounter--;if(Y.processedJobs++,this.totalProcessedCounter++,Y.lastSeen=Date.now(),Y.activeJobs===0)Y.currentJob=null,this.dashboardEmit?.("worker:idle",{workerId:$,processedJobs:Y.processedJobs})}}jobFailed($){let Y=this.workers.get($);if(Y){if(Y.activeJobs>0)Y.activeJobs--,this.totalActiveJobsCounter--;if(Y.failedJobs++,this.totalFailedCounter++,Y.lastSeen=Date.now(),Y.activeJobs===0)Y.currentJob=null,this.dashboardEmit?.("worker:idle",{workerId:$,processedJobs:Y.processedJobs});let X=Y.processedJobs+Y.failedJobs;if(X>=5&&(Y.failedJobs===5||Y.failedJobs===10||Y.failedJobs===25||Y.failedJobs===50||Y.failedJobs===100))this.dashboardEmit?.("worker:error",{workerId:$,name:Y.name,failedJobs:Y.failedJobs,processedJobs:Y.processedJobs,failureRate:+(Y.failedJobs/X).toFixed(3)})}}list(){return Array.from(this.workers.values())}listActive(){let $=Date.now();return Array.from(this.workers.values()).filter((Y)=>$-Y.lastSeen<ic)}getForQueue($){let Y=Date.now();return Array.from(this.workers.values()).filter((X)=>X.queues?.includes($)&&Y-X.lastSeen<ic)}startCleanup(){this.cleanupInterval=setInterval(()=>{this.cleanupStale()},Pf4)}cleanupStale(){let $=Date.now(),Y=ic*3;for(let[X,G]of this.workers)if($-G.lastSeen>Y)this.totalActiveJobsCounter-=G.activeJobs,this.workers.delete(X),this.dashboardEmit?.("worker:removed-stale",{workerId:X,name:G.name})}stop(){if(this.cleanupInterval)clearInterval(this.cleanupInterval),this.cleanupInterval=null}getStats(){let $=Date.now(),Y=0;for(let X of this.workers.values())if($-X.lastSeen<ic)Y++;return{total:this.workers.size,active:Y,totalProcessed:this.totalProcessedCounter,totalFailed:this.totalFailedCounter,activeJobs:this.totalActiveJobsCounter}}}class HQ0{webhookManager;subscribers=new Set;completionWaiters=new Map;constructor($){this.webhookManager=$}get subscriberCount(){return this.subscribers.size}get completionWaiterCount(){return this.completionWaiters.size}subscribe($){return this.subscribers.add($),()=>{this.subscribers.delete($)}}clear(){this.subscribers.clear();for(let $ of this.completionWaiters.values())for(let Y of $)if(!Y.cancelled)Y.resolve();this.completionWaiters.clear()}waitForJobCompletion($,Y){let X=String($);return new Promise((G)=>{let J={resolve:()=>{clearTimeout(Q),G(!0)},cancelled:!1},Q=setTimeout(()=>{J.cancelled=!0;let K=this.completionWaiters.get(X);if(K){let Z=K.indexOf(J);if(Z!==-1)K.splice(Z,1);if(K.length===0)this.completionWaiters.delete(X)}G(!1)},Y),W=this.completionWaiters.get(X);if(!W)W=[],this.completionWaiters.set(X,W);W.push(J)})}needsBroadcast(){return this.subscribers.size>0||this.webhookManager.hasEnabledWebhooks()||this.completionWaiters.size>0}broadcast($){let Y=this.subscribers.size>0,X=this.webhookManager.hasEnabledWebhooks(),J=$.eventType==="completed"&&this.completionWaiters.size>0;if(!Y&&!X&&!J)return;if(Y)for(let Q of this.subscribers)try{Q($)}catch{}if(J){let Q=String($.jobId),W=this.completionWaiters.get(Q);if(W){this.completionWaiters.delete(Q);for(let K of W)if(!K.cancelled)K.resolve()}}if(X){let Q=this.mapEventToWebhook($.eventType);if(Q)this.webhookManager.trigger(Q,String($.jobId),$.queue,{data:$.data,error:$.error}).catch((W)=>{qR.error("Webhook trigger failed",{event:Q,jobId:String($.jobId),queue:$.queue,error:String(W)})})}}mapEventToWebhook($){switch($){case"pushed":return"job.pushed";case"pulled":return"job.started";case"completed":return"job.completed";case"failed":return"job.failed";case"progress":case"stalled":case"removed":case"delayed":case"duplicated":case"retried":case"waiting-children":case"drained":case"paused":case"resumed":return null}}}function ms0(){return{queueIdleSince:new Map,queueThresholdEmitted:new Set,workerOverloadedSince:new Map,storageWarningEmitted:!1,memoryWarningEmitted:!1}}var fs0=parseInt(process.env.QUEUE_IDLE_THRESHOLD_MS??"30000"),zQ0=parseInt(process.env.QUEUE_SIZE_THRESHOLD??"0"),nc=parseInt(process.env.MEMORY_WARNING_MB??"0"),rc=parseInt(process.env.STORAGE_WARNING_MB??"0"),gs0=parseInt(process.env.WORKER_OVERLOAD_THRESHOLD_MS??"30000");function us0($){if(!$.dashboardEmit)return;let Y=Date.now();_f4($,Y),jf4($),Tf4($,Y),If4($),Cf4($)}function ps0($,Y,X){let G=l1($),J=Y[G].queues.get($);if(!J)return 0;let Q=0;for(let W of J.values())if(W.runAt<=X)Q++;return Q}function wf4($,Y){let X=0;for(let G of Y)for(let J of G.values())if(J.queue===$)X++;return X}function _f4($,Y){if(fs0<=0)return;for(let X of $.queueNamesCache){let G=ps0(X,$.shards,Y),J=wf4(X,$.processingShards);if(G===0&&J===0)if(!$.state.queueIdleSince.has(X))$.state.queueIdleSince.set(X,Y);else{let Q=$.state.queueIdleSince.get(X)??Y;if(Y-Q>=fs0)$.dashboardEmit?.("queue:idle",{queue:X,idleSeconds:Math.floor((Y-Q)/1000)}),$.state.queueIdleSince.delete(X)}else $.state.queueIdleSince.delete(X)}}function jf4($){if(zQ0<=0)return;let Y=Date.now();for(let X of $.queueNamesCache){let G=ps0(X,$.shards,Y);if(G>=zQ0){if(!$.state.queueThresholdEmitted.has(X))$.dashboardEmit?.("queue:threshold",{queue:X,size:G,threshold:zQ0}),$.state.queueThresholdEmitted.add(X)}else $.state.queueThresholdEmitted.delete(X)}}function Tf4($,Y){if(gs0<=0)return;for(let X of $.workerManager.list())if(X.concurrency>0&&X.activeJobs>=X.concurrency)if(!$.state.workerOverloadedSince.has(X.id))$.state.workerOverloadedSince.set(X.id,Y);else{let J=$.state.workerOverloadedSince.get(X.id)??Y;if(Y-J>=gs0)$.dashboardEmit?.("worker:overloaded",{workerId:X.id,name:X.name,activeJobs:X.activeJobs,concurrency:X.concurrency,overloadedSeconds:Math.floor((Y-J)/1000)}),$.state.workerOverloadedSince.delete(X.id)}else $.state.workerOverloadedSince.delete(X.id)}function If4($){if(nc<=0)return;let Y=process.memoryUsage(),X=Math.round(Y.heapUsed/1024/1024);if(X>=nc){if(!$.state.memoryWarningEmitted)$.dashboardEmit?.("server:memory-warning",{heapUsedMB:X,thresholdMB:nc,rssMB:Math.round(Y.rss/1024/1024)}),$.state.memoryWarningEmitted=!0}else if(X<nc*0.9)$.state.memoryWarningEmitted=!1}function Cf4($){if(rc<=0||!$.storage)return;let Y=$.storage.getSize(),X=Math.round(Y/1024/1024);if(X>=rc){if(!$.state.storageWarningEmitted)$.dashboardEmit?.("storage:size-warning",{sizeMB:X,thresholdMB:rc}),$.state.storageWarningEmitted=!0}else if(X<rc*0.9)$.state.storageWarningEmitted=!1}var ds0=parseInt(Bun.env.LOCK_TIMEOUT_MS??"5000",10);class VQ0 extends Error{constructor($="Lock acquisition timed out"){super($);this.name="LockTimeoutError"}}class ac{readers=0;writer=!1;writerWaiting=0;readerQueue=[];writerQueue=[];async acquireRead($=ds0){let Y=Date.now();while(this.writer||this.writerWaiting>0){let G=$-(Date.now()-Y);if(G<=0)throw new VQ0("Read lock acquisition timed out");await new Promise((J)=>{let Q={resolve:J,cancelled:!1},W=setTimeout(()=>{Q.cancelled=!0,J()},G);Q.resolve=()=>{clearTimeout(W),J()},this.readerQueue.push(Q)})}this.readers++;let X=!1;return{release:()=>{if(X)return;if(X=!0,this.readers--,this.readers===0&&this.writerWaiting>0){let G=this.writerQueue.shift();while(G){if(!G.cancelled){G.resolve();break}G=this.writerQueue.shift()}}}}}async acquireWrite($=ds0){if(!this.writer&&this.readers===0)return this.writer=!0,this.createWriteGuard();let Y=Date.now();this.writerWaiting++;try{while(this.writer||this.readers>0){let X=$-(Date.now()-Y);if(X<=0)throw new VQ0("Write lock acquisition timed out");await new Promise((G)=>{let J={resolve:G,cancelled:!1},Q=setTimeout(()=>{J.cancelled=!0,G()},X);J.resolve=()=>{clearTimeout(Q),G()},this.writerQueue.push(J)})}return this.writerWaiting--,this.writer=!0,this.createWriteGuard()}catch(X){throw this.writerWaiting--,X}}createWriteGuard(){let $=!1;return{release:()=>{if($)return;if($=!0,this.writer=!1,this.writerWaiting>0){let X=this.writerQueue.shift();while(X){if(!X.cancelled){X.resolve();return}X=this.writerQueue.shift()}}let Y=this.readerQueue.splice(0);for(let X of Y)if(!X.cancelled)X.resolve()}}}getState(){return{readers:this.readers,writer:this.writer,writerWaiting:this.writerWaiting}}}async function sc($,Y,X){let G=await $.acquireRead(X);try{return await Y()}finally{G.release()}}async function v4($,Y,X){let G=await $.acquireWrite(X);try{return await Y()}finally{G.release()}}var Sf4=[0.1,0.5,1,2.5,5,10,25,50,100,250,500,1000,2500,5000,1e4];class BS{buckets;counts;sum=0;count=0;constructor($=Sf4){this.buckets=[...$].sort((Y,X)=>Y-X),this.counts=new Float64Array(this.buckets.length+1)}observe($){this.sum+=$,this.count++;let Y=0,X=this.buckets.length;while(Y<X){let G=Y+X>>>1;if(this.buckets[G]<$)Y=G+1;else X=G}for(let G=Y;G<=this.buckets.length;G++)this.counts[G]++}getSum(){return this.sum}getCount(){return this.count}percentile($){if(this.count===0)return 0;let Y=$/100*this.count;for(let X=0;X<this.buckets.length;X++)if(this.counts[X]>=Y)return this.buckets[X];return this.buckets[this.buckets.length-1]}toPrometheus($,Y){let X=[`# HELP ${$} ${Y}`,`# TYPE ${$} histogram`];for(let G=0;G<this.buckets.length;G++)X.push(`${$}_bucket{le="${this.buckets[G]}"} ${this.counts[G]}`);return X.push(`${$}_bucket{le="+Inf"} ${this.counts[this.buckets.length]}`),X.push(`${$}_sum ${this.sum}`),X.push(`${$}_count ${this.count}`),X.join(`
`)}reset(){this.sum=0,this.count=0,this.counts.fill(0)}}class cs0{push=new BS;pull=new BS;ack=new BS;toPrometheus(){return[this.push.toPrometheus("bunqueue_push_duration_ms","Push operation latency in milliseconds"),"",this.pull.toPrometheus("bunqueue_pull_duration_ms","Pull operation latency in milliseconds"),"",this.ack.toPrometheus("bunqueue_ack_duration_ms","Ack operation latency in milliseconds")].join(`
`)}getAverages(){return{pushMs:this.push.getCount()>0?this.push.getSum()/this.push.getCount():0,pullMs:this.pull.getCount()>0?this.pull.getSum()/this.pull.getCount():0,ackMs:this.ack.getCount()>0?this.ack.getSum()/this.ack.getCount():0}}getPercentiles(){return{push:{p50:this.push.percentile(50),p95:this.push.percentile(95),p99:this.push.percentile(99)},pull:{p50:this.pull.percentile(50),p95:this.pull.percentile(95),p99:this.pull.percentile(99)},ack:{p50:this.ack.percentile(50),p95:this.ack.percentile(95),p99:this.ack.percentile(99)}}}}var yU=new cs0;class OS{count=0;lastRate=0;lastCalcTime=Date.now();alpha;constructor($=0.3){this.alpha=$}increment($=1){this.count+=$}getRate(){let $=Date.now(),Y=($-this.lastCalcTime)/1000;if(Y<0.1)return this.lastRate;let X=this.count/Y;return this.lastRate=this.lastRate===0?X:this.alpha*X+(1-this.alpha)*this.lastRate,this.count=0,this.lastCalcTime=$,this.lastRate}}class ls0{pushRate=new OS;pullRate=new OS;completeRate=new OS;failRate=new OS;getRates(){return{pushPerSec:Math.round(this.pushRate.getRate()*100)/100,pullPerSec:Math.round(this.pullRate.getRate()*100)/100,completePerSec:Math.round(this.completeRate.getRate()*100)/100,failPerSec:Math.round(this.failRate.getRate()*100)/100}}}var Y2=new ls0;function is0($,Y,X){if(!$.customId)return{skip:!1,id:Us0()};let G=d0($.customId),J=X.customIdMap.get($.customId);if(!J)return X.customIdMap.set($.customId,G),{skip:!1,id:G};let Q=X.jobIndex.get(J),W=Q?.type==="queue"?Y.getQueue(Q.queueName).find(J):null;if(W)return{skip:!0,existingJob:W};return X.customIdMap.delete($.customId),X.customIdMap.set($.customId,G),{skip:!1,id:G}}function ns0($,Y,X,G,J){if(!$.uniqueKey)return{skip:!1};let Q=G.getQueue(X),W=G.getUniqueKeyEntry(X,$.uniqueKey);if(!W)return G.registerUniqueKeyWithTtl(X,$.uniqueKey,$.id,Y.dedup?.ttl),{skip:!1};let K=Y.dedup;if(K?.replace){if(Q.find(W.jobId))Q.remove(W.jobId),G.decrementQueued(W.jobId),J.jobIndex.delete(W.jobId);return G.releaseUniqueKey(X,$.uniqueKey),G.registerUniqueKeyWithTtl(X,$.uniqueKey,$.id,K?.ttl),{skip:!1}}if(K?.extend&&K?.ttl){if(G.extendUniqueKeyTtl(X,$.uniqueKey,K.ttl),Y.customId)J.customIdMap.delete(Y.customId);if(Q.find(W.jobId))return J.dashboardEmit?.("job:deduplicated",{queue:X,jobId:String(W.jobId),strategy:"extend"}),{skip:!0,existingId:W.jobId};throw Error("Duplicate unique_key (extended TTL)")}if(Y.customId)J.customIdMap.delete(Y.customId);if(Q.find(W.jobId)||J.jobIndex.has(W.jobId))return J.broadcast({eventType:"duplicated",queue:X,jobId:W.jobId,timestamp:Date.now()}),J.dashboardEmit?.("job:deduplicated",{queue:X,jobId:String(W.jobId),strategy:"default"}),{skip:!0,existingId:W.jobId};return G.registerUniqueKeyWithTtl(X,$.uniqueKey,$.id,Y.dedup?.ttl),{skip:!1}}function rs0($,Y,X,G,J){let W=$.dependsOn.length>0&&!$.dependsOn.every((Z)=>J.completedJobs.has(Z)),K=Date.now();if(W)X.waitingDeps.set($.id,$),X.registerDependencies($.id,$.dependsOn),$.timeline.push({state:"waiting-children",timestamp:K}),J.dashboardEmit?.("job:waiting-children",{jobId:String($.id),queue:Y,dependsOn:$.dependsOn.map(String)});else{X.getQueue(Y).push($);let Z=$.runAt>K;X.incrementQueued($.id,Z,$.createdAt,Y,$.runAt);let H=Z?"delayed":$.priority>0?"prioritized":"waiting";$.timeline.push({state:H,timestamp:K})}J.jobIndex.set($.id,{type:"queue",shardIdx:G,queueName:Y})}async function as0($,Y,X){let G=Bun.nanoseconds(),J=l1($),Q=Date.now(),W;if(await v4(X.shardLocks[J],()=>{let K=X.shards[J],Z=is0(Y,K,X);if(Z.skip){W={job:Z.existingJob,persisted:!1};return}let H=bJ0(Z.id,$,Y,Q),z=ns0(H,Y,$,K,X);if(z.skip){W={job:K.getQueue($).find(z.existingId)??{...H,id:z.existingId},persisted:!1};return}rs0(H,$,K,J,X),K.notify(),W={job:H,persisted:!0}}),!W)throw console.error("[Push] Push failed unexpectedly",{queue:$,input:Y}),Error("Push failed");if(W.persisted)X.storage?.insertJob(W.job,Y.durable),X.totalPushed.value++,Y2.pushRate.increment(),X.broadcast({eventType:"pushed",queue:$,jobId:W.job.id,timestamp:Q});return yU.push.observe((Bun.nanoseconds()-G)/1e6),W.job}async function ss0($,Y,X){let G=Bun.nanoseconds(),J=Date.now(),Q=l1($),W=[],K=[];if(await v4(X.shardLocks[Q],()=>{let Z=X.shards[Q];for(let H of Y){let z=is0(H,Z,X);if(z.skip){W.push(z.existingJob.id);continue}let V=bJ0(z.id,$,H,J),F=ns0(V,H,$,Z,X);if(F.skip){W.push(F.existingId);continue}rs0(V,$,Z,Q,X),K.push(V),W.push(V.id)}if(K.length>0)Z.notifyBatch(K.length)}),K.length>0){X.storage?.insertJobsBatch(K),X.totalPushed.value+=BigInt(K.length),Y2.pushRate.increment(K.length);for(let Z of K)X.broadcast({eventType:"pushed",queue:Z.queue,jobId:Z.id,timestamp:J})}if(K.length>0&&Y.length>1)X.dashboardEmit?.("batch:pushed",{queue:$,total:Y.length,inserted:K.length,duplicates:Y.length-K.length});return yU.push.observe((Bun.nanoseconds()-G)/1e6),W}function os0($,Y,X,G){let J=$.getQueue(Y),Q=J.peek();if(!Q)return{status:"stop"};if(zs0(Q,X))return J.pop(),$.decrementQueued(Q.id),G.jobIndex.delete(Q.id),G.dashboardEmit?.("job:expired",{queue:Y,jobId:String(Q.id),ttl:Q.ttl,age:X-Q.createdAt}),{status:"skip"};if(!Hs0(Q,X))return{status:"stop"};if(Q.groupId&&$.isGroupActive(Y,Q.groupId))return{status:"stop"};if(J.pop(),$.decrementQueued(Q.id),Q.groupId)$.activateGroup(Y,Q.groupId);if(Q.startedAt=X,Q.lastHeartbeat=X,Q.timeline.length<qY)Q.timeline.push({state:"active",timestamp:X});return{status:"job",job:Q}}async function kf4($,Y,X){let G=v5($.id),J=Date.now();await v4(X.processingLocks[G],()=>{X.processingShards[G].set($.id,$)}),X.jobIndex.set($.id,{type:"processing",shardIdx:G});try{X.storage?.markActive($.id,$.startedAt??J,$.timeline)}catch{}X.totalPulled.value++,Y2.pullRate.increment(),X.broadcast({eventType:"pulled",queue:Y,jobId:$.id,timestamp:J})}async function vf4($,Y,X){let G=new Map;for(let W of $){let K=v5(W.id),Z=G.get(K)??[];if(Z.length===0)G.set(K,Z);Z.push(W)}let J=[];for(let[W,K]of G)J.push(v4(X.processingLocks[W],()=>{for(let Z of K)X.processingShards[W].set(Z.id,Z)}));await Promise.all(J);let Q=Date.now();for(let W of $){let K=v5(W.id);X.jobIndex.set(W.id,{type:"processing",shardIdx:K});try{X.storage?.markActive(W.id,W.startedAt??Q,W.timeline)}catch{}X.totalPulled.value++,Y2.pullRate.increment(),X.broadcast({eventType:"pulled",queue:Y,jobId:W.id,timestamp:Q})}}async function ts0($,Y,X,G){let J=v5($.id);await v4(G.processingLocks[J],()=>{G.processingShards[J].delete($.id)}),$.startedAt=null,await v4(G.shardLocks[X],()=>{let Q=G.shards[X];if($.groupId)Q.releaseGroup(Y,$.groupId);Q.releaseConcurrency(Y),Q.getQueue(Y).push($),Q.incrementQueued($.id,!1,$.createdAt,Y,$.runAt),Q.notify()}),G.jobIndex.set($.id,{type:"queue",shardIdx:X,queueName:Y})}async function FQ0($,Y,X){let G=Bun.nanoseconds(),J=Y>0?Date.now()+Y:0,Q=l1($);while(!0){let W=await xf4($,Q,X);if(W){try{await kf4(W,$,X)}catch{return await ts0(W,$,Q,X),null}return yU.pull.observe((Bun.nanoseconds()-G)/1e6),W}let K=Date.now();if(J===0||K>=J)return null;let Z=J-K;await X.shards[Q].waitForJob(Z)}}async function xf4($,Y,X){return await v4(X.shardLocks[Y],()=>{let G=X.shards[Y];if(G.getState($).paused)return null;if(!G.tryAcquireRateLimit($))return X.dashboardEmit?.("ratelimit:rejected",{queue:$}),null;if(!G.tryAcquireConcurrency($))return X.dashboardEmit?.("concurrency:rejected",{queue:$}),null;let Q=Date.now();while(!0){let W=os0(G,$,Q,X);if(W.status==="job")return W.job;if(W.status==="stop")return G.releaseConcurrency($),null}})}async function LQ0($,Y,X,G){let J=Bun.nanoseconds(),Q=X>0?Date.now()+X:0,W=l1($);while(!0){let K=await yf4($,W,Y,G);if(K.length>0){try{await vf4(K,$,G)}catch{for(let z of K)await ts0(z,$,W,G);return[]}if(K.length>1)G.dashboardEmit?.("batch:pulled",{queue:$,count:K.length});return yU.pull.observe((Bun.nanoseconds()-J)/1e6),K}let Z=Date.now();if(Q===0||Z>=Q)return[];let H=Q-Z;await G.shards[W].waitForJob(H)}}async function yf4($,Y,X,G){return await v4(G.shardLocks[Y],()=>{let J=G.shards[Y],Q=J.getState($),W=[];if(Q.paused)return W;let K=Date.now();while(W.length<X){if(!J.tryAcquireRateLimit($))break;if(!J.tryAcquireConcurrency($))break;let Z=os0(J,$,K,G);if(Z.status==="job")W.push(Z.job);else if(J.releaseConcurrency($),Z.status==="stop")break}return W})}function es0($){let Y=new Map;for(let X of $){let G=v5(X),J=Y.get(G);if(!J)J=[],Y.set(G,J);J.push(X)}return Y}function $o0($){let Y=new Map;for(let X of $){let G=v5(X.id),J=Y.get(G);if(!J)J=[],Y.set(G,J);J.push(X)}return Y}async function Yo0($,Y){let X=[];return await Promise.all(Array.from($.entries()).map(async([G,J])=>{await v4(Y.processingLocks[G],()=>{for(let Q of J){let W=Y.processingShards[G].get(Q);if(W)Y.processingShards[G].delete(Q),X.push({id:Q,job:W})}})})),X}async function Xo0($,Y){let X=[];return await Promise.all(Array.from($.entries()).map(async([G,J])=>{await v4(Y.processingLocks[G],()=>{for(let Q of J){let W=Y.processingShards[G].get(Q.id);if(W)Y.processingShards[G].delete(Q.id),X.push({id:Q.id,job:W,result:Q.result})}})})),X}function DQ0($){let Y=new Map;for(let X=0;X<$.length;X++){let G=$[X].job,J=l1(G.queue),Q=Y.get(J);if(!Q)Q=[],Y.set(J,Q);Q.push(G)}return Y}async function NQ0($,Y){await Promise.all(Array.from($.entries()).map(async([X,G])=>{await v4(Y.shardLocks[X],()=>{let J=Y.shards[X];for(let Q of G)J.releaseJobResources(Q.queue,Q.uniqueKey,Q.groupId)})}))}function AQ0($,Y,X){let G=Date.now(),J=Y.storage,Q=J!==null,W=$.length,K=Y.needsBroadcast?.()??!0,Z=Y.hasPendingDeps?.()??!0;if(Y.totalCompleted.value+=BigInt(W),Y.perQueueMetrics)for(let H=0;H<W;H++){let z=$[H].job.queue,V=Y.perQueueMetrics.get(z);if(V)V.totalCompleted++;else Y.perQueueMetrics.set(z,{totalCompleted:1n,totalFailed:0n})}for(let H=0;H<W;H++){let{id:z,job:V,result:F}=$[H];if(V.customId&&Y.customIdMap)Y.customIdMap.delete(V.customId);if(!V.removeOnComplete){if(V.completedAt=G,V.timeline.length<qY)V.timeline.push({state:"completed",timestamp:G});if(X&&F!==void 0){if(Y.jobResults.set(z,F),Q)J.storeResult(z,F)}if(Y.jobIndex.set(z,{type:"completed",queueName:V.queue}),Y.completedJobsData.set(z,V),Q)J.markCompleted(z,G,V.timeline);Y.completedJobs.add(z)}else if(Y.jobIndex.delete(z),Q)J.deleteJob(z)}if(K)for(let H=0;H<W;H++){let{id:z,job:V,result:F}=$[H];Y.broadcast({eventType:"completed",queue:V.queue,jobId:z,timestamp:G,data:X?F:void 0})}if(Z&&Y.onJobsCompleted){let H=$.map((z)=>z.id);Y.onJobsCompleted(H)}else if(Z)for(let H=0;H<W;H++)Y.onJobCompleted($[H].id);if(Y2.completeRate.increment(W),Y.onRepeat)for(let H=0;H<W;H++){let z=$[H].job;if(z.repeat){if(z.repeat.limit===void 0||z.repeat.count<z.repeat.limit)Y.onRepeat(z)}}}async function oc($,Y,X){let G=Bun.nanoseconds(),J=v5($),Q=await v4(X.processingLocks[J],()=>{let K=X.processingShards[J].get($);if(K)X.processingShards[J].delete($);return K});if(!Q)throw Error(`Job not found or not in processing state: ${$}`);let W=l1(Q.queue);if(await v4(X.shardLocks[W],()=>{X.shards[W].releaseJobResources(Q.queue,Q.uniqueKey,Q.groupId)}),Q.customId&&X.customIdMap)X.customIdMap.delete(Q.customId);if(!Q.removeOnComplete){let K=Date.now();if(Q.completedAt=K,Q.timeline.length<qY)Q.timeline.push({state:"completed",timestamp:K});if(X.completedJobs.add($),X.completedJobsData.set($,Q),Y!==void 0)X.jobResults.set($,Y),X.storage?.storeResult($,Y);X.jobIndex.set($,{type:"completed",queueName:Q.queue}),X.storage?.markCompleted($,K,Q.timeline)}else X.jobIndex.delete($),X.storage?.deleteJob($);if(X.totalCompleted.value++,X.perQueueMetrics){let K=X.perQueueMetrics.get(Q.queue);if(K)K.totalCompleted++;else X.perQueueMetrics.set(Q.queue,{totalCompleted:1n,totalFailed:0n})}if(Y2.completeRate.increment(),X.broadcast({eventType:"completed",queue:Q.queue,jobId:$,timestamp:Date.now(),data:Y}),X.onJobCompleted($),Q.repeat&&X.onRepeat){if(Q.repeat.limit===void 0||Q.repeat.count<Q.repeat.limit)X.onRepeat(Q)}yU.ack.observe((Bun.nanoseconds()-G)/1e6)}function bf4($,Y,X,G,J){let Q=G.addToDlq($,"max_attempts_exceeded",X??null);if(J.jobIndex.set(Y,{type:"dlq",queueName:$.queue}),J.storage?.saveDlqEntry(Q),J.storage?.deleteJob(Y),J.totalFailed.value++,J.perQueueMetrics){let W=J.perQueueMetrics.get($.queue);if(W)W.totalFailed++;else J.perQueueMetrics.set($.queue,{totalCompleted:0n,totalFailed:1n})}if(Y2.failRate.increment(),$.customId&&J.customIdMap)J.customIdMap.delete($.customId);if(J.emitDashboardEvent?.("dlq:added",{queue:$.queue,jobId:String(Y),reason:"max_attempts_exceeded"}),$.parentId)J.emitDashboardEvent?.("flow:failed",{parentJobId:String($.parentId),failedChildId:String(Y),queue:$.queue,error:X??"Max attempts exceeded"})}async function Go0($,Y,X){let G=v5($),J=await v4(X.processingLocks[G],()=>{let Z=X.processingShards[G].get($);if(Z)X.processingShards[G].delete($);return Z});if(!J)throw Error(`Job not found or not in processing state: ${$}`);J.attempts++;let Q=Date.now();if(J.timeline.length<qY)J.timeline.push({state:"failed",timestamp:Q,error:Y,attempt:J.attempts});let W=l1(J.queue),K=!1;if(await v4(X.shardLocks[W],()=>{let Z=X.shards[W];if(Z.releaseJobResources(J.queue,J.uniqueKey,J.groupId),Vs0(J)){let H=Date.now();if(J.runAt=H+MR(J),Z.getQueue(J.queue).push(J),Z.incrementQueued($,!0,J.createdAt,J.queue,J.runAt),X.jobIndex.set($,{type:"queue",shardIdx:W,queueName:J.queue}),X.storage?.updateForRetry(J),K=!0,J.timeline.length<qY)J.timeline.push({state:"waiting",timestamp:H,attempt:J.attempts+1})}else if(J.removeOnFail){if(X.jobIndex.delete($),X.storage?.deleteJob($),X.totalFailed.value++,X.perQueueMetrics){let H=X.perQueueMetrics.get(J.queue);if(H)H.totalFailed++;else X.perQueueMetrics.set(J.queue,{totalCompleted:0n,totalFailed:1n})}if(Y2.failRate.increment(),J.customId&&X.customIdMap)X.customIdMap.delete(J.customId)}else bf4(J,$,Y,Z,X)}),X.broadcast({eventType:"failed",queue:J.queue,jobId:$,timestamp:Date.now(),error:Y,data:J.data}),K)X.broadcast({eventType:"retried",queue:J.queue,jobId:$,timestamp:Date.now(),prev:"failed"});if(!K&&J.failParentOnFailure&&J.parentId&&X.onChildTerminalFailure)X.onChildTerminalFailure(J,Y);if(!K&&J.parentId&&X.onChildDependencyOption&&(J.removeDependencyOnFailure||J.ignoreDependencyOnFailure||J.continueParentOnFailure))X.onChildDependencyOption(J,Y)}async function Jo0($,Y){if($.length===0)return;if($.length<=4){await Promise.all($.map((W)=>oc(W,void 0,Y)));return}let X={processingShards:Y.processingShards,processingLocks:Y.processingLocks,shards:Y.shards,shardLocks:Y.shardLocks},G=es0($),J=await Yo0(G,X),Q=DQ0(J);await NQ0(Q,X),AQ0(J,Y,!1)}async function Qo0($,Y){if($.length===0)return;if($.length<=4){await Promise.all($.map((W)=>oc(W.id,W.result,Y)));return}let X={processingShards:Y.processingShards,processingLocks:Y.processingLocks,shards:Y.shards,shardLocks:Y.shardLocks},G=$o0($),J=await Xo0(G,X),Q=DQ0(J);await NQ0(Q,X),AQ0(J,Y,!0)}function Wo0($,Y){let X=l1($);Y.shards[X].pause($)}function Ko0($,Y){let X=l1($);Y.shards[X].resume($)}function Zo0($,Y){let X=l1($);return Y.shards[X].isPaused($)}function Uo0($,Y){let X=l1($),{count:G,jobIds:J}=Y.shards[X].drain($);for(let Q of J)Y.jobIndex.delete(Q);return G}function Ho0($,Y){let X=l1($);Y.shards[X].obliterate($)}function hf4($){if(!$)return;if($==="wait")return"waiting";return $}function BQ0($,Y){try{$.storage?.deleteJob(Y)}catch{}}function ff4($,Y){try{$.storage?.deleteDlqEntry(Y)}catch{}}function gf4($,Y,X,G){let J=l1($),Q=X.shards[J],W=Q.getQueue($),K=Q.getOldJobs($,Y,G),Z=[];for(let{jobId:H}of K)if(W.has(H))W.remove(H),Q.decrementQueued(H),Q.removeFromTemporalIndex(H),X.jobIndex.delete(H),BQ0(X,H),Z.push(H);return Z}function mf4($,Y,X,G){if(!X.completedJobs||!X.completedJobsData)return[];let J=Date.now()-Y,Q=[];for(let[W,K]of X.jobIndex){if(K.type!=="completed"||K.queueName!==$)continue;let Z=X.completedJobsData.get(W)??X.storage?.getJob(W)??null,H=Z?.completedAt??Z?.createdAt??0;if(H&&H>J)continue;if(Q.push(W),Q.length>=G)break}for(let W of Q)X.completedJobs.delete(W),X.completedJobsData.delete(W),X.jobResults?.delete(W),X.jobLogs?.delete(W),X.jobIndex.delete(W),BQ0(X,W);return Q}function uf4($,Y,X,G){let J=l1($),Q=X.shards[J],W=Q.getDlqEntries($),K=Date.now()-Y,Z=[];for(let H of W){if((H.enteredAt??H.job.createdAt)>K)continue;if(Z.push(H.job.id),Z.length>=G)break}for(let H of Z)Q.removeFromDlq($,H),X.jobIndex.delete(H),X.jobResults?.delete(H),X.jobLogs?.delete(H),ff4(X,H),BQ0(X,H);return Z}function zo0($,Y,X,G,J){let Q=J??1000;switch(hf4(G)){case void 0:case"waiting":case"delayed":case"prioritized":case"paused":return gf4($,Y,X,Q);case"completed":return mf4($,Y,X,Q);case"failed":return uf4($,Y,X,Q);case"active":default:return[]}}function Vo0($,Y){let X=l1($);return Y.shards[X].getQueue($).size}async function Fo0($,Y){let X=Y.jobIndex.get($);if(!X)return!1;if(X.type==="queue"){let G=await v4(Y.shardLocks[X.shardIdx],()=>{let J=Y.shards[X.shardIdx],Q=J.getQueue(X.queueName).remove($);if(Q){if(J.decrementQueued($),Q.uniqueKey)J.releaseUniqueKey(X.queueName,Q.uniqueKey);return Y.jobIndex.delete($),Y.storage?.deleteJob($),{success:!0,queueName:X.queueName}}return{success:!1,queueName:X.queueName}});if(G.success)Y.eventsManager.broadcast({eventType:"removed",jobId:$,queue:G.queueName,timestamp:Date.now(),prev:"waiting"});return G.success}return!1}async function Lo0($,Y,X,G){if(X.jobIndex.get($)?.type!=="processing")return!1;let Q=v5($);return v4(X.processingLocks[Q],()=>{let W=X.processingShards[Q].get($);if(!W)return!1;if(W.progress=Math.max(0,Math.min(100,Y)),G!==void 0)W.progressMessage=G;return W.lastHeartbeat=Date.now(),X.eventsManager.broadcast({eventType:"progress",jobId:$,queue:W.queue,timestamp:Date.now(),progress:W.progress,data:{progress:W.progress,message:W.progressMessage}}),X.webhookManager.trigger("job.progress",String($),W.queue,{progress:W.progress}).catch((K)=>{qR.error("Progress webhook failed",{jobId:String($),queue:W.queue,error:String(K)})}),!0})}async function Do0($,Y,X){let G=X.jobIndex.get($);if(G?.type==="queue")return v4(X.shardLocks[G.shardIdx],()=>{let J=X.shards[G.shardIdx],Q=J.getQueue(G.queueName).find($)??J.waitingDeps.get($);if(Q)return Q.data=Y,!0;return!1});else if(G?.type==="processing"){let J=v5($);return v4(X.processingLocks[J],()=>{let Q=X.processingShards[J].get($);if(Q)return Q.data=Y,!0;return!1})}return df4($,Y,X)}async function df4($,Y,X){if(!X.repeatChain)return!1;let G=X.repeatChain.get($);if(!G)return!1;let J=X.jobIndex.get(G);if(J?.type!=="queue")return!1;return v4(X.shardLocks[J.shardIdx],()=>{let Q=X.shards[J.shardIdx].getQueue(J.queueName).find(G);if(Q)return Q.data=Y,!0;return!1})}async function No0($,Y,X){let G=X.jobIndex.get($);if(G?.type!=="queue")return!1;return v4(X.shardLocks[G.shardIdx],()=>{return X.shards[G.shardIdx].getQueue(G.queueName).updatePriority($,Y)})}async function Ao0($,Y){let X=Y.jobIndex.get($);if(X?.type!=="queue")return!1;return v4(Y.shardLocks[X.shardIdx],()=>{let G=Y.shards[X.shardIdx].getQueue(X.queueName),J=G.find($);if(!J||J.runAt<=Date.now())return!1;return G.updateRunAt($,Date.now()),!0})}async function OQ0($,Y,X){if(X.jobIndex.get($)?.type!=="processing")return!1;let J=v5($),Q=await v4(X.processingLocks[J],()=>{let H=X.processingShards[J].get($);if(H)X.processingShards[J].delete($);return H});if(!Q)return!1;let W=Date.now();Q.runAt=W+Y,Q.startedAt=null;let K=l1(Q.queue),Z=Q.queue;return await v4(X.shardLocks[K],()=>{let H=X.shards[K];H.getQueue(Q.queue).push(Q);let z=Q.runAt>W;H.incrementQueued($,z,Q.createdAt,Q.queue,Q.runAt),X.jobIndex.set($,{type:"queue",shardIdx:K,queueName:Q.queue})}),X.eventsManager.broadcast({eventType:"delayed",jobId:$,queue:Z,timestamp:Date.now(),delay:Y}),!0}async function Bo0($,Y){let X=Y.jobIndex.get($);if(!X)return!1;let G=null;if(X.type==="queue")G=await v4(Y.shardLocks[X.shardIdx],()=>{let J=Y.shards[X.shardIdx],Q=J.getQueue(X.queueName).remove($);if(Q)J.decrementQueued($);return Q});else if(X.type==="processing"){let J=v5($);G=await v4(Y.processingLocks[J],()=>{let Q=Y.processingShards[J].get($)??null;if(Q)Y.processingShards[J].delete($);return Q})}if(G){let J=G,Q=l1(J.queue),W=await v4(Y.shardLocks[Q],()=>{let K=Y.shards[Q].addToDlq(J);return Y.jobIndex.set($,{type:"dlq",queueName:J.queue}),K});return Y.storage?.saveDlqEntry(W),Y.storage?.deleteJob($),!0}return!1}async function Oo0($,Y){if(Y.jobIndex.get($)?.type!=="processing")return!1;let G=v5($),J=await v4(Y.processingLocks[G],()=>{let K=Y.processingShards[G].get($);if(K)Y.processingShards[G].delete($);return K});if(!J)return!1;let Q=Date.now();J.runAt=Q,J.startedAt=null;let W=l1(J.queue);return await v4(Y.shardLocks[W],()=>{let K=Y.shards[W];K.releaseJobResources(J.queue,J.uniqueKey,J.groupId),K.getQueue(J.queue).push(J),K.incrementQueued($,!1,J.createdAt,J.queue,J.runAt),Y.jobIndex.set($,{type:"queue",shardIdx:W,queueName:J.queue}),K.notify()}),Y.eventsManager.broadcast({eventType:"waiting",jobId:$,queue:J.queue,timestamp:Q,prev:"active"}),!0}async function EQ0($,Y,X){let G=X.jobIndex.get($);if(G?.type!=="queue")return!1;let Q=Date.now()+Y;return v4(X.shardLocks[G.shardIdx],()=>{let W=X.shards[G.shardIdx].getQueue(G.queueName);if(!W.find($))return!1;return W.updateRunAt($,Q),!0})}async function Eo0($,Y){if(Y.jobIndex.get($)?.type!=="processing")return!1;let G=v5($),J=await v4(Y.processingLocks[G],()=>{let W=Y.processingShards[G].get($);if(W)Y.processingShards[G].delete($);return W});if(!J)return!1;let Q=l1(J.queue);return await v4(Y.shardLocks[Q],()=>{let W=Y.shards[Q];W.releaseJobResources(J.queue,J.uniqueKey,J.groupId),W.waitingChildren.set($,J),Y.jobIndex.set($,{type:"queue",shardIdx:Q,queueName:J.queue})}),!0}async function Ro0($,Y){let X=Y.jobIndex.get($);if(!X){if(Y.storage){let G=Y.storage.getJob($);if(G)return G;let J=Y.storage.getDlqEntry($);if(J)return J.job}return Y.completedJobsData.get($)??null}switch(X.type){case"queue":return await sc(Y.shardLocks[X.shardIdx],()=>{let G=Y.shards[X.shardIdx];return G.getQueue(X.queueName).find($)??G.waitingDeps.get($)??null});case"processing":return await sc(Y.processingLocks[X.shardIdx],()=>{return Y.processingShards[X.shardIdx].get($)??null});case"completed":return Y.storage?.getJob($)??Y.completedJobsData.get($)??null;case"dlq":{if(Y.storage){let Q=Y.storage.getDlqEntry($);if(Q)return Q.job;let W=Y.storage.getJob($);if(W)return W}let G=l1(X.queueName);return Y.shards[G].getDlq(X.queueName).find((Q)=>Q.id===$)??null}}}function MQ0($,Y){return Y.jobResults.get($)??Y.storage?.getResult($)}function qo0($,Y){let X=Y.customIdMap.get($);if(!X)return null;let G=Y.jobIndex.get(X);if(!G)return null;if(G.type==="queue"){let J=Y.shards[G.shardIdx];return J.getQueue(G.queueName).find(X)??J.waitingDeps.get(X)??null}if(G.type==="processing")return Y.processingShards[G.shardIdx].get(X)??null;if(G.type==="completed")return Y.storage?.getJob(X)??Y.completedJobsData.get(X)??null;if(G.type==="dlq"){if(Y.storage){let W=Y.storage.getJob(X);if(W)return W}let J=l1(G.queueName);return Y.shards[J].getDlq(G.queueName).find((W)=>W.id===X)??null}return null}function Po0($,Y){let X=Y.jobIndex.get($);if(X?.type!=="processing")return null;let G=Y.processingShards[X.shardIdx].get($);if(!G)return null;return{progress:G.progress,message:G.progressMessage}}function if4($,Y){if(!Y)return"unknown";if(Y.hasDlqEntry($))return"failed";let X=Y.getJobStateRaw($);if(X==="completed")return"completed";if(X==="active")return"active";if(X!=="waiting"&&X!=="delayed")return"unknown";let G=Y.getJob($);if(!G)return"unknown";if(G.runAt>Date.now())return"delayed";return G.priority>0?"prioritized":"waiting"}async function wo0($,Y){let X=Y.jobIndex.get($);if(Y.completedJobs.has($))return"completed";if(!X)return if4($,Y.storage);switch(X.type){case"queue":{let G=await sc(Y.shardLocks[X.shardIdx],()=>{let Q=Y.shards[X.shardIdx],W=Q.getQueue(X.queueName).find($);if(W)return{job:W,waitingDeps:!1,waitingChildren:!1};let K=Q.waitingDeps.get($);if(K)return{job:K,waitingDeps:!0,waitingChildren:!1};let Z=Q.waitingChildren.get($);if(Z)return{job:Z,waitingDeps:!1,waitingChildren:!0};return null});if(!G)return"unknown";if(G.waitingDeps||G.waitingChildren)return"waiting-children";let J=Date.now();if(G.job.runAt>J)return"delayed";return G.job.priority>0?"prioritized":"waiting"}case"processing":return"active";case"completed":return"completed";case"dlq":return"failed"}}function nf4($,Y,X){let G=[];for(let[J,Q]of Y.jobIndex)if(Q.type==="completed"&&Q.queueName===$){let W=Y.storage?.getJob(J)??Y.completedJobsData?.get(J)??null;if(W){if(G.push(W),G.length>=X)break}}return G}function rf4($,Y,X,G){let J=[];for(let Q of X.processingShards[Y].values()){if(Q.queue===$)J.push(Q);if(J.length>=G)return J}for(let Q=0;Q<X.shardCount;Q++){if(Q===Y)continue;for(let W of X.processingShards[Q].values()){if(W.queue===$)J.push(W);if(J.length>=G)return J}}return J}function af4($,Y,X,G){let{waiting:J,prioritized:Q,delayed:W}=X,K=Date.now(),Z=[];for(let H of $.getQueue(Y).values()){if(Z.length>=G)break;let z=H.runAt>K;if(z&&W)Z.push(H);else if(!z){if(H.priority>0?Q:J)Z.push(H)}}return Z}function tc($,Y){for(let X of $)X._state=Y;return $}function sf4($){let Y=Date.now();for(let X of $){let G=X.runAt>Y;X._state=G?"delayed":X.priority>0?"prioritized":"waiting"}}function of4($,Y,X){let G=[];for(let J of $.waitingDeps.values()){if(J.queue===Y)G.push(J);if(G.length>=X)return G}for(let J of $.waitingChildren.values()){if(J.queue===Y)G.push(J);if(G.length>=X)return G}return G}function tf4($,Y,X,G,J=1/0){let Q=G.shards[Y],W=[],K=!X||X.includes("waiting"),Z=!X||X.includes("prioritized"),H=!X||X.includes("delayed");if(K||Z||H){let z=af4(Q,$,{waiting:K,prioritized:Z,delayed:H},J);sf4(z),W.push(...z)}if(!X||X.includes("active"))W.push(...tc(rf4($,Y,G,J),"active"));if(!X||X.includes("failed")){let z=Q.getDlq($);W.push(...tc(J<z.length?z.slice(0,J):z,"failed"))}if(!X||X.includes("completed"))W.push(...tc(nf4($,G,J),"completed"));if(!X||X.includes("waiting-children"))W.push(...tc(of4(Q,$,J),"waiting-children"));return W}function Mo0($,Y){let X=[];for(let G of $.waitingDeps.values())if(G.queue===Y)X.push(G);for(let G of $.waitingChildren.values())if(G.queue===Y)X.push(G);return X}function ef4($,Y,X,G){let J=X.includes("prioritized"),Q=X.includes("waiting");if(!J&&!Q){if(X.length===1)return $.queryJobs(Y,{state:X[0],...G});return $.queryJobs(Y,{states:X,...G})}let W=X.map((H)=>H==="prioritized"?"waiting":H).filter((H,z,V)=>V.indexOf(H)===z),K={...G,limit:G.limit*2},Z=W.length===1?$.queryJobs(Y,{state:W[0],...K}):$.queryJobs(Y,{states:W,...K});if(J&&!Q)Z=Z.filter((H)=>H.priority>0);else if(Q&&!J)Z=Z.filter((H)=>H.priority<=0);return Z.slice(0,G.limit)}function _o0($,Y,X,G){let{state:J,start:Q=0,end:W=100,asc:K=!0}=X,Z=!J?null:Array.isArray(J)?J.length===0?null:J:[J],H=W-Q;if(G.storage){if(!Z)return G.storage.queryJobs($,{limit:H,offset:Q,asc:K});let F=Z.includes("waiting-children"),L=Z.filter((A)=>A!=="waiting-children");if(F&&L.length===0){let A=Mo0(G.shards[Y],$);return A.sort((B,O)=>K?B.createdAt-O.createdAt:O.createdAt-B.createdAt),A.slice(Q,W)}let N=L.length>0?ef4(G.storage,$,L,{limit:H,offset:Q,asc:K}):[];if(!F)return N;let D=N.concat(Mo0(G.shards[Y],$));return D.sort((A,B)=>K?A.createdAt-B.createdAt:B.createdAt-A.createdAt),D.slice(0,H)}let z=W+1,V=tf4($,Y,Z,G,z);return V.sort((F,L)=>K?F.createdAt-L.createdAt:L.createdAt-F.createdAt),V.slice(Q,W)}function To0($,Y,X){let G=l1($);return Y.shards[G].getDlq($,X)}function ec($,Y,X){let G=l1($),J=Y.shards[G];if(X)return J.getDlqFiltered($,X);return J.getDlqEntries($)}function $l($,Y){let X=l1($),G=Y.shards[X].getDlqEntries($),J=Y.shards[X].getDlqConfig($),Q=Date.now(),W={total:G.length,byReason:{["explicit_fail"]:0,["max_attempts_exceeded"]:0,["timeout"]:0,["stalled"]:0,["ttl_expired"]:0,["worker_lost"]:0,["unknown"]:0},byQueue:{[$]:G.length},pendingRetry:0,expired:0,oldestEntry:null,newestEntry:null};for(let K of G){if(W.byReason[K.reason]++,K.nextRetryAt&&K.nextRetryAt<=Q&&K.retryCount<J.maxAutoRetries)W.pendingRetry++;if(K.expiresAt&&K.expiresAt<=Q)W.expired++;if(W.oldestEntry===null||K.enteredAt<W.oldestEntry)W.oldestEntry=K.enteredAt;if(W.newestEntry===null||K.enteredAt>W.newestEntry)W.newestEntry=K.enteredAt}return W}function Yg4($,Y,X){let G=l1($),J=X.shards[G],Q=Date.now(),W=J.removeFromDlq($,Y);if(!W)return null;X.storage?.deleteDlqEntry(Y);let K=W.job;if(K.attempts=0,K.runAt=Q,K.stallCount=0,K.lastHeartbeat=Q,K.timeline.length<qY)K.timeline.push({state:"waiting",timestamp:Q});J.getQueue($).push(K);let Z=K.runAt>Q;return J.incrementQueued(K.id,Z,K.createdAt,$,K.runAt),X.jobIndex.set(K.id,{type:"queue",shardIdx:G,queueName:$}),X.storage?.insertJob(K,!0),K}function Io0($,Y,X){if(X)return Yg4($,X,Y)?1:0;let G=l1($),J=Y.shards[G],Q=J.getDlqEntries($),W=Q.length;J.clearDlq($),Y.storage?.clearDlqQueue($);let K=Date.now();for(let Z of Q){let H=Z.job;if(H.attempts=0,H.runAt=K,H.stallCount=0,H.lastHeartbeat=K,H.timeline.length<qY)H.timeline.push({state:"waiting",timestamp:K});J.getQueue($).push(H);let z=H.runAt>K;J.incrementQueued(H.id,z,H.createdAt,$,H.runAt),Y.jobIndex.set(H.id,{type:"queue",shardIdx:G,queueName:$}),Y.storage?.insertJob(H,!0)}return W}function Co0($,Y,X){let G=l1($),J=Y.shards[G],Q=J.getDlqFiltered($,X),W=0,K=Date.now();for(let Z of Q){if(!J.removeFromDlq($,Z.job.id))continue;Y.storage?.deleteDlqEntry(Z.job.id);let z=Z.job;if(z.attempts=0,z.runAt=K,z.stallCount=0,z.lastHeartbeat=K,z.timeline.length<qY)z.timeline.push({state:"waiting",timestamp:K});J.getQueue($).push(z);let V=z.runAt>K;J.incrementQueued(z.id,V,z.createdAt,$,z.runAt),Y.jobIndex.set(z.id,{type:"queue",shardIdx:G,queueName:$}),Y.storage?.insertJob(z,!0),W++}return W}function So0($,Y){let X=l1($),G=Y.shards[X],J=G.getDlqConfig($);if(!J.autoRetry)return 0;let Q=Date.now(),W=G.getAutoRetryEntries($,Q),K=0;for(let Z of W){if(As0(Z,J),!G.removeFromDlq($,Z.job.id))continue;let z=Z.job;if(z.attempts=0,z.runAt=Q,z.stallCount=0,z.lastHeartbeat=Q,z.timeline.length<qY)z.timeline.push({state:"waiting",timestamp:Q});G.getQueue($).push(z);let V=z.runAt>Q;G.incrementQueued(z.id,V,z.createdAt,$,z.runAt),Y.jobIndex.set(z.id,{type:"queue",shardIdx:X,queueName:$}),Y.storage?.insertJob(z,!0),K++}return K}function ko0($,Y){let X=l1($),G=Y.shards[X],J=G.getExpiredEntries($),Q=G.purgeExpired($);if(Y.storage&&J.length>0)for(let W of J)Y.storage.deleteDlqEntry(W.job.id);return Q}function RQ0($,Y){let X=l1($),G=Y.shards[X].clearDlq($);return Y.storage?.clearDlqQueue($),G}function vo0($,Y,X){let G=l1($);Y.shards[G].setDlqConfig($,X)}function xo0($,Y){let X=l1($);return Y.shards[X].getDlqConfig($)}function yo0($,Y,X){if(X){if(!Y.completedJobs.has(X))return 0;let J=Y.storage?.getJob(X);if(J?.queue!==$)return 0;return jo0(J,Y)}let G=0;for(let J of Y.completedJobs){let Q=Y.storage?.getJob(J);if(Q?.queue===$)G+=jo0(Q,Y)}return G}function jo0($,Y){if($.attempts=0,$.startedAt=null,$.completedAt=null,$.runAt=Date.now(),$.progress=0,$.timeline.length<qY)$.timeline.push({state:"waiting",timestamp:$.runAt});let X=l1($.queue),G=Y.shards[X];return G.getQueue($.queue).push($),G.incrementQueued($.id,!1,$.createdAt,$.queue,$.runAt),Y.jobIndex.set($.id,{type:"queue",shardIdx:X,queueName:$.queue}),Y.completedJobs.delete($.id),Y.jobResults.delete($.id),Y.storage?.updateForRetry($),G.notify(),1}function bo0($,Y,X,G="info"){if(!X.jobIndex.get($))return!1;let Q=X.jobLogs.get($)??[];if(Q.push(hs0(Y,G)),Q.length>X.maxLogsPerJob)Q.splice(0,Q.length-X.maxLogsPerJob);return X.jobLogs.set($,Q),!0}function ho0($,Y){return Y.jobLogs.get($)??[]}function fo0($,Y,X){if(X===void 0||X<=0)Y.jobLogs.delete($);else{let G=Y.jobLogs.get($);if(G&&G.length>X){let J=G.slice(-X);Y.jobLogs.set($,J)}}}function go0($,Y,X,G){let J=Y.getStats(),Q=X.getStats(),W=["# HELP bunqueue_jobs_waiting Number of jobs waiting in queue","# TYPE bunqueue_jobs_waiting gauge",`bunqueue_jobs_waiting ${$.waiting}`,"","# HELP bunqueue_jobs_prioritized Number of prioritized jobs (priority > 0)","# TYPE bunqueue_jobs_prioritized gauge",`bunqueue_jobs_prioritized ${$.prioritized}`,"","# HELP bunqueue_jobs_delayed Number of delayed jobs","# TYPE bunqueue_jobs_delayed gauge",`bunqueue_jobs_delayed ${$.delayed}`,"","# HELP bunqueue_jobs_active Number of jobs being processed","# TYPE bunqueue_jobs_active gauge",`bunqueue_jobs_active ${$.active}`,"","# HELP bunqueue_jobs_dlq Number of jobs in dead letter queue","# TYPE bunqueue_jobs_dlq gauge",`bunqueue_jobs_dlq ${$.dlq}`,"","# HELP bunqueue_jobs_completed Number of completed jobs","# TYPE bunqueue_jobs_completed gauge",`bunqueue_jobs_completed ${$.completed}`,"","# HELP bunqueue_jobs_pushed_total Total jobs pushed","# TYPE bunqueue_jobs_pushed_total counter",`bunqueue_jobs_pushed_total ${$.totalPushed}`,"","# HELP bunqueue_jobs_pulled_total Total jobs pulled","# TYPE bunqueue_jobs_pulled_total counter",`bunqueue_jobs_pulled_total ${$.totalPulled}`,"","# HELP bunqueue_jobs_completed_total Total jobs completed","# TYPE bunqueue_jobs_completed_total counter",`bunqueue_jobs_completed_total ${$.totalCompleted}`,"","# HELP bunqueue_jobs_failed_total Total jobs failed","# TYPE bunqueue_jobs_failed_total counter",`bunqueue_jobs_failed_total ${$.totalFailed}`,"","# HELP bunqueue_uptime_seconds Server uptime in seconds","# TYPE bunqueue_uptime_seconds gauge",`bunqueue_uptime_seconds ${Math.floor($.uptime/1000)}`,"","# HELP bunqueue_cron_jobs_total Total number of cron jobs","# TYPE bunqueue_cron_jobs_total gauge",`bunqueue_cron_jobs_total ${$.cronJobs}`,"","# HELP bunqueue_workers_total Total number of registered workers","# TYPE bunqueue_workers_total gauge",`bunqueue_workers_total ${J.total}`,"","# HELP bunqueue_workers_active Number of active workers","# TYPE bunqueue_workers_active gauge",`bunqueue_workers_active ${J.active}`,"","# HELP bunqueue_workers_processed_total Total jobs processed by workers","# TYPE bunqueue_workers_processed_total counter",`bunqueue_workers_processed_total ${J.totalProcessed}`,"","# HELP bunqueue_workers_failed_total Total jobs failed by workers","# TYPE bunqueue_workers_failed_total counter",`bunqueue_workers_failed_total ${J.totalFailed}`,"","# HELP bunqueue_webhooks_total Total number of webhooks","# TYPE bunqueue_webhooks_total gauge",`bunqueue_webhooks_total ${Q.total}`,"","# HELP bunqueue_webhooks_enabled Number of enabled webhooks","# TYPE bunqueue_webhooks_enabled gauge",`bunqueue_webhooks_enabled ${Q.enabled}`];if(G&&G.size>0){W.push(""),W.push("# HELP bunqueue_queue_jobs_waiting Number of waiting jobs per queue"),W.push("# TYPE bunqueue_queue_jobs_waiting gauge");for(let[Z,H]of G)W.push(`bunqueue_queue_jobs_waiting{queue="${Z}"} ${H.waiting}`);W.push(""),W.push("# HELP bunqueue_queue_jobs_prioritized Number of prioritized jobs per queue"),W.push("# TYPE bunqueue_queue_jobs_prioritized gauge");for(let[Z,H]of G)W.push(`bunqueue_queue_jobs_prioritized{queue="${Z}"} ${H.prioritized}`);W.push(""),W.push("# HELP bunqueue_queue_jobs_delayed Number of delayed jobs per queue"),W.push("# TYPE bunqueue_queue_jobs_delayed gauge");for(let[Z,H]of G)W.push(`bunqueue_queue_jobs_delayed{queue="${Z}"} ${H.delayed}`);W.push(""),W.push("# HELP bunqueue_queue_jobs_active Number of active jobs per queue"),W.push("# TYPE bunqueue_queue_jobs_active gauge");for(let[Z,H]of G)W.push(`bunqueue_queue_jobs_active{queue="${Z}"} ${H.active}`);W.push(""),W.push("# HELP bunqueue_queue_jobs_dlq Number of DLQ jobs per queue"),W.push("# TYPE bunqueue_queue_jobs_dlq gauge");for(let[Z,H]of G)W.push(`bunqueue_queue_jobs_dlq{queue="${Z}"} ${H.dlq}`)}let K=yU.toPrometheus();if(K)W.push(""),W.push(K);return W.join(`
`)}class wR{cache=new Map;maxSize;onEvict;head=null;tail=null;constructor($,Y){this.maxSize=$,this.onEvict=Y}moveToFront($){if($===this.head)return;if($.prev)$.prev.next=$.next;if($.next)$.next.prev=$.prev;if($===this.tail)this.tail=$.prev;if($.prev=null,$.next=this.head,this.head)this.head.prev=$;this.head=$,this.tail??=$}removeNode($){if($.prev)$.prev.next=$.next;if($.next)$.next.prev=$.prev;if($===this.head)this.head=$.next;if($===this.tail)this.tail=$.prev}addToFront($){if($.prev=null,$.next=this.head,this.head)this.head.prev=$;this.head=$,this.tail??=$}get($){let Y=this.cache.get($);if(!Y)return;return this.moveToFront(Y),Y.value}set($,Y){let X=this.cache.get($);if(X)X.value=Y,this.moveToFront(X);else{if(this.cache.size>=this.maxSize&&this.tail){let J=this.tail;this.cache.delete(J.key),this.removeNode(J),this.onEvict?.(J.key,J.value)}let G={key:$,value:Y,prev:null,next:null};this.cache.set($,G),this.addToFront(G)}}has($){return this.cache.has($)}delete($){let Y=this.cache.get($);if(!Y)return!1;return this.removeNode(Y),this.cache.delete($)}clear(){this.cache.clear(),this.head=null,this.tail=null}get size(){return this.cache.size}*keys(){let $=this.tail;while($)yield $.key,$=$.prev}*values(){let $=this.tail;while($)yield $.value,$=$.prev}*entries(){let $=this.tail;while($)yield[$.key,$.value],$=$.prev}forEach($){let Y=this.tail;while(Y)$(Y.value,Y.key),Y=Y.prev}[Symbol.iterator](){return this.entries()}}class Yl{cache=new Set;maxSize;onEvict;evictBatchSize;constructor($,Y){this.maxSize=$,this.onEvict=Y,this.evictBatchSize=Math.max(1,Math.floor($*0.1))}add($){if(this.cache.has($))return;if(this.cache.size>=this.maxSize)this.evictBatch();this.cache.add($)}evictBatch(){let $=[],Y=this.cache.values();for(let X=0;X<this.evictBatchSize;X++){let{value:G,done:J}=Y.next();if(J)break;$.push(G)}for(let X of $)this.cache.delete(X),this.onEvict?.(X)}has($){return this.cache.has($)}delete($){return this.cache.delete($)}clear(){this.cache.clear()}get size(){return this.cache.size}values(){return this.cache.values()}[Symbol.iterator](){return this.cache[Symbol.iterator]()}}class Xl{cache=new Map;maxSize;onEvict;evictBatchSize;constructor($,Y){this.maxSize=$,this.onEvict=Y,this.evictBatchSize=Math.max(1,Math.floor($*0.1))}get($){return this.cache.get($)}set($,Y){if(this.cache.has($)){this.cache.set($,Y);return}if(this.cache.size>=this.maxSize)this.evictBatch();this.cache.set($,Y)}evictBatch(){let $=[],Y=this.cache.entries();for(let X=0;X<this.evictBatchSize;X++){let{value:G,done:J}=Y.next();if(J)break;$.push({key:G[0],value:G[1]})}for(let{key:X,value:G}of $)this.cache.delete(X),this.onEvict?.(X,G)}has($){return this.cache.has($)}delete($){return this.cache.delete($)}clear(){this.cache.clear()}get size(){return this.cache.size}keys(){return this.cache.keys()}values(){return this.cache.values()}entries(){return this.cache.entries()}forEach($){this.cache.forEach($)}[Symbol.iterator](){return this.cache[Symbol.iterator]()}}class Gl{cache=new Map;ttlMs;cleanupInterval=null;expiryHeap=new vU(($,Y)=>$.expiresAt-Y.expiresAt);staleCount=0;static COMPACTION_THRESHOLD=0.5;static MIN_COMPACTION_SIZE=100;constructor($,Y=60000){this.ttlMs=$,this.startCleanup(Y)}startCleanup($){this.cleanupInterval=setInterval(()=>{this.cleanup()},$)}cleanup(){let $=Date.now();while(!this.expiryHeap.isEmpty){let Y=this.expiryHeap.peek();if(!Y||Y.expiresAt>$)break;this.expiryHeap.pop();let{key:X,expiresAt:G}=Y;if(this.cache.get(X)?.expiresAt===G)this.cache.delete(X);else if(this.staleCount>0)this.staleCount--}this.maybeCompact()}maybeCompact(){let $=this.expiryHeap.size;if($>=Gl.MIN_COMPACTION_SIZE&&this.staleCount/$>Gl.COMPACTION_THRESHOLD)this.rebuildHeap()}rebuildHeap(){this.expiryHeap.clear(),this.staleCount=0;for(let[$,Y]of this.cache)this.expiryHeap.push({expiresAt:Y.expiresAt,key:$})}get($){let Y=this.cache.get($);if(!Y)return;if(Y.expiresAt<=Date.now()){this.cache.delete($),this.staleCount++;return}return Y.value}set($,Y,X){let G=Date.now()+(X??this.ttlMs);if(this.cache.has($))this.staleCount++;this.cache.set($,{value:Y,expiresAt:G}),this.expiryHeap.push({expiresAt:G,key:$})}has($){return this.get($)!==void 0}delete($){let Y=this.cache.delete($);if(Y)this.staleCount++;return Y}clear(){this.cache.clear(),this.expiryHeap.clear(),this.staleCount=0}stop(){if(this.cleanupInterval)clearInterval(this.cleanupInterval),this.cleanupInterval=null}get size(){return this.cache.size}get heapSize(){return this.expiryHeap.size}get staleEntryCount(){return this.staleCount}}var mo0={maxCompletedJobs:50000,maxJobResults:1e4,maxJobLogs:1e4,maxCustomIds:50000,maxWaitingDeps:1e4,cleanupIntervalMs:1e4,jobTimeoutCheckMs:5000,dependencyCheckMs:30000,stallCheckMs:5000,dlqMaintenanceMs:60000};function ES($,Y,X,G=jN){if(X.jobIndex.get($)?.type!=="processing")return null;if(X.jobLocks.has($))return null;let Q=Fs0($,Y,G);return X.jobLocks.set($,Q),Q.token}function IN($,Y,X){let G=X.jobLocks.get($);if(!G)return!1;if(G.token!==Y)return!1;if(FS(G))return!1;return!0}function CN($,Y,X,G){let J=X.jobLocks.get($);if(!J)return!1;if(J.token!==Y)return!1;if(FS(J))return X.jobLocks.delete($),!1;Ls0(J,G);let Q=X.jobIndex.get($);if(Q?.type==="processing"){let W=X.processingShards[Q.shardIdx].get($);if(W)W.lastHeartbeat=Date.now()}return!0}function PQ0($,Y){let X=[];for(let G of $)if(CN(G.id,G.token,Y,G.ttl))X.push(String(G.id));return X}function X2($,Y,X){let G=Y.jobLocks.get($);if(!G)return!0;if(X&&G.token!==X)return!1;return Y.jobLocks.delete($),!0}function Jl($,Y){return Y.jobLocks.get($)??null}function wQ0($,Y,X){let G=X.clientJobs.get($);if(!G)G=new Set,X.clientJobs.set($,G);G.add(Y)}function _Q0($,Y,X){if(!$)return;let G=X.clientJobs.get($);if(G){if(G.delete(Y),G.size===0)X.clientJobs.delete($)}}async function jQ0($,Y){let X=Y.clientJobs.get($);if(!X||X.size===0)return Y.clientJobs.delete($),0;let G=[];for(let K of X){let Z=Y.jobIndex.get(K);if(Z?.type!=="processing")continue;let H=Z.shardIdx,z=Y.processingShards[H].get(K);if(!z)continue;G.push({jobId:K,procIdx:H,queueShardIdx:l1(z.queue)})}if(G.length===0)return Y.clientJobs.delete($),0;let J=new Map;for(let K of G){let Z=J.get(K.procIdx);if(!Z)Z=[],J.set(K.procIdx,Z);Z.push(K)}let Q=0,W=Date.now();try{for(let[K,Z]of J){let H=new Map;for(let z of Z){let V=H.get(z.queueShardIdx);if(!V)V=[],H.set(z.queueShardIdx,V);V.push(z)}for(let[z,V]of H)await v4(Y.shardLocks[z],async()=>{await v4(Y.processingLocks[K],()=>{for(let{jobId:F}of V){let L=Y.processingShards[K].get(F);if(!L)continue;Q+=Gg4({jobId:F,job:L,procIdx:K,queueShardIdx:z,ctx:Y,now:W})}})})}return Q}finally{Y.clientJobs.delete($)}}function TQ0($,Y){let X=Y.clientJobs.get($);if(!X||X.size===0)return Y.clientJobs.delete($),0;let G=0;for(let J of X){Y.jobLocks.delete(J);let Q=Y.jobIndex.get(J);if(Q?.type!=="processing")continue;let W=Y.processingShards[Q.shardIdx].get(J);if(!W)continue;W.lastHeartbeat=0,W.startedAt=0,G++}return Y.clientJobs.delete($),G}function Gg4($){let{jobId:Y,job:X,procIdx:G,queueShardIdx:J,ctx:Q,now:W}=$,K=Q.shards[J];if(Q.processingShards[G].delete(Y),Q.jobLocks.delete(Y),K.releaseJobResources(X.queue,X.uniqueKey,X.groupId),X.uniqueKey?.startsWith("cron:"))return Q.jobIndex.delete(Y),Q.storage?.deleteJob(Y),1;X.startedAt=null,X.lastHeartbeat=W,K.getQueue(X.queue).push(X);let Z=X.runAt>W;return K.incrementQueued(Y,Z,X.createdAt,X.queue,X.runAt),Q.jobIndex.set(Y,{type:"queue",shardIdx:J,queueName:X.queue}),1}async function uo0($){let Y=Date.now(),X=[];for(let[J,Q]of $.jobLocks)if(FS(Q,Y)){let W=v5(J),K=$.processingShards[W].get(J);if(K){let Z=l1(K.queue);X.push({jobId:J,lock:Q,procIdx:W,shardIdx:Z,job:K})}else $.jobLocks.delete(J)}if(X.length===0)return;let G=new Map;for(let J of X){let Q=G.get(J.shardIdx);if(!Q)Q=new Map,G.set(J.shardIdx,Q);let W=Q.get(J.procIdx);if(!W)W=[],Q.set(J.procIdx,W);W.push(J)}for(let[J,Q]of G)await v4($.shardLocks[J],async()=>{for(let[W,K]of Q)await v4($.processingLocks[W],async()=>{for(let{jobId:Z,lock:H,job:z}of K)Jg4(Z,H,z,J,W,$,Y)})})}function Jg4($,Y,X,G,J,Q,W){let K=Q.shards[G],Z=K.getQueue(X.queue);if(Q.processingShards[J].delete($),X.uniqueKey?.startsWith("cron:")){K.releaseJobResources(X.queue,X.uniqueKey,X.groupId),Q.jobIndex.delete($),Q.storage?.deleteJob($),Q.jobLocks.delete($);return}X.attempts++,X.startedAt=null,X.lastHeartbeat=W,X.stallCount++;let H=K.getStallConfig(X.queue);if(H.maxStalls>0&&X.stallCount>=H.maxStalls)Qg4({jobId:$,job:X,lock:Y,shard:K,ctx:Q,now:W});else Wg4({jobId:$,job:X,lock:Y,queue:Z,idx:G,ctx:Q,now:W});Q.jobLocks.delete($),Q.dashboardEmit?.("job:lock-expired",{jobId:String($),queue:X.queue,renewalCount:Y.renewalCount})}function Qg4($){let{jobId:Y,job:X,lock:G,shard:J,ctx:Q,now:W}=$;J.addToDlq(X,"stalled",`Lock expired after ${G.renewalCount} renewals`),Q.jobIndex.set(Y,{type:"dlq",queueName:X.queue}),Q.eventsManager.broadcast({eventType:"failed",jobId:Y,queue:X.queue,timestamp:W,error:"Lock expired (max stalls reached)"})}function Wg4($){let{jobId:Y,job:X,queue:G,idx:J,ctx:Q,now:W}=$,K=Q.shards[J];G.push(X);let Z=X.runAt>W;K.incrementQueued(Y,Z,X.createdAt,X.queue,X.runAt),Q.jobIndex.set(Y,{type:"queue",shardIdx:J,queueName:X.queue}),K.notify(),Q.eventsManager.broadcast({eventType:"stalled",jobId:Y,queue:X.queue,timestamp:W})}async function po0($){let Y=Date.now(),X=1800000;for(let G=0;G<E$;G++)$.shards[G].refreshDelayedCount(Y);for(let G=0;G<E$;G++)for(let J of $.shards[G].queues.values())if(J.needsCompaction(0.2))J.compact();await Zg4($,Y,1800000),Ug4($,Y),Hg4($),zg4($),await Vg4($),Fg4($),Ng4($)}async function Zg4($,Y,X){for(let G=0;G<E$;G++){let J=[];for(let[Q,W]of $.processingShards[G])if(W.startedAt&&Y-W.startedAt>X)J.push(Q);if(J.length===0)continue;await v4($.processingLocks[G],()=>{let Q=0;for(let W of J)if($.processingShards[G].get(W))$.processingShards[G].delete(W),$.jobIndex.delete(W),Q++;if(Q>0)$.dashboardEmit?.("cleanup:orphans-removed",{count:Q})})}}function Ug4($,Y){for(let G=0;G<E$;G++){let J=$.shards[G],Q=[];for(let[W,K]of J.waitingDeps)if(Y-K.createdAt>3600000)Q.push(K);for(let W of Q)J.waitingDeps.delete(W.id),J.unregisterDependencies(W.id,W.dependsOn),$.jobIndex.delete(W.id);if(Q.length>0)$.dashboardEmit?.("cleanup:stale-deps-removed",{count:Q.length})}}function Hg4($){for(let Y=0;Y<E$;Y++){let X=$.shards[Y];X.cleanExpiredUniqueKeys();for(let[G,J]of X.uniqueKeys)if(J.size>1000){let Q=Math.floor(J.size/2),W=J.keys();for(let K=0;K<Q;K++){let{value:Z,done:H}=W.next();if(H)break;J.delete(Z)}}for(let[G,J]of X.activeGroups)if(J.size>1000){let Q=Math.floor(J.size/2),W=J.values();for(let K=0;K<Q;K++){let{value:Z,done:H}=W.next();if(H)break;J.delete(Z)}}}}function zg4($){for(let Y of $.stalledCandidates)if($.jobIndex.get(Y)?.type!=="processing")$.stalledCandidates.delete(Y)}async function Vg4($){if($.jobIndex.size<=1e5)return;let Y=new Map,X=new Map;for(let[G,J]of $.jobIndex)if(J.type==="processing"){let Q=v5(G),W=Y.get(Q);if(!W)W=[],Y.set(Q,W);W.push(G)}else if(J.type==="queue"){let Q=X.get(J.shardIdx);if(!Q)Q=[],X.set(J.shardIdx,Q);Q.push({jobId:G,queueName:J.queueName})}for(let[G,J]of Y)await v4($.processingLocks[G],()=>{for(let Q of J)if(!$.processingShards[G].has(Q))$.jobIndex.delete(Q)});for(let[G,J]of X)await v4($.shardLocks[G],()=>{let Q=$.shards[G];for(let{jobId:W,queueName:K}of J)if(!Q.getQueue(K).has(W))$.jobIndex.delete(W)})}function Fg4($){for(let Y of $.jobLocks.keys())if($.jobIndex.get(Y)?.type!=="processing")$.jobLocks.delete(Y)}function Lg4($,Y){for(let X=0;X<E$;X++)for(let G of $.processingShards[X].values())if(G.queue===Y)return!0;return!1}function Dg4($,Y){for(let X=0;X<E$;X++)for(let G of $.shards[X].waitingDeps.values())if(G.queue===Y)return!0;return!1}function Ng4($){for(let Y=0;Y<E$;Y++){let X=$.shards[Y],G=[];for(let[J,Q]of X.queues){let W=X.dlq.get(J);if(Q.size===0&&(!W||W.length===0)&&!Lg4($,J)&&!Dg4($,J))G.push(J)}for(let J of G)X.queues.delete(J),X.dlq.delete(J),X.uniqueKeys.delete(J),X.queueState.delete(J),X.activeGroups.delete(J),X.clearQueueLimiters(J),X.stallConfig.delete(J),X.dlqConfig.delete(J),$.dashboardEmit?.("queue:removed",{queue:J}),$.unregisterQueueName(J);X.cleanOrphanedTemporalEntries()}}function do0($){let Y=Date.now(),X=[];for(let G of $.stalledCandidates){let J=v5(G),Q=$.processingShards[J].get(G);if(!Q){$.stalledCandidates.delete(G);continue}let W=$.shards[l1(Q.queue)].getStallConfig(Q.queue);if(!W.enabled){$.stalledCandidates.delete(G);continue}let K=uJ0(Q,W,Y);if(K!=="keep")X.push({job:Q,action:K});$.stalledCandidates.delete(G)}for(let G=0;G<E$;G++){let J=$.processingShards[G];for(let[Q,W]of J){let K=$.shards[l1(W.queue)].getStallConfig(W.queue);if(!K.enabled)continue;if(uJ0(W,K,Y)!=="keep")$.stalledCandidates.add(Q)}}for(let{job:G,action:J}of X)Ag4(G,J,$).catch((Q)=>{gV.error("Failed to handle stalled job",{jobId:String(G.id),error:String(Q)})})}async function Ag4($,Y,X){let G=l1($.queue),J=v5($.id),Q=!1;if(await v4(X.shardLocks[G],async()=>{await v4(X.processingLocks[J],()=>{if(!X.processingShards[J].has($.id))return;let W=X.shards[G];if(Y==="move_to_dlq")Bg4($,X,W,J,G);else Og4($,X,W,J,G);Q=!0})}),Q)X.dashboardEmit?.("job:stalled",{jobId:String($.id),queue:$.queue,stallCount:$.stallCount+1,action:Y}),X.eventsManager.broadcast({eventType:"stalled",queue:$.queue,jobId:$.id,timestamp:Date.now(),data:{stallCount:$.stallCount+1,action:Y}}),X.webhookManager.trigger("stalled",String($.id),$.queue,{data:{stallCount:$.stallCount+1,action:Y}})}function Bg4($,Y,X,G,J){if(Y.processingShards[G].delete($.id),X.releaseJobResources($.queue,$.uniqueKey,$.groupId),$.uniqueKey?.startsWith("cron:")){Y.jobIndex.delete($.id),Y.storage?.deleteJob($.id);return}let Q=X.addToDlq($,"stalled",`Job stalled ${$.stallCount+1} times`);Y.jobIndex.set($.id,{type:"dlq",queueName:$.queue}),Y.storage?.saveDlqEntry(Q),Y.storage?.deleteJob($.id)}function Og4($,Y,X,G,J){if($.uniqueKey?.startsWith("cron:")){Y.processingShards[G].delete($.id),X.releaseJobResources($.queue,$.uniqueKey,$.groupId),Y.jobIndex.delete($.id),Y.storage?.deleteJob($.id);return}Bs0($),$.attempts++,$.startedAt=null;let Q=Date.now();if($.runAt=Q+MR($),$.lastHeartbeat=Q,$.timeline.length<qY)$.timeline.push({state:"failed",timestamp:Q,error:"stalled",attempt:$.attempts}),$.timeline.push({state:"waiting",timestamp:Q,attempt:$.attempts+1});Y.processingShards[G].delete($.id),X.releaseJobResources($.queue,$.uniqueKey,$.groupId),X.getQueue($.queue).push($);let W=$.runAt>Date.now();X.incrementQueued($.id,W,$.createdAt,$.queue,$.runAt),Y.jobIndex.set($.id,{type:"queue",shardIdx:J,queueName:$.queue}),Y.storage?.updateForRetry($)}async function Ql($){if($.pendingDepChecks.size===0)return;let Y=Array.from($.pendingDepChecks);$.pendingDepChecks.clear();let X=new Map;for(let G of Y)for(let J=0;J<E$;J++){let Q=$.shards[J].getJobsWaitingFor(G);if(Q&&Q.size>0){let W=X.get(J);if(!W)W=new Set,X.set(J,W);for(let K of Q)W.add(K)}}await Promise.all(Array.from(X.entries()).map(async([G,J])=>{await v4($.shardLocks[G],()=>{let Q=$.shards[G],W=[];for(let K of J){let Z=Q.waitingDeps.get(K);if(Z?.dependsOn.every((H)=>$.completedJobs.has(H)))W.push(Z)}if(W.length>0)Eg4(W,Q,$,G)})}))}function Eg4($,Y,X,G){let J=Date.now();for(let Q of $)if(Y.waitingDeps.has(Q.id)){Y.waitingDeps.delete(Q.id),Y.unregisterDependencies(Q.id,Q.dependsOn),Y.getQueue(Q.queue).push(Q);let W=Q.runAt>J;if(Y.incrementQueued(Q.id,W,Q.createdAt,Q.queue,Q.runAt),X.jobIndex.set(Q.id,{type:"queue",shardIdx:G,queueName:Q.queue}),Q.timeline.length<qY){let K=W?"delayed":Q.priority>0?"prioritized":"waiting";Q.timeline.push({state:K,timestamp:J})}}if($.length>0){Y.notify();for(let Q of $)X.dashboardEmit?.("job:dependencies-resolved",{jobId:String(Q.id),queue:Q.queue})}}var co0=5,lo0={cleanup:{consecutiveFailures:0},dependency:{consecutiveFailures:0},lockExpiration:{consecutiveFailures:0}};function _R($,Y){let X=lo0[$];if(!X)return;if(X.consecutiveFailures++,X.lastError=String(Y),X.lastFailureAt=Date.now(),gV.error(`${$} task failed`,{error:X.lastError,consecutiveFailures:X.consecutiveFailures,willRetry:X.consecutiveFailures<co0}),X.consecutiveFailures>=co0)gV.error(`CRITICAL: Background ${$} repeatedly failing`,{consecutiveFailures:X.consecutiveFailures,lastError:X.lastError})}function jR($){let Y=lo0[$];if(Y)Y.consecutiveFailures=0}function io0($,Y){let X=setInterval(()=>{po0($).then(()=>{jR("cleanup"),us0({queueNamesCache:$.queueNamesCache,shards:$.shards,processingShards:$.processingShards,workerManager:$.workerManager,storage:$.storage,dashboardEmit:$.dashboardEmit,state:$.monitoringState})}).catch((Z)=>{_R("cleanup",Z)})},$.config.cleanupIntervalMs),G=setInterval(()=>{Rg4($)},$.config.jobTimeoutCheckMs),J=setInterval(()=>{if($.pendingDepChecks.size===0)return;Ql($).then(()=>{jR("dependency")}).catch((Z)=>{_R("dependency",Z)})},$.config.dependencyCheckMs),Q=setInterval(()=>{do0($)},$.config.stallCheckMs),W=setInterval(()=>{qg4($)},$.config.dlqMaintenanceMs),K=setInterval(()=>{uo0(Mg4($)).then(()=>{jR("lockExpiration")}).catch((Z)=>{_R("lockExpiration",Z)})},$.config.stallCheckMs);return Y.start(),{cleanupInterval:X,timeoutInterval:G,depCheckInterval:J,stallCheckInterval:Q,dlqMaintenanceInterval:W,lockCheckInterval:K,cronScheduler:Y}}function no0($){clearInterval($.cleanupInterval),clearInterval($.timeoutInterval),clearInterval($.depCheckInterval),clearInterval($.stallCheckInterval),clearInterval($.dlqMaintenanceInterval),clearInterval($.lockCheckInterval),$.cronScheduler.stop()}function Mg4($){return{jobIndex:$.jobIndex,jobLocks:$.jobLocks,clientJobs:$.clientJobs,processingShards:$.processingShards,processingLocks:$.processingLocks,shards:$.shards,shardLocks:$.shardLocks,eventsManager:$.eventsManager,dashboardEmit:$.dashboardEmit}}function Rg4($){let Y=Date.now();for(let X of $.processingShards)for(let[G,J]of X)if(J.timeout&&J.startedAt&&Y-J.startedAt>J.timeout)$.dashboardEmit?.("job:timeout",{jobId:String(G),queue:J.queue,timeout:J.timeout}),$.fail(G,"Job timeout exceeded").catch((Q)=>{gV.error("Failed to mark timed out job as failed",{jobId:String(G),error:String(Q)})})}function qg4($){let Y={shards:$.shards,jobIndex:$.jobIndex,storage:$.storage};for(let X of $.queueNamesCache)try{let G=So0(X,Y);if(G>0)$.dashboardEmit?.("dlq:auto-retried",{queue:X,count:G});let J=ko0(X,Y);if(J>0)$.dashboardEmit?.("dlq:expired",{queue:X,count:J})}catch(G){gV.error("DLQ maintenance failed",{queue:X,error:String(G)})}}var MS=1e4;function ro0($){if(!$.storage)return;let Y=$.storage.loadCompletedJobIds(),X=$.storage.loadDlqJobIds(),G=Date.now(),J=0;while(!0){let z=$.storage.loadActiveJobs(MS,J);if(z.length===0)break;for(let V of z){let F=l1(V.queue),L=$.shards[F],N=L.getStallConfig(V.queue);if(V.uniqueKey?.startsWith("cron:")){$.storage.deleteJob(V.id),$.registerQueueName(V.queue);continue}if(X.has(V.id)){$.storage.deleteJob(V.id),$.registerQueueName(V.queue);continue}V.stallCount=(V.stallCount||0)+1,V.attempts++,V.startedAt=null,V.lastHeartbeat=G;let D=N.maxStalls??3;if(V.stallCount>=D){let A=L.addToDlq(V,"stalled",`Job stalled ${V.stallCount} times (recovered at startup)`);$.jobIndex.set(V.id,{type:"dlq",queueName:V.queue}),$.storage.saveDlqEntry(A),$.storage.deleteJob(V.id)}else{V.runAt=G+MR(V),L.getQueue(V.queue).push(V);let A=V.runAt>G;L.incrementQueued(V.id,A,V.createdAt,V.queue,V.runAt),$.jobIndex.set(V.id,{type:"queue",shardIdx:F,queueName:V.queue}),$.storage.updateForRetry(V)}$.registerQueueName(V.queue)}if(J+=z.length,z.length<MS)break}let Q=0;while(!0){let z=$.storage.loadPendingJobs(MS,Q);if(z.length===0)break;for(let V of z){let F=l1(V.queue),L=$.shards[F];if(V.dependsOn&&V.dependsOn.length>0&&!V.dependsOn.every((A)=>$.completedJobs.has(A)||Y.has(A)))L.waitingDeps.set(V.id,V),L.registerDependencies(V.id,V.dependsOn);else{L.getQueue(V.queue).push(V);let A=V.runAt>G;L.incrementQueued(V.id,A,V.createdAt,V.queue,V.runAt)}if($.jobIndex.set(V.id,{type:"queue",shardIdx:F,queueName:V.queue}),V.customId)$.customIdMap.set(V.customId,V.id);if(V.uniqueKey)L.registerUniqueKeyWithTtl(V.queue,V.uniqueKey,V.id,V.deduplicationTtl??void 0);$.registerQueueName(V.queue)}if(Q+=z.length,z.length<MS)break}let W=$.storage.loadDlq();for(let[z,V]of W){let F=l1(z),L=$.shards[F];for(let N of V)L.restoreDlqEntry(z,N),$.jobIndex.set(N.job.id,{type:"dlq",queueName:z});$.registerQueueName(z)}let K=$.config.maxCompletedJobs,Z=0,H=0;while(Z<K){let z=K-Z,V=Math.min(MS,z),F=$.storage.loadCompletedJobs(V,H);if(F.length===0)break;for(let L of F)$.jobIndex.set(L.id,{type:"completed",queueName:L.queue}),$.completedJobs.add(L.id),$.completedJobsData.set(L.id,L),$.registerQueueName(L.queue);if(Z+=F.length,H+=F.length,F.length<V)break}}function ao0($,Y){let X=0,G=0,J=0,Q=0,W=0,K=0,Z=Date.now();for(let z=0;z<E$;z++){let V=$.shards[z].getStats();J+=V.delayedJobs,W+=V.dlqJobs,Q+=$.processingShards[z].size,K+=$.shards[z].waitingChildren.size;for(let F of $.shards[z].queues.values())for(let L of F.values())if(L.runAt<=Z)if(L.priority>0)G++;else X++}let H=Y.getStats();return{waiting:X,prioritized:G,delayed:J,active:Q,dlq:W,completed:$.completedJobs.size,"waiting-children":K,totalPushed:$.metrics.totalPushed.value,totalPulled:$.metrics.totalPulled.value,totalCompleted:$.metrics.totalCompleted.value,totalFailed:$.metrics.totalFailed.value,uptime:Date.now()-$.startTime,cronJobs:H.total,cronPending:H.pending}}function so0($){let Y=0,X=0,G=0,J=0,Q=0;for(let K=0;K<E$;K++){Y+=$.processingShards[K].size;let Z=$.shards[K].getStats();X+=Z.queuedJobs,G+=$.shards[K].waitingDeps.size;let H=$.shards[K].getInternalSizes();J+=H.temporalIndex,Q+=H.delayedHeap}let W=0;for(let K of $.clientJobs.values())W+=K.size;return{jobIndex:$.jobIndex.size,completedJobs:$.completedJobs.size,jobResults:$.jobResults.size,jobLogs:$.jobLogs.size,customIdMap:$.customIdMap.size,jobLocks:$.jobLocks.size,clientJobs:$.clientJobs.size,clientJobsTotal:W,pendingDepChecks:$.pendingDepChecks.size,stalledCandidates:$.stalledCandidates.size,processingTotal:Y,queuedTotal:X,waitingDepsTotal:G,temporalIndexTotal:J,delayedHeapTotal:Q}}function oo0($,Y){let X=new Map,G=Date.now();for(let J of Y){let Q=l1(J),W=$.shards[Q],K=W.queues.get(J),Z=0,H=0,z=0;if(K)for(let F of K.values())if(F.runAt>G)z++;else if(F.priority>0)H++;else Z++;let V=W.getDlqCount(J);X.set(J,{waiting:Z,prioritized:H,delayed:z,active:0,dlq:V})}for(let J=0;J<E$;J++)for(let Q of $.processingShards[J].values()){let W=X.get(Q.queue);if(W)W.active++}return X}function IQ0($,Y){let X=l1($),G=Y.shards[X],J=G.queues.get($),Q=Date.now(),W=0,K=0,Z=0;if(J)for(let A of J.values())if(A.runAt>Q)Z++;else if(A.priority>0)K++;else W++;let H=0;for(let A of Y.processingShards)for(let B of A.values())if(B.queue===$)H++;let z=0;for(let[A,B]of Y.jobIndex)if(B.type==="completed"&&B.queueName===$&&Y.completedJobs.has(A))z++;let V=G.getDlq($).length,F=0;for(let A of G.waitingChildren.values())if(A.queue===$)F++;let L=Y.perQueueMetrics?.get($),N=Number(L?.totalCompleted??0n),D=Number(L?.totalFailed??0n);return{waiting:W,prioritized:K,delayed:Z,active:H,completed:z,failed:V,"waiting-children":F,totalCompleted:N,totalFailed:D}}function to0($){for(let Y=0;Y<E$;Y++)for(let X of $.shards[Y].queues.values())if(X.needsCompaction(0.1))X.compact();for(let[Y,X]of $.clientJobs)if(X.size===0)$.clientJobs.delete(Y);for(let Y of $.jobLocks.keys())if($.jobIndex.get(Y)?.type!=="processing")$.jobLocks.delete(Y)}class CQ0{deps;callbacks;constructor($,Y){this.deps=$,this.callbacks=Y}getLockContext(){return{jobIndex:this.deps.jobIndex,jobLocks:this.deps.jobLocks,clientJobs:this.deps.clientJobs,processingShards:this.deps.processingShards,processingLocks:this.deps.processingLocks,shards:this.deps.shards,shardLocks:this.deps.shardLocks,eventsManager:this.deps.eventsManager,storage:this.deps.storage}}getBackgroundContext(){return{config:this.deps.config,storage:this.deps.storage,shards:this.deps.shards,shardLocks:this.deps.shardLocks,processingShards:this.deps.processingShards,processingLocks:this.deps.processingLocks,jobIndex:this.deps.jobIndex,completedJobs:this.deps.completedJobs,jobResults:this.deps.jobResults,customIdMap:this.deps.customIdMap,jobLogs:this.deps.jobLogs,jobLocks:this.deps.jobLocks,clientJobs:this.deps.clientJobs,stalledCandidates:this.deps.stalledCandidates,pendingDepChecks:this.deps.pendingDepChecks,queueNamesCache:this.deps.queueNamesCache,eventsManager:this.deps.eventsManager,webhookManager:this.deps.webhookManager,metrics:this.deps.metrics,startTime:this.deps.startTime,perQueueMetrics:this.deps.perQueueMetrics,fail:this.callbacks.fail,registerQueueName:this.callbacks.registerQueueName,unregisterQueueName:this.callbacks.unregisterQueueName,dashboardEmit:this.callbacks.emitDashboardEvent,workerManager:this.deps.workerManager,monitoringState:this.deps.monitoringState,completedJobsData:this.deps.completedJobsData}}getStatsContext(){return{shards:this.deps.shards,processingShards:this.deps.processingShards,completedJobs:this.deps.completedJobs,jobIndex:this.deps.jobIndex,jobResults:this.deps.jobResults,jobLogs:this.deps.jobLogs,customIdMap:this.deps.customIdMap,jobLocks:this.deps.jobLocks,clientJobs:this.deps.clientJobs,pendingDepChecks:this.deps.pendingDepChecks,stalledCandidates:this.deps.stalledCandidates,metrics:this.deps.metrics,startTime:this.deps.startTime,perQueueMetrics:this.deps.perQueueMetrics}}getPushContext(){return{storage:this.deps.storage,shards:this.deps.shards,shardLocks:this.deps.shardLocks,completedJobs:this.deps.completedJobs,customIdMap:this.deps.customIdMap,jobIndex:this.deps.jobIndex,totalPushed:this.deps.metrics.totalPushed,broadcast:this.deps.eventsManager.broadcast.bind(this.deps.eventsManager),dashboardEmit:this.callbacks.emitDashboardEvent}}getPullContext(){return{storage:this.deps.storage,shards:this.deps.shards,shardLocks:this.deps.shardLocks,processingShards:this.deps.processingShards,processingLocks:this.deps.processingLocks,jobIndex:this.deps.jobIndex,totalPulled:this.deps.metrics.totalPulled,broadcast:this.deps.eventsManager.broadcast.bind(this.deps.eventsManager),dashboardEmit:this.callbacks.emitDashboardEvent}}getAckContext(){return{storage:this.deps.storage,shards:this.deps.shards,shardLocks:this.deps.shardLocks,processingShards:this.deps.processingShards,processingLocks:this.deps.processingLocks,completedJobs:this.deps.completedJobs,completedJobsData:this.deps.completedJobsData,jobResults:this.deps.jobResults,jobIndex:this.deps.jobIndex,customIdMap:this.deps.customIdMap,totalCompleted:this.deps.metrics.totalCompleted,totalFailed:this.deps.metrics.totalFailed,perQueueMetrics:this.deps.perQueueMetrics,broadcast:this.deps.eventsManager.broadcast.bind(this.deps.eventsManager),onJobCompleted:this.callbacks.onJobCompleted,onJobsCompleted:this.callbacks.onJobsCompleted,needsBroadcast:this.deps.eventsManager.needsBroadcast.bind(this.deps.eventsManager),hasPendingDeps:this.callbacks.hasPendingDeps,onRepeat:this.callbacks.onRepeat,emitDashboardEvent:this.callbacks.emitDashboardEvent,onChildTerminalFailure:this.callbacks.onChildTerminalFailure,onChildDependencyOption:this.callbacks.onChildDependencyOption}}getJobMgmtContext(){return{storage:this.deps.storage,shards:this.deps.shards,shardLocks:this.deps.shardLocks,processingShards:this.deps.processingShards,processingLocks:this.deps.processingLocks,jobIndex:this.deps.jobIndex,webhookManager:this.deps.webhookManager,eventsManager:this.deps.eventsManager,repeatChain:this.deps.repeatChain}}getQueryContext(){return{storage:this.deps.storage,shards:this.deps.shards,shardLocks:this.deps.shardLocks,processingShards:this.deps.processingShards,processingLocks:this.deps.processingLocks,jobIndex:this.deps.jobIndex,completedJobs:this.deps.completedJobs,completedJobsData:this.deps.completedJobsData,jobResults:this.deps.jobResults,customIdMap:this.deps.customIdMap}}getDlqContext(){return{shards:this.deps.shards,jobIndex:this.deps.jobIndex,storage:this.deps.storage}}getRetryCompletedContext(){return{shards:this.deps.shards,jobIndex:this.deps.jobIndex,storage:this.deps.storage,completedJobs:this.deps.completedJobs,jobResults:this.deps.jobResults}}getLogsContext(){return{jobIndex:this.deps.jobIndex,jobLogs:this.deps.jobLogs,maxLogsPerJob:this.deps.maxLogsPerJob}}getQueueControlContext(){return{shards:this.deps.shards,jobIndex:this.deps.jobIndex,processingShards:this.deps.processingShards,completedJobs:this.deps.completedJobs,completedJobsData:this.deps.completedJobsData,jobResults:this.deps.jobResults,jobLogs:this.deps.jobLogs,storage:this.deps.storage}}}class SQ0{config;storage;shards=[];shardLocks=[];processingShards=[];processingLocks=[];jobIndex=new Map;completedJobs;completedJobsData;jobResults;customIdMap;jobLogs;pendingDepChecks=new Set;stalledCandidates=new Set;depFlushScheduled=!1;depFlushRunning=!1;jobLocks=new Map;clientJobs=new Map;repeatChain=new Map;failedChildrenValues=new Map;ignoredChildrenFailures=new Map;cronScheduler;webhookManager;workerManager;eventsManager;dashboardEmit=null;recoveryStats=null;maxLogsPerJob=100;metrics={totalPushed:{value:0n},totalPulled:{value:0n},totalCompleted:{value:0n},totalFailed:{value:0n}};perQueueMetrics=new Map;startTime=Date.now();backgroundTaskHandles;queueNamesCache=new Set;monitoringState=ms0();contextFactory;constructor($={}){this.config={...mo0,...$},this.storage=$.dataPath?new mc({path:$.dataPath}):null,this.completedJobsData=new Xl(this.config.maxCompletedJobs),this.completedJobs=new Yl(this.config.maxCompletedJobs,(Y)=>{this.jobIndex.delete(Y),this.completedJobsData.delete(Y)}),this.jobResults=new wR(this.config.maxJobResults),this.customIdMap=new wR(this.config.maxCustomIds),this.jobLogs=new wR(this.config.maxJobLogs);for(let Y=0;Y<E$;Y++)this.shards.push(new oJ0),this.shardLocks.push(new ac),this.processingShards.push(new Map),this.processingLocks.push(new ac);if(this.cronScheduler=new KQ0,this.cronScheduler.setPushCallback(async(Y,X)=>{await this.push(Y,X)}),this.storage){let Y=this.storage;this.cronScheduler.setPersistCallback((X,G,J)=>{Y.updateCron(X,G,J)})}if(this.webhookManager=new ZQ0({validateUrls:$.validateWebhookUrls}),this.workerManager=new UQ0,this.cronScheduler.setWorkerCheckCallback((Y)=>{return this.workerManager.getForQueue(Y).length>0}),this.eventsManager=new HQ0(this.webhookManager),this.contextFactory=new CQ0(this.getContextDependencies(),this.getContextCallbacks()),ro0(this.contextFactory.getBackgroundContext()),this.recoveryStats={queues:this.queueNamesCache.size,jobs:this.jobIndex.size},this.storage)this.cronScheduler.load(this.storage.loadCronJobs());this.backgroundTaskHandles=io0(this.contextFactory.getBackgroundContext(),this.cronScheduler)}getContextDependencies(){return{config:this.config,storage:this.storage,shards:this.shards,shardLocks:this.shardLocks,processingShards:this.processingShards,processingLocks:this.processingLocks,jobIndex:this.jobIndex,completedJobs:this.completedJobs,completedJobsData:this.completedJobsData,jobResults:this.jobResults,customIdMap:this.customIdMap,jobLogs:this.jobLogs,jobLocks:this.jobLocks,clientJobs:this.clientJobs,stalledCandidates:this.stalledCandidates,pendingDepChecks:this.pendingDepChecks,queueNamesCache:this.queueNamesCache,repeatChain:this.repeatChain,eventsManager:this.eventsManager,webhookManager:this.webhookManager,workerManager:this.workerManager,monitoringState:this.monitoringState,metrics:this.metrics,startTime:this.startTime,maxLogsPerJob:this.maxLogsPerJob,perQueueMetrics:this.perQueueMetrics}}getContextCallbacks(){return{fail:this.fail.bind(this),registerQueueName:this.registerQueueName.bind(this),unregisterQueueName:this.unregisterQueueName.bind(this),onJobCompleted:this.onJobCompleted.bind(this),onJobsCompleted:this.onJobsCompleted.bind(this),hasPendingDeps:this.hasPendingDeps.bind(this),onRepeat:this.handleRepeat.bind(this),emitDashboardEvent:this.emitDashboardEvent.bind(this),onChildTerminalFailure:this.failParentOnChildFailure.bind(this),onChildDependencyOption:this.onChildDependencyOption.bind(this)}}handleRepeat($){if(!$.repeat)return;let Y=$.repeat.every??0,X=$.id;this.push($.queue,{data:$.data,priority:$.priority,delay:Y,maxAttempts:$.maxAttempts,backoff:$.backoff,ttl:$.ttl??void 0,timeout:$.timeout??void 0,tags:$.tags,groupId:$.groupId??void 0,lifo:$.lifo,removeOnComplete:$.removeOnComplete,removeOnFail:$.removeOnFail,repeat:{every:$.repeat.every,limit:$.repeat.limit,pattern:$.repeat.pattern,count:$.repeat.count+1}}).then((G)=>{if(this.repeatChain.set(X,G.id),this.repeatChain.size>1e4){let J=this.repeatChain.keys().next().value;if(J!==void 0)this.repeatChain.delete(J)}})}async push($,Y){return this.registerQueueName($),as0($,Y,this.contextFactory.getPushContext())}async pushBatch($,Y){return this.registerQueueName($),ss0($,Y,this.contextFactory.getPushContext())}async pull($,Y=0){return FQ0($,Y,this.contextFactory.getPullContext())}async pullWithLock($,Y,X=0,G=jN){let J=await FQ0($,X,this.contextFactory.getPullContext());if(!J)return{job:null,token:null};let Q=ES(J.id,Y,this.contextFactory.getLockContext(),G);return{job:J,token:Q}}async pullBatch($,Y,X=0){return LQ0($,Y,X,this.contextFactory.getPullContext())}async pullBatchWithLock($,Y,X,G=0,J=jN){let Q=await LQ0($,Y,G,this.contextFactory.getPullContext()),W=[];for(let K of Q){let Z=ES(K.id,X,this.contextFactory.getLockContext(),J);W.push(Z??"")}return{jobs:Q,tokens:W}}async ack($,Y,X){let G=this.contextFactory.getLockContext();if(X&&!IN($,X,G)){this.throwIfOwnershipConflict($,G);let J=this.jobIndex.get($);if(J?.type!=="processing"){if(J?.type==="queue")await this.completeStallRetriedJob($,Y),X2($,G,X);return}}try{await oc($,Y,this.contextFactory.getAckContext())}catch(J){if(J instanceof Error&&J.message.includes("not found")){if((X??this.isStallRetried($))&&await this.completeStallRetriedJob($,Y)){if(X)X2($,G,X);return}}throw J}X2($,G,X)}async ackBatch($,Y){let X=this.contextFactory.getLockContext(),G=[],J=Y?[]:void 0;if(Y?.length===$.length)for(let Q=0;Q<$.length;Q++){let W=Y[Q];if(W&&!IN($[Q],W,X)){if(this.throwIfOwnershipConflict($[Q],X),this.jobIndex.get($[Q])?.type==="queue")await this.completeStallRetriedJob($[Q],void 0),X2($[Q],X,W);continue}if(G.push($[Q]),J)J.push(W)}else G.push(...$);if(G.length>0)await Jo0(G,this.contextFactory.getAckContext());if(J)for(let Q=0;Q<G.length;Q++)X2(G[Q],X,J[Q]);else if(Y)for(let Q=0;Q<$.length;Q++)X2($[Q],X,Y[Q])}async ackBatchWithResults($){let Y=this.contextFactory.getLockContext(),X=[];for(let G of $){if(G.token&&!IN(G.id,G.token,Y)){if(this.throwIfOwnershipConflict(G.id,Y),this.jobIndex.get(G.id)?.type==="queue")await this.completeStallRetriedJob(G.id,G.result),X2(G.id,Y,G.token);continue}X.push(G)}if(X.length>0)await Qo0(X,this.contextFactory.getAckContext());for(let G of X)X2(G.id,Y,G.token)}async fail($,Y,X){let G=this.contextFactory.getLockContext();if(X&&!IN($,X,G)){if(this.throwIfOwnershipConflict($,G),this.jobIndex.get($)?.type!=="processing")return}try{await Go0($,Y,this.contextFactory.getAckContext())}catch(J){if(X&&J instanceof Error&&J.message.includes("not found")){if(this.jobIndex.get($)?.type==="queue")return}throw J}X2($,G,X)}throwIfOwnershipConflict($,Y){if(this.jobIndex.get($)?.type==="processing"&&Y.jobLocks.has($))throw Error(`Invalid or expired lock token for job ${$}`)}isStallRetried($){let Y=this.jobIndex.get($);if(Y?.type!=="queue")return!1;let J=this.shards[Y.shardIdx].getQueue(Y.queueName).find($);return J!==null&&J.attempts>0}async completeStallRetriedJob($,Y){let X=this.jobIndex.get($);if(X?.type!=="queue")return!1;let{shardIdx:G,queueName:J}=X,Q=this.shards[G],W=null;if(await v4(this.shardLocks[G],()=>{if(W=Q.getQueue(J).remove($),W)Q.decrementQueued($),Q.releaseJobResources(J,W.uniqueKey,W.groupId)}),!W)return!1;let K=this.contextFactory.getAckContext();if(!W.removeOnComplete){if(K.completedJobs.add($),K.completedJobsData.set($,W),Y!==void 0)K.jobResults.set($,Y),K.storage?.storeResult($,Y);K.jobIndex.set($,{type:"completed",queueName:W.queue}),K.storage?.markCompleted($,Date.now(),W.timeline)}else K.jobIndex.delete($),K.storage?.deleteJob($);return K.totalCompleted.value++,K.broadcast({eventType:"completed",queue:J,jobId:$,timestamp:Date.now(),data:Y}),K.onJobCompleted($),!0}jobHeartbeat($,Y){let X=this.jobIndex.get($);if(X?.type!=="processing")return!1;if(Y)return CN($,Y,this.contextFactory.getLockContext());let J=this.processingShards[X.shardIdx].get($);if(J)return J.lastHeartbeat=Date.now(),!0;return!1}jobHeartbeatBatch($,Y){let X=0;for(let G=0;G<$.length;G++)if(this.jobHeartbeat($[G],Y?.[G]))X++;return X}removeLock($){this.contextFactory.getLockContext().jobLocks.delete($)}createLock($,Y,X=jN){return ES($,Y,this.contextFactory.getLockContext(),X)}verifyLock($,Y){return IN($,Y,this.contextFactory.getLockContext())}renewJobLock($,Y,X){return CN($,Y,this.contextFactory.getLockContext(),X)}renewJobLockBatch($){return PQ0($,this.contextFactory.getLockContext())}releaseLock($,Y){return X2($,this.contextFactory.getLockContext(),Y)}getLockInfo($){return Jl($,this.contextFactory.getLockContext())}registerClientJob($,Y){wQ0($,Y,this.contextFactory.getLockContext())}unregisterClientJob($,Y){_Q0($,Y,this.contextFactory.getLockContext())}releaseClientJobs($){return jQ0($,this.contextFactory.getLockContext())}forceReleaseClientJobs($){return TQ0($,this.contextFactory.getLockContext())}async getJob($){return Ro0($,this.contextFactory.getQueryContext())}async getJobState($){return wo0($,this.contextFactory.getQueryContext())}getResult($){return MQ0($,this.contextFactory.getQueryContext())}async getChildrenValues($){let Y=await this.getJob($);if(!Y?.childrenIds||Y.childrenIds.length===0)return{};let X=this.contextFactory.getQueryContext(),G={};for(let J of Y.childrenIds){let Q=MQ0(J,X);if(Q!==void 0){let W=await this.getJob(J),K=W?`${W.queue}:${J}`:J;G[K]=Q}}return G}async updateJobParent($,Y){let X=await this.getJob($);if(!X)return;X.parentId=Y;let G=X.data;G.__parentId=Y,G.__parentQueue=X.queue;let J=await this.getJob(Y);if(J){if(!J.childrenIds)J.childrenIds=[];if(!J.childrenIds.includes($))J.childrenIds.push($)}if(this.storage){if(this.storage.updateJobData($,X.data),J)this.storage.updateJobChildrenIds(Y,J.childrenIds)}let Q=this.jobIndex.get($);if(Q?.type==="dlq"&&X.failParentOnFailure)this.moveParentToFailed(Y,X,"Child job failed").catch(()=>{});if(Q?.type==="dlq"&&(X.removeDependencyOnFailure||X.ignoreDependencyOnFailure||X.continueParentOnFailure))this.onChildDependencyOption(X,"Child job failed")}getJobByCustomId($){return qo0($,this.contextFactory.getQueryContext())}getProgress($){return Po0($,this.contextFactory.getQueryContext())}count($){return Vo0($,this.contextFactory.getQueueControlContext())}pause($){Wo0($,this.contextFactory.getQueueControlContext()),this.dashboardEmit?.("queue:paused",{queue:$}),this.eventsManager.broadcast({eventType:"paused",queue:$,jobId:"",timestamp:Date.now()})}resume($){Ko0($,this.contextFactory.getQueueControlContext()),this.dashboardEmit?.("queue:resumed",{queue:$}),this.eventsManager.broadcast({eventType:"resumed",queue:$,jobId:"",timestamp:Date.now()})}isPaused($){return Zo0($,this.contextFactory.getQueueControlContext())}drain($){let Y=Uo0($,this.contextFactory.getQueueControlContext());if(Y>0)this.dashboardEmit?.("queue:drained",{queue:$,count:Y});return Y}obliterate($){Ho0($,this.contextFactory.getQueueControlContext()),RQ0($,this.contextFactory.getDlqContext());let Y=new Set;for(let[J,Q]of this.jobIndex)if(Q.type==="processing"){if(this.processingShards[Q.shardIdx]?.get(J)?.queue===$)Y.add(J)}else if(Q.queueName===$)Y.add(J);for(let J of Y){let Q=this.jobIndex.get(J);if(Q?.type==="processing")this.processingShards[Q.shardIdx]?.delete(J);this.jobIndex.delete(J),this.completedJobs.delete(J),this.completedJobsData.delete(J),this.jobResults.delete(J),this.jobLogs.delete(J),this.jobLocks.delete(J),this.failedChildrenValues.delete(J),this.ignoredChildrenFailures.delete(J),this.pendingDepChecks.delete(J),this.stalledCandidates.delete(J),this.repeatChain.delete(J),this.storage?.deleteJob(J)}let X=[];for(let[J,Q]of this.repeatChain)if(Y.has(Q))X.push(J);for(let J of X)this.repeatChain.delete(J);let G=[];for(let[J,Q]of this.customIdMap.entries())if(Y.has(Q))G.push(J);for(let J of G)this.customIdMap.delete(J);this.unregisterQueueName($),this.dashboardEmit?.("queue:obliterated",{queue:$}),this.dashboardEmit?.("queue:removed",{queue:$})}listQueues(){return Array.from(this.queueNamesCache)}registerQueueName($){let Y=!this.queueNamesCache.has($);if(this.queueNamesCache.add($),Y)this.dashboardEmit?.("queue:created",{queue:$})}unregisterQueueName($){this.queueNamesCache.delete($)}clean($,Y,X,G){return zo0($,Y,this.contextFactory.getQueueControlContext(),X,G)}getCountsPerPriority($){let Y=l1($),X=this.shards[Y].getCountsPerPriority($);return Object.fromEntries(X)}getJobs($,Y={}){let X=l1($);return _o0($,X,Y,{...this.contextFactory.getQueryContext(),shardCount:E$})}getDlq($,Y){return To0($,this.contextFactory.getDlqContext(),Y)}getDlqEntries($,Y){return ec($,this.contextFactory.getDlqContext(),Y)}getDlqCount($){return this.shards[l1($)].getDlqCount($)}getDlqStats($){return $l($,this.contextFactory.getDlqContext())}retryDlq($,Y){return Io0($,this.contextFactory.getDlqContext(),Y)}purgeDlq($){return RQ0($,this.contextFactory.getDlqContext())}retryCompleted($,Y){return yo0($,this.contextFactory.getRetryCompletedContext(),Y)}setRateLimit($,Y){this.shards[l1($)].setRateLimit($,Y)}clearRateLimit($){this.shards[l1($)].clearRateLimit($)}setConcurrency($,Y){this.shards[l1($)].setConcurrency($,Y)}clearConcurrency($){this.shards[l1($)].clearConcurrency($)}getQueueLimits($){let Y=this.shards[l1($)].getState($);return{rateLimit:Y.rateLimit,concurrencyLimit:Y.concurrencyLimit}}getAllJobResults(){let $=new Map;for(let[Y,X]of this.jobResults.entries())$.set(Y,X);return $}getAllJobLogs(){let $=new Map;for(let[Y,X]of this.jobLogs.entries())$.set(Y,X);return $}getAllJobLocks(){return this.jobLocks}setStallConfig($,Y){this.shards[l1($)].setStallConfig($,Y)}getStallConfig($){return this.shards[l1($)].getStallConfig($)}setDlqConfig($,Y){this.shards[l1($)].setDlqConfig($,Y)}getDlqConfig($){return this.shards[l1($)].getDlqConfig($)}getCloudTelemetry($){let Y={};for(let X of $){let G=l1(X),J=this.shards[G],Q=J.uniqueKeys.get(X),W=J.activeGroups.get(X),K=0;for(let H of J.waitingDeps.values())if(H.queue===X)K++;let Z=0;for(let H of J.waitingChildren.values())if(H.queue===X)Z++;Y[X]={uniqueKeys:Q?.size??0,activeGroups:W?.size??0,waitingDeps:K,waitingChildren:Z}}return{perQueue:Y,eventSubscribers:this.eventsManager.subscriberCount,pendingDepChecks:this.pendingDepChecks.size}}async cancel($){return Fo0($,this.contextFactory.getJobMgmtContext())}async updateProgress($,Y,X){return Lo0($,Y,this.contextFactory.getJobMgmtContext(),X)}async updateJobData($,Y){return Do0($,Y,this.contextFactory.getJobMgmtContext())}async changePriority($,Y){return No0($,Y,this.contextFactory.getJobMgmtContext())}async promote($){return Ao0($,this.contextFactory.getJobMgmtContext())}async moveToDelayed($,Y){return OQ0($,Y,this.contextFactory.getJobMgmtContext())}async changeDelay($,Y){let X=this.contextFactory.getJobMgmtContext();if(X.jobIndex.get($)?.type==="queue")return EQ0($,Y,X);return OQ0($,Y,X)}async moveActiveToWait($){return Oo0($,this.contextFactory.getJobMgmtContext())}async changeWaitingDelay($,Y){return EQ0($,Y,this.contextFactory.getJobMgmtContext())}async moveToWaitingChildren($){return Eo0($,this.contextFactory.getJobMgmtContext())}async extendLock($,Y,X){let G=typeof $==="string"?$:$,J=this.contextFactory.getLockContext();if(Y)return CN(G,Y,J,X);let Q=Jl(G,J);if(Q)return CN(G,Q.token,J,X);return!1}async discard($){return Bo0($,this.contextFactory.getJobMgmtContext())}addLog($,Y,X="info"){return bo0($,Y,this.contextFactory.getLogsContext(),X)}getLogs($){return ho0($,this.contextFactory.getLogsContext())}clearLogs($,Y){fo0($,this.contextFactory.getLogsContext(),Y)}getPerQueueStats(){return oo0(this.contextFactory.getStatsContext(),this.queueNamesCache)}getPrometheusMetrics(){return go0(this.getStats(),this.workerManager,this.webhookManager,this.getPerQueueStats())}addCron($){if($.preventOverlap){let X=$.uniqueKey??`cron:${$.name}`;this.removeOrphanedCronJob($.queue,X)}let Y=this.cronScheduler.add($);return this.storage?.saveCron(Y),Y}removeOrphanedCronJob($,Y){let X=l1($),G=this.shards[X],J=G.getUniqueKeyEntry($,Y);if(!J)return;let Q=J.jobId;if(this.jobIndex.get(Q)?.type!=="queue")return;if(G.getQueue($).remove(Q))G.decrementQueued(Q),G.releaseUniqueKey($,Y),this.jobIndex.delete(Q),this.storage?.deleteJob(Q)}removeCron($){let Y=this.cronScheduler.remove($);if(Y)this.storage?.deleteCron($);return Y}getCron($){return this.cronScheduler.get($)}listCrons(){return this.cronScheduler.list()}setDashboardEmit($){if(this.dashboardEmit=$,this.cronScheduler.setDashboardEmit($),this.webhookManager.setDashboardEmit($),this.workerManager.setDashboardEmit($),this.recoveryStats)$("server:recovered",this.recoveryStats),this.recoveryStats=null}emitDashboardEvent($,Y){this.dashboardEmit?.($,Y)}subscribe($){return this.eventsManager.subscribe($)}waitForJobCompletion($,Y){return this.eventsManager.waitForJobCompletion($,Y)}registerWorker($,Y,X,G){let J=this.workerManager.register($,Y,X,G);return this.dashboardEmit?.("worker:connected",{workerId:J.id,name:J.name,queues:J.queues,hostname:J.hostname,pid:J.pid}),J}unregisterWorker($){let Y=this.workerManager.unregister($);if(Y)this.dashboardEmit?.("worker:disconnected",{workerId:$});return Y}unregisterWorkersByClientId($){return this.workerManager.unregisterByClientId($)}getJobIndex(){return this.jobIndex}getCompletedJobs(){return this.completedJobs}getShards(){return this.shards}onJobCompleted($){this.pendingDepChecks.add($),this.scheduleDependencyFlush(),this.checkFlowCompleted($)}async checkFlowCompleted($){let Y=await this.getJob($);if(!Y?.parentId)return;let X=await this.getJob(Y.parentId);if(!X?.childrenIds||X.childrenIds.length===0)return;if(X.childrenIds.every((J)=>this.completedJobs.has(J)))this.dashboardEmit?.("flow:completed",{parentJobId:String(X.id),queue:X.queue,childrenCount:X.childrenIds.length})}failParentOnChildFailure($,Y){let X=$.parentId;if(!X)return;this.moveParentToFailed(X,$,Y).catch(()=>{})}async moveParentToFailed($,Y,X){let G=await this.getJob($);if(!G)return;let J=this.jobIndex.get($);if(!J)return;if(J.type!=="queue")return;let Q=l1(G.queue);await v4(this.shardLocks[Q],()=>{if(this.jobIndex.get($)?.type!=="queue")return;let W=this.shards[Q];if(W.waitingDeps.has($))W.waitingDeps.delete($),W.unregisterDependencies($,G.dependsOn);if(W.waitingChildren.has($))W.waitingChildren.delete($);let K=W.getQueue(G.queue);if(K.find($))K.remove($),W.decrementQueued($);let Z=`Child job ${Y.id} failed: ${X??"unknown error"}`,H=W.addToDlq(G,"unknown",Z);this.jobIndex.set($,{type:"dlq",queueName:G.queue}),this.storage?.saveDlqEntry(H),this.storage?.deleteJob($)}),this.eventsManager.broadcast({eventType:"failed",queue:G.queue,jobId:$,timestamp:Date.now(),error:`Child job ${Y.id} failed: ${X??"unknown error"}`,data:G.data}),this.dashboardEmit?.("flow:failed",{parentJobId:String($),failedChildId:String(Y.id),queue:G.queue,error:X??"Child job failed"})}onChildDependencyOption($,Y){if(!$.parentId)return;if($.continueParentOnFailure)this.continueParentOnChildFailure($,Y).catch(()=>{});else this.removeChildFromParentDeps($,Y,$.ignoreDependencyOnFailure).catch(()=>{})}async continueParentOnChildFailure($,Y){let X=$.parentId;if(!X)return;let G=await this.getJob(X);if(!G)return;if(this.jobIndex.get(X)?.type!=="queue")return;let Q=`${$.queue}:${$.id}`,W=this.failedChildrenValues.get(X)??{};W[Q]=Y??"unknown error",this.failedChildrenValues.set(X,W);let K=l1(G.queue),Z=!1;if(await v4(this.shardLocks[K],()=>{if(this.jobIndex.get(X)?.type!=="queue")return;let H=this.shards[K];if(H.waitingDeps.has(X))H.waitingDeps.delete(X),H.unregisterDependencies(X,G.dependsOn);if(H.waitingChildren.has(X))H.waitingChildren.delete(X);let z=H.getQueue(G.queue);if(!z.find(X)){let V=Date.now();G.runAt=V,z.push(G),H.incrementQueued(X,!1,G.createdAt,G.queue,V),this.jobIndex.set(X,{type:"queue",shardIdx:K,queueName:G.queue}),H.notify(),Z=!0}}),Z)this.eventsManager.broadcast({eventType:"waiting",queue:G.queue,jobId:X,timestamp:Date.now(),prev:"waiting-children"})}async removeChildFromParentDeps($,Y,X){let G=$.parentId;if(!G)return;let J=await this.getJob(G);if(!J)return;if(this.jobIndex.get(G)?.type!=="queue")return;if(X){let Z=`${$.queue}:${$.id}`,H=this.ignoredChildrenFailures.get(G)??{};H[Z]=Y??"unknown error",this.ignoredChildrenFailures.set(G,H)}let W=l1(J.queue),K=!1;if(await v4(this.shardLocks[W],()=>{if(this.jobIndex.get(G)?.type!=="queue")return;let Z=this.shards[W];if(!Z.waitingDeps.get(G))return;let z=J.dependsOn.indexOf($.id);if(z!==-1)J.dependsOn.splice(z,1),Z.unregisterDependencies(G,[$.id]);if(J.dependsOn.length===0||J.dependsOn.every((F)=>this.completedJobs.has(F))){Z.waitingDeps.delete(G);let F=Date.now();J.runAt=F,Z.getQueue(J.queue).push(J),Z.incrementQueued(G,!1,J.createdAt,J.queue,F),this.jobIndex.set(G,{type:"queue",shardIdx:W,queueName:J.queue}),Z.notify(),K=!0}}),K)this.eventsManager.broadcast({eventType:"waiting",queue:J.queue,jobId:G,timestamp:Date.now(),prev:"waiting-children"})}async getFailedChildrenValues($){return this.failedChildrenValues.get($)??{}}async getIgnoredChildrenFailures($){return this.ignoredChildrenFailures.get($)??{}}async removeChildDependency($){let Y=await this.getJob($);if(!Y)throw Error(`Job not found: ${$}`);if(!Y.parentId)throw Error(`Job ${$} has no parent`);let X=Y.parentId,G=await this.getJob(X);if(!G)return!1;if(this.jobIndex.get(X)?.type!=="queue")return!1;let Q=l1(G.queue),W=!1;if(await v4(this.shardLocks[Q],()=>{if(this.jobIndex.get(X)?.type!=="queue")return;let K=this.shards[Q];if(!K.waitingDeps.get(X))return;let H=G.dependsOn.indexOf($);if(H!==-1)G.dependsOn.splice(H,1),K.unregisterDependencies(X,[$]);if(G.dependsOn.length===0||G.dependsOn.every((V)=>this.completedJobs.has(V))){K.waitingDeps.delete(X);let V=Date.now();G.runAt=V,K.getQueue(G.queue).push(G),K.incrementQueued(X,!1,G.createdAt,G.queue,V),this.jobIndex.set(X,{type:"queue",shardIdx:Q,queueName:G.queue}),K.notify(),W=!0}}),W)this.eventsManager.broadcast({eventType:"waiting",queue:G.queue,jobId:X,timestamp:Date.now(),prev:"waiting-children"});return!0}async removeUnprocessedChildren($){let Y=await this.getJob($);if(!Y?.childrenIds||Y.childrenIds.length===0)return;for(let X of Y.childrenIds)if(this.jobIndex.get(X)?.type==="queue")try{await this.cancel(X)}catch{}}onJobsCompleted($){for(let Y of $)this.pendingDepChecks.add(Y);this.scheduleDependencyFlush()}scheduleDependencyFlush(){if(this.depFlushScheduled)return;this.depFlushScheduled=!0,queueMicrotask(()=>{if(this.depFlushScheduled=!1,this.depFlushRunning)return;this.runDependencyFlush()})}async runDependencyFlush(){this.depFlushRunning=!0;try{while(this.pendingDepChecks.size>0)await Ql(this.contextFactory.getBackgroundContext()),jR("dependency")}catch($){_R("dependency",$)}finally{if(this.depFlushRunning=!1,this.pendingDepChecks.size>0)this.scheduleDependencyFlush()}}hasPendingDeps(){for(let $ of this.shards)if($.waitingDeps.size>0)return!0;return!1}getStats(){return ao0(this.contextFactory.getStatsContext(),this.cronScheduler)}getQueuesSummary(){let $=this.contextFactory.getStatsContext(),Y=this.listQueues(),X=[];for(let G of Y){let J=IQ0(G,$);X.push({name:G,paused:this.isPaused(G),counts:{waiting:J.waiting,active:J.active,completed:J.completed,failed:J.failed,delayed:J.delayed}})}return X}getQueueJobCounts($){return IQ0($,this.contextFactory.getStatsContext())}getMemoryStats(){return so0(this.contextFactory.getStatsContext())}getStorageStatus(){if(!this.storage)return{diskFull:!1,error:null,since:null};return this.storage.getDiskFullStatus()}compactMemory(){to0(this.contextFactory.getStatsContext()),this.dashboardEmit?.("memory:compacted",{})}shutdown(){if(this.cronScheduler.stop(),this.workerManager.stop(),this.eventsManager.clear(),this.backgroundTaskHandles)no0(this.backgroundTaskHandles);this.storage?.close(),this.jobIndex.clear(),this.completedJobs.clear(),this.completedJobsData.clear(),this.jobResults.clear(),this.jobLogs.clear(),this.customIdMap.clear(),this.pendingDepChecks.clear(),this.queueNamesCache.clear(),this.jobLocks.clear(),this.stalledCandidates.clear(),this.clientJobs.clear(),this.repeatChain.clear();for(let $ of this.processingShards)$.clear();for(let $ of this.shards)$.waitingDeps.clear(),$.dependencyIndex.clear(),$.waitingChildren.clear(),$.uniqueKeys.clear(),$.activeGroups.clear()}}var eo0=null;function _g4(){return Bun.env.BUNQUEUE_DATA_PATH??Bun.env.BQ_DATA_PATH??Bun.env.DATA_PATH??Bun.env.SQLITE_PATH}function b0($){return eo0??=new SQ0({dataPath:$??_g4()}),eo0}function Wl($){if(typeof $==="object"&&$!==null){let{name:Y,...X}=$;return X}return $}function $t0($){if(typeof $==="object"&&$!==null){let Y=$,X=Y.__parentId,G=Y.__parentQueue;if(X!==void 0&&G!==void 0&&(typeof X==="string"||typeof X==="number")&&(typeof G==="string"||typeof G==="number"))return{id:String(X),queueQualifiedName:String(G)}}return}function jg4($){if(!$)return;return{every:$.every,limit:$.limit,pattern:$.pattern,count:$.count,startDate:$.startDate,endDate:$.endDate,tz:$.tz,immediately:$.immediately,prevMillis:$.prevMillis,offset:$.offset,jobId:$.jobId}}function Tg4($){let Y=$.data,X=$.parentId??Y?.__parentId,G=Y?.__parentQueue,J=(Q)=>typeof Q==="string"||typeof Q==="number";if(J(X)&&J(G))return{id:String(X),queue:String(G)};return}function RS($){let Y=$.backoffConfig?{type:$.backoffConfig.type,delay:$.backoffConfig.delay}:$.backoff;return{priority:$.priority,delay:$.runAt>$.createdAt?$.runAt-$.createdAt:0,attempts:$.maxAttempts,backoff:Y,timeout:$.timeout??void 0,jobId:$.customId??void 0,removeOnComplete:$.removeOnComplete,removeOnFail:$.removeOnFail,stallTimeout:$.stallTimeout??void 0,repeat:jg4($.repeat),parent:Tg4($),lifo:$.lifo,stackTraceLimit:$.stackTraceLimit,keepLogs:$.keepLogs??void 0,sizeLimit:$.sizeLimit??void 0,failParentOnFailure:$.failParentOnFailure,removeDependencyOnFailure:$.removeDependencyOnFailure,deduplication:$.deduplicationTtl!==null?{id:$.customId??"",ttl:$.deduplicationTtl}:void 0,debounce:$.debounceId&&$.debounceTtl!==null?{id:$.debounceId,ttl:$.debounceTtl}:void 0}}function Kl($){if($.parentId){let X=$.data?.__parentQueue;if(X&&(typeof X==="string"||typeof X==="number"))return`${String(X)}:${$.parentId}`;return`unknown:${$.parentId}`}return}function Yt0($){if($.repeat){let Y=$.repeat.pattern??($.repeat.every?`every:${$.repeat.every}`:"");return`${$.queue}:${$.id}:${Y}`}return}function kQ0($,Y,X,G,J){let Q=String($.id),W=$t0($.data),K=RS($);return{id:Q,name:Y,data:Wl($.data),queueName:$.queue,attemptsMade:$.attempts,timestamp:$.createdAt,progress:$.progress,parent:W,delay:$.runAt>$.createdAt?$.runAt-$.createdAt:0,processedOn:$.startedAt??void 0,finishedOn:$.completedAt??void 0,stacktrace:X??null,stalledCounter:$.stallCount,priority:$.priority,parentKey:Kl($),opts:K,token:G,processedBy:J,deduplicationId:$.customId??void 0,repeatJobKey:Yt0($),attemptsStarted:$.attempts}}function vQ0($,Y,X){return{isWaiting:async()=>{return await(Y?Y($):Promise.resolve("unknown"))==="waiting"},isActive:async()=>{return await(Y?Y($):Promise.resolve("unknown"))==="active"},isDelayed:async()=>{return await(Y?Y($):Promise.resolve("unknown"))==="delayed"},isCompleted:async()=>{return await(Y?Y($):Promise.resolve("unknown"))==="completed"},isFailed:async()=>{return await(Y?Y($):Promise.resolve("unknown"))==="failed"},isWaitingChildren:async()=>{if(X)return(await X($)).unprocessed>0;return!1}}}function xQ0($,Y,X,G,J){return{toJSON:()=>({id:Y,name:X,data:Wl($.data),opts:G,progress:$.progress,delay:$.runAt>$.createdAt?$.runAt-$.createdAt:0,timestamp:$.createdAt,attemptsMade:$.attempts,stacktrace:J??null,returnvalue:void 0,failedReason:void 0,finishedOn:$.completedAt??void 0,processedOn:$.startedAt??void 0,queueQualifiedName:`bull:${$.queue}`,parentKey:Kl($)}),asJSON:()=>({id:Y,name:X,data:JSON.stringify(Wl($.data)),opts:JSON.stringify(G),progress:JSON.stringify($.progress),delay:String($.runAt>$.createdAt?$.runAt-$.createdAt:0),timestamp:String($.createdAt),attemptsMade:String($.attempts),stacktrace:J?JSON.stringify(J):null,returnvalue:void 0,failedReason:void 0,finishedOn:$.completedAt?String($.completedAt):void 0,processedOn:$.startedAt?String($.startedAt):void 0,parentKey:Kl($)})}}function Zl($){let{job:Y,name:X,updateProgress:G,log:J,getState:Q,remove:W,retry:K,getChildrenValues:Z,updateData:H,promote:z,changeDelay:V,changePriority:F,extendLock:L,clearLogs:N,getDependencies:D,getDependenciesCount:A,moveToCompleted:B,moveToFailed:O,moveToWait:E,moveToDelayed:M,moveToWaitingChildren:R,waitUntilFinished:q,discard:_,getFailedChildrenValues:P,getIgnoredChildrenFailures:w,removeChildDependency:j,removeDeduplicationKey:C,removeUnprocessedChildren:k,token:S,processedBy:I,stacktrace:v}=$,x=String(Y.id),y=RS(Y),d=kQ0(Y,X,v,S,I),u=vQ0(x,Q,A),b=xQ0(Y,x,X,y,v);return{...d,...u,...b,updateProgress:(g,p)=>G(x,g,p),log:(g)=>J(x,g),getState:()=>Q?Q(x):Promise.resolve("unknown"),remove:()=>W?W(x):Promise.resolve(),retry:()=>K?K(x):Promise.resolve(),getChildrenValues:()=>Z?Z(x):Promise.resolve({}),updateData:(g)=>H?H(x,g):Promise.resolve(),promote:()=>z?z(x):Promise.resolve(),changeDelay:(g)=>V?V(x,g):Promise.resolve(),changePriority:(g)=>F?F(x,g):Promise.resolve(),extendLock:(g,p)=>L?L(x,g,p):Promise.resolve(0),clearLogs:(g)=>N?N(x,g):Promise.resolve(),getDependencies:(g)=>D?D(x,g):Promise.resolve({processed:{},unprocessed:[]}),getDependenciesCount:(g)=>A?A(x,g):Promise.resolve({processed:0,unprocessed:0}),moveToCompleted:(g,p,h)=>B?B(x,g,p):Promise.resolve(null),moveToFailed:(g,p,h)=>O?O(x,g,p):Promise.resolve(),moveToWait:(g)=>E?E(x,g):Promise.resolve(!1),moveToDelayed:(g,p)=>M?M(x,g,p):Promise.resolve(),moveToWaitingChildren:(g,p)=>R?R(x,g,p):Promise.resolve(!1),waitUntilFinished:(g,p)=>q?q(x,g,p):Promise.resolve(void 0),discard:()=>{if(_)_(x)},getFailedChildrenValues:()=>P?P(x):Promise.resolve({}),getIgnoredChildrenFailures:()=>w?w(x):Promise.resolve({}),removeChildDependency:()=>j?j(x):Promise.resolve(!1),removeDeduplicationKey:()=>C?C(x):Promise.reject(Error("removeDeduplicationKey is not implemented \u2014 no server primitive available")),removeUnprocessedChildren:()=>k?k(x):Promise.resolve()}}function mV($){let{job:Y,name:X,getState:G,remove:J,retry:Q,getChildrenValues:W,updateData:K,promote:Z,changeDelay:H,changePriority:z,extendLock:V,clearLogs:F,getDependencies:L,getDependenciesCount:N,moveToCompleted:D,moveToFailed:A,moveToWait:B,moveToDelayed:O,moveToWaitingChildren:E,waitUntilFinished:M,discard:R,getFailedChildrenValues:q,getIgnoredChildrenFailures:_,removeChildDependency:P,removeDeduplicationKey:w,removeUnprocessedChildren:j,stacktrace:C}=$,k=String(Y.id),S=RS(Y),I=kQ0(Y,X,C,void 0,void 0),v=vQ0(k,G,N),x=xQ0(Y,k,X,S,C);return{...I,...v,...x,updateProgress:async()=>{},log:async()=>{},getState:()=>G?G(k):Promise.resolve("unknown"),remove:()=>J?J(k):Promise.resolve(),retry:()=>Q?Q(k):Promise.resolve(),getChildrenValues:()=>W?W(k):Promise.resolve({}),updateData:(y)=>K?K(k,y):Promise.resolve(),promote:()=>Z?Z(k):Promise.resolve(),changeDelay:(y)=>H?H(k,y):Promise.resolve(),changePriority:(y)=>z?z(k,y):Promise.resolve(),extendLock:(y,d)=>V?V(k,y,d):Promise.resolve(0),clearLogs:(y)=>F?F(k,y):Promise.resolve(),getDependencies:(y)=>L?L(k,y):Promise.resolve({processed:{},unprocessed:[]}),getDependenciesCount:(y)=>N?N(k,y):Promise.resolve({processed:0,unprocessed:0}),moveToCompleted:(y,d,u)=>D?D(k,y,d):Promise.resolve(null),moveToFailed:(y,d,u)=>A?A(k,y,d):Promise.resolve(),moveToWait:(y)=>B?B(k,y):Promise.resolve(!1),moveToDelayed:(y,d)=>O?O(k,y,d):Promise.resolve(),moveToWaitingChildren:(y,d)=>E?E(k,y,d):Promise.resolve(!1),waitUntilFinished:(y,d)=>M?M(k,y,d):Promise.resolve(void 0),discard:()=>{if(R)R(k)},getFailedChildrenValues:()=>q?q(k):Promise.resolve({}),getIgnoredChildrenFailures:()=>_?_(k):Promise.resolve({}),removeChildDependency:()=>P?P(k):Promise.resolve(!1),removeDeduplicationKey:()=>w?w(k):Promise.reject(Error("removeDeduplicationKey is not implemented \u2014 no server primitive available")),removeUnprocessedChildren:()=>j?j(k):Promise.resolve()}}function yQ0($){let Y=$.job.data;return{job:mV({job:$.job,name:Y?.name??"default"}),enteredAt:$.enteredAt,reason:$.reason,error:$.error,attempts:$.attempts.map((X)=>({attempt:X.attempt,startedAt:X.startedAt,failedAt:X.failedAt,reason:X.reason,error:X.error,duration:X.duration})),retryCount:$.retryCount,lastRetryAt:$.lastRetryAt,nextRetryAt:$.nextRetryAt,expiresAt:$.expiresAt}}function bQ0($,Y,X,G){let{tcp:J,queueName:Q}=G,W=Date.now();return{id:$,name:Y,data:X,queueName:Q,attemptsMade:0,timestamp:W,progress:0,delay:0,processedOn:void 0,finishedOn:void 0,stacktrace:null,stalledCounter:0,priority:0,parentKey:void 0,opts:{},token:void 0,processedBy:void 0,deduplicationId:void 0,repeatJobKey:void 0,attemptsStarted:0,updateProgress:async(K,Z)=>{await J.send({cmd:"Progress",id:$,progress:K,message:Z})},log:async(K)=>{await J.send({cmd:"AddLog",id:$,message:K})},getState:()=>G.getJobState($),remove:()=>G.removeAsync($),retry:()=>G.retryJob($),getChildrenValues:()=>G.getChildrenValues($),isWaiting:async()=>await G.getJobState($)==="waiting",isActive:async()=>await G.getJobState($)==="active",isDelayed:async()=>await G.getJobState($)==="delayed",isCompleted:async()=>await G.getJobState($)==="completed",isFailed:async()=>await G.getJobState($)==="failed",isWaitingChildren:async()=>await G.getJobState($)==="waiting-children",updateData:async(K)=>{await J.send({cmd:"Update",id:$,data:K})},promote:async()=>{await J.send({cmd:"Promote",id:$})},changeDelay:async(K)=>{await J.send({cmd:"ChangeDelay",id:$,delay:K})},changePriority:async(K)=>{await J.send({cmd:"ChangePriority",id:$,priority:K.priority})},extendLock:async(K,Z)=>{return(await J.send({cmd:"ExtendLock",id:$,token:K,duration:Z})).ok===!0?Z:0},clearLogs:async()=>{await J.send({cmd:"ClearLogs",id:$})},getDependencies:()=>Xt0($,Q,J),getDependenciesCount:async()=>{let K=await Xt0($,Q,J);return{processed:Object.keys(K.processed).length,unprocessed:K.unprocessed.length}},toJSON:()=>({id:$,name:Y,data:X,opts:{},progress:0,delay:0,timestamp:W,attemptsMade:0,stacktrace:null,queueQualifiedName:`bull:${Q}`}),asJSON:()=>({id:$,name:Y,data:JSON.stringify(X),opts:"{}",progress:"0",delay:"0",timestamp:String(W),attemptsMade:"0",stacktrace:null}),moveToCompleted:async(K)=>{return await J.send({cmd:"ACK",id:$,result:K}),null},moveToFailed:async(K)=>{await J.send({cmd:"FAIL",id:$,error:K.message})},moveToWait:async()=>{return(await J.send({cmd:"MoveToWait",id:$})).ok===!0},moveToDelayed:async(K)=>{let Z=Math.max(0,K-Date.now());await J.send({cmd:"MoveToDelayed",id:$,delay:Z})},moveToWaitingChildren:()=>{return Promise.reject(Error("moveToWaitingChildren is not supported in TCP mode \u2014 no server command available"))},waitUntilFinished:async(K,Z)=>{let H=Z??30000,V=await J.send({cmd:"WaitJob",id:$,timeout:H});if(!V.completed)throw Error(`waitUntilFinished timed out after ${H}ms`);return V.result},discard:()=>{J.send({cmd:"Discard",id:$})},getFailedChildrenValues:async()=>{return(await J.send({cmd:"GetFailedChildrenValues",id:$})).values??{}},getIgnoredChildrenFailures:async()=>{return(await J.send({cmd:"GetIgnoredChildrenFailures",id:$})).values??{}},removeChildDependency:async()=>{return(await J.send({cmd:"RemoveChildDependency",id:$})).removed??!1},removeDeduplicationKey:()=>Promise.reject(Error("removeDeduplicationKey is not implemented \u2014 no server primitive available")),removeUnprocessedChildren:async()=>{await J.send({cmd:"RemoveUnprocessedChildren",id:$})}}}async function Xt0($,Y,X){let Q=(await X.send({cmd:"GetJob",id:$})).job?.childrenIds??[],W={},K=[];for(let Z of Q){let z=(await X.send({cmd:"GetState",id:Z})).state??"unknown",V=`${Y}:${Z}`;if(z==="completed"||z==="failed")if(z==="completed"){let F=await X.send({cmd:"GetResult",id:Z});W[V]=F.result??null}else W[V]=null;else K.push(V)}return{processed:W,unprocessed:K}}function SN($,Y,X,G,J){let{queueName:Q,embedded:W,tcp:K}=J;return{id:$,name:Y,data:X,queueName:Q,attemptsMade:0,timestamp:G,progress:0,delay:0,processedOn:void 0,finishedOn:void 0,stacktrace:null,stalledCounter:0,priority:0,parentKey:void 0,opts:{},token:void 0,processedBy:void 0,deduplicationId:void 0,repeatJobKey:void 0,attemptsStarted:0,updateProgress:async(Z,H)=>{if(W){await b0().updateProgress(d0($),Z,H);return}if(K)await K.send({cmd:"Progress",id:$,progress:Z,message:H})},log:async(Z)=>{if(W){b0().addLog(d0($),Z);return}if(K)await K.send({cmd:"AddLog",id:$,message:Z})},getState:()=>J.getJobState($),remove:()=>J.removeAsync($),retry:()=>J.retryJob($),getChildrenValues:()=>J.getChildrenValues($),isWaiting:async()=>await J.getJobState($)==="waiting",isActive:async()=>await J.getJobState($)==="active",isDelayed:async()=>await J.getJobState($)==="delayed",isCompleted:async()=>await J.getJobState($)==="completed",isFailed:async()=>await J.getJobState($)==="failed",isWaitingChildren:async()=>await J.getJobState($)==="waiting-children",updateData:async(Z)=>{if(W){await b0().updateJobData(d0($),Z);return}if(K)await K.send({cmd:"Update",id:$,data:Z})},promote:async()=>{if(W){await b0().promote(d0($));return}if(K)await K.send({cmd:"Promote",id:$})},changeDelay:async(Z)=>{if(W){await b0().changeDelay(d0($),Z);return}if(K)await K.send({cmd:"ChangeDelay",id:$,delay:Z})},changePriority:async(Z)=>{if(W){await b0().changePriority(d0($),Z.priority);return}if(K)await K.send({cmd:"ChangePriority",id:$,priority:Z.priority})},extendLock:async(Z,H)=>{if(W)return await b0().extendLock(d0($),Z,H)?H:0;if(!K)return 0;return(await K.send({cmd:"ExtendLock",id:$,token:Z,duration:H})).ok===!0?H:0},clearLogs:async(Z)=>{if(W){b0().clearLogs(d0($),Z);return}if(K)await K.send({cmd:"ClearLogs",id:$,keepLogs:Z})},getDependencies:()=>Gt0($,Q,W,K),getDependenciesCount:async()=>{let Z=await Gt0($,Q,W,K);return{processed:Object.keys(Z.processed).length,unprocessed:Z.unprocessed.length}},toJSON:()=>({id:$,name:Y,data:X,opts:{},progress:0,delay:0,timestamp:G,attemptsMade:0,stacktrace:null,queueQualifiedName:`bull:${Q}`}),asJSON:()=>({id:$,name:Y,data:JSON.stringify(X),opts:"{}",progress:"0",delay:"0",timestamp:String(G),attemptsMade:"0",stacktrace:null}),moveToCompleted:async(Z)=>{if(W)return await b0().ack(d0($),Z),null;if(K)await K.send({cmd:"ACK",id:$,result:Z});return null},moveToFailed:async(Z)=>{if(W){await b0().fail(d0($),Z.message);return}if(K)await K.send({cmd:"FAIL",id:$,error:Z.message})},moveToWait:async()=>{if(W){let H=b0(),z=await H.getJobState(d0($));if(z==="active")return await H.moveActiveToWait(d0($));if(z==="delayed")return await H.promote(d0($));if(z==="failed"){let V=await H.getJob(d0($));if(!V)return!1;return H.retryDlq(V.queue,d0($))>0}if(z==="waiting"||z==="prioritized")return!0;return!1}if(!K)return!1;return(await K.send({cmd:"MoveToWait",id:$})).ok===!0},moveToDelayed:async(Z)=>{let H=Math.max(0,Z-Date.now());if(W){await b0().moveToDelayed(d0($),H);return}if(K)await K.send({cmd:"MoveToDelayed",id:$,delay:H})},moveToWaitingChildren:async()=>{if(W)return await b0().moveToWaitingChildren(d0($));throw Error("moveToWaitingChildren is not supported in TCP mode \u2014 no server command available")},waitUntilFinished:async(Z,H)=>{let z=H??30000;if(W){let L=b0(),N=await L.getJob(d0($));if(!N)throw Error(`Job ${$} not found`);if(N.completedAt)return L.getResult(d0($));if(!await L.waitForJobCompletion(d0($),z))throw Error(`waitUntilFinished timed out after ${z}ms`);return L.getResult(d0($))}if(!K)throw Error("waitUntilFinished: no connection");let F=await K.send({cmd:"WaitJob",id:$,timeout:z});if(!F.completed)throw Error(`waitUntilFinished timed out after ${z}ms`);return F.result},discard:()=>{if(W){b0().discard(d0($));return}if(K)K.send({cmd:"Discard",id:$})},getFailedChildrenValues:async()=>{if(W)return await b0().getFailedChildrenValues(d0($));if(!K)return{};return(await K.send({cmd:"GetFailedChildrenValues",id:$})).values??{}},getIgnoredChildrenFailures:async()=>{if(W)return await b0().getIgnoredChildrenFailures(d0($));if(!K)return{};return(await K.send({cmd:"GetIgnoredChildrenFailures",id:$})).values??{}},removeChildDependency:async()=>{if(W)return await b0().removeChildDependency(d0($));if(!K)return!1;return(await K.send({cmd:"RemoveChildDependency",id:$})).removed??!1},removeDeduplicationKey:()=>Promise.reject(Error("removeDeduplicationKey is not implemented \u2014 no server primitive available")),removeUnprocessedChildren:async()=>{if(W){await b0().removeUnprocessedChildren(d0($));return}if(K)await K.send({cmd:"RemoveUnprocessedChildren",id:$})}}}async function Gt0($,Y,X,G){let J={},Q=[],W=[];if(X)W=((await b0().getJob(d0($)))?.childrenIds??[]).map(String);else if(G)W=((await G.send({cmd:"GetJob",id:$})).job?.childrenIds??[]).map(String);for(let K of W){let Z="unknown",H;if(X){let V=b0();if(Z=await V.getJobState(d0(K)),Z==="completed")H=V.getResult(d0(K))}else if(G){if(Z=(await G.send({cmd:"GetState",id:K})).state??"unknown",Z==="completed")H=(await G.send({cmd:"GetResult",id:K})).result}let z=`${Y}:${K}`;if(Z==="completed"||Z==="failed")J[z]=H??null;else Q.push(z)}return{processed:J,unprocessed:Q}}async function Jt0($,Y,X,G={}){let J={...$.opts.defaultJobOptions,...G},Q={name:Y,...X};if(J.parent)Q.__parentId=J.parent.id,Q.__parentQueue=J.parent.queue;if($.embedded){let H=b0(),z=typeof J.removeOnComplete==="boolean"?J.removeOnComplete:!1,V=typeof J.removeOnFail==="boolean"?J.removeOnFail:!1,F=J.repeat?{every:J.repeat.every,limit:J.repeat.limit,pattern:J.repeat.pattern,count:J.repeat.count,startDate:Ul(J.repeat.startDate),endDate:Ul(J.repeat.endDate),tz:J.repeat.tz,immediately:J.repeat.immediately,prevMillis:J.repeat.prevMillis,offset:J.repeat.offset,jobId:J.repeat.jobId}:void 0,L=await H.push($.name,{data:Q,priority:J.priority,delay:J.delay,maxAttempts:J.attempts,backoff:J.backoff,ttl:J.ttl,timeout:J.timeout,uniqueKey:J.deduplication?.id,customId:J.jobId??J.deduplication?.id,dependsOn:J.dependsOn?.map((N)=>d0(N)),tags:J.tags,groupId:J.groupId,dedup:J.deduplication?{ttl:J.deduplication.ttl,extend:J.deduplication.extend,replace:J.deduplication.replace}:void 0,lifo:J.lifo,removeOnComplete:z,removeOnFail:V,stallTimeout:J.stallTimeout,durable:J.durable,repeat:F,parentId:J.parent?d0(J.parent.id):void 0,stackTraceLimit:J.stackTraceLimit,keepLogs:J.keepLogs,sizeLimit:J.sizeLimit,failParentOnFailure:J.failParentOnFailure,removeDependencyOnFailure:J.removeDependencyOnFailure,debounceId:J.debounce?.id,debounceTtl:J.debounce?.ttl});return mV({job:L,name:Y,getState:(N)=>$.getJobState(N),remove:(N)=>$.removeAsync(N),retry:(N)=>$.retryJob(N),getChildrenValues:(N)=>$.getChildrenValues(N),updateData:(N,D)=>$.updateJobData(N,D),promote:(N)=>$.promoteJob(N),changeDelay:(N,D)=>$.changeJobDelay(N,D),changePriority:(N,D)=>$.changeJobPriority(N,D),extendLock:(N,D,A)=>$.extendJobLock(N,D,A),clearLogs:(N,D)=>$.clearJobLogs(N,D),getDependencies:(N,D)=>$.getJobDependencies(N,D),getDependenciesCount:(N,D)=>$.getJobDependenciesCount(N,D),moveToCompleted:(N,D,A)=>$.moveJobToCompleted(N,D,A),moveToFailed:(N,D,A)=>$.moveJobToFailed(N,D,A),moveToWait:(N,D)=>$.moveJobToWait(N,D),moveToDelayed:(N,D,A)=>$.moveJobToDelayed(N,D,A),moveToWaitingChildren:(N,D,A)=>$.moveJobToWaitingChildren(N,D,A),waitUntilFinished:(N,D,A)=>$.waitJobUntilFinished(N,D,A)})}let W=$.tcp,K=await W.send({cmd:"PUSH",queue:$.name,data:Q,priority:J.priority,delay:J.delay,maxAttempts:J.attempts,backoff:J.backoff,timeout:J.timeout,jobId:J.jobId,removeOnComplete:J.removeOnComplete,removeOnFail:J.removeOnFail,stallTimeout:J.stallTimeout,durable:J.durable,repeat:J.repeat,parentId:J.parent?.id});if(!K.ok)throw Error(K.error??"Failed to add job");let Z=K.id;return bQ0(Z,Y,X,{queueName:$.name,tcp:W,getJobState:$.getJobState,removeAsync:$.removeAsync,retryJob:$.retryJob,getChildrenValues:$.getChildrenValues})}async function hQ0($,Y){if(Y.length===0)return[];let X=Date.now();if($.embedded){let K=b0(),Z=Y.map(({name:z,data:V,opts:F})=>{let L={...$.opts.defaultJobOptions,...F},N=typeof L.removeOnComplete==="boolean"?L.removeOnComplete:!1,D=typeof L.removeOnFail==="boolean"?L.removeOnFail:!1;return{data:{name:z,...V},priority:L.priority,delay:L.delay,maxAttempts:L.attempts,backoff:L.backoff,timeout:L.timeout,customId:L.jobId,removeOnComplete:N,removeOnFail:D,repeat:L.repeat?{every:L.repeat.every,limit:L.repeat.limit,pattern:L.repeat.pattern,count:L.repeat.count,startDate:Ul(L.repeat.startDate),endDate:Ul(L.repeat.endDate),tz:L.repeat.tz,immediately:L.repeat.immediately,prevMillis:L.repeat.prevMillis,offset:L.repeat.offset,jobId:L.repeat.jobId}:void 0,durable:L.durable,lifo:L.lifo,stackTraceLimit:L.stackTraceLimit,keepLogs:L.keepLogs,sizeLimit:L.sizeLimit,failParentOnFailure:L.failParentOnFailure,removeDependencyOnFailure:L.removeDependencyOnFailure,debounceId:L.debounce?.id,debounceTtl:L.debounce?.ttl}});return(await K.pushBatch($.name,Z)).map((z,V)=>SN(String(z),Y[V].name,Y[V].data,X,{queueName:$.name,embedded:$.embedded,tcp:$.tcp,getJobState:$.getJobState,removeAsync:$.removeAsync,retryJob:$.retryJob,getChildrenValues:$.getChildrenValues}))}let G=$.tcp,J=Y.map(({name:K,data:Z,opts:H})=>{let z={...$.opts.defaultJobOptions,...H};return{data:{name:K,...Z},priority:z.priority,delay:z.delay,maxAttempts:z.attempts,backoff:z.backoff,timeout:z.timeout,ttl:z.ttl,customId:z.jobId,tags:z.tags,groupId:z.groupId,uniqueKey:z.deduplication?.id,dedup:z.deduplication?{ttl:z.deduplication.ttl,extend:z.deduplication.extend,replace:z.deduplication.replace}:void 0,lifo:z.lifo,stallTimeout:z.stallTimeout,repeat:z.repeat,durable:z.durable,stackTraceLimit:z.stackTraceLimit,keepLogs:z.keepLogs,sizeLimit:z.sizeLimit,failParentOnFailure:z.failParentOnFailure,removeDependencyOnFailure:z.removeDependencyOnFailure,debounceId:z.debounce?.id,debounceTtl:z.debounce?.ttl}}),Q=await G.send({cmd:"PUSHB",queue:$.name,jobs:J});if(!Q.ok)return[];return(Q.ids??[]).map((K,Z)=>bQ0(K,Y[Z].name,Y[Z].data,{queueName:$.name,tcp:G,getJobState:$.getJobState,removeAsync:$.removeAsync,retryJob:$.retryJob,getChildrenValues:$.getChildrenValues}))}function Ul($){if($ instanceof Date)return $.getTime();if(typeof $==="string")return new Date($).getTime();return $}async function Wt0($,Y){if($.embedded){let W=await b0().getJob(d0(Y));if(!W)return null;let K=W.data?.name??"unknown";if($.updateJobData){let Z=b0();return mV({job:W,name:K,getState:(H)=>$.getJobState(H),remove:(H)=>$.removeAsync(H),retry:(H)=>$.retryJob(H),getChildrenValues:(H)=>$.getChildrenValues(H),updateData:$.updateJobData,promote:$.promoteJob,changeDelay:$.changeJobDelay,changePriority:$.changeJobPriority,extendLock:$.extendJobLock,clearLogs:$.clearJobLogs,getDependencies:$.getJobDependencies,getDependenciesCount:$.getJobDependenciesCount,moveToCompleted:$.moveJobToCompleted,moveToFailed:$.moveJobToFailed,moveToWait:$.moveJobToWait,moveToDelayed:$.moveJobToDelayed?(H,z,V)=>$.moveJobToDelayed(H,z,V):void 0,moveToWaitingChildren:$.moveJobToWaitingChildren,waitUntilFinished:$.waitJobUntilFinished,discard:(H)=>{Z.discard(d0(H))},getFailedChildrenValues:(H)=>Z.getFailedChildrenValues(d0(H)),getIgnoredChildrenFailures:(H)=>Z.getIgnoredChildrenFailures(d0(H)),removeChildDependency:(H)=>Z.removeChildDependency(d0(H)),removeUnprocessedChildren:async(H)=>{await Z.removeUnprocessedChildren(d0(H))}})}return SN(String(W.id),K,W.data,W.createdAt,{queueName:$.name,embedded:$.embedded,tcp:$.tcp,getJobState:$.getJobState,removeAsync:$.removeAsync,retryJob:$.retryJob,getChildrenValues:$.getChildrenValues})}let X=await $.tcp.send({cmd:"GetJob",id:Y});if(!X.ok||!X.job)return null;let G=X.job,J=G.data?.name??"unknown",Q=SN(G.id,J,G.data,Date.now(),{queueName:$.name,embedded:$.embedded,tcp:$.tcp,getJobState:$.getJobState,removeAsync:$.removeAsync,retryJob:$.retryJob,getChildrenValues:$.getChildrenValues});if(G.progress!==void 0)Q.progress=G.progress;return Q}async function Kt0($,Y){if($.embedded){let G=await b0().getJobState(d0(Y));return Qt0(G)}let X=await $.tcp.send({cmd:"GetState",id:Y});if(!X.ok)return"unknown";return Qt0(X.state)}function Qt0($){switch($){case"waiting":case"prioritized":case"delayed":case"active":case"completed":case"failed":case"waiting-children":return $;case"processing":return"active";case"dlq":return"failed";default:return"unknown"}}async function Zt0($,Y){if($.embedded)return b0().getChildrenValues(d0(Y));let X=await $.tcp.send({cmd:"GetChildrenValues",id:Y});if(!X.ok)return{};return X.data?.values??{}}function uV($,Y={}){if(!$.embedded)return[];return b0().getJobs($.name,{state:Y.state,start:Y.start??0,end:Y.end!==void 0&&Y.end>=0?Y.end:100}).map((J)=>{let Q=J.data?.name??"unknown";return SN(String(J.id),Q,J.data,J.createdAt,{queueName:$.name,embedded:$.embedded,tcp:$.tcp,getJobState:$.getJobState,removeAsync:$.removeAsync,retryJob:$.retryJob,getChildrenValues:$.getChildrenValues})})}async function kN($,Y={}){if($.embedded)return uV($,Y);let X=Y.end!==void 0&&Y.end>=0?Y.end:1000,G=Y.start??0,J=await $.tcp.send({cmd:"GetJobs",queue:$.name,state:Y.state,offset:G,limit:X-G});if(!J.ok||!Array.isArray(J.jobs))return[];let Q=J.jobs,W=Date.now();return Q.map((K)=>{let Z=K.data?.name??"unknown",H=SN(K.id,Z,K.data,K.createdAt??W,{queueName:$.name,embedded:$.embedded,tcp:$.tcp,getJobState:$.getJobState,removeAsync:$.removeAsync,retryJob:$.retryJob,getChildrenValues:$.getChildrenValues});if(K.progress!==void 0)H.progress=K.progress;if(K.priority!==void 0)H.priority=K.priority;if(K.attempts!==void 0)H.attemptsMade=K.attempts;return H})}function Ut0($,Y=0,X=100){return uV($,{state:"waiting",start:Y,end:X})}async function Ht0($,Y=0,X=100){return kN($,{state:"waiting",start:Y,end:X})}function zt0($,Y=0,X=100){return uV($,{state:"delayed",start:Y,end:X})}async function Vt0($,Y=0,X=100){return kN($,{state:"delayed",start:Y,end:X})}function Ft0($,Y=0,X=100){return uV($,{state:"active",start:Y,end:X})}async function Lt0($,Y=0,X=100){return kN($,{state:"active",start:Y,end:X})}function Dt0($,Y=0,X=100){return uV($,{state:"completed",start:Y,end:X})}async function Nt0($,Y=0,X=100){return kN($,{state:"completed",start:Y,end:X})}function At0($,Y=0,X=100){return uV($,{state:"failed",start:Y,end:X})}async function Bt0($,Y=0,X=100){return kN($,{state:"failed",start:Y,end:X})}function fQ0($){if(!$.embedded)return{waiting:0,prioritized:0,active:0,completed:0,failed:0,delayed:0,paused:0};let Y=b0(),X=Y.getQueueJobCounts($.name),G=Y.isPaused($.name);return{waiting:X.waiting,prioritized:X.prioritized,active:X.active,completed:X.completed,failed:X.failed,delayed:X.delayed,paused:G?X.waiting:0}}async function TR($){if($.embedded)return fQ0($);let Y=await $.tcp.send({cmd:"GetJobCounts",queue:$.name});if(!Y.ok)return{waiting:0,prioritized:0,active:0,completed:0,failed:0,delayed:0,paused:0};let X=Y.counts;return{waiting:X?.waiting??0,prioritized:X?.prioritized??0,active:X?.active??0,completed:X?.completed??0,failed:X?.failed??0,delayed:X?.delayed??0,paused:X?.paused??0}}async function Ot0($){return(await TR($)).waiting}async function Et0($){return(await TR($)).active}async function Mt0($){return(await TR($)).completed}async function Rt0($){return(await TR($)).failed}async function qt0($){if($.embedded)return b0().getJobs($.name,{state:"delayed"}).length;let Y=await $.tcp.send({cmd:"GetJobCounts",queue:$.name});if(!Y.ok)return 0;return Y.counts?.delayed??0}function gQ0($){if(!$.embedded)return 0;return b0().count($.name)}async function Pt0($){if($.embedded)return gQ0($);let Y=await $.tcp.send({cmd:"Count",queue:$.name});if(!Y.ok)return 0;return Y.count??0}function mQ0($){if(!$.embedded)return{};return b0().getCountsPerPriority($.name)}async function wt0($){if($.embedded)return mQ0($);let Y=await $.tcp.send({cmd:"GetCountsPerPriority",queue:$.name});if(!Y.ok)return{};return Y.counts??{}}function _t0($){if($.embedded)b0().pause($.name);else if($.tcp)$.tcp.send({cmd:"Pause",queue:$.name})}function jt0($){if($.embedded)b0().resume($.name);else if($.tcp)$.tcp.send({cmd:"Resume",queue:$.name})}function Tt0($){if($.embedded)b0().drain($.name);else if($.tcp)$.tcp.send({cmd:"Drain",queue:$.name})}function It0($){if($.embedded)b0().obliterate($.name);else if($.tcp)$.tcp.send({cmd:"Obliterate",queue:$.name})}function uQ0($){if(!$.embedded)return!1;return b0().isPaused($.name)}async function Ct0($){if($.embedded)return uQ0($);if(!$.tcp)return!1;return(await $.tcp.send({cmd:"IsPaused",queue:$.name})).paused===!0}async function St0($){if($.embedded)return;if($.tcp)await $.tcp.send({cmd:"Ping"})}function kt0($,Y){if($.embedded)b0().cancel(d0(Y));else $.tcp.send({cmd:"Cancel",id:Y})}async function Hl($,Y){if($.embedded){b0().cancel(d0(Y));return}await $.tcp.send({cmd:"Cancel",id:Y})}async function zl($,Y){if($.embedded){let G=b0(),J=await G.getJobState(d0(Y));if(J==="failed"){if(G.retryDlq($.name,d0(Y))===0)throw Error(`Job ${Y} is failed but not present in DLQ`);return}if(J==="active"){if(!await G.moveActiveToWait(d0(Y)))throw Error(`Failed to retry active job ${Y}`);return}if(J==="waiting"||J==="prioritized"||J==="delayed")return;throw Error(`Cannot retry job ${Y} from state '${J}'`)}let X=await $.tcp.send({cmd:"MoveToWait",id:Y});if(X.ok!==!0){let G=typeof X.error==="string"?X.error:"retry failed";throw Error(G)}}async function vt0($,Y){if($.embedded){if(Y?.state==="failed")b0().retryDlq($.name);return}if(Y?.state==="failed")await $.tcp.send({cmd:"RetryDlq",queue:$.name,count:Y?.count})}function pQ0($,Y,X,G){if(!$.embedded)return[];return b0().clean($.name,Y,G,X)}async function xt0($,Y,X,G){if($.embedded)return pQ0($,Y,X,G);let J=await $.tcp.send({cmd:"Clean",queue:$.name,grace:Y,limit:X,type:G});if(!J.ok)return[];return J.ids??[]}async function yt0($,Y){if($.embedded){let G=b0(),J=G.getJobs($.name,{state:"delayed"}),Q=Y?.count??J.length,W=0;for(let K=0;K<Math.min(Q,J.length);K++)if(await G.promote(J[K].id))W++;return W}let X=await $.tcp.send({cmd:"PromoteJobs",queue:$.name,count:Y?.count});if(!X.ok)return 0;return X.promoted??0}async function Vl($,Y){if($.embedded){await b0().promote(d0(Y));return}await $.tcp.send({cmd:"Promote",id:Y})}async function Fl($,Y,X){let G=typeof X==="number"?X:0,J=typeof X==="object"?JSON.stringify(X):void 0;if($.embedded){await b0().updateProgress(d0(Y),G,J);return}await $.tcp.send({cmd:"Progress",id:Y,progress:G,message:J})}async function bt0($,Y,X=0,G=100){if($.embedded){let Z=b0().getLogs(d0(Y));return{logs:Z.slice(X,G).map((z)=>`[${z.level}] ${z.message}`),count:Z.length}}let J=await $.tcp.send({cmd:"GetLogs",id:Y,start:X,end:G});if(!J.ok)return{logs:[],count:0};let W=J.data?.logs??[];return{logs:W.map((Z)=>`[${Z.level}] ${Z.message}`),count:W.length}}async function Ll($,Y,X){if($.embedded)return b0().addLog(d0(Y),X)?1:0;return(await $.tcp.send({cmd:"AddLog",id:Y,message:X})).ok?1:0}async function Dl($,Y,X){if($.embedded){b0().clearLogs(d0(Y),X);return}await $.tcp.send({cmd:"ClearLogs",id:Y,keepLogs:X})}async function Nl($,Y,X){if($.embedded){await b0().updateJobData(d0(Y),X);return}await $.tcp.send({cmd:"Update",id:Y,data:X})}async function Al($,Y,X){if($.embedded){await b0().changeDelay(d0(Y),X);return}await $.tcp.send({cmd:"ChangeDelay",id:Y,delay:X})}async function Bl($,Y,X){if($.embedded){await b0().changePriority(d0(Y),X.priority);return}await $.tcp.send({cmd:"ChangePriority",id:Y,priority:X.priority})}async function ht0($,Y,X,G){if($.embedded)return await b0().extendLock(d0(Y),X,G)?G:0;return(await $.tcp.send({cmd:"ExtendLock",id:Y,token:X,duration:G})).ok?G:0}function gt0($,Y){let X=b0(),G=ER(X);vo0($,G,Zs0(Y))}function dQ0($){let Y=b0(),X=ER(Y);return xo0($,X)}function mt0($,Y){let X=b0(),G=ER(X);return ec($,G,xJ0(Y)).map((Q)=>yQ0(Q))}function ut0($){let Y=b0(),X=ER(Y),G=$l($,X);return{total:G.total,byReason:G.byReason,pendingRetry:G.pendingRetry,expired:G.expired,oldestEntry:G.oldestEntry,newestEntry:G.newestEntry}}function pt0($,Y){let X=b0(),G=ER(X),J=xJ0(Y);if(!J)return 0;return Co0($,G,J)}function dt0($,Y){return b0().retryDlq($,Y?d0(Y):void 0)}function ct0($){return b0().purgeDlq($)}function lt0($,Y){let X=b0();vJ0(X,$).setStallConfig($,Y)}function cQ0($){let Y=b0();return vJ0(Y,$).getStallConfig($)}var nt0={enabled:!0,stallInterval:30000,maxStalls:3,gracePeriod:5000},lQ0=new Map;function rt0($,Y){if($.embedded)lt0($.name,Y);else if($.tcp){let X=lQ0.get($.name)??{...nt0};lQ0.set($.name,{...X,...Y}),$.tcp.send({cmd:"SetStallConfig",queue:$.name,config:Y})}}function at0($){if($.embedded)return cQ0($.name);return lQ0.get($.name)??{...nt0}}async function st0($){if($.embedded)return cQ0($.name);if(!$.tcp)return{enabled:!0,stallInterval:30000,maxStalls:3,gracePeriod:5000};let Y=await $.tcp.send({cmd:"GetStallConfig",queue:$.name});if(!Y.ok)return{enabled:!0,stallInterval:30000,maxStalls:3,gracePeriod:5000};return Y.config}var iQ0=new Map;function ot0($,Y){if($.embedded)gt0($.name,Y);else if($.tcp){let X=iQ0.get($.name)??{};iQ0.set($.name,{...X,...Y}),$.tcp.send({cmd:"SetDlqConfig",queue:$.name,config:Y})}}function tt0($){if($.embedded)return dQ0($.name);let Y=iQ0.get($.name);if(Y)return Y;return{}}async function et0($){if($.embedded)return dQ0($.name);if(!$.tcp)return{};let Y=await $.tcp.send({cmd:"GetDlqConfig",queue:$.name});if(!Y.ok)return{};return Y.config}function $e0($,Y){if(!$.embedded)return[];return mt0($.name,Y)}function Ye0($){if(!$.embedded)return{total:0,byReason:{},pendingRetry:0,expired:0,oldestEntry:null,newestEntry:null};return ut0($.name)}function Xe0($,Y){if($.embedded)return dt0($.name,Y);if($.tcp)$.tcp.send({cmd:"RetryDlq",queue:$.name,id:Y});return 0}function Ge0($,Y){if(!$.embedded)return 0;return pt0($.name,Y)}function Je0($){if($.embedded)return ct0($.name);if($.tcp)$.tcp.send({cmd:"PurgeDlq",queue:$.name});return 0}function nQ0($,Y){if($.embedded){let X=Y?d0(Y):void 0;return b0().retryCompleted($.name,X)}if($.tcp)$.tcp.send({cmd:"RetryCompleted",queue:$.name,id:Y});return 0}async function Qe0($,Y){if($.embedded)return nQ0($,Y);if(!$.tcp)return 0;let X=await $.tcp.send({cmd:"RetryCompleted",queue:$.name,id:Y});if(!X.ok)return 0;return X.count??0}function We0($,Y){if($.embedded)b0().setConcurrency($.name,Y);else if($.tcp)$.tcp.send({cmd:"SetConcurrency",queue:$.name,limit:Y})}function Ke0($){if($.embedded)b0().clearConcurrency($.name);else if($.tcp)$.tcp.send({cmd:"ClearConcurrency",queue:$.name})}function Ze0($){return Promise.resolve(null)}function Ue0($,Y,X){if($.embedded)b0().setRateLimit($.name,Y);else if($.tcp)$.tcp.send({cmd:"RateLimit",queue:$.name,limit:Y})}function He0($){if($.embedded)b0().clearRateLimit($.name);else if($.tcp)$.tcp.send({cmd:"RateLimitClear",queue:$.name})}function ze0($){return Promise.resolve(null)}async function Ve0($,Y){if($.embedded)b0().setRateLimit($.name,1),setTimeout(()=>{b0().clearRateLimit($.name)},Y);else if($.tcp)await $.tcp.send({cmd:"RateLimit",queue:$.name,limit:1})}function Fe0($,Y){return Promise.resolve(0)}function Le0($){return Promise.resolve(!1)}function rQ0($,Y){return $.prefixKey?`${$.prefixKey}${Y}`:Y}function pV($,Y){if($.prefixKey&&Y.startsWith($.prefixKey))return Y.slice($.prefixKey.length);return Y}function bg4($){if(!$)return{};return $.name?{name:$.name,...$.data??{}}:$.data??{}}function hg4($){let Y=$?.opts?.deduplication;if(!Y)return{uniqueKey:void 0,dedup:void 0};return{uniqueKey:Y.id,dedup:{ttl:Y.ttl,extend:Y.extend,replace:Y.replace}}}async function De0($,Y,X,G){let{pattern:J,every:Q}=X,W=bg4(G),K=hg4(G),Z=rQ0($,Y);if($.embedded)return b0().addCron({name:Z,queue:$.name,data:W,schedule:J,repeatEvery:Q,timezone:X.timezone??"UTC",skipMissedOnRestart:X.skipMissedOnRestart,immediately:X.immediately,skipIfNoWorker:X.skipIfNoWorker,preventOverlap:X.preventOverlap,...K}),{id:Y,name:G?.name??"default",next:Date.now()+(Q??60000)};let H=await $.tcp.send({cmd:"Cron",name:Z,queue:$.name,data:W,schedule:J,repeatEvery:Q,timezone:X.timezone,skipMissedOnRestart:X.skipMissedOnRestart,immediately:X.immediately,skipIfNoWorker:X.skipIfNoWorker,preventOverlap:X.preventOverlap,...K});if(!H.ok)return null;return{id:Y,name:G?.name??"default",next:H.nextRun??Date.now()}}async function Ne0($,Y){let X=rQ0($,Y);if($.embedded)return b0().removeCron(X),!0;return(await $.tcp.send({cmd:"CronDelete",name:X})).ok===!0}async function Ae0($,Y){let X=rQ0($,Y);if($.embedded){let K=b0().listCrons().find((Z)=>Z.name===X&&Z.queue===$.name);if(!K)return null;return{id:pV($,K.name),name:pV($,K.name),next:K.nextRun,pattern:K.schedule??void 0,every:K.repeatEvery??void 0}}let G=await $.tcp.send({cmd:"CronList"});if(!G.ok)return null;let Q=G.crons?.find((W)=>W.name===X&&(W.queue===void 0||W.queue===$.name));if(!Q)return null;return{id:pV($,Q.name),name:pV($,Q.name),next:Q.nextRun,pattern:Q.schedule??void 0,every:Q.repeatEvery??void 0}}async function aQ0($,Y=0,X=-1,G=!0){if($.embedded)return b0().listCrons().filter((W)=>W.queue===$.name).map((W)=>({id:pV($,W.name),name:pV($,W.name),next:W.nextRun,pattern:W.schedule??void 0,every:W.repeatEvery??void 0}));let J=await $.tcp.send({cmd:"CronList"});if(!J.ok)return[];return(J.crons??[]).filter((W)=>W.queue===$.name).map((W)=>({id:pV($,W.name),name:pV($,W.name),next:W.nextRun,pattern:W.schedule??void 0,every:W.repeatEvery??void 0}))}async function Be0($){return(await aQ0($)).length}function Oe0($,Y){if($.embedded){let X=b0().getJobByCustomId(Y);return Promise.resolve(X?String(X.id):null)}return Promise.resolve(null)}function Ee0($,Y){if($.embedded){if(b0().getJobByCustomId(Y))return Promise.resolve(1);return Promise.resolve(0)}return Promise.resolve(0)}async function Me0($,Y,X,G){if($.embedded)return await b0().ack(d0(Y),X),null;return await $.tcp.send({cmd:"ACK",id:Y,result:X}),null}async function Re0($,Y,X,G){if($.embedded)await b0().fail(d0(Y),X.message);else await $.tcp.send({cmd:"FAIL",id:Y,error:X.message})}async function qe0($,Y,X){if($.embedded){let J=b0(),Q=await $.getJobState(Y);if(Q==="failed"){let W=await J.getJob(d0(Y));if(!W)return!1;return J.retryDlq(W.queue,d0(Y))>0}if(Q==="active")return J.moveActiveToWait(d0(Y));if(Q==="delayed")return J.promote(d0(Y));if(Q==="waiting"||Q==="prioritized")return!0;return!1}return(await $.tcp.send({cmd:"MoveToWait",id:Y})).ok===!0}async function Pe0($,Y,X,G){if($.embedded){let J=Math.max(0,X-Date.now()),Q=b0(),W=await $.getJobState(Y);if(W==="failed"){let K=await Q.getJob(d0(Y));if(!K)return;if(Q.retryDlq(K.queue,d0(Y))>0&&J>0)await Q.changeWaitingDelay(d0(Y),J)}else if(W==="waiting"||W==="prioritized"||W==="delayed")await Q.changeWaitingDelay(d0(Y),J);else await Q.changeDelay(d0(Y),J)}else await $.tcp.send({cmd:"MoveToDelayed",id:Y,timestamp:X})}async function we0($,Y,X,G){if($.embedded)return b0().moveToWaitingChildren(d0(Y));return!1}async function _e0($,Y,X,G){return new Promise((J,Q)=>{let W=G?setTimeout(()=>{z(),Q(Error(`Job ${Y} timed out after ${G}ms`))},G):null,K=X,Z=(V)=>{if(V.jobId===Y)z(),J(V.returnvalue)},H=(V)=>{if(V.jobId===Y)z(),Q(Error(V.failedReason??"Job failed"))},z=()=>{if(W)clearTimeout(W);K.off("completed",Z),K.off("failed",H)};K.on("completed",Z),K.on("failed",H),$.getJobState(Y).then((V)=>{if(V==="completed")if(z(),$.embedded){let F=b0().getResult(d0(Y));J(F)}else J(void 0);else if(V==="failed")z(),Q(Error("Job already failed"))})})}async function sQ0($){if($.embedded)return[];let Y=await $.tcp.send({cmd:"ListWorkers"});if(!Y.ok)return[];return Y.workers??[]}async function je0($){return(await sQ0($)).length}async function Te0($,Y,X,G){if($.embedded){let K=b0().getStats();return{meta:{count:Y==="completed"?K.completed:K.dlq},data:[]}}let J=await $.tcp.send({cmd:"Metrics"});if(!J.ok)return{meta:{count:0},data:[]};let Q=J.stats;return{meta:{count:Y==="completed"?Q?.completed??0:Q?.dlq??0},data:[]}}function Ie0($,Y){return Promise.resolve(0)}function Ce0($,Y=0,X=-1){return $.getPrioritizedAsync(Y,X)}async function Se0($){return(await $.getPrioritizedAsync(0,1000)).length}async function oQ0($,Y=0,X=-1){if($.embedded)return b0().getJobs($.name,{state:"delayed",start:Y,end:X===-1?1000:X}).filter((J)=>{return J.data?._waitingParent===!0}).map((J)=>{let Q=J.data;return mV({job:J,name:Q?.name??"default",getState:$.getJobState,remove:$.removeAsync,retry:$.retryJob,getChildrenValues:$.getChildrenValues,updateData:$.updateJobData,promote:$.promoteJob,changeDelay:$.changeJobDelay,changePriority:$.changeJobPriority,extendLock:$.extendJobLock,clearLogs:$.clearJobLogs,getDependencies:$.getJobDependencies,getDependenciesCount:$.getJobDependenciesCount})});return[]}async function ke0($){return(await oQ0($)).length}function ve0($,Y,X,G,J){return Promise.resolve({processed:{},unprocessed:[]})}async function tQ0($,Y,X){if($.embedded){let G=b0(),J=await G.getJob(d0(Y));if(!J)return{processed:{},unprocessed:[]};let Q=J.childrenIds,W={},K=[];for(let Z of Q){let H=G.getResult(Z);if(H!==void 0){let z=await G.getJob(Z),V=z?`${z.queue}:${Z}`:String(Z);W[V]=H}else K.push(String(Z))}return{processed:W,unprocessed:K}}return{processed:{},unprocessed:[]}}async function xe0($,Y,X){if($.embedded){let G=await tQ0($,Y);return{processed:Object.keys(G.processed).length,unprocessed:G.unprocessed.length}}return{processed:0,unprocessed:0}}class dV{name;queueKey;prefixKey;opts;embedded;tcpPool;useSharedPool;addBatcher;constructor($,Y={}){if(this.name=$,this.prefixKey=Y.prefixKey??"",this.queueKey=this.prefixKey+$,this.opts=Y,this.embedded=Y.embedded??Ws0,this.embedded)b0(Y.dataPath),this.tcpPool=null,this.useSharedPool=!1,this.addBatcher=null;else{let X=Y.connection??{},G=X.poolSize??4,J=bc(X.token);if(G===4&&!J)this.tcpPool=OR({host:X.host,port:X.port,poolSize:G,pingInterval:X.pingInterval,commandTimeout:X.commandTimeout,pipelining:X.pipelining,maxInFlight:X.maxInFlight}),this.useSharedPool=!0;else this.tcpPool=new TH({host:X.host??"localhost",port:X.port??6789,token:J,poolSize:G,pingInterval:X.pingInterval,commandTimeout:X.commandTimeout,pipelining:X.pipelining,maxInFlight:X.maxInFlight}),this.useSharedPool=!1;let Q=Y.autoBatch;if(Q?.enabled===!1)this.addBatcher=null;else this.addBatcher=new yJ0({maxSize:Q?.maxSize??50,maxDelayMs:Q?.maxDelayMs??5},(W)=>hQ0(this.addCtx,W))}}get ctx(){return{name:this.queueKey,embedded:this.embedded,tcp:this.tcpPool,prefixKey:this.prefixKey}}get addCtx(){return{...this.ctx,opts:this.opts,getJobState:($)=>this.getJobState($),removeAsync:($)=>this.removeAsync($),retryJob:($)=>this.retryJob($),getChildrenValues:($)=>this.getChildrenValues($),updateJobData:($,Y)=>this.updateJobData($,Y),promoteJob:($)=>this.promoteJob($),changeJobDelay:($,Y)=>this.changeJobDelay($,Y),changeJobPriority:($,Y)=>this.changeJobPriority($,Y),extendJobLock:($,Y,X)=>this.extendJobLock($,Y,X),clearJobLogs:($,Y)=>this.clearJobLogs($,Y),getJobDependencies:($,Y)=>this.getJobDependencies($,Y),getJobDependenciesCount:($,Y)=>this.getJobDependenciesCount($,Y),moveJobToCompleted:($,Y,X)=>this.moveJobToCompleted($,Y,X),moveJobToFailed:($,Y,X)=>this.moveJobToFailed($,Y,X),moveJobToWait:($,Y)=>this.moveJobToWait($,Y),moveJobToDelayed:($,Y,X)=>this.moveJobToDelayed($,Y,X),moveJobToWaitingChildren:($,Y,X)=>this.moveJobToWaitingChildren($,Y,X),waitJobUntilFinished:($,Y,X)=>this.waitJobUntilFinished($,Y,X)}}get queryCtx(){return{...this.ctx,getJobState:($)=>this.getJobState($),removeAsync:($)=>this.removeAsync($),retryJob:($)=>this.retryJob($),getChildrenValues:($)=>this.getChildrenValues($),updateJobData:($,Y)=>this.updateJobData($,Y),promoteJob:($)=>this.promoteJob($),changeJobDelay:($,Y)=>this.changeJobDelay($,Y),changeJobPriority:($,Y)=>this.changeJobPriority($,Y),extendJobLock:($,Y,X)=>this.extendJobLock($,Y,X),clearJobLogs:($,Y)=>this.clearJobLogs($,Y),getJobDependencies:($,Y)=>this.getJobDependencies($,Y),getJobDependenciesCount:($,Y)=>this.getJobDependenciesCount($,Y),moveJobToCompleted:($,Y,X)=>this.moveJobToCompleted($,Y,X),moveJobToFailed:($,Y,X)=>this.moveJobToFailed($,Y,X),moveJobToWait:($,Y)=>this.moveJobToWait($,Y),moveJobToDelayed:($,Y,X)=>this.moveJobToDelayed($,Y,X),moveJobToWaitingChildren:($,Y,X)=>this.moveJobToWaitingChildren($,Y,X),waitJobUntilFinished:($,Y,X)=>this.waitJobUntilFinished($,Y,X)}}get moveCtx(){return{...this.ctx,getJobState:($)=>this.getJobState($),getJobDependencies:($)=>this.getJobDependencies($)}}add($,Y,X){if(this.addBatcher&&!X?.durable)return this.addBatcher.enqueue($,Y,X);return Jt0(this.addCtx,$,Y,X)}addBulk($){return hQ0(this.addCtx,$)}getJob($){return Wt0(this.queryCtx,$)}getJobState($){return Kt0(this.queryCtx,$)}getChildrenValues($){return Zt0(this.queryCtx,$)}getJobs($){return uV(this.queryCtx,$)}getJobsAsync($){return kN(this.queryCtx,$)}getWaiting($,Y){return Ut0(this.queryCtx,$,Y)}getWaitingAsync($,Y){return Ht0(this.queryCtx,$,Y)}getDelayed($,Y){return zt0(this.queryCtx,$,Y)}getDelayedAsync($,Y){return Vt0(this.queryCtx,$,Y)}getActive($,Y){return Ft0(this.queryCtx,$,Y)}getActiveAsync($,Y){return Lt0(this.queryCtx,$,Y)}getCompleted($,Y){return Dt0(this.queryCtx,$,Y)}getCompletedAsync($,Y){return Nt0(this.queryCtx,$,Y)}getFailed($,Y){return At0(this.queryCtx,$,Y)}getFailedAsync($,Y){return Bt0(this.queryCtx,$,Y)}getJobCounts(){return fQ0(this.ctx)}getJobCountsAsync(){return TR(this.ctx)}getWaitingCount(){return Ot0(this.ctx)}getActiveCount(){return Et0(this.ctx)}getCompletedCount(){return Mt0(this.ctx)}getFailedCount(){return Rt0(this.ctx)}getDelayedCount(){return qt0(this.ctx)}count(){return gQ0(this.ctx)}countAsync(){return Pt0(this.ctx)}getCountsPerPriority(){return mQ0(this.ctx)}getCountsPerPriorityAsync(){return wt0(this.ctx)}pause(){_t0(this.ctx)}resume(){jt0(this.ctx)}drain(){Tt0(this.ctx)}obliterate(){It0(this.ctx)}isPaused(){return uQ0(this.ctx)}isPausedAsync(){return Ct0(this.ctx)}waitUntilReady(){return St0(this.ctx)}remove($){kt0(this.ctx,$)}removeAsync($){return Hl(this.ctx,$)}retryJob($){return zl(this.ctx,$)}retryJobs($){return vt0(this.ctx,$)}clean($,Y,X){return pQ0(this.ctx,$,Y,X)}cleanAsync($,Y,X){return xt0(this.ctx,$,Y,X)}promoteJobs($){return yt0(this.ctx,$)}promoteJob($){return Vl(this.ctx,$)}updateJobProgress($,Y){return Fl(this.ctx,$,Y)}getJobLogs($,Y,X,G){return bt0(this.ctx,$,Y,X)}addJobLog($,Y,X){return Ll(this.ctx,$,Y)}clearJobLogs($,Y){return Dl(this.ctx,$,Y)}updateJobData($,Y){return Nl(this.ctx,$,Y)}changeJobDelay($,Y){return Al(this.ctx,$,Y)}changeJobPriority($,Y){return Bl(this.ctx,$,Y)}extendJobLock($,Y,X){return ht0(this.ctx,$,Y,X)}setStallConfig($){rt0(this.ctx,$)}getStallConfig(){return at0(this.ctx)}getStallConfigAsync(){return st0(this.ctx)}setDlqConfig($){ot0(this.ctx,$)}getDlqConfig(){return tt0(this.ctx)}getDlqConfigAsync(){return et0(this.ctx)}getDlq($){return $e0(this.ctx,$)}getDlqStats(){return Ye0(this.ctx)}retryDlq($){return Xe0(this.ctx,$)}retryDlqByFilter($){return Ge0(this.ctx,$)}purgeDlq(){return Je0(this.ctx)}retryCompleted($){return nQ0(this.ctx,$)}retryCompletedAsync($){return Qe0(this.ctx,$)}setGlobalConcurrency($){We0(this.ctx,$)}removeGlobalConcurrency(){Ke0(this.ctx)}getGlobalConcurrency(){return Ze0(this.ctx)}setGlobalRateLimit($,Y){Ue0(this.ctx,$,Y)}removeGlobalRateLimit(){He0(this.ctx)}getGlobalRateLimit(){return ze0(this.ctx)}rateLimit($){return Ve0(this.ctx,$)}getRateLimitTtl($){return Fe0(this.ctx,$)}isMaxed(){return Le0(this.ctx)}upsertJobScheduler($,Y,X){return De0(this.ctx,$,Y,X)}removeJobScheduler($){return Ne0(this.ctx,$)}getJobScheduler($){return Ae0(this.ctx,$)}getJobSchedulers($,Y,X){return aQ0(this.ctx,$,Y,X)}getJobSchedulersCount(){return Be0(this.ctx)}getDeduplicationJobId($){return Oe0(this.ctx,$)}removeDeduplicationKey($){return Ee0(this.ctx,$)}moveJobToCompleted($,Y,X){return Me0(this.moveCtx,$,Y,X)}moveJobToFailed($,Y,X){return Re0(this.moveCtx,$,Y,X)}moveJobToWait($,Y){return qe0(this.moveCtx,$,Y)}moveJobToDelayed($,Y,X){return Pe0(this.moveCtx,$,Y,X)}moveJobToWaitingChildren($,Y,X){return we0(this.moveCtx,$,Y,X)}waitJobUntilFinished($,Y,X){return _e0(this.moveCtx,$,Y,X)}getJobDependencies($,Y){return tQ0(this.addCtx,$,Y)}getJobDependenciesCount($,Y){return xe0(this.addCtx,$,Y)}getDependencies($,Y,X,G){return ve0(this.addCtx,$,Y,X,G)}getPrioritized($,Y){return Ce0({...this.addCtx,getWaitingAsync:(X,G)=>this.getWaitingAsync(X,G),getPrioritizedAsync:(X,G)=>this.getJobsAsync({state:"prioritized",start:X,end:G})},$,Y)}getPrioritizedCount(){return Se0({...this.addCtx,getWaitingAsync:($,Y)=>this.getWaitingAsync($,Y),getPrioritizedAsync:($,Y)=>this.getJobsAsync({state:"prioritized",start:$,end:Y})})}getWaitingChildren($,Y){return oQ0(this.addCtx,$,Y)}getWaitingChildrenCount(){return ke0(this.addCtx)}trimEvents($){return Ie0(this.ctx,$)}getWorkers(){return sQ0(this.ctx)}getWorkersCount(){return je0(this.ctx)}getMetrics($,Y,X){return Te0(this.ctx,$,Y,X)}async disconnect(){if(this.addBatcher)await this.addBatcher.flush(),await this.addBatcher.waitForInFlight(),this.addBatcher.stop();this.close()}close(){if(this.addBatcher?.stop(),this.tcpPool)if(this.useSharedPool)VS(this.tcpPool);else this.tcpPool.close()}}import{EventEmitter as rg4}from"events";import{hostname as ag4}from"os";var ye0=Bun.env.BUNQUEUE_EMBEDDED==="1",qS={MAX_BACKOFF_MS:30000,BASE_BACKOFF_MS:100,MAX_POLL_TIMEOUT:30000,DEFAULT_ACK_INTERVAL:50};var dg4=3,cg4=100;class eQ0{MAX_PENDING_ACKS=1e4;pendingAcks=[];ackTimer=null;config;tcp=null;stopped=!1;inFlightFlushes=new Set;constructor($){this.config=$}setTcp($){this.tcp=$}queue($,Y,X){return new Promise((G,J)=>{if(this.pendingAcks.length>=this.MAX_PENDING_ACKS){let Q=this.pendingAcks.splice(0,Math.floor(this.MAX_PENDING_ACKS*0.1));for(let W of Q)W.reject(Error("Ack buffer overflow - oldest entries dropped"))}if(this.pendingAcks.push({id:$,result:Y,token:X,resolve:G,reject:J}),this.pendingAcks.length>=this.config.batchSize){let Q=this.flush();this.inFlightFlushes.add(Q),Q.finally(()=>this.inFlightFlushes.delete(Q))}else this.ackTimer??=setTimeout(()=>{this.ackTimer=null;let Q=this.flush();this.inFlightFlushes.add(Q),Q.finally(()=>this.inFlightFlushes.delete(Q))},this.config.interval)})}async flush(){if(this.pendingAcks.length===0)return;let $=this.pendingAcks.splice(0,this.pendingAcks.length);if(this.ackTimer)clearTimeout(this.ackTimer),this.ackTimer=null;await this.sendBatchWithRetry($)}async sendBatchWithRetry($){let Y=this.config.maxRetries??dg4,X=this.config.retryDelayMs??cg4,G=null;for(let J=0;J<=Y;J++){if(this.stopped){let Q=Error("AckBatcher stopped");for(let W of $)W.reject(Q);return}try{if(this.config.embedded){let Q=b0(),W=$.map((K)=>({id:d0(K.id),result:K.result,token:K.token}));await Q.ackBatchWithResults(W)}else if(this.tcp){let Q=await this.tcp.send({cmd:"ACKB",ids:$.map((W)=>W.id),results:$.map((W)=>W.result),tokens:$.map((W)=>W.token??"")});if(!Q.ok)throw Error(Q.error??"Batch ACK failed")}for(let Q of $)Q.resolve();return}catch(Q){if(G=Q instanceof Error?Q:Error(String(Q)),J<Y){let W=X*Math.pow(2,J);await Bun.sleep(W)}}}console.error(`[AckBatcher] Flush failed after ${Y+1} attempts:`,G?.message,`(${$.length} acks lost)`);for(let J of $)J.reject(G??Error("Unknown error"))}stop(){if(this.stopped=!0,this.ackTimer)clearTimeout(this.ackTimer),this.ackTimer=null;this.pendingAcks.length=0}hasPending(){return this.pendingAcks.length>0}async waitForInFlight(){if(this.inFlightFlushes.size===0)return;await Promise.all(this.inFlightFlushes)}}function IR($,Y){return{id:d0($.id),queue:Y,data:$.data,priority:$.priority??0,createdAt:$.createdAt??Date.now(),runAt:$.runAt??Date.now(),startedAt:$.startedAt??Date.now(),completedAt:null,attempts:$.attempts??0,maxAttempts:$.maxAttempts??3,backoff:$.backoff??1000,ttl:$.ttl??null,timeout:$.timeout??null,uniqueKey:$.uniqueKey??null,customId:$.customId??null,progress:$.progress??0,progressMessage:$.progressMessage??null,dependsOn:Array.isArray($.dependsOn)?$.dependsOn:[],parentId:$.parentId??null,childrenIds:Array.isArray($.childrenIds)?$.childrenIds:[],childrenCompleted:$.childrenCompleted??0,tags:Array.isArray($.tags)?$.tags:[],groupId:$.groupId??null,lifo:!1,removeOnComplete:$.removeOnComplete??!1,removeOnFail:!1,stallCount:0,stallTimeout:null,lastHeartbeat:Date.now(),repeat:null}}class PS extends Error{constructor($){super($);this.name="UnrecoverableError"}}class Ol extends Error{constructor($){super($);this.name="DelayedError"}}function $W0($,Y,X,G){return async(J,Q,W)=>{if($)await b0().updateProgress(d0(J),Q,W);else if(Y)await Y.send({cmd:"Progress",id:J,progress:Q,message:W});X.emit("progress",G.current,Q)}}function YW0($,Y,X,G){return async(J,Q)=>{if($)b0().addLog(d0(J),Q);else if(Y)await Y.send({cmd:"AddLog",id:J,message:Q});X.emit("log",G.current,Q)}}function XW0($,Y){return async(X)=>{if($)return await b0().getJobState(d0(X));else if(Y)return(await Y.send({cmd:"GetState",id:X})).state??"unknown";return"unknown"}}function GW0($,Y){return async(X)=>{if($)return b0().getChildrenValues(d0(X));else if(Y)return(await Y.send({cmd:"GetChildrenValues",id:X})).data?.values??{};return{}}}function JW0($,Y){return async(X)=>{if($)return b0().getFailedChildrenValues(d0(X));if(!Y)return{};return(await Y.send({cmd:"GetFailedChildrenValues",id:X})).values??{}}}function QW0($,Y){return async(X)=>{if($)return b0().getIgnoredChildrenFailures(d0(X));if(!Y)return{};return(await Y.send({cmd:"GetIgnoredChildrenFailures",id:X})).values??{}}}function WW0($,Y){return async(X)=>{if($)return b0().removeChildDependency(d0(X));if(!Y)return!1;return(await Y.send({cmd:"RemoveChildDependency",id:X})).ok===!0}}function KW0($,Y){return async(X)=>{if($)return b0().removeUnprocessedChildren(d0(X));if(!Y)return;await Y.send({cmd:"RemoveUnprocessedChildren",id:X})}}function be0($,Y,X,G,J){return async(Q,W,K)=>{if($)await b0().fail(X.id,W.message,G??void 0);else if(Y)await Y.send({cmd:"FAIL",id:X.id,error:W.message,...G?{token:G}:{}});J(W)}}function he0($,Y,X,G,J){return async(Q,W,K)=>{if($)await b0().ack(X.id,W,G??void 0);else await Y.queue(String(X.id),W,G??void 0);return J(W),null}}function ZW0($,Y){return async(X)=>{if($){await b0().cancel(d0(X));return}if(!Y)return;await Y.send({cmd:"Cancel",id:X})}}function UW0($,Y,X){return async(G)=>{if($){let Q=b0(),W=await Q.getJobState(d0(G));if(W==="failed"){if(Q.retryDlq(X.queue,d0(G))===0)throw Error(`Job ${G} is failed but not present in DLQ`);return}if(W==="active"){if(!await Q.moveActiveToWait(d0(G)))throw Error(`Failed to retry active job ${G}`);return}if(W==="waiting"||W==="prioritized"||W==="delayed")return;throw Error(`Cannot retry job ${G} from state '${W}'`)}if(!Y)return;let J=await Y.send({cmd:"MoveToWait",id:G});if(J.ok!==!0){let Q=typeof J.error==="string"?J.error:"retry failed";throw Error(Q)}}}function HW0($,Y){return async(X,G)=>{if($){await b0().updateJobData(d0(X),G);return}if(!Y)return;await Y.send({cmd:"Update",id:X,data:G})}}function zW0($,Y){return async(X)=>{if($){await b0().promote(d0(X));return}if(!Y)return;await Y.send({cmd:"Promote",id:X})}}function VW0($,Y){return async(X,G)=>{if($){await b0().changeDelay(d0(X),G);return}if(!Y)return;await Y.send({cmd:"ChangeDelay",id:X,delay:G})}}function FW0($,Y){return async(X,G)=>{if($){await b0().changePriority(d0(X),G.priority);return}if(!Y)return;await Y.send({cmd:"ChangePriority",id:X,priority:G.priority})}}function LW0($,Y){return async(X,G,J)=>{if($)return await b0().extendLock(d0(X),G,J)?J:0;if(!Y)return 0;return(await Y.send({cmd:"ExtendLock",id:X,token:G,duration:J})).ok===!0?J:0}}function DW0($,Y){return async(X,G)=>{if($){b0().clearLogs(d0(X),G);return}if(!Y)return;await Y.send({cmd:"ClearLogs",id:X,keepLogs:G})}}function NW0($,Y){return async(X,G)=>{if($)return await b0().moveActiveToWait(d0(X));if(!Y)return!1;return(await Y.send({cmd:"MoveToWait",id:X})).ok===!0}}function AW0($,Y){return async(X,G,J)=>{let Q=Math.max(0,G-Date.now());if($){await b0().moveToDelayed(d0(X),Q);return}if(!Y)return;await Y.send({cmd:"MoveToDelayed",id:X,delay:Q})}}function BW0($,Y){return async(X)=>{if($)return await b0().moveToWaitingChildren(d0(X));if(!Y)return!1;throw Error("moveToWaitingChildren is not supported in TCP mode \u2014 no server command available")}}function OW0($,Y){return async(X,G,J)=>{let Q=J??30000;if($){let Z=b0(),H=await Z.getJob(d0(X));if(!H)throw Error(`Job ${X} not found`);if(H.completedAt)return Z.getResult(d0(X));if(!await Z.waitForJobCompletion(d0(X),Q))throw Error(`waitUntilFinished timed out after ${Q}ms`);return Z.getResult(d0(X))}if(!Y)throw Error("waitUntilFinished: no connection");let K=await Y.send({cmd:"WaitJob",id:X,timeout:Q});if(!K.completed)throw Error(`waitUntilFinished timed out after ${Q}ms`);return K.result}}function EW0($,Y){return(X)=>{if($){b0().discard(d0(X));return}if(!Y)return;Y.send({cmd:"Discard",id:X})}}function El($,Y,X){return async()=>{let G=X.childrenIds,J={},Q=[];for(let W of G){let K="unknown",Z;if($){let z=b0();if(K=await z.getJobState(W),K==="completed")Z=z.getResult(W)}else if(Y){if(K=(await Y.send({cmd:"GetState",id:String(W)})).state??"unknown",K==="completed")Z=(await Y.send({cmd:"GetResult",id:String(W)})).result}let H=`${X.queue}:${String(W)}`;if(K==="completed"||K==="failed")J[H]=Z??null;else Q.push(H)}return{processed:J,unprocessed:Q}}}function MW0($,Y,X){let G=El($,Y,X);return async(J)=>{let Q=await G(J);return{processed:Object.keys(Q.processed).length,unprocessed:Q.unprocessed.length}}}function RW0(){return()=>Promise.reject(Error("removeDeduplicationKey is not implemented \u2014 no server primitive available"))}async function qW0($,Y){let{processor:X,embedded:G,tcp:J,ackBatcher:Q,emitter:W,token:K}=Y,H=$.data?.name??"default",z=String($.id),V={current:null},F={result:null},L=be0(G,J,$,K,(A)=>{F.result={type:"failed",error:A}}),N=he0(G,Q,$,K,(A)=>{F.result={type:"completed",value:A}}),D=Zl({job:$,name:H,updateProgress:$W0(G,J,W,V),log:YW0(G,J,W,V),getState:XW0(G,J),getChildrenValues:GW0(G,J),getFailedChildrenValues:JW0(G,J),getIgnoredChildrenFailures:QW0(G,J),removeChildDependency:WW0(G,J),removeUnprocessedChildren:KW0(G,J),moveToFailed:L,moveToCompleted:N,remove:ZW0(G,J),retry:UW0(G,J,$),updateData:HW0(G,J),promote:zW0(G,J),changeDelay:VW0(G,J),changePriority:FW0(G,J),extendLock:LW0(G,J),clearLogs:DW0(G,J),moveToWait:NW0(G,J),moveToDelayed:AW0(G,J),moveToWaitingChildren:BW0(G,J),waitUntilFinished:OW0(G,J),discard:EW0(G,J),getDependencies:El(G,J,$),getDependenciesCount:MW0(G,J,$),removeDeduplicationKey:RW0(),token:K??void 0});V.current=D,W.emit("active",D);try{let A=await X(D);if(fe0(F,D,Y))return;try{if(G)await b0().ack($.id,A,K??void 0);else await Q.queue(z,A,K??void 0)}catch(B){let O=B instanceof Error?B:Error(String(B));if(PW0(O)){W.emit("error",Object.assign(O,{context:"ack-stale",jobId:z}));return}throw B}D.returnvalue=A,Y.onOutcome?.(!0),W.emit("completed",D,A)}catch(A){if(fe0(F,D,Y))return;await ig4($,A,Y,{job:D,jobIdStr:z,token:K})}}function fe0($,Y,X){if($.result?.type==="failed"){let G=$.result.error??Error("Job manually moved to failed");return Y.failedReason=G.message,X.onOutcome?.(!1),X.emitter.emit("failed",Y,G),!0}if($.result?.type==="completed")return Y.returnvalue=$.result.value,X.onOutcome?.(!0),X.emitter.emit("completed",Y,$.result.value),!0;return!1}function PW0($){return $.message.includes("not found")||$.message.includes("not in processing")}async function lg4($,Y,X){let{embedded:G,tcp:J,emitter:Q}=Y;try{if(G)await b0().moveToDelayed($.id,$.backoff||1000);else if(J)await J.send({cmd:"MoveToDelayed",id:$.id,delay:$.backoff||1000,...X.token?{token:X.token}:{}})}catch(W){let K=W instanceof Error?W:Error(String(W));if(!PW0(K))Q.emit("error",Object.assign(K,{context:"delay",jobId:X.jobIdStr}))}}async function ig4($,Y,X,G){let{embedded:J,tcp:Q,emitter:W}=X,{job:K,jobIdStr:Z,token:H}=G,z=Y instanceof Error?Y:Error(String(Y));if(z instanceof Ol){await lg4($,X,{jobIdStr:Z,token:H});return}if(z instanceof PS)$.maxAttempts=1,$.attempts=0;try{if(J)await b0().fail($.id,z.message,H??void 0);else if(Q)await Q.send({cmd:"FAIL",id:$.id,error:z.message,...H?{token:H}:{},...z instanceof PS?{unrecoverable:!0}:{}})}catch(V){let F=V instanceof Error?V:Error(String(V));if(PW0(F))return;W.emit("error",Object.assign(F,{context:"fail",jobId:Z}))}if(K.failedReason=z.message,z.stack){let V=$.stackTraceLimit,F=z.stack.split(`
`).map((L)=>L.trim()).filter(Boolean);K.stacktrace=F.slice(0,V)}X.onOutcome?.(!1),W.emit("failed",K,z)}class wW0{limiter;limiterTokens=[];head=0;rateLimitExpiration=0;constructor($){this.limiter=$}canProcessWithinLimit(){if(!this.limiter)return!0;let $=Date.now()-this.limiter.duration;return this.evictExpired($),this.activeCount()<this.limiter.max}recordJobForLimiter(){if(!this.limiter)return;this.limiterTokens.push(Date.now())}getTimeUntilNextSlot(){if(!this.limiter)return 0;let $=Date.now(),Y=$-this.limiter.duration;if(this.evictExpired(Y),this.activeCount()<this.limiter.max)return 0;return this.limiterTokens[this.head]+this.limiter.duration-$}getRateLimiterInfo(){if(!this.limiter)return null;let $=Date.now()-this.limiter.duration;return this.evictExpired($),{current:this.activeCount(),max:this.limiter.max,duration:this.limiter.duration}}rateLimit($){if($<=0)return;if(this.limiter){let Y=Date.now();for(let X=0;X<this.limiter.max;X++)this.limiterTokens.push(Y+$-this.limiter.duration)}this.rateLimitExpiration=Date.now()+$}isRateLimited(){return Date.now()<this.rateLimitExpiration}activeCount(){return this.limiterTokens.length-this.head}evictExpired($){while(this.head<this.limiterTokens.length&&this.limiterTokens[this.head]<=$)this.head++;if(this.head>0&&this.head>this.limiterTokens.length/2)this.limiterTokens=this.limiterTokens.slice(this.head),this.head=0}}class Ml{groupKey;maxPerGroup;activeByGroup=new Map;constructor($,Y){this.groupKey=$,this.maxPerGroup=Y}static fromOptions($){if(!$?.groupKey)return null;return new Ml($.groupKey,$.max)}getGroupValue($){let Y=$.data;if(!Y||typeof Y!=="object")return null;let X=Y[this.groupKey];if(X===void 0||X===null)return null;return typeof X==="string"?X:`${X}`}canProcess($){let Y=this.getGroupValue($);if(Y===null)return!0;return(this.activeByGroup.get(Y)??0)<this.maxPerGroup}increment($){let Y=this.getGroupValue($);if(Y===null)return;let X=this.activeByGroup.get(Y)??0;this.activeByGroup.set(Y,X+1)}decrement($){let Y=this.getGroupValue($);if(Y===null)return;let X=this.activeByGroup.get(Y)??0;if(X<=1)this.activeByGroup.delete(Y);else this.activeByGroup.set(Y,X-1)}getGroupCount($){return this.activeByGroup.get($)??0}getMax(){return this.maxPerGroup}getGroupKey(){return this.groupKey}clear(){this.activeByGroup.clear()}}function ge0($,Y){return setInterval(()=>void ng4($),Y)}async function ng4($){if($.pulledJobIds.size===0||!$.tcp)return;try{let Y=Array.from($.pulledJobIds);if(Y.length===0)return;if($.useLocks){let X=Y.map((G)=>$.jobTokens.get(G)??"");if(Y.length===1)await $.tcp.send({cmd:"JobHeartbeat",id:Y[0],token:X[0]||void 0});else await $.tcp.send({cmd:"JobHeartbeatB",ids:Y,tokens:X})}else if(Y.length===1)await $.tcp.send({cmd:"JobHeartbeat",id:Y[0]});else await $.tcp.send({cmd:"JobHeartbeatB",ids:Y})}catch(Y){let X=Y instanceof Error?Y:Error(String(Y));$.emitter.emit("error",Object.assign(X,{context:"heartbeat"}))}}async function me0($,Y){let X=b0();if($.useLocks){if(Y===1){let{job:W,token:K}=await X.pullWithLock($.name,$.workerId,0);return W?[{job:W,token:K}]:[]}let{jobs:J,tokens:Q}=await X.pullBatchWithLock($.name,Y,$.workerId,0);return J.map((W,K)=>({job:W,token:Q[K]||null}))}if(Y===1){let J=await X.pull($.name,0);return J?[{job:J,token:null}]:[]}return(await X.pullBatch($.name,Y,0)).map((J)=>({job:J,token:null}))}async function ue0($,Y,X,G){if(G)return[];let J={cmd:X===1?"PULL":"PULLB",queue:$.name,timeout:$.pollTimeout,count:X};if($.useLocks)J.owner=$.workerId;let Q=await Y.send(J);if(!Q.ok)return[];if(X===1){let Z=Q.job,H=$.useLocks?Q.token??null:null;if(Z)return[{job:IR(Z,$.name),token:H}];return[]}let W=Q.jobs,K=$.useLocks?Q.tokens??[]:[];return W?.map((Z,H)=>({job:IR(Z,$.name),token:K[H]||null}))??[]}function sg4($,Y){return{concurrency:$.concurrency??1,autorun:$.autorun??!0,heartbeatInterval:$.heartbeatInterval??1e4,batchSize:Math.min($.batchSize??10,1000),pollTimeout:Math.min($.pollTimeout??0,qS.MAX_POLL_TIMEOUT),embedded:Y,useLocks:$.useLocks??!0,skipLockRenewal:$.skipLockRenewal??!1,skipStalledCheck:$.skipStalledCheck??!1,drainDelay:$.drainDelay??50,lockDuration:$.lockDuration??30000,maxStalledCount:$.maxStalledCount??1,removeOnComplete:$.removeOnComplete,removeOnFail:$.removeOnFail}}function og4($,Y){let X=$.connection??{},G=X.poolSize??Math.min(Y,8),J=bc(X.token);return new TH({host:X.host??"localhost",port:X.port??6789,token:J,poolSize:G,pingInterval:X.pingInterval,commandTimeout:X.commandTimeout,pipelining:X.pipelining,maxInFlight:X.maxInFlight})}class cV extends rg4{name;queueKey;opts;processor;embedded;tcp;tcpPool;ackBatcher;rateLimiter;groupLimiter;running=!1;paused=!1;_closing=!1;_closingPromise=null;closed=!1;activeJobs=0;pollTimer=null;consecutiveErrors=0;activeJobIds=new Set;pulledJobIds=new Set;jobTokens=new Map;cancelledJobs=new Set;heartbeatTimer=null;workerHeartbeatTimer=null;processedCount=0;failedCount=0;startedAt;registered=!1;workerId;pendingJobs=[];pendingJobsHead=0;processingScheduled=!1;lastDrainedEmit=0;stalledUnsubscribe=null;on($,Y){return super.on($,Y)}once($,Y){return super.once($,Y)}off($,Y){return super.off($,Y)}constructor($,Y,X={}){super();if(this.name=$,this.queueKey=(X.prefixKey??"")+$,this.processor=Y,this.embedded=X.embedded??ye0,this.startedAt=Date.now(),this.workerId=`worker-${this.queueKey}-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,this.opts=sg4(X,this.embedded),this.rateLimiter=new wW0(X.limiter?.groupKey?null:X.limiter??null),this.groupLimiter=Ml.fromOptions(X.limiter),this.ackBatcher=new eQ0({batchSize:X.batchSize??10,interval:qS.DEFAULT_ACK_INTERVAL,embedded:this.embedded}),this.embedded)b0(X.dataPath),this.tcp=null,this.tcpPool=null;else this.tcpPool=og4(X,this.opts.concurrency),this.tcp=this.tcpPool,this.ackBatcher.setTcp(this.tcp);if(this.opts.autorun)this.run()}run(){if(this.running||this.closed)return;if(this.running=!0,this.paused=!1,this._closing=!1,this._closingPromise=null,queueMicrotask(()=>{if(!this.closed)this.emit("ready")}),this.embedded&&!this.stalledUnsubscribe&&!this.opts.skipStalledCheck)this.subscribeToStalledEvents();if(!this.embedded&&this.tcp&&!this.registered)this.registerWithServer();if(this.opts.heartbeatInterval>0&&!this.opts.skipLockRenewal)if(this.embedded)this.heartbeatTimer=setInterval(()=>{let $=b0();for(let Y of this.pulledJobIds)$.jobHeartbeat(d0(Y))},this.opts.heartbeatInterval);else{let $=this.getHeartbeatDeps();this.heartbeatTimer=ge0($,this.opts.heartbeatInterval),this.startWorkerHeartbeat()}this.poll()}subscribeToStalledEvents(){if(!this.embedded)return;let $=b0();this.stalledUnsubscribe=$.subscribe((Y)=>{if(Y.queue!==this.queueKey)return;if(Y.eventType==="stalled")this.emit("stalled",Y.jobId,"active")})}pause(){if(!this.running)return;if(this.running=!1,this.paused=!0,this.pollTimer)clearTimeout(this.pollTimer),this.pollTimer=null}resume(){if(this.closed)return;this.paused=!1,this.run()}isRunning(){return this.running}isPaused(){return this.paused&&!this.closed}isClosed(){return this.closed}get concurrency(){return this.opts.concurrency}set concurrency($){let Y=Math.max(1,$),X=this.opts.concurrency;if(this.opts.concurrency=Y,Y>X&&this.running&&!this._closing)this.poll()}get closing(){return this._closingPromise}async waitUntilReady(){if(this.embedded)return;if(this.tcpPool)await this.tcpPool.send({cmd:"Ping"})}cancelJob($,Y){if(this.activeJobIds.has($))return this.cancelledJobs.add($),this.emit("cancelled",{jobId:$,reason:Y??"Job cancelled by worker"}),!0;return!1}cancelAllJobs($){for(let Y of this.activeJobIds)this.cancelledJobs.add(Y),this.emit("cancelled",{jobId:Y,reason:$??"All jobs cancelled"})}isJobCancelled($){return this.cancelledJobs.has($)}getRateLimiterInfo(){return this.rateLimiter.getRateLimiterInfo()}rateLimit($){this.rateLimiter.rateLimit($)}isRateLimited(){return this.rateLimiter.isRateLimited()}async startStalledCheckTimer(){}async delay($=0,Y){if($<=0)return;return new Promise((X,G)=>{let J=setTimeout(X,$);if(Y)Y.signal.addEventListener("abort",()=>{clearTimeout(J),G(Error("Delay aborted"))})})}async getNextJob($,Y){if(this.closed)return;if(this.embedded){let W=b0();if(this.opts.useLocks){let{job:Z,token:H}=await W.pullWithLock(this.queueKey,this.workerId,0);if(Z&&H){let z=String(Z.id);this.pulledJobIds.add(z),this.jobTokens.set(z,H)}return Z??void 0}let K=await W.pull(this.queueKey,0);if(K)this.pulledJobIds.add(String(K.id));return K??void 0}if(!this.tcp)return;let X={cmd:"PULL",queue:this.queueKey,timeout:0};if(this.opts.useLocks){if(X.owner=this.workerId,$)X.token=$}let G=await this.tcp.send(X);if(!G.ok||!G.job)return;let J=IR(G.job,this.queueKey),Q=String(J.id);if(this.pulledJobIds.add(Q),this.opts.useLocks&&G.token)this.jobTokens.set(Q,G.token);return J}async processJobManually($,Y,X){if(this.closed)return;let G=String($.id);if(this.activeJobs++,this.activeJobIds.add(G),this.pulledJobIds.add(G),this.opts.useLocks&&Y)this.jobTokens.set(G,Y);try{if(await qW0($,{name:this.queueKey,processor:this.processor,embedded:this.embedded,tcp:this.tcp,ackBatcher:this.ackBatcher,emitter:this,token:this.opts.useLocks?Y:void 0}),X)return await X()}finally{if(this.activeJobs--,this.activeJobIds.delete(G),this.pulledJobIds.delete(G),this.cancelledJobs.delete(G),this.opts.useLocks)this.jobTokens.delete(G);this.rateLimiter.recordJobForLimiter()}}async extendJobLocks($,Y,X){if(this.closed||$.length===0)return 0;if($.length!==Y.length)throw Error("jobIds and tokens arrays must have the same length");if(this.embedded){let Q=b0(),W=0;for(let K=0;K<$.length;K++)if(await Q.extendLock($[K],Y[K],X))W++;return W}if(!this.tcp)return 0;return(await this.tcp.send({cmd:"ExtendLocks",ids:$,tokens:Y,duration:X})).extended??0}async close($=!1){if(this.closed)return;if(this._closingPromise)return this._closingPromise;return this._closingPromise=this._doClose($),this._closingPromise}async _doClose($){if(this._closing=!0,this.running=!1,this.paused=!1,this.pollTimer)clearTimeout(this.pollTimer),this.pollTimer=null;if(this.heartbeatTimer)clearInterval(this.heartbeatTimer),this.heartbeatTimer=null;if(this.workerHeartbeatTimer)clearInterval(this.workerHeartbeatTimer),this.workerHeartbeatTimer=null;if(!$){let Y=()=>this.pendingJobs.length-this.pendingJobsHead;while(this.activeJobs>0||Y()>0)await Bun.sleep(50)}if(await this.ackBatcher.flush(),await this.ackBatcher.waitForInFlight(),this.ackBatcher.stop(),!this.embedded&&this.tcp&&this.registered){try{await this.tcp.send({cmd:"UnregisterWorker",workerId:this.workerId})}catch{}this.registered=!1}if(await Bun.sleep(100),this.stalledUnsubscribe)this.stalledUnsubscribe(),this.stalledUnsubscribe=null;if(this.activeJobIds.clear(),this.pulledJobIds.clear(),this.jobTokens.clear(),this.cancelledJobs.clear(),this.pendingJobs=[],this.pendingJobsHead=0,this.groupLimiter)this.groupLimiter.clear();if(this.tcpPool)this.tcpPool.close();this.closed=!0,this._closing=!1,this.emit("closed")}poll(){if(!this.running||this._closing)return;if(this.activeJobs>=this.opts.concurrency){this.pollTimer=setTimeout(()=>{this.poll()},10);return}if(!this.rateLimiter.canProcessWithinLimit()){let $=this.rateLimiter.getTimeUntilNextSlot();this.pollTimer=setTimeout(()=>{this.poll()},Math.max($,10));return}this.tryProcess()}async tryProcess(){if(!this.running||this._closing)return;try{let $=this.getNextEligibleJob();if(!$){let Y=await this.doPullBatch();if(!this.running||this._closing)return;if(Y.length>0){if(this.registerPulledJobs(Y),this.pendingJobsHead>=this.pendingJobs.length)this.pendingJobs=Y,this.pendingJobsHead=0;else this.pendingJobs=this.pendingJobs.slice(this.pendingJobsHead).concat(Y),this.pendingJobsHead=0;$=this.getNextEligibleJob()}}if($)this.consecutiveErrors=0,this.startJob($.job,$.token);else{if(this.pendingJobsHead<this.pendingJobs.length&&this.groupLimiter){this.pollTimer=setTimeout(()=>{this.poll()},10);return}let X=Date.now();if(X-this.lastDrainedEmit>1000)this.lastDrainedEmit=X,this.emit("drained");let G=this.opts.pollTimeout>0?10:this.opts.drainDelay;this.pollTimer=setTimeout(()=>{this.poll()},G)}}catch($){if(!this.running)return;this.handlePullError($)}}registerPulledJobs($){for(let Y of $){let X=String(Y.job.id);if(this.pulledJobIds.add(X),this.opts.useLocks&&Y.token)this.jobTokens.set(X,Y.token)}}getBufferedJob(){if(this.pendingJobsHead>=this.pendingJobs.length)return null;let $=this.pendingJobs[this.pendingJobsHead++];if(this.pendingJobsHead>500&&this.pendingJobsHead>=this.pendingJobs.length/2)this.pendingJobs=this.pendingJobs.slice(this.pendingJobsHead),this.pendingJobsHead=0;return $}getNextEligibleJob(){if(this.pendingJobsHead>=this.pendingJobs.length)return null;if(!this.groupLimiter)return this.getBufferedJob();let $=this.pendingJobsHead,Y=this.pendingJobs.length;for(let X=$;X<Y;X++){let G=this.pendingJobs[X];if(this.groupLimiter.canProcess(G.job)){if(this.pendingJobs[X]=this.pendingJobs[this.pendingJobsHead],this.pendingJobsHead++,this.pendingJobsHead>500&&this.pendingJobsHead>=this.pendingJobs.length/2)this.pendingJobs=this.pendingJobs.slice(this.pendingJobsHead),this.pendingJobsHead=0;return G}}return null}async doPullBatch(){let $=this.opts.concurrency-this.activeJobs,Y=Math.min(this.opts.batchSize,$,1000);if(Y<=0)return[];let X=this.getPullConfig();return this.embedded?me0(X,Y):ue0(X,this.tcp,Y,this._closing)}startJob($,Y){let X=String($.id);if(this.activeJobIds.has(X))return;if(this.activeJobs++,this.activeJobIds.add(X),this.applyRemoveDefaults($),this.groupLimiter)this.groupLimiter.increment($);if(this.opts.useLocks&&Y&&!this.jobTokens.has(X))this.jobTokens.set(X,Y);this.pulledJobIds.add(X);let G=this.opts.useLocks?Y:void 0;if(qW0($,{name:this.queueKey,processor:this.processor,embedded:this.embedded,tcp:this.tcp,ackBatcher:this.ackBatcher,emitter:this,token:G,onOutcome:(J)=>{if(J)this.processedCount++;else this.failedCount++}}).finally(()=>{if(this.activeJobs--,this.activeJobIds.delete(X),this.pulledJobIds.delete(X),this.cancelledJobs.delete(X),this.opts.useLocks)this.jobTokens.delete(X);if(this.groupLimiter)this.groupLimiter.decrement($);if(this.rateLimiter.recordJobForLimiter(),this.running&&!this._closing)this.poll()}),this.activeJobs<this.opts.concurrency&&!this._closing&&!this.processingScheduled)this.processingScheduled=!0,setImmediate(()=>{this.processingScheduled=!1,this.tryProcess()})}handlePullError($){this.consecutiveErrors++;let Y=$ instanceof Error?$:Error(String($));this.emit("error",Object.assign(Y,{queue:this.name,consecutiveErrors:this.consecutiveErrors,context:"pull"}));let X=Math.min(qS.BASE_BACKOFF_MS*Math.pow(2,this.consecutiveErrors-1),qS.MAX_BACKOFF_MS);this.pollTimer=setTimeout(()=>{this.poll()},X)}registerWithServer(){if(!this.tcp||this.registered)return;this.tcp.send({cmd:"RegisterWorker",name:this.queueKey,queues:[this.queueKey],concurrency:this.opts.concurrency,workerId:this.workerId,hostname:ag4(),pid:process.pid,startedAt:this.startedAt}).then(()=>{this.registered=!0}).catch(($)=>{let Y=$ instanceof Error?$:Error(String($));this.emit("error",Object.assign(Y,{context:"worker-register"}))})}startWorkerHeartbeat(){if(this.workerHeartbeatTimer||!this.tcp)return;this.workerHeartbeatTimer=setInterval(()=>{if(!this.tcp||!this.registered)return;this.tcp.send({cmd:"Heartbeat",id:this.workerId,activeJobs:this.activeJobs,processed:this.processedCount,failed:this.failedCount}).catch(($)=>{let Y=$ instanceof Error?$:Error(String($));this.emit("error",Object.assign(Y,{context:"worker-heartbeat"}))})},this.opts.heartbeatInterval)}getHeartbeatDeps(){return{pulledJobIds:this.pulledJobIds,jobTokens:this.jobTokens,tcp:this.tcp,useLocks:this.opts.useLocks,emitter:this}}getPullConfig(){return{name:this.queueKey,workerId:this.workerId,useLocks:this.opts.useLocks,pollTimeout:this.opts.pollTimeout}}applyRemoveDefaults($){if(this.opts.removeOnComplete!==void 0&&!$.removeOnComplete){let Y=this.opts.removeOnComplete;$.removeOnComplete=Y===!0}if(this.opts.removeOnFail!==void 0&&!$.removeOnFail){let Y=this.opts.removeOnFail;$.removeOnFail=Y===!0}}}class _W0{queue;constructor($){this.queue=$}setDlqConfig($){this.queue.setDlqConfig($)}getDlqConfig(){return this.queue.getDlqConfig()}getDlq($){return this.queue.getDlq($)}getDlqStats(){return this.queue.getDlqStats()}retryDlq($){return this.queue.retryDlq($)}purgeDlq(){return this.queue.purgeDlq()}setGlobalRateLimit($,Y){this.queue.setGlobalRateLimit($,Y)}removeGlobalRateLimit(){this.queue.removeGlobalRateLimit()}}function tg4($,Y,X,G,J){switch($){case"fixed":return X;case"exponential":return X*Math.pow(2,Y-1);case"jitter":{let Q=X*Math.pow(2,Y-1);return Math.floor(Q*(0.5+Math.random()))}case"fibonacci":{let Q=1,W=1;for(let K=0;K<Y-1;K++){let Z=Q+W;Q=W,W=Z}return X*W}case"custom":if(J.customBackoff)return J.customBackoff(Y,G);return X;default:return X}}function pe0($,Y){let X=Y.maxAttempts??3,G=Y.delay??1000,J=Y.strategy??"exponential",Q=(W)=>{return $().catch((K)=>{let Z=K instanceof Error?K:Error(String(K));if(W>=X)throw Z;if(Y.retryIf&&!Y.retryIf(Z,W))throw Z;let H=tg4(J,W,G,Z,Y);return new Promise((z)=>{setTimeout(()=>{z(Q(W+1))},H)})})};return Q(1)}class jW0{state="closed";failures=0;timer=null;config;worker;constructor($,Y){this.config=$,this.worker=Y}get currentState(){return this.state}isOpen(){return this.state==="open"}onSuccess(){if(this.state==="half-open")this.state="closed",this.failures=0,this.config.onClose?.();else if(this.state==="closed")this.failures=0}onFailure(){this.failures++;let $=this.config.threshold??5;if(this.state==="half-open"||this.failures>=$)this.open()}open(){this.state="open",this.config.onOpen?.(this.failures),this.worker.pause();let $=this.config.resetTimeout??30000;if(this.timer)clearTimeout(this.timer);this.timer=setTimeout(()=>{this.state="half-open",this.config.onHalfOpen?.(),this.worker.resume()},$)}reset(){if(this.state="closed",this.failures=0,this.timer)clearTimeout(this.timer),this.timer=null;if(this.worker.isPaused())this.worker.resume()}destroy(){if(this.timer)clearTimeout(this.timer),this.timer=null}}class TW0{buffer=[];timer=null;config;constructor($){this.config=$}buildProcessor(){return($)=>{return new Promise((Y,X)=>{if(this.buffer.push({job:$,resolve:Y,reject:X}),this.buffer.length>=this.config.size)this.flush();else if(!this.timer){let G=this.config.timeout??5000;this.timer=setTimeout(()=>{this.flush()},G)}})}}flush(){if(this.timer)clearTimeout(this.timer),this.timer=null;let $=this.buffer.splice(0);if($.length===0)return;let Y=$.map((X)=>X.job);this.config.processor(Y).then((X)=>{for(let G=0;G<$.length;G++)$[G].resolve(X[G]??void 0)},(X)=>{let G=X instanceof Error?X:Error(String(X));for(let J of $)J.reject(G)})}destroy(){if(this.timer)clearTimeout(this.timer),this.timer=null;if(this.buffer.length>0)this.flush()}}class IW0{rules=[];active=!1;queue;worker;constructor($,Y){this.queue=$,this.worker=Y}add($){this.rules.push($),this.ensureActive()}ensureActive(){if(this.active)return;this.active=!0,this.worker.on("completed",($,Y)=>{this.fire("completed",$,Y)}),this.worker.on("failed",($,Y)=>{this.fire("failed",$,Y)})}fire($,Y,X){for(let G of this.rules){if(G.on!==Y.name)continue;if((G.event??"completed")!==$)continue;if(G.condition&&!G.condition(X,Y))continue;let J=G.data(X,Y);this.queue.add(G.create,J,G.opts)}}}class CW0{timer=null;config;queue;constructor($,Y){this.config=$,this.queue=Y}start(){let $=this.config.interval??60000;this.timer=setInterval(()=>{this.tick()},$)}async tick(){let $=this.config.minAge??60000,Y=this.config.boost??1,X=this.config.maxPriority??100,G=this.config.maxScan??100,[J,Q]=await Promise.all([this.queue.getWaitingAsync(0,G),this.queue.getJobsAsync({state:"prioritized",start:0,end:G})]),W=[...J,...Q],K=Date.now();for(let Z of W)if(K-Z.timestamp>=$&&Z.priority<X){let z=Math.min(Z.priority+Y,X);try{await this.queue.changeJobPriority(Z.id,{priority:z})}catch{}}}destroy(){if(this.timer)clearInterval(this.timer),this.timer=null}}class SW0{controllers=new Map;register($){let Y=new AbortController;return this.controllers.set($,Y),Y}unregister($){this.controllers.delete($)}cancel($,Y=0){let X=this.controllers.get($);if(!X)return;if(Y>0)setTimeout(()=>{X.abort()},Y);else X.abort()}isCancelled($){let Y=this.controllers.get($);return Y?Y.signal.aborted:!1}getSignal($){return this.controllers.get($)?.signal??null}destroyAll(){for(let $ of this.controllers.values())$.abort();this.controllers.clear()}}class kW0{config;constructor($){this.config=$}getTtl($){return this.config.perName?.[$]??this.config.defaultTtl??0}isExpired($,Y){let X=this.getTtl($);if(X<=0)return!1;return Date.now()-Y>X}setDefaultTtl($){this.config.defaultTtl=$}setNameTtl($,Y){this.config.perName??={},this.config.perName[$]=Y}}class vW0{dedup;debounce;constructor($,Y){this.dedup=$,this.debounce=Y}get active(){return this.dedup!==null||this.debounce!==null}merge($,Y,X){if(!this.active)return Y;let G={...Y};if(this.dedup&&!G.deduplication){let J=X!==void 0?JSON.stringify(X):"";G.deduplication={id:`${$}:${J}`,ttl:this.dedup.ttl??3600000,extend:this.dedup.extend,replace:this.dedup.replace}}if(this.debounce&&!G.debounce)G.debounce={id:$,ttl:this.debounce.ttl};return G}}class de0{name;queue;worker;middlewares=[];baseProcessor;cb;retryConfig;triggerMgr;ager;cancellation=new SW0;ttlChecker;batchAcc;merger;dlqrl;constructor($,Y){let X=[Y.processor,Y.routes,Y.batch].filter(Boolean).length;if(X===0)throw Error('Bunqueue requires "processor", "routes", or "batch"');if(X>1)throw Error('Bunqueue: use only one of "processor", "routes", or "batch"');if(this.name=$,this.retryConfig=Y.retry??null,this.ttlChecker=Y.ttl?new kW0(Y.ttl):null,this.merger=new vW0(Y.deduplication??null,Y.debounce??null),Y.batch)this.batchAcc=new TW0(Y.batch),this.baseProcessor=this.batchAcc.buildProcessor();else this.batchAcc=null,this.baseProcessor=Y.routes?this.buildRouteProcessor(Y.routes):Y.processor;let G=this,J=(Q)=>G.processJob(Q);if(this.queue=new dV($,this.buildQueueOpts(Y)),this.worker=new cV($,J,this.buildWorkerOpts(Y)),this.dlqrl=new _W0(this.queue),Y.dlq)this.dlqrl.setDlqConfig(Y.dlq);this.cb=Y.circuitBreaker?new jW0(Y.circuitBreaker,this.worker):null,this.triggerMgr=new IW0(this.queue,this.worker),this.ager=Y.priorityAging?new CW0(Y.priorityAging,this.queue):null,this.ager?.start()}buildRouteProcessor($){let Y=$;return(X)=>{let G=Y[X.name];if(!G)throw Error(`No route for job "${X.name}" in queue "${this.name}"`);return G(X)}}buildQueueOpts($){return{connection:$.connection,embedded:$.embedded,dataPath:$.dataPath,defaultJobOptions:$.defaultJobOptions,autoBatch:$.autoBatch,prefixKey:$.prefixKey}}buildWorkerOpts($){return{connection:$.connection,embedded:$.embedded,dataPath:$.dataPath,concurrency:$.concurrency,autorun:$.autorun,heartbeatInterval:$.heartbeatInterval,batchSize:$.batchSize,pollTimeout:$.pollTimeout,limiter:$.rateLimit??$.limiter,removeOnComplete:$.removeOnComplete,removeOnFail:$.removeOnFail,prefixKey:$.prefixKey}}processJob($){if(this.cb?.isOpen())return Promise.reject(Error("Circuit breaker is open"));if(this.ttlChecker?.isExpired($.name,$.timestamp))return Promise.reject(Error(`Job expired (age: ${Date.now()-$.timestamp}ms)`));let Y=this.cancellation.register($.id),X=()=>this.runMiddlewareChain($,Y);return(this.retryConfig?pe0(X,this.retryConfig):X()).then((J)=>{return this.cb?.onSuccess(),this.cancellation.unregister($.id),J},(J)=>{throw this.cb?.onFailure(),this.cancellation.unregister($.id),J})}runMiddlewareChain($,Y){let X=$;if(this.middlewares.length===0){let K=this.baseProcessor($);return K instanceof Promise?K:Promise.resolve(K)}let G=0,J=this.middlewares,Q=this.baseProcessor,W=()=>{if(Y.signal.aborted)return Promise.reject(Error("Job cancelled"));if(G<J.length)return J[G++](X,W);let K=Q($);return K instanceof Promise?K:Promise.resolve(K)};return W()}use($){return this.middlewares.push($),this}add($,Y,X){return this.queue.add($,Y,this.merger.merge($,X,Y))}addBulk($){return this.queue.addBulk($.map((Y)=>({...Y,opts:this.merger.merge(Y.name,Y.opts,Y.data)})))}getJob($){return this.queue.getJob($)}getJobCounts(){return this.queue.getJobCounts()}getJobCountsAsync(){return this.queue.getJobCountsAsync()}count(){return this.queue.count()}countAsync(){return this.queue.countAsync()}cron($,Y,X,G){return this.queue.upsertJobScheduler($,{pattern:Y,timezone:G?.timezone},{name:$,data:X,opts:G?.jobOpts})}every($,Y,X,G){return this.queue.upsertJobScheduler($,{every:Y},{name:$,data:X,opts:G?.jobOpts})}removeCron($){return this.queue.removeJobScheduler($)}listCrons(){return this.queue.getJobSchedulers()}cancel($,Y=0){this.cancellation.cancel($,Y)}isCancelled($){return this.cancellation.isCancelled($)}getSignal($){return this.cancellation.getSignal($)}getCircuitState(){return this.cb?.currentState??"closed"}resetCircuit(){this.cb?.reset()}trigger($){return this.triggerMgr.add($),this}setDefaultTtl($){this.ttlChecker?.setDefaultTtl($)}setNameTtl($,Y){this.ttlChecker?.setNameTtl($,Y)}setDlqConfig($){this.dlqrl.setDlqConfig($)}getDlqConfig(){return this.dlqrl.getDlqConfig()}getDlq($){return this.dlqrl.getDlq($)}getDlqStats(){return this.dlqrl.getDlqStats()}retryDlq($){return this.dlqrl.retryDlq($)}purgeDlq(){return this.dlqrl.purgeDlq()}setGlobalRateLimit($,Y){this.dlqrl.setGlobalRateLimit($,Y)}removeGlobalRateLimit(){this.dlqrl.removeGlobalRateLimit()}on($,Y){return this.worker.on($,Y),this}once($,Y){return this.worker.once($,Y),this}off($,Y){return this.worker.off($,Y),this}pause(){this.queue.pause(),this.worker.pause()}resume(){this.queue.resume(),this.worker.resume()}async close($=!1){this.ager?.destroy(),this.cb?.destroy(),this.batchAcc?.destroy(),this.cancellation.destroyAll(),await this.worker.close($),this.queue.close()}isRunning(){return this.worker.isRunning()}isPaused(){return this.worker.isPaused()}isClosed(){return this.worker.isClosed()}}import{EventEmitter as Ym4}from"events";function xW0($){let Y={};for(let[X,G]of Object.entries($))if(!X.startsWith("__")&&X!=="name")Y[X]=G;return Y}function Rl($,Y,X,G,J){let Q=Date.now(),W=!!J?.embedded,K=J?.tcp??null,Z=(z)=>{return["waiting","active","completed","failed","delayed","prioritized","waiting-children","unknown"].includes(z)?z:"unknown"},H=()=>{if(J?.getState)return J.getState($).then(Z);if(W)return b0().getJobState(d0($)).then((z)=>Z(z));if(K)return K.send({cmd:"GetState",id:$}).then((z)=>{let V=z.state??"unknown";return Z(V)});return Promise.resolve("unknown")};return{id:$,name:Y,data:X,queueName:G,attemptsMade:0,timestamp:Q,progress:0,delay:0,processedOn:void 0,finishedOn:void 0,stacktrace:null,stalledCounter:0,priority:0,parentKey:void 0,opts:{},token:void 0,processedBy:void 0,deduplicationId:void 0,repeatJobKey:void 0,attemptsStarted:0,updateProgress:async(z)=>{if(J?.updateProgress)return J.updateProgress($,z);if(W){await b0().updateProgress(d0($),z);return}if(K)await K.send({cmd:"Progress",id:$,progress:z})},log:async(z)=>{if(J?.log)return J.log($,z);if(W){b0().addLog(d0($),z);return}if(K)await K.send({cmd:"AddLog",id:$,message:z})},getState:H,remove:async()=>{if(J?.remove)return J.remove($);if(W){await b0().cancel(d0($));return}if(K)await K.send({cmd:"Cancel",id:$})},retry:async()=>{if(J?.retry)return J.retry($);if(W){let V=b0(),F=await V.getJobState(d0($));if(F==="failed"){if(V.retryDlq(G,d0($))===0)throw Error(`Job ${$} is failed but not present in DLQ`);return}if(F==="active"){if(!await V.moveActiveToWait(d0($)))throw Error(`Failed to retry active job ${$}`);return}if(F==="waiting"||F==="prioritized"||F==="delayed")return;throw Error(`Cannot retry job ${$} from state '${F}'`)}if(!K)return;let z=await K.send({cmd:"MoveToWait",id:$});if(z.ok!==!0){let V=typeof z.error==="string"?z.error:"retry failed";throw Error(V)}},getChildrenValues:async()=>{if(W)return await b0().getChildrenValues(d0($));if(!K)return{};return(await K.send({cmd:"GetChildrenValues",id:$})).data?.values??{}},isWaiting:async()=>await H()==="waiting",isActive:async()=>await H()==="active",isDelayed:async()=>await H()==="delayed",isCompleted:async()=>await H()==="completed",isFailed:async()=>await H()==="failed",isWaitingChildren:async()=>await H()==="waiting-children",updateData:async(z)=>{if(J?.updateData)return J.updateData($,z);if(W){await b0().updateJobData(d0($),z);return}if(K)await K.send({cmd:"Update",id:$,data:z})},promote:async()=>{if(J?.promote)return J.promote($);if(W){await b0().promote(d0($));return}if(K)await K.send({cmd:"Promote",id:$})},changeDelay:async(z)=>{if(J?.changeDelay)return J.changeDelay($,z);if(W){await b0().changeDelay(d0($),z);return}if(K)await K.send({cmd:"ChangeDelay",id:$,delay:z})},changePriority:async(z)=>{if(J?.changePriority)return J.changePriority($,z.priority);if(W){await b0().changePriority(d0($),z.priority);return}if(K)await K.send({cmd:"ChangePriority",id:$,priority:z.priority})},extendLock:async(z,V)=>{if(W)return await b0().extendLock(d0($),z,V)?V:0;if(!K)return 0;return(await K.send({cmd:"ExtendLock",id:$,token:z,duration:V})).ok===!0?V:0},clearLogs:async(z)=>{if(J?.clearLogs)return J.clearLogs($);if(W){b0().clearLogs(d0($),z);return}if(K)await K.send({cmd:"ClearLogs",id:$,keepLogs:z})},getDependencies:async()=>{let z=await le0($,W,K);return ie0(G,z,W,K)},getDependenciesCount:async()=>{let z=await le0($,W,K),V=await ie0(G,z,W,K);return{processed:Object.keys(V.processed).length,unprocessed:V.unprocessed.length}},toJSON:()=>({id:$,name:Y,data:X,opts:{},progress:0,delay:0,timestamp:Q,attemptsMade:0,stacktrace:null,queueQualifiedName:`bull:${G}`}),asJSON:()=>({id:$,name:Y,data:JSON.stringify(X),opts:"{}",progress:"0",delay:"0",timestamp:String(Q),attemptsMade:"0",stacktrace:null}),moveToCompleted:async(z)=>{if(W)return await b0().ack(d0($),z),null;if(K)await K.send({cmd:"ACK",id:$,result:z});return null},moveToFailed:async(z)=>{if(W){await b0().fail(d0($),z.message);return}if(K)await K.send({cmd:"FAIL",id:$,error:z.message})},moveToWait:async()=>{if(W)return await b0().moveActiveToWait(d0($));if(!K)return!1;return(await K.send({cmd:"MoveToWait",id:$})).ok===!0},moveToDelayed:async(z)=>{let V=Math.max(0,z-Date.now());if(W){await b0().moveToDelayed(d0($),V);return}if(K)await K.send({cmd:"MoveToDelayed",id:$,delay:V})},moveToWaitingChildren:async()=>{if(W)return await b0().moveToWaitingChildren(d0($));throw Error("moveToWaitingChildren is not supported in TCP mode \u2014 no server command available")},waitUntilFinished:async(z,V)=>{let F=V??30000;if(W){let D=b0(),A=await D.getJob(d0($));if(!A)throw Error(`Job ${$} not found`);if(A.completedAt)return D.getResult(d0($));if(!await D.waitForJobCompletion(d0($),F))throw Error(`waitUntilFinished timed out after ${F}ms`);return D.getResult(d0($))}if(!K)throw Error("waitUntilFinished: no connection");let N=await K.send({cmd:"WaitJob",id:$,timeout:F});if(!N.completed)throw Error(`waitUntilFinished timed out after ${F}ms`);return N.result},discard:()=>{if(W){b0().discard(d0($));return}if(K)K.send({cmd:"Discard",id:$})},getFailedChildrenValues:async()=>{if(W)return await b0().getFailedChildrenValues(d0($));if(!K)return{};return(await K.send({cmd:"GetFailedChildrenValues",id:$})).values??{}},getIgnoredChildrenFailures:async()=>{if(W)return await b0().getIgnoredChildrenFailures(d0($));if(!K)return{};return(await K.send({cmd:"GetIgnoredChildrenFailures",id:$})).values??{}},removeChildDependency:async()=>{if(W)return await b0().removeChildDependency(d0($));if(!K)return!1;return(await K.send({cmd:"RemoveChildDependency",id:$})).removed??!1},removeDeduplicationKey:()=>Promise.reject(Error("removeDeduplicationKey is not implemented \u2014 no server primitive available")),removeUnprocessedChildren:async()=>{if(W){await b0().removeUnprocessedChildren(d0($));return}if(K)await K.send({cmd:"RemoveUnprocessedChildren",id:$})}}}async function le0($,Y,X){if(Y)return((await b0().getJob(d0($)))?.childrenIds??[]).map(String);if(!X)return[];return((await X.send({cmd:"GetJob",id:$})).job?.childrenIds??[]).map(String)}async function ie0($,Y,X,G){let J={},Q=[];for(let W of Y){let K="unknown",Z;if(X){let z=b0();if(K=await z.getJobState(d0(W)),K==="completed")Z=z.getResult(d0(W))}else if(G){if(K=(await G.send({cmd:"GetState",id:W})).state??"unknown",K==="completed")Z=(await G.send({cmd:"GetResult",id:W})).result}let H=`${$}:${W}`;if(K==="completed"||K==="failed")J[H]=Z??null;else Q.push(H)}return{processed:J,unprocessed:Q}}function ne0($){return{removeOnComplete:typeof $.removeOnComplete==="boolean"?$.removeOnComplete:!1,removeOnFail:typeof $.removeOnFail==="boolean"?$.removeOnFail:!1}}async function wS($,Y,X,G={},J){if($.embedded){let W=b0(),{removeOnComplete:K,removeOnFail:Z}=ne0(G),H=await W.push(Y,{data:X,priority:G.priority,delay:G.delay,maxAttempts:G.attempts,backoff:G.backoff,timeout:G.timeout,customId:G.jobId,removeOnComplete:K,removeOnFail:Z,failParentOnFailure:G.failParentOnFailure,removeDependencyOnFailure:G.removeDependencyOnFailure,ignoreDependencyOnFailure:G.ignoreDependencyOnFailure,continueParentOnFailure:G.continueParentOnFailure,dependsOn:J?.map((z)=>d0(z))});return String(H.id)}if(!$.tcp)throw Error("TCP connection not initialized");let Q=await $.tcp.send({cmd:"PUSH",queue:Y,data:X,priority:G.priority,delay:G.delay,maxAttempts:G.attempts,backoff:G.backoff,timeout:G.timeout,jobId:G.jobId,removeOnComplete:G.removeOnComplete,removeOnFail:G.removeOnFail,failParentOnFailure:G.failParentOnFailure,removeDependencyOnFailure:G.removeDependencyOnFailure,ignoreDependencyOnFailure:G.ignoreDependencyOnFailure,continueParentOnFailure:G.continueParentOnFailure,dependsOn:J});if(!Q.ok)throw Error(Q.error??"Failed to add job");return Q.id}async function re0($,Y){let{queueName:X,data:G,opts:J,parentRef:Q,childIds:W}=Y;if($.embedded){let H=b0(),{removeOnComplete:z,removeOnFail:V}=ne0(J),F=W.map((N)=>d0(N)),L=await H.push(X,{data:G,priority:J.priority,delay:J.delay,maxAttempts:J.attempts,backoff:J.backoff,timeout:J.timeout,customId:J.jobId,removeOnComplete:z,removeOnFail:V,failParentOnFailure:J.failParentOnFailure,removeDependencyOnFailure:J.removeDependencyOnFailure,ignoreDependencyOnFailure:J.ignoreDependencyOnFailure,continueParentOnFailure:J.continueParentOnFailure,parentId:Q?d0(Q.id):void 0,dependsOn:F.length>0?F:void 0,childrenIds:F.length>0?F:void 0});if(W.length>0)for(let N of W)await H.updateJobParent(d0(N),L.id);return String(L.id)}if(!$.tcp)throw Error("TCP connection not initialized");let K=await $.tcp.send({cmd:"PUSH",queue:X,data:G,priority:J.priority,delay:J.delay,maxAttempts:J.attempts,backoff:J.backoff,timeout:J.timeout,jobId:J.jobId,removeOnComplete:J.removeOnComplete,removeOnFail:J.removeOnFail,failParentOnFailure:J.failParentOnFailure,removeDependencyOnFailure:J.removeDependencyOnFailure,ignoreDependencyOnFailure:J.ignoreDependencyOnFailure,continueParentOnFailure:J.continueParentOnFailure,parentId:Q?.id,childrenIds:W.length>0?W:void 0,dependsOn:W.length>0?W:void 0});if(!K.ok)throw Error(K.error??"Failed to add job");let Z=K.id;if(W.length>0)for(let H of W)await $.tcp.send({cmd:"UpdateParent",childId:H,parentId:Z});return Z}async function vN($,Y){if(Y.length===0)return;if($.embedded){let X=b0(),G=Y.map(async(J)=>{try{await X.cancel(d0(J))}catch{}});await Promise.all(G)}else if($.tcp){let X=Y.map(async(G)=>{try{await $.tcp?.send({cmd:"Cancel",id:G})}catch{}});await Promise.all(X)}}var Xm4=Bun.env.BUNQUEUE_EMBEDDED==="1";class ae0 extends Ym4{closing=Promise.resolve();embedded;tcp;useSharedPool;constructor($={}){super();if(this.embedded=$.embedded??Xm4,this.embedded)this.tcp=null,this.useSharedPool=!1;else{let Y=$.connection??{},X=Y.poolSize??4;if(X===4&&!Y.token)this.tcp=OR({host:Y.host,port:Y.port,poolSize:X,pingInterval:Y.pingInterval,commandTimeout:Y.commandTimeout,pipelining:Y.pipelining,maxInFlight:Y.maxInFlight}),this.useSharedPool=!0;else this.tcp=new TH({host:Y.host??"localhost",port:Y.port??6789,token:Y.token,poolSize:X,pingInterval:Y.pingInterval,commandTimeout:Y.commandTimeout,pipelining:Y.pipelining,maxInFlight:Y.maxInFlight}),this.useSharedPool=!1}}get pushCtx(){return{embedded:this.embedded,tcp:this.tcp}}close(){if(this.tcp&&!this.useSharedPool)this.tcp.close();else if(this.tcp&&this.useSharedPool)VS(this.tcp);return this.closing=Promise.resolve(),this.closing}disconnect(){return this.close()}async waitUntilReady(){if(this.embedded)return;if(this.tcp)await this.tcp.send({cmd:"Ping"})}async add($,Y){let X=[];try{return await this.addFlowNode($,null,X,Y)}catch(G){throw await vN(this.pushCtx,X),G}}async addBulk($){let Y=[],X=[];try{for(let G of $){let J=[],Q=await this.addFlowNode(G,null,J);X.push(...J),Y.push(Q)}return Y}catch(G){throw await vN(this.pushCtx,X),G}}async getFlow($){let{id:Y,queueName:X,depth:G,maxChildren:J}=$;if(this.embedded)return this.getFlowEmbedded(Y,X,G??1/0,J);return this.getFlowTcp(Y,X,G??1/0,J)}async addChain($){if($.length===0)return{jobIds:[]};let Y=[],X=null;try{for(let G of $){let J={name:G.name,__flowParentId:X,...G.data},Q=await wS(this.pushCtx,G.queueName,J,G.opts??{},X?[X]:void 0);Y.push(Q),X=Q}}catch(G){throw await vN(this.pushCtx,Y),G}return{jobIds:Y}}async addBulkThen($,Y){let X=[];try{let G=await Promise.allSettled($.map(async(K)=>{let Z={name:K.name,...K.data};return wS(this.pushCtx,K.queueName,Z,K.opts??{})})),J=[];for(let K of G)if(K.status==="fulfilled")X.push(K.value);else J.push(K.reason);if(J.length>0)throw await vN(this.pushCtx,X),J[0]instanceof Error?J[0]:Error(String(J[0]));let Q={name:Y.name,__flowParentIds:X,...Y.data},W=await wS(this.pushCtx,Y.queueName,Q,Y.opts??{},X);return{parallelIds:X,finalId:W}}catch(G){throw await vN(this.pushCtx,X),G}}async addTree($){let Y=[];try{await this.addTreeNode($,null,Y)}catch(X){throw await vN(this.pushCtx,Y),X}return{jobIds:Y}}getParentResult($){if(!this.embedded)throw Error("getParentResult is only available in embedded mode");return b0().getResult(d0($))}getParentResults($){if(!this.embedded)throw Error("getParentResults is only available in embedded mode");let Y=b0(),X=new Map;for(let G of $){let J=Y.getResult(d0(G));if(J!==void 0)X.set(G,J)}return X}buildCallbacks($){let Y={name:$,embedded:this.embedded,tcp:this.tcp};return{embedded:this.embedded,tcp:this.tcp,updateData:(X,G)=>Nl(Y,X,G),updateProgress:(X,G)=>Fl(Y,X,G),log:(X,G)=>Ll(Y,X,G).then(()=>{}),promote:(X)=>Vl(Y,X),remove:(X)=>Hl(Y,X),changePriority:(X,G)=>Bl(Y,X,{priority:G}),changeDelay:(X,G)=>Al(Y,X,G),clearLogs:(X)=>Dl(Y,X),retry:(X)=>zl(Y,X),getState:(X)=>{if(this.embedded)return b0().getJobState(d0(X));if(!this.tcp)return Promise.resolve("unknown");return this.tcp.send({cmd:"GetState",id:X}).then((G)=>typeof G.state==="string"?G.state:"unknown")}}}async getFlowEmbedded($,Y,X,G){let J=await b0().getJob(d0($));if(J?.queue!==Y)return null;return this.buildJobNode(J,X,G)}async getFlowTcp($,Y,X,G){if(!this.tcp)throw Error("TCP connection not initialized");let J=await this.tcp.send({cmd:"GetJob",id:$});if(!J.ok||!J.job)return null;let Q=J.job;if(Q.queue!==Y)return null;return this.buildJobNodeFromTcp(Q,X,G)}async buildJobNode($,Y,X){let G=$.data,J=typeof G.name==="string"?G.name:"default",Q=xW0(G),W=Rl(String($.id),J,Q,$.queue,this.buildCallbacks($.queue));if(Y<=0||$.childrenIds.length===0)return{job:W};let K=[],Z=X?$.childrenIds.slice(0,X):$.childrenIds;for(let H of Z){let z=await b0().getJob(H);if(z)K.push(await this.buildJobNode(z,Y-1,X))}return{job:W,children:K.length>0?K:void 0}}async buildJobNodeFromTcp($,Y,X){let G=String($.id),J=String($.queue),Q=$.data,W=typeof Q?.name==="string"?Q.name:"default",K=xW0(Q??{}),Z=Q?.__childrenIds,H=Array.isArray(Z)?Z:[],z=Rl(G,W,K,J,this.buildCallbacks(J));if(Y<=0||H.length===0||!this.tcp)return{job:z};let V=[],F=X?H.slice(0,X):H;for(let L of F){let N=await this.tcp.send({cmd:"GetJob",id:L});if(N.ok&&N.job)V.push(await this.buildJobNodeFromTcp(N.job,Y-1,X))}return{job:z,children:V.length>0?V:void 0}}async addFlowNode($,Y,X,G){let J=[],Q=[];if($.children&&$.children.length>0){let V={id:"pending",queue:$.queueName},F=await Promise.all($.children.map((L)=>this.addFlowNode(L,V,X,G)));for(let L of F)J.push(L),Q.push(L.job.id)}let W=G?.queuesOptions?.[$.queueName],K=W?{...W,...$.opts}:$.opts??{},Z={name:$.name,...$.data};if(Y)Z.__parentId=Y.id,Z.__parentQueue=Y.queue;if(Q.length>0)Z.__childrenIds=Q;let H=await re0(this.pushCtx,{queueName:$.queueName,data:Z,opts:K,parentRef:Y,childIds:Q});return X.push(H),{job:Rl(H,$.name,$.data,$.queueName,this.buildCallbacks($.queueName)),children:J.length>0?J:void 0}}async addTreeNode($,Y,X){let G={name:$.name,__flowParentId:Y,...$.data},J=await wS(this.pushCtx,$.queueName,G,$.opts??{},Y?[Y]:void 0);if(X.push(J),$.children)await Promise.all($.children.map((Q)=>this.addTreeNode(Q,J,X)));return J}}var ek4=U6(xN(),1);import{Database as Bm4}from"bun:sqlite";var z0=Symbol.for("drizzle:entityKind");function q0($,Y){if(!$||typeof $!=="object")return!1;if($ instanceof Y)return!0;if(!Object.prototype.hasOwnProperty.call(Y,z0))throw Error(`Class "${Y.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let X=Object.getPrototypeOf($).constructor;if(X)while(X){if(z0 in X&&X[z0]===Y[z0])return!0;X=Object.getPrototypeOf(X)}return!1}class m4{constructor($,Y){this.table=$,this.config=Y,this.name=Y.name,this.keyAsName=Y.keyAsName,this.notNull=Y.notNull,this.default=Y.default,this.defaultFn=Y.defaultFn,this.onUpdateFn=Y.onUpdateFn,this.hasDefault=Y.hasDefault,this.primary=Y.primaryKey,this.isUnique=Y.isUnique,this.uniqueName=Y.uniqueName,this.uniqueType=Y.uniqueType,this.dataType=Y.dataType,this.columnType=Y.columnType,this.generated=Y.generated,this.generatedIdentity=Y.generatedIdentity}static[z0]="Column";name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue($){return $}mapToDriverValue($){return $}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}}class yN{static[z0]="ColumnBuilder";config;constructor($,Y,X){this.config={name:$,keyAsName:$==="",notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:Y,columnType:X,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default($){return this.config.default=$,this.config.hasDefault=!0,this}$defaultFn($){return this.config.defaultFn=$,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn($){return this.config.onUpdateFn=$,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName($){if(this.config.name!=="")return;this.config.name=$}}var F7=Symbol.for("drizzle:Name");class hW0{static[z0]="PgForeignKeyBuilder";reference;_onUpdate="no action";_onDelete="no action";constructor($,Y){if(this.reference=()=>{let{name:X,columns:G,foreignColumns:J}=$();return{name:X,columns:G,foreignTable:J[0].table,foreignColumns:J}},Y)this._onUpdate=Y.onUpdate,this._onDelete=Y.onDelete}onUpdate($){return this._onUpdate=$===void 0?"no action":$,this}onDelete($){return this._onDelete=$===void 0?"no action":$,this}build($){return new se0($,this)}}class se0{constructor($,Y){this.table=$,this.reference=Y.reference,this.onUpdate=Y._onUpdate,this.onDelete=Y._onDelete}static[z0]="PgForeignKey";reference;onUpdate;onDelete;getName(){let{name:$,columns:Y,foreignColumns:X}=this.reference(),G=Y.map((W)=>W.name),J=X.map((W)=>W.name),Q=[this.table[F7],...G,X[0].table[F7],...J];return $??`${Q.join("_")}_fk`}}function ql($,...Y){return $(...Y)}function oe0($,Y){return`${$[F7]}_${Y.join("_")}_unique`}function te0($,Y,X){for(let G=Y;G<$.length;G++){let J=$[G];if(J==="\\"){G++;continue}if(J==='"')return[$.slice(Y,G).replace(/\\/g,""),G+1];if(X)continue;if(J===","||J==="}")return[$.slice(Y,G).replace(/\\/g,""),G]}return[$.slice(Y).replace(/\\/g,""),$.length]}function ee0($,Y=0){let X=[],G=Y,J=!1;while(G<$.length){let Q=$[G];if(Q===","){if(J||G===Y)X.push("");J=!0,G++;continue}if(J=!1,Q==="\\"){G+=2;continue}if(Q==='"'){let[Z,H]=te0($,G+1,!0);X.push(Z),G=H;continue}if(Q==="}")return[X,G+1];if(Q==="{"){let[Z,H]=ee0($,G+1);X.push(Z),G=H;continue}let[W,K]=te0($,G,!1);X.push(W),G=K}return[X,G]}function $01($){let[Y]=ee0($,1);return Y}function fW0($){return`{${$.map((Y)=>{if(Array.isArray(Y))return fW0(Y);if(typeof Y==="string")return`"${Y.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")}"`;return`${Y}`}).join(",")}}`}class L4 extends yN{foreignKeyConfigs=[];static[z0]="PgColumnBuilder";array($){return new X01(this.config.name,this,$)}references($,Y={}){return this.foreignKeyConfigs.push({ref:$,actions:Y}),this}unique($,Y){return this.config.isUnique=!0,this.config.uniqueName=$,this.config.uniqueType=Y?.nulls,this}generatedAlwaysAs($){return this.config.generated={as:$,type:"always",mode:"stored"},this}buildForeignKeys($,Y){return this.foreignKeyConfigs.map(({ref:X,actions:G})=>{return ql((J,Q)=>{let W=new hW0(()=>{let K=J();return{columns:[$],foreignColumns:[K]}});if(Q.onUpdate)W.onUpdate(Q.onUpdate);if(Q.onDelete)W.onDelete(Q.onDelete);return W.build(Y)},X,G)})}buildExtraConfigColumn($){return new Y01($,this.config)}}class g1 extends m4{constructor($,Y){if(!Y.uniqueName)Y.uniqueName=oe0($,[Y.name]);super($,Y);this.table=$}static[z0]="PgColumn"}class Y01 extends g1{static[z0]="ExtraConfigColumn";getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??"asc",nulls:this.config.nulls??"last",opClass:this.config.opClass};defaultConfig={order:"asc",nulls:"last",opClass:void 0};asc(){return this.indexConfig.order="asc",this}desc(){return this.indexConfig.order="desc",this}nullsFirst(){return this.indexConfig.nulls="first",this}nullsLast(){return this.indexConfig.nulls="last",this}op($){return this.indexConfig.opClass=$,this}}class X01 extends L4{static[z0]="PgArrayBuilder";constructor($,Y,X){super($,"array","PgArray");this.config.baseBuilder=Y,this.config.size=X}build($){let Y=this.config.baseBuilder.build($);return new gW0($,this.config,Y)}}class gW0 extends g1{constructor($,Y,X,G){super($,Y);this.baseColumn=X,this.range=G,this.size=Y.size}size;static[z0]="PgArray";getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size==="number"?this.size:""}]`}mapFromDriverValue($){if(typeof $==="string")$=$01($);return $.map((Y)=>this.baseColumn.mapFromDriverValue(Y))}mapToDriverValue($,Y=!1){let X=$.map((G)=>G===null?null:q0(this.baseColumn,gW0)?this.baseColumn.mapToDriverValue(G,!0):this.baseColumn.mapToDriverValue(G));if(Y)return X;return fW0(X)}}class G01 extends L4{static[z0]="PgEnumObjectColumnBuilder";constructor($,Y){super($,"string","PgEnumObjectColumn");this.config.enum=Y}build($){return new J01($,this.config)}}class J01 extends g1{static[z0]="PgEnumObjectColumn";enum;enumValues=this.config.enum.enumValues;constructor($,Y){super($,Y);this.enum=Y.enum}getSQLType(){return this.enum.enumName}}var Pl=Symbol.for("drizzle:isPgEnum");function Q01($){return!!$&&typeof $==="function"&&Pl in $&&$[Pl]===!0}class W01 extends L4{static[z0]="PgEnumColumnBuilder";constructor($,Y){super($,"string","PgEnumColumn");this.config.enum=Y}build($){return new K01($,this.config)}}class K01 extends g1{static[z0]="PgEnumColumn";enum=this.config.enum;enumValues=this.config.enum.enumValues;constructor($,Y){super($,Y);this.enum=Y.enum}getSQLType(){return this.enum.enumName}}function Z01($,Y,X){let G=Object.assign((J)=>new W01(J??"",G),{enumName:$,enumValues:Y,schema:X,[Pl]:!0});return G}function U01($,Y,X){let G=Object.assign((J)=>new G01(J??"",G),{enumName:$,enumValues:Object.values(Y),schema:X,[Pl]:!0});return G}class W6{static[z0]="Subquery";constructor($,Y,X,G=!1,J=[]){this._={brand:"Subquery",sql:$,selectedFields:Y,alias:X,isWith:G,usedTables:J}}}class nQ extends W6{static[z0]="WithSubquery"}var H01="0.45.2";var mW0,uW0,M5={startActiveSpan($,Y){if(!mW0)return Y();if(!uW0)uW0=mW0.trace.getTracer("drizzle-orm",H01);return ql((X,G)=>G.startActiveSpan($,(J)=>{try{return Y(J)}catch(Q){throw J.setStatus({code:X.SpanStatusCode.ERROR,message:Q instanceof Error?Q.message:"Unknown error"}),Q}finally{J.end()}}),mW0,uW0)}};var y6=Symbol.for("drizzle:ViewBaseConfig");var bN=Symbol.for("drizzle:Schema"),lV=Symbol.for("drizzle:Columns"),z01=Symbol.for("drizzle:ExtraConfigColumns"),pW0=Symbol.for("drizzle:OriginalName"),dW0=Symbol.for("drizzle:BaseName"),_S=Symbol.for("drizzle:IsAlias"),V01=Symbol.for("drizzle:ExtraConfigBuilder"),Gm4=Symbol.for("drizzle:IsDrizzleTable");class r0{static[z0]="Table";static Symbol={Name:F7,Schema:bN,OriginalName:pW0,Columns:lV,ExtraConfigColumns:z01,BaseName:dW0,IsAlias:_S,ExtraConfigBuilder:V01};[F7];[pW0];[bN];[lV];[z01];[dW0];[_S]=!1;[Gm4]=!0;[V01]=void 0;constructor($,Y,X){this[F7]=this[pW0]=$,this[bN]=Y,this[dW0]=X}}function J$($){return $[F7]}function G2($){return`${$[bN]??"public"}.${$[F7]}`}function cW0($){return $!==null&&$!==void 0&&typeof $.getSQL==="function"}function Jm4($){let Y={sql:"",params:[]};for(let X of $)if(Y.sql+=X.sql,Y.params.push(...X.params),X.typings?.length){if(!Y.typings)Y.typings=[];Y.typings.push(...X.typings)}return Y}class $Y{static[z0]="StringChunk";value;constructor($){this.value=Array.isArray($)?$:[$]}getSQL(){return new t0([this])}}class t0{constructor($){this.queryChunks=$;for(let Y of $)if(q0(Y,r0)){let X=Y[r0.Symbol.Schema];this.usedTables.push(X===void 0?Y[r0.Symbol.Name]:X+"."+Y[r0.Symbol.Name])}}static[z0]="SQL";decoder=L01;shouldInlineParams=!1;usedTables=[];append($){return this.queryChunks.push(...$.queryChunks),this}toQuery($){return M5.startActiveSpan("drizzle.buildSQL",(Y)=>{let X=this.buildQueryFromSourceParams(this.queryChunks,$);return Y?.setAttributes({"drizzle.query.text":X.sql,"drizzle.query.params":JSON.stringify(X.params)}),X})}buildQueryFromSourceParams($,Y){let X=Object.assign({},Y,{inlineParams:Y.inlineParams||this.shouldInlineParams,paramStartIndex:Y.paramStartIndex||{value:0}}),{casing:G,escapeName:J,escapeParam:Q,prepareTyping:W,inlineParams:K,paramStartIndex:Z}=X;return Jm4($.map((H)=>{if(q0(H,$Y))return{sql:H.value.join(""),params:[]};if(q0(H,wl))return{sql:J(H.value),params:[]};if(H===void 0)return{sql:"",params:[]};if(Array.isArray(H)){let z=[new $Y("(")];for(let[V,F]of H.entries())if(z.push(F),V<H.length-1)z.push(new $Y(", "));return z.push(new $Y(")")),this.buildQueryFromSourceParams(z,X)}if(q0(H,t0))return this.buildQueryFromSourceParams(H.queryChunks,{...X,inlineParams:K||H.shouldInlineParams});if(q0(H,r0)){let z=H[r0.Symbol.Schema],V=H[r0.Symbol.Name];return{sql:z===void 0||H[_S]?J(V):J(z)+"."+J(V),params:[]}}if(q0(H,m4)){let z=G.getColumnCasing(H);if(Y.invokeSource==="indexes")return{sql:J(z),params:[]};let V=H.table[r0.Symbol.Schema];return{sql:H.table[_S]||V===void 0?J(H.table[r0.Symbol.Name])+"."+J(z):J(V)+"."+J(H.table[r0.Symbol.Name])+"."+J(z),params:[]}}if(q0(H,Q$)){let z=H[y6].schema,V=H[y6].name;return{sql:z===void 0||H[y6].isAlias?J(V):J(z)+"."+J(V),params:[]}}if(q0(H,d$)){if(q0(H.value,iV))return{sql:Q(Z.value++,H),params:[H],typings:["none"]};let z=H.value===null?null:H.encoder.mapToDriverValue(H.value);if(q0(z,t0))return this.buildQueryFromSourceParams([z],X);if(K)return{sql:this.mapInlineParam(z,X),params:[]};let V=["none"];if(W)V=[W(H.encoder)];return{sql:Q(Z.value++,z),params:[z],typings:V}}if(q0(H,iV))return{sql:Q(Z.value++,H),params:[H],typings:["none"]};if(q0(H,t0.Aliased)&&H.fieldAlias!==void 0)return{sql:J(H.fieldAlias),params:[]};if(q0(H,W6)){if(H._.isWith)return{sql:J(H._.alias),params:[]};return this.buildQueryFromSourceParams([new $Y("("),H._.sql,new $Y(") "),new wl(H._.alias)],X)}if(Q01(H)){if(H.schema)return{sql:J(H.schema)+"."+J(H.enumName),params:[]};return{sql:J(H.enumName),params:[]}}if(cW0(H)){if(H.shouldOmitSQLParens?.())return this.buildQueryFromSourceParams([H.getSQL()],X);return this.buildQueryFromSourceParams([new $Y("("),H.getSQL(),new $Y(")")],X)}if(K)return{sql:this.mapInlineParam(H,X),params:[]};return{sql:Q(Z.value++,H),params:[H],typings:["none"]}}))}mapInlineParam($,{escapeString:Y}){if($===null)return"null";if(typeof $==="number"||typeof $==="boolean")return $.toString();if(typeof $==="string")return Y($);if(typeof $==="object"){let X=$.toString();if(X==="[object Object]")return Y(JSON.stringify($));return Y(X)}throw Error("Unexpected param value: "+$)}getSQL(){return this}as($){if($===void 0)return this;return new t0.Aliased(this,$)}mapWith($){return this.decoder=typeof $==="function"?{mapFromDriverValue:$}:$,this}inlineParams(){return this.shouldInlineParams=!0,this}if($){return $?this:void 0}}class wl{constructor($){this.value=$}static[z0]="Name";brand;getSQL(){return new t0([this])}}function F01($){return typeof $==="object"&&$!==null&&"mapToDriverValue"in $&&typeof $.mapToDriverValue==="function"}var L01={mapFromDriverValue:($)=>$},D01={mapToDriverValue:($)=>$},Ka9={...L01,...D01};class d${constructor($,Y=D01){this.value=$,this.encoder=Y}static[z0]="Param";brand;getSQL(){return new t0([this])}}function r($,...Y){let X=[];if(Y.length>0||$.length>0&&$[0]!=="")X.push(new $Y($[0]));for(let[G,J]of Y.entries())X.push(J,new $Y($[G+1]));return new t0(X)}(($)=>{function Y(){return new t0([])}$.empty=Y;function X(Z){return new t0(Z)}$.fromList=X;function G(Z){return new t0([new $Y(Z)])}$.raw=G;function J(Z,H){let z=[];for(let[V,F]of Z.entries()){if(V>0&&H!==void 0)z.push(H);z.push(F)}return new t0(z)}$.join=J;function Q(Z){return new wl(Z)}$.identifier=Q;function W(Z){return new iV(Z)}$.placeholder=W;function K(Z,H){return new d$(Z,H)}$.param=K})(r||(r={}));(($)=>{class Y{constructor(X,G){this.sql=X,this.fieldAlias=G}static[z0]="SQL.Aliased";isSelectionField=!1;getSQL(){return this.sql}clone(){return new Y(this.sql,this.fieldAlias)}}$.Aliased=Y})(t0||(t0={}));class iV{constructor($){this.name=$}static[z0]="Placeholder";getSQL(){return new t0([this])}}function qK($,Y){return $.map((X)=>{if(q0(X,iV)){if(!(X.name in Y))throw Error(`No value for placeholder "${X.name}" was provided`);return Y[X.name]}if(q0(X,d$)&&q0(X.value,iV)){if(!(X.value.name in Y))throw Error(`No value for placeholder "${X.value.name}" was provided`);return X.encoder.mapToDriverValue(Y[X.value.name])}return X})}var Qm4=Symbol.for("drizzle:IsDrizzleView");class Q${static[z0]="View";[y6];[Qm4]=!0;constructor({name:$,schema:Y,selectedFields:X,query:G}){this[y6]={name:$,originalName:$,schema:Y,selectedFields:X,query:G,isExisting:!G,isAlias:!1}}getSQL(){return new t0([this])}}m4.prototype.getSQL=function(){return new t0([this])};r0.prototype.getSQL=function(){return new t0([this])};W6.prototype.getSQL=function(){return new t0([this])};class CR{constructor($){this.table=$}static[z0]="ColumnAliasProxyHandler";get($,Y){if(Y==="table")return this.table;return $[Y]}}class jS{constructor($,Y){this.alias=$,this.replaceOriginalName=Y}static[z0]="TableAliasProxyHandler";get($,Y){if(Y===r0.Symbol.IsAlias)return!0;if(Y===r0.Symbol.Name)return this.alias;if(this.replaceOriginalName&&Y===r0.Symbol.OriginalName)return this.alias;if(Y===y6)return{...$[y6],name:this.alias,isAlias:!0};if(Y===r0.Symbol.Columns){let G=$[r0.Symbol.Columns];if(!G)return G;let J={};return Object.keys(G).map((Q)=>{J[Q]=new Proxy(G[Q],new CR(new Proxy($,this)))}),J}let X=$[Y];if(q0(X,m4))return new Proxy(X,new CR(new Proxy($,this)));return X}}function BG($,Y){return new Proxy($,new jS(Y,!1))}function M8($,Y){return new Proxy($,new CR(new Proxy($.table,new jS(Y,!1))))}function nV($,Y){return new t0.Aliased(rQ($.sql,Y),$.fieldAlias)}function rQ($,Y){return r.join($.queryChunks.map((X)=>{if(q0(X,m4))return M8(X,Y);if(q0(X,t0))return rQ(X,Y);if(q0(X,t0.Aliased))return nV(X,Y);return X}))}class aQ extends Error{static[z0]="DrizzleError";constructor({message:$,cause:Y}){super($);this.name="DrizzleError",this.cause=Y}}class M$ extends Error{constructor($,Y,X){super(`Failed query: ${$}
params: ${Y}`);if(this.query=$,this.params=Y,this.cause=X,Error.captureStackTrace(this,M$),X)this.cause=X}}class hN extends aQ{static[z0]="TransactionRollbackError";constructor(){super({message:"Rollback"})}}class N01{static[z0]="ConsoleLogWriter";write($){console.log($)}}class fN{static[z0]="DefaultLogger";writer;constructor($){this.writer=$?.writer??new N01}logQuery($,Y){let X=Y.map((J)=>{try{return JSON.stringify(J)}catch{return String(J)}}),G=X.length?` -- params: [${X.join(", ")}]`:"";this.writer.write(`Query: ${$}${G}`)}}class gN{static[z0]="NoopLogger";logQuery(){}}class r6{static[z0]="QueryPromise";[Symbol.toStringTag]="QueryPromise";catch($){return this.then(void 0,$)}finally($){return this.then((Y)=>{return $?.(),Y},(Y)=>{throw $?.(),Y})}then($,Y){return this.execute().then($,Y)}}function rV($,Y,X){let G={},J=$.reduce((Q,{path:W,field:K},Z)=>{let H;if(q0(K,m4))H=K;else if(q0(K,t0))H=K.decoder;else if(q0(K,W6))H=K._.sql.decoder;else H=K.sql.decoder;let z=Q;for(let[V,F]of W.entries())if(V<W.length-1){if(!(F in z))z[F]={};z=z[F]}else{let L=Y[Z],N=z[F]=L===null?null:H.mapFromDriverValue(L);if(X&&q0(K,m4)&&W.length===2){let D=W[0];if(!(D in G))G[D]=N===null?J$(K.table):!1;else if(typeof G[D]==="string"&&G[D]!==J$(K.table))G[D]=!1}}return Q},{});if(X&&Object.keys(G).length>0){for(let[Q,W]of Object.entries(G))if(typeof W==="string"&&!X[W])J[Q]=null}return J}function x5($,Y){return Object.entries($).reduce((X,[G,J])=>{if(typeof G!=="string")return X;let Q=Y?[...Y,G]:[G];if(q0(J,m4)||q0(J,t0)||q0(J,t0.Aliased)||q0(J,W6))X.push({path:Q,field:J});else if(q0(J,r0))X.push(...x5(J[r0.Symbol.Columns],Q));else X.push(...x5(J,Q));return X},[])}function OG($,Y){let X=Object.keys($),G=Object.keys(Y);if(X.length!==G.length)return!1;for(let[J,Q]of X.entries())if(Q!==G[J])return!1;return!0}function J2($,Y){let X=Object.entries(Y).filter(([,G])=>G!==void 0).map(([G,J])=>{if(q0(J,t0)||q0(J,m4))return[G,J];else return[G,new d$(J,$[r0.Symbol.Columns][G])]});if(X.length===0)throw Error("No values to set");return Object.fromEntries(X)}function SR($,Y){for(let X of Y)for(let G of Object.getOwnPropertyNames(X.prototype)){if(G==="constructor")continue;Object.defineProperty($.prototype,G,Object.getOwnPropertyDescriptor(X.prototype,G)||Object.create(null))}}function IH($){return $[r0.Symbol.Columns]}function GX($){return q0($,W6)?$._.alias:q0($,Q$)?$[y6].name:q0($,t0)?void 0:$[r0.Symbol.IsAlias]?$[r0.Symbol.Name]:$[r0.Symbol.BaseName]}function S1($,Y){return{name:typeof $==="string"&&$.length>0?$:"",config:typeof $==="object"?$:Y}}function kR($){if(typeof $!=="object"||$===null)return!1;if($.constructor.name!=="Object")return!1;if("logger"in $){let Y=typeof $.logger;if(Y!=="boolean"&&(Y!=="object"||typeof $.logger.logQuery!=="function")&&Y!=="undefined")return!1;return!0}if("schema"in $){let Y=typeof $.schema;if(Y!=="object"&&Y!=="undefined")return!1;return!0}if("casing"in $){let Y=typeof $.casing;if(Y!=="string"&&Y!=="undefined")return!1;return!0}if("mode"in $){if($.mode!=="default"||$.mode!=="planetscale"||$.mode!==void 0)return!1;return!0}if("connection"in $){let Y=typeof $.connection;if(Y!=="string"&&Y!=="object"&&Y!=="undefined")return!1;return!0}if("client"in $){let Y=typeof $.client;if(Y!=="object"&&Y!=="function"&&Y!=="undefined")return!1;return!0}if(Object.keys($).length===0)return!0;return!1}var lW0=typeof TextDecoder>"u"?null:new TextDecoder;class aV extends L4{static[z0]="PgIntColumnBaseBuilder";generatedAlwaysAsIdentity($){if($){let{name:Y,...X}=$;this.config.generatedIdentity={type:"always",sequenceName:Y,sequenceOptions:X}}else this.config.generatedIdentity={type:"always"};return this.config.hasDefault=!0,this.config.notNull=!0,this}generatedByDefaultAsIdentity($){if($){let{name:Y,...X}=$;this.config.generatedIdentity={type:"byDefault",sequenceName:Y,sequenceOptions:X}}else this.config.generatedIdentity={type:"byDefault"};return this.config.hasDefault=!0,this.config.notNull=!0,this}}class A01 extends aV{static[z0]="PgBigInt53Builder";constructor($){super($,"number","PgBigInt53")}build($){return new B01($,this.config)}}class B01 extends g1{static[z0]="PgBigInt53";getSQLType(){return"bigint"}mapFromDriverValue($){if(typeof $==="number")return $;return Number($)}}class O01 extends aV{static[z0]="PgBigInt64Builder";constructor($){super($,"bigint","PgBigInt64")}build($){return new E01($,this.config)}}class E01 extends g1{static[z0]="PgBigInt64";getSQLType(){return"bigint"}mapFromDriverValue($){return BigInt($)}}function TS($,Y){let{name:X,config:G}=S1($,Y);if(G.mode==="number")return new A01(X);return new O01(X)}class M01 extends L4{static[z0]="PgBigSerial53Builder";constructor($){super($,"number","PgBigSerial53");this.config.hasDefault=!0,this.config.notNull=!0}build($){return new R01($,this.config)}}class R01 extends g1{static[z0]="PgBigSerial53";getSQLType(){return"bigserial"}mapFromDriverValue($){if(typeof $==="number")return $;return Number($)}}class q01 extends L4{static[z0]="PgBigSerial64Builder";constructor($){super($,"bigint","PgBigSerial64");this.config.hasDefault=!0}build($){return new P01($,this.config)}}class P01 extends g1{static[z0]="PgBigSerial64";getSQLType(){return"bigserial"}mapFromDriverValue($){return BigInt($)}}function IS($,Y){let{name:X,config:G}=S1($,Y);if(G.mode==="number")return new M01(X);return new q01(X)}class w01 extends L4{static[z0]="PgBooleanBuilder";constructor($){super($,"boolean","PgBoolean")}build($){return new _01($,this.config)}}class _01 extends g1{static[z0]="PgBoolean";getSQLType(){return"boolean"}}function CS($){return new w01($??"")}class j01 extends L4{static[z0]="PgCharBuilder";constructor($,Y){super($,"string","PgChar");this.config.length=Y.length,this.config.enumValues=Y.enum}build($){return new T01($,this.config)}}class T01 extends g1{static[z0]="PgChar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"char":`char(${this.length})`}}function SS($,Y={}){let{name:X,config:G}=S1($,Y);return new j01(X,G)}class I01 extends L4{static[z0]="PgCidrBuilder";constructor($){super($,"string","PgCidr")}build($){return new C01($,this.config)}}class C01 extends g1{static[z0]="PgCidr";getSQLType(){return"cidr"}}function S01($){return new I01($??"")}class k01 extends L4{static[z0]="PgCustomColumnBuilder";constructor($,Y,X){super($,"custom","PgCustomColumn");this.config.fieldConfig=Y,this.config.customTypeParams=X}build($){return new v01($,this.config)}}class v01 extends g1{static[z0]="PgCustomColumn";sqlName;mapTo;mapFrom;constructor($,Y){super($,Y);this.sqlName=Y.customTypeParams.dataType(Y.fieldConfig),this.mapTo=Y.customTypeParams.toDriver,this.mapFrom=Y.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue($){return typeof this.mapFrom==="function"?this.mapFrom($):$}mapToDriverValue($){return typeof this.mapTo==="function"?this.mapTo($):$}}function x01($){return(Y,X)=>{let{name:G,config:J}=S1(Y,X);return new k01(G,J,$)}}class CH extends L4{static[z0]="PgDateColumnBaseBuilder";defaultNow(){return this.default(r`now()`)}}class y01 extends CH{static[z0]="PgDateBuilder";constructor($){super($,"date","PgDate")}build($){return new _l($,this.config)}}class _l extends g1{static[z0]="PgDate";getSQLType(){return"date"}mapFromDriverValue($){if(typeof $==="string")return new Date($);return $}mapToDriverValue($){return $.toISOString()}}class b01 extends CH{static[z0]="PgDateStringBuilder";constructor($){super($,"string","PgDateString")}build($){return new jl($,this.config)}}class jl extends g1{static[z0]="PgDateString";getSQLType(){return"date"}mapFromDriverValue($){if(typeof $==="string")return $;return $.toISOString().slice(0,-14)}}function kS($,Y){let{name:X,config:G}=S1($,Y);if(G?.mode==="date")return new y01(X);return new b01(X)}class h01 extends L4{static[z0]="PgDoublePrecisionBuilder";constructor($){super($,"number","PgDoublePrecision")}build($){return new f01($,this.config)}}class f01 extends g1{static[z0]="PgDoublePrecision";getSQLType(){return"double precision"}mapFromDriverValue($){if(typeof $==="string")return Number.parseFloat($);return $}}function vS($){return new h01($??"")}class g01 extends L4{static[z0]="PgInetBuilder";constructor($){super($,"string","PgInet")}build($){return new m01($,this.config)}}class m01 extends g1{static[z0]="PgInet";getSQLType(){return"inet"}}function u01($){return new g01($??"")}class p01 extends aV{static[z0]="PgIntegerBuilder";constructor($){super($,"number","PgInteger")}build($){return new d01($,this.config)}}class d01 extends g1{static[z0]="PgInteger";getSQLType(){return"integer"}mapFromDriverValue($){if(typeof $==="string")return Number.parseInt($);return $}}function xS($){return new p01($??"")}class c01 extends L4{static[z0]="PgIntervalBuilder";constructor($,Y){super($,"string","PgInterval");this.config.intervalConfig=Y}build($){return new l01($,this.config)}}class l01 extends g1{static[z0]="PgInterval";fields=this.config.intervalConfig.fields;precision=this.config.intervalConfig.precision;getSQLType(){let $=this.fields?` ${this.fields}`:"",Y=this.precision?`(${this.precision})`:"";return`interval${$}${Y}`}}function yS($,Y={}){let{name:X,config:G}=S1($,Y);return new c01(X,G)}class i01 extends L4{static[z0]="PgJsonBuilder";constructor($){super($,"json","PgJson")}build($){return new Tl($,this.config)}}class Tl extends g1{static[z0]="PgJson";constructor($,Y){super($,Y)}getSQLType(){return"json"}mapToDriverValue($){return JSON.stringify($)}mapFromDriverValue($){if(typeof $==="string")try{return JSON.parse($)}catch{return $}return $}}function bS($){return new i01($??"")}class n01 extends L4{static[z0]="PgJsonbBuilder";constructor($){super($,"json","PgJsonb")}build($){return new Il($,this.config)}}class Il extends g1{static[z0]="PgJsonb";constructor($,Y){super($,Y)}getSQLType(){return"jsonb"}mapToDriverValue($){return JSON.stringify($)}mapFromDriverValue($){if(typeof $==="string")try{return JSON.parse($)}catch{return $}return $}}function hS($){return new n01($??"")}class r01 extends L4{static[z0]="PgLineBuilder";constructor($){super($,"array","PgLine")}build($){return new a01($,this.config)}}class a01 extends g1{static[z0]="PgLine";getSQLType(){return"line"}mapFromDriverValue($){let[Y,X,G]=$.slice(1,-1).split(",");return[Number.parseFloat(Y),Number.parseFloat(X),Number.parseFloat(G)]}mapToDriverValue($){return`{${$[0]},${$[1]},${$[2]}}`}}class s01 extends L4{static[z0]="PgLineABCBuilder";constructor($){super($,"json","PgLineABC")}build($){return new o01($,this.config)}}class o01 extends g1{static[z0]="PgLineABC";getSQLType(){return"line"}mapFromDriverValue($){let[Y,X,G]=$.slice(1,-1).split(",");return{a:Number.parseFloat(Y),b:Number.parseFloat(X),c:Number.parseFloat(G)}}mapToDriverValue($){return`{${$.a},${$.b},${$.c}}`}}function t01($,Y){let{name:X,config:G}=S1($,Y);if(!G?.mode||G.mode==="tuple")return new r01(X);return new s01(X)}class e01 extends L4{static[z0]="PgMacaddrBuilder";constructor($){super($,"string","PgMacaddr")}build($){return new $11($,this.config)}}class $11 extends g1{static[z0]="PgMacaddr";getSQLType(){return"macaddr"}}function Y11($){return new e01($??"")}class X11 extends L4{static[z0]="PgMacaddr8Builder";constructor($){super($,"string","PgMacaddr8")}build($){return new G11($,this.config)}}class G11 extends g1{static[z0]="PgMacaddr8";getSQLType(){return"macaddr8"}}function J11($){return new X11($??"")}class Q11 extends L4{static[z0]="PgNumericBuilder";constructor($,Y,X){super($,"string","PgNumeric");this.config.precision=Y,this.config.scale=X}build($){return new Cl($,this.config)}}class Cl extends g1{static[z0]="PgNumeric";precision;scale;constructor($,Y){super($,Y);this.precision=Y.precision,this.scale=Y.scale}mapFromDriverValue($){if(typeof $==="string")return $;return String($)}getSQLType(){if(this.precision!==void 0&&this.scale!==void 0)return`numeric(${this.precision}, ${this.scale})`;else if(this.precision===void 0)return"numeric";else return`numeric(${this.precision})`}}class W11 extends L4{static[z0]="PgNumericNumberBuilder";constructor($,Y,X){super($,"number","PgNumericNumber");this.config.precision=Y,this.config.scale=X}build($){return new K11($,this.config)}}class K11 extends g1{static[z0]="PgNumericNumber";precision;scale;constructor($,Y){super($,Y);this.precision=Y.precision,this.scale=Y.scale}mapFromDriverValue($){if(typeof $==="number")return $;return Number($)}mapToDriverValue=String;getSQLType(){if(this.precision!==void 0&&this.scale!==void 0)return`numeric(${this.precision}, ${this.scale})`;else if(this.precision===void 0)return"numeric";else return`numeric(${this.precision})`}}class Z11 extends L4{static[z0]="PgNumericBigIntBuilder";constructor($,Y,X){super($,"bigint","PgNumericBigInt");this.config.precision=Y,this.config.scale=X}build($){return new U11($,this.config)}}class U11 extends g1{static[z0]="PgNumericBigInt";precision;scale;constructor($,Y){super($,Y);this.precision=Y.precision,this.scale=Y.scale}mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){if(this.precision!==void 0&&this.scale!==void 0)return`numeric(${this.precision}, ${this.scale})`;else if(this.precision===void 0)return"numeric";else return`numeric(${this.precision})`}}function fS($,Y){let{name:X,config:G}=S1($,Y),J=G?.mode;return J==="number"?new W11(X,G?.precision,G?.scale):J==="bigint"?new Z11(X,G?.precision,G?.scale):new Q11(X,G?.precision,G?.scale)}class H11 extends L4{static[z0]="PgPointTupleBuilder";constructor($){super($,"array","PgPointTuple")}build($){return new z11($,this.config)}}class z11 extends g1{static[z0]="PgPointTuple";getSQLType(){return"point"}mapFromDriverValue($){if(typeof $==="string"){let[Y,X]=$.slice(1,-1).split(",");return[Number.parseFloat(Y),Number.parseFloat(X)]}return[$.x,$.y]}mapToDriverValue($){return`(${$[0]},${$[1]})`}}class V11 extends L4{static[z0]="PgPointObjectBuilder";constructor($){super($,"json","PgPointObject")}build($){return new F11($,this.config)}}class F11 extends g1{static[z0]="PgPointObject";getSQLType(){return"point"}mapFromDriverValue($){if(typeof $==="string"){let[Y,X]=$.slice(1,-1).split(",");return{x:Number.parseFloat(Y),y:Number.parseFloat(X)}}return $}mapToDriverValue($){return`(${$.x},${$.y})`}}function L11($,Y){let{name:X,config:G}=S1($,Y);if(!G?.mode||G.mode==="tuple")return new H11(X);return new V11(X)}function Wm4($){let Y=[];for(let X=0;X<$.length;X+=2)Y.push(Number.parseInt($.slice(X,X+2),16));return new Uint8Array(Y)}function D11($,Y){let X=new ArrayBuffer(8),G=new DataView(X);for(let J=0;J<8;J++)G.setUint8(J,$[Y+J]);return G.getFloat64(0,!0)}function iW0($){let Y=Wm4($),X=0,G=Y[X];X+=1;let J=new DataView(Y.buffer),Q=J.getUint32(X,G===1);X+=4;let W;if(Q&536870912)W=J.getUint32(X,G===1),X+=4;if((Q&65535)===1){let K=D11(Y,X);X+=8;let Z=D11(Y,X);return X+=8,[K,Z]}throw Error("Unsupported geometry type")}class N11 extends L4{static[z0]="PgGeometryBuilder";constructor($){super($,"array","PgGeometry")}build($){return new A11($,this.config)}}class A11 extends g1{static[z0]="PgGeometry";getSQLType(){return"geometry(point)"}mapFromDriverValue($){return iW0($)}mapToDriverValue($){return`point(${$[0]} ${$[1]})`}}class B11 extends L4{static[z0]="PgGeometryObjectBuilder";constructor($){super($,"json","PgGeometryObject")}build($){return new O11($,this.config)}}class O11 extends g1{static[z0]="PgGeometryObject";getSQLType(){return"geometry(point)"}mapFromDriverValue($){let Y=iW0($);return{x:Y[0],y:Y[1]}}mapToDriverValue($){return`point(${$.x} ${$.y})`}}function E11($,Y){let{name:X,config:G}=S1($,Y);if(!G?.mode||G.mode==="tuple")return new N11(X);return new B11(X)}class M11 extends L4{static[z0]="PgRealBuilder";constructor($,Y){super($,"number","PgReal");this.config.length=Y}build($){return new R11($,this.config)}}class R11 extends g1{static[z0]="PgReal";constructor($,Y){super($,Y)}getSQLType(){return"real"}mapFromDriverValue=($)=>{if(typeof $==="string")return Number.parseFloat($);return $}}function gS($){return new M11($??"")}class q11 extends L4{static[z0]="PgSerialBuilder";constructor($){super($,"number","PgSerial");this.config.hasDefault=!0,this.config.notNull=!0}build($){return new P11($,this.config)}}class P11 extends g1{static[z0]="PgSerial";getSQLType(){return"serial"}}function mS($){return new q11($??"")}class w11 extends aV{static[z0]="PgSmallIntBuilder";constructor($){super($,"number","PgSmallInt")}build($){return new _11($,this.config)}}class _11 extends g1{static[z0]="PgSmallInt";getSQLType(){return"smallint"}mapFromDriverValue=($)=>{if(typeof $==="string")return Number($);return $}}function uS($){return new w11($??"")}class j11 extends L4{static[z0]="PgSmallSerialBuilder";constructor($){super($,"number","PgSmallSerial");this.config.hasDefault=!0,this.config.notNull=!0}build($){return new T11($,this.config)}}class T11 extends g1{static[z0]="PgSmallSerial";getSQLType(){return"smallserial"}}function pS($){return new j11($??"")}class I11 extends L4{static[z0]="PgTextBuilder";constructor($,Y){super($,"string","PgText");this.config.enumValues=Y.enum}build($){return new C11($,this.config)}}class C11 extends g1{static[z0]="PgText";enumValues=this.config.enumValues;getSQLType(){return"text"}}function dS($,Y={}){let{name:X,config:G}=S1($,Y);return new I11(X,G)}class S11 extends CH{constructor($,Y,X){super($,"string","PgTime");this.withTimezone=Y,this.precision=X,this.config.withTimezone=Y,this.config.precision=X}static[z0]="PgTimeBuilder";build($){return new Sl($,this.config)}}class Sl extends g1{static[z0]="PgTime";withTimezone;precision;constructor($,Y){super($,Y);this.withTimezone=Y.withTimezone,this.precision=Y.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}function cS($,Y={}){let{name:X,config:G}=S1($,Y);return new S11(X,G.withTimezone??!1,G.precision)}class k11 extends CH{static[z0]="PgTimestampBuilder";constructor($,Y,X){super($,"date","PgTimestamp");this.config.withTimezone=Y,this.config.precision=X}build($){return new kl($,this.config)}}class kl extends g1{static[z0]="PgTimestamp";withTimezone;precision;constructor($,Y){super($,Y);this.withTimezone=Y.withTimezone,this.precision=Y.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue($){if(typeof $==="string")return new Date(this.withTimezone?$:$+"+0000");return $}mapToDriverValue=($)=>{return $.toISOString()}}class v11 extends CH{static[z0]="PgTimestampStringBuilder";constructor($,Y,X){super($,"string","PgTimestampString");this.config.withTimezone=Y,this.config.precision=X}build($){return new vl($,this.config)}}class vl extends g1{static[z0]="PgTimestampString";withTimezone;precision;constructor($,Y){super($,Y);this.withTimezone=Y.withTimezone,this.precision=Y.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue($){if(typeof $==="string")return $;let Y=$.toISOString().slice(0,-1).replace("T"," ");if(this.withTimezone){let X=$.getTimezoneOffset(),G=X<=0?"+":"-";return`${Y}${G}${Math.floor(Math.abs(X)/60).toString().padStart(2,"0")}`}return Y}}function lS($,Y={}){let{name:X,config:G}=S1($,Y);if(G?.mode==="string")return new v11(X,G.withTimezone??!1,G.precision);return new k11(X,G?.withTimezone??!1,G?.precision)}class x11 extends L4{static[z0]="PgUUIDBuilder";constructor($){super($,"string","PgUUID")}defaultRandom(){return this.default(r`gen_random_uuid()`)}build($){return new xl($,this.config)}}class xl extends g1{static[z0]="PgUUID";getSQLType(){return"uuid"}}function y11($){return new x11($??"")}class b11 extends L4{static[z0]="PgVarcharBuilder";constructor($,Y){super($,"string","PgVarchar");this.config.length=Y.length,this.config.enumValues=Y.enum}build($){return new h11($,this.config)}}class h11 extends g1{static[z0]="PgVarchar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"varchar":`varchar(${this.length})`}}function iS($,Y={}){let{name:X,config:G}=S1($,Y);return new b11(X,G)}class f11 extends L4{static[z0]="PgBinaryVectorBuilder";constructor($,Y){super($,"string","PgBinaryVector");this.config.dimensions=Y.dimensions}build($){return new g11($,this.config)}}class g11 extends g1{static[z0]="PgBinaryVector";dimensions=this.config.dimensions;getSQLType(){return`bit(${this.dimensions})`}}function m11($,Y){let{name:X,config:G}=S1($,Y);return new f11(X,G)}class u11 extends L4{static[z0]="PgHalfVectorBuilder";constructor($,Y){super($,"array","PgHalfVector");this.config.dimensions=Y.dimensions}build($){return new p11($,this.config)}}class p11 extends g1{static[z0]="PgHalfVector";dimensions=this.config.dimensions;getSQLType(){return`halfvec(${this.dimensions})`}mapToDriverValue($){return JSON.stringify($)}mapFromDriverValue($){return $.slice(1,-1).split(",").map((Y)=>Number.parseFloat(Y))}}function d11($,Y){let{name:X,config:G}=S1($,Y);return new u11(X,G)}class c11 extends L4{static[z0]="PgSparseVectorBuilder";constructor($,Y){super($,"string","PgSparseVector");this.config.dimensions=Y.dimensions}build($){return new l11($,this.config)}}class l11 extends g1{static[z0]="PgSparseVector";dimensions=this.config.dimensions;getSQLType(){return`sparsevec(${this.dimensions})`}}function i11($,Y){let{name:X,config:G}=S1($,Y);return new c11(X,G)}class n11 extends L4{static[z0]="PgVectorBuilder";constructor($,Y){super($,"array","PgVector");this.config.dimensions=Y.dimensions}build($){return new r11($,this.config)}}class r11 extends g1{static[z0]="PgVector";dimensions=this.config.dimensions;getSQLType(){return`vector(${this.dimensions})`}mapToDriverValue($){return JSON.stringify($)}mapFromDriverValue($){return $.slice(1,-1).split(",").map((Y)=>Number.parseFloat(Y))}}function a11($,Y){let{name:X,config:G}=S1($,Y);return new n11(X,G)}function s11(){return{bigint:TS,bigserial:IS,boolean:CS,char:SS,cidr:S01,customType:x01,date:kS,doublePrecision:vS,inet:u01,integer:xS,interval:yS,json:bS,jsonb:hS,line:t01,macaddr:Y11,macaddr8:J11,numeric:fS,point:L11,geometry:E11,real:gS,serial:mS,smallint:uS,smallserial:pS,text:dS,time:cS,timestamp:lS,uuid:y11,varchar:iS,bit:m11,halfvec:d11,sparsevec:i11,vector:a11}}var nW0=Symbol.for("drizzle:PgInlineForeignKeys"),o11=Symbol.for("drizzle:EnableRLS");class YY extends r0{static[z0]="PgTable";static Symbol=Object.assign({},r0.Symbol,{InlineForeignKeys:nW0,EnableRLS:o11});[nW0]=[];[o11]=!1;[r0.Symbol.ExtraConfigBuilder]=void 0;[r0.Symbol.ExtraConfigColumns]={}}function rW0($,Y,X,G,J=$){let Q=new YY($,G,J),W=typeof Y==="function"?Y(s11()):Y,K=Object.fromEntries(Object.entries(W).map(([z,V])=>{let F=V;F.setName(z);let L=F.build(Q);return Q[nW0].push(...F.buildForeignKeys(L,Q)),[z,L]})),Z=Object.fromEntries(Object.entries(W).map(([z,V])=>{let F=V;F.setName(z);let L=F.buildExtraConfigColumn(Q);return[z,L]})),H=Object.assign(Q,K);if(H[r0.Symbol.Columns]=K,H[r0.Symbol.ExtraConfigColumns]=Z,X)H[YY.Symbol.ExtraConfigBuilder]=X;return Object.assign(H,{enableRLS:()=>{return H[YY.Symbol.EnableRLS]=!0,H}})}var mN=($,Y,X)=>{return rW0($,Y,X,void 0)};class aW0{static[z0]="PgPrimaryKeyBuilder";columns;name;constructor($,Y){this.columns=$,this.name=Y}build($){return new t11($,this.columns,this.name)}}class t11{constructor($,Y,X){this.table=$,this.columns=Y,this.name=X}static[z0]="PgPrimaryKey";columns;name;getName(){return this.name??`${this.table[YY.Symbol.Name]}_${this.columns.map(($)=>$.name).join("_")}_pk`}}function yJ($,Y){if(F01(Y)&&!cW0($)&&!q0($,d$)&&!q0($,iV)&&!q0($,m4)&&!q0($,r0)&&!q0($,Q$))return new d$($,Y);return $}var _1=($,Y)=>{return r`${$} = ${yJ(Y,$)}`},e11=($,Y)=>{return r`${$} <> ${yJ(Y,$)}`};function c$(...$){let Y=$.filter((X)=>X!==void 0);if(Y.length===0)return;if(Y.length===1)return new t0(Y);return new t0([new $Y("("),r.join(Y,new $Y(" and ")),new $Y(")")])}function $41(...$){let Y=$.filter((X)=>X!==void 0);if(Y.length===0)return;if(Y.length===1)return new t0(Y);return new t0([new $Y("("),r.join(Y,new $Y(" or ")),new $Y(")")])}function Y41($){return r`not ${$}`}var X41=($,Y)=>{return r`${$} > ${yJ(Y,$)}`},G41=($,Y)=>{return r`${$} >= ${yJ(Y,$)}`},J41=($,Y)=>{return r`${$} < ${yJ(Y,$)}`},Q41=($,Y)=>{return r`${$} <= ${yJ(Y,$)}`};function sW0($,Y){if(Array.isArray(Y)){if(Y.length===0)return r`false`;return r`${$} in ${Y.map((X)=>yJ(X,$))}`}return r`${$} in ${yJ(Y,$)}`}function W41($,Y){if(Array.isArray(Y)){if(Y.length===0)return r`true`;return r`${$} not in ${Y.map((X)=>yJ(X,$))}`}return r`${$} not in ${yJ(Y,$)}`}function K41($){return r`${$} is null`}function Z41($){return r`${$} is not null`}function U41($){return r`exists ${$}`}function H41($){return r`not exists ${$}`}function z41($,Y,X){return r`${$} between ${yJ(Y,$)} and ${yJ(X,$)}`}function V41($,Y,X){return r`${$} not between ${yJ(Y,$)} and ${yJ(X,$)}`}function F41($,Y){return r`${$} like ${Y}`}function L41($,Y){return r`${$} not like ${Y}`}function D41($,Y){return r`${$} ilike ${Y}`}function N41($,Y){return r`${$} not ilike ${Y}`}function SH($){return r`${$} asc`}function sQ($){return r`${$} desc`}class oW0{constructor($,Y,X){this.sourceTable=$,this.referencedTable=Y,this.relationName=X,this.referencedTableName=Y[r0.Symbol.Name]}static[z0]="Relation";referencedTableName;fieldName}class A41{constructor($,Y){this.table=$,this.config=Y}static[z0]="Relations"}class oQ extends oW0{constructor($,Y,X,G){super($,Y,X?.relationName);this.config=X,this.isNullable=G}static[z0]="One";withFieldName($){let Y=new oQ(this.sourceTable,this.referencedTable,this.config,this.isNullable);return Y.fieldName=$,Y}}class PK extends oW0{constructor($,Y,X){super($,Y,X?.relationName);this.config=X}static[z0]="Many";withFieldName($){let Y=new PK(this.sourceTable,this.referencedTable,this.config);return Y.fieldName=$,Y}}function uN(){return{and:c$,between:z41,eq:_1,exists:U41,gt:X41,gte:G41,ilike:D41,inArray:sW0,isNull:K41,isNotNull:Z41,like:F41,lt:J41,lte:Q41,ne:e11,not:Y41,notBetween:V41,notExists:H41,notLike:L41,notIlike:N41,notInArray:W41,or:$41,sql:r}}function pN(){return{sql:r,asc:SH,desc:sQ}}function vR($,Y){if(Object.keys($).length===1&&"default"in $&&!q0($.default,r0))$=$.default;let X={},G={},J={};for(let[Q,W]of Object.entries($))if(q0(W,r0)){let K=G2(W),Z=G[K];X[K]=Q,J[Q]={tsName:Q,dbName:W[r0.Symbol.Name],schema:W[r0.Symbol.Schema],columns:W[r0.Symbol.Columns],relations:Z?.relations??{},primaryKey:Z?.primaryKey??[]};for(let z of Object.values(W[r0.Symbol.Columns]))if(z.primary)J[Q].primaryKey.push(z);let H=W[r0.Symbol.ExtraConfigBuilder]?.(W[r0.Symbol.ExtraConfigColumns]);if(H){for(let z of Object.values(H))if(q0(z,aW0))J[Q].primaryKey.push(...z.columns)}}else if(q0(W,A41)){let K=G2(W.table),Z=X[K],H=W.config(Y(W.table)),z;for(let[V,F]of Object.entries(H))if(Z){let L=J[Z];if(L.relations[V]=F,z)L.primaryKey.push(...z)}else{if(!(K in G))G[K]={relations:{},primaryKey:z};G[K].relations[V]=F}}return{tables:J,tableNamesMap:X}}function Km4($){return function(X,G){return new oQ($,X,G,G?.fields.reduce((J,Q)=>J&&Q.notNull,!0)??!1)}}function Zm4($){return function(X,G){return new PK($,X,G)}}function dN($,Y,X){if(q0(X,oQ)&&X.config)return{fields:X.config.fields,references:X.config.references};let G=Y[G2(X.referencedTable)];if(!G)throw Error(`Table "${X.referencedTable[r0.Symbol.Name]}" not found in schema`);let J=$[G];if(!J)throw Error(`Table "${G}" not found in schema`);let Q=X.sourceTable,W=Y[G2(Q)];if(!W)throw Error(`Table "${Q[r0.Symbol.Name]}" not found in schema`);let K=[];for(let Z of Object.values(J.relations))if(X.relationName&&X!==Z&&Z.relationName===X.relationName||!X.relationName&&Z.referencedTable===X.sourceTable)K.push(Z);if(K.length>1)throw X.relationName?Error(`There are multiple relations with name "${X.relationName}" in table "${G}"`):Error(`There are multiple relations between "${G}" and "${X.sourceTable[r0.Symbol.Name]}". Please specify relation name`);if(K[0]&&q0(K[0],oQ)&&K[0].config)return{fields:K[0].config.references,references:K[0].config.fields};throw Error(`There is not enough information to infer relation "${W}.${X.fieldName}"`)}function xR($){return{one:Km4($),many:Zm4($)}}function sV($,Y,X,G,J=(Q)=>Q){let Q={};for(let[W,K]of G.entries())if(K.isJson){let Z=Y.relations[K.tsKey],H=X[W],z=typeof H==="string"?JSON.parse(H):H;Q[K.tsKey]=q0(Z,oQ)?z&&sV($,$[K.relationTableTsKey],z,K.selection,J):z.map((V)=>sV($,$[K.relationTableTsKey],V,K.selection,J))}else{let Z=J(X[W]),H=K.field,z;if(q0(H,m4))z=H;else if(q0(H,t0))z=H.decoder;else z=H.sql.decoder;Q[K.tsKey]=Z===null?null:z.mapFromDriverValue(Z)}return Q}import{Database as pl}from"bun:sqlite";class q4{static[z0]="SelectionProxyHandler";config;constructor($){this.config={...$}}get($,Y){if(Y==="_")return{...$._,selectedFields:new Proxy($._.selectedFields,this)};if(Y===y6)return{...$[y6],selectedFields:new Proxy($[y6].selectedFields,this)};if(typeof Y==="symbol")return $[Y];let G=(q0($,W6)?$._.selectedFields:q0($,Q$)?$[y6].selectedFields:$)[Y];if(q0(G,t0.Aliased)){if(this.config.sqlAliasedBehavior==="sql"&&!G.isSelectionField)return G.sql;let J=G.clone();return J.isSelectionField=!0,J}if(q0(G,t0)){if(this.config.sqlBehavior==="sql")return G;throw Error(`You tried to reference "${Y}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`)}if(q0(G,m4)){if(this.config.alias)return new Proxy(G,new CR(new Proxy(G.table,new jS(this.config.alias,this.config.replaceOriginalName??!1))));return G}if(typeof G!=="object"||G===null)return G;return new Proxy(G,new q4(this.config))}}class tW0{static[z0]="SQLiteForeignKeyBuilder";reference;_onUpdate;_onDelete;constructor($,Y){if(this.reference=()=>{let{name:X,columns:G,foreignColumns:J}=$();return{name:X,columns:G,foreignTable:J[0].table,foreignColumns:J}},Y)this._onUpdate=Y.onUpdate,this._onDelete=Y.onDelete}onUpdate($){return this._onUpdate=$,this}onDelete($){return this._onDelete=$,this}build($){return new B41($,this)}}class B41{constructor($,Y){this.table=$,this.reference=Y.reference,this.onUpdate=Y._onUpdate,this.onDelete=Y._onDelete}static[z0]="SQLiteForeignKey";reference;onUpdate;onDelete;getName(){let{name:$,columns:Y,foreignColumns:X}=this.reference(),G=Y.map((W)=>W.name),J=X.map((W)=>W.name),Q=[this.table[F7],...G,X[0].table[F7],...J];return $??`${Q.join("_")}_fk`}}function O41($,Y){return`${$[F7]}_${Y.join("_")}_unique`}class PY extends yN{static[z0]="SQLiteColumnBuilder";foreignKeyConfigs=[];references($,Y={}){return this.foreignKeyConfigs.push({ref:$,actions:Y}),this}unique($){return this.config.isUnique=!0,this.config.uniqueName=$,this}generatedAlwaysAs($,Y){return this.config.generated={as:$,type:"always",mode:Y?.mode??"virtual"},this}buildForeignKeys($,Y){return this.foreignKeyConfigs.map(({ref:X,actions:G})=>{return((J,Q)=>{let W=new tW0(()=>{let K=J();return{columns:[$],foreignColumns:[K]}});if(Q.onUpdate)W.onUpdate(Q.onUpdate);if(Q.onDelete)W.onDelete(Q.onDelete);return W.build(Y)})(X,G)})}}class l$ extends m4{constructor($,Y){if(!Y.uniqueName)Y.uniqueName=O41($,[Y.name]);super($,Y);this.table=$}static[z0]="SQLiteColumn"}class E41 extends PY{static[z0]="SQLiteBigIntBuilder";constructor($){super($,"bigint","SQLiteBigInt")}build($){return new M41($,this.config)}}class M41 extends l${static[z0]="SQLiteBigInt";getSQLType(){return"blob"}mapFromDriverValue($){if(typeof Buffer<"u"&&Buffer.from){let Y=Buffer.isBuffer($)?$:$ instanceof ArrayBuffer?Buffer.from($):$.buffer?Buffer.from($.buffer,$.byteOffset,$.byteLength):Buffer.from($);return BigInt(Y.toString("utf8"))}return BigInt(lW0.decode($))}mapToDriverValue($){return Buffer.from($.toString())}}class R41 extends PY{static[z0]="SQLiteBlobJsonBuilder";constructor($){super($,"json","SQLiteBlobJson")}build($){return new q41($,this.config)}}class q41 extends l${static[z0]="SQLiteBlobJson";getSQLType(){return"blob"}mapFromDriverValue($){if(typeof Buffer<"u"&&Buffer.from){let Y=Buffer.isBuffer($)?$:$ instanceof ArrayBuffer?Buffer.from($):$.buffer?Buffer.from($.buffer,$.byteOffset,$.byteLength):Buffer.from($);return JSON.parse(Y.toString("utf8"))}return JSON.parse(lW0.decode($))}mapToDriverValue($){return Buffer.from(JSON.stringify($))}}class P41 extends PY{static[z0]="SQLiteBlobBufferBuilder";constructor($){super($,"buffer","SQLiteBlobBuffer")}build($){return new w41($,this.config)}}class w41 extends l${static[z0]="SQLiteBlobBuffer";mapFromDriverValue($){if(Buffer.isBuffer($))return $;return Buffer.from($)}getSQLType(){return"blob"}}function cN($,Y){let{name:X,config:G}=S1($,Y);if(G?.mode==="json")return new R41(X);if(G?.mode==="bigint")return new E41(X);return new P41(X)}class _41 extends PY{static[z0]="SQLiteCustomColumnBuilder";constructor($,Y,X){super($,"custom","SQLiteCustomColumn");this.config.fieldConfig=Y,this.config.customTypeParams=X}build($){return new j41($,this.config)}}class j41 extends l${static[z0]="SQLiteCustomColumn";sqlName;mapTo;mapFrom;constructor($,Y){super($,Y);this.sqlName=Y.customTypeParams.dataType(Y.fieldConfig),this.mapTo=Y.customTypeParams.toDriver,this.mapFrom=Y.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue($){return typeof this.mapFrom==="function"?this.mapFrom($):$}mapToDriverValue($){return typeof this.mapTo==="function"?this.mapTo($):$}}function T41($){return(Y,X)=>{let{name:G,config:J}=S1(Y,X);return new _41(G,J,$)}}class yl extends PY{static[z0]="SQLiteBaseIntegerBuilder";constructor($,Y,X){super($,Y,X);this.config.autoIncrement=!1}primaryKey($){if($?.autoIncrement)this.config.autoIncrement=!0;return this.config.hasDefault=!0,super.primaryKey()}}class bl extends l${static[z0]="SQLiteBaseInteger";autoIncrement=this.config.autoIncrement;getSQLType(){return"integer"}}class I41 extends yl{static[z0]="SQLiteIntegerBuilder";constructor($){super($,"number","SQLiteInteger")}build($){return new C41($,this.config)}}class C41 extends bl{static[z0]="SQLiteInteger"}class S41 extends yl{static[z0]="SQLiteTimestampBuilder";constructor($,Y){super($,"date","SQLiteTimestamp");this.config.mode=Y}defaultNow(){return this.default(r`(cast((julianday('now') - 2440587.5)*86400000 as integer))`)}build($){return new k41($,this.config)}}class k41 extends bl{static[z0]="SQLiteTimestamp";mode=this.config.mode;mapFromDriverValue($){if(this.config.mode==="timestamp")return new Date($*1000);return new Date($)}mapToDriverValue($){let Y=$.getTime();if(this.config.mode==="timestamp")return Math.floor(Y/1000);return Y}}class v41 extends yl{static[z0]="SQLiteBooleanBuilder";constructor($,Y){super($,"boolean","SQLiteBoolean");this.config.mode=Y}build($){return new x41($,this.config)}}class x41 extends bl{static[z0]="SQLiteBoolean";mode=this.config.mode;mapFromDriverValue($){return Number($)===1}mapToDriverValue($){return $?1:0}}function m1($,Y){let{name:X,config:G}=S1($,Y);if(G?.mode==="timestamp"||G?.mode==="timestamp_ms")return new S41(X,G.mode);if(G?.mode==="boolean")return new v41(X,G.mode);return new I41(X)}class y41 extends PY{static[z0]="SQLiteNumericBuilder";constructor($){super($,"string","SQLiteNumeric")}build($){return new b41($,this.config)}}class b41 extends l${static[z0]="SQLiteNumeric";mapFromDriverValue($){if(typeof $==="string")return $;return String($)}getSQLType(){return"numeric"}}class h41 extends PY{static[z0]="SQLiteNumericNumberBuilder";constructor($){super($,"number","SQLiteNumericNumber")}build($){return new f41($,this.config)}}class f41 extends l${static[z0]="SQLiteNumericNumber";mapFromDriverValue($){if(typeof $==="number")return $;return Number($)}mapToDriverValue=String;getSQLType(){return"numeric"}}class g41 extends PY{static[z0]="SQLiteNumericBigIntBuilder";constructor($){super($,"bigint","SQLiteNumericBigInt")}build($){return new m41($,this.config)}}class m41 extends l${static[z0]="SQLiteNumericBigInt";mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){return"numeric"}}function nS($,Y){let{name:X,config:G}=S1($,Y),J=G?.mode;return J==="number"?new h41(X):J==="bigint"?new g41(X):new y41(X)}class u41 extends PY{static[z0]="SQLiteRealBuilder";constructor($){super($,"number","SQLiteReal")}build($){return new p41($,this.config)}}class p41 extends l${static[z0]="SQLiteReal";getSQLType(){return"real"}}function rS($){return new u41($??"")}class d41 extends PY{static[z0]="SQLiteTextBuilder";constructor($,Y){super($,"string","SQLiteText");this.config.enumValues=Y.enum,this.config.length=Y.length}build($){return new c41($,this.config)}}class c41 extends l${static[z0]="SQLiteText";enumValues=this.config.enumValues;length=this.config.length;constructor($,Y){super($,Y)}getSQLType(){return`text${this.config.length?`(${this.config.length})`:""}`}}class l41 extends PY{static[z0]="SQLiteTextJsonBuilder";constructor($){super($,"json","SQLiteTextJson")}build($){return new i41($,this.config)}}class i41 extends l${static[z0]="SQLiteTextJson";getSQLType(){return"text"}mapFromDriverValue($){return JSON.parse($)}mapToDriverValue($){return JSON.stringify($)}}function g0($,Y={}){let{name:X,config:G}=S1($,Y);if(G.mode==="json")return new l41(X);return new d41(X,G)}function n41(){return{blob:cN,customType:T41,integer:m1,numeric:nS,real:rS,text:g0}}var eW0=Symbol.for("drizzle:SQLiteInlineForeignKeys");class wY extends r0{static[z0]="SQLiteTable";static Symbol=Object.assign({},r0.Symbol,{InlineForeignKeys:eW0});[r0.Symbol.Columns];[eW0]=[];[r0.Symbol.ExtraConfigBuilder]=void 0}function Um4($,Y,X,G,J=$){let Q=new wY($,G,J),W=typeof Y==="function"?Y(n41()):Y,K=Object.fromEntries(Object.entries(W).map(([H,z])=>{let V=z;V.setName(H);let F=V.build(Q);return Q[eW0].push(...V.buildForeignKeys(F,Q)),[H,F]})),Z=Object.assign(Q,K);if(Z[r0.Symbol.Columns]=K,Z[r0.Symbol.ExtraConfigColumns]=K,X)Z[wY.Symbol.ExtraConfigBuilder]=X;return Z}var B6=($,Y,X)=>{return Um4($,Y,X)};function wK($){if(q0($,wY))return[`${$[r0.Symbol.BaseName]}`];if(q0($,W6))return $._.usedTables??[];if(q0($,t0))return $.usedTables??[];return[]}class hl extends r6{constructor($,Y,X,G){super();this.table=$,this.session=Y,this.dialect=X,this.config={table:$,withList:G}}static[z0]="SQLiteDelete";config;where($){return this.config.where=$,this}orderBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.table[r0.Symbol.Columns],new q4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),X=Array.isArray(Y)?Y:[Y];this.config.orderBy=X}else{let Y=$;this.config.orderBy=Y}return this}limit($){return this.config.limit=$,this}returning($=this.table[wY.Symbol.Columns]){return this.config.returning=x5($),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}_prepare($=!0){return this.session[$?"prepareOneTimeQuery":"prepareQuery"](this.dialect.sqlToQuery(this.getSQL()),this.config.returning,this.config.returning?"all":"run",!0,void 0,{type:"delete",tables:wK(this.config.table)})}prepare(){return this._prepare(!1)}run=($)=>{return this._prepare().run($)};all=($)=>{return this._prepare().all($)};get=($)=>{return this._prepare().get($)};values=($)=>{return this._prepare().values($)};async execute($){return this._prepare().execute($)}$dynamic(){return this}}function Hm4($){return($.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).map((X)=>X.toLowerCase()).join("_")}function zm4($){return($.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).reduce((X,G,J)=>{let Q=J===0?G.toLowerCase():`${G[0].toUpperCase()}${G.slice(1)}`;return X+Q},"")}function Vm4($){return $}class lN{static[z0]="CasingCache";cache={};cachedTables={};convert;constructor($){this.convert=$==="snake_case"?Hm4:$==="camelCase"?zm4:Vm4}getColumnCasing($){if(!$.keyAsName)return $.name;let Y=$.table[r0.Symbol.Schema]??"public",X=$.table[r0.Symbol.OriginalName],G=`${Y}.${X}.${$.name}`;if(!this.cache[G])this.cacheTable($.table);return this.cache[G]}cacheTable($){let Y=$[r0.Symbol.Schema]??"public",X=$[r0.Symbol.OriginalName],G=`${Y}.${X}`;if(!this.cachedTables[G]){for(let J of Object.values($[r0.Symbol.Columns])){let Q=`${G}.${J.name}`;this.cache[Q]=this.convert(J.name)}this.cachedTables[G]=!0}}clearCache(){this.cache={},this.cachedTables={}}}class iN extends Q${static[z0]="SQLiteViewBase"}class aS{static[z0]="SQLiteDialect";casing;constructor($){this.casing=new lN($?.casing)}escapeName($){return`"${$.replace(/"/g,'""')}"`}escapeParam($){return"?"}escapeString($){return`'${$.replace(/'/g,"''")}'`}buildWithCTE($){if(!$?.length)return;let Y=[r`with `];for(let[X,G]of $.entries())if(Y.push(r`${r.identifier(G._.alias)} as (${G._.sql})`),X<$.length-1)Y.push(r`, `);return Y.push(r` `),r.join(Y)}buildDeleteQuery({table:$,where:Y,returning:X,withList:G,limit:J,orderBy:Q}){let W=this.buildWithCTE(G),K=X?r` returning ${this.buildSelection(X,{isSingleTable:!0})}`:void 0,Z=Y?r` where ${Y}`:void 0,H=this.buildOrderBy(Q),z=this.buildLimit(J);return r`${W}delete from ${$}${Z}${K}${H}${z}`}buildUpdateSet($,Y){let X=$[r0.Symbol.Columns],G=Object.keys(X).filter((Q)=>Y[Q]!==void 0||X[Q]?.onUpdateFn!==void 0),J=G.length;return r.join(G.flatMap((Q,W)=>{let K=X[Q],Z=K.onUpdateFn?.(),H=Y[Q]??(q0(Z,t0)?Z:r.param(Z,K)),z=r`${r.identifier(this.casing.getColumnCasing(K))} = ${H}`;if(W<J-1)return[z,r.raw(", ")];return[z]}))}buildUpdateQuery({table:$,set:Y,where:X,returning:G,withList:J,joins:Q,from:W,limit:K,orderBy:Z}){let H=this.buildWithCTE(J),z=this.buildUpdateSet($,Y),V=W&&r.join([r.raw(" from "),this.buildFromTable(W)]),F=this.buildJoins(Q),L=G?r` returning ${this.buildSelection(G,{isSingleTable:!0})}`:void 0,N=X?r` where ${X}`:void 0,D=this.buildOrderBy(Z),A=this.buildLimit(K);return r`${H}update ${$} set ${z}${V}${F}${N}${L}${D}${A}`}buildSelection($,{isSingleTable:Y=!1}={}){let X=$.length,G=$.flatMap(({field:J},Q)=>{let W=[];if(q0(J,t0.Aliased)&&J.isSelectionField)W.push(r.identifier(J.fieldAlias));else if(q0(J,t0.Aliased)||q0(J,t0)){let K=q0(J,t0.Aliased)?J.sql:J;if(Y)W.push(new t0(K.queryChunks.map((Z)=>{if(q0(Z,m4))return r.identifier(this.casing.getColumnCasing(Z));return Z})));else W.push(K);if(q0(J,t0.Aliased))W.push(r` as ${r.identifier(J.fieldAlias)}`)}else if(q0(J,m4)){let K=J.table[r0.Symbol.Name];if(J.columnType==="SQLiteNumericBigInt")if(Y)W.push(r`cast(${r.identifier(this.casing.getColumnCasing(J))} as text)`);else W.push(r`cast(${r.identifier(K)}.${r.identifier(this.casing.getColumnCasing(J))} as text)`);else if(Y)W.push(r.identifier(this.casing.getColumnCasing(J)));else W.push(r`${r.identifier(K)}.${r.identifier(this.casing.getColumnCasing(J))}`)}else if(q0(J,W6)){let K=Object.entries(J._.selectedFields);if(K.length===1){let Z=K[0][1],H=q0(Z,t0)?Z.decoder:q0(Z,m4)?{mapFromDriverValue:(z)=>Z.mapFromDriverValue(z)}:Z.sql.decoder;if(H)J._.sql.decoder=H}W.push(J)}if(Q<X-1)W.push(r`, `);return W});return r.join(G)}buildJoins($){if(!$||$.length===0)return;let Y=[];if($)for(let[X,G]of $.entries()){if(X===0)Y.push(r` `);let J=G.table,Q=G.on?r` on ${G.on}`:void 0;if(q0(J,wY)){let W=J[wY.Symbol.Name],K=J[wY.Symbol.Schema],Z=J[wY.Symbol.OriginalName],H=W===Z?void 0:G.alias;Y.push(r`${r.raw(G.joinType)} join ${K?r`${r.identifier(K)}.`:void 0}${r.identifier(Z)}${H&&r` ${r.identifier(H)}`}${Q}`)}else Y.push(r`${r.raw(G.joinType)} join ${J}${Q}`);if(X<$.length-1)Y.push(r` `)}return r.join(Y)}buildLimit($){return typeof $==="object"||typeof $==="number"&&$>=0?r` limit ${$}`:void 0}buildOrderBy($){let Y=[];if($){for(let[X,G]of $.entries())if(Y.push(G),X<$.length-1)Y.push(r`, `)}return Y.length>0?r` order by ${r.join(Y)}`:void 0}buildFromTable($){if(q0($,r0)&&$[r0.Symbol.IsAlias])return r`${r`${r.identifier($[r0.Symbol.Schema]??"")}.`.if($[r0.Symbol.Schema])}${r.identifier($[r0.Symbol.OriginalName])} ${r.identifier($[r0.Symbol.Name])}`;return $}buildSelectQuery({withList:$,fields:Y,fieldsFlat:X,where:G,having:J,table:Q,joins:W,orderBy:K,groupBy:Z,limit:H,offset:z,distinct:V,setOperators:F}){let L=X??x5(Y);for(let k of L)if(q0(k.field,m4)&&J$(k.field.table)!==(q0(Q,W6)?Q._.alias:q0(Q,iN)?Q[y6].name:q0(Q,t0)?void 0:J$(Q))&&!((S)=>W?.some(({alias:I})=>I===(S[r0.Symbol.IsAlias]?J$(S):S[r0.Symbol.BaseName])))(k.field.table)){let S=J$(k.field.table);throw Error(`Your "${k.path.join("->")}" field references a column "${S}"."${k.field.name}", but the table "${S}" is not part of the query! Did you forget to join it?`)}let N=!W||W.length===0,D=this.buildWithCTE($),A=V?r` distinct`:void 0,B=this.buildSelection(L,{isSingleTable:N}),O=this.buildFromTable(Q),E=this.buildJoins(W),M=G?r` where ${G}`:void 0,R=J?r` having ${J}`:void 0,q=[];if(Z){for(let[k,S]of Z.entries())if(q.push(S),k<Z.length-1)q.push(r`, `)}let _=q.length>0?r` group by ${r.join(q)}`:void 0,P=this.buildOrderBy(K),w=this.buildLimit(H),j=z?r` offset ${z}`:void 0,C=r`${D}select${A} ${B} from ${O}${E}${M}${_}${R}${P}${w}${j}`;if(F.length>0)return this.buildSetOperations(C,F);return C}buildSetOperations($,Y){let[X,...G]=Y;if(!X)throw Error("Cannot pass undefined values to any set operator");if(G.length===0)return this.buildSetOperationQuery({leftSelect:$,setOperator:X});return this.buildSetOperations(this.buildSetOperationQuery({leftSelect:$,setOperator:X}),G)}buildSetOperationQuery({leftSelect:$,setOperator:{type:Y,isAll:X,rightSelect:G,limit:J,orderBy:Q,offset:W}}){let K=r`${$.getSQL()} `,Z=r`${G.getSQL()}`,H;if(Q&&Q.length>0){let L=[];for(let N of Q)if(q0(N,l$))L.push(r.identifier(N.name));else if(q0(N,t0)){for(let D=0;D<N.queryChunks.length;D++){let A=N.queryChunks[D];if(q0(A,l$))N.queryChunks[D]=r.identifier(this.casing.getColumnCasing(A))}L.push(r`${N}`)}else L.push(r`${N}`);H=r` order by ${r.join(L,r`, `)}`}let z=typeof J==="object"||typeof J==="number"&&J>=0?r` limit ${J}`:void 0,V=r.raw(`${Y} ${X?"all ":""}`),F=W?r` offset ${W}`:void 0;return r`${K}${V}${Z}${H}${z}${F}`}buildInsertQuery({table:$,values:Y,onConflict:X,returning:G,withList:J,select:Q}){let W=[],K=$[r0.Symbol.Columns],Z=Object.entries(K).filter(([N,D])=>!D.shouldDisableInsert()),H=Z.map(([,N])=>r.identifier(this.casing.getColumnCasing(N)));if(Q){let N=Y;if(q0(N,t0))W.push(N);else W.push(N.getSQL())}else{let N=Y;W.push(r.raw("values "));for(let[D,A]of N.entries()){let B=[];for(let[O,E]of Z){let M=A[O];if(M===void 0||q0(M,d$)&&M.value===void 0){let R;if(E.default!==null&&E.default!==void 0)R=q0(E.default,t0)?E.default:r.param(E.default,E);else if(E.defaultFn!==void 0){let q=E.defaultFn();R=q0(q,t0)?q:r.param(q,E)}else if(!E.default&&E.onUpdateFn!==void 0){let q=E.onUpdateFn();R=q0(q,t0)?q:r.param(q,E)}else R=r`null`;B.push(R)}else B.push(M)}if(W.push(B),D<N.length-1)W.push(r`, `)}}let z=this.buildWithCTE(J),V=r.join(W),F=G?r` returning ${this.buildSelection(G,{isSingleTable:!0})}`:void 0,L=X?.length?r.join(X):void 0;return r`${z}insert into ${$} ${H} ${V}${L}${F}`}sqlToQuery($,Y){return $.toQuery({casing:this.casing,escapeName:this.escapeName,escapeParam:this.escapeParam,escapeString:this.escapeString,invokeSource:Y})}buildRelationalQuery({fullSchema:$,schema:Y,tableNamesMap:X,table:G,tableConfig:J,queryConfig:Q,tableAlias:W,nestedQueryRelation:K,joinOn:Z}){let H=[],z,V,F=[],L,N=[];if(Q===!0)H=Object.entries(J.columns).map(([B,O])=>({dbKey:O.name,tsKey:B,field:M8(O,W),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{let A=Object.fromEntries(Object.entries(J.columns).map(([q,_])=>[q,M8(_,W)]));if(Q.where){let q=typeof Q.where==="function"?Q.where(A,uN()):Q.where;L=q&&rQ(q,W)}let B=[],O=[];if(Q.columns){let q=!1;for(let[_,P]of Object.entries(Q.columns)){if(P===void 0)continue;if(_ in J.columns){if(!q&&P===!0)q=!0;O.push(_)}}if(O.length>0)O=q?O.filter((_)=>Q.columns?.[_]===!0):Object.keys(J.columns).filter((_)=>!O.includes(_))}else O=Object.keys(J.columns);for(let q of O){let _=J.columns[q];B.push({tsKey:q,value:_})}let E=[];if(Q.with)E=Object.entries(Q.with).filter((q)=>!!q[1]).map(([q,_])=>({tsKey:q,queryConfig:_,relation:J.relations[q]}));let M;if(Q.extras){M=typeof Q.extras==="function"?Q.extras(A,{sql:r}):Q.extras;for(let[q,_]of Object.entries(M))B.push({tsKey:q,value:nV(_,W)})}for(let{tsKey:q,value:_}of B)H.push({dbKey:q0(_,t0.Aliased)?_.fieldAlias:J.columns[q].name,tsKey:q,field:q0(_,m4)?M8(_,W):_,relationTableTsKey:void 0,isJson:!1,selection:[]});let R=typeof Q.orderBy==="function"?Q.orderBy(A,pN()):Q.orderBy??[];if(!Array.isArray(R))R=[R];F=R.map((q)=>{if(q0(q,m4))return M8(q,W);return rQ(q,W)}),z=Q.limit,V=Q.offset;for(let{tsKey:q,queryConfig:_,relation:P}of E){let w=dN(Y,X,P),j=G2(P.referencedTable),C=X[j],k=`${W}_${q}`,S=c$(...w.fields.map((x,y)=>_1(M8(w.references[y],k),M8(x,W)))),I=this.buildRelationalQuery({fullSchema:$,schema:Y,tableNamesMap:X,table:$[C],tableConfig:Y[C],queryConfig:q0(P,oQ)?_===!0?{limit:1}:{..._,limit:1}:_,tableAlias:k,joinOn:S,nestedQueryRelation:P}),v=r`(${I.sql})`.as(q);H.push({dbKey:q,tsKey:q,field:v,relationTableTsKey:C,isJson:!0,selection:I.selection})}}if(H.length===0)throw new aQ({message:`No fields selected for table "${J.tsName}" ("${W}"). You need to have at least one item in "columns", "with" or "extras". If you need to select all columns, omit the "columns" key or set it to undefined.`});let D;if(L=c$(Z,L),K){let A=r`json_array(${r.join(H.map(({field:E})=>q0(E,l$)?r.identifier(this.casing.getColumnCasing(E)):q0(E,t0.Aliased)?E.sql:E),r`, `)})`;if(q0(K,PK))A=r`coalesce(json_group_array(${A}), json_array())`;let B=[{dbKey:"data",tsKey:"data",field:A.as("data"),isJson:!0,relationTableTsKey:J.tsName,selection:H}];if(z!==void 0||V!==void 0||F.length>0)D=this.buildSelectQuery({table:BG(G,W),fields:{},fieldsFlat:[{path:[],field:r.raw("*")}],where:L,limit:z,offset:V,orderBy:F,setOperators:[]}),L=void 0,z=void 0,V=void 0,F=void 0;else D=BG(G,W);D=this.buildSelectQuery({table:q0(D,wY)?D:new W6(D,{},W),fields:{},fieldsFlat:B.map(({field:E})=>({path:[],field:q0(E,m4)?M8(E,W):E})),joins:N,where:L,limit:z,offset:V,orderBy:F,setOperators:[]})}else D=this.buildSelectQuery({table:BG(G,W),fields:{},fieldsFlat:H.map(({field:A})=>({path:[],field:q0(A,m4)?M8(A,W):A})),joins:N,where:L,limit:z,offset:V,orderBy:F,setOperators:[]});return{tableTsKey:J.tsName,sql:D,selection:H}}}class sS extends aS{static[z0]="SQLiteSyncDialect";migrate($,Y,X){let G=X===void 0?"__drizzle_migrations":typeof X==="string"?"__drizzle_migrations":X.migrationsTable??"__drizzle_migrations",J=r`
			CREATE TABLE IF NOT EXISTS ${r.identifier(G)} (
				id SERIAL PRIMARY KEY,
				hash text NOT NULL,
				created_at numeric
			)
		`;Y.run(J);let W=Y.values(r`SELECT id, hash, created_at FROM ${r.identifier(G)} ORDER BY created_at DESC LIMIT 1`)[0]??void 0;Y.run(r`BEGIN`);try{for(let K of $)if(!W||Number(W[2])<K.folderMillis){for(let Z of K.sql)Y.run(r.raw(Z));Y.run(r`INSERT INTO ${r.identifier(G)} ("hash", "created_at") VALUES(${K.hash}, ${K.folderMillis})`)}Y.run(r`COMMIT`)}catch(K){throw Y.run(r`ROLLBACK`),K}}}class nN{static[z0]="TypedQueryBuilder";getSelectedFields(){return this._.selectedFields}}class _K{static[z0]="SQLiteSelectBuilder";fields;session;dialect;withList;distinct;constructor($){this.fields=$.fields,this.session=$.session,this.dialect=$.dialect,this.withList=$.withList,this.distinct=$.distinct}from($){let Y=!!this.fields,X;if(this.fields)X=this.fields;else if(q0($,W6))X=Object.fromEntries(Object.keys($._.selectedFields).map((G)=>[G,$[G]]));else if(q0($,iN))X=$[y6].selectedFields;else if(q0($,t0))X={};else X=IH($);return new $20({table:$,fields:X,isPartialSelect:Y,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct})}}class r41 extends nN{static[z0]="SQLiteSelectQueryBuilder";_;config;joinsNotNullableMap;tableName;isPartialSelect;session;dialect;cacheConfig=void 0;usedTables=new Set;constructor({table:$,fields:Y,isPartialSelect:X,session:G,dialect:J,withList:Q,distinct:W}){super();this.config={withList:Q,table:$,fields:{...Y},distinct:W,setOperators:[]},this.isPartialSelect=X,this.session=G,this.dialect=J,this._={selectedFields:Y,config:this.config},this.tableName=GX($),this.joinsNotNullableMap=typeof this.tableName==="string"?{[this.tableName]:!0}:{};for(let K of wK($))this.usedTables.add(K)}getUsedTables(){return[...this.usedTables]}createJoin($){return(Y,X)=>{let G=this.tableName,J=GX(Y);for(let Q of wK(Y))this.usedTables.add(Q);if(typeof J==="string"&&this.config.joins?.some((Q)=>Q.alias===J))throw Error(`Alias "${J}" is already used in this query`);if(!this.isPartialSelect){if(Object.keys(this.joinsNotNullableMap).length===1&&typeof G==="string")this.config.fields={[G]:this.config.fields};if(typeof J==="string"&&!q0(Y,t0)){let Q=q0(Y,W6)?Y._.selectedFields:q0(Y,Q$)?Y[y6].selectedFields:Y[r0.Symbol.Columns];this.config.fields[J]=Q}}if(typeof X==="function")X=X(new Proxy(this.config.fields,new q4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));if(!this.config.joins)this.config.joins=[];if(this.config.joins.push({on:X,table:Y,joinType:$,alias:J}),typeof J==="string")switch($){case"left":{this.joinsNotNullableMap[J]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([Q])=>[Q,!1])),this.joinsNotNullableMap[J]=!0;break}case"cross":case"inner":{this.joinsNotNullableMap[J]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([Q])=>[Q,!1])),this.joinsNotNullableMap[J]=!1;break}}return this}}leftJoin=this.createJoin("left");rightJoin=this.createJoin("right");innerJoin=this.createJoin("inner");fullJoin=this.createJoin("full");crossJoin=this.createJoin("cross");createSetOperator($,Y){return(X)=>{let G=typeof X==="function"?X(Fm4()):X;if(!OG(this.getSelectedFields(),G.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return this.config.setOperators.push({type:$,isAll:Y,rightSelect:G}),this}}union=this.createSetOperator("union",!1);unionAll=this.createSetOperator("union",!0);intersect=this.createSetOperator("intersect",!1);except=this.createSetOperator("except",!1);addSetOperators($){return this.config.setOperators.push(...$),this}where($){if(typeof $==="function")$=$(new Proxy(this.config.fields,new q4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));return this.config.where=$,this}having($){if(typeof $==="function")$=$(new Proxy(this.config.fields,new q4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));return this.config.having=$,this}groupBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.fields,new q4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(Y)?Y:[Y]}else this.config.groupBy=$;return this}orderBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.fields,new q4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),X=Array.isArray(Y)?Y:[Y];if(this.config.setOperators.length>0)this.config.setOperators.at(-1).orderBy=X;else this.config.orderBy=X}else{let Y=$;if(this.config.setOperators.length>0)this.config.setOperators.at(-1).orderBy=Y;else this.config.orderBy=Y}return this}limit($){if(this.config.setOperators.length>0)this.config.setOperators.at(-1).limit=$;else this.config.limit=$;return this}offset($){if(this.config.setOperators.length>0)this.config.setOperators.at(-1).offset=$;else this.config.offset=$;return this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}as($){let Y=[];if(Y.push(...wK(this.config.table)),this.config.joins)for(let X of this.config.joins)Y.push(...wK(X.table));return new Proxy(new W6(this.getSQL(),this.config.fields,$,!1,[...new Set(Y)]),new q4({alias:$,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new q4({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}$dynamic(){return this}}class $20 extends r41{static[z0]="SQLiteSelect";_prepare($=!0){if(!this.session)throw Error("Cannot execute a query on a query builder. Please use a database instance instead.");let Y=x5(this.config.fields),X=this.session[$?"prepareOneTimeQuery":"prepareQuery"](this.dialect.sqlToQuery(this.getSQL()),Y,"all",!0,void 0,{type:"select",tables:[...this.usedTables]},this.cacheConfig);return X.joinsNotNullableMap=this.joinsNotNullableMap,X}$withCache($){return this.cacheConfig=$===void 0?{config:{},enable:!0,autoInvalidate:!0}:$===!1?{enable:!1}:{enable:!0,autoInvalidate:!0,...$},this}prepare(){return this._prepare(!1)}run=($)=>{return this._prepare().run($)};all=($)=>{return this._prepare().all($)};get=($)=>{return this._prepare().get($)};values=($)=>{return this._prepare().values($)};async execute(){return this.all()}}SR($20,[r6]);function fl($,Y){return(X,G,...J)=>{let Q=[G,...J].map((W)=>({type:$,isAll:Y,rightSelect:W}));for(let W of Q)if(!OG(X.getSelectedFields(),W.rightSelect.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return X.addSetOperators(Q)}}var Fm4=()=>({union:Lm4,unionAll:Dm4,intersect:Nm4,except:Am4}),Lm4=fl("union",!1),Dm4=fl("union",!0),Nm4=fl("intersect",!1),Am4=fl("except",!1);class oS{static[z0]="SQLiteQueryBuilder";dialect;dialectConfig;constructor($){this.dialect=q0($,aS)?$:void 0,this.dialectConfig=q0($,aS)?void 0:$}$with=($,Y)=>{let X=this;return{as:(J)=>{if(typeof J==="function")J=J(X);return new Proxy(new nQ(J.getSQL(),Y??("getSelectedFields"in J?J.getSelectedFields()??{}:{}),$,!0),new q4({alias:$,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}};with(...$){let Y=this;function X(J){return new _K({fields:J??void 0,session:void 0,dialect:Y.getDialect(),withList:$})}function G(J){return new _K({fields:J??void 0,session:void 0,dialect:Y.getDialect(),withList:$,distinct:!0})}return{select:X,selectDistinct:G}}select($){return new _K({fields:$??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct($){return new _K({fields:$??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}getDialect(){if(!this.dialect)this.dialect=new sS(this.dialectConfig);return this.dialect}}class gl{constructor($,Y,X,G){this.table=$,this.session=Y,this.dialect=X,this.withList=G}static[z0]="SQLiteInsertBuilder";values($){if($=Array.isArray($)?$:[$],$.length===0)throw Error("values() must be called with at least one value");let Y=$.map((X)=>{let G={},J=this.table[r0.Symbol.Columns];for(let Q of Object.keys(X)){let W=X[Q];G[Q]=q0(W,t0)?W:new d$(W,J[Q])}return G});return new Y20(this.table,Y,this.session,this.dialect,this.withList)}select($){let Y=typeof $==="function"?$(new oS):$;if(!q0(Y,t0)&&!OG(this.table[lV],Y._.selectedFields))throw Error("Insert select error: selected fields are not the same or are in a different order compared to the table definition");return new Y20(this.table,Y,this.session,this.dialect,this.withList,!0)}}class Y20 extends r6{constructor($,Y,X,G,J,Q){super();this.session=X,this.dialect=G,this.config={table:$,values:Y,withList:J,select:Q}}static[z0]="SQLiteInsert";config;returning($=this.config.table[wY.Symbol.Columns]){return this.config.returning=x5($),this}onConflictDoNothing($={}){if(!this.config.onConflict)this.config.onConflict=[];if($.target===void 0)this.config.onConflict.push(r` on conflict do nothing`);else{let Y=Array.isArray($.target)?r`${$.target}`:r`${[$.target]}`,X=$.where?r` where ${$.where}`:r``;this.config.onConflict.push(r` on conflict ${Y} do nothing${X}`)}return this}onConflictDoUpdate($){if($.where&&($.targetWhere||$.setWhere))throw Error('You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.');if(!this.config.onConflict)this.config.onConflict=[];let Y=$.where?r` where ${$.where}`:void 0,X=$.targetWhere?r` where ${$.targetWhere}`:void 0,G=$.setWhere?r` where ${$.setWhere}`:void 0,J=Array.isArray($.target)?r`${$.target}`:r`${[$.target]}`,Q=this.dialect.buildUpdateSet(this.config.table,J2(this.config.table,$.set));return this.config.onConflict.push(r` on conflict ${J}${X} do update set ${Q}${Y}${G}`),this}getSQL(){return this.dialect.buildInsertQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}_prepare($=!0){return this.session[$?"prepareOneTimeQuery":"prepareQuery"](this.dialect.sqlToQuery(this.getSQL()),this.config.returning,this.config.returning?"all":"run",!0,void 0,{type:"insert",tables:wK(this.config.table)})}prepare(){return this._prepare(!1)}run=($)=>{return this._prepare().run($)};all=($)=>{return this._prepare().all($)};get=($)=>{return this._prepare().get($)};values=($)=>{return this._prepare().values($)};async execute(){return this.config.returning?this.all():this.run()}$dynamic(){return this}}class ml{constructor($,Y,X,G){this.table=$,this.session=Y,this.dialect=X,this.withList=G}static[z0]="SQLiteUpdateBuilder";set($){return new a41(this.table,J2(this.table,$),this.session,this.dialect,this.withList)}}class a41 extends r6{constructor($,Y,X,G,J){super();this.session=X,this.dialect=G,this.config={set:Y,table:$,withList:J,joins:[]}}static[z0]="SQLiteUpdate";config;from($){return this.config.from=$,this}createJoin($){return(Y,X)=>{let G=GX(Y);if(typeof G==="string"&&this.config.joins.some((J)=>J.alias===G))throw Error(`Alias "${G}" is already used in this query`);if(typeof X==="function"){let J=this.config.from?q0(Y,wY)?Y[r0.Symbol.Columns]:q0(Y,W6)?Y._.selectedFields:q0(Y,iN)?Y[y6].selectedFields:void 0:void 0;X=X(new Proxy(this.config.table[r0.Symbol.Columns],new q4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})),J&&new Proxy(J,new q4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))}return this.config.joins.push({on:X,table:Y,joinType:$,alias:G}),this}}leftJoin=this.createJoin("left");rightJoin=this.createJoin("right");innerJoin=this.createJoin("inner");fullJoin=this.createJoin("full");where($){return this.config.where=$,this}orderBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.table[r0.Symbol.Columns],new q4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),X=Array.isArray(Y)?Y:[Y];this.config.orderBy=X}else{let Y=$;this.config.orderBy=Y}return this}limit($){return this.config.limit=$,this}returning($=this.config.table[wY.Symbol.Columns]){return this.config.returning=x5($),this}getSQL(){return this.dialect.buildUpdateQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}_prepare($=!0){return this.session[$?"prepareOneTimeQuery":"prepareQuery"](this.dialect.sqlToQuery(this.getSQL()),this.config.returning,this.config.returning?"all":"run",!0,void 0,{type:"insert",tables:wK(this.config.table)})}prepare(){return this._prepare(!1)}run=($)=>{return this._prepare().run($)};all=($)=>{return this._prepare().all($)};get=($)=>{return this._prepare().get($)};values=($)=>{return this._prepare().values($)};async execute(){return this.config.returning?this.all():this.run()}$dynamic(){return this}}class tS extends t0{constructor($){super(tS.buildEmbeddedCount($.source,$.filters).queryChunks);this.params=$,this.session=$.session,this.sql=tS.buildCount($.source,$.filters)}sql;static[z0]="SQLiteCountBuilderAsync";[Symbol.toStringTag]="SQLiteCountBuilderAsync";session;static buildEmbeddedCount($,Y){return r`(select count(*) from ${$}${r.raw(" where ").if(Y)}${Y})`}static buildCount($,Y){return r`select count(*) from ${$}${r.raw(" where ").if(Y)}${Y}`}then($,Y){return Promise.resolve(this.session.count(this.sql)).then($,Y)}catch($){return this.then(void 0,$)}finally($){return this.then((Y)=>{return $?.(),Y},(Y)=>{throw $?.(),Y})}}class G20{constructor($,Y,X,G,J,Q,W,K){this.mode=$,this.fullSchema=Y,this.schema=X,this.tableNamesMap=G,this.table=J,this.tableConfig=Q,this.dialect=W,this.session=K}static[z0]="SQLiteAsyncRelationalQueryBuilder";findMany($){return this.mode==="sync"?new X20(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,$?$:{},"many"):new ul(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,$?$:{},"many")}findFirst($){return this.mode==="sync"?new X20(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,$?{...$,limit:1}:{limit:1},"first"):new ul(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,$?{...$,limit:1}:{limit:1},"first")}}class ul extends r6{constructor($,Y,X,G,J,Q,W,K,Z){super();this.fullSchema=$,this.schema=Y,this.tableNamesMap=X,this.table=G,this.tableConfig=J,this.dialect=Q,this.session=W,this.config=K,this.mode=Z}static[z0]="SQLiteAsyncRelationalQuery";mode;getSQL(){return this.dialect.buildRelationalQuery({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName}).sql}_prepare($=!1){let{query:Y,builtQuery:X}=this._toSQL();return this.session[$?"prepareOneTimeQuery":"prepareQuery"](X,void 0,this.mode==="first"?"get":"all",!0,(G,J)=>{let Q=G.map((W)=>sV(this.schema,this.tableConfig,W,Y.selection,J));if(this.mode==="first")return Q[0];return Q})}prepare(){return this._prepare(!1)}_toSQL(){let $=this.dialect.buildRelationalQuery({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName}),Y=this.dialect.sqlToQuery($.sql);return{query:$,builtQuery:Y}}toSQL(){return this._toSQL().builtQuery}executeRaw(){if(this.mode==="first")return this._prepare(!1).get();return this._prepare(!1).all()}async execute(){return this.executeRaw()}}class X20 extends ul{static[z0]="SQLiteSyncRelationalQuery";sync(){return this.executeRaw()}}class yR extends r6{constructor($,Y,X,G,J){super();this.execute=$,this.getSQL=Y,this.dialect=G,this.mapBatchResult=J,this.config={action:X}}static[z0]="SQLiteRaw";config;getQuery(){return{...this.dialect.sqlToQuery(this.getSQL()),method:this.config.action}}mapResult($,Y){return Y?this.mapBatchResult($):$}_prepare(){return this}isResponseInArrayMode(){return!1}}class eS{constructor($,Y,X,G){this.resultKind=$,this.dialect=Y,this.session=X,this._=G?{schema:G.schema,fullSchema:G.fullSchema,tableNamesMap:G.tableNamesMap}:{schema:void 0,fullSchema:{},tableNamesMap:{}},this.query={};let J=this.query;if(this._.schema)for(let[Q,W]of Object.entries(this._.schema))J[Q]=new G20($,G.fullSchema,this._.schema,this._.tableNamesMap,G.fullSchema[Q],W,Y,X);this.$cache={invalidate:async(Q)=>{}}}static[z0]="BaseSQLiteDatabase";query;$with=($,Y)=>{let X=this;return{as:(J)=>{if(typeof J==="function")J=J(new oS(X.dialect));return new Proxy(new nQ(J.getSQL(),Y??("getSelectedFields"in J?J.getSelectedFields()??{}:{}),$,!0),new q4({alias:$,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}};$count($,Y){return new tS({source:$,filters:Y,session:this.session})}with(...$){let Y=this;function X(K){return new _K({fields:K??void 0,session:Y.session,dialect:Y.dialect,withList:$})}function G(K){return new _K({fields:K??void 0,session:Y.session,dialect:Y.dialect,withList:$,distinct:!0})}function J(K){return new ml(K,Y.session,Y.dialect,$)}function Q(K){return new gl(K,Y.session,Y.dialect,$)}function W(K){return new hl(K,Y.session,Y.dialect,$)}return{select:X,selectDistinct:G,update:J,insert:Q,delete:W}}select($){return new _K({fields:$??void 0,session:this.session,dialect:this.dialect})}selectDistinct($){return new _K({fields:$??void 0,session:this.session,dialect:this.dialect,distinct:!0})}update($){return new ml($,this.session,this.dialect)}$cache;insert($){return new gl($,this.session,this.dialect)}delete($){return new hl($,this.session,this.dialect)}run($){let Y=typeof $==="string"?r.raw($):$.getSQL();if(this.resultKind==="async")return new yR(async()=>this.session.run(Y),()=>Y,"run",this.dialect,this.session.extractRawRunValueFromBatchResult.bind(this.session));return this.session.run(Y)}all($){let Y=typeof $==="string"?r.raw($):$.getSQL();if(this.resultKind==="async")return new yR(async()=>this.session.all(Y),()=>Y,"all",this.dialect,this.session.extractRawAllValueFromBatchResult.bind(this.session));return this.session.all(Y)}get($){let Y=typeof $==="string"?r.raw($):$.getSQL();if(this.resultKind==="async")return new yR(async()=>this.session.get(Y),()=>Y,"get",this.dialect,this.session.extractRawGetValueFromBatchResult.bind(this.session));return this.session.get(Y)}values($){let Y=typeof $==="string"?r.raw($):$.getSQL();if(this.resultKind==="async")return new yR(async()=>this.session.values(Y),()=>Y,"values",this.dialect,this.session.extractRawValuesValueFromBatchResult.bind(this.session));return this.session.values(Y)}transaction($,Y){return this.session.transaction($,Y)}}class s41{static[z0]="Cache"}class jK extends s41{strategy(){return"all"}static[z0]="NoopCache";async get($){return}async put($,Y,X,G){}async onMutate($){}}async function kH($,Y){let X=`${$}-${JSON.stringify(Y)}`,J=new TextEncoder().encode(X),Q=await crypto.subtle.digest("SHA-256",J);return[...new Uint8Array(Q)].map((Z)=>Z.toString(16).padStart(2,"0")).join("")}class o41 extends r6{constructor($){super();this.resultCb=$}static[z0]="ExecuteResultSync";async execute(){return this.resultCb()}sync(){return this.resultCb()}}class J20{constructor($,Y,X,G,J,Q){if(this.mode=$,this.executeMethod=Y,this.query=X,this.cache=G,this.queryMetadata=J,this.cacheConfig=Q,G&&G.strategy()==="all"&&Q===void 0)this.cacheConfig={enable:!0,autoInvalidate:!0};if(!this.cacheConfig?.enable)this.cacheConfig=void 0}static[z0]="PreparedQuery";joinsNotNullableMap;async queryWithCache($,Y,X){if(this.cache===void 0||q0(this.cache,jK)||this.queryMetadata===void 0)try{return await X()}catch(G){throw new M$($,Y,G)}if(this.cacheConfig&&!this.cacheConfig.enable)try{return await X()}catch(G){throw new M$($,Y,G)}if((this.queryMetadata.type==="insert"||this.queryMetadata.type==="update"||this.queryMetadata.type==="delete")&&this.queryMetadata.tables.length>0)try{let[G]=await Promise.all([X(),this.cache.onMutate({tables:this.queryMetadata.tables})]);return G}catch(G){throw new M$($,Y,G)}if(!this.cacheConfig)try{return await X()}catch(G){throw new M$($,Y,G)}if(this.queryMetadata.type==="select"){let G=await this.cache.get(this.cacheConfig.tag??await kH($,Y),this.queryMetadata.tables,this.cacheConfig.tag!==void 0,this.cacheConfig.autoInvalidate);if(G===void 0){let J;try{J=await X()}catch(Q){throw new M$($,Y,Q)}return await this.cache.put(this.cacheConfig.tag??await kH($,Y),J,this.cacheConfig.autoInvalidate?this.queryMetadata.tables:[],this.cacheConfig.tag!==void 0,this.cacheConfig.config),J}return G}try{return await X()}catch(G){throw new M$($,Y,G)}}getQuery(){return this.query}mapRunResult($,Y){return $}mapAllResult($,Y){throw Error("Not implemented")}mapGetResult($,Y){throw Error("Not implemented")}execute($){if(this.mode==="async")return this[this.executeMethod]($);return new o41(()=>this[this.executeMethod]($))}mapResult($,Y){switch(this.executeMethod){case"run":return this.mapRunResult($,Y);case"all":return this.mapAllResult($,Y);case"get":return this.mapGetResult($,Y)}}}class Q20{constructor($){this.dialect=$}static[z0]="SQLiteSession";prepareOneTimeQuery($,Y,X,G,J,Q,W){return this.prepareQuery($,Y,X,G,J,Q,W)}run($){let Y=this.dialect.sqlToQuery($);try{return this.prepareOneTimeQuery(Y,void 0,"run",!1).run()}catch(X){throw new aQ({cause:X,message:`Failed to run the query '${Y.sql}'`})}}extractRawRunValueFromBatchResult($){return $}all($){return this.prepareOneTimeQuery(this.dialect.sqlToQuery($),void 0,"run",!1).all()}extractRawAllValueFromBatchResult($){throw Error("Not implemented")}get($){return this.prepareOneTimeQuery(this.dialect.sqlToQuery($),void 0,"run",!1).get()}extractRawGetValueFromBatchResult($){throw Error("Not implemented")}values($){return this.prepareOneTimeQuery(this.dialect.sqlToQuery($),void 0,"run",!1).values()}async count($){return(await this.values($))[0][0]}extractRawValuesValueFromBatchResult($){throw Error("Not implemented")}}class W20 extends eS{constructor($,Y,X,G,J=0){super($,Y,X,G);this.schema=G,this.nestedIndex=J}static[z0]="SQLiteTransaction";rollback(){throw new hN}}class K20 extends Q20{constructor($,Y,X,G={}){super(Y);this.client=$,this.schema=X,this.logger=G.logger??new gN}static[z0]="SQLiteBunSession";logger;exec($){this.client.exec($)}prepareQuery($,Y,X,G,J){let Q=this.client.prepare($.sql);return new t41(Q,$,this.logger,Y,X,G,J)}transaction($,Y={}){let X=new Z20("sync",this.dialect,this,this.schema),G;return this.client.transaction(()=>{G=$(X)})[Y.behavior??"deferred"](),G}}class Z20 extends W20{static[z0]="SQLiteBunTransaction";transaction($){let Y=`sp${this.nestedIndex}`,X=new Z20("sync",this.dialect,this.session,this.schema,this.nestedIndex+1);this.session.run(r.raw(`savepoint ${Y}`));try{let G=$(X);return this.session.run(r.raw(`release savepoint ${Y}`)),G}catch(G){throw this.session.run(r.raw(`rollback to savepoint ${Y}`)),G}}}class t41 extends J20{constructor($,Y,X,G,J,Q,W){super("sync",J,Y);this.stmt=$,this.logger=X,this.fields=G,this._isResponseInArrayMode=Q,this.customResultMapper=W}static[z0]="SQLiteBunPreparedQuery";run($){let Y=qK(this.query.params,$??{});return this.logger.logQuery(this.query.sql,Y),this.stmt.run(...Y)}all($){let{fields:Y,query:X,logger:G,joinsNotNullableMap:J,stmt:Q,customResultMapper:W}=this;if(!Y&&!W){let Z=qK(X.params,$??{});return G.logQuery(X.sql,Z),Q.all(...Z)}let K=this.values($);if(W)return W(K);return K.map((Z)=>rV(Y,Z,J))}get($){let Y=qK(this.query.params,$??{});this.logger.logQuery(this.query.sql,Y);let X=this.stmt.values(...Y)[0];if(!X)return;let{fields:G,joinsNotNullableMap:J,customResultMapper:Q}=this;if(!G&&!Q)return X;if(Q)return Q([X]);return rV(G,X,J)}values($){let Y=qK(this.query.params,$??{});return this.logger.logQuery(this.query.sql,Y),this.stmt.values(...Y)}isResponseInArrayMode(){return this._isResponseInArrayMode}}class e41 extends eS{static[z0]="BunSQLiteDatabase"}function bR($,Y={}){let X=new sS({casing:Y.casing}),G;if(Y.logger===!0)G=new fN;else if(Y.logger!==!1)G=Y.logger;let J;if(Y.schema){let K=vR(Y.schema,xR);J={fullSchema:Y.schema,schema:K.tables,tableNamesMap:K.tableNamesMap}}let Q=new K20($,X,J,{logger:G}),W=new e41("sync",X,Q,J);return W.$client=$,W}function bU(...$){if($[0]===void 0||typeof $[0]==="string"){let Y=$[0]===void 0?new pl:new pl($[0]);return bR(Y,$[1])}if(kR($[0])){let{connection:Y,client:X,...G}=$[0];if(X)return bR(X,G);if(typeof Y==="object"){let{source:Q,...W}=Y,K=Object.values(W).filter((H)=>H!==void 0).length?W:void 0,Z=new pl(Q,K);return bR(Z,G)}let J=new pl(Y);return bR(J,G)}return bR($[0],$[1])}(($)=>{function Y(X){return bR({},X)}$.mock=Y})(bU||(bU={}));var oV=new Bm4("config.db"),e0=bU({client:oV});function Om4(){oV.run(`CREATE TABLE IF NOT EXISTS sys_oracle_source (
    id text,
    name text,
    code text,
    host text,
    user text,
    password text,
    serviceName text,
    port integer,
    max integer,
    createdAt integer,
    updatedAt integer,
    latest_visitAt integer,
    createBy text,
    updateBy text,
    env_id text)`)}function Em4(){oV.run(`CREATE TABLE IF NOT EXISTS sys_apimanager_proxy (
    id text,
    name text,
    code text,
    path1 text,
    remark text,
    createdAt integer,
    updatedAt integer,
    createBy text,
    updateBy text,
    env_id text)`)}function Mm4(){oV.run(`CREATE TABLE IF NOT EXISTS sys_apimanager_proxy_detail (
    id text,
    name text,
    path1 text,
    path2 text,
    target text,
    activate integer,
    remark text,
    createdAt integer,
    updatedAt integer,
    createBy text,
    updateBy text,
    env_id text)`)}function Rm4(){oV.run(`CREATE TABLE IF NOT EXISTS sys_apimanager_proxy_statistics (
    id text,
    month text,
    path1 text,
    path2 text,
    access integer,
    createdAt integer,
    updatedAt integer,
    createBy text,
    updateBy text,
    env_id text)`)}function qm4(){oV.run(`CREATE TABLE IF NOT EXISTS sys_sqlite_source (
    id text,
    name text,
    code text,
    filename text,
    createdAt integer,
    updatedAt integer,
    latest_visitAt integer,
    createBy text,
    updateBy text,
    env_id text)`)}function Pm4(){oV.run(`CREATE TABLE IF NOT EXISTS sys_sqlite_schema_cache (
    id text,
    source text,
    filename text,
    table_name text,
    schema_data text,
    createdAt integer,
    updatedAt integer,
    latest_visitAt integer,
    createBy text,
    updateBy text,
    env_id text)`)}function U20($){try{oV.run($)}catch(Y){}}function $61(){try{Om4(),Em4(),Mm4(),Rm4(),qm4(),Pm4(),U20("ALTER TABLE sys_llmconfig ADD COLUMN llamacpp integer;"),U20("ALTER TABLE sys_apimanager_proxy_detail ADD COLUMN parames text;"),U20("ALTER TABLE sys_apimanager_proxy_detail ADD COLUMN resp text;")}catch($){}}async function dl($){return e0.all(r.raw(`SELECT
  CASE
	  WHEN ( SELECT COUNT( 1 ) FROM sys_database_source WHERE code = '${$}' ) > 0 THEN 'mysql' 
		WHEN ( SELECT COUNT( 1 ) FROM sys_pg_source WHERE code = '${$}' ) > 0 THEN 'postgres' 
		WHEN ( SELECT COUNT( 1 ) FROM sys_oracle_source WHERE code = '${$}' ) > 0 THEN 'oracle' 
		WHEN ( SELECT COUNT( 1 ) FROM sys_sqlite_source WHERE code = '${$}' ) > 0 THEN 'sqlite' 
		ELSE 'empty' 
  END AS type`))[0]?.type}var cl=BigInt(4294967295),Y61=BigInt(32);function wm4($,Y=!1){if(Y)return{h:Number($&cl),l:Number($>>Y61&cl)};return{h:Number($>>Y61&cl)|0,l:Number($&cl)|0}}function X61($,Y=!1){let X=$.length,G=new Uint32Array(X),J=new Uint32Array(X);for(let Q=0;Q<X;Q++){let{h:W,l:K}=wm4($[Q],Y);[G[Q],J[Q]]=[W,K]}return[G,J]}var G61=($,Y,X)=>$<<X|Y>>>32-X,J61=($,Y,X)=>Y<<X|$>>>32-X,Q61=($,Y,X)=>Y<<X-32|$>>>64-X,W61=($,Y,X)=>$<<X-32|Y>>>64-X;function _m4($){return $ instanceof Uint8Array||ArrayBuffer.isView($)&&$.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in $&&$.BYTES_PER_ELEMENT===1}function ll($,Y=""){if(typeof $!=="number"){let X=Y&&`"${Y}" `;throw TypeError(`${X}expected number, got ${typeof $}`)}if(!Number.isSafeInteger($)||$<0){let X=Y&&`"${Y}" `;throw RangeError(`${X}expected integer >= 0, got ${$}`)}}function il($,Y,X=""){let G=_m4($),J=$?.length,Q=Y!==void 0;if(!G||Q&&J!==Y){let W=X&&`"${X}" `,K=Q?` of length ${Y}`:"",Z=G?`length=${J}`:`type=${typeof $}`,H=W+"expected Uint8Array"+K+", got "+Z;if(!G)throw TypeError(H);throw RangeError(H)}return $}function H20($,Y=!0){if($.destroyed)throw Error("Hash instance has been destroyed");if(Y&&$.finished)throw Error("Hash#digest() has already been called")}function K61($,Y){il($,void 0,"digestInto() output");let X=Y.outputLen;if($.length<X)throw RangeError('"digestInto() output" expected to be of length >='+X)}function Z61($){return new Uint32Array($.buffer,$.byteOffset,Math.floor($.byteLength/4))}function z20(...$){for(let Y=0;Y<$.length;Y++)$[Y].fill(0)}var jm4=(()=>new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68)();function Tm4($){return $<<24&4278190080|$<<8&16711680|$>>>8&65280|$>>>24&255}function Im4($){for(let Y=0;Y<$.length;Y++)$[Y]=Tm4($[Y]);return $}var V20=jm4?($)=>$:Im4;function U61($,Y={}){let X=(J,Q)=>$(Q).update(J).digest(),G=$(void 0);return X.outputLen=G.outputLen,X.blockLen=G.blockLen,X.canXOF=G.canXOF,X.create=(J)=>$(J),Object.assign(X,Y),Object.freeze(X)}var H61=($)=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,$])});var Cm4=BigInt(0),$k=BigInt(1),Sm4=BigInt(2),km4=BigInt(7),vm4=BigInt(256),xm4=BigInt(113),F61=[],L61=[],D61=[];for(let $=0,Y=$k,X=1,G=0;$<24;$++){[X,G]=[G,(2*X+3*G)%5],F61.push(2*(5*G+X)),L61.push(($+1)*($+2)/2%64);let J=Cm4;for(let Q=0;Q<7;Q++)if(Y=(Y<<$k^(Y>>km4)*xm4)%vm4,Y&Sm4)J^=$k<<($k<<BigInt(Q))-$k;D61.push(J)}var N61=X61(D61,!0),ym4=N61[0],bm4=N61[1],z61=($,Y,X)=>X>32?Q61($,Y,X):G61($,Y,X),V61=($,Y,X)=>X>32?W61($,Y,X):J61($,Y,X);function hm4($,Y=24){if(ll(Y,"rounds"),Y<1||Y>24)throw Error('"rounds" expected integer 1..24');let X=new Uint32Array(10);for(let G=24-Y;G<24;G++){for(let W=0;W<10;W++)X[W]=$[W]^$[W+10]^$[W+20]^$[W+30]^$[W+40];for(let W=0;W<10;W+=2){let K=(W+8)%10,Z=(W+2)%10,H=X[Z],z=X[Z+1],V=z61(H,z,1)^X[K],F=V61(H,z,1)^X[K+1];for(let L=0;L<50;L+=10)$[W+L]^=V,$[W+L+1]^=F}let J=$[2],Q=$[3];for(let W=0;W<24;W++){let K=L61[W],Z=z61(J,Q,K),H=V61(J,Q,K),z=F61[W];J=$[z],Q=$[z+1],$[z]=Z,$[z+1]=H}for(let W=0;W<50;W+=10){let K=$[W],Z=$[W+1],H=$[W+2],z=$[W+3];$[W]^=~$[W+2]&$[W+4],$[W+1]^=~$[W+3]&$[W+5],$[W+2]^=~$[W+4]&$[W+6],$[W+3]^=~$[W+5]&$[W+7],$[W+4]^=~$[W+6]&$[W+8],$[W+5]^=~$[W+7]&$[W+9],$[W+6]^=~$[W+8]&K,$[W+7]^=~$[W+9]&Z,$[W+8]^=~K&H,$[W+9]^=~Z&z}$[0]^=ym4[G],$[1]^=bm4[G]}z20(X)}class F20{state;pos=0;posOut=0;finished=!1;state32;destroyed=!1;blockLen;suffix;outputLen;canXOF;enableXOF=!1;rounds;constructor($,Y,X,G=!1,J=24){if(this.blockLen=$,this.suffix=Y,this.outputLen=X,this.enableXOF=G,this.canXOF=G,this.rounds=J,ll(X,"outputLen"),!(0<$&&$<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=Z61(this.state)}clone(){return this._cloneInto()}keccak(){V20(this.state32),hm4(this.state32,this.rounds),V20(this.state32),this.posOut=0,this.pos=0}update($){H20(this),il($);let{blockLen:Y,state:X}=this,G=$.length;for(let J=0;J<G;){let Q=Math.min(Y-this.pos,G-J);for(let W=0;W<Q;W++)X[this.pos++]^=$[J++];if(this.pos===Y)this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:$,suffix:Y,pos:X,blockLen:G}=this;if($[X]^=Y,(Y&128)!==0&&X===G-1)this.keccak();$[G-1]^=128,this.keccak()}writeInto($){H20(this,!1),il($),this.finish();let Y=this.state,{blockLen:X}=this;for(let G=0,J=$.length;G<J;){if(this.posOut>=X)this.keccak();let Q=Math.min(X-this.posOut,J-G);$.set(Y.subarray(this.posOut,this.posOut+Q),G),this.posOut+=Q,G+=Q}return $}xofInto($){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto($)}xof($){return ll($),this.xofInto(new Uint8Array($))}digestInto($){if(K61($,this),this.finished)throw Error("digest() was already called");this.writeInto($.subarray(0,this.outputLen)),this.destroy()}digest(){let $=new Uint8Array(this.outputLen);return this.digestInto($),$}destroy(){this.destroyed=!0,z20(this.state)}_cloneInto($){let{blockLen:Y,suffix:X,outputLen:G,rounds:J,enableXOF:Q}=this;return $||=new F20(Y,X,G,Q,J),$.blockLen=Y,$.state32.set(this.state32),$.pos=this.pos,$.posOut=this.posOut,$.finished=this.finished,$.rounds=J,$.suffix=X,$.outputLen=G,$.enableXOF=Q,$.canXOF=this.canXOF,$.destroyed=this.destroyed,$}}var fm4=($,Y,X,G={})=>U61(()=>new F20(Y,$,X),G);var A61=fm4(6,72,64,H61(10));var gm4=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,L20=Math.ceil,W2=Math.floor,bJ="[BigNumber Error] ",B61=bJ+"Number primitive has more than 15 significant digits: ",TK=100000000000000,w6=14,D20=9007199254740991,N20=[1,10,100,1000,1e4,1e5,1e6,1e7,1e8,1e9,10000000000,100000000000,1000000000000,10000000000000],tV=1e7,_Y=1e9;function O61($){var Y,X,G,J=O.prototype={constructor:O,toString:null,valueOf:null},Q=new O(1),W=20,K=4,Z=-7,H=21,z=-1e7,V=1e7,F=!1,L=1,N=0,D={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},A="0123456789abcdefghijklmnopqrstuvwxyz",B=!0;function O(P,w){var j,C,k,S,I,v,x,y,d=this;if(!(d instanceof O))return new O(P,w);if(w==null){if(P&&P._isBigNumber===!0){if(d.s=P.s,!P.c||P.e>V)d.c=d.e=null;else if(P.e<z)d.c=[d.e=0];else d.e=P.e,d.c=P.c.slice();return}if((v=typeof P=="number")&&P*0==0){if(d.s=1/P<0?(P=-P,-1):1,P===~~P){for(S=0,I=P;I>=10;I/=10,S++);if(S>V)d.c=d.e=null;else d.e=S,d.c=[P];return}y=String(P)}else{if(!gm4.test(y=String(P)))return G(d,y,v);d.s=y.charCodeAt(0)==45?(y=y.slice(1),-1):1}if((S=y.indexOf("."))>-1)y=y.replace(".","");if((I=y.search(/e/i))>0){if(S<0)S=I;S+=+y.slice(I+1),y=y.substring(0,I)}else if(S<0)S=y.length}else{if(R$(w,2,A.length,"Base"),w==10&&B)return d=new O(P),q(d,W+d.e+1,K);if(y=String(P),v=typeof P=="number"){if(P*0!=0)return G(d,y,v,w);if(d.s=1/P<0?(y=y.slice(1),-1):1,O.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(B61+P)}else d.s=y.charCodeAt(0)===45?(y=y.slice(1),-1):1;j=A.slice(0,w),S=I=0;for(x=y.length;I<x;I++)if(j.indexOf(C=y.charAt(I))<0){if(C=="."){if(I>S){S=x;continue}}else if(!k){if(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase())){k=!0,I=-1,S=0;continue}}return G(d,String(P),v,w)}if(v=!1,y=X(y,w,10,d.s),(S=y.indexOf("."))>-1)y=y.replace(".","");else S=y.length}for(I=0;y.charCodeAt(I)===48;I++);for(x=y.length;y.charCodeAt(--x)===48;);if(y=y.slice(I,++x)){if(x-=I,v&&O.DEBUG&&x>15&&(P>D20||P!==W2(P)))throw Error(B61+d.s*P);if((S=S-I-1)>V)d.c=d.e=null;else if(S<z)d.c=[d.e=0];else{if(d.e=S,d.c=[],I=(S+1)%w6,S<0)I+=w6;if(I<x){if(I)d.c.push(+y.slice(0,I));for(x-=w6;I<x;)d.c.push(+y.slice(I,I+=w6));I=w6-(y=y.slice(I)).length}else I-=x;for(;I--;y+="0");d.c.push(+y)}}else d.c=[d.e=0]}O.clone=O61,O.ROUND_UP=0,O.ROUND_DOWN=1,O.ROUND_CEIL=2,O.ROUND_FLOOR=3,O.ROUND_HALF_UP=4,O.ROUND_HALF_DOWN=5,O.ROUND_HALF_EVEN=6,O.ROUND_HALF_CEIL=7,O.ROUND_HALF_FLOOR=8,O.EUCLID=9,O.config=O.set=function(P){var w,j;if(P!=null)if(typeof P=="object"){if(P.hasOwnProperty(w="DECIMAL_PLACES"))j=P[w],R$(j,0,_Y,w),W=j;if(P.hasOwnProperty(w="ROUNDING_MODE"))j=P[w],R$(j,0,8,w),K=j;if(P.hasOwnProperty(w="EXPONENTIAL_AT"))if(j=P[w],j&&j.pop)R$(j[0],-_Y,0,w),R$(j[1],0,_Y,w),Z=j[0],H=j[1];else R$(j,-_Y,_Y,w),Z=-(H=j<0?-j:j);if(P.hasOwnProperty(w="RANGE"))if(j=P[w],j&&j.pop)R$(j[0],-_Y,-1,w),R$(j[1],1,_Y,w),z=j[0],V=j[1];else if(R$(j,-_Y,_Y,w),j)z=-(V=j<0?-j:j);else throw Error(bJ+w+" cannot be zero: "+j);if(P.hasOwnProperty(w="CRYPTO"))if(j=P[w],j===!!j)if(j)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))F=j;else throw F=!j,Error(bJ+"crypto unavailable");else F=j;else throw Error(bJ+w+" not true or false: "+j);if(P.hasOwnProperty(w="MODULO_MODE"))j=P[w],R$(j,0,9,w),L=j;if(P.hasOwnProperty(w="POW_PRECISION"))j=P[w],R$(j,0,_Y,w),N=j;if(P.hasOwnProperty(w="FORMAT"))if(j=P[w],typeof j=="object")D=j;else throw Error(bJ+w+" not an object: "+j);if(P.hasOwnProperty(w="ALPHABET"))if(j=P[w],typeof j=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(j))B=j.slice(0,10)=="0123456789",A=j;else throw Error(bJ+w+" invalid: "+j)}else throw Error(bJ+"Object expected: "+P);return{DECIMAL_PLACES:W,ROUNDING_MODE:K,EXPONENTIAL_AT:[Z,H],RANGE:[z,V],CRYPTO:F,MODULO_MODE:L,POW_PRECISION:N,FORMAT:D,ALPHABET:A}},O.isBigNumber=function(P){if(!P||P._isBigNumber!==!0)return!1;if(!O.DEBUG)return!0;var w,j,C=P.c,k=P.e,S=P.s;$:if({}.toString.call(C)=="[object Array]"){if((S===1||S===-1)&&k>=-_Y&&k<=_Y&&k===W2(k)){if(C[0]===0){if(k===0&&C.length===1)return!0;break $}if(w=(k+1)%w6,w<1)w+=w6;if(String(C[0]).length==w){for(w=0;w<C.length;w++)if(j=C[w],j<0||j>=TK||j!==W2(j))break $;if(j!==0)return!0}}}else if(C===null&&k===null&&(S===null||S===1||S===-1))return!0;throw Error(bJ+"Invalid BigNumber: "+P)},O.maximum=O.max=function(){return M(arguments,-1)},O.minimum=O.min=function(){return M(arguments,1)},O.random=function(){var P=9007199254740992,w=Math.random()*P&2097151?function(){return W2(Math.random()*P)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(j){var C,k,S,I,v,x=0,y=[],d=new O(Q);if(j==null)j=W;else R$(j,0,_Y);if(I=L20(j/w6),F)if(crypto.getRandomValues){C=crypto.getRandomValues(new Uint32Array(I*=2));for(;x<I;)if(v=C[x]*131072+(C[x+1]>>>11),v>=9000000000000000)k=crypto.getRandomValues(new Uint32Array(2)),C[x]=k[0],C[x+1]=k[1];else y.push(v%100000000000000),x+=2;x=I/2}else if(crypto.randomBytes){C=crypto.randomBytes(I*=7);for(;x<I;)if(v=(C[x]&31)*281474976710656+C[x+1]*1099511627776+C[x+2]*4294967296+C[x+3]*16777216+(C[x+4]<<16)+(C[x+5]<<8)+C[x+6],v>=9000000000000000)crypto.randomBytes(7).copy(C,x);else y.push(v%100000000000000),x+=7;x=I/7}else throw F=!1,Error(bJ+"crypto unavailable");if(!F){for(;x<I;)if(v=w(),v<9000000000000000)y[x++]=v%100000000000000}if(I=y[--x],j%=w6,I&&j)v=N20[w6-j],y[x]=W2(I/v)*v;for(;y[x]===0;y.pop(),x--);if(x<0)y=[S=0];else{for(S=-1;y[0]===0;y.splice(0,1),S-=w6);for(x=1,v=y[0];v>=10;v/=10,x++);if(x<w6)S-=w6-x}return d.e=S,d.c=y,d}}(),O.sum=function(){var P=1,w=arguments,j=new O(w[0]);for(;P<w.length;)j=j.plus(w[P++]);return j},X=function(){var P="0123456789";function w(j,C,k,S){var I,v=[0],x,y=0,d=j.length;for(;y<d;){for(x=v.length;x--;v[x]*=C);v[0]+=S.indexOf(j.charAt(y++));for(I=0;I<v.length;I++)if(v[I]>k-1){if(v[I+1]==null)v[I+1]=0;v[I+1]+=v[I]/k|0,v[I]%=k}}return v.reverse()}return function(j,C,k,S,I){var v,x,y,d,u,b,g,p,h=j.indexOf("."),n=W,t=K;if(h>=0)d=N,N=0,j=j.replace(".",""),p=new O(C),b=p.pow(j.length-h),N=d,p.c=w(vH(Q2(b.c),b.e,"0"),10,k,P),p.e=p.c.length;g=w(j,C,k,I?(v=A,P):(v=P,A)),y=d=g.length;for(;g[--d]==0;g.pop());if(!g[0])return v.charAt(0);if(h<0)--y;else b.c=g,b.e=y,b.s=S,b=Y(b,p,n,t,k),g=b.c,u=b.r,y=b.e;if(x=y+n+1,h=g[x],d=k/2,u=u||x<0||g[x+1]!=null,u=t<4?(h!=null||u)&&(t==0||t==(b.s<0?3:2)):h>d||h==d&&(t==4||u||t==6&&g[x-1]&1||t==(b.s<0?8:7)),x<1||!g[0])j=u?vH(v.charAt(1),-n,v.charAt(0)):v.charAt(0);else{if(g.length=x,u){for(--k;++g[--x]>k;)if(g[x]=0,!x)++y,g=[1].concat(g)}for(d=g.length;!g[--d];);for(h=0,j="";h<=d;j+=v.charAt(g[h++]));j=vH(j,y,v.charAt(0))}return j}}(),Y=function(){function P(C,k,S){var I,v,x,y,d=0,u=C.length,b=k%tV,g=k/tV|0;for(C=C.slice();u--;)x=C[u]%tV,y=C[u]/tV|0,I=g*x+y*b,v=b*x+I%tV*tV+d,d=(v/S|0)+(I/tV|0)+g*y,C[u]=v%S;if(d)C=[d].concat(C);return C}function w(C,k,S,I){var v,x;if(S!=I)x=S>I?1:-1;else for(v=x=0;v<S;v++)if(C[v]!=k[v]){x=C[v]>k[v]?1:-1;break}return x}function j(C,k,S,I){var v=0;for(;S--;)C[S]-=v,v=C[S]<k[S]?1:0,C[S]=v*I+C[S]-k[S];for(;!C[0]&&C.length>1;C.splice(0,1));}return function(C,k,S,I,v){var x,y,d,u,b,g,p,h,n,t,s,K0,X0,a,Q0,e,m,$0=C.s==k.s?1:-1,Y0=C.c,Z0=k.c;if(!Y0||!Y0[0]||!Z0||!Z0[0])return new O(!C.s||!k.s||(Y0?Z0&&Y0[0]==Z0[0]:!Z0)?NaN:Y0&&Y0[0]==0||!Z0?$0*0:$0/0);if(h=new O($0),n=h.c=[],y=C.e-k.e,$0=S+y+1,!v)v=TK,y=K2(C.e/w6)-K2(k.e/w6),$0=$0/w6|0;for(d=0;Z0[d]==(Y0[d]||0);d++);if(Z0[d]>(Y0[d]||0))y--;if($0<0)n.push(1),u=!0;else{if(a=Y0.length,e=Z0.length,d=0,$0+=2,b=W2(v/(Z0[0]+1)),b>1)Z0=P(Z0,b,v),Y0=P(Y0,b,v),e=Z0.length,a=Y0.length;X0=e,t=Y0.slice(0,e),s=t.length;for(;s<e;t[s++]=0);if(m=Z0.slice(),m=[0].concat(m),Q0=Z0[0],Z0[1]>=v/2)Q0++;do{if(b=0,x=w(Z0,t,e,s),x<0){if(K0=t[0],e!=s)K0=K0*v+(t[1]||0);if(b=W2(K0/Q0),b>1){if(b>=v)b=v-1;g=P(Z0,b,v),p=g.length,s=t.length;while(w(g,t,p,s)==1)b--,j(g,e<p?m:Z0,p,v),p=g.length,x=1}else{if(b==0)x=b=1;g=Z0.slice(),p=g.length}if(p<s)g=[0].concat(g);if(j(t,g,s,v),s=t.length,x==-1)while(w(Z0,t,e,s)<1)b++,j(t,e<s?m:Z0,s,v),s=t.length}else if(x===0)b++,t=[0];if(n[d++]=b,t[0])t[s++]=Y0[X0]||0;else t=[Y0[X0]],s=1}while((X0++<a||t[0]!=null)&&$0--);if(u=t[0]!=null,!n[0])n.splice(0,1)}if(v==TK){for(d=1,$0=n[0];$0>=10;$0/=10,d++);q(h,S+(h.e=d+y*w6-1)+1,I,u)}else h.e=y,h.r=+u;return h}}();function E(P,w,j,C){var k,S,I,v,x;if(j==null)j=K;else R$(j,0,8);if(!P.c)return P.toString();if(k=P.c[0],I=P.e,w==null)x=Q2(P.c),x=C==1||C==2&&(I<=Z||I>=H)?rl(x,I):vH(x,I,"0");else if(P=q(new O(P),w,j),S=P.e,x=Q2(P.c),v=x.length,C==1||C==2&&(w<=S||S<=Z)){for(;v<w;x+="0",v++);x=rl(x,S)}else if(w-=I+(C===2&&S>I),x=vH(x,S,"0"),S+1>v){if(--w>0)for(x+=".";w--;x+="0");}else if(w+=S-v,w>0){if(S+1==v)x+=".";for(;w--;x+="0");}return P.s<0&&k?"-"+x:x}function M(P,w){var j,C,k=1,S=new O(P[0]);for(;k<P.length;k++)if(C=new O(P[k]),!C.s||(j=rN(S,C))===w||j===0&&S.s===w)S=C;return S}function R(P,w,j){var C=1,k=w.length;for(;!w[--k];w.pop());for(k=w[0];k>=10;k/=10,C++);if((j=C+j*w6-1)>V)P.c=P.e=null;else if(j<z)P.c=[P.e=0];else P.e=j,P.c=w;return P}G=function(){var P=/^(-?)0([xbo])(?=\w[\w.]*$)/i,w=/^([^.]+)\.$/,j=/^\.([^.]+)$/,C=/^-?(Infinity|NaN)$/,k=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(S,I,v,x){var y,d=v?I:I.replace(k,"");if(C.test(d))S.s=isNaN(d)?null:d<0?-1:1;else{if(!v){if(d=d.replace(P,function(u,b,g){return y=(g=g.toLowerCase())=="x"?16:g=="b"?2:8,!x||x==y?b:u}),x)y=x,d=d.replace(w,"$1").replace(j,"0.$1");if(I!=d)return new O(d,y)}if(O.DEBUG)throw Error(bJ+"Not a"+(x?" base "+x:"")+" number: "+I);S.s=null}S.c=S.e=null}}();function q(P,w,j,C){var k,S,I,v,x,y,d,u=P.c,b=N20;if(u){$:{for(k=1,v=u[0];v>=10;v/=10,k++);if(S=w-k,S<0)S+=w6,I=w,x=u[y=0],d=W2(x/b[k-I-1]%10);else if(y=L20((S+1)/w6),y>=u.length)if(C){for(;u.length<=y;u.push(0));x=d=0,k=1,S%=w6,I=S-w6+1}else break $;else{x=v=u[y];for(k=1;v>=10;v/=10,k++);S%=w6,I=S-w6+k,d=I<0?0:W2(x/b[k-I-1]%10)}if(C=C||w<0||u[y+1]!=null||(I<0?x:x%b[k-I-1]),C=j<4?(d||C)&&(j==0||j==(P.s<0?3:2)):d>5||d==5&&(j==4||C||j==6&&(S>0?I>0?x/b[k-I]:0:u[y-1])%10&1||j==(P.s<0?8:7)),w<1||!u[0]){if(u.length=0,C)w-=P.e+1,u[0]=b[(w6-w%w6)%w6],P.e=-w||0;else u[0]=P.e=0;return P}if(S==0)u.length=y,v=1,y--;else u.length=y+1,v=b[w6-S],u[y]=I>0?W2(x/b[k-I]%b[I])*v:0;if(C)for(;;)if(y==0){for(S=1,I=u[0];I>=10;I/=10,S++);I=u[0]+=v;for(v=1;I>=10;I/=10,v++);if(S!=v){if(P.e++,u[0]==TK)u[0]=1}break}else{if(u[y]+=v,u[y]!=TK)break;u[y--]=0,v=1}for(S=u.length;u[--S]===0;u.pop());}if(P.e>V)P.c=P.e=null;else if(P.e<z)P.c=[P.e=0]}return P}function _(P){var w,j=P.e;if(j===null)return P.toString();return w=Q2(P.c),w=j<=Z||j>=H?rl(w,j):vH(w,j,"0"),P.s<0?"-"+w:w}if(J.absoluteValue=J.abs=function(){var P=new O(this);if(P.s<0)P.s=1;return P},J.comparedTo=function(P,w){return rN(this,new O(P,w))},J.decimalPlaces=J.dp=function(P,w){var j,C,k,S=this;if(P!=null){if(R$(P,0,_Y),w==null)w=K;else R$(w,0,8);return q(new O(S),P+S.e+1,w)}if(!(j=S.c))return null;if(C=((k=j.length-1)-K2(this.e/w6))*w6,k=j[k])for(;k%10==0;k/=10,C--);if(C<0)C=0;return C},J.dividedBy=J.div=function(P,w){return Y(this,new O(P,w),W,K)},J.dividedToIntegerBy=J.idiv=function(P,w){return Y(this,new O(P,w),0,1)},J.exponentiatedBy=J.pow=function(P,w){var j,C,k,S,I,v,x,y,d,u=this;if(P=new O(P),P.c&&!P.isInteger())throw Error(bJ+"Exponent not an integer: "+_(P));if(w!=null)w=new O(w);if(v=P.e>14,!u.c||!u.c[0]||u.c[0]==1&&!u.e&&u.c.length==1||!P.c||!P.c[0])return d=new O(Math.pow(+_(u),v?P.s*(2-nl(P)):+_(P))),w?d.mod(w):d;if(x=P.s<0,w){if(w.c?!w.c[0]:!w.s)return new O(NaN);if(C=!x&&u.isInteger()&&w.isInteger(),C)u=u.mod(w)}else if(P.e>9&&(u.e>0||u.e<-1||(u.e==0?u.c[0]>1||v&&u.c[1]>=240000000:u.c[0]<80000000000000||v&&u.c[0]<=99999750000000))){if(S=u.s<0&&nl(P)?-0:0,u.e>-1)S=1/S;return new O(x?1/S:S)}else if(N)S=L20(N/w6+2);if(v){if(j=new O(0.5),x)P.s=1;y=nl(P)}else k=Math.abs(+_(P)),y=k%2;d=new O(Q);for(;;){if(y){if(d=d.times(u),!d.c)break;if(S){if(d.c.length>S)d.c.length=S}else if(C)d=d.mod(w)}if(k){if(k=W2(k/2),k===0)break;y=k%2}else if(P=P.times(j),q(P,P.e+1,1),P.e>14)y=nl(P);else{if(k=+_(P),k===0)break;y=k%2}if(u=u.times(u),S){if(u.c&&u.c.length>S)u.c.length=S}else if(C)u=u.mod(w)}if(C)return d;if(x)d=Q.div(d);return w?d.mod(w):S?q(d,N,K,I):d},J.integerValue=function(P){var w=new O(this);if(P==null)P=K;else R$(P,0,8);return q(w,w.e+1,P)},J.isEqualTo=J.eq=function(P,w){return rN(this,new O(P,w))===0},J.isFinite=function(){return!!this.c},J.isGreaterThan=J.gt=function(P,w){return rN(this,new O(P,w))>0},J.isGreaterThanOrEqualTo=J.gte=function(P,w){return(w=rN(this,new O(P,w)))===1||w===0},J.isInteger=function(){return!!this.c&&K2(this.e/w6)>this.c.length-2},J.isLessThan=J.lt=function(P,w){return rN(this,new O(P,w))<0},J.isLessThanOrEqualTo=J.lte=function(P,w){return(w=rN(this,new O(P,w)))===-1||w===0},J.isNaN=function(){return!this.s},J.isNegative=function(){return this.s<0},J.isPositive=function(){return this.s>0},J.isZero=function(){return!!this.c&&this.c[0]==0},J.minus=function(P,w){var j,C,k,S,I=this,v=I.s;if(P=new O(P,w),w=P.s,!v||!w)return new O(NaN);if(v!=w)return P.s=-w,I.plus(P);var x=I.e/w6,y=P.e/w6,d=I.c,u=P.c;if(!x||!y){if(!d||!u)return d?(P.s=-w,P):new O(u?I:NaN);if(!d[0]||!u[0])return u[0]?(P.s=-w,P):new O(d[0]?I:K==3?-0:0)}if(x=K2(x),y=K2(y),d=d.slice(),v=x-y){if(S=v<0)v=-v,k=d;else y=x,k=u;k.reverse();for(w=v;w--;k.push(0));k.reverse()}else{C=(S=(v=d.length)<(w=u.length))?v:w;for(v=w=0;w<C;w++)if(d[w]!=u[w]){S=d[w]<u[w];break}}if(S)k=d,d=u,u=k,P.s=-P.s;if(w=(C=u.length)-(j=d.length),w>0)for(;w--;d[j++]=0);w=TK-1;for(;C>v;){if(d[--C]<u[C]){for(j=C;j&&!d[--j];d[j]=w);--d[j],d[C]+=TK}d[C]-=u[C]}for(;d[0]==0;d.splice(0,1),--y);if(!d[0])return P.s=K==3?-1:1,P.c=[P.e=0],P;return R(P,d,y)},J.modulo=J.mod=function(P,w){var j,C,k=this;if(P=new O(P,w),!k.c||!P.s||P.c&&!P.c[0])return new O(NaN);else if(!P.c||k.c&&!k.c[0])return new O(k);if(L==9)C=P.s,P.s=1,j=Y(k,P,0,3),P.s=C,j.s*=C;else j=Y(k,P,0,L);if(P=k.minus(j.times(P)),!P.c[0]&&L==1)P.s=k.s;return P},J.multipliedBy=J.times=function(P,w){var j,C,k,S,I,v,x,y,d,u,b,g,p,h,n,t=this,s=t.c,K0=(P=new O(P,w)).c;if(!s||!K0||!s[0]||!K0[0]){if(!t.s||!P.s||s&&!s[0]&&!K0||K0&&!K0[0]&&!s)P.c=P.e=P.s=null;else if(P.s*=t.s,!s||!K0)P.c=P.e=null;else P.c=[0],P.e=0;return P}if(C=K2(t.e/w6)+K2(P.e/w6),P.s*=t.s,x=s.length,u=K0.length,x<u)p=s,s=K0,K0=p,k=x,x=u,u=k;for(k=x+u,p=[];k--;p.push(0));h=TK,n=tV;for(k=u;--k>=0;){j=0,b=K0[k]%n,g=K0[k]/n|0;for(I=x,S=k+I;S>k;)y=s[--I]%n,d=s[I]/n|0,v=g*y+d*b,y=b*y+v%n*n+p[S]+j,j=(y/h|0)+(v/n|0)+g*d,p[S--]=y%h;p[S]=j}if(j)++C;else p.splice(0,1);return R(P,p,C)},J.negated=function(){var P=new O(this);return P.s=-P.s||null,P},J.plus=function(P,w){var j,C=this,k=C.s;if(P=new O(P,w),w=P.s,!k||!w)return new O(NaN);if(k!=w)return P.s=-w,C.minus(P);var S=C.e/w6,I=P.e/w6,v=C.c,x=P.c;if(!S||!I){if(!v||!x)return new O(k/0);if(!v[0]||!x[0])return x[0]?P:new O(v[0]?C:k*0)}if(S=K2(S),I=K2(I),v=v.slice(),k=S-I){if(k>0)I=S,j=x;else k=-k,j=v;j.reverse();for(;k--;j.push(0));j.reverse()}if(k=v.length,w=x.length,k-w<0)j=x,x=v,v=j,w=k;for(k=0;w;)k=(v[--w]=v[w]+x[w]+k)/TK|0,v[w]=TK===v[w]?0:v[w]%TK;if(k)v=[k].concat(v),++I;return R(P,v,I)},J.precision=J.sd=function(P,w){var j,C,k,S=this;if(P!=null&&P!==!!P){if(R$(P,1,_Y),w==null)w=K;else R$(w,0,8);return q(new O(S),P,w)}if(!(j=S.c))return null;if(k=j.length-1,C=k*w6+1,k=j[k]){for(;k%10==0;k/=10,C--);for(k=j[0];k>=10;k/=10,C++);}if(P&&S.e+1>C)C=S.e+1;return C},J.shiftedBy=function(P){return R$(P,-D20,D20),this.times("1e"+P)},J.squareRoot=J.sqrt=function(){var P,w,j,C,k,S=this,I=S.c,v=S.s,x=S.e,y=W+4,d=new O("0.5");if(v!==1||!I||!I[0])return new O(!v||v<0&&(!I||I[0])?NaN:I?S:1/0);if(v=Math.sqrt(+_(S)),v==0||v==1/0){if(w=Q2(I),(w.length+x)%2==0)w+="0";if(v=Math.sqrt(+w),x=K2((x+1)/2)-(x<0||x%2),v==1/0)w="5e"+x;else w=v.toExponential(),w=w.slice(0,w.indexOf("e")+1)+x;j=new O(w)}else j=new O(v+"");if(j.c[0]){if(x=j.e,v=x+y,v<3)v=0;for(;;)if(k=j,j=d.times(k.plus(Y(S,k,y,1))),Q2(k.c).slice(0,v)===(w=Q2(j.c)).slice(0,v)){if(j.e<x)--v;if(w=w.slice(v-3,v+1),w=="9999"||!C&&w=="4999"){if(!C){if(q(k,k.e+W+2,0),k.times(k).eq(S)){j=k;break}}y+=4,v+=4,C=1}else{if(!+w||!+w.slice(1)&&w.charAt(0)=="5")q(j,j.e+W+2,1),P=!j.times(j).eq(S);break}}}return q(j,j.e+W+1,K,P)},J.toExponential=function(P,w){if(P!=null)R$(P,0,_Y),P++;return E(this,P,w,1)},J.toFixed=function(P,w){if(P!=null)R$(P,0,_Y),P=P+this.e+1;return E(this,P,w)},J.toFormat=function(P,w,j){var C,k=this;if(j==null)if(P!=null&&w&&typeof w=="object")j=w,w=null;else if(P&&typeof P=="object")j=P,P=w=null;else j=D;else if(typeof j!="object")throw Error(bJ+"Argument not an object: "+j);if(C=k.toFixed(P,w),k.c){var S,I=C.split("."),v=+j.groupSize,x=+j.secondaryGroupSize,y=j.groupSeparator||"",d=I[0],u=I[1],b=k.s<0,g=b?d.slice(1):d,p=g.length;if(x)S=v,v=x,x=S,p-=S;if(v>0&&p>0){S=p%v||v,d=g.substr(0,S);for(;S<p;S+=v)d+=y+g.substr(S,v);if(x>0)d+=y+g.slice(S);if(b)d="-"+d}C=u?d+(j.decimalSeparator||"")+((x=+j.fractionGroupSize)?u.replace(new RegExp("\\d{"+x+"}\\B","g"),"$&"+(j.fractionGroupSeparator||"")):u):d}return(j.prefix||"")+C+(j.suffix||"")},J.toFraction=function(P){var w,j,C,k,S,I,v,x,y,d,u,b,g=this,p=g.c;if(P!=null){if(v=new O(P),!v.isInteger()&&(v.c||v.s!==1)||v.lt(Q))throw Error(bJ+"Argument "+(v.isInteger()?"out of range: ":"not an integer: ")+_(v))}if(!p)return new O(g);w=new O(Q),y=j=new O(Q),C=x=new O(Q),b=Q2(p),S=w.e=b.length-g.e-1,w.c[0]=N20[(I=S%w6)<0?w6+I:I],P=!P||v.comparedTo(w)>0?S>0?w:y:v,I=V,V=1/0,v=new O(b),x.c[0]=0;for(;;){if(d=Y(v,w,0,1),k=j.plus(d.times(C)),k.comparedTo(P)==1)break;j=C,C=k,y=x.plus(d.times(k=y)),x=k,w=v.minus(d.times(k=w)),v=k}return k=Y(P.minus(j),C,0,1),x=x.plus(k.times(y)),j=j.plus(k.times(C)),x.s=y.s=g.s,S=S*2,u=Y(y,C,S,K).minus(g).abs().comparedTo(Y(x,j,S,K).minus(g).abs())<1?[y,C]:[x,j],V=I,u},J.toNumber=function(){return+_(this)},J.toPrecision=function(P,w){if(P!=null)R$(P,1,_Y);return E(this,P,w,2)},J.toString=function(P){var w,j=this,C=j.s,k=j.e;if(k===null)if(C){if(w="Infinity",C<0)w="-"+w}else w="NaN";else{if(P==null)w=k<=Z||k>=H?rl(Q2(j.c),k):vH(Q2(j.c),k,"0");else if(P===10&&B)j=q(new O(j),W+k+1,K),w=vH(Q2(j.c),j.e,"0");else R$(P,2,A.length,"Base"),w=X(vH(Q2(j.c),k,"0"),10,P,C,!0);if(C<0&&j.c[0])w="-"+w}return w},J.valueOf=J.toJSON=function(){return _(this)},J._isBigNumber=!0,J[Symbol.toStringTag]="BigNumber",J[Symbol.for("nodejs.util.inspect.custom")]=J.valueOf,$!=null)O.set($);return O}function K2($){var Y=$|0;return $>0||$===Y?Y:Y-1}function Q2($){var Y,X,G=1,J=$.length,Q=$[0]+"";for(;G<J;){Y=$[G++]+"",X=w6-Y.length;for(;X--;Y="0"+Y);Q+=Y}for(J=Q.length;Q.charCodeAt(--J)===48;);return Q.slice(0,J+1||1)}function rN($,Y){var X,G,J=$.c,Q=Y.c,W=$.s,K=Y.s,Z=$.e,H=Y.e;if(!W||!K)return null;if(X=J&&!J[0],G=Q&&!Q[0],X||G)return X?G?0:-K:W;if(W!=K)return W;if(X=W<0,G=Z==H,!J||!Q)return G?0:!J^X?1:-1;if(!G)return Z>H^X?1:-1;K=(Z=J.length)<(H=Q.length)?Z:H;for(W=0;W<K;W++)if(J[W]!=Q[W])return J[W]>Q[W]^X?1:-1;return Z==H?0:Z>H^X?1:-1}function R$($,Y,X,G){if($<Y||$>X||$!==W2($))throw Error(bJ+(G||"Argument")+(typeof $=="number"?$<Y||$>X?" out of range: ":" not an integer: ":" not a primitive number: ")+String($))}function nl($){var Y=$.c.length-1;return K2($.e/w6)==Y&&$.c[Y]%2!=0}function rl($,Y){return($.length>1?$.charAt(0)+"."+$.slice(1):$)+(Y<0?"e":"e+")+Y}function vH($,Y,X){var G,J;if(Y<0){for(J=X+".";++Y;J+=X);$=J+$}else if(G=$.length,++Y>G){for(J=X,Y-=G;--Y;J+=X);$+=J}else if(Y<G)$=$.slice(0,Y)+"."+$.slice(Y);return $}var mm4=O61(),E61=mm4;var um4=24,Yk=32,pm4=()=>{if(typeof globalThis<"u"&&globalThis.crypto&&typeof globalThis.crypto.getRandomValues==="function")return()=>{let $=new Uint32Array(1);return globalThis.crypto.getRandomValues($),$[0]/4294967296};return Math.random},B20=pm4(),A20=($=4,Y=B20)=>{let X="";while(X.length<$)X=X+Math.floor(Y()*36).toString(36);return X};function dm4($){let Y=new E61(0);for(let X of $.values())Y=Y.multipliedBy(256).plus(X);return Y}var R61=($="")=>{return dm4(A61(new TextEncoder().encode($))).toString(36).slice(1)},M61=Array.from({length:26},($,Y)=>String.fromCharCode(Y+97)),cm4=($)=>M61[Math.floor($()*M61.length)],lm4=({globalObj:$=typeof global<"u"?global:typeof window<"u"?window:{},random:Y=B20}={})=>{let X=Object.keys($).toString(),G=X.length?X+A20(Yk,Y):A20(Yk,Y);return R61(G).substring(0,Yk)},im4=($)=>()=>{return $++},nm4=476782367,q61=({random:$=B20,counter:Y=im4(Math.floor($()*nm4)),length:X=um4,fingerprint:G=lm4({random:$})}={})=>{if(X>Yk)throw Error(`Length must be between 2 and ${Yk}. Received: ${X}`);return function(){let Q=cm4($),W=Date.now().toString(36),K=Y().toString(36),Z=A20(X,$),H=`${W+Z+K+G}`;return`${Q+R61(H).substring(1,X)}`}},xH=rm4(q61);function rm4($){let Y;return()=>{if(!Y)Y=$();return Y()}}function C6(){return xH()}var hJ=B6("sys_apimanager_proxy_detail",{id:g0("id"),name:g0("name"),path1:g0("path1"),path2:g0("path2"),target:g0("target"),remark:g0("remark"),parames:g0("parames"),resp:g0("resp"),activate:m1("activate"),createdAt:m1("createdAt"),updatedAt:m1("updatedAt"),createBy:g0("createBy"),updateBy:g0("updateBy"),env_id:g0("env_id")});async function aN($){return await e0.select().from(hJ).where(_1(hJ.path1,$))}async function P61($,Y){return await e0.select().from(hJ).where(c$(_1(hJ.path1,$),_1(hJ.path2,Y)))}async function yH($){let Y=await e0.$count(hJ,_1(hJ.id,$.id));if(Y&&Y>0)am4($);else{let X=Date.now();$.id=C6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await e0.insert(hJ).values($)}}async function am4($){let Y=Date.now();$.updateBy="admin",$.updatedAt=Y,await e0.update(hJ).set($).where(_1(hJ.id,$.id))}async function w61($){await e0.delete(hJ).where(_1(hJ.id,$))}async function _61($){await e0.delete(hJ).where(_1(hJ.path1,$))}var Q71=U6(JZ0(),1),W71=U6(J71(),1),HZ0=new W71.default({filename:"log-%DATE%.log",datePattern:"YYYY-MM-DD",zippedArchive:!0,maxSize:"100m",maxFiles:"14d",dirname:"logs"});HZ0.on("error",($)=>{kK.info(`error:${$.message}`)});HZ0.on("rotate",($,Y)=>{});var kK=Q71.createLogger({transports:[HZ0]});function fX(){let $=new Date,Y=(G)=>G<10?`0${G}`:`${G}`;return`${$.getFullYear()}-${Y($.getMonth()+1)}-${Y($.getDate())} ${Y($.getHours())}:${Y($.getMinutes())}:${Y($.getSeconds())}`}function K71(){let $=new Date,Y=(G)=>G<10?`0${G}`:`${G}`;return`${$.getFullYear()}${Y($.getMonth()+1)}${Y($.getDate())}`}function _i(){let $=new Date,Y=(G)=>G<10?`0${G}`:`${G}`;return`${$.getFullYear()}-${Y($.getMonth()+1)}-${Y($.getDate())}`}function Z71($,Y="YYYY-MM-DD"){let X=new Date;X.setDate(X.getDate()+$);let G=(Q)=>Q<10?`0${Q}`:`${Q}`,J={YYYY:`${X.getFullYear()}`,MM:G(X.getMonth()+1),DD:G(X.getDate()),HH:G(X.getHours()),mm:G(X.getMinutes()),ss:G(X.getSeconds())};return Y.replace(/YYYY|MM|DD|HH|mm|ss/g,(Q)=>J[Q])}function U71($=1000){return new Promise((Y)=>setTimeout(Y,$))}var Hr4=Object.prototype.toString;function H71($,Y){return Hr4.call($)===`[object ${Y}]`}function a8($){return $&&Array.isArray($)}function q$($){return H71($,"String")}function zr4($){return $===null}function ji($){return!zr4($)&&H71($,"Object")}function D7($){if(!$)return;return Object.keys($).forEach((Y)=>{if($[Y]===""||$[Y]===void 0||$[Y]===null||$[Y]==="null"||$[Y]==="undefined")delete $[Y]}),$}function WF($,Y){for(let X in Y)if(Y.hasOwnProperty(X))if(typeof Y[X]==="object"&&!Array.isArray(Y[X])&&$.hasOwnProperty(X)&&typeof $[X]==="object"&&!Array.isArray($[X]))WF($[X],Y[X]);else $[X]=Y[X]}function KF($){if($===null||$===void 0)return"";if(typeof $==="object")try{return JSON.stringify($)}catch{return $.toString()}return String($)}function vK($,Y,X="info"){let G=new Date().toISOString();console.log(`[${Y}] [${G}] [${X.toUpperCase()}] ${$}`),kK.info(`[${Y}] [${G}] [${X.toUpperCase()}] ${$}`)}function eR($){if(!$&&$!==0)return null;if(typeof $==="number"||Vr4($)){let Y=Number($)>946684800000;return new Date(Y?Number($):Number($)*1000)}if(typeof $==="string"){let Y=$.trim(),X=Y.match(/^(\d{4})-(\d{1,2})-(\d{1,2})\s+(\d{1,2}):(\d{1,2}):(\d{1,2})$/);if(X){let[Q,W,K,Z,H,z,V]=X;if(W&&K&&Z&&H&&z&&V)return new Date(parseInt(W),parseInt(K)-1,parseInt(Z),parseInt(H)+8,parseInt(z),parseInt(V))}let G=Y.match(/^(\d{4})-(\d{1,2})-(\d{1,2})$/);if(G){let[Q,W,K,Z]=G;if(W&&K&&Z)return new Date(parseInt(W),parseInt(K)-1,parseInt(Z))}let J=new Date(Y);if(!isNaN(J.getTime()))return J}return null}function Vr4($){if(!/^\d+$/.test($))return!1;let Y=Number($);if(!Number.isInteger(Y)||Y<=0)return!1;let X=$.length;if(X===10)return Y>=0&&Y<=4102444800;if(X===13)return Y>=0&&Y<=4102444800000;if(X>=9&&X<=13)return!0;return!1}function Ti($=new Date){let Y=$.getFullYear(),X=$.getMonth()+1;return`${Y}${X.toString().padStart(2,"0")}`}var Ik=B6("sys_apimanager_proxy_statistics",{id:g0("id"),month:g0("month"),path1:g0("path1"),path2:g0("path2"),access:m1("access"),createdAt:m1("createdAt"),updatedAt:m1("updatedAt"),createBy:g0("createBy"),updateBy:g0("updateBy"),env_id:g0("env_id")});async function z71($){let Y=await e0.$count(Ik,c$(_1(Ik.month,$.month),_1(Ik.path1,$.path1),_1(Ik.path2,$.path2)));if(Y&&Y>0){let X=r`UPDATE sys_apimanager_proxy_statistics 
          SET access = access + 1 
          WHERE
	          month = ${$.month} 
	          AND path1 = ${$.path1} 
	          AND path2 = ${$.path2}`;e0.run(X)}else{let X=Date.now();$.id=C6(),$.access=1,$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await e0.insert(Ik).values($)}}async function V71(){let Y=`SELECT
	  MIN( month ) AS month,
	  SUM( access ) AS access 
  FROM
	  sys_apimanager_proxy_statistics 
  WHERE
	  month IN ( ${Lr4(Fr4())} ) 
  GROUP BY
	  month
  ORDER BY
	  month ASC`,X=r.raw(Y);return e0.all(X)}async function F71(){let Y=`SELECT
	  MIN( path1 ) || '/' || MIN( path2 ) AS name,
	  SUM( access ) AS value 
  FROM
	  sys_apimanager_proxy_statistics 
  WHERE
	  month = '${Ti()}' 
  GROUP BY
	  month,
	  path1,
	  path2 
  ORDER BY
	  access DESC 
	LIMIT 10`,X=r.raw(Y);return e0.all(X)}function Fr4(){let $=[],Y=new Date;for(let X=0;X<12;X++){let G=new Date(Y);G.setMonth(G.getMonth()-X);let J=G.getFullYear(),Q=G.getMonth()+1,W=`${J}${Q.toString().padStart(2,"0")}`;$.push(W)}return $}function Lr4($){return $.map((Y)=>`'${Y}'`).join(",")}var z2=B6("sys_appmanager",{id:g0("id"),appId:g0("appId"),appSecret:g0("appSecret"),day:m1("day"),status:m1("status"),remark:g0("remark"),createdAt:m1("createdAt"),updatedAt:m1("updatedAt"),latest_visitAt:m1("latest_visitAt"),createBy:g0("createBy"),updateBy:g0("updateBy"),env_id:g0("env_id")});async function Ii($,Y){return await e0.select().from(z2).where(c$(_1(z2.appId,$),_1(z2.appSecret,Y)))}function D71($){let Y=r.raw("1 = 1");if($.appId&&$.appId.length>0)Y.append(r.raw(` and appId like '%${$.appId}%'`));if($.remark&&$.remark.length>0)Y.append(r.raw(` and remark like '%${$.remark}%'`));return Y}async function N71($){return await e0.select().from(z2).where(D71($)).limit(Number($.limit)).offset(Number($.offset))}async function A71($){return await e0.$count(z2,D71($))}async function B71($){let Y=await e0.$count(z2,_1(z2.id,$.id));if(Y&&Y>0)Dr4($);else{let X=Date.now();$.id=C6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await e0.insert(z2).values($)}}async function Dr4($){let Y=Date.now();$.updateBy="admin",$.updatedAt=Y,$.latest_visitAt=Y,await e0.update(z2).set($).where(_1(z2.id,$.id))}async function O71($){await e0.delete(z2).where(_1(z2.id,$))}var Ln=U6(jY1(),1),TY1="v0aq61d01j44fke9i1mor7ro";function LZ0($){let Y=JSON.stringify($);return Ln.default.AES.encrypt(Y,TY1).toString()}function IY1($){let X=Ln.default.AES.decrypt($,TY1).toString(Ln.default.enc.Utf8);if(X)return JSON.parse(X);return null}var VA=B6("sys_config",{id:g0("id"),name:g0("name"),code:g0("code"),val:g0("val"),createdAt:m1("createdAt"),updatedAt:m1("updatedAt"),latest_visitAt:m1("latest_visitAt"),createBy:g0("createBy"),updateBy:g0("updateBy"),env_id:g0("env_id")});async function Sk($){let Y=await e0.select().from(VA).where(_1(VA.code,$));if(Y&&Y[0]&&Y[0].val)return IY1(Y[0].val);else return null}async function kk($){let Y=await e0.$count(VA,_1(VA.code,$.code));if(Y&&Y>0)Nr4($);else{let X=Date.now();$.id=C6(),$.code=$.code??C6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,$.val=LZ0($.val),await e0.insert(VA).values($)}}async function Nr4($){let Y=Date.now();$.updatedAt=Y,$.latest_visitAt=Y,$.val=LZ0($.val),await e0.update(VA).set($).where(_1(VA.code,$.code))}function SY1($){return $}function $q($){return $==="__proto__"}function Dn($){switch(typeof $){case"number":case"symbol":return!1;case"string":return $.includes(".")||$.includes("[")||$.includes("]")}}function HF($){if(typeof $==="string"||typeof $==="symbol")return $;if(Object.is($?.valueOf?.(),-0))return"-0";return String($)}function zF($){if($==null)return"";if(typeof $==="string")return $;if(Array.isArray($))return $.map(zF).join(",");let Y=String($);if(Y==="0"&&Object.is(Number($),-0))return"-0";return Y}function Yq($){if(Array.isArray($))return $.map(HF);if(typeof $==="symbol")return[$];$=zF($);let Y=[],X=$.length;if(X===0)return Y;let G=0,J="",Q="",W=!1;if($.charCodeAt(0)===46)Y.push(""),G++;while(G<X){let K=$[G];if(Q)if(K==="\\"&&G+1<X)G++,J+=$[G];else if(K===Q)Q="";else J+=K;else if(W)if(K==='"'||K==="'")Q=K;else if(K==="]")W=!1,Y.push(J),J="";else J+=K;else if(K==="["){if(W=!0,J)Y.push(J),J=""}else if(K==="."){if(J)Y.push(J),J=""}else J+=K;G++}if(J)Y.push(J);return Y}function D4($,Y,X){if($==null)return X;switch(typeof Y){case"string":{if($q(Y))return X;let G=$[Y];if(G===void 0)if(Dn(Y))return D4($,Yq(Y),X);else return X;return G}case"number":case"symbol":{if(typeof Y==="number")Y=HF(Y);let G=$[Y];if(G===void 0)return X;return G}default:{if(Array.isArray(Y))return Ar4($,Y,X);if(Object.is(Y?.valueOf(),-0))Y="-0";else Y=String(Y);if($q(Y))return X;let G=$[Y];if(G===void 0)return X;return G}}}function Ar4($,Y,X){if(Y.length===0)return X;let G=$;for(let J=0;J<Y.length;J++){if(G==null)return X;if($q(Y[J]))return X;G=G[Y[J]]}if(G===void 0)return X;return G}function kY1($){return function(Y){return D4(Y,$)}}function gH($){return $!==null&&(typeof $==="object"||typeof $==="function")}function vk($){return $==null||typeof $!=="object"&&typeof $!=="function"}function gX($,Y){return $===Y||Number.isNaN($)&&Number.isNaN(Y)}function NZ0($,Y,X){if(typeof X!=="function")return NZ0($,Y,()=>{return});return DZ0($,Y,function G(J,Q,W,K,Z,H){let z=X(J,Q,W,K,Z,H);if(z!==void 0)return Boolean(z);return DZ0(J,Q,G,H)},new Map)}function DZ0($,Y,X,G){if(Y===$)return!0;switch(typeof Y){case"object":return Br4($,Y,X,G);case"function":{if(Object.keys(Y).length>0)return DZ0($,{...Y},X,G);return gX($,Y)}default:{if(!gH($))return gX($,Y);if(typeof Y==="string")return Y==="";return!0}}}function Br4($,Y,X,G){if(Y==null)return!0;if(Array.isArray(Y))return vY1($,Y,X,G);if(Y instanceof Map)return Or4($,Y,X,G);if(Y instanceof Set)return Er4($,Y,X,G);let J=Object.keys(Y);if($==null||vk($))return J.length===0;if(J.length===0)return!0;if(G?.has(Y))return G.get(Y)===$;G?.set(Y,$);try{for(let Q=0;Q<J.length;Q++){let W=J[Q];if(!vk($)&&!(W in $))return!1;if(Y[W]===void 0&&$[W]!==void 0)return!1;if(Y[W]===null&&$[W]!==null)return!1;if(!X($[W],Y[W],W,$,Y,G))return!1}return!0}finally{G?.delete(Y)}}function Or4($,Y,X,G){if(Y.size===0)return!0;if(!($ instanceof Map))return!1;for(let[J,Q]of Y.entries()){let W=$.get(J);if(X(W,Q,J,$,Y,G)===!1)return!1}return!0}function vY1($,Y,X,G){if(Y.length===0)return!0;if(!Array.isArray($))return!1;let J=new Set;for(let Q=0;Q<Y.length;Q++){let W=Y[Q],K=!1;for(let Z=0;Z<$.length;Z++){if(J.has(Z))continue;let H=$[Z],z=!1;if(X(H,W,Q,$,Y,G))z=!0;if(z){J.add(Z),K=!0;break}}if(!K)return!1}return!0}function Er4($,Y,X,G){if(Y.size===0)return!0;if(!($ instanceof Set))return!1;return vY1([...$],[...Y],X,G)}function Nn($,Y){return NZ0($,Y,()=>{return})}function xY1($){return Object.getOwnPropertySymbols($).filter((Y)=>Object.prototype.propertyIsEnumerable.call($,Y))}function Xq($){if($==null)return $===void 0?"[object Undefined]":"[object Null]";return Object.prototype.toString.call($)}var yY1="[object RegExp]",An="[object String]",Bn="[object Number]",On="[object Boolean]",En="[object Arguments]",bY1="[object Symbol]",hY1="[object Date]",fY1="[object Map]",gY1="[object Set]",mY1="[object Array]";var uY1="[object ArrayBuffer]",Mn="[object Object]";var pY1="[object DataView]",dY1="[object Uint8Array]",cY1="[object Uint8ClampedArray]",lY1="[object Uint16Array]",iY1="[object Uint32Array]";var nY1="[object Int8Array]",rY1="[object Int16Array]",aY1="[object Int32Array]";var sY1="[object Float32Array]",oY1="[object Float64Array]";var AZ0=typeof globalThis==="object"&&globalThis||typeof window==="object"&&window||typeof self==="object"&&self||typeof global==="object"&&global||function(){return this}()||Function("return this")();function Gq($){return typeof AZ0.Buffer<"u"&&AZ0.Buffer.isBuffer($)}function Rn($){return ArrayBuffer.isView($)&&!($ instanceof DataView)}function tY1($,Y){return VF($,void 0,$,new Map,Y)}function VF($,Y,X,G=new Map,J=void 0){let Q=J?.($,Y,X,G);if(Q!==void 0)return Q;if(vk($))return $;if(G.has($))return G.get($);if(Array.isArray($)){let W=Array($.length);G.set($,W);for(let K=0;K<$.length;K++)W[K]=VF($[K],K,X,G,J);if(Object.hasOwn($,"index"))W.index=$.index;if(Object.hasOwn($,"input"))W.input=$.input;return W}if($ instanceof Date)return new Date($.getTime());if($ instanceof RegExp){let W=new RegExp($.source,$.flags);return W.lastIndex=$.lastIndex,W}if($ instanceof Map){let W=new Map;G.set($,W);for(let[K,Z]of $)W.set(K,VF(Z,K,X,G,J));return W}if($ instanceof Set){let W=new Set;G.set($,W);for(let K of $)W.add(VF(K,void 0,X,G,J));return W}if(Gq($))return $.subarray();if(Rn($)){let W=new(Object.getPrototypeOf($)).constructor($.length);G.set($,W);for(let K=0;K<$.length;K++)W[K]=VF($[K],K,X,G,J);return W}if($ instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&$ instanceof SharedArrayBuffer)return $.slice(0);if($ instanceof DataView){let W=new DataView($.buffer.slice(0),$.byteOffset,$.byteLength);return G.set($,W),V2(W,$,X,G,J),W}if(typeof File<"u"&&$ instanceof File){let W=new File([$],$.name,{type:$.type});return G.set($,W),V2(W,$,X,G,J),W}if(typeof Blob<"u"&&$ instanceof Blob){let W=new Blob([$],{type:$.type});return G.set($,W),V2(W,$,X,G,J),W}if($ instanceof Error){let W=structuredClone($);return G.set($,W),W.message=$.message,W.name=$.name,W.stack=$.stack,W.cause=$.cause,W.constructor=$.constructor,V2(W,$,X,G,J),W}if($ instanceof Boolean){let W=new Boolean($.valueOf());return G.set($,W),V2(W,$,X,G,J),W}if($ instanceof Number){let W=new Number($.valueOf());return G.set($,W),V2(W,$,X,G,J),W}if($ instanceof String){let W=new String($.valueOf());return G.set($,W),V2(W,$,X,G,J),W}if(typeof $==="object"&&Mr4($)){let W=Object.create(Object.getPrototypeOf($));return G.set($,W),V2(W,$,X,G,J),W}return $}function V2($,Y,X=$,G,J){let Q=[...Object.keys(Y),...xY1(Y)];for(let W=0;W<Q.length;W++){let K=Q[W],Z=Object.getOwnPropertyDescriptor($,K);if(Z==null||Z.writable)$[K]=VF(Y[K],K,X,G,J)}}function Mr4($){switch(Xq($)){case En:case mY1:case uY1:case pY1:case On:case hY1:case sY1:case oY1:case nY1:case rY1:case aY1:case fY1:case Bn:case Mn:case yY1:case gY1:case An:case bY1:case dY1:case cY1:case lY1:case iY1:return!0;default:return!1}}function eY1($){return VF($,void 0,$,new Map,void 0)}function $X1($){return $=eY1($),(Y)=>{return Nn(Y,$)}}function YX1($,Y){return tY1($,(X,G,J,Q)=>{let W=Y?.(X,G,J,Q);if(W!==void 0)return W;if(typeof $!=="object")return;if(Xq($)===Mn&&typeof $.constructor!=="function"){let K={};return Q.set($,K),V2(K,$,J,Q),K}switch(Object.prototype.toString.call($)){case Bn:case An:case On:{let K=new $.constructor($?.valueOf());return V2(K,$),K}case En:{let K={};return V2(K,$),K.length=$.length,K[Symbol.iterator]=$[Symbol.iterator],K}default:return}})}function XX1($){return YX1($)}var Rr4=/^(?:0|[1-9]\d*)$/;function qn($,Y=Number.MAX_SAFE_INTEGER){switch(typeof $){case"number":return Number.isInteger($)&&$>=0&&$<Y;case"symbol":return!1;case"string":return Rr4.test($)}}function Pn($){return $!==null&&typeof $==="object"&&Xq($)==="[object Arguments]"}function wn($,Y){let X;if(Array.isArray(Y))X=Y;else if(typeof Y==="string"&&Dn(Y)&&$?.[Y]==null)X=Yq(Y);else X=[Y];if(X.length===0)return!1;let G=$;for(let J=0;J<X.length;J++){let Q=X[J];if(G==null||!Object.hasOwn(G,Q)){if(!((Array.isArray(G)||Pn(G))&&qn(Q)&&Q<G.length))return!1}G=G[Q]}return!0}function GX1($,Y){switch(typeof $){case"object":{if(Object.is($?.valueOf(),-0))$="-0";break}case"number":{$=HF($);break}}return Y=XX1(Y),function(X){let G=D4(X,$);if(G===void 0)return wn(X,$);if(Y===void 0)return G===void 0;return Nn(G,Y)}}function dU($,Y=SY1,X=0){if(!$)return-1;if(X<0)X=Math.max($.length+X,0);let G=Array.from($).slice(X),J=-1;switch(typeof Y){case"function":{J=G.findIndex(Y);break}case"object":{if(Array.isArray(Y)&&Y.length===2){let Q=Y[0],W=Y[1];J=G.findIndex(GX1(Q,W))}else J=G.findIndex($X1(Y));break}case"number":case"symbol":case"string":J=G.findIndex(kY1(Y))}return J===-1?-1:J+X}function _n($){let Y=$?.constructor,X=typeof Y==="function"?Y.prototype:Object.prototype;return $===X}function JX1($){return Number.isSafeInteger($)&&$>=0}function Jq($){return $!=null&&typeof $!=="function"&&JX1($.length)}function jn($){return Rn($)}function Tn($){return typeof $==="symbol"||$ instanceof Symbol}function QX1($){if(Tn($))return NaN;return Number($)}function WX1($){if(!$)return $===0?$:0;if($=QX1($),$===1/0||$===-1/0)return($<0?-1:1)*Number.MAX_VALUE;return $===$?$:0}function KX1($){let Y=WX1($),X=Y%1;return X?Y-X:Y}function ZX1($,Y){if($=KX1($),$<1||!Number.isSafeInteger($))return[];let X=Array($);for(let G=0;G<$;G++)X[G]=typeof Y==="function"?Y(G):G;return X}function UX1($){if(Jq($))return qr4($);let Y=Object.keys(Object($));if(!_n($))return Y;return Y.filter((X)=>X!=="constructor")}function qr4($){let Y=ZX1($.length,(J)=>`${J}`),X=new Set(Y);if(Gq($))X.add("offset"),X.add("parent");if(jn($))X.add("buffer"),X.add("byteLength"),X.add("byteOffset");let G=Object.keys($).filter((J)=>!X.has(J));if(Array.isArray($))return[...Y,...G];return[...Y.filter((J)=>Object.hasOwn($,J)),...G]}function q6($,...Y){for(let X=0;X<Y.length;X++)Pr4($,Y[X]);return $}function Pr4($,Y){let X=UX1(Y);for(let G=0;G<X.length;G++){let J=X[G];if(!(J in $)||!gX($[J],Y[J]))$[J]=Y[J]}}var HX1=($,Y,X)=>{let G=$[Y];if(!(Object.hasOwn($,Y)&&gX(G,X))||X===void 0&&!(Y in $))$[Y]=X};var wr4=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_r4=/^\w*$/;function zX1($,Y){if(Array.isArray($))return!1;if(typeof $==="number"||typeof $==="boolean"||$==null||Tn($))return!0;return typeof $==="string"&&(_r4.test($)||!wr4.test($))||Y!=null&&Object.hasOwn(Y,$)}function VX1($,Y,X,G){if($==null&&!gH($))return $;let J;if(zX1(Y,$))J=[Y];else if(Array.isArray(Y))J=Y;else J=Yq(Y);let Q=X(D4($,J)),W=$;for(let K=0;K<J.length&&W!=null;K++){let Z=HF(J[K]);if($q(Z))continue;let H;if(K===J.length-1)H=Q;else{let z=W[Z],V=G?.(z,Z,$);H=V!==void 0?V:gH(z)?z:qn(J[K+1])?[]:{}}HX1(W,Z,H),W=W[Z]}return $}function i1($,Y,X){return VX1($,Y,()=>X,()=>{return})}function FX1($){return $==null}function FA($,...Y){if(FX1($))return{};let X={};for(let G=0;G<Y.length;G++){let J=Y[G];switch(typeof J){case"object":{if(!Array.isArray(J))if(Jq(J))J=Array.from(J);else J=[J];break}case"string":case"symbol":case"number":{J=[J];break}}for(let Q of J){let W=D4($,Q);if(W===void 0&&!wn($,Q))continue;if(typeof Q==="string"&&Object.hasOwn($,Q))X[Q]=W;else i1(X,Q,W)}}return X}function QX($){return $===null}function xk($){return Array.isArray($)}function BZ0($){if($==null)return!0;if(Jq($)){if(typeof $.splice!=="function"&&typeof $!=="string"&&!Gq($)&&!jn($)&&!Pn($))return!1;return $.length===0}if(typeof $==="object"){if($ instanceof Map||$ instanceof Set)return $.size===0;let Y=Object.keys($);if(_n($))return Y.filter((X)=>X!=="constructor").length===0;return Y.length===0}return!0}function n1($,Y,X){if(arguments.length<3)return zF($);return zF($).replace(Y,X)}var jr4="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\xd7\\xf7",Qq="\\p{Lu}",OX1="\\p{Ll}",EX1="(?:[\\p{Lm}\\p{Lo}]\\p{M}*)",yk="\\d",LX1="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",DX1="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",NX1=`[\\p{Z}\\p{P}${jr4}]`,Tr4=`(?:${Qq}|${EX1})`,AX1=`(?:${OX1}|${EX1})`,BX1=RegExp([`${Qq}?${OX1}+${LX1}(?=${NX1}|${Qq}|$)`,`${Tr4}+${DX1}(?=${NX1}|${Qq}${AX1}|$)`,`${Qq}?${AX1}+${LX1}`,`${Qq}+${DX1}`,`${yk}*(?:1ST|2ND|3RD|(?![123])${yk}TH)(?=\\b|[a-z_])`,`${yk}*(?:1st|2nd|3rd|(?![123])${yk}th)(?=\\b|[A-Z_])`,`${yk}+`,"\\p{Emoji_Presentation}","\\p{Extended_Pictographic}"].join("|"),"gu");function N7($,Y=BX1,X){let G=zF($);if(X)Y=BX1;if(typeof Y==="number")Y=Y.toString();return Array.from(G.match(Y)??[]).filter((Q)=>Q!=="")}function OZ0($){return typeof $==="boolean"}function EZ0($){if(typeof $!=="string")return!1;try{return JSON.parse($),!0}catch{return!1}}function MX1($){if(!$||typeof $!=="object")return!1;let Y=Object.getPrototypeOf($);if(!(Y===null||Y===Object.prototype||Object.getPrototypeOf(Y)===null))return!1;return Object.prototype.toString.call($)==="[object Object]"}function bk($){switch(typeof $){case"object":return $===null||In($)||Cn($);case"string":case"number":case"boolean":return!0;default:return!1}}function In($){if(!Array.isArray($))return!1;return $.every((Y)=>bk(Y))}function Cn($){if(!MX1($))return!1;let Y=Reflect.ownKeys($);for(let X=0;X<Y.length;X++){let G=Y[X],J=$[G];if(typeof G!=="string")return!1;if(!bk(J))return!1}return!0}function MZ0($){return $==null}function xK($){return $!=null}function RZ0($){return typeof $==="string"}import{Database as Wq}from"bun:sqlite";ON();var mJ=B6("sys_sqlite_source",{id:g0("id"),name:g0("name"),code:g0("code"),filename:g0("filename"),createdAt:m1("createdAt"),updatedAt:m1("updatedAt"),latest_visitAt:m1("latest_visitAt"),createBy:g0("createBy"),updateBy:g0("updateBy"),env_id:g0("env_id")});async function LA($){return await e0.select().from(mJ).where(_1(mJ.code,$))}async function RX1($){return await e0.select().from(mJ).where(_1(mJ.filename,$)).limit(1)}function qZ0($){let Y=r.raw("1 = 1");if($.code&&$.code.length>0)Y.append(r.raw(` and code like '%${$.code}%'`));if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or code like '%${$.searchVal}%')`));return Y}async function qX1($){return await e0.select().from(mJ).where(qZ0($)).limit(Number($.limit)).offset(Number($.offset))}async function PX1($){return await e0.select().from(mJ).where(qZ0($))}async function wX1($){return await e0.$count(mJ,qZ0($))}async function _X1($){let Y=await e0.$count(mJ,_1(mJ.code,$.code));if(Y&&Y>0)Ir4($);else{let X=Date.now();$.id=C6(),$.code=C6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await e0.insert(mJ).values($)}}async function Ir4($){let Y=Date.now();$.updateBy="admin",$.latest_visitAt=Y,$.updatedAt=Y,await e0.update(mJ).set($).where(_1(mJ.code,$.code))}async function jX1($){await e0.delete(mJ).where(_1(mJ.code,$))}var Cr4={max:500,maxSize:1000,sizeCalculation:($,Y)=>{return 1},dispose:($,Y)=>{},ttl:7200000,allowStale:!1,updateAgeOnGet:!1,updateAgeOnHas:!1,fetchMethod:async($,Y,{options:X,signal:G,context:J})=>{}},wZ0=new eW(Cr4);async function WX($){if($&&wZ0.has($))return wZ0.get($);else{let Y=await LA($);if(Y&&Y[0]&&Y.length>0&&Y[0].filename){let X=new Wq(`./.data/${Y[0].filename}.db`),G=bU({client:X});return wZ0.set($,G),G}else throw Error(`error:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}}async function hk($){let Y=await RX1($);if(Y&&Y[0]&&Y.length>0&&Y[0].code)return await WX(Y[0].code);else throw Error(`error:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}async function TX1($,Y,X){if(await Bun.file(`./.data/${X}.db`).exists())throw Error(`${X}\u5DF2\u7ECF\u5B58\u5728\uFF0C\u8BF7\u4FEE\u6539`);await _X1({name:$,code:Y,filename:X}),new Wq(`./.data/${X}.db`,{create:!0})}async function IX1($){let Y=new Wq(`./.data/${$}.db`);return await bU({client:Y}).get("select 1")}async function CX1($,Y){let X=await LA($);if(X&&X[0]&&X.length>0&&X[0].filename){let G=new Wq(`./.data/${X[0].filename}.db`);bU({client:G}).run(Y)}else throw Error(`code:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}async function SX1($){let Y=await LA($);if(Y&&Y[0]&&Y.length>0&&Y[0].filename){let X=new Wq(`./.data/${Y[0].filename}.db`);return bU({client:X}).all("SELECT name FROM sqlite_master WHERE type='table'")}else throw Error(`code:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}async function kX1($,Y){let X=await LA($);if(X&&X[0]&&X.length>0&&X[0].filename){let G=new Wq(`./.data/${X[0].filename}.db`);return bU({client:G}).run(`DROP TABLE IF EXISTS ${Y}`)}else throw Error(`code:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}var mH=B6("sys_sqlite_schema_cache",{id:g0("id"),source:g0("source"),filename:g0("filename"),table_name:g0("table_name"),schema_data:g0("schema_data"),createdAt:m1("createdAt"),updatedAt:m1("updatedAt"),latest_visitAt:m1("latest_visitAt"),createBy:g0("createBy"),updateBy:g0("updateBy"),env_id:g0("env_id")});async function Kq($,Y){return await e0.select().from(mH).where(c$(_1(mH.source,$),_1(mH.table_name,Y))).orderBy(r`${mH.createdAt} desc`).limit(1)}async function vX1($,Y){return await e0.select().from(mH).where(c$(_1(mH.filename,$),_1(mH.table_name,Y))).orderBy(r`${mH.createdAt} desc`).limit(1)}async function xX1($){let Y=Date.now();$.id=C6(),$.env_id="default",$.createBy="admin",$.createdAt=Y,$.updateBy="admin",$.updatedAt=Y,await e0.insert(mH).values($)}function Sr4($){if(!$||typeof $!=="string")return"UNKNOWN";let Y=$.trim().toUpperCase(),X=[[/^SELECT\b/,"SELECT"],[/^INSERT\s+INTO\b/,"INSERT"],[/^INSERT\b/,"INSERT"],[/^UPDATE\b/,"UPDATE"],[/^DELETE\s+FROM\b/,"DELETE"],[/^DELETE\b/,"DELETE"]];for(let[G,J]of X)if(G.test(Y))return J;return"UNKNOWN"}async function Sn($,Y){let X=$.poolCode;if(!X||X.length==0)throw Error("poolCode\u4E0D\u80FD\u4E3A\u7A7A");let G=await WX(X);if(Y&&Y=="2"){let J=$.sql;delete $.sql,delete $.poolCode;let Q=N7(J,/{{(.*?)}}/g);if(a8(Q))Q.forEach((K)=>{let Z=n1(n1(K,"{{",""),"}}","");if(Z.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4($,Z)))throw Error(`${Z}\u53D6\u503C\u5931\u8D25`);J=n1(J,`{{${Z}}}`,$[Z])});let W=Sr4(String(J));if(W=="SELECT")return{data:G.all(r.raw(J))};else if(W=="INSERT"||W=="UPDATE"||W=="DELETE")return{data:G.run(r.raw(J))};else throw Error("SQL\u8BED\u53E5\u9519\u8BEF")}else{if(q$($))$=JSON.parse($);$=D7($);let J="select";if($&&$.type)J=$.type;let Q=D7($.dynamicObj);if(!Q)Q={};let W=$.table;if(!W||W.length==0)throw Error("table\u4E0D\u80FD\u4E3A\u7A7A");let K=$.pageNum?$.pageNum:1,Z=$.pageSize?$.pageSize:10,H=$.orderBy?$.orderBy:"id",z=$.orderByCommand?$.orderByCommand:"desc",V=$.id,F=await kn(X,W);if(J=="insert")return Q.id=xH(),Q.create_time=fX(),Q.update_time=fX(),await G.insert(B6(W,F.schema)).values(Q),{data:"success"};else if(J=="update"){if(!V||V.length==0)throw Error("id\u4E0D\u80FD\u4E3A\u7A7A");return Q.update_time=fX(),await G.update(B6(W,F.schema)).set(Q).where(r.join([r.raw("id"),r`${V}`],r` = `)),{data:"success"}}else if(J=="delete"){if(!V||V.length==0)throw Error("id\u4E0D\u80FD\u4E3A\u7A7A");let L=`delete from ${W} where id = '${V}'`;return G.run(r.raw(L)),{data:"success"}}else if(J=="select"||J=="count"){let L=[];if(L.push(r`1 = 1`),V)L.push(r.join([r.raw("id"),r`${V}`],r` = `));Object.keys(Q).forEach((B)=>{if(xK(Q[B].value)&&!gX(Q[B].value,"undefined"))switch(Q[B].command){case"eq":L.push(r.join([r.raw(`${B}`),r`${Q[B].value}`],r` = `));break;case"ne":L.push(r.join([r.raw(`${B}`),r`${Q[B].value}`],r` != `));break;case"gt":L.push(r.join([r.raw(`${B}`),r`${Q[B].value}`],r` > `));break;case"gte":L.push(r.join([r.raw(`${B}`),r`${Q[B].value}`],r` >= `));break;case"lt":L.push(r.join([r.raw(`${B}`),r`${Q[B].value}`],r` < `));break;case"lte":L.push(r.join([r.raw(`${B}`),r`${Q[B].value}`],r` <= `));break;case"isNull":L.push(r.join([r.raw(`${B}`)],r` is null `));break;case"isNotNull":L.push(r.join([r.raw(`${B}`)],r` is not null `));break;case"like":L.push(r.join([r.raw(`${B}`),r`CONCAT('%',${Q[B].value},'%')`],r` like `));break;default:break}});let N=r.join(L,r` and `),D=await G.select({count:r`count(*)`.mapWith(Number)}).from(B6(W,F.schema)).where(N);if(J=="count")return{data:{count:D[0]?D[0].count:0}};return{data:await G.select().from(B6(W,F.schema)).where(N).orderBy(z=="desc"?sQ(r.raw(H)):SH(r.raw(H))).limit(Number(Z)).offset(Number((K-1)*Z)),total:D[0]?D[0].count:0}}else throw Error("\u64CD\u4F5C\u7C7B\u578B\u65E0\u6548")}}async function kn($,Y){let G=(await Kq($,Y))[0]?.schema_data??"[]",J=JSON.parse(G),Q={id:g0(),create_time:g0(),update_time:g0()};return J.forEach((W)=>{if(q$(W.type)){if(String(W.type).includes("integer"))Q[W.name]=m1();else if(String(W.type).includes("real"))Q[W.name]=rS();else if(String(W.type).includes("text"))Q[W.name]=g0();else if(String(W.type).includes("blob"))Q[W.name]=cN();else if(String(W.type).includes("boolean"))Q[W.name]=m1({mode:"boolean"});else if(String(W.type).includes("bigint"))Q[W.name]=cN({mode:"bigint"});else if(String(W.type).includes("numeric"))Q[W.name]=nS()}}),{fields:J,schema:Q}}async function _Z0($,Y){let G=(await vX1($,Y))[0]?.schema_data??"[]",J=JSON.parse(G),Q={id:g0(),create_time:g0(),update_time:g0()};return J.forEach((W)=>{if(q$(W.type)){if(String(W.type).includes("integer"))Q[W.name]=m1();else if(String(W.type).includes("real"))Q[W.name]=rS();else if(String(W.type).includes("text"))Q[W.name]=g0();else if(String(W.type).includes("blob"))Q[W.name]=cN();else if(String(W.type).includes("boolean"))Q[W.name]=m1({mode:"boolean"});else if(String(W.type).includes("bigint"))Q[W.name]=cN({mode:"bigint"});else if(String(W.type).includes("numeric"))Q[W.name]=nS()}}),{fields:J,schema:Q}}async function vn($,Y,X){let G=await WX($),J=await kn($,Y);return X.id=xH(),X.create_time=fX(),X.update_time=fX(),await G.insert(B6(Y,J.schema)).values(X)}async function xn($,Y,X,G){let J=await WX($),Q=await kn($,Y);return X.update_time=fX(),await J.update(B6(Y,Q.schema)).set(X).where(r.join([r.raw("id"),r`${G}`],r` = `))}async function yn($,Y){return(await WX($)).run(r.raw(Y))}async function fk($,Y){return(await WX($)).all(r.raw(Y))}function gk($,Y){let X=$,G=N7($,/{{(.*?)}}/g);if(a8(G))G.forEach((J)=>{let Q=n1(n1(J,"{{",""),"}}","");if(Q.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4(Y,Q)))throw Error(`${Q}\u53D6\u503C\u5931\u8D25`);X=n1(X,`{{${Q}}}`,D4(Y,Q))});return X}async function hX1($,Y,X,G){let J=r.raw("1 = 1"),Q=D4(X,"id")??"",W=D4(X,"create_time")??"",K=D4(X,"update_time")??"";if(Q&&Q.length>0)J.append(r.raw(` and id like '%${Q}%'`));if(W&&W.length>0)J.append(r.raw(` and create_time like '%${W}%'`));if(K&&K.length>0)J.append(r.raw(` and update_time like '%${K}%'`));let H=(await Kq($,Y))[0]?.schema_data??"[]";JSON.parse(H).forEach((D)=>{let A=D4(X,D.name)??"";if(A&&A.length>0)J.append(r.raw(` and ${D.name} like '%${A}%'`))});let V=await WX($),F=await kn($,Y),L=await V.select().from(B6(Y,F.schema)).where(J).limit(10).offset(G),N=await V.$count(B6(Y,F.schema),J);return{result:L,count:N}}var bX1=new Map([["eq"," = "],["neq"," != "],["gt"," > "],["gte"," >= "],["lt"," < "],["lte"," <= "],["like"," like "],["ilike"," ilike "],["in"," in "],["is"," is "]]);async function fX1($,Y,X){let G=await hk($),J=await _Z0($,Y),Q=X.pageNum??"1",W=X.pageSize??"100",K=X.order??"create_time.asc",Z=(Number(Q)-1)*Number(W),H=r.raw("1 = 1");Object.entries(X).forEach(([L,N])=>{let D=String(L),A=String(N);if(D!="pageNum"&&D!="pageSize"&&D!="order"){let B=A.split(".");if(bX1.has(B[0]??"empty")){let O=bX1.get(B[0]??"empty");if(D&&D.length>0)if(B[0]=="in"||B[0]=="is")H.append(r.raw(` and ${D} ${O} ${B[1]}`));else H.append(r.raw(` and ${D} ${O} '${B[1]}'`))}}});let z=K.split(".")[1],V=await G.select().from(B6(Y,J.schema)).orderBy(z=="desc"?sQ(r.raw(K.split(".")[0])):SH(r.raw(K.split(".")[0]))).where(H).limit(Number(W)).offset(Z),F=await G.$count(B6(Y,J.schema),H);return{result:V,count:F}}async function gX1($,Y,X){let G=await hk($),J=await _Z0($,Y);X.forEach(async(Q)=>{Q.id=xH(),Q.create_time=fX(),Q.update_time=fX(),await G.insert(B6(Y,J.schema)).values(Q)})}async function mX1($,Y,X){let G=await hk($),J=await _Z0($,Y);X.forEach(async(Q)=>{Q.update_time=fX();let W=D4(Q,"id")??"";if(W.length==0)throw Error("\u7F3A\u5C11id\u65E0\u6CD5\u66F4\u65B0\u6570\u636E");await G.update(B6(Y,J.schema)).set(Q).where(r.join([r.raw("id"),r`${W}`],r` = `))})}async function uX1($,Y,X){let G=await hk($),J=X.id??"";if(J.length==0)throw Error("\u7F3A\u5C11id\u65E0\u6CD5\u5220\u9664\u6570\u636E");let Q=`delete from ${Y} where id = '${J}'`;G.run(r.raw(Q))}var DA=new TextEncoder,uH=new TextDecoder;function hn(...$){let Y=$.reduce((J,{length:Q})=>J+Q,0),X=new Uint8Array(Y),G=0;for(let J of $)X.set(J,G),G+=J.length;return X}function FF($){let Y=new Uint8Array($.length);for(let X=0;X<$.length;X++){let G=$.charCodeAt(X);if(G>127)throw TypeError("non-ASCII string encountered in encode()");Y[X]=G}return Y}function jZ0($){if(Uint8Array.prototype.toBase64)return $.toBase64();let Y=32768,X=[];for(let G=0;G<$.length;G+=Y)X.push(String.fromCharCode.apply(null,$.subarray(G,G+Y)));return btoa(X.join(""))}function fn($){if(Uint8Array.fromBase64)return Uint8Array.fromBase64($);let Y=atob($),X=new Uint8Array(Y.length);for(let G=0;G<Y.length;G++)X[G]=Y.charCodeAt(G);return X}function Zq($){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(typeof $==="string"?$:uH.decode($),{alphabet:"base64url"});let Y=$;if(Y instanceof Uint8Array)Y=uH.decode(Y);Y=Y.replace(/-/g,"+").replace(/_/g,"/");try{return fn(Y)}catch{throw TypeError("The input to be decoded is not correctly encoded.")}}function gn($){let Y=$;if(typeof Y==="string")Y=DA.encode(Y);if(Uint8Array.prototype.toBase64)return Y.toBase64({alphabet:"base64url",omitPadding:!0});return jZ0(Y).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var LF=($,Y="algorithm.name")=>TypeError(`CryptoKey does not support this operation, its ${Y} must be ${$}`),Uq=($,Y)=>$.name===Y;function kr4($){return parseInt($.name.slice(4),10)}function TZ0($,Y){if(kr4($.hash)!==Y)throw LF(`SHA-${Y}`,"algorithm.hash")}function vr4($){switch($){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw Error("unreachable")}}function xr4($,Y){if(Y&&!$.usages.includes(Y))throw TypeError(`CryptoKey does not support this operation, its usages must include ${Y}.`)}function pX1($,Y,X){switch(Y){case"HS256":case"HS384":case"HS512":{if(!Uq($.algorithm,"HMAC"))throw LF("HMAC");TZ0($.algorithm,parseInt(Y.slice(2),10));break}case"RS256":case"RS384":case"RS512":{if(!Uq($.algorithm,"RSASSA-PKCS1-v1_5"))throw LF("RSASSA-PKCS1-v1_5");TZ0($.algorithm,parseInt(Y.slice(2),10));break}case"PS256":case"PS384":case"PS512":{if(!Uq($.algorithm,"RSA-PSS"))throw LF("RSA-PSS");TZ0($.algorithm,parseInt(Y.slice(2),10));break}case"Ed25519":case"EdDSA":{if(!Uq($.algorithm,"Ed25519"))throw LF("Ed25519");break}case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":{if(!Uq($.algorithm,Y))throw LF(Y);break}case"ES256":case"ES384":case"ES512":{if(!Uq($.algorithm,"ECDSA"))throw LF("ECDSA");let G=vr4(Y);if($.algorithm.namedCurve!==G)throw LF(G,"algorithm.namedCurve");break}default:throw TypeError("CryptoKey does not support this operation")}xr4($,X)}function dX1($,Y,...X){if(X=X.filter(Boolean),X.length>2){let G=X.pop();$+=`one of type ${X.join(", ")}, or ${G}.`}else if(X.length===2)$+=`one of type ${X[0]} or ${X[1]}.`;else $+=`of type ${X[0]}.`;if(Y==null)$+=` Received ${Y}`;else if(typeof Y==="function"&&Y.name)$+=` Received function ${Y.name}`;else if(typeof Y==="object"&&Y!=null){if(Y.constructor?.name)$+=` Received an instance of ${Y.constructor.name}`}return $}var cX1=($,...Y)=>dX1("Key must be ",$,...Y),IZ0=($,Y,...X)=>dX1(`Key for the ${$} algorithm must be `,Y,...X);class DF extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor($,Y){super($,Y);this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}class F2 extends DF{static code="ERR_JWT_CLAIM_VALIDATION_FAILED";code="ERR_JWT_CLAIM_VALIDATION_FAILED";claim;reason;payload;constructor($,Y,X="unspecified",G="unspecified"){super($,{cause:{claim:X,reason:G,payload:Y}});this.claim=X,this.reason=G,this.payload=Y}}class mn extends DF{static code="ERR_JWT_EXPIRED";code="ERR_JWT_EXPIRED";claim;reason;payload;constructor($,Y,X="unspecified",G="unspecified"){super($,{cause:{claim:X,reason:G,payload:Y}});this.claim=X,this.reason=G,this.payload=Y}}class CZ0 extends DF{static code="ERR_JOSE_ALG_NOT_ALLOWED";code="ERR_JOSE_ALG_NOT_ALLOWED"}class uJ extends DF{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"}class R5 extends DF{static code="ERR_JWS_INVALID";code="ERR_JWS_INVALID"}class NA extends DF{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"}class SZ0 extends DF{static code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";constructor($="signature verification failed",Y){super($,Y)}}var kZ0=($)=>{if($?.[Symbol.toStringTag]==="CryptoKey")return!0;try{return $ instanceof CryptoKey}catch{return!1}},vZ0=($)=>$?.[Symbol.toStringTag]==="KeyObject",xZ0=($)=>kZ0($)||vZ0($);var q35=Symbol();function yZ0($,Y){if($)throw TypeError(`${Y} can only be called once`)}function bZ0($,Y,X){try{return Zq($)}catch{throw new X(`Failed to base64url decode the ${Y}`)}}var yr4=($)=>typeof $==="object"&&$!==null;function AA($){if(!yr4($)||Object.prototype.toString.call($)!=="[object Object]")return!1;if(Object.getPrototypeOf($)===null)return!0;let Y=$;while(Object.getPrototypeOf(Y)!==null)Y=Object.getPrototypeOf(Y);return Object.getPrototypeOf($)===Y}function un(...$){let Y=$.filter(Boolean);if(Y.length===0||Y.length===1)return!0;let X;for(let G of Y){let J=Object.keys(G);if(!X||X.size===0){X=new Set(J);continue}for(let Q of J){if(X.has(Q))return!1;X.add(Q)}}return!0}var mk=($)=>AA($)&&typeof $.kty==="string",lX1=($)=>$.kty!=="oct"&&($.kty==="AKP"&&typeof $.priv==="string"||typeof $.d==="string"),iX1=($)=>$.kty!=="oct"&&$.d===void 0&&$.priv===void 0,nX1=($)=>$.kty==="oct"&&typeof $.k==="string";function rX1($,Y){if($.startsWith("RS")||$.startsWith("PS")){let{modulusLength:X}=Y.algorithm;if(typeof X!=="number"||X<2048)throw TypeError(`${$} requires key modulusLength to be 2048 bits or larger`)}}function aX1($,Y){let X=`SHA-${$.slice(-3)}`;switch($){case"HS256":case"HS384":case"HS512":return{hash:X,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:X,name:"RSA-PSS",saltLength:parseInt($.slice(-3),10)>>3};case"RS256":case"RS384":case"RS512":return{hash:X,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:X,name:"ECDSA",namedCurve:Y.namedCurve};case"Ed25519":case"EdDSA":return{name:"Ed25519"};case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return{name:$};default:throw new uJ(`alg ${$} is not supported either by JOSE or your javascript runtime`)}}async function sX1($,Y,X){if(Y instanceof Uint8Array){if(!$.startsWith("HS"))throw TypeError(cX1(Y,"CryptoKey","KeyObject","JSON Web Key"));return crypto.subtle.importKey("raw",Y,{hash:`SHA-${$.slice(-3)}`,name:"HMAC"},!1,[X])}return pX1(Y,$,X),Y}async function oX1($,Y,X){let G=await sX1($,Y,"sign");rX1($,G);let J=await crypto.subtle.sign(aX1($,G.algorithm),G,X);return new Uint8Array(J)}async function tX1($,Y,X,G){let J=await sX1($,Y,"verify");rX1($,J);let Q=aX1($,J.algorithm);try{return await crypto.subtle.verify(Q,J,X,G)}catch{return!1}}var pn='Invalid or unsupported JWK "alg" (Algorithm) Parameter value';function hr4($){let Y,X;switch($.kty){case"AKP":{switch($.alg){case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":Y={name:$.alg},X=$.priv?["sign"]:["verify"];break;default:throw new uJ(pn)}break}case"RSA":{switch($.alg){case"PS256":case"PS384":case"PS512":Y={name:"RSA-PSS",hash:`SHA-${$.alg.slice(-3)}`},X=$.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":Y={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${$.alg.slice(-3)}`},X=$.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":Y={name:"RSA-OAEP",hash:`SHA-${parseInt($.alg.slice(-3),10)||1}`},X=$.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new uJ(pn)}break}case"EC":{switch($.alg){case"ES256":case"ES384":case"ES512":Y={name:"ECDSA",namedCurve:{ES256:"P-256",ES384:"P-384",ES512:"P-521"}[$.alg]},X=$.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":Y={name:"ECDH",namedCurve:$.crv},X=$.d?["deriveBits"]:[];break;default:throw new uJ(pn)}break}case"OKP":{switch($.alg){case"Ed25519":case"EdDSA":Y={name:"Ed25519"},X=$.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":Y={name:$.crv},X=$.d?["deriveBits"]:[];break;default:throw new uJ(pn)}break}default:throw new uJ('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:Y,keyUsages:X}}async function eX1($){if(!$.alg)throw TypeError('"alg" argument is required when "jwk.alg" is not present');let{algorithm:Y,keyUsages:X}=hr4($),G={...$};if(G.kty!=="AKP")delete G.alg;return delete G.use,crypto.subtle.importKey("jwk",G,Y,$.ext??($.d||$.priv?!1:!0),$.key_ops??X)}var Hq="given KeyObject instance cannot be used for this algorithm",zq,$G1=async($,Y,X,G=!1)=>{zq||=new WeakMap;let J=zq.get($);if(J?.[X])return J[X];let Q=await eX1({...Y,alg:X});if(G)Object.freeze($);if(!J)zq.set($,{[X]:Q});else J[X]=Q;return Q},fr4=($,Y)=>{zq||=new WeakMap;let X=zq.get($);if(X?.[Y])return X[Y];let G=$.type==="public",J=G?!0:!1,Q;if($.asymmetricKeyType==="x25519"){switch(Y){case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":break;default:throw TypeError(Hq)}Q=$.toCryptoKey($.asymmetricKeyType,J,G?[]:["deriveBits"])}if($.asymmetricKeyType==="ed25519"){if(Y!=="EdDSA"&&Y!=="Ed25519")throw TypeError(Hq);Q=$.toCryptoKey($.asymmetricKeyType,J,[G?"verify":"sign"])}switch($.asymmetricKeyType){case"ml-dsa-44":case"ml-dsa-65":case"ml-dsa-87":{if(Y!==$.asymmetricKeyType.toUpperCase())throw TypeError(Hq);Q=$.toCryptoKey($.asymmetricKeyType,J,[G?"verify":"sign"])}}if($.asymmetricKeyType==="rsa"){let W;switch(Y){case"RSA-OAEP":W="SHA-1";break;case"RS256":case"PS256":case"RSA-OAEP-256":W="SHA-256";break;case"RS384":case"PS384":case"RSA-OAEP-384":W="SHA-384";break;case"RS512":case"PS512":case"RSA-OAEP-512":W="SHA-512";break;default:throw TypeError(Hq)}if(Y.startsWith("RSA-OAEP"))return $.toCryptoKey({name:"RSA-OAEP",hash:W},J,G?["encrypt"]:["decrypt"]);Q=$.toCryptoKey({name:Y.startsWith("PS")?"RSA-PSS":"RSASSA-PKCS1-v1_5",hash:W},J,[G?"verify":"sign"])}if($.asymmetricKeyType==="ec"){let K=new Map([["prime256v1","P-256"],["secp384r1","P-384"],["secp521r1","P-521"]]).get($.asymmetricKeyDetails?.namedCurve);if(!K)throw TypeError(Hq);let Z={ES256:"P-256",ES384:"P-384",ES512:"P-521"};if(Z[Y]&&K===Z[Y])Q=$.toCryptoKey({name:"ECDSA",namedCurve:K},J,[G?"verify":"sign"]);if(Y.startsWith("ECDH-ES"))Q=$.toCryptoKey({name:"ECDH",namedCurve:K},J,G?[]:["deriveBits"])}if(!Q)throw TypeError(Hq);if(!X)zq.set($,{[Y]:Q});else X[Y]=Q;return Q};async function dn($,Y){if($ instanceof Uint8Array)return $;if(kZ0($))return $;if(vZ0($)){if($.type==="secret")return $.export();if("toCryptoKey"in $&&typeof $.toCryptoKey==="function")try{return fr4($,Y)}catch(G){if(G instanceof TypeError)throw G}let X=$.export({format:"jwk"});return $G1($,X,Y)}if(mk($)){if($.k)return Zq($.k);return $G1($,$,Y,!0)}throw Error("unreachable")}var hZ0=($,Y)=>{if($.byteLength!==Y.length)return!1;for(let X=0;X<$.byteLength;X++)if($[X]!==Y[X])return!1;return!0},YG1=($)=>({data:$,pos:0}),BA=($)=>{let Y=$.data[$.pos++];if(Y&128){let X=Y&127,G=0;for(let J=0;J<X;J++)G=G<<8|$.data[$.pos++];return G}return Y};var OA=($,Y,X)=>{if($.data[$.pos++]!==Y)throw Error(X)},XG1=($,Y)=>{let X=$.data.subarray($.pos,$.pos+Y);return $.pos+=Y,X},gr4=($)=>{OA($,6,"Expected algorithm OID");let Y=BA($);return XG1($,Y)};function mr4($){OA($,48,"Invalid PKCS#8 structure"),BA($),OA($,2,"Expected version field");let Y=BA($);$.pos+=Y,OA($,48,"Expected algorithm identifier");let X=BA($);return{algIdStart:$.pos,algIdLength:X}}function ur4($){OA($,48,"Invalid SPKI structure"),BA($),OA($,48,"Expected algorithm identifier");let Y=BA($);return{algIdStart:$.pos,algIdLength:Y}}var GG1=($)=>{let Y=gr4($);if(hZ0(Y,[43,101,110]))return"X25519";if(!hZ0(Y,[42,134,72,206,61,2,1]))throw Error("Unsupported key algorithm");OA($,6,"Expected curve OID");let X=BA($),G=XG1($,X);for(let{name:J,oid:Q}of[{name:"P-256",oid:[42,134,72,206,61,3,1,7]},{name:"P-384",oid:[43,129,4,0,34]},{name:"P-521",oid:[43,129,4,0,35]}])if(hZ0(G,Q))return J;throw Error("Unsupported named curve")},JG1=async($,Y,X,G)=>{let J,Q,W=$==="spki",K=()=>W?["verify"]:["sign"],Z=()=>W?["encrypt","wrapKey"]:["decrypt","unwrapKey"];switch(X){case"PS256":case"PS384":case"PS512":J={name:"RSA-PSS",hash:`SHA-${X.slice(-3)}`},Q=K();break;case"RS256":case"RS384":case"RS512":J={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${X.slice(-3)}`},Q=K();break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":J={name:"RSA-OAEP",hash:`SHA-${parseInt(X.slice(-3),10)||1}`},Q=Z();break;case"ES256":case"ES384":case"ES512":{J={name:"ECDSA",namedCurve:{ES256:"P-256",ES384:"P-384",ES512:"P-521"}[X]},Q=K();break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{try{let H=G.getNamedCurve(Y);J=H==="X25519"?{name:"X25519"}:{name:"ECDH",namedCurve:H}}catch(H){throw new uJ("Invalid or unsupported key format")}Q=W?[]:["deriveBits"];break}case"Ed25519":case"EdDSA":J={name:"Ed25519"},Q=K();break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":J={name:X},Q=K();break;default:throw new uJ('Invalid or unsupported "alg" (Algorithm) value')}return crypto.subtle.importKey($,Y,J,G?.extractable??(W?!0:!1),Q)},QG1=($,Y)=>{return fn($.replace(Y,""))},WG1=($,Y,X)=>{let G=QG1($,/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g),J=X;if(Y?.startsWith?.("ECDH-ES"))J||={},J.getNamedCurve=(Q)=>{let W=YG1(Q);return mr4(W),GG1(W)};return JG1("pkcs8",G,Y,J)},KG1=($,Y,X)=>{let G=QG1($,/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g),J=X;if(Y?.startsWith?.("ECDH-ES"))J||={},J.getNamedCurve=(Q)=>{let W=YG1(Q);return ur4(W),GG1(W)};return JG1("spki",G,Y,J)};async function fZ0($,Y,X){if(typeof $!=="string"||$.indexOf("-----BEGIN PUBLIC KEY-----")!==0)throw TypeError('"spki" must be SPKI formatted string');return KG1($,Y,X)}async function gZ0($,Y,X){if(typeof $!=="string"||$.indexOf("-----BEGIN PRIVATE KEY-----")!==0)throw TypeError('"pkcs8" must be PKCS#8 formatted string');return WG1($,Y,X)}function cn($,Y,X,G,J){if(J.crit!==void 0&&G?.crit===void 0)throw new $('"crit" (Critical) Header Parameter MUST be integrity protected');if(!G||G.crit===void 0)return new Set;if(!Array.isArray(G.crit)||G.crit.length===0||G.crit.some((W)=>typeof W!=="string"||W.length===0))throw new $('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let Q;if(X!==void 0)Q=new Map([...Object.entries(X),...Y.entries()]);else Q=Y;for(let W of G.crit){if(!Q.has(W))throw new uJ(`Extension Header Parameter "${W}" is not recognized`);if(J[W]===void 0)throw new $(`Extension Header Parameter "${W}" is missing`);if(Q.get(W)&&G[W]===void 0)throw new $(`Extension Header Parameter "${W}" MUST be integrity protected`)}return new Set(G.crit)}function ZG1($,Y){if(Y!==void 0&&(!Array.isArray(Y)||Y.some((X)=>typeof X!=="string")))throw TypeError(`"${$}" option must be an array of strings`);if(!Y)return;return new Set(Y)}var Vq=($)=>$?.[Symbol.toStringTag],mZ0=($,Y,X)=>{if(Y.use!==void 0){let G;switch(X){case"sign":case"verify":G="sig";break;case"encrypt":case"decrypt":G="enc";break}if(Y.use!==G)throw TypeError(`Invalid key for this operation, its "use" must be "${G}" when present`)}if(Y.alg!==void 0&&Y.alg!==$)throw TypeError(`Invalid key for this operation, its "alg" must be "${$}" when present`);if(Array.isArray(Y.key_ops)){let G;switch(!0){case(X==="sign"||X==="verify"):case $==="dir":case $.includes("CBC-HS"):G=X;break;case $.startsWith("PBES2"):G="deriveBits";break;case/^A\d{3}(?:GCM)?(?:KW)?$/.test($):if(!$.includes("GCM")&&$.endsWith("KW"))G=X==="encrypt"?"wrapKey":"unwrapKey";else G=X;break;case(X==="encrypt"&&$.startsWith("RSA")):G="wrapKey";break;case X==="decrypt":G=$.startsWith("RSA")?"unwrapKey":"deriveBits";break}if(G&&Y.key_ops?.includes?.(G)===!1)throw TypeError(`Invalid key for this operation, its "key_ops" must include "${G}" when present`)}return!0},pr4=($,Y,X)=>{if(Y instanceof Uint8Array)return;if(mk(Y)){if(nX1(Y)&&mZ0($,Y,X))return;throw TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!xZ0(Y))throw TypeError(IZ0($,Y,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if(Y.type!=="secret")throw TypeError(`${Vq(Y)} instances for symmetric algorithms must be of type "secret"`)},dr4=($,Y,X)=>{if(mk(Y))switch(X){case"decrypt":case"sign":if(lX1(Y)&&mZ0($,Y,X))return;throw TypeError("JSON Web Key for this operation must be a private JWK");case"encrypt":case"verify":if(iX1(Y)&&mZ0($,Y,X))return;throw TypeError("JSON Web Key for this operation must be a public JWK")}if(!xZ0(Y))throw TypeError(IZ0($,Y,"CryptoKey","KeyObject","JSON Web Key"));if(Y.type==="secret")throw TypeError(`${Vq(Y)} instances for asymmetric algorithms must not be of type "secret"`);if(Y.type==="public")switch(X){case"sign":throw TypeError(`${Vq(Y)} instances for asymmetric algorithm signing must be of type "private"`);case"decrypt":throw TypeError(`${Vq(Y)} instances for asymmetric algorithm decryption must be of type "private"`)}if(Y.type==="private")switch(X){case"verify":throw TypeError(`${Vq(Y)} instances for asymmetric algorithm verifying must be of type "public"`);case"encrypt":throw TypeError(`${Vq(Y)} instances for asymmetric algorithm encryption must be of type "public"`)}};function ln($,Y,X){switch($.substring(0,2)){case"A1":case"A2":case"di":case"HS":case"PB":pr4($,Y,X);break;default:dr4($,Y,X)}}async function UG1($,Y,X){if(!AA($))throw new R5("Flattened JWS must be an object");if($.protected===void 0&&$.header===void 0)throw new R5('Flattened JWS must have either of the "protected" or "header" members');if($.protected!==void 0&&typeof $.protected!=="string")throw new R5("JWS Protected Header incorrect type");if($.payload===void 0)throw new R5("JWS Payload missing");if(typeof $.signature!=="string")throw new R5("JWS Signature missing or incorrect type");if($.header!==void 0&&!AA($.header))throw new R5("JWS Unprotected Header incorrect type");let G={};if($.protected)try{let A=Zq($.protected);G=JSON.parse(uH.decode(A))}catch{throw new R5("JWS Protected Header is invalid")}if(!un(G,$.header))throw new R5("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let J={...G,...$.header},Q=cn(R5,new Map([["b64",!0]]),X?.crit,G,J),W=!0;if(Q.has("b64")){if(W=G.b64,typeof W!=="boolean")throw new R5('The "b64" (base64url-encode payload) Header Parameter must be a boolean')}let{alg:K}=J;if(typeof K!=="string"||!K)throw new R5('JWS "alg" (Algorithm) Header Parameter missing or invalid');let Z=X&&ZG1("algorithms",X.algorithms);if(Z&&!Z.has(K))throw new CZ0('"alg" (Algorithm) Header Parameter value not allowed');if(W){if(typeof $.payload!=="string")throw new R5("JWS Payload must be a string")}else if(typeof $.payload!=="string"&&!($.payload instanceof Uint8Array))throw new R5("JWS Payload must be a string or an Uint8Array instance");let H=!1;if(typeof Y==="function")Y=await Y(G,$),H=!0;ln(K,Y,"verify");let z=hn($.protected!==void 0?FF($.protected):new Uint8Array,FF("."),typeof $.payload==="string"?W?FF($.payload):DA.encode($.payload):$.payload),V=bZ0($.signature,"signature",R5),F=await dn(Y,K);if(!await tX1(K,F,V,z))throw new SZ0;let N;if(W)N=bZ0($.payload,"payload",R5);else if(typeof $.payload==="string")N=DA.encode($.payload);else N=$.payload;let D={payload:N};if($.protected!==void 0)D.protectedHeader=G;if($.header!==void 0)D.unprotectedHeader=$.header;if(H)return{...D,key:F};return D}async function HG1($,Y,X){if($ instanceof Uint8Array)$=uH.decode($);if(typeof $!=="string")throw new R5("Compact JWS must be a string or Uint8Array");let{0:G,1:J,2:Q,length:W}=$.split(".");if(W!==3)throw new R5("Invalid Compact JWS");let K=await UG1({payload:J,protected:G,signature:Q},Y,X),Z={payload:K.payload,protectedHeader:K.protectedHeader};if(typeof Y==="function")return{...Z,key:K.key};return Z}var NF=($)=>Math.floor($.getTime()/1000),VG1=60,FG1=VG1*60,uZ0=FG1*24,cr4=uZ0*7,lr4=uZ0*365.25,ir4=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;function uk($){let Y=ir4.exec($);if(!Y||Y[4]&&Y[1])throw TypeError("Invalid time period format");let X=parseFloat(Y[2]),G=Y[3].toLowerCase(),J;switch(G){case"sec":case"secs":case"second":case"seconds":case"s":J=Math.round(X);break;case"minute":case"minutes":case"min":case"mins":case"m":J=Math.round(X*VG1);break;case"hour":case"hours":case"hr":case"hrs":case"h":J=Math.round(X*FG1);break;case"day":case"days":case"d":J=Math.round(X*uZ0);break;case"week":case"weeks":case"w":J=Math.round(X*cr4);break;default:J=Math.round(X*lr4);break}if(Y[1]==="-"||Y[4]==="ago")return-J;return J}function EA($,Y){if(!Number.isFinite(Y))throw TypeError(`Invalid ${$} input`);return Y}var zG1=($)=>{if($.includes("/"))return $.toLowerCase();return`application/${$.toLowerCase()}`},nr4=($,Y)=>{if(typeof $==="string")return Y.includes($);if(Array.isArray($))return Y.some(Set.prototype.has.bind(new Set($)));return!1};function LG1($,Y,X={}){let G;try{G=JSON.parse(uH.decode(Y))}catch{}if(!AA(G))throw new NA("JWT Claims Set must be a top-level JSON object");let{typ:J}=X;if(J&&(typeof $.typ!=="string"||zG1($.typ)!==zG1(J)))throw new F2('unexpected "typ" JWT header value',G,"typ","check_failed");let{requiredClaims:Q=[],issuer:W,subject:K,audience:Z,maxTokenAge:H}=X,z=[...Q];if(H!==void 0)z.push("iat");if(Z!==void 0)z.push("aud");if(K!==void 0)z.push("sub");if(W!==void 0)z.push("iss");for(let N of new Set(z.reverse()))if(!(N in G))throw new F2(`missing required "${N}" claim`,G,N,"missing");if(W&&!(Array.isArray(W)?W:[W]).includes(G.iss))throw new F2('unexpected "iss" claim value',G,"iss","check_failed");if(K&&G.sub!==K)throw new F2('unexpected "sub" claim value',G,"sub","check_failed");if(Z&&!nr4(G.aud,typeof Z==="string"?[Z]:Z))throw new F2('unexpected "aud" claim value',G,"aud","check_failed");let V;switch(typeof X.clockTolerance){case"string":V=uk(X.clockTolerance);break;case"number":V=X.clockTolerance;break;case"undefined":V=0;break;default:throw TypeError("Invalid clockTolerance option type")}let{currentDate:F}=X,L=NF(F||new Date);if((G.iat!==void 0||H)&&typeof G.iat!=="number")throw new F2('"iat" claim must be a number',G,"iat","invalid");if(G.nbf!==void 0){if(typeof G.nbf!=="number")throw new F2('"nbf" claim must be a number',G,"nbf","invalid");if(G.nbf>L+V)throw new F2('"nbf" claim timestamp check failed',G,"nbf","check_failed")}if(G.exp!==void 0){if(typeof G.exp!=="number")throw new F2('"exp" claim must be a number',G,"exp","invalid");if(G.exp<=L-V)throw new mn('"exp" claim timestamp check failed',G,"exp","check_failed")}if(H){let N=L-G.iat,D=typeof H==="number"?H:uk(H);if(N-V>D)throw new mn('"iat" claim timestamp check failed (too far in the past)',G,"iat","check_failed");if(N<0-V)throw new F2('"iat" claim timestamp check failed (it should be in the past)',G,"iat","check_failed")}return G}class pZ0{#$;constructor($){if(!AA($))throw TypeError("JWT Claims Set MUST be an object");this.#$=structuredClone($)}data(){return DA.encode(JSON.stringify(this.#$))}get iss(){return this.#$.iss}set iss($){this.#$.iss=$}get sub(){return this.#$.sub}set sub($){this.#$.sub=$}get aud(){return this.#$.aud}set aud($){this.#$.aud=$}set jti($){this.#$.jti=$}set nbf($){if(typeof $==="number")this.#$.nbf=EA("setNotBefore",$);else if($ instanceof Date)this.#$.nbf=EA("setNotBefore",NF($));else this.#$.nbf=NF(new Date)+uk($)}set exp($){if(typeof $==="number")this.#$.exp=EA("setExpirationTime",$);else if($ instanceof Date)this.#$.exp=EA("setExpirationTime",NF($));else this.#$.exp=NF(new Date)+uk($)}set iat($){if($===void 0)this.#$.iat=NF(new Date);else if($ instanceof Date)this.#$.iat=EA("setIssuedAt",NF($));else if(typeof $==="string")this.#$.iat=EA("setIssuedAt",NF(new Date)+uk($));else this.#$.iat=EA("setIssuedAt",$)}}async function dZ0($,Y,X){let G=await HG1($,Y,X);if(G.protectedHeader.crit?.includes("b64")&&G.protectedHeader.b64===!1)throw new NA("JWTs MUST NOT use unencoded payload");let Q={payload:LG1(G.protectedHeader,G.payload,X),protectedHeader:G.protectedHeader};if(typeof Y==="function")return{...Q,key:G.key};return Q}class cZ0{#$;#Y;#X;constructor($){if(!($ instanceof Uint8Array))throw TypeError("payload must be an instance of Uint8Array");this.#$=$}setProtectedHeader($){return yZ0(this.#Y,"setProtectedHeader"),this.#Y=$,this}setUnprotectedHeader($){return yZ0(this.#X,"setUnprotectedHeader"),this.#X=$,this}async sign($,Y){if(!this.#Y&&!this.#X)throw new R5("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!un(this.#Y,this.#X))throw new R5("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let X={...this.#Y,...this.#X},G=cn(R5,new Map([["b64",!0]]),Y?.crit,this.#Y,X),J=!0;if(G.has("b64")){if(J=this.#Y.b64,typeof J!=="boolean")throw new R5('The "b64" (base64url-encode payload) Header Parameter must be a boolean')}let{alg:Q}=X;if(typeof Q!=="string"||!Q)throw new R5('JWS "alg" (Algorithm) Header Parameter missing or invalid');ln(Q,$,"sign");let W,K;if(J)W=gn(this.#$),K=FF(W);else K=this.#$,W="";let Z,H;if(this.#Y)Z=gn(JSON.stringify(this.#Y)),H=FF(Z);else Z="",H=new Uint8Array;let z=hn(H,FF("."),K),V=await dn($,Q),F=await oX1(Q,V,z),L={signature:gn(F),payload:W};if(this.#X)L.header=this.#X;if(this.#Y)L.protected=Z;return L}}class lZ0{#$;constructor($){this.#$=new cZ0($)}setProtectedHeader($){return this.#$.setProtectedHeader($),this}async sign($,Y){let X=await this.#$.sign($,Y);if(X.payload===void 0)throw TypeError("use the flattened module for creating JWS with b64: false");return`${X.protected}.${X.payload}.${X.signature}`}}class nn{#$;#Y;constructor($={}){this.#Y=new pZ0($)}setIssuer($){return this.#Y.iss=$,this}setSubject($){return this.#Y.sub=$,this}setAudience($){return this.#Y.aud=$,this}setJti($){return this.#Y.jti=$,this}setNotBefore($){return this.#Y.nbf=$,this}setExpirationTime($){return this.#Y.exp=$,this}setIssuedAt($){return this.#Y.iat=$,this}setProtectedHeader($){return this.#$=$,this}async sign($,Y){let X=new lZ0(this.#Y.data());if(X.setProtectedHeader(this.#$),Array.isArray(this.#$?.crit)&&this.#$.crit.includes("b64")&&this.#$.b64===!1)throw new NA("JWTs MUST NOT use unencoded payload");return X.sign($,Y)}}var lk={};lk.userAgent=!1;var Fq={};/*! CryptoJS v3.1.2 core-fix.js
 * code.google.com/p/crypto-js
 * (c) 2009-2013 by Jeff Mott. All rights reserved.
 * code.google.com/p/crypto-js/wiki/License
 * THIS IS FIX of 'core.js' to fix Hmac issue.
 * https://code.google.com/p/crypto-js/issues/detail?id=84
 * https://crypto-js.googlecode.com/svn-history/r667/branches/3.x/src/core.js
 */var x1=x1||function($,Y){var X={},G=X.lib={},J=G.Base=function(){function L(){}return{extend:function(N){L.prototype=this;var D=new L;if(N)D.mixIn(N);if(!D.hasOwnProperty("init"))D.init=function(){D.$super.init.apply(this,arguments)};return D.init.prototype=D,D.$super=this,D},create:function(){var N=this.extend();return N.init.apply(N,arguments),N},init:function(){},mixIn:function(N){for(var D in N)if(N.hasOwnProperty(D))this[D]=N[D];if(N.hasOwnProperty("toString"))this.toString=N.toString},clone:function(){return this.init.prototype.extend(this)}}}(),Q=G.WordArray=J.extend({init:function(L,N){if(L=this.words=L||[],N!=Y)this.sigBytes=N;else this.sigBytes=L.length*4},toString:function(L){return(L||K).stringify(this)},concat:function(L){var N=this.words,D=L.words,A=this.sigBytes,B=L.sigBytes;if(this.clamp(),A%4)for(var O=0;O<B;O++){var E=D[O>>>2]>>>24-O%4*8&255;N[A+O>>>2]|=E<<24-(A+O)%4*8}else for(var O=0;O<B;O+=4)N[A+O>>>2]=D[O>>>2];return this.sigBytes+=B,this},clamp:function(){var L=this.words,N=this.sigBytes;L[N>>>2]&=4294967295<<32-N%4*8,L.length=$.ceil(N/4)},clone:function(){var L=J.clone.call(this);return L.words=this.words.slice(0),L},random:function(L){var N=[];for(var D=0;D<L;D+=4)N.push($.random()*4294967296|0);return new Q.init(N,L)}}),W=X.enc={},K=W.Hex={stringify:function(L){var{words:N,sigBytes:D}=L,A=[];for(var B=0;B<D;B++){var O=N[B>>>2]>>>24-B%4*8&255;A.push((O>>>4).toString(16)),A.push((O&15).toString(16))}return A.join("")},parse:function(L){var N=L.length,D=[];for(var A=0;A<N;A+=2)D[A>>>3]|=parseInt(L.substr(A,2),16)<<24-A%8*4;return new Q.init(D,N/2)}},Z=W.Latin1={stringify:function(L){var{words:N,sigBytes:D}=L,A=[];for(var B=0;B<D;B++){var O=N[B>>>2]>>>24-B%4*8&255;A.push(String.fromCharCode(O))}return A.join("")},parse:function(L){var N=L.length,D=[];for(var A=0;A<N;A++)D[A>>>2]|=(L.charCodeAt(A)&255)<<24-A%4*8;return new Q.init(D,N)}},H=W.Utf8={stringify:function(L){try{return decodeURIComponent(escape(Z.stringify(L)))}catch(N){throw Error("Malformed UTF-8 data")}},parse:function(L){return Z.parse(unescape(encodeURIComponent(L)))}},z=G.BufferedBlockAlgorithm=J.extend({reset:function(){this._data=new Q.init,this._nDataBytes=0},_append:function(L){if(typeof L=="string")L=H.parse(L);this._data.concat(L),this._nDataBytes+=L.sigBytes},_process:function(L){var N=this._data,D=N.words,A=N.sigBytes,B=this.blockSize,O=B*4,E=A/O;if(L)E=$.ceil(E);else E=$.max((E|0)-this._minBufferSize,0);var M=E*B,R=$.min(M*4,A);if(M){for(var q=0;q<M;q+=B)this._doProcessBlock(D,q);var _=D.splice(0,M);N.sigBytes-=R}return new Q.init(_,R)},clone:function(){var L=J.clone.call(this);return L._data=this._data.clone(),L},_minBufferSize:0}),V=G.Hasher=z.extend({cfg:J.extend(),init:function(L){this.cfg=this.cfg.extend(L),this.reset()},reset:function(){z.reset.call(this),this._doReset()},update:function(L){return this._append(L),this._process(),this},finalize:function(L){if(L)this._append(L);var N=this._doFinalize();return N},blockSize:16,_createHelper:function(L){return function(N,D){return new L.init(D).finalize(N)}},_createHmacHelper:function(L){return function(N,D){return new F.HMAC.init(L,D).finalize(N)}}}),F=X.algo={};return X}(Math);(function($){var J=x1,Y=J.lib,X=Y.Base,G=Y.WordArray,J=J.x64={};J.Word=X.extend({init:function(Q,W){this.high=Q,this.low=W}}),J.WordArray=X.extend({init:function(Q,W){Q=this.words=Q||[],this.sigBytes=W!=$?W:8*Q.length},toX32:function(){for(var Q=this.words,W=Q.length,K=[],Z=0;Z<W;Z++){var H=Q[Z];K.push(H.high),K.push(H.low)}return G.create(K,this.sigBytes)},clone:function(){for(var Q=X.clone.call(this),W=Q.words=this.words.slice(0),K=W.length,Z=0;Z<K;Z++)W[Z]=W[Z].clone();return Q}})})();x1.lib.Cipher||function($){var L=x1,Y=L.lib,X=Y.Base,G=Y.WordArray,J=Y.BufferedBlockAlgorithm,Q=L.enc.Base64,W=L.algo.EvpKDF,K=Y.Cipher=J.extend({cfg:X.extend(),createEncryptor:function(D,A){return this.create(this._ENC_XFORM_MODE,D,A)},createDecryptor:function(D,A){return this.create(this._DEC_XFORM_MODE,D,A)},init:function(D,A,B){this.cfg=this.cfg.extend(B),this._xformMode=D,this._key=A,this.reset()},reset:function(){J.reset.call(this),this._doReset()},process:function(D){return this._append(D),this._process()},finalize:function(D){return D&&this._append(D),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(D){return{encrypt:function(A,B,O){return(typeof B=="string"?N:F).encrypt(D,A,B,O)},decrypt:function(A,B,O){return(typeof B=="string"?N:F).decrypt(D,A,B,O)}}}});Y.StreamCipher=K.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var V=L.mode={},Z=function(D,A,B){var O=this._iv;O?this._iv=$:O=this._prevBlock;for(var E=0;E<B;E++)D[A+E]^=O[E]},H=(Y.BlockCipherMode=X.extend({createEncryptor:function(D,A){return this.Encryptor.create(D,A)},createDecryptor:function(D,A){return this.Decryptor.create(D,A)},init:function(D,A){this._cipher=D,this._iv=A}})).extend();H.Encryptor=H.extend({processBlock:function(D,A){var B=this._cipher,O=B.blockSize;Z.call(this,D,A,O),B.encryptBlock(D,A),this._prevBlock=D.slice(A,A+O)}}),H.Decryptor=H.extend({processBlock:function(D,A){var B=this._cipher,O=B.blockSize,E=D.slice(A,A+O);B.decryptBlock(D,A),Z.call(this,D,A,O),this._prevBlock=E}}),V=V.CBC=H,H=(L.pad={}).Pkcs7={pad:function(D,A){for(var B=4*A,B=B-D.sigBytes%B,O=B<<24|B<<16|B<<8|B,E=[],M=0;M<B;M+=4)E.push(O);B=G.create(E,B),D.concat(B)},unpad:function(D){D.sigBytes-=D.words[D.sigBytes-1>>>2]&255}},Y.BlockCipher=K.extend({cfg:K.cfg.extend({mode:V,padding:H}),reset:function(){K.reset.call(this);var A=this.cfg,D=A.iv,A=A.mode;if(this._xformMode==this._ENC_XFORM_MODE)var B=A.createEncryptor;else B=A.createDecryptor,this._minBufferSize=1;this._mode=B.call(A,this,D&&D.words)},_doProcessBlock:function(D,A){this._mode.processBlock(D,A)},_doFinalize:function(){var D=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){D.pad(this._data,this.blockSize);var A=this._process(!0)}else A=this._process(!0),D.unpad(A);return A},blockSize:4});var z=Y.CipherParams=X.extend({init:function(D){this.mixIn(D)},toString:function(D){return(D||this.formatter).stringify(this)}}),V=(L.format={}).OpenSSL={stringify:function(D){var A=D.ciphertext;return D=D.salt,(D?G.create([1398893684,1701076831]).concat(D).concat(A):A).toString(Q)},parse:function(D){D=Q.parse(D);var A=D.words;if(A[0]==1398893684&&A[1]==1701076831){var B=G.create(A.slice(2,4));A.splice(0,4),D.sigBytes-=16}return z.create({ciphertext:D,salt:B})}},F=Y.SerializableCipher=X.extend({cfg:X.extend({format:V}),encrypt:function(D,A,B,O){O=this.cfg.extend(O);var E=D.createEncryptor(B,O);return A=E.finalize(A),E=E.cfg,z.create({ciphertext:A,key:B,iv:E.iv,algorithm:D,mode:E.mode,padding:E.padding,blockSize:D.blockSize,formatter:O.format})},decrypt:function(D,A,B,O){return O=this.cfg.extend(O),A=this._parse(A,O.format),D.createDecryptor(B,O).finalize(A.ciphertext)},_parse:function(D,A){return typeof D=="string"?A.parse(D,this):D}}),L=(L.kdf={}).OpenSSL={execute:function(D,A,B,O){return O||(O=G.random(8)),D=W.create({keySize:A+B}).compute(D,O),B=G.create(D.words.slice(A),4*B),D.sigBytes=4*A,z.create({key:D,iv:B,salt:O})}},N=Y.PasswordBasedCipher=F.extend({cfg:F.cfg.extend({kdf:L}),encrypt:function(D,A,B,O){return O=this.cfg.extend(O),B=O.kdf.execute(B,D.keySize,D.ivSize),O.iv=B.iv,D=F.encrypt.call(this,D,A,B.key,O),D.mixIn(B),D},decrypt:function(D,A,B,O){return O=this.cfg.extend(O),A=this._parse(A,O.format),B=O.kdf.execute(B,D.keySize,D.ivSize,A.salt),O.iv=B.iv,F.decrypt.call(this,D,A,B.key,O)}})}();(function(){for(var $=x1,Y=$.lib.BlockCipher,q=$.algo,X=[],G=[],J=[],Q=[],W=[],K=[],Z=[],H=[],z=[],V=[],F=[],L=0;256>L;L++)F[L]=128>L?L<<1:L<<1^283;for(var N=0,D=0,L=0;256>L;L++){var A=D^D<<1^D<<2^D<<3^D<<4,A=A>>>8^A&255^99;X[N]=A,G[A]=N;var B=F[N],O=F[B],E=F[O],M=257*F[A]^16843008*A;J[N]=M<<24|M>>>8,Q[N]=M<<16|M>>>16,W[N]=M<<8|M>>>24,K[N]=M,M=16843009*E^65537*O^257*B^16843008*N,Z[A]=M<<24|M>>>8,H[A]=M<<16|M>>>16,z[A]=M<<8|M>>>24,V[A]=M,N?(N=B^F[F[F[E^B]]],D^=F[F[D]]):N=D=1}var R=[0,1,2,4,8,16,32,64,128,27,54],q=q.AES=Y.extend({_doReset:function(){for(var w=this._key,_=w.words,P=w.sigBytes/4,w=4*((this._nRounds=P+6)+1),j=this._keySchedule=[],C=0;C<w;C++)if(C<P)j[C]=_[C];else{var k=j[C-1];C%P?6<P&&C%P==4&&(k=X[k>>>24]<<24|X[k>>>16&255]<<16|X[k>>>8&255]<<8|X[k&255]):(k=k<<8|k>>>24,k=X[k>>>24]<<24|X[k>>>16&255]<<16|X[k>>>8&255]<<8|X[k&255],k^=R[C/P|0]<<24),j[C]=j[C-P]^k}_=this._invKeySchedule=[];for(P=0;P<w;P++)C=w-P,k=P%4?j[C]:j[C-4],_[P]=4>P||4>=C?k:Z[X[k>>>24]]^H[X[k>>>16&255]]^z[X[k>>>8&255]]^V[X[k&255]]},encryptBlock:function(_,P){this._doCryptBlock(_,P,this._keySchedule,J,Q,W,K,X)},decryptBlock:function(_,P){var w=_[P+1];_[P+1]=_[P+3],_[P+3]=w,this._doCryptBlock(_,P,this._invKeySchedule,Z,H,z,V,G),w=_[P+1],_[P+1]=_[P+3],_[P+3]=w},_doCryptBlock:function(_,P,w,j,C,k,S,I){for(var v=this._nRounds,p=_[P]^w[0],h=_[P+1]^w[1],n=_[P+2]^w[2],g=_[P+3]^w[3],x=4,y=1;y<v;y++)var d=j[p>>>24]^C[h>>>16&255]^k[n>>>8&255]^S[g&255]^w[x++],u=j[h>>>24]^C[n>>>16&255]^k[g>>>8&255]^S[p&255]^w[x++],b=j[n>>>24]^C[g>>>16&255]^k[p>>>8&255]^S[h&255]^w[x++],g=j[g>>>24]^C[p>>>16&255]^k[h>>>8&255]^S[n&255]^w[x++],p=d,h=u,n=b;d=(I[p>>>24]<<24|I[h>>>16&255]<<16|I[n>>>8&255]<<8|I[g&255])^w[x++],u=(I[h>>>24]<<24|I[n>>>16&255]<<16|I[g>>>8&255]<<8|I[p&255])^w[x++],b=(I[n>>>24]<<24|I[g>>>16&255]<<16|I[p>>>8&255]<<8|I[h&255])^w[x++],g=(I[g>>>24]<<24|I[p>>>16&255]<<16|I[h>>>8&255]<<8|I[n&255])^w[x++],_[P]=d,_[P+1]=u,_[P+2]=b,_[P+3]=g},keySize:8});$.AES=Y._createHelper(q)})();(function(){function $(F,L){var N=(this._lBlock>>>F^this._rBlock)&L;this._rBlock^=N,this._lBlock^=N<<F}function Y(F,L){var N=(this._rBlock>>>F^this._lBlock)&L;this._lBlock^=N,this._rBlock^=N<<F}var X=x1,J=X.lib,G=J.WordArray,J=J.BlockCipher,Q=X.algo,W=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],K=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],Z=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],H=[{"0":8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{"0":1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{"0":260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{"0":2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{"0":128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{"0":268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{"0":1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{"0":134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],z=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],V=Q.DES=J.extend({_doReset:function(){for(var F=this._key.words,L=[],N=0;56>N;N++){var D=W[N]-1;L[N]=F[D>>>5]>>>31-D%32&1}F=this._subKeys=[];for(D=0;16>D;D++){for(var A=F[D]=[],B=Z[D],N=0;24>N;N++)A[N/6|0]|=L[(K[N]-1+B)%28]<<31-N%6,A[4+(N/6|0)]|=L[28+(K[N+24]-1+B)%28]<<31-N%6;A[0]=A[0]<<1|A[0]>>>31;for(N=1;7>N;N++)A[N]>>>=4*(N-1)+3;A[7]=A[7]<<5|A[7]>>>27}L=this._invSubKeys=[];for(N=0;16>N;N++)L[N]=F[15-N]},encryptBlock:function(F,L){this._doCryptBlock(F,L,this._subKeys)},decryptBlock:function(F,L){this._doCryptBlock(F,L,this._invSubKeys)},_doCryptBlock:function(F,L,N){this._lBlock=F[L],this._rBlock=F[L+1],$.call(this,4,252645135),$.call(this,16,65535),Y.call(this,2,858993459),Y.call(this,8,16711935),$.call(this,1,1431655765);for(var D=0;16>D;D++){for(var A=N[D],B=this._lBlock,O=this._rBlock,E=0,M=0;8>M;M++)E|=H[M][((O^A[M])&z[M])>>>0];this._lBlock=O,this._rBlock=B^E}N=this._lBlock,this._lBlock=this._rBlock,this._rBlock=N,$.call(this,1,1431655765),Y.call(this,8,16711935),Y.call(this,2,858993459),$.call(this,16,65535),$.call(this,4,252645135),F[L]=this._lBlock,F[L+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});X.DES=J._createHelper(V),Q=Q.TripleDES=J.extend({_doReset:function(){var F=this._key.words;this._des1=V.createEncryptor(G.create(F.slice(0,2))),this._des2=V.createEncryptor(G.create(F.slice(2,4))),this._des3=V.createEncryptor(G.create(F.slice(4,6)))},encryptBlock:function(F,L){this._des1.encryptBlock(F,L),this._des2.decryptBlock(F,L),this._des3.encryptBlock(F,L)},decryptBlock:function(F,L){this._des3.decryptBlock(F,L),this._des2.encryptBlock(F,L),this._des1.decryptBlock(F,L)},keySize:6,ivSize:2,blockSize:2}),X.TripleDES=J._createHelper(Q)})();(function(){var $=x1,Y=$.lib.WordArray;$.enc.Base64={stringify:function(X){var{words:G,sigBytes:J}=X,Q=this._map;X.clamp(),X=[];for(var W=0;W<J;W+=3)for(var K=(G[W>>>2]>>>24-8*(W%4)&255)<<16|(G[W+1>>>2]>>>24-8*((W+1)%4)&255)<<8|G[W+2>>>2]>>>24-8*((W+2)%4)&255,Z=0;4>Z&&W+0.75*Z<J;Z++)X.push(Q.charAt(K>>>6*(3-Z)&63));if(G=Q.charAt(64))for(;X.length%4;)X.push(G);return X.join("")},parse:function(X){var G=X.length,J=this._map,Q=J.charAt(64);Q&&(Q=X.indexOf(Q),Q!=-1&&(G=Q));for(var Q=[],W=0,K=0;K<G;K++)if(K%4){var Z=J.indexOf(X.charAt(K-1))<<2*(K%4),H=J.indexOf(X.charAt(K))>>>6-2*(K%4);Q[W>>>2]|=(Z|H)<<24-8*(W%4),W++}return Y.create(Q,W)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();(function($){function Y(V,F,L,N,D,A,B){return V=V+(F&L|~F&N)+D+B,(V<<A|V>>>32-A)+F}function X(V,F,L,N,D,A,B){return V=V+(F&N|L&~N)+D+B,(V<<A|V>>>32-A)+F}function G(V,F,L,N,D,A,B){return V=V+(F^L^N)+D+B,(V<<A|V>>>32-A)+F}function J(V,F,L,N,D,A,B){return V=V+(L^(F|~N))+D+B,(V<<A|V>>>32-A)+F}for(var Q=x1,Z=Q.lib,W=Z.WordArray,K=Z.Hasher,Z=Q.algo,H=[],z=0;64>z;z++)H[z]=4294967296*$.abs($.sin(z+1))|0;Z=Z.MD5=K.extend({_doReset:function(){this._hash=new W.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(V,F){for(var L=0;16>L;L++){var N=F+L,D=V[N];V[N]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}var L=this._hash.words,N=V[F+0],D=V[F+1],A=V[F+2],B=V[F+3],O=V[F+4],E=V[F+5],M=V[F+6],R=V[F+7],q=V[F+8],_=V[F+9],P=V[F+10],w=V[F+11],j=V[F+12],C=V[F+13],k=V[F+14],S=V[F+15],I=L[0],y=L[1],x=L[2],v=L[3],I=Y(I,y,x,v,N,7,H[0]),v=Y(v,I,y,x,D,12,H[1]),x=Y(x,v,I,y,A,17,H[2]),y=Y(y,x,v,I,B,22,H[3]),I=Y(I,y,x,v,O,7,H[4]),v=Y(v,I,y,x,E,12,H[5]),x=Y(x,v,I,y,M,17,H[6]),y=Y(y,x,v,I,R,22,H[7]),I=Y(I,y,x,v,q,7,H[8]),v=Y(v,I,y,x,_,12,H[9]),x=Y(x,v,I,y,P,17,H[10]),y=Y(y,x,v,I,w,22,H[11]),I=Y(I,y,x,v,j,7,H[12]),v=Y(v,I,y,x,C,12,H[13]),x=Y(x,v,I,y,k,17,H[14]),y=Y(y,x,v,I,S,22,H[15]),I=X(I,y,x,v,D,5,H[16]),v=X(v,I,y,x,M,9,H[17]),x=X(x,v,I,y,w,14,H[18]),y=X(y,x,v,I,N,20,H[19]),I=X(I,y,x,v,E,5,H[20]),v=X(v,I,y,x,P,9,H[21]),x=X(x,v,I,y,S,14,H[22]),y=X(y,x,v,I,O,20,H[23]),I=X(I,y,x,v,_,5,H[24]),v=X(v,I,y,x,k,9,H[25]),x=X(x,v,I,y,B,14,H[26]),y=X(y,x,v,I,q,20,H[27]),I=X(I,y,x,v,C,5,H[28]),v=X(v,I,y,x,A,9,H[29]),x=X(x,v,I,y,R,14,H[30]),y=X(y,x,v,I,j,20,H[31]),I=G(I,y,x,v,E,4,H[32]),v=G(v,I,y,x,q,11,H[33]),x=G(x,v,I,y,w,16,H[34]),y=G(y,x,v,I,k,23,H[35]),I=G(I,y,x,v,D,4,H[36]),v=G(v,I,y,x,O,11,H[37]),x=G(x,v,I,y,R,16,H[38]),y=G(y,x,v,I,P,23,H[39]),I=G(I,y,x,v,C,4,H[40]),v=G(v,I,y,x,N,11,H[41]),x=G(x,v,I,y,B,16,H[42]),y=G(y,x,v,I,M,23,H[43]),I=G(I,y,x,v,_,4,H[44]),v=G(v,I,y,x,j,11,H[45]),x=G(x,v,I,y,S,16,H[46]),y=G(y,x,v,I,A,23,H[47]),I=J(I,y,x,v,N,6,H[48]),v=J(v,I,y,x,R,10,H[49]),x=J(x,v,I,y,k,15,H[50]),y=J(y,x,v,I,E,21,H[51]),I=J(I,y,x,v,j,6,H[52]),v=J(v,I,y,x,B,10,H[53]),x=J(x,v,I,y,P,15,H[54]),y=J(y,x,v,I,D,21,H[55]),I=J(I,y,x,v,q,6,H[56]),v=J(v,I,y,x,S,10,H[57]),x=J(x,v,I,y,M,15,H[58]),y=J(y,x,v,I,C,21,H[59]),I=J(I,y,x,v,O,6,H[60]),v=J(v,I,y,x,w,10,H[61]),x=J(x,v,I,y,A,15,H[62]),y=J(y,x,v,I,_,21,H[63]);L[0]=L[0]+I|0,L[1]=L[1]+y|0,L[2]=L[2]+x|0,L[3]=L[3]+v|0},_doFinalize:function(){var V=this._data,F=V.words,L=8*this._nDataBytes,N=8*V.sigBytes;F[N>>>5]|=128<<24-N%32;var D=$.floor(L/4294967296);F[(N+64>>>9<<4)+15]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,F[(N+64>>>9<<4)+14]=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,V.sigBytes=4*(F.length+1),this._process(),V=this._hash,F=V.words;for(L=0;4>L;L++)N=F[L],F[L]=(N<<8|N>>>24)&16711935|(N<<24|N>>>8)&4278255360;return V},clone:function(){var V=K.clone.call(this);return V._hash=this._hash.clone(),V}}),Q.MD5=K._createHelper(Z),Q.HmacMD5=K._createHmacHelper(Z)})(Math);(function(){var $=x1,J=$.lib,Y=J.WordArray,X=J.Hasher,G=[],J=$.algo.SHA1=X.extend({_doReset:function(){this._hash=new Y.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(Q,W){for(var K=this._hash.words,Z=K[0],H=K[1],z=K[2],V=K[3],F=K[4],L=0;80>L;L++){if(16>L)G[L]=Q[W+L]|0;else{var N=G[L-3]^G[L-8]^G[L-14]^G[L-16];G[L]=N<<1|N>>>31}N=(Z<<5|Z>>>27)+F+G[L],N=20>L?N+((H&z|~H&V)+1518500249):40>L?N+((H^z^V)+1859775393):60>L?N+((H&z|H&V|z&V)-1894007588):N+((H^z^V)-899497514),F=V,V=z,z=H<<30|H>>>2,H=Z,Z=N}K[0]=K[0]+Z|0,K[1]=K[1]+H|0,K[2]=K[2]+z|0,K[3]=K[3]+V|0,K[4]=K[4]+F|0},_doFinalize:function(){var Q=this._data,W=Q.words,K=8*this._nDataBytes,Z=8*Q.sigBytes;return W[Z>>>5]|=128<<24-Z%32,W[(Z+64>>>9<<4)+14]=Math.floor(K/4294967296),W[(Z+64>>>9<<4)+15]=K,Q.sigBytes=4*W.length,this._process(),this._hash},clone:function(){var Q=X.clone.call(this);return Q._hash=this._hash.clone(),Q}});$.SHA1=X._createHelper(J),$.HmacSHA1=X._createHmacHelper(J)})();(function($){for(var Y=x1,L=Y.lib,X=L.WordArray,G=L.Hasher,L=Y.algo,J=[],Q=[],W=function(D){return 4294967296*(D-(D|0))|0},K=2,Z=0;64>Z;){var H;$:{H=K;for(var z=$.sqrt(H),V=2;V<=z;V++)if(!(H%V)){H=!1;break $}H=!0}H&&(8>Z&&(J[Z]=W($.pow(K,0.5))),Q[Z]=W($.pow(K,0.3333333333333333)),Z++),K++}var F=[],L=L.SHA256=G.extend({_doReset:function(){this._hash=new X.init(J.slice(0))},_doProcessBlock:function(N,D){for(var A=this._hash.words,B=A[0],O=A[1],E=A[2],M=A[3],R=A[4],q=A[5],_=A[6],P=A[7],w=0;64>w;w++){if(16>w)F[w]=N[D+w]|0;else{var j=F[w-15],C=F[w-2];F[w]=((j<<25|j>>>7)^(j<<14|j>>>18)^j>>>3)+F[w-7]+((C<<15|C>>>17)^(C<<13|C>>>19)^C>>>10)+F[w-16]}j=P+((R<<26|R>>>6)^(R<<21|R>>>11)^(R<<7|R>>>25))+(R&q^~R&_)+Q[w]+F[w],C=((B<<30|B>>>2)^(B<<19|B>>>13)^(B<<10|B>>>22))+(B&O^B&E^O&E),P=_,_=q,q=R,R=M+j|0,M=E,E=O,O=B,B=j+C|0}A[0]=A[0]+B|0,A[1]=A[1]+O|0,A[2]=A[2]+E|0,A[3]=A[3]+M|0,A[4]=A[4]+R|0,A[5]=A[5]+q|0,A[6]=A[6]+_|0,A[7]=A[7]+P|0},_doFinalize:function(){var N=this._data,D=N.words,A=8*this._nDataBytes,B=8*N.sigBytes;return D[B>>>5]|=128<<24-B%32,D[(B+64>>>9<<4)+14]=$.floor(A/4294967296),D[(B+64>>>9<<4)+15]=A,N.sigBytes=4*D.length,this._process(),this._hash},clone:function(){var N=G.clone.call(this);return N._hash=this._hash.clone(),N}});Y.SHA256=G._createHelper(L),Y.HmacSHA256=G._createHmacHelper(L)})(Math);(function(){var $=x1,Y=$.lib.WordArray,G=$.algo,X=G.SHA256,G=G.SHA224=X.extend({_doReset:function(){this._hash=new Y.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var J=X._doFinalize.call(this);return J.sigBytes-=4,J}});$.SHA224=X._createHelper(G),$.HmacSHA224=X._createHmacHelper(G)})();(function(){function $(){return G.create.apply(G,arguments)}for(var Y=x1,X=Y.lib.Hasher,Q=Y.x64,G=Q.Word,J=Q.WordArray,Q=Y.algo,W=[$(1116352408,3609767458),$(1899447441,602891725),$(3049323471,3964484399),$(3921009573,2173295548),$(961987163,4081628472),$(1508970993,3053834265),$(2453635748,2937671579),$(2870763221,3664609560),$(3624381080,2734883394),$(310598401,1164996542),$(607225278,1323610764),$(1426881987,3590304994),$(1925078388,4068182383),$(2162078206,991336113),$(2614888103,633803317),$(3248222580,3479774868),$(3835390401,2666613458),$(4022224774,944711139),$(264347078,2341262773),$(604807628,2007800933),$(770255983,1495990901),$(1249150122,1856431235),$(1555081692,3175218132),$(1996064986,2198950837),$(2554220882,3999719339),$(2821834349,766784016),$(2952996808,2566594879),$(3210313671,3203337956),$(3336571891,1034457026),$(3584528711,2466948901),$(113926993,3758326383),$(338241895,168717936),$(666307205,1188179964),$(773529912,1546045734),$(1294757372,1522805485),$(1396182291,2643833823),$(1695183700,2343527390),$(1986661051,1014477480),$(2177026350,1206759142),$(2456956037,344077627),$(2730485921,1290863460),$(2820302411,3158454273),$(3259730800,3505952657),$(3345764771,106217008),$(3516065817,3606008344),$(3600352804,1432725776),$(4094571909,1467031594),$(275423344,851169720),$(430227734,3100823752),$(506948616,1363258195),$(659060556,3750685593),$(883997877,3785050280),$(958139571,3318307427),$(1322822218,3812723403),$(1537002063,2003034995),$(1747873779,3602036899),$(1955562222,1575990012),$(2024104815,1125592928),$(2227730452,2716904306),$(2361852424,442776044),$(2428436474,593698344),$(2756734187,3733110249),$(3204031479,2999351573),$(3329325298,3815920427),$(3391569614,3928383900),$(3515267271,566280711),$(3940187606,3454069534),$(4118630271,4000239992),$(116418474,1914138554),$(174292421,2731055270),$(289380356,3203993006),$(460393269,320620315),$(685471733,587496836),$(852142971,1086792851),$(1017036298,365543100),$(1126000580,2618297676),$(1288033470,3409855158),$(1501505948,4234509866),$(1607167915,987167468),$(1816402316,1246189591)],K=[],Z=0;80>Z;Z++)K[Z]=$();Q=Q.SHA512=X.extend({_doReset:function(){this._hash=new J.init([new G.init(1779033703,4089235720),new G.init(3144134277,2227873595),new G.init(1013904242,4271175723),new G.init(2773480762,1595750129),new G.init(1359893119,2917565137),new G.init(2600822924,725511199),new G.init(528734635,4215389547),new G.init(1541459225,327033209)])},_doProcessBlock:function(H,z){for(var O=this._hash.words,V=O[0],F=O[1],L=O[2],N=O[3],D=O[4],A=O[5],B=O[6],O=O[7],E=V.high,M=V.low,R=F.high,q=F.low,_=L.high,P=L.low,w=N.high,j=N.low,C=D.high,k=D.low,S=A.high,I=A.low,v=B.high,x=B.low,y=O.high,d=O.low,u=E,b=M,g=R,p=q,h=_,n=P,t=w,s=j,K0=C,X0=k,a=S,Q0=I,e=v,m=x,$0=y,Y0=d,Z0=0;80>Z0;Z0++){var n0=K[Z0];if(16>Z0)var F0=n0.high=H[z+2*Z0]|0,C0=n0.low=H[z+2*Z0+1]|0;else{var F0=K[Z0-15],C0=F0.high,P0=F0.low,F0=(C0>>>1|P0<<31)^(C0>>>8|P0<<24)^C0>>>7,P0=(P0>>>1|C0<<31)^(P0>>>8|C0<<24)^(P0>>>7|C0<<25),f0=K[Z0-2],C0=f0.high,P1=f0.low,f0=(C0>>>19|P1<<13)^(C0<<3|P1>>>29)^C0>>>6,P1=(P1>>>19|C0<<13)^(P1<<3|C0>>>29)^(P1>>>6|C0<<26),C0=K[Z0-7],D0=C0.high,O0=K[Z0-16],d1=O0.high,O0=O0.low,C0=P0+C0.low,F0=F0+D0+(C0>>>0<P0>>>0?1:0),C0=C0+P1,F0=F0+f0+(C0>>>0<P1>>>0?1:0),C0=C0+O0,F0=F0+d1+(C0>>>0<O0>>>0?1:0);n0.high=F0,n0.low=C0}var D0=K0&a^~K0&e,O0=X0&Q0^~X0&m,n0=u&g^u&h^g&h,R0=b&p^b&n^p&n,P0=(u>>>28|b<<4)^(u<<30|b>>>2)^(u<<25|b>>>7),f0=(b>>>28|u<<4)^(b<<30|u>>>2)^(b<<25|u>>>7),P1=W[Z0],p0=P1.high,U4=P1.low,P1=Y0+((X0>>>14|K0<<18)^(X0>>>18|K0<<14)^(X0<<23|K0>>>9)),d1=$0+((K0>>>14|X0<<18)^(K0>>>18|X0<<14)^(K0<<23|X0>>>9))+(P1>>>0<Y0>>>0?1:0),P1=P1+O0,d1=d1+D0+(P1>>>0<O0>>>0?1:0),P1=P1+U4,d1=d1+p0+(P1>>>0<U4>>>0?1:0),P1=P1+C0,d1=d1+F0+(P1>>>0<C0>>>0?1:0),C0=f0+R0,n0=P0+n0+(C0>>>0<f0>>>0?1:0),$0=e,Y0=m,e=a,m=Q0,a=K0,Q0=X0,X0=s+P1|0,K0=t+d1+(X0>>>0<s>>>0?1:0)|0,t=h,s=n,h=g,n=p,g=u,p=b,b=P1+C0|0,u=d1+n0+(b>>>0<P1>>>0?1:0)|0}M=V.low=M+b,V.high=E+u+(M>>>0<b>>>0?1:0),q=F.low=q+p,F.high=R+g+(q>>>0<p>>>0?1:0),P=L.low=P+n,L.high=_+h+(P>>>0<n>>>0?1:0),j=N.low=j+s,N.high=w+t+(j>>>0<s>>>0?1:0),k=D.low=k+X0,D.high=C+K0+(k>>>0<X0>>>0?1:0),I=A.low=I+Q0,A.high=S+a+(I>>>0<Q0>>>0?1:0),x=B.low=x+m,B.high=v+e+(x>>>0<m>>>0?1:0),d=O.low=d+Y0,O.high=y+$0+(d>>>0<Y0>>>0?1:0)},_doFinalize:function(){var H=this._data,z=H.words,V=8*this._nDataBytes,F=8*H.sigBytes;return z[F>>>5]|=128<<24-F%32,z[(F+128>>>10<<5)+30]=Math.floor(V/4294967296),z[(F+128>>>10<<5)+31]=V,H.sigBytes=4*z.length,this._process(),this._hash.toX32()},clone:function(){var H=X.clone.call(this);return H._hash=this._hash.clone(),H},blockSize:32}),Y.SHA512=X._createHelper(Q),Y.HmacSHA512=X._createHmacHelper(Q)})();(function(){var $=x1,J=$.x64,Y=J.Word,X=J.WordArray,J=$.algo,G=J.SHA512,J=J.SHA384=G.extend({_doReset:function(){this._hash=new X.init([new Y.init(3418070365,3238371032),new Y.init(1654270250,914150663),new Y.init(2438529370,812702999),new Y.init(355462360,4144912697),new Y.init(1731405415,4290775857),new Y.init(2394180231,1750603025),new Y.init(3675008525,1694076839),new Y.init(1203062813,3204075428)])},_doFinalize:function(){var Q=G._doFinalize.call(this);return Q.sigBytes-=16,Q}});$.SHA384=G._createHelper(J),$.HmacSHA384=G._createHmacHelper(J)})();(function(){var $=x1,H=$.lib,Y=H.WordArray,X=H.Hasher,H=$.algo,G=Y.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),J=Y.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),Q=Y.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),W=Y.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),K=Y.create([0,1518500249,1859775393,2400959708,2840853838]),Z=Y.create([1352829926,1548603684,1836072691,2053994217,0]),H=H.RIPEMD160=X.extend({_doReset:function(){this._hash=Y.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(z,V){for(var F=0;16>F;F++){var L=V+F,N=z[L];z[L]=(N<<8|N>>>24)&16711935|(N<<24|N>>>8)&4278255360}var L=this._hash.words,N=K.words,D=Z.words,A=G.words,B=J.words,O=Q.words,E=W.words,M,R,q,_,P,w,j,C,k,S;w=M=L[0],j=R=L[1],C=q=L[2],k=_=L[3],S=P=L[4];for(var I,F=0;80>F;F+=1)I=M+z[V+A[F]]|0,I=16>F?I+((R^q^_)+N[0]):32>F?I+((R&q|~R&_)+N[1]):48>F?I+(((R|~q)^_)+N[2]):64>F?I+((R&_|q&~_)+N[3]):I+((R^(q|~_))+N[4]),I|=0,I=I<<O[F]|I>>>32-O[F],I=I+P|0,M=P,P=_,_=q<<10|q>>>22,q=R,R=I,I=w+z[V+B[F]]|0,I=16>F?I+((j^(C|~k))+D[0]):32>F?I+((j&k|C&~k)+D[1]):48>F?I+(((j|~C)^k)+D[2]):64>F?I+((j&C|~j&k)+D[3]):I+((j^C^k)+D[4]),I|=0,I=I<<E[F]|I>>>32-E[F],I=I+S|0,w=S,S=k,k=C<<10|C>>>22,C=j,j=I;I=L[1]+q+k|0,L[1]=L[2]+_+S|0,L[2]=L[3]+P+w|0,L[3]=L[4]+M+j|0,L[4]=L[0]+R+C|0,L[0]=I},_doFinalize:function(){var z=this._data,V=z.words,F=8*this._nDataBytes,L=8*z.sigBytes;V[L>>>5]|=128<<24-L%32,V[(L+64>>>9<<4)+14]=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,z.sigBytes=4*(V.length+1),this._process(),z=this._hash,V=z.words;for(F=0;5>F;F++)L=V[F],V[F]=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360;return z},clone:function(){var z=X.clone.call(this);return z._hash=this._hash.clone(),z}});$.RIPEMD160=X._createHelper(H),$.HmacRIPEMD160=X._createHmacHelper(H)})(Math);(function(){var $=x1,Y=$.enc.Utf8;$.algo.HMAC=$.lib.Base.extend({init:function(X,G){X=this._hasher=new X.init,typeof G=="string"&&(G=Y.parse(G));var J=X.blockSize,Q=4*J;G.sigBytes>Q&&(G=X.finalize(G)),G.clamp();for(var W=this._oKey=G.clone(),K=this._iKey=G.clone(),Z=W.words,H=K.words,z=0;z<J;z++)Z[z]^=1549556828,H[z]^=909522486;W.sigBytes=K.sigBytes=Q,this.reset()},reset:function(){var X=this._hasher;X.reset(),X.update(this._iKey)},update:function(X){return this._hasher.update(X),this},finalize:function(X){var G=this._hasher;return X=G.finalize(X),G.reset(),G.finalize(this._oKey.clone().concat(X))}})})();(function(){var $=x1,G=$.lib,Y=G.Base,X=G.WordArray,G=$.algo,J=G.HMAC,Q=G.PBKDF2=Y.extend({cfg:Y.extend({keySize:4,hasher:G.SHA1,iterations:1}),init:function(W){this.cfg=this.cfg.extend(W)},compute:function(W,K){for(var N=this.cfg,Z=J.create(N.hasher,W),H=X.create(),z=X.create([1]),V=H.words,F=z.words,L=N.keySize,N=N.iterations;V.length<L;){var D=Z.update(K).finalize(z);Z.reset();for(var A=D.words,B=A.length,O=D,E=1;E<N;E++){O=Z.finalize(O),Z.reset();for(var M=O.words,R=0;R<B;R++)A[R]^=M[R]}H.concat(D),F[0]++}return H.sigBytes=4*L,H}});$.PBKDF2=function(W,K,Z){return Q.create(Z).compute(W,K)}})();/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
 */var Lq="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",iZ0="=";function dk($){var Y,X,G="";for(Y=0;Y+3<=$.length;Y+=3)X=parseInt($.substring(Y,Y+3),16),G+=Lq.charAt(X>>6)+Lq.charAt(X&63);if(Y+1==$.length)X=parseInt($.substring(Y,Y+1),16),G+=Lq.charAt(X<<2);else if(Y+2==$.length)X=parseInt($.substring(Y,Y+2),16),G+=Lq.charAt(X>>2)+Lq.charAt((X&3)<<4);if(iZ0)while((G.length&3)>0)G+=iZ0;return G}function aZ0($){var Y="",X,G=0,J,Q;for(X=0;X<$.length;++X){if($.charAt(X)==iZ0)break;if(Q=Lq.indexOf($.charAt(X)),Q<0)continue;if(G==0)Y+=pH(Q>>2),J=Q&3,G=1;else if(G==1)Y+=pH(J<<2|Q>>4),J=Q&15,G=2;else if(G==2)Y+=pH(J),Y+=pH(Q>>2),J=Q&3,G=3;else Y+=pH(J<<2|Q>>4),Y+=pH(Q&15),G=0}if(G==1)Y+=pH(J<<2);return Y}/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
 */var BF,ar4=244837814094590,DG1=(ar4&16777215)==15715070;function S0($,Y,X){if($!=null)if(typeof $=="number")this.fromNumber($,Y,X);else if(Y==null&&typeof $!="string")this.fromString($,256);else this.fromString($,Y)}function S8(){return new S0(null)}function sr4($,Y,X,G,J,Q){while(--Q>=0){var W=Y*this[$++]+X[G]+J;J=Math.floor(W/67108864),X[G++]=W&67108863}return J}function or4($,Y,X,G,J,Q){var W=Y&32767,K=Y>>15;while(--Q>=0){var Z=this[$]&32767,H=this[$++]>>15,z=K*Z+H*W;Z=W*Z+((z&32767)<<15)+X[G]+(J&1073741823),J=(Z>>>30)+(z>>>15)+K*H+(J>>>30),X[G++]=Z&1073741823}return J}function tr4($,Y,X,G,J,Q){var W=Y&16383,K=Y>>14;while(--Q>=0){var Z=this[$]&16383,H=this[$++]>>14,z=K*Z+H*W;Z=W*Z+((z&16383)<<14)+X[G]+J,J=(Z>>28)+(z>>14)+K*H,X[G++]=Z&268435455}return J}if(DG1&&lk.appName=="Microsoft Internet Explorer")S0.prototype.am=or4,BF=30;else if(DG1&&lk.appName!="Netscape")S0.prototype.am=sr4,BF=26;else S0.prototype.am=tr4,BF=28;S0.prototype.DB=BF;S0.prototype.DM=(1<<BF)-1;S0.prototype.DV=1<<BF;var sZ0=52;S0.prototype.FV=Math.pow(2,sZ0);S0.prototype.F1=sZ0-BF;S0.prototype.F2=2*BF-sZ0;var er4="0123456789abcdefghijklmnopqrstuvwxyz",en=[],Dq,L2;Dq=48;for(L2=0;L2<=9;++L2)en[Dq++]=L2;Dq=97;for(L2=10;L2<36;++L2)en[Dq++]=L2;Dq=65;for(L2=10;L2<36;++L2)en[Dq++]=L2;function pH($){return er4.charAt($)}function RG1($,Y){var X=en[$.charCodeAt(Y)];return X==null?-1:X}function $a4($){for(var Y=this.t-1;Y>=0;--Y)$[Y]=this[Y];$.t=this.t,$.s=this.s}function Ya4($){if(this.t=1,this.s=$<0?-1:0,$>0)this[0]=$;else if($<-1)this[0]=$+this.DV;else this.t=0}function AF($){var Y=S8();return Y.fromInt($),Y}function Xa4($,Y){var X;if(Y==16)X=4;else if(Y==8)X=3;else if(Y==256)X=8;else if(Y==2)X=1;else if(Y==32)X=5;else if(Y==4)X=2;else{this.fromRadix($,Y);return}this.t=0,this.s=0;var G=$.length,J=!1,Q=0;while(--G>=0){var W=X==8?$[G]&255:RG1($,G);if(W<0){if($.charAt(G)=="-")J=!0;continue}if(J=!1,Q==0)this[this.t++]=W;else if(Q+X>this.DB)this[this.t-1]|=(W&(1<<this.DB-Q)-1)<<Q,this[this.t++]=W>>this.DB-Q;else this[this.t-1]|=W<<Q;if(Q+=X,Q>=this.DB)Q-=this.DB}if(X==8&&($[0]&128)!=0){if(this.s=-1,Q>0)this[this.t-1]|=(1<<this.DB-Q)-1<<Q}if(this.clamp(),J)S0.ZERO.subTo(this,this)}function Ga4(){var $=this.s&this.DM;while(this.t>0&&this[this.t-1]==$)--this.t}function Ja4($){if(this.s<0)return"-"+this.negate().toString($);var Y;if($==16)Y=4;else if($==8)Y=3;else if($==2)Y=1;else if($==32)Y=5;else if($==4)Y=2;else return this.toRadix($);var X=(1<<Y)-1,G,J=!1,Q="",W=this.t,K=this.DB-W*this.DB%Y;if(W-- >0){if(K<this.DB&&(G=this[W]>>K)>0)J=!0,Q=pH(G);while(W>=0){if(K<Y)G=(this[W]&(1<<K)-1)<<Y-K,G|=this[--W]>>(K+=this.DB-Y);else if(G=this[W]>>(K-=Y)&X,K<=0)K+=this.DB,--W;if(G>0)J=!0;if(J)Q+=pH(G)}}return J?Q:"0"}function Qa4(){var $=S8();return S0.ZERO.subTo(this,$),$}function Wa4(){return this.s<0?this.negate():this}function Ka4($){var Y=this.s-$.s;if(Y!=0)return Y;var X=this.t;if(Y=X-$.t,Y!=0)return this.s<0?-Y:Y;while(--X>=0)if((Y=this[X]-$[X])!=0)return Y;return 0}function $r($){var Y=1,X;if((X=$>>>16)!=0)$=X,Y+=16;if((X=$>>8)!=0)$=X,Y+=8;if((X=$>>4)!=0)$=X,Y+=4;if((X=$>>2)!=0)$=X,Y+=2;if((X=$>>1)!=0)$=X,Y+=1;return Y}function Za4(){if(this.t<=0)return 0;return this.DB*(this.t-1)+$r(this[this.t-1]^this.s&this.DM)}function Ua4($,Y){var X;for(X=this.t-1;X>=0;--X)Y[X+$]=this[X];for(X=$-1;X>=0;--X)Y[X]=0;Y.t=this.t+$,Y.s=this.s}function Ha4($,Y){for(var X=$;X<this.t;++X)Y[X-$]=this[X];Y.t=Math.max(this.t-$,0),Y.s=this.s}function za4($,Y){var X=$%this.DB,G=this.DB-X,J=(1<<G)-1,Q=Math.floor($/this.DB),W=this.s<<X&this.DM,K;for(K=this.t-1;K>=0;--K)Y[K+Q+1]=this[K]>>G|W,W=(this[K]&J)<<X;for(K=Q-1;K>=0;--K)Y[K]=0;Y[Q]=W,Y.t=this.t+Q+1,Y.s=this.s,Y.clamp()}function Va4($,Y){Y.s=this.s;var X=Math.floor($/this.DB);if(X>=this.t){Y.t=0;return}var G=$%this.DB,J=this.DB-G,Q=(1<<G)-1;Y[0]=this[X]>>G;for(var W=X+1;W<this.t;++W)Y[W-X-1]|=(this[W]&Q)<<J,Y[W-X]=this[W]>>G;if(G>0)Y[this.t-X-1]|=(this.s&Q)<<J;Y.t=this.t-X,Y.clamp()}function Fa4($,Y){var X=0,G=0,J=Math.min($.t,this.t);while(X<J)G+=this[X]-$[X],Y[X++]=G&this.DM,G>>=this.DB;if($.t<this.t){G-=$.s;while(X<this.t)G+=this[X],Y[X++]=G&this.DM,G>>=this.DB;G+=this.s}else{G+=this.s;while(X<$.t)G-=$[X],Y[X++]=G&this.DM,G>>=this.DB;G-=$.s}if(Y.s=G<0?-1:0,G<-1)Y[X++]=this.DV+G;else if(G>0)Y[X++]=G;Y.t=X,Y.clamp()}function La4($,Y){var X=this.abs(),G=$.abs(),J=X.t;Y.t=J+G.t;while(--J>=0)Y[J]=0;for(J=0;J<G.t;++J)Y[J+X.t]=X.am(0,G[J],Y,J,0,X.t);if(Y.s=0,Y.clamp(),this.s!=$.s)S0.ZERO.subTo(Y,Y)}function Da4($){var Y=this.abs(),X=$.t=2*Y.t;while(--X>=0)$[X]=0;for(X=0;X<Y.t-1;++X){var G=Y.am(X,Y[X],$,2*X,0,1);if(($[X+Y.t]+=Y.am(X+1,2*Y[X],$,2*X+1,G,Y.t-X-1))>=Y.DV)$[X+Y.t]-=Y.DV,$[X+Y.t+1]=1}if($.t>0)$[$.t-1]+=Y.am(X,Y[X],$,2*X,0,1);$.s=0,$.clamp()}function Na4($,Y,X){var G=$.abs();if(G.t<=0)throw"BigInteger divide by zero";var J=this.abs();if(J.t<G.t){if(Y!=null)Y.fromInt(0);if(X!=null)this.copyTo(X);return}if(X==null)X=S8();var Q=S8(),W=this.s,K=$.s,Z=this.DB-$r(G[G.t-1]);if(Z>0)G.lShiftTo(Z,Q),J.lShiftTo(Z,X);else G.copyTo(Q),J.copyTo(X);var H=Q.t,z=Q[H-1];if(z==0)return;var V=z*(1<<this.F1)+(H>1?Q[H-2]>>this.F2:0),F=this.FV/V,L=(1<<this.F1)/V,N=1<<this.F2,D=X.t,A=D-H,B=Y==null?S8():Y;if(Q.dlShiftTo(A,B),X.compareTo(B)>=0)X[X.t++]=1,X.subTo(B,X);S0.ONE.dlShiftTo(H,B),B.subTo(Q,Q);while(Q.t<H)Q[Q.t++]=0;while(--A>=0){var O=X[--D]==z?this.DM:Math.floor(X[D]*F+(X[D-1]+N)*L);if((X[D]+=Q.am(0,O,X,A,0,H))<O){Q.dlShiftTo(A,B),X.subTo(B,X);while(X[D]<--O)X.subTo(B,X)}}if(Y!=null){if(X.drShiftTo(H,Y),W!=K)S0.ZERO.subTo(Y,Y)}if(X.t=H,X.clamp(),Z>0)X.rShiftTo(Z,X);if(W<0)S0.ZERO.subTo(X,X)}function Aa4($){var Y=S8();if(this.abs().divRemTo($,null,Y),this.s<0&&Y.compareTo(S0.ZERO)>0)$.subTo(Y,Y);return Y}function MA($){this.m=$}function Ba4($){if($.s<0||$.compareTo(this.m)>=0)return $.mod(this.m);else return $}function Oa4($){return $}function Ea4($){$.divRemTo(this.m,null,$)}function Ma4($,Y,X){$.multiplyTo(Y,X),this.reduce(X)}function Ra4($,Y){$.squareTo(Y),this.reduce(Y)}MA.prototype.convert=Ba4;MA.prototype.revert=Oa4;MA.prototype.reduce=Ea4;MA.prototype.mulTo=Ma4;MA.prototype.sqrTo=Ra4;function qa4(){if(this.t<1)return 0;var $=this[0];if(($&1)==0)return 0;var Y=$&3;return Y=Y*(2-($&15)*Y)&15,Y=Y*(2-($&255)*Y)&255,Y=Y*(2-(($&65535)*Y&65535))&65535,Y=Y*(2-$*Y%this.DV)%this.DV,Y>0?this.DV-Y:-Y}function RA($){this.m=$,this.mp=$.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<$.DB-15)-1,this.mt2=2*$.t}function Pa4($){var Y=S8();if($.abs().dlShiftTo(this.m.t,Y),Y.divRemTo(this.m,null,Y),$.s<0&&Y.compareTo(S0.ZERO)>0)this.m.subTo(Y,Y);return Y}function wa4($){var Y=S8();return $.copyTo(Y),this.reduce(Y),Y}function _a4($){while($.t<=this.mt2)$[$.t++]=0;for(var Y=0;Y<this.m.t;++Y){var X=$[Y]&32767,G=X*this.mpl+((X*this.mph+($[Y]>>15)*this.mpl&this.um)<<15)&$.DM;X=Y+this.m.t,$[X]+=this.m.am(0,G,$,Y,0,this.m.t);while($[X]>=$.DV)$[X]-=$.DV,$[++X]++}if($.clamp(),$.drShiftTo(this.m.t,$),$.compareTo(this.m)>=0)$.subTo(this.m,$)}function ja4($,Y){$.squareTo(Y),this.reduce(Y)}function Ta4($,Y,X){$.multiplyTo(Y,X),this.reduce(X)}RA.prototype.convert=Pa4;RA.prototype.revert=wa4;RA.prototype.reduce=_a4;RA.prototype.mulTo=Ta4;RA.prototype.sqrTo=ja4;function Ia4(){return(this.t>0?this[0]&1:this.s)==0}function Ca4($,Y){if($>4294967295||$<1)return S0.ONE;var X=S8(),G=S8(),J=Y.convert(this),Q=$r($)-1;J.copyTo(X);while(--Q>=0)if(Y.sqrTo(X,G),($&1<<Q)>0)Y.mulTo(G,J,X);else{var W=X;X=G,G=W}return Y.revert(X)}function Sa4($,Y){var X;if($<256||Y.isEven())X=new MA(Y);else X=new RA(Y);return this.exp($,X)}S0.prototype.copyTo=$a4;S0.prototype.fromInt=Ya4;S0.prototype.fromString=Xa4;S0.prototype.clamp=Ga4;S0.prototype.dlShiftTo=Ua4;S0.prototype.drShiftTo=Ha4;S0.prototype.lShiftTo=za4;S0.prototype.rShiftTo=Va4;S0.prototype.subTo=Fa4;S0.prototype.multiplyTo=La4;S0.prototype.squareTo=Da4;S0.prototype.divRemTo=Na4;S0.prototype.invDigit=qa4;S0.prototype.isEven=Ia4;S0.prototype.exp=Ca4;S0.prototype.toString=Ja4;S0.prototype.negate=Qa4;S0.prototype.abs=Wa4;S0.prototype.compareTo=Ka4;S0.prototype.bitLength=Za4;S0.prototype.mod=Aa4;S0.prototype.modPowInt=Sa4;S0.ZERO=AF(0);S0.ONE=AF(1);/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
 */function ka4(){var $=S8();return this.copyTo($),$}function va4(){if(this.s<0){if(this.t==1)return this[0]-this.DV;else if(this.t==0)return-1}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function xa4(){return this.t==0?this.s:this[0]<<24>>24}function ya4(){return this.t==0?this.s:this[0]<<16>>16}function ba4($){return Math.floor(Math.LN2*this.DB/Math.log($))}function ha4(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this[0]<=0)return 0;else return 1}function fa4($){if($==null)$=10;if(this.signum()==0||$<2||$>36)return"0";var Y=this.chunkSize($),X=Math.pow($,Y),G=AF(X),J=S8(),Q=S8(),W="";this.divRemTo(G,J,Q);while(J.signum()>0)W=(X+Q.intValue()).toString($).substr(1)+W,J.divRemTo(G,J,Q);return Q.intValue().toString($)+W}function ga4($,Y){if(this.fromInt(0),Y==null)Y=10;var X=this.chunkSize(Y),G=Math.pow(Y,X),J=!1,Q=0,W=0;for(var K=0;K<$.length;++K){var Z=RG1($,K);if(Z<0){if($.charAt(K)=="-"&&this.signum()==0)J=!0;continue}if(W=Y*W+Z,++Q>=X)this.dMultiply(G),this.dAddOffset(W,0),Q=0,W=0}if(Q>0)this.dMultiply(Math.pow(Y,Q)),this.dAddOffset(W,0);if(J)S0.ZERO.subTo(this,this)}function ma4($,Y,X){if(typeof Y=="number")if($<2)this.fromInt(1);else{if(this.fromNumber($,X),!this.testBit($-1))this.bitwiseTo(S0.ONE.shiftLeft($-1),oZ0,this);if(this.isEven())this.dAddOffset(1,0);while(!this.isProbablePrime(Y))if(this.dAddOffset(2,0),this.bitLength()>$)this.subTo(S0.ONE.shiftLeft($-1),this)}else{var G=[],J=$&7;if(G.length=($>>3)+1,Y.nextBytes(G),J>0)G[0]&=(1<<J)-1;else G[0]=0;this.fromString(G,256)}}function ua4(){var $=this.t,Y=[];Y[0]=this.s;var X=this.DB-$*this.DB%8,G,J=0;if($-- >0){if(X<this.DB&&(G=this[$]>>X)!=(this.s&this.DM)>>X)Y[J++]=G|this.s<<this.DB-X;while($>=0){if(X<8)G=(this[$]&(1<<X)-1)<<8-X,G|=this[--$]>>(X+=this.DB-8);else if(G=this[$]>>(X-=8)&255,X<=0)X+=this.DB,--$;if((G&128)!=0)G|=-256;if(J==0&&(this.s&128)!=(G&128))++J;if(J>0||G!=this.s)Y[J++]=G}}return Y}function pa4($){return this.compareTo($)==0}function da4($){return this.compareTo($)<0?this:$}function ca4($){return this.compareTo($)>0?this:$}function la4($,Y,X){var G,J,Q=Math.min($.t,this.t);for(G=0;G<Q;++G)X[G]=Y(this[G],$[G]);if($.t<this.t){J=$.s&this.DM;for(G=Q;G<this.t;++G)X[G]=Y(this[G],J);X.t=this.t}else{J=this.s&this.DM;for(G=Q;G<$.t;++G)X[G]=Y(J,$[G]);X.t=$.t}X.s=Y(this.s,$.s),X.clamp()}function ia4($,Y){return $&Y}function na4($){var Y=S8();return this.bitwiseTo($,ia4,Y),Y}function oZ0($,Y){return $|Y}function ra4($){var Y=S8();return this.bitwiseTo($,oZ0,Y),Y}function qG1($,Y){return $^Y}function aa4($){var Y=S8();return this.bitwiseTo($,qG1,Y),Y}function PG1($,Y){return $&~Y}function sa4($){var Y=S8();return this.bitwiseTo($,PG1,Y),Y}function oa4(){var $=S8();for(var Y=0;Y<this.t;++Y)$[Y]=this.DM&~this[Y];return $.t=this.t,$.s=~this.s,$}function ta4($){var Y=S8();if($<0)this.rShiftTo(-$,Y);else this.lShiftTo($,Y);return Y}function ea4($){var Y=S8();if($<0)this.lShiftTo(-$,Y);else this.rShiftTo($,Y);return Y}function $s4($){if($==0)return-1;var Y=0;if(($&65535)==0)$>>=16,Y+=16;if(($&255)==0)$>>=8,Y+=8;if(($&15)==0)$>>=4,Y+=4;if(($&3)==0)$>>=2,Y+=2;if(($&1)==0)++Y;return Y}function Ys4(){for(var $=0;$<this.t;++$)if(this[$]!=0)return $*this.DB+$s4(this[$]);if(this.s<0)return this.t*this.DB;return-1}function Xs4($){var Y=0;while($!=0)$&=$-1,++Y;return Y}function Gs4(){var $=0,Y=this.s&this.DM;for(var X=0;X<this.t;++X)$+=Xs4(this[X]^Y);return $}function Js4($){var Y=Math.floor($/this.DB);if(Y>=this.t)return this.s!=0;return(this[Y]&1<<$%this.DB)!=0}function Qs4($,Y){var X=S0.ONE.shiftLeft($);return this.bitwiseTo(X,Y,X),X}function Ws4($){return this.changeBit($,oZ0)}function Ks4($){return this.changeBit($,PG1)}function Zs4($){return this.changeBit($,qG1)}function Us4($,Y){var X=0,G=0,J=Math.min($.t,this.t);while(X<J)G+=this[X]+$[X],Y[X++]=G&this.DM,G>>=this.DB;if($.t<this.t){G+=$.s;while(X<this.t)G+=this[X],Y[X++]=G&this.DM,G>>=this.DB;G+=this.s}else{G+=this.s;while(X<$.t)G+=$[X],Y[X++]=G&this.DM,G>>=this.DB;G+=$.s}if(Y.s=G<0?-1:0,G>0)Y[X++]=G;else if(G<-1)Y[X++]=this.DV+G;Y.t=X,Y.clamp()}function Hs4($){var Y=S8();return this.addTo($,Y),Y}function zs4($){var Y=S8();return this.subTo($,Y),Y}function Vs4($){var Y=S8();return this.multiplyTo($,Y),Y}function Fs4(){var $=S8();return this.squareTo($),$}function Ls4($){var Y=S8();return this.divRemTo($,Y,null),Y}function Ds4($){var Y=S8();return this.divRemTo($,null,Y),Y}function Ns4($){var Y=S8(),X=S8();return this.divRemTo($,Y,X),[Y,X]}function As4($){this[this.t]=this.am(0,$-1,this,0,0,this.t),++this.t,this.clamp()}function Bs4($,Y){if($==0)return;while(this.t<=Y)this[this.t++]=0;this[Y]+=$;while(this[Y]>=this.DV){if(this[Y]-=this.DV,++Y>=this.t)this[this.t++]=0;++this[Y]}}function ik(){}function wG1($){return $}function Os4($,Y,X){$.multiplyTo(Y,X)}function Es4($,Y){$.squareTo(Y)}ik.prototype.convert=wG1;ik.prototype.revert=wG1;ik.prototype.mulTo=Os4;ik.prototype.sqrTo=Es4;function Ms4($){return this.exp($,new ik)}function Rs4($,Y,X){var G=Math.min(this.t+$.t,Y);X.s=0,X.t=G;while(G>0)X[--G]=0;var J;for(J=X.t-this.t;G<J;++G)X[G+this.t]=this.am(0,$[G],X,G,0,this.t);for(J=Math.min($.t,Y);G<J;++G)this.am(0,$[G],X,G,0,Y-G);X.clamp()}function qs4($,Y,X){--Y;var G=X.t=this.t+$.t-Y;X.s=0;while(--G>=0)X[G]=0;for(G=Math.max(Y-this.t,0);G<$.t;++G)X[this.t+G-Y]=this.am(Y-G,$[G],X,0,0,this.t+G-Y);X.clamp(),X.drShiftTo(1,X)}function Nq($){this.r2=S8(),this.q3=S8(),S0.ONE.dlShiftTo(2*$.t,this.r2),this.mu=this.r2.divide($),this.m=$}function Ps4($){if($.s<0||$.t>2*this.m.t)return $.mod(this.m);else if($.compareTo(this.m)<0)return $;else{var Y=S8();return $.copyTo(Y),this.reduce(Y),Y}}function ws4($){return $}function _s4($){if($.drShiftTo(this.m.t-1,this.r2),$.t>this.m.t+1)$.t=this.m.t+1,$.clamp();this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while($.compareTo(this.r2)<0)$.dAddOffset(1,this.m.t+1);$.subTo(this.r2,$);while($.compareTo(this.m)>=0)$.subTo(this.m,$)}function js4($,Y){$.squareTo(Y),this.reduce(Y)}function Ts4($,Y,X){$.multiplyTo(Y,X),this.reduce(X)}Nq.prototype.convert=Ps4;Nq.prototype.revert=ws4;Nq.prototype.reduce=_s4;Nq.prototype.mulTo=Ts4;Nq.prototype.sqrTo=js4;function Is4($,Y){if($.signum()<0)return this.modInverse(Y).modPow($.negate(),Y);var X=$.bitLength(),G,J=AF(1),Q;if(X<=0)return J;else if(X<18)G=1;else if(X<48)G=3;else if(X<144)G=4;else if(X<768)G=5;else G=6;if(X<8)Q=new MA(Y);else if(Y.isEven())Q=new Nq(Y);else Q=new RA(Y);var W=[],K=3,Z=G-1,H=(1<<G)-1;if(W[1]=Q.convert(this),G>1){var z=S8();Q.sqrTo(W[1],z);while(K<=H)W[K]=S8(),Q.mulTo(z,W[K-2],W[K]),K+=2}var V=$.t-1,F,L=!0,N=S8(),D;X=$r($[V])-1;while(V>=0){if(X>=Z)F=$[V]>>X-Z&H;else if(F=($[V]&(1<<X+1)-1)<<Z-X,V>0)F|=$[V-1]>>this.DB+X-Z;K=G;while((F&1)==0)F>>=1,--K;if((X-=K)<0)X+=this.DB,--V;if(L)W[F].copyTo(J),L=!1;else{while(K>1)Q.sqrTo(J,N),Q.sqrTo(N,J),K-=2;if(K>0)Q.sqrTo(J,N);else D=J,J=N,N=D;Q.mulTo(N,W[F],J)}while(V>=0&&($[V]&1<<X)==0)if(Q.sqrTo(J,N),D=J,J=N,N=D,--X<0)X=this.DB-1,--V}return Q.revert(J)}function Cs4($){var Y=this.s<0?this.negate():this.clone(),X=$.s<0?$.negate():$.clone();if(Y.compareTo(X)<0){var G=Y;Y=X,X=G}var J=Y.getLowestSetBit(),Q=X.getLowestSetBit();if(Q<0)return Y;if(J<Q)Q=J;if(Q>0)Y.rShiftTo(Q,Y),X.rShiftTo(Q,X);while(Y.signum()>0){if((J=Y.getLowestSetBit())>0)Y.rShiftTo(J,Y);if((J=X.getLowestSetBit())>0)X.rShiftTo(J,X);if(Y.compareTo(X)>=0)Y.subTo(X,Y),Y.rShiftTo(1,Y);else X.subTo(Y,X),X.rShiftTo(1,X)}if(Q>0)X.lShiftTo(Q,X);return X}function Ss4($){if($<=0)return 0;var Y=this.DV%$,X=this.s<0?$-1:0;if(this.t>0)if(Y==0)X=this[0]%$;else for(var G=this.t-1;G>=0;--G)X=(Y*X+this[G])%$;return X}function ks4($){if($.signum()==0)return S0.ZERO;var Y=this.mod($),X=$.isEven();if(Y.isEven()&&X||Y.signum()==0)return S0.ZERO;var G=$.clone(),J=Y.clone(),Q=AF(1),W=AF(0),K=AF(0),Z=AF(1);while(G.signum()!=0){while(G.isEven()){if(G.rShiftTo(1,G),X){if(!Q.isEven()||!W.isEven())Q.addTo(Y,Q),W.subTo($,W);Q.rShiftTo(1,Q)}else if(!W.isEven())W.subTo($,W);W.rShiftTo(1,W)}while(J.isEven()){if(J.rShiftTo(1,J),X){if(!K.isEven()||!Z.isEven())K.addTo(Y,K),Z.subTo($,Z);K.rShiftTo(1,K)}else if(!Z.isEven())Z.subTo($,Z);Z.rShiftTo(1,Z)}if(G.compareTo(J)>=0){if(G.subTo(J,G),X)Q.subTo(K,Q);W.subTo(Z,W)}else{if(J.subTo(G,J),X)K.subTo(Q,K);Z.subTo(W,Z)}}if(J.compareTo(S0.ONE)!=0)return S0.ZERO;if(Z.compareTo($)>=0)return Z.subtract($);if(Z.signum()<0)Z.addTo($,Z);else return Z;if(Z.signum()<0)return Z.add($);else return Z}var MG=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],vs4=67108864/MG[MG.length-1];function xs4($){if(this.signum()<=0)return!1;var Y,X=this.abs();if(X.t==1&&X[0]<=MG[MG.length-1]){for(Y=0;Y<MG.length;++Y)if(X[0]==MG[Y])return!0;return!1}if(X.isEven())return!1;Y=1;while(Y<MG.length){var G=MG[Y],J=Y+1;while(J<MG.length&&G<vs4)G*=MG[J++];G=X.modInt(G);while(Y<J)if(G%MG[Y++]==0)return!1}return X.millerRabin($)}function ys4($){if(this.signum()<=0)return!1;var Y=this.subtract(S0.ONE),X=Y.getLowestSetBit();if(X<=0)return!1;var G=Y.shiftRight(X);if($=$+1>>1,$>MG.length)$=MG.length;var J=S8();for(var Q=0;Q<$;++Q){J.fromInt(MG[Math.floor(Math.random()*MG.length)]);var W=J.modPow(G,this);if(W.compareTo(S0.ONE)!=0&&W.compareTo(Y)!=0){var K=1;while(K++<X&&W.compareTo(Y)!=0)if(W=W.modPowInt(2,this),W.compareTo(S0.ONE)==0)return!1;if(W.compareTo(Y)!=0)return!1}}return!0}S0.prototype.chunkSize=ba4;S0.prototype.toRadix=fa4;S0.prototype.fromRadix=ga4;S0.prototype.fromNumber=ma4;S0.prototype.bitwiseTo=la4;S0.prototype.changeBit=Qs4;S0.prototype.addTo=Us4;S0.prototype.dMultiply=As4;S0.prototype.dAddOffset=Bs4;S0.prototype.multiplyLowerTo=Rs4;S0.prototype.multiplyUpperTo=qs4;S0.prototype.modInt=Ss4;S0.prototype.millerRabin=ys4;S0.prototype.clone=ka4;S0.prototype.intValue=va4;S0.prototype.byteValue=xa4;S0.prototype.shortValue=ya4;S0.prototype.signum=ha4;S0.prototype.toByteArray=ua4;S0.prototype.equals=pa4;S0.prototype.min=da4;S0.prototype.max=ca4;S0.prototype.and=na4;S0.prototype.or=ra4;S0.prototype.xor=aa4;S0.prototype.andNot=sa4;S0.prototype.not=oa4;S0.prototype.shiftLeft=ta4;S0.prototype.shiftRight=ea4;S0.prototype.getLowestSetBit=Ys4;S0.prototype.bitCount=Gs4;S0.prototype.testBit=Js4;S0.prototype.setBit=Ws4;S0.prototype.clearBit=Ks4;S0.prototype.flipBit=Zs4;S0.prototype.add=Hs4;S0.prototype.subtract=zs4;S0.prototype.multiply=Vs4;S0.prototype.divide=Ls4;S0.prototype.remainder=Ds4;S0.prototype.divideAndRemainder=Ns4;S0.prototype.modPow=Is4;S0.prototype.modInverse=ks4;S0.prototype.pow=Ms4;S0.prototype.gcd=Cs4;S0.prototype.isProbablePrime=xs4;S0.prototype.square=Fs4;S0.prototype.sqrt=function(){var $=S0.ZERO.setBit(this.bitLength()/2),Y=$;for(;;){var X=$.add(this.divide($)).shiftRight(1);if(X.equals($)||X.equals(Y))return X;Y=$,$=X}};/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
 */function tZ0(){this.i=0,this.j=0,this.S=[]}function bs4($){var Y,X,G;for(Y=0;Y<256;++Y)this.S[Y]=Y;X=0;for(Y=0;Y<256;++Y)X=X+this.S[Y]+$[Y%$.length]&255,G=this.S[Y],this.S[Y]=this.S[X],this.S[X]=G;this.i=0,this.j=0}function hs4(){var $;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,$=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=$,this.S[$+this.S[this.i]&255]}tZ0.prototype.init=bs4;tZ0.prototype.next=hs4;function fs4(){return new tZ0}var ck=256;/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
 */var rn,pJ,A7;function gs4($){if(pJ[A7++]^=$&255,pJ[A7++]^=$>>8&255,pJ[A7++]^=$>>16&255,pJ[A7++]^=$>>24&255,A7>=ck)A7-=ck}function _G1(){gs4(new Date().getTime())}if(pJ==null){if(pJ=[],A7=0,typeof Fq<"u"&&(Fq.crypto!==void 0||Fq.msCrypto!==void 0)){if(cU=Fq.crypto||Fq.msCrypto,cU.getRandomValues){an=new Uint8Array(32),cU.getRandomValues(an);for(KX=0;KX<32;++KX)pJ[A7++]=an[KX]}else if(lk.appName=="Netscape"&&lk.appVersion<"5"){sn=Fq.crypto.random(32);for(KX=0;KX<sn.length;++KX)pJ[A7++]=sn.charCodeAt(KX)&255}}if(A7<ck&&typeof globalThis<"u"&&globalThis.crypto&&globalThis.crypto.getRandomValues){pk=new Uint8Array(ck-A7),globalThis.crypto.getRandomValues(pk);for(KX=0;KX<pk.length;++KX)pJ[A7++]=pk[KX]}while(A7<ck)KX=Math.floor(65536*Math.random()),pJ[A7++]=KX>>>8,pJ[A7++]=KX&255;A7=0,_G1()}var KX,cU,an,sn,pk;function ms4(){if(rn==null){_G1(),rn=fs4(),rn.init(pJ);for(A7=0;A7<pJ.length;++A7)pJ[A7]=0;A7=0}return rn.next()}function us4($){var Y;for(Y=0;Y<$.length;++Y)$[Y]=ms4()}function nk(){}nk.prototype.nextBytes=us4;/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
 */function dJ($,Y){return new S0($,Y)}function F6(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}function ps4($,Y){if(this.isPublic=!0,this.isPrivate=!1,typeof $!=="string")this.n=$,this.e=Y;else if($!=null&&Y!=null&&$.length>0&&Y.length>0)this.n=dJ($,16),this.e=parseInt(Y,16);else throw"Invalid RSA public key";if(this.n==null||typeof this.n.compareTo!=="function"||this.n.compareTo(S0.ONE)<=0||this.e==null||isNaN(this.e)||this.e<=0)throw"Invalid RSA public key"}function ds4($){return $.modPowInt(this.e,this.n)}F6.prototype.doPublic=ds4;F6.prototype.setPublic=ps4;F6.prototype.type="RSA";/*! (c) Tom Wu, Kenji Urushima | http://www-cs-students.stanford.edu/~tjw/jsbn/
 */function cs4($,Y,X){if(this.isPrivate=!0,typeof $!=="string")this.n=$,this.e=Y,this.d=X;else if($!=null&&Y!=null&&$.length>0&&Y.length>0)this.n=dJ($,16),this.e=parseInt(Y,16),this.d=dJ(X,16);else throw"Invalid RSA private key"}function ls4($,Y,X,G,J,Q,W,K){if(this.isPrivate=!0,this.isPublic=!1,$==null)throw"RSASetPrivateEx N == null";if(Y==null)throw"RSASetPrivateEx E == null";if($.length==0)throw"RSASetPrivateEx N.length == 0";if(Y.length==0)throw"RSASetPrivateEx E.length == 0";if($!=null&&Y!=null&&$.length>0&&Y.length>0)this.n=dJ($,16),this.e=parseInt(Y,16),this.d=dJ(X,16),this.p=dJ(G,16),this.q=dJ(J,16),this.dmp1=dJ(Q,16),this.dmq1=dJ(W,16),this.coeff=dJ(K,16);else throw"Invalid RSA private key in RSASetPrivateEx"}function is4($,Y){var X=new nk,G=$>>1;this.e=parseInt(Y,16);var J=new S0(Y,16),Q=$/2-100,W=S0.ONE.shiftLeft(Q);for(;;){for(;;)if(this.p=new S0($-G,1,X),this.p.subtract(S0.ONE).gcd(J).compareTo(S0.ONE)==0&&this.p.isProbablePrime(10))break;for(;;)if(this.q=new S0(G,1,X),this.q.subtract(S0.ONE).gcd(J).compareTo(S0.ONE)==0&&this.q.isProbablePrime(10))break;if(this.p.compareTo(this.q)<=0){var K=this.p;this.p=this.q,this.q=K}var Z=this.q.subtract(this.p).abs();if(Z.bitLength()<Q||Z.compareTo(W)<=0)continue;var H=this.p.subtract(S0.ONE),z=this.q.subtract(S0.ONE),V=H.multiply(z);if(V.gcd(J).compareTo(S0.ONE)==0){if(this.n=this.p.multiply(this.q),this.n.bitLength()==$){this.d=J.modInverse(V),this.dmp1=this.d.mod(H),this.dmq1=this.d.mod(z),this.coeff=this.q.modInverse(this.p);break}}}this.isPrivate=!0}function ns4($){if(this.p==null||this.q==null)return $.modPow(this.d,this.n);var Y=$.mod(this.p).modPow(this.dmp1,this.p),X=$.mod(this.q).modPow(this.dmq1,this.q);while(Y.compareTo(X)<0)Y=Y.add(this.p);return Y.subtract(X).multiply(this.coeff).mod(this.p).multiply(this.q).add(X)}F6.prototype.doPrivate=ns4;F6.prototype.setPrivate=cs4;F6.prototype.setPrivateEx=ls4;F6.prototype.generate=is4;/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
 */function IY($,Y){this.x=Y,this.q=$}function rs4($){if($==this)return!0;return this.q.equals($.q)&&this.x.equals($.x)}function as4(){return this.x}function ss4(){return new IY(this.q,this.x.negate().mod(this.q))}function os4($){return new IY(this.q,this.x.add($.toBigInteger()).mod(this.q))}function ts4($){return new IY(this.q,this.x.subtract($.toBigInteger()).mod(this.q))}function es4($){return new IY(this.q,this.x.multiply($.toBigInteger()).mod(this.q))}function $o4(){return new IY(this.q,this.x.square().mod(this.q))}function Yo4($){return new IY(this.q,this.x.multiply($.toBigInteger().modInverse(this.q)).mod(this.q))}IY.prototype.equals=rs4;IY.prototype.toBigInteger=as4;IY.prototype.negate=ss4;IY.prototype.add=os4;IY.prototype.subtract=ts4;IY.prototype.multiply=es4;IY.prototype.square=$o4;IY.prototype.divide=Yo4;IY.prototype.sqrt=function(){return new IY(this.q,this.x.sqrt().mod(this.q))};function Q9($,Y,X,G){if(this.curve=$,this.x=Y,this.y=X,G==null)this.z=S0.ONE;else this.z=G;this.zinv=null}function Xo4(){if(this.zinv==null)this.zinv=this.z.modInverse(this.curve.q);return this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))}function Go4(){if(this.zinv==null)this.zinv=this.z.modInverse(this.curve.q);return this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))}function Jo4($){if($==this)return!0;if(this.isInfinity())return $.isInfinity();if($.isInfinity())return this.isInfinity();var Y,X;if(Y=$.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply($.z)).mod(this.curve.q),!Y.equals(S0.ZERO))return!1;return X=$.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply($.z)).mod(this.curve.q),X.equals(S0.ZERO)}function Qo4(){if(this.x==null&&this.y==null)return!0;return this.z.equals(S0.ZERO)&&!this.y.toBigInteger().equals(S0.ZERO)}function Wo4(){return new Q9(this.curve,this.x,this.y.negate(),this.z)}function Ko4($){if(this.isInfinity())return $;if($.isInfinity())return this;var Y=$.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply($.z)).mod(this.curve.q),X=$.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply($.z)).mod(this.curve.q);if(S0.ZERO.equals(X)){if(S0.ZERO.equals(Y))return this.twice();return this.curve.getInfinity()}var G=new S0("3"),J=this.x.toBigInteger(),Q=this.y.toBigInteger(),W=$.x.toBigInteger(),K=$.y.toBigInteger(),Z=X.square(),H=Z.multiply(X),z=J.multiply(Z),V=Y.square().multiply(this.z),F=V.subtract(z.shiftLeft(1)).multiply($.z).subtract(H).multiply(X).mod(this.curve.q),L=z.multiply(G).multiply(Y).subtract(Q.multiply(H)).subtract(V.multiply(Y)).multiply($.z).add(Y.multiply(H)).mod(this.curve.q),N=H.multiply(this.z).multiply($.z).mod(this.curve.q);return new Q9(this.curve,this.curve.fromBigInteger(F),this.curve.fromBigInteger(L),N)}function Zo4(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var $=new S0("3"),Y=this.x.toBigInteger(),X=this.y.toBigInteger(),G=X.multiply(this.z),J=G.multiply(X).mod(this.curve.q),Q=this.curve.a.toBigInteger(),W=Y.square().multiply($);if(!S0.ZERO.equals(Q))W=W.add(this.z.square().multiply(Q));W=W.mod(this.curve.q);var K=W.square().subtract(Y.shiftLeft(3).multiply(J)).shiftLeft(1).multiply(G).mod(this.curve.q),Z=W.multiply($).multiply(Y).subtract(J.shiftLeft(1)).shiftLeft(2).multiply(J).subtract(W.square().multiply(W)).mod(this.curve.q),H=G.square().multiply(G).shiftLeft(3).mod(this.curve.q);return new Q9(this.curve,this.curve.fromBigInteger(K),this.curve.fromBigInteger(Z),H)}function Uo4($){if(this.isInfinity())return this;if($.signum()==0)return this.curve.getInfinity();var Y=$,X=Y.multiply(new S0("3")),G=this.negate(),J=this,Q=this.curve.q.subtract($),W=Q.multiply(new S0("3")),K=new Q9(this.curve,this.x,this.y),Z=K.negate(),H;for(H=X.bitLength()-2;H>0;--H){J=J.twice();var z=X.testBit(H),V=Y.testBit(H);if(z!=V)J=J.add(z?this:G)}for(H=W.bitLength()-2;H>0;--H){K=K.twice();var F=W.testBit(H),L=Q.testBit(H);if(F!=L)K=K.add(F?K:Z)}return J}function Ho4($,Y,X){var G;if($.bitLength()>X.bitLength())G=$.bitLength()-1;else G=X.bitLength()-1;var J=this.curve.getInfinity(),Q=this.add(Y);while(G>=0){if(J=J.twice(),$.testBit(G))if(X.testBit(G))J=J.add(Q);else J=J.add(this);else if(X.testBit(G))J=J.add(Y);--G}return J}Q9.prototype.getX=Xo4;Q9.prototype.getY=Go4;Q9.prototype.equals=Jo4;Q9.prototype.isInfinity=Qo4;Q9.prototype.negate=Wo4;Q9.prototype.add=Ko4;Q9.prototype.twice=Zo4;Q9.prototype.multiply=Uo4;Q9.prototype.multiplyTwo=Ho4;function OF($,Y,X){this.q=$,this.a=this.fromBigInteger(Y),this.b=this.fromBigInteger(X),this.infinity=new Q9(this,null,null)}function zo4(){return this.q}function Vo4(){return this.a}function Fo4(){return this.b}function Lo4($){if($==this)return!0;return this.q.equals($.q)&&this.a.equals($.a)&&this.b.equals($.b)}function Do4(){return this.infinity}function No4($){return new IY(this.q,$)}function Ao4($){switch(parseInt($.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:var Y=$.substr(0,2),X=$.substr(2),G=this.fromBigInteger(new S0(H,16)),J=this.getA(),Q=this.getB(),W=G.square().add(J).multiply(G).add(Q),K=W.sqrt();if(Y=="03")K=K.negate();return new Q9(this,G,K);case 4:case 6:case 7:var Z=($.length-2)/2,H=$.substr(2,Z),z=$.substr(Z+2,Z);return new Q9(this,this.fromBigInteger(new S0(H,16)),this.fromBigInteger(new S0(z,16)));default:return null}}OF.prototype.getQ=zo4;OF.prototype.getA=Vo4;OF.prototype.getB=Fo4;OF.prototype.equals=Lo4;OF.prototype.getInfinity=Do4;OF.prototype.fromBigInteger=No4;OF.prototype.decodePointHex=Ao4;/*! (c) Stefan Thomas | https://github.com/bitcoinjs/bitcoinjs-lib
 */IY.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)};Q9.prototype.getEncoded=function($){var Y=function(Q,W){var K=Q.toByteArrayUnsigned();if(W<K.length)K=K.slice(K.length-W);else while(W>K.length)K.unshift(0);return K},X=this.getX().toBigInteger(),G=this.getY().toBigInteger(),J=Y(X,32);if($)if(G.isEven())J.unshift(2);else J.unshift(3);else J.unshift(4),J=J.concat(Y(G,32));return J};Q9.decodeFrom=function($,Y){var X=Y[0],G=Y.length-1,J=Y.slice(1,1+G/2),Q=Y.slice(1+G/2,1+G);J.unshift(0),Q.unshift(0);var W=new S0(J),K=new S0(Q);return new Q9($,$.fromBigInteger(W),$.fromBigInteger(K))};Q9.decodeFromHex=function($,Y){var X=Y.substr(0,2),G=Y.length-2,J=Y.substr(2,G/2),Q=Y.substr(2+G/2,G/2),W=new S0(J,16),K=new S0(Q,16);return new Q9($,$.fromBigInteger(W),$.fromBigInteger(K))};Q9.prototype.add2D=function($){if(this.isInfinity())return $;if($.isInfinity())return this;if(this.x.equals($.x)){if(this.y.equals($.y))return this.twice();return this.curve.getInfinity()}var Y=$.x.subtract(this.x),X=$.y.subtract(this.y),G=X.divide(Y),J=G.square().subtract(this.x).subtract($.x),Q=G.multiply(this.x.subtract(J)).subtract(this.y);return new Q9(this.curve,J,Q)};Q9.prototype.twice2D=function(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var $=this.curve.fromBigInteger(S0.valueOf(2)),Y=this.curve.fromBigInteger(S0.valueOf(3)),X=this.x.square().multiply(Y).add(this.curve.a).divide(this.y.multiply($)),G=X.square().subtract(this.x.multiply($)),J=X.multiply(this.x.subtract(G)).subtract(this.y);return new Q9(this.curve,G,J)};Q9.prototype.multiply2D=function($){if(this.isInfinity())return this;if($.signum()==0)return this.curve.getInfinity();var Y=$,X=Y.multiply(new S0("3")),G=this.negate(),J=this,Q;for(Q=X.bitLength()-2;Q>0;--Q){J=J.twice();var W=X.testBit(Q),K=Y.testBit(Q);if(W!=K)J=J.add2D(W?this:G)}return J};Q9.prototype.isOnCurve=function(){var $=this.getX().toBigInteger(),Y=this.getY().toBigInteger(),X=this.curve.getA().toBigInteger(),G=this.curve.getB().toBigInteger(),J=this.curve.getQ(),Q=Y.multiply(Y).mod(J),W=$.multiply($).multiply($).add(X.multiply($)).add(G).mod(J);return Q.equals(W)};Q9.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"};Q9.prototype.validate=function(){var $=this.curve.getQ();if(this.isInfinity())throw Error("Point is at infinity.");var Y=this.getX().toBigInteger(),X=this.getY().toBigInteger();if(Y.compareTo(S0.ONE)<0||Y.compareTo($.subtract(S0.ONE))>0)throw Error("x coordinate out of bounds");if(X.compareTo(S0.ONE)<0||X.compareTo($.subtract(S0.ONE))>0)throw Error("y coordinate out of bounds");if(!this.isOnCurve())throw Error("Point is not on the curve.");if(this.multiply($).isInfinity())throw Error("Point is not a scalar multiple of G.");return!0};/*! Mike Samuel (c) 2009 | code.google.com/p/json-sans-eval
 */var jG1=function(){var $="(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)",Y='(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))',X='(?:"'+Y+'*")',G=new RegExp("(?:false|true|null|[\\{\\}\\[\\]]|"+$+"|"+X+")","g"),J=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),Q={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:`
`,r:"\r",t:"\t"};function W(V,F,L){return F?Q[F]:String.fromCharCode(parseInt(L,16))}var K=new String(""),Z="\\",H={"{":Object,"[":Array},z=Object.hasOwnProperty;return function(V,F){var L=V.match(G),N,D=L[0],A=!1;if(D==="{")N={};else if(D==="[")N=[];else N=[],A=!0;var B,O=[N];for(var E=1-A,M=L.length;E<M;++E){D=L[E];var R;switch(D.charCodeAt(0)){default:R=O[0],R[B||R.length]=+D,B=void 0;break;case 34:if(D=D.substring(1,D.length-1),D.indexOf(Z)!==-1)D=D.replace(J,W);if(R=O[0],!B)if(R instanceof Array)B=R.length;else{B=D||K;break}R[B]=D,B=void 0;break;case 91:R=O[0],O.unshift(R[B||R.length]=[]),B=void 0;break;case 93:O.shift();break;case 102:R=O[0],R[B||R.length]=!1,B=void 0;break;case 110:R=O[0],R[B||R.length]=null,B=void 0;break;case 116:R=O[0],R[B||R.length]=!0,B=void 0;break;case 123:R=O[0],O.unshift(R[B||R.length]={}),B=void 0;break;case 125:O.shift();break}}if(A){if(O.length!==1)throw Error();N=N[0]}else if(O.length)throw Error();if(F){var q=function(_,P){var w=_[P];if(w&&typeof w==="object"){var j=null;for(var C in w)if(z.call(w,C)&&w!==_){var k=q(w,C);if(k!==void 0)w[C]=k;else{if(!j)j=[];j.push(C)}}if(j)for(var S=j.length;--S>=0;)delete w[j[S]]}return F.call(_,P,w)};N=q({"":N},"")}return N}}();if(typeof l>"u"||!l)l={};if(typeof l.asn1>"u"||!l.asn1)l.asn1={};l.asn1.ASN1Util=new function(){this.integerToByteHex=function($){var Y=$.toString(16);if(Y.length%2==1)Y="0"+Y;return Y},this.bigIntToMinTwosComplementsHex=function($){return Yr($)},this.getPEMStringFromHex=function($,Y){return RG($,Y)},this.newObject=function($){var Y=l,X=Y.asn1,G=X.ASN1Object,J=X.DERBoolean,Q=X.DERInteger,W=X.DERBitString,K=X.DEROctetString,Z=X.DERNull,H=X.DERObjectIdentifier,z=X.DEREnumerated,V=X.DERUTF8String,F=X.DERNumericString,L=X.DERPrintableString,N=X.DERTeletexString,D=X.DERIA5String,A=X.DERUTCTime,B=X.DERGeneralizedTime,O=X.DERVisibleString,E=X.DERBMPString,M=X.DERSequence,R=X.DERSet,q=X.DERTaggedObject,_=X.ASN1Util.newObject;if($ instanceof X.ASN1Object)return $;var P=Object.keys($);if(P.length!=1)throw Error("key of param shall be only one.");var w=P[0];if(":asn1:bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:visstr:bmpstr:seq:set:tag:".indexOf(":"+w+":")==-1)throw Error("undefined key: "+w);if(w=="bool")return new J($[w]);if(w=="int")return new Q($[w]);if(w=="bitstr")return new W($[w]);if(w=="octstr")return new K($[w]);if(w=="null")return new Z($[w]);if(w=="oid")return new H($[w]);if(w=="enum")return new z($[w]);if(w=="utf8str")return new V($[w]);if(w=="numstr")return new F($[w]);if(w=="prnstr")return new L($[w]);if(w=="telstr")return new N($[w]);if(w=="ia5str")return new D($[w]);if(w=="utctime")return new A($[w]);if(w=="gentime")return new B($[w]);if(w=="visstr")return new O($[w]);if(w=="bmpstr")return new E($[w]);if(w=="asn1")return new G($[w]);if(w=="seq"){var j=$[w],C=[];for(var k=0;k<j.length;k++){var S=_(j[k]);C.push(S)}return new M({array:C})}if(w=="set"){var j=$[w],C=[];for(var k=0;k<j.length;k++){var S=_(j[k]);C.push(S)}return new R({array:C})}if(w=="tag"){var I=$[w];if(Object.prototype.toString.call(I)==="[object Array]"&&I.length==3){var v=_(I[2]);return new q({tag:I[0],explicit:I[1],obj:v})}else return new q(I)}},this.jsonToASN1HEX=function($){var Y=this.newObject($);return Y.tohex()}};l.asn1.ASN1Util.oidHexToInt=function($){var J="",Y=parseInt($.substr(0,2),16),X=Math.floor(Y/40),G=Y%40,J=X+"."+G,Q="";for(var W=2;W<$.length;W+=2){var K=parseInt($.substr(W,2),16),Z=("00000000"+K.toString(2)).slice(-8);if(Q=Q+Z.substr(1,7),Z.substr(0,1)=="0"){var H=new S0(Q,2);J=J+"."+H.toString(10),Q=""}}return J};l.asn1.ASN1Util.oidIntToHex=function($){var Y=function(K){var Z=K.toString(16);if(Z.length==1)Z="0"+Z;return Z},X=function(K){var Z="",H=new S0(K,10),z=H.toString(2),V=7-z.length%7;if(V==7)V=0;var F="";for(var L=0;L<V;L++)F+="0";z=F+z;for(var L=0;L<z.length-1;L+=7){var N=z.substr(L,7);if(L!=z.length-7)N="1"+N;Z+=Y(parseInt(N,2))}return Z};if(!$.match(/^[0-9.]+$/))throw"malformed oid string: "+$;var G="",J=$.split("."),Q=parseInt(J[0])*40+parseInt(J[1]);G+=Y(Q),J.splice(0,2);for(var W=0;W<J.length;W++)G+=X(J[W]);return G};l.asn1.ASN1Object=function($){var Y=!0,X=null,G="00",J="00",Q="";if(this.params=null,this.getLengthHexFromValue=function(){if(typeof this.hV>"u"||this.hV==null)throw Error("this.hV is null or undefined");if(this.hV.length%2==1)throw Error("value hex must be even length: n="+Q.length+",v="+this.hV);var W=this.hV.length/2,K=W.toString(16);if(K.length%2==1)K="0"+K;if(W<128)return K;else{var Z=K.length/2;if(Z>15)throw Error("ASN.1 length too long to represent by 8x: n = "+W.toString(16));var H=128+Z;return H.toString(16)+K}},this.tohex=function(){if(this.hTLV==null||this.isModified)this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1;return this.hTLV},this.getEncodedHex=function(){return this.tohex()},this.getValueHex=function(){return this.tohex(),this.hV},this.getFreshValueHex=function(){return""},this.setByParam=function(W){this.params=W},$!=null){if($.tlv!=null)this.hTLV=$.tlv,this.isModified=!1}};l.asn1.DERAbstractString=function($){l.asn1.DERAbstractString.superclass.constructor.call(this);var Y=null,X=null;if(this.getString=function(){return this.s},this.setString=function(G){this.hTLV=null,this.isModified=!0,this.s=G,this.hV=YU0(this.s).toLowerCase()},this.setStringHex=function(G){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=G},this.getFreshValueHex=function(){return this.hV},typeof $<"u"){if(typeof $=="string")this.setString($);else if(typeof $.str<"u")this.setString($.str);else if(typeof $.hex<"u")this.setStringHex($.hex)}};X1(l.asn1.DERAbstractString,l.asn1.ASN1Object);l.asn1.DERAbstractTime=function($){l.asn1.DERAbstractTime.superclass.constructor.call(this);var Y=null,X=null;this.localDateToUTC=function(G){var J=G.getTime()+G.getTimezoneOffset()*60000,Q=new Date(J);return Q},this.formatDate=function(G,J,Q){var W=this.zeroPadding,K=this.localDateToUTC(G),Z=String(K.getFullYear());if(J=="utc")Z=Z.substr(2,2);var H=W(String(K.getMonth()+1),2),z=W(String(K.getDate()),2),V=W(String(K.getHours()),2),F=W(String(K.getMinutes()),2),L=W(String(K.getSeconds()),2),N=Z+H+z+V+F+L;if(Q===!0){var D=K.getMilliseconds();if(D!=0){var A=W(String(D),3);A=A.replace(/[0]+$/,""),N=N+"."+A}}return N+"Z"},this.zeroPadding=function(G,J){if(G.length>=J)return G;return Array(J-G.length+1).join("0")+G},this.setByParam=function(G){this.hV=null,this.hTLV=null,this.params=G},this.getString=function(){return},this.setString=function(G){if(this.hTLV=null,this.isModified=!0,this.params==null)this.params={};this.params.str=G},this.setByDate=function(G){if(this.hTLV=null,this.isModified=!0,this.params==null)this.params={};this.params.date=G},this.setByDateValue=function(G,J,Q,W,K,Z){var H=new Date(Date.UTC(G,J-1,Q,W,K,Z,0));this.setByDate(H)},this.getFreshValueHex=function(){return this.hV}};X1(l.asn1.DERAbstractTime,l.asn1.ASN1Object);l.asn1.DERAbstractStructured=function($){l.asn1.DERAbstractString.superclass.constructor.call(this);var Y=null;if(this.setByASN1ObjectArray=function(X){this.hTLV=null,this.isModified=!0,this.asn1Array=X},this.appendASN1Object=function(X){this.hTLV=null,this.isModified=!0,this.asn1Array.push(X)},this.asn1Array=[],typeof $<"u"){if(typeof $.array<"u")this.asn1Array=$.array}};X1(l.asn1.DERAbstractStructured,l.asn1.ASN1Object);l.asn1.DERBoolean=function($){if(l.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",$==!1)this.hTLV="010100";else this.hTLV="0101ff"};X1(l.asn1.DERBoolean,l.asn1.ASN1Object);l.asn1.DERInteger=function($){l.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.params=null;var Y=Yr;if(this.setByBigInteger=function(X){this.isModified=!0,this.params={bigint:X}},this.setByInteger=function(X){this.isModified=!0,this.params=X},this.setValueHex=function(X){this.isModified=!0,this.params={hex:X}},this.getFreshValueHex=function(){var X=this.params,G=null;if(X==null)throw Error("value not set");if(typeof X=="object"&&X.hex!=null)return this.hV=X.hex,this.hV;if(typeof X=="number")G=new S0(String(X),10);else if(X.int!=null)G=new S0(String(X.int),10);else if(X.bigint!=null)G=X.bigint;else throw Error("wrong parameter");return this.hV=Y(G),this.hV},$!=null)this.params=$};X1(l.asn1.DERInteger,l.asn1.ASN1Object);l.asn1.DERBitString=function($){if($!==void 0&&typeof $.obj<"u"){var Y=l.asn1.ASN1Util.newObject($.obj);$.hex="00"+Y.tohex()}if(l.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(X){this.hTLV=null,this.isModified=!0,this.hV=X},this.setUnusedBitsAndHexValue=function(X,G){if(X<0||7<X)throw"unused bits shall be from 0 to 7: u = "+X;var J="0"+X;this.hTLV=null,this.isModified=!0,this.hV=J+G},this.setByBinaryString=function(X){X=X.replace(/0+$/,"");var G=8-X.length%8;if(G==8)G=0;X+="0000000".substr(0,G);var J="";for(var Q=0;Q<X.length-1;Q+=8){var W=X.substr(Q,8),K=parseInt(W,2).toString(16);if(K.length==1)K="0"+K;J+=K}this.hTLV=null,this.isModified=!0,this.hV="0"+G+J},this.setByBooleanArray=function(X){var G="";for(var J=0;J<X.length;J++)if(X[J]==!0)G+="1";else G+="0";this.setByBinaryString(G)},this.newFalseArray=function(X){var G=Array(X);for(var J=0;J<X;J++)G[J]=!1;return G},this.getFreshValueHex=function(){return this.hV},typeof $<"u"){if(typeof $=="string"&&$.toLowerCase().match(/^[0-9a-f]+$/))this.setHexValueIncludingUnusedBits($);else if(typeof $.hex<"u")this.setHexValueIncludingUnusedBits($.hex);else if(typeof $.bin<"u")this.setByBinaryString($.bin);else if(typeof $.array<"u")this.setByBooleanArray($.array)}};X1(l.asn1.DERBitString,l.asn1.ASN1Object);l.asn1.DEROctetString=function($){if($!==void 0&&typeof $.obj<"u"){var Y=l.asn1.ASN1Util.newObject($.obj);$.hex=Y.tohex()}l.asn1.DEROctetString.superclass.constructor.call(this,$),this.hT="04"};X1(l.asn1.DEROctetString,l.asn1.DERAbstractString);l.asn1.DERNull=function(){l.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"};X1(l.asn1.DERNull,l.asn1.ASN1Object);l.asn1.DERObjectIdentifier=function($){if(l.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(Y){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=Y},this.setValueOidString=function(Y){var X=Io4(Y);if(X==null)throw Error("malformed oid string: "+Y);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=X},this.setValueName=function(Y){var X=l.asn1.x509.OID.name2oid(Y);if(X!=="")this.setValueOidString(X);else throw Error("DERObjectIdentifier oidName undefined: "+Y)},this.setValueNameOrOid=function(Y){if(Y.match(/^[0-2].[0-9.]+$/))this.setValueOidString(Y);else this.setValueName(Y)},this.getFreshValueHex=function(){return this.hV},this.setByParam=function(Y){if(typeof Y==="string")this.setValueNameOrOid(Y);else if(Y.oid!==void 0)this.setValueNameOrOid(Y.oid);else if(Y.name!==void 0)this.setValueNameOrOid(Y.name);else if(Y.hex!==void 0)this.setValueHex(Y.hex)},$!==void 0)this.setByParam($)};X1(l.asn1.DERObjectIdentifier,l.asn1.ASN1Object);l.asn1.DEREnumerated=function($){if(l.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(Y){this.hTLV=null,this.isModified=!0,this.hV=Yr(Y)},this.setByInteger=function(Y){var X=new S0(String(Y),10);this.setByBigInteger(X)},this.setValueHex=function(Y){this.hV=Y},this.getFreshValueHex=function(){return this.hV},typeof $<"u"){if(typeof $.int<"u")this.setByInteger($.int);else if(typeof $=="number")this.setByInteger($);else if(typeof $.hex<"u")this.setValueHex($.hex)}};X1(l.asn1.DEREnumerated,l.asn1.ASN1Object);l.asn1.DERUTF8String=function($){l.asn1.DERUTF8String.superclass.constructor.call(this,$),this.hT="0c"};X1(l.asn1.DERUTF8String,l.asn1.DERAbstractString);l.asn1.DERNumericString=function($){l.asn1.DERNumericString.superclass.constructor.call(this,$),this.hT="12"};X1(l.asn1.DERNumericString,l.asn1.DERAbstractString);l.asn1.DERPrintableString=function($){l.asn1.DERPrintableString.superclass.constructor.call(this,$),this.hT="13"};X1(l.asn1.DERPrintableString,l.asn1.DERAbstractString);l.asn1.DERTeletexString=function($){l.asn1.DERTeletexString.superclass.constructor.call(this,$),this.hT="14"};X1(l.asn1.DERTeletexString,l.asn1.DERAbstractString);l.asn1.DERIA5String=function($){l.asn1.DERIA5String.superclass.constructor.call(this,$),this.hT="16"};X1(l.asn1.DERIA5String,l.asn1.DERAbstractString);l.asn1.DERVisibleString=function($){l.asn1.DERIA5String.superclass.constructor.call(this,$),this.hT="1a"};X1(l.asn1.DERVisibleString,l.asn1.DERAbstractString);l.asn1.DERBMPString=function($){l.asn1.DERBMPString.superclass.constructor.call(this,$),this.hT="1e"};X1(l.asn1.DERBMPString,l.asn1.DERAbstractString);l.asn1.DERUTCTime=function($){if(l.asn1.DERUTCTime.superclass.constructor.call(this,$),this.hT="17",this.params=void 0,this.getFreshValueHex=function(){var Y=this.params;if(this.params==null)Y={date:new Date};if(typeof Y=="string")if(Y.match(/^[0-9]{12}Z$/)||Y.match(/^[0-9]{12}\.[0-9]+Z$/))this.hV=yK(Y);else throw Error("malformed string for UTCTime: "+Y);else if(Y.str!=null)this.hV=yK(Y.str);else if(Y.date==null&&Y.millis==!0){var X=new Date;this.hV=yK(this.formatDate(X,"utc",!0))}else if(Y.date!=null&&Y.date instanceof Date){var G=Y.millis===!0;this.hV=yK(this.formatDate(Y.date,"utc",G))}else if(Y instanceof Date)this.hV=yK(this.formatDate(Y,"utc"));if(this.hV==null)throw Error("parameter not specified properly for UTCTime");return this.hV},$!=null)this.setByParam($)};X1(l.asn1.DERUTCTime,l.asn1.DERAbstractTime);l.asn1.DERGeneralizedTime=function($){if(l.asn1.DERGeneralizedTime.superclass.constructor.call(this,$),this.hT="18",this.params=$,this.getFreshValueHex=function(){var Y=this.params;if(this.params==null)Y={date:new Date};if(typeof Y=="string")if(Y.match(/^[0-9]{14}Z$/)||Y.match(/^[0-9]{14}\.[0-9]+Z$/))this.hV=yK(Y);else throw Error("malformed string for GeneralizedTime: "+Y);else if(Y.str!=null)this.hV=yK(Y.str);else if(Y.date==null&&Y.millis==!0){var X=new Date;this.hV=yK(this.formatDate(X,"gen",!0))}else if(Y.date!=null&&Y.date instanceof Date){var G=Y.millis===!0;this.hV=yK(this.formatDate(Y.date,"gen",G))}else if(Y instanceof Date)this.hV=yK(this.formatDate(Y,"gen"));if(this.hV==null)throw Error("parameter not specified properly for GeneralizedTime");return this.hV},$!=null)this.setByParam($)};X1(l.asn1.DERGeneralizedTime,l.asn1.DERAbstractTime);l.asn1.DERSequence=function($){l.asn1.DERSequence.superclass.constructor.call(this,$),this.hT="30",this.getFreshValueHex=function(){var Y="";for(var X=0;X<this.asn1Array.length;X++){var G=this.asn1Array[X];Y+=G.tohex()}return this.hV=Y,this.hV}};X1(l.asn1.DERSequence,l.asn1.DERAbstractStructured);l.asn1.DERSet=function($){if(l.asn1.DERSet.superclass.constructor.call(this,$),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){var Y=[];for(var X=0;X<this.asn1Array.length;X++){var G=this.asn1Array[X];Y.push(G.tohex())}if(this.sortFlag==!0)Y.sort();return this.hV=Y.join(""),this.hV},typeof $<"u"){if(typeof $.sortflag<"u"&&$.sortflag==!1)this.sortFlag=!1}};X1(l.asn1.DERSet,l.asn1.DERAbstractStructured);l.asn1.DERTaggedObject=function($){l.asn1.DERTaggedObject.superclass.constructor.call(this);var Y=l.asn1,X=M1,G=X.getV,J=X.isASN1HEX,Q=Y.ASN1Util.newObject;if(this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.params={tag:"a0",explicit:!0},this.setASN1Object=function(W,K,Z){this.params={tag:K,explicit:W,obj:Z}},this.getFreshValueHex=function(){var W=this.params;if(W.explicit==null)W.explicit=!0;if(W.tage!=null)W.tag=W.tage,W.explicit=!0;if(W.tagi!=null)W.tag=W.tagi,W.explicit=!1;if(W.str!=null)this.hV=YU0(W.str);else if(W.hex!=null)this.hV=W.hex;else if(W.obj!=null){var K;if(W.obj instanceof Y.ASN1Object)K=W.obj.tohex();else if(typeof W.obj=="object")K=Q(W.obj).tohex();if(W.explicit)this.hV=K;else this.hV=G(K,0)}else throw Error("str, hex nor obj not specified");if(W.tag==null)W.tag="a0";return this.hT=W.tag,this.hTLV=null,this.isModified=!0,this.hV},this.setByParam=function(W){this.params=W},$!==void 0)this.setByParam($)};X1(l.asn1.DERTaggedObject,l.asn1.ASN1Object);var M1=new function(){};M1.getLblen=function($,Y){if($.substr(Y+2,1)!="8")return 1;var X=parseInt($.substr(Y+3,1));if(X==0)return-1;if(0<X&&X<10)return X+1;return-2};M1.getL=function($,Y){var X=M1.getLblen($,Y);if(X<1)return"";return $.substr(Y+2,X*2)};M1.getVblen=function($,Y){var X,G;if(X=M1.getL($,Y),X=="")return-1;if(X.substr(0,1)==="8")G=new S0(X.substr(2),16);else G=new S0(X,16);return G.intValue()};M1.getVidx=function($,Y){var X=M1.getLblen($,Y);if(X<0)return X;return Y+(X+1)*2};M1.getV=function($,Y){var X=M1.getVidx($,Y),G=M1.getVblen($,Y);return $.substr(X,G*2)};M1.getTLV=function($,Y){return $.substr(Y,2)+M1.getL($,Y)+M1.getV($,Y)};M1.getTLVblen=function($,Y){return 2+M1.getLblen($,Y)*2+M1.getVblen($,Y)*2};M1.getNextSiblingIdx=function($,Y){var X=M1.getVidx($,Y),G=M1.getVblen($,Y);return X+G*2};M1.getChildIdx=function($,Y){var X=M1,G=[],J,Q,W;if(J=X.getVidx($,Y),Q=X.getVblen($,Y)*2,J+Q>$.length)throw Error("too short ASN.1 value");if($.substr(Y,2)=="03")J+=2,Q-=2;W=0;var K=J;while(W<=Q){var Z=X.getTLVblen($,K);if(Z<=0)throw Error("malformed ASN.1: invalid TLV length");if(W+=Z,W<=Q)G.push(K);if(K+=Z,W>=Q)break}return G};M1.getNthChildIdx=function($,Y,X){var G=M1.getChildIdx($,Y);return G[X]};M1.getIdxbyList=function($,Y,X,G){var J=M1,Q,W;if(X.length==0){if(G!==void 0){if($.substr(Y,2)!==G)return-1}return Y}if(Q=X.shift(),W=J.getChildIdx($,Y),Q>=W.length)return-1;return J.getIdxbyList($,W[Q],X,G)};M1.getIdxbyListEx=function($,Y,X,G){var J=M1,Q,W;if(X.length==0){if(G!==void 0){if($.substr(Y,2)!==G)return-1}return Y}Q=X.shift(),W=J.getChildIdx($,Y);var K=0;for(var Z=0;Z<W.length;Z++){var H=$.substr(W[Z],2);if(typeof Q=="number"&&!J.isContextTag(H)&&K==Q||typeof Q=="string"&&J.isContextTag(H,Q))return J.getIdxbyListEx($,W[Z],X,G);if(!J.isContextTag(H))K++}return-1};M1.getTLVbyList=function($,Y,X,G){var J=M1,Q=J.getIdxbyList($,Y,X,G);if(Q==-1)return null;if(Q>=$.length)return null;return J.getTLV($,Q)};M1.getTLVbyListEx=function($,Y,X,G){var J=M1,Q=J.getIdxbyListEx($,Y,X,G);if(Q==-1)return null;return J.getTLV($,Q)};M1.getVbyList=function($,Y,X,G,J){var Q=M1,W,K;if(W=Q.getIdxbyList($,Y,X,G),W==-1)return null;if(W>=$.length)return null;if(K=Q.getV($,W),J===!0)K=K.substr(2);return K};M1.getVbyListEx=function($,Y,X,G,J){var Q=M1,W,K,Z;if(W=Q.getIdxbyListEx($,Y,X,G),W==-1)return null;if(Z=Q.getV($,W),$.substr(W,2)=="03"&&J!==!1)Z=Z.substr(2);return Z};M1.getInt=function($,Y,X){if(X==null)X=-1;try{var G=$.substr(Y,2);if(G!="02"&&G!="03")return X;var J=M1.getV($,Y);if(G=="02")return parseInt(J,16);else return So4(J)}catch(Q){return X}};M1.getOID=function($,Y,X){if(X==null)X=null;try{if($.substr(Y,2)!="06")return X;var G=M1.getV($,Y);return XU0(G)}catch(J){return X}};M1.getOIDName=function($,Y,X){if(X==null)X=null;try{var G=M1.getOID($,Y,X);if(G==X)return X;var J=l.asn1.x509.OID.oid2name(G);if(J=="")return G;return J}catch(Q){return X}};M1.getString=function($,Y,X){if(X==null)X=null;try{var G=M1.getV($,Y);return iU(G)}catch(J){return X}};M1.hextooidstr=function($){var Y=function(V,F){if(V.length>=F)return V;return Array(F-V.length+1).join("0")+V},X=[],G=$.substr(0,2),J=parseInt(G,16);X[0]=new String(Math.floor(J/40)),X[1]=new String(J%40);var Q=$.substr(2),W=[];for(var K=0;K<Q.length/2;K++)W.push(parseInt(Q.substr(K*2,2),16));var Z=[],H="";for(var K=0;K<W.length;K++)if(W[K]&128)H=H+Y((W[K]&127).toString(2),7);else H=H+Y((W[K]&127).toString(2),7),Z.push(new String(parseInt(H,2))),H="";var z=X.join(".");if(Z.length>0)z=z+"."+Z.join(".");return z};M1.dump=function($,Y,X,G){var J=M1,Q=J.getV,W=J.dump,K=J.getChildIdx,Z=$;if($ instanceof l.asn1.ASN1Object)Z=$.tohex();var H=function(_,P){if(_.length<=P*2)return _;else{var w=_.substr(0,P)+"..(total "+_.length/2+"bytes).."+_.substr(_.length-P,P);return w}};if(Y===void 0)Y={ommit_long_octet:32};if(X===void 0)X=0;if(G===void 0)G="";var z=Y.ommit_long_octet,R=Z.substr(X,2);if(R=="01"){var V=Q(Z,X);if(V=="00")return G+`BOOLEAN FALSE
`;else return G+`BOOLEAN TRUE
`}if(R=="02"){var V=Q(Z,X);return G+"INTEGER "+H(V,z)+`
`}if(R=="03"){var V=Q(Z,X);if(J.isASN1HEX(V.substr(2))){var F=G+`BITSTRING, encapsulates
`;return F=F+W(V.substr(2),Y,0,G+"  "),F}else return G+"BITSTRING "+H(V,z)+`
`}if(R=="04"){var V=Q(Z,X);if(J.isASN1HEX(V)){var F=G+`OCTETSTRING, encapsulates
`;return F=F+W(V,Y,0,G+"  "),F}else return G+"OCTETSTRING "+H(V,z)+`
`}if(R=="05")return G+`NULL
`;if(R=="06"){var L=Q(Z,X),N=l.asn1.ASN1Util.oidHexToInt(L),D=l.asn1.x509.OID.oid2name(N),A=N.replace(/\./g," ");if(D!="")return G+"ObjectIdentifier "+D+" ("+A+`)
`;else return G+"ObjectIdentifier ("+A+`)
`}if(R=="0a")return G+"ENUMERATED "+parseInt(Q(Z,X))+`
`;if(R=="0c")return G+"UTF8String '"+S9(Q(Z,X))+`'
`;if(R=="13")return G+"PrintableString '"+S9(Q(Z,X))+`'
`;if(R=="14")return G+"TeletexString '"+S9(Q(Z,X))+`'
`;if(R=="16")return G+"IA5String '"+S9(Q(Z,X))+`'
`;if(R=="17")return G+"UTCTime "+S9(Q(Z,X))+`
`;if(R=="18")return G+"GeneralizedTime "+S9(Q(Z,X))+`
`;if(R=="1a")return G+"VisualString '"+S9(Q(Z,X))+`'
`;if(R=="1e")return G+"BMPString '"+SG1(Q(Z,X))+`'
`;if(R=="30"){if(Z.substr(X,4)=="3000")return G+`SEQUENCE {}
`;var F=G+`SEQUENCE
`,B=K(Z,X),O=Y;if((B.length==2||B.length==3)&&Z.substr(B[0],2)=="06"&&Z.substr(B[B.length-1],2)=="04"){var D=J.oidname(Q(Z,B[0])),E=JSON.parse(JSON.stringify(Y));E.x509ExtName=D,O=E}for(var M=0;M<B.length;M++)F=F+W(Z,O,B[M],G+"  ");return F}if(R=="31"){var F=G+`SET
`,B=K(Z,X);for(var M=0;M<B.length;M++)F=F+W(Z,Y,B[M],G+"  ");return F}var R=parseInt(R,16);if((R&128)!=0){var q=R&31;if((R&32)!=0){var F=G+"["+q+`]
`,B=K(Z,X);for(var M=0;M<B.length;M++)F=F+W(Z,Y,B[M],G+"  ");return F}else{var V=Q(Z,X);if(M1.isASN1HEX(V)){var F=G+"["+q+`]
`;return F=F+W(V,Y,0,G+"  "),F}else if(V.substr(0,8)=="68747470")V=S9(V);else if(Y.x509ExtName==="subjectAltName"&&q==2)V=S9(V);var F=G+"["+q+"] "+V+`
`;return F}}return G+"UNKNOWN("+R+") "+Q(Z,X)+`
`};M1.parse=function($){var Y=M1,X=Y.parse,G=Y.isASN1HEX,J=Y.getV,Q=Y.getTLV,W=Y.getChildIdx,K=l.asn1,Z=K.ASN1Util.oidHexToInt,H=K.x509.OID.oid2name,z=S9,V=SG1,F=Oo4,L={"0c":"utf8str","12":"numstr","13":"prnstr","14":"telstr","16":"ia5str","17":"utctime","18":"gentime","1a":"visstr","1e":"bmpstr","30":"seq","31":"set"},N=function(w){var j=[],C=W(w,0);for(var k=0;k<C.length;k++){var S=C[k],I=Q(w,S),v=X(I);j.push(v)}return j},D=$.substr(0,2),A={},B=J($,0);if(D=="01"){if($=="0101ff")return{bool:!0};return{bool:!1}}else if(D=="02")return{int:{hex:B}};else if(D=="03")try{if(B.substr(0,2)!="00")throw"not encap";var O=B.substr(2);if(!G(O))throw"not encap";return{bitstr:{obj:X(O)}}}catch(w){var E=null;if(B.length<=10)E=ko4(B);if(E==null)return{bitstr:{hex:B}};else return{bitstr:{bin:E}}}else if(D=="04")try{if(!G(B))throw"not encap";return{octstr:{obj:X(B)}}}catch(w){return{octstr:{hex:B}}}else if(D=="05")return{null:""};else if(D=="06"){var M=Z(B),R=H(M);if(R=="")return{oid:M};else return{oid:R}}else if(D=="0a")if(B.length>4)return{enum:{hex:B}};else return{enum:parseInt(B,16)};else if(D=="30"||D=="31")return A[L[D]]=N($),A;else if(D=="14"){var q=F(B);return A[L[D]]={str:q},A}else if(D=="1e"){var q=V(B);return A[L[D]]={str:q},A}else if(":0c:12:13:16:17:18:1a:".indexOf(D)!=-1){var q=z(B);return A[L[D]]={str:q},A}else if(D.match(/^8[0-9]$/)){var q=z(B);if(q==null|q=="")return{tag:{tag:D,explicit:!1,hex:B}};else if(q.match(/[\x00-\x1F\x7F-\x9F]/)!=null||q.match(/[\u0000-\u001F\u0080\u2013\u009F]/)!=null)return{tag:{tag:D,explicit:!1,hex:B}};else return{tag:{tag:D,explicit:!1,str:q}}}else if(D.match(/^a[0-9]$/))try{if(!G(B))throw Error("not encap");return{tag:{tag:D,explicit:!0,obj:X(B)}}}catch(w){return{tag:{tag:D,explicit:!0,hex:B}}}else{var _=new l.asn1.ASN1Object;_.hV=B;var P=_.getLengthHexFromValue();return{asn1:{tlv:D+P+B}}}};M1.isContextTag=function($,Y){$=$.toLowerCase();var X,G;try{X=parseInt($,16)}catch(Q){return-1}if(Y===void 0)if((X&192)==128)return!0;else return!1;try{var J=Y.match(/^\[[0-9]+\]$/);if(J==null)return!1;if(G=parseInt(Y.substr(1,Y.length-1),10),G>31)return!1;if((X&192)==128&&(X&31)==G)return!0;return!1}catch(Q){return!1}};M1.isASN1HEX=function($){var Y=M1;if($.length%2==1)return!1;var X=Y.getVblen($,0),G=$.substr(0,2),J=Y.getL($,0),Q=$.length-G.length-J.length;if(Q==X*2)return!0;return!1};M1.checkStrictDER=function($,Y,X,G,J){var Q=M1;if(X===void 0){if(typeof $!="string")throw Error("not hex string");if($=$.toLowerCase(),!l.lang.String.isHex($))throw Error("not hex string");if(X=$.length,G=$.length/2,G<128)J=1;else J=Math.ceil(G.toString(16))+1}var W=Q.getL($,Y);if(W.length>J*2)throw Error("L of TLV too long: idx="+Y);var K=Q.getVblen($,Y);if(K>G)throw Error("value of L too long than hex: idx="+Y);var Z=Q.getTLV($,Y),H=Z.length-2-Q.getL($,Y).length;if(H!==K*2)throw Error("V string length and L's value not the same:"+H+"/"+K*2);if(Y===0){if($.length!=Z.length)throw Error("total length and TLV length unmatch:"+$.length+"!="+Z.length)}var z=$.substr(Y,2);if(z==="02"){var V=Q.getVidx($,Y);if($.substr(V,2)=="00"&&$.charCodeAt(V+2)<56)throw Error("not least zeros for DER INTEGER")}if(parseInt(z,16)&32){var F=Q.getVblen($,Y),L=0,N=Q.getChildIdx($,Y);for(var D=0;D<N.length;D++){var A=Q.getTLV($,N[D]);L+=A.length,Q.checkStrictDER($,N[D],X,G,J)}if(F*2!=L)throw Error("sum of children's TLV length and L unmatch: "+F*2+"!="+L)}};M1.oidname=function($){var Y=l.asn1;if(l.lang.String.isHex($))$=Y.ASN1Util.oidHexToInt($);var X=Y.x509.OID.oid2name($);if(X==="")X=$;return X};if(typeof l>"u"||!l)l={};if(typeof l.asn1>"u"||!l.asn1)l.asn1={};if(typeof l.asn1.x509>"u"||!l.asn1.x509)l.asn1.x509={};l.asn1.x509.Certificate=function($){l.asn1.x509.Certificate.superclass.constructor.call(this);var Y=l,X=Y.asn1,G=X.DERBitString,J=X.DERSequence,Q=X.x509,W=Q.TBSCertificate,K=Q.AlgorithmIdentifier;if(this.params=void 0,this.setByParam=function(Z){this.params=Z},this.sign=function(){var Z=this.params,H=Z.sigalg;if(Z.sigalg.name!=null)H=Z.sigalg.name;var z=Z.tbsobj.tohex(),V=new l.crypto.Signature({alg:H});V.init(Z.cakey),V.updateHex(z),Z.sighex=V.sign()},this.getPEM=function(){return RG(this.tohex(),"CERTIFICATE")},this.tohex=function(){var Z=this.params;if(Z.tbsobj==null||Z.tbsobj==null)Z.tbsobj=new W(Z);if(Z.sighex==null&&Z.cakey!=null)this.sign();if(Z.sighex==null)throw Error("sighex or cakey parameter not defined");var H=[];H.push(Z.tbsobj),H.push(new K({name:Z.sigalg})),H.push(new G({hex:"00"+Z.sighex}));var z=new J({array:H});return z.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.params=$};X1(l.asn1.x509.Certificate,l.asn1.ASN1Object);l.asn1.x509.TBSCertificate=function($){l.asn1.x509.TBSCertificate.superclass.constructor.call(this);var Y=l,X=Y.asn1,G=X.x509,J=X.DERTaggedObject,Q=X.DERInteger,W=X.DERSequence,K=G.AlgorithmIdentifier,Z=G.Time,H=G.X500Name,z=G.Extensions,V=G.SubjectPublicKeyInfo;if(this.params=null,this.setByParam=function(F){this.params=F},this.tohex=function(){var F=[],L=this.params;if(L.version!=null||L.version!=1){var N=2;if(L.version!=null)N=L.version-1;var D=new J({obj:new Q({int:N})});F.push(D)}if(F.push(new Q(L.serial)),F.push(new K({name:L.sigalg})),F.push(new H(L.issuer)),F.push(new W({array:[new Z(L.notbefore),new Z(L.notafter)]})),F.push(new H(L.subject)),F.push(new V(Z8.getKey(L.sbjpubkey))),L.ext!==void 0&&L.ext.length>0)F.push(new J({tag:"a3",obj:new z(L.ext)}));var A=new l.asn1.DERSequence({array:F});return A.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.x509.TBSCertificate,l.asn1.ASN1Object);l.asn1.x509.Extensions=function($){l.asn1.x509.Extensions.superclass.constructor.call(this);var Y=l,X=Y.asn1,G=X.DERSequence,J=X.x509;if(this.aParam=[],this.setByParam=function(Q){this.aParam=Q},this.tohex=function(){var Q=[];for(var W=0;W<this.aParam.length;W++){var K=this.aParam[W],Z=K.extname,H=null;if(K.extn!=null)H=new J.PrivateExtension(K);else if(Z=="subjectKeyIdentifier")H=new J.SubjectKeyIdentifier(K);else if(Z=="keyUsage")H=new J.KeyUsage(K);else if(Z=="subjectAltName")H=new J.SubjectAltName(K);else if(Z=="issuerAltName")H=new J.IssuerAltName(K);else if(Z=="basicConstraints")H=new J.BasicConstraints(K);else if(Z=="nameConstraints")H=new J.NameConstraints(K);else if(Z=="cRLDistributionPoints")H=new J.CRLDistributionPoints(K);else if(Z=="certificatePolicies")H=new J.CertificatePolicies(K);else if(Z=="policyMappings")H=new J.PolicyMappings(K);else if(Z=="policyConstraints")H=new J.PolicyConstraints(K);else if(Z=="inhibitAnyPolicy")H=new J.InhibitAnyPolicy(K);else if(Z=="authorityKeyIdentifier")H=new J.AuthorityKeyIdentifier(K);else if(Z=="extKeyUsage")H=new J.ExtKeyUsage(K);else if(Z=="authorityInfoAccess")H=new J.AuthorityInfoAccess(K);else if(Z=="cRLNumber")H=new J.CRLNumber(K);else if(Z=="cRLReason")H=new J.CRLReason(K);else if(Z=="ocspNonce")H=new J.OCSPNonce(K);else if(Z=="ocspNoCheck")H=new J.OCSPNoCheck(K);else if(Z=="adobeTimeStamp")H=new J.AdobeTimeStamp(K);else if(Z=="subjectDirectoryAttributes")H=new J.SubjectDirectoryAttributes(K);else throw Error("extension not supported:"+JSON.stringify(K));if(H!=null)Q.push(H)}var z=new G({array:Q});return z.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.x509.Extensions,l.asn1.ASN1Object);l.asn1.x509.Extension=function($){l.asn1.x509.Extension.superclass.constructor.call(this);var Y=null,X=l,G=X.asn1,J=G.DERObjectIdentifier,Q=G.DEROctetString,W=G.DERBitString,K=G.DERBoolean,Z=G.DERSequence;if(this.tohex=function(){var H=new J({oid:this.oid}),z=new Q({hex:this.getExtnValueHex()}),V=[];if(V.push(H),this.critical)V.push(new K);V.push(z);var F=new Z({array:V});return F.tohex()},this.getEncodedHex=function(){return this.tohex()},this.critical=!1,$!==void 0){if($.critical!==void 0)this.critical=$.critical}};X1(l.asn1.x509.Extension,l.asn1.ASN1Object);l.asn1.x509.KeyUsage=function($){l.asn1.x509.KeyUsage.superclass.constructor.call(this,$);var Y=Error,X={digitalSignature:0,nonRepudiation:1,keyEncipherment:2,dataEncipherment:3,keyAgreement:4,keyCertSign:5,cRLSign:6,encipherOnly:7,decipherOnly:8};if(this.getExtnValueHex=function(){var G=this.getBinValue();return this.asn1ExtnValue=new l.asn1.DERBitString({bin:G}),this.asn1ExtnValue.tohex()},this.getBinValue=function(){var G=this.params;if(typeof G!="object"||typeof G.names!="object"&&typeof G.bin!="string")throw new Y("parameter not yet set");if(G.names!=null)return rZ0(G.names,X);else if(G.bin!=null)return G.bin;else throw new Y("parameter not set properly")},this.oid="2.5.29.15",$!==void 0)this.params=$};X1(l.asn1.x509.KeyUsage,l.asn1.x509.Extension);l.asn1.x509.BasicConstraints=function($){l.asn1.x509.BasicConstraints.superclass.constructor.call(this,$);var Y=l.asn1,X=Y.DERBoolean,G=Y.DERInteger,J=Y.DERSequence,Q=!1,W=-1;if(this.getExtnValueHex=function(){var K=[];if(this.cA)K.push(new X);if(this.pathLen>-1)K.push(new G({int:this.pathLen}));var Z=new J({array:K});return this.asn1ExtnValue=Z,this.asn1ExtnValue.tohex()},this.oid="2.5.29.19",this.cA=!1,this.pathLen=-1,$!==void 0){if($.cA!==void 0)this.cA=$.cA;if($.pathLen!==void 0)this.pathLen=$.pathLen}};X1(l.asn1.x509.BasicConstraints,l.asn1.x509.Extension);l.asn1.x509.CRLDistributionPoints=function($){l.asn1.x509.CRLDistributionPoints.superclass.constructor.call(this,$);var Y=l,X=Y.asn1,G=X.x509;if(this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.setByDPArray=function(J){var Q=[];for(var W=0;W<J.length;W++)if(J[W]instanceof l.asn1.ASN1Object)Q.push(J[W]);else{var K=new G.DistributionPoint(J[W]);Q.push(K)}this.asn1ExtnValue=new X.DERSequence({array:Q})},this.setByOneURI=function(J){var Q=new G.DistributionPoint({fulluri:J});this.setByDPArray([Q])},this.oid="2.5.29.31",$!==void 0){if($.array!==void 0)this.setByDPArray($.array);else if($.uri!==void 0)this.setByOneURI($.uri)}};X1(l.asn1.x509.CRLDistributionPoints,l.asn1.x509.Extension);l.asn1.x509.DistributionPoint=function($){l.asn1.x509.DistributionPoint.superclass.constructor.call(this);var Y=null,X=l,G=X.asn1,J=G.x509.DistributionPointName;if(this.tohex=function(){var Q=new G.DERSequence;if(this.asn1DP!=null){var W=new G.DERTaggedObject({explicit:!0,tag:"a0",obj:this.asn1DP});Q.appendASN1Object(W)}return this.hTLV=Q.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0){if($.dpobj!==void 0)this.asn1DP=$.dpobj;else if($.dpname!==void 0)this.asn1DP=new J($.dpname);else if($.fulluri!==void 0)this.asn1DP=new J({full:[{uri:$.fulluri}]})}};X1(l.asn1.x509.DistributionPoint,l.asn1.ASN1Object);l.asn1.x509.DistributionPointName=function($){l.asn1.x509.DistributionPointName.superclass.constructor.call(this);var Y=null,X=null,G=null,J=null,Q=l,W=Q.asn1,K=W.DERTaggedObject;if(this.tohex=function(){if(this.type!="full")throw Error("currently type shall be 'full': "+this.type);return this.asn1Obj=new K({explicit:!1,tag:this.tag,obj:this.asn1V}),this.hTLV=this.asn1Obj.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0)if(W.x509.GeneralNames.prototype.isPrototypeOf($))this.type="full",this.tag="a0",this.asn1V=$;else if($.full!==void 0)this.type="full",this.tag="a0",this.asn1V=new W.x509.GeneralNames($.full);else throw Error("This class supports GeneralNames only as argument")};X1(l.asn1.x509.DistributionPointName,l.asn1.ASN1Object);l.asn1.x509.CertificatePolicies=function($){l.asn1.x509.CertificatePolicies.superclass.constructor.call(this,$);var Y=l,X=Y.asn1,G=X.x509,J=X.DERSequence,Q=G.PolicyInformation;if(this.params=null,this.getExtnValueHex=function(){var W=[];for(var K=0;K<this.params.array.length;K++)W.push(new Q(this.params.array[K]));var Z=new J({array:W});return this.asn1ExtnValue=Z,this.asn1ExtnValue.tohex()},this.oid="2.5.29.32",$!==void 0)this.params=$};X1(l.asn1.x509.CertificatePolicies,l.asn1.x509.Extension);l.asn1.x509.PolicyInformation=function($){l.asn1.x509.PolicyInformation.superclass.constructor.call(this,$);var Y=l.asn1,X=Y.DERSequence,G=Y.DERObjectIdentifier,J=Y.x509.PolicyQualifierInfo;if(this.params=null,this.tohex=function(){if(this.params.policyoid===void 0&&this.params.array===void 0)throw Error("parameter oid and array missing");var Q=[new G(this.params.policyoid)];if(this.params.array!==void 0){var W=[];for(var K=0;K<this.params.array.length;K++)W.push(new J(this.params.array[K]));if(W.length>0)Q.push(new X({array:W}))}var Z=new X({array:Q});return Z.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.params=$};X1(l.asn1.x509.PolicyInformation,l.asn1.ASN1Object);l.asn1.x509.PolicyQualifierInfo=function($){l.asn1.x509.PolicyQualifierInfo.superclass.constructor.call(this,$);var Y=l.asn1,X=Y.DERSequence,G=Y.DERIA5String,J=Y.DERObjectIdentifier,Q=Y.x509.UserNotice;if(this.params=null,this.tohex=function(){if(this.params.cps!==void 0){var W=new X({array:[new J({oid:"1.3.6.1.5.5.7.2.1"}),new G({str:this.params.cps})]});return W.tohex()}if(this.params.unotice!=null){var W=new X({array:[new J({oid:"1.3.6.1.5.5.7.2.2"}),new Q(this.params.unotice)]});return W.tohex()}},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.params=$};X1(l.asn1.x509.PolicyQualifierInfo,l.asn1.ASN1Object);l.asn1.x509.UserNotice=function($){l.asn1.x509.UserNotice.superclass.constructor.call(this,$);var Y=l.asn1.DERSequence,X=l.asn1.DERInteger,G=l.asn1.x509.DisplayText,J=l.asn1.x509.NoticeReference;if(this.params=null,this.tohex=function(){var Q=[];if(this.params.noticeref!==void 0)Q.push(new J(this.params.noticeref));if(this.params.exptext!==void 0)Q.push(new G(this.params.exptext));var W=new Y({array:Q});return W.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.params=$};X1(l.asn1.x509.UserNotice,l.asn1.ASN1Object);l.asn1.x509.NoticeReference=function($){l.asn1.x509.NoticeReference.superclass.constructor.call(this,$);var Y=l.asn1.DERSequence,X=l.asn1.DERInteger,G=l.asn1.x509.DisplayText;if(this.params=null,this.tohex=function(){var J=[];if(this.params.org!==void 0)J.push(new G(this.params.org));if(this.params.noticenum!==void 0){var Q=[],W=this.params.noticenum;for(var K=0;K<W.length;K++)Q.push(new X(W[K]));J.push(new Y({array:Q}))}if(J.length==0)throw Error("parameter is empty");var Z=new Y({array:J});return Z.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.params=$};X1(l.asn1.x509.NoticeReference,l.asn1.ASN1Object);l.asn1.x509.DisplayText=function($){if(l.asn1.x509.DisplayText.superclass.constructor.call(this,$),this.hT="0c",$!==void 0){if($.type==="ia5")this.hT="16";else if($.type==="vis")this.hT="1a";else if($.type==="bmp")this.hT="1e"}};X1(l.asn1.x509.DisplayText,l.asn1.DERAbstractString);l.asn1.x509.PolicyMappings=function($){l.asn1.x509.PolicyMappings.superclass.constructor.call(this,$);var Y=l,X=Y.asn1,G=X.x509,J=X.ASN1Util.newObject;if(this.params=null,this.getExtnValueHex=function(){var Q=this.params,W=[];for(var K=0;K<Q.array.length;K++){var Z=Q.array[K];W.push({seq:[{oid:Z[0]},{oid:Z[1]}]})}return this.asn1ExtnValue=J({seq:W}),this.asn1ExtnValue.tohex()},this.oid="2.5.29.33",$!==void 0)this.params=$};X1(l.asn1.x509.PolicyMappings,l.asn1.x509.Extension);l.asn1.x509.PolicyConstraints=function($){l.asn1.x509.PolicyConstraints.superclass.constructor.call(this,$);var Y=l,X=Y.asn1,G=X.x509,J=X.ASN1Util.newObject;if(this.params=null,this.getExtnValueHex=function(){var Q=this.params,W=[];if(Q.reqexp!=null)W.push({tag:{tagi:"80",obj:{int:Q.reqexp}}});if(Q.inhibit!=null)W.push({tag:{tagi:"81",obj:{int:Q.inhibit}}});return this.asn1ExtnValue=J({seq:W}),this.asn1ExtnValue.tohex()},this.oid="2.5.29.36",$!==void 0)this.params=$};X1(l.asn1.x509.PolicyConstraints,l.asn1.x509.Extension);l.asn1.x509.InhibitAnyPolicy=function($){l.asn1.x509.InhibitAnyPolicy.superclass.constructor.call(this,$);var Y=l,X=Y.asn1,G=X.x509,J=X.ASN1Util.newObject;if(this.params=null,this.getExtnValueHex=function(){return this.asn1ExtnValue=J({int:this.params.skip}),this.asn1ExtnValue.tohex()},this.oid="2.5.29.54",$!==void 0)this.params=$};X1(l.asn1.x509.InhibitAnyPolicy,l.asn1.x509.Extension);l.asn1.x509.NameConstraints=function($){l.asn1.x509.NameConstraints.superclass.constructor.call(this,$);var Y=l,X=Y.asn1,G=X.x509,J=X.ASN1Util.newObject,Q=G.GeneralSubtree;if(this.params=null,this.getExtnValueHex=function(){var W=this.params,K=[];if(W.permit!=null&&W.permit.length!=null){var Z=[];for(var H=0;H<W.permit.length;H++)Z.push(new Q(W.permit[H]));K.push({tag:{tagi:"a0",obj:{seq:Z}}})}if(W.exclude!=null&&W.exclude.length!=null){var z=[];for(var H=0;H<W.exclude.length;H++)z.push(new Q(W.exclude[H]));K.push({tag:{tagi:"a1",obj:{seq:z}}})}return this.asn1ExtnValue=J({seq:K}),this.asn1ExtnValue.tohex()},this.oid="2.5.29.30",$!==void 0)this.params=$};X1(l.asn1.x509.NameConstraints,l.asn1.x509.Extension);l.asn1.x509.GeneralSubtree=function($){l.asn1.x509.GeneralSubtree.superclass.constructor.call(this);var Y=l.asn1,X=Y.x509,G=X.GeneralName,J=Y.ASN1Util.newObject;if(this.params=null,this.setByParam=function(Q){this.params=Q},this.tohex=function(){var Q=this.params,W=[new G(Q)];if(Q.min!=null)W.push({tag:{tagi:"80",obj:{int:Q.min}}});if(Q.max!=null)W.push({tag:{tagi:"81",obj:{int:Q.max}}});var K=J({seq:W});return K.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.x509.GeneralSubtree,l.asn1.ASN1Object);l.asn1.x509.ExtKeyUsage=function($){l.asn1.x509.ExtKeyUsage.superclass.constructor.call(this,$);var Y=l,X=Y.asn1;if(this.setPurposeArray=function(G){this.asn1ExtnValue=new X.DERSequence;for(var J=0;J<G.length;J++){var Q=new X.DERObjectIdentifier(G[J]);this.asn1ExtnValue.appendASN1Object(Q)}},this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.oid="2.5.29.37",$!==void 0){if($.array!==void 0)this.setPurposeArray($.array)}};X1(l.asn1.x509.ExtKeyUsage,l.asn1.x509.Extension);l.asn1.x509.AuthorityKeyIdentifier=function($){l.asn1.x509.AuthorityKeyIdentifier.superclass.constructor.call(this,$);var Y=l,X=Y.asn1,G=X.DERTaggedObject,J=X.x509.GeneralNames,Q=Y.crypto.Util.isKey;if(this.asn1KID=null,this.asn1CertIssuer=null,this.asn1CertSN=null,this.getExtnValueHex=function(){var W=[];if(this.asn1KID)W.push(new G({explicit:!1,tag:"80",obj:this.asn1KID}));if(this.asn1CertIssuer)W.push(new G({explicit:!1,tag:"a1",obj:new J([{dn:this.asn1CertIssuer}])}));if(this.asn1CertSN)W.push(new G({explicit:!1,tag:"82",obj:this.asn1CertSN}));var K=new X.DERSequence({array:W});return this.asn1ExtnValue=K,this.asn1ExtnValue.tohex()},this.setKIDByParam=function(W){if(W.str!==void 0||W.hex!==void 0)this.asn1KID=new l.asn1.DEROctetString(W);else if(typeof W==="object"&&l.crypto.Util.isKey(W)||typeof W==="string"&&W.indexOf("BEGIN ")!=-1){var K=W;if(typeof W==="string")K=Z8.getKey(W);var Z=Z8.getKeyID(K);this.asn1KID=new l.asn1.DEROctetString({hex:Z})}},this.setCertIssuerByParam=function(W){if(W.str!==void 0||W.ldapstr!==void 0||W.hex!==void 0||W.certsubject!==void 0||W.certissuer!==void 0)this.asn1CertIssuer=new l.asn1.x509.X500Name(W);else if(typeof W==="string"&&W.indexOf("BEGIN ")!=-1&&W.indexOf("CERTIFICATE")!=-1)this.asn1CertIssuer=new l.asn1.x509.X500Name({certissuer:W})},this.setCertSNByParam=function(W){if(W.str!==void 0||W.bigint!==void 0||W.hex!==void 0)this.asn1CertSN=new l.asn1.DERInteger(W);else if(typeof W==="string"&&W.indexOf("BEGIN ")!=-1&&W.indexOf("CERTIFICATE")){var K=new e4;K.readCertPEM(W);var Z=K.getSerialNumberHex();this.asn1CertSN=new l.asn1.DERInteger({hex:Z})}},this.oid="2.5.29.35",$!==void 0){if($.kid!==void 0)this.setKIDByParam($.kid);if($.issuer!==void 0)this.setCertIssuerByParam($.issuer);if($.sn!==void 0)this.setCertSNByParam($.sn);if($.issuersn!==void 0&&typeof $.issuersn==="string"&&$.issuersn.indexOf("BEGIN ")!=-1&&$.issuersn.indexOf("CERTIFICATE"))this.setCertSNByParam($.issuersn),this.setCertIssuerByParam($.issuersn)}};X1(l.asn1.x509.AuthorityKeyIdentifier,l.asn1.x509.Extension);l.asn1.x509.SubjectKeyIdentifier=function($){l.asn1.x509.SubjectKeyIdentifier.superclass.constructor.call(this,$);var Y=l,X=Y.asn1,G=X.DEROctetString;if(this.asn1KID=null,this.getExtnValueHex=function(){return this.asn1ExtnValue=this.asn1KID,this.asn1ExtnValue.tohex()},this.setKIDByParam=function(J){if(J.str!==void 0||J.hex!==void 0)this.asn1KID=new G(J);else if(typeof J==="object"&&l.crypto.Util.isKey(J)||typeof J==="string"&&J.indexOf("BEGIN")!=-1){var Q=J;if(typeof J==="string")Q=Z8.getKey(J);var W=Z8.getKeyID(Q);this.asn1KID=new l.asn1.DEROctetString({hex:W})}},this.oid="2.5.29.14",$!==void 0){if($.kid!==void 0)this.setKIDByParam($.kid)}};X1(l.asn1.x509.SubjectKeyIdentifier,l.asn1.x509.Extension);l.asn1.x509.AuthorityInfoAccess=function($){if(l.asn1.x509.AuthorityInfoAccess.superclass.constructor.call(this,$),this.setAccessDescriptionArray=function(Y){var X=[],G=l,J=G.asn1,Q=J.DERSequence,W=J.DERObjectIdentifier,K=J.x509.GeneralName;for(var Z=0;Z<Y.length;Z++){var H,z=Y[Z];if(z.ocsp!==void 0)H=new Q({array:[new W({oid:"1.3.6.1.5.5.7.48.1"}),new K({uri:z.ocsp})]});else if(z.caissuer!==void 0)H=new Q({array:[new W({oid:"1.3.6.1.5.5.7.48.2"}),new K({uri:z.caissuer})]});else throw Error("unknown AccessMethod parameter: "+JSON.stringify(z));X.push(H)}this.asn1ExtnValue=new Q({array:X})},this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.oid="1.3.6.1.5.5.7.1.1",$!==void 0){if($.array!==void 0)this.setAccessDescriptionArray($.array)}};X1(l.asn1.x509.AuthorityInfoAccess,l.asn1.x509.Extension);l.asn1.x509.SubjectAltName=function($){if(l.asn1.x509.SubjectAltName.superclass.constructor.call(this,$),this.setNameArray=function(Y){this.asn1ExtnValue=new l.asn1.x509.GeneralNames(Y)},this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.oid="2.5.29.17",$!==void 0){if($.array!==void 0)this.setNameArray($.array)}};X1(l.asn1.x509.SubjectAltName,l.asn1.x509.Extension);l.asn1.x509.IssuerAltName=function($){if(l.asn1.x509.IssuerAltName.superclass.constructor.call(this,$),this.setNameArray=function(Y){this.asn1ExtnValue=new l.asn1.x509.GeneralNames(Y)},this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.oid="2.5.29.18",$!==void 0){if($.array!==void 0)this.setNameArray($.array)}};X1(l.asn1.x509.IssuerAltName,l.asn1.x509.Extension);l.asn1.x509.SubjectDirectoryAttributes=function($){l.asn1.x509.SubjectDirectoryAttributes.superclass.constructor.call(this,$);var Y=l.asn1,X=Y.DERSequence,G=Y.ASN1Util.newObject,J=Y.x509.OID.name2oid;if(this.params=null,this.getExtnValueHex=function(){var Q=[];for(var W=0;W<this.params.array.length;W++){var K=this.params.array[W];if(K.attr!=null&&K.array!=null){var Z={seq:[{oid:K.attr},{set:K.array}]};Q.push(G(Z));continue}var H={seq:[{oid:"1.2.3.4"},{set:[{utf8str:"DE"}]}]};if(K.attr=="dateOfBirth")H.seq[0].oid=J(K.attr),H.seq[1].set[0]={gentime:K.str};else if(K.attr=="placeOfBirth")H.seq[0].oid=J(K.attr),H.seq[1].set[0]={utf8str:K.str};else if(K.attr=="gender")H.seq[0].oid=J(K.attr),H.seq[1].set[0]={prnstr:K.str};else if(K.attr=="countryOfCitizenship")H.seq[0].oid=J(K.attr),H.seq[1].set[0]={prnstr:K.str};else if(K.attr=="countryOfResidence")H.seq[0].oid=J(K.attr),H.seq[1].set[0]={prnstr:K.str};else throw Error("unsupported attribute: "+K.attr);Q.push(new G(H))}var z=new X({array:Q});return this.asn1ExtnValue=z,this.asn1ExtnValue.tohex()},this.oid="2.5.29.9",$!==void 0)this.params=$};X1(l.asn1.x509.SubjectDirectoryAttributes,l.asn1.x509.Extension);l.asn1.x509.PrivateExtension=function($){l.asn1.x509.PrivateExtension.superclass.constructor.call(this,$);var Y=l,X=Y.lang.String.isHex,G=Y.asn1,J=G.x509.OID.name2oid,Q=G.ASN1Util.newObject;if(this.params=null,this.setByParam=function(W){this.oid=J(W.extname),this.params=W},this.getExtnValueHex=function(){if(this.params.extname==null||this.params.extn==null)throw Error("extname or extnhex not specified");var W=this.params.extn;if(typeof W=="string"&&X(W))return W;else if(typeof W=="object")try{return Q(W).tohex()}catch(K){}throw Error("unsupported extn value")},$!=null)this.setByParam($)};X1(l.asn1.x509.PrivateExtension,l.asn1.x509.Extension);l.asn1.x509.CRL=function($){l.asn1.x509.CRL.superclass.constructor.call(this);var Y=l,X=Y.asn1,G=X.DERSequence,J=X.DERBitString,Q=X.x509,W=Q.AlgorithmIdentifier,K=Q.TBSCertList;if(this.params=void 0,this.setByParam=function(Z){this.params=Z},this.sign=function(){var Z=new K(this.params).tohex(),H=new l.crypto.Signature({alg:this.params.sigalg});H.init(this.params.cakey),H.updateHex(Z);var z=H.sign();this.params.sighex=z},this.getPEM=function(){return RG(this.tohex(),"X509 CRL")},this.tohex=function(){var Z=this.params;if(Z.tbsobj==null)Z.tbsobj=new K(Z);if(Z.sighex==null&&Z.cakey!=null)this.sign();if(Z.sighex==null)throw Error("sighex or cakey parameter not defined");var H=[];H.push(Z.tbsobj),H.push(new W({name:Z.sigalg})),H.push(new J({hex:"00"+Z.sighex}));var z=new G({array:H});return z.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.params=$};X1(l.asn1.x509.CRL,l.asn1.ASN1Object);l.asn1.x509.TBSCertList=function($){l.asn1.x509.TBSCertList.superclass.constructor.call(this);var Y=l,X=Y.asn1,G=X.DERInteger,J=X.DERSequence,Q=X.DERTaggedObject,W=X.DERObjectIdentifier,K=X.x509,Z=K.AlgorithmIdentifier,H=K.Time,z=K.Extensions,V=K.X500Name;if(this.params=null,this.setByParam=function(F){this.params=F},this.getRevCertSequence=function(){var F=[],L=this.params.revcert;for(var N=0;N<L.length;N++){var D=[new G(L[N].sn),new H(L[N].date)];if(L[N].ext!=null)D.push(new z(L[N].ext));F.push(new J({array:D}))}return new J({array:F})},this.tohex=function(){var F=[],L=this.params;if(L.version!=null){var N=L.version-1,D=new G({int:N});F.push(D)}if(F.push(new Z({name:L.sigalg})),F.push(new V(L.issuer)),F.push(new H(L.thisupdate)),L.nextupdate!=null)F.push(new H(L.nextupdate));if(L.revcert!=null)F.push(this.getRevCertSequence());if(L.ext!=null){var A=new z(L.ext);F.push(new Q({tag:"a0",explicit:!0,obj:A}))}var B=new J({array:F});return B.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.x509.TBSCertList,l.asn1.ASN1Object);l.asn1.x509.CRLEntry=function($){l.asn1.x509.CRLEntry.superclass.constructor.call(this);var Y=null,X=null,G=l,J=G.asn1;if(this.setCertSerial=function(Q){this.sn=new J.DERInteger(Q)},this.setRevocationDate=function(Q){this.time=new J.x509.Time(Q)},this.tohex=function(){var Q=new J.DERSequence({array:[this.sn,this.time]});return this.TLV=Q.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0){if($.time!==void 0)this.setRevocationDate($.time);if($.sn!==void 0)this.setCertSerial($.sn)}};X1(l.asn1.x509.CRLEntry,l.asn1.ASN1Object);l.asn1.x509.CRLNumber=function($){if(l.asn1.x509.CRLNumber.superclass.constructor.call(this,$),this.params=void 0,this.getExtnValueHex=function(){return this.asn1ExtnValue=new l.asn1.DERInteger(this.params.num),this.asn1ExtnValue.tohex()},this.oid="2.5.29.20",$!=null)this.params=$};X1(l.asn1.x509.CRLNumber,l.asn1.x509.Extension);l.asn1.x509.CRLReason=function($){if(l.asn1.x509.CRLReason.superclass.constructor.call(this,$),this.params=void 0,this.getExtnValueHex=function(){return this.asn1ExtnValue=new l.asn1.DEREnumerated(this.params.code),this.asn1ExtnValue.tohex()},this.oid="2.5.29.21",$!=null)this.params=$};X1(l.asn1.x509.CRLReason,l.asn1.x509.Extension);l.asn1.x509.OCSPNonce=function($){if(l.asn1.x509.OCSPNonce.superclass.constructor.call(this,$),this.params=void 0,this.getExtnValueHex=function(){return this.asn1ExtnValue=new l.asn1.DEROctetString(this.params),this.asn1ExtnValue.tohex()},this.oid="1.3.6.1.5.5.7.48.1.2",$!=null)this.params=$};X1(l.asn1.x509.OCSPNonce,l.asn1.x509.Extension);l.asn1.x509.OCSPNoCheck=function($){if(l.asn1.x509.OCSPNoCheck.superclass.constructor.call(this,$),this.params=void 0,this.getExtnValueHex=function(){return this.asn1ExtnValue=new l.asn1.DERNull,this.asn1ExtnValue.tohex()},this.oid="1.3.6.1.5.5.7.48.1.5",$!=null)this.params=$};X1(l.asn1.x509.OCSPNoCheck,l.asn1.x509.Extension);l.asn1.x509.AdobeTimeStamp=function($){l.asn1.x509.AdobeTimeStamp.superclass.constructor.call(this,$);var Y=l,X=Y.asn1,G=X.DERInteger,J=X.DERBoolean,Q=X.DERSequence,W=X.x509.GeneralName;if(this.params=null,this.getExtnValueHex=function(){var K=this.params,Z=[new G(1)];if(Z.push(new W({uri:K.uri})),K.reqauth!=null)Z.push(new J(K.reqauth));return this.asn1ExtnValue=new Q({array:Z}),this.asn1ExtnValue.tohex()},this.oid="1.2.840.113583.1.1.9.1",$!==void 0)this.setByParam($)};X1(l.asn1.x509.AdobeTimeStamp,l.asn1.x509.Extension);l.asn1.x509.X500Name=function($){l.asn1.x509.X500Name.superclass.constructor.call(this),this.asn1Array=[],this.paramArray=[],this.sRule="utf8";var Y=l,X=Y.asn1,G=X.x509,J=G.RDN,Q=B7;if(this.setByString=function(W,K){if(K!==void 0)this.sRule=K;var Z=W.split("/");Z.shift();var H=[];for(var z=0;z<Z.length;z++)if(Z[z].match(/^[^=]+=.+$/))H.push(Z[z]);else{var V=H.length-1;H[V]=H[V]+"/"+Z[z]}for(var z=0;z<H.length;z++)this.asn1Array.push(new J({str:H[z],rule:this.sRule}))},this.setByLdapString=function(W,K){if(K!==void 0)this.sRule=K;var Z=G.X500Name.ldapToCompat(W);this.setByString(Z,K)},this.setByObject=function(W,K){if(K!==void 0)this.sRule=K;for(var Z in W)if(W.hasOwnProperty(Z)){var H=new J({str:Z+"="+W[Z],rule:this.sRule});this.asn1Array?this.asn1Array.push(H):this.asn1Array=[H]}},this.setByParam=function(W){if(W.rule!==void 0)this.sRule=W.rule;if(W.array!==void 0)this.paramArray=W.array;else if(W.str!==void 0)this.setByString(W.str);else if(W.ldapstr!==void 0)this.setByLdapString(W.ldapstr);else if(W.hex!==void 0)this.hTLV=W.hex;else if(W.certissuer!==void 0){var K=new e4;K.readCertPEM(W.certissuer),this.hTLV=K.getIssuerHex()}else if(W.certsubject!==void 0){var K=new e4;K.readCertPEM(W.certsubject),this.hTLV=K.getSubjectHex()}else if(typeof W==="object"&&W.certsubject===void 0&&W.certissuer===void 0)this.setByObject(W)},this.tohex=function(){if(typeof this.hTLV=="string")return this.hTLV;if(this.asn1Array.length==0&&this.paramArray.length>0)for(var W=0;W<this.paramArray.length;W++){var K={array:this.paramArray[W]};if(this.sRule!="utf8")K.rule=this.sRule;var Z=new J(K);this.asn1Array.push(Z)}var H=new X.DERSequence({array:this.asn1Array});return this.hTLV=H.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.x509.X500Name,l.asn1.ASN1Object);l.asn1.x509.X500Name.compatToLDAP=function($){if($.substr(0,1)!=="/")throw"malformed input";var Y="";$=$.substr(1);var X=$.split("/");return X.reverse(),X=X.map(function(G){return G.replace(/,/,"\\,")}),X.join(",")};l.asn1.x509.X500Name.onelineToLDAP=function($){return l.asn1.x509.X500Name.compatToLDAP($)};l.asn1.x509.X500Name.ldapToCompat=function($){var Y=$.split(","),X=!1,G=[];for(var J=0;Y.length>0;J++){var Q=Y.shift();if(X===!0){var W=G.pop(),K=(W+","+Q).replace(/\\,/g,",");G.push(K),X=!1}else G.push(Q);if(Q.substr(-1,1)==="\\")X=!0}return G=G.map(function(Z){return Z.replace("/","\\/")}),G.reverse(),"/"+G.join("/")};l.asn1.x509.X500Name.ldapToOneline=function($){return l.asn1.x509.X500Name.ldapToCompat($)};l.asn1.x509.RDN=function($){l.asn1.x509.RDN.superclass.constructor.call(this),this.asn1Array=[],this.paramArray=[],this.sRule="utf8";var Y=l.asn1.x509.AttributeTypeAndValue;if(this.setByParam=function(X){if(X.rule!==void 0)this.sRule=X.rule;if(X.str!==void 0)this.addByMultiValuedString(X.str);if(X.array!==void 0)this.paramArray=X.array},this.addByString=function(X){this.asn1Array.push(new l.asn1.x509.AttributeTypeAndValue({str:X,rule:this.sRule}))},this.addByMultiValuedString=function(X){var G=l.asn1.x509.RDN.parseString(X);for(var J=0;J<G.length;J++)this.addByString(G[J])},this.tohex=function(){if(this.asn1Array.length==0&&this.paramArray.length>0)for(var X=0;X<this.paramArray.length;X++){var G=this.paramArray[X];if(G.rule!==void 0&&this.sRule!="utf8")G.rule=this.sRule;var J=new Y(G);this.asn1Array.push(J)}var Q=new l.asn1.DERSet({array:this.asn1Array});return this.TLV=Q.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.x509.RDN,l.asn1.ASN1Object);l.asn1.x509.RDN.parseString=function($){var Y=$.split(/\+/),X=!1,G=[];for(var J=0;Y.length>0;J++){var Q=Y.shift();if(X===!0){var W=G.pop(),K=(W+"+"+Q).replace(/\\\+/g,"+");G.push(K),X=!1}else G.push(Q);if(Q.substr(-1,1)==="\\")X=!0}var Z=!1,H=[];for(var J=0;G.length>0;J++){var Q=G.shift();if(Z===!0){var z=H.pop();if(Q.match(/"$/)){var K=(z+"+"+Q).replace(/^([^=]+)="(.*)"$/,"$1=$2");H.push(K),Z=!1}else H.push(z+"+"+Q)}else H.push(Q);if(Q.match(/^[^=]+="/))Z=!0}return H};l.asn1.x509.AttributeTypeAndValue=function($){l.asn1.x509.AttributeTypeAndValue.superclass.constructor.call(this),this.sRule="utf8",this.sType=null,this.sValue=null,this.dsType=null;var Y=l,X=Y.asn1,G=X.DERSequence,J=X.DERUTF8String,Q=X.DERPrintableString,W=X.DERTeletexString,K=X.DERIA5String,Z=X.DERVisibleString,H=X.DERBMPString,z=Y.lang.String.isMail,V=Y.lang.String.isPrintable;if(this.setByParam=function(F){if(F.rule!==void 0)this.sRule=F.rule;if(F.ds!==void 0)this.dsType=F.ds;if(F.value===void 0&&F.str!==void 0){var L=F.str,N=L.match(/^([^=]+)=(.+)$/);if(N)this.sType=N[1],this.sValue=N[2];else throw Error("malformed attrTypeAndValueStr: "+attrTypeAndValueStr)}else this.sType=F.type,this.sValue=F.value},this.setByString=function(F,L){if(L!==void 0)this.sRule=L;var N=F.match(/^([^=]+)=(.+)$/);if(N)this.setByAttrTypeAndValueStr(N[1],N[2]);else throw Error("malformed attrTypeAndValueStr: "+attrTypeAndValueStr)},this._getDsType=function(){var F=this.sType,L=this.sValue,N=this.sRule;if(N==="prn"){if(F=="CN"&&z(L))return"ia5";if(V(L))return"prn";return"utf8"}else if(N==="utf8"){if(F=="CN"&&z(L))return"ia5";if(F=="C")return"prn";return"utf8"}return"utf8"},this.setByAttrTypeAndValueStr=function(F,L,N){if(N!==void 0)this.sRule=N;this.sType=F,this.sValue=L},this.getValueObj=function(F,L){if(F=="utf8")return new J({str:L});if(F=="prn")return new Q({str:L});if(F=="tel")return new W({str:L});if(F=="ia5")return new K({str:L});if(F=="vis")return new Z({str:L});if(F=="bmp")return new H({str:L});throw Error("unsupported directory string type: type="+F+" value="+L)},this.tohex=function(){if(this.dsType==null)this.dsType=this._getDsType();var F=l.asn1.x509.OID.atype2obj(this.sType),L=this.getValueObj(this.dsType,this.sValue),N=new G({array:[F,L]});return this.TLV=N.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.x509.AttributeTypeAndValue,l.asn1.ASN1Object);l.asn1.x509.SubjectPublicKeyInfo=function($){l.asn1.x509.SubjectPublicKeyInfo.superclass.constructor.call(this);var Y=null,X=null,G=l,J=G.asn1,Q=J.DERInteger,W=J.DERBitString,K=J.DERObjectIdentifier,Z=J.DERSequence,H=J.ASN1Util.newObject,z=J.x509,V=z.AlgorithmIdentifier,F=G.crypto,L=F.ECDSA,N=F.DSA;if(this.getASN1Object=function(){if(this.asn1AlgId==null||this.asn1SubjPKey==null)throw"algId and/or subjPubKey not set";var D=new Z({array:[this.asn1AlgId,this.asn1SubjPKey]});return D},this.tohex=function(){var D=this.getASN1Object();return this.hTLV=D.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},this.setPubKey=function(D){try{if(D instanceof F6){var A=H({seq:[{int:{bigint:D.n}},{int:{int:D.e}}]}),B=A.tohex();this.asn1AlgId=new V({name:"rsaEncryption"}),this.asn1SubjPKey=new W({hex:"00"+B})}}catch(M){}try{if(D instanceof l.crypto.ECDSA){var O=new K({name:D.curveName});this.asn1AlgId=new V({name:"ecPublicKey",asn1params:O}),this.asn1SubjPKey=new W({hex:"00"+D.pubKeyHex})}}catch(M){}try{if(D instanceof l.crypto.DSA){var O=new H({seq:[{int:{bigint:D.p}},{int:{bigint:D.q}},{int:{bigint:D.g}}]});this.asn1AlgId=new V({name:"dsa",asn1params:O});var E=new Q({bigint:D.y});this.asn1SubjPKey=new W({hex:"00"+E.tohex()})}}catch(M){}},$!==void 0)this.setPubKey($)};X1(l.asn1.x509.SubjectPublicKeyInfo,l.asn1.ASN1Object);l.asn1.x509.Time=function($){l.asn1.x509.Time.superclass.constructor.call(this);var Y=null,X=null,G=l,J=G.asn1,Q=J.DERUTCTime,W=J.DERGeneralizedTime;if(this.params=null,this.type=null,this.setTimeParams=function(K){this.timeParams=K},this.setByParam=function(K){this.params=K},this.getType=function(K){if(K.match(/^[0-9]{12}Z$/))return"utc";if(K.match(/^[0-9]{14}Z$/))return"gen";if(K.match(/^[0-9]{12}\.[0-9]+Z$/))return"utc";if(K.match(/^[0-9]{14}\.[0-9]+Z$/))return"gen";return null},this.tohex=function(){var K=this.params,Z=null;if(typeof K=="string")K={str:K};if(K!=null&&K.str&&(K.type==null||K.type==null))K.type=this.getType(K.str);if(K!=null&&K.str){if(K.type=="utc")Z=new Q(K.str);if(K.type=="gen")Z=new W(K.str)}else if(this.type=="gen")Z=new W;else Z=new Q;if(Z==null)throw Error("wrong setting for Time");return this.TLV=Z.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};l.asn1.x509.Time_bak=function($){l.asn1.x509.Time_bak.superclass.constructor.call(this);var Y=null,X=null,G=l,J=G.asn1,Q=J.DERUTCTime,W=J.DERGeneralizedTime;if(this.setTimeParams=function(K){this.timeParams=K},this.tohex=function(){var K=null;if(this.timeParams!=null)if(this.type=="utc")K=new Q(this.timeParams);else K=new W(this.timeParams);else if(this.type=="utc")K=new Q;else K=new W;return this.TLV=K.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},this.type="utc",$!==void 0){if($.type!==void 0)this.type=$.type;else if($.str!==void 0){if($.str.match(/^[0-9]{12}Z$/))this.type="utc";if($.str.match(/^[0-9]{14}Z$/))this.type="gen"}this.timeParams=$}};X1(l.asn1.x509.Time,l.asn1.ASN1Object);l.asn1.x509.AlgorithmIdentifier=function($){l.asn1.x509.AlgorithmIdentifier.superclass.constructor.call(this),this.nameAlg=null,this.asn1Alg=null,this.asn1Params=null,this.paramEmpty=!1;var Y=l,X=Y.asn1,G=X.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV;if(this.tohex=function(){if(this.nameAlg===null&&this.asn1Alg===null)throw Error("algorithm not specified");if(this.nameAlg!==null){var Q=null;for(var W in G)if(W===this.nameAlg)Q=G[W];if(Q!==null)return this.hTLV=Q,this.hTLV}if(this.nameAlg!==null&&this.asn1Alg===null)this.asn1Alg=X.x509.OID.name2obj(this.nameAlg);var K=[this.asn1Alg];if(this.asn1Params!==null)K.push(this.asn1Params);var Z=new X.DERSequence({array:K});return this.hTLV=Z.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0){if($.name!==void 0)this.nameAlg=$.name;if($.asn1params!==void 0)this.asn1Params=$.asn1params;if($.paramempty!==void 0)this.paramEmpty=$.paramempty}if(this.asn1Params===null&&this.paramEmpty===!1&&this.nameAlg!==null){if(this.nameAlg.name!==void 0)this.nameAlg=this.nameAlg.name;var J=this.nameAlg.toLowerCase();if(J.substr(-7,7)!=="withdsa"&&J.substr(-9,9)!=="withecdsa")this.asn1Params=new X.DERNull}};X1(l.asn1.x509.AlgorithmIdentifier,l.asn1.ASN1Object);l.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV={SHAwithRSAandMGF1:"300d06092a864886f70d01010a3000",SHA256withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040201a11a301806092a864886f70d010108300b0609608648016503040201a203020120",SHA384withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040202a11a301806092a864886f70d010108300b0609608648016503040202a203020130",SHA512withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040203a11a301806092a864886f70d010108300b0609608648016503040203a203020140"};l.asn1.x509.GeneralName=function($){l.asn1.x509.GeneralName.superclass.constructor.call(this);var Y={rfc822:"81",dns:"82",dn:"a4",uri:"86",ip:"87",otherName:"a0"},X=l,G=X.asn1,J=G.x509,Q=J.X500Name,W=J.OtherName,K=G.DERIA5String,Z=G.DERPrintableString,H=G.DEROctetString,z=G.DERTaggedObject,V=G.ASN1Object,F=Error;if(this.params=null,this.setByParam=function(L){this.params=L},this.tohex=function(){var L=this.params,N,A,D,A=!1;if(L.other!==void 0)N="a0",D=new W(L.other);else if(L.rfc822!==void 0)N="81",D=new K({str:L.rfc822});else if(L.dns!==void 0)N="82",D=new K({str:L.dns});else if(L.dn!==void 0)if(N="a4",A=!0,typeof L.dn==="string")D=new Q({str:L.dn});else if(L.dn instanceof l.asn1.x509.X500Name)D=L.dn;else D=new Q(L.dn);else if(L.ldapdn!==void 0)N="a4",A=!0,D=new Q({ldapstr:L.ldapdn});else if(L.certissuer!==void 0||L.certsubj!==void 0){N="a4",A=!0;var B,O,E=null;if(L.certsubj!==void 0)B=!1,O=L.certsubj;else B=!0,O=L.certissuer;if(O.match(/^[0-9A-Fa-f]+$/))E==O;if(O.indexOf("-----BEGIN ")!=-1)E=B7(O);if(E==null)throw Error("certsubj/certissuer not cert");var M=new e4;M.hex=E;var R;if(B)R=M.getIssuerHex();else R=M.getSubjectHex();D=new V,D.hTLV=R}else if(L.uri!==void 0)N="86",D=new K({str:L.uri});else if(L.ip!==void 0){N="87";var q,_=L.ip;try{if(_.match(/^[0-9a-f]+$/)){var P=_.length;if(P==8||P==16||P==32||P==64)q=_;else throw"err"}else q=CG1(_)}catch(j){throw new F("malformed IP address: "+L.ip+":"+j.message)}D=new H({hex:q})}else throw new F("improper params");var w=new z({tag:N,explicit:A,obj:D});return w.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.x509.GeneralName,l.asn1.ASN1Object);l.asn1.x509.GeneralNames=function($){l.asn1.x509.GeneralNames.superclass.constructor.call(this);var Y=null,X=l,G=X.asn1;if(this.setByParamArray=function(J){for(var Q=0;Q<J.length;Q++){var W=new G.x509.GeneralName(J[Q]);this.asn1Array.push(W)}},this.tohex=function(){var J=new G.DERSequence({array:this.asn1Array});return J.tohex()},this.getEncodedHex=function(){return this.tohex()},this.asn1Array=[],typeof $<"u")this.setByParamArray($)};X1(l.asn1.x509.GeneralNames,l.asn1.ASN1Object);l.asn1.x509.OtherName=function($){l.asn1.x509.OtherName.superclass.constructor.call(this);var Y=null,X=null,G=l,J=G.asn1,Q=J.DERObjectIdentifier,W=J.DERSequence,K=J.ASN1Util.newObject;if(this.params=null,this.setByParam=function(Z){this.params=Z},this.tohex=function(){var Z=this.params;if(Z.oid==null||Z.value==null)throw Error("oid or value not specified");var H=new Q({oid:Z.oid}),z=K({tag:{tag:"a0",explicit:!0,obj:Z.value}}),V=new W({array:[H,z]});return V.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.x509.OtherName,l.asn1.ASN1Object);l.asn1.x509.OID=new function(){var $=l.asn1.DERObjectIdentifier;this.name2oidList={"aes128-CBC":"2.16.840.1.101.3.4.1.2","aes256-CBC":"2.16.840.1.101.3.4.1.42",sha1:"1.3.14.3.2.26",sha256:"2.16.840.1.101.3.4.2.1",sha384:"2.16.840.1.101.3.4.2.2",sha512:"2.16.840.1.101.3.4.2.3",sha224:"2.16.840.1.101.3.4.2.4",md5:"1.2.840.113549.2.5",md2:"1.3.14.7.2.2.1",ripemd160:"1.3.36.3.2.1",hmacWithSHA1:"1.2.840.113549.2.7",hmacWithSHA224:"1.2.840.113549.2.8",hmacWithSHA256:"1.2.840.113549.2.9",hmacWithSHA384:"1.2.840.113549.2.10",hmacWithSHA512:"1.2.840.113549.2.11",MD2withRSA:"1.2.840.113549.1.1.2",MD4withRSA:"1.2.840.113549.1.1.3",MD5withRSA:"1.2.840.113549.1.1.4",SHA1withRSA:"1.2.840.113549.1.1.5","pkcs1-MGF":"1.2.840.113549.1.1.8",rsaPSS:"1.2.840.113549.1.1.10",SHA224withRSA:"1.2.840.113549.1.1.14",SHA256withRSA:"1.2.840.113549.1.1.11",SHA384withRSA:"1.2.840.113549.1.1.12",SHA512withRSA:"1.2.840.113549.1.1.13",SHA1withECDSA:"1.2.840.10045.4.1",SHA224withECDSA:"1.2.840.10045.4.3.1",SHA256withECDSA:"1.2.840.10045.4.3.2",SHA384withECDSA:"1.2.840.10045.4.3.3",SHA512withECDSA:"1.2.840.10045.4.3.4",dsa:"1.2.840.10040.4.1",SHA1withDSA:"1.2.840.10040.4.3",SHA224withDSA:"2.16.840.1.101.3.4.3.1",SHA256withDSA:"2.16.840.1.101.3.4.3.2",rsaEncryption:"1.2.840.113549.1.1.1",commonName:"2.5.4.3",countryName:"2.5.4.6",localityName:"2.5.4.7",stateOrProvinceName:"2.5.4.8",streetAddress:"2.5.4.9",organizationName:"2.5.4.10",organizationalUnitName:"2.5.4.11",domainComponent:"0.9.2342.19200300.100.1.25",userId:"0.9.2342.19200300.100.1.1",surname:"2.5.4.4",givenName:"2.5.4.42",title:"2.5.4.12",distinguishedName:"2.5.4.49",emailAddress:"1.2.840.113549.1.9.1",description:"2.5.4.13",businessCategory:"2.5.4.15",postalCode:"2.5.4.17",uniqueIdentifier:"2.5.4.45",organizationIdentifier:"2.5.4.97",jurisdictionOfIncorporationL:"1.3.6.1.4.1.311.60.2.1.1",jurisdictionOfIncorporationSP:"1.3.6.1.4.1.311.60.2.1.2",jurisdictionOfIncorporationC:"1.3.6.1.4.1.311.60.2.1.3",subjectDirectoryAttributes:"2.5.29.9",subjectKeyIdentifier:"2.5.29.14",keyUsage:"2.5.29.15",subjectAltName:"2.5.29.17",issuerAltName:"2.5.29.18",basicConstraints:"2.5.29.19",cRLNumber:"2.5.29.20",cRLReason:"2.5.29.21",nameConstraints:"2.5.29.30",cRLDistributionPoints:"2.5.29.31",certificatePolicies:"2.5.29.32",anyPolicy:"2.5.29.32.0",policyMappings:"2.5.29.33",authorityKeyIdentifier:"2.5.29.35",policyConstraints:"2.5.29.36",extKeyUsage:"2.5.29.37",inhibitAnyPolicy:"2.5.29.54",authorityInfoAccess:"1.3.6.1.5.5.7.1.1",ocsp:"1.3.6.1.5.5.7.48.1",ocspBasic:"1.3.6.1.5.5.7.48.1.1",ocspNonce:"1.3.6.1.5.5.7.48.1.2",ocspNoCheck:"1.3.6.1.5.5.7.48.1.5",caIssuers:"1.3.6.1.5.5.7.48.2",anyExtendedKeyUsage:"2.5.29.37.0",serverAuth:"1.3.6.1.5.5.7.3.1",clientAuth:"1.3.6.1.5.5.7.3.2",codeSigning:"1.3.6.1.5.5.7.3.3",emailProtection:"1.3.6.1.5.5.7.3.4",timeStamping:"1.3.6.1.5.5.7.3.8",ocspSigning:"1.3.6.1.5.5.7.3.9",smtpUTF8Mailbox:"1.3.6.1.5.5.7.8.9",dateOfBirth:"1.3.6.1.5.5.7.9.1",placeOfBirth:"1.3.6.1.5.5.7.9.2",gender:"1.3.6.1.5.5.7.9.3",countryOfCitizenship:"1.3.6.1.5.5.7.9.4",countryOfResidence:"1.3.6.1.5.5.7.9.5",ecPublicKey:"1.2.840.10045.2.1","P-256":"1.2.840.10045.3.1.7",secp256r1:"1.2.840.10045.3.1.7",secp256k1:"1.3.132.0.10",secp384r1:"1.3.132.0.34",secp521r1:"1.3.132.0.35",pkcs5PBES2:"1.2.840.113549.1.5.13",pkcs5PBKDF2:"1.2.840.113549.1.5.12","des-EDE3-CBC":"1.2.840.113549.3.7",data:"1.2.840.113549.1.7.1","signed-data":"1.2.840.113549.1.7.2","enveloped-data":"1.2.840.113549.1.7.3","digested-data":"1.2.840.113549.1.7.5","encrypted-data":"1.2.840.113549.1.7.6","authenticated-data":"1.2.840.113549.1.9.16.1.2",tstinfo:"1.2.840.113549.1.9.16.1.4",signingCertificate:"1.2.840.113549.1.9.16.2.12",timeStampToken:"1.2.840.113549.1.9.16.2.14",signaturePolicyIdentifier:"1.2.840.113549.1.9.16.2.15",etsArchiveTimeStamp:"1.2.840.113549.1.9.16.2.27",signingCertificateV2:"1.2.840.113549.1.9.16.2.47",etsArchiveTimeStampV2:"1.2.840.113549.1.9.16.2.48",extensionRequest:"1.2.840.113549.1.9.14",contentType:"1.2.840.113549.1.9.3",messageDigest:"1.2.840.113549.1.9.4",signingTime:"1.2.840.113549.1.9.5",counterSignature:"1.2.840.113549.1.9.6",archiveTimeStampV3:"0.4.0.1733.2.4",pdfRevocationInfoArchival:"1.2.840.113583.1.1.8",adobeTimeStamp:"1.2.840.113583.1.1.9.1",smimeMailboxLegacy:"2.23.140.1.5.1.1",smimeMailboxMulti:"2.23.140.1.5.1.2",smimeMailboxStrict:"2.23.140.1.5.1.3",smimeOrganizationLegacy:"2.23.140.1.5.2.1",smimeOrganizationMulti:"2.23.140.1.5.2.2",smimeOrganizationStrict:"2.23.140.1.5.2.3",smimeSponsorLegacy:"2.23.140.1.5.3.1",smimeSponsorMulti:"2.23.140.1.5.3.2",smimeSponsorStrict:"2.23.140.1.5.3.3",smimeIndividualLegacy:"2.23.140.1.5.4.1",smimeIndividualMulti:"2.23.140.1.5.4.2",smimeIndividualStrict:"2.23.140.1.5.4.3"},this.atype2oidList={CN:"2.5.4.3",L:"2.5.4.7",ST:"2.5.4.8",O:"2.5.4.10",OU:"2.5.4.11",C:"2.5.4.6",STREET:"2.5.4.9",DC:"0.9.2342.19200300.100.1.25",UID:"0.9.2342.19200300.100.1.1",SN:"2.5.4.4",T:"2.5.4.12",GN:"2.5.4.42",DN:"2.5.4.49",E:"1.2.840.113549.1.9.1",description:"2.5.4.13",businessCategory:"2.5.4.15",postalCode:"2.5.4.17",serialNumber:"2.5.4.5",uniqueIdentifier:"2.5.4.45",organizationIdentifier:"2.5.4.97",jurisdictionOfIncorporationL:"1.3.6.1.4.1.311.60.2.1.1",jurisdictionOfIncorporationSP:"1.3.6.1.4.1.311.60.2.1.2",jurisdictionOfIncorporationC:"1.3.6.1.4.1.311.60.2.1.3"},this.objCache={},this.name2obj=function(Y){if(typeof this.objCache[Y]<"u")return this.objCache[Y];if(typeof this.name2oidList[Y]>"u")throw"Name of ObjectIdentifier not defined: "+Y;var X=this.name2oidList[Y],G=new $({oid:X});return this.objCache[Y]=G,G},this.atype2obj=function(Y){if(this.objCache[Y]!==void 0)return this.objCache[Y];var X;if(Y.match(/^\d+\.\d+\.[0-9.]+$/))X=Y;else if(this.atype2oidList[Y]!==void 0)X=this.atype2oidList[Y];else if(this.name2oidList[Y]!==void 0)X=this.name2oidList[Y];else throw Error("AttributeType name undefined: "+Y);var G=new $({oid:X});return this.objCache[Y]=G,G},this.registerOIDs=function(Y){if(!this.checkOIDs(Y))return;for(var X in Y)this.name2oidList[X]=Y[X]},this.checkOIDs=function(Y){try{var X=Object.keys(Y);if(X.length==0)return!1;return X.map(function(G,J,Q){var W=this[G];if(!W.match(/^[0-2]\.[0-9.]+$/))throw Error("value is not OID")},Y),!0}catch(G){return!1}}};l.asn1.x509.OID.oid2name=function($){var Y=l.asn1.x509.OID.name2oidList;for(var X in Y)if(Y[X]==$)return X;return""};l.asn1.x509.OID.oid2atype=function($){var Y=l.asn1.x509.OID.atype2oidList;for(var X in Y)if(Y[X]==$)return X;return $};l.asn1.x509.OID.name2oid=function($){if($.match(/^[0-9.]+$/))return $;var Y=l.asn1.x509.OID.name2oidList;if(Y[$]===void 0)return"";return Y[$]};l.asn1.x509.X509Util={};l.asn1.x509.X509Util.newCertPEM=function($){var Y=l.asn1.x509,X=Y.TBSCertificate,G=Y.Certificate,J=new G($);return J.getPEM()};if(typeof l>"u"||!l)l={};if(typeof l.asn1>"u"||!l.asn1)l.asn1={};if(typeof l.asn1.cms>"u"||!l.asn1.cms)l.asn1.cms={};l.asn1.cms.Attribute=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSequence,Q=G.DERSet,W=G.DERObjectIdentifier;this.params=null,this.typeOid=null,this.setByParam=function(K){this.params=K},this.getValueArray=function(){throw new Y("not yet implemented abstract")},this.tohex=function(){var K=new W({oid:this.typeOid}),Z=new Q({array:this.getValueArray()}),H=new J({array:[K,Z]});return H.tohex()},this.getEncodedHex=function(){return this.tohex()}};X1(l.asn1.cms.Attribute,l.asn1.ASN1Object);l.asn1.cms.ContentType=function($){var Y=l,X=Y.asn1;if(X.cms.ContentType.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.3",this.getValueArray=function(){var G=new X.DERObjectIdentifier(this.params.type);return[G]},$!=null)this.setByParam($)};X1(l.asn1.cms.ContentType,l.asn1.cms.Attribute);l.asn1.cms.MessageDigest=function($){var Y=l,X=Y.asn1,G=X.DEROctetString,J=X.cms;if(J.MessageDigest.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.4",this.getValueArray=function(){var Q=new G(this.params);return[Q]},$!=null)this.setByParam($)};X1(l.asn1.cms.MessageDigest,l.asn1.cms.Attribute);l.asn1.cms.SigningTime=function($){var Y=l,X=Y.asn1;if(X.cms.SigningTime.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.5",this.getValueArray=function(){var G=new X.x509.Time(this.params);return[G]},$!=null)this.setByParam($)};X1(l.asn1.cms.SigningTime,l.asn1.cms.Attribute);l.asn1.cms.SigningCertificate=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSequence,Q=G.cms,W=Q.ESSCertID,K=X.crypto;if(Q.SigningCertificate.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.16.2.12",this.getValueArray=function(){if(this.params==null||this.params==null||this.params.array==null)throw new Y("parameter 'array' not specified");var Z=this.params.array,H=[];for(var z=0;z<Z.length;z++){var V=Z[z];if($.hasis==!1&&(typeof V=="string"&&(V.indexOf("-----BEGIN")!=-1||M1.isASN1HEX(V))))V={cert:V};if(V.hasis!=!1&&$.hasis==!1)V.hasis=!1;H.push(new W(V))}var F=new J({array:H}),L=new J({array:[F]});return[L]},$!=null)this.setByParam($)};X1(l.asn1.cms.SigningCertificate,l.asn1.cms.Attribute);l.asn1.cms.ESSCertID=function($){l.asn1.cms.ESSCertID.superclass.constructor.call(this);var Y=Error,X=l,G=X.asn1,J=G.DEROctetString,Q=G.DERSequence,W=G.cms.IssuerSerial;if(this.params=null,this.getCertHash=function(K,Z){if(K.hash!=null)return K.hash;if(typeof K=="string"&&K.indexOf("-----BEGIN")==-1&&!M1.isASN1HEX(K))return K;var H;if(typeof K=="string")H=K;else if(K.cert!=null)H=K.cert;else throw new Y("hash nor cert unspecified");var z;if(H.indexOf("-----BEGIN")!=-1)z=B7(H);else z=H;if(typeof K=="string"){if(K.indexOf("-----BEGIN")!=-1)z=B7(K);else if(M1.isASN1HEX(K))z=K}var V;if(K.alg!=null)V=K.alg;else if(Z!=null)V=Z;else throw new Y("hash alg unspecified");return X.crypto.Util.hashHex(z,V)},this.tohex=function(){var K=this.params,Z=this.getCertHash(K,"sha1"),H=[];if(H.push(new J({hex:Z})),typeof K=="string"&&K.indexOf("-----BEGIN")!=-1||K.cert!=null&&K.hasis!=!1||K.issuer!=null&&K.serial!=null)H.push(new W(K));var z=new Q({array:H});return z.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.ESSCertID,l.asn1.ASN1Object);l.asn1.cms.SigningCertificateV2=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSequence,Q=G.x509,W=G.cms,K=W.ESSCertIDv2,Z=X.crypto;if(W.SigningCertificateV2.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.16.2.47",this.getValueArray=function(){if(this.params==null||this.params==null||this.params.array==null)throw new Y("parameter 'array' not specified");var H=this.params.array,z=[];for(var V=0;V<H.length;V++){var F=H[V];if(($.alg!=null||$.hasis==!1)&&(typeof F=="string"&&(F.indexOf("-----BEGIN")!=-1||M1.isASN1HEX(F))))F={cert:F};if(F.alg==null&&$.alg!=null)F.alg=$.alg;if(F.hasis!=!1&&$.hasis==!1)F.hasis=!1;z.push(new K(F))}var L=new J({array:z}),N=new J({array:[L]});return[N]},$!=null)this.setByParam($)};X1(l.asn1.cms.SigningCertificateV2,l.asn1.cms.Attribute);l.asn1.cms.ESSCertIDv2=function($){l.asn1.cms.ESSCertIDv2.superclass.constructor.call(this);var Y=Error,X=l,G=X.asn1,J=G.DEROctetString,Q=G.DERSequence,W=G.cms.IssuerSerial,K=G.x509.AlgorithmIdentifier;if(this.params=null,this.tohex=function(){var Z=this.params,H=this.getCertHash(Z,"sha256"),z=[];if(Z.alg!=null&&Z.alg!="sha256")z.push(new K({name:Z.alg}));if(z.push(new J({hex:H})),typeof Z=="string"&&Z.indexOf("-----BEGIN")!=-1||Z.cert!=null&&Z.hasis!=!1||Z.issuer!=null&&Z.serial!=null)z.push(new W(Z));var V=new Q({array:z});return V.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.ESSCertIDv2,l.asn1.cms.ESSCertID);l.asn1.cms.IssuerSerial=function($){var Y=Error,X=l,G=X.asn1,J=G.DERInteger,Q=G.DERSequence,W=G.cms,K=G.x509,Z=K.GeneralNames,H=e4;if(W.IssuerSerial.superclass.constructor.call(this),this.setByParam=function(z){this.params=z},this.tohex=function(){var z=this.params,V,F;if(typeof z=="string"&&z.indexOf("-----BEGIN")!=-1||z.cert!=null){var L;if(z.cert!=null)L=z.cert;else L=z;var N=new H;N.readCertPEM(L),V=N.getIssuer(),F={hex:N.getSerialNumberHex()}}else if(z.issuer!=null&&z.serial)V=z.issuer,F=z.serial;else throw new Y("cert or issuer and serial parameter not specified");var D=new Z([{dn:V}]),A=new J(F),B=new Q({array:[D,A]});return B.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.IssuerSerial,l.asn1.ASN1Object);l.asn1.cms.SignerIdentifier=function($){var Y=l,X=Y.asn1,G=X.DERInteger,J=X.DERSequence,Q=X.cms,W=Q.IssuerAndSerialNumber,K=Q.SubjectKeyIdentifier,Z=X.x509,H=Z.X500Name,z=e4,V=Error;if(Q.SignerIdentifier.superclass.constructor.call(this),this.params=null,this.tohex=function(){var F=this.params;if(F.type=="isssn"){var L=new W(F);return L.tohex()}else if(F.type=="skid"){var N=new K(F);return N.tohex()}else throw Error("wrong property for isssn or skid")},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.SignerIdentifier,l.asn1.ASN1Object);l.asn1.cms.IssuerAndSerialNumber=function($){var Y=l,X=Y.asn1,G=X.DERInteger,J=X.DERSequence,Q=X.cms,W=X.x509,K=W.X500Name,Z=e4,H=Error;if(Q.IssuerAndSerialNumber.superclass.constructor.call(this),this.params=null,this.tohex=function(){var z=this.params,V,F;if(typeof z=="string"&&z.indexOf("-----BEGIN")!=-1||z.cert!=null){var L;if(z.cert!=null)L=z.cert;else L=z;var N=new Z;N.readCertPEM(L),V=N.getIssuer(),F={hex:N.getSerialNumberHex()}}else if(z.issuer!=null&&z.serial)V=z.issuer,F=z.serial;else throw new H("cert or issuer and serial parameter not specified");var D=new K(V),A=new G(F),B=new J({array:[D,A]});return B.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(z){this.params=z},$!=null)this.setByParam($)};X1(l.asn1.cms.IssuerAndSerialNumber,l.asn1.ASN1Object);l.asn1.cms.SubjectKeyIdentifier=function($){var Y=l,X=Y.asn1,G=X.DERInteger,J=X.DERSequence,Q=X.ASN1Util.newObject,W=X.cms,K=W.IssuerAndSerialName,Z=W.SubjectKeyIdentifier,H=X.x509,z=H.X500Name,V=e4,F=Error;if(W.SubjectKeyIdentifier.superclass.constructor.call(this),this.tohex=function(){var L=this.params;if(L.cert==null&&L.skid==null)throw new F("property cert nor skid undefined");var N;if(L.cert!=null){var D=new V(L.cert),A=D.getExtSubjectKeyIdentifier();N=A.kid.hex}else if(L.skid!=null)N=L.skid;var B=Q({tag:{tage:"a0",obj:{octstr:{hex:N}}}});return B.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.SubjectKeyIdentifier,l.asn1.ASN1Object);l.asn1.cms.AttributeList=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSet,Q=G.cms;if(Q.AttributeList.superclass.constructor.call(this),this.params=null,this.hTLV=null,this.setByParam=function(W){this.params=W},this.tohex=function(){var W=this.params;if(this.hTLV!=null)return this.hTLV;var K=!0;if(W.sortflag!=null)K=W.sortflag;var Z=W.array,H=[];for(var z=0;z<Z.length;z++){var V=Z[z],F=V.attr;if(F=="contentType")H.push(new Q.ContentType(V));else if(F=="messageDigest")H.push(new Q.MessageDigest(V));else if(F=="signingTime")H.push(new Q.SigningTime(V));else if(F=="signingCertificate")H.push(new Q.SigningCertificate(V));else if(F=="signingCertificateV2")H.push(new Q.SigningCertificateV2(V));else if(F=="signaturePolicyIdentifier")H.push(new l.asn1.cades.SignaturePolicyIdentifier(V));else if(F=="signatureTimeStamp"||F=="timeStampToken")H.push(new l.asn1.cades.SignatureTimeStamp(V));else throw new Y("unknown attr: "+F)}var L=new J({array:H,sortflag:K});return this.hTLV=L.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.AttributeList,l.asn1.ASN1Object);l.asn1.cms.SignerInfo=function($){var Y=Error,X=l,G=X.asn1,J=G.DERInteger,Q=G.DEROctetString,W=G.DERSequence,K=G.DERTaggedObject,Z=G.cms,H=Z.SignerIdentifier,z=Z.AttributeList,V=Z.ContentType,F=Z.EncapsulatedContentInfo,L=Z.MessageDigest,N=Z.SignedData,D=G.x509,A=D.AlgorithmIdentifier,B=X.crypto,O=Z8;if(Z.SignerInfo.superclass.constructor.call(this),this.params=null,this.sign=function(){var E=this.params,M=E.sigalg,R=new z(E.sattrs).tohex(),q=O.getKey(E.signkey),_=new B.Signature({alg:M});_.init(q),_.updateHex(R);var P=_.sign();E.sighex=P},this.tohex=function(){var E=this.params,M=[];if(M.push(new J({int:E.version})),M.push(new H(E.id)),M.push(new A({name:E.hashalg})),E.sattrs!=null){var R=new z(E.sattrs);try{M.push(new K({tag:"a0",explicit:!1,obj:R}))}catch(_){throw new Y("si sattr error: "+_)}}if(E.sigalgfield!=null)M.push(new A({name:E.sigalgfield}));else M.push(new A({name:E.sigalg}));if(E.sighex==null&&E.signkey!=null)this.sign();if(M.push(new Q({hex:E.sighex})),E.uattrs!=null){var R=new z(E.uattrs);try{M.push(new K({tag:"a1",explicit:!1,obj:R}))}catch(P){throw new Y("si uattr error: "+P)}}var q=new W({array:M});return q.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.SignerInfo,l.asn1.ASN1Object);l.asn1.cms.EncapsulatedContentInfo=function($){var Y=l,X=Y.asn1,G=X.DERTaggedObject,J=X.DERSequence,Q=X.DERObjectIdentifier,W=X.DEROctetString,K=X.cms;if(K.EncapsulatedContentInfo.superclass.constructor.call(this),this.params=null,this.tohex=function(){var Z=this.params,H=[];if(H.push(new Q(Z.type)),Z.content!=null&&(Z.content.hex!=null||Z.content.str!=null)&&Z.isDetached!=!0){var z=new W(Z.content),V=new G({tag:"a0",explicit:!0,obj:z});H.push(V)}var F=new J({array:H});return F.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(Z){this.params=Z},$!=null)this.setByParam($)};X1(l.asn1.cms.EncapsulatedContentInfo,l.asn1.ASN1Object);l.asn1.cms.ContentInfo=function($){var Y=l,X=Y.asn1,G=X.DERTaggedObject,J=X.DERSequence,Q=X.DERObjectIdentifier,W=X.x509,K=W.OID.name2obj;if(l.asn1.cms.ContentInfo.superclass.constructor.call(this),this.params=null,this.tohex=function(){var Z=this.params,H=[];H.push(new Q(Z.type));var z=new G({tag:"a0",explicit:!0,obj:Z.obj});H.push(z);var V=new J({array:H});return V.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(Z){this.params=Z},$!=null)this.setByParam($)};X1(l.asn1.cms.ContentInfo,l.asn1.ASN1Object);l.asn1.cms.SignedData=function($){var Y=Error,X=l,G=X.asn1,J=G.ASN1Object,Q=G.DERInteger,W=G.DERSet,K=G.DERSequence,Z=G.DERTaggedObject,H=G.cms,z=H.EncapsulatedContentInfo,V=H.SignerInfo,F=H.ContentInfo,L=H.CertificateSet,N=H.RevocationInfoChoices,D=G.x509,A=D.AlgorithmIdentifier;if(l.asn1.cms.SignedData.superclass.constructor.call(this),this.params=null,this.checkAndFixParam=function(){var B=this.params;this._setDigestAlgs(B),this._setContentTypeByEContent(B),this._setMessageDigestByEContent(B),this._setSignerInfoVersion(B),this._setSignedDataVersion(B)},this._setDigestAlgs=function(B){var O={},E=B.sinfos;for(var M=0;M<E.length;M++){var R=E[M];O[R.hashalg]=1}B.hashalgs=Object.keys(O).sort()},this._setContentTypeByEContent=function(B){var O=B.econtent.type,E=B.sinfos;for(var M=0;M<E.length;M++){var R=E[M],q=this._getAttrParamByName(R,"contentType");q.type=O}},this._setMessageDigestByEContent=function(B){var O=B.econtent,E=B.econtent.type,M=O.content.hex;if(M==null&&O.type=="data"&&O.content.str!=null)M=dH(O.content.str);var R=B.sinfos;for(var q=0;q<R.length;q++){var _=R[q],P=_.hashalg,w=this._getAttrParamByName(_,"messageDigest"),j=l.crypto.Util.hashHex(M,P);w.hex=j}},this._getAttrParamByName=function(B,O){var E=B.sattrs.array;for(var M=0;M<E.length;M++)if(E[M].attr==O)return E[M]},this._setSignerInfoVersion=function(B){var O=B.sinfos;for(var E=0;E<O.length;E++){var M=O[E],R=1;if(M.id.type=="skid")R=3;M.version=R}},this._setSignedDataVersion=function(B){var O=this._getSignedDataVersion(B);B.version=O},this._getSignedDataVersion=function(B){if(B.revinfos!=null){var O=B.revinfos;for(var E=0;E<O.length;E++){var M=O[E];if(M.ocsp!=null)return 5}}var R=B.sinfos;for(var E=0;E<R.length;E++){var q=B.sinfos[E];if(q.version==3)return 3}if(B.econtent.type!="data")return 3;return 1},this.tohex=function(){var B=this.params;if(this.getEncodedHexPrepare!=null)this.getEncodedHexPrepare();if(B.fixed!=!0)this.checkAndFixParam();var O=[];O.push(new Q({int:B.version}));var E=[];for(var M=0;M<B.hashalgs.length;M++){var R=B.hashalgs[M];E.push(new A({name:R}))}if(O.push(new W({array:E})),O.push(new z(B.econtent)),B.certs!=null)O.push(new L(B.certs));if(B.revinfos!=null)O.push(new N(B.revinfos));var q=[];for(var M=0;M<B.sinfos.length;M++){var _=B.sinfos[M];q.push(new V(_))}O.push(new W({array:q}));var P=new K({array:O});return P.tohex()},this.getEncodedHex=function(){return this.tohex()},this.getContentInfo=function(){var B=new F({type:"signed-data",obj:this});return B},this.getContentInfoEncodedHex=function(){return this.getContentInfo().tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.SignedData,l.asn1.ASN1Object);l.asn1.cms.CertificateSet=function($){l.asn1.cms.CertificateSet.superclass.constructor.call(this);var Y=Error,X=l.asn1,G=X.DERTaggedObject,J=X.DERSet,Q=X.ASN1Object;if(this.params=null,this.tohex=function(){var W=this.params,K=[],Z;if(W instanceof Array)Z=W;else if(W.array!=null)Z=W.array;else throw new Y("cert array not specified");for(var H=0;H<Z.length;H++){var z=Z[H],V=B7(z),F=new Q;F.hTLV=V,K.push(F)}var L={array:K};if(W.sortflag==!1)L.sortflag=!1;var N=new J(L),D=new G({tag:"a0",explicit:!1,obj:N});return D.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.CertificateSet,l.asn1.ASN1Object);l.asn1.cms.RevocationInfoChoices=function($){if(l.asn1.cms.RevocationInfoChoices.superclass.constructor.call(this),this.params=null,this.tohex=function(){var Y=this.params;if(!Y instanceof Array)throw Error("params is not array");var X=[];for(var G=0;G<Y.length;G++)X.push(new l.asn1.cms.RevocationInfoChoice(Y[G]));var J=l.asn1.ASN1Util.newObject({tag:{tagi:"a1",obj:{set:X}}});return J.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.RevocationInfoChoices,l.asn1.ASN1Object);l.asn1.cms.RevocationInfoChoice=function($){if(l.asn1.cms.RevocationInfoChoice.superclass.constructor.call(this),this.params=null,this.tohex=function(){var Y=this.params;if(Y.crl!=null&&typeof Y.crl=="string"){var X=Y.crl;if(Y.crl.indexOf("-----BEGIN")!=-1)X=B7(Y.crl);return X}else if(Y.ocsp!=null){var G=l.asn1.ASN1Util.newObject({tag:{tagi:"a1",obj:new l.asn1.cms.OtherRevocationFormat(Y)}});return G.tohex()}else throw Error("property crl or ocsp undefined")},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.RevocationInfoChoice,l.asn1.ASN1Object);l.asn1.cms.OtherRevocationFormat=function($){l.asn1.cms.OtherRevocationFormat.superclass.constructor.call(this);var Y=Error,X=l,G=X.asn1,J=G.ASN1Util.newObject,Q=X.lang.String.isHex;if(this.params=null,this.tohex=function(){var W=this.params;if(W.ocsp==null)throw new Y("property ocsp not specified");if(!Q(W.ocsp)||!M1.isASN1HEX(W.ocsp))throw new Y("ocsp value not ASN.1 hex string");var K=J({seq:[{oid:"1.3.6.1.5.5.7.16.2"},{asn1:{tlv:W.ocsp}}]});return K.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cms.OtherRevocationFormat,l.asn1.ASN1Object);l.asn1.cms.CMSUtil=new function(){};l.asn1.cms.CMSUtil.newSignedData=function($){return new l.asn1.cms.SignedData($)};l.asn1.cms.CMSUtil.verifySignedData=function($){var Y=l,X=Y.asn1,G=X.cms,J=G.SignerInfo,Q=G.SignedData,W=G.SigningTime,K=G.SigningCertificate,Z=G.SigningCertificateV2,H=X.cades,z=H.SignaturePolicyIdentifier,V=Y.lang.String.isHex,F=M1,L=F.getVbyList,N=F.getTLVbyList,D=F.getIdxbyList,A=F.getChildIdx,B=F.getTLV,O=F.oidname,E=Y.crypto.Util.hashHex;if($.cms===void 0&&!V($.cms));var M=$.cms,R=function(v,x){var y;for(var d=3;d<6;d++)if(y=D(v,0,[1,0,d]),y!==void 0){var u=v.substr(y,2);if(u==="a0")x.certsIdx=y;if(u==="a1")x.revinfosIdx=y;if(u==="31")x.signerinfosIdx=y}},q=function(v,x){var y=x.signerinfosIdx;if(y===void 0)return;var d=A(v,y);x.signerInfoIdxList=d;for(var u=0;u<d.length;u++){var b=d[u],g={idx:b};_(v,g),x.signerInfos.push(g)}},_=function(v,x){var y=x.idx;x.signerid_issuer1=N(v,y,[1,0],"30"),x.signerid_serial1=L(v,y,[1,1],"02"),x.hashalg=O(L(v,y,[2,0],"06"));var d=D(v,y,[3],"a0");x.idxSignedAttrs=d,P(v,x,d);var u=A(v,y),b=u.length;if(b<6)throw"malformed SignerInfo";x.sigalg=O(L(v,y,[b-2,0],"06")),x.sigval=L(v,y,[b-1],"04")},P=function(v,x,y){var d=A(v,y);x.signedAttrIdxList=d;for(var u=0;u<d.length;u++){var b=d[u],g=L(v,b,[0],"06"),p;if(g==="2a864886f70d010905")p=S9(L(v,b,[1,0])),x.saSigningTime=p;else if(g==="2a864886f70d010904")p=L(v,b,[1,0],"04"),x.saMessageDigest=p}},w=function(v,x){if(L(v,0,[0],"06")!=="2a864886f70d010702")return x;x.cmsType="signedData",x.econtent=L(v,0,[1,0,2,1,0]),R(v,x),x.signerInfos=[],q(v,x)},j=function(v,x){var y=x.parse.signerInfos,d=y.length,u=!0;for(var b=0;b<d;b++){var g=y[b];if(k(v,x,g,b),!g.isValid)u=!1}x.isValid=u},C=function(v,x,y,d){var u=x.parse.certsIdx,b;if(x.certs===void 0){b=[],x.certkeys=[];var g=A(v,u);for(var p=0;p<g.length;p++){var h=B(v,g[p]),n=new e4;n.readCertHex(h),b[p]=n,x.certkeys[p]=n.getPublicKey()}x.certs=b}else b=x.certs;x.cccc=b.length,x.cccci=g.length;for(var p=0;p<b.length;p++){var t=n.getIssuerHex(),s=n.getSerialNumberHex();if(y.signerid_issuer1===t&&y.signerid_serial1===s)y.certkey_idx=p}},k=function(v,x,y,d){y.verifyDetail={};var u=y.verifyDetail,b=x.parse.econtent,g=y.hashalg,p=y.saMessageDigest;if(u.validMessageDigest=!1,E(b,g)===p)u.validMessageDigest=!0;C(v,x,y,d),u.validSignatureValue=!1;var h=y.sigalg,n="31"+B(v,y.idxSignedAttrs).substr(2);y.signedattrshex=n;var t=x.certs[y.certkey_idx].getPublicKey(),s=new l.crypto.Signature({alg:h});s.init(t),s.updateHex(n);var K0=s.verify(y.sigval);if(u.validSignatureValue_isValid=K0,K0===!0)u.validSignatureValue=!0;if(y.isValid=!1,u.validMessageDigest&&u.validSignatureValue)y.isValid=!0},S=function(){},I={isValid:!1,parse:{}};return w(M,I.parse),j(M,I),I};l.asn1.cms.CMSParser=function(){var $=Error,Y=e4,X=new Y,G=M1,J=G.getV,Q=G.getTLV,W=G.getIdxbyList,K=G.getTLVbyList,Z=G.getTLVbyListEx,H=G.getVbyList,z=G.getVbyListEx,V=G.getChildIdx;this.getCMSSignedData=function(F){var L=K(F,0,[1,0]),N=this.getSignedData(L);return N},this.getSignedData=function(F){var L=V(F,0),N={},D=J(F,L[0]),A=parseInt(D,16);N.version=A;var B=Q(F,L[1]);N.hashalgs=this.getHashAlgArray(B);var O=Q(F,L[2]);N.econtent=this.getEContent(O);var E=Z(F,0,["[0]"]);if(E!=null)N.certs=this.getCertificateSet(E);var M=Z(F,0,["[1]"]);if(M!=null);var R=Z(F,0,[3]);return N.sinfos=this.getSignerInfos(R),N},this.getHashAlgArray=function(F){var L=V(F,0),N=new Y,D=[];for(var A=0;A<L.length;A++){var B=Q(F,L[A]),O=N.getAlgorithmIdentifierName(B);D.push(O)}return D},this.getEContent=function(F){var L={},N=H(F,0,[0]),D=H(F,0,[1,0]);return L.type=l.asn1.x509.OID.oid2name(M1.hextooidstr(N)),L.content={hex:D},L},this.getSignerInfos=function(F){var L=[],N=V(F,0);for(var D=0;D<N.length;D++){var A=Q(F,N[D]),B=this.getSignerInfo(A);L.push(B)}return L},this.getSignerInfo=function(F){var L={},N=V(F,0),D=G.getInt(F,N[0],-1);if(D!=-1)L.version=D;var A=Q(F,N[1]),B=this.getIssuerAndSerialNumber(A);L.id=B;var O=Q(F,N[2]),E=X.getAlgorithmIdentifierName(O);L.hashalg=E;var M=Z(F,0,["[0]"]);if(M!=null){var R=this.getAttributeList(M);L.sattrs=R}var q=Z(F,0,[3]),_=X.getAlgorithmIdentifierName(q);L.sigalg=_;var P=z(F,0,[4]);L.sighex=P;var w=Z(F,0,["[1]"]);if(w!=null){var j=this.getAttributeList(w);L.uattrs=j}return L},this.getSignerIdentifier=function(F){if(F.substr(0,2)=="30")return this.getIssuerAndSerialNumber(F);else throw Error("SKID of signerIdentifier not supported")},this.getIssuerAndSerialNumber=function(F){var L={type:"isssn"},N=V(F,0),D=Q(F,N[0]);L.issuer=X.getX500Name(D);var A=J(F,N[1]);return L.serial={hex:A},L},this.getAttributeList=function(F){var L=[],N=V(F,0);for(var D=0;D<N.length;D++){var A=Q(F,N[D]),B=this.getAttribute(A);L.push(B)}return{array:L}},this.getAttribute=function(F){var L={},N=V(F,0),D=G.getOID(F,N[0]),A=l.asn1.x509.OID.oid2name(D);L.attr=A;var B=Q(F,N[1]),O=V(B,0);if(O.length==1)L.valhex=Q(B,O[0]);else{var E=[];for(var M=0;M<O.length;M++)E.push(Q(B,O[M]));L.valhex=E}if(A=="contentType")this.setContentType(L);else if(A=="messageDigest")this.setMessageDigest(L);else if(A=="signingTime")this.setSigningTime(L);else if(A=="signingCertificate")this.setSigningCertificate(L);else if(A=="signingCertificateV2")this.setSigningCertificateV2(L);else if(A=="signaturePolicyIdentifier")this.setSignaturePolicyIdentifier(L);return L},this.setContentType=function(F){var L=G.getOIDName(F.valhex,0,null);if(L!=null)F.type=L,delete F.valhex},this.setSigningTime=function(F){var L=J(F.valhex,0),N=S9(L);F.str=N,delete F.valhex},this.setMessageDigest=function(F){var L=J(F.valhex,0);F.hex=L,delete F.valhex},this.setSigningCertificate=function(F){var L=V(F.valhex,0);if(L.length>0){var N=Q(F.valhex,L[0]),D=V(N,0),A=[];for(var B=0;B<D.length;B++){var O=Q(N,D[B]),E=this.getESSCertID(O);A.push(E)}F.array=A}if(L.length>1){var M=Q(F.valhex,L[1]);F.polhex=M}delete F.valhex},this.setSignaturePolicyIdentifier=function(F){var L=V(F.valhex,0);if(L.length>0){var N=G.getOID(F.valhex,L[0]);F.oid=N}if(L.length>1){var D=new Y,A=V(F.valhex,L[1]),B=Q(F.valhex,A[0]),O=D.getAlgorithmIdentifierName(B);F.alg=O;var E=J(F.valhex,A[1]);F.hash=E}delete F.valhex},this.setSigningCertificateV2=function(F){var L=V(F.valhex,0);if(L.length>0){var N=Q(F.valhex,L[0]),D=V(N,0),A=[];for(var B=0;B<D.length;B++){var O=Q(N,D[B]),E=this.getESSCertIDv2(O);A.push(E)}F.array=A}if(L.length>1){var M=Q(F.valhex,L[1]);F.polhex=M}delete F.valhex},this.getESSCertID=function(F){var L={},N=V(F,0);if(N.length>0){var D=J(F,N[0]);L.hash=D}if(N.length>1){var A=Q(F,N[1]),B=this.getIssuerSerial(A);if(B.serial!=null)L.serial=B.serial;if(B.issuer!=null)L.issuer=B.issuer}return L},this.getESSCertIDv2=function(F){var L={},N=V(F,0);if(N.length<1||3<N.length)throw new $("wrong number of elements");var D=0;if(F.substr(N[0],2)=="30"){var A=Q(F,N[0]);L.alg=X.getAlgorithmIdentifierName(A),D++}else L.alg="sha256";var B=J(F,N[D]);if(L.hash=B,N.length>D+1){var O=Q(F,N[D+1]),E=this.getIssuerSerial(O);L.issuer=E.issuer,L.serial=E.serial}return L},this.getIssuerSerial=function(F){var L={},N=V(F,0),D=Q(F,N[0]),A=X.getGeneralNames(D),B=A[0].dn;L.issuer=B;var O=J(F,N[1]);return L.serial={hex:O},L},this.getCertificateSet=function(F){var L=V(F,0),N=[];for(var D=0;D<L.length;D++){var A=Q(F,L[D]);if(A.substr(0,2)=="30"){var B=RG(A,"CERTIFICATE");N.push(B)}}return{array:N,sortflag:!1}}};if(typeof l>"u"||!l)l={};if(typeof l.asn1>"u"||!l.asn1)l.asn1={};if(typeof l.asn1.tsp>"u"||!l.asn1.tsp)l.asn1.tsp={};l.asn1.tsp.TimeStampToken=function($){var Y=l,X=Y.asn1,G=X.tsp;if(G.TimeStampToken.superclass.constructor.call(this),this.params=null,this.getEncodedHexPrepare=function(){var J=new G.TSTInfo(this.params.econtent.content);this.params.econtent.content.hex=J.tohex()},$!=null)this.setByParam($)};X1(l.asn1.tsp.TimeStampToken,l.asn1.cms.SignedData);l.asn1.tsp.TSTInfo=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSequence,Q=G.DERInteger,W=G.DERBoolean,K=G.DERGeneralizedTime,Z=G.DERObjectIdentifier,H=G.DERTaggedObject,z=G.tsp,V=z.MessageImprint,F=z.Accuracy,L=G.x509.X500Name,N=G.x509.GeneralName;if(z.TSTInfo.superclass.constructor.call(this),this.dVersion=new Q({int:1}),this.dPolicy=null,this.dMessageImprint=null,this.dSerial=null,this.dGenTime=null,this.dAccuracy=null,this.dOrdering=null,this.dNonce=null,this.dTsa=null,this.tohex=function(){var D=[this.dVersion];if(this.dPolicy==null)throw Error("policy shall be specified.");if(D.push(this.dPolicy),this.dMessageImprint==null)throw Error("messageImprint shall be specified.");if(D.push(this.dMessageImprint),this.dSerial==null)throw Error("serialNumber shall be specified.");if(D.push(this.dSerial),this.dGenTime==null)throw Error("genTime shall be specified.");if(D.push(this.dGenTime),this.dAccuracy!=null)D.push(this.dAccuracy);if(this.dOrdering!=null)D.push(this.dOrdering);if(this.dNonce!=null)D.push(this.dNonce);if(this.dTsa!=null)D.push(this.dTsa);var A=new J({array:D});return this.hTLV=A.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0){if(typeof $.policy=="string"){if(!$.policy.match(/^[0-9.]+$/))throw"policy shall be oid like 0.1.4.134";this.dPolicy=new Z({oid:$.policy})}if($.messageImprint!==void 0)this.dMessageImprint=new V($.messageImprint);if($.serial!==void 0)this.dSerial=new Q($.serial);if($.genTime!==void 0)this.dGenTime=new K($.genTime);if($.accuracy!==void 0)this.dAccuracy=new F($.accuracy);if($.ordering!==void 0&&$.ordering==!0)this.dOrdering=new W;if($.nonce!==void 0)this.dNonce=new Q($.nonce);if($.tsa!==void 0)this.dTsa=new H({tag:"a0",explicit:!0,obj:new N({dn:$.tsa})})}};X1(l.asn1.tsp.TSTInfo,l.asn1.ASN1Object);l.asn1.tsp.Accuracy=function($){var Y=l,X=Y.asn1,G=X.ASN1Util.newObject;if(X.tsp.Accuracy.superclass.constructor.call(this),this.params=null,this.tohex=function(){var J=this.params,Q=[];if(J.seconds!=null&&typeof J.seconds=="number")Q.push({int:J.seconds});if(J.millis!=null&&typeof J.millis=="number")Q.push({tag:{tagi:"80",obj:{int:J.millis}}});if(J.micros!=null&&typeof J.micros=="number")Q.push({tag:{tagi:"81",obj:{int:J.micros}}});return G({seq:Q}).tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.tsp.Accuracy,l.asn1.ASN1Object);l.asn1.tsp.MessageImprint=function($){var Y=l,X=Y.asn1,G=X.DERSequence,J=X.DEROctetString,Q=X.x509,W=Q.AlgorithmIdentifier;if(X.tsp.MessageImprint.superclass.constructor.call(this),this.params=null,this.tohex=function(){var K=this.params,Z=new W({name:K.alg}),H=new J({hex:K.hash}),z=new G({array:[Z,H]});return z.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.tsp.MessageImprint,l.asn1.ASN1Object);l.asn1.tsp.TimeStampReq=function($){var Y=l,X=Y.asn1,G=X.DERSequence,J=X.DERInteger,Q=X.DERBoolean,W=X.ASN1Object,K=X.DERObjectIdentifier,Z=X.tsp,H=Z.MessageImprint;if(Z.TimeStampReq.superclass.constructor.call(this),this.params=null,this.tohex=function(){var z=this.params,V=[];if(V.push(new J({int:1})),z.messageImprint instanceof l.asn1.ASN1Object)V.push(z.messageImprint);else V.push(new H(z.messageImprint));if(z.policy!=null)V.push(new K(z.policy));if(z.nonce!=null)V.push(new J(z.nonce));if(z.certreq==!0)V.push(new Q);var F=new G({array:V});return F.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.tsp.TimeStampReq,l.asn1.ASN1Object);l.asn1.tsp.TimeStampResp=function($){var Y=l,X=Y.asn1,G=X.DERSequence,J=X.ASN1Object,Q=X.tsp,W=Q.PKIStatusInfo;if(Q.TimeStampResp.superclass.constructor.call(this),this.params=null,this.tohex=function(){var K=this.params,Z=[];if(K.econtent!=null||K.tst!=null){if(K.statusinfo!=null)Z.push(new W(K.statusinfo));else Z.push(new W("granted"));if(K.econtent!=null)Z.push(new Q.TimeStampToken(K).getContentInfo());else if(K.tst instanceof X.ASN1Object)Z.push(K.tst);else throw Error("improper member tst value")}else if(K.statusinfo!=null)Z.push(new W(K.statusinfo));else throw Error("parameter for token nor statusinfo not specified");var H=new G({array:Z});return H.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.tsp.TimeStampResp,l.asn1.ASN1Object);l.asn1.tsp.PKIStatusInfo=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSequence,Q=G.tsp,W=Q.PKIStatus,K=Q.PKIFreeText,Z=Q.PKIFailureInfo;if(Q.PKIStatusInfo.superclass.constructor.call(this),this.params=null,this.tohex=function(){var H=this.params,z=[];if(typeof H=="string")z.push(new W(H));else{if(H.status==null)throw new Y("property 'status' unspecified");if(z.push(new W(H.status)),H.statusstr!=null)z.push(new K(H.statusstr));if(H.failinfo!=null)z.push(new Z(H.failinfo))}var V=new J({array:z});return V.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.tsp.PKIStatusInfo,l.asn1.ASN1Object);l.asn1.tsp.PKIStatus=function($){var Y=Error,X=l,G=X.asn1,J=G.DERInteger,Q=G.tsp;Q.PKIStatus.superclass.constructor.call(this);var W={granted:0,grantedWithMods:1,rejection:2,waiting:3,revocationWarning:4,revocationNotification:5};if(this.params=null,this.tohex=function(){var K=this.params,Z,H;if(typeof K=="string")try{H=W[K]}catch(z){throw new Y("undefined name: "+K)}else if(typeof K=="number")H=K;else throw new Y("unsupported params");return new J({int:H}).tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.tsp.PKIStatus,l.asn1.ASN1Object);l.asn1.tsp.PKIFreeText=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSequence,Q=G.DERUTF8String,W=G.tsp;if(W.PKIFreeText.superclass.constructor.call(this),this.params=null,this.tohex=function(){var K=this.params;if(!(K instanceof Array))throw new Y("wrong params: not array");var Z=[];for(var H=0;H<K.length;H++)Z.push(new Q({str:K[H]}));var z=new J({array:Z});return z.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.tsp.PKIFreeText,l.asn1.ASN1Object);l.asn1.tsp.PKIFailureInfo=function($){var Y=Error,X=l,G=X.asn1,J=G.DERBitString,Q=G.tsp,W=Q.PKIFailureInfo,K={badAlg:0,badRequest:2,badDataFormat:5,timeNotAvailable:14,unacceptedPolicy:15,unacceptedExtension:16,addInfoNotAvailable:17,systemFailure:25};if(W.superclass.constructor.call(this),this.params=null,this.getBinValue=function(){var Z=this.params,H=0;if(typeof Z=="number"&&0<=Z&&Z<=25){H|=1<<Z;var z=H.toString(2),V="";for(var F=z.length-1;F>=0;F--)V+=z[F];return V}else if(typeof Z=="string"&&K[Z]!=null)return rZ0([Z],K);else if(typeof Z=="object"&&Z.length!=null)return rZ0(Z,K);else throw new Y("wrong params");return},this.tohex=function(){var Z=this.params,H=this.getBinValue();return new J({bin:H}).tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.tsp.PKIFailureInfo,l.asn1.ASN1Object);l.asn1.tsp.AbstractTSAAdapter=function($){this.getTSTHex=function(Y,X){throw"not implemented yet"}};l.asn1.tsp.SimpleTSAAdapter=function($){var Y=l,X=Y.asn1,G=X.tsp,J=Y.crypto.Util.hashHex;if(G.SimpleTSAAdapter.superclass.constructor.call(this),this.params=null,this.serial=0,this.getTSTHex=function(Q,W){var K=J(Q,W);this.params.econtent.content.messageImprint={alg:W,hash:K},this.params.econtent.content.serial={int:this.serial++};var Z=Math.floor(Math.random()*1e9);this.params.econtent.content.nonce={int:Z};var H=new G.TimeStampToken(this.params);return H.getContentInfoEncodedHex()},$!==void 0)this.params=$};X1(l.asn1.tsp.SimpleTSAAdapter,l.asn1.tsp.AbstractTSAAdapter);l.asn1.tsp.FixedTSAAdapter=function($){var Y=l,X=Y.asn1,G=X.tsp,J=Y.crypto.Util.hashHex;if(G.FixedTSAAdapter.superclass.constructor.call(this),this.params=null,this.getTSTHex=function(Q,W){var K=J(Q,W);this.params.econtent.content.messageImprint={alg:W,hash:K};var Z=new G.TimeStampToken(this.params);return Z.getContentInfoEncodedHex()},$!==void 0)this.params=$};X1(l.asn1.tsp.FixedTSAAdapter,l.asn1.tsp.AbstractTSAAdapter);l.asn1.tsp.TSPUtil=new function(){};l.asn1.tsp.TSPUtil.newTimeStampToken=function($){return new l.asn1.tsp.TimeStampToken($)};l.asn1.tsp.TSPUtil.parseTimeStampReq=function($){var Y=new l.asn1.tsp.TSPParser;return Y.getTimeStampReq($)};l.asn1.tsp.TSPUtil.parseMessageImprint=function($){var Y=new l.asn1.tsp.TSPParser;return Y.getMessageImprint($)};l.asn1.tsp.TSPParser=function(){var $=Error,Y=e4,X=new Y,G=M1,J=G.getV,Q=G.getTLV,W=G.getIdxbyList,K=G.getTLVbyListEx,Z=G.getChildIdx,H=["granted","grantedWithMods","rejection","waiting","revocationWarning","revocationNotification"],z={0:"badAlg",2:"badRequest",5:"badDataFormat",14:"timeNotAvailable",15:"unacceptedPolicy",16:"unacceptedExtension",17:"addInfoNotAvailable",25:"systemFailure"};this.getResponse=function(V){var F=Z(V,0);if(F.length==1)return this.getPKIStatusInfo(Q(V,F[0]));else if(F.length>1){var L=this.getPKIStatusInfo(Q(V,F[0])),N=Q(V,F[1]),D=this.getToken(N);return D.statusinfo=L,D}},this.getToken=function(V){var F=new l.asn1.cms.CMSParser,L=F.getCMSSignedData(V);return this.setTSTInfo(L),L},this.setTSTInfo=function(V){var F=V.econtent;if(F.type=="tstinfo"){var L=F.content.hex,N=this.getTSTInfo(L);F.content=N}},this.getTSTInfo=function(V){var F={},L=Z(V,0),N=J(V,L[1]);F.policy=XU0(N);var D=Q(V,L[2]);F.messageImprint=this.getMessageImprint(D);var A=J(V,L[3]);F.serial={hex:A};var B=J(V,L[4]);F.genTime={str:S9(B)};var O=0;if(L.length>5&&V.substr(L[5],2)=="30"){var E=Q(V,L[5]);F.accuracy=this.getAccuracy(E),O++}if(L.length>5+O&&V.substr(L[5+O],2)=="01"){var M=J(V,L[5+O]);if(M=="ff")F.ordering=!0;O++}if(L.length>5+O&&V.substr(L[5+O],2)=="02"){var R=J(V,L[5+O]);F.nonce={hex:R},O++}if(L.length>5+O&&V.substr(L[5+O],2)=="a0"){var q=Q(V,L[5+O]);q="30"+q.substr(2),pGeneralNames=X.getGeneralNames(q);var _=pGeneralNames[0].dn;F.tsa=_,O++}if(L.length>5+O&&V.substr(L[5+O],2)=="a1"){var P=Q(V,L[5+O]);P="30"+P.substr(2);var w=X.getExtParamArray(P);F.ext=w,O++}return F},this.getAccuracy=function(V){var F={},L=Z(V,0);for(var N=0;N<L.length;N++){var D=V.substr(L[N],2),A=J(V,L[N]),B=parseInt(A,16);if(D=="02")F.seconds=B;else if(D=="80")F.millis=B;else if(D=="81")F.micros=B}return F},this.getMessageImprint=function(V){if(V.substr(0,2)!="30")throw Error("head of messageImprint hex shall be x30");var F={},L=Z(V,0),N=W(V,0,[0,0]),D=J(V,N),A=G.hextooidstr(D),B=l.asn1.x509.OID.oid2name(A);if(B=="")throw Error("hashAlg name undefined: "+A);var O=B,E=W(V,0,[1]);return F.alg=O,F.hash=J(V,E),F},this.getPKIStatusInfo=function(V){var F={},L=Z(V,0),N=0;try{var D=J(V,L[0]),A=parseInt(D,16);F.status=H[A]}catch(E){}if(L.length>1&&V.substr(L[1],2)=="30"){var B=Q(V,L[1]);F.statusstr=this.getPKIFreeText(B),N++}if(L.length>N&&V.substr(L[1+N],2)=="03"){var O=Q(V,L[1+N]);F.failinfo=this.getPKIFailureInfo(O)}return F},this.getPKIFreeText=function(V){var F=[],L=Z(V,0);for(var N=0;N<L.length;N++)F.push(G.getString(V,L[N]));return F},this.getPKIFailureInfo=function(V){var F=G.getInt(V,0);if(z[F]!=null)return z[F];else return F},this.getTimeStampReq=function(V){var F={};F.certreq=!1;var L=Z(V,0);if(L.length<2)throw Error("TimeStampReq must have at least 2 items");var N=Q(V,L[1]);F.messageImprint=l.asn1.tsp.TSPUtil.parseMessageImprint(N);for(var D=2;D<L.length;D++){var A=L[D],B=V.substr(A,2);if(B=="06"){var O=J(V,A);F.policy=G.hextooidstr(O)}if(B=="02")F.nonce=J(V,A);if(B=="01")F.certreq=!0}return F}};if(typeof l>"u"||!l)l={};if(typeof l.asn1>"u"||!l.asn1)l.asn1={};if(typeof l.asn1.cades>"u"||!l.asn1.cades)l.asn1.cades={};l.asn1.cades.SignaturePolicyIdentifier=function($){var Y=l,X=Y.asn1,G=X.cades,J=G.SignaturePolicyId;if(G.SignaturePolicyIdentifier.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.16.2.15",this.params=null,this.getValueArray=function(){return[new J(this.params)]},this.setByParam=function(Q){this.params=Q},$!=null)this.setByParam($)};X1(l.asn1.cades.SignaturePolicyIdentifier,l.asn1.cms.Attribute);l.asn1.cades.SignaturePolicyId=function($){var Y=l,X=Y.asn1,G=X.DERSequence,J=X.DERObjectIdentifier,Q=X.x509,W=Q.AlgorithmIdentifier,K=X.cades,Z=K.SignaturePolicyId,H=K.OtherHashAlgAndValue;if(Z.superclass.constructor.call(this),this.params=null,this.tohex=function(){var z=this.params,V=[];V.push(new J(z.oid)),V.push(new H(z));var F=new G({array:V});return F.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(z){this.params=z},$!=null)this.setByParam($)};X1(l.asn1.cades.SignaturePolicyId,l.asn1.ASN1Object);l.asn1.cades.OtherHashAlgAndValue=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSequence,Q=G.DEROctetString,W=G.x509,K=W.AlgorithmIdentifier,Z=G.cades,H=Z.OtherHashAlgAndValue;if(H.superclass.constructor.call(this),this.params=null,this.tohex=function(){var z=this.params;if(z.alg==null)throw new Y("property 'alg' not specified");if(z.hash==null&&z.cert==null)throw new Y("property 'hash' nor 'cert' not specified");var V=null;if(z.hash!=null)V=z.hash;else if(z.cert!=null){if(typeof z.cert!="string")throw new Y("cert not string");var F=z.cert;if(z.cert.indexOf("-----BEGIN")!=-1)F=B7(z.cert);V=l.crypto.Util.hashHex(F,z.alg)}var L=[];L.push(new K({name:z.alg})),L.push(new Q({hex:V}));var N=new J({array:L});return N.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cades.OtherHashAlgAndValue,l.asn1.ASN1Object);l.asn1.cades.OtherHashValue=function($){l.asn1.cades.OtherHashValue.superclass.constructor.call(this);var Y=Error,X=l,G=X.lang.String.isHex,J=X.asn1,Q=J.DEROctetString,W=X.crypto.Util.hashHex;if(this.params=null,this.tohex=function(){var K=this.params;if(K.hash==null&&K.cert==null)throw new Y("hash or cert not specified");var Z=null;if(K.hash!=null)Z=K.hash;else if(K.cert!=null){if(typeof K.cert!="string")throw new Y("cert not string");var H=K.cert;if(K.cert.indexOf("-----BEGIN")!=-1)H=B7(K.cert);Z=l.crypto.Util.hashHex(H,"sha1")}return new Q({hex:Z}).tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cades.OtherHashValue,l.asn1.ASN1Object);l.asn1.cades.SignatureTimeStamp=function($){var Y=Error,X=l,G=X.lang.String.isHex,J=X.asn1,Q=J.ASN1Object,W=J.x509,K=J.cades;if(K.SignatureTimeStamp.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.16.2.14",this.params=null,this.getValueArray=function(){var Z=this.params;if(Z.tst!=null)if(G(Z.tst)){var H=new Q;return H.hTLV=Z.tst,[H]}else if(Z.tst instanceof Q)return[Z.tst];else throw new Y("params.tst has wrong value");else if(Z.res!=null){var z=Z.res;if(z instanceof Q)z=z.tohex();if(typeof z!="string"||!G(z))throw new Y("params.res has wrong value");var V=M1.getTLVbyList(z,0,[1]),H=new Q;return H.hTLV=Z.tst,[H]}},$!=null)this.setByParam($)};X1(l.asn1.cades.SignatureTimeStamp,l.asn1.cms.Attribute);l.asn1.cades.CompleteCertificateRefs=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSequence,Q=G.cades,W=Q.OtherCertID,K=X.lang.String.isHex;if(Q.CompleteCertificateRefs.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.16.2.21",this.params=null,this.getValueArray=function(){var Z=this.params,H=[];for(var z=0;z<Z.array.length;z++){var V=Z.array[z];if(typeof V=="string")if(V.indexOf("-----BEGIN")!=-1)V={cert:V};else if(K(V))V={hash:V};else throw new Y("unsupported value: "+V);if(Z.alg!=null&&V.alg==null)V.alg=Z.alg;if(Z.hasis!=null&&V.hasis==null)V.hasis=Z.hasis;var F=new W(V);H.push(F)}var L=new J({array:H});return[L]},$!=null)this.setByParam($)};X1(l.asn1.cades.CompleteCertificateRefs,l.asn1.cms.Attribute);l.asn1.cades.OtherCertID=function($){var Y=l,X=Y.asn1,G=X.DERSequence,J=X.cms,Q=J.IssuerSerial,W=X.cades,K=W.OtherHashValue,Z=W.OtherHashAlgAndValue;if(W.OtherCertID.superclass.constructor.call(this),this.params=$,this.tohex=function(){var H=this.params;if(typeof H=="string"){if(H.indexOf("-----BEGIN")!=-1)H={cert:H};else if(_isHex(H))H={hash:H}}var z=[],V=null;if(H.alg!=null)V=new Z(H);else V=new K(H);if(z.push(V),H.cert!=null&&H.hasis==!0||H.issuer!=null&&H.serial!=null){var F=new Q(H);z.push(F)}var L=new G({array:z});return L.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cades.OtherCertID,l.asn1.ASN1Object);l.asn1.cades.OtherHash=function($){var Y=Error,X=l,G=X.asn1,J=G.cms,Q=G.cades,W=Q.OtherHashAlgAndValue,K=Q.OtherHashValue,Z=X.crypto.Util.hashHex,H=X.lang.String.isHex;if(Q.OtherHash.superclass.constructor.call(this),this.params=null,this.tohex=function(){var z=this.params;if(typeof z=="string"){if(z.indexOf("-----BEGIN")!=-1)z={cert:z};else if(H(z))z={hash:z}}var V=null;if(z.alg!=null)V=new W(z);else V=new K(z);return V.tohex()},this.getEncodedHex=function(){return this.tohex()},$!=null)this.setByParam($)};X1(l.asn1.cades.OtherHash,l.asn1.ASN1Object);l.asn1.cades.CAdESUtil=new function(){};l.asn1.cades.CAdESUtil.parseSignedDataForAddingUnsigned=function($){var Y=new l.asn1.cms.CMSParser,X=Y.getCMSSignedData($);return X};l.asn1.cades.CAdESUtil.parseSignerInfoForAddingUnsigned=function($,Y,X){var G=M1,J=G.getChildIdx,Q=G.getTLV,W=G.getV,K=l,Z=K.asn1,H=Z.ASN1Object,z=Z.cms,V=z.AttributeList,F=z.SignerInfo,L={},N=J($,Y);if(N.length!=6)throw"not supported items for SignerInfo (!=6)";var D=N.shift();L.version=Q($,D);var A=N.shift();L.si=Q($,A);var B=N.shift();L.digalg=Q($,B);var O=N.shift();L.sattrs=Q($,O);var E=N.shift();L.sigalg=Q($,E);var M=N.shift();L.sig=Q($,M),L.sigval=W($,M);var R=null;return L.obj=new F,R=new H,R.hTLV=L.version,L.obj.dCMSVersion=R,R=new H,R.hTLV=L.si,L.obj.dSignerIdentifier=R,R=new H,R.hTLV=L.digalg,L.obj.dDigestAlgorithm=R,R=new H,R.hTLV=L.sattrs,L.obj.dSignedAttrs=R,R=new H,R.hTLV=L.sigalg,L.obj.dSigAlg=R,R=new H,R.hTLV=L.sig,L.obj.dSig=R,L.obj.dUnsignedAttrs=new V,L};if(typeof l.asn1.csr>"u"||!l.asn1.csr)l.asn1.csr={};l.asn1.csr.CertificationRequest=function($){var Y=l,X=Y.asn1,G=X.DERBitString,J=X.DERSequence,Q=X.csr,W=X.x509,K=Q.CertificationRequestInfo;if(Q.CertificationRequest.superclass.constructor.call(this),this.setByParam=function(Z){this.params=Z},this.sign=function(){var Z=new K(this.params).tohex(),H=new l.crypto.Signature({alg:this.params.sigalg});H.init(this.params.sbjprvkey),H.updateHex(Z);var z=H.sign();this.params.sighex=z},this.getPEM=function(){return RG(this.tohex(),"CERTIFICATE REQUEST")},this.tohex=function(){var Z=this.params,H=new l.asn1.csr.CertificationRequestInfo(this.params),z=new l.asn1.x509.AlgorithmIdentifier({name:Z.sigalg});if(Z.sighex==null&&Z.sbjprvkey!=null)this.sign();if(Z.sighex==null)throw Error("sighex or sbjprvkey parameter not defined");var V=new G({hex:"00"+Z.sighex}),F=new J({array:[H,z,V]});return F.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.csr.CertificationRequest,l.asn1.ASN1Object);l.asn1.csr.CertificationRequestInfo=function($){var Y=l,X=Y.asn1,G=X.DERBitString,J=X.DERSequence,Q=X.DERInteger,W=X.DERUTF8String,K=X.DERTaggedObject,Z=X.ASN1Util.newObject,H=X.csr,z=X.x509,V=z.X500Name,F=z.Extensions,L=z.SubjectPublicKeyInfo,N=H.AttributeList;H.CertificationRequestInfo.superclass.constructor.call(this),this.params=null,this.setByParam=function(A){if(A!=null)this.params=A},this.tohex=function(){var A=this.params,B=[];if(B.push(new Q({int:0})),B.push(new V(A.subject)),B.push(new L(Z8.getKey(A.sbjpubkey))),A.attrs!=null){var O=D(A.attrs),E=Z({tag:{tage:"a0",obj:O}});B.push(E)}else if(A.extreq!=null){var M=new F(A.extreq),E=Z({tag:{tage:"a0",obj:{seq:[{oid:"1.2.840.113549.1.9.14"},{set:[M]}]}}});B.push(E)}else B.push(new K({tag:"a0",explicit:!1,obj:new W({str:""})}));var R=new J({array:B});return R.tohex()},this.getEncodedHex=function(){return this.tohex()};function D(A){var B=Error,O=l.asn1.x509.Extensions,E=[];for(var M=0;M<A.length;M++){var R=A[M],q=R.attr;if(q=="extensionRequest"){var _=new O(R.ext),P={seq:[{oid:"1.2.840.113549.1.9.14"},{set:[_]}]};E.push(P)}else if(q=="unstructuredName"){var P={seq:[{oid:"1.2.840.113549.1.9.2"},{set:R.names}]};E.push(P)}else if(q=="challengePassword"){var P={seq:[{oid:"1.2.840.113549.1.9.7"},{set:[{utf8str:R.password}]}]};E.push(P)}else throw new B("unknown CSR attribute")}return{set:E}}if($!=null)this.setByParam($)};X1(l.asn1.csr.CertificationRequestInfo,l.asn1.ASN1Object);l.asn1.csr.AttributeList=function($){function Y(X){}};X1(l.asn1.csr.AttributeList,l.asn1.ASN1Object);l.asn1.csr.CSRUtil=new function(){};l.asn1.csr.CSRUtil.newCSRPEM=function($){var Y=Z8,X=l.asn1.csr,G=new X.CertificationRequest($),J=G.getPEM();return J};l.asn1.csr.CSRUtil.getParam=function($,Y){var X=M1,G=X.getV,J=X.getIdxbyList,Q=X.getTLVbyList,W=X.getTLVbyListEx,K=X.getVbyListEx,Z=function(O){var E=J(O,0,[0,3,0,0],"06");if(G(O,E)!="2a864886f70d01090e")return null;return Q(O,0,[0,3,0,1,0],"30")},H={};if($.indexOf("-----BEGIN CERTIFICATE REQUEST")==-1)throw Error("argument is not PEM file");var z=B7($,"CERTIFICATE REQUEST");if(Y)H.tbs=Q(z,0,[0]);try{var V=W(z,0,[0,1]);if(V=="3000")H.subject={};else{var D=new e4;H.subject=D.getX500Name(V)}}catch(O){}var F=W(z,0,[0,2]),L=Z8.getKey(F,null,"pkcs8pub");H.sbjpubkey=Z8.getPEM(L,"PKCS8PUB");var N=Z(z),D=new e4;if(N!=null)H.extreq=D.getExtParamArray(N);try{var A=W(z,0,[1],"30"),D=new e4;H.sigalg=D.getAlgorithmIdentifierName(A)}catch(O){}try{var B=K(z,0,[2]);H.sighex=B}catch(O){}return H};l.asn1.csr.CSRUtil.verifySignature=function($){try{var Y=null;if(typeof $=="string"&&$.indexOf("-----BEGIN CERTIFICATE REQUEST")!=-1)Y=l.asn1.csr.CSRUtil.getParam($,!0);else if(typeof $=="object"&&$.sbjpubkey!=null&&$.sigalg!=null&&$.sighex!=null&&$.tbs!=null)Y=$;if(Y==null)return!1;var X=new l.crypto.Signature({alg:Y.sigalg});return X.init(Y.sbjpubkey),X.updateHex(Y.tbs),X.verify(Y.sighex)}catch(G){return alert(G),!1}};if(typeof l>"u"||!l)l={};if(typeof l.asn1>"u"||!l.asn1)l.asn1={};if(typeof l.asn1.ocsp>"u"||!l.asn1.ocsp)l.asn1.ocsp={};l.asn1.ocsp.DEFAULT_HASH="sha1";l.asn1.ocsp.OCSPResponse=function($){l.asn1.ocsp.OCSPResponse.superclass.constructor.call(this);var Y=l.asn1.DEREnumerated,X=l.asn1.ASN1Util.newObject,G=l.asn1.ocsp.ResponseBytes,J=["successful","malformedRequest","internalError","tryLater","_not_used_","sigRequired","unauthorized"];if(this.params=null,this._getStatusCode=function(){var Q=this.params.resstatus;if(typeof Q=="number")return Q;if(typeof Q!="string")return-1;return J.indexOf(Q)},this.setByParam=function(Q){this.params=Q},this.tohex=function(){var Q=this.params,W=this._getStatusCode();if(W==-1)throw Error("responseStatus not supported: "+Q.resstatus);if(W!=0)return X({seq:[{enum:{int:W}}]}).tohex();var K=new G(Q);return X({seq:[{enum:{int:0}},{tag:{tag:"a0",explicit:!0,obj:K}}]}).tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.ocsp.OCSPResponse,l.asn1.ASN1Object);l.asn1.ocsp.ResponseBytes=function($){l.asn1.ocsp.ResponseBytes.superclass.constructor.call(this);var Y=l.asn1,X=Y.DERSequence,G=Y.DERObjectIdentifier,J=Y.DEROctetString,Q=Y.ocsp.BasicOCSPResponse;if(this.params=null,this.setByParam=function(W){this.params=W},this.tohex=function(){var W=this.params;if(W.restype!="ocspBasic")throw Error("not supported responseType: "+W.restype);var K=new Q(W),Z=[];Z.push(new G({name:"ocspBasic"})),Z.push(new J({hex:K.tohex()}));var H=new X({array:Z});return H.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.ocsp.ResponseBytes,l.asn1.ASN1Object);l.asn1.ocsp.BasicOCSPResponse=function($){l.asn1.ocsp.BasicOCSPResponse.superclass.constructor.call(this);var Y=Error,X=l.asn1,G=X.ASN1Object,J=X.DERSequence,Q=X.DERGeneralizedTime,W=X.DERTaggedObject,K=X.DERBitString,Z=X.x509.Extensions,H=X.x509.AlgorithmIdentifier,z=X.ocsp,V=z.ResponderID;if(_SingleResponseList=z.SingleResponseList,_ResponseData=z.ResponseData,this.params=null,this.setByParam=function(F){this.params=F},this.sign=function(){var F=this.params,L=F.tbsresp.tohex(),N=new l.crypto.Signature({alg:F.sigalg});N.init(F.reskey),N.updateHex(L),F.sighex=N.sign()},this.tohex=function(){var F=this.params;if(F.tbsresp==null)F.tbsresp=new _ResponseData(F);if(F.sighex==null&&F.reskey!=null)this.sign();var L=[];if(L.push(F.tbsresp),L.push(new H({name:F.sigalg})),L.push(new K({hex:"00"+F.sighex})),F.certs!=null&&F.certs.length!=null){var N=[];for(var D=0;D<F.certs.length;D++){var A=F.certs[D],B=null;if(M1.isASN1HEX(A))B=A;else if(A.match(/-----BEGIN/))B=B7(A);else throw new Y("certs["+D+"] not hex or PEM");N.push(new G({tlv:B}))}var O=new J({array:N});L.push(new W({tag:"a0",explicit:!0,obj:O}))}var E=new J({array:L});return E.tohex()},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.ocsp.BasicOCSPResponse,l.asn1.ASN1Object);l.asn1.ocsp.ResponseData=function($){l.asn1.ocsp.ResponseData.superclass.constructor.call(this);var Y=Error,X=l.asn1,G=X.DERSequence,J=X.DERGeneralizedTime,Q=X.DERTaggedObject,W=X.x509.Extensions,K=X.ocsp,Z=K.ResponderID;if(_SingleResponseList=K.SingleResponseList,this.params=null,this.tohex=function(){var H=this.params;if(H.respid!=null)new Y("respid not specified");if(H.prodat!=null)new Y("prodat not specified");if(H.array!=null)new Y("array not specified");var z=[];if(z.push(new Z(H.respid)),z.push(new J(H.prodat)),z.push(new _SingleResponseList(H.array)),H.ext!=null){var V=new W(H.ext);z.push(new Q({tag:"a1",explicit:!0,obj:V}))}var F=new G({array:z});return F.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(H){this.params=H},$!==void 0)this.setByParam($)};X1(l.asn1.ocsp.ResponseData,l.asn1.ASN1Object);l.asn1.ocsp.ResponderID=function($){l.asn1.ocsp.ResponderID.superclass.constructor.call(this);var Y=l,X=Y.asn1,G=X.ASN1Util.newObject,J=X.x509.X500Name,Q=Y.lang.String.isHex,W=Error;if(this.params=null,this.tohex=function(){var K=this.params;if(K.key!=null){var Z=null;if(typeof K.key=="string"){if(Q(K.key))Z=K.key;if(K.key.match(/-----BEGIN CERTIFICATE/)){var H=new e4(K.key),z=H.getExtSubjectKeyIdentifier();if(z!=null)Z=z.kid.hex}}else if(K.key instanceof e4){var z=K.key.getExtSubjectKeyIdentifier();if(z!=null)Z=z.kid.hex}if(Z==null)throw new W("wrong key member value");var V=G({tag:{tag:"a2",explicit:!0,obj:{octstr:{hex:Z}}}});return V.tohex()}else if(K.name!=null){var F=null;if(typeof K.name=="string"&&K.name.match(/-----BEGIN CERTIFICATE/)){var H=new e4(K.name);F=H.getSubject()}else if(K.name instanceof e4)F=K.name.getSubject();else if(typeof K.name=="object"&&(K.name.array!=null||K.name.str!=null))F=K.name;if(F==null)throw new W("wrong name member value");var V=G({tag:{tag:"a1",explicit:!0,obj:new J(F)}});return V.tohex()}throw new W("key or name not specified")},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(K){this.params=K},$!==void 0)this.setByParam($)};X1(l.asn1.ocsp.ResponderID,l.asn1.ASN1Object);l.asn1.ocsp.SingleResponseList=function($){l.asn1.ocsp.SingleResponseList.superclass.constructor.call(this);var Y=l.asn1,X=Y.DERSequence,G=Y.ocsp.SingleResponse;if(this.params=null,this.tohex=function(){var J=this.params;if(typeof J!="object"||J.length==null)throw Error("params not specified properly");var Q=[];for(var W=0;W<J.length;W++)Q.push(new G(J[W]));var K=new X({array:Q});return K.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(J){this.params=J},$!==void 0)this.setByParam($)};X1(l.asn1.ocsp.SingleResponseList,l.asn1.ASN1Object);l.asn1.ocsp.SingleResponse=function($){var Y=Error,X=l,G=X.asn1,J=G.DERSequence,Q=G.DERGeneralizedTime,W=G.DERTaggedObject,K=G.ocsp,Z=K.CertID,H=K.CertStatus,z=G.x509,V=z.Extensions;if(K.SingleResponse.superclass.constructor.call(this),this.params=null,this.tohex=function(){var F=this.params,L=[];if(F.certid==null)throw new Y("certid unspecified");if(F.status==null)throw new Y("status unspecified");if(F.thisupdate==null)throw new Y("thisupdate unspecified");if(L.push(new Z(F.certid)),L.push(new H(F.status)),L.push(new Q(F.thisupdate)),F.nextupdate!=null){var N=new Q(F.nextupdate);L.push(new W({tag:"a0",explicit:!0,obj:N}))}if(F.ext!=null){var D=new V(F.ext);L.push(new W({tag:"a1",explicit:!0,obj:D}))}var A=new J({array:L});return A.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(F){this.params=F},$!==void 0)this.setByParam($)};X1(l.asn1.ocsp.SingleResponse,l.asn1.ASN1Object);l.asn1.ocsp.CertID=function($){var Y=l,X=Y.asn1,G=X.DEROctetString,J=X.DERInteger,Q=X.DERSequence,W=X.x509,K=W.AlgorithmIdentifier,Z=X.ocsp,H=Z.DEFAULT_HASH,z=Y.crypto,V=z.Util.hashHex,F=e4,L=M1,N=L.getVbyList;if(Z.CertID.superclass.constructor.call(this),this.DEFAULT_HASH="sha1",this.params=null,this.setByValue=function(D,A,B,O){if(O==null)O=this.DEFAULT_HASH;this.params={alg:O,issname:D,isskey:A,sbjsn:B}},this.setByCert=function(D,A,B){if(B==null)B=this.DEFAULT_HASH;this.params={alg:B,issuerCert:D,subjectCert:A}},this.getParamByCerts=function(D,A,B){if(B==null)B=this.DEFAULT_HASH;var O=new F(D),E=new F(A),M=V(O.getSubjectHex(),B),R=O.getPublicKeyHex(),q=V(N(R,0,[1],"03",!0),B),_=E.getSerialNumberHex(),P={alg:B,issname:M,isskey:q,sbjsn:_};return P},this.tohex=function(){if(typeof this.params!="object")throw Error("params not set");var D=this.params,A,B,O,E;if(D.alg==null)E=this.DEFAULT_HASH;else E=D.alg;if(D.issuerCert!=null&&D.subjectCert!=null){var M=this.getParamByCerts(D.issuerCert,D.subjectCert,E);A=M.issname,B=M.isskey,O=M.sbjsn}else if(D.issname!=null&&D.isskey!=null&&D.sbjsn!=null)A=D.issname,B=D.isskey,O=D.sbjsn;else throw Error("required param members not defined");var R=new K({name:E}),q=new G({hex:A}),_=new G({hex:B}),P=new J({hex:O}),w=new Q({array:[R,q,_,P]});return this.hTLV=w.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0)this.setByParam($)};X1(l.asn1.ocsp.CertID,l.asn1.ASN1Object);l.asn1.ocsp.CertStatus=function($){if(l.asn1.ocsp.CertStatus.superclass.constructor.call(this),this.params=null,this.tohex=function(){var Y=this.params;if(Y.status=="good")return"8000";if(Y.status=="unknown")return"8200";if(Y.status=="revoked"){var X=[{gentime:{str:Y.time}}];if(Y.reason!=null)X.push({tag:{tag:"a0",explicit:!0,obj:{enum:{int:Y.reason}}}});var G={tag:"a1",explicit:!1,obj:{seq:X}};return l.asn1.ASN1Util.newObject({tag:G}).tohex()}throw Error("bad status")},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(Y){this.params=Y},$!==void 0)this.setByParam($)};X1(l.asn1.ocsp.CertStatus,l.asn1.ASN1Object);l.asn1.ocsp.Request=function($){var Y=l,X=Y.asn1,G=X.DERSequence,J=X.ocsp;if(J.Request.superclass.constructor.call(this),this.dReqCert=null,this.dExt=null,this.tohex=function(){var W=[];if(this.dReqCert===null)throw"reqCert not set";W.push(this.dReqCert);var K=new G({array:W});return this.hTLV=K.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},typeof $<"u"){var Q=new J.CertID($);this.dReqCert=Q}};X1(l.asn1.ocsp.Request,l.asn1.ASN1Object);l.asn1.ocsp.TBSRequest=function($){var Y=l,X=Y.asn1,G=X.DERSequence,J=X.ocsp;if(J.TBSRequest.superclass.constructor.call(this),this.version=0,this.dRequestorName=null,this.dRequestList=[],this.dRequestExt=null,this.setRequestListByParam=function(Q){var W=[];for(var K=0;K<Q.length;K++){var Z=new J.Request(Q[0]);W.push(Z)}this.dRequestList=W},this.tohex=function(){var Q=[];if(this.version!==0)throw"not supported version: "+this.version;if(this.dRequestorName!==null)throw"requestorName not supported";var W=new G({array:this.dRequestList});if(Q.push(W),this.dRequestExt!==null)throw"requestExtensions not supported";var K=new G({array:Q});return this.hTLV=K.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0){if($.reqList!==void 0)this.setRequestListByParam($.reqList)}};X1(l.asn1.ocsp.TBSRequest,l.asn1.ASN1Object);l.asn1.ocsp.OCSPRequest=function($){var Y=l,X=Y.asn1,G=X.DERSequence,J=X.ocsp;if(J.OCSPRequest.superclass.constructor.call(this),this.dTbsRequest=null,this.dOptionalSignature=null,this.tohex=function(){var W=[];if(this.dTbsRequest!==null)W.push(this.dTbsRequest);else throw"tbsRequest not set";if(this.dOptionalSignature!==null)throw"optionalSignature not supported";var K=new G({array:W});return this.hTLV=K.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},$!==void 0){if($.reqList!==void 0){var Q=new J.TBSRequest($);this.dTbsRequest=Q}}};X1(l.asn1.ocsp.OCSPRequest,l.asn1.ASN1Object);l.asn1.ocsp.OCSPUtil={};l.asn1.ocsp.OCSPUtil.getRequestHex=function($,Y,X){var G=l,J=G.asn1,Q=J.ocsp;if(X===void 0)X=Q.DEFAULT_HASH;var W={alg:X,issuerCert:$,subjectCert:Y},K=new Q.OCSPRequest({reqList:[W]});return K.tohex()};l.asn1.ocsp.OCSPUtil.getOCSPResponseInfo=function($){var Y=M1,X=Y.getVbyList,G=Y.getVbyListEx,J=Y.getIdxbyList,Q=Y.getIdxbyListEx,W=Y.getV,K={};try{var Z=G($,0,[0],"0a");K.responseStatus=parseInt(Z,16)}catch(F){}if(K.responseStatus!==0)return K;try{var H=J($,0,[1,0,1,0,0,2,0,1]);if($.substr(H,2)==="80")K.certStatus="good";else if($.substr(H,2)==="a1")K.certStatus="revoked",K.revocationTime=S9(X($,H,[0]));else if($.substr(H,2)==="82")K.certStatus="unknown"}catch(F){}try{var z=J($,0,[1,0,1,0,0,2,0,2]);K.thisUpdate=S9(W($,z))}catch(F){}try{var V=J($,0,[1,0,1,0,0,2,0,3]);if($.substr(V,2)==="a0")K.nextUpdate=S9(X($,V,[0]))}catch(F){}return K};l.asn1.ocsp.OCSPParser=function(){var $=Error,Y=e4,X=new Y,G=M1,J=G.getV,Q=G.getTLV,W=G.getIdxbyList,K=G.getVbyList,Z=G.getTLVbyList,H=G.getVbyListEx,z=G.getTLVbyListEx,V=G.getChildIdx;this.getOCSPRequest=function(F){var L=V(F,0);if(L.length!=1&&L.length!=2)throw new $("wrong number elements: "+L.length);var N=this.getTBSRequest(Q(F,L[0]));return N},this.getTBSRequest=function(F){var L={},N=z(F,0,[0],"30");L.array=this.getRequestList(N);var D=z(F,0,["[2]",0],"30");if(D!=null)L.ext=X.getExtParamArray(D);return L},this.getRequestList=function(F){var L=[],N=V(F,0);for(var D=0;D<N.length;D++){var F=Q(F,N[D]);L.push(this.getRequest(F))}return L},this.getRequest=function(F){var L=V(F,0);if(L.length!=1&&L.length!=2)throw new $("wrong number elements: "+L.length);var N=this.getCertID(Q(F,L[0]));if(L.length==2){var D=W(F,0,[1,0]);N.ext=X.getExtParamArray(Q(F,D))}return N},this.getCertID=function(F){var L=V(F,0);if(L.length!=4)throw new $("wrong number elements: "+L.length);var N=new Y,D={};return D.alg=N.getAlgorithmIdentifierName(Q(F,L[0])),D.issname=J(F,L[1]),D.isskey=J(F,L[2]),D.sbjsn=J(F,L[3]),D},this.getOCSPResponse=function(F){var L=V(F,0),N,D=J(F,L[0]),A=parseInt(D);if(L.length==1)return{resstatus:A};var B=Z(F,0,[1,0]);return N=this.getResponseBytes(B),N.resstatus=A,N},this.getResponseBytes=function(F){var L=V(F,0),N,D=Z(F,0,[1,0]);N=this.getBasicOCSPResponse(D);var A=J(F,L[0]);return N.restype=l.asn1.x509.OID.oid2name(XU0(A)),N},this.getBasicOCSPResponse=function(F){var L=V(F,0),N;N=this.getResponseData(Q(F,L[0]));var D=new e4;N.alg=D.getAlgorithmIdentifierName(Q(F,L[1]));var A=J(F,L[2]);N.sighex=A.substr(2);var B=H(F,0,["[0]"]);if(B!=null){var O=V(B,0),E=[];for(var M=0;M<O.length;M++){var R=Q(B,O[M]);E.push(R)}N.certs=E}return N},this.getResponseData=function(F){var L=V(F,0),N=L.length,D={},A=0;if(F.substr(L[0],2)=="a0")A++;D.respid=this.getResponderID(Q(F,L[A++]));var B=J(F,L[A++]);if(D.prodat=S9(B),D.array=this.getSingleResponseList(Q(F,L[A++])),F.substr(L[N-1],2)=="a1"){var O=Z(F,L[N-1],[0]),E=new e4;D.ext=E.getExtParamArray(O)}return D},this.getResponderID=function(F){var L={};if(F.substr(0,2)=="a2"){var N=K(F,0,[0]);L.key=N}if(F.substr(0,2)=="a1"){var D=Z(F,0,[0]),A=new e4;L.name=A.getX500Name(D)}return L},this.getSingleResponseList=function(F){var L=V(F,0),N=[];for(var D=0;D<L.length;D++){var A=this.getSingleResponse(Q(F,L[D]));N.push(A)}return N},this.getSingleResponse=function(F){var L=V(F,0),N={},D=this.getCertID(Q(F,L[0]));N.certid=D;var A=this.getCertStatus(Q(F,L[1]));if(N.status=A,F.substr(L[2],2)=="18"){var B=J(F,L[2]);N.thisupdate=S9(B)}for(var O=3;O<L.length;O++){if(F.substr(L[O],2)=="a0"){var E=K(F,L[O],[0],"18");N.nextupdate=S9(E)}if(F.substr(L[O],2)=="a1"){var M=new e4,R=Z(F,0,[O,0]);N.ext=M.getExtParamArray(R)}}return N},this.getCertStatus=function(F){var L={};if(F=="8000")return{status:"good"};if(F=="8200")return{status:"unknown"};if(F.substr(0,2)=="a1"){L.status="revoked";var N=K(F,0,[0]),D=S9(N);L.time=D}return L}};var l;if(typeof l>"u"||!l)l={};if(typeof l.lang>"u"||!l.lang)l.lang={};l.lang.String=function(){};function Bo4($){var Y=[];for(var X=0;X<$.length;X++)Y[X]=$.charCodeAt(X);return Y}function eZ0($){var Y="";for(var X=0;X<$.length;X++){var G=$[X].toString(16);if(G.length==1)G="0"+G;Y=Y+G}return Y}function yK($){return eZ0(Bo4($))}function on($){return $=$.replace(/\=/g,""),$=$.replace(/\+/g,"-"),$=$.replace(/\//g,"_"),$}function $U0($){if($.length%4==2)$=$+"==";else if($.length%4==3)$=$+"=";return $=$.replace(/-/g,"+"),$=$.replace(/_/g,"/"),$}function TY($){if($.length%2==1)$="0"+$;return on(dk($))}function W$($){return aZ0($U0($))}var tn,lU;if(typeof Buffer==="function")tn=function($){return on(Buffer.from($,"utf8").toString("base64"))},lU=function($){return Buffer.from($U0($),"base64").toString("utf8")};else tn=function($){return TY(TG1(kG1($)))},lU=function($){return decodeURIComponent(IG1(W$($)))};function YU0($){return TG1(kG1($)).toLowerCase()}function S9($){try{return decodeURIComponent(IG1($))}catch(Y){return null}}function Oo4($){return S9(Eo4($))}function Eo4($){var Y=$.match(/.{1,2}/g),X=[];for(var G=0;G<Y.length;G++){var J=parseInt(Y[G],16);if(161<=J&&J<=191)X.push("c2"),X.push(Y[G]);else if(192<=J&&J<=255)X.push("c3"),X.push((J-64).toString(16));else X.push(Y[G])}return X.join("")}function iU($){var Y="";for(var X=0;X<$.length-1;X+=2)Y+=String.fromCharCode(parseInt($.substr(X,2),16));return Y}function dH($){var Y="";for(var X=0;X<$.length;X++)Y+=("0"+$.charCodeAt(X).toString(16)).slice(-2);return Y}function Mo4($){return dk($)}function Ro4($,Y){return $=$.replace(new RegExp("(.{"+Y+"})","g"),`$1\r
`),$=$.replace(/\s+$/,""),$}function qo4($){var Y=$.replace(/[^0-9A-Za-z\/+=]*/g,""),X=aZ0(Y);return X}function RG($,Y){return"-----BEGIN "+Y+`-----\r
`+Ro4(Mo4($),64)+`\r
-----END `+Y+`-----\r
`}function B7($,Y){if($.indexOf("-----BEGIN ")==-1)throw Error("can't find PEM header");if(Y!==void 0)$=$.replace(new RegExp("^[^]*-----BEGIN "+Y+"-----"),""),$=$.replace(new RegExp("-----END "+Y+"-----[^]*$"),"");else $=$.replace(/^[^]*-----BEGIN [^-]+-----/,""),$=$.replace(/-----END [^-]+-----[^]*$/,"");return qo4($)}function Po4($){var Y,X,G,J,Q,W,K,Z,H,z,V,F;if($=_o4($),F=$.match(/^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(|\.\d+)Z$/),F){if(Y=parseInt(F[1]),X=parseInt(F[2])-1,G=parseInt(F[3]),J=parseInt(F[4]),Q=parseInt(F[5]),W=parseInt(F[6]),K=0,z=F[7],z!=="")V=(z.substr(1)+"00").substr(0,3),K=parseInt(V);return Date.UTC(Y,X,G,J,Q,W,K)}throw Error("unsupported zulu format: "+$)}function wo4($){return Math.round(Po4($)/1000)}function _o4($){if($.match(/^[0-9]{12}Z$/)||$.match(/^[0-9]{12}[.][0-9]*Z$/))return $.match(/^[0-4]/)?"20"+$:"19"+$;return $}function TG1($){return $.replace(/%/g,"")}function IG1($){return $.replace(/(..)/g,"%$1")}function NG1($){var Y="malformed IPv6 address";if(!$.match(/^[0-9A-Fa-f:]+$/))throw Y;$=$.toLowerCase();var X=$.split(":").length-1;if(X<2)throw Y;var G=":".repeat(7-X+2);$=$.replace("::",G);var J=$.split(":");if(J.length!=8)throw Y;for(var Q=0;Q<8;Q++)J[Q]=("0000"+J[Q]).slice(-4);return J.join("")}function AG1($){if(!$.match(/^[0-9A-Fa-f]{32}$/))throw Error("malformed IPv6 address: "+$);$=$.toLowerCase();var Y=$.match(/.{1,4}/g);Y=Y.map(function(J){return J.replace(/^0+/,"")}),Y=Y.map(function(J){return J==""?"0":J}),$=":"+Y.join(":")+":";var X=$.match(/:(0:){2,}/g);if(X==null)return $.slice(1,-1);var G=X.sort().slice(-1)[0];if($=$.replace(G.substr(0,G.length-1),":"),$.substr(0,2)!="::")$=$.substr(1);if($.substr(-2,2)!="::")$=$.substr(0,$.length-1);return $}function nZ0($){var Y=Error("malformed hex value");if(!$.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/))throw Y;if($.length==8){var X;try{return X=parseInt($.substr(0,2),16)+"."+parseInt($.substr(2,2),16)+"."+parseInt($.substr(4,2),16)+"."+parseInt($.substr(6,2),16),X}catch(G){throw Y}}else if($.length==16)try{return nZ0($.substr(0,8))+"/"+BG1($.substr(8))}catch(G){throw Y}else if($.length==32)return AG1($);else if($.length==64){try{return AG1($.substr(0,32))+"/"+BG1($.substr(32))}catch(G){throw Y}return}else return $}function BG1($){var Y=Error("malformed mask"),X;try{X=new S0($,16).toString(2)}catch(G){throw Y}if(!X.match(/^1*0*$/))throw Y;return X.replace(/0+$/,"").length}function CG1($){var Y=Error("malformed IP address");if($=$.toLowerCase($),!$.match(/^[0-9a-f.:/]+$/))throw Y;if($.match(/^[0-9.]+$/)){var X=$.split(".");if(X.length!==4)throw Y;var G="";try{for(var J=0;J<4;J++){var Q=parseInt(X[J]);G+=("0"+Q.toString(16)).slice(-2)}return G}catch(K){throw Y}}else if($.match(/^[0-9.]+\/[0-9]+$/)){var W=$.split("/");return CG1(W[0])+OG1(parseInt(W[1]),32)}else if($.match(/^[0-9a-f:]+$/)&&$.indexOf(":")!==-1)return NG1($);else if($.match(/^[0-9a-f:]+\/[0-9]+$/)&&$.indexOf(":")!==-1){var W=$.split("/");return NG1(W[0])+OG1(parseInt(W[1]),128)}else throw Y}function OG1($,Y){if(Y==32&&$==0)return"00000000";if(Y==128&&$==0)return"00000000000000000000000000000000";var X=Array($+1).join("1")+Array(Y-$+1).join("0");return new S0(X,2).toString(16)}function SG1($){function Y(J){var Q=parseInt(J.substr(0,2),16),W=parseInt(J.substr(2),16);if(Q==0&W<128)return String.fromCharCode(W);if(Q<8){var K=192|(Q&7)<<3|(W&192)>>6,Z=128|W&63;return S9(K.toString(16)+Z.toString(16))}var K=224|(Q&240)>>4,Z=128|(Q&15)<<2|(W&192)>>6,H=128|W&63;return S9(K.toString(16)+Z.toString(16)+H.toString(16))}var X=$.match(/.{4}/g),G=X.map(Y);return G.join("")}function kG1($){var Y=encodeURIComponent($),X="";for(var G=0;G<Y.length;G++)if(Y[G]=="%")X=X+Y.substr(G,3),G=G+2;else X=X+"%"+yK(Y[G]);return X}l.lang.String.isInteger=function($){if($.match(/^[0-9]+$/))return!0;else if($.match(/^-[0-9]+$/))return!0;else return!1};l.lang.String.isHex=function($){return vG1($)};function vG1($){if($.length%2==0&&($.match(/^[0-9a-f]+$/)||$.match(/^[0-9A-F]+$/)))return!0;else return!1}l.lang.String.isBase64=function($){if($=$.replace(/\s+/g,""),$.match(/^[0-9A-Za-z+\/]+={0,3}$/)&&$.length%4==0)return!0;else return!1};l.lang.String.isBase64URL=function($){if($.match(/[+/=]/))return!1;return $=$U0($),l.lang.String.isBase64($)};function xG1($){if($.match(/^[0-9A-Za-z-_.]+$/))return!0;return!1}l.lang.String.isIntegerArray=function($){if($=$.replace(/\s+/g,""),$.match(/^\[[0-9,]+\]$/))return!0;else return!1};l.lang.String.isPrintable=function($){if($.match(/^[0-9A-Za-z '()+,-./:=?]*$/)!==null)return!0;return!1};l.lang.String.isIA5=function($){if($.match(/^[\x20-\x21\x23-\x7f]*$/)!==null)return!0;return!1};l.lang.String.isMail=function($){if($.match(/^[A-Za-z0-9]{1}[A-Za-z0-9_.-]*@{1}[A-Za-z0-9_.-]{1,}\.[A-Za-z0-9]{1,}$/)!==null)return!0;return!1};function EG1($){if($.length%2==1)return"0"+$;if($.substr(0,1)>"7")return"00"+$;return $}function jo4($,Y){if(typeof $!="string"||typeof Y!="string")throw Error("arguments shall be string");if($.length!==Y.length)throw Error("input strings must have the same length");if(typeof Buffer==="function"&&typeof cU<"u"){if(cU.timingSafeEqual!==void 0)return cU.timingSafeEqual(Buffer.from($),Buffer.from(Y));if(cU.subtle!==void 0&&cU.subtle.timingSafeEqual)return cU.subtle.timingSafeEqual(Buffer.from($),Buffer.from(Y))}return To4($,Y)}function To4($,Y){if(typeof $!="string"||typeof Y!="string")throw Error("arguments shall be string");if($.length!==Y.length)throw Error("input strings must have the same length");let X=Y.slice();var G=0;for(var J=0;J<$.length;J++)G|=$.charCodeAt(J)^X.charCodeAt(J);return G===0}function Io4($){var Y=function(K){var Z=K.toString(16);if(Z.length==1)Z="0"+Z;return Z},X=function(K){var Z="",H=parseInt(K,10),z=H.toString(2),V=7-z.length%7;if(V==7)V=0;var F="";for(var L=0;L<V;L++)F+="0";z=F+z;for(var L=0;L<z.length-1;L+=7){var N=z.substr(L,7);if(L!=z.length-7)N="1"+N;Z+=Y(parseInt(N,2))}return Z};try{if(!$.match(/^[0-9.]+$/))return null;var G="",J=$.split("."),Q=parseInt(J[0],10)*40+parseInt(J[1],10);G+=Y(Q),J.splice(0,2);for(var W=0;W<J.length;W++)G+=X(J[W]);return G}catch(K){return null}}function XU0($){if(!vG1($))return null;try{var Y=[],X=$.substr(0,2),G=parseInt(X,16);Y[0]=new String(Math.floor(G/40)),Y[1]=new String(G%40);var J=$.substr(2),Q=[];for(var W=0;W<J.length/2;W++)Q.push(parseInt(J.substr(W*2,2),16));var K=[],Z="";for(var W=0;W<Q.length;W++)if(Q[W]&128)Z=Z+MG1((Q[W]&127).toString(2),7);else Z=Z+MG1((Q[W]&127).toString(2),7),K.push(new String(parseInt(Z,2))),Z="";var H=Y.join(".");if(K.length>0)H=H+"."+K.join(".");return H}catch(z){return null}}function Co4($){var Y=new S0(String($),10);return Yr(Y)}function Yr($){var Y=$.toString(16);if(Y.substr(0,1)!="-"){if(Y.length%2==1)Y="0"+Y;else if(!Y.match(/^[0-7]/))Y="00"+Y;return Y}var X=Y.substr(1),G=X.length;if(G%2==1)G+=1;else if(!Y.match(/^[0-7]/))G+=2;var J="";for(var Q=0;Q<G;Q++)J+="f";var W=new S0(J,16),K=W.xor($).add(S0.ONE);return Y=K.toString(16).replace(/^-/,""),Y}var MG1=function($,Y,X){if(X==null)X="0";if($.length>=Y)return $;return Array(Y-$.length+1).join(X)+$};function So4($){if($.length%2!=0)return-1;if($=$.toLowerCase(),$.match(/^[0-9a-f]+$/)==null)return-1;try{var Y=$.substr(0,2);if(Y=="00")return parseInt($.substr(2),16);var X=parseInt(Y,16);if(X>7)return-1;var G=$.substr(2),J=parseInt(G,16).toString(2);if(J=="0")J="00000000";J=J.slice(0,0-X);var Q=parseInt(J,2);if(Q==NaN)return-1;return Q}catch(W){return-1}}function ko4($){if(typeof $!="string")return null;if($.length%2!=0)return null;if(!$.match(/^[0-9a-f]+$/))return null;try{var Y=parseInt($.substr(0,2),16);if(Y<0||7<Y)return null;var X=$.substr(2),G="";for(var J=0;J<X.length;J+=2){var Q=X.substr(J,2),W=parseInt(Q,16).toString(2);W=("0000000"+W).slice(-8),G+=W}return G.substr(0,G.length-Y)}catch(K){return null}}function rZ0($,Y){var X=0;for(var G=0;G<$.length;G++)X|=1<<Y[$[G]];var J=X.toString(2),Q="";for(var G=J.length-1;G>=0;G--)Q+=J[G];return Q}function q5($,G,X){if(typeof $!="object")return;var G=String(G).split(".");for(var J=0;J<G.length&&$;J++){var Q=G[J];if(Q.match(/^[0-9]+$/))Q=parseInt(Q);$=$[Q]}return $||$===!1?$:X}function X1($,Y){var X=function(){};if(X.prototype=Y.prototype,$.prototype=new X,$.prototype.constructor=$,$.superclass=Y.prototype,Y.prototype.constructor==Object.prototype.constructor)Y.prototype.constructor=Y}if(typeof l>"u"||!l)l={};if(typeof l.crypto>"u"||!l.crypto)l.crypto={};l.crypto.Util=new function(){this.DIGESTINFOHEAD={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},this.DEFAULTPROVIDER={md5:"cryptojs",sha1:"cryptojs",sha224:"cryptojs",sha256:"cryptojs",sha384:"cryptojs",sha512:"cryptojs",ripemd160:"cryptojs",hmacmd5:"cryptojs",hmacsha1:"cryptojs",hmacsha224:"cryptojs",hmacsha256:"cryptojs",hmacsha384:"cryptojs",hmacsha512:"cryptojs",hmacripemd160:"cryptojs",MD5withRSA:"cryptojs/jsrsa",SHA1withRSA:"cryptojs/jsrsa",SHA224withRSA:"cryptojs/jsrsa",SHA256withRSA:"cryptojs/jsrsa",SHA384withRSA:"cryptojs/jsrsa",SHA512withRSA:"cryptojs/jsrsa",RIPEMD160withRSA:"cryptojs/jsrsa",MD5withECDSA:"cryptojs/jsrsa",SHA1withECDSA:"cryptojs/jsrsa",SHA224withECDSA:"cryptojs/jsrsa",SHA256withECDSA:"cryptojs/jsrsa",SHA384withECDSA:"cryptojs/jsrsa",SHA512withECDSA:"cryptojs/jsrsa",RIPEMD160withECDSA:"cryptojs/jsrsa",SHA1withDSA:"cryptojs/jsrsa",SHA224withDSA:"cryptojs/jsrsa",SHA256withDSA:"cryptojs/jsrsa",MD5withRSAandMGF1:"cryptojs/jsrsa",SHAwithRSAandMGF1:"cryptojs/jsrsa",SHA1withRSAandMGF1:"cryptojs/jsrsa",SHA224withRSAandMGF1:"cryptojs/jsrsa",SHA256withRSAandMGF1:"cryptojs/jsrsa",SHA384withRSAandMGF1:"cryptojs/jsrsa",SHA512withRSAandMGF1:"cryptojs/jsrsa",RIPEMD160withRSAandMGF1:"cryptojs/jsrsa"},this.CRYPTOJSMESSAGEDIGESTNAME={md5:x1.algo.MD5,sha1:x1.algo.SHA1,sha224:x1.algo.SHA224,sha256:x1.algo.SHA256,sha384:x1.algo.SHA384,sha512:x1.algo.SHA512,ripemd160:x1.algo.RIPEMD160},this.getDigestInfoHex=function($,Y){if(typeof this.DIGESTINFOHEAD[Y]>"u")throw"alg not supported in Util.DIGESTINFOHEAD: "+Y;return this.DIGESTINFOHEAD[Y]+$},this.getPaddedDigestInfoHex=function($,Y,X){var G=this.getDigestInfoHex($,Y),J=X/4;if(G.length+22>J)throw"key is too short for SigAlg: keylen="+X+","+Y;var Q="0001",W="00"+G,K="",Z=J-Q.length-W.length;for(var H=0;H<Z;H+=2)K+="ff";var z=Q+K+W;return z},this.hashString=function($,Y){var X=new l.crypto.MessageDigest({alg:Y});return X.digestString($)},this.hashHex=function($,Y){var X=new l.crypto.MessageDigest({alg:Y});return X.digestHex($)},this.sha1=function($){return this.hashString($,"sha1")},this.sha256=function($){return this.hashString($,"sha256")},this.sha256Hex=function($){return this.hashHex($,"sha256")},this.sha512=function($){return this.hashString($,"sha512")},this.sha512Hex=function($){return this.hashHex($,"sha512")},this.isKey=function($){if($ instanceof F6||$ instanceof l.crypto.DSA||$ instanceof l.crypto.ECDSA)return!0;else return!1}};l.crypto.Util.md5=function($){var Y=new l.crypto.MessageDigest({alg:"md5",prov:"cryptojs"});return Y.digestString($)};l.crypto.Util.ripemd160=function($){var Y=new l.crypto.MessageDigest({alg:"ripemd160",prov:"cryptojs"});return Y.digestString($)};l.crypto.Util.SECURERANDOMGEN=new nk;l.crypto.Util.getRandomHexOfNbytes=function($){var Y=Array($);return l.crypto.Util.SECURERANDOMGEN.nextBytes(Y),eZ0(Y)};l.crypto.Util.getRandomBigIntegerOfNbytes=function($){return new S0(l.crypto.Util.getRandomHexOfNbytes($),16)};l.crypto.Util.getRandomHexOfNbits=function($){var Y=$%8,X=($-Y)/8,G=Array(X+1);return l.crypto.Util.SECURERANDOMGEN.nextBytes(G),G[0]=(255<<Y&255^255)&G[0],eZ0(G)};l.crypto.Util.getRandomBigIntegerOfNbits=function($){return new S0(l.crypto.Util.getRandomHexOfNbits($),16)};l.crypto.Util.getRandomBigIntegerZeroToMax=function($){var Y=$.bitLength();while(!0){var X=l.crypto.Util.getRandomBigIntegerOfNbits(Y);if($.compareTo(X)>=0)return X}};l.crypto.Util.getRandomBigIntegerMinToMax=function($,Y){var X=$.compareTo(Y);if(X>0)throw"biMin is greater than biMax";if(X==0)return $;var G=Y.subtract($),J=l.crypto.Util.getRandomBigIntegerZeroToMax(G);return J.add($)};l.crypto.MessageDigest=function($){var Y=null,X=null,G=null;if(this.setAlgAndProvider=function(J,Q){if(J=l.crypto.MessageDigest.getCanonicalAlgName(J),J!==null&&Q===void 0)Q=l.crypto.Util.DEFAULTPROVIDER[J];if(":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(J)!=-1&&Q=="cryptojs"){try{this.md=l.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[J].create()}catch(W){throw"setAlgAndProvider hash alg set fail alg="+J+"/"+W}this.updateString=function(W){this.md.update(W)},this.updateHex=function(W){var K=x1.enc.Hex.parse(W);this.md.update(K)},this.digest=function(){var W=this.md.finalize();return W.toString(x1.enc.Hex)},this.digestString=function(W){return this.updateString(W),this.digest()},this.digestHex=function(W){return this.updateHex(W),this.digest()}}if(":sha256:".indexOf(J)!=-1&&Q=="sjcl"){try{this.md=new sjcl.hash.sha256}catch(W){throw"setAlgAndProvider hash alg set fail alg="+J+"/"+W}this.updateString=function(W){this.md.update(W)},this.updateHex=function(W){var K=sjcl.codec.hex.toBits(W);this.md.update(K)},this.digest=function(){var W=this.md.finalize();return sjcl.codec.hex.fromBits(W)},this.digestString=function(W){return this.updateString(W),this.digest()},this.digestHex=function(W){return this.updateHex(W),this.digest()}}},this.updateString=function(J){throw"updateString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.updateHex=function(J){throw"updateHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digest=function(){throw"digest() not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestString=function(J){throw"digestString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestHex=function(J){throw"digestHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},$!==void 0){if($.alg!==void 0){if(this.algName=$.alg,$.prov===void 0)this.provName=l.crypto.Util.DEFAULTPROVIDER[this.algName];this.setAlgAndProvider(this.algName,this.provName)}}};l.crypto.MessageDigest.getCanonicalAlgName=function($){if(typeof $==="string")$=$.toLowerCase(),$=$.replace(/-/,"");return $};l.crypto.MessageDigest.getHashLength=function($){var Y=l.crypto.MessageDigest,X=Y.getCanonicalAlgName($);if(Y.HASHLENGTH[X]===void 0)throw"not supported algorithm: "+$;return Y.HASHLENGTH[X]};l.crypto.MessageDigest.HASHLENGTH={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,ripemd160:20};l.crypto.Mac=function($){var Y=null,X=null,G=null,J=null,Q=null;if(this.setAlgAndProvider=function(W,K){if(W=W.toLowerCase(),W==null)W="hmacsha1";if(W=W.toLowerCase(),W.substr(0,4)!="hmac")throw"setAlgAndProvider unsupported HMAC alg: "+W;if(K===void 0)K=l.crypto.Util.DEFAULTPROVIDER[W];this.algProv=W+"/"+K;var Z=W.substr(4);if(":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(Z)!=-1&&K=="cryptojs"){try{var H=l.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[Z];this.mac=x1.algo.HMAC.create(H,this.pass)}catch(z){throw"setAlgAndProvider hash alg set fail hashAlg="+Z+"/"+z}this.updateString=function(z){this.mac.update(z)},this.updateHex=function(z){var V=x1.enc.Hex.parse(z);this.mac.update(V)},this.doFinal=function(){var z=this.mac.finalize();return z.toString(x1.enc.Hex)},this.doFinalString=function(z){return this.updateString(z),this.doFinal()},this.doFinalHex=function(z){return this.updateHex(z),this.doFinal()}}},this.updateString=function(W){throw"updateString(str) not supported for this alg/prov: "+this.algProv},this.updateHex=function(W){throw"updateHex(hex) not supported for this alg/prov: "+this.algProv},this.doFinal=function(){throw"digest() not supported for this alg/prov: "+this.algProv},this.doFinalString=function(W){throw"digestString(str) not supported for this alg/prov: "+this.algProv},this.doFinalHex=function(W){throw"digestHex(hex) not supported for this alg/prov: "+this.algProv},this.setPassword=function(W){if(typeof W=="string"){var K=W;if(W.length%2==1||!W.match(/^[0-9A-Fa-f]+$/))K=dH(W);this.pass=x1.enc.Hex.parse(K);return}if(typeof W!="object")throw"KJUR.crypto.Mac unsupported password type: "+W;var K=null;if(W.hex!==void 0){if(W.hex.length%2!=0||!W.hex.match(/^[0-9A-Fa-f]+$/))throw"Mac: wrong hex password: "+W.hex;K=W.hex}if(W.utf8!==void 0)K=YU0(W.utf8);if(W.rstr!==void 0)K=dH(W.rstr);if(W.b64!==void 0)K=aZ0(W.b64);if(W.b64u!==void 0)K=W$(W.b64u);if(K==null)throw"KJUR.crypto.Mac unsupported password type: "+W;this.pass=x1.enc.Hex.parse(K)},$!==void 0){if($.pass!==void 0)this.setPassword($.pass);if($.alg!==void 0){if(this.algName=$.alg,$.prov===void 0)this.provName=l.crypto.Util.DEFAULTPROVIDER[this.algName];this.setAlgAndProvider(this.algName,this.provName)}}};l.crypto.Signature=function($){var Y=null,X=null,G=null,J=null,Q=null,W=null,K=null,Z=null,H=null,z=null,V=-1,F=null,L=null,N=null,D=null,A=null;if(this._setAlgNames=function(){var B=this.algName.match(/^(.+)with(.+)$/);if(B){if(this.mdAlgName=B[1].toLowerCase(),this.pubkeyAlgName=B[2].toLowerCase(),this.pubkeyAlgName=="rsaandmgf1"&&this.mdAlgName=="sha")this.mdAlgName="sha1"}},this._zeroPaddingOfSignature=function(B,O){var E="",M=O/4-B.length;for(var R=0;R<M;R++)E=E+"0";return E+B},this.setAlgAndProvider=function(B,O){if(this._setAlgNames(),O!="cryptojs/jsrsa")throw Error("provider not supported: "+O);if(":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(this.mdAlgName)!=-1){try{this.md=new l.crypto.MessageDigest({alg:this.mdAlgName})}catch(E){throw Error("setAlgAndProvider hash alg set fail alg="+this.mdAlgName+"/"+E)}this.init=function(E,M){var R=null;try{if(M===void 0)R=Z8.getKey(E);else R=Z8.getKey(E,M)}catch(q){throw"init failed:"+q}if(R.isPrivate===!0)this.prvKey=R,this.state="SIGN";else if(R.isPublic===!0)this.pubKey=R,this.state="VERIFY";else throw"init failed.:"+R},this.updateString=function(E){this.md.updateString(E)},this.updateHex=function(E){this.md.updateHex(E)},this.sign=function(){if(this.sHashHex=this.md.digest(),this.prvKey===void 0&&this.ecprvhex!==void 0&&this.eccurvename!==void 0&&l.crypto.ECDSA!==void 0)this.prvKey=new l.crypto.ECDSA({curve:this.eccurvename,prv:this.ecprvhex});if(this.prvKey instanceof F6&&this.pubkeyAlgName==="rsaandmgf1")this.hSign=this.prvKey.signWithMessageHashPSS(this.sHashHex,this.mdAlgName,this.pssSaltLen);else if(this.prvKey instanceof F6&&this.pubkeyAlgName==="rsa")this.hSign=this.prvKey.signWithMessageHash(this.sHashHex,this.mdAlgName);else if(this.prvKey instanceof l.crypto.ECDSA)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex);else if(this.prvKey instanceof l.crypto.DSA)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex);else throw"Signature: unsupported private key alg: "+this.pubkeyAlgName;return this.hSign},this.signString=function(E){return this.updateString(E),this.sign()},this.signHex=function(E){return this.updateHex(E),this.sign()},this.verify=function(E){if(this.sHashHex=this.md.digest(),this.pubKey===void 0&&this.ecpubhex!==void 0&&this.eccurvename!==void 0&&l.crypto.ECDSA!==void 0)this.pubKey=new l.crypto.ECDSA({curve:this.eccurvename,pub:this.ecpubhex});if(this.pubKey instanceof F6&&this.pubkeyAlgName==="rsaandmgf1")return this.pubKey.verifyWithMessageHashPSS(this.sHashHex,E,this.mdAlgName,this.pssSaltLen);else if(this.pubKey instanceof F6&&this.pubkeyAlgName==="rsa")return this.pubKey.verifyWithMessageHash(this.sHashHex,E);else if(l.crypto.ECDSA!==void 0&&this.pubKey instanceof l.crypto.ECDSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,E);else if(l.crypto.DSA!==void 0&&this.pubKey instanceof l.crypto.DSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,E);else throw"Signature: unsupported public key alg: "+this.pubkeyAlgName}}},this.init=function(B,O){throw"init(key, pass) not supported for this alg:prov="+this.algProvName},this.updateString=function(B){throw"updateString(str) not supported for this alg:prov="+this.algProvName},this.updateHex=function(B){throw"updateHex(hex) not supported for this alg:prov="+this.algProvName},this.sign=function(){throw"sign() not supported for this alg:prov="+this.algProvName},this.signString=function(B){throw"digestString(str) not supported for this alg:prov="+this.algProvName},this.signHex=function(B){throw"digestHex(hex) not supported for this alg:prov="+this.algProvName},this.verify=function(B){throw"verify(hSigVal) not supported for this alg:prov="+this.algProvName},this.initParams=$,$!==void 0){if($.alg!==void 0){if(this.algName=$.alg,$.prov===void 0)this.provName=l.crypto.Util.DEFAULTPROVIDER[this.algName];else this.provName=$.prov;this.algProvName=this.algName+":"+this.provName,this.setAlgAndProvider(this.algName,this.provName),this._setAlgNames()}if($.psssaltlen!==void 0)this.pssSaltLen=$.psssaltlen;if($.prvkeypem!==void 0)if($.prvkeypas!==void 0)throw"both prvkeypem and prvkeypas parameters not supported";else try{var Y=Z8.getKey($.prvkeypem);this.init(Y)}catch(B){throw"fatal error to load pem private key: "+B}}};l.crypto.Cipher=function($){};l.crypto.Cipher.encrypt=function($,Y,X,G){if(q5(G,"enclag")!=null)X=G.encalg;if(typeof X=="string"&&X.substr(-4)=="-CBC"){var J=Y,Q=$;if(q5(G,"key")!=null)J=G.key;if(q5(G,"enc")!=null)hEnc=G.enc;var W=x1.enc.Hex.parse(J),K=x1.enc.Hex.parse(Q),Z=x1.enc.Hex.parse(G.iv),H;if(X=="des-EDE3-CBC")H=x1.TripleDES.encrypt(K,W,{iv:Z});else if(X=="aes128-CBC"||X=="aes256-CBC")H=x1.AES.encrypt(K,W,{iv:Z});else throw Error("unsupported algorithm: "+X);return H+""}else throw Error("Cipher.encrypt: unsupported key or algorithm")};l.crypto.Cipher.decrypt=function($,Y,X,G){if(q5(G,"enclag")!=null)X=G.encalg;if(typeof X=="string"&&X.substr(-4)=="-CBC"){var J=Y,Q=$;if(q5(G,"key")!=null)J=G.key;if(q5(G,"enc")!=null)Q=G.enc;var W=x1.enc.Hex.parse(J),K=x1.enc.Hex.parse(Q),Z=x1.enc.Hex.parse(G.iv),H;if(X=="des-EDE3-CBC")H=x1.TripleDES.decrypt({ciphertext:K},W,{iv:Z});else if(X=="aes128-CBC"||X=="aes256-CBC")H=x1.AES.decrypt({ciphertext:K},W,{iv:Z});else throw Error("unsupported algorithm: "+X);return x1.enc.Hex.stringify(H)}else throw Error("Cipher.decrypt: unsupported key or algorithm")};l.crypto.OID=new function(){this.oidhex2name={"2a864886f70d010101":"rsaEncryption","2a8648ce3d0201":"ecPublicKey","2a8648ce380401":"dsa","2a8648ce3d030107":"secp256r1","2b8104001f":"secp192k1","2b81040021":"secp224r1","2b8104000a":"secp256k1","2b81040022":"secp384r1","2b81040023":"secp521r1","2a8648ce380403":"SHA1withDSA","608648016503040301":"SHA224withDSA","608648016503040302":"SHA256withDSA"}};if(typeof l>"u"||!l)l={};if(typeof l.crypto>"u"||!l.crypto)l.crypto={};l.crypto.ECDSA=function($){var Y="secp256r1",X=null,G=null,J=null,Q=Error,W=S0,K=Q9,Z=l.crypto.ECDSA,H=l.crypto.ECParameterDB,z=Z.getName,V=M1,F=V.getVbyListEx,L=V.isASN1HEX,N=new nk,D=null;this.type="EC",this.isPrivate=!1,this.isPublic=!1;function A(B,O,E,M){var R=Math.max(O.bitLength(),M.bitLength()),q=B.add2D(E),_=B.curve.getInfinity();for(var P=R-1;P>=0;--P)if(_=_.twice2D(),_.z=W.ONE,O.testBit(P))if(M.testBit(P))_=_.add2D(q);else _=_.add2D(B);else if(M.testBit(P))_=_.add2D(E);return _}if(this.getBigRandom=function(B){return new W(B.bitLength(),N).mod(B.subtract(W.ONE)).add(W.ONE)},this.setNamedCurve=function(B){this.ecparams=H.getByName(B),this.prvKeyHex=null,this.pubKeyHex=null,this.curveName=B},this.setPrivateKeyHex=function(B){this.isPrivate=!0,this.prvKeyHex=B},this.setPublicKeyHex=function(B){this.isPublic=!0,this.pubKeyHex=B},this.getPublicKeyXYHex=function(){var B=this.pubKeyHex;if(B.substr(0,2)!=="04")throw"this method supports uncompressed format(04) only";var O=this.ecparams.keycharlen;if(B.length!==2+O*2)throw"malformed public key hex length";var E={};return E.x=B.substr(2,O),E.y=B.substr(2+O),E},this.getShortNISTPCurveName=function(){var B=this.curveName;if(B==="secp256r1"||B==="NIST P-256"||B==="P-256"||B==="prime256v1")return"P-256";if(B==="secp384r1"||B==="NIST P-384"||B==="P-384")return"P-384";if(B==="secp521r1"||B==="NIST P-521"||B==="P-521")return"P-521";return null},this.generateKeyPairHex=function(){var B=this.ecparams.n,O=this.getBigRandom(B),E=this.ecparams.keycharlen,M=("0000000000"+O.toString(16)).slice(-E);this.setPrivateKeyHex(M);var R=this.generatePublicKeyHex();return{ecprvhex:M,ecpubhex:R}},this.generatePublicKeyHex=function(){var B=new W(this.prvKeyHex,16),O=this.ecparams.G.multiply(B),E=O.getX().toBigInteger(),M=O.getY().toBigInteger(),R=this.ecparams.keycharlen,q=("0000000000"+E.toString(16)).slice(-R),_=("0000000000"+M.toString(16)).slice(-R),P="04"+q+_;return this.setPublicKeyHex(P),P},this.signWithMessageHash=function(B){return this.signHex(B,this.prvKeyHex)},this.signHex=function(B,O){var E=new W(O,16),M=this.ecparams.n,R=new W(B.substring(0,this.ecparams.keycharlen),16);do var q=this.getBigRandom(M),_=this.ecparams.G,P=_.multiply(q),w=P.getX().toBigInteger().mod(M);while(w.compareTo(W.ZERO)<=0);var j=q.modInverse(M).multiply(R.add(E.multiply(w))).mod(M);return Z.biRSSigToASN1Sig(w,j)},this.sign=function(B,O){var E=O,M=this.ecparams.n,R=W.fromByteArrayUnsigned(B);do var q=this.getBigRandom(M),_=this.ecparams.G,P=_.multiply(q),w=P.getX().toBigInteger().mod(M);while(w.compareTo(S0.ZERO)<=0);var j=q.modInverse(M).multiply(R.add(E.multiply(w))).mod(M);return this.serializeSig(w,j)},this.verifyWithMessageHash=function(B,O){return this.verifyHex(B,O,this.pubKeyHex)},this.verifyHex=function(B,O,E){try{var M,R,q=Z.parseSigHex(O);M=q.r,R=q.s;var _=K.decodeFromHex(this.ecparams.curve,E),P=new W(B.substring(0,this.ecparams.keycharlen),16);return this.verifyRaw(P,M,R,_)}catch(w){return!1}},this.verify=function(B,O,E){var M,R;if(Bitcoin.Util.isArray(O)){var q=this.parseSig(O);M=q.r,R=q.s}else if(typeof O==="object"&&O.r&&O.s)M=O.r,R=O.s;else throw"Invalid value for signature";var _;if(E instanceof Q9)_=E;else if(Bitcoin.Util.isArray(E))_=K.decodeFrom(this.ecparams.curve,E);else throw"Invalid format for pubkey value, must be byte array or ECPointFp";var P=W.fromByteArrayUnsigned(B);return this.verifyRaw(P,M,R,_)},this.verifyRaw=function(B,O,E,M){var R=this.ecparams.n,q=this.ecparams.G;if(O.compareTo(W.ONE)<0||O.compareTo(R)>=0)return!1;if(E.compareTo(W.ONE)<0||E.compareTo(R)>=0)return!1;var _=E.modInverse(R),P=B.multiply(_).mod(R),w=O.multiply(_).mod(R),j=q.multiply(P).add(M.multiply(w)),C=j.getX().toBigInteger().mod(R);return C.equals(O)},this.serializeSig=function(B,O){var E=B.toByteArraySigned(),M=O.toByteArraySigned(),R=[];return R.push(2),R.push(E.length),R=R.concat(E),R.push(2),R.push(M.length),R=R.concat(M),R.unshift(R.length),R.unshift(48),R},this.parseSig=function(B){var O;if(B[0]!=48)throw Error("Signature not a valid DERSequence");if(O=2,B[O]!=2)throw Error("First element in signature must be a DERInteger");var E=B.slice(O+2,O+2+B[O+1]);if(O+=2+B[O+1],B[O]!=2)throw Error("Second element in signature must be a DERInteger");var M=B.slice(O+2,O+2+B[O+1]);O+=2+B[O+1];var R=W.fromByteArrayUnsigned(E),q=W.fromByteArrayUnsigned(M);return{r:R,s:q}},this.parseSigCompact=function(B){if(B.length!==65)throw"Signature has the wrong length";var O=B[0]-27;if(O<0||O>7)throw"Invalid signature type";var E=this.ecparams.n,M=W.fromByteArrayUnsigned(B.slice(1,33)).mod(E),R=W.fromByteArrayUnsigned(B.slice(33,65)).mod(E);return{r:M,s:R,i:O}},this.readPKCS5PrvKeyHex=function(B){if(L(B)===!1)throw Error("not ASN.1 hex string");var O,E,M;try{O=F(B,0,["[0]",0],"06"),E=F(B,0,[1],"04");try{M=F(B,0,["[1]",0],"03")}catch(R){}}catch(R){throw Error("malformed PKCS#1/5 plain ECC private key")}if(this.curveName=z(O),this.curveName===void 0)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(M),this.setPrivateKeyHex(E),this.isPublic=!1},this.readPKCS8PrvKeyHex=function(B){if(L(B)===!1)throw new Q("not ASN.1 hex string");var O,E,M,R;try{O=F(B,0,[1,0],"06"),E=F(B,0,[1,1],"06"),M=F(B,0,[2,0,1],"04");try{R=F(B,0,[2,0,"[1]",0],"03")}catch(q){}}catch(q){throw new Q("malformed PKCS#8 plain ECC private key")}if(this.curveName=z(E),this.curveName===void 0)throw new Q("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(R),this.setPrivateKeyHex(M),this.isPublic=!1},this.readPKCS8PubKeyHex=function(B){if(L(B)===!1)throw new Q("not ASN.1 hex string");var O,E,M;try{O=F(B,0,[0,0],"06"),E=F(B,0,[0,1],"06"),M=F(B,0,[1],"03")}catch(R){throw new Q("malformed PKCS#8 ECC public key")}if(this.curveName=z(E),this.curveName===null)throw new Q("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(M)},this.readCertPubKeyHex=function(B,O){if(L(B)===!1)throw new Q("not ASN.1 hex string");var E,M;try{E=F(B,0,[0,5,0,1],"06"),M=F(B,0,[0,5,1],"03")}catch(R){throw new Q("malformed X.509 certificate ECC public key")}if(this.curveName=z(E),this.curveName===null)throw new Q("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(M)},$!==void 0){if($.curve!==void 0)this.curveName=$.curve}if(this.curveName===void 0)this.curveName=Y;if(this.setNamedCurve(this.curveName),$!==void 0){if($.prv!==void 0)this.setPrivateKeyHex($.prv);if($.pub!==void 0)this.setPublicKeyHex($.pub)}};l.crypto.ECDSA.parseSigHex=function($){var Y=l.crypto.ECDSA.parseSigHexInHexRS($),X=new S0(Y.r,16),G=new S0(Y.s,16);return{r:X,s:G}};l.crypto.ECDSA.parseSigHexInHexRS=function($){var Y=M1,X=Y.getChildIdx,G=Y.getV;if(Y.checkStrictDER($,0),$.substr(0,2)!="30")throw Error("signature is not a ASN.1 sequence");var J=X($,0);if(J.length!=2)throw Error("signature shall have two elements");var Q=J[0],W=J[1];if($.substr(Q,2)!="02")throw Error("1st item not ASN.1 integer");if($.substr(W,2)!="02")throw Error("2nd item not ASN.1 integer");var K=G($,Q),Z=G($,W);return{r:K,s:Z}};l.crypto.ECDSA.asn1SigToConcatSig=function($){var Y=l.crypto.ECDSA.parseSigHexInHexRS($),X=Y.r,G=Y.s;if(X.length>=130&&X.length<=134){if(X.length%2!=0)throw Error("unknown ECDSA sig r length error");if(G.length%2!=0)throw Error("unknown ECDSA sig s length error");if(X.substr(0,2)=="00")X=X.substr(2);if(G.substr(0,2)=="00")G=G.substr(2);var J=Math.max(X.length,G.length);return X=("000000"+X).slice(-J),G=("000000"+G).slice(-J),X+G}if(X.substr(0,2)=="00"&&X.length%32==2)X=X.substr(2);if(G.substr(0,2)=="00"&&G.length%32==2)G=G.substr(2);if(X.length%32==30)X="00"+X;if(G.length%32==30)G="00"+G;if(X.length%32!=0)throw Error("unknown ECDSA sig r length error");if(G.length%32!=0)throw Error("unknown ECDSA sig s length error");return X+G};l.crypto.ECDSA.concatSigToASN1Sig=function($){if($.length%4!=0)throw Error("unknown ECDSA concatinated r-s sig length error");var Y=$.substr(0,$.length/2),X=$.substr($.length/2);return l.crypto.ECDSA.hexRSSigToASN1Sig(Y,X)};l.crypto.ECDSA.hexRSSigToASN1Sig=function($,Y){var X=new S0($,16),G=new S0(Y,16);return l.crypto.ECDSA.biRSSigToASN1Sig(X,G)};l.crypto.ECDSA.biRSSigToASN1Sig=function($,Y){var X=l.asn1,G=new X.DERInteger({bigint:$}),J=new X.DERInteger({bigint:Y}),Q=new X.DERSequence({array:[G,J]});return Q.tohex()};l.crypto.ECDSA.getName=function($){if($==="2b8104001f")return"secp192k1";if($==="2a8648ce3d030107")return"secp256r1";if($==="2b8104000a")return"secp256k1";if($==="2b81040021")return"secp224r1";if($==="2b81040022")return"secp384r1";if($==="2b81040023")return"secp521r1";if("|secp256r1|NIST P-256|P-256|prime256v1|".indexOf($)!==-1)return"secp256r1";if("|secp256k1|".indexOf($)!==-1)return"secp256k1";if("|secp224r1|NIST P-224|P-224|".indexOf($)!==-1)return"secp224r1";if("|secp384r1|NIST P-384|P-384|".indexOf($)!==-1)return"secp384r1";if("|secp521r1|NIST P-521|P-521|".indexOf($)!==-1)return"secp521r1";return null};if(typeof l>"u"||!l)l={};if(typeof l.crypto>"u"||!l.crypto)l.crypto={};l.crypto.ECParameterDB=new function(){var $={},Y={};function X(G){return new S0(G,16)}this.getByName=function(G){var J=G;if(typeof Y[J]<"u")J=Y[G];if(typeof $[J]<"u")return $[J];throw"unregistered EC curve name: "+J},this.regist=function(G,J,Q,W,K,Z,H,z,V,F,L,N){$[G]={};var D=X(Q),A=X(W),B=X(K),O=X(Z),E=X(H),M=new OF(D,A,B),R=M.decodePointHex("04"+z+V);$[G].name=G,$[G].keylen=J,$[G].keycharlen=Math.ceil(J/8)*2,$[G].curve=M,$[G].G=R,$[G].n=O,$[G].h=E,$[G].oid=L,$[G].info=N;for(var q=0;q<F.length;q++)Y[F[q]]=G}};l.crypto.ECParameterDB.regist("secp128r1",128,"FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF","FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC","E87579C11079F43DD824993C2CEE5ED3","FFFFFFFE0000000075A30D1B9038A115","1","161FF7528B899B2D0C28607CA52C5B86","CF5AC8395BAFEB13C02DA292DDED7A83",[],"","secp128r1 : SECG curve over a 128 bit prime field");l.crypto.ECParameterDB.regist("secp160k1",160,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73","0","7","0100000000000000000001B8FA16DFAB9ACA16B6B3","1","3B4C382CE37AA192A4019E763036F4F5DD4D7EBB","938CF935318FDCED6BC28286531733C3F03C4FEE",[],"","secp160k1 : SECG curve over a 160 bit prime field");l.crypto.ECParameterDB.regist("secp160r1",160,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC","1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45","0100000000000000000001F4C8F927AED3CA752257","1","4A96B5688EF573284664698968C38BB913CBFC82","23A628553168947D59DCC912042351377AC5FB32",[],"","secp160r1 : SECG curve over a 160 bit prime field");l.crypto.ECParameterDB.regist("secp192k1",192,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37","0","3","FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D","1","DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D","9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D",[]);l.crypto.ECParameterDB.regist("secp192r1",192,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC","64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1","FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831","1","188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012","07192B95FFC8DA78631011ED6B24CDD573F977A11E794811",[]);l.crypto.ECParameterDB.regist("secp224r1",224,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE","B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4","FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D","1","B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21","BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34",[]);l.crypto.ECParameterDB.regist("secp256k1",256,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","0","7","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","1","79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798","483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8",[]);l.crypto.ECParameterDB.regist("secp256r1",256,"FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF","FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC","5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B","FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551","1","6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296","4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",["NIST P-256","P-256","prime256v1"]);l.crypto.ECParameterDB.regist("secp384r1",384,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC","B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973","1","AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7","3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f",["NIST P-384","P-384"]);l.crypto.ECParameterDB.regist("secp521r1",521,"1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF","1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC","051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00","1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409","1","00C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66","011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650",["NIST P-521","P-521"]);if(typeof l>"u"||!l)l={};if(typeof l.crypto>"u"||!l.crypto)l.crypto={};l.crypto.DSA=function(){var $=M1,Y=$.getVbyList,X=$.getVbyListEx,G=$.isASN1HEX,J=S0,Q=S0.ONE,W=function(K,Z,H,z){if(K==null||Z==null||H==null||z==null)throw Error("invalid DSA public key");if(Q.compareTo(Z)>=0||Z.compareTo(K)>=0)throw Error("invalid DSA public key");if(Q.compareTo(H)>=0||H.compareTo(K)>=0)throw Error("invalid DSA public key");if(Q.compareTo(z)>=0||z.compareTo(K)>=0)throw Error("invalid DSA public key");if(H.modPow(Z,K).compareTo(Q)!=0)throw Error("invalid DSA public key")};this.p=null,this.q=null,this.g=null,this.y=null,this.x=null,this.type="DSA",this.isPrivate=!1,this.isPublic=!1,this.setPrivate=function(K,Z,H,z,V){this.isPrivate=!0,this.p=K,this.q=Z,this.g=H,this.y=z,this.x=V},this.setPrivateHex=function(K,Z,H,z,V){var F,L,N,D,A;if(F=new S0(K,16),L=new S0(Z,16),N=new S0(H,16),typeof z==="string"&&z.length>1)D=new S0(z,16);else D=null;A=new S0(V,16),this.setPrivate(F,L,N,D,A)},this.setPublic=function(K,Z,H,z){W(K,Z,H,z),this.isPublic=!0,this.p=K,this.q=Z,this.g=H,this.y=z,this.x=null},this.setPublicHex=function(K,Z,H,z){var V,F,L,N;V=new S0(K,16),F=new S0(Z,16),L=new S0(H,16),N=new S0(z,16),this.setPublic(V,F,L,N)},this.signWithMessageHash=function(K){var Z=this.p,H=this.q,z=this.g,V=this.y,F=this.x,L=K.substr(0,H.bitLength()/4),N=new S0(L,16),D,A,B;do D=l.crypto.Util.getRandomBigIntegerMinToMax(S0.ONE.add(S0.ONE),H.subtract(S0.ONE)),A=z.modPow(D,Z).mod(H),B=D.modInverse(H).multiply(N.add(F.multiply(A))).mod(H);while(A.compareTo(S0.ZERO)==0||B.compareTo(S0.ZERO)==0);var O=l.asn1.ASN1Util.jsonToASN1HEX({seq:[{int:{bigint:A}},{int:{bigint:B}}]});return O},this.verifyWithMessageHash=function(K,Z){var H=this.p,z=this.q,V=this.g,F=this.y,L=this.parseASN1Signature(Z),N=L[0],D=L[1],A=K.substr(0,z.bitLength()/4),B=new S0(A,16);if(S0.ZERO.compareTo(N)>=0||N.compareTo(z)>=0)throw"invalid DSA signature";if(S0.ZERO.compareTo(D)>=0||D.compareTo(z)>=0)throw"invalid DSA signature";var O=D.modInverse(z),E=B.multiply(O).mod(z),M=N.multiply(O).mod(z),R=V.modPow(E,H).multiply(F.modPow(M,H)).mod(H).mod(z);return R.compareTo(N)==0},this.parseASN1Signature=function(K){try{var Z=new J(X(K,0,[0],"02"),16),H=new J(X(K,0,[1],"02"),16);return[Z,H]}catch(z){throw Error("malformed ASN.1 DSA signature")}},this.readPKCS5PrvKeyHex=function(K){var Z,H,z,V,F;if(G(K)===!1)throw Error("not ASN.1 hex string");try{Z=X(K,0,[1],"02"),H=X(K,0,[2],"02"),z=X(K,0,[3],"02"),V=X(K,0,[4],"02"),F=X(K,0,[5],"02")}catch(L){throw Error("malformed PKCS#1/5 plain DSA private key")}this.setPrivateHex(Z,H,z,V,F)},this.readPKCS8PrvKeyHex=function(K){var Z,H,z,V;if(G(K)===!1)throw Error("not ASN.1 hex string");try{Z=X(K,0,[1,1,0],"02"),H=X(K,0,[1,1,1],"02"),z=X(K,0,[1,1,2],"02"),V=X(K,0,[2,0],"02")}catch(F){throw Error("malformed PKCS#8 plain DSA private key")}this.setPrivateHex(Z,H,z,null,V)},this.readPKCS8PubKeyHex=function(K){var Z,H,z,V;if(G(K)===!1)throw Error("not ASN.1 hex string");try{Z=X(K,0,[0,1,0],"02"),H=X(K,0,[0,1,1],"02"),z=X(K,0,[0,1,2],"02"),V=X(K,0,[1,0],"02")}catch(F){throw Error("malformed PKCS#8 DSA public key")}this.setPublicHex(Z,H,z,V)},this.readCertPubKeyHex=function(K,Z){var H,z,V,F;if(G(K)===!1)throw Error("not ASN.1 hex string");try{H=X(K,0,[0,5,0,1,0],"02"),z=X(K,0,[0,5,0,1,1],"02"),V=X(K,0,[0,5,0,1,2],"02"),F=X(K,0,[0,5,1,0],"02")}catch(L){throw Error("malformed X.509 certificate DSA public key")}this.setPublicHex(H,z,V,F)}};var Z8=function(){var $=function(D,A,B){return G(x1.AES,D,A,B)},Y=function(D,A,B){return G(x1.TripleDES,D,A,B)},X=function(D,A,B){return G(x1.DES,D,A,B)},G=function(D,A,B,O){var E=x1.enc.Hex.parse(A),M=x1.enc.Hex.parse(B),R=x1.enc.Hex.parse(O),q={};q.key=M,q.iv=R,q.ciphertext=E;var _=D.decrypt(q,M,{iv:R});return x1.enc.Hex.stringify(_)},J=function(D,A,B){return K(x1.AES,D,A,B)},Q=function(D,A,B){return K(x1.TripleDES,D,A,B)},W=function(D,A,B){return K(x1.DES,D,A,B)},K=function(D,A,B,O){var E=x1.enc.Hex.parse(A),M=x1.enc.Hex.parse(B),R=x1.enc.Hex.parse(O),q=D.encrypt(E,M,{iv:R}),_=x1.enc.Hex.parse(q.toString()),P=x1.enc.Base64.stringify(_);return P},Z={"AES-256-CBC":{proc:$,eproc:J,keylen:32,ivlen:16},"AES-192-CBC":{proc:$,eproc:J,keylen:24,ivlen:16},"AES-128-CBC":{proc:$,eproc:J,keylen:16,ivlen:16},"DES-EDE3-CBC":{proc:Y,eproc:Q,keylen:24,ivlen:8},"DES-CBC":{proc:X,eproc:W,keylen:8,ivlen:8}},H=function(D){return Z[D].proc},z=function(D){var A=x1.lib.WordArray.random(D),B=x1.enc.Hex.stringify(A);return B},V=function(D){var A={},B=D.match(new RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)","m"));if(B)A.cipher=B[1],A.ivsalt=B[2];var O=D.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"));if(O)A.type=O[1];var E=-1,M=0;if(D.indexOf(`\r
\r
`)!=-1)E=D.indexOf(`\r
\r
`),M=2;if(D.indexOf(`

`)!=-1)E=D.indexOf(`

`),M=1;var R=D.indexOf("-----END");if(E!=-1&&R!=-1){var q=D.substring(E+M*2,R-M);q=q.replace(/\s+/g,""),A.data=q}return A},F=function(D,A,B){var O=B.substring(0,16),E=x1.enc.Hex.parse(O),M=x1.enc.Utf8.parse(A),R=Z[D].keylen+Z[D].ivlen,q="",_=null;for(;;){var P=x1.algo.MD5.create();if(_!=null)P.update(_);if(P.update(M),P.update(E),_=P.finalize(),q=q+x1.enc.Hex.stringify(_),q.length>=R*2)break}var w={};return w.keyhex=q.substr(0,Z[D].keylen*2),w.ivhex=q.substr(Z[D].keylen*2,Z[D].ivlen*2),w},L=function(D,A,B,O){var E=x1.enc.Base64.parse(D),M=x1.enc.Hex.stringify(E),R=Z[A].proc,q=R(M,B,O);return q},N=function(D,A,B,O){var E=Z[A].eproc,M=E(D,B,O);return M};return{version:"1.0.0",parsePKCS5PEM:function(D){return V(D)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(D,A,B){return F(D,A,B)},decryptKeyB64:function(D,A,B,O){return L(D,A,B,O)},getDecryptedKeyHex:function(D,A){var B=V(D),O=B.type,E=B.cipher,M=B.ivsalt,R=B.data,q=F(E,A,M),_=q.keyhex,P=L(R,E,_,M);return P},getEncryptedPKCS5PEMFromPrvKeyHex:function(D,A,B,O,E){var j="";if(typeof O>"u"||O==null)O="AES-256-CBC";if(typeof Z[O]>"u")throw Error("KEYUTIL unsupported algorithm: "+O);if(typeof E>"u"||E==null){var M=Z[O].ivlen,R=z(M);E=R.toUpperCase()}var q=F(O,B,E),_=q.keyhex,P=N(A,O,_,E),w=P.replace(/(.{64})/g,`$1\r
`),j="-----BEGIN "+D+` PRIVATE KEY-----\r
`;return j+=`Proc-Type: 4,ENCRYPTED\r
`,j+="DEK-Info: "+O+","+E+`\r
`,j+=`\r
`,j+=w,j+=`\r
-----END `+D+` PRIVATE KEY-----\r
`,j},getEncryptedPKCS8PEM:function(D,A,B){var O=this.getEncryptedPKCS8Hex(D,A,B);return RG(O,"ENCRYPTED PRIVATE KEY")},getEncryptedPKCS8Hex:function(D,A,B){var O;if(B==null||B==null)O={};else O=JSON.parse(JSON.stringify(B));O.plain=D,this.initPBES2Param(O),this.encryptPBES2Param(O,A);var E=this.generatePBES2ASN1Param(O);return l.asn1.ASN1Util.newObject(E).tohex()},initPBES2Param:function(D){if(q5(D,"encalg")==null)D.encalg="aes256-CBC";if(q5(D,"iter")==null)D.iter=2048;if(q5(D,"prf")==null)D.prf="hmacWithSHA256";if(q5(D,"salt")==null)D.salt=x1.enc.Hex.stringify(x1.lib.WordArray.random(8));if(q5(D,"enciv")==null){var A;if(D.encalg=="des-EDE3-CBC")A=8;if(D.encalg=="aes128-CBC")A=16;if(D.encalg=="aes256-CBC")A=16;D.enciv=x1.enc.Hex.stringify(x1.lib.WordArray.random(A))}},encryptPBES2Param:function(D,A){var B=Z8.getDKFromPBES2Param(D,A);try{var O=l.crypto.Cipher.encrypt(D.plain,B,D.encalg,{iv:D.enciv})}catch(E){throw Error("encrypt error: "+D.plain+" "+B+" "+D.encalg+" "+D.enciv)}D.enc=O},generatePBES2ASN1Param:function(D){var A={seq:[{seq:[{oid:"pkcs5PBES2"},{seq:[{seq:[{oid:"pkcs5PBKDF2"},{seq:[{octstr:{hex:D.salt}},{int:{hex:Co4(D.iter)}}]}]},{seq:[{oid:D.encalg},{octstr:{hex:D.enciv}}]}]}]},{octstr:{hex:D.enc}}]};if(D.prf!="hmacWithSHA1")A.seq[0].seq[1].seq[0].seq[1].seq.push({seq:[{oid:D.prf},{null:""}]});return A},parseHexOfEncryptedPKCS8:function(D){var A=M1,B=A.getChildIdx,O=A.getV,E={},M=B(D,0);if(M.length!=2)throw Error("malformed format: SEQUENCE(0).items != 2: "+M.length);E.ciphertext=O(D,M[1]);var R=B(D,M[0]);if(R.length!=2)throw Error("malformed format: SEQUENCE(0.0).items != 2: "+R.length);if(O(D,R[0])!="2a864886f70d01050d")throw Error("this only supports pkcs5PBES2");var q=B(D,R[1]);if(R.length!=2)throw Error("malformed format: SEQUENCE(0.0.1).items != 2: "+q.length);var _=B(D,q[1]);if(_.length!=2)throw Error("malformed format: SEQUENCE(0.0.1.1).items != 2: "+_.length);if(O(D,_[0])!="2a864886f70d0307")throw"this only supports TripleDES";E.encryptionSchemeAlg="TripleDES",E.encryptionSchemeIV=O(D,_[1]);var P=B(D,q[0]);if(P.length!=2)throw Error("malformed format: SEQUENCE(0.0.1.0).items != 2: "+P.length);if(O(D,P[0])!="2a864886f70d01050c")throw Error("this only supports pkcs5PBKDF2");var w=B(D,P[1]);if(w.length<2)throw Error("malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+w.length);E.pbkdf2Salt=O(D,w[0]);var j=O(D,w[1]);try{E.pbkdf2Iter=parseInt(j,16)}catch(C){throw Error("malformed format pbkdf2Iter: "+j)}return E},getPBKDF2KeyHexFromParam:function(D,A){var B=x1.enc.Hex.parse(D.pbkdf2Salt),O=D.pbkdf2Iter,E=x1.PBKDF2(A,B,{keySize:6,iterations:O}),M=x1.enc.Hex.stringify(E);return M},_getPlainPKCS8HexFromEncryptedPKCS8PEM:function(D,A){var B=B7(D,"ENCRYPTED PRIVATE KEY"),O=this.parseHexOfEncryptedPKCS8(B),E=Z8.getPBKDF2KeyHexFromParam(O,A),M={};M.ciphertext=x1.enc.Hex.parse(O.ciphertext);var R=x1.enc.Hex.parse(E),q=x1.enc.Hex.parse(O.encryptionSchemeIV),_=x1.TripleDES.decrypt(M,R,{iv:q}),P=x1.enc.Hex.stringify(_);return P},parsePBES2:function(D){var A=M1.parse(D);if(q5(A,"seq.0.seq.0.oid")!="pkcs5PBES2"||q5(A,"seq.0.seq.1.seq.0.seq.0.oid")!="pkcs5PBKDF2")throw Error("not pkcs5PBES2 and pkcs5PBKDF2 used");var B=q5(A,"seq.0.seq.1.seq.0.seq.1.seq");if(B==null)throw Error("PBKDF2 parameter not found");var O=q5(B,"0.octstr.hex"),E=q5(B,"1.int.hex"),M=q5(B,"2.seq.0.oid","hmacWithSHA1"),R=-1;try{R=parseInt(E,16)}catch(j){throw Error("iter not proper value")}var q=q5(A,"seq.0.seq.1.seq.1.seq.0.oid"),_=q5(A,"seq.0.seq.1.seq.1.seq.1.octstr.hex"),P=q5(A,"seq.1.octstr.hex");if(q==null||_==null||P==null)throw Error("encalg, enciv or enc is undefined");var w={salt:O,iter:R,prf:M,encalg:q,enciv:_,enc:P};return w},getDKFromPBES2Param:function(D,A){var B={hmacWithSHA1:x1.algo.SHA1,hmacWithSHA224:x1.algo.SHA224,hmacWithSHA256:x1.algo.SHA256,hmacWithSHA384:x1.algo.SHA384,hmacWithSHA512:x1.algo.SHA512},O={"des-EDE3-CBC":6,"aes128-CBC":4,"aes256-CBC":8},E=B[D.prf];if(E==null)throw Error("unsupported prf");var M=O[D.encalg];if(M==null)throw Error("unsupported encalg");var R=x1.enc.Hex.parse(D.salt),q=D.iter;try{var _=x1.PBKDF2(A,R,{keySize:M,iterations:q,hasher:E});return x1.enc.Hex.stringify(_)}catch(P){throw Error("PBKDF2 error: "+P+" "+JSON.stringify(D)+" "+A)}},getPlainHexFromEncryptedPKCS8PEM:function(D,A){if(D.indexOf("BEGIN ENCRYPTED PRIVATE KEY")==-1)throw Error("not Encrypted PKCS#8 PEM string");var B=B7(D),O;try{O=Z8.parsePBES2(B)}catch(M){throw Error("malformed PBES2 format: "+M.message)}var E=Z8.getDKFromPBES2Param(O,A);return l.crypto.Cipher.decrypt(O.enc,E,O.encalg,{iv:O.enciv})},getKeyFromEncryptedPKCS8PEM:function(D,A){var B=this.getPlainHexFromEncryptedPKCS8PEM(D,A),O=this.getKeyFromPlainPrivatePKCS8Hex(B);return O},parsePlainPrivatePKCS8Hex:function(D){var A=M1,B=A.getChildIdx,O=A.getV,E={};if(E.algparam=null,D.substr(0,2)!="30")throw Error("malformed plain PKCS8 private key(code:001)");var M=B(D,0);if(M.length<3)throw Error("malformed plain PKCS8 private key(code:002)");if(D.substr(M[1],2)!="30")throw Error("malformed PKCS8 private key(code:003)");var R=B(D,M[1]);if(R.length!=2)throw Error("malformed PKCS8 private key(code:004)");if(D.substr(R[0],2)!="06")throw Error("malformed PKCS8 private key(code:005)");if(E.algoid=O(D,R[0]),D.substr(R[1],2)=="06")E.algparam=O(D,R[1]);if(D.substr(M[2],2)!="04")throw Error("malformed PKCS8 private key(code:006)");return E.keyidx=A.getVidx(D,M[2]),E},getKeyFromPlainPrivatePKCS8PEM:function(D){var A=B7(D,"PRIVATE KEY"),B=this.getKeyFromPlainPrivatePKCS8Hex(A);return B},getKeyFromPlainPrivatePKCS8Hex:function(D){var A=this.parsePlainPrivatePKCS8Hex(D),B;if(A.algoid=="2a864886f70d010101")B=new F6;else if(A.algoid=="2a8648ce380401")B=new l.crypto.DSA;else if(A.algoid=="2a8648ce3d0201")B=new l.crypto.ECDSA;else throw Error("unsupported private key algorithm");return B.readPKCS8PrvKeyHex(D),B},_getKeyFromPublicPKCS8Hex:function(D){var A,B=M1.getVbyList(D,0,[0,0],"06");if(B==="2a864886f70d010101")A=new F6;else if(B==="2a8648ce380401")A=new l.crypto.DSA;else if(B==="2a8648ce3d0201")A=new l.crypto.ECDSA;else throw Error("unsupported PKCS#8 public key hex");return A.readPKCS8PubKeyHex(D),A},parsePublicRawRSAKeyHex:function(D){var A=M1,B=A.getChildIdx,O=A.getV,E={};if(D.substr(0,2)!="30")throw Error("malformed RSA key(code:001)");var M=B(D,0);if(M.length!=2)throw Error("malformed RSA key(code:002)");if(D.substr(M[0],2)!="02")throw Error("malformed RSA key(code:003)");if(E.n=O(D,M[0]),D.substr(M[1],2)!="02")throw Error("malformed RSA key(code:004)");return E.e=O(D,M[1]),E},parsePublicPKCS8Hex:function(D){var A=M1,B=A.getChildIdx,O=A.getV,E={};E.algparam=null;var M=B(D,0);if(M.length!=2)throw Error("outer DERSequence shall have 2 elements: "+M.length);var R=M[0];if(D.substr(R,2)!="30")throw Error("malformed PKCS8 public key(code:001)");var q=B(D,R);if(q.length!=2)throw Error("malformed PKCS8 public key(code:002)");if(D.substr(q[0],2)!="06")throw Error("malformed PKCS8 public key(code:003)");if(E.algoid=O(D,q[0]),D.substr(q[1],2)=="06")E.algparam=O(D,q[1]);else if(D.substr(q[1],2)=="30")E.algparam={},E.algparam.p=A.getVbyList(D,q[1],[0],"02"),E.algparam.q=A.getVbyList(D,q[1],[1],"02"),E.algparam.g=A.getVbyList(D,q[1],[2],"02");if(D.substr(M[1],2)!="03")throw Error("malformed PKCS8 public key(code:004)");return E.key=O(D,M[1]).substr(2),E}}}();Z8.getKey=function($,Y,X){var G=M1,J=G.getChildIdx,Q=G.getV,W=G.getVbyList,K=l.crypto,Z=K.ECDSA,H=K.DSA,z=F6,V=B7,F=Z8;if(typeof z<"u"&&$ instanceof z)return $;if(typeof Z<"u"&&$ instanceof Z)return $;if(typeof H<"u"&&$ instanceof H)return $;if($.curve!==void 0&&$.xy!==void 0&&$.d===void 0)return new Z({pub:$.xy,curve:$.curve});if($.curve!==void 0&&$.d!==void 0)return new Z({prv:$.d,curve:$.curve});if($.kty===void 0&&$.n!==void 0&&$.e!==void 0&&$.d===void 0){var L=new z;return L.setPublic($.n,$.e),L}if($.kty===void 0&&$.n!==void 0&&$.e!==void 0&&$.d!==void 0&&$.p!==void 0&&$.q!==void 0&&$.dp!==void 0&&$.dq!==void 0&&$.co!==void 0&&$.qi===void 0){var L=new z;return L.setPrivateEx($.n,$.e,$.d,$.p,$.q,$.dp,$.dq,$.co),L}if($.kty===void 0&&$.n!==void 0&&$.e!==void 0&&$.d!==void 0&&$.p===void 0){var L=new z;return L.setPrivate($.n,$.e,$.d),L}if($.p!==void 0&&$.q!==void 0&&$.g!==void 0&&$.y!==void 0&&$.x===void 0){var L=new H;return L.setPublic($.p,$.q,$.g,$.y),L}if($.p!==void 0&&$.q!==void 0&&$.g!==void 0&&$.y!==void 0&&$.x!==void 0){var L=new H;return L.setPrivate($.p,$.q,$.g,$.y,$.x),L}if($.kty==="RSA"&&$.n!==void 0&&$.e!==void 0&&$.d===void 0){var L=new z;return L.setPublic(W$($.n),W$($.e)),L}if($.kty==="RSA"&&$.n!==void 0&&$.e!==void 0&&$.d!==void 0&&$.p!==void 0&&$.q!==void 0&&$.dp!==void 0&&$.dq!==void 0&&$.qi!==void 0){var L=new z;return L.setPrivateEx(W$($.n),W$($.e),W$($.d),W$($.p),W$($.q),W$($.dp),W$($.dq),W$($.qi)),L}if($.kty==="RSA"&&$.n!==void 0&&$.e!==void 0&&$.d!==void 0){var L=new z;return L.setPrivate(W$($.n),W$($.e),W$($.d)),L}if($.kty==="EC"&&$.crv!==void 0&&$.x!==void 0&&$.y!==void 0&&$.d===void 0){var N=new Z({curve:$.crv}),D=N.ecparams.keycharlen,A=("0000000000"+W$($.x)).slice(-D),B=("0000000000"+W$($.y)).slice(-D),O="04"+A+B;return N.setPublicKeyHex(O),N}if($.kty==="EC"&&$.crv!==void 0&&$.x!==void 0&&$.y!==void 0&&$.d!==void 0){var N=new Z({curve:$.crv}),D=N.ecparams.keycharlen,A=("0000000000"+W$($.x)).slice(-D),B=("0000000000"+W$($.y)).slice(-D),O="04"+A+B,E=("0000000000"+W$($.d)).slice(-D);return N.setPublicKeyHex(O),N.setPrivateKeyHex(E),N}if(X==="pkcs5prv"){var M=$,G=M1,R,L;if(R=J(M,0),R.length===9)L=new z,L.readPKCS5PrvKeyHex(M);else if(R.length===6)L=new H,L.readPKCS5PrvKeyHex(M);else if(R.length>2&&M.substr(R[1],2)==="04")L=new Z,L.readPKCS5PrvKeyHex(M);else throw Error("unsupported PKCS#1/5 hexadecimal key");return L}if(X==="pkcs8prv"){var L=F.getKeyFromPlainPrivatePKCS8Hex($);return L}if(X==="pkcs8pub")return F._getKeyFromPublicPKCS8Hex($);if(X==="x509pub")return e4.getPublicKeyFromCertHex($);if($.indexOf("-END CERTIFICATE-",0)!=-1||$.indexOf("-END X509 CERTIFICATE-",0)!=-1||$.indexOf("-END TRUSTED CERTIFICATE-",0)!=-1)return e4.getPublicKeyFromCertPEM($);if($.indexOf("-END PUBLIC KEY-")!=-1){var q=B7($,"PUBLIC KEY");return F._getKeyFromPublicPKCS8Hex(q)}if($.indexOf("-END RSA PRIVATE KEY-")!=-1&&$.indexOf("4,ENCRYPTED")==-1){var _=V($,"RSA PRIVATE KEY");return F.getKey(_,null,"pkcs5prv")}if($.indexOf("-END DSA PRIVATE KEY-")!=-1&&$.indexOf("4,ENCRYPTED")==-1){var P=V($,"DSA PRIVATE KEY"),w=W(P,0,[1],"02"),j=W(P,0,[2],"02"),C=W(P,0,[3],"02"),k=W(P,0,[4],"02"),S=W(P,0,[5],"02"),L=new H;return L.setPrivate(new S0(w,16),new S0(j,16),new S0(C,16),new S0(k,16),new S0(S,16)),L}if($.indexOf("-END EC PRIVATE KEY-")!=-1&&$.indexOf("4,ENCRYPTED")==-1){var _=V($,"EC PRIVATE KEY");return F.getKey(_,null,"pkcs5prv")}if($.indexOf("-END PRIVATE KEY-")!=-1)return F.getKeyFromPlainPrivatePKCS8PEM($);if($.indexOf("-END RSA PRIVATE KEY-")!=-1&&$.indexOf("4,ENCRYPTED")!=-1){var I=F.getDecryptedKeyHex($,Y),v=new F6;return v.readPKCS5PrvKeyHex(I),v}if($.indexOf("-END EC PRIVATE KEY-")!=-1&&$.indexOf("4,ENCRYPTED")!=-1){var P=F.getDecryptedKeyHex($,Y),L=W(P,0,[1],"04"),x=W(P,0,[2,0],"06"),y=W(P,0,[3,0],"03").substr(2),d="";if(l.crypto.OID.oidhex2name[x]!==void 0)d=l.crypto.OID.oidhex2name[x];else throw Error("undefined OID(hex) in KJUR.crypto.OID: "+x);var N=new Z({curve:d});return N.setPublicKeyHex(y),N.setPrivateKeyHex(L),N.isPublic=!1,N}if($.indexOf("-END DSA PRIVATE KEY-")!=-1&&$.indexOf("4,ENCRYPTED")!=-1){var P=F.getDecryptedKeyHex($,Y),w=W(P,0,[1],"02"),j=W(P,0,[2],"02"),C=W(P,0,[3],"02"),k=W(P,0,[4],"02"),S=W(P,0,[5],"02"),L=new H;return L.setPrivate(new S0(w,16),new S0(j,16),new S0(C,16),new S0(k,16),new S0(S,16)),L}if($.indexOf("-END ENCRYPTED PRIVATE KEY-")!=-1)return F.getKeyFromEncryptedPKCS8PEM($,Y);throw Error("not supported argument")};Z8.generateKeypair=function($,Y){if($=="RSA"){var X=Y,G=new F6;G.generate(X,"10001"),G.isPrivate=!0,G.isPublic=!0;var J=new F6,Q=G.n.toString(16),W=G.e.toString(16);J.setPublic(Q,W),J.isPrivate=!1,J.isPublic=!0;var K={};return K.prvKeyObj=G,K.pubKeyObj=J,K}else if($=="EC"){var Z=Y,H=new l.crypto.ECDSA({curve:Z}),z=H.generateKeyPairHex(),G=new l.crypto.ECDSA({curve:Z});G.setPublicKeyHex(z.ecpubhex),G.setPrivateKeyHex(z.ecprvhex),G.isPrivate=!0,G.isPublic=!1;var J=new l.crypto.ECDSA({curve:Z});J.setPublicKeyHex(z.ecpubhex),J.isPrivate=!1,J.isPublic=!0;var K={};return K.prvKeyObj=G,K.pubKeyObj=J,K}else throw Error("unknown algorithm: "+$)};Z8.getPEM=function($,Y,X,G,J,Q){var W=l,K=W.asn1,Z=K.DERObjectIdentifier,H=K.DERInteger,z=K.ASN1Util.newObject,V=K.x509,F=V.SubjectPublicKeyInfo,L=W.crypto,N=L.DSA,D=L.ECDSA,A=F6;function B(v){var x=z({seq:[{int:0},{int:{bigint:v.n}},{int:v.e},{int:{bigint:v.d}},{int:{bigint:v.p}},{int:{bigint:v.q}},{int:{bigint:v.dmp1}},{int:{bigint:v.dmq1}},{int:{bigint:v.coeff}}]});return x}function O(v){var x=z({seq:[{int:1},{octstr:{hex:v.prvKeyHex}},{tag:["a0",!0,{oid:{name:v.curveName}}]},{tag:["a1",!0,{bitstr:{hex:"00"+v.pubKeyHex}}]}]});return x}function E(v){var x=z({seq:[{int:0},{int:{bigint:v.p}},{int:{bigint:v.q}},{int:{bigint:v.g}},{int:{bigint:v.y}},{int:{bigint:v.x}}]});return x}if((A!==void 0&&$ instanceof A||N!==void 0&&$ instanceof N||D!==void 0&&$ instanceof D)&&$.isPublic==!0&&(Y===void 0||Y=="PKCS8PUB")){var M=new F($),R=M.tohex();return RG(R,"PUBLIC KEY")}if(Y=="PKCS1PRV"&&A!==void 0&&$ instanceof A&&(X===void 0||X==null)&&$.isPrivate==!0){var M=B($),R=M.tohex();return RG(R,"RSA PRIVATE KEY")}if(Y=="PKCS1PRV"&&D!==void 0&&$ instanceof D&&(X===void 0||X==null)&&$.isPrivate==!0){var q=new Z({name:$.curveName}),_=q.tohex(),P=O($),w=P.tohex(),j="";return j+=RG(_,"EC PARAMETERS"),j+=RG(w,"EC PRIVATE KEY"),j}if(Y=="PKCS1PRV"&&N!==void 0&&$ instanceof N&&(X===void 0||X==null)&&$.isPrivate==!0){var M=E($),R=M.tohex();return RG(R,"DSA PRIVATE KEY")}if(Y=="PKCS5PRV"&&A!==void 0&&$ instanceof A&&(X!==void 0&&X!=null)&&$.isPrivate==!0){var M=B($),R=M.tohex();if(G===void 0)G="DES-EDE3-CBC";return this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",R,X,G,Q)}if(Y=="PKCS5PRV"&&D!==void 0&&$ instanceof D&&(X!==void 0&&X!=null)&&$.isPrivate==!0){var M=O($),R=M.tohex();if(G===void 0)G="DES-EDE3-CBC";return this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",R,X,G,Q)}if(Y=="PKCS5PRV"&&N!==void 0&&$ instanceof N&&(X!==void 0&&X!=null)&&$.isPrivate==!0){var M=E($),R=M.tohex();if(G===void 0)G="DES-EDE3-CBC";return this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",R,X,G,Q)}var C=function(v,x){if(typeof x=="string")return Z8.getEncryptedPKCS8PEM(v,x);else if(typeof x=="object"&&q5(x,"passcode")!=null){var y=JSON.parse(JSON.stringify(x)),d=y.passcode;return delete y.passcode,Z8.getEncryptedPKCS8PEM(v,d,y)}};if(Y=="PKCS8PRV"&&A!=null&&$ instanceof A&&$.isPrivate==!0){var k=B($),S=k.tohex(),M=z({seq:[{int:0},{seq:[{oid:{name:"rsaEncryption"}},{null:!0}]},{octstr:{hex:S}}]}),R=M.tohex();if(X===void 0||X==null)return RG(R,"PRIVATE KEY");else return C(R,X)}if(Y=="PKCS8PRV"&&D!==void 0&&$ instanceof D&&$.isPrivate==!0){var I={seq:[{int:1},{octstr:{hex:$.prvKeyHex}}]};if(typeof $.pubKeyHex=="string")I.seq.push({tag:["a1",!0,{bitstr:{hex:"00"+$.pubKeyHex}}]});var k=new z(I),S=k.tohex(),M=z({seq:[{int:0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:$.curveName}}]},{octstr:{hex:S}}]}),R=M.tohex();if(X===void 0||X==null)return RG(R,"PRIVATE KEY");else return C(R,X)}if(Y=="PKCS8PRV"&&N!==void 0&&$ instanceof N&&$.isPrivate==!0){var k=new H({bigint:$.x}),S=k.tohex(),M=z({seq:[{int:0},{seq:[{oid:{name:"dsa"}},{seq:[{int:{bigint:$.p}},{int:{bigint:$.q}},{int:{bigint:$.g}}]}]},{octstr:{hex:S}}]}),R=M.tohex();if(X===void 0||X==null)return RG(R,"PRIVATE KEY");else return C(R,X)}throw Error("unsupported object nor format")};Z8.getKeyFromCSRPEM=function($){var Y=B7($,"CERTIFICATE REQUEST"),X=Z8.getKeyFromCSRHex(Y);return X};Z8.getKeyFromCSRHex=function($){var Y=Z8.parseCSRHex($),X=Z8.getKey(Y.p8pubkeyhex,null,"pkcs8pub");return X};Z8.parseCSRHex=function($){var Y=M1,X=Y.getChildIdx,G=Y.getTLV,J={},Q=$;if(Q.substr(0,2)!="30")throw Error("malformed CSR(code:001)");var W=X(Q,0);if(W.length<1)throw Error("malformed CSR(code:002)");if(Q.substr(W[0],2)!="30")throw Error("malformed CSR(code:003)");var K=X(Q,W[0]);if(K.length<3)throw Error("malformed CSR(code:004)");return J.p8pubkeyhex=G(Q,K[2]),J};Z8.getKeyID=function($){var Y=Z8,X=M1;if(typeof $==="string"&&$.indexOf("BEGIN ")!=-1)$=Y.getKey($);var G=B7(Y.getPEM($)),J=X.getIdxbyList(G,0,[1]),Q=X.getV(G,J).substring(2);return l.crypto.Util.hashHex(Q,"sha1")};Z8.getJWK=function($,Y,X,G,J){var Q,W={},K,Z=l.crypto.Util.hashHex;if(typeof $=="string"){if(Q=Z8.getKey($),$.indexOf("CERTIFICATE")!=-1)K=B7($)}else if(typeof $=="object")if($ instanceof e4)Q=$.getPublicKey(),K=$.hex;else Q=$;else throw Error("unsupported keyinfo type");if(Q instanceof F6&&Q.isPrivate)W.kty="RSA",W.n=TY(Q.n.toString(16)),W.e=TY(Q.e.toString(16)),W.d=TY(Q.d.toString(16)),W.p=TY(Q.p.toString(16)),W.q=TY(Q.q.toString(16)),W.dp=TY(Q.dmp1.toString(16)),W.dq=TY(Q.dmq1.toString(16)),W.qi=TY(Q.coeff.toString(16));else if(Q instanceof F6&&Q.isPublic)W.kty="RSA",W.n=TY(Q.n.toString(16)),W.e=TY(Q.e.toString(16));else if(Q instanceof l.crypto.ECDSA&&Q.isPrivate){var H=Q.getShortNISTPCurveName();if(H!=="P-256"&&H!=="P-384"&&H!=="P-521")throw Error("unsupported curve name for JWT: "+H);var z=Q.getPublicKeyXYHex();W.kty="EC",W.crv=H,W.x=TY(z.x),W.y=TY(z.y),W.d=TY(Q.prvKeyHex)}else if(Q instanceof l.crypto.ECDSA&&Q.isPublic){var H=Q.getShortNISTPCurveName();if(H!=="P-256"&&H!=="P-384"&&H!=="P-521")throw Error("unsupported curve name for JWT: "+H);var z=Q.getPublicKeyXYHex();W.kty="EC",W.crv=H,W.x=TY(z.x),W.y=TY(z.y)}if(W.kty==null)throw Error("unsupported keyinfo");if(!Q.isPrivate&&Y!=!0)W.kid=l.jws.JWS.getJWKthumbprint(W);if(K!=null&&X!=!0)W.x5c=[dk(K)];if(K!=null&&G!=!0)W.x5t=on(dk(Z(K,"sha1")));if(K!=null&&J!=!0)W["x5t#S256"]=on(dk(Z(K,"sha256")));return W};Z8.getJWKFromKey=function($){return Z8.getJWK($,!0,!0,!0,!0)};F6.getPosArrayOfChildrenFromHex=function($){return M1.getChildIdx($,0)};F6.getHexValueArrayOfChildrenFromHex=function($){var Y=M1,X=Y.getV,F=F6.getPosArrayOfChildrenFromHex($),G=X($,F[0]),J=X($,F[1]),Q=X($,F[2]),W=X($,F[3]),K=X($,F[4]),Z=X($,F[5]),H=X($,F[6]),z=X($,F[7]),V=X($,F[8]),F=[];return F.push(G,J,Q,W,K,Z,H,z,V),F};F6.prototype.readPrivateKeyFromPEMString=function($){var Y=B7($),X=F6.getHexValueArrayOfChildrenFromHex(Y);this.setPrivateEx(X[1],X[2],X[3],X[4],X[5],X[6],X[7],X[8])};F6.prototype.readPKCS5PrvKeyHex=function($){var Y=F6.getHexValueArrayOfChildrenFromHex($);this.setPrivateEx(Y[1],Y[2],Y[3],Y[4],Y[5],Y[6],Y[7],Y[8])};F6.prototype.readPKCS8PrvKeyHex=function($){var Y,X,G,J,Q,W,K,Z,H=M1,z=H.getVbyListEx;if(H.isASN1HEX($)===!1)throw Error("not ASN.1 hex string");try{Y=z($,0,[2,0,1],"02"),X=z($,0,[2,0,2],"02"),G=z($,0,[2,0,3],"02"),J=z($,0,[2,0,4],"02"),Q=z($,0,[2,0,5],"02"),W=z($,0,[2,0,6],"02"),K=z($,0,[2,0,7],"02"),Z=z($,0,[2,0,8],"02")}catch(V){throw Error("malformed PKCS#8 plain RSA private key")}this.setPrivateEx(Y,X,G,J,Q,W,K,Z)};F6.prototype.readPKCS5PubKeyHex=function($){var Y=M1,X=Y.getV;if(Y.isASN1HEX($)===!1)throw Error("keyHex is not ASN.1 hex string");var G=Y.getChildIdx($,0);if(G.length!==2||$.substr(G[0],2)!=="02"||$.substr(G[1],2)!=="02")throw Error("wrong hex for PKCS#5 public key");var J=X($,G[0]),Q=X($,G[1]);this.setPublic(J,Q)};F6.prototype.readPKCS8PubKeyHex=function($){var Y=M1;if(Y.isASN1HEX($)===!1)throw Error("not ASN.1 hex string");if(Y.getTLVbyListEx($,0,[0,0])!=="06092a864886f70d010101")throw Error("not PKCS8 RSA public key");var X=Y.getTLVbyListEx($,0,[1,0]);this.readPKCS5PubKeyHex(X)};F6.prototype.readCertPubKeyHex=function($,Y){var X,G;X=new e4,X.readCertHex($),G=X.getPublicKeyHex(),this.readPKCS8PubKeyHex(G)};var mH5=new RegExp("[^0-9a-f]","gi");function yG1($,Y){var X="",G=Y/4-$.length;for(var J=0;J<G;J++)X=X+"0";return X+$}F6.prototype.sign=function($,Y){var X=function(J){return l.crypto.Util.hashString(J,Y)},G=X($);return this.signWithMessageHash(G,Y)};F6.prototype.signWithMessageHash=function($,Y){var X=l.crypto.Util.getPaddedDigestInfoHex($,Y,this.n.bitLength()),G=dJ(X,16),J=this.doPrivate(G),Q=J.toString(16);return yG1(Q,this.n.bitLength())};function bG1($,Y,X){var G="",J=0;while(G.length<Y)G+=iU(X(dH($+String.fromCharCode.apply(String,[(J&4278190080)>>24,(J&16711680)>>16,(J&65280)>>8,J&255])))),J+=1;return G}F6.prototype.signPSS=function($,Y,X){var G=function(Q){return l.crypto.Util.hashHex(Q,Y)},J=G(dH($));if(X===void 0)X=-1;return this.signWithMessageHashPSS(J,Y,X)};F6.prototype.signWithMessageHashPSS=function($,Y,X){var G=iU($),J=G.length,Q=this.n.bitLength()-1,W=Math.ceil(Q/8),K,Z=function(A){return l.crypto.Util.hashHex(A,Y)};if(X===-1||X===void 0)X=J;else if(X===-2)X=W-J-2;else if(X<-2)throw Error("invalid salt length");if(W<J+X+2)throw Error("data too long");var H="";if(X>0)H=Array(X),new nk().nextBytes(H),H=String.fromCharCode.apply(String,H);var z=iU(Z(dH("\x00\x00\x00\x00\x00\x00\x00\x00"+G+H))),V=[];for(K=0;K<W-X-J-2;K+=1)V[K]=0;var F=String.fromCharCode.apply(String,V)+"\x01"+H,L=bG1(z,F.length,Z),N=[];for(K=0;K<F.length;K+=1)N[K]=F.charCodeAt(K)^L.charCodeAt(K);var D=65280>>8*W-Q&255;N[0]&=~D;for(K=0;K<J;K++)N.push(z.charCodeAt(K));return N.push(188),yG1(this.doPrivate(new S0(N)).toString(16),this.n.bitLength())};function hG1($){for(var Y in l.crypto.Util.DIGESTINFOHEAD){var X=l.crypto.Util.DIGESTINFOHEAD[Y],G=X.length;if($.substring(0,G)==X){var J=[Y,$.substring(G)];return J}}return[]}F6.prototype.verify=function($,Y){if(Y=Y.toLowerCase(),Y.match(/^[0-9a-f]+$/)==null)return!1;var X=dJ(Y,16),G=this.n.bitLength();if(X.bitLength()>G)return!1;var J=this.doPublic(X),Q=J.toString(16);if(Q.length+3!=G/4)return!1;var W=Q.replace(/^1f+00/,""),K=hG1(W);if(K.length==0)return!1;var Z=K[0],H=K[1],z=function(F){return l.crypto.Util.hashString(F,Z)},V=z($);return H==V};F6.prototype.verifyWithMessageHash=function($,Y){if(Y.length!=Math.ceil(this.n.bitLength()/4))return!1;var X=dJ(Y,16);if(X.bitLength()>this.n.bitLength())return 0;var G=this.doPublic(X),J=G.toString(16).replace(/^1f+00/,""),Q=hG1(J);if(Q.length==0)return!1;var W=Q[0],K=Q[1];return K==$};F6.prototype.verifyPSS=function($,Y,X,G){var J=function(W){return l.crypto.Util.hashHex(W,X)},Q=J(dH($));if(G===void 0)G=-1;return this.verifyWithMessageHashPSS(Q,Y,X,G)};F6.prototype.verifyWithMessageHashPSS=function($,Y,X,G){if(Y.length!=Math.ceil(this.n.bitLength()/4))return!1;var J=new S0(Y,16),Q=function(O){return l.crypto.Util.hashHex(O,X)},W=iU($),K=W.length,Z=this.n.bitLength()-1,H=Math.ceil(Z/8),z;if(G===-1||G===void 0)G=K;else if(G===-2)G=H-K-2;else if(G<-2)throw Error("invalid salt length");if(H<K+G+2)throw Error("data too long");var V=this.doPublic(J).toByteArray();for(z=0;z<V.length;z+=1)V[z]&=255;while(V.length<H)V.unshift(0);if(V[H-1]!==188)throw Error("encoded message does not end in 0xbc");V=String.fromCharCode.apply(String,V);var F=V.substr(0,H-K-1),L=V.substr(F.length,K),N=65280>>8*H-Z&255;if((F.charCodeAt(0)&N)!==0)throw Error("bits beyond keysize not zero");var D=bG1(L,F.length,Q),A=[];for(z=0;z<F.length;z+=1)A[z]=F.charCodeAt(z)^D.charCodeAt(z);A[0]&=~N;var B=H-K-G-2;for(z=0;z<B;z+=1)if(A[z]!==0)throw Error("leftmost octets not zero");if(A[B]!==1)throw Error("0x01 marker not found");return L===iU(Q(dH("\x00\x00\x00\x00\x00\x00\x00\x00"+W+String.fromCharCode.apply(String,A.slice(-G)))))};F6.SALT_LEN_HLEN=-1;F6.SALT_LEN_MAX=-2;F6.SALT_LEN_RECOVER=-2;function e4($){var Y=M1,X=Y.getChildIdx,G=Y.getV,J=Y.dump,Q=Y.parse,W=Y.getTLV,K=Y.getVbyList,Z=Y.getVbyListEx,H=Y.getTLVbyList,z=Y.getTLVbyListEx,V=Y.getIdxbyList,F=Y.getIdxbyListEx,L=Y.getVidx,N=Y.getInt,D=Y.oidname,A=Y.hextooidstr,B=e4,O=B7,E,M=Error;try{E=l.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV}catch(P){}this.HEX2STAG={"0c":"utf8","13":"prn","16":"ia5","1a":"vis","1e":"bmp"},this.hex=null,this.version=0,this.foffset=0,this.aExtInfo=null,this.getVersion=function(){if(this.hex===null||this.version!==0)return this.version;var P=H(this.hex,0,[0,0]);if(P.substr(0,2)=="a0"){var w=H(P,0,[0]),j=N(w,0);if(j<0||2<j)throw Error("malformed version field");return this.version=j+1,this.version}else return this.version=1,this.foffset=-1,1},this.getSerialNumberHex=function(){return Z(this.hex,0,[0,0],"02")},this.getSignatureAlgorithmField=function(){var P=z(this.hex,0,[0,1]);return this.getAlgorithmIdentifierName(P)},this.getAlgorithmIdentifierName=function(P){for(var w in E)if(P===E[w])return w;return D(Z(P,0,[0],"06"))},this.getIssuer=function(P,w){return this.getX500Name(this.getIssuerHex(),P,w)},this.getIssuerHex=function(){return H(this.hex,0,[0,3+this.foffset],"30")},this.getIssuerString=function(){var P=this.getIssuer();return P.str},this.getSubject=function(P,w){return this.getX500Name(this.getSubjectHex(),P,w)},this.getSubjectHex=function(){return H(this.hex,0,[0,5+this.foffset],"30")},this.getSubjectString=function(){var P=this.getSubject();return P.str},this.getNotBefore=function(){var P=K(this.hex,0,[0,4+this.foffset,0]);return P=P.replace(/(..)/g,"%$1"),P=decodeURIComponent(P),P},this.getNotAfter=function(){var P=K(this.hex,0,[0,4+this.foffset,1]);return P=P.replace(/(..)/g,"%$1"),P=decodeURIComponent(P),P},this.getPublicKeyHex=function(){return this.getSPKI()},this.getSPKI=function(){return H(this.hex,0,[0,6+this.foffset],"30")},this.getSPKIValue=function(){var P=this.getSPKI();if(P==null)return null;return K(P,0,[1],"03",!0)},this.getPublicKeyIdx=function(){return V(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyContentIdx=function(){var P=this.getPublicKeyIdx();return V(this.hex,P,[1,0],"30")},this.getPublicKey=function(){return Z8.getKey(this.getPublicKeyHex(),null,"pkcs8pub")},this.getSignatureAlgorithmName=function(){var P=H(this.hex,0,[1],"30");return this.getAlgorithmIdentifierName(P)},this.getSignatureValueHex=function(){return K(this.hex,0,[2],"03",!0)},this.verifySignature=function(P){var w=this.getSignatureAlgorithmField(),j=this.getSignatureValueHex(),C=H(this.hex,0,[0],"30"),k=new l.crypto.Signature({alg:w});return k.init(P),k.updateHex(C),k.verify(j)},this.parseExt=function(P){var w,j,C;if(P===void 0){if(C=this.hex,this.version!==3)return-1;w=V(C,0,[0,7,0],"30"),j=X(C,w)}else{C=B7(P);var k=V(C,0,[0,3,0,0],"06");if(G(C,k)!="2a864886f70d01090e"){this.aExtInfo=[];return}w=V(C,0,[0,3,0,1,0],"30"),j=X(C,w),this.hex=C}this.aExtInfo=[];for(var S=0;S<j.length;S++){var I={};I.critical=!1;var v=X(C,j[S]),x=0;if(v.length===3)I.critical=!0,x=1;I.oid=Y.hextooidstr(K(C,j[S],[0],"06"));var y=V(C,j[S],[1+x]);I.vidx=L(C,y),this.aExtInfo.push(I)}},this.getExtInfo=function(P){var w=this.aExtInfo,j=P;if(!P.match(/^[0-9.]+$/))j=l.asn1.x509.OID.name2oid(P);if(j==="")return;for(var C=0;C<w.length;C++)if(w[C].oid===j)return w[C];return},this.getCriticalExtV=function(P,w,j){if(w!=null)return[w,j];var C=this.getExtInfo(P);if(C==null)return[null,null];return[W(this.hex,C.vidx),C.critical]},this.getExtBasicConstraints=function(P,w){if(P===void 0&&w===void 0){var j=this.getExtInfo("basicConstraints");if(j===void 0)return;P=W(this.hex,j.vidx),w=j.critical}var C={extname:"basicConstraints"};if(w)C.critical=!0;if(P==="3000")return C;if(P==="30030101ff")return C.cA=!0,C;if(P.substr(0,12)==="30060101ff02"){var k=G(P,10),S=parseInt(k,16);return C.cA=!0,C.pathLen=S,C}throw Error("hExtV parse error: "+P)},this.getExtNameConstraints=function(P,w){var j=this.getCriticalExtV("nameConstraints",P,w);if(P=j[0],w=j[1],P==null)return;var C={extname:"nameConstraints"};if(w)C.critical=!0;var k=X(P,0);for(var S=0;S<k.length;S++){var I=[],v=X(P,k[S]);for(var x=0;x<v.length;x++){var y=W(P,v[x]),d=this.getGeneralSubtree(y);I.push(d)}var u=P.substr(k[S],2);if(u=="a0")C.permit=I;else if(u=="a1")C.exclude=I}return C},this.getGeneralSubtree=function(P){var w=X(P,0),j=w.length;if(j<1||2<j)throw Error("wrong num elements");var C=this.getGeneralName(W(P,w[0]));for(var k=1;k<j;k++){var S=P.substr(w[k],2),I=G(P,w[k]),v=parseInt(I,16);if(S=="80")C.min=v;if(S=="81")C.max=v}return C},this.getExtKeyUsage=function(P,w){var j=this.getCriticalExtV("keyUsage",P,w);if(P=j[0],w=j[1],P==null)return;var C={extname:"keyUsage"};if(w)C.critical=!0;return C.names=this.getExtKeyUsageString(P).split(","),C},this.getExtKeyUsageBin=function(P){if(P===void 0){var w=this.getExtInfo("keyUsage");if(w===void 0)return"";P=W(this.hex,w.vidx)}if(P.length!=8&&P.length!=10)throw Error("malformed key usage value: "+P);var j="000000000000000"+parseInt(P.substr(6),16).toString(2);if(P.length==8)j=j.slice(-8);if(P.length==10)j=j.slice(-16);if(j=j.replace(/0+$/,""),j=="")j="0";return j},this.getExtKeyUsageString=function(P){var w=this.getExtKeyUsageBin(P),j=[];for(var C=0;C<w.length;C++)if(w.substr(C,1)=="1")j.push(e4.KEYUSAGE_NAME[C]);return j.join(",")},this.getExtSubjectKeyIdentifier=function(P,w){if(P===void 0&&w===void 0){var j=this.getExtInfo("subjectKeyIdentifier");if(j===void 0)return;P=W(this.hex,j.vidx),w=j.critical}var C={extname:"subjectKeyIdentifier"};if(w)C.critical=!0;var k=G(P,0);return C.kid={hex:k},C},this.getExtAuthorityKeyIdentifier=function(P,w){if(P===void 0&&w===void 0){var j=this.getExtInfo("authorityKeyIdentifier");if(j===void 0)return;P=W(this.hex,j.vidx),w=j.critical}var C={extname:"authorityKeyIdentifier"};if(w)C.critical=!0;var k=X(P,0);for(var S=0;S<k.length;S++){var I=P.substr(k[S],2);if(I==="80")C.kid={hex:G(P,k[S])};if(I==="a1"){var v=W(P,k[S]),x=this.getGeneralNames(v);C.issuer=x[0].dn}if(I==="82")C.sn={hex:G(P,k[S])}}return C},this.getExtExtKeyUsage=function(P,w){if(P===void 0&&w===void 0){var j=this.getExtInfo("extKeyUsage");if(j===void 0)return;P=W(this.hex,j.vidx),w=j.critical}var C={extname:"extKeyUsage",array:[]};if(w)C.critical=!0;var k=X(P,0);for(var S=0;S<k.length;S++)C.array.push(D(G(P,k[S])));return C},this.getExtExtKeyUsageName=function(){var P=this.getExtInfo("extKeyUsage");if(P===void 0)return P;var w=[],j=W(this.hex,P.vidx);if(j==="")return w;var C=X(j,0);for(var k=0;k<C.length;k++)w.push(D(G(j,C[k])));return w},this.getExtSubjectAltName=function(P,w){if(P===void 0&&w===void 0){var j=this.getExtInfo("subjectAltName");if(j===void 0)return;P=W(this.hex,j.vidx),w=j.critical}var C={extname:"subjectAltName",array:[]};if(w)C.critical=!0;return C.array=this.getGeneralNames(P),C},this.getExtIssuerAltName=function(P,w){if(P===void 0&&w===void 0){var j=this.getExtInfo("issuerAltName");if(j===void 0)return;P=W(this.hex,j.vidx),w=j.critical}var C={extname:"issuerAltName",array:[]};if(w)C.critical=!0;return C.array=this.getGeneralNames(P),C},this.getGeneralNames=function(P){var w=X(P,0),j=[];for(var C=0;C<w.length;C++){var k=this.getGeneralName(W(P,w[C]));if(k!==void 0)j.push(k)}return j},this.getGeneralName=function(P){var w=P.substr(0,2),j=G(P,0),C=iU(j);if(w=="81")return{rfc822:C};if(w=="82")return{dns:C};if(w=="86")return{uri:C};if(w=="87")return{ip:nZ0(j)};if(w=="a4")return{dn:this.getX500Name(j)};if(w=="a0")return{other:this.getOtherName(P)};return},this.getExtSubjectAltName2=function(){var P,w,j,C=this.getExtInfo("subjectAltName");if(C===void 0)return C;var k=[],S=W(this.hex,C.vidx),I=X(S,0);for(var v=0;v<I.length;v++){if(j=S.substr(I[v],2),P=G(S,I[v]),j==="81")w=S9(P),k.push(["MAIL",w]);if(j==="82")w=S9(P),k.push(["DNS",w]);if(j==="84")w=e4.hex2dn(P,0),k.push(["DN",w]);if(j==="86")w=S9(P),k.push(["URI",w]);if(j==="87")w=nZ0(P),k.push(["IP",w])}return k},this.getExtCRLDistributionPoints=function(P,w){if(P===void 0&&w===void 0){var j=this.getExtInfo("cRLDistributionPoints");if(j===void 0)return;P=W(this.hex,j.vidx),w=j.critical}var C={extname:"cRLDistributionPoints",array:[]};if(w)C.critical=!0;var k=X(P,0);for(var S=0;S<k.length;S++){var I=W(P,k[S]);C.array.push(this.getDistributionPoint(I))}return C},this.getDistributionPoint=function(P){var w={},j=X(P,0);for(var C=0;C<j.length;C++){var k=P.substr(j[C],2),S=W(P,j[C]);if(k=="a0")w.dpname=this.getDistributionPointName(S)}return w},this.getDistributionPointName=function(P){var w={},j=X(P,0);for(var C=0;C<j.length;C++){var k=P.substr(j[C],2),S=W(P,j[C]);if(k=="a0")w.full=this.getGeneralNames(S)}return w},this.getExtCRLDistributionPointsURI=function(){var P=this.getExtCRLDistributionPoints();if(P==null)return P;var w=P.array,j=[];for(var C=0;C<w.length;C++)try{if(w[C].dpname.full[0].uri!=null)j.push(w[C].dpname.full[0].uri)}catch(k){}return j},this.getExtAIAInfo=function(){var P=this.getExtInfo("authorityInfoAccess");if(P===void 0)return P;var w={ocsp:[],caissuer:[]},j=X(this.hex,P.vidx);for(var C=0;C<j.length;C++){var k=K(this.hex,j[C],[0],"06"),S=K(this.hex,j[C],[1],"86");if(k==="2b06010505073001")w.ocsp.push(S9(S));if(k==="2b06010505073002")w.caissuer.push(S9(S))}return w},this.getExtAuthorityInfoAccess=function(P,w){if(P===void 0&&w===void 0){var j=this.getExtInfo("authorityInfoAccess");if(j===void 0)return;P=W(this.hex,j.vidx),w=j.critical}var C={extname:"authorityInfoAccess",array:[]};if(w)C.critical=!0;var k=X(P,0);for(var S=0;S<k.length;S++){var I=Z(P,k[S],[0],"06"),v=K(P,k[S],[1],"86"),x=S9(v);if(I=="2b06010505073001")C.array.push({ocsp:x});else if(I=="2b06010505073002")C.array.push({caissuer:x});else throw Error("unknown method: "+I)}return C},this.getExtCertificatePolicies=function(P,w){if(P===void 0&&w===void 0){var j=this.getExtInfo("certificatePolicies");if(j===void 0)return;P=W(this.hex,j.vidx),w=j.critical}var C={extname:"certificatePolicies",array:[]};if(w)C.critical=!0;var k=X(P,0);for(var S=0;S<k.length;S++){var I=W(P,k[S]),v=this.getPolicyInformation(I);C.array.push(v)}return C},this.getPolicyInformation=function(P){var w={},j=K(P,0,[0],"06");w.policyoid=D(j);var C=F(P,0,[1],"30");if(C!=-1){w.array=[];var k=X(P,C);for(var S=0;S<k.length;S++){var I=W(P,k[S]),v=this.getPolicyQualifierInfo(I);w.array.push(v)}}return w},this.getOtherName=function(P){var w={},j=X(P,0),C=K(P,j[0],[],"06"),k=K(P,j[1],[]);return w.oid=D(C),w.value=Q(k),w},this.getPolicyQualifierInfo=function(P){var w={},j=K(P,0,[0],"06");if(j==="2b06010505070201"){var C=Z(P,0,[1],"16");w.cps=iU(C)}else if(j==="2b06010505070202"){var k=H(P,0,[1],"30");w.unotice=this.getUserNotice(k)}return w},this.getUserNotice=function(P){var w=null,j={};try{w=Y.parse(P);var C=this._asn1ToUnotice(w);return C}catch(k){return}},this._asn1ToUnotice=function(P){try{var w={},j=q5(P,"seq");for(var C=0;C<j.length;C++){var k=this._asn1ToNoticeRef(j[C]);if(k!=null)w.noticeref=k;var S=this.asn1ToDisplayText(j[C]);if(S!=null)w.exptext=S}if(Object.keys(w).length>0)return w;return}catch(I){return}},this._asn1ToNoticeRef=function(P){try{var w={},j=q5(P,"seq");for(var C=0;C<j.length;C++){var k=this._asn1ToNoticeNum(j[C]);if(k!=null)w.noticenum=k;var S=this.asn1ToDisplayText(j[C]);if(S!=null)w.org=S}if(Object.keys(w).length>0)return w;return}catch(I){return}},this._asn1ToNoticeNum=function(P){try{var w=q5(P,"seq"),j=[];for(var C=0;C<w.length;C++){var k=w[C];j.push(parseInt(q5(k,"int.hex"),16))}return j}catch(S){return}},this.getDisplayText=function(P){var w={"0c":"utf8","16":"ia5","1a":"vis","1e":"bmp"},j={};return j.type=w[P.substr(0,2)],j.str=iU(G(P,0)),j},this.asn1ToDisplayText=function(P){if(P.utf8str!=null)return{type:"utf8",str:P.utf8str.str};if(P.ia5str!=null)return{type:"ia5",str:P.ia5str.str};if(P.visstr!=null)return{type:"vis",str:P.visstr.str};if(P.bmpstr!=null)return{type:"bmp",str:P.bmpstr.str};if(P.prnstr!=null)return{type:"prn",str:P.prnstr.str};return},this.getExtPolicyMappings=function(P,w){var j=this.getCriticalExtV("policyMappings",P,w);if(P=j[0],w=j[1],P==null)return;var C={extname:"policyMappings"};if(w)C.critical=!0;try{var k=Q(P),S=k.seq,I=[];for(var v=0;v<S.length;v++){var x=S[v].seq;I.push([x[0].oid,x[1].oid])}C.array=I}catch(y){throw new M("malformed policyMappings")}return C},this.getExtPolicyConstraints=function(P,w){var j=this.getCriticalExtV("policyConstraints",P,w);if(P=j[0],w=j[1],P==null)return;var C={extname:"policyConstraints"};if(w)C.critical=!0;var k=Q(P);try{var S=k.seq;for(var I=0;I<S.length;I++){var v=S[I].tag;if(v.explicit!=!1)continue;if(v.tag=="80")C.reqexp=parseInt(v.hex,16);if(v.tag=="81")C.inhibit=parseInt(v.hex,16)}}catch(x){return new M("malformed policyConstraints value")}return C},this.getExtInhibitAnyPolicy=function(P,w){var j=this.getCriticalExtV("inhibitAnyPolicy",P,w);if(P=j[0],w=j[1],P==null)return;var C={extname:"inhibitAnyPolicy"};if(w)C.critical=!0;var k=N(P,0);if(k==-1)return new M("wrong value");return C.skip=k,C},this.getExtCRLNumber=function(P,w){var j={extname:"cRLNumber"};if(w)j.critical=!0;if(P.substr(0,2)=="02")return j.num={hex:G(P,0)},j;throw new M("hExtV parse error: "+P)},this.getExtCRLReason=function(P,w){var j={extname:"cRLReason"};if(w)j.critical=!0;if(P.substr(0,2)=="0a")return j.code=parseInt(G(P,0),16),j;throw Error("hExtV parse error: "+P)},this.getExtOcspNonce=function(P,w){var j={extname:"ocspNonce"};if(w)j.critical=!0;var C=G(P,0);return j.hex=C,j},this.getExtOcspNoCheck=function(P,w){var j={extname:"ocspNoCheck"};if(w)j.critical=!0;return j},this.getExtAdobeTimeStamp=function(P,w){if(P===void 0&&w===void 0){var j=this.getExtInfo("adobeTimeStamp");if(j===void 0)return;P=W(this.hex,j.vidx),w=j.critical}var C={extname:"adobeTimeStamp"};if(w)C.critical=!0;var k=X(P,0);if(k.length>1){var S=W(P,k[1]),I=this.getGeneralName(S);if(I.uri!=null)C.uri=I.uri}if(k.length>2){var v=W(P,k[2]);if(v=="0101ff")C.reqauth=!0;if(v=="010100")C.reqauth=!1}return C},this.getExtSubjectDirectoryAttributes=function(P,w){if(P===void 0&&w===void 0){var j=this.getExtInfo("subjectDirectoryAttributes");if(j===void 0)return;P=W(this.hex,j.vidx),w=j.critical}var C={extname:"subjectDirectoryAttributes"};if(w)C.critical=!0;try{var k=Q(P),S=[];for(var I=0;I<k.seq.length;I++){var v=k.seq[I],x=q5(v,"seq.0.oid"),y=q5(v,"seq.1.set");if(x==null||y==null)throw"error";S.push({attr:x,array:y})}return C.array=S,C}catch(d){throw Error("malformed subjectDirectoryAttributes extension value")}};var R=function(P){var w={};try{var j=P.seq[0].oid,C=l.asn1.x509.OID.name2oid(j);w.type=l.asn1.x509.OID.oid2atype(C);var k=P.seq[1];if(k.utf8str!=null)w.ds="utf8",w.value=k.utf8str.str;else if(k.numstr!=null)w.ds="num",w.value=k.numstr.str;else if(k.telstr!=null)w.ds="tel",w.value=k.telstr.str;else if(k.prnstr!=null)w.ds="prn",w.value=k.prnstr.str;else if(k.ia5str!=null)w.ds="ia5",w.value=k.ia5str.str;else if(k.visstr!=null)w.ds="vis",w.value=k.visstr.str;else if(k.bmpstr!=null)w.ds="bmp",w.value=k.bmpstr.str;else throw"error";return w}catch(S){throw new Erorr("improper ASN.1 parsed AttrTypeAndValue")}},q=function(P){try{return P.set.map(function(w){return R(w)})}catch(w){throw Error("improper ASN.1 parsed RDN: "+w)}},_=function(P){try{return P.seq.map(function(w){return q(w)})}catch(w){throw Error("improper ASN.1 parsed X500Name: "+w)}};if(this.getX500NameRule=function(P){var w=!0,j=!0,C=!1,k="",S="",I=null,v=[];for(var x=0;x<P.length;x++){var y=P[x];for(var d=0;d<y.length;d++)v.push(y[d])}for(var x=0;x<v.length;x++){var u=v[x],b=u.ds,g=u.value,p=u.type;if(k+=":"+b,b!="prn"&&b!="utf8"&&b!="ia5")return"mixed";if(b=="ia5")if(p!="CN")return"mixed";else if(!l.lang.String.isMail(g))return"mixed";else continue;if(p=="C")if(b=="prn")continue;else return"mixed";if(S+=":"+b,I==null)I=b;else if(I!==b)return"mixed"}if(I==null)return"prn";else return I},this.getAttrTypeAndValue=function(P){var w=Q(P);return R(w)},this.getRDN=function(P){var w=Q(P);return q(w)},this.getX500NameArray=function(P){var w=Q(P);return _(w)},this.getX500Name=function(P,w,j){var C=this.getX500NameArray(P),k=this.dnarraytostr(C),S={str:k};if(S.array=C,j==!0)S.hex=P;if(w==!0)S.canon=this.c14nRDNArray(C);return S},this.readCertPEM=function(P){this.readCertHex(O(P))},this.readCertHex=function(P){this.hex=P,this.getVersion();try{V(this.hex,0,[0,7],"a3"),this.parseExt()}catch(w){}},this.getParam=function(P){var w={};if(P==null)P={};if(w.version=this.getVersion(),w.serial={hex:this.getSerialNumberHex()},w.sigalg=this.getSignatureAlgorithmField(),w.issuer=this.getIssuer(P.dncanon,P.dnhex),w.notbefore=this.getNotBefore(),w.notafter=this.getNotAfter(),w.subject=this.getSubject(P.dncanon,P.dnhex),w.sbjpubkey=RG(this.getPublicKeyHex(),"PUBLIC KEY"),this.aExtInfo!=null&&this.aExtInfo.length>0)w.ext=this.getExtParamArray();if(w.sighex=this.getSignatureValueHex(),P.tbshex==!0)w.tbshex=H(this.hex,0,[0]);if(P.nodnarray==!0)delete w.issuer.array,delete w.subject.array;return w},this.getExtParamArray=function(P){if(P==null){var w=F(this.hex,0,[0,"[3]"]);if(w!=-1)P=z(this.hex,0,[0,"[3]",0],"30")}var j=[],C=X(P,0);for(var k=0;k<C.length;k++){var S=W(P,C[k]),I=this.getExtParam(S);if(I!=null)j.push(I)}return j},this.getExtParam=function(P){var w={},j=X(P,0),C=j.length;if(C!=2&&C!=3)throw Error("wrong number elements in Extension: "+C+" "+P);var k=A(K(P,0,[0],"06")),S=!1;if(C==3&&H(P,0,[1])=="0101ff")S=!0;var I=H(P,0,[C-1,0]),v=void 0;if(k=="2.5.29.14")v=this.getExtSubjectKeyIdentifier(I,S);else if(k=="2.5.29.15")v=this.getExtKeyUsage(I,S);else if(k=="2.5.29.17")v=this.getExtSubjectAltName(I,S);else if(k=="2.5.29.18")v=this.getExtIssuerAltName(I,S);else if(k=="2.5.29.19")v=this.getExtBasicConstraints(I,S);else if(k=="2.5.29.30")v=this.getExtNameConstraints(I,S);else if(k=="2.5.29.31")v=this.getExtCRLDistributionPoints(I,S);else if(k=="2.5.29.32")v=this.getExtCertificatePolicies(I,S);else if(k=="2.5.29.33")v=this.getExtPolicyMappings(I,S);else if(k=="2.5.29.35")v=this.getExtAuthorityKeyIdentifier(I,S);else if(k=="2.5.29.36")v=this.getExtPolicyConstraints(I,S);else if(k=="2.5.29.37")v=this.getExtExtKeyUsage(I,S);else if(k=="2.5.29.54")v=this.getExtInhibitAnyPolicy(I,S);else if(k=="1.3.6.1.5.5.7.1.1")v=this.getExtAuthorityInfoAccess(I,S);else if(k=="2.5.29.20")v=this.getExtCRLNumber(I,S);else if(k=="2.5.29.21")v=this.getExtCRLReason(I,S);else if(k=="2.5.29.9")v=this.getExtSubjectDirectoryAttributes(I,S);else if(k=="1.3.6.1.5.5.7.48.1.2")v=this.getExtOcspNonce(I,S);else if(k=="1.3.6.1.5.5.7.48.1.5")v=this.getExtOcspNoCheck(I,S);else if(k=="1.2.840.113583.1.1.9.1")v=this.getExtAdobeTimeStamp(I,S);else if(e4.EXT_PARSER[k]!=null)v=e4.EXT_PARSER[k](k,S,I);if(v!=null)return v;var x={extname:k,extn:I};try{x.extn=Q(I)}catch(y){}if(S)x.critical=!0;return x},this.findExt=function(P,w){for(var j=0;j<P.length;j++)if(P[j].extname==w)return P[j];return null},this.updateExtCDPFullURI=function(P,w){var j=this.findExt(P,"cRLDistributionPoints");if(j==null)return;if(j.array==null)return;var C=j.array;for(var k=0;k<C.length;k++){if(C[k].dpname==null)continue;if(C[k].dpname.full==null)continue;var S=C[k].dpname.full;for(var I=0;I<S.length;I++){var v=S[k];if(v.uri==null)continue;v.uri=w}}},this.updateExtAIAOCSP=function(P,w){var j=this.findExt(P,"authorityInfoAccess");if(j==null)return;if(j.array==null)return;var C=j.array;for(var k=0;k<C.length;k++)if(C[k].ocsp!=null)C[k].ocsp=w},this.updateExtAIACAIssuer=function(P,w){var j=this.findExt(P,"authorityInfoAccess");if(j==null)return;if(j.array==null)return;var C=j.array;for(var k=0;k<C.length;k++)if(C[k].caissuer!=null)C[k].caissuer=w},this.dnarraytostr=function(P){function w(C){return C.map(function(k){return j(k).replace(/\+/,"\\+")}).join("+")}function j(C){return C.type+"="+C.value}return"/"+P.map(function(C){return w(C).replace(/\//,"\\/")}).join("/")},this.setCanonicalizedDN=function(P){var w;if(P.str!=null&&P.array==null){var j=new l.asn1.x509.X500Name({str:P.str}),C=j.tohex();w=this.getX500NameArray(C)}else w=P.array;if(P.canon==null)P.canon=this.c14nRDNArray(w)},this.c14nRDNArray=function(P){var w=[];for(var j=0;j<P.length;j++){var C=P[j],k=[];for(var S=0;S<C.length;S++){var I=C[S],v=I.value;v=v.replace(/^\s*/,""),v=v.replace(/\s*$/,""),v=v.replace(/\s+/g," "),v=v.toLowerCase(),k.push(I.type.toLowerCase()+"="+v)}w.push(k.join("+"))}return"/"+w.join("/")},this.getInfo=function(){var P=function(a){var Q0="",e="    ",m=`
`,$0=a.array;for(var Y0=0;Y0<$0.length;Y0++){var Z0=$0[Y0];if(Z0.dn!=null)Q0+=e+"dn: "+Z0.dn.str+m;if(Z0.ip!=null)Q0+=e+"ip: "+Z0.ip+m;if(Z0.rfc822!=null)Q0+=e+"rfc822: "+Z0.rfc822+m;if(Z0.dns!=null)Q0+=e+"dns: "+Z0.dns+m;if(Z0.uri!=null)Q0+=e+"uri: "+Z0.uri+m;if(Z0.other!=null){var F0=Z0.other.oid,D0=JSON.stringify(Z0.other.value).replace(/\"/g,"");Q0+=e+"other: "+F0+"="+D0+m}}return Q0=Q0.replace(/\n$/,""),Q0},w=function(a){var Q0="",e=a.array;for(var m=0;m<e.length;m++){var $0=e[m];if(Q0+="    policy oid: "+$0.policyoid+`
`,$0.array===void 0)continue;for(var Y0=0;Y0<$0.array.length;Y0++){var Z0=$0.array[Y0];if(Z0.cps!==void 0)Q0+="    cps: "+Z0.cps+`
`}}return Q0},j=function(a){var Q0="",e=a.array;for(var m=0;m<e.length;m++){var $0=e[m];try{if($0.dpname.full[0].uri!==void 0)Q0+="    "+$0.dpname.full[0].uri+`
`}catch(Y0){}try{if($0.dname.full[0].dn.hex!==void 0)Q0+="    "+e4.hex2dn($0.dpname.full[0].dn.hex)+`
`}catch(Y0){}}return Q0},C=function(a){var Q0="",e=a.array;for(var m=0;m<e.length;m++){var $0=e[m];if($0.caissuer!==void 0)Q0+="    caissuer: "+$0.caissuer+`
`;if($0.ocsp!==void 0)Q0+="    ocsp: "+$0.ocsp+`
`}return Q0},k=e4,S,I,v;if(S=`Basic Fields
`,S+="  serial number: "+this.getSerialNumberHex()+`
`,S+="  signature algorithm: "+this.getSignatureAlgorithmField()+`
`,S+="  issuer: "+this.getIssuerString()+`
`,S+="  notBefore: "+this.getNotBefore()+`
`,S+="  notAfter: "+this.getNotAfter()+`
`,S+="  subject: "+this.getSubjectString()+`
`,S+=`  subject public key info: 
`,I=this.getPublicKey(),S+="    key algorithm: "+I.type+`
`,I.type==="RSA")S+="    n="+EG1(I.n.toString(16)).substr(0,16)+`...
`,S+="    e="+EG1(I.e.toString(16))+`
`;if(v=this.aExtInfo,v!==void 0&&v!==null){S+=`X509v3 Extensions:
`;for(var x=0;x<v.length;x++){var y=v[x],d=l.asn1.x509.OID.oid2name(y.oid);if(d==="")d=y.oid;var u="";if(y.critical===!0)u="CRITICAL";if(S+="  "+d+" "+u+`:
`,d==="basicConstraints"){var b=this.getExtBasicConstraints();if(b.cA===void 0)S+=`    {}
`;else{if(S+="    cA=true",b.pathLen!==void 0)S+=", pathLen="+b.pathLen;S+=`
`}}else if(d=="policyMappings"){var g=this.getExtPolicyMappings().array,p=g.map(function(a){var Q0=a;return Q0[0]+":"+Q0[1]}).join(", ");S+="    "+p+`
`}else if(d=="policyConstraints"){var h=this.getExtPolicyConstraints();if(S+="    ",h.reqexp!=null)S+=" reqexp="+h.reqexp;if(h.inhibit!=null)S+=" inhibit="+h.inhibit;S+=`
`}else if(d=="inhibitAnyPolicy"){var h=this.getExtInhibitAnyPolicy();S+="    skip="+h.skip+`
`}else if(d=="keyUsage")S+="    "+this.getExtKeyUsageString()+`
`;else if(d=="subjectKeyIdentifier")S+="    "+this.getExtSubjectKeyIdentifier().kid.hex+`
`;else if(d=="authorityKeyIdentifier"){var n=this.getExtAuthorityKeyIdentifier();if(n.kid!==void 0)S+="    kid="+n.kid.hex+`
`}else if(d=="extKeyUsage"){var t=this.getExtExtKeyUsage().array;S+="    "+t.join(", ")+`
`}else if(d=="subjectAltName"){var s=P(this.getExtSubjectAltName());S+=s+`
`}else if(d=="cRLDistributionPoints"){var K0=this.getExtCRLDistributionPoints();S+=j(K0)}else if(d=="authorityInfoAccess"){var X0=this.getExtAuthorityInfoAccess();S+=C(X0)}else if(d=="certificatePolicies")S+=w(this.getExtCertificatePolicies())}}return S+="signature algorithm: "+this.getSignatureAlgorithmName()+`
`,S+="signature: "+this.getSignatureValueHex().substr(0,16)+`...
`,S},typeof $=="string"){if($.indexOf("-----BEGIN")!=-1)this.readCertPEM($);else if(l.lang.String.isHex($))this.readCertHex($)}}e4.EXT_PARSER={};e4.registExtParser=function($,Y){e4.EXT_PARSER[$]=Y};e4.hex2dn=function($,Y){if(Y===void 0)Y=0;var X=new e4,G=M1.getTLV($,Y),J=X.getX500Name($);return J.str};e4.hex2rdn=function($,Y){if(Y===void 0)Y=0;if($.substr(Y,2)!=="31")throw Error("malformed RDN");var X=[],G=M1.getChildIdx($,Y);for(var J=0;J<G.length;J++)X.push(e4.hex2attrTypeValue($,G[J]));return X=X.map(function(Q){return Q.replace("+","\\+")}),X.join("+")};e4.hex2attrTypeValue=function($,Y){var X=M1,G=X.getV;if(Y===void 0)Y=0;if($.substr(Y,2)!=="30")throw Error("malformed attribute type and value");var J=X.getChildIdx($,Y);if(J.length!==2||$.substr(J[0],2)!=="06");var Q=G($,J[0]),W=l.asn1.ASN1Util.oidHexToInt(Q),K=l.asn1.x509.OID.oid2atype(W),Z=G($,J[1]),H=iU(Z);return K+"="+H};e4.getPublicKeyFromCertHex=function($){var Y=new e4;return Y.readCertHex($),Y.getPublicKey()};e4.getPublicKeyFromCertPEM=function($){var Y=new e4;return Y.readCertPEM($),Y.getPublicKey()};e4.getPublicKeyInfoPropOfCertPEM=function($){var Y=M1,X=Y.getVbyList,G={},J,Q,W;if(G.algparam=null,J=new e4,J.readCertPEM($),Q=J.getPublicKeyHex(),G.keyhex=X(Q,0,[1],"03").substr(2),G.algoid=X(Q,0,[0,0],"06"),G.algoid==="2a8648ce3d0201")G.algparam=X(Q,0,[0,1],"06");return G};e4.KEYUSAGE_NAME=["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment","keyAgreement","keyCertSign","cRLSign","encipherOnly","decipherOnly"];if(typeof l>"u"||!l)l={};if(typeof l.jws>"u"||!l.jws)l.jws={};l.jws.JWS=function(){var $=l,Y=$.jws.JWS,X=Y.isSafeJSONString;this.parseJWS=function(G,J){if(this.parsedJWS!==void 0&&(J||this.parsedJWS.sigvalH!==void 0))return;var Q=G.match(/^([^.]+)\.([^.]+)\.([^.]+)$/);if(Q==null)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";var W=Q[1],K=Q[2],Z=Q[3],H=W+"."+K;if(this.parsedJWS={},this.parsedJWS.headB64U=W,this.parsedJWS.payloadB64U=K,this.parsedJWS.sigvalB64U=Z,this.parsedJWS.si=H,!J){var z=W$(Z),V=dJ(z,16);this.parsedJWS.sigvalH=z,this.parsedJWS.sigvalBI=V}var F=lU(W),L=lU(K);if(this.parsedJWS.headS=F,this.parsedJWS.payloadS=L,!X(F,this.parsedJWS,"headP"))throw"malformed JSON string for JWS Head: "+F}};l.jws.JWS.sign=function($,Y,X,G,J){var Q=l,W=Q.jws,K=W.JWS,Z=K.readSafeJSONString,H=K.isSafeJSONString,z=Q.crypto,V=z.ECDSA,F=z.Mac,L=z.Signature,N=JSON,D,A,B;if(typeof Y!="string"&&typeof Y!="object")throw"spHeader must be JSON string or object: "+Y;if(typeof Y=="object")A=Y,D=N.stringify(A);if(typeof Y=="string"){if(D=Y,!H(D))throw"JWS Head is not safe JSON string: "+D;A=Z(D)}if(B=X,typeof X=="object")B=N.stringify(X);if(($==""||$==null)&&A.alg!==void 0)$=A.alg;if($!=""&&$!=null&&A.alg===void 0)A.alg=$,D=N.stringify(A);if($!==A.alg)throw"alg and sHeader.alg doesn't match: "+$+"!="+A.alg;var O=null;if(K.jwsalg2sigalg[$]===void 0)throw"unsupported alg name: "+$;else O=K.jwsalg2sigalg[$];var E=tn(D),M=tn(B),R=E+"."+M,q="";if(O.substr(0,4)=="Hmac"){if(G===void 0)throw"mac key shall be specified for HS* alg";var _=new F({alg:O,prov:"cryptojs",pass:G});_.updateString(R),q=_.doFinal()}else if(O.indexOf("withECDSA")!=-1){var P=new L({alg:O});P.init(G,J),P.updateString(R);var w=P.sign();q=l.crypto.ECDSA.asn1SigToConcatSig(w)}else if(O!="none"){var P=new L({alg:O});P.init(G,J),P.updateString(R),q=P.sign()}var j=TY(q);return R+"."+j};l.jws.JWS.verify=function($,Y,X){var G=l,J=G.jws,Q=J.JWS,W=Q.readSafeJSONString,K=G.crypto,Z=K.ECDSA,H=K.Mac,z=K.Signature,V;if(typeof F6!==void 0)V=F6;if(!xG1($))return!1;var F=$.split(".");if(F.length!==3)return!1;var L=F[0],N=F[1],D=L+"."+N,A=W$(F[2]),B=W(lU(F[0])),O=null,E=null;if(B.alg===void 0)throw"algorithm not specified in header";else O=B.alg,E=O.substr(0,2);if(X!=null&&Object.prototype.toString.call(X)==="[object Array]"&&X.length>0){var M=":"+X.join(":")+":";if(M.indexOf(":"+O+":")==-1)throw"algorithm '"+O+"' not accepted in the list"}if(O!="none"&&Y===null)throw"key shall be specified to verify.";if(typeof Y=="string"&&Y.indexOf("-----BEGIN ")!=-1)Y=Z8.getKey(Y);if(E=="RS"||E=="PS"){if(!(Y instanceof V))throw"key shall be a RSAKey obj for RS* and PS* algs"}if(E=="ES"){if(!(Y instanceof Z))throw"key shall be a ECDSA obj for ES* algs"}if(O=="none");var R=null;if(Q.jwsalg2sigalg[B.alg]===void 0)throw Error("unsupported alg name: "+O);else R=Q.jwsalg2sigalg[O];if(B.crit!==void 0){if(!Array.isArray(B.crit)||B.crit.length===0)throw Error("wrong critical header");for(var q=0;q<B.crit.length;q++){var _=B.crit[q];if(typeof _!=="string"||_.length===0)throw Error("wrong critical header");if(B[_]===void 0)throw Error("critical header '"+_+"' missing")}}if(R=="none")throw Error("not supported");else if(R.substr(0,4)=="Hmac"){var P=null;if(Y===void 0)throw Error("hexadecimal key shall be specified for HMAC");var w=new H({alg:R,pass:Y});return w.updateString(D),P=w.doFinal(),jo4(A,P)}else if(R.indexOf("withECDSA")!=-1){var j=null;try{j=Z.concatSigToASN1Sig(A)}catch(k){return!1}var C=new z({alg:R});return C.init(Y),C.updateString(D),C.verify(j)}else{var C=new z({alg:R});return C.init(Y),C.updateString(D),C.verify(A)}};l.jws.JWS.parse=function($){var Y=$.split("."),X={},G,J,Q;if(Y.length!=2&&Y.length!=3)throw"malformed sJWS: wrong number of '.' splitted elements";if(G=Y[0],J=Y[1],Y.length==3)Q=Y[2];if(X.headerObj=l.jws.JWS.readSafeJSONString(lU(G)),X.payloadObj=l.jws.JWS.readSafeJSONString(lU(J)),X.headerPP=JSON.stringify(X.headerObj,null,"  "),X.payloadObj==null)X.payloadPP=lU(J);else X.payloadPP=JSON.stringify(X.payloadObj,null,"  ");if(Q!==void 0)X.sigHex=W$(Q);return X};l.jws.JWS.verifyJWT=function($,Y,X){var G=l,J=G.jws,Q=J.JWS,W=Q.readSafeJSONString,K=Q.inArray,Z=Q.includedArray;if(!xG1($))return!1;var H=$.split(".");if(H.length!=3)return!1;var z=H[0],V=H[1],F=z+"."+V,L=W$(H[2]),N=W(lU(z)),D=W(lU(V));if(N.alg===void 0)return!1;if(X.alg===void 0)throw"acceptField.alg shall be specified";if(!K(N.alg,X.alg))return!1;if(D.iss!==void 0&&typeof X.iss==="object"){if(!K(D.iss,X.iss))return!1}if(D.sub!==void 0&&typeof X.sub==="object"){if(!K(D.sub,X.sub))return!1}if(D.aud!==void 0&&typeof X.aud==="object"){if(typeof D.aud=="string"){if(!K(D.aud,X.aud))return!1}else if(typeof D.aud=="object"){if(!Z(D.aud,X.aud))return!1}}var A=J.IntDate.getNow();if(X.verifyAt!==void 0&&typeof X.verifyAt==="number")A=X.verifyAt;if(X.gracePeriod===void 0||typeof X.gracePeriod!=="number")X.gracePeriod=0;if(D.exp!==void 0&&typeof D.exp=="number"){if(D.exp+X.gracePeriod<A)return!1}if(D.nbf!==void 0&&typeof D.nbf=="number"){if(A<D.nbf-X.gracePeriod)return!1}if(D.iat!==void 0&&typeof D.iat=="number"){if(A<D.iat-X.gracePeriod)return!1}if(D.jti!==void 0&&X.jti!==void 0){if(D.jti!==X.jti)return!1}if(!Q.verify($,Y,X.alg))return!1;return!0};l.jws.JWS.includedArray=function($,Y){var X=l.jws.JWS.inArray;if($===null)return!1;if(typeof $!=="object")return!1;if(typeof $.length!=="number")return!1;for(var G=0;G<$.length;G++)if(!X($[G],Y))return!1;return!0};l.jws.JWS.inArray=function($,Y){if(Y===null)return!1;if(typeof Y!=="object")return!1;if(typeof Y.length!=="number")return!1;for(var X=0;X<Y.length;X++)if(Y[X]==$)return!0;return!1};l.jws.JWS.jwsalg2sigalg={HS256:"HmacSHA256",HS384:"HmacSHA384",HS512:"HmacSHA512",RS256:"SHA256withRSA",RS384:"SHA384withRSA",RS512:"SHA512withRSA",ES256:"SHA256withECDSA",ES384:"SHA384withECDSA",ES512:"SHA512withECDSA",PS256:"SHA256withRSAandMGF1",PS384:"SHA384withRSAandMGF1",PS512:"SHA512withRSAandMGF1",none:"none"};l.jws.JWS.isSafeJSONString=function($,Y,X){var G=null;try{if(G=jG1($),typeof G!="object")return 0;if(G.constructor===Array)return 0;if(Y)Y[X]=G;return 1}catch(J){return 0}};l.jws.JWS.readSafeJSONString=function($){var Y=null;try{if(Y=jG1($),typeof Y!="object")return null;if(Y.constructor===Array)return null;return Y}catch(X){return null}};l.jws.JWS.getEncodedSignatureValueFromJWS=function($){var Y=$.match(/^[^.]+\.[^.]+\.([^.]+)$/);if(Y==null)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";return Y[1]};l.jws.JWS.getJWKthumbprint=function($){if($.kty!=="RSA"&&$.kty!=="EC"&&$.kty!=="oct")throw Error("unsupported algorithm for JWK Thumprint");var Y="{";if($.kty==="RSA"){if(typeof $.n!="string"||typeof $.e!="string")throw Error("wrong n and e value for RSA key");Y+='"e":"'+$.e+'",',Y+='"kty":"'+$.kty+'",',Y+='"n":"'+$.n+'"}'}else if($.kty==="EC"){if(typeof $.crv!="string"||typeof $.x!="string"||typeof $.y!="string")throw Error("wrong crv, x and y value for EC key");Y+='"crv":"'+$.crv+'",',Y+='"kty":"'+$.kty+'",',Y+='"x":"'+$.x+'",',Y+='"y":"'+$.y+'"}'}else if($.kty==="oct"){if(typeof $.k!="string")throw Error("wrong k value for oct(symmetric) key");Y+='"k":"'+$.k+'",',Y+='"kty":"'+$.kty+'"}'}var X=dH(Y),G=l.crypto.Util.hashHex(X,"sha256"),J=TY(G);return J};l.jws.IntDate={};l.jws.IntDate.get=function($){var Y=l.jws.IntDate,X=Y.getNow,G=Y.getZulu;if($=="now")return X();else if($=="now + 1hour")return X()+3600;else if($=="now + 1day")return X()+86400;else if($=="now + 1month")return X()+2592000;else if($=="now + 1year")return X()+31536000;else if($.match(/Z$/))return G($);else if($.match(/^[0-9]+$/))return parseInt($);throw"unsupported format: "+$};l.jws.IntDate.getZulu=function($){return wo4($)};l.jws.IntDate.getNow=function(){var $=~~(new Date/1000);return $};l.jws.IntDate.intDate2UTCString=function($){var Y=new Date($*1000);return Y.toUTCString()};l.jws.IntDate.intDate2Zulu=function($){var Y=new Date($*1000),X=("0000"+Y.getUTCFullYear()).slice(-4),G=("00"+(Y.getUTCMonth()+1)).slice(-2),J=("00"+Y.getUTCDate()).slice(-2),Q=("00"+Y.getUTCHours()).slice(-2),W=("00"+Y.getUTCMinutes()).slice(-2),K=("00"+Y.getUTCSeconds()).slice(-2);return X+G+J+Q+W+K+"Z"};if(typeof l>"u"||!l)l={};if(typeof l.jws>"u"||!l.jws)l.jws={};l.jws.JWSJS=function(){var $=l,Y=$.jws,X=Y.JWS,G=X.readSafeJSONString;this.aHeader=[],this.sPayload="",this.aSignature=[],this.init=function(){this.aHeader=[],this.sPayload=void 0,this.aSignature=[]},this.initWithJWS=function(J){this.init();var Q=J.split(".");if(Q.length!=3)throw"malformed input JWS";this.aHeader.push(Q[0]),this.sPayload=Q[1],this.aSignature.push(Q[2])},this.addSignature=function(J,Q,W,K){if(this.sPayload===void 0||this.sPayload===null)throw"there's no JSON-JS signature to add.";var Z=this.aHeader.length;if(this.aHeader.length!=this.aSignature.length)throw"aHeader.length != aSignature.length";try{var H=l.jws.JWS.sign(J,Q,this.sPayload,W,K),z=H.split("."),V=z[0],F=z[2];this.aHeader.push(z[0]),this.aSignature.push(z[2])}catch(L){if(this.aHeader.length>Z)this.aHeader.pop();if(this.aSignature.length>Z)this.aSignature.pop();throw"addSignature failed: "+L}},this.verifyAll=function(J){if(this.aHeader.length!==J.length||this.aSignature.length!==J.length)return!1;for(var Q=0;Q<J.length;Q++){var W=J[Q];if(W.length!==2)return!1;var K=this.verifyNth(Q,W[0],W[1]);if(K===!1)return!1}return!0},this.verifyNth=function(J,Q,W){if(this.aHeader.length<=J||this.aSignature.length<=J)return!1;var K=this.aHeader[J],Z=this.aSignature[J],H=K+"."+this.sPayload+"."+Z,z=!1;try{z=X.verify(H,Q,W)}catch(V){return!1}return z},this.readJWSJS=function(J){if(typeof J==="string"){var Q=G(J);if(Q==null)throw"argument is not safe JSON object string";this.aHeader=Q.headers,this.sPayload=Q.payload,this.aSignature=Q.signatures}else try{if(J.headers.length>0)this.aHeader=J.headers;else throw"malformed header";if(typeof J.payload==="string")this.sPayload=J.payload;else throw"malformed signatures";if(J.signatures.length>0)this.aSignature=J.signatures;else throw"malformed signatures"}catch(W){throw"malformed JWS-JS JSON object: "+W}},this.getJSON=function(){return{headers:this.aHeader,payload:this.sPayload,signatures:this.aSignature}},this.isEmpty=function(){if(this.aHeader.length==0)return 1;return 0}};var vo4=l.crypto.ECDSA,xo4=l.crypto.DSA,yo4=l.crypto.Signature,bo4=l.crypto.MessageDigest,ho4=l.crypto.Mac;var{crypto:fo4,asn1:go4,jws:mo4,lang:uo4}=l;var po4=`-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgDm8szG2NDc1OFbQb0PS
K3LEXfiZrndygBiHBjLZ4jtR69gaFV4tjjFJ9yc3fM8X11uAMyiOyzzVLkEZXRMS
aEGRnmkHo4giaSPBQ1p2HV0617I9LBR/ugLq88tZUTGP1JitkAd9K6Y8iQEar2Zd
ajU2ktao2M17ocLdwG4ey4i/+cVHIZlkh3T9Hr9oJtuXg7eWrxXBRMu9U9ngWdI/
o5HuLiEwUJPbXcKseg4uzpGYT3S8RVQ0pA3khSJbOXEmc4ZIeoFynIijVZY0hKLa
8qcdpADXVLQFK1Fo3+2oto+tVQZXOmJFap8X8ZWGlqlh+DKlLDYHpG2YshAWQ6PM
qQIDAQAB
-----END PUBLIC KEY-----`,do4=`-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCAObyzMbY0NzU4
VtBvQ9IrcsRd+Jmud3KAGIcGMtniO1Hr2BoVXi2OMUn3Jzd8zxfXW4AzKI7LPNUu
QRldExJoQZGeaQejiCJpI8FDWnYdXTrXsj0sFH+6Aurzy1lRMY/UmK2QB30rpjyJ
ARqvZl1qNTaS1qjYzXuhwt3Abh7LiL/5xUchmWSHdP0ev2gm25eDt5avFcFEy71T
2eBZ0j+jke4uITBQk9tdwqx6Di7OkZhPdLxFVDSkDeSFIls5cSZzhkh6gXKciKNV
ljSEotrypx2kANdUtAUrUWjf7ai2j61VBlc6YkVqnxfxlYaWqWH4MqUsNgekbZiy
EBZDo8ypAgMBAAECggEAYLKp8n0HygLkWLNnhrEfuvJW0gMbam3b5Gwaz3rjw282
zWPv77NRKY1UGVXyy2Wlthvj5zCr1uruXW5sgTtTw1nHRi4wu4t7X8y9/1wl/OkE
6gsZhLeExzNSGj59AfUdYZcuNJLhO1ynBC7X//RzeBffKwdE2BLGLGw3LNoe0SAa
BDzpfCwJ+hpj9lhWh+mPutiM/TvR5qALH3ijZNHgAvzTVHgOnk6IUqFPxiZBEg2t
VQERK/8sqG0SXTqe4RE3cccPOpVt7OE7JPgFGWl2jYVJK+u9Ke959p+4inAz7QM+
z8rIvsqkzrkl4UjlIT605I3KSymEwNsg/GdEiqa/sQKBgQDrIXqs1Diy38c6Byo6
UPD/AxvF4kcslbTgUoeG0Ll+8krJyotBdxPRn7CsOBk9Klbm8yexh4udcNKo6ml/
2B7cvQ/PRGRuIitsYks80ZWHkkma6/Nb6YMa00euwbFXWS+ohFI8hgqvD9ntng4I
SY0d61FbLdRfbKgvGHMzwqZ2hQKBgQCLmzY+E3BwkLG2wqyfk7VBmWR10YLctipI
mMY7fDvh/8iNTxpT3Rq/3h/paunDyzKxeJHxQatPp2pFfbMslxznDGXXWGPCnZSi
B+MDquq5mBxgZY4LLguzAgI9zCnVomUJ9rhRX755qsWjhTmmSdEh6gw1nd91bvOv
KrZpNvVw1QKBgC3XPBx/z4IIIMZOaUwvRZziFUMSJ4Aou7fUPznobZGzWSNYSqf7
uDBxKreYxErpe0HRfBafb3fFbDykXuce0n2EmpV1JwNVxBOAYly8G6PvwEvk3nA3
6WiMcng+qP13lNQM4B+Onnyc4Yby/pddB5cirpzRJYtpGqz73lHkDCIlAoGAFAJF
7vW4StniLrCOLzzrYKCMjnpdyCZvvwHuf34Z0xVm+CHbQyPQfqlmZ30ETiSkel0u
haaE2CDFkXonoP9zjAXx3sBzY+RT9jktJ0xq4fjUMFi92ApccOabzaGiaVUiKCBt
YHRZh3SbaQliLtwrljHGWDTtXxZs5LE5fbD70pUCgYEA4IUM93mB3u3/3lCayvWQ
C9UB1nCxdihXmw39OmuFgyo+amiykRHF1zrEyHMNGncWrV5FiN4bguW/CpYJhXXH
ZWBXo20q2gVq+QVMabLW4whG1oY3ld8QI7KXEGAQP9hnt5Tlg+2tUC3cFvnNRu9w
tfZYhkUov8lKDAEuVkJZ2jA=
-----END PRIVATE KEY-----`;async function cH($=30){let Y=Z71($),X="RS256",G=await gZ0(do4,"RS256");return await new nn({"tbcloud.me:claim":!0}).setProtectedHeader({alg:"RS256"}).setIssuedAt().setIssuer("tbcloud.me:issuer").setAudience("tbcloud.me:audience").setExpirationTime(`${$}day`).setIssuedAt(new Date).setSubject(Y).sign(G)}async function rk($){try{let X=await fZ0(po4,"RS256"),{payload:G,protectedHeader:J}=await dZ0($,X,{issuer:"tbcloud.me:issuer",audience:"tbcloud.me:audience"});if(gH(J)&&gH(G)){if(G.sub);return!0}else return!1}catch(Y){return!1}}function co4(){let $=new Date;return`${$.getFullYear()}-${$.getMonth()+1}-${$.getDate()} ${$.getHours()}:${$.getMinutes()}:${$.getSeconds()}`}function $1(){return{data:null,requestId:xH(),timestamp:co4(),code:"0000"}}var lo4="Payload Too Large",fG1=($)=>{let Y=$.onError||(()=>{let G=new Response(lo4,{status:413});throw new v0(413,{res:G})}),X=$.maxSize;return async function(J,Q){if(!J.req.raw.body)return Q();let W=J.req.raw.headers.has("transfer-encoding");if(J.req.raw.headers.has("content-length")&&!W)return parseInt(J.req.raw.headers.get("content-length")||"0",10)>X?Y(J):Q();let Z=0,H=[],z=J.req.raw.body.getReader();for(;;){let{done:F,value:L}=await z.read();if(F)break;if(Z+=L.length,Z>X)return Y(J);H.push(L)}let V={body:new ReadableStream({start(F){for(let L of H)F.enqueue(L);F.close()}}),duplex:"half"};return J.req.raw=new Request(J.req.raw,V),Q()}};import io4 from"os";var EF=B6("sys_file_upload",{id:g0("id"),name:g0("name"),path:g0("path"),url:g0("url"),type:g0("type"),size:m1("size"),createdAt:m1("createdAt"),updatedAt:m1("updatedAt"),latest_visitAt:m1("latest_visitAt"),createBy:g0("createBy"),updateBy:g0("updateBy"),env_id:g0("env_id")});async function gG1($){return await e0.select().from(EF).where(_1(EF.id,$))}function mG1($){let Y=r.raw("1 = 1");if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or path like '%${$.searchVal}%')`));return Y}async function uG1($){return await e0.select().from(EF).where(mG1($)).limit(Number($.limit)).offset(Number($.offset)).orderBy(r`${EF.createdAt} desc`)}async function pG1($){return await e0.$count(EF,mG1($))}async function Xr($){let Y=Date.now();$.id=C6(),$.env_id="default",$.createBy="admin",$.createdAt=Y,$.updateBy="admin",$.updatedAt=Y,await e0.insert(EF).values($)}async function dG1($){await e0.delete(EF).where(_1(EF.id,$))}var iG1=new _4;function no4(){let $=io4.networkInterfaces();for(let Y of Object.keys($))for(let X of $[Y])if(X.family==="IPv4"&&!X.internal)return X.address;return"No External IP found"}var lG1=no4();iG1.post("/",fG1({maxSize:1048576000,onError:($)=>{return $.text("overflow :(",413)}}),async($)=>{try{let Y=await $.req.parseBody();if(Y.file instanceof File){let X=K71(),G=Bun.randomUUIDv7(),J="."+Y.file.name.split(".").pop(),Q=Y.file.type,W=Y.file.name;await Bun.write(Bun.file(`static/upload/${X}/${G}${J}`),Y.file,{createPath:!0});let K={name:W,path:`static/upload/${X}/${G}${J}`,url:`http://${lG1}:${Bun.env.PORT||3000}/static/upload/${X}/${G}${J}`,type:Q,size:Y.file.size};await Xr(K);let Z=$1();return Z.data={url:`http://${lG1}:${Bun.env.PORT||3000}/static/upload/${X}/${G}${J}`},$.json(Z)}else{let X=$1();return X.data={success:!1},$.json(X)}}catch(Y){return console.log(Y),$.text("faild :(")}return $.text("faild :(1")});var nG1=iG1;var rG1=new _4,ro4=()=>{return B5().var.traceId};rG1.get("/",async($)=>{return $.json({msg:"success",traceId:ro4()})});var aG1=rG1;var ar=U6(ZH0(),1);class qv extends t0{constructor($){super(qv.buildEmbeddedCount($.source,$.filters).queryChunks);this.params=$,this.mapWith(Number),this.session=$.session,this.sql=qv.buildCount($.source,$.filters)}sql;static[z0]="MySqlCountBuilder";[Symbol.toStringTag]="MySqlCountBuilder";session;static buildEmbeddedCount($,Y){return r`(select count(*) from ${$}${r.raw(" where ").if(Y)}${Y})`}static buildCount($,Y){return r`select count(*) as count from ${$}${r.raw(" where ").if(Y)}${Y}`}then($,Y){return Promise.resolve(this.session.count(this.sql)).then($,Y)}catch($){return this.then(void 0,$)}finally($){return this.then((Y)=>{return $?.(),Y},(Y)=>{throw $?.(),Y})}}class UH0{static[z0]="MySqlForeignKeyBuilder";reference;_onUpdate;_onDelete;constructor($,Y){if(this.reference=()=>{let{name:X,columns:G,foreignColumns:J}=$();return{name:X,columns:G,foreignTable:J[0].table,foreignColumns:J}},Y)this._onUpdate=Y.onUpdate,this._onDelete=Y.onDelete}onUpdate($){return this._onUpdate=$,this}onDelete($){return this._onDelete=$,this}build($){return new VU1($,this)}}class VU1{constructor($,Y){this.table=$,this.reference=Y.reference,this.onUpdate=Y._onUpdate,this.onDelete=Y._onDelete}static[z0]="MySqlForeignKey";reference;onUpdate;onDelete;getName(){let{name:$,columns:Y,foreignColumns:X}=this.reference(),G=Y.map((W)=>W.name),J=X.map((W)=>W.name),Q=[this.table[F7],...G,X[0].table[F7],...J];return $??`${Q.join("_")}_fk`}}function FU1($,Y){return`${$[F7]}_${Y.join("_")}_unique`}class c8 extends yN{static[z0]="MySqlColumnBuilder";foreignKeyConfigs=[];references($,Y={}){return this.foreignKeyConfigs.push({ref:$,actions:Y}),this}unique($){return this.config.isUnique=!0,this.config.uniqueName=$,this}generatedAlwaysAs($,Y){return this.config.generated={as:$,type:"always",mode:Y?.mode??"virtual"},this}buildForeignKeys($,Y){return this.foreignKeyConfigs.map(({ref:X,actions:G})=>{return((J,Q)=>{let W=new UH0(()=>{let K=J();return{columns:[$],foreignColumns:[K]}});if(Q.onUpdate)W.onUpdate(Q.onUpdate);if(Q.onDelete)W.onDelete(Q.onDelete);return W.build(Y)})(X,G)})}}class $8 extends m4{constructor($,Y){if(!Y.uniqueName)Y.uniqueName=FU1($,[Y.name]);super($,Y);this.table=$}static[z0]="MySqlColumn"}class K$ extends c8{static[z0]="MySqlColumnBuilderWithAutoIncrement";constructor($,Y,X){super($,Y,X);this.config.autoIncrement=!1}autoincrement(){return this.config.autoIncrement=!0,this.config.hasDefault=!0,this}}class Z$ extends $8{static[z0]="MySqlColumnWithAutoIncrement";autoIncrement=this.config.autoIncrement}class LU1 extends K${static[z0]="MySqlBigInt53Builder";constructor($,Y=!1){super($,"number","MySqlBigInt53");this.config.unsigned=Y}build($){return new DU1($,this.config)}}class DU1 extends Z${static[z0]="MySqlBigInt53";getSQLType(){return`bigint${this.config.unsigned?" unsigned":""}`}mapFromDriverValue($){if(typeof $==="number")return $;return Number($)}}class NU1 extends K${static[z0]="MySqlBigInt64Builder";constructor($,Y=!1){super($,"bigint","MySqlBigInt64");this.config.unsigned=Y}build($){return new AU1($,this.config)}}class AU1 extends Z${static[z0]="MySqlBigInt64";getSQLType(){return`bigint${this.config.unsigned?" unsigned":""}`}mapFromDriverValue($){return BigInt($)}}function Pv($,Y){let{name:X,config:G}=S1($,Y);if(G.mode==="number")return new LU1(X,G.unsigned);return new NU1(X,G.unsigned)}class BU1 extends c8{static[z0]="MySqlBinaryBuilder";constructor($,Y){super($,"string","MySqlBinary");this.config.length=Y}build($){return new OU1($,this.config)}}class OU1 extends $8{static[z0]="MySqlBinary";length=this.config.length;mapFromDriverValue($){if(typeof $==="string")return $;if(Buffer.isBuffer($))return $.toString();let Y=[];for(let X of $)Y.push(X===49?"1":"0");return Y.join("")}getSQLType(){return this.length===void 0?"binary":`binary(${this.length})`}}function wv($,Y={}){let{name:X,config:G}=S1($,Y);return new BU1(X,G.length)}class EU1 extends c8{static[z0]="MySqlBooleanBuilder";constructor($){super($,"boolean","MySqlBoolean")}build($){return new MU1($,this.config)}}class MU1 extends $8{static[z0]="MySqlBoolean";getSQLType(){return"boolean"}mapFromDriverValue($){if(typeof $==="boolean")return $;return $===1}}function _v($){return new EU1($??"")}class RU1 extends c8{static[z0]="MySqlCharBuilder";constructor($,Y){super($,"string","MySqlChar");this.config.length=Y.length,this.config.enum=Y.enum}build($){return new qU1($,this.config)}}class qU1 extends $8{static[z0]="MySqlChar";length=this.config.length;enumValues=this.config.enum;getSQLType(){return this.length===void 0?"char":`char(${this.length})`}}function jv($,Y={}){let{name:X,config:G}=S1($,Y);return new RU1(X,G)}class PU1 extends c8{static[z0]="MySqlCustomColumnBuilder";constructor($,Y,X){super($,"custom","MySqlCustomColumn");this.config.fieldConfig=Y,this.config.customTypeParams=X}build($){return new wU1($,this.config)}}class wU1 extends $8{static[z0]="MySqlCustomColumn";sqlName;mapTo;mapFrom;constructor($,Y){super($,Y);this.sqlName=Y.customTypeParams.dataType(Y.fieldConfig),this.mapTo=Y.customTypeParams.toDriver,this.mapFrom=Y.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue($){return typeof this.mapFrom==="function"?this.mapFrom($):$}mapToDriverValue($){return typeof this.mapTo==="function"?this.mapTo($):$}}function _U1($){return(Y,X)=>{let{name:G,config:J}=S1(Y,X);return new PU1(G,J,$)}}class jU1 extends c8{static[z0]="MySqlDateBuilder";constructor($){super($,"date","MySqlDate")}build($){return new TU1($,this.config)}}class TU1 extends $8{static[z0]="MySqlDate";constructor($,Y){super($,Y)}getSQLType(){return"date"}mapFromDriverValue($){return new Date($)}}class IU1 extends c8{static[z0]="MySqlDateStringBuilder";constructor($){super($,"string","MySqlDateString")}build($){return new CU1($,this.config)}}class CU1 extends $8{static[z0]="MySqlDateString";constructor($,Y){super($,Y)}getSQLType(){return"date"}}function Tv($,Y){let{name:X,config:G}=S1($,Y);if(G?.mode==="string")return new IU1(X);return new jU1(X)}class SU1 extends c8{static[z0]="MySqlDateTimeBuilder";constructor($,Y){super($,"date","MySqlDateTime");this.config.fsp=Y?.fsp}build($){return new kU1($,this.config)}}class kU1 extends $8{static[z0]="MySqlDateTime";fsp;constructor($,Y){super($,Y);this.fsp=Y.fsp}getSQLType(){return`datetime${this.fsp===void 0?"":`(${this.fsp})`}`}mapToDriverValue($){return $.toISOString().replace("T"," ").replace("Z","")}mapFromDriverValue($){return new Date($.replace(" ","T")+"Z")}}class vU1 extends c8{static[z0]="MySqlDateTimeStringBuilder";constructor($,Y){super($,"string","MySqlDateTimeString");this.config.fsp=Y?.fsp}build($){return new xU1($,this.config)}}class xU1 extends $8{static[z0]="MySqlDateTimeString";fsp;constructor($,Y){super($,Y);this.fsp=Y.fsp}getSQLType(){return`datetime${this.fsp===void 0?"":`(${this.fsp})`}`}}function Iv($,Y){let{name:X,config:G}=S1($,Y);if(G?.mode==="string")return new vU1(X,G);return new SU1(X,G)}class yU1 extends K${static[z0]="MySqlDecimalBuilder";constructor($,Y){super($,"string","MySqlDecimal");this.config.precision=Y?.precision,this.config.scale=Y?.scale,this.config.unsigned=Y?.unsigned}build($){return new bU1($,this.config)}}class bU1 extends Z${static[z0]="MySqlDecimal";precision=this.config.precision;scale=this.config.scale;unsigned=this.config.unsigned;mapFromDriverValue($){if(typeof $==="string")return $;return String($)}getSQLType(){let $="";if(this.precision!==void 0&&this.scale!==void 0)$+=`decimal(${this.precision},${this.scale})`;else if(this.precision===void 0)$+="decimal";else $+=`decimal(${this.precision})`;return $=$==="decimal(10,0)"||$==="decimal(10)"?"decimal":$,this.unsigned?`${$} unsigned`:$}}class hU1 extends K${static[z0]="MySqlDecimalNumberBuilder";constructor($,Y){super($,"number","MySqlDecimalNumber");this.config.precision=Y?.precision,this.config.scale=Y?.scale,this.config.unsigned=Y?.unsigned}build($){return new fU1($,this.config)}}class fU1 extends Z${static[z0]="MySqlDecimalNumber";precision=this.config.precision;scale=this.config.scale;unsigned=this.config.unsigned;mapFromDriverValue($){if(typeof $==="number")return $;return Number($)}mapToDriverValue=String;getSQLType(){let $="";if(this.precision!==void 0&&this.scale!==void 0)$+=`decimal(${this.precision},${this.scale})`;else if(this.precision===void 0)$+="decimal";else $+=`decimal(${this.precision})`;return $=$==="decimal(10,0)"||$==="decimal(10)"?"decimal":$,this.unsigned?`${$} unsigned`:$}}class gU1 extends K${static[z0]="MySqlDecimalBigIntBuilder";constructor($,Y){super($,"bigint","MySqlDecimalBigInt");this.config.precision=Y?.precision,this.config.scale=Y?.scale,this.config.unsigned=Y?.unsigned}build($){return new mU1($,this.config)}}class mU1 extends Z${static[z0]="MySqlDecimalBigInt";precision=this.config.precision;scale=this.config.scale;unsigned=this.config.unsigned;mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){let $="";if(this.precision!==void 0&&this.scale!==void 0)$+=`decimal(${this.precision},${this.scale})`;else if(this.precision===void 0)$+="decimal";else $+=`decimal(${this.precision})`;return $=$==="decimal(10,0)"||$==="decimal(10)"?"decimal":$,this.unsigned?`${$} unsigned`:$}}function Cv($,Y={}){let{name:X,config:G}=S1($,Y),J=G?.mode;return J==="number"?new hU1(X,G):J==="bigint"?new gU1(X,G):new yU1(X,G)}class uU1 extends K${static[z0]="MySqlDoubleBuilder";constructor($,Y){super($,"number","MySqlDouble");this.config.precision=Y?.precision,this.config.scale=Y?.scale,this.config.unsigned=Y?.unsigned}build($){return new pU1($,this.config)}}class pU1 extends Z${static[z0]="MySqlDouble";precision=this.config.precision;scale=this.config.scale;unsigned=this.config.unsigned;getSQLType(){let $="";if(this.precision!==void 0&&this.scale!==void 0)$+=`double(${this.precision},${this.scale})`;else if(this.precision===void 0)$+="double";else $+=`double(${this.precision})`;return this.unsigned?`${$} unsigned`:$}}function Sv($,Y){let{name:X,config:G}=S1($,Y);return new uU1(X,G)}class dU1 extends c8{static[z0]="MySqlEnumColumnBuilder";constructor($,Y){super($,"string","MySqlEnumColumn");this.config.enumValues=Y}build($){return new cU1($,this.config)}}class cU1 extends $8{static[z0]="MySqlEnumColumn";enumValues=this.config.enumValues;getSQLType(){return`enum(${this.enumValues.map(($)=>`'${$}'`).join(",")})`}}class lU1 extends c8{static[z0]="MySqlEnumObjectColumnBuilder";constructor($,Y){super($,"string","MySqlEnumObjectColumn");this.config.enumValues=Y}build($){return new iU1($,this.config)}}class iU1 extends $8{static[z0]="MySqlEnumObjectColumn";enumValues=this.config.enumValues;getSQLType(){return`enum(${this.enumValues.map(($)=>`'${$}'`).join(",")})`}}function nU1($,Y){if(typeof $==="string"&&Array.isArray(Y)||Array.isArray($)){let X=typeof $==="string"&&$.length>0?$:"",G=(typeof $==="string"?Y:$)??[];if(G.length===0)throw Error(`You have an empty array for "${X}" enum values`);return new dU1(X,G)}if(typeof $==="string"&&typeof Y==="object"||typeof $==="object"){let X=typeof $==="object"?"":$,G=typeof $==="object"?Object.values($):typeof Y==="object"?Object.values(Y):[];if(G.length===0)throw Error(`You have an empty array for "${X}" enum values`);return new lU1(X,G)}}class rU1 extends K${static[z0]="MySqlFloatBuilder";constructor($,Y){super($,"number","MySqlFloat");this.config.precision=Y?.precision,this.config.scale=Y?.scale,this.config.unsigned=Y?.unsigned}build($){return new aU1($,this.config)}}class aU1 extends Z${static[z0]="MySqlFloat";precision=this.config.precision;scale=this.config.scale;unsigned=this.config.unsigned;getSQLType(){let $="";if(this.precision!==void 0&&this.scale!==void 0)$+=`float(${this.precision},${this.scale})`;else if(this.precision===void 0)$+="float";else $+=`float(${this.precision})`;return this.unsigned?`${$} unsigned`:$}}function kv($,Y){let{name:X,config:G}=S1($,Y);return new rU1(X,G)}class sU1 extends K${static[z0]="MySqlIntBuilder";constructor($,Y){super($,"number","MySqlInt");this.config.unsigned=Y?Y.unsigned:!1}build($){return new oU1($,this.config)}}class oU1 extends Z${static[z0]="MySqlInt";getSQLType(){return`int${this.config.unsigned?" unsigned":""}`}mapFromDriverValue($){if(typeof $==="string")return Number($);return $}}function vv($,Y){let{name:X,config:G}=S1($,Y);return new sU1(X,G)}class tU1 extends c8{static[z0]="MySqlJsonBuilder";constructor($){super($,"json","MySqlJson")}build($){return new eU1($,this.config)}}class eU1 extends $8{static[z0]="MySqlJson";getSQLType(){return"json"}mapToDriverValue($){return JSON.stringify($)}}function xv($){return new tU1($??"")}class $31 extends K${static[z0]="MySqlMediumIntBuilder";constructor($,Y){super($,"number","MySqlMediumInt");this.config.unsigned=Y?Y.unsigned:!1}build($){return new Y31($,this.config)}}class Y31 extends Z${static[z0]="MySqlMediumInt";getSQLType(){return`mediumint${this.config.unsigned?" unsigned":""}`}mapFromDriverValue($){if(typeof $==="string")return Number($);return $}}function yv($,Y){let{name:X,config:G}=S1($,Y);return new $31(X,G)}class X31 extends K${static[z0]="MySqlRealBuilder";constructor($,Y){super($,"number","MySqlReal");this.config.precision=Y?.precision,this.config.scale=Y?.scale}build($){return new G31($,this.config)}}class G31 extends Z${static[z0]="MySqlReal";precision=this.config.precision;scale=this.config.scale;getSQLType(){if(this.precision!==void 0&&this.scale!==void 0)return`real(${this.precision}, ${this.scale})`;else if(this.precision===void 0)return"real";else return`real(${this.precision})`}}function bv($,Y={}){let{name:X,config:G}=S1($,Y);return new X31(X,G)}class J31 extends K${static[z0]="MySqlSerialBuilder";constructor($){super($,"number","MySqlSerial");this.config.hasDefault=!0,this.config.autoIncrement=!0}build($){return new Q31($,this.config)}}class Q31 extends Z${static[z0]="MySqlSerial";getSQLType(){return"serial"}mapFromDriverValue($){if(typeof $==="string")return Number($);return $}}function hv($){return new J31($??"")}class W31 extends K${static[z0]="MySqlSmallIntBuilder";constructor($,Y){super($,"number","MySqlSmallInt");this.config.unsigned=Y?Y.unsigned:!1}build($){return new K31($,this.config)}}class K31 extends Z${static[z0]="MySqlSmallInt";getSQLType(){return`smallint${this.config.unsigned?" unsigned":""}`}mapFromDriverValue($){if(typeof $==="string")return Number($);return $}}function fv($,Y){let{name:X,config:G}=S1($,Y);return new W31(X,G)}class gv extends c8{static[z0]="MySqlTextBuilder";constructor($,Y,X){super($,"string","MySqlText");this.config.textType=Y,this.config.enumValues=X.enum}build($){return new Z31($,this.config)}}class Z31 extends $8{static[z0]="MySqlText";textType=this.config.textType;enumValues=this.config.enumValues;getSQLType(){return this.textType}}function mv($,Y={}){let{name:X,config:G}=S1($,Y);return new gv(X,"text",G)}function U31($,Y={}){let{name:X,config:G}=S1($,Y);return new gv(X,"tinytext",G)}function H31($,Y={}){let{name:X,config:G}=S1($,Y);return new gv(X,"mediumtext",G)}function z31($,Y={}){let{name:X,config:G}=S1($,Y);return new gv(X,"longtext",G)}class V31 extends c8{static[z0]="MySqlTimeBuilder";constructor($,Y){super($,"string","MySqlTime");this.config.fsp=Y?.fsp}build($){return new F31($,this.config)}}class F31 extends $8{static[z0]="MySqlTime";fsp=this.config.fsp;getSQLType(){return`time${this.fsp===void 0?"":`(${this.fsp})`}`}}function uv($,Y){let{name:X,config:G}=S1($,Y);return new V31(X,G)}class dr extends c8{static[z0]="MySqlDateColumnBuilder";defaultNow(){return this.default(r`(now())`)}onUpdateNow(){return this.config.hasOnUpdateNow=!0,this.config.hasDefault=!0,this}}class cr extends $8{static[z0]="MySqlDateColumn";hasOnUpdateNow=this.config.hasOnUpdateNow}class L31 extends dr{static[z0]="MySqlTimestampBuilder";constructor($,Y){super($,"date","MySqlTimestamp");this.config.fsp=Y?.fsp}build($){return new D31($,this.config)}}class D31 extends cr{static[z0]="MySqlTimestamp";fsp=this.config.fsp;getSQLType(){return`timestamp${this.fsp===void 0?"":`(${this.fsp})`}`}mapFromDriverValue($){return new Date($+"+0000")}mapToDriverValue($){return $.toISOString().slice(0,-1).replace("T"," ")}}class N31 extends dr{static[z0]="MySqlTimestampStringBuilder";constructor($,Y){super($,"string","MySqlTimestampString");this.config.fsp=Y?.fsp}build($){return new A31($,this.config)}}class A31 extends cr{static[z0]="MySqlTimestampString";fsp=this.config.fsp;getSQLType(){return`timestamp${this.fsp===void 0?"":`(${this.fsp})`}`}}function pv($,Y={}){let{name:X,config:G}=S1($,Y);if(G?.mode==="string")return new N31(X,G);return new L31(X,G)}class B31 extends K${static[z0]="MySqlTinyIntBuilder";constructor($,Y){super($,"number","MySqlTinyInt");this.config.unsigned=Y?Y.unsigned:!1}build($){return new O31($,this.config)}}class O31 extends Z${static[z0]="MySqlTinyInt";getSQLType(){return`tinyint${this.config.unsigned?" unsigned":""}`}mapFromDriverValue($){if(typeof $==="string")return Number($);return $}}function dv($,Y){let{name:X,config:G}=S1($,Y);return new B31(X,G)}class E31 extends c8{static[z0]="MySqlVarBinaryBuilder";constructor($,Y){super($,"string","MySqlVarBinary");this.config.length=Y?.length}build($){return new M31($,this.config)}}class M31 extends $8{static[z0]="MySqlVarBinary";length=this.config.length;mapFromDriverValue($){if(typeof $==="string")return $;if(Buffer.isBuffer($))return $.toString();let Y=[];for(let X of $)Y.push(X===49?"1":"0");return Y.join("")}getSQLType(){return this.length===void 0?"varbinary":`varbinary(${this.length})`}}function cv($,Y){let{name:X,config:G}=S1($,Y);return new E31(X,G)}class R31 extends c8{static[z0]="MySqlVarCharBuilder";constructor($,Y){super($,"string","MySqlVarChar");this.config.length=Y.length,this.config.enum=Y.enum}build($){return new q31($,this.config)}}class q31 extends $8{static[z0]="MySqlVarChar";length=this.config.length;enumValues=this.config.enum;getSQLType(){return this.length===void 0?"varchar":`varchar(${this.length})`}}function lv($,Y){let{name:X,config:G}=S1($,Y);return new R31(X,G)}class P31 extends c8{static[z0]="MySqlYearBuilder";constructor($){super($,"number","MySqlYear")}build($){return new w31($,this.config)}}class w31 extends $8{static[z0]="MySqlYear";getSQLType(){return"year"}}function iv($){return new P31($??"")}function _31(){return{bigint:Pv,binary:wv,boolean:_v,char:jv,customType:_U1,date:Tv,datetime:Iv,decimal:Cv,double:Sv,mysqlEnum:nU1,float:kv,int:vv,json:xv,mediumint:yv,real:bv,serial:hv,smallint:fv,text:mv,time:uv,timestamp:pv,tinyint:dv,varbinary:cv,varchar:lv,year:iv,longtext:z31,mediumtext:H31,tinytext:U31}}var HH0=Symbol.for("drizzle:MySqlInlineForeignKeys");class _G extends r0{static[z0]="MySqlTable";static Symbol=Object.assign({},r0.Symbol,{InlineForeignKeys:HH0});[r0.Symbol.Columns];[HH0]=[];[r0.Symbol.ExtraConfigBuilder]=void 0}function Dh6($,Y,X,G,J=$){let Q=new _G($,G,J),W=typeof Y==="function"?Y(_31()):Y,K=Object.fromEntries(Object.entries(W).map(([H,z])=>{let V=z;V.setName(H);let F=V.build(Q);return Q[HH0].push(...V.buildForeignKeys(F,Q)),[H,F]})),Z=Object.assign(Q,K);if(Z[r0.Symbol.Columns]=K,Z[r0.Symbol.ExtraConfigColumns]=K,X)Z[_G.Symbol.ExtraConfigBuilder]=X;return Z}var sH=($,Y,X)=>{return Dh6($,Y,X,void 0,$)};function hK($){if(q0($,_G))return[`${$[r0.Symbol.BaseName]}`];if(q0($,W6))return $._.usedTables??[];if(q0($,t0))return $.usedTables??[];return[]}function xA($){return $.map((Y)=>{return typeof Y==="object"?Y.config.name:Y})}function yA($){return Array.isArray($)?$:[$]}class lr extends r6{constructor($,Y,X,G){super();this.table=$,this.session=Y,this.dialect=X,this.config={table:$,withList:G}}static[z0]="MySqlDelete";config;where($){return this.config.where=$,this}orderBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.table[r0.Symbol.Columns],new q4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),X=Array.isArray(Y)?Y:[Y];this.config.orderBy=X}else{let Y=$;this.config.orderBy=Y}return this}limit($){return this.config.limit=$,this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}prepare(){return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,void 0,void 0,void 0,{type:"delete",tables:hK(this.config.table)})}execute=($)=>{return this.prepare().execute($)};createIterator=()=>{let $=this;return async function*(Y){yield*$.prepare().iterator(Y)}};iterator=this.createIterator();$dynamic(){return this}}class nv extends Q${static[z0]="MySqlViewBase"}class bA{static[z0]="MySqlDialect";casing;constructor($){this.casing=new lN($?.casing)}async migrate($,Y,X){let G=X.migrationsTable??"__drizzle_migrations",J=r`
			create table if not exists ${r.identifier(G)} (
				id serial primary key,
				hash text not null,
				created_at bigint
			)
		`;await Y.execute(J);let W=(await Y.all(r`select id, hash, created_at from ${r.identifier(G)} order by created_at desc limit 1`))[0];await Y.transaction(async(K)=>{for(let Z of $)if(!W||Number(W.created_at)<Z.folderMillis){for(let H of Z.sql)await K.execute(r.raw(H));await K.execute(r`insert into ${r.identifier(G)} (\`hash\`, \`created_at\`) values(${Z.hash}, ${Z.folderMillis})`)}})}escapeName($){return`\`${$.replace(/`/g,"``")}\``}escapeParam($){return"?"}escapeString($){return`'${$.replace(/'/g,"''")}'`}buildWithCTE($){if(!$?.length)return;let Y=[r`with `];for(let[X,G]of $.entries())if(Y.push(r`${r.identifier(G._.alias)} as (${G._.sql})`),X<$.length-1)Y.push(r`, `);return Y.push(r` `),r.join(Y)}buildDeleteQuery({table:$,where:Y,returning:X,withList:G,limit:J,orderBy:Q}){let W=this.buildWithCTE(G),K=X?r` returning ${this.buildSelection(X,{isSingleTable:!0})}`:void 0,Z=Y?r` where ${Y}`:void 0,H=this.buildOrderBy(Q),z=this.buildLimit(J);return r`${W}delete from ${$}${Z}${H}${z}${K}`}buildUpdateSet($,Y){let X=$[r0.Symbol.Columns],G=Object.keys(X).filter((Q)=>Y[Q]!==void 0||X[Q]?.onUpdateFn!==void 0),J=G.length;return r.join(G.flatMap((Q,W)=>{let K=X[Q],Z=K.onUpdateFn?.(),H=Y[Q]??(q0(Z,t0)?Z:r.param(Z,K)),z=r`${r.identifier(this.casing.getColumnCasing(K))} = ${H}`;if(W<J-1)return[z,r.raw(", ")];return[z]}))}buildUpdateQuery({table:$,set:Y,where:X,returning:G,withList:J,limit:Q,orderBy:W}){let K=this.buildWithCTE(J),Z=this.buildUpdateSet($,Y),H=G?r` returning ${this.buildSelection(G,{isSingleTable:!0})}`:void 0,z=X?r` where ${X}`:void 0,V=this.buildOrderBy(W),F=this.buildLimit(Q);return r`${K}update ${$} set ${Z}${z}${V}${F}${H}`}buildSelection($,{isSingleTable:Y=!1}={}){let X=$.length,G=$.flatMap(({field:J},Q)=>{let W=[];if(q0(J,t0.Aliased)&&J.isSelectionField)W.push(r.identifier(J.fieldAlias));else if(q0(J,t0.Aliased)||q0(J,t0)){let K=q0(J,t0.Aliased)?J.sql:J;if(Y)W.push(new t0(K.queryChunks.map((Z)=>{if(q0(Z,$8))return r.identifier(this.casing.getColumnCasing(Z));return Z})));else W.push(K);if(q0(J,t0.Aliased))W.push(r` as ${r.identifier(J.fieldAlias)}`)}else if(q0(J,m4))if(Y)W.push(r.identifier(this.casing.getColumnCasing(J)));else W.push(J);else if(q0(J,W6)){let K=Object.entries(J._.selectedFields);if(K.length===1){let Z=K[0][1],H=q0(Z,t0)?Z.decoder:q0(Z,m4)?{mapFromDriverValue:(z)=>Z.mapFromDriverValue(z)}:Z.sql.decoder;if(H)J._.sql.decoder=H}W.push(J)}if(Q<X-1)W.push(r`, `);return W});return r.join(G)}buildLimit($){return typeof $==="object"||typeof $==="number"&&$>=0?r` limit ${$}`:void 0}buildOrderBy($){return $&&$.length>0?r` order by ${r.join($,r`, `)}`:void 0}buildIndex({indexes:$,indexFor:Y}){return $&&$.length>0?r` ${r.raw(Y)} INDEX (${r.raw($.join(", "))})`:void 0}buildSelectQuery({withList:$,fields:Y,fieldsFlat:X,where:G,having:J,table:Q,joins:W,orderBy:K,groupBy:Z,limit:H,offset:z,lockingClause:V,distinct:F,setOperators:L,useIndex:N,forceIndex:D,ignoreIndex:A}){let B=X??x5(Y);for(let b of B)if(q0(b.field,m4)&&J$(b.field.table)!==(q0(Q,W6)?Q._.alias:q0(Q,nv)?Q[y6].name:q0(Q,t0)?void 0:J$(Q))&&!((g)=>W?.some(({alias:p})=>p===(g[r0.Symbol.IsAlias]?J$(g):g[r0.Symbol.BaseName])))(b.field.table)){let g=J$(b.field.table);throw Error(`Your "${b.path.join("->")}" field references a column "${g}"."${b.field.name}", but the table "${g}" is not part of the query! Did you forget to join it?`)}let O=!W||W.length===0,E=this.buildWithCTE($),M=F?r` distinct`:void 0,R=this.buildSelection(B,{isSingleTable:O}),q=(()=>{if(q0(Q,r0)&&Q[r0.Symbol.IsAlias])return r`${r`${r.identifier(Q[r0.Symbol.Schema]??"")}.`.if(Q[r0.Symbol.Schema])}${r.identifier(Q[r0.Symbol.OriginalName])} ${r.identifier(Q[r0.Symbol.Name])}`;return Q})(),_=[];if(W)for(let[b,g]of W.entries()){if(b===0)_.push(r` `);let p=g.table,h=g.lateral?r` lateral`:void 0,n=g.on?r` on ${g.on}`:void 0;if(q0(p,_G)){let t=p[_G.Symbol.Name],s=p[_G.Symbol.Schema],K0=p[_G.Symbol.OriginalName],X0=t===K0?void 0:g.alias,a=this.buildIndex({indexes:g.useIndex,indexFor:"USE"}),Q0=this.buildIndex({indexes:g.forceIndex,indexFor:"FORCE"}),e=this.buildIndex({indexes:g.ignoreIndex,indexFor:"IGNORE"});_.push(r`${r.raw(g.joinType)} join${h} ${s?r`${r.identifier(s)}.`:void 0}${r.identifier(K0)}${a}${Q0}${e}${X0&&r` ${r.identifier(X0)}`}${n}`)}else if(q0(p,Q$)){let t=p[y6].name,s=p[y6].schema,K0=p[y6].originalName,X0=t===K0?void 0:g.alias;_.push(r`${r.raw(g.joinType)} join${h} ${s?r`${r.identifier(s)}.`:void 0}${r.identifier(K0)}${X0&&r` ${r.identifier(X0)}`}${n}`)}else _.push(r`${r.raw(g.joinType)} join${h} ${p}${n}`);if(b<W.length-1)_.push(r` `)}let P=r.join(_),w=G?r` where ${G}`:void 0,j=J?r` having ${J}`:void 0,C=this.buildOrderBy(K),k=Z&&Z.length>0?r` group by ${r.join(Z,r`, `)}`:void 0,S=this.buildLimit(H),I=z?r` offset ${z}`:void 0,v=this.buildIndex({indexes:N,indexFor:"USE"}),x=this.buildIndex({indexes:D,indexFor:"FORCE"}),y=this.buildIndex({indexes:A,indexFor:"IGNORE"}),d;if(V){let{config:b,strength:g}=V;if(d=r` for ${r.raw(g)}`,b.noWait)d.append(r` nowait`);else if(b.skipLocked)d.append(r` skip locked`)}let u=r`${E}select${M} ${R} from ${q}${v}${x}${y}${P}${w}${k}${j}${C}${S}${I}${d}`;if(L.length>0)return this.buildSetOperations(u,L);return u}buildSetOperations($,Y){let[X,...G]=Y;if(!X)throw Error("Cannot pass undefined values to any set operator");if(G.length===0)return this.buildSetOperationQuery({leftSelect:$,setOperator:X});return this.buildSetOperations(this.buildSetOperationQuery({leftSelect:$,setOperator:X}),G)}buildSetOperationQuery({leftSelect:$,setOperator:{type:Y,isAll:X,rightSelect:G,limit:J,orderBy:Q,offset:W}}){let K=r`(${$.getSQL()}) `,Z=r`(${G.getSQL()})`,H;if(Q&&Q.length>0){let L=[];for(let N of Q)if(q0(N,$8))L.push(r.identifier(this.casing.getColumnCasing(N)));else if(q0(N,t0)){for(let D=0;D<N.queryChunks.length;D++){let A=N.queryChunks[D];if(q0(A,$8))N.queryChunks[D]=r.identifier(this.casing.getColumnCasing(A))}L.push(r`${N}`)}else L.push(r`${N}`);H=r` order by ${r.join(L,r`, `)} `}let z=typeof J==="object"||typeof J==="number"&&J>=0?r` limit ${J}`:void 0,V=r.raw(`${Y} ${X?"all ":""}`),F=W?r` offset ${W}`:void 0;return r`${K}${V}${Z}${H}${z}${F}`}buildInsertQuery({table:$,values:Y,ignore:X,onConflict:G,select:J}){let Q=[],W=$[r0.Symbol.Columns],K=Object.entries(W).filter(([L,N])=>!N.shouldDisableInsert()),Z=K.map(([,L])=>r.identifier(this.casing.getColumnCasing(L))),H=[];if(J){let L=Y;if(q0(L,t0))Q.push(L);else Q.push(L.getSQL())}else{let L=Y;Q.push(r.raw("values "));for(let[N,D]of L.entries()){let A={},B=[];for(let[O,E]of K){let M=D[O];if(M===void 0||q0(M,d$)&&M.value===void 0)if(E.defaultFn!==void 0){let R=E.defaultFn();A[O]=R;let q=q0(R,t0)?R:r.param(R,E);B.push(q)}else if(!E.default&&E.onUpdateFn!==void 0){let R=E.onUpdateFn(),q=q0(R,t0)?R:r.param(R,E);B.push(q)}else B.push(r`default`);else{if(E.defaultFn&&q0(M,d$))A[O]=M.value;B.push(M)}}if(H.push(A),Q.push(B),N<L.length-1)Q.push(r`, `)}}let z=r.join(Q),V=X?r` ignore`:void 0,F=G?r` on duplicate key ${G}`:void 0;return{sql:r`insert${V} into ${$} ${Z} ${z}${F}`,generatedIds:H}}sqlToQuery($,Y){return $.toQuery({casing:this.casing,escapeName:this.escapeName,escapeParam:this.escapeParam,escapeString:this.escapeString,invokeSource:Y})}buildRelationalQuery({fullSchema:$,schema:Y,tableNamesMap:X,table:G,tableConfig:J,queryConfig:Q,tableAlias:W,nestedQueryRelation:K,joinOn:Z}){let H=[],z,V,F,L,N=[];if(Q===!0)H=Object.entries(J.columns).map(([B,O])=>({dbKey:O.name,tsKey:B,field:M8(O,W),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{let A=Object.fromEntries(Object.entries(J.columns).map(([q,_])=>[q,M8(_,W)]));if(Q.where){let q=typeof Q.where==="function"?Q.where(A,uN()):Q.where;L=q&&rQ(q,W)}let B=[],O=[];if(Q.columns){let q=!1;for(let[_,P]of Object.entries(Q.columns)){if(P===void 0)continue;if(_ in J.columns){if(!q&&P===!0)q=!0;O.push(_)}}if(O.length>0)O=q?O.filter((_)=>Q.columns?.[_]===!0):Object.keys(J.columns).filter((_)=>!O.includes(_))}else O=Object.keys(J.columns);for(let q of O){let _=J.columns[q];B.push({tsKey:q,value:_})}let E=[];if(Q.with)E=Object.entries(Q.with).filter((q)=>!!q[1]).map(([q,_])=>({tsKey:q,queryConfig:_,relation:J.relations[q]}));let M;if(Q.extras){M=typeof Q.extras==="function"?Q.extras(A,{sql:r}):Q.extras;for(let[q,_]of Object.entries(M))B.push({tsKey:q,value:nV(_,W)})}for(let{tsKey:q,value:_}of B)H.push({dbKey:q0(_,t0.Aliased)?_.fieldAlias:J.columns[q].name,tsKey:q,field:q0(_,m4)?M8(_,W):_,relationTableTsKey:void 0,isJson:!1,selection:[]});let R=typeof Q.orderBy==="function"?Q.orderBy(A,pN()):Q.orderBy??[];if(!Array.isArray(R))R=[R];F=R.map((q)=>{if(q0(q,m4))return M8(q,W);return rQ(q,W)}),z=Q.limit,V=Q.offset;for(let{tsKey:q,queryConfig:_,relation:P}of E){let w=dN(Y,X,P),j=G2(P.referencedTable),C=X[j],k=`${W}_${q}`,S=c$(...w.fields.map((x,y)=>_1(M8(w.references[y],k),M8(x,W)))),I=this.buildRelationalQuery({fullSchema:$,schema:Y,tableNamesMap:X,table:$[C],tableConfig:Y[C],queryConfig:q0(P,oQ)?_===!0?{limit:1}:{..._,limit:1}:_,tableAlias:k,joinOn:S,nestedQueryRelation:P}),v=r`${r.identifier(k)}.${r.identifier("data")}`.as(q);N.push({on:r`true`,table:new W6(I.sql,{},k),alias:k,joinType:"left",lateral:!0}),H.push({dbKey:q,tsKey:q,field:v,relationTableTsKey:C,isJson:!0,selection:I.selection})}}if(H.length===0)throw new aQ({message:`No fields selected for table "${J.tsName}" ("${W}")`});let D;if(L=c$(Z,L),K){let A=r`json_array(${r.join(H.map(({field:E,tsKey:M,isJson:R})=>R?r`${r.identifier(`${W}_${M}`)}.${r.identifier("data")}`:q0(E,t0.Aliased)?E.sql:E),r`, `)})`;if(q0(K,PK))A=r`coalesce(json_arrayagg(${A}), json_array())`;let B=[{dbKey:"data",tsKey:"data",field:A.as("data"),isJson:!0,relationTableTsKey:J.tsName,selection:H}];if(z!==void 0||V!==void 0||(F?.length??0)>0)D=this.buildSelectQuery({table:BG(G,W),fields:{},fieldsFlat:[{path:[],field:r.raw("*")},...(F?.length??0)>0?[{path:[],field:r`row_number() over (order by ${r.join(F,r`, `)})`}]:[]],where:L,limit:z,offset:V,setOperators:[]}),L=void 0,z=void 0,V=void 0,F=void 0;else D=BG(G,W);D=this.buildSelectQuery({table:q0(D,_G)?D:new W6(D,{},W),fields:{},fieldsFlat:B.map(({field:E})=>({path:[],field:q0(E,m4)?M8(E,W):E})),joins:N,where:L,limit:z,offset:V,orderBy:F,setOperators:[]})}else D=this.buildSelectQuery({table:BG(G,W),fields:{},fieldsFlat:H.map(({field:A})=>({path:[],field:q0(A,m4)?M8(A,W):A})),joins:N,where:L,limit:z,offset:V,orderBy:F,setOperators:[]});return{tableTsKey:J.tsName,sql:D,selection:H}}buildRelationalQueryWithoutLateralSubqueries({fullSchema:$,schema:Y,tableNamesMap:X,table:G,tableConfig:J,queryConfig:Q,tableAlias:W,nestedQueryRelation:K,joinOn:Z}){let H=[],z,V,F=[],L;if(Q===!0)H=Object.entries(J.columns).map(([A,B])=>({dbKey:B.name,tsKey:A,field:M8(B,W),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{let D=Object.fromEntries(Object.entries(J.columns).map(([R,q])=>[R,M8(q,W)]));if(Q.where){let R=typeof Q.where==="function"?Q.where(D,uN()):Q.where;L=R&&rQ(R,W)}let A=[],B=[];if(Q.columns){let R=!1;for(let[q,_]of Object.entries(Q.columns)){if(_===void 0)continue;if(q in J.columns){if(!R&&_===!0)R=!0;B.push(q)}}if(B.length>0)B=R?B.filter((q)=>Q.columns?.[q]===!0):Object.keys(J.columns).filter((q)=>!B.includes(q))}else B=Object.keys(J.columns);for(let R of B){let q=J.columns[R];A.push({tsKey:R,value:q})}let O=[];if(Q.with)O=Object.entries(Q.with).filter((R)=>!!R[1]).map(([R,q])=>({tsKey:R,queryConfig:q,relation:J.relations[R]}));let E;if(Q.extras){E=typeof Q.extras==="function"?Q.extras(D,{sql:r}):Q.extras;for(let[R,q]of Object.entries(E))A.push({tsKey:R,value:nV(q,W)})}for(let{tsKey:R,value:q}of A)H.push({dbKey:q0(q,t0.Aliased)?q.fieldAlias:J.columns[R].name,tsKey:R,field:q0(q,m4)?M8(q,W):q,relationTableTsKey:void 0,isJson:!1,selection:[]});let M=typeof Q.orderBy==="function"?Q.orderBy(D,pN()):Q.orderBy??[];if(!Array.isArray(M))M=[M];F=M.map((R)=>{if(q0(R,m4))return M8(R,W);return rQ(R,W)}),z=Q.limit,V=Q.offset;for(let{tsKey:R,queryConfig:q,relation:_}of O){let P=dN(Y,X,_),w=G2(_.referencedTable),j=X[w],C=`${W}_${R}`,k=c$(...P.fields.map((x,y)=>_1(M8(P.references[y],C),M8(x,W)))),S=this.buildRelationalQueryWithoutLateralSubqueries({fullSchema:$,schema:Y,tableNamesMap:X,table:$[j],tableConfig:Y[j],queryConfig:q0(_,oQ)?q===!0?{limit:1}:{...q,limit:1}:q,tableAlias:C,joinOn:k,nestedQueryRelation:_}),I=r`(${S.sql})`;if(q0(_,PK))I=r`coalesce(${I}, json_array())`;let v=I.as(R);H.push({dbKey:R,tsKey:R,field:v,relationTableTsKey:j,isJson:!0,selection:S.selection})}}if(H.length===0)throw new aQ({message:`No fields selected for table "${J.tsName}" ("${W}"). You need to have at least one item in "columns", "with" or "extras". If you need to select all columns, omit the "columns" key or set it to undefined.`});let N;if(L=c$(Z,L),K){let D=r`json_array(${r.join(H.map(({field:O})=>q0(O,$8)?r.identifier(this.casing.getColumnCasing(O)):q0(O,t0.Aliased)?O.sql:O),r`, `)})`;if(q0(K,PK))D=r`json_arrayagg(${D})`;let A=[{dbKey:"data",tsKey:"data",field:D,isJson:!0,relationTableTsKey:J.tsName,selection:H}];if(z!==void 0||V!==void 0||F.length>0)N=this.buildSelectQuery({table:BG(G,W),fields:{},fieldsFlat:[{path:[],field:r.raw("*")},...F.length>0?[{path:[],field:r`row_number() over (order by ${r.join(F,r`, `)})`}]:[]],where:L,limit:z,offset:V,setOperators:[]}),L=void 0,z=void 0,V=void 0,F=void 0;else N=BG(G,W);N=this.buildSelectQuery({table:q0(N,_G)?N:new W6(N,{},W),fields:{},fieldsFlat:A.map(({field:O})=>({path:[],field:q0(O,m4)?M8(O,W):O})),where:L,limit:z,offset:V,orderBy:F,setOperators:[]})}else N=this.buildSelectQuery({table:BG(G,W),fields:{},fieldsFlat:H.map(({field:D})=>({path:[],field:q0(D,m4)?M8(D,W):D})),where:L,limit:z,offset:V,orderBy:F,setOperators:[]});return{tableTsKey:J.tsName,sql:N,selection:H}}}class fK{static[z0]="MySqlSelectBuilder";fields;session;dialect;withList=[];distinct;constructor($){if(this.fields=$.fields,this.session=$.session,this.dialect=$.dialect,$.withList)this.withList=$.withList;this.distinct=$.distinct}from($,Y){let X=!!this.fields,G;if(this.fields)G=this.fields;else if(q0($,W6))G=Object.fromEntries(Object.keys($._.selectedFields).map((K)=>[K,$[K]]));else if(q0($,nv))G=$[y6].selectedFields;else if(q0($,t0))G={};else G=IH($);let J=[],Q=[],W=[];if(q0($,_G)&&Y&&typeof Y!=="string"){if(Y.useIndex)J=xA(yA(Y.useIndex));if(Y.forceIndex)Q=xA(yA(Y.forceIndex));if(Y.ignoreIndex)W=xA(yA(Y.ignoreIndex))}return new zH0({table:$,fields:G,isPartialSelect:X,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct,useIndex:J,forceIndex:Q,ignoreIndex:W})}}class j31 extends nN{static[z0]="MySqlSelectQueryBuilder";_;config;joinsNotNullableMap;tableName;isPartialSelect;session;dialect;cacheConfig=void 0;usedTables=new Set;constructor({table:$,fields:Y,isPartialSelect:X,session:G,dialect:J,withList:Q,distinct:W,useIndex:K,forceIndex:Z,ignoreIndex:H}){super();this.config={withList:Q,table:$,fields:{...Y},distinct:W,setOperators:[],useIndex:K,forceIndex:Z,ignoreIndex:H},this.isPartialSelect=X,this.session=G,this.dialect=J,this._={selectedFields:Y,config:this.config},this.tableName=GX($),this.joinsNotNullableMap=typeof this.tableName==="string"?{[this.tableName]:!0}:{};for(let z of hK($))this.usedTables.add(z)}getUsedTables(){return[...this.usedTables]}createJoin($,Y){return(X,G,J)=>{let Q=$==="cross",W=Q?void 0:G,K=Q?G:J,Z=this.tableName,H=GX(X);for(let L of hK(X))this.usedTables.add(L);if(typeof H==="string"&&this.config.joins?.some((L)=>L.alias===H))throw Error(`Alias "${H}" is already used in this query`);if(!this.isPartialSelect){if(Object.keys(this.joinsNotNullableMap).length===1&&typeof Z==="string")this.config.fields={[Z]:this.config.fields};if(typeof H==="string"&&!q0(X,t0)){let L=q0(X,W6)?X._.selectedFields:q0(X,Q$)?X[y6].selectedFields:X[r0.Symbol.Columns];this.config.fields[H]=L}}if(typeof W==="function")W=W(new Proxy(this.config.fields,new q4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));if(!this.config.joins)this.config.joins=[];let z=[],V=[],F=[];if(q0(X,_G)&&K&&typeof K!=="string"){if(K.useIndex)z=xA(yA(K.useIndex));if(K.forceIndex)V=xA(yA(K.forceIndex));if(K.ignoreIndex)F=xA(yA(K.ignoreIndex))}if(this.config.joins.push({on:W,table:X,joinType:$,alias:H,useIndex:z,forceIndex:V,ignoreIndex:F,lateral:Y}),typeof H==="string")switch($){case"left":{this.joinsNotNullableMap[H]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([L])=>[L,!1])),this.joinsNotNullableMap[H]=!0;break}case"cross":case"inner":{this.joinsNotNullableMap[H]=!0;break}}return this}}leftJoin=this.createJoin("left",!1);leftJoinLateral=this.createJoin("left",!0);rightJoin=this.createJoin("right",!1);innerJoin=this.createJoin("inner",!1);innerJoinLateral=this.createJoin("inner",!0);crossJoin=this.createJoin("cross",!1);crossJoinLateral=this.createJoin("cross",!0);createSetOperator($,Y){return(X)=>{let G=typeof X==="function"?X(Nh6()):X;if(!OG(this.getSelectedFields(),G.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return this.config.setOperators.push({type:$,isAll:Y,rightSelect:G}),this}}union=this.createSetOperator("union",!1);unionAll=this.createSetOperator("union",!0);intersect=this.createSetOperator("intersect",!1);intersectAll=this.createSetOperator("intersect",!0);except=this.createSetOperator("except",!1);exceptAll=this.createSetOperator("except",!0);addSetOperators($){return this.config.setOperators.push(...$),this}where($){if(typeof $==="function")$=$(new Proxy(this.config.fields,new q4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));return this.config.where=$,this}having($){if(typeof $==="function")$=$(new Proxy(this.config.fields,new q4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));return this.config.having=$,this}groupBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.fields,new q4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(Y)?Y:[Y]}else this.config.groupBy=$;return this}orderBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.fields,new q4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),X=Array.isArray(Y)?Y:[Y];if(this.config.setOperators.length>0)this.config.setOperators.at(-1).orderBy=X;else this.config.orderBy=X}else{let Y=$;if(this.config.setOperators.length>0)this.config.setOperators.at(-1).orderBy=Y;else this.config.orderBy=Y}return this}limit($){if(this.config.setOperators.length>0)this.config.setOperators.at(-1).limit=$;else this.config.limit=$;return this}offset($){if(this.config.setOperators.length>0)this.config.setOperators.at(-1).offset=$;else this.config.offset=$;return this}for($,Y={}){return this.config.lockingClause={strength:$,config:Y},this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}as($){let Y=[];if(Y.push(...hK(this.config.table)),this.config.joins)for(let X of this.config.joins)Y.push(...hK(X.table));return new Proxy(new W6(this.getSQL(),this.config.fields,$,!1,[...new Set(Y)]),new q4({alias:$,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new q4({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}$dynamic(){return this}$withCache($){return this.cacheConfig=$===void 0?{config:{},enable:!0,autoInvalidate:!0}:$===!1?{enable:!1}:{enable:!0,autoInvalidate:!0,...$},this}}class zH0 extends j31{static[z0]="MySqlSelect";prepare(){if(!this.session)throw Error("Cannot execute a query on a query builder. Please use a database instance instead.");let $=x5(this.config.fields),Y=this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),$,void 0,void 0,void 0,{type:"select",tables:[...this.usedTables]},this.cacheConfig);return Y.joinsNotNullableMap=this.joinsNotNullableMap,Y}execute=($)=>{return this.prepare().execute($)};createIterator=()=>{let $=this;return async function*(Y){yield*$.prepare().iterator(Y)}};iterator=this.createIterator()}SR(zH0,[r6]);function xq($,Y){return(X,G,...J)=>{let Q=[G,...J].map((W)=>({type:$,isAll:Y,rightSelect:W}));for(let W of Q)if(!OG(X.getSelectedFields(),W.rightSelect.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return X.addSetOperators(Q)}}var Nh6=()=>({union:Ah6,unionAll:Bh6,intersect:Oh6,intersectAll:Eh6,except:Mh6,exceptAll:Rh6}),Ah6=xq("union",!1),Bh6=xq("union",!0),Oh6=xq("intersect",!1),Eh6=xq("intersect",!0),Mh6=xq("except",!1),Rh6=xq("except",!0);class rv{static[z0]="MySqlQueryBuilder";dialect;dialectConfig;constructor($){this.dialect=q0($,bA)?$:void 0,this.dialectConfig=q0($,bA)?void 0:$}$with=($,Y)=>{let X=this;return{as:(J)=>{if(typeof J==="function")J=J(X);return new Proxy(new nQ(J.getSQL(),Y??("getSelectedFields"in J?J.getSelectedFields()??{}:{}),$,!0),new q4({alias:$,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}};with(...$){let Y=this;function X(J){return new fK({fields:J??void 0,session:void 0,dialect:Y.getDialect(),withList:$})}function G(J){return new fK({fields:J??void 0,session:void 0,dialect:Y.getDialect(),withList:$,distinct:!0})}return{select:X,selectDistinct:G}}select($){return new fK({fields:$??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct($){return new fK({fields:$??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}getDialect(){if(!this.dialect)this.dialect=new bA(this.dialectConfig);return this.dialect}}class FH0{constructor($,Y,X){this.table=$,this.session=Y,this.dialect=X}static[z0]="MySqlInsertBuilder";shouldIgnore=!1;ignore(){return this.shouldIgnore=!0,this}values($){if($=Array.isArray($)?$:[$],$.length===0)throw Error("values() must be called with at least one value");let Y=$.map((X)=>{let G={},J=this.table[r0.Symbol.Columns];for(let Q of Object.keys(X)){let W=X[Q];G[Q]=q0(W,t0)?W:new d$(W,J[Q])}return G});return new VH0(this.table,Y,this.shouldIgnore,this.session,this.dialect)}select($){let Y=typeof $==="function"?$(new rv):$;if(!q0(Y,t0)&&!OG(this.table[lV],Y._.selectedFields))throw Error("Insert select error: selected fields are not the same or are in a different order compared to the table definition");return new VH0(this.table,Y,this.shouldIgnore,this.session,this.dialect,!0)}}class VH0 extends r6{constructor($,Y,X,G,J,Q){super();this.session=G,this.dialect=J,this.config={table:$,values:Y,select:Q,ignore:X}}static[z0]="MySqlInsert";config;cacheConfig;onDuplicateKeyUpdate($){let Y=this.dialect.buildUpdateSet(this.config.table,J2(this.config.table,$.set));return this.config.onConflict=r`update ${Y}`,this}$returningId(){let $=[];for(let[Y,X]of Object.entries(this.config.table[r0.Symbol.Columns]))if(X.primary)$.push({field:X,path:[Y]});return this.config.returning=$,this}getSQL(){return this.dialect.buildInsertQuery(this.config).sql}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}prepare(){let{sql:$,generatedIds:Y}=this.dialect.buildInsertQuery(this.config);return this.session.prepareQuery(this.dialect.sqlToQuery($),void 0,void 0,Y,this.config.returning,{type:"insert",tables:hK(this.config.table)},this.cacheConfig)}execute=($)=>{return this.prepare().execute($)};createIterator=()=>{let $=this;return async function*(Y){yield*$.prepare().iterator(Y)}};iterator=this.createIterator();$dynamic(){return this}}class ir{constructor($,Y,X,G){this.table=$,this.session=Y,this.dialect=X,this.withList=G}static[z0]="MySqlUpdateBuilder";set($){return new T31(this.table,J2(this.table,$),this.session,this.dialect,this.withList)}}class T31 extends r6{constructor($,Y,X,G,J){super();this.session=X,this.dialect=G,this.config={set:Y,table:$,withList:J}}static[z0]="MySqlUpdate";config;cacheConfig;where($){return this.config.where=$,this}orderBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.table[r0.Symbol.Columns],new q4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),X=Array.isArray(Y)?Y:[Y];this.config.orderBy=X}else{let Y=$;this.config.orderBy=Y}return this}limit($){return this.config.limit=$,this}getSQL(){return this.dialect.buildUpdateQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}prepare(){return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),void 0,void 0,void 0,this.config.returning,{type:"insert",tables:hK(this.config.table)},this.cacheConfig)}execute=($)=>{return this.prepare().execute($)};createIterator=()=>{let $=this;return async function*(Y){yield*$.prepare().iterator(Y)}};iterator=this.createIterator();$dynamic(){return this}}class DH0{constructor($,Y,X,G,J,Q,W,K){this.fullSchema=$,this.schema=Y,this.tableNamesMap=X,this.table=G,this.tableConfig=J,this.dialect=Q,this.session=W,this.mode=K}static[z0]="MySqlRelationalQueryBuilder";findMany($){return new LH0(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,$?$:{},"many",this.mode)}findFirst($){return new LH0(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,$?{...$,limit:1}:{limit:1},"first",this.mode)}}class LH0 extends r6{constructor($,Y,X,G,J,Q,W,K,Z,H){super();this.fullSchema=$,this.schema=Y,this.tableNamesMap=X,this.table=G,this.tableConfig=J,this.dialect=Q,this.session=W,this.config=K,this.queryMode=Z,this.mode=H}static[z0]="MySqlRelationalQuery";prepare(){let{query:$,builtQuery:Y}=this._toSQL();return this.session.prepareQuery(Y,void 0,(X)=>{let G=X.map((J)=>sV(this.schema,this.tableConfig,J,$.selection));if(this.queryMode==="first")return G[0];return G})}_getQuery(){return this.mode==="planetscale"?this.dialect.buildRelationalQueryWithoutLateralSubqueries({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName}):this.dialect.buildRelationalQuery({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName})}_toSQL(){let $=this._getQuery();return{builtQuery:this.dialect.sqlToQuery($.sql),query:$}}getSQL(){return this._getQuery().sql}toSQL(){return this._toSQL().builtQuery}execute(){return this.prepare().execute()}}class av{constructor($,Y,X,G){if(this.dialect=$,this.session=Y,this.mode=G,this._=X?{schema:X.schema,fullSchema:X.fullSchema,tableNamesMap:X.tableNamesMap}:{schema:void 0,fullSchema:{},tableNamesMap:{}},this.query={},this._.schema)for(let[J,Q]of Object.entries(this._.schema))this.query[J]=new DH0(X.fullSchema,this._.schema,this._.tableNamesMap,X.fullSchema[J],Q,$,Y,this.mode);this.$cache={invalidate:async(J)=>{}}}static[z0]="MySqlDatabase";query;$with=($,Y)=>{let X=this;return{as:(J)=>{if(typeof J==="function")J=J(new rv(X.dialect));return new Proxy(new nQ(J.getSQL(),Y??("getSelectedFields"in J?J.getSelectedFields()??{}:{}),$,!0),new q4({alias:$,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}};$count($,Y){return new qv({source:$,filters:Y,session:this.session})}$cache;with(...$){let Y=this;function X(W){return new fK({fields:W??void 0,session:Y.session,dialect:Y.dialect,withList:$})}function G(W){return new fK({fields:W??void 0,session:Y.session,dialect:Y.dialect,withList:$,distinct:!0})}function J(W){return new ir(W,Y.session,Y.dialect,$)}function Q(W){return new lr(W,Y.session,Y.dialect,$)}return{select:X,selectDistinct:G,update:J,delete:Q}}select($){return new fK({fields:$??void 0,session:this.session,dialect:this.dialect})}selectDistinct($){return new fK({fields:$??void 0,session:this.session,dialect:this.dialect,distinct:!0})}update($){return new ir($,this.session,this.dialect)}insert($){return new FH0($,this.session,this.dialect)}delete($){return new lr($,this.session,this.dialect)}execute($){return this.session.execute(typeof $==="string"?r.raw($):$.getSQL())}transaction($,Y){return this.session.transaction($,Y)}}import{once as I31}from"events";class NH0{constructor($,Y,X){if(this.cache=$,this.queryMetadata=Y,this.cacheConfig=X,$&&$.strategy()==="all"&&X===void 0)this.cacheConfig={enable:!0,autoInvalidate:!0};if(!this.cacheConfig?.enable)this.cacheConfig=void 0}static[z0]="MySqlPreparedQuery";async queryWithCache($,Y,X){if(this.cache===void 0||q0(this.cache,jK)||this.queryMetadata===void 0)try{return await X()}catch(G){throw new M$($,Y,G)}if(this.cacheConfig&&!this.cacheConfig.enable)try{return await X()}catch(G){throw new M$($,Y,G)}if((this.queryMetadata.type==="insert"||this.queryMetadata.type==="update"||this.queryMetadata.type==="delete")&&this.queryMetadata.tables.length>0)try{let[G]=await Promise.all([X(),this.cache.onMutate({tables:this.queryMetadata.tables})]);return G}catch(G){throw new M$($,Y,G)}if(!this.cacheConfig)try{return await X()}catch(G){throw new M$($,Y,G)}if(this.queryMetadata.type==="select"){let G=await this.cache.get(this.cacheConfig.tag??await kH($,Y),this.queryMetadata.tables,this.cacheConfig.tag!==void 0,this.cacheConfig.autoInvalidate);if(G===void 0){let J;try{J=await X()}catch(Q){throw new M$($,Y,Q)}return await this.cache.put(this.cacheConfig.tag??await kH($,Y),J,this.cacheConfig.autoInvalidate?this.queryMetadata.tables:[],this.cacheConfig.tag!==void 0,this.cacheConfig.config),J}return G}try{return await X()}catch(G){throw new M$($,Y,G)}}joinsNotNullableMap}class AH0{constructor($){this.dialect=$}static[z0]="MySqlSession";execute($){return this.prepareQuery(this.dialect.sqlToQuery($),void 0).execute()}async count($){let Y=await this.execute($);return Number(Y[0][0].count)}getSetTransactionSQL($){let Y=[];if($.isolationLevel)Y.push(`isolation level ${$.isolationLevel}`);return Y.length?r`set transaction ${r.raw(Y.join(" "))}`:void 0}getStartTransactionSQL($){let Y=[];if($.withConsistentSnapshot)Y.push("with consistent snapshot");if($.accessMode)Y.push($.accessMode);return Y.length?r`start transaction ${r.raw(Y.join(" "))}`:void 0}}class BH0 extends av{constructor($,Y,X,G,J){super($,Y,X,J);this.schema=X,this.nestedIndex=G}static[z0]="MySqlTransaction";rollback(){throw new hN}}class C31 extends NH0{constructor($,Y,X,G,J,Q,W,K,Z,H,z){super(J,Q,W);this.client=$,this.params=X,this.logger=G,this.fields=K,this.customResultMapper=Z,this.generatedIds=H,this.returningIds=z,this.rawQuery={sql:Y,typeCast:function(V,F){if(V.type==="TIMESTAMP"||V.type==="DATETIME"||V.type==="DATE")return V.string();return F()}},this.query={sql:Y,rowsAsArray:!0,typeCast:function(V,F){if(V.type==="TIMESTAMP"||V.type==="DATETIME"||V.type==="DATE")return V.string();return F()}}}static[z0]="MySql2PreparedQuery";rawQuery;query;async execute($={}){let Y=qK(this.params,$);this.logger.logQuery(this.rawQuery.sql,Y);let{fields:X,client:G,rawQuery:J,query:Q,joinsNotNullableMap:W,customResultMapper:K,returningIds:Z,generatedIds:H}=this;if(!X&&!K){let F=await this.queryWithCache(J.sql,Y,async()=>{return await G.query(J,Y)}),L=F[0].insertId,N=F[0].affectedRows;if(Z){let D=[],A=0;for(let B=L;B<L+N;B++){for(let O of Z){let E=Z[0].path[0];if(q0(O.field,m4)){if(O.field.primary&&O.field.autoIncrement)D.push({[E]:B});if(O.field.defaultFn&&H)D.push({[E]:H[A][E]})}}A++}return D}return F}let V=(await this.queryWithCache(Q.sql,Y,async()=>{return await G.query(Q,Y)}))[0];if(K)return K(V);return V.map((F)=>rV(X,F,W))}async*iterator($={}){let Y=qK(this.params,$),X=(nr(this.client)?await this.client.getConnection():this.client).connection,{fields:G,query:J,rawQuery:Q,joinsNotNullableMap:W,client:K,customResultMapper:Z}=this,H=Boolean(G||Z),V=(H?X.query(J,Y):X.query(Q,Y)).stream();function F(){V.pause()}V.on("data",F);try{let L=I31(V,"end"),N=I31(V,"error");while(!0){V.resume();let D=await Promise.race([L,N,new Promise((A)=>V.once("data",A))]);if(D===void 0||Array.isArray(D)&&D.length===0)break;else if(D instanceof Error)throw D;else if(H)if(Z){let A=Z([D]);yield Array.isArray(A)?A[0]:A}else yield rV(G,D,W);else yield D}}finally{if(V.off("data",F),nr(K))X.end()}}}class rr extends AH0{constructor($,Y,X,G){super(Y);this.client=$,this.schema=X,this.options=G,this.logger=G.logger??new gN,this.cache=G.cache??new jK,this.mode=G.mode}static[z0]="MySql2Session";logger;mode;cache;prepareQuery($,Y,X,G,J,Q,W){return new C31(this.client,$.sql,$.params,this.logger,this.cache,Q,W,Y,X,G,J)}async query($,Y){return this.logger.logQuery($,Y),await this.client.query({sql:$,values:Y,rowsAsArray:!0,typeCast:function(G,J){if(G.type==="TIMESTAMP"||G.type==="DATETIME"||G.type==="DATE")return G.string();return J()}})}all($){let Y=this.dialect.sqlToQuery($);return this.logger.logQuery(Y.sql,Y.params),this.client.execute(Y.sql,Y.params).then((X)=>X[0])}async transaction($,Y){let X=nr(this.client)?new rr(await this.client.getConnection(),this.dialect,this.schema,this.options):this,G=new OH0(this.dialect,X,this.schema,0,this.mode);if(Y){let J=this.getSetTransactionSQL(Y);if(J)await G.execute(J);let Q=this.getStartTransactionSQL(Y);await(Q?G.execute(Q):G.execute(r`begin`))}else await G.execute(r`begin`);try{let J=await $(G);return await G.execute(r`commit`),J}catch(J){throw await G.execute(r`rollback`),J}finally{if(nr(this.client))X.client.release()}}}class OH0 extends BH0{static[z0]="MySql2Transaction";async transaction($){let Y=`sp${this.nestedIndex+1}`,X=new OH0(this.dialect,this.session,this.schema,this.nestedIndex+1,this.mode);await X.execute(r.raw(`savepoint ${Y}`));try{let G=await $(X);return await X.execute(r.raw(`release savepoint ${Y}`)),G}catch(G){throw await X.execute(r.raw(`rollback to savepoint ${Y}`)),G}}}function nr($){return"getConnection"in $}class S31{constructor($,Y,X={}){this.client=$,this.dialect=Y,this.options=X}static[z0]="MySql2Driver";createSession($,Y){return new rr(this.client,this.dialect,$,{logger:this.options.logger,mode:Y,cache:this.options.cache})}}class k31 extends av{static[z0]="MySql2Database"}function sv($,Y={}){let X=new bA({casing:Y.casing}),G;if(Y.logger===!0)G=new fN;else if(Y.logger!==!1)G=Y.logger;let J=qh6($)?$.promise():$,Q;if(Y.schema){if(Y.mode===void 0)throw new aQ({message:'You need to specify "mode": "planetscale" or "default" when providing a schema. Read more: https://orm.drizzle.team/docs/rqb#modes'});let z=vR(Y.schema,xR);Q={fullSchema:Y.schema,schema:z.tables,tableNamesMap:z.tableNamesMap}}let W=Y.mode??"default",Z=new S31(J,X,{logger:G,cache:Y.cache}).createSession(Q,W),H=new k31(X,Z,Q,W);if(H.$client=$,H.$cache=Y.cache,H.$cache)H.$cache.invalidate=Y.cache?.onMutate;return H}function qh6($){return typeof $.promise==="function"}function ov(...$){if(typeof $[0]==="string"){let Y=$[0],X=ar.createPool({uri:Y});return sv(X,$[1])}if(kR($[0])){let{connection:Y,client:X,...G}=$[0];if(X)return sv(X,G);let J=typeof Y==="string"?ar.createPool({uri:Y,supportBigNumbers:!0}):ar.createPool(Y);return sv(J,G)}return sv($[0],$[1])}(($)=>{function Y(X){return sv({},X)}$.mock=Y})(ov||(ov={}));ON();var MH0=U6(Mv(),1);var E2=B6("sys_database_source",{id:g0("id"),name:g0("name"),code:g0("code"),host:g0("host"),user:g0("user"),password:g0("password"),databaseName:g0("databaseName"),port:m1("port"),connectionLimit:m1("connectionLimit"),createdAt:m1("createdAt"),updatedAt:m1("updatedAt"),latest_visitAt:m1("latest_visitAt"),createBy:g0("createBy"),updateBy:g0("updateBy"),env_id:g0("env_id")});async function wF($){return await e0.select().from(E2).where(_1(E2.code,$))}function EH0($){let Y=r.raw("1 = 1");if($.code&&$.code.length>0)Y.append(r.raw(` and code like '%${$.code}%'`));if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or code like '%${$.searchVal}%')`));return Y}async function v31($){return await e0.select().from(E2).where(EH0($)).limit(Number($.limit)).offset(Number($.offset))}async function sr($){return await e0.select().from(E2).where(EH0($))}async function x31($){return await e0.$count(E2,EH0($))}async function y31($){let Y=await e0.$count(E2,_1(E2.code,$.code));if(Y&&Y>0)Ph6($);else{let X=Date.now();$.id=C6(),$.code=C6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await e0.insert(E2).values($)}}async function Ph6($){let Y=Date.now();$.updateBy="admin",$.latest_visitAt=Y,$.updatedAt=Y,await e0.update(E2).set($).where(_1(E2.code,$.code))}async function b31($){await e0.delete(E2).where(_1(E2.code,$))}var wh6={max:500,maxSize:1000,sizeCalculation:($,Y)=>{return 1},dispose:($,Y)=>{},ttl:21600000,allowStale:!1,updateAgeOnGet:!1,updateAgeOnHas:!1,fetchMethod:async($,Y,{options:X,signal:G,context:J})=>{}},or=new eW(wh6);async function _h6($){let Y=$.code;if(!$.host)throw Error("host\u4E0D\u80FD\u4E3A\u7A7A");if(!$.user)throw Error("user\u4E0D\u80FD\u4E3A\u7A7A");if(!$.database)throw Error("database\u4E0D\u80FD\u4E3A\u7A7A");if(!$.password)throw Error("password\u4E0D\u80FD\u4E3A\u7A7A");if(!$.port)throw Error("\u7AEF\u53E3\u4E0D\u80FD\u4E3A\u7A7A");$.connectionLimit=20,delete $.code;let X=MH0.default.createPool($);or.set(Y,X)}async function jh6($){let Y=await wF($);if(Y&&Y[0]&&Y.length>0){let X={};i1(X,"host",Y[0].host),i1(X,"user",Y[0].user),i1(X,"password",Y[0].password),i1(X,"database",Y[0].databaseName),i1(X,"port",Y[0].port),i1(X,"code",Y[0].code),await _h6(X)}else throw Error(`code:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}async function uX($){if($&&or.has($)){let Y=or.get($);return ov(Y)}else if($){await jh6($);let Y=or.get($);return ov(Y)}else throw Error(`code:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}async function h31($){let Y=await MH0.default.createConnection($),[X,G]=await Y.query("SELECT 1 AS res FROM DUAL");return X}var ev=new _4;ev.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};q6(Y,$.req.query());let X=await v31(Y),G=await x31(Y),J=$1();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});ev.post("/save",async($)=>{try{let Y=await $.req.json(),X={};q6(X,Y),await y31(X);let G=$1();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});ev.post("/test",async($)=>{try{let Y=await $.req.json(),X=FA(Y,["host","user","password","database","port"]),G=await h31(X),J=$1();return J.data=G,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u8FDE\u63A5\u5931\u8D25"})}});ev.post("/delete",async($)=>{try{let Y=await $.req.json();await b31(Y.code);let X=$1();return $.json(X)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var f31=ev;Hx();var Qz0=Symbol.for("drizzle:PgViewConfig");class TF extends Q${static[z0]="PgViewBase"}class mA{static[z0]="PgDialect";casing;constructor($){this.casing=new lN($?.casing)}async migrate($,Y,X){let G=typeof X==="string"?"__drizzle_migrations":X.migrationsTable??"__drizzle_migrations",J=typeof X==="string"?"drizzle":X.migrationsSchema??"drizzle",Q=r`
			CREATE TABLE IF NOT EXISTS ${r.identifier(J)}.${r.identifier(G)} (
				id SERIAL PRIMARY KEY,
				hash text NOT NULL,
				created_at bigint
			)
		`;await Y.execute(r`CREATE SCHEMA IF NOT EXISTS ${r.identifier(J)}`),await Y.execute(Q);let K=(await Y.all(r`select id, hash, created_at from ${r.identifier(J)}.${r.identifier(G)} order by created_at desc limit 1`))[0];await Y.transaction(async(Z)=>{for await(let H of $)if(!K||Number(K.created_at)<H.folderMillis){for(let z of H.sql)await Z.execute(r.raw(z));await Z.execute(r`insert into ${r.identifier(J)}.${r.identifier(G)} ("hash", "created_at") values(${H.hash}, ${H.folderMillis})`)}})}escapeName($){return`"${$.replace(/"/g,'""')}"`}escapeParam($){return`$${$+1}`}escapeString($){return`'${$.replace(/'/g,"''")}'`}buildWithCTE($){if(!$?.length)return;let Y=[r`with `];for(let[X,G]of $.entries())if(Y.push(r`${r.identifier(G._.alias)} as (${G._.sql})`),X<$.length-1)Y.push(r`, `);return Y.push(r` `),r.join(Y)}buildDeleteQuery({table:$,where:Y,returning:X,withList:G}){let J=this.buildWithCTE(G),Q=X?r` returning ${this.buildSelection(X,{isSingleTable:!0})}`:void 0,W=Y?r` where ${Y}`:void 0;return r`${J}delete from ${$}${W}${Q}`}buildUpdateSet($,Y){let X=$[r0.Symbol.Columns],G=Object.keys(X).filter((Q)=>Y[Q]!==void 0||X[Q]?.onUpdateFn!==void 0),J=G.length;return r.join(G.flatMap((Q,W)=>{let K=X[Q],Z=K.onUpdateFn?.(),H=Y[Q]??(q0(Z,t0)?Z:r.param(Z,K)),z=r`${r.identifier(this.casing.getColumnCasing(K))} = ${H}`;if(W<J-1)return[z,r.raw(", ")];return[z]}))}buildUpdateQuery({table:$,set:Y,where:X,returning:G,withList:J,from:Q,joins:W}){let K=this.buildWithCTE(J),Z=$[YY.Symbol.Name],H=$[YY.Symbol.Schema],z=$[YY.Symbol.OriginalName],V=Z===z?void 0:Z,F=r`${H?r`${r.identifier(H)}.`:void 0}${r.identifier(z)}${V&&r` ${r.identifier(V)}`}`,L=this.buildUpdateSet($,Y),N=Q&&r.join([r.raw(" from "),this.buildFromTable(Q)]),D=this.buildJoins(W),A=G?r` returning ${this.buildSelection(G,{isSingleTable:!Q})}`:void 0,B=X?r` where ${X}`:void 0;return r`${K}update ${F} set ${L}${N}${D}${B}${A}`}buildSelection($,{isSingleTable:Y=!1}={}){let X=$.length,G=$.flatMap(({field:J},Q)=>{let W=[];if(q0(J,t0.Aliased)&&J.isSelectionField)W.push(r.identifier(J.fieldAlias));else if(q0(J,t0.Aliased)||q0(J,t0)){let K=q0(J,t0.Aliased)?J.sql:J;if(Y)W.push(new t0(K.queryChunks.map((Z)=>{if(q0(Z,g1))return r.identifier(this.casing.getColumnCasing(Z));return Z})));else W.push(K);if(q0(J,t0.Aliased))W.push(r` as ${r.identifier(J.fieldAlias)}`)}else if(q0(J,m4))if(Y)W.push(r.identifier(this.casing.getColumnCasing(J)));else W.push(J);else if(q0(J,W6)){let K=Object.entries(J._.selectedFields);if(K.length===1){let Z=K[0][1],H=q0(Z,t0)?Z.decoder:q0(Z,m4)?{mapFromDriverValue:(z)=>Z.mapFromDriverValue(z)}:Z.sql.decoder;if(H)J._.sql.decoder=H}W.push(J)}if(Q<X-1)W.push(r`, `);return W});return r.join(G)}buildJoins($){if(!$||$.length===0)return;let Y=[];for(let[X,G]of $.entries()){if(X===0)Y.push(r` `);let J=G.table,Q=G.lateral?r` lateral`:void 0,W=G.on?r` on ${G.on}`:void 0;if(q0(J,YY)){let K=J[YY.Symbol.Name],Z=J[YY.Symbol.Schema],H=J[YY.Symbol.OriginalName],z=K===H?void 0:G.alias;Y.push(r`${r.raw(G.joinType)} join${Q} ${Z?r`${r.identifier(Z)}.`:void 0}${r.identifier(H)}${z&&r` ${r.identifier(z)}`}${W}`)}else if(q0(J,Q$)){let K=J[y6].name,Z=J[y6].schema,H=J[y6].originalName,z=K===H?void 0:G.alias;Y.push(r`${r.raw(G.joinType)} join${Q} ${Z?r`${r.identifier(Z)}.`:void 0}${r.identifier(H)}${z&&r` ${r.identifier(z)}`}${W}`)}else Y.push(r`${r.raw(G.joinType)} join${Q} ${J}${W}`);if(X<$.length-1)Y.push(r` `)}return r.join(Y)}buildFromTable($){if(q0($,r0)&&$[r0.Symbol.IsAlias]){let Y=r`${r.identifier($[r0.Symbol.OriginalName])}`;if($[r0.Symbol.Schema])Y=r`${r.identifier($[r0.Symbol.Schema])}.${Y}`;return r`${Y} ${r.identifier($[r0.Symbol.Name])}`}return $}buildSelectQuery({withList:$,fields:Y,fieldsFlat:X,where:G,having:J,table:Q,joins:W,orderBy:K,groupBy:Z,limit:H,offset:z,lockingClause:V,distinct:F,setOperators:L}){let N=X??x5(Y);for(let S of N)if(q0(S.field,m4)&&J$(S.field.table)!==(q0(Q,W6)?Q._.alias:q0(Q,TF)?Q[y6].name:q0(Q,t0)?void 0:J$(Q))&&!((I)=>W?.some(({alias:v})=>v===(I[r0.Symbol.IsAlias]?J$(I):I[r0.Symbol.BaseName])))(S.field.table)){let I=J$(S.field.table);throw Error(`Your "${S.path.join("->")}" field references a column "${I}"."${S.field.name}", but the table "${I}" is not part of the query! Did you forget to join it?`)}let D=!W||W.length===0,A=this.buildWithCTE($),B;if(F)B=F===!0?r` distinct`:r` distinct on (${r.join(F.on,r`, `)})`;let O=this.buildSelection(N,{isSingleTable:D}),E=this.buildFromTable(Q),M=this.buildJoins(W),R=G?r` where ${G}`:void 0,q=J?r` having ${J}`:void 0,_;if(K&&K.length>0)_=r` order by ${r.join(K,r`, `)}`;let P;if(Z&&Z.length>0)P=r` group by ${r.join(Z,r`, `)}`;let w=typeof H==="object"||typeof H==="number"&&H>=0?r` limit ${H}`:void 0,j=z?r` offset ${z}`:void 0,C=r.empty();if(V){let S=r` for ${r.raw(V.strength)}`;if(V.config.of)S.append(r` of ${r.join(Array.isArray(V.config.of)?V.config.of:[V.config.of],r`, `)}`);if(V.config.noWait)S.append(r` nowait`);else if(V.config.skipLocked)S.append(r` skip locked`);C.append(S)}let k=r`${A}select${B} ${O} from ${E}${M}${R}${P}${q}${_}${w}${j}${C}`;if(L.length>0)return this.buildSetOperations(k,L);return k}buildSetOperations($,Y){let[X,...G]=Y;if(!X)throw Error("Cannot pass undefined values to any set operator");if(G.length===0)return this.buildSetOperationQuery({leftSelect:$,setOperator:X});return this.buildSetOperations(this.buildSetOperationQuery({leftSelect:$,setOperator:X}),G)}buildSetOperationQuery({leftSelect:$,setOperator:{type:Y,isAll:X,rightSelect:G,limit:J,orderBy:Q,offset:W}}){let K=r`(${$.getSQL()}) `,Z=r`(${G.getSQL()})`,H;if(Q&&Q.length>0){let L=[];for(let N of Q)if(q0(N,g1))L.push(r.identifier(N.name));else if(q0(N,t0)){for(let D=0;D<N.queryChunks.length;D++){let A=N.queryChunks[D];if(q0(A,g1))N.queryChunks[D]=r.identifier(A.name)}L.push(r`${N}`)}else L.push(r`${N}`);H=r` order by ${r.join(L,r`, `)} `}let z=typeof J==="object"||typeof J==="number"&&J>=0?r` limit ${J}`:void 0,V=r.raw(`${Y} ${X?"all ":""}`),F=W?r` offset ${W}`:void 0;return r`${K}${V}${Z}${H}${z}${F}`}buildInsertQuery({table:$,values:Y,onConflict:X,returning:G,withList:J,select:Q,overridingSystemValue_:W}){let K=[],Z=$[r0.Symbol.Columns],H=Object.entries(Z).filter(([A,B])=>!B.shouldDisableInsert()),z=H.map(([,A])=>r.identifier(this.casing.getColumnCasing(A)));if(Q){let A=Y;if(q0(A,t0))K.push(A);else K.push(A.getSQL())}else{let A=Y;K.push(r.raw("values "));for(let[B,O]of A.entries()){let E=[];for(let[M,R]of H){let q=O[M];if(q===void 0||q0(q,d$)&&q.value===void 0)if(R.defaultFn!==void 0){let _=R.defaultFn(),P=q0(_,t0)?_:r.param(_,R);E.push(P)}else if(!R.default&&R.onUpdateFn!==void 0){let _=R.onUpdateFn(),P=q0(_,t0)?_:r.param(_,R);E.push(P)}else E.push(r`default`);else E.push(q)}if(K.push(E),B<A.length-1)K.push(r`, `)}}let V=this.buildWithCTE(J),F=r.join(K),L=G?r` returning ${this.buildSelection(G,{isSingleTable:!0})}`:void 0,N=X?r` on conflict ${X}`:void 0,D=W===!0?r`overriding system value `:void 0;return r`${V}insert into ${$} ${z} ${D}${F}${N}${L}`}buildRefreshMaterializedViewQuery({view:$,concurrently:Y,withNoData:X}){let G=Y?r` concurrently`:void 0,J=X?r` with no data`:void 0;return r`refresh materialized view${G} ${$}${J}`}prepareTyping($){if(q0($,Il)||q0($,Tl))return"json";else if(q0($,Cl))return"decimal";else if(q0($,Sl))return"time";else if(q0($,kl)||q0($,vl))return"timestamp";else if(q0($,_l)||q0($,jl))return"date";else if(q0($,xl))return"uuid";else return"none"}sqlToQuery($,Y){return $.toQuery({casing:this.casing,escapeName:this.escapeName,escapeParam:this.escapeParam,escapeString:this.escapeString,prepareTyping:this.prepareTyping,invokeSource:Y})}buildRelationalQueryWithoutPK({fullSchema:$,schema:Y,tableNamesMap:X,table:G,tableConfig:J,queryConfig:Q,tableAlias:W,nestedQueryRelation:K,joinOn:Z}){let H=[],z,V,F=[],L,N=[];if(Q===!0)H=Object.entries(J.columns).map(([B,O])=>({dbKey:O.name,tsKey:B,field:M8(O,W),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{let A=Object.fromEntries(Object.entries(J.columns).map(([q,_])=>[q,M8(_,W)]));if(Q.where){let q=typeof Q.where==="function"?Q.where(A,uN()):Q.where;L=q&&rQ(q,W)}let B=[],O=[];if(Q.columns){let q=!1;for(let[_,P]of Object.entries(Q.columns)){if(P===void 0)continue;if(_ in J.columns){if(!q&&P===!0)q=!0;O.push(_)}}if(O.length>0)O=q?O.filter((_)=>Q.columns?.[_]===!0):Object.keys(J.columns).filter((_)=>!O.includes(_))}else O=Object.keys(J.columns);for(let q of O){let _=J.columns[q];B.push({tsKey:q,value:_})}let E=[];if(Q.with)E=Object.entries(Q.with).filter((q)=>!!q[1]).map(([q,_])=>({tsKey:q,queryConfig:_,relation:J.relations[q]}));let M;if(Q.extras){M=typeof Q.extras==="function"?Q.extras(A,{sql:r}):Q.extras;for(let[q,_]of Object.entries(M))B.push({tsKey:q,value:nV(_,W)})}for(let{tsKey:q,value:_}of B)H.push({dbKey:q0(_,t0.Aliased)?_.fieldAlias:J.columns[q].name,tsKey:q,field:q0(_,m4)?M8(_,W):_,relationTableTsKey:void 0,isJson:!1,selection:[]});let R=typeof Q.orderBy==="function"?Q.orderBy(A,pN()):Q.orderBy??[];if(!Array.isArray(R))R=[R];F=R.map((q)=>{if(q0(q,m4))return M8(q,W);return rQ(q,W)}),z=Q.limit,V=Q.offset;for(let{tsKey:q,queryConfig:_,relation:P}of E){let w=dN(Y,X,P),j=G2(P.referencedTable),C=X[j],k=`${W}_${q}`,S=c$(...w.fields.map((x,y)=>_1(M8(w.references[y],k),M8(x,W)))),I=this.buildRelationalQueryWithoutPK({fullSchema:$,schema:Y,tableNamesMap:X,table:$[C],tableConfig:Y[C],queryConfig:q0(P,oQ)?_===!0?{limit:1}:{..._,limit:1}:_,tableAlias:k,joinOn:S,nestedQueryRelation:P}),v=r`${r.identifier(k)}.${r.identifier("data")}`.as(q);N.push({on:r`true`,table:new W6(I.sql,{},k),alias:k,joinType:"left",lateral:!0}),H.push({dbKey:q,tsKey:q,field:v,relationTableTsKey:C,isJson:!0,selection:I.selection})}}if(H.length===0)throw new aQ({message:`No fields selected for table "${J.tsName}" ("${W}")`});let D;if(L=c$(Z,L),K){let A=r`json_build_array(${r.join(H.map(({field:E,tsKey:M,isJson:R})=>R?r`${r.identifier(`${W}_${M}`)}.${r.identifier("data")}`:q0(E,t0.Aliased)?E.sql:E),r`, `)})`;if(q0(K,PK))A=r`coalesce(json_agg(${A}${F.length>0?r` order by ${r.join(F,r`, `)}`:void 0}), '[]'::json)`;let B=[{dbKey:"data",tsKey:"data",field:A.as("data"),isJson:!0,relationTableTsKey:J.tsName,selection:H}];if(z!==void 0||V!==void 0||F.length>0)D=this.buildSelectQuery({table:BG(G,W),fields:{},fieldsFlat:[{path:[],field:r.raw("*")}],where:L,limit:z,offset:V,orderBy:F,setOperators:[]}),L=void 0,z=void 0,V=void 0,F=[];else D=BG(G,W);D=this.buildSelectQuery({table:q0(D,YY)?D:new W6(D,{},W),fields:{},fieldsFlat:B.map(({field:E})=>({path:[],field:q0(E,m4)?M8(E,W):E})),joins:N,where:L,limit:z,offset:V,orderBy:F,setOperators:[]})}else D=this.buildSelectQuery({table:BG(G,W),fields:{},fieldsFlat:H.map(({field:A})=>({path:[],field:q0(A,m4)?M8(A,W):A})),joins:N,where:L,limit:z,offset:V,orderBy:F,setOperators:[]});return{tableTsKey:J.tsName,sql:D,selection:H}}}class IG{static[z0]="PgSelectBuilder";fields;session;dialect;withList=[];distinct;constructor($){if(this.fields=$.fields,this.session=$.session,this.dialect=$.dialect,$.withList)this.withList=$.withList;this.distinct=$.distinct}authToken;setToken($){return this.authToken=$,this}from($){let Y=!!this.fields,X=$,G;if(this.fields)G=this.fields;else if(q0(X,W6))G=Object.fromEntries(Object.keys(X._.selectedFields).map((J)=>[J,X[J]]));else if(q0(X,TF))G=X[y6].selectedFields;else if(q0(X,t0))G={};else G=IH(X);return new Wz0({table:X,fields:G,isPartialSelect:Y,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}}class HV1 extends nN{static[z0]="PgSelectQueryBuilder";_;config;joinsNotNullableMap;tableName;isPartialSelect;session;dialect;cacheConfig=void 0;usedTables=new Set;constructor({table:$,fields:Y,isPartialSelect:X,session:G,dialect:J,withList:Q,distinct:W}){super();this.config={withList:Q,table:$,fields:{...Y},distinct:W,setOperators:[]},this.isPartialSelect=X,this.session=G,this.dialect=J,this._={selectedFields:Y,config:this.config},this.tableName=GX($),this.joinsNotNullableMap=typeof this.tableName==="string"?{[this.tableName]:!0}:{};for(let K of gK($))this.usedTables.add(K)}getUsedTables(){return[...this.usedTables]}createJoin($,Y){return(X,G)=>{let J=this.tableName,Q=GX(X);for(let W of gK(X))this.usedTables.add(W);if(typeof Q==="string"&&this.config.joins?.some((W)=>W.alias===Q))throw Error(`Alias "${Q}" is already used in this query`);if(!this.isPartialSelect){if(Object.keys(this.joinsNotNullableMap).length===1&&typeof J==="string")this.config.fields={[J]:this.config.fields};if(typeof Q==="string"&&!q0(X,t0)){let W=q0(X,W6)?X._.selectedFields:q0(X,Q$)?X[y6].selectedFields:X[r0.Symbol.Columns];this.config.fields[Q]=W}}if(typeof G==="function")G=G(new Proxy(this.config.fields,new q4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));if(!this.config.joins)this.config.joins=[];if(this.config.joins.push({on:G,table:X,joinType:$,alias:Q,lateral:Y}),typeof Q==="string")switch($){case"left":{this.joinsNotNullableMap[Q]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([W])=>[W,!1])),this.joinsNotNullableMap[Q]=!0;break}case"cross":case"inner":{this.joinsNotNullableMap[Q]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([W])=>[W,!1])),this.joinsNotNullableMap[Q]=!1;break}}return this}}leftJoin=this.createJoin("left",!1);leftJoinLateral=this.createJoin("left",!0);rightJoin=this.createJoin("right",!1);innerJoin=this.createJoin("inner",!1);innerJoinLateral=this.createJoin("inner",!0);fullJoin=this.createJoin("full",!1);crossJoin=this.createJoin("cross",!1);crossJoinLateral=this.createJoin("cross",!0);createSetOperator($,Y){return(X)=>{let G=typeof X==="function"?X(iu6()):X;if(!OG(this.getSelectedFields(),G.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return this.config.setOperators.push({type:$,isAll:Y,rightSelect:G}),this}}union=this.createSetOperator("union",!1);unionAll=this.createSetOperator("union",!0);intersect=this.createSetOperator("intersect",!1);intersectAll=this.createSetOperator("intersect",!0);except=this.createSetOperator("except",!1);exceptAll=this.createSetOperator("except",!0);addSetOperators($){return this.config.setOperators.push(...$),this}where($){if(typeof $==="function")$=$(new Proxy(this.config.fields,new q4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));return this.config.where=$,this}having($){if(typeof $==="function")$=$(new Proxy(this.config.fields,new q4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})));return this.config.having=$,this}groupBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.fields,new q4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(Y)?Y:[Y]}else this.config.groupBy=$;return this}orderBy(...$){if(typeof $[0]==="function"){let Y=$[0](new Proxy(this.config.fields,new q4({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),X=Array.isArray(Y)?Y:[Y];if(this.config.setOperators.length>0)this.config.setOperators.at(-1).orderBy=X;else this.config.orderBy=X}else{let Y=$;if(this.config.setOperators.length>0)this.config.setOperators.at(-1).orderBy=Y;else this.config.orderBy=Y}return this}limit($){if(this.config.setOperators.length>0)this.config.setOperators.at(-1).limit=$;else this.config.limit=$;return this}offset($){if(this.config.setOperators.length>0)this.config.setOperators.at(-1).offset=$;else this.config.offset=$;return this}for($,Y={}){return this.config.lockingClause={strength:$,config:Y},this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}as($){let Y=[];if(Y.push(...gK(this.config.table)),this.config.joins)for(let X of this.config.joins)Y.push(...gK(X.table));return new Proxy(new W6(this.getSQL(),this.config.fields,$,!1,[...new Set(Y)]),new q4({alias:$,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new q4({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}$dynamic(){return this}$withCache($){return this.cacheConfig=$===void 0?{config:{},enable:!0,autoInvalidate:!0}:$===!1?{enable:!1}:{enable:!0,autoInvalidate:!0,...$},this}}class Wz0 extends HV1{static[z0]="PgSelect";_prepare($){let{session:Y,config:X,dialect:G,joinsNotNullableMap:J,authToken:Q,cacheConfig:W,usedTables:K}=this;if(!Y)throw Error("Cannot execute a query on a query builder. Please use a database instance instead.");let{fields:Z}=X;return M5.startActiveSpan("drizzle.prepareQuery",()=>{let H=x5(Z),z=Y.prepareQuery(G.sqlToQuery(this.getSQL()),H,$,!0,void 0,{type:"select",tables:[...K]},W);return z.joinsNotNullableMap=J,z.setToken(Q)})}prepare($){return this._prepare($)}authToken;setToken($){return this.authToken=$,this}execute=($)=>{return M5.startActiveSpan("drizzle.operation",()=>{return this._prepare().execute($,this.authToken)})}}SR(Wz0,[r6]);function cq($,Y){return(X,G,...J)=>{let Q=[G,...J].map((W)=>({type:$,isAll:Y,rightSelect:W}));for(let W of Q)if(!OG(X.getSelectedFields(),W.rightSelect.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return X.addSetOperators(Q)}}var iu6=()=>({union:nu6,unionAll:ru6,intersect:au6,intersectAll:su6,except:ou6,exceptAll:tu6}),nu6=cq("union",!1),ru6=cq("union",!0),au6=cq("intersect",!1),su6=cq("intersect",!0),ou6=cq("except",!1),tu6=cq("except",!0);class IF{static[z0]="PgQueryBuilder";dialect;dialectConfig;constructor($){this.dialect=q0($,mA)?$:void 0,this.dialectConfig=q0($,mA)?void 0:$}$with=($,Y)=>{let X=this;return{as:(J)=>{if(typeof J==="function")J=J(X);return new Proxy(new nQ(J.getSQL(),Y??("getSelectedFields"in J?J.getSelectedFields()??{}:{}),$,!0),new q4({alias:$,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}};with(...$){let Y=this;function X(Q){return new IG({fields:Q??void 0,session:void 0,dialect:Y.getDialect(),withList:$})}function G(Q){return new IG({fields:Q??void 0,session:void 0,dialect:Y.getDialect(),distinct:!0})}function J(Q,W){return new IG({fields:W??void 0,session:void 0,dialect:Y.getDialect(),distinct:{on:Q}})}return{select:X,selectDistinct:G,selectDistinctOn:J}}select($){return new IG({fields:$??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct($){return new IG({fields:$??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn($,Y){return new IG({fields:Y??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:$}})}getDialect(){if(!this.dialect)this.dialect=new mA(this.dialectConfig);return this.dialect}}class Kz0{constructor($,Y){this.name=$,this.schema=Y}static[z0]="PgDefaultViewBuilderCore";config={};with($){return this.config.with=$,this}}class VV1 extends Kz0{static[z0]="PgViewBuilder";as($){if(typeof $==="function")$=$(new IF);let Y=new q4({alias:this.name,sqlBehavior:"error",sqlAliasedBehavior:"alias",replaceOriginalName:!0}),X=new Proxy($.getSelectedFields(),Y);return new Proxy(new Ha({pgConfig:this.config,config:{name:this.name,schema:this.schema,selectedFields:X,query:$.getSQL().inlineParams()}}),Y)}}class FV1 extends Kz0{static[z0]="PgManualViewBuilder";columns;constructor($,Y,X){super($,X);this.columns=IH(mN($,Y))}existing(){return new Proxy(new Ha({pgConfig:void 0,config:{name:this.name,schema:this.schema,selectedFields:this.columns,query:void 0}}),new q4({alias:this.name,sqlBehavior:"error",sqlAliasedBehavior:"alias",replaceOriginalName:!0}))}as($){return new Proxy(new Ha({pgConfig:this.config,config:{name:this.name,schema:this.schema,selectedFields:this.columns,query:$.inlineParams()}}),new q4({alias:this.name,sqlBehavior:"error",sqlAliasedBehavior:"alias",replaceOriginalName:!0}))}}class Zz0{constructor($,Y){this.name=$,this.schema=Y}static[z0]="PgMaterializedViewBuilderCore";config={};using($){return this.config.using=$,this}with($){return this.config.with=$,this}tablespace($){return this.config.tablespace=$,this}withNoData(){return this.config.withNoData=!0,this}}class LV1 extends Zz0{static[z0]="PgMaterializedViewBuilder";as($){if(typeof $==="function")$=$(new IF);let Y=new q4({alias:this.name,sqlBehavior:"error",sqlAliasedBehavior:"alias",replaceOriginalName:!0}),X=new Proxy($.getSelectedFields(),Y);return new Proxy(new za({pgConfig:{with:this.config.with,using:this.config.using,tablespace:this.config.tablespace,withNoData:this.config.withNoData},config:{name:this.name,schema:this.schema,selectedFields:X,query:$.getSQL().inlineParams()}}),Y)}}class DV1 extends Zz0{static[z0]="PgManualMaterializedViewBuilder";columns;constructor($,Y,X){super($,X);this.columns=IH(mN($,Y))}existing(){return new Proxy(new za({pgConfig:{tablespace:this.config.tablespace,using:this.config.using,with:this.config.with,withNoData:this.config.withNoData},config:{name:this.name,schema:this.schema,selectedFields:this.columns,query:void 0}}),new q4({alias:this.name,sqlBehavior:"error",sqlAliasedBehavior:"alias",replaceOriginalName:!0}))}as($){return new Proxy(new za({pgConfig:{tablespace:this.config.tablespace,using:this.config.using,with:this.config.with,withNoData:this.config.withNoData},config:{name:this.name,schema:this.schema,selectedFields:this.columns,query:$.inlineParams()}}),new q4({alias:this.name,sqlBehavior:"error",sqlAliasedBehavior:"alias",replaceOriginalName:!0}))}}class Ha extends TF{static[z0]="PgView";[Qz0];constructor({pgConfig:$,config:Y}){super(Y);if($)this[Qz0]={with:$.with}}}var zV1=Symbol.for("drizzle:PgMaterializedViewConfig");class za extends TF{static[z0]="PgMaterializedView";[zV1];constructor({pgConfig:$,config:Y}){super(Y);this[zV1]={with:$?.with,using:$?.using,tablespace:$?.tablespace,withNoData:$?.withNoData}}}function NV1($,Y,X){if(Y)return new FV1($,Y,X);return new VV1($,X)}function AV1($,Y,X){if(Y)return new DV1($,Y,X);return new LV1($,X)}function gK($){if(q0($,YY))return[$[bN]?`${$[bN]}.${$[r0.Symbol.BaseName]}`:$[r0.Symbol.BaseName]];if(q0($,W6))return $._.usedTables??[];if(q0($,t0))return $.usedTables??[];return[]}class Va extends r6{constructor($,Y,X,G){super();this.session=Y,this.dialect=X,this.config={table:$,withList:G}}static[z0]="PgDelete";config;cacheConfig;where($){return this.config.where=$,this}returning($=this.config.table[r0.Symbol.Columns]){return this.config.returningFields=$,this.config.returning=x5($),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}_prepare($){return M5.startActiveSpan("drizzle.prepareQuery",()=>{return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,$,!0,void 0,{type:"delete",tables:gK(this.config.table)},this.cacheConfig)})}prepare($){return this._prepare($)}authToken;setToken($){return this.authToken=$,this}execute=($)=>{return M5.startActiveSpan("drizzle.operation",()=>{return this._prepare().execute($,this.authToken)})};getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new q4({alias:J$(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}class Fa{constructor($,Y,X,G,J){this.table=$,this.session=Y,this.dialect=X,this.withList=G,this.overridingSystemValue_=J}static[z0]="PgInsertBuilder";authToken;setToken($){return this.authToken=$,this}overridingSystemValue(){return this.overridingSystemValue_=!0,this}values($){if($=Array.isArray($)?$:[$],$.length===0)throw Error("values() must be called with at least one value");let Y=$.map((X)=>{let G={},J=this.table[r0.Symbol.Columns];for(let Q of Object.keys(X)){let W=X[Q];G[Q]=q0(W,t0)?W:new d$(W,J[Q])}return G});return new Uz0(this.table,Y,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select($){let Y=typeof $==="function"?$(new IF):$;if(!q0(Y,t0)&&!OG(this.table[lV],Y._.selectedFields))throw Error("Insert select error: selected fields are not the same or are in a different order compared to the table definition");return new Uz0(this.table,Y,this.session,this.dialect,this.withList,!0)}}class Uz0 extends r6{constructor($,Y,X,G,J,Q,W){super();this.session=X,this.dialect=G,this.config={table:$,values:Y,withList:J,select:Q,overridingSystemValue_:W}}static[z0]="PgInsert";config;cacheConfig;returning($=this.config.table[r0.Symbol.Columns]){return this.config.returningFields=$,this.config.returning=x5($),this}onConflictDoNothing($={}){if($.target===void 0)this.config.onConflict=r`do nothing`;else{let Y="";Y=Array.isArray($.target)?$.target.map((G)=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(G))).join(","):this.dialect.escapeName(this.dialect.casing.getColumnCasing($.target));let X=$.where?r` where ${$.where}`:void 0;this.config.onConflict=r`(${r.raw(Y)})${X} do nothing`}return this}onConflictDoUpdate($){if($.where&&($.targetWhere||$.setWhere))throw Error('You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.');let Y=$.where?r` where ${$.where}`:void 0,X=$.targetWhere?r` where ${$.targetWhere}`:void 0,G=$.setWhere?r` where ${$.setWhere}`:void 0,J=this.dialect.buildUpdateSet(this.config.table,J2(this.config.table,$.set)),Q="";return Q=Array.isArray($.target)?$.target.map((W)=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(W))).join(","):this.dialect.escapeName(this.dialect.casing.getColumnCasing($.target)),this.config.onConflict=r`(${r.raw(Q)})${X} do update set ${J}${Y}${G}`,this}getSQL(){return this.dialect.buildInsertQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}_prepare($){return M5.startActiveSpan("drizzle.prepareQuery",()=>{return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,$,!0,void 0,{type:"insert",tables:gK(this.config.table)},this.cacheConfig)})}prepare($){return this._prepare($)}authToken;setToken($){return this.authToken=$,this}execute=($)=>{return M5.startActiveSpan("drizzle.operation",()=>{return this._prepare().execute($,this.authToken)})};getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new q4({alias:J$(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}class Hz0 extends r6{constructor($,Y,X){super();this.session=Y,this.dialect=X,this.config={view:$}}static[z0]="PgRefreshMaterializedView";config;concurrently(){if(this.config.withNoData!==void 0)throw Error("Cannot use concurrently and withNoData together");return this.config.concurrently=!0,this}withNoData(){if(this.config.concurrently!==void 0)throw Error("Cannot use concurrently and withNoData together");return this.config.withNoData=!0,this}getSQL(){return this.dialect.buildRefreshMaterializedViewQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}_prepare($){return M5.startActiveSpan("drizzle.prepareQuery",()=>{return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),void 0,$,!0)})}prepare($){return this._prepare($)}authToken;setToken($){return this.authToken=$,this}execute=($)=>{return M5.startActiveSpan("drizzle.operation",()=>{return this._prepare().execute($,this.authToken)})}}class La{constructor($,Y,X,G){this.table=$,this.session=Y,this.dialect=X,this.withList=G}static[z0]="PgUpdateBuilder";authToken;setToken($){return this.authToken=$,this}set($){return new BV1(this.table,J2(this.table,$),this.session,this.dialect,this.withList).setToken(this.authToken)}}class BV1 extends r6{constructor($,Y,X,G,J){super();this.session=X,this.dialect=G,this.config={set:Y,table:$,withList:J,joins:[]},this.tableName=GX($),this.joinsNotNullableMap=typeof this.tableName==="string"?{[this.tableName]:!0}:{}}static[z0]="PgUpdate";config;tableName;joinsNotNullableMap;cacheConfig;from($){let Y=$,X=GX(Y);if(typeof X==="string")this.joinsNotNullableMap[X]=!0;return this.config.from=Y,this}getTableLikeFields($){if(q0($,YY))return $[r0.Symbol.Columns];else if(q0($,W6))return $._.selectedFields;return $[y6].selectedFields}createJoin($){return(Y,X)=>{let G=GX(Y);if(typeof G==="string"&&this.config.joins.some((J)=>J.alias===G))throw Error(`Alias "${G}" is already used in this query`);if(typeof X==="function"){let J=this.config.from&&!q0(this.config.from,t0)?this.getTableLikeFields(this.config.from):void 0;X=X(new Proxy(this.config.table[r0.Symbol.Columns],new q4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})),J&&new Proxy(J,new q4({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))}if(this.config.joins.push({on:X,table:Y,joinType:$,alias:G}),typeof G==="string")switch($){case"left":{this.joinsNotNullableMap[G]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([J])=>[J,!1])),this.joinsNotNullableMap[G]=!0;break}case"inner":{this.joinsNotNullableMap[G]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([J])=>[J,!1])),this.joinsNotNullableMap[G]=!1;break}}return this}}leftJoin=this.createJoin("left");rightJoin=this.createJoin("right");innerJoin=this.createJoin("inner");fullJoin=this.createJoin("full");where($){return this.config.where=$,this}returning($){if(!$){if($=Object.assign({},this.config.table[r0.Symbol.Columns]),this.config.from){let Y=GX(this.config.from);if(typeof Y==="string"&&this.config.from&&!q0(this.config.from,t0)){let X=this.getTableLikeFields(this.config.from);$[Y]=X}for(let X of this.config.joins){let G=GX(X.table);if(typeof G==="string"&&!q0(X.table,t0)){let J=this.getTableLikeFields(X.table);$[G]=J}}}}return this.config.returningFields=$,this.config.returning=x5($),this}getSQL(){return this.dialect.buildUpdateQuery(this.config)}toSQL(){let{typings:$,...Y}=this.dialect.sqlToQuery(this.getSQL());return Y}_prepare($){let Y=this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,$,!0,void 0,{type:"insert",tables:gK(this.config.table)},this.cacheConfig);return Y.joinsNotNullableMap=this.joinsNotNullableMap,Y}prepare($){return this._prepare($)}authToken;setToken($){return this.authToken=$,this}execute=($)=>{return this._prepare().execute($,this.authToken)};getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new q4({alias:J$(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}class zx extends t0{constructor($){super(zx.buildEmbeddedCount($.source,$.filters).queryChunks);this.params=$,this.mapWith(Number),this.session=$.session,this.sql=zx.buildCount($.source,$.filters)}sql;token;static[z0]="PgCountBuilder";[Symbol.toStringTag]="PgCountBuilder";session;static buildEmbeddedCount($,Y){return r`(select count(*) from ${$}${r.raw(" where ").if(Y)}${Y})`}static buildCount($,Y){return r`select count(*) as count from ${$}${r.raw(" where ").if(Y)}${Y};`}setToken($){return this.token=$,this}then($,Y){return Promise.resolve(this.session.count(this.sql,this.token)).then($,Y)}catch($){return this.then(void 0,$)}finally($){return this.then((Y)=>{return $?.(),Y},(Y)=>{throw $?.(),Y})}}class Vz0{constructor($,Y,X,G,J,Q,W){this.fullSchema=$,this.schema=Y,this.tableNamesMap=X,this.table=G,this.tableConfig=J,this.dialect=Q,this.session=W}static[z0]="PgRelationalQueryBuilder";findMany($){return new zz0(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,$?$:{},"many")}findFirst($){return new zz0(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,$?{...$,limit:1}:{limit:1},"first")}}class zz0 extends r6{constructor($,Y,X,G,J,Q,W,K,Z){super();this.fullSchema=$,this.schema=Y,this.tableNamesMap=X,this.table=G,this.tableConfig=J,this.dialect=Q,this.session=W,this.config=K,this.mode=Z}static[z0]="PgRelationalQuery";_prepare($){return M5.startActiveSpan("drizzle.prepareQuery",()=>{let{query:Y,builtQuery:X}=this._toSQL();return this.session.prepareQuery(X,void 0,$,!0,(G,J)=>{let Q=G.map((W)=>sV(this.schema,this.tableConfig,W,Y.selection,J));if(this.mode==="first")return Q[0];return Q})})}prepare($){return this._prepare($)}_getQuery(){return this.dialect.buildRelationalQueryWithoutPK({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName})}getSQL(){return this._getQuery().sql}_toSQL(){let $=this._getQuery(),Y=this.dialect.sqlToQuery($.sql);return{query:$,builtQuery:Y}}toSQL(){return this._toSQL().builtQuery}authToken;setToken($){return this.authToken=$,this}execute(){return M5.startActiveSpan("drizzle.operation",()=>{return this._prepare().execute(void 0,this.authToken)})}}class Fz0 extends r6{constructor($,Y,X,G){super();this.execute=$,this.sql=Y,this.query=X,this.mapBatchResult=G}static[z0]="PgRaw";getSQL(){return this.sql}getQuery(){return this.query}mapResult($,Y){return Y?this.mapBatchResult($):$}_prepare(){return this}isResponseInArrayMode(){return!1}}class Vx{constructor($,Y,X){if(this.dialect=$,this.session=Y,this._=X?{schema:X.schema,fullSchema:X.fullSchema,tableNamesMap:X.tableNamesMap,session:Y}:{schema:void 0,fullSchema:{},tableNamesMap:{},session:Y},this.query={},this._.schema)for(let[G,J]of Object.entries(this._.schema))this.query[G]=new Vz0(X.fullSchema,this._.schema,this._.tableNamesMap,X.fullSchema[G],J,$,Y);this.$cache={invalidate:async(G)=>{}}}static[z0]="PgDatabase";query;$with=($,Y)=>{let X=this;return{as:(J)=>{if(typeof J==="function")J=J(new IF(X.dialect));return new Proxy(new nQ(J.getSQL(),Y??("getSelectedFields"in J?J.getSelectedFields()??{}:{}),$,!0),new q4({alias:$,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}};$count($,Y){return new zx({source:$,filters:Y,session:this.session})}$cache;with(...$){let Y=this;function X(Z){return new IG({fields:Z??void 0,session:Y.session,dialect:Y.dialect,withList:$})}function G(Z){return new IG({fields:Z??void 0,session:Y.session,dialect:Y.dialect,withList:$,distinct:!0})}function J(Z,H){return new IG({fields:H??void 0,session:Y.session,dialect:Y.dialect,withList:$,distinct:{on:Z}})}function Q(Z){return new La(Z,Y.session,Y.dialect,$)}function W(Z){return new Fa(Z,Y.session,Y.dialect,$)}function K(Z){return new Va(Z,Y.session,Y.dialect,$)}return{select:X,selectDistinct:G,selectDistinctOn:J,update:Q,insert:W,delete:K}}select($){return new IG({fields:$??void 0,session:this.session,dialect:this.dialect})}selectDistinct($){return new IG({fields:$??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn($,Y){return new IG({fields:Y??void 0,session:this.session,dialect:this.dialect,distinct:{on:$}})}update($){return new La($,this.session,this.dialect)}insert($){return new Fa($,this.session,this.dialect)}delete($){return new Va($,this.session,this.dialect)}refreshMaterializedView($){return new Hz0($,this.session,this.dialect)}authToken;execute($){let Y=typeof $==="string"?r.raw($):$.getSQL(),X=this.dialect.sqlToQuery(Y),G=this.session.prepareQuery(X,void 0,void 0,!1);return new Fz0(()=>G.execute(void 0,this.authToken),Y,X,(J)=>G.mapResult(J,!0))}transaction($,Y){return this.session.transaction($,Y)}}Hx();class OV1{constructor($,Y,X){this.seqName=$,this.seqOptions=Y,this.schema=X}static[z0]="PgSequence"}function EV1($,Y,X){return new OV1($,Y,X)}class MV1{constructor($){this.schemaName=$}static[z0]="PgSchema";table=($,Y,X)=>{return rW0($,Y,X,this.schemaName)};view=($,Y)=>{return NV1($,Y,this.schemaName)};materializedView=($,Y)=>{return AV1($,Y,this.schemaName)};enum($,Y){return Array.isArray(Y)?Z01($,[...Y],this.schemaName):U01($,Y,this.schemaName)}sequence=($,Y)=>{return EV1($,Y,this.schemaName)};getSQL(){return new t0([r.identifier(this.schemaName)])}shouldOmitSQLParens(){return!0}}function Da($){if($==="public")throw Error("You can't specify 'public' as schema name. Postgres is using public schema by default. If you want to use 'public' schema, just use pgTable() instead of creating a schema");return new MV1($)}class Lz0{constructor($,Y,X,G){if(this.query=$,this.cache=Y,this.queryMetadata=X,this.cacheConfig=G,Y&&Y.strategy()==="all"&&G===void 0)this.cacheConfig={enable:!0,autoInvalidate:!0};if(!this.cacheConfig?.enable)this.cacheConfig=void 0}authToken;getQuery(){return this.query}mapResult($,Y){return $}setToken($){return this.authToken=$,this}static[z0]="PgPreparedQuery";joinsNotNullableMap;async queryWithCache($,Y,X){if(this.cache===void 0||q0(this.cache,jK)||this.queryMetadata===void 0)try{return await X()}catch(G){throw new M$($,Y,G)}if(this.cacheConfig&&!this.cacheConfig.enable)try{return await X()}catch(G){throw new M$($,Y,G)}if((this.queryMetadata.type==="insert"||this.queryMetadata.type==="update"||this.queryMetadata.type==="delete")&&this.queryMetadata.tables.length>0)try{let[G]=await Promise.all([X(),this.cache.onMutate({tables:this.queryMetadata.tables})]);return G}catch(G){throw new M$($,Y,G)}if(!this.cacheConfig)try{return await X()}catch(G){throw new M$($,Y,G)}if(this.queryMetadata.type==="select"){let G=await this.cache.get(this.cacheConfig.tag??await kH($,Y),this.queryMetadata.tables,this.cacheConfig.tag!==void 0,this.cacheConfig.autoInvalidate);if(G===void 0){let J;try{J=await X()}catch(Q){throw new M$($,Y,Q)}return await this.cache.put(this.cacheConfig.tag??await kH($,Y),J,this.cacheConfig.autoInvalidate?this.queryMetadata.tables:[],this.cacheConfig.tag!==void 0,this.cacheConfig.config),J}return G}try{return await X()}catch(G){throw new M$($,Y,G)}}}class Dz0{constructor($){this.dialect=$}static[z0]="PgSession";execute($,Y){return M5.startActiveSpan("drizzle.operation",()=>{return M5.startActiveSpan("drizzle.prepareQuery",()=>{return this.prepareQuery(this.dialect.sqlToQuery($),void 0,void 0,!1)}).setToken(Y).execute(void 0,Y)})}all($){return this.prepareQuery(this.dialect.sqlToQuery($),void 0,void 0,!1).all()}async count($,Y){let X=await this.execute($,Y);return Number(X[0].count)}}class Nz0 extends Vx{constructor($,Y,X,G=0){super($,Y,X);this.schema=X,this.nestedIndex=G}static[z0]="PgTransaction";rollback(){throw new hN}getTransactionConfigSQL($){let Y=[];if($.isolationLevel)Y.push(`isolation level ${$.isolationLevel}`);if($.accessMode)Y.push($.accessMode);if(typeof $.deferrable==="boolean")Y.push($.deferrable?"deferrable":"not deferrable");return r.raw(Y.join(" "))}setTransaction($){return this.session.execute(r`set transaction ${this.getTransactionConfigSQL($)}`)}}var{Pool:eu6,types:oU}=gA;class RV1 extends Lz0{constructor($,Y,X,G,J,Q,W,K,Z,H,z){super({sql:Y,params:X},J,Q,W);this.client=$,this.queryString=Y,this.params=X,this.logger=G,this.fields=K,this._isResponseInArrayMode=H,this.customResultMapper=z,this.rawQueryConfig={name:Z,text:Y,types:{getTypeParser:(V,F)=>{if(V===oU.builtins.TIMESTAMPTZ)return(L)=>L;if(V===oU.builtins.TIMESTAMP)return(L)=>L;if(V===oU.builtins.DATE)return(L)=>L;if(V===oU.builtins.INTERVAL)return(L)=>L;if(V===1231)return(L)=>L;if(V===1115)return(L)=>L;if(V===1185)return(L)=>L;if(V===1187)return(L)=>L;if(V===1182)return(L)=>L;return oU.getTypeParser(V,F)}}},this.queryConfig={name:Z,text:Y,rowMode:"array",types:{getTypeParser:(V,F)=>{if(V===oU.builtins.TIMESTAMPTZ)return(L)=>L;if(V===oU.builtins.TIMESTAMP)return(L)=>L;if(V===oU.builtins.DATE)return(L)=>L;if(V===oU.builtins.INTERVAL)return(L)=>L;if(V===1231)return(L)=>L;if(V===1115)return(L)=>L;if(V===1185)return(L)=>L;if(V===1187)return(L)=>L;if(V===1182)return(L)=>L;return oU.getTypeParser(V,F)}}}}static[z0]="NodePgPreparedQuery";rawQueryConfig;queryConfig;async execute($={}){return M5.startActiveSpan("drizzle.execute",async()=>{let Y=qK(this.params,$);this.logger.logQuery(this.rawQueryConfig.text,Y);let{fields:X,rawQueryConfig:G,client:J,queryConfig:Q,joinsNotNullableMap:W,customResultMapper:K}=this;if(!X&&!K)return M5.startActiveSpan("drizzle.driver.execute",async(H)=>{return H?.setAttributes({"drizzle.query.name":G.name,"drizzle.query.text":G.text,"drizzle.query.params":JSON.stringify(Y)}),this.queryWithCache(G.text,Y,async()=>{return await J.query(G,Y)})});let Z=await M5.startActiveSpan("drizzle.driver.execute",(H)=>{return H?.setAttributes({"drizzle.query.name":Q.name,"drizzle.query.text":Q.text,"drizzle.query.params":JSON.stringify(Y)}),this.queryWithCache(Q.text,Y,async()=>{return await J.query(Q,Y)})});return M5.startActiveSpan("drizzle.mapResponse",()=>{return K?K(Z.rows):Z.rows.map((H)=>rV(X,H,W))})})}all($={}){return M5.startActiveSpan("drizzle.execute",()=>{let Y=qK(this.params,$);return this.logger.logQuery(this.rawQueryConfig.text,Y),M5.startActiveSpan("drizzle.driver.execute",(X)=>{return X?.setAttributes({"drizzle.query.name":this.rawQueryConfig.name,"drizzle.query.text":this.rawQueryConfig.text,"drizzle.query.params":JSON.stringify(Y)}),this.queryWithCache(this.rawQueryConfig.text,Y,async()=>{return this.client.query(this.rawQueryConfig,Y)}).then((G)=>G.rows)})})}isResponseInArrayMode(){return this._isResponseInArrayMode}}class Na extends Dz0{constructor($,Y,X,G={}){super(Y);this.client=$,this.schema=X,this.options=G,this.logger=G.logger??new gN,this.cache=G.cache??new jK}static[z0]="NodePgSession";logger;cache;prepareQuery($,Y,X,G,J,Q,W){return new RV1(this.client,$.sql,$.params,this.logger,this.cache,Q,W,Y,X,G,J)}async transaction($,Y){let X=this.client instanceof eu6||Object.getPrototypeOf(this.client).constructor.name.includes("Pool"),G=X?new Na(await this.client.connect(),this.dialect,this.schema,this.options):this,J=new Az0(this.dialect,G,this.schema);await J.execute(r`begin${Y?r` ${J.getTransactionConfigSQL(Y)}`:void 0}`);try{let Q=await $(J);return await J.execute(r`commit`),Q}catch(Q){throw await J.execute(r`rollback`),Q}finally{if(X)G.client.release()}}async count($){let Y=await this.execute($);return Number(Y.rows[0].count)}}class Az0 extends Nz0{static[z0]="NodePgTransaction";async transaction($){let Y=`sp${this.nestedIndex+1}`,X=new Az0(this.dialect,this.session,this.schema,this.nestedIndex+1);await X.execute(r.raw(`savepoint ${Y}`));try{let G=await $(X);return await X.execute(r.raw(`release savepoint ${Y}`)),G}catch(G){throw await X.execute(r.raw(`rollback to savepoint ${Y}`)),G}}}class qV1{constructor($,Y,X={}){this.client=$,this.dialect=Y,this.options=X}static[z0]="NodePgDriver";createSession($){return new Na(this.client,this.dialect,$,{logger:this.options.logger,cache:this.options.cache})}}class PV1 extends Vx{static[z0]="NodePgDatabase"}function Fx($,Y={}){let X=new mA({casing:Y.casing}),G;if(Y.logger===!0)G=new fN;else if(Y.logger!==!1)G=Y.logger;let J;if(Y.schema){let Z=vR(Y.schema,xR);J={fullSchema:Y.schema,schema:Z.tables,tableNamesMap:Z.tableNamesMap}}let W=new qV1($,X,{logger:G,cache:Y.cache}).createSession(J),K=new PV1(X,W,J);if(K.$client=$,K.$cache=Y.cache,K.$cache)K.$cache.invalidate=Y.cache?.onMutate;return K}function lq(...$){if(typeof $[0]==="string"){let Y=new gA.Pool({connectionString:$[0]});return Fx(Y,$[1])}if(kR($[0])){let{connection:Y,client:X,...G}=$[0];if(X)return Fx(X,G);let J=typeof Y==="string"?new gA.Pool({connectionString:Y}):new gA.Pool(Y);return Fx(J,G)}return Fx($[0],$[1])}(($)=>{function Y(X){return Fx({},X)}$.mock=Y})(lq||(lq={}));ON();Hx();var q2=B6("sys_pg_source",{id:g0("id"),name:g0("name"),code:g0("code"),host:g0("host"),user:g0("user"),password:g0("password"),databaseName:g0("databaseName"),port:m1("port"),max:m1("max"),createdAt:m1("createdAt"),updatedAt:m1("updatedAt"),latest_visitAt:m1("latest_visitAt"),createBy:g0("createBy"),updateBy:g0("updateBy"),env_id:g0("env_id")});async function uA($){return await e0.select().from(q2).where(_1(q2.code,$))}function Bz0($){let Y=r.raw("1 = 1");if($.code&&$.code.length>0)Y.append(r.raw(` and code like '%${$.code}%'`));if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or code like '%${$.searchVal}%')`));return Y}async function wV1($){return await e0.select().from(q2).where(Bz0($)).limit(Number($.limit)).offset(Number($.offset))}async function Aa($){return await e0.select().from(q2).where(Bz0($))}async function _V1($){return await e0.$count(q2,Bz0($))}async function jV1($){let Y=await e0.$count(q2,_1(q2.code,$.code));if(Y&&Y>0)$p6($);else{let X=Date.now();$.id=C6(),$.code=C6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await e0.insert(q2).values($)}}async function $p6($){let Y=Date.now();$.updateBy="admin",$.latest_visitAt=Y,$.updatedAt=Y,await e0.update(q2).set($).where(_1(q2.code,$.code))}async function TV1($){await e0.delete(q2).where(_1(q2.code,$))}var Yp6={max:500,maxSize:1000,sizeCalculation:($,Y)=>{return 1},dispose:($,Y)=>{},ttl:300000,allowStale:!1,updateAgeOnGet:!1,updateAgeOnHas:!1,fetchMethod:async($,Y,{options:X,signal:G,context:J})=>{}},Ba=new eW(Yp6);async function Xp6($){let Y=$.code;if(!$.host)throw Error("host\u4E0D\u80FD\u4E3A\u7A7A");if(!$.user)throw Error("user\u4E0D\u80FD\u4E3A\u7A7A");if(!$.database)throw Error("database\u4E0D\u80FD\u4E3A\u7A7A");if(!$.password)throw Error("password\u4E0D\u80FD\u4E3A\u7A7A");if(!$.port)throw Error("\u7AEF\u53E3\u4E0D\u80FD\u4E3A\u7A7A");$.max=20,delete $.code;let X=new Jz0($);Ba.set(Y,X)}async function Gp6($){let Y=await uA($);if(Y&&Y[0]&&Y.length>0){let X={max:0,maxUses:0,allowExitOnIdle:!1,maxLifetimeSeconds:0,idleTimeoutMillis:null};i1(X,"host",Y[0].host),i1(X,"user",Y[0].user),i1(X,"password",Y[0].password),i1(X,"database",Y[0].databaseName),i1(X,"port",Y[0].port),i1(X,"code",Y[0].code),await Xp6(X)}else throw Error(`code:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}async function pX($){if($&&Ba.has($)){let Y=Ba.get($);return lq(Y)}else if($){await Gp6($);let Y=Ba.get($);return lq(Y)}else throw Error(`code:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}async function IV1($){return await lq(`postgres://${$.user}:${$.password}@${$.host}:${$.port}/${$.database}`).execute("select 1")}var Dx=new _4;Dx.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};q6(Y,$.req.query());let X=await wV1(Y),G=await _V1(Y),J=$1();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});Dx.post("/save",async($)=>{try{let Y=await $.req.json(),X={};q6(X,Y),await jV1(X);let G=$1();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});Dx.post("/test",async($)=>{try{let Y=await $.req.json(),X=FA(Y,["host","user","password","database","port","max","maxUses","allowExitOnIdle","maxLifetimeSeconds","idleTimeoutMillis"]);X.database=Y.databaseName;let G=await IV1(X),J=$1();return J.data=G,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u8FDE\u63A5\u5931\u8D25"})}});Dx.post("/delete",async($)=>{try{let Y=await $.req.json();await TV1(Y.code);let X=$1();return $.json(X)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var CV1=Dx;var hx=U6(cF(),1);var I2=B6("sys_oracle_source",{id:g0("id"),name:g0("name"),code:g0("code"),host:g0("host"),user:g0("user"),password:g0("password"),serviceName:g0("serviceName"),port:m1("port"),max:m1("max"),createdAt:m1("createdAt"),updatedAt:m1("updatedAt"),latest_visitAt:m1("latest_visitAt"),createBy:g0("createBy"),updateBy:g0("updateBy"),env_id:g0("env_id")});async function W3($){return await e0.select().from(I2).where(_1(I2.code,$))}function tV0($){let Y=r.raw("1 = 1");if($.code&&$.code.length>0)Y.append(r.raw(` and code like '%${$.code}%'`));if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or code like '%${$.searchVal}%')`));return Y}async function ZB1($){return await e0.select().from(I2).where(tV0($)).limit(Number($.limit)).offset(Number($.offset))}async function ws($){return await e0.select().from(I2).where(tV0($))}async function UB1($){return await e0.$count(I2,tV0($))}async function HB1($){let Y=await e0.$count(I2,_1(I2.code,$.code));if(Y&&Y>0)Wr6($);else{let X=Date.now();$.id=C6(),$.code=C6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await e0.insert(I2).values($)}}async function Wr6($){let Y=Date.now();$.updateBy="admin",$.latest_visitAt=Y,$.updatedAt=Y,await e0.update(I2).set($).where(_1(I2.code,$.code))}async function zB1($){await e0.delete(I2).where(_1(I2.code,$))}async function lX($){let Y=await W3($);if(Y&&Y[0]&&Y.length>0){if(!Y[0].host)throw Error("host\u4E0D\u80FD\u4E3A\u7A7A");if(!Y[0].user)throw Error("user\u4E0D\u80FD\u4E3A\u7A7A");if(!Y[0].serviceName)throw Error("serviceName\u4E0D\u80FD\u4E3A\u7A7A");if(!Y[0].password)throw Error("password\u4E0D\u80FD\u4E3A\u7A7A");if(!Y[0].port)throw Error("\u7AEF\u53E3\u4E0D\u80FD\u4E3A\u7A7A");let X;try{X=hx.default.getPool($)}catch(G){}if(!X)X=await hx.default.createPool({user:Y[0].user,password:Y[0].password,connectString:`${Y[0].host}:${Y[0].port}/${Y[0].serviceName}`,poolIncrement:1,poolMin:1,poolMax:10,poolAlias:$});return X.getConnection()}else throw Error(`code:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`)}async function VB1($){let Y=await hx.default.getConnection({user:$.user,password:$.password,connectString:`${$.host}:${$.port}/${$.serviceName}`}),X=await Y.execute("select 1 from dual",[],{outFormat:hx.default.OUT_FORMAT_OBJECT});return await Y.close(),X.rows}var fx=new _4;fx.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};q6(Y,$.req.query());let X=await ZB1(Y),G=await UB1(Y),J=$1();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});fx.post("/save",async($)=>{try{let Y=await $.req.json(),X={};q6(X,Y),await HB1(X);let G=$1();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});fx.post("/test",async($)=>{try{let Y=await $.req.json(),X=FA(Y,["host","user","password","serviceName","port"]),G=await VB1(X),J=$1();return J.data=G,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u8FDE\u63A5\u5931\u8D25"})}});fx.post("/delete",async($)=>{try{let Y=await $.req.json();await zB1(Y.code);let X=$1();return $.json(X)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var FB1=fx;var C2=new _4;C2.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};q6(Y,$.req.query());let X=await qX1(Y),G=await wX1(Y),J=$1();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});C2.post("/save",async($)=>{try{let Y=await $.req.json();await TX1(Y.name,Y.code,Y.filename);let X=$1();return X.data={success:!0},$.json(X)}catch(Y){throw console.error(Y),new v0(500,{message:`\u4FDD\u5B58\u5931\u8D25:${Y}`})}});C2.post("/test",async($)=>{try{let Y=await $.req.json(),X=await IX1(Y.filename??""),G=$1();return G.data=X,$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u8FDE\u63A5\u5931\u8D25"})}});C2.post("/delete",async($)=>{try{let Y=await $.req.json();await jX1(Y.code);let X=$1();return $.json(X)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5220\u9664\u5931\u8D25"})}});C2.post("/addTable",async($)=>{try{let Y=await $.req.json(),X=Y.code??"",G=Y.filename??"",J=Y.table??"",Q=Y.fields??[];if(J.length==0||Q.length==0||X.length==0)throw new v0(500,{message:"\u53C2\u6570\u9519\u8BEF"});let W="";Q.forEach((z)=>{let V="text";switch(z.type){case"integer":V="integer";break;case"real":V="real";break;case"text":V="text";break;case"blob":V="blob";break;case"boolean":V="integer";break;case"bigint":V="blob";break;case"numeric":V="numeric";break;default:break}W=W+z.name+" "+V+","});let K=`
            CREATE TABLE ${J} (
                id text,
                ${W}
                create_time text,
                update_time text
            )
        `;await CX1(X,K);let Z={source:X,filename:G,table_name:J,schema_data:JSON.stringify(Q)};await xX1(Z);let H=$1();return $.json(H)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5EFA\u8868\u5931\u8D25"})}});C2.get("/queryMetaData",async($)=>{try{let Y=$.req.query().code??"",X=await LA(Y),G=await SX1(Y),J=$1();return J.data={config:X[0],metaData:G},$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});C2.get("/queryTableData",async($)=>{try{let Y=$.req.query().code??"",X=$.req.query().table??"",G=$.req.query().pageNum??"1",J=(Number(G)-1)*10,Q=`select * from ${X} limit 10 offset ${J}`,W=await fk(Y,Q),K=`select count(*) as total from ${X}`,Z=await fk(Y,K),z=(await Kq(Y,X))[0]?.schema_data??"[]",V=JSON.parse(z),F=$1();return F.data={data:W,fields:V,total:Z[0]?.total},$.json(F)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});C2.get("/dropTable",async($)=>{try{let Y=$.req.query().code??"",X=$.req.query().table??"";await kX1(Y,X);let G=$1();return $.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5220\u9664\u5931\u8D25"})}});C2.post("/saveTableData",async($)=>{try{let Y=await $.req.json(),X=Y.code??"",G=Y.table??"";(Y.items??[]).forEach(async(W)=>{if(W.id)await xn(X,G,W,W.id);else await vn(X,G,W)});let Q=$1();return Q.data={success:!0},$.json(Q)}catch(Y){throw console.error(Y),new v0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});C2.post("/deleteTableData",async($)=>{try{let Y=await $.req.json(),X=Y.code??"",G=Y.table??"";(Y.items??[]).forEach(async(W)=>{if(W.id)await yn(X,`delete from ${G} where id = '${W.id}'`)});let Q=$1();return Q.data={success:!0},$.json(Q)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5220\u9664\u5931\u8D25"})}});C2.post("/filterTableData",async($)=>{try{let Y=await $.req.json(),X=Y.code??"",G=Y.table??"",J=Y.pageNum??"1",Q=(Number(J)-1)*10,W=Y.filter??{},{result:K,count:Z}=await hX1(X,G,W,Q),z=(await Kq(X,G))[0]?.schema_data??"[]",V=JSON.parse(z),F=$1();return F.data={data:K,fields:V,total:Z},$.json(F)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});var LB1=C2;var _s=new _4;_s.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};q6(Y,$.req.query());let X=await N71(Y),G=await A71(Y),J=$1();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});_s.post("/save",async($)=>{try{let Y=await $.req.json(),X={};q6(X,Y),await B71(X);let G=$1();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});_s.post("/delete",async($)=>{try{let Y=await $.req.json();await O71(Y.id);let X=$1();return $.json(X)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var DB1=_s;var SB1=U6(cF(),1);var NB1=`{
    "nodes": [
        {
            "id": "HgU8yP",
            "type": "start",
            "x": 215,
            "y": 103,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "start",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 215,
                "y": 143,
                "value": "\u7EC4\u4EF6_HgU8yP"
            }
        },
        {
            "id": "KBvdCo",
            "type": "end",
            "x": 465,
            "y": 327,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "end",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 465,
                "y": 367,
                "value": "\u7EC4\u4EF6_KBvdCo"
            }
        },
        {
            "id": "hUAGNZ",
            "type": "entity_crud",
            "x": 366,
            "y": 211,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "entity_crud",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "----temp1----",
                    "table": "----temp2----",
                    "type": "----temp4----",
                    "dynamicObj": "----temp3----",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 366,
                "y": 251,
                "value": "\u7EC4\u4EF6_hUAGNZ"
            }
        }
    ],
    "edges": [
        {
            "id": "a0b57498-197c-4cf1-a74d-ca5a671e78d4",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "HgU8yP",
            "targetNodeId": "hUAGNZ",
            "sourceAnchorId": "HgU8yP_outgoing",
            "targetAnchorId": "hUAGNZ_incomming",
            "startPoint": {
                "x": 215,
                "y": 123
            },
            "endPoint": {
                "x": 366,
                "y": 191
            },
            "pointsList": [
                {
                    "x": 215,
                    "y": 123
                },
                {
                    "x": 215,
                    "y": 223
                },
                {
                    "x": 366,
                    "y": 91
                },
                {
                    "x": 366,
                    "y": 191
                }
            ]
        },
        {
            "id": "48b0c3fe-f86d-48b0-b01c-e4c00b259a0b",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "hUAGNZ",
            "targetNodeId": "KBvdCo",
            "sourceAnchorId": "hUAGNZ_outgoing",
            "targetAnchorId": "KBvdCo_incomming",
            "startPoint": {
                "x": 366,
                "y": 231
            },
            "endPoint": {
                "x": 465,
                "y": 307
            },
            "pointsList": [
                {
                    "x": 366,
                    "y": 231
                },
                {
                    "x": 366,
                    "y": 331
                },
                {
                    "x": 465,
                    "y": 207
                },
                {
                    "x": 465,
                    "y": 307
                }
            ]
        }
    ]
}`,AB1=`{
    "nodes": [
        {
            "id": "cZEG6o",
            "type": "start",
            "x": 198,
            "y": 99,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "start",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 198,
                "y": 139,
                "value": "\u7EC4\u4EF6_cZEG6o"
            }
        },
        {
            "id": "Z5PB0v",
            "type": "end",
            "x": 442,
            "y": 352,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "end",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 442,
                "y": 392,
                "value": "\u7EC4\u4EF6_Z5PB0v"
            }
        },
        {
            "id": "6Pluy4",
            "type": "entity_crud",
            "x": 349,
            "y": 207,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "entity_crud",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "----temp1----",
                    "table": "----temp2----",
                    "type": "select",
                    "dynamicObj": "",
                    "template": "----temp3----",
                    "contextKey": "----temp2----"
                }
            },
            "text": {
                "x": 349,
                "y": 247,
                "value": "\u7EC4\u4EF6_6Pluy4"
            }
        },
        {
            "id": "3gYdoB",
            "type": "field_extract",
            "x": 232,
            "y": 314,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "field_extract",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [
                    {
                        "key": "----temp2----[0]",
                        "value": "res"
                    }
                ],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 232,
                "y": 354,
                "value": "\u7EC4\u4EF6_3gYdoB"
            }
        }
    ],
    "edges": [
        {
            "id": "3f24c827-f839-4dc4-8ba7-7f1d8408939c",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "cZEG6o",
            "targetNodeId": "6Pluy4",
            "sourceAnchorId": "cZEG6o_outgoing",
            "targetAnchorId": "6Pluy4_incomming",
            "startPoint": {
                "x": 198,
                "y": 119
            },
            "endPoint": {
                "x": 349,
                "y": 187
            },
            "pointsList": [
                {
                    "x": 198,
                    "y": 119
                },
                {
                    "x": 198,
                    "y": 219
                },
                {
                    "x": 349,
                    "y": 87
                },
                {
                    "x": 349,
                    "y": 187
                }
            ]
        },
        {
            "id": "4a97726b-6d30-4c5d-b8ca-6419069e147a",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "6Pluy4",
            "targetNodeId": "3gYdoB",
            "sourceAnchorId": "6Pluy4_outgoing",
            "targetAnchorId": "3gYdoB_incomming",
            "startPoint": {
                "x": 349,
                "y": 227
            },
            "endPoint": {
                "x": 232,
                "y": 294
            },
            "pointsList": [
                {
                    "x": 349,
                    "y": 227
                },
                {
                    "x": 349,
                    "y": 327
                },
                {
                    "x": 232,
                    "y": 194
                },
                {
                    "x": 232,
                    "y": 294
                }
            ]
        },
        {
            "id": "ec096806-8ae9-4175-bee4-759a80f7de4a",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "3gYdoB",
            "targetNodeId": "Z5PB0v",
            "sourceAnchorId": "3gYdoB_outgoing",
            "targetAnchorId": "Z5PB0v_incomming",
            "startPoint": {
                "x": 232,
                "y": 334
            },
            "endPoint": {
                "x": 442,
                "y": 332
            },
            "pointsList": [
                {
                    "x": 232,
                    "y": 334
                },
                {
                    "x": 232,
                    "y": 434
                },
                {
                    "x": 442,
                    "y": 232
                },
                {
                    "x": 442,
                    "y": 332
                }
            ]
        }
    ]
}`,BB1=`{
    "nodes": [
        {
            "id": "RLCkWt",
            "type": "start",
            "x": 190,
            "y": 81,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "start",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 190,
                "y": 121,
                "value": "\u7EC4\u4EF6_RLCkWt"
            }
        },
        {
            "id": "U0v9KA",
            "type": "end",
            "x": 439,
            "y": 310,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "end",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 439,
                "y": 350,
                "value": "\u7EC4\u4EF6_U0v9KA"
            }
        },
        {
            "id": "pQYPXb",
            "type": "entity_crud",
            "x": 324,
            "y": 201,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "entity_crud",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "----temp1----",
                    "table": "----temp2----",
                    "type": "delete",
                    "dynamicObj": "",
                    "template": "----temp3----",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 324,
                "y": 241,
                "value": "\u7EC4\u4EF6_pQYPXb"
            }
        }
    ],
    "edges": [
        {
            "id": "0c95da3d-464b-4eb9-92f2-50f0e1a02bb7",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "RLCkWt",
            "targetNodeId": "pQYPXb",
            "sourceAnchorId": "RLCkWt_outgoing",
            "targetAnchorId": "pQYPXb_incomming",
            "startPoint": {
                "x": 190,
                "y": 101
            },
            "endPoint": {
                "x": 324,
                "y": 181
            },
            "pointsList": [
                {
                    "x": 190,
                    "y": 101
                },
                {
                    "x": 190,
                    "y": 201
                },
                {
                    "x": 324,
                    "y": 81
                },
                {
                    "x": 324,
                    "y": 181
                }
            ]
        },
        {
            "id": "fe158934-0c55-4557-b982-fff19bd8d700",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "pQYPXb",
            "targetNodeId": "U0v9KA",
            "sourceAnchorId": "pQYPXb_outgoing",
            "targetAnchorId": "U0v9KA_incomming",
            "startPoint": {
                "x": 324,
                "y": 221
            },
            "endPoint": {
                "x": 439,
                "y": 290
            },
            "pointsList": [
                {
                    "x": 324,
                    "y": 221
                },
                {
                    "x": 324,
                    "y": 321
                },
                {
                    "x": 439,
                    "y": 190
                },
                {
                    "x": 439,
                    "y": 290
                }
            ]
        }
    ]
}`,OB1=`{
    "nodes": [
        {
            "id": "cZEG6o",
            "type": "start",
            "x": 220,
            "y": 74,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "start",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 220,
                "y": 114,
                "value": "\u7EC4\u4EF6_cZEG6o"
            }
        },
        {
            "id": "Z5PB0v",
            "type": "end",
            "x": 213,
            "y": 388,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "end",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 213,
                "y": 428,
                "value": "\u7EC4\u4EF6_Z5PB0v"
            }
        },
        {
            "id": "6Pluy4",
            "type": "entity_crud",
            "x": 308,
            "y": 249,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "entity_crud",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "----temp1----",
                    "table": "----temp2----",
                    "type": "select",
                    "dynamicObj": "",
                    "template": "----temp3----",
                    "contextKey": "----temp2----"
                }
            },
            "text": {
                "x": 308,
                "y": 289,
                "value": "\u7EC4\u4EF6_6Pluy4"
            }
        },
        {
            "id": "3gYdoB",
            "type": "field_extract",
            "x": 433,
            "y": 369,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "field_extract",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [
                    {
                        "key": "----temp2----",
                        "value": "list"
                    },
                    {
                        "key": "total[0].total",
                        "value": "total"
                    }
                ],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 433,
                "y": 409,
                "value": "\u7EC4\u4EF6_3gYdoB"
            }
        },
        {
            "id": "4a8C2E",
            "type": "field_inject",
            "x": 399,
            "y": 125,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "field_inject",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [
                    {
                        "isCheck": true,
                        "key": "offset",
                        "value": "number0",
                        "msg": ""
                    },
                    {
                        "isCheck": true,
                        "key": "limit",
                        "value": "number0",
                        "msg": ""
                    }
                ],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 399,
                "y": 165,
                "value": "\u7EC4\u4EF6_4a8C2E"
            }
        },
        {
            "id": "j0VExq",
            "type": "code_custom",
            "x": 568,
            "y": 176,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "code_custom",
                "codeCustom": ----temp5----,
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "",
                    "table": "",
                    "type": "",
                    "dynamicObj": "",
                    "template": "",
                    "contextKey": ""
                }
            },
            "text": {
                "x": 568,
                "y": 216,
                "value": "\u7EC4\u4EF6_j0VExq"
            }
        },
        {
            "id": "uQZkC8",
            "type": "entity_crud",
            "x": 599,
            "y": 296,
            "properties": {
                "width": 140,
                "height": 40,
                "flowNodeType": "entity_crud",
                "codeCustom": "",
                "mysqlCustom": {},
                "ifelse": {},
                "toolHttp": {},
                "transactionalBlock": {
                    "blockRef_0": "",
                    "blockRef_1": "",
                    "blockRef_2": "",
                    "blockRef_3": "",
                    "blockRef_4": "",
                    "dataSourceSelected": ""
                },
                "fieldVerify": [],
                "fieldInject": [],
                "fieldExtract": [],
                "loopBody": [],
                "logCustom": "",
                "entityCrud": {
                    "poolCode": "----temp1----",
                    "table": "----temp2----",
                    "type": "select",
                    "dynamicObj": "",
                    "template": "select count(1)  as total from ----temp2----",
                    "contextKey":"total"
                }
            },
            "text": {
                "x": 599,
                "y": 336,
                "value": "\u7EC4\u4EF6_uQZkC8"
            }
        }
    ],
    "edges": [
        {
            "id": "ec096806-8ae9-4175-bee4-759a80f7de4a",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "3gYdoB",
            "targetNodeId": "Z5PB0v",
            "sourceAnchorId": "3gYdoB_outgoing",
            "targetAnchorId": "Z5PB0v_incomming",
            "startPoint": {
                "x": 433,
                "y": 389
            },
            "endPoint": {
                "x": 213,
                "y": 368
            },
            "pointsList": [
                {
                    "x": 433,
                    "y": 389
                },
                {
                    "x": 433,
                    "y": 489
                },
                {
                    "x": 213,
                    "y": 268
                },
                {
                    "x": 213,
                    "y": 368
                }
            ]
        },
        {
            "id": "65874349-44a9-4f42-a3f4-d0e9651731bc",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "cZEG6o",
            "targetNodeId": "4a8C2E",
            "sourceAnchorId": "cZEG6o_outgoing",
            "targetAnchorId": "4a8C2E_incomming",
            "startPoint": {
                "x": 220,
                "y": 94
            },
            "endPoint": {
                "x": 399,
                "y": 105
            },
            "pointsList": [
                {
                    "x": 220,
                    "y": 94
                },
                {
                    "x": 220,
                    "y": 194
                },
                {
                    "x": 399,
                    "y": 5
                },
                {
                    "x": 399,
                    "y": 105
                }
            ]
        },
        {
            "id": "dc210261-3f86-44e4-a236-fa656908f887",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "4a8C2E",
            "targetNodeId": "j0VExq",
            "sourceAnchorId": "4a8C2E_outgoing",
            "targetAnchorId": "j0VExq_incomming",
            "startPoint": {
                "x": 399,
                "y": 145
            },
            "endPoint": {
                "x": 568,
                "y": 156
            },
            "pointsList": [
                {
                    "x": 399,
                    "y": 145
                },
                {
                    "x": 399,
                    "y": 245
                },
                {
                    "x": 568,
                    "y": 56
                },
                {
                    "x": 568,
                    "y": 156
                }
            ]
        },
        {
            "id": "fbd38aef-b374-4f6f-acd4-2dd29ecdc299",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "j0VExq",
            "targetNodeId": "6Pluy4",
            "sourceAnchorId": "j0VExq_outgoing",
            "targetAnchorId": "6Pluy4_incomming",
            "startPoint": {
                "x": 568,
                "y": 196
            },
            "endPoint": {
                "x": 308,
                "y": 229
            },
            "pointsList": [
                {
                    "x": 568,
                    "y": 196
                },
                {
                    "x": 568,
                    "y": 296
                },
                {
                    "x": 308,
                    "y": 129
                },
                {
                    "x": 308,
                    "y": 229
                }
            ]
        },
        {
            "id": "a5c0cc02-65eb-452a-b45c-3fcfc1ff0ac6",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "6Pluy4",
            "targetNodeId": "uQZkC8",
            "sourceAnchorId": "6Pluy4_outgoing",
            "targetAnchorId": "uQZkC8_incomming",
            "startPoint": {
                "x": 308,
                "y": 269
            },
            "endPoint": {
                "x": 599,
                "y": 276
            },
            "pointsList": [
                {
                    "x": 308,
                    "y": 269
                },
                {
                    "x": 308,
                    "y": 369
                },
                {
                    "x": 599,
                    "y": 176
                },
                {
                    "x": 599,
                    "y": 276
                }
            ]
        },
        {
            "id": "fa7a8ce7-34ca-45c0-bed4-af1b29efcc5e",
            "type": "bezier",
            "properties": {},
            "sourceNodeId": "uQZkC8",
            "targetNodeId": "3gYdoB",
            "sourceAnchorId": "uQZkC8_outgoing",
            "targetAnchorId": "3gYdoB_incomming",
            "startPoint": {
                "x": 599,
                "y": 316
            },
            "endPoint": {
                "x": 433,
                "y": 349
            },
            "pointsList": [
                {
                    "x": 599,
                    "y": 316
                },
                {
                    "x": 599,
                    "y": 416
                },
                {
                    "x": 433,
                    "y": 249
                },
                {
                    "x": 433,
                    "y": 349
                }
            ]
        }
    ]
}`;var nK=B6("sys_apimanager",{id:g0("id"),name:g0("name"),code:g0("code"),parames:g0("parames"),type:g0("type"),flow_data:g0("flow_data"),project:g0("project"),status:m1("status"),simplify:g0("simplify"),sourceType:g0("sourceType"),remark:g0("remark"),createdAt:m1("createdAt"),updatedAt:m1("updatedAt"),latest_visitAt:m1("latest_visitAt"),createBy:g0("createBy"),updateBy:g0("updateBy"),env_id:g0("env_id")});async function RP($){return await e0.select().from(nK).where(_1(nK.code,$))}function EB1($){let Y=r.raw("1 = 1");if($.type&&$.type=="dataplug")Y.append(r.raw(" and (type = '1' or type = '2')"));if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or project like '%${$.searchVal}%' or code like '%${$.searchVal}%')`));if($.code&&$.code.length>0)Y.append(r.raw(` and code like '%${$.code}%'`));if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));return Y}async function MB1($){return await e0.select().from(nK).where(EB1($)).orderBy(sQ(r.raw("createdAt"))).limit(Number($.limit)).offset(Number($.offset))}async function RB1($){return await e0.$count(nK,EB1($))}async function qP($){let Y=await e0.$count(nK,_1(nK.code,$.code));if(Y&&Y>0)Kr6($);else{if(!$.simplify)$.simplify="{}";let X=Date.now();$.id=C6(),$.code=C6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,$.status=1,$.project="\u9ED8\u8BA4",await e0.insert(nK).values($)}}async function Kr6($){let Y=Date.now();$.updateBy="admin",$.updatedAt=Y,$.latest_visitAt=Y,await e0.update(nK).set($).where(_1(nK.code,$.code))}async function qB1($){await e0.delete(nK).where(_1(nK.code,$))}var tJ=B6("sys_apimanager_proxy",{id:g0("id"),name:g0("name"),code:g0("code"),path1:g0("path1"),remark:g0("remark"),createdAt:m1("createdAt"),updatedAt:m1("updatedAt"),createBy:g0("createBy"),updateBy:g0("updateBy"),env_id:g0("env_id")});async function GB($){return await e0.select().from(tJ).where(_1(tJ.path1,$))}async function wB1(){return await e0.select().from(tJ)}function _B1($){let Y=r.raw("1 = 1");if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or path1 like '%${$.searchVal}%' or code like '%${$.searchVal}%')`));if($.code&&$.code.length>0)Y.append(r.raw(` and code like '%${$.code}%'`));if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));return Y}async function jB1($){return await e0.select().from(tJ).where(_B1($)).orderBy(sQ(r.raw("createdAt"))).limit(Number($.limit)).offset(Number($.offset))}async function TB1($){return await e0.$count(tJ,_B1($))}async function PP($){let Y=await e0.$count(tJ,_1(tJ.code,$.code));if(Y&&Y>0)Zr6($);else{let X=Date.now();$.id=C6(),$.code=C6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await e0.insert(tJ).values($)}}async function Zr6($){let Y=Date.now();$.updateBy="admin",$.updatedAt=Y,await e0.update(tJ).set($).where(_1(tJ.code,$.code))}async function IB1($){await e0.delete(tJ).where(_1(tJ.code,$))}async function CB1($){await e0.delete(tJ).where(_1(tJ.path1,$))}var JB=new _4;JB.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};q6(Y,$.req.query());let X=await MB1(Y),G=await RB1(Y),J=$1();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});JB.post("/save",async($)=>{try{let Y=await $.req.json(),X={};q6(X,Y),await qP(X);let{path1:G,path2:J}=Y;if(G&&G&&String(G).length>0&&String(J).length>0){let W={name:X.name,path1:G,path2:J,target:X.code};await yH(W)}let Q=$1();return Q.data={success:!0},$.json(Q)}catch(Y){throw console.error(Y),new v0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});JB.post("/delete",async($)=>{try{let Y=await $.req.json();await qB1(Y.code);let X=$1();return $.json(X)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5220\u9664\u5931\u8D25"})}});JB.post("/saveCrud",async($)=>{try{let Y=await $.req.json(),X=Y.sourceType,G=Y.poolCode,J=Y.table,Q=Y.name,W=Y.path1,K=Y.path1Select,Z=Y.folders&&Y.folders.length>0?`${Y.folders}.`:"",H;if(K&&String(K).length>0)H=K;else if(W&&String(W).length>0)if(H=W,(await GB(W))[0])throw Error("\u8F93\u5165\u7684\u4E00\u7EA7\u8DEF\u5F84\u5DF2\u7ECF\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165");else await PP({name:Q,path1:H});else throw Error("\u7F3A\u5C11\u8F93\u5165\u4E00\u7EA7\u8DEF\u5F84");await gx(J,G,"insert",X,H,Z),await gx(J,G,"update",X,H,Z),await eV0(J,G,X,H,Z),await $F0(J,G,X,H,Z),await YF0(J,G,X,H,Z);let z=$1();return z.data={success:!0},$.json(z)}catch(Y){throw console.error(Y),new v0(500,{message:`${Y}`})}});async function gx($,Y,X,G,J,Q){let W={},K;if(X=="insert")K=`[${$}]\u65B0\u589E\u6570\u636E`;else K=`[${$}]\u66F4\u65B0\u6570\u636E`;let Z={},H=!1;if(G=="mysql"){let L=await uX(Y),N=r.join([r`SHOW FULL COLUMNS`,r.raw(`\`${$}\``)],r` FROM `),D=await L.execute(N.getSQL());if(D[0]&&a8(D[0]))D[0].forEach((B)=>{if(Z[B.Field]=`{{${B.Field}}}`,String(B.Field)=="id"||String(B.Field)=="ID")H=!0})}else if(G=="postgres"){let L=await pX(Y),N=r`SELECT 
	            C.COLUMN_NAME AS Field,
	            C.data_type AS TYPE 
            FROM
	            information_schema.tables T JOIN information_schema.COLUMNS C ON T.TABLE_NAME = C.TABLE_NAME 
                AND T.table_schema = C.table_schema 
            WHERE T.table_schema NOT IN ( 'information_schema', 'pg_catalog' ) 
	                AND T.TABLE_NAME = ${$}`,D=await L.execute(N.getSQL());if(D.rows&&a8(D.rows))D.rows.forEach((B)=>{if(q$(B.type)){if(Z[B.field]=`{{${B.field}}}`,String(B.field)=="id"||String(B.field)=="ID")H=!0}})}else if(G=="oracle"){let L=await lX(Y),N=`SELECT
              column_name AS Field,
              data_type AS TYPE ,
              data_length AS LENGTH,
              nullable AS NULLABLE
            FROM
              all_tab_columns 
            WHERE
              table_name = '${$}'`,D=await L.execute(`${N}`,[],{outFormat:SB1.default.OUT_FORMAT_OBJECT});if(D.rows&&a8(D.rows))D.rows.forEach((B)=>{if(String(B.FIELD)=="id"||String(B.FIELD)=="ID")Z.id=`{{${B.FIELD}}}`,H=!0;else Z[B.FIELD]=`{{${B.FIELD}}}`})}else if(G=="sqlite"){let L=await WX(Y),N=`PRAGMA table_info(${$})`,D=L.all(r.raw(N));if(D&&a8(D))D.forEach((A)=>{if(q$(A.type)){if(Z[A.name]=`{{${A.name}}}`,String(A.name)=="id"||String(A.name)=="ID")H=!0}})}if(!H)throw Error("\u9009\u62E9\u7684\u8868\u7F3A\u5C11id\u5B57\u6BB5");let z="3",V=NB1;V=n1(V,"----temp1----",Y),V=n1(V,"----temp2----",$),V=n1(V,"----temp4----",X),V=n1(V,"----temp3----",JSON.stringify(Z).replaceAll('"',"\\\"")),W.name=K,W.parames=JSON.stringify(Z),W.type=z,W.flow_data=V,W.simplify="{}",await qP(W);let F={name:K,path1:J,path2:`${X}`,target:W.code};return await yH(F),W.code}async function eV0($,Y,X,G,J){let Q={},W=`[${$}]\u67E5\u8BE2\u6570\u636E`,K={id:"{{id}}"},Z="3",H=AB1;H=n1(H,"----temp1----",Y),H=n1(H,"----temp2----",$),H=n1(H,"----temp2----",$),H=n1(H,"----temp2----",$),H=n1(H,"----temp3----",`select * from ${J}${$} where id = '{{id}}'`),Q.name=W,Q.parames=JSON.stringify(K),Q.type="3",Q.flow_data=H,Q.simplify="{}",await qP(Q);let z={name:W,path1:G,path2:"select",target:Q.code};return await yH(z),Q.code}async function $F0($,Y,X,G,J){let Q={},W=`[${$}]\u5220\u9664\u6570\u636E`,K={id:"{{id}}"},Z="3",H=BB1;H=n1(H,"----temp1----",Y),H=n1(H,"----temp2----",$),H=n1(H,"----temp3----",`delete from ${J}${$} where id = '{{id}}'`),Q.name=W,Q.parames=JSON.stringify(K),Q.type="3",Q.flow_data=H,Q.simplify="{}",await qP(Q);let z={name:W,path1:G,path2:"delete",target:Q.code};return await yH(z),Q.code}function Ur6($){if(typeof $!=="string")throw TypeError("Input must be a string");return JSON.stringify($)}async function YF0($,Y,X,G,J){let Q={},W="";if(X=="mysql")W=`select * from ${J}${$} LIMIT {{offset}},{{limit}}`;else if(X=="postgres")W=`select * from ${J}${$} LIMIT {{limit}} OFFSET {{offset}}`;else if(X=="oracle")W=`select * from ${J}${$} OFFSET {{offset}} ROWS FETCH NEXT {{limit}} ROWS ONLY`;else if(X=="sqlite")W=`select * from ${J}${$} LIMIT {{limit}} OFFSET {{offset}}`;let K=`[${$}]\u5206\u9875\u67E5\u8BE2\u6570\u636E`,Z={pageNumber:"{{pageNumber}}",pageSize:"{{pageSize}}"},H="3",z=`// \u5B9A\u4E49\u51FD\u6570\r
function isNumber(val) {\r
  return toString.call(val) === "[object Number]" || toString.call(val) === "[object String]";\r
}\r
// \u4E1A\u52A1\u903B\u8F91\r
if (isNumber(pageNumber) && isNumber(pageSize)) {\r
    offset = (pageNumber - 1) * pageSize\r
    limit = pageSize\r
}\r
`,V=OB1;V=n1(V,"----temp1----",Y),V=n1(V,"----temp1----",Y),V=n1(V,"----temp2----",$),V=n1(V,"----temp2----",$),V=n1(V,"----temp2----",$),V=n1(V,"----temp2----",$),V=n1(V,"----temp2----",$),V=n1(V,"----temp3----",W),V=n1(V,"----temp5----",Ur6(z)),Q.name=K,Q.parames=JSON.stringify(Z),Q.type=H,Q.flow_data=V,Q.simplify="{}",await qP(Q);let F={name:K,path1:G,path2:"selectPage",target:Q.code};return await yH(F),Q.code}JB.post("/queryByCode",async($)=>{try{let Y=await $.req.json(),X=await RP(Y.code),G=$1();return G.data=X,$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});JB.post("/saveToProxy",async($)=>{try{let Y=await $.req.json(),X=Y.path1,G=Y.path2;if(X&&X&&String(X).length>0&&String(G).length>0){let Q={name:Y.name,path1:X,path2:G,target:Y.code};await yH(Q)}let J=$1();return J.data={success:!0},$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});var kB1=JB;var vB1=U6(xN(),1);var Gz=new _4;Gz.get("/generate",async($)=>{try{let Y=$.req.query().dayNum,X=await cH(Number(Y)),G=$1();return G.data={jwt:X},$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u751F\u6210\u5931\u8D25"})}});Gz.post("/activate",async($)=>{try{let Y=await $.req.json(),X={name:"\u7CFB\u7EDF\u51ED\u8BC1",code:"license",val:JSON.stringify({license:Y.license})};await kk(X);let G=$1();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u6FC0\u6D3B\u5931\u8D25"})}});Gz.get("/initConfig",async($)=>{try{let Y={name:"\u7BA1\u7406\u5458\u8D26\u53F7",code:"admin_account",val:JSON.stringify({username:"admin",password:"123456"})};await kk(Y);let X=$1();return X.data={success:!0},$.json(X)}catch(Y){throw console.error(Y),new v0(500,{message:"\u521D\u59CB\u5316\u5931\u8D25"})}});Gz.get("/initLogTable",async($)=>{try{let X=new vB1.default({length:10}).randomUUID();await U71(5000);let G=$1();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u521D\u59CB\u5316\u5931\u8D25"})}});Gz.get("/queryActivate",async($)=>{try{let Y=await Sk("license"),X=JSON.parse(Y),G=await rk(X.license),J=$1();return J.data={activate:G},$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u83B7\u53D6\u5931\u8D25"})}});Gz.post("/updatePassword",async($)=>{try{let Y=await $.req.json(),X=Y.password?Y.password:"123456",G={name:"\u7BA1\u7406\u5458\u8D26\u53F7",code:"admin_account",val:JSON.stringify({username:"admin",password:X})};await kk(G);let J=$1();return J.data={success:!0},$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u66F4\u65B0\u5931\u8D25"})}});Gz.get("/queryConfig",async($)=>{try{let Y=await Sk("system_config"),X=JSON.parse(Y),G=$1();return G.data={config:X},$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u83B7\u53D6\u5931\u8D25"})}});Gz.post("/updateConfig",async($)=>{try{let Y=await $.req.json(),X=Y.title&&Y.title.length>0?Y.title:"",G=Y.footer&&Y.footer.length>0?Y.footer:"",J={name:"\u7CFB\u7EDF\u914D\u7F6E",code:"system_config",val:JSON.stringify({title:X,footer:G})};await kk(J);let Q=$1();return Q.data={success:!0},$.json(Q)}catch(Y){throw console.error(Y),new v0(500,{message:"\u66F4\u65B0\u5931\u8D25"})}});var xB1=Gz;var Jz=B6("sys_dataplug",{id:g0("id"),name:g0("name"),code:g0("code"),parames:g0("parames"),type:g0("type"),flow_data:g0("flow_data"),createdAt:m1("createdAt"),updatedAt:m1("updatedAt"),latest_visitAt:m1("latest_visitAt"),createBy:g0("createBy"),updateBy:g0("updateBy"),env_id:g0("env_id")});function yB1($){let Y=r.raw("1 = 1");if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or project like '%${$.searchVal}%')`));return Y}async function bB1($){return await e0.select().from(Jz).where(yB1($)).limit(Number($.limit)).offset(Number($.offset))}async function hB1($){return await e0.$count(Jz,yB1($))}async function fB1($){let Y=await e0.$count(Jz,_1(Jz.code,$.code));if(Y&&Y>0)Hr6($);else{let X=Date.now();$.id=C6(),$.code=C6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,$.type="0",await e0.insert(Jz).values($)}}async function Hr6($){let Y=Date.now();$.updateBy="admin",$.updatedAt=Y,$.latest_visitAt=Y,await e0.update(Jz).set($).where(_1(Jz.code,$.code))}async function gB1($){await e0.delete(Jz).where(_1(Jz.code,$))}var Ts=new _4;Ts.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};q6(Y,$.req.query());let X=await bB1(Y),G=await hB1(Y),J=$1();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});Ts.post("/save",async($)=>{try{let Y=await $.req.json(),X={};q6(X,Y),await fB1(X);let G=$1();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});Ts.post("/delete",async($)=>{try{let Y=await $.req.json();await gB1(Y.code);let X=$1();return $.json(X)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var mB1=Ts;function Is($,Y){Y.forEach((X)=>{if(String(X.Type).includes("datetime")||String(X.Type).includes("date")||String(X.Type).includes("timestamp")){let G=D4($,X.Field);if(G)i1($,X.Field,eR(G))}})}async function Cs($,Y){let X=$.poolCode;if(!X||X.length==0)throw Error("poolCode\u4E0D\u80FD\u4E3A\u7A7A");let G=await uX(X);if(Y&&Y=="2"){let J=$.sql;delete $.sql,delete $.poolCode;let Q=N7(J,/{{(.*?)}}/g);if(a8(Q))Q.forEach((K)=>{let Z=n1(n1(K,"{{",""),"}}","");if(Z.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4($,Z)))throw Error(`${Z}\u53D6\u503C\u5931\u8D25`);J=n1(J,`{{${Z}}}`,$[Z])});return{data:(await G.execute(r.raw(J)))[0]}}else{if(q$($))$=JSON.parse($);$=D7($);let J="select";if($&&$.type)J=$.type;let Q=D7($.dynamicObj);if(!Q)Q={};let W=$.table;if(!W||W.length==0)throw Error("table\u4E0D\u80FD\u4E3A\u7A7A");let K=$.pageNum?$.pageNum:1,Z=$.pageSize?$.pageSize:10,H=$.orderBy?$.orderBy:"id",z=$.orderByCommand?$.orderByCommand:"desc",V=$.id,F=r.join([r`SHOW FULL COLUMNS`,r.raw(`\`${W}\``)],r` FROM `),L=await G.execute(F.getSQL());if(L[0]&&a8(L[0])){let N=L[0],D={};if(N.forEach((A)=>{if(q$(A.Type)){if(String(A.Type).includes("tinyint"))D[A.Field]=dv(A.Field);else if(String(A.Type).includes("smallint"))D[A.Field]=fv(A.Field);else if(String(A.Type).includes("mediumint"))D[A.Field]=yv(A.Field);else if(String(A.Type).includes("bigint"))D[A.Field]=Pv(A.Field,{mode:"number"});else if(String(A.Type).includes("int"))D[A.Field]=vv(A.Field);else if(String(A.Type).includes("real"))D[A.Field]=bv(A.Field);else if(String(A.Type).includes("decimal"))D[A.Field]=Cv(A.Field);else if(String(A.Type).includes("double"))D[A.Field]=Sv(A.Field);else if(String(A.Type).includes("float"))D[A.Field]=kv(A.Field);else if(String(A.Type).includes("serial"))D[A.Field]=hv(A.Field);else if(String(A.Type).includes("varbinary"))D[A.Field]=cv(A.Field,{length:255});else if(String(A.Type).includes("binary"))D[A.Field]=wv(A.Field);else if(String(A.Type).includes("varchar"))D[A.Field]=lv(A.Field,{length:255});else if(String(A.Type).includes("char"))D[A.Field]=jv(A.Field);else if(String(A.Type).includes("text"))D[A.Field]=mv(A.Field);else if(String(A.Type).includes("boolean"))D[A.Field]=_v(A.Field);else if(String(A.Type).includes("datetime"))D[A.Field]=Iv(A.Field,{mode:"string"});else if(String(A.Type).includes("date"))D[A.Field]=Tv(A.Field,{mode:"string"});else if(String(A.Type).includes("timestamp"))D[A.Field]=pv(A.Field,{mode:"string"});else if(String(A.Type).includes("time"))D[A.Field]=uv(A.Field);else if(String(A.Type).includes("year"))D[A.Field]=iv(A.Field);else if(String(A.Type).includes("json"))D[A.Field]=xv(A.Field)}}),J=="insert"){Is(Q,N);let A=await G.insert(sH(W,D)).values(Q).$returningId();return{data:"success"}}else if(J=="update"){if(!V||V.length==0)throw Error("id\u4E0D\u80FD\u4E3A\u7A7A");Is(Q,N);let A=await G.update(sH(W,D)).set(Q).where(r.join([r.raw("id"),r`${V}`],r` = `));return{data:"success"}}else if(J=="delete"){if(!V||V.length==0)throw Error("id\u4E0D\u80FD\u4E3A\u7A7A");let A=await G.delete(sH(W,D)).where(r.join([r.raw("id"),r`${V}`],r` = `));return{data:"success"}}else if(J=="select"||J=="count"){let A=[];if(A.push(r`1 = 1`),V)A.push(r.join([r.raw("id"),r`${V}`],r` = `));Object.keys(Q).forEach((M)=>{if(xK(Q[M].value)&&!gX(Q[M].value,"undefined"))switch(Q[M].command){case"eq":A.push(r.join([r.raw(`${M}`),r`${Q[M].value}`],r` = `));break;case"ne":A.push(r.join([r.raw(`${M}`),r`${Q[M].value}`],r` != `));break;case"gt":A.push(r.join([r.raw(`${M}`),r`${Q[M].value}`],r` > `));break;case"gte":A.push(r.join([r.raw(`${M}`),r`${Q[M].value}`],r` >= `));break;case"lt":A.push(r.join([r.raw(`${M}`),r`${Q[M].value}`],r` < `));break;case"lte":A.push(r.join([r.raw(`${M}`),r`${Q[M].value}`],r` <= `));break;case"isNull":A.push(r.join([r.raw(`${M}`)],r` is null `));break;case"isNotNull":A.push(r.join([r.raw(`${M}`)],r` is not null `));break;case"inArray":break;case"notInArray":break;case"exists":break;case"notExists":break;case"between":break;case"notBetween":break;case"like":A.push(r.join([r.raw(`${M}`),r`CONCAT('%',${Q[M].value},'%')`],r` like `));break;case"ilike":break;case"notIlike":break;case"not":break;case"and":break;case"or":break;case"arrayContains":break;case"arrayContained":break;case"arrayOverlaps":break;default:break}});let B=r.join(A,r` and `);if(J=="count"){let M=await G.select({count:r`count(*)`.mapWith(Number)}).from(sH(W,D)).where(B);return{data:{count:M[0]?M[0].count:0}}}let O=await G.select().from(sH(W,D)).where(B).orderBy(z=="desc"?sQ(r.raw(H)):SH(r.raw(H))).limit(Number(Z)).offset(Number((K-1)*Z)),E=await G.select({count:r`count(*)`.mapWith(Number)}).from(sH(W,D)).where(B);return{data:O,total:E[0]?E[0].count:0}}else throw Error("\u64CD\u4F5C\u7C7B\u578B\u65E0\u6548")}else throw Error("\u8868\u4E0D\u5B58\u5728")}}async function uB1($,Y){let X=await uX($),G=r.join([r`SHOW FULL COLUMNS`,r.raw(`\`${Y}\``)],r` FROM `),Q=(await X.execute(G.getSQL()))[0],W={};return Q.forEach((K)=>{if(q$(K.Type)){if(String(K.Type).includes("tinyint"))W[K.Field]=dv(K.Field);else if(String(K.Type).includes("smallint"))W[K.Field]=fv(K.Field);else if(String(K.Type).includes("mediumint"))W[K.Field]=yv(K.Field);else if(String(K.Type).includes("bigint"))W[K.Field]=Pv(K.Field,{mode:"number"});else if(String(K.Type).includes("int"))W[K.Field]=vv(K.Field);else if(String(K.Type).includes("real"))W[K.Field]=bv(K.Field);else if(String(K.Type).includes("decimal"))W[K.Field]=Cv(K.Field);else if(String(K.Type).includes("double"))W[K.Field]=Sv(K.Field);else if(String(K.Type).includes("float"))W[K.Field]=kv(K.Field);else if(String(K.Type).includes("serial"))W[K.Field]=hv(K.Field);else if(String(K.Type).includes("varbinary"))W[K.Field]=cv(K.Field,{length:255});else if(String(K.Type).includes("binary"))W[K.Field]=wv(K.Field);else if(String(K.Type).includes("varchar"))W[K.Field]=lv(K.Field,{length:255});else if(String(K.Type).includes("char"))W[K.Field]=jv(K.Field);else if(String(K.Type).includes("text"))W[K.Field]=mv(K.Field);else if(String(K.Type).includes("boolean"))W[K.Field]=_v(K.Field);else if(String(K.Type).includes("datetime"))W[K.Field]=Iv(K.Field,{mode:"string"});else if(String(K.Type).includes("date"))W[K.Field]=Tv(K.Field,{mode:"string"});else if(String(K.Type).includes("timestamp"))W[K.Field]=pv(K.Field,{mode:"string"});else if(String(K.Type).includes("time"))W[K.Field]=uv(K.Field);else if(String(K.Type).includes("year"))W[K.Field]=iv(K.Field);else if(String(K.Type).includes("json"))W[K.Field]=xv(K.Field)}}),{fields:Q,schema:W}}async function pB1($,Y,X){let G=await uX($),J=await uB1($,Y);return Is(X,J.fields),await G.insert(sH(Y,J.schema)).values(X).$returningId()}async function dB1($,Y,X,G){let J=await uX($),Q=await uB1($,Y);return Is(X,Q.fields),await J.update(sH(Y,Q.schema)).set(X).where(r.join([r.raw("id"),r`${G}`],r` = `))}async function XF0($,Y){return(await(await uX($)).execute(r.raw(Y)))[0]}function mx($,Y){let X=$,G=N7($,/{{(.*?)}}/g);if(a8(G))G.forEach((J)=>{let Q=n1(n1(J,"{{",""),"}}","");if(Q.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4(Y,Q)))throw Error(`${Q}\u53D6\u503C\u5931\u8D25`);X=n1(X,`{{${Q}}}`,D4(Y,Q))});return X}var lB1=new _4;lB1.post("/",async($)=>{try{let Y=$.req.query("type"),X=await $.req.json(),G=await Cs(X,Y),J=$1();return J.data=G.data,J.total=G.total,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u64CD\u4F5C\u5931\u8D25"})}});var iB1=lB1;function Ss($,Y){Y.forEach((X)=>{if(X.type.includes("time")||X.type.includes("date")||X.type.includes("timestamp")){let G=D4($,X.field);if(G)i1($,X.field,eR(G))}})}async function ks($,Y){let X=$.poolCode;if(!X||X.length==0)throw Error("poolCode\u4E0D\u80FD\u4E3A\u7A7A");let G=await pX(X);if(Y&&Y=="2"){let J=$.sql;delete $.sql,delete $.poolCode;let Q=N7(J,/{{(.*?)}}/g);if(a8(Q))Q.forEach((K)=>{let Z=n1(n1(K,"{{",""),"}}","");if(Z.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4($,Z)))throw Error(`${Z}\u53D6\u503C\u5931\u8D25`);J=n1(J,`{{${Z}}}`,$[Z])});return{data:(await G.execute(r.raw(J))).rows}}else{if(q$($))$=JSON.parse($);$=D7($);let J="select";if($&&$.type)J=$.type;let Q=D7($.dynamicObj);if(!Q)Q={};let{folders:W,table:K}=$;if(!K||K.length==0)throw Error("table\u4E0D\u80FD\u4E3A\u7A7A");let Z=$.pageNum?$.pageNum:1,H=$.pageSize?$.pageSize:10,z=$.orderBy?$.orderBy:"id",V=$.orderByCommand?$.orderByCommand:"desc",F=$.id,L=r`SELECT 
	            C.COLUMN_NAME AS Field,
	            C.data_type AS TYPE 
            FROM
	            information_schema.tables T JOIN information_schema.COLUMNS C ON T.TABLE_NAME = C.TABLE_NAME 
                AND T.table_schema = C.table_schema 
            WHERE T.table_schema NOT IN ( 'information_schema', 'pg_catalog' ) 
	                AND T.TABLE_NAME = ${K}`,N=await G.execute(L.getSQL());if(N.rows&&a8(N.rows)){let D=N.rows,A={};D.forEach((O)=>{if(q$(O.type)){if(String(O.type).includes("integer"))A[O.field]=xS(O.field);else if(String(O.type).includes("smallint"))A[O.field]=uS(O.field);else if(String(O.type).includes("bigint"))A[O.field]=TS(O.field,{mode:"number"});else if(String(O.type).includes("serial"))A[O.field]=mS(O.field);else if(String(O.type).includes("smallserial"))A[O.field]=pS(O.field);else if(String(O.type).includes("bigserial"))A[O.field]=IS(O.field);else if(String(O.type).includes("boolean"))A[O.field]=CS(O.field);else if(String(O.type).includes("text"))A[O.field]=dS(O.field);else if(String(O.type).includes("character")&&String(O.Type).includes("var"))A[O.field]=iS(O.field,{length:255});else if(String(O.type).includes("character"))A[O.field]=SS(O.field,{length:255});else if(String(O.type).includes("numeric")||String(O.Type).includes("decimal"))A[O.field]=fS(O.field,{mode:"number"});else if(String(O.type).includes("real"))A[O.field]=gS(O.field);else if(String(O.type).includes("double"))A[O.field]=vS(O.field);else if(String(O.type).includes("json"))A[O.field]=bS(O.field);else if(String(O.type).includes("jsonb"))A[O.field]=hS(O.field);else if(String(O.type).includes("timestamp"))A[O.field]=lS(O.field);else if(String(O.type).includes("time"))A[O.field]=cS(O.field);else if(String(O.type).includes("date"))A[O.field]=kS(O.field,{mode:"string"});else if(String(O.type).includes("interval"))A[O.field]=yS(O.field)}});let B;if(W&&W.length>0)B=Da(W).table(K,A);else B=mN(K,A);if(J=="insert"){Ss(Q,D);let O=await G.insert(B).values(Q);return{data:"success"}}else if(J=="update"){if(!F||F.length==0)throw Error("id\u4E0D\u80FD\u4E3A\u7A7A");Ss(Q,D);let O=await G.update(B).set(Q).where(r.join([r.raw("id"),r`${F}`],r` = `));return{data:"success"}}else if(J=="delete"){if(!F||F.length==0)throw Error("id\u4E0D\u80FD\u4E3A\u7A7A");let O=await G.delete(B).where(r.join([r.raw("id"),r`${F}`],r` = `));return{data:"success"}}else if(J=="select"||J=="count"){let O=[];if(O.push(r`1 = 1`),F)O.push(r.join([r.raw("id"),r`${F}`],r` = `));Object.keys(Q).forEach((q)=>{if(xK(Q[q].value)&&!gX(Q[q].value,"undefined"))switch(Q[q].command){case"eq":O.push(r.join([r.raw(`${q}`),r`${Q[q].value}`],r` = `));break;case"ne":O.push(r.join([r.raw(`${q}`),r`${Q[q].value}`],r` != `));break;case"gt":O.push(r.join([r.raw(`${q}`),r`${Q[q].value}`],r` > `));break;case"gte":O.push(r.join([r.raw(`${q}`),r`${Q[q].value}`],r` >= `));break;case"lt":O.push(r.join([r.raw(`${q}`),r`${Q[q].value}`],r` < `));break;case"lte":O.push(r.join([r.raw(`${q}`),r`${Q[q].value}`],r` <= `));break;case"isNull":O.push(r.join([r.raw(`${q}`)],r` is null `));break;case"isNotNull":O.push(r.join([r.raw(`${q}`)],r` is not null `));break;case"inArray":break;case"notInArray":break;case"exists":break;case"notExists":break;case"between":break;case"notBetween":break;case"like":O.push(r.join([r.raw(`${q}`),r`CONCAT('%',${Q[q].value},'%')`],r` like `));break;case"ilike":break;case"notIlike":break;case"not":break;case"and":break;case"or":break;case"arrayContains":break;case"arrayContained":break;case"arrayOverlaps":break;default:break}});let E=r.join(O,r` and `);if(J=="count"){let q=await G.select({count:r`count(*)`.mapWith(Number)}).from(B).where(E);return{data:{count:q[0]?q[0].count:0}}}let M=await G.select().from(B).orderBy(V=="desc"?sQ(r.raw(z)):SH(r.raw(z))).where(E).limit(Number(H)).offset(Number((Z-1)*H)),R=await G.select({count:r`count(*)`.mapWith(Number)}).from(B).where(E);return{data:M,total:R[0]?R[0].count:0}}else throw Error("\u64CD\u4F5C\u7C7B\u578B\u65E0\u6548")}else throw Error("\u8868\u4E0D\u5B58\u5728")}}async function nB1($,Y){let X=await pX($),G=r`SELECT 
	            C.COLUMN_NAME AS Field,
	            C.data_type AS TYPE 
            FROM
	            information_schema.tables T JOIN information_schema.COLUMNS C ON T.TABLE_NAME = C.TABLE_NAME 
                AND T.table_schema = C.table_schema 
            WHERE T.table_schema NOT IN ( 'information_schema', 'pg_catalog' ) 
	                AND T.TABLE_NAME = ${Y}`,Q=(await X.execute(G.getSQL())).rows,W={};return Q.forEach((K)=>{if(q$(K.type)){if(String(K.type).includes("integer"))W[K.field]=xS(K.field);else if(String(K.type).includes("smallint"))W[K.field]=uS(K.field);else if(String(K.type).includes("bigint"))W[K.field]=TS(K.field,{mode:"number"});else if(String(K.type).includes("serial"))W[K.field]=mS(K.field);else if(String(K.type).includes("smallserial"))W[K.field]=pS(K.field);else if(String(K.type).includes("bigserial"))W[K.field]=IS(K.field);else if(String(K.type).includes("boolean"))W[K.field]=CS(K.field);else if(String(K.type).includes("text"))W[K.field]=dS(K.field);else if(String(K.type).includes("character")&&String(K.Type).includes("var"))W[K.field]=iS(K.field,{length:255});else if(String(K.type).includes("character"))W[K.field]=SS(K.field,{length:255});else if(String(K.type).includes("numeric")||String(K.Type).includes("decimal"))W[K.field]=fS(K.field,{mode:"number"});else if(String(K.type).includes("real"))W[K.field]=gS(K.field);else if(String(K.type).includes("double"))W[K.field]=vS(K.field);else if(String(K.type).includes("json"))W[K.field]=bS(K.field);else if(String(K.type).includes("jsonb"))W[K.field]=hS(K.field);else if(String(K.type).includes("timestamp"))W[K.field]=lS(K.field);else if(String(K.type).includes("time"))W[K.field]=cS(K.field);else if(String(K.type).includes("date"))W[K.field]=kS(K.field,{mode:"string"});else if(String(K.type).includes("interval"))W[K.field]=yS(K.field)}}),{fields:Q,schema:W}}async function rB1($,Y,X){let G=await pX($),J=await nB1($,Y),Q;if(Y.includes(".")){let K=Y.split(".")[0]??"postgres";Q=Da(K).table(Y,J.schema)}else Q=mN(Y,J.schema);return Ss(X,J.fields),await G.insert(Q).values(X)}async function aB1($,Y,X,G){let J=await pX($),Q=await nB1($,Y),W;if(Y.includes(".")){let Z=Y.split(".")[0]??"postgres";W=Da(Z).table(Y,Q.schema)}else W=mN(Y,Q.schema);return Ss(X,Q.fields),await J.update(W).set(X).where(r.join([r.raw("id"),r`${G}`],r` = `))}async function GF0($,Y){return(await(await pX($)).execute(r.raw(Y))).rows}function ux($,Y){let X=$,G=N7($,/{{(.*?)}}/g);if(a8(G))G.forEach((J)=>{let Q=n1(n1(J,"{{",""),"}}","");if(Q.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4(Y,Q)))throw Error(`${Q}\u53D6\u503C\u5931\u8D25`);X=n1(X,`{{${Q}}}`,D4(Y,Q))});return X}var oB1=new _4;oB1.post("/",async($)=>{try{let Y=$.req.query("type"),X=await $.req.json(),G=await ks(X,Y),J=$1();return J.data=G.data,J.total=G.total,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u64CD\u4F5C\u5931\u8D25"})}});var tB1=oB1;var _B=U6(cF(),1);var UF0={};W8(UF0,{validator:()=>dx,validate:()=>JF0,unobserve:()=>YO1,unescapePathComponent:()=>wP,observe:()=>XO1,getValueByPointer:()=>px,generate:()=>hs,escapePathComponent:()=>rK,default:()=>Mr6,deepClone:()=>xY,compare:()=>GO1,applyReducer:()=>$O1,applyPatch:()=>cx,applyOperation:()=>lF,_areEquals:()=>TP,JsonPatchError:()=>_P});var QF0={};W8(QF0,{validator:()=>dx,validate:()=>JF0,getValueByPointer:()=>px,deepClone:()=>Lr6,applyReducer:()=>$O1,applyPatch:()=>cx,applyOperation:()=>lF,_areEquals:()=>TP,JsonPatchError:()=>o$});/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017-2022 Joachim Wester
 * MIT licensed
 */var Vr6=function(){var $=function(Y,X){return $=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,J){G.__proto__=J}||function(G,J){for(var Q in J)if(J.hasOwnProperty(Q))G[Q]=J[Q]},$(Y,X)};return function(Y,X){$(Y,X);function G(){this.constructor=Y}Y.prototype=X===null?Object.create(X):(G.prototype=X.prototype,new G)}}(),Fr6=Object.prototype.hasOwnProperty;function xs($,Y){return Fr6.call($,Y)}function ys($){if(Array.isArray($)){var Y=Array($.length);for(var X=0;X<Y.length;X++)Y[X]=""+X;return Y}if(Object.keys)return Object.keys($);var G=[];for(var J in $)if(xs($,J))G.push(J);return G}function xY($){switch(typeof $){case"object":return JSON.parse(JSON.stringify($));case"undefined":return null;default:return $}}function bs($){var Y=0,X=$.length,G;while(Y<X){if(G=$.charCodeAt(Y),G>=48&&G<=57){Y++;continue}return!1}return!0}function rK($){if($.indexOf("/")===-1&&$.indexOf("~")===-1)return $;return $.replace(/~/g,"~0").replace(/\//g,"~1")}function wP($){return $.replace(/~1/g,"/").replace(/~0/g,"~")}function vs($){if($===void 0)return!0;if($){if(Array.isArray($)){for(var Y=0,X=$.length;Y<X;Y++)if(vs($[Y]))return!0}else if(typeof $==="object"){var G=ys($),J=G.length;for(var Q=0;Q<J;Q++)if(vs($[G[Q]]))return!0}}return!1}function eB1($,Y){var X=[$];for(var G in Y){var J=typeof Y[G]==="object"?JSON.stringify(Y[G],null,2):Y[G];if(typeof J<"u")X.push(G+": "+J)}return X.join(`
`)}var _P=function($){Vr6(Y,$);function Y(X,G,J,Q,W){var K=this.constructor,Z=$.call(this,eB1(X,{name:G,index:J,operation:Q,tree:W}))||this;return Z.name=G,Z.index=J,Z.operation=Q,Z.tree=W,Object.setPrototypeOf(Z,K.prototype),Z.message=eB1(X,{name:G,index:J,operation:Q,tree:W}),Z}return Y}(Error);var o$=_P,Lr6=xY,jP={add:function($,Y,X){return $[Y]=this.value,{newDocument:X}},remove:function($,Y,X){var G=$[Y];return delete $[Y],{newDocument:X,removed:G}},replace:function($,Y,X){var G=$[Y];return $[Y]=this.value,{newDocument:X,removed:G}},move:function($,Y,X){var G=px(X,this.path);if(G)G=xY(G);var J=lF(X,{op:"remove",path:this.from}).removed;return lF(X,{op:"add",path:this.path,value:J}),{newDocument:X,removed:G}},copy:function($,Y,X){var G=px(X,this.from);return lF(X,{op:"add",path:this.path,value:xY(G)}),{newDocument:X}},test:function($,Y,X){return{newDocument:X,test:TP($[Y],this.value)}},_get:function($,Y,X){return this.value=$[Y],{newDocument:X}}},Dr6={add:function($,Y,X){if(bs(Y))$.splice(Y,0,this.value);else $[Y]=this.value;return{newDocument:X,index:Y}},remove:function($,Y,X){var G=$.splice(Y,1);return{newDocument:X,removed:G[0]}},replace:function($,Y,X){var G=$[Y];return $[Y]=this.value,{newDocument:X,removed:G}},move:jP.move,copy:jP.copy,test:jP.test,_get:jP._get};function px($,Y){if(Y=="")return $;var X={op:"_get",path:Y};return lF($,X),X.value}function lF($,Y,X,G,J,Q){if(X===void 0)X=!1;if(G===void 0)G=!0;if(J===void 0)J=!0;if(Q===void 0)Q=0;if(X)if(typeof X=="function")X(Y,0,$,Y.path);else dx(Y,0);if(Y.path===""){var W={newDocument:$};if(Y.op==="add")return W.newDocument=Y.value,W;else if(Y.op==="replace")return W.newDocument=Y.value,W.removed=$,W;else if(Y.op==="move"||Y.op==="copy"){if(W.newDocument=px($,Y.from),Y.op==="move")W.removed=$;return W}else if(Y.op==="test"){if(W.test=TP($,Y.value),W.test===!1)throw new o$("Test operation failed","TEST_OPERATION_FAILED",Q,Y,$);return W.newDocument=$,W}else if(Y.op==="remove")return W.removed=$,W.newDocument=null,W;else if(Y.op==="_get")return Y.value=$,W;else if(X)throw new o$("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",Q,Y,$);else return W}else{if(!G)$=xY($);var K=Y.path||"",Z=K.split("/"),H=$,z=1,V=Z.length,F=void 0,L=void 0,N=void 0;if(typeof X=="function")N=X;else N=dx;while(!0){if(L=Z[z],L&&L.indexOf("~")!=-1)L=wP(L);if(J&&(L=="__proto__"||L=="prototype"&&z>0&&Z[z-1]=="constructor"))throw TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(X){if(F===void 0){if(H[L]===void 0)F=Z.slice(0,z).join("/");else if(z==V-1)F=Y.path;if(F!==void 0)N(Y,0,$,F)}}if(z++,Array.isArray(H)){if(L==="-")L=H.length;else if(X&&!bs(L))throw new o$("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",Q,Y,$);else if(bs(L))L=~~L;if(z>=V){if(X&&Y.op==="add"&&L>H.length)throw new o$("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",Q,Y,$);var W=Dr6[Y.op].call(Y,H,L,$);if(W.test===!1)throw new o$("Test operation failed","TEST_OPERATION_FAILED",Q,Y,$);return W}}else if(z>=V){var W=jP[Y.op].call(Y,H,L,$);if(W.test===!1)throw new o$("Test operation failed","TEST_OPERATION_FAILED",Q,Y,$);return W}if(H=H[L],X&&z<V&&(!H||typeof H!=="object"))throw new o$("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",Q,Y,$)}}}function cx($,Y,X,G,J){if(G===void 0)G=!0;if(J===void 0)J=!0;if(X){if(!Array.isArray(Y))throw new o$("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY")}if(!G)$=xY($);var Q=Array(Y.length);for(var W=0,K=Y.length;W<K;W++)Q[W]=lF($,Y[W],X,!0,J,W),$=Q[W].newDocument;return Q.newDocument=$,Q}function $O1($,Y,X){var G=lF($,Y);if(G.test===!1)throw new o$("Test operation failed","TEST_OPERATION_FAILED",X,Y,$);return G.newDocument}function dx($,Y,X,G){if(typeof $!=="object"||$===null||Array.isArray($))throw new o$("Operation is not an object","OPERATION_NOT_AN_OBJECT",Y,$,X);else if(!jP[$.op])throw new o$("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",Y,$,X);else if(typeof $.path!=="string")throw new o$("Operation `path` property is not a string","OPERATION_PATH_INVALID",Y,$,X);else if($.path.indexOf("/")!==0&&$.path.length>0)throw new o$('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",Y,$,X);else if(($.op==="move"||$.op==="copy")&&typeof $.from!=="string")throw new o$("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",Y,$,X);else if(($.op==="add"||$.op==="replace"||$.op==="test")&&$.value===void 0)throw new o$("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",Y,$,X);else if(($.op==="add"||$.op==="replace"||$.op==="test")&&vs($.value))throw new o$("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",Y,$,X);else if(X){if($.op=="add"){var J=$.path.split("/").length,Q=G.split("/").length;if(J!==Q+1&&J!==Q)throw new o$("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",Y,$,X)}else if($.op==="replace"||$.op==="remove"||$.op==="_get"){if($.path!==G)throw new o$("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",Y,$,X)}else if($.op==="move"||$.op==="copy"){var W={op:"_get",path:$.from,value:void 0},K=JF0([W],X);if(K&&K.name==="OPERATION_PATH_UNRESOLVABLE")throw new o$("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",Y,$,X)}}}function JF0($,Y,X){try{if(!Array.isArray($))throw new o$("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(Y)cx(xY(Y),xY($),X||!0);else{X=X||dx;for(var G=0;G<$.length;G++)X($[G],G,Y,void 0)}}catch(J){if(J instanceof o$)return J;else throw J}}function TP($,Y){if($===Y)return!0;if($&&Y&&typeof $=="object"&&typeof Y=="object"){var X=Array.isArray($),G=Array.isArray(Y),J,Q,W;if(X&&G){if(Q=$.length,Q!=Y.length)return!1;for(J=Q;J--!==0;)if(!TP($[J],Y[J]))return!1;return!0}if(X!=G)return!1;var K=Object.keys($);if(Q=K.length,Q!==Object.keys(Y).length)return!1;for(J=Q;J--!==0;)if(!Y.hasOwnProperty(K[J]))return!1;for(J=Q;J--!==0;)if(W=K[J],!TP($[W],Y[W]))return!1;return!0}return $!==$&&Y!==Y}var ZF0={};W8(ZF0,{unobserve:()=>YO1,observe:()=>XO1,generate:()=>hs,compare:()=>GO1});/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017-2021 Joachim Wester
 * MIT license
 */var WF0=new WeakMap,Nr6=function(){function $(Y){this.observers=new Map,this.obj=Y}return $}(),Ar6=function(){function $(Y,X){this.callback=Y,this.observer=X}return $}();function Br6($){return WF0.get($)}function Or6($,Y){return $.observers.get(Y)}function Er6($,Y){$.observers.delete(Y.callback)}function YO1($,Y){Y.unobserve()}function XO1($,Y){var X=[],G,J=Br6($);if(!J)J=new Nr6($),WF0.set($,J);else{var Q=Or6(J,Y);G=Q&&Q.observer}if(G)return G;if(G={},J.value=xY($),Y){G.callback=Y,G.next=null;var W=function(){hs(G)},K=function(){clearTimeout(G.next),G.next=setTimeout(W)};if(typeof window<"u")window.addEventListener("mouseup",K),window.addEventListener("keyup",K),window.addEventListener("mousedown",K),window.addEventListener("keydown",K),window.addEventListener("change",K)}return G.patches=X,G.object=$,G.unobserve=function(){if(hs(G),clearTimeout(G.next),Er6(J,G),typeof window<"u")window.removeEventListener("mouseup",K),window.removeEventListener("keyup",K),window.removeEventListener("mousedown",K),window.removeEventListener("keydown",K),window.removeEventListener("change",K)},J.observers.set(Y,new Ar6(Y,G)),G}function hs($,Y){if(Y===void 0)Y=!1;var X=WF0.get($.object);if(KF0(X.value,$.object,$.patches,"",Y),$.patches.length)cx(X.value,$.patches);var G=$.patches;if(G.length>0){if($.patches=[],$.callback)$.callback(G)}return G}function KF0($,Y,X,G,J){if(Y===$)return;if(typeof Y.toJSON==="function")Y=Y.toJSON();var Q=ys(Y),W=ys($),K=!1,Z=!1;for(var H=W.length-1;H>=0;H--){var z=W[H],V=$[z];if(xs(Y,z)&&!(Y[z]===void 0&&V!==void 0&&Array.isArray(Y)===!1)){var F=Y[z];if(typeof V=="object"&&V!=null&&typeof F=="object"&&F!=null&&Array.isArray(V)===Array.isArray(F))KF0(V,F,X,G+"/"+rK(z),J);else if(V!==F){if(K=!0,J)X.push({op:"test",path:G+"/"+rK(z),value:xY(V)});X.push({op:"replace",path:G+"/"+rK(z),value:xY(F)})}}else if(Array.isArray($)===Array.isArray(Y)){if(J)X.push({op:"test",path:G+"/"+rK(z),value:xY(V)});X.push({op:"remove",path:G+"/"+rK(z)}),Z=!0}else{if(J)X.push({op:"test",path:G,value:$});X.push({op:"replace",path:G,value:Y}),K=!0}}if(!Z&&Q.length==W.length)return;for(var H=0;H<Q.length;H++){var z=Q[H];if(!xs($,z)&&Y[z]!==void 0)X.push({op:"add",path:G+"/"+rK(z),value:xY(Y[z])})}}function GO1($,Y,X){if(X===void 0)X=!1;var G=[];return KF0($,Y,G,"",X),G}var Mr6=Object.assign({},QF0,ZF0,{JsonPatchError:_P,deepClone:xY,escapePathComponent:rK,unescapePathComponent:wP});var DF0={};W8(DF0,{version:()=>AO1,validate:()=>iF,v7:()=>NO1,v6ToV1:()=>FF0,v6:()=>LO1,v5:()=>FO1,v4:()=>zO1,v3:()=>HO1,v1ToV6:()=>ix,v1:()=>ms,stringify:()=>KO1,parse:()=>Qz,NIL:()=>QO1,MAX:()=>JO1});var JO1="ffffffff-ffff-ffff-ffff-ffffffffffff";var QO1="00000000-0000-0000-0000-000000000000";var WO1=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Rr6($){return typeof $==="string"&&WO1.test($)}var iF=Rr6;function qr6($){if(!iF($))throw TypeError("Invalid UUID");let Y;return Uint8Array.of((Y=parseInt($.slice(0,8),16))>>>24,Y>>>16&255,Y>>>8&255,Y&255,(Y=parseInt($.slice(9,13),16))>>>8,Y&255,(Y=parseInt($.slice(14,18),16))>>>8,Y&255,(Y=parseInt($.slice(19,23),16))>>>8,Y&255,(Y=parseInt($.slice(24,36),16))/1099511627776&255,Y/4294967296&255,Y>>>24&255,Y>>>16&255,Y>>>8&255,Y&255)}var Qz=qr6;var zX=[];for(let $=0;$<256;++$)zX.push(($+256).toString(16).slice(1));function vG($,Y=0){return(zX[$[Y+0]]+zX[$[Y+1]]+zX[$[Y+2]]+zX[$[Y+3]]+"-"+zX[$[Y+4]]+zX[$[Y+5]]+"-"+zX[$[Y+6]]+zX[$[Y+7]]+"-"+zX[$[Y+8]]+zX[$[Y+9]]+"-"+zX[$[Y+10]]+zX[$[Y+11]]+zX[$[Y+12]]+zX[$[Y+13]]+zX[$[Y+14]]+zX[$[Y+15]]).toLowerCase()}function Pr6($,Y=0){let X=vG($,Y);if(!iF(X))throw TypeError("Stringified UUID is invalid");return X}var KO1=Pr6;import{randomFillSync as wr6}from"crypto";var gs=new Uint8Array(256),fs=gs.length;function Wz(){if(fs>gs.length-16)wr6(gs),fs=0;return gs.slice(fs,fs+=16)}var lx={};function _r6($,Y,X){let G,J=$?._v6??!1;if($){let Q=Object.keys($);if(Q.length===1&&Q[0]==="_v6")$=void 0}if($)G=ZO1($.random??$.rng?.()??Wz(),$.msecs,$.nsecs,$.clockseq,$.node,Y,X);else{let Q=Date.now(),W=Wz();jr6(lx,Q,W),G=ZO1(W,lx.msecs,lx.nsecs,J?void 0:lx.clockseq,J?void 0:lx.node,Y,X)}return Y??vG(G)}function jr6($,Y,X){if($.msecs??=-1/0,$.nsecs??=0,Y===$.msecs){if($.nsecs++,$.nsecs>=1e4)$.node=void 0,$.nsecs=0}else if(Y>$.msecs)$.nsecs=0;else if(Y<$.msecs)$.node=void 0;if(!$.node)$.node=X.slice(10,16),$.node[0]|=1,$.clockseq=(X[8]<<8|X[9])&16383;return $.msecs=Y,$}function ZO1($,Y,X,G,J,Q,W=0){if($.length<16)throw Error("Random bytes length must be >= 16");if(!Q)Q=new Uint8Array(16),W=0;else if(W<0||W+16>Q.length)throw RangeError(`UUID byte range ${W}:${W+15} is out of buffer bounds`);Y??=Date.now(),X??=0,G??=($[8]<<8|$[9])&16383,J??=$.slice(10,16),Y+=12219292800000;let K=((Y&268435455)*1e4+X)%4294967296;Q[W++]=K>>>24&255,Q[W++]=K>>>16&255,Q[W++]=K>>>8&255,Q[W++]=K&255;let Z=Y/4294967296*1e4&268435455;Q[W++]=Z>>>8&255,Q[W++]=Z&255,Q[W++]=Z>>>24&15|16,Q[W++]=Z>>>16&255,Q[W++]=G>>>8|128,Q[W++]=G&255;for(let H=0;H<6;++H)Q[W++]=J[H];return Q}var ms=_r6;function ix($){let Y=typeof $==="string"?Qz($):$,X=Tr6(Y);return typeof $==="string"?vG(X):X}function Tr6($){return Uint8Array.of(($[6]&15)<<4|$[7]>>4&15,($[7]&15)<<4|($[4]&240)>>4,($[4]&15)<<4|($[5]&240)>>4,($[5]&15)<<4|($[0]&240)>>4,($[0]&15)<<4|($[1]&240)>>4,($[1]&15)<<4|($[2]&240)>>4,96|$[2]&15,$[3],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15])}import{createHash as Ir6}from"crypto";function Cr6($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return Ir6("md5").update($).digest()}var UO1=Cr6;function Sr6($){$=unescape(encodeURIComponent($));let Y=new Uint8Array($.length);for(let X=0;X<$.length;++X)Y[X]=$.charCodeAt(X);return Y}var us="6ba7b810-9dad-11d1-80b4-00c04fd430c8",ps="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function nx($,Y,X,G,J,Q){let W=typeof X==="string"?Sr6(X):X,K=typeof G==="string"?Qz(G):G;if(typeof G==="string")G=Qz(G);if(G?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let Z=new Uint8Array(16+W.length);if(Z.set(K),Z.set(W,K.length),Z=Y(Z),Z[6]=Z[6]&15|$,Z[8]=Z[8]&63|128,J){if(Q=Q||0,Q<0||Q+16>J.length)throw RangeError(`UUID byte range ${Q}:${Q+15} is out of buffer bounds`);for(let H=0;H<16;++H)J[Q+H]=Z[H];return J}return vG(Z)}function HF0($,Y,X,G){return nx(48,UO1,$,Y,X,G)}HF0.DNS=us;HF0.URL=ps;var HO1=HF0;import{randomUUID as kr6}from"crypto";var zF0={randomUUID:kr6};function vr6($,Y,X){if(zF0.randomUUID&&!Y&&!$)return zF0.randomUUID();$=$||{};let G=$.random??$.rng?.()??Wz();if(G.length<16)throw Error("Random bytes length must be >= 16");if(G[6]=G[6]&15|64,G[8]=G[8]&63|128,Y){if(X=X||0,X<0||X+16>Y.length)throw RangeError(`UUID byte range ${X}:${X+15} is out of buffer bounds`);for(let J=0;J<16;++J)Y[X+J]=G[J];return Y}return vG(G)}var zO1=vr6;import{createHash as xr6}from"crypto";function yr6($){if(Array.isArray($))$=Buffer.from($);else if(typeof $==="string")$=Buffer.from($,"utf8");return xr6("sha1").update($).digest()}var VO1=yr6;function VF0($,Y,X,G){return nx(80,VO1,$,Y,X,G)}VF0.DNS=us;VF0.URL=ps;var FO1=VF0;function br6($,Y,X){$??={},X??=0;let G=ms({...$,_v6:!0},new Uint8Array(16));if(G=ix(G),Y){if(X<0||X+16>Y.length)throw RangeError(`UUID byte range ${X}:${X+15} is out of buffer bounds`);for(let J=0;J<16;J++)Y[X+J]=G[J];return Y}return vG(G)}var LO1=br6;function FF0($){let Y=typeof $==="string"?Qz($):$,X=hr6(Y);return typeof $==="string"?vG(X):X}function hr6($){return Uint8Array.of(($[3]&15)<<4|$[4]>>4&15,($[4]&15)<<4|($[5]&240)>>4,($[5]&15)<<4|$[6]&15,$[7],($[1]&15)<<4|($[2]&240)>>4,($[2]&15)<<4|($[3]&240)>>4,16|($[0]&240)>>4,($[0]&15)<<4|($[1]&240)>>4,$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15])}var LF0={};function fr6($,Y,X){let G;if($)G=DO1($.random??$.rng?.()??Wz(),$.msecs,$.seq,Y,X);else{let J=Date.now(),Q=Wz();gr6(LF0,J,Q),G=DO1(Q,LF0.msecs,LF0.seq,Y,X)}return Y??vG(G)}function gr6($,Y,X){if($.msecs??=-1/0,$.seq??=0,Y>$.msecs)$.seq=X[6]<<23|X[7]<<16|X[8]<<8|X[9],$.msecs=Y;else if($.seq=$.seq+1|0,$.seq===0)$.msecs++;return $}function DO1($,Y,X,G,J=0){if($.length<16)throw Error("Random bytes length must be >= 16");if(!G)G=new Uint8Array(16),J=0;else if(J<0||J+16>G.length)throw RangeError(`UUID byte range ${J}:${J+15} is out of buffer bounds`);return Y??=Date.now(),X??=$[6]*127<<24|$[7]<<16|$[8]<<8|$[9],G[J++]=Y/1099511627776&255,G[J++]=Y/4294967296&255,G[J++]=Y/16777216&255,G[J++]=Y/65536&255,G[J++]=Y/256&255,G[J++]=Y&255,G[J++]=112|X>>>28&15,G[J++]=X>>>20&255,G[J++]=128|X>>>14&63,G[J++]=X>>>6&255,G[J++]=X<<2&255|$[10]&3,G[J++]=$[11],G[J++]=$[12],G[J++]=$[13],G[J++]=$[14],G[J++]=$[15],G}var NO1=fr6;function mr6($){if(!iF($))throw TypeError("Invalid UUID");return parseInt($.slice(14,15),16)}var AO1=mr6;var yL0={};W8(yL0,{toFormData:()=>z08,spread:()=>H08,mergeConfig:()=>N08,isCancel:()=>J08,isAxiosError:()=>U08,getAdapter:()=>D08,formToJSON:()=>L08,default:()=>xL0,create:()=>A08,all:()=>K08,VERSION:()=>W08,HttpStatusCode:()=>F08,CanceledError:()=>G08,CancelToken:()=>Q08,Cancel:()=>Z08,AxiosHeaders:()=>V08,AxiosError:()=>X08,Axios:()=>Y08});function rx($,Y){return function(){return $.apply(Y,arguments)}}var{toString:ur6}=Object.prototype,{getPrototypeOf:cs}=Object,{iterator:ls,toStringTag:EO1}=Symbol,is=(($)=>(Y)=>{let X=ur6.call(Y);return $[X]||($[X]=X.slice(8,-1).toLowerCase())})(Object.create(null)),aK=($)=>{return $=$.toLowerCase(),(Y)=>is(Y)===$},ns=($)=>(Y)=>typeof Y===$,{isArray:CP}=Array,IP=ns("undefined");function ax($){return $!==null&&!IP($)&&$.constructor!==null&&!IP($.constructor)&&eJ($.constructor.isBuffer)&&$.constructor.isBuffer($)}var MO1=aK("ArrayBuffer");function pr6($){let Y;if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)Y=ArrayBuffer.isView($);else Y=$&&$.buffer&&MO1($.buffer);return Y}var dr6=ns("string"),eJ=ns("function"),RO1=ns("number"),sx=($)=>$!==null&&typeof $==="object",cr6=($)=>$===!0||$===!1,ds=($)=>{if(is($)!=="object")return!1;let Y=cs($);return(Y===null||Y===Object.prototype||Object.getPrototypeOf(Y)===null)&&!(EO1 in $)&&!(ls in $)},lr6=($)=>{if(!sx($)||ax($))return!1;try{return Object.keys($).length===0&&Object.getPrototypeOf($)===Object.prototype}catch(Y){return!1}},ir6=aK("Date"),nr6=aK("File"),rr6=($)=>{return!!($&&typeof $.uri<"u")},ar6=($)=>$&&typeof $.getParts<"u",sr6=aK("Blob"),or6=aK("FileList"),tr6=($)=>sx($)&&eJ($.pipe);function er6(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;return{}}var BO1=er6(),OO1=typeof BO1.FormData<"u"?BO1.FormData:void 0,$a6=($)=>{if(!$)return!1;if(OO1&&$ instanceof OO1)return!0;let Y=cs($);if(!Y||Y===Object.prototype)return!1;if(!eJ($.append))return!1;let X=is($);return X==="formdata"||X==="object"&&eJ($.toString)&&$.toString()==="[object FormData]"},Ya6=aK("URLSearchParams"),[Xa6,Ga6,Ja6,Qa6]=["ReadableStream","Request","Response","Headers"].map(aK),Wa6=($)=>{return $.trim?$.trim():$.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function ox($,Y,{allOwnKeys:X=!1}={}){if($===null||typeof $>"u")return;let G,J;if(typeof $!=="object")$=[$];if(CP($))for(G=0,J=$.length;G<J;G++)Y.call(null,$[G],G,$);else{if(ax($))return;let Q=X?Object.getOwnPropertyNames($):Object.keys($),W=Q.length,K;for(G=0;G<W;G++)K=Q[G],Y.call(null,$[K],K,$)}}function qO1($,Y){if(ax($))return null;Y=Y.toLowerCase();let X=Object.keys($),G=X.length,J;while(G-- >0)if(J=X[G],Y===J.toLowerCase())return J;return null}var QB=(()=>{if(typeof globalThis<"u")return globalThis;return typeof self<"u"?self:typeof window<"u"?window:global})(),PO1=($)=>!IP($)&&$!==QB;function NF0(...$){let{caseless:Y,skipUndefined:X}=PO1(this)&&this||{},G={},J=(Q,W)=>{if(W==="__proto__"||W==="constructor"||W==="prototype")return;let K=Y&&qO1(G,W)||W,Z=AF0(G,K)?G[K]:void 0;if(ds(Z)&&ds(Q))G[K]=NF0(Z,Q);else if(ds(Q))G[K]=NF0({},Q);else if(CP(Q))G[K]=Q.slice();else if(!X||!IP(Q))G[K]=Q};for(let Q=0,W=$.length;Q<W;Q++)$[Q]&&ox($[Q],J);return G}var Ka6=($,Y,X,{allOwnKeys:G}={})=>{return ox(Y,(J,Q)=>{if(X&&eJ(J))Object.defineProperty($,Q,{__proto__:null,value:rx(J,X),writable:!0,enumerable:!0,configurable:!0});else Object.defineProperty($,Q,{__proto__:null,value:J,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:G}),$},Za6=($)=>{if($.charCodeAt(0)===65279)$=$.slice(1);return $},Ua6=($,Y,X,G)=>{$.prototype=Object.create(Y.prototype,G),Object.defineProperty($.prototype,"constructor",{__proto__:null,value:$,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty($,"super",{__proto__:null,value:Y.prototype}),X&&Object.assign($.prototype,X)},Ha6=($,Y,X,G)=>{let J,Q,W,K={};if(Y=Y||{},$==null)return Y;do{J=Object.getOwnPropertyNames($),Q=J.length;while(Q-- >0)if(W=J[Q],(!G||G(W,$,Y))&&!K[W])Y[W]=$[W],K[W]=!0;$=X!==!1&&cs($)}while($&&(!X||X($,Y))&&$!==Object.prototype);return Y},za6=($,Y,X)=>{if($=String($),X===void 0||X>$.length)X=$.length;X-=Y.length;let G=$.indexOf(Y,X);return G!==-1&&G===X},Va6=($)=>{if(!$)return null;if(CP($))return $;let Y=$.length;if(!RO1(Y))return null;let X=Array(Y);while(Y-- >0)X[Y]=$[Y];return X},Fa6=(($)=>{return(Y)=>{return $&&Y instanceof $}})(typeof Uint8Array<"u"&&cs(Uint8Array)),La6=($,Y)=>{let G=($&&$[ls]).call($),J;while((J=G.next())&&!J.done){let Q=J.value;Y.call($,Q[0],Q[1])}},Da6=($,Y)=>{let X,G=[];while((X=$.exec(Y))!==null)G.push(X);return G},Na6=aK("HTMLFormElement"),Aa6=($)=>{return $.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(X,G,J){return G.toUpperCase()+J})},AF0=(({hasOwnProperty:$})=>(Y,X)=>$.call(Y,X))(Object.prototype),Ba6=aK("RegExp"),wO1=($,Y)=>{let X=Object.getOwnPropertyDescriptors($),G={};ox(X,(J,Q)=>{let W;if((W=Y(J,Q,$))!==!1)G[Q]=W||J}),Object.defineProperties($,G)},Oa6=($)=>{wO1($,(Y,X)=>{if(eJ($)&&["arguments","caller","callee"].includes(X))return!1;let G=$[X];if(!eJ(G))return;if(Y.enumerable=!1,"writable"in Y){Y.writable=!1;return}if(!Y.set)Y.set=()=>{throw Error("Can not rewrite read-only method '"+X+"'")}})},Ea6=($,Y)=>{let X={},G=(J)=>{J.forEach((Q)=>{X[Q]=!0})};return CP($)?G($):G(String($).split(Y)),X},Ma6=()=>{},Ra6=($,Y)=>{return $!=null&&Number.isFinite($=+$)?$:Y};function qa6($){return!!($&&eJ($.append)&&$[EO1]==="FormData"&&$[ls])}var Pa6=($)=>{let Y=new WeakSet,X=(G)=>{if(sx(G)){if(Y.has(G))return;if(ax(G))return G;if(!("toJSON"in G)){Y.add(G);let J=CP(G)?[]:{};return ox(G,(Q,W)=>{let K=X(Q);!IP(K)&&(J[W]=K)}),Y.delete(G),J}}return G};return X($)},wa6=aK("AsyncFunction"),_a6=($)=>$&&(sx($)||eJ($))&&eJ($.then)&&eJ($.catch),_O1=(($,Y)=>{if($)return setImmediate;return Y?((X,G)=>{return QB.addEventListener("message",({source:J,data:Q})=>{if(J===QB&&Q===X)G.length&&G.shift()()},!1),(J)=>{G.push(J),QB.postMessage(X,"*")}})(`axios@${Math.random()}`,[]):(X)=>setTimeout(X)})(typeof setImmediate==="function",eJ(QB.postMessage)),ja6=typeof queueMicrotask<"u"?queueMicrotask.bind(QB):typeof process<"u"&&process.nextTick||_O1,Ta6=($)=>$!=null&&eJ($[ls]),_0={isArray:CP,isArrayBuffer:MO1,isBuffer:ax,isFormData:$a6,isArrayBufferView:pr6,isString:dr6,isNumber:RO1,isBoolean:cr6,isObject:sx,isPlainObject:ds,isEmptyObject:lr6,isReadableStream:Xa6,isRequest:Ga6,isResponse:Ja6,isHeaders:Qa6,isUndefined:IP,isDate:ir6,isFile:nr6,isReactNativeBlob:rr6,isReactNative:ar6,isBlob:sr6,isRegExp:Ba6,isFunction:eJ,isStream:tr6,isURLSearchParams:Ya6,isTypedArray:Fa6,isFileList:or6,forEach:ox,merge:NF0,extend:Ka6,trim:Wa6,stripBOM:Za6,inherits:Ua6,toFlatObject:Ha6,kindOf:is,kindOfTest:aK,endsWith:za6,toArray:Va6,forEachEntry:La6,matchAll:Da6,isHTMLForm:Na6,hasOwnProperty:AF0,hasOwnProp:AF0,reduceDescriptors:wO1,freezeMethods:Oa6,toObjectSet:Ea6,toCamelCase:Aa6,noop:Ma6,toFiniteNumber:Ra6,findKey:qO1,global:QB,isContextDefined:PO1,isSpecCompliantForm:qa6,toJSONObject:Pa6,isAsyncFn:wa6,isThenable:_a6,setImmediate:_O1,asap:ja6,isIterable:Ta6};var Ia6=_0.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),jO1=($)=>{let Y={},X,G,J;return $&&$.split(`
`).forEach(function(W){if(J=W.indexOf(":"),X=W.substring(0,J).trim().toLowerCase(),G=W.substring(J+1).trim(),!X||Y[X]&&Ia6[X])return;if(X==="set-cookie")if(Y[X])Y[X].push(G);else Y[X]=[G];else Y[X]=Y[X]?Y[X]+", "+G:G}),Y};function Ca6($){let Y=0,X=$.length;while(Y<X){let G=$.charCodeAt(Y);if(G!==9&&G!==32)break;Y+=1}while(X>Y){let G=$.charCodeAt(X-1);if(G!==9&&G!==32)break;X-=1}return Y===0&&X===$.length?$:$.slice(Y,X)}var Sa6=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ka6=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function BF0($,Y){if(_0.isArray($))return $.map((X)=>BF0(X,Y));return Ca6(String($).replace(Y,""))}var TO1=($)=>BF0($,Sa6),va6=($)=>BF0($,ka6);function SP($){let Y=Object.create(null);return _0.forEach($.toJSON(),(X,G)=>{Y[G]=va6(X)}),Y}var IO1=Symbol("internals");function tx($){return $&&String($).trim().toLowerCase()}function rs($){if($===!1||$==null)return $;return _0.isArray($)?$.map(rs):TO1(String($))}function xa6($){let Y=Object.create(null),X=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,G;while(G=X.exec($))Y[G[1]]=G[2];return Y}var ya6=($)=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test($.trim());function OF0($,Y,X,G,J){if(_0.isFunction(G))return G.call(this,Y,X);if(J)Y=X;if(!_0.isString(Y))return;if(_0.isString(G))return Y.indexOf(G)!==-1;if(_0.isRegExp(G))return G.test(Y)}function ba6($){return $.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(Y,X,G)=>{return X.toUpperCase()+G})}function ha6($,Y){let X=_0.toCamelCase(" "+Y);["get","set","has"].forEach((G)=>{Object.defineProperty($,G+X,{__proto__:null,value:function(J,Q,W){return this[G].call(this,Y,J,Q,W)},configurable:!0})})}class ex{constructor($){$&&this.set($)}set($,Y,X){let G=this;function J(W,K,Z){let H=tx(K);if(!H)throw Error("header name must be a non-empty string");let z=_0.findKey(G,H);if(!z||G[z]===void 0||Z===!0||Z===void 0&&G[z]!==!1)G[z||K]=rs(W)}let Q=(W,K)=>_0.forEach(W,(Z,H)=>J(Z,H,K));if(_0.isPlainObject($)||$ instanceof this.constructor)Q($,Y);else if(_0.isString($)&&($=$.trim())&&!ya6($))Q(jO1($),Y);else if(_0.isObject($)&&_0.isIterable($)){let W={},K,Z;for(let H of $){if(!_0.isArray(H))throw TypeError("Object iterator must return a key-value pair");W[Z=H[0]]=(K=W[Z])?_0.isArray(K)?[...K,H[1]]:[K,H[1]]:H[1]}Q(W,Y)}else $!=null&&J(Y,$,X);return this}get($,Y){if($=tx($),$){let X=_0.findKey(this,$);if(X){let G=this[X];if(!Y)return G;if(Y===!0)return xa6(G);if(_0.isFunction(Y))return Y.call(this,G,X);if(_0.isRegExp(Y))return Y.exec(G);throw TypeError("parser must be boolean|regexp|function")}}}has($,Y){if($=tx($),$){let X=_0.findKey(this,$);return!!(X&&this[X]!==void 0&&(!Y||OF0(this,this[X],X,Y)))}return!1}delete($,Y){let X=this,G=!1;function J(Q){if(Q=tx(Q),Q){let W=_0.findKey(X,Q);if(W&&(!Y||OF0(X,X[W],W,Y)))delete X[W],G=!0}}if(_0.isArray($))$.forEach(J);else J($);return G}clear($){let Y=Object.keys(this),X=Y.length,G=!1;while(X--){let J=Y[X];if(!$||OF0(this,this[J],J,$,!0))delete this[J],G=!0}return G}normalize($){let Y=this,X={};return _0.forEach(this,(G,J)=>{let Q=_0.findKey(X,J);if(Q){Y[Q]=rs(G),delete Y[J];return}let W=$?ba6(J):String(J).trim();if(W!==J)delete Y[J];Y[W]=rs(G),X[W]=!0}),this}concat(...$){return this.constructor.concat(this,...$)}toJSON($){let Y=Object.create(null);return _0.forEach(this,(X,G)=>{X!=null&&X!==!1&&(Y[G]=$&&_0.isArray(X)?X.join(", "):X)}),Y}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([$,Y])=>$+": "+Y).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from($){return $ instanceof this?$:new this($)}static concat($,...Y){let X=new this($);return Y.forEach((G)=>X.set(G)),X}static accessor($){let X=(this[IO1]=this[IO1]={accessors:{}}).accessors,G=this.prototype;function J(Q){let W=tx(Q);if(!X[W])ha6(G,Q),X[W]=!0}return _0.isArray($)?$.forEach(J):J($),this}}ex.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_0.reduceDescriptors(ex.prototype,({value:$},Y)=>{let X=Y[0].toUpperCase()+Y.slice(1);return{get:()=>$,set(G){this[X]=G}}});_0.freezeMethods(ex);var o5=ex;var fa6="[REDACTED ****]";function ga6($){if(_0.hasOwnProp($,"toJSON"))return!0;let Y=Object.getPrototypeOf($);while(Y&&Y!==Object.prototype){if(_0.hasOwnProp(Y,"toJSON"))return!0;Y=Object.getPrototypeOf(Y)}return!1}function ma6($,Y){let X=new Set(Y.map((Q)=>String(Q).toLowerCase())),G=[],J=(Q)=>{if(Q===null||typeof Q!=="object")return Q;if(_0.isBuffer(Q))return Q;if(G.indexOf(Q)!==-1)return;if(Q instanceof o5)Q=Q.toJSON();G.push(Q);let W;if(_0.isArray(Q))W=[],Q.forEach((K,Z)=>{let H=J(K);if(!_0.isUndefined(H))W[Z]=H});else{if(!_0.isPlainObject(Q)&&ga6(Q))return G.pop(),Q;W=Object.create(null);for(let[K,Z]of Object.entries(Q)){let H=X.has(K.toLowerCase())?fa6:J(Z);if(!_0.isUndefined(H))W[K]=H}}return G.pop(),W};return J($)}class VX extends Error{static from($,Y,X,G,J,Q){let W=new VX($.message,Y||$.code,X,G,J);if(W.cause=$,W.name=$.name,$.status!=null&&W.status==null)W.status=$.status;return Q&&Object.assign(W,Q),W}constructor($,Y,X,G,J){super($);if(Object.defineProperty(this,"message",{__proto__:null,value:$,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,Y&&(this.code=Y),X&&(this.config=X),G&&(this.request=G),J)this.response=J,this.status=J.status}toJSON(){let $=this.config,Y=$&&_0.hasOwnProp($,"redact")?$.redact:void 0,X=_0.isArray(Y)&&Y.length>0?ma6($,Y):_0.toJSONObject($);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:X,code:this.code,status:this.status}}}VX.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";VX.ERR_BAD_OPTION="ERR_BAD_OPTION";VX.ECONNABORTED="ECONNABORTED";VX.ETIMEDOUT="ETIMEDOUT";VX.ECONNREFUSED="ECONNREFUSED";VX.ERR_NETWORK="ERR_NETWORK";VX.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";VX.ERR_DEPRECATED="ERR_DEPRECATED";VX.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";VX.ERR_BAD_REQUEST="ERR_BAD_REQUEST";VX.ERR_CANCELED="ERR_CANCELED";VX.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";VX.ERR_INVALID_URL="ERR_INVALID_URL";VX.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var D1=VX;var kM1=U6(SM1(),1),Qo=kM1.default;function dF0($){return _0.isPlainObject($)||_0.isArray($)}function vM1($){return _0.endsWith($,"[]")?$.slice(0,-2):$}function pF0($,Y,X){if(!$)return Y;return $.concat(Y).map(function(J,Q){return J=vM1(J),!X&&Q?"["+J+"]":J}).join(X?".":"")}function Io6($){return _0.isArray($)&&!$.some(dF0)}var Co6=_0.toFlatObject(_0,{},null,function(Y){return/^is[A-Z]/.test(Y)});function So6($,Y,X){if(!_0.isObject($))throw TypeError("target must be an object");Y=Y||new(Qo||FormData),X=_0.toFlatObject(X,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,B){return!_0.isUndefined(B[A])});let G=X.metaTokens,J=X.visitor||V,Q=X.dots,W=X.indexes,K=X.Blob||typeof Blob<"u"&&Blob,Z=X.maxDepth===void 0?100:X.maxDepth,H=K&&_0.isSpecCompliantForm(Y);if(!_0.isFunction(J))throw TypeError("visitor must be a function");function z(D){if(D===null)return"";if(_0.isDate(D))return D.toISOString();if(_0.isBoolean(D))return D.toString();if(!H&&_0.isBlob(D))throw new D1("Blob is not supported. Use a Buffer instead.");if(_0.isArrayBuffer(D)||_0.isTypedArray(D))return H&&typeof Blob==="function"?new Blob([D]):Buffer.from(D);return D}function V(D,A,B){let O=D;if(_0.isReactNative(Y)&&_0.isReactNativeBlob(D))return Y.append(pF0(B,A,Q),z(D)),!1;if(D&&!B&&typeof D==="object"){if(_0.endsWith(A,"{}"))A=G?A:A.slice(0,-2),D=JSON.stringify(D);else if(_0.isArray(D)&&Io6(D)||(_0.isFileList(D)||_0.endsWith(A,"[]"))&&(O=_0.toArray(D)))return A=vM1(A),O.forEach(function(M,R){!(_0.isUndefined(M)||M===null)&&Y.append(W===!0?pF0([A],R,Q):W===null?A:A+"[]",z(M))}),!1}if(dF0(D))return!0;return Y.append(pF0(B,A,Q),z(D)),!1}let F=[],L=Object.assign(Co6,{defaultVisitor:V,convertValue:z,isVisitable:dF0});function N(D,A,B=0){if(_0.isUndefined(D))return;if(B>Z)throw new D1("Object is too deeply nested ("+B+" levels). Max depth: "+Z,D1.ERR_FORM_DATA_DEPTH_EXCEEDED);if(F.indexOf(D)!==-1)throw Error("Circular reference detected in "+A.join("."));F.push(D),_0.forEach(D,function(E,M){if((!(_0.isUndefined(E)||E===null)&&J.call(Y,E,_0.isString(M)?M.trim():M,A,L))===!0)N(E,A?A.concat(M):[M],B+1)}),F.pop()}if(!_0.isObject($))throw TypeError("data must be an object");return N($),Y}var rF=So6;function xM1($){let Y={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent($).replace(/[!'()~]|%20/g,function(G){return Y[G]})}function yM1($,Y){this._pairs=[],$&&rF($,this,Y)}var bM1=yM1.prototype;bM1.append=function(Y,X){this._pairs.push([Y,X])};bM1.toString=function(Y){let X=Y?function(G){return Y.call(this,G,xM1)}:xM1;return this._pairs.map(function(J){return X(J[0])+"="+X(J[1])},"").join("&")};var hM1=yM1;function ko6($){return encodeURIComponent($).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function KB($,Y,X){if(!Y)return $;let G=X&&X.encode||ko6,J=_0.isFunction(X)?{serialize:X}:X,Q=J&&J.serialize,W;if(Q)W=Q(Y,J);else W=_0.isURLSearchParams(Y)?Y.toString():new hM1(Y,J).toString(G);if(W){let K=$.indexOf("#");if(K!==-1)$=$.slice(0,K);$+=($.indexOf("?")===-1?"?":"&")+W}return $}class fM1{constructor(){this.handlers=[]}use($,Y,X){return this.handlers.push({fulfilled:$,rejected:Y,synchronous:X?X.synchronous:!1,runWhen:X?X.runWhen:null}),this.handlers.length-1}eject($){if(this.handlers[$])this.handlers[$]=null}clear(){if(this.handlers)this.handlers=[]}forEach($){_0.forEach(this.handlers,function(X){if(X!==null)$(X)})}}var cF0=fM1;var aF={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0};import xo6 from"crypto";import vo6 from"url";var gM1=vo6.URLSearchParams;var lF0="abcdefghijklmnopqrstuvwxyz",mM1="0123456789",uM1={DIGIT:mM1,ALPHA:lF0,ALPHA_DIGIT:lF0+lF0.toUpperCase()+mM1},yo6=($=16,Y=uM1.ALPHA_DIGIT)=>{let X="",{length:G}=Y,J=new Uint32Array($);xo6.randomFillSync(J);for(let Q=0;Q<$;Q++)X+=Y[J[Q]%G];return X},pM1={isNode:!0,classes:{URLSearchParams:gM1,FormData:Qo,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:uM1,generateString:yo6,protocols:["http","https","file","data"]};var rF0={};W8(rF0,{origin:()=>fo6,navigator:()=>iF0,hasStandardBrowserWebWorkerEnv:()=>ho6,hasStandardBrowserEnv:()=>bo6,hasBrowserEnv:()=>nF0});var nF0=typeof window<"u"&&typeof document<"u",iF0=typeof navigator==="object"&&navigator||void 0,bo6=nF0&&(!iF0||["ReactNative","NativeScript","NS"].indexOf(iF0.product)<0),ho6=(()=>{return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),fo6=nF0&&window.location.href||"http://localhost";var $9={...rF0,...pM1};function aF0($,Y){return rF($,new $9.classes.URLSearchParams,{visitor:function(X,G,J,Q){if($9.isNode&&_0.isBuffer(X))return this.append(G,X.toString("base64")),!1;return Q.defaultVisitor.apply(this,arguments)},...Y})}function go6($){return _0.matchAll(/\w+|\[(\w*)]/g,$).map((Y)=>{return Y[0]==="[]"?"":Y[1]||Y[0]})}function mo6($){let Y={},X=Object.keys($),G,J=X.length,Q;for(G=0;G<J;G++)Q=X[G],Y[Q]=$[Q];return Y}function uo6($){function Y(X,G,J,Q){let W=X[Q++];if(W==="__proto__")return!0;let K=Number.isFinite(+W),Z=Q>=X.length;if(W=!W&&_0.isArray(J)?J.length:W,Z){if(_0.hasOwnProp(J,W))J[W]=_0.isArray(J[W])?J[W].concat(G):[J[W],G];else J[W]=G;return!K}if(!_0.hasOwnProp(J,W)||!_0.isObject(J[W]))J[W]=[];if(Y(X,G,J[W],Q)&&_0.isArray(J[W]))J[W]=mo6(J[W]);return!K}if(_0.isFormData($)&&_0.isFunction($.entries)){let X={};return _0.forEachEntry($,(G,J)=>{Y(go6(G),J,X,0)}),X}return null}var Wo=uo6;var bP=($,Y)=>$!=null&&_0.hasOwnProp($,Y)?$[Y]:void 0;function po6($,Y,X){if(_0.isString($))try{return(Y||JSON.parse)($),_0.trim($)}catch(G){if(G.name!=="SyntaxError")throw G}return(X||JSON.stringify)($)}var sF0={transitional:aF,adapter:["xhr","http","fetch"],transformRequest:[function(Y,X){let G=X.getContentType()||"",J=G.indexOf("application/json")>-1,Q=_0.isObject(Y);if(Q&&_0.isHTMLForm(Y))Y=new FormData(Y);if(_0.isFormData(Y))return J?JSON.stringify(Wo(Y)):Y;if(_0.isArrayBuffer(Y)||_0.isBuffer(Y)||_0.isStream(Y)||_0.isFile(Y)||_0.isBlob(Y)||_0.isReadableStream(Y))return Y;if(_0.isArrayBufferView(Y))return Y.buffer;if(_0.isURLSearchParams(Y))return X.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),Y.toString();let K;if(Q){let Z=bP(this,"formSerializer");if(G.indexOf("application/x-www-form-urlencoded")>-1)return aF0(Y,Z).toString();if((K=_0.isFileList(Y))||G.indexOf("multipart/form-data")>-1){let H=bP(this,"env"),z=H&&H.FormData;return rF(K?{"files[]":Y}:Y,z&&new z,Z)}}if(Q||J)return X.setContentType("application/json",!1),po6(Y);return Y}],transformResponse:[function(Y){let X=bP(this,"transitional")||sF0.transitional,G=X&&X.forcedJSONParsing,J=bP(this,"responseType"),Q=J==="json";if(_0.isResponse(Y)||_0.isReadableStream(Y))return Y;if(Y&&_0.isString(Y)&&(G&&!J||Q)){let K=!(X&&X.silentJSONParsing)&&Q;try{return JSON.parse(Y,bP(this,"parseReviver"))}catch(Z){if(K){if(Z.name==="SyntaxError")throw D1.from(Z,D1.ERR_BAD_RESPONSE,this,null,bP(this,"response"));throw Z}}}return Y}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$9.classes.FormData,Blob:$9.classes.Blob},validateStatus:function(Y){return Y>=200&&Y<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_0.forEach(["delete","get","head","post","put","patch","query"],($)=>{sF0.headers[$]={}});var hP=sF0;function Jy($,Y){let X=this||hP,G=Y||X,J=o5.from(G.headers),Q=G.data;return _0.forEach($,function(K){Q=K.call(X,Q,J.normalize(),Y?Y.status:void 0)}),J.normalize(),Q}function Qy($){return!!($&&$.__CANCEL__)}class dM1 extends D1{constructor($,Y,X){super($==null?"canceled":$,D1.ERR_CANCELED,Y,X);this.name="CanceledError",this.__CANCEL__=!0}}var WW=dM1;function K3($,Y,X){let G=X.config.validateStatus;if(!X.status||!G||G(X.status))$(X);else Y(new D1("Request failed with status code "+X.status,X.status>=400&&X.status<500?D1.ERR_BAD_REQUEST:D1.ERR_BAD_RESPONSE,X.config,X.request,X))}function oF0($){if(typeof $!=="string")return!1;return/^([a-z][a-z\d+\-.]*:)?\/\//i.test($)}function tF0($,Y){return Y?$.replace(/\/?\/$/,"")+"/"+Y.replace(/^\/+/,""):$}function ZB($,Y,X){let G=!oF0(Y);if($&&(G||X===!1))return tF0($,Y);return Y}var do6={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function co6($){try{return new URL($)}catch{return null}}function cM1($){var Y=(typeof $==="string"?co6($):$)||{},X=Y.protocol,G=Y.host,J=Y.port;if(typeof G!=="string"||!G||typeof X!=="string")return"";if(X=X.split(":",1)[0],G=G.replace(/:\d*$/,""),J=parseInt(J)||do6[X]||0,!lo6(G,J))return"";var Q=eF0(X+"_proxy")||eF0("all_proxy");if(Q&&Q.indexOf("://")===-1)Q=X+"://"+Q;return Q}function lo6($,Y){var X=eF0("no_proxy").toLowerCase();if(!X)return!0;if(X==="*")return!1;return X.split(/[,\s]/).every(function(G){if(!G)return!0;var J=G.match(/^(.+):(\d+)$/),Q=J?J[1]:G,W=J?parseInt(J[2]):0;if(W&&W!==Y)return!0;if(!/^[.*]/.test(Q))return $!==Q;if(Q.charAt(0)==="*")Q=Q.slice(1);return!$.endsWith(Q)})}function eF0($){return process.env[$.toLowerCase()]||process.env[$.toUpperCase()]||""}var wL0=U6(FR1(),1),cR1=U6(ER1(),1);import we6 from"http";import _e6 from"https";import pR1 from"http2";import dR1 from"util";import{resolve as vR1}from"path";import sF from"zlib";var Kz="1.16.1";function Ny($){let Y=/^([-+\w]{1,25}):(?:\/\/)?/.exec($);return Y&&Y[1]||""}var Qe6=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function ML0($,Y,X){let G=X&&X.Blob||$9.classes.Blob,J=Ny($);if(Y===void 0&&G)Y=!0;if(J==="data"){$=J.length?$.slice(J.length+1):$;let Q=Qe6.exec($);if(!Q)throw new D1("Invalid URL",D1.ERR_INVALID_URL);let W=Q[1],K=Q[2],Z=Q[3]?"base64":"utf8",H=Q[4],z;if(W)z=K?W+K:W;else if(K)z="text/plain"+K;let V=Buffer.from(decodeURIComponent(H),Z);if(Y){if(!G)throw new D1("Blob is not supported",D1.ERR_NOT_SUPPORT);return new G([V],{type:z})}return V}throw new D1("Unsupported protocol "+J,D1.ERR_NOT_SUPPORT)}import oK from"stream";import We6 from"stream";var RL0=Symbol("internals");class MR1 extends We6.Transform{constructor($){$=_0.toFlatObject($,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(X,G)=>{return!_0.isUndefined(G[X])});super({readableHighWaterMark:$.chunkSize});let Y=this[RL0]={timeWindow:$.timeWindow,chunkSize:$.chunkSize,maxRate:$.maxRate,minChunkSize:$.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",(X)=>{if(X==="progress"){if(!Y.isCaptured)Y.isCaptured=!0}})}_read($){let Y=this[RL0];if(Y.onReadCallback)Y.onReadCallback();return super._read($)}_transform($,Y,X){let G=this[RL0],J=G.maxRate,Q=this.readableHighWaterMark,W=G.timeWindow,K=1000/W,Z=J/K,H=G.minChunkSize!==!1?Math.max(G.minChunkSize,Z*0.01):0,z=(F,L)=>{let N=Buffer.byteLength(F);if(G.bytesSeen+=N,G.bytes+=N,G.isCaptured&&this.emit("progress",G.bytesSeen),this.push(F))process.nextTick(L);else G.onReadCallback=()=>{G.onReadCallback=null,process.nextTick(L)}},V=(F,L)=>{let N=Buffer.byteLength(F),D=null,A=Q,B,O=0;if(J){let E=Date.now();if(!G.ts||(O=E-G.ts)>=W)G.ts=E,B=Z-G.bytes,G.bytes=B<0?-B:0,O=0;B=Z-G.bytes}if(J){if(B<=0)return setTimeout(()=>{L(null,F)},W-O);if(B<A)A=B}if(A&&N>A&&N-A>H)D=F.subarray(A),F=F.subarray(0,A);z(F,D?()=>{process.nextTick(L,null,D)}:L)};V($,function F(L,N){if(L)return X(L);if(N)V(N,F);else X(null)})}}var qL0=MR1;import{EventEmitter as je6}from"events";import Ze6 from"util";import{Readable as Ue6}from"stream";var{asyncIterator:RR1}=Symbol,Ke6=async function*($){if($.stream)yield*$.stream();else if($.arrayBuffer)yield await $.arrayBuffer();else if($[RR1])yield*$[RR1]();else yield $},Vo=Ke6;var He6=$9.ALPHABET.ALPHA_DIGIT+"-_",Ay=typeof TextEncoder==="function"?new TextEncoder:new Ze6.TextEncoder,FB=`\r
`,ze6=Ay.encode(FB),Ve6=2;class qR1{constructor($,Y){let{escapeName:X}=this.constructor,G=_0.isString(Y),J=`Content-Disposition: form-data; name="${X($)}"${!G&&Y.name?`; filename="${X(Y.name)}"`:""}${FB}`;if(G)Y=Ay.encode(String(Y).replace(/\r?\n|\r\n?/g,FB));else{let Q=String(Y.type||"application/octet-stream").replace(/[\r\n]/g,"");J+=`Content-Type: ${Q}${FB}`}this.headers=Ay.encode(J+FB),this.contentLength=G?Y.byteLength:Y.size,this.size=this.headers.byteLength+this.contentLength+Ve6,this.name=$,this.value=Y}async*encode(){yield this.headers;let{value:$}=this;if(_0.isTypedArray($))yield $;else yield*Vo($);yield ze6}static escapeName($){return String($).replace(/[\r\n"]/g,(Y)=>({"\r":"%0D","\n":"%0A",'"':"%22"})[Y])}}var Fe6=($,Y,X)=>{let{tag:G="form-data-boundary",size:J=25,boundary:Q=G+"-"+$9.generateString(J,He6)}=X||{};if(!_0.isFormData($))throw TypeError("FormData instance required");if(Q.length<1||Q.length>70)throw Error("boundary must be 1-70 characters long");let W=Ay.encode("--"+Q+FB),K=Ay.encode("--"+Q+"--"+FB),Z=K.byteLength,H=Array.from($.entries()).map(([V,F])=>{let L=new qR1(V,F);return Z+=L.size,L});Z+=W.byteLength*H.length,Z=_0.toFiniteNumber(Z);let z={"Content-Type":`multipart/form-data; boundary=${Q}`};if(Number.isFinite(Z))z["Content-Length"]=Z;return Y&&Y(z),Ue6.from(async function*(){for(let V of H)yield W,yield*V.encode();yield K}())},PR1=Fe6;import Le6 from"stream";class wR1 extends Le6.Transform{__transform($,Y,X){this.push($),X()}_transform($,Y,X){if($.length!==0){if(this._transform=this.__transform,$[0]!==120){let G=Buffer.alloc(2);G[0]=120,G[1]=156,this.push(G,Y)}}this.__transform($,Y,X)}}var _R1=wR1;var De6=($,Y)=>{return _0.isAsyncFn($)?function(...X){let G=X.pop();$.apply(this,X).then((J)=>{try{Y?G(null,...Y(J)):G(null,J)}catch(Q){G(Q)}},G)}:$},jR1=De6;var Ne6=new Set(["localhost"]),CR1=($)=>{let Y=$.split(".");if(Y.length!==4)return!1;if(Y[0]!=="127")return!1;return Y.every((X)=>/^\d+$/.test(X)&&Number(X)>=0&&Number(X)<=255)},Ae6=($)=>{if($==="::1")return!0;let Y=$.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(Y)return CR1(Y[1]);let X=$.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(X){let J=parseInt(X[1],16);return J>=32512&&J<=32767}let G=$.split(":");if(G.length===8){for(let J=0;J<7;J++)if(!/^0+$/.test(G[J]))return!1;return/^0*1$/.test(G[7])}return!1},TR1=($)=>{if(!$)return!1;if(Ne6.has($))return!0;if(CR1($))return!0;return Ae6($)},Be6={http:80,https:443,ws:80,wss:443,ftp:21},Oe6=($)=>{let Y=$,X=0;if(Y.charAt(0)==="["){let Q=Y.indexOf("]");if(Q!==-1){let W=Y.slice(1,Q),K=Y.slice(Q+1);if(K.charAt(0)===":"&&/^\d+$/.test(K.slice(1)))X=Number.parseInt(K.slice(1),10);return[W,X]}}let G=Y.indexOf(":"),J=Y.lastIndexOf(":");if(G!==-1&&G===J&&/^\d+$/.test(Y.slice(J+1)))X=Number.parseInt(Y.slice(J+1),10),Y=Y.slice(0,J);return[Y,X]},Ee6=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,Me6=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,Re6=($)=>{if(typeof $!=="string"||$.indexOf(":")===-1)return $;let Y=$.match(Ee6);if(Y)return Y[1];let X=$.match(Me6);if(X){let G=parseInt(X[1],16),J=parseInt(X[2],16);return`${G>>8}.${G&255}.${J>>8}.${J&255}`}return $},IR1=($)=>{if(!$)return $;if($.charAt(0)==="["&&$.charAt($.length-1)==="]")$=$.slice(1,-1);return Re6($.replace(/\.+$/,""))};function PL0($){let Y;try{Y=new URL($)}catch(Q){return!1}let X=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!X)return!1;if(X==="*")return!0;let G=Number.parseInt(Y.port,10)||Be6[Y.protocol.split(":",1)[0]]||0,J=IR1(Y.hostname.toLowerCase());return X.split(/[\s,]+/).some((Q)=>{if(!Q)return!1;let[W,K]=Oe6(Q);if(W=IR1(W),!W)return!1;if(K&&K!==G)return!1;if(W.charAt(0)==="*")W=W.slice(1);if(W.charAt(0)===".")return J.endsWith(W);return J===W||TR1(J)&&TR1(W)})}function qe6($,Y){$=$||10;let X=Array($),G=Array($),J=0,Q=0,W;return Y=Y!==void 0?Y:1000,function(Z){let H=Date.now(),z=G[Q];if(!W)W=H;X[J]=Z,G[J]=H;let V=Q,F=0;while(V!==J)F+=X[V++],V=V%$;if(J=(J+1)%$,J===Q)Q=(Q+1)%$;if(H-W<Y)return;let L=z&&H-z;return L?Math.round(F*1000/L):void 0}}var SR1=qe6;function Pe6($,Y){let X=0,G=1000/Y,J,Q,W=(H,z=Date.now())=>{if(X=z,J=null,Q)clearTimeout(Q),Q=null;$(...H)};return[(...H)=>{let z=Date.now(),V=z-X;if(V>=G)W(H,z);else if(J=H,!Q)Q=setTimeout(()=>{Q=null,W(J)},G-V)},()=>J&&W(J)]}var kR1=Pe6;var Zz=($,Y,X=3)=>{let G=0,J=SR1(50,250);return kR1((Q)=>{if(!Q||typeof Q.loaded!=="number")return;let W=Q.loaded,K=Q.lengthComputable?Q.total:void 0,Z=K!=null?Math.min(W,K):W,H=Math.max(0,Z-G),z=J(H);G=Math.max(G,Z);let V={loaded:Z,total:K,progress:K?Z/K:void 0,bytes:H,rate:z?z:void 0,estimated:z&&K?(K-Z)/z:void 0,event:Q,lengthComputable:K!=null,[Y?"download":"upload"]:!0};$(V)},X)},gP=($,Y)=>{let X=$!=null;return[(G)=>Y[0]({lengthComputable:X,total:$,loaded:G}),Y[1]]},mP=($)=>(...Y)=>_0.asap(()=>$(...Y));function By($){if(!$||typeof $!=="string")return 0;if(!$.startsWith("data:"))return 0;let Y=$.indexOf(",");if(Y<0)return 0;let X=$.slice(5,Y),G=$.slice(Y+1);if(/;base64/i.test(X)){let{length:W,length:K}=G;for(let L=0;L<K;L++)if(G.charCodeAt(L)===37&&L+2<K){let N=G.charCodeAt(L+1),D=G.charCodeAt(L+2);if((N>=48&&N<=57||N>=65&&N<=70||N>=97&&N<=102)&&(D>=48&&D<=57||D>=65&&D<=70||D>=97&&D<=102))W-=2,L+=2}let Z=0,H=K-1,z=(L)=>L>=2&&G.charCodeAt(L-2)===37&&G.charCodeAt(L-1)===51&&(G.charCodeAt(L)===68||G.charCodeAt(L)===100);if(H>=0){if(G.charCodeAt(H)===61)Z++,H--;else if(z(H))Z++,H-=3}if(Z===1&&H>=0){if(G.charCodeAt(H)===61)Z++;else if(z(H))Z++}let F=Math.floor(W/4)*3-(Z||0);return F>0?F:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength==="function")return Buffer.byteLength(G,"utf8");let Q=0;for(let W=0,K=G.length;W<K;W++){let Z=G.charCodeAt(W);if(Z<128)Q+=1;else if(Z<2048)Q+=2;else if(Z>=55296&&Z<=56319&&W+1<K){let H=G.charCodeAt(W+1);if(H>=56320&&H<=57343)Q+=4,W++;else Q+=3}else Q+=3}return Q}var xR1={flush:sF.constants.Z_SYNC_FLUSH,finishFlush:sF.constants.Z_SYNC_FLUSH},Te6={flush:sF.constants.BROTLI_OPERATION_FLUSH,finishFlush:sF.constants.BROTLI_OPERATION_FLUSH},yR1=_0.isFunction(sF.createBrotliDecompress),{http:Ie6,https:Ce6}=cR1.default,lR1=/https:?/,Se6=["content-type","content-length"];function ke6($,Y,X){if(X!=="content-only"){$.set(Y);return}Object.entries(Y).forEach(([G,J])=>{if(Se6.includes(G.toLowerCase()))$.set(G,J)})}var bR1=Symbol("axios.http.socketListener"),Fo=Symbol("axios.http.currentReq"),iR1=Symbol("axios.http.installedTunnel"),ve6=new Map,hR1=new WeakMap;function xe6($,Y){let X=$.protocol+"//"+$.hostname+":"+($.port||"")+"#"+($.auth||""),G=Y?hR1.get(Y)||hR1.set(Y,new Map).get(Y):ve6,J=G.get(X);if(J)return J;let Q=Y&&Y.options?{...Y.options,...$}:$;return J=new wL0.default(Q),J[iR1]=!0,G.set(X,J),J}var fR1=$9.protocols.map(($)=>{return $+":"}),gR1=($)=>{if(!_0.isString($))return $;try{return decodeURIComponent($)}catch(Y){return $}},mR1=($,[Y,X])=>{return $.on("end",X).on("error",X),Y};class nR1{constructor(){this.sessions=Object.create(null)}getSession($,Y){Y=Object.assign({sessionTimeout:1000},Y);let X=this.sessions[$];if(X){let H=X.length;for(let z=0;z<H;z++){let[V,F]=X[z];if(!V.destroyed&&!V.closed&&dR1.isDeepStrictEqual(F,Y))return V}}let G=pR1.connect($,Y),J,Q=()=>{if(J)return;J=!0;let H=X,z=H.length,V=z;while(V--)if(H[V][0]===G){if(z===1)delete this.sessions[$];else H.splice(V,1);if(!G.closed)G.close();return}},W=G.request,{sessionTimeout:K}=Y;if(K!=null){let H,z=0;G.request=function(){let V=W.apply(this,arguments);if(z++,H)clearTimeout(H),H=null;return V.once("close",()=>{if(!--z)H=setTimeout(()=>{H=null,Q()},K)}),V}}G.once("close",Q);let Z=[G,Y];return X?X.push(Z):X=this.sessions[$]=[Z],G}}var ye6=new nR1;function be6($,Y,X){if($.beforeRedirects.proxy)$.beforeRedirects.proxy($);if($.beforeRedirects.config)$.beforeRedirects.config($,Y,X)}function rR1($,Y,X,G,J){let Q=Y;if(!Q&&Q!==!1){let W=cM1(X);if(W){if(!PL0(X))Q=new URL(W)}}if(G&&$.headers){for(let W of Object.keys($.headers))if(W.toLowerCase()==="proxy-authorization")delete $.headers[W]}if(G&&$.agent&&$.agent[iR1])$.agent=void 0;if(Q){let W=Q instanceof URL,K=(F)=>W||_0.hasOwnProp(Q,F)?Q[F]:void 0,Z=K("username"),H=K("password"),z=_0.hasOwnProp(Q,"auth")?Q.auth:void 0;if(Z)z=(Z||"")+":"+(H||"");if(z){let F=typeof z==="object",L=F&&_0.hasOwnProp(z,"username")?z.username:void 0,N=F&&_0.hasOwnProp(z,"password")?z.password:void 0;if(Boolean(L||N))z=(L||"")+":"+(N||"");else if(F)throw new D1("Invalid proxy authorization",D1.ERR_BAD_OPTION,{proxy:Q})}if(lR1.test($.protocol)){if(!(J instanceof wL0.default)){let F=K("hostname")||K("host"),L=K("port"),N=K("protocol"),D=N?N.includes(":")?N:`${N}:`:"http:",A=F&&F.includes(":")&&!F.startsWith("[")?`[${F}]`:F,B=new URL(`${D}//${A}${L?":"+L:""}`),O={protocol:B.protocol,hostname:B.hostname.replace(/^\[|\]$/g,""),port:B.port,auth:z&&typeof z==="string"?z:void 0};if(B.protocol==="https:")O.ALPNProtocols=["http/1.1"];let E=xe6(O,J);if($.agent=E,$.agents)$.agents.https=E}}else{if(z){let D=Buffer.from(z,"utf8").toString("base64");$.headers["Proxy-Authorization"]="Basic "+D}let F=!1;for(let D of Object.keys($.headers))if(D.toLowerCase()==="host"){F=!0;break}if(!F)$.headers.host=$.hostname+($.port?":"+$.port:"");let L=K("hostname")||K("host");$.hostname=L,$.host=L,$.port=K("port"),$.path=X;let N=K("protocol");if(N)$.protocol=N.includes(":")?N:`${N}:`}}$.beforeRedirects.proxy=function(K){rR1(K,Y,K.href,!0,J)}}var he6=typeof process<"u"&&_0.kindOf(process)==="process",fe6=($)=>{return new Promise((Y,X)=>{let G,J,Q=(Z,H)=>{if(J)return;J=!0,G&&G(Z,H)},W=(Z)=>{Q(Z),Y(Z)},K=(Z)=>{Q(Z,!0),X(Z)};$(W,K,(Z)=>G=Z).catch(K)})},ge6=({address:$,family:Y})=>{if(!_0.isString($))throw TypeError("address must be a string");return{address:$,family:Y||($.indexOf(".")<0?6:4)}},uR1=($,Y)=>ge6(_0.isObject($)?$:{address:$,family:Y}),me6={request($,Y){let X=$.protocol+"//"+$.hostname+":"+($.port||($.protocol==="https:"?443:80)),{http2Options:G,headers:J}=$,Q=ye6.getSession(X,G),{HTTP2_HEADER_SCHEME:W,HTTP2_HEADER_METHOD:K,HTTP2_HEADER_PATH:Z,HTTP2_HEADER_STATUS:H}=pR1.constants,z={[W]:$.protocol.replace(":",""),[K]:$.method,[Z]:$.path};_0.forEach(J,(F,L)=>{L.charAt(0)!==":"&&(z[L]=F)});let V=Q.request(z);return V.once("response",(F)=>{let L=V;F=Object.assign({},F);let N=F[H];delete F[H],L.headers=F,L.statusCode=+N,Y(L)}),V}},aR1=he6&&function(Y){return fe6(async function(G,J,Q){let W=(K0)=>_0.hasOwnProp(Y,K0)?Y[K0]:void 0,K=W("data"),Z=W("lookup"),H=W("family"),z=W("httpVersion");if(z===void 0)z=1;let V=W("http2Options"),F=W("responseType"),L=W("responseEncoding"),N=Y.method.toUpperCase(),D,A=!1,B,O;if(z=+z,Number.isNaN(z))throw TypeError(`Invalid protocol version: '${Y.httpVersion}' is not a number`);if(z!==1&&z!==2)throw TypeError(`Unsupported protocol version '${z}'`);let E=z===2;if(Z){let K0=jR1(Z,(X0)=>_0.isArray(X0)?X0:[X0]);Z=(X0,a,Q0)=>{K0(X0,a,(e,m,$0)=>{if(e)return Q0(e);let Y0=_0.isArray(m)?m.map((Z0)=>uR1(Z0)):[uR1(m,$0)];a.all?Q0(e,Y0):Q0(e,Y0[0].address,Y0[0].family)})}}let M=new je6;function R(K0){try{M.emit("abort",!K0||K0.type?new WW(null,Y,B):K0)}catch(X0){console.warn("emit error",X0)}}function q(){if(O)clearTimeout(O),O=null}function _(){let K0=Y.timeout?"timeout of "+Y.timeout+"ms exceeded":"timeout exceeded",X0=Y.transitional||aF;if(Y.timeoutErrorMessage)K0=Y.timeoutErrorMessage;return new D1(K0,X0.clarifyTimeoutError?D1.ETIMEDOUT:D1.ECONNABORTED,Y,B)}M.once("abort",J);let P=()=>{if(q(),Y.cancelToken)Y.cancelToken.unsubscribe(R);if(Y.signal)Y.signal.removeEventListener("abort",R);M.removeAllListeners()};if(Y.cancelToken||Y.signal){if(Y.cancelToken&&Y.cancelToken.subscribe(R),Y.signal)Y.signal.aborted?R():Y.signal.addEventListener("abort",R)}Q((K0,X0)=>{if(D=!0,q(),X0){A=!0,P();return}let{data:a}=K0;if(a instanceof oK.Readable||a instanceof oK.Duplex){let Q0=oK.finished(a,()=>{Q0(),P()})}else P()});let w=ZB(Y.baseURL,Y.url,Y.allowAbsoluteUrls),j=new URL(w,$9.hasBrowserEnv?$9.origin:void 0),C=j.protocol||fR1[0];if(C==="data:"){if(Y.maxContentLength>-1){let X0=String(Y.url||w||"");if(By(X0)>Y.maxContentLength)return J(new D1("maxContentLength size of "+Y.maxContentLength+" exceeded",D1.ERR_BAD_RESPONSE,Y))}let K0;if(N!=="GET")return K3(G,J,{status:405,statusText:"method not allowed",headers:{},config:Y});try{K0=ML0(Y.url,F==="blob",{Blob:Y.env&&Y.env.Blob})}catch(X0){throw D1.from(X0,D1.ERR_BAD_REQUEST,Y)}if(F==="text"){if(K0=K0.toString(L),!L||L==="utf8")K0=_0.stripBOM(K0)}else if(F==="stream")K0=oK.Readable.from(K0);return K3(G,J,{data:K0,status:200,statusText:"OK",headers:new o5,config:Y})}if(fR1.indexOf(C)===-1)return J(new D1("Unsupported protocol "+C,D1.ERR_BAD_REQUEST,Y));let k=o5.from(Y.headers).normalize();k.set("User-Agent","axios/"+Kz,!1);let{onUploadProgress:S,onDownloadProgress:I}=Y,v=Y.maxRate,x=void 0,y=void 0;if(_0.isSpecCompliantForm(K)){let K0=k.getContentType(/boundary=([-_\w\d]{10,70})/i);K=PR1(K,(X0)=>{k.set(X0)},{tag:`axios-${Kz}-boundary`,boundary:K0&&K0[1]||void 0})}else if(_0.isFormData(K)&&_0.isFunction(K.getHeaders)&&K.getHeaders!==Object.prototype.getHeaders){if(ke6(k,K.getHeaders(),W("formDataHeaderPolicy")),!k.hasContentLength())try{let K0=await dR1.promisify(K.getLength).call(K);Number.isFinite(K0)&&K0>=0&&k.setContentLength(K0)}catch(K0){}}else if(_0.isBlob(K)||_0.isFile(K))K.size&&k.setContentType(K.type||"application/octet-stream"),k.setContentLength(K.size||0),K=oK.Readable.from(Vo(K));else if(K&&!_0.isStream(K)){if(Buffer.isBuffer(K));else if(_0.isArrayBuffer(K))K=Buffer.from(new Uint8Array(K));else if(_0.isString(K))K=Buffer.from(K,"utf-8");else return J(new D1("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",D1.ERR_BAD_REQUEST,Y));if(k.setContentLength(K.length,!1),Y.maxBodyLength>-1&&K.length>Y.maxBodyLength)return J(new D1("Request body larger than maxBodyLength limit",D1.ERR_BAD_REQUEST,Y))}let d=_0.toFiniteNumber(k.getContentLength());if(_0.isArray(v))x=v[0],y=v[1];else x=y=v;if(K&&(S||x)){if(!_0.isStream(K))K=oK.Readable.from(K,{objectMode:!1});K=oK.pipeline([K,new qL0({maxRate:_0.toFiniteNumber(x)})],_0.noop),S&&K.on("progress",mR1(K,gP(d,Zz(mP(S),!1,3))))}let u=void 0,b=W("auth");if(b){let K0=b.username||"",X0=b.password||"";u=K0+":"+X0}if(!u&&j.username){let K0=gR1(j.username),X0=gR1(j.password);u=K0+":"+X0}u&&k.delete("authorization");let g;try{g=KB(j.pathname+j.search,Y.params,Y.paramsSerializer).replace(/^\?/,"")}catch(K0){let X0=Error(K0.message);return X0.config=Y,X0.url=Y.url,X0.exists=!0,J(X0)}k.set("Accept-Encoding","gzip, compress, deflate"+(yR1?", br":""),!1);let p=Object.assign(Object.create(null),{path:g,method:N,headers:SP(k),agents:{http:Y.httpAgent,https:Y.httpsAgent},auth:u,protocol:C,family:H,beforeRedirect:be6,beforeRedirects:Object.create(null),http2Options:V});if(!_0.isUndefined(Z)&&(p.lookup=Z),Y.socketPath){if(typeof Y.socketPath!=="string")return J(new D1("socketPath must be a string",D1.ERR_BAD_OPTION_VALUE,Y));if(Y.allowedSocketPaths!=null){let K0=Array.isArray(Y.allowedSocketPaths)?Y.allowedSocketPaths:[Y.allowedSocketPaths],X0=vR1(Y.socketPath);if(!K0.some((Q0)=>typeof Q0==="string"&&vR1(Q0)===X0))return J(new D1(`socketPath "${Y.socketPath}" is not permitted by allowedSocketPaths`,D1.ERR_BAD_OPTION_VALUE,Y))}p.socketPath=Y.socketPath}else p.hostname=j.hostname.startsWith("[")?j.hostname.slice(1,-1):j.hostname,p.port=j.port,rR1(p,Y.proxy,C+"//"+j.hostname+(j.port?":"+j.port:"")+p.path,!1,Y.httpsAgent);let h,n=!1,t=lR1.test(p.protocol);if(p.agent==null)p.agent=t?Y.httpsAgent:Y.httpAgent;if(E)h=me6;else{let K0=W("transport");if(K0)h=K0;else if(Y.maxRedirects===0)h=t?_e6:we6,n=!0;else{if(Y.maxRedirects)p.maxRedirects=Y.maxRedirects;let X0=W("beforeRedirect");if(X0)p.beforeRedirects.config=X0;h=t?Ce6:Ie6}}if(Y.maxBodyLength>-1)p.maxBodyLength=Y.maxBodyLength;else p.maxBodyLength=1/0;p.insecureHTTPParser=Boolean(W("insecureHTTPParser")),B=h.request(p,function(X0){if(q(),B.destroyed)return;let a=[X0],Q0=_0.toFiniteNumber(X0.headers["content-length"]);if(I||y){let Y0=new qL0({maxRate:_0.toFiniteNumber(y)});I&&Y0.on("progress",mR1(Y0,gP(Q0,Zz(mP(I),!0,3)))),a.push(Y0)}let e=X0,m=X0.req||B;if(Y.decompress!==!1&&X0.headers["content-encoding"]){if(N==="HEAD"||X0.statusCode===204)delete X0.headers["content-encoding"];switch((X0.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":a.push(sF.createUnzip(xR1)),delete X0.headers["content-encoding"];break;case"deflate":a.push(new _R1),a.push(sF.createUnzip(xR1)),delete X0.headers["content-encoding"];break;case"br":if(yR1)a.push(sF.createBrotliDecompress(Te6)),delete X0.headers["content-encoding"]}}e=a.length>1?oK.pipeline(a,_0.noop):a[0];let $0={status:X0.statusCode,statusText:X0.statusMessage,headers:new o5(X0.headers),config:Y,request:m};if(F==="stream"){if(Y.maxContentLength>-1){let Y0=Y.maxContentLength,Z0=e;async function*F0(){let D0=0;for await(let O0 of Z0){if(D0+=O0.length,D0>Y0)throw new D1("maxContentLength size of "+Y0+" exceeded",D1.ERR_BAD_RESPONSE,Y,m);yield O0}}e=oK.Readable.from(F0(),{objectMode:!1})}$0.data=e,K3(G,J,$0)}else{let Y0=[],Z0=0;e.on("data",function(D0){if(Y0.push(D0),Z0+=D0.length,Y.maxContentLength>-1&&Z0>Y.maxContentLength)A=!0,e.destroy(),R(new D1("maxContentLength size of "+Y.maxContentLength+" exceeded",D1.ERR_BAD_RESPONSE,Y,m))}),e.on("aborted",function(){if(A)return;let D0=new D1("stream has been aborted",D1.ERR_BAD_RESPONSE,Y,m,$0);e.destroy(D0),J(D0)}),e.on("error",function(D0){if(A)return;J(D1.from(D0,null,Y,m,$0))}),e.on("end",function(){try{let D0=Y0.length===1?Y0[0]:Buffer.concat(Y0);if(F!=="arraybuffer"){if(D0=D0.toString(L),!L||L==="utf8")D0=_0.stripBOM(D0)}$0.data=D0}catch(D0){return J(D1.from(D0,null,Y,$0.request,$0))}K3(G,J,$0)})}M.once("abort",(Y0)=>{if(!e.destroyed)e.emit("error",Y0),e.destroy()})}),M.once("abort",(K0)=>{if(B.close)B.close();else B.destroy(K0)}),B.on("error",function(X0){J(D1.from(X0,null,Y,B))});let s=new Set;if(B.on("socket",function(X0){if(X0.setKeepAlive(!0,60000),!X0[bR1])X0.on("error",function(Q0){let e=X0[Fo];if(e&&!e.destroyed)e.destroy(Q0)}),X0[bR1]=!0;X0[Fo]=B,s.add(X0)}),B.once("close",function(){q();for(let X0 of s)if(X0[Fo]===B)X0[Fo]=null;s.clear()}),Y.timeout){let K0=parseInt(Y.timeout,10);if(Number.isNaN(K0)){R(new D1("error trying to parse `config.timeout` to int",D1.ERR_BAD_OPTION_VALUE,Y,B));return}let X0=function(){if(D)return;R(_())};if(n&&K0>0)O=setTimeout(X0,K0);B.setTimeout(K0,X0)}else B.setTimeout(0);if(_0.isStream(K)){let K0=!1,X0=!1;K.on("end",()=>{K0=!0}),K.once("error",(Q0)=>{X0=!0,B.destroy(Q0)}),K.on("close",()=>{if(!K0&&!X0)R(new WW("Request stream has been aborted",Y,B))});let a=K;if(Y.maxBodyLength>-1&&Y.maxRedirects===0){let Q0=Y.maxBodyLength,e=0;a=oK.pipeline([K,new oK.Transform({transform(m,$0,Y0){if(e+=m.length,e>Q0)return Y0(new D1("Request body larger than maxBodyLength limit",D1.ERR_BAD_REQUEST,Y,B));Y0(null,m)}})],_0.noop),a.on("error",(m)=>{if(!B.destroyed)B.destroy(m)})}a.pipe(B)}else K&&B.write(K),B.end()})};var sR1=$9.hasStandardBrowserEnv?(($,Y)=>(X)=>{return X=new URL(X,$9.origin),$.protocol===X.protocol&&$.host===X.host&&(Y||$.port===X.port)})(new URL($9.origin),$9.navigator&&/(msie|trident)/i.test($9.navigator.userAgent)):()=>!0;var oR1=$9.hasStandardBrowserEnv?{write($,Y,X,G,J,Q,W){if(typeof document>"u")return;let K=[`${$}=${encodeURIComponent(Y)}`];if(_0.isNumber(X))K.push(`expires=${new Date(X).toUTCString()}`);if(_0.isString(G))K.push(`path=${G}`);if(_0.isString(J))K.push(`domain=${J}`);if(Q===!0)K.push("secure");if(_0.isString(W))K.push(`SameSite=${W}`);document.cookie=K.join("; ")},read($){if(typeof document>"u")return null;let Y=document.cookie.split(";");for(let X=0;X<Y.length;X++){let G=Y[X].replace(/^\s+/,""),J=G.indexOf("=");if(J!==-1&&G.slice(0,J)===$)return decodeURIComponent(G.slice(J+1))}return null},remove($){this.write($,"",Date.now()-86400000,"/")}}:{write(){},read(){return null},remove(){}};var tR1=($)=>$ instanceof o5?{...$}:$;function tK($,Y){Y=Y||{};let X=Object.create(null);Object.defineProperty(X,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function G(H,z,V,F){if(_0.isPlainObject(H)&&_0.isPlainObject(z))return _0.merge.call({caseless:F},H,z);else if(_0.isPlainObject(z))return _0.merge({},z);else if(_0.isArray(z))return z.slice();return z}function J(H,z,V,F){if(!_0.isUndefined(z))return G(H,z,V,F);else if(!_0.isUndefined(H))return G(void 0,H,V,F)}function Q(H,z){if(!_0.isUndefined(z))return G(void 0,z)}function W(H,z){if(!_0.isUndefined(z))return G(void 0,z);else if(!_0.isUndefined(H))return G(void 0,H)}function K(H,z,V){if(_0.hasOwnProp(Y,V))return G(H,z);else if(_0.hasOwnProp($,V))return G(void 0,H)}let Z={url:Q,method:Q,data:Q,baseURL:W,transformRequest:W,transformResponse:W,paramsSerializer:W,timeout:W,timeoutMessage:W,withCredentials:W,withXSRFToken:W,adapter:W,responseType:W,xsrfCookieName:W,xsrfHeaderName:W,onUploadProgress:W,onDownloadProgress:W,decompress:W,maxContentLength:W,maxBodyLength:W,beforeRedirect:W,transport:W,httpAgent:W,httpsAgent:W,cancelToken:W,socketPath:W,allowedSocketPaths:W,responseEncoding:W,validateStatus:K,headers:(H,z,V)=>J(tR1(H),tR1(z),V,!0)};return _0.forEach(Object.keys({...$,...Y}),function(z){if(z==="__proto__"||z==="constructor"||z==="prototype")return;let V=_0.hasOwnProp(Z,z)?Z[z]:J,F=_0.hasOwnProp($,z)?$[z]:void 0,L=_0.hasOwnProp(Y,z)?Y[z]:void 0,N=V(F,L,z);_0.isUndefined(N)&&V!==K||(X[z]=N)}),X}var ue6=["content-type","content-length"];function pe6($,Y,X){if(X!=="content-only"){$.set(Y);return}Object.entries(Y).forEach(([G,J])=>{if(ue6.includes(G.toLowerCase()))$.set(G,J)})}var de6=($)=>encodeURIComponent($).replace(/%([0-9A-F]{2})/gi,(Y,X)=>String.fromCharCode(parseInt(X,16))),Lo=($)=>{let Y=tK({},$),X=(F)=>_0.hasOwnProp(Y,F)?Y[F]:void 0,G=X("data"),J=X("withXSRFToken"),Q=X("xsrfHeaderName"),W=X("xsrfCookieName"),K=X("headers"),Z=X("auth"),H=X("baseURL"),z=X("allowAbsoluteUrls"),V=X("url");if(Y.headers=K=o5.from(K),Y.url=KB(ZB(H,V,z),$.params,$.paramsSerializer),Z)K.set("Authorization","Basic "+btoa((Z.username||"")+":"+(Z.password?de6(Z.password):"")));if(_0.isFormData(G)){if($9.hasStandardBrowserEnv||$9.hasStandardBrowserWebWorkerEnv)K.setContentType(void 0);else if(_0.isFunction(G.getHeaders))pe6(K,G.getHeaders(),X("formDataHeaderPolicy"))}if($9.hasStandardBrowserEnv){if(_0.isFunction(J))J=J(Y);if(J===!0||J==null&&sR1(Y.url)){let L=Q&&W&&oR1.read(W);if(L)K.set(Q,L)}}return Y};var ce6=typeof XMLHttpRequest<"u",eR1=ce6&&function($){return new Promise(function(X,G){let J=Lo($),Q=J.data,W=o5.from(J.headers).normalize(),{responseType:K,onUploadProgress:Z,onDownloadProgress:H}=J,z,V,F,L,N;function D(){L&&L(),N&&N(),J.cancelToken&&J.cancelToken.unsubscribe(z),J.signal&&J.signal.removeEventListener("abort",z)}let A=new XMLHttpRequest;A.open(J.method.toUpperCase(),J.url,!0),A.timeout=J.timeout;function B(){if(!A)return;let E=o5.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),R={data:!K||K==="text"||K==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:E,config:$,request:A};K3(function(_){X(_),D()},function(_){G(_),D()},R),A=null}if("onloadend"in A)A.onloadend=B;else A.onreadystatechange=function(){if(!A||A.readyState!==4)return;if(A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:")))return;setTimeout(B)};if(A.onabort=function(){if(!A)return;G(new D1("Request aborted",D1.ECONNABORTED,$,A)),D(),A=null},A.onerror=function(M){let R=M&&M.message?M.message:"Network Error",q=new D1(R,D1.ERR_NETWORK,$,A);q.event=M||null,G(q),D(),A=null},A.ontimeout=function(){let M=J.timeout?"timeout of "+J.timeout+"ms exceeded":"timeout exceeded",R=J.transitional||aF;if(J.timeoutErrorMessage)M=J.timeoutErrorMessage;G(new D1(M,R.clarifyTimeoutError?D1.ETIMEDOUT:D1.ECONNABORTED,$,A)),D(),A=null},Q===void 0&&W.setContentType(null),"setRequestHeader"in A)_0.forEach(SP(W),function(M,R){A.setRequestHeader(R,M)});if(!_0.isUndefined(J.withCredentials))A.withCredentials=!!J.withCredentials;if(K&&K!=="json")A.responseType=J.responseType;if(H)[F,N]=Zz(H,!0),A.addEventListener("progress",F);if(Z&&A.upload)[V,L]=Zz(Z),A.upload.addEventListener("progress",V),A.upload.addEventListener("loadend",L);if(J.cancelToken||J.signal){if(z=(E)=>{if(!A)return;G(!E||E.type?new WW(null,$,A):E),A.abort(),D(),A=null},J.cancelToken&&J.cancelToken.subscribe(z),J.signal)J.signal.aborted?z():J.signal.addEventListener("abort",z)}let O=Ny(J.url);if(O&&!$9.protocols.includes(O)){G(new D1("Unsupported protocol "+O+":",D1.ERR_BAD_REQUEST,$));return}A.send(Q||null)})};var le6=($,Y)=>{if($=$?$.filter(Boolean):[],!Y&&!$.length)return;let X=new AbortController,G=!1,J=function(Z){if(!G){G=!0,W();let H=Z instanceof Error?Z:this.reason;X.abort(H instanceof D1?H:new WW(H instanceof Error?H.message:H))}},Q=Y&&setTimeout(()=>{Q=null,J(new D1(`timeout of ${Y}ms exceeded`,D1.ETIMEDOUT))},Y),W=()=>{if(!$)return;Q&&clearTimeout(Q),Q=null,$.forEach((Z)=>{Z.unsubscribe?Z.unsubscribe(J):Z.removeEventListener("abort",J)}),$=null};$.forEach((Z)=>Z.addEventListener("abort",J));let{signal:K}=X;return K.unsubscribe=()=>_0.asap(W),K},$q1=le6;var ie6=function*($,Y){let X=$.byteLength;if(!Y||X<Y){yield $;return}let G=0,J;while(G<X)J=G+Y,yield $.slice(G,J),G=J},ne6=async function*($,Y){for await(let X of re6($))yield*ie6(X,Y)},re6=async function*($){if($[Symbol.asyncIterator]){yield*$;return}let Y=$.getReader();try{for(;;){let{done:X,value:G}=await Y.read();if(X)break;yield G}}finally{await Y.cancel()}},_L0=($,Y,X,G)=>{let J=ne6($,Y),Q=0,W,K=(Z)=>{if(!W)W=!0,G&&G(Z)};return new ReadableStream({async pull(Z){try{let{done:H,value:z}=await J.next();if(H){K(),Z.close();return}let V=z.byteLength;if(X){let F=Q+=V;X(F)}Z.enqueue(new Uint8Array(z))}catch(H){throw K(H),H}},cancel(Z){return K(Z),J.return()}},{highWaterMark:2})};var Yq1=65536,{isFunction:Do}=_0,Xq1=($,...Y)=>{try{return!!$(...Y)}catch(X){return!1}},ae6=($)=>{let Y=_0.global!==void 0&&_0.global!==null?_0.global:globalThis,{ReadableStream:X,TextEncoder:G}=Y;$=_0.merge.call({skipUndefined:!0},{Request:Y.Request,Response:Y.Response},$);let{fetch:J,Request:Q,Response:W}=$,K=J?Do(J):typeof fetch==="function",Z=Do(Q),H=Do(W);if(!K)return!1;let z=K&&Do(X),V=K&&(typeof G==="function"?((B)=>(O)=>B.encode(O))(new G):async(B)=>new Uint8Array(await new Q(B).arrayBuffer())),F=Z&&z&&Xq1(()=>{let B=!1,O=new Q($9.origin,{body:new X,method:"POST",get duplex(){return B=!0,"half"}}),E=O.headers.has("Content-Type");if(O.body!=null)O.body.cancel();return B&&!E}),L=H&&z&&Xq1(()=>_0.isReadableStream(new W("").body)),N={stream:L&&((B)=>B.body)};K&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((B)=>{!N[B]&&(N[B]=(O,E)=>{let M=O&&O[B];if(M)return M.call(O);throw new D1(`Response type '${B}' is not supported`,D1.ERR_NOT_SUPPORT,E)})})})();let D=async(B)=>{if(B==null)return 0;if(_0.isBlob(B))return B.size;if(_0.isSpecCompliantForm(B))return(await new Q($9.origin,{method:"POST",body:B}).arrayBuffer()).byteLength;if(_0.isArrayBufferView(B)||_0.isArrayBuffer(B))return B.byteLength;if(_0.isURLSearchParams(B))B=B+"";if(_0.isString(B))return(await V(B)).byteLength},A=async(B,O)=>{let E=_0.toFiniteNumber(B.getContentLength());return E==null?D(O):E};return async(B)=>{let{url:O,method:E,data:M,signal:R,cancelToken:q,timeout:_,onDownloadProgress:P,onUploadProgress:w,responseType:j,headers:C,withCredentials:k="same-origin",fetchOptions:S,maxContentLength:I,maxBodyLength:v}=Lo(B),x=_0.isNumber(I)&&I>-1,y=_0.isNumber(v)&&v>-1,d=J||fetch;j=j?(j+"").toLowerCase():"text";let u=$q1([R,q&&q.toAbortSignal()],_),b=null,g=u&&u.unsubscribe&&(()=>{u.unsubscribe()}),p;try{if(x&&typeof O==="string"&&O.startsWith("data:")){if(By(O)>I)throw new D1("maxContentLength size of "+I+" exceeded",D1.ERR_BAD_RESPONSE,B,b)}if(y&&E!=="get"&&E!=="head"){let X0=await A(C,M);if(typeof X0==="number"&&isFinite(X0)&&X0>v)throw new D1("Request body larger than maxBodyLength limit",D1.ERR_BAD_REQUEST,B,b)}if(w&&F&&E!=="get"&&E!=="head"&&(p=await A(C,M))!==0){let X0=new Q(O,{method:"POST",body:M,duplex:"half"}),a;if(_0.isFormData(M)&&(a=X0.headers.get("content-type")))C.setContentType(a);if(X0.body){let[Q0,e]=gP(p,Zz(mP(w)));M=_L0(X0.body,Yq1,Q0,e)}}if(!_0.isString(k))k=k?"include":"omit";let h=Z&&"credentials"in Q.prototype;if(_0.isFormData(M)){let X0=C.getContentType();if(X0&&/^multipart\/form-data/i.test(X0)&&!/boundary=/i.test(X0))C.delete("content-type")}C.set("User-Agent","axios/"+Kz,!1);let n={...S,signal:u,method:E.toUpperCase(),headers:SP(C.normalize()),body:M,duplex:"half",credentials:h?k:void 0};b=Z&&new Q(O,n);let t=await(Z?d(b,S):d(O,n));if(x){let X0=_0.toFiniteNumber(t.headers.get("content-length"));if(X0!=null&&X0>I)throw new D1("maxContentLength size of "+I+" exceeded",D1.ERR_BAD_RESPONSE,B,b)}let s=L&&(j==="stream"||j==="response");if(L&&t.body&&(P||x||s&&g)){let X0={};["status","statusText","headers"].forEach((Y0)=>{X0[Y0]=t[Y0]});let a=_0.toFiniteNumber(t.headers.get("content-length")),[Q0,e]=P&&gP(a,Zz(mP(P),!0))||[],m=0,$0=(Y0)=>{if(x){if(m=Y0,m>I)throw new D1("maxContentLength size of "+I+" exceeded",D1.ERR_BAD_RESPONSE,B,b)}Q0&&Q0(Y0)};t=new W(_L0(t.body,Yq1,$0,()=>{e&&e(),g&&g()}),X0)}j=j||"text";let K0=await N[_0.findKey(N,j)||"text"](t,B);if(x&&!L&&!s){let X0;if(K0!=null){if(typeof K0.byteLength==="number")X0=K0.byteLength;else if(typeof K0.size==="number")X0=K0.size;else if(typeof K0==="string")X0=typeof G==="function"?new G().encode(K0).byteLength:K0.length}if(typeof X0==="number"&&X0>I)throw new D1("maxContentLength size of "+I+" exceeded",D1.ERR_BAD_RESPONSE,B,b)}return!s&&g&&g(),await new Promise((X0,a)=>{K3(X0,a,{data:K0,headers:o5.from(t.headers),status:t.status,statusText:t.statusText,config:B,request:b})})}catch(h){if(g&&g(),u&&u.aborted&&u.reason instanceof D1){let n=u.reason;throw n.config=B,b&&(n.request=b),h!==n&&(n.cause=h),n}if(h&&h.name==="TypeError"&&/Load failed|fetch/i.test(h.message))throw Object.assign(new D1("Network Error",D1.ERR_NETWORK,B,b,h&&h.response),{cause:h.cause||h});throw D1.from(h,h&&h.code,B,b,h&&h.response)}}},se6=new Map,jL0=($)=>{let Y=$&&$.env||{},{fetch:X,Request:G,Response:J}=Y,Q=[G,J,X],W=Q.length,K=W,Z,H,z=se6;while(K--)Z=Q[K],H=z.get(Z),H===void 0&&z.set(Z,H=K?new Map:ae6(Y)),z=H;return H},pC5=jL0();var TL0={http:aR1,xhr:eR1,fetch:{get:jL0}};_0.forEach(TL0,($,Y)=>{if($){try{Object.defineProperty($,"name",{__proto__:null,value:Y})}catch(X){}Object.defineProperty($,"adapterName",{__proto__:null,value:Y})}});var Gq1=($)=>`- ${$}`,te6=($)=>_0.isFunction($)||$===null||$===!1;function ee6($,Y){$=_0.isArray($)?$:[$];let{length:X}=$,G,J,Q={};for(let W=0;W<X;W++){G=$[W];let K;if(J=G,!te6(G)){if(J=TL0[(K=String(G)).toLowerCase()],J===void 0)throw new D1(`Unknown adapter '${K}'`)}if(J&&(_0.isFunction(J)||(J=J.get(Y))))break;Q[K||"#"+W]=J}if(!J){let W=Object.entries(Q).map(([Z,H])=>`adapter ${Z} `+(H===!1?"is not supported by the environment":"is not available in the build")),K=X?W.length>1?`since :
`+W.map(Gq1).join(`
`):" "+Gq1(W[0]):"as no adapter specified";throw new D1("There is no suitable adapter to dispatch the request "+K,"ERR_NOT_SUPPORT")}return J}var No={getAdapter:ee6,adapters:TL0};function IL0($){if($.cancelToken)$.cancelToken.throwIfRequested();if($.signal&&$.signal.aborted)throw new WW(null,$)}function Ao($){if(IL0($),$.headers=o5.from($.headers),$.data=Jy.call($,$.transformRequest),["post","put","patch"].indexOf($.method)!==-1)$.headers.setContentType("application/x-www-form-urlencoded",!1);return No.getAdapter($.adapter||hP.adapter,$)($).then(function(G){IL0($),$.response=G;try{G.data=Jy.call($,$.transformResponse,G)}finally{delete $.response}return G.headers=o5.from(G.headers),G},function(G){if(!Qy(G)){if(IL0($),G&&G.response){$.response=G.response;try{G.response.data=Jy.call($,$.transformResponse,G.response)}finally{delete $.response}G.response.headers=o5.from(G.response.headers)}}return Promise.reject(G)})}var Bo={};["object","boolean","number","function","string","symbol"].forEach(($,Y)=>{Bo[$]=function(G){return typeof G===$||"a"+(Y<1?"n ":" ")+$}});var Jq1={};Bo.transitional=function(Y,X,G){function J(Q,W){return"[Axios v"+Kz+"] Transitional option '"+Q+"'"+W+(G?". "+G:"")}return(Q,W,K)=>{if(Y===!1)throw new D1(J(W," has been removed"+(X?" in "+X:"")),D1.ERR_DEPRECATED);if(X&&!Jq1[W])Jq1[W]=!0,console.warn(J(W," has been deprecated since v"+X+" and will be removed in the near future"));return Y?Y(Q,W,K):!0}};Bo.spelling=function(Y){return(X,G)=>{return console.warn(`${G} is likely a misspelling of ${Y}`),!0}};function $08($,Y,X){if(typeof $!=="object")throw new D1("options must be an object",D1.ERR_BAD_OPTION_VALUE);let G=Object.keys($),J=G.length;while(J-- >0){let Q=G[J],W=Object.prototype.hasOwnProperty.call(Y,Q)?Y[Q]:void 0;if(W){let K=$[Q],Z=K===void 0||W(K,Q,$);if(Z!==!0)throw new D1("option "+Q+" must be "+Z,D1.ERR_BAD_OPTION_VALUE);continue}if(X!==!0)throw new D1("Unknown option "+Q,D1.ERR_BAD_OPTION)}}var Oy={assertOptions:$08,validators:Bo};var k2=Oy.validators;class Ey{constructor($){this.defaults=$||{},this.interceptors={request:new cF0,response:new cF0}}async request($,Y){try{return await this._request($,Y)}catch(X){if(X instanceof Error){let G={};Error.captureStackTrace?Error.captureStackTrace(G):G=Error();let J=(()=>{if(!G.stack)return"";let Q=G.stack.indexOf(`
`);return Q===-1?"":G.stack.slice(Q+1)})();try{if(!X.stack)X.stack=J;else if(J){let Q=J.indexOf(`
`),W=Q===-1?-1:J.indexOf(`
`,Q+1),K=W===-1?"":J.slice(W+1);if(!String(X.stack).endsWith(K))X.stack+=`
`+J}}catch(Q){}}throw X}}_request($,Y){if(typeof $==="string")Y=Y||{},Y.url=$;else Y=$||{};Y=tK(this.defaults,Y);let{transitional:X,paramsSerializer:G,headers:J}=Y;if(X!==void 0)Oy.assertOptions(X,{silentJSONParsing:k2.transitional(k2.boolean),forcedJSONParsing:k2.transitional(k2.boolean),clarifyTimeoutError:k2.transitional(k2.boolean),legacyInterceptorReqResOrdering:k2.transitional(k2.boolean)},!1);if(G!=null)if(_0.isFunction(G))Y.paramsSerializer={serialize:G};else Oy.assertOptions(G,{encode:k2.function,serialize:k2.function},!0);if(Y.allowAbsoluteUrls!==void 0);else if(this.defaults.allowAbsoluteUrls!==void 0)Y.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls;else Y.allowAbsoluteUrls=!0;Oy.assertOptions(Y,{baseUrl:k2.spelling("baseURL"),withXsrfToken:k2.spelling("withXSRFToken")},!0),Y.method=(Y.method||this.defaults.method||"get").toLowerCase();let Q=J&&_0.merge(J.common,J[Y.method]);J&&_0.forEach(["delete","get","head","post","put","patch","query","common"],(L)=>{delete J[L]}),Y.headers=o5.concat(Q,J);let W=[],K=!0;this.interceptors.request.forEach(function(N){if(typeof N.runWhen==="function"&&N.runWhen(Y)===!1)return;K=K&&N.synchronous;let D=Y.transitional||aF;if(D&&D.legacyInterceptorReqResOrdering)W.unshift(N.fulfilled,N.rejected);else W.push(N.fulfilled,N.rejected)});let Z=[];this.interceptors.response.forEach(function(N){Z.push(N.fulfilled,N.rejected)});let H,z=0,V;if(!K){let L=[Ao.bind(this),void 0];L.unshift(...W),L.push(...Z),V=L.length,H=Promise.resolve(Y);while(z<V)H=H.then(L[z++],L[z++]);return H}V=W.length;let F=Y;while(z<V){let L=W[z++],N=W[z++];try{F=L(F)}catch(D){N.call(this,D);break}}try{H=Ao.call(this,F)}catch(L){return Promise.reject(L)}z=0,V=Z.length;while(z<V)H=H.then(Z[z++],Z[z++]);return H}getUri($){$=tK(this.defaults,$);let Y=ZB($.baseURL,$.url,$.allowAbsoluteUrls);return KB(Y,$.params,$.paramsSerializer)}}_0.forEach(["delete","get","head","options"],function(Y){Ey.prototype[Y]=function(X,G){return this.request(tK(G||{},{method:Y,url:X,data:(G||{}).data}))}});_0.forEach(["post","put","patch","query"],function(Y){function X(G){return function(Q,W,K){return this.request(tK(K||{},{method:Y,headers:G?{"Content-Type":"multipart/form-data"}:{},url:Q,data:W}))}}if(Ey.prototype[Y]=X(),Y!=="query")Ey.prototype[Y+"Form"]=X(!0)});var My=Ey;class CL0{constructor($){if(typeof $!=="function")throw TypeError("executor must be a function.");let Y;this.promise=new Promise(function(J){Y=J});let X=this;this.promise.then((G)=>{if(!X._listeners)return;let J=X._listeners.length;while(J-- >0)X._listeners[J](G);X._listeners=null}),this.promise.then=(G)=>{let J,Q=new Promise((W)=>{X.subscribe(W),J=W}).then(G);return Q.cancel=function(){X.unsubscribe(J)},Q},$(function(J,Q,W){if(X.reason)return;X.reason=new WW(J,Q,W),Y(X.reason)})}throwIfRequested(){if(this.reason)throw this.reason}subscribe($){if(this.reason){$(this.reason);return}if(this._listeners)this._listeners.push($);else this._listeners=[$]}unsubscribe($){if(!this._listeners)return;let Y=this._listeners.indexOf($);if(Y!==-1)this._listeners.splice(Y,1)}toAbortSignal(){let $=new AbortController,Y=(X)=>{$.abort(X)};return this.subscribe(Y),$.signal.unsubscribe=()=>this.unsubscribe(Y),$.signal}static source(){let $;return{token:new CL0(function(G){$=G}),cancel:$}}}var Qq1=CL0;function SL0($){return function(X){return $.apply(null,X)}}function kL0($){return _0.isObject($)&&$.isAxiosError===!0}var vL0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(vL0).forEach(([$,Y])=>{vL0[Y]=$});var Wq1=vL0;function Kq1($){let Y=new My($),X=rx(My.prototype.request,Y);return _0.extend(X,My.prototype,Y,{allOwnKeys:!0}),_0.extend(X,Y,null,{allOwnKeys:!0}),X.create=function(J){return Kq1(tK($,J))},X}var y7=Kq1(hP);y7.Axios=My;y7.CanceledError=WW;y7.CancelToken=Qq1;y7.isCancel=Qy;y7.VERSION=Kz;y7.toFormData=rF;y7.AxiosError=D1;y7.Cancel=y7.CanceledError;y7.all=function(Y){return Promise.all(Y)};y7.spread=SL0;y7.isAxiosError=kL0;y7.mergeConfig=tK;y7.AxiosHeaders=o5;y7.formToJSON=($)=>Wo(_0.isHTMLForm($)?new FormData($):$);y7.getAdapter=No.getAdapter;y7.HttpStatusCode=Wq1;y7.default=y7;var xL0=y7;var{Axios:Y08,AxiosError:X08,CanceledError:G08,isCancel:J08,CancelToken:Q08,VERSION:W08,all:K08,Cancel:Z08,isAxiosError:U08,spread:H08,toFormData:z08,AxiosHeaders:V08,HttpStatusCode:F08,formToJSON:L08,getAdapter:D08,mergeConfig:N08,create:A08}=xL0;var b78=U6(zq1(),1),h78=U6(Xt(),1);var fD0={};W8(fD0,{default:()=>w78});var $w=".",cy=Symbol("target"),ID0=Symbol("unsubscribe");function ly($){return $ instanceof Date||$ instanceof Set||$ instanceof Map||$ instanceof WeakSet||$ instanceof WeakMap||ArrayBuffer.isView($)}function Sj1($){return(typeof $==="object"?$===null:typeof $!=="function")||$ instanceof RegExp}var KW=Array.isArray;function MB($){return typeof $==="symbol"}var M78={after:($,Y)=>{if(KW($))return $.slice(Y.length);if(Y==="")return $;return $.slice(Y.length+1)},concat:($,Y)=>{if(KW($)){if($=[...$],Y)$.push(Y);return $}if(Y&&Y.toString!==void 0){if($!=="")$+=$w;if(MB(Y))return $+Y.toString();return $+Y}return $},initial:($)=>{if(KW($))return $.slice(0,-1);if($==="")return $;let Y=$.lastIndexOf($w);if(Y===-1)return"";return $.slice(0,Y)},last:($)=>{if(KW($))return $[$.length-1]||"";if($==="")return $;let Y=$.lastIndexOf($w);if(Y===-1)return $;return $.slice(Y+1)},walk:($,Y)=>{if(KW($))for(let X of $)Y(X);else if($!==""){let X=0,G=$.indexOf($w);if(G===-1)Y($);else while(X<$.length){if(G===-1)G=$.length;Y($.slice(X,G)),X=G+1,G=$.indexOf($w,X)}}},get($,Y){return this.walk(Y,(X)=>{if($)$=$[X]}),$}},bG=M78;function CD0($){return typeof $==="object"&&typeof $.next==="function"}function SD0($,Y,X,G,J){let Q=$.next;if(Y.name==="entries")$.next=function(){let W=Q.call(this);if(W.done===!1)W.value[0]=J(W.value[0],Y,W.value[0],G),W.value[1]=J(W.value[1],Y,W.value[0],G);return W};else if(Y.name==="values"){let W=X[cy].keys();$.next=function(){let K=Q.call(this);if(K.done===!1)K.value=J(K.value,Y,W.next().value,G);return K}}else $.next=function(){let W=Q.call(this);if(W.done===!1)W.value=J(W.value,Y,W.value,G);return W};return $}function Gt($,Y,X){return $.isUnsubscribed||Y.ignoreSymbols&&MB(X)||Y.ignoreUnderscores&&X.charAt(0)==="_"||"ignoreKeys"in Y&&Y.ignoreKeys.includes(X)}class Jt{constructor($){this._equals=$,this._proxyCache=new WeakMap,this._pathCache=new WeakMap,this.isUnsubscribed=!1}_getDescriptorCache(){if(this._descriptorCache===void 0)this._descriptorCache=new WeakMap;return this._descriptorCache}_getProperties($){let Y=this._getDescriptorCache(),X=Y.get($);if(X===void 0)X={},Y.set($,X);return X}_getOwnPropertyDescriptor($,Y){if(this.isUnsubscribed)return Reflect.getOwnPropertyDescriptor($,Y);let X=this._getProperties($),G=X[Y];if(G===void 0)G=Reflect.getOwnPropertyDescriptor($,Y),X[Y]=G;return G}getProxy($,Y,X,G){if(this.isUnsubscribed)return $;let J=$[G],Q=J||$;this._pathCache.set(Q,Y);let W=this._proxyCache.get(Q);if(W===void 0)W=J===void 0?new Proxy($,X):$,this._proxyCache.set(Q,W);return W}getPath($){return this.isUnsubscribed?void 0:this._pathCache.get($)}isDetached($,Y){return!Object.is($,bG.get(Y,this.getPath($)))}defineProperty($,Y,X){if(!Reflect.defineProperty($,Y,X))return!1;if(!this.isUnsubscribed)this._getProperties($)[Y]=X;return!0}setProperty($,Y,X,G,J){if(!this._equals(J,X)||!(Y in $)){let Q=this._getOwnPropertyDescriptor($,Y);if(Q!==void 0&&"set"in Q)return Reflect.set($,Y,X,G);return Reflect.set($,Y,X)}return!0}deleteProperty($,Y,X){if(Reflect.deleteProperty($,Y)){if(!this.isUnsubscribed){let G=this._getDescriptorCache().get($);if(G)delete G[Y],this._pathCache.delete(X)}return!0}return!1}isSameDescriptor($,Y,X){let G=this._getOwnPropertyDescriptor(Y,X);return $!==void 0&&G!==void 0&&Object.is($.value,G.value)&&($.writable||!1)===(G.writable||!1)&&($.enumerable||!1)===(G.enumerable||!1)&&($.configurable||!1)===(G.configurable||!1)&&$.get===G.get&&$.set===G.set}isGetInvariant($,Y){let X=this._getOwnPropertyDescriptor($,Y);return X!==void 0&&X.configurable!==!0&&X.writable!==!0}unsubscribe(){this._descriptorCache=null,this._pathCache=null,this._proxyCache=null,this.isUnsubscribed=!0}}function Yw($){return toString.call($)==="[object Object]"}function Xw(){return!0}function GL($,Y){return $.length!==Y.length||$.some((X,G)=>Y[G]!==X)}var Qt=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]);var R78=new Set(["concat","includes","indexOf","join","keys","lastIndexOf"]),kD0={push:Xw,pop:Xw,shift:Xw,unshift:Xw,copyWithin:GL,reverse:GL,sort:GL,splice:GL,flat:GL,fill:GL},kj1=new Set([...Qt,...R78,...Object.keys(kD0)]);function Gw($,Y){if($.size!==Y.size)return!0;for(let X of $)if(!Y.has(X))return!0;return!1}var vD0=["keys","values","entries"],xD0=new Set(["has","toString"]),yD0={add:Gw,clear:Gw,delete:Gw,forEach:Gw},vj1=new Set([...xD0,...Object.keys(yD0),...vD0]);function Jw($,Y){if($.size!==Y.size)return!0;let X;for(let[G,J]of $)if(X=Y.get(G),X!==J||X===void 0&&!Y.has(G))return!0;return!1}var q78=new Set([...xD0,"get"]),bD0={set:Jw,clear:Jw,delete:Jw,forEach:Jw},xj1=new Set([...q78,...Object.keys(bD0),...vD0]);class LX{constructor($,Y,X,G){this._path=Y,this._isChanged=!1,this._clonedCache=new Set,this._hasOnValidate=G,this._changes=G?[]:null,this.clone=Y===void 0?$:this._shallowClone($)}static isHandledMethod($){return Qt.has($)}_shallowClone($){let Y=$;if(Yw($))Y={...$};else if(KW($)||ArrayBuffer.isView($))Y=[...$];else if($ instanceof Date)Y=new Date($);else if($ instanceof Set)Y=new Set([...$].map((X)=>this._shallowClone(X)));else if($ instanceof Map){Y=new Map;for(let[X,G]of $.entries())Y.set(X,this._shallowClone(G))}return this._clonedCache.add(Y),Y}preferredThisArg($,Y,X,G){if($){if(KW(G))this._onIsChanged=kD0[Y];else if(G instanceof Set)this._onIsChanged=yD0[Y];else if(G instanceof Map)this._onIsChanged=bD0[Y];return G}return X}update($,Y,X){let G=bG.after($,this._path);if(Y!=="length"){let J=this.clone;if(bG.walk(G,(Q)=>{if(J&&J[Q]){if(!this._clonedCache.has(J[Q]))J[Q]=this._shallowClone(J[Q]);J=J[Q]}}),this._hasOnValidate)this._changes.push({path:G,property:Y,previous:X});if(J&&J[Y])J[Y]=X}this._isChanged=!0}undo($){let Y;for(let X=this._changes.length-1;X!==-1;X--)Y=this._changes[X],bG.get($,Y.path)[Y.property]=Y.previous}isChanged($){return this._onIsChanged===void 0?this._isChanged:this._onIsChanged(this.clone,$)}}class iy extends LX{static isHandledMethod($){return kj1.has($)}}class Wt extends LX{undo($){$.setTime(this.clone.getTime())}isChanged($,Y){return!Y(this.clone.valueOf(),$.valueOf())}}class ny extends LX{static isHandledMethod($){return vj1.has($)}undo($){for(let Y of this.clone)$.add(Y);for(let Y of $)if(!this.clone.has(Y))$.delete(Y)}}class ry extends LX{static isHandledMethod($){return xj1.has($)}undo($){for(let[Y,X]of this.clone.entries())$.set(Y,X);for(let Y of $.keys())if(!this.clone.has(Y))$.delete(Y)}}class Kt extends LX{constructor($,Y,X,G){super(void 0,Y,X,G);this._arg1=X[0],this._weakValue=$.has(this._arg1)}isChanged($){return this._weakValue!==$.has(this._arg1)}undo($){if(this._weakValue&&!$.has(this._arg1))$.add(this._arg1);else $.delete(this._arg1)}}class Zt extends LX{constructor($,Y,X,G){super(void 0,Y,X,G);this._weakKey=X[0],this._weakHas=$.has(this._weakKey),this._weakValue=$.get(this._weakKey)}isChanged($){return this._weakValue!==$.get(this._weakKey)}undo($){let Y=$.has(this._weakKey);if(this._weakHas&&!Y)$.set(this._weakKey,this._weakValue);else if(!this._weakHas&&Y)$.delete(this._weakKey);else if(this._weakValue!==$.get(this._weakKey))$.set(this._weakKey,this._weakValue)}}class Fz{constructor($){this._stack=[],this._hasOnValidate=$}static isHandledType($){return Yw($)||KW($)||ly($)}static isHandledMethod($,Y){if(Yw($))return LX.isHandledMethod(Y);if(KW($))return iy.isHandledMethod(Y);if($ instanceof Set)return ny.isHandledMethod(Y);if($ instanceof Map)return ry.isHandledMethod(Y);return ly($)}get isCloning(){return this._stack.length>0}start($,Y,X){let G=LX;if(KW($))G=iy;else if($ instanceof Date)G=Wt;else if($ instanceof Set)G=ny;else if($ instanceof Map)G=ry;else if($ instanceof WeakSet)G=Kt;else if($ instanceof WeakMap)G=Zt;this._stack.push(new G($,Y,X,this._hasOnValidate))}update($,Y,X){this._stack[this._stack.length-1].update($,Y,X)}preferredThisArg($,Y,X){let{name:G}=$,J=Fz.isHandledMethod(X,G);return this._stack[this._stack.length-1].preferredThisArg(J,G,Y,X)}isChanged($,Y,X){return this._stack[this._stack.length-1].isChanged($,Y,X)}undo($){if(this._previousClone!==void 0)this._previousClone.undo($)}stop(){return this._previousClone=this._stack.pop(),this._previousClone.clone}}var P78={equals:Object.is,isShallow:!1,pathAsArray:!1,ignoreSymbols:!1,ignoreUnderscores:!1,ignoreDetached:!1,details:!1},hD0=($,Y,X={})=>{X={...P78,...X};let G=Symbol("ProxyTarget"),{equals:J,isShallow:Q,ignoreDetached:W,details:K}=X,Z=new Jt(J),H=typeof X.onValidate==="function",z=new Fz(H),V=(O,E,M,R,q)=>!H||z.isCloning||X.onValidate(bG.concat(Z.getPath(O),E),M,R,q)===!0,F=(O,E,M,R)=>{if(!Gt(Z,X,E)&&!(W&&Z.isDetached(O,$)))L(Z.getPath(O),E,M,R)},L=(O,E,M,R,q)=>{if(z.isCloning)z.update(O,E,R);else Y(bG.concat(O,E),M,R,q)},N=(O)=>O?O[G]||O:O,D=(O,E,M,R)=>{if(Sj1(O)||M==="constructor"||Q&&!Fz.isHandledMethod(E,M)||Gt(Z,X,M)||Z.isGetInvariant(E,M)||W&&Z.isDetached(E,$))return O;if(R===void 0)R=Z.getPath(E);return Z.getProxy(O,bG.concat(R,M),A,G)},A={get(O,E,M){if(MB(E)){if(E===G||E===cy)return O;if(E===ID0&&!Z.isUnsubscribed&&Z.getPath(O).length===0)return Z.unsubscribe(),O}let R=ly(O)?Reflect.get(O,E):Reflect.get(O,E,M);return D(R,O,E)},set(O,E,M,R){M=N(M);let q=O[G]||O,_=q[E];if(J(_,M)&&E in O)return!0;let P=V(O,E,M,_);if(P&&Z.setProperty(q,E,M,R,_))return F(O,E,O[E],_),!0;return!P},defineProperty(O,E,M){if(!Z.isSameDescriptor(M,O,E)){let R=O[E];if(V(O,E,M.value,R)&&Z.defineProperty(O,E,M,R))F(O,E,M.value,R)}return!0},deleteProperty(O,E){if(!Reflect.has(O,E))return!0;let M=Reflect.get(O,E),R=V(O,E,void 0,M);if(R&&Z.deleteProperty(O,E,M))return F(O,E,void 0,M),!0;return!R},apply(O,E,M){let R=E[G]||E;if(Z.isUnsubscribed)return Reflect.apply(O,R,M);if((K===!1||K!==!0&&!K.includes(O.name))&&Fz.isHandledType(R)){let q=bG.initial(Z.getPath(O)),_=Fz.isHandledMethod(R,O.name);z.start(R,q,M);let P=Reflect.apply(O,z.preferredThisArg(O,E,R),_?M.map((C)=>N(C)):M),w=z.isChanged(R,J),j=z.stop();if(Fz.isHandledType(P)&&_){if(E instanceof Map&&O.name==="get")q=bG.concat(q,M[0]);P=Z.getProxy(P,q,A)}if(w){let C={name:O.name,args:M,result:P},k=z.isCloning?bG.initial(q):q,S=z.isCloning?bG.last(q):"";if(V(bG.get($,k),S,R,j,C))L(k,S,R,j,C);else z.undo(R)}if((E instanceof Map||E instanceof Set)&&CD0(P))return SD0(P,O,E,q,D);return P}return Reflect.apply(O,E,M)}},B=Z.getProxy($,X.pathAsArray?[]:"",A);if(Y=Y.bind(B),H)X.onValidate=X.onValidate.bind(B);return B};hD0.target=($)=>$&&$[cy]||$;hD0.unsubscribe=($)=>$[ID0]||$;var yj1=hD0;var w78=yj1;var f78=U6(mj1(),1);(function(){typeof self>"u"&&typeof global==="object"&&(global.self=global)})();function g78($){return $&&$.__esModule&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$}function RB($){return $&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$}var mD0,uj1;function m78(){if(uj1)return mD0;uj1=1;let $={StringColumn:"string",BooleanColumn:"boolean",UUIDColumn:"string",BinaryColumn:"string",JSONColumn:"object",DateColumn:"Date | string",NumberColumn:"number"};function Y(F,{isNamespace:L=!1,isHttp:N=!1}={}){let D=new Map,A=new Set,B=new Map,O="",E=F.map(R).join(""),M=F.reduce((k,S)=>{return k[S.name]=S.table,k},{});if(O+=H(L),L)O+=z(M,N);if(O+=E,O+=V(M,N),L)O+="}";return O;function R({table:k,customFilters:S,name:I}){let v=I.substr(0,1).toUpperCase()+I.substr(1);return I=I.substr(0,1).toLowerCase()+I.substr(1),""+q(k,v,I,S)}function q(k,S,I,v){let x=w(k),y=P(k);return`
export interface ${S}Table {
	count(filter?: RawFilter): Promise<number>;
	getAll(): Promise<${S}Array>;
	getAll(fetchingStrategy: ${S}Strategy): Promise<${S}Array>;
	getMany(filter?: RawFilter): Promise<${S}Array>;
	getMany(filter: RawFilter, fetchingStrategy: ${S}Strategy): Promise<${S}Array>;
	getMany(${I}s: Array<${S}>): Promise<${S}Array>;
	getMany(${I}s: Array<${S}>, fetchingStrategy: ${S}Strategy): Promise<${S}Array>;
	getOne(filter?: RawFilter): Promise<${S}Row>;
	getOne(filter?: RawFilter, fetchingStrategy?: ${S}Strategy): Promise<${S}Row>;
	getOne(${I}: ${S}): Promise<${S}Row>;
	getOne(${I}: ${S}, fetchingStrategy: ${S}Strategy): Promise<${S}Row>;
	getById(${_(k)}): Promise<${S}Row>;
	getById(${_(k)}, fetchingStrategy: ${S}Strategy): Promise<${S}Row>;

	replace(${I}s: ${S}[] | ${S}): Promise<void>;
	replace(${I}s: ${S}[], fetchingStrategy: ${S}Strategy): Promise<${S}Array>;
	replace(${I}: ${S}, fetchingStrategy: ${S}Strategy): Promise<${S}Row>;
	
	update(${I}: ${S}): Promise<void>;
	update(${I}: ${S}, whereStrategy: ${S}Strategy): Promise<void>;
	update(${I}: ${S}, whereStrategy: ${S}Strategy): Promise<void>;
	update(${I}: ${S}, whereStrategy: ${S}Strategy, fetchingStrategy: ${S}Strategy): Promise<${S}Row[]>;

	updateChanges(${I}s: ${S}[], old${I}s: ${S}[]): Promise<${S}Array>;
	updateChanges(${I}s: ${S}[],old${I}s: ${S}[], fetchingStrategy: ${S}Strategy): Promise<${S}Array>;
	updateChanges(${I}: ${S}, old${I}: ${S}): Promise<${S}Row>;
	updateChanges(${I}: ${S},old${I}: ${S}, fetchingStrategy: ${S}Strategy): Promise<${S}Row>;
	
	insert(${I}s: ${S}[]): Promise<${S}Array>;
	insert(${I}s: ${S}[], fetchingStrategy: ${S}Strategy): Promise<${S}Array>;
	insert(${I}: ${S}): Promise<${S}Row>;
	insert(${I}: ${S}, fetchingStrategy: ${S}Strategy): Promise<${S}Row>;
	insertAndForget(${I}s: ${S}[]): Promise<void>;
	insertAndForget(${I}: ${S}): Promise<void>;
	delete(filter?: RawFilter): Promise<void>;
	delete(${I}s: Array<${S}>): Promise<void>;
	deleteCascade(filter?: RawFilter): Promise<void>;
	deleteCascade(${I}s: Array<${S}>): Promise<void>;
	proxify(${I}s: ${S}[]): ${S}Array;
	proxify(${I}s: ${S}[], fetchingStrategy: ${S}Strategy): ${S}Array;
	proxify(${I}: ${S}): ${S}Row;
	proxify(${I}: ${S}, fetchingStrategy: ${S}Strategy): ${S}Row;
	patch(patch: JsonPatch): Promise<void>;
	patch(patch: JsonPatch, concurrency: ${S}Concurrency, fetchingStrategy?: ${S}Strategy): Promise<void>;	
	customFilters: ${S}CustomFilters;
	${x}
	${y}
}

export interface ${S}ExpressConfig {
	baseFilter?: RawFilter | ((context: ExpressContext) => RawFilter | Promise<RawFilter>);
    customFilters?: Record<string, (context: ExpressContext,...args: any[]) => RawFilter | Promise<RawFilter>>;
    concurrency?: ${S}Concurrency;
    readonly?: boolean;
    disableBulkDeletes?: boolean;
}

export interface ${S}CustomFilters {
	${K(v)}
}

export interface ${S}Array extends Array<${S}> {
	saveChanges(): Promise<void>;
	saveChanges(concurrency: ${S}Concurrency, fetchingStrategy?: ${S}Strategy): Promise<void>;
	acceptChanges(): void;
	clearChanges(): void;
	refresh(): Promise<void>;
	refresh(fetchingStrategy: ${S}Strategy): Promise<void>;
	delete(): Promise<void>;
	delete(options: ${S}Concurrency): Promise<void>;
}

export interface ${S}Row extends ${S} {
	saveChanges(): Promise<void>;
	saveChanges(concurrency: ${S}Concurrency, fetchingStrategy?: ${S}Strategy): Promise<void>;
	acceptChanges(): void;
	clearChanges(): void;
	refresh(): Promise<void>;
	refresh(fetchingStrategy: ${S}Strategy): Promise<void>;
	delete(): Promise<void>;
	delete(options: ${S}Concurrency): Promise<void>;
}

${j(k,S,!0)}
`}function _(k){let S=[];for(let I=0;I<k._primaryColumns.length;I++){let v=k._primaryColumns[I];S.push(`${v.alias}: ${$[v.tsType]}`)}return S.join(", ")}function P(k){let S=k._relations,I="";for(let v in S){let x=C(S[v],v);I+=`${v}: ${x}RelatedTable;`}return I}function w(k){let S="",I="";for(let v=0;v<k._columns.length;v++){let x=k._columns[v];S+=`${I}${x.alias} : ${x.tsType};`,I=`
	`}return S}function j(k,S,I){if(S=J(S),!I)if(B.has(k))return"";else B.set(k,S);let v="",x="",y="",d="",u=k._relations,b,g=`
	`,p={};p.visitJoin=function(t){let s=C(t,b);v+=`${j(t.childTable,s)}`,x+=`${b}?: ${s}Concurrency;${g}`,y+=`${b}?: ${s}Strategy | boolean;${g}`,d+=`${b}?: ${s} | null;${g}`},p.visitOne=p.visitJoin,p.visitMany=function(t){let s=C(t,b);v+=`${j(t.childTable,s)}`,x+=`${b}?: ${s}Concurrency;${g}`,y+=`${b}?: ${s}Strategy | boolean;${g}`,d+=`${b}?: ${s}[] | null;${g}`};for(b in u){var h=u[b];h.accept(p)}let n="";if(!I)n=`export interface ${S}RelatedTable {
	${w(k)}
	${P(k)}
	all: (selector: (table: ${S}RelatedTable) => RawFilter) => Filter;
	any: (selector: (table: ${S}RelatedTable) => RawFilter) => Filter;
	none: (selector: (table: ${S}RelatedTable) => RawFilter) => Filter;
	exists: () => Filter;	
}`;return`
export interface ${S}Concurrency {
	readonly?: boolean;
	concurrency?: Concurrency;
	${Q(k)}
	${x}
}

export interface ${S} {
	${X(k)}
	${d}
}

export interface ${S}TableBase {	
	${w(k)}
	${P(k)}
}


export interface ${S}Strategy {
	${W(k)}
	${y}
	limit?: number;
	offset?: number;
	orderBy?: Array<${G(k)}> | ${G(k)};
	where?: (table: ${S}TableBase) => RawFilter;
}

${v}

${n}`}function C(k,S){let I=D.get(k.childTable);if(I)return I;else{let v=J(S),x=2;while(A.has(v))v=v+"x"+x,x++;return D.set(k.childTable,v),A.add(v),v}}}function X(F){let L="",N="";for(let D=0;D<F._columns.length;D++){let A=F._columns[D];if(A._notNull)L+=`${N}${A.alias} : ${$[A.tsType]};`;else L+=`${N}${A.alias}? : ${$[A.tsType]} | null;`;N=`
	`}return L}function G(F){let L="",N="";for(let D=0;D<F._columns.length;D++){let A=F._columns[D];L+=`${N}'${A.alias}' | '${A.alias} desc'`,N="| "}return L}function J(F){return F[0].toUpperCase()+F.substr(1)}function Q(F){let L="",N="";for(let D=0;D<F._columns.length;D++){let A=F._columns[D];L+=`${N}${A.alias}? : ColumnConcurrency;`,N=`
	`}return L}function W(F){let L=new Set(F._primaryColumns),N="",D="";for(let A=0;A<F._columns.length;A++){let B=F._columns[A];if(L.has(B))continue;N+=`${D}${B.alias}? : boolean;`,D=`
	`}return N}function K(F){return L(F);function L(N,D="\t\t\t\t\t"){let A="";for(let B in N)if(typeof N[B]==="object"&&N[B]!==null)A+=`
`+D+B+": {"+D+L(N[B],D+"\t"),A+=`
`+D+"}";else if(typeof N[B]==="function")A+=`
`+D+B+": ("+Z(N[B])+") => import('orange-orm').Filter;";return A}}function Z(F){let L=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,N=/([^\s,]+)/g,D=F.toString().replace(L,""),A=D.slice(D.indexOf("(")+1,D.indexOf(")")).match(N);if(A===null)return"";return A.slice(1).join(": unknown, ")+": unknown"}function H(F){if(F)return`
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-explicit-any */
import type { AxiosInterceptorManager, InternalAxiosRequestConfig, AxiosResponse } from 'axios';
import type { BooleanColumn, JSONColumn, UUIDColumn, DateColumn, NumberColumn, BinaryColumn, StringColumn, Concurrency, Filter, RawFilter, TransactionOptions, Pool, Express, Url, ColumnConcurrency, JsonPatch } from 'orange-orm';
export { RequestHandler } from 'express';
export { Concurrency, Filter, RawFilter, Config, TransactionOptions, Pool } from 'orange-orm';
export = r;
declare function r(config: Config): r.RdbClient;
`;return`
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-explicit-any */
import schema from './schema';
import type { AxiosInterceptorManager, InternalAxiosRequestConfig, AxiosResponse } from 'axios';
import type { BooleanColumn, JSONColumn, UUIDColumn, DateColumn, NumberColumn, BinaryColumn, StringColumn, Concurrency, Filter, RawFilter, TransactionOptions, Pool, Express, Url, ColumnConcurrency, JsonPatch } from 'orange-orm';
export default schema as RdbClient;`}function z(F,L){return`
declare namespace r {${N(L)}
`;function N(D){let A="";for(let B in F){let O=B.substring(0,1).toUpperCase()+B.substring(1);A+=`
	const ${B}: ${O}Table;`}if(!D)A+=`

	function and(filter: RawFilter | RawFilter[], ...filters: RawFilter[]): Filter;
	function or(filter: RawFilter | RawFilter[], ...filters: RawFilter[]): Filter;
	function not(): Filter;
	function transaction(fn: (transaction: RdbClient) => Promise<unknown>, options?: TransactionOptions): Promise<void>;
	function query(filter: RawFilter | string): Promise<unknown[]>;
	function query<T>(filter: RawFilter | string): Promise<T[]>;
	function transaction(fn: (transaction: RdbClient) => Promise<unknown>, options?: TransactionOptions): Promise<void>;
	const filter: Filter;
	function express(): Express;
	function express(config: ExpressConfig): Express;
`;else A+=`

	const interceptors: {
		request: AxiosInterceptorManager<InternalAxiosRequestConfig>;
		response: AxiosInterceptorManager<AxiosResponse>;
	};
	function reactive(proxyMethod: (obj: unknown) => unknown): void;	
	function and(filter: RawFilter | RawFilter[], ...filters: RawFilter[]): Filter;
	function or(filter: RawFilter | RawFilter[], ...filters: RawFilter[]): Filter;
	function not(): Filter;
	const filter: Filter;
`;return A}}function V(F,L){return`
export interface RdbClient  {${D(L)}
}

export interface RdbConfig {
	db?: Pool | (() => Pool);
    readonly?: boolean;
    concurrency?: Concurrency;${N()}    
}

export interface MetaData {
    readonly?: boolean;
    concurrency?: Concurrency;${N()}
}

export interface ExpressConfig {
	db?: Pool | (() => Pool);
	tables?: ExpressTables;
	concurrency?: Concurrency;
	readonly?: boolean;
	disableBulkDeletes?: boolean;
}

export interface ExpressContext {
	request: import('express').Request;
	response: import('express').Response;
	client: RdbClient;
}		

export interface ExpressTables {${A()}
}
`;function N(){let B="";for(let O in F){let E=O.substring(0,1).toUpperCase()+O.substring(1);B+=`
	${O}?: ${E}Concurrency;`}return B}function D(B){let O="";for(let E in F){let M=E.substring(0,1).toUpperCase()+E.substring(1);O+=`
	${E}: ${M}Table;`}if(B)O+=`
	(config: {db: Url}): RdbClient;
	interceptors: {
        request: AxiosInterceptorManager<InternalAxiosRequestConfig>;
        response: AxiosInterceptorManager<AxiosResponse>;
    };
	reactive(proxyMethod: (obj: unknown) => unknown): void;
	and(filter: RawFilter | RawFilter[], ...filters: RawFilter[]): Filter;
	or(filter: RawFilter | RawFilter[], ...filters: RawFilter[]): Filter;
	not(): Filter;
	transaction(fn: (transaction: RdbClient) => Promise<unknown>, options?: TransactionOptions): Promise<void>;
	filter: Filter;
    createPatch(original: any[], modified: any[]): JsonPatch;
    createPatch(original: any, modified: any): JsonPatch;`;else O+=`
	(config: RdbConfig): RdbClient;
	and(filter: RawFilter | RawFilter[], ...filters: RawFilter[]): Filter;
	or(filter: RawFilter | RawFilter[], ...filters: RawFilter[]): Filter;
	not(): Filter;
	query(filter: RawFilter | string): Promise<unknown[]>;
	query<T>(filter: RawFilter | string): Promise<T[]>;
	transaction(fn: (transaction: RdbClient) => Promise<unknown>, options?: TransactionOptions): Promise<void>;
	filter: Filter;
	createPatch(original: any[], modified: any[]): JsonPatch;
	createPatch(original: any, modified: any): JsonPatch;
	express(): Express;
	express(config: ExpressConfig): Express;
	readonly metaData: MetaData;`;return O}function A(){let B="";for(let O in F){let E=O.substring(0,1).toUpperCase()+O.substring(1);B+=`
	${O}?: boolean | ${E}ExpressConfig;`}return B}}return mD0=Y,mD0}var uD0,pj1;function Cq0(){if(pj1)return uD0;pj1=1;function $(Y,X=new Map){if(X.has(Y))return X.get(Y).id;let G={keys:Y._primaryColumns.map((K)=>({name:K.alias,type:K.tsType})),columns:{},relations:{},id:X.size};X.set(Y,G);for(let K=0;K<Y._columns.length;K++){let Z=Y._columns[K];if(G.columns[Z.alias]={},"serializable"in Z&&!Z.serializable)G.columns[Z.alias].serializable=!1;else G.columns[Z.alias].serializable=!0}let J=Y._relations,Q,W={};W.visitJoin=function(K){G.relations[Q]=$(K.childTable,X)},W.visitMany=function(K){G.relations[Q]=$(K.childTable,X)},W.visitOne=W.visitMany;for(Q in J)J[Q].accept(W);return G}return uD0=$,uD0}var pD0,dj1;function QQ(){if(dj1)return pD0;dj1=1;let $=m78(),Y=Cq0();function X(G,J,Q={}){if("db"in Q&&(Q.db??void 0)===void 0||!J.db)throw Error("No db specified");let W={db:Q.db||J.db},K={},Z={readonly:Q.readonly};for(let N in J.tables)K[N]=G({...W,...Z,...Q[N],table:J.tables[N],isHttp:!0,client:J});async function H(N,D){if(N.method==="POST")return F.apply(null,arguments);if(N.method==="PATCH")return V.apply(null,arguments);if(N.method==="GET")return z.apply(null,arguments);if(N.method==="OPTIONS")return L(N,D);else D.status(405).set("Allow","GET, POST, PATCH, OPTIONS").send("Method Not Allowed")}H.db=H,H.dts=z;function z(N,D){try{if(N.query.table){if(!(N.query.table in K)){let B=Error("Table is not exposed or does not exist");throw B.status=400,B}let A=Y(J.tables[N.query.table]);D.setHeader("content-type","text/plain"),D.status(200).send(A)}else{let A=N.query.isNamespace==="true",B=Object.keys(K).map((O)=>{return{table:J.tables[O],customFilters:Q?.tables?.[O].customFilters,name:O}});D.setHeader("content-type","text/plain"),D.status(200).send($(B,{isNamespace:A,isHttp:!0}))}}catch(A){if(A.status===void 0)D.status(500).send(A.message||A);else D.status(A.status).send(A.message)}}async function V(N,D){try{D.json(await K[N.query.table].patch(N.body,N,D))}catch(A){if(A.status===void 0)D.status(500).send(A.message||A);else D.status(A.status).send(A.message)}}async function F(N,D){try{if(!N.query.table){let A=Error("Table not defined");throw A.status=400,A}else if(!(N.query.table in K)){let A=Error("Table is not exposed or does not exist");throw A.status=400,A}D.json(await K[N.query.table].post(N.body,N,D))}catch(A){if(A.status===void 0)D.status(500).send(A.message||A);else D.status(A.status).send(A.message)}}function L(N,D){D.setHeader("Access-Control-Allow-Origin","*"),D.setHeader("Access-Control-Allow-Methods","GET, POST, PATCH, OPTIONS"),D.setHeader("Access-Control-Allow-Headers","Content-Type"),D.setHeader("Access-Control-Max-Age","86400"),D.status(204).send()}return H}return pD0=X,pD0}var yy1=RB(UF0),dD0,cj1;function Qw(){if(cj1)return dD0;cj1=1;function $(Y){let X=-Y.getTimezoneOffset(),G=X>=0?"+":"-";function J(W){let K=Math.floor(Math.abs(W));return(K<10?"0":"")+K}function Q(W){return(W.getMilliseconds()+"").padStart(3,"0")}return Y.getFullYear()+"-"+J(Y.getMonth()+1)+"-"+J(Y.getDate())+"T"+J(Y.getHours())+":"+J(Y.getMinutes())+":"+J(Y.getSeconds())+"."+Q(Y)+G+J(X/60)+":"+J(X%60)}return dD0=$,dD0}var cD0,lj1;function Sq0(){if(lj1)return cD0;lj1=1;let $=Qw();function Y(G){return JSON.stringify(G,X)}function X(G,J){if(J instanceof Date&&!isNaN(J))return $(J);else return J}return cD0=Y,cD0}var kq0=RB(DF0),lD0,ij1;function ay(){if(ij1)return lD0;ij1=1;let $=yy1,Y=Qw(),X=Sq0(),{v4:G}=kq0;return lD0=function(Q,W,K){let Z=M({d:Q},K,!0),H=M({d:W},K,!0),z=E(W),V=$.observe(Z);Z.d=H.d;let F=$.generate(V),L=M(Q,K),{inserted:N,deleted:D,updated:A}=B(F);return A.sort(_),[...N,...A,...D];function B(P){let w=[],j=[],C=[];for(let k of P)if(k.path=k.path.substring(2),k.op==="add"&&k.path.split("/").length===2)w.push(k);else if(k.op==="remove"&&k.path.split("/").length===2)O(k),j.push(k);else O(k),C.push(k);return{inserted:w,updated:C,deleted:j}}function O(P){if(P.op==="remove"||P.op==="replace"){let j=P.path.split("/");j.shift(),P.oldValue=j.reduce(w,L)}else return P;function w(j,C){return j[C]}return P}function E(P){return P.reduce((w,j,C)=>{if(K&&K.keys&&j===Object(j)){let k=[];for(let S=0;S<K.keys.length;S++){let I=K.keys[S].name;k.push(q(j[I]))}w[X(k)]=C}else if("id"in j)w[X([j.id])]=C;else w[C]=C;return w},{})}function M(P,w,j){if(Array.isArray(P)){let C={__patchType:"Array"};for(let k=0;k<P.length;k++){let S=M(P[k],w);if(w&&w.keys&&S===Object(S)){let I=[];for(let v=0;v<w.keys.length;v++){let x=w.keys[v].name;I.push(q(S[x]))}C[X(I)]=S}else if(S===Object(S)&&"id"in S)C[X([S.id])]=S;else C[k]=S}return C}else if(R(P))return Y(P);else if(P===Object(P)){let C={};for(let k in P)C[k]=M(P[k],j?w:w&&w.relations&&w.relations[k]);return C}return P}function R(P){return P instanceof Date&&!isNaN(P)}function q(P){if(P===void 0)return`~${G()}`;else return P}function _(P,w){let j=P.path.split("/"),C=w.path.split("/");return j.length-C.length||(z[j[1]]??1/0-z[C[1]]??1/0)||P.path.localeCompare(w.path)}},lD0}var iD0,nj1;function u78(){if(nj1)return iD0;nj1=1;function $(Y){if(Y&&typeof Y==="function")return Y();else if(Y===void 0)return"";else return Y}return iD0=$,iD0}var nD0,rj1;function p78(){if(rj1)return nD0;rj1=1;function $(Y){if(Y)return Y.slice(0);return[]}return nD0=$,nD0}var rD0,aj1;function Y9(){if(aj1)return rD0;aj1=1;var $=u78(),Y=p78();function X(J,Q){this._text=J,this.parameters=Q}X.prototype.sql=function(){return this._text},X.prototype.prepend=function(J){if(J.sql){var Q=J.parameters.concat(this.parameters);return G(J.sql()+this._text,Q)}else return G(J+this._text,this.parameters)},X.prototype.append=function(J){if(J.sql){var Q=this.parameters.concat(J.parameters);return G(this._text+J.sql(),Q)}else return G(this._text+J,this.parameters)};function G(J,Q){return J=$(J),Q=Y(Q),new X(J,Q)}return rD0=G,rD0}var aD0,sj1;function d78(){if(sj1)return aD0;sj1=1;function $(Y,X){if(!X.sql())return Y;return Y.append(" AND ").append(X)}return aD0=$,aD0}var sD0,oj1;function c78(){if(oj1)return sD0;oj1=1;function $(Y,X){if(!X.sql())return Y;return Y.prepend("(").append(" OR ").append(X).append(")")}return sD0=$,sD0}var oD0,tj1;function by1(){if(tj1)return oD0;tj1=1;let $=Y9(),Y=d78(),X=c78();function G(K){var Z={};return Z.sql=K.sql.bind(K),Z.parameters=K.parameters,Z.append=function(H){var z=K.append(H);return G(z)},Z.prepend=function(H){var z=K.prepend(H);return G(z)},Z.and=function(H,z){z=J(H,z);var V=Y(K,z),F=G(V);for(var L=2;L<arguments.length;L++)F=F.and(H,arguments[L]);return F},Z.or=function(H,z){z=J(H,z);var V=X(K,z),F=G(V);for(var L=2;L<arguments.length;L++)F=F.or(H,arguments[L]);return F},Z.not=function(H){var z=K.prepend("NOT (").append(")");return G(z)},Z}function J(K,Z,H,z){if(Array.isArray(Z)&&Z.length===0)return G($(z?"1 = 2":"1 = 1"));else if(Array.isArray(Z)){let V,F;for(let L=0;L<Z.length;L++){let N=J(K,Z[L],H);if(N.isObjectFilter)F=F?F.or(K,N):N;else V=V?V.and(K,N):N}if(V&&F)return V.and(K,F);else if(V)return V;else return F}else{let V=[];if(Z){if(Z.and)return Z;if(Z.sql){let L=Z.sql;if(typeof Z.sql==="function")L=Z.sql();V.push(L,Z.parameters)}else if(Q(Z,H))return W(K,Z,H);else V=[Z]}else V=[Z];let F=$.apply(null,V);return G(F)}}function Q(K,Z){return Z&&K}function W(K,Z,H){let z=H._primaryColumns,V;for(let F=0;F<z.length;F++){let L=z[F],N=L.equal(K,Z[L.alias]);V=V?V.and(K,N):N}return V.isObjectFilter=!0,V}return oD0={negotiateRawSqlFilter:J,newBoolean:G},oD0}var tD0,ej1;function y2(){if(ej1)return tD0;ej1=1;let{negotiateRawSqlFilter:$}=by1();return tD0=$,tD0}var eD0,$T1;function Ww(){if($T1)return eD0;$T1=1;var $=y2(),Y=Y9()("");function X(){return X.and.apply(null,arguments)}return X.sql=Y.sql,X.parameters=Y.parameters,X.and=function(G,J){J=$(G,J);for(var Q=2;Q<arguments.length;Q++)J=J.and(G,arguments[Q]);return J},X.or=function(G,J){J=$(G,J);for(var Q=2;Q<arguments.length;Q++)J=J.or(G,arguments[Q]);return J},X.not=function(G,J){J=$(G,J).not(G);for(var Q=2;Q<arguments.length;Q++)J=J.and(G,arguments[Q]);return J},eD0=X,eD0}var $N0,YT1;function l78(){if(YT1)return $N0;YT1=1;let $=ay(),Y=Ww(),X=y2(),G=Cq0(),J=Symbol(),Q={and:!0,or:!0,not:!0,AND:!0,OR:!0,NOT:!0,equal:!0,eq:!0,EQ:!0,notEqual:!0,ne:!0,NE:!0,lessThan:!0,lt:!0,LT:!0,lessThanOrEqual:!0,le:!0,LE:!0,greaterThan:!0,gt:!0,GT:!0,greaterThanOrEqual:!0,ge:!0,GE:!0,between:!0,in:!0,IN:!0,startsWith:!0,iStartsWith:!0,endsWith:!0,iEndsWith:!0,contains:!0,iContains:!0,iEqual:!0,iEq:!0,ieq:!0,IEQ:!0,exists:!0,all:!0,any:!0,none:!0,where:!0,sum:!0,avg:!0,max:!0,min:!0,count:!0,groupSum:!0,groupAvg:!0,groupMax:!0,groupMin:!0,groupCount:!0,_aggregate:!0,self:!0};function W(K,...Z){let H={and:Y.and.bind(null,K),or:Y.or.bind(null,K),not:Y.not.bind(null,K),AND:Y.and.bind(null,K),OR:Y.or.bind(null,K),NOT:Y.not.bind(null,K)};return z(...Z);async function z({table:M,JSONFilter:R,baseFilter:q,customFilters:_={},request:P,response:w,readonly:j,disableBulkDeletes:C,isHttp:k,client:S}){let I={...Q,insert:!j,...O(G(M))},v={...H,...u(_),getManyDto:t,getMany:e,aggregate:a,count:n,delete:g,cascadeDelete:p,update:K0,replace:s},x=await y(R,M);if(x===void 0)return{};else return x;function y(m,$0){if(A(m)){let F0=[],D0=Y0(m.path,$0);if(D0){if(k)D(m.args[0]);let O0=D0(K,(R0)=>y(m.args[0],R0));if(!("isSafe"in O0))O0.isSafe=J;return O0}else for(let O0=0;O0<m.args.length;O0++)F0.push(y(m.args[O0],b(m.path,$0)));return Z0(m.path,F0)}else if(Array.isArray(m)){let F0=[];for(let D0=0;D0<m.length;D0++)F0.push(y(m[D0],$0));return F0}return m;function Y0(F0,D0){F0=F0.split(".");for(let P0=0;P0<F0.length;P0++)D0=D0[F0[P0]];let O0=new Set(["all","any","none","where","_aggregate"]),R0=F0.slice(-1)[0];if(O0.has(R0)||D0&&(D0._primaryColumns||D0.any&&D0.all))return D0}function Z0(F0,D0){if(F0 in v){if(k)D(D0);let p0=v[F0].apply(null,D0);if(p0.then)return p0.then((U4)=>{return B(U4),U4});return B(p0),p0}let O0=F0.split("."),R0=$0,P0=O0[O0.length-1];if(!I[P0]&&k){let p0=Error("Disallowed operator "+P0);throw p0.status=403,p0}for(let p0=0;p0<O0.length;p0++)R0=R0[O0[p0]];if(!R0)throw Error(`Method '${F0}' does not exist`);let f0=R0.apply(null,[K,...D0]);return B(f0),f0}}async function d(){if(typeof q==="function"){let m=await q.apply(null,[E(S),P,w]);if(!m)return;let $0=JSON.parse(JSON.stringify(m));return z({table:M,JSONFilter:$0,request:P,response:w})}else return}function u(m){return $0(m);function $0(Z0,F0={},D0="customFilters."){for(let O0 in Z0)if(typeof Z0[O0]==="object"&&Z0[O0]!==null)$0(Z0[O0],F0,D0+O0+".");else F0[D0+O0]=Y0.bind(null,Z0[O0]);return F0}async function Y0(Z0,...F0){let D0={db:E(S),request:P,response:w},O0=Z0.apply(null,[D0,...F0]);if(O0.then)O0=await O0;let R0=JSON.parse(JSON.stringify(O0));return z({table:M,JSONFilter:R0,request:P,response:w})}}function b(m,$0){m=m.split(".");let Y0=new Set(["all","any","none"]),Z0=m.slice(-1)[0];if(Y0.has(Z0)){for(let F0=0;F0<m.length-1;F0++)$0=$0[m[F0]];return $0}else{let F0=$0;for(let D0=0;D0<m.length;D0++)if(F0)F0=F0[m[D0]];if(F0?._shallow)return F0._shallow;else return $0}}async function g(m){if(j||C){let Z0=Error('Bulk deletes are not allowed. Parameter "disableBulkDeletes" must be true.');throw Z0.status=403,Z0}m=h(m);let $0=await d();if($0)m=m.and(K,$0);let Y0=[K,m].concat(Array.prototype.slice.call(arguments).slice(1));return M.delete.apply(null,Y0)}async function p(m){if(j||C){let Z0=Error('Bulk deletes are not allowed. Parameter "disableBulkDeletes" must be true.');throw Z0.status=403,Z0}m=h(m);let $0=await d();if($0)m=m.and(K,$0);let Y0=[K,m].concat(Array.prototype.slice.call(arguments).slice(1));return M.cascadeDelete.apply(null,Y0)}function h(m){if(m)return X(K,m,M,!0);else return Y}async function n(m,$0){V(M,$0),m=h(m);let Y0=await d();if(Y0)m=m.and(K,Y0);let Z0=[K,m].concat(Array.prototype.slice.call(arguments).slice(1));return M.count.apply(null,Z0)}async function t(m,$0){V(M,$0),m=h(m);let Y0=await d();if(Y0)m=m.and(K,Y0);let Z0=[K,m].concat(Array.prototype.slice.call(arguments).slice(1));return await Q0($0),M.getManyDto.apply(null,Z0)}async function s(m,$0={insertAndForget:!0}){V(M,$0);let Y0=X0(m,{},M),F0=await z({table:M,JSONFilter:{path:"getManyDto",args:[m,Y0]},baseFilter:q,customFilters:_,request:P,response:w,readonly:j,disableBulkDeletes:C,isHttp:k,client:S}),D0=G(M),O0=$(F0,Array.isArray(m)?m:[m],D0),{changed:R0}=await M.patch(K,O0,{strategy:$0});if(Array.isArray(m))return R0;else return R0[0]}async function K0(m,$0,Y0={insertAndForget:!0}){V(M,Y0);let F0={path:"getManyDto",args:[null,X0(m,$0,M)]},D0=await z({table:M,JSONFilter:F0,baseFilter:q,customFilters:_,request:P,response:w,readonly:j,disableBulkDeletes:C,isHttp:k,client:S}),O0=Array(D0.length);for(let p0=0;p0<D0.length;p0++){let U4=D0[p0];O0[p0]={...U4};for(let P1 in m)U4[P1]=m[P1]}let R0=G(M),P0=$(O0,D0,R0),{changed:f0}=await M.patch(K,P0,{strategy:Y0});return f0}function X0(m,$0,Y0,Z0={}){if(Z0={...$0,...Z0},Array.isArray(m)){for(let F0=0;F0<m.length;F0++)X0(m[F0],Y0,Z0);return}for(let F0 in m){let D0=Y0[F0]?._relation;if(D0&&!D0.columns)Z0[F0]={},X0(m[F0],$0?.[F0],Y0[F0],Z0[F0]);else Z0[F0]=!0}return Z0}async function a(m,$0){V(M,$0),m=h(m);let Y0=await d();if(Y0)m=m.and(K,Y0);let Z0=[K,m].concat(Array.prototype.slice.call(arguments).slice(1));return await Q0($0),M.aggregate.apply(null,Z0)}async function Q0(m){if(typeof m!=="object")return;for(let $0 in m){let Y0=m[$0];if(A(Y0))m[$0]=await y(m[$0],M);else await Q0(m[$0])}}async function e(m,$0){V(M,$0),m=h(m);let Y0=await d();if(Y0)m=m.and(K,Y0);let Z0=[K,m].concat(Array.prototype.slice.call(arguments).slice(1));return await Q0($0),M.getMany.apply(null,Z0)}}function V(M,R){if(!R||!M)return;for(let q in R)L(R),F(R),N(M,R),V(M[q],R[q])}function F(M){if(!("limit"in M)||Number.isInteger(M.limit))return;let R=Error("Invalid limit: "+M.limit);R.status=400}function L(M){if(!("offset"in M)||Number.isInteger(M.offset))return;let R=Error("Invalid offset: "+M.offset);throw R.status=400,R}function N(M,R){if(!("orderBy"in R)||!M)return;let q=R.orderBy;if(!Array.isArray(q))q=[q];q.reduce(_,[]);function _(P,w){let j=w.split(" ").filter((C)=>{return C=C.toLowerCase(),!(C===""||C==="asc"||C==="desc")});for(let C of j){let k=M[C];if(!(k&&k.equal)){let S=Error("Unknown column: "+C);throw S.status=400,S}}}}function D(){for(let M=0;M<arguments.length;M++){let R=arguments[M];if(!R)continue;if(R&&R.isSafe===J)continue;if(R.sql||typeof R==="string"){let q=Error("Raw filters are disallowed");throw q.status=403,q}if(Array.isArray(R))for(let q=0;q<R.length;q++)D(R[q])}}function A(M){return M instanceof Object&&"path"in M&&"args"in M}function B(M){if(M instanceof Object)Object.defineProperty(M,"isSafe",{value:J,enumerable:!1})}function O(M){let R={};function q(_){Object.keys(_).forEach((P)=>{if(R[P]=!0,typeof _[P]==="object"&&Object.keys(_[P]?.relations)?.length>0)q(_[P].relations)})}return q(M.relations),R}function E(M){var R=K;let q=R.run(()=>!0);function _(P){return q.then(R.run.bind(R,P))}return M({transaction:_})}}return $N0=W,$N0}var YN0,XT1;function Kw(){if(XT1)return YN0;XT1=1;function $(Y){if(Y)return Y.rdb}return YN0=$,YN0}var XN0,GT1;function hG(){if(GT1)return XN0;GT1=1;let $=Kw();function Y(X){let G=$(X);if(!G)throw Error("Rdb transaction is no longer available. Is promise chain broken ?");return G}return XN0=Y,XN0}var GN0,JT1;function nX(){if(JT1)return GN0;JT1=1;let $=hG();function Y(X,G,J){let Q=$(X);Q[G]=J}return GN0=Y,GN0}var JN0,QT1;function g6(){if(QT1)return JN0;QT1=1;var $=hG();return JN0=function(Y,X){return $(Y)[X]},JN0}var QN0,WT1;function hy1(){if(WT1)return QN0;WT1=1;function $(Y){if(Y&&Y.parameters&&Y.parameters.length>0&&Y.parameters.filter((K)=>K===null||K===void 0).length>0){var X=Y.sql().split("?"),G="",J=[],Q=X.length-1;for(var W=0;W<Q;W++)if(Y.parameters[W]===null||Y.parameters[W]===void 0)G+=X[W]+"null";else G+=X[W]+"?",J.push(Y.parameters[W]);return G+=X[Q],{sql:()=>G,parameters:J}}else return Y}return QN0=$,QN0}var WN0,KT1;function i78(){if(KT1)return WN0;KT1=1;let $=g6(),Y=hy1();function X(G,J){return Q;function Q(W,K){try{var Z=$(G,"dbClient");J=Y(J),Z.executeCommand(J,H)}catch(z){K(z)}function H(z,V){if(!z)W(V);else K(z)}}}return WN0=X,WN0}var KN0,ZT1;function n78(){if(ZT1)return KN0;ZT1=1;var $=i78();function Y(X,G){var J=$(X,G);return new Promise(J)}return KN0=Y,KN0}var ZN0,UT1;function fy1(){if(UT1)return ZN0;UT1=1;function $(Y){if(!Y)return Promise.resolve.apply(Promise,arguments);return new Promise(Y)}return $.all=Promise.all,ZN0=$,ZN0}var UN0,HT1;function gy1(){if(HT1)return UN0;HT1=1;var $=n78(),Y=fy1();function X(G,J){if(J.length===0)return Y();var Q=-1;return W().then(Z);function W(){if(Q++,Q+1===J.length)return $(G,J[Q]).then(K);else return $(G,J[Q]).then(K).then(W)}function K(H){if(H&&J[Q].onResult)J[Q].onResult(H)}async function Z(){for(let H=0;H<J.length;H++)if(J[H].emitChanged)await Promise.all(J[H].emitChanged())}}return UN0=X,UN0}var HN0,zT1;function vq0(){if(zT1)return HN0;zT1=1;var $=g6();function Y(X){return $(X,"changes")}return HN0=Y,HN0}var zN0,VT1;function r78(){if(VT1)return zN0;VT1=1;var $=Y9(),Y=g6();function X(G,J){var Q=Y(G,"multipleStatements"),W=[],K=J.length;for(var Z=0;Z<K;Z++){var H=J[Z];if(Q&&H.parameters.length===0&&!H.disallowCompress)for(var z=Z+1;z<K;z++){var V=J[z];if(V.parameters.length>0||!V.disallowCompress)break;H=$(H.sql()+";"+V.sql()),Z++}W.push(H)}return W}return zN0=X,zN0}var VN0,FT1;function xq0(){if(FT1)return VN0;FT1=1;var $=vq0(),Y=r78();function X(G){var J=$(G),Q=J.length;if(Q>0){var W=J[Q-1];if(W.endEdit)W.endEdit();var K=Y(G,J);return J.length=0,K}return J}return VN0=X,VN0}var FN0,LT1;function a78(){if(LT1)return FN0;LT1=1;let $=g6(),Y=hy1();function X(G,J){return Q;function Q(W,K){try{var Z=$(G,"dbClient");J=Y(J),Z.executeQuery(J,H)}catch(z){K(z)}function H(z,V){if(!z)W(V);else K(z)}}}return FN0=X,FN0}var LN0,DT1;function yq0(){if(DT1)return LN0;DT1=1;var $=a78();function Y(X,G){var J=$(X,G);return new Promise(J)}return LN0=Y,LN0}var DN0,NT1;function s78(){if(NT1)return DN0;NT1=1;var $=yq0();function Y(X,G){var J=[];for(var Q=0;Q<G.length;Q++){var W=$(X,G[Q]);J.push(W)}return J}return DN0=Y,DN0}var NN0,AT1;function QZ(){if(AT1)return NN0;AT1=1;var $=gy1(),Y=xq0(),X=s78();function G(J,Q){var W=Y(J);return $(J,W).then(K);function K(){return X(J,Q)}}return NN0=G,NN0}var AN0,BT1;function o78(){if(BT1)return AN0;BT1=1;function $(Y){if(typeof Y==="string")return function(){return Y};var X=Y.sql;if(typeof X==="function")return X;else if(typeof X==="string")return function(){return X};else throw Error("Query lacks sql property string or function")}return AN0=$,AN0}var BN0,OT1;function t78(){if(OT1)return BN0;OT1=1;function $(Y){if(Y===void 0)return[];else if(Y.length!==void 0)return Y;else throw Error("Query has invalid parameters property. Must be undefined or array")}return BN0=$,BN0}var ON0,ET1;function e78(){if(ET1)return ON0;ET1=1;var $=o78(),Y=t78();function X(G){var J=$(G),Q=Y(G.parameters);let W={sql:J,parameters:Q};if(G.types)W.types=G.types;return W}return ON0=X,ON0}var EN0,MT1;function rX(){if(MT1)return EN0;MT1=1;var $=QZ(),Y=e78();function X(J,Q){var W=Y(Q);return $(J,[W]).then(G)}function G(J){return J[0]}return EN0=X,EN0}var MN0,RT1;function WQ(){if(RT1)return MN0;RT1=1;let $=l78(),Y=Cq0(),X=nX(),G=rX(),J=QQ(),Q=["getManyDto","getMany","aggregate","count"];function W(){let K=arguments[0],{table:Z,transaction:H,db:z,isHttp:V}=K,F={get:L,post:D,patch:N,query:A,express:B};function L(){return Y(Z)}async function N(O,E,M){if(!Z){let _=Error("Table is not exposed");throw _.status=400,_}O=typeof O==="string"?JSON.parse(O):O;let R;if(H)await H(q);else{if(typeof z==="function"){let _=z();if(_.then)z=await _;else z=_}await z.transaction(q)}return R;async function q(_){X(_,"ignoreSerializable",!0);let P=O.patch;R=await Z.patch(_,P,{...K,...O.options,isHttp:V})}}async function D(O,E,M){O=typeof O==="string"?JSON.parse(O):O;let R;if(H)await H(q);else{if(typeof z==="function"){let _=z();if(_.then)z=await _;else z=_}if(Q.includes(O.path))await z.transaction({readonly:!0},q);else await z.transaction(q)}return R;async function q(_){X(_,"ignoreSerializable",!0);let P={...K,...O.options,JSONFilter:O,request:E,response:M,isHttp:V};R=await $(_,P)}}async function A(){let O=arguments,E;if(H)await H(M);else{if(typeof z==="function"){let R=z();if(R.then)z=await R;else z=R}E=await z.query.apply(null,arguments)}return E;async function M(...R){E=await G.apply(null,[...R,...O])}}function B(O,E){return J(W,O,E)}return F}return MN0=W,MN0}var RN0,qT1;function $Y8(){if(qT1)return RN0;qT1=1;let $=Qw();function Y(J){if(J===null||typeof J!=="object")return J;if(Array.isArray(J)){let K=[];for(let Z=0;Z<J.length;Z++)K[Z]=Y(J[Z]);return K}let Q={},W=Object.keys(J);for(let K=0;K<W.length;K++){let Z=W[K];Q[Z]=Y(J[Z])}return Q}function X(J){if(J===null||typeof J!=="object")return J;if(Array.isArray(J)){let K=[];for(let Z=0;Z<J.length;Z++)K[Z]=X(J[Z]);return K}else if(J instanceof Date&&!isNaN(J))return $(J);let Q={},W=Object.keys(J);for(let K=0;K<W.length;K++){let Z=W[K];Q[Z]=X(J[Z])}return Q}function G(J,Q){if(Q)return Y(J);else return X(J)}return RN0=G,RN0}var YY8=RB(yL0),qN0,PT1;function XY8(){if(PT1)return qN0;PT1=1;let $=YY8;function Y(G,J,Q){let W=$.default?$.default.create({baseURL:G}):$.create({baseURL:G});return Q.applyTo(W),{get:Z,post:z,patch:H,query:V,express:F};async function Z(){try{let L={"Content-Type":"application/json",Accept:"application/json"};return(await W.request(J,{headers:L,method:"get"})).data}catch(L){if(typeof L.response?.data==="string")throw Error(L.response.data.replace(/^Error: /,""));else throw L}}async function H(L){try{let N={"Content-Type":"application/json"};return(await W.request(J,{headers:N,method:"patch",data:L})).data}catch(N){if(typeof N.response?.data==="string")throw Error(N.response.data.replace(/^Error: /,""));else throw N}}async function z(L){try{let N={"Content-Type":"application/json"};return(await W.request(J,{headers:N,method:"post",data:L})).data}catch(N){if(typeof N.response?.data==="string")throw Error(N.response.data.replace(/^Error: /,""));else throw N}}function V(){throw Error("Queries are not supported through http")}function F(){throw Error("Hosting in express is not supported on the client side")}}function X(G,J,{axios:Q,tableOptions:W}){if(W.transaction?.done)delete W.transaction;return{get:Z,post:z,patch:H,query:V};async function Z(){return(await F()).get.apply(null,arguments)}async function H(N){return(await F()).patch.apply(null,arguments)}async function z(N){return(await F()).post.apply(null,arguments)}async function V(){return(await F()).query.apply(null,arguments)}async function F(){let N=await L();if(typeof N==="string")return Y(N,`?table=${J}`,Q);else if(N&&N.transaction)return N.hostLocal({...W,db:N,table:G});else throw Error("Invalid arguments")}async function L(){let N=W.db;if(N.transaction)return N;if(typeof N==="function"){let D=N();if(D.then)N=await D;else N=D}return N}}return qN0=X,qN0}var PN0,wT1;function GY8(){if(wT1)return PN0;wT1=1;let $=Sq0(),{v4:Y}=kq0;function X(J,Q){return J.reduce((W,K,Z)=>{if(Q&&Q.keys&&K===Object(K)){let H=[];for(let z=0;z<Q.keys.length;z++){let V=Q.keys[z].name;H.push(G(K[V]))}W[$(H)]=Z}else if("id"in K)W[$(K.id)]=Z;else W[Z]=Z;return W},{})}function G(J){if(J===void 0)return`~${Y()}`;else return J}return PN0=X,PN0}var wN0,_T1;function JY8(){if(_T1)return wN0;_T1=1;function $(Y,X){let G={get(K,Z){if(Z==="map")return()=>{return new Proxy(W,G)};else if(typeof K[Z]<"u")return K[Z];else return()=>{return new Proxy({},G)}},apply(K,Z,H){if(K===W)return K(...H);else return new Proxy({},G)},set(K,Z,H){return K[Z]=H,!0}};function J(K){return K(J)}J.http=(K)=>K,J.pg=Q,J.pglite=Q,J.postgres=Q,J.mssql=Q,J.mssqlNative=Q,J.mysql=Q,J.sap=Q,J.oracle=Q,J.sqlite=Q,J.d1=Q;function Q(){throw Error("Cannot create pool for database outside node")}function W(K){if(K&&K.db&&typeof K.db==="function")return Y({...K,db:J(K.db),providers:J});return Y({...K,providers:J})}return W.http=(K)=>Y({db:K,providers:J}),W.pg=()=>Y({db:Q,providers:J}),W.pglite=()=>Y({db:Q,providers:J}),W.postgres=()=>Y({db:Q,providers:J}),W.mssql=()=>Y({db:Q,providers:J}),W.mssqlNative=()=>Y({db:Q,providers:J}),W.mysql=()=>Y({db:Q,providers:J}),W.sap=()=>Y({db:Q,providers:J}),W.oracle=()=>Y({db:Q,providers:J}),W.sqlite=()=>Y({db:Q,providers:J}),W.d1=()=>Y({db:Q,providers:J}),new Proxy(W,G)}return wN0=$,wN0}var my1=RB(b78),_N0,jT1;function QY8(){if(jT1)return _N0;jT1=1;class ${constructor(){this.requestInterceptors=[],this.responseInterceptors=[]}get request(){return{use:(Y,X)=>{let G=Math.random().toString(36).substr(2,9);return this.requestInterceptors.push({id:G,onFulfilled:Y,onRejected:X}),G},eject:(Y)=>{this.requestInterceptors=this.requestInterceptors.filter((X)=>X.id!==Y)}}}get response(){return{use:(Y,X)=>{let G=Math.random().toString(36).substr(2,9);return this.responseInterceptors.push({id:G,onFulfilled:Y,onRejected:X}),G},eject:(Y)=>{this.responseInterceptors=this.responseInterceptors.filter((X)=>X.id!==Y)}}}applyTo(Y){for(let{onFulfilled:X,onRejected:G}of this.requestInterceptors)Y.interceptors.request.use(X,G);for(let{onFulfilled:X,onRejected:G}of this.responseInterceptors)Y.interceptors.response.use(X,G)}}return _N0=function(){return new $},_N0}var jN0,TT1;function sy(){if(TT1)return jN0;return TT1=1,jN0={useProxy:!0,useLazyDefaults:!0},jN0}var TN0,IT1;function WY8(){if(IT1)return TN0;IT1=1;let $=ay(),Y=Sq0(),X=$Y8(),G=XY8(),J=GY8(),Q=new WeakMap,W=new WeakMap,K=Symbol(),Z=JY8(),H=my1,z=QY8(),V=sy();function F(O={}){if(V.useLazyDefaults=!1,O.pg)O={db:O};let{transaction:E,reactive:M}=O,R=O.providers||{},q=O.db;if(typeof R==="function")q=typeof O.db==="function"?R(O.db):O.db;let _=z();function P(g={}){if(g.pg)g={db:g};return F({...O,...g})}P.reactive=(g)=>M=g,P.map=Z.bind(null,P),Object.defineProperty(P,"metaData",{get:k,enumerable:!0,configurable:!1}),P.interceptors=_,P.createPatch=y,P.table=b,P.or=A("or"),P.and=A("and"),P.not=A("not"),P.filter={or:P.or,and:P.and,not:P.not,toJSON:function(){return}},P.query=v,P.transaction=u,P.db=q,P.mssql=j.bind(null,"mssql"),P.mssqlNative=j.bind(null,"mssqlNative"),P.pg=j.bind(null,"pg"),P.pglite=j.bind(null,"pglite"),P.postgres=j.bind(null,"postgres"),P.d1=j.bind(null,"d1"),P.sqlite=j.bind(null,"sqlite"),P.sap=j.bind(null,"sap"),P.oracle=j.bind(null,"oracle"),P.http=j.bind(null,"http"),P.mysql=j.bind(null,"mysql"),P.express=x,P.close=w;function w(){return P.db.end?P.db.end():Promise.resolve()}function j(g,...p){let h=R[g].apply(null,p);return P({db:h})}if(O.tables)P.tables=O.tables;return new Proxy(P,{get(g,p){if(p in P)return Reflect.get(...arguments);else{let h={readonly:O.readonly,concurrency:O.concurrency};return b(O?.tables?.[p]||q,p,{...h,...H(O[p])})}}});function k(){let g={readonly:O.readonly,concurrency:O.concurrency};for(let p in O.tables)g[p]=I(O.tables[p],S(O,p));return g}function S(g,p){let h={};if("readonly"in g)h.readonly=g.readonly;if("concurrency"in g)h.concurrency=g.concurrency;return{...h,...g[p]||{}}}function I(g,p){let h={};for(let t=0;t<g._columns.length;t++){let s=g._columns[t].alias;h[s]=S(p,s)}for(let t in g._relations)if(!n(t,g))h[t]=I(g._relations[t].childTable,S(p,t));return h;function n(t,s){return s[t]&&s[t]._relation.columns}}async function v(){return G(q,void 0,{tableOptions:{db:q,transaction:E}}).query.apply(null,arguments)}function x(g){if(R.express)return R.express(P,{...O,...g});else throw Error("Cannot host express clientside")}function y(g,p,...h){if(!Array.isArray(g))g=[g],p=[p];let n=[g,p,...h];return $(...n)}async function d(){let g=q;if(typeof g==="function"){let p=g();if(p.then)g=await p;else g=p}return g}async function u(g,p){let h=await d();if(!h.createTransaction)throw Error("Transaction not supported through http");let n=h.createTransaction(p);try{let t=P({transaction:n}),s=await g(t);return n.done=!0,await n(n.commit),s}catch(t){await n(n.rollback.bind(null,t))}}function b(g,p,h){h=h||{},h={db:q,...h,transaction:E};let n,t={count:m,getMany:Q0,aggregate:e,getAll:a,getOne:$0,getById:Y0,proxify:C0,update:f0,replace:p0,updateChanges:U4,insert:P1,insertAndForget:d1,delete:R0,deleteCascade:P0,patch:C4,expand:X0},K0=new Proxy(t,{get(N0,h0){if(h0 in t)return Reflect.get(...arguments);else return A(h0)}});return K0;function X0(){return t}async function a(){return Q0.bind(null,void 0).apply(null,arguments)}async function Q0(N0,h0){let a0=Y1();h0=Z1({},h0);let c0=[N0,h0].concat(Array.prototype.slice.call(arguments).slice(2)),L1=await Z0.apply(null,c0);return await a0,C0(L1,h0,!0)}async function e(N0){let h0=O0(null,N0),a0=Y({path:"aggregate",args:h0});return G(g,p,{axios:_,tableOptions:h}).post(a0)}async function m(N0){let h0=[N0].concat(Array.prototype.slice.call(arguments).slice(1)),a0=Y({path:"count",args:h0});return G(g,p,{axios:_,tableOptions:h}).post(a0)}async function $0(N0,h0){let a0=Y1();h0=Z1({},h0);let c0={...h0,...{limit:1}},L1=[N0,c0].concat(Array.prototype.slice.call(arguments).slice(2)),E1=await Z0.apply(null,L1);if(await a0,E1.length===0)return;return C0(E1[0],h0,!0)}async function Y0(){if(arguments.length===0)return;let N0=await Y1(),h0=P.filter;for(let c0=0;c0<N0.keys.length;c0++){let L1=N0.keys[c0].name,E1=arguments[c0];h0=h0.and(K0[L1].eq(E1))}let a0=[h0].concat(Array.prototype.slice.call(arguments).slice(N0.keys.length));return $0.apply(null,a0)}async function Z0(){let N0=F0.apply(null,arguments),h0=Y({path:"getManyDto",args:N0});return G(g,p,{axios:_,tableOptions:h}).post(h0)}function F0(N0,h0,...a0){let c0=Array.prototype.slice.call(arguments);if(h0)return[N0,D0(h0),...a0];else return c0}function D0(N0,h0=""){if(typeof N0!=="object"||N0===null)return N0;if(Array.isArray(N0))return N0.map((c0)=>D0(c0,h0));let a0={...N0};for(let c0 in N0)if(c0==="where"&&typeof a0[c0]==="function")a0.where=A(h0+"where")(a0.where);else if(typeof a0[c0]==="function")a0[c0]=N(h0,a0[c0]);else a0[c0]=D0(N0[c0],h0+c0+".");return a0}function O0(N0,h0,...a0){let c0=Array.prototype.slice.call(arguments);if(h0)return[N0,L1(h0),...a0];else return c0;function L1(E1,l4=""){if(typeof E1!=="object"||E1===null)return E1;if(Array.isArray(E1))return E1.map((C1)=>L1(C1,l4));let Q1={...E1};for(let C1 in E1)if(C1==="where"&&typeof Q1[C1]==="function")Q1.where=A(l4+"where")(Q1.where);else if(typeof Q1[C1]==="function")Q1[C1]=D(l4,Q1[C1]);else Q1[C1]=L1(E1[C1],l4+C1+".");return Q1}}async function R0(){let N0=Array.prototype.slice.call(arguments),h0=Y({path:"delete",args:N0});return G(g,p,{axios:_,tableOptions:h}).post(h0)}async function P0(){let N0=Array.prototype.slice.call(arguments),h0=Y({path:"deleteCascade",args:N0});return G(g,p,{axios:_,tableOptions:h}).post(h0)}async function f0(N0,h0,a0){let c0=[N0,D0(h0),D0(a0)],L1=Y({path:"update",args:c0}),l4=await G(g,p,{axios:_,tableOptions:h}).post(L1);if(a0)return C0(l4,a0)}async function p0(N0,h0){let a0=[N0,D0(h0)],c0=Y({path:"replace",args:a0}),E1=await G(g,p,{axios:_,tableOptions:h}).post(c0);if(h0)return C0(E1,h0)}async function U4(N0,h0,...a0){let L1=[void 0].concat(a0);if(Array.isArray(N0)){let E1=await Q0.apply(null,[N0,...a0]);return E1.splice.apply(E1,[0,E1.length,...N0]),await E1.saveChanges.apply(E1,L1),E1}else{let E1=C0([h0],L1[0]);return E1.splice.apply(E1,[0,1,N0]),await E1.saveChanges.apply(E1,L1),C0(E1[0],L1[0])}}async function P1(N0,...h0){let c0=[void 0].concat(h0);if(Array.isArray(N0)){let L1=C0([],h0[0]);return L1.splice.apply(L1,[0,0,...N0]),await L1.saveChanges.apply(L1,c0),L1}else{let L1=C0([],c0[0]);return L1.splice.apply(L1,[0,0,N0]),await L1.saveChanges.apply(L1,c0),C0(L1[0],h0[0])}}async function d1(N0){let a0=[void 0,{insertAndForget:!0}];if(Array.isArray(N0)){let c0=C0([],a0[0]);c0.splice.apply(c0,[0,0,...N0]),await c0.saveChanges.apply(c0,a0)}else{let c0=C0([],a0[0]);c0.splice.apply(c0,[0,0,N0]),await c0.saveChanges.apply(c0,a0)}}function C0(N0,h0,a0){if(Array.isArray(N0))return n0(N0,h0,a0);else return J0(N0,h0,a0)}function n0(N0,h0,a0){let c0=N0;if(M)N0=M(N0);let L1={get(Q1,C1){if(C1==="toJSON")return()=>{return B0(N0)};else if(C1==="save"||C1==="saveChanges")return c1.bind(null,N0);else if(C1==="delete")return t4.bind(null,N0);else if(C1==="refresh")return I1.bind(null,N0);else if(C1==="clearChanges")return J4.bind(null,N0);else if(C1==="acceptChanges")return I6.bind(null,N0);else if(C1===K)return c0;else return Reflect.get.apply(c0,arguments)}},E1=B(N0,()=>{Q.set(N0,{json:X(N0,a0),strategy:h0,originalArray:[...N0]})}),l4=new Proxy(E1,L1);if(h0!==void 0){let{limit:Q1,...C1}={...h0};W.set(N0,C1)}return l4}function J0(N0,h0,a0){let c0={get(l4,Q1){if(Q1==="save"||Q1==="saveChanges")return w4.bind(null,N0);else if(Q1==="delete")return M4.bind(null,N0);else if(Q1==="refresh")return z6.bind(null,N0);else if(Q1==="clearChanges")return b4.bind(null,N0);else if(Q1==="acceptChanges")return K4.bind(null,N0);else if(Q1==="toJSON")return()=>{return B0(N0)};else if(Q1===K)return N0;else return Reflect.get(...arguments)}},L1=B(N0,()=>{Q.set(N0,{json:X(N0,a0),strategy:h0})}),E1=new Proxy(L1,c0);return W.set(N0,h0),E1}function B0(N0,h0=n){if(!N0)return null;if(!h0)return N0;if(Array.isArray(N0))return N0.map((c0)=>B0(c0,h0));let a0={};for(let c0 in N0)if(c0 in h0.relations)a0[c0]=B0(N0[c0],h0.relations[c0]);else if(c0 in h0.columns){if(h0.columns[c0].serializable)a0[c0]=N0[c0]}else a0[c0]=N0[c0];return a0}async function Y1(){if(n)return n;n=await G(g,p,{axios:_,tableOptions:h}).get();while(a0(n))n=h0(n);return n;function h0(c0,L1=new Map){if(typeof c0==="number")return L1.get(c0)||c0;L1.set(c0.id,c0);for(let E1 in c0.relations)c0.relations[E1]=h0(c0.relations[E1],L1);return c0}function a0(c0,L1=new WeakSet){if(typeof c0==="number")return!0;else if(L1.has(c0))return!1;else return L1.add(c0),Object.values(c0.relations).reduce((E1,l4)=>{return E1||a0(l4,L1)},!1)}}async function c1(N0,h0,a0){let c0=!1,L1=Q.get(N0)?.json;if(!L1)return;a0=n6({strategy:a0},N0),a0=Z1(N0,a0);let E1=await Y1(),l4=$(L1,N0,E1);if(l4.length===0)return;let Q1=Y({patch:l4,options:{strategy:a0,...h,...h0,deduceStrategy:c0}}),f4=G(g,p,{axios:_,tableOptions:h}).patch(Q1);if(a0?.insertAndForget){await f4;return}let A6=c4(N0,l4,E1),J9=r4(N0),{changed:o7,strategy:$4}=await f4;p6(o7,N0,[...J9,...A6]),Q.set(N0,{json:X(N0),strategy:$4,originalArray:[...N0]})}async function C4(N0,h0,a0){let c0=!1;if(N0.length===0)return;let L1=Y({patch:N0,options:{strategy:a0,...h,...h0,deduceStrategy:c0}});await G(g,p,{axios:_,tableOptions:h}).patch(L1);return}function c4(N0,h0,a0){let c0=[],L1=new Set(Q.get(N0).originalArray),E1={},l4=J(N0,a0);for(let Q1=0;Q1<h0.length;Q1++){let f4=h0[Q1].path.split("/"),A6=l4[f4[1]];if(A6>=0&&L1.has(N0[A6])&&!E1[A6])c0.push(A6),E1[A6]=!0}return c0}function r4(N0){let h0=[],a0=new Set(Q.get(N0).originalArray);for(let c0=0;c0<N0.length;c0++)if(!a0.has(N0[c0]))h0.push(c0);return h0}function T6(N0,h0){for(let a0=0;a0<N0.length;a0++)for(let c0 in N0[a0])h0[a0][c0]=N0[a0][c0]}function p6(N0,h0,a0){for(let c0=0;c0<N0.length;c0++)h0[a0[c0]]=N0[c0]}function n6(N0,h0){if(N0?.strategy!==void 0)return N0.strategy;if(h0){let a0=Q.get(h0);if(a0?.strategy!==void 0){let{limit:c0,...L1}={...a0.strategy};return L1}}}function Z1(N0,h0){if(h0!==void 0)return h0;else if(W.get(N0)!==void 0){let{limit:a0,...c0}={...W.get(N0)};return c0}}function J4(N0){let h0=Q.get(N0)?.json;if(!h0)return;let a0=X(h0);N0.splice(0,a0.length,...a0)}function I6(N0){let h0=Q.get(N0);if(!h0)return;h0.json=X(N0),h0.originalArray=[...N0]}async function t4(N0,h0){if(N0.length===0)return;let a0=await Y1(),c0=$(N0,[],a0),L1=Y({patch:c0,options:h0}),E1=G(g,p,{axios:_,tableOptions:h}),{strategy:l4}=await E1.patch(L1);N0.length=0,Q.set(N0,{json:X(N0),strategy:l4})}function a1(N0,h0,a0,c0){let L1=a0[h0[0].name];if(h0.length>1){let E1=N0.get(L1);if(!E1)E1=new Map,N0.set(L1,E1);a1(E1,h0.slice(1),a0,c0)}else N0.set(L1,c0)}function F1(N0,h0,a0){let c0=a0[h0[0].name];if(h0.length>1)return F1(N0.get(c0),h0.slice(1));else return N0.get(c0)}async function I1(N0,h0){if(J4(N0),h0=n6({strategy:h0},N0),h0=Z1(N0,h0),N0.length===0)return;let a0=await Y1(),c0=P.filter,L1=new Map;for(let f4=0;f4<N0.length;f4++){let A6=N0[f4],J9=P.filter;for(let o7=0;o7<a0.keys.length;o7++){let $4=a0.keys[o7].name,i4=A6[$4];J9=J9.and(K0[$4].eq(i4))}a1(L1,a0.keys,A6,f4),c0=c0.or(J9)}let E1=await Z0(c0,h0),l4=new Set;if(N0.length!==E1.length)for(var Q1=0;Q1<N0.length;Q1++)l4.add(Q1);for(let f4=0;f4<E1.length;f4++){let A6=E1[f4],J9=F1(L1,a0.keys,A6);if(N0.length!==E1.length)l4.delete(J9);N0[J9]=A6}let C1=0;for(let f4 of l4)N0.splice(f4+C1,1),C1--;Q.set(N0,{json:X(N0),strategy:h0,originalArray:[...N0]}),W.set(N0,h0)}async function M4(N0,h0){let a0=n6(h0,N0),c0=await Y1(),L1=$([N0],[],c0),E1=Y({patch:L1,options:h0});await G(g,p,{axios:_,tableOptions:h}).patch(E1),Q.set(N0,{strategy:a0})}async function w4(N0,h0,a0){let c0;if(arguments.length<3)c0=!1;a0=n6({strategy:a0},N0),a0=Z1(N0,a0);let L1=Q.get(N0)?.json;if(!L1)return;let E1=await Y1(),l4=$([L1],[N0],E1);if(l4.length===0)return;let Q1=Y({patch:l4,options:{...h,...h0,strategy:a0,deduceStrategy:c0}}),C1=G(g,p,{axios:_,tableOptions:h}),{changed:f4,strategy:A6}=await C1.patch(Q1);T6(f4,[N0]),Q.set(N0,{json:X(N0),strategy:A6})}async function z6(N0,h0){b4(N0),h0=n6({strategy:h0},N0),h0=Z1(N0,h0);let a0=await Y1(),c0=P.filter;for(let E1=0;E1<a0.keys.length;E1++){let l4=a0.keys[E1].name,Q1=N0[l4];c0=c0.and(K0[l4].eq(Q1))}let L1=await Z0(c0,h0);for(let E1 in N0)delete N0[E1];if(L1.length===0)return;for(let E1 in L1[0])N0[E1]=L1[0][E1];Q.set(N0,{json:X(N0),strategy:h0}),W.set(N0,h0)}function K4(N0){let h0=Q.get(N0);if(!h0)return;let{strategy:a0}=h0;Q.set(N0,{json:X(N0),strategy:a0})}function b4(N0){let h0=Q.get(N0)?.json;if(!h0)return;let a0=X(h0);for(let c0 in N0)delete N0[c0];for(let c0 in a0)N0[c0]=a0[c0]}}}function L(){return new Proxy({},{get(E,M){return A(M)}})}function N(O,E){let M={sum:w,count:S,avg:j,max:C,min:k},R={get(I,v){if(v in M)return Reflect.get(...arguments);else return q=A(O+"_aggregate"),A(v)}},q,_=new Proxy(M,R),P=E(_);if(q)return q(P.self());else return P;function w(I){return A(O+"_aggregate")(I(A("")).groupSum())}function j(I){return A(O+"_aggregate")(I(A("")).groupAvg())}function C(I){return A(O+"_aggregate")(I(A("")).groupMax())}function k(I){return A(O+"_aggregate")(I(A("")).groupMin())}function S(I){return A(O+"_aggregate")(I(A("")).groupCount())}}function D(O,E){let M={sum:w,count:S,avg:j,max:C,min:k},R={get(I,v){if(v in M)return Reflect.get(...arguments);else return q=A(O+"_aggregate"),A(v)}},q,_=new Proxy(M,R),P=E(_);if(q)return q(P.self());else return P;function w(I){return A(O+"_aggregate")(I(A("")).sum())}function j(I){return A(O+"_aggregate")(I(A("")).avg())}function C(I){return A(O+"_aggregate")(I(A("")).max())}function k(I){return A(O+"_aggregate")(I(A("")).min())}function S(I){return A(O+"_aggregate")(I(A("")).count())}}function A(O,...E){function M(){let q=[];for(let w=0;w<arguments.length;w++)if(typeof arguments[w]==="function")q[w]=arguments[w](L(O.split(".").slice(0,-1).join(".")));else q[w]=arguments[w];q=E.concat(Array.prototype.slice.call(q));let _={path:O,args:q};return new Proxy(_,{get(w,j){if(j==="toJSON")return _.toJSON;else if(j==="then")return;if(j in _)return Reflect.get(...arguments);else return A(j,_)}})}return new Proxy(M,{get(q,_){if(_==="toJSON")return Reflect.get(...arguments);else if(_==="then")return;else{let P=O?O+".":"";return A(P+_)}}})}function B(O,E){let M=!1,R={get(q,_,P){let w=Reflect.get(q,_,P);if(typeof w==="object"&&w!==null)return new Proxy(w,R);return w},set(q,_,P,w){if(!M)M=!0,E(JSON.stringify(q));return Reflect.set(q,_,P,w)},deleteProperty(q,_){if(!M)M=!0,E(JSON.stringify(q));return Reflect.deleteProperty(q,_)}};return new Proxy(O,R)}return TN0=F(),TN0}var IN0,CT1;function ZW(){if(CT1)return IN0;CT1=1;let{newBoolean:$}=by1();return IN0=$,IN0}var CN0,ST1;function qB(){if(ST1)return CN0;ST1=1;function $(Y,X,G){if(X.encode.safe)return X.encode.safe(Y,G);else return X.encode(Y,G)}return CN0=$,CN0}var SN0,kT1;function f5(){if(kT1)return SN0;kT1=1;let $=Kw();function Y(X,G){let J=$(X);if(!J)throw Error("Rdb transaction is no longer available. Is promise chain broken ?");return(J.quote||(()=>`"${G}"`))(G)}return SN0=Y,SN0}var kN0,vT1;function KY8(){if(vT1)return kN0;vT1=1;var $=ZW(),Y=" is ",X=qB(),G=f5();function J(Q,W,K,Z){var H="=",z=X(Q,W,K);if(z.sql()=="null")H=Y;var V=G(Q,Z)+"."+G(Q,W._dbName)+H,F=z.prepend(V);return $(F)}return kN0=J,kN0}var vN0,xT1;function ZY8(){if(xT1)return vN0;xT1=1;var $=ZW(),Y=qB(),X=" is not ",G=f5();function J(Q,W,K,Z){var H="<>",z=Y(Q,W,K);if(z.sql()=="null")H=X;var V=G(Q,Z)+"."+G(Q,W._dbName)+H,F=z.prepend(V);return $(F)}return vN0=J,vN0}var xN0,yT1;function UY8(){if(yT1)return xN0;yT1=1;var $=ZW(),Y=qB(),X=f5();function G(J,Q,W,K){var Z="<",H=Y(J,Q,W),z=X(J,K)+"."+X(J,Q._dbName)+Z,V=H.prepend(z);return $(V)}return xN0=G,xN0}var yN0,bT1;function HY8(){if(bT1)return yN0;bT1=1;var $=ZW(),Y=qB(),X=f5();function G(J,Q,W,K){var Z="<=",H=Y(J,Q,W),z=X(J,K)+"."+X(J,Q._dbName)+Z,V=H.prepend(z);return $(V)}return yN0=G,yN0}var bN0,hT1;function zY8(){if(hT1)return bN0;hT1=1;var $=ZW(),Y=qB(),X=f5();function G(J,Q,W,K){var Z=">",H=Y(J,Q,W),z=X(J,K)+"."+X(J,Q._dbName)+Z,V=H.prepend(z);return $(V)}return bN0=G,bN0}var hN0,fT1;function VY8(){if(fT1)return hN0;fT1=1;var $=ZW(),Y=qB(),X=f5();function G(J,Q,W,K){var Z=">=",H=Y(J,Q,W),z=X(J,K)+"."+X(J,Q._dbName)+Z,V=H.prepend(z);return $(V)}return hN0=G,hN0}var fN0,gT1;function FY8(){if(gT1)return fN0;gT1=1;let $=Y9(),Y=ZW(),X=f5();function G(J,Q,W,K){let Z;if(W.length===0)return Z=$("1=2"),Y(Z);let H=`${X(J,K)}.${X(J,Q._dbName)} in (`,z=Q.encode,V=Array(W.length),F=[];for(let N=0;N<W.length;N++)V[N]=z(J,W[N]),F=[...F,...V[N].parameters];let L=`${H+V.map((N)=>N.sql()).join(",")})`;return Y($(L,F))}return fN0=G,fN0}var gN0,mT1;function uy1(){if(mT1)return gN0;mT1=1;function $(Y,X){if(X)return X;return Y._rootAlias||Y._dbName}return gN0=$,gN0}var mN0,uT1;function LY8(){if(uT1)return mN0;uT1=1;let $=g6();function Y(X,G,J,Q,W=!0){let K=$(X,"quote"),Z=K(Q._rootAlias||Q._dbName),H=K(J._dbName);return{expression:(z)=>W?`COALESCE(${G}(${Z}.${H}), 0) as ${K(z)}`:`${G}(${Z}.${H}) as ${K(z)}`,joins:[""]}}return mN0=Y,mN0}var uN0,pT1;function Ut(){if(pT1)return uN0;pT1=1;let $=g6();function Y(X,G,J){let Q=$(X,"quote");J=Q(J);var W="",K=G._formulaDiscriminators,Z=G._columnDiscriminators;return H(),z(),W;function H(){for(var F=0;F<K.length;F++){var L=K[F].replace("@this",J);V(),W+="("+L+")"}}function z(){for(var F=0;F<Z.length;F++){var L=Z[F].split("=");V(),W+=J+"."+Q(L[0])+"="+L[1]}}function V(){if(W)W+=" AND ";else W=" "}}return uN0=Y,uN0}var pN0,dT1;function DY8(){if(dT1)return pN0;dT1=1;var $=Ut();function Y(X,G,J){var Q=$(X,G,J);if(Q)return" AND"+Q;return Q}return pN0=Y,pN0}var dN0,cT1;function Zw(){if(cT1)return dN0;cT1=1;let $=DY8(),Y=Y9(),X=g6();function G(J,Q,W,K,Z,H,z){let V=X(J,"quote"),F=Z,L=H;Z=V(F),H=V(L);var N="",D="";for(var A=0;A<W.length;A++)B(A),D=" AND ";function B(E){var M=W[E],R=K[E];N+=D+Z+"."+V(M._dbName)+"="+H+"."+V(R._dbName)}N+=$(J,Q,L);var O=Y(N);if(z)O=O.append(D).append(z);return O}return dN0=G,dN0}var cN0,lT1;function NY8(){if(lT1)return cN0;lT1=1;var $=hG(),Y=Zw();let X=g6();function G(Q,W,K,Z,H=!0){let z=X(Q,"quote"),V=$(Q),F="y"+V.aggregateCount++,L=z(F),N=z("x"),D=M(Z),A=` LEFT JOIN (SELECT ${D},${W}(${N}.${z(K._dbName)}) as amount`,B=J(Q,Z,F),O=` FROM ${z(Z._dbName)} ${N} GROUP BY ${D}) ${L} ON (${B})`,E=A+O;return{expression:(R)=>H?`COALESCE(${L}.amount, 0) as ${z(R)}`:`${L}.amount as ${R}`,joins:[E]};function M(R){return R._primaryColumns.map((q)=>`${N}.${z(q._dbName)}`).join(",")}}function J(Q,W,K){let Z=W._rootAlias||W._dbName,H=W._primaryColumns;return Y(Q,W,H,H,Z,K).sql()}return cN0=G,cN0}var lN0,iT1;function AY8(){if(iT1)return lN0;iT1=1;let $=KY8(),Y=ZY8(),X=UY8(),G=HY8(),J=zY8(),Q=VY8(),W=FY8(),K=uy1(),Z=f5(),H=LY8(),z=NY8();return lN0=function(V,F){var L={},N=K.bind(null,V);L._dbName=F,L.alias=F,V._aliases.add(F),L.dbNull=null,V._columns.push(L),V[F]=L,L.equal=function(A,B,O){return O=N(O),$(A,L,B,O)},L.notEqual=function(A,B,O){return O=N(O),Y(A,L,B,O)},L.lessThan=function(A,B,O){return O=N(O),X(A,L,B,O)},L.lessThanOrEqual=function(A,B,O){return O=N(O),G(A,L,B,O)},L.greaterThan=function(A,B,O){return O=N(O),J(A,L,B,O)},L.greaterThanOrEqual=function(A,B,O){return O=N(O),Q(A,L,B,O)},L.between=function(A,B,O,E){return E=N(E),B=L.greaterThanOrEqual(A,B,E),O=L.lessThanOrEqual(A,O,E),B.and(O)},L.in=function(A,B,O){return O=N(O),W(A,L,B,O)},L.eq=L.equal,L.EQ=L.eq,L.ne=L.notEqual,L.NE=L.ne,L.gt=L.greaterThan,L.GT=L.gt,L.ge=L.greaterThanOrEqual,L.GE=L.ge,L.lt=L.lessThan,L.LT=L.lt,L.le=L.lessThanOrEqual,L.LE=L.le,L.IN=L.in,L.self=D,L.groupSum=(A,...B)=>z.apply(null,[A,"sum",L,V,...B]),L.groupAvg=(A,...B)=>z.apply(null,[A,"avg",L,V,...B]),L.groupMin=(A,...B)=>z.apply(null,[A,"min",L,V,!1,...B]),L.groupMax=(A,...B)=>z.apply(null,[A,"max",L,V,!1,...B]),L.groupCount=(A,...B)=>z.apply(null,[A,"count",L,V,!1,...B]),L.sum=(A,...B)=>H.apply(null,[A,"sum",L,V,...B]),L.avg=(A,...B)=>H.apply(null,[A,"avg",L,V,...B]),L.min=(A,...B)=>H.apply(null,[A,"min",L,V,!1,...B]),L.max=(A,...B)=>H.apply(null,[A,"max",L,V,!1,...B]),L.count=(A,...B)=>H.apply(null,[A,"count",L,V,!1,...B]);function D(A){let B=Z(A,V._rootAlias||V._dbName),O=Z(A,L._dbName);return{expression:(E)=>`${B}.${O} ${Z(A,E)}`,joins:[""],column:L,groupBy:`${B}.${O}`}}return L},lN0}var BY8=RB(h78),iN0,nT1;function Ht(){if(nT1)return iN0;nT1=1;function $(Y){if(Y==null)return null;return Y}return iN0=$,iN0}var nN0,rT1;function OY8(){if(rT1)return nN0;rT1=1;var $=Y9(),Y=Ht();function X(G){var J=function(Q,W){if(W=Y(W),W==null){if(G.dbNull===null)return $("null");return $("'"+G.dbNull+"'")}return $("?",[W])};return J.unsafe=function(Q,W){if(W=Y(W),W==null){if(G.dbNull===null)return"null";return"'"+G.dbNull+"'"}return"'"+W+"'"},J.direct=function(Q,W){return W},J}return nN0=X,nN0}var rN0,aT1;function Uw(){if(aT1)return rN0;aT1=1;function $(Y){return function(X,G){if(G==Y.dbNull)return null;return G}}return rN0=$,rN0}var aN0,sT1;function py1(){if(sT1)return aN0;sT1=1;var $=ZW(),Y=" is ",X=f5();function G(J,Q,W,K,Z){Q=" "+Q+" ";var H=W.encode(J,K);if(H.sql()=="null")Q=Y;else H=W.encode(J,K+"%");var z=X(J,Z)+"."+X(J,W._dbName)+Q,V=H.prepend(z);return $(V)}return aN0=G,aN0}var sN0,oT1;function EY8(){if(oT1)return sN0;oT1=1;var $=py1();return sN0=(Y,...X)=>$.apply(null,[Y,"LIKE",...X]),sN0}var oN0,tT1;function dy1(){if(tT1)return oN0;tT1=1;let $=f5();var Y=ZW(),X=" is ";function G(J,Q,W,K,Z){Z=$(J,Z),Q=" "+Q+" ";var H=W.encode(J,K);if(H.sql()=="null")Q=X;else H=W.encode(J,"%"+K);var z=Z+"."+$(J,W._dbName)+Q,V=H.prepend(z);return Y(V)}return oN0=G,oN0}var tN0,eT1;function MY8(){if(eT1)return tN0;eT1=1;var $=dy1();return tN0=(Y,...X)=>$.apply(null,[Y,"LIKE",...X]),tN0}var eN0,$I1;function cy1(){if($I1)return eN0;$I1=1;let $=f5();var Y=ZW(),X=" is ";function G(J,Q,W,K,Z){Z=$(J,Z),Q=" "+Q+" ";var H=W.encode(J,K);if(H.sql()=="null")Q=X;else H=W.encode(J,"%"+K+"%");var z=Z+"."+$(J,W._dbName)+Q,V=H.prepend(z);return Y(V)}return eN0=G,eN0}var $A0,YI1;function RY8(){if(YI1)return $A0;YI1=1;var $=cy1();return $A0=(Y,...X)=>$.apply(null,[Y,"LIKE",...X]),$A0}var YA0,XI1;function qY8(){if(XI1)return YA0;XI1=1;var $=py1();return YA0=(Y,...X)=>$.apply(null,[Y,"ILIKE",...X]),YA0}var XA0,GI1;function PY8(){if(GI1)return XA0;GI1=1;var $=dy1();return XA0=(Y,...X)=>$.apply(null,[Y,"ILIKE",...X]),XA0}var GA0,JI1;function wY8(){if(JI1)return GA0;JI1=1;var $=cy1();return GA0=(Y,...X)=>$.apply(null,[Y,"ILIKE",...X]),GA0}var JA0,QI1;function _Y8(){if(QI1)return JA0;QI1=1;var $=ZW(),Y=" is ",X=qB();let G=f5();function J(Q,W,K,Z){var H=" ILIKE ",z=X(Q,W,K);if(z.sql()=="null")H=Y;var V=Z+"."+G(Q,W._dbName)+H,F=z.prepend(V);return $(F)}return JA0=J,JA0}var QA0,WI1;function jY8(){if(WI1)return QA0;WI1=1;var $=OY8(),Y=Uw(),X=EY8(),G=MY8(),J=RY8(),Q=qY8(),W=PY8(),K=wY8(),Z=_Y8(),H=Ht(),z=uy1();function V(F,L){L.tsType="StringColumn",L.purify=H,L.encode=$(L),L.decode=Y(L);var N=z.bind(null,F);L.startsWith=function(D,A,B){return B=N(B),X(D,L,A,B)},L.endsWith=function(D,A,B){return B=N(B),G(D,L,A,B)},L.contains=function(D,A,B){return B=N(B),J(D,L,A,B)},L.iStartsWith=function(D,A,B){return B=N(B),Q(D,L,A,B)},L.iEndsWith=function(D,A,B){return B=N(B),W(D,L,A,B)},L.iContains=function(D,A,B){return B=N(B),K(D,L,A,B)},L.iEqual=function(D,A,B){return B=N(B),Z(D,L,A,B)},L.iEq=L.iEqual,L.IEQ=L.iEqual,L.ieq=L.iEqual}return QA0=V,QA0}var WA0,KI1;function ly1(){if(KI1)return WA0;KI1=1;function $(Y){if(Y==null)return null;return Y}return WA0=$,WA0}var KA0,ZI1;function TY8(){if(ZI1)return KA0;ZI1=1;var $=Y9(),Y=ly1(),X=hG(),G=g6();function J(Q){let W=function(K,Z){var H=Y(Z);if(H==null){if(Q.dbNull===null)return $("null");return $("'"+Q.dbNull+"'")}var z=X(K),V=G(K,"encodeJSON")||((L)=>L),F=z.formatJSONIn;return $(F?F("?"):"?",[V(H)])};return W.unsafe=function(K,Z){var H=Y(Z);if(H==null){if(Q.dbNull===null)return"null";return"'"+Q.dbNull+"'"}var z=G(K,"encodeJSON")||((V)=>V);if(z)H=z(H);return H},W.direct=function(K,Z){var H=G(K,"encodeJSON")||((z)=>z);if(H)Z=H(Z);return Z},W}return KA0=J,KA0}var ZA0,UI1;function IY8(){if(UI1)return ZA0;UI1=1;let $=Uw(),Y=hG();function X(G){let J=$(G);return function(Q,W){if(W=J(Q,W),W===null)return W;if(typeof W!=="object"){let K=Y(Q).decodeJSON;if(K)return K(W);return W}return W}}return ZA0=X,ZA0}var UA0,HI1;function iy1(){if(HI1)return UA0;HI1=1;var $=g6();let Y=f5();function X(G,J,Q,W){var K=$(G,Q);if(K)return K(J,W);else if(W)return`${W}.${Y(G,J._dbName)}`;else return`${Y(G,J._dbName)}`}return UA0=X,UA0}var ny1=RB(fD0),HA0,zI1;function CY8(){if(zI1)return HA0;zI1=1;var $=TY8(),Y=IY8(),X=iy1(),G=ly1(),J=ny1;let Q=my1;function W(Z){Z.tsType="JSONColumn",Z.purify=G,Z.encode=$(Z),Z.decode=Y(Z),Z.formatOut=(H,...z)=>X.apply(null,[H,Z,"formatJSONOut",...z]),Z.onChange=J,Z.toDto=K}function K(Z){return Q(Z)}return HA0=W,HA0}var zA0,VI1;function ry1(){if(VI1)return zA0;VI1=1;function $(Y){if(Y==null)return null;var X=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;if(!X.test(Y))throw TypeError(Y+" is not a valid UUID");return Y}return zA0=$,zA0}var VA0,FI1;function SY8(){if(FI1)return VA0;FI1=1;var $=Y9(),Y=ry1();function X(G){let J=function(Q,W){var K=Y(W);if(K==null){if(G.dbNull===null)return $("null");return $("'"+G.dbNull+"'")}return $("'"+K+"'")};return J.unsafe=function(Q,W){var K=Y(W);if(K==null){if(G.dbNull===null)return"null";return"'"+G.dbNull+"'"}return"'"+K+"'"},J.direct=function(Q,W){return W},J}return VA0=X,VA0}var FA0,LI1;function kY8(){if(LI1)return FA0;LI1=1;function $(Y){return function(X,G){if(G==Y.dbNull)return null;return G.toLowerCase()}}return FA0=$,FA0}var LA0,DI1;function vY8(){if(DI1)return LA0;DI1=1;var $=SY8(),Y=kY8(),X=ry1();function G(J){J.tsType="UUIDColumn",J.purify=X,J.encode=$(J),J.decode=Y(J)}return LA0=G,LA0}var DA0,NI1;function xY8(){if(NI1)return DA0;NI1=1;var $=/(\d{4}-[01]\d-[0-3]\d(T| )[0-2]\d:[0-5]\d:[0-5]\d\.\d+)|(\d{4}-[01]\d-[0-3]\d(T| )[0-2]\d:[0-5]\d:[0-5]\d)|(\d{4}-[01]\d-[0-3]\d(T| )[0-2]\d:[0-5]\d)/,Y=/^\d{4}-[01]\d-[0-3]\d$/;function X(G){if($.test(G)||Y.test(G))return G;else throw TypeError(G+" is not a valid Date")}return DA0=X,DA0}var NA0,AI1;function zt(){if(AI1)return NA0;AI1=1;var $=xY8(),Y=Qw();function X(G){if(G==null)return null;if(G.toISOString)return Y(G);if(G.indexOf("Z")>-1)return Y(new Date(G));var J=$(G);if(J)return J;return G}return NA0=X,NA0}var AA0,BI1;function yY8(){if(BI1)return AA0;BI1=1;var $=Y9(),Y=zt(),X=hG(),G=g6();function J(K){var Z=function(H,z){if(z=Y(z),z==null){if(K.dbNull===null)return $("null");return $("'"+K.dbNull+"'")}var V=X(H),F=V.encodeDate||Q,L=V.formatDateIn;return $(L?L("?"):"?",[F(z)])};return Z.unsafe=function(H,z){if(z=Y(z),z==null){if(K.dbNull===null);return"'"+K.dbNull+"'"}var V=G(H,"encodeDate")||Q;return V(z)},Z.direct=function(H,z){var V=G(H,"encodeDate")||Q;return V(z)},Z}function Q(K){return K=K.toISOString?W(K.toISOString(K)):W(K),K}function W(K){let Z=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?/,H=K.match(Z);return H?H[0]:K}return AA0=J,AA0}var BA0,OI1;function ay1(){if(OI1)return BA0;OI1=1;var $=Uw(),Y=Qw();function X(G){var J=$(G);return function(Q,W){if(W=J(Q,W),W===null)return W;else if(typeof W==="string")return W.replace(" ","T").replace(" ","");return Y(W)}}return BA0=X,BA0}var OA0,EI1;function bY8(){if(EI1)return OA0;EI1=1;var $=g6();let Y=f5();function X(G,J,Q){var W=$(G,"formatDateOut");if(W)return W(J,Q);else if(Q)return`${Q}.${Y(G,J._dbName)}`;else return`${Y(G,J._dbName)}`}return OA0=X,OA0}var EA0,MI1;function RI1(){if(MI1)return EA0;MI1=1;var $=yY8(),Y=ay1(),X=bY8(),G=zt();function J(Q){Q.tsType="DateColumn",Q.purify=G,Q.encode=$(Q),Q.decode=Y(Q),Q.formatOut=(W,...K)=>X.apply(null,[W,Q,...K])}return EA0=J,EA0}var MA0,qI1;function hY8(){if(qI1)return MA0;qI1=1;var $=Y9(),Y=zt();function X(Q){var W=function(K,Z){if(Z=Y(Z),Z==null){if(Q.dbNull===null)return $("null");return $("'"+Q.dbNull+"'")}return $("?",[G(Z)])};return W.unsafe=function(K,Z){if(Z=Y(Z),Z==null){if(Q.dbNull===null)return"null";return"'"+Q.dbNull+"'"}return G(Z)},W.direct=function(K,Z){return G(Z)},W}function G(Q){if(Q.toISOString)return J(Q.toISOString(Q));return J(Q)}function J(Q){return Q}return MA0=X,MA0}var RA0,PI1;function fY8(){if(PI1)return RA0;PI1=1;var $=g6();let Y=f5();function X(G,J,Q){var W=$(G,"formatDateTzOut")||$(G,"formatDateOut");if(W)return W(J,Q);else if(Q)return`${Q}.${Y(G,J._dbName)}`;else return`${Y(G,J._dbName)}`}return RA0=X,RA0}var qA0,wI1;function gY8(){if(wI1)return qA0;wI1=1;var $=hY8(),Y=ay1(),X=fY8(),G=zt();function J(Q){Q.tsType="DateColumn",Q.purify=G,Q.encode=$(Q),Q.decode=Y(Q),Q.formatOut=(W,...K)=>X.apply(null,[W,Q,...K])}return qA0=J,qA0}var PA0,_I1;function sy1(){if(_I1)return PA0;_I1=1;function $(Y){if(Y==null)return null;let X=Number.parseFloat(Y);if(!isNaN(X))return X;if(typeof Y!=="number")throw Error("'"+Y+"' is not a number");return Y}return PA0=$,PA0}var wA0,jI1;function mY8(){if(jI1)return wA0;jI1=1;var $=sy1(),Y=Y9();return wA0=function(X){function G(J,Q){if(Q=$(Q),Q==null){var W=X.dbNull;return Y(""+W)}return Y(""+Q)}return G.unsafe=function(J,Q){if(Q=$(Q),Q==null){var W=X.dbNull;return""+W}return""+Q},G.direct=function(J,Q){return Q},G},wA0}var _A0,TI1;function uY8(){if(TI1)return _A0;TI1=1;var $=Uw();function Y(X){var G=$(X);return function(J,Q){if(Q=G(J,Q),Q===null)return Q;if(typeof Q!=="number")return parseFloat(Q);return Q}}return _A0=Y,_A0}var jA0,II1;function pY8(){if(II1)return jA0;II1=1;var $=mY8(),Y=uY8(),X=sy1();function G(J){J.tsType="NumberColumn",J.lazyDefault=0,J.purify=X,J.encode=$(J),J.decode=Y(J)}return jA0=G,jA0}var TA0,CI1;function dY8(){if(CI1)return TA0;CI1=1;var $=Y9(),Y=Ht(),X=hG(),G=g6();function J(W){var K=function(Z,H){if(H=Y(H),H==null){if(W.dbNull===null)return $("null");return $("'"+W.dbNull+"'")}var z=X(Z),V=z.encodeBigint||Q,F=z.formatBigintIn;return $(F?F("?"):"?",[V(H)])};return K.unsafe=function(Z,H){if(H=Y(H),H==null){if(W.dbNull===null);return"'"+W.dbNull+"'"}var z=G(Z,"encodeBigint")||Q;return z(H)},K.direct=function(Z,H){var z=G(Z,"encodeBigint")||Q;return z(H)},K}function Q(W){return W}return TA0=J,TA0}var IA0,SI1;function cY8(){if(SI1)return IA0;SI1=1;var $=Uw();function Y(X){var G=$(X);return function(J,Q){if(Q=G(J,Q),Q===null)return Q;if(typeof Q==="string")return Q;if(Q.toString)return Q.toString();return Q}}return IA0=Y,IA0}var CA0,kI1;function lY8(){if(kI1)return CA0;kI1=1;var $=dY8(),Y=cY8(),X=iy1(),G=Ht();function J(Q){Q.tsType="BigintColumn",Q.purify=G,Q.lazyDefault="0",Q.encode=$(Q),Q.decode=Y(Q),Q.formatOut=(W,...K)=>X.apply(null,[W,Q,"formatBigintOut",...K])}return CA0=J,CA0}var SA0,vI1;function bq0(){if(vI1)return SA0;vI1=1;function $(Y){if(Y===null||typeof Y>"u")return null;return Boolean(Y)}return SA0=$,SA0}var kA0,xI1;function iY8(){if(xI1)return kA0;xI1=1;var $=bq0(),Y=Y9(),X=g6();function G(Q){function W(K,Z){if(Z=$(Z),Z===null){if(Q.dbNull===null)return Y("null");return Y("'"+Q.dbNull+"'")}var H=X(K,"encodeBoolean")||J;return Y("?",[H(Z)])}return W.unsafe=function(K,Z){if(Z=$(Z),Z===null){if(Q.dbNull===null)return"null";return"'"+Q.dbNull+"'"}var H=X(K,"encodeBoolean")||J;return H(Z)},W.direct=function(K,Z){var H=X(K,"encodeBoolean")||J;return H(Z)},W}function J(Q){return Q}return kA0=G,kA0}var vA0,yI1;function nY8(){if(yI1)return vA0;yI1=1;var $=bq0();function Y(X){return function(G,J){if(J==X.dbNull)return null;return $(J)}}return vA0=Y,vA0}var xA0,bI1;function rY8(){if(bI1)return xA0;bI1=1;var $=iY8(),Y=nY8(),X=bq0();function G(J){J.tsType="BooleanColumn",J.purify=X,J.lazyDefault=!1,J.encode=$(J),J.decode=Y(J)}return xA0=G,xA0}var yA0,hI1;function oy1(){if(hI1)return yA0;hI1=1;function $(Y){if(Y==null)return null;if(Buffer.isBuffer(Y))return Y.toString("base64");else if(typeof Y==="string")return Y;else throw Error("'"+Y+"' is not a base64")}return yA0=$,yA0}var bA0,fI1;function aY8(){if(fI1)return bA0;fI1=1;var $=oy1(),Y=Y9(),X=g6();function G(Q){function W(K,Z){if(Z=$(Z),Z===null)return Y("null");var H=X(K,"encodeBinary")||J;let z=H(Z);return Y("?",[z])}return W.unsafe=function(K,Z){if(Z=$(Z),Z===null)return"null";var H=X(K,"encodeBinary")||J;return H(Z)},W.direct=function(K,Z){var H=X(K,"encodeBinary")||J;return H(Z)},W}function J(Q){return Buffer.from(Q,"base64")}return bA0=G,bA0}var hA0,gI1;function sY8(){if(gI1)return hA0;gI1=1;var $=Uw(),Y=g6();function X(J){var Q=$(J);return function(W,K){var Z=Y(W,"decodeBinary")||G;if(K=Q(W,K),K===null)return K;else return Z(K)}}function G(J){return J.toString("base64")}return hA0=X,hA0}var fA0,mI1;function oY8(){if(mI1)return fA0;mI1=1;var $=aY8(),Y=sY8(),X=oy1();function G(J){J.tsType="BinaryColumn",J.purify=X,J.encode=$(J),J.decode=Y(J)}return fA0=G,fA0}var gA0,uI1;function tY8(){if(uI1)return gA0;uI1=1;let $=BY8;function Y(G,J){var Q={};return Q.string=function(){return jY8()(J,G),Q},Q.json=function(){return CY8()(G),Q},Q.guid=function(){return vY8()(G),Q},Q.uuid=Q.guid,Q.date=function(){return RI1()(G),Q},Q.date=function(){return RI1()(G),Q},Q.dateWithTimeZone=function(){return gY8()(G),Q},Q.numeric=function(W,K){return pY8()(G,W,K),Q},Q.bigint=function(){return lY8()(G),Q},Q.boolean=function(){return rY8()(G),Q},Q.binary=function(){return oY8()(G),Q},Q.default=function(W){return G.default=W,Q},Q.primary=function(){return G.isPrimary=!0,J._primaryColumns.push(G),Q},Q.as=function(W){var K=G.alias;return J._aliases.delete(K),J._aliases.add(W),delete J[K],J[W]=G,G.alias=W,Q},Q.dbNull=function(W){return G.dbNull=W,Q},Q.serializable=function(W){return G.serializable=W,Q},Q.notNull=function(){G._notNull=!0;function W(K){if(K===void 0||K===null){let Z=Error(`Column ${G.alias} cannot be null or undefined`);throw Z.status=400,Z}}return Q.validate(W)},Q.notNullExceptInsert=function(){G._notNullExceptInsert=!0;function W(K,Z,H){if(H)return;if(K===void 0||K===null)throw Error(`Column ${G.alias} cannot be null or undefined`)}return Q.validate(W)},Q.validate=function(W){let K=G.validate;if(K)G.validate=Z;else G.validate=W;function Z(){try{K.apply(null,arguments),W.apply(null,arguments)}catch(H){let z=Error(H.message||H);throw z.status=400,z}}return Q},Q.JSONSchema=function(W,K){let Z=G.validate,z=new $(K).compile(W);G.validate=V;function V(){if(Z)Z.apply(null,arguments);if(!z.apply(null,arguments)){let L=Error(`Column ${J._dbName}.${G._dbName} violates JSON Schema: ${X(z.errors)}`);throw L.errors=z.errors,L.status=400,L}}return Q},Q}function X(G){return JSON.stringify(G,null,2)}return gA0=Y,gA0}var mA0,pI1;function hq0(){if(pI1)return mA0;pI1=1;function $(){var Y={},X=[];for(var G=0;G<arguments.length;G++)X.push(arguments[G]);var J=[X];return Y.addRange=function(Q){J.push(Q)},Y.add=function(Q){Y.addRange([Q])},Y.toArray=function(){var Q=[];return Y.forEach(W),Q;function W(K){Q.push(K)}},Y.forEach=function(Q){var W=0;for(var K=0;K<J.length;K++)J[K].forEach(Z);function Z(H){Q(H,W),W++}},Object.defineProperty(Y,"length",{enumerable:!1,get:function(){var Q=0;for(var W=0;W<J.length;W++)Q+=J[W].length;return Q}}),Y}return mA0=$,mA0}var uA0,dI1;function fq0(){if(dI1)return uA0;dI1=1;function $(){var Y=[],X={};return X.rows=Y,X.expand=function(G){Y.forEach(function(J){G.expand(J)})},X.add=function(G){Y.push(G)},X}return uA0=$,uA0}var pA0,cI1;function eY8(){if(cI1)return pA0;cI1=1;var $=hq0(),Y=fq0();function X(G){var J={},Q={};return Q.table=G.childTable,Q.legs=$(),Q.queryContext=Y(),J.span=Q,J.name=G.leftAlias,J.table=G.parentTable,J.columns=G.columns,J.expand=G.expand,J.accept=function(W){return W.visitJoin(J)},J}return pA0=X,pA0}var dA0,lI1;function gq0(){if(lI1)return dA0;lI1=1;function $(Y,X){var G={},J=arguments;X._primaryColumns.forEach(Q);function Q(W,K){G[W.alias]=J[K+2]}return X._cache.tryGet(Y,G)}return dA0=$,dA0}var cA0,iI1;function mq0(){if(iI1)return cA0;iI1=1;function $(Y,X){var G=X._primaryColumns,J=arguments[2],Q=G[0].equal(Y,J);for(var W=2;W<G.length;W++){J=arguments[W+1];var K=G[W].equal(Y,J);Q=Q.and(Y,K)}return Q}return cA0=$,cA0}var lA0,nI1;function ty1(){if(nI1)return lA0;nI1=1;let $=g6();function Y(X,G,J,Q,W){let K=$(X,"quote"),Z=K(J),H=Q.columns;var z=G._columns,V="",F="";for(let D=0;D<z.length;D++){var L=z[D];if(!H||H.get(L))V=V+F+N(L)+" as "+K("s"+J+D),F=",";else if(!W)V=V+F+"null as "+K("s"+J+D),F=","}for(let D in Q.aggregates||{})V=V+F+Q.aggregates[D].expression(D),F=",";return V;function N(D){let A=D.formatOut?D.formatOut(X,Z):Z+"."+K(D._dbName);if(D.dbNull===null)return A;else{let B=D.encode.unsafe(X,D.dbNull);return`CASE WHEN ${A}=${B} THEN null ELSE ${A} END`}}}return lA0=Y,lA0}var iA0,rI1;function $X8(){if(rI1)return iA0;rI1=1;var $=ty1();function Y(G,J,Q,W){var K=J.span,Z=$(G,K.table,Q,K,W),H=X(G,K,Q,W);return","+Z+H}function X(G,J,Q,W){var K={},Z="";K.visitJoin=function(z){var V=Y(G,z,Q+z.name,W);Z=Z+V},K.visitOne=function(z){K.visitJoin(z)},K.visitMany=function(){},J.legs.forEach(H);function H(z){z.accept(K)}return Z}return iA0={joinLegToColumnSql:Y,newJoinedColumnSql:X},iA0}var nA0,aI1;function YX8(){if(aI1)return nA0;aI1=1;let{newJoinedColumnSql:$}=$X8();return nA0=$,nA0}var rA0,sI1;function ey1(){if(sI1)return rA0;sI1=1;var $=ty1(),Y=YX8();return rA0=function(X,G,J,Q,W){var K=$(X,G,Q,J,W),Z=Y(X,J,Q,W);return K+Z},rA0}var aA0,oI1;function oy(){if(oI1)return aA0;oI1=1;let $=Zw(),Y=g6();function X(G,J,Q,W,K,Z,H){let z=Y(G,"quote"),V=" JOIN "+z(J._dbName)+" "+z(Z)+" ON (";return $(G,J,Q,W,K,Z,H).prepend(V).append(")")}return aA0=X,aA0}var sA0,tI1;function XX8(){if(tI1)return sA0;tI1=1;var $=oy();function Y(X,G,J,Q){var W=G.columns,K=G.span.table;return $(X,K,W,K._primaryColumns,J,Q,G.span.where).prepend(" LEFT")}return sA0=Y,sA0}var oA0,eI1;function GX8(){if(eI1)return oA0;eI1=1;var $=XX8();function Y(X,G,J,Q,W){return $(G,J,Q,W).append(X(G,J.span,W))}return oA0=Y,oA0}var tA0,$C1;function JX8(){if($C1)return tA0;$C1=1;var $=oy();function Y(X,G,J,Q){var{table:W,columns:K}=G,Z=G.span.table;return $(X,Z,W._primaryColumns,K,J,Q,G.span.where).prepend(" LEFT")}return tA0=Y,tA0}var eA0,YC1;function QX8(){if(YC1)return eA0;YC1=1;var $=JX8();function Y(X,G,J,Q,W){return $(G,J,Q,W).append(X(G,J.span,W))}return eA0=Y,eA0}var $B0,XC1;function $b1(){if(XC1)return $B0;XC1=1;let $=GX8(),Y=QX8(),X=Y9();function G(J,Q,W=""){var K=X(""),Z,H={};H.visitJoin=function(F){K=$(G,J,F,W,Z).prepend(K)},H.visitOne=function(F){K=Y(G,J,F,W,Z).prepend(K)},H.visitMany=function(){};function z(F){Z=W+F.name,F.accept(H)}Q.legs.forEach(z);let V=new Set;for(let F in Q.aggregates){let L=Q.aggregates[F];for(let N of L.joins)if(!V.has(N))K=K.append(N),V.add(N)}return K}return $B0=G,$B0}var YB0,GC1;function uq0(){if(GC1)return YB0;GC1=1;var $=Ut(),Y=Y9();function X(G,J,Q,W){var K=" where",Z=Y(""),H=Q.sql(),z=$(G,J,W);if(H)Z=Q.prepend(K+" "),K=" AND";if(z)Z=Z.append(K+z);return Z}return YB0=X,YB0}var XB0,JC1;function WX8(){if(JC1)return XB0;JC1=1;function $(Y){if(!Y)return" ";if(Y.charAt(0)!==" ")return" "+Y;return Y}return XB0=$,XB0}var GB0,QC1;function KX8(){if(QC1)return GB0;QC1=1;var $=g6();function Y(X,G,J,Q){if(G._exclusive||Q){var W=$(X,"selectForUpdateSql");return W(X,J)}return""}return GB0=Y,GB0}var JB0,WC1;function ZX8(){if(WC1)return JB0;WC1=1;var $=ey1(),Y=$b1(),X=uq0(),G=WX8(),J=KX8(),Q=Y9(),W=f5();function K(Z,H,z,V,F,L,N,D,A,B){var O=W(Z,H._dbName),E=$(Z,H,V,F),M=Y(Z,V,F),R=X(Z,H,z,F),q=G(D),_=J(H,F,B);return Q("select"+q+" "+E+" from "+O+" "+W(Z,F)).append(L).append(M).append(R).append(N+A+_)}return JB0=K,JB0}var QB0,KC1;function ty(){if(KC1)return QB0;KC1=1;var $=Ww();function Y(X){if(X)return X;return $}return QB0=Y,QB0}var WB0,ZC1;function Yb1(){if(ZC1)return WB0;ZC1=1;let $=g6();function Y(X,G,J,Q,W){let K=$(X,"quote");J=K(J);var Z=[],H;if(Q){if(typeof Q==="string")Q=[Q];for(H=0;H<Q.length;H++){var z=V(Q[H]);F(z.name,z.direction)}}else{if(W)return W;for(H=0;H<G._primaryColumns.length;H++)F(G._primaryColumns[H].alias)}function V(D){var A=D.split(" "),B="";if(A.length>1)B=" "+A[1];return{name:A[0],direction:B}}function F(D,A){A=A||"";var B=L(D),O=N(D,B.alias);Z.push(J+"."+K(B._dbName)+O+A)}function L(D){var A=G[D]||G[D.split(/(-|#)>+/g)[0]];if(!A)throw Error(`Unable to get column on orderBy '${D}'. If jsonb query, only #>, #>>, -> and ->> allowed. Only use ' ' to seperate between query and direction. Does currently not support casting.`);return A}function N(D,A){if(!/(-|#)>+/g.test(D))return"";return D.replace(A,"")}return" order by "+Z.join(",")}return WB0=Y,WB0}var KB0,UC1;function pq0(){if(UC1)return KB0;UC1=1;var $=hG();function Y(X,G){let J=$(X).limit;if(J)return J(G);else return""}return KB0=Y,KB0}var ZB0,HC1;function dq0(){if(HC1)return ZB0;HC1=1;var $=hG();function Y(X,G){let{limitAndOffset:J}=$(X);if(J)return J(G);else return""}return ZB0=Y,ZB0}var UB0,zC1;function UX8(){if(zC1)return UB0;zC1=1;var $=ZX8(),Y=ty(),X=Yb1(),G=pq0(),J=dq0();function Q(W,K,Z,H,z,V,F,L,N){H=Y(H),L=X(W,Z,V,z.orderBy,L);var D=G(W,z),A=J(W,z),B=$(W,Z,H,z,V,F,L,D,A,N);return K.push(B),K}return UB0=Q,UB0}var HB0,VC1;function HX8(){if(VC1)return HB0;VC1=1;function $(Y,X){if(Y)Y.add(X)}return HB0=$,HB0}var zB0,FC1;function Xb1(){if(FC1)return zB0;FC1=1;function $(Y){return Y==="pg"||Y==="mysql"||Y==="sqlite"||Y==="mssql"||Y==="mssqlNative"||Y==="oracle"}return zB0=$,zB0}var VB0,LC1;function zX8(){if(LC1)return VB0;LC1=1;let $=g6();var Y=Y9();let X=Xb1();function G(J,Q,W,K,Z){let H=$(J,"quote"),z=$(J,"engine");var V=Y("UPDATE "+H(Q._dbName)+" SET"),F=" ";L(),N(),D(),A();function L(){for(var S in W){var I=W[S];let x=H(I._dbName),y=K._jsonUpdateState&&K._jsonUpdateState[S];if(y&&y.patches&&y.patches.length){let d=E(x,y.patches,I);V=V.append(F+x+"=").append(d)}else{var v=I.encode(J,K[S]);V=V.append(F+x+"=").append(v)}F=","}}function N(){F=" WHERE ";var S=Q._primaryColumns;for(var I=0;I<S.length;I++){var v=S[I],x=K[v.alias],y=v.encode(J,x);V=V.append(F+H(v._dbName)+"=").append(y),F=" AND "}}function D(){var S=Q._columnDiscriminators;if(S.length===0)return;S=F+S.join(" AND "),V=V.append(S)}function A(){let S=Z&&Z.columns;if(!S)return;for(let I in S){let v=S[I];if(!v||v.concurrency==="overwrite")continue;let x=Q[I];if(!x)continue;if(v.paths&&v.paths.length)for(let y=0;y<v.paths.length;y++){let d=v.paths[y],u=j(d.oldValue,x),b=P(d.path),g=_(H(x._dbName),b,d.oldValue);V=O(g,u)}else{let y=z==="mysql"&&x.tsType==="JSONColumn"?j(v.oldValue,x):x.encode(J,v.oldValue);V=B(x,y)}}}function B(S,I){let v=H(S._dbName);if(z==="pg")V=V.append(F+v+" IS NOT DISTINCT FROM ").append(I);else if(z==="mysql")V=V.append(F+v+" <=> ").append(I);else if(z==="sqlite")V=V.append(F+v+" IS ").append(I);else if(z==="sap"&&S.tsType==="JSONColumn")if(I.sql()==="null")V=V.append(F+v+" IS NULL");else{let x=Y("CONVERT(VARCHAR(16384), "+I.sql()+")",I.parameters);V=V.append(F+"CONVERT(VARCHAR(16384), "+v+")=").append(x)}else if(z==="oracle"&&S.tsType==="JSONColumn")if(I.sql()==="null")V=V.append(F+v+" IS NULL");else{let x=Y("JSON("+I.sql()+")",I.parameters),y=Y("JSON_EQUAL("+v+", "+x.sql()+")",x.parameters);V=V.append(F).append(y)}else if(I.sql()==="null")V=V.append(F+v+" IS NULL");else V=V.append(F+v+"=").append(I);return F=" AND ",V}function O(S,I){if(z==="pg")V=V.append(F).append(S).append(" IS NOT DISTINCT FROM ").append(I);else if(z==="mysql")V=V.append(F).append(S).append(" <=> ").append(I);else if(z==="sqlite")V=V.append(F).append(S).append(" IS ").append(I);else if(z==="oracle"){let v=S.sql().indexOf("JSON_QUERY(")===0;if(I.sql()==="null")V=V.append(F).append(S).append(" IS NULL");else if(v){let x=Y("JSON("+I.sql()+")",I.parameters),y=Y("JSON_EQUAL("+S.sql()+", "+x.sql()+")",S.parameters.concat(x.parameters));V=V.append(F).append(y)}else V=V.append(F).append(S).append("=").append(I)}else if(I.sql()==="null")V=V.append(F).append(S).append(" IS NULL");else V=V.append(F).append(S).append("=").append(I);return F=" AND ",V}function E(S,I,v){if(!X(z))return v.encode(J,K[v.alias]);let x=Y(S);for(let y=0;y<I.length;y++){let d=I[y];x=M(x,d,v)}return x}function M(S,I,v){let x=I.path||[],y=P(x);if(I.op==="remove")return q(S,y);return R(S,y,I.value,v)}function R(S,I,v,x){if(z==="pg"){let y=w(I.tokens),d=JSON.stringify(v===void 0?null:v),u="jsonb_set("+S.sql()+", "+y+", ?::jsonb, true)";return Y(u,S.parameters.concat([d]))}if(z==="mysql"){let y=JSON.stringify(v===void 0?null:v),d="JSON_SET("+S.sql()+", "+I.sql+", CAST(? AS JSON))";return Y(d,S.parameters.concat(I.parameters,[y]))}if(z==="sqlite"){let y=JSON.stringify(v===void 0?null:v),d="json_set("+S.sql()+", "+I.sql+", json(?))";return Y(d,S.parameters.concat(I.parameters,[y]))}if(z==="mssql"||z==="mssqlNative"){let y=C(v),d="JSON_MODIFY("+S.sql()+", "+I.sql+", "+y.sql()+")";return Y(d,S.parameters.concat(I.parameters,y.parameters))}if(z==="oracle"){let y=JSON.stringify(v===void 0?null:v),d="JSON_TRANSFORM("+S.sql()+", SET "+I.sql+" = JSON(?))";return Y(d,S.parameters.concat(I.parameters,[y]))}return x.encode(J,K[x.alias])}function q(S,I){if(z==="pg"){let v=w(I.tokens),x=S.sql()+" #- "+v;return Y(x,S.parameters)}if(z==="mysql"){let v="JSON_REMOVE("+S.sql()+", "+I.sql+")";return Y(v,S.parameters.concat(I.parameters))}if(z==="sqlite"){let v="json_remove("+S.sql()+", "+I.sql+")";return Y(v,S.parameters.concat(I.parameters))}if(z==="mssql"||z==="mssqlNative"){let v="JSON_MODIFY("+S.sql()+", "+I.sql+", NULL)";return Y(v,S.parameters.concat(I.parameters))}if(z==="oracle"){let v="JSON_TRANSFORM("+S.sql()+", REMOVE "+I.sql+")";return Y(v,S.parameters.concat(I.parameters))}return S}function _(S,I,v){if(z==="pg"){let x=S+" #> "+w(I.tokens);return Y(x)}if(z==="mysql"){let x="JSON_EXTRACT("+S+", "+I.sql+")";return Y(x,I.parameters)}if(z==="sqlite"){let x="json_extract("+S+", "+I.sql+")";return Y(x,I.parameters)}if(z==="mssql"||z==="mssqlNative"){let y=(k(v)?"JSON_QUERY":"JSON_VALUE")+"("+S+", "+I.sql+")";return Y(y,I.parameters)}if(z==="oracle"){let y=(k(v)?"JSON_QUERY":"JSON_VALUE")+"("+S+", "+I.sql+")";return Y(y,I.parameters)}return Y(S)}function P(S){let I=Array.isArray(S)?S:[];if(z==="pg")return{tokens:I,sql:w(I),parameters:[]};if(z==="oracle"){let x="$";for(let y=0;y<I.length;y++){let d=String(I[y]);if(/^\d+$/.test(d))x+="["+d+"]";else if(/^[A-Za-z_][A-Za-z0-9_]*$/.test(d))x+="."+d;else x+='["'+d.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")+'"]'}return{tokens:I,sql:"'"+x.replace(/'/g,"''")+"'",parameters:[]}}let v="$";for(let x=0;x<I.length;x++){let y=String(I[x]);if(/^\d+$/.test(y))v+="["+y+"]";else if(/^[A-Za-z_][A-Za-z0-9_]*$/.test(y))v+="."+y;else v+='["'+y.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")+'"]'}return{tokens:I,sql:"?",parameters:[v]}}function w(S){return"'{"+S.map((v)=>{let x=String(v);if(/^[A-Za-z0-9_]+$/.test(x))return x;return'"'+x.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")+'"'}).join(",")+"}'"}function j(S,I){if(z==="oracle"){if(S===null||S===void 0)return Y("null");if(k(S))return I.encode(J,S);if(typeof S==="boolean"||typeof S==="number")return Y("?",[String(S)]);return Y("?",[S])}if(z==="pg"){let v=JSON.stringify(S===void 0?null:S);return Y("?::jsonb",[v])}if(z==="mysql"){let v=JSON.stringify(S===void 0?null:S);return Y("CAST(? AS JSON)",[v])}if(z==="sqlite"){if(k(S)){let v=JSON.stringify(S);return Y("?",[v])}if(S===null||S===void 0)return Y("null");return Y("?",[S])}if(z==="mssql"||z==="mssqlNative"){if(k(S))return Y("JSON_QUERY(?)",[JSON.stringify(S)]);if(S===null||S===void 0)return Y("null");return Y("?",[String(S)])}return I.encode(J,S)}function C(S){if(k(S))return Y("JSON_QUERY(?)",[JSON.stringify(S)]);if(S===null||S===void 0)return Y("null");return Y("?",[S])}function k(S){return S&&typeof S==="object"}return V}return VB0=G,VB0}var FB0,DC1;function cq0(){if(DC1)return FB0;DC1=1;function $(Y){var X,G=Q;return J;function J(){return G([...arguments])}function Q(K){return X=Y.apply(null,K),G=W,X}function W(){return X}}return FB0=$,FB0}var LB0,NC1;function PB(){if(NC1)return LB0;NC1=1;function $(){return{}}return LB0=$,LB0}var DB0,AC1;function Vt(){if(AC1)return DB0;AC1=1;let $=sy();function Y(X,G){var J={};$.useProxy=!1;for(let Q in G){let W=X[Q];if(X._aliases.has(Q))if(W.toDto)J[Q]=W.toDto(G[Q]);else J[Q]=G[Q]}return $.useProxy=!0,J}return DB0=Y,DB0}var NB0,BC1;function VX8(){if(BC1)return NB0;BC1=1;let $=zX8(),Y=cq0(),X=PB();var G=ay();let J=Vt();function Q(H,z,V,F){return new W(H,z,V,F)}function W(H,z,V,F){this._table=z,this._row=F,this.__getCoreCommand=Y($.bind(null,H)),this._columnList=X(),this._columnList[V.alias]=V,this.onFieldChanged=this.onFieldChanged.bind(this),F.subscribeChanged(this.onFieldChanged),this._concurrencyState=void 0,this._concurrencySummary=void 0,this._usesReturning=!1}W.prototype.onFieldChanged=function(H,z){this._columnList[z.alias]=z},W.prototype.sql=function(){return this._getCoreCommand().sql()},Object.defineProperty(W.prototype,"parameters",{get:function(){return this._getCoreCommand().parameters}}),W.prototype._getCoreCommand=function(){return this.__getCoreCommand(this._table,this._columnList,this._row,this._concurrencyState)},W.prototype.endEdit=function(){this._concurrencyState=this._row._concurrencyState,delete this._row._concurrencyState;let H=this._getCoreCommand();if(delete this._row._jsonUpdateState,this._usesReturning=Boolean(H._usesReturning),this._concurrencySummary=K(this._concurrencyState),this._concurrencySummary.hasConcurrency)this.onResult=this._onConcurrencyResult.bind(this);this._row.unsubscribeChanged(this.onFieldChanged);let z=JSON.parse(JSON.stringify(J(this._table,this._row)));this._patch=G([JSON.parse(this._row._oldValues)],[z]),this._row._oldValues=JSON.stringify(z)},W.prototype.emitChanged=function(){return this._table._emitChanged({row:this._row,patch:this._patch})},W.prototype.matches=function(H){return this._row===H},Object.defineProperty(W.prototype,"disallowCompress",{get:function(){return this._table._emitChanged.callbacks.length>0}}),W.prototype._onConcurrencyResult=function(H){let z=Z(H,this._usesReturning);if(z===void 0)return;if(z===0&&this._concurrencySummary.hasOptimistic)throw Error("The row was changed by another user.")};function K(H){let z={hasConcurrency:!1,hasOptimistic:!1};if(!H||!H.columns)return z;for(let V in H.columns){let F=H.columns[V];if(!F)continue;let L=F.concurrency||"optimistic";if(L==="overwrite")continue;if(z.hasConcurrency=!0,L==="optimistic")z.hasOptimistic=!0}return z}function Z(H,z){if(z&&Array.isArray(H))return H.length;if(Array.isArray(H)&&typeof H[0].rowsAffected==="number")return H[0].rowsAffected;if(!H||typeof H!=="object")return;if(typeof H.rowsAffected==="number")return H.rowsAffected}return NB0=Q,NB0}var AB0,OC1;function FX8(){if(OC1)return AB0;OC1=1;function $(Y){var X=Y[Y.length-1];if(X&&X.endEdit)X.endEdit()}return AB0=$,AB0}var BB0,EC1;function wB(){if(EC1)return BB0;EC1=1;var $=vq0(),Y=FX8();function X(G,J){var Q=$(G);Y(Q),Q.push(J)}return BB0=X,BB0}var OB0,MC1;function LX8(){if(MC1)return OB0;MC1=1;var $=vq0();function Y(X,G){var J=$(X),Q=J.length-1;if(Q>=0&&J[Q].matches)return J[Q].matches(G);return!1}return OB0=Y,OB0}var EB0,RC1;function DX8(){if(RC1)return EB0;RC1=1;var $=VX8(),Y=wB(),X=LX8();function G(J,Q,W,K){if(X(J,K))return;var Z=$(J,Q,W,K);Y(J,Z)}return EB0=G,EB0}var MB0,qC1;function Ft(){if(qC1)return MB0;qC1=1;function $(){var Y=[],X=function(){var G=Y.slice(0,Y.length),J=[];for(var Q=0;Q<G.length;Q++){var W=G[Q];J.push(W.apply(null,arguments))}return J};return X.add=function(G){if(!G)throw Error("missing callback");Y.push(G)},X.tryAdd=function(G){if(G)X.add(G)},X.remove=function(G){for(var J=0;J<Y.length;J++)if(Y[J]===G){Y.splice(J,1);return}},X.tryRemove=function(G){if(G)X.remove(G)},X.clear=function(){Y.splice(0,Y.length)},X.callbacks=Y,X}return MB0=$,MB0}var RB0,PC1;function NX8(){if(PC1)return RB0;PC1=1;function $(Y,X){let G;if(arguments.length===2&&Y!==void 0)return arguments[0];else if(arguments.length===2)G=arguments[1];else G=arguments[0];let J={},Q=G._relations,W,K={};K.visitJoin=function(){},K.visitMany=function(Z){J[W]=$(Z.childTable)},K.visitOne=K.visitMany;for(W in Q)Q[W].accept(K);return J}return RB0=$,RB0}var qB0,wC1;function Gb1(){if(wC1)return qB0;wC1=1;var $=PB()();function Y(X){if(X)return X;return $}return qB0=Y,qB0}var PB0,_C1;function Jb1(){if(_C1)return PB0;_C1=1;var $=PB();function Y(X,G){var J=G._relations,Q,W={};W.visitJoin=function(){},W.visitOne=function(Z){var H=$();X[Q]=H,Y(H,Z.childTable)},W.visitMany=W.visitOne;for(Q in J){var K=J[Q];K.accept(W)}return X}return PB0=Y,PB0}var wB0,jC1;function AX8(){if(jC1)return wB0;jC1=1;function $(Y,X,G,J){if(Array.isArray(X)){Q();return}if(X)W();function Q(){X.forEach(function(K){$(Y,K,G,J)})}function W(){var K=J._relations;for(var Z in G){var H=K[Z],z=H.getRowsSync(X);$(Y,z,G[Z],H.childTable)}J._cache.tryRemove(Y,X)}}return wB0=$,wB0}var _B0,TC1;function BX8(){if(TC1)return _B0;TC1=1;let $=Y9(),Y=ZW(),X=f5();function G(J,Q,W){let K=X(J,Q._primaryColumns[0]._dbName);W=X(J,W);let Z="SELECT "+W+"."+K+" FROM "+X(J,Q._dbName)+" "+W;return Z=$(Z),Y(Z)}return _B0=G,_B0}var jB0,IC1;function lq0(){if(IC1)return jB0;IC1=1;function $(Y,X){if(X===0)return Y._dbName;return"x"+X}return jB0=$,jB0}var TB0,CC1;function OX8(){if(CC1)return TB0;CC1=1;let $=oy(),Y=lq0();function X(G,J){let Q=J.length,W,K,Z="";function H(z){let V=z.childTable._primaryColumns,F=z.columns;Z+=" INNER"+$(G,z.childTable,F,V,W,K).sql()}return J.forEach(function(z,V){W="x"+(Q-V),K=Y(z.childTable,Q-V-1),H(z)}),Z}return TB0=X,TB0}var IB0,SC1;function EX8(){if(SC1)return IB0;SC1=1;var $=Zw();function Y(X,G,J,Q){var W,K=G.length,Z=G[0],H="x"+K,z=Z.childTable,V=Z.columns,F=z._primaryColumns;L();function L(){var N=Z.childTable,D=$(X,N,V,F,H,Q);if(J.sql())W=J.prepend(" AND ").prepend(D).prepend(" WHERE ");else W=D.prepend(" WHERE ")}return W}return IB0=Y,IB0}var CB0,kC1;function MX8(){if(kC1)return CB0;kC1=1;let $=BX8(),Y=OX8(),X=EX8(),G=lq0();function J(Q,W,K){let Z=W.length;if(Z===0)return K;let H=W[0].childTable,z=G(H,Z-1),V=$(Q,H,z).prepend("EXISTS ("),F=Y(Q,W.slice(1)),L=X(Q,W,K,z);return V.append(F).append(L).append(")")}return CB0=J,CB0}var SB0,vC1;function RX8(){if(vC1)return SB0;vC1=1;var $=g6(),Y=Y9();function X(G,J,Q,W,K){var Z={},H=$(G,"quote"),z=$(G,"engine"),V=L(K),F=Q.parameters?Q.parameters.slice():[];if(V&&V.parameters.length>0)F=F.concat(V.parameters);return Z.sql=function(){var B=Q.sql();if(V&&V.sql)if(B)B+=" AND "+V.sql;else B=V.sql;if(B)B=" where "+B;var O=$(G,"deleteFromSql");return O(J,W,B)},Z.parameters=F,Z;function L(B){let O=B&&B.columns;if(!O)return;let E=[],M=[];for(let R in O){let q=O[R];if(!q||q.concurrency==="overwrite")continue;let _=J[R];if(!_)continue;let P=z==="mysql"&&_.tsType==="JSONColumn"?D(q.oldValue,_):_.encode(G,q.oldValue),w=N(_,P);if(w.sql)E.push(w.sql());if(w.parameters.length>0)M.push(...w.parameters)}if(E.length===0)return;return{sql:E.join(" AND "),parameters:M}}function N(B,O){let E=H(B._dbName);if(z==="pg")return Y(E+" IS NOT DISTINCT FROM "+O.sql(),O.parameters);if(z==="mysql")return Y(E+" <=> "+O.sql(),O.parameters);if(z==="sqlite")return Y(E+" IS "+O.sql(),O.parameters);if(z==="sap"&&B.tsType==="JSONColumn"){if(O.sql()==="null")return Y(E+" IS NULL");let M=Y("CONVERT(VARCHAR(16384), "+O.sql()+")",O.parameters);return Y("CONVERT(VARCHAR(16384), "+E+")="+M.sql(),M.parameters)}if(z==="oracle"&&B.tsType==="JSONColumn"){if(O.sql()==="null")return Y(E+" IS NULL");let M=Y("JSON("+O.sql()+")",O.parameters);return Y("JSON_EQUAL("+E+", "+M.sql()+")",M.parameters)}if(O.sql()==="null")return Y(E+" IS NULL");return Y(E+"="+O.sql(),O.parameters)}function D(B,O){if(z==="oracle"){if(B===null||B===void 0)return Y("null");if(A(B))return O.encode(G,B);if(typeof B==="boolean"||typeof B==="number")return Y("?",[String(B)]);return Y("?",[B])}if(z==="pg"){let E=JSON.stringify(B===void 0?null:B);return Y("?::jsonb",[E])}if(z==="mysql"){let E=JSON.stringify(B===void 0?null:B);return Y("CAST(? AS JSON)",[E])}if(z==="sqlite"){if(A(B)){let E=JSON.stringify(B);return Y("?",[E])}if(B===null||B===void 0)return Y("null");return Y("?",[B])}if(z==="mssql"||z==="mssqlNative"){if(A(B))return Y("JSON_QUERY(?)",[JSON.stringify(B)]);if(B===null||B===void 0)return Y("null");return Y("?",[String(B)])}return O.encode(G,B)}function A(B){return B&&typeof B==="object"}}return SB0=X,SB0}var kB0,xC1;function qX8(){if(xC1)return kB0;xC1=1;var $=MX8(),Y=Ut(),X=ty(),G=RX8(),J=lq0();function Q(W,K,Z,H,z){var V=J(K,H.length);Z=X(Z),Z=$(W,H,Z);var F=Y(W,K,V);if(F!=="")Z=Z.and(W,F);return G(W,K,Z,V,z)}return kB0=Q,kB0}var vB0,yC1;function Qb1(){if(yC1)return vB0;yC1=1;var $=qX8();function Y(X,G,J,Q,W,K,Z){var H=$(X,J,Q,K,Z);for(var z in W){if(!(W[z]===null||W[z]))continue;var V=W[z],F=J._relations[z],L=F.joinRelation,N=[L].concat(K);Y(X,G,F.childTable,Q,V,N)}return G.push(H),G}return vB0=Y,vB0}var xB0,bC1;function PX8(){if(bC1)return xB0;bC1=1;var $=AX8(),Y=wB(),X=Qb1(),G=mq0(),J=ay(),Q=Vt();function W(H,z,V,F){var L=[];$(H,z,V,F);var N=[H,F];F._primaryColumns.forEach(function(q){N.push(z[q.alias])});var D=G.apply(null,N),A=z._concurrencyState;delete z._concurrencyState;var B=X(H,[],F,D,V,L,A);B.forEach(function(q){Y(H,q)});var O=B[0],E=K(A);if(E.hasConcurrency){var M=B[B.length-1];M.onResult=function(q){var _=Z(q);if(_===void 0)return;if(_===0&&E.hasOptimistic)throw Error("The row was changed by another user.")}}if(F._emitChanged.callbacks.length>0){O.disallowCompress=!0;var R=Q(F,z);let q=J([R],[]);O.emitChanged=F._emitChanged.bind(null,{row:z,patch:q})}}function K(H){let z={hasConcurrency:!1,hasOptimistic:!1};if(!H||!H.columns)return z;for(let V in H.columns){let F=H.columns[V];if(!F)continue;let L=F.concurrency||"optimistic";if(L==="overwrite")continue;if(z.hasConcurrency=!0,L==="optimistic")z.hasOptimistic=!0}return z}function Z(H){if(Array.isArray(H)&&typeof H[0].rowsAffected==="number")return H[0].rowsAffected;if(!H||typeof H!=="object")return;if(typeof H.rowsAffected==="number")return H.rowsAffected}return xB0=W,xB0}var yB0,hC1;function wX8(){if(hC1)return yB0;hC1=1;let $=sy(),Y=Kw();function X(Q,W,K,Z,H){let z;$.useProxy=!1;let V=Y(Q),F=V&&V.ignoreSerializable;if(H)z=J(K,Z,H,W,F);else z=G(K,Z,W,F);return $.useProxy=!0,z}async function G(Q,W,K,Z){let H={};if(!W)return;for(let z in K){if(!K[z])continue;let V=Q[z];if(Q._aliases.has(z)&&(Z||!(("serializable"in V)&&!V.serializable)&&W.propertyIsEnumerable(z)))if(V.toDto)H[z]=V.toDto(W[z]);else H[z]=W[z];else if(Q._relations[z]&&K[z]){let F,L=Q._relations[z];if(K&&!(K[z]||K[z]===null))continue;else if(!W.isExpanded(z))F=await W[z];else F=L.getRowsSync(W);if(!F)H[z]=F;else if(Array.isArray(F)){H[z]=[];for(let N=0;N<F.length;N++)H[z].push(await G(L.childTable,F[N],K&&K[z],Z))}else H[z]=await G(L.childTable,F,K&&K[z],Z)}}return H}function J(Q,W,K,Z,H){let z={};if(!W)return;for(let V in W){let F=Q[V];if(Q._aliases.has(V)&&(H||!(("serializable"in F)&&!F.serializable)))if(F.toDto)z[V]=F.toDto(W[V]);else z[V]=W[V];else if(Q._relations[V]){let L=Q._relations[V],N=L.joinRelation||L;if(!W.isExpanded(V)||K.has(N)||Z&&!(Z[V]||Z[V]===null))continue;let D=L.getRowsSync(W);if(!D)z[V]=D;else if(Array.isArray(D)){z[V]=[];for(let A=0;A<D.length;A++)z[V].push(J(L.childTable,D[A],new Set([...K,N]),Z&&Z[V],H))}else z[V]=J(L.childTable,D,new Set([...K,N]),Z&&Z[V],H)}}return z}return yB0=X,yB0}var bB0,fC1;function Wb1(){if(fC1)return bB0;fC1=1;function $(X,G,J=new Map){G={...G};for(let W in G)if(G[W]===null)G[W]=!0;let Q;for(let W in G)if(X._relations[W]&&!G[W])continue;else if(X._relations[W])G[W]=Y(X._relations[W],G[W],J);else if(X[W]&&X[W].eq){if(!J.has(X[W]))J.set(X[W],G[W]);Q=Q||G[W]}for(let W=0;W<X._columns.length;W++){let K=X._columns[W];G[K.alias]=!Q}return X._primaryColumns.forEach((W)=>{G[W.alias]=!0}),J.forEach((W,K)=>G[K.alias]=W),G}function Y(X,G,J){let Q=new Map;if(!X.joinRelation)for(let K=0;K<X.columns.length;K++)J.set(X.columns[K],!0);else X.joinRelation.columns.forEach((K)=>{Q.set(K,!0)});let W=X.childTable;return $(W,G,Q)}return bB0=$,bB0}var hB0,gC1;function _X8(){if(gC1)return hB0;gC1=1;let $=DX8(),Y=Ft(),X=NX8(),G=Gb1(),J=Jb1(),Q=PX8(),W=PB(),K=wX8(),Z=Vt(),H=ny1,z=sy(),V=Kw(),F=Wb1();function L(N,D,A,B,O){let E=A||N._aliases,M=N._columns,R=M.length;if(D.offset===void 0)D.offset=0;let q=D.offset,_=Object.keys(D);for(let v=0;v<R;v++)P(v);D.offset+=R;function P(v){let x=M[v],y=x.purify,d=x.alias,u="__"+d;v=q+v;let b=_[v];Object.defineProperty(I.prototype,u,{get:function(){return this._dbRow[b]},set:function(g){let p=this[d];if(g=y(g),this._dbRow[b]=g,x.validate)x.validate(g,this._dbRow);$(this._context,N,x,this);let h=this._emitColumnChanged[d];if(h)h(this,x,g,p);this._emitChanged(this,x,g,p)}}),Object.defineProperty(I.prototype,d,{enumerable:!0,configurable:!1,get:function(){if(x.onChange&&z.useProxy&&(this[u]!==null&&this[u]!==void 0)&&typeof this[u]==="object"){if(!(d in this._proxies)){let g=this[u];this._proxies[d]=x.onChange(this._dbRow[b],()=>{if(this[u]!==H.target(g))return;this[u]=this._dbRow[b]})}return this._proxies[d]}return S(this[u])},set:function(g){if(x.onChange&&(this[u]!==null&&this[u]!==void 0)&&g&&typeof g==="object"){if(this[u]===H.target(g))return;this._proxies[d]=x.onChange(g,()=>{if(this[u]!==H.target(g))return;this[u]=this._dbRow[b]})}this[u]=g}})}w();function w(){let v=N._relations;for(let x in v)j(x)}function j(v){Object.defineProperty(I.prototype,v,{get:function(){return C(this,v)()}})}function C(v,x){let y=v._related[x];if(!y){let d=N._relations[x];y=d.toGetRelated(v._context,v),v._relationCacheMap.set(d,d.getInnerCache(v._context)),v._related[x]=y}return y}I.prototype.subscribeChanged=function(v,x){let y;if(x){y=this._emitColumnChanged[x]||(this._emitColumnChanged[x]=Y()),y.add(v);return}this._emitChanged.add(v)},I.prototype.unsubscribeChanged=function(v,x){if(x){this._emitColumnChanged[x].tryRemove(v);return}this._emitChanged.tryRemove(v)},I.prototype.toJSON=function(){return K(void 0,N,this,new Set)},I.prototype.hydrate=function(v,x){let y=V(v)?.engine,d=q;if(y==="sqlite")for(let b in x){if(typeof x[b]==="string"&&x[b].indexOf("12345678-1234-1234-1234-123456789012")===0)throw Error(x[b].split("12345678-1234-1234-1234-123456789012")[1]);let g=_[d];this._dbRow[g]=M[d].decode(v,x[b]),d++}else for(let u in x){let b=_[d];this._dbRow[b]=M[d].decode(v,x[u]),d++}},I.prototype.toDto=function(v){if(v===void 0)v=X(N);if(v=F(N,v),!V(this._context))return K(this._context,v,N,this,new Set);let x=K(this._context,v,N,this);return Promise.resolve().then(()=>x)},I.prototype.expand=function(v){let x=C(this,v);x.expanded=!0},I.prototype.isExpanded=function(v){return this._related[v]&&this._related[v].expanded},I.prototype.delete=function(v){v=G(v),Q(this._context,this,v,N)},I.prototype.cascadeDelete=function(){let v=J(W(),N);Q(this._context,this,v,N)},I.prototype.deleteCascade=I.prototype.cascadeDelete;function k(v,x){for(let u=0;u<R;u++){let b=q+u,g=_[b];if(x[g]!==void 0&&!O)x[g]=M[u].decode(v,x[g]);if(B&&M[u].validate)M[u].validate(x[g],x,O)}let y=new I(v,x);return new Proxy(y,{ownKeys:function(){return Array.from(E).concat(Object.keys(y._related).filter((u)=>{return y._related[u]&&y._related[u].expanded}))},getOwnPropertyDescriptor(u,b){if(N._aliases.has(b)||u._related[b])return{enumerable:E.has(b)||u._related[b]&&u._related[b].expanded,configurable:!0,writable:!0}}})}function S(v){if(v===void 0)return null;return v}function I(v,x){this._context=v,this._relationCacheMap=new Map,this._cache=N._cache.getInnerCache(v),this._dbRow=x,this._related={},this._emitColumnChanged={},this._emitChanged=Y(),this._proxies={},this._oldValues=JSON.stringify(Z(N,this))}return k}return hB0=L,hB0}var fB0,mC1;function Kb1(){if(mC1)return fB0;mC1=1;var $=_X8();function Y(X,G,J,Q,W,K){var Z=G._decodeDbRowCache;if(!Z)Z={},Object.defineProperty(G,"_decodeDbRowCache",{enumerable:!1,get:function(){return Z}});var H=(W?"v":"nv")+(K?":i":":u"),z=Z[H];if(!z){let V=new Set;if(G.columns)G.columns.forEach((F,L)=>{if(F)V.add(L.alias)});if(V.size===0)V=void 0;z=$(J,Q,V,W,K),Z[H]=z}return z(X,Q)}return fB0=Y,fB0}var gB0,uC1;function jX8(){if(uC1)return gB0;uC1=1;var $=HX8(),Y=Kb1();function X(G,J,Q){var W=J.table,K=Y(G,J,W,Q),Z=W._cache;if(!Z.tryGet(G,K)){var H=J.queryContext;$(H,K),Object.defineProperty(K,"queryContext",{writable:!0,configurable:!0,enumerable:!1}),K.queryContext=H}K=Z.tryAdd(G,K);var z={};z.visitOne=function(F){X(G,F.span,Q),F.expand(K)},z.visitJoin=function(F){X(G,F.span,Q),F.expand(K)},z.visitMany=function(){},J.legs.forEach(V);function V(F){F.accept(z)}return K}return gB0=X,gB0}var mB0,pC1;function ey(){if(pC1)return mB0;pC1=1;function $(Y){return Promise.resolve(Y)}return mB0=$,mB0}var uB0,dC1;function TX8(){if(dC1)return uB0;dC1=1;function $(X,G){if(X&&X.orderBy){var J=Y(X.orderBy);return G.sort(J)}return G}function Y(X){var G=[];if(typeof X==="string")X=[X];X.forEach(function(Q){var W=Q.split(" "),K=W[0],Z=W[1]||"asc";if(Z==="asc")G.push(H);else G.push(z);function H(V,F){if(V=V[K],F=F[K],V===F)return 0;if(V<F)return-1;return 1}function z(V,F){return H(F,V)}});function J(Q,W){for(var K=0;K<G.length;K++){var Z=G[K](Q,W);if(Z!==0)return Z}return 0}return J}return uB0=$,uB0}var pB0,cC1;function IX8(){if(cC1)return pB0;cC1=1;function $(Y){if(Y===0)return;if(Y%1000===0)return Promise.resolve();return}return pB0=$,pB0}var dB0,lC1;function Zb1(){if(lC1)return dB0;lC1=1;var $=ey(),Y=TX8(),X=IX8();function G(){var Q=[];Object.defineProperty(Q,"toDto",{enumerable:!1,writable:!0,value:W}),Object.defineProperty(Q,"__toDto",{enumerable:!1,writable:!0,value:J});async function W(){let K=[];for(let Z=0;Z<Q.length;Z++)K.push(await Q[Z].toDto.apply(Q[Z],arguments));return K}return Q}function J(Q){var W=arguments,K=[],Z=this.length,H=this,z=-1;return $().then(V);function V(){if(z++,z===Z)return Y(Q,K);var F=H[z];return L().then(N).then(V);function L(){return F.__toDto.apply(F,W)}function N(D){return K.push(D),X(z)}}}return dB0=G,dB0}var cB0,iC1;function CX8(){if(iC1)return cB0;iC1=1;var $=jX8(),Y=Zb1();function X(G,J,Q){var W=Y();for(var K=0;K<Q.length;K++){var Z=$(G,J,Q[K]);W.push(Z)}return W}return cB0=X,cB0}var lB0,nC1;function SX8(){if(nC1)return lB0;nC1=1;var $=CX8();async function Y(J,Q,W){let K=await W[0].then(Z);return await X(G(Q),K),K;function Z(H){return $(J,Q,H)}}async function X(J,Q){if(!Q)return;if(!Array.isArray(Q))Q=[Q];for(let W in J){if(!(J[W]===null||J[W]))continue;for(let K=0;K<Q.length;K++)await X(J[W],await Q[K][W])}}function G(J){let Q={};return J.legs.forEach((W)=>{Q[W.name]=G(W.span)}),Q}return lB0=Y,lB0}var iB0,rC1;function iq0(){if(rC1)return iB0;rC1=1;var $=hq0(),Y=fq0(),X=Wb1();function G(J,Q){var W={};return W.aggregates={},W.legs=$(),W.table=J,Q=X(J,Q),K(J,W,Q),W.queryContext=Y(),W.queryContext.strategy=Q,W;function K(H,z,V){let F=new Map;var L=z.legs;if(!V)return;for(var N in V){if(H._relations[N]&&!V[N])continue;if(H._relations[N])Z(L,H,V,N);else if(V[N]?.expression&&(V[N]?.joins||V[N]?.join||V[N]?.column))z.aggregates[N]=V[N];else if(H[N]&&H[N].eq)F.set(H[N],V[N]);else z[N]=V[N]}z.columns=F}function Z(H,z,V,F){var L=z._relations[F],N=L.toLeg();N.span.queryContext.strategy=V,N.span.where=V[F].where,N.span.aggregates={},H.add(N);var D=V[F],A=L.childTable;K(A,N.span,D)}}return iB0=G,iB0}var nB0,aC1;function Ub1(){if(aC1)return nB0;aC1=1;let $=UX8(),Y=QZ(),X=SX8(),G=iq0(),J=Y9()(),Q=y2();function W(Z,H,z,V){return K(Z,H,z,V)}async function K(Z,H,z,V,F){let L=H._dbName,N;z=Q(Z,z,H);let D=G(H,V),A=$(Z,[],H,z,D,L,J,N,F),B=await Y(Z,A);return X(Z,D,B)}return W.exclusive=function(Z,H,z){return K(Z,H,z,!0)},nB0=W,nB0}var rB0,sC1;function Hb1(){if(sC1)return rB0;sC1=1;var $=Ub1();function Y(J,Q,W,K){return K=G(K),$(J,Q,W,K).then(X)}function X(J){if(J.length>0)return J[0];return null}Y.exclusive=function(J,Q,W,K){return K=G(K),$.exclusive(J,Q,W,K).then(X)};function G(J){return{...J,...{limit:1}}}return rB0=Y,rB0}var aB0,oC1;function zb1(){if(oC1)return aB0;oC1=1;function $(Y,X){var G=X._primaryColumns.length+3;if(arguments.length===G)return arguments[G-1];return}return aB0=$,aB0}var sB0,tC1;function Vb1(){if(tC1)return sB0;tC1=1;var $=mq0(),Y=Hb1(),X=zb1();function G(J){var Q=$.apply(null,arguments),W=arguments[1],K=X.apply(null,arguments);return Y(J,W,Q,K)}return G.exclusive=function(Q){var W=$.apply(null,arguments),K=arguments[1],Z=X.apply(null,arguments);return Y.exclusive(Q,K,W,Z)},sB0=G,sB0}var oB0,eC1;function kX8(){if(eC1)return oB0;eC1=1;let $=Vb1();function Y(G,J,...Q){return $.apply(null,arguments).then((W)=>X(J,W,Q))}Y.exclusive=function(G,...J){return $.exclusive.apply(null,arguments).then((Q)=>X(G,Q,J))};function X(G,J,Q){if(J===null)throw Error(`${G._dbName}: Row with id ${Q} not found.`);return J}return oB0=Y,oB0}var tB0,$S1;function Fb1(){if($S1)return tB0;$S1=1;let $=gq0(),Y=kX8(),X=ey(),G=zb1();async function J(){let W=G.apply(null,arguments),K=$.apply(null,arguments);if(K)return await Q(K,W),X(K);return Y.apply(null,arguments)}J.exclusive=Y.exclusive;async function Q(W,K){if(!W)return;if(!Array.isArray(W))W=[W];for(let Z in K){if(!(K[Z]===null||K[Z]))continue;for(let H=0;H<W.length;H++)await Q(await W[H][Z],K[Z])}}return tB0=J,tB0}var eB0,YS1;function vX8(){if(YS1)return eB0;return YS1=1,eB0=fy1()(null),eB0}var $O0,XS1;function nq0(){if(XS1)return $O0;XS1=1;function $(Y,X,G){function J(){if(J.expanded)return G.getFromCache(X);if(X.queryContext)return G.getRelatives(Y,X).then(W);return G.getFromDb(Y,X).then(Q);function Q(K){return J.expanded=!0,K}function W(){return G.getFromCache(X)}}return J}return $O0=$,$O0}var YO0,GS1;function Lb1(){if(GS1)return YO0;GS1=1;function $(Y,X,G){var J=X.joinRelation;if(!J||!J.leftAlias)return;var Q=G.find(function(W){return W.queryContext});if(Q)Q.queryContext.expand(J)}return YO0=$,YO0}var XO0,JS1;function xX8(){if(JS1)return XO0;JS1=1;var $=mq0(),Y=Ww(),X=Lb1();function G(W,K,Z){var H=K.queryContext;let z=H&&H.strategy[Z.leftAlias];var V=Y;if(Z.columns.length===1)F();else L();function F(){var D=[],A,B,O=Z.columns[0].alias;for(var E=0;E<H.rows.length;E++)if(A=H.rows[E],B=A[O],!Q(B))D.push(B);if(D.length>0)V=Z.childTable._primaryColumns[0].in(W,D)}function L(){var D;for(var A=0;A<H.rows.length;A++)if(D=J(W,H.rows[A],Z),D)V=V.or(W,D)}return Z.childTable.getMany(V,z).then(N);function N(D){return H.expand(Z),X(K,Z,D),D}}function J(W,K,Z){var H=Z.columns.map(function(V){return K[V.alias]});if(H.some(Q))return;var z=[W,Z.childTable].concat(H);return $.apply(null,z)}function Q(W){return W===null||W===void 0}return XO0=G,XO0}var GO0,QS1;function rq0(){if(QS1)return GO0;QS1=1;function $(Y){if(Y!==void 0&&Y!==null)Object.defineProperty(Y,"then",{value:X,writable:!0,enumerable:!1,configurable:!0});return Y;function X(G){delete Y.then,G(Y)}}return GO0=$,GO0}var JO0,WS1;function yX8(){if(WS1)return JO0;WS1=1;var $=eY8(),Y=Fb1(),X=vX8(),G=nq0(),J=xX8(),Q=rq0();function W(K,Z,H){var z={};z.parentTable=K,z.childTable=Z,z.columns=[];var V=K._columns;return F(),z.accept=function(A){A.visitJoin(z)},z.toLeg=function(){return $(z)},z.getFromDb=function(A){var B=D(A);if(B.length===0)return X;var O=[Z].concat(B);return Y.apply(null,O)},z.getFromCache=function(A){var B=z.getRowsSync(A);return Q(B)},z.toGetRelated=function(A){return G(A,z)},z.getRelatives=function(A){return J(A,z)},z.expand=function(A){A.expand(z.leftAlias)},z.getRowsSync=function(A){var B=N(A);return A._relationCacheMap.get(z).tryGet(B)},z.getInnerCache=function(){return Z._cache.getInnerCache()},z.notNullExceptInsert=function(){return z},z.notNull=function(){return z},z;function F(){var A=H.length;for(var B=0;B<V.length;B++){var O=V[B];if(L(O),A===z.columns.length)return}}function L(A){for(var B=0;B<H.length;B++){var O=H[B];if(A._dbName===O){A.default=void 0,z.columns.push(A);return}}}function N(A){let B={};for(let O=0;O<z.columns.length;O++){let E=A[z.columns[O].alias];if(E===null||E===void 0)return{};B[Z._primaryColumns[O].alias]=E}return B}function D(A){let B=[];for(let O=0;O<z.columns.length;O++){let E=A[z.columns[O].alias];if(E===null||E===void 0)return[];B.push(E)}return B}}return JO0=W,JO0}var QO0,KS1;function bX8(){if(KS1)return QO0;KS1=1;var $=Y9(),Y=ZW();let X=g6();function G(J,Q,W){let K=X(J,"quote"),Z=K(W),H=K(Q._primaryColumns[0]._dbName),z="SELECT "+Z+"."+H+" FROM "+K(Q._dbName)+" "+Z,V=$(z);return Y(V)}return QO0=G,QO0}var WO0,ZS1;function aq0(){if(ZS1)return WO0;ZS1=1;var $=oy(),Y=Y9();function X(G,J,Q=0){var W,K,Z,H={},z=Y("");H.visitJoin=function(F){z=$(G,F.parentTable,F.childTable._primaryColumns,F.columns,W,K).prepend(" INNER").prepend(z)},H.visitOne=function(F){V(F)},H.visitMany=H.visitOne;function V(F){var L=F.joinRelation,N=L.childTable,D=N._primaryColumns,A=L.columns;z=$(G,N,A,D,W,K).prepend(" INNER").prepend(z)}for(let F=J.length-1;F>Q;F--)W="x"+(F+1),K="x"+F,Z=J[F],Z.accept(H);return z}return WO0=X,WO0}var KO0,US1;function hX8(){if(US1)return KO0;US1=1;var $=Zw();function Y(X,G,J,Q=0){let W=G[Q];var K={},Z;K.visitJoin=function(z){var V=z.childTable,F=Q===0?z.parentTable._rootAlias||z.parentTable._dbName:"x"+Q,L=z.columns,N=V._primaryColumns;H(F,L,N)},K.visitOne=function(z){var V=z.joinRelation,F=V.columns,L=V.childTable,N=L._primaryColumns,D=Q===0?L._rootAlias||L._dbName:"x"+Q;H(D,N,F)},K.visitMany=K.visitOne;function H(z,V,F){var L=W.childTable,N=$(X,L,V,F,z,"x"+(Q+1));if(J&&J.sql())Z=N.prepend(" WHERE ").append(" AND ").append(J);else Z=N.prepend(" WHERE ")}return W.accept(K),Z}return KO0=Y,KO0}var ZO0,HS1;function $b(){if(HS1)return ZO0;HS1=1;var $=bX8(),Y=aq0(),X=hX8();function G(J,Q,W,K){var Z=Q.length,H="x"+Z,z=Q[Z-1].childTable,V=$(J,z,H).prepend("EXISTS ("),F=Y(J,Q,K),L=X(J,Q,W,K);return V.append(F).append(L).append(")")}return ZO0=G,ZO0}var UO0,zS1;function fX8(){if(zS1)return UO0;zS1=1;var $=aq0(),Y=hG(),X=Zw();let G=g6();function J(W,K,Z,H,z=!0){let V=G(W,"quote"),F=Y(W),L="y"+F.aggregateCount++,N=V(L),D=V("x"+H.length),A=q(H[0]),B=` LEFT JOIN (SELECT ${A},${K}(${D}.${V(Z._dbName)}) as amount`,O=H.length>1?$(W,H).sql():"",E=Q(W,H[0],L),M=` FROM ${V(H.at(-1).childTable._dbName)} ${D} ${O} GROUP BY ${A}) ${N} ON (${E})`,R=B+M;return{expression:(_)=>z?`COALESCE(${N}.amount, 0) as ${V(_)}`:`${N}.amount as ${_}`,joins:[R]};function q(_){let P,w=V("x1");if(_.joinRelation)P=_.joinRelation.columns;else P=_.childTable._primaryColumns;return P.map((j)=>`${w}.${V(j._dbName)}`).join(",")}}function Q(W,K,Z){var H={},z="";let V=K.parentTable._rootAlias||K.parentTable._dbName;H.visitJoin=function(L){z=X(W,L.childTable,L.columns,L.childTable._primaryColumns,V,Z).sql()},H.visitOne=function(L){F(L)},H.visitMany=H.visitOne;function F(L){var{joinRelation:N,childTable:D,parentTable:A}=L,B=N.columns;z=X(W,D,A._primaryColumns,B,V,Z).sql()}return K.accept(H),z}return UO0=J,UO0}var HO0,VS1;function gX8(){if(VS1)return HO0;VS1=1;let $=oy();function Y(X,G){let J=[],Q=G[0].parentTable._dbName,W="z",K,Z={};Z.visitJoin=function(H){K=$(X,H.childTable,H.columns,H.childTable._primaryColumns,Q,W).prepend(" LEFT").sql()},Z.visitOne=function(H){K=$(X,H.childTable,H.parentTable._primaryColumns,H.joinRelation.columns,Q,W).prepend(" LEFT").sql()},Z.visitMany=Z.visitOne;for(let H=0;H<G.length;H++)W=W+G[H].toLeg().name,G[H].accept(Z),J.push(K),Q=W;return J}return HO0=Y,HO0}var zO0,FS1;function mX8(){if(FS1)return zO0;FS1=1;let $=g6();var Y=gX8();function X(G,J,Q,W,K=!0){let Z=$(G,"quote"),H=W.reduce((V,F)=>{return V+F.toLeg().name},"z");H=Z(H);let z=Z(Q._dbName);return{expression:(V)=>K?`COALESCE(${J}(${H}.${z}), 0) as ${Z(V)}`:`${J}(${H}.${z}) as ${Z(V)}`,joins:Y(G,W)}}return zO0=X,zO0}var VO0,LS1;function uX8(){if(LS1)return VO0;LS1=1;var $=aq0(),Y=hG(),X=Zw();let G=g6(),J=f5();function Q(Z,H,z){let V=G(Z,"quote"),F=Y(Z),L="y"+F.aggregateCount++,N=V(L),D="x"+z.length,B=` LEFT JOIN (SELECT ${K(Z,z[0])},${D}.${V(H._dbName)} as prop`,O=z.length>1?$(Z,z).sql():"",E=W(Z,z[0],L),M=` FROM ${V(z.at(-1).childTable._dbName)} ${D} ${O}) ${N} ON (${E})`,R=B+M;return{expression:(q)=>`${N}.prop ${V(q)}`,joins:[R],column:H,groupBy:`${N}.prop`}}function W(Z,H,z){var V={},F="";let L=H.parentTable._rootAlias||H.parentTable._dbName;V.visitJoin=function(D){F=X(Z,D.childTable,D.columns,D.childTable._primaryColumns,L,z).sql()},V.visitOne=function(D){N(D)},V.visitMany=V.visitOne;function N(D){var{joinRelation:A,childTable:B,parentTable:O}=D,E=A.columns;F=X(Z,B,O._primaryColumns,E,L,z).sql()}return H.accept(V),F}function K(Z,H){let z,V="x1";if(H.joinRelation)z=H.joinRelation.columns;else z=H.childTable._primaryColumns;return z.map((F)=>`${V}.${J(Z,F._dbName)}`).join(",")}return VO0=Q,VO0}var FO0,DS1;function pX8(){if(DS1)return FO0;DS1=1;var $=$b(),Y=fX8(),X=mX8(),G=uX8();function J(Q,W,K,Z){var H={},z="x"+W.length;for(var V in Q){var F=Q[V];if(F instanceof Function)H[V]=L(F)}return H.groupSum=(N,...D)=>Y.apply(null,[N,"sum",Q,W,...D]),H.groupAvg=(N,...D)=>Y.apply(null,[N,"avg",Q,W,...D]),H.groupMin=(N,...D)=>Y.apply(null,[N,"min",Q,W,!1,...D]),H.groupMax=(N,...D)=>Y.apply(null,[N,"max",Q,W,!1,...D]),H.groupCount=(N,...D)=>Y.apply(null,[N,"count",Q,W,!1,...D]),H.sum=(N,...D)=>X.apply(null,[N,"sum",Q,W,...D]),H.avg=(N,...D)=>X.apply(null,[N,"avg",Q,W,...D]),H.min=(N,...D)=>X.apply(null,[N,"min",Q,W,!1,...D]),H.max=(N,...D)=>X.apply(null,[N,"max",Q,W,!1,...D]),H.count=(N,...D)=>X.apply(null,[N,"count",Q,W,!1,...D]),H.self=(N,...D)=>G.apply(null,[N,Q,W,...D]),H;function L(N){return D;function D(A){var B=[];for(var O=0;O<arguments.length;O++)B.push(arguments[O]);B.push(z);var E=N.apply(null,B);if(K)return E;return $(A,W,E,Z)}}}return FO0=J,FO0}var LO0,NS1;function dX8(){if(NS1)return LO0;NS1=1;let $=y2(),Y=$b(),X=!0;function G(J,Q,W){function K(Z,H){let z=J(Q,X,W+1),V=typeof H==="function"?H(z):H,F=$(Z,V);return Y(Z,Q,F,W)}return K}return LO0=G,LO0}var DO0,AS1;function cX8(){if(AS1)return DO0;AS1=1;let $=y2(),Y=$b(),X=!0;function G(J,Q,W){function K(Z,H){let z=J(Q,X,W+1),V=typeof H==="function"?H(z):H,F=$(Z,V),L=Y(Z,Q,F,W),N=Y(Z,Q,F.not(),W).not();return L.and(Z,N)}return K}return DO0=G,DO0}var NO0,BS1;function lX8(){if(BS1)return NO0;BS1=1;let $=y2();function Y(X,G){function J(W,K){let{relations:H,alias:z}=Q(!1,X),V=H[H.length-1].childTable;if(!H[0].isMany)V._rootAlias=z;try{let F=typeof K==="function"?K(V):K,L=$(W,F);return delete V._rootAlias,L}catch(F){throw delete V._rootAlias,F}}return J;function Q(W,K){let Z=K[0].toLeg().table._dbName,H=[];for(let z=0;z<K.length;z++)if(K[z].isMany&&!W)H=[K[z]],Z=K[z].toLeg().table._dbName;else H.push(K[z]),Z+=K[z].toLeg().name;return{relations:H,alias:Z}}}return NO0=Y,NO0}var AO0,OS1;function iX8(){if(OS1)return AO0;OS1=1;function $(Y){function X(J,Q){let{relations:K,alias:Z}=G(!1,Y),H=K[K.length-1].childTable;if(!K[0].isMany)H._rootAlias=Z;try{let z=Q(H);return delete H._rootAlias,z}catch(z){throw delete H._rootAlias,z}}return X;function G(J,Q){let W=Q[0].toLeg().table._dbName,K=[];for(let Z=0;Z<Q.length;Z++)if(Q[Z].isMany&&!J)K=[Q[Z]],W=Q[Z].toLeg().table._dbName;else K.push(Q[Z]),W+=Q[Z].toLeg().name;return{relations:K,alias:W}}}return AO0=$,AO0}var BO0,ES1;function nX8(){if(ES1)return BO0;ES1=1;let $=y2(),Y=$b(),X=!0;function G(J,Q,W){function K(Z,H){let z=J(Q,X,W+1),V=typeof H==="function"?H(z):H,F=$(Z,V);return Y(Z,Q,F,W).not()}return K}return BO0=G,BO0}var OO0,MS1;function sq0(){if(MS1)return OO0;MS1=1;var $=pX8(),Y=$b(),X=dX8(),G=cX8(),J=lX8(),Q=iX8(),W=nX8();function K(Z,H,z=0){var V=Z[Z.length-1].childTable,F=V._columns;let L;L=X(K,Z,z),L.all=G(K,Z,z),L.any=L,L.none=W(K,Z,z),L.where=J(Z,z),L._aggregate=Q(Z),Object.defineProperty(L,"_relation",{value:Z[Z.length-1],writable:!1});for(var N=0;N<F.length;N++){var D=F[N];if(D.alias==="name")L._name=$(D,Z,H,z);else L[D.alias]=$(D,Z,H,z)}A();function A(){var E=V._relations;for(var M in E)B(M)}function B(E){var M=V._relations[E],R=Z.slice(0);R.push(M),Object.defineProperty(L,E,{get:function(){return K(R,!1,z)}})}return L.exists=function(E){if(H)return"";return Y(E,Z,!1,z)},new Proxy(L,{get:function(E,M){if(M==="name")return E._name!==void 0?E._name:E.name;return E[M]},set:function(E,M,R){if(M==="name")E._name=R;else E[M]=R;return!0}})}return OO0=K,OO0}var EO0,RS1;function rX8(){if(RS1)return EO0;RS1=1;var $=yX8(),Y=sq0();function X(G,J){var Q={},W=[],K;Q.by=function(){for(var H=0;H<arguments.length;H++)W.push(Z(arguments[H]));return K=$(G,J,W),K.as=Q.as,K};function Z(H){var z=G._columns;for(var V=0;V<z.length;V++)if(z[V]._dbName===H||z[V].alias===H)return z[V]._dbName;throw Error("Unknown column: "+H)}return Q.as=function(H){return K.leftAlias=H,G._relations[H]=K,Object.defineProperty(G,H,{get:function(){return Y([K])}}),K},Q.notNullExceptInsert=function(){return Q},Q.notNull=function(){return Q},Q}return EO0=X,EO0}var MO0,qS1;function Db1(){if(qS1)return MO0;qS1=1;var $=hq0(),Y=fq0();function X(G){var J=G.joinRelation,Q={};Q.name=J.rightAlias;var W={};return W.queryContext=Y(),W.table=J.parentTable,W.legs=$(),Q.span=W,Q.table=J.childTable,Q.columns=J.columns,Q.expand=G.expand,Q.accept=function(K){K.visitOne(Q)},Q}return MO0=X,MO0}var RO0,PS1;function aX8(){if(PS1)return RO0;PS1=1;var $=Db1();function Y(X){var G=$(X);return G.name=X.joinRelation.rightAlias,G.accept=function(J){return J.visitMany(G)},G.expand=X.expand,G}return RO0=Y,RO0}var qO0,wS1;function Lt(){if(wS1)return qO0;wS1=1;function $(Y,X){var G=Y.childTable,J=G._primaryColumns,Q={};Y.columns.forEach(W);function W(K,Z){var H=J[Z];Q[H.alias]=X[K.alias]}return Q}return qO0=$,qO0}var PO0,_S1;function sX8(){if(_S1)return PO0;_S1=1;var $=Lt();function Y(X,G,J,Q,W){var K=J.columns;K.forEach(Z),W=null;function Z(V){W.subscribeChanged(z,V.alias)}function H(V){K.forEach(F);function F(L){V.unsubscribeChanged(z,L.alias)}}function z(V){H(V),G.tryRemove(X,Q,V);var F=$(J,V);G.tryAdd(X,F,V)}}return PO0=Y,PO0}var wO0,jS1;function oX8(){if(jS1)return wO0;jS1=1;var $=Lt();function Y(X,G,J){var Q=J.parentTable._cache;Q.subscribeAdded(X,W);function W(K){var Z=$(J,K);G(Z,K)}}return wO0=Y,wO0}var _O0,TS1;function tX8(){if(TS1)return _O0;TS1=1;var $=Lt();function Y(X,G,J){var Q=J.parentTable._cache;Q.subscribeRemoved(X,W);function W(K){var Z=$(J,K);G(Z,K)}}return _O0=Y,_O0}var jO0,IS1;function Nb1(){if(IS1)return jO0;IS1=1;var $=Ft();function Y(){var X=$(),G=$(),J={},Q={},W;return J.tryGet=function(K){var Z=0,H=K.length;return z(Q,Z);function z(V,F){var L=K[F],N=V[L];if(typeof N>"u")return null;if(H-1===F)return N;return z(V[L],++F)}},J.tryAdd=function(K,Z){var H=0;return W=K.length,z(Q,H);function z(V,F){var L=K[F];if(W-1===F){if(L in V)return V[L];return V[L]=Z,X(Z),Z}if(!(L in V))V[L]={};return z(V[L],++F)}},J.tryRemove=function(K){var Z=0,H=K.length;return z(Q,Z);function z(V,F){var L=K[F];if(!(L in V))return null;var N=V[L];if(H-1===F)return delete V[L],G(N),N;return z(V[L],++F)}},J.getAll=function(){var K=0,Z=[];H(Q,K);function H(z,V){for(var F in z){var L=z[F];if(V===W-1)Z.push(L);else H(L,V+1)}}return Z},J.subscribeAdded=X.add,J.subscribeRemoved=G.add,J}return jO0=Y,jO0}var TO0,CS1;function eX8(){if(CS1)return TO0;CS1=1;var $=Nb1(),Y=Zb1();function X(G){var J={},Q=$(),W=G.childTable._primaryColumns;J.tryGet=function(z){var V=H(z),F=Q.tryGet(V);if(!F)return Z();return F};function K(z,V){var F=H(z),L=Q.tryGet(F);if(L){L.push(V);return}var N=Z();N.push(V),L=Q.tryAdd(F,N)}function Z(){return Y(G.parentTable)}J.tryAdd=K,J.tryRemove=function(z,V){var F=H(z),L=Q.tryGet(F),N=L.indexOf(V);L.splice(N,1)};function H(z){return W.map(V);function V(F){return z[F.alias]}}return J}return TO0=X,TO0}var IO0,SS1;function UW(){if(SS1)return IO0;SS1=1;let{v4:$}=kq0;return IO0=$,IO0}var CO0,kS1;function Ab1(){if(kS1)return CO0;kS1=1;let $=g6();function Y(X,G){return $(X,"cache")[G]}return CO0=Y,CO0}var SO0,vS1;function Bb1(){if(vS1)return SO0;vS1=1;let $=g6();function Y(X,G,J){let Q=$(X,"cache");Q[G]=J}return SO0=Y,SO0}var kO0,xS1;function Ob1(){if(xS1)return kO0;xS1=1;var $=sX8(),Y=oX8(),X=tX8(),G=Lt(),J=eX8(),Q=UW(),W=Ab1(),K=Bb1();function Z(H){var z={},V;z.tryAdd=function(N,D,A){z.getInnerCache(N).tryAdd(D,A),$(N,z,H,D,A)},z.tryRemove=function(N,D,A){z.getInnerCache(N).tryRemove(D,A)},z.tryGet=function(N,D){return z.getInnerCache(N).tryGet(D)},z.getInnerCache=function(N){let D=L();var A=W(N,D);if(!A)A=J(H),K(N,D,A),F(N),Y(N,z.tryAdd.bind(null,N),H),X(N,z.tryRemove.bind(null,N),H);return A};function F(N){var D=H.parentTable,A=D._cache,B=A.getAll(N);B.forEach(O);function O(E){var M=G(H,E);z.tryAdd(N,M,E)}}function L(){if(V)return V;return V=Q(),V}return z}return kO0=Z,kO0}var vO0,yS1;function oq0(){if(yS1)return vO0;yS1=1;function $(Y,X,G){var{columns:J,childTable:Q}=X,W=Z(0);for(var K=1;K<J.length;K++)W=W.and(Z(K));function Z(H){var z=J[H],V=Q._primaryColumns[H];return z.eq(Y,G[V.alias])}return W}return vO0=$,vO0}var xO0,bS1;function Eb1(){if(bS1)return xO0;bS1=1;let $=Ww(),Y=oq0(),X=Lb1();function G(J,Q,W){let K=Q.queryContext,Z=K&&K.strategy[W.joinRelation.rightAlias],H,z=W.joinRelation.childTable;if(z._primaryColumns.length===1)H=V();else H=F();function V(){let N=z._primaryColumns[0].alias,D=K.rows.map(function(B){return B[N]});return W.joinRelation.columns[0].in(J,D)}function F(){let N=K.rows.map(function(D){return Y(J,W.joinRelation,D)});return $.or.apply($,[J,...N])}return W.childTable.getMany(J,H,Z).then(L);function L(N){return K.expand(W),X(Q,W,N),N}}return xO0=G,xO0}var yO0,hS1;function $G8(){if(hS1)return yO0;hS1=1;var $=aX8(),Y=Ob1(),X=oq0(),G=Eb1(),J=rq0(),Q=nq0();function W(K){var Z={},H=Y(K);return Z.joinRelation=K,Z.childTable=K.parentTable,Z.parentTable=K.childTable,Z.isMany=!0,Z.accept=function(z){z.visitMany(Z)},Z.getFromCache=function(z){var V=Z.getRowsSync(z);return J(V)},Z.getFromDb=function(z,V){var F=X(z,K,V);return Z.childTable.getMany(z,F,null)},Z.getRelatives=function(z,V){return G(z,V,Z)},Z.toGetRelated=function(z,V){return Q(z,V,Z)},Z.expand=function(z){return z.expand(K.rightAlias)},Z.getRowsSync=function(z){let V=z._relationCacheMap.get(Z);if(!V)return[];return V.tryGet(z)},Z.toLeg=function(){return $(Z)},Z.getInnerCache=function(z){return H.getInnerCache(z)},Z}return yO0=W,yO0}var bO0,fS1;function YG8(){if(fS1)return bO0;fS1=1;var $=$G8(),Y=sq0();function X(G){var J={},Q=G.childTable;return J.as=function(W){G.rightAlias=W;var K=$(G);return Q._relations[W]=K,Object.defineProperty(Q,W,{get:function(){return Y([K])}}),K},J.notNullExceptInsert=function(){return J},J.notNull=function(){return J},J}return bO0=X,bO0}var hO0,gS1;function XG8(){if(gS1)return hO0;gS1=1;let $=Ob1();function Y(X){let G={},J=$(X);return G.tryGet=function(Q,W){let K=J.tryGet(Q,W);if(K.length===0)return null;return K[0]},G.getInnerCache=function(Q){let W=J.getInnerCache(Q),K={};return K.tryGet=function(Z,H){let z=W.tryGet(Z,H);if(z.length===0)return null;return z[0]},K},G}return hO0=Y,hO0}var fO0,mS1;function GG8(){if(mS1)return fO0;mS1=1;var $=Db1(),Y=XG8(),X=oq0(),G=Eb1(),J=rq0(),Q=nq0();function W(K){var Z={},H=Y(K);return Z.joinRelation=K,Z.childTable=K.parentTable,Z.parentTable=K.childTable,Z.isOne=!0,Z.accept=function(z){z.visitOne(Z)},Z.getFromCache=function(z){let V=Z.getRowsSync(z);return J(V)},Z.getFromDb=function(z,V){var F=X(z,K,V);return Z.childTable.tryGetFirst(z,F,null)},Z.getRelatives=function(z,V){return G(z,V,Z)},Z.toGetRelated=function(z,V){return Q(z,V,Z)},Z.expand=function(z){return z.expand(K.rightAlias)},Z.getRowsSync=function(z){let V=z._relationCacheMap.get(Z);if(!V)return null;return V.tryGet(z)},Z.toLeg=function(){return $(Z)},Z.getInnerCache=function(z){return H.getInnerCache(z)},Z}return fO0=W,fO0}var gO0,uS1;function JG8(){if(uS1)return gO0;uS1=1;var $=GG8(),Y=sq0();function X(G){var J={},Q=G.childTable;return J.as=function(W){G.rightAlias=W;var K=$(G);return Q._relations[W]=K,Object.defineProperty(Q,W,{get:function(){return Y([K])}}),K},J.notNullExceptInsert=function(){return J},J.notNull=function(){return J},J}return gO0=X,gO0}var mO0,pS1;function QG8(){if(pS1)return mO0;pS1=1;let $=QZ(),Y=y2(),X=ty(),G=uq0(),J=f5();async function Q(K,Z,H){let z=Z._dbName;H=Y(K,H,Z);let V=W(K,Z,H,z);return await(await $(K,[V]))[0].then((N)=>{return Number.parseInt(N[0]._count)})}function W(K,Z,H,z){H=X(H);var V=J(K,Z._dbName);z=J(K,z);var F=G(K,Z,H,z);return F.prepend('select count(*) "_count" from '+V+" "+z)}return mO0=Q,mO0}var uO0,dS1;function Mb1(){if(dS1)return uO0;dS1=1;var $=ey1(),Y=uq0(),X=$b1(),G=Y9(),J=g6();function Q(W,K,Z,H,z,V,F,L){var N=J(W,"quote"),D=N(K._dbName),A=$(W,K,H,z,!0),B=X(W,H,z),O=Y(W,K,Z,z);if(F)F=F+" ";return G("select "+F+A+" from "+D+" "+N(z)).append(B).append(O).append(V+L)}return uO0=Q,uO0}var pO0,cS1;function WG8(){if(cS1)return pO0;cS1=1;var $=Mb1(),Y=ty(),X=Yb1(),G=pq0(),J=Y9(),Q=dq0();function W(K,Z,H,z,V){H=Y(H);var F=X(K,Z,V,z.orderBy),L=G(K,z),N=Q(K,z),D=$(K,Z,H,z,V,F,L,N);return J(D.sql(),D.parameters)}return pO0=W,pO0}var dO0,lS1;function KG8(){if(lS1)return dO0;lS1=1;let $=Ww(),Y=WG8(),X=y2(),G=iq0(),J=QZ(),Q=g6();async function W(A,B,O,E,M,R){if(O=X(A,O,B),E&&E.where){let j=typeof E.where==="function"?E.where(A,B):E.where;O=O.and(A,j)}let q=M||G(B,E),_=B._dbName,P=Y(A,B,O,q,_),w=await J(A,[P]);return z(A,E,q,await w[0],void 0,R)}function K(A){let B=A.columns,O=A.table._columns.filter((P)=>!B||B.get(P)),E=Z(O,A),M=[],R={};return R.visitJoin=()=>{},R.visitOne=()=>{},R.visitMany=function(P){M.push(P.name)},A.legs.forEach(q),_;function q(P){P.accept(R)}function _(){let P=Object.create(E);for(let w=0;w<M.length;w++)P[M[w]]=[];return P}}function Z(A,B){let O={};for(let R=0;R<A.length;R++)O[A[R].alias]=null;for(let R in B.aggregates)O[R]=null;let E={};E.visitJoin=function(R){O[R.name]=null},E.visitOne=E.visitJoin,E.visitMany=function(R){O[R.name]=null},B.legs.forEach(M);function M(R){R.accept(E)}return O}function H(A){let B,O={};return O.visitJoin=()=>{},O.visitOne=O.visitJoin,O.visitMany=function(){B=!0},A.legs.forEach(E),B;function E(M){M.accept(O)}}async function z(A,B,O,E,M=E.length>0?Object.keys(E[0]):[],R){let{table:q,columns:_}=O,P=q._columns.filter((p)=>!_||_.get(p)),w=E.length,j=P.length,k=q._primaryColumns.length,S=new Map,I=Array(E.length),v=g(),x=Object.keys(O.aggregates),y=Array(w),d=K(O),u=H(O);for(let p=0;p<w;p++){let h=E[p],n=d(),t=0;for(let s=0;s<j;s++){if(s<k){if(h[M[s]]===null)t++;if(t===k){n=null;break}}let K0=P[s];n[K0.alias]=K0.decode(A,h[M[s]])}for(let s=0;s<x.length;s++){let K0=x[s],X0=O.aggregates[K0].column?.decode||((a,Q0)=>Number.parseFloat(Q0));n[K0]=X0(A,h[M[s+j]])}if(y[p]=n,R)R(n,p);if(u)I[p]=v(n),N(S,I[p],n)}if(O._rowsMap=S,O._ids=I,M.splice(0,j+x.length),O.legs.toArray().length===0)return y;let b=[];if(u)b.push(V(A,B,O)),b.push(F(A,B,O,E,y,M));else b.push(F(A,B,O,E,y,M));return await Promise.all(b),y;function g(){let p=q._primaryColumns,h=p.length;if(h===1){let n=q._primaryColumns[0].alias;return(t)=>t[n]}else return(n)=>{let t=Array(h);for(let s=0;s<h;s++)t[s]=n[p[s].alias];return t}}}async function V(A,B,O){let E=Q(A,"maxParameters"),M=E?E*O.table._primaryColumns.length:void 0,R=[],q={};q.visitJoin=()=>{},q.visitOne=q.visitJoin;function _(C,k){let S=[];for(let I=0;I<C.length;I+=k)S.push(C.slice(I,I+k));return S}q.visitMany=function(C){let k=C.name,S=O.table,I=S._relations[k],v=O._rowsMap,x=P(C),y=w(v,S._primaryColumns);if(O._ids.length===0)return;if(M){let u=_(O._ids,M);for(let b of u){let g=L(A,I,b),p=W(A,I.childTable,g,B[k],C.span,d);R.push(p)}}else{let u=L(A,I,O._ids),b=W(A,I.childTable,u,B[k],C.span,d);R.push(b)}function d(u){let b=x(u);(y(b)||[]).forEach((p)=>{p[k].push(u)})}};function P(C){if(C.columns.length===1){let k=C.columns[0].alias;return(S)=>S[k]}else{let k=C.columns.map((S)=>S.alias);return(S)=>k.map((I)=>S[I])}}function w(C,k){if(k.length===1)return(S)=>C.get(S);else return D.bind(null,C,k)}O.legs.forEach(j);function j(C){C.accept(q)}await Promise.all(R)}async function F(A,B,O,E,M,R){let q={};q.visitJoin=function(P){let w=P.name;return z(A,B[w],P.span,E,R,j);function j(C,k){if(M[k])M[k][w]=C}},q.visitOne=q.visitJoin,q.visitMany=()=>{};async function _(P){for(let w of P.toArray())await w.accept(q)}await _(O.legs)}function L(A,B,O){let E=B.joinRelation.columns;if(E.length===1)return E[0].in(A,O);else return M();function M(){let R=$;for(let q of O){let _;for(let P=0;P<E.length;P++)if(_)_=_.and(A,E[P].eq(A,q[P]));else _=E[P].eq(A,q[P]);R=R.or(A,_)}return R}}function N(A,B,O){if(Array.isArray(B)){let E=A,M=B.length-1;for(let q=0;q<M;q++){let _=B[q];if(!E.has(_))E.set(_,new Map);E=E.get(_)}let R=B[M];if(!E.has(R))E.set(R,[O]);else E.get(R).push(O)}else if(!A.has(B))A.set(B,[O]);else A.get(B).push(O)}function D(A,B,O){if(Array.isArray(O)){let E=B.length;for(let M=0;M<E;M++)A=A.get(O[M]);return A}else return A.get(O)}return dO0=W,dO0}var cO0,iS1;function ZG8(){if(iS1)return cO0;iS1=1;let $=g6(),Y=KG8();function X(G,J,Q,W){return($(G,"getManyDto")||Y).apply(null,arguments)}return cO0=X,cO0}var lO0,nS1;function UG8(){if(nS1)return lO0;nS1=1;var $=gq0(),Y=Vb1(),X=ey();function G(){var J=$.apply(null,arguments);if(J)return X(J);return Y.apply(null,arguments)}return G.exclusive=Y.exclusive,lO0=G,lO0}var iO0,rS1;function HG8(){if(rS1)return iO0;rS1=1;let $=Nb1(),Y=Ab1(),X=Bb1();function G(W){let K=Symbol(),Z={};return Z.tryGet=function(H,z){return J(H,W,K).tryGet(z)},Z.tryAdd=function(H,z){return J(H,W,K).tryAdd(z)},Z.tryRemove=function(H,z){return J(H,W,K).tryRemove(z)},Z.subscribeAdded=function(H,...z){return J(H,W,K).subscribeAdded.apply(null,z)},Z.subscribeRemoved=function(H,...z){return J(H,W,K).subscribeRemoved.apply(null,z)},Z.getAll=function(H){return J(H,W,K).getAll.apply(null,arguments)},Z.getInnerCache=function(H){return J(H,W,K)},Z}function J(W,K,Z){let H=Y(W,Z);if(H)return H;return H=Q(K),X(W,Z,H),H}function Q(W){let K={},Z=$(),H,z=F;function V(){let N={},D=W._primaryColumns,A=D.length;for(let B=0;B<A;B++){let O=D[B];N[O.alias]=null}return N}K.tryGet=function(N){let D=z(N);return Z.tryGet(D)};function F(N){return H=V(),z=L,W=null,z(N)}function L(N){let D=[];for(let A in H)D.push(N[A]);return D}return K.tryAdd=function(N){let D=z(N);return Z.tryAdd(D,N)},K.tryRemove=function(N){let D=z(N);return Z.tryRemove(D)},K.subscribeAdded=Z.subscribeAdded,K.subscribeRemoved=Z.subscribeRemoved,K.getAll=Z.getAll,K}return iO0=G,iO0}var nO0,aS1;function Rb1(){if(aS1)return nO0;aS1=1;var $=Kb1(),Y=sy();function X(J,{table:Q,_options:W,shouldValidate:K=!0}){var Z={};Q._columns.forEach(H);function H(N){var D=N.alias;if("default"in N)if(typeof N.default==="function")Z[D]=N.default();else if(N.toDto)Z[D]=N.toDto(N.default);else Z[D]=N.default;else if(Y.useLazyDefaults&&"lazyDefault"in N&&!N.isPrimary)if(typeof N.lazyDefault==="function")Z[D]=N.lazyDefault();else if(N.toDto)Z[D]=N.toDto(N.lazyDefault);else Z[D]=N.lazyDefault;else if(N.dbNull!==null)Z[D]=null;else Z[D]=void 0}let z=arguments[2];if(G(z)){for(let N in z)if(Q[N]&&Q[N].equal)Z[N]=z[N]}else for(var V=2;V<arguments.length;V++){var F=arguments[V],L=Q._primaryColumns[V-1];Z[L.alias]=F}return $(J,Q,Q,Z,K,!0)}function G(J){return J===Object(J)&&!Array.isArray(J)&&!(J instanceof Date)}return nO0=X,nO0}var rO0,sS1;function zG8(){if(sS1)return rO0;sS1=1;let $=hG(),Y=Rb1();function X(Q,{table:W,options:K},Z){if(Array.isArray(Z)){let D=[];for(let A=0;A<Z.length;A++)D.push(X(Q,W,Z[A]));return Promise.all(D)}let H=Y.apply(null,[...arguments]);if(J(W,H))H=W._cache.tryAdd(Q,H);G(W,H),Object.defineProperty(H,"then",{value:L,writable:!0,enumerable:!1,configurable:!0});let F=$(Q).insert(Q,W,H,K).then(N);async function L(D,A){return delete H.then,F.then(()=>D(H),A)}return H;function N([D]){return H.hydrate(Q,D),H=W._cache.tryAdd(Q,H),H}}function G(Q,W){let K,Z={};Z.visitJoin=function(){},Z.visitMany=function(){W.expand(K)},Z.visitOne=function(){W.expand(K)};for(K in Q._relations)Q._relations[K].accept(Z)}function J(Q,W){for(let K=0;K<Q._primaryColumns.length;K++){let Z=Q._primaryColumns[K];if(W[Z.alias]===null)return!1}return!0}return rO0=X,rO0}var aO0,oS1;function qb1(){if(oS1)return aO0;oS1=1;var $=wB(),Y=Qb1(),X=Gb1(),G=y2(),J=ey()();function Q(W,K,Z,H){Z=G(W,Z,K),H=X(H);var z=[],V=[];return V=Y(W,V,K,Z,H,z),V.forEach(function(F){$(W,F)}),J}return aO0=Q,aO0}var sO0,tS1;function VG8(){if(tS1)return sO0;tS1=1;var $=qb1(),Y=PB(),X=Jb1();function G(J,Q,W){var K=Y(),Z=X(K,Q);return $(J,Q,W,Z)}return sO0=G,sO0}var oO0,eS1;function Pb1(){if(eS1)return oO0;eS1=1;function $(Y){if(Y===null||Y===void 0)return Y;if(Y.__patchType==="Array"){let X=[],G=0;for(let J in Y)if(J!=="__patchType")X[G]=$(Y[J]),G++;return X}else if(Y===Object(Y)){let X={};for(let G in Y)if(G!=="__patchType")X[G]=$(Y[G]);return X}return Y}return oO0=$,oO0}var tO0,$k1;function FG8(){if($k1)return tO0;$k1=1;let $=Qw(),Y=typeof window>"u";function X(J){if(Array.isArray(J)){let W={};Object.defineProperty(W,"__patchType",{value:"Array",writable:!0,enumerable:!0});for(var Q=0;Q<J.length;Q++){let K=X(J[Q]);if(K===Object(K)&&"id"in K)W[K.id]=K;else W[Q]=K}return W}if(Y&&G(J))return J.toString("base64");else if(J instanceof Date&&!isNaN(J))return $(J);else if(J===Object(J)){let W={};for(let K in J)W[K]=X(J[K]);return W}return J}function G(J){return Buffer.isBuffer(J)}return tO0=X,tO0}var eO0,Yk1;function LG8(){if(Yk1)return eO0;Yk1=1;let $=yy1,Y=Pb1(),X=FG8(),G=g6();function J({options:W={},context:K},Z,H,z){let V=X(Z);if(H=L(V,H),z.tsType==="JSONColumn"){let A=K?G(K,"engine"):void 0;if(z&&A==="sap")H=D(V,H),$.applyPatch(V,H,!0,!0)}else $.applyPatch(V,H,!0,!0);let F=Y(V);if(Array.isArray(Z))Z.length=0;else for(let A in Z)delete Z[A];for(let A in F)Z[A]=F[A];return Z;function L(A,B){return B.filter((O)=>{if(N(O.path).readonly){let R=Error(`Cannot update column ${O.path.replace("/","")} because it is readonly`);throw R.status=405,R}return!0})}function N(A){let B=A.split("/");return B.shift(),B.reduce(O,W);function O(E,M){if(Array.isArray(E))return E[0]||W;if(E===Object(E))return E[M]||W;return E}}function D(A,B){return B.filter((E)=>{let M=E.oldValue,R=N(E.path);if(R.readonly){let P=Error(`Cannot update column ${E.path.replace("/","")} because it is readonly`);throw P.status=405,P}let _=R.concurrency||"optimistic";if(_==="optimistic"||_==="skipOnConflict"){let P=O(A,E.path);try{Q(P,M)}catch(w){if(_==="skipOnConflict")return!1;throw Error("The row was changed by another user.")}}return!0});function O(E,M){let R=M.split("/");return R.shift(),R.reduce(q,E);function q(_,P){if(_===Object(_))return _[P];return}}}}function Q(W,K){if(JSON.stringify(W)!==JSON.stringify(K))throw Error("A, b are not equal")}return eO0=J,eO0}var $E0,Xk1;function DG8(){if(Xk1)return $E0;Xk1=1;async function $({row:Q,options:W,table:K}){if(W.readonly){let Z=Error(`Cannot delete ${K._dbName} because it is readonly`);throw Z.status=405,Z}if(!J(W))return;for(let Z in W)if(Y(Z,K)){let H=K[Z]._relation.childTable,z=G(W,Z);if(!J(z))continue;let V=await Q[Z];for(let F=0;F<V.length;F++){let L=V[F];await $({row:L,options:z,table:H})}}else if(X(Z,K)){let H=G(W,Z);if(!J(H))continue;let z=K[Z]._relation.childTable,V=await Q[Z];await $({row:V,options:H,table:z})}}function Y(Q,W){return W[Q]&&W[Q]._relation&&W[Q]._relation.isMany}function X(Q,W){return W[Q]&&W[Q]._relation&&W[Q]._relation.isOne}function G(Q,W){let K={};if("readonly"in Q)K.readonly=Q.readonly;if("concurrency"in Q)K.concurrency=Q.concurrency;return{...K,...Q[W]||{}}}function J(Q){if(!Q||Q!==Object(Q))return!1;if(Q.readonly===!0)return!0;for(let W in Q){let K=Q[W];if(!K||K!==Object(K))continue;if(J(K))return!0}return!1}return $E0=$,$E0}var YE0,Gk1;function NG8(){if(Gk1)return YE0;Gk1=1;var $=nX();function Y(X){$(X,"cache",{})}return YE0=Y,YE0}var XE0,Jk1;function AG8(){if(Jk1)return XE0;Jk1=1;let $=LG8(),Y=Pb1(),X=DG8(),G=NG8(),J=g6();async function Q(){let K=await W.apply(null,arguments);return G(arguments[0]),K}async function W(K,Z,H,{strategy:z=void 0,deduceStrategy:V=!1,...F}={},L){let N=J(K,"engine");F=d(F),z=JSON.parse(JSON.stringify(z||{}));let D=new Set;for(let u=0;u<H.length;u++){let b={path:void 0,value:void 0,op:void 0};Object.assign(b,H[u]),b.path=H[u].path.split("/").slice(1);let g;if(b.op==="add"||b.op==="replace")g=await O({path:b.path,value:b.value,op:b.op,oldValue:b.oldValue,strategy:V?z:{},options:F},Z);else if(b.op==="remove")g=await _({path:b.path,op:b.op,oldValue:b.oldValue,options:F},Z);if(g.inserted)D.add(g.inserted);else if(g.updated)D.add(g.updated)}if(z.insertAndForget)return{changed:[],strategy:z};return{changed:await A(D),strategy:z};async function A(u){return u=[...u],await Z.getManyDto(K,u,z)}function B(u){if(typeof u==="string"&&u.charAt(0)==="[")return JSON.parse(u);else return[u]}async function O({path:u,value:b,op:g,oldValue:p,strategy:h,options:n},t,s,K0,X0){let a=u[0];if(u=u.slice(1),!s&&u.length>0)s=await j({table:t,strategy:h,property:a});if(u.length===0&&b===null)return _({path:u,op:g,oldValue:p,options:n},t,s);if(u.length===0){if(L)return{};let Q0=[];for(let m in b)if(P(m,t))b[m]=Y(b[m]);else if(v(m,t))h[m]=h[m]||{},b[m]&&R(m,b,t,b);else if(S(m,t))b[m]&&Q0.push(E.bind(null,m,b,g,p,t,h,n));else if(I(m,t)&&b)b[m]&&Q0.push(M.bind(null,m,b,g,p,t,h,n));for(let m=0;m<t._primaryColumns.length;m++){let $0=t._primaryColumns[m].alias,Y0=b[$0];if(Y0&&typeof Y0==="string"&&Y0.indexOf("~")===0)b[$0]=void 0}if(X0&&X0.joinRelation)for(let m=0;m<X0.joinRelation.columns.length;m++){let Y0=X0.joinRelation.columns[m].alias,Z0=X0.joinRelation.childTable._primaryColumns[m].alias;if(!b[Y0])b[Y0]=K0[Z0]}let e=t.insertWithConcurrency.apply(null,[K,n,b]);e=await e;for(let m=0;m<Q0.length;m++)await Q0[m](e);return{inserted:e}}if(a=u[0],P(a,t)){if(L)return{updated:s};let Q0=t[a],e=s[a],m={};m[a]=e;let $0=Y(p),Y0=Y(b),Z0=$({options:n,context:K},m,[{path:"/"+u.join("/"),op:g,value:b,oldValue:p}],t[a]),F0=Q0.tsType==="JSONColumn"?{path:u,op:g,value:Y0,oldValue:$0,fullOldValue:e}:void 0;return await t.updateWithConcurrency(K,n,s,a,Z0[a],$0,F0),{updated:s}}else if(I(a,t)){let Q0=t[a]._relation,e=await s[a];return h[a]=h[a]||{},n[a]=y(n,a),await O({path:u,value:b,op:g,oldValue:p,strategy:h[a],options:n[a]},Q0.childTable,e,s,Q0),{updated:s}}else if(S(a,t)){let Q0=t[a]._relation;if(h[a]=h[a]||{},n[a]=y(n,a),u.length===1)for(let e in b){if(e==="__patchType")continue;await O({path:[e],value:b[e],op:g,oldValue:p,strategy:h[a],options:n[a]},Q0.childTable,void 0,s,Q0)}else await O({path:u.slice(1),value:b,oldValue:p,op:g,strategy:h[a],options:n[a]},Q0.childTable,void 0,s,Q0);return{updated:s}}else if(v(a,t)&&u.length===1){let Q0=q(a,{[a]:b},t);p=q(a,{[a]:p},t);let e;for(let m in Q0)e=await O({path:["dummy",m],value:Q0[m],oldValue:(p||{})[m],op:g,strategy:h,options:n},t,s,K0,X0)||e;return e||{}}else if(v(a,t)&&u.length===2){let Q0=q(a,{[a]:{[u[1]]:b}},t);p=q(a,{[a]:{[u[1]]:p}},t);let e;for(let m in Q0)e=await O({path:["dummy",m],value:Q0[m],oldValue:(p||{})[m],op:g,strategy:h,options:n},t,s,K0,X0)||e;return e||{}}return{}}async function E(u,b,g,p,h,n,t,s){let K0=h[u]._relation;for(let X0 in b[u])if(X0!="__patchType"){let a=b[u][X0];n[u]=n[u]||{},t[u]=y(t,u),await O({path:[X0],value:a,op:g,oldValue:p,strategy:n[u],options:t[u]},K0.childTable,{},s,K0)}}async function M(u,b,g,p,h,n,t,s){let K0=h[u]._relation,X0=b[u];n[u]=n[u]||{},t[u]=y(t,u),await O({path:[u],value:X0,op:g,oldValue:p,strategy:n[u],options:t[u]},K0.childTable,{},s,K0)}function R(u,b,g,p){let h=g[u]._relation;for(let n=0;n<h.columns.length;n++){let t=h.columns[n].alias,s=h.childTable._primaryColumns[n].alias;if(s in b[u])p[t]=Y(b[u][s])}}function q(u,b,g){let p=g[u]._relation,h={};for(let n=0;n<p.columns.length;n++){let t=p.columns[n].alias,s=p.childTable._primaryColumns[n].alias;if(b&&b[u]&&s in b[u])h[t]=Y(b[u][s]);else h[t]=null}return h}async function _({path:u,op:b,oldValue:g,options:p},h,n){let t=u[0];if(u=u.slice(1),!n)n=await j({table:h,strategy:{},property:t});if(u.length===0)await X({row:n,options:p,table:h}),x(n,g,p,h),await n.deleteCascade();if(t=u[0],P(t,h)){let s=h[t],K0=n[t],X0={};X0[t]=K0;let a=Y(g),Q0=$({options:p,context:K},X0,[{path:"/"+u.join("/"),op:b,oldValue:g}],h[t]);if(s.tsType==="JSONColumn"){let e={path:u,op:b,value:void 0,oldValue:a,fullOldValue:K0};await h.updateWithConcurrency(K,p,n,t,Q0[t],a,e)}else n[t]=Q0[t];return{updated:n}}else if(v(t,h)&&u.length===1){g=q(t,{[t]:g},h);let s=h[t]._relation,K0;for(let X0=0;X0<s.columns.length;X0++){let a=s.columns[X0].alias;n[a],K0=await _({path:["dummy",a],oldValue:(g||{})[a],op:b,options:p},h,n)||K0}return K0||{}}else if(v(t,h)&&u.length===2){let s=h[t]._relation;g=q(t,{[t]:{[u[1]]:g}},h);let K0;for(let X0=0;X0<s.columns.length;X0++){let a=s.columns[X0].alias,Q0=s.childTable._primaryColumns[X0].alias;if(u[1]===Q0){n[a],K0=await _({path:["dummy",a],oldValue:(g||{})[a],op:b,options:p},h,n)||K0;break}}return K0||{}}else if(I(t,h)){let s=await n[t];if(!s)throw Error(t+" does not exist");return p[t]=y(p,t),await _({path:u,op:b,oldValue:g,options:p[t]},h[t],s),{updated:n}}else if(S(t,h)){let s=h[t]._relation;if(p[t]=y(p,t),u.length===1){let K0=(await n[t]).slice(0);for(let X0=0;X0<K0.length;X0++){let a=K0[X0];await _({path:u.slice(1),op:b,oldValue:g,options:p[t]},h[t],a)}}else await _({path:u.slice(1),op:b,oldValue:g,options:p[t]},s.childTable);return{updated:n}}return{}}function P(u,b){return b[u]&&b[u].equal}function w(u){return N==="sap"&&u._columns.some((b)=>b.tsType==="JSONColumn")}function j({table:u,strategy:b,property:g}){let p=B(g);if(w(u))return C({context:K,table:u,strategy:b,key:p});return k({context:K,table:u,key:p})}async function C({context:u,table:b,strategy:g,key:p}){let h=await b.tryGetById.apply(null,[u,...p,g]);if(!h)throw Error(`Row ${b._dbName} with id ${p} was not found.`);return h}function k({context:u,table:b,key:g}){let h=(j.tryGetFromCacheById||(j.tryGetFromCacheById=gq0()))(u,b,...g);if(h)return h;let n=j.cachedNewRow||(j.cachedNewRow=Rb1()),t={};for(let K0=0;K0<g.length&&K0<b._primaryColumns.length;K0++)t[b._primaryColumns[K0].alias]=g[K0];let s=n(u,{table:b,shouldValidate:!1},t);return b._cache.tryAdd(u,s)}function S(u,b){return b[u]&&b[u]._relation.isMany}function I(u,b){return b[u]&&b[u]._relation.isOne}function v(u,b){return b[u]&&b[u]._relation.columns}function x(u,b,g,p){let h={columns:{}};if(b&&b===Object(b))for(let n in b){if(!P(n,p))continue;let s=y(g,n).concurrency||"optimistic";if(s==="overwrite")continue;h.columns[n]={oldValue:Y(b[n]),concurrency:s}}if(Object.keys(h.columns).length===0){let n=g.concurrency||"optimistic";if(n!=="overwrite")for(let t=0;t<p._primaryColumns.length;t++){let s=p._primaryColumns[t].alias;h.columns[s]={oldValue:u[s],concurrency:n}}}if(Object.keys(h.columns).length>0)u._concurrencyState=h}function y(u,b){let g={};if("readonly"in u)g.readonly=u.readonly;if("concurrency"in u)g.concurrency=u.concurrency;return{...g,...u[b]||{}}}function d(u){let{table:b,transaction:g,db:p,client:h,...n}=u;return n}}return XE0=Q,XE0}var GE0,Qk1;function BG8(){if(Qk1)return GE0;Qk1=1;let $=y2();function Y(X){function G(J,Q){let W=typeof Q==="function"?Q(X):Q;return $(J,W)}return G}return GE0=Y,GE0}var JE0,Wk1;function OG8(){if(Wk1)return JE0;Wk1=1;function $(Y){function X(G,J){return J(Y)}return X}return JE0=$,JE0}var QE0,Kk1;function EG8(){if(Kk1)return QE0;Kk1=1;var $=Mb1(),Y=ty(),X=pq0(),G=Y9(),J=dq0();function Q(K,Z,H,z,V){H=Y(H);var F="",L=X(K,z),N=J(K,z),D=$(K,Z,H,z,V,F,L,N);let A=W(z);return G(D.sql(),D.parameters).append(A)}function W(K){let Z=Object.keys(K.aggregates).filter((H)=>K.aggregates[H].column);if(Z.length===0)return"";return" GROUP BY "+Z.map((H)=>K.aggregates[H].groupBy).join(",")}return QE0=Q,QE0}var WE0,Zk1;function MG8(){if(Zk1)return WE0;Zk1=1;let $=EG8(),Y=y2(),X=iq0(),G=QZ();async function J(Z,H,z,V){if(z=Y(Z,z,H),V&&V.where){let A=typeof V.where==="function"?V.where(H):V.where;z=z.and(Z,A)}let F=X(H,V);F.columns=new Map;let L=H._dbName,N=$(Z,H,z,F,L),D=await G(Z,[N]);return K(Z,F,await D[0])}function Q(Z){let H=W(Z);return z;function z(){return Object.create(H)}}function W(Z){let H={};for(let z in Z.aggregates)H[z]=null;return H}async function K(Z,H,z,V=z.length>0?Object.keys(z[0]):[]){let F=z.length,L=Object.keys(H.aggregates),N=Array(F),D=Q(H);for(let A=0;A<F;A++){let B=z[A],O=D();for(let E=0;E<L.length;E++){let M=L[E],R=H.aggregates[M].column?.decode||((q,_)=>Number.parseFloat(_));O[M]=R(Z,B[V[E]])}N[A]=O}return N}return WE0=J,WE0}var KE0,Uk1;function wb1(){if(Uk1)return KE0;Uk1=1;let $=AY8(),Y=tY8(),X=rX8(),G=YG8(),J=JG8(),Q=Ub1(),W=QG8(),K=ZG8(),Z=Fb1(),H=UG8(),z=Hb1(),V=HG8(),F=PB(),L=zG8(),N=qb1(),D=VG8(),A=AG8(),B=Ft(),O=WQ(),E=g6(),M=Xb1(),R=BG8(),q=OG8(),_=MG8();function P(j){var C=F();return C._dbName=j,C._primaryColumns=[],C._aliases=new Set,C._columns=[],C._columnDiscriminators=[],C._formulaDiscriminators=[],C._relations={},C._cache=V(C),C._emitChanged=B(),C.primaryColumn=function(k){var S=$(C,k);return S.isPrimary=!0,C._primaryColumns.push(S),Y(S,C)},C.column=function(k){var S=$(C,k);return Y(S,C)},C.join=function(k){return X(C,k)},C.hasMany=function(k){return G(k)},C.hasOne=function(k){return J(k)},C.count=function(k,...S){let I=[k,C,...S];return Promise.resolve().then(()=>W.apply(null,I))},C.getMany=function(k,...S){let I=[k,C,...S];return Promise.resolve().then(()=>Q.apply(null,I))},C.getManyDto=function(k,...S){let I=[k,C,...S];return Promise.resolve().then(()=>K.apply(null,I))},C.aggregate=function(k,...S){let I=[k,C,...S];return _.apply(null,I)},C.getMany.exclusive=function(k,...S){let I=[k,C,...S];return Promise.resolve().then(()=>Q.exclusive.apply(null,I))},C.tryGetFirst=function(k,...S){let I=[k,C,...S];return Promise.resolve().then(()=>z.apply(null,I))},C.tryGetFirst.exclusive=function(k,...S){let I=[k,C,...S];return Promise.resolve().then(()=>z.exclusive.apply(null,I))},C.getOne=C.tryGetFirst,C.getOne.exclusive=C.tryGetFirst.exclusive,C.getById=function(k,...S){let I=[k,C,...S];return Promise.resolve().then(()=>Z.apply(null,I))},C.getById.exclusive=function(k,...S){let I=[k,C,...S];return Promise.resolve().then(()=>Z.exclusive.apply(null,I))},C.tryGetById=function(k,...S){let I=[k,C,...S];return Promise.resolve().then(()=>H.apply(null,I))},C.tryGetById.exclusive=function(k,...S){let I=[k,C,...S];return Promise.resolve().then(()=>H.exclusive.apply(null,I))},C.columnDiscriminators=function(){for(var k=0;k<arguments.length;k++)C._columnDiscriminators.push(arguments[k]);return C},C.formulaDiscriminators=function(){for(var k=0;k<arguments.length;k++)C._formulaDiscriminators.push(arguments[k]);return C},C.insert=function(k,...S){let v=[k,{table:C,concurrency:void 0},...S];return L.apply(null,v)},C.insertWithConcurrency=function(k,S,...I){let v=[k,{table:C,options:S}].concat([].slice.call(I));return L.apply(null,v)},C.updateWithConcurrency=function(k,S,I,v,x,y,d){S=S||{};let b=w(S,v).concurrency||"optimistic",g=C[v];if(d&&g&&g.tsType==="JSONColumn"&&Array.isArray(d.path)&&d.path.length>1){let p=E(k,"engine");if(M(p)){let h=d.path.slice(1),n=I._jsonUpdateState||{},t=n[v]||{patches:[]};if(t.patches.push({path:h,op:d.op,value:d.value,oldValue:d.oldValue}),n[v]=t,I._jsonUpdateState=n,b!=="overwrite"){let s=I._concurrencyState||{columns:{}},K0=s.columns[v]||{};K0.concurrency=b,K0.paths=K0.paths||[],K0.paths.push({path:h,oldValue:d.oldValue}),delete K0.oldValue,s.columns[v]=K0,I._concurrencyState=s}}else if(b!=="overwrite"){let h=I._concurrencyState||{columns:{}},n=Object.prototype.hasOwnProperty.call(d,"fullOldValue")?d.fullOldValue:y;h.columns[v]={oldValue:n,concurrency:b},I._concurrencyState=h}}else if(b!=="overwrite"){let p=I._concurrencyState||{columns:{}};p.columns[v]={oldValue:y,concurrency:b},I._concurrencyState=p}I[v]=x},C.delete=N.bind(null,C),C.cascadeDelete=function(k,...S){let I=[k,C,...S];return D.apply(null,I)},C.deleteCascade=C.cascadeDelete,C.exclusive=function(){return C._exclusive=!0,C},C.patch=function(k,...S){let I=[k,C,...S];return A.apply(null,I)},C.hostLocal=function(k){return O({table:C,...k})},C.where=R(C),C._aggregate=q(C),C}function w(j,C){let k={};if(!j)return k;if("readonly"in j)k.readonly=j.readonly;if("concurrency"in j)k.concurrency=j.concurrency;return{...k,...j[C]||{}}}return KE0=P,KE0}var ZE0,Hk1;function RG8(){if(Hk1)return ZE0;Hk1=1;let $=new WeakMap;function Y(G){function J(W){return W=new Proxy(W,{}),()=>X(W,J)}Object.defineProperty(J,"pg",{get:function(){return Q.bind(null,"pg")}}),Object.defineProperty(J,"pglite",{get:function(){return Q.bind(null,"pglite")}}),Object.defineProperty(J,"postgres",{get:function(){return Q.bind(null,"pg")}}),Object.defineProperty(J,"mssql",{get:function(){return Q.bind(null,"mssql")}}),Object.defineProperty(J,"mssqlNative",{get:function(){return Q.bind(null,"mssqlNative")}}),Object.defineProperty(J,"mysql",{get:function(){return Q.bind(null,"mysql")}}),Object.defineProperty(J,"sap",{get:function(){return Q.bind(null,"sap")}}),Object.defineProperty(J,"oracle",{get:function(){return Q.bind(null,"oracle")}}),Object.defineProperty(J,"sqlite",{get:function(){return Q.bind(null,"sqlite")}}),Object.defineProperty(J,"d1",{get:function(){return Q.bind(null,"d1")}}),Object.defineProperty(J,"http",{get:function(){return Q.bind(null,"http")}}),J.express=G.express;function Q(W,...K){return G[W].apply(null,K)}return J}function X(G,J){let Q=$.get(G);if(!Q)Q={},$.set(G,Q);let W={get pg(){return K.bind(null,"pg")},get pglite(){return K.bind(null,"pglite")},get postgres(){return K.bind(null,"pg")},get mssql(){return K.bind(null,"mssql")},get mssqlNative(){return K.bind(null,"mssqlNative")},get mysql(){return K.bind(null,"mysql")},get sap(){return K.bind(null,"sap")},get oracle(){return K.bind(null,"oracle")},get sqlite(){return K.bind(null,"sqlite")},get d1(){return K.bind(null,"d1")},get http(){return K.bind(null,"http")}};function K(Z,...H){if(Z==="d1")return J[Z].apply(null,H);let z=JSON.stringify(H);if(!Q[Z])Q[Z]={};let V=Q[Z][z];if(!V)V=J[Z].apply(null,H),Q[Z][z]=V;return V}return G(W)}return ZE0=Y,ZE0}var UE0,zk1;function qG8(){if(zk1)return UE0;zk1=1;let $=wb1(),Y=RG8();function X(Q,W){let K=Y(Q);return G(Q,Z,K,W);function Z(H){let z={};for(let V in Z)if(Z[V]&&Z[V]._dbName)z[V]=Z[V];if(H&&H.db&&typeof H.db==="function")return Q({...H,db:K(H.db),tables:z,providers:K});else return Q({...H,tables:z,providers:K})}}function G(Q,W,K,Z){let H=Z({table:V,...W});for(let F in H)if(H[F]&&H[F]._dbName)W[F]=H[F],W[F].map=J.bind(null,W[F]);W.map=G.bind(null,Q,W,K),W.pg=z.bind(null,"pg"),W.pglite=z.bind(null,"pglite"),W.postgres=z.bind(null,"pg"),W.mssql=z.bind(null,"mssql"),W.mssqlNative=z.bind(null,"mssqlNative"),W.mysql=z.bind(null,"mysql"),W.sap=z.bind(null,"sap"),W.oracle=z.bind(null,"oracle"),W.sqlite=z.bind(null,"sqlite"),W.d1=z.bind(null,"d1"),W.http=function(F){return Q({db:F,providers:K})};function z(F,...L){let D=Q[F].apply(null,L),A={};for(let B in W)if(W[B]&&W[B]._dbName)A[B]=W[B];return Q({db:D,tables:A,providers:K})}return W;function V(){let F=$.apply(null,arguments);return F.map=J.bind(null,F),F}}function J(Q,W){let K=W({column:Q.column,primaryColumn:Q.primaryColumn,references:Q.join,hasMany:Z,hasOne:H});for(let z in K)if(K[z].as)K[z]=K[z].as(z);function Z(z){if(!z)throw Error("Missing 'to' table");return{by:V};function V(){let F=z.join(Q).by.apply(null,arguments);return Q.hasMany(F)}}function H(z){if(!z)throw Error("Missing 'to' table");return{by:V};function V(){let F=z.join(Q).by.apply(null,arguments);return Q.hasOne(F)}}return Q}return UE0=X,UE0}var HE0,Vk1;function PG8(){if(Vk1)return HE0;Vk1=1;let $=typeof Deno<"u"&&Deno.version?.deno,Y=typeof Bun<"u"&&Bun.version,X=typeof process<"u"&&process.versions?.node&&!$&&!Y?process.versions.node:!1;function G(J){if(J){let Q=J.split(".");return{version:J,major:parseInt(Q[0]),minor:parseInt(Q[1]),patch:parseInt(Q[2])}}else return!1}return HE0={deno:G($),bun:G(Y),node:G(X)},HE0}var zE0,Fk1;function wG8(){if(Fk1)return zE0;Fk1=1;var $=Y9(),Y=$("COMMIT");function X(){}return Y.endEdit=X,Y.matches=X,zE0=Y,zE0}var VE0,Lk1;function _G8(){if(Lk1)return VE0;Lk1=1;function $(Y){delete Y.rdb}return VE0=$,VE0}var FE0,Dk1;function fG(){if(Dk1)return FE0;Dk1=1;var $=g6(),Y=_G8();function X(G){var J=$(G,"dbClientDone"),Q=$(G,"pool");if(Y(G),J)J();if(Q)return Q.end()}return FE0=X,FE0}var LE0,Nk1;function HW(){if(Nk1)return LE0;Nk1=1;let $=wG8(),Y=wB(),X=gy1(),G=fG(),J=xq0(),Q=g6();function W(Z,H){return V().then(G.bind(null,Z)).then(z);function z(){return H}async function V(){let F=J(Z);while(F.length>0)await X(Z,F),F=J(Z);if(!Q(Z,"transactionLess"))Y(Z,$);return X(Z,J(Z))}}function K(Z,H){return Promise.resolve().then(()=>W(Z,H))}return LE0=K,LE0}var DE0,Ak1;function jG8(){if(Ak1)return DE0;Ak1=1;var $=Y9(),Y=$("ROLLBACK");function X(){}return Y.endEdit=X,Y.matches=X,DE0=Y,DE0}var NE0,Bk1;function TG8(){if(Bk1)return NE0;Bk1=1;var $=fG();function Y(X){try{$(X)}catch(G){}}return NE0=Y,NE0}var AE0,Ok1;function IG8(){if(Ok1)return AE0;Ok1=1;var $=TG8();function Y(X,G,J){return J.then(Q,Q);function Q(){throw $(X),G}}return AE0=Y,AE0}var BE0,Ek1;function zW(){if(Ek1)return BE0;Ek1=1;let $=jG8(),Y=yq0(),X=fG(),G=xq0(),J=IG8(),Q=ey(),W="12345678-1234-1234-1234-123456789012",K=g6();function Z(z,V){var F=Q().then(()=>G(z)).then(L).then(()=>X(z));function L(){if(K(z,"transactionLess"))return Promise.resolve();return Y(z,$)}if(V){if(V.message?.indexOf("ORA-01476: divisor is equal to zero")>-1)return J(z,Error("Conflict when updating a column"),F);let N=V.message&&V.message.split(W)||[];if(N.length>1)return J(z,Error(N[1]),F);else return J(z,V,F)}return F}function H(z,V){return Promise.resolve().then(()=>Z(z,V))}return BE0=H,BE0}var OE0,Mk1;function V$(){if(Mk1)return OE0;Mk1=1;var $=PB()();Object.defineProperty($,"end",{enumerable:!1,value:Y});function Y(){var X=[];for(var G in $){var J=$[G].end();X.push(J)}return Promise.all(X)}return OE0=$,OE0}var EE0,Rk1;function Z5(){if(Rk1)return EE0;Rk1=1;var $=Ft(),Y={query:$()},X=function(){};function G(){X.apply(null,arguments)}function J({sql:Q,parameters:W}){Y.query.apply(null,arguments),G(Q),G("parameters: "+W)}return G.emitQuery=J,G.registerLogger=function(Q){X=Q},G.on=function(Q,W){if(Q==="query")Y.query.add(W);else throw Error("unknown event type: "+Q)},G.off=function(Q,W){if(Q==="query")Y.query.tryRemove(W);else throw Error("unknown event type: "+Q)},EE0=G,EE0}var ME0,qk1;function CG8(){if(qk1)return ME0;qk1=1;function $(Y){if(W())return Y;if(Q())return K(Y);var X="";for(var G=0;G<Y.length;++G){var J=Y[G].toUpperCase();if(J=parseInt(J,16),!isNaN(J))X+=J}return K(X);function Q(){var Z=/^-?\d+\.?\d*$/,H=new RegExp(Z);return typeof Y==="string"&&H.test(Y)}function W(){return typeof Y==="number"&&Math.floor(Y)===Y}function K(Z){var H="9223372036854775807";if(Z=Z.substring(0,19),Z>H)return Z.substring(0,18);return Z}}return ME0=$,ME0}var RE0,Pk1;function Dt(){if(Pk1)return RE0;Pk1=1;var $=rX(),Y=CG8();function X(J,Q){if(J=Y(J),typeof Q==="function")return G(J,Q);else{var W="SELECT pg_advisory_xact_lock("+J+")";return $(W)}}async function G(J,Q){await $("SELECT pg_advisory_lock("+J+")");try{let W=await Q();return await $("SELECT pg_advisory_unlock("+J+")"),W}catch(W){throw await $("SELECT pg_advisory_unlock("+J+")"),W}}return RE0=X,RE0}var qE0,wk1;function Nt(){if(wk1)return qE0;wk1=1;var $=rX();function Y(X,G){if(!G)throw Error("Missing schema");if(!Array.isArray(G))G=[G];return $(X,"SET LOCAL search_path TO "+G.join(","))}return qE0=Y,qE0}var PE0,_k1;function b2(){if(_k1)return PE0;_k1=1;function $(){let Y={};function X(G){return G(Y)}return Y.run=X,Y}return PE0=$,PE0}var wE0,jk1;function SG8(){if(jk1)return wE0;jk1=1;var $=Z5();function Y(X,G){var J=G.query;return Q;function Q(W,K){var Z=W.parameters,H=W.sql();return $.emitQuery({sql:H,parameters:Z}),J.call(G,H,Z,K)}}return wE0=Y,wE0}var _E0,Tk1;function kG8(){if(Tk1)return _E0;Tk1=1;var $=Z5();function Y(X,G){var J=G.query;return Q;function Q(W,K){var Z=W.parameters,H=W.sql();return $.emitQuery({sql:H,parameters:Z}),J.call(G,H,Z,z);function z(V,F){let L={rowsAffected:F?.affectedRows,...F};K(V,L)}}}return _E0=Y,_E0}var jE0,Ik1;function vG8(){if(Ik1)return jE0;Ik1=1;function $(Y){if(Y)return 1;return 0}return jE0=$,jE0}var TE0,Ck1;function WL(){if(Ck1)return TE0;Ck1=1;function $(Y,...X){let G=0;return Y.replace(/%s/g,()=>{return X[G++]})}return TE0=$,TE0}var IE0,Sk1;function Yb(){if(Sk1)return IE0;return Sk1=1,IE0=($)=>`\`${$}\``,IE0}var CE0,kk1;function xG8(){if(kk1)return CE0;kk1=1;let $="delete %s from %s as %s%s",Y=WL(),X=Yb();function G(J,Q,W){let K=X(J._dbName);return Q=X(Q),Y($,Q,K,Q,W)}return CE0=G,CE0}var SE0,vk1;function yG8(){if(vk1)return SE0;return vk1=1,SE0=function($){return" FOR UPDATE"},SE0}var kE0,xk1;function bG8(){if(xk1)return kE0;xk1=1;let $=Yb();function Y(X,G,J){return J.map((Q,W)=>{let K=G._primaryColumns[W];if(Q===void 0&&K.tsType==="NumberColumn")return`${$(K._dbName)}=LAST_INSERT_ID()`;else return K.eq(X,Q)})}return kE0=Y,kE0}var vE0,yk1;function hG8(){if(yk1)return vE0;yk1=1;function $(Y){if(Y.offset)return` limit ${Y.offset}${X()}`;else if(Y.limit||Y.limit===0)return` limit ${Y.limit}`;else return"";function X(){if(Y.limit||Y.limit===0)return`, ${Y.limit}`;else return""}}return vE0=$,vE0}var xE0,bk1;function fG8(){if(bk1)return xE0;bk1=1;let $=Yb();function Y(X,G){let J=$(X._dbName);if(G)return`CAST(${G}.${J} AS CHAR)`;else return`CAST(${J} AS CHAR)`}return xE0=Y,xE0}var yE0,hk1;function gG8(){if(hk1)return yE0;hk1=1;let $=Yb();function Y(X,G,J,Q){let W=[],K="",Z=[],H="INSERT INTO "+$(G._dbName)+" ";if(V(),F(),W.length===0)H+="VALUES ()";else H=H+"("+W.join(",")+") VALUES ("+Z.join(",")+")"+z();return H;function z(){if(Q.concurrency==="skipOnConflict"||Q.concurrency==="overwrite")return` ON DUPLICATE KEY UPDATE ${K} `;else return""}function V(){let L=G._columnDiscriminators;for(let N=0;N<L.length;N++){let D=L[N].split("=");W.push($(D[0])),Z.push(D[1])}}function F(){let L=[],N=G._columns;for(let A=0;A<N.length;A++){let B=N[A],O=$(B._dbName);if(J["__"+B.alias]!==void 0)W.push(O),Z.push("%s"),D(B)}if(L.length===0){let A=G._primaryColumns[0],B=$(A._dbName);L.push(`${B}=VALUES(${B})`)}K=L.join(",");function D(A){let B=Q[A.alias]?.concurrency||Q.concurrency,O=$(A._dbName),E=$(G._dbName);if(B==="overwrite")L.push(`${O}=VALUES(${O})`);else if(B==="optimistic")L.push(`${O} = CASE WHEN ${E}.${O} <> VALUES(${O}) THEN CAST('12345678-1234-1234-1234-123456789012Conflict when updating ${O}12345678-1234-1234-1234-123456789012' AS SIGNED) ELSE ${E}.${O} END`)}}}return yE0=Y,yE0}var bE0,fk1;function Hw(){if(fk1)return bE0;fk1=1;var $=cq0(),Y=ay(),X=Vt();function G(Q,W,K,Z){return new J(Q,W,K,Z)}function J(Q,W,K,Z){this.__getCoreCommand=$(Q),this._table=W,this._row=K,this._options=Z}return J.prototype._getCoreCommand=function(){return this.__getCoreCommand(this._table,this._row,this._options)},J.prototype.sql=function(){return this._getCoreCommand().sql()},J.prototype.matches=function(Q){return this._row===Q},J.prototype.endEdit=function(){this.sql();var Q=X(this._table,this._row);if(this._disallowCompress||this._table._emitChanged.callbacks.length>0)this._patch=Y([],[Q])},J.prototype.emitChanged=function(){return this._table._emitChanged({row:this._row,patch:this._patch})},Object.defineProperty(J.prototype,"parameters",{get:function(){return this._getCoreCommand().parameters}}),Object.defineProperty(J.prototype,"disallowCompress",{get:function(){return this._disallowCompress||this._table._emitChanged.callbacks.length>0},set:function(Q){this._disallowCompress=Q}}),bE0=G,bE0}var hE0,gk1;function mG8(){if(gk1)return hE0;gk1=1;let $=hG(),Y=f5();function X(J,Q,W){let K=$(J);if(K.insertSql)return K.insertSql.apply(null,arguments);else return G.apply(null,arguments)}function G(J,Q,W){let K=[],Z=[],H="INSERT INTO "+Y(J,Q._dbName)+" ";if(z(),V(),K.length===0)H+=`${L()}${N()}${F()}`;else H=H+"("+K.join(",")+") "+L()+"VALUES ("+Z.join(",")+")"+F();return H;function z(){let D=Q._columnDiscriminators;for(let A=0;A<D.length;A++){let B=D[A].split("=");K.push(Y(J,B[0])),Z.push(B[1])}}function V(){let D=Q._columns;for(let A=0;A<D.length;A++){let B=D[A];if(W["__"+B.alias]!==void 0)K.push(Y(J,B._dbName)),Z.push("%s")}}function F(){let D=$(J);if(!D.lastInsertedIsSeparate&&D.lastInsertedSql)return" "+D.lastInsertedSql(Q);return""}function L(){let D=$(J);if(!D.lastInsertedIsSeparate&&D.outputInsertedSql)return" "+D.outputInsertedSql(Q)+" ";return""}function N(){return`${$(J).insertDefault||"DEFAULT VALUES"}${F()}`}}return hE0=X,hE0}var fE0,mk1;function Xb(){if(mk1)return fE0;mk1=1;let $=Y9(),Y=mG8(),X=WL();function G(J,Q,W,K={}){let Z=[],H=[Y(J,Q,W,K)],z=Q._columns;for(let F=0;F<z.length;F++){let L=z[F],N=L.alias;if(W["__"+L.alias]!==void 0){let D=L.encode(J,W[N]);if(D.parameters.length>0)H.push(D.sql()),Z.push(D.parameters[0]);else H.push(D.sql())}}let V=X.apply(null,H);return $(V,Z)}return fE0=G,fE0}var gE0,uk1;function uG8(){if(uk1)return gE0;uk1=1;let $=Y9(),Y=hG(),X=Ut(),G=f5();function J(Q,W,K){let Z=[],H=W._primaryColumns.map((D)=>K["__"+D.alias]),z=`SELECT ${V()} FROM ${G(Q,W._dbName)} WHERE ${L()}`;return $(z,Z);function V(){return W._columns.map(F).join(",")}function F(D){let A=D.formatOut?D.formatOut(Q)+" as "+G(Q,D._dbName):G(Q,D._dbName);if(D.dbNull===null)return A;else{let B=D.encode.unsafe(Q,D.dbNull);return`CASE WHEN ${A}=${B} THEN null ELSE ${A} END`}}function L(){let D,A=Y(Q).lastInsertedSql(Q,W,H);if(Array.isArray(A))for(let B=0;B<A.length;B++){let O=B===0?"":" AND ";if(!A[B].sql){let M=A[B];A[B]={sql:()=>M}}let E=$(O+A[B].sql(),A[B].parameters);if(D)D=D.append(E);else D=E}else D=$(A);return Z=Z.concat(D.parameters),[N(),D.sql()].filter((B)=>B).join(" AND ")}function N(){return X(Q,W,W._dbName)}}return gE0=J,gE0}var mE0,pk1;function At(){if(pk1)return mE0;pk1=1;var $=uG8(),Y=cq0();function X(J,Q,W,K){let Z=new G(J,Q,W,K);return K.endEdit=()=>{},Z}function G(J,Q,W,K){this._insertCommand=K,this.__getCoreCommand=Y($.bind(null,J)),this._table=Q,this._row=W}return G.prototype._getCoreCommand=function(){return this.__getCoreCommand(this._table,this._row)},G.prototype.sql=function(){return this._getCoreCommand().sql()},G.prototype.matches=function(J){return this._row===J},G.prototype.endEdit=function(){this._insertCommand.endEdit(),this.sql()},Object.defineProperty(G.prototype,"parameters",{get:function(){return this._getCoreCommand().parameters}}),Object.defineProperty(G.prototype,"disallowCompress",{get:function(){return!0}}),mE0=X,mE0}var uE0,dk1;function pG8(){if(dk1)return uE0;dk1=1;let $=Hw(),Y=Xb(),X=At(),G=QZ(),J=wB();function Q(W,K,Z,H){let z=[],V=$(Y.bind(null,W),K,Z,H);V.disallowCompress=!0,J(W,V);let F=X(W,K,Z,V);return z.push(F),G(W,z).then((L)=>L[L.length-1])}return uE0=Q,uE0}var pE0,ck1;function dG8(){if(ck1)return pE0;ck1=1;let $=SG8(),Y=kG8(),X=vG8(),G=xG8(),J=yG8(),Q=bG8(),W=hG8(),K=fG8(),Z=gG8(),H=pG8(),z=Yb();function V(F,L,{readonly:N=!1}={}){var D={poolFactory:L};if(!L.connect)L=L(),D.pool=L;if(D.engine="mysql",D.encodeBoolean=X,D.encodeJSON=JSON.stringify,D.deleteFromSql=G,D.selectForUpdateSql=J,D.lastInsertedIsSeparate=!0,D.lastInsertedSql=Q,D.formatBigintOut=K,D.insertSql=Z,D.insert=H,D.multipleStatements=!1,D.limitAndOffset=W,D.accept=function(A){A.visitMySql()},D.aggregateCount=0,D.quote=z,D.cache={},N)return D.dbClient={executeQuery:function(A,B){L.connect((O,E,M)=>{if(O)return B(O);try{$(F,E)(A,(R,q)=>{M(),B(R,q)})}catch(R){M(),B(R)}})},executeCommand:function(A,B){L.connect((O,E,M)=>{if(O)return B(O);try{Y(F,E)(A,(R,q)=>{M(),B(R,q)})}catch(R){M(),B(R)}})}},F.rdb=D,(A)=>A();return function(A,B){L.connect(O);function O(E,M,R){try{if(E){B(E);return}M.executeQuery=$(F,M),M.executeCommand=Y(F,M),D.dbClient=M,D.dbClientDone=R,F.rdb=D,A()}catch(q){B(q)}}}}return pE0=V,pE0}var dE0,lk1;function cG8(){if(lk1)return dE0;lk1=1;let $=Y9(),Y=hG();return dE0=function(X){let G=$(Y(X).begin||"BEGIN");G.endEdit=J,G.matches=J;function J(){}return G},dE0}var cE0,ik1;function h2(){if(ik1)return cE0;ik1=1;let $=cG8(),Y=yq0(),X=nX();function G(J,Q){if(X(J,"changes",[]),Q)return X(J,"transactionLess",!0),Promise.resolve();return Y(J,$(J))}return cE0=G,cE0}var lE0,nk1;function f2(){if(nk1)return lE0;nk1=1;function $(Y){if(typeof Y!=="function")throw TypeError('The "original" argument must be of type Function');return function(...X){return new Promise((G,J)=>{function Q(W,...K){if(W)return J(W);return G(K.length>1?K:K[0])}Y.call(this,...X,Q)})}}return lE0=$,lE0}var iE0,rk1;function lG8(){if(rk1)return iE0;rk1=1;var $=V$();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return iE0=Y,iE0}var nE0,ak1;function WZ(){if(ak1)return nE0;return ak1=1,nE0={poolSize:0,poolIdleTimeout:30000,reapIntervalMillis:1000},nE0}var rE0,sk1;function KZ(){if(sk1)return rE0;sk1=1;function $(Q){if(typeof setImmediate==="function")setImmediate(Q);else if(typeof queueMicrotask==="function")queueMicrotask(Q);else setTimeout(Q,0)}function Y(Q){if(!(this instanceof Y))return new Y(Q);this._size=Math.max(+Q|0,1),this._slots=[],this._total=null;for(let W=0;W<this._size;W+=1)this._slots.push([])}Y.prototype.size=function(){if(this._total===null){this._total=0;for(let W=0;W<this._size;W+=1)this._total+=this._slots[W].length}return this._total},Y.prototype.enqueue=function(W,K){if(K=K&&+K|0||0,this._total=null,K<0||K>=this._size)console.error("invalid priority: "+K+" must be between 0 and "+(this._size-1)),K=this._size-1;this._slots[K].push(W)},Y.prototype.dequeue=function(){let W=null;this._total=null;for(let K=0,Z=this._slots.length;K<Z;K+=1)if(this._slots[K].length){W=this._slots[K].shift();break}return W};function X(Q,W,K){let Z=function(){if(Q())W(Z);else K()};Z()}function G(Q){if(!(this instanceof G))return new G(Q);if(Q.validate&&Q.validateAsync)throw Error("Only one of validate or validateAsync may be specified");Q.idleTimeoutMillis=Q.idleTimeoutMillis||30000,Q.returnToHead=Q.returnToHead||!1,Q.refreshIdle="refreshIdle"in Q?Q.refreshIdle:!0,Q.reapInterval=Q.reapIntervalMillis||1000,Q.priorityRange=Q.priorityRange||1,Q.validate=Q.validate||function(){return!0},Q.max=parseInt(Q.max,10),Q.min=parseInt(Q.min,10),Q.max=Math.max(isNaN(Q.max)?1:Q.max,1),Q.min=Math.min(isNaN(Q.min)?0:Q.min,Q.max-1),this._factory=Q,this._inUseObjects=[],this._draining=!1,this._waitingClients=new Y(Q.priorityRange),this._availableObjects=[],this._asyncTestObjects=[],this._count=0,this._removeIdleTimer=null,this._removeIdleScheduled=!1,this._ensureMinimum()}G.prototype._log=function(W,K){if(typeof this._factory.log==="function")this._factory.log(W,K);else if(this._factory.log)console.log(K.toUpperCase()+" pool "+this._factory.name+" - "+W)},G.prototype.destroy=function(W,K){if(this._count-=1,this._count<0)this._count=0;if(this._availableObjects=this._availableObjects.filter((Z)=>Z.obj!==W),this._inUseObjects=this._inUseObjects.filter((Z)=>Z!==W),this._factory.destroy(W,K),this._factory.destroy.length===1&&K&&typeof K==="function")K();this._ensureMinimum()},G.prototype._removeIdle=function(){let W=new Date().getTime(),K=this._factory.refreshIdle,Z=this._count-this._factory.min,H=[];this._removeIdleScheduled=!1;for(let z=0;z<this._availableObjects.length;z++){let V=this._availableObjects[z];if(W>=V.timeout&&(K||H.length<Z))this._log("removeIdle() destroying obj - now:"+W+" timeout:"+V.timeout,"verbose"),H.push(V.obj)}if(H.forEach((z)=>this.destroy(z)),this._availableObjects.length>0)this._log("this._availableObjects.length="+this._availableObjects.length,"verbose"),this._scheduleRemoveIdle();else this._log("removeIdle() all objects removed","verbose")},G.prototype._scheduleRemoveIdle=function(){if(!this._removeIdleScheduled)this._removeIdleScheduled=!0,this._removeIdleTimer=setTimeout(()=>{this._removeIdle()},this._factory.reapInterval)},G.prototype._dispense=function(){let W=this._waitingClients.size();if(this._log("dispense() clients="+W+" available="+this._availableObjects.length,"info"),W<1)return;if(this._factory.validateAsync){X(()=>this._availableObjects.length>0,this._createAsyncValidator(),()=>{if(this._count<this._factory.max)this._createResource()});return}while(this._availableObjects.length>0){this._log("dispense() - reusing obj","verbose");let K=this._availableObjects[0];if(!this._factory.validate(K.obj)){this.destroy(K.obj);continue}return this._availableObjects.shift(),this._inUseObjects.push(K.obj),this._waitingClients.dequeue()(null,K.obj)}if(this._count<this._factory.max)this._createResource()},G.prototype._createAsyncValidator=function(){return(W)=>{this._log("dispense() - reusing obj","verbose");let K=this._availableObjects.shift();this._asyncTestObjects.push(K),this._factory.validateAsync(K.obj,(Z)=>{let H=this._asyncTestObjects.indexOf(K);if(this._asyncTestObjects.splice(H,1),!Z)return this.destroy(K.obj),W();if(this._waitingClients.size()<1){this._addResourceToAvailableObjects(K.obj);return}this._inUseObjects.push(K.obj),this._waitingClients.dequeue()(null,K.obj)})}},G.prototype._createResource=function(){this._count+=1,this._log("createResource() - creating obj - count="+this._count+" min="+this._factory.min+" max="+this._factory.max,"verbose"),this._factory.create((...W)=>{let K,Z;if(W.length>1)[K,Z]=W;else K=W[0]instanceof Error?W[0]:null,Z=W[0]instanceof Error?null:W[0];let H=this._waitingClients.dequeue();if(K){if(this._count-=1,this._count<0)this._count=0;if(H)H(K,Z);$(()=>{this._dispense()})}else if(this._inUseObjects.push(Z),H)H(null,Z);else this._addResourceToAvailableObjects(Z)})},G.prototype._addResourceToAvailableObjects=function(Q){let W={obj:Q,timeout:new Date().getTime()+this._factory.idleTimeoutMillis};if(this._factory.returnToHead)this._availableObjects.unshift(W);else this._availableObjects.push(W);this._dispense(),this._scheduleRemoveIdle()},G.prototype._ensureMinimum=function(){if(!this._draining&&this._count<this._factory.min){let W=this._factory.min-this._count;for(let K=0;K<W;K++)this._createResource()}},G.prototype.acquire=function(W,K){if(this._draining)throw Error("pool is draining and cannot accept work");return this._waitingClients.enqueue(W,K),this._dispense(),this._count<this._factory.max},G.prototype.borrow=function(W,K){return this._log("borrow() is deprecated. use acquire() instead","warn"),this.acquire(W,K)},G.prototype.release=function(W){if(this._availableObjects.some((H)=>H.obj===W)){this._log("release called twice for the same resource: "+Error().stack,"error");return}let Z=this._inUseObjects.indexOf(W);if(Z<0){this._log("attempt to release an invalid resource: "+Error().stack,"error");return}this._inUseObjects.splice(Z,1),this._addResourceToAvailableObjects(W)},G.prototype.returnToPool=function(W){this._log("returnToPool() is deprecated. use release() instead","warn"),this.release(W)};function J(Q){$(Q)}return G.prototype.drain=function(W){this._log("draining","info"),this._draining=!0;let K=()=>{if(this._waitingClients.size()>0)return setTimeout(K,100);if(this._asyncTestObjects.length>0)return setTimeout(K,100);if(this._availableObjects.length!==this._count)return setTimeout(K,100);if(W)J(W)};K()},G.prototype.destroyAllNow=function(W){this._log("force destroying all objects","info");let K=this._availableObjects;this._availableObjects=[];let Z=K.length,H=0;if(this._removeIdleScheduled=!1,clearTimeout(this._removeIdleTimer),Z===0&&W){J(W);return}while(K.length>0){let{obj:z}=K.shift();this.destroy(z,()=>{if(H+=1,H===Z&&W)J(W)})}},G.prototype.pooled=function(W,K){return(...Z)=>{let H=Z[Z.length-1],z=typeof H==="function";this.acquire((V,F)=>{if(V){if(z)H(V);return}let L=[F].concat(Z.slice(0,z?-1:void 0));L.push((...N)=>{if(this.release(F),z)H(...N)}),W(...L)},K)}},G.prototype.getPoolSize=function(){return this._count},G.prototype.getName=function(){return this._factory.name},G.prototype.availableObjectsCount=function(){return this._availableObjects.length},G.prototype.inUseObjectsCount=function(){return this._inUseObjects.length},G.prototype.waitingClientsCount=function(){return this._waitingClients.size()},G.prototype.getMaxPoolSize=function(){return this._factory.max},G.prototype.getMinPoolSize=function(){return this._factory.min},rE0={Pool:G},rE0}var aE0,ok1;function iG8(){if(ok1)return aE0;ok1=1;var $=WZ(),Y=KZ(),X;function G(J,Q){if(typeof J==="string")J=J+"?dateStrings=true&decimalNumbers=true";else J.dateStrings=!0;Q=Q||{};var W=Y.Pool({min:Q.min||0,max:Q.size||Q.poolSize||$.poolSize,idleTimeoutMillis:Q.idleTimeout||$.poolIdleTimeout,reapIntervalMillis:Q.reapIntervalMillis||$.reapIntervalMillis,log:Q.log,create:async function(K){try{if(!X)X=await Promise.resolve().then(() => U6(ZH0(),1)),X=X.default||X}catch(H){return K(H,null)}var Z=X.createPool(J);return K(null,Z)},destroy:function(K){K.poolCount=void 0,K.end()}});return W.connect=function(K){W.acquire(function(Z,H){if(Z)return K(Z,null,function(){});H.poolCount++,K(null,H,function(z){if(z)W.destroy(H);else W.release(H)})})},W}return aE0=G,aE0}var sE0,tk1;function nG8(){if(tk1)return sE0;tk1=1;let $=f2(),Y=V$(),X=lG8(),G=iG8(),J=UW();function Q(W,K){let Z=G(W,K),H=J(),z=X.bind(null,Z,H),V={};return V.connect=Z.connect,V.end=$(z),Y[H]=V,V}return sE0=Q,sE0}var oE0,ek1;function $v1(){if(ek1)return oE0;ek1=1;let $=b2(),Y=dG8(),X=h2(),G=HW(),J=zW(),Q=nG8(),W=QQ(),K=WQ(),Z=rX(),H=fG(),z=nX();function V(F,L){if(!F)throw Error("Connection string cannot be empty");L=L||{min:1};var N=Q(F,L);let D={poolFactory:N,hostLocal:K,express:W};return D.transaction=function(A,B){if(arguments.length===1&&typeof A==="function")B=A,A=void 0;let O=$();if(B)return O.run(E);else return O.run(R);async function E(){let q,_=Y(O,N,A);return await new Promise(_).then(M).then(()=>B(O)).then((P)=>q=P).then(()=>G(O)).then(null,(P)=>J(O,P)),q}function M(){return X(O,A)}function R(){let q,_=Y(O,N,A);return q=new Promise(_),q.then(M)}},D.createTransaction=function(A){let B=$(),O=Y(B,N),E=B.run(()=>new Promise(O).then(R));function M(q){return E.then(()=>q(B))}return M.rollback=J.bind(null,B),M.commit=G.bind(null,B),M;function R(){return X(B,A)}},D.query=function(A){let B=$(),O=Y(B,N);return B.run(()=>new Promise(O).then(()=>z(B,"changes",[])).then(()=>Z(B,A).then(M,R)));function M(q){return H(B),q}function R(q){throw H(B),q}},D.rollback=J,D.commit=G,D.end=function(){if(L)return N.end();else return Promise.resolve()},D.accept=function(A){A.visitMySql()},D}return oE0=V,oE0}var tE0,Yv1;function zw(){if(Yv1)return tE0;Yv1=1;function $(Y,X){if(X.length===0)return Y.sql();var G=Y.sql().split("?"),J="",Q=G.length-1;for(var W=0;W<Q;W++)J+=G[W]+"$"+(W+1);return J+=G[Q],J}return tE0=$,tE0}var eE0,Xv1;function rG8(){if(Xv1)return eE0;Xv1=1;var $=Z5(),Y=zw();function X(G,J){var Q=J.query;return W;function W(K,Z){var H=K.parameters,z=Y(K,H);$.emitQuery({sql:z,parameters:H}),Q.call(J,z,H).then((F)=>V(null,F),(F)=>V(F));function V(F,L){if(F)Z(F);else{if(Array.isArray(L))L=L[L.length-1];Z(null,L.rows)}}}}return eE0=X,eE0}var $M0,Gv1;function aG8(){if(Gv1)return $M0;Gv1=1;var $=Z5(),Y=zw();function X(G,J){var Q=J.query;return W;function W(K,Z){var H=K.parameters,z=Y(K,H);$.emitQuery({sql:z,parameters:H}),Q.call(J,z,H).then((F)=>V(null,F),(F)=>V(F));function V(F,L){if(F)return Z(F);if(Array.isArray(L))L=L[L.length-1];Z(null,{rowsAffected:L.affectedRows})}}}return $M0=X,$M0}var YM0,Jv1;function tq0(){if(Jv1)return YM0;Jv1=1;function $(Y){if(Y.toISOString)return"'"+Y.toISOString()+"'";return"'"+Y+"'"}return YM0=$,YM0}var XM0,Qv1;function Bt(){if(Qv1)return XM0;Qv1=1;function $(Y){let X=atob(Y),G=X.length,J=new Uint8Array(G);for(let Q=0;Q<G;Q++)J[Q]=X.charCodeAt(Q);return J}return XM0=$,XM0}var GM0,Wv1;function Ot(){if(Wv1)return GM0;Wv1=1;function $(Y){let X="";for(let G=0;G<Y.length;G++)X+=String.fromCharCode(Y[G]);return btoa(X)}return GM0=$,GM0}var JM0,Kv1;function Vw(){if(Kv1)return JM0;return Kv1=1,JM0=($)=>`"${$}"`,JM0}var QM0,Zv1;function eq0(){if(Zv1)return QM0;Zv1=1;let $="delete from %s %s%s",Y=WL(),X=Vw();function G(J,Q,W){let K=X(J._dbName);return Q=X(Q),Y($,K,Q,W)}return QM0=G,QM0}var WM0,Uv1;function $P0(){if(Uv1)return WM0;Uv1=1;let $=f5();return WM0=function(Y){return" FOR UPDATE OF "+$(Y)},WM0}var KM0,Hv1;function YP0(){if(Hv1)return KM0;Hv1=1;function $(Y){if(Y.offset)return` limit ${X()} offset ${Y.offset}`;else if(Y.limit||Y.limit===0)return` limit ${Y.limit}`;else return"";function X(){if(Y.limit||Y.limit===0)return Y.limit;else return"all"}}return KM0=$,KM0}var ZM0,zv1;function XP0(){if(zv1)return ZM0;zv1=1;function $(Y,X){if(X)return`${X}."${Y._dbName}"::text`;else return`"${Y._dbName}"::text`}return ZM0=$,ZM0}var UM0,Vv1;function sG8(){if(Vv1)return UM0;Vv1=1;let $=Vw();function Y(X){let G="",J="RETURNING ";for(let Q=0;Q<X._columns.length;Q++)J+=G+$(X._columns[Q]._dbName),G=",";return J}return UM0=Y,UM0}var HM0,Fv1;function GP0(){if(Fv1)return HM0;Fv1=1;let $=sG8(),Y=Vw();function X(G,J,Q,W){let K=[],Z="",H=[],z="INSERT INTO "+Y(J._dbName)+" ";if(F(),L(),K.length===0)z+=`${N()}DEFAULT VALUES ${$(J)}`;else z=z+"("+K.join(",")+") "+N()+"VALUES ("+H.join(",")+")"+V()+$(J);return z;function V(){if(W.concurrency==="skipOnConflict"||W.concurrency==="overwrite")return` ON CONFLICT(${J._primaryColumns.map((A)=>Y(A._dbName)).join(",")}) ${Z} `;else return""}function F(){let D=J._columnDiscriminators;for(let A=0;A<D.length;A++){let B=D[A].split("=");K.push(Y(B[0])),H.push(B[1])}}function L(){let D=[],A=J._columns;for(let O=0;O<A.length;O++){let E=A[O],M=Y(E._dbName);if(Q["__"+E.alias]!==void 0)K.push(M),H.push("%s"),B(E)}if(D.length===0)Z="DO NOTHING";else Z="DO UPDATE SET "+D.join(",");function B(O){let E=W[O.alias]?.concurrency||W.concurrency,M=Y(O._dbName),R=Y(J._dbName);if(E==="overwrite")D.push(`${M}=EXCLUDED.${M}`);else if(E==="optimistic")D.push(`${M} = CASE WHEN ${R}.${M} <> EXCLUDED.${M} THEN CAST(random()::int || '12345678-1234-1234-1234-123456789012Conflict when updating ${M}12345678-1234-1234-1234-123456789012' AS INTEGER) ELSE ${R}.${M} END`)}}function N(){return""}}return HM0=X,HM0}var zM0,Lv1;function JP0(){if(Lv1)return zM0;Lv1=1;let $=Hw(),Y=Xb(),X=QZ();function G(J,Q,W,K){let Z=$(Y.bind(null,J),Q,W,K);return Z.disallowCompress=!0,X(J,[Z]).then((H)=>H[H.length-1])}return zM0=G,zM0}var VM0,Dv1;function oG8(){if(Dv1)return VM0;Dv1=1;var $=rG8(),Y=aG8(),X=tq0();let G=Bt(),J=Ot();var Q=eq0(),W=$P0(),K=YP0(),Z=XP0(),H=GP0(),z=JP0(),V=Vw();function F(L,N,{readonly:D=!1}={}){var A={poolFactory:N};if(!N.connect)N=N();if(A.engine="pg",A.encodeDate=X,A.encodeBinary=G,A.decodeBinary=J,A.formatDateOut=Z,A.deleteFromSql=Q,A.selectForUpdateSql=W,A.lastInsertedIsSeparate=!1,A.insertSql=H,A.insert=z,A.multipleStatements=!0,A.limitAndOffset=K,A.accept=function(B){B.visitPg()},A.aggregateCount=0,A.quote=V,A.cache={},D)return A.dbClient={executeQuery:function(B,O){N.connect((E,M,R)=>{if(E)return O(E);try{$(L,M)(B,(q,_)=>{R(),O(q,_)})}catch(q){R(),O(q)}})},executeCommand:function(B,O){N.connect((E,M,R)=>{if(E)return O(E);try{Y(L,M)(B,(q,_)=>{R(),O(q,_)})}catch(q){R(),O(q)}})}},L.rdb=A,(B)=>B();return function(B,O){N.connect(E);function E(M,R,q){try{if(M){O(M);return}R.executeQuery=$(L,R),R.executeCommand=Y(L,R),A.dbClient=R,A.dbClientDone=q,L.rdb=A,B()}catch(_){O(_)}}}}return VM0=F,VM0}var FM0,Nv1;function tG8(){if(Nv1)return FM0;Nv1=1;var $=V$();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return FM0=Y,FM0}var LM0,Av1;function eG8(){if(Av1)return LM0;Av1=1;let $=Z5(),Y=WZ(),X=KZ(),G;function J(K,Z={}){let{connStr:H,searchPath:z}=W(K),V=X.Pool({min:Z.min||0,max:Z.size||Z.poolSize||Y.poolSize,idleTimeoutMillis:Z.idleTimeout||Y.poolIdleTimeout,reapIntervalMillis:Z.reapIntervalMillis||Y.reapIntervalMillis,log:Z.log,create:async(F)=>{try{if(!G)({PGlite:G}=await import("@electric-sql/pglite"));let L=H===void 0?new G:new G(H);L.poolCount=0,await Q(L,z),F(null,L)}catch(L){F(L,null)}},destroy:(F)=>{F._destroying=!0,F.poolCount=void 0,F.close()}});return V.connect=(F)=>{V.acquire((L,N)=>{if(L)return F(L,null,()=>{});N.poolCount++,F(null,N,(D)=>{D?V.destroy(N):V.release(N)})})},V}async function Q(K,Z){if(Z){let H=`SET search_path TO ${Z}`;$.emitQuery({sql:H,parameters:[]}),await K.exec(H)}}function W(K){let Z=K,H;if(typeof K!=="string"||K.length===0)return{connStr:Z,searchPath:H};let z=K.indexOf("?");if(z===-1)return{connStr:Z,searchPath:H};let V=K.slice(0,z),F=K.slice(z+1),L=new URLSearchParams(F),N="search_path";H=L.get(N),L.delete(N);let D=L.toString();return Z=D?`${V}?${D}`:V,{connStr:Z,searchPath:H}}return LM0=J,LM0}var DM0,Bv1;function $J8(){if(Bv1)return DM0;Bv1=1;let $=f2(),Y=V$(),X=tG8(),G=eG8(),J=UW();function Q(W,K){let Z=G(W,K),H=J(),z=X.bind(null,Z,H),V={};return V.connect=Z.connect,V.end=$(z),Y[H]=V,V}return DM0=Q,DM0}var NM0,Ov1;function YJ8(){if(Ov1)return NM0;Ov1=1;let $=b2(),Y=oG8(),X=h2(),G=HW(),J=zW(),Q=$J8(),W=Dt(),K=Nt(),Z=QQ(),H=WQ(),z=rX(),V=fG(),F=nX();function L(N,D){D=D||{min:1};var A=Q(N,D);let B={poolFactory:A,hostLocal:H,express:Z};return B.transaction=function(O,E){if(arguments.length===1&&typeof O==="function")E=O,O=void 0;let M=$();if(E)return M.run(R);else return M.run(_);async function R(){let w,j=Y(M,A,O);return await new Promise(j).then(q).then(P).then(()=>E(M)).then((C)=>w=C).then(()=>G(M)).then(null,(C)=>J(M,C)),w}function q(){return X(M,O)}function _(){let w,j=Y(M,A,O);return w=new Promise(j),w.then(q).then(P)}function P(w){let j=O&&O.schema;if(!j)return w;return K(M,j)}},B.createTransaction=function(O){let E=$(),M=Y(E,A,O),R=E.run(()=>new Promise(M).then(_).then(P));function q(w){return R.then(E.run.bind(E,w))}function _(){return X(E,O)}function P(w){let j=O&&O.schema;if(!j)return w;return K(E,j)}return q.rollback=J.bind(null,E),q.commit=G.bind(null,E),q},B.query=function(O){let E=$(),M=Y(E,A);return E.run(()=>new Promise(M).then(()=>F(E,"changes",[])).then(()=>z(E,O).then(q,_)));function q(P){return V(E),P}function _(P){throw V(E),P}},B.rollback=J,B.commit=G,B.lock=W,B.schema=K,B.end=function(){if(D)return A.end();else return Promise.resolve()},B.accept=function(O){O.visitPg()},B}return NM0=L,NM0}var AM0,Ev1;function XJ8(){if(Ev1)return AM0;Ev1=1;let $=Z5(),Y=zw(),X=Kw();function G(Q,W){return K;async function K(Z,H){try{$.emitQuery({sql:Z.sql(),parameters:Z.parameters});let z=Y(Z,Z.parameters),V=Array.isArray(Z.parameters)?Z.parameters:[],F=X(Q),L=F.transactionHandler;if(z.length<18&&V.length===0){let A=z.trim().toUpperCase();if(A==="BEGIN"||A==="BEGIN TRANSACTION"){if(L&&!L.closing)return H(Error("Already inside a transaction"),[]);J(W).then((B)=>{F.transactionHandler=B,H(null,[])},(B)=>H(B,[]));return}if(A==="COMMIT"){if(!L)return H(Error("Cannot commit outside transaction"),[]);try{L.closing=!0,L.resolve(),await L.settled,L.closed=!0,F.transactionHandler=void 0,H(null,[])}catch(B){L.closed=!0,F.transactionHandler=void 0,H(B,[])}return}if(A==="ROLLBACK"){if(!L)return H(Error("Cannot rollback outside transaction"),[]);try{L.closing=!0,L.reject(Error("__rollback__"));try{await L.settled}catch(B){if(B?.message!=="__rollback__")throw B}L.closed=!0,F.transactionHandler=void 0,H(null,[])}catch(B){L.closed=!0,F.transactionHandler=void 0,H(B,[])}return}}let N=L&&L.tx&&!L.closing?L.tx:W,D=V.length===0?await N.unsafe(z):await N.unsafe(z,V);H(null,D)}catch(z){H(z)}}}function J(Q){let W,K,Z,H,z=new Promise((L,N)=>{W=L,K=N}),V=new Promise((L,N)=>{Z=L,H=N}),F=Q.begin(async(L)=>{return Z({tx:L,resolve:W,reject:K,promise:z,settled:null,closing:!1,closed:!1}),z}).then(()=>{},(L)=>{if(L?.message!=="__rollback__")throw L});return F.then(null,()=>{}),V.then((L)=>{L.settled=F},()=>{}),F.catch((L)=>{if(!Z)H?.(L)}),V}return AM0=G,AM0}var BM0,Mv1;function GJ8(){if(Mv1)return BM0;Mv1=1;let $=Z5(),Y=zw(),X=Kw();function G(Q,W){return K;async function K(Z,H){try{$.emitQuery({sql:Z.sql(),parameters:Z.parameters});let z=Y(Z,Z.parameters),V=Array.isArray(Z.parameters)?Z.parameters:[],F=X(Q),L=F.transactionHandler;if(z.length<18&&V.length===0){let B=z.trim().toUpperCase();if(B==="BEGIN"||B==="BEGIN TRANSACTION"){if(L&&!L.closing)return H(Error("Already inside a transaction"),{rowsAffected:0});J(W).then((O)=>{F.transactionHandler=O,H(null,{rowsAffected:0})},(O)=>H(O,{rowsAffected:0}));return}if(B==="COMMIT"){if(!L)return H(Error("Cannot commit outside transaction"),{rowsAffected:0});try{L.closing=!0,L.resolve(),await L.settled,L.closed=!0,F.transactionHandler=void 0,H(null,{rowsAffected:0})}catch(O){L.closed=!0,F.transactionHandler=void 0,H(O,{rowsAffected:0})}return}if(B==="ROLLBACK"){if(!L)return H(Error("Cannot rollback outside transaction"),{rowsAffected:0});try{L.closing=!0,L.reject(Error("__rollback__"));try{await L.settled}catch(O){if(O?.message!=="__rollback__")throw O}L.closed=!0,F.transactionHandler=void 0,H(null,{rowsAffected:0})}catch(O){L.closed=!0,F.transactionHandler=void 0,H(O,{rowsAffected:0})}return}}let N=L&&L.tx&&!L.closing?L.tx:W,D=V.length===0?await N.unsafe(z):await N.unsafe(z,V),A=0;if(D!=null){if(typeof D.rowCount==="number")A=D.rowCount;else if(typeof D.count==="number")A=D.count;else if(typeof D.changes==="number")A=D.changes;else if(typeof D.affectedRows==="number")A=D.affectedRows}H(null,{rowsAffected:A})}catch(z){H(z,{rowsAffected:0})}}}function J(Q){let W,K,Z,H,z=new Promise((L,N)=>{W=L,K=N}),V=new Promise((L,N)=>{Z=L,H=N}),F=Q.begin(async(L)=>{return Z({tx:L,resolve:W,reject:K,promise:z,settled:null,closing:!1,closed:!1}),z}).then(()=>{},(L)=>{if(L?.message!=="__rollback__")throw L});return F.then(null,()=>{}),V.then((L)=>{L.settled=F},()=>{}),F.catch((L)=>{if(!Z)H?.(L)}),V}return BM0=G,BM0}var OM0,Rv1;function JJ8(){if(Rv1)return OM0;Rv1=1;function $(Y){return`${Y}::jsonb`}return OM0=$,OM0}var EM0,qv1;function _b1(){if(qv1)return EM0;qv1=1;function $(X){if(Array.isArray(X))return new Y(X);else return X}class Y{constructor(X){this.actualArray=X}toPostgres(){return JSON.stringify(this.actualArray)}}return EM0=$,EM0}var MM0,Pv1;function QJ8(){if(Pv1)return MM0;Pv1=1;var $=XJ8(),Y=GJ8(),X=tq0();let G=Bt(),J=Ot();var Q=eq0(),W=$P0(),K=YP0(),Z=XP0(),H=JJ8(),z=_b1(),V=GP0(),F=JP0(),L=Vw();function N(D,A,{readonly:B=!1}={}){var O={poolFactory:A};if(!A.connect)A=A(),O.pool=A;if(O.engine="pg",O.encodeDate=X,O.encodeBinary=G,O.decodeBinary=J,O.formatJSONIn=H,O.encodeJSON=z,O.formatDateOut=Z,O.deleteFromSql=Q,O.selectForUpdateSql=W,O.lastInsertedIsSeparate=!1,O.insertSql=V,O.insert=F,O.multipleStatements=!0,O.limitAndOffset=K,O.accept=function(E){E.visitPg()},O.aggregateCount=0,O.quote=L,O.cache={},B)return O.dbClient={executeQuery:function(E,M){A.connect((R,q,_)=>{if(R)return M(R);try{$(D,q)(E,(P,w)=>{_(),M(P,w)})}catch(P){_(),M(P)}})},executeCommand:function(E,M){A.connect((R,q,_)=>{if(R)return M(R);try{Y(D,q)(E,(P,w)=>{_(),M(P,w)})}catch(P){_(),M(P)}})}},D.rdb=O,(E)=>E();return function(E,M){A.connect(R);function R(q,_,P){try{if(q){M(q);return}_.executeQuery=$(D,_),_.executeCommand=Y(D,_),O.dbClient=_,O.dbClientDone=P,D.rdb=O,E()}catch(w){M(w)}}}}return MM0=N,MM0}var RM0,wv1;function WJ8(){if(wv1)return RM0;wv1=1;var $=V$();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return RM0=Y,RM0}var qM0,_v1;function KJ8(){if(_v1)return qM0;_v1=1;let $=Z5(),Y=WZ(),X=KZ(),G;function J(W,K={}){let Z,H=W;try{let V=new URL(W),F=V.searchParams.has("search_path")?"search_path":V.searchParams.has("searchPath")?"searchPath":null;if(F)Z=V.searchParams.get(F),V.searchParams.delete(F),H=V.toString()}catch{}let z=X.Pool({min:K.min||0,max:K.size||K.poolSize||Y.poolSize,idleTimeoutMillis:K.idleTimeout||Y.poolIdleTimeout,reapIntervalMillis:K.reapIntervalMillis||Y.reapIntervalMillis,log:K.log,create:async(V)=>{try{if(!G)({SQL:G}=awaitPromise.resolve(globalThis.Bun));let F=new G(H);F.poolCount=0,await Q(F,Z),V(null,F)}catch(F){V(F,null)}},destroy:(V)=>{V._destroying=!0,V.poolCount=void 0,V.end()}});return z.connect=(V)=>{z.acquire((F,L)=>{if(F)return V(F,null,()=>{});L.poolCount++,V(null,L,(N)=>{N?z.destroy(L):z.release(L)})})},z}async function Q(W,K){if(K){let Z=`SET search_path TO ${K}`;$.emitQuery({sql:Z,parameters:[]}),await W.unsafe(Z)}}return qM0=J,qM0}var PM0,jv1;function ZJ8(){if(jv1)return PM0;jv1=1;let $=f2(),Y=V$(),X=WJ8(),G=KJ8(),J=UW();function Q(W,K){let Z=G(W,K),H=J(),z=X.bind(null,Z,H),V={};return V.connect=Z.connect,V.end=$(z),Y[H]=V,V}return PM0=Q,PM0}var wM0,Tv1;function Iv1(){if(Tv1)return wM0;Tv1=1;let $=b2(),Y=QJ8(),X=h2(),G=HW(),J=zW(),Q=ZJ8(),W=Dt(),K=Nt(),Z=QQ(),H=WQ(),z=rX(),V=fG(),F=nX();function L(N,D){if(!N)throw Error("Connection string cannot be empty");D=D||{min:1};var A=Q(N,D);let B={poolFactory:A,hostLocal:H,express:Z};return B.transaction=function(O,E){if(arguments.length===1&&typeof O==="function")E=O,O=void 0;let M=$();if(E)return M.run(R);else return M.run(_);async function R(){let w,j=Y(M,A,O);return await new Promise(j).then(q).then(P).then(()=>E(M)).then((C)=>w=C).then(()=>G(M)).then(null,(C)=>J(M,C)),w}function q(){return X(M,O)}function _(){let w,j=Y(M,A,O);return w=new Promise(j),w.then(q).then(P)}function P(w){let j=O&&O.schema;if(!j)return w;return K(M,j)}},B.createTransaction=function(O){let E=$(),M=Y(E,A,O),R=E.run(()=>new Promise(M).then(_).then(P));function q(w){return R.then(E.run.bind(E,w))}function _(){return X(E,O)}function P(w){let j=O&&O.schema;if(!j)return w;return K(E,j)}return q.rollback=J.bind(null,E),q.commit=G.bind(null,E),q},B.query=function(O){let E=$(),M=Y(E,A);return E.run(()=>new Promise(M).then(()=>F(E,"changes",[])).then(()=>z(E,O).then(q,_)));function q(P){return V(E),P}function _(P){throw V(E),P}},B.rollback=J,B.commit=G,B.lock=W,B.schema=K,B.end=function(){if(D)return A.end();else return Promise.resolve()},B.accept=function(O){O.visitPg()},B}return wM0=L,wM0}var _M0,Cv1;function UJ8(){if(Cv1)return _M0;Cv1=1;var $=Z5(),Y=zw();function X(G,J){var Q=J.query;return W;function W(K,Z){var H=K.parameters;$.emitQuery({sql:K.sql(),parameters:H});var z=Y(K,H);K={text:z,values:H,types:K.types},Q.call(J,K,V);function V(F,L){if(F)Z(F);else{if(Array.isArray(L))L=L[L.length-1];Z(null,L.rows)}}}}return _M0=X,_M0}var jM0,Sv1;function HJ8(){if(Sv1)return jM0;Sv1=1;var $=Z5(),Y=zw();function X(G,J){var Q=J.query;return W;function W(K,Z){var H=K.parameters;$.emitQuery({sql:K.sql(),parameters:H});var z=Y(K,H);K={text:z,values:H,types:K.types},Q.call(J,K,V);function V(F,L){if(F)Z(F);else Z(null,{rowsAffected:L.rowCount})}}}return jM0=X,jM0}var TM0,kv1;function zJ8(){if(kv1)return TM0;kv1=1;function $(Y){return Y.toString()}return TM0=$,TM0}var IM0,vv1;function VJ8(){if(vv1)return IM0;vv1=1;var $=UJ8(),Y=HJ8(),X=tq0(),G=zJ8(),J=eq0(),Q=$P0(),W=YP0(),K=XP0(),Z=_b1(),H=GP0(),z=JP0(),V=Vw();function F(L,N,{readonly:D=!1}={}){var A={poolFactory:N};if(!N.connect)N=N(),A.pool=N;if(A.engine="pg",A.encodeBoolean=G,A.encodeDate=X,A.encodeJSON=Z,A.formatDateOut=K,A.deleteFromSql=J,A.selectForUpdateSql=Q,A.lastInsertedIsSeparate=!1,A.insertSql=H,A.insert=z,A.multipleStatements=!0,A.limitAndOffset=W,A.accept=function(B){B.visitPg()},A.aggregateCount=0,A.quote=V,A.cache={},D)return A.dbClient={executeQuery:function(B,O){N.connect((E,M,R)=>{if(E)return O(E);try{$(L,M)(B,(q,_)=>{R(),O(q,_)})}catch(q){R(),O(q)}})},executeCommand:function(B,O){N.connect((E,M,R)=>{if(E)return O(E);try{Y(L,M)(B,(q,_)=>{R(),O(q,_)})}catch(q){R(),O(q)}})}},L.rdb=A,(B)=>B();return function(B,O){N.connect(E);function E(M,R,q){try{if(M){O(M);return}R.executeQuery=$(L,R),R.executeCommand=Y(L,R),A.dbClient=R,A.dbClientDone=q,L.rdb=A,B()}catch(_){O(_)}}}}return IM0=F,IM0}var CM0,xv1;function FJ8(){if(xv1)return CM0;xv1=1;var $=V$();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return CM0=Y,CM0}var SM0,yv1;function LJ8(){if(yv1)return SM0;yv1=1;function $(Y=""){let[,X]=Y.split("?");if(!X)return;return new URLSearchParams(X).get("search_path")}return SM0=$,SM0}var kM0,bv1;function DJ8(){if(bv1)return kM0;bv1=1;var $=Z5(),Y=WZ(),X=KZ(),G,J=LJ8();function Q(K,Z){Z=Z||{};var H=X.Pool({min:Z.min||0,max:Z.size||Z.poolSize||Y.poolSize,idleTimeoutMillis:Z.idleTimeout||Y.poolIdleTimeout,reapIntervalMillis:Z.reapIntervalMillis||Y.reapIntervalMillis,log:Z.log,create:async function(z){try{if(!G)G=await Promise.resolve().then(() => (Hx(),UV1)),G=G.default||G,(G.types||G.types).setTypeParser(1700,function(L){return parseFloat(L)})}catch(F){return z(F,null)}var V=new G.Client(K);V.connect(function(F){if(F)return z(F,null);V.on("error",function(L){if(H.emit("error",L,V),!V._destroying)H.destroy(V)}),V.on("end",function(L){if(!V._destroying)H.destroy(V)}),V.poolCount=0,W(V,K,(L)=>z(L,V))})},destroy:function(z){z._destroying=!0,z.poolCount=void 0,z.end()}});return H.connect=function(z){H.acquire(function(V,F){if(V)return z(V,null,function(){});F.poolCount++,z(null,F,function(L){if(L)H.destroy(F);else H.release(F)})})},H}function W(K,Z,H){let z=J(Z);if(z){let V=`set search_path to ${z}`;return $.emitQuery({sql:V,parameters:[]}),K.query(V,H)}else H()}return kM0=Q,kM0}var vM0,hv1;function NJ8(){if(hv1)return vM0;hv1=1;let $=f2(),Y=V$(),X=FJ8(),G=DJ8(),J=UW();function Q(W,K){let Z=G(W,K),H=J(),z=X.bind(null,Z,H),V={};return V.connect=Z.connect,V.end=$(z),Y[H]=V,V}return vM0=Q,vM0}var xM0,fv1;function gv1(){if(fv1)return xM0;fv1=1;let $=b2(),Y=VJ8(),X=h2(),G=HW(),J=zW(),Q=NJ8(),W=Dt(),K=Nt(),Z=QQ(),H=WQ(),z=rX(),V=fG(),F=nX();function L(N,D){if(!N)throw Error("Connection string cannot be empty");D=D||{min:1};var A=Q(N,D);let B={poolFactory:A,hostLocal:H,express:Z};return B.transaction=function(O,E){if(arguments.length===1&&typeof O==="function")E=O,O=void 0;let M=$();if(E)return M.run(R);else return M.run(_);async function R(){let w,j=Y(M,A,O);return await new Promise(j).then(q).then(P).then(()=>E(M)).then((C)=>w=C).then(()=>G(M)).then(null,(C)=>J(M,C)),w}function q(){return X(M,O)}function _(){let w,j=Y(M,A,O);return w=new Promise(j),w.then(q).then(P)}function P(w){let j=O&&O.schema;if(!j)return w;return K(M,j)}},B.createTransaction=function(O){let E=$(),M=Y(E,A,O),R=E.run(()=>new Promise(M).then(_).then(P));function q(w){return R.then(E.run.bind(E,w))}function _(){return X(E,O)}function P(w){let j=O&&O.schema;if(!j)return w;return K(E,j)}return q.rollback=J.bind(null,E),q.commit=G.bind(null,E),q},B.query=function(O){let E=$(),M=Y(E,A);return E.run(()=>new Promise(M).then(()=>F(E,"changes",[])).then(()=>z(E,O).then(q,_)));function q(P){return V(E),P}function _(P){throw V(E),P}},B.rollback=J,B.commit=G,B.lock=W,B.schema=K,B.end=function(){if(D)return A.end();else return Promise.resolve()},B.accept=function(O){O.visitPg()},B}return xM0=L,xM0}var yM0,mv1;function AJ8(){if(mv1)return yM0;mv1=1;let $=Z5(),Y=new WeakMap;function X(G,J){let Q=Y.get(J);if(!Q)Q=new Map,Y.set(J,Q);return W;function W(K,Z){try{var H=K.parameters,z=K.sql();$.emitQuery({sql:z,parameters:H});let V=Q.get(z);if(!V)V=J.prepare(z),Q.set(z,V);let F=V.all.apply(V,H);Z(null,F)}catch(V){Z(V)}}}return yM0=X,yM0}var bM0,uv1;function BJ8(){if(uv1)return bM0;uv1=1;let $=Z5(),Y=new WeakMap;function X(G,J){let Q=Y.get(J);if(!Q)Q=new Map,Y.set(J,Q);return W;function W(K,Z){try{var H=K.parameters,z=K.sql();$.emitQuery({sql:z,parameters:H});let V=Q.get(z);if(!V)V=J.prepare(z),Q.set(z,V);let F=V.run.apply(V,H);Z(null,{rowsAffected:F.changes,lastInsertRowid:F.lastInsertRowid})}catch(V){Z(V)}}}return bM0=X,bM0}var hM0,pv1;function Et(){if(pv1)return hM0;pv1=1;function $(Y){if(Y)return 1;return 0}return hM0=$,hM0}var fM0,dv1;function Fw(){if(dv1)return fM0;return dv1=1,fM0=($)=>`"${$}"`,fM0}var gM0,cv1;function Mt(){if(cv1)return gM0;cv1=1;let $="delete from %s where %s.rowId in (SELECT %s.rowId FROM %s %s%s)",Y=WL(),X=Fw();function G(J,Q,W){let K=X(J._dbName);return Q=X(Q),Y($,K,K,Q,K,Q,W)}return gM0=G,gM0}var mM0,lv1;function Rt(){if(lv1)return mM0;lv1=1;let $=f5();return mM0=function(Y,X){return" FOR UPDATE OF "+$(Y,X)},mM0}var uM0,iv1;function qt(){if(iv1)return uM0;iv1=1;function $(Y,X,G){return G.map((J,Q)=>{let W=X._primaryColumns[Q];if(J===void 0&&(W.tsType==="NumberColumn"||W.tsType==="BigintColumn"))return"rowid IN (select last_insert_rowid())";else return W.eq(Y,J)})}return uM0=$,uM0}var pM0,nv1;function Pt(){if(nv1)return pM0;nv1=1;function $(Y){if(Y.offset)return` limit ${X()} offset ${Y.offset}`;else if(Y.limit||Y.limit===0)return` limit ${Y.limit}`;else return"";function X(){if(Y.limit||Y.limit===0)return Y.limit;else return"-1"}}return pM0=$,pM0}var dM0,rv1;function wt(){if(rv1)return dM0;rv1=1;let $=Fw();function Y(X,G){let J=$(X._dbName);if(G)return`CAST(${G}.${J} AS TEXT)`;else return`CAST(${J} AS TEXT)`}return dM0=Y,dM0}var cM0,av1;function _t(){if(av1)return cM0;av1=1;let $=Fw();function Y(X,G,J,Q){let W=[],K="",Z=[],H="INSERT INTO "+$(G._dbName)+" ";if(V(),F(),W.length===0)H+="DEFAULT VALUES";else H=H+"("+W.join(",")+") VALUES ("+Z.join(",")+")"+z();return H;function z(){if(Q.concurrency==="skipOnConflict"||Q.concurrency==="overwrite")return` ON CONFLICT(${G._primaryColumns.map((N)=>$(N._dbName)).join(",")}) ${K}`;else return""}function V(){let L=G._columnDiscriminators;for(let N=0;N<L.length;N++){let D=L[N].split("=");W.push($(D[0])),Z.push(D[1])}}function F(){let L=[],N=G._columns;for(let A=0;A<N.length;A++){let B=N[A],O=$(B._dbName);if(J["__"+B.alias]!==void 0)W.push(O),Z.push("%s"),D(B)}if(L.length===0)K="DO NOTHING";else K="DO UPDATE SET "+L.join(",");function D(A){let B=Q[A.alias]?.concurrency||Q.concurrency,O=G._dbName,E=$(A._dbName);if(B==="overwrite")L.push(`${E}=excluded.${E}`);else if(B==="optimistic")L.push(`${E} = CASE WHEN ${O}.${E} <> excluded.${E} THEN '12345678-1234-1234-1234-123456789012Conflict when updating ${E}12345678-1234-1234-1234-123456789012' ELSE ${O}.${E} END`)}}}return cM0=Y,cM0}var lM0,sv1;function jt(){if(sv1)return lM0;sv1=1;let $=Hw(),Y=Xb(),X=At(),G=QZ(),J=wB();function Q(W,K,Z,H){let z=[],V=$(Y.bind(null,W),K,Z,H);V.disallowCompress=!0,J(W,V);let F=X(W,K,Z,V);return z.push(F),G(W,z).then((L)=>L[L.length-1])}return lM0=Q,lM0}var iM0,ov1;function OJ8(){if(ov1)return iM0;ov1=1;let $=AJ8(),Y=BJ8(),X=Et(),G=Bt(),J=Ot(),Q=Mt(),W=Rt(),K=qt(),Z=Pt(),H=wt(),z=_t(),V=jt(),F=Fw();function L(D,A,{readonly:B=!1}={}){var O={poolFactory:A};if(!A.connect)A=A(),O.pool=A;if(O.engine="sqlite",O.encodeBoolean=X,O.encodeBinary=G,O.decodeBinary=J,O.decodeJSON=N,O.encodeJSON=JSON.stringify,O.formatBigintOut=H,O.deleteFromSql=Q,O.selectForUpdateSql=W,O.lastInsertedSql=K,O.insertSql=z,O.insert=V,O.lastInsertedIsSeparate=!0,O.multipleStatements=!1,O.limitAndOffset=Z,O.accept=function(E){E.visitSqlite()},O.aggregateCount=0,O.quote=F,O.cache={},B)return O.dbClient={executeQuery:function(E,M){A.connect((R,q,_)=>{if(R)return M(R);try{$(D,q)(E,(P,w)=>{_(),M(P,w)})}catch(P){_(),M(P)}})},executeCommand:function(E,M){A.connect((R,q,_)=>{if(R)return M(R);try{Y(D,q)(E,(P,w)=>{_(),M(P,w)})}catch(P){_(),M(P)}})}},D.rdb=O,(E)=>E();return function(E,M){A.connect(R);function R(q,_,P){try{if(q){M(q);return}_.executeQuery=$(D,_),_.executeCommand=Y(D,_),O.dbClient=_,O.dbClientDone=P,D.rdb=O,E()}catch(w){M(w)}}}}function N(D){return JSON.parse(D)}return iM0=L,iM0}var nM0,tv1;function jb1(){if(tv1)return nM0;tv1=1;var $=V$();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return nM0=Y,nM0}var rM0,ev1;function EJ8(){if(ev1)return rM0;ev1=1;var $=WZ(),Y=KZ(),X;function G(J,Q){Q=Q||{};var W=Y.Pool({min:Q.min||0,max:Q.size||Q.poolSize||$.poolSize,idleTimeoutMillis:Q.idleTimeout||$.poolIdleTimeout,reapIntervalMillis:Q.reapIntervalMillis||$.reapIntervalMillis,log:Q.log||$.poolLog,create:async function(K){try{if(!X)X=await import("node:sqlite");var Z=new X.DatabaseSync(J);Z.poolCount=0,K(null,Z)}catch(H){return K(H,null)}},destroy:function(K){K.poolCount=void 0,K.close()}});return W.connect=function(K){W.acquire(function(Z,H){if(Z)return K(Z,null,function(){});H.poolCount++,K(null,H,function(z){if(z)W.destroy(H);else W.release(H)})})},W}return rM0=G,rM0}var aM0,$x1;function MJ8(){if($x1)return aM0;$x1=1;let $=f2(),Y=V$(),X=jb1(),G=EJ8(),J=UW();function Q(W,K){let Z=G(W,K),H=J(),z=X.bind(null,Z,H),V={};return V.connect=Z.connect,V.end=$(z),Y[H]=V,V}return aM0=Q,aM0}var sM0,Yx1;function RJ8(){if(Yx1)return sM0;Yx1=1;let $=b2(),Y=OJ8(),X=h2(),G=HW(),J=zW(),Q=MJ8(),W=QQ(),K=WQ(),Z=rX(),H=fG(),z=nX();function V(F,L){if(!F)throw Error("Connection string cannot be empty");L=L||{min:1};var N=Q(F,L);let D={poolFactory:N,hostLocal:K,express:W};return D.transaction=function(A,B){if(arguments.length===1&&typeof A==="function")B=A,A=void 0;let O=$();if(B)return O.run(M);else return O.run(R);function E(){return X(O,A)}async function M(){let q,_=Y(O,N,A);return await new Promise(_).then(E).then(()=>B(O)).then((P)=>q=P).then(()=>G(O)).then(null,(P)=>J(O,P)),q}function R(){let q,_=Y(O,N,A);return q=new Promise(_),q.then(E)}},D.createTransaction=function(A){let B=$(),O=Y(B,N),E=B.run(()=>new Promise(O).then(R));function M(q){return E.then(()=>q(B))}return M.rollback=J.bind(null,B),M.commit=G.bind(null,B),M;function R(){return X(B,A)}},D.query=function(A){let B=$(),O=Y(B,N);return B.run(()=>new Promise(O).then(()=>z(B,"changes",[])).then(()=>Z(B,A).then(M,R)));function M(q){return H(B),q}function R(q){throw H(B),q}},D.rollback=J,D.commit=G,D.end=function(){if(L)return N.end();else return Promise.resolve()},D.accept=function(A){A.visitSqlite()},D}return sM0=V,sM0}var oM0,Xx1;function qJ8(){if(Xx1)return oM0;Xx1=1;var $=Z5();function Y(X,G){return J;function J(Q,W){try{var K=Q.parameters,Z=Q.sql();$.emitQuery({sql:Z,parameters:K});var H=G.query(Z);let z=H.all.apply(H,K);W(null,z)}catch(z){W(z)}}}return oM0=Y,oM0}var tM0,Gx1;function PJ8(){if(Gx1)return tM0;Gx1=1;var $=Z5();function Y(X,G){return J;function J(Q,W){try{var K=Array.isArray(Q.parameters)?Q.parameters:[],Z=Q.sql();$.emitQuery({sql:Z,parameters:K});var H=G.query(Z),z;if(K.length===0)z=H.run();else z=H.run.apply(H,K);var V=0;if(z&&typeof z.changes==="number")V=z.changes;else if(z&&typeof z.affectedRows==="number")V=z.affectedRows;W(null,{rowsAffected:V})}catch(F){W(F,{rowsAffected:0})}}}return tM0=Y,tM0}var eM0,Jx1;function wJ8(){if(Jx1)return eM0;Jx1=1;let $=qJ8(),Y=PJ8(),X=Et(),G=Bt(),J=Ot(),Q=wt(),W=Mt(),K=Rt(),Z=qt(),H=Pt(),z=_t(),V=jt(),F=Fw();function L(D,A,{readonly:B=!1}={}){var O={poolFactory:A};if(!A.connect)A=A(),O.pool=A;if(O.engine="sqlite",O.encodeBoolean=X,O.encodeBinary=G,O.decodeBinary=J,O.formatBigintOut=Q,O.decodeJSON=N,O.encodeJSON=JSON.stringify,O.deleteFromSql=W,O.selectForUpdateSql=K,O.lastInsertedSql=Z,O.insertSql=z,O.insert=V,O.lastInsertedIsSeparate=!0,O.multipleStatements=!1,O.limitAndOffset=H,O.accept=function(E){E.visitSqlite()},O.aggregateCount=0,O.quote=F,O.cache={},B)return O.dbClient={executeQuery:function(E,M){A.connect((R,q,_)=>{if(R)return M(R);try{$(D,q)(E,(P,w)=>{_(),M(P,w)})}catch(P){_(),M(P)}})},executeCommand:function(E,M){A.connect((R,q,_)=>{if(R)return M(R);try{Y(D,q)(E,(P,w)=>{_(),M(P,w)})}catch(P){_(),M(P)}})}},D.rdb=O,(E)=>E();return function(E,M){A.connect(R);function R(q,_,P){try{if(q){M(q);return}_.executeQuery=$(D,_),_.executeCommand=Y(D,_),O.dbClient=_,O.dbClientDone=P,D.rdb=O,E()}catch(w){M(w)}}}}function N(D){return JSON.parse(D)}return eM0=L,eM0}var $R0,Qx1;function _J8(){if(Qx1)return $R0;Qx1=1;var $=WZ(),Y=KZ(),X;function G(J,Q){Q=Q||{};var W=Y.Pool({min:Q.min||0,max:Q.size||Q.poolSize||$.poolSize,idleTimeoutMillis:Q.idleTimeout||$.poolIdleTimeout,reapIntervalMillis:Q.reapIntervalMillis||$.reapIntervalMillis,log:Q.log||$.poolLog,create:async function(K){try{try{if(!X)({Database:X}=await import("bun:sqlite"))}catch(H){return K(H,null)}var Z=new X(J);Z.poolCount=0,K(null,Z)}catch(H){return K(H,null)}},destroy:function(K){K.poolCount=void 0,K.close()}});return W.connect=function(K){W.acquire(function(Z,H){if(Z)return K(Z,null,function(){});H.poolCount++,K(null,H,function(z){if(z)W.destroy(H);else W.release(H)})})},W}return $R0=G,$R0}var YR0,Wx1;function jJ8(){if(Wx1)return YR0;Wx1=1;let $=f2(),Y=V$(),X=jb1(),G=_J8(),J=UW();function Q(W,K){let Z=G(W,K),H=J(),z=X.bind(null,Z,H),V={};return V.connect=Z.connect,V.end=$(z),Y[H]=V,V}return YR0=Q,YR0}var XR0,Kx1;function TJ8(){if(Kx1)return XR0;Kx1=1;let $=b2(),Y=wJ8(),X=h2(),G=HW(),J=zW(),Q=jJ8(),W=QQ(),K=WQ(),Z=rX(),H=fG(),z=nX();function V(F,L){if(!F)throw Error("Connection string cannot be empty");L=L||{min:1};var N=Q(F,L);let D={poolFactory:N,hostLocal:K,express:W};return D.transaction=function(A,B){if(arguments.length===1&&typeof A==="function")B=A,A=void 0;let O=$();if(B)return O.run(M);else return O.run(R);function E(){return X(O,A)}async function M(){let q,_=Y(O,N,A);return await new Promise(_).then(E).then(()=>B(O)).then((P)=>q=P).then(()=>G(O)).then(null,(P)=>J(O,P)),q}function R(){let q,_=Y(O,N,A);return q=new Promise(_),q.then(E)}},D.createTransaction=function(A){let B=$(),O=Y(B,N),E=B.run(()=>new Promise(O).then(R));function M(q){return E.then(()=>q(B))}return M.rollback=J.bind(null,B),M.commit=G.bind(null,B),M;function R(){return X(B,A)}},D.query=function(A){let B=$(),O=Y(B,N);return B.run(()=>new Promise(O).then(()=>z(B,"changes",[])).then(()=>Z(B,A).then(M,R)));function M(q){return H(B),q}function R(q){throw H(B),q}},D.rollback=J,D.commit=G,D.end=function(){if(L)return N.end();else return Promise.resolve()},D.accept=function(A){A.visitSqlite()},D}return XR0=V,XR0}var GR0,Zx1;function IJ8(){if(Zx1)return GR0;Zx1=1;let $=Z5(),Y=new WeakMap;function X(G,J){let Q=Y.get(J);if(!Q)Q=new Map,Y.set(J,Q);return W;function W(K,Z){try{var H=K.parameters,z=K.sql();$.emitQuery({sql:z,parameters:H});let V=Q.get(z);if(!V)V=J.prepare(z),Q.set(z,V);if(V.reader){let F=V.all.apply(V,H);Z(null,F)}else V.run.apply(V,H),Z(null,[])}catch(V){Z(V)}}}return GR0=X,GR0}var JR0,Ux1;function CJ8(){if(Ux1)return JR0;Ux1=1;var $=Z5(),Y=new WeakMap;function X(G,J){var Q=Y.get(J);if(!Q)Q=new Map,Y.set(J,Q);return W;function W(K,Z){var H=K.parameters,z=K.sql();$.emitQuery({sql:z,parameters:H});try{var V=Q.get(z);if(!V)V=J.prepare(z),Q.set(z,V);var F=V.run.apply(V,H),L=F&&typeof F.changes==="number"?F.changes:0,N=F&&typeof F.lastInsertRowid<"u"?F.lastInsertRowid:void 0;if(typeof N<"u")Z(null,{rowsAffected:L,lastInsertRowid:N});else Z(null,{rowsAffected:L})}catch(D){Z(D)}}}return JR0=X,JR0}var QR0,Hx1;function SJ8(){if(Hx1)return QR0;Hx1=1;let $=IJ8(),Y=CJ8(),X=Et(),G=Mt(),J=Rt(),Q=qt(),W=Pt(),K=wt(),Z=_t(),H=jt(),z=Fw();function V(L,N,{readonly:D=!1}={}){var A={poolFactory:N};if(!N.connect)N=N(),A.pool=N;if(A.engine="sqlite",A.encodeBoolean=X,A.decodeJSON=F,A.encodeJSON=JSON.stringify,A.deleteFromSql=G,A.selectForUpdateSql=J,A.lastInsertedSql=Q,A.formatBigintOut=K,A.insertSql=Z,A.insert=H,A.lastInsertedIsSeparate=!0,A.multipleStatements=!1,A.limitAndOffset=W,A.accept=function(B){B.visitSqlite()},A.aggregateCount=0,A.quote=z,A.cache={},D)return A.dbClient={executeQuery:function(B,O){N.connect((E,M,R)=>{if(E)return O(E);try{$(L,M)(B,(q,_)=>{R(),O(q,_)})}catch(q){R(),O(q)}})},executeCommand:function(B,O){N.connect((E,M,R)=>{if(E)return O(E);try{Y(L,M)(B,(q,_)=>{R(),O(q,_)})}catch(q){R(),O(q)}})}},L.rdb=A,(B)=>B();return function(B,O){N.connect(E);function E(M,R,q){try{if(M){O(M);return}R.executeQuery=$(L,R),R.executeCommand=Y(L,R),A.dbClient=R,A.dbClientDone=q,L.rdb=A,B()}catch(_){O(_)}}}}function F(L){return JSON.parse(L)}return QR0=V,QR0}var WR0,zx1;function kJ8(){if(zx1)return WR0;zx1=1;var $=V$();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return WR0=Y,WR0}var KR0,Vx1;function vJ8(){if(Vx1)return KR0;Vx1=1;var $=WZ(),Y=KZ(),X;function G(J,Q){Q=Q||{};var W=Y.Pool({min:Q.min||0,max:Q.size||Q.poolSize||$.poolSize,idleTimeoutMillis:Q.idleTimeout||$.poolIdleTimeout,reapIntervalMillis:Q.reapIntervalMillis||$.reapIntervalMillis,log:Q.log||$.poolLog,create:async function(K){try{if(!X)X=await import("better-sqlite3");X=X.default||X}catch(H){return K(H,null)}try{var Z=new X(J);return Z.poolCount=0,K(null,Z)}catch(H){return K(H,null)}},destroy:function(K){K.poolCount=void 0,K.close()}});return W.connect=function(K){W.acquire(function(Z,H){if(Z)return K(Z,null,function(){});H.poolCount++,K(null,H,function(z){if(z)W.destroy(H);else W.release(H)})})},W}return KR0=G,KR0}var ZR0,Fx1;function xJ8(){if(Fx1)return ZR0;Fx1=1;let $=f2(),Y=V$(),X=kJ8(),G=vJ8(),J=UW();function Q(W,K){let Z=G(W,K),H=J(),z=X.bind(null,Z,H),V={};return V.connect=Z.connect,V.end=$(z),Y[H]=V,V}return ZR0=Q,ZR0}var UR0,Lx1;function yJ8(){if(Lx1)return UR0;Lx1=1;let $=b2(),Y=SJ8(),X=h2(),G=HW(),J=zW(),Q=xJ8(),W=QQ(),K=WQ(),Z=rX(),H=fG(),z=nX();function V(F,L){if(!F)throw Error("Connection string cannot be empty");L=L||{min:1};var N=Q(F,L);let D={poolFactory:N,hostLocal:K,express:W};return D.transaction=function(A,B){if(arguments.length===1&&typeof A==="function")B=A,A=void 0;let O=$();if(B)return O.run(M);else return O.run(R);function E(){return X(O,A)}async function M(){let q,_=Y(O,N,A);return await new Promise(_).then(E).then(()=>B(O)).then((P)=>q=P).then(()=>G(O)).then(null,(P)=>J(O,P)),q}function R(){let q,_=Y(O,N,A);return q=new Promise(_),q.then(E)}},D.createTransaction=function(A){let B=$(),O=Y(B,N),E=B.run(()=>new Promise(O).then(R));function M(q){return E.then(()=>q(B))}return M.rollback=J.bind(null,B),M.commit=G.bind(null,B),M;function R(){return X(B,A)}},D.query=function(A){let B=$(),O=Y(B,N);return B.run(()=>new Promise(O).then(()=>z(B,"changes",[])).then(()=>Z(B,A).then(M,R)));function M(q){return H(B),q}function R(q){throw H(B),q}},D.rollback=J,D.commit=G,D.end=function(){if(L)return N.end();else return Promise.resolve()},D.accept=function(A){A.visitSqlite()},D}return UR0=V,UR0}var HR0,Dx1;function bJ8(){if(Dx1)return HR0;Dx1=1;var $=Z5();function Y(X,G){return J;function J(Q,W){var K=Q.parameters,Z=Q.sql();$.emitQuery({sql:Z,parameters:K}),G.d1.prepare(Z,K).bind(...K).all().then(H,W);function H(z){W(null,z.results)}}}return HR0=Y,HR0}var zR0,Nx1;function hJ8(){if(Nx1)return zR0;Nx1=1;var $=Z5();function Y(X,G){return J;function J(Q,W){var K=Array.isArray(Q.parameters)?Q.parameters:[],Z=Q.sql();$.emitQuery({sql:Z,parameters:K}),G.d1.prepare(Z).bind.apply(null,K).run().then(H,(z)=>W(z,{rowsAffected:0}));function H(z){var V=0;if(z){if(typeof z.changes==="number")V=z.changes;else if(typeof z.meta==="object"&&z.meta&&typeof z.meta.changes==="number")V=z.meta.changes;else if(typeof z.affectedRows==="number")V=z.affectedRows}W(null,{rowsAffected:V})}}}return zR0=Y,zR0}var VR0,Ax1;function fJ8(){if(Ax1)return VR0;Ax1=1;let $=bJ8(),Y=hJ8(),X=Et(),G=wt(),J=Mt(),Q=Rt(),W=qt(),K=Pt(),Z=_t(),H=jt();function z(F,L,{readonly:N=!1}={}){var D={poolFactory:L};if(!L.connect)L=L(),D.pool=L;if(D.engine="sqlite",D.maxParameters=100,D.encodeBoolean=X,D.decodeJSON=V,D.encodeJSON=JSON.stringify,D.formatBigintOut=G,D.deleteFromSql=J,D.selectForUpdateSql=Q,D.lastInsertedSql=W,D.insertSql=Z,D.insert=H,D.lastInsertedIsSeparate=!0,D.multipleStatements=!1,D.limitAndOffset=K,D.accept=function(A){A.visitSqlite()},D.aggregateCount=0,D.quote=(A)=>`"${A}"`,D.cache={},N)return D.dbClient={executeQuery:function(A,B){L.connect((O,E,M)=>{if(O)return B(O);try{$(F,E)(A,(R,q)=>{M(),B(R,q)})}catch(R){M(),B(R)}})},executeCommand:function(A,B){L.connect((O,E,M)=>{if(O)return B(O);try{Y(F,E)(A,(R,q)=>{M(),B(R,q)})}catch(R){M(),B(R)}})}},F.rdb=D,(A)=>A();return function(A,B){L.connect(O);function O(E,M,R){try{if(E){B(E);return}M.executeQuery=$(F,M),M.executeCommand=Y(F,M),D.dbClient=M,D.dbClientDone=R,F.rdb=D,A()}catch(q){B(q)}}}}function V(F){return JSON.parse(F)}return VR0=z,VR0}var FR0,Bx1;function gJ8(){if(Bx1)return FR0;Bx1=1;var $=V$();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return FR0=Y,FR0}var LR0,Ox1;function mJ8(){if(Ox1)return LR0;Ox1=1;var $=WZ(),Y=KZ();function X(G,J){J=J||{};var Q=Y.Pool({min:J.min||0,max:1,idleTimeoutMillis:J.idleTimeout||$.poolIdleTimeout,reapIntervalMillis:J.reapIntervalMillis||$.reapIntervalMillis,log:J.log||$.poolLog,create:function(W){var K={d1:G,poolCount:0};return W(null,K)},destroy:function(){}});return Q.connect=function(W){Q.acquire(function(K,Z){if(K)return W(K,null,function(){});Z.poolCount++,W(null,Z,function(H){if(H)Q.destroy(Z);else Q.release(Z)})})},Q}return LR0=X,LR0}var DR0,Ex1;function uJ8(){if(Ex1)return DR0;Ex1=1;let $=f2(),Y=V$(),X=gJ8(),G=mJ8(),J=UW();function Q(W,K){var Z=G(W,K),H=J(),z=X.bind(null,Z,H),V={};return V.connect=Z.connect,V.end=$(z),Y[H]=V,V}return DR0=Q,DR0}var NR0,Mx1;function pJ8(){if(Mx1)return NR0;Mx1=1;let $=b2(),Y=fJ8(),X=h2(),G=HW(),J=zW(),Q=uJ8(),W=QQ(),K=WQ(),Z=rX(),H=fG(),z=nX();function V(F,L){if(!F)throw Error("Missing d1Database");L=L||{min:1};var N=Q(F,L);let D={poolFactory:N,hostLocal:K,express:W};return D.transaction=function(A,B){if(arguments.length===1&&typeof A==="function")B=A,A=void 0;let O=$();if(B)return O.run(E);else return O.run(R);async function E(){let q,_=Y(O,N,A);return await new Promise(_).then(M).then(()=>B(O)).then((P)=>q=P).then(()=>D.commit(O)).then(null,(P)=>D.rollback(O,P)),q}function M(){return X(O,!0)}function R(){let q,_=Y(O,N,A);return q=new Promise(_),q.then(M)}},D.createTransaction=function(A){let B=$(),O=Y(B,N,A),E=B.run(()=>new Promise(O).then(R));function M(q){return E.then(B.run.bind(B,q))}function R(){return X(B,A)}return M.rollback=J.bind(null,B),M.commit=G.bind(null,B),M},D.query=function(A){let B=$(),O=Y(B,N);return B.run(()=>new Promise(O).then(()=>z(B,"changes",[])).then(()=>Z(B,A).then(M,R)));function M(q){return H(B),q}function R(q){throw H(B),q}},D.rollback=J,D.commit=G,D.end=function(){if(L)return N.end();else return Promise.resolve()},D.accept=function(A){A.visitSqlite()},D}return NR0=V,NR0}var AR0,Rx1;function Tb1(){if(Rx1)return AR0;Rx1=1;var $=Z5(),Y=g6();function X(Q,W){var K=W.query;return Z;function Z(H,z){var V=H.parameters,F=H.sql();$.emitQuery({sql:F,parameters:V});let L=[],N=[];if(Y(Q,"engine")==="sap"){let O=W.msnodesqlv8,E=/EXECUTE\s+/i.test(F)||/EXEC\s+/i.test(F),M=[];for(let R=0;R<V.length;R++){let q=V[R];if(typeof q==="string"){let _=Buffer.from(q,"utf8").length;if(G(q)){let P=J(q);if(E){let w=`@hex_param_${R}`,j=`CONVERT(VARCHAR(${_}), CONVERT(VARBINARY(${_}), 0x${P}))`;M.push({declaration:`DECLARE ${w} VARCHAR(${_})`,assignment:`SET ${w} = ${j}`}),L.push({index:R,replacement:w})}else{let w=`CONVERT(VARCHAR(${_}), CONVERT(VARBINARY(${_}), 0x${P}))`;L.push({index:R,replacement:w})}N.push(R)}else V[R]=O.VarChar(q,_)}}if(L.length>0){let R=0;if(F=F.replace(/\?/g,(q)=>{let _=L.find((P)=>P.index===R);if(R++,_)return _.replacement;return q}),E&&M.length>0){let q=F.split(`
`),_=0;for(let j=0;j<q.length;j++)if(/^\s*DECLARE\s+/i.test(q[j]))_=j+1;let P=M.map((j)=>j.declaration),w=M.map((j)=>j.assignment);q.splice(_,0,...P,...w),F=q.join(`
`)}}N.reverse().forEach((R)=>{V.splice(R,1)})}K.call(W,F,V,B);let A=[];function B(O,E,M){if(O){if(O.code&&O.code!==3604)z(O);if(E)A.push(E);return}if(A.push(E),!M)if(A.length===1)z(null,A[0]);else z(null,A)}}}function G(Q){return/[\u0080-\uFFFF]/.test(Q)}function J(Q){return Buffer.from(Q,"utf8").toString("hex")}return AR0=X,AR0}var BR0,qx1;function Ib1(){if(qx1)return BR0;qx1=1;var $=Z5(),Y=g6();function X(Q,W){var K=W.query;return Z;function Z(H,z){var V=H.parameters,F=H.sql();$.emitQuery({sql:F,parameters:V});let L=[],N=[];if(Y(Q,"engine")==="sap"){let E=W.msnodesqlv8,M=/EXECUTE\s+/i.test(F)||/EXEC\s+/i.test(F),R=[];for(let q=0;q<V.length;q++){let _=V[q];if(typeof _==="string"){let P=Buffer.from(_,"utf8").length;if(G(_)){let w=J(_);if(M){let j=`@hex_param_${q}`,C=`CONVERT(VARCHAR(${P}), CONVERT(VARBINARY(${P}), 0x${w}))`;R.push({declaration:`DECLARE ${j} VARCHAR(${P})`,assignment:`SET ${j} = ${C}`}),L.push({index:q,replacement:j})}else{let j=`CONVERT(VARCHAR(${P}), CONVERT(VARBINARY(${P}), 0x${w}))`;L.push({index:q,replacement:j})}N.push(q)}else V[q]=E.VarChar(_,P)}}if(L.length>0){let q=0;if(F=F.replace(/\?/g,(_)=>{let P=L.find((w)=>w.index===q);if(q++,P)return P.replacement;return _}),M&&R.length>0){let _=F.split(`
`),P=0;for(let C=0;C<_.length;C++)if(/^\s*DECLARE\s+/i.test(_[C]))P=C+1;let w=R.map((C)=>C.declaration),j=R.map((C)=>C.assignment);_.splice(P,0,...w,...j),F=_.join(`
`)}}N.reverse().forEach((q)=>{V.splice(q,1)})}let A=0,B=K.call(W,F,V,O);if(B&&typeof B.on==="function")B.on("rowcount",(E)=>{if(typeof E==="number")A+=E});function O(E,M,R){if(E){if(E.code&&E.code!==3604){z(E,{rowsAffected:0});return}}if(!R)z(null,{rowsAffected:A})}}}function G(Q){return/[\u0080-\uFFFF]/.test(Q)}function J(Q){return Buffer.from(Q,"utf8").toString("hex")}return BR0=X,BR0}var OR0,Px1;function Cb1(){if(Px1)return OR0;Px1=1;function $(Y){if(Y)return 1;return 0}return OR0=$,OR0}var ER0,wx1;function Lw(){if(wx1)return ER0;return wx1=1,ER0=($)=>`[${$}]`,ER0}var MR0,_x1;function Sb1(){if(_x1)return MR0;_x1=1;let $="delete %s from %s as %s%s",Y=WL(),X=Lw();function G(J,Q,W){let K=X(J._dbName);return Q=X(Q),Y($,Q,K,Q,W)}return MR0=G,MR0}var RR0,jx1;function kb1(){if(jx1)return RR0;jx1=1;let $=f5();return RR0=function(Y){return" FOR UPDATE OF "+$(Y)},RR0}var qR0,Tx1;function vb1(){if(Tx1)return qR0;Tx1=1;function $(Y){if(Y.offset)return` OFFSET ${Y.offset} ROWS${X()}`;else return"";function X(){if(Y.limit||Y.limit===0)return` FETCH NEXT ${Y.limit} ROW ONLY`;else return""}}return qR0=$,qR0}var PR0,Ix1;function xb1(){if(Ix1)return PR0;Ix1=1;let $=Lw();function Y(X,G){if(G)return`CONVERT(VARCHAR, ${G}.${$(X._dbName)}, 126)`;else return`CONVERT(VARCHAR, ${$(X._dbName)}, 126)`}return PR0=Y,PR0}var wR0,Cx1;function yb1(){if(Cx1)return wR0;Cx1=1;let $=Lw();function Y(X,G){let J=$(X._dbName);if(G)return`CAST(${G}.${J} AS NVARCHAR(20))`;else return`CAST(${J} AS NVARCHAR(20))`}return wR0=Y,wR0}var _R0,Sx1;function dJ8(){if(Sx1)return _R0;Sx1=1;function $(Y){return`CONVERT(BIGINT, ${Y})`}return _R0=$,_R0}var jR0,kx1;function bb1(){if(kx1)return jR0;kx1=1;function $(Y,X){if(X)return`JSON_QUERY(${X}.[${Y._dbName}])`;else return`JSON_QUERY([${Y._dbName}])`}return jR0=$,jR0}var TR0,vx1;function hb1(){if(vx1)return TR0;vx1=1;function $(Y,X){let G="",J="OUTPUT ";for(let W=0;W<X._columns.length;W++)J+=G+Q(X._columns[W]),G=",";return J;function Q(W){if(W.formatOut)return W.formatOut(Y,"INSERTED");else return`INSERTED.[${W._dbName}]`}}return TR0=$,TR0}var IR0,xx1;function cJ8(){if(xx1)return IR0;xx1=1;let $=hb1();function Y(X,G,J,Q){let W=[],K="",Z=[];N(),D();let H=F(),z;if(H)z=`MERGE INTO [${G._dbName}] AS target USING (SELECT ${Z.join(",")}) AS source ON ${V()} WHEN MATCHED THEN ${H} WHEN NOT MATCHED THEN ${L()} ${$(X,G)};`;else z=`MERGE INTO [${G._dbName}] AS target USING (SELECT ${Z.join(",")}) AS source ON ${V()} WHEN NOT MATCHED THEN ${L()} ${$(X,G)};`;return z;function V(){let A=G._columnDiscriminators.map((O)=>{let E=`[${O.split("=")[0]}]`;return`target.${E}=source.${E}`}),B=G._primaryColumns.map((O)=>`target.[${O._dbName}]=source.[${O._dbName}]`);return[...A,...B].join(" AND ")}function F(){if(Q.concurrency==="skipOnConflict"||Q.concurrency==="overwrite")return K;else return""}function L(){return`INSERT (${W.join(",")}) VALUES (${W.map((A)=>"source."+A)})`}function N(){let A=G._columnDiscriminators;for(let B=0;B<A.length;B++){let O=A[B].split("=");W.push(`[${O[0]}]`),Z.push(`${O[1]} AS ${[O[0]]}`)}}function D(){let A=[],B=G._columns;for(let E=0;E<B.length;E++){let M=B[E];if(J["__"+M.alias]!==void 0)W.push(`[${M._dbName}]`),Z.push(`%s AS [${M.alias}]`),O(M)}if(A.length>0)K="UPDATE SET "+A.join(",");function O(E){let M=Q[E.alias]?.concurrency||Q.concurrency;if(M==="overwrite")A.push(`target.[${E._dbName}]=source.[${E._dbName}]`);else if(M==="optimistic")A.push(`target.[${E._dbName}] = CASE WHEN target.[${E._dbName}] <> source.[${E._dbName}] THEN CAST('12345678-1234-1234-1234-123456789012Conflict when updating [${E._dbName}]12345678-1234-1234-1234-123456789012' AS INTEGER) ELSE target.[${E._dbName}] END`)}}}return IR0=Y,IR0}var CR0,yx1;function fb1(){if(yx1)return CR0;yx1=1;let $=hb1(),Y=cJ8();function X(Q,W,K,Z){if(G(W,Z)&&H())return Y.apply(null,[...arguments]);else return J.apply(null,[...arguments]);function H(){for(let z in K){let V=W[z]?.alias;if(V&&K["__"+V]!==void 0&&W[z]?.equal)return!0}}}function G(Q,W){for(let K=0;K<Q._primaryColumns.length;K++){let Z=W[Q._primaryColumns[K]]?.concurrency;if(Z==="skipOnConflict"||Z==="overwrite")return!0}return W.concurrency==="skipOnConflict"||W.concurrency==="overwrite"}function J(Q,W,K){let Z=[],H=[],z=`INSERT INTO [${W._dbName}] `;if(V(),F(),Z.length===0)z+=`${L()}DEFAULT VALUES`;else z=z+"("+Z.join(",")+")"+L()+"VALUES ("+H.join(",")+")";return z;function V(){let N=W._columnDiscriminators;for(let D=0;D<N.length;D++){let A=N[D].split("=");Z.push(`[${A[0]}]`),H.push(A[1])}}function F(){let N=W._columns;for(let D=0;D<N.length;D++){let A=N[D];if(K["__"+A.alias]!==void 0)Z.push(`[${A._dbName}]`),H.push("%s")}}function L(){return" "+$(Q,W)+" "}}return CR0=X,CR0}var SR0,bx1;function gb1(){if(bx1)return SR0;bx1=1;let $=Hw(),Y=Xb(),X=QZ();async function G(J,Q,W,K){let Z=$(Y.bind(null,J),Q,W,K);return Z.disallowCompress=!0,X(J,[Z]).then((H)=>H[H.length-1])}return SR0=G,SR0}var kR0,hx1;function lJ8(){if(hx1)return kR0;hx1=1;var $=Tb1(),Y=Ib1(),X=Cb1(),G=Sb1(),J=kb1();let Q=vb1(),W=xb1(),K=yb1(),Z=dJ8(),H=bb1(),z=fb1(),V=gb1(),F=Lw();function L(D,A,{readonly:B=!1}={}){var O={poolFactory:A};if(!A.connect)A=A(),O.pool=A;if(O.engine="mssqlNative",O.encodeBoolean=X,O.decodeJSON=N,O.encodeJSON=JSON.stringify,O.formatDateOut=W,O.formatBigintOut=K,O.formatBigintIn=Z,O.formatJSONOut=H,O.deleteFromSql=G,O.selectForUpdateSql=J,O.insertSql=z,O.insert=V,O.lastInsertedIsSeparate=!1,O.multipleStatements=!0,O.begin="BEGIN TRANSACTION",O.limit=(E)=>{if(E.offset)return"";else if(E.limit||E.limit===0)return"TOP "+E.limit;else return""},O.limitAndOffset=Q,O.accept=function(E){E.visitSqlite()},O.aggregateCount=0,O.quote=F,O.cache={},B)return O.dbClient={executeQuery:function(E,M){A.connect((R,q,_)=>{if(R)return M(R);try{q.setUseUTC(!1),$(D,q)(E,(P,w)=>{_(),M(P,w)})}catch(P){_(),M(P)}})},executeCommand:function(E,M){A.connect((R,q,_)=>{if(R)return M(R);try{q.setUseUTC(!1),Y(D,q)(E,(P,w)=>{_(),M(P,w)})}catch(P){_(),M(P)}})}},D.rdb=O,(E)=>E();return function(E,M){A.connect(R);function R(q,_,P){try{if(q){M(q);return}_.setUseUTC(!1),_.executeQuery=$(D,_),_.executeCommand=Y(D,_),O.dbClient=_,O.dbClientDone=P,D.rdb=O,E()}catch(w){M(w)}}}}function N(D){return JSON.parse(D)}return kR0=L,kR0}var vR0,fx1;function iJ8(){if(fx1)return vR0;fx1=1;var $=V$();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return vR0=Y,vR0}var xR0,gx1;function mb1(){if(gx1)return xR0;gx1=1;var $=WZ(),Y=KZ(),X;function G(J,Q){Q=Q||{};var W=Y.Pool({min:Q.min||0,max:Q.size||Q.poolSize||$.poolSize,idleTimeoutMillis:Q.idleTimeout||$.poolIdleTimeout,reapIntervalMillis:Q.reapIntervalMillis||$.reapIntervalMillis,log:Q.log||$.poolLog,create:async function(K){try{if(!X)X=await import("msnodesqlv8")}catch(z){return K(z,null)}var Z;X.open(J,H);function H(z,V){if(z)return K(z,null);return Z=V,Z.poolCount=0,Z.msnodesqlv8=X,K(null,Z)}},destroy:function(K){K.poolCount=void 0,K.close()}});return W.connect=function(K){W.acquire(function(Z,H){if(Z)return K(Z,null,function(){});H.poolCount++,K(null,H,function(z){if(z)W.destroy(H);else W.release(H)})})},W}return xR0=G,xR0}var yR0,mx1;function nJ8(){if(mx1)return yR0;mx1=1;let $=f2();var Y=V$(),X=iJ8(),G=mb1(),J=UW();function Q(W,K){var Z=G(W,K),H=J(),z=X.bind(null,Z,H),V={};return V.connect=Z.connect,V.end=$(z),Y[H]=V,V}return yR0=Q,yR0}var bR0,ux1;function rJ8(){if(ux1)return bR0;ux1=1;let $=b2(),Y=lJ8(),X=h2(),G=HW(),J=zW(),Q=nJ8(),W=QQ(),K=WQ(),Z=rX(),H=fG(),z=nX();function V(F,L){if(!F)throw Error("Connection string cannot be empty");L=L||{min:1};var N=Q(F,L);let D={poolFactory:N,hostLocal:K,express:W};return D.transaction=function(A,B){if(arguments.length===1&&typeof A==="function")B=A,A=void 0;let O=$();if(B)return O.run(E);else return O.run(R);async function E(){let q,_=Y(O,N,A);return await new Promise(_).then(M).then(()=>B(O)).then((P)=>q=P).then(()=>D.commit(O)).then(null,(P)=>D.rollback(O,P)),q}function M(){return X(O,A)}function R(){let q,_=Y(O,N,A);return q=new Promise(_),q.then(M)}},D.createTransaction=function(A){let B=$(),O=Y(B,N),E=B.run(()=>new Promise(O).then(R));function M(q){return E.then(B.run.bind(B,q))}function R(){return X(B,A)}return M.rollback=J.bind(null,B),M.commit=G.bind(null,B),M},D.query=function(A){let B=$(),O=Y(B,N);return B.run(()=>new Promise(O).then(()=>z(B,"changes",[])).then(()=>Z(B,A).then(M,R)));function M(q){return H(B),q}function R(q){throw H(B),q}},D.rollback=J,D.commit=G,D.end=function(){if(L)return N.end();else return Promise.resolve()},D.accept=function(A){A.visitSqlite()},D}return bR0=V,bR0}var hR0,px1;function aJ8(){if(px1)return hR0;px1=1;var $=Z5();function Y(Q,W){let K=null,Z=null;return H;function H(V,F){if(!K||!Z)import("tedious").then(({Request:L,TYPES:N})=>{K=L,Z=N,z(V,F)}).catch((L)=>F(X(L),[]));else z(V,F)}function z(V,F){let L=[],N=[],D=!1;$.emitQuery({sql:V.sql(),parameters:V.parameters});let A=G(V.sql(),V.parameters);if(A.length<18&&V.parameters.length===0){if(A==="BEGIN TRANSACTION"){W.beginTransaction((M)=>{F(X(M),[])});return}else if(A==="COMMIT"){W.commitTransaction((M)=>{F(X(M),[])});return}else if(A==="ROLLBACK"){W.rollbackTransaction((M)=>{F(X(M),[])});return}}let B;var O=new K(A,E);J(O,V.parameters,Z),O.on("row",(M)=>{let R={};if(!B)B=Object.keys(M);B.forEach((q)=>{R[q]=M[q].value}),N.push(R),D=!0}),O.on("columnMetadata",(M)=>{D=!0}),O.on("doneInProc",(M,R)=>{if(D)L.push(N),N=[],B=null,D=!1}),O.on("doneProc",(M,R)=>{if(D)L.push(N),N=[],D=!1}),W.execSql(O);function E(M){if(M)F(X(M));else{if(D)L.push(N);if(L.length===0)F(null,[]);else if(L.length===1)F(null,L[0]);else F(null,L)}}}}function X(Q){if(Q&&Q.errors)return Q.errors[0];else return Q}function G(Q,W){if(W.length===0)return Q;var K=Q.split("?");Q="";var Z=K.length-1;for(var H=0;H<Z;H++)Q+=K[H]+"@"+H;return Q+=K[Z],Q}function J(Q,W,K){let Z=[];for(let z=0;z<W.length;z++){let V=[`${z}`,H(W[z]),W[z]];Q.addParameter.apply(Q,V),Z.push(V)}return Z;function H(z){if(typeof z==="string")return K.VarChar;else if(Number.isInteger(z))if(z>=-2147483648&&z<=2147483647)return K.Int;else return K.BigInt;else if(typeof z==="number")return K.Money;else if(z instanceof Date&&!isNaN(z))return K.Date;else if(Array.isArray(z))return K.NVarChar;else if(Buffer.isBuffer(z))return K.VarBinary;else if(typeof z==="object"&&z instanceof Object)return K.NVarChar;else throw Error("Unknown data type")}}return hR0=Y,hR0}var fR0,dx1;function sJ8(){if(dx1)return fR0;dx1=1;var $=Z5();function Y(Q,W){let K=null,Z=null;return H;function H(V,F){if(!K||!Z)import("tedious").then(({Request:L,TYPES:N})=>{K=L,Z=N,z(V,F)}).catch((L)=>F(X(L),{rowsAffected:0}));else z(V,F)}function z(V,F){$.emitQuery({sql:V.sql(),parameters:V.parameters});let L=G(V.sql(),V.parameters);if(L.length<18&&V.parameters.length===0){if(L==="BEGIN TRANSACTION"){W.beginTransaction((B)=>{if(B)return F(X(B),{rowsAffected:0});return F(null,{rowsAffected:0})});return}else if(L==="COMMIT"){W.commitTransaction((B)=>{if(B)return F(X(B),{rowsAffected:0});return F(null,{rowsAffected:0})});return}else if(L==="ROLLBACK"){W.rollbackTransaction((B)=>{if(B)return F(X(B),{rowsAffected:0});return F(null,{rowsAffected:0})});return}}let N=0;var D=new K(L,A);J(D,V.parameters,Z),D.on("doneInProc",(B)=>{if(typeof B==="number")N+=B}),D.on("doneProc",(B)=>{if(typeof B==="number")N+=B}),D.on("done",(B)=>{if(typeof B==="number")N+=B}),W.execSql(D);function A(B){if(B)return F(X(B),{rowsAffected:0});return F(null,{rowsAffected:N})}}}function X(Q){if(Q&&Q.errors)return Q.errors[0];else return Q}function G(Q,W){if(W.length===0)return Q;var K=Q.split("?");Q="";var Z=K.length-1;for(var H=0;H<Z;H++)Q+=K[H]+"@"+H;return Q+=K[Z],Q}function J(Q,W,K){let Z=[];for(let z=0;z<W.length;z++){let V=[`${z}`,H(W[z]),W[z]];Q.addParameter.apply(Q,V),Z.push(V)}return Z;function H(z){if(typeof z==="string")return K.VarChar;else if(Number.isInteger(z))if(z>=-2147483648&&z<=2147483647)return K.Int;else return K.BigInt;else if(typeof z==="number")return K.Money;else if(z instanceof Date&&!isNaN(z))return K.Date;else if(Array.isArray(z))return K.NVarChar;else if(Buffer.isBuffer(z))return K.VarBinary;else if(typeof z==="object"&&z instanceof Object)return K.NVarChar;else throw Error("Unknown data type")}}return fR0=Y,fR0}var gR0,cx1;function oJ8(){if(cx1)return gR0;cx1=1;let $=Lw();function Y(X,G){if(G)return`FORMAT(${G}.${$(X._dbName)}, 'yyyy-MM-ddTHH:mm:sszzz')`;else return`FORMAT(${$(X._dbName)}, 'yyyy-MM-ddTHH:mm:sszzz')`}return gR0=Y,gR0}var mR0,lx1;function tJ8(){if(lx1)return mR0;lx1=1;var $=aJ8(),Y=sJ8(),X=Cb1(),G=Sb1(),J=kb1();let Q=vb1(),W=fb1(),K=xb1(),Z=oJ8(),H=yb1(),z=bb1(),V=gb1(),F=Lw();function L(D,A,{readonly:B=!1}={}){var O={poolFactory:A};if(!A.connect)A=A(),O.pool=A;if(O.engine="mssql",O.encodeBoolean=X,O.decodeJSON=N,O.encodeJSON=JSON.stringify,O.deleteFromSql=G,O.selectForUpdateSql=J,O.lastInsertedIsSeparate=!1,O.insertSql=W,O.insert=V,O.formatDateOut=K,O.formatDateTzOut=Z,O.formatBigintOut=H,O.formatJSONOut=z,O.multipleStatements=!0,O.begin="BEGIN TRANSACTION",O.limit=(E)=>{if(E.offset)return"";else if(E.limit||E.limit===0)return"TOP "+E.limit;else return""},O.limitAndOffset=Q,O.accept=function(E){E.visitSqlite()},O.aggregateCount=0,O.quote=F,O.cache={},B)return O.dbClient={executeQuery:function(E,M){A.connect((R,q,_)=>{if(R)return M(R);try{$(D,q)(E,(P,w)=>{_(),M(P,w)})}catch(P){_(),M(P)}})},executeCommand:function(E,M){A.connect((R,q,_)=>{if(R)return M(R);try{Y(D,q)(E,(P,w)=>{_(),M(P,w)})}catch(P){_(),M(P)}})}},D.rdb=O,(E)=>E();return function(E,M){A.connect(R);function R(q,_,P){try{if(q){M(q);return}_.executeQuery=$(D,_),_.executeCommand=Y(D,_),O.dbClient=_,O.dbClientDone=P,D.rdb=O,E()}catch(w){M(w)}}}}function N(D){return JSON.parse(D)}return mR0=L,mR0}var uR0,ix1;function eJ8(){if(ix1)return uR0;ix1=1;var $=V$();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return uR0=Y,uR0}var $Q8=RB(f78),pR0,nx1;function YQ8(){if(nx1)return pR0;nx1=1;var{parseConnectionString:$}=$Q8;function Y(X){let G={options:{useUTC:!1},authentication:{type:"default",options:{}}},J=$(X);for(let Q in J){let W=J[Q];switch(Q){case"uid":G.authentication.options.userName=W;break;case"pwd":G.authentication.options.password=W;break;case"server":if(G.server=W.split(",")[0],W.split(",")[1]!==void 0)G.options.port=Number.parseInt(W.split(",")[1]);break;case"database":G.options.database=W;break;case"trustservercertificate":G.options.trustServerCertificate=W.toLowerCase()==="yes";break;case"app":G.options.appName=W;break;case"appname":G.options.appName=W;break}}return G}return pR0=Y,pR0}var dR0,rx1;function XQ8(){if(rx1)return dR0;rx1=1;var $=WZ(),Y=KZ(),X,G=YQ8();function J(Q,W){if(typeof Q==="string")Q=G(Q);if(typeof Q==="object")Q.options={...Q.options,...{useColumnNames:!0}};W=W||{};var K=Y.Pool({min:W.min||0,max:W.size||W.poolSize||$.poolSize,idleTimeoutMillis:W.idleTimeout||$.poolIdleTimeout,reapIntervalMillis:W.reapIntervalMillis||$.reapIntervalMillis,log:W.log||$.poolLog,create:async function(Z){try{if(!X)X=await import("tedious")}catch(V){return Z(V,null)}var H=new X.Connection(Q);H.on("connect",z),H.connect();function z(V){if(V)if(V.errors)return Z(V.errors[0],null);else return Z(V,null);return H.poolCount=0,Z(null,H)}},destroy:function(Z){Z.poolCount=void 0,Z.close()}});return K.connect=function(Z){K.acquire(function(H,z){if(H)return Z(H,null,function(){});z.poolCount++,Z(null,z,function(V){if(V)K.destroy(z);else K.release(z)})})},K}return dR0=J,dR0}var cR0,ax1;function GQ8(){if(ax1)return cR0;ax1=1;let $=f2(),Y=V$(),X=eJ8(),G=XQ8(),J=UW();function Q(W,K){let Z=G(W,K),H=J(),z=X.bind(null,Z,H),V={};return V.connect=Z.connect,V.end=$(z),Y[H]=V,V}return cR0=Q,cR0}var lR0,sx1;function JQ8(){if(sx1)return lR0;sx1=1;let $=b2(),Y=tJ8(),X=h2(),G=HW(),J=zW(),Q=GQ8(),W=QQ(),K=WQ(),Z=rX(),H=fG(),z=nX();function V(F,L){if(!F)throw Error("Connection string cannot be empty");L=L||{min:1};var N=Q(F,L);let D={poolFactory:N,hostLocal:K,express:W};return D.transaction=function(A,B){if(arguments.length===1&&typeof A==="function")B=A,A=void 0;let O=$();if(B)return O.run(M);else return O.run(R);function E(){return X(O,A)}async function M(){let q,_=Y(O,N,A);return await new Promise(_).then(E).then(()=>B(O)).then((P)=>q=P).then(()=>D.commit(O)).then(null,(P)=>D.rollback(O,P)),q}function R(){let q,_=Y(O,N,A);return q=new Promise(_),q.then(E)}},D.createTransaction=function(A){let B=$(),O=Y(B,N),E=B.run(()=>new Promise(O).then(R));function M(q){return E.then(B.run.bind(B,q))}return M.rollback=J.bind(null,B),M.commit=G.bind(null,B),M;function R(){return X(B,A)}},D.query=function(A){let B=$(),O=Y(B,N);return B.run(()=>new Promise(O).then(()=>z(B,"changes",[])).then(()=>Z(B,A).then(M,R)));function M(q){return H(B),q}function R(q){throw H(B),q}},D.rollback=J,D.commit=G,D.end=function(){if(L)return N.end();else return Promise.resolve()},D.accept=function(A){A.visitSqlite()},D}return lR0=V,lR0}var iR0,ox1;function QQ8(){if(ox1)return iR0;ox1=1;function $(Y){if(Y)return 1;return 0}return iR0=$,iR0}var nR0,tx1;function WQ8(){if(tx1)return nR0;tx1=1;function $(Y){return`CONVERT(BIGINT, ${Y})`}return nR0=$,nR0}var rR0,ex1;function Dw(){if(ex1)return rR0;return ex1=1,rR0=($)=>`[${$}]`,rR0}var aR0,$y1;function KQ8(){if($y1)return aR0;$y1=1;let $=Dw();function Y(X,G){let J=$(X._dbName);if(G)return`CONVERT(VARCHAR(20), ${G}.${J})`;else return`CONVERT(NVARCHAR(20), ${J})`}return aR0=Y,aR0}var sR0,Yy1;function ZQ8(){if(Yy1)return sR0;Yy1=1;var $="delete from %s from %s as %s %s";let Y=WL(),X=Dw();function G(J,Q,W){var K=X(J._dbName);return Q=X(Q),Y($,K,K,Q,W)}return sR0=G,sR0}var oR0,Xy1;function UQ8(){if(Xy1)return oR0;Xy1=1;let $=f5();return oR0=function(Y){return" FOR UPDATE OF "+$(Y)},oR0}var tR0,Gy1;function HQ8(){if(Gy1)return tR0;Gy1=1;function $(Y,X,G){return G.map((J,Q)=>{let W=X._primaryColumns[Q];if(J===void 0&&W.tsType==="NumberColumn")return`${W._dbName}=@@identity`;else return W.eq(Y,J)})}return tR0=$,tR0}var eR0,Jy1;function zQ8(){if(Jy1)return eR0;Jy1=1;let $=Dw();function Y(X,G){if(G)return`CONVERT(VARCHAR, ${G}.${$(X._dbName)}, 23)`;else return`CONVERT(VARCHAR, ${$(X._dbName)}, 23)`}return eR0=Y,eR0}var $q0,Qy1;function VQ8(){if(Qy1)return $q0;Qy1=1;let $=Dw();function Y(X,G,J,Q){let W=[],K="",Z=[];N(),D();let H=F(),z;if(H)z=`MERGE INTO ${$(G._dbName)} AS target USING (SELECT ${Z.join(",")}) AS source ON ${V()} WHEN MATCHED THEN ${H} WHEN NOT MATCHED THEN ${L()};`;else z=`MERGE INTO ${$(G._dbName)} AS target USING (SELECT ${Z.join(",")}) AS source ON ${V()} WHEN NOT MATCHED THEN ${L()};`;return z;function V(){let A=G._columnDiscriminators.map((O)=>{let E=$(O.split("=")[0]);return`target.${E}=source.${E}`}),B=G._primaryColumns.map((O)=>`target.${$(O._dbName)}=source.${$(O._dbName)}`);return[...A,...B].join(" AND ")}function F(){if(Q.concurrency==="skipOnConflict"||Q.concurrency==="overwrite")return K;else return""}function L(){return`INSERT (${W.join(",")}) VALUES (${W.map((A)=>"source."+A)})`}function N(){let A=G._columnDiscriminators;for(let B=0;B<A.length;B++){let O=A[B].split("=");W.push($(O[0])),Z.push(`${O[1]} AS ${O[0]}`)}}function D(){let A=[],B=G._columns;for(let E=0;E<B.length;E++){let M=B[E],R=$(M._dbName);if(J["__"+M.alias]!==void 0)W.push(R),Z.push(`%s AS ${$(M.alias)}`),O(M)}if(A.length>0)K="UPDATE SET "+A.join(",");function O(E){let M=Q[E.alias]?.concurrency||Q.concurrency,R=$(E._dbName);if(M==="overwrite")A.push(`target.${R}=source.${R}`);else if(M==="optimistic")A.push(`target.${R} = CASE WHEN target.${R} <> source.${R} THEN CAST('12345678-1234-1234-1234-123456789012Conflict when updating ${R}12345678-1234-1234-1234-123456789012' AS INTEGER) ELSE target.${R} END`)}}}return $q0=Y,$q0}var Yq0,Wy1;function FQ8(){if(Wy1)return Yq0;Wy1=1;let $=VQ8(),Y=Dw();function X(Q,W,K,Z){if(G(W,Z)&&H())return $.apply(null,[...arguments]);else return J.apply(null,[...arguments].slice(1));function H(){for(let z in K){let V=W[z]?.alias;if(V&&K["__"+V]!==void 0&&W[z]?.equal)return!0}}}function G(Q,W){for(let K=0;K<Q._primaryColumns.length;K++){let Z=W[Q._primaryColumns[K]]?.concurrency;if(Z==="skipOnConflict"||Z==="overwrite")return!0}return W.concurrency==="skipOnConflict"||W.concurrency==="overwrite"}function J(Q,W){let K=[],Z=[],H=[],z="INSERT INTO "+Y(Q._dbName)+" ";if(V(),F(),K.length===0)z+=" VALUES()";else z=z+"("+K.join(",")+") VALUES ("+H.join(",")+")";return z;function V(){let L=Q._columnDiscriminators;for(let N=0;N<L.length;N++){let D=L[N].split("=");K.push(Y(D[0])),H.push(D[1])}}function F(){let L=Q._columns;for(let N=0;N<L.length;N++){let D=L[N],A=Y(D._dbName);if(Z.push(D._dbName),W["__"+D.alias]!==void 0)K.push(A),H.push("%s")}}}return Yq0=X,Yq0}var Xq0,Ky1;function LQ8(){if(Ky1)return Xq0;Ky1=1;let $=Hw(),Y=Xb(),X=At(),G=QZ(),J=wB();function Q(W,K,Z,H){let z=[],V=$(Y.bind(null,W),K,Z,H);V.disallowCompress=!0,J(W,V);let F=X(W,K,Z,V);return z.push(F),G(W,z).then((L)=>L[L.length-1])}return Xq0=Q,Xq0}var Gq0,Zy1;function DQ8(){if(Zy1)return Gq0;Zy1=1;function $(Y){if(Y.offset)return` ROWS ${X()} OFFSET ${Y.offset}`;else return"";function X(){if(Y.limit||Y.limit===0)return` LIMIT ${Y.limit}`;else return""}}return Gq0=$,Gq0}var Jq0,Uy1;function NQ8(){if(Uy1)return Jq0;Uy1=1;let $=Tb1(),Y=Ib1(),X=QQ8(),G=WQ8(),J=KQ8(),Q=ZQ8(),W=UQ8(),K=HQ8(),Z=zQ8(),H=FQ8(),z=LQ8(),V=DQ8(),F=Dw();function L(D,A,{readonly:B=!1}={}){var O={poolFactory:A};if(!A.connect)A=A(),O.pool=A;if(O.engine="sap",O.encodeBoolean=X,O.formatBigintIn=G,O.formatBigintOut=J,O.decodeJSON=N,O.encodeJSON=JSON.stringify,O.deleteFromSql=Q,O.selectForUpdateSql=W,O.formatDateOut=Z,O.lastInsertedSql=K,O.insertSql=H,O.insert=z,O.lastInsertedIsSeparate=!0,O.multipleStatements=!1,O.begin="BEGIN TRANSACTION",O.limit=(E)=>{if(E.offset)return"";else if(E.limit||E.limit===0)return"TOP "+E.limit;else return""},O.limitAndOffset=V,O.accept=function(E){E.visitSap()},O.aggregateCount=0,O.quote=F,O.cache={},B)return O.dbClient={executeQuery:function(E,M){A.connect((R,q,_)=>{if(R)return M(R);try{$(D,q)(E,(P,w)=>{_(),M(P,w)})}catch(P){_(),M(P)}})},executeCommand:function(E,M){A.connect((R,q,_)=>{if(R)return M(R);try{Y(D,q)(E,(P,w)=>{_(),M(P,w)})}catch(P){_(),M(P)}})}},D.rdb=O,(E)=>E();return function(E,M){A.connect(R);function R(q,_,P){try{if(q){M(q);return}_.executeQuery=$(D,_),_.executeCommand=Y(D,_),O.dbClient=_,O.dbClientDone=P,D.rdb=O,E()}catch(w){M(w)}}}}function N(D){return JSON.parse(D)}return Jq0=L,Jq0}var Qq0,Hy1;function AQ8(){if(Hy1)return Qq0;Hy1=1;var $=V$();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return Qq0=Y,Qq0}var Wq0,zy1;function BQ8(){if(zy1)return Wq0;zy1=1;let $=f2();var Y=V$(),X=AQ8(),G=mb1(),J=UW();function Q(W,K){var Z=G(W,K),H=J(),z=X.bind(null,Z,H),V={};return V.connect=Z.connect,V.end=$(z),Y[H]=V,V}return Wq0=Q,Wq0}var Kq0,Vy1;function OQ8(){if(Vy1)return Kq0;Vy1=1;let $=b2(),Y=NQ8(),X=h2(),G=HW(),J=zW(),Q=BQ8(),W=QQ(),K=WQ(),Z=rX(),H=fG(),z=nX();function V(F,L){if(!F)throw Error("Connection string cannot be empty");L=L||{min:1};var N=Q(F,L);let D={poolFactory:N,hostLocal:K,express:W};return D.transaction=function(A,B){if(arguments.length===1&&typeof A==="function")B=A,A=void 0;let O=$();if(B)return O.run(M);else return O.run(R);function E(){return X(O,A)}async function M(){let q,_=Y(O,N,A);return await new Promise(_).then(E).then(()=>B(O)).then((P)=>q=P).then(()=>G(O)).then(null,(P)=>J(O,P)),q}function R(){let q,_=Y(O,N,A);return q=new Promise(_),q.then(E)}},D.createTransaction=function(A){let B=$(),O=Y(B,N),E=B.run(()=>new Promise(O).then(R));function M(q){return E.then(()=>q(B))}function R(){return X(B,A)}return M.rollback=J.bind(null,B),M.commit=G.bind(null,B),M},D.query=function(A){let B=$(),O=Y(B,N);return B.run(()=>new Promise(O).then(()=>z(B,"changes",[])).then(()=>Z(B,A).then(M,R)));function M(q){return H(B),q}function R(q){throw H(B),q}},D.rollback=J,D.commit=G,D.end=function(){if(L)return N.end();else return Promise.resolve()},D.accept=function(A){A.visitSap()},D}return Kq0=V,Kq0}var Zq0,Fy1;function ub1(){if(Fy1)return Zq0;Fy1=1;function $(Y,X){if(X.length===0)return Y.sql();var G=Y.sql().split("?"),J="",Q=G.length-1;for(var W=0;W<Q;W++)J+=G[W]+":p"+(W+1);return J+=G[Q],J}return Zq0=$,Zq0}var Uq0,Ly1;function EQ8(){if(Ly1)return Uq0;Ly1=1;var $=Z5(),Y=ub1();function X(G,J){var Q=J.execute;return W;function W(K,Z){var H=K.parameters;$.emitQuery({sql:K.sql(),parameters:H});var z=Y(K,H);Q.call(J,z,H,{fetchTypeHandler:function(F){F.name=F.name.toLowerCase()}},V);function V(F,L){if(F)Z(F);else{if(L.rows)L=L.rows;else L=[L];Z(null,L)}}}}return Uq0=X,Uq0}var Hq0,Dy1;function MQ8(){if(Dy1)return Hq0;Dy1=1;var $=Z5(),Y=ub1();function X(G,J){var Q=J.execute;return W;function W(K,Z){var H=K.parameters;$.emitQuery({sql:K.sql(),parameters:H});var z=Y(K,H);Q.call(J,z,H,{fetchTypeHandler:function(F){F.name=F.name.toLowerCase()}},V);function V(F,L){if(F)return Z(F);var N=typeof L.rowsAffected==="number"?L.rowsAffected:0;return Z(null,{rowsAffected:N})}}}return Hq0=X,Hq0}var zq0,Ny1;function RQ8(){if(Ny1)return zq0;Ny1=1;function $(Y){if(Y)return 1;return 0}return zq0=$,zq0}var Vq0,Ay1;function Nw(){if(Ay1)return Vq0;return Ay1=1,Vq0=($)=>`"${$}"`,Vq0}var Fq0,By1;function qQ8(){if(By1)return Fq0;By1=1;let $="delete from %s where %s.rowId in (SELECT %s.rowId FROM %s %s%s)",Y=WL(),X=Nw();function G(J,Q,W){let K=X(J._dbName);return Q=X(Q),Y($,K,K,Q,K,Q,W)}return Fq0=G,Fq0}var Lq0,Oy1;function PQ8(){if(Oy1)return Lq0;Oy1=1;let $=f5();return Lq0=function(Y){return" FOR UPDATE OF "+$(Y)},Lq0}var Dq0,Ey1;function wQ8(){if(Ey1)return Dq0;Ey1=1;let $=g6();function Y(X,G,J){return J.map((Q,W)=>{let K=G._primaryColumns[W];if(Q===void 0)return`ROWID='${$(X,"lastRowid")}'`;else return K.eq(X,Q)})}return Dq0=Y,Dq0}var Nq0,My1;function _Q8(){if(My1)return Nq0;My1=1;function $(Y){if(Y.offset)return` OFFSET ${Y.offset} ROWS FETCH NEXT ${X()} ROWS ONLY`;else if(Y.limit||Y.limit===0)return` FETCH FIRST ${Y.limit} ROWS ONLY`;else return"";function X(){if(Y.limit||Y.limit===0)return Y.limit;else return""}}return Nq0=$,Nq0}var Aq0,Ry1;function jQ8(){if(Ry1)return Aq0;Ry1=1;let $=Nw();function Y(X,G,J,Q){let W=[],K="",Z=[];N(),D();let H=F(),z;if(H)z=`MERGE INTO ${$(G._dbName)} target USING (SELECT ${Z.join(",")} FROM DUAL) source ON (${V()}) WHEN MATCHED THEN ${H} WHEN NOT MATCHED THEN ${L()}`;else z=`MERGE INTO ${$(G._dbName)} target USING (SELECT ${Z.join(",")} FROM DUAL) source ON (${V()}) WHEN NOT MATCHED THEN ${L()}`;return z;function V(){let A=G._columnDiscriminators.map((O)=>{let E=O.split("=")[0];return`target."${E}"=source."${E}"`}),B=G._primaryColumns.map((O)=>`target.${$(O._dbName)}=source.${$(O._dbName)}`);return[...A,...B].join(" AND ")}function F(){if(Q.concurrency==="skipOnConflict"||Q.concurrency==="overwrite")return K;else return""}function L(){return`INSERT (${W.join(",")}) VALUES (${W.map((A)=>"source."+A)})`}function N(){let A=G._columnDiscriminators;for(let B=0;B<A.length;B++){let O=A[B].split("=");W.push($(O[0])),Z.push(`${O[1]} ${$(O[0])}`)}}function D(){let A=[],B=G._columns;for(let E=0;E<B.length;E++){let M=B[E],R=$(M._dbName);if(J["__"+M.alias]!==void 0){if(W.push(R),Z.push(`%s ${$(M.alias)}`),!M.isPrimary)O(M)}}if(A.length>0)K="UPDATE SET "+A.join(",");function O(E){let M=Q[E.alias]?.concurrency||Q.concurrency,R=$(E._dbName);if(M==="overwrite")A.push(`target.${R}=source.${R}`);else if(M==="optimistic")A.push(`target.${R} = CASE WHEN target.${R} <> source.${R} THEN 1/0 ELSE target.${R} END`)}}}return Aq0=Y,Aq0}var Bq0,qy1;function pb1(){if(qy1)return Bq0;qy1=1;let $=jQ8(),Y=Nw();function X(Q,W,K,Z){if(G(W,Z)&&H())return $.apply(null,[...arguments]);else return J.apply(null,[...arguments].slice(1));function H(){for(let z in K){let V=W[z]?.alias;if(V&&K["__"+V]!==void 0&&W[z]?.equal)return!0}}}function G(Q,W){for(let K=0;K<Q._primaryColumns.length;K++){let Z=W[Q._primaryColumns[K]]?.concurrency;if(Z==="skipOnConflict"||Z==="overwrite")return!0}return W.concurrency==="skipOnConflict"||W.concurrency==="overwrite"}function J(Q,W){let K=[],Z=[],H='INSERT INTO "'+Q._dbName+'" ';if(z(),V(),K.length===0)H+=` (${Y(Q._primaryColumns[0]._dbName)}) VALUES(DEFAULT)`;else H=H+"("+K.join(",")+") VALUES ("+Z.join(",")+")";return H;function z(){let F=Q._columnDiscriminators;for(let L=0;L<F.length;L++){let N=F[L].split("=");K.push(Y(N[0])),Z.push(N[1])}}function V(){let F=Q._columns;for(let L=0;L<F.length;L++){let N=F[L],D=Y(N._dbName);if(W["__"+N.alias]!==void 0)if(K.push(D),N.tsType==="DateColumn")Z.push(`TO_TIMESTAMP(%s, 'YYYY-MM-DD"T"HH24:MI:SS.FF6')`);else Z.push("%s")}}}return Bq0=X,Bq0}var Oq0,Py1;function TQ8(){if(Py1)return Oq0;Py1=1;var $=Y9(),Y=pb1();let X=WL();function G(J,Q,W,K={}){var Z=[],H=[Y(J,Q,W,K)],z=Q._columns;for(var V=0;V<z.length;V++){var F=z[V],L=F.alias;if(W["__"+F.alias]!==void 0){var N=F.encode(J,W[L]);if(N.parameters.length>0)H.push("?"),Z.push(N.parameters[0]);else H.push(N.sql())}}var D=X.apply(null,H);return $(D,Z)}return Oq0=G,Oq0}var Eq0,wy1;function IQ8(){if(wy1)return Eq0;wy1=1;let $=Hw(),Y=TQ8(),X=nX(),G=At(),J=QZ();function Q(W,K,Z,H){return new Promise((z,V)=>{let F=$(Y.bind(null,W),K,Z,H);F.disallowCompress=!0,J(W,[F]).then((N)=>N[0]).then(L).then(z,V);function L([N]){X(W,"lastRowid",N.lastRowid);let D=G(W,K,Z,F);return J(W,[D]).then((A)=>z(A[0]))}})}return Eq0=Q,Eq0}var Mq0,_y1;function CQ8(){if(_y1)return Mq0;_y1=1;let $=Nw();function Y(X,G){let J=$(X._dbName);if(G)return`TO_CHAR(${G}.${J})`;else return`TO_CHAR(${J})`}return Mq0=Y,Mq0}var Rq0,jy1;function SQ8(){if(jy1)return Rq0;jy1=1;let $=Nw();function Y(X,G){if(G)return`TO_CHAR(${G}.${$(X._dbName)}, 'YYYY-MM-DD"T"HH24:MI:SS.FF3')`;else return`TO_CHAR(${$(X._dbName)}, 'YYYY-MM-DD"T"HH24:MI:SS.FF3')`}return Rq0=Y,Rq0}var qq0,Ty1;function kQ8(){if(Ty1)return qq0;Ty1=1;function $(Y){return`TO_TIMESTAMP(${Y}, 'YYYY-MM-DD"T"HH24:MI:SS.FF3')`}return qq0=$,qq0}var Pq0,Iy1;function vQ8(){if(Iy1)return Pq0;Iy1=1;let $=EQ8(),Y=MQ8(),X=RQ8(),G=qQ8(),J=PQ8(),Q=wQ8(),W=_Q8(),K=pb1(),Z=IQ8(),H=CQ8(),z=SQ8(),V=kQ8(),F=Nw();function L(D,A,{readonly:B=!1}={}){var O={poolFactory:A};if(!A.connect)A=A(),O.pool=A;if(O.begin="SET TRANSACTION ISOLATION LEVEL READ COMMITTED",O.engine="oracle",O.encodeBoolean=X,O.decodeJSON=N,O.encodeJSON=JSON.stringify,O.formatDateOut=z,O.formatDateIn=V,O.formatBigintOut=H,O.deleteFromSql=G,O.selectForUpdateSql=J,O.lastInsertedSql=Q,O.insertSql=K,O.insert=Z,O.lastInsertedIsSeparate=!0,O.multipleStatements=!1,O.limitAndOffset=W,O.accept=function(E){E.visitSqlite()},O.aggregateCount=0,O.quote=F,O.cache={},B)return O.dbClient={executeQuery:function(E,M){A.connect((R,q,_)=>{if(R)return M(R);try{$(D,q)(E,(P,w)=>{_(),M(P,w)})}catch(P){_(),M(P)}})},executeCommand:function(E,M){A.connect((R,q,_)=>{if(R)return M(R);try{Y(D,q)(E,(P,w)=>{_(),M(P,w)})}catch(P){_(),M(P)}})}},D.rdb=O,(E)=>E();return function(E,M){A.connect(R);function R(q,_,P){try{if(q){M(q);return}_.executeQuery=$(D,_),_.executeCommand=Y(D,_),O.dbClient=_,O.dbClientDone=P,D.rdb=O,E()}catch(w){M(w)}}}}function N(D){return JSON.parse(D)}return Pq0=L,Pq0}var wq0,Cy1;function xQ8(){if(Cy1)return wq0;Cy1=1;var $=V$();function Y(X,G,J){X.drain(Q);function Q(){X.destroyAllNow(),delete $[G],J()}}return wq0=Y,wq0}var _q0,Sy1;function yQ8(){if(Sy1)return _q0;Sy1=1;var $=WZ(),Y=KZ(),X;function G(J,Q){Q=Q||{};var W=Y.Pool({min:Q.min||0,max:Q.size||Q.poolSize||$.poolSize,idleTimeoutMillis:Q.idleTimeout||$.poolIdleTimeout,reapIntervalMillis:Q.reapIntervalMillis||$.reapIntervalMillis,log:Q.log,create:async function(K){var Z;try{if(!X)X=await Promise.resolve().then(() => U6(cF(),1)),X=X.default||X,X.outFormat=X.OUT_FORMAT_OBJECT,X.fetchAsBuffer=[X.BLOB]}catch(z){return K(z,null)}X.getConnection(J,H);function H(z,V){if(Z=V,z)return K(z,null);return Z.poolCount=0,K(null,Z)}},destroy:function(K){K.poolCount=void 0,K.close()}});return W.connect=function(K){W.acquire(function(Z,H){if(Z)return K(Z,null,function(){});H.poolCount++,K(null,H,function(z){if(z)W.destroy(H);else W.release(H)})})},W}return _q0=G,_q0}var jq0,ky1;function bQ8(){if(ky1)return jq0;ky1=1;let $=f2(),Y=V$(),X=xQ8(),G=yQ8(),J=UW();function Q(W,K){let Z=G(W,K),H=J(),z=X.bind(null,Z,H),V={};return V.connect=Z.connect,V.end=$(z),Y[H]=V,V}return jq0=Q,jq0}var Tq0,vy1;function hQ8(){if(vy1)return Tq0;vy1=1;let $=b2(),Y=vQ8(),X=h2(),G=HW(),J=zW(),Q=bQ8(),W=QQ(),K=WQ(),Z=rX(),H=fG(),z=nX();function V(F,L){if(!F)throw Error("Connection string cannot be empty");L=L||{min:1};var N=Q(F,L);let D={poolFactory:N,hostLocal:K,express:W};return D.transaction=function(A,B){if(arguments.length===1&&typeof A==="function")B=A,A=void 0;let O=$();if(B)return O.run(M);else return O.run(R);function E(){return X(O,A)}async function M(){let q,_=Y(O,N,A);return await new Promise(_).then(E).then(()=>B(O)).then((P)=>q=P).then(()=>G(O)).then(null,(P)=>J(O,P)),q}function R(){let q,_=Y(O,N,A);return q=new Promise(_),q.then(E)}},D.createTransaction=function(A){let B=$(),O=Y(B,N),E=B.run(()=>new Promise(O).then(R));function M(q){return E.then(()=>q(B))}return M.rollback=J.bind(null,B),M.commit=G.bind(null,B),M;function R(){return X(B,A)}},D.query=function(A){let B=$(),O=Y(B,N);return B.run(()=>new Promise(O).then(()=>z(B,"changes",[])).then(()=>Z(B,A).then(M,R)));function M(q){return H(B),q}function R(q){throw H(B),q}},D.rollback=J,D.commit=G,D.end=function(){if(L)return N.end();else return Promise.resolve()},D.accept=function(A){A.visitSqlite()},D}return Tq0=V,Tq0}var Iq0,xy1;function fQ8(){if(xy1)return Iq0;xy1=1;let $=QQ(),Y=WQ(),X=WY8(),G=qG8(),J=PG8(),Q,W,K,Z,H,z,V,F,L;var N=function(D){if(D.indexOf&&D.indexOf("mysql")===0)return N.mySql.apply(null,arguments);else if(D.indexOf&&D.indexOf("postgres")===0)N.pg.apply(null,arguments);else return X.apply(null,arguments)};return N.createPatch=X.createPatch,N.table=wb1(),N.filter=Ww(),N.commit=HW(),N.rollback=zW(),N.end=V$().end,N.close=N.end,N.log=Z5().registerLogger,N.on=Z5().on,N.off=Z5().off,N.query=rX(),N.lock=Dt(),N.schema=Nt(),N.map=G.bind(null,N),N.http=function(D){return D},Object.defineProperty(N,"mysql",{get:function(){if(!Q)Q=$v1();return Q}}),Object.defineProperty(N,"mySql",{get:function(){if(!Q)Q=$v1();return Q}}),Object.defineProperty(N,"pglite",{get:function(){if(!K)K=YJ8();return K}}),Object.defineProperty(N,"postgres",{get:function(){if(!W)if(J.bun)W=Iv1();else W=gv1();return W}}),Object.defineProperty(N,"pg",{get:function(){if(!W)if(J.bun)W=Iv1();else W=gv1();return W}}),Object.defineProperty(N,"sqlite",{get:function(){if(!Z)if(J.deno||J.node&&(J.node.major>22||J.node.major===22&&J.node.minor>=5))Z=RJ8();else if(J.bun)Z=TJ8();else if(J.node)Z=yJ8();else throw Error("SQLite is not supported in this environment");return Z}}),Object.defineProperty(N,"d1",{get:function(){if(!L)L=pJ8();return L}}),Object.defineProperty(N,"mssqlNative",{get:function(){if(!H)H=rJ8();return H}}),Object.defineProperty(N,"mssql",{get:function(){if(!V)V=JQ8();return V}}),Object.defineProperty(N,"sap",{get:function(){if(!z)z=OQ8();return z}}),Object.defineProperty(N,"oracle",{get:function(){if(!F)F=hQ8();return F}}),N.express=$.bind(null,Y),Iq0=N,Iq0}var gQ8=fQ8(),QP0=g78(gQ8);function Tt($,Y){Y.forEach((X)=>{if(String(X.TYPE).includes("DATE")||String(X.TYPE).includes("TIMESTAMP")){let G=D4($,String(X.FIELD));if(G)i1($,String(X.FIELD),eR(G))}})}async function It($,Y){let X=$.poolCode;if(!X||X.length==0)throw Error("poolCode\u4E0D\u80FD\u4E3A\u7A7A");let G=await W3(X);if(!G||!G[0])throw Error(`code:${X}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`);let J=await lX(X);if(Y&&Y=="2"){let Q=$.sql;delete $.sql,delete $.poolCode;let W=N7(Q,/{{(.*?)}}/g);if(a8(W))W.forEach((Z)=>{let H=n1(n1(Z,"{{",""),"}}","");if(H.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4($,H)))throw Error(`${H}\u53D6\u503C\u5931\u8D25`);Q=n1(Q,`{{${H}}}`,$[H])});let K=await J.execute(`${Q}`,[],{outFormat:_B.default.OUT_FORMAT_OBJECT});return J.commit(),J.close(),{data:K.rows}}else{if(q$($))$=JSON.parse($);$=D7($);let Q="select";if($&&$.type)Q=$.type;let W=D7($.dynamicObj);if(!W)W={};let{folders:K,table:Z}=$;if(!Z||Z.length==0)throw Error("table\u4E0D\u80FD\u4E3A\u7A7A");let H=$.pageNum?$.pageNum:1,z=$.pageSize?$.pageSize:10,V=$.orderBy?$.orderBy:"id",F=$.orderByCommand?$.orderByCommand:"desc",L=$.id,N=`SELECT
	        column_name AS Field,
	        data_type AS TYPE ,
	        data_length AS LENGTH,
	        nullable AS NULLABLE
        FROM
	        all_tab_columns 
        WHERE
	        table_name = '${Z}'`,D=await J.execute(`${N}`,[],{outFormat:_B.default.OUT_FORMAT_OBJECT});if(D.rows&&a8(D.rows)){let A=D.rows,O=QP0.map((E)=>{return{[Z]:E.table(Z).map((M)=>{let R={};return i1(R,"id",M.column("ID").string().primary().notNull()),A.forEach((q)=>{if(q$(q.TYPE)&&!String(q.FIELD).includes("id")&&!String(q.FIELD).includes("ID")){if(String(q.TYPE).includes("VARCHAR2")||String(q.TYPE).includes("CHAR")||String(q.TYPE).includes("NVARCHAR")||String(q.TYPE).includes("NCHAR")||String(q.TYPE).includes("LONG")||String(q.TYPE).includes("ROWID")||String(q.TYPE).includes("UROWID")||String(q.TYPE).includes("XMLType"))i1(R,String(q.FIELD),M.column(String(q.FIELD)).string());else if(String(q.TYPE).includes("NUMBER")||String(q.TYPE).includes("BINARY_DOUBLE")||String(q.TYPE).includes("BINARY_FLOAT")||String(q.TYPE).includes("BINARY_INTEGER"))i1(R,String(q.FIELD),M.column(String(q.FIELD)).numeric());else if(String(q.TYPE).includes("DATE")||String(q.TYPE).includes("TIMESTAMP"))i1(R,String(q.FIELD),Q=="select"?M.column(String(q.FIELD)).string():M.column(String(q.FIELD)).date());else if(String(q.TYPE).includes("JSON"))i1(R,String(q.FIELD),M.column(String(q.FIELD)).json());else if(String(q.TYPE).includes("BOOLEAN"))i1(R,String(q.FIELD),M.column(String(q.FIELD)).boolean());else if(String(q.TYPE).includes("TIMESTAMP WITH TIMEZONE")||String(q.TYPE).includes("TIMESTAMP WITH LOCAL TIME ZONE"))i1(R,String(q.FIELD),M.column(String(q.FIELD)).string());else if(String(q.TYPE).includes("BFILE")||String(q.TYPE).includes("CLOB")||String(q.TYPE).includes("BLOB")||String(q.TYPE).includes("NCLOB"))i1(R,String(q.FIELD),M.column(String(q.FIELD)).binary())}}),R})}}).oracle({user:G[0].user??"",password:G[0].password??"",connectString:`${G[0].host}:${G[0].port}/${G[0].serviceName}`,poolAlias:X});if(Q=="insert")return Tt(W,A),await O[Z].insert(W),J.close(),O.close(),{data:"success"};else if(Q=="update"){if(!L||L.length==0)throw Error("id\u4E0D\u80FD\u4E3A\u7A7A");Tt(W,A),i1(W,"id",L);let E=db1(W,Z);return J.execute(E),J.commit(),J.close(),O.close(),{data:"success"}}else if(Q=="delete"){if(!L||L.length==0)throw Error("id\u4E0D\u80FD\u4E3A\u7A7A");return J.execute(`DELETE FROM EMPLOYEES  WHERE id = ${L}`),J.commit(),J.close(),O.close(),{data:"success"}}else if(Q=="select"||Q=="count"){let E={sql:"",parameters:[],raw:""},M=[" 1 = 1 "],R=[" 1 = 1 "];if(L)M.push(" and id = ? "),R.push(" and id = :id "),E.parameters.push(L);Object.keys(W).forEach((j)=>{if(xK(W[j].value)&&!gX(W[j].value,"undefined"))switch(W[j].command){case"eq":M.push(` and ${j} = ? `),R.push(` and ${j} = :${j} `),E.parameters.push(W[j].value);break;case"ne":M.push(` and ${j} != ? `),R.push(` and ${j} != :${j} `),E.parameters.push(W[j].value);break;case"gt":M.push(` and ${j} > ? `),R.push(` and ${j} > :${j} `),E.parameters.push(W[j].value);break;case"gte":M.push(` and ${j} >= ? `),R.push(` and ${j} >= :${j} `),E.parameters.push(W[j].value);break;case"lt":M.push(` and ${j} < ? `),R.push(` and ${j} < :${j} `),E.parameters.push(W[j].value);break;case"lte":M.push(` and ${j} <= ? `),R.push(` and ${j} <= :${j} `),E.parameters.push(W[j].value);break;case"isNull":M.push(` and ${j} is null `),R.push(` and ${j} is null `);break;case"isNotNull":M.push(` and ${j} is not null `),R.push(` and ${j} is not null `);break;case"inArray":break;case"notInArray":break;case"exists":break;case"notExists":break;case"between":break;case"notBetween":break;case"like":M.push(` and ${j} like :${j} `),R.push(` and ${j} like :${j} `),E.parameters.push(W[j].value);break;case"ilike":break;case"notIlike":break;case"not":break;case"and":break;case"or":break;case"arrayContains":break;case"arrayContained":break;case"arrayOverlaps":break;default:break}}),E.sql=n1(M.join(),/[,]/g,""),E.raw=n1(R.join(),/[,]/g,"");let _=(await J.execute(`select count(1) from ${Z} where ${E.raw}`,E.parameters,{outFormat:_B.default.OUT_FORMAT_OBJECT})).rows,P=D4(_[0],"COUNT(1)")??0;if(Q=="count")return{data:{count:P}};let w=await O[Z].getAll({where:()=>E,offset:Number((H-1)*z),orderBy:[`${V} ${F}`],limit:Number(z)});return J.close(),O.close(),{data:w,total:P}}else throw Error("\u64CD\u4F5C\u7C7B\u578B\u65E0\u6548")}else throw Error("\u8868\u4E0D\u5B58\u5728")}}function db1($,Y="your_table"){if(!$.hasOwnProperty("id"))throw Error("\u5BF9\u8C61\u5FC5\u987B\u5305\u542B id \u5B57\u6BB5");let X=$.id,G=Object.keys($).filter((Q)=>Q!=="id").map((Q)=>{let W=$[Q];if(W===null)return`${Q} = NULL`;else if(typeof W==="string"){let K=W.replace(/'/g,"''");return`${Q} = '${K}'`}else if(typeof W==="number"||typeof W==="boolean")return`${Q} = ${W}`;else if(W instanceof Date)return`${Q} = TO_TIMESTAMP('${W.toISOString().split(".")[0]}', 'YYYY-MM-DD"T"HH24:MI:SS')`;else return`${Q} = '${String(W)}'`});if(G.length===0)return"";let J=G.join(", ");return`UPDATE ${Y} SET ${J} WHERE id = ${X}`}async function cb1($,Y){let X=await lX($),G=`SELECT
	        column_name AS Field,
	        data_type AS TYPE ,
	        data_length AS LENGTH,
	        nullable AS NULLABLE
        FROM
	        all_tab_columns 
        WHERE
	        table_name = '${Y}'`,Q=(await X.execute(`${G}`,[],{outFormat:_B.default.OUT_FORMAT_OBJECT})).rows??[],W=QP0.map((K)=>{return{[Y]:K.table(Y).map((Z)=>{let H={};return i1(H,"id",Z.column("ID").string().primary().notNull()),Q.forEach((z)=>{if(q$(z.TYPE)&&!String(z.FIELD).includes("id")&&!String(z.FIELD).includes("ID")){if(String(z.TYPE).includes("VARCHAR2")||String(z.TYPE).includes("CHAR")||String(z.TYPE).includes("NVARCHAR")||String(z.TYPE).includes("NCHAR")||String(z.TYPE).includes("LONG")||String(z.TYPE).includes("ROWID")||String(z.TYPE).includes("UROWID")||String(z.TYPE).includes("XMLType"))i1(H,String(z.FIELD),Z.column(String(z.FIELD)).string());else if(String(z.TYPE).includes("NUMBER")||String(z.TYPE).includes("BINARY_DOUBLE")||String(z.TYPE).includes("BINARY_FLOAT")||String(z.TYPE).includes("BINARY_INTEGER"))i1(H,String(z.FIELD),Z.column(String(z.FIELD)).numeric());else if(String(z.TYPE).includes("DATE")||String(z.TYPE).includes("TIMESTAMP"))i1(H,String(z.FIELD),Z.column(String(z.FIELD)).date());else if(String(z.TYPE).includes("JSON"))i1(H,String(z.FIELD),Z.column(String(z.FIELD)).json());else if(String(z.TYPE).includes("BOOLEAN"))i1(H,String(z.FIELD),Z.column(String(z.FIELD)).boolean());else if(String(z.TYPE).includes("TIMESTAMP WITH TIMEZONE")||String(z.TYPE).includes("TIMESTAMP WITH LOCAL TIME ZONE"))i1(H,String(z.FIELD),Z.column(String(z.FIELD)).string());else if(String(z.TYPE).includes("BFILE")||String(z.TYPE).includes("CLOB")||String(z.TYPE).includes("BLOB")||String(z.TYPE).includes("NCLOB"))i1(H,String(z.FIELD),Z.column(String(z.FIELD)).binary())}}),H})}});return{fields:Q,map:W}}async function lb1($,Y,X){let G=await W3($);if(!G||!G[0])throw Error(`code:${$}\u5BF9\u5E94\u6570\u636E\u5E93\u914D\u7F6E\u4E0D\u5B58\u5728`);let J=await cb1($,Y),Q=J.map.oracle({user:G[0].user??"",password:G[0].password??"",connectString:`${G[0].host}:${G[0].port}/${G[0].serviceName}`,poolAlias:$});Tt(X,J.fields);let W=await Q[Y].insert(X);return Q.close(),W}async function ib1($,Y,X,G){let J=await lX($),Q=await cb1($,Y);Tt(X,Q.fields),i1(X,"id",G);let W=db1(X,Y),K=J.execute(W);return J.commit(),J.close(),K}async function WP0($,Y){let X=await lX($),G=await X.execute(`${Y}`,[],{outFormat:_B.default.OUT_FORMAT_OBJECT});return X.commit(),X.close(),G.rows}function Gb($,Y){let X=$,G=N7($,/{{(.*?)}}/g);if(a8(G))G.forEach((J)=>{let Q=n1(n1(J,"{{",""),"}}","");if(Q.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4(Y,Q)))throw Error(`${Q}\u53D6\u503C\u5931\u8D25`);X=n1(X,`{{${Q}}}`,D4(Y,Q))});return X}var rb1=new _4;rb1.post("/",async($)=>{try{let Y=$.req.query("type"),X=await $.req.json(),G=await It(X,Y),J=$1();return J.data=G.data,J.total=G.total,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u64CD\u4F5C\u5931\u8D25"})}});var ab1=rb1;var sb1=new _4;sb1.post("/",async($)=>{try{let Y=$.req.query("type"),X=await $.req.json(),G=await Sn(X,Y),J=$1();return J.data=G.data,J.total=G.total,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u64CD\u4F5C\u5931\u8D25"})}});var ob1=sb1;ZY();var VZ4=U6(xN(),1);async function sw($,Y,X){if(X=="mysql")return await Cs($,Y);else if(X=="postgres")return await ks($,Y);else if(X=="oracle")return await It($,Y);else if(X=="sqlite")return await Sn($,Y)}qL();Uj();ZY();var Pg0=U6(xN(),1);ZY();var Ag0=U6(xN(),1);import rK4 from"vm";async function R$0($,Y){try{let X=new rK4.Script($);return rK4.createContext(Y),X.runInContext(Y),"success"}catch(X){return console.log(`codeCustom execution operation failed:${X}`),`codeCustom execution operation failed:${X}`}}import G59 from"vm";function q$0($,Y,X){try{let G=`let ifelseRes = false;
            if (${$}) {
                ifelseRes = true
            };
            ifelseRes;`;return G59.runInNewContext(G,Y)}catch(G){return X}}async function P$0($,Y,X){try{if($&&$.length>0){let G=$,J=N7($,/{{(.*?)}}/g);if(a8(J))J.forEach((Q)=>{let W=n1(n1(Q,"{{",""),"}}","");if(W.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4(Y,W)))throw Error(`${W}\u53D6\u503C\u5931\u8D25`);G=n1(G,`{{${W}}}`,D4(Y,W))});console.log(`requestId:${X}-->${G}`),kK.info(`requestId:${X}-->${G}`)}}catch(G){return console.log(`logCustomExecution operation failed:${G}`),`logCustomExecution operation failed:${G}`}return"success"}ZY();async function w$0($,Y){try{let X=await RP($?$:"");if(!X||X.length==0)throw Error("API\u7F16\u7801\u4E0D\u5B58\u5728");let G=X[0];if(!G)throw Error("API\u7F16\u7801\u4E0D\u5B58\u5728");let J=!1,Q=U.object({}),W=U.object({});if(G.parames&&G.parames.length>0)Q.parse(JSON.parse(G.parames));if(G.simplify&&G.simplify.length>0)W.parse(JSON.parse(G.simplify)),J=!0;if(J){let K=G.parames??"{}",Z=N7(G.parames,/{{(.*?)}}/g);if(xk(Z))Z.forEach((H)=>{let z=n1(n1(H,"{{",""),"}}","");if(z.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");K=n1(K,`{{${z}}}`,D4(Y,z))});i1(G,"parames",K)}if(G)switch(G.type){case"1":{let K=G.parames??"{}",Z=JSON.parse(K),H=D4(Y,$);WF(Z,H);let z=await sw(Z,"1",G.sourceType),V=$1();return V.data=z.data,V.total=z.total,V}case"2":{let K=G.parames??"{}",Z=JSON.parse(K),H=D4(Y,$);if(WF(Z,H),G.flow_data){let F=G.flow_data;q6(Z,JSON.parse(F))}let z=await sw(Z,"2",G.sourceType),V=$1();return V.data=z.data,V.total=z.total,V}default:throw Error("\u672A\u77E5\u7684API\u7C7B\u578B")}else throw Error("API\u7F16\u7801\u4E0D\u5B58\u5728")}catch(X){return console.log(`mysqlCustom execution operation failed:${X}`),`mysqlCustom execution operation failed:${X}`}}var aK4=U6(cF(),1);async function _$0($,Y,X){let G=[];try{$.forEach((Q)=>{if(Q&&Q.length>0){let W=Q,K=N7(Q,/{{(.*?)}}/g);if(a8(K))K.forEach((Z)=>{let H=n1(n1(Z,"{{",""),"}}","");if(H.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");if(QX(D4(Y,H)))throw Error(`${H}\u53D6\u503C\u5931\u8D25`);W=n1(W,`{{${H}}}`,D4(Y,H))});G.push(W)}})}catch(Q){return`transactionalExecution execution operation failed:${Q}`}if(!X||X.length==0)return"transactionalExecution execution operation failed:\u6CA1\u6709\u9009\u62E9\u6570\u636E\u6E90";let J=await dl(X);if(J=="oracle"){let Q=await lX(X);try{for(let W=0;W<G.length;W++)console.info(`sql execute:${G[W]}`),await Q.execute(`${G[W]}`,[],{outFormat:aK4.default.OUT_FORMAT_OBJECT});Q.commit()}catch(W){return Q.rollback(),console.log(`transactionalExecution execution operation failed:${W}`),`transactionalExecution execution operation failed:${W}`}}else if(J=="mysql")await(await uX(X)).transaction(async(W)=>{try{for(let K=0;K<G.length;K++)if(console.info(`sql execute:${G[K]}`),q$(G[K]))await W.execute(r.raw(G[K]))}catch(K){return W.rollback(),console.log(`transactionalExecution execution operation failed:${K}`),`transactionalExecution execution operation failed:${K}`}});else if(J=="postgres")await(await pX(X)).transaction(async(W)=>{try{for(let K=0;K<G.length;K++)if(console.info(`sql execute:${G[K]}`),q$(G[K]))await W.execute(r.raw(G[K]))}catch(K){return W.rollback(),console.log(`transactionalExecution execution operation failed:${K}`),`transactionalExecution execution operation failed:${K}`}});else if(J=="sqlite")await(await WX(X)).transaction(async(W)=>{try{for(let K=0;K<G.length;K++)if(console.info(`sql execute:${G[K]}`),q$(G[K]))W.run(r.raw(G[K]))}catch(K){return W.rollback(),console.log(`transactionalExecution execution operation failed:${K}`),`transactionalExecution execution operation failed:${K}`}});else throw Error("\u65E0\u6548\u7684\u6570\u636E\u6E90");return"success"}var sK4=new Ag0.default({length:10}),Q59=new Ag0.default({length:18}),Dg0=U.object({}),Ng0=U.object({});function W59($,Y,X){if(ji(X))Y.forEach((G)=>{i1($,G.key,D4(X,G.value))});else if(Y&&Y.length>0)i1($,Y[0].key,X)}async function oK4($,Y){let X=new Map,G=[],J=IQ({id:"loop_"+sK4.randomUUID(),inputSchema:Dg0,outputSchema:Ng0}),Q="business_"+sK4.randomUUID(),W=IQ({id:Q,inputSchema:Dg0,outputSchema:Ng0});if($.length>0&&$[0]&&$[0].breakCode&&$[0].breakCode.length>0){let H=$[0].breakCode;$.forEach((z,V)=>{let F=z.flowNodeType,L=o9({id:Q+"_"+V,description:F,inputSchema:Dg0,outputSchema:Ng0,execute:async({requestContext:N})=>{let D=N.get("myContext"),A=N.get("result"),B=N.get("reqId");try{let E="success";switch(F){case"code_custom":{let M=z.codeCustom;E=await R$0(M,D);break}case"mysql_custom":{let M=z.mysqlCustom.code,R=await w$0(M,D);E=R;let q=z.mysqlCustom.dataExtracts??[];W59(D,q,R);break}case"field_inject":{(z.fieldInject??[]).forEach((R)=>{let q=R.value;if(q=="null")i1(D,R.key,null);else if(q=="uuid")i1(D,R.key,Q59.randomUUID());else if(q=="yyyy-MM-dd")i1(D,R.key,_i());else if(q=="yyyy-MM-dd HH:mm:ss")i1(D,R.key,fX());else if(q=="emptyString")i1(D,R.key,"");else if(q=="array")i1(D,R.key,[]);else if(q=="object")i1(D,R.key,{});else if(q=="number0")i1(D,R.key,0);else if(q=="true")i1(D,R.key,!0);else if(q=="false")i1(D,R.key,!1)});break}case"field_extract":break;case"sql_custom":{let M=z.sqlCustom.sql??"",R=z.sqlCustom.dataSource??"";if(M.length==0){E="SQL\u8BED\u53E5\u4E3A\u7A7A";break}if(R.length==0){E="\u6570\u636E\u6E90\u4E3A\u7A7A";break}let q=[];q.push(M),E=await _$0(q,D,R);break}case"log_custom":{let M=z.logCustom??"";P$0(M,D,B);break}default:break}G.push({key:F+"_"+V,value:E}),vK(`\u8282\u70B9\u8F93\u51FA:${KF(E)}`,B)}catch(E){console.error(F+"_"+V+" Operation failed:",E),i1(A,"msg",`Operation failed:${E}`)}let O;if(q$0(H,D,!0))O=!0;else O=!1;return{breakLooop:O}}});W.then(L),X.set(Q,[])})}W.commit(),J.dountil(W,async({inputData:{breakLooop:H}})=>H),J.commit();let K=J.createRun(),Z=await(await K).start({inputData:{},requestContext:Y});(await K).cancel(),console.info(`\u5FAA\u73AF\u4F53\u6D41\u7A0Bid:${(await K).runId}:${Z.status}`)}async function tK4($,Y,X,G,J,Q){let W=await dl($),K=null;if(W=="mysql")switch(X){case"select":K=XF0($,mx(J,Q));break;case"insert":let Z=mx(G,Q),H=D7(JSON.parse(Z));K=await pB1($,Y,H);break;case"update":let z=mx(G,Q),V=D7(JSON.parse(z));K=await dB1($,Y,V,D4(V,"id"));break;case"delete":K=XF0($,mx(J,Q));break;default:break}else if(W=="oracle")switch(X){case"select":K=WP0($,Gb(J,Q));break;case"insert":let Z=Gb(G,Q),H=D7(JSON.parse(Z));K=await lb1($,Y,H);break;case"update":let z=Gb(G,Q),V=D7(JSON.parse(z));K=await ib1($,Y,V,D4(V,"id"));break;case"delete":K=WP0($,Gb(J,Q));break;default:break}else if(W=="postgres")switch(X){case"select":K=GF0($,ux(J,Q));break;case"insert":let Z=ux(G,Q),H=D7(JSON.parse(Z));K=await rB1($,Y,H);break;case"update":let z=ux(G,Q),V=D7(JSON.parse(z));K=await aB1($,Y,V,D4(V,"id"));break;case"delete":K=GF0($,ux(J,Q));break;default:break}else if(W=="sqlite")switch(X){case"select":K=fk($,gk(J,Q));break;case"insert":let Z=gk(G,Q),H=D7(JSON.parse(Z));K=await vn($,Y,H);break;case"update":let z=gk(G,Q),V=D7(JSON.parse(z));K=await xn($,Y,V,D4(V,"id"));break;case"delete":K=yn($,gk(J,Q));break;default:break}else throw Error("\u65E0\u6548\u7684\u6570\u636E\u6E90");return K}var K59=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,Z59=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,U59=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function H59($,Y){if($==="__proto__"||$==="constructor"&&Y&&typeof Y==="object"&&"prototype"in Y){z59($);return}return Y}function z59($){console.warn(`[destr] Dropping "${$}" key to prevent prototype pollution.`)}function eK4($,Y={}){if(typeof $!=="string")return $;if($[0]==='"'&&$[$.length-1]==='"'&&$.indexOf("\\")===-1)return $.slice(1,-1);let X=$.trim();if(X.length<=9)switch(X.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!U59.test($)){if(Y.strict)throw SyntaxError("[destr] Invalid JSON");return $}try{if(K59.test($)||Z59.test($)){if(Y.strict)throw Error("[destr] Possible prototype pollution");return JSON.parse($,H59)}return JSON.parse($)}catch(G){if(Y.strict)throw G;return $}}var U2$=String.fromCharCode;var V59=/#/g,F59=/&/g,L59=/\//g,D59=/=/g;var Mg0=/\+/g,N59=/%5e/gi,A59=/%60/gi;var B59=/%7c/gi;var O59=/%20/gi;function E59($){return encodeURI(""+$).replace(B59,"|")}function Og0($){return E59(typeof $==="string"?$:JSON.stringify($)).replace(Mg0,"%2B").replace(O59,"+").replace(V59,"%23").replace(F59,"%26").replace(A59,"`").replace(N59,"^").replace(L59,"%2F")}function Bg0($){return Og0($).replace(D59,"%3D")}function YZ4($=""){try{return decodeURIComponent(""+$)}catch{return""+$}}function M59($){return YZ4($.replace(Mg0," "))}function R59($){return YZ4($.replace(Mg0," "))}function q59($=""){let Y=Object.create(null);if($[0]==="?")$=$.slice(1);for(let X of $.split("&")){let G=X.match(/([^=]+)=?(.*)/)||[];if(G.length<2)continue;let J=M59(G[1]);if(J==="__proto__"||J==="constructor")continue;let Q=R59(G[2]||"");if(Y[J]===void 0)Y[J]=Q;else if(Array.isArray(Y[J]))Y[J].push(Q);else Y[J]=[Y[J],Q]}return Y}function P59($,Y){if(typeof Y==="number"||typeof Y==="boolean")Y=String(Y);if(!Y)return Bg0($);if(Array.isArray(Y))return Y.map((X)=>`${Bg0($)}=${Og0(X)}`).join("&");return`${Bg0($)}=${Og0(Y)}`}function w59($){return Object.keys($).filter((Y)=>$[Y]!==void 0).map((Y)=>P59(Y,$[Y])).filter(Boolean).join("&")}var _59=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,j59=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,T59=/^([/\\]\s*){2,}[^/\\]/;var I59=/\/$|\/\?|\/#/,C59=/^\.?\//;function XZ4($,Y={}){if(typeof Y==="boolean")Y={acceptRelative:Y};if(Y.strict)return _59.test($);return j59.test($)||(Y.acceptRelative?T59.test($):!1)}function Eg0($="",Y){if(!Y)return $.endsWith("/");return I59.test($)}function S59($="",Y){if(!Y)return(Eg0($)?$.slice(0,-1):$)||"/";if(!Eg0($,!0))return $||"/";let X=$,G="",J=$.indexOf("#");if(J!==-1)X=$.slice(0,J),G=$.slice(J);let[Q,...W]=X.split("?");return((Q.endsWith("/")?Q.slice(0,-1):Q)||"/")+(W.length>0?`?${W.join("?")}`:"")+G}function k59($="",Y){if(!Y)return $.endsWith("/")?$:$+"/";if(Eg0($,!0))return $||"/";let X=$,G="",J=$.indexOf("#");if(J!==-1){if(X=$.slice(0,J),G=$.slice(J),!X)return G}let[Q,...W]=X.split("?");return Q+"/"+(W.length>0?`?${W.join("?")}`:"")+G}function GZ4($,Y){if(v59(Y)||XZ4($))return $;let X=S59(Y);if($.startsWith(X)){let G=$[X.length];if(!G||G==="/"||G==="?")return $}return y59(X,$)}function JZ4($,Y){let X=WZ4($),G={...q59(X.search),...Y};return X.search=w59(G),b59(X)}function v59($){return!$||$==="/"}function x59($){return $&&$!=="/"}function y59($,...Y){let X=$||"";for(let G of Y.filter((J)=>x59(J)))if(X){let J=G.replace(C59,"");X=k59(X)+J}else X=G;return X}var QZ4=Symbol.for("ufo:protocolRelative");function WZ4($="",Y){let X=$.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(X){let[,V,F=""]=X;return{protocol:V.toLowerCase(),pathname:F,href:V+F,auth:"",host:"",search:"",hash:""}}if(!XZ4($,{acceptRelative:!0}))return Y?WZ4(Y+$):$Z4($);let[,G="",J,Q=""]=$.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,W="",K=""]=Q.match(/([^#/?]*)(.*)?/)||[];if(G==="file:")K=K.replace(/\/(?=[A-Za-z]:)/,"");let{pathname:Z,search:H,hash:z}=$Z4(K);return{protocol:G.toLowerCase(),auth:J?J.slice(0,Math.max(0,J.length-1)):"",host:W,pathname:Z,search:H,hash:z,[QZ4]:!G}}function $Z4($=""){let[Y="",X="",G=""]=($.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:Y,search:X,hash:G}}function b59($){let Y=$.pathname||"",X=$.search?($.search.startsWith("?")?"":"?")+$.search:"",G=$.hash||"",J=$.auth?$.auth+"@":"",Q=$.host||"";return($.protocol||$[QZ4]?($.protocol||"")+"//":"")+J+Q+Y+X+G}class ZZ4 extends Error{constructor($,Y){super($,Y);if(this.name="FetchError",Y?.cause&&!this.cause)this.cause=Y.cause}}function h59($){let Y=$.error?.message||$.error?.toString()||"",X=$.request?.method||$.options?.method||"GET",G=$.request?.url||String($.request)||"/",J=`[${X}] ${JSON.stringify(G)}`,Q=$.response?`${$.response.status} ${$.response.statusText}`:"<no response>",W=`${J}: ${Q}${Y?` ${Y}`:""}`,K=new ZZ4(W,$.error?{cause:$.error}:void 0);for(let Z of["request","options","response"])Object.defineProperty(K,Z,{get(){return $[Z]}});for(let[Z,H]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(K,Z,{get(){return $.response&&$.response[H]}});return K}var f59=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function KZ4($="GET"){return f59.has($.toUpperCase())}function g59($){if($===void 0)return!1;let Y=typeof $;if(Y==="string"||Y==="number"||Y==="boolean"||Y===null)return!0;if(Y!=="object")return!1;if(Array.isArray($))return!0;if($.buffer)return!1;if($ instanceof FormData||$ instanceof URLSearchParams)return!1;return $.constructor&&$.constructor.name==="Object"||typeof $.toJSON==="function"}var m59=new Set(["image/svg","application/xml","application/xhtml","application/html"]),u59=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function p59($=""){if(!$)return"json";let Y=$.split(";").shift()||"";if(u59.test(Y))return"json";if(Y==="text/event-stream")return"stream";if(m59.has(Y)||Y.startsWith("text/"))return"text";return"blob"}function d59($,Y,X,G){let J=c59(Y?.headers??$?.headers,X?.headers,G),Q;if(X?.query||X?.params||Y?.params||Y?.query)Q={...X?.params,...X?.query,...Y?.params,...Y?.query};return{...X,...Y,query:Q,params:Q,headers:J}}function c59($,Y,X){if(!Y)return new X($);let G=new X(Y);if($)for(let[J,Q]of Symbol.iterator in $||Array.isArray($)?$:new X($))G.set(J,Q);return G}async function j$0($,Y){if(Y)if(Array.isArray(Y))for(let X of Y)await X($);else await Y($)}var l59=new Set([408,409,425,429,500,502,503,504]),i59=new Set([101,204,205,304]);function Rg0($={}){let{fetch:Y=globalThis.fetch,Headers:X=globalThis.Headers,AbortController:G=globalThis.AbortController}=$;async function J(K){let Z=K.error&&K.error.name==="AbortError"&&!K.options.timeout||!1;if(K.options.retry!==!1&&!Z){let z;if(typeof K.options.retry==="number")z=K.options.retry;else z=KZ4(K.options.method)?0:1;let V=K.response&&K.response.status||500;if(z>0&&(Array.isArray(K.options.retryStatusCodes)?K.options.retryStatusCodes.includes(V):l59.has(V))){let F=typeof K.options.retryDelay==="function"?K.options.retryDelay(K):K.options.retryDelay||0;if(F>0)await new Promise((L)=>setTimeout(L,F));return Q(K.request,{...K.options,retry:z-1})}}let H=h59(K);if(Error.captureStackTrace)Error.captureStackTrace(H,Q);throw H}let Q=async function(Z,H={}){let z={request:Z,options:d59(Z,H,$.defaults,X),response:void 0,error:void 0};if(z.options.method)z.options.method=z.options.method.toUpperCase();if(z.options.onRequest){if(await j$0(z,z.options.onRequest),!(z.options.headers instanceof X))z.options.headers=new X(z.options.headers||{})}if(typeof z.request==="string"){if(z.options.baseURL)z.request=GZ4(z.request,z.options.baseURL);if(z.options.query)z.request=JZ4(z.request,z.options.query),delete z.options.query;if("query"in z.options)delete z.options.query;if("params"in z.options)delete z.options.params}if(z.options.body&&KZ4(z.options.method)){if(g59(z.options.body)){let L=z.options.headers.get("content-type");if(typeof z.options.body!=="string")z.options.body=L==="application/x-www-form-urlencoded"?new URLSearchParams(z.options.body).toString():JSON.stringify(z.options.body);if(!L)z.options.headers.set("content-type","application/json");if(!z.options.headers.has("accept"))z.options.headers.set("accept","application/json")}else if("pipeTo"in z.options.body&&typeof z.options.body.pipeTo==="function"||typeof z.options.body.pipe==="function"){if(!("duplex"in z.options))z.options.duplex="half"}}let V;if(!z.options.signal&&z.options.timeout){let L=new G;V=setTimeout(()=>{let N=Error("[TimeoutError]: The operation was aborted due to timeout");N.name="TimeoutError",N.code=23,L.abort(N)},z.options.timeout),z.options.signal=L.signal}try{z.response=await Y(z.request,z.options)}catch(L){if(z.error=L,z.options.onRequestError)await j$0(z,z.options.onRequestError);return await J(z)}finally{if(V)clearTimeout(V)}if((z.response.body||z.response._bodyInit)&&!i59.has(z.response.status)&&z.options.method!=="HEAD"){let L=(z.options.parseResponse?"json":z.options.responseType)||p59(z.response.headers.get("content-type")||"");switch(L){case"json":{let N=await z.response.text(),D=z.options.parseResponse||eK4;z.response._data=D(N);break}case"stream":{z.response._data=z.response.body||z.response._bodyInit;break}default:z.response._data=await z.response[L]()}}if(z.options.onResponse)await j$0(z,z.options.onResponse);if(!z.options.ignoreResponseError&&z.response.status>=400&&z.response.status<600){if(z.options.onResponseError)await j$0(z,z.options.onResponseError);return await J(z)}return z.response},W=async function(Z,H){return(await Q(Z,H))._data};return W.raw=Q,W.native=(...K)=>Y(...K),W.create=(K={},Z={})=>Rg0({...$,...Z,defaults:{...$.defaults,...Z.defaults,...K}}),W}var T$0=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw Error("unable to locate global object")}(),n59=T$0.fetch?(...$)=>T$0.fetch(...$):()=>Promise.reject(Error("[ofetch] global.fetch is not supported!")),r59=T$0.Headers,a59=T$0.AbortController,UZ4=Rg0({fetch:n59,Headers:r59,AbortController:a59});async function gE($,Y="POST",X,G){try{let J={};if(X&&X.length>0)J={"Cache-Control":"no-cache",Authorization:X};else J={"Cache-Control":"no-cache"};return await UZ4($,{method:Y,headers:J,body:G?G:null})}catch(J){return console.log(`http execution operation failed:${J}`),`http execution operation failed:${J}`}}var HZ4=new Pg0.default({length:10}),s59=new Pg0.default({length:18}),Ju=U.object({}),qg0=U.object({});function zZ4($,Y,X){if(ji(X))Y.forEach((G)=>{i1($,G.key,D4(X,G.value))});else if(Y&&Y.length>0)i1($,Y[0].key,X)}async function wg0($,Y,X,G,J){let Q=new p1,W=$.nodes,K=$.edges;Q.set("reqId",X),Q.set("seq",0),Q.set("myContext",{}),Q.set("result",{});let Z=dU(W,function(R){return R.type=="start"}),H=dU(W,function(R){return R.type=="end"});if(Z<0)throw Error("\u6CA1\u6709\u627E\u5230\u5F00\u59CB\u8282\u70B9");if(H<0)throw Error("\u6CA1\u6709\u627E\u5230\u7ED3\u675F\u8282\u70B9");let z=o9({id:W[Z].type+"_"+W[Z].id,description:W[Z].type,inputSchema:Ju,outputSchema:qg0,execute:async({requestContext:R})=>{let q=R.get("myContext");return q6(q,Y),R.get("logs").push({key:W[Z].type+"_"+W[Z].id,value:"success"}),{}}}),V=o9({id:W[H].type+"_"+W[H].id,description:W[H].type,inputSchema:Ju,outputSchema:Ju,execute:async({inputData:R,requestContext:q})=>{return q.get("logs").push({key:W[H].type+"_"+W[H].id,value:"success"}),{}}}),F=new Map,L=[],N=IQ({id:J?J:HZ4.randomUUID(),inputSchema:Ju,outputSchema:qg0});N.then(z),F.set(W[Z].type+"_"+W[Z].id,[]);let D=dU(K,function(R){return R.sourceNodeId==W[Z].id}),A=dU(W,function(R){return R.id==K[D].targetNodeId});Q.set("currentId",K[D].targetNodeId),Q.set("currentType",W[A].type),Q.set("currentIndex",A),Q.set("flowFinished",!1),Q.set("logs",L),W.forEach((R,q)=>{if(R.type!="end"&&R.type!="start"){let _="business_"+HZ4.randomUUID(),P=o9({id:_,description:W[H].type,inputSchema:Ju,outputSchema:qg0,execute:async({inputData:w,requestContext:j})=>{let C=j.get("myContext"),k=j.get("result"),S=j.get("currentId"),I=j.get("currentType"),v=j.get("currentIndex"),x=j.get("logs"),y=j.get("reqId"),d=j.get("seq");if(j.set("seq",d+1),j.get("flowFinished"))return{};try{let g="success";switch(j.get("currentType")){case"entity_crud":{let p=W[v].properties.entityCrud.poolCode,h=W[v].properties.entityCrud.table,n=W[v].properties.entityCrud.type,t=W[v].properties.entityCrud.dynamicObj,s=W[v].properties.entityCrud.template,K0=W[v].properties.entityCrud.contextKey,X0=await tK4(p,h,n,t,s,C);g=X0,i1(C,K0,X0);break}case"loop_body":{let p=W[v].properties.loopBody??[];await oK4(p,j);break}case"code_custom":{let p=W[v].properties.codeCustom;g=await R$0(p,C);break}case"mysql_custom":{let p=W[v].properties.mysqlCustom.code,h=await w$0(p,C);g=h;let n=W[v].properties.mysqlCustom.dataExtracts??[];zZ4(C,n,h);break}case"tool_http":{let p=D4(C,W[v].properties.toolHttp.url),h=D4(C,W[v].properties.toolHttp.auth),n=D4(C,W[v].properties.toolHttp.body),s=await gE(p,n?"POST":"GET",h,n);g=s;let K0=W[v].properties.toolHttp.dataExtracts??[];zZ4(C,K0,s);break}case"transactional_block":{let p=W[v].properties.transactionalBlock.blockRef_0,h=W[v].properties.transactionalBlock.blockRef_1,n=W[v].properties.transactionalBlock.blockRef_2,t=W[v].properties.transactionalBlock.blockRef_3,s=W[v].properties.transactionalBlock.blockRef_4,K0=W[v].properties.transactionalBlock.dataSourceSelected,X0=[];X0.push(p),X0.push(h),X0.push(n),X0.push(t),X0.push(s),g=await _$0(X0,C,K0);break}case"field_verify":{let p=W[v].properties.fieldVerify??[],h="failed:";p.forEach((n)=>{let t=D4(C,n.key),s=n.value,K0=n.msg,X0=!1;if(s=="isNil")X0=MZ0(t);else if(s=="isBoolean")X0=OZ0(t);else if(s=="isString")X0=RZ0(t);else if(s=="isJSON")X0=EZ0(t);else if(s=="isJSONArray")X0=In(t);else if(s=="isJSONObject")X0=Cn(t);else if(s=="isJSONValue")X0=bk(t);else if(s=="isNotNil")X0=xK(t);else if(s=="isNotEmpty")X0=!BZ0(t);if(!X0)j.set("flowFinished",!0),h=h+K0,i1(k,"msg",h),g=h});break}case"field_inject":{(W[v].properties.fieldInject??[]).forEach((h)=>{let n=h.value;if(n=="null")i1(C,h.key,null);else if(n=="uuid")i1(C,h.key,s59.randomUUID());else if(n=="yyyy-MM-dd")i1(C,h.key,_i());else if(n=="yyyy-MM-dd HH:mm:ss")i1(C,h.key,fX());else if(n=="emptyString")i1(C,h.key,"");else if(n=="array")i1(C,h.key,[]);else if(n=="object")i1(C,h.key,{});else if(n=="number0")i1(C,h.key,0);else if(n=="true")i1(C,h.key,!0);else if(n=="false")i1(C,h.key,!1)});break}case"field_extract":{(W[v].properties.fieldExtract??[]).forEach((h)=>{i1(k,h.value,D4(C,h.key))});break}case"log_custom":{let p=W[v].properties.logCustom??"";P$0(p,C,y);break}default:break}x.push({key:W[v].type+"_"+W[v].id,value:g}),vK(`\u8282\u70B9\u8F93\u51FA:${KF(g)}`,X)}catch(g){console.error(S+" Operation failed:",g),i1(k,"msg",`Operation failed:${g}`)}if(I=="ifelse"){let g=W[v].properties.ifelse??[];if(g&&g.length>0){let p;g.forEach((t)=>{if(q$0(t.value,C,!1))p=t.key});let h=dU(K,function(t){return t.sourceNodeId==S&&t.text&&t.text.value&&t.text.value==p});if(h<0)return j.set("flowFinished",!0),i1(k,"msg","Operation failed:\u5206\u652F\u5224\u65AD\u7EC4\u4EF6\u6CA1\u6709\u627E\u5230\u6B63\u786E\u7684\u5206\u652F"),{};x.push({key:W[v].type+"_"+W[v].id,value:"success"}),j.set("currentId",K[h].targetNodeId);let n=dU(W,function(t){return t.id==K[h].targetNodeId});if(j.set("currentType",W[n].type),j.set("currentIndex",n),W[n].type=="end")j.set("flowFinished",!0);return{}}}let u=dU(K,function(g){return g.sourceNodeId==S});if(u<0)return j.set("flowFinished",!0),i1(k,"msg","Operation failed:\u6CA1\u6709\u627E\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9"),{};j.set("currentId",K[u].targetNodeId);let b=dU(W,function(g){return g.id==K[u].targetNodeId});if(j.set("currentType",W[b].type),j.set("currentIndex",b),W[b].type=="end")j.set("flowFinished",!0);return{}}});N.then(P),F.set(_,[])}}),N.then(V),F.set(W[H].type+"_"+W[H].id,[]),Q.set("seq",Q.get("seq")??2),N.commit();let B=N.createRun(),O=await(await B).start({inputData:{},requestContext:Q});(await B).cancel();let E=Q.get("result"),M=Q.get("myContext");return Q.clear(),console.info(`workflowInstance id:${(await B).runId}:${O.status}`),{outputData:E,myContext:M,runTimeLogs:L}}var FZ4=new _4,i2$=new VZ4.default({length:10}),o59=()=>{return B5().var.traceId};FZ4.post("/:code",async($)=>{try{let Y=o59(),X=$.req.param("code");U.string().parse(X);let J=await $.req.json();try{U.object({}).parse(J)}catch(K){throw new v0(500,{message:"\u7F3A\u5C11\u8BF7\u6C42\u4F53"})}let Q=J.inputs;try{U.object({}).parse(Q)}catch(K){Q=J}let W=$.req.query("debug")?$.req.query("debug"):!1;if(W=="true"||W){let K=J.flowData;U.object({nodes:U.array(U.object({})),edges:U.array(U.object({}))}).parse(K);let H=$1();H.requestId=Y;let{outputData:z,myContext:V,runTimeLogs:F}=await wg0(K,Q,Y,!0);return H.data=z,H.myContext=V,H.runTimeLogs=F,$.json(H)}else{let K=await RP(X?X:"");if(!K||K.length==0)throw new v0(500,{message:"API\u7F16\u7801\u4E0D\u5B58\u5728"});let Z=K[0];if(!Z)throw new v0(500,{message:"API\u7F16\u7801\u4E0D\u5B58\u5728"});let H=!1,z=U.object({}),V=U.object({});if(Z.parames&&Z.parames.length>0)z.parse(JSON.parse(Z.parames));if(Z.simplify&&Z.simplify.length>0)V.parse(JSON.parse(Z.simplify)),H=!0;if(H){let F=Z.parames??"{}",L=N7(Z.parames,/{{(.*?)}}/g);if(xk(L))L.forEach((N)=>{let D=n1(n1(N,"{{",""),"}}","");if(D.length==0)throw Error("{{}}\u4E2D\u7684\u5185\u5BB9\u4E3A\u7A7A");F=n1(F,`{{${D}}}`,D4(Q,D))});i1(Z,"parames",F)}if(Z)switch(Z.type){case"1":{vK(`\u53C2\u6570:${JSON.stringify(Q)}`,Y);let F=Z.parames??"{}",L=JSON.parse(F);WF(L,Q);let N=await sw(L,"1",Z.sourceType),D=$1();return D.requestId=Y,D.data=N.data,D.total=N.total,vK(`\u54CD\u5E94\u8F93\u51FA:${KF(D)}`,Y),$.json(D)}case"2":{vK(`\u53C2\u6570:${JSON.stringify(Q)}`,Y);let F=Z.parames??"{}",L=JSON.parse(F);if(WF(L,Q),Z.flow_data){let A=Z.flow_data;q6(L,JSON.parse(A))}let N=await sw(L,"2",Z.sourceType),D=$1();return D.requestId=Y,D.data=N.data,D.total=N.total,vK(`\u54CD\u5E94\u8F93\u51FA:${KF(D)}`,Y),$.json(D)}case"3":{vK(`\u53C2\u6570:${JSON.stringify(Q)}`,Y);let F=Z.parames??"{}",L=JSON.parse(F);if(WF(L,Q),Z.flow_data){let N=$1();N.requestId=Y;let D=Z.flow_data,{outputData:A}=await wg0(JSON.parse(D),L,Y,!1);return N.data=A,vK(`\u54CD\u5E94\u8F93\u51FA:${KF(N)}`,Y),$.json(N)}else{let N=$1();return N.requestId=Y,N.data={message:"\u6D41\u7A0B\u6570\u636E\u5F02\u5E38"},$.json(N)}}default:throw new v0(500,{message:"\u672A\u77E5\u7684API\u7C7B\u578B"})}else throw new v0(500,{message:"API\u7F16\u7801\u4E0D\u5B58\u5728"})}}catch(Y){throw console.error(Y),kK.error(Y),new v0(500,{message:`\u8FD0\u884C\u5931\u8D25:${Y}`})}});var LZ4=FZ4;var DZ4=new _4;DZ4.get("/",async($)=>{let Y=$.req.query("appId"),X=$.req.query("appSecret"),G=$1();if(!Y||!X)throw new v0(401,{message:"appId\u7F3A\u5C11"});let J=await Ii(Y?Y:"",X?X:"");if(J.length==0)throw new v0(401,{message:"appId\u65E0\u6548"});let Q=await cH(J[0].day);return G.data={success:!0,msg:"",token:Q},$.json(G)});var NZ4=DZ4;var r3=B6("sys_mcpmanager",{id:g0("id"),name:g0("name"),description:g0("description"),paramsSchema:g0("paramsSchema"),code:g0("code"),remark:g0("remark"),transText:g0("transText"),createdAt:m1("createdAt"),updatedAt:m1("updatedAt"),latest_visitAt:m1("latest_visitAt"),createBy:g0("createBy"),updateBy:g0("updateBy"),env_id:g0("env_id")});function _g0($){let Y=r.raw("1 = 1");if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));if($.description&&$.description.length>0)Y.append(r.raw(` and description like '%${$.description}%'`));if($.remark&&$.remark.length>0)Y.append(r.raw(` and remark like '%${$.remark}%'`));return Y}async function AZ4($){return await e0.select().from(r3).where(_g0($)).limit(Number($.limit)).offset(Number($.offset))}async function BZ4($){return await e0.select().from(r3).where(_g0($))}async function OZ4($){return await e0.$count(r3,_g0($))}async function EZ4($){let Y=await e0.$count(r3,_1(r3.id,$.id));if(Y&&Y>0)t59($);else{let X=Date.now();$.id=C6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await e0.insert(r3).values($)}}async function t59($){let Y=Date.now();$.updateBy="admin",$.updatedAt=Y,$.latest_visitAt=Y,await e0.update(r3).set($).where(_1(r3.id,$.id))}async function MZ4($){await e0.delete(r3).where(_1(r3.id,$))}var Qu=new _4;Qu.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};q6(Y,$.req.query());let X=await AZ4(Y),G=await OZ4(Y),J=$1();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});Qu.post("/save",async($)=>{try{let Y=await $.req.json(),X={};q6(X,Y),await EZ4(X);let G=$1();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});Qu.post("/delete",async($)=>{try{let Y=await $.req.json();await MZ4(Y.id);let X=$1();return $.json(X)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5220\u9664\u5931\u8D25"})}});Qu.get("/loadServer",async($)=>{try{let Y=$1();return $.json(Y)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5237\u65B0\u5931\u8D25"})}});var qZ4=Qu;class I7 extends Error{constructor($,Y){super($);this.errorUri=Y,this.name=this.constructor.name}toResponseObject(){let $={error:this.errorCode,error_description:this.message};if(this.errorUri)$.error_uri=this.errorUri;return $}get errorCode(){return this.constructor.errorCode}}class Wu extends I7{}Wu.errorCode="invalid_request";class mE extends I7{}mE.errorCode="invalid_client";class uE extends I7{}uE.errorCode="invalid_grant";class pT extends I7{}pT.errorCode="unauthorized_client";class Ku extends I7{}Ku.errorCode="unsupported_grant_type";class Zu extends I7{}Zu.errorCode="invalid_scope";class I$0 extends I7{}I$0.errorCode="access_denied";class zV extends I7{}zV.errorCode="server_error";class C$0 extends I7{}C$0.errorCode="temporarily_unavailable";class S$0 extends I7{}S$0.errorCode="unsupported_response_type";class k$0 extends I7{}k$0.errorCode="unsupported_token_type";class v$0 extends I7{}v$0.errorCode="invalid_token";class x$0 extends I7{}x$0.errorCode="method_not_allowed";class Uu extends I7{}Uu.errorCode="too_many_requests";class pE extends I7{}pE.errorCode="invalid_client_metadata";class y$0 extends I7{}y$0.errorCode="insufficient_scope";class b$0 extends I7{}b$0.errorCode="invalid_target";var PZ4={[Wu.errorCode]:Wu,[mE.errorCode]:mE,[uE.errorCode]:uE,[pT.errorCode]:pT,[Ku.errorCode]:Ku,[Zu.errorCode]:Zu,[I$0.errorCode]:I$0,[zV.errorCode]:zV,[C$0.errorCode]:C$0,[S$0.errorCode]:S$0,[k$0.errorCode]:k$0,[v$0.errorCode]:v$0,[x$0.errorCode]:x$0,[Uu.errorCode]:Uu,[pE.errorCode]:pE,[y$0.errorCode]:y$0,[b$0.errorCode]:b$0};O1();O1();var IX=Oz().superRefine(($,Y)=>{if(!URL.canParse($))return Y.addIssue({code:x10.custom,message:"URL must be parseable",fatal:!0}),Aw}).refine(($)=>{let Y=new URL($);return Y.protocol!=="javascript:"&&Y.protocol!=="data:"&&Y.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),_Z4=$7({resource:T0().url(),authorization_servers:y1(IX).optional(),jwks_uri:T0().url().optional(),scopes_supported:y1(T0()).optional(),bearer_methods_supported:y1(T0()).optional(),resource_signing_alg_values_supported:y1(T0()).optional(),resource_name:T0().optional(),resource_documentation:T0().optional(),resource_policy_uri:T0().url().optional(),resource_tos_uri:T0().url().optional(),tls_client_certificate_bound_access_tokens:U9().optional(),authorization_details_types_supported:y1(T0()).optional(),dpop_signing_alg_values_supported:y1(T0()).optional(),dpop_bound_access_tokens_required:U9().optional()}),jg0=$7({issuer:T0(),authorization_endpoint:IX,token_endpoint:IX,registration_endpoint:IX.optional(),scopes_supported:y1(T0()).optional(),response_types_supported:y1(T0()),response_modes_supported:y1(T0()).optional(),grant_types_supported:y1(T0()).optional(),token_endpoint_auth_methods_supported:y1(T0()).optional(),token_endpoint_auth_signing_alg_values_supported:y1(T0()).optional(),service_documentation:IX.optional(),revocation_endpoint:IX.optional(),revocation_endpoint_auth_methods_supported:y1(T0()).optional(),revocation_endpoint_auth_signing_alg_values_supported:y1(T0()).optional(),introspection_endpoint:T0().optional(),introspection_endpoint_auth_methods_supported:y1(T0()).optional(),introspection_endpoint_auth_signing_alg_values_supported:y1(T0()).optional(),code_challenge_methods_supported:y1(T0()).optional(),client_id_metadata_document_supported:U9().optional()}),e59=$7({issuer:T0(),authorization_endpoint:IX,token_endpoint:IX,userinfo_endpoint:IX.optional(),jwks_uri:IX,registration_endpoint:IX.optional(),scopes_supported:y1(T0()).optional(),response_types_supported:y1(T0()),response_modes_supported:y1(T0()).optional(),grant_types_supported:y1(T0()).optional(),acr_values_supported:y1(T0()).optional(),subject_types_supported:y1(T0()),id_token_signing_alg_values_supported:y1(T0()),id_token_encryption_alg_values_supported:y1(T0()).optional(),id_token_encryption_enc_values_supported:y1(T0()).optional(),userinfo_signing_alg_values_supported:y1(T0()).optional(),userinfo_encryption_alg_values_supported:y1(T0()).optional(),userinfo_encryption_enc_values_supported:y1(T0()).optional(),request_object_signing_alg_values_supported:y1(T0()).optional(),request_object_encryption_alg_values_supported:y1(T0()).optional(),request_object_encryption_enc_values_supported:y1(T0()).optional(),token_endpoint_auth_methods_supported:y1(T0()).optional(),token_endpoint_auth_signing_alg_values_supported:y1(T0()).optional(),display_values_supported:y1(T0()).optional(),claim_types_supported:y1(T0()).optional(),claims_supported:y1(T0()).optional(),service_documentation:T0().optional(),claims_locales_supported:y1(T0()).optional(),ui_locales_supported:y1(T0()).optional(),claims_parameter_supported:U9().optional(),request_parameter_supported:U9().optional(),request_uri_parameter_supported:U9().optional(),require_request_uri_registration:U9().optional(),op_policy_uri:IX.optional(),op_tos_uri:IX.optional(),client_id_metadata_document_supported:U9().optional()}),jZ4=k1({...e59.shape,...jg0.pick({code_challenge_methods_supported:!0}).shape}),Tg0=k1({access_token:T0(),id_token:T0().optional(),token_type:T0(),expires_in:aw.number().optional(),scope:T0().optional(),refresh_token:T0().optional()}).strip(),TZ4=k1({error:T0(),error_description:T0().optional(),error_uri:T0().optional()}),wZ4=IX.optional().or(A4("").transform(()=>{return})),IZ4=k1({redirect_uris:y1(IX),token_endpoint_auth_method:T0().optional(),grant_types:y1(T0()).optional(),response_types:y1(T0()).optional(),client_name:T0().optional(),client_uri:IX.optional(),logo_uri:wZ4,scope:T0().optional(),contacts:y1(T0()).optional(),tos_uri:wZ4,policy_uri:T0().optional(),jwks_uri:IX.optional(),jwks:wh().optional(),software_id:T0().optional(),software_version:T0().optional(),software_statement:T0().optional()}).strip(),$$9=k1({client_id:T0(),client_secret:T0().optional(),client_id_issued_at:H8().optional(),client_secret_expires_at:H8().optional()}).strip(),Ig0=IZ4.merge($$9),zK$=k1({error:T0(),error_description:T0().optional()}).strip(),Y$9=k1({token:T0(),token_type_hint:T0().optional()}).strip();var Cg0;Cg0=globalThis.crypto?.webcrypto??globalThis.crypto??import("crypto").then(($)=>$.webcrypto);async function X$9($){return(await Cg0).getRandomValues(new Uint8Array($))}async function G$9($){let X=Math.pow(2,8)-Math.pow(2,8)%66,G="";while(G.length<$){let J=await X$9($-G.length);for(let Q of J)if(Q<X)G+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~"[Q%66]}return G}async function J$9($){return await G$9($)}async function Q$9($){let Y=await(await Cg0).subtle.digest("SHA-256",new TextEncoder().encode($));return btoa(String.fromCharCode(...new Uint8Array(Y))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function Sg0($){if(!$)$=43;if($<43||$>128)throw`Expected a length between 43 and 128. Received ${$}.`;let Y=await J$9($),X=await Q$9(Y);return{code_verifier:Y,code_challenge:X}}var CZ4=($,Y)=>{return new Response($,{headers:{"Content-Type":Y}}).formData()};var CK$=k1({client_id:T0(),redirect_uri:T0().optional().refine(($)=>$===void 0||URL.canParse($),{message:"redirect_uri must be a valid URL"})}),SK$=k1({response_type:A4("code"),code_challenge:T0(),code_challenge_method:A4("S256"),scope:T0().optional(),state:T0().optional(),resource:Oz().optional()});var kK$=k1({grant_type:T0()}),vK$=k1({code:T0(),code_verifier:T0(),redirect_uri:T0().optional(),resource:Oz().optional()}),xK$=k1({refresh_token:T0(),scope:T0().optional(),resource:Oz().optional()});var yK$=k1({client_id:T0(),client_secret:T0().optional()});BY();var X70=class{writer;encoder;writable;abortSubscribers=[];responseReadable;aborted=!1;closed=!1;constructor($,Y){this.writable=$,this.writer=$.getWriter(),this.encoder=new TextEncoder;let X=Y.getReader();this.abortSubscribers.push(async()=>{await X.cancel()}),this.responseReadable=new ReadableStream({async pull(G){let{done:J,value:Q}=await X.read();J?G.close():G.enqueue(Q)},cancel:()=>{this.abort()}})}async write($){try{if(typeof $==="string")$=this.encoder.encode($);await this.writer.write($)}catch{}return this}async writeln($){return await this.write($+`
`),this}sleep($){return new Promise((Y)=>setTimeout(Y,$))}async close(){try{await this.writer.close()}catch{}this.closed=!0}async pipe($){this.writer.releaseLock(),await $.pipeTo(this.writable,{preventClose:!0}),this.writer=this.writable.getWriter()}onAbort($){this.abortSubscribers.push($)}abort(){if(!this.aborted)this.aborted=!0,this.abortSubscribers.forEach(($)=>$())}};var G70=()=>{let $=typeof Bun<"u"?Bun.version:void 0;if($===void 0)return!1;let Y=$.startsWith("1.1")||$.startsWith("1.0")||$.startsWith("0.");return G70=()=>Y,Y};var R$9=new WeakMap,J70=($,Y,X)=>{let{readable:G,writable:J}=new TransformStream,Q=new X70(J,G);if(G70())$.req.raw.signal.addEventListener("abort",()=>{if(!Q.closed)Q.abort()});return R$9.set(Q.responseReadable,$),(async()=>{try{await Y(Q)}catch(W){if(W===void 0);else if(W instanceof Error&&X)await X(W,Q);else console.error(W)}finally{Q.close()}})(),$.newResponse(Q.responseReadable)};var og0=class extends X70{constructor($,Y){super($,Y)}async writeSSE($){let X=(await eC($.data,Hc.Stringify,!1,{})).split(/\r\n|\r|\n/).map((J)=>{return`data: ${J}`}).join(`
`);for(let J of["event","id","retry"])if($[J]&&/[\r\n]/.test($[J]))throw Error(`${J} must not contain "\\r" or "\\n"`);let G=[$.event&&`event: ${$.event}`,X,$.id&&`id: ${$.id}`,$.retry&&`retry: ${$.retry}`].filter(Boolean).join(`
`)+`

`;await this.write(G)}};var bU4=()=>{let $=typeof Bun<"u"?Bun.version:void 0;if($===void 0)return!1;let Y=$.startsWith("1.1")||$.startsWith("1.0")||$.startsWith("0.");return bU4=()=>Y,Y},q$9=async($,Y,X)=>{try{await Y($)}catch(G){if(G instanceof Error&&X)await X(G,$),await $.writeSSE({event:"error",data:G.message});else console.error(G)}},P$9=new WeakMap,xU4=($,Y,X)=>{let{readable:G,writable:J}=new TransformStream,Q=new og0(J,G);if(bU4())$.req.raw.signal.addEventListener("abort",()=>{if(!Q.closed)Q.abort()});return P$9.set(Q.responseReadable,$),$.header("Transfer-Encoding","chunked"),$.header("Content-Type","text/event-stream"),$.header("Cache-Control","no-cache"),$.header("Connection","keep-alive"),q$9(Q,Y,X),$.newResponse(Q.responseReadable)},Q70=class{#$=!1;#Y=!1;#X;#J;#G;#Q;#U=!1;#Z="_GET_stream";#W=new Map;#H=new Map;#F=new Map;#V;#K;#A;sessionId;onclose;onerror;onmessage;constructor($){this.#G=$?.sessionIdGenerator,this.#U=$?.enableJsonResponse??!1,this.#Q=$?.eventStore,this.#X=$?.onsessioninitialized,this.#J=$?.onsessionclosed,this.#V=$?.allowedHosts,this.#K=$?.allowedOrigins,this.#A=$?.enableDnsRebindingProtection??!1}async start(){if(this.#$)throw Error("Transport already started");this.#$=!0}#O($){if(!this.#A)return;if(this.#V&&this.#V.length>0){let Y=$.req.header("Host");if(!Y||!this.#V.includes(Y))return`Invalid Host header: ${Y}`}if(this.#K&&this.#K.length>0){let Y=$.req.header("Origin");if(!Y||!this.#K.includes(Y))return`Invalid Origin header: ${Y}`}}async handleRequest($,Y){let X=this.#O($);if(X)throw new v0(403,{res:Response.json({jsonrpc:"2.0",error:{code:-32000,message:X},id:null})});switch($.req.method){case"GET":return this.handleGetRequest($);case"POST":return this.handlePostRequest($,Y);case"DELETE":return this.handleDeleteRequest($);default:return this.handleUnsupportedRequest($)}}async handleGetRequest($){try{if(!$.req.header("Accept")?.includes("text/event-stream"))throw new v0(406,{res:Response.json({jsonrpc:"2.0",error:{code:-32000,message:"Not Acceptable: Client must accept text/event-stream"},id:null})});if(this.#N($),this.#B($),this.sessionId!==void 0)$.header("mcp-session-id",this.sessionId);let Y=this.#Z;if(this.#Q){let X=$.req.header("last-event-id");if(X)Y=(G)=>this.#Q.replayEventsAfter(X,{send:async(J,Q)=>{try{await G.writeSSE({id:J,event:"message",data:JSON.stringify(Q)})}catch{throw this.onerror?.(Error("Failed replay events")),new v0(500,{message:"Failed replay events"})}}})}if(typeof Y==="string"&&this.#W.get(Y)!==void 0)throw new v0(409,{res:Response.json({jsonrpc:"2.0",error:{code:-32000,message:"Conflict: Only one SSE stream is allowed per session"},id:null})});return xU4($,async(X)=>{let G=typeof Y==="string"?Y:await Y(X),J=setInterval(()=>{if(!X.closed)X.writeSSE({data:"",event:"ping"}).catch(()=>{X.abort()})},30000);if(typeof J==="object"&&"unref"in J)J.unref();this.#W.set(G,{ctx:{header:$.header},stream:X,cleanup:()=>{clearInterval(J),this.#W.delete(G)}}),X.onAbort(()=>{this.#W.get(G)?.cleanup()})})}catch(Y){if(Y instanceof v0)throw Y;throw this.onerror?.(Y),new v0(400,{res:Response.json({jsonrpc:"2.0",error:{code:j1.ParseError,message:"Parse error",data:String(Y)},id:null})})}}async handlePostRequest($,Y){try{let X=$.req.header("Accept");if(!X?.includes("application/json")||!X.includes("text/event-stream"))throw new v0(406,{res:Response.json({jsonrpc:"2.0",error:{code:j1.ConnectionClosed,message:"Not Acceptable: Client must accept both application/json and text/event-stream"},id:null})});if(!$.req.header("Content-Type")?.includes("application/json"))throw new v0(415,{res:Response.json({jsonrpc:"2.0",error:{code:j1.ConnectionClosed,message:"Unsupported Media Type: Content-Type must be application/json"},id:null})});let G=$.get("auth"),J={headers:$.req.header()},Q=Y;if(Q===void 0)Q=await $.req.json();let W;if(Array.isArray(Q))W=Q.map((H)=>C7.parse(H));else W=[C7.parse(Q)];let K=W.some(iT);if(K){if(this.#Y&&this.sessionId!==void 0)throw new v0(400,{res:Response.json({jsonrpc:"2.0",error:{code:j1.InvalidRequest,message:"Invalid Request: Server already initialized"},id:null})});if(W.length>1)throw new v0(400,{res:Response.json({jsonrpc:"2.0",error:{code:j1.InvalidRequest,message:"Invalid Request: Only one initialization request is allowed"},id:null})});if(this.sessionId=this.#G?.(),this.#Y=!0,this.sessionId&&this.#X)await this.#X(this.sessionId)}if(!K)this.#N($),this.#B($);let Z=W.some(DJ);if(!Z){for(let H of W)this.onmessage?.(H,{authInfo:G,requestInfo:J});return $.json(null,{status:202})}if(Z){let H=crypto.randomUUID();if(!this.#U&&this.sessionId!==void 0)$.header("mcp-session-id",this.sessionId);if(this.#U)return await new Promise((z)=>{for(let V of W)if(DJ(V))this.#W.set(H,{ctx:{header:$.header,json:(F)=>{z($.json(F))}},cleanup:()=>{this.#W.delete(H)}}),this.#H.set(V.id,H);for(let V of W)this.onmessage?.(V,{authInfo:G,requestInfo:J})});return xU4($,async(z)=>{for(let V of W)if(DJ(V))this.#W.set(H,{ctx:{header:$.header},stream:z,cleanup:()=>{this.#W.delete(H)}}),this.#H.set(V.id,H);for(let V of W)this.onmessage?.(V,{authInfo:G,requestInfo:J});z.onAbort(()=>{this.#W.get(H)?.cleanup()})})}}catch(X){if(X instanceof v0)throw X;throw this.onerror?.(X),new v0(400,{res:Response.json({jsonrpc:"2.0",error:{code:j1.ParseError,message:"Parse error",data:String(X)},id:null})})}}async handleDeleteRequest($){if(this.#N($),this.#B($),this.#J&&this.sessionId)await Promise.resolve(this.#J(this.sessionId));return await this.close(),$.body(null,200)}handleUnsupportedRequest($){return $.json({jsonrpc:"2.0",error:{code:j1.ConnectionClosed,message:"Method not allowed."},id:null},{status:405,headers:{Allow:"GET, POST, DELETE"}})}#N($){if(this.#G===void 0)return!0;if(!this.#Y)throw new v0(400,{res:Response.json({jsonrpc:"2.0",error:{code:j1.ConnectionClosed,message:"Bad Request: Server not initialized"},id:null})});let Y=$.req.header("mcp-session-id");if(!Y)throw new v0(400,{res:Response.json({jsonrpc:"2.0",error:{code:j1.ConnectionClosed,message:"Bad Request: Mcp-Session-Id header is required"},id:null})});if(Array.isArray(Y))throw new v0(400,{res:Response.json({jsonrpc:"2.0",error:{code:j1.ConnectionClosed,message:"Bad Request: Mcp-Session-Id header must be a single value"},id:null})});if(Y!==this.sessionId)throw new v0(404,{res:Response.json({jsonrpc:"2.0",error:{code:j1.RequestTimeout,message:"Session not found"},id:null})});return!0}#B($){let Y=$.req.header("mcp-protocol-version")??zu;if(Array.isArray(Y))Y=Y[Y.length-1];if(!$K.includes(Y))throw new v0(404,{res:Response.json({jsonrpc:"2.0",error:{code:j1.ConnectionClosed,message:`Bad Request: Unsupported protocol version (supported versions: ${$K.join(", ")})`},id:null})});return!0}async close(){for(let{stream:$}of this.#W.values())$?.abort();this.#W.clear(),this.#F.clear(),this.onclose?.()}async send($,Y){let X=Y?.relatedRequestId;if(CX($)||XK($))X=$.id;if(X===void 0){if(CX($)||XK($))throw Error("Cannot send a response on a standalone SSE stream unless resuming a previous client request");let Q=this.#W.get(this.#Z);if(Q===void 0)return;let W;if(this.#Q)W=await this.#Q.storeEvent(this.#Z,$);return Q.stream?.writeSSE({id:W,event:"message",data:JSON.stringify($)})}let G=this.#H.get(X),J=this.#W.get(G);if(!G)throw Error(`No connection established for request ID: ${String(X)}`);if(!this.#U){let Q;if(this.#Q)Q=await this.#Q.storeEvent(G,$);if(J)await J.stream?.writeSSE({id:Q,event:"message",data:JSON.stringify($)})}if(CX($)||XK($)){this.#F.set(X,$);let Q=Array.from(this.#H.entries()).filter(([,W])=>this.#W.get(W)===J).map(([W])=>W);if(Q.every((W)=>this.#F.has(W))){if(!J)throw Error(`No connection established for request ID: ${String(X)}`);if(this.#U){if(this.sessionId!==void 0)J.ctx.header("mcp-session-id",this.sessionId);let W=Q.map((K)=>this.#F.get(K));J.ctx.json?.(W.length===1?W[0]:W);return}else J.stream?.abort();for(let W of Q)this.#F.delete(W),this.#H.delete(W)}}}},zZ$=class{#$;#Y;#X;#J;#G;constructor($={}){let{streamBufferSize:Y=100,eventsPerStreamBufferSize:X=100,idGenerator:G=()=>crypto.randomUUID()}=$;this.#X=new Map,this.#J=new Map,this.#$=X,this.#G=G,this.#Y=new yU4(Y,({streamId:J,events:Q})=>{this.#X.delete(J),Q.reset()})}async storeEvent($,Y){let X=this.#G();if(this.#J.set(X,$),!this.#X.has($)||this.#Y.get(this.#X.get($))==null)this.#X.set($,this.#Y.head),this.#Y.push({streamId:$,events:new yU4(this.#$,({id:G})=>{this.#J.delete(G)})});return this.#Y.get(this.#X.get($)).events.push({id:X,message:Y}),X}async replayEventsAfter($,Y){let X=this.#J.get($);if(!X)return"_unknown_stream";let G=this.#Y.get(this.#X.get(X)).events.read(),J=G.findIndex((W)=>W.id===$),Q=J>-1?G.slice(J+1):G;for(let W of Q)await Y.send(W.id,W.message);return X}reset(){this.#Y.reset(),this.#X.clear(),this.#J.clear()}},yU4=class{#$;#Y;#X;#J;#G;constructor($,Y){this.#$=Array($),this.#Y=0,this.#X=0,this.#J=$,this.#G=Y}get head(){return this.#Y}push($){let Y=this.#Y%this.#J,X=this.#$[Y];if(X!=null&&this.#G!=null)this.#G(X);this.#$[Y]=$,this.#Y++,this.#X=Math.max(this.#X,this.#Y-this.#J)}get($){if($<this.#X||$>=this.#Y)return;return this.#$[$%this.#J]}read(){let $=[];for(let Y=this.#X;Y<this.#Y;Y++){let X=this.get(Y);if(X==null)break;$.push(X)}return $}reset(){if(this.#G!=null)for(let $ of this.read())this.#G($);this.#$=Array(this.#J),this.#Y=0,this.#X=0}};cG();sX();sX();sX();j4();var _$9=x0("ZodMiniType",($,Y)=>{if(!$._zod)throw Error("Uninitialized schema in ZodMiniType.");K6.init($,Y),$.def=Y,$.type=Y.type,$.parse=(X,G)=>SB($,X,G,{callee:$.parse}),$.safeParse=(X,G)=>zL($,X,G),$.parseAsync=async(X,G)=>kB($,X,G,{callee:$.parseAsync}),$.safeParseAsync=async(X,G)=>VL($,X,G),$.check=(...X)=>{return $.clone({...Y,checks:[...Y.checks??[],...X.map((G)=>typeof G==="function"?{_zod:{check:G,def:{check:"custom"},onattach:[]}}:G)]},{parent:!0})},$.with=$.check,$.clone=(X,G)=>hY($,X,G),$.brand=()=>$,$.register=(X,G)=>{return X.add($,G),$},$.apply=(X)=>X($)});var j$9=x0("ZodMiniObject",($,Y)=>{ke.init($,Y),_$9.init($,Y),m6($,"shape",()=>Y.shape)});function tg0($,Y){let X={type:"object",shape:$??{},...R1(Y)};return new j$9(X)}yw();G00();function CQ($){return!!$._zod}function $M($){let Y=Object.values($);if(Y.length===0)return tg0({});let X=Y.every(CQ),G=Y.every((J)=>!CQ(J));if(X)return tg0($);if(G)return mT0($);throw Error("Mixed Zod versions detected in object shape.")}function BJ($,Y){if(CQ($))return zL($,Y);return $.safeParse(Y)}async function W70($,Y){if(CQ($))return await VL($,Y);return await $.safeParseAsync(Y)}function o3($){if(!$)return;let Y;if(CQ($))Y=$._zod?.def?.shape;else Y=$.shape;if(!Y)return;if(typeof Y==="function")try{return Y()}catch{return}return Y}function WI($){if(!$)return;if(typeof $==="object"){let Y=$,X=$;if(!Y._def&&!X._zod){let G=Object.values($);if(G.length>0&&G.every((J)=>typeof J==="object"&&J!==null&&(J._def!==void 0||J._zod!==void 0||typeof J.parse==="function")))return $M($)}}if(CQ($)){let X=$._zod?.def;if(X&&(X.type==="object"||X.shape!==void 0))return $}else if($.shape!==void 0)return $;return}function K70($){if($&&typeof $==="object"){if("message"in $&&typeof $.message==="string")return $.message;if("issues"in $&&Array.isArray($.issues)&&$.issues.length>0){let Y=$.issues[0];if(Y&&typeof Y==="object"&&"message"in Y)return String(Y.message)}try{return JSON.stringify($)}catch{return String($)}}return String($)}function hU4($){return $.description}function fU4($){if(CQ($))return $._zod?.def?.type==="optional";let Y=$;if(typeof $.isOptional==="function")return $.isOptional();return Y._def?.typeName==="ZodOptional"}function Z70($){if(CQ($)){let Q=$._zod?.def;if(Q){if(Q.value!==void 0)return Q.value;if(Array.isArray(Q.values)&&Q.values.length>0)return Q.values[0]}}let X=$._def;if(X){if(X.value!==void 0)return X.value;if(Array.isArray(X.values)&&X.values.length>0)return X.values[0]}let G=$.value;if(G!==void 0)return G;return}BY();function yD($){return $==="completed"||$==="failed"||$==="cancelled"}B40();function I$9($){if(!$)return"draft-7";if($==="jsonSchema7"||$==="draft-7")return"draft-7";if($==="jsonSchema2019-09"||$==="draft-2020-12")return"draft-2020-12";return"draft-7"}function eg0($,Y){if(CQ($))return e$($,{target:I$9(Y?.target),io:Y?.pipeStrategy??"input"});return N40($,{strictUnions:Y?.strictUnions??!0,pipeStrategy:Y?.pipeStrategy??"input"})}function $m0($){let X=o3($)?.method;if(!X)throw Error("Schema is missing a method literal");let G=Z70(X);if(typeof G!=="string")throw Error("Schema method literal must be a string");return G}function Ym0($,Y){let X=BJ($,Y);if(!X.success)throw X.error;return X.data}var U70=60000;class YM{constructor($){if(this._options=$,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Lu,(Y)=>{this._oncancel(Y)}),this.setNotificationHandler(iE,(Y)=>{this._onprogress(Y)}),this.setRequestHandler(lE,(Y)=>({})),this._taskStore=$?.taskStore,this._taskMessageQueue=$?.taskMessageQueue,this._taskStore)this.setRequestHandler(Au,async(Y,X)=>{let G=await this._taskStore.getTask(Y.params.taskId,X.sessionId);if(!G)throw new r1(j1.InvalidParams,"Failed to retrieve task: Task not found");return{...G}}),this.setRequestHandler(Ou,async(Y,X)=>{let G=async()=>{let J=Y.params.taskId;if(this._taskMessageQueue){let W;while(W=await this._taskMessageQueue.dequeue(J,X.sessionId)){if(W.type==="response"||W.type==="error"){let K=W.message,Z=K.id,H=this._requestResolvers.get(Z);if(H)if(this._requestResolvers.delete(Z),W.type==="response")H(K);else{let z=K,V=new r1(z.error.code,z.error.message,z.error.data);H(V)}else{let z=W.type==="response"?"Response":"Error";this._onerror(Error(`${z} handler missing for request ${Z}`))}continue}await this._transport?.send(W.message,{relatedRequestId:X.requestId})}}let Q=await this._taskStore.getTask(J,X.sessionId);if(!Q)throw new r1(j1.InvalidParams,`Task not found: ${J}`);if(!yD(Q.status))return await this._waitForTaskUpdate(J,X.signal),await G();if(yD(Q.status)){let W=await this._taskStore.getTaskResult(J,X.sessionId);return this._clearTaskQueue(J),{...W,_meta:{...W._meta,[FV]:{taskId:J}}}}return await G()};return await G()}),this.setRequestHandler(Eu,async(Y,X)=>{try{let{tasks:G,nextCursor:J}=await this._taskStore.listTasks(Y.params?.cursor,X.sessionId);return{tasks:G,nextCursor:J,_meta:{}}}catch(G){throw new r1(j1.InvalidParams,`Failed to list tasks: ${G instanceof Error?G.message:String(G)}`)}}),this.setRequestHandler(Ru,async(Y,X)=>{try{let G=await this._taskStore.getTask(Y.params.taskId,X.sessionId);if(!G)throw new r1(j1.InvalidParams,`Task not found: ${Y.params.taskId}`);if(yD(G.status))throw new r1(j1.InvalidParams,`Cannot cancel task in terminal status: ${G.status}`);await this._taskStore.updateTaskStatus(Y.params.taskId,"cancelled","Client cancelled task execution.",X.sessionId),this._clearTaskQueue(Y.params.taskId);let J=await this._taskStore.getTask(Y.params.taskId,X.sessionId);if(!J)throw new r1(j1.InvalidParams,`Task not found after cancellation: ${Y.params.taskId}`);return{_meta:{},...J}}catch(G){if(G instanceof r1)throw G;throw new r1(j1.InvalidRequest,`Failed to cancel task: ${G instanceof Error?G.message:String(G)}`)}})}async _oncancel($){if(!$.params.requestId)return;this._requestHandlerAbortControllers.get($.params.requestId)?.abort($.params.reason)}_setupTimeout($,Y,X,G,J=!1){this._timeoutInfo.set($,{timeoutId:setTimeout(G,Y),startTime:Date.now(),timeout:Y,maxTotalTimeout:X,resetTimeoutOnProgress:J,onTimeout:G})}_resetTimeout($){let Y=this._timeoutInfo.get($);if(!Y)return!1;let X=Date.now()-Y.startTime;if(Y.maxTotalTimeout&&X>=Y.maxTotalTimeout)throw this._timeoutInfo.delete($),r1.fromError(j1.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:Y.maxTotalTimeout,totalElapsed:X});return clearTimeout(Y.timeoutId),Y.timeoutId=setTimeout(Y.onTimeout,Y.timeout),!0}_cleanupTimeout($){let Y=this._timeoutInfo.get($);if(Y)clearTimeout(Y.timeoutId),this._timeoutInfo.delete($)}async connect($){if(this._transport)throw Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=$;let Y=this.transport?.onclose;this._transport.onclose=()=>{Y?.(),this._onclose()};let X=this.transport?.onerror;this._transport.onerror=(J)=>{X?.(J),this._onerror(J)};let G=this._transport?.onmessage;this._transport.onmessage=(J,Q)=>{if(G?.(J,Q),CX(J)||XK(J))this._onresponse(J);else if(DJ(J))this._onrequest(J,Q);else if(fg0(J))this._onnotification(J);else this._onerror(Error(`Unknown message type: ${JSON.stringify(J)}`))},await this._transport.start()}_onclose(){let $=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let X of this._timeoutInfo.values())clearTimeout(X.timeoutId);this._timeoutInfo.clear();for(let X of this._requestHandlerAbortControllers.values())X.abort();this._requestHandlerAbortControllers.clear();let Y=r1.fromError(j1.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let X of $.values())X(Y)}_onerror($){this.onerror?.($)}_onnotification($){let Y=this._notificationHandlers.get($.method)??this.fallbackNotificationHandler;if(Y===void 0)return;Promise.resolve().then(()=>Y($)).catch((X)=>this._onerror(Error(`Uncaught error in notification handler: ${X}`)))}_onrequest($,Y){let X=this._requestHandlers.get($.method)??this.fallbackRequestHandler,G=this._transport,J=$.params?._meta?.[FV]?.taskId;if(X===void 0){let H={jsonrpc:"2.0",id:$.id,error:{code:j1.MethodNotFound,message:"Method not found"}};if(J&&this._taskMessageQueue)this._enqueueTaskMessage(J,{type:"error",message:H,timestamp:Date.now()},G?.sessionId).catch((z)=>this._onerror(Error(`Failed to enqueue error response: ${z}`)));else G?.send(H).catch((z)=>this._onerror(Error(`Failed to send an error response: ${z}`)));return}let Q=new AbortController;this._requestHandlerAbortControllers.set($.id,Q);let W=yg0($.params)?$.params.task:void 0,K=this._taskStore?this.requestTaskStore($,G?.sessionId):void 0,Z={signal:Q.signal,sessionId:G?.sessionId,_meta:$.params?._meta,sendNotification:async(H)=>{if(Q.signal.aborted)return;let z={relatedRequestId:$.id};if(J)z.relatedTask={taskId:J};await this.notification(H,z)},sendRequest:async(H,z,V)=>{if(Q.signal.aborted)throw new r1(j1.ConnectionClosed,"Request was cancelled");let F={...V,relatedRequestId:$.id};if(J&&!F.relatedTask)F.relatedTask={taskId:J};let L=F.relatedTask?.taskId??J;if(L&&K)await K.updateTaskStatus(L,"input_required");return await this.request(H,z,F)},authInfo:Y?.authInfo,requestId:$.id,requestInfo:Y?.requestInfo,taskId:J,taskStore:K,taskRequestedTtl:W?.ttl,closeSSEStream:Y?.closeSSEStream,closeStandaloneSSEStream:Y?.closeStandaloneSSEStream};Promise.resolve().then(()=>{if(W)this.assertTaskHandlerCapability($.method)}).then(()=>X($,Z)).then(async(H)=>{if(Q.signal.aborted)return;let z={result:H,jsonrpc:"2.0",id:$.id};if(J&&this._taskMessageQueue)await this._enqueueTaskMessage(J,{type:"response",message:z,timestamp:Date.now()},G?.sessionId);else await G?.send(z)},async(H)=>{if(Q.signal.aborted)return;let z={jsonrpc:"2.0",id:$.id,error:{code:Number.isSafeInteger(H.code)?H.code:j1.InternalError,message:H.message??"Internal error",...H.data!==void 0&&{data:H.data}}};if(J&&this._taskMessageQueue)await this._enqueueTaskMessage(J,{type:"error",message:z,timestamp:Date.now()},G?.sessionId);else await G?.send(z)}).catch((H)=>this._onerror(Error(`Failed to send response: ${H}`))).finally(()=>{if(this._requestHandlerAbortControllers.get($.id)===Q)this._requestHandlerAbortControllers.delete($.id)})}_onprogress($){let{progressToken:Y,...X}=$.params,G=Number(Y),J=this._progressHandlers.get(G);if(!J){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify($)}`));return}let Q=this._responseHandlers.get(G),W=this._timeoutInfo.get(G);if(W&&Q&&W.resetTimeoutOnProgress)try{this._resetTimeout(G)}catch(K){this._responseHandlers.delete(G),this._progressHandlers.delete(G),this._cleanupTimeout(G),Q(K);return}J(X)}_onresponse($){let Y=Number($.id),X=this._requestResolvers.get(Y);if(X){if(this._requestResolvers.delete(Y),CX($))X($);else{let Q=new r1($.error.code,$.error.message,$.error.data);X(Q)}return}let G=this._responseHandlers.get(Y);if(G===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify($)}`));return}this._responseHandlers.delete(Y),this._cleanupTimeout(Y);let J=!1;if(CX($)&&$.result&&typeof $.result==="object"){let Q=$.result;if(Q.task&&typeof Q.task==="object"){let W=Q.task;if(typeof W.taskId==="string")J=!0,this._taskProgressTokens.set(W.taskId,Y)}}if(!J)this._progressHandlers.delete(Y);if(CX($))G($);else{let Q=r1.fromError($.error.code,$.error.message,$.error.data);G(Q)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream($,Y,X){let{task:G}=X??{};if(!G){try{yield{type:"result",result:await this.request($,Y,X)}}catch(Q){yield{type:"error",error:Q instanceof r1?Q:new r1(j1.InternalError,String(Q))}}return}let J;try{let Q=await this.request($,a3,X);if(Q.task)J=Q.task.taskId,yield{type:"taskCreated",task:Q.task};else throw new r1(j1.InternalError,"Task creation did not return a task");while(!0){let W=await this.getTask({taskId:J},X);if(yield{type:"taskStatus",task:W},yD(W.status)){if(W.status==="completed")yield{type:"result",result:await this.getTaskResult({taskId:J},Y,X)};else if(W.status==="failed")yield{type:"error",error:new r1(j1.InternalError,`Task ${J} failed`)};else if(W.status==="cancelled")yield{type:"error",error:new r1(j1.InternalError,`Task ${J} was cancelled`)};return}if(W.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:J},Y,X)};return}let K=W.pollInterval??this._options?.defaultTaskPollInterval??1000;await new Promise((Z)=>setTimeout(Z,K)),X?.signal?.throwIfAborted()}}catch(Q){yield{type:"error",error:Q instanceof r1?Q:new r1(j1.InternalError,String(Q))}}}request($,Y,X){let{relatedRequestId:G,resumptionToken:J,onresumptiontoken:Q,task:W,relatedTask:K}=X??{};return new Promise((Z,H)=>{let z=(B)=>{H(B)};if(!this._transport){z(Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{if(this.assertCapabilityForMethod($.method),W)this.assertTaskCapability($.method)}catch(B){z(B);return}X?.signal?.throwIfAborted();let V=this._requestMessageId++,F={...$,jsonrpc:"2.0",id:V};if(X?.onprogress)this._progressHandlers.set(V,X.onprogress),F.params={...$.params,_meta:{...$.params?._meta||{},progressToken:V}};if(W)F.params={...F.params,task:W};if(K)F.params={...F.params,_meta:{...F.params?._meta||{},[FV]:K}};let L=(B)=>{this._responseHandlers.delete(V),this._progressHandlers.delete(V),this._cleanupTimeout(V),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:V,reason:String(B)}},{relatedRequestId:G,resumptionToken:J,onresumptiontoken:Q}).catch((E)=>this._onerror(Error(`Failed to send cancellation: ${E}`)));let O=B instanceof r1?B:new r1(j1.RequestTimeout,String(B));H(O)};this._responseHandlers.set(V,(B)=>{if(X?.signal?.aborted)return;if(B instanceof Error)return H(B);try{let O=BJ(Y,B.result);if(!O.success)H(O.error);else Z(O.data)}catch(O){H(O)}}),X?.signal?.addEventListener("abort",()=>{L(X?.signal?.reason)});let N=X?.timeout??U70,D=()=>L(r1.fromError(j1.RequestTimeout,"Request timed out",{timeout:N}));this._setupTimeout(V,N,X?.maxTotalTimeout,D,X?.resetTimeoutOnProgress??!1);let A=K?.taskId;if(A){let B=(O)=>{let E=this._responseHandlers.get(V);if(E)E(O);else this._onerror(Error(`Response handler missing for side-channeled request ${V}`))};this._requestResolvers.set(V,B),this._enqueueTaskMessage(A,{type:"request",message:F,timestamp:Date.now()}).catch((O)=>{this._cleanupTimeout(V),H(O)})}else this._transport.send(F,{relatedRequestId:G,resumptionToken:J,onresumptiontoken:Q}).catch((B)=>{this._cleanupTimeout(V),H(B)})})}async getTask($,Y){return this.request({method:"tasks/get",params:$},Bu,Y)}async getTaskResult($,Y,X){return this.request({method:"tasks/result",params:$},Y,X)}async listTasks($,Y){return this.request({method:"tasks/list",params:$},Mu,Y)}async cancelTask($,Y){return this.request({method:"tasks/cancel",params:$},mg0,Y)}async notification($,Y){if(!this._transport)throw Error("Not connected");this.assertNotificationCapability($.method);let X=Y?.relatedTask?.taskId;if(X){let W={...$,jsonrpc:"2.0",params:{...$.params,_meta:{...$.params?._meta||{},[FV]:Y.relatedTask}}};await this._enqueueTaskMessage(X,{type:"notification",message:W,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes($.method)&&!$.params&&!Y?.relatedRequestId&&!Y?.relatedTask){if(this._pendingDebouncedNotifications.has($.method))return;this._pendingDebouncedNotifications.add($.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete($.method),!this._transport)return;let W={...$,jsonrpc:"2.0"};if(Y?.relatedTask)W={...W,params:{...W.params,_meta:{...W.params?._meta||{},[FV]:Y.relatedTask}}};this._transport?.send(W,Y).catch((K)=>this._onerror(K))});return}let Q={...$,jsonrpc:"2.0"};if(Y?.relatedTask)Q={...Q,params:{...Q.params,_meta:{...Q.params?._meta||{},[FV]:Y.relatedTask}}};await this._transport.send(Q,Y)}setRequestHandler($,Y){let X=$m0($);this.assertRequestHandlerCapability(X),this._requestHandlers.set(X,(G,J)=>{let Q=Ym0($,G);return Promise.resolve(Y(Q,J))})}removeRequestHandler($){this._requestHandlers.delete($)}assertCanSetRequestHandler($){if(this._requestHandlers.has($))throw Error(`A request handler for ${$} already exists, which would be overridden`)}setNotificationHandler($,Y){let X=$m0($);this._notificationHandlers.set(X,(G)=>{let J=Ym0($,G);return Promise.resolve(Y(J))})}removeNotificationHandler($){this._notificationHandlers.delete($)}_cleanupTaskProgressHandler($){let Y=this._taskProgressTokens.get($);if(Y!==void 0)this._progressHandlers.delete(Y),this._taskProgressTokens.delete($)}async _enqueueTaskMessage($,Y,X){if(!this._taskStore||!this._taskMessageQueue)throw Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let G=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue($,Y,X,G)}async _clearTaskQueue($,Y){if(this._taskMessageQueue){let X=await this._taskMessageQueue.dequeueAll($,Y);for(let G of X)if(G.type==="request"&&DJ(G.message)){let J=G.message.id,Q=this._requestResolvers.get(J);if(Q)Q(new r1(j1.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(J);else this._onerror(Error(`Resolver missing for request ${J} during task ${$} cleanup`))}}}async _waitForTaskUpdate($,Y){let X=this._options?.defaultTaskPollInterval??1000;try{let G=await this._taskStore?.getTask($);if(G?.pollInterval)X=G.pollInterval}catch{}return new Promise((G,J)=>{if(Y.aborted){J(new r1(j1.InvalidRequest,"Request cancelled"));return}let Q=setTimeout(G,X);Y.addEventListener("abort",()=>{clearTimeout(Q),J(new r1(j1.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore($,Y){let X=this._taskStore;if(!X)throw Error("No task store configured");return{createTask:async(G)=>{if(!$)throw Error("No request provided");return await X.createTask(G,$.id,{method:$.method,params:$.params},Y)},getTask:async(G)=>{let J=await X.getTask(G,Y);if(!J)throw new r1(j1.InvalidParams,"Failed to retrieve task: Task not found");return J},storeTaskResult:async(G,J,Q)=>{await X.storeTaskResult(G,J,Q,Y);let W=await X.getTask(G,Y);if(W){let K=sT.parse({method:"notifications/tasks/status",params:W});if(await this.notification(K),yD(W.status))this._cleanupTaskProgressHandler(G)}},getTaskResult:(G)=>{return X.getTaskResult(G,Y)},updateTaskStatus:async(G,J,Q)=>{let W=await X.getTask(G,Y);if(!W)throw new r1(j1.InvalidParams,`Task "${G}" not found - it may have been cleaned up`);if(yD(W.status))throw new r1(j1.InvalidParams,`Cannot update task "${G}" from terminal status "${W.status}" to "${J}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await X.updateTaskStatus(G,J,Q,Y);let K=await X.getTask(G,Y);if(K){let Z=sT.parse({method:"notifications/tasks/status",params:K});if(await this.notification(Z),yD(K.status))this._cleanupTaskProgressHandler(G)}},listTasks:(G)=>{return X.listTasks(G,Y)}}}}function gU4($){return $!==null&&typeof $==="object"&&!Array.isArray($)}function KI($,Y){let X={...$};for(let G in Y){let J=G,Q=Y[J];if(Q===void 0)continue;let W=X[J];if(gU4(W)&&gU4(Q))X[J]={...W,...Q};else X[J]=Q}return X}BY();var X34=U6(Xt(),1),G34=U6(Y34(),1);function s$9(){let $=new X34.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return G34.default($),$}class _u{constructor($){this._ajv=$??s$9()}getValidator($){let Y="$id"in $&&typeof $.$id==="string"?this._ajv.getSchema($.$id)??this._ajv.compile($):this._ajv.compile($);return(X)=>{if(Y(X))return{valid:!0,data:X,errorMessage:void 0};else return{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(Y.errors)}}}}BY();class zm0{constructor($){this._server=$}requestStream($,Y,X){return this._server.requestStream($,Y,X)}createMessageStream($,Y){let X=this._server.getClientCapabilities();if(($.tools||$.toolChoice)&&!X?.sampling?.tools)throw Error("Client does not support sampling tools capability.");if($.messages.length>0){let G=$.messages[$.messages.length-1],J=Array.isArray(G.content)?G.content:[G.content],Q=J.some((H)=>H.type==="tool_result"),W=$.messages.length>1?$.messages[$.messages.length-2]:void 0,K=W?Array.isArray(W.content)?W.content:[W.content]:[],Z=K.some((H)=>H.type==="tool_use");if(Q){if(J.some((H)=>H.type!=="tool_result"))throw Error("The last message must contain only tool_result content if any is present");if(!Z)throw Error("tool_result blocks are not matching any tool_use from the previous message")}if(Z){let H=new Set(K.filter((V)=>V.type==="tool_use").map((V)=>V.id)),z=new Set(J.filter((V)=>V.type==="tool_result").map((V)=>V.toolUseId));if(H.size!==z.size||![...H].every((V)=>z.has(V)))throw Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:$},s3,Y)}elicitInputStream($,Y){let X=this._server.getClientCapabilities(),G=$.mode??"form";switch(G){case"url":{if(!X?.elicitation?.url)throw Error("Client does not support url elicitation.");break}case"form":{if(!X?.elicitation?.form)throw Error("Client does not support form elicitation.");break}}let J=G==="form"&&$.mode===void 0?{...$,mode:"form"}:$;return this.requestStream({method:"elicitation/create",params:J},DV,Y)}async getTask($,Y){return this._server.getTask({taskId:$},Y)}async getTaskResult($,Y,X){return this._server.getTaskResult({taskId:$},Y,X)}async listTasks($,Y){return this._server.listTasks($?{cursor:$}:void 0,Y)}async cancelTask($,Y){return this._server.cancelTask({taskId:$},Y)}}function z70($,Y,X){if(!$)throw Error(`${X} does not support task creation (required for ${Y})`);switch(Y){case"tools/call":if(!$.tools?.call)throw Error(`${X} does not support task creation for tools/call (required for ${Y})`);break;default:break}}function V70($,Y,X){if(!$)throw Error(`${X} does not support task creation (required for ${Y})`);switch(Y){case"sampling/createMessage":if(!$.sampling?.createMessage)throw Error(`${X} does not support task creation for sampling/createMessage (required for ${Y})`);break;case"elicitation/create":if(!$.elicitation?.create)throw Error(`${X} does not support task creation for elicitation/create (required for ${Y})`);break;default:break}}class UI extends YM{constructor($,Y){super(Y);if(this._serverInfo=$,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(GI.options.map((X,G)=>[X,G])),this.isMessageIgnored=(X,G)=>{let J=this._loggingLevels.get(G);return J?this.LOG_LEVEL_SEVERITY.get(X)<this.LOG_LEVEL_SEVERITY.get(J):!1},this._capabilities=Y?.capabilities??{},this._instructions=Y?.instructions,this._jsonSchemaValidator=Y?.jsonSchemaValidator??new _u,this.setRequestHandler(Du,(X)=>this._oninitialize(X)),this.setNotificationHandler(Nu,()=>this.oninitialized?.()),this._capabilities.logging)this.setRequestHandler(JI,async(X,G)=>{let J=G.sessionId||G.requestInfo?.headers["mcp-session-id"]||void 0,{level:Q}=X.params,W=GI.safeParse(Q);if(W.success)this._loggingLevels.set(J,W.data);return{}})}get experimental(){if(!this._experimental)this._experimental={tasks:new zm0(this)};return this._experimental}registerCapabilities($){if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=KI(this._capabilities,$)}setRequestHandler($,Y){let G=o3($)?.method;if(!G)throw Error("Schema is missing a method literal");let J;if(CQ(G)){let W=G;J=W._zod?.def?.value??W.value}else{let W=G;J=W._def?.value??W.value}if(typeof J!=="string")throw Error("Schema method literal must be a string");if(J==="tools/call"){let W=async(K,Z)=>{let H=BJ(GU,K);if(!H.success){let L=H.error instanceof Error?H.error.message:String(H.error);throw new r1(j1.InvalidParams,`Invalid tools/call request: ${L}`)}let{params:z}=H.data,V=await Promise.resolve(Y(K,Z));if(z.task){let L=BJ(a3,V);if(!L.success){let N=L.error instanceof Error?L.error.message:String(L.error);throw new r1(j1.InvalidParams,`Invalid task creation result: ${N}`)}return L.data}let F=BJ(AJ,V);if(!F.success){let L=F.error instanceof Error?F.error.message:String(F.error);throw new r1(j1.InvalidParams,`Invalid tools/call result: ${L}`)}return F.data};return super.setRequestHandler($,W)}return super.setRequestHandler($,Y)}assertCapabilityForMethod($){switch($){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw Error(`Client does not support sampling (required for ${$})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw Error(`Client does not support elicitation (required for ${$})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw Error(`Client does not support listing roots (required for ${$})`);break;case"ping":break}}assertNotificationCapability($){switch($){case"notifications/message":if(!this._capabilities.logging)throw Error(`Server does not support logging (required for ${$})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw Error(`Server does not support notifying about resources (required for ${$})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw Error(`Server does not support notifying of tool list changes (required for ${$})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw Error(`Server does not support notifying of prompt list changes (required for ${$})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw Error(`Client does not support URL elicitation (required for ${$})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability($){if(!this._capabilities)return;switch($){case"completion/complete":if(!this._capabilities.completions)throw Error(`Server does not support completions (required for ${$})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw Error(`Server does not support logging (required for ${$})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw Error(`Server does not support prompts (required for ${$})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw Error(`Server does not support resources (required for ${$})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Server does not support tools (required for ${$})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw Error(`Server does not support tasks capability (required for ${$})`);break;case"ping":case"initialize":break}}assertTaskCapability($){V70(this._clientCapabilities?.tasks?.requests,$,"Client")}assertTaskHandlerCapability($){if(!this._capabilities)return;z70(this._capabilities.tasks?.requests,$,"Server")}async _oninitialize($){let Y=$.params.protocolVersion;return this._clientCapabilities=$.params.capabilities,this._clientVersion=$.params.clientInfo,{protocolVersion:$K.includes(Y)?Y:VV,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},NJ)}async createMessage($,Y){if($.tools||$.toolChoice){if(!this._clientCapabilities?.sampling?.tools)throw Error("Client does not support sampling tools capability.")}if($.messages.length>0){let X=$.messages[$.messages.length-1],G=Array.isArray(X.content)?X.content:[X.content],J=G.some((Z)=>Z.type==="tool_result"),Q=$.messages.length>1?$.messages[$.messages.length-2]:void 0,W=Q?Array.isArray(Q.content)?Q.content:[Q.content]:[],K=W.some((Z)=>Z.type==="tool_use");if(J){if(G.some((Z)=>Z.type!=="tool_result"))throw Error("The last message must contain only tool_result content if any is present");if(!K)throw Error("tool_result blocks are not matching any tool_use from the previous message")}if(K){let Z=new Set(W.filter((z)=>z.type==="tool_use").map((z)=>z.id)),H=new Set(G.filter((z)=>z.type==="tool_result").map((z)=>z.toolUseId));if(Z.size!==H.size||![...Z].every((z)=>H.has(z)))throw Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}if($.tools)return this.request({method:"sampling/createMessage",params:$},xD,Y);return this.request({method:"sampling/createMessage",params:$},s3,Y)}async elicitInput($,Y){switch($.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw Error("Client does not support url elicitation.");let G=$;return this.request({method:"elicitation/create",params:G},DV,Y)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw Error("Client does not support form elicitation.");let G=$.mode==="form"?$:{...$,mode:"form"},J=await this.request({method:"elicitation/create",params:G},DV,Y);if(J.action==="accept"&&J.content&&G.requestedSchema)try{let W=this._jsonSchemaValidator.getValidator(G.requestedSchema)(J.content);if(!W.valid)throw new r1(j1.InvalidParams,`Elicitation response content does not match requested schema: ${W.errorMessage}`)}catch(Q){if(Q instanceof r1)throw Q;throw new r1(j1.InternalError,`Error validating elicitation response: ${Q instanceof Error?Q.message:String(Q)}`)}return J}}}createElicitationCompletionNotifier($,Y){if(!this._clientCapabilities?.elicitation?.url)throw Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:$}},Y)}async listRoots($,Y){return this.request({method:"roots/list",params:$},Y70,Y)}async sendLoggingMessage($,Y){if(this._capabilities.logging){if(!this.isMessageIgnored($.level,Y))return this.notification({method:"notifications/message",params:$})}}async sendResourceUpdated($){return this.notification({method:"notifications/resources/updated",params:$})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}}BY();var Q34=Symbol.for("mcp.completable");function Vm0($){return!!$&&typeof $==="object"&&Q34 in $}function W34($){return $[Q34]?.complete}var J34;(function($){$.Completable="McpCompletable"})(J34||(J34={}));var o$9=/^[A-Za-z0-9._-]{1,128}$/;function t$9($){let Y=[];if($.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if($.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${$.length})`]};if($.includes(" "))Y.push("Tool name contains spaces, which may cause parsing issues");if($.includes(","))Y.push("Tool name contains commas, which may cause parsing issues");if($.startsWith("-")||$.endsWith("-"))Y.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts");if($.startsWith(".")||$.endsWith("."))Y.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts");if(!o$9.test($)){let X=$.split("").filter((G)=>!/[A-Za-z0-9._-]/.test(G)).filter((G,J,Q)=>Q.indexOf(G)===J);return Y.push(`Tool name contains invalid characters: ${X.map((G)=>`"${G}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:Y}}return{isValid:!0,warnings:Y}}function e$9($,Y){if(Y.length>0){console.warn(`Tool name validation warning for "${$}":`);for(let X of Y)console.warn(`  - ${X}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function Fm0($){let Y=t$9($);return e$9($,Y.warnings),Y.isValid}class Lm0{constructor($){this._mcpServer=$}registerToolTask($,Y,X){let G={taskSupport:"required",...Y.execution};if(G.taskSupport==="forbidden")throw Error(`Cannot register task-based tool '${$}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool($,Y.title,Y.description,Y.inputSchema,Y.outputSchema,Y.annotations,G,Y._meta,X)}}ZY();class Nm0{constructor($,Y){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new UI($,Y)}get experimental(){if(!this._experimental)this._experimental={tasks:new Lm0(this)};return this._experimental}async connect($){return await this.server.connect($)}async close(){await this.server.close()}setToolRequestHandlers(){if(this._toolHandlersInitialized)return;this.server.assertCanSetRequestHandler(hD(LV)),this.server.assertCanSetRequestHandler(hD(GU)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(LV,()=>({tools:Object.entries(this._registeredTools).filter(([,$])=>$.enabled).map(([$,Y])=>{let X={name:$,title:Y.title,description:Y.description,inputSchema:(()=>{let G=WI(Y.inputSchema);return G?eg0(G,{strictUnions:!0,pipeStrategy:"input"}):$79})(),annotations:Y.annotations,execution:Y.execution,_meta:Y._meta};if(Y.outputSchema){let G=WI(Y.outputSchema);if(G)X.outputSchema=eg0(G,{strictUnions:!0,pipeStrategy:"output"})}return X})})),this.server.setRequestHandler(GU,async($,Y)=>{try{let X=this._registeredTools[$.params.name];if(!X)throw new r1(j1.InvalidParams,`Tool ${$.params.name} not found`);if(!X.enabled)throw new r1(j1.InvalidParams,`Tool ${$.params.name} disabled`);let G=!!$.params.task,J=X.execution?.taskSupport,Q="createTask"in X.handler;if((J==="required"||J==="optional")&&!Q)throw new r1(j1.InternalError,`Tool ${$.params.name} has taskSupport '${J}' but was not registered with registerToolTask`);if(J==="required"&&!G)throw new r1(j1.MethodNotFound,`Tool ${$.params.name} requires task augmentation (taskSupport: 'required')`);if(J==="optional"&&!G&&Q)return await this.handleAutomaticTaskPolling(X,$,Y);let W=await this.validateToolInput(X,$.params.arguments,$.params.name),K=await this.executeToolHandler(X,W,Y);if(G)return K;return await this.validateToolOutput(X,K,$.params.name),K}catch(X){if(X instanceof r1){if(X.code===j1.UrlElicitationRequired)throw X}return this.createToolError(X instanceof Error?X.message:String(X))}}),this._toolHandlersInitialized=!0}createToolError($){return{content:[{type:"text",text:$}],isError:!0}}async validateToolInput($,Y,X){if(!$.inputSchema)return;let J=WI($.inputSchema)??$.inputSchema,Q=await W70(J,Y);if(!Q.success){let W="error"in Q?Q.error:"Unknown error",K=K70(W);throw new r1(j1.InvalidParams,`Input validation error: Invalid arguments for tool ${X}: ${K}`)}return Q.data}async validateToolOutput($,Y,X){if(!$.outputSchema)return;if(!("content"in Y))return;if(Y.isError)return;if(!Y.structuredContent)throw new r1(j1.InvalidParams,`Output validation error: Tool ${X} has an output schema but no structured content was provided`);let G=WI($.outputSchema),J=await W70(G,Y.structuredContent);if(!J.success){let Q="error"in J?J.error:"Unknown error",W=K70(Q);throw new r1(j1.InvalidParams,`Output validation error: Invalid structured content for tool ${X}: ${W}`)}}async executeToolHandler($,Y,X){let G=$.handler;if("createTask"in G){if(!X.taskStore)throw Error("No task store provided.");let Q={...X,taskStore:X.taskStore};if($.inputSchema)return await Promise.resolve(G.createTask(Y,Q));else return await Promise.resolve(G.createTask(Q))}if($.inputSchema)return await Promise.resolve(G(Y,X));else return await Promise.resolve(G(X))}async handleAutomaticTaskPolling($,Y,X){if(!X.taskStore)throw Error("No task store provided for task-capable tool.");let G=await this.validateToolInput($,Y.params.arguments,Y.params.name),J=$.handler,Q={...X,taskStore:X.taskStore},W=G?await Promise.resolve(J.createTask(G,Q)):await Promise.resolve(J.createTask(Q)),K=W.task.taskId,Z=W.task,H=Z.pollInterval??5000;while(Z.status!=="completed"&&Z.status!=="failed"&&Z.status!=="cancelled"){await new Promise((V)=>setTimeout(V,H));let z=await X.taskStore.getTask(K);if(!z)throw new r1(j1.InternalError,`Task ${K} not found during polling`);Z=z}return await X.taskStore.getTaskResult(K)}setCompletionRequestHandler(){if(this._completionHandlerInitialized)return;this.server.assertCanSetRequestHandler(hD(Pu)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(Pu,async($)=>{switch($.params.ref.type){case"ref/prompt":return rg0($),this.handlePromptCompletion($,$.params.ref);case"ref/resource":return ag0($),this.handleResourceCompletion($,$.params.ref);default:throw new r1(j1.InvalidParams,`Invalid completion reference: ${$.params.ref}`)}}),this._completionHandlerInitialized=!0}async handlePromptCompletion($,Y){let X=this._registeredPrompts[Y.name];if(!X)throw new r1(j1.InvalidParams,`Prompt ${Y.name} not found`);if(!X.enabled)throw new r1(j1.InvalidParams,`Prompt ${Y.name} disabled`);if(!X.argsSchema)return ju;let J=o3(X.argsSchema)?.[$.params.argument.name];if(!Vm0(J))return ju;let Q=W34(J);if(!Q)return ju;let W=await Q($.params.argument.value,$.params.context);return Z34(W)}async handleResourceCompletion($,Y){let X=Object.values(this._registeredResourceTemplates).find((Q)=>Q.resourceTemplate.uriTemplate.toString()===Y.uri);if(!X){if(this._registeredResources[Y.uri])return ju;throw new r1(j1.InvalidParams,`Resource template ${$.params.ref.uri} not found`)}let G=X.resourceTemplate.completeCallback($.params.argument.name);if(!G)return ju;let J=await G($.params.argument.value,$.params.context);return Z34(J)}setResourceRequestHandlers(){if(this._resourceHandlersInitialized)return;this.server.assertCanSetRequestHandler(hD(rE)),this.server.assertCanSetRequestHandler(hD(aE)),this.server.assertCanSetRequestHandler(hD(sE)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(rE,async($,Y)=>{let X=Object.entries(this._registeredResources).filter(([J,Q])=>Q.enabled).map(([J,Q])=>({uri:J,name:Q.name,...Q.metadata})),G=[];for(let J of Object.values(this._registeredResourceTemplates)){if(!J.resourceTemplate.listCallback)continue;let Q=await J.resourceTemplate.listCallback(Y);for(let W of Q.resources)G.push({...J.metadata,...W})}return{resources:[...X,...G]}}),this.server.setRequestHandler(aE,async()=>{return{resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([Y,X])=>({name:Y,uriTemplate:X.resourceTemplate.uriTemplate.toString(),...X.metadata}))}}),this.server.setRequestHandler(sE,async($,Y)=>{let X=new URL($.params.uri),G=this._registeredResources[X.toString()];if(G){if(!G.enabled)throw new r1(j1.InvalidParams,`Resource ${X} disabled`);return G.readCallback(X,Y)}for(let J of Object.values(this._registeredResourceTemplates)){let Q=J.resourceTemplate.uriTemplate.match(X.toString());if(Q)return J.readCallback(X,Q,Y)}throw new r1(j1.InvalidParams,`Resource ${X} not found`)}),this._resourceHandlersInitialized=!0}setPromptRequestHandlers(){if(this._promptHandlersInitialized)return;this.server.assertCanSetRequestHandler(hD(oE)),this.server.assertCanSetRequestHandler(hD(tE)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(oE,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,$])=>$.enabled).map(([$,Y])=>{return{name:$,title:Y.title,description:Y.description,arguments:Y.argsSchema?Y79(Y.argsSchema):void 0}})})),this.server.setRequestHandler(tE,async($,Y)=>{let X=this._registeredPrompts[$.params.name];if(!X)throw new r1(j1.InvalidParams,`Prompt ${$.params.name} not found`);if(!X.enabled)throw new r1(j1.InvalidParams,`Prompt ${$.params.name} disabled`);if(X.argsSchema){let G=WI(X.argsSchema),J=await W70(G,$.params.arguments);if(!J.success){let K="error"in J?J.error:"Unknown error",Z=K70(K);throw new r1(j1.InvalidParams,`Invalid arguments for prompt ${$.params.name}: ${Z}`)}let Q=J.data,W=X.callback;return await Promise.resolve(W(Q,Y))}else{let G=X.callback;return await Promise.resolve(G(Y))}}),this._promptHandlersInitialized=!0}resource($,Y,...X){let G;if(typeof X[0]==="object")G=X.shift();let J=X[0];if(typeof Y==="string"){if(this._registeredResources[Y])throw Error(`Resource ${Y} is already registered`);let Q=this._createRegisteredResource($,void 0,Y,G,J);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),Q}else{if(this._registeredResourceTemplates[$])throw Error(`Resource template ${$} is already registered`);let Q=this._createRegisteredResourceTemplate($,void 0,Y,G,J);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),Q}}registerResource($,Y,X,G){if(typeof Y==="string"){if(this._registeredResources[Y])throw Error(`Resource ${Y} is already registered`);let J=this._createRegisteredResource($,X.title,Y,X,G);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),J}else{if(this._registeredResourceTemplates[$])throw Error(`Resource template ${$} is already registered`);let J=this._createRegisteredResourceTemplate($,X.title,Y,X,G);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),J}}_createRegisteredResource($,Y,X,G,J){let Q={name:$,title:Y,metadata:G,readCallback:J,enabled:!0,disable:()=>Q.update({enabled:!1}),enable:()=>Q.update({enabled:!0}),remove:()=>Q.update({uri:null}),update:(W)=>{if(typeof W.uri<"u"&&W.uri!==X){if(delete this._registeredResources[X],W.uri)this._registeredResources[W.uri]=Q}if(typeof W.name<"u")Q.name=W.name;if(typeof W.title<"u")Q.title=W.title;if(typeof W.metadata<"u")Q.metadata=W.metadata;if(typeof W.callback<"u")Q.readCallback=W.callback;if(typeof W.enabled<"u")Q.enabled=W.enabled;this.sendResourceListChanged()}};return this._registeredResources[X]=Q,Q}_createRegisteredResourceTemplate($,Y,X,G,J){let Q={resourceTemplate:X,title:Y,metadata:G,readCallback:J,enabled:!0,disable:()=>Q.update({enabled:!1}),enable:()=>Q.update({enabled:!0}),remove:()=>Q.update({name:null}),update:(Z)=>{if(typeof Z.name<"u"&&Z.name!==$){if(delete this._registeredResourceTemplates[$],Z.name)this._registeredResourceTemplates[Z.name]=Q}if(typeof Z.title<"u")Q.title=Z.title;if(typeof Z.template<"u")Q.resourceTemplate=Z.template;if(typeof Z.metadata<"u")Q.metadata=Z.metadata;if(typeof Z.callback<"u")Q.readCallback=Z.callback;if(typeof Z.enabled<"u")Q.enabled=Z.enabled;this.sendResourceListChanged()}};this._registeredResourceTemplates[$]=Q;let W=X.uriTemplate.variableNames;if(Array.isArray(W)&&W.some((Z)=>!!X.completeCallback(Z)))this.setCompletionRequestHandler();return Q}_createRegisteredPrompt($,Y,X,G,J){let Q={title:Y,description:X,argsSchema:G===void 0?void 0:$M(G),callback:J,enabled:!0,disable:()=>Q.update({enabled:!1}),enable:()=>Q.update({enabled:!0}),remove:()=>Q.update({name:null}),update:(W)=>{if(typeof W.name<"u"&&W.name!==$){if(delete this._registeredPrompts[$],W.name)this._registeredPrompts[W.name]=Q}if(typeof W.title<"u")Q.title=W.title;if(typeof W.description<"u")Q.description=W.description;if(typeof W.argsSchema<"u")Q.argsSchema=$M(W.argsSchema);if(typeof W.callback<"u")Q.callback=W.callback;if(typeof W.enabled<"u")Q.enabled=W.enabled;this.sendPromptListChanged()}};if(this._registeredPrompts[$]=Q,G){if(Object.values(G).some((K)=>{let Z=K instanceof Rz?K._def?.innerType:K;return Vm0(Z)}))this.setCompletionRequestHandler()}return Q}_createRegisteredTool($,Y,X,G,J,Q,W,K,Z){Fm0($);let H={title:Y,description:X,inputSchema:K34(G),outputSchema:K34(J),annotations:Q,execution:W,_meta:K,handler:Z,enabled:!0,disable:()=>H.update({enabled:!1}),enable:()=>H.update({enabled:!0}),remove:()=>H.update({name:null}),update:(z)=>{if(typeof z.name<"u"&&z.name!==$){if(typeof z.name==="string")Fm0(z.name);if(delete this._registeredTools[$],z.name)this._registeredTools[z.name]=H}if(typeof z.title<"u")H.title=z.title;if(typeof z.description<"u")H.description=z.description;if(typeof z.paramsSchema<"u")H.inputSchema=$M(z.paramsSchema);if(typeof z.outputSchema<"u")H.outputSchema=$M(z.outputSchema);if(typeof z.callback<"u")H.handler=z.callback;if(typeof z.annotations<"u")H.annotations=z.annotations;if(typeof z._meta<"u")H._meta=z._meta;if(typeof z.enabled<"u")H.enabled=z.enabled;this.sendToolListChanged()}};return this._registeredTools[$]=H,this.setToolRequestHandlers(),this.sendToolListChanged(),H}tool($,...Y){if(this._registeredTools[$])throw Error(`Tool ${$} is already registered`);let X,G,J,Q;if(typeof Y[0]==="string")X=Y.shift();if(Y.length>1){let K=Y[0];if(Dm0(K)){if(G=Y.shift(),Y.length>1&&typeof Y[0]==="object"&&Y[0]!==null&&!Dm0(Y[0]))Q=Y.shift()}else if(typeof K==="object"&&K!==null){if(Object.values(K).some((Z)=>typeof Z==="object"&&Z!==null))throw Error(`Tool ${$} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);Q=Y.shift()}}let W=Y[0];return this._createRegisteredTool($,void 0,X,G,J,Q,{taskSupport:"forbidden"},void 0,W)}registerTool($,Y,X){if(this._registeredTools[$])throw Error(`Tool ${$} is already registered`);let{title:G,description:J,inputSchema:Q,outputSchema:W,annotations:K,_meta:Z}=Y;return this._createRegisteredTool($,G,J,Q,W,K,{taskSupport:"forbidden"},Z,X)}prompt($,...Y){if(this._registeredPrompts[$])throw Error(`Prompt ${$} is already registered`);let X;if(typeof Y[0]==="string")X=Y.shift();let G;if(Y.length>1)G=Y.shift();let J=Y[0],Q=this._createRegisteredPrompt($,void 0,X,G,J);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),Q}registerPrompt($,Y,X){if(this._registeredPrompts[$])throw Error(`Prompt ${$} is already registered`);let{title:G,description:J,argsSchema:Q}=Y,W=this._createRegisteredPrompt($,G,J,Q,X);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),W}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage($,Y){return this.server.sendLoggingMessage($,Y)}sendResourceListChanged(){if(this.isConnected())this.server.sendResourceListChanged()}sendToolListChanged(){if(this.isConnected())this.server.sendToolListChanged()}sendPromptListChanged(){if(this.isConnected())this.server.sendPromptListChanged()}}var $79={type:"object",properties:{}};function U34($){return $!==null&&typeof $==="object"&&"parse"in $&&typeof $.parse==="function"&&"safeParse"in $&&typeof $.safeParse==="function"}function H34($){return"_def"in $||"_zod"in $||U34($)}function Dm0($){if(typeof $!=="object"||$===null)return!1;if(H34($))return!1;if(Object.keys($).length===0)return!0;return Object.values($).some(U34)}function K34($){if(!$)return;if(Dm0($))return $M($);if(!H34($))throw Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return $}function Y79($){let Y=o3($);if(!Y)return[];return Object.entries(Y).map(([X,G])=>{let J=hU4(G),Q=fU4(G);return{name:X,description:J,required:!Q}})}function hD($){let X=o3($)?.method;if(!X)throw Error("Schema is missing a method literal");let G=Z70(X);if(typeof G==="string")return G;throw Error("Schema method literal must be a string")}function Z34($){return{completion:{values:$.slice(0,100),total:$.length,hasMore:$.length>100}}}var ju={completion:{values:[],hasMore:!1}};ZY();import X79 from"os";function G79(){let $=X79.networkInterfaces();for(let Y of Object.keys($))for(let X of $[Y])if(X.family==="IPv4"&&!X.internal)return X.address;return"No External IP found"}var J79=G79(),z34=new _4;function Q79($){return Object.getOwnPropertyNames($).filter((Y)=>typeof $[Y]!=="symbol")}async function W79(){let $=new Nm0({name:"tbc-mcp-server",version:"1.0.0"});return(await BZ4({limit:1000,offset:0})).forEach((G)=>{if(G.transText&&G.transText.length>0&&G.description&&G.description.length>0){let J={};Q79(JSON.parse(G.paramsSchema||"{}")).forEach((W)=>{i1(J,W,U.string().describe(W.toString()))}),$.registerTool(n1(G.transText,/[\ \.]/g,"_"),{description:G.description,inputSchema:J},async(W)=>{let K=G.code,Z=await cH(1),H=await gE(`http://${J79}:${Bun.env.PORT||3000}/api/execution/${K}`,"POST",Z,W);return{content:[{type:"text",text:`\u7ED3\u679C\uFF1A${JSON.stringify(H)}`}]}})}}),$.registerTool(n1("Query the current time",/[\ \.]/g,"_"),{description:"\u67E5\u8BE2\u5F53\u524D\u7CFB\u7EDF\u65F6\u95F4",inputSchema:{}},async()=>{return{content:[{type:"text",text:`${fX()}`}]}}),$}z34.all("/",async($)=>{let Y=new Q70;return await(await W79()).connect(Y),Y.handleRequest($)});var V34=z34;A_();import{AsyncLocalStorage as nX9}from"async_hooks";import{createRequire as rX9}from"module";p2();BY();BY();class Am0{constructor($){this._client=$}async*callToolStream($,Y=AJ,X){let G=this._client,J={...X,task:X?.task??(G.isToolTask($.name)?{}:void 0)},Q=G.requestStream({method:"tools/call",params:$},Y,J),W=G.getToolOutputValidator($.name);for await(let K of Q){if(K.type==="result"&&W){let Z=K.result;if(!Z.structuredContent&&!Z.isError){yield{type:"error",error:new r1(j1.InvalidRequest,`Tool ${$.name} has an output schema but did not return structured content`)};return}if(Z.structuredContent)try{let H=W(Z.structuredContent);if(!H.valid){yield{type:"error",error:new r1(j1.InvalidParams,`Structured content does not match the tool's output schema: ${H.errorMessage}`)};return}}catch(H){if(H instanceof r1){yield{type:"error",error:H};return}yield{type:"error",error:new r1(j1.InvalidParams,`Failed to validate structured content: ${H instanceof Error?H.message:String(H)}`)};return}}yield K}}async getTask($,Y){return this._client.getTask({taskId:$},Y)}async getTaskResult($,Y,X){return this._client.getTaskResult({taskId:$},Y,X)}async listTasks($,Y){return this._client.listTasks($?{cursor:$}:void 0,Y)}async cancelTask($,Y){return this._client.cancelTask({taskId:$},Y)}requestStream($,Y,X){return this._client.requestStream($,Y,X)}}function F70($,Y){if(!$||Y===null||typeof Y!=="object")return;if($.type==="object"&&$.properties&&typeof $.properties==="object"){let X=Y,G=$.properties;for(let J of Object.keys(G)){let Q=G[J];if(X[J]===void 0&&Object.prototype.hasOwnProperty.call(Q,"default"))X[J]=Q.default;if(X[J]!==void 0)F70(Q,X[J])}}if(Array.isArray($.anyOf)){for(let X of $.anyOf)if(typeof X!=="boolean")F70(X,Y)}if(Array.isArray($.oneOf)){for(let X of $.oneOf)if(typeof X!=="boolean")F70(X,Y)}}function K79($){if(!$)return{supportsFormMode:!1,supportsUrlMode:!1};let Y=$.form!==void 0,X=$.url!==void 0;return{supportsFormMode:Y||!Y&&!X,supportsUrlMode:X}}class Bm0 extends YM{constructor($,Y){super(Y);if(this._clientInfo=$,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=Y?.capabilities??{},this._jsonSchemaValidator=Y?.jsonSchemaValidator??new _u,Y?.listChanged)this._pendingListChangedConfig=Y.listChanged}_setupListChangedHandlers($){if($.tools&&this._serverCapabilities?.tools?.listChanged)this._setupListChangedHandler("tools",s$0,$.tools,async()=>{return(await this.listTools()).tools});if($.prompts&&this._serverCapabilities?.prompts?.listChanged)this._setupListChangedHandler("prompts",XI,$.prompts,async()=>{return(await this.listPrompts()).prompts});if($.resources&&this._serverCapabilities?.resources?.listChanged)this._setupListChangedHandler("resources",eT,$.resources,async()=>{return(await this.listResources()).resources})}get experimental(){if(!this._experimental)this._experimental={tasks:new Am0(this)};return this._experimental}registerCapabilities($){if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=KI(this._capabilities,$)}setRequestHandler($,Y){let G=o3($)?.method;if(!G)throw Error("Schema is missing a method literal");let J;if(CQ(G)){let W=G;J=W._zod?.def?.value??W.value}else{let W=G;J=W._def?.value??W.value}if(typeof J!=="string")throw Error("Schema method literal must be a string");let Q=J;if(Q==="elicitation/create"){let W=async(K,Z)=>{let H=BJ(QI,K);if(!H.success){let B=H.error instanceof Error?H.error.message:String(H.error);throw new r1(j1.InvalidParams,`Invalid elicitation request: ${B}`)}let{params:z}=H.data;z.mode=z.mode??"form";let{supportsFormMode:V,supportsUrlMode:F}=K79(this._capabilities.elicitation);if(z.mode==="form"&&!V)throw new r1(j1.InvalidParams,"Client does not support form-mode elicitation requests");if(z.mode==="url"&&!F)throw new r1(j1.InvalidParams,"Client does not support URL-mode elicitation requests");let L=await Promise.resolve(Y(K,Z));if(z.task){let B=BJ(a3,L);if(!B.success){let O=B.error instanceof Error?B.error.message:String(B.error);throw new r1(j1.InvalidParams,`Invalid task creation result: ${O}`)}return B.data}let N=BJ(DV,L);if(!N.success){let B=N.error instanceof Error?N.error.message:String(N.error);throw new r1(j1.InvalidParams,`Invalid elicitation result: ${B}`)}let D=N.data,A=z.mode==="form"?z.requestedSchema:void 0;if(z.mode==="form"&&D.action==="accept"&&D.content&&A){if(this._capabilities.elicitation?.form?.applyDefaults)try{F70(A,D.content)}catch{}}return D};return super.setRequestHandler($,W)}if(Q==="sampling/createMessage"){let W=async(K,Z)=>{let H=BJ(t$0,K);if(!H.success){let D=H.error instanceof Error?H.error.message:String(H.error);throw new r1(j1.InvalidParams,`Invalid sampling request: ${D}`)}let{params:z}=H.data,V=await Promise.resolve(Y(K,Z));if(z.task){let D=BJ(a3,V);if(!D.success){let A=D.error instanceof Error?D.error.message:String(D.error);throw new r1(j1.InvalidParams,`Invalid task creation result: ${A}`)}return D.data}let L=z.tools||z.toolChoice?xD:s3,N=BJ(L,V);if(!N.success){let D=N.error instanceof Error?N.error.message:String(N.error);throw new r1(j1.InvalidParams,`Invalid sampling result: ${D}`)}return N.data};return super.setRequestHandler($,W)}return super.setRequestHandler($,Y)}assertCapability($,Y){if(!this._serverCapabilities?.[$])throw Error(`Server does not support ${$} (required for ${Y})`)}async connect($,Y){if(await super.connect($),$.sessionId!==void 0)return;try{let X=await this.request({method:"initialize",params:{protocolVersion:VV,capabilities:this._capabilities,clientInfo:this._clientInfo}},f$0,Y);if(X===void 0)throw Error(`Server sent invalid initialize result: ${X}`);if(!$K.includes(X.protocolVersion))throw Error(`Server's protocol version is not supported: ${X.protocolVersion}`);if(this._serverCapabilities=X.capabilities,this._serverVersion=X.serverInfo,$.setProtocolVersion)$.setProtocolVersion(X.protocolVersion);if(this._instructions=X.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig)this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0}catch(X){throw this.close(),X}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod($){switch($){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw Error(`Server does not support logging (required for ${$})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw Error(`Server does not support prompts (required for ${$})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw Error(`Server does not support resources (required for ${$})`);if($==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw Error(`Server does not support resource subscriptions (required for ${$})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw Error(`Server does not support tools (required for ${$})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw Error(`Server does not support completions (required for ${$})`);break;case"initialize":break;case"ping":break}}assertNotificationCapability($){switch($){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw Error(`Client does not support roots list changed notifications (required for ${$})`);break;case"notifications/initialized":break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability($){if(!this._capabilities)return;switch($){case"sampling/createMessage":if(!this._capabilities.sampling)throw Error(`Client does not support sampling capability (required for ${$})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw Error(`Client does not support elicitation capability (required for ${$})`);break;case"roots/list":if(!this._capabilities.roots)throw Error(`Client does not support roots capability (required for ${$})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw Error(`Client does not support tasks capability (required for ${$})`);break;case"ping":break}}assertTaskCapability($){z70(this._serverCapabilities?.tasks?.requests,$,"Server")}assertTaskHandlerCapability($){if(!this._capabilities)return;V70(this._capabilities.tasks?.requests,$,"Client")}async ping($){return this.request({method:"ping"},NJ,$)}async complete($,Y){return this.request({method:"completion/complete",params:$},e$0,Y)}async setLoggingLevel($,Y){return this.request({method:"logging/setLevel",params:{level:$}},NJ,Y)}async getPrompt($,Y){return this.request({method:"prompts/get",params:$},YI,Y)}async listPrompts($,Y){return this.request({method:"prompts/list",params:$},$I,Y)}async listResources($,Y){return this.request({method:"resources/list",params:$},kD,Y)}async listResourceTemplates($,Y){return this.request({method:"resources/templates/list",params:$},tT,Y)}async readResource($,Y){return this.request({method:"resources/read",params:$},vD,Y)}async subscribeResource($,Y){return this.request({method:"resources/subscribe",params:$},NJ,Y)}async unsubscribeResource($,Y){return this.request({method:"resources/unsubscribe",params:$},NJ,Y)}async callTool($,Y=AJ,X){if(this.isToolTaskRequired($.name))throw new r1(j1.InvalidRequest,`Tool "${$.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);let G=await this.request({method:"tools/call",params:$},Y,X),J=this.getToolOutputValidator($.name);if(J){if(!G.structuredContent&&!G.isError)throw new r1(j1.InvalidRequest,`Tool ${$.name} has an output schema but did not return structured content`);if(G.structuredContent)try{let Q=J(G.structuredContent);if(!Q.valid)throw new r1(j1.InvalidParams,`Structured content does not match the tool's output schema: ${Q.errorMessage}`)}catch(Q){if(Q instanceof r1)throw Q;throw new r1(j1.InvalidParams,`Failed to validate structured content: ${Q instanceof Error?Q.message:String(Q)}`)}}return G}isToolTask($){if(!this._serverCapabilities?.tasks?.requests?.tools?.call)return!1;return this._cachedKnownTaskTools.has($)}isToolTaskRequired($){return this._cachedRequiredTaskTools.has($)}cacheToolMetadata($){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(let Y of $){if(Y.outputSchema){let G=this._jsonSchemaValidator.getValidator(Y.outputSchema);this._cachedToolOutputValidators.set(Y.name,G)}let X=Y.execution?.taskSupport;if(X==="required"||X==="optional")this._cachedKnownTaskTools.add(Y.name);if(X==="required")this._cachedRequiredTaskTools.add(Y.name)}}getToolOutputValidator($){return this._cachedToolOutputValidators.get($)}async listTools($,Y){let X=await this.request({method:"tools/list",params:$},a$0,Y);return this.cacheToolMetadata(X.tools),X}_setupListChangedHandler($,Y,X,G){let J=ig0.safeParse(X);if(!J.success)throw Error(`Invalid ${$} listChanged options: ${J.error.message}`);if(typeof X.onChanged!=="function")throw Error(`Invalid ${$} listChanged options: onChanged must be a function`);let{autoRefresh:Q,debounceMs:W}=J.data,{onChanged:K}=X,Z=async()=>{if(!Q){K(null,null);return}try{let z=await G();K(null,z)}catch(z){let V=z instanceof Error?z:Error(String(z));K(V,null)}},H=()=>{if(W){let z=this._listChangedDebounceTimers.get($);if(z)clearTimeout(z);let V=setTimeout(Z,W);this._listChangedDebounceTimers.set($,V)}else Z()};this.setNotificationHandler(Y,H)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}rk0();class Om0 extends Event{constructor($,Y){var X,G;super($),this.code=(X=Y==null?void 0:Y.code)!=null?X:void 0,this.message=(G=Y==null?void 0:Y.message)!=null?G:void 0}[Symbol.for("nodejs.util.inspect.custom")]($,Y,X){return X(F34(this),Y)}[Symbol.for("Deno.customInspect")]($,Y){return $(F34(this),Y)}}function Z79($){let Y=globalThis.DOMException;return typeof Y=="function"?new Y($,"SyntaxError"):SyntaxError($)}function Em0($){return $ instanceof Error?"errors"in $&&Array.isArray($.errors)?$.errors.map(Em0).join(", "):("cause"in $)&&$.cause instanceof Error?`${$}: ${Em0($.cause)}`:$.message:`${$}`}function F34($){return{type:$.type,message:$.message,code:$.code,defaultPrevented:$.defaultPrevented,cancelable:$.cancelable,timeStamp:$.timeStamp}}var D34=($)=>{throw TypeError($)},Tm0=($,Y,X)=>Y.has($)||D34("Cannot "+X),B8=($,Y,X)=>(Tm0($,Y,"read from private field"),X?X.call($):Y.get($)),OY=($,Y,X)=>Y.has($)?D34("Cannot add the same private member more than once"):Y instanceof WeakSet?Y.add($):Y.set($,X),A$=($,Y,X,G)=>(Tm0($,Y,"write to private field"),Y.set($,X),X),NV=($,Y,X)=>(Tm0($,Y,"access private method"),X),SQ,XM,HI,L70,D70,Cu,FI,Su,fD,zI,LI,VI,Tu,QU,Mm0,Rm0,qm0,L34,Pm0,wm0,Iu,_m0,jm0;class DI extends EventTarget{constructor($,Y){var X,G;super(),OY(this,QU),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,OY(this,SQ),OY(this,XM),OY(this,HI),OY(this,L70),OY(this,D70),OY(this,Cu),OY(this,FI),OY(this,Su,null),OY(this,fD),OY(this,zI),OY(this,LI,null),OY(this,VI,null),OY(this,Tu,null),OY(this,Rm0,async(J)=>{var Q;B8(this,zI).reset();let{body:W,redirected:K,status:Z,headers:H}=J;if(Z===204){NV(this,QU,Iu).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(K?A$(this,HI,new URL(J.url)):A$(this,HI,void 0),Z!==200){NV(this,QU,Iu).call(this,`Non-200 status code (${Z})`,Z);return}if(!(H.get("content-type")||"").startsWith("text/event-stream")){NV(this,QU,Iu).call(this,'Invalid content type, expected "text/event-stream"',Z);return}if(B8(this,SQ)===this.CLOSED)return;A$(this,SQ,this.OPEN);let z=new Event("open");if((Q=B8(this,Tu))==null||Q.call(this,z),this.dispatchEvent(z),typeof W!="object"||!W||!("getReader"in W)){NV(this,QU,Iu).call(this,"Invalid response body, expected a web ReadableStream",Z),this.close();return}let V=new TextDecoder,F=W.getReader(),L=!0;do{let{done:N,value:D}=await F.read();D&&B8(this,zI).feed(V.decode(D,{stream:!N})),N&&(L=!1,B8(this,zI).reset(),NV(this,QU,_m0).call(this))}while(L)}),OY(this,qm0,(J)=>{A$(this,fD,void 0),!(J.name==="AbortError"||J.type==="aborted")&&NV(this,QU,_m0).call(this,Em0(J))}),OY(this,Pm0,(J)=>{typeof J.id=="string"&&A$(this,Su,J.id);let Q=new MessageEvent(J.event||"message",{data:J.data,origin:B8(this,HI)?B8(this,HI).origin:B8(this,XM).origin,lastEventId:J.id||""});B8(this,VI)&&(!J.event||J.event==="message")&&B8(this,VI).call(this,Q),this.dispatchEvent(Q)}),OY(this,wm0,(J)=>{A$(this,Cu,J)}),OY(this,jm0,()=>{A$(this,FI,void 0),B8(this,SQ)===this.CONNECTING&&NV(this,QU,Mm0).call(this)});try{if($ instanceof URL)A$(this,XM,$);else if(typeof $=="string")A$(this,XM,new URL($,U79()));else throw Error("Invalid URL")}catch{throw Z79("An invalid or illegal string was specified")}A$(this,zI,c60({onEvent:B8(this,Pm0),onRetry:B8(this,wm0)})),A$(this,SQ,this.CONNECTING),A$(this,Cu,3000),A$(this,D70,(X=Y==null?void 0:Y.fetch)!=null?X:globalThis.fetch),A$(this,L70,(G=Y==null?void 0:Y.withCredentials)!=null?G:!1),NV(this,QU,Mm0).call(this)}get readyState(){return B8(this,SQ)}get url(){return B8(this,XM).href}get withCredentials(){return B8(this,L70)}get onerror(){return B8(this,LI)}set onerror($){A$(this,LI,$)}get onmessage(){return B8(this,VI)}set onmessage($){A$(this,VI,$)}get onopen(){return B8(this,Tu)}set onopen($){A$(this,Tu,$)}addEventListener($,Y,X){let G=Y;super.addEventListener($,G,X)}removeEventListener($,Y,X){let G=Y;super.removeEventListener($,G,X)}close(){B8(this,FI)&&clearTimeout(B8(this,FI)),B8(this,SQ)!==this.CLOSED&&(B8(this,fD)&&B8(this,fD).abort(),A$(this,SQ,this.CLOSED),A$(this,fD,void 0))}}SQ=new WeakMap,XM=new WeakMap,HI=new WeakMap,L70=new WeakMap,D70=new WeakMap,Cu=new WeakMap,FI=new WeakMap,Su=new WeakMap,fD=new WeakMap,zI=new WeakMap,LI=new WeakMap,VI=new WeakMap,Tu=new WeakMap,QU=new WeakSet,Mm0=function(){A$(this,SQ,this.CONNECTING),A$(this,fD,new AbortController),B8(this,D70)(B8(this,XM),NV(this,QU,L34).call(this)).then(B8(this,Rm0)).catch(B8(this,qm0))},Rm0=new WeakMap,qm0=new WeakMap,L34=function(){var $;let Y={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...B8(this,Su)?{"Last-Event-ID":B8(this,Su)}:void 0},cache:"no-store",signal:($=B8(this,fD))==null?void 0:$.signal};return"window"in globalThis&&(Y.credentials=this.withCredentials?"include":"same-origin"),Y},Pm0=new WeakMap,wm0=new WeakMap,Iu=function($,Y){var X;B8(this,SQ)!==this.CLOSED&&A$(this,SQ,this.CLOSED);let G=new Om0("error",{code:Y,message:$});(X=B8(this,LI))==null||X.call(this,G),this.dispatchEvent(G)},_m0=function($,Y){var X;if(B8(this,SQ)===this.CLOSED)return;A$(this,SQ,this.CONNECTING);let G=new Om0("error",{code:Y,message:$});(X=B8(this,LI))==null||X.call(this,G),this.dispatchEvent(G),A$(this,FI,setTimeout(B8(this,jm0),B8(this,Cu)))},jm0=new WeakMap,DI.CONNECTING=0,DI.OPEN=1,DI.CLOSED=2;function U79(){let $="document"in globalThis?globalThis.document:void 0;return $&&typeof $=="object"&&"baseURI"in $&&typeof $.baseURI=="string"?$.baseURI:void 0}function NI($){if(!$)return{};if($ instanceof Headers)return Object.fromEntries($.entries());if(Array.isArray($))return Object.fromEntries($);return{...$}}function N70($=fetch,Y){if(!Y)return $;return async(X,G)=>{let J={...Y,...G,headers:G?.headers?{...NI(Y.headers),...NI(G.headers)}:Y.headers};return $(X,J)}}BY();BY();function N34($){let Y=typeof $==="string"?new URL($):new URL($.href);return Y.hash="",Y}function A34({requestedResource:$,configuredResource:Y}){let X=typeof $==="string"?new URL($):new URL($.href),G=typeof Y==="string"?new URL(Y):new URL(Y.href);if(X.origin!==G.origin)return!1;if(X.pathname.length<G.pathname.length)return!1;let J=X.pathname.endsWith("/")?X.pathname:X.pathname+"/",Q=G.pathname.endsWith("/")?G.pathname:G.pathname+"/";return J.startsWith(Q)}class OJ extends Error{constructor($){super($??"Unauthorized")}}function H79($){return["client_secret_basic","client_secret_post","none"].includes($)}var Im0="code",Cm0="S256";function z79($,Y){let X=$.client_secret!==void 0;if("token_endpoint_auth_method"in $&&$.token_endpoint_auth_method&&H79($.token_endpoint_auth_method)&&(Y.length===0||Y.includes($.token_endpoint_auth_method)))return $.token_endpoint_auth_method;if(Y.length===0)return X?"client_secret_basic":"none";if(X&&Y.includes("client_secret_basic"))return"client_secret_basic";if(X&&Y.includes("client_secret_post"))return"client_secret_post";if(Y.includes("none"))return"none";return X?"client_secret_post":"none"}function V79($,Y,X,G){let{client_id:J,client_secret:Q}=Y;switch($){case"client_secret_basic":F79(J,Q,X);return;case"client_secret_post":L79(J,Q,G);return;case"none":D79(J,G);return;default:throw Error(`Unsupported client authentication method: ${$}`)}}function F79($,Y,X){if(!Y)throw Error("client_secret_basic authentication requires a client_secret");let G=btoa(`${$}:${Y}`);X.set("Authorization",`Basic ${G}`)}function L79($,Y,X){if(X.set("client_id",$),Y)X.set("client_secret",Y)}function D79($,Y){Y.set("client_id",$)}async function vm0($){let Y=$ instanceof Response?$.status:void 0,X=$ instanceof Response?await $.text():$;try{let G=TZ4.parse(JSON.parse(X)),{error:J,error_description:Q,error_uri:W}=G;return new(PZ4[J]||zV)(Q||"",W)}catch(G){let J=`${Y?`HTTP ${Y}: `:""}Invalid OAuth error response: ${G}. Raw body: ${X}`;return new zV(J)}}async function e3($,Y){try{return await Sm0($,Y)}catch(X){if(X instanceof mE||X instanceof pT)return await $.invalidateCredentials?.("all"),await Sm0($,Y);else if(X instanceof uE)return await $.invalidateCredentials?.("tokens"),await Sm0($,Y);throw X}}async function Sm0($,{serverUrl:Y,authorizationCode:X,scope:G,resourceMetadataUrl:J,fetchFn:Q}){let W=await $.discoveryState?.(),K,Z,H,z=J;if(!z&&W?.resourceMetadataUrl)z=new URL(W.resourceMetadataUrl);if(W?.authorizationServerUrl){if(Z=W.authorizationServerUrl,K=W.resourceMetadata,H=W.authorizationServerMetadata??await bm0(Z,{fetchFn:Q}),!K)try{K=await xm0(Y,{resourceMetadataUrl:z},Q)}catch{}if(H!==W.authorizationServerMetadata||K!==W.resourceMetadata)await $.saveDiscoveryState?.({authorizationServerUrl:String(Z),resourceMetadataUrl:z?.toString(),resourceMetadata:K,authorizationServerMetadata:H})}else{let E=await E79(Y,{resourceMetadataUrl:z,fetchFn:Q});Z=E.authorizationServerUrl,H=E.authorizationServerMetadata,K=E.resourceMetadata,await $.saveDiscoveryState?.({authorizationServerUrl:String(Z),resourceMetadataUrl:z?.toString(),resourceMetadata:K,authorizationServerMetadata:H})}let V=await O34(Y,$,K),F=G||K?.scopes_supported?.join(" ")||$.clientMetadata.scope,L=await Promise.resolve($.clientInformation());if(!L){if(X!==void 0)throw Error("Existing OAuth client information is required when exchanging an authorization code");let E=H?.client_id_metadata_document_supported===!0,M=$.clientMetadataUrl;if(M&&!N79(M))throw new pE(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${M}`);if(E&&M)L={client_id:M},await $.saveClientInformation?.(L);else{if(!$.saveClientInformation)throw Error("OAuth client information must be saveable for dynamic registration");let q=await P34(Z,{metadata:H,clientMetadata:$.clientMetadata,scope:F,fetchFn:Q});await $.saveClientInformation(q),L=q}}let N=!$.redirectUrl;if(X!==void 0||N){let E=await R79($,Z,{metadata:H,resource:V,authorizationCode:X,fetchFn:Q});return await $.saveTokens(E),"AUTHORIZED"}let D=await $.tokens();if(D?.refresh_token)try{let E=await q34(Z,{metadata:H,clientInformation:L,refreshToken:D.refresh_token,resource:V,addClientAuthentication:$.addClientAuthentication,fetchFn:Q});return await $.saveTokens(E),"AUTHORIZED"}catch(E){if(!(E instanceof I7)||E instanceof zV);else throw E}let A=$.state?await $.state():void 0,{authorizationUrl:B,codeVerifier:O}=await M34(Z,{metadata:H,clientInformation:L,state:A,redirectUrl:$.redirectUrl,scope:F,resource:V});return await $.saveCodeVerifier(O),await $.redirectToAuthorization(B),"REDIRECT"}function N79($){if(!$)return!1;try{let Y=new URL($);return Y.protocol==="https:"&&Y.pathname!=="/"}catch{return!1}}async function O34($,Y,X){let G=N34($);if(Y.validateResourceURL)return await Y.validateResourceURL(G,X?.resource);if(!X)return;if(!A34({requestedResource:G,configuredResource:X.resource}))throw Error(`Protected resource ${X.resource} does not match expected ${G} (or origin)`);return new URL(X.resource)}function AI($){let Y=$.headers.get("WWW-Authenticate");if(!Y)return{};let[X,G]=Y.split(" ");if(X.toLowerCase()!=="bearer"||!G)return{};let J=km0($,"resource_metadata")||void 0,Q;if(J)try{Q=new URL(J)}catch{}let W=km0($,"scope")||void 0,K=km0($,"error")||void 0;return{resourceMetadataUrl:Q,scope:W,error:K}}function km0($,Y){let X=$.headers.get("WWW-Authenticate");if(!X)return null;let G=new RegExp(`${Y}=(?:"([^"]+)"|([^\\s,]+))`),J=X.match(G);if(J)return J[1]||J[2];return null}async function xm0($,Y,X=fetch){let G=await O79($,"oauth-protected-resource",X,{protocolVersion:Y?.protocolVersion,metadataUrl:Y?.resourceMetadataUrl});if(!G||G.status===404)throw await G?.body?.cancel(),Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!G.ok)throw await G.body?.cancel(),Error(`HTTP ${G.status} trying to load well-known OAuth protected resource metadata.`);return _Z4.parse(await G.json())}async function ym0($,Y,X=fetch){try{return await X($,{headers:Y})}catch(G){if(G instanceof TypeError)if(Y)return ym0($,void 0,X);else return;throw G}}function A79($,Y="",X={}){if(Y.endsWith("/"))Y=Y.slice(0,-1);return X.prependPathname?`${Y}/.well-known/${$}`:`/.well-known/${$}${Y}`}async function B34($,Y,X=fetch){return await ym0($,{"MCP-Protocol-Version":Y},X)}function B79($,Y){return!$||$.status>=400&&$.status<500&&Y!=="/"}async function O79($,Y,X,G){let J=new URL($),Q=G?.protocolVersion??VV,W;if(G?.metadataUrl)W=new URL(G.metadataUrl);else{let Z=A79(Y,J.pathname);W=new URL(Z,G?.metadataServerUrl??J),W.search=J.search}let K=await B34(W,Q,X);if(!G?.metadataUrl&&B79(K,J.pathname)){let Z=new URL(`/.well-known/${Y}`,J);K=await B34(Z,Q,X)}return K}function E34($){let Y=typeof $==="string"?new URL($):$,X=Y.pathname!=="/",G=[];if(!X)return G.push({url:new URL("/.well-known/oauth-authorization-server",Y.origin),type:"oauth"}),G.push({url:new URL("/.well-known/openid-configuration",Y.origin),type:"oidc"}),G;let J=Y.pathname;if(J.endsWith("/"))J=J.slice(0,-1);return G.push({url:new URL(`/.well-known/oauth-authorization-server${J}`,Y.origin),type:"oauth"}),G.push({url:new URL(`/.well-known/openid-configuration${J}`,Y.origin),type:"oidc"}),G.push({url:new URL(`${J}/.well-known/openid-configuration`,Y.origin),type:"oidc"}),G}async function bm0($,{fetchFn:Y=fetch,protocolVersion:X=VV}={}){let G={"MCP-Protocol-Version":X,Accept:"application/json"},J=E34($);for(let{url:Q,type:W}of J){let K=await ym0(Q,G,Y);if(!K)continue;if(!K.ok){if(await K.body?.cancel(),K.status>=400&&K.status<500)continue;throw Error(`HTTP ${K.status} trying to load ${W==="oauth"?"OAuth":"OpenID provider"} metadata from ${Q}`)}if(W==="oauth")return jg0.parse(await K.json());else return jZ4.parse(await K.json())}return}async function E79($,Y){let X,G;try{if(X=await xm0($,{resourceMetadataUrl:Y?.resourceMetadataUrl},Y?.fetchFn),X.authorization_servers&&X.authorization_servers.length>0)G=X.authorization_servers[0]}catch{}if(!G)G=String(new URL("/",$));let J=await bm0(G,{fetchFn:Y?.fetchFn});return{authorizationServerUrl:G,authorizationServerMetadata:J,resourceMetadata:X}}async function M34($,{metadata:Y,clientInformation:X,redirectUrl:G,scope:J,state:Q,resource:W}){let K;if(Y){if(K=new URL(Y.authorization_endpoint),!Y.response_types_supported.includes(Im0))throw Error(`Incompatible auth server: does not support response type ${Im0}`);if(Y.code_challenge_methods_supported&&!Y.code_challenge_methods_supported.includes(Cm0))throw Error(`Incompatible auth server: does not support code challenge method ${Cm0}`)}else K=new URL("/authorize",$);let Z=await Sg0(),H=Z.code_verifier,z=Z.code_challenge;if(K.searchParams.set("response_type",Im0),K.searchParams.set("client_id",X.client_id),K.searchParams.set("code_challenge",z),K.searchParams.set("code_challenge_method",Cm0),K.searchParams.set("redirect_uri",String(G)),Q)K.searchParams.set("state",Q);if(J)K.searchParams.set("scope",J);if(J?.includes("offline_access"))K.searchParams.append("prompt","consent");if(W)K.searchParams.set("resource",W.href);return{authorizationUrl:K,codeVerifier:H}}function M79($,Y,X){return new URLSearchParams({grant_type:"authorization_code",code:$,code_verifier:Y,redirect_uri:String(X)})}async function R34($,{metadata:Y,tokenRequestParams:X,clientInformation:G,addClientAuthentication:J,resource:Q,fetchFn:W}){let K=Y?.token_endpoint?new URL(Y.token_endpoint):new URL("/token",$),Z=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(Q)X.set("resource",Q.href);if(J)await J(Z,X,K,Y);else if(G){let z=Y?.token_endpoint_auth_methods_supported??[],V=z79(G,z);V79(V,G,Z,X)}let H=await(W??fetch)(K,{method:"POST",headers:Z,body:X});if(!H.ok)throw await vm0(H);return Tg0.parse(await H.json())}async function q34($,{metadata:Y,clientInformation:X,refreshToken:G,resource:J,addClientAuthentication:Q,fetchFn:W}){let K=new URLSearchParams({grant_type:"refresh_token",refresh_token:G}),Z=await R34($,{metadata:Y,tokenRequestParams:K,clientInformation:X,addClientAuthentication:Q,resource:J,fetchFn:W});return{refresh_token:G,...Z}}async function R79($,Y,{metadata:X,resource:G,authorizationCode:J,fetchFn:Q}={}){let W=$.clientMetadata.scope,K;if($.prepareTokenRequest)K=await $.prepareTokenRequest(W);if(!K){if(!J)throw Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!$.redirectUrl)throw Error("redirectUrl is required for authorization_code flow");let H=await $.codeVerifier();K=M79(J,H,$.redirectUrl)}let Z=await $.clientInformation();return R34(Y,{metadata:X,tokenRequestParams:K,clientInformation:Z??void 0,addClientAuthentication:$.addClientAuthentication,resource:G,fetchFn:Q})}async function P34($,{metadata:Y,clientMetadata:X,scope:G,fetchFn:J}){let Q;if(Y){if(!Y.registration_endpoint)throw Error("Incompatible auth server: does not support dynamic client registration");Q=new URL(Y.registration_endpoint)}else Q=new URL("/register",$);let W=await(J??fetch)(Q,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...X,...G!==void 0?{scope:G}:{}})});if(!W.ok)throw await vm0(W);return Ig0.parse(await W.json())}class w34 extends Error{constructor($,Y,X){super(`SSE error: ${Y}`);this.code=$,this.event=X}}class hm0{constructor($,Y){this._url=$,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=Y?.eventSourceInit,this._requestInit=Y?.requestInit,this._authProvider=Y?.authProvider,this._fetch=Y?.fetch,this._fetchWithInit=N70(Y?.fetch,Y?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new OJ("No auth provider");let $;try{$=await e3(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(Y){throw this.onerror?.(Y),Y}if($!=="AUTHORIZED")throw new OJ;return await this._startOrAuth()}async _commonHeaders(){let $={};if(this._authProvider){let X=await this._authProvider.tokens();if(X)$.Authorization=`Bearer ${X.access_token}`}if(this._protocolVersion)$["mcp-protocol-version"]=this._protocolVersion;let Y=NI(this._requestInit?.headers);return new Headers({...$,...Y})}_startOrAuth(){let $=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((Y,X)=>{this._eventSource=new DI(this._url.href,{...this._eventSourceInit,fetch:async(G,J)=>{let Q=await this._commonHeaders();Q.set("Accept","text/event-stream");let W=await $(G,{...J,headers:Q});if(W.status===401&&W.headers.has("www-authenticate")){let{resourceMetadataUrl:K,scope:Z}=AI(W);this._resourceMetadataUrl=K,this._scope=Z}return W}}),this._abortController=new AbortController,this._eventSource.onerror=(G)=>{if(G.code===401&&this._authProvider){this._authThenStart().then(Y,X);return}let J=new w34(G.code,G.message,G);X(J),this.onerror?.(J)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",(G)=>{let J=G;try{if(this._endpoint=new URL(J.data,this._url),this._endpoint.origin!==this._url.origin)throw Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(Q){X(Q),this.onerror?.(Q),this.close();return}Y()}),this._eventSource.onmessage=(G)=>{let J=G,Q;try{Q=C7.parse(JSON.parse(J.data))}catch(W){this.onerror?.(W);return}this.onmessage?.(Q)}})}async start(){if(this._eventSource)throw Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth($){if(!this._authProvider)throw new OJ("No auth provider");if(await e3(this._authProvider,{serverUrl:this._url,authorizationCode:$,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new OJ("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send($){if(!this._endpoint)throw Error("Not connected");try{let Y=await this._commonHeaders();Y.set("content-type","application/json");let X={...this._requestInit,method:"POST",headers:Y,body:JSON.stringify($),signal:this._abortController?.signal},G=await(this._fetch??fetch)(this._endpoint,X);if(!G.ok){let J=await G.text().catch(()=>null);if(G.status===401&&this._authProvider){let{resourceMetadataUrl:Q,scope:W}=AI(G);if(this._resourceMetadataUrl=Q,this._scope=W,await e3(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new OJ;return this.send($)}throw Error(`Error POSTing to endpoint (HTTP ${G.status}): ${J}`)}await G.body?.cancel()}catch(Y){throw this.onerror?.(Y),Y}}setProtocolVersion($){this._protocolVersion=$}}var LH4=U6(FH4(),1);import nm0 from"process";import{PassThrough as e79}from"stream";BY();class ku{append($){this._buffer=this._buffer?Buffer.concat([this._buffer,$]):$}readMessage(){if(!this._buffer)return null;let $=this._buffer.indexOf(`
`);if($===-1)return null;let Y=this._buffer.toString("utf8",0,$).replace(/\r$/,"");return this._buffer=this._buffer.subarray($+1),t79(Y)}clear(){this._buffer=void 0}}function t79($){return C7.parse(JSON.parse($))}function B70($){return JSON.stringify($)+`
`}var $Y9=nm0.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];function rm0(){let $={};for(let Y of $Y9){let X=nm0.env[Y];if(X===void 0)continue;if(X.startsWith("()"))continue;$[Y]=X}return $}class O70{constructor($){if(this._readBuffer=new ku,this._stderrStream=null,this._serverParams=$,$.stderr==="pipe"||$.stderr==="overlapped")this._stderrStream=new e79}async start(){if(this._process)throw Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise(($,Y)=>{if(this._process=LH4.default(this._serverParams.command,this._serverParams.args??[],{env:{...rm0(),...this._serverParams.env},stdio:["pipe","pipe",this._serverParams.stderr??"inherit"],shell:!1,windowsHide:nm0.platform==="win32",cwd:this._serverParams.cwd}),this._process.on("error",(X)=>{Y(X),this.onerror?.(X)}),this._process.on("spawn",()=>{$()}),this._process.on("close",(X)=>{this._process=void 0,this.onclose?.()}),this._process.stdin?.on("error",(X)=>{this.onerror?.(X)}),this._process.stdout?.on("data",(X)=>{this._readBuffer.append(X),this.processReadBuffer()}),this._process.stdout?.on("error",(X)=>{this.onerror?.(X)}),this._stderrStream&&this._process.stderr)this._process.stderr.pipe(this._stderrStream)})}get stderr(){if(this._stderrStream)return this._stderrStream;return this._process?.stderr??null}get pid(){return this._process?.pid??null}processReadBuffer(){while(!0)try{let $=this._readBuffer.readMessage();if($===null)break;this.onmessage?.($)}catch($){this.onerror?.($)}}async close(){if(this._process){let $=this._process;this._process=void 0;let Y=new Promise((X)=>{$.once("close",()=>{X()})});try{$.stdin?.end()}catch{}if(await Promise.race([Y,new Promise((X)=>setTimeout(X,2000).unref())]),$.exitCode===null){try{$.kill("SIGTERM")}catch{}await Promise.race([Y,new Promise((X)=>setTimeout(X,2000).unref())])}if($.exitCode===null)try{$.kill("SIGKILL")}catch{}}this._readBuffer.clear()}send($){return new Promise((Y)=>{if(!this._process?.stdin)throw Error("Not connected");let X=B70($);if(this._process.stdin.write(X))Y();else this._process.stdin.once("drain",Y)})}}BY();ak0();var YY9={initialReconnectionDelay:1000,maxReconnectionDelay:30000,reconnectionDelayGrowFactor:1.5,maxRetries:2};class GM extends Error{constructor($,Y){super(`Streamable HTTP error: ${Y}`);this.code=$}}class E70{constructor($,Y){this._hasCompletedAuthFlow=!1,this._url=$,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=Y?.requestInit,this._authProvider=Y?.authProvider,this._fetch=Y?.fetch,this._fetchWithInit=N70(Y?.fetch,Y?.requestInit),this._sessionId=Y?.sessionId,this._reconnectionOptions=Y?.reconnectionOptions??YY9}async _authThenStart(){if(!this._authProvider)throw new OJ("No auth provider");let $;try{$=await e3(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(Y){throw this.onerror?.(Y),Y}if($!=="AUTHORIZED")throw new OJ;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){let $={};if(this._authProvider){let X=await this._authProvider.tokens();if(X)$.Authorization=`Bearer ${X.access_token}`}if(this._sessionId)$["mcp-session-id"]=this._sessionId;if(this._protocolVersion)$["mcp-protocol-version"]=this._protocolVersion;let Y=NI(this._requestInit?.headers);return new Headers({...$,...Y})}async _startOrAuthSse($){let{resumptionToken:Y}=$;try{let X=await this._commonHeaders();if(X.set("Accept","text/event-stream"),Y)X.set("last-event-id",Y);let G=await(this._fetch??fetch)(this._url,{method:"GET",headers:X,signal:this._abortController?.signal});if(!G.ok){if(await G.body?.cancel(),G.status===401&&this._authProvider)return await this._authThenStart();if(G.status===405)return;throw new GM(G.status,`Failed to open SSE stream: ${G.statusText}`)}this._handleSseStream(G.body,$,!0)}catch(X){throw this.onerror?.(X),X}}_getNextReconnectionDelay($){if(this._serverRetryMs!==void 0)return this._serverRetryMs;let Y=this._reconnectionOptions.initialReconnectionDelay,X=this._reconnectionOptions.reconnectionDelayGrowFactor,G=this._reconnectionOptions.maxReconnectionDelay;return Math.min(Y*Math.pow(X,$),G)}_scheduleReconnection($,Y=0){let X=this._reconnectionOptions.maxRetries;if(Y>=X){this.onerror?.(Error(`Maximum reconnection attempts (${X}) exceeded.`));return}let G=this._getNextReconnectionDelay(Y);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse($).catch((J)=>{this.onerror?.(Error(`Failed to reconnect SSE stream: ${J instanceof Error?J.message:String(J)}`)),this._scheduleReconnection($,Y+1)})},G)}_handleSseStream($,Y,X){if(!$)return;let{onresumptiontoken:G,replayMessageId:J}=Y,Q,W=!1,K=!1;(async()=>{try{let H=$.pipeThrough(new TextDecoderStream).pipeThrough(new of({onRetry:(F)=>{this._serverRetryMs=F}})).getReader();while(!0){let{value:F,done:L}=await H.read();if(L)break;if(F.id)Q=F.id,W=!0,G?.(F.id);if(!F.data)continue;if(!F.event||F.event==="message")try{let N=C7.parse(JSON.parse(F.data));if(CX(N)){if(K=!0,J!==void 0)N.id=J}this.onmessage?.(N)}catch(N){this.onerror?.(N)}}if((X||W)&&!K&&this._abortController&&!this._abortController.signal.aborted)this._scheduleReconnection({resumptionToken:Q,onresumptiontoken:G,replayMessageId:J},0)}catch(H){if(this.onerror?.(Error(`SSE stream disconnected: ${H}`)),(X||W)&&!K&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:Q,onresumptiontoken:G,replayMessageId:J},0)}catch(F){this.onerror?.(Error(`Failed to reconnect: ${F instanceof Error?F.message:String(F)}`))}}})()}async start(){if(this._abortController)throw Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth($){if(!this._authProvider)throw new OJ("No auth provider");if(await e3(this._authProvider,{serverUrl:this._url,authorizationCode:$,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new OJ("Failed to authorize")}async close(){if(this._reconnectionTimeout)clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0;this._abortController?.abort(),this.onclose?.()}async send($,Y){try{let{resumptionToken:X,onresumptiontoken:G}=Y||{};if(X){this._startOrAuthSse({resumptionToken:X,replayMessageId:DJ($)?$.id:void 0}).catch((V)=>this.onerror?.(V));return}let J=await this._commonHeaders();J.set("content-type","application/json"),J.set("accept","application/json, text/event-stream");let Q={...this._requestInit,method:"POST",headers:J,body:JSON.stringify($),signal:this._abortController?.signal},W=await(this._fetch??fetch)(this._url,Q),K=W.headers.get("mcp-session-id");if(K)this._sessionId=K;if(!W.ok){let V=await W.text().catch(()=>null);if(W.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new GM(401,"Server returned 401 after successful authentication");let{resourceMetadataUrl:F,scope:L}=AI(W);if(this._resourceMetadataUrl=F,this._scope=L,await e3(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new OJ;return this._hasCompletedAuthFlow=!0,this.send($)}if(W.status===403&&this._authProvider){let{resourceMetadataUrl:F,scope:L,error:N}=AI(W);if(N==="insufficient_scope"){let D=W.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===D)throw new GM(403,"Server returned 403 after trying upscoping");if(L)this._scope=L;if(F)this._resourceMetadataUrl=F;if(this._lastUpscopingHeader=D??void 0,await e3(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new OJ;return this.send($)}}throw new GM(W.status,`Error POSTing to endpoint: ${V}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,W.status===202){if(await W.body?.cancel(),gg0($))this._startOrAuthSse({resumptionToken:void 0}).catch((V)=>this.onerror?.(V));return}let H=(Array.isArray($)?$:[$]).filter((V)=>("method"in V)&&("id"in V)&&V.id!==void 0).length>0,z=W.headers.get("content-type");if(H)if(z?.includes("text/event-stream"))this._handleSseStream(W.body,{onresumptiontoken:G},!1);else if(z?.includes("application/json")){let V=await W.json(),F=Array.isArray(V)?V.map((L)=>C7.parse(L)):[C7.parse(V)];for(let L of F)this.onmessage?.(L)}else throw await W.body?.cancel(),new GM(-1,`Unexpected content type: ${z}`);else await W.body?.cancel()}catch(X){throw this.onerror?.(X),X}}get sessionId(){return this._sessionId}async terminateSession(){if(!this._sessionId)return;try{let $=await this._commonHeaders(),Y={...this._requestInit,method:"DELETE",headers:$,signal:this._abortController?.signal},X=await(this._fetch??fetch)(this._url,Y);if(await X.body?.cancel(),!X.ok&&X.status!==405)throw new GM(X.status,`Failed to terminate session: ${X.statusText}`);this._sessionId=void 0}catch($){throw this.onerror?.($),$}}setProtocolVersion($){this._protocolVersion=$}get protocolVersion(){return this._protocolVersion}async resumeStream($,Y){await this._startOrAuthSse({resumptionToken:$,onresumptiontoken:Y?.onresumptiontoken})}}BY();import GK from"process";var M70=new Set,am0=new Set,DH4=!1,NH4=!1;async function XY9(){let $=(X)=>new Promise((G)=>{if(!X||!X.writable||X.writableEnded||X.destroyed){G();return}let J=()=>{X.off("error",J),G()};X.once("error",J);try{X.write("",()=>{X.off("error",J),G()})}catch{X.off("error",J),G()}}),Y=new Promise((X)=>{setTimeout(X,1000)});await Promise.race([Promise.all([$(GK.stdout),$(GK.stderr)]),Y])}async function EI($,Y,X){if(DH4)return;if(DH4=!0,M70.size>0&&Y)console.error(["SYNCHRONOUS TERMINATION NOTICE:","When explicitly exiting the process via process.exit or via a parent process,","asynchronous tasks in your exitHooks will not run. Either remove these tasks,","use gracefulExit() instead of process.exit(), or ensure your parent process","sends a SIGINT to the process running this code."].join(" "));let G=0;if(X>0)G=128+X;else if(typeof GK.exitCode==="number"||typeof GK.exitCode==="string")G=GK.exitCode;let J=(Z=!1)=>{if(Z===!0||$===!0)GK.exit(G)};for(let Z of am0)Z(G);if(Y){J();return}let Q=[],W=0;for(let[Z,H]of M70)W=Math.max(W,H),Q.push(Promise.resolve(Z(G)));let K=W>0?setTimeout(()=>{J(!0)},W):void 0;await Promise.all(Q),clearTimeout(K),await XY9(),J()}function GY9($){let{onExit:Y,wait:X,isSynchronous:G}=$,J=[Y,X];if(G)am0.add(Y);else M70.add(J);if(!NH4)NH4=!0,GK.once("beforeExit",EI.bind(void 0,!0,!1,-128)),GK.once("SIGINT",EI.bind(void 0,!0,!1,2)),GK.once("SIGTERM",EI.bind(void 0,!0,!1,15)),GK.once("exit",EI.bind(void 0,!1,!0,0)),GK.on("message",(Q)=>{if(Q==="shutdown")EI(!0,!0,-128)});return()=>{if(G)am0.delete(Y);else M70.delete(J)}}function AH4($,Y={}){if(typeof $!=="function")throw TypeError("onExit must be a function");if(!(typeof Y.wait==="number"&&Y.wait>0))throw TypeError("wait must be set to a positive numeric value");return GY9({onExit:$,wait:Y.wait,isSynchronous:!1})}function sm0($){if($!==void 0)GK.exitCode=$;EI(!0,!1,-128)}import{createHash as aX9,randomUUID as Bz4}from"crypto";OW();var Oz4=U6(So(),1);p2();kh();OW();lf0();import{randomUUID as JY9}from"crypto";var om0=class extends u8{idWasSet=!1;name;version;_id;description;instructions;repository;releaseDate;isLatest;packageCanonical;packages;remotes;convertedTools;mastra;agents;workflows;originalTools;get id(){return this._id}tools(){return this.convertedTools}setId($){if(this.idWasSet)return;this._id=$,this.idWasSet=!0}__registerMastra($){if(this.mastra=$,this.convertedTools=this.convertTools(this.originalTools,this.agents,this.workflows),this.originalTools&&typeof this.originalTools==="object")Object.entries(this.originalTools).forEach(([Y,X])=>{try{if(X&&typeof X==="object"&&"id"in X){let G=typeof X.id==="string"?X.id:Y;$.addTool(X,G)}}catch(G){if(!(G instanceof G0)||G.id!=="MASTRA_ADD_TOOL_DUPLICATE_KEY")throw G}});if(this.agents&&typeof this.agents==="object")Object.entries(this.agents).forEach(([Y,X])=>{try{$.addAgent(X,Y)}catch(G){if(!(G instanceof G0)||G.id!=="MASTRA_ADD_AGENT_DUPLICATE_KEY")throw G}});if(this.workflows&&typeof this.workflows==="object")Object.entries(this.workflows).forEach(([Y,X])=>{try{$.addWorkflow(X,Y)}catch(G){if(!(G instanceof G0)||G.id!=="MASTRA_ADD_WORKFLOW_DUPLICATE_KEY")throw G}})}constructor($){super({component:VZ.MCP_SERVER,name:$.name});if(this.name=$.name,this.version=$.version,$.id)this._id=rm($.id),this.idWasSet=!0;else this._id=this.mastra?.generateId()||JY9();this.description=$.description,this.instructions=$.instructions,this.repository=$.repository,this.releaseDate=$.releaseDate||new Date().toISOString(),this.isLatest=$.isLatest===void 0?!0:$.isLatest,this.packageCanonical=$.packageCanonical,this.packages=$.packages,this.remotes=$.remotes,this.agents=$.agents,this.workflows=$.workflows,this.originalTools=$.tools,this.convertedTools=this.convertTools($.tools,$.agents,$.workflows)}};VO();import{readFileSync as sX9}from"fs";v3();BY();BY();O1();BY();O1();var t3$=(($)=>A0)(function($){return A0.apply(this,arguments)});class MH4 extends YM{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch($,Y){}_ensureEventSlot($){let Y=this._eventSlots.get($);if(!Y){let X=this.eventSchemas[$];if(!X)throw Error(`Unknown event: ${String($)}`);Y={listeners:[]},this._eventSlots.set($,Y);let G=X.shape.method.value;this._registeredMethods.add(G);let J=Y;super.setNotificationHandler(X,(Q)=>{let W=Q.params;this.onEventDispatch($,W),J.onHandler?.(W);for(let K of[...J.listeners])K(W)})}return Y}setEventHandler($,Y){let X=this._ensureEventSlot($);if(X.onHandler&&Y)console.warn(`[MCP Apps] on${String($)} handler replaced. Use addEventListener("${String($)}", \u2026) to add multiple listeners without replacing.`);X.onHandler=Y}getEventHandler($){return this._eventSlots.get($)?.onHandler}addEventListener($,Y){this._ensureEventSlot($).listeners.push(Y)}removeEventListener($,Y){let X=this._eventSlots.get($);if(!X)return;let G=X.listeners.indexOf(Y);if(G!==-1)X.listeners.splice(G,1)}setRequestHandler=($,Y)=>{this._assertMethodNotRegistered($,"setRequestHandler"),super.setRequestHandler($,Y)};setNotificationHandler=($,Y)=>{this._assertMethodNotRegistered($,"setNotificationHandler"),super.setNotificationHandler($,Y)};warnIfRequestHandlerReplaced($,Y,X){if(Y&&X)console.warn(`[MCP Apps] ${$} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=($,Y)=>{let X=$.shape.method.value;this._registeredMethods.add(X),super.setRequestHandler($,Y)};_assertMethodNotRegistered($,Y){let X=$.shape.method.value;if(this._registeredMethods.has(X))throw Error(`Handler for "${X}" already registered (via ${Y}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(X)}}var QY9="2026-01-26";var WY9="ui/notifications/tool-input-partial";class RH4{eventTarget;eventSource;messageListener;constructor($=window.parent,Y){this.eventTarget=$,this.eventSource=Y,this.messageListener=(X)=>{if(Y&&X.source!==this.eventSource){console.debug("Ignoring message from unknown source",X);return}let G=C7.safeParse(X.data);if(G.success)console.debug("Parsed message",G.data),this.onmessage?.(G.data);else if(X.data?.jsonrpc!=="2.0")console.debug("Ignoring non-JSON-RPC message",G.error.message,X);else console.error("Failed to parse message",G.error.message,X),this.onerror?.(Error("Invalid JSON-RPC message received: "+G.error.message))}}async start(){window.addEventListener("message",this.messageListener)}async send($,Y){if($.method!==WY9)console.debug("Sending message",$);this.eventTarget.postMessage($,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var KY9=U.union([U.literal("light"),U.literal("dark")]).describe("Color theme preference for the host environment."),vu=U.union([U.literal("inline"),U.literal("fullscreen"),U.literal("pip")]).describe("Display mode for UI presentation."),ZY9=U.union([U.literal("--color-background-primary"),U.literal("--color-background-secondary"),U.literal("--color-background-tertiary"),U.literal("--color-background-inverse"),U.literal("--color-background-ghost"),U.literal("--color-background-info"),U.literal("--color-background-danger"),U.literal("--color-background-success"),U.literal("--color-background-warning"),U.literal("--color-background-disabled"),U.literal("--color-text-primary"),U.literal("--color-text-secondary"),U.literal("--color-text-tertiary"),U.literal("--color-text-inverse"),U.literal("--color-text-ghost"),U.literal("--color-text-info"),U.literal("--color-text-danger"),U.literal("--color-text-success"),U.literal("--color-text-warning"),U.literal("--color-text-disabled"),U.literal("--color-border-primary"),U.literal("--color-border-secondary"),U.literal("--color-border-tertiary"),U.literal("--color-border-inverse"),U.literal("--color-border-ghost"),U.literal("--color-border-info"),U.literal("--color-border-danger"),U.literal("--color-border-success"),U.literal("--color-border-warning"),U.literal("--color-border-disabled"),U.literal("--color-ring-primary"),U.literal("--color-ring-secondary"),U.literal("--color-ring-inverse"),U.literal("--color-ring-info"),U.literal("--color-ring-danger"),U.literal("--color-ring-success"),U.literal("--color-ring-warning"),U.literal("--font-sans"),U.literal("--font-mono"),U.literal("--font-weight-normal"),U.literal("--font-weight-medium"),U.literal("--font-weight-semibold"),U.literal("--font-weight-bold"),U.literal("--font-text-xs-size"),U.literal("--font-text-sm-size"),U.literal("--font-text-md-size"),U.literal("--font-text-lg-size"),U.literal("--font-heading-xs-size"),U.literal("--font-heading-sm-size"),U.literal("--font-heading-md-size"),U.literal("--font-heading-lg-size"),U.literal("--font-heading-xl-size"),U.literal("--font-heading-2xl-size"),U.literal("--font-heading-3xl-size"),U.literal("--font-text-xs-line-height"),U.literal("--font-text-sm-line-height"),U.literal("--font-text-md-line-height"),U.literal("--font-text-lg-line-height"),U.literal("--font-heading-xs-line-height"),U.literal("--font-heading-sm-line-height"),U.literal("--font-heading-md-line-height"),U.literal("--font-heading-lg-line-height"),U.literal("--font-heading-xl-line-height"),U.literal("--font-heading-2xl-line-height"),U.literal("--font-heading-3xl-line-height"),U.literal("--border-radius-xs"),U.literal("--border-radius-sm"),U.literal("--border-radius-md"),U.literal("--border-radius-lg"),U.literal("--border-radius-xl"),U.literal("--border-radius-full"),U.literal("--border-width-regular"),U.literal("--shadow-hairline"),U.literal("--shadow-sm"),U.literal("--shadow-md"),U.literal("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),UY9=U.record(ZY9.describe(`Style variables for theming MCP apps.

Individual style keys are optional - hosts may provide any subset of these values.
Values are strings containing CSS values (colors, sizes, font stacks, etc.).

Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),U.union([U.string(),U.undefined()]).describe(`Style variables for theming MCP apps.

Individual style keys are optional - hosts may provide any subset of these values.
Values are strings containing CSS values (colors, sizes, font stacks, etc.).

Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.

Individual style keys are optional - hosts may provide any subset of these values.
Values are strings containing CSS values (colors, sizes, font stacks, etc.).

Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),QH$=U.object({method:U.literal("ui/open-link"),params:U.object({url:U.string().describe("URL to open in the host's browser")})}),HY9=U.object({isError:U.boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),zY9=U.object({isError:U.boolean().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough(),VY9=U.object({isError:U.boolean().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough(),WH$=U.object({method:U.literal("ui/notifications/sandbox-proxy-ready"),params:U.object({})}),tm0=U.object({connectDomains:U.array(U.string()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).

- Maps to CSP \`connect-src\` directive
- Empty or omitted \u2192 no network connections (secure default)`),resourceDomains:U.array(U.string()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted \u2192 no network resources (secure default)"),frameDomains:U.array(U.string()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted \u2192 no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:U.array(U.string()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted \u2192 only same origin allowed (`base-uri 'self'`)")}),em0=U.object({camera:U.object({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:U.object({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:U.object({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:U.object({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")}),KH$=U.object({method:U.literal("ui/notifications/size-changed"),params:U.object({width:U.number().optional().describe("New width in pixels."),height:U.number().optional().describe("New height in pixels.")})}),FY9=U.object({method:U.literal("ui/notifications/tool-input"),params:U.object({arguments:U.record(U.string(),U.unknown().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),LY9=U.object({method:U.literal("ui/notifications/tool-input-partial"),params:U.object({arguments:U.record(U.string(),U.unknown().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),DY9=U.object({method:U.literal("ui/notifications/tool-cancelled"),params:U.object({reason:U.string().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),NY9=U.object({fonts:U.string().optional()}),AY9=U.object({variables:UY9.optional().describe("CSS variables for theming the app."),css:NY9.optional().describe("CSS blocks that apps can inject.")}),BY9=U.object({method:U.literal("ui/resource-teardown"),params:U.object({})}),ZH$=U.record(U.string(),U.unknown()),BH4=U.object({text:U.object({}).optional().describe("Host supports text content blocks."),image:U.object({}).optional().describe("Host supports image content blocks."),audio:U.object({}).optional().describe("Host supports audio content blocks."),resource:U.object({}).optional().describe("Host supports resource content blocks."),resourceLink:U.object({}).optional().describe("Host supports resource link content blocks."),structuredContent:U.object({}).optional().describe("Host supports structured content.")}),UH$=U.object({method:U.literal("ui/notifications/request-teardown"),params:U.object({}).optional()}),OY9=U.object({experimental:U.object({}).optional().describe("Experimental features (structure TBD)."),openLinks:U.object({}).optional().describe("Host supports opening external URLs."),downloadFile:U.object({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:U.object({listChanged:U.boolean().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:U.object({listChanged:U.boolean().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:U.object({}).optional().describe("Host accepts log messages."),sandbox:U.object({permissions:em0.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:tm0.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:BH4.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:BH4.optional().describe("Host supports receiving content messages (ui/message) from the view."),sampling:U.object({tools:U.object({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),EY9=U.object({experimental:U.object({}).optional().describe("Experimental features (structure TBD)."),tools:U.object({listChanged:U.boolean().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:U.array(vu).optional().describe("Display modes the app supports.")}),HH$=U.object({method:U.literal("ui/notifications/initialized"),params:U.object({}).optional()}),zH$=U.object({csp:tm0.optional().describe("Content Security Policy configuration for UI resources."),permissions:em0.optional().describe("Sandbox permissions requested by the UI resource."),domain:U.string().optional().describe(`Dedicated origin for view sandbox.

Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.

**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:
- Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`)
- URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`)

If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:U.boolean().optional().describe(`Visual boundary preference - true if view prefers a visible border.

Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.

- \`true\`: request visible border + background
- \`false\`: request no visible border + background
- omitted: host decides border`)}),VH$=U.object({method:U.literal("ui/request-display-mode"),params:U.object({mode:vu.describe("The display mode being requested.")})}),MY9=U.object({mode:vu.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),RY9=U.union([U.literal("model"),U.literal("app")]).describe("Tool visibility scope - who can access the tool."),FH$=U.object({resourceUri:U.string().optional(),visibility:U.array(RY9).optional().describe(`Who can access this tool. Default: ["model", "app"]
- "model": Tool visible to and callable by the agent
- "app": Tool callable by the app from this server only`),csp:U.never().optional(),permissions:U.never().optional()}),LH$=U.object({mimeTypes:U.array(U.string()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),DH$=U.object({method:U.literal("ui/download-file"),params:U.object({contents:U.array(U.union([n$0,r$0])).describe("Resource contents to download \u2014 embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),NH$=U.object({method:U.literal("ui/message"),params:U.object({role:U.literal("user").describe('Message role, currently only "user" is supported.'),content:U.array(eE).describe("Message content blocks (text, image, etc.).")})}),AH$=U.object({method:U.literal("ui/notifications/sandbox-resource-ready"),params:U.object({html:U.string().describe("HTML content to load into the inner iframe."),sandbox:U.string().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:tm0.optional().describe("CSP configuration from resource metadata."),permissions:em0.optional().describe("Sandbox permissions from resource metadata.")})}),qY9=U.object({method:U.literal("ui/notifications/tool-result"),params:AJ.describe("Standard MCP tool execution result.")}),qH4=U.object({toolInfo:U.object({id:cE.optional().describe("JSON-RPC id of the tools/call request."),tool:qu.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:KY9.optional().describe("Current color theme preference."),styles:AY9.optional().describe("Style configuration for theming the app."),displayMode:vu.optional().describe("How the UI is currently displayed."),availableDisplayModes:U.array(vu).optional().describe("Display modes the host supports."),containerDimensions:U.union([U.object({height:U.number().describe("Fixed container height in pixels.")}),U.object({maxHeight:U.union([U.number(),U.undefined()]).optional().describe("Maximum container height in pixels.")})]).and(U.union([U.object({width:U.number().describe("Fixed container width in pixels.")}),U.object({maxWidth:U.union([U.number(),U.undefined()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:U.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:U.string().optional().describe("User's timezone in IANA format."),userAgent:U.string().optional().describe("Host application identifier."),platform:U.union([U.literal("web"),U.literal("desktop"),U.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:U.object({touch:U.boolean().optional().describe("Whether the device supports touch input."),hover:U.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:U.object({top:U.number().describe("Top safe area inset in pixels."),right:U.number().describe("Right safe area inset in pixels."),bottom:U.number().describe("Bottom safe area inset in pixels."),left:U.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),PY9=U.object({method:U.literal("ui/notifications/host-context-changed"),params:qH4.describe("Partial context update containing only changed fields.")}),BH$=U.object({method:U.literal("ui/update-model-context"),params:U.object({content:U.array(eE).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:U.record(U.string(),U.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),OH$=U.object({method:U.literal("ui/initialize"),params:U.object({appInfo:lT.describe("App identification (name and version)."),appCapabilities:EY9.describe("Features and capabilities this app provides."),protocolVersion:U.string().describe("Protocol version this app supports.")})}),wY9=U.object({protocolVersion:U.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:lT.describe("Host application identification and version."),hostCapabilities:OY9.describe("Features and capabilities provided by the host."),hostContext:qH4.describe("Rich context about the host environment.")}).passthrough(),_Y9={target:"draft-2020-12"};async function OH4($,Y){let X=$["~standard"];if(X.jsonSchema)return X.jsonSchema[Y](_Y9);if(X.vendor==="zod"){let{z:G}=await Promise.resolve().then(() => (O1(),V3));return G.toJSONSchema($,{io:Y})}throw Error(`Schema (vendor: ${X.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function EH4($,Y,X=""){let G=await $["~standard"].validate(Y);if(G.issues){let J=G.issues.map((Q)=>{let W=Q.path?.map((K)=>typeof K==="object"?K.key:K).join(".");return W?`${W}: ${Q.message}`:Q.message}).join("; ");throw Error(X+J)}return G.value}var $u0="ui/resourceUri",PH4="text/html;profile=mcp-app";class wH4 extends MH4{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized($){if(this._initializedSent)return;let Y=`[ext-apps] App.${$}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(Y);console.warn(`${Y}. This will throw in a future release.`)}eventSchemas={toolinput:FY9,toolinputpartial:LY9,toolresult:qY9,toolcancelled:DY9,hostcontextchanged:PY9};static ONE_SHOT_EVENTS=new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]);_everHadListener=new Set;_assertHandlerTiming($){if(!wH4.ONE_SHOT_EVENTS.has($)||this._everHadListener.has($))return;if(this._everHadListener.add($),!this._initializedSent)return;let Y=`[ext-apps] "${String($)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(Y);console.warn(Y)}setEventHandler($,Y){if(Y)this._assertHandlerTiming($);super.setEventHandler($,Y)}addEventListener($,Y){this._assertHandlerTiming($),super.addEventListener($,Y)}onEventDispatch($,Y){if($==="hostcontextchanged")this._hostContext={...this._hostContext,...Y}}constructor($,Y={},X={autoResize:!0}){super(X);if(this._appInfo=$,this._capabilities=Y,this.options=X,!X.allowUnsafeEval)U.config({jitless:!0});this.setRequestHandler(lE,(G)=>{return console.log("Received ping:",G.params),{}}),this.setEventHandler("hostcontextchanged",void 0)}registerCapabilities($){if(this.transport)throw Error("Cannot register capabilities after transport is established");this._capabilities=KI(this._capabilities,$)}registerTool($,Y,X){if(this._registeredTools[$])throw Error(`Tool ${$} is already registered`);let G=this,J=()=>{if(G._initializedSent&&G._capabilities.tools?.listChanged)G.sendToolListChanged()},Q=Y.inputSchema!==void 0,W={title:Y.title,description:Y.description,inputSchema:Y.inputSchema,outputSchema:Y.outputSchema,annotations:Y.annotations,_meta:Y._meta,enabled:!0,enable(){this.enabled=!0,J()},disable(){this.enabled=!1,J()},update(K){Object.assign(this,K),J()},remove(){if(G._registeredTools[$]!==W)return;delete G._registeredTools[$],J()},handler:async(K,Z)=>{if(!W.enabled)throw Error(`Tool ${$} is disabled`);let H;if(Q){let z=W.inputSchema,V=z?await EH4(z,K??{},`Invalid input for tool ${$}: `):K??{};H=await X(V,Z)}else H=await X(Z);if(W.outputSchema&&!H.isError)H.structuredContent=await EH4(W.outputSchema,H.structuredContent,`Invalid output for tool ${$}: `);return H}};if(this._registeredTools[$]=W,!this._capabilities.tools&&!this.transport)this.registerCapabilities({tools:{listChanged:!0}});return this.ensureToolHandlersInitialized(),J(),W}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){if(this._toolHandlersInitialized)return;this._toolHandlersInitialized=!0,this.oncalltool=async($,Y)=>{let X=this._registeredTools[$.name];if(!X)throw Error(`Tool ${$.name} not found`);return X.handler($.arguments,Y)},this.onlisttools=async($,Y)=>{return{tools:await Promise.all(Object.entries(this._registeredTools).filter(([X,G])=>G.enabled).map(async([X,G])=>{let J={name:X,title:G.title,description:G.description,inputSchema:G.inputSchema?await OH4(G.inputSchema,"input"):{type:"object",properties:{}}};if(G.outputSchema)J.outputSchema=await OH4(G.outputSchema,"output");if(G.annotations)J.annotations=G.annotations;if(G._meta)J._meta=G._meta;return J}))}}}async sendToolListChanged($={}){this._assertInitialized("sendToolListChanged"),await this.notification({method:"notifications/tools/list_changed",params:$})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler("toolinput")}set ontoolinput($){this.setEventHandler("toolinput",$)}get ontoolinputpartial(){return this.getEventHandler("toolinputpartial")}set ontoolinputpartial($){this.setEventHandler("toolinputpartial",$)}get ontoolresult(){return this.getEventHandler("toolresult")}set ontoolresult($){this.setEventHandler("toolresult",$)}get ontoolcancelled(){return this.getEventHandler("toolcancelled")}set ontoolcancelled($){this.setEventHandler("toolcancelled",$)}get onhostcontextchanged(){return this.getEventHandler("hostcontextchanged")}set onhostcontextchanged($){this.setEventHandler("hostcontextchanged",$)}_onteardown;get onteardown(){return this._onteardown}set onteardown($){this.warnIfRequestHandlerReplaced("onteardown",this._onteardown,$),this._onteardown=$,this.replaceRequestHandler(BY9,(Y,X)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(Y.params,X)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool($){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,$),this._oncalltool=$,this.replaceRequestHandler(GU,(Y,X)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(Y.params,X)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools($){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,$),this._onlisttools=$,this.replaceRequestHandler(LV,(Y,X)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(Y.params,X)})}assertCapabilityForMethod($){switch($){case"sampling/createMessage":if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${$})`);break}}assertRequestHandlerCapability($){switch($){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${$})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${$} registered`)}}assertNotificationCapability($){}assertTaskCapability($){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability($){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool($,Y){if(this._assertInitialized("callServerTool"),typeof $==="string")throw Error(`callServerTool() expects an object as its first argument, but received a string ("${$}"). Did you mean: callServerTool({ name: "${$}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:$},AJ,{onprogress:()=>{},resetTimeoutOnProgress:!0,...Y})}async readServerResource($,Y){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:$},vD,Y)}async listServerResources($,Y){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:$},kD,Y)}async createSamplingMessage($,Y){this._assertInitialized("createSamplingMessage");let X=$.tools?xD:s3;return await this.request({method:"sampling/createMessage",params:$},X,Y)}sendMessage($,Y){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:$},VY9,Y)}sendLog($){return this.notification({method:"notifications/message",params:$})}updateModelContext($,Y){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:$},NJ,Y)}openLink($,Y){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:$},HY9,Y)}sendOpenLink=this.openLink;downloadFile($,Y){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:$},zY9,Y)}requestTeardown($={}){return this.notification({method:"ui/notifications/request-teardown",params:$})}requestDisplayMode($,Y){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:$},MY9,Y)}sendSizeChanged($){return this.notification({method:"ui/notifications/size-changed",params:$})}setupSizeChangedNotifications(){let $=!1,Y=0,X=0,G=()=>{if($)return;$=!0,requestAnimationFrame(()=>{$=!1;let Q=document.documentElement,W=Q.style.height;Q.style.height="max-content";let K=Math.ceil(Q.getBoundingClientRect().height);Q.style.height=W;let Z=Math.ceil(window.innerWidth);if(Z!==Y||K!==X)Y=Z,X=K,this.sendSizeChanged({width:Z,height:K})})};G();let J=new ResizeObserver(G);return J.observe(document.documentElement),J.observe(document.body),()=>J.disconnect()}async connect($=new RH4(window.parent,window.parent),Y){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1,await super.connect($);try{let X=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:QY9}},wY9,Y);if(X===void 0)throw Error(`Server sent invalid initialize result: ${X}`);if(this._hostCapabilities=X.hostCapabilities,this._hostInfo=X.hostInfo,this._hostContext=X.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize)this.setupSizeChangedNotifications()}catch(X){throw this.close(),X}}}BY();var Jz4=U6(tH4(),1),Qz4=U6(Xz4(),1);import{randomUUID as jX9}from"crypto";import{TLSSocket as TX9}from"tls";import{URL as Gz4}from"url";var IX9="4mb";class Ju0{constructor($,Y,X){this._endpoint=$,this.res=Y,this._sessionId=jX9(),this._options=X||{enableDnsRebindingProtection:!1}}validateRequestHeaders($){if(!this._options.enableDnsRebindingProtection)return;if(this._options.allowedHosts&&this._options.allowedHosts.length>0){let Y=$.headers.host;if(!Y||!this._options.allowedHosts.includes(Y))return`Invalid Host header: ${Y}`}if(this._options.allowedOrigins&&this._options.allowedOrigins.length>0){let Y=$.headers.origin;if(Y&&!this._options.allowedOrigins.includes(Y))return`Invalid Origin header: ${Y}`}return}async start(){if(this._sseResponse)throw Error("SSEServerTransport already started! If using Server class, note that connect() calls start() automatically.");this.res.writeHead(200,{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive"});let $="http://localhost",Y=new Gz4(this._endpoint,$);Y.searchParams.set("sessionId",this._sessionId);let X=Y.pathname+Y.search+Y.hash;this.res.write(`event: endpoint
data: ${X}

`),this._sseResponse=this.res,this.res.on("close",()=>{this._sseResponse=void 0,this.onclose?.()})}async handlePostMessage($,Y,X){if(!this._sseResponse)throw Y.writeHead(500).end("SSE connection not established"),Error("SSE connection not established");let G=this.validateRequestHeaders($);if(G){Y.writeHead(403).end(G),this.onerror?.(Error(G));return}let J=$.auth,Q=$.headers.host,W=$.socket instanceof TX9?"https":"http",K=Q&&$.url?new Gz4($.url,`${W}://${Q}`):void 0,Z={headers:$.headers,url:K},H;try{let z=Qz4.default.parse($.headers["content-type"]??"");if(z.type!=="application/json")throw Error(`Unsupported content-type: ${z.type}`);H=X??await Jz4.default($,{limit:IX9,encoding:z.parameters.charset??"utf-8"})}catch(z){Y.writeHead(400).end(String(z)),this.onerror?.(z);return}try{await this.handleMessage(typeof H==="string"?JSON.parse(H):H,{requestInfo:Z,authInfo:J})}catch{Y.writeHead(400).end(`Invalid message: ${H}`);return}Y.writeHead(202).end("Accepted")}async handleMessage($,Y){let X;try{X=C7.parse($)}catch(G){throw this.onerror?.(G),G}this.onmessage?.(X,Y)}async close(){this._sseResponse?.end(),this._sseResponse=void 0,this.onclose?.()}async send($){if(!this._sseResponse)throw Error("Not connected");this._sseResponse.write(`event: message
data: ${JSON.stringify($)}

`)}get sessionId(){return this._sessionId}}import Wz4 from"process";class Qu0{constructor($=Wz4.stdin,Y=Wz4.stdout){this._stdin=$,this._stdout=Y,this._readBuffer=new ku,this._started=!1,this._ondata=(X)=>{this._readBuffer.append(X),this.processReadBuffer()},this._onerror=(X)=>{this.onerror?.(X)}}async start(){if(this._started)throw Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){while(!0)try{let $=this._readBuffer.readMessage();if($===null)break;this.onmessage?.($)}catch($){this.onerror?.($)}}async close(){if(this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0)this._stdin.pause();this._readBuffer.clear(),this.onclose?.()}send($){return new Promise((Y)=>{let X=B70($);if(this._stdout.write(X))Y();else this._stdout.once("drain",Y)})}}import{Http2ServerRequest as Uz4,constants as CX9}from"http2";import{Http2ServerRequest as Wu0}from"http2";import{Readable as Kz4}from"stream";import uX9 from"crypto";var WM=class extends Error{constructor($,Y){super($,Y);this.name="RequestError"}},SX9=($)=>{if($ instanceof WM)return $;return new WM($.message,{cause:$})},kX9=global.Request,xu=class extends kX9{constructor($,Y){if(typeof $==="object"&&wI in $)$=$[wI]();if(typeof Y?.body?.getReader<"u")Y.duplex??="half";super($,Y)}},vX9=($)=>{let Y=[],X=$.rawHeaders;for(let G=0;G<X.length;G+=2){let{[G]:J,[G+1]:Q}=X;if(J.charCodeAt(0)!==58)Y.push([J,Q])}return new Headers(Y)},Hz4=Symbol("wrapBodyStream"),xX9=($,Y,X,G,J)=>{let Q={method:$,headers:X,signal:J.signal};if($==="TRACE"){Q.method="GET";let W=new xu(Y,Q);return Object.defineProperty(W,"method",{get(){return"TRACE"}}),W}if(!($==="GET"||$==="HEAD"))if("rawBody"in G&&G.rawBody instanceof Buffer)Q.body=new ReadableStream({start(W){W.enqueue(G.rawBody),W.close()}});else if(G[Hz4]){let W;Q.body=new ReadableStream({async pull(K){try{W||=Kz4.toWeb(G).getReader();let{done:Z,value:H}=await W.read();if(Z)K.close();else K.enqueue(H)}catch(Z){K.error(Z)}}})}else Q.body=Kz4.toWeb(G);return new xu(Y,Q)},wI=Symbol("getRequestCache"),zz4=Symbol("requestCache"),_70=Symbol("incomingKey"),j70=Symbol("urlKey"),yX9=Symbol("headersKey"),PI=Symbol("abortControllerKey"),bX9=Symbol("getAbortController"),yu={get method(){return this[_70].method||"GET"},get url(){return this[j70]},get headers(){return this[yX9]||=vX9(this[_70])},[bX9](){return this[wI](),this[PI]},[wI](){return this[PI]||=new AbortController,this[zz4]||=xX9(this.method,this[j70],this.headers,this[_70],this[PI])}};["body","bodyUsed","cache","credentials","destination","integrity","mode","redirect","referrer","referrerPolicy","signal","keepalive"].forEach(($)=>{Object.defineProperty(yu,$,{get(){return this[wI]()[$]}})});["arrayBuffer","blob","clone","formData","json","text"].forEach(($)=>{Object.defineProperty(yu,$,{value:function(){return this[wI]()[$]()}})});Object.defineProperty(yu,Symbol.for("nodejs.util.inspect.custom"),{value:function($,Y,X){let G={method:this.method,url:this.url,headers:this.headers,nativeRequest:this[zz4]};return`Request (lightweight) ${X(G,{...Y,depth:$==null?null:$-1})}`}});Object.setPrototypeOf(yu,xu.prototype);var hX9=($,Y)=>{let X=Object.create(yu);X[_70]=$;let G=$.url||"";if(G[0]!=="/"&&(G.startsWith("http://")||G.startsWith("https://"))){if($ instanceof Wu0)throw new WM("Absolute URL for :path is not allowed in HTTP/2");try{let K=new URL(G);X[j70]=K.href}catch(K){throw new WM("Invalid absolute URL",{cause:K})}return X}let J=($ instanceof Wu0?$.authority:$.headers.host)||Y;if(!J)throw new WM("Missing host header");let Q;if($ instanceof Wu0){if(Q=$.scheme,!(Q==="http"||Q==="https"))throw new WM("Unsupported scheme")}else Q=$.socket&&$.socket.encrypted?"https":"http";let W=new URL(`${Q}://${J}${G}`);if(W.hostname.length!==J.length&&W.hostname!==J.replace(/:\d+$/,""))throw new WM("Invalid host header");return X[j70]=W.href,X},Zu0=Symbol("responseCache"),qI=Symbol("getResponseCache"),KM=Symbol("cache"),zu0=global.Response,_I=class ${#$;#Y;[qI](){return delete this[KM],this[Zu0]||=new zu0(this.#$,this.#Y)}constructor(Y,X){let G;if(this.#$=Y,X instanceof $){let J=X[Zu0];if(J){this.#Y=J,this[qI]();return}else this.#Y=X.#Y,G=new Headers(X.#Y.headers)}else this.#Y=X;if(typeof Y==="string"||typeof Y?.getReader<"u"||Y instanceof Blob||Y instanceof Uint8Array)this[KM]=[X?.status||200,Y,G||X?.headers]}get headers(){let Y=this[KM];if(Y){if(!(Y[2]instanceof Headers))Y[2]=new Headers(Y[2]||{"content-type":"text/plain; charset=UTF-8"});return Y[2]}return this[qI]().headers}get status(){return this[KM]?.[0]??this[qI]().status}get ok(){let Y=this.status;return Y>=200&&Y<300}};["body","bodyUsed","redirected","statusText","trailers","type","url"].forEach(($)=>{Object.defineProperty(_I.prototype,$,{get(){return this[qI]()[$]}})});["arrayBuffer","blob","clone","formData","json","text"].forEach(($)=>{Object.defineProperty(_I.prototype,$,{value:function(){return this[qI]()[$]()}})});Object.defineProperty(_I.prototype,Symbol.for("nodejs.util.inspect.custom"),{value:function($,Y,X){let G={status:this.status,headers:this.headers,ok:this.ok,nativeResponse:this[Zu0]};return`Response (lightweight) ${X(G,{...Y,depth:$==null?null:$-1})}`}});Object.setPrototypeOf(_I,zu0);Object.setPrototypeOf(_I.prototype,zu0.prototype);async function fX9($){return Promise.race([$,Promise.resolve().then(()=>Promise.resolve(void 0))])}function Vz4($,Y,X){let G=(K)=>{$.cancel(K).catch(()=>{})};return Y.on("close",G),Y.on("error",G),(X??$.read()).then(W,J),$.closed.finally(()=>{Y.off("close",G),Y.off("error",G)});function J(K){if(K)Y.destroy(K)}function Q(){$.read().then(W,J)}function W({done:K,value:Z}){try{if(K)Y.end();else if(!Y.write(Z))Y.once("drain",Q);else return $.read().then(W,J)}catch(H){J(H)}}}function gX9($,Y){if($.locked)throw TypeError("ReadableStream is locked.");else if(Y.destroyed)return;return Vz4($.getReader(),Y)}var Uu0=($)=>{let Y={};if(!($ instanceof Headers))$=new Headers($??void 0);let X=[];for(let[G,J]of $)if(G==="set-cookie")X.push(J);else Y[G]=J;if(X.length>0)Y["set-cookie"]=X;return Y["content-type"]??="text/plain; charset=UTF-8",Y},mX9="x-hono-already-sent";if(typeof global.crypto>"u")global.crypto=uX9;var Vu0=Symbol("outgoingEnded"),Zz4=Symbol("incomingDraining"),pX9=500,dX9=67108864,Ku0=($)=>{let Y=$;if($.destroyed||Y[Zz4])return;if(Y[Zz4]=!0,$ instanceof Uz4){try{$.stream?.close?.(CX9.NGHTTP2_NO_ERROR)}catch{}return}let X=0,G=()=>{clearTimeout(Q),$.off("data",W),$.off("end",G),$.off("error",G)},J=()=>{G();let K=$.socket;if(K&&!K.destroyed)K.destroySoon()},Q=setTimeout(J,pX9);Q.unref?.();let W=(K)=>{if(X+=K.length,X>dX9)J()};$.on("data",W),$.on("end",G),$.on("error",G),$.resume()},cX9=()=>new Response(null,{status:400}),Fz4=($)=>new Response(null,{status:$ instanceof Error&&($.name==="TimeoutError"||$.constructor.name==="TimeoutError")?504:500}),Hu0=($,Y)=>{let X=$ instanceof Error?$:Error("unknown error",{cause:$});if(X.code==="ERR_STREAM_PREMATURE_CLOSE")console.info("The user aborted a request.");else{if(console.error($),!Y.headersSent)Y.writeHead(500,{"Content-Type":"text/plain"});Y.end(`Error: ${X.message}`),Y.destroy(X)}},Lz4=($)=>{if("flushHeaders"in $&&$.writable)$.flushHeaders()},Dz4=async($,Y)=>{let[X,G,J]=$[KM],Q=!1;if(!J)J={"content-type":"text/plain; charset=UTF-8"};else if(J instanceof Headers)Q=J.has("content-length"),J=Uu0(J);else if(Array.isArray(J)){let W=new Headers(J);Q=W.has("content-length"),J=Uu0(W)}else for(let W in J)if(W.length===14&&W.toLowerCase()==="content-length"){Q=!0;break}if(!Q){if(typeof G==="string")J["Content-Length"]=Buffer.byteLength(G);else if(G instanceof Uint8Array)J["Content-Length"]=G.byteLength;else if(G instanceof Blob)J["Content-Length"]=G.size}if(Y.writeHead(X,J),typeof G==="string"||G instanceof Uint8Array)Y.end(G);else if(G instanceof Blob)Y.end(new Uint8Array(await G.arrayBuffer()));else Lz4(Y),await gX9(G,Y)?.catch((W)=>Hu0(W,Y));Y[Vu0]?.()},lX9=($)=>typeof $.then==="function",iX9=async($,Y,X={})=>{if(lX9($))if(X.errorHandler)try{$=await $}catch(J){let Q=await X.errorHandler(J);if(!Q)return;$=Q}else $=await $.catch(Fz4);if(KM in $)return Dz4($,Y);let G=Uu0($.headers);if($.body){let J=$.body.getReader(),Q=[],W=!1,K=void 0;if(G["transfer-encoding"]!=="chunked"){let Z=2;for(let H=0;H<Z;H++){K||=J.read();let z=await fX9(K).catch((V)=>{console.error(V),W=!0});if(!z){if(H===1){await new Promise((V)=>setTimeout(V)),Z=3;continue}break}if(K=void 0,z.value)Q.push(z.value);if(z.done){W=!0;break}}if(W&&!("content-length"in G))G["content-length"]=Q.reduce((H,z)=>H+z.length,0)}if(Y.writeHead($.status,G),Q.forEach((Z)=>{Y.write(Z)}),W)Y.end();else{if(Q.length===0)Lz4(Y);await Vz4(J,Y,K)}}else if(G[mX9]);else Y.writeHead($.status,G),Y.end();Y[Vu0]?.()},Fu0=($,Y={})=>{let X=Y.autoCleanupIncoming??!0;if(Y.overrideGlobalObjects!==!1&&global.Request!==xu)Object.defineProperty(global,"Request",{value:xu}),Object.defineProperty(global,"Response",{value:_I});return async(G,J)=>{let Q,W;try{W=hX9(G,Y.hostname);let K=!X||G.method==="GET"||G.method==="HEAD";if(!K){if(G[Hz4]=!0,G.on("end",()=>{K=!0}),G instanceof Uz4)J[Vu0]=()=>{if(!K)setTimeout(()=>{if(!K)setTimeout(()=>{Ku0(G)})})};J.on("finish",()=>{if(!K)Ku0(G)})}if(J.on("close",()=>{if(W[PI]){if(G.errored)W[PI].abort(G.errored.toString());else if(!J.writableFinished)W[PI].abort("Client connection prematurely closed.")}if(!K)setTimeout(()=>{if(!K)setTimeout(()=>{Ku0(G)})})}),Q=$(W,{incoming:G,outgoing:J}),KM in Q)return Dz4(Q,J)}catch(K){if(!Q)if(Y.errorHandler){if(Q=await Y.errorHandler(W?K:SX9(K)),!Q)return}else if(!W)Q=cX9();else Q=Fz4(K);else return Hu0(K,J)}try{return await iX9(Q,J,Y)}catch(K){return Hu0(K,J)}}};BY();class Lu0{constructor($={}){this._started=!1,this._hasHandledRequest=!1,this._streamMapping=new Map,this._requestToStreamMapping=new Map,this._requestResponseMap=new Map,this._initialized=!1,this._enableJsonResponse=!1,this._standaloneSseStreamId="_GET_stream",this.sessionIdGenerator=$.sessionIdGenerator,this._enableJsonResponse=$.enableJsonResponse??!1,this._eventStore=$.eventStore,this._onsessioninitialized=$.onsessioninitialized,this._onsessionclosed=$.onsessionclosed,this._allowedHosts=$.allowedHosts,this._allowedOrigins=$.allowedOrigins,this._enableDnsRebindingProtection=$.enableDnsRebindingProtection??!1,this._retryInterval=$.retryInterval}async start(){if(this._started)throw Error("Transport already started");this._started=!0}createJsonErrorResponse($,Y,X,G){let J={code:Y,message:X};if(G?.data!==void 0)J.data=G.data;return new Response(JSON.stringify({jsonrpc:"2.0",error:J,id:null}),{status:$,headers:{"Content-Type":"application/json",...G?.headers}})}validateRequestHeaders($){if(!this._enableDnsRebindingProtection)return;if(this._allowedHosts&&this._allowedHosts.length>0){let Y=$.headers.get("host");if(!Y||!this._allowedHosts.includes(Y)){let X=`Invalid Host header: ${Y}`;return this.onerror?.(Error(X)),this.createJsonErrorResponse(403,-32000,X)}}if(this._allowedOrigins&&this._allowedOrigins.length>0){let Y=$.headers.get("origin");if(Y&&!this._allowedOrigins.includes(Y)){let X=`Invalid Origin header: ${Y}`;return this.onerror?.(Error(X)),this.createJsonErrorResponse(403,-32000,X)}}return}async handleRequest($,Y){if(!this.sessionIdGenerator&&this._hasHandledRequest)throw Error("Stateless transport cannot be reused across requests. Create a new transport per request.");this._hasHandledRequest=!0;let X=this.validateRequestHeaders($);if(X)return X;switch($.method){case"POST":return this.handlePostRequest($,Y);case"GET":return this.handleGetRequest($);case"DELETE":return this.handleDeleteRequest($);default:return this.handleUnsupportedRequest()}}async writePrimingEvent($,Y,X,G){if(!this._eventStore)return;if(G<"2025-11-25")return;let J=await this._eventStore.storeEvent(X,{}),Q=`id: ${J}
data: 

`;if(this._retryInterval!==void 0)Q=`id: ${J}
retry: ${this._retryInterval}
data: 

`;$.enqueue(Y.encode(Q))}async handleGetRequest($){if(!$.headers.get("accept")?.includes("text/event-stream"))return this.onerror?.(Error("Not Acceptable: Client must accept text/event-stream")),this.createJsonErrorResponse(406,-32000,"Not Acceptable: Client must accept text/event-stream");let X=this.validateSession($);if(X)return X;let G=this.validateProtocolVersion($);if(G)return G;if(this._eventStore){let Z=$.headers.get("last-event-id");if(Z)return this.replayEvents(Z)}if(this._streamMapping.get(this._standaloneSseStreamId)!==void 0)return this.onerror?.(Error("Conflict: Only one SSE stream is allowed per session")),this.createJsonErrorResponse(409,-32000,"Conflict: Only one SSE stream is allowed per session");let J=new TextEncoder,Q,W=new ReadableStream({start:(Z)=>{Q=Z},cancel:()=>{this._streamMapping.delete(this._standaloneSseStreamId)}}),K={"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive"};if(this.sessionId!==void 0)K["mcp-session-id"]=this.sessionId;return this._streamMapping.set(this._standaloneSseStreamId,{controller:Q,encoder:J,cleanup:()=>{this._streamMapping.delete(this._standaloneSseStreamId);try{Q.close()}catch{}}}),new Response(W,{headers:K})}async replayEvents($){if(!this._eventStore)return this.onerror?.(Error("Event store not configured")),this.createJsonErrorResponse(400,-32000,"Event store not configured");try{let Y;if(this._eventStore.getStreamIdForEventId){if(Y=await this._eventStore.getStreamIdForEventId($),!Y)return this.onerror?.(Error("Invalid event ID format")),this.createJsonErrorResponse(400,-32000,"Invalid event ID format");if(this._streamMapping.get(Y)!==void 0)return this.onerror?.(Error("Conflict: Stream already has an active connection")),this.createJsonErrorResponse(409,-32000,"Conflict: Stream already has an active connection")}let X={"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive"};if(this.sessionId!==void 0)X["mcp-session-id"]=this.sessionId;let G=new TextEncoder,J,Q=new ReadableStream({start:(K)=>{J=K},cancel:()=>{}}),W=await this._eventStore.replayEventsAfter($,{send:async(K,Z)=>{if(!this.writeSSEEvent(J,G,Z,K)){this.onerror?.(Error("Failed replay events"));try{J.close()}catch{}}}});return this._streamMapping.set(W,{controller:J,encoder:G,cleanup:()=>{this._streamMapping.delete(W);try{J.close()}catch{}}}),new Response(Q,{headers:X})}catch(Y){return this.onerror?.(Y),this.createJsonErrorResponse(500,-32000,"Error replaying events")}}writeSSEEvent($,Y,X,G){try{let J=`event: message
`;if(G)J+=`id: ${G}
`;return J+=`data: ${JSON.stringify(X)}

`,$.enqueue(Y.encode(J)),!0}catch(J){return this.onerror?.(J),!1}}handleUnsupportedRequest(){return this.onerror?.(Error("Method not allowed.")),new Response(JSON.stringify({jsonrpc:"2.0",error:{code:-32000,message:"Method not allowed."},id:null}),{status:405,headers:{Allow:"GET, POST, DELETE","Content-Type":"application/json"}})}async handlePostRequest($,Y){try{let X=$.headers.get("accept");if(!X?.includes("application/json")||!X.includes("text/event-stream"))return this.onerror?.(Error("Not Acceptable: Client must accept both application/json and text/event-stream")),this.createJsonErrorResponse(406,-32000,"Not Acceptable: Client must accept both application/json and text/event-stream");let G=$.headers.get("content-type");if(!G||!G.includes("application/json"))return this.onerror?.(Error("Unsupported Media Type: Content-Type must be application/json")),this.createJsonErrorResponse(415,-32000,"Unsupported Media Type: Content-Type must be application/json");let J={headers:Object.fromEntries($.headers.entries()),url:new URL($.url)},Q;if(Y?.parsedBody!==void 0)Q=Y.parsedBody;else try{Q=await $.json()}catch{return this.onerror?.(Error("Parse error: Invalid JSON")),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON")}let W;try{if(Array.isArray(Q))W=Q.map((A)=>C7.parse(A));else W=[C7.parse(Q)]}catch{return this.onerror?.(Error("Parse error: Invalid JSON-RPC message")),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON-RPC message")}let K=W.some(iT);if(K){if(this._initialized&&this.sessionId!==void 0)return this.onerror?.(Error("Invalid Request: Server already initialized")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Server already initialized");if(W.length>1)return this.onerror?.(Error("Invalid Request: Only one initialization request is allowed")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Only one initialization request is allowed");if(this.sessionId=this.sessionIdGenerator?.(),this._initialized=!0,this.sessionId&&this._onsessioninitialized)await Promise.resolve(this._onsessioninitialized(this.sessionId))}if(!K){let A=this.validateSession($);if(A)return A;let B=this.validateProtocolVersion($);if(B)return B}if(!W.some(DJ)){for(let A of W)this.onmessage?.(A,{authInfo:Y?.authInfo,requestInfo:J});return new Response(null,{status:202})}let H=crypto.randomUUID(),z=W.find((A)=>iT(A)),V=z?z.params.protocolVersion:$.headers.get("mcp-protocol-version")??zu;if(this._enableJsonResponse)return new Promise((A)=>{this._streamMapping.set(H,{resolveJson:A,cleanup:()=>{this._streamMapping.delete(H)}});for(let B of W)if(DJ(B))this._requestToStreamMapping.set(B.id,H);for(let B of W)this.onmessage?.(B,{authInfo:Y?.authInfo,requestInfo:J})});let F=new TextEncoder,L,N=new ReadableStream({start:(A)=>{L=A},cancel:()=>{this._streamMapping.delete(H)}}),D={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"};if(this.sessionId!==void 0)D["mcp-session-id"]=this.sessionId;for(let A of W)if(DJ(A))this._streamMapping.set(H,{controller:L,encoder:F,cleanup:()=>{this._streamMapping.delete(H);try{L.close()}catch{}}}),this._requestToStreamMapping.set(A.id,H);await this.writePrimingEvent(L,F,H,V);for(let A of W){let B,O;if(DJ(A)&&this._eventStore&&V>="2025-11-25")B=()=>{this.closeSSEStream(A.id)},O=()=>{this.closeStandaloneSSEStream()};this.onmessage?.(A,{authInfo:Y?.authInfo,requestInfo:J,closeSSEStream:B,closeStandaloneSSEStream:O})}return new Response(N,{status:200,headers:D})}catch(X){return this.onerror?.(X),this.createJsonErrorResponse(400,-32700,"Parse error",{data:String(X)})}}async handleDeleteRequest($){let Y=this.validateSession($);if(Y)return Y;let X=this.validateProtocolVersion($);if(X)return X;return await Promise.resolve(this._onsessionclosed?.(this.sessionId)),await this.close(),new Response(null,{status:200})}validateSession($){if(this.sessionIdGenerator===void 0)return;if(!this._initialized)return this.onerror?.(Error("Bad Request: Server not initialized")),this.createJsonErrorResponse(400,-32000,"Bad Request: Server not initialized");let Y=$.headers.get("mcp-session-id");if(!Y)return this.onerror?.(Error("Bad Request: Mcp-Session-Id header is required")),this.createJsonErrorResponse(400,-32000,"Bad Request: Mcp-Session-Id header is required");if(Y!==this.sessionId)return this.onerror?.(Error("Session not found")),this.createJsonErrorResponse(404,-32001,"Session not found");return}validateProtocolVersion($){let Y=$.headers.get("mcp-protocol-version");if(Y!==null&&!$K.includes(Y))return this.onerror?.(Error(`Bad Request: Unsupported protocol version: ${Y} (supported versions: ${$K.join(", ")})`)),this.createJsonErrorResponse(400,-32000,`Bad Request: Unsupported protocol version: ${Y} (supported versions: ${$K.join(", ")})`);return}async close(){this._streamMapping.forEach(({cleanup:$})=>{$()}),this._streamMapping.clear(),this._requestResponseMap.clear(),this.onclose?.()}closeSSEStream($){let Y=this._requestToStreamMapping.get($);if(!Y)return;let X=this._streamMapping.get(Y);if(X)X.cleanup()}closeStandaloneSSEStream(){let $=this._streamMapping.get(this._standaloneSseStreamId);if($)$.cleanup()}async send($,Y){let X=Y?.relatedRequestId;if(CX($)||XK($))X=$.id;if(X===void 0){if(CX($)||XK($))throw Error("Cannot send a response on a standalone SSE stream unless resuming a previous client request");let Q;if(this._eventStore)Q=await this._eventStore.storeEvent(this._standaloneSseStreamId,$);let W=this._streamMapping.get(this._standaloneSseStreamId);if(W===void 0)return;if(W.controller&&W.encoder)this.writeSSEEvent(W.controller,W.encoder,$,Q);return}let G=this._requestToStreamMapping.get(X);if(!G)throw Error(`No connection established for request ID: ${String(X)}`);let J=this._streamMapping.get(G);if(!this._enableJsonResponse&&J?.controller&&J?.encoder){let Q;if(this._eventStore)Q=await this._eventStore.storeEvent(G,$);this.writeSSEEvent(J.controller,J.encoder,$,Q)}if(CX($)||XK($)){this._requestResponseMap.set(X,$);let Q=Array.from(this._requestToStreamMapping.entries()).filter(([K,Z])=>Z===G).map(([K])=>K);if(Q.every((K)=>this._requestResponseMap.has(K))){if(!J)throw Error(`No connection established for request ID: ${String(X)}`);if(this._enableJsonResponse&&J.resolveJson){let K={"Content-Type":"application/json"};if(this.sessionId!==void 0)K["mcp-session-id"]=this.sessionId;let Z=Q.map((H)=>this._requestResponseMap.get(H));if(Z.length===1)J.resolveJson(new Response(JSON.stringify(Z[0]),{status:200,headers:K}));else J.resolveJson(new Response(JSON.stringify(Z),{status:200,headers:K}))}else J.cleanup();for(let K of Q)this._requestResponseMap.delete(K),this._requestToStreamMapping.delete(K)}}}}class T70{constructor($={}){this._requestContext=new WeakMap,this._webStandardTransport=new Lu0($),this._requestListener=Fu0(async(Y)=>{let X=this._requestContext.get(Y);return this._webStandardTransport.handleRequest(Y,{authInfo:X?.authInfo,parsedBody:X?.parsedBody})},{overrideGlobalObjects:!1})}get sessionId(){return this._webStandardTransport.sessionId}set onclose($){this._webStandardTransport.onclose=$}get onclose(){return this._webStandardTransport.onclose}set onerror($){this._webStandardTransport.onerror=$}get onerror(){return this._webStandardTransport.onerror}set onmessage($){this._webStandardTransport.onmessage=$}get onmessage(){return this._webStandardTransport.onmessage}async start(){return this._webStandardTransport.start()}async close(){return this._webStandardTransport.close()}async send($,Y){return this._webStandardTransport.send($,Y)}async handleRequest($,Y,X){let G=$.auth;await Fu0(async(Q)=>{return this._webStandardTransport.handleRequest(Q,{authInfo:G,parsedBody:X})},{overrideGlobalObjects:!1})($,Y)}closeSSEStream($){this._webStandardTransport.closeSSEStream($)}closeStandaloneSSEStream(){this._webStandardTransport.closeStandaloneSSEStream()}}var bu="mastra",Ez4="strict";function I70($,Y){if(Y==null)return $;let X=$?.[bu]&&typeof $[bu]==="object"?$[bu]:void 0;return{...$??{},[bu]:{...X??{},[Ez4]:Y}}}function oX9($){let Y=$?.[bu];if(!Y||typeof Y!=="object")return;let X=Y[Ez4];return typeof X==="boolean"?X:void 0}var tX9=class{client;logger;constructor({client:$,logger:Y}){this.client=$,this.logger=Y}onRequest($){this.client.setElicitationRequestHandler($)}},eX9=class{client;logger;constructor({client:$,logger:Y}){this.client=$,this.logger=Y}onUpdate($){this.client.setProgressNotificationHandler($)}},$G9=class{client;logger;constructor({client:$,logger:Y}){this.client=$,this.logger=Y}async list(){try{let $=await this.client.listPrompts();if($&&$.prompts&&Array.isArray($.prompts))return $.prompts.map((Y)=>({...Y}));else return this.logger.warn("Prompts response did not have expected structure",{server:this.client.name,response:$}),[]}catch($){if($.code===j1.MethodNotFound)return[];throw this.logger.error("Error getting prompts from server",{server:this.client.name,error:$ instanceof Error?$.message:String($)}),Error(`Failed to fetch prompts from server ${this.client.name}: ${$ instanceof Error?$.stack||$.message:String($)}`)}}async get({name:$,args:Y}){return this.client.getPrompt({name:$,args:Y})}async onListChanged($){this.client.setPromptListChangedNotificationHandler($)}},YG9=class{client;logger;constructor({client:$,logger:Y}){this.client=$,this.logger=Y}async list(){try{let $=await this.client.listResources();if($&&$.resources&&Array.isArray($.resources))return $.resources;else return this.logger.warn("Resources response did not have expected structure",{server:this.client.name,response:$}),[]}catch($){if($.code===j1.MethodNotFound)return[];throw this.logger.error("Error getting resources from server",{server:this.client.name,error:$ instanceof Error?$.message:String($)}),Error(`Failed to fetch resources from server ${this.client.name}: ${$ instanceof Error?$.stack||$.message:String($)}`)}}async templates(){try{let $=await this.client.listResourceTemplates();if($&&$.resourceTemplates&&Array.isArray($.resourceTemplates))return $.resourceTemplates;else return this.logger.warn("Resource templates response did not have expected structure",{server:this.client.name,response:$}),[]}catch($){if($.code===j1.MethodNotFound)return[];throw this.logger.error("Error getting resource templates from server",{server:this.client.name,error:$ instanceof Error?$.message:String($)}),Error(`Failed to fetch resource templates from server ${this.client.name}: ${$ instanceof Error?$.stack||$.message:String($)}`)}}async read($){return this.client.readResource($)}async subscribe($){return this.client.subscribeResource($)}async unsubscribe($){return this.client.unsubscribeResource($)}async onUpdated($){this.client.setResourceUpdatedNotificationHandler($)}async onListChanged($){this.client.setResourceListChangedNotificationHandler($)}};function Mz4($){if(!($ instanceof Error))return!1;let Y=$.message.toLowerCase();return Y.includes("no valid session")||Y.includes("session")||Y.includes("server not initialized")||Y.includes("not connected")||Y.includes("http 400")||Y.includes("http 401")||Y.includes("http 403")||Y.includes("http 404")||Y.includes("econnrefused")||Y.includes("fetch failed")||Y.includes("connection refused")||Y.includes("connection closed")||Y.includes("sse stream disconnected")||Y.includes("typeerror: terminated")}var XG9=3000,Nu0=rX9(import.meta.url),GG9=[400,404,405],Rz4=Symbol.for("mastra.mcp.dd-trace-test-tracer");function JG9($){return($?.method??"GET").toUpperCase()==="GET"}function QG9(){let Y=globalThis[Rz4]??WG9();if(typeof Y?.scope==="function")return Y.scope();if(typeof Y?.default?.scope==="function")return Y.default.scope();return null}function WG9(){if(!KG9())return null;try{return Nu0("dd-trace")}catch{return null}}function KG9(){if(globalThis[Rz4])return!0;if(process.execArgv.some(($)=>$.includes("dd-trace")))return!0;if(process.env.NODE_OPTIONS?.includes("dd-trace"))return!0;try{let $=Nu0.resolve("dd-trace");return Boolean(Nu0.cache[$])}catch{return!1}}function ZG9($){let Y=QG9();if(!Y)return $();return Y.activate(null,$)}function UG9($){switch($){case"debug":return"debug";case"info":case"notice":return"info";case"warning":return"warn";case"error":case"critical":case"alert":case"emergency":return"error";default:return"info"}}var HG9=class extends u8{name;client;timeout;logHandler;enableServerLogs;enableProgressTracking;serverConfig;transport;operationContextStore=new nX9;exitHookUnsubscribe;sigTermHandler;sigHupHandler;_roots;requireToolApproval;resources;prompts;elicitation;progress;constructor({name:$,version:Y="1.0.0",server:X,capabilities:G={},timeout:J=U70}){super({name:"MastraMCPClient"});this.name=$,this.timeout=J,this.logHandler=X.logger,this.enableServerLogs=X.enableServerLogs??!0,this.serverConfig=X,this.enableProgressTracking=!!X.enableProgressTracking,this.requireToolApproval=X.requireToolApproval,this._roots=X.roots??[];let Q=this._roots.length>0||!!G.roots,W={...G,elicitation:{...G.elicitation??{}},...Q?{roots:{listChanged:!0,...G.roots??{}}}:{},extensions:{...G.extensions??{},"io.modelcontextprotocol/ui":{}}};if(this.client=new Bm0({name:$,version:Y},{capabilities:W,...X.jsonSchemaValidator?{jsonSchemaValidator:X.jsonSchemaValidator}:{}}),this.setupLogging(),Q)this.setupRootsHandler();this.resources=new YG9({client:this,logger:this.logger}),this.prompts=new $G9({client:this,logger:this.logger}),this.elicitation=new tX9({client:this,logger:this.logger}),this.progress=new eX9({client:this,logger:this.logger})}log($,Y,X){let G=UG9($),J=`[${this.name}] ${Y}`;if(this.logger[G](J,X),this.logHandler)this.logHandler({level:$,message:J,timestamp:new Date,serverName:this.name,details:X,requestContext:this.operationContextStore.getStore()??null})}setupLogging(){if(this.enableServerLogs)this.client.setNotificationHandler(o$0,($)=>{let{level:Y,...X}=$.params;this.log(Y,"[MCP SERVER LOG]",X)})}setupRootsHandler(){this.log("debug","Setting up roots/list request handler"),this.client.setRequestHandler($70,async()=>{return this.log("debug",`Responding to roots/list request with ${this._roots.length} roots`),{roots:this._roots}})}get roots(){return[...this._roots]}async setRoots($){this.log("debug",`Updating roots to ${$.length} entries`),this._roots=[...$],await this.sendRootsListChanged()}async sendRootsListChanged(){if(!this.transport){this.log("debug","Cannot send roots/list_changed: not connected");return}this.log("debug","Sending notifications/roots/list_changed"),await this.client.notification({method:"notifications/roots/list_changed"})}async connectStdio($){this.log("debug",`Using Stdio transport for command: ${$}`);try{this.transport=new O70({command:$,args:this.serverConfig.args,env:{...rm0(),...this.serverConfig.env||{}},stderr:this.serverConfig.stderr,cwd:this.serverConfig.cwd}),await this.client.connect(this.transport,{timeout:this.serverConfig.timeout??this.timeout}),this.log("debug","Successfully connected to MCP server via Stdio")}catch(Y){throw this.log("error",Y instanceof Error?Y.stack||Y.message:JSON.stringify(Y)),Y}}async connectHttp($){let{requestInit:Y,eventSourceInit:X,authProvider:G,connectTimeout:J,fetch:Q}=this.serverConfig,W=(Z,H)=>{let z=this.operationContextStore.getStore()??null,V=()=>Q?Q(Z,H,z):globalThis.fetch(Z,H);return JG9(H)?ZG9(V):V()};this.log("debug",`Attempting to connect to URL: ${$}`);let K=$.pathname.endsWith("/sse");if(!K)try{this.log("debug","Trying Streamable HTTP transport...");let Z=new E70($,{requestInit:Y,reconnectionOptions:this.serverConfig.reconnectionOptions,authProvider:G,fetch:W});await this.client.connect(Z,{timeout:J??XG9}),this.transport=Z,this.log("debug","Successfully connected using Streamable HTTP transport.")}catch(Z){this.log("debug",`Streamable HTTP transport failed: ${Z}`);let H=Z?.code;if(H!==void 0&&!GG9.includes(H))throw Z;K=!0}if(K){this.log("debug","Falling back to deprecated HTTP+SSE transport...");try{let Z={...X,fetch:W},H=new hm0($,{requestInit:Y,eventSourceInit:Z,authProvider:G,fetch:W});await this.client.connect(H,{timeout:this.serverConfig.timeout??this.timeout}),this.transport=H,this.log("debug","Successfully connected using deprecated HTTP+SSE transport.")}catch(Z){throw this.log("error",`Failed to connect with SSE transport after failing to connect to Streamable HTTP transport first. SSE error: ${Z}`),Error("Could not connect to server with any available HTTP transport")}}}isConnected=null;async connect(){if(this.isConnected)return this.isConnected;if(this.isConnected=new Promise(async($,Y)=>{try{let{command:X,url:G}=this.serverConfig;if(X)await this.connectStdio(X);else if(G)await this.connectHttp(G);else throw Error("Server configuration must include either a command or a url.");$(!0);let J=this.client.onclose;this.client.onclose=()=>{if(this.log("debug","MCP server connection closed"),this.isConnected=null,typeof J==="function")J()}}catch(X){this.isConnected=null,Y(X)}}),!this.exitHookUnsubscribe)this.exitHookUnsubscribe=AH4(async()=>{this.log("debug","Disconnecting MCP server during exit"),await this.disconnect()},{wait:5000});if(!this.sigTermHandler)this.sigTermHandler=()=>sm0(),process.on("SIGTERM",this.sigTermHandler);if(!this.sigHupHandler)this.sigHupHandler=()=>sm0(),process.on("SIGHUP",this.sigHupHandler);return this.log("debug","Successfully connected to MCP server"),this.isConnected}get sessionId(){if(this.transport instanceof E70)return this.transport.sessionId;return}get stderr(){if(this.transport instanceof O70)return this.transport.stderr;return null}async disconnect(){if(!this.transport){this.log("debug","Disconnect called but no transport was connected.");return}this.log("debug","Disconnecting from MCP server");try{await this.transport.close(),this.log("debug","Successfully disconnected from MCP server")}catch($){throw this.log("error","Error during MCP server disconnect",{error:$ instanceof Error?$.stack:JSON.stringify($,null,2)}),$}finally{if(this.transport=void 0,this.isConnected=null,this.exitHookUnsubscribe)this.exitHookUnsubscribe(),this.exitHookUnsubscribe=void 0;if(this.sigTermHandler)process.off("SIGTERM",this.sigTermHandler),this.sigTermHandler=void 0;if(this.sigHupHandler)process.off("SIGHUP",this.sigHupHandler),this.sigHupHandler=void 0}}async forceReconnect(){this.log("debug","Forcing reconnection to MCP server...");try{if(this.transport)await this.transport.close()}catch($){this.log("debug","Error during force disconnect (ignored)",{error:$ instanceof Error?$.message:String($)})}this.transport=void 0,this.isConnected=null,await this.connect(),this.log("debug","Successfully reconnected to MCP server")}async listResources(){return this.log("debug","Requesting resources from MCP server"),await this.client.request({method:"resources/list"},kD,{timeout:this.timeout})}async readResource($){return this.log("debug",`Reading resource from MCP server: ${$}`),await this.client.request({method:"resources/read",params:{uri:$}},vD,{timeout:this.timeout})}async subscribeResource($){return this.log("debug",`Subscribing to resource on MCP server: ${$}`),await this.client.request({method:"resources/subscribe",params:{uri:$}},NJ,{timeout:this.timeout})}async unsubscribeResource($){return this.log("debug",`Unsubscribing from resource on MCP server: ${$}`),await this.client.request({method:"resources/unsubscribe",params:{uri:$}},NJ,{timeout:this.timeout})}async listResourceTemplates(){return this.log("debug","Requesting resource templates from MCP server"),await this.client.request({method:"resources/templates/list"},tT,{timeout:this.timeout})}async listPrompts(){return this.log("debug","Requesting prompts from MCP server"),await this.client.request({method:"prompts/list"},$I,{timeout:this.timeout})}async getPrompt({name:$,args:Y}){return this.log("debug",`Requesting prompt from MCP server: ${$}`),await this.client.request({method:"prompts/get",params:{name:$,arguments:Y}},YI,{timeout:this.timeout})}setPromptListChangedNotificationHandler($){this.log("debug","Setting prompt list changed notification handler"),this.client.setNotificationHandler(XI,()=>{$()})}setResourceUpdatedNotificationHandler($){this.log("debug","Setting resource updated notification handler"),this.client.setNotificationHandler(p$0,(Y)=>{$(Y.params)})}setResourceListChangedNotificationHandler($){this.log("debug","Setting resource list changed notification handler"),this.client.setNotificationHandler(eT,()=>{$()})}setElicitationRequestHandler($){this.log("debug","Setting elicitation request handler"),this.client.setRequestHandler(QI,async(Y)=>{return this.log("debug",`Received elicitation request: ${Y.params.message}`),$(Y.params)})}setProgressNotificationHandler($){this.log("debug","Setting progress notification handler"),this.client.setNotificationHandler(iE,(Y)=>{$(Y.params)})}async convertInputSchema($){return"jsonSchema"in $?$.jsonSchema:$}async tools(){this.log("debug","Requesting tools from MCP server");let{tools:$}=await this.client.listTools({},{timeout:this.timeout}),Y={};for(let X of $){this.log("debug",`Processing tool: ${X.name}`);try{let G,J;if(typeof this.requireToolApproval==="function"){let Z=this.requireToolApproval,H=X.name;G=!0,J=(z,V={})=>{return Z({toolName:H,args:z,...V})}}else if(this.requireToolApproval===!0)G=!0;let Q=X._meta,W=Q?this.stampServerIdInMeta(Q):void 0,K=X8({id:`${this.name}_${X.name}`,description:X.description||"",inputSchema:await this.convertInputSchema(X.inputSchema),strict:oX9(W),...W?{mcp:{_meta:W}}:{},requireApproval:G,mcpMetadata:{serverName:this.name,serverVersion:this.client.getServerVersion()?.version},execute:async(Z,H)=>{let z=H?.requestContext??null;return this.operationContextStore.run(z,async()=>{let V=async()=>{this.log("debug",`Executing tool: ${X.name}`,{toolArgs:Z,runId:H?.runId});let F=H?._meta,L=this.enableProgressTracking?{progressToken:H?.runId||crypto.randomUUID()}:void 0,N=F||L?{...F,...L}:void 0,D=await this.client.callTool({name:X.name,arguments:Z,...N?{_meta:N}:{}},AJ,{timeout:this.timeout,signal:H?.abortSignal});if(this.log("debug",`Tool executed successfully: ${X.name}`),D.structuredContent!==void 0)return D.structuredContent;return D};try{return await V()}catch(F){if(Mz4(F)){this.log("debug",`Session error detected for tool ${X.name}, attempting reconnection...`,{error:F instanceof Error?F.message:String(F)});try{return await this.forceReconnect(),this.log("debug",`Retrying tool ${X.name} after reconnection...`),await V()}catch(L){throw this.log("error",`Reconnection or retry failed for tool ${X.name}`,{originalError:F instanceof Error?F.message:String(F),reconnectError:L instanceof Error?L.stack:String(L),toolArgs:Z}),F}}throw this.log("error",`Error calling tool: ${X.name}`,{error:F instanceof Error?F.stack:JSON.stringify(F,null,2),toolArgs:Z}),F}})}});if(J)K.needsApprovalFn=J;if(X.name)Y[X.name]=K}catch(G){this.log("error",`Failed to create Mastra tool wrapper for MCP tool: ${X.name}`,{error:G instanceof Error?G.stack:String(G),mcpToolDefinition:X})}}return Y}stampServerIdInMeta($){let Y=$.ui;if(!Y?.resourceUri)return $;return{...$,ui:{...Y,serverId:this.name}}}},zG9=class extends om0{clientGetter;cachedClient=null;_cachedToolList=null;constructor($,Y){let X={name:$.name,version:$.version??"1.0.0",id:$.id,description:$.description,tools:{}};super(X);this.clientGetter=Y}async getClient(){if(!this.cachedClient)this.cachedClient=await this.clientGetter();return this.cachedClient}convertSchema($){if(z5($))return $6($);return $?.jsonSchema||$}async fetchToolList(){if(this._cachedToolList)return this._cachedToolList;let Y=await(await this.getClient()).tools();return this._cachedToolList={tools:Object.entries(Y).map(([X,G])=>({id:X,name:G.id||X,description:G.description,inputSchema:this.convertSchema(G.inputSchema),outputSchema:this.convertSchema(G.outputSchema),toolType:G.mcp?.toolType,_meta:G.mcp?._meta}))},this.convertedTools=Y,this._cachedToolList}convertTools($,Y,X){return{}}getToolListInfo(){if(this._cachedToolList)return this._cachedToolList;return this.fetchToolList()}getToolInfo($){if(this._cachedToolList)return this._cachedToolList.tools.find((Y)=>Y.id===$||Y.name===$);return this.fetchToolList().then((Y)=>Y.tools.find((X)=>X.id===$||X.name===$))}async executeTool($,Y,X){let Q=(await(await this.getClient()).tools())[$];if(!Q)throw Error(`Tool '${$}' not found on remote MCP server '${this.name}'`);if(!Q.execute)throw Error(`Tool '${$}' on remote MCP server '${this.name}' has no execute method`);return Q.execute(Y,X)}async listResources(){return{resources:(await(await this.getClient()).resources.list()).map((X)=>({uri:X.uri,name:X.name??X.uri,description:X.description,mimeType:X.mimeType,_meta:X._meta}))}}async readResource($){return{contents:((await(await this.getClient()).resources.read($)).contents??[]).map((G)=>({uri:G.uri??$,...G.text!==void 0?{text:G.text}:{},...G.blob!==void 0?{blob:G.blob}:{}}))}}async startStdio(){throw Error("MCPClientServerProxy does not support stdio transport")}async startSSE($){throw Error("MCPClientServerProxy does not support SSE transport")}async startHonoSSE($){throw Error("MCPClientServerProxy does not support Hono SSE transport")}async startHTTP($){throw Error("MCPClientServerProxy does not support HTTP transport")}async close(){this.cachedClient=null}getServerInfo(){return{id:this.id,name:this.name,description:this.description,version_detail:{version:this.version,release_date:this.releaseDate,is_latest:this.isLatest}}}getServerDetail(){return{...this.getServerInfo(),packages:this.packages??[],remotes:this.remotes??[]}}},mD=new Map,Du0=2,qz4=class extends u8{serverConfigs={};id;defaultTimeout;mcpClientsById=new Map;disconnectPromise=null;constructor($){super({name:"MCPClient"});if(this.defaultTimeout=$.timeout??U70,this.serverConfigs=$.servers,this.id=$.id??this.makeId(),$.id){this.id=$.id;let X=mD.get(this.id);if(X&&!Oz4.default(X.serverConfigs,$.servers)){let G=mD.get(this.id);if(G)G.disconnect(),mD.delete(this.id)}}else this.id=this.makeId();let Y=mD.get(this.id);if(Y){if(!$.id)throw Error(`MCPClient was initialized multiple times with the same configuration options.

This error is intended to prevent memory leaks.

To fix this you have three different options:
1. If you need multiple MCPClient class instances with identical server configurations, set an id when configuring: new MCPClient({ id: "my-unique-id" })
2. Call "await client.disconnect()" after you're done using the client and before you recreate another instance with the same options. If the identical MCPClient instance is already closed at the time of re-creating it, you will not see this error.
3. If you only need one instance of MCPClient in your app, refactor your code so it's only created one time (ex. move it out of a loop into a higher scope code block)
`);return Y}return mD.set(this.id,this),this.addToInstanceCache(),this}get progress(){return this.addToInstanceCache(),{onUpdate:async($,Y)=>{try{return(await this.getConnectedClientForServer($)).progress.onUpdate(Y)}catch(X){throw new G0({id:"MCP_CLIENT_ON_UPDATE_PROGRESS_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:$}},X)}}}}get elicitation(){return this.addToInstanceCache(),{onRequest:async($,Y)=>{try{return(await this.getConnectedClientForServer($)).elicitation.onRequest(Y)}catch(X){throw new G0({id:"MCP_CLIENT_ON_REQUEST_ELICITATION_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:$}},X)}}}}get resources(){return this.addToInstanceCache(),{list:async()=>{let $={};for(let Y of Object.keys(this.serverConfigs))try{let X=await this.getConnectedClientForServer(Y);$[Y]=await X.resources.list()}catch(X){let G=new G0({id:"MCP_CLIENT_LIST_RESOURCES_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:Y}},X);this.logger.trackException(G),this.logger.error("Failed to list resources from server:",{error:G.toString()})}return $},templates:async()=>{let $={};for(let Y of Object.keys(this.serverConfigs))try{let X=await this.getConnectedClientForServer(Y);$[Y]=await X.resources.templates()}catch(X){let G=new G0({id:"MCP_CLIENT_LIST_RESOURCE_TEMPLATES_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:Y}},X);this.logger.trackException(G),this.logger.error("Failed to list resource templates from server:",{error:G.toString()})}return $},read:async($,Y)=>{try{return(await this.getConnectedClientForServer($)).resources.read(Y)}catch(X){throw new G0({id:"MCP_CLIENT_READ_RESOURCE_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:$,uri:Y}},X)}},subscribe:async($,Y)=>{try{return(await this.getConnectedClientForServer($)).resources.subscribe(Y)}catch(X){throw new G0({id:"MCP_CLIENT_SUBSCRIBE_RESOURCE_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:$,uri:Y}},X)}},unsubscribe:async($,Y)=>{try{return(await this.getConnectedClientForServer($)).resources.unsubscribe(Y)}catch(X){throw new G0({id:"MCP_CLIENT_UNSUBSCRIBE_RESOURCE_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:$,uri:Y}},X)}},onUpdated:async($,Y)=>{try{return(await this.getConnectedClientForServer($)).resources.onUpdated(Y)}catch(X){throw new G0({id:"MCP_CLIENT_ON_UPDATED_RESOURCE_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:$}},X)}},onListChanged:async($,Y)=>{try{return(await this.getConnectedClientForServer($)).resources.onListChanged(Y)}catch(X){throw new G0({id:"MCP_CLIENT_ON_LIST_CHANGED_RESOURCE_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:$}},X)}}}}get prompts(){return this.addToInstanceCache(),{list:async()=>{let $={};for(let Y of Object.keys(this.serverConfigs))try{let X=await this.getConnectedClientForServer(Y);$[Y]=await X.prompts.list()}catch(X){let G=new G0({id:"MCP_CLIENT_LIST_PROMPTS_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:Y}},X);this.logger.trackException(G),this.logger.error("Failed to list prompts from server:",{error:G.toString()})}return $},get:async({serverName:$,name:Y,args:X})=>{try{return(await this.getConnectedClientForServer($)).prompts.get({name:Y,args:X})}catch(G){throw new G0({id:"MCP_CLIENT_GET_PROMPT_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:$,name:Y}},G)}},onListChanged:async($,Y)=>{try{return(await this.getConnectedClientForServer($)).prompts.onListChanged(Y)}catch(X){throw new G0({id:"MCP_CLIENT_ON_LIST_CHANGED_PROMPT_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:$}},X)}}}}addToInstanceCache(){if(!mD.has(this.id))mD.set(this.id,this)}makeId(){let $=JSON.stringify(this.serverConfigs).normalize("NFKC");return aX9("sha256").update("MCPClient").update($).digest("hex")}async disconnect(){if(this.disconnectPromise)return this.disconnectPromise;return this.disconnectPromise=(async()=>{try{mD.delete(this.id),await Promise.allSettled(Array.from(this.mcpClientsById.values()).map(($)=>$.disconnect())),this.mcpClientsById.clear()}finally{this.disconnectPromise=null}})(),this.disconnectPromise}async reconnectServer($){let Y=this.mcpClientsById.get($);if(Y)await Y.forceReconnect();else await this.getConnectedClientForServer($)}async listTools(){this.addToInstanceCache();let $={};for(let Y of Object.keys(this.serverConfigs))try{let X=await this.getToolsForServer(Y);for(let[G,J]of Object.entries(X))$[`${Y}_${G}`]=J}catch(X){let G=new G0({id:"MCP_CLIENT_GET_TOOLS_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:Y}},X);this.logger.trackException(G),this.logger.error("Failed to list tools from server:",{error:G.toString()})}return $}async listToolsets(){return(await this.listToolsetsWithErrors()).toolsets}async listToolsetsWithErrors(){this.addToInstanceCache();let $={},Y={};for(let X of Object.keys(this.serverConfigs))try{let G=await this.getToolsForServer(X);if(G)$[X]=G}catch(G){let J=new G0({id:"MCP_CLIENT_GET_TOOLSETS_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,details:{serverName:X}},G);this.logger.trackException(J),this.logger.error("Failed to list toolsets from server:",{error:J.toString()}),Y[X]=G instanceof Error?G.message:String(G)}return{toolsets:$,errors:Y}}toMCPServerProxies(){let $={};for(let Y of Object.keys(this.serverConfigs))$[Y]=new zG9({name:Y,id:Y},()=>this.getConnectedClientForServer(Y));return $}get sessionIds(){let $={};for(let[Y,X]of this.mcpClientsById.entries())if(X.sessionId)$[Y]=X.sessionId;return $}getServerStderr($){let Y=this.mcpClientsById.get($);if(!Y)return null;return Y.stderr}async getConnectedClient($,Y){if(this.disconnectPromise)await this.disconnectPromise;let X=this.mcpClientsById.has($),G=this.mcpClientsById.get($);if(this.logger.debug("Checking connected client",{name:$,exists:X}),X){if(!G)throw Error(`Client ${$} exists but is undefined`);return await G.connect(),G}this.logger.debug("Connecting to MCP server",{name:$});let J=new HG9({name:$,server:Y,timeout:Y.timeout??this.defaultTimeout,capabilities:Y.capabilities});J.__setLogger(this.logger),this.mcpClientsById.set($,J);try{await J.connect()}catch(Q){let W=new G0({id:"MCP_CLIENT_CONNECT_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,text:`Failed to connect to MCP server ${$}: ${Q instanceof Error?Q.stack||Q.message:String(Q)}`,details:{name:$}},Q);throw this.logger.trackException(W),this.logger.error("MCPClient errored connecting to MCP server:",{error:W.toString()}),this.mcpClientsById.delete($),W}return this.logger.debug("Connected to MCP server",{name:$}),J}async getConnectedClientForServer($){let Y=this.serverConfigs[$];if(!Y)throw Error(`Server configuration not found for name: ${$}`);return this.getConnectedClient($,Y)}async getToolsForServer($){for(let Y=1;Y<=Du0;Y++)try{return await(await this.getConnectedClientForServer($)).tools()}catch(X){if(Y===Du0||!Mz4(X))throw X;this.logger.debug("Retrying MCP tool discovery after reconnect",{serverName:$,attempt:Y,maxAttempts:Du0,error:X instanceof Error?X.message:String(X)}),await this.reconnectServer($)}return{}}};var VG9=class{writer;encoder;writable;abortSubscribers=[];responseReadable;aborted=!1;closed=!1;constructor($,Y){this.writable=$,this.writer=$.getWriter(),this.encoder=new TextEncoder;let X=Y.getReader();this.abortSubscribers.push(async()=>{await X.cancel()}),this.responseReadable=new ReadableStream({async pull(G){let{done:J,value:Q}=await X.read();J?G.close():G.enqueue(Q)},cancel:()=>{this.abort()}})}async write($){try{if(typeof $==="string")$=this.encoder.encode($);await this.writer.write($)}catch{}return this}async writeln($){return await this.write($+`
`),this}sleep($){return new Promise((Y)=>setTimeout(Y,$))}async close(){try{await this.writer.close()}catch{}this.closed=!0}async pipe($){this.writer.releaseLock(),await $.pipeTo(this.writable,{preventClose:!0}),this.writer=this.writable.getWriter()}onAbort($){this.abortSubscribers.push($)}abort(){if(!this.aborted)this.aborted=!0,this.abortSubscribers.forEach(($)=>$())}},Pz4=()=>{let $=typeof Bun<"u"?Bun.version:void 0;if($===void 0)return!1;let Y=$.startsWith("1.1")||$.startsWith("1.0")||$.startsWith("0.");return Pz4=()=>Y,Y},FG9={Stringify:1},wz4=async($,Y,X,G,J)=>{if(typeof $==="object"&&!($ instanceof String)){if(!($ instanceof Promise))$=$.toString();if($ instanceof Promise)$=await $}let Q=$.callbacks;if(!Q?.length)return Promise.resolve($);if(J)J[0]+=$;else J=[$];return Promise.all(Q.map((K)=>K({phase:Y,buffer:J,context:G}))).then((K)=>Promise.all(K.filter(Boolean).map((Z)=>wz4(Z,Y,!1,G,J))).then(()=>J[0]))},LG9=class extends VG9{constructor($,Y){super($,Y)}async writeSSE($){let X=(await wz4($.data,FG9.Stringify,!1,{})).split(/\r\n|\r|\n/).map((J)=>{return`data: ${J}`}).join(`
`);for(let J of["event","id","retry"])if($[J]&&/[\r\n]/.test($[J]))throw Error(`${J} must not contain "\\r" or "\\n"`);let G=[$.event&&`event: ${$.event}`,X,$.id&&`id: ${$.id}`,$.retry&&`retry: ${$.retry}`].filter(Boolean).join(`
`)+`

`;await this.write(G)}},DG9=async($,Y,X)=>{try{await Y($)}catch(G){console.error(G)}finally{$.close()}},NG9=new WeakMap,AG9=($,Y,X)=>{let{readable:G,writable:J}=new TransformStream,Q=new LG9(J,G);if(Pz4())$.req.raw.signal.addEventListener("abort",()=>{if(!Q.closed)Q.abort()});return NG9.set(Q.responseReadable,$),$.header("Transfer-Encoding","chunked"),$.header("Content-Type","text/event-stream"),$.header("Cache-Control","no-cache"),$.header("Connection","keep-alive"),DG9(Q,Y),$.newResponse(Q.responseReadable)},BG9=4194304,OG9=class{messageUrl;stream;_sessionId;onclose;onerror;onmessage;constructor($,Y){this.messageUrl=$,this.stream=Y,this._sessionId=crypto.randomUUID(),this.stream.onAbort(()=>{this.close()})}get sessionId(){return this._sessionId}async start(){if(this.stream==null)throw Error("Stream not initialized");if(this.stream.closed)throw Error("SSE transport already closed!");await this.stream.writeSSE({event:"ping",data:""}),await this.stream.writeSSE({event:"endpoint",data:`${this.messageUrl}?sessionId=${this.sessionId}`})}async handlePostMessage($){if(this.stream?.closed==null)return $.text("SSE connection not established",500);try{let Y=$.req.header("content-type")||"";if(!Y.includes("application/json"))throw Error(`Unsupported content-type: ${Y}`);let X=Number.parseInt($.req.header("content-length")||"0",10);if(X>BG9)throw Error(`Request body too large: ${X} bytes`);let G=await $.req.json();return await this.handleMessage(G),$.text("Accepted",202)}catch(Y){return this.onerror?.(Y),$.text("Error",400)}}async handleMessage($){let Y;try{Y=C7.parse($)}catch(X){throw this.onerror?.(X),X}this.onmessage?.(Y)}async close(){if(this.stream?.closed)this.stream.abort()}async send($){if(this.stream?.closed)throw Error("Not connected");await this.stream.writeSSE({event:"message",data:JSON.stringify($)})}},EG9=class{getLogger;getSdkServer;clearDefinedPrompts;constructor($){this.getLogger=$.getLogger,this.getSdkServer=$.getSdkServer,this.clearDefinedPrompts=$.clearDefinedPrompts}async notifyListChanged(){this.getLogger().info("Prompt list change externally notified. Clearing definedPrompts and sending notification."),this.clearDefinedPrompts();try{await this.getSdkServer().sendPromptListChanged()}catch($){let Y=new G0({id:"MCP_SERVER_PROMPT_LIST_CHANGED_NOTIFICATION_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,text:"Failed to send prompt list changed notification"},$);throw this.getLogger().error("Failed to send prompt list changed notification:",{error:Y.toString()}),this.getLogger().trackException(Y),Y}}},MG9=class{getSubscriptions;getLogger;getSdkServer;clearDefinedResources;clearDefinedResourceTemplates;constructor($){this.getSubscriptions=$.getSubscriptions,this.getLogger=$.getLogger,this.getSdkServer=$.getSdkServer,this.clearDefinedResources=$.clearDefinedResources,this.clearDefinedResourceTemplates=$.clearDefinedResourceTemplates}async notifyUpdated({uri:$}){if(this.getSubscriptions().has($)){this.getLogger().info(`Sending notifications/resources/updated for externally notified resource: ${$}`);try{await this.getSdkServer().sendResourceUpdated({uri:$})}catch(Y){let X=new G0({id:"MCP_SERVER_RESOURCE_UPDATED_NOTIFICATION_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,text:"Failed to send resource updated notification",details:{uri:$}},Y);throw this.getLogger().trackException(X),this.getLogger().error("Failed to send resource updated notification:",{error:X.toString()}),X}}else this.getLogger().debug(`Resource ${$} was updated, but no active subscriptions for it.`)}async notifyListChanged(){this.getLogger().info("Resource list change externally notified. Clearing definedResources and sending notification."),this.clearDefinedResources(),this.clearDefinedResourceTemplates();try{await this.getSdkServer().sendResourceListChanged()}catch($){let Y=new G0({id:"MCP_SERVER_RESOURCE_LIST_CHANGED_NOTIFICATION_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY,text:"Failed to send resource list changed notification"},$);throw this.getLogger().trackException(Y),this.getLogger().error("Failed to send resource list changed notification:",{error:Y.toString()}),Y}}},_z4=class extends om0{server;stdioTransport;sseTransport;sseHonoTransports;streamableHTTPTransports=new Map;httpServerInstances=new Map;definedResources;definedResourceTemplates;resourceOptions;definedPrompts;promptOptions;jsonSchemaValidator;subscriptions=new Set;currentLoggingLevel;resources;prompts;elicitation;getStdioTransport(){return this.stdioTransport}getSseTransport(){return this.sseTransport}getSseHonoTransport($){return this.sseHonoTransports.get($)}getServer(){return this.server}constructor($){super($);this.resourceOptions=this.mergeAppResources($.resources,$.appResources),this.promptOptions=$.prompts,this.jsonSchemaValidator=$.jsonSchemaValidator;let Y={tools:{},logging:{enabled:!0}};if(this.resourceOptions)Y.resources={subscribe:!0,listChanged:!0};if($.prompts)Y.prompts={listChanged:!0};if(Object.values(this.convertedTools).some((G)=>G.mcp?._meta?.ui?.resourceUri)||$.appResources)Y.extensions={...Y.extensions,"io.modelcontextprotocol/ui":{}};this.server=new UI({name:this.name,version:this.version},{capabilities:Y,...this.instructions?{instructions:this.instructions}:{},...this.jsonSchemaValidator?{jsonSchemaValidator:this.jsonSchemaValidator}:{}}),this.logger.info("Initialized MCPServer",{name:this.name,version:this.version,id:this.id,tools:Object.keys(this.convertedTools),capabilities:Y}),this.sseHonoTransports=new Map,this.registerHandlersOnServer(this.server),this.resources=new MG9({getSubscriptions:()=>this.subscriptions,getLogger:()=>this.logger,getSdkServer:()=>this.server,clearDefinedResources:()=>{this.definedResources=void 0},clearDefinedResourceTemplates:()=>{this.definedResourceTemplates=void 0}}),this.prompts=new EG9({getLogger:()=>this.logger,getSdkServer:()=>this.server,clearDefinedPrompts:()=>{this.definedPrompts=void 0}}),this.elicitation={sendRequest:async(G,J)=>{return this.handleElicitationRequest(G,void 0,J)}}}async handleElicitationRequest($,Y,X){this.logger.debug("Sending elicitation request",{message:$.message});let J=await(Y||this.server).elicitInput($,X);return this.logger.debug("Received elicitation response",{response:J}),J}async readJsonBody($,Y){let X=$;if(X.body!==void 0)return X.body;if(Y?.preParsedOnly)return;return new Promise((G,J)=>{let Q="";$.on("data",(W)=>Q+=W),$.on("end",()=>{try{G(JSON.parse(Q))}catch(W){J(W)}}),$.on("error",J)})}mergeAppResources($,Y){if(!Y||Object.keys(Y).length===0)return $;let X=new Map;for(let[Q,W]of Object.entries(Y)){let K;if(W.html)K=W.html;else if(W.htmlPath)K=sX9(W.htmlPath,"utf-8");else{this.logger.warn(`App resource '${Q}' has neither html nor htmlPath \u2014 skipping`);continue}let Z={uri:Q,name:W.name,...W.description?{description:W.description}:{},mimeType:PH4,...W.meta?{_meta:{ui:W.meta}}:{}};X.set(Q,{resource:Z,html:K})}if(X.size===0)return $;let G=async()=>{return Array.from(X.values()).map((Q)=>Q.resource)},J=async({uri:Q})=>{let W=X.get(Q);if(W)return{text:W.html};throw Error(`App resource not found: ${Q}`)};if(!$)return{listResources:G,getResourceContent:J};return{listResources:async({extra:Q})=>{let W=await $.listResources({extra:Q}),K=await G(),Z=new Set(W.map((z)=>z.uri)),H=K.filter((z)=>!Z.has(z.uri));return[...W,...H]},getResourceContent:async({uri:Q,extra:W})=>{let K=X.get(Q);if(K){try{if((await $.listResources({extra:W})).some((H)=>H.uri===Q))return $.getResourceContent({uri:Q,extra:W})}catch{}return{text:K.html}}return $.getResourceContent({uri:Q,extra:W})},...$.resourceTemplates?{resourceTemplates:$.resourceTemplates}:{}}}createServerInstance(){let $={tools:{},logging:{enabled:!0}};if(this.resourceOptions)$.resources={subscribe:!0,listChanged:!0};if(this.promptOptions)$.prompts={listChanged:!0};let Y=Object.values(this.convertedTools).some((G)=>G.mcp?._meta?.ui?.resourceUri);if(Y||this.resourceOptions){let G=this.definedResources?.some((J)=>J.uri.startsWith("ui://"));if(Y||G)$.extensions={...$.extensions,"io.modelcontextprotocol/ui":{}}}let X=new UI({name:this.name,version:this.version},{capabilities:$,...this.instructions?{instructions:this.instructions}:{},...this.jsonSchemaValidator?{jsonSchemaValidator:this.jsonSchemaValidator}:{}});return this.registerHandlersOnServer(X),X}registerHandlersOnServer($){if($.setRequestHandler(LV,async(Y,X)=>{let G=this.createProxiedRequestContext(X);return{tools:(await this.getAuthorizedConvertedToolEntries(G)).map(([,Q])=>{let W={name:Q.id||"unknown",description:Q.description,inputSchema:this.convertSchema(Q.parameters)};if(Q.outputSchema)W.outputSchema=this.convertSchema(Q.outputSchema);if(Q.mcp?.annotations)W.annotations=Q.mcp.annotations;let K=I70(Q.mcp?._meta,Q.strict);if(K){let Z=K.ui,H=K[$u0];if(Z?.resourceUri&&!H)W._meta={...K,[$u0]:Z.resourceUri};else if(H&&!Z?.resourceUri)W._meta={...K,ui:{...K.ui??{},resourceUri:H}};else W._meta=K}return W})}}),$.setRequestHandler(GU,async(Y,X)=>{let G=Date.now();try{let J=this.convertedTools[Y.params.name];if(!J)return this.logger.warn("Unknown tool requested",{tool:Y.params.name}),{content:[{type:"text",text:`Unknown tool: ${Y.params.name}`}],isError:!0};let Q=J.parameters.validate?.(Y.params.arguments??{});if(Q&&!Q.success){this.logger.warn("Invalid tool arguments",{tool:Y.params.name,errors:Q.error});let F="Validation failed";if("errors"in Q.error&&Array.isArray(Q.error.errors))F=Q.error.errors.map((L)=>`- ${L.path?.join(".")||"root"}: ${L.message}`).join(`
`);else if(Q.error instanceof Error)F=Q.error.message;return{content:[{type:"text",text:`Tool validation failed. Please fix the following errors and try again:
${F}

Provided arguments: ${JSON.stringify(Y.params.arguments,null,2)}`}],isError:!0}}if(!J.execute)return this.logger.warn("Tool does not have an execute function",{tool:Y.params.name}),{content:[{type:"text",text:`Tool '${Y.params.name}' does not have an execute function.`}],isError:!0};let W={sendRequest:async(F,L)=>{return this.handleElicitationRequest(F,$,L)}},K=new p1;if(X)Object.entries(X).forEach(([F,L])=>{K.set(F,L)});let Z={messages:[],toolCallId:"",requestContext:K,mcp:{elicitation:W,extra:X},get elicitation(){throw Error('The "elicitation" key is now nested under "mcp.elicitation" in tool arguments')},get extra(){throw Error('The "extra" key is now nested under "mcp.extra" in tool arguments')}};await this.enforceToolExecutionFGA(Y.params.name,K);let H=await J.execute(Q?.value??Y.params.arguments??{},Z),z=Date.now()-G;if(KC0(H))return this.logger.warn(`CallTool: Tool '${Y.params.name}' returned a validation error in ${z}ms.`,{error:H.message}),{content:[{type:"text",text:H.message}],isError:!0};this.logger.debug(`CallTool: Tool '${Y.params.name}' executed successfully with result:`,H),this.logger.info(`Tool '${Y.params.name}' executed successfully in ${z}ms.`);let V={isError:!1,content:[]};if(J.outputSchema){let F;if(H&&typeof H==="object"&&"structuredContent"in H)F=H.structuredContent;else F=H;let L=J.outputSchema.validate?.(F??{});if(L&&!L.success)throw this.logger.warn("Invalid structured content",{tool:Y.params.name,errors:L.error}),Error(`Invalid structured content for tool ${Y.params.name}: ${JSON.stringify(L.error)}`);V.structuredContent=F}if(V.structuredContent)V.content=[{type:"text",text:JSON.stringify(V.structuredContent)}];else V.content=[{type:"text",text:typeof H==="string"?H:JSON.stringify(H)}];return V}catch(J){let Q=Date.now()-G;if(J instanceof Error&&"issues"in J&&Array.isArray(J.issues)){let W=J.issues;return this.logger.warn("Invalid tool arguments",{tool:Y.params.name,errors:W,duration:`${Q}ms`}),{content:[{type:"text",text:`Invalid arguments: ${W.map((K)=>`${K.path.join(".")}: ${K.message}`).join(", ")}`}],isError:!0}}if(this.logger.error("Tool execution failed",{tool:Y.params.name,error:J}),J instanceof G0)return{content:[{type:"text",text:JSON.stringify(J.toJSON())}],isError:!0};return{content:[{type:"text",text:`Error: ${J instanceof Error?J.message:String(J)}`}],isError:!0}}}),$.setRequestHandler(JI,async(Y)=>{return this.currentLoggingLevel=Y.params.level,this.logger.debug("Logging level set",{level:Y.params.level}),{}}),this.resourceOptions)this.registerResourceHandlersOnServer($);if(this.promptOptions)this.registerPromptHandlersOnServer($)}registerResourceHandlersOnServer($){let Y=this.resourceOptions;if(!Y)return;if(Y.listResources)$.setRequestHandler(rE,async(X,G)=>{if(this.definedResources)return{resources:this.definedResources};else try{let J=await Y.listResources({extra:G});return this.definedResources=J,this.logger.debug("Fetched and cached resources",{count:this.definedResources.length}),{resources:this.definedResources}}catch(J){throw this.logger.error("Error fetching resources",{error:J}),J}});if(Y.getResourceContent)$.setRequestHandler(sE,async(X,G)=>{let J=Date.now(),Q=X.params.uri;if(this.logger.debug("Handling ReadResource request",{uri:Q}),!this.definedResources){let K=await this.resourceOptions?.listResources?.({extra:G});if(!K)throw Error("Failed to load resources");this.definedResources=K}let W=this.definedResources?.find((K)=>K.uri===Q);if(!W)throw this.logger.warn("Unknown resource URI requested",{uri:Q}),Error(`Resource not found: ${Q}`);try{let K=await Y.getResourceContent({uri:Q,extra:G}),H=(Array.isArray(K)?K:[K]).map((V)=>{if("text"in V&&V.text!==void 0)return{uri:W.uri,mimeType:W.mimeType,text:V.text};let F=V.blob;if(F===void 0)throw Error(`Resource '${Q}' returned content with neither text nor blob`);return{uri:W.uri,mimeType:W.mimeType,blob:F}}),z=Date.now()-J;return this.logger.info("Resource read successfully",{uri:Q,duration:z}),{contents:H}}catch(K){let Z=Date.now()-J;throw this.logger.error("Failed to get content for resource",{uri:Q,duration:Z,error:K}),K}});if(Y.resourceTemplates)$.setRequestHandler(aE,async(X,G)=>{if(this.definedResourceTemplates)return{resourceTemplates:this.definedResourceTemplates};else try{let J=await Y.resourceTemplates({extra:G});return this.definedResourceTemplates=J,this.logger.debug("Fetched and cached resource templates",{count:this.definedResourceTemplates.length}),{resourceTemplates:this.definedResourceTemplates}}catch(J){throw this.logger.error("Error fetching resource templates via resourceTemplates():",{error:J}),J}});$.setRequestHandler(m$0,async(X)=>{let G=X.params.uri;return this.logger.info("Received resources/subscribe request",{uri:G}),this.subscriptions.add(G),{}}),$.setRequestHandler(u$0,async(X)=>{let G=X.params.uri;return this.logger.info("Received resources/unsubscribe request",{uri:G}),this.subscriptions.delete(G),{}})}registerPromptHandlersOnServer($){let Y=this.promptOptions;if(!Y)return;if(Y.listPrompts)$.setRequestHandler(oE,async(X,G)=>{if(this.logger.debug("Handling ListPrompts request"),this.definedPrompts)return{prompts:this.definedPrompts};else try{let J=await Y.listPrompts({extra:G});for(let Q of J)d$0.parse(Q);return this.definedPrompts=J,this.logger.debug("Fetched and cached prompts",{count:this.definedPrompts.length}),{prompts:this.definedPrompts}}catch(J){throw this.logger.error("Error fetching prompts via listPrompts():",{error:J instanceof Error?J.message:String(J)}),J}});if(Y.getPromptMessages)$.setRequestHandler(tE,async(X,G)=>{let J=Date.now(),{name:Q,arguments:W}=X.params;if(!this.definedPrompts){let Z=await this.promptOptions?.listPrompts?.({extra:G});if(!Z)throw Error("Failed to load prompts");this.definedPrompts=Z}let K=this.definedPrompts?.find((Z)=>Z.name===Q);if(!K)throw Error(`Prompt "${Q}" not found`);if(K.arguments){for(let Z of K.arguments)if(Z.required&&(W?.[Z.name]===void 0||W?.[Z.name]===null))throw Error(`Missing required argument: ${Z.name}`)}try{let Z=[];if(Y.getPromptMessages)Z=await Y.getPromptMessages({name:Q,version:K.version,args:W,extra:G});let H=Date.now()-J;return this.logger.info("Prompt retrieved successfully",{prompt:Q,duration:H}),{description:K.description,messages:Z}}catch(Z){let H=Date.now()-J;throw this.logger.error("Failed to get prompt content",{prompt:Q,duration:H,error:Z}),Z}})}convertAgentsToTools($,Y){let X={};if(!$)return X;for(let G in $){let J=$[G];if(!J||!("generate"in J)){this.logger.warn("Invalid agent instance, skipping",{agentKey:G});continue}let Q=J.getDescription();if(!Q)throw Error(`Agent '${J.name}' (key: '${G}') must have a non-empty description to be used in an MCPServer.`);let W=`ask_${G}`;if(Y?.[W]||X[W]){this.logger.warn("Duplicate tool name, skipping agent",{tool:W,agentKey:G});continue}let K=X8({id:W,description:`Ask agent '${J.name}' a question. Agent description: ${Q}`,inputSchema:{type:"object",properties:{message:{type:"string",description:"The question or input for the agent."}},required:["message"],additionalProperties:!1},execute:async(z,V)=>{let{message:F}=z;this.logger.debug("Executing agent tool",{tool:W,agent:J.name,message:F});try{let L=V?.requestContext||new p1;if(V?.mcp?.extra)Object.entries(V.mcp.extra).forEach(([D,A])=>{L.set(D,A)});return await J.generate(F,{...V??{},requestContext:L})}catch(L){throw this.logger.error("Error executing agent tool",{tool:W,agent:J.name,error:L}),L}}}),Z={name:W,logger:this.logger,mastra:this.mastra,requestContext:new p1,tracingContext:{},description:K.description},H=VY(K,Z);X[W]={...H,id:W,mcp:{toolType:"agent"}},this.logger.info("Registered agent as tool",{agent:J.name,key:G,tool:W})}return X}convertWorkflowsToTools($,Y){let X={};if(!$)return X;for(let G in $){let J=$[G];if(!J||typeof J.createRun!=="function"){this.logger.warn(`Workflow instance for '${G}' is invalid or missing a createRun function. Skipping.`);continue}let Q=J.description;if(!Q)throw Error(`Workflow '${J.id}' (key: '${G}') must have a non-empty description to be used in an MCPServer.`);let W=`run_${G}`;if(Y?.[W]||X[W]){this.logger.warn(`Tool with name '${W}' already exists. Workflow '${G}' will not be added as a duplicate tool.`);continue}let K=X8({id:W,description:`Run workflow '${G}'. Workflow description: ${Q}`,inputSchema:J.inputSchema,execute:async(z,V)=>{this.logger.debug(`Executing workflow tool '${W}' for workflow '${J.id}' with input:`,z);try{let F=V?.requestContext||new p1;if(V?.mcp?.extra)Object.entries(V.mcp.extra).forEach(([D,A])=>{F.set(D,A)});return await(await J.createRun({runId:F?.get("runId")})).start({inputData:z,requestContext:F,tracingContext:V?.tracingContext})}catch(F){throw this.logger.error(`Error executing workflow tool '${W}' for workflow '${J.id}':`,F),F}}}),Z={name:W,logger:this.logger,mastra:this.mastra,requestContext:new p1,tracingContext:{},description:K.description},H=VY(K,Z);X[W]={...H,id:W,mcp:{toolType:"workflow"}},this.logger.info("Registered workflow as tool",{workflow:J.id,key:G,tool:W})}return X}convertTools($,Y,X){let G={};for(let V of Object.keys($)){let F=$[V];if(!F){this.logger.warn("Tool instance is undefined, skipping",{tool:V});continue}if(typeof F.execute!=="function"){this.logger.warn("Tool has no execute function, skipping",{tool:V});continue}let L={name:V,requestContext:new p1,tracingContext:{},mastra:this.mastra,logger:this.logger,description:F?.description},N=VY(F,L);G[V]={...N,id:V},this.logger.info("Registered explicit tool",{tool:V})}this.logger.info("Total defined tools registered",{count:Object.keys(G).length});let J={},Q={};try{J=this.convertAgentsToTools(Y,G),Q=this.convertWorkflowsToTools(X,G)}catch(V){let F=new G0({id:"MCP_SERVER_AGENT_OR_WORKFLOW_TOOL_CONVERSION_FAILED",domain:M0.MCP,category:E0.USER},V);throw this.logger.trackException(F),this.logger.error("Failed to convert tools:",{error:F.toString()}),F}let W={...G,...J,...Q},K=Object.keys(W).length,Z=Object.keys(G).length,H=Object.keys(J).length,z=Object.keys(Q).length;return this.logger.info(`${K} total tools registered (${Z} defined + ${H} agents + ${z} workflows)`),W}async startStdio(){this.stdioTransport=new Qu0;try{await this.server.connect(this.stdioTransport)}catch($){let Y=new G0({id:"MCP_SERVER_STDIO_CONNECTION_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY},$);throw this.logger.trackException(Y),this.logger.error("Failed to connect MCP server using stdio transport:",{error:Y.toString()}),Y}this.logger.info("Started MCP Server (stdio)")}async startSSE({url:$,ssePath:Y,messagePath:X,req:G,res:J}){try{if($.pathname===Y)await this.connectSSE({messagePath:X,res:J});else if($.pathname===X){if(this.logger.debug("Received message"),!this.sseTransport){J.writeHead(503),J.end("SSE connection not established");return}let Q=await this.readJsonBody(G,{preParsedOnly:!0});await this.sseTransport.handlePostMessage(G,J,Q)}else this.logger.debug("Unknown path:",{path:$.pathname}),J.writeHead(404),J.end()}catch(Q){let W=new G0({id:"MCP_SERVER_SSE_START_FAILED",domain:M0.MCP,category:E0.USER,details:{url:$.toString(),ssePath:Y,messagePath:X}},Q);throw this.logger.trackException(W),this.logger.error("Failed to start MCP Server (SSE):",{error:W.toString()}),W}}async startHonoSSE({url:$,ssePath:Y,messagePath:X,context:G}){try{if($.pathname===Y)return AG9(G,async(J)=>{await this.connectHonoSSE({messagePath:X,stream:J})});else if($.pathname===X){this.logger.debug("Received message");let J=G.req.query("sessionId");if(this.logger.debug("Received message for sessionId",{sessionId:J}),!J)return G.text("No sessionId provided",400);if(!this.sseHonoTransports.has(J))return G.text(`No transport found for sessionId ${J}`,400);let Q=await this.sseHonoTransports.get(J)?.handlePostMessage(G);if(!Q)return G.text("Transport not found",400);return Q}else return this.logger.debug("Unknown path:",{path:$.pathname}),G.text("Unknown path",404)}catch(J){let Q=new G0({id:"MCP_SERVER_HONO_SSE_START_FAILED",domain:M0.MCP,category:E0.USER,details:{url:$.toString(),ssePath:Y,messagePath:X}},J);throw this.logger.trackException(Q),this.logger.error("Failed to start MCP Server (Hono SSE):",{error:Q.toString()}),Q}}async startHTTP({url:$,httpPath:Y,req:X,res:G,options:J}){if(this.logger.debug("Received HTTP request",{method:X.method,path:$.pathname}),$.pathname!==Y){this.logger.debug("Pathname does not match httpPath, returning 404",{path:$.pathname,httpPath:Y}),G.writeHead(404),G.end();return}if(J?.serverless||J&&"sessionIdGenerator"in J&&J.sessionIdGenerator===void 0){this.logger.debug("Running in stateless mode"),await this.handleServerlessRequest(X,G);return}let W={sessionIdGenerator:()=>Bz4(),...J},K=X.headers["mcp-session-id"],Z;this.logger.debug("Session ID from headers",{sessionId:K,activeTransports:Array.from(this.streamableHTTPTransports.keys())});try{if(K&&this.streamableHTTPTransports.has(K)){if(Z=this.streamableHTTPTransports.get(K),this.logger.debug("Using existing transport for session",{sessionId:K}),X.method==="GET")this.logger.debug("Handling GET request for existing session",{sessionId:K});let H=X.method==="POST"?await this.readJsonBody(X):void 0;await Z.handleRequest(X,G,H)}else if(K)this.logger.warn("Session ID not found, returning 404",{sessionId:K,method:X.method}),G.writeHead(404,{"Content-Type":"application/json"}),G.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32000,message:"Session not found"},id:null}));else if(this.logger.debug("No session ID provided",{method:X.method}),X.method==="POST"){let H=await this.readJsonBody(X),{isInitializeRequest:z}=await Promise.resolve().then(() => (BY(),vU4));if(z(H)){this.logger.debug("Received initialize request, creating new transport"),Z=new T70({...W,sessionIdGenerator:W.sessionIdGenerator,onsessioninitialized:(F)=>{this.streamableHTTPTransports.set(F,Z)}}),Z.onclose=()=>{let F=Z?.sessionId;if(F&&this.streamableHTTPTransports.has(F)){if(this.logger.debug("Transport closed for session, removing from map",{sessionId:F}),this.streamableHTTPTransports.delete(F),this.httpServerInstances.has(F))this.httpServerInstances.delete(F),this.logger.debug("Cleaned up server instance for closed session",{sessionId:F})}};let V=this.createServerInstance();if(await V.connect(Z),Z.sessionId)this.streamableHTTPTransports.set(Z.sessionId,Z),this.httpServerInstances.set(Z.sessionId,V),this.logger.debug("Session initialized and stored",{sessionId:Z.sessionId});else this.logger.warn("Transport initialized without a session ID");return await Z.handleRequest(X,G,H)}else this.logger.warn("Received non-initialize POST request without session ID"),G.writeHead(400,{"Content-Type":"application/json"}),G.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32000,message:"Bad Request: No valid session ID provided for non-initialize request"},id:H?.id??null}))}else this.logger.warn("Received request without session ID",{method:X.method}),G.writeHead(400,{"Content-Type":"application/json"}),G.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32000,message:`Bad Request: ${X.method} request requires a valid session ID`},id:null}))}catch(H){let z=new G0({id:"MCP_SERVER_HTTP_CONNECTION_FAILED",domain:M0.MCP,category:E0.USER,text:"Failed to connect MCP server using HTTP transport"},H);if(this.logger.trackException(z),this.logger.error("Error handling HTTP request",{error:z}),!G.headersSent)G.writeHead(500,{"Content-Type":"application/json"}),G.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32603,message:"Internal server error"},id:null}))}}async handleServerlessRequest($,Y){try{this.logger.debug("Received serverless request",{method:$.method});let X=$.method==="POST"?await this.readJsonBody($):void 0;this.logger.debug("Processing serverless request",{method:$.method,bodyMethod:X?.method,id:X?.id});let G=this.createServerInstance(),J=new T70({sessionIdGenerator:void 0,enableJsonResponse:!0});await G.connect(J),await J.handleRequest($,Y,X),this.logger.debug("Completed serverless request",{method:X?.method,id:X?.id})}catch(X){let G=new G0({id:"MCP_SERVER_SERVERLESS_REQUEST_FAILED",domain:M0.MCP,category:E0.USER,text:"Failed to handle serverless MCP request"},X);if(this.logger.trackException(G),this.logger.error("Error handling serverless request",{error:G}),!Y.headersSent)Y.writeHead(500,{"Content-Type":"application/json"}),Y.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32603,message:"Internal server error",data:X instanceof Error?X.message:String(X)},id:null}))}}async connectSSE({messagePath:$,res:Y}){try{this.logger.debug("Received SSE connection"),this.sseTransport=new Ju0($,Y),await this.server.connect(this.sseTransport),this.server.onclose=async()=>{this.sseTransport=void 0,await this.server.close()},Y.on("close",()=>{this.sseTransport=void 0})}catch(X){let G=new G0({id:"MCP_SERVER_SSE_CONNECT_FAILED",domain:M0.MCP,category:E0.USER,details:{messagePath:$}},X);throw this.logger.trackException(G),this.logger.error("Failed to connect to MCP Server (SSE):",{error:G}),G}}async connectHonoSSE({messagePath:$,stream:Y}){this.logger.debug("Received SSE connection");let X=new OG9($,Y),G=X.sessionId;this.logger.debug("SSE Transport created with sessionId:",{sessionId:G}),this.sseHonoTransports.set(G,X),Y.onAbort(()=>{this.logger.debug("SSE Transport aborted with sessionId:",{sessionId:G}),this.sseHonoTransports.delete(G)});try{await this.server.connect(X),this.server.onclose=async()=>{this.logger.debug("SSE Transport closed with sessionId:",{sessionId:G}),this.sseHonoTransports.delete(G),await this.server.close()};while(!0){await Y.sleep(60000);let J=Array.from(this.sseHonoTransports.keys()||[]);this.logger.debug("Active Hono SSE sessions:",{sessionIds:J}),await Y.write(`:keep-alive

`)}}catch(J){let Q=new G0({id:"MCP_SERVER_HONO_SSE_CONNECT_FAILED",domain:M0.MCP,category:E0.USER,details:{messagePath:$}},J);throw this.logger.trackException(Q),this.logger.error("Failed to connect to MCP Server (Hono SSE):",{error:Q}),Q}}async close(){try{if(this.stdioTransport)await this.stdioTransport.close?.(),this.stdioTransport=void 0;if(this.sseTransport)await this.sseTransport.close?.(),this.sseTransport=void 0;if(this.sseHonoTransports){for(let $ of this.sseHonoTransports.values())await $.close?.();this.sseHonoTransports.clear()}if(this.streamableHTTPTransports){for(let $ of this.streamableHTTPTransports.values())await $.close?.();this.streamableHTTPTransports.clear()}if(this.httpServerInstances){for(let $ of this.httpServerInstances.values())await $.close?.();this.httpServerInstances.clear()}await this.server.close(),this.logger.info("MCP server closed.")}catch($){let Y=new G0({id:"MCP_SERVER_CLOSE_FAILED",domain:M0.MCP,category:E0.THIRD_PARTY},$);throw this.logger.trackException(Y),this.logger.error("Error closing MCP server:",{error:Y}),Y}}getServerInfo(){return{id:this.id,name:this.name,description:this.description,repository:this.repository,version_detail:{version:this.version,release_date:this.releaseDate,is_latest:this.isLatest}}}getServerDetail(){return{...this.getServerInfo(),package_canonical:this.packageCanonical,packages:this.packages,remotes:this.remotes}}convertSchema($){if(z5($))return $6($);return $?.jsonSchema||$}getToolListInfo($){let Y=this.mastra?.getServer?.()?.fga;if(Y&&$)return this.getAuthorizedConvertedToolEntries($).then((X)=>({tools:X.map(([G,J])=>({id:G,name:J.id||G,description:J.description,inputSchema:this.convertSchema(J.parameters),outputSchema:this.convertSchema(J.outputSchema),toolType:J.mcp?.toolType,_meta:I70(J.mcp?._meta,J.strict)}))}));if(Y&&!$)return{tools:[]};return this.logger.debug("Getting tool list",{server:this.name}),{tools:Object.entries(this.convertedTools).map(([X,G])=>({id:X,name:G.id||X,description:G.description,inputSchema:this.convertSchema(G.parameters),outputSchema:this.convertSchema(G.outputSchema),toolType:G.mcp?.toolType,_meta:I70(G.mcp?._meta,G.strict)}))}}getToolInfo($){let Y=this.convertedTools[$];if(!Y){this.logger.debug("Tool not found",{tool:$,server:this.name});return}return this.logger.debug("Getting tool info",{tool:$,server:this.name}),{name:Y.id||$,description:Y.description,inputSchema:this.convertSchema(Y.parameters),outputSchema:this.convertSchema(Y.outputSchema),toolType:Y.mcp?.toolType,_meta:I70(Y.mcp?._meta,Y.strict)}}createProxiedRequestContext($){let Y=new p1;if($&&typeof $==="object")Object.entries($).forEach(([X,G])=>{Y.set(X,G)});return Y}async getAuthorizedConvertedToolEntries($){let Y=Object.entries(this.convertedTools);if(!this.mastra?.getServer?.()?.fga)return Y;if(!$.get("user"))return[];return(await Promise.all(Y.map(async([Q,W])=>{try{return await this.enforceToolExecutionFGA(Q,$),[Q,W]}catch(K){if(K instanceof Error&&K.name==="FGADeniedError")return null;throw K}}))).filter((Q)=>Q!==null)}async enforceToolExecutionFGA($,Y){let X=this.mastra?.getServer?.()?.fga;if(!X)return;let{checkFGA:G,FGADeniedError:J,MastraFGAPermissions:Q}=await Promise.resolve().then(() => (Az4(),Nz4)),W=JSON.stringify([this.id,$]),K=Y?.get("user");if(!K)throw new J({id:"unknown"},{type:"tool",id:W},Q.TOOLS_EXECUTE);await G({fgaProvider:X,user:K,resource:{type:"tool",id:W},permission:Q.TOOLS_EXECUTE})}async executeTool($,Y,X){let G=this.convertedTools[$],J=Y;try{if(!G)throw this.logger.warn("Unknown tool requested",{tool:$,server:this.name}),Error(`Unknown tool: ${$}`);this.logger.debug("Invoking tool",{tool:$,args:Y});let Q=G.parameters,W=typeof Q?.validate==="function"?Q.validate(Y??{}):typeof Q?.safeParse==="function"?Q.safeParse(Y??{}):null;if(W){if(!(typeof W.success==="boolean"?W.success:!W.issues?.length)){let H=(W.error?.issues??W.error?.errors??W.issues??[]).map((V)=>`- ${V.path?.join(".")||"root"}: ${V.message}`).join(`
`),z=W.error?.format?.()??W.error??W.issues;return this.logger.warn("Invalid tool arguments",{tool:$,errorMessages:H,errors:z}),{error:!0,message:`Tool validation failed. Please fix the following errors and try again:
${H||"Validation failed"}

Provided arguments: ${JSON.stringify(Y,null,2)}`,validationErrors:z}}J=W.data??W.value??Y}else this.logger.debug("Tool parameters missing schema, skipping validation",{tool:$});if(!G.execute)throw this.logger.error("Tool does not have an execute function",{tool:$}),Error(`Tool '${$}' cannot be executed.`)}catch(Q){let W=new G0({id:"MCP_SERVER_TOOL_EXECUTE_PREPARATION_FAILED",domain:M0.MCP,category:E0.USER,details:{toolId:$,args:Y}},Q);throw this.logger.trackException(W),W}try{let Q={messages:X?.messages||[],toolCallId:X?.toolCallId||Bz4(),requestContext:X?.requestContext};await this.enforceToolExecutionFGA($,Q.requestContext);let W=await G.execute(J,Q);return this.logger.info("Tool executed successfully",{tool:$}),W}catch(Q){let W=new G0({id:"MCP_SERVER_TOOL_EXECUTE_FAILED",domain:M0.MCP,category:E0.USER,details:{toolId:$,validatedArgs:J}},Q);throw this.logger.trackException(W),W}}async readResource($){if(!this.resourceOptions?.getResourceContent)throw new G0({id:"MCP_SERVER_RESOURCES_NOT_CONFIGURED",domain:M0.MCP,category:E0.USER,details:{uri:$}});let Y={},X=await this.resourceOptions.getResourceContent({uri:$,extra:Y});return{contents:(Array.isArray(X)?X:[X]).map((J)=>({uri:$,..."text"in J&&J.text!==void 0?{text:J.text}:{},..."blob"in J&&J.blob!==void 0?{blob:J.blob}:{}}))}}async listResources(){if(!this.resourceOptions?.listResources)return{resources:[]};let $={};if(this.definedResources)return{resources:this.definedResources};let Y=await this.resourceOptions.listResources({extra:$});return this.definedResources=Y,{resources:Y}}};ZY();var Au0=U6(cF(),1);var jz4=new _4,RG9=X8({id:"get-Database-Configuration",description:"get the database configuration.",inputSchema:U.object(),execute:async()=>{let $=await sr({limit:100,offset:0}),Y=await Aa({limit:100,offset:0}),X=await ws({limit:100,offset:0}),G=[];return $.forEach((J)=>{G.push({uuid:J.code,name:J.name,type:"mysql"})}),Y.forEach((J)=>{G.push({uuid:J.code,name:J.name,type:"postgresql"})}),X.forEach((J)=>{G.push({uuid:J.code,name:J.name,type:"oracle"})}),{type:"text",text:`get the database configuration completed successfully:
${JSON.stringify(G,null,2)}`}}}),qG9=X8({id:"execute-Sql-Statement",description:"execute the SQL statement.",inputSchema:U.object({uuid:U.string().describe("uuid of the database configuration , for example : eke5ckdysx3kfd1cw2lrko2k"),statement:U.string().describe("the sql statement to execute.")}),execute:async($)=>{let Y=_G9($.statement);if(!Y)return{content:[{type:"text",text:"Error: the statement is invalid"}],isError:!0};let X=await wF($.uuid),G=await uA($.uuid),J=await W3($.uuid);if(X[0]){let Q=await uX($.uuid);try{await Q.execute(r.raw($.statement))}catch(W){return{content:[{type:"text",text:`Error: statement execute failed : ${W}`}],isError:!0}}}else if(G[0]){let Q=await pX($.uuid);try{await Q.execute(r.raw($.statement))}catch(W){return{content:[{type:"text",text:`Error: statement execute failed : ${W}`}],isError:!0}}}else if(J[0]){let Q=await lX($.uuid);try{await Q.execute(`${$.statement}`,[],{outFormat:Au0.default.OUT_FORMAT_OBJECT}),Q.commit()}catch(W){return{content:[{type:"text",text:`Error: statement execute failed : ${W}`}],isError:!0}}}else return{content:[{type:"text",text:"Error: uuid of the database configuration is not exist"}],isError:!0};return{type:"text",text:`execute the SQL statement successfully , table name is ${Y}`}}}),PG9=X8({id:"crud-Development",description:"CRUD interface development.",inputSchema:U.object({uuid:U.string().describe("uuid of the database configuration , for example : eke5ckdysx3kfd1cw2lrko2k"),table:U.string().describe("database table name")}),execute:async($)=>{if(!jG9($.table))return{content:[{type:"text",text:"Error: the table is invalid,must contain only English letters, numbers, underscores, and hyphens."}],isError:!0};let Y=await wF($.uuid),X=await uA($.uuid),G=await W3($.uuid),J="mysql";if(Y[0]){let W=await uX($.uuid),K=`SELECT table_name,table_schema 
            FROM information_schema.TABLES WHERE table_name = '${$.table}'`,Z=await W.execute(r.raw(K));if(JSON.stringify(Z[0]).length==2)return{content:[{type:"text",text:"Error: the table is not exist"}],isError:!0}}else if(X[0]){J="postgres";let W=await pX($.uuid),K=`
                SELECT
	                schemaname AS table_schema,
	                tablename AS table_name
                FROM
	                pg_tables 
                WHERE
	                schemaname NOT IN ( 'information_schema', 'pg_catalog' ) 
                    AND tablename = '${$.table}' 
                ORDER BY
	                schemaname,
	                tablename
                `,Z=await W.execute(r.raw(K));if(JSON.stringify(Z.rows).length==2)return{content:[{type:"text",text:"Error: the table is not exist"}],isError:!0}}else if(G[0]){J="oracle";let W=await lX($.uuid),K=`SELECT
                    column_name AS Field,
                    data_type AS TYPE ,
                    data_length AS LENGTH,
                    nullable AS NULLABLE
                FROM
                    all_tab_columns 
                WHERE
                    table_name = '${$.table}'`,Z=await W.execute(`${K}`,[],{outFormat:Au0.default.OUT_FORMAT_OBJECT});if(W.commit(),W.close(),JSON.stringify(Z.rows).length==2)return{content:[{type:"text",text:"Error: the table is not exist"}],isError:!0}}else return{content:[{type:"text",text:"Error: uuid of the database configuration is not exist"}],isError:!0};if((await GB($.table))[0])return{content:[{type:"text",text:"Error: The business module already exists"}],isError:!0};else{let W={name:`${$.table}\u6A21\u5757`,path1:$.table};await PP(W)}return await gx($.table,$.uuid,"insert",J,$.table,""),await gx($.table,$.uuid,"update",J,$.table,""),await eV0($.table,$.uuid,J,$.table,""),await $F0($.table,$.uuid,J,$.table,""),await YF0($.table,$.uuid,J,$.table,""),{type:"text",text:"CRUD interface development successfully."}}});async function wG9(){return new _z4({id:"sys-mcp-server",name:"System mcp Server",version:"1.0.0",agents:{},tools:{getDatabaseConfiguration:RG9,executeSqlStatement:qG9,crudDevelopment:PG9},workflows:{}}).getServer()}function _G9($){if(!$||typeof $!=="string")return null;let Y=$.trim().replace(/\s+/g," "),X=/^\s*CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?[`"$]?([a-zA-Z0-9_.$]+)[`"$]?\s*(?:\s|$)/i,G=Y.match(X);if(G&&G[1])return G[1];return null}function jG9($){return/^[a-zA-Z0-9_-]+$/.test($)}jz4.all("/",async($)=>{let Y=new Q70;return await(await wG9()).connect(Y),Y.handleRequest($)});var Tz4=jz4;hu();var GV4="vercel.ai.error",TG9=Symbol.for(GV4),Iz4,Cz4,X4=class $ extends(Cz4=Error,Iz4=TG9,Cz4){constructor({name:Y,message:X,cause:G}){super(X);this[Iz4]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,GV4)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}},JV4="AI_APICallError",QV4=`vercel.ai.error.${JV4}`,IG9=Symbol.for(QV4),Sz4,kz4,n8=class extends(kz4=X4,Sz4=IG9,kz4){constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:K=G!=null&&(G===408||G===409||G===429||G>=500),data:Z}){super({name:JV4,message:$,cause:W});this[Sz4]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=K,this.data=Z}static isInstance($){return X4.hasMarker($,QV4)}},WV4="AI_EmptyResponseBodyError",KV4=`vercel.ai.error.${WV4}`,CG9=Symbol.for(KV4),vz4,xz4,ZV4=class extends(xz4=X4,vz4=CG9,xz4){constructor({message:$="Empty response body"}={}){super({name:WV4,message:$});this[vz4]=!0}static isInstance($){return X4.hasMarker($,KV4)}};function KU($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}var UV4="AI_InvalidArgumentError",HV4=`vercel.ai.error.${UV4}`,SG9=Symbol.for(HV4),yz4,bz4,C70=class extends(bz4=X4,yz4=SG9,bz4){constructor({message:$,cause:Y,argument:X}){super({name:UV4,message:$,cause:Y});this[yz4]=!0,this.argument=X}static isInstance($){return X4.hasMarker($,HV4)}},zV4="AI_InvalidPromptError",VV4=`vercel.ai.error.${zV4}`,kG9=Symbol.for(VV4),hz4,fz4,JK=class extends(fz4=X4,hz4=kG9,fz4){constructor({prompt:$,message:Y,cause:X}){super({name:zV4,message:`Invalid prompt: ${Y}`,cause:X});this[hz4]=!0,this.prompt=$}static isInstance($){return X4.hasMarker($,VV4)}},FV4="AI_InvalidResponseDataError",LV4=`vercel.ai.error.${FV4}`,vG9=Symbol.for(LV4),gz4,mz4,ZM=class extends(mz4=X4,gz4=vG9,mz4){constructor({data:$,message:Y=`Invalid response data: ${JSON.stringify($)}.`}){super({name:FV4,message:Y});this[gz4]=!0,this.data=$}static isInstance($){return X4.hasMarker($,LV4)}},DV4="AI_JSONParseError",NV4=`vercel.ai.error.${DV4}`,xG9=Symbol.for(NV4),uz4,pz4,fu=class extends(pz4=X4,uz4=xG9,pz4){constructor({text:$,cause:Y}){super({name:DV4,message:`JSON parsing failed: Text: ${$}.
Error message: ${KU(Y)}`,cause:Y});this[uz4]=!0,this.text=$}static isInstance($){return X4.hasMarker($,NV4)}},AV4="AI_LoadAPIKeyError",BV4=`vercel.ai.error.${AV4}`,yG9=Symbol.for(BV4),dz4,cz4,gu=class extends(cz4=X4,dz4=yG9,cz4){constructor({message:$}){super({name:AV4,message:$});this[dz4]=!0}static isInstance($){return X4.hasMarker($,BV4)}},OV4="AI_LoadSettingError",EV4=`vercel.ai.error.${OV4}`,bG9=Symbol.for(EV4),lz4,iz4,HV$=class extends(iz4=X4,lz4=bG9,iz4){constructor({message:$}){super({name:OV4,message:$});this[lz4]=!0}static isInstance($){return X4.hasMarker($,EV4)}},MV4="AI_NoContentGeneratedError",RV4=`vercel.ai.error.${MV4}`,hG9=Symbol.for(RV4),nz4,rz4,zV$=class extends(rz4=X4,nz4=hG9,rz4){constructor({message:$="No content generated."}={}){super({name:MV4,message:$});this[nz4]=!0}static isInstance($){return X4.hasMarker($,RV4)}},qV4="AI_NoSuchModelError",PV4=`vercel.ai.error.${qV4}`,fG9=Symbol.for(PV4),az4,sz4,VV$=class extends(sz4=X4,az4=fG9,sz4){constructor({errorName:$=qV4,modelId:Y,modelType:X,message:G=`No such ${X}: ${Y}`}){super({name:$,message:G});this[az4]=!0,this.modelId=Y,this.modelType=X}static isInstance($){return X4.hasMarker($,PV4)}},wV4="AI_TooManyEmbeddingValuesForCallError",_V4=`vercel.ai.error.${wV4}`,gG9=Symbol.for(_V4),oz4,tz4,S70=class extends(tz4=X4,oz4=gG9,tz4){constructor($){super({name:wV4,message:`Too many values for a single embedding call. The ${$.provider} model "${$.modelId}" can only embed up to ${$.maxEmbeddingsPerCall} values per call, but ${$.values.length} values were provided.`});this[oz4]=!0,this.provider=$.provider,this.modelId=$.modelId,this.maxEmbeddingsPerCall=$.maxEmbeddingsPerCall,this.values=$.values}static isInstance($){return X4.hasMarker($,_V4)}},jV4="AI_TypeValidationError",TV4=`vercel.ai.error.${jV4}`,mG9=Symbol.for(TV4),ez4,$V4,ZU=class $ extends($V4=X4,ez4=mG9,$V4){constructor({value:Y,cause:X,context:G}){let J="Type validation failed";if(G==null?void 0:G.field)J+=` for ${G.field}`;if((G==null?void 0:G.entityName)||(G==null?void 0:G.entityId)){J+=" (";let Q=[];if(G.entityName)Q.push(G.entityName);if(G.entityId)Q.push(`id: "${G.entityId}"`);J+=Q.join(", "),J+=")"}super({name:jV4,message:`${J}: Value: ${JSON.stringify(Y)}.
Error message: ${KU(X)}`,cause:X});this[ez4]=!0,this.value=Y,this.context=G}static isInstance(Y){return X4.hasMarker(Y,TV4)}static wrap({value:Y,cause:X,context:G}){var J,Q,W;if($.isInstance(X)&&X.value===Y&&((J=X.context)==null?void 0:J.field)===(G==null?void 0:G.field)&&((Q=X.context)==null?void 0:Q.entityName)===(G==null?void 0:G.entityName)&&((W=X.context)==null?void 0:W.entityId)===(G==null?void 0:G.entityId))return X;return new $({value:Y,cause:X,context:G})}},IV4="AI_UnsupportedFunctionalityError",CV4=`vercel.ai.error.${IV4}`,uG9=Symbol.for(CV4),YV4,XV4,c5=class extends(XV4=X4,YV4=uG9,XV4){constructor({functionality:$,message:Y=`'${$}' functionality not supported.`}){super({name:IV4,message:Y});this[YV4]=!0,this.functionality=$}static isInstance($){return X4.hasMarker($,CV4)}};O1();cG();cG();cG();ak0();function i6(...$){return $.reduce((Y,X)=>({...Y,...X!=null?X:{}}),{})}function hV4({tools:$=[],providerToolNames:Y,resolveProviderToolName:X}){var G;let J={},Q={};for(let W of $)if(W.type==="provider"){let K=(G=X==null?void 0:X(W))!=null?G:(W.id in Y)?Y[W.id]:void 0;if(K==null)continue;J[W.name]=K,Q[K]=W.name}return{toProviderToolName:(W)=>{var K;return(K=J[W])!=null?K:W},toCustomToolName:(W)=>{var K;return(K=Q[W])!=null?K:W}}}async function fV4($,Y){if($==null)return Promise.resolve();let X=Y==null?void 0:Y.abortSignal;return new Promise((G,J)=>{if(X==null?void 0:X.aborted){J(SV4());return}let Q=setTimeout(()=>{W(),G()},$),W=()=>{clearTimeout(Q),X==null||X.removeEventListener("abort",K)},K=()=>{W(),J(SV4())};X==null||X.addEventListener("abort",K)})}function SV4(){return new DOMException("Delay was aborted","AbortError")}var HM=class{constructor(){this.status={type:"pending"},this._resolve=void 0,this._reject=void 0}get promise(){if(this._promise)return this._promise;return this._promise=new Promise(($,Y)=>{if(this.status.type==="resolved")$(this.status.value);else if(this.status.type==="rejected")Y(this.status.error);this._resolve=$,this._reject=Y}),this._promise}resolve($){var Y;if(this.status={type:"resolved",value:$},this._promise)(Y=this._resolve)==null||Y.call(this,$)}reject($){var Y;if(this.status={type:"rejected",error:$},this._promise)(Y=this._reject)==null||Y.call(this,$)}isResolved(){return this.status.type==="resolved"}isRejected(){return this.status.type==="rejected"}isPending(){return this.status.type==="pending"}};function jI($){return Object.fromEntries([...$.headers])}var{btoa:pG9,atob:dG9}=globalThis;function RJ($){let Y=$.replace(/-/g,"+").replace(/_/g,"/"),X=dG9(Y);return Uint8Array.from(X,(G)=>G.codePointAt(0))}function $H($){let Y="";for(let X=0;X<$.length;X++)Y+=String.fromCodePoint($[X]);return pG9(Y)}function QK($){return $ instanceof Uint8Array?$H($):$}function k70($,Y={}){let{useArrayBrackets:X=!0}=Y,G=new FormData;for(let[J,Q]of Object.entries($)){if(Q==null)continue;if(Array.isArray(Q)){if(Q.length===1){G.append(J,Q[0]);continue}let W=X?`${J}[]`:J;for(let K of Q)G.append(W,K);continue}G.append(J,Q)}return G}var gV4="AI_DownloadError",mV4=`vercel.ai.error.${gV4}`,cG9=Symbol.for(mV4),kV4,vV4,MJ=class extends(vV4=X4,kV4=cG9,vV4){constructor({url:$,statusCode:Y,statusText:X,cause:G,message:J=G==null?`Failed to download ${$}: ${Y} ${X}`:`Failed to download ${$}: ${G}`}){super({name:gV4,message:J,cause:G});this[kV4]=!0,this.url=$,this.statusCode=Y,this.statusText=X}static isInstance($){return X4.hasMarker($,mV4)}},v70=2147483648;async function qu0({response:$,url:Y,maxBytes:X=v70}){let G=$.headers.get("content-length");if(G!=null){let z=parseInt(G,10);if(!isNaN(z)&&z>X)throw new MJ({url:Y,message:`Download of ${Y} exceeded maximum size of ${X} bytes (Content-Length: ${z}).`})}let J=$.body;if(J==null)return new Uint8Array(0);let Q=J.getReader(),W=[],K=0;try{while(!0){let{done:z,value:V}=await Q.read();if(z)break;if(K+=V.length,K>X)throw new MJ({url:Y,message:`Download of ${Y} exceeded maximum size of ${X} bytes.`});W.push(V)}}finally{try{await Q.cancel()}finally{Q.releaseLock()}}let Z=new Uint8Array(K),H=0;for(let z of W)Z.set(z,H),H+=z.length;return Z}function mu($){let Y;try{Y=new URL($)}catch(G){throw new MJ({url:$,message:`Invalid URL: ${$}`})}if(Y.protocol==="data:")return;if(Y.protocol!=="http:"&&Y.protocol!=="https:")throw new MJ({url:$,message:`URL scheme must be http, https, or data, got ${Y.protocol}`});let X=Y.hostname;if(!X)throw new MJ({url:$,message:"URL must have a hostname"});if(X==="localhost"||X.endsWith(".local")||X.endsWith(".localhost"))throw new MJ({url:$,message:`URL with hostname ${X} is not allowed`});if(X.startsWith("[")&&X.endsWith("]")){let G=X.slice(1,-1);if(lG9(G))throw new MJ({url:$,message:`URL with IPv6 address ${X} is not allowed`});return}if(uV4(X)){if(Eu0(X))throw new MJ({url:$,message:`URL with IP address ${X} is not allowed`});return}}function uV4($){let Y=$.split(".");if(Y.length!==4)return!1;return Y.every((X)=>{let G=Number(X);return Number.isInteger(G)&&G>=0&&G<=255&&String(G)===X})}function Eu0($){let Y=$.split(".").map(Number),[X,G]=Y;if(X===0)return!0;if(X===10)return!0;if(X===127)return!0;if(X===169&&G===254)return!0;if(X===172&&G>=16&&G<=31)return!0;if(X===192&&G===168)return!0;return!1}function lG9($){let Y=$.toLowerCase();if(Y==="::1")return!0;if(Y==="::")return!0;if(Y.startsWith("::ffff:")){let X=Y.slice(7);if(uV4(X))return Eu0(X);let G=X.split(":");if(G.length===2){let J=parseInt(G[0],16),Q=parseInt(G[1],16);if(!isNaN(J)&&!isNaN(Q)){let W=J>>8&255,K=J&255,Z=Q>>8&255,H=Q&255;return Eu0(`${W}.${K}.${Z}.${H}`)}}}if(Y.startsWith("fc")||Y.startsWith("fd"))return!0;if(Y.startsWith("fe80"))return!0;return!1}async function uu($,Y){var X,G;mu($);try{let J=await fetch($,{signal:Y==null?void 0:Y.abortSignal});if(J.redirected)mu(J.url);if(!J.ok)throw new MJ({url:$,statusCode:J.status,statusText:J.statusText});let Q=await qu0({response:J,url:$,maxBytes:(X=Y==null?void 0:Y.maxBytes)!=null?X:v70}),W=(G=J.headers.get("content-type"))!=null?G:void 0;return new Blob([Q],W?{type:W}:void 0)}catch(J){if(MJ.isInstance(J))throw J;throw new MJ({url:$,cause:J})}}var YH=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=()=>{let Q=X.length,W=Array(Y);for(let K=0;K<Y;K++)W[K]=X[Math.random()*Q|0];return W.join("")};if($==null)return J;if(X.includes(G))throw new C70({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return()=>`${$}${G}${J()}`},$$=YH();function uD($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function AV($){return($ instanceof Error||$ instanceof DOMException)&&($.name==="AbortError"||$.name==="ResponseAborted"||$.name==="TimeoutError")}var iG9=["fetch failed","failed to fetch"],nG9=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];function rG9($){if(!($ instanceof Error))return!1;let Y=$.code;if(typeof Y==="string"&&nG9.includes(Y))return!0;return!1}function pV4({error:$,url:Y,requestBodyValues:X}){if(AV($))return $;if($ instanceof TypeError&&iG9.includes($.message.toLowerCase())){let G=$.cause;if(G!=null)return new n8({message:`Cannot connect to API: ${G.message}`,cause:G,url:Y,requestBodyValues:X,isRetryable:!0})}if(rG9($))return new n8({message:`Cannot connect to API: ${$.message}`,cause:$,url:Y,requestBodyValues:X,isRetryable:!0});return $}function x70($=globalThis){var Y,X,G;if($.window)return"runtime/browser";if((Y=$.navigator)==null?void 0:Y.userAgent)return`runtime/${$.navigator.userAgent.toLowerCase()}`;if((G=(X=$.process)==null?void 0:X.versions)==null?void 0:G.node)return`runtime/node.js/${$.process.version.substring(0)}`;if($.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function aG9($){if($==null)return{};let Y={};if($ instanceof Headers)$.forEach((X,G)=>{Y[G.toLowerCase()]=X});else{if(!Array.isArray($))$=Object.entries($);for(let[X,G]of $)if(G!=null)Y[X.toLowerCase()]=G}return Y}function uW($,...Y){let X=new Headers(aG9($)),G=X.get("user-agent")||"";return X.set("user-agent",[G,...Y].filter(Boolean).join(" ")),Object.fromEntries(X.entries())}var dV4="4.0.27",sG9=()=>globalThis.fetch,zM=async({url:$,headers:Y={},successfulResponseHandler:X,failedResponseHandler:G,abortSignal:J,fetch:Q=sG9()})=>{try{let W=await Q($,{method:"GET",headers:uW(Y,`ai-sdk/provider-utils/${dV4}`,x70()),signal:J}),K=jI(W);if(!W.ok){let Z;try{Z=await G({response:W,url:$,requestBodyValues:{}})}catch(H){if(AV(H)||n8.isInstance(H))throw H;throw new n8({message:"Failed to process error response",cause:H,statusCode:W.status,url:$,responseHeaders:K,requestBodyValues:{}})}throw Z.value}try{return await X({response:W,url:$,requestBodyValues:{}})}catch(Z){if(Z instanceof Error){if(AV(Z)||n8.isInstance(Z))throw Z}throw new n8({message:"Failed to process successful response",cause:Z,statusCode:W.status,url:$,responseHeaders:K,requestBodyValues:{}})}}catch(W){throw pV4({error:W,url:$,requestBodyValues:{}})}};function pu($){return $!=null}function cV4({mediaType:$,url:Y,supportedUrls:X}){return Y=Y.toLowerCase(),$=$.toLowerCase(),Object.entries(X).map(([G,J])=>{let Q=G.toLowerCase();return Q==="*"||Q==="*/*"?{mediaTypePrefix:"",regexes:J}:{mediaTypePrefix:Q.replace(/\*/,""),regexes:J}}).filter(({mediaTypePrefix:G})=>$.startsWith(G)).flatMap(({regexes:G})=>G).some((G)=>G.test(Y))}function lV4({apiKey:$,environmentVariableName:Y,apiKeyParameterName:X="apiKey",description:G}){if(typeof $==="string")return $;if($!=null)throw new gu({message:`${G} API key must be a string.`});if(typeof process>"u")throw new gu({message:`${G} API key is missing. Pass it using the '${X}' parameter. Environment variables are not supported in this environment.`});if($=process.env[Y],$==null)throw new gu({message:`${G} API key is missing. Pass it using the '${X}' parameter or the ${Y} environment variable.`});if(typeof $!=="string")throw new gu({message:`${G} API key must be a string. The value of the ${Y} environment variable is not a string.`});return $}function pD({settingValue:$,environmentVariableName:Y}){if(typeof $==="string")return $;if($!=null||typeof process>"u")return;if($=process.env[Y],$==null||typeof $!=="string")return;return $}function iV4($){var Y;let[X,G=""]=$.toLowerCase().split("/");return(Y={mpeg:"mp3","x-wav":"wav",opus:"ogg",mp4:"m4a","x-m4a":"m4a"}[G])!=null?Y:G}var oG9=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,tG9=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function xV4($){let Y=JSON.parse($);if(Y===null||typeof Y!=="object")return Y;if(oG9.test($)===!1&&tG9.test($)===!1)return Y;return eG9(Y)}function eG9($){let Y=[$];while(Y.length){let X=Y;Y=[];for(let G of X){if(Object.prototype.hasOwnProperty.call(G,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(G,"constructor")&&G.constructor!==null&&typeof G.constructor==="object"&&Object.prototype.hasOwnProperty.call(G.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let J in G){let Q=G[J];if(Q&&typeof Q==="object")Y.push(Q)}}}return $}function Pu0($){let{stackTraceLimit:Y}=Error;try{Error.stackTraceLimit=0}catch(X){return xV4($)}try{return xV4($)}finally{Error.stackTraceLimit=Y}}function wu0($){if($.type==="object"||Array.isArray($.type)&&$.type.includes("object")){$.additionalProperties=!1;let{properties:X}=$;if(X!=null)for(let G of Object.keys(X))X[G]=UM(X[G])}if($.items!=null)$.items=Array.isArray($.items)?$.items.map(UM):UM($.items);if($.anyOf!=null)$.anyOf=$.anyOf.map(UM);if($.allOf!=null)$.allOf=$.allOf.map(UM);if($.oneOf!=null)$.oneOf=$.oneOf.map(UM);let{definitions:Y}=$;if(Y!=null)for(let X of Object.keys(Y))Y[X]=UM(Y[X]);return $}function UM($){if(typeof $==="boolean")return $;return wu0($)}var $J9=Symbol("Let zodToJsonSchema decide on which parser to use"),yV4={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},YJ9=($)=>typeof $==="string"?{...yV4,name:$}:{...yV4,...$};function mW(){return{}}function XJ9($,Y){var X,G,J;let Q={type:"array"};if(((X=$.type)==null?void 0:X._def)&&((J=(G=$.type)==null?void 0:G._def)==null?void 0:J.typeName)!==U0.ZodAny)Q.items=t9($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)Q.minItems=$.minLength.value;if($.maxLength)Q.maxItems=$.maxLength.value;if($.exactLength)Q.minItems=$.exactLength.value,Q.maxItems=$.exactLength.value;return Q}function GJ9($){let Y={type:"integer",format:"int64"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function JJ9(){return{type:"boolean"}}function nV4($,Y){return t9($.type._def,Y)}var QJ9=($,Y)=>{return t9($.innerType._def,Y)};function rV4($,Y,X){let G=X!=null?X:Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>rV4($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return WJ9($)}}var WJ9=($)=>{let Y={type:"integer",format:"unix-time"};for(let X of $.checks)switch(X.kind){case"min":Y.minimum=X.value;break;case"max":Y.maximum=X.value;break}return Y};function KJ9($,Y){return{...t9($.innerType._def,Y),default:$.defaultValue()}}function ZJ9($,Y){return Y.effectStrategy==="input"?t9($.schema._def,Y):mW()}function UJ9($){return{type:"string",enum:Array.from($.values)}}var HJ9=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $};function zJ9($,Y){let X=[t9($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),t9($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((J)=>!!J),G=[];return X.forEach((J)=>{if(HJ9(J))G.push(...J.allOf);else{let Q=J;if("additionalProperties"in J&&J.additionalProperties===!1){let{additionalProperties:W,...K}=J;Q=K}G.push(Q)}}),G.length?{allOf:G}:void 0}function VJ9($){let Y=typeof $.value;if(Y!=="bigint"&&Y!=="number"&&Y!=="boolean"&&Y!=="string")return{type:Array.isArray($.value)?"array":"object"};return{type:Y==="bigint"?"integer":Y,const:$.value}}var Bu0=void 0,UU={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(Bu0===void 0)Bu0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return Bu0},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function aV4($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value;break;case"max":X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"email":switch(Y.emailStrategy){case"format:email":HU(X,"email",G.message,Y);break;case"format:idn-email":HU(X,"idn-email",G.message,Y);break;case"pattern:zod":EJ(X,UU.email,G.message,Y);break}break;case"url":HU(X,"uri",G.message,Y);break;case"uuid":HU(X,"uuid",G.message,Y);break;case"regex":EJ(X,G.regex,G.message,Y);break;case"cuid":EJ(X,UU.cuid,G.message,Y);break;case"cuid2":EJ(X,UU.cuid2,G.message,Y);break;case"startsWith":EJ(X,RegExp(`^${Ou0(G.value,Y)}`),G.message,Y);break;case"endsWith":EJ(X,RegExp(`${Ou0(G.value,Y)}$`),G.message,Y);break;case"datetime":HU(X,"date-time",G.message,Y);break;case"date":HU(X,"date",G.message,Y);break;case"time":HU(X,"time",G.message,Y);break;case"duration":HU(X,"duration",G.message,Y);break;case"length":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"includes":{EJ(X,RegExp(Ou0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")HU(X,"ipv4",G.message,Y);if(G.version!=="v4")HU(X,"ipv6",G.message,Y);break}case"base64url":EJ(X,UU.base64url,G.message,Y);break;case"jwt":EJ(X,UU.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")EJ(X,UU.ipv4Cidr,G.message,Y);if(G.version!=="v4")EJ(X,UU.ipv6Cidr,G.message,Y);break}case"emoji":EJ(X,UU.emoji(),G.message,Y);break;case"ulid":{EJ(X,UU.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{HU(X,"binary",G.message,Y);break}case"contentEncoding:base64":{X.contentEncoding="base64";break}case"pattern:zod":{EJ(X,UU.base64,G.message,Y);break}}break}case"nanoid":EJ(X,UU.nanoid,G.message,Y);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return X}function Ou0($,Y){return Y.patternStrategy==="escape"?LJ9($):$}var FJ9=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function LJ9($){let Y="";for(let X=0;X<$.length;X++){if(!FJ9.has($[X]))Y+="\\";Y+=$[X]}return Y}function HU($,Y,X,G){var J;if($.format||((J=$.anyOf)==null?void 0:J.some((Q)=>Q.format))){if(!$.anyOf)$.anyOf=[];if($.format)$.anyOf.push({format:$.format}),delete $.format;$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else $.format=Y}function EJ($,Y,X,G){var J;if($.pattern||((J=$.allOf)==null?void 0:J.some((Q)=>Q.pattern))){if(!$.allOf)$.allOf=[];if($.pattern)$.allOf.push({pattern:$.pattern}),delete $.pattern;$.allOf.push({pattern:bV4(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else $.pattern=bV4(Y,G)}function bV4($,Y){var X;if(!Y.applyRegexFlags||!$.flags)return $.source;let G={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},J=G.i?$.source.toLowerCase():$.source,Q="",W=!1,K=!1,Z=!1;for(let H=0;H<J.length;H++){if(W){Q+=J[H],W=!1;continue}if(G.i){if(K){if(J[H].match(/[a-z]/)){if(Z)Q+=J[H],Q+=`${J[H-2]}-${J[H]}`.toUpperCase(),Z=!1;else if(J[H+1]==="-"&&((X=J[H+2])==null?void 0:X.match(/[a-z]/)))Q+=J[H],Z=!0;else Q+=`${J[H]}${J[H].toUpperCase()}`;continue}}else if(J[H].match(/[a-z]/)){Q+=`[${J[H]}${J[H].toUpperCase()}]`;continue}}if(G.m){if(J[H]==="^"){Q+=`(^|(?<=[\r
]))`;continue}else if(J[H]==="$"){Q+=`($|(?=[\r
]))`;continue}}if(G.s&&J[H]==="."){Q+=K?`${J[H]}\r
`:`[${J[H]}\r
]`;continue}if(Q+=J[H],J[H]==="\\")W=!0;else if(K&&J[H]==="]")K=!1;else if(!K&&J[H]==="[")K=!0}try{new RegExp(Q)}catch(H){return console.warn(`Could not convert regex pattern at ${Y.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),$.source}return Q}function sV4($,Y){var X,G,J,Q,W,K;let Z={type:"object",additionalProperties:(X=t9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]}))!=null?X:Y.allowedAdditionalProperties};if(((G=$.keyType)==null?void 0:G._def.typeName)===U0.ZodString&&((J=$.keyType._def.checks)==null?void 0:J.length)){let{type:H,...z}=aV4($.keyType._def,Y);return{...Z,propertyNames:z}}else if(((Q=$.keyType)==null?void 0:Q._def.typeName)===U0.ZodEnum)return{...Z,propertyNames:{enum:$.keyType._def.values}};else if(((W=$.keyType)==null?void 0:W._def.typeName)===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&((K=$.keyType._def.type._def.checks)==null?void 0:K.length)){let{type:H,...z}=nV4($.keyType._def,Y);return{...Z,propertyNames:z}}return Z}function DJ9($,Y){if(Y.mapStrategy==="record")return sV4($,Y);let X=t9($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||mW(),G=t9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||mW();return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function NJ9($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function AJ9(){return{not:mW()}}function BJ9(){return{type:"null"}}var Mu0={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function OJ9($,Y){let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in Mu0)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=Mu0[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,K)=>K.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return EJ9($,Y)}var EJ9=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>t9(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0};function MJ9($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length))return{type:[Mu0[$.innerType._def.typeName],"null"]};let X=t9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function RJ9($){let Y={type:"number"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"int":Y.type="integer";break;case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function qJ9($,Y){let X={type:"object",properties:{}},G=[],J=$.shape();for(let W in J){let K=J[W];if(K===void 0||K._def===void 0)continue;let Z=wJ9(K),H=t9(K._def,{...Y,currentPath:[...Y.currentPath,"properties",W],propertyPath:[...Y.currentPath,"properties",W]});if(H===void 0)continue;if(X.properties[W]=H,!Z)G.push(W)}if(G.length)X.required=G;let Q=PJ9($,Y);if(Q!==void 0)X.additionalProperties=Q;return X}function PJ9($,Y){if($.catchall._def.typeName!=="ZodNever")return t9($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function wJ9($){try{return $.isOptional()}catch(Y){return!0}}var _J9=($,Y)=>{var X;if(Y.currentPath.toString()===((X=Y.propertyPath)==null?void 0:X.toString()))return t9($.innerType._def,Y);let G=t9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return G?{anyOf:[{not:mW()},G]}:mW()},jJ9=($,Y)=>{if(Y.pipeStrategy==="input")return t9($.in._def,Y);else if(Y.pipeStrategy==="output")return t9($.out._def,Y);let X=t9($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=t9($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}};function TJ9($,Y){return t9($.type._def,Y)}function IJ9($,Y){let G={type:"array",uniqueItems:!0,items:t9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)G.minItems=$.minSize.value;if($.maxSize)G.maxItems=$.maxSize.value;return G}function CJ9($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>t9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:t9($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>t9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function SJ9(){return{not:mW()}}function kJ9(){return mW()}var vJ9=($,Y)=>{return t9($.innerType._def,Y)},xJ9=($,Y,X)=>{switch(Y){case U0.ZodString:return aV4($,X);case U0.ZodNumber:return RJ9($);case U0.ZodObject:return qJ9($,X);case U0.ZodBigInt:return GJ9($);case U0.ZodBoolean:return JJ9();case U0.ZodDate:return rV4($,X);case U0.ZodUndefined:return SJ9();case U0.ZodNull:return BJ9();case U0.ZodArray:return XJ9($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return OJ9($,X);case U0.ZodIntersection:return zJ9($,X);case U0.ZodTuple:return CJ9($,X);case U0.ZodRecord:return sV4($,X);case U0.ZodLiteral:return VJ9($);case U0.ZodEnum:return UJ9($);case U0.ZodNativeEnum:return NJ9($);case U0.ZodNullable:return MJ9($,X);case U0.ZodOptional:return _J9($,X);case U0.ZodMap:return DJ9($,X);case U0.ZodSet:return IJ9($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return TJ9($,X);case U0.ZodNaN:case U0.ZodNever:return AJ9();case U0.ZodEffects:return ZJ9($,X);case U0.ZodAny:return mW();case U0.ZodUnknown:return kJ9();case U0.ZodDefault:return KJ9($,X);case U0.ZodBranded:return nV4($,X);case U0.ZodReadonly:return vJ9($,X);case U0.ZodCatch:return QJ9($,X);case U0.ZodPipeline:return jJ9($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})(Y)}},yJ9=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")};function t9($,Y,X=!1){var G;let J=Y.seen.get($);if(Y.override){let Z=(G=Y.override)==null?void 0:G.call(Y,$,Y,J,X);if(Z!==$J9)return Z}if(J&&!X){let Z=bJ9(J,Y);if(Z!==void 0)return Z}let Q={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,Q);let W=xJ9($,$.typeName,Y),K=typeof W==="function"?t9(W(),Y):W;if(K)hJ9($,Y,K);if(Y.postProcess){let Z=Y.postProcess(K,$,Y);return Q.jsonSchema=K,Z}return Q.jsonSchema=K,K}var bJ9=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:yJ9(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),mW();return Y.$refStrategy==="seen"?mW():void 0}}},hJ9=($,Y,X)=>{if($.description)X.description=$.description;return X},fJ9=($)=>{let Y=YJ9($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}},gJ9=($,Y)=>{var X;let G=fJ9(Y),J=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((H,[z,V])=>{var F;return{...H,[z]:(F=t9(V._def,{...G,currentPath:[...G.basePath,G.definitionPath,z]},!0))!=null?F:mW()}},{}):void 0,Q=typeof Y==="string"?Y:(Y==null?void 0:Y.nameStrategy)==="title"?void 0:Y==null?void 0:Y.name,W=(X=t9($._def,Q===void 0?G:{...G,currentPath:[...G.basePath,G.definitionPath,Q]},!1))!=null?X:mW(),K=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(K!==void 0)W.title=K;let Z=Q===void 0?J?{...W,[G.definitionPath]:J}:W:{$ref:[...G.$refStrategy==="relative"?[]:G.basePath,G.definitionPath,Q].join("/"),[G.definitionPath]:{...J,[Q]:W}};return Z.$schema="http://json-schema.org/draft-07/schema#",Z},Ru0=Symbol.for("vercel.ai.schema");function N1($){let Y;return()=>{if(Y==null)Y=$();return Y}}function du($,{validate:Y}={}){return{[Ru0]:!0,_type:void 0,get jsonSchema(){if(typeof $==="function")$=$();return $},validate:Y}}function mJ9($){return typeof $==="object"&&$!==null&&Ru0 in $&&$[Ru0]===!0&&"jsonSchema"in $&&"validate"in $}function XH($){return $==null?du({properties:{},additionalProperties:!1}):mJ9($)?$:("~standard"in $)?$["~standard"].vendor==="zod"?z1($):uJ9($):$()}function uJ9($){return du(()=>wu0($["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async(Y)=>{let X=await $["~standard"].validate(Y);return"value"in X?{success:!0,value:X.value}:{success:!1,error:new ZU({value:Y,cause:X.issues})}}})}function pJ9($,Y){var X;let G=(X=Y==null?void 0:Y.useReferences)!=null?X:!1;return du(()=>gJ9($,{$refStrategy:G?"root":"none"}),{validate:async(J)=>{let Q=await $.safeParseAsync(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function dJ9($,Y){var X;let G=(X=Y==null?void 0:Y.useReferences)!=null?X:!1;return du(()=>wu0(e$($,{target:"draft-7",io:"input",reused:G?"ref":"inline"})),{validate:async(J)=>{let Q=await oX($,J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function cJ9($){return"_zod"in $}function z1($,Y){if(cJ9($))return dJ9($,Y);else return pJ9($,Y)}async function l5({value:$,schema:Y,context:X}){let G=await DG({value:$,schema:Y,context:X});if(!G.success)throw ZU.wrap({value:$,cause:G.error,context:X});return G.value}async function DG({value:$,schema:Y,context:X}){let G=XH(Y);try{if(G.validate==null)return{success:!0,value:$,rawValue:$};let J=await G.validate($);if(J.success)return{success:!0,value:J.value,rawValue:$};return{success:!1,error:ZU.wrap({value:$,cause:J.error,context:X}),rawValue:$}}catch(J){return{success:!1,error:ZU.wrap({value:$,cause:J,context:X}),rawValue:$}}}async function _u0({text:$,schema:Y}){try{let X=Pu0($);if(Y==null)return X;return l5({value:X,schema:Y})}catch(X){if(fu.isInstance(X)||ZU.isInstance(X))throw X;throw new fu({text:$,cause:X})}}async function kQ({text:$,schema:Y}){try{let X=Pu0($);if(Y==null)return{success:!0,value:X,rawValue:X};return await DG({value:X,schema:Y})}catch(X){return{success:!1,error:fu.isInstance(X)?X:new fu({text:$,cause:X}),rawValue:void 0}}}function TI($){try{return Pu0($),!0}catch(Y){return!1}}function y70({stream:$,schema:Y}){return $.pipeThrough(new TextDecoderStream).pipeThrough(new of).pipeThrough(new TransformStream({async transform({data:X},G){if(X==="[DONE]")return;G.enqueue(await kQ({text:X,schema:Y}))}}))}async function L9({provider:$,providerOptions:Y,schema:X}){if((Y==null?void 0:Y[$])==null)return;let G=await DG({value:Y[$],schema:X});if(!G.success)throw new C70({argument:"providerOptions",message:`invalid ${$} provider options`,cause:G.error});return G.value}var lJ9=()=>globalThis.fetch,T8=async({url:$,headers:Y,body:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>oV4({url:$,headers:{"Content-Type":"application/json",...Y},body:{content:JSON.stringify(X),values:X},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),II=async({url:$,headers:Y,formData:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>oV4({url:$,headers:Y,body:{content:X,values:Object.fromEntries(X.entries())},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),oV4=async({url:$,headers:Y={},body:X,successfulResponseHandler:G,failedResponseHandler:J,abortSignal:Q,fetch:W=lJ9()})=>{try{let K=await W($,{method:"POST",headers:uW(Y,`ai-sdk/provider-utils/${dV4}`,x70()),body:X.content,signal:Q}),Z=jI(K);if(!K.ok){let H;try{H=await J({response:K,url:$,requestBodyValues:X.values})}catch(z){if(AV(z)||n8.isInstance(z))throw z;throw new n8({message:"Failed to process error response",cause:z,statusCode:K.status,url:$,responseHeaders:Z,requestBodyValues:X.values})}throw H.value}try{return await G({response:K,url:$,requestBodyValues:X.values})}catch(H){if(H instanceof Error){if(AV(H)||n8.isInstance(H))throw H}throw new n8({message:"Failed to process successful response",cause:H,statusCode:K.status,url:$,responseHeaders:Z,requestBodyValues:X.values})}}catch(K){throw pV4({error:K,url:$,requestBodyValues:X.values})}};function cu($){return $}function tV4({id:$,inputSchema:Y}){return({execute:X,outputSchema:G,needsApproval:J,toModelOutput:Q,onInputStart:W,onInputDelta:K,onInputAvailable:Z,...H})=>cu({type:"provider",id:$,args:H,inputSchema:Y,outputSchema:G,execute:X,needsApproval:J,toModelOutput:Q,onInputStart:W,onInputDelta:K,onInputAvailable:Z})}function B$({id:$,inputSchema:Y,outputSchema:X,supportsDeferredResults:G}){return({execute:J,needsApproval:Q,toModelOutput:W,onInputStart:K,onInputDelta:Z,onInputAvailable:H,...z})=>cu({type:"provider",id:$,args:z,inputSchema:Y,outputSchema:X,execute:J,needsApproval:Q,toModelOutput:W,onInputStart:K,onInputDelta:Z,onInputAvailable:H,supportsDeferredResults:G})}async function S5($){if(typeof $==="function")$=$();return Promise.resolve($)}var e9=({errorSchema:$,errorToMessage:Y,isRetryable:X})=>async({response:G,url:J,requestBodyValues:Q})=>{let W=await G.text(),K=jI(G);if(W.trim()==="")return{responseHeaders:K,value:new n8({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,isRetryable:X==null?void 0:X(G)})};try{let Z=await _u0({text:W,schema:$});return{responseHeaders:K,value:new n8({message:Y(Z),url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,data:Z,isRetryable:X==null?void 0:X(G,Z)})}}catch(Z){return{responseHeaders:K,value:new n8({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,isRetryable:X==null?void 0:X(G)})}}},WK=($)=>async({response:Y})=>{let X=jI(Y);if(Y.body==null)throw new ZV4({});return{responseHeaders:X,value:y70({stream:Y.body,schema:$})}},O8=($)=>async({response:Y,url:X,requestBodyValues:G})=>{let J=await Y.text(),Q=await kQ({text:J,schema:$}),W=jI(Y);if(!Q.success)throw new n8({message:"Invalid JSON response",cause:Q.error,statusCode:Y.status,responseHeaders:W,responseBody:J,url:X,requestBodyValues:G});return{responseHeaders:W,value:Q.value,rawValue:Q.rawValue}},eV4=()=>async({response:$,url:Y,requestBodyValues:X})=>{let G=jI($);if(!$.body)throw new n8({message:"Response body is empty",url:Y,requestBodyValues:X,statusCode:$.status,responseHeaders:G,responseBody:void 0});try{let J=await $.arrayBuffer();return{responseHeaders:G,value:new Uint8Array(J)}}catch(J){throw new n8({message:"Failed to read response as array buffer",url:Y,requestBodyValues:X,statusCode:$.status,responseHeaders:G,responseBody:void 0,cause:J})}};function CI($){return $==null?void 0:$.replace(/\/$/,"")}function iJ9($){return $!=null&&typeof $[Symbol.asyncIterator]==="function"}async function*$F4({execute:$,input:Y,options:X}){let G=$(Y,X);if(iJ9(G)){let J;for await(let Q of G)J=Q,yield{type:"preliminary",output:Q};yield{type:"final",output:J}}else yield{type:"final",output:await G}}O1();O1();O1();O1();O1();O1();O1();O1();function SI($){return $.replace(/[_-]([a-z])/g,(Y)=>Y[1].toUpperCase())}function nJ9($,Y){let X=SI($);if(X!==$&&(Y==null?void 0:Y[X])!=null)return X;return $}var rJ9=U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.any().nullish(),code:U.union([U.string(),U.number()]).nullish()})}),nu={errorSchema:rJ9,errorToMessage:($)=>$.error.message};function aJ9($){var Y,X,G,J,Q,W;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let K=(Y=$.prompt_tokens)!=null?Y:0,Z=(X=$.completion_tokens)!=null?X:0,H=(J=(G=$.prompt_tokens_details)==null?void 0:G.cached_tokens)!=null?J:0,z=(W=(Q=$.completion_tokens_details)==null?void 0:Q.reasoning_tokens)!=null?W:0;return{inputTokens:{total:K,noCache:K-H,cacheRead:H,cacheWrite:void 0},outputTokens:{total:Z,text:Z-z,reasoning:z},raw:$}}function lu($){var Y,X;return(X=(Y=$==null?void 0:$.providerOptions)==null?void 0:Y.openaiCompatible)!=null?X:{}}function sJ9($){switch($){case"audio/wav":return"wav";case"audio/mp3":case"audio/mpeg":return"mp3";default:return null}}function oJ9($){var Y,X,G;let J=[];for(let{role:Q,content:W,...K}of $){let Z=lu({...K});switch(Q){case"system":{J.push({role:"system",content:W,...Z});break}case"user":{if(W.length===1&&W[0].type==="text"){J.push({role:"user",content:W[0].text,...lu(W[0])});break}J.push({role:"user",content:W.map((H)=>{var z;let V=lu(H);switch(H.type){case"text":return{type:"text",text:H.text,...V};case"file":{if(H.mediaType.startsWith("image/")){let F=H.mediaType==="image/*"?"image/jpeg":H.mediaType;return{type:"image_url",image_url:{url:H.data instanceof URL?H.data.toString():`data:${F};base64,${QK(H.data)}`},...V}}if(H.mediaType.startsWith("audio/")){if(H.data instanceof URL)throw new c5({functionality:"audio file parts with URLs"});let F=sJ9(H.mediaType);if(F===null)throw new c5({functionality:`audio media type ${H.mediaType}`});return{type:"input_audio",input_audio:{data:QK(H.data),format:F},...V}}if(H.mediaType==="application/pdf"){if(H.data instanceof URL)throw new c5({functionality:"PDF file parts with URLs"});return{type:"file",file:{filename:(z=H.filename)!=null?z:"document.pdf",file_data:`data:application/pdf;base64,${QK(H.data)}`},...V}}if(H.mediaType.startsWith("text/"))return{type:"text",text:H.data instanceof URL?H.data.toString():typeof H.data==="string"?new TextDecoder().decode(RJ(H.data)):new TextDecoder().decode(H.data),...V};throw new c5({functionality:`file part media type ${H.mediaType}`})}}}),...Z});break}case"assistant":{let H="",z="",V=[];for(let F of W){let L=lu(F);switch(F.type){case"text":{H+=F.text;break}case"reasoning":{z+=F.text;break}case"tool-call":{let N=(X=(Y=F.providerOptions)==null?void 0:Y.google)==null?void 0:X.thoughtSignature;V.push({id:F.toolCallId,type:"function",function:{name:F.toolName,arguments:JSON.stringify(F.input)},...L,...N?{extra_content:{google:{thought_signature:String(N)}}}:{}});break}}}J.push({role:"assistant",content:V.length>0?H||null:H,...z.length>0?{reasoning_content:z}:{},tool_calls:V.length>0?V:void 0,...Z});break}case"tool":{for(let H of W){if(H.type==="tool-approval-response")continue;let z=H.output,V;switch(z.type){case"text":case"error-text":V=z.value;break;case"execution-denied":V=(G=z.reason)!=null?G:"Tool execution denied.";break;case"content":case"json":case"error-json":V=JSON.stringify(z.value);break}let F=lu(H);J.push({role:"tool",tool_call_id:H.toolCallId,content:V,...F})}break}default:throw Error(`Unsupported role: ${Q}`)}}return J}function YF4({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function XF4($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var iu=U.object({user:U.string().optional(),reasoningEffort:U.string().optional(),textVerbosity:U.string().optional(),strictJsonSchema:U.boolean().optional()});function tJ9({tools:$,toolChoice:Y}){$=($==null?void 0:$.length)?$:void 0;let X=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:X};let G=[];for(let Q of $)if(Q.type==="provider")X.push({type:"unsupported",feature:`provider-defined tool ${Q.id}`});else G.push({type:"function",function:{name:Q.name,description:Q.description,parameters:Q.inputSchema,...Q.strict!=null?{strict:Q.strict}:{}}});if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:X};let J=Y.type;switch(J){case"auto":case"none":case"required":return{tools:G,toolChoice:J,toolWarnings:X};case"tool":return{tools:G,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:X};default:throw new c5({functionality:`tool choice type: ${J}`})}}var eJ9=class{constructor($,Y){this.specificationVersion="v3";var X,G;this.modelId=$,this.config=Y;let J=(X=Y.errorStructure)!=null?X:nu;this.chunkSchema=XQ9(J.errorSchema),this.failedResponseHandler=e9(J),this.supportsStructuredOutputs=(G=Y.supportsStructuredOutputs)!=null?G:!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var $,Y,X;return(X=(Y=($=this.config).supportedUrls)==null?void 0:Y.call($))!=null?X:{}}transformRequestBody($){var Y,X,G;return(G=(X=(Y=this.config).transformRequestBody)==null?void 0:X.call(Y,$))!=null?G:$}convertUsage($){var Y,X,G;return(G=(X=(Y=this.config).convertUsage)==null?void 0:X.call(Y,$))!=null?G:aJ9($)}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,providerOptions:K,stopSequences:Z,responseFormat:H,seed:z,toolChoice:V,tools:F}){var L,N,D,A,B;let O=[],E=await L9({provider:"openai-compatible",providerOptions:K,schema:iu});if(E!=null)O.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let M=Object.assign(E!=null?E:{},(L=await L9({provider:"openaiCompatible",providerOptions:K,schema:iu}))!=null?L:{},(N=await L9({provider:this.providerOptionsName,providerOptions:K,schema:iu}))!=null?N:{},(D=await L9({provider:SI(this.providerOptionsName),providerOptions:K,schema:iu}))!=null?D:{}),R=(A=M==null?void 0:M.strictJsonSchema)!=null?A:!0;if(J!=null)O.push({type:"unsupported",feature:"topK"});if((H==null?void 0:H.type)==="json"&&H.schema!=null&&!this.supportsStructuredOutputs)O.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:q,toolChoice:_,toolWarnings:P}=tJ9({tools:F,toolChoice:V});return{metadataKey:nJ9(this.providerOptionsName,K),args:{model:this.modelId,user:M.user,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,response_format:(H==null?void 0:H.type)==="json"?this.supportsStructuredOutputs===!0&&H.schema!=null?{type:"json_schema",json_schema:{schema:H.schema,strict:R,name:(B=H.name)!=null?B:"response",description:H.description}}:{type:"json_object"}:void 0,stop:Z,seed:z,...Object.fromEntries(Object.entries({...K==null?void 0:K[this.providerOptionsName],...K==null?void 0:K[SI(this.providerOptionsName)]}).filter(([j])=>!Object.keys(iu.shape).includes(j))),reasoning_effort:M.reasoningEffort,verbosity:M.textVerbosity,messages:oJ9($),tools:q,tool_choice:_},warnings:[...O,...P]}}async doGenerate($){var Y,X,G,J,Q,W,K,Z;let{args:H,warnings:z,metadataKey:V}=await this.getArgs({...$}),F=this.transformRequestBody(H),L=JSON.stringify(F),{responseHeaders:N,value:D,rawValue:A}=await T8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:F,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:O8($Q9),abortSignal:$.abortSignal,fetch:this.config.fetch}),B=D.choices[0],O=[],E=B.message.content;if(E!=null&&E.length>0)O.push({type:"text",text:E});let M=(Y=B.message.reasoning_content)!=null?Y:B.message.reasoning;if(M!=null&&M.length>0)O.push({type:"reasoning",text:M});if(B.message.tool_calls!=null)for(let _ of B.message.tool_calls){let P=(G=(X=_.extra_content)==null?void 0:X.google)==null?void 0:G.thought_signature;O.push({type:"tool-call",toolCallId:(J=_.id)!=null?J:$$(),toolName:_.function.name,input:_.function.arguments,...P?{providerMetadata:{[V]:{thoughtSignature:P}}}:{}})}let R={[V]:{},...await((W=(Q=this.config.metadataExtractor)==null?void 0:Q.extractMetadata)==null?void 0:W.call(Q,{parsedBody:A}))},q=(K=D.usage)==null?void 0:K.completion_tokens_details;if((q==null?void 0:q.accepted_prediction_tokens)!=null)R[V].acceptedPredictionTokens=q==null?void 0:q.accepted_prediction_tokens;if((q==null?void 0:q.rejected_prediction_tokens)!=null)R[V].rejectedPredictionTokens=q==null?void 0:q.rejected_prediction_tokens;return{content:O,finishReason:{unified:XF4(B.finish_reason),raw:(Z=B.finish_reason)!=null?Z:void 0},usage:this.convertUsage(D.usage),providerMetadata:R,request:{body:L},response:{...YF4(D),headers:N,body:A},warnings:z}}async doStream($){var Y;let{args:X,warnings:G,metadataKey:J}=await this.getArgs({...$}),Q=this.transformRequestBody({...X,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0}),W=(Y=this.config.metadataExtractor)==null?void 0:Y.createStreamExtractor(),{responseHeaders:K,value:Z}=await T8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:Q,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:WK(this.chunkSchema),abortSignal:$.abortSignal,fetch:this.config.fetch}),H=[],z={unified:"other",raw:void 0},V=void 0,F=!0,L=J,N=!1,D=!1,A=(B)=>this.convertUsage(B);return{stream:Z.pipeThrough(new TransformStream({start(B){B.enqueue({type:"stream-start",warnings:G})},transform(B,O){var E,M,R,q,_,P,w,j,C,k,S,I,v,x,y,d,u,b;if($.includeRawChunks)O.enqueue({type:"raw",rawValue:B.rawValue});if(!B.success){z={unified:"error",raw:void 0},O.enqueue({type:"error",error:B.error});return}if(W==null||W.processChunk(B.rawValue),"error"in B.value){z={unified:"error",raw:void 0},O.enqueue({type:"error",error:B.value.error.message});return}let g=B.value;if(F)F=!1,O.enqueue({type:"response-metadata",...YF4(g)});if(g.usage!=null)V=g.usage;let p=g.choices[0];if((p==null?void 0:p.finish_reason)!=null)z={unified:XF4(p.finish_reason),raw:(E=p.finish_reason)!=null?E:void 0};if((p==null?void 0:p.delta)==null)return;let h=p.delta,n=(M=h.reasoning_content)!=null?M:h.reasoning;if(n){if(!N)O.enqueue({type:"reasoning-start",id:"reasoning-0"}),N=!0;O.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:n})}if(h.content){if(N)O.enqueue({type:"reasoning-end",id:"reasoning-0"}),N=!1;if(!D)O.enqueue({type:"text-start",id:"txt-0"}),D=!0;O.enqueue({type:"text-delta",id:"txt-0",delta:h.content})}if(h.tool_calls!=null){if(N)O.enqueue({type:"reasoning-end",id:"reasoning-0"}),N=!1;for(let t of h.tool_calls){let s=(R=t.index)!=null?R:H.length;if(H[s]==null){if(t.id==null)throw new ZM({data:t,message:"Expected 'id' to be a string."});if(((q=t.function)==null?void 0:q.name)==null)throw new ZM({data:t,message:"Expected 'function.name' to be a string."});O.enqueue({type:"tool-input-start",id:t.id,toolName:t.function.name}),H[s]={id:t.id,type:"function",function:{name:t.function.name,arguments:(_=t.function.arguments)!=null?_:""},hasFinished:!1,thoughtSignature:(j=(w=(P=t.extra_content)==null?void 0:P.google)==null?void 0:w.thought_signature)!=null?j:void 0};let X0=H[s];if(((C=X0.function)==null?void 0:C.name)!=null&&((k=X0.function)==null?void 0:k.arguments)!=null){if(X0.function.arguments.length>0)O.enqueue({type:"tool-input-delta",id:X0.id,delta:X0.function.arguments});if(TI(X0.function.arguments))O.enqueue({type:"tool-input-end",id:X0.id}),O.enqueue({type:"tool-call",toolCallId:(S=X0.id)!=null?S:$$(),toolName:X0.function.name,input:X0.function.arguments,...X0.thoughtSignature?{providerMetadata:{[L]:{thoughtSignature:X0.thoughtSignature}}}:{}}),X0.hasFinished=!0}continue}let K0=H[s];if(K0.hasFinished)continue;if(((I=t.function)==null?void 0:I.arguments)!=null)K0.function.arguments+=(x=(v=t.function)==null?void 0:v.arguments)!=null?x:"";if(O.enqueue({type:"tool-input-delta",id:K0.id,delta:(y=t.function.arguments)!=null?y:""}),((d=K0.function)==null?void 0:d.name)!=null&&((u=K0.function)==null?void 0:u.arguments)!=null&&TI(K0.function.arguments))O.enqueue({type:"tool-input-end",id:K0.id}),O.enqueue({type:"tool-call",toolCallId:(b=K0.id)!=null?b:$$(),toolName:K0.function.name,input:K0.function.arguments,...K0.thoughtSignature?{providerMetadata:{[L]:{thoughtSignature:K0.thoughtSignature}}}:{}}),K0.hasFinished=!0}}},flush(B){var O,E,M,R,q;if(N)B.enqueue({type:"reasoning-end",id:"reasoning-0"});if(D)B.enqueue({type:"text-end",id:"txt-0"});for(let P of H.filter((w)=>!w.hasFinished))B.enqueue({type:"tool-input-end",id:P.id}),B.enqueue({type:"tool-call",toolCallId:(O=P.id)!=null?O:$$(),toolName:P.function.name,input:P.function.arguments,...P.thoughtSignature?{providerMetadata:{[L]:{thoughtSignature:P.thoughtSignature}}}:{}});let _={[L]:{},...W==null?void 0:W.buildMetadata()};if(((E=V==null?void 0:V.completion_tokens_details)==null?void 0:E.accepted_prediction_tokens)!=null)_[L].acceptedPredictionTokens=(M=V==null?void 0:V.completion_tokens_details)==null?void 0:M.accepted_prediction_tokens;if(((R=V==null?void 0:V.completion_tokens_details)==null?void 0:R.rejected_prediction_tokens)!=null)_[L].rejectedPredictionTokens=(q=V==null?void 0:V.completion_tokens_details)==null?void 0:q.rejected_prediction_tokens;B.enqueue({type:"finish",finishReason:z,usage:A(V),providerMetadata:_})}})),request:{body:Q},response:{headers:K}}}},UF4=U.looseObject({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish(),$Q9=U.looseObject({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({role:U.literal("assistant").nullish(),content:U.string().nullish(),reasoning_content:U.string().nullish(),reasoning:U.string().nullish(),tool_calls:U.array(U.object({id:U.string().nullish(),function:U.object({name:U.string(),arguments:U.string()}),extra_content:U.object({google:U.object({thought_signature:U.string().nullish()}).nullish()}).nullish()})).nullish()}),finish_reason:U.string().nullish()})),usage:UF4}),YQ9=U.looseObject({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).nullish(),content:U.string().nullish(),reasoning_content:U.string().nullish(),reasoning:U.string().nullish(),tool_calls:U.array(U.object({index:U.number().nullish(),id:U.string().nullish(),function:U.object({name:U.string().nullish(),arguments:U.string().nullish()}),extra_content:U.object({google:U.object({thought_signature:U.string().nullish()}).nullish()}).nullish()})).nullish()}).nullish(),finish_reason:U.string().nullish()})),usage:UF4}),XQ9=($)=>U.union([YQ9,$]);function GF4($){var Y,X;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let G=(Y=$.prompt_tokens)!=null?Y:0,J=(X=$.completion_tokens)!=null?X:0;return{inputTokens:{total:G,noCache:G,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:J,text:J,reasoning:void 0},raw:$}}function GQ9({prompt:$,user:Y="user",assistant:X="assistant"}){let G="";if($[0].role==="system")G+=`${$[0].content}

`,$=$.slice(1);for(let{role:J,content:Q}of $)switch(J){case"system":throw new JK({message:"Unexpected system message in prompt: ${content}",prompt:$});case"user":{let W=Q.map((K)=>{switch(K.type){case"text":return K.text}}).filter(Boolean).join("");G+=`${Y}:
${W}

`;break}case"assistant":{let W=Q.map((K)=>{switch(K.type){case"text":return K.text;case"tool-call":throw new c5({functionality:"tool-call messages"})}}).join("");G+=`${X}:
${W}

`;break}case"tool":throw new c5({functionality:"tool messages"});default:throw Error(`Unsupported role: ${J}`)}return G+=`${X}:
`,{prompt:G,stopSequences:[`
${Y}:`]}}function JF4({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function QF4($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var WF4=U.object({echo:U.boolean().optional(),logitBias:U.record(U.string(),U.number()).optional(),suffix:U.string().optional(),user:U.string().optional()}),JQ9=class{constructor($,Y){this.specificationVersion="v3";var X;this.modelId=$,this.config=Y;let G=(X=Y.errorStructure)!=null?X:nu;this.chunkSchema=WQ9(G.errorSchema),this.failedResponseHandler=e9(G)}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var $,Y,X;return(X=(Y=($=this.config).supportedUrls)==null?void 0:Y.call($))!=null?X:{}}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:K,responseFormat:Z,seed:H,providerOptions:z,tools:V,toolChoice:F}){var L,N;let D=[],A=Object.assign((L=await L9({provider:this.providerOptionsName,providerOptions:z,schema:WF4}))!=null?L:{},(N=await L9({provider:SI(this.providerOptionsName),providerOptions:z,schema:WF4}))!=null?N:{});if(J!=null)D.push({type:"unsupported",feature:"topK"});if(V==null?void 0:V.length)D.push({type:"unsupported",feature:"tools"});if(F!=null)D.push({type:"unsupported",feature:"toolChoice"});if(Z!=null&&Z.type!=="text")D.push({type:"unsupported",feature:"responseFormat",details:"JSON response format is not supported."});let{prompt:B,stopSequences:O}=GQ9({prompt:$}),E=[...O!=null?O:[],...K!=null?K:[]];return{args:{model:this.modelId,echo:A.echo,logit_bias:A.logitBias,suffix:A.suffix,user:A.user,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,seed:H,...z==null?void 0:z[this.providerOptionsName],...z==null?void 0:z[SI(this.providerOptionsName)],prompt:B,stop:E.length>0?E:void 0},warnings:D}}async doGenerate($){let{args:Y,warnings:X}=await this.getArgs($),{responseHeaders:G,value:J,rawValue:Q}=await T8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:Y,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:O8(QQ9),abortSignal:$.abortSignal,fetch:this.config.fetch}),W=J.choices[0],K=[];if(W.text!=null&&W.text.length>0)K.push({type:"text",text:W.text});return{content:K,usage:GF4(J.usage),finishReason:{unified:QF4(W.finish_reason),raw:W.finish_reason},request:{body:Y},response:{...JF4(J),headers:G,body:Q},warnings:X}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},{responseHeaders:J,value:Q}=await T8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:G,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:WK(this.chunkSchema),abortSignal:$.abortSignal,fetch:this.config.fetch}),W={unified:"other",raw:void 0},K=void 0,Z=!0;return{stream:Q.pipeThrough(new TransformStream({start(H){H.enqueue({type:"stream-start",warnings:X})},transform(H,z){var V;if($.includeRawChunks)z.enqueue({type:"raw",rawValue:H.rawValue});if(!H.success){W={unified:"error",raw:void 0},z.enqueue({type:"error",error:H.error});return}let F=H.value;if("error"in F){W={unified:"error",raw:void 0},z.enqueue({type:"error",error:F.error});return}if(Z)Z=!1,z.enqueue({type:"response-metadata",...JF4(F)}),z.enqueue({type:"text-start",id:"0"});if(F.usage!=null)K=F.usage;let L=F.choices[0];if((L==null?void 0:L.finish_reason)!=null)W={unified:QF4(L.finish_reason),raw:(V=L.finish_reason)!=null?V:void 0};if((L==null?void 0:L.text)!=null)z.enqueue({type:"text-delta",id:"0",delta:L.text})},flush(H){if(!Z)H.enqueue({type:"text-end",id:"0"});H.enqueue({type:"finish",finishReason:W,usage:GF4(K)})}})),request:{body:G},response:{headers:J}}}},HF4=U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}),QQ9=U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string()})),usage:HF4.nullish()}),WQ9=($)=>U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string().nullish(),index:U.number()})),usage:HF4.nullish()}),$]),ju0=U.object({dimensions:U.number().optional(),user:U.string().optional()}),KQ9=class{constructor($,Y){this.specificationVersion="v3",this.modelId=$,this.config=Y}get provider(){return this.config.provider}get maxEmbeddingsPerCall(){var $;return($=this.config.maxEmbeddingsPerCall)!=null?$:2048}get supportsParallelCalls(){var $;return($=this.config.supportsParallelCalls)!=null?$:!0}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J,Q,W;let K=[],Z=await L9({provider:"openai-compatible",providerOptions:G,schema:ju0});if(Z!=null)K.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let H=Object.assign(Z!=null?Z:{},(J=await L9({provider:"openaiCompatible",providerOptions:G,schema:ju0}))!=null?J:{},(Q=await L9({provider:this.providerOptionsName,providerOptions:G,schema:ju0}))!=null?Q:{});if($.length>this.maxEmbeddingsPerCall)throw new S70({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:$});let{responseHeaders:z,value:V,rawValue:F}=await T8({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:i6(this.config.headers(),Y),body:{model:this.modelId,input:$,encoding_format:"float",dimensions:H.dimensions,user:H.user},failedResponseHandler:e9((W=this.config.errorStructure)!=null?W:nu),successfulResponseHandler:O8(ZQ9),abortSignal:X,fetch:this.config.fetch});return{warnings:K,embeddings:V.data.map((L)=>L.embedding),usage:V.usage?{tokens:V.usage.prompt_tokens}:void 0,providerMetadata:V.providerMetadata,response:{headers:z,body:F}}}},ZQ9=U.object({data:U.array(U.object({embedding:U.array(U.number())})),usage:U.object({prompt_tokens:U.number()}).nullish(),providerMetadata:U.record(U.string(),U.record(U.string(),U.any())).optional()}),UQ9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxImagesPerCall=10}get provider(){return this.config.provider}get providerOptionsKey(){return this.config.provider.split(".")[0].trim()}getArgs($){return{...$[this.providerOptionsKey],...$[SI(this.providerOptionsKey)]}}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,providerOptions:Q,headers:W,abortSignal:K,files:Z,mask:H}){var z,V,F,L,N;let D=[];if(G!=null)D.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."});if(J!=null)D.push({type:"unsupported",feature:"seed"});let A=(F=(V=(z=this.config._internal)==null?void 0:z.currentDate)==null?void 0:V.call(z))!=null?F:new Date,B=this.getArgs(Q);if(Z!=null&&Z.length>0){let{value:M,responseHeaders:R}=await II({url:this.config.url({path:"/images/edits",modelId:this.modelId}),headers:i6(this.config.headers(),W),formData:k70({model:this.modelId,prompt:$,image:await Promise.all(Z.map((q)=>ZF4(q))),mask:H!=null?await ZF4(H):void 0,n:Y,size:X,...B}),failedResponseHandler:e9((L=this.config.errorStructure)!=null?L:nu),successfulResponseHandler:O8(KF4),abortSignal:K,fetch:this.config.fetch});return{images:M.data.map((q)=>q.b64_json),warnings:D,response:{timestamp:A,modelId:this.modelId,headers:R}}}let{value:O,responseHeaders:E}=await T8({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:i6(this.config.headers(),W),body:{model:this.modelId,prompt:$,n:Y,size:X,...B,response_format:"b64_json"},failedResponseHandler:e9((N=this.config.errorStructure)!=null?N:nu),successfulResponseHandler:O8(KF4),abortSignal:K,fetch:this.config.fetch});return{images:O.data.map((M)=>M.b64_json),warnings:D,response:{timestamp:A,modelId:this.modelId,headers:E}}}},KF4=U.object({data:U.array(U.object({b64_json:U.string()}))});async function ZF4($){if($.type==="url")return uu($.url);let Y=$.data instanceof Uint8Array?$.data:RJ($.data);return new Blob([Y],{type:$.mediaType})}var HQ9="2.0.47";function zU($){let Y=CI($.baseURL),X=$.name,G={...$.apiKey&&{Authorization:`Bearer ${$.apiKey}`},...$.headers},J=()=>uW(G,`ai-sdk/openai-compatible/${HQ9}`),Q=(F)=>({provider:`${X}.${F}`,url:({path:L})=>{let N=new URL(`${Y}${L}`);if($.queryParams)N.search=new URLSearchParams($.queryParams).toString();return N.toString()},headers:J,fetch:$.fetch}),W=(F)=>K(F),K=(F)=>new eJ9(F,{...Q("chat"),includeUsage:$.includeUsage,supportsStructuredOutputs:$.supportsStructuredOutputs,supportedUrls:$.supportedUrls,transformRequestBody:$.transformRequestBody,metadataExtractor:$.metadataExtractor,convertUsage:$.convertUsage}),Z=(F)=>new JQ9(F,{...Q("completion"),includeUsage:$.includeUsage}),H=(F)=>new KQ9(F,{...Q("embedding")}),z=(F)=>new UQ9(F,Q("image")),V=(F)=>W(F);return V.specificationVersion="v3",V.languageModel=W,V.chatModel=K,V.completionModel=Z,V.embeddingModel=H,V.textEmbeddingModel=H,V.imageModel=z,V}O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();var xu0=U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.any().nullish(),code:U.union([U.string(),U.number()]).nullish()})}),VU=e9({errorSchema:xu0,errorToMessage:($)=>$.error.message});function _F4($){let Y=$.startsWith("o3")||$.startsWith("o4-mini")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-chat"),X=$.startsWith("gpt-4")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-nano")&&!$.startsWith("gpt-5-chat")&&!$.startsWith("gpt-5.4-nano")||$.startsWith("o3")||$.startsWith("o4-mini"),G=$.startsWith("o1")||$.startsWith("o3")||$.startsWith("o4-mini")||$.startsWith("gpt-5")&&!$.startsWith("gpt-5-chat"),J=$.startsWith("gpt-5.1")||$.startsWith("gpt-5.2")||$.startsWith("gpt-5.3")||$.startsWith("gpt-5.4")||$.startsWith("gpt-5.5");return{supportsFlexProcessing:Y,supportsPriorityProcessing:X,isReasoningModel:G,systemMessageMode:G?"developer":"system",supportsNonReasoningParameters:J}}function zF4($){var Y,X,G,J,Q,W;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let K=(Y=$.prompt_tokens)!=null?Y:0,Z=(X=$.completion_tokens)!=null?X:0,H=(J=(G=$.prompt_tokens_details)==null?void 0:G.cached_tokens)!=null?J:0,z=(W=(Q=$.completion_tokens_details)==null?void 0:Q.reasoning_tokens)!=null?W:0;return{inputTokens:{total:K,noCache:K-H,cacheRead:H,cacheWrite:void 0},outputTokens:{total:Z,text:Z-z,reasoning:z},raw:$}}function zQ9($){return JSON.stringify($===void 0?{}:$)}function VQ9({prompt:$,systemMessageMode:Y="system"}){var X;let G=[],J=[];for(let{role:Q,content:W}of $)switch(Q){case"system":{switch(Y){case"system":{G.push({role:"system",content:W});break}case"developer":{G.push({role:"developer",content:W});break}case"remove":{J.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Y}`)}break}case"user":{if(W.length===1&&W[0].type==="text"){G.push({role:"user",content:W[0].text});break}G.push({role:"user",content:W.map((K,Z)=>{var H,z,V;switch(K.type){case"text":return{type:"text",text:K.text};case"file":if(K.mediaType.startsWith("image/")){let F=K.mediaType==="image/*"?"image/jpeg":K.mediaType;return{type:"image_url",image_url:{url:K.data instanceof URL?K.data.toString():`data:${F};base64,${QK(K.data)}`,detail:(z=(H=K.providerOptions)==null?void 0:H.openai)==null?void 0:z.imageDetail}}}else if(K.mediaType.startsWith("audio/")){if(K.data instanceof URL)throw new c5({functionality:"audio file parts with URLs"});switch(K.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:QK(K.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:QK(K.data),format:"mp3"}};default:throw new c5({functionality:`audio content parts with media type ${K.mediaType}`})}}else if(K.mediaType==="application/pdf"){if(K.data instanceof URL)throw new c5({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof K.data==="string"&&K.data.startsWith("file-")?{file_id:K.data}:{filename:(V=K.filename)!=null?V:`part-${Z}.pdf`,file_data:`data:application/pdf;base64,${QK(K.data)}`}}}else throw new c5({functionality:`file part media type ${K.mediaType}`})}})});break}case"assistant":{let K="",Z=[];for(let H of W)switch(H.type){case"text":{K+=H.text;break}case"tool-call":{Z.push({id:H.toolCallId,type:"function",function:{name:H.toolName,arguments:zQ9(H.input)}});break}}G.push({role:"assistant",content:Z.length>0?K||null:K,tool_calls:Z.length>0?Z:void 0});break}case"tool":{for(let K of W){if(K.type==="tool-approval-response")continue;let Z=K.output,H;switch(Z.type){case"text":case"error-text":H=Z.value;break;case"execution-denied":H=(X=Z.reason)!=null?X:"Tool execution denied.";break;case"content":case"json":case"error-json":H=JSON.stringify(Z.value);break}G.push({role:"tool",tool_call_id:K.toolCallId,content:H})}break}default:throw Error(`Unsupported role: ${Q}`)}return{messages:G,warnings:J}}function Tu0({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X?new Date(X*1000):void 0}}function VF4($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var FQ9=N1(()=>z1(U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({message:U.object({role:U.literal("assistant").nullish(),content:U.string().nullish(),tool_calls:U.array(U.object({id:U.string().nullish(),type:U.literal("function"),function:U.object({name:U.string(),arguments:U.string()})})).nullish(),annotations:U.array(U.object({type:U.literal("url_citation"),url_citation:U.object({start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()})})).nullish()}),index:U.number(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}).nullish(),finish_reason:U.string().nullish()})),usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish()}))),LQ9=N1(()=>z1(U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({delta:U.object({role:U.enum(["assistant"]).nullish(),content:U.string().nullish(),tool_calls:U.array(U.object({index:U.number(),id:U.string().nullish(),type:U.literal("function").nullish(),function:U.object({name:U.string().nullish(),arguments:U.string().nullish()})})).nullish(),annotations:U.array(U.object({type:U.literal("url_citation"),url_citation:U.object({start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()})})).nullish()}).nullish(),logprobs:U.object({content:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}).nullish(),finish_reason:U.string().nullish(),index:U.number()})),usage:U.object({prompt_tokens:U.number().nullish(),completion_tokens:U.number().nullish(),total_tokens:U.number().nullish(),prompt_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),completion_tokens_details:U.object({reasoning_tokens:U.number().nullish(),accepted_prediction_tokens:U.number().nullish(),rejected_prediction_tokens:U.number().nullish()}).nullish()}).nullish()}),xu0]))),DQ9=N1(()=>z1(U.object({logitBias:U.record(U.coerce.number(),U.number()).optional(),logprobs:U.union([U.boolean(),U.number()]).optional(),parallelToolCalls:U.boolean().optional(),user:U.string().optional(),reasoningEffort:U.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:U.number().optional(),store:U.boolean().optional(),metadata:U.record(U.string().max(64),U.string().max(512)).optional(),prediction:U.record(U.string(),U.any()).optional(),serviceTier:U.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:U.boolean().optional(),textVerbosity:U.enum(["low","medium","high"]).optional(),promptCacheKey:U.string().optional(),promptCacheRetention:U.enum(["in_memory","24h"]).optional(),safetyIdentifier:U.string().optional(),systemMessageMode:U.enum(["system","developer","remove"]).optional(),forceReasoning:U.boolean().optional()})));function NQ9({tools:$,toolChoice:Y}){$=($==null?void 0:$.length)?$:void 0;let X=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:X};let G=[];for(let Q of $)switch(Q.type){case"function":G.push({type:"function",function:{name:Q.name,description:Q.description,parameters:Q.inputSchema,...Q.strict!=null?{strict:Q.strict}:{}}});break;default:X.push({type:"unsupported",feature:`tool type: ${Q.type}`});break}if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:X};let J=Y.type;switch(J){case"auto":case"none":case"required":return{tools:G,toolChoice:J,toolWarnings:X};case"tool":return{tools:G,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:X};default:throw new c5({functionality:`tool choice type: ${J}`})}}var AQ9=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:K,responseFormat:Z,seed:H,tools:z,toolChoice:V,providerOptions:F}){var L,N,D,A,B;let O=[],E=(L=await L9({provider:"openai",providerOptions:F,schema:DQ9}))!=null?L:{},M=_F4(this.modelId),R=(N=E.forceReasoning)!=null?N:M.isReasoningModel;if(J!=null)O.push({type:"unsupported",feature:"topK"});let{messages:q,warnings:_}=VQ9({prompt:$,systemMessageMode:(D=E.systemMessageMode)!=null?D:R?"developer":M.systemMessageMode});O.push(..._);let P=(A=E.strictJsonSchema)!=null?A:!0,w={model:this.modelId,logit_bias:E.logitBias,logprobs:E.logprobs===!0||typeof E.logprobs==="number"?!0:void 0,top_logprobs:typeof E.logprobs==="number"?E.logprobs:typeof E.logprobs==="boolean"?E.logprobs?0:void 0:void 0,user:E.user,parallel_tool_calls:E.parallelToolCalls,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,response_format:(Z==null?void 0:Z.type)==="json"?Z.schema!=null?{type:"json_schema",json_schema:{schema:Z.schema,strict:P,name:(B=Z.name)!=null?B:"response",description:Z.description}}:{type:"json_object"}:void 0,stop:K,seed:H,verbosity:E.textVerbosity,max_completion_tokens:E.maxCompletionTokens,store:E.store,metadata:E.metadata,prediction:E.prediction,reasoning_effort:E.reasoningEffort,service_tier:E.serviceTier,prompt_cache_key:E.promptCacheKey,prompt_cache_retention:E.promptCacheRetention,safety_identifier:E.safetyIdentifier,messages:q};if(R){if(E.reasoningEffort!=="none"||!M.supportsNonReasoningParameters){if(w.temperature!=null)w.temperature=void 0,O.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(w.top_p!=null)w.top_p=void 0,O.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"});if(w.logprobs!=null)w.logprobs=void 0,O.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(w.frequency_penalty!=null)w.frequency_penalty=void 0,O.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(w.presence_penalty!=null)w.presence_penalty=void 0,O.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(w.logit_bias!=null)w.logit_bias=void 0,O.push({type:"other",message:"logitBias is not supported for reasoning models"});if(w.top_logprobs!=null)w.top_logprobs=void 0,O.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(w.max_tokens!=null){if(w.max_completion_tokens==null)w.max_completion_tokens=w.max_tokens;w.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(w.temperature!=null)w.temperature=void 0,O.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(E.serviceTier==="flex"&&!M.supportsFlexProcessing)O.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),w.service_tier=void 0;if(E.serviceTier==="priority"&&!M.supportsPriorityProcessing)O.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),w.service_tier=void 0;let{tools:j,toolChoice:C,toolWarnings:k}=NQ9({tools:z,toolChoice:V});return{args:{...w,tools:j,tool_choice:C},warnings:[...O,...k]}}async doGenerate($){var Y,X,G,J,Q,W,K;let{args:Z,warnings:H}=await this.getArgs($),{responseHeaders:z,value:V,rawValue:F}=await T8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:Z,failedResponseHandler:VU,successfulResponseHandler:O8(FQ9),abortSignal:$.abortSignal,fetch:this.config.fetch}),L=V.choices[0],N=[],D=L.message.content;if(D!=null&&D.length>0)N.push({type:"text",text:D});for(let E of(Y=L.message.tool_calls)!=null?Y:[])N.push({type:"tool-call",toolCallId:(X=E.id)!=null?X:$$(),toolName:E.function.name,input:E.function.arguments});for(let E of(G=L.message.annotations)!=null?G:[])N.push({type:"source",sourceType:"url",id:$$(),url:E.url_citation.url,title:E.url_citation.title});let A=(J=V.usage)==null?void 0:J.completion_tokens_details,B=(Q=V.usage)==null?void 0:Q.prompt_tokens_details,O={openai:{}};if((A==null?void 0:A.accepted_prediction_tokens)!=null)O.openai.acceptedPredictionTokens=A==null?void 0:A.accepted_prediction_tokens;if((A==null?void 0:A.rejected_prediction_tokens)!=null)O.openai.rejectedPredictionTokens=A==null?void 0:A.rejected_prediction_tokens;if(((W=L.logprobs)==null?void 0:W.content)!=null)O.openai.logprobs=L.logprobs.content;return{content:N,finishReason:{unified:VF4(L.finish_reason),raw:(K=L.finish_reason)!=null?K:void 0},usage:zF4(V.usage),request:{body:Z},response:{...Tu0(V),headers:z,body:F},warnings:H,providerMetadata:O}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:Q}=await T8({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:G,failedResponseHandler:VU,successfulResponseHandler:WK(LQ9),abortSignal:$.abortSignal,fetch:this.config.fetch}),W=[],K={unified:"other",raw:void 0},Z=void 0,H=!1,z=!1,V={openai:{}};return{stream:Q.pipeThrough(new TransformStream({start(F){F.enqueue({type:"stream-start",warnings:X})},transform(F,L){var N,D,A,B,O,E,M,R,q,_,P,w,j,C,k,S,I;if($.includeRawChunks)L.enqueue({type:"raw",rawValue:F.rawValue});if(!F.success){K={unified:"error",raw:void 0},L.enqueue({type:"error",error:F.error});return}let v=F.value;if("error"in v){K={unified:"error",raw:void 0},L.enqueue({type:"error",error:v.error});return}if(!H){let d=Tu0(v);if(Object.values(d).some(Boolean))H=!0,L.enqueue({type:"response-metadata",...Tu0(v)})}if(v.usage!=null){if(Z=v.usage,((N=v.usage.completion_tokens_details)==null?void 0:N.accepted_prediction_tokens)!=null)V.openai.acceptedPredictionTokens=(D=v.usage.completion_tokens_details)==null?void 0:D.accepted_prediction_tokens;if(((A=v.usage.completion_tokens_details)==null?void 0:A.rejected_prediction_tokens)!=null)V.openai.rejectedPredictionTokens=(B=v.usage.completion_tokens_details)==null?void 0:B.rejected_prediction_tokens}let x=v.choices[0];if((x==null?void 0:x.finish_reason)!=null)K={unified:VF4(x.finish_reason),raw:x.finish_reason};if(((O=x==null?void 0:x.logprobs)==null?void 0:O.content)!=null)V.openai.logprobs=x.logprobs.content;if((x==null?void 0:x.delta)==null)return;let y=x.delta;if(y.content!=null){if(!z)L.enqueue({type:"text-start",id:"0"}),z=!0;L.enqueue({type:"text-delta",id:"0",delta:y.content})}if(y.tool_calls!=null)for(let d of y.tool_calls){let u=d.index;if(W[u]==null){if(d.type!=null&&d.type!=="function")throw new ZM({data:d,message:"Expected 'function' type."});if(d.id==null)throw new ZM({data:d,message:"Expected 'id' to be a string."});if(((E=d.function)==null?void 0:E.name)==null)throw new ZM({data:d,message:"Expected 'function.name' to be a string."});L.enqueue({type:"tool-input-start",id:d.id,toolName:d.function.name}),W[u]={id:d.id,type:"function",function:{name:d.function.name,arguments:(M=d.function.arguments)!=null?M:""},hasFinished:!1};let g=W[u];if(((R=g.function)==null?void 0:R.name)!=null&&((q=g.function)==null?void 0:q.arguments)!=null){if(g.function.arguments.length>0)L.enqueue({type:"tool-input-delta",id:g.id,delta:g.function.arguments});if(TI(g.function.arguments))L.enqueue({type:"tool-input-end",id:g.id}),L.enqueue({type:"tool-call",toolCallId:(_=g.id)!=null?_:$$(),toolName:g.function.name,input:g.function.arguments}),g.hasFinished=!0}continue}let b=W[u];if(b.hasFinished)continue;if(((P=d.function)==null?void 0:P.arguments)!=null)b.function.arguments+=(j=(w=d.function)==null?void 0:w.arguments)!=null?j:"";if(L.enqueue({type:"tool-input-delta",id:b.id,delta:(C=d.function.arguments)!=null?C:""}),((k=b.function)==null?void 0:k.name)!=null&&((S=b.function)==null?void 0:S.arguments)!=null&&TI(b.function.arguments))L.enqueue({type:"tool-input-end",id:b.id}),L.enqueue({type:"tool-call",toolCallId:(I=b.id)!=null?I:$$(),toolName:b.function.name,input:b.function.arguments}),b.hasFinished=!0}if(y.annotations!=null)for(let d of y.annotations)L.enqueue({type:"source",sourceType:"url",id:$$(),url:d.url_citation.url,title:d.url_citation.title})},flush(F){if(z)F.enqueue({type:"text-end",id:"0"});F.enqueue({type:"finish",finishReason:K,usage:zF4(Z),...V!=null?{providerMetadata:V}:{}})}})),request:{body:G},response:{headers:J}}}};function FF4($){var Y,X,G,J;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let Q=(Y=$.prompt_tokens)!=null?Y:0,W=(X=$.completion_tokens)!=null?X:0;return{inputTokens:{total:(G=$.prompt_tokens)!=null?G:void 0,noCache:Q,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(J=$.completion_tokens)!=null?J:void 0,text:W,reasoning:void 0},raw:$}}function BQ9({prompt:$,user:Y="user",assistant:X="assistant"}){let G="";if($[0].role==="system")G+=`${$[0].content}

`,$=$.slice(1);for(let{role:J,content:Q}of $)switch(J){case"system":throw new JK({message:"Unexpected system message in prompt: ${content}",prompt:$});case"user":{let W=Q.map((K)=>{switch(K.type){case"text":return K.text}}).filter(Boolean).join("");G+=`${Y}:
${W}

`;break}case"assistant":{let W=Q.map((K)=>{switch(K.type){case"text":return K.text;case"tool-call":throw new c5({functionality:"tool-call messages"})}}).join("");G+=`${X}:
${W}

`;break}case"tool":throw new c5({functionality:"tool messages"});default:throw Error(`Unsupported role: ${J}`)}return G+=`${X}:
`,{prompt:G,stopSequences:[`
${Y}:`]}}function LF4({id:$,model:Y,created:X}){return{id:$!=null?$:void 0,modelId:Y!=null?Y:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function DF4($){switch($){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var OQ9=N1(()=>z1(U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string(),logprobs:U.object({tokens:U.array(U.string()),token_logprobs:U.array(U.number()),top_logprobs:U.array(U.record(U.string(),U.number())).nullish()}).nullish()})),usage:U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}).nullish()}))),EQ9=N1(()=>z1(U.union([U.object({id:U.string().nullish(),created:U.number().nullish(),model:U.string().nullish(),choices:U.array(U.object({text:U.string(),finish_reason:U.string().nullish(),index:U.number(),logprobs:U.object({tokens:U.array(U.string()),token_logprobs:U.array(U.number()),top_logprobs:U.array(U.record(U.string(),U.number())).nullish()}).nullish()})),usage:U.object({prompt_tokens:U.number(),completion_tokens:U.number(),total_tokens:U.number()}).nullish()}),xu0]))),NF4=N1(()=>z1(U.object({echo:U.boolean().optional(),logitBias:U.record(U.string(),U.number()).optional(),suffix:U.string().optional(),user:U.string().optional(),logprobs:U.union([U.boolean(),U.number()]).optional()}))),MQ9=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={},this.modelId=$,this.config=Y}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get provider(){return this.config.provider}async getArgs({prompt:$,maxOutputTokens:Y,temperature:X,topP:G,topK:J,frequencyPenalty:Q,presencePenalty:W,stopSequences:K,responseFormat:Z,tools:H,toolChoice:z,seed:V,providerOptions:F}){let L=[],N={...await L9({provider:"openai",providerOptions:F,schema:NF4}),...await L9({provider:this.providerOptionsName,providerOptions:F,schema:NF4})};if(J!=null)L.push({type:"unsupported",feature:"topK"});if(H==null?void 0:H.length)L.push({type:"unsupported",feature:"tools"});if(z!=null)L.push({type:"unsupported",feature:"toolChoice"});if(Z!=null&&Z.type!=="text")L.push({type:"unsupported",feature:"responseFormat",details:"JSON response format is not supported."});let{prompt:D,stopSequences:A}=BQ9({prompt:$}),B=[...A!=null?A:[],...K!=null?K:[]];return{args:{model:this.modelId,echo:N.echo,logit_bias:N.logitBias,logprobs:(N==null?void 0:N.logprobs)===!0?0:(N==null?void 0:N.logprobs)===!1?void 0:N==null?void 0:N.logprobs,suffix:N.suffix,user:N.user,max_tokens:Y,temperature:X,top_p:G,frequency_penalty:Q,presence_penalty:W,seed:V,prompt:D,stop:B.length>0?B:void 0},warnings:L}}async doGenerate($){var Y;let{args:X,warnings:G}=await this.getArgs($),{responseHeaders:J,value:Q,rawValue:W}=await T8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:X,failedResponseHandler:VU,successfulResponseHandler:O8(OQ9),abortSignal:$.abortSignal,fetch:this.config.fetch}),K=Q.choices[0],Z={openai:{}};if(K.logprobs!=null)Z.openai.logprobs=K.logprobs;return{content:[{type:"text",text:K.text}],usage:FF4(Q.usage),finishReason:{unified:DF4(K.finish_reason),raw:(Y=K.finish_reason)!=null?Y:void 0},request:{body:X},response:{...LF4(Q),headers:J,body:W},providerMetadata:Z,warnings:G}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:Q}=await T8({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:G,failedResponseHandler:VU,successfulResponseHandler:WK(EQ9),abortSignal:$.abortSignal,fetch:this.config.fetch}),W={unified:"other",raw:void 0},K={openai:{}},Z=void 0,H=!0;return{stream:Q.pipeThrough(new TransformStream({start(z){z.enqueue({type:"stream-start",warnings:X})},transform(z,V){if($.includeRawChunks)V.enqueue({type:"raw",rawValue:z.rawValue});if(!z.success){W={unified:"error",raw:void 0},V.enqueue({type:"error",error:z.error});return}let F=z.value;if("error"in F){W={unified:"error",raw:void 0},V.enqueue({type:"error",error:F.error});return}if(H)H=!1,V.enqueue({type:"response-metadata",...LF4(F)}),V.enqueue({type:"text-start",id:"0"});if(F.usage!=null)Z=F.usage;let L=F.choices[0];if((L==null?void 0:L.finish_reason)!=null)W={unified:DF4(L.finish_reason),raw:L.finish_reason};if((L==null?void 0:L.logprobs)!=null)K.openai.logprobs=L.logprobs;if((L==null?void 0:L.text)!=null&&L.text.length>0)V.enqueue({type:"text-delta",id:"0",delta:L.text})},flush(z){if(!H)z.enqueue({type:"text-end",id:"0"});z.enqueue({type:"finish",finishReason:W,providerMetadata:K,usage:FF4(Z)})}})),request:{body:G},response:{headers:J}}}},RQ9=N1(()=>z1(U.object({dimensions:U.number().optional(),user:U.string().optional()}))),qQ9=N1(()=>z1(U.object({data:U.array(U.object({embedding:U.array(U.number())})),usage:U.object({prompt_tokens:U.number()}).nullish()}))),PQ9=class{constructor($,Y){this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=$,this.config=Y}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J;if($.length>this.maxEmbeddingsPerCall)throw new S70({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:$});let Q=(J=await L9({provider:"openai",providerOptions:G,schema:RQ9}))!=null?J:{},{responseHeaders:W,value:K,rawValue:Z}=await T8({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:i6(this.config.headers(),Y),body:{model:this.modelId,input:$,encoding_format:"float",dimensions:Q.dimensions,user:Q.user},failedResponseHandler:VU,successfulResponseHandler:O8(qQ9),abortSignal:X,fetch:this.config.fetch});return{warnings:[],embeddings:K.data.map((H)=>H.embedding),usage:K.usage?{tokens:K.usage.prompt_tokens}:void 0,response:{headers:W,body:Z}}}},AF4=N1(()=>z1(U.object({created:U.number().nullish(),data:U.array(U.object({b64_json:U.string(),revised_prompt:U.string().nullish()})),background:U.string().nullish(),output_format:U.string().nullish(),size:U.string().nullish(),quality:U.string().nullish(),usage:U.object({input_tokens:U.number().nullish(),output_tokens:U.number().nullish(),total_tokens:U.number().nullish(),input_tokens_details:U.object({image_tokens:U.number().nullish(),text_tokens:U.number().nullish()}).nullish()}).nullish()}))),wQ9={"dall-e-3":1,"dall-e-2":10,"gpt-image-1":10,"gpt-image-1-mini":10,"gpt-image-1.5":10,"gpt-image-2":10,"chatgpt-image-latest":10},_Q9=["chatgpt-image-","gpt-image-1-mini","gpt-image-1.5","gpt-image-1","gpt-image-2"];function jQ9($){return _Q9.some((Y)=>$.startsWith(Y))}var yu0=U.object({quality:U.enum(["standard","hd","low","medium","high","auto"]).optional(),background:U.enum(["transparent","opaque","auto"]).optional(),outputFormat:U.enum(["png","jpeg","webp"]).optional(),outputCompression:U.number().int().min(0).max(100).optional(),user:U.string().optional()}),dF$=N1(()=>z1(yu0)),TQ9=N1(()=>z1(yu0.extend({style:U.enum(["vivid","natural"]).optional(),moderation:U.enum(["auto","low"]).optional()}))),IQ9=N1(()=>z1(yu0.extend({inputFidelity:U.enum(["high","low"]).optional()}))),CQ9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get maxImagesPerCall(){var $;return($=wQ9[this.modelId])!=null?$:1}get provider(){return this.config.provider}async doGenerate({prompt:$,files:Y,mask:X,n:G,size:J,aspectRatio:Q,seed:W,providerOptions:K,headers:Z,abortSignal:H}){var z,V,F,L,N,D,A,B,O,E,M;let R=[];if(Q!=null)R.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."});if(W!=null)R.push({type:"unsupported",feature:"seed"});let q=(F=(V=(z=this.config._internal)==null?void 0:z.currentDate)==null?void 0:V.call(z))!=null?F:new Date;if(Y!=null){let j=(L=await L9({provider:"openai",providerOptions:K,schema:IQ9}))!=null?L:{},{value:C,responseHeaders:k}=await II({url:this.config.url({path:"/images/edits",modelId:this.modelId}),headers:i6(this.config.headers(),Z),formData:k70({model:this.modelId,prompt:$,image:await Promise.all(Y.map((S)=>S.type==="file"?new Blob([S.data instanceof Uint8Array?new Blob([S.data],{type:S.mediaType}):new Blob([RJ(S.data)],{type:S.mediaType})],{type:S.mediaType}):uu(S.url))),mask:X!=null?await SQ9(X):void 0,n:G,size:J,quality:j.quality,background:j.background,output_format:j.outputFormat,output_compression:j.outputCompression,input_fidelity:j.inputFidelity,user:j.user}),failedResponseHandler:VU,successfulResponseHandler:O8(AF4),abortSignal:H,fetch:this.config.fetch});return{images:C.data.map((S)=>S.b64_json),warnings:R,usage:C.usage!=null?{inputTokens:(N=C.usage.input_tokens)!=null?N:void 0,outputTokens:(D=C.usage.output_tokens)!=null?D:void 0,totalTokens:(A=C.usage.total_tokens)!=null?A:void 0}:void 0,response:{timestamp:q,modelId:this.modelId,headers:k},providerMetadata:{openai:{images:C.data.map((S,I)=>{var v,x,y,d,u,b;return{...S.revised_prompt?{revisedPrompt:S.revised_prompt}:{},created:(v=C.created)!=null?v:void 0,size:(x=C.size)!=null?x:void 0,quality:(y=C.quality)!=null?y:void 0,background:(d=C.background)!=null?d:void 0,outputFormat:(u=C.output_format)!=null?u:void 0,...BF4((b=C.usage)==null?void 0:b.input_tokens_details,I,C.data.length)}})}}}}let _=(B=await L9({provider:"openai",providerOptions:K,schema:TQ9}))!=null?B:{},{value:P,responseHeaders:w}=await T8({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:i6(this.config.headers(),Z),body:{model:this.modelId,prompt:$,n:G,size:J,quality:_.quality,style:_.style,background:_.background,moderation:_.moderation,output_format:_.outputFormat,output_compression:_.outputCompression,user:_.user,...!jQ9(this.modelId)?{response_format:"b64_json"}:{}},failedResponseHandler:VU,successfulResponseHandler:O8(AF4),abortSignal:H,fetch:this.config.fetch});return{images:P.data.map((j)=>j.b64_json),warnings:R,usage:P.usage!=null?{inputTokens:(O=P.usage.input_tokens)!=null?O:void 0,outputTokens:(E=P.usage.output_tokens)!=null?E:void 0,totalTokens:(M=P.usage.total_tokens)!=null?M:void 0}:void 0,response:{timestamp:q,modelId:this.modelId,headers:w},providerMetadata:{openai:{images:P.data.map((j,C)=>{var k,S,I,v,x,y;return{...j.revised_prompt?{revisedPrompt:j.revised_prompt}:{},created:(k=P.created)!=null?k:void 0,size:(S=P.size)!=null?S:void 0,quality:(I=P.quality)!=null?I:void 0,background:(v=P.background)!=null?v:void 0,outputFormat:(x=P.output_format)!=null?x:void 0,...BF4((y=P.usage)==null?void 0:y.input_tokens_details,C,P.data.length)}})}}}}};function BF4($,Y,X){if($==null)return{};let G={};if($.image_tokens!=null){let J=Math.floor($.image_tokens/X),Q=$.image_tokens-J*(X-1);G.imageTokens=Y===X-1?Q:J}if($.text_tokens!=null){let J=Math.floor($.text_tokens/X),Q=$.text_tokens-J*(X-1);G.textTokens=Y===X-1?Q:J}return G}async function SQ9($){if(!$)return;if($.type==="url")return uu($.url);let Y=$.data instanceof Uint8Array?$.data:RJ($.data);return new Blob([Y],{type:$.mediaType})}var jF4=N1(()=>z1(U.object({callId:U.string(),operation:U.discriminatedUnion("type",[U.object({type:U.literal("create_file"),path:U.string(),diff:U.string()}),U.object({type:U.literal("delete_file"),path:U.string()}),U.object({type:U.literal("update_file"),path:U.string(),diff:U.string()})])}))),TF4=N1(()=>z1(U.object({status:U.enum(["completed","failed"]),output:U.string().optional()}))),iF$=N1(()=>z1(U.object({}))),kQ9=B$({id:"openai.apply_patch",inputSchema:jF4,outputSchema:TF4}),vQ9=kQ9,xQ9=N1(()=>z1(U.object({code:U.string().nullish(),containerId:U.string()}))),yQ9=N1(()=>z1(U.object({outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullish()}))),bQ9=N1(()=>z1(U.object({container:U.union([U.string(),U.object({fileIds:U.array(U.string()).optional()})]).optional()}))),hQ9=B$({id:"openai.code_interpreter",inputSchema:xQ9,outputSchema:yQ9}),fQ9=($={})=>{return hQ9($)},gQ9=N1(()=>z1(U.object({name:U.string(),description:U.string().optional(),format:U.union([U.object({type:U.literal("grammar"),syntax:U.enum(["regex","lark"]),definition:U.string()}),U.object({type:U.literal("text")})]).optional()}))),mQ9=N1(()=>z1(U.string())),uQ9=tV4({id:"openai.custom",inputSchema:mQ9}),pQ9=($)=>uQ9($),IF4=U.object({key:U.string(),type:U.enum(["eq","ne","gt","gte","lt","lte","in","nin"]),value:U.union([U.string(),U.number(),U.boolean(),U.array(U.string())])}),CF4=U.object({type:U.enum(["and","or"]),filters:U.array(U.union([IF4,U.lazy(()=>CF4)]))}),dQ9=N1(()=>z1(U.object({vectorStoreIds:U.array(U.string()),maxNumResults:U.number().optional(),ranking:U.object({ranker:U.string().optional(),scoreThreshold:U.number().optional()}).optional(),filters:U.union([IF4,CF4]).optional()}))),cQ9=N1(()=>z1(U.object({queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.unknown()),fileId:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullable()}))),lQ9=B$({id:"openai.file_search",inputSchema:U.object({}),outputSchema:cQ9}),iQ9=N1(()=>z1(U.object({background:U.enum(["auto","opaque","transparent"]).optional(),inputFidelity:U.enum(["low","high"]).optional(),inputImageMask:U.object({fileId:U.string().optional(),imageUrl:U.string().optional()}).optional(),model:U.string().optional(),moderation:U.enum(["auto"]).optional(),outputCompression:U.number().int().min(0).max(100).optional(),outputFormat:U.enum(["png","jpeg","webp"]).optional(),partialImages:U.number().int().min(0).max(3).optional(),quality:U.enum(["auto","low","medium","high"]).optional(),size:U.enum(["1024x1024","1024x1536","1536x1024","auto"]).optional()}).strict())),nQ9=N1(()=>z1(U.object({}))),rQ9=N1(()=>z1(U.object({result:U.string()}))),aQ9=B$({id:"openai.image_generation",inputSchema:nQ9,outputSchema:rQ9}),sQ9=($={})=>{return aQ9($)},SF4=N1(()=>z1(U.object({action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeoutMs:U.number().optional(),user:U.string().optional(),workingDirectory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}))),kF4=N1(()=>z1(U.object({output:U.string()}))),oQ9=B$({id:"openai.local_shell",inputSchema:SF4,outputSchema:kF4}),vF4=N1(()=>z1(U.object({action:U.object({commands:U.array(U.string()),timeoutMs:U.number().optional(),maxOutputLength:U.number().optional()})}))),Cu0=N1(()=>z1(U.object({output:U.array(U.object({stdout:U.string(),stderr:U.string(),outcome:U.discriminatedUnion("type",[U.object({type:U.literal("timeout")}),U.object({type:U.literal("exit"),exitCode:U.number()})])}))}))),tQ9=U.array(U.discriminatedUnion("type",[U.object({type:U.literal("skillReference"),skillId:U.string(),version:U.string().optional()}),U.object({type:U.literal("inline"),name:U.string(),description:U.string(),source:U.object({type:U.literal("base64"),mediaType:U.literal("application/zip"),data:U.string()})})])).optional(),eQ9=N1(()=>z1(U.object({environment:U.union([U.object({type:U.literal("containerAuto"),fileIds:U.array(U.string()).optional(),memoryLimit:U.enum(["1g","4g","16g","64g"]).optional(),networkPolicy:U.discriminatedUnion("type",[U.object({type:U.literal("disabled")}),U.object({type:U.literal("allowlist"),allowedDomains:U.array(U.string()),domainSecrets:U.array(U.object({domain:U.string(),name:U.string(),value:U.string()})).optional()})]).optional(),skills:tQ9}),U.object({type:U.literal("containerReference"),containerId:U.string()}),U.object({type:U.literal("local").optional(),skills:U.array(U.object({name:U.string(),description:U.string(),path:U.string()})).optional()})]).optional()}))),$W9=B$({id:"openai.shell",inputSchema:vF4,outputSchema:Cu0}),YW9=N1(()=>z1(U.object({execution:U.enum(["server","client"]).optional(),description:U.string().optional(),parameters:U.record(U.string(),U.unknown()).optional()}))),Su0=N1(()=>z1(U.object({arguments:U.unknown().optional(),call_id:U.string().nullish()}))),ku0=N1(()=>z1(U.object({tools:U.array(U.record(U.string(),U.unknown()))}))),XW9=B$({id:"openai.tool_search",inputSchema:Su0,outputSchema:ku0}),GW9=($={})=>XW9($),JW9=N1(()=>z1(U.object({externalWebAccess:U.boolean().optional(),filters:U.object({allowedDomains:U.array(U.string()).optional()}).optional(),searchContextSize:U.enum(["low","medium","high"]).optional(),userLocation:U.object({type:U.literal("approximate"),country:U.string().optional(),city:U.string().optional(),region:U.string().optional(),timezone:U.string().optional()}).optional()}))),QW9=N1(()=>z1(U.object({}))),WW9=N1(()=>z1(U.object({action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().optional()}),U.object({type:U.literal("openPage"),url:U.string().nullish()}),U.object({type:U.literal("findInPage"),url:U.string().nullish(),pattern:U.string().nullish()})]).optional(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).optional()}))),KW9=B$({id:"openai.web_search",inputSchema:QW9,outputSchema:WW9}),ZW9=($={})=>KW9($),UW9=N1(()=>z1(U.object({searchContextSize:U.enum(["low","medium","high"]).optional(),userLocation:U.object({type:U.literal("approximate"),country:U.string().optional(),city:U.string().optional(),region:U.string().optional(),timezone:U.string().optional()}).optional()}))),HW9=N1(()=>z1(U.object({}))),zW9=N1(()=>z1(U.object({action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().optional()}),U.object({type:U.literal("openPage"),url:U.string().nullish()}),U.object({type:U.literal("findInPage"),url:U.string().nullish(),pattern:U.string().nullish()})]).optional()}))),VW9=B$({id:"openai.web_search_preview",inputSchema:HW9,outputSchema:zW9}),vu0=U.lazy(()=>U.union([U.string(),U.number(),U.boolean(),U.null(),U.array(vu0),U.record(U.string(),vu0)])),FW9=N1(()=>z1(U.object({serverLabel:U.string(),allowedTools:U.union([U.array(U.string()),U.object({readOnly:U.boolean().optional(),toolNames:U.array(U.string()).optional()})]).optional(),authorization:U.string().optional(),connectorId:U.string().optional(),headers:U.record(U.string(),U.string()).optional(),requireApproval:U.union([U.enum(["always","never"]),U.object({never:U.object({toolNames:U.array(U.string()).optional()}).optional()})]).optional(),serverDescription:U.string().optional(),serverUrl:U.string().optional()}).refine(($)=>$.serverUrl!=null||$.connectorId!=null,"One of serverUrl or connectorId must be provided."))),LW9=N1(()=>z1(U.object({}))),DW9=N1(()=>z1(U.object({type:U.literal("call"),serverLabel:U.string(),name:U.string(),arguments:U.string(),output:U.string().nullish(),error:U.union([U.string(),vu0]).optional()}))),NW9=B$({id:"openai.mcp",inputSchema:LW9,outputSchema:DW9}),AW9=($)=>NW9($),BW9={applyPatch:vQ9,customTool:pQ9,codeInterpreter:fQ9,fileSearch:lQ9,imageGeneration:sQ9,localShell:oQ9,shell:$W9,webSearchPreview:VW9,webSearch:ZW9,mcp:AW9,toolSearch:GW9};function OF4($){var Y,X,G,J;if($==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let{input_tokens:Q,output_tokens:W}=$,K=(X=(Y=$.input_tokens_details)==null?void 0:Y.cached_tokens)!=null?X:0,Z=(J=(G=$.output_tokens_details)==null?void 0:G.reasoning_tokens)!=null?J:0;return{inputTokens:{total:Q,noCache:Q-K,cacheRead:K,cacheWrite:void 0},outputTokens:{total:W,text:W-Z,reasoning:Z},raw:$}}function OW9($){return JSON.stringify($===void 0?{}:$)}function EF4($,Y){if(!Y)return!1;return Y.some((X)=>$.startsWith(X))}async function EW9({prompt:$,toolNameMapping:Y,systemMessageMode:X,providerOptionsName:G,fileIdPrefixes:J,passThroughUnsupportedFiles:Q=!1,store:W,hasConversation:K=!1,hasLocalShellTool:Z=!1,hasShellTool:H=!1,hasApplyPatchTool:z=!1,customProviderToolNames:V}){var F,L,N,D,A,B,O,E,M,R,q,_,P,w,j,C,k;let S=[],I=[],v=new Set;for(let{role:x,content:y}of $)switch(x){case"system":{switch(X){case"system":{S.push({role:"system",content:y});break}case"developer":{S.push({role:"developer",content:y});break}case"remove":{I.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${X}`)}break}case"user":{S.push({role:"user",content:y.map((d,u)=>{var b,g,p;switch(d.type){case"text":return{type:"input_text",text:d.text};case"file":{let h=d.mediaType==="image/*"?"image/jpeg":d.mediaType;if(h.startsWith("image/"))return{type:"input_image",...d.data instanceof URL?{image_url:d.data.toString()}:typeof d.data==="string"&&EF4(d.data,J)?{file_id:d.data}:{image_url:`data:${h};base64,${QK(d.data)}`},detail:(g=(b=d.providerOptions)==null?void 0:b[G])==null?void 0:g.imageDetail};if(d.data instanceof URL)return{type:"input_file",file_url:d.data.toString()};if(h!=="application/pdf"&&!Q)throw new c5({functionality:`file part media type ${h}`});return{type:"input_file",...typeof d.data==="string"&&EF4(d.data,J)?{file_id:d.data}:{filename:(p=d.filename)!=null?p:h==="application/pdf"?`part-${u}.pdf`:`part-${u}`,file_data:`data:${h};base64,${QK(d.data)}`}}}}})});break}case"assistant":{let d={};for(let u of y)switch(u.type){case"text":{let b=(F=u.providerOptions)==null?void 0:F[G],g=b==null?void 0:b.itemId,p=b==null?void 0:b.phase;if(K&&g!=null)break;if(W&&g!=null){S.push({type:"item_reference",id:g});break}S.push({role:"assistant",content:[{type:"output_text",text:u.text}],id:g,...p!=null&&{phase:p}});break}case"tool-call":{let b=(B=(N=(L=u.providerOptions)==null?void 0:L[G])==null?void 0:N.itemId)!=null?B:(A=(D=u.providerMetadata)==null?void 0:D[G])==null?void 0:A.itemId;if(K&&b!=null)break;let g=Y.toProviderToolName(u.toolName);if(g==="tool_search"){if(W&&b!=null){S.push({type:"item_reference",id:b});break}let p=typeof u.input==="string"?await _u0({text:u.input,schema:Su0}):await l5({value:u.input,schema:Su0}),h=p.call_id!=null?"client":"server";S.push({type:"tool_search_call",id:b!=null?b:u.toolCallId,execution:h,call_id:(O=p.call_id)!=null?O:null,status:"completed",arguments:p.arguments});break}if(u.providerExecuted){if(W&&b!=null)S.push({type:"item_reference",id:b});break}if(W&&b!=null){S.push({type:"item_reference",id:b});break}if(Z&&g==="local_shell"){let p=await l5({value:u.input,schema:SF4});S.push({type:"local_shell_call",call_id:u.toolCallId,id:b,action:{type:"exec",command:p.action.command,timeout_ms:p.action.timeoutMs,user:p.action.user,working_directory:p.action.workingDirectory,env:p.action.env}});break}if(H&&g==="shell"){let p=await l5({value:u.input,schema:vF4});S.push({type:"shell_call",call_id:u.toolCallId,id:b,status:"completed",action:{commands:p.action.commands,timeout_ms:p.action.timeoutMs,max_output_length:p.action.maxOutputLength}});break}if(z&&g==="apply_patch"){let p=await l5({value:u.input,schema:jF4});S.push({type:"apply_patch_call",call_id:p.callId,id:b,status:"completed",operation:p.operation});break}if(V==null?void 0:V.has(g)){S.push({type:"custom_tool_call",call_id:u.toolCallId,name:g,input:typeof u.input==="string"?u.input:JSON.stringify(u.input),id:b});break}S.push({type:"function_call",call_id:u.toolCallId,name:g,arguments:OW9(u.input),id:b});break}case"tool-result":{if(u.output.type==="execution-denied"||u.output.type==="json"&&typeof u.output.value==="object"&&u.output.value!=null&&"type"in u.output.value&&u.output.value.type==="execution-denied")break;if(K)break;let b=Y.toProviderToolName(u.toolName);if(b==="tool_search"){let g=(R=(M=(E=u.providerOptions)==null?void 0:E[G])==null?void 0:M.itemId)!=null?R:u.toolCallId;if(W)S.push({type:"item_reference",id:g});else if(u.output.type==="json"){let p=await l5({value:u.output.value,schema:ku0});S.push({type:"tool_search_output",id:g,execution:"server",call_id:null,status:"completed",tools:p.tools})}break}if(H&&b==="shell"){if(u.output.type==="json"){let g=await l5({value:u.output.value,schema:Cu0});S.push({type:"shell_call_output",call_id:u.toolCallId,output:g.output.map((p)=>({stdout:p.stdout,stderr:p.stderr,outcome:p.outcome.type==="timeout"?{type:"timeout"}:{type:"exit",exit_code:p.outcome.exitCode}}))})}break}if(W){let g=(P=(_=(q=u.providerOptions)==null?void 0:q[G])==null?void 0:_.itemId)!=null?P:u.toolCallId;S.push({type:"item_reference",id:g})}else I.push({type:"other",message:`Results for OpenAI tool ${u.toolName} are not sent to the API when store is false`});break}case"reasoning":{let b=await L9({provider:G,providerOptions:u.providerOptions,schema:MW9}),g=b==null?void 0:b.itemId;if(K&&g!=null)break;if(g!=null){let p=d[g];if(W){if(p===void 0)S.push({type:"item_reference",id:g}),d[g]={type:"reasoning",id:g,summary:[]}}else{let h=[];if(u.text.length>0)h.push({type:"summary_text",text:u.text});else if(p!==void 0)I.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(u)}.`});if(p===void 0)d[g]={type:"reasoning",id:g,encrypted_content:b==null?void 0:b.reasoningEncryptedContent,summary:h},S.push(d[g]);else if(p.summary.push(...h),(b==null?void 0:b.reasoningEncryptedContent)!=null)p.encrypted_content=b.reasoningEncryptedContent}}else{let p=b==null?void 0:b.reasoningEncryptedContent;if(p!=null){let h=[];if(u.text.length>0)h.push({type:"summary_text",text:u.text});S.push({type:"reasoning",encrypted_content:p,summary:h})}else I.push({type:"other",message:`Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(u)}.`})}break}}break}case"tool":{for(let d of y){if(d.type==="tool-approval-response"){let p=d;if(v.has(p.approvalId))continue;if(v.add(p.approvalId),W)S.push({type:"item_reference",id:p.approvalId});S.push({type:"mcp_approval_response",approval_request_id:p.approvalId,approve:p.approved});continue}let u=d.output;if(u.type==="execution-denied"){if((j=(w=u.providerOptions)==null?void 0:w.openai)==null?void 0:j.approvalId)continue}let b=Y.toProviderToolName(d.toolName);if(b==="tool_search"&&u.type==="json"){let p=await l5({value:u.value,schema:ku0});S.push({type:"tool_search_output",execution:"client",call_id:d.toolCallId,status:"completed",tools:p.tools});continue}if(Z&&b==="local_shell"&&u.type==="json"){let p=await l5({value:u.value,schema:kF4});S.push({type:"local_shell_call_output",call_id:d.toolCallId,output:p.output});continue}if(H&&b==="shell"&&u.type==="json"){let p=await l5({value:u.value,schema:Cu0});S.push({type:"shell_call_output",call_id:d.toolCallId,output:p.output.map((h)=>({stdout:h.stdout,stderr:h.stderr,outcome:h.outcome.type==="timeout"?{type:"timeout"}:{type:"exit",exit_code:h.outcome.exitCode}}))});continue}if(z&&d.toolName==="apply_patch"&&u.type==="json"){let p=await l5({value:u.value,schema:TF4});S.push({type:"apply_patch_call_output",call_id:d.toolCallId,status:p.status,output:p.output});continue}if(V==null?void 0:V.has(b)){let p;switch(u.type){case"text":case"error-text":p=u.value;break;case"execution-denied":p=(C=u.reason)!=null?C:"Tool execution denied.";break;case"json":case"error-json":p=JSON.stringify(u.value);break;case"content":p=u.value.map((h)=>{var n,t,s,K0,X0;switch(h.type){case"text":return{type:"input_text",text:h.text};case"image-data":return{type:"input_image",image_url:`data:${h.mediaType};base64,${h.data}`,detail:(t=(n=h.providerOptions)==null?void 0:n[G])==null?void 0:t.imageDetail};case"image-url":return{type:"input_image",image_url:h.url,detail:(K0=(s=h.providerOptions)==null?void 0:s[G])==null?void 0:K0.imageDetail};case"file-data":return{type:"input_file",filename:(X0=h.filename)!=null?X0:"data",file_data:`data:${h.mediaType};base64,${h.data}`};case"file-url":return{type:"input_file",file_url:h.url};default:I.push({type:"other",message:`unsupported custom tool content part type: ${h.type}`});return}}).filter(pu);break;default:p=""}S.push({type:"custom_tool_call_output",call_id:d.toolCallId,output:p});continue}let g;switch(u.type){case"text":case"error-text":g=u.value;break;case"execution-denied":g=(k=u.reason)!=null?k:"Tool execution denied.";break;case"json":case"error-json":g=JSON.stringify(u.value);break;case"content":g=u.value.map((p)=>{var h,n,t,s,K0;switch(p.type){case"text":return{type:"input_text",text:p.text};case"image-data":return{type:"input_image",image_url:`data:${p.mediaType};base64,${p.data}`,detail:(n=(h=p.providerOptions)==null?void 0:h[G])==null?void 0:n.imageDetail};case"image-url":return{type:"input_image",image_url:p.url,detail:(s=(t=p.providerOptions)==null?void 0:t[G])==null?void 0:s.imageDetail};case"file-data":return{type:"input_file",filename:(K0=p.filename)!=null?K0:"data",file_data:`data:${p.mediaType};base64,${p.data}`};case"file-url":return{type:"input_file",file_url:p.url};default:{I.push({type:"other",message:`unsupported tool content part type: ${p.type}`});return}}}).filter(pu);break}S.push({type:"function_call_output",call_id:d.toolCallId,output:g})}break}default:throw Error(`Unsupported role: ${x}`)}if(!W&&S.some((x)=>("type"in x)&&x.type==="reasoning"&&x.encrypted_content==null))I.push({type:"other",message:"Reasoning parts without encrypted content are not supported when store is false. Skipping reasoning parts."}),S=S.filter((x)=>!("type"in x)||x.type!=="reasoning"||x.encrypted_content!=null);return{input:S,warnings:I}}var MW9=U.object({itemId:U.string().nullish(),reasoningEncryptedContent:U.string().nullish()});function Iu0({finishReason:$,hasFunctionCall:Y}){switch($){case void 0:case null:return Y?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return Y?"tool-calls":"other"}}var ru=U.lazy(()=>U.union([U.string(),U.number(),U.boolean(),U.null(),U.array(ru),U.record(U.string(),ru.optional())])),RW9=N1(()=>z1(U.union([U.object({type:U.literal("response.output_text.delta"),item_id:U.string(),delta:U.string(),logprobs:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish()}),U.object({type:U.enum(["response.completed","response.incomplete"]),response:U.object({incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.failed"),response:U.object({error:U.object({code:U.string().nullish(),message:U.string()}).nullish(),incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}).nullish(),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.created"),response:U.object({id:U.string(),created_at:U.number(),model:U.string(),service_tier:U.string().nullish()})}),U.object({type:U.literal("response.output_item.added"),output_index:U.number(),item:U.discriminatedUnion("type",[U.object({type:U.literal("message"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish()}),U.object({type:U.literal("function_call"),id:U.string(),call_id:U.string(),name:U.string(),arguments:U.string(),namespace:U.string().nullish()}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string()}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.string()}),U.object({type:U.literal("file_search_call"),id:U.string()}),U.object({type:U.literal("image_generation_call"),id:U.string()}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),container_id:U.string(),code:U.string().nullable(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable(),status:U.string()}),U.object({type:U.literal("mcp_call"),id:U.string(),status:U.string(),approval_request_id:U.string().nullish()}),U.object({type:U.literal("mcp_list_tools"),id:U.string()}),U.object({type:U.literal("mcp_approval_request"),id:U.string()}),U.object({type:U.literal("apply_patch_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed"]),operation:U.discriminatedUnion("type",[U.object({type:U.literal("create_file"),path:U.string(),diff:U.string()}),U.object({type:U.literal("delete_file"),path:U.string()}),U.object({type:U.literal("update_file"),path:U.string(),diff:U.string()})])}),U.object({type:U.literal("custom_tool_call"),id:U.string(),call_id:U.string(),name:U.string(),input:U.string()}),U.object({type:U.literal("shell_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),action:U.object({commands:U.array(U.string())})}),U.object({type:U.literal("shell_call_output"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),output:U.array(U.object({stdout:U.string(),stderr:U.string(),outcome:U.discriminatedUnion("type",[U.object({type:U.literal("timeout")}),U.object({type:U.literal("exit"),exit_code:U.number()})])}))}),U.object({type:U.literal("tool_search_call"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),arguments:U.unknown()}),U.object({type:U.literal("tool_search_output"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),tools:U.array(U.record(U.string(),ru.optional()))})])}),U.object({type:U.literal("response.output_item.done"),output_index:U.number(),item:U.discriminatedUnion("type",[U.object({type:U.literal("message"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish()}),U.object({type:U.literal("function_call"),id:U.string(),call_id:U.string(),name:U.string(),arguments:U.string(),status:U.literal("completed"),namespace:U.string().nullish()}),U.object({type:U.literal("custom_tool_call"),id:U.string(),call_id:U.string(),name:U.string(),input:U.string(),status:U.literal("completed")}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),code:U.string().nullable(),container_id:U.string(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable()}),U.object({type:U.literal("image_generation_call"),id:U.string(),result:U.string()}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string(),action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().nullish(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).nullish()}),U.object({type:U.literal("open_page"),url:U.string().nullish()}),U.object({type:U.literal("find_in_page"),url:U.string().nullish(),pattern:U.string().nullish()})]).nullish()}),U.object({type:U.literal("file_search_call"),id:U.string(),queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.union([U.string(),U.number(),U.boolean()])),file_id:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullish()}),U.object({type:U.literal("local_shell_call"),id:U.string(),call_id:U.string(),action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeout_ms:U.number().optional(),user:U.string().optional(),working_directory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.literal("completed")}),U.object({type:U.literal("mcp_call"),id:U.string(),status:U.string(),arguments:U.string(),name:U.string(),server_label:U.string(),output:U.string().nullish(),error:U.union([U.string(),U.object({type:U.string().optional(),code:U.union([U.number(),U.string()]).optional(),message:U.string().optional()}).loose()]).nullish(),approval_request_id:U.string().nullish()}),U.object({type:U.literal("mcp_list_tools"),id:U.string(),server_label:U.string(),tools:U.array(U.object({name:U.string(),description:U.string().optional(),input_schema:U.any(),annotations:U.record(U.string(),U.unknown()).optional()})),error:U.union([U.string(),U.object({type:U.string().optional(),code:U.union([U.number(),U.string()]).optional(),message:U.string().optional()}).loose()]).optional()}),U.object({type:U.literal("mcp_approval_request"),id:U.string(),server_label:U.string(),name:U.string(),arguments:U.string(),approval_request_id:U.string().optional()}),U.object({type:U.literal("apply_patch_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed"]),operation:U.discriminatedUnion("type",[U.object({type:U.literal("create_file"),path:U.string(),diff:U.string()}),U.object({type:U.literal("delete_file"),path:U.string()}),U.object({type:U.literal("update_file"),path:U.string(),diff:U.string()})])}),U.object({type:U.literal("shell_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),action:U.object({commands:U.array(U.string())})}),U.object({type:U.literal("shell_call_output"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),output:U.array(U.object({stdout:U.string(),stderr:U.string(),outcome:U.discriminatedUnion("type",[U.object({type:U.literal("timeout")}),U.object({type:U.literal("exit"),exit_code:U.number()})])}))}),U.object({type:U.literal("tool_search_call"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),arguments:U.unknown()}),U.object({type:U.literal("tool_search_output"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),tools:U.array(U.record(U.string(),ru.optional()))})])}),U.object({type:U.literal("response.function_call_arguments.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.custom_tool_call_input.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.image_generation_call.partial_image"),item_id:U.string(),output_index:U.number(),partial_image_b64:U.string()}),U.object({type:U.literal("response.code_interpreter_call_code.delta"),item_id:U.string(),output_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.code_interpreter_call_code.done"),item_id:U.string(),output_index:U.number(),code:U.string()}),U.object({type:U.literal("response.output_text.annotation.added"),annotation:U.discriminatedUnion("type",[U.object({type:U.literal("url_citation"),start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()}),U.object({type:U.literal("file_citation"),file_id:U.string(),filename:U.string(),index:U.number()}),U.object({type:U.literal("container_file_citation"),container_id:U.string(),file_id:U.string(),filename:U.string(),start_index:U.number(),end_index:U.number()}),U.object({type:U.literal("file_path"),file_id:U.string(),index:U.number()})])}),U.object({type:U.literal("response.reasoning_summary_part.added"),item_id:U.string(),summary_index:U.number()}),U.object({type:U.literal("response.reasoning_summary_text.delta"),item_id:U.string(),summary_index:U.number(),delta:U.string()}),U.object({type:U.literal("response.reasoning_summary_part.done"),item_id:U.string(),summary_index:U.number()}),U.object({type:U.literal("response.apply_patch_call_operation_diff.delta"),item_id:U.string(),output_index:U.number(),delta:U.string(),obfuscation:U.string().nullish()}),U.object({type:U.literal("response.apply_patch_call_operation_diff.done"),item_id:U.string(),output_index:U.number(),diff:U.string()}),U.object({type:U.literal("error"),sequence_number:U.number(),error:U.object({type:U.string(),code:U.string(),message:U.string(),param:U.string().nullish()})}),U.object({type:U.string()}).loose().transform(($)=>({type:"unknown_chunk",message:$.type}))]))),qW9=N1(()=>z1(U.object({id:U.string().optional(),created_at:U.number().optional(),error:U.object({message:U.string(),type:U.string(),param:U.string().nullish(),code:U.string()}).nullish(),model:U.string().optional(),output:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("message"),role:U.literal("assistant"),id:U.string(),phase:U.enum(["commentary","final_answer"]).nullish(),content:U.array(U.object({type:U.literal("output_text"),text:U.string(),logprobs:U.array(U.object({token:U.string(),logprob:U.number(),top_logprobs:U.array(U.object({token:U.string(),logprob:U.number()}))})).nullish(),annotations:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url_citation"),start_index:U.number(),end_index:U.number(),url:U.string(),title:U.string()}),U.object({type:U.literal("file_citation"),file_id:U.string(),filename:U.string(),index:U.number()}),U.object({type:U.literal("container_file_citation"),container_id:U.string(),file_id:U.string(),filename:U.string(),start_index:U.number(),end_index:U.number()}),U.object({type:U.literal("file_path"),file_id:U.string(),index:U.number()})]))}))}),U.object({type:U.literal("web_search_call"),id:U.string(),status:U.string(),action:U.discriminatedUnion("type",[U.object({type:U.literal("search"),query:U.string().nullish(),sources:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("url"),url:U.string()}),U.object({type:U.literal("api"),name:U.string()})])).nullish()}),U.object({type:U.literal("open_page"),url:U.string().nullish()}),U.object({type:U.literal("find_in_page"),url:U.string().nullish(),pattern:U.string().nullish()})]).nullish()}),U.object({type:U.literal("file_search_call"),id:U.string(),queries:U.array(U.string()),results:U.array(U.object({attributes:U.record(U.string(),U.union([U.string(),U.number(),U.boolean()])),file_id:U.string(),filename:U.string(),score:U.number(),text:U.string()})).nullish()}),U.object({type:U.literal("code_interpreter_call"),id:U.string(),code:U.string().nullable(),container_id:U.string(),outputs:U.array(U.discriminatedUnion("type",[U.object({type:U.literal("logs"),logs:U.string()}),U.object({type:U.literal("image"),url:U.string()})])).nullable()}),U.object({type:U.literal("image_generation_call"),id:U.string(),result:U.string()}),U.object({type:U.literal("local_shell_call"),id:U.string(),call_id:U.string(),action:U.object({type:U.literal("exec"),command:U.array(U.string()),timeout_ms:U.number().optional(),user:U.string().optional(),working_directory:U.string().optional(),env:U.record(U.string(),U.string()).optional()})}),U.object({type:U.literal("function_call"),call_id:U.string(),name:U.string(),arguments:U.string(),id:U.string(),namespace:U.string().nullish()}),U.object({type:U.literal("custom_tool_call"),call_id:U.string(),name:U.string(),input:U.string(),id:U.string()}),U.object({type:U.literal("computer_call"),id:U.string(),status:U.string().optional()}),U.object({type:U.literal("reasoning"),id:U.string(),encrypted_content:U.string().nullish(),summary:U.array(U.object({type:U.literal("summary_text"),text:U.string()}))}),U.object({type:U.literal("mcp_call"),id:U.string(),status:U.string(),arguments:U.string(),name:U.string(),server_label:U.string(),output:U.string().nullish(),error:U.union([U.string(),U.object({type:U.string().optional(),code:U.union([U.number(),U.string()]).optional(),message:U.string().optional()}).loose()]).nullish(),approval_request_id:U.string().nullish()}),U.object({type:U.literal("mcp_list_tools"),id:U.string(),server_label:U.string(),tools:U.array(U.object({name:U.string(),description:U.string().optional(),input_schema:U.any(),annotations:U.record(U.string(),U.unknown()).optional()})),error:U.union([U.string(),U.object({type:U.string().optional(),code:U.union([U.number(),U.string()]).optional(),message:U.string().optional()}).loose()]).optional()}),U.object({type:U.literal("mcp_approval_request"),id:U.string(),server_label:U.string(),name:U.string(),arguments:U.string(),approval_request_id:U.string().optional()}),U.object({type:U.literal("apply_patch_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed"]),operation:U.discriminatedUnion("type",[U.object({type:U.literal("create_file"),path:U.string(),diff:U.string()}),U.object({type:U.literal("delete_file"),path:U.string()}),U.object({type:U.literal("update_file"),path:U.string(),diff:U.string()})])}),U.object({type:U.literal("shell_call"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),action:U.object({commands:U.array(U.string())})}),U.object({type:U.literal("shell_call_output"),id:U.string(),call_id:U.string(),status:U.enum(["in_progress","completed","incomplete"]),output:U.array(U.object({stdout:U.string(),stderr:U.string(),outcome:U.discriminatedUnion("type",[U.object({type:U.literal("timeout")}),U.object({type:U.literal("exit"),exit_code:U.number()})])}))}),U.object({type:U.literal("tool_search_call"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),arguments:U.unknown()}),U.object({type:U.literal("tool_search_output"),id:U.string(),execution:U.enum(["server","client"]),call_id:U.string().nullable(),status:U.enum(["in_progress","completed","incomplete"]),tools:U.array(U.record(U.string(),ru.optional()))})])).optional(),service_tier:U.string().nullish(),incomplete_details:U.object({reason:U.string()}).nullish(),usage:U.object({input_tokens:U.number(),input_tokens_details:U.object({cached_tokens:U.number().nullish()}).nullish(),output_tokens:U.number(),output_tokens_details:U.object({reasoning_tokens:U.number().nullish()}).nullish()}).optional()}))),xF4=20,PW9=["o1","o1-2024-12-17","o3","o3-2025-04-16","o3-mini","o3-mini-2025-01-31","o4-mini","o4-mini-2025-04-16","gpt-5","gpt-5-2025-08-07","gpt-5-codex","gpt-5-mini","gpt-5-mini-2025-08-07","gpt-5-nano","gpt-5-nano-2025-08-07","gpt-5-pro","gpt-5-pro-2025-10-06","gpt-5.1","gpt-5.1-chat-latest","gpt-5.1-codex-mini","gpt-5.1-codex","gpt-5.1-codex-max","gpt-5.2","gpt-5.2-chat-latest","gpt-5.2-pro","gpt-5.2-codex","gpt-5.3-chat-latest","gpt-5.3-codex","gpt-5.4","gpt-5.4-2026-03-05","gpt-5.4-mini","gpt-5.4-mini-2026-03-17","gpt-5.4-nano","gpt-5.4-nano-2026-03-17","gpt-5.4-pro","gpt-5.4-pro-2026-03-05","gpt-5.5","gpt-5.5-2026-04-23"],RL$=["gpt-4.1","gpt-4.1-2025-04-14","gpt-4.1-mini","gpt-4.1-mini-2025-04-14","gpt-4.1-nano","gpt-4.1-nano-2025-04-14","gpt-4o","gpt-4o-2024-05-13","gpt-4o-2024-08-06","gpt-4o-2024-11-20","gpt-4o-audio-preview","gpt-4o-audio-preview-2024-12-17","gpt-4o-search-preview","gpt-4o-search-preview-2025-03-11","gpt-4o-mini-search-preview","gpt-4o-mini-search-preview-2025-03-11","gpt-4o-mini","gpt-4o-mini-2024-07-18","gpt-3.5-turbo-0125","gpt-3.5-turbo","gpt-3.5-turbo-1106","gpt-5-chat-latest",...PW9],MF4=N1(()=>z1(U.object({conversation:U.string().nullish(),include:U.array(U.enum(["reasoning.encrypted_content","file_search_call.results","message.output_text.logprobs"])).nullish(),instructions:U.string().nullish(),logprobs:U.union([U.boolean(),U.number().min(1).max(xF4)]).optional(),maxToolCalls:U.number().nullish(),metadata:U.any().nullish(),parallelToolCalls:U.boolean().nullish(),previousResponseId:U.string().nullish(),promptCacheKey:U.string().nullish(),promptCacheRetention:U.enum(["in_memory","24h"]).nullish(),reasoningEffort:U.string().nullish(),reasoningSummary:U.string().nullish(),safetyIdentifier:U.string().nullish(),serviceTier:U.enum(["auto","flex","priority","default"]).nullish(),store:U.boolean().nullish(),passThroughUnsupportedFiles:U.boolean().optional(),strictJsonSchema:U.boolean().nullish(),textVerbosity:U.enum(["low","medium","high"]).nullish(),truncation:U.enum(["auto","disabled"]).nullish(),user:U.string().nullish(),systemMessageMode:U.enum(["system","developer","remove"]).optional(),forceReasoning:U.boolean().optional(),allowedTools:U.object({toolNames:U.array(U.string()).min(1),mode:U.enum(["auto","required"]).optional()}).optional()})));async function wW9({tools:$,toolChoice:Y,allowedTools:X,toolNameMapping:G,customProviderToolNames:J}){var Q,W,K;$=($==null?void 0:$.length)?$:void 0;let Z=[];if($==null)return{tools:void 0,toolChoice:void 0,toolWarnings:Z};let H=[],z=J!=null?J:new Set;for(let F of $)switch(F.type){case"function":{let L=(Q=F.providerOptions)==null?void 0:Q.openai,N=L==null?void 0:L.deferLoading;H.push({type:"function",name:F.name,description:F.description,parameters:F.inputSchema,...F.strict!=null?{strict:F.strict}:{},...N!=null?{defer_loading:N}:{}});break}case"provider":{switch(F.id){case"openai.file_search":{let L=await l5({value:F.args,schema:dQ9});H.push({type:"file_search",vector_store_ids:L.vectorStoreIds,max_num_results:L.maxNumResults,ranking_options:L.ranking?{ranker:L.ranking.ranker,score_threshold:L.ranking.scoreThreshold}:void 0,filters:L.filters});break}case"openai.local_shell":{H.push({type:"local_shell"});break}case"openai.shell":{let L=await l5({value:F.args,schema:eQ9});H.push({type:"shell",...L.environment&&{environment:_W9(L.environment)}});break}case"openai.apply_patch":{H.push({type:"apply_patch"});break}case"openai.web_search_preview":{let L=await l5({value:F.args,schema:UW9});H.push({type:"web_search_preview",search_context_size:L.searchContextSize,user_location:L.userLocation});break}case"openai.web_search":{let L=await l5({value:F.args,schema:JW9});H.push({type:"web_search",filters:L.filters!=null?{allowed_domains:L.filters.allowedDomains}:void 0,external_web_access:L.externalWebAccess,search_context_size:L.searchContextSize,user_location:L.userLocation});break}case"openai.code_interpreter":{let L=await l5({value:F.args,schema:bQ9});H.push({type:"code_interpreter",container:L.container==null?{type:"auto",file_ids:void 0}:typeof L.container==="string"?L.container:{type:"auto",file_ids:L.container.fileIds}});break}case"openai.image_generation":{let L=await l5({value:F.args,schema:iQ9});H.push({type:"image_generation",background:L.background,input_fidelity:L.inputFidelity,input_image_mask:L.inputImageMask?{file_id:L.inputImageMask.fileId,image_url:L.inputImageMask.imageUrl}:void 0,model:L.model,moderation:L.moderation,partial_images:L.partialImages,quality:L.quality,output_compression:L.outputCompression,output_format:L.outputFormat,size:L.size});break}case"openai.mcp":{let L=await l5({value:F.args,schema:FW9}),N=(B)=>({tool_names:B.toolNames}),D=L.requireApproval,A=D==null?void 0:typeof D==="string"?D:D.never!=null?{never:N(D.never)}:void 0;H.push({type:"mcp",server_label:L.serverLabel,allowed_tools:Array.isArray(L.allowedTools)?L.allowedTools:L.allowedTools?{read_only:L.allowedTools.readOnly,tool_names:L.allowedTools.toolNames}:void 0,authorization:L.authorization,connector_id:L.connectorId,headers:L.headers,require_approval:A!=null?A:"never",server_description:L.serverDescription,server_url:L.serverUrl});break}case"openai.custom":{let L=await l5({value:F.args,schema:gQ9});H.push({type:"custom",name:L.name,description:L.description,format:L.format}),z.add(L.name);break}case"openai.tool_search":{let L=await l5({value:F.args,schema:YW9});H.push({type:"tool_search",...L.execution!=null?{execution:L.execution}:{},...L.description!=null?{description:L.description}:{},...L.parameters!=null?{parameters:L.parameters}:{}});break}}break}default:Z.push({type:"unsupported",feature:`function tool ${F}`});break}if(X!=null)return{tools:H,toolChoice:{type:"allowed_tools",mode:(W=X.mode)!=null?W:"auto",tools:X.toolNames.map((F)=>{var L;return{type:"function",name:(L=G==null?void 0:G.toProviderToolName(F))!=null?L:F}})},toolWarnings:Z};if(Y==null)return{tools:H,toolChoice:void 0,toolWarnings:Z};let V=Y.type;switch(V){case"auto":case"none":case"required":return{tools:H,toolChoice:V,toolWarnings:Z};case"tool":{let F=(K=G==null?void 0:G.toProviderToolName(Y.toolName))!=null?K:Y.toolName;return{tools:H,toolChoice:F==="code_interpreter"||F==="file_search"||F==="image_generation"||F==="web_search_preview"||F==="web_search"||F==="mcp"||F==="apply_patch"?{type:F}:z.has(F)?{type:"custom",name:F}:{type:"function",name:F},toolWarnings:Z}}default:throw new c5({functionality:`tool choice type: ${V}`})}}function _W9($){if($.type==="containerReference")return{type:"container_reference",container_id:$.containerId};if($.type==="containerAuto"){let X=$;return{type:"container_auto",file_ids:X.fileIds,memory_limit:X.memoryLimit,network_policy:X.networkPolicy==null?void 0:X.networkPolicy.type==="disabled"?{type:"disabled"}:{type:"allowlist",allowed_domains:X.networkPolicy.allowedDomains,domain_secrets:X.networkPolicy.domainSecrets},skills:jW9(X.skills)}}return{type:"local",skills:$.skills}}function jW9($){return $==null?void 0:$.map((Y)=>Y.type==="skillReference"?{type:"skill_reference",skill_id:Y.skillId,version:Y.version}:{type:"inline",name:Y.name,description:Y.description,source:{type:"base64",media_type:Y.source.mediaType,data:Y.source.data}})}function RF4($){var Y,X;let G={};for(let J of $){if(J.role!=="assistant")continue;for(let Q of J.content){if(Q.type!=="tool-call")continue;let W=(X=(Y=Q.providerOptions)==null?void 0:Y.openai)==null?void 0:X.approvalRequestId;if(W!=null)G[W]=Q.toolCallId}}return G}var TW9=class{constructor($,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]},this.modelId=$,this.config=Y}get provider(){return this.config.provider}async getArgs({maxOutputTokens:$,temperature:Y,stopSequences:X,topP:G,topK:J,presencePenalty:Q,frequencyPenalty:W,seed:K,prompt:Z,providerOptions:H,tools:z,toolChoice:V,responseFormat:F}){var L,N,D,A,B,O,E,M,R,q,_;let P=[],w=_F4(this.modelId);if(J!=null)P.push({type:"unsupported",feature:"topK"});if(K!=null)P.push({type:"unsupported",feature:"seed"});if(Q!=null)P.push({type:"unsupported",feature:"presencePenalty"});if(W!=null)P.push({type:"unsupported",feature:"frequencyPenalty"});if(X!=null)P.push({type:"unsupported",feature:"stopSequences"});let j=this.config.provider.includes("azure")?"azure":"openai",C=await L9({provider:j,providerOptions:H,schema:MF4});if(C==null&&j!=="openai")C=await L9({provider:"openai",providerOptions:H,schema:MF4});let k=(L=C==null?void 0:C.forceReasoning)!=null?L:w.isReasoningModel;if((C==null?void 0:C.conversation)&&(C==null?void 0:C.previousResponseId))P.push({type:"unsupported",feature:"conversation",details:"conversation and previousResponseId cannot be used together"});let S=hV4({tools:z,providerToolNames:{"openai.code_interpreter":"code_interpreter","openai.file_search":"file_search","openai.image_generation":"image_generation","openai.local_shell":"local_shell","openai.shell":"shell","openai.web_search":"web_search","openai.web_search_preview":"web_search_preview","openai.mcp":"mcp","openai.apply_patch":"apply_patch","openai.tool_search":"tool_search"},resolveProviderToolName:(Q0)=>Q0.id==="openai.custom"?Q0.args.name:void 0}),I=new Set,{tools:v,toolChoice:x,toolWarnings:y}=await wW9({tools:z,toolChoice:V,allowedTools:(N=C==null?void 0:C.allowedTools)!=null?N:void 0,toolNameMapping:S,customProviderToolNames:I}),{input:d,warnings:u}=await EW9({prompt:Z,toolNameMapping:S,systemMessageMode:(D=C==null?void 0:C.systemMessageMode)!=null?D:k?"developer":w.systemMessageMode,providerOptionsName:j,fileIdPrefixes:this.config.fileIdPrefixes,passThroughUnsupportedFiles:(A=C==null?void 0:C.passThroughUnsupportedFiles)!=null?A:!1,store:(B=C==null?void 0:C.store)!=null?B:!0,hasConversation:(C==null?void 0:C.conversation)!=null,hasLocalShellTool:h("openai.local_shell"),hasShellTool:h("openai.shell"),hasApplyPatchTool:h("openai.apply_patch"),customProviderToolNames:I.size>0?I:void 0});P.push(...u);let b=(O=C==null?void 0:C.strictJsonSchema)!=null?O:!0,g=C==null?void 0:C.include;function p(Q0){if(g==null)g=[Q0];else if(!g.includes(Q0))g=[...g,Q0]}function h(Q0){return(z==null?void 0:z.find((e)=>e.type==="provider"&&e.id===Q0))!=null}let n=typeof(C==null?void 0:C.logprobs)==="number"?C==null?void 0:C.logprobs:(C==null?void 0:C.logprobs)===!0?xF4:void 0;if(n)p("message.output_text.logprobs");let t=(E=z==null?void 0:z.find((Q0)=>Q0.type==="provider"&&(Q0.id==="openai.web_search"||Q0.id==="openai.web_search_preview")))==null?void 0:E.name;if(t)p("web_search_call.action.sources");if(h("openai.code_interpreter"))p("code_interpreter_call.outputs");let s=C==null?void 0:C.store;if(s===!1&&k)p("reasoning.encrypted_content");let K0={model:this.modelId,input:d,temperature:Y,top_p:G,max_output_tokens:$,...((F==null?void 0:F.type)==="json"||(C==null?void 0:C.textVerbosity))&&{text:{...(F==null?void 0:F.type)==="json"&&{format:F.schema!=null?{type:"json_schema",strict:b,name:(M=F.name)!=null?M:"response",description:F.description,schema:F.schema}:{type:"json_object"}},...(C==null?void 0:C.textVerbosity)&&{verbosity:C.textVerbosity}}},conversation:C==null?void 0:C.conversation,max_tool_calls:C==null?void 0:C.maxToolCalls,metadata:C==null?void 0:C.metadata,parallel_tool_calls:C==null?void 0:C.parallelToolCalls,previous_response_id:C==null?void 0:C.previousResponseId,store:s,user:C==null?void 0:C.user,instructions:C==null?void 0:C.instructions,service_tier:C==null?void 0:C.serviceTier,include:g,prompt_cache_key:C==null?void 0:C.promptCacheKey,prompt_cache_retention:C==null?void 0:C.promptCacheRetention,safety_identifier:C==null?void 0:C.safetyIdentifier,top_logprobs:n,truncation:C==null?void 0:C.truncation,...k&&((C==null?void 0:C.reasoningEffort)!=null||(C==null?void 0:C.reasoningSummary)!=null)&&{reasoning:{...(C==null?void 0:C.reasoningEffort)!=null&&{effort:C.reasoningEffort},...(C==null?void 0:C.reasoningSummary)!=null&&{summary:C.reasoningSummary}}}};if(k){if(!((C==null?void 0:C.reasoningEffort)==="none"&&w.supportsNonReasoningParameters)){if(K0.temperature!=null)K0.temperature=void 0,P.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(K0.top_p!=null)K0.top_p=void 0,P.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"})}}else{if((C==null?void 0:C.reasoningEffort)!=null)P.push({type:"unsupported",feature:"reasoningEffort",details:"reasoningEffort is not supported for non-reasoning models"});if((C==null?void 0:C.reasoningSummary)!=null)P.push({type:"unsupported",feature:"reasoningSummary",details:"reasoningSummary is not supported for non-reasoning models"})}if((C==null?void 0:C.serviceTier)==="flex"&&!w.supportsFlexProcessing)P.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),delete K0.service_tier;if((C==null?void 0:C.serviceTier)==="priority"&&!w.supportsPriorityProcessing)P.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),delete K0.service_tier;let X0=(_=(q=(R=z==null?void 0:z.find((Q0)=>Q0.type==="provider"&&Q0.id==="openai.shell"))==null?void 0:R.args)==null?void 0:q.environment)==null?void 0:_.type,a=X0==="containerAuto"||X0==="containerReference";return{webSearchToolName:t,args:{...K0,tools:v,tool_choice:x},warnings:[...P,...y],store:s,toolNameMapping:S,providerOptionsName:j,isShellProviderExecuted:a}}async doGenerate($){var Y,X,G,J,Q,W,K,Z,H,z,V,F,L,N,D,A,B,O,E,M,R,q,_,P,w,j,C,k;let{args:S,warnings:I,webSearchToolName:v,toolNameMapping:x,providerOptionsName:y,isShellProviderExecuted:d}=await this.getArgs($),u=this.config.url({path:"/responses",modelId:this.modelId}),b=RF4($.prompt),{responseHeaders:g,value:p,rawValue:h}=await T8({url:u,headers:i6(this.config.headers(),$.headers),body:S,failedResponseHandler:VU,successfulResponseHandler:O8(qW9),abortSignal:$.abortSignal,fetch:this.config.fetch});if(p.error)throw new n8({message:p.error.message,url:u,requestBodyValues:S,statusCode:400,responseHeaders:g,responseBody:h,isRetryable:!1});let n=[],t=[],s=!1,K0=[];for(let Q0 of p.output)switch(Q0.type){case"reasoning":{if(Q0.summary.length===0)Q0.summary.push({type:"summary_text",text:""});for(let e of Q0.summary)n.push({type:"reasoning",text:e.text,providerMetadata:{[y]:{itemId:Q0.id,reasoningEncryptedContent:(Y=Q0.encrypted_content)!=null?Y:null}}});break}case"image_generation_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName("image_generation"),input:"{}",providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName("image_generation"),result:{result:Q0.result}});break}case"tool_search_call":{let e=(X=Q0.call_id)!=null?X:Q0.id,m=Q0.execution==="server";if(m)K0.push(e);n.push({type:"tool-call",toolCallId:e,toolName:x.toCustomToolName("tool_search"),input:JSON.stringify({arguments:Q0.arguments,call_id:Q0.call_id}),...m?{providerExecuted:!0}:{},providerMetadata:{[y]:{itemId:Q0.id}}});break}case"tool_search_output":{let e=(J=(G=Q0.call_id)!=null?G:K0.shift())!=null?J:Q0.id;n.push({type:"tool-result",toolCallId:e,toolName:x.toCustomToolName("tool_search"),result:{tools:Q0.tools},providerMetadata:{[y]:{itemId:Q0.id}}});break}case"local_shell_call":{n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:x.toCustomToolName("local_shell"),input:JSON.stringify({action:Q0.action}),providerMetadata:{[y]:{itemId:Q0.id}}});break}case"shell_call":{n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:x.toCustomToolName("shell"),input:JSON.stringify({action:{commands:Q0.action.commands}}),...d&&{providerExecuted:!0},providerMetadata:{[y]:{itemId:Q0.id}}});break}case"shell_call_output":{n.push({type:"tool-result",toolCallId:Q0.call_id,toolName:x.toCustomToolName("shell"),result:{output:Q0.output.map((e)=>({stdout:e.stdout,stderr:e.stderr,outcome:e.outcome.type==="exit"?{type:"exit",exitCode:e.outcome.exit_code}:{type:"timeout"}}))}});break}case"message":{for(let e of Q0.content){if(((W=(Q=$.providerOptions)==null?void 0:Q[y])==null?void 0:W.logprobs)&&e.logprobs)t.push(e.logprobs);let m={itemId:Q0.id,...Q0.phase!=null&&{phase:Q0.phase},...e.annotations.length>0&&{annotations:e.annotations}};n.push({type:"text",text:e.text,providerMetadata:{[y]:m}});for(let $0 of e.annotations)if($0.type==="url_citation")n.push({type:"source",sourceType:"url",id:(H=(Z=(K=this.config).generateId)==null?void 0:Z.call(K))!=null?H:$$(),url:$0.url,title:$0.title});else if($0.type==="file_citation")n.push({type:"source",sourceType:"document",id:(F=(V=(z=this.config).generateId)==null?void 0:V.call(z))!=null?F:$$(),mediaType:"text/plain",title:$0.filename,filename:$0.filename,providerMetadata:{[y]:{type:$0.type,fileId:$0.file_id,index:$0.index}}});else if($0.type==="container_file_citation")n.push({type:"source",sourceType:"document",id:(D=(N=(L=this.config).generateId)==null?void 0:N.call(L))!=null?D:$$(),mediaType:"text/plain",title:$0.filename,filename:$0.filename,providerMetadata:{[y]:{type:$0.type,fileId:$0.file_id,containerId:$0.container_id}}});else if($0.type==="file_path")n.push({type:"source",sourceType:"document",id:(O=(B=(A=this.config).generateId)==null?void 0:B.call(A))!=null?O:$$(),mediaType:"application/octet-stream",title:$0.file_id,filename:$0.file_id,providerMetadata:{[y]:{type:$0.type,fileId:$0.file_id,index:$0.index}}})}break}case"function_call":{s=!0,n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:Q0.name,input:Q0.arguments,providerMetadata:{[y]:{itemId:Q0.id,...Q0.namespace!=null&&{namespace:Q0.namespace}}}});break}case"custom_tool_call":{s=!0;let e=x.toCustomToolName(Q0.name);n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:e,input:JSON.stringify(Q0.input),providerMetadata:{[y]:{itemId:Q0.id}}});break}case"web_search_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName(v!=null?v:"web_search"),input:JSON.stringify({}),providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName(v!=null?v:"web_search"),result:PF4(Q0.action)});break}case"mcp_call":{let e=Q0.approval_request_id!=null?(E=b[Q0.approval_request_id])!=null?E:Q0.id:Q0.id,m=`mcp.${Q0.name}`;n.push({type:"tool-call",toolCallId:e,toolName:m,input:Q0.arguments,providerExecuted:!0,dynamic:!0}),n.push({type:"tool-result",toolCallId:e,toolName:m,result:{type:"call",serverLabel:Q0.server_label,name:Q0.name,arguments:Q0.arguments,...Q0.output!=null?{output:Q0.output}:{},...Q0.error!=null?{error:Q0.error}:{}},providerMetadata:{[y]:{itemId:Q0.id}}});break}case"mcp_list_tools":break;case"mcp_approval_request":{let e=(M=Q0.approval_request_id)!=null?M:Q0.id,m=(_=(q=(R=this.config).generateId)==null?void 0:q.call(R))!=null?_:$$(),$0=`mcp.${Q0.name}`;n.push({type:"tool-call",toolCallId:m,toolName:$0,input:Q0.arguments,providerExecuted:!0,dynamic:!0}),n.push({type:"tool-approval-request",approvalId:e,toolCallId:m});break}case"computer_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName("computer_use"),input:"",providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName("computer_use"),result:{type:"computer_use_tool_result",status:Q0.status||"completed"}});break}case"file_search_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName("file_search"),input:"{}",providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName("file_search"),result:{queries:Q0.queries,results:(w=(P=Q0.results)==null?void 0:P.map((e)=>({attributes:e.attributes,fileId:e.file_id,filename:e.filename,score:e.score,text:e.text})))!=null?w:null}});break}case"code_interpreter_call":{n.push({type:"tool-call",toolCallId:Q0.id,toolName:x.toCustomToolName("code_interpreter"),input:JSON.stringify({code:Q0.code,containerId:Q0.container_id}),providerExecuted:!0}),n.push({type:"tool-result",toolCallId:Q0.id,toolName:x.toCustomToolName("code_interpreter"),result:{outputs:Q0.outputs}});break}case"apply_patch_call":{n.push({type:"tool-call",toolCallId:Q0.call_id,toolName:x.toCustomToolName("apply_patch"),input:JSON.stringify({callId:Q0.call_id,operation:Q0.operation}),providerMetadata:{[y]:{itemId:Q0.id}}});break}}let X0={[y]:{responseId:p.id,...t.length>0?{logprobs:t}:{},...typeof p.service_tier==="string"?{serviceTier:p.service_tier}:{}}},a=p.usage;return{content:n,finishReason:{unified:Iu0({finishReason:(j=p.incomplete_details)==null?void 0:j.reason,hasFunctionCall:s}),raw:(k=(C=p.incomplete_details)==null?void 0:C.reason)!=null?k:void 0},usage:OF4(a),request:{body:S},response:{id:p.id,timestamp:new Date(p.created_at*1000),modelId:p.model,headers:g,body:h},providerMetadata:X0,warnings:I}}async doStream($){let{args:Y,warnings:X,webSearchToolName:G,toolNameMapping:J,store:Q,providerOptionsName:W,isShellProviderExecuted:K}=await this.getArgs($),{responseHeaders:Z,value:H}=await T8({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:{...Y,stream:!0},failedResponseHandler:VU,successfulResponseHandler:WK(RW9),abortSignal:$.abortSignal,fetch:this.config.fetch}),z=this,V=RF4($.prompt),F=new Map,L={unified:"other",raw:void 0},N=void 0,D=[],A=null,B={},O=[],E,M=!1,R={},q,_=[];return{stream:H.pipeThrough(new TransformStream({start(P){P.enqueue({type:"stream-start",warnings:X})},transform(P,w){var j,C,k,S,I,v,x,y,d,u,b,g,p,h,n,t,s,K0,X0,a,Q0,e,m,$0,Y0,Z0,F0,D0,O0,R0,P0,f0,p0,U4,P1,d1,C0,n0;if($.includeRawChunks)w.enqueue({type:"raw",rawValue:P.rawValue});if(!P.success){L={unified:"error",raw:void 0},w.enqueue({type:"error",error:P.error});return}let J0=P.value;if(qF4(J0)){if(J0.item.type==="function_call")B[J0.output_index]={toolName:J0.item.name,toolCallId:J0.item.call_id},w.enqueue({type:"tool-input-start",id:J0.item.call_id,toolName:J0.item.name});else if(J0.item.type==="custom_tool_call"){let B0=J.toCustomToolName(J0.item.name);B[J0.output_index]={toolName:B0,toolCallId:J0.item.call_id},w.enqueue({type:"tool-input-start",id:J0.item.call_id,toolName:B0})}else if(J0.item.type==="web_search_call")B[J0.output_index]={toolName:J.toCustomToolName(G!=null?G:"web_search"),toolCallId:J0.item.id},w.enqueue({type:"tool-input-start",id:J0.item.id,toolName:J.toCustomToolName(G!=null?G:"web_search"),providerExecuted:!0}),w.enqueue({type:"tool-input-end",id:J0.item.id}),w.enqueue({type:"tool-call",toolCallId:J0.item.id,toolName:J.toCustomToolName(G!=null?G:"web_search"),input:JSON.stringify({}),providerExecuted:!0});else if(J0.item.type==="computer_call")B[J0.output_index]={toolName:J.toCustomToolName("computer_use"),toolCallId:J0.item.id},w.enqueue({type:"tool-input-start",id:J0.item.id,toolName:J.toCustomToolName("computer_use"),providerExecuted:!0});else if(J0.item.type==="code_interpreter_call")B[J0.output_index]={toolName:J.toCustomToolName("code_interpreter"),toolCallId:J0.item.id,codeInterpreter:{containerId:J0.item.container_id}},w.enqueue({type:"tool-input-start",id:J0.item.id,toolName:J.toCustomToolName("code_interpreter"),providerExecuted:!0}),w.enqueue({type:"tool-input-delta",id:J0.item.id,delta:`{"containerId":"${J0.item.container_id}","code":"`});else if(J0.item.type==="file_search_call")w.enqueue({type:"tool-call",toolCallId:J0.item.id,toolName:J.toCustomToolName("file_search"),input:"{}",providerExecuted:!0});else if(J0.item.type==="image_generation_call")w.enqueue({type:"tool-call",toolCallId:J0.item.id,toolName:J.toCustomToolName("image_generation"),input:"{}",providerExecuted:!0});else if(J0.item.type==="tool_search_call"){let B0=J0.item.id,Y1=J.toCustomToolName("tool_search"),c1=J0.item.execution==="server";if(B[J0.output_index]={toolName:Y1,toolCallId:B0,toolSearchExecution:(j=J0.item.execution)!=null?j:"server"},c1)w.enqueue({type:"tool-input-start",id:B0,toolName:Y1,providerExecuted:!0})}else if(J0.item.type==="tool_search_output");else if(J0.item.type==="mcp_call"||J0.item.type==="mcp_list_tools"||J0.item.type==="mcp_approval_request");else if(J0.item.type==="apply_patch_call"){let{call_id:B0,operation:Y1}=J0.item;if(B[J0.output_index]={toolName:J.toCustomToolName("apply_patch"),toolCallId:B0,applyPatch:{hasDiff:Y1.type==="delete_file",endEmitted:Y1.type==="delete_file"}},w.enqueue({type:"tool-input-start",id:B0,toolName:J.toCustomToolName("apply_patch")}),Y1.type==="delete_file"){let c1=JSON.stringify({callId:B0,operation:Y1});w.enqueue({type:"tool-input-delta",id:B0,delta:c1}),w.enqueue({type:"tool-input-end",id:B0})}else w.enqueue({type:"tool-input-delta",id:B0,delta:`{"callId":"${VM(B0)}","operation":{"type":"${VM(Y1.type)}","path":"${VM(Y1.path)}","diff":"`})}else if(J0.item.type==="shell_call")B[J0.output_index]={toolName:J.toCustomToolName("shell"),toolCallId:J0.item.call_id};else if(J0.item.type==="shell_call_output");else if(J0.item.type==="message")O.splice(0,O.length),E=(C=J0.item.phase)!=null?C:void 0,w.enqueue({type:"text-start",id:J0.item.id,providerMetadata:{[W]:{itemId:J0.item.id,...J0.item.phase!=null&&{phase:J0.item.phase}}}});else if(qF4(J0)&&J0.item.type==="reasoning")R[J0.item.id]={encryptedContent:J0.item.encrypted_content,summaryParts:{0:"active"}},w.enqueue({type:"reasoning-start",id:`${J0.item.id}:0`,providerMetadata:{[W]:{itemId:J0.item.id,reasoningEncryptedContent:(k=J0.item.encrypted_content)!=null?k:null}}})}else if(CW9(J0)){if(J0.item.type==="message"){let B0=(S=J0.item.phase)!=null?S:E;E=void 0,w.enqueue({type:"text-end",id:J0.item.id,providerMetadata:{[W]:{itemId:J0.item.id,...B0!=null&&{phase:B0},...O.length>0&&{annotations:O}}}})}else if(J0.item.type==="function_call")B[J0.output_index]=void 0,M=!0,w.enqueue({type:"tool-input-end",id:J0.item.call_id,...J0.item.namespace!=null&&{providerMetadata:{[W]:{namespace:J0.item.namespace}}}}),w.enqueue({type:"tool-call",toolCallId:J0.item.call_id,toolName:J0.item.name,input:J0.item.arguments,providerMetadata:{[W]:{itemId:J0.item.id,...J0.item.namespace!=null&&{namespace:J0.item.namespace}}}});else if(J0.item.type==="custom_tool_call"){B[J0.output_index]=void 0,M=!0;let B0=J.toCustomToolName(J0.item.name);w.enqueue({type:"tool-input-end",id:J0.item.call_id}),w.enqueue({type:"tool-call",toolCallId:J0.item.call_id,toolName:B0,input:JSON.stringify(J0.item.input),providerMetadata:{[W]:{itemId:J0.item.id}}})}else if(J0.item.type==="web_search_call")B[J0.output_index]=void 0,w.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName(G!=null?G:"web_search"),result:PF4(J0.item.action)});else if(J0.item.type==="computer_call")B[J0.output_index]=void 0,w.enqueue({type:"tool-input-end",id:J0.item.id}),w.enqueue({type:"tool-call",toolCallId:J0.item.id,toolName:J.toCustomToolName("computer_use"),input:"",providerExecuted:!0}),w.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName("computer_use"),result:{type:"computer_use_tool_result",status:J0.item.status||"completed"}});else if(J0.item.type==="file_search_call")B[J0.output_index]=void 0,w.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName("file_search"),result:{queries:J0.item.queries,results:(v=(I=J0.item.results)==null?void 0:I.map((B0)=>({attributes:B0.attributes,fileId:B0.file_id,filename:B0.filename,score:B0.score,text:B0.text})))!=null?v:null}});else if(J0.item.type==="code_interpreter_call")B[J0.output_index]=void 0,w.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName("code_interpreter"),result:{outputs:J0.item.outputs}});else if(J0.item.type==="image_generation_call")w.enqueue({type:"tool-result",toolCallId:J0.item.id,toolName:J.toCustomToolName("image_generation"),result:{result:J0.item.result}});else if(J0.item.type==="tool_search_call"){let B0=B[J0.output_index],Y1=J0.item.execution==="server";if(B0!=null){let c1=Y1?B0.toolCallId:(x=J0.item.call_id)!=null?x:J0.item.id;if(Y1)_.push(c1);else w.enqueue({type:"tool-input-start",id:c1,toolName:B0.toolName});w.enqueue({type:"tool-input-end",id:c1}),w.enqueue({type:"tool-call",toolCallId:c1,toolName:B0.toolName,input:JSON.stringify({arguments:J0.item.arguments,call_id:Y1?null:c1}),...Y1?{providerExecuted:!0}:{},providerMetadata:{[W]:{itemId:J0.item.id}}})}B[J0.output_index]=void 0}else if(J0.item.type==="tool_search_output"){let B0=(d=(y=J0.item.call_id)!=null?y:_.shift())!=null?d:J0.item.id;w.enqueue({type:"tool-result",toolCallId:B0,toolName:J.toCustomToolName("tool_search"),result:{tools:J0.item.tools},providerMetadata:{[W]:{itemId:J0.item.id}}})}else if(J0.item.type==="mcp_call"){B[J0.output_index]=void 0;let B0=(u=J0.item.approval_request_id)!=null?u:void 0,Y1=B0!=null?(g=(b=F.get(B0))!=null?b:V[B0])!=null?g:J0.item.id:J0.item.id,c1=`mcp.${J0.item.name}`;w.enqueue({type:"tool-call",toolCallId:Y1,toolName:c1,input:J0.item.arguments,providerExecuted:!0,dynamic:!0}),w.enqueue({type:"tool-result",toolCallId:Y1,toolName:c1,result:{type:"call",serverLabel:J0.item.server_label,name:J0.item.name,arguments:J0.item.arguments,...J0.item.output!=null?{output:J0.item.output}:{},...J0.item.error!=null?{error:J0.item.error}:{}},providerMetadata:{[W]:{itemId:J0.item.id}}})}else if(J0.item.type==="mcp_list_tools")B[J0.output_index]=void 0;else if(J0.item.type==="apply_patch_call"){let B0=B[J0.output_index];if((B0==null?void 0:B0.applyPatch)&&!B0.applyPatch.endEmitted&&J0.item.operation.type!=="delete_file"){if(!B0.applyPatch.hasDiff)w.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:VM(J0.item.operation.diff)});w.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:'"}}'}),w.enqueue({type:"tool-input-end",id:B0.toolCallId}),B0.applyPatch.endEmitted=!0}if(B0&&J0.item.status==="completed")w.enqueue({type:"tool-call",toolCallId:B0.toolCallId,toolName:J.toCustomToolName("apply_patch"),input:JSON.stringify({callId:J0.item.call_id,operation:J0.item.operation}),providerMetadata:{[W]:{itemId:J0.item.id}}});B[J0.output_index]=void 0}else if(J0.item.type==="mcp_approval_request"){B[J0.output_index]=void 0;let B0=(n=(h=(p=z.config).generateId)==null?void 0:h.call(p))!=null?n:$$(),Y1=(t=J0.item.approval_request_id)!=null?t:J0.item.id;F.set(Y1,B0);let c1=`mcp.${J0.item.name}`;w.enqueue({type:"tool-call",toolCallId:B0,toolName:c1,input:J0.item.arguments,providerExecuted:!0,dynamic:!0}),w.enqueue({type:"tool-approval-request",approvalId:Y1,toolCallId:B0})}else if(J0.item.type==="local_shell_call")B[J0.output_index]=void 0,w.enqueue({type:"tool-call",toolCallId:J0.item.call_id,toolName:J.toCustomToolName("local_shell"),input:JSON.stringify({action:{type:"exec",command:J0.item.action.command,timeoutMs:J0.item.action.timeout_ms,user:J0.item.action.user,workingDirectory:J0.item.action.working_directory,env:J0.item.action.env}}),providerMetadata:{[W]:{itemId:J0.item.id}}});else if(J0.item.type==="shell_call")B[J0.output_index]=void 0,w.enqueue({type:"tool-call",toolCallId:J0.item.call_id,toolName:J.toCustomToolName("shell"),input:JSON.stringify({action:{commands:J0.item.action.commands}}),...K&&{providerExecuted:!0},providerMetadata:{[W]:{itemId:J0.item.id}}});else if(J0.item.type==="shell_call_output")w.enqueue({type:"tool-result",toolCallId:J0.item.call_id,toolName:J.toCustomToolName("shell"),result:{output:J0.item.output.map((B0)=>({stdout:B0.stdout,stderr:B0.stderr,outcome:B0.outcome.type==="exit"?{type:"exit",exitCode:B0.outcome.exit_code}:{type:"timeout"}}))}});else if(J0.item.type==="reasoning"){let B0=R[J0.item.id],Y1=Object.entries(B0.summaryParts).filter(([c1,C4])=>C4==="active"||C4==="can-conclude").map(([c1])=>c1);for(let c1 of Y1)w.enqueue({type:"reasoning-end",id:`${J0.item.id}:${c1}`,providerMetadata:{[W]:{itemId:J0.item.id,reasoningEncryptedContent:(s=J0.item.encrypted_content)!=null?s:null}}});delete R[J0.item.id]}}else if(xW9(J0)){let B0=B[J0.output_index];if(B0!=null)w.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:J0.delta})}else if(yW9(J0)){let B0=B[J0.output_index];if(B0!=null)w.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:J0.delta})}else if(gW9(J0)){let B0=B[J0.output_index];if(B0==null?void 0:B0.applyPatch)w.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:VM(J0.delta)}),B0.applyPatch.hasDiff=!0}else if(mW9(J0)){let B0=B[J0.output_index];if((B0==null?void 0:B0.applyPatch)&&!B0.applyPatch.endEmitted){if(!B0.applyPatch.hasDiff)w.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:VM(J0.diff)}),B0.applyPatch.hasDiff=!0;w.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:'"}}'}),w.enqueue({type:"tool-input-end",id:B0.toolCallId}),B0.applyPatch.endEmitted=!0}}else if(bW9(J0))w.enqueue({type:"tool-result",toolCallId:J0.item_id,toolName:J.toCustomToolName("image_generation"),result:{result:J0.partial_image_b64},preliminary:!0});else if(hW9(J0)){let B0=B[J0.output_index];if(B0!=null)w.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:VM(J0.delta)})}else if(fW9(J0)){let B0=B[J0.output_index];if(B0!=null)w.enqueue({type:"tool-input-delta",id:B0.toolCallId,delta:'"}'}),w.enqueue({type:"tool-input-end",id:B0.toolCallId}),w.enqueue({type:"tool-call",toolCallId:B0.toolCallId,toolName:J.toCustomToolName("code_interpreter"),input:JSON.stringify({code:J0.code,containerId:B0.codeInterpreter.containerId}),providerExecuted:!0})}else if(vW9(J0))A=J0.response.id,w.enqueue({type:"response-metadata",id:J0.response.id,timestamp:new Date(J0.response.created_at*1000),modelId:J0.response.model});else if(IW9(J0)){if(w.enqueue({type:"text-delta",id:J0.item_id,delta:J0.delta}),((X0=(K0=$.providerOptions)==null?void 0:K0[W])==null?void 0:X0.logprobs)&&J0.logprobs)D.push(J0.logprobs)}else if(J0.type==="response.reasoning_summary_part.added"){if(J0.summary_index>0){let B0=R[J0.item_id];B0.summaryParts[J0.summary_index]="active";for(let Y1 of Object.keys(B0.summaryParts))if(B0.summaryParts[Y1]==="can-conclude")w.enqueue({type:"reasoning-end",id:`${J0.item_id}:${Y1}`,providerMetadata:{[W]:{itemId:J0.item_id}}}),B0.summaryParts[Y1]="concluded";w.enqueue({type:"reasoning-start",id:`${J0.item_id}:${J0.summary_index}`,providerMetadata:{[W]:{itemId:J0.item_id,reasoningEncryptedContent:(Q0=(a=R[J0.item_id])==null?void 0:a.encryptedContent)!=null?Q0:null}}})}}else if(J0.type==="response.reasoning_summary_text.delta")w.enqueue({type:"reasoning-delta",id:`${J0.item_id}:${J0.summary_index}`,delta:J0.delta,providerMetadata:{[W]:{itemId:J0.item_id}}});else if(J0.type==="response.reasoning_summary_part.done")if(Q)w.enqueue({type:"reasoning-end",id:`${J0.item_id}:${J0.summary_index}`,providerMetadata:{[W]:{itemId:J0.item_id}}}),R[J0.item_id].summaryParts[J0.summary_index]="concluded";else R[J0.item_id].summaryParts[J0.summary_index]="can-conclude";else if(SW9(J0)){if(L={unified:Iu0({finishReason:(e=J0.response.incomplete_details)==null?void 0:e.reason,hasFunctionCall:M}),raw:($0=(m=J0.response.incomplete_details)==null?void 0:m.reason)!=null?$0:void 0},N=J0.response.usage,typeof J0.response.service_tier==="string")q=J0.response.service_tier}else if(kW9(J0)){let B0=(Y0=J0.response.incomplete_details)==null?void 0:Y0.reason;L={unified:B0?Iu0({finishReason:B0,hasFunctionCall:M}):"error",raw:B0!=null?B0:"error"},N=(Z0=J0.response.usage)!=null?Z0:void 0}else if(uW9(J0)){if(O.push(J0.annotation),J0.annotation.type==="url_citation")w.enqueue({type:"source",sourceType:"url",id:(O0=(D0=(F0=z.config).generateId)==null?void 0:D0.call(F0))!=null?O0:$$(),url:J0.annotation.url,title:J0.annotation.title});else if(J0.annotation.type==="file_citation")w.enqueue({type:"source",sourceType:"document",id:(f0=(P0=(R0=z.config).generateId)==null?void 0:P0.call(R0))!=null?f0:$$(),mediaType:"text/plain",title:J0.annotation.filename,filename:J0.annotation.filename,providerMetadata:{[W]:{type:J0.annotation.type,fileId:J0.annotation.file_id,index:J0.annotation.index}}});else if(J0.annotation.type==="container_file_citation")w.enqueue({type:"source",sourceType:"document",id:(P1=(U4=(p0=z.config).generateId)==null?void 0:U4.call(p0))!=null?P1:$$(),mediaType:"text/plain",title:J0.annotation.filename,filename:J0.annotation.filename,providerMetadata:{[W]:{type:J0.annotation.type,fileId:J0.annotation.file_id,containerId:J0.annotation.container_id}}});else if(J0.annotation.type==="file_path")w.enqueue({type:"source",sourceType:"document",id:(n0=(C0=(d1=z.config).generateId)==null?void 0:C0.call(d1))!=null?n0:$$(),mediaType:"application/octet-stream",title:J0.annotation.file_id,filename:J0.annotation.file_id,providerMetadata:{[W]:{type:J0.annotation.type,fileId:J0.annotation.file_id,index:J0.annotation.index}}})}else if(pW9(J0))w.enqueue({type:"error",error:J0})},flush(P){let w={[W]:{responseId:A,...D.length>0?{logprobs:D}:{},...q!==void 0?{serviceTier:q}:{}}};P.enqueue({type:"finish",finishReason:L,usage:OF4(N),providerMetadata:w})}})),request:{body:Y},response:{headers:Z}}}};function IW9($){return $.type==="response.output_text.delta"}function CW9($){return $.type==="response.output_item.done"}function SW9($){return $.type==="response.completed"||$.type==="response.incomplete"}function kW9($){return $.type==="response.failed"}function vW9($){return $.type==="response.created"}function xW9($){return $.type==="response.function_call_arguments.delta"}function yW9($){return $.type==="response.custom_tool_call_input.delta"}function bW9($){return $.type==="response.image_generation_call.partial_image"}function hW9($){return $.type==="response.code_interpreter_call_code.delta"}function fW9($){return $.type==="response.code_interpreter_call_code.done"}function gW9($){return $.type==="response.apply_patch_call_operation_diff.delta"}function mW9($){return $.type==="response.apply_patch_call_operation_diff.done"}function qF4($){return $.type==="response.output_item.added"}function uW9($){return $.type==="response.output_text.annotation.added"}function pW9($){return $.type==="error"}function PF4($){var Y;if($==null)return{};switch($.type){case"search":return{action:{type:"search",query:(Y=$.query)!=null?Y:void 0},...$.sources!=null&&{sources:$.sources}};case"open_page":return{action:{type:"openPage",url:$.url}};case"find_in_page":return{action:{type:"findInPage",url:$.url,pattern:$.pattern}}}}function VM($){return JSON.stringify($).slice(1,-1)}var dW9=N1(()=>z1(U.object({instructions:U.string().nullish(),speed:U.number().min(0.25).max(4).default(1).nullish()}))),cW9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({text:$,voice:Y="alloy",outputFormat:X="mp3",speed:G,instructions:J,language:Q,providerOptions:W}){let K=[],Z=await L9({provider:"openai",providerOptions:W,schema:dW9}),H={model:this.modelId,input:$,voice:Y,response_format:"mp3",speed:G,instructions:J};if(X)if(["mp3","opus","aac","flac","wav","pcm"].includes(X))H.response_format=X;else K.push({type:"unsupported",feature:"outputFormat",details:`Unsupported output format: ${X}. Using mp3 instead.`});if(Z){let z={};for(let V in z){let F=z[V];if(F!==void 0)H[V]=F}}if(Q)K.push({type:"unsupported",feature:"language",details:`OpenAI speech models do not support language selection. Language parameter "${Q}" was ignored.`});return{requestBody:H,warnings:K}}async doGenerate($){var Y,X,G;let J=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,{requestBody:Q,warnings:W}=await this.getArgs($),{value:K,responseHeaders:Z,rawValue:H}=await T8({url:this.config.url({path:"/audio/speech",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),body:Q,failedResponseHandler:VU,successfulResponseHandler:eV4(),abortSignal:$.abortSignal,fetch:this.config.fetch});return{audio:K,warnings:W,request:{body:JSON.stringify(Q)},response:{timestamp:J,modelId:this.modelId,headers:Z,body:H}}}},lW9=N1(()=>z1(U.object({text:U.string(),language:U.string().nullish(),duration:U.number().nullish(),words:U.array(U.object({word:U.string(),start:U.number(),end:U.number()})).nullish(),segments:U.array(U.object({id:U.number(),seek:U.number(),start:U.number(),end:U.number(),text:U.string(),tokens:U.array(U.number()),temperature:U.number(),avg_logprob:U.number(),compression_ratio:U.number(),no_speech_prob:U.number()})).nullish()}))),iW9=N1(()=>z1(U.object({include:U.array(U.string()).optional(),language:U.string().optional(),prompt:U.string().optional(),temperature:U.number().min(0).max(1).default(0).optional(),timestampGranularities:U.array(U.enum(["word","segment"])).default(["segment"]).optional()}))),wF4={afrikaans:"af",arabic:"ar",armenian:"hy",azerbaijani:"az",belarusian:"be",bosnian:"bs",bulgarian:"bg",catalan:"ca",chinese:"zh",croatian:"hr",czech:"cs",danish:"da",dutch:"nl",english:"en",estonian:"et",finnish:"fi",french:"fr",galician:"gl",german:"de",greek:"el",hebrew:"he",hindi:"hi",hungarian:"hu",icelandic:"is",indonesian:"id",italian:"it",japanese:"ja",kannada:"kn",kazakh:"kk",korean:"ko",latvian:"lv",lithuanian:"lt",macedonian:"mk",malay:"ms",marathi:"mr",maori:"mi",nepali:"ne",norwegian:"no",persian:"fa",polish:"pl",portuguese:"pt",romanian:"ro",russian:"ru",serbian:"sr",slovak:"sk",slovenian:"sl",spanish:"es",swahili:"sw",swedish:"sv",tagalog:"tl",tamil:"ta",thai:"th",turkish:"tr",ukrainian:"uk",urdu:"ur",vietnamese:"vi",welsh:"cy"},nW9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({audio:$,mediaType:Y,providerOptions:X}){let G=[],J=await L9({provider:"openai",providerOptions:X,schema:iW9}),Q=new FormData,W=$ instanceof Uint8Array?new Blob([$]):new Blob([RJ($)]);Q.append("model",this.modelId);let K=iV4(Y);if(Q.append("file",new File([W],"audio",{type:Y}),`audio.${K}`),J){let Z={include:J.include,language:J.language,prompt:J.prompt,response_format:["gpt-4o-transcribe","gpt-4o-mini-transcribe"].includes(this.modelId)?"json":"verbose_json",temperature:J.temperature,timestamp_granularities:J.timestampGranularities};for(let[H,z]of Object.entries(Z))if(z!=null)if(Array.isArray(z))for(let V of z)Q.append(`${H}[]`,String(V));else Q.append(H,String(z))}return{formData:Q,warnings:G}}async doGenerate($){var Y,X,G,J,Q,W,K,Z;let H=(G=(X=(Y=this.config._internal)==null?void 0:Y.currentDate)==null?void 0:X.call(Y))!=null?G:new Date,{formData:z,warnings:V}=await this.getArgs($),{value:F,responseHeaders:L,rawValue:N}=await II({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:i6(this.config.headers(),$.headers),formData:z,failedResponseHandler:VU,successfulResponseHandler:O8(lW9),abortSignal:$.abortSignal,fetch:this.config.fetch}),D=F.language!=null&&F.language in wF4?wF4[F.language]:void 0;return{text:F.text,segments:(K=(W=(J=F.segments)==null?void 0:J.map((A)=>({text:A.text,startSecond:A.start,endSecond:A.end})))!=null?W:(Q=F.words)==null?void 0:Q.map((A)=>({text:A.word,startSecond:A.start,endSecond:A.end})))!=null?K:[],language:D,durationInSeconds:(Z=F.duration)!=null?Z:void 0,warnings:V,response:{timestamp:H,modelId:this.modelId,headers:L,body:N}}}},rW9="3.0.64";function FU($={}){var Y,X;let G=(Y=CI(pD({settingValue:$.baseURL,environmentVariableName:"OPENAI_BASE_URL"})))!=null?Y:"https://api.openai.com/v1",J=(X=$.name)!=null?X:"openai",Q=()=>uW({Authorization:`Bearer ${lV4({apiKey:$.apiKey,environmentVariableName:"OPENAI_API_KEY",description:"OpenAI"})}`,"OpenAI-Organization":$.organization,"OpenAI-Project":$.project,...$.headers},`ai-sdk/openai/${rW9}`),W=(D)=>new AQ9(D,{provider:`${J}.chat`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch}),K=(D)=>new MQ9(D,{provider:`${J}.completion`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch}),Z=(D)=>new PQ9(D,{provider:`${J}.embedding`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch}),H=(D)=>new CQ9(D,{provider:`${J}.image`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch}),z=(D)=>new nW9(D,{provider:`${J}.transcription`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch}),V=(D)=>new cW9(D,{provider:`${J}.speech`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch}),F=(D)=>{if(new.target)throw Error("The OpenAI model function cannot be called with the new keyword.");return L(D)},L=(D)=>{return new TW9(D,{provider:`${J}.responses`,url:({path:A})=>`${G}${A}`,headers:Q,fetch:$.fetch,fileIdPrefixes:["file-"]})},N=function(D){return F(D)};return N.specificationVersion="v3",N.languageModel=F,N.chat=W,N.completion=K,N.responses=L,N.embedding=Z,N.embeddingModel=Z,N.textEmbedding=Z,N.textEmbeddingModel=Z,N.image=H,N.imageModel=H,N.transcription=z,N.transcriptionModel=z,N.speech=V,N.speechModel=V,N.tools=BW9,N}var vL$=FU();class P6 extends Error{code;rawCode;constructor($,Y,X,G){if(Y!==void 0)$=`${Y}: ${$}`;super($,{cause:G});this.code=Y,this.rawCode=X,this.name="LibsqlError"}}function yF4($){let Y=aW9.exec($);if(Y===null)throw new P6(`The URL '${$}' is not in a valid format`,"URL_INVALID");let X=Y.groups,G=X.scheme,J=X.authority!==void 0?sW9(X.authority):void 0,Q=FM(X.path),W=X.query!==void 0?tW9(X.query):void 0,K=X.fragment!==void 0?FM(X.fragment):void 0;return{scheme:G,authority:J,path:Q,query:W,fragment:K}}var aW9=(()=>{return new RegExp("^(?<scheme>[A-Za-z][A-Za-z.+-]*):(//(?<authority>[^/?#]*))?(?<path>[^?#]*)(\\?(?<query>[^#]*))?(#(?<fragment>.*))?$","su")})();function sW9($){let Y=oW9.exec($);if(Y===null)throw new P6("The authority part of the URL is not in a valid format","URL_INVALID");let X=Y.groups,G=FM(X.host_br??X.host),J=X.port?parseInt(X.port,10):void 0,Q=X.username!==void 0?{username:FM(X.username),password:X.password!==void 0?FM(X.password):void 0}:void 0;return{host:G,port:J,userinfo:Q}}var oW9=(()=>{return new RegExp("^((?<username>[^:]*)(:(?<password>.*))?@)?((?<host>[^:\\[\\]]*)|(\\[(?<host_br>[^\\[\\]]*)\\]))(:(?<port>[0-9]*))?$","su")})();function tW9($){let Y=$.split("&"),X=[];for(let G of Y){if(G==="")continue;let J,Q,W=G.indexOf("=");if(W<0)J=G,Q="";else J=G.substring(0,W),Q=G.substring(W+1);X.push({key:FM(J.replaceAll("+"," ")),value:FM(Q.replaceAll("+"," "))})}return{pairs:X}}function FM($){try{return decodeURIComponent($)}catch(Y){if(Y instanceof URIError)throw new P6(`URL component has invalid percent encoding: ${Y}`,"URL_INVALID",void 0,Y);throw Y}}function au($,Y,X){if(Y===void 0)throw new P6(`URL with scheme ${JSON.stringify($+":")} requires authority (the "//" part)`,"URL_INVALID");let G=`${$}:`,J=eW9(Y.host),Q=$29(Y.port),K=`//${Y29(Y.userinfo)}${J}${Q}`,Z=X.split("/").map(encodeURIComponent).join("/");if(Z!==""&&!Z.startsWith("/"))Z="/"+Z;return new URL(`${G}${K}${Z}`)}function eW9($){return $.includes(":")?`[${encodeURI($)}]`:encodeURI($)}function $29($){return $!==void 0?`:${$}`:""}function Y29($){if($===void 0)return"";let Y=encodeURIComponent($.username),X=$.password!==void 0?`:${encodeURIComponent($.password)}`:"";return`${Y}${X}@`}var vI=typeof Buffer==="function",bF4=typeof TextDecoder==="function"?new TextDecoder:void 0,hF4=typeof TextEncoder==="function"?new TextEncoder:void 0;var su=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),b70=(($)=>{let Y={};return $.forEach((X,G)=>Y[X]=G),Y})(su),X29=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,SX=String.fromCharCode.bind(String),fF4=typeof Uint8Array.from==="function"?Uint8Array.from.bind(Uint8Array):($)=>new Uint8Array(Array.prototype.slice.call($,0)),uF4=($)=>$.replace(/=/g,"").replace(/[+\/]/g,(Y)=>Y=="+"?"-":"_"),pF4=($)=>$.replace(/[^A-Za-z0-9\+\/]/g,""),dF4=($)=>{let Y,X,G,J,Q="",W=$.length%3;for(let K=0;K<$.length;){if((X=$.charCodeAt(K++))>255||(G=$.charCodeAt(K++))>255||(J=$.charCodeAt(K++))>255)throw TypeError("invalid character found");Y=X<<16|G<<8|J,Q+=su[Y>>18&63]+su[Y>>12&63]+su[Y>>6&63]+su[Y&63]}return W?Q.slice(0,W-3)+"===".substring(W):Q},fu0=typeof btoa==="function"?($)=>btoa($):vI?($)=>Buffer.from($,"binary").toString("base64"):dF4,bu0=vI?($)=>Buffer.from($).toString("base64"):($)=>{let X=[];for(let G=0,J=$.length;G<J;G+=4096)X.push(SX.apply(null,$.subarray(G,G+4096)));return fu0(X.join(""))},h70=($,Y=!1)=>Y?uF4(bu0($)):bu0($),G29=($)=>{if($.length<2){var Y=$.charCodeAt(0);return Y<128?$:Y<2048?SX(192|Y>>>6)+SX(128|Y&63):SX(224|Y>>>12&15)+SX(128|Y>>>6&63)+SX(128|Y&63)}else{var Y=65536+($.charCodeAt(0)-55296)*1024+($.charCodeAt(1)-56320);return SX(240|Y>>>18&7)+SX(128|Y>>>12&63)+SX(128|Y>>>6&63)+SX(128|Y&63)}},J29=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,cF4=($)=>$.replace(J29,G29),gF4=vI?($)=>Buffer.from($,"utf8").toString("base64"):hF4?($)=>bu0(hF4.encode($)):($)=>fu0(cF4($)),kI=($,Y=!1)=>Y?uF4(gF4($)):gF4($),mF4=($)=>kI($,!0),Q29=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,W29=($)=>{switch($.length){case 4:var Y=(7&$.charCodeAt(0))<<18|(63&$.charCodeAt(1))<<12|(63&$.charCodeAt(2))<<6|63&$.charCodeAt(3),X=Y-65536;return SX((X>>>10)+55296)+SX((X&1023)+56320);case 3:return SX((15&$.charCodeAt(0))<<12|(63&$.charCodeAt(1))<<6|63&$.charCodeAt(2));default:return SX((31&$.charCodeAt(0))<<6|63&$.charCodeAt(1))}},lF4=($)=>$.replace(Q29,W29),iF4=($)=>{if($=$.replace(/\s+/g,""),!X29.test($))throw TypeError("malformed base64.");$+="==".slice(2-($.length&3));let Y,X,G,J=[];for(let Q=0;Q<$.length;)if(Y=b70[$.charAt(Q++)]<<18|b70[$.charAt(Q++)]<<12|(X=b70[$.charAt(Q++)])<<6|(G=b70[$.charAt(Q++)]),X===64)J.push(SX(Y>>16&255));else if(G===64)J.push(SX(Y>>16&255,Y>>8&255));else J.push(SX(Y>>16&255,Y>>8&255,Y&255));return J.join("")},gu0=typeof atob==="function"?($)=>atob(pF4($)):vI?($)=>Buffer.from($,"base64").toString("binary"):iF4,nF4=vI?($)=>fF4(Buffer.from($,"base64")):($)=>fF4(gu0($).split("").map((Y)=>Y.charCodeAt(0))),rF4=($)=>nF4(aF4($)),K29=vI?($)=>Buffer.from($,"base64").toString("utf8"):bF4?($)=>bF4.decode(nF4($)):($)=>lF4(gu0($)),aF4=($)=>pF4($.replace(/[-_]/g,(Y)=>Y=="-"?"+":"/")),hu0=($)=>K29(aF4($)),Z29=($)=>{if(typeof $!=="string")return!1;let Y=$.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(Y)||!/[^\s0-9a-zA-Z\-_]/.test(Y)},sF4=($)=>{return{value:$,enumerable:!1,writable:!0,configurable:!0}},oF4=function(){let $=(Y,X)=>Object.defineProperty(String.prototype,Y,sF4(X));$("fromBase64",function(){return hu0(this)}),$("toBase64",function(Y){return kI(this,Y)}),$("toBase64URI",function(){return kI(this,!0)}),$("toBase64URL",function(){return kI(this,!0)}),$("toUint8Array",function(){return rF4(this)})},tF4=function(){let $=(Y,X)=>Object.defineProperty(Uint8Array.prototype,Y,sF4(X));$("toBase64",function(Y){return h70(this,Y)}),$("toBase64URI",function(){return h70(this,!0)}),$("toBase64URL",function(){return h70(this,!0)})},U29=()=>{oF4(),tF4()},xI={version:"3.7.8",VERSION:"3.7.8",atob:gu0,atobPolyfill:iF4,btoa:fu0,btoaPolyfill:dF4,fromBase64:hu0,toBase64:kI,encode:kI,encodeURI:mF4,encodeURL:mF4,utob:cF4,btou:lF4,decode:hu0,isValid:Z29,fromUint8Array:h70,toUint8Array:rF4,extendString:oF4,extendUint8Array:tF4,extendBuiltins:U29};var GH="https://github.com/libsql/libsql-client-ts#supported-urls";function dD($){if($==="write")return"BEGIN IMMEDIATE";else if($==="read")return"BEGIN TRANSACTION READONLY";else if($==="deferred")return"BEGIN DEFERRED";else throw RangeError('Unknown transaction mode, supported values are "write", "read" and "deferred"')}class yI{columns;columnTypes;rows;rowsAffected;lastInsertRowid;constructor($,Y,X,G,J){this.columns=$,this.columnTypes=Y,this.rows=X,this.rowsAffected=G,this.lastInsertRowid=J}toJSON(){return{columns:this.columns,columnTypes:this.columnTypes,rows:this.rows.map(H29),rowsAffected:this.rowsAffected,lastInsertRowid:this.lastInsertRowid!==void 0?""+this.lastInsertRowid:null}}}function H29($){return Array.prototype.map.call($,z29)}function z29($){if(typeof $==="bigint")return""+$;else if($ instanceof ArrayBuffer)return xI.fromUint8Array(new Uint8Array($));else return $}var eF4=":memory:";function $L4($){return $.scheme==="file"&&($.path===":memory:"||$.path.startsWith(":memory:?"))}function ou($,Y){if(typeof $!=="object")throw TypeError(`Expected client configuration as object, got ${typeof $}`);let{url:X,authToken:G,tls:J,intMode:Q,concurrency:W}=$;W=Math.max(0,W||20),Q??="number";let K=[];if(X===eF4)X="file::memory:";let Z=yF4(X),H=Z.scheme.toLowerCase(),z=H==="file"&&Z.path===eF4&&Z.authority===void 0,V;if(z)V={cache:{values:["shared","private"],update:(D,A)=>K.push(`${D}=${A}`)}};else V={tls:{values:["0","1"],update:(D,A)=>J=A==="1"},authToken:{update:(D,A)=>G=A}};for(let{key:D,value:A}of Z.query?.pairs??[]){if(!Object.hasOwn(V,D))throw new P6(`Unsupported URL query parameter ${JSON.stringify(D)}`,"URL_PARAM_NOT_SUPPORTED");let B=V[D];if(B.values!==void 0&&!B.values.includes(A))throw new P6(`Unknown value for the "${D}" query argument: ${JSON.stringify(A)}. Supported values are: [${B.values.map((O)=>'"'+O+'"').join(", ")}]`,"URL_INVALID");if(B.update!==void 0)B?.update(D,A)}let F=K.length===0?"":`?${K.join("&")}`,L=Z.path+F,N;if(H==="libsql")if(J===!1){if(Z.authority?.port===void 0)throw new P6('A "libsql:" URL with ?tls=0 must specify an explicit port',"URL_INVALID");N=Y?"http":"ws"}else N=Y?"https":"wss";else N=H;if(N==="http"||N==="ws")J??=!1;else J??=!0;if(N!=="http"&&N!=="ws"&&N!=="https"&&N!=="wss"&&N!=="file")throw new P6(`The client supports only "libsql:", "wss:", "ws:", "https:", "http:" and "file:" URLs, got ${JSON.stringify(Z.scheme+":")}. For more information, please read ${GH}`,"URL_SCHEME_NOT_SUPPORTED");if(Q!=="number"&&Q!=="bigint"&&Q!=="string")throw TypeError(`Invalid value for intMode, expected "number", "bigint" or "string", got ${JSON.stringify(Q)}`);if(Z.fragment!==void 0)throw new P6(`URL fragments are not supported: ${JSON.stringify("#"+Z.fragment)}`,"URL_INVALID");if(z)return{scheme:"file",tls:!1,path:L,intMode:Q,concurrency:W,syncUrl:$.syncUrl,syncInterval:$.syncInterval,readYourWrites:$.readYourWrites,offline:$.offline,fetch:$.fetch,authToken:void 0,encryptionKey:void 0,authority:void 0};return{scheme:N,tls:J,authority:Z.authority,path:L,authToken:G,intMode:Q,concurrency:W,encryptionKey:$.encryptionKey,syncUrl:$.syncUrl,syncInterval:$.syncInterval,readYourWrites:$.readYourWrites,offline:$.offline,fetch:$.fetch}}var tu=U6(LL4(),1);import{Buffer as NL4}from"buffer";function AL4($){if($.scheme!=="file")throw new P6(`URL scheme ${JSON.stringify($.scheme+":")} is not supported by the local sqlite3 client. For more information, please read ${GH}`,"URL_SCHEME_NOT_SUPPORTED");let Y=$.authority;if(Y!==void 0){let W=Y.host.toLowerCase();if(W!==""&&W!=="localhost")throw new P6(`Invalid host in file URL: ${JSON.stringify(Y.host)}. A "file:" URL with an absolute path should start with one slash ("file:/absolute/path.db") or with three slashes ("file:///absolute/path.db"). For more information, please read ${GH}`,"URL_INVALID");if(Y.port!==void 0)throw new P6("File URL cannot have a port","URL_INVALID");if(Y.userinfo!==void 0)throw new P6("File URL cannot have username and password","URL_INVALID")}let X=$L4($);if(X&&$.syncUrl)throw new P6(`Embedded replica must use file for local db but URI with in-memory mode were provided instead: ${$.path}`,"URL_INVALID");let G=$.path;if(X)G=`${$.scheme}:${$.path}`;let J={authToken:$.authToken,encryptionKey:$.encryptionKey,syncUrl:$.syncUrl,syncPeriod:$.syncInterval,readYourWrites:$.readYourWrites,offline:$.offline},Q=new tu.default(G,J);return EY(Q,"SELECT 1 AS checkThatTheDatabaseCanBeOpened",$.intMode),new BL4(G,J,Q,$.intMode)}class BL4{#$;#Y;#X;#J;closed;protocol;constructor($,Y,X,G){this.#$=$,this.#Y=Y,this.#X=X,this.#J=G,this.closed=!1,this.protocol="file"}async execute($,Y){let X;if(typeof $==="string")X={sql:$,args:Y||[]};else X=$;return this.#G(),EY(this.#Q(),X,this.#J)}async batch($,Y="deferred"){this.#G();let X=this.#Q();try{EY(X,dD(Y),this.#J);let G=$.map((J)=>{if(!X.inTransaction)throw new P6("The transaction has been rolled back","TRANSACTION_CLOSED");let Q=Array.isArray(J)?{sql:J[0],args:J[1]||[]}:J;return EY(X,Q,this.#J)});return EY(X,"COMMIT",this.#J),G}finally{if(X.inTransaction)EY(X,"ROLLBACK",this.#J)}}async migrate($){this.#G();let Y=this.#Q();try{EY(Y,"PRAGMA foreign_keys=off",this.#J),EY(Y,dD("deferred"),this.#J);let X=$.map((G)=>{if(!Y.inTransaction)throw new P6("The transaction has been rolled back","TRANSACTION_CLOSED");return EY(Y,G,this.#J)});return EY(Y,"COMMIT",this.#J),X}finally{if(Y.inTransaction)EY(Y,"ROLLBACK",this.#J);EY(Y,"PRAGMA foreign_keys=on",this.#J)}}async transaction($="write"){let Y=this.#Q();return EY(Y,dD($),this.#J),this.#X=null,new OL4(Y,this.#J)}async executeMultiple($){this.#G();let Y=this.#Q();try{return EL4(Y,$)}finally{if(Y.inTransaction)EY(Y,"ROLLBACK",this.#J)}}async sync(){this.#G();let $=await this.#Q().sync();return{frames_synced:$.frames_synced,frame_no:$.frame_no}}async reconnect(){try{if(!this.closed&&this.#X!==null)this.#X.close()}finally{this.#X=new tu.default(this.#$,this.#Y),this.closed=!1}}close(){if(this.closed=!0,this.#X!==null)this.#X.close(),this.#X=null}#G(){if(this.closed)throw new P6("The client is closed","CLIENT_CLOSED")}#Q(){if(this.#X===null)this.#X=new tu.default(this.#$,this.#Y);return this.#X}}class OL4{#$;#Y;constructor($,Y){this.#$=$,this.#Y=Y}async execute($,Y){let X;if(typeof $==="string")X={sql:$,args:Y||[]};else X=$;return this.#X(),EY(this.#$,X,this.#Y)}async batch($){return $.map((Y)=>{this.#X();let X=Array.isArray(Y)?{sql:Y[0],args:Y[1]||[]}:Y;return EY(this.#$,X,this.#Y)})}async executeMultiple($){return this.#X(),EL4(this.#$,$)}async rollback(){if(!this.#$.open)return;this.#X(),EY(this.#$,"ROLLBACK",this.#Y)}async commit(){this.#X(),EY(this.#$,"COMMIT",this.#Y)}close(){if(this.#$.inTransaction)EY(this.#$,"ROLLBACK",this.#Y)}get closed(){return!this.#$.inTransaction}#X(){if(this.closed)throw new P6("The transaction is closed","TRANSACTION_CLOSED")}}function EY($,Y,X){let G,J;if(typeof Y==="string")G=Y,J=[];else if(G=Y.sql,Array.isArray(Y.args))J=Y.args.map((Q)=>DL4(Q,X));else{J={};for(let Q in Y.args){let W=Q[0]==="@"||Q[0]==="$"||Q[0]===":"?Q.substring(1):Q;J[W]=DL4(Y.args[Q],X)}}try{let Q=$.prepare(G);Q.safeIntegers(!0);let W=!0;try{Q.raw(!0)}catch{W=!1}if(W){let K=Array.from(Q.columns().map((F)=>F.name)),Z=Array.from(Q.columns().map((F)=>F.type??"")),H=Q.all(J).map((F)=>{return l29(F,K,X)}),z=0,V=void 0;return new yI(K,Z,H,0,void 0)}else{let K=Q.run(J),Z=K.changes,H=BigInt(K.lastInsertRowid);return new yI([],[],[],Z,H)}}catch(Q){throw ML4(Q)}}function l29($,Y,X){let G={};Object.defineProperty(G,"length",{value:$.length});for(let J=0;J<$.length;++J){let Q=i29($[J],X);Object.defineProperty(G,J,{value:Q});let W=Y[J];if(!Object.hasOwn(G,W))Object.defineProperty(G,W,{value:Q,enumerable:!0,configurable:!0,writable:!0})}return G}function i29($,Y){if(typeof $==="bigint")if(Y==="number"){if($<n29||$>r29)throw RangeError("Received integer which cannot be safely represented as a JavaScript number");return Number($)}else if(Y==="bigint")return $;else if(Y==="string")return""+$;else throw Error("Invalid value for IntMode");else if($ instanceof NL4)return $.buffer;return $}var n29=-9007199254740991n,r29=9007199254740991n;function DL4($,Y){if(typeof $==="number"){if(!Number.isFinite($))throw RangeError("Only finite numbers (not Infinity or NaN) can be passed as arguments");return $}else if(typeof $==="bigint"){if($<a29||$>s29)throw RangeError("bigint is too large to be represented as a 64-bit integer and passed as argument");return $}else if(typeof $==="boolean")switch(Y){case"bigint":return $?1n:0n;case"string":return $?"1":"0";default:return $?1:0}else if($ instanceof ArrayBuffer)return NL4.from($);else if($ instanceof Date)return $.valueOf();else if($===void 0)throw TypeError("undefined cannot be passed as argument to the database");else return $}var a29=-9223372036854775808n,s29=9223372036854775807n;function EL4($,Y){try{$.exec(Y)}catch(X){throw ML4(X)}}function ML4($){if($ instanceof tu.default.SqliteError)return new P6($.message,$.code,$.rawCode,$);return $}var cD;if(typeof WebSocket<"u")cD=WebSocket;else if(typeof global<"u")cD=global.WebSocket;else if(typeof window<"u")cD=window.WebSocket;else if(typeof self<"u")cD=self.WebSocket;class hI{constructor(){this.intMode="number"}intMode}class T9 extends Error{constructor($){super($);this.name="ClientError"}}class Z6 extends T9{constructor($){super($);this.name="ProtoError"}}class eu extends T9{code;proto;constructor($,Y){super($);this.name="ResponseError",this.code=Y.code,this.proto=Y,this.stack=void 0}}class S7 extends T9{constructor($,Y){if(Y!==void 0){super(`${$}: ${Y}`);this.cause=Y}else super($);this.name="ClosedError"}}class $p extends T9{constructor($){super($);this.name="WebSocketUnsupportedError"}}class fI extends T9{constructor($){super($);this.name="WebSocketError"}}class DM extends T9{status;constructor($,Y){super($);this.status=Y,this.name="HttpServerError"}}class LU extends T9{constructor($){super($);this.name="ProtocolVersionError"}}class NG extends T9{constructor($){super($);this.name="InternalError"}}class JH extends T9{constructor($){super($);this.name="MisuseError"}}function vQ($){if(typeof $==="string")return $;throw gI($,"string")}function pW($){if($===null||$===void 0)return;else if(typeof $==="string")return $;throw gI($,"string or null")}function BV($){if(typeof $==="number")return $;throw gI($,"number")}function lD($){if(typeof $==="boolean")return $;throw gI($,"boolean")}function Yp($){if(Array.isArray($))return $;throw gI($,"array")}function r7($){if($!==null&&typeof $==="object"&&!Array.isArray($))return $;throw gI($,"object")}function DU($,Y){return Yp($).map((X)=>Y(r7(X)))}function gI($,Y){if($===void 0)return new Z6(`Expected ${Y}, but the property was missing`);let X=typeof $;if($===null)X="null";else if(Array.isArray($))X="array";return new Z6(`Expected ${Y}, received ${X}`)}function NM($,Y){return Y(r7($))}class RL4{#$;#Y;constructor($){this.#$=$,this.#Y=!1}begin(){this.#$.push("{"),this.#Y=!0}end(){this.#$.push("}"),this.#Y=!1}#X($){if(this.#Y)this.#$.push('"'),this.#Y=!1;else this.#$.push(',"');this.#$.push($),this.#$.push('":')}string($,Y){this.#X($),this.#$.push(JSON.stringify(Y))}stringRaw($,Y){this.#X($),this.#$.push('"'),this.#$.push(Y),this.#$.push('"')}number($,Y){this.#X($),this.#$.push(""+Y)}boolean($,Y){this.#X($),this.#$.push(Y?"true":"false")}object($,Y,X){this.#X($),this.begin(),X(this,Y),this.end()}arrayObjects($,Y,X){this.#X($),this.#$.push("[");for(let G=0;G<Y.length;++G){if(G!==0)this.#$.push(",");this.begin(),X(this,Y[G]),this.end()}this.#$.push("]")}}function Xp($,Y){let X=[],G=new RL4(X);return G.begin(),Y(G,$),G.end(),X.join("")}var AM=0,Gp=1,Jp=2;var qL4=5;class PL4{#$;#Y;#X;constructor($){this.#$=$,this.#Y=new DataView($.buffer,$.byteOffset,$.byteLength),this.#X=0}varint(){let $=0;for(let Y=0;;Y+=7){let X=this.#$[this.#X++];if($|=(X&127)<<Y,!(X&128))break}return $}varintBig(){let $=0n;for(let Y=0n;;Y+=7n){let X=this.#$[this.#X++];if($|=BigInt(X&127)<<Y,!(X&128))break}return $}bytes($){let Y=new Uint8Array(this.#$.buffer,this.#$.byteOffset+this.#X,$);return this.#X+=$,Y}double(){let $=this.#Y.getFloat64(this.#X,!0);return this.#X+=8,$}skipVarint(){for(;;)if(!(this.#$[this.#X++]&128))break}skip($){this.#X+=$}eof(){return this.#X>=this.#$.byteLength}}class wL4{#$;#Y;constructor($){this.#$=$,this.#Y=-1}setup($){this.#Y=$}#X($){if(this.#Y!==$)throw new Z6(`Expected wire type ${$}, got ${this.#Y}`);this.#Y=-1}bytes(){this.#X(Jp);let $=this.#$.varint();return this.#$.bytes($)}string(){return new TextDecoder().decode(this.bytes())}message($){return iD(this.bytes(),$)}int32(){return this.#X(AM),this.#$.varint()}uint32(){return this.int32()}bool(){return this.int32()!==0}uint64(){return this.#X(AM),this.#$.varintBig()}sint64(){let $=this.uint64();return $>>1n^-($&1n)}double(){return this.#X(Gp),this.#$.double()}maybeSkip(){if(this.#Y<0)return;else if(this.#Y===AM)this.#$.skipVarint();else if(this.#Y===Gp)this.#$.skip(8);else if(this.#Y===Jp){let $=this.#$.varint();this.#$.skip($)}else if(this.#Y===qL4)this.#$.skip(4);else throw new Z6(`Unexpected wire type ${this.#Y}`);this.#Y=-1}}function iD($,Y){let X=new PL4($),G=new wL4(X),J=Y.default();while(!X.eof()){let Q=X.varint(),W=Q>>3,K=Q&7;G.setup(K);let Z=Y[W];if(Z!==void 0){let H=Z(G,J);if(H!==void 0)J=H}G.maybeSkip()}return J}class uu0{#$;#Y;#X;#J;constructor(){this.#$=new ArrayBuffer(256),this.#Y=new Uint8Array(this.#$),this.#X=new DataView(this.#$),this.#J=0}#G($){if(this.#J+$<=this.#$.byteLength)return;let Y=this.#$.byteLength;while(Y<this.#J+$)Y*=2;let X=new ArrayBuffer(Y),G=new Uint8Array(X),J=new DataView(X);G.set(new Uint8Array(this.#$,0,this.#J)),this.#$=X,this.#Y=G,this.#X=J}#Q($){this.#G(5),$=0|$;do{let Y=$&127;$>>>=7,Y|=$?128:0,this.#Y[this.#J++]=Y}while($)}#U($){this.#G(10),$=$&0xffffffffffffffffn;do{let Y=Number($&0x7fn);$>>=7n,Y|=$?128:0,this.#Y[this.#J++]=Y}while($)}#Z($,Y){this.#Q($<<3|Y)}bytes($,Y){this.#Z($,Jp),this.#Q(Y.byteLength),this.#G(Y.byteLength),this.#Y.set(Y,this.#J),this.#J+=Y.byteLength}string($,Y){this.bytes($,new TextEncoder().encode(Y))}message($,Y,X){let G=new uu0;X(G,Y),this.bytes($,G.data())}int32($,Y){this.#Z($,AM),this.#Q(Y)}uint32($,Y){this.int32($,Y)}bool($,Y){this.int32($,Y?1:0)}sint64($,Y){this.#Z($,AM),this.#U(Y<<1n^Y>>63n)}double($,Y){this.#Z($,Gp),this.#G(8),this.#X.setFloat64(this.#J,Y,!0),this.#J+=8}data(){return new Uint8Array(this.#$,0,this.#J)}}function Qp($,Y){let X=new uu0;return Y(X,$),X.data()}class nD{#$;#Y;constructor(){this.#$=new Set,this.#Y=new Set}alloc(){for(let Y of this.#Y){if(this.#Y.delete(Y),this.#$.add(Y),!this.#$.has(this.#$.size-1))this.#Y.add(this.#$.size-1);return Y}let $=this.#$.size;return this.#$.add($),$}free($){if(!this.#$.delete($))throw new NG("Freeing an id that is not allocated");if(this.#Y.delete(this.#$.size),$<this.#$.size)this.#Y.add($)}}function D9($,Y){throw new NG(Y)}function mI($){if($===null)return null;else if(typeof $==="string")return $;else if(typeof $==="number"){if(!Number.isFinite($))throw RangeError("Only finite numbers (not Infinity or NaN) can be passed as arguments");return $}else if(typeof $==="bigint"){if($<t29||$>e29)throw RangeError("This bigint value is too large to be represented as a 64-bit integer and passed as argument");return $}else if(typeof $==="boolean")return $?1n:0n;else if($ instanceof ArrayBuffer)return new Uint8Array($);else if($ instanceof Uint8Array)return $;else if($ instanceof Date)return+$.valueOf();else if(typeof $==="object")return""+$.toString();else throw TypeError("Unsupported type of value")}var t29=-9223372036854775808n,e29=9223372036854775807n;function pu0($,Y){if($===null)return null;else if(typeof $==="number")return $;else if(typeof $==="string")return $;else if(typeof $==="bigint")if(Y==="number"){let X=Number($);if(!Number.isSafeInteger(X))throw RangeError("Received integer which is too large to be safely represented as a JavaScript number");return X}else if(Y==="bigint")return $;else if(Y==="string")return""+$;else throw new JH("Invalid value for IntMode");else if($ instanceof Uint8Array)return $.slice().buffer;else if($===void 0)throw new Z6("Received unrecognized type of Value");else throw D9($,"Impossible type of Value")}function BM($){return{affectedRowCount:$.affectedRowCount,lastInsertRowid:$.lastInsertRowid,columnNames:$.cols.map((Y)=>Y.name),columnDecltypes:$.cols.map((Y)=>Y.decltype)}}function m70($,Y){let X=BM($),G=$.rows.map((J)=>_L4(X.columnNames,J,Y));return{...X,rows:G}}function u70($,Y){let X=BM($),G;if($.rows.length>0)G=_L4(X.columnNames,$.rows[0],Y);return{...X,row:G}}function p70($,Y){let X=BM($),G;if($.rows.length>0&&X.columnNames.length>0)G=pu0($.rows[0][0],Y);return{...X,value:G}}function _L4($,Y,X){let G={};Object.defineProperty(G,"length",{value:Y.length});for(let J=0;J<Y.length;++J){let Q=pu0(Y[J],X);Object.defineProperty(G,J,{value:Q});let W=$[J];if(W!==void 0&&!Object.hasOwn(G,W))Object.defineProperty(G,W,{value:Q,enumerable:!0,configurable:!0,writable:!0})}return G}function OV($){return new eu($.message,$)}class OM{#$;#Y;#X;constructor($,Y){this.#$=$,this.#Y=Y,this.#X=void 0}_getSqlId($){if(this.#$!==$)throw new JH("Attempted to use SQL text opened with other object");else if(this.#X!==void 0)throw new S7("SQL text is closed",this.#X);return this.#Y}close(){this._setClosed(new T9("SQL text was manually closed"))}_setClosed($){if(this.#X===void 0)this.#X=$,this.#$._closeSql(this.#Y)}get closed(){return this.#X!==void 0}}function Wp($,Y){if(Y instanceof OM)return{sqlId:Y._getSqlId($)};else return{sql:""+Y}}class rD{#$;#Y;constructor(){this.#$=[],this.#Y=[]}get length(){return this.#$.length+this.#Y.length}push($){this.#$.push($)}shift(){if(this.#Y.length===0&&this.#$.length>0)this.#Y=this.#$.reverse(),this.#$=[];return this.#Y.pop()}first(){return this.#Y.length!==0?this.#Y[this.#Y.length-1]:this.#$[0]}}class Kp{sql;_args;_namedArgs;constructor($){this.sql=$,this._args=[],this._namedArgs=new Map}bindIndexes($){this._args.length=0;for(let Y of $)this._args.push(mI(Y));return this}bindIndex($,Y){if($!==($|0)||$<=0)throw RangeError("Index of a positional argument must be positive integer");while(this._args.length<$)this._args.push(null);return this._args[$-1]=mI(Y),this}bindName($,Y){return this._namedArgs.set($,mI(Y)),this}unbindAll(){return this._args.length=0,this._namedArgs.clear(),this}}function d70($,Y,X){let G,J=[],Q=[];if(Y instanceof Kp){G=Y.sql,J=Y._args;for(let[Z,H]of Y._namedArgs.entries())Q.push({name:Z,value:H})}else if(Array.isArray(Y))if(G=Y[0],Array.isArray(Y[1]))J=Y[1].map((Z)=>mI(Z));else Q=Object.entries(Y[1]).map(([Z,H])=>{return{name:Z,value:mI(H)}});else G=Y;let{sql:W,sqlId:K}=Wp($,G);return{sql:W,sqlId:K,args:J,namedArgs:Q,wantRows:X}}class c70{_stream;#$;_steps;#Y;constructor($,Y){this._stream=$,this.#$=Y,this._steps=[],this.#Y=!1}step(){return new du0(this)}execute(){if(this.#Y)throw new JH("This batch has already been executed");this.#Y=!0;let $={steps:this._steps.map((Y)=>Y.proto)};if(this.#$)return YK9(this._stream,this._steps,$);else return $K9(this._stream,this._steps,$)}}function $K9($,Y,X){return $._batch(X).then((G)=>{for(let J=0;J<Y.length;++J){let Q=G.stepResults.get(J),W=G.stepErrors.get(J);Y[J].callback(Q,W)}})}async function YK9($,Y,X){let G=await $._openCursor(X);try{let J=0,Q=void 0,W=[];for(;;){let K=await G.next();if(K===void 0)break;if(K.type==="step_begin"){if(K.step<J||K.step>=Y.length)throw new Z6("Server produced StepBeginEntry for unexpected step");else if(Q!==void 0)throw new Z6("Server produced StepBeginEntry before terminating previous step");for(let Z=J;Z<K.step;++Z)Y[Z].callback(void 0,void 0);J=K.step+1,Q=K,W=[]}else if(K.type==="step_end"){if(Q===void 0)throw new Z6("Server produced StepEndEntry but no step is active");let Z={cols:Q.cols,rows:W,affectedRowCount:K.affectedRowCount,lastInsertRowid:K.lastInsertRowid};Y[Q.step].callback(Z,void 0),Q=void 0,W=[]}else if(K.type==="step_error"){if(Q===void 0){if(K.step>=Y.length)throw new Z6("Server produced StepErrorEntry for unexpected step");for(let Z=J;Z<K.step;++Z)Y[Z].callback(void 0,void 0)}else{if(K.step!==Q.step)throw new Z6("Server produced StepErrorEntry for unexpected step");Q=void 0,W=[]}Y[K.step].callback(void 0,K.error),J=K.step+1}else if(K.type==="row"){if(Q===void 0)throw new Z6("Server produced RowEntry but no step is active");W.push(K.row)}else if(K.type==="error")throw OV(K.error);else if(K.type==="none")throw new Z6("Server produced unrecognized CursorEntry");else throw D9(K,"Impossible CursorEntry")}if(Q!==void 0)throw new Z6("Server closed Cursor before terminating active step");for(let K=J;K<Y.length;++K)Y[K].callback(void 0,void 0)}finally{G.close()}}class du0{_batch;#$;_index;constructor($){this._batch=$,this.#$=[],this._index=void 0}condition($){return this.#$.push($._proto),this}query($){return this.#Y($,!0,m70)}queryRow($){return this.#Y($,!0,u70)}queryValue($){return this.#Y($,!0,p70)}run($){return this.#Y($,!1,BM)}#Y($,Y,X){if(this._index!==void 0)throw new JH("This BatchStep has already been added to the batch");let G=d70(this._batch._stream._sqlOwner(),$,Y),J;if(this.#$.length===0)J=void 0;else if(this.#$.length===1)J=this.#$[0];else J={type:"and",conds:this.#$.slice()};let Q={stmt:G,condition:J};return new Promise((W,K)=>{let Z=(H,z)=>{if(H!==void 0&&z!==void 0)K(new Z6("Server returned both result and error"));else if(z!==void 0)K(OV(z));else if(H!==void 0)W(X(H,this._batch._stream.intMode));else W(void 0)};this._index=this._batch._steps.length,this._batch._steps.push({proto:Q,callback:Z})})}}class g${_batch;_proto;constructor($,Y){this._batch=$,this._proto=Y}static ok($){return new g$($._batch,{type:"ok",step:jL4($)})}static error($){return new g$($._batch,{type:"error",step:jL4($)})}static not($){return new g$($._batch,{type:"not",cond:$._proto})}static and($,Y){for(let X of Y)TL4($,X);return new g$($,{type:"and",conds:Y.map((X)=>X._proto)})}static or($,Y){for(let X of Y)TL4($,X);return new g$($,{type:"or",conds:Y.map((X)=>X._proto)})}static isAutocommit($){return $._stream.client()._ensureVersion(3,"BatchCond.isAutocommit()"),new g$($,{type:"is_autocommit"})}}function jL4($){if($._index===void 0)throw new JH("Cannot add a condition referencing a step that has not been added to the batch");return $._index}function TL4($,Y){if(Y._batch!==$)throw new JH("Cannot mix BatchCond objects for different Batch objects")}function IL4($){return{paramNames:$.params.map((Y)=>Y.name),columns:$.cols,isExplain:$.isExplain,isReadonly:$.isReadonly}}class uI{constructor($){this.intMode=$}query($){return this.#$($,!0,m70)}queryRow($){return this.#$($,!0,u70)}queryValue($){return this.#$($,!0,p70)}run($){return this.#$($,!1,BM)}#$($,Y,X){let G=d70(this._sqlOwner(),$,Y);return this._execute(G).then((J)=>X(J,this.intMode))}batch($=!1){return new c70(this,$)}describe($){let Y=Wp(this._sqlOwner(),$);return this._describe(Y).then(IL4)}sequence($){let Y=Wp(this._sqlOwner(),$);return this._sequence(Y)}intMode}class Zp{}var XK9=1000,GK9=10;class cu0 extends Zp{#$;#Y;#X;#J;#G;#Q;#U;constructor($,Y,X){super();this.#$=$,this.#Y=Y,this.#X=X,this.#J=new rD,this.#G=new rD,this.#Q=void 0,this.#U=!1}async next(){for(;;){if(this.#Q!==void 0)throw new S7("Cursor is closed",this.#Q);while(!this.#U&&this.#G.length<GK9)this.#G.push(this.#Z());let $=this.#J.shift();if(this.#U||$!==void 0)return $;await this.#G.shift().then((Y)=>{if(Y===void 0)return;for(let X of Y.entries)this.#J.push(X);this.#U||=Y.done})}}#Z(){return this.#Y._sendCursorRequest(this,{type:"fetch_cursor",cursorId:this.#X,maxCount:XK9}).then(($)=>$,($)=>{this._setClosed($);return})}_setClosed($){if(this.#Q!==void 0)return;this.#Q=$,this.#Y._sendCursorRequest(this,{type:"close_cursor",cursorId:this.#X}).catch(()=>{return}),this.#Y._cursorClosed(this)}close(){this._setClosed(new T9("Cursor was manually closed"))}get closed(){return this.#Q!==void 0}}class Up extends uI{#$;#Y;#X;#J;#G;#Q;static open($){let Y=$._streamIdAlloc.alloc(),X=new Up($,Y),G=()=>{return},J=(W)=>X.#H(W),Q={type:"open_stream",streamId:Y};return $._sendRequest(Q,{responseCallback:G,errorCallback:J}),X}constructor($,Y){super($.intMode);this.#$=$,this.#Y=Y,this.#X=new rD,this.#J=void 0,this.#G=!1,this.#Q=void 0}client(){return this.#$}_sqlOwner(){return this.#$}_execute($){return this.#U({type:"execute",streamId:this.#Y,stmt:$}).then((Y)=>{return Y.result})}_batch($){return this.#U({type:"batch",streamId:this.#Y,batch:$}).then((Y)=>{return Y.result})}_describe($){return this.#$._ensureVersion(2,"describe()"),this.#U({type:"describe",streamId:this.#Y,sql:$.sql,sqlId:$.sqlId}).then((Y)=>{return Y.result})}_sequence($){return this.#$._ensureVersion(2,"sequence()"),this.#U({type:"sequence",streamId:this.#Y,sql:$.sql,sqlId:$.sqlId}).then((Y)=>{return})}getAutocommit(){return this.#$._ensureVersion(3,"getAutocommit()"),this.#U({type:"get_autocommit",streamId:this.#Y}).then(($)=>{return $.isAutocommit})}#U($){return new Promise((Y,X)=>{this.#Z({type:"request",request:$,responseCallback:Y,errorCallback:X})})}_openCursor($){return this.#$._ensureVersion(3,"cursor"),new Promise((Y,X)=>{this.#Z({type:"cursor",batch:$,cursorCallback:Y,errorCallback:X})})}_sendCursorRequest($,Y){if($!==this.#J)throw new NG("Cursor not associated with the stream attempted to execute a request");return new Promise((X,G)=>{if(this.#Q!==void 0)G(new S7("Stream is closed",this.#Q));else this.#$._sendRequest(Y,{responseCallback:X,errorCallback:G})})}_cursorClosed($){if($!==this.#J)throw new NG("Cursor was closed, but it was not associated with the stream");this.#J=void 0,this.#W()}#Z($){if(this.#Q!==void 0)$.errorCallback(new S7("Stream is closed",this.#Q));else if(this.#G)$.errorCallback(new S7("Stream is closing",void 0));else this.#X.push($),this.#W()}#W(){for(;;){let $=this.#X.first();if($===void 0&&this.#J===void 0&&this.#G){this.#H(new T9("Stream was gracefully closed"));break}else if($?.type==="request"&&this.#J===void 0){let{request:Y,responseCallback:X,errorCallback:G}=$;this.#X.shift(),this.#$._sendRequest(Y,{responseCallback:X,errorCallback:G})}else if($?.type==="cursor"&&this.#J===void 0){let{batch:Y,cursorCallback:X}=$;this.#X.shift();let G=this.#$._cursorIdAlloc.alloc(),J=new cu0(this.#$,this,G),Q={type:"open_cursor",streamId:this.#Y,cursorId:G,batch:Y},W=()=>{return},K=(Z)=>J._setClosed(Z);this.#$._sendRequest(Q,{responseCallback:W,errorCallback:K}),this.#J=J,X(J)}else break}}#H($){if(this.#Q!==void 0)return;if(this.#Q=$,this.#J!==void 0)this.#J._setClosed($);for(;;){let J=this.#X.shift();if(J!==void 0)J.errorCallback($);else break}let Y={type:"close_stream",streamId:this.#Y},X=()=>this.#$._streamIdAlloc.free(this.#Y),G=()=>{return};this.#$._sendRequest(Y,{responseCallback:X,errorCallback:G})}close(){this.#H(new T9("Stream was manually closed"))}closeGracefully(){this.#G=!0,this.#W()}get closed(){return this.#Q!==void 0||this.#G}}function Hp($,Y){if(Y.sql!==void 0)$.string("sql",Y.sql);if(Y.sqlId!==void 0)$.number("sql_id",Y.sqlId);$.arrayObjects("args",Y.args,CL4),$.arrayObjects("named_args",Y.namedArgs,JK9),$.boolean("want_rows",Y.wantRows)}function JK9($,Y){$.string("name",Y.name),$.object("value",Y.value,CL4)}function pI($,Y){$.arrayObjects("steps",Y.steps,QK9)}function QK9($,Y){if(Y.condition!==void 0)$.object("condition",Y.condition,lu0);$.object("stmt",Y.stmt,Hp)}function lu0($,Y){if($.stringRaw("type",Y.type),Y.type==="ok"||Y.type==="error")$.number("step",Y.step);else if(Y.type==="not")$.object("cond",Y.cond,lu0);else if(Y.type==="and"||Y.type==="or")$.arrayObjects("conds",Y.conds,lu0);else if(Y.type==="is_autocommit");else throw D9(Y,"Impossible type of BatchCond")}function CL4($,Y){if(Y===null)$.stringRaw("type","null");else if(typeof Y==="bigint")$.stringRaw("type","integer"),$.stringRaw("value",""+Y);else if(typeof Y==="number")$.stringRaw("type","float"),$.number("value",Y);else if(typeof Y==="string")$.stringRaw("type","text"),$.string("value",Y);else if(Y instanceof Uint8Array)$.stringRaw("type","blob"),$.stringRaw("base64",xI.fromUint8Array(Y));else if(Y===void 0);else throw D9(Y,"Impossible type of Value")}function SL4($,Y){if($.stringRaw("type",Y.type),Y.type==="hello"){if(Y.jwt!==void 0)$.string("jwt",Y.jwt)}else if(Y.type==="request")$.number("request_id",Y.requestId),$.object("request",Y.request,WK9);else throw D9(Y,"Impossible type of ClientMsg")}function WK9($,Y){if($.stringRaw("type",Y.type),Y.type==="open_stream")$.number("stream_id",Y.streamId);else if(Y.type==="close_stream")$.number("stream_id",Y.streamId);else if(Y.type==="execute")$.number("stream_id",Y.streamId),$.object("stmt",Y.stmt,Hp);else if(Y.type==="batch")$.number("stream_id",Y.streamId),$.object("batch",Y.batch,pI);else if(Y.type==="open_cursor")$.number("stream_id",Y.streamId),$.number("cursor_id",Y.cursorId),$.object("batch",Y.batch,pI);else if(Y.type==="close_cursor")$.number("cursor_id",Y.cursorId);else if(Y.type==="fetch_cursor")$.number("cursor_id",Y.cursorId),$.number("max_count",Y.maxCount);else if(Y.type==="sequence"){if($.number("stream_id",Y.streamId),Y.sql!==void 0)$.string("sql",Y.sql);if(Y.sqlId!==void 0)$.number("sql_id",Y.sqlId)}else if(Y.type==="describe"){if($.number("stream_id",Y.streamId),Y.sql!==void 0)$.string("sql",Y.sql);if(Y.sqlId!==void 0)$.number("sql_id",Y.sqlId)}else if(Y.type==="store_sql")$.number("sql_id",Y.sqlId),$.string("sql",Y.sql);else if(Y.type==="close_sql")$.number("sql_id",Y.sqlId);else if(Y.type==="get_autocommit")$.number("stream_id",Y.streamId);else throw D9(Y,"Impossible type of Request")}function zp($,Y){if(Y.sql!==void 0)$.string(1,Y.sql);if(Y.sqlId!==void 0)$.int32(2,Y.sqlId);for(let X of Y.args)$.message(3,X,vL4);for(let X of Y.namedArgs)$.message(4,X,KK9);$.bool(5,Y.wantRows)}function KK9($,Y){$.string(1,Y.name),$.message(2,Y.value,vL4)}function dI($,Y){for(let X of Y.steps)$.message(1,X,ZK9)}function ZK9($,Y){if(Y.condition!==void 0)$.message(1,Y.condition,iu0);$.message(2,Y.stmt,zp)}function iu0($,Y){if(Y.type==="ok")$.uint32(1,Y.step);else if(Y.type==="error")$.uint32(2,Y.step);else if(Y.type==="not")$.message(3,Y.cond,iu0);else if(Y.type==="and")$.message(4,Y.conds,kL4);else if(Y.type==="or")$.message(5,Y.conds,kL4);else if(Y.type==="is_autocommit")$.message(6,void 0,xL4);else throw D9(Y,"Impossible type of BatchCond")}function kL4($,Y){for(let X of Y)$.message(1,X,iu0)}function vL4($,Y){if(Y===null)$.message(1,void 0,xL4);else if(typeof Y==="bigint")$.sint64(2,Y);else if(typeof Y==="number")$.double(3,Y);else if(typeof Y==="string")$.string(4,Y);else if(Y instanceof Uint8Array)$.bytes(5,Y);else if(Y===void 0);else throw D9(Y,"Impossible type of Value")}function xL4($,Y){}function yL4($,Y){if(Y.type==="hello")$.message(1,Y,UK9);else if(Y.type==="request")$.message(2,Y,HK9);else throw D9(Y,"Impossible type of ClientMsg")}function UK9($,Y){if(Y.jwt!==void 0)$.string(1,Y.jwt)}function HK9($,Y){$.int32(1,Y.requestId);let X=Y.request;if(X.type==="open_stream")$.message(2,X,zK9);else if(X.type==="close_stream")$.message(3,X,VK9);else if(X.type==="execute")$.message(4,X,FK9);else if(X.type==="batch")$.message(5,X,LK9);else if(X.type==="open_cursor")$.message(6,X,DK9);else if(X.type==="close_cursor")$.message(7,X,NK9);else if(X.type==="fetch_cursor")$.message(8,X,AK9);else if(X.type==="sequence")$.message(9,X,BK9);else if(X.type==="describe")$.message(10,X,OK9);else if(X.type==="store_sql")$.message(11,X,EK9);else if(X.type==="close_sql")$.message(12,X,MK9);else if(X.type==="get_autocommit")$.message(13,X,RK9);else throw D9(X,"Impossible type of Request")}function zK9($,Y){$.int32(1,Y.streamId)}function VK9($,Y){$.int32(1,Y.streamId)}function FK9($,Y){$.int32(1,Y.streamId),$.message(2,Y.stmt,zp)}function LK9($,Y){$.int32(1,Y.streamId),$.message(2,Y.batch,dI)}function DK9($,Y){$.int32(1,Y.streamId),$.int32(2,Y.cursorId),$.message(3,Y.batch,dI)}function NK9($,Y){$.int32(1,Y.cursorId)}function AK9($,Y){$.int32(1,Y.cursorId),$.uint32(2,Y.maxCount)}function BK9($,Y){if($.int32(1,Y.streamId),Y.sql!==void 0)$.string(2,Y.sql);if(Y.sqlId!==void 0)$.int32(3,Y.sqlId)}function OK9($,Y){if($.int32(1,Y.streamId),Y.sql!==void 0)$.string(2,Y.sql);if(Y.sqlId!==void 0)$.int32(3,Y.sqlId)}function EK9($,Y){$.int32(1,Y.sqlId),$.string(2,Y.sql)}function MK9($,Y){$.int32(1,Y.sqlId)}function RK9($,Y){$.int32(1,Y.streamId)}function aD($){let Y=vQ($.message),X=pW($.code);return{message:Y,code:X}}function Vp($){let Y=DU($.cols,bL4),X=Yp($.rows).map((W)=>DU(W,hL4)),G=BV($.affected_row_count),J=pW($.last_insert_rowid),Q=J!==void 0?BigInt(J):void 0;return{cols:Y,rows:X,affectedRowCount:G,lastInsertRowid:Q}}function bL4($){let Y=pW($.name),X=pW($.decltype);return{name:Y,decltype:X}}function l70($){let Y=new Map;Yp($.step_results).forEach((G,J)=>{if(G!==null)Y.set(J,Vp(r7(G)))});let X=new Map;return Yp($.step_errors).forEach((G,J)=>{if(G!==null)X.set(J,aD(r7(G)))}),{stepResults:Y,stepErrors:X}}function i70($){let Y=vQ($.type);if(Y==="step_begin"){let X=BV($.step),G=DU($.cols,bL4);return{type:"step_begin",step:X,cols:G}}else if(Y==="step_end"){let X=BV($.affected_row_count),G=pW($.last_insert_rowid),J=G!==void 0?BigInt(G):void 0;return{type:"step_end",affectedRowCount:X,lastInsertRowid:J}}else if(Y==="step_error"){let X=BV($.step),G=aD(r7($.error));return{type:"step_error",step:X,error:G}}else if(Y==="row")return{type:"row",row:DU($.row,hL4)};else if(Y==="error")return{type:"error",error:aD(r7($.error))};else throw new Z6("Unexpected type of CursorEntry")}function n70($){let Y=DU($.params,qK9),X=DU($.cols,PK9),G=lD($.is_explain),J=lD($.is_readonly);return{params:Y,cols:X,isExplain:G,isReadonly:J}}function qK9($){return{name:pW($.name)}}function PK9($){let Y=vQ($.name),X=pW($.decltype);return{name:Y,decltype:X}}function hL4($){let Y=vQ($.type);if(Y==="null")return null;else if(Y==="integer"){let X=vQ($.value);return BigInt(X)}else if(Y==="float")return BV($.value);else if(Y==="text")return vQ($.value);else if(Y==="blob")return xI.toUint8Array(vQ($.base64));else throw new Z6("Unexpected type of Value")}function fL4($){let Y=vQ($.type);if(Y==="hello_ok")return{type:"hello_ok"};else if(Y==="hello_error")return{type:"hello_error",error:aD(r7($.error))};else if(Y==="response_ok"){let X=BV($.request_id),G=wK9(r7($.response));return{type:"response_ok",requestId:X,response:G}}else if(Y==="response_error"){let X=BV($.request_id),G=aD(r7($.error));return{type:"response_error",requestId:X,error:G}}else throw new Z6("Unexpected type of ServerMsg")}function wK9($){let Y=vQ($.type);if(Y==="open_stream")return{type:"open_stream"};else if(Y==="close_stream")return{type:"close_stream"};else if(Y==="execute")return{type:"execute",result:Vp(r7($.result))};else if(Y==="batch")return{type:"batch",result:l70(r7($.result))};else if(Y==="open_cursor")return{type:"open_cursor"};else if(Y==="close_cursor")return{type:"close_cursor"};else if(Y==="fetch_cursor"){let X=DU($.entries,i70),G=lD($.done);return{type:"fetch_cursor",entries:X,done:G}}else if(Y==="sequence")return{type:"sequence"};else if(Y==="describe")return{type:"describe",result:n70(r7($.result))};else if(Y==="store_sql")return{type:"store_sql"};else if(Y==="close_sql")return{type:"close_sql"};else if(Y==="get_autocommit")return{type:"get_autocommit",isAutocommit:lD($.is_autocommit)};else throw new Z6("Unexpected type of Response")}var ZK={default(){return{message:"",code:void 0}},1($,Y){Y.message=$.string()},2($,Y){Y.code=$.string()}},sD={default(){return{cols:[],rows:[],affectedRowCount:0,lastInsertRowid:void 0}},1($,Y){Y.cols.push($.message(gL4))},2($,Y){Y.rows.push($.message(mL4))},3($,Y){Y.affectedRowCount=Number($.uint64())},4($,Y){Y.lastInsertRowid=$.sint64()}},gL4={default(){return{name:void 0,decltype:void 0}},1($,Y){Y.name=$.string()},2($,Y){Y.decltype=$.string()}},mL4={default(){return[]},1($,Y){Y.push($.message(vK9))}},cI={default(){return{stepResults:new Map,stepErrors:new Map}},1($,Y){let[X,G]=$.message(_K9);Y.stepResults.set(X,G)},2($,Y){let[X,G]=$.message(jK9);Y.stepErrors.set(X,G)}},_K9={default(){return[0,sD.default()]},1($,Y){Y[0]=$.uint32()},2($,Y){Y[1]=$.message(sD)}},jK9={default(){return[0,ZK.default()]},1($,Y){Y[0]=$.uint32()},2($,Y){Y[1]=$.message(ZK)}},r70={default(){return{type:"none"}},1($){return $.message(TK9)},2($){return $.message(IK9)},3($){return $.message(CK9)},4($){return{type:"row",row:$.message(mL4)}},5($){return{type:"error",error:$.message(ZK)}}},TK9={default(){return{type:"step_begin",step:0,cols:[]}},1($,Y){Y.step=$.uint32()},2($,Y){Y.cols.push($.message(gL4))}},IK9={default(){return{type:"step_end",affectedRowCount:0,lastInsertRowid:void 0}},1($,Y){Y.affectedRowCount=$.uint32()},2($,Y){Y.lastInsertRowid=$.uint64()}},CK9={default(){return{type:"step_error",step:0,error:ZK.default()}},1($,Y){Y.step=$.uint32()},2($,Y){Y.error=$.message(ZK)}},lI={default(){return{params:[],cols:[],isExplain:!1,isReadonly:!1}},1($,Y){Y.params.push($.message(SK9))},2($,Y){Y.cols.push($.message(kK9))},3($,Y){Y.isExplain=$.bool()},4($,Y){Y.isReadonly=$.bool()}},SK9={default(){return{name:void 0}},1($,Y){Y.name=$.string()}},kK9={default(){return{name:"",decltype:void 0}},1($,Y){Y.name=$.string()},2($,Y){Y.decltype=$.string()}},vK9={default(){return},1($){return null},2($){return $.sint64()},3($){return $.double()},4($){return $.string()},5($){return $.bytes()}};var uL4={default(){return{type:"none"}},1($){return{type:"hello_ok"}},2($){return $.message(xK9)},3($){return $.message(bK9)},4($){return $.message(yK9)}},xK9={default(){return{type:"hello_error",error:ZK.default()}},1($,Y){Y.error=$.message(ZK)}},yK9={default(){return{type:"response_error",requestId:0,error:ZK.default()}},1($,Y){Y.requestId=$.int32()},2($,Y){Y.error=$.message(ZK)}},bK9={default(){return{type:"response_ok",requestId:0,response:{type:"none"}}},1($,Y){Y.requestId=$.int32()},2($,Y){Y.response={type:"open_stream"}},3($,Y){Y.response={type:"close_stream"}},4($,Y){Y.response=$.message(hK9)},5($,Y){Y.response=$.message(fK9)},6($,Y){Y.response={type:"open_cursor"}},7($,Y){Y.response={type:"close_cursor"}},8($,Y){Y.response=$.message(gK9)},9($,Y){Y.response={type:"sequence"}},10($,Y){Y.response=$.message(mK9)},11($,Y){Y.response={type:"store_sql"}},12($,Y){Y.response={type:"close_sql"}},13($,Y){Y.response=$.message(uK9)}},hK9={default(){return{type:"execute",result:sD.default()}},1($,Y){Y.result=$.message(sD)}},fK9={default(){return{type:"batch",result:cI.default()}},1($,Y){Y.result=$.message(cI)}},gK9={default(){return{type:"fetch_cursor",entries:[],done:!1}},1($,Y){Y.entries.push($.message(r70))},2($,Y){Y.done=$.bool()}},mK9={default(){return{type:"describe",result:lI.default()}},1($,Y){Y.result=$.message(lI)}},uK9={default(){return{type:"get_autocommit",isAutocommit:!1}},1($,Y){Y.isAutocommit=$.bool()}};var pL4=new Map([["hrana2",{version:2,encoding:"json"}],["hrana1",{version:1,encoding:"json"}]]),nu0=new Map([["hrana3-protobuf",{version:3,encoding:"protobuf"}],["hrana3",{version:3,encoding:"json"}],["hrana2",{version:2,encoding:"json"}],["hrana1",{version:1,encoding:"json"}]]);class a70 extends hI{#$;#Y;#X;#J;#G;#Q;#U;#Z;#W;_streamIdAlloc;_cursorIdAlloc;#H;constructor($,Y){super();this.#$=$,this.#Y=[],this.#X=!1,this.#J=void 0,this.#G=!1,this.#Q=void 0,this.#U=!1,this.#Z=new Map,this.#W=new nD,this._streamIdAlloc=new nD,this._cursorIdAlloc=new nD,this.#H=new nD,this.#$.binaryType="arraybuffer",this.#$.addEventListener("open",()=>this.#V()),this.#$.addEventListener("close",(X)=>this.#O(X)),this.#$.addEventListener("error",(X)=>this.#A(X)),this.#$.addEventListener("message",(X)=>this.#B(X)),this.#F({type:"hello",jwt:Y})}#F($){if(this.#J!==void 0)throw new NG("Trying to send a message on a closed client");if(this.#X)this.#K($);else{let Y=()=>this.#K($),X=()=>{return};this.#Y.push({openCallback:Y,errorCallback:X})}}#V(){let $=this.#$.protocol;if($===void 0){this.#N(new T9("The `WebSocket.protocol` property is undefined. This most likely means that the WebSocket implementation provided by the environment is broken. If you are using Miniflare 2, please update to Miniflare 3, which fixes this problem."));return}else if($==="")this.#Q={version:1,encoding:"json"};else if(this.#Q=nu0.get($),this.#Q===void 0){this.#N(new Z6(`Unrecognized WebSocket subprotocol: ${JSON.stringify($)}`));return}for(let Y of this.#Y)Y.openCallback();this.#Y.length=0,this.#X=!0}#K($){let Y=this.#Q.encoding;if(Y==="json"){let X=Xp($,SL4);this.#$.send(X)}else if(Y==="protobuf"){let X=Qp($,yL4);this.#$.send(X)}else throw D9(Y,"Impossible encoding")}getVersion(){return new Promise(($,Y)=>{if(this.#U=!0,this.#J!==void 0)Y(this.#J);else if(!this.#X){let X=()=>$(this.#Q.version);this.#Y.push({openCallback:X,errorCallback:Y})}else $(this.#Q.version)})}_ensureVersion($,Y){if(this.#Q===void 0||!this.#U)throw new LU(`${Y} is supported only on protocol version ${$} and higher, but the version supported by the WebSocket server is not yet known. Use Client.getVersion() to wait until the version is available.`);else if(this.#Q.version<$)throw new LU(`${Y} is supported on protocol version ${$} and higher, but the WebSocket server only supports version ${this.#Q.version}`)}_sendRequest($,Y){if(this.#J!==void 0){Y.errorCallback(new S7("Client is closed",this.#J));return}let X=this.#W.alloc();this.#Z.set(X,{...Y,type:$.type}),this.#F({type:"request",requestId:X,request:$})}#A($){let X=$.message??"WebSocket was closed due to an error";this.#N(new fI(X))}#O($){let Y=`WebSocket was closed with code ${$.code}`;if($.reason)Y+=`: ${$.reason}`;this.#N(new fI(Y))}#N($){if(this.#J!==void 0)return;this.#J=$;for(let Y of this.#Y)Y.errorCallback($);this.#Y.length=0;for(let[Y,X]of this.#Z.entries())X.errorCallback($),this.#W.free(Y);this.#Z.clear(),this.#$.close()}#B($){if(this.#J!==void 0)return;try{let Y,X=this.#Q.encoding;if(X==="json"){if(typeof $.data!=="string"){this.#$.close(3003,"Only text messages are accepted with JSON encoding"),this.#N(new Z6("Received non-text message from server with JSON encoding"));return}Y=NM(JSON.parse($.data),fL4)}else if(X==="protobuf"){if(!($.data instanceof ArrayBuffer)){this.#$.close(3003,"Only binary messages are accepted with Protobuf encoding"),this.#N(new Z6("Received non-binary message from server with Protobuf encoding"));return}Y=iD(new Uint8Array($.data),uL4)}else throw D9(X,"Impossible encoding");this.#R(Y)}catch(Y){this.#$.close(3007,"Could not handle message"),this.#N(Y)}}#R($){if($.type==="none")throw new Z6("Received an unrecognized ServerMsg");else if($.type==="hello_ok"||$.type==="hello_error"){if(this.#G)throw new Z6("Received a duplicated hello response");if(this.#G=!0,$.type==="hello_error")throw OV($.error);return}else if(!this.#G)throw new Z6("Received a non-hello message before a hello response");if($.type==="response_ok"){let Y=$.requestId,X=this.#Z.get(Y);if(this.#Z.delete(Y),X===void 0)throw new Z6("Received unexpected OK response");this.#W.free(Y);try{if(X.type!==$.response.type)throw console.dir({responseState:X,msg:$}),new Z6("Received unexpected type of response");X.responseCallback($.response)}catch(G){throw X.errorCallback(G),G}}else if($.type==="response_error"){let Y=$.requestId,X=this.#Z.get(Y);if(this.#Z.delete(Y),X===void 0)throw new Z6("Received unexpected error response");this.#W.free(Y),X.errorCallback(OV($.error))}else throw D9($,"Impossible ServerMsg type")}openStream(){return Up.open(this)}storeSql($){this._ensureVersion(2,"storeSql()");let Y=this.#H.alloc(),X=new OM(this,Y),G=()=>{return},J=(W)=>X._setClosed(W),Q={type:"store_sql",sqlId:Y,sql:$};return this._sendRequest(Q,{responseCallback:G,errorCallback:J}),X}_closeSql($){if(this.#J!==void 0)return;let Y=()=>this.#H.free($),X=(J)=>this.#N(J),G={type:"close_sql",sqlId:$};this._sendRequest(G,{responseCallback:Y,errorCallback:X})}close(){this.#N(new T9("Client was manually closed"))}get closed(){return this.#J!==void 0}}var ru0=fetch,Fp=Request,au0=Headers;var EM;if(typeof queueMicrotask<"u")EM=queueMicrotask;else{let $=Promise.resolve();EM=(Y)=>{$.then(Y)}}class su0{#$;#Y;#X;constructor($){this.#$=new Uint8Array(new ArrayBuffer($)),this.#Y=0,this.#X=0}get length(){return this.#X-this.#Y}data(){return this.#$.slice(this.#Y,this.#X)}push($){this.#J($.byteLength),this.#$.set($,this.#X),this.#X+=$.byteLength}#J($){if(this.#X+$<=this.#$.byteLength)return;let Y=this.#X-this.#Y;if(Y+$<=this.#$.byteLength&&2*this.#X>=this.#$.byteLength)this.#$.copyWithin(0,this.#Y,this.#X);else{let X=this.#$.byteLength;do X*=2;while(Y+$>X);let G=new Uint8Array(new ArrayBuffer(X));G.set(this.#$.slice(this.#Y,this.#X),0),this.#$=G}this.#X=Y,this.#Y=0}shift($){this.#Y+=$}}function dL4($){let Y=pW($.baton),X=pW($.base_url),G=DU($.results,pK9);return{baton:Y,baseUrl:X,results:G}}function pK9($){let Y=vQ($.type);if(Y==="ok")return{type:"ok",response:dK9(r7($.response))};else if(Y==="error")return{type:"error",error:aD(r7($.error))};else throw new Z6("Unexpected type of StreamResult")}function dK9($){let Y=vQ($.type);if(Y==="close")return{type:"close"};else if(Y==="execute")return{type:"execute",result:Vp(r7($.result))};else if(Y==="batch")return{type:"batch",result:l70(r7($.result))};else if(Y==="sequence")return{type:"sequence"};else if(Y==="describe")return{type:"describe",result:n70(r7($.result))};else if(Y==="store_sql")return{type:"store_sql"};else if(Y==="close_sql")return{type:"close_sql"};else if(Y==="get_autocommit")return{type:"get_autocommit",isAutocommit:lD($.is_autocommit)};else throw new Z6("Unexpected type of StreamResponse")}function cL4($){let Y=pW($.baton),X=pW($.base_url);return{baton:Y,baseUrl:X}}var lL4={default(){return{baton:void 0,baseUrl:void 0,results:[]}},1($,Y){Y.baton=$.string()},2($,Y){Y.baseUrl=$.string()},3($,Y){Y.results.push($.message(cK9))}},cK9={default(){return{type:"none"}},1($){return{type:"ok",response:$.message(lK9)}},2($){return{type:"error",error:$.message(ZK)}}},lK9={default(){return{type:"none"}},1($){return{type:"close"}},2($){return $.message(iK9)},3($){return $.message(nK9)},4($){return{type:"sequence"}},5($){return $.message(rK9)},6($){return{type:"store_sql"}},7($){return{type:"close_sql"}},8($){return $.message(aK9)}},iK9={default(){return{type:"execute",result:sD.default()}},1($,Y){Y.result=$.message(sD)}},nK9={default(){return{type:"batch",result:cI.default()}},1($,Y){Y.result=$.message(cI)}},rK9={default(){return{type:"describe",result:lI.default()}},1($,Y){Y.result=$.message(lI)}},aK9={default(){return{type:"get_autocommit",isAutocommit:!1}},1($,Y){Y.isAutocommit=$.bool()}},iL4={default(){return{baton:void 0,baseUrl:void 0}},1($,Y){Y.baton=$.string()},2($,Y){Y.baseUrl=$.string()}};class ou0 extends Zp{#$;#Y;#X;#J;#G;#Q;constructor($,Y){super();this.#$=$,this.#Y=Y,this.#X=void 0,this.#J=new su0(16384),this.#G=void 0,this.#Q=!1}async open($){if($.body===null)throw new Z6("No response body for cursor request");this.#X=$.body.getReader();let Y=await this.#U(cL4,iL4);if(Y===void 0)throw new Z6("Empty response to cursor request");return Y}next(){return this.#U(i70,r70)}close(){this._setClosed(new T9("Cursor was manually closed"))}_setClosed($){if(this.#G!==void 0)return;if(this.#G=$,this.#$._cursorClosed(this),this.#X!==void 0)this.#X.cancel()}get closed(){return this.#G!==void 0}async#U($,Y){for(;;){if(this.#Q)return;else if(this.#G!==void 0)throw new S7("Cursor is closed",this.#G);if(this.#Y==="json"){let J=this.#Z();if(J!==void 0){let Q=new TextDecoder().decode(J),W=JSON.parse(Q);return NM(W,$)}}else if(this.#Y==="protobuf"){let J=this.#W();if(J!==void 0)return iD(J,Y)}else throw D9(this.#Y,"Impossible encoding");if(this.#X===void 0)throw new NG("Attempted to read from HTTP cursor before it was opened");let{value:X,done:G}=await this.#X.read();if(G&&this.#J.length===0)this.#Q=!0;else if(G)throw new Z6("Unexpected end of cursor stream");else this.#J.push(X)}}#Z(){let $=this.#J.data(),Y=10,X=$.indexOf(10);if(X<0)return;let G=$.slice(0,X);return this.#J.shift(X+1),G}#W(){let $=this.#J.data(),Y=0,X=0;for(;;){if(X>=$.byteLength)return;let J=$[X];if(Y|=(J&127)<<7*X,X+=1,!(J&128))break}if($.byteLength<X+Y)return;let G=$.slice(X,X+Y);return this.#J.shift(X+Y),G}}function nL4($,Y){if(Y.baton!==void 0)$.string("baton",Y.baton);$.arrayObjects("requests",Y.requests,sK9)}function sK9($,Y){if($.stringRaw("type",Y.type),Y.type==="close");else if(Y.type==="execute")$.object("stmt",Y.stmt,Hp);else if(Y.type==="batch")$.object("batch",Y.batch,pI);else if(Y.type==="sequence"){if(Y.sql!==void 0)$.string("sql",Y.sql);if(Y.sqlId!==void 0)$.number("sql_id",Y.sqlId)}else if(Y.type==="describe"){if(Y.sql!==void 0)$.string("sql",Y.sql);if(Y.sqlId!==void 0)$.number("sql_id",Y.sqlId)}else if(Y.type==="store_sql")$.number("sql_id",Y.sqlId),$.string("sql",Y.sql);else if(Y.type==="close_sql")$.number("sql_id",Y.sqlId);else if(Y.type==="get_autocommit");else throw D9(Y,"Impossible type of StreamRequest")}function rL4($,Y){if(Y.baton!==void 0)$.string("baton",Y.baton);$.object("batch",Y.batch,pI)}function aL4($,Y){if(Y.baton!==void 0)$.string(1,Y.baton);for(let X of Y.requests)$.message(2,X,oK9)}function oK9($,Y){if(Y.type==="close")$.message(1,Y,tK9);else if(Y.type==="execute")$.message(2,Y,eK9);else if(Y.type==="batch")$.message(3,Y,$Z9);else if(Y.type==="sequence")$.message(4,Y,YZ9);else if(Y.type==="describe")$.message(5,Y,XZ9);else if(Y.type==="store_sql")$.message(6,Y,GZ9);else if(Y.type==="close_sql")$.message(7,Y,JZ9);else if(Y.type==="get_autocommit")$.message(8,Y,QZ9);else throw D9(Y,"Impossible type of StreamRequest")}function tK9($,Y){}function eK9($,Y){$.message(1,Y.stmt,zp)}function $Z9($,Y){$.message(1,Y.batch,dI)}function YZ9($,Y){if(Y.sql!==void 0)$.string(1,Y.sql);if(Y.sqlId!==void 0)$.int32(2,Y.sqlId)}function XZ9($,Y){if(Y.sql!==void 0)$.string(1,Y.sql);if(Y.sqlId!==void 0)$.int32(2,Y.sqlId)}function GZ9($,Y){$.int32(1,Y.sqlId),$.string(2,Y.sql)}function JZ9($,Y){$.int32(1,Y.sqlId)}function QZ9($,Y){}function sL4($,Y){if(Y.baton!==void 0)$.string(1,Y.baton);$.message(2,Y.batch,dI)}class s70 extends uI{#$;#Y;#X;#J;#G;#Q;#U;#Z;#W;#H;#F;#V;constructor($,Y,X,G){super($.intMode);this.#$=$,this.#Y=Y.toString(),this.#X=X,this.#J=G,this.#G=void 0,this.#Q=new rD,this.#U=!1,this.#W=!1,this.#H=!1,this.#F=void 0,this.#V=new nD}client(){return this.#$}_sqlOwner(){return this}storeSql($){let Y=this.#V.alloc();return this.#K({type:"store_sql",sqlId:Y,sql:$}).then(()=>{return},(X)=>this._setClosed(X)),new OM(this,Y)}_closeSql($){if(this.#F!==void 0)return;this.#K({type:"close_sql",sqlId:$}).then(()=>this.#V.free($),(Y)=>this._setClosed(Y))}_execute($){return this.#K({type:"execute",stmt:$}).then((Y)=>{return Y.result})}_batch($){return this.#K({type:"batch",batch:$}).then((Y)=>{return Y.result})}_describe($){return this.#K({type:"describe",sql:$.sql,sqlId:$.sqlId}).then((Y)=>{return Y.result})}_sequence($){return this.#K({type:"sequence",sql:$.sql,sqlId:$.sqlId}).then((Y)=>{return})}getAutocommit(){return this.#$._ensureVersion(3,"getAutocommit()"),this.#K({type:"get_autocommit"}).then(($)=>{return $.isAutocommit})}#K($){return new Promise((Y,X)=>{this.#A({type:"pipeline",request:$,responseCallback:Y,errorCallback:X})})}_openCursor($){return new Promise((Y,X)=>{this.#A({type:"cursor",batch:$,cursorCallback:Y,errorCallback:X})})}_cursorClosed($){if($!==this.#Z)throw new NG("Cursor was closed, but it was not associated with the stream");this.#Z=void 0,EM(()=>this.#O())}close(){this._setClosed(new T9("Stream was manually closed"))}closeGracefully(){this.#W=!0,EM(()=>this.#O())}get closed(){return this.#F!==void 0||this.#W}_setClosed($){if(this.#F!==void 0)return;if(this.#F=$,this.#Z!==void 0)this.#Z._setClosed($);this.#$._streamClosed(this);for(;;){let Y=this.#Q.shift();if(Y!==void 0)Y.errorCallback($);else break}if((this.#G!==void 0||this.#U)&&!this.#H)this.#Q.push({type:"pipeline",request:{type:"close"},responseCallback:()=>{return},errorCallback:()=>{return}}),this.#H=!0,EM(()=>this.#O())}#A($){if(this.#F!==void 0)throw new S7("Stream is closed",this.#F);else if(this.#W)throw new S7("Stream is closing",void 0);else this.#Q.push($),EM(()=>this.#O())}#O(){if(this.#U||this.#Z!==void 0)return;if(this.#W&&this.#Q.length===0){this._setClosed(new T9("Stream was gracefully closed"));return}let $=this.#$._endpoint;if($===void 0){this.#$._endpointPromise.then(()=>this.#O(),(X)=>this._setClosed(X));return}let Y=this.#Q.shift();if(Y===void 0)return;else if(Y.type==="pipeline"){let X=[Y];for(;;){let G=this.#Q.first();if(G!==void 0&&G.type==="pipeline")X.push(G),this.#Q.shift();else if(G===void 0&&this.#W&&!this.#H){X.push({type:"pipeline",request:{type:"close"},responseCallback:()=>{return},errorCallback:()=>{return}}),this.#H=!0;break}else break}this.#N($,X)}else if(Y.type==="cursor")this.#B($,Y);else throw D9(Y,"Impossible type of QueueEntry")}#N($,Y){this.#R(()=>this.#D(Y,$),(X)=>KZ9(X,$.encoding),(X)=>X.baton,(X)=>X.baseUrl,(X)=>WZ9(Y,X),(X)=>Y.forEach((G)=>G.errorCallback(X)))}#B($,Y){let X=new ou0(this,$.encoding);this.#Z=X,this.#R(()=>this.#L(Y,$),(G)=>X.open(G),(G)=>G.baton,(G)=>G.baseUrl,(G)=>Y.cursorCallback(X),(G)=>Y.errorCallback(G))}#R($,Y,X,G,J,Q){let W;try{let K=$(),Z=this.#J;W=Z(K)}catch(K){W=Promise.reject(K)}this.#U=!0,W.then((K)=>{if(!K.ok)return ZZ9(K).then((Z)=>{throw Z});return Y(K)}).then((K)=>{this.#G=X(K),this.#Y=G(K)??this.#Y,J(K)}).catch((K)=>{this._setClosed(K),Q(K)}).finally(()=>{this.#U=!1,this.#O()})}#D($,Y){return this.#w(new URL(Y.pipelinePath,this.#Y),{baton:this.#G,requests:$.map((X)=>X.request)},Y.encoding,nL4,aL4)}#L($,Y){if(Y.cursorPath===void 0)throw new LU(`Cursors are supported only on protocol version 3 and higher, but the HTTP server only supports version ${Y.version}.`);return this.#w(new URL(Y.cursorPath,this.#Y),{baton:this.#G,batch:$.batch},Y.encoding,rL4,sL4)}#w($,Y,X,G,J){let Q,W;if(X==="json")Q=Xp(Y,G),W="application/json";else if(X==="protobuf")Q=Qp(Y,J),W="application/x-protobuf";else throw D9(X,"Impossible encoding");let K=new au0;if(K.set("content-type",W),this.#X!==void 0)K.set("authorization",`Bearer ${this.#X}`);return new Fp($.toString(),{method:"POST",headers:K,body:Q})}}function WZ9($,Y){if(Y.results.length!==$.length)throw new Z6("Server returned unexpected number of pipeline results");for(let X=0;X<$.length;++X){let G=Y.results[X],J=$[X];if(G.type==="ok"){if(G.response.type!==J.request.type)throw new Z6("Received unexpected type of response");J.responseCallback(G.response)}else if(G.type==="error")J.errorCallback(OV(G.error));else if(G.type==="none")throw new Z6("Received unrecognized type of StreamResult");else throw D9(G,"Received impossible type of StreamResult")}}async function KZ9($,Y){if(Y==="json"){let X=await $.json();return NM(X,dL4)}if(Y==="protobuf"){let X=await $.arrayBuffer();return iD(new Uint8Array(X),lL4)}throw await $.body?.cancel(),D9(Y,"Impossible encoding")}async function ZZ9($){let Y=$.headers.get("content-type")??"text/plain",X=`Server returned HTTP status ${$.status}`;if(Y==="application/json"){let G=await $.json();if("message"in G)return OV(G);return new DM(X,$.status)}if(Y==="text/plain"){let G=(await $.text()).trim();if(G!=="")X+=`: ${G}`;return new DM(X,$.status)}return await $.body?.cancel(),new DM(X,$.status)}var UZ9=[{versionPath:"v3-protobuf",pipelinePath:"v3-protobuf/pipeline",cursorPath:"v3-protobuf/cursor",version:3,encoding:"protobuf"}],tu0={versionPath:"v2",pipelinePath:"v2/pipeline",cursorPath:void 0,version:2,encoding:"json"};class o70 extends hI{#$;#Y;#X;#J;#G;_endpointPromise;_endpoint;constructor($,Y,X,G=2){super();if(this.#$=$,this.#Y=Y,this.#X=X??ru0,this.#J=void 0,this.#G=new Set,G==3)this._endpointPromise=HZ9(this.#X,this.#$),this._endpointPromise.then((J)=>this._endpoint=J,(J)=>this.#Q(J));else this._endpointPromise=Promise.resolve(tu0),this._endpointPromise.then((J)=>this._endpoint=J,(J)=>this.#Q(J))}async getVersion(){if(this._endpoint!==void 0)return this._endpoint.version;return(await this._endpointPromise).version}_ensureVersion($,Y){if($<=tu0.version)return;else if(this._endpoint===void 0)throw new LU(`${Y} is supported only on protocol version ${$} and higher, but the version supported by the HTTP server is not yet known. Use Client.getVersion() to wait until the version is available.`);else if(this._endpoint.version<$)throw new LU(`${Y} is supported only on protocol version ${$} and higher, but the HTTP server only supports version ${this._endpoint.version}.`)}openStream(){if(this.#J!==void 0)throw new S7("Client is closed",this.#J);let $=new s70(this,this.#$,this.#Y,this.#X);return this.#G.add($),$}_streamClosed($){this.#G.delete($)}close(){this.#Q(new T9("Client was manually closed"))}get closed(){return this.#J!==void 0}#Q($){if(this.#J!==void 0)return;this.#J=$;for(let Y of Array.from(this.#G))Y._setClosed(new S7("Client was closed",$))}}async function HZ9($,Y){let X=$;for(let G of UZ9){let J=new URL(G.versionPath,Y),Q=new Fp(J.toString(),{method:"GET"}),W=await X(Q);if(await W.arrayBuffer(),W.ok)return G}return tu0}function eu0($,Y,X=2){if(typeof cD>"u")throw new $p("WebSockets are not supported in this environment");var G=void 0;if(X==3)G=Array.from(nu0.keys());else G=Array.from(pL4.keys());let J=new cD($,G);return new a70(J,Y)}function $p0($,Y,X,G=2){return new o70($ instanceof URL?$:new URL($),Y,X,G)}class Lp{#$;#Y;#X;constructor($,Y){this.#$=$,this.#Y=Y,this.#X=void 0}execute($){return this.batch([$]).then((Y)=>Y[0])}async batch($){let Y=this._getStream();if(Y.closed)throw new P6("Cannot execute statements because the transaction is closed","TRANSACTION_CLOSED");try{let X=$.map(EV),G;if(this.#X===void 0){this._getSqlCache().apply(X);let Q=Y.batch(this.#Y>=3),W=Q.step(),K=W.run(dD(this.#$)),Z=W;G=X.map((H)=>{let z=Q.step().condition(g$.ok(Z));if(this.#Y>=3)z.condition(g$.not(g$.isAutocommit(Q)));let V=z.query(H);return V.catch(()=>{return}),Z=z,V}),this.#X=Q.execute().then(()=>K).then(()=>{return});try{await this.#X}catch(H){throw this.close(),H}}else{if(this.#Y<3)await this.#X;this._getSqlCache().apply(X);let Q=Y.batch(this.#Y>=3),W=void 0;G=X.map((K)=>{let Z=Q.step();if(W!==void 0)Z.condition(g$.ok(W));if(this.#Y>=3)Z.condition(g$.not(g$.isAutocommit(Q)));let H=Z.query(K);return H.catch(()=>{return}),W=Z,H}),await Q.execute()}let J=[];for(let Q of G){let W=await Q;if(W===void 0)throw new P6("Statement in a transaction was not executed, probably because the transaction has been rolled back","TRANSACTION_CLOSED");J.push(nI(W))}return J}catch(X){throw Z7(X)}}async executeMultiple($){let Y=this._getStream();if(Y.closed)throw new P6("Cannot execute statements because the transaction is closed","TRANSACTION_CLOSED");try{if(this.#X===void 0){this.#X=Y.run(dD(this.#$)).then(()=>{return});try{await this.#X}catch(X){throw this.close(),X}}else await this.#X;await Y.sequence($)}catch(X){throw Z7(X)}}async rollback(){try{let $=this._getStream();if($.closed)return;if(this.#X!==void 0);else return;let Y=$.run("ROLLBACK").catch((X)=>{throw Z7(X)});$.closeGracefully(),await Y}catch($){throw Z7($)}finally{this.close()}}async commit(){try{let $=this._getStream();if($.closed)throw new P6("Cannot commit the transaction because it is already closed","TRANSACTION_CLOSED");if(this.#X!==void 0)await this.#X;else return;let Y=$.run("COMMIT").catch((X)=>{throw Z7(X)});$.closeGracefully(),await Y}catch($){throw Z7($)}finally{this.close()}}}async function iI($,Y,X,G,J=!1){if(J)X.step().run("PRAGMA foreign_keys=off");let Q=X.step(),W=Q.run(dD($)),K=Q,Z=G.map((L)=>{let N=X.step().condition(g$.ok(K));if(Y>=3)N.condition(g$.not(g$.isAutocommit(X)));let D=N.query(L);return K=N,D}),H=X.step().condition(g$.ok(K));if(Y>=3)H.condition(g$.not(g$.isAutocommit(X)));let z=H.run("COMMIT");if(X.step().condition(g$.not(g$.ok(H))).run("ROLLBACK").catch((L)=>{return}),J)X.step().run("PRAGMA foreign_keys=on");await X.execute();let F=[];await W;for(let L of Z){let N=await L;if(N===void 0)throw new P6("Statement in a batch was not executed, probably because the transaction has been rolled back","TRANSACTION_CLOSED");F.push(nI(N))}return await z,F}function EV($){let Y,X;if(Array.isArray($))[Y,X]=$;else if(typeof $==="string")Y=$;else Y=$.sql,X=$.args;let G=new Kp(Y);if(X)if(Array.isArray(X))G.bindIndexes(X);else for(let[J,Q]of Object.entries(X))G.bindName(J,Q);return G}function nI($){let Y=$.columnNames.map((W)=>W??""),X=$.columnDecltypes.map((W)=>W??""),G=$.rows,J=$.affectedRowCount,Q=$.lastInsertRowid!==void 0?$.lastInsertRowid:void 0;return new yI(Y,X,G,J,Q)}function Z7($){if($ instanceof T9){let Y=oL4($);return new P6($.message,Y,void 0,$)}return $}function oL4($){if($ instanceof eu&&$.code!==void 0)return $.code;else if($ instanceof Z6)return"HRANA_PROTO_ERROR";else if($ instanceof S7)return $.cause instanceof T9?oL4($.cause):"HRANA_CLOSED_ERROR";else if($ instanceof fI)return"HRANA_WEBSOCKET_ERROR";else if($ instanceof DM)return"SERVER_ERROR";else if($ instanceof LU)return"PROTOCOL_VERSION_ERROR";else if($ instanceof NG)return"INTERNAL_ERROR";else return"UNKNOWN"}class rI{#$;#Y;capacity;constructor($,Y){this.#$=$,this.#Y=new tL4,this.capacity=Y}apply($){if(this.capacity<=0)return;let Y=new Set;for(let X of $){if(typeof X.sql!=="string")continue;let G=X.sql;if(G.length>=5000)continue;let J=this.#Y.get(G);if(J===void 0){while(this.#Y.size+1>this.capacity){let[Q,W]=this.#Y.peekLru();if(Y.has(W))break;W.close(),this.#Y.delete(Q)}if(this.#Y.size+1<=this.capacity)J=this.#$.storeSql(G),this.#Y.set(G,J)}if(J!==void 0)X.sql=J,Y.add(J)}}}class tL4{#$;constructor(){this.#$=new Map}get($){let Y=this.#$.get($);if(Y!==void 0)this.#$.delete($),this.#$.set($,Y);return Y}set($,Y){this.#$.set($,Y)}peekLru(){for(let $ of this.#$.entries())return $;return}delete($){this.#$.delete($)}get size(){return this.#$.size}}var XD4=U6(Xp0(),1);function GD4($){if($.scheme!=="wss"&&$.scheme!=="ws")throw new P6(`The WebSocket client supports only "libsql:", "wss:" and "ws:" URLs, got ${JSON.stringify($.scheme+":")}. For more information, please read ${GH}`,"URL_SCHEME_NOT_SUPPORTED");if($.encryptionKey!==void 0)throw new P6("Encryption key is not supported by the remote client.","ENCRYPTION_KEY_NOT_SUPPORTED");if($.scheme==="ws"&&$.tls)throw new P6('A "ws:" URL cannot opt into TLS by using ?tls=1',"URL_INVALID");else if($.scheme==="wss"&&!$.tls)throw new P6('A "wss:" URL cannot opt out of TLS by using ?tls=0',"URL_INVALID");let Y=au($.scheme,$.authority,$.path),X;try{X=eu0(Y,$.authToken)}catch(G){if(G instanceof $p){let J=$.scheme==="wss"?"https":"http",Q=au(J,$.authority,$.path);throw new P6(`This environment does not support WebSockets, please switch to the HTTP client by using a "${J}:" URL (${JSON.stringify(Q)}). For more information, please read ${GH}`,"WEBSOCKETS_NOT_SUPPORTED")}throw Z7(G)}return new JD4(X,Y,$.authToken,$.intMode,$.concurrency)}var FZ9=60000,YD4=100;class JD4{#$;#Y;#X;#J;#G;closed;protocol;#Q;#U;constructor($,Y,X,G,J){this.#$=Y,this.#Y=X,this.#X=G,this.#J=this.#W($),this.#G=void 0,this.closed=!1,this.protocol="ws",this.#U=XD4.default(J)}async limit($){return this.#U($)}async execute($,Y){let X;if(typeof $==="string")X={sql:$,args:Y||[]};else X=$;return this.limit(async()=>{let G=await this.#Z();try{let J=EV(X);G.conn.sqlCache.apply([J]);let Q=G.stream.query(J);G.stream.closeGracefully();let W=await Q;return nI(W)}catch(J){throw Z7(J)}finally{this._closeStream(G)}})}async batch($,Y="deferred"){return this.limit(async()=>{let X=await this.#Z();try{let J=$.map((H)=>{if(Array.isArray(H))return{sql:H[0],args:H[1]||[]};return H}).map(EV),Q=await X.conn.client.getVersion();X.conn.sqlCache.apply(J);let W=X.stream.batch(Q>=3);return await iI(Y,Q,W,J)}catch(G){throw Z7(G)}finally{this._closeStream(X)}})}async migrate($){return this.limit(async()=>{let Y=await this.#Z();try{let X=$.map(EV),G=await Y.conn.client.getVersion(),J=Y.stream.batch(G>=3);return await iI("deferred",G,J,X,!0)}catch(X){throw Z7(X)}finally{this._closeStream(Y)}})}async transaction($="write"){return this.limit(async()=>{let Y=await this.#Z();try{let X=await Y.conn.client.getVersion();return new QD4(this,Y,$,X)}catch(X){throw this._closeStream(Y),Z7(X)}})}async executeMultiple($){return this.limit(async()=>{let Y=await this.#Z();try{let X=Y.stream.sequence($);Y.stream.closeGracefully(),await X}catch(X){throw Z7(X)}finally{this._closeStream(Y)}})}sync(){throw new P6("sync not supported in ws mode","SYNC_NOT_SUPPORTED")}async#Z(){if(this.closed)throw new P6("The client is closed","CLIENT_CLOSED");if(new Date().valueOf()-this.#J.openTime.valueOf()>FZ9&&this.#G===void 0){let G=this.#W();this.#G=G,G.client.getVersion().then((J)=>{if(this.#J!==G){if(this.#J.streamStates.size===0)this.#J.client.close()}this.#J=G,this.#G=void 0},(J)=>{this.#G=void 0})}if(this.#J.client.closed)try{if(this.#G!==void 0)this.#J=this.#G;else this.#J=this.#W()}catch(G){throw Z7(G)}let X=this.#J;try{if(X.useSqlCache===void 0){if(X.useSqlCache=await X.client.getVersion()>=2,X.useSqlCache)X.sqlCache.capacity=YD4}let G=X.client.openStream();G.intMode=this.#X;let J={conn:X,stream:G};return X.streamStates.add(J),J}catch(G){throw Z7(G)}}#W($){try{return $??=eu0(this.#$,this.#Y),{client:$,useSqlCache:void 0,sqlCache:new rI($,0),openTime:new Date,streamStates:new Set}}catch(Y){throw Z7(Y)}}async reconnect(){try{for(let X of Array.from(this.#J.streamStates))try{X.stream.close()}catch{}this.#J.client.close()}catch{}if(this.#G){try{this.#G.client.close()}catch{}this.#G=void 0}let $=this.#W(),Y=await $.client.getVersion();if($.useSqlCache=Y>=2,$.useSqlCache)$.sqlCache.capacity=YD4;this.#J=$,this.closed=!1}_closeStream($){$.stream.close();let Y=$.conn;if(Y.streamStates.delete($),Y.streamStates.size===0&&Y!==this.#J)Y.client.close()}close(){if(this.#J.client.close(),this.closed=!0,this.#G){try{this.#G.client.close()}catch{}this.#G=void 0}this.closed=!0}}class QD4 extends Lp{#$;#Y;constructor($,Y,X,G){super(X,G);this.#$=$,this.#Y=Y}_getStream(){return this.#Y.stream}_getSqlCache(){return this.#Y.conn.sqlCache}close(){this.#$._closeStream(this.#Y)}get closed(){return this.#Y.stream.closed}}var WD4=U6(Xp0(),1);function KD4($){if($.scheme!=="https"&&$.scheme!=="http")throw new P6(`The HTTP client supports only "libsql:", "https:" and "http:" URLs, got ${JSON.stringify($.scheme+":")}. For more information, please read ${GH}`,"URL_SCHEME_NOT_SUPPORTED");if($.encryptionKey!==void 0)throw new P6("Encryption key is not supported by the remote client.","ENCRYPTION_KEY_NOT_SUPPORTED");if($.scheme==="http"&&$.tls)throw new P6('A "http:" URL cannot opt into TLS by using ?tls=1',"URL_INVALID");else if($.scheme==="https"&&!$.tls)throw new P6('A "https:" URL cannot opt out of TLS by using ?tls=0',"URL_INVALID");let Y=au($.scheme,$.authority,$.path);return new UD4(Y,$.authToken,$.intMode,$.fetch,$.concurrency)}var ZD4=30;class UD4{#$;protocol;#Y;#X;#J;#G;#Q;#U;constructor($,Y,X,G,J){this.#Y=$,this.#Q=Y,this.#X=X,this.#J=G,this.#G=J,this.#$=$p0(this.#Y,this.#Q,this.#J),this.#$.intMode=this.#X,this.protocol="http",this.#U=WD4.default(this.#G)}async limit($){return this.#U($)}async execute($,Y){let X;if(typeof $==="string")X={sql:$,args:Y||[]};else X=$;return this.limit(async()=>{try{let G=EV(X),J,Q=this.#$.openStream();try{J=Q.query(G)}finally{Q.closeGracefully()}let W=await J;return nI(W)}catch(G){throw Z7(G)}})}async batch($,Y="deferred"){return this.limit(async()=>{try{let G=$.map((Z)=>{if(Array.isArray(Z))return{sql:Z[0],args:Z[1]||[]};return Z}).map(EV),J=await this.#$.getVersion(),Q,W=this.#$.openStream();try{new rI(W,ZD4).apply(G);let H=W.batch(!1);Q=iI(Y,J,H,G)}finally{W.closeGracefully()}return await Q}catch(X){throw Z7(X)}})}async migrate($){return this.limit(async()=>{try{let Y=$.map(EV),X=await this.#$.getVersion(),G,J=this.#$.openStream();try{let W=J.batch(!1);G=iI("deferred",X,W,Y,!0)}finally{J.closeGracefully()}return await G}catch(Y){throw Z7(Y)}})}async transaction($="write"){return this.limit(async()=>{try{let Y=await this.#$.getVersion();return new HD4(this.#$.openStream(),$,Y)}catch(Y){throw Z7(Y)}})}async executeMultiple($){return this.limit(async()=>{try{let Y,X=this.#$.openStream();try{Y=X.sequence($)}finally{X.closeGracefully()}await Y}catch(Y){throw Z7(Y)}})}sync(){throw new P6("sync not supported in http mode","SYNC_NOT_SUPPORTED")}close(){this.#$.close()}async reconnect(){try{if(!this.closed)this.#$.close()}finally{this.#$=$p0(this.#Y,this.#Q,this.#J),this.#$.intMode=this.#X}}get closed(){return this.#$.closed}}class HD4 extends Lp{#$;#Y;constructor($,Y,X){super(Y,X);this.#$=$,this.#Y=new rI($,ZD4)}_getStream(){return this.#$}_getSqlCache(){return this.#Y}close(){this.#$.close()}get closed(){return this.#$.closed}}function Gp0($){return LZ9(ou($,!0))}function LZ9($){if($.scheme==="wss"||$.scheme==="ws")return GD4($);else if($.scheme==="https"||$.scheme==="http")return KD4($);else return AL4($)}Jp0();hu();import{randomUUID as DZ9}from"crypto";K90();var VD4=($)=>{return(Y,X)=>{let G=QH(Y);return{sql:`CASE 
        WHEN ? IS NULL THEN json_extract(metadata, ${G}) IS ${$==="="?"":"NOT"} NULL
        ELSE json_extract(metadata, ${G}) ${$} ?
      END`,needsValue:!0,transformValue:()=>{return[X,X]}}}},t70=($)=>{return(Y,X)=>{let G=QH(Y);if(typeof X==="number"||typeof X==="string"&&!isNaN(Number(X))&&X.trim()!=="")return{sql:`CAST(json_extract(metadata, ${G}) AS NUMERIC) ${$} ?`,needsValue:!0};else return{sql:`CAST(json_extract(metadata, ${G}) AS TEXT) ${$} ?`,needsValue:!0}}},Dp=($)=>{let Y=QH($);return`json_valid(json_extract(metadata, ${Y}))
   AND json_type(json_extract(metadata, ${Y})) = 'array'`},FD4=/json_extract\(metadata, '\$\.(?:"[^"]*"(?:\."[^"]*")*|[^']+)'\)/g;function NZ9($){return Object.entries($).map(([X,G])=>{if(X.startsWith("$")){let{sql:J,values:Q}=Ap("elem.value",{[X]:G});return{sql:J.replace(FD4,"elem.value"),values:Q}}else if(typeof G==="object"&&!Array.isArray(G)){let{sql:J,values:Q}=Ap(X,G),W=YY0(X);return{sql:J.replace(FD4,`json_extract(elem.value, '$.${W}')`),values:Q}}else return{sql:`json_extract(elem.value, '$.${YY0(X)}') = ?`,values:[G]}})}var LD4={$eq:VD4("="),$ne:VD4("!="),$gt:t70(">"),$gte:t70(">="),$lt:t70("<"),$lte:t70("<="),$in:($,Y)=>{let X=QH($),G=Array.isArray(Y)?Y:[Y];if(G.length===0)return{sql:"1 = 0",needsValue:!0,transformValue:()=>[]};let J=G.map(()=>"?").join(",");return{sql:`(
      CASE
        WHEN ${Dp($)} THEN
          EXISTS (
            SELECT 1 FROM json_each(json_extract(metadata, ${X})) as elem
            WHERE elem.value IN (SELECT value FROM json_each(?))
          )
        ELSE json_extract(metadata, ${X}) IN (${J})
      END
    )`,needsValue:!0,transformValue:()=>[JSON.stringify(G),...G]}},$nin:($,Y)=>{let X=QH($),G=Array.isArray(Y)?Y:[Y];if(G.length===0)return{sql:"1 = 1",needsValue:!0,transformValue:()=>[]};let J=G.map(()=>"?").join(",");return{sql:`(
      CASE
        WHEN ${Dp($)} THEN
          NOT EXISTS (
            SELECT 1 FROM json_each(json_extract(metadata, ${X})) as elem
            WHERE elem.value IN (SELECT value FROM json_each(?))
          )
        ELSE json_extract(metadata, ${X}) NOT IN (${J})
      END
    )`,needsValue:!0,transformValue:()=>[JSON.stringify(G),...G]}},$all:($,Y)=>{let X=QH($),G,J=Array.isArray(Y)?Y:[Y];if(J.length===0)G="1 = 0";else G=`(
      CASE
        WHEN ${Dp($)} THEN
          NOT EXISTS (
            SELECT value
            FROM json_each(?)
            WHERE value NOT IN (
              SELECT value
              FROM json_each(json_extract(metadata, ${X}))
            )
          )
        ELSE FALSE
      END
    )`;return{sql:G,needsValue:!0,transformValue:()=>{if(J.length===0)return[];return[JSON.stringify(J)]}}},$elemMatch:($,Y)=>{let X=QH($);if(typeof Y!=="object"||Array.isArray(Y))throw Error("$elemMatch requires an object with conditions");let G=NZ9(Y);return{sql:`(
        CASE
          WHEN ${Dp($)} THEN
            EXISTS (
              SELECT 1
              FROM json_each(json_extract(metadata, ${X})) as elem
              WHERE ${G.map((J)=>J.sql).join(" AND ")}
            )
          ELSE FALSE
        END
      )`,needsValue:!0,transformValue:()=>G.flatMap((J)=>J.values)}},$exists:($,Y)=>{let X=QH($);return{sql:Y===!1?`json_extract(metadata, ${X}) IS NULL`:`json_extract(metadata, ${X}) IS NOT NULL`,needsValue:!1}},$and:($)=>({sql:`(${$})`,needsValue:!1}),$or:($)=>({sql:`(${$})`,needsValue:!1}),$not:($)=>({sql:`NOT (${$})`,needsValue:!1}),$nor:($)=>({sql:`NOT (${$})`,needsValue:!1}),$size:($,Y)=>{let X=QH($);return{sql:`(
    CASE
      WHEN json_type(json_extract(metadata, ${X})) = 'array' THEN 
        json_array_length(json_extract(metadata, ${X})) = $${Y}
      ELSE FALSE
    END
  )`,needsValue:!0}},$contains:($,Y)=>{let X=YY0($),G;if(Array.isArray(Y))G=`(
        SELECT ${Dp(X)}
        AND EXISTS (
          SELECT 1
          FROM json_each(json_extract(metadata, '$."${X}"')) as m
          WHERE m.value IN (SELECT value FROM json_each(?))
        )
      )`;else if(typeof Y==="string")G=`lower(json_extract(metadata, '$."${X}"')) LIKE '%' || lower(?) || '%' ESCAPE '\\'`;else G=`json_extract(metadata, '$."${X}"') = ?`;return{sql:G,needsValue:!0,transformValue:()=>{if(Array.isArray(Y))return[JSON.stringify(Y)];if(typeof Y==="object"&&Y!==null)return[JSON.stringify(Y)];if(typeof Y==="string")return[BZ9(Y)];return[Y]}}}};function AZ9($){return $&&typeof $==="object"&&typeof $.sql==="string"&&Array.isArray($.values)}var YY0=($)=>{let Y=Hx0($);if(Y.includes("."))return Y.split(".").map((X)=>`"${X}"`).join(".");return Y},QH=($)=>{return`'$.${YY0($)}'`};function BZ9($){return $.replace(/([%_\\])/g,"\\$1")}function Ap($,Y,X){if(["$and","$or","$not","$nor"].includes($))return OZ9($,Y);if(!Y||typeof Y!=="object")return{sql:`json_extract(metadata, ${QH($)}) = ?`,values:[Y]};return EZ9($,Y)}function OZ9($,Y,X){if(!Y||Array.isArray(Y)&&Y.length===0)switch($){case"$and":case"$nor":return{sql:"true",values:[]};case"$or":return{sql:"false",values:[]};case"$not":throw Error("$not operator cannot be empty");default:return{sql:"true",values:[]}}if($==="$not"){let Z=Object.entries(Y).map(([H,z])=>Ap(H,z));return{sql:`NOT (${Z.map((H)=>H.sql).join(" AND ")})`,values:Z.flatMap((H)=>H.values)}}let G=[],J=$==="$or"||$==="$nor"?"OR":"AND",W=(Array.isArray(Y)?Y.map((K)=>{return(K?Object.entries(K):[]).map(([H,z])=>Ap(H,z))}):[Ap($,Y)]).flat().map((K)=>{return G.push(...K.values),K.sql}).join(` ${J} `);return{sql:$==="$nor"?`NOT (${W})`:`(${W})`,values:G}}function EZ9($,Y){if(typeof Y==="object"&&!Array.isArray(Y)){let Q=Object.entries(Y).map(([W,K])=>W==="$not"?{sql:`NOT (${Object.entries(K).map(([Z,H])=>e70($,Z,H).sql).join(" AND ")})`,values:Object.entries(K).flatMap(([Z,H])=>e70($,Z,H).values)}:e70($,W,K));return{sql:`(${Q.map((W)=>W.sql).join(" AND ")})`,values:Q.flatMap((W)=>W.values)}}let[[X,G]=[]]=Object.entries(Y);return e70($,X,G)}var e70=($,Y,X)=>{if(!Y.startsWith("$")||!LD4[Y])throw Error(`Invalid operator: ${Y}`);let G=LD4[Y],J=G($,X);if(!J.needsValue)return{sql:J.sql,values:[]};let Q=J.transformValue?J.transformValue():X;if(AZ9(Q))return Q;return{sql:J.sql,values:Array.isArray(Q)?Q:[Q]}};var sI=($)=>{let Y=new Set,X=(G)=>{if(G===null||G===void 0)return G;if(typeof G==="function")return;if(typeof G==="symbol")return;if(typeof G==="bigint")return G.toString();if(typeof G!=="object")return G;if(Y.has(G))return;if(typeof G.toJSON==="function")return X(G.toJSON());Y.add(G);try{if(Array.isArray(G))return G.map((Q)=>X(Q));let J={};for(let Q of Object.keys(G)){let W=X(G[Q]);if(W!==void 0)J[Q]=W}return J}finally{Y.delete(G)}};return JSON.stringify(X($))??"null"};function E4($){let Y=F5[$];return Object.keys(Y).map((X)=>{let G=Y[X],J=y$(X,"column name");return G?.type==="jsonb"?`json("${J}") as "${J}"`:`"${J}"`}).join(", ")}function OD4($,Y){let X=y$(Y,"table alias"),G=F5[$];return Object.keys(G).map((J)=>{let Q=G[J],W=y$(J,"column name");return Q?.type==="jsonb"?`json(${X}."${W}") as "${W}"`:`${X}."${W}"`}).join(", ")}function MZ9($){return $.code==="SQLITE_BUSY"||$.code==="SQLITE_LOCKED"||$.message?.toLowerCase().includes("database is locked")||$.message?.toLowerCase().includes("database table is locked")||$.message?.toLowerCase().includes("table is locked")||$.constructor.name==="SqliteError"&&$.message?.toLowerCase().includes("locked")}function ED4({logger:$,maxRetries:Y,initialBackoffMs:X}){return async function(J,Q){let W=0,K=X;while(W<Y)try{return await J()}catch(Z){if($.debug(`LibSQLStore: Error caught in retry loop for ${Q}`,{errorType:Z.constructor.name,errorCode:Z.code,errorMessage:Z.message,attempts:W,maxRetries:Y}),MZ9(Z)){if(W++,W>=Y)throw $.error(`LibSQLStore: Operation failed after ${Y} attempts due to database lock: ${Z.message}`,{error:Z,attempts:W,maxRetries:Y}),Z;$.warn(`LibSQLStore: Attempt ${W} failed due to database lock during ${Q}. Retrying in ${K}ms...`,{errorMessage:Z.message,attempts:W,backoff:K,maxRetries:Y}),await new Promise((H)=>setTimeout(H,K)),K*=2}else throw $.error(`LibSQLStore: Non-lock error during ${Q}, not retrying`,{error:Z}),Z}throw Error(`LibSQLStore: Unexpected exit from retry loop for ${Q}`)}}function DD4({tableName:$,record:Y}){let X=y$($,"table name"),G=F5[$],J=Object.keys(Y),Q=J.map((Z)=>y$(Z,"column name")),W=J.map((Z)=>{let H=Y[Z];if(typeof H>"u"||H===null)return null;if(G[Z]?.type==="jsonb")return sI(H);if(H instanceof Date)return H.toISOString();return typeof H==="object"?sI(H):H}),K=J.map((Z)=>{return G[Z]?.type==="jsonb"?"jsonb(?)":"?"}).join(", ");return{sql:`INSERT OR REPLACE INTO ${X} (${Q.join(", ")}) VALUES (${K})`,args:W}}function ND4({tableName:$,updates:Y,keys:X}){let G=y$($,"table name"),J=F5[$],Q=Object.keys(Y),W=Q.map((z)=>y$(z,"column name")),K=Q.map((z)=>{let V=J[z],F=Y[z];if(V?.type==="jsonb")return Bp(F,!0);return Bp(F,!1)}),Z=W.map((z,V)=>{return J[Q[V]]?.type==="jsonb"?`${z} = jsonb(?)`:`${z} = ?`}).join(", "),H=MD4(X,J);return{sql:`UPDATE ${G} SET ${Z}${H.sql}`,args:[...K,...H.args]}}function Bp($,Y=!1){if(typeof $>"u"||$===null)return null;if(Y)return sI($);if($ instanceof Date)return $.toISOString();return typeof $==="object"?sI($):$}function AD4({tableName:$,keys:Y}){let X=y$($,"table name"),G=MD4(Y,F5[$]);return{sql:`DELETE FROM ${X}${G.sql}`,args:G.args}}function MD4($,Y){let X=[],G=[];for(let[J,Q]of Object.entries($)){if(!Y[J])throw Error(`Unknown column: ${J}`);let K=y$(J,"column name"),Z=RZ9(K,Q);X.push(Z.condition),G.push(...Z.args)}return{sql:X.length>0?` WHERE ${X.join(" AND ")}`:"",args:G}}function RZ9($,Y){if(Y===null)return{condition:`${$} IS NULL`,args:[]};if(typeof Y==="object"&&Y!==null&&(("startAt"in Y)||("endAt"in Y)))return qZ9($,Y);return{condition:`${$} = ?`,args:[Bp(Y)]}}function qZ9($,Y){let X=[],G=[];if(Y.startAt!==void 0)X.push(`${$} >= ?`),G.push(Bp(Y.startAt));if(Y.endAt!==void 0)X.push(`${$} <= ?`),G.push(Bp(Y.endAt));if(X.length===0)throw Error("Date range must specify at least startAt or endAt");return{condition:X.join(" AND "),args:G}}function Np({tableName:$,sqlRow:Y}){let X={},G=new Set(Object.keys(F5[$]).filter((W)=>F5[$][W].type==="jsonb").map((W)=>W)),J=new Set(Object.keys(F5[$]).filter((W)=>F5[$][W].type==="timestamp").map((W)=>W)),Q=new Set(Object.keys(F5[$]).filter((W)=>F5[$][W].type==="boolean").map((W)=>W));for(let[W,K]of Object.entries(Y)){if(K===null||K===void 0){X[W]=K;continue}if(J.has(W)&&typeof K==="string"){X[W]=new Date(K);continue}if(G.has(W)&&typeof K==="string"){X[W]=N8(K);continue}if(Q.has(W)){X[W]=Boolean(K);continue}X[W]=K}return X}function sY($){if("client"in $)return $.client;return Gp0({url:$.url,...$.authToken?{authToken:$.authToken}:{}})}var oY=class extends u8{client;maxRetries;initialBackoffMs;executeWriteOperationWithRetry;tableColumnsCache=new Map;constructor({client:$,maxRetries:Y,initialBackoffMs:X}){super({component:"STORAGE",name:"LIBSQL_DB_LAYER"});this.client=$,this.maxRetries=Y??5,this.initialBackoffMs=X??100,this.executeWriteOperationWithRetry=ED4({logger:this.logger,maxRetries:this.maxRetries,initialBackoffMs:this.initialBackoffMs})}async getTableColumns($){let Y=this.tableColumnsCache.get($);if(Y)return Y;let X=(async()=>{try{let G=y$($,"table name"),J=await this.client.execute({sql:`PRAGMA table_info("${G}")`}),Q=new Set((J.rows||[]).map((W)=>W.name));if(Q.size===0)this.tableColumnsCache.delete($);return Q}catch(G){throw this.tableColumnsCache.delete($),G}})();return this.tableColumnsCache.set($,X),X}async filterRecordToKnownColumns($,Y){let X=await this.getTableColumns($);if(X.size===0)return Y;let G={};for(let[J,Q]of Object.entries(Y))if(X.has(J))G[J]=Q;return G}async hasColumn($,Y){let X=y$($,"table name");return(await this.client.execute({sql:`PRAGMA table_info("${X}")`})).rows?.some((J)=>J.name===Y)}async doInsert({tableName:$,record:Y}){let X=await this.filterRecordToKnownColumns($,Y);if(Object.keys(X).length===0)return;await this.client.execute(DD4({tableName:$,record:X}))}insert($){return this.executeWriteOperationWithRetry(()=>this.doInsert($),`insert into table ${$.tableName}`)}async doUpdate({tableName:$,keys:Y,data:X}){let G=await this.filterRecordToKnownColumns($,X);if(Object.keys(G).length===0)return;await this.client.execute(ND4({tableName:$,updates:G,keys:Y}))}update($){return this.executeWriteOperationWithRetry(()=>this.doUpdate($),`update table ${$.tableName}`)}async doBatchInsert({tableName:$,records:Y}){if(Y.length===0)return;let G=(await Promise.all(Y.map((Q)=>this.filterRecordToKnownColumns($,Q)))).filter((Q)=>Object.keys(Q).length>0);if(G.length===0)return;let J=G.map((Q)=>DD4({tableName:$,record:Q}));await this.client.batch(J,"write")}async batchInsert($){return this.executeWriteOperationWithRetry(()=>this.doBatchInsert($),`batch insert into table ${$.tableName}`).catch((Y)=>{throw new G0({id:w0("LIBSQL","BATCH_INSERT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{tableName:$.tableName}},Y)})}async doBatchUpdate({tableName:$,updates:Y}){if(Y.length===0)return;let X=[];for(let{keys:J,data:Q}of Y){let W=await this.filterRecordToKnownColumns($,Q);if(Object.keys(W).length>0)X.push({keys:J,data:W})}if(X.length===0)return;let G=X.map(({keys:J,data:Q})=>ND4({tableName:$,updates:Q,keys:J}));await this.client.batch(G,"write")}async batchUpdate($){return this.executeWriteOperationWithRetry(()=>this.doBatchUpdate($),`batch update in table ${$.tableName}`).catch((Y)=>{throw new G0({id:w0("LIBSQL","BATCH_UPDATE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{tableName:$.tableName}},Y)})}async doBatchDelete({tableName:$,keys:Y}){if(Y.length===0)return;let X=Y.map((G)=>AD4({tableName:$,keys:G}));await this.client.batch(X,"write")}async batchDelete({tableName:$,keys:Y}){return this.executeWriteOperationWithRetry(()=>this.doBatchDelete({tableName:$,keys:Y}),`batch delete from table ${$}`).catch((X)=>{throw new G0({id:w0("LIBSQL","BATCH_DELETE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{tableName:$}},X)})}async doDelete({tableName:$,keys:Y}){await this.client.execute(AD4({tableName:$,keys:Y}))}async delete($){return this.executeWriteOperationWithRetry(()=>this.doDelete($),`delete from table ${$.tableName}`).catch((Y)=>{throw new G0({id:w0("LIBSQL","DELETE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{tableName:$.tableName}},Y)})}async select({tableName:$,keys:Y}){let X=y$($,"table name"),G=E4($),Q=Object.keys(Y).map((z)=>y$(z,"column name")).map((z)=>`${z} = ?`).join(" AND "),W=Object.values(Y),K=await this.client.execute({sql:`SELECT ${G} FROM ${X} WHERE ${Q} ORDER BY createdAt DESC LIMIT 1`,args:W});if(!K.rows||K.rows.length===0)return null;let Z=K.rows[0];return Object.fromEntries(Object.entries(Z||{}).map(([z,V])=>{try{return[z,typeof V==="string"?V.startsWith("{")||V.startsWith("[")?JSON.parse(V):V:V]}catch{return[z,V]}}))}async selectMany({tableName:$,whereClause:Y,orderBy:X,offset:G,limit:J,args:Q}){let W=y$($,"table name"),Z=`SELECT ${E4($)} FROM ${W}`;if(Y?.sql)Z+=` ${Y.sql}`;if(X)Z+=` ORDER BY ${X}`;if(J)Z+=` LIMIT ${J}`;if(G)Z+=` OFFSET ${G}`;return((await this.client.execute({sql:Z,args:[...Y?.args??[],...Q??[]]})).rows??[]).map((z)=>{return Object.fromEntries(Object.entries(z||{}).map(([V,F])=>{try{return[V,typeof F==="string"?F.startsWith("{")||F.startsWith("[")?JSON.parse(F):F:F]}catch{return[V,F]}}))})}async selectTotalCount({tableName:$,whereClause:Y}){let G=`SELECT COUNT(*) as count FROM ${y$($,"table name")} ${Y?`${Y.sql}`:""}`,J=await this.client.execute({sql:G,args:Y?.args??[]});if(!J.rows||J.rows.length===0)return 0;return J.rows[0]?.count??0}getSqlType($){switch($){case"bigint":return"INTEGER";case"timestamp":return"TEXT";case"float":return"REAL";case"boolean":return"INTEGER";case"jsonb":return"TEXT";default:return L90($)}}async createTable({tableName:$,schema:Y,compositePrimaryKey:X}){try{let G=y$($,"table name");if(X){for(let H of X)if(!(H in Y))throw Error(`compositePrimaryKey column "${H}" does not exist in schema for table "${$}"`)}let J=X?new Set(X):null,Q=Object.entries(Y).map(([H,z])=>{let V=this.getSqlType(z.type),F=z.nullable===!1?"NOT NULL":"",L=z.primaryKey&&!J?.has(H)?"PRIMARY KEY":"";return`"${H}" ${V} ${F} ${L}`.trim()}),W=[];if(X){let H=X.map((z)=>`"${z}"`).join(", ");W.push(`PRIMARY KEY (${H})`)}if($===L$)W.push("UNIQUE (workflow_name, run_id)");if($===H6)W.push("UNIQUE (spanId, traceId)");let K=[...Q,...W].join(`,
  `),Z=`CREATE TABLE IF NOT EXISTS ${G} (
  ${K}
)`;if(await this.client.execute(Z),this.logger.debug(`LibSQLDB: Created table ${$}`),$===H6)await this.migrateSpansTable()}catch(G){if(G instanceof G0)throw G;throw new G0({id:w0("LIBSQL","CREATE_TABLE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{tableName:$}},G)}finally{this.tableColumnsCache.delete($)}}async migrateSpansTable(){let $=F5[H6];try{let Y=await this.getTableColumns(H6),X=new Set([...Y].map((Q)=>Q.toLowerCase())),G=!1;for(let[Q,W]of Object.entries($))if(!X.has(Q.toLowerCase())){let K=this.getSqlType(W.type),Z=`ALTER TABLE "${H6}" ADD COLUMN "${Q}" ${K}`;await this.client.execute(Z),G=!0,this.logger.debug(`LibSQLDB: Added column '${Q}' to ${H6}`)}if(G)this.tableColumnsCache.delete(H6);if(!await this.spansUniqueIndexExists()){let Q=await this.checkForDuplicateSpans();if(Q.hasDuplicates){let W=`
===========================================================================
MIGRATION REQUIRED: Duplicate spans detected in ${H6}
===========================================================================

Found ${Q.duplicateCount} duplicate (traceId, spanId) combinations.

The spans table requires a unique constraint on (traceId, spanId), but your
database contains duplicate entries that must be resolved first.

To fix this, run the manual migration command:

  npx mastra migrate

This command will:
  1. Remove duplicate spans (keeping the most complete/recent version)
  2. Add the required unique constraint

Note: This migration may take some time for large tables.
===========================================================================
`;throw new G0({id:w0("LIBSQL","MIGRATION_REQUIRED","DUPLICATE_SPANS"),domain:M0.STORAGE,category:E0.USER,text:W})}else await this.client.execute(`CREATE UNIQUE INDEX IF NOT EXISTS "mastra_ai_spans_spanid_traceid_idx" ON "${H6}" ("spanId", "traceId")`),this.logger.debug(`LibSQLDB: Created unique index on (spanId, traceId) for ${H6}`)}this.logger.info(`LibSQLDB: Migration completed for ${H6}`)}catch(Y){if(Y instanceof G0)throw Y;this.logger.warn(`LibSQLDB: Failed to migrate spans table ${H6}:`,Y)}}async spansUniqueIndexExists(){try{return((await this.client.execute("SELECT 1 FROM sqlite_master WHERE type = 'index' AND name = 'mastra_ai_spans_spanid_traceid_idx'")).rows?.length??0)>0}catch{return!1}}async checkForDuplicateSpans(){try{let $=await this.client.execute(`
        SELECT COUNT(*) as duplicate_count FROM (
          SELECT "spanId", "traceId"
          FROM "${H6}"
          GROUP BY "spanId", "traceId"
          HAVING COUNT(*) > 1
        )
      `),Y=Number($.rows?.[0]?.duplicate_count??0);return{hasDuplicates:Y>0,duplicateCount:Y}}catch($){return this.logger.debug(`LibSQLDB: Could not check for duplicates: ${$}`),{hasDuplicates:!1,duplicateCount:0}}}async migrateSpans(){if(await this.spansUniqueIndexExists())return{success:!0,alreadyMigrated:!0,duplicatesRemoved:0,message:`Migration already complete. Unique index exists on ${H6}.`};let Y=await this.checkForDuplicateSpans();if(Y.hasDuplicates)this.logger.info(`Found ${Y.duplicateCount} duplicate (traceId, spanId) combinations. Starting deduplication...`),await this.deduplicateSpans();else this.logger.info("No duplicate spans found.");return await this.client.execute(`CREATE UNIQUE INDEX IF NOT EXISTS "mastra_ai_spans_spanid_traceid_idx" ON "${H6}" ("spanId", "traceId")`),{success:!0,alreadyMigrated:!1,duplicatesRemoved:Y.duplicateCount,message:Y.hasDuplicates?`Migration complete. Removed duplicates and added unique index to ${H6}.`:`Migration complete. Added unique index to ${H6}.`}}async checkSpansMigrationStatus(){if(await this.spansUniqueIndexExists())return{needsMigration:!1,hasDuplicates:!1,duplicateCount:0,constraintExists:!0,tableName:H6};let Y=await this.checkForDuplicateSpans();return{needsMigration:!0,hasDuplicates:Y.hasDuplicates,duplicateCount:Y.duplicateCount,constraintExists:!1,tableName:H6}}async deduplicateSpans(){try{let $=await this.client.execute(`
        SELECT COUNT(*) as duplicate_count FROM (
          SELECT "spanId", "traceId"
          FROM "${H6}"
          GROUP BY "spanId", "traceId"
          HAVING COUNT(*) > 1
        )
      `),Y=Number($.rows?.[0]?.duplicate_count??0);if(Y===0){this.logger.debug("LibSQLDB: No duplicate spans found, skipping deduplication");return}this.logger.warn(`LibSQLDB: Found ${Y} duplicate (spanId, traceId) combinations, deduplicating...`);let G=(await this.client.execute(`
        DELETE FROM "${H6}"
        WHERE rowid NOT IN (
          SELECT MIN(best_rowid) FROM (
            SELECT
              rowid as best_rowid,
              "spanId",
              "traceId",
              ROW_NUMBER() OVER (
                PARTITION BY "spanId", "traceId"
                ORDER BY
                  CASE WHEN "endedAt" IS NOT NULL THEN 0 ELSE 1 END,
                  "updatedAt" DESC,
                  "createdAt" DESC
              ) as rn
            FROM "${H6}"
          ) ranked
          WHERE rn = 1
          GROUP BY "spanId", "traceId"
        )
        AND ("spanId", "traceId") IN (
          SELECT "spanId", "traceId"
          FROM "${H6}"
          GROUP BY "spanId", "traceId"
          HAVING COUNT(*) > 1
        )
      `)).rowsAffected??0;this.logger.warn(`LibSQLDB: Deleted ${G} duplicate span records`)}catch($){this.logger.warn("LibSQLDB: Failed to deduplicate spans:",$)}}getDefaultValue($){switch($){case"text":case"uuid":return"DEFAULT ''";case"integer":case"bigint":case"float":return"DEFAULT 0";case"boolean":return"DEFAULT 0";case"jsonb":return"DEFAULT '{}'";case"timestamp":return"DEFAULT CURRENT_TIMESTAMP";default:return"DEFAULT ''"}}async alterTable({tableName:$,schema:Y,ifNotExists:X}){let G=y$($,"table name");try{let J=await this.client.execute({sql:`PRAGMA table_info("${G}")`}),Q=new Set((J.rows||[]).map((W)=>W.name?.toLowerCase()));for(let W of X)if(!Q.has(W.toLowerCase())&&Y[W]){let K=Y[W],Z=this.getSqlType(K.type),H=K.nullable?"DEFAULT NULL":this.getDefaultValue(K.type),z=`ALTER TABLE ${G} ADD COLUMN "${W}" ${Z} ${H}`;await this.client.execute(z),this.logger.debug(`LibSQLDB: Added column ${W} to table ${$}`)}}catch(J){throw new G0({id:w0("LIBSQL","ALTER_TABLE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{tableName:$}},J)}finally{this.tableColumnsCache.delete($)}}async deleteData({tableName:$}){let Y=y$($,"table name");try{await this.client.execute(`DELETE FROM ${Y}`)}catch(X){let G=new G0({id:w0("LIBSQL","CLEAR_TABLE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{tableName:$}},X);this.logger?.trackException?.(G),this.logger?.error?.(G.toString())}}},PZ9=class extends mj{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#X(),await this.#J(),await this.#$.createTable({tableName:N$,schema:QE}),await this.#$.createTable({tableName:m5,schema:WE}),await this.#$.alterTable({tableName:N$,schema:QE,ifNotExists:["status","authorId","visibility","favoriteCount"]}),await this.#$.alterTable({tableName:m5,schema:WE,ifNotExists:["mcpClients","requestContextSchema","workspace","skills","skillsFormat","browser"]}),await this.#Q(),await this.#G()}async#X(){let $=`${N$}_legacy`;if(await this.#$.hasColumn(N$,"name"))await this.#Y.execute({sql:`ALTER TABLE "${N$}" RENAME TO "${$}"`}),await this.#Y.execute({sql:`DROP TABLE IF EXISTS "${m5}"`});if(!await this.#$.hasColumn($,"name"))return;let J=(await this.#Y.execute({sql:`SELECT * FROM "${$}"`})).rows||[];await this.#$.createTable({tableName:N$,schema:QE}),await this.#$.createTable({tableName:m5,schema:WE});for(let Q of J){let W=Q.id;if(!W)continue;let K=crypto.randomUUID(),Z=new Date;await this.#$.insert({tableName:N$,record:{id:W,status:"published",activeVersionId:K,authorId:Q.ownerId??Q.authorId??null,metadata:Q.metadata??null,createdAt:Q.createdAt??Z,updatedAt:Q.updatedAt??Z}}),await this.#$.insert({tableName:m5,record:{id:K,agentId:W,versionNumber:1,name:Q.name??W,description:Q.description??null,instructions:this.serializeInstructions(Q.instructions??""),model:Q.model??"{}",tools:Q.tools??null,defaultOptions:Q.defaultOptions??null,workflows:Q.workflows??null,agents:Q.agents??null,integrationTools:Q.integrationTools??null,inputProcessors:Q.inputProcessors??null,outputProcessors:Q.outputProcessors??null,memory:Q.memory??null,scorers:Q.scorers??null,changedFields:null,changeMessage:"Migrated from legacy schema",createdAt:Q.createdAt??Z}})}await this.#Y.execute({sql:`DROP TABLE IF EXISTS "${$}"`})}async#J(){if(!await this.#$.hasColumn(m5,"snapshot"))return;await this.#Y.execute({sql:`DROP TABLE IF EXISTS "${m5}"`}),await this.#Y.execute({sql:`DROP TABLE IF EXISTS "${N$}_legacy"`})}async#G(){try{await this.#Y.execute({sql:`DELETE FROM "${N$}"
              WHERE status = 'draft'
                AND activeVersionId IS NULL
                AND NOT EXISTS (
                  SELECT 1 FROM "${m5}"
                  WHERE "${m5}".agentId = "${N$}".id
                )`})}catch{}}async#Q(){try{let $=await this.#Y.execute({sql:`SELECT id, tools FROM "${m5}" WHERE tools IS NOT NULL`});if(!$.rows||$.rows.length===0)return;for(let Y of $.rows){let X=Y.tools,G;try{if(typeof X==="string")G=JSON.parse(X);else if(X instanceof ArrayBuffer)G=JSON.parse(new TextDecoder().decode(X));else G=X}catch{continue}if(Array.isArray(G)){let J={};for(let Q of G)if(typeof Q==="string")J[Q]={};await this.#Y.execute({sql:`UPDATE "${m5}" SET tools = ? WHERE id = ?`,args:[JSON.stringify(J),Y.id]})}}this.logger?.info?.("Migrated agent version tools from array to object format")}catch($){this.logger?.warn?.("Failed to migrate tools to JSONB format:",$)}}async dangerouslyClearAll(){await this.#$.deleteData({tableName:m5}),await this.#$.deleteData({tableName:N$})}parseJson($,Y){if(!$)return;if($ instanceof ArrayBuffer||$&&$.constructor&&$.constructor.name==="ArrayBuffer")try{let G=new TextDecoder().decode($);return JSON.parse(G)}catch(X){console.error(`Failed to parse ArrayBuffer for ${Y}:`,X);return}if(typeof $!=="string")return $;try{return JSON.parse($)}catch(X){let G={value:$.length>100?$.substring(0,100)+"...":$};if(Y)G.field=Y;throw new G0({id:w0("LIBSQL","PARSE_JSON","INVALID_JSON"),domain:M0.STORAGE,category:E0.SYSTEM,text:`Failed to parse JSON${Y?` for field "${Y}"`:""}: ${X instanceof Error?X.message:"Unknown error"}`,details:G},X)}}parseRow($){return{id:$.id,status:$.status,activeVersionId:$.activeVersionId,authorId:$.authorId,visibility:$.visibility??void 0,metadata:this.parseJson($.metadata,"metadata"),favoriteCount:$.favoriteCount===null||$.favoriteCount===void 0?0:Number($.favoriteCount),createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt)}}async getById($){try{let Y=await this.#$.select({tableName:N$,keys:{id:$}});return Y?this.parseRow(Y):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_AGENT_BY_ID","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{agentId:$}},Y)}}async create($){let{agent:Y}=$;try{let X=new Date,G=Y.visibility??(Y.authorId?"private":null);await this.#$.insert({tableName:N$,record:{id:Y.id,status:"draft",activeVersionId:null,authorId:Y.authorId??null,visibility:G,metadata:Y.metadata??null,favoriteCount:0,createdAt:X,updatedAt:X}});let{id:J,authorId:Q,visibility:W,metadata:K,...Z}=Y,H=crypto.randomUUID();await this.createVersion({id:H,agentId:Y.id,versionNumber:1,...Z,changedFields:Object.keys(Z),changeMessage:"Initial version"});let z=await this.getById(Y.id);if(!z)throw new G0({id:w0("LIBSQL","CREATE_AGENT","NOT_FOUND_AFTER_CREATE"),domain:M0.STORAGE,category:E0.SYSTEM,text:`Agent ${Y.id} not found after creation`,details:{agentId:Y.id}});return z}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","CREATE_AGENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{agentId:Y.id}},X)}}async update($){let{id:Y,...X}=$;try{let G=await this.getById(Y);if(!G)throw new G0({id:w0("LIBSQL","UPDATE_AGENT","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,text:`Agent ${Y} not found`,details:{agentId:Y}});let{authorId:J,activeVersionId:Q,metadata:W,status:K,visibility:Z}=X,H={updatedAt:new Date().toISOString()};if(J!==void 0)H.authorId=J;if(Q!==void 0)H.activeVersionId=Q;if(K!==void 0)H.status=K;if(Z!==void 0)H.visibility=Z;if(W!==void 0)H.metadata={...G.metadata,...W};await this.#$.update({tableName:N$,keys:{id:Y},data:H});let z=await this.getById(Y);if(!z)throw new G0({id:w0("LIBSQL","UPDATE_AGENT","NOT_FOUND_AFTER_UPDATE"),domain:M0.STORAGE,category:E0.SYSTEM,text:`Agent ${Y} not found after update`,details:{agentId:Y}});return z}catch(G){if(G instanceof G0)throw G;throw new G0({id:w0("LIBSQL","UPDATE_AGENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{agentId:Y}},G)}}async delete($){try{await this.deleteVersionsByParentId($),await this.#$.delete({tableName:N$,keys:{id:$}})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_AGENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{agentId:$}},Y)}}async list($){let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W,visibility:K,entityIds:Z,pinFavoritedFor:H,favoritedOnly:z}=$||{},{field:V,direction:F}=this.parseOrderBy(G);if(Y<0)throw new G0({id:w0("LIBSQL","LIST_AGENTS","INVALID_PAGE"),domain:M0.STORAGE,category:E0.USER,details:{page:Y}},Error("page must be >= 0"));let L=F4(X,100),{offset:N,perPage:D}=B4(Y,X,L);try{if(Z&&Z.length===0)return{agents:[],total:0,page:Y,perPage:D,hasMore:!1};let A=[],B=[];if(W)A.push("a.status = ?"),B.push(W);if(J!==void 0)A.push("a.authorId = ?"),B.push(J);if(K!==void 0)A.push("a.visibility = ?"),B.push(K);if(Q&&Object.keys(Q).length>0)for(let[x,y]of Object.entries(Q)){if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(x))throw new G0({id:w0("LIBSQL","LIST_AGENTS","INVALID_METADATA_KEY"),domain:M0.STORAGE,category:E0.USER,text:`Invalid metadata key: ${x}. Keys must be alphanumeric with underscores.`,details:{key:x}});A.push(`json_extract(a.metadata, '$.${x}') = ?`),B.push(typeof y==="string"?y:JSON.stringify(y))}if(Z&&Z.length>0){let x=Z.map(()=>"?").join(", ");A.push(`a.id IN (${x})`),B.push(...Z)}let O=H,E=Boolean(O),M="",R=[];if(E&&O){if(M=`LEFT JOIN "${zG}" s ON s."entityType" = 'agent' AND s."entityId" = a.id AND s."userId" = ?`,R.push(O),z)A.push('s."userId" IS NOT NULL')}else if(z)A.push("1=0");let q=A.length>0?`WHERE ${A.join(" AND ")}`:"",_=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${N$}" a ${M} ${q}`,args:[...R,...B]}),P=Number(_.rows?.[0]?.count??0);if(P===0)return{agents:[],total:0,page:Y,perPage:D,hasMore:!1};let w=[];if(E&&O)w.push('(s."userId" IS NOT NULL) DESC');w.push(`a."${V}" ${F}`),w.push('a."id" ASC');let j=`ORDER BY ${w.join(", ")}`,C=X===!1?P:L,k=OD4(N$,"a");return{agents:((await this.#Y.execute({sql:`SELECT ${k} FROM "${N$}" a ${M} ${q} ${j} LIMIT ? OFFSET ?`,args:[...R,...B,C,N]})).rows??[]).map((x)=>this.parseRow(x)),total:P,page:Y,perPage:D,hasMore:X===!1?!1:N+L<P}}catch(A){if(A instanceof G0)throw A;throw new G0({id:w0("LIBSQL","LIST_AGENTS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},A)}}async createVersion($){try{let Y=new Date;return await this.#$.insert({tableName:m5,record:{id:$.id,agentId:$.agentId,versionNumber:$.versionNumber,name:$.name??null,description:$.description??null,instructions:this.serializeInstructions($.instructions),model:$.model,tools:$.tools??null,defaultOptions:$.defaultOptions??null,workflows:$.workflows??null,agents:$.agents??null,integrationTools:$.integrationTools??null,inputProcessors:$.inputProcessors??null,outputProcessors:$.outputProcessors??null,memory:$.memory??null,scorers:$.scorers??null,mcpClients:$.mcpClients??null,requestContextSchema:$.requestContextSchema??null,workspace:$.workspace??null,skills:$.skills??null,skillsFormat:$.skillsFormat??null,browser:$.browser??null,changedFields:$.changedFields??null,changeMessage:$.changeMessage??null,createdAt:Y}}),{...$,createdAt:Y}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","CREATE_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{versionId:$.id,agentId:$.agentId}},Y)}}async getVersion($){try{let Y=await this.#$.select({tableName:m5,keys:{id:$}});if(!Y)return null;return this.parseVersionRow(Y)}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{versionId:$}},Y)}}async getVersionByNumber($,Y){try{let X=await this.#$.selectMany({tableName:m5,whereClause:{sql:"WHERE agentId = ? AND versionNumber = ?",args:[$,Y]},limit:1});if(!X||X.length===0)return null;return this.parseVersionRow(X[0])}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","GET_VERSION_BY_NUMBER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{agentId:$,versionNumber:Y}},X)}}async getLatestVersion($){try{let Y=await this.#$.selectMany({tableName:m5,whereClause:{sql:"WHERE agentId = ?",args:[$]},orderBy:"versionNumber DESC",limit:1});if(!Y||Y.length===0)return null;return this.parseVersionRow(Y[0])}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_LATEST_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{agentId:$}},Y)}}async listVersions($){let{agentId:Y,page:X=0,perPage:G,orderBy:J}=$;if(X<0)throw new G0({id:w0("LIBSQL","LIST_VERSIONS","INVALID_PAGE"),domain:M0.STORAGE,category:E0.USER,details:{page:X}},Error("page must be >= 0"));let Q=F4(G,20),{offset:W,perPage:K}=B4(X,G,Q);try{let{field:Z,direction:H}=this.parseVersionOrderBy(J),z=await this.#$.selectTotalCount({tableName:m5,whereClause:{sql:"WHERE agentId = ?",args:[Y]}});if(z===0)return{versions:[],total:0,page:X,perPage:K,hasMore:!1};let V=G===!1?z:Q;return{versions:(await this.#$.selectMany({tableName:m5,whereClause:{sql:"WHERE agentId = ?",args:[Y]},orderBy:`"${Z}" ${H}`,limit:V,offset:W})).map((N)=>this.parseVersionRow(N)),total:z,page:X,perPage:K,hasMore:G===!1?!1:W+Q<z}}catch(Z){if(Z instanceof G0)throw Z;throw new G0({id:w0("LIBSQL","LIST_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{agentId:Y}},Z)}}async deleteVersion($){try{await this.#$.delete({tableName:m5,keys:{id:$}})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{versionId:$}},Y)}}async deleteVersionsByParentId($){try{let Y=await this.#$.selectMany({tableName:m5,whereClause:{sql:"WHERE agentId = ?",args:[$]}});for(let X of Y)await this.#$.delete({tableName:m5,keys:{id:X.id}})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_VERSIONS_BY_AGENT_ID","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{agentId:$}},Y)}}async countVersions($){try{return await this.#$.selectTotalCount({tableName:m5,whereClause:{sql:"WHERE agentId = ?",args:[$]}})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","COUNT_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{agentId:$}},Y)}}serializeInstructions($){return Array.isArray($)?JSON.stringify($):$}deserializeInstructions($){if(!$)return $;try{let Y=JSON.parse($);if(Array.isArray(Y))return Y}catch{}return $}parseVersionRow($){return{id:$.id,agentId:$.agentId,versionNumber:$.versionNumber,name:$.name,description:$.description,instructions:this.deserializeInstructions($.instructions),model:this.parseJson($.model,"model"),tools:this.parseJson($.tools,"tools"),defaultOptions:this.parseJson($.defaultOptions,"defaultOptions"),workflows:this.parseJson($.workflows,"workflows"),agents:this.parseJson($.agents,"agents"),integrationTools:this.parseJson($.integrationTools,"integrationTools"),inputProcessors:this.parseJson($.inputProcessors,"inputProcessors"),outputProcessors:this.parseJson($.outputProcessors,"outputProcessors"),memory:this.parseJson($.memory,"memory"),scorers:this.parseJson($.scorers,"scorers"),mcpClients:this.parseJson($.mcpClients,"mcpClients"),requestContextSchema:this.parseJson($.requestContextSchema,"requestContextSchema"),workspace:this.parseJson($.workspace,"workspace"),skills:this.parseJson($.skills,"skills"),skillsFormat:$.skillsFormat,browser:this.parseJson($.browser,"browser"),changedFields:this.parseJson($.changedFields,"changedFields"),changeMessage:$.changeMessage,createdAt:new Date($.createdAt)}}};function Qp0($){if(typeof $==="object"&&$!=null)return JSON.stringify($);return $??null}function $Y0($){if($==null)return;if(typeof $==="string")try{return JSON.parse($)}catch{return $}return $}function BD4($){return{id:String($.id),status:String($.status),toolName:String($.tool_name),toolCallId:String($.tool_call_id),args:$Y0($.args)??{},agentId:String($.agent_id),threadId:$.thread_id!=null?String($.thread_id):void 0,resourceId:$.resource_id!=null?String($.resource_id):void 0,runId:String($.run_id),result:$Y0($.result),error:$Y0($.error),suspendPayload:$Y0($.suspend_payload),retryCount:Number($.retry_count),maxRetries:Number($.max_retries),timeoutMs:Number($.timeout_ms),createdAt:new Date(String($.createdAt)),startedAt:$.startedAt?new Date(String($.startedAt)):void 0,suspendedAt:$.suspendedAt?new Date(String($.suspendedAt)):void 0,completedAt:$.completedAt?new Date(String($.completedAt)):void 0}}var wZ9=class extends ag{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:l7,schema:F5[l7]}),await this.#$.alterTable({tableName:l7,schema:F5[l7],ifNotExists:["suspend_payload","suspendedAt"]})}async dangerouslyClearAll(){await this.#$.deleteData({tableName:l7})}async createTask($){await this.#$.insert({tableName:l7,record:{id:$.id,tool_call_id:$.toolCallId,tool_name:$.toolName,agent_id:$.agentId,thread_id:$.threadId??null,resource_id:$.resourceId??null,run_id:$.runId,status:$.status,args:$.args,result:$.result??null,error:$.error??null,suspend_payload:$.suspendPayload??null,retry_count:$.retryCount,max_retries:$.maxRetries,timeout_ms:$.timeoutMs,createdAt:$.createdAt.toISOString(),startedAt:$.startedAt?.toISOString()??null,suspendedAt:$.suspendedAt?.toISOString()??null,completedAt:$.completedAt?.toISOString()??null}})}async updateTask($,Y){let X=[],G=[];if("status"in Y)X.push("status = ?"),G.push(Y.status);if("result"in Y)X.push("result = jsonb(?)"),G.push(Qp0(Y.result));if("error"in Y)X.push("error = jsonb(?)"),G.push(Qp0(Y.error));if("suspendPayload"in Y)X.push("suspend_payload = jsonb(?)"),G.push(Qp0(Y.suspendPayload));if("retryCount"in Y)X.push("retry_count = ?"),G.push(Y.retryCount);if("startedAt"in Y)X.push("startedAt = ?"),G.push(Y.startedAt?.toISOString()??null);if("suspendedAt"in Y)X.push("suspendedAt = ?"),G.push(Y.suspendedAt?.toISOString()??null);if("completedAt"in Y)X.push("completedAt = ?"),G.push(Y.completedAt?.toISOString()??null);if(X.length===0)return;G.push($),await this.#Y.execute({sql:`UPDATE ${l7} SET ${X.join(", ")} WHERE id = ?`,args:G})}async getTask($){let X=(await this.#Y.execute({sql:`SELECT ${E4(l7)} FROM ${l7} WHERE id = ?`,args:[$]})).rows[0];return X?BD4(X):null}async listTasks($){let Y=[],X=[];if($.status){let V=Array.isArray($.status)?$.status:[$.status];Y.push(`status IN (${V.map(()=>"?").join(", ")})`),X.push(...V)}if($.agentId)Y.push("agent_id = ?"),X.push($.agentId);if($.threadId)Y.push("thread_id = ?"),X.push($.threadId);if($.runId)Y.push("run_id = ?"),X.push($.runId);if($.resourceId)Y.push("resource_id = ?"),X.push($.resourceId);if($.toolName)Y.push("tool_name = ?"),X.push($.toolName);if($.toolCallId)Y.push("tool_call_id = ?"),X.push($.toolCallId);let G=$.dateFilterBy==="startedAt"?"startedAt":$.dateFilterBy==="suspendedAt"?"suspendedAt":$.dateFilterBy==="completedAt"?"completedAt":"createdAt";if($.fromDate)Y.push(`${G} >= ?`),X.push($.fromDate.toISOString());if($.toDate)Y.push(`${G} < ?`),X.push($.toDate.toISOString());let J=Y.length>0?`WHERE ${Y.join(" AND ")}`:"",Q=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${l7} ${J}`,args:[...X]}),W=Number(Q.rows[0]?.count??0),K=$.orderBy==="startedAt"?"startedAt":$.orderBy==="suspendedAt"?"suspendedAt":$.orderBy==="completedAt"?"completedAt":"createdAt",Z=$.orderDirection==="desc"?"DESC":"ASC",H=`SELECT ${E4(l7)} FROM ${l7} ${J} ORDER BY ${K} ${Z}`;if($.perPage!=null){if(H+=" LIMIT ?",X.push($.perPage),$.page!=null)H+=" OFFSET ?",X.push($.page*$.perPage)}return{tasks:(await this.#Y.execute({sql:H,args:X})).rows.map((V)=>BD4(V)),total:W}}async deleteTask($){await this.#Y.execute({sql:`DELETE FROM ${l7} WHERE id = ?`,args:[$]})}async deleteTasks($){let Y=[],X=[];if($.status){let J=Array.isArray($.status)?$.status:[$.status];Y.push(`status IN (${J.map(()=>"?").join(", ")})`),X.push(...J)}let G=$.dateFilterBy==="startedAt"?"startedAt":$.dateFilterBy==="suspendedAt"?"suspendedAt":$.dateFilterBy==="completedAt"?"completedAt":"createdAt";if($.fromDate)Y.push(`${G} >= ?`),X.push($.fromDate.toISOString());if($.toDate)Y.push(`${G} < ?`),X.push($.toDate.toISOString());if($.agentId)Y.push("agent_id = ?"),X.push($.agentId);if($.runId)Y.push("run_id = ?"),X.push($.runId);if(Y.length===0)return;await this.#Y.execute({sql:`DELETE FROM ${l7} WHERE ${Y.join(" AND ")}`,args:X})}async getRunningCount(){let $=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${l7} WHERE status = 'running'`,args:[]});return Number($.rows[0]?.count??0)}async getRunningCountByAgent($){let Y=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${l7} WHERE status = 'running' AND agent_id = ?`,args:[$]});return Number(Y.rows[0]?.count??0)}},_Z9=class extends sg{#$;#Y;static MANAGED_TABLES=[KJ];constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:KJ,schema:cg})}async put($){let Y=$.createdAt??new Date;await this.#Y.execute({sql:`INSERT OR IGNORE INTO "${KJ}" ("hash", "content", "size", "mimeType", "createdAt") VALUES (?, ?, ?, ?, ?)`,args:[$.hash,$.content,$.size,$.mimeType??null,Y.toISOString()]})}async get($){let Y=await this.#Y.execute({sql:`SELECT ${E4(KJ)} FROM "${KJ}" WHERE "hash" = ?`,args:[$]});if(!Y.rows.length)return null;return this.#X(Y.rows[0])}async has($){return(await this.#Y.execute({sql:`SELECT 1 FROM "${KJ}" WHERE "hash" = ? LIMIT 1`,args:[$]})).rows.length>0}async delete($){return(await this.#Y.execute({sql:`DELETE FROM "${KJ}" WHERE "hash" = ?`,args:[$]})).rowsAffected>0}async putMany($){if($.length===0)return;await this.#$.batchInsert({tableName:KJ,records:$.map((Y)=>({hash:Y.hash,content:Y.content,size:Y.size,mimeType:Y.mimeType??null,createdAt:(Y.createdAt??new Date).toISOString()}))})}async getMany($){let Y=new Map;if($.length===0)return Y;let X=500;for(let G=0;G<$.length;G+=X){let J=$.slice(G,G+X),Q=J.map(()=>"?").join(", "),W=await this.#Y.execute({sql:`SELECT ${E4(KJ)} FROM "${KJ}" WHERE "hash" IN (${Q})`,args:J});for(let K of W.rows){let Z=this.#X(K);Y.set(Z.hash,Z)}}return Y}async dangerouslyClearAll(){await this.#$.deleteData({tableName:KJ})}#X($){return{hash:$.hash,content:$.content,size:Number($.size),mimeType:$.mimeType||void 0,createdAt:new Date($.createdAt)}}},jZ9=class extends og{#$;#Y;static MANAGED_TABLES=[VG,hZ];constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:VG,schema:F5[VG]}),await this.#$.createTable({tableName:hZ,schema:F5[hZ]}),await this.#Y.batch([{sql:`CREATE UNIQUE INDEX IF NOT EXISTS idx_channel_installations_webhook ON "${VG}" ("webhookId")`,args:[]},{sql:`CREATE INDEX IF NOT EXISTS idx_channel_installations_platform_agent ON "${VG}" ("platform", "agentId")`,args:[]}],"write")}async dangerouslyClearAll(){await this.#$.deleteData({tableName:VG}),await this.#$.deleteData({tableName:hZ})}async saveInstallation($){let Y=new Date().toISOString();await this.#Y.execute({sql:`
        INSERT INTO "${VG}" (id, platform, agentId, status, webhookId, data, configHash, error, createdAt, updatedAt)
        VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
        ON CONFLICT(id) DO UPDATE SET
          platform = excluded.platform,
          agentId = excluded.agentId,
          status = excluded.status,
          webhookId = excluded.webhookId,
          data = excluded.data,
          configHash = excluded.configHash,
          error = excluded.error,
          updatedAt = excluded.updatedAt
      `,args:[$.id,$.platform,$.agentId,$.status,$.webhookId??null,JSON.stringify($.data),$.configHash??null,$.error??null,$.createdAt?.toISOString()??Y,Y]})}async getInstallation($){let X=(await this.#Y.execute({sql:`SELECT * FROM "${VG}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#X(X):null}async getInstallationByAgent($,Y){let G=(await this.#Y.execute({sql:`SELECT * FROM "${VG}" WHERE platform = ? AND agentId = ? ORDER BY CASE status WHEN 'active' THEN 0 WHEN 'pending' THEN 1 ELSE 2 END, updatedAt DESC LIMIT 1`,args:[$,Y]})).rows?.[0];return G?this.#X(G):null}async getInstallationByWebhookId($){let X=(await this.#Y.execute({sql:`SELECT * FROM "${VG}" WHERE webhookId = ?`,args:[$]})).rows?.[0];return X?this.#X(X):null}async listInstallations($){return(await this.#Y.execute({sql:`SELECT * FROM "${VG}" WHERE platform = ? ORDER BY createdAt DESC`,args:[$]})).rows.map((X)=>this.#X(X))}async deleteInstallation($){await this.#Y.execute({sql:`DELETE FROM "${VG}" WHERE id = ?`,args:[$]})}async saveConfig($){await this.#Y.execute({sql:`
        INSERT INTO "${hZ}" (platform, data, updatedAt)
        VALUES (?, ?, ?)
        ON CONFLICT(platform) DO UPDATE SET
          data = excluded.data,
          updatedAt = excluded.updatedAt
      `,args:[$.platform,JSON.stringify($.data),$.updatedAt.toISOString()]})}async getConfig($){let X=(await this.#Y.execute({sql:`SELECT * FROM "${hZ}" WHERE platform = ?`,args:[$]})).rows?.[0];if(!X)return null;return{platform:X.platform,data:JSON.parse(X.data||"{}"),updatedAt:new Date(X.updatedAt)}}async deleteConfig($){await this.#Y.execute({sql:`DELETE FROM "${hZ}" WHERE platform = ?`,args:[$]})}#X($){return{id:$.id,platform:$.platform,agentId:$.agentId,status:$.status,webhookId:$.webhookId||void 0,data:JSON.parse($.data||"{}"),configHash:$.configHash||void 0,error:$.error||void 0,createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt)}}};function D5($){return $===void 0||$===null?null:JSON.stringify($)}var TZ9=class extends tg{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:D8,schema:lg}),await this.#$.createTable({tableName:P8,schema:tj}),await this.#$.createTable({tableName:lY,schema:ig}),await this.#X(D8,"requestContextSchema","TEXT"),await this.#X(D8,"tags","TEXT"),await this.#X(D8,"targetType","TEXT"),await this.#X(D8,"targetIds","TEXT"),await this.#X(D8,"scorerIds","TEXT"),await this.#X(P8,"requestContext","TEXT"),await this.#X(P8,"source","TEXT"),await this.#X(P8,"expectedTrajectory","TEXT"),await this.#Y.batch([{sql:`CREATE INDEX IF NOT EXISTS idx_dataset_items_dataset_validto ON "${P8}" ("datasetId", "validTo")`,args:[]},{sql:`CREATE INDEX IF NOT EXISTS idx_dataset_items_dataset_version ON "${P8}" ("datasetId", "datasetVersion")`,args:[]},{sql:`CREATE INDEX IF NOT EXISTS idx_dataset_items_dataset_validto_deleted ON "${P8}" ("datasetId", "validTo", "isDeleted")`,args:[]},{sql:`CREATE INDEX IF NOT EXISTS idx_dataset_versions_dataset_version ON "${lY}" ("datasetId", "version")`,args:[]},{sql:`CREATE UNIQUE INDEX IF NOT EXISTS idx_dataset_versions_dataset_version_unique ON "${lY}" ("datasetId", "version")`,args:[]}],"write")}async#X($,Y,X){if(!await this.#$.hasColumn($,Y))await this.#Y.execute({sql:`ALTER TABLE "${$}" ADD COLUMN "${Y}" ${X}`,args:[]})}async dangerouslyClearAll(){await this.#$.deleteData({tableName:lY}),await this.#$.deleteData({tableName:P8}),await this.#$.deleteData({tableName:D8})}transformDatasetRow($){return{id:$.id,name:$.name,description:$.description,metadata:$.metadata?N8($.metadata):void 0,inputSchema:$.inputSchema?N8($.inputSchema):void 0,groundTruthSchema:$.groundTruthSchema?N8($.groundTruthSchema):void 0,requestContextSchema:$.requestContextSchema?N8($.requestContextSchema):void 0,tags:$.tags?N8($.tags):void 0,targetType:$.targetType||void 0,targetIds:$.targetIds?N8($.targetIds):void 0,scorerIds:$.scorerIds?N8($.scorerIds):void 0,version:$.version,createdAt:i7($.createdAt),updatedAt:i7($.updatedAt)}}transformItemRow($){return{id:$.id,datasetId:$.datasetId,datasetVersion:$.datasetVersion,input:N8($.input),groundTruth:$.groundTruth?N8($.groundTruth):void 0,expectedTrajectory:$.expectedTrajectory?N8($.expectedTrajectory):void 0,requestContext:$.requestContext?N8($.requestContext):void 0,metadata:$.metadata?N8($.metadata):void 0,source:$.source?N8($.source):void 0,createdAt:i7($.createdAt),updatedAt:i7($.updatedAt)}}transformItemRowFull($){return{id:$.id,datasetId:$.datasetId,datasetVersion:$.datasetVersion,validTo:$.validTo,isDeleted:Boolean($.isDeleted),input:N8($.input),groundTruth:$.groundTruth?N8($.groundTruth):void 0,expectedTrajectory:$.expectedTrajectory?N8($.expectedTrajectory):void 0,requestContext:$.requestContext?N8($.requestContext):void 0,metadata:$.metadata?N8($.metadata):void 0,source:$.source?N8($.source):void 0,createdAt:i7($.createdAt),updatedAt:i7($.updatedAt)}}transformDatasetVersionRow($){return{id:$.id,datasetId:$.datasetId,version:$.version,createdAt:i7($.createdAt)}}async createDataset($){try{let Y=crypto.randomUUID(),X=new Date,G=X.toISOString();return await this.#$.insert({tableName:D8,record:{id:Y,name:$.name,description:$.description??null,metadata:$.metadata,inputSchema:$.inputSchema??null,groundTruthSchema:$.groundTruthSchema??null,requestContextSchema:$.requestContextSchema??null,targetType:$.targetType??null,targetIds:$.targetIds?JSON.stringify($.targetIds):null,scorerIds:$.scorerIds?JSON.stringify($.scorerIds):null,version:0,createdAt:G,updatedAt:G}}),{id:Y,name:$.name,description:$.description,metadata:$.metadata,inputSchema:$.inputSchema??void 0,groundTruthSchema:$.groundTruthSchema??void 0,requestContextSchema:$.requestContextSchema??void 0,targetType:$.targetType??void 0,targetIds:$.targetIds??void 0,scorerIds:$.scorerIds??void 0,version:0,createdAt:X,updatedAt:X}}catch(Y){throw new G0({id:w0("LIBSQL","CREATE_DATASET","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getDatasetById({id:$}){try{let Y=await this.#Y.execute({sql:`SELECT ${E4(D8)} FROM ${D8} WHERE id = ?`,args:[$]});return Y.rows?.[0]?this.transformDatasetRow(Y.rows[0]):null}catch(Y){throw new G0({id:w0("LIBSQL","GET_DATASET","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async _doUpdateDataset($){try{let Y=await this.getDatasetById({id:$.id});if(!Y)throw new G0({id:w0("LIBSQL","UPDATE_DATASET","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,details:{datasetId:$.id}});let X=new Date().toISOString(),G=["updatedAt = ?"],J=[X];if($.name!==void 0)G.push("name = ?"),J.push($.name);if($.description!==void 0)G.push("description = ?"),J.push($.description);if($.metadata!==void 0)G.push("metadata = ?"),J.push(JSON.stringify($.metadata));if($.inputSchema!==void 0)G.push("inputSchema = ?"),J.push($.inputSchema===null?null:JSON.stringify($.inputSchema));if($.groundTruthSchema!==void 0)G.push("groundTruthSchema = ?"),J.push($.groundTruthSchema===null?null:JSON.stringify($.groundTruthSchema));if($.requestContextSchema!==void 0)G.push("requestContextSchema = ?"),J.push($.requestContextSchema===null?null:JSON.stringify($.requestContextSchema));if($.tags!==void 0)G.push("tags = ?"),J.push($.tags===null?null:JSON.stringify($.tags));if($.targetType!==void 0)G.push("targetType = ?"),J.push($.targetType===null?null:$.targetType);if($.targetIds!==void 0)G.push("targetIds = ?"),J.push($.targetIds===null?null:JSON.stringify($.targetIds));if($.scorerIds!==void 0)G.push("scorerIds = ?"),J.push($.scorerIds===null?null:JSON.stringify($.scorerIds));return J.push($.id),await this.#Y.execute({sql:`UPDATE ${D8} SET ${G.join(", ")} WHERE id = ?`,args:J}),{...Y,name:$.name??Y.name,description:$.description??Y.description,metadata:$.metadata??Y.metadata,inputSchema:($.inputSchema!==void 0?$.inputSchema:Y.inputSchema)??void 0,groundTruthSchema:($.groundTruthSchema!==void 0?$.groundTruthSchema:Y.groundTruthSchema)??void 0,requestContextSchema:($.requestContextSchema!==void 0?$.requestContextSchema:Y.requestContextSchema)??void 0,tags:($.tags!==void 0?$.tags:Y.tags)??void 0,targetType:($.targetType!==void 0?$.targetType:Y.targetType)??void 0,targetIds:($.targetIds!==void 0?$.targetIds:Y.targetIds)??void 0,scorerIds:($.scorerIds!==void 0?$.scorerIds:Y.scorerIds)??void 0,updatedAt:new Date(X)}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","UPDATE_DATASET","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteDataset({id:$}){try{try{await this.#Y.execute({sql:`DELETE FROM ${c7} WHERE experimentId IN (SELECT id FROM ${iY} WHERE datasetId = ?)`,args:[$]})}catch{}try{await this.#Y.execute({sql:`UPDATE ${iY} SET datasetId = NULL, datasetVersion = NULL WHERE datasetId = ?`,args:[$]})}catch{}await this.#Y.batch([{sql:`DELETE FROM ${lY} WHERE datasetId = ?`,args:[$]},{sql:`DELETE FROM ${P8} WHERE datasetId = ?`,args:[$]},{sql:`DELETE FROM ${D8} WHERE id = ?`,args:[$]}],"write")}catch(Y){throw new G0({id:w0("LIBSQL","DELETE_DATASET","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listDatasets($){try{let{page:Y,perPage:X}=$.pagination,G=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${D8}`,args:[]}),J=Number(G.rows?.[0]?.count??0);if(J===0)return{datasets:[],pagination:{total:0,page:Y,perPage:X,hasMore:!1}};let Q=F4(X,100),{offset:W,perPage:K}=B4(Y,X,Q),Z=X===!1?J:Q,H=X===!1?J:W+Q;return{datasets:(await this.#Y.execute({sql:`SELECT ${E4(D8)} FROM ${D8} ORDER BY createdAt DESC, id ASC LIMIT ? OFFSET ?`,args:[Z,W]})).rows?.map((V)=>this.transformDatasetRow(V))??[],pagination:{total:J,page:Y,perPage:K,hasMore:H<J}}}catch(Y){throw new G0({id:w0("LIBSQL","LIST_DATASETS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async _doAddItem($){try{let Y=crypto.randomUUID(),X=crypto.randomUUID(),G=new Date,J=G.toISOString(),Q=await this.#Y.batch([{sql:`UPDATE ${D8} SET version = version + 1 WHERE id = ? RETURNING version`,args:[$.datasetId]},{sql:`INSERT INTO ${P8} (id, datasetId, datasetVersion, validTo, isDeleted, input, groundTruth, expectedTrajectory, requestContext, metadata, source, createdAt, updatedAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), NULL, 0, jsonb(?), jsonb(?), jsonb(?), jsonb(?), jsonb(?), jsonb(?), ?, ?)`,args:[Y,$.datasetId,$.datasetId,D5($.input),D5($.groundTruth),D5($.expectedTrajectory),D5($.requestContext),D5($.metadata),D5($.source),J,J]},{sql:`INSERT INTO ${lY} (id, datasetId, version, createdAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), ?)`,args:[X,$.datasetId,$.datasetId,J]}],"write"),W=Number(Q[0].rows[0].version);return{id:Y,datasetId:$.datasetId,datasetVersion:W,input:$.input,groundTruth:$.groundTruth,expectedTrajectory:$.expectedTrajectory,requestContext:$.requestContext,metadata:$.metadata,source:$.source,createdAt:G,updatedAt:G}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","ADD_ITEM","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async _doUpdateItem($){try{let Y=await this.getItemById({id:$.id});if(!Y)throw new G0({id:w0("LIBSQL","UPDATE_ITEM","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,details:{itemId:$.id}});if(Y.datasetId!==$.datasetId)throw new G0({id:w0("LIBSQL","UPDATE_ITEM","DATASET_MISMATCH"),domain:M0.STORAGE,category:E0.USER,details:{itemId:$.id,expectedDatasetId:$.datasetId,actualDatasetId:Y.datasetId}});let X=crypto.randomUUID(),G=new Date,J=G.toISOString(),Q=$.input!==void 0?$.input:Y.input,W=$.groundTruth!==void 0?$.groundTruth:Y.groundTruth,K=$.expectedTrajectory!==void 0?$.expectedTrajectory:Y.expectedTrajectory,Z=$.requestContext!==void 0?$.requestContext:Y.requestContext,H=$.metadata!==void 0?$.metadata:Y.metadata,z=$.source!==void 0?$.source:Y.source,V=await this.#Y.batch([{sql:`UPDATE ${D8} SET version = version + 1 WHERE id = ? RETURNING version`,args:[$.datasetId]},{sql:`UPDATE ${P8} SET validTo = (SELECT version FROM ${D8} WHERE id = ?) WHERE id = ? AND validTo IS NULL AND isDeleted = 0`,args:[$.datasetId,$.id]},{sql:`INSERT INTO ${P8} (id, datasetId, datasetVersion, validTo, isDeleted, input, groundTruth, expectedTrajectory, requestContext, metadata, source, createdAt, updatedAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), NULL, 0, jsonb(?), jsonb(?), jsonb(?), jsonb(?), jsonb(?), jsonb(?), ?, ?)`,args:[$.id,$.datasetId,$.datasetId,D5(Q),D5(W),D5(K),D5(Z),D5(H),D5(z),Y.createdAt.toISOString(),J]},{sql:`INSERT INTO ${lY} (id, datasetId, version, createdAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), ?)`,args:[X,$.datasetId,$.datasetId,J]}],"write"),F=Number(V[0].rows[0].version);return{...Y,datasetVersion:F,input:Q,groundTruth:W,expectedTrajectory:K,requestContext:Z,metadata:H,source:z,updatedAt:G}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","UPDATE_ITEM","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async _doDeleteItem({id:$,datasetId:Y}){try{let X=await this.getItemById({id:$});if(!X)return;if(X.datasetId!==Y)throw new G0({id:w0("LIBSQL","DELETE_ITEM","DATASET_MISMATCH"),domain:M0.STORAGE,category:E0.USER,details:{itemId:$,expectedDatasetId:Y,actualDatasetId:X.datasetId}});let G=crypto.randomUUID(),J=new Date().toISOString();await this.#Y.batch([{sql:`UPDATE ${D8} SET version = version + 1 WHERE id = ? RETURNING version`,args:[Y]},{sql:`UPDATE ${P8} SET validTo = (SELECT version FROM ${D8} WHERE id = ?) WHERE id = ? AND validTo IS NULL AND isDeleted = 0`,args:[Y,$]},{sql:`INSERT INTO ${P8} (id, datasetId, datasetVersion, validTo, isDeleted, input, groundTruth, requestContext, metadata, source, createdAt, updatedAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), NULL, 1, jsonb(?), jsonb(?), jsonb(?), jsonb(?), jsonb(?), ?, ?)`,args:[$,Y,Y,D5(X.input),D5(X.groundTruth),D5(X.requestContext),D5(X.metadata),D5(X.source),X.createdAt.toISOString(),J]},{sql:`INSERT INTO ${lY} (id, datasetId, version, createdAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), ?)`,args:[G,Y,Y,J]}],"write")}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","DELETE_ITEM","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async getItemById($){try{let Y;if($.datasetVersion!==void 0)Y=await this.#Y.execute({sql:`SELECT ${E4(P8)} FROM ${P8} WHERE id = ? AND datasetVersion = ? AND isDeleted = 0`,args:[$.id,$.datasetVersion]});else Y=await this.#Y.execute({sql:`SELECT ${E4(P8)} FROM ${P8} WHERE id = ? AND validTo IS NULL AND isDeleted = 0`,args:[$.id]});return Y.rows?.[0]?this.transformItemRow(Y.rows[0]):null}catch(Y){throw new G0({id:w0("LIBSQL","GET_ITEM","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getItemsByVersion({datasetId:$,version:Y}){try{return(await this.#Y.execute({sql:`SELECT ${E4(P8)} FROM ${P8} WHERE datasetId = ? AND datasetVersion <= ? AND (validTo IS NULL OR validTo > ?) AND isDeleted = 0 ORDER BY createdAt DESC, id ASC`,args:[$,Y,Y]})).rows?.map((G)=>this.transformItemRow(G))??[]}catch(X){throw new G0({id:w0("LIBSQL","GET_ITEMS_BY_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async getItemHistory($){try{return(await this.#Y.execute({sql:`SELECT ${E4(P8)} FROM ${P8} WHERE id = ? ORDER BY datasetVersion DESC`,args:[$]})).rows?.map((X)=>this.transformItemRowFull(X))??[]}catch(Y){throw new G0({id:w0("LIBSQL","GET_ITEM_HISTORY","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listItems($){try{let{page:Y,perPage:X}=$.pagination;if($.version!==void 0){let N=["datasetId = ?","datasetVersion <= ?","(validTo IS NULL OR validTo > ?)","isDeleted = 0"],D=[$.datasetId,$.version,$.version];if($.search){N.push("(LOWER(json(input)) LIKE ? OR LOWER(COALESCE(json(groundTruth), '')) LIKE ?)");let w=`%${$.search.toLowerCase()}%`;D.push(w,w)}let A=`WHERE ${N.join(" AND ")}`,B=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${P8} ${A}`,args:D}),O=Number(B.rows?.[0]?.count??0);if(O===0)return{items:[],pagination:{total:0,page:Y,perPage:X,hasMore:!1}};let E=F4(X,100),{offset:M,perPage:R}=B4(Y,X,E),q=X===!1?O:E,_=X===!1?O:M+E;return{items:(await this.#Y.execute({sql:`SELECT ${E4(P8)} FROM ${P8} ${A} ORDER BY createdAt DESC, id ASC LIMIT ? OFFSET ?`,args:[...D,q,M]})).rows?.map((w)=>this.transformItemRow(w))??[],pagination:{total:O,page:Y,perPage:R,hasMore:_<O}}}let G=["datasetId = ?","validTo IS NULL","isDeleted = 0"],J=[$.datasetId];if($.search){G.push("(LOWER(json(input)) LIKE ? OR LOWER(COALESCE(json(groundTruth), '')) LIKE ?)");let N=`%${$.search.toLowerCase()}%`;J.push(N,N)}let Q=`WHERE ${G.join(" AND ")}`,W=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${P8} ${Q}`,args:J}),K=Number(W.rows?.[0]?.count??0);if(K===0)return{items:[],pagination:{total:0,page:Y,perPage:X,hasMore:!1}};let Z=F4(X,100),{offset:H,perPage:z}=B4(Y,X,Z),V=X===!1?K:Z,F=X===!1?K:H+Z;return{items:(await this.#Y.execute({sql:`SELECT ${E4(P8)} FROM ${P8} ${Q} ORDER BY createdAt DESC, id ASC LIMIT ? OFFSET ?`,args:[...J,V,H]})).rows?.map((N)=>this.transformItemRow(N))??[],pagination:{total:K,page:Y,perPage:z,hasMore:F<K}}}catch(Y){throw new G0({id:w0("LIBSQL","LIST_ITEMS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async createDatasetVersion($,Y){try{let X=crypto.randomUUID(),G=new Date,J=G.toISOString();return await this.#$.insert({tableName:lY,record:{id:X,datasetId:$,version:Y,createdAt:J}}),{id:X,datasetId:$,version:Y,createdAt:G}}catch(X){throw new G0({id:w0("LIBSQL","CREATE_DATASET_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async listDatasetVersions($){try{let{page:Y,perPage:X}=$.pagination,G=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${lY} WHERE datasetId = ?`,args:[$.datasetId]}),J=Number(G.rows?.[0]?.count??0);if(J===0)return{versions:[],pagination:{total:0,page:Y,perPage:X,hasMore:!1}};let Q=F4(X,100),{offset:W,perPage:K}=B4(Y,X,Q),Z=X===!1?J:Q,H=X===!1?J:W+Q;return{versions:(await this.#Y.execute({sql:`SELECT ${E4(lY)} FROM ${lY} WHERE datasetId = ? ORDER BY version DESC LIMIT ? OFFSET ?`,args:[$.datasetId,Z,W]})).rows?.map((V)=>this.transformDatasetVersionRow(V))??[],pagination:{total:J,page:Y,perPage:K,hasMore:H<J}}}catch(Y){throw new G0({id:w0("LIBSQL","LIST_DATASET_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async _doBatchInsertItems($){try{if(!await this.getDatasetById({id:$.datasetId}))throw new G0({id:w0("LIBSQL","BULK_ADD_ITEMS","DATASET_NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,details:{datasetId:$.datasetId}});let X=new Date,G=X.toISOString(),J=crypto.randomUUID(),Q=[{sql:`UPDATE ${D8} SET version = version + 1 WHERE id = ? RETURNING version`,args:[$.datasetId]}],W=[];for(let H of $.items){let z=crypto.randomUUID();W.push({id:z,input:H}),Q.push({sql:`INSERT INTO ${P8} (id, datasetId, datasetVersion, validTo, isDeleted, input, groundTruth, expectedTrajectory, requestContext, metadata, source, createdAt, updatedAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), NULL, 0, jsonb(?), jsonb(?), jsonb(?), jsonb(?), jsonb(?), jsonb(?), ?, ?)`,args:[z,$.datasetId,$.datasetId,D5(H.input),D5(H.groundTruth),D5(H.expectedTrajectory),D5(H.requestContext),D5(H.metadata),D5(H.source),G,G]})}Q.push({sql:`INSERT INTO ${lY} (id, datasetId, version, createdAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), ?)`,args:[J,$.datasetId,$.datasetId,G]});let K=await this.#Y.batch(Q,"write"),Z=Number(K[0].rows[0].version);return W.map(({id:H,input:z})=>({id:H,datasetId:$.datasetId,datasetVersion:Z,input:z.input,groundTruth:z.groundTruth,expectedTrajectory:z.expectedTrajectory,requestContext:z.requestContext,metadata:z.metadata,source:z.source,createdAt:X,updatedAt:X}))}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","BULK_ADD_ITEMS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async _doBatchDeleteItems($){try{if(!await this.getDatasetById({id:$.datasetId}))throw new G0({id:w0("LIBSQL","BULK_DELETE_ITEMS","DATASET_NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,details:{datasetId:$.datasetId}});let X=[];for(let W of $.itemIds){let K=await this.getItemById({id:W});if(K&&K.datasetId===$.datasetId)X.push(K)}if(X.length===0)return;let G=new Date().toISOString(),J=crypto.randomUUID(),Q=[{sql:`UPDATE ${D8} SET version = version + 1 WHERE id = ? RETURNING version`,args:[$.datasetId]}];for(let W of X)Q.push({sql:`UPDATE ${P8} SET validTo = (SELECT version FROM ${D8} WHERE id = ?) WHERE id = ? AND validTo IS NULL AND isDeleted = 0`,args:[$.datasetId,W.id]}),Q.push({sql:`INSERT INTO ${P8} (id, datasetId, datasetVersion, validTo, isDeleted, input, groundTruth, requestContext, metadata, source, createdAt, updatedAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), NULL, 1, jsonb(?), jsonb(?), jsonb(?), jsonb(?), jsonb(?), ?, ?)`,args:[W.id,$.datasetId,$.datasetId,D5(W.input),D5(W.groundTruth),D5(W.requestContext),D5(W.metadata),D5(W.source),W.createdAt.toISOString(),G]});Q.push({sql:`INSERT INTO ${lY} (id, datasetId, version, createdAt) VALUES (?, ?, (SELECT version FROM ${D8} WHERE id = ?), ?)`,args:[J,$.datasetId,$.datasetId,G]}),await this.#Y.batch(Q,"write")}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","BULK_DELETE_ITEMS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}},IZ9=class extends eg{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:iY,schema:ej}),await this.#$.createTable({tableName:c7,schema:$T}),await this.#$.alterTable({tableName:iY,schema:ej,ifNotExists:["agentVersion"]}),await this.#$.alterTable({tableName:c7,schema:$T,ifNotExists:["status","tags"]}),await this.#Y.batch([{sql:`CREATE INDEX IF NOT EXISTS idx_experiments_datasetid ON "${iY}" ("datasetId")`,args:[]},{sql:`CREATE INDEX IF NOT EXISTS idx_experiment_results_experimentid ON "${c7}" ("experimentId")`,args:[]},{sql:`CREATE UNIQUE INDEX IF NOT EXISTS idx_experiment_results_exp_item ON "${c7}" ("experimentId", "itemId")`,args:[]}],"write")}async dangerouslyClearAll(){await this.#$.deleteData({tableName:c7}),await this.#$.deleteData({tableName:iY})}transformExperimentRow($){return{id:$.id,datasetId:$.datasetId??null,datasetVersion:$.datasetVersion!=null?$.datasetVersion:null,agentVersion:$.agentVersion??null,targetType:$.targetType,targetId:$.targetId,name:$.name??void 0,description:$.description??void 0,metadata:$.metadata?N8($.metadata):void 0,status:$.status,totalItems:$.totalItems,succeededCount:$.succeededCount,failedCount:$.failedCount,skippedCount:$.skippedCount??0,startedAt:$.startedAt?i7($.startedAt):null,completedAt:$.completedAt?i7($.completedAt):null,createdAt:i7($.createdAt),updatedAt:i7($.updatedAt)}}transformExperimentResultRow($){return{id:$.id,experimentId:$.experimentId,itemId:$.itemId,itemDatasetVersion:$.itemDatasetVersion!=null?$.itemDatasetVersion:null,input:N8($.input),output:$.output?N8($.output):null,groundTruth:$.groundTruth?N8($.groundTruth):null,error:$.error?N8($.error):null,startedAt:i7($.startedAt),completedAt:i7($.completedAt),retryCount:$.retryCount,traceId:$.traceId??null,status:$.status??null,tags:$.tags?N8($.tags):null,createdAt:i7($.createdAt)}}async createExperiment($){try{let Y=$.id??crypto.randomUUID(),X=new Date,G=X.toISOString();return await this.#$.insert({tableName:iY,record:{id:Y,datasetId:$.datasetId??null,datasetVersion:$.datasetVersion??null,agentVersion:$.agentVersion??null,targetType:$.targetType,targetId:$.targetId,name:$.name??null,description:$.description??null,metadata:$.metadata??null,status:"pending",totalItems:$.totalItems,succeededCount:0,failedCount:0,skippedCount:0,startedAt:null,completedAt:null,createdAt:G,updatedAt:G}}),{id:Y,datasetId:$.datasetId,datasetVersion:$.datasetVersion,agentVersion:$.agentVersion??null,targetType:$.targetType,targetId:$.targetId,name:$.name,description:$.description,metadata:$.metadata,status:"pending",totalItems:$.totalItems,succeededCount:0,failedCount:0,skippedCount:0,startedAt:null,completedAt:null,createdAt:X,updatedAt:X}}catch(Y){throw new G0({id:w0("LIBSQL","CREATE_EXPERIMENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async updateExperiment($){try{if(!await this.getExperimentById({id:$.id}))throw new G0({id:w0("LIBSQL","UPDATE_EXPERIMENT","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,details:{experimentId:$.id}});let X=new Date().toISOString(),G=["updatedAt = ?"],J=[X];if($.status!==void 0)G.push("status = ?"),J.push($.status);if($.succeededCount!==void 0)G.push("succeededCount = ?"),J.push($.succeededCount);if($.failedCount!==void 0)G.push("failedCount = ?"),J.push($.failedCount);if($.totalItems!==void 0)G.push("totalItems = ?"),J.push($.totalItems);if($.startedAt!==void 0)G.push("startedAt = ?"),J.push($.startedAt?.toISOString()??null);if($.completedAt!==void 0)G.push("completedAt = ?"),J.push($.completedAt?.toISOString()??null);if($.skippedCount!==void 0)G.push("skippedCount = ?"),J.push($.skippedCount);if($.name!==void 0)G.push("name = ?"),J.push($.name);if($.description!==void 0)G.push("description = ?"),J.push($.description);if($.metadata!==void 0)G.push("metadata = ?"),J.push(JSON.stringify($.metadata));return J.push($.id),await this.#Y.execute({sql:`UPDATE ${iY} SET ${G.join(", ")} WHERE id = ?`,args:J}),await this.getExperimentById({id:$.id})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","UPDATE_EXPERIMENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getExperimentById($){try{let Y=await this.#Y.execute({sql:`SELECT ${E4(iY)} FROM ${iY} WHERE id = ?`,args:[$.id]});return Y.rows?.[0]?this.transformExperimentRow(Y.rows[0]):null}catch(Y){throw new G0({id:w0("LIBSQL","GET_EXPERIMENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listExperiments($){try{let{page:Y,perPage:X}=$.pagination,G=[],J=[];if($.datasetId)G.push("datasetId = ?"),J.push($.datasetId);if($.targetType)G.push("targetType = ?"),J.push($.targetType);if($.targetId)G.push("targetId = ?"),J.push($.targetId);if($.agentVersion)G.push("agentVersion = ?"),J.push($.agentVersion);if($.status)G.push("status = ?"),J.push($.status);let Q=G.length>0?`WHERE ${G.join(" AND ")}`:"",W=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${iY} ${Q}`,args:J}),K=Number(W.rows?.[0]?.count??0);if(K===0)return{experiments:[],pagination:{total:0,page:Y,perPage:X,hasMore:!1}};let Z=F4(X,100),{offset:H,perPage:z}=B4(Y,X,Z),V=X===!1?K:Z,F=X===!1?K:H+Z;return{experiments:(await this.#Y.execute({sql:`SELECT ${E4(iY)} FROM ${iY} ${Q} ORDER BY createdAt DESC LIMIT ? OFFSET ?`,args:[...J,V,H]})).rows?.map((N)=>this.transformExperimentRow(N))??[],pagination:{total:K,page:Y,perPage:z,hasMore:F<K}}}catch(Y){throw new G0({id:w0("LIBSQL","LIST_EXPERIMENTS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteExperiment($){try{await this.#Y.execute({sql:`DELETE FROM ${c7} WHERE experimentId = ?`,args:[$.id]}),await this.#Y.execute({sql:`DELETE FROM ${iY} WHERE id = ?`,args:[$.id]})}catch(Y){throw new G0({id:w0("LIBSQL","DELETE_EXPERIMENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async addExperimentResult($){try{let Y=$.id??crypto.randomUUID(),X=new Date,G=X.toISOString();return await this.#$.insert({tableName:c7,record:{id:Y,experimentId:$.experimentId,itemId:$.itemId,itemDatasetVersion:$.itemDatasetVersion??null,input:$.input,output:$.output,groundTruth:$.groundTruth,error:$.error??null,startedAt:$.startedAt.toISOString(),completedAt:$.completedAt.toISOString(),retryCount:$.retryCount,traceId:$.traceId??null,status:$.status??null,tags:$.tags!==void 0&&$.tags!==null?JSON.stringify($.tags):null,createdAt:G}}),{id:Y,experimentId:$.experimentId,itemId:$.itemId,itemDatasetVersion:$.itemDatasetVersion,input:$.input,output:$.output,groundTruth:$.groundTruth,error:$.error,startedAt:$.startedAt,completedAt:$.completedAt,retryCount:$.retryCount,traceId:$.traceId??null,status:$.status??null,tags:$.tags??null,createdAt:X}}catch(Y){throw new G0({id:w0("LIBSQL","ADD_EXPERIMENT_RESULT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async updateExperimentResult($){try{let Y=[],X=[];if($.status!==void 0)Y.push('"status" = ?'),X.push($.status);if($.tags!==void 0)Y.push('"tags" = ?'),X.push(JSON.stringify($.tags));if(Y.length===0){let W=await this.getExperimentResultById({id:$.id});if(!W)throw new G0({id:w0("LIBSQL","UPDATE_EXPERIMENT_RESULT","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,details:{resultId:$.id}});return W}X.push($.id);let G='"id" = ?';if($.experimentId)X.push($.experimentId),G+=' AND "experimentId" = ?';if((await this.#Y.execute({sql:`UPDATE ${c7} SET ${Y.join(", ")} WHERE ${G}`,args:X})).rowsAffected===0)throw new G0({id:w0("LIBSQL","UPDATE_EXPERIMENT_RESULT","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,details:{resultId:$.id,...$.experimentId?{experimentId:$.experimentId}:{}}});let Q=await this.getExperimentResultById({id:$.id});if(!Q)throw new G0({id:w0("LIBSQL","UPDATE_EXPERIMENT_RESULT","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,details:{resultId:$.id}});return Q}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","UPDATE_EXPERIMENT_RESULT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getExperimentResultById($){try{let Y=await this.#Y.execute({sql:`SELECT ${E4(c7)} FROM ${c7} WHERE id = ?`,args:[$.id]});return Y.rows?.[0]?this.transformExperimentResultRow(Y.rows[0]):null}catch(Y){throw new G0({id:w0("LIBSQL","GET_EXPERIMENT_RESULT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listExperimentResults($){try{let{page:Y,perPage:X}=$.pagination,G=["experimentId = ?"],J=[$.experimentId];if($.traceId)G.push("traceId = ?"),J.push($.traceId);if($.status)G.push("status = ?"),J.push($.status);let Q=`WHERE ${G.join(" AND ")}`,W=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${c7} ${Q}`,args:J}),K=Number(W.rows?.[0]?.count??0);if(K===0)return{results:[],pagination:{total:0,page:Y,perPage:X,hasMore:!1}};let Z=F4(X,100),{offset:H,perPage:z}=B4(Y,X,Z),V=X===!1?K:Z,F=X===!1?K:H+Z;return{results:(await this.#Y.execute({sql:`SELECT ${E4(c7)} FROM ${c7} ${Q} ORDER BY startedAt ASC LIMIT ? OFFSET ?`,args:[...J,V,H]})).rows?.map((N)=>this.transformExperimentResultRow(N))??[],pagination:{total:K,page:Y,perPage:z,hasMore:F<K}}}catch(Y){throw new G0({id:w0("LIBSQL","LIST_EXPERIMENT_RESULTS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteExperimentResults($){try{await this.#Y.execute({sql:`DELETE FROM ${c7} WHERE experimentId = ?`,args:[$.experimentId]})}catch(Y){throw new G0({id:w0("LIBSQL","DELETE_EXPERIMENT_RESULTS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getReviewSummary(){try{return((await this.#Y.execute({sql:`SELECT
          "experimentId",
          COUNT(*) as total,
          SUM(CASE WHEN status = 'needs-review' THEN 1 ELSE 0 END) as "needsReview",
          SUM(CASE WHEN status = 'reviewed' THEN 1 ELSE 0 END) as reviewed,
          SUM(CASE WHEN status = 'complete' THEN 1 ELSE 0 END) as complete
        FROM ${c7}
        GROUP BY "experimentId"`,args:[]})).rows??[]).map((Y)=>({experimentId:Y.experimentId,total:Number(Y.total??0),needsReview:Number(Y.needsReview??0),reviewed:Number(Y.reviewed??0),complete:Number(Y.complete??0)}))}catch($){throw new G0({id:w0("LIBSQL","GET_REVIEW_SUMMARY","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},$)}}},Wp0={agent:N$,skill:cY},CZ9=class extends Cg{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:zG,schema:sj,compositePrimaryKey:["userId","entityType","entityId"]}),await this.#Y.execute(`CREATE INDEX IF NOT EXISTS idx_favorites_entity ON "${zG}" ("entityType", "entityId")`)}async dangerouslyClearAll(){let $=await this.#Y.transaction("write");try{await $.execute(`DELETE FROM "${zG}"`),await $.execute(`UPDATE "${N$}" SET "favoriteCount" = 0 WHERE "favoriteCount" > 0`),await $.execute(`UPDATE "${cY}" SET "favoriteCount" = 0 WHERE "favoriteCount" > 0`),await $.commit()}catch(Y){if(!$.closed)await $.rollback();throw Y}}async favorite($){let{userId:Y,entityType:X,entityId:G}=$,J=Wp0[X];try{let Q=await this.#Y.transaction("write");try{if(!(await Q.execute({sql:`SELECT "favoriteCount" FROM "${J}" WHERE id = ?`,args:[G]})).rows?.[0])throw new G0({id:w0("LIBSQL","FAVORITE","ENTITY_NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,text:`${X} ${G} not found`,details:{entityType:X,entityId:G}});if(((await Q.execute({sql:`INSERT OR IGNORE INTO "${zG}" ("userId", "entityType", "entityId", "createdAt") VALUES (?, ?, ?, ?)`,args:[Y,X,G,new Date().toISOString()]})).rowsAffected??0)>0)await Q.execute({sql:`UPDATE "${J}" SET "favoriteCount" = COALESCE("favoriteCount", 0) + 1 WHERE id = ?`,args:[G]});let Z=await Q.execute({sql:`SELECT "favoriteCount" FROM "${J}" WHERE id = ?`,args:[G]}),H=Number(Z.rows?.[0]?.favoriteCount??0);return await Q.commit(),{favorited:!0,favoriteCount:H}}catch(W){if(!Q.closed)await Q.rollback();throw W}}catch(Q){if(Q instanceof G0)throw Q;throw new G0({id:w0("LIBSQL","FAVORITE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{entityType:X,entityId:G}},Q)}}async unfavorite($){let{userId:Y,entityType:X,entityId:G}=$,J=Wp0[X];try{let Q=await this.#Y.transaction("write");try{if(!(await Q.execute({sql:`SELECT "favoriteCount" FROM "${J}" WHERE id = ?`,args:[G]})).rows?.[0])throw new G0({id:w0("LIBSQL","UNFAVORITE","ENTITY_NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,text:`${X} ${G} not found`,details:{entityType:X,entityId:G}});if(((await Q.execute({sql:`DELETE FROM "${zG}" WHERE "userId" = ? AND "entityType" = ? AND "entityId" = ?`,args:[Y,X,G]})).rowsAffected??0)>0)await Q.execute({sql:`UPDATE "${J}" SET "favoriteCount" = MAX(COALESCE("favoriteCount", 0) - 1, 0) WHERE id = ?`,args:[G]});let Z=await Q.execute({sql:`SELECT "favoriteCount" FROM "${J}" WHERE id = ?`,args:[G]}),H=Number(Z.rows?.[0]?.favoriteCount??0);return await Q.commit(),{favorited:!1,favoriteCount:H}}catch(W){if(!Q.closed)await Q.rollback();throw W}}catch(Q){if(Q instanceof G0)throw Q;throw new G0({id:w0("LIBSQL","UNFAVORITE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{entityType:X,entityId:G}},Q)}}async isFavorited($){try{return((await this.#Y.execute({sql:`SELECT 1 FROM "${zG}" WHERE "userId" = ? AND "entityType" = ? AND "entityId" = ? LIMIT 1`,args:[$.userId,$.entityType,$.entityId]})).rows?.length??0)>0}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","IS_FAVORITED","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async isFavoritedBatch($){let{userId:Y,entityType:X,entityIds:G}=$;if(G.length===0)return new Set;try{let J=G.map(()=>"?").join(", "),Q=[Y,X,...G],W=await this.#Y.execute({sql:`SELECT "entityId" FROM "${zG}" WHERE "userId" = ? AND "entityType" = ? AND "entityId" IN (${J})`,args:Q}),K=new Set;for(let Z of W.rows??[])K.add(Z.entityId);return K}catch(J){if(J instanceof G0)throw J;throw new G0({id:w0("LIBSQL","IS_FAVORITED_BATCH","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},J)}}async listFavoritedIds($){try{return((await this.#Y.execute({sql:`SELECT "entityId" FROM "${zG}" WHERE "userId" = ? AND "entityType" = ? ORDER BY "createdAt" DESC, "entityId" ASC`,args:[$.userId,$.entityType]})).rows??[]).map((X)=>X.entityId)}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","LIST_FAVORITED_IDS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteFavoritesForEntity($){let Y=Wp0[$.entityType];try{let X=await this.#Y.transaction("write");try{let G=await X.execute({sql:`DELETE FROM "${zG}" WHERE "entityType" = ? AND "entityId" = ?`,args:[$.entityType,$.entityId]});return await X.execute({sql:`UPDATE "${Y}" SET "favoriteCount" = 0 WHERE id = ?`,args:[$.entityId]}),await X.commit(),Number(G.rowsAffected??0)}catch(G){if(!X.closed)await X.rollback();throw G}}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","DELETE_FAVORITES_FOR_ENTITY","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{entityType:$.entityType,entityId:$.entityId}},X)}}},SZ9=class extends uj{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:JJ,schema:fg}),await this.#$.createTable({tableName:u7,schema:gg}),await this.#Y.execute(`CREATE UNIQUE INDEX IF NOT EXISTS idx_mcp_client_versions_client_version ON "${u7}" ("mcpClientId", "versionNumber")`)}async dangerouslyClearAll(){await this.#$.deleteData({tableName:JJ}),await this.#$.deleteData({tableName:u7})}async getById($){try{let X=(await this.#Y.execute({sql:`SELECT ${E4(JJ)} FROM "${JJ}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#X(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_MCP_CLIENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async create($){let{mcpClient:Y}=$;try{let X=new Date;await this.#$.insert({tableName:JJ,record:{id:Y.id,status:"draft",activeVersionId:null,authorId:Y.authorId??null,metadata:Y.metadata??null,createdAt:X.toISOString(),updatedAt:X.toISOString()}});let{id:G,authorId:J,metadata:Q,...W}=Y,K=crypto.randomUUID();try{await this.createVersion({id:K,mcpClientId:Y.id,versionNumber:1,...W,changedFields:Object.keys(W),changeMessage:"Initial version"})}catch(Z){throw await this.#$.delete({tableName:JJ,keys:{id:Y.id}}),Z}return{id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X}}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","CREATE_MCP_CLIENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async update($){let{id:Y,...X}=$;try{let G=await this.getById(Y);if(!G)throw Error(`MCP client with id ${Y} not found`);let{authorId:J,activeVersionId:Q,metadata:W,status:K}=X,Z={updatedAt:new Date().toISOString()};if(J!==void 0)Z.authorId=J;if(Q!==void 0)Z.activeVersionId=Q;if(K!==void 0)Z.status=K;if(W!==void 0)Z.metadata={...G.metadata,...W};await this.#$.update({tableName:JJ,keys:{id:Y},data:Z});let H=await this.getById(Y);if(!H)throw new G0({id:w0("LIBSQL","UPDATE_MCP_CLIENT","NOT_FOUND_AFTER_UPDATE"),domain:M0.STORAGE,category:E0.SYSTEM,text:`MCP client ${Y} not found after update`,details:{id:Y}});return H}catch(G){if(G instanceof G0)throw G;throw new G0({id:w0("LIBSQL","UPDATE_MCP_CLIENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},G)}}async delete($){try{await this.deleteVersionsByParentId($),await this.#Y.execute({sql:`DELETE FROM "${JJ}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_MCP_CLIENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async list($){try{let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W="published"}=$||{},{field:K,direction:Z}=this.parseOrderBy(G),H=[],z=[];if(H.push("status = ?"),z.push(W),J!==void 0)H.push("authorId = ?"),z.push(J);if(Q&&Object.keys(Q).length>0)for(let[R,q]of Object.entries(Q)){if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(R))throw new G0({id:w0("LIBSQL","LIST_MCP_CLIENTS","INVALID_METADATA_KEY"),domain:M0.STORAGE,category:E0.USER,text:`Invalid metadata key: ${R}. Keys must be alphanumeric with underscores.`,details:{key:R}});H.push(`json_extract(metadata, '$.${R}') = ?`),z.push(typeof q==="string"?q:JSON.stringify(q))}let V=`WHERE ${H.join(" AND ")}`,F=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${JJ}" ${V}`,args:z}),L=Number(F.rows?.[0]?.count??0);if(L===0)return{mcpClients:[],total:0,page:Y,perPage:X??100,hasMore:!1};let N=F4(X,100),{offset:D,perPage:A}=B4(Y,X,N),B=X===!1?L:N,O=X===!1?L:D+N;return{mcpClients:(await this.#Y.execute({sql:`SELECT ${E4(JJ)} FROM "${JJ}" ${V} ORDER BY ${K} ${Z} LIMIT ? OFFSET ?`,args:[...z,B,D]})).rows?.map((R)=>this.#X(R))??[],total:L,page:Y,perPage:A,hasMore:O<L}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","LIST_MCP_CLIENTS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async createVersion($){try{let Y=new Date;return await this.#$.insert({tableName:u7,record:{id:$.id,mcpClientId:$.mcpClientId,versionNumber:$.versionNumber,name:$.name,description:$.description??null,servers:$.servers??null,changedFields:$.changedFields??null,changeMessage:$.changeMessage??null,createdAt:Y.toISOString()}}),{...$,createdAt:Y}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","CREATE_MCP_CLIENT_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${E4(u7)} FROM "${u7}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_MCP_CLIENT_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersionByNumber($,Y){try{let G=(await this.#Y.execute({sql:`SELECT ${E4(u7)} FROM "${u7}" WHERE mcpClientId = ? AND versionNumber = ?`,args:[$,Y]})).rows?.[0];return G?this.#J(G):null}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","GET_MCP_CLIENT_VERSION_BY_NUMBER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async getLatestVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${E4(u7)} FROM "${u7}" WHERE mcpClientId = ? ORDER BY versionNumber DESC LIMIT 1`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_LATEST_MCP_CLIENT_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listVersions($){try{let{mcpClientId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),K=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${u7}" WHERE mcpClientId = ?`,args:[Y]}),Z=Number(K.rows?.[0]?.count??0);if(Z===0)return{versions:[],total:0,page:X,perPage:G??20,hasMore:!1};let H=F4(G,20),{offset:z,perPage:V}=B4(X,G,H),F=G===!1?Z:H,L=G===!1?Z:z+H;return{versions:(await this.#Y.execute({sql:`SELECT ${E4(u7)} FROM "${u7}" WHERE mcpClientId = ? ORDER BY ${Q} ${W} LIMIT ? OFFSET ?`,args:[Y,F,z]})).rows?.map((A)=>this.#J(A))??[],total:Z,page:X,perPage:V,hasMore:L<Z}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","LIST_MCP_CLIENT_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersion($){try{await this.#Y.execute({sql:`DELETE FROM "${u7}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_MCP_CLIENT_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersionsByParentId($){try{await this.#Y.execute({sql:`DELETE FROM "${u7}" WHERE "mcpClientId" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_MCP_CLIENT_VERSIONS_BY_CLIENT","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async countVersions($){try{let Y=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${u7}" WHERE mcpClientId = ?`,args:[$]});return Number(Y.rows?.[0]?.count??0)}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","COUNT_MCP_CLIENT_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}#X($){let Y=(X)=>{if(X===null||X===void 0)return;if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X};return{id:$.id,status:$.status??"draft",activeVersionId:$.activeVersionId??void 0,authorId:$.authorId??void 0,metadata:Y($.metadata),createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt)}}#J($){let Y=(X)=>{if(X===null||X===void 0)return;if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X};return{id:$.id,mcpClientId:$.mcpClientId,versionNumber:Number($.versionNumber),name:$.name,description:$.description??void 0,servers:Y($.servers),changedFields:Y($.changedFields),changeMessage:$.changeMessage??void 0,createdAt:new Date($.createdAt)}}},kZ9=class extends yj{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:QJ,schema:mg}),await this.#$.createTable({tableName:p7,schema:ug}),await this.#Y.execute(`CREATE UNIQUE INDEX IF NOT EXISTS idx_mcp_server_versions_server_version ON "${p7}" ("mcpServerId", "versionNumber")`)}async dangerouslyClearAll(){await this.#$.deleteData({tableName:QJ}),await this.#$.deleteData({tableName:p7})}async getById($){try{let X=(await this.#Y.execute({sql:`SELECT ${E4(QJ)} FROM "${QJ}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_MCP_SERVER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async create($){let{mcpServer:Y}=$;try{let X=new Date;await this.#$.insert({tableName:QJ,record:{id:Y.id,status:"draft",activeVersionId:null,authorId:Y.authorId??null,metadata:Y.metadata??null,createdAt:X.toISOString(),updatedAt:X.toISOString()}});let{id:G,authorId:J,metadata:Q,...W}=Y,K=crypto.randomUUID();try{await this.createVersion({id:K,mcpServerId:Y.id,versionNumber:1,...W,changedFields:Object.keys(W),changeMessage:"Initial version"})}catch(Z){throw await this.#$.delete({tableName:QJ,keys:{id:Y.id}}),Z}return{id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X}}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","CREATE_MCP_SERVER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async update($){let{id:Y,...X}=$;try{let G=await this.getById(Y);if(!G)throw Error(`MCP server with id ${Y} not found`);let{authorId:J,activeVersionId:Q,metadata:W,status:K}=X,Z={updatedAt:new Date().toISOString()};if(J!==void 0)Z.authorId=J;if(Q!==void 0)Z.activeVersionId=Q;if(K!==void 0)Z.status=K;if(W!==void 0)Z.metadata={...G.metadata,...W};await this.#$.update({tableName:QJ,keys:{id:Y},data:Z});let H=await this.getById(Y);if(!H)throw new G0({id:w0("LIBSQL","UPDATE_MCP_SERVER","NOT_FOUND_AFTER_UPDATE"),domain:M0.STORAGE,category:E0.SYSTEM,text:`MCP server ${Y} not found after update`,details:{id:Y}});return H}catch(G){if(G instanceof G0)throw G;throw new G0({id:w0("LIBSQL","UPDATE_MCP_SERVER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},G)}}async delete($){try{await this.deleteVersionsByParentId($),await this.#Y.execute({sql:`DELETE FROM "${QJ}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_MCP_SERVER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async list($){try{let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W="published"}=$||{},{field:K,direction:Z}=this.parseOrderBy(G),H=[],z=[];if(H.push("status = ?"),z.push(W),J!==void 0)H.push("authorId = ?"),z.push(J);if(Q&&Object.keys(Q).length>0)for(let[R,q]of Object.entries(Q)){if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(R))throw new G0({id:w0("LIBSQL","LIST_MCP_SERVERS","INVALID_METADATA_KEY"),domain:M0.STORAGE,category:E0.USER,text:`Invalid metadata key: ${R}. Keys must be alphanumeric with underscores.`,details:{key:R}});H.push(`json_extract(metadata, '$.${R}') = ?`),z.push(typeof q==="string"?q:JSON.stringify(q))}let V=`WHERE ${H.join(" AND ")}`,F=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${QJ}" ${V}`,args:z}),L=Number(F.rows?.[0]?.count??0);if(L===0)return{mcpServers:[],total:0,page:Y,perPage:X??100,hasMore:!1};let N=F4(X,100),{offset:D,perPage:A}=B4(Y,X,N),B=X===!1?L:N,O=X===!1?L:D+N;return{mcpServers:(await this.#Y.execute({sql:`SELECT ${E4(QJ)} FROM "${QJ}" ${V} ORDER BY ${K} ${Z} LIMIT ? OFFSET ?`,args:[...z,B,D]})).rows?.map((R)=>this.#J(R))??[],total:L,page:Y,perPage:A,hasMore:O<L}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","LIST_MCP_SERVERS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async createVersion($){try{let Y=new Date;return await this.#$.insert({tableName:p7,record:{id:$.id,mcpServerId:$.mcpServerId,versionNumber:$.versionNumber,name:$.name,version:$.version,description:$.description??null,instructions:$.instructions??null,repository:$.repository??null,releaseDate:$.releaseDate??null,isLatest:$.isLatest??null,packageCanonical:$.packageCanonical??null,tools:$.tools??null,agents:$.agents??null,workflows:$.workflows??null,changedFields:$.changedFields??null,changeMessage:$.changeMessage??null,createdAt:Y.toISOString()}}),{...$,createdAt:Y}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","CREATE_MCP_SERVER_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${E4(p7)} FROM "${p7}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#G(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_MCP_SERVER_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersionByNumber($,Y){try{let G=(await this.#Y.execute({sql:`SELECT ${E4(p7)} FROM "${p7}" WHERE mcpServerId = ? AND versionNumber = ?`,args:[$,Y]})).rows?.[0];return G?this.#G(G):null}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","GET_MCP_SERVER_VERSION_BY_NUMBER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async getLatestVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${E4(p7)} FROM "${p7}" WHERE mcpServerId = ? ORDER BY versionNumber DESC LIMIT 1`,args:[$]})).rows?.[0];return X?this.#G(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_LATEST_MCP_SERVER_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listVersions($){try{let{mcpServerId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),K=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${p7}" WHERE mcpServerId = ?`,args:[Y]}),Z=Number(K.rows?.[0]?.count??0);if(Z===0)return{versions:[],total:0,page:X,perPage:G??20,hasMore:!1};let H=F4(G,20),{offset:z,perPage:V}=B4(X,G,H),F=G===!1?Z:H,L=G===!1?Z:z+H;return{versions:(await this.#Y.execute({sql:`SELECT ${E4(p7)} FROM "${p7}" WHERE mcpServerId = ? ORDER BY ${Q} ${W} LIMIT ? OFFSET ?`,args:[Y,F,z]})).rows?.map((A)=>this.#G(A))??[],total:Z,page:X,perPage:V,hasMore:L<Z}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","LIST_MCP_SERVER_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersion($){try{await this.#Y.execute({sql:`DELETE FROM "${p7}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_MCP_SERVER_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersionsByParentId($){try{await this.#Y.execute({sql:`DELETE FROM "${p7}" WHERE "mcpServerId" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_MCP_SERVER_VERSIONS_BY_SERVER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async countVersions($){try{let Y=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${p7}" WHERE mcpServerId = ?`,args:[$]});return Number(Y.rows?.[0]?.count??0)}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","COUNT_MCP_SERVER_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}#X($){if($===null||$===void 0)return;if(typeof $==="string")try{return JSON.parse($)}catch{return $}return $}#J($){return{id:$.id,status:$.status??"draft",activeVersionId:$.activeVersionId??void 0,authorId:$.authorId??void 0,metadata:this.#X($.metadata),createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt)}}#G($){return{id:$.id,mcpServerId:$.mcpServerId,versionNumber:Number($.versionNumber),name:$.name,version:$.version,description:$.description??void 0,instructions:$.instructions??void 0,repository:this.#X($.repository),releaseDate:$.releaseDate??void 0,isLatest:$.isLatest===null||$.isLatest===void 0?void 0:Boolean($.isLatest),packageCanonical:$.packageCanonical??void 0,tools:this.#X($.tools),agents:this.#X($.agents),workflows:this.#X($.workflows),changedFields:this.#X($.changedFields),changeMessage:$.changeMessage??void 0,createdAt:new Date($.createdAt)}}},k5="mastra_observational_memory",vZ9=class extends $m{supportsObservationalMemory=!0;#$;#Y;constructor($){super();let Y=sY($);this.#$=Y,this.#Y=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#Y.createTable({tableName:OX,schema:F5[OX]}),await this.#Y.createTable({tableName:T5,schema:F5[T5]}),await this.#Y.createTable({tableName:y3,schema:F5[y3]});let $;try{let{OBSERVATIONAL_MEMORY_TABLE_SCHEMA:Y}=await Promise.resolve().then(() => (Jp0(),zD4));$=Y?.[k5]}catch{}if($)await this.#Y.createTable({tableName:k5,schema:$}),await this.#Y.alterTable({tableName:k5,schema:$,ifNotExists:["observedMessageIds","observedTimezone","bufferedObservations","bufferedObservationTokens","bufferedMessageIds","bufferedReflection","bufferedReflectionTokens","bufferedReflectionInputTokens","reflectedObservationLineCount","bufferedObservationChunks","isBufferingObservation","isBufferingReflection","lastBufferedAtTokens","lastBufferedAtTime","metadata"]});if(await this.#Y.alterTable({tableName:T5,schema:F5[T5],ifNotExists:["resourceId"]}),await this.#$.batch([{sql:`CREATE INDEX IF NOT EXISTS idx_messages_thread_created_at ON ${T5} (thread_id, "createdAt")`,args:[]},{sql:`CREATE INDEX IF NOT EXISTS idx_messages_thread_resource_created_at ON ${T5} (thread_id, "resourceId", "createdAt")`,args:[]}],"write"),$)await this.#$.execute({sql:`CREATE INDEX IF NOT EXISTS idx_om_lookup_key ON "${k5}" ("lookupKey")`,args:[]})}async dangerouslyClearAll(){await this.#Y.deleteData({tableName:T5}),await this.#Y.deleteData({tableName:OX}),await this.#Y.deleteData({tableName:y3}),await this.#Y.deleteData({tableName:k5})}parseRow($){let Y=$.content;try{Y=JSON.parse($.content)}catch{}let X={id:$.id,content:Y,role:$.role,createdAt:new Date($.createdAt),threadId:$.thread_id,resourceId:$.resourceId};if($.type&&$.type!=="v2")X.type=$.type;return X}_sortMessages($,Y,X){return $.sort((G,J)=>{let Q=Y==="createdAt"||Y==="updatedAt",W=Q?new Date(G[Y]).getTime():G[Y],K=Q?new Date(J[Y]).getTime():J[Y];if(typeof W==="number"&&typeof K==="number")return X==="ASC"?W-K:K-W;return X==="ASC"?String(W).localeCompare(String(K)):String(K).localeCompare(String(W))})}async _getIncludedMessages({include:$}){if(!$||$.length===0)return null;let Y=$.map((F)=>F.id).filter(Boolean);if(Y.length===0)return null;let X=Y.map(()=>"?").join(", "),G=await this.#$.execute({sql:`SELECT id, thread_id, "createdAt" FROM "${T5}" WHERE id IN (${X})`,args:Y});if(!G.rows||G.rows.length===0)return null;let J=new Map(G.rows.map((F)=>[F.id,{threadId:F.thread_id,createdAt:F.createdAt}])),Q=[],W=[];for(let F of $){let{id:L,withPreviousMessages:N=0,withNextMessages:D=0}=F,A=J.get(L);if(!A)continue;if(Q.push(`SELECT * FROM (
        SELECT id, content, role, type, "createdAt", thread_id, "resourceId"
        FROM "${T5}"
        WHERE thread_id = ?
          AND "createdAt" <= ?
        ORDER BY "createdAt" DESC, id DESC
        LIMIT ?
      )`),W.push(A.threadId,A.createdAt,N+1),D>0)Q.push(`SELECT * FROM (
          SELECT id, content, role, type, "createdAt", thread_id, "resourceId"
          FROM "${T5}"
          WHERE thread_id = ?
            AND "createdAt" > ?
          ORDER BY "createdAt" ASC, id ASC
          LIMIT ?
        )`),W.push(A.threadId,A.createdAt,D)}if(Q.length===0)return null;let K;if(Q.length===1)K=Q[0];else K=`${Q.join(" UNION ALL ")} ORDER BY "createdAt" ASC, id ASC`;let H=(await this.#$.execute({sql:K,args:W})).rows?.map((F)=>this.parseRow(F)),z=new Set;return H.filter((F)=>{if(z.has(F.id))return!1;return z.add(F.id),!0})}async listMessagesById({messageIds:$}){if($.length===0)return{messages:[]};try{let Y=`
        SELECT 
          id, 
          content, 
          role, 
          type,
          "createdAt", 
          thread_id,
          "resourceId"
        FROM "${T5}"
        WHERE id IN (${$.map(()=>"?").join(", ")})
        ORDER BY "createdAt" DESC
      `,X=await this.#$.execute({sql:Y,args:$});if(!X.rows)return{messages:[]};return{messages:new l6().add(X.rows.map(this.parseRow),"memory").get.all.db()}}catch(Y){throw new G0({id:w0("LIBSQL","LIST_MESSAGES_BY_ID","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{messageIds:JSON.stringify($)}},Y)}}async listMessages($){let{threadId:Y,resourceId:X,include:G,filter:J,perPage:Q,page:W=0,orderBy:K}=$,Z=Array.isArray(Y)?Y:[Y];if(Z.length===0||Z.some((F)=>!F.trim()))throw new G0({id:w0("LIBSQL","LIST_MESSAGES","INVALID_THREAD_ID"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{threadId:Array.isArray(Y)?Y.join(","):Y}},Error("threadId must be a non-empty string or array of non-empty strings"));if(W<0)throw new G0({id:w0("LIBSQL","LIST_MESSAGES","INVALID_PAGE"),domain:M0.STORAGE,category:E0.USER,details:{page:W}},Error("page must be >= 0"));let H=F4(Q,40),{offset:z,perPage:V}=B4(W,Q,H);try{let{field:F,direction:L}=this.parseOrderBy(K,"ASC"),N=`ORDER BY "${F}" ${L}`,A=[`thread_id IN (${Z.map(()=>"?").join(", ")})`],B=[...Z];if(X)A.push('"resourceId" = ?'),B.push(X);if(J?.dateRange?.start){let v=J.dateRange.startExclusive?">":">=";A.push(`"createdAt" ${v} ?`),B.push(J.dateRange.start instanceof Date?J.dateRange.start.toISOString():J.dateRange.start)}if(J?.dateRange?.end){let v=J.dateRange.endExclusive?"<":"<=";A.push(`"createdAt" ${v} ?`),B.push(J.dateRange.end instanceof Date?J.dateRange.end.toISOString():J.dateRange.end)}let O=A.length>0?`WHERE ${A.join(" AND ")}`:"";if(H===0&&(!G||G.length===0))return{messages:[],total:0,page:W,perPage:V,hasMore:!1};if(H===0&&G&&G.length>0){let v=await this._getIncludedMessages({include:G});if(!v||v.length===0)return{messages:[],total:0,page:W,perPage:V,hasMore:!1};let x=new l6().add(v,"memory");return{messages:this._sortMessages(x.get.all.db(),F,L),total:0,page:W,perPage:V,hasMore:!1}}let E=await this.#$.execute({sql:`SELECT COUNT(*) as count FROM ${T5} ${O}`,args:B}),M=Number(E.rows?.[0]?.count??0),R=Q===!1?M:H,_=((await this.#$.execute({sql:`SELECT id, content, role, type, "createdAt", "resourceId", "thread_id" FROM ${T5} ${O} ${N} LIMIT ? OFFSET ?`,args:[...B,R,z]})).rows||[]).map((v)=>this.parseRow(v));if(M===0&&_.length===0&&(!G||G.length===0))return{messages:[],total:0,page:W,perPage:V,hasMore:!1};let P=new Set(_.map((v)=>v.id));if(G&&G.length>0){let v=await this._getIncludedMessages({include:G});if(v){for(let x of v)if(!P.has(x.id))_.push(x),P.add(x.id)}}let w=new l6().add(_,"memory"),j=this._sortMessages(w.get.all.db(),F,L),C=new Set(Z),S=new Set(j.filter((v)=>v.threadId&&C.has(v.threadId)).map((v)=>v.id)).size>=M,I=Q!==!1&&!S&&z+H<M;return{messages:j,total:M,page:W,perPage:V,hasMore:I}}catch(F){let L=new G0({id:w0("LIBSQL","LIST_MESSAGES","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{threadId:Array.isArray(Y)?Y.join(","):Y,resourceId:X??""}},F);return this.logger?.error?.(L.toString()),this.logger?.trackException?.(L),{messages:[],total:0,page:W,perPage:V,hasMore:!1}}}async listMessagesByResourceId($){let{resourceId:Y,include:X,filter:G,perPage:J,page:Q=0,orderBy:W}=$;if(!Y||typeof Y!=="string"||Y.trim().length===0)throw new G0({id:w0("LIBSQL","LIST_MESSAGES","INVALID_QUERY"),domain:M0.STORAGE,category:E0.USER,details:{resourceId:Y??""}},Error("resourceId is required"));if(Q<0)throw new G0({id:w0("LIBSQL","LIST_MESSAGES","INVALID_PAGE"),domain:M0.STORAGE,category:E0.USER,details:{page:Q}},Error("page must be >= 0"));let K=F4(J,40),{offset:Z,perPage:H}=B4(Q,J,K);try{let{field:z,direction:V}=this.parseOrderBy(W,"ASC"),F=`ORDER BY "${z}" ${V}`,L=[],N=[];if(L.push('"resourceId" = ?'),N.push(Y),G?.dateRange?.start){let w=G.dateRange.startExclusive?">":">=";L.push(`"createdAt" ${w} ?`),N.push(G.dateRange.start instanceof Date?G.dateRange.start.toISOString():G.dateRange.start)}if(G?.dateRange?.end){let w=G.dateRange.endExclusive?"<":"<=";L.push(`"createdAt" ${w} ?`),N.push(G.dateRange.end instanceof Date?G.dateRange.end.toISOString():G.dateRange.end)}let D=`WHERE ${L.join(" AND ")}`;if(K===0&&(!X||X.length===0))return{messages:[],total:0,page:Q,perPage:H,hasMore:!1};if(K===0&&X&&X.length>0){let w=await this._getIncludedMessages({include:X});if(!w||w.length===0)return{messages:[],total:0,page:Q,perPage:H,hasMore:!1};let j=new l6().add(w,"memory");return{messages:this._sortMessages(j.get.all.db(),z,V),total:0,page:Q,perPage:H,hasMore:!1}}let A=await this.#$.execute({sql:`SELECT COUNT(*) as count FROM ${T5} ${D}`,args:N}),B=Number(A.rows?.[0]?.count??0),O=J===!1?B:K,M=((await this.#$.execute({sql:`SELECT id, content, role, type, "createdAt", "resourceId", "thread_id" FROM ${T5} ${D} ${F} LIMIT ? OFFSET ?`,args:[...N,O,Z]})).rows||[]).map((w)=>this.parseRow(w));if(B===0&&M.length===0&&(!X||X.length===0))return{messages:[],total:0,page:Q,perPage:H,hasMore:!1};let R=new Set(M.map((w)=>w.id));if(X&&X.length>0){let w=await this._getIncludedMessages({include:X});if(w){for(let j of w)if(!R.has(j.id))M.push(j),R.add(j.id)}}let q=new l6().add(M,"memory"),_=this._sortMessages(q.get.all.db(),z,V),P=J!==!1&&Z+K<B;return{messages:_,total:B,page:Q,perPage:H,hasMore:P}}catch(z){let V=new G0({id:w0("LIBSQL","LIST_MESSAGES","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{resourceId:Y}},z);return this.logger?.error?.(V.toString()),this.logger?.trackException?.(V),{messages:[],total:0,page:Q,perPage:H,hasMore:!1}}}async saveMessages({messages:$}){if($.length===0)return{messages:$};try{let Y=$[0]?.threadId;if(!Y)throw Error("Thread ID is required");let X=$.map((Z)=>{let H=Z.createdAt||new Date;if(!Z.threadId)throw Error("Expected to find a threadId for message, but couldn't find one. An unexpected error has occurred.");if(!Z.resourceId)throw Error("Expected to find a resourceId for message, but couldn't find one. An unexpected error has occurred.");return{sql:`INSERT INTO "${T5}" (id, thread_id, content, role, type, "createdAt", "resourceId") 
                  VALUES (?, ?, ?, ?, ?, ?, ?)
                  ON CONFLICT(id) DO UPDATE SET
                    thread_id=excluded.thread_id,
                    content=excluded.content,
                    role=excluded.role,
                    type=excluded.type,
                    "resourceId"=excluded."resourceId"
                `,args:[Z.id,Z.threadId,typeof Z.content==="object"?JSON.stringify(Z.content):Z.content,Z.role,Z.type||"v2",H instanceof Date?H.toISOString():H,Z.resourceId]}}),G=new Date().toISOString();X.push({sql:`UPDATE "${OX}" SET "updatedAt" = ? WHERE id = ?`,args:[G,Y]});let J=50,Q=X.slice(0,-1),W=X[X.length-1];for(let Z=0;Z<Q.length;Z+=J){let H=Q.slice(Z,Z+J);if(H.length>0)await this.#$.batch(H,"write")}if(W)await this.#$.execute(W);return{messages:new l6().add($,"memory").get.all.db()}}catch(Y){throw new G0({id:w0("LIBSQL","SAVE_MESSAGES","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async updateMessages({messages:$}){if($.length===0)return[];let Y=$.map((V)=>V.id),X=Y.map(()=>"?").join(","),G=`SELECT * FROM ${T5} WHERE id IN (${X})`,Q=(await this.#$.execute({sql:G,args:Y})).rows.map((V)=>this.parseRow(V));if(Q.length===0)return[];let W=[],K=new Set,Z={threadId:"thread_id"};for(let V of Q){let F=$.find((E)=>E.id===V.id);if(!F)continue;let{id:L,...N}=F;if(Object.keys(N).length===0)continue;if(K.add(V.threadId),F.threadId&&F.threadId!==V.threadId)K.add(F.threadId);let D=[],A=[],B={...N};if(B.content){let E={...V.content,...B.content,...V.content?.metadata&&B.content.metadata?{metadata:{...V.content.metadata,...B.content.metadata}}:{}};D.push(`${y$("content","column name")} = ?`),A.push(JSON.stringify(E)),delete B.content}for(let E in B)if(Object.prototype.hasOwnProperty.call(B,E)){let M=Z[E]||E;D.push(`${y$(M,"column name")} = ?`);let R=B[E];if(typeof R==="object"&&R!==null)R=JSON.stringify(R);A.push(R)}if(D.length===0)continue;A.push(L);let O=`UPDATE ${T5} SET ${D.join(", ")} WHERE id = ?`;W.push({sql:O,args:A})}if(W.length===0)return Q;let H=new Date().toISOString();for(let V of K)if(V)W.push({sql:`UPDATE ${OX} SET updatedAt = ? WHERE id = ?`,args:[H,V]});return await this.#$.batch(W,"write"),(await this.#$.execute({sql:G,args:Y})).rows.map((V)=>this.parseRow(V))}async deleteMessages($){if(!$||$.length===0)return;try{let X=new Set,G=await this.#$.transaction("write");try{for(let J=0;J<$.length;J+=100){let Q=$.slice(J,J+100),W=Q.map(()=>"?").join(",");(await G.execute({sql:`SELECT DISTINCT thread_id FROM "${T5}" WHERE id IN (${W})`,args:Q})).rows?.forEach((Z)=>{if(Z.thread_id)X.add(Z.thread_id)}),await G.execute({sql:`DELETE FROM "${T5}" WHERE id IN (${W})`,args:Q})}if(X.size>0){let J=new Date().toISOString();for(let Q of X)await G.execute({sql:`UPDATE "${OX}" SET "updatedAt" = ? WHERE id = ?`,args:[J,Q]})}await G.commit()}catch(J){throw await G.rollback(),J}}catch(Y){throw new G0({id:w0("LIBSQL","DELETE_MESSAGES","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{messageIds:$.join(", ")}},Y)}}async getResourceById({resourceId:$}){let Y=await this.#Y.select({tableName:y3,keys:{id:$}});if(!Y)return null;return{...Y,workingMemory:Y.workingMemory&&typeof Y.workingMemory==="object"?JSON.stringify(Y.workingMemory):Y.workingMemory,metadata:typeof Y.metadata==="string"?JSON.parse(Y.metadata):Y.metadata,createdAt:new Date(Y.createdAt),updatedAt:new Date(Y.updatedAt)}}async saveResource({resource:$}){return await this.#Y.insert({tableName:y3,record:{...$}}),$}async updateResource({resourceId:$,workingMemory:Y,metadata:X}){let G=await this.getResourceById({resourceId:$});if(!G){let K={id:$,workingMemory:Y,metadata:X||{},createdAt:new Date,updatedAt:new Date};return this.saveResource({resource:K})}let J={...G,workingMemory:Y!==void 0?Y:G.workingMemory,metadata:{...G.metadata,...X},updatedAt:new Date},Q=[],W=[];if(Y!==void 0)Q.push("workingMemory = ?"),W.push(Y);if(X)Q.push("metadata = jsonb(?)"),W.push(JSON.stringify(J.metadata));return Q.push("updatedAt = ?"),W.push(J.updatedAt.toISOString()),W.push($),await this.#$.execute({sql:`UPDATE ${y3} SET ${Q.join(", ")} WHERE id = ?`,args:W}),J}async getThreadById({threadId:$,resourceId:Y}){try{let X={id:$};if(Y!==void 0)X.resourceId=Y;let G=await this.#Y.select({tableName:OX,keys:X});if(!G)return null;return{...G,metadata:typeof G.metadata==="string"?JSON.parse(G.metadata):G.metadata,createdAt:new Date(G.createdAt),updatedAt:new Date(G.updatedAt)}}catch(X){throw new G0({id:w0("LIBSQL","GET_THREAD_BY_ID","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{threadId:$}},X)}}async listThreads($){let{page:Y=0,perPage:X,orderBy:G,filter:J}=$;try{this.validatePaginationInput(Y,X??100)}catch(z){throw new G0({id:w0("LIBSQL","LIST_THREADS","INVALID_PAGE"),domain:M0.STORAGE,category:E0.USER,details:{page:Y,...X!==void 0&&{perPage:X}}},z instanceof Error?z:Error("Invalid pagination parameters"))}let Q=F4(X,100);try{this.validateMetadataKeys(J?.metadata)}catch(z){throw new G0({id:w0("LIBSQL","LIST_THREADS","INVALID_METADATA_KEY"),domain:M0.STORAGE,category:E0.USER,details:{metadataKeys:J?.metadata?Object.keys(J.metadata).join(", "):""}},z instanceof Error?z:Error("Invalid metadata key"))}let{offset:W,perPage:K}=B4(Y,X,Q),{field:Z,direction:H}=this.parseOrderBy(G);try{let z=[],V=[];if(J?.resourceId)z.push("resourceId = ?"),V.push(J.resourceId);if(J?.metadata&&Object.keys(J.metadata).length>0)for(let[M,R]of Object.entries(J.metadata))if(R===null)z.push(`json_extract(metadata, '$.${M}') IS NULL`);else if(typeof R==="boolean")z.push(`json_extract(metadata, '$.${M}') = ?`),V.push(R?1:0);else if(typeof R==="number")z.push(`json_extract(metadata, '$.${M}') = ?`),V.push(R);else if(typeof R==="string")z.push(`json_extract(metadata, '$.${M}') = ?`),V.push(R);else throw new G0({id:w0("LIBSQL","LIST_THREADS","INVALID_METADATA_VALUE"),domain:M0.STORAGE,category:E0.USER,text:`Metadata filter value for key "${M}" must be a scalar type (string, number, boolean, or null), got ${typeof R}`,details:{key:M,valueType:typeof R}});let F=z.length>0?`WHERE ${z.join(" AND ")}`:"",L=`FROM ${OX} ${F}`,N=(M)=>({id:M.id,resourceId:M.resourceId,title:M.title,createdAt:new Date(M.createdAt),updatedAt:new Date(M.updatedAt),metadata:typeof M.metadata==="string"?JSON.parse(M.metadata):M.metadata}),D=await this.#$.execute({sql:`SELECT COUNT(*) as count ${L}`,args:V}),A=Number(D.rows?.[0]?.count??0);if(A===0)return{threads:[],total:0,page:Y,perPage:K,hasMore:!1};let B=X===!1?A:Q;return{threads:((await this.#$.execute({sql:`SELECT ${E4(OX)} ${L} ORDER BY "${Z}" ${H} LIMIT ? OFFSET ?`,args:[...V,B,W]})).rows||[]).map(N),total:A,page:Y,perPage:K,hasMore:X===!1?!1:W+Q<A}}catch(z){if(z instanceof G0&&z.category===E0.USER)throw z;let V=new G0({id:w0("LIBSQL","LIST_THREADS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{...J?.resourceId&&{resourceId:J.resourceId},hasMetadataFilter:!!J?.metadata}},z);return this.logger?.trackException?.(V),this.logger?.error?.(V.toString()),{threads:[],total:0,page:Y,perPage:K,hasMore:!1}}}async saveThread({thread:$}){try{return await this.#Y.insert({tableName:OX,record:{...$}}),$}catch(Y){let X=new G0({id:w0("LIBSQL","SAVE_THREAD","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{threadId:$.id}},Y);throw this.logger?.trackException?.(X),this.logger?.error?.(X.toString()),X}}async updateThread({id:$,title:Y,metadata:X}){let G=await this.getThreadById({threadId:$});if(!G)throw new G0({id:w0("LIBSQL","UPDATE_THREAD","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,text:`Thread ${$} not found`,details:{status:404,threadId:$}});let J={...G,title:Y,metadata:{...G.metadata,...X}};try{return await this.#$.execute({sql:`UPDATE ${OX} SET title = ?, metadata = jsonb(?) WHERE id = ?`,args:[Y,JSON.stringify(J.metadata),$]}),J}catch(Q){throw new G0({id:w0("LIBSQL","UPDATE_THREAD","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,text:`Failed to update thread ${$}`,details:{threadId:$}},Q)}}async deleteThread({threadId:$}){try{await this.#$.execute({sql:`DELETE FROM ${T5} WHERE thread_id = ?`,args:[$]}),await this.#$.execute({sql:`DELETE FROM ${OX} WHERE id = ?`,args:[$]})}catch(Y){throw new G0({id:w0("LIBSQL","DELETE_THREAD","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{threadId:$}},Y)}}async cloneThread($){let{sourceThreadId:Y,newThreadId:X,resourceId:G,title:J,metadata:Q,options:W}=$,K=await this.getThreadById({threadId:Y});if(!K)throw new G0({id:w0("LIBSQL","CLONE_THREAD","SOURCE_NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,text:`Source thread with id ${Y} not found`,details:{sourceThreadId:Y}});let Z=X||crypto.randomUUID();if(await this.getThreadById({threadId:Z}))throw new G0({id:w0("LIBSQL","CLONE_THREAD","THREAD_EXISTS"),domain:M0.STORAGE,category:E0.USER,text:`Thread with id ${Z} already exists`,details:{newThreadId:Z}});try{let z=`SELECT id, content, role, type, "createdAt", thread_id, "resourceId"
                          FROM "${T5}" WHERE thread_id = ?`,V=[Y];if(W?.messageFilter?.startDate)z+=' AND "createdAt" >= ?',V.push(W.messageFilter.startDate instanceof Date?W.messageFilter.startDate.toISOString():W.messageFilter.startDate);if(W?.messageFilter?.endDate)z+=' AND "createdAt" <= ?',V.push(W.messageFilter.endDate instanceof Date?W.messageFilter.endDate.toISOString():W.messageFilter.endDate);if(W?.messageFilter?.messageIds&&W.messageFilter.messageIds.length>0)z+=` AND id IN (${W.messageFilter.messageIds.map(()=>"?").join(", ")})`,V.push(...W.messageFilter.messageIds);if(z+=' ORDER BY "createdAt" ASC',W?.messageLimit&&W.messageLimit>0){let M=`SELECT * FROM (${z.replace('ORDER BY "createdAt" ASC','ORDER BY "createdAt" DESC')} LIMIT ?) ORDER BY "createdAt" ASC`;V.push(W.messageLimit),z=M}let L=(await this.#$.execute({sql:z,args:V})).rows||[],N=new Date,D=N.toISOString(),A=L.length>0?L[L.length-1].id:void 0,B={sourceThreadId:Y,clonedAt:N,...A&&{lastMessageId:A}},O={id:Z,resourceId:G||K.resourceId,title:J||(K.title?`Clone of ${K.title}`:""),metadata:{...Q,clone:B},createdAt:N,updatedAt:N},E=await this.#$.transaction("write");try{await E.execute({sql:`INSERT INTO "${OX}" (id, "resourceId", title, metadata, "createdAt", "updatedAt")
                VALUES (?, ?, ?, jsonb(?), ?, ?)`,args:[O.id,O.resourceId,O.title??"",JSON.stringify(O.metadata),D,D]});let M=[],R={},q=G||K.resourceId;for(let _ of L){let P=crypto.randomUUID();R[_.id]=P;let w=_.content,j;try{j=JSON.parse(w)}catch{j={format:2,parts:[{type:"text",text:w}]}}await E.execute({sql:`INSERT INTO "${T5}" (id, thread_id, content, role, type, "createdAt", "resourceId")
                  VALUES (?, ?, ?, ?, ?, ?, ?)`,args:[P,Z,w,_.role,_.type||"v2",_.createdAt,q]}),M.push({id:P,threadId:Z,content:j,role:_.role,type:_.type||void 0,createdAt:new Date(_.createdAt),resourceId:q})}return await E.commit(),{thread:O,clonedMessages:M,messageIdMap:R}}catch(M){throw await E.rollback(),M}}catch(z){if(z instanceof G0)throw z;throw new G0({id:w0("LIBSQL","CLONE_THREAD","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{sourceThreadId:Y,newThreadId:Z}},z)}}getOMKey($,Y){return $?`thread:${$}`:`resource:${Y}`}parseOMRow($){return{id:$.id,scope:$.scope,threadId:$.threadId||null,resourceId:$.resourceId,createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt),lastObservedAt:$.lastObservedAt?new Date($.lastObservedAt):void 0,originType:$.originType||"initial",generationCount:Number($.generationCount||0),activeObservations:$.activeObservations||"",bufferedObservationChunks:$.bufferedObservationChunks?typeof $.bufferedObservationChunks==="string"?JSON.parse($.bufferedObservationChunks):$.bufferedObservationChunks:void 0,bufferedObservations:$.activeObservationsPendingUpdate||void 0,bufferedObservationTokens:$.bufferedObservationTokens?Number($.bufferedObservationTokens):void 0,bufferedMessageIds:void 0,bufferedReflection:$.bufferedReflection||void 0,bufferedReflectionTokens:$.bufferedReflectionTokens?Number($.bufferedReflectionTokens):void 0,bufferedReflectionInputTokens:$.bufferedReflectionInputTokens?Number($.bufferedReflectionInputTokens):void 0,reflectedObservationLineCount:$.reflectedObservationLineCount?Number($.reflectedObservationLineCount):void 0,totalTokensObserved:Number($.totalTokensObserved||0),observationTokenCount:Number($.observationTokenCount||0),pendingMessageTokens:Number($.pendingMessageTokens||0),isReflecting:Boolean($.isReflecting),isObserving:Boolean($.isObserving),isBufferingObservation:$.isBufferingObservation===!0||$.isBufferingObservation==="true"||$.isBufferingObservation===1,isBufferingReflection:$.isBufferingReflection===!0||$.isBufferingReflection==="true"||$.isBufferingReflection===1,lastBufferedAtTokens:typeof $.lastBufferedAtTokens==="number"?$.lastBufferedAtTokens:parseInt(String($.lastBufferedAtTokens??"0"),10)||0,lastBufferedAtTime:$.lastBufferedAtTime?new Date(String($.lastBufferedAtTime)):null,config:$.config?JSON.parse($.config):{},metadata:$.metadata?JSON.parse($.metadata):void 0,observedMessageIds:$.observedMessageIds?JSON.parse($.observedMessageIds):void 0,observedTimezone:$.observedTimezone||void 0}}async getObservationalMemory($,Y){try{let X=this.getOMKey($,Y),G=await this.#$.execute({sql:`SELECT * FROM "${k5}" WHERE "lookupKey" = ? ORDER BY "generationCount" DESC LIMIT 1`,args:[X]});if(!G.rows||G.rows.length===0)return null;return this.parseOMRow(G.rows[0])}catch(X){throw new G0({id:w0("LIBSQL","GET_OBSERVATIONAL_MEMORY","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{threadId:$,resourceId:Y}},X)}}async getObservationalMemoryHistory($,Y,X=10,G){try{let J=this.getOMKey($,Y),Q=['"lookupKey" = ?'],W=[J];if(G?.from)Q.push('"createdAt" >= ?'),W.push(G.from.toISOString());if(G?.to)Q.push('"createdAt" <= ?'),W.push(G.to.toISOString());W.push(X);let K=`SELECT * FROM "${k5}" WHERE ${Q.join(" AND ")} ORDER BY "generationCount" DESC LIMIT ?`;if(G?.offset!=null)W.push(G.offset),K+=" OFFSET ?";let Z=await this.#$.execute({sql:K,args:W});if(!Z.rows)return[];return Z.rows.map((H)=>this.parseOMRow(H))}catch(J){throw new G0({id:w0("LIBSQL","GET_OBSERVATIONAL_MEMORY_HISTORY","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{threadId:$,resourceId:Y,limit:X}},J)}}async initializeObservationalMemory($){try{let Y=crypto.randomUUID(),X=new Date,G=this.getOMKey($.threadId,$.resourceId),J={id:Y,scope:$.scope,threadId:$.threadId,resourceId:$.resourceId,createdAt:X,updatedAt:X,lastObservedAt:void 0,originType:"initial",generationCount:0,activeObservations:"",totalTokensObserved:0,observationTokenCount:0,pendingMessageTokens:0,isReflecting:!1,isObserving:!1,isBufferingObservation:!1,isBufferingReflection:!1,lastBufferedAtTokens:0,lastBufferedAtTime:null,config:$.config,observedTimezone:$.observedTimezone};return await this.#$.execute({sql:`INSERT INTO "${k5}" (
          id, "lookupKey", scope, "resourceId", "threadId",
          "activeObservations", "activeObservationsPendingUpdate",
          "originType", config, "generationCount", "lastObservedAt", "lastReflectionAt",
          "pendingMessageTokens", "totalTokensObserved", "observationTokenCount",
          "isObserving", "isReflecting", "isBufferingObservation", "isBufferingReflection", "lastBufferedAtTokens", "lastBufferedAtTime",
          "observedTimezone", "createdAt", "updatedAt"
        ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,args:[Y,G,$.scope,$.resourceId,$.threadId||null,"",null,"initial",JSON.stringify($.config),0,null,null,0,0,0,!1,!1,!1,!1,0,null,$.observedTimezone||null,X.toISOString(),X.toISOString()]}),J}catch(Y){throw new G0({id:w0("LIBSQL","INITIALIZE_OBSERVATIONAL_MEMORY","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{threadId:$.threadId,resourceId:$.resourceId}},Y)}}async insertObservationalMemoryRecord($){try{let Y=this.getOMKey($.threadId,$.resourceId);await this.#$.execute({sql:`INSERT INTO "${k5}" (
          id, "lookupKey", scope, "resourceId", "threadId",
          "activeObservations", "activeObservationsPendingUpdate",
          "originType", config, "generationCount", "lastObservedAt", "lastReflectionAt",
          "pendingMessageTokens", "totalTokensObserved", "observationTokenCount",
          "observedMessageIds", "bufferedObservationChunks",
          "bufferedReflection", "bufferedReflectionTokens", "bufferedReflectionInputTokens",
          "reflectedObservationLineCount",
          "isObserving", "isReflecting", "isBufferingObservation", "isBufferingReflection",
          "lastBufferedAtTokens", "lastBufferedAtTime",
          "observedTimezone", metadata, "createdAt", "updatedAt"
        ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,args:[$.id,Y,$.scope,$.resourceId,$.threadId||null,$.activeObservations||"",null,$.originType||"initial",$.config?JSON.stringify($.config):null,$.generationCount||0,$.lastObservedAt?$.lastObservedAt.toISOString():null,null,$.pendingMessageTokens||0,$.totalTokensObserved||0,$.observationTokenCount||0,$.observedMessageIds?JSON.stringify($.observedMessageIds):null,$.bufferedObservationChunks?JSON.stringify($.bufferedObservationChunks):null,$.bufferedReflection||null,$.bufferedReflectionTokens??null,$.bufferedReflectionInputTokens??null,$.reflectedObservationLineCount??null,$.isObserving||!1,$.isReflecting||!1,$.isBufferingObservation||!1,$.isBufferingReflection||!1,$.lastBufferedAtTokens||0,$.lastBufferedAtTime?$.lastBufferedAtTime.toISOString():null,$.observedTimezone||null,$.metadata?JSON.stringify($.metadata):null,$.createdAt.toISOString(),$.updatedAt.toISOString()]})}catch(Y){throw new G0({id:w0("LIBSQL","INSERT_OBSERVATIONAL_MEMORY_RECORD","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id,threadId:$.threadId,resourceId:$.resourceId}},Y)}}async updateActiveObservations($){try{let Y=new Date,X=$.observedMessageIds?JSON.stringify($.observedMessageIds):null;if((await this.#$.execute({sql:`UPDATE "${k5}" SET
          "activeObservations" = ?,
          "lastObservedAt" = ?,
          "pendingMessageTokens" = 0,
          "observationTokenCount" = ?,
          "totalTokensObserved" = "totalTokensObserved" + ?,
          "observedMessageIds" = ?,
          "updatedAt" = ?
        WHERE id = ?`,args:[$.observations,$.lastObservedAt.toISOString(),$.tokenCount,$.tokenCount,X,Y.toISOString(),$.id]})).rowsAffected===0)throw new G0({id:w0("LIBSQL","UPDATE_ACTIVE_OBSERVATIONS","NOT_FOUND"),text:`Observational memory record not found: ${$.id}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","UPDATE_ACTIVE_OBSERVATIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}},Y)}}async createReflectionGeneration($){try{let Y=crypto.randomUUID(),X=new Date,G=this.getOMKey($.currentRecord.threadId,$.currentRecord.resourceId),J={id:Y,scope:$.currentRecord.scope,threadId:$.currentRecord.threadId,resourceId:$.currentRecord.resourceId,createdAt:X,updatedAt:X,lastObservedAt:$.currentRecord.lastObservedAt,originType:"reflection",generationCount:$.currentRecord.generationCount+1,activeObservations:$.reflection,totalTokensObserved:$.currentRecord.totalTokensObserved,observationTokenCount:$.tokenCount,pendingMessageTokens:0,isReflecting:!1,isObserving:!1,isBufferingObservation:!1,isBufferingReflection:!1,lastBufferedAtTokens:0,lastBufferedAtTime:null,config:$.currentRecord.config,metadata:$.currentRecord.metadata,observedTimezone:$.currentRecord.observedTimezone};return await this.#$.execute({sql:`INSERT INTO "${k5}" (
          id, "lookupKey", scope, "resourceId", "threadId",
          "activeObservations", "activeObservationsPendingUpdate",
          "originType", config, "generationCount", "lastObservedAt", "lastReflectionAt",
          "pendingMessageTokens", "totalTokensObserved", "observationTokenCount",
          "isObserving", "isReflecting", "isBufferingObservation", "isBufferingReflection", "lastBufferedAtTokens", "lastBufferedAtTime",
          "observedTimezone", metadata, "createdAt", "updatedAt"
        ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,args:[Y,G,J.scope,J.resourceId,J.threadId||null,$.reflection,null,"reflection",JSON.stringify(J.config),$.currentRecord.generationCount+1,J.lastObservedAt?.toISOString()||null,X.toISOString(),J.pendingMessageTokens,J.totalTokensObserved,J.observationTokenCount,!1,!1,!1,!1,0,null,J.observedTimezone||null,J.metadata?JSON.stringify(J.metadata):null,X.toISOString(),X.toISOString()]}),J}catch(Y){throw new G0({id:w0("LIBSQL","CREATE_REFLECTION_GENERATION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{currentRecordId:$.currentRecord.id}},Y)}}async setReflectingFlag($,Y){try{if((await this.#$.execute({sql:`UPDATE "${k5}" SET "isReflecting" = ?, "updatedAt" = ? WHERE id = ?`,args:[Y,new Date().toISOString(),$]})).rowsAffected===0)throw new G0({id:w0("LIBSQL","SET_REFLECTING_FLAG","NOT_FOUND"),text:`Observational memory record not found: ${$}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,isReflecting:Y}})}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","SET_REFLECTING_FLAG","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,isReflecting:Y}},X)}}async setObservingFlag($,Y){try{if((await this.#$.execute({sql:`UPDATE "${k5}" SET "isObserving" = ?, "updatedAt" = ? WHERE id = ?`,args:[Y,new Date().toISOString(),$]})).rowsAffected===0)throw new G0({id:w0("LIBSQL","SET_OBSERVING_FLAG","NOT_FOUND"),text:`Observational memory record not found: ${$}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,isObserving:Y}})}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","SET_OBSERVING_FLAG","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,isObserving:Y}},X)}}async setBufferingObservationFlag($,Y,X){try{let G=new Date().toISOString(),J,Q;if(X!==void 0)J=`UPDATE "${k5}" SET "isBufferingObservation" = ?, "lastBufferedAtTokens" = ?, "updatedAt" = ? WHERE id = ?`,Q=[Y,X,G,$];else J=`UPDATE "${k5}" SET "isBufferingObservation" = ?, "updatedAt" = ? WHERE id = ?`,Q=[Y,G,$];if((await this.#$.execute({sql:J,args:Q})).rowsAffected===0)throw new G0({id:w0("LIBSQL","SET_BUFFERING_OBSERVATION_FLAG","NOT_FOUND"),text:`Observational memory record not found: ${$}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,isBuffering:Y,lastBufferedAtTokens:X??null}})}catch(G){if(G instanceof G0)throw G;throw new G0({id:w0("LIBSQL","SET_BUFFERING_OBSERVATION_FLAG","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,isBuffering:Y,lastBufferedAtTokens:X??null}},G)}}async setBufferingReflectionFlag($,Y){try{if((await this.#$.execute({sql:`UPDATE "${k5}" SET "isBufferingReflection" = ?, "updatedAt" = ? WHERE id = ?`,args:[Y,new Date().toISOString(),$]})).rowsAffected===0)throw new G0({id:w0("LIBSQL","SET_BUFFERING_REFLECTION_FLAG","NOT_FOUND"),text:`Observational memory record not found: ${$}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,isBuffering:Y}})}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","SET_BUFFERING_REFLECTION_FLAG","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,isBuffering:Y}},X)}}async clearObservationalMemory($,Y){try{let X=this.getOMKey($,Y);await this.#$.execute({sql:`DELETE FROM "${k5}" WHERE "lookupKey" = ?`,args:[X]})}catch(X){throw new G0({id:w0("LIBSQL","CLEAR_OBSERVATIONAL_MEMORY","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{threadId:$,resourceId:Y}},X)}}async setPendingMessageTokens($,Y){try{if((await this.#$.execute({sql:`UPDATE "${k5}" SET 
          "pendingMessageTokens" = ?, 
          "updatedAt" = ? 
        WHERE id = ?`,args:[Y,new Date().toISOString(),$]})).rowsAffected===0)throw new G0({id:w0("LIBSQL","SET_PENDING_MESSAGE_TOKENS","NOT_FOUND"),text:`Observational memory record not found: ${$}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,tokenCount:Y}})}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","SET_PENDING_MESSAGE_TOKENS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$,tokenCount:Y}},X)}}async updateObservationalMemoryConfig($){try{let Y=await this.#$.execute({sql:`SELECT config FROM "${k5}" WHERE id = ?`,args:[$.id]});if(Y.rows.length===0)throw new G0({id:w0("LIBSQL","UPDATE_OM_CONFIG","NOT_FOUND"),text:`Observational memory record not found: ${$.id}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}});let X=Y.rows[0],G=X.config?JSON.parse(X.config):{},J=this.deepMergeConfig(G,$.config);await this.#$.execute({sql:`UPDATE "${k5}" SET config = ?, "updatedAt" = ? WHERE id = ?`,args:[JSON.stringify(J),new Date().toISOString(),$.id]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","UPDATE_OM_CONFIG","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}},Y)}}async updateBufferedObservations($){try{let Y=new Date().toISOString(),X=await this.#$.execute({sql:`SELECT "bufferedObservationChunks" FROM "${k5}" WHERE id = ?`,args:[$.id]});if(!X.rows||X.rows.length===0)throw new G0({id:w0("LIBSQL","UPDATE_BUFFERED_OBSERVATIONS","NOT_FOUND"),text:`Observational memory record not found: ${$.id}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}});let G=X.rows[0],J=[];if(G.bufferedObservationChunks)try{let H=typeof G.bufferedObservationChunks==="string"?JSON.parse(G.bufferedObservationChunks):G.bufferedObservationChunks;J=Array.isArray(H)?H:[]}catch{J=[]}let Q={id:`ombuf-${DZ9()}`,cycleId:$.chunk.cycleId,observations:$.chunk.observations,tokenCount:$.chunk.tokenCount,messageIds:$.chunk.messageIds,messageTokens:$.chunk.messageTokens,lastObservedAt:$.chunk.lastObservedAt,createdAt:new Date,suggestedContinuation:$.chunk.suggestedContinuation,currentTask:$.chunk.currentTask,threadTitle:$.chunk.threadTitle},W=[...J,Q],K=$.lastBufferedAtTime?$.lastBufferedAtTime.toISOString():null;if((await this.#$.execute({sql:`UPDATE "${k5}" SET
          "bufferedObservationChunks" = ?,
          "lastBufferedAtTime" = COALESCE(?, "lastBufferedAtTime"),
          "updatedAt" = ?
        WHERE id = ?`,args:[JSON.stringify(W),K,Y,$.id]})).rowsAffected===0)throw new G0({id:w0("LIBSQL","UPDATE_BUFFERED_OBSERVATIONS","NOT_FOUND"),text:`Observational memory record not found: ${$.id}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","UPDATE_BUFFERED_OBSERVATIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}},Y)}}async swapBufferedToActive($){try{let Y=new Date().toISOString(),X=await this.#$.execute({sql:`SELECT * FROM "${k5}" WHERE id = ?`,args:[$.id]});if(!X.rows||X.rows.length===0)throw new G0({id:w0("LIBSQL","SWAP_BUFFERED_TO_ACTIVE","NOT_FOUND"),text:`Observational memory record not found: ${$.id}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}});let G=X.rows[0],J=[];if(G.bufferedObservationChunks)try{let p=typeof G.bufferedObservationChunks==="string"?JSON.parse(G.bufferedObservationChunks):G.bufferedObservationChunks;J=Array.isArray(p)?p:[]}catch{J=[]}if(J.length===0)return{chunksActivated:0,messageTokensActivated:0,observationTokensActivated:0,messagesActivated:0,activatedCycleIds:[],activatedMessageIds:[]};let Q=$.messageTokensThreshold*(1-$.activationRatio),W=Math.max(0,$.currentPendingTokens-Q),K=0,Z=0,H=0,z=0,V=0;for(let p=0;p<J.length;p++){K+=J[p].messageTokens??0;let h=p+1;if(K>=W){if(Z===0||K<H)Z=h,H=K}else if(K>V)z=h,V=K}let F=Q*0.95,L=H-W,N=$.currentPendingTokens-H,D=$.currentPendingTokens-V,A=Math.min(1000,Q),B;if($.forceMaxActivation&&Z>0&&N>=A)B=Z;else if(Z>0&&L<=F&&N>=A)B=Z;else if(z>0&&D>=A)B=z;else if(Z>0)B=Z;else B=1;let O=J.slice(0,B),E=J.slice(B),M=O.map((p)=>p.observations).join(`

`),R=O.reduce((p,h)=>p+h.tokenCount,0),q=O.reduce((p,h)=>p+(h.messageTokens??0),0),_=O.reduce((p,h)=>p+h.messageIds.length,0),P=O.map((p)=>p.cycleId).filter((p)=>!!p),w=O.flatMap((p)=>p.messageIds??[]),j=O[O.length-1],C=$.lastObservedAt??(j?.lastObservedAt?new Date(j.lastObservedAt):new Date),k=C.toISOString(),S=G.activeObservations||"",I=Number(G.observationTokenCount||0),v=`

--- message boundary (${C.toISOString()}) ---

`,x=S?`${S}${v}${M}`:M,y=I+R,d=Number(G.pendingMessageTokens||0),u=Math.max(0,d-q);if((await this.#$.execute({sql:`UPDATE "${k5}" SET
          "activeObservations" = ?,
          "observationTokenCount" = ?,
          "pendingMessageTokens" = ?,
          "bufferedObservationChunks" = ?,
          "lastObservedAt" = ?,
          "updatedAt" = ?
        WHERE id = ?
          AND "bufferedObservationChunks" IS NOT NULL
          AND "bufferedObservationChunks" != '[]'`,args:[x,y,u,E.length>0?JSON.stringify(E):null,k,Y,$.id]})).rowsAffected===0)return{chunksActivated:0,messageTokensActivated:0,observationTokensActivated:0,messagesActivated:0,activatedCycleIds:[],activatedMessageIds:[]};let g=O[O.length-1];return{chunksActivated:O.length,messageTokensActivated:q,observationTokensActivated:R,messagesActivated:_,activatedCycleIds:P,activatedMessageIds:w,observations:M,perChunk:O.map((p)=>({cycleId:p.cycleId??"",messageTokens:p.messageTokens??0,observationTokens:p.tokenCount,messageCount:p.messageIds.length,observations:p.observations})),suggestedContinuation:g?.suggestedContinuation??void 0,currentTask:g?.currentTask??void 0}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","SWAP_BUFFERED_TO_ACTIVE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}},Y)}}async updateBufferedReflection($){try{let Y=new Date().toISOString();if((await this.#$.execute({sql:`UPDATE "${k5}" SET
          "bufferedReflection" = CASE
            WHEN "bufferedReflection" IS NOT NULL AND "bufferedReflection" != ''
            THEN "bufferedReflection" || char(10) || char(10) || ?
            ELSE ?
          END,
          "bufferedReflectionTokens" = COALESCE("bufferedReflectionTokens", 0) + ?,
          "bufferedReflectionInputTokens" = COALESCE("bufferedReflectionInputTokens", 0) + ?,
          "reflectedObservationLineCount" = ?,
          "updatedAt" = ?
        WHERE id = ?`,args:[$.reflection,$.reflection,$.tokenCount,$.inputTokenCount,$.reflectedObservationLineCount,Y,$.id]})).rowsAffected===0)throw new G0({id:w0("LIBSQL","UPDATE_BUFFERED_REFLECTION","NOT_FOUND"),text:`Observational memory record not found: ${$.id}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","UPDATE_BUFFERED_REFLECTION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.id}},Y)}}async swapBufferedReflectionToActive($){try{let Y=await this.#$.execute({sql:`SELECT * FROM "${k5}" WHERE id = ?`,args:[$.currentRecord.id]});if(!Y.rows||Y.rows.length===0)throw new G0({id:w0("LIBSQL","SWAP_BUFFERED_REFLECTION_TO_ACTIVE","NOT_FOUND"),text:`Observational memory record not found: ${$.currentRecord.id}`,domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.currentRecord.id}});let X=Y.rows[0],G=X.bufferedReflection||"",J=Number(X.reflectedObservationLineCount||0);if(!G)throw new G0({id:w0("LIBSQL","SWAP_BUFFERED_REFLECTION_TO_ACTIVE","NO_CONTENT"),text:"No buffered reflection to swap",domain:M0.STORAGE,category:E0.USER,details:{id:$.currentRecord.id}});let Z=(X.activeObservations||"").split(`
`).slice(J).join(`
`).trim(),H=Z?`${G}

${Z}`:G,z=await this.createReflectionGeneration({currentRecord:$.currentRecord,reflection:H,tokenCount:$.tokenCount}),V=new Date().toISOString();return await this.#$.execute({sql:`UPDATE "${k5}" SET
          "bufferedReflection" = NULL,
          "bufferedReflectionTokens" = NULL,
          "bufferedReflectionInputTokens" = NULL,
          "reflectedObservationLineCount" = NULL,
          "updatedAt" = ?
        WHERE id = ?`,args:[V,$.currentRecord.id]}),z}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","SWAP_BUFFERED_REFLECTION_TO_ACTIVE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{id:$.currentRecord.id}},Y)}}},xZ9=class extends rg{#$;constructor($){super();let Y=sY($);this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:H6,schema:nj}),await this.#$.alterTable({tableName:H6,schema:nj,ifNotExists:["requestContext"]})}async dangerouslyClearAll(){await this.#$.deleteData({tableName:H6})}async migrateSpans(){return this.#$.migrateSpans()}async checkSpansMigrationStatus(){return this.#$.checkSpansMigrationStatus()}get tracingStrategy(){return{preferred:"batch-with-updates",supported:["batch-with-updates","insert-only"]}}async createSpan($){let{span:Y}=$;try{let X=Y.startedAt instanceof Date?Y.startedAt.toISOString():Y.startedAt,G=Y.endedAt instanceof Date?Y.endedAt.toISOString():Y.endedAt,J=new Date().toISOString(),Q={...Y,startedAt:X,endedAt:G,createdAt:J,updatedAt:J};return this.#$.insert({tableName:H6,record:Q})}catch(X){throw new G0({id:w0("LIBSQL","CREATE_SPAN","FAILED"),domain:M0.STORAGE,category:E0.USER,details:{spanId:Y.spanId,traceId:Y.traceId,spanType:Y.spanType,name:Y.name}},X)}}async getSpan($){let{traceId:Y,spanId:X}=$;try{let G=await this.#$.selectMany({tableName:H6,whereClause:{sql:" WHERE traceId = ? AND spanId = ?",args:[Y,X]},limit:1});if(!G||G.length===0)return null;return{span:Np({tableName:H6,sqlRow:G[0]})}}catch(G){throw new G0({id:w0("LIBSQL","GET_SPAN","FAILED"),domain:M0.STORAGE,category:E0.USER,details:{traceId:Y,spanId:X}},G)}}async getRootSpan($){let{traceId:Y}=$;try{let X=await this.#$.selectMany({tableName:H6,whereClause:{sql:" WHERE traceId = ? AND parentSpanId IS NULL",args:[Y]},limit:1});if(!X||X.length===0)return null;return{span:Np({tableName:H6,sqlRow:X[0]})}}catch(X){throw new G0({id:w0("LIBSQL","GET_ROOT_SPAN","FAILED"),domain:M0.STORAGE,category:E0.USER,details:{traceId:Y}},X)}}async getTrace($){let{traceId:Y}=$;try{let X=await this.#$.selectMany({tableName:H6,whereClause:{sql:" WHERE traceId = ?",args:[Y]},orderBy:"startedAt ASC"});if(!X||X.length===0)return null;return{traceId:Y,spans:X.map((G)=>Np({tableName:H6,sqlRow:G}))}}catch(X){throw new G0({id:w0("LIBSQL","GET_TRACE","FAILED"),domain:M0.STORAGE,category:E0.USER,details:{traceId:Y}},X)}}async getTraceLight($){let{traceId:Y}=$;try{let X=await this.#$.selectMany({tableName:H6,whereClause:{sql:" WHERE traceId = ?",args:[Y]},orderBy:"startedAt ASC"});if(!X||X.length===0)return null;return{traceId:Y,spans:X.map((G)=>{let J=Np({tableName:H6,sqlRow:G}),{input:Q,output:W,attributes:K,metadata:Z,tags:H,links:z,...V}=J;return V})}}catch(X){throw new G0({id:w0("LIBSQL","GET_TRACE_LIGHT","FAILED"),domain:M0.STORAGE,category:E0.USER,details:{traceId:Y}},X)}}async updateSpan($){let{traceId:Y,spanId:X,updates:G}=$;try{let J={...G};if(J.endedAt instanceof Date)J.endedAt=J.endedAt.toISOString();if(J.startedAt instanceof Date)J.startedAt=J.startedAt.toISOString();J.updatedAt=new Date().toISOString(),await this.#$.update({tableName:H6,keys:{spanId:X,traceId:Y},data:J})}catch(J){throw new G0({id:w0("LIBSQL","UPDATE_SPAN","FAILED"),domain:M0.STORAGE,category:E0.USER,details:{spanId:X,traceId:Y}},J)}}async listTraces($){let{filters:Y,pagination:X,orderBy:G}=lj.parse($),J=X?.page??0,Q=X?.perPage??10,W=y$(H6,"table name");try{let K=["parentSpanId IS NULL"],Z=[];if(Y){if(Y.startedAt?.start)K.push("startedAt >= ?"),Z.push(Y.startedAt.start.toISOString());if(Y.startedAt?.end)K.push("startedAt <= ?"),Z.push(Y.startedAt.end.toISOString());if(Y.endedAt?.start)K.push("endedAt >= ?"),Z.push(Y.endedAt.start.toISOString());if(Y.endedAt?.end)K.push("endedAt <= ?"),Z.push(Y.endedAt.end.toISOString());if(Y.spanType!==void 0)K.push("spanType = ?"),Z.push(Y.spanType);if(Y.entityType!==void 0)K.push("entityType = ?"),Z.push(Y.entityType);if(Y.entityId!==void 0)K.push("entityId = ?"),Z.push(Y.entityId);if(Y.entityName!==void 0)K.push("entityName = ?"),Z.push(Y.entityName);if(Y.userId!==void 0)K.push("userId = ?"),Z.push(Y.userId);if(Y.organizationId!==void 0)K.push("organizationId = ?"),Z.push(Y.organizationId);if(Y.resourceId!==void 0)K.push("resourceId = ?"),Z.push(Y.resourceId);if(Y.runId!==void 0)K.push("runId = ?"),Z.push(Y.runId);if(Y.sessionId!==void 0)K.push("sessionId = ?"),Z.push(Y.sessionId);if(Y.threadId!==void 0)K.push("threadId = ?"),Z.push(Y.threadId);if(Y.requestId!==void 0)K.push("requestId = ?"),Z.push(Y.requestId);if(Y.environment!==void 0)K.push("environment = ?"),Z.push(Y.environment);if(Y.source!==void 0)K.push("source = ?"),Z.push(Y.source);if(Y.serviceName!==void 0)K.push("serviceName = ?"),Z.push(Y.serviceName);if(Y.scope!=null)for(let[D,A]of Object.entries(Y.scope)){if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(D))throw new G0({id:w0("LIBSQL","LIST_TRACES","INVALID_FILTER_KEY"),domain:M0.STORAGE,category:E0.USER,details:{key:D}});K.push(`json_extract(scope, '$.${D}') = ?`),Z.push(typeof A==="string"?A:JSON.stringify(A))}if(Y.metadata!=null)for(let[D,A]of Object.entries(Y.metadata)){if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(D))throw new G0({id:w0("LIBSQL","LIST_TRACES","INVALID_FILTER_KEY"),domain:M0.STORAGE,category:E0.USER,details:{key:D}});K.push(`json_extract(metadata, '$.${D}') = ?`),Z.push(typeof A==="string"?A:JSON.stringify(A))}if(Y.tags!=null&&Y.tags.length>0)for(let D of Y.tags)K.push(`EXISTS (SELECT 1 FROM json_each(${W}.tags) WHERE value = ?)`),Z.push(D);if(Y.status!==void 0)switch(Y.status){case VD.ERROR:K.push("error IS NOT NULL");break;case VD.RUNNING:K.push("endedAt IS NULL AND error IS NULL");break;case VD.SUCCESS:K.push("endedAt IS NOT NULL AND error IS NULL");break}if(Y.hasChildError!==void 0)if(Y.hasChildError)K.push(`EXISTS (
              SELECT 1 FROM ${W} c
              WHERE c.traceId = ${W}.traceId AND c.error IS NOT NULL
            )`);else K.push(`NOT EXISTS (
              SELECT 1 FROM ${W} c
              WHERE c.traceId = ${W}.traceId AND c.error IS NOT NULL
            )`)}let H=K.length>0?`WHERE ${K.join(" AND ")}`:"",z=G?.field??"startedAt",V=G?.direction??"DESC",F;if(z==="endedAt")F=V==="DESC"?`CASE WHEN ${z} IS NULL THEN 0 ELSE 1 END, ${z} DESC`:`CASE WHEN ${z} IS NULL THEN 1 ELSE 0 END, ${z} ASC`;else F=`${z} ${V}`;let L=await this.#$.selectTotalCount({tableName:H6,whereClause:{sql:H,args:Z}});if(L===0)return{pagination:{total:0,page:J,perPage:Q,hasMore:!1},spans:[]};let N=await this.#$.selectMany({tableName:H6,whereClause:{sql:H,args:Z},orderBy:F,offset:J*Q,limit:Q});return{pagination:{total:L,page:J,perPage:Q,hasMore:(J+1)*Q<L},spans:cj(N.map((D)=>Np({tableName:H6,sqlRow:D})))}}catch(K){throw new G0({id:w0("LIBSQL","LIST_TRACES","FAILED"),domain:M0.STORAGE,category:E0.USER},K)}}async batchCreateSpans($){try{let Y=new Date().toISOString(),X=$.records.map((G)=>{let J=G.startedAt instanceof Date?G.startedAt.toISOString():G.startedAt,Q=G.endedAt instanceof Date?G.endedAt.toISOString():G.endedAt;return{...G,startedAt:J,endedAt:Q,createdAt:Y,updatedAt:Y}});return this.#$.batchInsert({tableName:H6,records:X})}catch(Y){throw new G0({id:w0("LIBSQL","BATCH_CREATE_SPANS","FAILED"),domain:M0.STORAGE,category:E0.USER},Y)}}async batchUpdateSpans($){let Y=new Date().toISOString();try{return this.#$.batchUpdate({tableName:H6,updates:$.records.map((X)=>{let G={...X.updates};if(G.endedAt instanceof Date)G.endedAt=G.endedAt.toISOString();if(G.startedAt instanceof Date)G.startedAt=G.startedAt.toISOString();return G.updatedAt=Y,{keys:{spanId:X.spanId,traceId:X.traceId},data:G}})})}catch(X){throw new G0({id:w0("LIBSQL","BATCH_UPDATE_SPANS","FAILED"),domain:M0.STORAGE,category:E0.USER},X)}}async batchDeleteTraces($){try{let Y=$.traceIds.map((X)=>({traceId:X}));return this.#$.batchDelete({tableName:H6,keys:Y})}catch(Y){throw new G0({id:w0("LIBSQL","BATCH_DELETE_TRACES","FAILED"),domain:M0.STORAGE,category:E0.USER},Y)}}},yZ9=class extends bj{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:PQ,schema:yg}),await this.#$.createTable({tableName:w7,schema:rj}),await this.#$.alterTable({tableName:w7,schema:rj,ifNotExists:["requestContextSchema"]}),await this.#Y.execute(`CREATE UNIQUE INDEX IF NOT EXISTS idx_prompt_block_versions_block_version ON "${w7}" ("blockId", "versionNumber")`)}async dangerouslyClearAll(){await this.#$.deleteData({tableName:PQ}),await this.#$.deleteData({tableName:w7})}async getById($){try{let X=(await this.#Y.execute({sql:`SELECT ${E4(PQ)} FROM "${PQ}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#X(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_PROMPT_BLOCK","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async create($){let{promptBlock:Y}=$;try{let X=new Date;await this.#$.insert({tableName:PQ,record:{id:Y.id,status:"draft",activeVersionId:null,authorId:Y.authorId??null,metadata:Y.metadata??null,createdAt:X.toISOString(),updatedAt:X.toISOString()}});let{id:G,authorId:J,metadata:Q,...W}=Y,K=crypto.randomUUID();return await this.createVersion({id:K,blockId:Y.id,versionNumber:1,...W,changedFields:Object.keys(W),changeMessage:"Initial version"}),{id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X}}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","CREATE_PROMPT_BLOCK","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async update($){let{id:Y,...X}=$;try{let G=await this.getById(Y);if(!G)throw Error(`Prompt block with id ${Y} not found`);let{authorId:J,activeVersionId:Q,metadata:W,status:K}=X,Z={updatedAt:new Date().toISOString()};if(J!==void 0)Z.authorId=J;if(Q!==void 0)Z.activeVersionId=Q;if(K!==void 0)Z.status=K;if(W!==void 0)Z.metadata={...G.metadata,...W};await this.#$.update({tableName:PQ,keys:{id:Y},data:Z});let H=await this.getById(Y);if(!H)throw new G0({id:w0("LIBSQL","UPDATE_PROMPT_BLOCK","NOT_FOUND_AFTER_UPDATE"),domain:M0.STORAGE,category:E0.SYSTEM,text:`Prompt block ${Y} not found after update`,details:{id:Y}});return H}catch(G){if(G instanceof G0)throw G;throw new G0({id:w0("LIBSQL","UPDATE_PROMPT_BLOCK","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},G)}}async delete($){try{await this.deleteVersionsByParentId($),await this.#Y.execute({sql:`DELETE FROM "${PQ}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_PROMPT_BLOCK","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async list($){try{let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W}=$||{},{field:K,direction:Z}=this.parseOrderBy(G),H=[],z=[];if(W)H.push("status = ?"),z.push(W);if(J!==void 0)H.push("authorId = ?"),z.push(J);if(Q&&Object.keys(Q).length>0)for(let[R,q]of Object.entries(Q)){if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(R))throw new G0({id:w0("LIBSQL","LIST_PROMPT_BLOCKS","INVALID_METADATA_KEY"),domain:M0.STORAGE,category:E0.USER,text:`Invalid metadata key: ${R}. Keys must be alphanumeric with underscores.`,details:{key:R}});H.push(`json_extract(metadata, '$.${R}') = ?`),z.push(typeof q==="string"?q:JSON.stringify(q))}let V=H.length>0?`WHERE ${H.join(" AND ")}`:"",F=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${PQ}" ${V}`,args:z}),L=Number(F.rows?.[0]?.count??0);if(L===0)return{promptBlocks:[],total:0,page:Y,perPage:X??100,hasMore:!1};let N=F4(X,100),{offset:D,perPage:A}=B4(Y,X,N),B=X===!1?L:N,O=X===!1?L:D+N;return{promptBlocks:(await this.#Y.execute({sql:`SELECT ${E4(PQ)} FROM "${PQ}" ${V} ORDER BY ${K} ${Z} LIMIT ? OFFSET ?`,args:[...z,B,D]})).rows?.map((R)=>this.#X(R))??[],total:L,page:Y,perPage:A,hasMore:O<L}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","LIST_PROMPT_BLOCKS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async createVersion($){try{let Y=new Date;return await this.#$.insert({tableName:w7,record:{id:$.id,blockId:$.blockId,versionNumber:$.versionNumber,name:$.name,description:$.description??null,content:$.content,rules:$.rules??null,requestContextSchema:$.requestContextSchema??null,changedFields:$.changedFields??null,changeMessage:$.changeMessage??null,createdAt:Y.toISOString()}}),{...$,createdAt:Y}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","CREATE_PROMPT_BLOCK_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${E4(w7)} FROM "${w7}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_PROMPT_BLOCK_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersionByNumber($,Y){try{let G=(await this.#Y.execute({sql:`SELECT ${E4(w7)} FROM "${w7}" WHERE blockId = ? AND versionNumber = ?`,args:[$,Y]})).rows?.[0];return G?this.#J(G):null}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","GET_PROMPT_BLOCK_VERSION_BY_NUMBER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async getLatestVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${E4(w7)} FROM "${w7}" WHERE blockId = ? ORDER BY versionNumber DESC LIMIT 1`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_LATEST_PROMPT_BLOCK_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listVersions($){try{let{blockId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),K=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${w7}" WHERE blockId = ?`,args:[Y]}),Z=Number(K.rows?.[0]?.count??0);if(Z===0)return{versions:[],total:0,page:X,perPage:G??20,hasMore:!1};let H=F4(G,20),{offset:z,perPage:V}=B4(X,G,H),F=G===!1?Z:H,L=G===!1?Z:z+H;return{versions:(await this.#Y.execute({sql:`SELECT ${E4(w7)} FROM "${w7}" WHERE blockId = ? ORDER BY ${Q} ${W} LIMIT ? OFFSET ?`,args:[Y,F,z]})).rows?.map((A)=>this.#J(A))??[],total:Z,page:X,perPage:V,hasMore:L<Z}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","LIST_PROMPT_BLOCK_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersion($){try{await this.#Y.execute({sql:`DELETE FROM "${w7}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_PROMPT_BLOCK_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersionsByParentId($){try{await this.#Y.execute({sql:`DELETE FROM "${w7}" WHERE "blockId" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_PROMPT_BLOCK_VERSIONS_BY_BLOCK","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async countVersions($){try{let Y=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${w7}" WHERE blockId = ?`,args:[$]});return Number(Y.rows?.[0]?.count??0)}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","COUNT_PROMPT_BLOCK_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}#X($){let Y=(X)=>{if(X===null||X===void 0)return;if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X};return{id:$.id,status:$.status??"draft",activeVersionId:$.activeVersionId??void 0,authorId:$.authorId??void 0,metadata:Y($.metadata),createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt)}}#J($){let Y=(X)=>{if(X===null||X===void 0)return;if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X};return{id:$.id,blockId:$.blockId,versionNumber:Number($.versionNumber),name:$.name,description:$.description??void 0,content:$.content,rules:Y($.rules),requestContextSchema:Y($.requestContextSchema),changedFields:Y($.changedFields),changeMessage:$.changeMessage??void 0,createdAt:new Date($.createdAt)}}};function Zp0($){if($==null)return;if(typeof $==="string")try{return JSON.parse($)}catch{return $}return $}function aI($){if(typeof $==="bigint")return Number($);return Number($)}function Kp0($){let Y=Zp0($.target);if(!Y)throw Error(`Schedule row ${$.id} has invalid target`);let X={id:String($.id),target:Y,cron:String($.cron),status:String($.status),nextFireAt:aI($.next_fire_at),createdAt:aI($.created_at),updatedAt:aI($.updated_at)};if($.timezone!=null)X.timezone=String($.timezone);if($.last_fire_at!=null)X.lastFireAt=aI($.last_fire_at);if($.last_run_id!=null)X.lastRunId=String($.last_run_id);let G=Zp0($.metadata);if(G!==void 0)X.metadata=G;if($.owner_type!=null)X.ownerType=String($.owner_type);if($.owner_id!=null)X.ownerId=String($.owner_id);return X}function bZ9($){let Y={id:$.id!=null?String($.id):void 0,scheduleId:String($.schedule_id),runId:$.run_id!=null?String($.run_id):null,scheduledFireAt:aI($.scheduled_fire_at),actualFireAt:aI($.actual_fire_at),outcome:String($.outcome),triggerKind:$.trigger_kind!=null?String($.trigger_kind):"schedule-fire"};if($.error!=null)Y.error=String($.error);if($.parent_trigger_id!=null)Y.parentTriggerId=String($.parent_trigger_id);let X=Zp0($.metadata);if(X!==void 0)Y.metadata=X;return Y}var hZ9=class extends Ym{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:EX,schema:F5[EX]}),await this.#$.createTable({tableName:bZ,schema:F5[bZ]})}async dangerouslyClearAll(){await this.#$.deleteData({tableName:bZ}),await this.#$.deleteData({tableName:EX})}async createSchedule($){if(await this.getSchedule($.id))throw Error(`Schedule with id "${$.id}" already exists`);return await this.#$.insert({tableName:EX,record:{id:$.id,target:$.target,cron:$.cron,timezone:$.timezone??null,status:$.status,next_fire_at:$.nextFireAt,last_fire_at:$.lastFireAt??null,last_run_id:$.lastRunId??null,created_at:$.createdAt,updated_at:$.updatedAt,metadata:$.metadata??null,owner_type:$.ownerType??null,owner_id:$.ownerId??null}}),$}async getSchedule($){let X=(await this.#Y.execute({sql:`SELECT ${E4(EX)} FROM ${EX} WHERE id = ?`,args:[$]})).rows[0];return X?Kp0(X):null}async listSchedules($){let Y=[],X=[];if($?.status)Y.push("status = ?"),X.push($.status);if($?.workflowId)Y.push("json_extract(target, '$.workflowId') = ?"),X.push($.workflowId);if($?.ownerType!==void 0)if($.ownerType===null)Y.push("owner_type IS NULL");else Y.push("owner_type = ?"),X.push($.ownerType);if($?.ownerId!==void 0)if($.ownerId===null)Y.push("owner_id IS NULL");else Y.push("owner_id = ?"),X.push($.ownerId);let G=Y.length>0?`WHERE ${Y.join(" AND ")}`:"";return(await this.#Y.execute({sql:`SELECT ${E4(EX)} FROM ${EX} ${G} ORDER BY created_at ASC`,args:X})).rows.map((Q)=>Kp0(Q))}async listDueSchedules($,Y){let X=Y??100;return(await this.#Y.execute({sql:`SELECT ${E4(EX)} FROM ${EX}
            WHERE status = ? AND next_fire_at <= ?
            ORDER BY next_fire_at ASC
            LIMIT ?`,args:["active",$,X]})).rows.map((J)=>Kp0(J))}async updateSchedule($,Y){let X=[],G=[];if("cron"in Y&&Y.cron!==void 0)X.push("cron = ?"),G.push(Y.cron);if("timezone"in Y)X.push("timezone = ?"),G.push(Y.timezone??null);if("status"in Y&&Y.status!==void 0)X.push("status = ?"),G.push(Y.status);if("nextFireAt"in Y&&Y.nextFireAt!==void 0)X.push("next_fire_at = ?"),G.push(Y.nextFireAt);if("target"in Y&&Y.target!==void 0)X.push("target = jsonb(?)"),G.push(JSON.stringify(Y.target));if("metadata"in Y)X.push("metadata = jsonb(?)"),G.push(Y.metadata!=null?JSON.stringify(Y.metadata):null);if("ownerType"in Y)X.push("owner_type = ?"),G.push(Y.ownerType??null);if("ownerId"in Y)X.push("owner_id = ?"),G.push(Y.ownerId??null);if(X.push("updated_at = ?"),G.push(Date.now()),G.push($),X.length===1){let Q=await this.getSchedule($);if(!Q)throw Error(`Schedule ${$} not found`);return Q}await this.#Y.execute({sql:`UPDATE ${EX} SET ${X.join(", ")} WHERE id = ?`,args:G});let J=await this.getSchedule($);if(!J)throw Error(`Schedule ${$} not found`);return J}async updateScheduleNextFire($,Y,X,G,J){return((await this.#Y.execute({sql:`UPDATE ${EX}
            SET next_fire_at = ?, last_fire_at = ?, last_run_id = ?, updated_at = ?
            WHERE id = ? AND next_fire_at = ? AND status = ?`,args:[X,G,J,Date.now(),$,Y,"active"]})).rowsAffected??0)>0}async deleteSchedule($){await this.#Y.execute({sql:`DELETE FROM ${bZ} WHERE schedule_id = ?`,args:[$]}),await this.#Y.execute({sql:`DELETE FROM ${EX} WHERE id = ?`,args:[$]})}async recordTrigger($){let Y=$.id??crypto.randomUUID();await this.#$.insert({tableName:bZ,record:{id:Y,schedule_id:$.scheduleId,run_id:$.runId,scheduled_fire_at:$.scheduledFireAt,actual_fire_at:$.actualFireAt,outcome:$.outcome,error:$.error??null,trigger_kind:$.triggerKind??"schedule-fire",parent_trigger_id:$.parentTriggerId??null,metadata:$.metadata??null}})}async listTriggers($,Y){let X=["schedule_id = ?"],G=[$];if(Y?.fromActualFireAt!=null)X.push("actual_fire_at >= ?"),G.push(Y.fromActualFireAt);if(Y?.toActualFireAt!=null)X.push("actual_fire_at < ?"),G.push(Y.toActualFireAt);let J=Y?.limit!=null?`LIMIT ${Math.floor(Y.limit)}`:"";return(await this.#Y.execute({sql:`SELECT ${E4(bZ)} FROM ${bZ}
            WHERE ${X.join(" AND ")}
            ORDER BY actual_fire_at DESC
            ${J}`,args:G})).rows.map((W)=>bZ9(W))}},fZ9=class extends hj{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:wQ,schema:bg}),await this.#$.createTable({tableName:m7,schema:hg}),await this.#Y.execute(`CREATE UNIQUE INDEX IF NOT EXISTS idx_scorer_definition_versions_scorer_version ON "${m7}" ("scorerDefinitionId", "versionNumber")`)}async dangerouslyClearAll(){await this.#$.deleteData({tableName:wQ}),await this.#$.deleteData({tableName:m7})}async getById($){try{let X=(await this.#Y.execute({sql:`SELECT ${E4(wQ)} FROM "${wQ}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#X(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_SCORER_DEFINITION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async create($){let{scorerDefinition:Y}=$;try{let X=new Date;await this.#$.insert({tableName:wQ,record:{id:Y.id,status:"draft",activeVersionId:null,authorId:Y.authorId??null,metadata:Y.metadata??null,createdAt:X.toISOString(),updatedAt:X.toISOString()}});let{id:G,authorId:J,metadata:Q,...W}=Y,K=crypto.randomUUID();return await this.createVersion({id:K,scorerDefinitionId:Y.id,versionNumber:1,...W,changedFields:Object.keys(W),changeMessage:"Initial version"}),{id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X}}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","CREATE_SCORER_DEFINITION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async update($){let{id:Y,...X}=$;try{let G=await this.getById(Y);if(!G)throw Error(`Scorer definition with id ${Y} not found`);let{authorId:J,activeVersionId:Q,metadata:W,status:K}=X,Z={updatedAt:new Date().toISOString()};if(J!==void 0)Z.authorId=J;if(Q!==void 0)Z.activeVersionId=Q;if(K!==void 0)Z.status=K;if(W!==void 0)Z.metadata={...G.metadata,...W};await this.#$.update({tableName:wQ,keys:{id:Y},data:Z});let H=await this.getById(Y);if(!H)throw new G0({id:w0("LIBSQL","UPDATE_SCORER_DEFINITION","NOT_FOUND_AFTER_UPDATE"),domain:M0.STORAGE,category:E0.SYSTEM,text:`Scorer definition ${Y} not found after update`,details:{id:Y}});return H}catch(G){if(G instanceof G0)throw G;throw new G0({id:w0("LIBSQL","UPDATE_SCORER_DEFINITION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},G)}}async delete($){try{await this.deleteVersionsByParentId($),await this.#Y.execute({sql:`DELETE FROM "${wQ}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_SCORER_DEFINITION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async list($){try{let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q,status:W}=$||{},{field:K,direction:Z}=this.parseOrderBy(G),H=[],z=[];if(W)H.push("status = ?"),z.push(W);if(J!==void 0)H.push("authorId = ?"),z.push(J);if(Q&&Object.keys(Q).length>0)for(let[R,q]of Object.entries(Q)){if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(R))throw new G0({id:w0("LIBSQL","LIST_SCORER_DEFINITIONS","INVALID_METADATA_KEY"),domain:M0.STORAGE,category:E0.USER,text:`Invalid metadata key: ${R}. Keys must be alphanumeric with underscores.`,details:{key:R}});H.push(`json_extract(metadata, '$.${R}') = ?`),z.push(typeof q==="string"?q:JSON.stringify(q))}let V=H.length>0?`WHERE ${H.join(" AND ")}`:"",F=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${wQ}" ${V}`,args:z}),L=Number(F.rows?.[0]?.count??0);if(L===0)return{scorerDefinitions:[],total:0,page:Y,perPage:X??100,hasMore:!1};let N=F4(X,100),{offset:D,perPage:A}=B4(Y,X,N),B=X===!1?L:N,O=X===!1?L:D+N;return{scorerDefinitions:(await this.#Y.execute({sql:`SELECT ${E4(wQ)} FROM "${wQ}" ${V} ORDER BY ${K} ${Z} LIMIT ? OFFSET ?`,args:[...z,B,D]})).rows?.map((R)=>this.#X(R))??[],total:L,page:Y,perPage:A,hasMore:O<L}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","LIST_SCORER_DEFINITIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async createVersion($){try{let Y=new Date;return await this.#$.insert({tableName:m7,record:{id:$.id,scorerDefinitionId:$.scorerDefinitionId,versionNumber:$.versionNumber,name:$.name,description:$.description??null,type:$.type,model:$.model??null,instructions:$.instructions??null,scoreRange:$.scoreRange??null,presetConfig:$.presetConfig??null,defaultSampling:$.defaultSampling??null,changedFields:$.changedFields??null,changeMessage:$.changeMessage??null,createdAt:Y.toISOString()}}),{...$,createdAt:Y}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","CREATE_SCORER_DEFINITION_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${E4(m7)} FROM "${m7}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_SCORER_DEFINITION_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersionByNumber($,Y){try{let G=(await this.#Y.execute({sql:`SELECT ${E4(m7)} FROM "${m7}" WHERE scorerDefinitionId = ? AND versionNumber = ?`,args:[$,Y]})).rows?.[0];return G?this.#J(G):null}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","GET_SCORER_DEFINITION_VERSION_BY_NUMBER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async getLatestVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${E4(m7)} FROM "${m7}" WHERE scorerDefinitionId = ? ORDER BY versionNumber DESC LIMIT 1`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_LATEST_SCORER_DEFINITION_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listVersions($){try{let{scorerDefinitionId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),K=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${m7}" WHERE scorerDefinitionId = ?`,args:[Y]}),Z=Number(K.rows?.[0]?.count??0);if(Z===0)return{versions:[],total:0,page:X,perPage:G??20,hasMore:!1};let H=F4(G,20),{offset:z,perPage:V}=B4(X,G,H),F=G===!1?Z:H,L=G===!1?Z:z+H;return{versions:(await this.#Y.execute({sql:`SELECT ${E4(m7)} FROM "${m7}" WHERE scorerDefinitionId = ? ORDER BY ${Q} ${W} LIMIT ? OFFSET ?`,args:[Y,F,z]})).rows?.map((A)=>this.#J(A))??[],total:Z,page:X,perPage:V,hasMore:L<Z}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","LIST_SCORER_DEFINITION_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersion($){try{await this.#Y.execute({sql:`DELETE FROM "${m7}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_SCORER_DEFINITION_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersionsByParentId($){try{await this.#Y.execute({sql:`DELETE FROM "${m7}" WHERE "scorerDefinitionId" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_SCORER_DEFINITION_VERSIONS_BY_SCORER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async countVersions($){try{let Y=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${m7}" WHERE scorerDefinitionId = ?`,args:[$]});return Number(Y.rows?.[0]?.count??0)}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","COUNT_SCORER_DEFINITION_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}#X($){let Y=(X)=>{if(X===null||X===void 0)return;if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X};return{id:$.id,status:$.status??"draft",activeVersionId:$.activeVersionId??void 0,authorId:$.authorId??void 0,metadata:Y($.metadata),createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt)}}#J($){let Y=(X)=>{if(X===null||X===void 0)return;if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X};return{id:$.id,scorerDefinitionId:$.scorerDefinitionId,versionNumber:Number($.versionNumber),name:$.name,description:$.description??void 0,type:$.type,model:Y($.model),instructions:$.instructions??void 0,scoreRange:Y($.scoreRange),presetConfig:Y($.presetConfig),defaultSampling:Y($.defaultSampling),changedFields:Y($.changedFields),changeMessage:$.changeMessage??void 0,createdAt:new Date($.createdAt)}}},gZ9=class extends Xm{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:D$,schema:ij}),await this.#$.alterTable({tableName:D$,schema:ij,ifNotExists:["spanId","requestContext"]})}async dangerouslyClearAll(){await this.#$.deleteData({tableName:D$})}async listScoresByRunId({runId:$,pagination:Y}){try{let{page:X,perPage:G}=Y,J=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${D$} WHERE runId = ?`,args:[$]}),Q=Number(J.rows?.[0]?.count??0);if(Q===0)return{pagination:{total:0,page:X,perPage:G,hasMore:!1},scores:[]};let W=F4(G,100),{offset:K,perPage:Z}=B4(X,G,W),H=G===!1?Q:W,z=G===!1?Q:K+W;return{scores:(await this.#Y.execute({sql:`SELECT ${E4(D$)} FROM ${D$} WHERE runId = ? ORDER BY createdAt DESC LIMIT ? OFFSET ?`,args:[$,H,K]})).rows?.map((L)=>this.transformScoreRow(L))??[],pagination:{total:Q,page:X,perPage:Z,hasMore:z<Q}}}catch(X){throw new G0({id:w0("LIBSQL","LIST_SCORES_BY_RUN_ID","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async listScoresByScorerId({scorerId:$,entityId:Y,entityType:X,source:G,pagination:J}){try{let{page:Q,perPage:W}=J,K=[],Z=[];if($)K.push("scorerId = ?"),Z.push($);if(Y)K.push("entityId = ?"),Z.push(Y);if(X)K.push("entityType = ?"),Z.push(X);if(G)K.push("source = ?"),Z.push(G);let H=K.length>0?`WHERE ${K.join(" AND ")}`:"",z=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${D$} ${H}`,args:Z}),V=Number(z.rows?.[0]?.count??0);if(V===0)return{pagination:{total:0,page:Q,perPage:W,hasMore:!1},scores:[]};let F=F4(W,100),{offset:L,perPage:N}=B4(Q,W,F),D=W===!1?V:F,A=W===!1?V:L+F;return{scores:(await this.#Y.execute({sql:`SELECT ${E4(D$)} FROM ${D$} ${H} ORDER BY createdAt DESC LIMIT ? OFFSET ?`,args:[...Z,D,L]})).rows?.map((E)=>this.transformScoreRow(E))??[],pagination:{total:V,page:Q,perPage:N,hasMore:A<V}}}catch(Q){throw new G0({id:w0("LIBSQL","LIST_SCORES_BY_SCORER_ID","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Q)}}transformScoreRow($){return V90($)}async getScoreById({id:$}){let Y=await this.#Y.execute({sql:`SELECT ${E4(D$)} FROM ${D$} WHERE id = ?`,args:[$]});return Y.rows?.[0]?this.transformScoreRow(Y.rows[0]):null}async saveScore($){let Y;try{Y=qx0.parse($)}catch(X){throw new G0({id:w0("LIBSQL","SAVE_SCORE","VALIDATION_FAILED"),domain:M0.STORAGE,category:E0.USER,details:{scorer:typeof $.scorer?.id==="string"?$.scorer.id:String($.scorer?.id??"unknown"),entityId:$.entityId??"unknown",entityType:$.entityType??"unknown",traceId:$.traceId??"",spanId:$.spanId??""}},X)}try{let X=crypto.randomUUID(),G=new Date;return await this.#$.insert({tableName:D$,record:{...Y,id:X,createdAt:G.toISOString(),updatedAt:G.toISOString()}}),{score:{...Y,id:X,createdAt:G,updatedAt:G}}}catch(X){throw new G0({id:w0("LIBSQL","SAVE_SCORE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async listScoresByEntityId({entityId:$,entityType:Y,pagination:X}){try{let{page:G,perPage:J}=X,Q=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${D$} WHERE entityId = ? AND entityType = ?`,args:[$,Y]}),W=Number(Q.rows?.[0]?.count??0);if(W===0)return{pagination:{total:0,page:G,perPage:J,hasMore:!1},scores:[]};let K=F4(J,100),{offset:Z,perPage:H}=B4(G,J,K),z=J===!1?W:K,V=J===!1?W:Z+K;return{scores:(await this.#Y.execute({sql:`SELECT ${E4(D$)} FROM ${D$} WHERE entityId = ? AND entityType = ? ORDER BY createdAt DESC LIMIT ? OFFSET ?`,args:[$,Y,z,Z]})).rows?.map((N)=>this.transformScoreRow(N))??[],pagination:{total:W,page:G,perPage:H,hasMore:V<W}}}catch(G){throw new G0({id:w0("LIBSQL","LIST_SCORES_BY_ENTITY_ID","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},G)}}async listScoresBySpan({traceId:$,spanId:Y,pagination:X}){try{let{page:G,perPage:J}=X,Q=F4(J,100),{offset:W,perPage:K}=B4(G,J,Q),Z=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${D$} WHERE traceId = ? AND spanId = ?`,args:[$,Y]}),H=Number(Z.rows?.[0]?.count??0),z=J===!1?H:Q,V=J===!1?H:W+Q;return{scores:(await this.#Y.execute({sql:`SELECT ${E4(D$)} FROM ${D$} WHERE traceId = ? AND spanId = ? ORDER BY createdAt DESC LIMIT ? OFFSET ?`,args:[$,Y,z,W]})).rows?.map((N)=>this.transformScoreRow(N))??[],pagination:{total:H,page:G,perPage:K,hasMore:V<H}}}catch(G){throw new G0({id:w0("LIBSQL","LIST_SCORES_BY_SPAN","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},G)}}},mZ9=["name","description","instructions","license","compatibility","source","references","scripts","assets","files","metadata","tree"],uZ9=class extends fj{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:cY,schema:aj}),await this.#$.createTable({tableName:_7,schema:oj}),await this.#$.alterTable({tableName:cY,schema:aj,ifNotExists:["visibility","favoriteCount"]}),await this.#$.alterTable({tableName:_7,schema:oj,ifNotExists:["files"]}),await this.#Y.execute(`CREATE UNIQUE INDEX IF NOT EXISTS idx_skill_versions_skill_version ON "${_7}" ("skillId", "versionNumber")`)}async dangerouslyClearAll(){await this.#$.deleteData({tableName:cY}),await this.#$.deleteData({tableName:_7})}async getById($){try{let X=(await this.#Y.execute({sql:`SELECT ${E4(cY)} FROM "${cY}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#X(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_SKILL","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async create($){let{skill:Y}=$;try{let X=new Date,G=Y.visibility??(Y.authorId?"private":void 0);await this.#$.insert({tableName:cY,record:{id:Y.id,status:"draft",activeVersionId:null,authorId:Y.authorId??null,visibility:G??null,favoriteCount:0,createdAt:X.toISOString(),updatedAt:X.toISOString()}});let{id:J,authorId:Q,visibility:W,...K}=Y,Z=crypto.randomUUID();try{await this.createVersion({id:Z,skillId:Y.id,versionNumber:1,...K,changedFields:Object.keys(K),changeMessage:"Initial version"})}catch(H){throw await this.#$.delete({tableName:cY,keys:{id:Y.id}}),H}return{id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,createdAt:X,updatedAt:X}}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","CREATE_SKILL","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async update($){let{id:Y,...X}=$;try{if(!await this.getById(Y))throw new G0({id:w0("LIBSQL","UPDATE_SKILL","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,text:`Skill ${Y} not found`,details:{skillId:Y}});let{authorId:J,visibility:Q,activeVersionId:W,status:K,...Z}=X,H={};for(let[N,D]of Object.entries(Z))if(D!==void 0)H[N]=D;let z=mZ9,V=z.some((N)=>(N in H)),F={updatedAt:new Date().toISOString()};if(J!==void 0)F.authorId=J;if(Q!==void 0)F.visibility=Q;if(W!==void 0){if(F.activeVersionId=W,K===void 0)F.status="published"}if(K!==void 0)F.status=K;if(await this.#$.update({tableName:cY,keys:{id:Y},data:F}),V){let N=await this.getLatestVersion(Y);if(!N)throw new G0({id:w0("LIBSQL","UPDATE_SKILL","NO_VERSIONS"),domain:M0.STORAGE,category:E0.USER,text:`No versions found for skill ${Y}`,details:{skillId:Y}});let{id:D,skillId:A,versionNumber:B,changedFields:O,changeMessage:E,createdAt:M,...R}=N,q={...R,...H},_=z.filter((P)=>(P in H)&&JSON.stringify(H[P])!==JSON.stringify(R[P]));if(_.length>0){let P=crypto.randomUUID();await this.createVersion({id:P,skillId:Y,versionNumber:N.versionNumber+1,...q,changedFields:_,changeMessage:`Updated ${_.join(", ")}`})}}let L=await this.getById(Y);if(!L)throw new G0({id:w0("LIBSQL","UPDATE_SKILL","NOT_FOUND_AFTER_UPDATE"),domain:M0.STORAGE,category:E0.SYSTEM,text:`Skill ${Y} not found after update`,details:{id:Y}});return L}catch(G){if(G instanceof G0)throw G;throw new G0({id:w0("LIBSQL","UPDATE_SKILL","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},G)}}async delete($){try{await this.deleteVersionsByParentId($),await this.#Y.execute({sql:`DELETE FROM "${cY}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_SKILL","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async list($){try{let{page:Y=0,perPage:X,orderBy:G,authorId:J,visibility:Q,status:W,entityIds:K,pinFavoritedFor:Z,favoritedOnly:H}=$||{},{field:z,direction:V}=this.parseOrderBy(G);if(K&&K.length===0)return{skills:[],total:0,page:Y,perPage:X??100,hasMore:!1};let F=[],L=[];if(J!==void 0)F.push("s_e.authorId = ?"),L.push(J);if(Q!==void 0)F.push("s_e.visibility = ?"),L.push(Q);if(W!==void 0)F.push("s_e.status = ?"),L.push(W);if(K&&K.length>0){let v=K.map(()=>"?").join(", ");F.push(`s_e.id IN (${v})`),L.push(...K)}let N=Z,D=Boolean(N),A="",B=[];if(D&&N){if(A=`LEFT JOIN "${zG}" st ON st."entityType" = 'skill' AND st."entityId" = s_e.id AND st."userId" = ?`,B.push(N),H)F.push('st."userId" IS NOT NULL')}else if(H)F.push("1=0");let O=F.length>0?`WHERE ${F.join(" AND ")}`:"",E=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${cY}" s_e ${A} ${O}`,args:[...B,...L]}),M=Number(E.rows?.[0]?.count??0);if(M===0)return{skills:[],total:0,page:Y,perPage:X??100,hasMore:!1};let R=F4(X,100),{offset:q,perPage:_}=B4(Y,X,R),P=X===!1?M:R,w=X===!1?M:q+R,j=[];if(D&&N)j.push('(st."userId" IS NOT NULL) DESC');j.push(`s_e."${z}" ${V}`),j.push('s_e."id" ASC');let C=`ORDER BY ${j.join(", ")}`,k=OD4(cY,"s_e");return{skills:(await this.#Y.execute({sql:`SELECT ${k} FROM "${cY}" s_e ${A} ${O} ${C} LIMIT ? OFFSET ?`,args:[...B,...L,P,q]})).rows?.map((v)=>this.#X(v))??[],total:M,page:Y,perPage:_,hasMore:w<M}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","LIST_SKILLS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async createVersion($){try{let Y=new Date;return await this.#Y.execute({sql:`INSERT INTO "${_7}" (
          id, "skillId", "versionNumber",
          name, description, instructions, license, compatibility,
          source, "references", scripts, assets, files, metadata, tree,
          "changedFields", "changeMessage", "createdAt"
        ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,args:[$.id,$.skillId,$.versionNumber,$.name,$.description??null,$.instructions??null,$.license??null,$.compatibility?JSON.stringify($.compatibility):null,$.source?JSON.stringify($.source):null,$.references?JSON.stringify($.references):null,$.scripts?JSON.stringify($.scripts):null,$.assets?JSON.stringify($.assets):null,$.files?JSON.stringify($.files):null,$.metadata?JSON.stringify($.metadata):null,$.tree?JSON.stringify($.tree):null,$.changedFields?JSON.stringify($.changedFields):null,$.changeMessage??null,Y.toISOString()]}),{...$,createdAt:Y}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","CREATE_SKILL_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${E4(_7)} FROM "${_7}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_SKILL_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersionByNumber($,Y){try{let G=(await this.#Y.execute({sql:`SELECT ${E4(_7)} FROM "${_7}" WHERE skillId = ? AND versionNumber = ?`,args:[$,Y]})).rows?.[0];return G?this.#J(G):null}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","GET_SKILL_VERSION_BY_NUMBER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async getLatestVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${E4(_7)} FROM "${_7}" WHERE skillId = ? ORDER BY versionNumber DESC LIMIT 1`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_LATEST_SKILL_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listVersions($){try{let{skillId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),K=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${_7}" WHERE skillId = ?`,args:[Y]}),Z=Number(K.rows?.[0]?.count??0);if(Z===0)return{versions:[],total:0,page:X,perPage:G??20,hasMore:!1};let H=F4(G,20),{offset:z,perPage:V}=B4(X,G,H),F=G===!1?Z:H,L=G===!1?Z:z+H;return{versions:(await this.#Y.execute({sql:`SELECT ${E4(_7)} FROM "${_7}" WHERE skillId = ? ORDER BY ${Q} ${W} LIMIT ? OFFSET ?`,args:[Y,F,z]})).rows?.map((A)=>this.#J(A))??[],total:Z,page:X,perPage:V,hasMore:L<Z}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","LIST_SKILL_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersion($){try{await this.#Y.execute({sql:`DELETE FROM "${_7}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_SKILL_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersionsByParentId($){try{await this.#Y.execute({sql:`DELETE FROM "${_7}" WHERE "skillId" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_SKILL_VERSIONS_BY_SKILL","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async countVersions($){try{let Y=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${_7}" WHERE skillId = ?`,args:[$]});return Number(Y.rows?.[0]?.count??0)}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","COUNT_SKILL_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}#X($){return{id:$.id,status:$.status??"draft",activeVersionId:$.activeVersionId??void 0,authorId:$.authorId??void 0,visibility:$.visibility??void 0,favoriteCount:$.favoriteCount===null||$.favoriteCount===void 0?0:Number($.favoriteCount),createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt)}}#J($){let Y=(X)=>{if(X===null||X===void 0)return;if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X};return{id:$.id,skillId:$.skillId,versionNumber:Number($.versionNumber),name:$.name,description:$.description??void 0,instructions:$.instructions??void 0,license:$.license??void 0,compatibility:Y($.compatibility),source:Y($.source),references:Y($.references),scripts:Y($.scripts),assets:Y($.assets),files:Y($.files),metadata:Y($.metadata),tree:Y($.tree),changedFields:Y($.changedFields),changeMessage:$.changeMessage??void 0,createdAt:new Date($.createdAt)}}},pZ9=class extends Gm{#$;#Y;executeWithRetry;constructor($){super();let Y=sY($),X=$.maxRetries??5,G=$.initialBackoffMs??500;this.#Y=Y,this.#$=new oY({client:Y,maxRetries:X,initialBackoffMs:G}),this.executeWithRetry=ED4({logger:this.logger,maxRetries:X,initialBackoffMs:G}),this.setupPragmaSettings().catch((J)=>this.logger.warn("LibSQL Workflows: Failed to setup PRAGMA settings.",J))}supportsConcurrentUpdates(){return!0}parseWorkflowRun($){let Y=$.snapshot;if(typeof Y==="string")try{Y=JSON.parse($.snapshot)}catch(X){this.logger.warn(`Failed to parse snapshot for workflow ${$.workflow_name}: ${X}`)}return{workflowName:$.workflow_name,runId:$.run_id,snapshot:Y,resourceId:$.resourceId,createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt)}}async init(){let $=F5[L$];await this.#$.createTable({tableName:L$,schema:$}),await this.#$.alterTable({tableName:L$,schema:$,ifNotExists:["resourceId"]})}async dangerouslyClearAll(){await this.#$.deleteData({tableName:L$})}async setupPragmaSettings(){try{await this.#Y.execute("PRAGMA busy_timeout = 10000;"),this.logger.debug("LibSQL Workflows: PRAGMA busy_timeout=10000 set.");try{await this.#Y.execute("PRAGMA journal_mode = WAL;"),this.logger.debug("LibSQL Workflows: PRAGMA journal_mode=WAL set.")}catch{this.logger.debug("LibSQL Workflows: WAL mode not supported, using default journal mode.")}try{await this.#Y.execute("PRAGMA synchronous = NORMAL;"),this.logger.debug("LibSQL Workflows: PRAGMA synchronous=NORMAL set.")}catch{this.logger.debug("LibSQL Workflows: Failed to set synchronous mode.")}}catch($){this.logger.warn("LibSQL Workflows: Failed to set PRAGMA settings.",$)}}async updateWorkflowResults({workflowName:$,runId:Y,stepId:X,result:G,requestContext:J}){return this.executeWithRetry(async()=>{let Q=await this.#Y.transaction("write");try{let W=await Q.execute({sql:`SELECT json(snapshot) as snapshot FROM ${L$} WHERE workflow_name = ? AND run_id = ?`,args:[$,Y]}),K;if(!W.rows?.[0])K={context:{},activePaths:[],timestamp:Date.now(),suspendedPaths:{},activeStepsPath:{},resumeLabels:{},serializedStepGraph:[],status:"pending",value:{},waitingPaths:{},runId:Y,requestContext:{}};else{let H=W.rows[0].snapshot;K=typeof H==="string"?JSON.parse(H):H}K.context[X]=G,K.requestContext={...K.requestContext,...J};let Z=new Date().toISOString();return await Q.execute({sql:`INSERT INTO ${L$} (workflow_name, run_id, snapshot, createdAt, updatedAt)
                VALUES (?, ?, jsonb(?), ?, ?)
                ON CONFLICT(workflow_name, run_id)
                DO UPDATE SET snapshot = excluded.snapshot, updatedAt = excluded.updatedAt`,args:[$,Y,sI(K),Z,Z]}),await Q.commit(),K.context}catch(W){if(!Q.closed)await Q.rollback();throw W}},"updateWorkflowResults")}async updateWorkflowState({workflowName:$,runId:Y,opts:X}){return this.executeWithRetry(async()=>{let G=await this.#Y.transaction("write");try{let J=await G.execute({sql:`SELECT json(snapshot) as snapshot FROM ${L$} WHERE workflow_name = ? AND run_id = ?`,args:[$,Y]});if(!J.rows?.[0]){await G.rollback();return}let Q=J.rows[0].snapshot,W=typeof Q==="string"?JSON.parse(Q):Q;if(!W||!W?.context)throw await G.rollback(),Error(`Snapshot not found for runId ${Y}`);let K={...W,...X};return await G.execute({sql:`UPDATE ${L$} SET snapshot = jsonb(?) WHERE workflow_name = ? AND run_id = ?`,args:[sI(K),$,Y]}),await G.commit(),K}catch(J){if(!G.closed)await G.rollback();throw J}},"updateWorkflowState")}async persistWorkflowSnapshot({workflowName:$,runId:Y,resourceId:X,snapshot:G,createdAt:J,updatedAt:Q}){let W=new Date,K={workflow_name:$,run_id:Y,resourceId:X,snapshot:G,createdAt:J??W,updatedAt:Q??W};this.logger.debug("Persisting workflow snapshot",{workflowName:$,runId:Y,data:K}),await this.#$.insert({tableName:L$,record:K})}async loadWorkflowSnapshot({workflowName:$,runId:Y}){this.logger.debug("Loading workflow snapshot",{workflowName:$,runId:Y});let X=await this.#$.select({tableName:L$,keys:{workflow_name:$,run_id:Y}});return X?X.snapshot:null}async getWorkflowRunById({runId:$,workflowName:Y}){let X=[],G=[];if($)X.push("run_id = ?"),G.push($);if(Y)X.push("workflow_name = ?"),G.push(Y);let J=X.length>0?`WHERE ${X.join(" AND ")}`:"";try{let Q=await this.#Y.execute({sql:`SELECT workflow_name, run_id, resourceId, json(snapshot) as snapshot, createdAt, updatedAt FROM ${L$} ${J} ORDER BY createdAt DESC LIMIT 1`,args:G});if(!Q.rows?.[0])return null;return this.parseWorkflowRun(Q.rows[0])}catch(Q){throw new G0({id:w0("LIBSQL","GET_WORKFLOW_RUN_BY_ID","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Q)}}async deleteWorkflowRunById({runId:$,workflowName:Y}){return this.executeWithRetry(async()=>{try{await this.#Y.execute({sql:`DELETE FROM ${L$} WHERE workflow_name = ? AND run_id = ?`,args:[Y,$]})}catch(X){throw new G0({id:w0("LIBSQL","DELETE_WORKFLOW_RUN_BY_ID","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY,details:{runId:$,workflowName:Y}},X)}},"deleteWorkflowRunById")}async listWorkflowRuns({workflowName:$,fromDate:Y,toDate:X,page:G,perPage:J,resourceId:Q,status:W}={}){try{let K=[],Z=[];if($)K.push("workflow_name = ?"),Z.push($);if(W)K.push("json_extract(snapshot, '$.status') = ?"),Z.push(W);if(Y)K.push("createdAt >= ?"),Z.push(Y.toISOString());if(X)K.push("createdAt <= ?"),Z.push(X.toISOString());if(Q)if(await this.#$.hasColumn(L$,"resourceId"))K.push("resourceId = ?"),Z.push(Q);else this.logger.warn(`[${L$}] resourceId column not found. Skipping resourceId filter.`);let H=K.length>0?`WHERE ${K.join(" AND ")}`:"",z=0,V=typeof J==="number"&&typeof G==="number";if(V){let A=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM ${L$} ${H}`,args:Z});z=Number(A.rows?.[0]?.count??0)}let F=V?F4(J,Number.MAX_SAFE_INTEGER):0,L=V?G*F:0,D=((await this.#Y.execute({sql:`SELECT workflow_name, run_id, resourceId, json(snapshot) as snapshot, createdAt, updatedAt FROM ${L$} ${H} ORDER BY createdAt DESC${V?" LIMIT ? OFFSET ?":""}`,args:V?[...Z,F,L]:Z})).rows||[]).map((A)=>this.parseWorkflowRun(A));return{runs:D,total:z||D.length}}catch(K){throw new G0({id:w0("LIBSQL","LIST_WORKFLOW_RUNS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},K)}}},dZ9=["name","description","filesystem","sandbox","mounts","search","skills","tools","autoSync","operationTimeout"],cZ9=class extends gj{#$;#Y;constructor($){super();let Y=sY($);this.#Y=Y,this.#$=new oY({client:Y,maxRetries:$.maxRetries,initialBackoffMs:$.initialBackoffMs})}async init(){await this.#$.createTable({tableName:WJ,schema:pg}),await this.#$.createTable({tableName:d7,schema:dg}),await this.#Y.execute(`CREATE UNIQUE INDEX IF NOT EXISTS idx_workspace_versions_workspace_version ON "${d7}" ("workspaceId", "versionNumber")`)}async dangerouslyClearAll(){await this.#$.deleteData({tableName:WJ}),await this.#$.deleteData({tableName:d7})}async getById($){try{let X=(await this.#Y.execute({sql:`SELECT ${E4(WJ)} FROM "${WJ}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#X(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_WORKSPACE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async create($){let{workspace:Y}=$;try{let X=new Date;await this.#$.insert({tableName:WJ,record:{id:Y.id,status:"draft",activeVersionId:null,authorId:Y.authorId??null,metadata:Y.metadata??null,createdAt:X.toISOString(),updatedAt:X.toISOString()}});let{id:G,authorId:J,metadata:Q,...W}=Y,K=crypto.randomUUID();try{await this.createVersion({id:K,workspaceId:Y.id,versionNumber:1,...W,changedFields:Object.keys(W),changeMessage:"Initial version"})}catch(Z){throw await this.#$.delete({tableName:WJ,keys:{id:Y.id}}),Z}return{id:Y.id,status:"draft",activeVersionId:void 0,authorId:Y.authorId,metadata:Y.metadata,createdAt:X,updatedAt:X}}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","CREATE_WORKSPACE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async update($){let{id:Y,...X}=$;try{let G=await this.getById(Y);if(!G)throw new G0({id:w0("LIBSQL","UPDATE_WORKSPACE","NOT_FOUND"),domain:M0.STORAGE,category:E0.USER,text:`Workspace ${Y} not found`,details:{workspaceId:Y}});let{authorId:J,activeVersionId:Q,metadata:W,status:K,...Z}=X,H={};for(let[N,D]of Object.entries(Z))if(D!==void 0)H[N]=D;let z=dZ9,V=z.some((N)=>(N in H)),F={updatedAt:new Date().toISOString()};if(J!==void 0)F.authorId=J;if(Q!==void 0){if(F.activeVersionId=Q,K===void 0)F.status="published"}if(K!==void 0)F.status=K;if(W!==void 0)F.metadata={...G.metadata||{},...W};if(await this.#$.update({tableName:WJ,keys:{id:Y},data:F}),V){let N=await this.getLatestVersion(Y);if(!N)throw Error(`No versions found for workspace ${Y}`);let{id:D,workspaceId:A,versionNumber:B,changedFields:O,changeMessage:E,createdAt:M,...R}=N,q={...R,...H},_=z.filter((P)=>(P in H)&&JSON.stringify(H[P])!==JSON.stringify(R[P]));if(_.length>0){let P=crypto.randomUUID();await this.createVersion({id:P,workspaceId:Y,versionNumber:N.versionNumber+1,...q,changedFields:_,changeMessage:`Updated ${_.join(", ")}`})}}let L=await this.getById(Y);if(!L)throw new G0({id:w0("LIBSQL","UPDATE_WORKSPACE","NOT_FOUND_AFTER_UPDATE"),domain:M0.STORAGE,category:E0.SYSTEM,text:`Workspace ${Y} not found after update`,details:{id:Y}});return L}catch(G){if(G instanceof G0)throw G;throw new G0({id:w0("LIBSQL","UPDATE_WORKSPACE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},G)}}async delete($){try{await this.deleteVersionsByParentId($),await this.#Y.execute({sql:`DELETE FROM "${WJ}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_WORKSPACE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async list($){try{let{page:Y=0,perPage:X,orderBy:G,authorId:J,metadata:Q}=$||{},{field:W,direction:K}=this.parseOrderBy(G),Z=[],H=[];if(J!==void 0)Z.push("authorId = ?"),H.push(J);if(Q&&Object.keys(Q).length>0)for(let[M,R]of Object.entries(Q)){if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(M))throw new G0({id:w0("LIBSQL","LIST_WORKSPACES","INVALID_METADATA_KEY"),domain:M0.STORAGE,category:E0.USER,text:`Invalid metadata key: ${M}. Keys must be alphanumeric with underscores.`,details:{key:M}});Z.push(`json_extract(metadata, '$.${M}') = ?`),H.push(typeof R==="string"?R:JSON.stringify(R))}let z=Z.length>0?`WHERE ${Z.join(" AND ")}`:"",V=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${WJ}" ${z}`,args:H}),F=Number(V.rows?.[0]?.count??0);if(F===0)return{workspaces:[],total:0,page:Y,perPage:X??100,hasMore:!1};let L=F4(X,100),{offset:N,perPage:D}=B4(Y,X,L),A=X===!1?F:L,B=X===!1?F:N+L;return{workspaces:(await this.#Y.execute({sql:`SELECT ${E4(WJ)} FROM "${WJ}" ${z} ORDER BY ${W} ${K} LIMIT ? OFFSET ?`,args:[...H,A,N]})).rows?.map((M)=>this.#X(M))??[],total:F,page:Y,perPage:D,hasMore:B<F}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","LIST_WORKSPACES","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async createVersion($){try{let Y=new Date;return await this.#Y.execute({sql:`INSERT INTO "${d7}" (
  id, "workspaceId", "versionNumber",
  name, description, filesystem, sandbox, mounts, search, skills, tools,
  "autoSync", "operationTimeout",
  "changedFields", "changeMessage", "createdAt"
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,args:[$.id,$.workspaceId,$.versionNumber,$.name,$.description??null,$.filesystem?JSON.stringify($.filesystem):null,$.sandbox?JSON.stringify($.sandbox):null,$.mounts?JSON.stringify($.mounts):null,$.search?JSON.stringify($.search):null,$.skills?JSON.stringify($.skills):null,$.tools?JSON.stringify($.tools):null,$.autoSync?1:0,$.operationTimeout??null,$.changedFields?JSON.stringify($.changedFields):null,$.changeMessage??null,Y.toISOString()]}),{...$,createdAt:Y}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","CREATE_WORKSPACE_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${E4(d7)} FROM "${d7}" WHERE id = ?`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_WORKSPACE_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async getVersionByNumber($,Y){try{let G=(await this.#Y.execute({sql:`SELECT ${E4(d7)} FROM "${d7}" WHERE "workspaceId" = ? AND "versionNumber" = ?`,args:[$,Y]})).rows?.[0];return G?this.#J(G):null}catch(X){if(X instanceof G0)throw X;throw new G0({id:w0("LIBSQL","GET_WORKSPACE_VERSION_BY_NUMBER","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},X)}}async getLatestVersion($){try{let X=(await this.#Y.execute({sql:`SELECT ${E4(d7)} FROM "${d7}" WHERE "workspaceId" = ? ORDER BY "versionNumber" DESC LIMIT 1`,args:[$]})).rows?.[0];return X?this.#J(X):null}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","GET_LATEST_WORKSPACE_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async listVersions($){try{let{workspaceId:Y,page:X=0,perPage:G,orderBy:J}=$,{field:Q,direction:W}=this.parseVersionOrderBy(J),K=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${d7}" WHERE "workspaceId" = ?`,args:[Y]}),Z=Number(K.rows?.[0]?.count??0);if(Z===0)return{versions:[],total:0,page:X,perPage:G??20,hasMore:!1};let H=F4(G,20),{offset:z,perPage:V}=B4(X,G,H),F=G===!1?Z:H,L=G===!1?Z:z+H;return{versions:(await this.#Y.execute({sql:`SELECT ${E4(d7)} FROM "${d7}" WHERE "workspaceId" = ? ORDER BY ${Q} ${W} LIMIT ? OFFSET ?`,args:[Y,F,z]})).rows?.map((A)=>this.#J(A))??[],total:Z,page:X,perPage:V,hasMore:L<Z}}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","LIST_WORKSPACE_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersion($){try{await this.#Y.execute({sql:`DELETE FROM "${d7}" WHERE "id" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_WORKSPACE_VERSION","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async deleteVersionsByParentId($){try{await this.#Y.execute({sql:`DELETE FROM "${d7}" WHERE "workspaceId" = ?`,args:[$]})}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","DELETE_WORKSPACE_VERSIONS_BY_WORKSPACE","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}async countVersions($){try{let Y=await this.#Y.execute({sql:`SELECT COUNT(*) as count FROM "${d7}" WHERE "workspaceId" = ?`,args:[$]});return Number(Y.rows?.[0]?.count??0)}catch(Y){if(Y instanceof G0)throw Y;throw new G0({id:w0("LIBSQL","COUNT_WORKSPACE_VERSIONS","FAILED"),domain:M0.STORAGE,category:E0.THIRD_PARTY},Y)}}#X($){let Y=(X)=>{if(X===null||X===void 0)return;if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X};return{id:$.id,status:$.status??"draft",activeVersionId:$.activeVersionId??void 0,authorId:$.authorId??void 0,metadata:Y($.metadata),createdAt:new Date($.createdAt),updatedAt:new Date($.updatedAt)}}#J($){let Y=(X)=>{if(X===null||X===void 0)return;if(typeof X==="string")try{return JSON.parse(X)}catch{return X}return X};return{id:$.id,workspaceId:$.workspaceId,versionNumber:Number($.versionNumber),name:$.name,description:$.description??void 0,filesystem:Y($.filesystem),sandbox:Y($.sandbox),mounts:Y($.mounts),search:Y($.search),skills:Y($.skills),tools:Y($.tools),autoSync:Boolean($.autoSync),operationTimeout:$.operationTimeout!=null?Number($.operationTimeout):void 0,changedFields:Y($.changedFields),changeMessage:$.changeMessage??void 0,createdAt:new Date($.createdAt)}}},lZ9=-16000,iZ9=134217728,RD4=class extends cL{client;maxRetries;initialBackoffMs;pragmasReady;isLocalDb;localPragmas;stores;constructor($){if(!$.id||typeof $.id!=="string"||$.id.trim()==="")throw Error("LibSQLStore: id must be provided and cannot be empty.");super({id:$.id,name:"LibSQLStore",disableInit:$.disableInit});if(this.maxRetries=$.maxRetries??5,this.initialBackoffMs=$.initialBackoffMs??100,this.localPragmas={cacheSize:$.localPragmas?.cacheSize??lZ9,mmapSize:$.localPragmas?.mmapSize??iZ9},"url"in $){if($.url.includes(":memory:"))this.shouldCacheInit=!1;this.client=Gp0({url:$.url,...$.authToken?{authToken:$.authToken}:{}}),this.isLocalDb=$.url.startsWith("file:")||$.url.includes(":memory:"),this.pragmasReady=this.isLocalDb?this.applyLocalPragmas():Promise.resolve()}else this.client=$.client,this.isLocalDb=!1,this.pragmasReady=Promise.resolve();let Y={client:this.client,maxRetries:this.maxRetries,initialBackoffMs:this.initialBackoffMs},X=new gZ9(Y),G=new pZ9(Y),J=new vZ9(Y),Q=new xZ9(Y),W=new PZ9(Y),K=new jZ9(Y),Z=new TZ9(Y),H=new IZ9(Y),z=new yZ9(Y),V=new fZ9(Y),F=new SZ9(Y),L=new kZ9(Y),N=new cZ9(Y),D=new uZ9(Y),A=new CZ9(Y),B=new _Z9(Y),O=new wZ9(Y),E=new hZ9(Y);this.stores={scores:X,workflows:G,memory:J,observability:Q,agents:W,channels:K,datasets:Z,experiments:H,promptBlocks:z,scorerDefinitions:V,mcpClients:F,mcpServers:L,workspaces:N,skills:D,favorites:A,blobs:B,backgroundTasks:O,schedules:E}}async applyLocalPragmas(){let $=[["journal_mode=WAL","PRAGMA journal_mode=WAL;"],["busy_timeout=5000","PRAGMA busy_timeout=5000;"],["synchronous=NORMAL","PRAGMA synchronous=NORMAL;"],["temp_store=MEMORY","PRAGMA temp_store=MEMORY;"],[`cache_size=${this.localPragmas.cacheSize}`,`PRAGMA cache_size=${this.localPragmas.cacheSize};`],[`mmap_size=${this.localPragmas.mmapSize}`,`PRAGMA mmap_size=${this.localPragmas.mmapSize};`]];for(let[Y,X]of $)try{await this.client.execute(X),this.logger.debug(`LibSQLStore: PRAGMA ${Y} set.`)}catch(G){this.logger.warn(`LibSQLStore: Failed to set PRAGMA ${Y}.`,G)}}getStoresToInit(){return Object.values(this.stores).filter(Boolean)}async initDomainsSequentially(){for(let $ of this.getStoresToInit())await $.init();return!0}async initDomainsInParallel(){return await Promise.all(this.getStoresToInit().map(($)=>$.init())),!0}async init(){if(await this.pragmasReady,!this.isLocalDb){if(this.shouldCacheInit){if(this.hasInitialized){await this.hasInitialized;return}this.hasInitialized=this.initDomainsInParallel(),await this.hasInitialized;return}await this.initDomainsInParallel();return}if(this.shouldCacheInit){if(this.hasInitialized){await this.hasInitialized;return}this.hasInitialized=this.initDomainsSequentially(),await this.hasInitialized;return}await this.initDomainsSequentially()}};NX0();NX0();cG();ZY();O1();O1();hu();Up0();Hp0();zp0();YC0();var jR$=Error("timeout while waiting for mutex to become available"),TR$=Error("mutex already locked"),WB9=Error("request for lock canceled"),KB9=function($,Y,X,G){function J(Q){return Q instanceof X?Q:new X(function(W){W(Q)})}return new(X||(X=Promise))(function(Q,W){function K(z){try{H(G.next(z))}catch(V){W(V)}}function Z(z){try{H(G.throw(z))}catch(V){W(V)}}function H(z){z.done?Q(z.value):J(z.value).then(K,Z)}H((G=G.apply($,Y||[])).next())})};class SE4{constructor($,Y=WB9){this._value=$,this._cancelError=Y,this._queue=[],this._weightedWaiters=[]}acquire($=1,Y=0){if($<=0)throw Error(`invalid weight ${$}: must be positive`);return new Promise((X,G)=>{let J={resolve:X,reject:G,weight:$,priority:Y},Q=kE4(this._queue,(W)=>Y<=W.priority);if(Q===-1&&$<=this._value)this._dispatchItem(J);else this._queue.splice(Q+1,0,J)})}runExclusive($){return KB9(this,arguments,void 0,function*(Y,X=1,G=0){let[J,Q]=yield this.acquire(X,G);try{return yield Y(J)}finally{Q()}})}waitForUnlock($=1,Y=0){if($<=0)throw Error(`invalid weight ${$}: must be positive`);if(this._couldLockImmediately($,Y))return Promise.resolve();else return new Promise((X)=>{if(!this._weightedWaiters[$-1])this._weightedWaiters[$-1]=[];ZB9(this._weightedWaiters[$-1],{resolve:X,priority:Y})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue($){this._value=$,this._dispatchQueue()}release($=1){if($<=0)throw Error(`invalid weight ${$}: must be positive`);this._value+=$,this._dispatchQueue()}cancel(){this._queue.forEach(($)=>$.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){this._drainUnlockWaiters();while(this._queue.length>0&&this._queue[0].weight<=this._value)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem($){let Y=this._value;this._value-=$.weight,$.resolve([Y,this._newReleaser($.weight)])}_newReleaser($){let Y=!1;return()=>{if(Y)return;Y=!0,this.release($)}}_drainUnlockWaiters(){if(this._queue.length===0)for(let $=this._value;$>0;$--){let Y=this._weightedWaiters[$-1];if(!Y)continue;Y.forEach((X)=>X.resolve()),this._weightedWaiters[$-1]=[]}else{let $=this._queue[0].priority;for(let Y=this._value;Y>0;Y--){let X=this._weightedWaiters[Y-1];if(!X)continue;let G=X.findIndex((J)=>J.priority<=$);(G===-1?X:X.splice(0,G)).forEach((J)=>J.resolve())}}}_couldLockImmediately($,Y){return(this._queue.length===0||this._queue[0].priority<Y)&&$<=this._value}}function ZB9($,Y){let X=kE4($,(G)=>Y.priority<=G.priority);$.splice(X+1,0,Y)}function kE4($,Y){for(let X=$.length-1;X>=0;X--)if(Y($[X]))return X;return-1}var UB9=function($,Y,X,G){function J(Q){return Q instanceof X?Q:new X(function(W){W(Q)})}return new(X||(X=Promise))(function(Q,W){function K(z){try{H(G.next(z))}catch(V){W(V)}}function Z(z){try{H(G.throw(z))}catch(V){W(V)}}function H(z){z.done?Q(z.value):J(z.value).then(K,Z)}H((G=G.apply($,Y||[])).next())})};class AX0{constructor($){this._semaphore=new SE4(1,$)}acquire(){return UB9(this,arguments,void 0,function*($=0){let[,Y]=yield this._semaphore.acquire(1,$);return Y})}runExclusive($,Y=0){return this._semaphore.runExclusive(()=>$(),1,Y)}isLocked(){return this._semaphore.isLocked()}waitForUnlock($=0){return this._semaphore.waitForUnlock(1,$)}release(){if(this._semaphore.isLocked())this._semaphore.release()}cancel(){return this._semaphore.cancel()}}N50();y40();var{create:HB9,defineProperty:tR4,getOwnPropertyDescriptor:zB9,getOwnPropertyNames:eR4,getPrototypeOf:VB9}=Object,FB9=Object.prototype.hasOwnProperty,LB9=($,Y)=>function(){return Y||(0,$[eR4($)[0]])((Y={exports:{}}).exports,Y),Y.exports},DB9=($,Y,X,G)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let J of eR4(Y))if(!FB9.call($,J)&&J!==X)tR4($,J,{get:()=>Y[J],enumerable:!(G=zB9(Y,J))||G.enumerable})}return $},NB9=($,Y,X)=>(X=$!=null?HB9(VB9($)):{},DB9(tR4(X,"default",{value:$,enumerable:!0}),$)),AB9=LB9({"../../../node_modules/.pnpm/secure-json-parse@2.7.0/node_modules/secure-json-parse/index.js"($,Y){var X=typeof Buffer<"u",G=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,J=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Q(H,z,V){if(V==null){if(z!==null&&typeof z==="object")V=z,z=void 0}if(X&&Buffer.isBuffer(H))H=H.toString();if(H&&H.charCodeAt(0)===65279)H=H.slice(1);let F=JSON.parse(H,z);if(F===null||typeof F!=="object")return F;let L=V&&V.protoAction||"error",N=V&&V.constructorAction||"error";if(L==="ignore"&&N==="ignore")return F;if(L!=="ignore"&&N!=="ignore"){if(G.test(H)===!1&&J.test(H)===!1)return F}else if(L!=="ignore"&&N==="ignore"){if(G.test(H)===!1)return F}else if(J.test(H)===!1)return F;return W(F,{protoAction:L,constructorAction:N,safe:V&&V.safe})}function W(H,{protoAction:z="error",constructorAction:V="error",safe:F}={}){let L=[H];while(L.length){let N=L;L=[];for(let D of N){if(z!=="ignore"&&Object.prototype.hasOwnProperty.call(D,"__proto__")){if(F===!0)return null;else if(z==="error")throw SyntaxError("Object contains forbidden prototype property");delete D.__proto__}if(V!=="ignore"&&Object.prototype.hasOwnProperty.call(D,"constructor")&&Object.prototype.hasOwnProperty.call(D.constructor,"prototype")){if(F===!0)return null;else if(V==="error")throw SyntaxError("Object contains forbidden prototype property");delete D.constructor}for(let A in D){let B=D[A];if(B&&typeof B==="object")L.push(B)}}}return H}function K(H,z,V){let F=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return Q(H,z,V)}finally{Error.stackTraceLimit=F}}function Z(H,z){let V=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return Q(H,z,{safe:!0})}catch(F){return null}finally{Error.stackTraceLimit=V}}Y.exports=K,Y.exports.default=K,Y.exports.parse=K,Y.exports.safeParse=Z,Y.exports.scan=W}}),$q4="vercel.ai.error",BB9=Symbol.for($q4),Yq4,OB9=class $ extends Error{constructor({name:Y,message:X,cause:G}){super(X);this[Yq4]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,$q4)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}};Yq4=BB9;var TJ=OB9,Xq4="AI_APICallError",Gq4=`vercel.ai.error.${Xq4}`,EB9=Symbol.for(Gq4),Jq4,MB9=class extends TJ{constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:K=G!=null&&(G===408||G===409||G===429||G>=500),data:Z}){super({name:Xq4,message:$,cause:W});this[Jq4]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=K,this.data=Z}static isInstance($){return TJ.hasMarker($,Gq4)}};Jq4=EB9;function Qq4($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}var Wq4="AI_InvalidArgumentError",Kq4=`vercel.ai.error.${Wq4}`,RB9=Symbol.for(Kq4),Zq4,qB9=class extends TJ{constructor({message:$,cause:Y,argument:X}){super({name:Wq4,message:$,cause:Y});this[Zq4]=!0,this.argument=X}static isInstance($){return TJ.hasMarker($,Kq4)}};Zq4=RB9;var Uq4="AI_JSONParseError",Hq4=`vercel.ai.error.${Uq4}`,PB9=Symbol.for(Hq4),zq4,yE4=class extends TJ{constructor({text:$,cause:Y}){super({name:Uq4,message:`JSON parsing failed: Text: ${$}.
Error message: ${Qq4(Y)}`,cause:Y});this[zq4]=!0,this.text=$}static isInstance($){return TJ.hasMarker($,Hq4)}};zq4=PB9;var Vq4="AI_TypeValidationError",Fq4=`vercel.ai.error.${Vq4}`,wB9=Symbol.for(Fq4),Lq4,_B9=class $ extends TJ{constructor({value:Y,cause:X}){super({name:Vq4,message:`Type validation failed: Value: ${JSON.stringify(Y)}.
Error message: ${Qq4(X)}`,cause:X});this[Lq4]=!0,this.value=Y}static isInstance(Y){return TJ.hasMarker(Y,Fq4)}static wrap({value:Y,cause:X}){return $.isInstance(X)&&X.value===Y?X:new $({value:Y,cause:X})}};Lq4=wB9;var bE4=_B9,jB9=($,Y=21)=>{return(X=Y)=>{let G="",J=X|0;while(J--)G+=$[Math.random()*$.length|0];return G}},TB9=NB9(AB9());function IB9($){return new ReadableStream({async pull(Y){try{let{value:X,done:G}=await $.next();if(G)Y.close();else Y.enqueue(X)}catch(X){Y.error(X)}},cancel(){}})}async function CB9($){return $==null?Promise.resolve():new Promise((Y)=>setTimeout(Y,$))}var rM=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=jB9(X,Y);if($==null)return J;if(X.includes(G))throw new qB9({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return(Q)=>`${$}${G}${J(Q)}`};rM();function SB9($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function kB9($){return $ instanceof Error&&($.name==="AbortError"||$.name==="TimeoutError")}var qX0=Symbol.for("vercel.ai.validator");function vB9($){return{[qX0]:!0,validate:$}}function xB9($){return typeof $==="object"&&$!==null&&qX0 in $&&$[qX0]===!0&&"validate"in $}function yB9($){return xB9($)?$:bB9($)}function bB9($){return vB9((Y)=>{let X=$.safeParse(Y);return X.success?{success:!0,value:X.data}:{success:!1,error:X.error}})}function Dq4({value:$,schema:Y}){let X=yB9(Y);try{if(X.validate==null)return{success:!0,value:$};let G=X.validate($);if(G.success)return G;return{success:!1,error:bE4.wrap({value:$,cause:G.error})}}catch(G){return{success:!1,error:bE4.wrap({value:$,cause:G})}}}function uc0({text:$,schema:Y}){try{let X=TB9.default.parse($);if(Y==null)return{success:!0,value:X,rawValue:X};let G=Dq4({value:X,schema:Y});return G.success?{...G,rawValue:X}:G}catch(X){return{success:!1,error:yE4.isInstance(X)?X:new yE4({text:$,cause:X})}}}var hB9=Symbol("Let zodToJsonSchema decide on which parser to use"),hE4={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},fB9=($)=>typeof $==="string"?{...hE4,name:$}:{...hE4,...$},gB9=($)=>{let Y=fB9($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,flags:{hasReferencedOpenAiAnyType:!1},currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}};function Nq4($,Y,X,G){if(!G?.errorMessages)return;if(X)$.errorMessage={...$.errorMessage,[Y]:X}}function Y5($,Y,X,G,J){$[Y]=X,Nq4($,Y,G,J)}var Aq4=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")};function gQ($){if($.target!=="openAi")return{};let Y=[...$.basePath,$.definitionPath,$.openAiAnyTypeName];return $.flags.hasReferencedOpenAiAnyType=!0,{$ref:$.$refStrategy==="relative"?Aq4(Y,$.currentPath):Y.join("/")}}function mB9($,Y){let X={type:"array"};if($.type?._def&&$.type?._def?.typeName!==U0.ZodAny)X.items=B9($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)Y5(X,"minItems",$.minLength.value,$.minLength.message,Y);if($.maxLength)Y5(X,"maxItems",$.maxLength.value,$.maxLength.message,Y);if($.exactLength)Y5(X,"minItems",$.exactLength.value,$.exactLength.message,Y),Y5(X,"maxItems",$.exactLength.value,$.exactLength.message,Y);return X}function uB9($,Y){let X={type:"integer",format:"int64"};if(!$.checks)return X;for(let G of $.checks)switch(G.kind){case"min":if(Y.target==="jsonSchema7")if(G.inclusive)Y5(X,"minimum",G.value,G.message,Y);else Y5(X,"exclusiveMinimum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMinimum=!0;Y5(X,"minimum",G.value,G.message,Y)}break;case"max":if(Y.target==="jsonSchema7")if(G.inclusive)Y5(X,"maximum",G.value,G.message,Y);else Y5(X,"exclusiveMaximum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMaximum=!0;Y5(X,"maximum",G.value,G.message,Y)}break;case"multipleOf":Y5(X,"multipleOf",G.value,G.message,Y);break}return X}function pB9(){return{type:"boolean"}}function Bq4($,Y){return B9($.type._def,Y)}var dB9=($,Y)=>{return B9($.innerType._def,Y)};function Oq4($,Y,X){let G=X??Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>Oq4($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return cB9($,Y)}}var cB9=($,Y)=>{let X={type:"integer",format:"unix-time"};if(Y.target==="openApi3")return X;for(let G of $.checks)switch(G.kind){case"min":Y5(X,"minimum",G.value,G.message,Y);break;case"max":Y5(X,"maximum",G.value,G.message,Y);break}return X};function lB9($,Y){return{...B9($.innerType._def,Y),default:$.defaultValue()}}function iB9($,Y){return Y.effectStrategy==="input"?B9($.schema._def,Y):gQ(Y)}function nB9($){return{type:"string",enum:Array.from($.values)}}var rB9=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $};function aB9($,Y){let X=[B9($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),B9($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((Q)=>!!Q),G=Y.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,J=[];return X.forEach((Q)=>{if(rB9(Q)){if(J.push(...Q.allOf),Q.unevaluatedProperties===void 0)G=void 0}else{let W=Q;if("additionalProperties"in Q&&Q.additionalProperties===!1){let{additionalProperties:K,...Z}=Q;W=Z}else G=void 0;J.push(W)}}),J.length?{allOf:J,...G}:void 0}function sB9($,Y){let X=typeof $.value;if(X!=="bigint"&&X!=="number"&&X!=="boolean"&&X!=="string")return{type:Array.isArray($.value)?"array":"object"};if(Y.target==="openApi3")return{type:X==="bigint"?"integer":X,enum:[$.value]};return{type:X==="bigint"?"integer":X,const:$.value}}var Nc0=void 0,AU={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(Nc0===void 0)Nc0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return Nc0},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function Eq4($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":Y5(X,"minLength",typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,G.message,Y);break;case"max":Y5(X,"maxLength",typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value,G.message,Y);break;case"email":switch(Y.emailStrategy){case"format:email":BU(X,"email",G.message,Y);break;case"format:idn-email":BU(X,"idn-email",G.message,Y);break;case"pattern:zod":PJ(X,AU.email,G.message,Y);break}break;case"url":BU(X,"uri",G.message,Y);break;case"uuid":BU(X,"uuid",G.message,Y);break;case"regex":PJ(X,G.regex,G.message,Y);break;case"cuid":PJ(X,AU.cuid,G.message,Y);break;case"cuid2":PJ(X,AU.cuid2,G.message,Y);break;case"startsWith":PJ(X,RegExp(`^${Ac0(G.value,Y)}`),G.message,Y);break;case"endsWith":PJ(X,RegExp(`${Ac0(G.value,Y)}$`),G.message,Y);break;case"datetime":BU(X,"date-time",G.message,Y);break;case"date":BU(X,"date",G.message,Y);break;case"time":BU(X,"time",G.message,Y);break;case"duration":BU(X,"duration",G.message,Y);break;case"length":Y5(X,"minLength",typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,G.message,Y),Y5(X,"maxLength",typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value,G.message,Y);break;case"includes":{PJ(X,RegExp(Ac0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")BU(X,"ipv4",G.message,Y);if(G.version!=="v4")BU(X,"ipv6",G.message,Y);break}case"base64url":PJ(X,AU.base64url,G.message,Y);break;case"jwt":PJ(X,AU.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")PJ(X,AU.ipv4Cidr,G.message,Y);if(G.version!=="v4")PJ(X,AU.ipv6Cidr,G.message,Y);break}case"emoji":PJ(X,AU.emoji(),G.message,Y);break;case"ulid":{PJ(X,AU.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{BU(X,"binary",G.message,Y);break}case"contentEncoding:base64":{Y5(X,"contentEncoding","base64",G.message,Y);break}case"pattern:zod":{PJ(X,AU.base64,G.message,Y);break}}break}case"nanoid":PJ(X,AU.nanoid,G.message,Y)}return X}function Ac0($,Y){return Y.patternStrategy==="escape"?tB9($):$}var oB9=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function tB9($){let Y="";for(let X=0;X<$.length;X++){if(!oB9.has($[X]))Y+="\\";Y+=$[X]}return Y}function BU($,Y,X,G){if($.format||$.anyOf?.some((J)=>J.format)){if(!$.anyOf)$.anyOf=[];if($.format){if($.anyOf.push({format:$.format,...$.errorMessage&&G.errorMessages&&{errorMessage:{format:$.errorMessage.format}}}),delete $.format,$.errorMessage){if(delete $.errorMessage.format,Object.keys($.errorMessage).length===0)delete $.errorMessage}}$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else Y5($,"format",Y,X,G)}function PJ($,Y,X,G){if($.pattern||$.allOf?.some((J)=>J.pattern)){if(!$.allOf)$.allOf=[];if($.pattern){if($.allOf.push({pattern:$.pattern,...$.errorMessage&&G.errorMessages&&{errorMessage:{pattern:$.errorMessage.pattern}}}),delete $.pattern,$.errorMessage){if(delete $.errorMessage.pattern,Object.keys($.errorMessage).length===0)delete $.errorMessage}}$.allOf.push({pattern:fE4(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else Y5($,"pattern",fE4(Y,G),X,G)}function fE4($,Y){if(!Y.applyRegexFlags||!$.flags)return $.source;let X={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},G=X.i?$.source.toLowerCase():$.source,J="",Q=!1,W=!1,K=!1;for(let Z=0;Z<G.length;Z++){if(Q){J+=G[Z],Q=!1;continue}if(X.i){if(W){if(G[Z].match(/[a-z]/)){if(K)J+=G[Z],J+=`${G[Z-2]}-${G[Z]}`.toUpperCase(),K=!1;else if(G[Z+1]==="-"&&G[Z+2]?.match(/[a-z]/))J+=G[Z],K=!0;else J+=`${G[Z]}${G[Z].toUpperCase()}`;continue}}else if(G[Z].match(/[a-z]/)){J+=`[${G[Z]}${G[Z].toUpperCase()}]`;continue}}if(X.m){if(G[Z]==="^"){J+=`(^|(?<=[\r
]))`;continue}else if(G[Z]==="$"){J+=`($|(?=[\r
]))`;continue}}if(X.s&&G[Z]==="."){J+=W?`${G[Z]}\r
`:`[${G[Z]}\r
]`;continue}if(J+=G[Z],G[Z]==="\\")Q=!0;else if(W&&G[Z]==="]")W=!1;else if(!W&&G[Z]==="[")W=!0}return J}function Mq4($,Y){if(Y.target==="openAi")console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");if(Y.target==="openApi3"&&$.keyType?._def.typeName===U0.ZodEnum)return{type:"object",required:$.keyType._def.values,properties:$.keyType._def.values.reduce((G,J)=>({...G,[J]:B9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"properties",J]})??gQ(Y)}),{}),additionalProperties:Y.rejectedAdditionalProperties};let X={type:"object",additionalProperties:B9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]})??Y.allowedAdditionalProperties};if(Y.target==="openApi3")return X;if($.keyType?._def.typeName===U0.ZodString&&$.keyType._def.checks?.length){let{type:G,...J}=Eq4($.keyType._def,Y);return{...X,propertyNames:J}}else if($.keyType?._def.typeName===U0.ZodEnum)return{...X,propertyNames:{enum:$.keyType._def.values}};else if($.keyType?._def.typeName===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&$.keyType._def.type._def.checks?.length){let{type:G,...J}=Bq4($.keyType._def,Y);return{...X,propertyNames:J}}return X}function eB9($,Y){if(Y.mapStrategy==="record")return Mq4($,Y);let X=B9($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||gQ(Y),G=B9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||gQ(Y);return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function $O9($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function YO9($){return $.target==="openAi"?void 0:{not:gQ({...$,currentPath:[...$.currentPath,"not"]})}}function XO9($){return $.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var PX0={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function GO9($,Y){if(Y.target==="openApi3")return gE4($,Y);let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in PX0)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=PX0[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,K)=>K.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return gE4($,Y)}var gE4=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>B9(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0};function JO9($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length)){if(Y.target==="openApi3")return{type:PX0[$.innerType._def.typeName],nullable:!0};return{type:[PX0[$.innerType._def.typeName],"null"]}}if(Y.target==="openApi3"){let G=B9($.innerType._def,{...Y,currentPath:[...Y.currentPath]});if(G&&"$ref"in G)return{allOf:[G],nullable:!0};return G&&{...G,nullable:!0}}let X=B9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function QO9($,Y){let X={type:"number"};if(!$.checks)return X;for(let G of $.checks)switch(G.kind){case"int":X.type="integer",Nq4(X,"type",G.message,Y);break;case"min":if(Y.target==="jsonSchema7")if(G.inclusive)Y5(X,"minimum",G.value,G.message,Y);else Y5(X,"exclusiveMinimum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMinimum=!0;Y5(X,"minimum",G.value,G.message,Y)}break;case"max":if(Y.target==="jsonSchema7")if(G.inclusive)Y5(X,"maximum",G.value,G.message,Y);else Y5(X,"exclusiveMaximum",G.value,G.message,Y);else{if(!G.inclusive)X.exclusiveMaximum=!0;Y5(X,"maximum",G.value,G.message,Y)}break;case"multipleOf":Y5(X,"multipleOf",G.value,G.message,Y);break}return X}function WO9($,Y){let X=Y.target==="openAi",G={type:"object",properties:{}},J=[],Q=$.shape();for(let K in Q){let Z=Q[K];if(Z===void 0||Z._def===void 0)continue;let H=ZO9(Z);if(H&&X){if(Z._def.typeName==="ZodOptional")Z=Z._def.innerType;if(!Z.isNullable())Z=Z.nullable();H=!1}let z=B9(Z._def,{...Y,currentPath:[...Y.currentPath,"properties",K],propertyPath:[...Y.currentPath,"properties",K]});if(z===void 0)continue;if(G.properties[K]=z,!H)J.push(K)}if(J.length)G.required=J;let W=KO9($,Y);if(W!==void 0)G.additionalProperties=W;return G}function KO9($,Y){if($.catchall._def.typeName!=="ZodNever")return B9($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function ZO9($){try{return $.isOptional()}catch{return!0}}var UO9=($,Y)=>{if(Y.currentPath.toString()===Y.propertyPath?.toString())return B9($.innerType._def,Y);let X=B9($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return X?{anyOf:[{not:gQ(Y)},X]}:gQ(Y)},HO9=($,Y)=>{if(Y.pipeStrategy==="input")return B9($.in._def,Y);else if(Y.pipeStrategy==="output")return B9($.out._def,Y);let X=B9($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=B9($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}};function zO9($,Y){return B9($.type._def,Y)}function VO9($,Y){let G={type:"array",uniqueItems:!0,items:B9($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)Y5(G,"minItems",$.minSize.value,$.minSize.message,Y);if($.maxSize)Y5(G,"maxItems",$.maxSize.value,$.maxSize.message,Y);return G}function FO9($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>B9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:B9($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>B9(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function LO9($){return{not:gQ($)}}function DO9($){return gQ($)}var NO9=($,Y)=>{return B9($.innerType._def,Y)},AO9=($,Y,X)=>{switch(Y){case U0.ZodString:return Eq4($,X);case U0.ZodNumber:return QO9($,X);case U0.ZodObject:return WO9($,X);case U0.ZodBigInt:return uB9($,X);case U0.ZodBoolean:return pB9();case U0.ZodDate:return Oq4($,X);case U0.ZodUndefined:return LO9(X);case U0.ZodNull:return XO9(X);case U0.ZodArray:return mB9($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return GO9($,X);case U0.ZodIntersection:return aB9($,X);case U0.ZodTuple:return FO9($,X);case U0.ZodRecord:return Mq4($,X);case U0.ZodLiteral:return sB9($,X);case U0.ZodEnum:return nB9($);case U0.ZodNativeEnum:return $O9($);case U0.ZodNullable:return JO9($,X);case U0.ZodOptional:return UO9($,X);case U0.ZodMap:return eB9($,X);case U0.ZodSet:return VO9($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return zO9($,X);case U0.ZodNaN:case U0.ZodNever:return YO9(X);case U0.ZodEffects:return iB9($,X);case U0.ZodAny:return gQ(X);case U0.ZodUnknown:return DO9(X);case U0.ZodDefault:return lB9($,X);case U0.ZodBranded:return Bq4($,X);case U0.ZodReadonly:return NO9($,X);case U0.ZodCatch:return dB9($,X);case U0.ZodPipeline:return HO9($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})()}};function B9($,Y,X=!1){let G=Y.seen.get($);if(Y.override){let K=Y.override?.($,Y,G,X);if(K!==hB9)return K}if(G&&!X){let K=BO9(G,Y);if(K!==void 0)return K}let J={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,J);let Q=AO9($,$.typeName,Y),W=typeof Q==="function"?B9(Q(),Y):Q;if(W)OO9($,Y,W);if(Y.postProcess){let K=Y.postProcess(W,$,Y);return J.jsonSchema=W,K}return J.jsonSchema=W,W}var BO9=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:Aq4(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),gQ(Y);return Y.$refStrategy==="seen"?gQ(Y):void 0}}},OO9=($,Y,X)=>{if($.description){if(X.description=$.description,Y.markdownDescription)X.markdownDescription=$.description}return X},EO9=($,Y)=>{let X=gB9(Y),G=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((Z,[H,z])=>({...Z,[H]:B9(z._def,{...X,currentPath:[...X.basePath,X.definitionPath,H]},!0)??gQ(X)}),{}):void 0,J=typeof Y==="string"?Y:Y?.nameStrategy==="title"?void 0:Y?.name,Q=B9($._def,J===void 0?X:{...X,currentPath:[...X.basePath,X.definitionPath,J]},!1)??gQ(X),W=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(W!==void 0)Q.title=W;if(X.flags.hasReferencedOpenAiAnyType){if(!G)G={};if(!G[X.openAiAnyTypeName])G[X.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:X.$refStrategy==="relative"?"1":[...X.basePath,X.definitionPath,X.openAiAnyTypeName].join("/")}}}let K=J===void 0?G?{...Q,[X.definitionPath]:G}:Q:{$ref:[...X.$refStrategy==="relative"?[]:X.basePath,X.definitionPath,J].join("/"),[X.definitionPath]:{...G,[J]:Q}};if(X.target==="jsonSchema7")K.$schema="http://json-schema.org/draft-07/schema#";else if(X.target==="jsonSchema2019-09"||X.target==="openAi")K.$schema="https://json-schema.org/draft/2019-09/schema#";if(X.target==="openAi"&&(("anyOf"in K)||("oneOf"in K)||("allOf"in K)||("type"in K)&&Array.isArray(K.type)))console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");return K},MO9=EO9;function RO9($){let Y=["ROOT"],X=-1,G=null;function J(Z,H,z){switch(Z){case'"':{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_STRING");break}case"f":case"t":case"n":{X=H,G=H,Y.pop(),Y.push(z),Y.push("INSIDE_LITERAL");break}case"-":{Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"{":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_OBJECT_START");break}case"[":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_ARRAY_START");break}}}function Q(Z,H){switch(Z){case",":{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{X=H,Y.pop();break}}}function W(Z,H){switch(Z){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=H,Y.pop();break}}}for(let Z=0;Z<$.length;Z++){let H=$[Z];switch(Y[Y.length-1]){case"ROOT":J(H,Z,"FINISH");break;case"INSIDE_OBJECT_START":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}case"}":{X=Z,Y.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(H){case":":{Y.pop(),Y.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{J(H,Z,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{Q(H,Z);break}case"INSIDE_STRING":{switch(H){case'"':{Y.pop(),X=Z;break}case"\\":{Y.push("INSIDE_STRING_ESCAPE");break}default:X=Z}break}case"INSIDE_ARRAY_START":{switch(H){case"]":{X=Z,Y.pop();break}default:{X=Z,J(H,Z,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(H){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=Z,Y.pop();break}default:{X=Z;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{J(H,Z,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{Y.pop(),X=Z;break}case"INSIDE_NUMBER":{switch(H){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=Z;break}case"e":case"E":case"-":case".":break;case",":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z);if(Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);break}case"}":{if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);break}case"]":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z);break}default:{Y.pop();break}}break}case"INSIDE_LITERAL":{let V=$.substring(G,Z+1);if(!"false".startsWith(V)&&!"true".startsWith(V)&&!"null".startsWith(V)){if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);else if(Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z)}else X=Z;break}}}let K=$.slice(0,X+1);for(let Z=Y.length-1;Z>=0;Z--)switch(Y[Z]){case"INSIDE_STRING":{K+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{K+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{K+="]";break}case"INSIDE_LITERAL":{let z=$.substring(G,$.length);if("true".startsWith(z))K+="true".slice(z.length);else if("false".startsWith(z))K+="false".slice(z.length);else if("null".startsWith(z))K+="null".slice(z.length)}}return K}function qO9($){if($===void 0)return{value:void 0,state:"undefined-input"};let Y=uc0({text:$});if(Y.success)return{value:Y.value,state:"successful-parse"};if(Y=uc0({text:RO9($)}),Y.success)return{value:Y.value,state:"repaired-parse"};return{value:void 0,state:"failed-parse"}}var PO9={code:"0",name:"text",parse:($)=>{if(typeof $!=="string")throw Error('"text" parts expect a string value.');return{type:"text",value:$}}},wO9={code:"2",name:"data",parse:($)=>{if(!Array.isArray($))throw Error('"data" parts expect an array value.');return{type:"data",value:$}}},_O9={code:"3",name:"error",parse:($)=>{if(typeof $!=="string")throw Error('"error" parts expect a string value.');return{type:"error",value:$}}},jO9={code:"8",name:"message_annotations",parse:($)=>{if(!Array.isArray($))throw Error('"message_annotations" parts expect an array value.');return{type:"message_annotations",value:$}}},TO9={code:"9",name:"tool_call",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("toolName"in $)||typeof $.toolName!=="string"||!("args"in $)||typeof $.args!=="object")throw Error('"tool_call" parts expect an object with a "toolCallId", "toolName", and "args" property.');return{type:"tool_call",value:$}}},IO9={code:"a",name:"tool_result",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("result"in $))throw Error('"tool_result" parts expect an object with a "toolCallId" and a "result" property.');return{type:"tool_result",value:$}}},CO9={code:"b",name:"tool_call_streaming_start",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("toolName"in $)||typeof $.toolName!=="string")throw Error('"tool_call_streaming_start" parts expect an object with a "toolCallId" and "toolName" property.');return{type:"tool_call_streaming_start",value:$}}},SO9={code:"c",name:"tool_call_delta",parse:($)=>{if($==null||typeof $!=="object"||!("toolCallId"in $)||typeof $.toolCallId!=="string"||!("argsTextDelta"in $)||typeof $.argsTextDelta!=="string")throw Error('"tool_call_delta" parts expect an object with a "toolCallId" and "argsTextDelta" property.');return{type:"tool_call_delta",value:$}}},kO9={code:"d",name:"finish_message",parse:($)=>{if($==null||typeof $!=="object"||!("finishReason"in $)||typeof $.finishReason!=="string")throw Error('"finish_message" parts expect an object with a "finishReason" property.');let Y={finishReason:$.finishReason};if("usage"in $&&$.usage!=null&&typeof $.usage==="object"&&"promptTokens"in $.usage&&"completionTokens"in $.usage)Y.usage={promptTokens:typeof $.usage.promptTokens==="number"?$.usage.promptTokens:Number.NaN,completionTokens:typeof $.usage.completionTokens==="number"?$.usage.completionTokens:Number.NaN};return{type:"finish_message",value:Y}}},vO9={code:"e",name:"finish_step",parse:($)=>{if($==null||typeof $!=="object"||!("finishReason"in $)||typeof $.finishReason!=="string")throw Error('"finish_step" parts expect an object with a "finishReason" property.');let Y={finishReason:$.finishReason,isContinued:!1};if("usage"in $&&$.usage!=null&&typeof $.usage==="object"&&"promptTokens"in $.usage&&"completionTokens"in $.usage)Y.usage={promptTokens:typeof $.usage.promptTokens==="number"?$.usage.promptTokens:Number.NaN,completionTokens:typeof $.usage.completionTokens==="number"?$.usage.completionTokens:Number.NaN};if("isContinued"in $&&typeof $.isContinued==="boolean")Y.isContinued=$.isContinued;return{type:"finish_step",value:Y}}},xO9={code:"f",name:"start_step",parse:($)=>{if($==null||typeof $!=="object"||!("messageId"in $)||typeof $.messageId!=="string")throw Error('"start_step" parts expect an object with an "id" property.');return{type:"start_step",value:{messageId:$.messageId}}}},yO9={code:"g",name:"reasoning",parse:($)=>{if(typeof $!=="string")throw Error('"reasoning" parts expect a string value.');return{type:"reasoning",value:$}}},bO9={code:"h",name:"source",parse:($)=>{if($==null||typeof $!=="object")throw Error('"source" parts expect a Source object.');return{type:"source",value:$}}},hO9={code:"i",name:"redacted_reasoning",parse:($)=>{if($==null||typeof $!=="object"||!("data"in $)||typeof $.data!=="string")throw Error('"redacted_reasoning" parts expect an object with a "data" property.');return{type:"redacted_reasoning",value:{data:$.data}}}},fO9={code:"j",name:"reasoning_signature",parse:($)=>{if($==null||typeof $!=="object"||!("signature"in $)||typeof $.signature!=="string")throw Error('"reasoning_signature" parts expect an object with a "signature" property.');return{type:"reasoning_signature",value:{signature:$.signature}}}},gO9={code:"k",name:"file",parse:($)=>{if($==null||typeof $!=="object"||!("data"in $)||typeof $.data!=="string"||!("mimeType"in $)||typeof $.mimeType!=="string")throw Error('"file" parts expect an object with a "data" and "mimeType" property.');return{type:"file",value:$}}},$l0=[PO9,wO9,_O9,jO9,TO9,IO9,CO9,SO9,kO9,vO9,xO9,yO9,bO9,hO9,fO9,gO9];Object.fromEntries($l0.map(($)=>[$.code,$]));Object.fromEntries($l0.map(($)=>[$.name,$.code]));function Rq4($,Y){let X=$l0.find((G)=>G.name===$);if(!X)throw Error(`Invalid stream part type: ${$}`);return`${X.code}:${JSON.stringify(Y)}
`}function mO9($,Y){var X;let G=(X=void 0)!=null?X:!1;return uO9(MO9($,{$refStrategy:G?"root":"none",target:"jsonSchema7"}),{validate:(J)=>{let Q=$.safeParse(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}var pc0=Symbol.for("vercel.ai.schema");function uO9($,{validate:Y}={}){return{[pc0]:!0,_type:void 0,[qX0]:!0,jsonSchema:$,validate:Y}}function pO9($){return typeof $==="object"&&$!==null&&pc0 in $&&$[pc0]===!0&&"jsonSchema"in $&&"validate"in $}function dO9($){return pO9($)?$:mO9($)}var cO9=typeof globalThis==="object"?globalThis:global,pM="1.9.0",mE4=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function lO9($){var Y=new Set([$]),X=new Set,G=$.match(mE4);if(!G)return function(){return!1};var J={major:+G[1],minor:+G[2],patch:+G[3],prerelease:G[4]};if(J.prerelease!=null)return function(Z){return Z===$};function Q(K){return X.add(K),!1}function W(K){return Y.add(K),!0}return function(Z){if(Y.has(Z))return!0;if(X.has(Z))return!1;var H=Z.match(mE4);if(!H)return Q(Z);var z={major:+H[1],minor:+H[2],patch:+H[3],prerelease:H[4]};if(z.prerelease!=null)return Q(Z);if(J.major!==z.major)return Q(Z);if(J.major===0){if(J.minor===z.minor&&J.patch<=z.patch)return W(Z);return Q(Z)}if(J.minor<=z.minor)return W(Z);return Q(Z)}}var iO9=lO9(pM),nO9=pM.split(".")[0],Zd=Symbol.for("opentelemetry.js.api."+nO9),Ud=cO9;function Yl0($,Y,X,G){var J;if(G===void 0)G=!1;var Q=Ud[Zd]=(J=Ud[Zd])!==null&&J!==void 0?J:{version:pM};if(!G&&Q[$]){var W=Error("@opentelemetry/api: Attempted duplicate registration of API: "+$);return X.error(W.stack||W.message),!1}if(Q.version!==pM){var W=Error("@opentelemetry/api: Registration of version v"+Q.version+" for "+$+" does not match previously registered API v"+pM);return X.error(W.stack||W.message),!1}return Q[$]=Y,X.debug("@opentelemetry/api: Registered a global for "+$+" v"+pM+"."),!0}function Hd($){var Y,X,G=(Y=Ud[Zd])===null||Y===void 0?void 0:Y.version;if(!G||!iO9(G))return;return(X=Ud[Zd])===null||X===void 0?void 0:X[$]}function Xl0($,Y){Y.debug("@opentelemetry/api: Unregistering a global for "+$+" v"+pM+".");var X=Ud[Zd];if(X)delete X[$]}var rO9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},aO9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},sO9=function(){function $(Y){this._namespace=Y.namespace||"DiagComponentLogger"}return $.prototype.debug=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return tp("debug",this._namespace,Y)},$.prototype.error=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return tp("error",this._namespace,Y)},$.prototype.info=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return tp("info",this._namespace,Y)},$.prototype.warn=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return tp("warn",this._namespace,Y)},$.prototype.verbose=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return tp("verbose",this._namespace,Y)},$}();function tp($,Y,X){var G=Hd("diag");if(!G)return;return X.unshift(Y),G[$].apply(G,aO9([],rO9(X),!1))}var lW;(function($){$[$.NONE=0]="NONE",$[$.ERROR=30]="ERROR",$[$.WARN=50]="WARN",$[$.INFO=60]="INFO",$[$.DEBUG=70]="DEBUG",$[$.VERBOSE=80]="VERBOSE",$[$.ALL=9999]="ALL"})(lW||(lW={}));function oO9($,Y){if($<lW.NONE)$=lW.NONE;else if($>lW.ALL)$=lW.ALL;Y=Y||{};function X(G,J){var Q=Y[G];if(typeof Q==="function"&&$>=J)return Q.bind(Y);return function(){}}return{error:X("error",lW.ERROR),warn:X("warn",lW.WARN),info:X("info",lW.INFO),debug:X("debug",lW.DEBUG),verbose:X("verbose",lW.VERBOSE)}}var tO9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},eO9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},$E9="diag",wX0=function(){function $(){function Y(J){return function(){var Q=[];for(var W=0;W<arguments.length;W++)Q[W]=arguments[W];var K=Hd("diag");if(!K)return;return K[J].apply(K,eO9([],tO9(Q),!1))}}var X=this,G=function(J,Q){var W,K,Z;if(Q===void 0)Q={logLevel:lW.INFO};if(J===X){var H=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return X.error((W=H.stack)!==null&&W!==void 0?W:H.message),!1}if(typeof Q==="number")Q={logLevel:Q};var z=Hd("diag"),V=oO9((K=Q.logLevel)!==null&&K!==void 0?K:lW.INFO,J);if(z&&!Q.suppressOverrideMessage){var F=(Z=Error().stack)!==null&&Z!==void 0?Z:"<failed to generate stacktrace>";z.warn("Current logger will be overwritten from "+F),V.warn("Current logger will overwrite one already registered from "+F)}return Yl0("diag",V,X,!0)};X.setLogger=G,X.disable=function(){Xl0($E9,X)},X.createComponentLogger=function(J){return new sO9(J)},X.verbose=Y("verbose"),X.debug=Y("debug"),X.info=Y("info"),X.warn=Y("warn"),X.error=Y("error")}return $.instance=function(){if(!this._instance)this._instance=new $;return this._instance},$}();function YE9($){return Symbol.for($)}var XE9=function(){function $(Y){var X=this;X._currentContext=Y?new Map(Y):new Map,X.getValue=function(G){return X._currentContext.get(G)},X.setValue=function(G,J){var Q=new $(X._currentContext);return Q._currentContext.set(G,J),Q},X.deleteValue=function(G){var J=new $(X._currentContext);return J._currentContext.delete(G),J}}return $}(),GE9=new XE9,JE9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},QE9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},WE9=function(){function $(){}return $.prototype.active=function(){return GE9},$.prototype.with=function(Y,X,G){var J=[];for(var Q=3;Q<arguments.length;Q++)J[Q-3]=arguments[Q];return X.call.apply(X,QE9([G],JE9(J),!1))},$.prototype.bind=function(Y,X){return X},$.prototype.enable=function(){return this},$.prototype.disable=function(){return this},$}(),KE9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},ZE9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},Bc0="context",UE9=new WE9,qq4=function(){function $(){}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalContextManager=function(Y){return Yl0(Bc0,Y,wX0.instance())},$.prototype.active=function(){return this._getContextManager().active()},$.prototype.with=function(Y,X,G){var J,Q=[];for(var W=3;W<arguments.length;W++)Q[W-3]=arguments[W];return(J=this._getContextManager()).with.apply(J,ZE9([Y,X,G],KE9(Q),!1))},$.prototype.bind=function(Y,X){return this._getContextManager().bind(Y,X)},$.prototype._getContextManager=function(){return Hd(Bc0)||UE9},$.prototype.disable=function(){this._getContextManager().disable(),Xl0(Bc0,wX0.instance())},$}(),dc0;(function($){$[$.NONE=0]="NONE",$[$.SAMPLED=1]="SAMPLED"})(dc0||(dc0={}));var Pq4="0000000000000000",wq4="00000000000000000000000000000000",HE9={traceId:wq4,spanId:Pq4,traceFlags:dc0.NONE},Qd=function(){function $(Y){if(Y===void 0)Y=HE9;this._spanContext=Y}return $.prototype.spanContext=function(){return this._spanContext},$.prototype.setAttribute=function(Y,X){return this},$.prototype.setAttributes=function(Y){return this},$.prototype.addEvent=function(Y,X){return this},$.prototype.addLink=function(Y){return this},$.prototype.addLinks=function(Y){return this},$.prototype.setStatus=function(Y){return this},$.prototype.updateName=function(Y){return this},$.prototype.end=function(Y){},$.prototype.isRecording=function(){return!1},$.prototype.recordException=function(Y,X){},$}(),Gl0=YE9("OpenTelemetry Context Key SPAN");function Jl0($){return $.getValue(Gl0)||void 0}function zE9(){return Jl0(qq4.getInstance().active())}function Ql0($,Y){return $.setValue(Gl0,Y)}function VE9($){return $.deleteValue(Gl0)}function FE9($,Y){return Ql0($,new Qd(Y))}function _q4($){var Y;return(Y=Jl0($))===null||Y===void 0?void 0:Y.spanContext()}var LE9=/^([0-9a-f]{32})$/i,DE9=/^[0-9a-f]{16}$/i;function NE9($){return LE9.test($)&&$!==wq4}function AE9($){return DE9.test($)&&$!==Pq4}function jq4($){return NE9($.traceId)&&AE9($.spanId)}function BE9($){return new Qd($)}var Oc0=qq4.getInstance(),Tq4=function(){function $(){}return $.prototype.startSpan=function(Y,X,G){if(G===void 0)G=Oc0.active();var J=Boolean(X===null||X===void 0?void 0:X.root);if(J)return new Qd;var Q=G&&_q4(G);if(OE9(Q)&&jq4(Q))return new Qd(Q);else return new Qd},$.prototype.startActiveSpan=function(Y,X,G,J){var Q,W,K;if(arguments.length<2)return;else if(arguments.length===2)K=X;else if(arguments.length===3)Q=X,K=G;else Q=X,W=G,K=J;var Z=W!==null&&W!==void 0?W:Oc0.active(),H=this.startSpan(Y,Q,Z),z=Ql0(Z,H);return Oc0.with(z,K,void 0,H)},$}();function OE9($){return typeof $==="object"&&typeof $.spanId==="string"&&typeof $.traceId==="string"&&typeof $.traceFlags==="number"}var EE9=new Tq4,ME9=function(){function $(Y,X,G,J){this._provider=Y,this.name=X,this.version=G,this.options=J}return $.prototype.startSpan=function(Y,X,G){return this._getTracer().startSpan(Y,X,G)},$.prototype.startActiveSpan=function(Y,X,G,J){var Q=this._getTracer();return Reflect.apply(Q.startActiveSpan,Q,arguments)},$.prototype._getTracer=function(){if(this._delegate)return this._delegate;var Y=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!Y)return EE9;return this._delegate=Y,this._delegate},$}(),RE9=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){return new Tq4},$}(),qE9=new RE9,uE4=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){var J;return(J=this.getDelegateTracer(Y,X,G))!==null&&J!==void 0?J:new ME9(this,Y,X,G)},$.prototype.getDelegate=function(){var Y;return(Y=this._delegate)!==null&&Y!==void 0?Y:qE9},$.prototype.setDelegate=function(Y){this._delegate=Y},$.prototype.getDelegateTracer=function(Y,X,G){var J;return(J=this._delegate)===null||J===void 0?void 0:J.getTracer(Y,X,G)},$}(),_X0;(function($){$[$.UNSET=0]="UNSET",$[$.OK=1]="OK",$[$.ERROR=2]="ERROR"})(_X0||(_X0={}));var Ec0="trace",PE9=function(){function $(){this._proxyTracerProvider=new uE4,this.wrapSpanContext=BE9,this.isSpanContextValid=jq4,this.deleteSpan=VE9,this.getSpan=Jl0,this.getActiveSpan=zE9,this.getSpanContext=_q4,this.setSpan=Ql0,this.setSpanContext=FE9}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalTracerProvider=function(Y){var X=Yl0(Ec0,this._proxyTracerProvider,wX0.instance());if(X)this._proxyTracerProvider.setDelegate(Y);return X},$.prototype.getTracerProvider=function(){return Hd(Ec0)||this._proxyTracerProvider},$.prototype.getTracer=function(Y,X){return this.getTracerProvider().getTracer(Y,X)},$.prototype.disable=function(){Xl0(Ec0,wX0.instance()),this._proxyTracerProvider=new uE4},$}(),wE9=PE9.getInstance(),_E9=Object.defineProperty,Wl0=($,Y)=>{for(var X in Y)_E9($,X,{get:Y[X],enumerable:!0})};function Iq4($,{contentType:Y,dataStreamVersion:X}){let G=new Headers($!=null?$:{});if(!G.has("Content-Type"))G.set("Content-Type",Y);return G.set("X-Vercel-AI-Data-Stream",X),G}var jE9=class extends TJ{constructor(){super({name:"AI_UnsupportedModelVersionError",message:'Unsupported model version. AI SDK 4 only supports models that implement specification version "v1". Please upgrade to AI SDK 5 to use this model.'})}},Cq4="AI_InvalidArgumentError",Sq4=`vercel.ai.error.${Cq4}`,TE9=Symbol.for(Sq4),kq4,pE4=class extends TJ{constructor({parameter:$,value:Y,message:X}){super({name:Cq4,message:`Invalid argument for parameter ${$}: ${X}`});this[kq4]=!0,this.parameter=$,this.value=Y}static isInstance($){return TJ.hasMarker($,Sq4)}};kq4=TE9;var vq4="AI_RetryError",xq4=`vercel.ai.error.${vq4}`,IE9=Symbol.for(xq4),yq4,dE4=class extends TJ{constructor({message:$,reason:Y,errors:X}){super({name:vq4,message:$});this[yq4]=!0,this.reason=Y,this.errors=X,this.lastError=X[X.length-1]}static isInstance($){return TJ.hasMarker($,xq4)}};yq4=IE9;var CE9=({maxRetries:$=2,initialDelayInMs:Y=2000,backoffFactor:X=2}={})=>async(G)=>bq4(G,{maxRetries:$,delayInMs:Y,backoffFactor:X});async function bq4($,{maxRetries:Y,delayInMs:X,backoffFactor:G},J=[]){try{return await $()}catch(Q){if(kB9(Q))throw Q;if(Y===0)throw Q;let W=SB9(Q),K=[...J,Q],Z=K.length;if(Z>Y)throw new dE4({message:`Failed after ${Z} attempts. Last error: ${W}`,reason:"maxRetriesExceeded",errors:K});if(Q instanceof Error&&MB9.isInstance(Q)&&Q.isRetryable===!0&&Z<=Y)return await CB9(X),bq4($,{maxRetries:Y,delayInMs:G*X,backoffFactor:G},K);if(Z===1)throw Q;throw new dE4({message:`Failed after ${Z} attempts with non-retryable error: '${W}'`,reason:"errorNotRetryable",errors:K})}}function SE9({maxRetries:$}){if($!=null){if(!Number.isInteger($))throw new pE4({parameter:"maxRetries",value:$,message:"maxRetries must be an integer"});if($<0)throw new pE4({parameter:"maxRetries",value:$,message:"maxRetries must be >= 0"})}let Y=$!=null?$:2;return{maxRetries:Y,retry:CE9({maxRetries:Y})}}function Mc0({operationId:$,telemetry:Y}){return{"operation.name":`${$}${(Y==null?void 0:Y.functionId)!=null?` ${Y.functionId}`:""}`,"resource.name":Y==null?void 0:Y.functionId,"ai.operationId":$,"ai.telemetry.functionId":Y==null?void 0:Y.functionId}}function kE9({model:$,settings:Y,telemetry:X,headers:G}){var J;return{"ai.model.provider":$.provider,"ai.model.id":$.modelId,...Object.entries(Y).reduce((Q,[W,K])=>{return Q[`ai.settings.${W}`]=K,Q},{}),...Object.entries((J=X==null?void 0:X.metadata)!=null?J:{}).reduce((Q,[W,K])=>{return Q[`ai.telemetry.metadata.${W}`]=K,Q},{}),...Object.entries(G!=null?G:{}).reduce((Q,[W,K])=>{if(K!==void 0)Q[`ai.request.headers.${W}`]=K;return Q},{})}}var vE9={startSpan(){return BX0},startActiveSpan($,Y,X,G){if(typeof Y==="function")return Y(BX0);if(typeof X==="function")return X(BX0);if(typeof G==="function")return G(BX0)}},BX0={spanContext(){return xE9},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},addLink(){return this},addLinks(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this}},xE9={traceId:"",spanId:"",traceFlags:0};function yE9({isEnabled:$=!1,tracer:Y}={}){if(!$)return vE9;if(Y)return Y;return wE9.getTracer("ai")}function Rc0({name:$,tracer:Y,attributes:X,fn:G,endWhenDone:J=!0}){return Y.startActiveSpan($,{attributes:X},async(Q)=>{try{let W=await G(Q);if(J)Q.end();return W}catch(W){try{bE9(Q,W)}finally{Q.end()}throw W}})}function bE9($,Y){if(Y instanceof Error)$.recordException({name:Y.name,message:Y.message,stack:Y.stack}),$.setStatus({code:_X0.ERROR,message:Y.message});else $.setStatus({code:_X0.ERROR})}function hM({telemetry:$,attributes:Y}){if(($==null?void 0:$.isEnabled)!==!0)return{};return Object.entries(Y).reduce((X,[G,J])=>{if(J===void 0)return X;if(typeof J==="object"&&"input"in J&&typeof J.input==="function"){if(($==null?void 0:$.recordInputs)===!1)return X;let Q=J.input();return Q===void 0?X:{...X,[G]:Q}}if(typeof J==="object"&&"output"in J&&typeof J.output==="function"){if(($==null?void 0:$.recordOutputs)===!1)return X;let Q=J.output();return Q===void 0?X:{...X,[G]:Q}}return{...X,[G]:J}},{})}function hE9($,Y){if(Y<=0)throw Error("chunkSize must be greater than 0");let X=[];for(let G=0;G<$.length;G+=Y)X.push($.slice(G,G+Y));return X}async function fE9({model:$,values:Y,maxRetries:X,abortSignal:G,headers:J,experimental_telemetry:Q}){if(typeof $==="string"||$.specificationVersion!=="v1")throw new jE9;let{maxRetries:W,retry:K}=SE9({maxRetries:X}),Z=kE9({model:$,telemetry:Q,headers:J,settings:{maxRetries:W}}),H=yE9(Q);return Rc0({name:"ai.embedMany",attributes:hM({telemetry:Q,attributes:{...Mc0({operationId:"ai.embedMany",telemetry:Q}),...Z,"ai.values":{input:()=>Y.map((z)=>JSON.stringify(z))}}}),tracer:H,fn:async(z)=>{let V=$.maxEmbeddingsPerCall;if(V==null){let{embeddings:D,usage:A}=await K(()=>{return Rc0({name:"ai.embedMany.doEmbed",attributes:hM({telemetry:Q,attributes:{...Mc0({operationId:"ai.embedMany.doEmbed",telemetry:Q}),...Z,"ai.values":{input:()=>Y.map((B)=>JSON.stringify(B))}}}),tracer:H,fn:async(B)=>{var O;let E=await $.doEmbed({values:Y,abortSignal:G,headers:J}),M=E.embeddings,R=(O=E.usage)!=null?O:{tokens:NaN};return B.setAttributes(hM({telemetry:Q,attributes:{"ai.embeddings":{output:()=>M.map((q)=>JSON.stringify(q))},"ai.usage.tokens":R.tokens}})),{embeddings:M,usage:R}}})});return z.setAttributes(hM({telemetry:Q,attributes:{"ai.embeddings":{output:()=>D.map((B)=>JSON.stringify(B))},"ai.usage.tokens":A.tokens}})),new cE4({values:Y,embeddings:D,usage:A})}let F=hE9(Y,V),L=[],N=0;for(let D of F){let{embeddings:A,usage:B}=await K(()=>{return Rc0({name:"ai.embedMany.doEmbed",attributes:hM({telemetry:Q,attributes:{...Mc0({operationId:"ai.embedMany.doEmbed",telemetry:Q}),...Z,"ai.values":{input:()=>D.map((O)=>JSON.stringify(O))}}}),tracer:H,fn:async(O)=>{var E;let M=await $.doEmbed({values:D,abortSignal:G,headers:J}),R=M.embeddings,q=(E=M.usage)!=null?E:{tokens:NaN};return O.setAttributes(hM({telemetry:Q,attributes:{"ai.embeddings":{output:()=>R.map((_)=>JSON.stringify(_))},"ai.usage.tokens":q.tokens}})),{embeddings:R,usage:q}}})});L.push(...A),N+=B.tokens}return z.setAttributes(hM({telemetry:Q,attributes:{"ai.embeddings":{output:()=>L.map((D)=>JSON.stringify(D))},"ai.usage.tokens":N}})),new cE4({values:Y,embeddings:L,usage:{tokens:N}})}})}var cE4=class{constructor($){this.values=$.values,this.embeddings=$.embeddings,this.usage=$.usage}},hq4="AI_NoObjectGeneratedError",fq4=`vercel.ai.error.${hq4}`,gE9=Symbol.for(fq4),gq4,lE4=class extends TJ{constructor({message:$="No object generated.",cause:Y,text:X,response:G,usage:J,finishReason:Q}){super({name:hq4,message:$,cause:Y});this[gq4]=!0,this.text=X,this.response=G,this.usage=J,this.finishReason=Q}static isInstance($){return TJ.hasMarker($,fq4)}};gq4=gE9;var mq4=U.union([U.string(),U.instanceof(Uint8Array),U.instanceof(ArrayBuffer),U.custom(($)=>{var Y,X;return(X=(Y=globalThis.Buffer)==null?void 0:Y.isBuffer($))!=null?X:!1},{message:"Must be a Buffer"})]),cc0=U.lazy(()=>U.union([U.null(),U.string(),U.number(),U.boolean(),U.record(U.string(),cc0),U.array(cc0)])),H7=U.record(U.string(),U.record(U.string(),cc0)),mE9=U.array(U.union([U.object({type:U.literal("text"),text:U.string()}),U.object({type:U.literal("image"),data:U.string(),mimeType:U.string().optional()})])),uq4=U.object({type:U.literal("text"),text:U.string(),providerOptions:H7.optional(),experimental_providerMetadata:H7.optional()}),uE9=U.object({type:U.literal("image"),image:U.union([mq4,U.instanceof(URL)]),mimeType:U.string().optional(),providerOptions:H7.optional(),experimental_providerMetadata:H7.optional()}),pq4=U.object({type:U.literal("file"),data:U.union([mq4,U.instanceof(URL)]),filename:U.string().optional(),mimeType:U.string(),providerOptions:H7.optional(),experimental_providerMetadata:H7.optional()}),pE9=U.object({type:U.literal("reasoning"),text:U.string(),providerOptions:H7.optional(),experimental_providerMetadata:H7.optional()}),dE9=U.object({type:U.literal("redacted-reasoning"),data:U.string(),providerOptions:H7.optional(),experimental_providerMetadata:H7.optional()}),cE9=U.object({type:U.literal("tool-call"),toolCallId:U.string(),toolName:U.string(),args:U.unknown(),providerOptions:H7.optional(),experimental_providerMetadata:H7.optional()}),lE9=U.object({type:U.literal("tool-result"),toolCallId:U.string(),toolName:U.string(),result:U.unknown(),content:mE9.optional(),isError:U.boolean().optional(),providerOptions:H7.optional(),experimental_providerMetadata:H7.optional()}),iE9=U.object({role:U.literal("system"),content:U.string(),providerOptions:H7.optional(),experimental_providerMetadata:H7.optional()}),nE9=U.object({role:U.literal("user"),content:U.union([U.string(),U.array(U.union([uq4,uE9,pq4]))]),providerOptions:H7.optional(),experimental_providerMetadata:H7.optional()}),rE9=U.object({role:U.literal("assistant"),content:U.union([U.string(),U.array(U.union([uq4,pq4,pE9,dE9,cE9]))]),providerOptions:H7.optional(),experimental_providerMetadata:H7.optional()}),aE9=U.object({role:U.literal("tool"),content:U.array(lE9),providerOptions:H7.optional(),experimental_providerMetadata:H7.optional()});U.union([iE9,nE9,rE9,aE9]);var sE9="JSON schema:",oE9="You MUST answer with a JSON object that matches the JSON schema above.",tE9="You MUST answer with JSON.";function eE9({prompt:$,schema:Y,schemaPrefix:X=Y!=null?sE9:void 0,schemaSuffix:G=Y!=null?oE9:tE9}){return[$!=null&&$.length>0?$:void 0,$!=null&&$.length>0?"":void 0,X,Y!=null?JSON.stringify(Y):void 0,G].filter((J)=>J!=null).join(`
`)}rM({prefix:"aiobj",size:24});rM({prefix:"aiobj",size:24});rM({prefix:"aitxt",size:24});rM({prefix:"msg",size:24});var $M9={};Wl0($M9,{object:()=>XM9,text:()=>YM9});var YM9=()=>({type:"text",responseFormat:()=>({type:"text"}),injectIntoSystemPrompt({system:$}){return $},parsePartial({text:$}){return{partial:$}},parseOutput({text:$}){return $}}),XM9=({schema:$})=>{let Y=dO9($);return{type:"object",responseFormat:({model:X})=>({type:"json",schema:X.supportsStructuredOutputs?Y.jsonSchema:void 0}),injectIntoSystemPrompt({system:X,model:G}){return G.supportsStructuredOutputs?X:eE9({prompt:X,schema:Y.jsonSchema})},parsePartial({text:X}){let G=qO9(X);switch(G.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:G.value};default:{let J=G.state;throw Error(`Unsupported parse state: ${J}`)}}},parseOutput({text:X},G){let J=uc0({text:X});if(!J.success)throw new lE4({message:"No object generated: could not parse the response.",cause:J.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});let Q=Dq4({value:J.value,schema:Y});if(!Q.success)throw new lE4({message:"No object generated: response did not match schema.",cause:Q.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});return Q.value}}};function dq4($,Y){let X=$.getReader(),G=Y.getReader(),J=void 0,Q=void 0,W=!1,K=!1;async function Z(z){try{if(J==null)J=X.read();let V=await J;if(J=void 0,!V.done)z.enqueue(V.value);else z.close()}catch(V){z.error(V)}}async function H(z){try{if(Q==null)Q=G.read();let V=await Q;if(Q=void 0,!V.done)z.enqueue(V.value);else z.close()}catch(V){z.error(V)}}return new ReadableStream({async pull(z){try{if(W){await H(z);return}if(K){await Z(z);return}if(J==null)J=X.read();if(Q==null)Q=G.read();let{result:V,reader:F}=await Promise.race([J.then((L)=>({result:L,reader:X})),Q.then((L)=>({result:L,reader:G}))]);if(!V.done)z.enqueue(V.value);if(F===X){if(J=void 0,V.done)await H(z),W=!0}else if(Q=void 0,V.done)K=!0,await Z(z)}catch(V){z.error(V)}},cancel(){X.cancel(),G.cancel()}})}rM({prefix:"aitxt",size:24});rM({prefix:"msg",size:24});var GM9=U.object({name:U.string(),version:U.string()}).passthrough(),Kl0=U.object({_meta:U.optional(U.object({}).passthrough())}).passthrough(),zd=Kl0,JM9=U.object({method:U.string(),params:U.optional(Kl0)}),QM9=U.object({experimental:U.optional(U.object({}).passthrough()),logging:U.optional(U.object({}).passthrough()),prompts:U.optional(U.object({listChanged:U.optional(U.boolean())}).passthrough()),resources:U.optional(U.object({subscribe:U.optional(U.boolean()),listChanged:U.optional(U.boolean())}).passthrough()),tools:U.optional(U.object({listChanged:U.optional(U.boolean())}).passthrough())}).passthrough();zd.extend({protocolVersion:U.string(),capabilities:QM9,serverInfo:GM9,instructions:U.optional(U.string())});var WM9=zd.extend({nextCursor:U.optional(U.string())}),KM9=U.object({name:U.string(),description:U.optional(U.string()),inputSchema:U.object({type:U.literal("object"),properties:U.optional(U.object({}).passthrough())}).passthrough()}).passthrough();WM9.extend({tools:U.array(KM9)});var ZM9=U.object({type:U.literal("text"),text:U.string()}).passthrough(),UM9=U.object({type:U.literal("image"),data:U.string().base64(),mimeType:U.string()}).passthrough(),cq4=U.object({uri:U.string(),mimeType:U.optional(U.string())}).passthrough(),HM9=cq4.extend({text:U.string()}),zM9=cq4.extend({blob:U.string().base64()}),VM9=U.object({type:U.literal("resource"),resource:U.union([HM9,zM9])}).passthrough();zd.extend({content:U.array(U.union([ZM9,UM9,VM9])),isError:U.boolean().default(!1).optional()}).or(zd.extend({toolResult:U.unknown()}));var pX0="2.0",FM9=U.object({jsonrpc:U.literal(pX0),id:U.union([U.string(),U.number().int()])}).merge(JM9).strict(),LM9=U.object({jsonrpc:U.literal(pX0),id:U.union([U.string(),U.number().int()]),result:zd}).strict(),DM9=U.object({jsonrpc:U.literal(pX0),id:U.union([U.string(),U.number().int()]),error:U.object({code:U.number().int(),message:U.string(),data:U.optional(U.unknown())})}).strict(),NM9=U.object({jsonrpc:U.literal(pX0)}).merge(U.object({method:U.string(),params:U.optional(Kl0)})).strict();U.union([FM9,NM9,LM9,DM9]);var AM9={};Wl0(AM9,{mergeIntoDataStream:()=>EM9,toDataStream:()=>BM9,toDataStreamResponse:()=>OM9});function lq4($={}){let Y=new TextEncoder,X="";return new TransformStream({async start(){if($.onStart)await $.onStart()},async transform(G,J){if(J.enqueue(Y.encode(G)),X+=G,$.onToken)await $.onToken(G);if($.onText&&typeof G==="string")await $.onText(G)},async flush(){if($.onCompletion)await $.onCompletion(X);if($.onFinal)await $.onFinal(X)}})}function Zl0($,Y){return $.pipeThrough(new TransformStream({transform:async(X,G)=>{var J;if(typeof X==="string"){G.enqueue(X);return}if("event"in X){if(X.event==="on_chat_model_stream")iE4((J=X.data)==null?void 0:J.chunk,G);return}iE4(X,G)}})).pipeThrough(lq4(Y)).pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({transform:async(X,G)=>{G.enqueue(Rq4("text",X))}}))}function BM9($,Y){return Zl0($,Y).pipeThrough(new TextEncoderStream)}function OM9($,Y){var X;let G=Zl0($,Y==null?void 0:Y.callbacks).pipeThrough(new TextEncoderStream),J=Y==null?void 0:Y.data,Q=Y==null?void 0:Y.init,W=J?dq4(J.stream,G):G;return new Response(W,{status:(X=Q==null?void 0:Q.status)!=null?X:200,statusText:Q==null?void 0:Q.statusText,headers:Iq4(Q==null?void 0:Q.headers,{contentType:"text/plain; charset=utf-8",dataStreamVersion:"v1"})})}function EM9($,Y){Y.dataStream.merge(Zl0($,Y.callbacks))}function iE4($,Y){if(typeof $.content==="string")Y.enqueue($.content);else{let X=$.content;for(let G of X)if(G.type==="text")Y.enqueue(G.text)}}var MM9={};Wl0(MM9,{mergeIntoDataStream:()=>PM9,toDataStream:()=>RM9,toDataStreamResponse:()=>qM9});function Ul0($,Y){let X=wM9();return IB9($[Symbol.asyncIterator]()).pipeThrough(new TransformStream({async transform(G,J){J.enqueue(X(G.delta))}})).pipeThrough(lq4(Y)).pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({transform:async(G,J)=>{J.enqueue(Rq4("text",G))}}))}function RM9($,Y){return Ul0($,Y).pipeThrough(new TextEncoderStream)}function qM9($,Y={}){var X;let{init:G,data:J,callbacks:Q}=Y,W=Ul0($,Q).pipeThrough(new TextEncoderStream),K=J?dq4(J.stream,W):W;return new Response(K,{status:(X=G==null?void 0:G.status)!=null?X:200,statusText:G==null?void 0:G.statusText,headers:Iq4(G==null?void 0:G.headers,{contentType:"text/plain; charset=utf-8",dataStreamVersion:"v1"})})}function PM9($,Y){Y.dataStream.merge(Ul0($,Y.callbacks))}function wM9(){let $=!0;return(Y)=>{if($){if(Y=Y.trimStart(),Y)$=!1}return Y}}var iq4="vercel.ai.error",_M9=Symbol.for(iq4),nE4,rE4,vX=class $ extends(rE4=Error,nE4=_M9,rE4){constructor({name:Y,message:X,cause:G}){super(X);this[nE4]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,iq4)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}},nq4="AI_APICallError",rq4=`vercel.ai.error.${nq4}`,jM9=Symbol.for(rq4),aE4,sE4,jJ=class extends(sE4=vX,aE4=jM9,sE4){constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:K=G!=null&&(G===408||G===409||G===429||G>=500),data:Z}){super({name:nq4,message:$,cause:W});this[aE4]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=K,this.data=Z}static isInstance($){return vX.hasMarker($,rq4)}},aq4="AI_EmptyResponseBodyError",sq4=`vercel.ai.error.${aq4}`,TM9=Symbol.for(sq4),oE4,tE4,IM9=class extends(tE4=vX,oE4=TM9,tE4){constructor({message:$="Empty response body"}={}){super({name:aq4,message:$});this[oE4]=!0}static isInstance($){return vX.hasMarker($,sq4)}};function oq4($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}var tq4="AI_InvalidArgumentError",eq4=`vercel.ai.error.${tq4}`,CM9=Symbol.for(eq4),eE4,$M4,SM9=class extends($M4=vX,eE4=CM9,$M4){constructor({message:$,cause:Y,argument:X}){super({name:tq4,message:$,cause:Y});this[eE4]=!0,this.argument=X}static isInstance($){return vX.hasMarker($,eq4)}},$P4="AI_JSONParseError",YP4=`vercel.ai.error.${$P4}`,kM9=Symbol.for(YP4),YM4,XM4,jX0=class extends(XM4=vX,YM4=kM9,XM4){constructor({text:$,cause:Y}){super({name:$P4,message:`JSON parsing failed: Text: ${$}.
Error message: ${oq4(Y)}`,cause:Y});this[YM4]=!0,this.text=$}static isInstance($){return vX.hasMarker($,YP4)}},XP4="AI_TypeValidationError",GP4=`vercel.ai.error.${XP4}`,vM9=Symbol.for(GP4),GM4,JM4,Vd=class $ extends(JM4=vX,GM4=vM9,JM4){constructor({value:Y,cause:X}){super({name:XP4,message:`Type validation failed: Value: ${JSON.stringify(Y)}.
Error message: ${oq4(X)}`,cause:X});this[GM4]=!0,this.value=Y}static isInstance(Y){return vX.hasMarker(Y,GP4)}static wrap({value:Y,cause:X}){return $.isInstance(X)&&X.value===Y?X:new $({value:Y,cause:X})}},QM4=class extends Error{constructor($,Y){super($),this.name="ParseError",this.type=Y.type,this.field=Y.field,this.value=Y.value,this.line=Y.line}};function qc0($){}function xM9($){if(typeof $=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:Y=qc0,onError:X=qc0,onRetry:G=qc0,onComment:J}=$,Q="",W=!0,K,Z="",H="";function z(D){let A=W?D.replace(/^\xEF\xBB\xBF/,""):D,[B,O]=yM9(`${Q}${A}`);for(let E of B)V(E);Q=O,W=!1}function V(D){if(D===""){L();return}if(D.startsWith(":")){J&&J(D.slice(D.startsWith(": ")?2:1));return}let A=D.indexOf(":");if(A!==-1){let B=D.slice(0,A),O=D[A+1]===" "?2:1,E=D.slice(A+O);F(B,E,D);return}F(D,"",D)}function F(D,A,B){switch(D){case"event":H=A;break;case"data":Z=`${Z}${A}
`;break;case"id":K=A.includes("\x00")?void 0:A;break;case"retry":/^\d+$/.test(A)?G(parseInt(A,10)):X(new QM4(`Invalid \`retry\` value: "${A}"`,{type:"invalid-retry",value:A,line:B}));break;default:X(new QM4(`Unknown field "${D.length>20?`${D.slice(0,20)}\u2026`:D}"`,{type:"unknown-field",field:D,value:A,line:B}));break}}function L(){Z.length>0&&Y({id:K,event:H||void 0,data:Z.endsWith(`
`)?Z.slice(0,-1):Z}),K=void 0,Z="",H=""}function N(D={}){Q&&D.consume&&V(Q),W=!0,K=void 0,Z="",H="",Q=""}return{feed:z,reset:N}}function yM9($){let Y=[],X="",G=0;for(;G<$.length;){let J=$.indexOf("\r",G),Q=$.indexOf(`
`,G),W=-1;if(J!==-1&&Q!==-1?W=Math.min(J,Q):J!==-1?J===$.length-1?W=-1:W=J:Q!==-1&&(W=Q),W===-1){X=$.slice(G);break}else{let K=$.slice(G,W);Y.push(K),G=W+1,$[G-1]==="\r"&&$[G]===`
`&&G++}}return[Y,X]}var bM9=class extends TransformStream{constructor({onError:$,onRetry:Y,onComment:X}={}){let G;super({start(J){G=xM9({onEvent:(Q)=>{J.enqueue(Q)},onError(Q){$==="terminate"?J.error(Q):typeof $=="function"&&$(Q)},onRetry:Y,onComment:X})},transform(J){G.feed(J)}})}};function TX0(...$){return $.reduce((Y,X)=>({...Y,...X!=null?X:{}}),{})}async function hM9($,Y){if($==null)return Promise.resolve();let X=Y==null?void 0:Y.abortSignal;return new Promise((G,J)=>{if(X==null?void 0:X.aborted){J(WM4());return}let Q=setTimeout(()=>{W(),G()},$),W=()=>{clearTimeout(Q),X==null||X.removeEventListener("abort",K)},K=()=>{W(),J(WM4())};X==null||X.addEventListener("abort",K)})}function WM4(){return new DOMException("Delay was aborted","AbortError")}function Md($){return Object.fromEntries([...$.headers])}var Rd=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=()=>{let Q=X.length,W=Array(Y);for(let K=0;K<Y;K++)W[K]=X[Math.random()*Q|0];return W.join("")};if($==null)return J;if(X.includes(G))throw new SM9({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return()=>`${$}${G}${J()}`};Rd();function fM9($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function PC($){return($ instanceof Error||$ instanceof DOMException)&&($.name==="AbortError"||$.name==="ResponseAborted"||$.name==="TimeoutError")}var gM9=["fetch failed","failed to fetch"];function JP4({error:$,url:Y,requestBodyValues:X}){if(PC($))return $;if($ instanceof TypeError&&gM9.includes($.message.toLowerCase())){let G=$.cause;if(G!=null)return new jJ({message:`Cannot connect to API: ${G.message}`,cause:G,url:Y,requestBodyValues:X,isRetryable:!0})}return $}function QP4($=globalThis){var Y,X,G;if($.window)return"runtime/browser";if((Y=$.navigator)==null?void 0:Y.userAgent)return`runtime/${$.navigator.userAgent.toLowerCase()}`;if((G=(X=$.process)==null?void 0:X.versions)==null?void 0:G.node)return`runtime/node.js/${$.process.version.substring(0)}`;if($.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function mM9($){if($==null)return{};let Y={};if($ instanceof Headers)$.forEach((X,G)=>{Y[G.toLowerCase()]=X});else{if(!Array.isArray($))$=Object.entries($);for(let[X,G]of $)if(G!=null)Y[X.toLowerCase()]=G}return Y}function dX0($,...Y){let X=new Headers(mM9($)),G=X.get("user-agent")||"";return X.set("user-agent",[G,...Y].filter(Boolean).join(" ")),Object.fromEntries(X.entries())}var WP4="3.0.25",uM9=()=>globalThis.fetch,IX0=async({url:$,headers:Y={},successfulResponseHandler:X,failedResponseHandler:G,abortSignal:J,fetch:Q=uM9()})=>{try{let W=await Q($,{method:"GET",headers:dX0(Y,`ai-sdk/provider-utils/${WP4}`,QP4()),signal:J}),K=Md(W);if(!W.ok){let Z;try{Z=await G({response:W,url:$,requestBodyValues:{}})}catch(H){if(PC(H)||jJ.isInstance(H))throw H;throw new jJ({message:"Failed to process error response",cause:H,statusCode:W.status,url:$,responseHeaders:K,requestBodyValues:{}})}throw Z.value}try{return await X({response:W,url:$,requestBodyValues:{}})}catch(Z){if(Z instanceof Error){if(PC(Z)||jJ.isInstance(Z))throw Z}throw new jJ({message:"Failed to process successful response",cause:Z,statusCode:W.status,url:$,responseHeaders:K,requestBodyValues:{}})}}catch(W){throw JP4({error:W,url:$,requestBodyValues:{}})}};function Gd({settingValue:$,environmentVariableName:Y}){if(typeof $==="string")return $;if($!=null||typeof process>"u")return;if($=process.env[Y],$==null||typeof $!=="string")return;return $}var pM9=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,dM9=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function KM4($){let Y=JSON.parse($);if(Y===null||typeof Y!=="object")return Y;if(pM9.test($)===!1&&dM9.test($)===!1)return Y;return cM9(Y)}function cM9($){let Y=[$];while(Y.length){let X=Y;Y=[];for(let G of X){if(Object.prototype.hasOwnProperty.call(G,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(G,"constructor")&&G.constructor!==null&&typeof G.constructor==="object"&&Object.prototype.hasOwnProperty.call(G.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let J in G){let Q=G[J];if(Q&&typeof Q==="object")Y.push(Q)}}}return $}function KP4($){let{stackTraceLimit:Y}=Error;try{Error.stackTraceLimit=0}catch(X){return KM4($)}try{return KM4($)}finally{Error.stackTraceLimit=Y}}var CX0=Symbol.for("vercel.ai.validator");function lM9($){return{[CX0]:!0,validate:$}}function iM9($){return typeof $==="object"&&$!==null&&CX0 in $&&$[CX0]===!0&&"validate"in $}function CC($){let Y;return()=>{if(Y==null)Y=$();return Y}}function nM9($){return iM9($)?$:typeof $==="function"?$():rM9($)}function rM9($){return lM9(async(Y)=>{let X=await $["~standard"].validate(Y);return X.issues==null?{success:!0,value:X.value}:{success:!1,error:new Vd({value:Y,cause:X.issues})}})}async function aM9({value:$,schema:Y}){let X=await wC({value:$,schema:Y});if(!X.success)throw Vd.wrap({value:$,cause:X.error});return X.value}async function wC({value:$,schema:Y}){let X=nM9(Y);try{if(X.validate==null)return{success:!0,value:$,rawValue:$};let G=await X.validate($);if(G.success)return{success:!0,value:G.value,rawValue:$};return{success:!1,error:Vd.wrap({value:$,cause:G.error}),rawValue:$}}catch(G){return{success:!1,error:Vd.wrap({value:$,cause:G}),rawValue:$}}}async function sM9({text:$,schema:Y}){try{let X=KP4($);if(Y==null)return X;return aM9({value:X,schema:Y})}catch(X){if(jX0.isInstance(X)||Vd.isInstance(X))throw X;throw new jX0({text:$,cause:X})}}async function Fd({text:$,schema:Y}){try{let X=KP4($);if(Y==null)return{success:!0,value:X,rawValue:X};return await wC({value:X,schema:Y})}catch(X){return{success:!1,error:jX0.isInstance(X)?X:new jX0({text:$,cause:X}),rawValue:void 0}}}function oM9({stream:$,schema:Y}){return $.pipeThrough(new TextDecoderStream).pipeThrough(new bM9).pipeThrough(new TransformStream({async transform({data:X},G){if(X==="[DONE]")return;G.enqueue(await Fd({text:X,schema:Y}))}}))}var tM9=()=>globalThis.fetch,SX0=async({url:$,headers:Y,body:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>eM9({url:$,headers:{"Content-Type":"application/json",...Y},body:{content:JSON.stringify(X),values:X},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),eM9=async({url:$,headers:Y={},body:X,successfulResponseHandler:G,failedResponseHandler:J,abortSignal:Q,fetch:W=tM9()})=>{try{let K=await W($,{method:"POST",headers:dX0(Y,`ai-sdk/provider-utils/${WP4}`,QP4()),body:X.content,signal:Q}),Z=Md(K);if(!K.ok){let H;try{H=await J({response:K,url:$,requestBodyValues:X.values})}catch(z){if(PC(z)||jJ.isInstance(z))throw z;throw new jJ({message:"Failed to process error response",cause:z,statusCode:K.status,url:$,responseHeaders:Z,requestBodyValues:X.values})}throw H.value}try{return await G({response:K,url:$,requestBodyValues:X.values})}catch(H){if(H instanceof Error){if(PC(H)||jJ.isInstance(H))throw H}throw new jJ({message:"Failed to process successful response",cause:H,statusCode:K.status,url:$,responseHeaders:Z,requestBodyValues:X.values})}}catch(K){throw JP4({error:K,url:$,requestBodyValues:X.values})}};function $R9($){return $}function ZP4({id:$,name:Y,inputSchema:X,outputSchema:G}){return({execute:J,toModelOutput:Q,onInputStart:W,onInputDelta:K,onInputAvailable:Z,...H})=>$R9({type:"provider-defined",id:$,name:Y,args:H,inputSchema:X,outputSchema:G,execute:J,toModelOutput:Q,onInputStart:W,onInputDelta:K,onInputAvailable:Z})}async function zK($){if(typeof $==="function")$=$();return Promise.resolve($)}var ZN=({errorSchema:$,errorToMessage:Y,isRetryable:X})=>async({response:G,url:J,requestBodyValues:Q})=>{let W=await G.text(),K=Md(G);if(W.trim()==="")return{responseHeaders:K,value:new jJ({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,isRetryable:X==null?void 0:X(G)})};try{let Z=await sM9({text:W,schema:$});return{responseHeaders:K,value:new jJ({message:Y(Z),url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,data:Z,isRetryable:X==null?void 0:X(G,Z)})}}catch(Z){return{responseHeaders:K,value:new jJ({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,isRetryable:X==null?void 0:X(G)})}}},YR9=($)=>async({response:Y})=>{let X=Md(Y);if(Y.body==null)throw new IM9({});return{responseHeaders:X,value:oM9({stream:Y.body,schema:$})}},lM=($)=>async({response:Y,url:X,requestBodyValues:G})=>{let J=await Y.text(),Q=await Fd({text:J,schema:$}),W=Md(Y);if(!Q.success)throw new jJ({message:"Invalid JSON response",cause:Q.error,statusCode:Y.status,responseHeaders:W,responseBody:J,url:X,requestBodyValues:G});return{responseHeaders:W,value:Q.value,rawValue:Q.rawValue}},lc0=Symbol.for("vercel.ai.schema");function SC($){let Y;return()=>{if(Y==null)Y=$();return Y}}function Hl0($,{validate:Y}={}){return{[lc0]:!0,_type:void 0,[CX0]:!0,get jsonSchema(){if(typeof $==="function")$=$();return $},validate:Y}}function RX0($){if($.type==="object"){$.additionalProperties=!1;let Y=$.properties;if(Y!=null)for(let X in Y)Y[X]=RX0(Y[X])}if($.type==="array"&&$.items!=null)if(Array.isArray($.items))$.items=$.items.map((Y)=>RX0(Y));else $.items=RX0($.items);return $}var XR9=Symbol("Let zodToJsonSchema decide on which parser to use"),ZM4={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},GR9=($)=>typeof $==="string"?{...ZM4,name:$}:{...ZM4,...$};function rW(){return{}}function JR9($,Y){var X,G,J;let Q={type:"array"};if(((X=$.type)==null?void 0:X._def)&&((J=(G=$.type)==null?void 0:G._def)==null?void 0:J.typeName)!==U0.ZodAny)Q.items=X5($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)Q.minItems=$.minLength.value;if($.maxLength)Q.maxItems=$.maxLength.value;if($.exactLength)Q.minItems=$.exactLength.value,Q.maxItems=$.exactLength.value;return Q}function QR9($){let Y={type:"integer",format:"int64"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function WR9(){return{type:"boolean"}}function UP4($,Y){return X5($.type._def,Y)}var KR9=($,Y)=>{return X5($.innerType._def,Y)};function HP4($,Y,X){let G=X!=null?X:Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>HP4($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return ZR9($)}}var ZR9=($)=>{let Y={type:"integer",format:"unix-time"};for(let X of $.checks)switch(X.kind){case"min":Y.minimum=X.value;break;case"max":Y.maximum=X.value;break}return Y};function UR9($,Y){return{...X5($.innerType._def,Y),default:$.defaultValue()}}function HR9($,Y){return Y.effectStrategy==="input"?X5($.schema._def,Y):rW()}function zR9($){return{type:"string",enum:Array.from($.values)}}var VR9=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $};function FR9($,Y){let X=[X5($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),X5($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((J)=>!!J),G=[];return X.forEach((J)=>{if(VR9(J))G.push(...J.allOf);else{let Q=J;if("additionalProperties"in J&&J.additionalProperties===!1){let{additionalProperties:W,...K}=J;Q=K}G.push(Q)}}),G.length?{allOf:G}:void 0}function LR9($){let Y=typeof $.value;if(Y!=="bigint"&&Y!=="number"&&Y!=="boolean"&&Y!=="string")return{type:Array.isArray($.value)?"array":"object"};return{type:Y==="bigint"?"integer":Y,const:$.value}}var Pc0=void 0,OU={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(Pc0===void 0)Pc0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return Pc0},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function zP4($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value;break;case"max":X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"email":switch(Y.emailStrategy){case"format:email":EU(X,"email",G.message,Y);break;case"format:idn-email":EU(X,"idn-email",G.message,Y);break;case"pattern:zod":wJ(X,OU.email,G.message,Y);break}break;case"url":EU(X,"uri",G.message,Y);break;case"uuid":EU(X,"uuid",G.message,Y);break;case"regex":wJ(X,G.regex,G.message,Y);break;case"cuid":wJ(X,OU.cuid,G.message,Y);break;case"cuid2":wJ(X,OU.cuid2,G.message,Y);break;case"startsWith":wJ(X,RegExp(`^${wc0(G.value,Y)}`),G.message,Y);break;case"endsWith":wJ(X,RegExp(`${wc0(G.value,Y)}$`),G.message,Y);break;case"datetime":EU(X,"date-time",G.message,Y);break;case"date":EU(X,"date",G.message,Y);break;case"time":EU(X,"time",G.message,Y);break;case"duration":EU(X,"duration",G.message,Y);break;case"length":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"includes":{wJ(X,RegExp(wc0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")EU(X,"ipv4",G.message,Y);if(G.version!=="v4")EU(X,"ipv6",G.message,Y);break}case"base64url":wJ(X,OU.base64url,G.message,Y);break;case"jwt":wJ(X,OU.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")wJ(X,OU.ipv4Cidr,G.message,Y);if(G.version!=="v4")wJ(X,OU.ipv6Cidr,G.message,Y);break}case"emoji":wJ(X,OU.emoji(),G.message,Y);break;case"ulid":{wJ(X,OU.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{EU(X,"binary",G.message,Y);break}case"contentEncoding:base64":{X.contentEncoding="base64";break}case"pattern:zod":{wJ(X,OU.base64,G.message,Y);break}}break}case"nanoid":wJ(X,OU.nanoid,G.message,Y)}return X}function wc0($,Y){return Y.patternStrategy==="escape"?NR9($):$}var DR9=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function NR9($){let Y="";for(let X=0;X<$.length;X++){if(!DR9.has($[X]))Y+="\\";Y+=$[X]}return Y}function EU($,Y,X,G){var J;if($.format||((J=$.anyOf)==null?void 0:J.some((Q)=>Q.format))){if(!$.anyOf)$.anyOf=[];if($.format)$.anyOf.push({format:$.format}),delete $.format;$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else $.format=Y}function wJ($,Y,X,G){var J;if($.pattern||((J=$.allOf)==null?void 0:J.some((Q)=>Q.pattern))){if(!$.allOf)$.allOf=[];if($.pattern)$.allOf.push({pattern:$.pattern}),delete $.pattern;$.allOf.push({pattern:UM4(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else $.pattern=UM4(Y,G)}function UM4($,Y){var X;if(!Y.applyRegexFlags||!$.flags)return $.source;let G={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},J=G.i?$.source.toLowerCase():$.source,Q="",W=!1,K=!1,Z=!1;for(let H=0;H<J.length;H++){if(W){Q+=J[H],W=!1;continue}if(G.i){if(K){if(J[H].match(/[a-z]/)){if(Z)Q+=J[H],Q+=`${J[H-2]}-${J[H]}`.toUpperCase(),Z=!1;else if(J[H+1]==="-"&&((X=J[H+2])==null?void 0:X.match(/[a-z]/)))Q+=J[H],Z=!0;else Q+=`${J[H]}${J[H].toUpperCase()}`;continue}}else if(J[H].match(/[a-z]/)){Q+=`[${J[H]}${J[H].toUpperCase()}]`;continue}}if(G.m){if(J[H]==="^"){Q+=`(^|(?<=[\r
]))`;continue}else if(J[H]==="$"){Q+=`($|(?=[\r
]))`;continue}}if(G.s&&J[H]==="."){Q+=K?`${J[H]}\r
`:`[${J[H]}\r
]`;continue}if(Q+=J[H],J[H]==="\\")W=!0;else if(K&&J[H]==="]")K=!1;else if(!K&&J[H]==="[")K=!0}return Q}function VP4($,Y){var X,G,J,Q,W,K;let Z={type:"object",additionalProperties:(X=X5($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]}))!=null?X:Y.allowedAdditionalProperties};if(((G=$.keyType)==null?void 0:G._def.typeName)===U0.ZodString&&((J=$.keyType._def.checks)==null?void 0:J.length)){let{type:H,...z}=zP4($.keyType._def,Y);return{...Z,propertyNames:z}}else if(((Q=$.keyType)==null?void 0:Q._def.typeName)===U0.ZodEnum)return{...Z,propertyNames:{enum:$.keyType._def.values}};else if(((W=$.keyType)==null?void 0:W._def.typeName)===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&((K=$.keyType._def.type._def.checks)==null?void 0:K.length)){let{type:H,...z}=UP4($.keyType._def,Y);return{...Z,propertyNames:z}}return Z}function AR9($,Y){if(Y.mapStrategy==="record")return VP4($,Y);let X=X5($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||rW(),G=X5($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||rW();return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function BR9($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function OR9(){return{not:rW()}}function ER9(){return{type:"null"}}var ic0={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function MR9($,Y){let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in ic0)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=ic0[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,K)=>K.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return RR9($,Y)}var RR9=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>X5(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0};function qR9($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length))return{type:[ic0[$.innerType._def.typeName],"null"]};let X=X5($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function PR9($){let Y={type:"number"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"int":Y.type="integer";break;case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function wR9($,Y){let X={type:"object",properties:{}},G=[],J=$.shape();for(let W in J){let K=J[W];if(K===void 0||K._def===void 0)continue;let Z=jR9(K),H=X5(K._def,{...Y,currentPath:[...Y.currentPath,"properties",W],propertyPath:[...Y.currentPath,"properties",W]});if(H===void 0)continue;if(X.properties[W]=H,!Z)G.push(W)}if(G.length)X.required=G;let Q=_R9($,Y);if(Q!==void 0)X.additionalProperties=Q;return X}function _R9($,Y){if($.catchall._def.typeName!=="ZodNever")return X5($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function jR9($){try{return $.isOptional()}catch(Y){return!0}}var TR9=($,Y)=>{var X;if(Y.currentPath.toString()===((X=Y.propertyPath)==null?void 0:X.toString()))return X5($.innerType._def,Y);let G=X5($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return G?{anyOf:[{not:rW()},G]}:rW()},IR9=($,Y)=>{if(Y.pipeStrategy==="input")return X5($.in._def,Y);else if(Y.pipeStrategy==="output")return X5($.out._def,Y);let X=X5($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=X5($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}};function CR9($,Y){return X5($.type._def,Y)}function SR9($,Y){let G={type:"array",uniqueItems:!0,items:X5($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)G.minItems=$.minSize.value;if($.maxSize)G.maxItems=$.maxSize.value;return G}function kR9($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>X5(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:X5($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>X5(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function vR9(){return{not:rW()}}function xR9(){return rW()}var yR9=($,Y)=>{return X5($.innerType._def,Y)},bR9=($,Y,X)=>{switch(Y){case U0.ZodString:return zP4($,X);case U0.ZodNumber:return PR9($);case U0.ZodObject:return wR9($,X);case U0.ZodBigInt:return QR9($);case U0.ZodBoolean:return WR9();case U0.ZodDate:return HP4($,X);case U0.ZodUndefined:return vR9();case U0.ZodNull:return ER9();case U0.ZodArray:return JR9($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return MR9($,X);case U0.ZodIntersection:return FR9($,X);case U0.ZodTuple:return kR9($,X);case U0.ZodRecord:return VP4($,X);case U0.ZodLiteral:return LR9($);case U0.ZodEnum:return zR9($);case U0.ZodNativeEnum:return BR9($);case U0.ZodNullable:return qR9($,X);case U0.ZodOptional:return TR9($,X);case U0.ZodMap:return AR9($,X);case U0.ZodSet:return SR9($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return CR9($,X);case U0.ZodNaN:case U0.ZodNever:return OR9();case U0.ZodEffects:return HR9($,X);case U0.ZodAny:return rW();case U0.ZodUnknown:return xR9();case U0.ZodDefault:return UR9($,X);case U0.ZodBranded:return UP4($,X);case U0.ZodReadonly:return yR9($,X);case U0.ZodCatch:return KR9($,X);case U0.ZodPipeline:return IR9($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})()}},hR9=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")};function X5($,Y,X=!1){var G;let J=Y.seen.get($);if(Y.override){let Z=(G=Y.override)==null?void 0:G.call(Y,$,Y,J,X);if(Z!==XR9)return Z}if(J&&!X){let Z=fR9(J,Y);if(Z!==void 0)return Z}let Q={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,Q);let W=bR9($,$.typeName,Y),K=typeof W==="function"?X5(W(),Y):W;if(K)gR9($,Y,K);if(Y.postProcess){let Z=Y.postProcess(K,$,Y);return Q.jsonSchema=K,Z}return Q.jsonSchema=K,K}var fR9=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:hR9(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),rW();return Y.$refStrategy==="seen"?rW():void 0}}},gR9=($,Y,X)=>{if($.description)X.description=$.description;return X},mR9=($)=>{let Y=GR9($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}},uR9=($,Y)=>{var X;let G=mR9(Y),J=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((H,[z,V])=>{var F;return{...H,[z]:(F=X5(V._def,{...G,currentPath:[...G.basePath,G.definitionPath,z]},!0))!=null?F:rW()}},{}):void 0,Q=typeof Y==="string"?Y:(Y==null?void 0:Y.nameStrategy)==="title"?void 0:Y==null?void 0:Y.name,W=(X=X5($._def,Q===void 0?G:{...G,currentPath:[...G.basePath,G.definitionPath,Q]},!1))!=null?X:rW(),K=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(K!==void 0)W.title=K;let Z=Q===void 0?J?{...W,[G.definitionPath]:J}:W:{$ref:[...G.$refStrategy==="relative"?[]:G.basePath,G.definitionPath,Q].join("/"),[G.definitionPath]:{...J,[Q]:W}};return Z.$schema="http://json-schema.org/draft-07/schema#",Z},pR9=uR9;function dR9($,Y){var X;let G=(X=void 0)!=null?X:!1;return Hl0(()=>pR9($,{$refStrategy:G?"root":"none"}),{validate:async(J)=>{let Q=await $.safeParseAsync(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function cR9($,Y){var X;let G=(X=void 0)!=null?X:!1;return Hl0(()=>RX0(e$($,{target:"draft-7",io:"input",reused:G?"ref":"inline"})),{validate:async(J)=>{let Q=await oX($,J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function lR9($){return"_zod"in $}function sW($,Y){if(lR9($))return cR9($);else return dR9($)}function iR9($){return typeof $==="object"&&$!==null&&lc0 in $&&$[lc0]===!0&&"jsonSchema"in $&&"validate"in $}function nR9($){return $==null?Hl0({properties:{},additionalProperties:!1}):iR9($)?$:typeof $==="function"?$():sW($)}function rR9($){return $==null?void 0:$.replace(/\/$/,"")}function aR9(){return{headers:{}}}async function sR9(){if(process.env.VERCEL_OIDC_TOKEN)return process.env.VERCEL_OIDC_TOKEN??"";throw Error("@vercel/oidc is not available in the vendored @internal AI packages. Provide an API key instead.")}var oR9="vercel.ai.gateway.error",_c0=Symbol.for(oR9),HM4,zM4,IJ=class $ extends(zM4=Error,HM4=_c0,zM4){constructor({message:Y,statusCode:X=500,cause:G}){super(Y);this[HM4]=!0,this.statusCode=X,this.cause=G}static isInstance(Y){return $.hasMarker(Y)}static hasMarker(Y){return typeof Y==="object"&&Y!==null&&_c0 in Y&&Y[_c0]===!0}},FP4="GatewayAuthenticationError",tR9=`vercel.ai.gateway.error.${FP4}`,VM4=Symbol.for(tR9),FM4,LM4,LP4=class $ extends(LM4=IJ,FM4=VM4,LM4){constructor({message:Y="Authentication failed",statusCode:X=401,cause:G}={}){super({message:Y,statusCode:X,cause:G});this[FM4]=!0,this.name=FP4,this.type="authentication_error"}static isInstance(Y){return IJ.hasMarker(Y)&&VM4 in Y}static createContextualError({apiKeyProvided:Y,oidcTokenProvided:X,message:G="Authentication failed",statusCode:J=401,cause:Q}){let W;if(Y)W=`AI Gateway authentication failed: Invalid API key.

Create a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys

Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.`;else if(X)W=`AI Gateway authentication failed: Invalid OIDC token.

Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.

Alternatively, use an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys`;else W=`AI Gateway authentication failed: No authentication provided.

Option 1 - API key:
Create an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys
Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.

Option 2 - OIDC token:
Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.`;return new $({message:W,statusCode:J,cause:Q})}},DP4="GatewayInvalidRequestError",eR9=`vercel.ai.gateway.error.${DP4}`,DM4=Symbol.for(eR9),NM4,AM4,$q9=class extends(AM4=IJ,NM4=DM4,AM4){constructor({message:$="Invalid request",statusCode:Y=400,cause:X}={}){super({message:$,statusCode:Y,cause:X});this[NM4]=!0,this.name=DP4,this.type="invalid_request_error"}static isInstance($){return IJ.hasMarker($)&&DM4 in $}},NP4="GatewayRateLimitError",Yq9=`vercel.ai.gateway.error.${NP4}`,BM4=Symbol.for(Yq9),OM4,EM4,Xq9=class extends(EM4=IJ,OM4=BM4,EM4){constructor({message:$="Rate limit exceeded",statusCode:Y=429,cause:X}={}){super({message:$,statusCode:Y,cause:X});this[OM4]=!0,this.name=NP4,this.type="rate_limit_exceeded"}static isInstance($){return IJ.hasMarker($)&&BM4 in $}},AP4="GatewayModelNotFoundError",Gq9=`vercel.ai.gateway.error.${AP4}`,MM4=Symbol.for(Gq9),Jq9=CC(()=>sW(U.object({modelId:U.string()}))),RM4,qM4,Qq9=class extends(qM4=IJ,RM4=MM4,qM4){constructor({message:$="Model not found",statusCode:Y=404,modelId:X,cause:G}={}){super({message:$,statusCode:Y,cause:G});this[RM4]=!0,this.name=AP4,this.type="model_not_found",this.modelId=X}static isInstance($){return IJ.hasMarker($)&&MM4 in $}},BP4="GatewayInternalServerError",Wq9=`vercel.ai.gateway.error.${BP4}`,PM4=Symbol.for(Wq9),wM4,_M4,jM4=class extends(_M4=IJ,wM4=PM4,_M4){constructor({message:$="Internal server error",statusCode:Y=500,cause:X}={}){super({message:$,statusCode:Y,cause:X});this[wM4]=!0,this.name=BP4,this.type="internal_server_error"}static isInstance($){return IJ.hasMarker($)&&PM4 in $}},OP4="GatewayResponseError",Kq9=`vercel.ai.gateway.error.${OP4}`,TM4=Symbol.for(Kq9),IM4,CM4,Zq9=class extends(CM4=IJ,IM4=TM4,CM4){constructor({message:$="Invalid response from Gateway",statusCode:Y=502,response:X,validationError:G,cause:J}={}){super({message:$,statusCode:Y,cause:J});this[IM4]=!0,this.name=OP4,this.type="response_error",this.response=X,this.validationError=G}static isInstance($){return IJ.hasMarker($)&&TM4 in $}};async function SM4({response:$,statusCode:Y,defaultMessage:X="Gateway request failed",cause:G,authMethod:J}){let Q=await wC({value:$,schema:Uq9});if(!Q.success)return new Zq9({message:`Invalid error response format: ${X}`,statusCode:Y,response:$,validationError:Q.error,cause:G});let W=Q.value,K=W.error.type,Z=W.error.message;switch(K){case"authentication_error":return LP4.createContextualError({apiKeyProvided:J==="api-key",oidcTokenProvided:J==="oidc",statusCode:Y,cause:G});case"invalid_request_error":return new $q9({message:Z,statusCode:Y,cause:G});case"rate_limit_exceeded":return new Xq9({message:Z,statusCode:Y,cause:G});case"model_not_found":{let H=await wC({value:W.error.param,schema:Jq9});return new Qq9({message:Z,statusCode:Y,modelId:H.success?H.value.modelId:void 0,cause:G})}case"internal_server_error":return new jM4({message:Z,statusCode:Y,cause:G});default:return new jM4({message:Z,statusCode:Y,cause:G})}}var Uq9=CC(()=>sW(U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.unknown().nullish(),code:U.union([U.string(),U.number()]).nullish()})})));function Hq9($){if($.data!==void 0)return $.data;if($.responseBody!=null)try{return JSON.parse($.responseBody)}catch(Y){return $.responseBody}return{}}var EP4="GatewayTimeoutError",zq9=`vercel.ai.gateway.error.${EP4}`,kM4=Symbol.for(zq9),vM4,xM4,yM4=class $ extends(xM4=IJ,vM4=kM4,xM4){constructor({message:Y="Request timed out",statusCode:X=408,cause:G}={}){super({message:Y,statusCode:X,cause:G});this[vM4]=!0,this.name=EP4,this.type="timeout_error"}static isInstance(Y){return IJ.hasMarker(Y)&&kM4 in Y}static createTimeoutError({originalMessage:Y,statusCode:X=408,cause:G}){let J=`Gateway request timed out: ${Y}

    This is a client-side timeout. To resolve this, increase your timeout configuration: https://vercel.com/docs/ai-gateway/capabilities/video-generation#extending-timeouts-for-node.js`;return new $({message:J,statusCode:X,cause:G})}};function bM4($){if(!($ instanceof Error))return!1;let Y=$.code;if(typeof Y==="string")return["UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_CONNECT_TIMEOUT"].includes(Y);return!1}async function VK($,Y){var X;if(IJ.isInstance($))return $;if(bM4($))return yM4.createTimeoutError({originalMessage:$ instanceof Error?$.message:"Unknown error",cause:$});if(jJ.isInstance($)){if($.cause&&bM4($.cause))return yM4.createTimeoutError({originalMessage:$.message,cause:$});return await SM4({response:Hq9($),statusCode:(X=$.statusCode)!=null?X:500,defaultMessage:"Gateway request failed",cause:$,authMethod:Y})}return await SM4({response:{},statusCode:500,defaultMessage:$ instanceof Error?`Gateway request failed: ${$.message}`:"Unknown Gateway error",cause:$,authMethod:Y})}var MP4="ai-gateway-auth-method";async function WN($){let Y=await wC({value:$[MP4],schema:Vq9});return Y.success?Y.value:void 0}var Vq9=CC(()=>sW(U.union([U.literal("api-key"),U.literal("oidc")]))),Fq9=["embedding","image","language"],hM4=class{constructor($){this.config=$}async getAvailableModels(){try{let{value:$}=await IX0({url:`${this.config.baseURL}/config`,headers:await zK(this.config.headers()),successfulResponseHandler:lM(Lq9),failedResponseHandler:ZN({errorSchema:U.any(),errorToMessage:(Y)=>Y}),fetch:this.config.fetch});return $}catch($){throw await VK($)}}async getCredits(){try{let $=new URL(this.config.baseURL),{value:Y}=await IX0({url:`${$.origin}/v1/credits`,headers:await zK(this.config.headers()),successfulResponseHandler:lM(Dq9),failedResponseHandler:ZN({errorSchema:U.any(),errorToMessage:(X)=>X}),fetch:this.config.fetch});return Y}catch($){throw await VK($)}}},Lq9=CC(()=>sW(U.object({models:U.array(U.object({id:U.string(),name:U.string(),description:U.string().nullish(),pricing:U.object({input:U.string(),output:U.string(),input_cache_read:U.string().nullish(),input_cache_write:U.string().nullish()}).transform(({input:$,output:Y,input_cache_read:X,input_cache_write:G})=>({input:$,output:Y,...X?{cachedInputTokens:X}:{},...G?{cacheCreationInputTokens:G}:{}})).nullish(),specification:U.object({specificationVersion:U.literal("v2"),provider:U.string(),modelId:U.string()}),modelType:U.string().nullish()})).transform(($)=>$.filter((Y)=>Y.modelType==null||Fq9.includes(Y.modelType)))}))),Dq9=CC(()=>sW(U.object({balance:U.string(),total_used:U.string()}).transform(({balance:$,total_used:Y})=>({balance:$,totalUsed:Y})))),Nq9=class{constructor($){this.config=$}async getSpendReport($){try{let Y=new URL(this.config.baseURL),X=new URLSearchParams;if(X.set("start_date",$.startDate),X.set("end_date",$.endDate),$.groupBy)X.set("group_by",$.groupBy);if($.datePart)X.set("date_part",$.datePart);if($.userId)X.set("user_id",$.userId);if($.model)X.set("model",$.model);if($.provider)X.set("provider",$.provider);if($.credentialType)X.set("credential_type",$.credentialType);if($.tags&&$.tags.length>0)X.set("tags",$.tags.join(","));let{value:G}=await IX0({url:`${Y.origin}/v1/report?${X.toString()}`,headers:await zK(this.config.headers()),successfulResponseHandler:lM(Aq9),failedResponseHandler:ZN({errorSchema:U.any(),errorToMessage:(J)=>J}),fetch:this.config.fetch});return G}catch(Y){throw await VK(Y)}}},Aq9=SC(()=>sW(U.object({results:U.array(U.object({day:U.string().optional(),hour:U.string().optional(),user:U.string().optional(),model:U.string().optional(),tag:U.string().optional(),provider:U.string().optional(),credential_type:U.enum(["byok","system"]).optional(),total_cost:U.number(),market_cost:U.number().optional(),input_tokens:U.number().optional(),output_tokens:U.number().optional(),cached_input_tokens:U.number().optional(),cache_creation_input_tokens:U.number().optional(),reasoning_tokens:U.number().optional(),request_count:U.number().optional()}).transform(({credential_type:$,total_cost:Y,market_cost:X,input_tokens:G,output_tokens:J,cached_input_tokens:Q,cache_creation_input_tokens:W,reasoning_tokens:K,request_count:Z,...H})=>({...H,...$!==void 0?{credentialType:$}:{},totalCost:Y,...X!==void 0?{marketCost:X}:{},...G!==void 0?{inputTokens:G}:{},...J!==void 0?{outputTokens:J}:{},...Q!==void 0?{cachedInputTokens:Q}:{},...W!==void 0?{cacheCreationInputTokens:W}:{},...K!==void 0?{reasoningTokens:K}:{},...Z!==void 0?{requestCount:Z}:{}})))}))),Bq9=class{constructor($){this.config=$}async getGenerationInfo($){try{let Y=new URL(this.config.baseURL),{value:X}=await IX0({url:`${Y.origin}/v1/generation?id=${encodeURIComponent($.id)}`,headers:await zK(this.config.headers()),successfulResponseHandler:lM(Oq9),failedResponseHandler:ZN({errorSchema:U.any(),errorToMessage:(G)=>G}),fetch:this.config.fetch});return X}catch(Y){throw await VK(Y)}}},Oq9=SC(()=>sW(U.object({data:U.object({id:U.string(),total_cost:U.number(),upstream_inference_cost:U.number(),usage:U.number(),created_at:U.string(),model:U.string(),is_byok:U.boolean(),provider_name:U.string(),streamed:U.boolean(),finish_reason:U.string(),latency:U.number(),generation_time:U.number(),native_tokens_prompt:U.number(),native_tokens_completion:U.number(),native_tokens_reasoning:U.number(),native_tokens_cached:U.number(),native_tokens_cache_creation:U.number(),billable_web_search_calls:U.number()}).transform(({total_cost:$,upstream_inference_cost:Y,created_at:X,is_byok:G,provider_name:J,finish_reason:Q,generation_time:W,native_tokens_prompt:K,native_tokens_completion:Z,native_tokens_reasoning:H,native_tokens_cached:z,native_tokens_cache_creation:V,billable_web_search_calls:F,...L})=>({...L,totalCost:$,upstreamInferenceCost:Y,createdAt:X,isByok:G,providerName:J,finishReason:Q,generationTime:W,promptTokens:K,completionTokens:Z,reasoningTokens:H,cachedTokens:z,cacheCreationTokens:V,billableWebSearchCalls:F}))}).transform(({data:$})=>$))),Eq9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2",this.supportedUrls={"*/*":[/.*/]}}get provider(){return this.config.provider}async getArgs($){let{abortSignal:Y,...X}=$;return{args:this.maybeEncodeFileParts(X),warnings:[]}}async doGenerate($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await zK(this.config.headers());try{let{responseHeaders:Q,value:W,rawValue:K}=await SX0({url:this.getUrl(),headers:TX0(J,$.headers,this.getModelConfigHeaders(this.modelId,!1),await zK(this.config.o11yHeaders)),body:Y,successfulResponseHandler:lM(U.any()),failedResponseHandler:ZN({errorSchema:U.any(),errorToMessage:(Z)=>Z}),...G&&{abortSignal:G},fetch:this.config.fetch});return{...W,request:{body:Y},response:{headers:Q,body:K},warnings:X}}catch(Q){throw await VK(Q,await WN(J))}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await zK(this.config.headers());try{let{value:Q,responseHeaders:W}=await SX0({url:this.getUrl(),headers:TX0(J,$.headers,this.getModelConfigHeaders(this.modelId,!0),await zK(this.config.o11yHeaders)),body:Y,successfulResponseHandler:YR9(U.any()),failedResponseHandler:ZN({errorSchema:U.any(),errorToMessage:(K)=>K}),...G&&{abortSignal:G},fetch:this.config.fetch});return{stream:Q.pipeThrough(new TransformStream({start(K){if(X.length>0)K.enqueue({type:"stream-start",warnings:X})},transform(K,Z){if(K.success){let H=K.value;if(H.type==="raw"&&!$.includeRawChunks)return;if(H.type==="response-metadata"&&H.timestamp&&typeof H.timestamp==="string")H.timestamp=new Date(H.timestamp);Z.enqueue(H)}else Z.error(K.error)}})),request:{body:Y},response:{headers:W}}}catch(Q){throw await VK(Q,await WN(J))}}isFilePart($){return $&&typeof $==="object"&&"type"in $&&$.type==="file"}maybeEncodeFileParts($){for(let Y of $.prompt)for(let X of Y.content)if(this.isFilePart(X)){let G=X;if(G.data instanceof Uint8Array){let J=Uint8Array.from(G.data),Q=Buffer.from(J).toString("base64");G.data=new URL(`data:${G.mediaType||"application/octet-stream"};base64,${Q}`)}}return $}getUrl(){return`${this.config.baseURL}/language-model`}getModelConfigHeaders($,Y){return{"ai-language-model-specification-version":"2","ai-language-model-id":$,"ai-language-model-streaming":String(Y)}}},Mq9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J;let Q=await zK(this.config.headers());try{let{responseHeaders:W,value:K,rawValue:Z}=await SX0({url:this.getUrl(),headers:TX0(Q,Y!=null?Y:{},this.getModelConfigHeaders(),await zK(this.config.o11yHeaders)),body:{input:$.length===1?$[0]:$,...G?{providerOptions:G}:{}},successfulResponseHandler:lM(Rq9),failedResponseHandler:ZN({errorSchema:U.any(),errorToMessage:(H)=>H}),...X&&{abortSignal:X},fetch:this.config.fetch});return{embeddings:K.embeddings,usage:(J=K.usage)!=null?J:void 0,providerMetadata:K.providerMetadata,response:{headers:W,body:Z}}}catch(W){throw await VK(W,await WN(Q))}}getUrl(){return`${this.config.baseURL}/embedding-model`}getModelConfigHeaders(){return{"ai-embedding-model-specification-version":"2","ai-model-id":this.modelId}}},Rq9=CC(()=>sW(U.object({embeddings:U.array(U.array(U.number())),usage:U.object({tokens:U.number()}).nullish(),providerMetadata:U.record(U.string(),U.record(U.string(),U.unknown())).optional()}))),qq9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v2",this.maxImagesPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,providerOptions:Q,headers:W,abortSignal:K}){var Z,H,z,V;let F=await zK(this.config.headers());try{let{responseHeaders:L,value:N}=await SX0({url:this.getUrl(),headers:TX0(F,W!=null?W:{},this.getModelConfigHeaders(),await zK(this.config.o11yHeaders)),body:{prompt:$,n:Y,...X&&{size:X},...G&&{aspectRatio:G},...J&&{seed:J},...Q&&{providerOptions:Q}},successfulResponseHandler:lM(_q9),failedResponseHandler:ZN({errorSchema:U.any(),errorToMessage:(D)=>D}),...K&&{abortSignal:K},fetch:this.config.fetch});return{images:N.images,warnings:(Z=N.warnings)!=null?Z:[],providerMetadata:N.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:L},...N.usage!=null&&{usage:{inputTokens:(H=N.usage.inputTokens)!=null?H:void 0,outputTokens:(z=N.usage.outputTokens)!=null?z:void 0,totalTokens:(V=N.usage.totalTokens)!=null?V:void 0}}}}catch(L){throw await VK(L,await WN(F))}}getUrl(){return`${this.config.baseURL}/image-model`}getModelConfigHeaders(){return{"ai-image-model-specification-version":"2","ai-model-id":this.modelId}}},Pq9=U.object({images:U.array(U.unknown()).optional()}).catchall(U.unknown()),wq9=U.object({inputTokens:U.number().nullish(),outputTokens:U.number().nullish(),totalTokens:U.number().nullish()}),_q9=U.object({images:U.array(U.string()),warnings:U.array(U.object({type:U.literal("other"),message:U.string()})).optional(),providerMetadata:U.record(U.string(),Pq9).optional(),usage:wq9.optional()}),jq9=SC(()=>sW(U.object({objective:U.string().describe("Natural-language description of the web research goal, including source or freshness guidance and broader context from the task. Maximum 5000 characters."),search_queries:U.array(U.string()).optional().describe("Optional search queries to supplement the objective. Maximum 200 characters per query."),mode:U.enum(["one-shot","agentic"]).optional().describe('Mode preset: "one-shot" for comprehensive results with longer excerpts (default), "agentic" for concise, token-efficient results for multi-step workflows.'),max_results:U.number().optional().describe("Maximum number of results to return (1-20). Defaults to 10 if not specified."),source_policy:U.object({include_domains:U.array(U.string()).optional().describe("List of domains to include in search results."),exclude_domains:U.array(U.string()).optional().describe("List of domains to exclude from search results."),after_date:U.string().optional().describe("Only include results published after this date (ISO 8601 format).")}).optional().describe("Source policy for controlling which domains to include/exclude and freshness."),excerpts:U.object({max_chars_per_result:U.number().optional().describe("Maximum characters per result."),max_chars_total:U.number().optional().describe("Maximum total characters across all results.")}).optional().describe("Excerpt configuration for controlling result length."),fetch_policy:U.object({max_age_seconds:U.number().optional().describe("Maximum age in seconds for cached content. Set to 0 to always fetch fresh content.")}).optional().describe("Fetch policy for controlling content freshness.")}))),Tq9=SC(()=>sW(U.union([U.object({searchId:U.string(),results:U.array(U.object({url:U.string(),title:U.string(),excerpt:U.string(),publishDate:U.string().nullable().optional(),relevanceScore:U.number().optional()}))}),U.object({error:U.enum(["api_error","rate_limit","timeout","invalid_input","configuration_error","unknown"]),statusCode:U.number().optional(),message:U.string()})]))),Iq9=ZP4({id:"gateway.parallel_search",name:"parallel_search",inputSchema:jq9,outputSchema:Tq9}),Cq9=($={})=>Iq9($),Sq9=SC(()=>sW(U.object({query:U.union([U.string(),U.array(U.string())]).describe("Search query (string) or multiple queries (array of up to 5 strings). Multi-query searches return combined results from all queries."),max_results:U.number().optional().describe("Maximum number of search results to return (1-20, default: 10)"),max_tokens_per_page:U.number().optional().describe("Maximum number of tokens to extract per search result page (256-2048, default: 2048)"),max_tokens:U.number().optional().describe("Maximum total tokens across all search results (default: 25000, max: 1000000)"),country:U.string().optional().describe("Two-letter ISO 3166-1 alpha-2 country code for regional search results (e.g., 'US', 'GB', 'FR')"),search_domain_filter:U.array(U.string()).optional().describe("List of domains to include or exclude from search results (max 20). To include: ['nature.com', 'science.org']. To exclude: ['-example.com', '-spam.net']"),search_language_filter:U.array(U.string()).optional().describe("List of ISO 639-1 language codes to filter results (max 10, lowercase). Examples: ['en', 'fr', 'de']"),search_after_date:U.string().optional().describe("Include only results published after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),search_before_date:U.string().optional().describe("Include only results published before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),last_updated_after_filter:U.string().optional().describe("Include only results last updated after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),last_updated_before_filter:U.string().optional().describe("Include only results last updated before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),search_recency_filter:U.enum(["day","week","month","year"]).optional().describe("Filter results by relative time period. Cannot be used with search_after_date or search_before_date.")}))),kq9=SC(()=>sW(U.union([U.object({results:U.array(U.object({title:U.string(),url:U.string(),snippet:U.string(),date:U.string().optional(),lastUpdated:U.string().optional()})),id:U.string()}),U.object({error:U.enum(["api_error","rate_limit","timeout","invalid_input","unknown"]),statusCode:U.number().optional(),message:U.string()})]))),vq9=ZP4({id:"gateway.perplexity_search",name:"perplexity_search",inputSchema:Sq9,outputSchema:kq9}),xq9=($={})=>vq9($),yq9={parallelSearch:Cq9,perplexitySearch:xq9};async function bq9(){var $;return($=aR9().headers)==null?void 0:$["x-vercel-id"]}var hq9="2.0.88",fq9="0.0.1";function gq9($={}){var Y,X;let G=null,J=null,Q=(Y=$.metadataCacheRefreshMillis)!=null?Y:300000,W=0,K=(X=rR9($.baseURL))!=null?X:"https://ai-gateway.vercel.sh/v1/ai",Z=async()=>{let A=await uq9($);if(A)return dX0({Authorization:`Bearer ${A.token}`,"ai-gateway-protocol-version":fq9,[MP4]:A.authMethod,...$.headers},`ai-sdk/gateway/${hq9}`);throw LP4.createContextualError({apiKeyProvided:!1,oidcTokenProvided:!1,statusCode:401})},H=()=>{let A=Gd({settingValue:void 0,environmentVariableName:"VERCEL_DEPLOYMENT_ID"}),B=Gd({settingValue:void 0,environmentVariableName:"VERCEL_ENV"}),O=Gd({settingValue:void 0,environmentVariableName:"VERCEL_REGION"}),E=Gd({settingValue:void 0,environmentVariableName:"VERCEL_PROJECT_ID"});return async()=>{let M=await bq9();return{...A&&{"ai-o11y-deployment-id":A},...B&&{"ai-o11y-environment":B},...O&&{"ai-o11y-region":O},...M&&{"ai-o11y-request-id":M},...E&&{"ai-o11y-project-id":E}}}},z=(A)=>{return new Eq9(A,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})},V=async()=>{var A,B,O;let E=(O=(B=(A=$._internal)==null?void 0:A.currentDate)==null?void 0:B.call(A).getTime())!=null?O:Date.now();if(!G||E-W>Q)W=E,G=new hM4({baseURL:K,headers:Z,fetch:$.fetch}).getAvailableModels().then((M)=>{return J=M,M}).catch(async(M)=>{throw await VK(M,await WN(await Z()))});return J?Promise.resolve(J):G},F=async()=>{return new hM4({baseURL:K,headers:Z,fetch:$.fetch}).getCredits().catch(async(A)=>{throw await VK(A,await WN(await Z()))})},L=async(A)=>{return new Nq9({baseURL:K,headers:Z,fetch:$.fetch}).getSpendReport(A).catch(async(B)=>{throw await VK(B,await WN(await Z()))})},N=async(A)=>{return new Bq9({baseURL:K,headers:Z,fetch:$.fetch}).getGenerationInfo(A).catch(async(B)=>{throw await VK(B,await WN(await Z()))})},D=function(A){if(new.target)throw Error("The Gateway Provider model function cannot be called with the new keyword.");return z(A)};return D.getAvailableModels=V,D.getCredits=F,D.getSpendReport=L,D.getGenerationInfo=N,D.imageModel=(A)=>{return new qq9(A,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})},D.languageModel=z,D.textEmbeddingModel=(A)=>{return new Mq9(A,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})},D.tools=yq9,D}var mq9=gq9();async function uq9($){let Y=Gd({settingValue:$.apiKey,environmentVariableName:"AI_GATEWAY_API_KEY"});if(Y)return{token:Y,authMethod:"api-key"};try{return{token:await sR9(),authMethod:"oidc"}}catch(X){return null}}var pq9=typeof globalThis==="object"?globalThis:global,dM="1.9.0",fM4=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function dq9($){var Y=new Set([$]),X=new Set,G=$.match(fM4);if(!G)return function(){return!1};var J={major:+G[1],minor:+G[2],patch:+G[3],prerelease:G[4]};if(J.prerelease!=null)return function(Z){return Z===$};function Q(K){return X.add(K),!1}function W(K){return Y.add(K),!0}return function(Z){if(Y.has(Z))return!0;if(X.has(Z))return!1;var H=Z.match(fM4);if(!H)return Q(Z);var z={major:+H[1],minor:+H[2],patch:+H[3],prerelease:H[4]};if(z.prerelease!=null)return Q(Z);if(J.major!==z.major)return Q(Z);if(J.major===0){if(J.minor===z.minor&&J.patch<=z.patch)return W(Z);return Q(Z)}if(J.minor<=z.minor)return W(Z);return Q(Z)}}var cq9=dq9(dM),lq9=dM.split(".")[0],Ld=Symbol.for("opentelemetry.js.api."+lq9),Dd=pq9;function zl0($,Y,X,G){var J;if(G===void 0)G=!1;var Q=Dd[Ld]=(J=Dd[Ld])!==null&&J!==void 0?J:{version:dM};if(!G&&Q[$]){var W=Error("@opentelemetry/api: Attempted duplicate registration of API: "+$);return X.error(W.stack||W.message),!1}if(Q.version!==dM){var W=Error("@opentelemetry/api: Registration of version v"+Q.version+" for "+$+" does not match previously registered API v"+dM);return X.error(W.stack||W.message),!1}return Q[$]=Y,X.debug("@opentelemetry/api: Registered a global for "+$+" v"+dM+"."),!0}function Nd($){var Y,X,G=(Y=Dd[Ld])===null||Y===void 0?void 0:Y.version;if(!G||!cq9(G))return;return(X=Dd[Ld])===null||X===void 0?void 0:X[$]}function Vl0($,Y){Y.debug("@opentelemetry/api: Unregistering a global for "+$+" v"+dM+".");var X=Dd[Ld];if(X)delete X[$]}var iq9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},nq9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},rq9=function(){function $(Y){this._namespace=Y.namespace||"DiagComponentLogger"}return $.prototype.debug=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return ep("debug",this._namespace,Y)},$.prototype.error=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return ep("error",this._namespace,Y)},$.prototype.info=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return ep("info",this._namespace,Y)},$.prototype.warn=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return ep("warn",this._namespace,Y)},$.prototype.verbose=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return ep("verbose",this._namespace,Y)},$}();function ep($,Y,X){var G=Nd("diag");if(!G)return;return X.unshift(Y),G[$].apply(G,nq9([],iq9(X),!1))}var iW;(function($){$[$.NONE=0]="NONE",$[$.ERROR=30]="ERROR",$[$.WARN=50]="WARN",$[$.INFO=60]="INFO",$[$.DEBUG=70]="DEBUG",$[$.VERBOSE=80]="VERBOSE",$[$.ALL=9999]="ALL"})(iW||(iW={}));function aq9($,Y){if($<iW.NONE)$=iW.NONE;else if($>iW.ALL)$=iW.ALL;Y=Y||{};function X(G,J){var Q=Y[G];if(typeof Q==="function"&&$>=J)return Q.bind(Y);return function(){}}return{error:X("error",iW.ERROR),warn:X("warn",iW.WARN),info:X("info",iW.INFO),debug:X("debug",iW.DEBUG),verbose:X("verbose",iW.VERBOSE)}}var sq9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},oq9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},tq9="diag",kX0=function(){function $(){function Y(J){return function(){var Q=[];for(var W=0;W<arguments.length;W++)Q[W]=arguments[W];var K=Nd("diag");if(!K)return;return K[J].apply(K,oq9([],sq9(Q),!1))}}var X=this,G=function(J,Q){var W,K,Z;if(Q===void 0)Q={logLevel:iW.INFO};if(J===X){var H=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return X.error((W=H.stack)!==null&&W!==void 0?W:H.message),!1}if(typeof Q==="number")Q={logLevel:Q};var z=Nd("diag"),V=aq9((K=Q.logLevel)!==null&&K!==void 0?K:iW.INFO,J);if(z&&!Q.suppressOverrideMessage){var F=(Z=Error().stack)!==null&&Z!==void 0?Z:"<failed to generate stacktrace>";z.warn("Current logger will be overwritten from "+F),V.warn("Current logger will overwrite one already registered from "+F)}return zl0("diag",V,X,!0)};X.setLogger=G,X.disable=function(){Vl0(tq9,X)},X.createComponentLogger=function(J){return new rq9(J)},X.verbose=Y("verbose"),X.debug=Y("debug"),X.info=Y("info"),X.warn=Y("warn"),X.error=Y("error")}return $.instance=function(){if(!this._instance)this._instance=new $;return this._instance},$}();function eq9($){return Symbol.for($)}var $P9=function(){function $(Y){var X=this;X._currentContext=Y?new Map(Y):new Map,X.getValue=function(G){return X._currentContext.get(G)},X.setValue=function(G,J){var Q=new $(X._currentContext);return Q._currentContext.set(G,J),Q},X.deleteValue=function(G){var J=new $(X._currentContext);return J._currentContext.delete(G),J}}return $}(),YP9=new $P9,XP9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},GP9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},JP9=function(){function $(){}return $.prototype.active=function(){return YP9},$.prototype.with=function(Y,X,G){var J=[];for(var Q=3;Q<arguments.length;Q++)J[Q-3]=arguments[Q];return X.call.apply(X,GP9([G],XP9(J),!1))},$.prototype.bind=function(Y,X){return X},$.prototype.enable=function(){return this},$.prototype.disable=function(){return this},$}(),QP9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},WP9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},jc0="context",KP9=new JP9,RP4=function(){function $(){}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalContextManager=function(Y){return zl0(jc0,Y,kX0.instance())},$.prototype.active=function(){return this._getContextManager().active()},$.prototype.with=function(Y,X,G){var J,Q=[];for(var W=3;W<arguments.length;W++)Q[W-3]=arguments[W];return(J=this._getContextManager()).with.apply(J,WP9([Y,X,G],QP9(Q),!1))},$.prototype.bind=function(Y,X){return this._getContextManager().bind(Y,X)},$.prototype._getContextManager=function(){return Nd(jc0)||KP9},$.prototype.disable=function(){this._getContextManager().disable(),Vl0(jc0,kX0.instance())},$}(),nc0;(function($){$[$.NONE=0]="NONE",$[$.SAMPLED=1]="SAMPLED"})(nc0||(nc0={}));var qP4="0000000000000000",PP4="00000000000000000000000000000000",ZP9={traceId:PP4,spanId:qP4,traceFlags:nc0.NONE},Wd=function(){function $(Y){if(Y===void 0)Y=ZP9;this._spanContext=Y}return $.prototype.spanContext=function(){return this._spanContext},$.prototype.setAttribute=function(Y,X){return this},$.prototype.setAttributes=function(Y){return this},$.prototype.addEvent=function(Y,X){return this},$.prototype.addLink=function(Y){return this},$.prototype.addLinks=function(Y){return this},$.prototype.setStatus=function(Y){return this},$.prototype.updateName=function(Y){return this},$.prototype.end=function(Y){},$.prototype.isRecording=function(){return!1},$.prototype.recordException=function(Y,X){},$}(),Fl0=eq9("OpenTelemetry Context Key SPAN");function Ll0($){return $.getValue(Fl0)||void 0}function UP9(){return Ll0(RP4.getInstance().active())}function Dl0($,Y){return $.setValue(Fl0,Y)}function HP9($){return $.deleteValue(Fl0)}function zP9($,Y){return Dl0($,new Wd(Y))}function wP4($){var Y;return(Y=Ll0($))===null||Y===void 0?void 0:Y.spanContext()}var VP9=/^([0-9a-f]{32})$/i,FP9=/^[0-9a-f]{16}$/i;function LP9($){return VP9.test($)&&$!==PP4}function DP9($){return FP9.test($)&&$!==qP4}function _P4($){return LP9($.traceId)&&DP9($.spanId)}function NP9($){return new Wd($)}var Tc0=RP4.getInstance(),jP4=function(){function $(){}return $.prototype.startSpan=function(Y,X,G){if(G===void 0)G=Tc0.active();var J=Boolean(X===null||X===void 0?void 0:X.root);if(J)return new Wd;var Q=G&&wP4(G);if(AP9(Q)&&_P4(Q))return new Wd(Q);else return new Wd},$.prototype.startActiveSpan=function(Y,X,G,J){var Q,W,K;if(arguments.length<2)return;else if(arguments.length===2)K=X;else if(arguments.length===3)Q=X,K=G;else Q=X,W=G,K=J;var Z=W!==null&&W!==void 0?W:Tc0.active(),H=this.startSpan(Y,Q,Z),z=Dl0(Z,H);return Tc0.with(z,K,void 0,H)},$}();function AP9($){return typeof $==="object"&&typeof $.spanId==="string"&&typeof $.traceId==="string"&&typeof $.traceFlags==="number"}var BP9=new jP4,OP9=function(){function $(Y,X,G,J){this._provider=Y,this.name=X,this.version=G,this.options=J}return $.prototype.startSpan=function(Y,X,G){return this._getTracer().startSpan(Y,X,G)},$.prototype.startActiveSpan=function(Y,X,G,J){var Q=this._getTracer();return Reflect.apply(Q.startActiveSpan,Q,arguments)},$.prototype._getTracer=function(){if(this._delegate)return this._delegate;var Y=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!Y)return BP9;return this._delegate=Y,this._delegate},$}(),EP9=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){return new jP4},$}(),MP9=new EP9,gM4=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){var J;return(J=this.getDelegateTracer(Y,X,G))!==null&&J!==void 0?J:new OP9(this,Y,X,G)},$.prototype.getDelegate=function(){var Y;return(Y=this._delegate)!==null&&Y!==void 0?Y:MP9},$.prototype.setDelegate=function(Y){this._delegate=Y},$.prototype.getDelegateTracer=function(Y,X,G){var J;return(J=this._delegate)===null||J===void 0?void 0:J.getTracer(Y,X,G)},$}(),vX0;(function($){$[$.UNSET=0]="UNSET",$[$.OK=1]="OK",$[$.ERROR=2]="ERROR"})(vX0||(vX0={}));var Ic0="trace",RP9=function(){function $(){this._proxyTracerProvider=new gM4,this.wrapSpanContext=NP9,this.isSpanContextValid=_P4,this.deleteSpan=HP9,this.getSpan=Ll0,this.getActiveSpan=UP9,this.getSpanContext=wP4,this.setSpan=Dl0,this.setSpanContext=zP9}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalTracerProvider=function(Y){var X=zl0(Ic0,this._proxyTracerProvider,kX0.instance());if(X)this._proxyTracerProvider.setDelegate(Y);return X},$.prototype.getTracerProvider=function(){return Nd(Ic0)||this._proxyTracerProvider},$.prototype.getTracer=function(Y,X){return this.getTracerProvider().getTracer(Y,X)},$.prototype.disable=function(){Vl0(Ic0,kX0.instance()),this._proxyTracerProvider=new gM4},$}(),qP9=RP9.getInstance(),PP9=Object.defineProperty,wP9=($,Y)=>{for(var X in Y)PP9($,X,{get:Y[X],enumerable:!0})},TP4="AI_InvalidArgumentError",IP4=`vercel.ai.error.${TP4}`,_P9=Symbol.for(IP4),CP4,mM4=class extends vX{constructor({parameter:$,value:Y,message:X}){super({name:TP4,message:`Invalid argument for parameter ${$}: ${X}`});this[CP4]=!0,this.parameter=$,this.value=Y}static isInstance($){return vX.hasMarker($,IP4)}};CP4=_P9;var SP4="AI_NoObjectGeneratedError",kP4=`vercel.ai.error.${SP4}`,jP9=Symbol.for(kP4),vP4,uM4=class extends vX{constructor({message:$="No object generated.",cause:Y,text:X,response:G,usage:J,finishReason:Q}){super({name:SP4,message:$,cause:Y});this[vP4]=!0,this.text=X,this.response=G,this.usage=J,this.finishReason=Q}static isInstance($){return vX.hasMarker($,kP4)}};vP4=jP9;var TP9=class extends vX{constructor($){super({name:"AI_UnsupportedModelVersionError",message:`Unsupported model version ${$.version} for provider "${$.provider}" and model "${$.modelId}". AI SDK 5 only supports models that implement specification version "v2".`});this.version=$.version,this.provider=$.provider,this.modelId=$.modelId}},xP4="AI_RetryError",yP4=`vercel.ai.error.${xP4}`,IP9=Symbol.for(yP4),bP4,pM4=class extends vX{constructor({message:$,reason:Y,errors:X}){super({name:xP4,message:$});this[bP4]=!0,this.reason=Y,this.errors=X,this.lastError=X[X.length-1]}static isInstance($){return vX.hasMarker($,yP4)}};bP4=IP9;function CP9($){if(typeof $!=="string"){if($.specificationVersion!=="v2")throw new TP9({version:$.specificationVersion,provider:$.provider,modelId:$.modelId});return $}return SP9().textEmbeddingModel($)}function SP9(){var $;return($=globalThis.AI_SDK_DEFAULT_PROVIDER)!=null?$:mq9}var kP9="5.0.186",hP4=U.union([U.string(),U.instanceof(Uint8Array),U.instanceof(ArrayBuffer),U.custom(($)=>{var Y,X;return(X=(Y=globalThis.Buffer)==null?void 0:Y.isBuffer($))!=null?X:!1},{message:"Must be a Buffer"})]),Ad=U.lazy(()=>U.union([U.null(),U.string(),U.number(),U.boolean(),U.record(U.string(),Ad),U.array(Ad)])),LH=U.record(U.string(),U.record(U.string(),Ad)),fP4=U.object({type:U.literal("text"),text:U.string(),providerOptions:LH.optional()}),vP9=U.object({type:U.literal("image"),image:U.union([hP4,U.instanceof(URL)]),mediaType:U.string().optional(),providerOptions:LH.optional()}),gP4=U.object({type:U.literal("file"),data:U.union([hP4,U.instanceof(URL)]),filename:U.string().optional(),mediaType:U.string(),providerOptions:LH.optional()}),xP9=U.object({type:U.literal("reasoning"),text:U.string(),providerOptions:LH.optional()}),yP9=U.object({type:U.literal("tool-call"),toolCallId:U.string(),toolName:U.string(),input:U.unknown(),providerOptions:LH.optional(),providerExecuted:U.boolean().optional()}),bP9=U.discriminatedUnion("type",[U.object({type:U.literal("text"),value:U.string()}),U.object({type:U.literal("json"),value:Ad}),U.object({type:U.literal("error-text"),value:U.string()}),U.object({type:U.literal("error-json"),value:Ad}),U.object({type:U.literal("content"),value:U.array(U.union([U.object({type:U.literal("text"),text:U.string()}),U.object({type:U.literal("media"),data:U.string(),mediaType:U.string()})]))})]),mP4=U.object({type:U.literal("tool-result"),toolCallId:U.string(),toolName:U.string(),output:bP9,providerOptions:LH.optional()}),hP9=U.object({role:U.literal("system"),content:U.string(),providerOptions:LH.optional()}),fP9=U.object({role:U.literal("user"),content:U.union([U.string(),U.array(U.union([fP4,vP9,gP4]))]),providerOptions:LH.optional()}),gP9=U.object({role:U.literal("assistant"),content:U.union([U.string(),U.array(U.union([fP4,gP4,xP9,yP9,mP4]))]),providerOptions:LH.optional()}),mP9=U.object({role:U.literal("tool"),content:U.array(mP4),providerOptions:LH.optional()});U.union([hP9,fP9,gP9,mP9]);function Cc0({operationId:$,telemetry:Y}){return{"operation.name":`${$}${(Y==null?void 0:Y.functionId)!=null?` ${Y.functionId}`:""}`,"resource.name":Y==null?void 0:Y.functionId,"ai.operationId":$,"ai.telemetry.functionId":Y==null?void 0:Y.functionId}}function uP9({model:$,settings:Y,telemetry:X,headers:G}){var J;return{"ai.model.provider":$.provider,"ai.model.id":$.modelId,...Object.entries(Y).reduce((Q,[W,K])=>{return Q[`ai.settings.${W}`]=K,Q},{}),...Object.entries((J=X==null?void 0:X.metadata)!=null?J:{}).reduce((Q,[W,K])=>{return Q[`ai.telemetry.metadata.${W}`]=K,Q},{}),...Object.entries(G!=null?G:{}).reduce((Q,[W,K])=>{if(K!==void 0)Q[`ai.request.headers.${W}`]=K;return Q},{})}}var pP9={startSpan(){return OX0},startActiveSpan($,Y,X,G){if(typeof Y==="function")return Y(OX0);if(typeof X==="function")return X(OX0);if(typeof G==="function")return G(OX0)}},OX0={spanContext(){return dP9},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},addLink(){return this},addLinks(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this}},dP9={traceId:"",spanId:"",traceFlags:0};function cP9({isEnabled:$=!1,tracer:Y}={}){if(!$)return pP9;if(Y)return Y;return qP9.getTracer("ai")}function Sc0({name:$,tracer:Y,attributes:X,fn:G,endWhenDone:J=!0}){return Y.startActiveSpan($,{attributes:X},async(Q)=>{try{let W=await G(Q);if(J)Q.end();return W}catch(W){try{lP9(Q,W)}finally{Q.end()}throw W}})}function lP9($,Y){if(Y instanceof Error)$.recordException({name:Y.name,message:Y.message,stack:Y.stack}),$.setStatus({code:vX0.ERROR,message:Y.message});else $.setStatus({code:vX0.ERROR})}function fM({telemetry:$,attributes:Y}){if(($==null?void 0:$.isEnabled)!==!0)return{};return Object.entries(Y).reduce((X,[G,J])=>{if(J==null)return X;if(typeof J==="object"&&"input"in J&&typeof J.input==="function"){if(($==null?void 0:$.recordInputs)===!1)return X;let Q=J.input();return Q==null?X:{...X,[G]:Q}}if(typeof J==="object"&&"output"in J&&typeof J.output==="function"){if(($==null?void 0:$.recordOutputs)===!1)return X;let Q=J.output();return Q==null?X:{...X,[G]:Q}}return{...X,[G]:J}},{})}function iP9({error:$,exponentialBackoffDelay:Y}){let X=$.responseHeaders;if(!X)return Y;let G,J=X["retry-after-ms"];if(J){let W=parseFloat(J);if(!Number.isNaN(W))G=W}let Q=X["retry-after"];if(Q&&G===void 0){let W=parseFloat(Q);if(!Number.isNaN(W))G=W*1000;else G=Date.parse(Q)-Date.now()}if(G!=null&&!Number.isNaN(G)&&0<=G&&(G<60000||G<Y))return G;return Y}var nP9=({maxRetries:$=2,initialDelayInMs:Y=2000,backoffFactor:X=2,abortSignal:G}={})=>async(J)=>uP4(J,{maxRetries:$,delayInMs:Y,backoffFactor:X,abortSignal:G});async function uP4($,{maxRetries:Y,delayInMs:X,backoffFactor:G,abortSignal:J},Q=[]){try{return await $()}catch(W){if(PC(W))throw W;if(Y===0)throw W;let K=fM9(W),Z=[...Q,W],H=Z.length;if(H>Y)throw new pM4({message:`Failed after ${H} attempts. Last error: ${K}`,reason:"maxRetriesExceeded",errors:Z});if(W instanceof Error&&jJ.isInstance(W)&&W.isRetryable===!0&&H<=Y)return await hM9(iP9({error:W,exponentialBackoffDelay:X}),{abortSignal:J}),uP4($,{maxRetries:Y,delayInMs:G*X,backoffFactor:G,abortSignal:J},Z);if(H===1)throw W;throw new pM4({message:`Failed after ${H} attempts with non-retryable error: '${K}'`,reason:"errorNotRetryable",errors:Z})}}function rP9({maxRetries:$,abortSignal:Y}){if($!=null){if(!Number.isInteger($))throw new mM4({parameter:"maxRetries",value:$,message:"maxRetries must be an integer"});if($<0)throw new mM4({parameter:"maxRetries",value:$,message:"maxRetries must be >= 0"})}let X=$!=null?$:2;return{maxRetries:X,retry:nP9({maxRetries:X,abortSignal:Y})}}Rd({prefix:"aitxt",size:24});function aP9($){let Y=["ROOT"],X=-1,G=null;function J(Z,H,z){switch(Z){case'"':{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_STRING");break}case"f":case"t":case"n":{X=H,G=H,Y.pop(),Y.push(z),Y.push("INSIDE_LITERAL");break}case"-":{Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"{":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_OBJECT_START");break}case"[":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_ARRAY_START");break}}}function Q(Z,H){switch(Z){case",":{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{X=H,Y.pop();break}}}function W(Z,H){switch(Z){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=H,Y.pop();break}}}for(let Z=0;Z<$.length;Z++){let H=$[Z];switch(Y[Y.length-1]){case"ROOT":J(H,Z,"FINISH");break;case"INSIDE_OBJECT_START":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}case"}":{X=Z,Y.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(H){case":":{Y.pop(),Y.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{J(H,Z,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{Q(H,Z);break}case"INSIDE_STRING":{switch(H){case'"':{Y.pop(),X=Z;break}case"\\":{Y.push("INSIDE_STRING_ESCAPE");break}default:X=Z}break}case"INSIDE_ARRAY_START":{switch(H){case"]":{X=Z,Y.pop();break}default:{X=Z,J(H,Z,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(H){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=Z,Y.pop();break}default:{X=Z;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{J(H,Z,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{Y.pop(),X=Z;break}case"INSIDE_NUMBER":{switch(H){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=Z;break}case"e":case"E":case"-":case".":break;case",":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z);if(Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);break}case"}":{if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);break}case"]":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z);break}default:{Y.pop();break}}break}case"INSIDE_LITERAL":{let V=$.substring(G,Z+1);if(!"false".startsWith(V)&&!"true".startsWith(V)&&!"null".startsWith(V)){if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);else if(Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z)}else X=Z;break}}}let K=$.slice(0,X+1);for(let Z=Y.length-1;Z>=0;Z--)switch(Y[Z]){case"INSIDE_STRING":{K+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{K+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{K+="]";break}case"INSIDE_LITERAL":{let z=$.substring(G,$.length);if("true".startsWith(z))K+="true".slice(z.length);else if("false".startsWith(z))K+="false".slice(z.length);else if("null".startsWith(z))K+="null".slice(z.length)}}return K}async function sP9($){if($===void 0)return{value:void 0,state:"undefined-input"};let Y=await Fd({text:$});if(Y.success)return{value:Y.value,state:"successful-parse"};if(Y=await Fd({text:aP9($)}),Y.success)return{value:Y.value,state:"repaired-parse"};return{value:void 0,state:"failed-parse"}}Rd({prefix:"aitxt",size:24});function dM4($,Y){if(Y<=0)throw Error("chunkSize must be greater than 0");let X=[];for(let G=0;G<$.length;G+=Y)X.push($.slice(G,G+Y));return X}async function oP9({model:$,values:Y,maxParallelCalls:X=1/0,maxRetries:G,abortSignal:J,headers:Q,providerOptions:W,experimental_telemetry:K}){let Z=CP9($),{maxRetries:H,retry:z}=rP9({maxRetries:G,abortSignal:J}),V=dX0(Q!=null?Q:{},`ai/${kP9}`),F=uP9({model:Z,telemetry:K,headers:V,settings:{maxRetries:H}}),L=cP9(K);return Sc0({name:"ai.embedMany",attributes:fM({telemetry:K,attributes:{...Cc0({operationId:"ai.embedMany",telemetry:K}),...F,"ai.values":{input:()=>Y.map((N)=>JSON.stringify(N))}}}),tracer:L,fn:async(N)=>{var D;let[A,B]=await Promise.all([Z.maxEmbeddingsPerCall,Z.supportsParallelCalls]);if(A==null||A===1/0){let{embeddings:P,usage:w,response:j,providerMetadata:C}=await z(()=>{return Sc0({name:"ai.embedMany.doEmbed",attributes:fM({telemetry:K,attributes:{...Cc0({operationId:"ai.embedMany.doEmbed",telemetry:K}),...F,"ai.values":{input:()=>Y.map((k)=>JSON.stringify(k))}}}),tracer:L,fn:async(k)=>{var S;let I=await Z.doEmbed({values:Y,abortSignal:J,headers:V,providerOptions:W}),v=I.embeddings,x=(S=I.usage)!=null?S:{tokens:NaN};return k.setAttributes(fM({telemetry:K,attributes:{"ai.embeddings":{output:()=>v.map((y)=>JSON.stringify(y))},"ai.usage.tokens":x.tokens}})),{embeddings:v,usage:x,providerMetadata:I.providerMetadata,response:I.response}}})});return N.setAttributes(fM({telemetry:K,attributes:{"ai.embeddings":{output:()=>P.map((k)=>JSON.stringify(k))},"ai.usage.tokens":w.tokens}})),new cM4({values:Y,embeddings:P,usage:w,providerMetadata:C,responses:[j]})}let O=dM4(Y,A),E=[],M=[],R=0,q,_=dM4(O,B?X:1);for(let P of _){let w=await Promise.all(P.map((j)=>{return z(()=>{return Sc0({name:"ai.embedMany.doEmbed",attributes:fM({telemetry:K,attributes:{...Cc0({operationId:"ai.embedMany.doEmbed",telemetry:K}),...F,"ai.values":{input:()=>j.map((C)=>JSON.stringify(C))}}}),tracer:L,fn:async(C)=>{var k;let S=await Z.doEmbed({values:j,abortSignal:J,headers:V,providerOptions:W}),I=S.embeddings,v=(k=S.usage)!=null?k:{tokens:NaN};return C.setAttributes(fM({telemetry:K,attributes:{"ai.embeddings":{output:()=>I.map((x)=>JSON.stringify(x))},"ai.usage.tokens":v.tokens}})),{embeddings:I,usage:v,providerMetadata:S.providerMetadata,response:S.response}}})})}));for(let j of w)if(E.push(...j.embeddings),M.push(j.response),R+=j.usage.tokens,j.providerMetadata)if(!q)q={...j.providerMetadata};else for(let[C,k]of Object.entries(j.providerMetadata))q[C]={...(D=q[C])!=null?D:{},...k}}return N.setAttributes(fM({telemetry:K,attributes:{"ai.embeddings":{output:()=>E.map((P)=>JSON.stringify(P))},"ai.usage.tokens":R}})),new cM4({values:Y,embeddings:E,usage:{tokens:R},providerMetadata:q,responses:M})}})}var cM4=class{constructor($){this.values=$.values,this.embeddings=$.embeddings,this.usage=$.usage,this.providerMetadata=$.providerMetadata,this.responses=$.responses}};Rd({prefix:"aiobj",size:24});Rd({prefix:"aiobj",size:24});var tP9={};wP9(tP9,{object:()=>$w9,text:()=>eP9});var eP9=()=>({type:"text",responseFormat:{type:"text"},async parsePartial({text:$}){return{partial:$}},async parseOutput({text:$}){return $}}),$w9=({schema:$})=>{let Y=nR9($);return{type:"object",responseFormat:{type:"json",schema:Y.jsonSchema},async parsePartial({text:X}){let G=await sP9(X);switch(G.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:G.value};default:{let J=G.state;throw Error(`Unsupported parse state: ${J}`)}}},async parseOutput({text:X},G){let J=await Fd({text:X});if(!J.success)throw new uM4({message:"No object generated: could not parse the response.",cause:J.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});let Q=await wC({value:J.value,schema:Y});if(!Q.success)throw new uM4({message:"No object generated: response did not match schema.",cause:Q.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});return Q.value}}},pP4="vercel.ai.error",Yw9=Symbol.for(pP4),lM4,iM4,xX=class $ extends(iM4=Error,lM4=Yw9,iM4){constructor({name:Y,message:X,cause:G}){super(X);this[lM4]=!0,this.name=Y,this.cause=G}static isInstance(Y){return $.hasMarker(Y,pP4)}static hasMarker(Y,X){let G=Symbol.for(X);return Y!=null&&typeof Y==="object"&&G in Y&&typeof Y[G]==="boolean"&&Y[G]===!0}},dP4="AI_APICallError",cP4=`vercel.ai.error.${dP4}`,Xw9=Symbol.for(cP4),nM4,rM4,s7=class extends(rM4=xX,nM4=Xw9,rM4){constructor({message:$,url:Y,requestBodyValues:X,statusCode:G,responseHeaders:J,responseBody:Q,cause:W,isRetryable:K=G!=null&&(G===408||G===409||G===429||G>=500),data:Z}){super({name:dP4,message:$,cause:W});this[nM4]=!0,this.url=Y,this.requestBodyValues=X,this.statusCode=G,this.responseHeaders=J,this.responseBody=Q,this.isRetryable=K,this.data=Z}static isInstance($){return xX.hasMarker($,cP4)}},lP4="AI_EmptyResponseBodyError",iP4=`vercel.ai.error.${lP4}`,Gw9=Symbol.for(iP4),aM4,sM4,Jw9=class extends(sM4=xX,aM4=Gw9,sM4){constructor({message:$="Empty response body"}={}){super({name:lP4,message:$});this[aM4]=!0}static isInstance($){return xX.hasMarker($,iP4)}};function nP4($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}var rP4="AI_InvalidArgumentError",aP4=`vercel.ai.error.${rP4}`,Qw9=Symbol.for(aP4),oM4,tM4,Ww9=class extends(tM4=xX,oM4=Qw9,tM4){constructor({message:$,cause:Y,argument:X}){super({name:rP4,message:$,cause:Y});this[oM4]=!0,this.argument=X}static isInstance($){return xX.hasMarker($,aP4)}},sP4="AI_JSONParseError",oP4=`vercel.ai.error.${sP4}`,Kw9=Symbol.for(oP4),eM4,$R4,xX0=class extends($R4=xX,eM4=Kw9,$R4){constructor({text:$,cause:Y}){super({name:sP4,message:`JSON parsing failed: Text: ${$}.
Error message: ${nP4(Y)}`,cause:Y});this[eM4]=!0,this.text=$}static isInstance($){return xX.hasMarker($,oP4)}},tP4="AI_TypeValidationError",eP4=`vercel.ai.error.${tP4}`,Zw9=Symbol.for(eP4),YR4,XR4,iM=class $ extends(XR4=xX,YR4=Zw9,XR4){constructor({value:Y,cause:X,context:G}){let J="Type validation failed";if(G==null?void 0:G.field)J+=` for ${G.field}`;if((G==null?void 0:G.entityName)||(G==null?void 0:G.entityId)){J+=" (";let Q=[];if(G.entityName)Q.push(G.entityName);if(G.entityId)Q.push(`id: "${G.entityId}"`);J+=Q.join(", "),J+=")"}super({name:tP4,message:`${J}: Value: ${JSON.stringify(Y)}.
Error message: ${nP4(X)}`,cause:X});this[YR4]=!0,this.value=Y,this.context=G}static isInstance(Y){return xX.hasMarker(Y,eP4)}static wrap({value:Y,cause:X,context:G}){var J,Q,W;if($.isInstance(X)&&X.value===Y&&((J=X.context)==null?void 0:J.field)===(G==null?void 0:G.field)&&((Q=X.context)==null?void 0:Q.entityName)===(G==null?void 0:G.entityName)&&((W=X.context)==null?void 0:W.entityId)===(G==null?void 0:G.entityId))return X;return new $({value:Y,cause:X,context:G})}},GR4=class extends Error{constructor($,Y){super($),this.name="ParseError",this.type=Y.type,this.field=Y.field,this.value=Y.value,this.line=Y.line}},JR4=10,Uw9=13,gM=32;function kc0($){}function Hw9($){if(typeof $=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:Y=kc0,onError:X=kc0,onRetry:G=kc0,onComment:J}=$,Q=[],W=!0,K,Z="",H=0,z;function V(B){if(W&&(W=!1,B.charCodeAt(0)===239&&B.charCodeAt(1)===187&&B.charCodeAt(2)===191&&(B=B.slice(3))),Q.length===0){let M=F(B);M!==""&&Q.push(M);return}if(B.indexOf(`
`)===-1&&B.indexOf("\r")===-1){Q.push(B);return}Q.push(B);let O=Q.join("");Q.length=0;let E=F(O);E!==""&&Q.push(E)}function F(B){let O=0;if(B.indexOf("\r")===-1){let E=B.indexOf(`
`,O);for(;E!==-1;){if(O===E){H>0&&Y({id:K,event:z,data:Z}),K=void 0,Z="",H=0,z=void 0,O=E+1,E=B.indexOf(`
`,O);continue}let M=B.charCodeAt(O);if(QR4(B,O,M)){let R=B.charCodeAt(O+5)===gM?O+6:O+5,q=B.slice(R,E);if(H===0&&B.charCodeAt(E+1)===JR4){Y({id:K,event:z,data:q}),K=void 0,Z="",z=void 0,O=E+2,E=B.indexOf(`
`,O);continue}Z=H===0?q:`${Z}
${q}`,H++}else WR4(B,O,M)?z=B.slice(B.charCodeAt(O+6)===gM?O+7:O+6,E)||void 0:L(B,O,E);O=E+1,E=B.indexOf(`
`,O)}return B.slice(O)}for(;O<B.length;){let E=B.indexOf("\r",O),M=B.indexOf(`
`,O),R=-1;if(E!==-1&&M!==-1?R=E<M?E:M:E!==-1?E===B.length-1?R=-1:R=E:M!==-1&&(R=M),R===-1)break;L(B,O,R),O=R+1,B.charCodeAt(O-1)===Uw9&&B.charCodeAt(O)===JR4&&O++}return B.slice(O)}function L(B,O,E){if(O===E){D();return}let M=B.charCodeAt(O);if(QR4(B,O,M)){let j=B.charCodeAt(O+5)===gM?O+6:O+5,C=B.slice(j,E);Z=H===0?C:`${Z}
${C}`,H++;return}if(WR4(B,O,M)){z=B.slice(B.charCodeAt(O+6)===gM?O+7:O+6,E)||void 0;return}if(M===105&&B.charCodeAt(O+1)===100&&B.charCodeAt(O+2)===58){let j=B.slice(B.charCodeAt(O+3)===gM?O+4:O+3,E);K=j.includes("\x00")?void 0:j;return}if(M===58){if(J){let j=B.slice(O,E);J(j.slice(B.charCodeAt(O+1)===gM?2:1))}return}let R=B.slice(O,E),q=R.indexOf(":");if(q===-1){N(R,"",R);return}let _=R.slice(0,q),P=R.charCodeAt(q+1)===gM?2:1,w=R.slice(q+P);N(_,w,R)}function N(B,O,E){switch(B){case"event":z=O||void 0;break;case"data":Z=H===0?O:`${Z}
${O}`,H++;break;case"id":K=O.includes("\x00")?void 0:O;break;case"retry":/^\d+$/.test(O)?G(parseInt(O,10)):X(new GR4(`Invalid \`retry\` value: "${O}"`,{type:"invalid-retry",value:O,line:E}));break;default:X(new GR4(`Unknown field "${B.length>20?`${B.slice(0,20)}\u2026`:B}"`,{type:"unknown-field",field:B,value:O,line:E}));break}}function D(){H>0&&Y({id:K,event:z,data:Z}),K=void 0,Z="",H=0,z=void 0}function A(B={}){if(B.consume&&Q.length>0){let O=Q.join("");L(O,0,O.length)}W=!0,K=void 0,Z="",H=0,z=void 0,Q.length=0}return{feed:V,reset:A}}function QR4($,Y,X){return X===100&&$.charCodeAt(Y+1)===97&&$.charCodeAt(Y+2)===116&&$.charCodeAt(Y+3)===97&&$.charCodeAt(Y+4)===58}function WR4($,Y,X){return X===101&&$.charCodeAt(Y+1)===118&&$.charCodeAt(Y+2)===101&&$.charCodeAt(Y+3)===110&&$.charCodeAt(Y+4)===116&&$.charCodeAt(Y+5)===58}var zw9=class extends TransformStream{constructor({onError:$,onRetry:Y,onComment:X}={}){let G;super({start(J){G=Hw9({onEvent:(Q)=>{J.enqueue(Q)},onError(Q){$==="terminate"?J.error(Q):typeof $=="function"&&$(Q)},onRetry:Y,onComment:X})},transform(J){G.feed(J)}})}};function _C(...$){return $.reduce((Y,X)=>({...Y,...X!=null?X:{}}),{})}async function Vw9($,Y){if($==null)return Promise.resolve();let X=Y==null?void 0:Y.abortSignal;return new Promise((G,J)=>{if(X==null?void 0:X.aborted){J(KR4());return}let Q=setTimeout(()=>{W(),G()},$),W=()=>{clearTimeout(Q),X==null||X.removeEventListener("abort",K)},K=()=>{W(),J(KR4())};X==null||X.addEventListener("abort",K)})}function KR4(){return new DOMException("Delay was aborted","AbortError")}function qd($){return Object.fromEntries([...$.headers])}var{btoa:Fw9}=globalThis;function $w4($){let Y="";for(let X=0;X<$.length;X++)Y+=String.fromCodePoint($[X]);return Fw9(Y)}var Pd=({prefix:$,size:Y=16,alphabet:X="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:G="-"}={})=>{let J=()=>{let Q=X.length,W=Array(Y);for(let K=0;K<Y;K++)W[K]=X[Math.random()*Q|0];return W.join("")};if($==null)return J;if(X.includes(G))throw new Ww9({argument:"separator",message:`The separator "${G}" must not be part of the alphabet "${X}".`});return()=>`${$}${G}${J()}`};Pd();function Lw9($){if($==null)return"unknown error";if(typeof $==="string")return $;if($ instanceof Error)return $.message;return JSON.stringify($)}function jC($){return($ instanceof Error||$ instanceof DOMException)&&($.name==="AbortError"||$.name==="ResponseAborted"||$.name==="TimeoutError")}var Dw9=["fetch failed","failed to fetch"],Nw9=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];function Aw9($){if(!($ instanceof Error))return!1;let Y=$.code;if(typeof Y==="string"&&Nw9.includes(Y))return!0;return!1}function Yw4({error:$,url:Y,requestBodyValues:X}){if(jC($))return $;if($ instanceof TypeError&&Dw9.includes($.message.toLowerCase())){let G=$.cause;if(G!=null)return new s7({message:`Cannot connect to API: ${G.message}`,cause:G,url:Y,requestBodyValues:X,isRetryable:!0})}if(Aw9($))return new s7({message:`Cannot connect to API: ${$.message}`,cause:$,url:Y,requestBodyValues:X,isRetryable:!0});return $}function Xw4($=globalThis){var Y,X,G;if($.window)return"runtime/browser";if((Y=$.navigator)==null?void 0:Y.userAgent)return`runtime/${$.navigator.userAgent.toLowerCase()}`;if((G=(X=$.process)==null?void 0:X.versions)==null?void 0:G.node)return`runtime/node.js/${$.process.version.substring(0)}`;if($.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function Bw9($){if($==null)return{};let Y={};if($ instanceof Headers)$.forEach((X,G)=>{Y[G.toLowerCase()]=X});else{if(!Array.isArray($))$=Object.entries($);for(let[X,G]of $)if(G!=null)Y[X.toLowerCase()]=G}return Y}function cX0($,...Y){let X=new Headers(Bw9($)),G=X.get("user-agent")||"";return X.set("user-agent",[G,...Y].filter(Boolean).join(" ")),Object.fromEntries(X.entries())}var Gw4="4.0.27",Ow9=()=>globalThis.fetch,yX0=async({url:$,headers:Y={},successfulResponseHandler:X,failedResponseHandler:G,abortSignal:J,fetch:Q=Ow9()})=>{try{let W=await Q($,{method:"GET",headers:cX0(Y,`ai-sdk/provider-utils/${Gw4}`,Xw4()),signal:J}),K=qd(W);if(!W.ok){let Z;try{Z=await G({response:W,url:$,requestBodyValues:{}})}catch(H){if(jC(H)||s7.isInstance(H))throw H;throw new s7({message:"Failed to process error response",cause:H,statusCode:W.status,url:$,responseHeaders:K,requestBodyValues:{}})}throw Z.value}try{return await X({response:W,url:$,requestBodyValues:{}})}catch(Z){if(Z instanceof Error){if(jC(Z)||s7.isInstance(Z))throw Z}throw new s7({message:"Failed to process successful response",cause:Z,statusCode:W.status,url:$,responseHeaders:K,requestBodyValues:{}})}}catch(W){throw Yw4({error:W,url:$,requestBodyValues:{}})}};function Jd({settingValue:$,environmentVariableName:Y}){if(typeof $==="string")return $;if($!=null||typeof process>"u")return;if($=process.env[Y],$==null||typeof $!=="string")return;return $}var Ew9=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Mw9=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function ZR4($){let Y=JSON.parse($);if(Y===null||typeof Y!=="object")return Y;if(Ew9.test($)===!1&&Mw9.test($)===!1)return Y;return Rw9(Y)}function Rw9($){let Y=[$];while(Y.length){let X=Y;Y=[];for(let G of X){if(Object.prototype.hasOwnProperty.call(G,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(G,"constructor")&&G.constructor!==null&&typeof G.constructor==="object"&&Object.prototype.hasOwnProperty.call(G.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let J in G){let Q=G[J];if(Q&&typeof Q==="object")Y.push(Q)}}}return $}function Jw4($){let{stackTraceLimit:Y}=Error;try{Error.stackTraceLimit=0}catch(X){return ZR4($)}try{return ZR4($)}finally{Error.stackTraceLimit=Y}}function Nl0($){if($.type==="object"||Array.isArray($.type)&&$.type.includes("object")){$.additionalProperties=!1;let{properties:X}=$;if(X!=null)for(let G of Object.keys(X))X[G]=mM(X[G])}if($.items!=null)$.items=Array.isArray($.items)?$.items.map(mM):mM($.items);if($.anyOf!=null)$.anyOf=$.anyOf.map(mM);if($.allOf!=null)$.allOf=$.allOf.map(mM);if($.oneOf!=null)$.oneOf=$.oneOf.map(mM);let{definitions:Y}=$;if(Y!=null)for(let X of Object.keys(Y))Y[X]=mM(Y[X]);return $}function mM($){if(typeof $==="boolean")return $;return Nl0($)}var qw9=Symbol("Let zodToJsonSchema decide on which parser to use"),UR4={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Pw9=($)=>typeof $==="string"?{...UR4,name:$}:{...UR4,...$};function aW(){return{}}function ww9($,Y){var X,G,J;let Q={type:"array"};if(((X=$.type)==null?void 0:X._def)&&((J=(G=$.type)==null?void 0:G._def)==null?void 0:J.typeName)!==U0.ZodAny)Q.items=G5($.type._def,{...Y,currentPath:[...Y.currentPath,"items"]});if($.minLength)Q.minItems=$.minLength.value;if($.maxLength)Q.maxItems=$.maxLength.value;if($.exactLength)Q.minItems=$.exactLength.value,Q.maxItems=$.exactLength.value;return Q}function _w9($){let Y={type:"integer",format:"int64"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function jw9(){return{type:"boolean"}}function Qw4($,Y){return G5($.type._def,Y)}var Tw9=($,Y)=>{return G5($.innerType._def,Y)};function Ww4($,Y,X){let G=X!=null?X:Y.dateStrategy;if(Array.isArray(G))return{anyOf:G.map((J,Q)=>Ww4($,Y,J))};switch(G){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Iw9($)}}var Iw9=($)=>{let Y={type:"integer",format:"unix-time"};for(let X of $.checks)switch(X.kind){case"min":Y.minimum=X.value;break;case"max":Y.maximum=X.value;break}return Y};function Cw9($,Y){return{...G5($.innerType._def,Y),default:$.defaultValue()}}function Sw9($,Y){return Y.effectStrategy==="input"?G5($.schema._def,Y):aW()}function kw9($){return{type:"string",enum:Array.from($.values)}}var vw9=($)=>{if("type"in $&&$.type==="string")return!1;return"allOf"in $};function xw9($,Y){let X=[G5($.left._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G5($.right._def,{...Y,currentPath:[...Y.currentPath,"allOf","1"]})].filter((J)=>!!J),G=[];return X.forEach((J)=>{if(vw9(J))G.push(...J.allOf);else{let Q=J;if("additionalProperties"in J&&J.additionalProperties===!1){let{additionalProperties:W,...K}=J;Q=K}G.push(Q)}}),G.length?{allOf:G}:void 0}function yw9($){let Y=typeof $.value;if(Y!=="bigint"&&Y!=="number"&&Y!=="boolean"&&Y!=="string")return{type:Array.isArray($.value)?"array":"object"};return{type:Y==="bigint"?"integer":Y,const:$.value}}var vc0=void 0,MU={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(vc0===void 0)vc0=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return vc0},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function Kw4($,Y){let X={type:"string"};if($.checks)for(let G of $.checks)switch(G.kind){case"min":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value;break;case"max":X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"email":switch(Y.emailStrategy){case"format:email":RU(X,"email",G.message,Y);break;case"format:idn-email":RU(X,"idn-email",G.message,Y);break;case"pattern:zod":_J(X,MU.email,G.message,Y);break}break;case"url":RU(X,"uri",G.message,Y);break;case"uuid":RU(X,"uuid",G.message,Y);break;case"regex":_J(X,G.regex,G.message,Y);break;case"cuid":_J(X,MU.cuid,G.message,Y);break;case"cuid2":_J(X,MU.cuid2,G.message,Y);break;case"startsWith":_J(X,RegExp(`^${xc0(G.value,Y)}`),G.message,Y);break;case"endsWith":_J(X,RegExp(`${xc0(G.value,Y)}$`),G.message,Y);break;case"datetime":RU(X,"date-time",G.message,Y);break;case"date":RU(X,"date",G.message,Y);break;case"time":RU(X,"time",G.message,Y);break;case"duration":RU(X,"duration",G.message,Y);break;case"length":X.minLength=typeof X.minLength==="number"?Math.max(X.minLength,G.value):G.value,X.maxLength=typeof X.maxLength==="number"?Math.min(X.maxLength,G.value):G.value;break;case"includes":{_J(X,RegExp(xc0(G.value,Y)),G.message,Y);break}case"ip":{if(G.version!=="v6")RU(X,"ipv4",G.message,Y);if(G.version!=="v4")RU(X,"ipv6",G.message,Y);break}case"base64url":_J(X,MU.base64url,G.message,Y);break;case"jwt":_J(X,MU.jwt,G.message,Y);break;case"cidr":{if(G.version!=="v6")_J(X,MU.ipv4Cidr,G.message,Y);if(G.version!=="v4")_J(X,MU.ipv6Cidr,G.message,Y);break}case"emoji":_J(X,MU.emoji(),G.message,Y);break;case"ulid":{_J(X,MU.ulid,G.message,Y);break}case"base64":{switch(Y.base64Strategy){case"format:binary":{RU(X,"binary",G.message,Y);break}case"contentEncoding:base64":{X.contentEncoding="base64";break}case"pattern:zod":{_J(X,MU.base64,G.message,Y);break}}break}case"nanoid":_J(X,MU.nanoid,G.message,Y)}return X}function xc0($,Y){return Y.patternStrategy==="escape"?hw9($):$}var bw9=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function hw9($){let Y="";for(let X=0;X<$.length;X++){if(!bw9.has($[X]))Y+="\\";Y+=$[X]}return Y}function RU($,Y,X,G){var J;if($.format||((J=$.anyOf)==null?void 0:J.some((Q)=>Q.format))){if(!$.anyOf)$.anyOf=[];if($.format)$.anyOf.push({format:$.format}),delete $.format;$.anyOf.push({format:Y,...X&&G.errorMessages&&{errorMessage:{format:X}}})}else $.format=Y}function _J($,Y,X,G){var J;if($.pattern||((J=$.allOf)==null?void 0:J.some((Q)=>Q.pattern))){if(!$.allOf)$.allOf=[];if($.pattern)$.allOf.push({pattern:$.pattern}),delete $.pattern;$.allOf.push({pattern:HR4(Y,G),...X&&G.errorMessages&&{errorMessage:{pattern:X}}})}else $.pattern=HR4(Y,G)}function HR4($,Y){var X;if(!Y.applyRegexFlags||!$.flags)return $.source;let G={i:$.flags.includes("i"),m:$.flags.includes("m"),s:$.flags.includes("s")},J=G.i?$.source.toLowerCase():$.source,Q="",W=!1,K=!1,Z=!1;for(let H=0;H<J.length;H++){if(W){Q+=J[H],W=!1;continue}if(G.i){if(K){if(J[H].match(/[a-z]/)){if(Z)Q+=J[H],Q+=`${J[H-2]}-${J[H]}`.toUpperCase(),Z=!1;else if(J[H+1]==="-"&&((X=J[H+2])==null?void 0:X.match(/[a-z]/)))Q+=J[H],Z=!0;else Q+=`${J[H]}${J[H].toUpperCase()}`;continue}}else if(J[H].match(/[a-z]/)){Q+=`[${J[H]}${J[H].toUpperCase()}]`;continue}}if(G.m){if(J[H]==="^"){Q+=`(^|(?<=[\r
]))`;continue}else if(J[H]==="$"){Q+=`($|(?=[\r
]))`;continue}}if(G.s&&J[H]==="."){Q+=K?`${J[H]}\r
`:`[${J[H]}\r
]`;continue}if(Q+=J[H],J[H]==="\\")W=!0;else if(K&&J[H]==="]")K=!1;else if(!K&&J[H]==="[")K=!0}return Q}function Zw4($,Y){var X,G,J,Q,W,K;let Z={type:"object",additionalProperties:(X=G5($.valueType._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]}))!=null?X:Y.allowedAdditionalProperties};if(((G=$.keyType)==null?void 0:G._def.typeName)===U0.ZodString&&((J=$.keyType._def.checks)==null?void 0:J.length)){let{type:H,...z}=Kw4($.keyType._def,Y);return{...Z,propertyNames:z}}else if(((Q=$.keyType)==null?void 0:Q._def.typeName)===U0.ZodEnum)return{...Z,propertyNames:{enum:$.keyType._def.values}};else if(((W=$.keyType)==null?void 0:W._def.typeName)===U0.ZodBranded&&$.keyType._def.type._def.typeName===U0.ZodString&&((K=$.keyType._def.type._def.checks)==null?void 0:K.length)){let{type:H,...z}=Qw4($.keyType._def,Y);return{...Z,propertyNames:z}}return Z}function fw9($,Y){if(Y.mapStrategy==="record")return Zw4($,Y);let X=G5($.keyType._def,{...Y,currentPath:[...Y.currentPath,"items","items","0"]})||aW(),G=G5($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items","items","1"]})||aW();return{type:"array",maxItems:125,items:{type:"array",items:[X,G],minItems:2,maxItems:2}}}function gw9($){let Y=$.values,G=Object.keys($.values).filter((Q)=>{return typeof Y[Y[Q]]!=="number"}).map((Q)=>Y[Q]),J=Array.from(new Set(G.map((Q)=>typeof Q)));return{type:J.length===1?J[0]==="string"?"string":"number":["string","number"],enum:G}}function mw9(){return{not:aW()}}function uw9(){return{type:"null"}}var rc0={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function pw9($,Y){let X=$.options instanceof Map?Array.from($.options.values()):$.options;if(X.every((G)=>(G._def.typeName in rc0)&&(!G._def.checks||!G._def.checks.length))){let G=X.reduce((J,Q)=>{let W=rc0[Q._def.typeName];return W&&!J.includes(W)?[...J,W]:J},[]);return{type:G.length>1?G:G[0]}}else if(X.every((G)=>G._def.typeName==="ZodLiteral"&&!G.description)){let G=X.reduce((J,Q)=>{let W=typeof Q._def.value;switch(W){case"string":case"number":case"boolean":return[...J,W];case"bigint":return[...J,"integer"];case"object":if(Q._def.value===null)return[...J,"null"];case"symbol":case"undefined":case"function":default:return J}},[]);if(G.length===X.length){let J=G.filter((Q,W,K)=>K.indexOf(Q)===W);return{type:J.length>1?J:J[0],enum:X.reduce((Q,W)=>{return Q.includes(W._def.value)?Q:[...Q,W._def.value]},[])}}}else if(X.every((G)=>G._def.typeName==="ZodEnum"))return{type:"string",enum:X.reduce((G,J)=>[...G,...J._def.values.filter((Q)=>!G.includes(Q))],[])};return dw9($,Y)}var dw9=($,Y)=>{let X=($.options instanceof Map?Array.from($.options.values()):$.options).map((G,J)=>G5(G._def,{...Y,currentPath:[...Y.currentPath,"anyOf",`${J}`]})).filter((G)=>!!G&&(!Y.strictUnions||typeof G==="object"&&Object.keys(G).length>0));return X.length?{anyOf:X}:void 0};function cw9($,Y){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes($.innerType._def.typeName)&&(!$.innerType._def.checks||!$.innerType._def.checks.length))return{type:[rc0[$.innerType._def.typeName],"null"]};let X=G5($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","0"]});return X&&{anyOf:[X,{type:"null"}]}}function lw9($){let Y={type:"number"};if(!$.checks)return Y;for(let X of $.checks)switch(X.kind){case"int":Y.type="integer";break;case"min":if(X.inclusive)Y.minimum=X.value;else Y.exclusiveMinimum=X.value;break;case"max":if(X.inclusive)Y.maximum=X.value;else Y.exclusiveMaximum=X.value;break;case"multipleOf":Y.multipleOf=X.value;break}return Y}function iw9($,Y){let X={type:"object",properties:{}},G=[],J=$.shape();for(let W in J){let K=J[W];if(K===void 0||K._def===void 0)continue;let Z=rw9(K),H=G5(K._def,{...Y,currentPath:[...Y.currentPath,"properties",W],propertyPath:[...Y.currentPath,"properties",W]});if(H===void 0)continue;if(X.properties[W]=H,!Z)G.push(W)}if(G.length)X.required=G;let Q=nw9($,Y);if(Q!==void 0)X.additionalProperties=Q;return X}function nw9($,Y){if($.catchall._def.typeName!=="ZodNever")return G5($.catchall._def,{...Y,currentPath:[...Y.currentPath,"additionalProperties"]});switch($.unknownKeys){case"passthrough":return Y.allowedAdditionalProperties;case"strict":return Y.rejectedAdditionalProperties;case"strip":return Y.removeAdditionalStrategy==="strict"?Y.allowedAdditionalProperties:Y.rejectedAdditionalProperties}}function rw9($){try{return $.isOptional()}catch(Y){return!0}}var aw9=($,Y)=>{var X;if(Y.currentPath.toString()===((X=Y.propertyPath)==null?void 0:X.toString()))return G5($.innerType._def,Y);let G=G5($.innerType._def,{...Y,currentPath:[...Y.currentPath,"anyOf","1"]});return G?{anyOf:[{not:aW()},G]}:aW()},sw9=($,Y)=>{if(Y.pipeStrategy==="input")return G5($.in._def,Y);else if(Y.pipeStrategy==="output")return G5($.out._def,Y);let X=G5($.in._def,{...Y,currentPath:[...Y.currentPath,"allOf","0"]}),G=G5($.out._def,{...Y,currentPath:[...Y.currentPath,"allOf",X?"1":"0"]});return{allOf:[X,G].filter((J)=>J!==void 0)}};function ow9($,Y){return G5($.type._def,Y)}function tw9($,Y){let G={type:"array",uniqueItems:!0,items:G5($.valueType._def,{...Y,currentPath:[...Y.currentPath,"items"]})};if($.minSize)G.minItems=$.minSize.value;if($.maxSize)G.maxItems=$.maxSize.value;return G}function ew9($,Y){if($.rest)return{type:"array",minItems:$.items.length,items:$.items.map((X,G)=>G5(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[]),additionalItems:G5($.rest._def,{...Y,currentPath:[...Y.currentPath,"additionalItems"]})};else return{type:"array",minItems:$.items.length,maxItems:$.items.length,items:$.items.map((X,G)=>G5(X._def,{...Y,currentPath:[...Y.currentPath,"items",`${G}`]})).reduce((X,G)=>G===void 0?X:[...X,G],[])}}function $_9(){return{not:aW()}}function Y_9(){return aW()}var X_9=($,Y)=>{return G5($.innerType._def,Y)},G_9=($,Y,X)=>{switch(Y){case U0.ZodString:return Kw4($,X);case U0.ZodNumber:return lw9($);case U0.ZodObject:return iw9($,X);case U0.ZodBigInt:return _w9($);case U0.ZodBoolean:return jw9();case U0.ZodDate:return Ww4($,X);case U0.ZodUndefined:return $_9();case U0.ZodNull:return uw9();case U0.ZodArray:return ww9($,X);case U0.ZodUnion:case U0.ZodDiscriminatedUnion:return pw9($,X);case U0.ZodIntersection:return xw9($,X);case U0.ZodTuple:return ew9($,X);case U0.ZodRecord:return Zw4($,X);case U0.ZodLiteral:return yw9($);case U0.ZodEnum:return kw9($);case U0.ZodNativeEnum:return gw9($);case U0.ZodNullable:return cw9($,X);case U0.ZodOptional:return aw9($,X);case U0.ZodMap:return fw9($,X);case U0.ZodSet:return tw9($,X);case U0.ZodLazy:return()=>$.getter()._def;case U0.ZodPromise:return ow9($,X);case U0.ZodNaN:case U0.ZodNever:return mw9();case U0.ZodEffects:return Sw9($,X);case U0.ZodAny:return aW();case U0.ZodUnknown:return Y_9();case U0.ZodDefault:return Cw9($,X);case U0.ZodBranded:return Qw4($,X);case U0.ZodReadonly:return X_9($,X);case U0.ZodCatch:return Tw9($,X);case U0.ZodPipeline:return sw9($,X);case U0.ZodFunction:case U0.ZodVoid:case U0.ZodSymbol:return;default:return((G)=>{return})()}},J_9=($,Y)=>{let X=0;for(;X<$.length&&X<Y.length;X++)if($[X]!==Y[X])break;return[($.length-X).toString(),...Y.slice(X)].join("/")};function G5($,Y,X=!1){var G;let J=Y.seen.get($);if(Y.override){let Z=(G=Y.override)==null?void 0:G.call(Y,$,Y,J,X);if(Z!==qw9)return Z}if(J&&!X){let Z=Q_9(J,Y);if(Z!==void 0)return Z}let Q={def:$,path:Y.currentPath,jsonSchema:void 0};Y.seen.set($,Q);let W=G_9($,$.typeName,Y),K=typeof W==="function"?G5(W(),Y):W;if(K)W_9($,Y,K);if(Y.postProcess){let Z=Y.postProcess(K,$,Y);return Q.jsonSchema=K,Z}return Q.jsonSchema=K,K}var Q_9=($,Y)=>{switch(Y.$refStrategy){case"root":return{$ref:$.path.join("/")};case"relative":return{$ref:J_9(Y.currentPath,$.path)};case"none":case"seen":{if($.path.length<Y.currentPath.length&&$.path.every((X,G)=>Y.currentPath[G]===X))return console.warn(`Recursive reference detected at ${Y.currentPath.join("/")}! Defaulting to any`),aW();return Y.$refStrategy==="seen"?aW():void 0}}},W_9=($,Y,X)=>{if($.description)X.description=$.description;return X},K_9=($)=>{let Y=Pw9($),X=Y.name!==void 0?[...Y.basePath,Y.definitionPath,Y.name]:Y.basePath;return{...Y,currentPath:X,propertyPath:void 0,seen:new Map(Object.entries(Y.definitions).map(([G,J])=>[J._def,{def:J._def,path:[...Y.basePath,Y.definitionPath,G],jsonSchema:void 0}]))}},Z_9=($,Y)=>{var X;let G=K_9(Y),J=typeof Y==="object"&&Y.definitions?Object.entries(Y.definitions).reduce((H,[z,V])=>{var F;return{...H,[z]:(F=G5(V._def,{...G,currentPath:[...G.basePath,G.definitionPath,z]},!0))!=null?F:aW()}},{}):void 0,Q=typeof Y==="string"?Y:(Y==null?void 0:Y.nameStrategy)==="title"?void 0:Y==null?void 0:Y.name,W=(X=G5($._def,Q===void 0?G:{...G,currentPath:[...G.basePath,G.definitionPath,Q]},!1))!=null?X:aW(),K=typeof Y==="object"&&Y.name!==void 0&&Y.nameStrategy==="title"?Y.name:void 0;if(K!==void 0)W.title=K;let Z=Q===void 0?J?{...W,[G.definitionPath]:J}:W:{$ref:[...G.$refStrategy==="relative"?[]:G.basePath,G.definitionPath,Q].join("/"),[G.definitionPath]:{...J,[Q]:W}};return Z.$schema="http://json-schema.org/draft-07/schema#",Z},ac0=Symbol.for("vercel.ai.schema");function oW($){let Y;return()=>{if(Y==null)Y=$();return Y}}function lX0($,{validate:Y}={}){return{[ac0]:!0,_type:void 0,get jsonSchema(){if(typeof $==="function")$=$();return $},validate:Y}}function U_9($){return typeof $==="object"&&$!==null&&ac0 in $&&$[ac0]===!0&&"jsonSchema"in $&&"validate"in $}function Al0($){return $==null?lX0({properties:{},additionalProperties:!1}):U_9($)?$:("~standard"in $)?$["~standard"].vendor==="zod"?mQ($):H_9($):$()}function H_9($){return lX0(()=>Nl0($["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async(Y)=>{let X=await $["~standard"].validate(Y);return"value"in X?{success:!0,value:X.value}:{success:!1,error:new iM({value:Y,cause:X.issues})}}})}function z_9($,Y){var X;let G=(X=void 0)!=null?X:!1;return lX0(()=>Z_9($,{$refStrategy:G?"root":"none"}),{validate:async(J)=>{let Q=await $.safeParseAsync(J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function V_9($,Y){var X;let G=(X=void 0)!=null?X:!1;return lX0(()=>Nl0(e$($,{target:"draft-7",io:"input",reused:G?"ref":"inline"})),{validate:async(J)=>{let Q=await oX($,J);return Q.success?{success:!0,value:Q.data}:{success:!1,error:Q.error}}})}function F_9($){return"_zod"in $}function mQ($,Y){if(F_9($))return V_9($);else return z_9($)}async function L_9({value:$,schema:Y,context:X}){let G=await UN({value:$,schema:Y,context:X});if(!G.success)throw iM.wrap({value:$,cause:G.error,context:X});return G.value}async function UN({value:$,schema:Y,context:X}){let G=Al0(Y);try{if(G.validate==null)return{success:!0,value:$,rawValue:$};let J=await G.validate($);if(J.success)return{success:!0,value:J.value,rawValue:$};return{success:!1,error:iM.wrap({value:$,cause:J.error,context:X}),rawValue:$}}catch(J){return{success:!1,error:iM.wrap({value:$,cause:J,context:X}),rawValue:$}}}async function D_9({text:$,schema:Y}){try{let X=Jw4($);if(Y==null)return X;return L_9({value:X,schema:Y})}catch(X){if(xX0.isInstance(X)||iM.isInstance(X))throw X;throw new xX0({text:$,cause:X})}}async function HN({text:$,schema:Y}){try{let X=Jw4($);if(Y==null)return{success:!0,value:X,rawValue:X};return await UN({value:X,schema:Y})}catch(X){return{success:!1,error:xX0.isInstance(X)?X:new xX0({text:$,cause:X}),rawValue:void 0}}}function Uw4({stream:$,schema:Y}){return $.pipeThrough(new TextDecoderStream).pipeThrough(new zw9).pipeThrough(new TransformStream({async transform({data:X},G){if(X==="[DONE]")return;G.enqueue(await HN({text:X,schema:Y}))}}))}var N_9=()=>globalThis.fetch,TC=async({url:$,headers:Y,body:X,failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W})=>A_9({url:$,headers:{"Content-Type":"application/json",...Y},body:{content:JSON.stringify(X),values:X},failedResponseHandler:G,successfulResponseHandler:J,abortSignal:Q,fetch:W}),A_9=async({url:$,headers:Y={},body:X,successfulResponseHandler:G,failedResponseHandler:J,abortSignal:Q,fetch:W=N_9()})=>{try{let K=await W($,{method:"POST",headers:cX0(Y,`ai-sdk/provider-utils/${Gw4}`,Xw4()),body:X.content,signal:Q}),Z=qd(K);if(!K.ok){let H;try{H=await J({response:K,url:$,requestBodyValues:X.values})}catch(z){if(jC(z)||s7.isInstance(z))throw z;throw new s7({message:"Failed to process error response",cause:z,statusCode:K.status,url:$,responseHeaders:Z,requestBodyValues:X.values})}throw H.value}try{return await G({response:K,url:$,requestBodyValues:X.values})}catch(H){if(H instanceof Error){if(jC(H)||s7.isInstance(H))throw H}throw new s7({message:"Failed to process successful response",cause:H,statusCode:K.status,url:$,responseHeaders:Z,requestBodyValues:X.values})}}catch(K){throw Yw4({error:K,url:$,requestBodyValues:X.values})}};function B_9($){return $}function Hw4({id:$,inputSchema:Y,outputSchema:X,supportsDeferredResults:G}){return({execute:J,needsApproval:Q,toModelOutput:W,onInputStart:K,onInputDelta:Z,onInputAvailable:H,...z})=>B_9({type:"provider",id:$,args:z,inputSchema:Y,outputSchema:X,execute:J,needsApproval:Q,toModelOutput:W,onInputStart:K,onInputDelta:Z,onInputAvailable:H,supportsDeferredResults:G})}async function $X($){if(typeof $==="function")$=$();return Promise.resolve($)}var FH=({errorSchema:$,errorToMessage:Y,isRetryable:X})=>async({response:G,url:J,requestBodyValues:Q})=>{let W=await G.text(),K=qd(G);if(W.trim()==="")return{responseHeaders:K,value:new s7({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,isRetryable:X==null?void 0:X(G)})};try{let Z=await D_9({text:W,schema:$});return{responseHeaders:K,value:new s7({message:Y(Z),url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,data:Z,isRetryable:X==null?void 0:X(G,Z)})}}catch(Z){return{responseHeaders:K,value:new s7({message:G.statusText,url:J,requestBodyValues:Q,statusCode:G.status,responseHeaders:K,responseBody:W,isRetryable:X==null?void 0:X(G)})}}},O_9=($)=>async({response:Y})=>{let X=qd(Y);if(Y.body==null)throw new Jw9({});return{responseHeaders:X,value:Uw4({stream:Y.body,schema:$})}},zN=($)=>async({response:Y,url:X,requestBodyValues:G})=>{let J=await Y.text(),Q=await HN({text:J,schema:$}),W=qd(Y);if(!Q.success)throw new s7({message:"Invalid JSON response",cause:Q.error,statusCode:Y.status,responseHeaders:W,responseBody:J,url:X,requestBodyValues:G});return{responseHeaders:W,value:Q.value,rawValue:Q.rawValue}};function E_9($){return $==null?void 0:$.replace(/\/$/,"")}function M_9(){return{headers:{}}}async function R_9(){if(process.env.VERCEL_OIDC_TOKEN)return process.env.VERCEL_OIDC_TOKEN??"";throw Error("@vercel/oidc is not available in the vendored @internal AI packages. Provide an API key instead.")}var q_9="vercel.ai.gateway.error",yc0=Symbol.for(q_9),zR4,VR4,CJ=class $ extends(VR4=Error,zR4=yc0,VR4){constructor({message:Y,statusCode:X=500,cause:G,generationId:J}){super(J?`${Y} [${J}]`:Y);this[zR4]=!0,this.statusCode=X,this.cause=G,this.generationId=J}static isInstance(Y){return $.hasMarker(Y)}static hasMarker(Y){return typeof Y==="object"&&Y!==null&&yc0 in Y&&Y[yc0]===!0}},zw4="GatewayAuthenticationError",P_9=`vercel.ai.gateway.error.${zw4}`,FR4=Symbol.for(P_9),LR4,DR4,Vw4=class $ extends(DR4=CJ,LR4=FR4,DR4){constructor({message:Y="Authentication failed",statusCode:X=401,cause:G,generationId:J}={}){super({message:Y,statusCode:X,cause:G,generationId:J});this[LR4]=!0,this.name=zw4,this.type="authentication_error"}static isInstance(Y){return CJ.hasMarker(Y)&&FR4 in Y}static createContextualError({apiKeyProvided:Y,oidcTokenProvided:X,message:G="Authentication failed",statusCode:J=401,cause:Q,generationId:W}){let K;if(Y)K=`AI Gateway authentication failed: Invalid API key.

Create a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys

Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.`;else if(X)K=`AI Gateway authentication failed: Invalid OIDC token.

Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.

Alternatively, use an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys`;else K=`AI Gateway authentication failed: No authentication provided.

Option 1 - API key:
Create an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys
Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.

Option 2 - OIDC token:
Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.`;return new $({message:K,statusCode:J,cause:Q,generationId:W})}},Fw4="GatewayInvalidRequestError",w_9=`vercel.ai.gateway.error.${Fw4}`,NR4=Symbol.for(w_9),AR4,BR4,__9=class extends(BR4=CJ,AR4=NR4,BR4){constructor({message:$="Invalid request",statusCode:Y=400,cause:X,generationId:G}={}){super({message:$,statusCode:Y,cause:X,generationId:G});this[AR4]=!0,this.name=Fw4,this.type="invalid_request_error"}static isInstance($){return CJ.hasMarker($)&&NR4 in $}},Lw4="GatewayRateLimitError",j_9=`vercel.ai.gateway.error.${Lw4}`,OR4=Symbol.for(j_9),ER4,MR4,T_9=class extends(MR4=CJ,ER4=OR4,MR4){constructor({message:$="Rate limit exceeded",statusCode:Y=429,cause:X,generationId:G}={}){super({message:$,statusCode:Y,cause:X,generationId:G});this[ER4]=!0,this.name=Lw4,this.type="rate_limit_exceeded"}static isInstance($){return CJ.hasMarker($)&&OR4 in $}},Dw4="GatewayModelNotFoundError",I_9=`vercel.ai.gateway.error.${Dw4}`,RR4=Symbol.for(I_9),C_9=oW(()=>mQ(U.object({modelId:U.string()}))),qR4,PR4,S_9=class extends(PR4=CJ,qR4=RR4,PR4){constructor({message:$="Model not found",statusCode:Y=404,modelId:X,cause:G,generationId:J}={}){super({message:$,statusCode:Y,cause:G,generationId:J});this[qR4]=!0,this.name=Dw4,this.type="model_not_found",this.modelId=X}static isInstance($){return CJ.hasMarker($)&&RR4 in $}},Nw4="GatewayInternalServerError",k_9=`vercel.ai.gateway.error.${Nw4}`,wR4=Symbol.for(k_9),_R4,jR4,TR4=class extends(jR4=CJ,_R4=wR4,jR4){constructor({message:$="Internal server error",statusCode:Y=500,cause:X,generationId:G}={}){super({message:$,statusCode:Y,cause:X,generationId:G});this[_R4]=!0,this.name=Nw4,this.type="internal_server_error"}static isInstance($){return CJ.hasMarker($)&&wR4 in $}},Aw4="GatewayResponseError",v_9=`vercel.ai.gateway.error.${Aw4}`,IR4=Symbol.for(v_9),CR4,SR4,x_9=class extends(SR4=CJ,CR4=IR4,SR4){constructor({message:$="Invalid response from Gateway",statusCode:Y=502,response:X,validationError:G,cause:J,generationId:Q}={}){super({message:$,statusCode:Y,cause:J,generationId:Q});this[CR4]=!0,this.name=Aw4,this.type="response_error",this.response=X,this.validationError=G}static isInstance($){return CJ.hasMarker($)&&IR4 in $}};async function kR4({response:$,statusCode:Y,defaultMessage:X="Gateway request failed",cause:G,authMethod:J}){var Q;let W=await UN({value:$,schema:y_9});if(!W.success){let V=typeof $==="object"&&$!==null&&"generationId"in $?$.generationId:void 0;return new x_9({message:`Invalid error response format: ${X}`,statusCode:Y,response:$,validationError:W.error,cause:G,generationId:V})}let K=W.value,Z=K.error.type,H=K.error.message,z=(Q=K.generationId)!=null?Q:void 0;switch(Z){case"authentication_error":return Vw4.createContextualError({apiKeyProvided:J==="api-key",oidcTokenProvided:J==="oidc",statusCode:Y,cause:G,generationId:z});case"invalid_request_error":return new __9({message:H,statusCode:Y,cause:G,generationId:z});case"rate_limit_exceeded":return new T_9({message:H,statusCode:Y,cause:G,generationId:z});case"model_not_found":{let V=await UN({value:K.error.param,schema:C_9});return new S_9({message:H,statusCode:Y,modelId:V.success?V.value.modelId:void 0,cause:G,generationId:z})}case"internal_server_error":return new TR4({message:H,statusCode:Y,cause:G,generationId:z});default:return new TR4({message:H,statusCode:Y,cause:G,generationId:z})}}var y_9=oW(()=>mQ(U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.unknown().nullish(),code:U.union([U.string(),U.number()]).nullish()}),generationId:U.string().nullish()})));function b_9($){if($.data!==void 0)return $.data;if($.responseBody!=null)try{return JSON.parse($.responseBody)}catch(Y){return $.responseBody}return{}}var Bw4="GatewayTimeoutError",h_9=`vercel.ai.gateway.error.${Bw4}`,vR4=Symbol.for(h_9),xR4,yR4,bR4=class $ extends(yR4=CJ,xR4=vR4,yR4){constructor({message:Y="Request timed out",statusCode:X=408,cause:G,generationId:J}={}){super({message:Y,statusCode:X,cause:G,generationId:J});this[xR4]=!0,this.name=Bw4,this.type="timeout_error"}static isInstance(Y){return CJ.hasMarker(Y)&&vR4 in Y}static createTimeoutError({originalMessage:Y,statusCode:X=408,cause:G,generationId:J}){let Q=`Gateway request timed out: ${Y}

    This is a client-side timeout. To resolve this, increase your timeout configuration: https://vercel.com/docs/ai-gateway/capabilities/video-generation#extending-timeouts-for-node.js`;return new $({message:Q,statusCode:X,cause:G,generationId:J})}};function hR4($){if(!($ instanceof Error))return!1;let Y=$.code;if(typeof Y==="string")return["UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_CONNECT_TIMEOUT"].includes(Y);return!1}async function fQ($,Y){var X;if(CJ.isInstance($))return $;if(hR4($))return bR4.createTimeoutError({originalMessage:$ instanceof Error?$.message:"Unknown error",cause:$});if(s7.isInstance($)){if($.cause&&hR4($.cause))return bR4.createTimeoutError({originalMessage:$.message,cause:$});return await kR4({response:b_9($),statusCode:(X=$.statusCode)!=null?X:500,defaultMessage:"Gateway request failed",cause:$,authMethod:Y})}return await kR4({response:{},statusCode:500,defaultMessage:$ instanceof Error?`Gateway request failed: ${$.message}`:"Unknown Gateway error",cause:$,authMethod:Y})}var Ow4="ai-gateway-auth-method";async function VH($){let Y=await UN({value:$[Ow4],schema:f_9});return Y.success?Y.value:void 0}var f_9=oW(()=>mQ(U.union([U.literal("api-key"),U.literal("oidc")]))),g_9=["embedding","image","language","reranking","video"],fR4=class{constructor($){this.config=$}async getAvailableModels(){try{let{value:$}=await yX0({url:`${this.config.baseURL}/config`,headers:await $X(this.config.headers()),successfulResponseHandler:zN(m_9),failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(Y)=>Y}),fetch:this.config.fetch});return $}catch($){throw await fQ($)}}async getCredits(){try{let $=new URL(this.config.baseURL),{value:Y}=await yX0({url:`${$.origin}/v1/credits`,headers:await $X(this.config.headers()),successfulResponseHandler:zN(u_9),failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(X)=>X}),fetch:this.config.fetch});return Y}catch($){throw await fQ($)}}},m_9=oW(()=>mQ(U.object({models:U.array(U.object({id:U.string(),name:U.string(),description:U.string().nullish(),pricing:U.object({input:U.string(),output:U.string(),input_cache_read:U.string().nullish(),input_cache_write:U.string().nullish()}).transform(({input:$,output:Y,input_cache_read:X,input_cache_write:G})=>({input:$,output:Y,...X?{cachedInputTokens:X}:{},...G?{cacheCreationInputTokens:G}:{}})).nullish(),specification:U.object({specificationVersion:U.literal("v3"),provider:U.string(),modelId:U.string()}),modelType:U.string().nullish()})).transform(($)=>$.filter((Y)=>Y.modelType==null||g_9.includes(Y.modelType)))}))),u_9=oW(()=>mQ(U.object({balance:U.string(),total_used:U.string()}).transform(({balance:$,total_used:Y})=>({balance:$,totalUsed:Y})))),p_9=class{constructor($){this.config=$}async getSpendReport($){try{let Y=new URL(this.config.baseURL),X=new URLSearchParams;if(X.set("start_date",$.startDate),X.set("end_date",$.endDate),$.groupBy)X.set("group_by",$.groupBy);if($.datePart)X.set("date_part",$.datePart);if($.userId)X.set("user_id",$.userId);if($.model)X.set("model",$.model);if($.provider)X.set("provider",$.provider);if($.credentialType)X.set("credential_type",$.credentialType);if($.tags&&$.tags.length>0)X.set("tags",$.tags.join(","));let{value:G}=await yX0({url:`${Y.origin}/v1/report?${X.toString()}`,headers:await $X(this.config.headers()),successfulResponseHandler:zN(d_9),failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(J)=>J}),fetch:this.config.fetch});return G}catch(Y){throw await fQ(Y)}}},d_9=oW(()=>mQ(U.object({results:U.array(U.object({day:U.string().optional(),hour:U.string().optional(),user:U.string().optional(),model:U.string().optional(),tag:U.string().optional(),provider:U.string().optional(),credential_type:U.enum(["byok","system"]).optional(),total_cost:U.number(),market_cost:U.number().optional(),input_tokens:U.number().optional(),output_tokens:U.number().optional(),cached_input_tokens:U.number().optional(),cache_creation_input_tokens:U.number().optional(),reasoning_tokens:U.number().optional(),request_count:U.number().optional()}).transform(({credential_type:$,total_cost:Y,market_cost:X,input_tokens:G,output_tokens:J,cached_input_tokens:Q,cache_creation_input_tokens:W,reasoning_tokens:K,request_count:Z,...H})=>({...H,...$!==void 0?{credentialType:$}:{},totalCost:Y,...X!==void 0?{marketCost:X}:{},...G!==void 0?{inputTokens:G}:{},...J!==void 0?{outputTokens:J}:{},...Q!==void 0?{cachedInputTokens:Q}:{},...W!==void 0?{cacheCreationInputTokens:W}:{},...K!==void 0?{reasoningTokens:K}:{},...Z!==void 0?{requestCount:Z}:{}})))}))),c_9=class{constructor($){this.config=$}async getGenerationInfo($){try{let Y=new URL(this.config.baseURL),{value:X}=await yX0({url:`${Y.origin}/v1/generation?id=${encodeURIComponent($.id)}`,headers:await $X(this.config.headers()),successfulResponseHandler:zN(l_9),failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(G)=>G}),fetch:this.config.fetch});return X}catch(Y){throw await fQ(Y)}}},l_9=oW(()=>mQ(U.object({data:U.object({id:U.string(),total_cost:U.number(),upstream_inference_cost:U.number(),usage:U.number(),created_at:U.string(),model:U.string(),is_byok:U.boolean(),provider_name:U.string(),streamed:U.boolean(),finish_reason:U.string(),latency:U.number(),generation_time:U.number(),native_tokens_prompt:U.number(),native_tokens_completion:U.number(),native_tokens_reasoning:U.number(),native_tokens_cached:U.number(),native_tokens_cache_creation:U.number(),billable_web_search_calls:U.number()}).transform(({total_cost:$,upstream_inference_cost:Y,created_at:X,is_byok:G,provider_name:J,finish_reason:Q,generation_time:W,native_tokens_prompt:K,native_tokens_completion:Z,native_tokens_reasoning:H,native_tokens_cached:z,native_tokens_cache_creation:V,billable_web_search_calls:F,...L})=>({...L,totalCost:$,upstreamInferenceCost:Y,createdAt:X,isByok:G,providerName:J,finishReason:Q,generationTime:W,promptTokens:K,completionTokens:Z,reasoningTokens:H,cachedTokens:z,cacheCreationTokens:V,billableWebSearchCalls:F}))}).transform(({data:$})=>$))),i_9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.supportedUrls={"*/*":[/.*/]}}get provider(){return this.config.provider}async getArgs($){let{abortSignal:Y,...X}=$;return{args:this.maybeEncodeFileParts(X),warnings:[]}}async doGenerate($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await $X(this.config.headers());try{let{responseHeaders:Q,value:W,rawValue:K}=await TC({url:this.getUrl(),headers:_C(J,$.headers,this.getModelConfigHeaders(this.modelId,!1),await $X(this.config.o11yHeaders)),body:Y,successfulResponseHandler:zN(U.any()),failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(Z)=>Z}),...G&&{abortSignal:G},fetch:this.config.fetch});return{...W,request:{body:Y},response:{headers:Q,body:K},warnings:X}}catch(Q){throw await fQ(Q,await VH(J))}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await $X(this.config.headers());try{let{value:Q,responseHeaders:W}=await TC({url:this.getUrl(),headers:_C(J,$.headers,this.getModelConfigHeaders(this.modelId,!0),await $X(this.config.o11yHeaders)),body:Y,successfulResponseHandler:O_9(U.any()),failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(K)=>K}),...G&&{abortSignal:G},fetch:this.config.fetch});return{stream:Q.pipeThrough(new TransformStream({start(K){if(X.length>0)K.enqueue({type:"stream-start",warnings:X})},transform(K,Z){if(K.success){let H=K.value;if(H.type==="raw"&&!$.includeRawChunks)return;if(H.type==="response-metadata"&&H.timestamp&&typeof H.timestamp==="string")H.timestamp=new Date(H.timestamp);Z.enqueue(H)}else Z.error(K.error)}})),request:{body:Y},response:{headers:W}}}catch(Q){throw await fQ(Q,await VH(J))}}isFilePart($){return $&&typeof $==="object"&&"type"in $&&$.type==="file"}maybeEncodeFileParts($){for(let Y of $.prompt)for(let X of Y.content)if(this.isFilePart(X)){let G=X;if(G.data instanceof Uint8Array){let J=Uint8Array.from(G.data),Q=Buffer.from(J).toString("base64");G.data=new URL(`data:${G.mediaType||"application/octet-stream"};base64,${Q}`)}}return $}getUrl(){return`${this.config.baseURL}/language-model`}getModelConfigHeaders($,Y){return{"ai-language-model-specification-version":"3","ai-language-model-id":$,"ai-language-model-streaming":String(Y)}}},n_9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J;let Q=await $X(this.config.headers());try{let{responseHeaders:W,value:K,rawValue:Z}=await TC({url:this.getUrl(),headers:_C(Q,Y!=null?Y:{},this.getModelConfigHeaders(),await $X(this.config.o11yHeaders)),body:{values:$,...G?{providerOptions:G}:{}},successfulResponseHandler:zN(r_9),failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(H)=>H}),...X&&{abortSignal:X},fetch:this.config.fetch});return{embeddings:K.embeddings,usage:(J=K.usage)!=null?J:void 0,providerMetadata:K.providerMetadata,response:{headers:W,body:Z},warnings:[]}}catch(W){throw await fQ(W,await VH(Q))}}getUrl(){return`${this.config.baseURL}/embedding-model`}getModelConfigHeaders(){return{"ai-embedding-model-specification-version":"3","ai-model-id":this.modelId}}},r_9=oW(()=>mQ(U.object({embeddings:U.array(U.array(U.number())),usage:U.object({tokens:U.number()}).nullish(),providerMetadata:U.record(U.string(),U.record(U.string(),U.unknown())).optional()}))),a_9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxImagesPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,files:Q,mask:W,providerOptions:K,headers:Z,abortSignal:H}){var z,V,F,L;let N=await $X(this.config.headers());try{let{responseHeaders:D,value:A}=await TC({url:this.getUrl(),headers:_C(N,Z!=null?Z:{},this.getModelConfigHeaders(),await $X(this.config.o11yHeaders)),body:{prompt:$,n:Y,...X&&{size:X},...G&&{aspectRatio:G},...J&&{seed:J},...K&&{providerOptions:K},...Q&&{files:Q.map((B)=>gR4(B))},...W&&{mask:gR4(W)}},successfulResponseHandler:zN(e_9),failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(B)=>B}),...H&&{abortSignal:H},fetch:this.config.fetch});return{images:A.images,warnings:(z=A.warnings)!=null?z:[],providerMetadata:A.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:D},...A.usage!=null&&{usage:{inputTokens:(V=A.usage.inputTokens)!=null?V:void 0,outputTokens:(F=A.usage.outputTokens)!=null?F:void 0,totalTokens:(L=A.usage.totalTokens)!=null?L:void 0}}}}catch(D){throw await fQ(D,await VH(N))}}getUrl(){return`${this.config.baseURL}/image-model`}getModelConfigHeaders(){return{"ai-image-model-specification-version":"3","ai-model-id":this.modelId}}};function gR4($){if($.type==="file"&&$.data instanceof Uint8Array)return{...$,data:$w4($.data)};return $}var s_9=U.object({images:U.array(U.unknown()).optional()}).catchall(U.unknown()),o_9=U.discriminatedUnion("type",[U.object({type:U.literal("unsupported"),feature:U.string(),details:U.string().optional()}),U.object({type:U.literal("compatibility"),feature:U.string(),details:U.string().optional()}),U.object({type:U.literal("other"),message:U.string()})]),t_9=U.object({inputTokens:U.number().nullish(),outputTokens:U.number().nullish(),totalTokens:U.number().nullish()}),e_9=U.object({images:U.array(U.string()),warnings:U.array(o_9).optional(),providerMetadata:U.record(U.string(),s_9).optional(),usage:t_9.optional()}),$j9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxVideosPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,aspectRatio:X,resolution:G,duration:J,fps:Q,seed:W,image:K,providerOptions:Z,headers:H,abortSignal:z}){var V;let F=await $X(this.config.headers());try{let{responseHeaders:L,value:N}=await TC({url:this.getUrl(),headers:_C(F,H!=null?H:{},this.getModelConfigHeaders(),await $X(this.config.o11yHeaders),{accept:"text/event-stream"}),body:{prompt:$,n:Y,...X&&{aspectRatio:X},...G&&{resolution:G},...J&&{duration:J},...Q&&{fps:Q},...W&&{seed:W},...Z&&{providerOptions:Z},...K&&{image:Yj9(K)}},successfulResponseHandler:async({response:D,url:A,requestBodyValues:B})=>{if(D.body==null)throw new s7({message:"SSE response body is empty",url:A,requestBodyValues:B,statusCode:D.status});let E=Uw4({stream:D.body,schema:Qj9}).getReader(),{done:M,value:R}=await E.read();if(E.releaseLock(),M||!R)throw new s7({message:"SSE stream ended without a data event",url:A,requestBodyValues:B,statusCode:D.status});if(!R.success)throw new s7({message:"Failed to parse video SSE event",cause:R.error,url:A,requestBodyValues:B,statusCode:D.status});let q=R.value;if(q.type==="error")throw new s7({message:q.message,statusCode:q.statusCode,url:A,requestBodyValues:B,responseHeaders:Object.fromEntries([...D.headers]),responseBody:JSON.stringify(q),data:{error:{message:q.message,type:q.errorType,param:q.param}}});return{value:{videos:q.videos,warnings:q.warnings,providerMetadata:q.providerMetadata},responseHeaders:Object.fromEntries([...D.headers])}},failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(D)=>D}),...z&&{abortSignal:z},fetch:this.config.fetch});return{videos:N.videos,warnings:(V=N.warnings)!=null?V:[],providerMetadata:N.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:L}}}catch(L){throw await fQ(L,await VH(F))}}getUrl(){return`${this.config.baseURL}/video-model`}getModelConfigHeaders(){return{"ai-video-model-specification-version":"3","ai-model-id":this.modelId}}};function Yj9($){if($.type==="file"&&$.data instanceof Uint8Array)return{...$,data:$w4($.data)};return $}var Xj9=U.object({videos:U.array(U.unknown()).optional()}).catchall(U.unknown()),Gj9=U.union([U.object({type:U.literal("url"),url:U.string(),mediaType:U.string()}),U.object({type:U.literal("base64"),data:U.string(),mediaType:U.string()})]),Jj9=U.discriminatedUnion("type",[U.object({type:U.literal("unsupported"),feature:U.string(),details:U.string().optional()}),U.object({type:U.literal("compatibility"),feature:U.string(),details:U.string().optional()}),U.object({type:U.literal("other"),message:U.string()})]),Qj9=U.discriminatedUnion("type",[U.object({type:U.literal("result"),videos:U.array(Gj9),warnings:U.array(Jj9).optional(),providerMetadata:U.record(U.string(),Xj9).optional()}),U.object({type:U.literal("error"),message:U.string(),errorType:U.string(),statusCode:U.number(),param:U.unknown().nullable()})]),Wj9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get provider(){return this.config.provider}async doRerank({documents:$,query:Y,topN:X,headers:G,abortSignal:J,providerOptions:Q}){let W=await $X(this.config.headers());try{let{responseHeaders:K,value:Z,rawValue:H}=await TC({url:this.getUrl(),headers:_C(W,G!=null?G:{},this.getModelConfigHeaders(),await $X(this.config.o11yHeaders)),body:{documents:$,query:Y,...X!=null?{topN:X}:{},...Q?{providerOptions:Q}:{}},successfulResponseHandler:zN(Kj9),failedResponseHandler:FH({errorSchema:U.any(),errorToMessage:(z)=>z}),...J&&{abortSignal:J},fetch:this.config.fetch});return{ranking:Z.ranking,providerMetadata:Z.providerMetadata,response:{headers:K,body:H},warnings:[]}}catch(K){throw await fQ(K,await VH(W))}}getUrl(){return`${this.config.baseURL}/reranking-model`}getModelConfigHeaders(){return{"ai-reranking-model-specification-version":"3","ai-model-id":this.modelId}}},Kj9=oW(()=>mQ(U.object({ranking:U.array(U.object({index:U.number(),relevanceScore:U.number()})),providerMetadata:U.record(U.string(),U.record(U.string(),U.unknown())).optional()}))),Zj9=oW(()=>mQ(U.object({objective:U.string().describe("Natural-language description of the web research goal, including source or freshness guidance and broader context from the task. Maximum 5000 characters."),search_queries:U.array(U.string()).optional().describe("Optional search queries to supplement the objective. Maximum 200 characters per query."),mode:U.enum(["one-shot","agentic"]).optional().describe('Mode preset: "one-shot" for comprehensive results with longer excerpts (default), "agentic" for concise, token-efficient results for multi-step workflows.'),max_results:U.number().optional().describe("Maximum number of results to return (1-20). Defaults to 10 if not specified."),source_policy:U.object({include_domains:U.array(U.string()).optional().describe("List of domains to include in search results."),exclude_domains:U.array(U.string()).optional().describe("List of domains to exclude from search results."),after_date:U.string().optional().describe("Only include results published after this date (ISO 8601 format).")}).optional().describe("Source policy for controlling which domains to include/exclude and freshness."),excerpts:U.object({max_chars_per_result:U.number().optional().describe("Maximum characters per result."),max_chars_total:U.number().optional().describe("Maximum total characters across all results.")}).optional().describe("Excerpt configuration for controlling result length."),fetch_policy:U.object({max_age_seconds:U.number().optional().describe("Maximum age in seconds for cached content. Set to 0 to always fetch fresh content.")}).optional().describe("Fetch policy for controlling content freshness.")}))),Uj9=oW(()=>mQ(U.union([U.object({searchId:U.string(),results:U.array(U.object({url:U.string(),title:U.string(),excerpt:U.string(),publishDate:U.string().nullable().optional(),relevanceScore:U.number().optional()}))}),U.object({error:U.enum(["api_error","rate_limit","timeout","invalid_input","configuration_error","unknown"]),statusCode:U.number().optional(),message:U.string()})]))),Hj9=Hw4({id:"gateway.parallel_search",inputSchema:Zj9,outputSchema:Uj9}),zj9=($={})=>Hj9($),Vj9=oW(()=>mQ(U.object({query:U.union([U.string(),U.array(U.string())]).describe("Search query (string) or multiple queries (array of up to 5 strings). Multi-query searches return combined results from all queries."),max_results:U.number().optional().describe("Maximum number of search results to return (1-20, default: 10)"),max_tokens_per_page:U.number().optional().describe("Maximum number of tokens to extract per search result page (256-2048, default: 2048)"),max_tokens:U.number().optional().describe("Maximum total tokens across all search results (default: 25000, max: 1000000)"),country:U.string().optional().describe("Two-letter ISO 3166-1 alpha-2 country code for regional search results (e.g., 'US', 'GB', 'FR')"),search_domain_filter:U.array(U.string()).optional().describe("List of domains to include or exclude from search results (max 20). To include: ['nature.com', 'science.org']. To exclude: ['-example.com', '-spam.net']"),search_language_filter:U.array(U.string()).optional().describe("List of ISO 639-1 language codes to filter results (max 10, lowercase). Examples: ['en', 'fr', 'de']"),search_after_date:U.string().optional().describe("Include only results published after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),search_before_date:U.string().optional().describe("Include only results published before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),last_updated_after_filter:U.string().optional().describe("Include only results last updated after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),last_updated_before_filter:U.string().optional().describe("Include only results last updated before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),search_recency_filter:U.enum(["day","week","month","year"]).optional().describe("Filter results by relative time period. Cannot be used with search_after_date or search_before_date.")}))),Fj9=oW(()=>mQ(U.union([U.object({results:U.array(U.object({title:U.string(),url:U.string(),snippet:U.string(),date:U.string().optional(),lastUpdated:U.string().optional()})),id:U.string()}),U.object({error:U.enum(["api_error","rate_limit","timeout","invalid_input","unknown"]),statusCode:U.number().optional(),message:U.string()})]))),Lj9=Hw4({id:"gateway.perplexity_search",inputSchema:Vj9,outputSchema:Fj9}),Dj9=($={})=>Lj9($),Nj9={parallelSearch:zj9,perplexitySearch:Dj9};async function Aj9(){var $;return($=M_9().headers)==null?void 0:$["x-vercel-id"]}var Bj9="3.0.112",Oj9="0.0.1";function Ej9($={}){var Y,X;let G=null,J=null,Q=(Y=$.metadataCacheRefreshMillis)!=null?Y:300000,W=0,K=(X=E_9($.baseURL))!=null?X:"https://ai-gateway.vercel.sh/v3/ai",Z=async()=>{try{let O=await Rj9($);return cX0({Authorization:`Bearer ${O.token}`,"ai-gateway-protocol-version":Oj9,[Ow4]:O.authMethod,...$.headers},`ai-sdk/gateway/${Bj9}`)}catch(O){throw Vw4.createContextualError({apiKeyProvided:!1,oidcTokenProvided:!1,statusCode:401,cause:O})}},H=()=>{let O=Jd({settingValue:void 0,environmentVariableName:"VERCEL_DEPLOYMENT_ID"}),E=Jd({settingValue:void 0,environmentVariableName:"VERCEL_ENV"}),M=Jd({settingValue:void 0,environmentVariableName:"VERCEL_REGION"}),R=Jd({settingValue:void 0,environmentVariableName:"VERCEL_PROJECT_ID"});return async()=>{let q=await Aj9();return{...O&&{"ai-o11y-deployment-id":O},...E&&{"ai-o11y-environment":E},...M&&{"ai-o11y-region":M},...q&&{"ai-o11y-request-id":q},...R&&{"ai-o11y-project-id":R}}}},z=(O)=>{return new i_9(O,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})},V=async()=>{var O,E,M;let R=(M=(E=(O=$._internal)==null?void 0:O.currentDate)==null?void 0:E.call(O).getTime())!=null?M:Date.now();if(!G||R-W>Q)W=R,G=new fR4({baseURL:K,headers:Z,fetch:$.fetch}).getAvailableModels().then((q)=>{return J=q,q}).catch(async(q)=>{throw await fQ(q,await VH(await Z()))});return J?Promise.resolve(J):G},F=async()=>{return new fR4({baseURL:K,headers:Z,fetch:$.fetch}).getCredits().catch(async(O)=>{throw await fQ(O,await VH(await Z()))})},L=async(O)=>{return new p_9({baseURL:K,headers:Z,fetch:$.fetch}).getSpendReport(O).catch(async(E)=>{throw await fQ(E,await VH(await Z()))})},N=async(O)=>{return new c_9({baseURL:K,headers:Z,fetch:$.fetch}).getGenerationInfo(O).catch(async(E)=>{throw await fQ(E,await VH(await Z()))})},D=function(O){if(new.target)throw Error("The Gateway Provider model function cannot be called with the new keyword.");return z(O)};D.specificationVersion="v3",D.getAvailableModels=V,D.getCredits=F,D.getSpendReport=L,D.getGenerationInfo=N,D.imageModel=(O)=>{return new a_9(O,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})},D.languageModel=z;let A=(O)=>{return new n_9(O,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})};D.embeddingModel=A,D.textEmbeddingModel=A,D.videoModel=(O)=>{return new $j9(O,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})};let B=(O)=>{return new Wj9(O,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})};return D.rerankingModel=B,D.reranking=B,D.chat=D.languageModel,D.embedding=D.embeddingModel,D.image=D.imageModel,D.video=D.videoModel,D.tools=Nj9,D}var Mj9=Ej9();async function Rj9($){let Y=Jd({settingValue:$.apiKey,environmentVariableName:"AI_GATEWAY_API_KEY"});if(Y)return{token:Y,authMethod:"api-key"};return{token:await R_9(),authMethod:"oidc"}}var qj9=typeof globalThis==="object"?globalThis:global,cM="1.9.0",mR4=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function Pj9($){var Y=new Set([$]),X=new Set,G=$.match(mR4);if(!G)return function(){return!1};var J={major:+G[1],minor:+G[2],patch:+G[3],prerelease:G[4]};if(J.prerelease!=null)return function(Z){return Z===$};function Q(K){return X.add(K),!1}function W(K){return Y.add(K),!0}return function(Z){if(Y.has(Z))return!0;if(X.has(Z))return!1;var H=Z.match(mR4);if(!H)return Q(Z);var z={major:+H[1],minor:+H[2],patch:+H[3],prerelease:H[4]};if(z.prerelease!=null)return Q(Z);if(J.major!==z.major)return Q(Z);if(J.major===0){if(J.minor===z.minor&&J.patch<=z.patch)return W(Z);return Q(Z)}if(J.minor<=z.minor)return W(Z);return Q(Z)}}var wj9=Pj9(cM),_j9=cM.split(".")[0],Bd=Symbol.for("opentelemetry.js.api."+_j9),Od=qj9;function Bl0($,Y,X,G){var J;if(G===void 0)G=!1;var Q=Od[Bd]=(J=Od[Bd])!==null&&J!==void 0?J:{version:cM};if(!G&&Q[$]){var W=Error("@opentelemetry/api: Attempted duplicate registration of API: "+$);return X.error(W.stack||W.message),!1}if(Q.version!==cM){var W=Error("@opentelemetry/api: Registration of version v"+Q.version+" for "+$+" does not match previously registered API v"+cM);return X.error(W.stack||W.message),!1}return Q[$]=Y,X.debug("@opentelemetry/api: Registered a global for "+$+" v"+cM+"."),!0}function Ed($){var Y,X,G=(Y=Od[Bd])===null||Y===void 0?void 0:Y.version;if(!G||!wj9(G))return;return(X=Od[Bd])===null||X===void 0?void 0:X[$]}function Ol0($,Y){Y.debug("@opentelemetry/api: Unregistering a global for "+$+" v"+cM+".");var X=Od[Bd];if(X)delete X[$]}var jj9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},Tj9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},Ij9=function(){function $(Y){this._namespace=Y.namespace||"DiagComponentLogger"}return $.prototype.debug=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return $d("debug",this._namespace,Y)},$.prototype.error=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return $d("error",this._namespace,Y)},$.prototype.info=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return $d("info",this._namespace,Y)},$.prototype.warn=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return $d("warn",this._namespace,Y)},$.prototype.verbose=function(){var Y=[];for(var X=0;X<arguments.length;X++)Y[X]=arguments[X];return $d("verbose",this._namespace,Y)},$}();function $d($,Y,X){var G=Ed("diag");if(!G)return;return X.unshift(Y),G[$].apply(G,Tj9([],jj9(X),!1))}var nW;(function($){$[$.NONE=0]="NONE",$[$.ERROR=30]="ERROR",$[$.WARN=50]="WARN",$[$.INFO=60]="INFO",$[$.DEBUG=70]="DEBUG",$[$.VERBOSE=80]="VERBOSE",$[$.ALL=9999]="ALL"})(nW||(nW={}));function Cj9($,Y){if($<nW.NONE)$=nW.NONE;else if($>nW.ALL)$=nW.ALL;Y=Y||{};function X(G,J){var Q=Y[G];if(typeof Q==="function"&&$>=J)return Q.bind(Y);return function(){}}return{error:X("error",nW.ERROR),warn:X("warn",nW.WARN),info:X("info",nW.INFO),debug:X("debug",nW.DEBUG),verbose:X("verbose",nW.VERBOSE)}}var Sj9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},kj9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},vj9="diag",bX0=function(){function $(){function Y(J){return function(){var Q=[];for(var W=0;W<arguments.length;W++)Q[W]=arguments[W];var K=Ed("diag");if(!K)return;return K[J].apply(K,kj9([],Sj9(Q),!1))}}var X=this,G=function(J,Q){var W,K,Z;if(Q===void 0)Q={logLevel:nW.INFO};if(J===X){var H=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return X.error((W=H.stack)!==null&&W!==void 0?W:H.message),!1}if(typeof Q==="number")Q={logLevel:Q};var z=Ed("diag"),V=Cj9((K=Q.logLevel)!==null&&K!==void 0?K:nW.INFO,J);if(z&&!Q.suppressOverrideMessage){var F=(Z=Error().stack)!==null&&Z!==void 0?Z:"<failed to generate stacktrace>";z.warn("Current logger will be overwritten from "+F),V.warn("Current logger will overwrite one already registered from "+F)}return Bl0("diag",V,X,!0)};X.setLogger=G,X.disable=function(){Ol0(vj9,X)},X.createComponentLogger=function(J){return new Ij9(J)},X.verbose=Y("verbose"),X.debug=Y("debug"),X.info=Y("info"),X.warn=Y("warn"),X.error=Y("error")}return $.instance=function(){if(!this._instance)this._instance=new $;return this._instance},$}();function xj9($){return Symbol.for($)}var yj9=function(){function $(Y){var X=this;X._currentContext=Y?new Map(Y):new Map,X.getValue=function(G){return X._currentContext.get(G)},X.setValue=function(G,J){var Q=new $(X._currentContext);return Q._currentContext.set(G,J),Q},X.deleteValue=function(G){var J=new $(X._currentContext);return J._currentContext.delete(G),J}}return $}(),bj9=new yj9,hj9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},fj9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},gj9=function(){function $(){}return $.prototype.active=function(){return bj9},$.prototype.with=function(Y,X,G){var J=[];for(var Q=3;Q<arguments.length;Q++)J[Q-3]=arguments[Q];return X.call.apply(X,fj9([G],hj9(J),!1))},$.prototype.bind=function(Y,X){return X},$.prototype.enable=function(){return this},$.prototype.disable=function(){return this},$}(),mj9=function($,Y){var X=typeof Symbol==="function"&&$[Symbol.iterator];if(!X)return $;var G=X.call($),J,Q=[],W;try{while(!(J=G.next()).done)Q.push(J.value)}catch(K){W={error:K}}finally{try{if(J&&!J.done&&(X=G.return))X.call(G)}finally{if(W)throw W.error}}return Q},uj9=function($,Y,X){if(arguments.length===2){for(var G=0,J=Y.length,Q;G<J;G++)if(Q||!(G in Y)){if(!Q)Q=Array.prototype.slice.call(Y,0,G);Q[G]=Y[G]}}return $.concat(Q||Array.prototype.slice.call(Y))},bc0="context",pj9=new gj9,El0=function(){function $(){}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalContextManager=function(Y){return Bl0(bc0,Y,bX0.instance())},$.prototype.active=function(){return this._getContextManager().active()},$.prototype.with=function(Y,X,G){var J,Q=[];for(var W=3;W<arguments.length;W++)Q[W-3]=arguments[W];return(J=this._getContextManager()).with.apply(J,uj9([Y,X,G],mj9(Q),!1))},$.prototype.bind=function(Y,X){return this._getContextManager().bind(Y,X)},$.prototype._getContextManager=function(){return Ed(bc0)||pj9},$.prototype.disable=function(){this._getContextManager().disable(),Ol0(bc0,bX0.instance())},$}(),sc0;(function($){$[$.NONE=0]="NONE",$[$.SAMPLED=1]="SAMPLED"})(sc0||(sc0={}));var Ew4="0000000000000000",Mw4="00000000000000000000000000000000",dj9={traceId:Mw4,spanId:Ew4,traceFlags:sc0.NONE},Kd=function(){function $(Y){if(Y===void 0)Y=dj9;this._spanContext=Y}return $.prototype.spanContext=function(){return this._spanContext},$.prototype.setAttribute=function(Y,X){return this},$.prototype.setAttributes=function(Y){return this},$.prototype.addEvent=function(Y,X){return this},$.prototype.addLink=function(Y){return this},$.prototype.addLinks=function(Y){return this},$.prototype.setStatus=function(Y){return this},$.prototype.updateName=function(Y){return this},$.prototype.end=function(Y){},$.prototype.isRecording=function(){return!1},$.prototype.recordException=function(Y,X){},$}(),Ml0=xj9("OpenTelemetry Context Key SPAN");function Rl0($){return $.getValue(Ml0)||void 0}function cj9(){return Rl0(El0.getInstance().active())}function ql0($,Y){return $.setValue(Ml0,Y)}function lj9($){return $.deleteValue(Ml0)}function ij9($,Y){return ql0($,new Kd(Y))}function Rw4($){var Y;return(Y=Rl0($))===null||Y===void 0?void 0:Y.spanContext()}var nj9=/^([0-9a-f]{32})$/i,rj9=/^[0-9a-f]{16}$/i;function aj9($){return nj9.test($)&&$!==Mw4}function sj9($){return rj9.test($)&&$!==Ew4}function qw4($){return aj9($.traceId)&&sj9($.spanId)}function oj9($){return new Kd($)}var hc0=El0.getInstance(),Pw4=function(){function $(){}return $.prototype.startSpan=function(Y,X,G){if(G===void 0)G=hc0.active();var J=Boolean(X===null||X===void 0?void 0:X.root);if(J)return new Kd;var Q=G&&Rw4(G);if(tj9(Q)&&qw4(Q))return new Kd(Q);else return new Kd},$.prototype.startActiveSpan=function(Y,X,G,J){var Q,W,K;if(arguments.length<2)return;else if(arguments.length===2)K=X;else if(arguments.length===3)Q=X,K=G;else Q=X,W=G,K=J;var Z=W!==null&&W!==void 0?W:hc0.active(),H=this.startSpan(Y,Q,Z),z=ql0(Z,H);return hc0.with(z,K,void 0,H)},$}();function tj9($){return typeof $==="object"&&typeof $.spanId==="string"&&typeof $.traceId==="string"&&typeof $.traceFlags==="number"}var ej9=new Pw4,$T9=function(){function $(Y,X,G,J){this._provider=Y,this.name=X,this.version=G,this.options=J}return $.prototype.startSpan=function(Y,X,G){return this._getTracer().startSpan(Y,X,G)},$.prototype.startActiveSpan=function(Y,X,G,J){var Q=this._getTracer();return Reflect.apply(Q.startActiveSpan,Q,arguments)},$.prototype._getTracer=function(){if(this._delegate)return this._delegate;var Y=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!Y)return ej9;return this._delegate=Y,this._delegate},$}(),YT9=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){return new Pw4},$}(),XT9=new YT9,uR4=function(){function $(){}return $.prototype.getTracer=function(Y,X,G){var J;return(J=this.getDelegateTracer(Y,X,G))!==null&&J!==void 0?J:new $T9(this,Y,X,G)},$.prototype.getDelegate=function(){var Y;return(Y=this._delegate)!==null&&Y!==void 0?Y:XT9},$.prototype.setDelegate=function(Y){this._delegate=Y},$.prototype.getDelegateTracer=function(Y,X,G){var J;return(J=this._delegate)===null||J===void 0?void 0:J.getTracer(Y,X,G)},$}(),hX0;(function($){$[$.UNSET=0]="UNSET",$[$.OK=1]="OK",$[$.ERROR=2]="ERROR"})(hX0||(hX0={}));var pR4=El0.getInstance(),fc0="trace",GT9=function(){function $(){this._proxyTracerProvider=new uR4,this.wrapSpanContext=oj9,this.isSpanContextValid=qw4,this.deleteSpan=lj9,this.getSpan=Rl0,this.getActiveSpan=cj9,this.getSpanContext=Rw4,this.setSpan=ql0,this.setSpanContext=ij9}return $.getInstance=function(){if(!this._instance)this._instance=new $;return this._instance},$.prototype.setGlobalTracerProvider=function(Y){var X=Bl0(fc0,this._proxyTracerProvider,bX0.instance());if(X)this._proxyTracerProvider.setDelegate(Y);return X},$.prototype.getTracerProvider=function(){return Ed(fc0)||this._proxyTracerProvider},$.prototype.getTracer=function(Y,X){return this.getTracerProvider().getTracer(Y,X)},$.prototype.disable=function(){Ol0(fc0,bX0.instance()),this._proxyTracerProvider=new uR4},$}(),JT9=GT9.getInstance(),QT9=Object.defineProperty,WT9=($,Y)=>{for(var X in Y)QT9($,X,{get:Y[X],enumerable:!0})},ww4="AI_InvalidArgumentError",_w4=`vercel.ai.error.${ww4}`,KT9=Symbol.for(_w4),jw4,dR4=class extends xX{constructor({parameter:$,value:Y,message:X}){super({name:ww4,message:`Invalid argument for parameter ${$}: ${X}`});this[jw4]=!0,this.parameter=$,this.value=Y}static isInstance($){return xX.hasMarker($,_w4)}};jw4=KT9;var Tw4="AI_NoObjectGeneratedError",Iw4=`vercel.ai.error.${Tw4}`,ZT9=Symbol.for(Iw4),Cw4,KN=class extends xX{constructor({message:$="No object generated.",cause:Y,text:X,response:G,usage:J,finishReason:Q}){super({name:Tw4,message:$,cause:Y});this[Cw4]=!0,this.text=X,this.response=G,this.usage=J,this.finishReason=Q}static isInstance($){return xX.hasMarker($,Iw4)}};Cw4=ZT9;var UT9=class extends xX{constructor($){super({name:"AI_UnsupportedModelVersionError",message:`Unsupported model version ${$.version} for provider "${$.provider}" and model "${$.modelId}". AI SDK 5 only supports models that implement specification version "v2".`});this.version=$.version,this.provider=$.provider,this.modelId=$.modelId}},Sw4="AI_RetryError",kw4=`vercel.ai.error.${Sw4}`,HT9=Symbol.for(kw4),vw4,cR4=class extends xX{constructor({message:$,reason:Y,errors:X}){super({name:Sw4,message:$});this[vw4]=!0,this.reason=Y,this.errors=X,this.lastError=X[X.length-1]}static isInstance($){return xX.hasMarker($,kw4)}};vw4=HT9;function zT9({warning:$,provider:Y,model:X}){let G=`AI SDK Warning (${Y} / ${X}):`;switch($.type){case"unsupported":{let J=`${G} The feature "${$.feature}" is not supported.`;if($.details)J+=` ${$.details}`;return J}case"compatibility":{let J=`${G} The feature "${$.feature}" is used in a compatibility mode.`;if($.details)J+=` ${$.details}`;return J}case"other":return`${G} ${$.message}`;default:return`${G} ${JSON.stringify($,null,2)}`}}var VT9="AI SDK Warning System: To turn off warning logging, set the AI_SDK_LOG_WARNINGS global to false.",lR4=!1,oc0=($)=>{if($.warnings.length===0)return;let Y=globalThis.AI_SDK_LOG_WARNINGS;if(Y===!1)return;if(typeof Y==="function"){Y($);return}if(!lR4)lR4=!0,console.info(VT9);for(let X of $.warnings)console.warn(zT9({warning:X,provider:$.provider,model:$.model}))};function FT9({provider:$,modelId:Y}){oc0({warnings:[{type:"compatibility",feature:"specificationVersion",details:"Using v2 specification compatibility mode. Some features may not be available."}],provider:$,model:Y})}function LT9($){if($.specificationVersion==="v3")return $;return FT9({provider:$.provider,modelId:$.modelId}),new Proxy($,{get(Y,X){if(X==="specificationVersion")return"v3";return Y[X]}})}function DT9($){if(typeof $!=="string"){if($.specificationVersion!=="v3"&&$.specificationVersion!=="v2"){let Y=$;throw new UT9({version:Y.specificationVersion,provider:Y.provider,modelId:Y.modelId})}return LT9($)}return NT9().embeddingModel($)}function NT9(){var $;return($=globalThis.AI_SDK_DEFAULT_PROVIDER)!=null?$:Mj9}function AT9($){if($==null)return;if(typeof $==="number")return $;return $.totalMs}var BT9="6.0.177",xw4=U.union([U.string(),U.instanceof(Uint8Array),U.instanceof(ArrayBuffer),U.custom(($)=>{var Y,X;return(X=(Y=globalThis.Buffer)==null?void 0:Y.isBuffer($))!=null?X:!1},{message:"Must be a Buffer"})]),nM=U.lazy(()=>U.union([U.null(),U.string(),U.number(),U.boolean(),U.record(U.string(),nM.optional()),U.array(nM)])),m$=U.record(U.string(),U.record(U.string(),nM.optional())),yw4=U.object({type:U.literal("text"),text:U.string(),providerOptions:m$.optional()}),OT9=U.object({type:U.literal("image"),image:U.union([xw4,U.instanceof(URL)]),mediaType:U.string().optional(),providerOptions:m$.optional()}),bw4=U.object({type:U.literal("file"),data:U.union([xw4,U.instanceof(URL)]),filename:U.string().optional(),mediaType:U.string(),providerOptions:m$.optional()}),ET9=U.object({type:U.literal("reasoning"),text:U.string(),providerOptions:m$.optional()}),MT9=U.object({type:U.literal("tool-call"),toolCallId:U.string(),toolName:U.string(),input:U.unknown(),providerOptions:m$.optional(),providerExecuted:U.boolean().optional()}),RT9=U.discriminatedUnion("type",[U.object({type:U.literal("text"),value:U.string(),providerOptions:m$.optional()}),U.object({type:U.literal("json"),value:nM,providerOptions:m$.optional()}),U.object({type:U.literal("execution-denied"),reason:U.string().optional(),providerOptions:m$.optional()}),U.object({type:U.literal("error-text"),value:U.string(),providerOptions:m$.optional()}),U.object({type:U.literal("error-json"),value:nM,providerOptions:m$.optional()}),U.object({type:U.literal("content"),value:U.array(U.union([U.object({type:U.literal("text"),text:U.string(),providerOptions:m$.optional()}),U.object({type:U.literal("media"),data:U.string(),mediaType:U.string()}),U.object({type:U.literal("file-data"),data:U.string(),mediaType:U.string(),filename:U.string().optional(),providerOptions:m$.optional()}),U.object({type:U.literal("file-url"),url:U.string(),providerOptions:m$.optional()}),U.object({type:U.literal("file-id"),fileId:U.union([U.string(),U.record(U.string(),U.string())]),providerOptions:m$.optional()}),U.object({type:U.literal("image-data"),data:U.string(),mediaType:U.string(),providerOptions:m$.optional()}),U.object({type:U.literal("image-url"),url:U.string(),providerOptions:m$.optional()}),U.object({type:U.literal("image-file-id"),fileId:U.union([U.string(),U.record(U.string(),U.string())]),providerOptions:m$.optional()}),U.object({type:U.literal("custom"),providerOptions:m$.optional()})]))})]),hw4=U.object({type:U.literal("tool-result"),toolCallId:U.string(),toolName:U.string(),output:RT9,providerOptions:m$.optional()}),qT9=U.object({type:U.literal("tool-approval-request"),approvalId:U.string(),toolCallId:U.string()}),PT9=U.object({type:U.literal("tool-approval-response"),approvalId:U.string(),approved:U.boolean(),reason:U.string().optional()}),wT9=U.object({role:U.literal("system"),content:U.string(),providerOptions:m$.optional()}),_T9=U.object({role:U.literal("user"),content:U.union([U.string(),U.array(U.union([yw4,OT9,bw4]))]),providerOptions:m$.optional()}),jT9=U.object({role:U.literal("assistant"),content:U.union([U.string(),U.array(U.union([yw4,bw4,ET9,MT9,hw4,qT9]))]),providerOptions:m$.optional()}),TT9=U.object({role:U.literal("tool"),content:U.array(U.union([hw4,PT9])),providerOptions:m$.optional()});U.union([wT9,_T9,jT9,TT9]);function gc0({operationId:$,telemetry:Y}){return{"operation.name":`${$}${(Y==null?void 0:Y.functionId)!=null?` ${Y.functionId}`:""}`,"resource.name":Y==null?void 0:Y.functionId,"ai.operationId":$,"ai.telemetry.functionId":Y==null?void 0:Y.functionId}}function IT9({model:$,settings:Y,telemetry:X,headers:G}){var J;return{"ai.model.provider":$.provider,"ai.model.id":$.modelId,...Object.entries(Y).reduce((Q,[W,K])=>{if(W==="timeout"){let Z=AT9(K);if(Z!=null)Q[`ai.settings.${W}`]=Z}else Q[`ai.settings.${W}`]=K;return Q},{}),...Object.entries((J=X==null?void 0:X.metadata)!=null?J:{}).reduce((Q,[W,K])=>{return Q[`ai.telemetry.metadata.${W}`]=K,Q},{}),...Object.entries(G!=null?G:{}).reduce((Q,[W,K])=>{if(K!==void 0)Q[`ai.request.headers.${W}`]=K;return Q},{})}}var CT9={startSpan(){return EX0},startActiveSpan($,Y,X,G){if(typeof Y==="function")return Y(EX0);if(typeof X==="function")return X(EX0);if(typeof G==="function")return G(EX0)}},EX0={spanContext(){return ST9},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},addLink(){return this},addLinks(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this}},ST9={traceId:"",spanId:"",traceFlags:0};function kT9({isEnabled:$=!1,tracer:Y}={}){if(!$)return CT9;if(Y)return Y;return JT9.getTracer("ai")}async function mc0({name:$,tracer:Y,attributes:X,fn:G,endWhenDone:J=!0}){return Y.startActiveSpan($,{attributes:await X},async(Q)=>{let W=pR4.active();try{let K=await pR4.with(W,()=>G(Q));if(J)Q.end();return K}catch(K){try{vT9(Q,K)}finally{Q.end()}throw K}})}function vT9($,Y){if(Y instanceof Error)$.recordException({name:Y.name,message:Y.message,stack:Y.stack}),$.setStatus({code:hX0.ERROR,message:Y.message});else $.setStatus({code:hX0.ERROR})}async function uM({telemetry:$,attributes:Y}){if(($==null?void 0:$.isEnabled)!==!0)return{};let X={};for(let[G,J]of Object.entries(Y)){if(J==null)continue;if(typeof J==="object"&&"input"in J&&typeof J.input==="function"){if(($==null?void 0:$.recordInputs)===!1)continue;let Q=await J.input();if(Q!=null)X[G]=Q;continue}if(typeof J==="object"&&"output"in J&&typeof J.output==="function"){if(($==null?void 0:$.recordOutputs)===!1)continue;let Q=await J.output();if(Q!=null)X[G]=Q;continue}X[G]=J}return X}function xT9({error:$,exponentialBackoffDelay:Y}){let X=$.responseHeaders;if(!X)return Y;let G,J=X["retry-after-ms"];if(J){let W=parseFloat(J);if(!Number.isNaN(W))G=W}let Q=X["retry-after"];if(Q&&G===void 0){let W=parseFloat(Q);if(!Number.isNaN(W))G=W*1000;else G=Date.parse(Q)-Date.now()}if(G!=null&&!Number.isNaN(G)&&0<=G&&(G<60000||G<Y))return G;return Y}var yT9=({maxRetries:$=2,initialDelayInMs:Y=2000,backoffFactor:X=2,abortSignal:G}={})=>async(J)=>fw4(J,{maxRetries:$,delayInMs:Y,backoffFactor:X,abortSignal:G});async function fw4($,{maxRetries:Y,delayInMs:X,backoffFactor:G,abortSignal:J},Q=[]){try{return await $()}catch(W){if(jC(W))throw W;if(Y===0)throw W;let K=Lw9(W),Z=[...Q,W],H=Z.length;if(H>Y)throw new cR4({message:`Failed after ${H} attempts. Last error: ${K}`,reason:"maxRetriesExceeded",errors:Z});if(W instanceof Error&&s7.isInstance(W)&&W.isRetryable===!0&&H<=Y)return await Vw9(xT9({error:W,exponentialBackoffDelay:X}),{abortSignal:J}),fw4($,{maxRetries:Y,delayInMs:G*X,backoffFactor:G,abortSignal:J},Z);if(H===1)throw W;throw new cR4({message:`Failed after ${H} attempts with non-retryable error: '${K}'`,reason:"errorNotRetryable",errors:Z})}}function bT9({maxRetries:$,abortSignal:Y}){if($!=null){if(!Number.isInteger($))throw new dR4({parameter:"maxRetries",value:$,message:"maxRetries must be an integer"});if($<0)throw new dR4({parameter:"maxRetries",value:$,message:"maxRetries must be >= 0"})}let X=$!=null?$:2;return{maxRetries:X,retry:yT9({maxRetries:X,abortSignal:Y})}}var hT9={};WT9(hT9,{array:()=>uT9,choice:()=>pT9,json:()=>dT9,object:()=>mT9,text:()=>gT9});function fT9($){let Y=["ROOT"],X=-1,G=null;function J(Z,H,z){switch(Z){case'"':{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_STRING");break}case"f":case"t":case"n":{X=H,G=H,Y.pop(),Y.push(z),Y.push("INSIDE_LITERAL");break}case"-":{Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"{":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_OBJECT_START");break}case"[":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_ARRAY_START");break}}}function Q(Z,H){switch(Z){case",":{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{X=H,Y.pop();break}}}function W(Z,H){switch(Z){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=H,Y.pop();break}}}for(let Z=0;Z<$.length;Z++){let H=$[Z];switch(Y[Y.length-1]){case"ROOT":J(H,Z,"FINISH");break;case"INSIDE_OBJECT_START":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}case"}":{X=Z,Y.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(H){case":":{Y.pop(),Y.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{J(H,Z,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{Q(H,Z);break}case"INSIDE_STRING":{switch(H){case'"':{Y.pop(),X=Z;break}case"\\":{Y.push("INSIDE_STRING_ESCAPE");break}default:X=Z}break}case"INSIDE_ARRAY_START":{switch(H){case"]":{X=Z,Y.pop();break}default:{X=Z,J(H,Z,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(H){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=Z,Y.pop();break}default:{X=Z;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{J(H,Z,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{Y.pop(),X=Z;break}case"INSIDE_NUMBER":{switch(H){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=Z;break}case"e":case"E":case"-":case".":break;case",":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z);if(Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);break}case"}":{if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);break}case"]":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z);break}default:{Y.pop();break}}break}case"INSIDE_LITERAL":{let V=$.substring(G,Z+1);if(!"false".startsWith(V)&&!"true".startsWith(V)&&!"null".startsWith(V)){if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);else if(Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z)}else X=Z;break}}}let K=$.slice(0,X+1);for(let Z=Y.length-1;Z>=0;Z--)switch(Y[Z]){case"INSIDE_STRING":{K+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{K+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{K+="]";break}case"INSIDE_LITERAL":{let z=$.substring(G,$.length);if("true".startsWith(z))K+="true".slice(z.length);else if("false".startsWith(z))K+="false".slice(z.length);else if("null".startsWith(z))K+="null".slice(z.length)}}return K}async function iX0($){if($===void 0)return{value:void 0,state:"undefined-input"};let Y=await HN({text:$});if(Y.success)return{value:Y.value,state:"successful-parse"};if(Y=await HN({text:fT9($)}),Y.success)return{value:Y.value,state:"repaired-parse"};return{value:void 0,state:"failed-parse"}}var gT9=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:$}){return $},async parsePartialOutput({text:$}){return{partial:$}},createElementStreamTransform(){return}}),mT9=({schema:$,name:Y,description:X})=>{let G=Al0($);return{name:"object",responseFormat:$X(G.jsonSchema).then((J)=>({type:"json",schema:J,...Y!=null&&{name:Y},...X!=null&&{description:X}})),async parseCompleteOutput({text:J},Q){let W=await HN({text:J});if(!W.success)throw new KN({message:"No object generated: could not parse the response.",cause:W.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});let K=await UN({value:W.value,schema:G});if(!K.success)throw new KN({message:"No object generated: response did not match schema.",cause:K.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});return K.value},async parsePartialOutput({text:J}){let Q=await iX0(J);switch(Q.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:Q.value}}},createElementStreamTransform(){return}}},uT9=({element:$,name:Y,description:X})=>{let G=Al0($);return{name:"array",responseFormat:$X(G.jsonSchema).then((J)=>{let{$schema:Q,...W}=J;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:W}},required:["elements"],additionalProperties:!1},...Y!=null&&{name:Y},...X!=null&&{description:X}}}),async parseCompleteOutput({text:J},Q){let W=await HN({text:J});if(!W.success)throw new KN({message:"No object generated: could not parse the response.",cause:W.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});let K=W.value;if(K==null||typeof K!=="object"||!("elements"in K)||!Array.isArray(K.elements))throw new KN({message:"No object generated: response did not match schema.",cause:new iM({value:K,cause:"response must be an object with an elements array"}),text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});for(let Z of K.elements){let H=await UN({value:Z,schema:G});if(!H.success)throw new KN({message:"No object generated: response did not match schema.",cause:H.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason})}return K.elements},async parsePartialOutput({text:J}){let Q=await iX0(J);switch(Q.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let W=Q.value;if(W==null||typeof W!=="object"||!("elements"in W)||!Array.isArray(W.elements))return;let K=Q.state==="repaired-parse"&&W.elements.length>0?W.elements.slice(0,-1):W.elements,Z=[];for(let H of K){let z=await UN({value:H,schema:G});if(z.success)Z.push(z.value)}return{partial:Z}}}},createElementStreamTransform(){let J=0;return new TransformStream({transform({partialOutput:Q},W){if(Q!=null)for(;J<Q.length;J++)W.enqueue(Q[J])}})}}},pT9=({options:$,name:Y,description:X})=>{return{name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:$}},required:["result"],additionalProperties:!1},...Y!=null&&{name:Y},...X!=null&&{description:X}}),async parseCompleteOutput({text:G},J){let Q=await HN({text:G});if(!Q.success)throw new KN({message:"No object generated: could not parse the response.",cause:Q.error,text:G,response:J.response,usage:J.usage,finishReason:J.finishReason});let W=Q.value;if(W==null||typeof W!=="object"||!("result"in W)||typeof W.result!=="string"||!$.includes(W.result))throw new KN({message:"No object generated: response did not match schema.",cause:new iM({value:W,cause:"response must be an object that contains a choice value."}),text:G,response:J.response,usage:J.usage,finishReason:J.finishReason});return W.result},async parsePartialOutput({text:G}){let J=await iX0(G);switch(J.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let Q=J.value;if(Q==null||typeof Q!=="object"||!("result"in Q)||typeof Q.result!=="string")return;let W=$.filter((K)=>K.startsWith(Q.result));if(J.state==="successful-parse")return W.includes(Q.result)?{partial:Q.result}:void 0;else return W.length===1?{partial:W[0]}:void 0}}},createElementStreamTransform(){return}}},dT9=({name:$,description:Y}={})=>{return{name:"json",responseFormat:Promise.resolve({type:"json",...$!=null&&{name:$},...Y!=null&&{description:Y}}),async parseCompleteOutput({text:X},G){let J=await HN({text:X});if(!J.success)throw new KN({message:"No object generated: could not parse the response.",cause:J.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});return J.value},async parsePartialOutput({text:X}){let G=await iX0(X);switch(G.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return G.value===void 0?void 0:{partial:G.value}}},createElementStreamTransform(){return}}};Pd({prefix:"aitxt",size:24});U.record(U.string(),nM.optional());Pd({prefix:"aitxt",size:24});U.record(U.string(),nM.optional());function iR4($,Y){if(Y<=0)throw Error("chunkSize must be greater than 0");let X=[];for(let G=0;G<$.length;G+=Y)X.push($.slice(G,G+Y));return X}async function cT9({model:$,values:Y,maxParallelCalls:X=1/0,maxRetries:G,abortSignal:J,headers:Q,providerOptions:W,experimental_telemetry:K}){let Z=DT9($),{maxRetries:H,retry:z}=bT9({maxRetries:G,abortSignal:J}),V=cX0(Q!=null?Q:{},`ai/${BT9}`),F=IT9({model:Z,telemetry:K,headers:V,settings:{maxRetries:H}}),L=kT9(K);return mc0({name:"ai.embedMany",attributes:uM({telemetry:K,attributes:{...gc0({operationId:"ai.embedMany",telemetry:K}),...F,"ai.values":{input:()=>Y.map((N)=>JSON.stringify(N))}}}),tracer:L,fn:async(N)=>{var D;let[A,B]=await Promise.all([Z.maxEmbeddingsPerCall,Z.supportsParallelCalls]);if(A==null||A===1/0){let{embeddings:w,usage:j,warnings:C,response:k,providerMetadata:S}=await z(()=>{return mc0({name:"ai.embedMany.doEmbed",attributes:uM({telemetry:K,attributes:{...gc0({operationId:"ai.embedMany.doEmbed",telemetry:K}),...F,"ai.values":{input:()=>Y.map((I)=>JSON.stringify(I))}}}),tracer:L,fn:async(I)=>{var v;let x=await Z.doEmbed({values:Y,abortSignal:J,headers:V,providerOptions:W}),y=x.embeddings,d=(v=x.usage)!=null?v:{tokens:NaN};return I.setAttributes(await uM({telemetry:K,attributes:{"ai.embeddings":{output:()=>y.map((u)=>JSON.stringify(u))},"ai.usage.tokens":d.tokens}})),{embeddings:y,usage:d,warnings:x.warnings,providerMetadata:x.providerMetadata,response:x.response}}})});return N.setAttributes(await uM({telemetry:K,attributes:{"ai.embeddings":{output:()=>w.map((I)=>JSON.stringify(I))},"ai.usage.tokens":j.tokens}})),oc0({warnings:C,provider:Z.provider,model:Z.modelId}),new nR4({values:Y,embeddings:w,usage:j,warnings:C,providerMetadata:S,responses:[k]})}let O=iR4(Y,A),E=[],M=[],R=[],q=0,_,P=iR4(O,B?X:1);for(let w of P){let j=await Promise.all(w.map((C)=>{return z(()=>{return mc0({name:"ai.embedMany.doEmbed",attributes:uM({telemetry:K,attributes:{...gc0({operationId:"ai.embedMany.doEmbed",telemetry:K}),...F,"ai.values":{input:()=>C.map((k)=>JSON.stringify(k))}}}),tracer:L,fn:async(k)=>{var S;let I=await Z.doEmbed({values:C,abortSignal:J,headers:V,providerOptions:W}),v=I.embeddings,x=(S=I.usage)!=null?S:{tokens:NaN};return k.setAttributes(await uM({telemetry:K,attributes:{"ai.embeddings":{output:()=>v.map((y)=>JSON.stringify(y))},"ai.usage.tokens":x.tokens}})),{embeddings:v,usage:x,warnings:I.warnings,providerMetadata:I.providerMetadata,response:I.response}}})})}));for(let C of j)if(E.push(...C.embeddings),M.push(...C.warnings),R.push(C.response),q+=C.usage.tokens,C.providerMetadata)if(!_)_={...C.providerMetadata};else for(let[k,S]of Object.entries(C.providerMetadata))_[k]={...(D=_[k])!=null?D:{},...S}}return N.setAttributes(await uM({telemetry:K,attributes:{"ai.embeddings":{output:()=>E.map((w)=>JSON.stringify(w))},"ai.usage.tokens":q}})),oc0({warnings:M,provider:Z.provider,model:Z.modelId}),new nR4({values:Y,embeddings:E,usage:{tokens:q},warnings:M,providerMetadata:_,responses:R})}})}var nR4=class{constructor($){this.values=$.values,this.embeddings=$.embeddings,this.usage=$.usage,this.warnings=$.warnings,this.providerMetadata=$.providerMetadata,this.responses=$.responses}};Pd({prefix:"aiobj",size:24});Pd({prefix:"aiobj",size:24});function gw4($){if(typeof $.content==="string")return[];if(Array.isArray($.content))return $.content;let Y=$.content?.parts;return Array.isArray(Y)?Y:[]}function fX0($){if(typeof $.content==="string")return $.content.length>0;let Y=gw4($);if(Y.length===0)return Boolean($.content?.content);return Y.some((X)=>!X.type?.startsWith("data-"))}function lT9($){if($.includes(",")){let X=$.split(",").map((G)=>G.trim()).filter(Boolean);if(X.length>=1){let G=X[0],J=X[X.length-1],Q=G.indexOf(":"),W=J.indexOf(":");return{startId:Q>0?G.slice(0,Q):G,endId:W>0?J.slice(W+1):J}}}let Y=$.indexOf(":");if(Y>0&&Y<$.length-1)return{startId:$.slice(0,Y),endId:$.slice(Y+1)};return null}async function Pl0($,Y,X){let G=Y.trim();if(!G)throw Error("Cursor is required");let J=lT9(G);if(J)return{hint:`The cursor "${Y}" looks like a range. Use one of the individual message IDs as the cursor instead: start="${J.startId}" or end="${J.endId}".`,...J};let K=(await(await $.getMemoryStore()).listMessagesById({messageIds:[G]})).messages.find((Z)=>Z.id===G)??null;if(!K)K=await iT9($,G,X);if(!K)throw Error(`Could not resolve cursor message: ${Y}`);if(X?.resourceId&&K.resourceId!==X.resourceId)throw Error(`Could not resolve cursor message: ${Y}`);if(X?.enforceThreadScope&&X.threadScope&&K.threadId!==X.threadScope)throw Error(`Could not resolve cursor message: ${Y}`);return K}async function iT9($,Y,X){if(X?.enforceThreadScope&&X.threadScope)return(await $.recall({threadId:X.threadScope,resourceId:X.resourceId,page:0,perPage:!1})).messages.find((Q)=>Q.id===Y)??null;if(!X?.resourceId)return null;let G=await $.listThreads({page:0,perPage:100,orderBy:{field:"updatedAt",direction:"DESC"},filter:{resourceId:X.resourceId}});for(let J of G.threads){let W=(await $.recall({threadId:J.id,resourceId:X.resourceId,page:0,perPage:!1})).messages.find((K)=>K.id===Y);if(W)return W}return null}async function nT9({memory:$,resourceId:Y,currentThreadId:X,page:G=0,limit:J=20,before:Q,after:W}){if(!Y)throw Error("Resource ID is required to list threads");let K=50,Z=Math.min(Math.max(J,1),K),H=!!(Q||W),z=Q?new Date(Q):null,V=W?new Date(W):null,F=await $.listThreads({filter:{resourceId:Y},page:H?0:G,perPage:H?!1:Z,orderBy:{field:"updatedAt",direction:"DESC"}}),L=F.threads;if(z)L=L.filter((A)=>A.createdAt<z);if(V)L=L.filter((A)=>A.createdAt>V);let N;if(H){let A=G*Z;N=A+Z<L.length,L=L.slice(A,A+Z)}else N=F.hasMore;if(L.length===0)return{threads:"No threads found matching the criteria.",count:0,page:G,hasMore:!1};let D=[];for(let A of L){let B=A.id===X,O=A.title||"(untitled)",E=IC(A.updatedAt),M=IC(A.createdAt),R=B?" \u2190 current":"";D.push(`- **${O}**${R}`),D.push(`  id: ${A.id}`),D.push(`  updated: ${E} | created: ${M}`)}return{threads:D.join(`
`),count:L.length,page:G,hasMore:N}}async function rT9({memory:$,resourceId:Y,currentThreadId:X,query:G,topK:J=10,maxTokens:Q=nX0,before:W,after:K,threadScope:Z}){if(!$.searchMessages)return{results:"Search is not configured. Enable it with `retrieval: { vector: true }` and configure a vector store and embedder on your Memory instance.",count:0};let H=20,z=Math.min(Math.max(J,1),H),V=Z||W||K?Math.max(z*3,z+10):z,F=Math.min(H,V),L=W?new Date(W):void 0,N=K?new Date(K):void 0,{results:D}=await $.searchMessages({query:G,resourceId:Y,topK:F,filter:{...Z?{threadId:Z}:{},...N?{observedAfter:N}:{},...L?{observedBefore:L}:{}}});if(D.length===0)return{results:"No matching messages found.",count:0};let A=[...new Set(D.map((_)=>_.threadId))],B=new Map;if($.getThreadById)await Promise.all(A.map(async(_)=>{let P=await $.getThreadById({threadId:_});if(P)B.set(_,P)}));let O=D.filter((_)=>{if(Z&&_.threadId!==Z)return!1;if(L&&_.observedAt&&_.observedAt>=L)return!1;if(N&&_.observedAt&&_.observedAt<=N)return!1;return!0});if(O.length===0)return{results:"No matching messages found.",count:0};let E=O.slice(0,z),R=E.map((_)=>{let P=B.get(_.threadId),w=P?.title||"(untitled)",j=_.threadId===X,C=j?"Current thread memory":"Older memory from another thread",k=j?"This result came from the current thread.":"This result came from an older memory generation in another thread.",S=`- thread: ${_.threadId}${P?` (${w})`:""}`,I=_.range?`- source: raw messages from ID ${_.range.split(":")[0]??"(unknown)"} through ID ${_.range.split(":")[1]??"(unknown)"}`:"- source: raw message range unavailable",v=P?`- thread updated: ${IC(P.updatedAt)}`:void 0,x=_.groupId?`- observation group: ${_.groupId}`:void 0,y=`- score: ${_.score.toFixed(2)}`,d=(_.text||"").trim()||"_Observation text unavailable._";return[`### ${C}`,"",k,S,I,v,x,y,"","```text",d,"```"].filter(Boolean).join(`
`)}).join(`

`),{text:q}=wl0(R,Q);return{results:q,count:E.length}}var aT9=30,sT9=100,oT9=20,rR4=4000,nX0=2000;function IC($){return $.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"Z")}function wl0($,Y,X){if(JG($)<=Y)return{text:$,wasTruncated:!1};let G=bM($,Y),J=X?` [${X} for more]`:"";return{text:G+J,wasTruncated:!0}}function tT9($){if($==="text")return sT9;if($==="tool-result"||$==="tool-call")return oT9;return aT9}function qC($,Y,X,G,J,Q){if(J==="high")return{messageId:$.id,partIndex:Y,role:$.role,type:X,text:G,fullText:G,toolName:Q};let W=`recall cursor="${$.id}" partIndex=${Y} detail="high"`,{text:K}=wl0(G,tT9(X),W);return{messageId:$.id,partIndex:Y,role:$.role,type:X,text:K,fullText:G,toolName:Q}}function gX0($,Y){let X=[];if(typeof $.content==="string")return X.push(qC($,0,"text",$.content,Y)),X;let G=gw4($);if(G.length>0)for(let J=0;J<G.length;J++){let Q=G[J],W=Q.type;if(W==="text"){let K=Q.text;if(K)X.push(qC($,J,"text",K,Y))}else if(W==="tool-invocation"){let K=Q.toolInvocation;if(K?.toolName){let Z=K.args!=null;if(K.state!=="partial-call"&&Z){let H=Y==="low"?"":`
${JSON.stringify(K.args,null,2)}`,z=`[Tool Call: ${K.toolName}]${H}`;X.push({messageId:$.id,partIndex:J,role:$.role,type:"tool-call",text:z,fullText:z,toolName:K.toolName})}if(K.state==="result"){let{value:H}=FX0(Q,K.result),z=sp(H,{maxTokens:rR4}),V=`[Tool Result: ${K.toolName}]
${z}`;X.push(qC($,J,"tool-result",V,Y,K.toolName))}}}else if(W==="tool-call"){let K=Q.toolName;if(K){let Z=Q.input??Q.args,H=Y==="low"||Z==null?"":`
${typeof Z==="string"?Z:JSON.stringify(Z,null,2)}`,z=`[Tool Call: ${K}]${H}`;X.push({messageId:$.id,partIndex:J,role:$.role,type:"tool-call",text:z,fullText:z,toolName:K})}}else if(W==="tool-result"){let K=Q.toolName;if(K){let Z=Q.output??Q.result,H=sp(Z,{maxTokens:rR4}),z=`[Tool Result: ${K}]
${H}`;X.push(qC($,J,"tool-result",z,Y,K))}}else if(W==="reasoning"){let K=Q.reasoning??Q.text;if(K)X.push(qC($,J,"reasoning",K,Y))}else if(W==="image"||W==="file"){let K=Q.filename,Z=K?`: ${K}`:"",H=`[${W==="image"?"Image":"File"}${Z}]`;X.push({messageId:$.id,partIndex:J,role:$.role,type:W,text:H,fullText:H})}else if(W?.startsWith("data-"));else if(W){let K=`[${W}]`;X.push({messageId:$.id,partIndex:J,role:$.role,type:W,text:K,fullText:K})}}else if($.content?.content)X.push(qC($,0,"text",$.content.content,Y));return X}function aR4($,Y){let X="",G=[];for(let J of $){if(J.messageId!==X){X=J.messageId;let W=Y.get(J.messageId),K=W?` (${IC(W)})`:"";if(G.length>0)G.push("");G.push(`**${J.role}${K}** [${J.messageId}]:`)}let Q=`[p${J.partIndex}]`;G.push(`  ${Q} ${J.text}`)}return G.join(`
`)}async function eT9({memory:$,threadId:Y,resourceId:X,after:G}){return(await $.recall({threadId:Y,resourceId:X,page:0,perPage:50,orderBy:{field:"createdAt",direction:"ASC"},filter:{dateRange:{start:G,startExclusive:!0}}})).messages.find(fX0)??null}var $I9=200,YI9=50;function XI9($){if($.role==="user"&&$.type==="text")return $I9;return YI9}function sR4($){if($.role==="user"&&$.type==="text")return 0;if($.type==="text"||$.type==="reasoning")return 1;if($.type==="tool-result")return 2;if($.type==="tool-call")return 3;return 4}function tc0($,Y,X){let G=aR4($,Y),J=JG(G);if(J>X.maxTokens)return{text:bM(G,X.maxTokens),truncated:!0,tokenOffset:J-X.maxTokens};let Q=$.map((z,V)=>({part:z,index:V})).filter(({part:z})=>z.text!==z.fullText).sort((z,V)=>sR4(z.part)-sR4(V.part));if(Q.length===0)return{text:G,truncated:!1,tokenOffset:0};let W=X.maxTokens-J;for(let{part:z,index:V}of Q){if(W<=0)break;let F=XI9(z),L=JG(z.fullText),N=JG(z.text),D=Math.min(L,F),A=D-N;if(A<=0)continue;if(A<=W&&D>=L)$[V]={...z,text:z.fullText},W-=A;else{let B=Math.min(N+W,F),O=`recall cursor="${z.messageId}" partIndex=${z.partIndex} detail="high"`,{text:E}=wl0(z.fullText,B,O),M=JG(E)-N;$[V]={...z,text:E},W-=M}}let K=aR4($,Y),Z=JG(K);if(Z<=X.maxTokens)return{text:K,truncated:!1,tokenOffset:0};return{text:bM(K,X.maxTokens),truncated:!0,tokenOffset:Z-X.maxTokens}}async function GI9({memory:$,threadId:Y,resourceId:X,cursor:G,partIndex:J,threadScope:Q,maxTokens:W=nX0}){if(!$||typeof $.getMemoryStore!=="function")throw Error("Memory instance is required for recall");if(!Y)throw Error("Thread ID is required for recall");let K=await Pl0($,G,{resourceId:X,threadScope:Q,enforceThreadScope:!1});if("hint"in K)throw Error(K.hint);let Z=gX0(K,"high");if(Z.length===0)throw Error(`Message ${G} has no visible content (it may be an internal system message). Try a neighboring message ID instead.`);let H=[...Z].reverse().find((F)=>F.partIndex===J);if(!H){let F=Z.map((N)=>N.partIndex).join(", "),L=Math.max(...Z.map((N)=>N.partIndex));if(J>L){let N=await eT9({memory:$,threadId:Y,resourceId:X,after:K.createdAt});if(N){let A=gX0(N,"high")[0];if(A){let O=`${`Part index ${J} not found in message ${G}; showing partIndex ${A.partIndex} from next message ${A.messageId}.

`}${A.text}`,E=bM(O,W),M=E!==O;return{text:E,messageId:A.messageId,partIndex:A.partIndex,role:A.role,type:A.type,truncated:M}}}}throw Error(`Part index ${J} not found in message ${G}. Available indices: ${F}`)}let z=bM(H.text,W),V=z!==H.text;return{text:z,messageId:H.messageId,partIndex:H.partIndex,role:H.role,type:H.type,truncated:V}}async function JI9({memory:$,threadId:Y,resourceId:X,cursor:G,page:J=1,limit:Q=20,detail:W="low",partType:K,toolName:Z,threadScope:H,maxTokens:z=nX0}){if(!$)throw Error("Memory instance is required for recall");if(!Y)throw Error("Thread ID is required for recall");if(typeof $.getMemoryStore!=="function")throw Error("recall requires a Memory instance with storage access");let V=50,F=20,N=Math.max(Math.min(J===0?1:J,V),-V),D=Math.min(Q,F),A=await Pl0($,G,{resourceId:X,threadScope:H,enforceThreadScope:!1});if("hint"in A)return{messages:A.hint,count:0,cursor:G,page:N,limit:D,detail:W,hasNextPage:!1,hasPrevPage:!1,truncated:!1,tokenOffset:0};let B=A,O=B.threadId&&B.threadId!==Y?B.threadId:void 0;if(O&&H)return{messages:`Cursor does not belong to the active thread. Expected thread "${Y}" but cursor "${G}" belongs to "${B.threadId}". Pass threadId="${B.threadId}" to browse that thread, or omit threadId and use this cursor directly in resource scope.`,count:0,cursor:G,page:N,limit:D,detail:W,hasNextPage:!1,hasPrevPage:!1,truncated:!1,tokenOffset:0};let E=O??Y;if(!E)throw Error("Thread ID is required for recall");let M=N>0,R=Math.max(Math.abs(N),1)-1,q=R*D,_=q+D+1,w=(await $.recall({threadId:E,resourceId:X,page:0,perPage:_,orderBy:{field:"createdAt",direction:M?"ASC":"DESC"},filter:{dateRange:M?{start:B.createdAt,startExclusive:!0}:{end:B.createdAt,endExclusive:!0}}})).messages.filter(fX0),j=w.length,C=j>q+D,k;if(M)k=w.slice(q,q+D);else{let u=Math.max(j-q,0),b=Math.max(u-D,0);k=w.slice(b,u)}let S=M?C:R>0,I=M?R>0:C,v=[],x=new Map;for(let u of k)x.set(u.id,u.createdAt),v.push(...gX0(u,W));if(Z)v=v.filter((u)=>(u.type==="tool-call"||u.type==="tool-result")&&u.toolName===Z);if(K)v=v.filter((u)=>u.type===K);if(W==="high"&&v.length>0){let u=v[0],b=v.filter((t)=>t.messageId===u.messageId),g=v.filter((t)=>t.messageId!==u.messageId),p=tc0([u],x,{maxTokens:z}),h=p.text,n=[];if(b.length>1){let t=b[1];n.push(`next part: partIndex=${t.partIndex} on cursor="${u.messageId}"`)}if(g.length>0){let t=g[0];n.push(`next message: partIndex=${t.partIndex} on cursor="${t.messageId}"`)}else if(S)n.push(`more messages available on page ${N+1}`);if(n.length>0)h+=`

High detail returns 1 part at a time. To continue: ${n.join(", or ")}.`;return{messages:h,count:1,cursor:G,page:N,limit:D,detail:W,hasNextPage:g.length>0||S,hasPrevPage:I,truncated:p.truncated,tokenOffset:p.tokenOffset}}let y=tc0(v,x,{maxTokens:z}),d=v.length===0?K||Z?"(no message parts matched the current filters)":"(no visible message parts found for this page)":"(no messages found)";return{messages:y.text||d,count:k.length,cursor:G,page:N,limit:D,detail:W,hasNextPage:S,hasPrevPage:I,truncated:y.truncated,tokenOffset:y.tokenOffset}}async function QI9({memory:$,threadId:Y,resourceId:X,page:G=1,limit:J=20,detail:Q="low",partType:W,toolName:K,anchor:Z="start",maxTokens:H=nX0}){if(!$)throw Error("Memory instance is required for recall");if(!Y)throw Error("Thread ID is required for recall");if(X&&$.getThreadById){let C=await $.getThreadById({threadId:Y});if(!C||C.resourceId!==X)throw Error("Thread not found")}let z=50,V=20,F=Math.max(Math.min(G,z),1),L=Math.min(Math.max(J,1),V),N=F-1,D=N*L+L+1,A=await $.recall({threadId:Y,resourceId:X,page:0,perPage:D,orderBy:{field:"createdAt",direction:Z==="end"?"DESC":"ASC"}}),B=Z==="end"?A.messages.slice(0,D).filter(fX0).reverse():A.messages.slice(0,D).filter(fX0),O=N*L,E=B.slice(O,O+L),M=B.length>O+E.length,R=E.length>0?Z==="end"?N>0:M:!1,q=E.length>0?Z==="end"?M:N>0:N>0,_=[],P=new Map;for(let C of E)P.set(C.id,C.createdAt),_.push(...gX0(C,Q));if(K)_=_.filter((C)=>(C.type==="tool-call"||C.type==="tool-result")&&C.toolName===K);if(W)_=_.filter((C)=>C.type===W);let w=tc0(_,P,{maxTokens:H}),j=E.length===0?N>0?`(no messages found on page ${F} for this thread)`:"(no messages in this thread)":W||K?"(no message parts matched the current filters)":"(no messages found)";return{messages:w.text||j,count:E.length,cursor:E[0]?.id||"",page:F,limit:L,detail:Q,hasNextPage:R,hasPrevPage:q,truncated:w.truncated,tokenOffset:w.tokenOffset}}var WI9=($,Y)=>{let G=(Y?.retrievalScope??"thread")==="resource";return X8({id:"recall",description:G?'Browse conversation history. Use mode="threads" to list all threads for the current user. Use mode="messages" (default) to browse messages in the current thread or pass threadId to browse another thread in the active resource. When mode="messages" has no cursor or threadId, it defaults to the current thread and says so at the top of the result. If you pass only a cursor, it must belong to the current thread. Use mode="search" to find messages by content across all threads.':`Browse conversation history in the current thread. Use mode="messages" (default) to page through messages near a cursor. Use mode="search" to find messages by content in this thread. Use mode="threads" to get the current thread's ID and title.`,inputSchema:U.object({...G?{mode:U.enum(["messages","threads","search"]).optional().describe('What to retrieve. "messages" (default) pages through message history. "threads" lists all threads for the current user. "search" finds messages by semantic similarity across all threads.'),threadId:U.string().min(1).optional().describe('Browse a different thread, or use "current" for the active thread. Use mode="threads" first to discover thread IDs.'),before:U.string().optional().describe('For mode="threads": only show threads created before this date. ISO 8601 or natural date string (e.g. "2026-03-15", "2026-03-10T00:00:00Z").'),after:U.string().optional().describe('For mode="threads": only show threads created after this date. ISO 8601 or natural date string (e.g. "2026-03-01", "2026-03-10T00:00:00Z").')}:{mode:U.enum(["messages","threads","search"]).optional().describe('What to retrieve. "messages" (default) pages through message history. "threads" returns info about the current thread. "search" finds messages by semantic similarity in this thread.')},query:U.string().min(1).optional().describe('Search query for mode="search". Finds messages semantically similar to this text.'),cursor:U.string().min(1).optional().describe('A message ID to use as the pagination cursor. For mode="messages", omit both cursor and threadId to browse the current thread. If only cursor is provided, it must belong to the current thread. Extract it from the start or end of an observation group range.'),anchor:U.enum(["start","end"]).optional().describe('For mode="messages" without a cursor, page from the start (oldest-first) or end (newest-first) of the thread. Defaults to "start".'),page:U.number().int().min(-50).max(50).optional().describe("Pagination offset. For messages: positive pages move forward from cursor, negative move backward. For threads: page number (0-indexed). 0 is treated as 1 for messages."),limit:U.number().int().positive().max(20).optional().describe("Maximum number of items to return per page. Defaults to 20."),detail:U.enum(["low","high"]).optional().describe('Detail level for messages. "low" (default) returns truncated text and tool names. "high" returns full content with tool args/results.'),partType:U.enum(["text","tool-call","tool-result","reasoning","image","file"]).optional().describe('Filter results to only include parts of this type. Only applies to mode="messages".'),toolName:U.string().min(1).optional().describe('Filter results to only include tool-call and tool-result parts matching this tool name. Only applies to mode="messages".'),partIndex:U.number().int().min(0).optional().describe("Fetch a single part from the cursor message by its positional index. When provided, returns only that part at high detail. Indices are shown as [p0], [p1], etc. in recall results.")}),execute:async({mode:Q,query:W,cursor:K,threadId:Z,anchor:H,page:z,limit:V,detail:F,partType:L,toolName:N,partIndex:D,before:A,after:B},O)=>{let E=O?.memory,M=O?.agent?.threadId,R=O?.agent?.resourceId,q=Z==="current"?M:Z;if(!E)throw Error("Memory instance is required for recall");if(Z==="current"&&!M)throw Error("Could not resolve current thread.");if(Q==="search"){if(!W)throw Error('query is required for mode="search"');if(!R)throw Error("Resource ID is required for recall");return rT9({memory:E,resourceId:R,currentThreadId:M||void 0,query:W,topK:V??10,before:A,after:B,threadScope:!G?M||void 0:q||void 0})}if(Q==="threads"){if(!G||Z==="current"){if(!M||!E.getThreadById)return{error:"Could not resolve current thread."};let x=await E.getThreadById({threadId:M});if(!x)return{error:"Could not resolve current thread."};if(G&&R&&x.resourceId!==R)throw Error("Thread does not belong to the active resource");return{threads:`- **${x.title||"(untitled)"}** \u2190 current
  id: ${x.id}
  updated: ${IC(x.updatedAt)} | created: ${IC(x.createdAt)}`,count:1,page:0,hasMore:!1}}if(!R)throw Error("Resource ID is required for recall");return nT9({memory:E,resourceId:R,currentThreadId:M||"",page:z??0,limit:V??20,before:A,after:B})}let _=G&&!Z&&!K&&Boolean(M),P=_?`threadId wasn't passed so used default ${M}.

`:"",w=Z||(_?"current":void 0),j=w==="current"?M:w,C=typeof j==="string"&&j.length>0,k=typeof K==="string"&&K.length>0;if(!C&&!k)throw Error('Either cursor or threadId is required for mode="messages"');let S,I;if(!G)S=M,I=M||void 0;else if(C){if(!R)throw Error("Resource ID is required for recall");if(!E.getThreadById)throw Error("Memory instance cannot verify thread access for recall");let v=await E.getThreadById({threadId:j});if(!v||v.resourceId!==R)throw Error("Thread does not belong to the active resource");S=v.id,I=v.id}else S=M,I=M||void 0;if(k&&!C&&!M){if(!G)throw Error("Current thread is required when browsing by cursor");let v=await Pl0(E,K,{resourceId:R});if("hint"in v)return{messages:v.hint,count:0,cursor:K,page:z??1,limit:Math.min(V??20,20),detail:F??"low",hasNextPage:!1,hasPrevPage:!1,truncated:!1,tokenOffset:0};S=v.threadId}if(!S)throw Error("Thread ID is required for recall");if(!K){let v=await QI9({memory:E,threadId:S,resourceId:G?R:void 0,page:z??1,limit:V??20,detail:F??"low",partType:L,toolName:N,anchor:H??"start"});if(P)return{...v,messages:`${P}${v.messages}`};return v}if(D!==void 0&&D!==null)return GI9({memory:E,threadId:S,resourceId:G?R:void 0,cursor:K,partIndex:D,threadScope:I});return JI9({memory:E,threadId:S,resourceId:G?R:void 0,cursor:K,page:z,limit:V,detail:F??"low",partType:L,toolName:N,threadScope:I})}})};function mw4($,Y){if(!Y||typeof Y!=="object"||Object.keys(Y).length===0)return $&&typeof $==="object"?{...$}:{};if(!$||typeof $!=="object")return Y;let X={...$};for(let G of Object.keys(Y)){let J=Y[G],Q=X[G];if(J===null)delete X[G];else if(Array.isArray(J))X[G]=J;else if(typeof J==="object"&&J!==null&&typeof Q==="object"&&Q!==null&&!Array.isArray(Q))X[G]=mw4(Q,J);else X[G]=J}return X}function mX0($,Y){if(Array.isArray($)){let X=Y.items??{};return $.map((G)=>mX0(G,X))}if(typeof $==="object"&&$!==null){let X=Y.properties??{},G=Y.required??[],J={};for(let[Q,W]of Object.entries($)){if(W===null&&!G.includes(Q))continue;J[Q]=mX0(W,X[Q]??{})}return J}return $}var KI9=($)=>{let Y=$?.workingMemory?.schema,X=U.object({memory:U.string().describe("The Markdown formatted working memory content to store. This MUST be a string. Never pass an object.")});if(Y){let Q=z5(Y)?Y:Q4(Y),W=$6(Q,{io:"input"});delete W.$schema;let K=Q4({$schema:"http://json-schema.org/draft-07/schema#",type:"object",description:"The JSON formatted working memory content to store.",properties:{memory:W},required:["memory"]});X={"~standard":{version:1,vendor:"mastra",validate:(Z)=>{let H=K["~standard"].validate(Z);if(H instanceof Promise)return H.then((z)=>{if(!("issues"in z)||!z.issues)return z;if(!Z||typeof Z!=="object"||Array.isArray(Z)||"memory"in Z)return z;return K["~standard"].validate({memory:mX0(Z,W)})});if(!("issues"in H)||!H.issues)return H;if(!Z||typeof Z!=="object"||Array.isArray(Z)||"memory"in Z)return H;return K["~standard"].validate({memory:mX0(Z,W)})},jsonSchema:{input:(Z)=>K["~standard"].jsonSchema.input(Z),output:(Z)=>K["~standard"].jsonSchema.output(Z)}}}}let G=Boolean(Y);return X8({id:"update-working-memory",description:Y?"Update the working memory with new information. Data is merged with existing memory - only include fields you want to add or update. To preserve existing data, omit the field entirely. Arrays are replaced entirely when provided, so pass the complete array or omit it to keep the existing values.":"Update the working memory with new information. Any data not included will be overwritten. Always pass data as string to the memory field. Never pass an object.",inputSchema:X,execute:async(Q,W)=>{let K=W?.agent?.threadId,Z=W?.agent?.resourceId,H=W?.memory;if(!H)throw Error("Memory instance is required for working memory updates");let z=$?.workingMemory?.scope||"resource";if(z==="thread"&&!K)throw Error("Thread ID is required for thread-scoped working memory updates");if(z==="resource"&&!Z)throw Error("Resource ID is required for resource-scoped working memory updates");if(K){let F=await H.getThreadById({threadId:K});if(!F)F=await H.createThread({threadId:K,resourceId:Z,memoryConfig:$});if(F.resourceId&&Z&&F.resourceId!==Z)throw Error(`Thread with id ${K} resourceId does not match the current resourceId ${Z}`)}let V;if(G){let F=await H.getWorkingMemory({threadId:K,resourceId:Z,memoryConfig:$}),L=null;if(F)try{L=typeof F==="string"?JSON.parse(F):F}catch{L=null}let N=Q.memory;if(N===void 0||N===null)return{success:!0,message:"No memory data provided, existing memory unchanged."};let D;if(typeof N==="string")try{D=JSON.parse(N)}catch(B){let O=B instanceof Error?B.message:String(B);throw Error(`Failed to parse working memory input as JSON: ${O}. Raw input: ${N.length>500?N.slice(0,500)+"...":N}`)}else D=N;let A=mw4(L,D);V=JSON.stringify(A)}else{let F=Q.memory;V=typeof F==="string"?F:JSON.stringify(F);let L=await H.getWorkingMemory({threadId:K,resourceId:Z,memoryConfig:$});if(L){let N=await H.getWorkingMemoryTemplate({memoryConfig:$});if(N?.content){let D=V.replace(/\s+/g," ").trim(),A=N.content.replace(/\s+/g," ").trim(),B=L.replace(/\s+/g," ").trim();if(D===A&&B!==A)return{success:!1,message:"Attempted to replace existing working memory with empty template. Update skipped to prevent data loss."}}}}return await H.updateWorkingMemory({threadId:K,resourceId:Z,workingMemory:V,memoryConfig:$}),{success:!0}}})},ZI9=($)=>{return X8({id:"update-working-memory",description:"Update the working memory with new information.",inputSchema:U.object({newMemory:U.string().optional().describe(`The ${$.workingMemory?.schema?"JSON":"Markdown"} formatted working memory content to store`),searchString:U.string().optional().describe("The working memory string to find. Will be replaced with the newMemory string. If this is omitted or doesn't exist, the newMemory string will be appended to the end of your working memory. Replacing single lines at a time is encouraged for greater accuracy. If updateReason is not 'append-new-memory', this search string must be provided or the tool call will be rejected."),updateReason:U.enum(["append-new-memory","clarify-existing-memory","replace-irrelevant-memory"]).optional().describe("The reason you're updating working memory. Passing any value other than 'append-new-memory' requires a searchString to be provided. Defaults to append-new-memory")}),execute:async(Y,X)=>{let G=X?.agent?.threadId,J=X?.agent?.resourceId,Q=X?.memory;if(!Q)throw Error("Memory instance is required for working memory updates");let W=$.workingMemory?.scope||"resource";if(W==="thread"&&!G)throw Error("Thread ID is required for thread-scoped working memory updates");if(W==="resource"&&!J)throw Error("Resource ID is required for resource-scoped working memory updates");if(G){let H=await Q.getThreadById({threadId:G});if(!H)H=await Q.createThread({threadId:G,resourceId:J,memoryConfig:$});if(H.resourceId&&J&&H.resourceId!==J)throw Error(`Thread with id ${G} resourceId does not match the current resourceId ${J}`)}let K=Y.newMemory||"";if(!Y.updateReason)Y.updateReason="append-new-memory";if(Y.searchString&&$.workingMemory?.scope==="resource"&&Y.updateReason==="replace-irrelevant-memory")Y.searchString=void 0;if(Y.updateReason==="append-new-memory"&&Y.searchString)Y.searchString=void 0;if(Y.updateReason!=="append-new-memory"&&!Y.searchString)return{success:!1,reason:`updateReason was ${Y.updateReason} but no searchString was provided. Unable to replace undefined with "${Y.newMemory}"`};let Z=await Q.__experimental_updateWorkingMemoryVNext({threadId:G,resourceId:J,workingMemory:K,searchString:Y.searchString,memoryConfig:$});if(Z)return Z;return{success:!0}}})},uX0="<working_memory>",ec0="</working_memory>",UI9="dynamicAgentsMdReminder";function Yd($){return typeof $==="object"&&$!==null}function oR4($){let Y="",X=0;while(X<$.length){let G=$.indexOf(uX0,X);if(G===-1){Y+=$.substring(X);break}Y+=$.substring(X,G);let J=$.indexOf(ec0,G+uX0.length);if(J===-1){Y+=$.substring(G);break}X=J+ec0.length}return Y}function HI9($){let Y=$.indexOf(uX0);if(Y===-1)return null;let X=Y+uX0.length,G=$.indexOf(ec0,X);if(G===-1)return null;return $.substring(X,G)}function zI9($){if(!Yd($.content))return!1;let Y=$.content.metadata;if($.role==="signal")return Yd(Y)&&Yd(Y.signal)&&Y.signal.type==="system-reminder";if($.role!=="user")return!1;if(Yd(Y)&&(Yd(Y.systemReminder)||(UI9 in Y)))return!0;let X=$.content.parts.find((G)=>G.type==="text");return typeof X?.text==="string"&&X.text.startsWith("<system-reminder")}function VI9($,Y){if(Y)return $;return $.filter((X)=>!zI9(X))}function Xd($){if($===!0)return{model:"google/gemini-2.5-flash"};if($===!1||$===void 0)return;if(typeof $==="object"&&$.enabled===!1)return;return $}var FI9=4,LI9={before:1,after:1},DI9=4,MX0=100,uw4=class extends Ug0{_omEngine;_omEngineInstance;_mastraInstance;get omEngine(){if(!this._omEngine)this._omEngine=this._initOMEngine().then(($)=>{if(this._omEngineInstance=$,$&&this._mastraInstance)$.__registerMastra(this._mastraInstance);return $});return this._omEngine}__registerMastra($){if(super.__registerMastra($),this._mastraInstance=$,this._omEngineInstance)this._omEngineInstance.__registerMastra($);else this._omEngine?.then((Y)=>Y?.__registerMastra($))}constructor($={}){super({name:"Memory",...$});let Y=this.getMergedThreadConfig({workingMemory:$.options?.workingMemory||{enabled:!1,template:this.defaultWorkingMemoryTemplate},observationalMemory:$.options?.observationalMemory});this.threadConfig=Y;let X=Xd(Y.observationalMemory);if(X?.retrieval&&typeof X.retrieval==="object"&&X.retrieval.vector){if(!this.vector)throw Error("`retrieval: { vector: true }` requires a vector store. Pass a `vector` option to your Memory instance.");if(!this.embedder)throw Error("`retrieval: { vector: true }` requires an embedder. Pass an `embedder` option to your Memory instance.")}}async getMemoryStore(){let $=await this.storage.getStore("memory");if(!$)throw Error(`Memory storage domain is not available on ${this.storage.constructor.name}`);return $}async listMessagesByResourceId($){return(await this.getMemoryStore()).listMessagesByResourceId($)}async validateThreadIsOwnedByResource($,Y,X){let G=typeof X?.semanticRecall==="object"&&X?.semanticRecall?.scope!=="thread"||X.semanticRecall===!0,J=await this.getThreadById({threadId:$});if(!J&&!G)throw Error(`No thread found with id ${$}`);if(J&&J.resourceId!==Y)throw Error(`Thread with id ${$} is for resource with id ${J.resourceId} but resource ${Y} was queried.`)}createMemorySpan($,Y,X,G){let J=Y?.tracingContext?.currentSpan;if(!J)return;return J.createChildSpan({type:bz.MEMORY_OPERATION,name:`memory: ${$}`,entityType:J6.MEMORY,entityName:"Memory",input:X,attributes:{operationType:$,...G}})}async recall($){let{threadId:Y,resourceId:X,perPage:G,page:J,orderBy:Q,threadConfig:W,vectorSearchString:K,includeSystemReminders:Z,filter:H}=$,z=this.getMergedThreadConfig(W||{}),V=Boolean(z.semanticRecall),F=this.createMemorySpan("recall",$.observabilityContext,{threadId:Y,resourceId:X,vectorSearchString:K},{semanticRecallEnabled:V,lastMessages:z.lastMessages});try{if(X)await this.validateThreadIsOwnedByResource(Y,X,z);let L=G!==void 0?G:z.lastMessages,N=z.lastMessages===!1&&G===void 0,D=!Q&&L!==!1,A=D?{field:"createdAt",direction:"DESC"}:Q,B=[];this.logger.debug("Memory recall",{threadId:Y,perPage:L,page:J,orderBy:A,hasWorkingMemorySchema:Boolean(z.workingMemory?.schema),workingMemoryEnabled:z.workingMemory?.enabled,semanticRecallEnabled:V,historyDisabledByConfig:N});let O=LI9,E=DI9,M=typeof z?.semanticRecall==="boolean"?{topK:E,messageRange:O}:{topK:z?.semanticRecall?.topK??E,messageRange:z?.semanticRecall?.messageRange??O},R=typeof z?.semanticRecall==="object"&&z?.semanticRecall?.scope!=="thread"||z.semanticRecall===!0;if(R&&!X&&z?.semanticRecall&&K)throw Error("Memory error: Resource-scoped semantic recall is enabled but no resourceId was provided. Either provide a resourceId or explicitly set semanticRecall.scope to 'thread'.");let q;if(N&&(!z.semanticRecall||!K||!this.vector)){let d={messages:[],usage:void 0,total:0,page:J??0,perPage:0,hasMore:!1};return F?.end({output:{success:!0},attributes:{messageCount:0}}),d}if(z?.semanticRecall&&K&&this.vector){let d=await this.embedMessageContent(K);q=d.usage;let{embeddings:u,dimension:b}=d,{indexName:g}=await this.createEmbeddingIndex(b,z);await Promise.all(u.map(async(p)=>{if(typeof this.vector>"u")throw Error(`Tried to query vector index ${g} but this Memory instance doesn't have an attached vector db.`);let h=R?{resource_id:X}:{thread_id:Y},n=typeof z.semanticRecall==="object"?z.semanticRecall.filter:void 0,t=n?{$and:[h,n]}:h;B.push(...await this.vector.query({indexName:g,queryVector:p,topK:M.topK,filter:t}))}))}let _=await this.getMemoryStore(),P=N?0:L,w=await _.listMessages({threadId:Y,resourceId:X,perPage:P,page:J,orderBy:A,filter:H,...B?.length?{include:B.map((d)=>({id:d.metadata?.message_id,threadId:d.metadata?.thread_id,withNextMessages:typeof M.messageRange==="number"?M.messageRange:M.messageRange.after,withPreviousMessages:typeof M.messageRange==="number"?M.messageRange:M.messageRange.before}))}:{}}),j=D?w.messages.reverse():w.messages,C=new l6({threadId:Y,resourceId:X}).add(j,"memory"),k=VI9(C.get.all.db(),Z),{total:S,page:I,perPage:v,hasMore:x}=w,y={messages:k,usage:q,total:S,page:I,perPage:v,hasMore:x};return F?.end({output:{success:!0},attributes:{messageCount:k.length,embeddingTokens:q?.tokens,vectorResultCount:B.length}}),y}catch(L){throw F?.error({error:L,endSpan:!0}),L}}async getThreadById({threadId:$,resourceId:Y}){return(await this.getMemoryStore()).getThreadById({threadId:$,resourceId:Y})}async listThreads($){return(await this.getMemoryStore()).listThreads($)}async handleWorkingMemoryFromMetadata({workingMemory:$,resourceId:Y,memoryConfig:X}){let G=this.getMergedThreadConfig(X||{});if(G.workingMemory?.enabled){if((G.workingMemory.scope||"resource")==="resource"&&Y)await(await this.getMemoryStore()).updateResource({resourceId:Y,workingMemory:$})}}async saveThread({thread:$,memoryConfig:Y}){let G=await(await this.getMemoryStore()).saveThread({thread:$});if($.metadata?.workingMemory&&typeof $.metadata.workingMemory==="string"&&$.resourceId)await this.handleWorkingMemoryFromMetadata({workingMemory:$.metadata.workingMemory,resourceId:$.resourceId,memoryConfig:Y});return G}async updateThread({id:$,title:Y,metadata:X,memoryConfig:G}){let Q=await(await this.getMemoryStore()).updateThread({id:$,title:Y,metadata:X});if(X?.workingMemory&&typeof X.workingMemory==="string"&&Q.resourceId)await this.handleWorkingMemoryFromMetadata({workingMemory:X.workingMemory,resourceId:Q.resourceId,memoryConfig:G});return Q}async deleteThread($){let Y=await this.getMemoryStore(),X=await Y.getThreadById({threadId:$});if(await Y.deleteThread({threadId:$}),X?.resourceId&&Y.supportsObservationalMemory)await Y.clearObservationalMemory($,X.resourceId);if(this.vector)this.deleteThreadVectors($)}async getMemoryVectorIndexes(){if(!this.vector)return[];let Y=`memory${this.vector.indexSeparator??"_"}messages`;return(await this.vector.listIndexes()).filter((G)=>G.startsWith(Y))}async deleteThreadVectors($){try{let Y=await this.getMemoryVectorIndexes();await Promise.all(Y.map(async(X)=>{try{await this.vector.deleteVectors({indexName:X,filter:{thread_id:$}})}catch{this.logger.debug("Failed to delete vectors for thread, skipping",{threadId:$,indexName:X})}}))}catch{this.logger.debug("Failed to clean up vectors for thread",{threadId:$})}}async updateWorkingMemory({threadId:$,resourceId:Y,workingMemory:X,memoryConfig:G,observabilityContext:J}){let Q=this.getMergedThreadConfig(G||{});if(!Q.workingMemory?.enabled)throw Error("Working memory is not enabled for this memory instance");let W=this.createMemorySpan("update",J,{threadId:$,resourceId:Y},{workingMemoryEnabled:!0});try{let K=Q.workingMemory.scope||"resource";if(K==="resource"&&!Y)throw Error("Memory error: Resource-scoped working memory is enabled but no resourceId was provided. Either provide a resourceId or explicitly set workingMemory.scope to 'thread'.");let Z=K==="resource"?`resource-${Y}`:`thread-${$}`,H=this.updateWorkingMemoryMutexes.has(Z)?this.updateWorkingMemoryMutexes.get(Z):new AX0;this.updateWorkingMemoryMutexes.set(Z,H);let z=await H.acquire();try{let V=await this.getMemoryStore();if(K==="resource"&&Y)await V.updateResource({resourceId:Y,workingMemory:X});else{let F=await this.getThreadById({threadId:$});if(!F)throw Error(`Thread ${$} not found`);await V.updateThread({id:$,title:F.title||"",metadata:{...F.metadata,workingMemory:X}})}}finally{z()}W?.end({output:{success:!0}})}catch(K){throw W?.error({error:K,endSpan:!0}),K}}updateWorkingMemoryMutexes=new Map;async __experimental_updateWorkingMemoryVNext({threadId:$,resourceId:Y,workingMemory:X,searchString:G,memoryConfig:J}){let Q=this.getMergedThreadConfig(J||{});if(!Q.workingMemory?.enabled)throw Error("Working memory is not enabled for this memory instance");let W=J?.workingMemory?.scope==="resource"?`resource-${Y}`:`thread-${$}`,K=this.updateWorkingMemoryMutexes.has(W)?this.updateWorkingMemoryMutexes.get(W):new AX0;this.updateWorkingMemoryMutexes.set(W,K);let Z=await K.acquire();try{let H=await this.getWorkingMemory({threadId:$,resourceId:Y,memoryConfig:J})||"",z=await this.getWorkingMemoryTemplate({memoryConfig:J}),V="",F=typeof z?.content==="string"?z.content:null,L=(O)=>O.replace(/\s+/g," ").trim(),N=L(X),D=F?L(F):"";if(H)if(G&&H?.includes(G))X=H.replace(G,X),V="found and replaced searchString with newMemory";else if(H.includes(X)||F?.trim()===X.trim()||N===D)return{success:!1,reason:"attempted to insert duplicate data into working memory. this entry was skipped"};else{if(N===D)return{success:!1,reason:"attempted to append empty template to working memory. this entry was skipped"};if(G)V="attempted to replace working memory string that doesn't exist. Appending to working memory instead.";else V="appended newMemory to end of working memory";X=H+`
${X}`}else if(X===F||N===D)return{success:!1,reason:"try again when you have data to add. newMemory was equal to the working memory template"};else V="started new working memory";if(F){X=X.replaceAll(F,"");let O=F.replace(/\r\n/g,`
`),E=F.replace(/\n/g,`\r
`);X=X.replaceAll(O,""),X=X.replaceAll(E,"")}let A=Q.workingMemory.scope||"resource";if(A==="resource"&&!Y)throw Error("Memory error: Resource-scoped working memory is enabled but no resourceId was provided. Either provide a resourceId or explicitly set workingMemory.scope to 'thread'.");let B=await this.getMemoryStore();if(A==="resource"&&Y){if(await B.updateResource({resourceId:Y,workingMemory:X}),V)return{success:!0,reason:V}}else{let O=await this.getThreadById({threadId:$});if(!O)throw Error(`Thread ${$} not found`);await B.updateThread({id:$,title:O.title||"",metadata:{...O.metadata,workingMemory:X}})}return{success:!0,reason:V}}catch(H){return this.logger.error(H instanceof Error?H.stack||H.message:JSON.stringify(H)),{success:!1,reason:"Tool error."}}finally{Z()}}chunkText($,Y=4096){let X=Y*FI9,G=[],J="",Q=$.split(/\s+/);for(let W of Q){let K=J?" "+W:W;if(J.length+K.length>X)G.push(J),J=W;else J+=K}if(J)G.push(J);return G}hasher=qE();embeddingCache=new Map;firstEmbed;async embedMessageContent($){let Y=(await this.hasher).h32($),X=this.embeddingCache.get(Y);if(X)return this.logger.debug("Embedding cache hit",{contentHash:Y,chunks:X.chunks.length}),X;let G=this.chunkText($);if(typeof this.embedder>"u")throw Error("Tried to embed message content but this Memory instance doesn't have an attached embedder.");let J=this.embedder.provider==="fastembed";if(J&&this.firstEmbed instanceof Promise)await this.firstEmbed;let Q;switch(this.embedder.specificationVersion){case"v3":Q=cT9;break;case"v2":Q=oP9;break;default:Q=fE9;break}let K=Q({values:G,maxRetries:3,model:this.embedder,...this.embedderOptions||{}});if(J&&!this.firstEmbed)this.firstEmbed=K;let{embeddings:Z,usage:H}=await K,z={embeddings:Z,chunks:G,usage:H,dimension:Z[0]?.length};return this.embeddingCache.set(Y,z),z}async saveMessages({messages:$,memoryConfig:Y,observabilityContext:X}){let G=this.createMemorySpan("save",X,void 0,{messageCount:$.length});try{let J=$.filter((V)=>V.role!=="system").map((V)=>{return this.updateMessageToHideWorkingMemoryV2(V)}).filter((V)=>Boolean(V)),Q=this.getMergedThreadConfig(Y),W=new l6({generateMessageId:()=>this.generateId()}).add(J,"memory").get.all.db(),K=await this.getMemoryStore(),Z=await K.saveMessages({messages:W}),H=0;if(this.vector&&Q.semanticRecall){let V=new Map;J.forEach((D)=>{if(D.threadId){if(!V.has(D.threadId))V.set(D.threadId,[]);V.get(D.threadId).push(D)}});let F=new Map;await Promise.all(Array.from(V.keys()).map(async(D)=>{try{let A=await K.getThreadById({threadId:D});if(A?.metadata)F.set(D,A.metadata)}catch(A){let B=A instanceof Error?A.message:String(A);throw Error(`Could not fetch metadata for thread ${D} while saving semantic recall embeddings: ${B}`)}}));let L=[],N;if(await Promise.all(J.map(async(D)=>{let A=null;if(D.content.content&&typeof D.content.content==="string"&&D.content.content.trim()!=="")A=D.content.content;else if(D.content.parts&&D.content.parts.length>0){let E=D.content.parts.filter((M)=>M.type==="text").map((M)=>M.text).join(" ").trim();if(E)A=E}if(!A)return;let B=await this.embedMessageContent(A);if(N=B.dimension,B.usage?.tokens)H+=B.usage.tokens;let O=D.threadId?F.get(D.threadId)||{}:{};L.push({embeddings:B.embeddings,metadata:B.chunks.map(()=>({...O,message_id:D.id,thread_id:D.threadId,resource_id:D.resourceId}))})})),L.length>0&&N!==void 0){if(typeof this.vector>"u")throw Error("Tried to upsert embeddings but this Memory instance doesn't have an attached vector db.");let{indexName:D}=await this.createEmbeddingIndex(N,Q),A=[],B=[];for(let O of L)A.push(...O.embeddings),B.push(...O.metadata);await this.vector.upsert({indexName:D,vectors:A,metadata:B})}}let z={...Z,usage:H>0?{tokens:H}:void 0};return G?.end({output:{success:!0},attributes:{messageCount:W.length,embeddingTokens:z.usage?.tokens,semanticRecallEnabled:Boolean(Q.semanticRecall)}}),z}catch(J){throw G?.error({error:J,endSpan:!0}),J}}updateMessageToHideWorkingMemoryV2($){let Y={...$};if($.content&&typeof $.content==="object"&&!Array.isArray($.content))Y.content={...$.content};if(typeof Y.content?.content==="string"&&Y.content.content.length>0)Y.content.content=oR4(Y.content.content).trim();if(Array.isArray(Y.content?.parts)){if(Y.content.parts=Y.content.parts.filter((X)=>{if(X?.type==="tool-invocation")return X.toolInvocation?.toolName!=="updateWorkingMemory";return!0}).map((X)=>{if(X?.type==="text"){let G=typeof X.text==="string"?X.text:"";return{...X,text:oR4(G).trim()}}return X}),Y.content.parts.length===0){if(!(typeof Y.content.content==="string"&&Y.content.content.trim().length>0))return null}}return Y}parseWorkingMemory($){if(!this.threadConfig.workingMemory?.enabled)return null;return HI9($)?.trim()??null}async getWorkingMemory({threadId:$,resourceId:Y,memoryConfig:X}){let G=this.getMergedThreadConfig(X||{});if(!G.workingMemory?.enabled)return null;let J=G.workingMemory.scope||"resource",Q=null;if(J==="resource"&&!Y)throw Error("Memory error: Resource-scoped working memory is enabled but no resourceId was provided. Either provide a resourceId or explicitly set workingMemory.scope to 'thread'.");if(J==="resource"&&Y)Q=(await(await this.getMemoryStore()).getResourceById({resourceId:Y}))?.workingMemory||null;else Q=(await this.getThreadById({threadId:$}))?.metadata?.workingMemory;if(!Q)return null;return Q}async getWorkingMemoryTemplate({memoryConfig:$}){let Y=this.getMergedThreadConfig($);if(!Y.workingMemory?.enabled)return null;if(Y.workingMemory?.schema)try{let G=Y.workingMemory.schema,J;if(z5(G))J=G["~standard"].jsonSchema.output({target:"draft-07"});else J=Q4(G)["~standard"].jsonSchema.output({target:"draft-07"});return{format:"json",content:JSON.stringify(J)}}catch(G){throw this.logger.error("Error converting schema",G),G}return{format:"markdown",content:(Y.workingMemory.template||this.defaultWorkingMemoryTemplate).trim()}}async getSystemMessage({threadId:$,resourceId:Y,memoryConfig:X}){let G=this.getMergedThreadConfig(X);if(!G.workingMemory?.enabled)return null;let J=await this.getWorkingMemoryTemplate({memoryConfig:X}),Q=await this.getWorkingMemory({threadId:$,resourceId:Y,memoryConfig:G});if(!J)return null;if(G?.readOnly)return this.getReadOnlyWorkingMemoryInstruction({template:J,data:Q});return this.isVNextWorkingMemoryConfig(X)?this.__experimental_getWorkingMemoryToolInstructionVNext({template:J,data:Q}):this.getWorkingMemoryToolInstruction({template:J,data:Q})}async getContext($){let{threadId:Y,resourceId:X,memoryConfig:G}=$,J=this.getMergedThreadConfig(G),Q=await this.getMemoryStore(),W=[],K=!1,Z=null,H,z,V=await this.omEngine;if(V){if(Z=await V.getRecord(Y,X),Z?.activeObservations){if(K=!0,V.scope==="resource"&&X)z=await V.getOtherThreadsContext(X,Y);let N=await V.buildContextSystemMessage({threadId:Y,resourceId:X,record:Z,unobservedContextBlocks:z});if(N)W.push(N);let{OBSERVATION_CONTINUATION_HINT:D}=await Promise.resolve().then(() => (xE4(),vE4));H={id:"om-continuation",role:"user",createdAt:new Date(0),content:{format:2,parts:[{type:"text",text:`<system-reminder>${D}</system-reminder>`}]},threadId:Y,resourceId:X}}}let F=await this.getSystemMessage({threadId:Y,resourceId:X,memoryConfig:J});if(F)W.push(F);let L;if(V&&Z){let N=Z.lastObservedAt?{dateRange:{start:new Date(new Date(Z.lastObservedAt).getTime()+1)}}:void 0;if(V.scope==="resource"&&X)L=(await Q.listMessagesByResourceId({resourceId:X,orderBy:{field:"createdAt",direction:"ASC"},perPage:!1,filter:N})).messages;else L=(await Q.listMessages({threadId:Y,orderBy:{field:"createdAt",direction:"ASC"},perPage:!1,filter:N})).messages}else{let N=J.lastMessages;if(N===!1)L=[];else L=(await Q.listMessages({threadId:Y,resourceId:X,orderBy:{field:"createdAt",direction:"DESC"},perPage:typeof N==="number"?N:void 0})).messages.reverse()}return{systemMessage:W.length>0?W.join(`

`):void 0,messages:L,hasObservations:K,omRecord:Z,continuationMessage:H,otherThreadsContext:z}}async persistMessages($){if($.length===0)return;let Y=$.filter((G)=>G.role!=="system");if(Y.length===0)return;await(await this.getMemoryStore()).saveMessages({messages:Y})}async _initOMEngine(){let $=Xd(this.threadConfig.observationalMemory);if(!$)return null;let Y=await this.storage.getStore("memory");if(!Y||!Y.supportsObservationalMemory)return null;if(!MM.has("observationalMemory"))throw Error("Observational memory is enabled but the installed version of @mastra/core does not support it. Please upgrade @mastra/core to a version that includes observational memory support.");if($.observation?.bufferTokens!==!1&&!MM.has("asyncBuffering"))throw Error("Observational memory async buffering is enabled by default but the installed version of @mastra/core does not support it. Either upgrade @mastra/core, @mastra/memory, and your storage adapter (@mastra/libsql, @mastra/pg, or @mastra/mongodb) to the latest version, or explicitly disable async buffering by setting `observation: { bufferTokens: false }` in your observationalMemory config.");if(!MM.has("request-response-id-rotation"))throw Error("Observational memory requires @mastra/core support for request-response-id-rotation. Please bump @mastra/core to a newer version.");let{ObservationalMemory:G}=await Promise.resolve().then(() => (Dc0(),Lc0)),J=this.hasRetrievalSearch($.retrieval)?async(Q)=>{await this.indexObservation(Q)}:void 0;return new G({storage:Y,scope:$.scope,retrieval:$.retrieval,activateAfterIdle:$.activateAfterIdle,activateOnProviderChange:$.activateOnProviderChange,shareTokenBudget:$.shareTokenBudget,model:$.model,mastra:this._mastraInstance,onIndexObservations:J,observation:$.observation?{model:$.observation.model,messageTokens:$.observation.messageTokens,modelSettings:$.observation.modelSettings,maxTokensPerBatch:$.observation.maxTokensPerBatch,providerOptions:$.observation.providerOptions,bufferTokens:$.observation.bufferTokens,bufferActivation:$.observation.bufferActivation,blockAfter:$.observation.blockAfter,previousObserverTokens:$.observation.previousObserverTokens,instruction:$.observation.instruction,threadTitle:$.observation.threadTitle}:void 0,reflection:$.reflection?{model:$.reflection.model,observationTokens:$.reflection.observationTokens,modelSettings:$.reflection.modelSettings,providerOptions:$.reflection.providerOptions,bufferActivation:$.reflection.bufferActivation,blockAfter:$.reflection.blockAfter,instruction:$.reflection.instruction}:void 0})}defaultWorkingMemoryTemplate=`
# User Information
- **First Name**: 
- **Last Name**: 
- **Location**: 
- **Occupation**: 
- **Interests**: 
- **Goals**: 
- **Events**: 
- **Facts**: 
- **Projects**: 
`;getWorkingMemoryToolInstruction({template:$,data:Y}){let X=$.format==="json"?xj($.content):null,G=X&&Object.keys(X).length>0;return`WORKING_MEMORY_SYSTEM_INSTRUCTION:
Store and update any conversation-relevant information by calling the updateWorkingMemory tool. If information might be referenced again - store it!

Guidelines:
1. Store anything that could be useful later in the conversation
2. Update proactively when information changes, no matter how small
3. Use ${$.format==="json"?"JSON":"Markdown"} format for all data
4. Act naturally - don't mention this system to users. Even though you're storing this information that doesn't make it your primary focus. Do not ask them generally for "information about yourself"
${$.format!=="json"?`5. IMPORTANT: When calling updateWorkingMemory, the only valid parameter is the memory field. DO NOT pass an object.
6. IMPORTANT: ALWAYS pass the data you want to store in the memory field as a string. DO NOT pass an object.
7. IMPORTANT: Data must only be sent as a string no matter which format is used.`:""}


${$.format!=="json"?`<working_memory_template>
${$.content}
</working_memory_template>`:""}

${G?"When working with json data, the object format below represents the template:":""}
${G?JSON.stringify(X):""}

<working_memory_data>
${Y}
</working_memory_data>

Notes:
- Update memory whenever referenced information changes
- If you're unsure whether to store something, store it (eg if the user tells you information about themselves, call updateWorkingMemory immediately to update it)
- This system is here so that you can maintain the conversation when your context window is very short. Update your working memory because you may need it to maintain the conversation without the full conversation history
- Do not remove empty sections - you must include the empty sections along with the ones you're filling in
- REMEMBER: the way you update your working memory is by calling the updateWorkingMemory tool with the entire ${$.format==="json"?"JSON":"Markdown"} content. The system will store it for you. The user will not see it.
- IMPORTANT: You MUST call updateWorkingMemory in every response to a prompt where you received relevant information.
- IMPORTANT: Preserve the ${$.format==="json"?"JSON":"Markdown"} formatting structure above while updating the content.`}__experimental_getWorkingMemoryToolInstructionVNext({template:$,data:Y}){return`WORKING_MEMORY_SYSTEM_INSTRUCTION:
Store and update any conversation-relevant information by calling the updateWorkingMemory tool.

Guidelines:
1. Store anything that could be useful later in the conversation
2. Update proactively when information changes, no matter how small
3. Use ${$.format==="json"?"JSON":"Markdown"} format for all data
4. Act naturally - don't mention this system to users. Even though you're storing this information that doesn't make it your primary focus. Do not ask them generally for "information about yourself"
5. If your memory has not changed, you do not need to call the updateWorkingMemory tool. By default it will persist and be available for you in future interactions
6. Information not being relevant to the current conversation is not a valid reason to replace or remove working memory information. Your working memory spans across multiple conversations and may be needed again later, even if it's not currently relevant.

<working_memory_template>
${$.content}
</working_memory_template>

<working_memory_data>
${Y}
</working_memory_data>

Notes:
- Update memory whenever referenced information changes
${$.content!==this.defaultWorkingMemoryTemplate?"- Only store information if it's in the working memory template, do not store other information unless the user asks you to remember it, as that non-template information may be irrelevant":`- If you're unsure whether to store something, store it (eg if the user tells you information about themselves, call updateWorkingMemory immediately to update it)
`}
- This system is here so that you can maintain the conversation when your context window is very short. Update your working memory because you may need it to maintain the conversation without the full conversation history
- REMEMBER: the way you update your working memory is by calling the updateWorkingMemory tool with the ${$.format==="json"?"JSON":"Markdown"} content. The system will store it for you. The user will not see it.
- IMPORTANT: You MUST call updateWorkingMemory in every response to a prompt where you received relevant information if that information is not already stored.
- IMPORTANT: Preserve the ${$.format==="json"?"JSON":"Markdown"} formatting structure above while updating the content.
`}getReadOnlyWorkingMemoryInstruction({data:$}){return`WORKING_MEMORY_SYSTEM_INSTRUCTION (READ-ONLY):
The following is your working memory - persistent information about the user and conversation collected over previous interactions. This data is provided for context to help you maintain continuity.

<working_memory_data>
${$||"No working memory data available."}
</working_memory_data>

Guidelines:
1. Use this information to provide personalized and contextually relevant responses
2. Act naturally - don't mention this system to users. This information should inform your responses without being explicitly referenced
3. This memory is read-only in the current session - you cannot update it

Notes:
- This system is here so that you can maintain the conversation when your context window is very short
- The user will not see the working memory data directly`}isVNextWorkingMemoryConfig($){if(!$?.workingMemory)return!1;let Y=!("schema"in $.workingMemory)&&(typeof $.workingMemory.template==="string"||$.workingMemory.template)&&$.workingMemory;return Boolean(Y&&Y.version==="vnext")}getObservationEmbeddingIndexName($){let X=$??384,G=this.vector?.indexSeparator??"_";return`memory${G}observations${G}${X}`}async createObservationEmbeddingIndex($){let X=$??384,G=this.getObservationEmbeddingIndexName($);if(typeof this.vector>"u")throw Error("Tried to create observation embedding index but no vector db is attached to this Memory instance.");return await this.vector.createIndex({indexName:G,dimension:X}),{indexName:G}}async searchMessages({query:$,resourceId:Y,topK:X=10,filter:G}){if(!this.vector)throw Error("searchMessages requires a vector store. Configure vector and embedder on your Memory instance.");let{embeddings:J,dimension:Q}=await this.embedMessageContent($),{indexName:W}=await this.createObservationEmbeddingIndex(Q),K={resource_id:Y};if(G?.threadId)K.thread_id=G.threadId;if(G?.observedAfter||G?.observedBefore)K.observed_at={...G.observedAfter?{$gt:G.observedAfter.toISOString()}:{},...G.observedBefore?{$lt:G.observedBefore.toISOString()}:{}};let Z=[];await Promise.all(J.map(async(V)=>{let F=await this.vector.query({indexName:W,queryVector:V,topK:X,filter:K});for(let L of F){if(!L.metadata?.thread_id)continue;let N=typeof L.metadata.group_id==="string"?L.metadata.group_id:void 0;if(!N)continue;Z.push({threadId:L.metadata.thread_id,score:L.score,groupId:N,range:typeof L.metadata.range==="string"?L.metadata.range:void 0,text:typeof L.metadata.text==="string"?L.metadata.text:void 0,observedAt:typeof L.metadata.observed_at==="string"||L.metadata.observed_at instanceof Date?new Date(L.metadata.observed_at):void 0})}}));let H=new Map;for(let V of Z){if(!V.groupId)continue;let F=H.get(V.groupId);if(!F||V.score>F.score)H.set(V.groupId,V)}return{results:[...H.values()].sort((V,F)=>F.score-V.score)}}async indexObservation({text:$,groupId:Y,range:X,threadId:G,resourceId:J,observedAt:Q}){if(!this.vector||!this.embedder)return;let W=await this.embedMessageContent($);if(W.embeddings.length===0||W.dimension===void 0)return;let{indexName:K}=await this.createObservationEmbeddingIndex(W.dimension);await this.vector.upsert({indexName:K,vectors:W.embeddings,metadata:W.chunks.map((Z)=>({group_id:Y,range:X,thread_id:G,resource_id:J,observed_at:Q?.toISOString(),text:Z}))})}async updateObservationalMemoryConfig({threadId:$,resourceId:Y,config:X}){let G=await this.omEngine;if(!G)throw Error("Observational memory is not enabled");await G.updateRecordConfig($,Y,X)}async indexMessagesList($){if(!this.vector||!this.embedder)return;let Y=[],X;if(await Promise.all($.map(async(G)=>{let J=null;if(G.content.content&&typeof G.content.content==="string"&&G.content.content.trim()!=="")J=G.content.content;else if(G.content.parts&&G.content.parts.length>0){let W=G.content.parts.filter((K)=>K.type==="text").map((K)=>K.text).join(" ").trim();if(W)J=W}if(!J)return;let Q=await this.embedMessageContent(J);X=Q.dimension,Y.push({embeddings:Q.embeddings,metadata:Q.chunks.map(()=>({message_id:G.id,thread_id:G.threadId,resource_id:G.resourceId}))})})),Y.length>0&&X!==void 0){let{indexName:G}=await this.createEmbeddingIndex(X),J=[],Q=[];for(let W of Y)J.push(...W.embeddings),Q.push(...W.metadata);await this.vector.upsert({indexName:G,vectors:J,metadata:Q})}}hasRetrievalSearch($){if(!$||$===!0)return!1;return!!$.vector&&!!this.vector&&!!this.embedder}listTools($){let Y=this.getMergedThreadConfig($),X={};if(Y.workingMemory?.enabled&&!Y.readOnly)X.updateWorkingMemory=this.isVNextWorkingMemoryConfig(Y)?ZI9(Y):KI9(Y);let G=Xd(Y.observationalMemory);if(G?.retrieval){let J=typeof G.retrieval==="object"?G.retrieval.scope??"resource":"resource";X.recall=WI9(Y,{retrievalScope:J})}return X}async updateMessages({messages:$,memoryConfig:Y}){if($.length===0)return[];let X=await this.getMemoryStore(),G=this.getMergedThreadConfig(Y);if(this.vector&&G.semanticRecall){let J=$.filter((Q)=>Q.content!==void 0);if(J.length>0){let Q=await X.listMessagesById({messageIds:J.map((F)=>F.id)}),W=new Map(Q.messages.map((F)=>[F.id,F])),K=[],Z,H=new Set,z=new Set;await Promise.all(J.map(async(F)=>{let L=W.get(F.id);if(!L)return;let N=null,D=F.content;if(D){if("content"in D&&D.content&&typeof D.content==="string"&&D.content.trim()!=="")N=D.content;else if("parts"in D&&D.parts&&Array.isArray(D.parts)&&D.parts.length>0){let A=D.parts.filter((B)=>B?.type==="text").map((B)=>B.text).join(" ").trim();if(A)N=A}}if(N){let A=await this.embedMessageContent(N);Z=A.dimension,K.push({embeddings:A.embeddings,metadata:A.chunks.map(()=>({message_id:F.id,thread_id:L.threadId,resource_id:L.resourceId}))}),H.add(F.id)}else z.add(F.id)}));let V=new Set([...z,...H]);if(V.size>0)try{let F=await this.getMemoryVectorIndexes(),L=[...V];await Promise.all(F.map(async(N)=>{for(let D=0;D<L.length;D+=MX0){let A=L.slice(D,D+MX0);try{await this.vector.deleteVectors({indexName:N,filter:{message_id:{$in:A}}})}catch{this.logger.debug("Failed to delete vector batch, skipping",{indexName:N,batchOffset:D})}}}))}catch{this.logger.debug("Failed to clean up old vectors during message update")}if(K.length>0&&Z!==void 0){let{indexName:F}=await this.createEmbeddingIndex(Z,G),L=[],N=[];for(let D of K)L.push(...D.embeddings),N.push(...D.metadata);await this.vector.upsert({indexName:F,vectors:L,metadata:N})}}}return X.updateMessages({messages:$})}async deleteMessages($,Y){let X;if(!Array.isArray($))throw Error("Invalid input: must be an array of message IDs or message objects");if($.length===0)return;if(X=$.map((Q)=>{if(typeof Q==="string")return Q;else if(Q&&typeof Q==="object"&&"id"in Q)return Q.id;else throw Error("Invalid input: array items must be strings or objects with an id property")}),X.filter((Q)=>!Q||typeof Q!=="string").length>0)throw Error("All message IDs must be non-empty strings");let J=this.createMemorySpan("delete",Y,void 0,{messageCount:X.length});try{if(await(await this.getMemoryStore()).deleteMessages(X),this.vector)this.deleteMessageVectors(X);J?.end({output:{success:!0},attributes:{messageCount:X.length}})}catch(Q){throw J?.error({error:Q,endSpan:!0}),Q}}async deleteMessageVectors($){try{let Y=await this.getMemoryVectorIndexes();await Promise.all(Y.map(async(X)=>{for(let G=0;G<$.length;G+=MX0){let J=$.slice(G,G+MX0);try{await this.vector.deleteVectors({indexName:X,filter:{message_id:{$in:J}}})}catch{this.logger.debug("Failed to delete vector batch, skipping",{indexName:X,batchOffset:G})}}}))}catch{this.logger.debug("Failed to clean up vectors for deleted messages")}}async cloneThread($,Y){let X=await this.getMemoryStore(),G=await X.cloneThread($),J=this.getMergedThreadConfig(Y),W=(await this.getThreadById({threadId:$.sourceThreadId}))?.resourceId;if(J.workingMemory?.enabled){let K=J.workingMemory.scope||"resource";if(K==="thread"||K==="resource"&&$.resourceId&&$.resourceId!==W){let H=await this.getWorkingMemory({threadId:$.sourceThreadId,resourceId:W,memoryConfig:Y});if(H)await this.updateWorkingMemory({threadId:G.thread.id,resourceId:G.thread.resourceId,workingMemory:H,memoryConfig:Y})}}if(X.supportsObservationalMemory&&W)try{await this.cloneObservationalMemory(X,$.sourceThreadId,W,G)}catch(K){try{await X.deleteThread({threadId:G.thread.id})}catch(Z){this.logger.error("Failed to rollback cloned thread after OM clone failure",Z)}throw K}if(this.vector&&J.semanticRecall&&G.clonedMessages.length>0)await this.embedClonedMessages(G.clonedMessages,J);return G}async cloneObservationalMemory($,Y,X,G){let J=await $.getObservationalMemory(Y,X);if(!J)J=await $.getObservationalMemory(null,X);if(!J)return;let Q=G.thread.id,W=G.thread.resourceId,K=W!==X;if(J.scope==="resource"&&!K)return;let Z=G.messageIdMap??{},H=await this.hasher,z=this.remapObservationalMemoryRecord(J,{newThreadId:J.scope==="thread"?Q:null,newResourceId:W,messageIdMap:Z,sourceThreadId:K?Y:void 0,clonedThreadId:K?Q:void 0,hasher:K?H:void 0}),V=new Date;z.id=crypto.randomUUID(),z.createdAt=V,z.updatedAt=V,await $.insertObservationalMemoryRecord(z)}remapObservationalMemoryRecord($,Y){let{newThreadId:X,newResourceId:G,messageIdMap:J,sourceThreadId:Q,clonedThreadId:W,hasher:K}=Y,Z={...$};if(Z.threadId=X,Z.resourceId=G,Array.isArray(Z.observedMessageIds))Z.observedMessageIds=Z.observedMessageIds.map((H)=>J[H]).filter((H)=>Boolean(H));else Z.observedMessageIds=void 0;if(Array.isArray(Z.bufferedMessageIds))Z.bufferedMessageIds=Z.bufferedMessageIds.map((H)=>J[H]).filter((H)=>Boolean(H));else Z.bufferedMessageIds=void 0;if(Array.isArray(Z.bufferedObservationChunks))Z.bufferedObservationChunks=Z.bufferedObservationChunks.map((H)=>({...H,messageIds:Array.isArray(H.messageIds)?H.messageIds.map((z)=>J[z]).filter((z)=>Boolean(z)):[]}));else Z.bufferedObservationChunks=void 0;if(Q&&W&&K){let H=K.h32ToString(Q),z=K.h32ToString(W);if(H!==z){let V=(F)=>{if(!F)return F;return F.replaceAll(`<thread id="${H}">`,`<thread id="${z}">`)};if(Z.activeObservations=V(Z.activeObservations)??"",Z.bufferedReflection=V(Z.bufferedReflection),Z.bufferedObservationChunks)Z.bufferedObservationChunks=Z.bufferedObservationChunks.map((F)=>({...F,observations:V(F.observations)??F.observations}))}}return Z.isObserving=!1,Z.isReflecting=!1,Z.isBufferingObservation=!1,Z.isBufferingReflection=!1,Z}async embedClonedMessages($,Y){if(!this.vector||!this.embedder)return;let X=[],G;if(await Promise.all($.map(async(J)=>{let Q=null;if(J.content?.content&&typeof J.content.content==="string"&&J.content.content.trim()!=="")Q=J.content.content;else if(J.content?.parts&&J.content.parts.length>0){let K=J.content.parts.filter((Z)=>Z.type==="text").map((Z)=>Z.text).join(" ").trim();if(K)Q=K}if(!Q)return;let W=await this.embedMessageContent(Q);G=W.dimension,X.push({embeddings:W.embeddings,metadata:W.chunks.map(()=>({message_id:J.id,thread_id:J.threadId,resource_id:J.resourceId}))})})),X.length>0&&G!==void 0){let{indexName:J}=await this.createEmbeddingIndex(G,Y),Q=[],W=[];for(let K of X)Q.push(...K.embeddings),W.push(...K.metadata);await this.vector.upsert({indexName:J,vectors:Q,metadata:W})}}getCloneMetadata($){if(!$?.metadata?.clone)return null;return $.metadata.clone}isClone($){return this.getCloneMetadata($)!==null}async getSourceThread($){let Y=await this.getThreadById({threadId:$}),X=this.getCloneMetadata(Y);if(!X)return null;return this.getThreadById({threadId:X.sourceThreadId})}async listClones($,Y){let X=Y;if(!X){let J=await this.getThreadById({threadId:$});if(!J)return[];X=J.resourceId}let{threads:G}=await this.listThreads({filter:{resourceId:X},perPage:!1});return G.filter((J)=>{return this.getCloneMetadata(J)?.sourceThreadId===$})}async getCloneHistory($){let Y=[],X=$;while(X){let G=await this.getThreadById({threadId:X});if(!G)break;Y.unshift(G),X=this.getCloneMetadata(G)?.sourceThreadId??null}return Y}async getInputProcessors($=[],Y){let X=await super.getInputProcessors($,Y),G=await this.createOMProcessor($,Y);if(G)X.push(G);return X}async getOutputProcessors($=[],Y){let X=await super.getOutputProcessors($,Y),G=await this.createOMProcessor($,Y);if(G)X.push(G);return X}async createOMProcessor($=[],Y){if($.some((H)=>!("workflow"in H)&&H.id==="observational-memory"))return null;let G=Y?.get("MastraMemory"),J=Xd(G?.memoryConfig?.observationalMemory),Q=J?this.getMergedThreadConfig({...G?.memoryConfig,observationalMemory:J}):this.threadConfig,W=Xd(Q.observationalMemory);if(!W)return null;let K=await this.omEngine;if(!K)return null;let{ObservationalMemoryProcessor:Z}=await Promise.resolve().then(() => (Dc0(),Lc0));return new Z(K,this,{temporalMarkers:W.temporalMarkers})}};O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();O1();ZY();ZY();var Vj4=U6(ul0(),1),Fj4=U6(ul0(),1),eC9="vercel.ai.gateway.error",pl0=Symbol.for(eC9),I_4,C_4,yX=class $ extends(C_4=Error,I_4=pl0,C_4){constructor({message:Y,statusCode:X=500,cause:G,generationId:J,isRetryable:Q=X!=null&&(X===408||X===409||X===429||X>=500)}){super(J?`${Y} [${J}]`:Y);this[I_4]=!0,this.statusCode=X,this.cause=G,this.generationId=J,this.isRetryable=Q}static isInstance(Y){return $.hasMarker(Y)}static hasMarker(Y){return typeof Y==="object"&&Y!==null&&pl0 in Y&&Y[pl0]===!0}},Jj4="GatewayAuthenticationError",$S9=`vercel.ai.gateway.error.${Jj4}`,S_4=Symbol.for($S9),k_4,v_4,tX0=class $ extends(v_4=yX,k_4=S_4,v_4){constructor({message:Y="Authentication failed",statusCode:X=401,cause:G,generationId:J}={}){super({message:Y,statusCode:X,cause:G,generationId:J});this[k_4]=!0,this.name=Jj4,this.type="authentication_error"}static isInstance(Y){return yX.hasMarker(Y)&&S_4 in Y}static createContextualError({apiKeyProvided:Y,oidcTokenProvided:X,message:G="Authentication failed",statusCode:J=401,cause:Q,generationId:W}){let K;if(Y)K=`AI Gateway authentication failed: Invalid API key.

Create a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys

Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.`;else if(X)K=`AI Gateway authentication failed: Invalid OIDC token.

Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.

Alternatively, use an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys`;else K=`AI Gateway authentication failed: No authentication provided.

Option 1 - API key:
Create an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys
Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.

Option 2 - OIDC token:
Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.`;return new $({message:K,statusCode:J,cause:Q,generationId:W})}},Qj4="GatewayInvalidRequestError",YS9=`vercel.ai.gateway.error.${Qj4}`,x_4=Symbol.for(YS9),y_4,b_4,XS9=class extends(b_4=yX,y_4=x_4,b_4){constructor({message:$="Invalid request",statusCode:Y=400,cause:X,generationId:G}={}){super({message:$,statusCode:Y,cause:X,generationId:G});this[y_4]=!0,this.name=Qj4,this.type="invalid_request_error"}static isInstance($){return yX.hasMarker($)&&x_4 in $}},Wj4="GatewayRateLimitError",GS9=`vercel.ai.gateway.error.${Wj4}`,h_4=Symbol.for(GS9),f_4,g_4,JS9=class extends(g_4=yX,f_4=h_4,g_4){constructor({message:$="Rate limit exceeded",statusCode:Y=429,cause:X,generationId:G}={}){super({message:$,statusCode:Y,cause:X,generationId:G});this[f_4]=!0,this.name=Wj4,this.type="rate_limit_exceeded"}static isInstance($){return yX.hasMarker($)&&h_4 in $}},Kj4="GatewayModelNotFoundError",QS9=`vercel.ai.gateway.error.${Kj4}`,m_4=Symbol.for(QS9),WS9=N1(()=>z1(U.object({modelId:U.string()}))),u_4,p_4,KS9=class extends(p_4=yX,u_4=m_4,p_4){constructor({message:$="Model not found",statusCode:Y=404,modelId:X,cause:G,generationId:J}={}){super({message:$,statusCode:Y,cause:G,generationId:J});this[u_4]=!0,this.name=Kj4,this.type="model_not_found",this.modelId=X}static isInstance($){return yX.hasMarker($)&&m_4 in $}},Zj4="GatewayInternalServerError",ZS9=`vercel.ai.gateway.error.${Zj4}`,d_4=Symbol.for(ZS9),c_4,l_4,i_4=class extends(l_4=yX,c_4=d_4,l_4){constructor({message:$="Internal server error",statusCode:Y=500,cause:X,generationId:G}={}){super({message:$,statusCode:Y,cause:X,generationId:G});this[c_4]=!0,this.name=Zj4,this.type="internal_server_error"}static isInstance($){return yX.hasMarker($)&&d_4 in $}},Uj4="GatewayResponseError",US9=`vercel.ai.gateway.error.${Uj4}`,n_4=Symbol.for(US9),r_4,a_4,HS9=class extends(a_4=yX,r_4=n_4,a_4){constructor({message:$="Invalid response from Gateway",statusCode:Y=502,response:X,validationError:G,cause:J,generationId:Q}={}){super({message:$,statusCode:Y,cause:J,generationId:Q});this[r_4]=!0,this.name=Uj4,this.type="response_error",this.response=X,this.validationError=G}static isInstance($){return yX.hasMarker($)&&n_4 in $}};async function s_4({response:$,statusCode:Y,defaultMessage:X="Gateway request failed",cause:G,authMethod:J}){var Q;let W=await DG({value:$,schema:zS9});if(!W.success){let V=typeof $==="object"&&$!==null&&"generationId"in $?$.generationId:void 0;return new HS9({message:`Invalid error response format: ${X}`,statusCode:Y,response:$,validationError:W.error,cause:G,generationId:V})}let K=W.value,Z=K.error.type,H=K.error.message,z=(Q=K.generationId)!=null?Q:void 0;switch(Z){case"authentication_error":return tX0.createContextualError({apiKeyProvided:J==="api-key",oidcTokenProvided:J==="oidc",statusCode:Y,cause:G,generationId:z});case"invalid_request_error":return new XS9({message:H,statusCode:Y,cause:G,generationId:z});case"rate_limit_exceeded":return new JS9({message:H,statusCode:Y,cause:G,generationId:z});case"model_not_found":{let V=await DG({value:K.error.param,schema:WS9});return new KS9({message:H,statusCode:Y,modelId:V.success?V.value.modelId:void 0,cause:G,generationId:z})}case"internal_server_error":return new i_4({message:H,statusCode:Y,cause:G,generationId:z});default:return new i_4({message:H,statusCode:Y,cause:G,generationId:z})}}var zS9=N1(()=>z1(U.object({error:U.object({message:U.string(),type:U.string().nullish(),param:U.unknown().nullish(),code:U.union([U.string(),U.number()]).nullish()}),generationId:U.string().nullish()})));function VS9($){if($.data!==void 0)return $.data;if($.responseBody!=null)try{return JSON.parse($.responseBody)}catch(Y){return $.responseBody}return{}}var Hj4="GatewayTimeoutError",FS9=`vercel.ai.gateway.error.${Hj4}`,o_4=Symbol.for(FS9),t_4,e_4,$j4=class $ extends(e_4=yX,t_4=o_4,e_4){constructor({message:Y="Request timed out",statusCode:X=408,cause:G,generationId:J}={}){super({message:Y,statusCode:X,cause:G,generationId:J});this[t_4]=!0,this.name=Hj4,this.type="timeout_error"}static isInstance(Y){return yX.hasMarker(Y)&&o_4 in Y}static createTimeoutError({originalMessage:Y,statusCode:X=408,cause:G,generationId:J}){let Q=`Gateway request timed out: ${Y}

    This is a client-side timeout. To resolve this, increase your timeout configuration: https://vercel.com/docs/ai-gateway/capabilities/video-generation#extending-timeouts-for-node.js`;return new $({message:Q,statusCode:X,cause:G,generationId:J})}};function Yj4($){if(!($ instanceof Error))return!1;let Y=$.code;if(typeof Y==="string")return["UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_CONNECT_TIMEOUT"].includes(Y);return!1}async function uQ($,Y){var X;if(yX.isInstance($))return $;if(Yj4($))return $j4.createTimeoutError({originalMessage:$ instanceof Error?$.message:"Unknown error",cause:$});if(n8.isInstance($)){if($.cause&&Yj4($.cause))return $j4.createTimeoutError({originalMessage:$.message,cause:$});return await s_4({response:VS9($),statusCode:(X=$.statusCode)!=null?X:500,defaultMessage:"Gateway request failed",cause:$,authMethod:Y})}return await s_4({response:{},statusCode:500,defaultMessage:$ instanceof Error?`Gateway request failed: ${$.message}`:"Unknown Gateway error",cause:$,authMethod:Y})}var zj4="ai-gateway-auth-method";async function DH($){let Y=await DG({value:$[zj4],schema:LS9});return Y.success?Y.value:void 0}var LS9=N1(()=>z1(U.union([U.literal("api-key"),U.literal("oidc")]))),DS9=["embedding","image","language","reranking","video"],Xj4=class{constructor($){this.config=$}async getAvailableModels(){try{let{value:$}=await zM({url:`${this.config.baseURL}/config`,headers:await S5(this.config.headers()),successfulResponseHandler:O8(NS9),failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(Y)=>Y}),fetch:this.config.fetch});return $}catch($){throw await uQ($)}}async getCredits(){try{let $=new URL(this.config.baseURL),{value:Y}=await zM({url:`${$.origin}/v1/credits`,headers:await S5(this.config.headers()),successfulResponseHandler:O8(AS9),failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(X)=>X}),fetch:this.config.fetch});return Y}catch($){throw await uQ($)}}},NS9=N1(()=>z1(U.object({models:U.array(U.object({id:U.string(),name:U.string(),description:U.string().nullish(),pricing:U.object({input:U.string(),output:U.string(),input_cache_read:U.string().nullish(),input_cache_write:U.string().nullish()}).transform(({input:$,output:Y,input_cache_read:X,input_cache_write:G})=>({input:$,output:Y,...X?{cachedInputTokens:X}:{},...G?{cacheCreationInputTokens:G}:{}})).nullish(),specification:U.object({specificationVersion:U.literal("v3"),provider:U.string(),modelId:U.string()}),modelType:U.string().nullish()})).transform(($)=>$.filter((Y)=>Y.modelType==null||DS9.includes(Y.modelType)))}))),AS9=N1(()=>z1(U.object({balance:U.string(),total_used:U.string()}).transform(({balance:$,total_used:Y})=>({balance:$,totalUsed:Y})))),BS9=class{constructor($){this.config=$}async getSpendReport($){try{let Y=new URL(this.config.baseURL),X=new URLSearchParams;if(X.set("start_date",$.startDate),X.set("end_date",$.endDate),$.groupBy)X.set("group_by",$.groupBy);if($.datePart)X.set("date_part",$.datePart);if($.userId)X.set("user_id",$.userId);if($.model)X.set("model",$.model);if($.provider)X.set("provider",$.provider);if($.credentialType)X.set("credential_type",$.credentialType);if($.tags&&$.tags.length>0)X.set("tags",$.tags.join(","));let{value:G}=await zM({url:`${Y.origin}/v1/report?${X.toString()}`,headers:await S5(this.config.headers()),successfulResponseHandler:O8(OS9),failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(J)=>J}),fetch:this.config.fetch});return G}catch(Y){throw await uQ(Y)}}},OS9=N1(()=>z1(U.object({results:U.array(U.object({day:U.string().optional(),hour:U.string().optional(),user:U.string().optional(),model:U.string().optional(),tag:U.string().optional(),provider:U.string().optional(),credential_type:U.enum(["byok","system"]).optional(),total_cost:U.number(),market_cost:U.number().optional(),input_tokens:U.number().optional(),output_tokens:U.number().optional(),cached_input_tokens:U.number().optional(),cache_creation_input_tokens:U.number().optional(),reasoning_tokens:U.number().optional(),request_count:U.number().optional()}).transform(({credential_type:$,total_cost:Y,market_cost:X,input_tokens:G,output_tokens:J,cached_input_tokens:Q,cache_creation_input_tokens:W,reasoning_tokens:K,request_count:Z,...H})=>({...H,...$!==void 0?{credentialType:$}:{},totalCost:Y,...X!==void 0?{marketCost:X}:{},...G!==void 0?{inputTokens:G}:{},...J!==void 0?{outputTokens:J}:{},...Q!==void 0?{cachedInputTokens:Q}:{},...W!==void 0?{cacheCreationInputTokens:W}:{},...K!==void 0?{reasoningTokens:K}:{},...Z!==void 0?{requestCount:Z}:{}})))}))),ES9=class{constructor($){this.config=$}async getGenerationInfo($){try{let Y=new URL(this.config.baseURL),{value:X}=await zM({url:`${Y.origin}/v1/generation?id=${encodeURIComponent($.id)}`,headers:await S5(this.config.headers()),successfulResponseHandler:O8(MS9),failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(G)=>G}),fetch:this.config.fetch});return X}catch(Y){throw await uQ(Y)}}},MS9=N1(()=>z1(U.object({data:U.object({id:U.string(),total_cost:U.number(),upstream_inference_cost:U.number(),usage:U.number(),created_at:U.string(),model:U.string(),is_byok:U.boolean(),provider_name:U.string(),streamed:U.boolean(),finish_reason:U.string(),latency:U.number(),generation_time:U.number(),native_tokens_prompt:U.number(),native_tokens_completion:U.number(),native_tokens_reasoning:U.number(),native_tokens_cached:U.number(),native_tokens_cache_creation:U.number(),billable_web_search_calls:U.number()}).transform(({total_cost:$,upstream_inference_cost:Y,created_at:X,is_byok:G,provider_name:J,finish_reason:Q,generation_time:W,native_tokens_prompt:K,native_tokens_completion:Z,native_tokens_reasoning:H,native_tokens_cached:z,native_tokens_cache_creation:V,billable_web_search_calls:F,...L})=>({...L,totalCost:$,upstreamInferenceCost:Y,createdAt:X,isByok:G,providerName:J,finishReason:Q,generationTime:W,promptTokens:K,completionTokens:Z,reasoningTokens:H,cachedTokens:z,cacheCreationTokens:V,billableWebSearchCalls:F}))}).transform(({data:$})=>$))),RS9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.supportedUrls={"*/*":[/.*/]}}get provider(){return this.config.provider}async getArgs($){let{abortSignal:Y,...X}=$;return{args:this.maybeEncodeFileParts(X),warnings:[]}}async doGenerate($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await S5(this.config.headers());try{let{responseHeaders:Q,value:W,rawValue:K}=await T8({url:this.getUrl(),headers:i6(J,$.headers,this.getModelConfigHeaders(this.modelId,!1),await S5(this.config.o11yHeaders)),body:Y,successfulResponseHandler:O8(U.any()),failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(Z)=>Z}),...G&&{abortSignal:G},fetch:this.config.fetch});return{...W,request:{body:Y},response:{headers:Q,body:K},warnings:X}}catch(Q){throw await uQ(Q,await DH(J))}}async doStream($){let{args:Y,warnings:X}=await this.getArgs($),{abortSignal:G}=$,J=await S5(this.config.headers());try{let{value:Q,responseHeaders:W}=await T8({url:this.getUrl(),headers:i6(J,$.headers,this.getModelConfigHeaders(this.modelId,!0),await S5(this.config.o11yHeaders)),body:Y,successfulResponseHandler:WK(U.any()),failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(K)=>K}),...G&&{abortSignal:G},fetch:this.config.fetch});return{stream:Q.pipeThrough(new TransformStream({start(K){if(X.length>0)K.enqueue({type:"stream-start",warnings:X})},transform(K,Z){if(K.success){let H=K.value;if(H.type==="raw"&&!$.includeRawChunks)return;if(H.type==="response-metadata"&&H.timestamp&&typeof H.timestamp==="string")H.timestamp=new Date(H.timestamp);Z.enqueue(H)}else Z.error(K.error)}})),request:{body:Y},response:{headers:W}}}catch(Q){throw await uQ(Q,await DH(J))}}isFilePart($){return $&&typeof $==="object"&&"type"in $&&$.type==="file"}maybeEncodeFileParts($){for(let Y of $.prompt)for(let X of Y.content)if(this.isFilePart(X)){let G=X;if(G.data instanceof Uint8Array){let J=Uint8Array.from(G.data),Q=Buffer.from(J).toString("base64");G.data=new URL(`data:${G.mediaType||"application/octet-stream"};base64,${Q}`)}}return $}getUrl(){return`${this.config.baseURL}/language-model`}getModelConfigHeaders($,Y){return{"ai-language-model-specification-version":"3","ai-language-model-id":$,"ai-language-model-streaming":String(Y)}}},qS9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0}get provider(){return this.config.provider}async doEmbed({values:$,headers:Y,abortSignal:X,providerOptions:G}){var J;let Q=await S5(this.config.headers());try{let{responseHeaders:W,value:K,rawValue:Z}=await T8({url:this.getUrl(),headers:i6(Q,Y!=null?Y:{},this.getModelConfigHeaders(),await S5(this.config.o11yHeaders)),body:{values:$,...G?{providerOptions:G}:{}},successfulResponseHandler:O8(PS9),failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(H)=>H}),...X&&{abortSignal:X},fetch:this.config.fetch});return{embeddings:K.embeddings,usage:(J=K.usage)!=null?J:void 0,providerMetadata:K.providerMetadata,response:{headers:W,body:Z},warnings:[]}}catch(W){throw await uQ(W,await DH(Q))}}getUrl(){return`${this.config.baseURL}/embedding-model`}getModelConfigHeaders(){return{"ai-embedding-model-specification-version":"3","ai-model-id":this.modelId}}},PS9=N1(()=>z1(U.object({embeddings:U.array(U.array(U.number())),usage:U.object({tokens:U.number()}).nullish(),providerMetadata:U.record(U.string(),U.record(U.string(),U.unknown())).optional()}))),wS9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxImagesPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,size:X,aspectRatio:G,seed:J,files:Q,mask:W,providerOptions:K,headers:Z,abortSignal:H}){var z,V,F,L;let N=await S5(this.config.headers());try{let{responseHeaders:D,value:A,rawValue:B}=await T8({url:this.getUrl(),headers:i6(N,Z!=null?Z:{},this.getModelConfigHeaders(),await S5(this.config.o11yHeaders)),body:{prompt:$,n:Y,...X&&{size:X},...G&&{aspectRatio:G},...J&&{seed:J},...K&&{providerOptions:K},...Q&&{files:Q.map((O)=>Gj4(O))},...W&&{mask:Gj4(W)}},successfulResponseHandler:O8(IS9),failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(O)=>O}),...H&&{abortSignal:H},fetch:this.config.fetch});return{images:A.images,warnings:(z=A.warnings)!=null?z:[],providerMetadata:A.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:D},...A.usage!=null&&{usage:{inputTokens:(V=A.usage.inputTokens)!=null?V:void 0,outputTokens:(F=A.usage.outputTokens)!=null?F:void 0,totalTokens:(L=A.usage.totalTokens)!=null?L:void 0}}}}catch(D){throw await uQ(D,await DH(N))}}getUrl(){return`${this.config.baseURL}/image-model`}getModelConfigHeaders(){return{"ai-image-model-specification-version":"3","ai-model-id":this.modelId}}};function Gj4($){if($.type==="file"&&$.data instanceof Uint8Array)return{...$,data:$H($.data)};return $}var _S9=U.object({images:U.array(U.unknown()).optional()}).catchall(U.unknown()),jS9=U.discriminatedUnion("type",[U.object({type:U.literal("unsupported"),feature:U.string(),details:U.string().optional()}),U.object({type:U.literal("compatibility"),feature:U.string(),details:U.string().optional()}),U.object({type:U.literal("other"),message:U.string()})]),TS9=U.object({inputTokens:U.number().nullish(),outputTokens:U.number().nullish(),totalTokens:U.number().nullish()}),IS9=U.object({images:U.array(U.string()),warnings:U.array(jS9).optional(),providerMetadata:U.record(U.string(),_S9).optional(),usage:TS9.optional()}),CS9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3",this.maxVideosPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:Y,aspectRatio:X,resolution:G,duration:J,fps:Q,seed:W,image:K,providerOptions:Z,headers:H,abortSignal:z}){var V;let F=await S5(this.config.headers());try{let{responseHeaders:L,value:N}=await T8({url:this.getUrl(),headers:i6(F,H!=null?H:{},this.getModelConfigHeaders(),await S5(this.config.o11yHeaders),{accept:"text/event-stream"}),body:{prompt:$,n:Y,...X&&{aspectRatio:X},...G&&{resolution:G},...J&&{duration:J},...Q&&{fps:Q},...W&&{seed:W},...Z&&{providerOptions:Z},...K&&{image:SS9(K)}},successfulResponseHandler:async({response:D,url:A,requestBodyValues:B})=>{if(D.body==null)throw new n8({message:"SSE response body is empty",url:A,requestBodyValues:B,statusCode:D.status});let E=y70({stream:D.body,schema:yS9}).getReader(),{done:M,value:R}=await E.read();if(E.releaseLock(),M||!R)throw new n8({message:"SSE stream ended without a data event",url:A,requestBodyValues:B,statusCode:D.status});if(!R.success)throw new n8({message:"Failed to parse video SSE event",cause:R.error,url:A,requestBodyValues:B,statusCode:D.status});let q=R.value;if(q.type==="error")throw new n8({message:q.message,statusCode:q.statusCode,url:A,requestBodyValues:B,responseHeaders:Object.fromEntries([...D.headers]),responseBody:JSON.stringify(q),data:{error:{message:q.message,type:q.errorType,param:q.param}}});return{value:{videos:q.videos,warnings:q.warnings,providerMetadata:q.providerMetadata},responseHeaders:Object.fromEntries([...D.headers])}},failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(D)=>D}),...z&&{abortSignal:z},fetch:this.config.fetch});return{videos:N.videos,warnings:(V=N.warnings)!=null?V:[],providerMetadata:N.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:L}}}catch(L){throw await uQ(L,await DH(F))}}getUrl(){return`${this.config.baseURL}/video-model`}getModelConfigHeaders(){return{"ai-video-model-specification-version":"3","ai-model-id":this.modelId}}};function SS9($){if($.type==="file"&&$.data instanceof Uint8Array)return{...$,data:$H($.data)};return $}var kS9=U.object({videos:U.array(U.unknown()).optional()}).catchall(U.unknown()),vS9=U.union([U.object({type:U.literal("url"),url:U.string(),mediaType:U.string()}),U.object({type:U.literal("base64"),data:U.string(),mediaType:U.string()})]),xS9=U.discriminatedUnion("type",[U.object({type:U.literal("unsupported"),feature:U.string(),details:U.string().optional()}),U.object({type:U.literal("compatibility"),feature:U.string(),details:U.string().optional()}),U.object({type:U.literal("other"),message:U.string()})]),yS9=U.discriminatedUnion("type",[U.object({type:U.literal("result"),videos:U.array(vS9),warnings:U.array(xS9).optional(),providerMetadata:U.record(U.string(),kS9).optional()}),U.object({type:U.literal("error"),message:U.string(),errorType:U.string(),statusCode:U.number(),param:U.unknown().nullable()})]),bS9=class{constructor($,Y){this.modelId=$,this.config=Y,this.specificationVersion="v3"}get provider(){return this.config.provider}async doRerank({documents:$,query:Y,topN:X,headers:G,abortSignal:J,providerOptions:Q}){let W=await S5(this.config.headers());try{let{responseHeaders:K,value:Z,rawValue:H}=await T8({url:this.getUrl(),headers:i6(W,G!=null?G:{},this.getModelConfigHeaders(),await S5(this.config.o11yHeaders)),body:{documents:$,query:Y,...X!=null?{topN:X}:{},...Q?{providerOptions:Q}:{}},successfulResponseHandler:O8(hS9),failedResponseHandler:e9({errorSchema:U.any(),errorToMessage:(z)=>z}),...J&&{abortSignal:J},fetch:this.config.fetch});return{ranking:Z.ranking,providerMetadata:Z.providerMetadata,response:{headers:K,body:H},warnings:[]}}catch(K){throw await uQ(K,await DH(W))}}getUrl(){return`${this.config.baseURL}/reranking-model`}getModelConfigHeaders(){return{"ai-reranking-model-specification-version":"3","ai-model-id":this.modelId}}},hS9=N1(()=>z1(U.object({ranking:U.array(U.object({index:U.number(),relevanceScore:U.number()})),providerMetadata:U.record(U.string(),U.record(U.string(),U.unknown())).optional()}))),fS9=N1(()=>z1(U.object({objective:U.string().describe("Natural-language description of the web research goal, including source or freshness guidance and broader context from the task. Maximum 5000 characters."),search_queries:U.array(U.string()).optional().describe("Optional search queries to supplement the objective. Maximum 200 characters per query."),mode:U.enum(["one-shot","agentic"]).optional().describe('Mode preset: "one-shot" for comprehensive results with longer excerpts (default), "agentic" for concise, token-efficient results for multi-step workflows.'),max_results:U.number().optional().describe("Maximum number of results to return (1-20). Defaults to 10 if not specified."),source_policy:U.object({include_domains:U.array(U.string()).optional().describe("List of domains to include in search results."),exclude_domains:U.array(U.string()).optional().describe("List of domains to exclude from search results."),after_date:U.string().optional().describe("Only include results published after this date (ISO 8601 format).")}).optional().describe("Source policy for controlling which domains to include/exclude and freshness."),excerpts:U.object({max_chars_per_result:U.number().optional().describe("Maximum characters per result."),max_chars_total:U.number().optional().describe("Maximum total characters across all results.")}).optional().describe("Excerpt configuration for controlling result length."),fetch_policy:U.object({max_age_seconds:U.number().optional().describe("Maximum age in seconds for cached content. Set to 0 to always fetch fresh content.")}).optional().describe("Fetch policy for controlling content freshness.")}))),gS9=N1(()=>z1(U.union([U.object({searchId:U.string(),results:U.array(U.object({url:U.string(),title:U.string(),excerpt:U.string(),publishDate:U.string().nullable().optional(),relevanceScore:U.number().optional()}))}),U.object({error:U.enum(["api_error","rate_limit","timeout","invalid_input","configuration_error","unknown"]),statusCode:U.number().optional(),message:U.string()})]))),mS9=B$({id:"gateway.parallel_search",inputSchema:fS9,outputSchema:gS9}),uS9=($={})=>mS9($),pS9=N1(()=>z1(U.object({query:U.union([U.string(),U.array(U.string())]).describe("Search query (string) or multiple queries (array of up to 5 strings). Multi-query searches return combined results from all queries."),max_results:U.number().optional().describe("Maximum number of search results to return (1-20, default: 10)"),max_tokens_per_page:U.number().optional().describe("Maximum number of tokens to extract per search result page (256-2048, default: 2048)"),max_tokens:U.number().optional().describe("Maximum total tokens across all search results (default: 25000, max: 1000000)"),country:U.string().optional().describe("Two-letter ISO 3166-1 alpha-2 country code for regional search results (e.g., 'US', 'GB', 'FR')"),search_domain_filter:U.array(U.string()).optional().describe("List of domains to include or exclude from search results (max 20). To include: ['nature.com', 'science.org']. To exclude: ['-example.com', '-spam.net']"),search_language_filter:U.array(U.string()).optional().describe("List of ISO 639-1 language codes to filter results (max 10, lowercase). Examples: ['en', 'fr', 'de']"),search_after_date:U.string().optional().describe("Include only results published after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),search_before_date:U.string().optional().describe("Include only results published before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),last_updated_after_filter:U.string().optional().describe("Include only results last updated after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),last_updated_before_filter:U.string().optional().describe("Include only results last updated before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),search_recency_filter:U.enum(["day","week","month","year"]).optional().describe("Filter results by relative time period. Cannot be used with search_after_date or search_before_date.")}))),dS9=N1(()=>z1(U.union([U.object({results:U.array(U.object({title:U.string(),url:U.string(),snippet:U.string(),date:U.string().optional(),lastUpdated:U.string().optional()})),id:U.string()}),U.object({error:U.enum(["api_error","rate_limit","timeout","invalid_input","unknown"]),statusCode:U.number().optional(),message:U.string()})]))),cS9=B$({id:"gateway.perplexity_search",inputSchema:pS9,outputSchema:dS9}),lS9=($={})=>cS9($),iS9={parallelSearch:uS9,perplexitySearch:lS9};async function nS9(){var $;return($=Vj4.getContext().headers)==null?void 0:$["x-vercel-id"]}var rS9="3.0.115",aS9="0.0.1";function sS9($={}){var Y,X;let G=null,J=null,Q=(Y=$.metadataCacheRefreshMillis)!=null?Y:300000,W=0,K=(X=CI($.baseURL))!=null?X:"https://ai-gateway.vercel.sh/v3/ai",Z=async()=>{try{let O=await oS9($);return uW({Authorization:`Bearer ${O.token}`,"ai-gateway-protocol-version":aS9,[zj4]:O.authMethod,...$.headers},`ai-sdk/gateway/${rS9}`)}catch(O){throw tX0.createContextualError({apiKeyProvided:!1,oidcTokenProvided:!1,statusCode:401,cause:O})}},H=()=>{let O=pD({settingValue:void 0,environmentVariableName:"VERCEL_DEPLOYMENT_ID"}),E=pD({settingValue:void 0,environmentVariableName:"VERCEL_ENV"}),M=pD({settingValue:void 0,environmentVariableName:"VERCEL_REGION"}),R=pD({settingValue:void 0,environmentVariableName:"VERCEL_PROJECT_ID"});return async()=>{let q=await nS9();return{...O&&{"ai-o11y-deployment-id":O},...E&&{"ai-o11y-environment":E},...M&&{"ai-o11y-region":M},...q&&{"ai-o11y-request-id":q},...R&&{"ai-o11y-project-id":R}}}},z=(O)=>{return new RS9(O,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})},V=async()=>{var O,E,M;let R=(M=(E=(O=$._internal)==null?void 0:O.currentDate)==null?void 0:E.call(O).getTime())!=null?M:Date.now();if(!G||R-W>Q)W=R,G=new Xj4({baseURL:K,headers:Z,fetch:$.fetch}).getAvailableModels().then((q)=>{return J=q,q}).catch(async(q)=>{throw await uQ(q,await DH(await Z()))});return J?Promise.resolve(J):G},F=async()=>{return new Xj4({baseURL:K,headers:Z,fetch:$.fetch}).getCredits().catch(async(O)=>{throw await uQ(O,await DH(await Z()))})},L=async(O)=>{return new BS9({baseURL:K,headers:Z,fetch:$.fetch}).getSpendReport(O).catch(async(E)=>{throw await uQ(E,await DH(await Z()))})},N=async(O)=>{return new ES9({baseURL:K,headers:Z,fetch:$.fetch}).getGenerationInfo(O).catch(async(E)=>{throw await uQ(E,await DH(await Z()))})},D=function(O){if(new.target)throw Error("The Gateway Provider model function cannot be called with the new keyword.");return z(O)};D.specificationVersion="v3",D.getAvailableModels=V,D.getCredits=F,D.getSpendReport=L,D.getGenerationInfo=N,D.imageModel=(O)=>{return new wS9(O,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})},D.languageModel=z;let A=(O)=>{return new qS9(O,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})};D.embeddingModel=A,D.textEmbeddingModel=A,D.videoModel=(O)=>{return new CS9(O,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})};let B=(O)=>{return new bS9(O,{provider:"gateway",baseURL:K,headers:Z,fetch:$.fetch,o11yHeaders:H()})};return D.rerankingModel=B,D.reranking=B,D.chat=D.languageModel,D.embedding=D.embeddingModel,D.image=D.imageModel,D.video=D.videoModel,D.tools=iS9,D}var Lj4=sS9();async function oS9($){let Y=pD({settingValue:$.apiKey,environmentVariableName:"AI_GATEWAY_API_KEY"});if(Y)return{token:Y,authMethod:"api-key"};return{token:await Fj4.getVercelOidcToken(),authMethod:"oidc"}}O1();O1();O1();O1();O1();O1();var BS4=U6(bi0(),1),uC=U6(bi0(),1);O1();O1();var Kx9=Object.defineProperty,Zx9=($,Y)=>{for(var X in Y)Kx9($,X,{get:Y[X],enumerable:!0})},BC4="AI_InvalidArgumentError",OC4=`vercel.ai.error.${BC4}`,Ux9=Symbol.for(OC4),EC4,NH=class extends X4{constructor({parameter:$,value:Y,message:X}){super({name:BC4,message:`Invalid argument for parameter ${$}: ${X}`});this[EC4]=!0,this.parameter=$,this.value=Y}static isInstance($){return X4.hasMarker($,OC4)}};EC4=Ux9;var Hx9="AI_InvalidStreamPartError",zx9=`vercel.ai.error.${Hx9}`,Vx9=Symbol.for(zx9),Fx9;Fx9=Vx9;var MC4="AI_InvalidToolApprovalError",RC4=`vercel.ai.error.${MC4}`,Lx9=Symbol.for(RC4),qC4,Dx9=class extends X4{constructor({approvalId:$}){super({name:MC4,message:`Tool approval response references unknown approvalId: "${$}". No matching tool-approval-request found in message history.`});this[qC4]=!0,this.approvalId=$}static isInstance($){return X4.hasMarker($,RC4)}};qC4=Lx9;var PC4="AI_InvalidToolInputError",wC4=`vercel.ai.error.${PC4}`,Nx9=Symbol.for(wC4),_C4,ai0=class extends X4{constructor({toolInput:$,toolName:Y,cause:X,message:G=`Invalid input for tool ${Y}: ${KU(X)}`}){super({name:PC4,message:G,cause:X});this[_C4]=!0,this.toolInput=$,this.toolName=Y}static isInstance($){return X4.hasMarker($,wC4)}};_C4=Nx9;var jC4="AI_ToolCallNotFoundForApprovalError",TC4=`vercel.ai.error.${jC4}`,Ax9=Symbol.for(TC4),IC4,si0=class extends X4{constructor({toolCallId:$,approvalId:Y}){super({name:jC4,message:`Tool call "${$}" not found for approval request "${Y}".`});this[IC4]=!0,this.toolCallId=$,this.approvalId=Y}static isInstance($){return X4.hasMarker($,TC4)}};IC4=Ax9;var CC4="AI_MissingToolResultsError",SC4=`vercel.ai.error.${CC4}`,Bx9=Symbol.for(SC4),kC4,WC4=class extends X4{constructor({toolCallIds:$}){super({name:CC4,message:`Tool result${$.length>1?"s are":" is"} missing for tool call${$.length>1?"s":""} ${$.join(", ")}.`});this[kC4]=!0,this.toolCallIds=$}static isInstance($){return X4.hasMarker($,SC4)}};kC4=Bx9;var Ox9="AI_NoImageGeneratedError",Ex9=`vercel.ai.error.${Ox9}`,Mx9=Symbol.for(Ex9),Rx9;Rx9=Mx9;var vC4="AI_NoObjectGeneratedError",xC4=`vercel.ai.error.${vC4}`,qx9=Symbol.for(xC4),yC4,FN=class extends X4{constructor({message:$="No object generated.",cause:Y,text:X,response:G,usage:J,finishReason:Q}){super({name:vC4,message:$,cause:Y});this[yC4]=!0,this.text=X,this.response=G,this.usage=J,this.finishReason=Q}static isInstance($){return X4.hasMarker($,xC4)}};yC4=qx9;var bC4="AI_NoOutputGeneratedError",hC4=`vercel.ai.error.${bC4}`,Px9=Symbol.for(hC4),fC4,gC4=class extends X4{constructor({message:$="No output generated.",cause:Y}={}){super({name:bC4,message:$,cause:Y});this[fC4]=!0}static isInstance($){return X4.hasMarker($,hC4)}};fC4=Px9;var wx9="AI_NoSpeechGeneratedError",_x9=`vercel.ai.error.${wx9}`,jx9=Symbol.for(_x9),Tx9;Tx9=jx9;var Ix9="AI_NoTranscriptGeneratedError",Cx9=`vercel.ai.error.${Ix9}`,Sx9=Symbol.for(Cx9),kx9;kx9=Sx9;var vx9="AI_NoVideoGeneratedError",xx9=`vercel.ai.error.${vx9}`,yx9=Symbol.for(xx9),bx9;bx9=yx9;var mC4="AI_NoSuchToolError",uC4=`vercel.ai.error.${mC4}`,hx9=Symbol.for(uC4),pC4,pi0=class extends X4{constructor({toolName:$,availableTools:Y=void 0,message:X=`Model tried to call unavailable tool '${$}'. ${Y===void 0?"No tools are available.":`Available tools: ${Y.join(", ")}.`}`}){super({name:mC4,message:X});this[pC4]=!0,this.toolName=$,this.availableTools=Y}static isInstance($){return X4.hasMarker($,uC4)}};pC4=hx9;var dC4="AI_ToolCallRepairError",cC4=`vercel.ai.error.${dC4}`,fx9=Symbol.for(cC4),lC4,gx9=class extends X4{constructor({cause:$,originalError:Y,message:X=`Error repairing tool call: ${KU($)}`}){super({name:dC4,message:X,cause:$});this[lC4]=!0,this.originalError=Y}static isInstance($){return X4.hasMarker($,cC4)}};lC4=fx9;var mx9=class extends X4{constructor($){super({name:"AI_UnsupportedModelVersionError",message:`Unsupported model version ${$.version} for provider "${$.provider}" and model "${$.modelId}". AI SDK 5 only supports models that implement specification version "v2".`});this.version=$.version,this.provider=$.provider,this.modelId=$.modelId}},iC4="AI_UIMessageStreamError",nC4=`vercel.ai.error.${iC4}`,ux9=Symbol.for(nC4),rC4,gC=class extends X4{constructor({chunkType:$,chunkId:Y,message:X}){super({name:iC4,message:X});this[rC4]=!0,this.chunkType=$,this.chunkId=Y}static isInstance($){return X4.hasMarker($,nC4)}};rC4=ux9;var px9="AI_InvalidDataContentError",dx9=`vercel.ai.error.${px9}`,cx9=Symbol.for(dx9),lx9;lx9=cx9;var aC4="AI_InvalidMessageRoleError",sC4=`vercel.ai.error.${aC4}`,ix9=Symbol.for(sC4),oC4,nx9=class extends X4{constructor({role:$,message:Y=`Invalid message role: '${$}'. Must be one of: "system", "user", "assistant", "tool".`}){super({name:aC4,message:Y});this[oC4]=!0,this.role=$}static isInstance($){return X4.hasMarker($,sC4)}};oC4=ix9;var tC4="AI_MessageConversionError",eC4=`vercel.ai.error.${tC4}`,rx9=Symbol.for(eC4),$S4,ax9=class extends X4{constructor({originalMessage:$,message:Y}){super({name:tC4,message:Y});this[$S4]=!0,this.originalMessage=$}static isInstance($){return X4.hasMarker($,eC4)}};$S4=rx9;var YS4="AI_RetryError",XS4=`vercel.ai.error.${YS4}`,sx9=Symbol.for(XS4),GS4,KC4=class extends X4{constructor({message:$,reason:Y,errors:X}){super({name:YS4,message:$});this[GS4]=!0,this.reason=Y,this.errors=X,this.lastError=X[X.length-1]}static isInstance($){return X4.hasMarker($,XS4)}};GS4=sx9;function eM($){return $===void 0?[]:Array.isArray($)?$:[$]}async function PU($){for(let Y of eM($.callbacks)){if(Y==null)continue;try{await Y($.event)}catch(X){}}}function ox9({warning:$,provider:Y,model:X}){let G=`AI SDK Warning (${Y} / ${X}):`;switch($.type){case"unsupported":{let J=`${G} The feature "${$.feature}" is not supported.`;if($.details)J+=` ${$.details}`;return J}case"compatibility":{let J=`${G} The feature "${$.feature}" is used in a compatibility mode.`;if($.details)J+=` ${$.details}`;return J}case"other":return`${G} ${$.message}`;default:return`${G} ${JSON.stringify($,null,2)}`}}var tx9="AI SDK Warning System: To turn off warning logging, set the AI_SDK_LOG_WARNINGS global to false.",ZC4=!1,oi0=($)=>{if($.warnings.length===0)return;let Y=globalThis.AI_SDK_LOG_WARNINGS;if(Y===!1)return;if(typeof Y==="function"){Y($);return}if(!ZC4)ZC4=!0,console.info(tx9);for(let X of $.warnings)console.warn(ox9({warning:X,provider:$.provider,model:$.model}))};function ex9({provider:$,modelId:Y}){oi0({warnings:[{type:"compatibility",feature:"specificationVersion",details:"Using v2 specification compatibility mode. Some features may not be available."}],provider:$,model:Y})}function $y9($){if($.specificationVersion==="v3")return $;return ex9({provider:$.provider,modelId:$.modelId}),new Proxy($,{get(Y,X){switch(X){case"specificationVersion":return"v3";case"doGenerate":return async(...G)=>{let J=await Y.doGenerate(...G);return{...J,finishReason:JS4(J.finishReason),usage:QS4(J.usage)}};case"doStream":return async(...G)=>{let J=await Y.doStream(...G);return{...J,stream:Yy9(J.stream)}};default:return Y[X]}}})}function Yy9($){return $.pipeThrough(new TransformStream({transform(Y,X){switch(Y.type){case"finish":X.enqueue({...Y,finishReason:JS4(Y.finishReason),usage:QS4(Y.usage)});break;default:X.enqueue(Y);break}}}))}function JS4($){return{unified:$==="unknown"?"other":$,raw:void 0}}function QS4($){return{inputTokens:{total:$.inputTokens,noCache:void 0,cacheRead:$.cachedInputTokens,cacheWrite:void 0},outputTokens:{total:$.outputTokens,text:void 0,reasoning:$.reasoningTokens}}}function HG0($){if(typeof $!=="string"){if($.specificationVersion!=="v3"&&$.specificationVersion!=="v2"){let Y=$;throw new mx9({version:Y.specificationVersion,provider:Y.provider,modelId:Y.modelId})}return $y9($)}return Xy9().languageModel($)}function Xy9(){var $;return($=globalThis.AI_SDK_DEFAULT_PROVIDER)!=null?$:Lj4}function ti0($){if($==null)return;if(typeof $==="number")return $;return $.totalMs}function WS4($){if($==null||typeof $==="number")return;return $.stepMs}function Gy9($){if($==null||typeof $==="number")return;return $.chunkMs}var Jy9=[{mediaType:"image/gif",bytesPrefix:[71,73,70]},{mediaType:"image/png",bytesPrefix:[137,80,78,71]},{mediaType:"image/jpeg",bytesPrefix:[255,216]},{mediaType:"image/webp",bytesPrefix:[82,73,70,70,null,null,null,null,87,69,66,80]},{mediaType:"image/bmp",bytesPrefix:[66,77]},{mediaType:"image/tiff",bytesPrefix:[73,73,42,0]},{mediaType:"image/tiff",bytesPrefix:[77,77,0,42]},{mediaType:"image/avif",bytesPrefix:[0,0,0,32,102,116,121,112,97,118,105,102]},{mediaType:"image/heic",bytesPrefix:[0,0,0,32,102,116,121,112,104,101,105,99]}];var Qy9=($)=>{let Y=typeof $==="string"?RJ($):$,X=(Y[6]&127)<<21|(Y[7]&127)<<14|(Y[8]&127)<<7|Y[9]&127;return Y.slice(X+10)};function Wy9($){return typeof $==="string"&&$.startsWith("SUQz")||typeof $!=="string"&&$.length>10&&$[0]===73&&$[1]===68&&$[2]===51?Qy9($):$}function Ky9({data:$,signatures:Y}){let X=Wy9($),G=typeof X==="string"?RJ(X.substring(0,Math.min(X.length,24))):X;for(let J of Y)if(G.length>=J.bytesPrefix.length&&J.bytesPrefix.every((Q,W)=>Q===null||G[W]===Q))return J.mediaType;return}var KS4="6.0.183",ZS4=async({url:$,maxBytes:Y,abortSignal:X})=>{var G;let J=$.toString();mu(J);try{let Q=await fetch(J,{headers:uW({},`ai-sdk/${KS4}`,x70()),signal:X});if(Q.redirected)mu(Q.url);if(!Q.ok)throw new MJ({url:J,statusCode:Q.status,statusText:Q.statusText});return{data:await qu0({response:Q,url:J,maxBytes:Y!=null?Y:v70}),mediaType:(G=Q.headers.get("content-type"))!=null?G:void 0}}catch(Q){if(MJ.isInstance(Q))throw Q;throw new MJ({url:J,cause:Q})}},Zy9=($=ZS4)=>(Y)=>Promise.all(Y.map(async(X)=>X.isUrlSupportedByModel?null:$(X)));function Uy9($){try{let[Y,X]=$.split(",");return{mediaType:Y.split(";")[0].split(":")[1],base64Content:X}}catch(Y){return{mediaType:void 0,base64Content:void 0}}}var US4=U.union([U.string(),U.instanceof(Uint8Array),U.instanceof(ArrayBuffer),U.custom(($)=>{var Y,X;return(X=(Y=globalThis.Buffer)==null?void 0:Y.isBuffer($))!=null?X:!1},{message:"Must be a Buffer"})]);function ei0($){if($ instanceof Uint8Array)return{data:$,mediaType:void 0};if($ instanceof ArrayBuffer)return{data:new Uint8Array($),mediaType:void 0};if(typeof $==="string")try{$=new URL($)}catch(Y){}if($ instanceof URL&&$.protocol==="data:"){let{mediaType:Y,base64Content:X}=Uy9($.toString());if(Y==null||X==null)throw new X4({name:"InvalidDataContentError",message:`Invalid data URL format in content ${$.toString()}`});return{data:X,mediaType:Y}}return{data:$,mediaType:void 0}}function di0($){if(typeof $==="string")return $;if($ instanceof ArrayBuffer)return $H(new Uint8Array($));return $H($)}async function HS4({prompt:$,supportedUrls:Y,download:X=Zy9()}){let G=await zy9($.messages,X,Y),J=new Map;for(let H of $.messages)if(H.role==="assistant"&&Array.isArray(H.content)){for(let z of H.content)if(z.type==="tool-approval-request"&&"approvalId"in z&&"toolCallId"in z)J.set(z.approvalId,z.toolCallId)}let Q=new Set;for(let H of $.messages)if(H.role==="tool"){for(let z of H.content)if(z.type==="tool-approval-response"){let V=J.get(z.approvalId);if(V)Q.add(V)}}let W=[...$.system!=null?typeof $.system==="string"?[{role:"system",content:$.system}]:eM($.system).map((H)=>({role:"system",content:H.content,providerOptions:H.providerOptions})):[],...$.messages.map((H)=>Hy9({message:H,downloadedAssets:G}))],K=[];for(let H of W){if(H.role!=="tool"){K.push(H);continue}let z=K.at(-1);if((z==null?void 0:z.role)==="tool")z.content.push(...H.content);else K.push(H)}let Z=new Set;for(let H of K)switch(H.role){case"assistant":{for(let z of H.content)if(z.type==="tool-call"&&!z.providerExecuted)Z.add(z.toolCallId);break}case"tool":{for(let z of H.content)if(z.type==="tool-result")Z.delete(z.toolCallId);break}case"user":case"system":for(let z of Q)Z.delete(z);if(Z.size>0)throw new WC4({toolCallIds:Array.from(Z)});break}for(let H of Q)Z.delete(H);if(Z.size>0)throw new WC4({toolCallIds:Array.from(Z)});return K.filter((H)=>H.role!=="tool"||H.content.length>0)}function Hy9({message:$,downloadedAssets:Y}){let X=$.role;switch(X){case"system":return{role:"system",content:$.content,providerOptions:$.providerOptions};case"user":{if(typeof $.content==="string")return{role:"user",content:[{type:"text",text:$.content}],providerOptions:$.providerOptions};return{role:"user",content:$.content.map((G)=>Vy9(G,Y)).filter((G)=>G.type!=="text"||G.text!==""),providerOptions:$.providerOptions}}case"assistant":{if(typeof $.content==="string")return{role:"assistant",content:[{type:"text",text:$.content}],providerOptions:$.providerOptions};return{role:"assistant",content:$.content.filter((G)=>G.type!=="text"||G.text!==""||G.providerOptions!=null).filter((G)=>G.type!=="tool-approval-request").map((G)=>{let J=G.providerOptions;switch(G.type){case"file":{let{data:Q,mediaType:W}=ei0(G.data);return{type:"file",data:Q,filename:G.filename,mediaType:W!=null?W:G.mediaType,providerOptions:J}}case"reasoning":return{type:"reasoning",text:G.text,providerOptions:J};case"text":return{type:"text",text:G.text,providerOptions:J};case"tool-call":return{type:"tool-call",toolCallId:G.toolCallId,toolName:G.toolName,input:G.input,providerExecuted:G.providerExecuted,providerOptions:J};case"tool-result":return{type:"tool-result",toolCallId:G.toolCallId,toolName:G.toolName,output:UC4({output:G.output,downloadedAssets:Y}),providerOptions:J}}}),providerOptions:$.providerOptions}}case"tool":return{role:"tool",content:$.content.filter((G)=>G.type!=="tool-approval-response"||G.providerExecuted).map((G)=>{switch(G.type){case"tool-result":return{type:"tool-result",toolCallId:G.toolCallId,toolName:G.toolName,output:UC4({output:G.output,downloadedAssets:Y}),providerOptions:G.providerOptions};case"tool-approval-response":return{type:"tool-approval-response",approvalId:G.approvalId,approved:G.approved,reason:G.reason}}}),providerOptions:$.providerOptions};default:throw new nx9({role:X})}}async function zy9($,Y,X){var G;let J=[];for(let K of $){if(K.role==="user"&&Array.isArray(K.content)){for(let Z of K.content)if(Z.type==="image"||Z.type==="file")J.push({data:Z.type==="image"?Z.image:Z.data,mediaType:(G=Z.mediaType)!=null?G:Z.type==="image"?"image/*":void 0})}if(K.role==="tool"||K.role==="assistant"){if(!Array.isArray(K.content))continue;for(let Z of K.content){if(Z.type!=="tool-result")continue;if(Z.output.type!=="content")continue;for(let H of Z.output.value)if(H.type==="image-url"||H.type==="file-url")J.push({data:new URL(H.url),mediaType:H.type==="image-url"?"image/*":void 0})}}}let Q=J.map((K)=>{let Z=K.mediaType,{data:H}=ei0(K.data);return{mediaType:Z,data:H}}).filter((K)=>K.data instanceof URL).map((K)=>({url:K.data,isUrlSupportedByModel:K.mediaType!=null&&cV4({url:K.data.toString(),mediaType:K.mediaType,supportedUrls:X})})),W=await Y(Q);return Object.fromEntries(W.map((K,Z)=>K==null?null:[Q[Z].url.toString(),{data:K.data,mediaType:K.mediaType}]).filter((K)=>K!=null))}function Vy9($,Y){var X;if($.type==="text")return{type:"text",text:$.text,providerOptions:$.providerOptions};let G,J=$.type;switch(J){case"image":G=$.image;break;case"file":G=$.data;break;default:throw Error(`Unsupported part type: ${J}`)}let{data:Q,mediaType:W}=ei0(G),K=W!=null?W:$.mediaType,Z=Q;if(Z instanceof URL){let H=Y[Z.toString()];if(H)Z=H.data,K!=null||(K=H.mediaType)}switch(J){case"image":{if(Z instanceof Uint8Array||typeof Z==="string")K=(X=Ky9({data:Z,signatures:Jy9}))!=null?X:K;return{type:"file",mediaType:K!=null?K:"image/*",filename:void 0,data:Z,providerOptions:$.providerOptions}}case"file":{if(K==null)throw Error("Media type is missing for file part");return{type:"file",mediaType:K,filename:$.filename,data:Z,providerOptions:$.providerOptions}}}}function UC4({output:$,downloadedAssets:Y}){if($.type!=="content")return $;return{type:"content",value:$.value.map((X)=>{var G,J;if(X.type==="image-url"){let Q=Y[new URL(X.url).toString()];if(Q)return{type:"image-data",data:di0(Q.data),mediaType:(G=Q.mediaType)!=null?G:"image/*",providerOptions:X.providerOptions};return X}if(X.type==="file-url"){let Q=Y[new URL(X.url).toString()];if(Q)return{type:"file-data",data:di0(Q.data),mediaType:(J=Q.mediaType)!=null?J:"application/octet-stream",providerOptions:X.providerOptions};return X}if(X.type!=="media")return X;if(X.mediaType.startsWith("image/"))return{type:"image-data",data:X.data,mediaType:X.mediaType};return{type:"file-data",data:X.data,mediaType:X.mediaType}})}}async function tM({toolCallId:$,input:Y,output:X,tool:G,errorMode:J}){if(J==="text")return{type:"error-text",value:KU(X)};else if(J==="json")return{type:"error-json",value:HC4(X)};if(G==null?void 0:G.toModelOutput)return await G.toModelOutput({toolCallId:$,input:Y,output:X});return typeof X==="string"?{type:"text",value:X}:{type:"json",value:HC4(X)}}function HC4($){return $===void 0?null:$}function ci0({maxOutputTokens:$,temperature:Y,topP:X,topK:G,presencePenalty:J,frequencyPenalty:Q,seed:W,stopSequences:K}){if($!=null){if(!Number.isInteger($))throw new NH({parameter:"maxOutputTokens",value:$,message:"maxOutputTokens must be an integer"});if($<1)throw new NH({parameter:"maxOutputTokens",value:$,message:"maxOutputTokens must be >= 1"})}if(Y!=null){if(typeof Y!=="number")throw new NH({parameter:"temperature",value:Y,message:"temperature must be a number"})}if(X!=null){if(typeof X!=="number")throw new NH({parameter:"topP",value:X,message:"topP must be a number"})}if(G!=null){if(typeof G!=="number")throw new NH({parameter:"topK",value:G,message:"topK must be a number"})}if(J!=null){if(typeof J!=="number")throw new NH({parameter:"presencePenalty",value:J,message:"presencePenalty must be a number"})}if(Q!=null){if(typeof Q!=="number")throw new NH({parameter:"frequencyPenalty",value:Q,message:"frequencyPenalty must be a number"})}if(W!=null){if(!Number.isInteger(W))throw new NH({parameter:"seed",value:W,message:"seed must be an integer"})}return{maxOutputTokens:$,temperature:Y,topP:X,topK:G,presencePenalty:J,frequencyPenalty:Q,stopSequences:K,seed:W}}function Fy9($){return $!=null&&Object.keys($).length>0}async function zS4({tools:$,toolChoice:Y,activeTools:X}){if(!Fy9($))return{tools:void 0,toolChoice:void 0};let G=X!=null?Object.entries($).filter(([Q])=>X.includes(Q)):Object.entries($),J=[];for(let[Q,W]of G){let K=W.type;switch(K){case void 0:case"dynamic":case"function":J.push({type:"function",name:Q,description:W.description,inputSchema:await XH(W.inputSchema).jsonSchema,...W.inputExamples!=null?{inputExamples:W.inputExamples}:{},providerOptions:W.providerOptions,...W.strict!=null?{strict:W.strict}:{}});break;case"provider":J.push({type:"provider",name:Q,id:W.id,args:W.args});break;default:throw Error(`Unsupported tool type: ${K}`)}}return{tools:J,toolChoice:Y==null?{type:"auto"}:typeof Y==="string"?{type:Y}:{type:"tool",toolName:Y.toolName}}}var $R=U.lazy(()=>U.union([U.null(),U.string(),U.number(),U.boolean(),U.record(U.string(),$R.optional()),U.array($R)])),k4=U.record(U.string(),U.record(U.string(),$R.optional())),VS4=U.object({type:U.literal("text"),text:U.string(),providerOptions:k4.optional()}),Ly9=U.object({type:U.literal("image"),image:U.union([US4,U.instanceof(URL)]),mediaType:U.string().optional(),providerOptions:k4.optional()}),FS4=U.object({type:U.literal("file"),data:U.union([US4,U.instanceof(URL)]),filename:U.string().optional(),mediaType:U.string(),providerOptions:k4.optional()}),Dy9=U.object({type:U.literal("reasoning"),text:U.string(),providerOptions:k4.optional()}),Ny9=U.object({type:U.literal("tool-call"),toolCallId:U.string(),toolName:U.string(),input:U.unknown(),providerOptions:k4.optional(),providerExecuted:U.boolean().optional()}),Ay9=U.discriminatedUnion("type",[U.object({type:U.literal("text"),value:U.string(),providerOptions:k4.optional()}),U.object({type:U.literal("json"),value:$R,providerOptions:k4.optional()}),U.object({type:U.literal("execution-denied"),reason:U.string().optional(),providerOptions:k4.optional()}),U.object({type:U.literal("error-text"),value:U.string(),providerOptions:k4.optional()}),U.object({type:U.literal("error-json"),value:$R,providerOptions:k4.optional()}),U.object({type:U.literal("content"),value:U.array(U.union([U.object({type:U.literal("text"),text:U.string(),providerOptions:k4.optional()}),U.object({type:U.literal("media"),data:U.string(),mediaType:U.string()}),U.object({type:U.literal("file-data"),data:U.string(),mediaType:U.string(),filename:U.string().optional(),providerOptions:k4.optional()}),U.object({type:U.literal("file-url"),url:U.string(),providerOptions:k4.optional()}),U.object({type:U.literal("file-id"),fileId:U.union([U.string(),U.record(U.string(),U.string())]),providerOptions:k4.optional()}),U.object({type:U.literal("image-data"),data:U.string(),mediaType:U.string(),providerOptions:k4.optional()}),U.object({type:U.literal("image-url"),url:U.string(),providerOptions:k4.optional()}),U.object({type:U.literal("image-file-id"),fileId:U.union([U.string(),U.record(U.string(),U.string())]),providerOptions:k4.optional()}),U.object({type:U.literal("custom"),providerOptions:k4.optional()})]))})]),LS4=U.object({type:U.literal("tool-result"),toolCallId:U.string(),toolName:U.string(),output:Ay9,providerOptions:k4.optional()}),By9=U.object({type:U.literal("tool-approval-request"),approvalId:U.string(),toolCallId:U.string()}),Oy9=U.object({type:U.literal("tool-approval-response"),approvalId:U.string(),approved:U.boolean(),reason:U.string().optional()}),Ey9=U.object({role:U.literal("system"),content:U.string(),providerOptions:k4.optional()}),My9=U.object({role:U.literal("user"),content:U.union([U.string(),U.array(U.union([VS4,Ly9,FS4]))]),providerOptions:k4.optional()}),Ry9=U.object({role:U.literal("assistant"),content:U.union([U.string(),U.array(U.union([VS4,FS4,Dy9,Ny9,LS4,By9]))]),providerOptions:k4.optional()}),qy9=U.object({role:U.literal("tool"),content:U.array(U.union([LS4,Oy9])),providerOptions:k4.optional()}),Py9=U.union([Ey9,My9,Ry9,qy9]);async function DS4({allowSystemInMessages:$,system:Y,prompt:X,messages:G}){if(X==null&&G==null)throw new JK({prompt:X,message:"prompt or messages must be defined"});if(X!=null&&G!=null)throw new JK({prompt:X,message:"prompt and messages cannot be defined at the same time"});if(typeof Y!=="string"&&!eM(Y).every((Q)=>Q.role==="system"))throw new JK({prompt:X,message:"system must be a string, SystemModelMessage, or array of SystemModelMessage"});if(X!=null&&typeof X==="string")G=[{role:"user",content:X}];else if(X!=null&&Array.isArray(X))G=X;else if(G==null)throw new JK({prompt:X,message:"prompt or messages must be defined"});if(G.length===0)throw new JK({prompt:X,message:"messages must not be empty"});if(G.some((Q)=>Q.role==="system")){if($===!1)throw new JK({prompt:X,message:"System messages are not allowed in the prompt or messages fields. Use the system option instead."});if($===void 0)console.warn("AI SDK Warning: System messages in the prompt or messages fields can be a security risk because they may enable prompt injection attacks. Use the system option instead when possible. Set allowSystemInMessages to true to suppress this warning, or false to throw an error.")}let J=await DG({value:G,schema:U.array(Py9)});if(!J.success)throw new JK({prompt:X,message:"The messages do not match the ModelMessage[] schema.",cause:J.error});return{messages:G,system:Y}}function NS4($){if(!tX0.isInstance($))return $;let Y=(process==null?void 0:"production")==="production",X="https://ai-sdk.dev/unauthenticated-ai-gateway";if(Y)return new X4({name:"GatewayError",message:`Unauthenticated. Configure AI_GATEWAY_API_KEY or use a provider module. Learn more: ${X}`});return Object.assign(Error(`\x1B[1m\x1B[31mUnauthenticated request to AI Gateway.\x1B[0m

To authenticate, set the \x1B[33mAI_GATEWAY_API_KEY\x1B[0m environment variable with your API key.

Alternatively, you can use a provider module instead of the AI Gateway.

Learn more: \x1B[34m${X}\x1B[0m

`),{name:"GatewayAuthenticationError"})}function fd({operationId:$,telemetry:Y}){return{"operation.name":`${$}${(Y==null?void 0:Y.functionId)!=null?` ${Y.functionId}`:""}`,"resource.name":Y==null?void 0:Y.functionId,"ai.operationId":$,"ai.telemetry.functionId":Y==null?void 0:Y.functionId}}function AS4({model:$,settings:Y,telemetry:X,headers:G}){var J;return{"ai.model.provider":$.provider,"ai.model.id":$.modelId,...Object.entries(Y).reduce((Q,[W,K])=>{if(W==="timeout"){let Z=ti0(K);if(Z!=null)Q[`ai.settings.${W}`]=Z}else Q[`ai.settings.${W}`]=K;return Q},{}),...Object.entries((J=X==null?void 0:X.metadata)!=null?J:{}).reduce((Q,[W,K])=>{return Q[`ai.telemetry.metadata.${W}`]=K,Q},{}),...Object.entries(G!=null?G:{}).reduce((Q,[W,K])=>{if(K!==void 0)Q[`ai.request.headers.${W}`]=K;return Q},{})}}var wy9={startSpan(){return ZG0},startActiveSpan($,Y,X,G){if(typeof Y==="function")return Y(ZG0);if(typeof X==="function")return X(ZG0);if(typeof G==="function")return G(ZG0)}},ZG0={spanContext(){return _y9},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},addLink(){return this},addLinks(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this}},_y9={traceId:"",spanId:"",traceFlags:0};function OS4({isEnabled:$=!1,tracer:Y}={}){if(!$)return wy9;if(Y)return Y;return BS4.trace.getTracer("ai")}async function gd({name:$,tracer:Y,attributes:X,fn:G,endWhenDone:J=!0}){return Y.startActiveSpan($,{attributes:await X},async(Q)=>{let W=uC.context.active();try{let K=await uC.context.with(W,()=>G(Q));if(J)Q.end();return K}catch(K){try{ES4(Q,K)}finally{Q.end()}throw K}})}function ES4($,Y){if(Y instanceof Error)$.recordException({name:Y.name,message:Y.message,stack:Y.stack}),$.setStatus({code:uC.SpanStatusCode.ERROR,message:Y.message});else $.setStatus({code:uC.SpanStatusCode.ERROR})}async function FK({telemetry:$,attributes:Y}){if(($==null?void 0:$.isEnabled)!==!0)return{};let X={};for(let[G,J]of Object.entries(Y)){if(J==null)continue;if(typeof J==="object"&&"input"in J&&typeof J.input==="function"){if(($==null?void 0:$.recordInputs)===!1)continue;let Q=await J.input();if(Q!=null)X[G]=Q;continue}if(typeof J==="object"&&"output"in J&&typeof J.output==="function"){if(($==null?void 0:$.recordOutputs)===!1)continue;let Q=await J.output();if(Q!=null)X[G]=Q;continue}X[G]=J}return X}function MS4($){return JSON.stringify($.map((Y)=>({...Y,content:typeof Y.content==="string"?Y.content:Y.content.map((X)=>X.type==="file"?{...X,data:X.data instanceof Uint8Array?di0(X.data):X.data}:X)})))}function jy9(){var $;return($=globalThis.AI_SDK_TELEMETRY_INTEGRATIONS)!=null?$:[]}function RS4(){let $=jy9();return(Y)=>{let X=eM(Y),G=[...$,...X];function J(Q){let W=G.map(Q).filter(Boolean);return async(K)=>{for(let Z of W)try{await Z(K)}catch(H){}}}return{onStart:J((Q)=>Q.onStart),onStepStart:J((Q)=>Q.onStepStart),onToolCallStart:J((Q)=>Q.onToolCallStart),onToolCallFinish:J((Q)=>Q.onToolCallFinish),onStepFinish:J((Q)=>Q.onStepFinish),onFinish:J((Q)=>Q.onFinish)}}}function li0($){return{inputTokens:$.inputTokens.total,inputTokenDetails:{noCacheTokens:$.inputTokens.noCache,cacheReadTokens:$.inputTokens.cacheRead,cacheWriteTokens:$.inputTokens.cacheWrite},outputTokens:$.outputTokens.total,outputTokenDetails:{textTokens:$.outputTokens.text,reasoningTokens:$.outputTokens.reasoning},totalTokens:qU($.inputTokens.total,$.outputTokens.total),raw:$.raw,reasoningTokens:$.outputTokens.reasoning,cachedInputTokens:$.inputTokens.cacheRead}}function hi0(){return{inputTokens:void 0,inputTokenDetails:{noCacheTokens:void 0,cacheReadTokens:void 0,cacheWriteTokens:void 0},outputTokens:void 0,outputTokenDetails:{textTokens:void 0,reasoningTokens:void 0},totalTokens:void 0,raw:void 0}}function qS4($,Y){var X,G,J,Q,W,K,Z,H,z,V;return{inputTokens:qU($.inputTokens,Y.inputTokens),inputTokenDetails:{noCacheTokens:qU((X=$.inputTokenDetails)==null?void 0:X.noCacheTokens,(G=Y.inputTokenDetails)==null?void 0:G.noCacheTokens),cacheReadTokens:qU((J=$.inputTokenDetails)==null?void 0:J.cacheReadTokens,(Q=Y.inputTokenDetails)==null?void 0:Q.cacheReadTokens),cacheWriteTokens:qU((W=$.inputTokenDetails)==null?void 0:W.cacheWriteTokens,(K=Y.inputTokenDetails)==null?void 0:K.cacheWriteTokens)},outputTokens:qU($.outputTokens,Y.outputTokens),outputTokenDetails:{textTokens:qU((Z=$.outputTokenDetails)==null?void 0:Z.textTokens,(H=Y.outputTokenDetails)==null?void 0:H.textTokens),reasoningTokens:qU((z=$.outputTokenDetails)==null?void 0:z.reasoningTokens,(V=Y.outputTokenDetails)==null?void 0:V.reasoningTokens)},totalTokens:qU($.totalTokens,Y.totalTokens),reasoningTokens:qU($.reasoningTokens,Y.reasoningTokens),cachedInputTokens:qU($.cachedInputTokens,Y.cachedInputTokens)}}function qU($,Y){return $==null&&Y==null?void 0:($!=null?$:0)+(Y!=null?Y:0)}function VG0($,Y){if($===void 0&&Y===void 0)return;if($===void 0)return Y;if(Y===void 0)return $;let X={...$};for(let G in Y){if(G==="__proto__"||G==="constructor"||G==="prototype")continue;if(Object.prototype.hasOwnProperty.call(Y,G)){let J=Y[G];if(J===void 0)continue;let Q=G in $?$[G]:void 0,W=J!==null&&typeof J==="object"&&!Array.isArray(J)&&!(J instanceof Date)&&!(J instanceof RegExp),K=Q!==null&&Q!==void 0&&typeof Q==="object"&&!Array.isArray(Q)&&!(Q instanceof Date)&&!(Q instanceof RegExp);if(W&&K)X[G]=VG0(Q,J);else X[G]=J}}return X}function Ty9({error:$,exponentialBackoffDelay:Y}){let X=n8.isInstance($)?$.responseHeaders:n8.isInstance($.cause)?$.cause.responseHeaders:void 0;if(!X)return Y;let G,J=X["retry-after-ms"];if(J){let W=parseFloat(J);if(!Number.isNaN(W))G=W}let Q=X["retry-after"];if(Q&&G===void 0){let W=parseFloat(Q);if(!Number.isNaN(W))G=W*1000;else G=Date.parse(Q)-Date.now()}if(G!=null&&!Number.isNaN(G)&&0<=G&&(G<60000||G<Y))return G;return Y}var Iy9=({maxRetries:$=2,initialDelayInMs:Y=2000,backoffFactor:X=2,abortSignal:G}={})=>async(J)=>PS4(J,{maxRetries:$,delayInMs:Y,backoffFactor:X,abortSignal:G});async function PS4($,{maxRetries:Y,delayInMs:X,backoffFactor:G,abortSignal:J},Q=[]){try{return await $()}catch(W){if(AV(W))throw W;if(Y===0)throw W;let K=uD(W),Z=[...Q,W],H=Z.length;if(H>Y)throw new KC4({message:`Failed after ${H} attempts. Last error: ${K}`,reason:"maxRetriesExceeded",errors:Z});if(W instanceof Error&&(n8.isInstance(W)&&W.isRetryable===!0||yX.isInstance(W)&&W.isRetryable===!0)&&H<=Y)return await fV4(Ty9({error:W,exponentialBackoffDelay:X}),{abortSignal:J}),PS4($,{maxRetries:Y,delayInMs:G*X,backoffFactor:G,abortSignal:J},Z);if(H===1)throw W;throw new KC4({message:`Failed after ${H} attempts with non-retryable error: '${K}'`,reason:"errorNotRetryable",errors:Z})}}function wS4({maxRetries:$,abortSignal:Y}){if($!=null){if(!Number.isInteger($))throw new NH({parameter:"maxRetries",value:$,message:"maxRetries must be an integer"});if($<0)throw new NH({parameter:"maxRetries",value:$,message:"maxRetries must be >= 0"})}let X=$!=null?$:2;return{maxRetries:X,retry:Iy9({maxRetries:X,abortSignal:Y})}}function _S4({messages:$}){let Y=$.at(-1);if((Y==null?void 0:Y.role)!="tool")return{approvedToolApprovals:[],deniedToolApprovals:[]};let X={};for(let Z of $)if(Z.role==="assistant"&&typeof Z.content!=="string"){let H=Z.content;for(let z of H)if(z.type==="tool-call")X[z.toolCallId]=z}let G={};for(let Z of $)if(Z.role==="assistant"&&typeof Z.content!=="string"){let H=Z.content;for(let z of H)if(z.type==="tool-approval-request")G[z.approvalId]=z}let J={};for(let Z of Y.content)if(Z.type==="tool-result")J[Z.toolCallId]=Z;let Q=[],W=[],K=Y.content.filter((Z)=>Z.type==="tool-approval-response");for(let Z of K){let H=G[Z.approvalId];if(H==null)throw new Dx9({approvalId:Z.approvalId});if(J[H.toolCallId]!=null)continue;let z=X[H.toolCallId];if(z==null)throw new si0({toolCallId:H.toolCallId,approvalId:H.approvalId});let V={approvalRequest:H,approvalResponse:Z,toolCall:z};if(Z.approved)Q.push(V);else W.push(V)}return{approvedToolApprovals:Q,deniedToolApprovals:W}}function UG0(){var $,Y;return(Y=($=globalThis==null?void 0:globalThis.performance)==null?void 0:$.now())!=null?Y:Date.now()}async function $n0({toolCall:$,tools:Y,tracer:X,telemetry:G,messages:J,abortSignal:Q,experimental_context:W,stepNumber:K,model:Z,onPreliminaryToolResult:H,onToolCallStart:z,onToolCallFinish:V}){let{toolName:F,toolCallId:L,input:N}=$,D=Y==null?void 0:Y[F];if((D==null?void 0:D.execute)==null)return;let A={stepNumber:K,model:Z,toolCall:$,messages:J,abortSignal:Q,functionId:G==null?void 0:G.functionId,metadata:G==null?void 0:G.metadata,experimental_context:W};return gd({name:"ai.toolCall",attributes:FK({telemetry:G,attributes:{...fd({operationId:"ai.toolCall",telemetry:G}),"ai.toolCall.name":F,"ai.toolCall.id":L,"ai.toolCall.args":{output:()=>JSON.stringify(N)}}}),tracer:X,fn:async(B)=>{let O;await PU({event:A,callbacks:z});let E=UG0();try{let R=$F4({execute:D.execute.bind(D),input:N,options:{toolCallId:L,messages:J,abortSignal:Q,experimental_context:W}});for await(let q of R)if(q.type==="preliminary")H==null||H({...$,type:"tool-result",output:q.output,preliminary:!0});else O=q.output}catch(R){let q=UG0()-E;return await PU({event:{...A,success:!1,error:R,durationMs:q},callbacks:V}),ES4(B,R),{type:"tool-error",toolCallId:L,toolName:F,input:N,error:R,dynamic:D.type==="dynamic",...$.providerMetadata!=null?{providerMetadata:$.providerMetadata}:{},...$.toolMetadata!=null?{toolMetadata:$.toolMetadata}:{}}}let M=UG0()-E;await PU({event:{...A,success:!0,output:O,durationMs:M},callbacks:V});try{B.setAttributes(await FK({telemetry:G,attributes:{"ai.toolCall.result":{output:()=>JSON.stringify(O)}}}))}catch(R){}return{type:"tool-result",toolCallId:L,toolName:F,input:N,output:O,dynamic:D.type==="dynamic",...$.providerMetadata!=null?{providerMetadata:$.providerMetadata}:{},...$.toolMetadata!=null?{toolMetadata:$.toolMetadata}:{}}}})}function zC4($){let Y=$.filter((X)=>X.type==="reasoning");return Y.length===0?void 0:Y.map((X)=>X.text).join(`
`)}function VC4($){let Y=$.filter((X)=>X.type==="text");if(Y.length===0)return;return Y.map((X)=>X.text).join("")}var jS4=class{constructor({data:$,mediaType:Y}){let X=$ instanceof Uint8Array;this.base64Data=X?void 0:$,this.uint8ArrayData=X?$:void 0,this.mediaType=Y}get base64(){if(this.base64Data==null)this.base64Data=$H(this.uint8ArrayData);return this.base64Data}get uint8Array(){if(this.uint8ArrayData==null)this.uint8ArrayData=RJ(this.base64Data);return this.uint8ArrayData}},Cy9=class extends jS4{constructor($){super($);this.type="file"}};async function TS4({tool:$,toolCall:Y,messages:X,experimental_context:G}){if($.needsApproval==null)return!1;if(typeof $.needsApproval==="boolean")return $.needsApproval;return await $.needsApproval(Y.input,{toolCallId:Y.toolCallId,messages:X,experimental_context:G})}var Sy9={};Zx9(Sy9,{array:()=>xy9,choice:()=>yy9,json:()=>by9,object:()=>vy9,text:()=>zG0});function ky9($){let Y=["ROOT"],X=-1,G=null;function J(Z,H,z){switch(Z){case'"':{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_STRING");break}case"f":case"t":case"n":{X=H,G=H,Y.pop(),Y.push(z),Y.push("INSIDE_LITERAL");break}case"-":{Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_NUMBER");break}case"{":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_OBJECT_START");break}case"[":{X=H,Y.pop(),Y.push(z),Y.push("INSIDE_ARRAY_START");break}}}function Q(Z,H){switch(Z){case",":{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{X=H,Y.pop();break}}}function W(Z,H){switch(Z){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=H,Y.pop();break}}}for(let Z=0;Z<$.length;Z++){let H=$[Z];switch(Y[Y.length-1]){case"ROOT":J(H,Z,"FINISH");break;case"INSIDE_OBJECT_START":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}case"}":{X=Z,Y.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(H){case'"':{Y.pop(),Y.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(H){case":":{Y.pop(),Y.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{J(H,Z,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{Q(H,Z);break}case"INSIDE_STRING":{switch(H){case'"':{Y.pop(),X=Z;break}case"\\":{Y.push("INSIDE_STRING_ESCAPE");break}default:X=Z}break}case"INSIDE_ARRAY_START":{switch(H){case"]":{X=Z,Y.pop();break}default:{X=Z,J(H,Z,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(H){case",":{Y.pop(),Y.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{X=Z,Y.pop();break}default:{X=Z;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{J(H,Z,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{Y.pop(),X=Z;break}case"INSIDE_NUMBER":{switch(H){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{X=Z;break}case"e":case"E":case"-":case".":break;case",":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z);if(Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);break}case"}":{if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);break}case"]":{if(Y.pop(),Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z);break}default:{Y.pop();break}}break}case"INSIDE_LITERAL":{let V=$.substring(G,Z+1);if(!"false".startsWith(V)&&!"true".startsWith(V)&&!"null".startsWith(V)){if(Y.pop(),Y[Y.length-1]==="INSIDE_OBJECT_AFTER_VALUE")Q(H,Z);else if(Y[Y.length-1]==="INSIDE_ARRAY_AFTER_VALUE")W(H,Z)}else X=Z;break}}}let K=$.slice(0,X+1);for(let Z=Y.length-1;Z>=0;Z--)switch(Y[Z]){case"INSIDE_STRING":{K+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{K+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{K+="]";break}case"INSIDE_LITERAL":{let z=$.substring(G,$.length);if("true".startsWith(z))K+="true".slice(z.length);else if("false".startsWith(z))K+="false".slice(z.length);else if("null".startsWith(z))K+="null".slice(z.length)}}return K}async function md($){if($===void 0)return{value:void 0,state:"undefined-input"};let Y=await kQ({text:$});if(Y.success)return{value:Y.value,state:"successful-parse"};if(Y=await kQ({text:ky9($)}),Y.success)return{value:Y.value,state:"repaired-parse"};return{value:void 0,state:"failed-parse"}}var zG0=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:$}){return $},async parsePartialOutput({text:$}){return{partial:$}},createElementStreamTransform(){return}}),vy9=({schema:$,name:Y,description:X})=>{let G=XH($);return{name:"object",responseFormat:S5(G.jsonSchema).then((J)=>({type:"json",schema:J,...Y!=null&&{name:Y},...X!=null&&{description:X}})),async parseCompleteOutput({text:J},Q){let W=await kQ({text:J});if(!W.success)throw new FN({message:"No object generated: could not parse the response.",cause:W.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});let K=await DG({value:W.value,schema:G});if(!K.success)throw new FN({message:"No object generated: response did not match schema.",cause:K.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});return K.value},async parsePartialOutput({text:J}){let Q=await md(J);switch(Q.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:Q.value}}},createElementStreamTransform(){return}}},xy9=({element:$,name:Y,description:X})=>{let G=XH($);return{name:"array",responseFormat:S5(G.jsonSchema).then((J)=>{let{$schema:Q,...W}=J;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:W}},required:["elements"],additionalProperties:!1},...Y!=null&&{name:Y},...X!=null&&{description:X}}}),async parseCompleteOutput({text:J},Q){let W=await kQ({text:J});if(!W.success)throw new FN({message:"No object generated: could not parse the response.",cause:W.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});let K=W.value;if(K==null||typeof K!=="object"||!("elements"in K)||!Array.isArray(K.elements))throw new FN({message:"No object generated: response did not match schema.",cause:new ZU({value:K,cause:"response must be an object with an elements array"}),text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason});for(let Z of K.elements){let H=await DG({value:Z,schema:G});if(!H.success)throw new FN({message:"No object generated: response did not match schema.",cause:H.error,text:J,response:Q.response,usage:Q.usage,finishReason:Q.finishReason})}return K.elements},async parsePartialOutput({text:J}){let Q=await md(J);switch(Q.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let W=Q.value;if(W==null||typeof W!=="object"||!("elements"in W)||!Array.isArray(W.elements))return;let K=Q.state==="repaired-parse"&&W.elements.length>0?W.elements.slice(0,-1):W.elements,Z=[];for(let H of K){let z=await DG({value:H,schema:G});if(z.success)Z.push(z.value)}return{partial:Z}}}},createElementStreamTransform(){let J=0;return new TransformStream({transform({partialOutput:Q},W){if(Q!=null)for(;J<Q.length;J++)W.enqueue(Q[J])}})}}},yy9=({options:$,name:Y,description:X})=>{return{name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:$}},required:["result"],additionalProperties:!1},...Y!=null&&{name:Y},...X!=null&&{description:X}}),async parseCompleteOutput({text:G},J){let Q=await kQ({text:G});if(!Q.success)throw new FN({message:"No object generated: could not parse the response.",cause:Q.error,text:G,response:J.response,usage:J.usage,finishReason:J.finishReason});let W=Q.value;if(W==null||typeof W!=="object"||!("result"in W)||typeof W.result!=="string"||!$.includes(W.result))throw new FN({message:"No object generated: response did not match schema.",cause:new ZU({value:W,cause:"response must be an object that contains a choice value."}),text:G,response:J.response,usage:J.usage,finishReason:J.finishReason});return W.result},async parsePartialOutput({text:G}){let J=await md(G);switch(J.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let Q=J.value;if(Q==null||typeof Q!=="object"||!("result"in Q)||typeof Q.result!=="string")return;let W=$.filter((K)=>K.startsWith(Q.result));if(J.state==="successful-parse")return W.includes(Q.result)?{partial:Q.result}:void 0;else return W.length===1?{partial:W[0]}:void 0}}},createElementStreamTransform(){return}}},by9=({name:$,description:Y}={})=>{return{name:"json",responseFormat:Promise.resolve({type:"json",...$!=null&&{name:$},...Y!=null&&{description:Y}}),async parseCompleteOutput({text:X},G){let J=await kQ({text:X});if(!J.success)throw new FN({message:"No object generated: could not parse the response.",cause:J.error,text:X,response:G.response,usage:G.usage,finishReason:G.finishReason});return J.value},async parsePartialOutput({text:X}){let G=await md(X);switch(G.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return G.value===void 0?void 0:{partial:G.value}}},createElementStreamTransform(){return}}};async function IS4({toolCall:$,tools:Y,repairToolCall:X,system:G,messages:J}){try{if(Y==null){if($.providerExecuted&&$.dynamic)return await CS4($);throw new pi0({toolName:$.toolName})}try{return await FC4({toolCall:$,tools:Y})}catch(Q){if(X==null||!(pi0.isInstance(Q)||ai0.isInstance(Q)))throw Q;let W=null;try{W=await X({toolCall:$,tools:Y,inputSchema:async({toolName:K})=>{let{inputSchema:Z}=Y[K];return await XH(Z).jsonSchema},system:G,messages:J,error:Q})}catch(K){throw new gx9({cause:K,originalError:Q})}if(W==null)throw Q;return await FC4({toolCall:W,tools:Y})}}catch(Q){let W=await kQ({text:$.input}),K=W.success?W.value:$.input,Z=Y==null?void 0:Y[$.toolName];return{type:"tool-call",toolCallId:$.toolCallId,toolName:$.toolName,input:K,dynamic:!0,invalid:!0,error:Q,title:Z==null?void 0:Z.title,providerExecuted:$.providerExecuted,providerMetadata:$.providerMetadata,...(Z==null?void 0:Z.metadata)!=null?{toolMetadata:Z.metadata}:{}}}}async function CS4($){let Y=$.input.trim()===""?{success:!0,value:{}}:await kQ({text:$.input});if(Y.success===!1)throw new ai0({toolName:$.toolName,toolInput:$.input,cause:Y.error});return{type:"tool-call",toolCallId:$.toolCallId,toolName:$.toolName,input:Y.value,providerExecuted:!0,dynamic:!0,providerMetadata:$.providerMetadata}}async function FC4({toolCall:$,tools:Y}){let X=$.toolName,G=Y[X];if(G==null){if($.providerExecuted&&$.dynamic)return await CS4($);throw new pi0({toolName:$.toolName,availableTools:Object.keys(Y)})}let J=XH(G.inputSchema),Q=$.input.trim()===""?await DG({value:{},schema:J}):await kQ({text:$.input,schema:J});if(Q.success===!1)throw new ai0({toolName:X,toolInput:$.input,cause:Q.error});return G.type==="dynamic"?{type:"tool-call",toolCallId:$.toolCallId,toolName:$.toolName,input:Q.value,providerExecuted:$.providerExecuted,providerMetadata:$.providerMetadata,...G.metadata!=null?{toolMetadata:G.metadata}:{},dynamic:!0,title:G.title}:{type:"tool-call",toolCallId:$.toolCallId,toolName:X,input:Q.value,providerExecuted:$.providerExecuted,providerMetadata:$.providerMetadata,...G.metadata!=null?{toolMetadata:G.metadata}:{},title:G.title}}var SS4=class{constructor({stepNumber:$,model:Y,functionId:X,metadata:G,experimental_context:J,content:Q,finishReason:W,rawFinishReason:K,usage:Z,warnings:H,request:z,response:V,providerMetadata:F}){this.stepNumber=$,this.model=Y,this.functionId=X,this.metadata=G,this.experimental_context=J,this.content=Q,this.finishReason=W,this.rawFinishReason=K,this.usage=Z,this.warnings=H,this.request=z,this.response=V,this.providerMetadata=F}get text(){return this.content.filter(($)=>$.type==="text").map(($)=>$.text).join("")}get reasoning(){return this.content.filter(($)=>$.type==="reasoning")}get reasoningText(){return this.reasoning.length===0?void 0:this.reasoning.map(($)=>$.text).join("")}get files(){return this.content.filter(($)=>$.type==="file").map(($)=>$.file)}get sources(){return this.content.filter(($)=>$.type==="source")}get toolCalls(){return this.content.filter(($)=>$.type==="tool-call")}get staticToolCalls(){return this.toolCalls.filter(($)=>$.dynamic!==!0)}get dynamicToolCalls(){return this.toolCalls.filter(($)=>$.dynamic===!0)}get toolResults(){return this.content.filter(($)=>$.type==="tool-result")}get staticToolResults(){return this.toolResults.filter(($)=>$.dynamic!==!0)}get dynamicToolResults(){return this.toolResults.filter(($)=>$.dynamic===!0)}};function kS4($){return({steps:Y})=>Y.length===$}async function vS4({stopConditions:$,steps:Y}){return(await Promise.all($.map((X)=>X({steps:Y})))).some((X)=>X)}async function ii0({content:$,tools:Y}){let X=[],G=[];for(let Q of $){if(Q.type==="source")continue;if((Q.type==="tool-result"||Q.type==="tool-error")&&!Q.providerExecuted)continue;if(Q.type==="text"&&Q.text.length===0)continue;switch(Q.type){case"text":G.push({type:"text",text:Q.text,providerOptions:Q.providerMetadata});break;case"reasoning":G.push({type:"reasoning",text:Q.text,providerOptions:Q.providerMetadata});break;case"file":G.push({type:"file",data:Q.file.base64,mediaType:Q.file.mediaType,providerOptions:Q.providerMetadata});break;case"tool-call":G.push({type:"tool-call",toolCallId:Q.toolCallId,toolName:Q.toolName,input:Q.invalid&&typeof Q.input!=="object"?{}:Q.input,providerExecuted:Q.providerExecuted,providerOptions:Q.providerMetadata});break;case"tool-result":{let W=await tM({toolCallId:Q.toolCallId,input:Q.input,tool:Y==null?void 0:Y[Q.toolName],output:Q.output,errorMode:"none"});G.push({type:"tool-result",toolCallId:Q.toolCallId,toolName:Q.toolName,output:W,providerOptions:Q.providerMetadata});break}case"tool-error":{let W=await tM({toolCallId:Q.toolCallId,input:Q.input,tool:Y==null?void 0:Y[Q.toolName],output:Q.error,errorMode:"json"});G.push({type:"tool-result",toolCallId:Q.toolCallId,toolName:Q.toolName,output:W,providerOptions:Q.providerMetadata});break}case"tool-approval-request":G.push({type:"tool-approval-request",approvalId:Q.approvalId,toolCallId:Q.toolCall.toolCallId});break}}if(G.length>0)X.push({role:"assistant",content:G});let J=[];for(let Q of $){if(!(Q.type==="tool-result"||Q.type==="tool-error")||Q.providerExecuted)continue;let W=await tM({toolCallId:Q.toolCallId,input:Q.input,tool:Y==null?void 0:Y[Q.toolName],output:Q.type==="tool-result"?Q.output:Q.error,errorMode:Q.type==="tool-error"?"text":"none"});J.push({type:"tool-result",toolCallId:Q.toolCallId,toolName:Q.toolName,output:W,...Q.providerMetadata!=null?{providerOptions:Q.providerMetadata}:{}})}if(J.length>0)X.push({role:"tool",content:J});return X}function xS4(...$){let Y=$.filter((G)=>G!=null);if(Y.length===0)return;if(Y.length===1)return Y[0];let X=new AbortController;for(let G of Y){if(G.aborted)return X.abort(G.reason),X.signal;G.addEventListener("abort",()=>{X.abort(G.reason)},{once:!0})}return X.signal}var hy9=YH({prefix:"aitxt",size:24});async function jV({model:$,tools:Y,toolChoice:X,system:G,prompt:J,messages:Q,allowSystemInMessages:W,maxRetries:K,abortSignal:Z,timeout:H,headers:z,stopWhen:V=kS4(1),experimental_output:F,output:L=F,experimental_telemetry:N,providerOptions:D,experimental_activeTools:A,activeTools:B=A,experimental_prepareStep:O,prepareStep:E=O,experimental_repairToolCall:M,experimental_download:R,experimental_context:q,experimental_include:_,_internal:{generateId:P=hy9}={},experimental_onStart:w,experimental_onStepStart:j,experimental_onToolCallStart:C,experimental_onToolCallFinish:k,onStepFinish:S,onFinish:I,...v}){let x=HG0($),y=RS4(),d=eM(V),u=ti0(H),b=WS4(H),g=b!=null?new AbortController:void 0,p=xS4(Z,u!=null?AbortSignal.timeout(u):void 0,g==null?void 0:g.signal),{maxRetries:h,retry:n}=wS4({maxRetries:K,abortSignal:p}),t=ci0(v),s=uW(z!=null?z:{},`ai/${KS4}`),K0=AS4({model:x,telemetry:N,headers:s,settings:{...t,maxRetries:h}}),X0={provider:x.provider,modelId:x.modelId},a=await DS4({system:G,prompt:J,messages:Q,allowSystemInMessages:W}),Q0=y(N==null?void 0:N.integrations);await PU({event:{model:X0,system:G,prompt:J,messages:Q,tools:Y,toolChoice:X,activeTools:B,maxOutputTokens:t.maxOutputTokens,temperature:t.temperature,topP:t.topP,topK:t.topK,presencePenalty:t.presencePenalty,frequencyPenalty:t.frequencyPenalty,stopSequences:t.stopSequences,seed:t.seed,maxRetries:h,timeout:H,headers:z,providerOptions:D,stopWhen:V,output:L,abortSignal:Z,include:_,functionId:N==null?void 0:N.functionId,metadata:N==null?void 0:N.metadata,experimental_context:q},callbacks:[w,Q0.onStart]});let e=OS4(N);try{return await gd({name:"ai.generateText",attributes:FK({telemetry:N,attributes:{...fd({operationId:"ai.generateText",telemetry:N}),...K0,"ai.model.provider":x.provider,"ai.model.id":x.modelId,"ai.prompt":{input:()=>JSON.stringify({system:G,prompt:J,messages:Q})}}}),tracer:e,fn:async(m)=>{var $0,Y0,Z0,F0,D0,O0,R0,P0,f0,p0,U4,P1,d1,C0,n0,J0,B0,Y1,c1,C4;let c4=a.messages,r4=[],{approvedToolApprovals:T6,deniedToolApprovals:p6}=_S4({messages:c4}),n6=T6.filter((z6)=>!z6.toolCall.providerExecuted);if(p6.length>0||n6.length>0){let z6=await LC4({toolCalls:n6.map((b4)=>b4.toolCall),tools:Y,tracer:e,telemetry:N,messages:c4,abortSignal:p,experimental_context:q,stepNumber:0,model:X0,onToolCallStart:[C,Q0.onToolCallStart],onToolCallFinish:[k,Q0.onToolCallFinish]}),K4=[];for(let b4 of z6){let N0=await tM({toolCallId:b4.toolCallId,input:b4.input,tool:Y==null?void 0:Y[b4.toolName],output:b4.type==="tool-result"?b4.output:b4.error,errorMode:b4.type==="tool-error"?"text":"none"});K4.push({type:"tool-result",toolCallId:b4.toolCallId,toolName:b4.toolName,output:N0})}for(let b4 of p6)K4.push({type:"tool-result",toolCallId:b4.toolCall.toolCallId,toolName:b4.toolCall.toolName,output:{type:"execution-denied",reason:b4.approvalResponse.reason,...b4.toolCall.providerExecuted&&{providerOptions:{openai:{approvalId:b4.approvalResponse.approvalId}}}}});r4.push({role:"tool",content:K4})}let Z1=ci0(v),J4,I6=[],t4=[],a1=[],F1=new Map;do{let z6=b!=null?setTimeout(()=>g.abort(),b):void 0;try{let K4=[...c4,...r4],b4=await(E==null?void 0:E({model:x,steps:a1,stepNumber:a1.length,messages:K4,experimental_context:q})),N0=HG0(($0=b4==null?void 0:b4.model)!=null?$0:x),h0={provider:N0.provider,modelId:N0.modelId},a0=await HS4({prompt:{system:(Y0=b4==null?void 0:b4.system)!=null?Y0:a.system,messages:(Z0=b4==null?void 0:b4.messages)!=null?Z0:K4},supportedUrls:await N0.supportedUrls,download:R});q=(F0=b4==null?void 0:b4.experimental_context)!=null?F0:q;let c0=(D0=b4==null?void 0:b4.activeTools)!=null?D0:B,{toolChoice:L1,tools:E1}=await zS4({tools:Y,toolChoice:(O0=b4==null?void 0:b4.toolChoice)!=null?O0:X,activeTools:c0}),l4=(R0=b4==null?void 0:b4.messages)!=null?R0:K4,Q1=(P0=b4==null?void 0:b4.system)!=null?P0:a.system,C1=VG0(D,b4==null?void 0:b4.providerOptions);await PU({event:{stepNumber:a1.length,model:h0,system:Q1,messages:l4,tools:Y,toolChoice:L1,activeTools:c0,steps:[...a1],providerOptions:C1,timeout:H,headers:z,stopWhen:V,output:L,abortSignal:Z,include:_,functionId:N==null?void 0:N.functionId,metadata:N==null?void 0:N.metadata,experimental_context:q},callbacks:[j,Q0.onStepStart]}),J4=await n(()=>{var R4;return gd({name:"ai.generateText.doGenerate",attributes:FK({telemetry:N,attributes:{...fd({operationId:"ai.generateText.doGenerate",telemetry:N}),...K0,"ai.model.provider":N0.provider,"ai.model.id":N0.modelId,"ai.prompt.messages":{input:()=>MS4(a0)},"ai.prompt.tools":{input:()=>E1==null?void 0:E1.map((y8)=>JSON.stringify(y8))},"ai.prompt.toolChoice":{input:()=>L1!=null?JSON.stringify(L1):void 0},"gen_ai.system":N0.provider,"gen_ai.request.model":N0.modelId,"gen_ai.request.frequency_penalty":v.frequencyPenalty,"gen_ai.request.max_tokens":v.maxOutputTokens,"gen_ai.request.presence_penalty":v.presencePenalty,"gen_ai.request.stop_sequences":v.stopSequences,"gen_ai.request.temperature":(R4=v.temperature)!=null?R4:void 0,"gen_ai.request.top_k":v.topK,"gen_ai.request.top_p":v.topP}}),tracer:e,fn:async(y8)=>{var A5,X$,u$,t6,bX,GR,LK,DK;let O9=await N0.doGenerate({...Z1,tools:E1,toolChoice:L1,responseFormat:await(L==null?void 0:L.responseFormat),prompt:a0,providerOptions:C1,abortSignal:p,headers:s}),tW={id:(X$=(A5=O9.response)==null?void 0:A5.id)!=null?X$:P(),timestamp:(t6=(u$=O9.response)==null?void 0:u$.timestamp)!=null?t6:new Date,modelId:(GR=(bX=O9.response)==null?void 0:bX.modelId)!=null?GR:N0.modelId,headers:(LK=O9.response)==null?void 0:LK.headers,body:(DK=O9.response)==null?void 0:DK.body},_U=li0(O9.usage);return y8.setAttributes(await FK({telemetry:N,attributes:{"ai.response.finishReason":O9.finishReason.unified,"ai.response.text":{output:()=>VC4(O9.content)},"ai.response.reasoning":{output:()=>zC4(O9.content)},"ai.response.toolCalls":{output:()=>{let IV=DC4(O9.content);return IV==null?void 0:JSON.stringify(IV)}},"ai.response.id":tW.id,"ai.response.model":tW.modelId,"ai.response.timestamp":tW.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(O9.providerMetadata),"ai.usage.inputTokens":O9.usage.inputTokens.total,"ai.usage.inputTokenDetails.noCacheTokens":O9.usage.inputTokens.noCache,"ai.usage.inputTokenDetails.cacheReadTokens":O9.usage.inputTokens.cacheRead,"ai.usage.inputTokenDetails.cacheWriteTokens":O9.usage.inputTokens.cacheWrite,"ai.usage.outputTokens":O9.usage.outputTokens.total,"ai.usage.outputTokenDetails.textTokens":O9.usage.outputTokens.text,"ai.usage.outputTokenDetails.reasoningTokens":O9.usage.outputTokens.reasoning,"ai.usage.totalTokens":_U.totalTokens,"ai.usage.reasoningTokens":O9.usage.outputTokens.reasoning,"ai.usage.cachedInputTokens":O9.usage.inputTokens.cacheRead,"gen_ai.response.finish_reasons":[O9.finishReason.unified],"gen_ai.response.id":tW.id,"gen_ai.response.model":tW.modelId,"gen_ai.usage.input_tokens":O9.usage.inputTokens.total,"gen_ai.usage.output_tokens":O9.usage.outputTokens.total}})),{...O9,response:tW}}})});let f4=await Promise.all(J4.content.filter((R4)=>R4.type==="tool-call").map((R4)=>IS4({toolCall:R4,tools:Y,repairToolCall:M,system:G,messages:K4}))),A6={};for(let R4 of f4){if(R4.invalid)continue;let y8=Y==null?void 0:Y[R4.toolName];if(y8==null)continue;if((y8==null?void 0:y8.onInputAvailable)!=null)await y8.onInputAvailable({input:R4.input,toolCallId:R4.toolCallId,messages:K4,abortSignal:p,experimental_context:q});if(await TS4({tool:y8,toolCall:R4,messages:K4,experimental_context:q}))A6[R4.toolCallId]={type:"tool-approval-request",approvalId:P(),toolCall:R4}}let J9=f4.filter((R4)=>R4.invalid&&R4.dynamic);t4=[];for(let R4 of J9)t4.push({type:"tool-error",toolCallId:R4.toolCallId,toolName:R4.toolName,input:R4.input,error:uD(R4.error),dynamic:!0});if(I6=f4.filter((R4)=>!R4.providerExecuted),Y!=null)t4.push(...await LC4({toolCalls:I6.filter((R4)=>!R4.invalid&&A6[R4.toolCallId]==null),tools:Y,tracer:e,telemetry:N,messages:K4,abortSignal:p,experimental_context:q,stepNumber:a1.length,model:h0,onToolCallStart:[C,Q0.onToolCallStart],onToolCallFinish:[k,Q0.onToolCallFinish]}));for(let R4 of f4){if(!R4.providerExecuted)continue;let y8=Y==null?void 0:Y[R4.toolName];if((y8==null?void 0:y8.type)==="provider"&&y8.supportsDeferredResults){if(!J4.content.some((X$)=>X$.type==="tool-result"&&X$.toolCallId===R4.toolCallId))F1.set(R4.toolCallId,{toolName:R4.toolName})}}for(let R4 of J4.content)if(R4.type==="tool-result")F1.delete(R4.toolCallId);let o7=gy9({content:J4.content,toolCalls:f4,toolOutputs:t4,toolApprovalRequests:Object.values(A6),tools:Y});r4.push(...await ii0({content:o7,tools:Y}));let $4=((f0=_==null?void 0:_.requestBody)!=null?f0:!0)?(p0=J4.request)!=null?p0:{}:{...J4.request,body:void 0},i4={...J4.response,messages:structuredClone(r4),body:((U4=_==null?void 0:_.responseBody)!=null?U4:!0)?(P1=J4.response)==null?void 0:P1.body:void 0},C9=a1.length,R6=new SS4({stepNumber:C9,model:h0,functionId:N==null?void 0:N.functionId,metadata:N==null?void 0:N.metadata,experimental_context:q,content:o7,finishReason:J4.finishReason.unified,rawFinishReason:J4.finishReason.raw,usage:li0(J4.usage),warnings:J4.warnings,providerMetadata:J4.providerMetadata,request:$4,response:i4});oi0({warnings:(d1=J4.warnings)!=null?d1:[],provider:h0.provider,model:h0.modelId}),a1.push(R6),await PU({event:R6,callbacks:[S,Q0.onStepFinish]})}finally{if(z6!=null)clearTimeout(z6)}}while((I6.length>0&&t4.length===I6.length||F1.size>0)&&!await vS4({stopConditions:d,steps:a1}));m.setAttributes(await FK({telemetry:N,attributes:{"ai.response.finishReason":J4.finishReason.unified,"ai.response.text":{output:()=>VC4(J4.content)},"ai.response.reasoning":{output:()=>zC4(J4.content)},"ai.response.toolCalls":{output:()=>{let z6=DC4(J4.content);return z6==null?void 0:JSON.stringify(z6)}},"ai.response.providerMetadata":JSON.stringify(J4.providerMetadata)}}));let I1=a1[a1.length-1],M4=a1.reduce((z6,K4)=>{return qS4(z6,K4.usage)},{inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0});m.setAttributes(await FK({telemetry:N,attributes:{"ai.usage.inputTokens":M4.inputTokens,"ai.usage.inputTokenDetails.noCacheTokens":(C0=M4.inputTokenDetails)==null?void 0:C0.noCacheTokens,"ai.usage.inputTokenDetails.cacheReadTokens":(n0=M4.inputTokenDetails)==null?void 0:n0.cacheReadTokens,"ai.usage.inputTokenDetails.cacheWriteTokens":(J0=M4.inputTokenDetails)==null?void 0:J0.cacheWriteTokens,"ai.usage.outputTokens":M4.outputTokens,"ai.usage.outputTokenDetails.textTokens":(B0=M4.outputTokenDetails)==null?void 0:B0.textTokens,"ai.usage.outputTokenDetails.reasoningTokens":(Y1=M4.outputTokenDetails)==null?void 0:Y1.reasoningTokens,"ai.usage.totalTokens":M4.totalTokens,"ai.usage.reasoningTokens":(c1=M4.outputTokenDetails)==null?void 0:c1.reasoningTokens,"ai.usage.cachedInputTokens":(C4=M4.inputTokenDetails)==null?void 0:C4.cacheReadTokens}})),await PU({event:{stepNumber:I1.stepNumber,model:I1.model,functionId:I1.functionId,metadata:I1.metadata,experimental_context:I1.experimental_context,finishReason:I1.finishReason,rawFinishReason:I1.rawFinishReason,usage:I1.usage,content:I1.content,text:I1.text,reasoningText:I1.reasoningText,reasoning:I1.reasoning,files:I1.files,sources:I1.sources,toolCalls:I1.toolCalls,staticToolCalls:I1.staticToolCalls,dynamicToolCalls:I1.dynamicToolCalls,toolResults:I1.toolResults,staticToolResults:I1.staticToolResults,dynamicToolResults:I1.dynamicToolResults,request:I1.request,response:I1.response,warnings:I1.warnings,providerMetadata:I1.providerMetadata,steps:a1,totalUsage:M4},callbacks:[I,Q0.onFinish]});let w4;if(I1.finishReason==="stop")w4=await(L!=null?L:zG0()).parseCompleteOutput({text:I1.text},{response:I1.response,usage:I1.usage,finishReason:I1.finishReason});return new fy9({steps:a1,totalUsage:M4,output:w4})}})}catch(m){throw NS4(m)}}async function LC4({toolCalls:$,tools:Y,tracer:X,telemetry:G,messages:J,abortSignal:Q,experimental_context:W,stepNumber:K,model:Z,onToolCallStart:H,onToolCallFinish:z}){return(await Promise.all($.map(async(F)=>$n0({toolCall:F,tools:Y,tracer:X,telemetry:G,messages:J,abortSignal:Q,experimental_context:W,stepNumber:K,model:Z,onToolCallStart:H,onToolCallFinish:z})))).filter((F)=>F!=null)}var fy9=class{constructor($){this.steps=$.steps,this._output=$.output,this.totalUsage=$.totalUsage}get finalStep(){return this.steps[this.steps.length-1]}get content(){return this.finalStep.content}get text(){return this.finalStep.text}get files(){return this.finalStep.files}get reasoningText(){return this.finalStep.reasoningText}get reasoning(){return this.finalStep.reasoning}get toolCalls(){return this.finalStep.toolCalls}get staticToolCalls(){return this.finalStep.staticToolCalls}get dynamicToolCalls(){return this.finalStep.dynamicToolCalls}get toolResults(){return this.finalStep.toolResults}get staticToolResults(){return this.finalStep.staticToolResults}get dynamicToolResults(){return this.finalStep.dynamicToolResults}get sources(){return this.finalStep.sources}get finishReason(){return this.finalStep.finishReason}get rawFinishReason(){return this.finalStep.rawFinishReason}get warnings(){return this.finalStep.warnings}get providerMetadata(){return this.finalStep.providerMetadata}get response(){return this.finalStep.response}get request(){return this.finalStep.request}get usage(){return this.finalStep.usage}get experimental_output(){return this.output}get output(){if(this._output==null)throw new gC4;return this._output}};function DC4($){let Y=$.filter((X)=>X.type==="tool-call");if(Y.length===0)return;return Y.map((X)=>({toolCallId:X.toolCallId,toolName:X.toolName,input:X.input}))}function gy9({content:$,toolCalls:Y,toolOutputs:X,toolApprovalRequests:G,tools:J}){let Q=[];for(let W of $)switch(W.type){case"text":case"reasoning":case"source":Q.push(W);break;case"file":{Q.push({type:"file",file:new jS4(W),...W.providerMetadata!=null?{providerMetadata:W.providerMetadata}:{}});break}case"tool-call":{Q.push(Y.find((K)=>K.toolCallId===W.toolCallId));break}case"tool-result":{let K=Y.find((Z)=>Z.toolCallId===W.toolCallId);if(K==null){let Z=J==null?void 0:J[W.toolName];if(!((Z==null?void 0:Z.type)==="provider"&&Z.supportsDeferredResults))throw Error(`Tool call ${W.toolCallId} not found.`);if(W.isError)Q.push({type:"tool-error",toolCallId:W.toolCallId,toolName:W.toolName,input:void 0,error:W.result,providerExecuted:!0,dynamic:W.dynamic,...W.providerMetadata!=null?{providerMetadata:W.providerMetadata}:{},...(Z==null?void 0:Z.metadata)!=null?{toolMetadata:Z.metadata}:{}});else Q.push({type:"tool-result",toolCallId:W.toolCallId,toolName:W.toolName,input:void 0,output:W.result,providerExecuted:!0,dynamic:W.dynamic,...W.providerMetadata!=null?{providerMetadata:W.providerMetadata}:{},...(Z==null?void 0:Z.metadata)!=null?{toolMetadata:Z.metadata}:{}});break}if(W.isError)Q.push({type:"tool-error",toolCallId:W.toolCallId,toolName:W.toolName,input:K.input,error:W.result,providerExecuted:!0,dynamic:K.dynamic,...W.providerMetadata!=null?{providerMetadata:W.providerMetadata}:{},...K.toolMetadata!=null?{toolMetadata:K.toolMetadata}:{}});else Q.push({type:"tool-result",toolCallId:W.toolCallId,toolName:W.toolName,input:K.input,output:W.result,providerExecuted:!0,dynamic:K.dynamic,...W.providerMetadata!=null?{providerMetadata:W.providerMetadata}:{},...K.toolMetadata!=null?{toolMetadata:K.toolMetadata}:{}});break}case"tool-approval-request":{let K=Y.find((Z)=>Z.toolCallId===W.toolCallId);if(K==null)throw new si0({toolCallId:W.toolCallId,approvalId:W.approvalId});Q.push({type:"tool-approval-request",approvalId:W.approvalId,toolCall:K});break}}return[...Q,...X,...G]}function FG0($,Y){let X=new Headers($!=null?$:{});for(let[G,J]of Object.entries(Y))if(!X.has(G))X.set(G,J);return X}function my9({status:$,statusText:Y,headers:X,textStream:G}){return new Response(G.pipeThrough(new TextEncoderStream),{status:$!=null?$:200,statusText:Y,headers:FG0(X,{"content-type":"text/plain; charset=utf-8"})})}function yS4({response:$,status:Y,statusText:X,headers:G,stream:J}){let Q=Y!=null?Y:200;if(X!==void 0)$.writeHead(Q,X,G);else $.writeHead(Q,G);let W=J.getReader();(async()=>{try{while(!0){let{done:Z,value:H}=await W.read();if(Z)break;if(!$.write(H))await new Promise((V)=>{$.once("drain",V)})}}catch(Z){throw Z}finally{$.end()}})()}function uy9({response:$,status:Y,statusText:X,headers:G,textStream:J}){yS4({response:$,status:Y,statusText:X,headers:Object.fromEntries(FG0(G,{"content-type":"text/plain; charset=utf-8"}).entries()),stream:J.pipeThrough(new TextEncoderStream)})}var bS4=class extends TransformStream{constructor(){super({transform($,Y){Y.enqueue(`data: ${JSON.stringify($)}

`)},flush($){$.enqueue(`data: [DONE]

`)}})}},hS4={"content-type":"text/event-stream","cache-control":"no-cache",connection:"keep-alive","x-vercel-ai-ui-message-stream":"v1","x-accel-buffering":"no"};function LG0({status:$,statusText:Y,headers:X,stream:G,consumeSseStream:J}){let Q=G.pipeThrough(new bS4);if(J){let[W,K]=Q.tee();Q=W,J({stream:K})}return new Response(Q.pipeThrough(new TextEncoderStream),{status:$,statusText:Y,headers:FG0(X,hS4)})}function py9({originalMessages:$,responseMessageId:Y}){if($==null)return;let X=$[$.length-1];return(X==null?void 0:X.role)==="assistant"?X.id:typeof Y==="function"?Y():Y}var bd=U.record(U.string(),$R.optional()),Kj$=N1(()=>z1(U.union([U.strictObject({type:U.literal("text-start"),id:U.string(),providerMetadata:k4.optional()}),U.strictObject({type:U.literal("text-delta"),id:U.string(),delta:U.string(),providerMetadata:k4.optional()}),U.strictObject({type:U.literal("text-end"),id:U.string(),providerMetadata:k4.optional()}),U.strictObject({type:U.literal("error"),errorText:U.string()}),U.strictObject({type:U.literal("tool-input-start"),toolCallId:U.string(),toolName:U.string(),providerExecuted:U.boolean().optional(),providerMetadata:k4.optional(),toolMetadata:bd.optional(),dynamic:U.boolean().optional(),title:U.string().optional()}),U.strictObject({type:U.literal("tool-input-delta"),toolCallId:U.string(),inputTextDelta:U.string()}),U.strictObject({type:U.literal("tool-input-available"),toolCallId:U.string(),toolName:U.string(),input:U.unknown(),providerExecuted:U.boolean().optional(),providerMetadata:k4.optional(),toolMetadata:bd.optional(),dynamic:U.boolean().optional(),title:U.string().optional()}),U.strictObject({type:U.literal("tool-input-error"),toolCallId:U.string(),toolName:U.string(),input:U.unknown(),providerExecuted:U.boolean().optional(),providerMetadata:k4.optional(),toolMetadata:bd.optional(),dynamic:U.boolean().optional(),errorText:U.string(),title:U.string().optional()}),U.strictObject({type:U.literal("tool-approval-request"),approvalId:U.string(),toolCallId:U.string()}),U.strictObject({type:U.literal("tool-output-available"),toolCallId:U.string(),output:U.unknown(),providerExecuted:U.boolean().optional(),providerMetadata:k4.optional(),toolMetadata:bd.optional(),dynamic:U.boolean().optional(),preliminary:U.boolean().optional()}),U.strictObject({type:U.literal("tool-output-error"),toolCallId:U.string(),errorText:U.string(),providerExecuted:U.boolean().optional(),providerMetadata:k4.optional(),toolMetadata:bd.optional(),dynamic:U.boolean().optional()}),U.strictObject({type:U.literal("tool-output-denied"),toolCallId:U.string()}),U.strictObject({type:U.literal("reasoning-start"),id:U.string(),providerMetadata:k4.optional()}),U.strictObject({type:U.literal("reasoning-delta"),id:U.string(),delta:U.string(),providerMetadata:k4.optional()}),U.strictObject({type:U.literal("reasoning-end"),id:U.string(),providerMetadata:k4.optional()}),U.strictObject({type:U.literal("source-url"),sourceId:U.string(),url:U.string(),title:U.string().optional(),providerMetadata:k4.optional()}),U.strictObject({type:U.literal("source-document"),sourceId:U.string(),mediaType:U.string(),title:U.string(),filename:U.string().optional(),providerMetadata:k4.optional()}),U.strictObject({type:U.literal("file"),url:U.string(),mediaType:U.string(),providerMetadata:k4.optional()}),U.strictObject({type:U.custom(($)=>typeof $==="string"&&$.startsWith("data-"),{message:'Type must start with "data-"'}),id:U.string().optional(),data:U.unknown(),transient:U.boolean().optional()}),U.strictObject({type:U.literal("start-step")}),U.strictObject({type:U.literal("finish-step")}),U.strictObject({type:U.literal("start"),messageId:U.string().optional(),messageMetadata:U.unknown().optional()}),U.strictObject({type:U.literal("finish"),finishReason:U.enum(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:U.unknown().optional()}),U.strictObject({type:U.literal("abort"),reason:U.string().optional()}),U.strictObject({type:U.literal("message-metadata"),messageMetadata:U.unknown()})])));function dy9($){return $.type.startsWith("data-")}function fi0($){return $.type.startsWith("data-")}function gi0($){return $.type==="text"}function mi0($){return $.type==="file"}function NC4($){return $.type==="reasoning"}function ni0($){return $.type.startsWith("tool-")}function fS4($){return $.type==="dynamic-tool"}function mC($){return ni0($)||fS4($)}function ri0($){return $.type.split("-").slice(1).join("-")}function ui0($){return fS4($)?$.toolName:ri0($)}function cy9({lastMessage:$,messageId:Y}){return{message:($==null?void 0:$.role)==="assistant"?$:{id:Y,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function ly9({stream:$,messageMetadataSchema:Y,dataPartSchemas:X,runUpdateMessageJob:G,onError:J,onToolCall:Q,onData:W}){return $.pipeThrough(new TransformStream({async transform(K,Z){await G(async({state:H,write:z})=>{var V,F,L,N;function D(E){let R=H.message.parts.filter(mC).find((q)=>q.toolCallId===E);if(R==null)throw new gC({chunkType:"tool-invocation",chunkId:E,message:`No tool invocation found for tool call ID "${E}".`});return R}function A(E){var M;let R=H.message.parts.find((P)=>ni0(P)&&P.toolCallId===E.toolCallId),q=E,_=R;if(R!=null){if(R.state=E.state,_.input=q.input,_.output=q.output,_.errorText=q.errorText,_.rawInput=q.rawInput,_.preliminary=q.preliminary,E.title!==void 0)_.title=E.title;if(E.toolMetadata!==void 0)_.toolMetadata=E.toolMetadata;_.providerExecuted=(M=q.providerExecuted)!=null?M:R.providerExecuted;let P=q.providerMetadata;if(P!=null)if(E.state==="output-available"||E.state==="output-error"){let w=R;w.resultProviderMetadata=P}else R.callProviderMetadata=P}else H.message.parts.push({type:`tool-${E.toolName}`,toolCallId:E.toolCallId,state:E.state,title:E.title,...E.toolMetadata!==void 0?{toolMetadata:E.toolMetadata}:{},input:q.input,output:q.output,rawInput:q.rawInput,errorText:q.errorText,providerExecuted:q.providerExecuted,preliminary:q.preliminary,...q.providerMetadata!=null&&(E.state==="output-available"||E.state==="output-error")?{resultProviderMetadata:q.providerMetadata}:{},...q.providerMetadata!=null&&!(E.state==="output-available"||E.state==="output-error")?{callProviderMetadata:q.providerMetadata}:{}})}function B(E){var M,R;let q=H.message.parts.find((w)=>w.type==="dynamic-tool"&&w.toolCallId===E.toolCallId),_=E,P=q;if(q!=null){if(q.state=E.state,P.toolName=E.toolName,P.input=_.input,P.output=_.output,P.errorText=_.errorText,P.rawInput=(M=_.rawInput)!=null?M:P.rawInput,P.preliminary=_.preliminary,E.title!==void 0)P.title=E.title;if(E.toolMetadata!==void 0)P.toolMetadata=E.toolMetadata;P.providerExecuted=(R=_.providerExecuted)!=null?R:q.providerExecuted;let w=_.providerMetadata;if(w!=null)if(E.state==="output-available"||E.state==="output-error"){let j=q;j.resultProviderMetadata=w}else q.callProviderMetadata=w}else H.message.parts.push({type:"dynamic-tool",toolName:E.toolName,toolCallId:E.toolCallId,state:E.state,input:_.input,output:_.output,errorText:_.errorText,preliminary:_.preliminary,providerExecuted:_.providerExecuted,title:E.title,...E.toolMetadata!==void 0?{toolMetadata:E.toolMetadata}:{},..._.providerMetadata!=null&&(E.state==="output-available"||E.state==="output-error")?{resultProviderMetadata:_.providerMetadata}:{},..._.providerMetadata!=null&&!(E.state==="output-available"||E.state==="output-error")?{callProviderMetadata:_.providerMetadata}:{}})}async function O(E){if(E!=null){let M=H.message.metadata!=null?VG0(H.message.metadata,E):E;if(Y!=null)await l5({value:M,schema:Y,context:{field:"message.metadata",entityId:H.message.id}});H.message.metadata=M}}switch(K.type){case"text-start":{let E={type:"text",text:"",providerMetadata:K.providerMetadata,state:"streaming"};H.activeTextParts[K.id]=E,H.message.parts.push(E),z();break}case"text-delta":{let E=H.activeTextParts[K.id];if(E==null)throw new gC({chunkType:"text-delta",chunkId:K.id,message:`Received text-delta for missing text part with ID "${K.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});E.text+=K.delta,E.providerMetadata=(V=K.providerMetadata)!=null?V:E.providerMetadata,z();break}case"text-end":{let E=H.activeTextParts[K.id];if(E==null)throw new gC({chunkType:"text-end",chunkId:K.id,message:`Received text-end for missing text part with ID "${K.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});E.state="done",E.providerMetadata=(F=K.providerMetadata)!=null?F:E.providerMetadata,delete H.activeTextParts[K.id],z();break}case"reasoning-start":{let E={type:"reasoning",text:"",providerMetadata:K.providerMetadata,state:"streaming"};H.activeReasoningParts[K.id]=E,H.message.parts.push(E),z();break}case"reasoning-delta":{let E=H.activeReasoningParts[K.id];if(E==null)throw new gC({chunkType:"reasoning-delta",chunkId:K.id,message:`Received reasoning-delta for missing reasoning part with ID "${K.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});E.text+=K.delta,E.providerMetadata=(L=K.providerMetadata)!=null?L:E.providerMetadata,z();break}case"reasoning-end":{let E=H.activeReasoningParts[K.id];if(E==null)throw new gC({chunkType:"reasoning-end",chunkId:K.id,message:`Received reasoning-end for missing reasoning part with ID "${K.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});E.providerMetadata=(N=K.providerMetadata)!=null?N:E.providerMetadata,E.state="done",delete H.activeReasoningParts[K.id],z();break}case"file":{H.message.parts.push({type:"file",mediaType:K.mediaType,url:K.url,...K.providerMetadata!=null?{providerMetadata:K.providerMetadata}:{}}),z();break}case"source-url":{H.message.parts.push({type:"source-url",sourceId:K.sourceId,url:K.url,title:K.title,providerMetadata:K.providerMetadata}),z();break}case"source-document":{H.message.parts.push({type:"source-document",sourceId:K.sourceId,mediaType:K.mediaType,title:K.title,filename:K.filename,providerMetadata:K.providerMetadata}),z();break}case"tool-input-start":{let E=H.message.parts.filter(ni0);if(H.partialToolCalls[K.toolCallId]={text:"",toolName:K.toolName,index:E.length,dynamic:K.dynamic,title:K.title,toolMetadata:K.toolMetadata},K.dynamic)B({toolCallId:K.toolCallId,toolName:K.toolName,state:"input-streaming",input:void 0,providerExecuted:K.providerExecuted,title:K.title,toolMetadata:K.toolMetadata,providerMetadata:K.providerMetadata});else A({toolCallId:K.toolCallId,toolName:K.toolName,state:"input-streaming",input:void 0,providerExecuted:K.providerExecuted,title:K.title,toolMetadata:K.toolMetadata,providerMetadata:K.providerMetadata});z();break}case"tool-input-delta":{let E=H.partialToolCalls[K.toolCallId];if(E==null)throw new gC({chunkType:"tool-input-delta",chunkId:K.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${K.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});E.text+=K.inputTextDelta;let{value:M}=await md(E.text);if(E.dynamic)B({toolCallId:K.toolCallId,toolName:E.toolName,state:"input-streaming",input:M,title:E.title,toolMetadata:E.toolMetadata});else A({toolCallId:K.toolCallId,toolName:E.toolName,state:"input-streaming",input:M,title:E.title,toolMetadata:E.toolMetadata});z();break}case"tool-input-available":{if(K.dynamic)B({toolCallId:K.toolCallId,toolName:K.toolName,state:"input-available",input:K.input,providerExecuted:K.providerExecuted,providerMetadata:K.providerMetadata,title:K.title,toolMetadata:K.toolMetadata});else A({toolCallId:K.toolCallId,toolName:K.toolName,state:"input-available",input:K.input,providerExecuted:K.providerExecuted,providerMetadata:K.providerMetadata,title:K.title,toolMetadata:K.toolMetadata});if(z(),Q&&!K.providerExecuted)await Q({toolCall:K});break}case"tool-input-error":{let E=H.message.parts.filter(mC).find((R)=>R.toolCallId===K.toolCallId);if(E!=null?E.type==="dynamic-tool":!!K.dynamic)B({toolCallId:K.toolCallId,toolName:K.toolName,state:"output-error",input:K.input,errorText:K.errorText,providerExecuted:K.providerExecuted,providerMetadata:K.providerMetadata,toolMetadata:K.toolMetadata});else A({toolCallId:K.toolCallId,toolName:K.toolName,state:"output-error",input:void 0,rawInput:K.input,errorText:K.errorText,providerExecuted:K.providerExecuted,providerMetadata:K.providerMetadata,toolMetadata:K.toolMetadata});z();break}case"tool-approval-request":{let E=D(K.toolCallId);E.state="approval-requested",E.approval={id:K.approvalId},z();break}case"tool-output-denied":{let E=D(K.toolCallId);E.state="output-denied",z();break}case"tool-output-available":{let E=D(K.toolCallId);if(E.type==="dynamic-tool")B({toolCallId:K.toolCallId,toolName:E.toolName,state:"output-available",input:E.input,output:K.output,preliminary:K.preliminary,providerExecuted:K.providerExecuted,providerMetadata:K.providerMetadata,title:E.title,toolMetadata:E.toolMetadata});else A({toolCallId:K.toolCallId,toolName:ri0(E),state:"output-available",input:E.input,output:K.output,providerExecuted:K.providerExecuted,preliminary:K.preliminary,providerMetadata:K.providerMetadata,title:E.title,toolMetadata:E.toolMetadata});z();break}case"tool-output-error":{let E=D(K.toolCallId);if(E.type==="dynamic-tool")B({toolCallId:K.toolCallId,toolName:E.toolName,state:"output-error",input:E.input,errorText:K.errorText,providerExecuted:K.providerExecuted,providerMetadata:K.providerMetadata,title:E.title,toolMetadata:E.toolMetadata});else A({toolCallId:K.toolCallId,toolName:ri0(E),state:"output-error",input:E.input,rawInput:E.rawInput,errorText:K.errorText,providerExecuted:K.providerExecuted,providerMetadata:K.providerMetadata,title:E.title,toolMetadata:E.toolMetadata});z();break}case"start-step":{H.message.parts.push({type:"step-start"});break}case"finish-step":{H.activeTextParts={},H.activeReasoningParts={};break}case"start":{if(K.messageId!=null)H.message.id=K.messageId;if(await O(K.messageMetadata),K.messageId!=null||K.messageMetadata!=null)z();break}case"finish":{if(K.finishReason!=null)H.finishReason=K.finishReason;if(await O(K.messageMetadata),K.messageMetadata!=null)z();break}case"message-metadata":{if(await O(K.messageMetadata),K.messageMetadata!=null)z();break}case"error":{J==null||J(Error(K.errorText));break}default:if(dy9(K)){if((X==null?void 0:X[K.type])!=null){let R=H.message.parts.findIndex((_)=>("id"in _)&&("data"in _)&&_.id===K.id&&_.type===K.type),q=R>=0?R:H.message.parts.length;await l5({value:K.data,schema:X[K.type],context:{field:`message.parts[${q}].data`,entityName:K.type,entityId:K.id}})}let E=K;if(E.transient){W==null||W(E);break}let M=E.id!=null?H.message.parts.find((R)=>E.type===R.type&&E.id===R.id):void 0;if(M!=null)M.data=E.data;else H.message.parts.push(E);W==null||W(E),z()}}Z.enqueue(K)})}}))}function gS4({messageId:$,originalMessages:Y=[],onStepFinish:X,onFinish:G,onError:J,stream:Q}){let W=Y==null?void 0:Y[Y.length-1];if((W==null?void 0:W.role)!=="assistant")W=void 0;else $=W.id;let K=!1,Z=Q.pipeThrough(new TransformStream({transform(N,D){if(N.type==="start"){let A=N;if(A.messageId==null&&$!=null)A.messageId=$}if(N.type==="abort")K=!0;D.enqueue(N)}}));if(G==null&&X==null)return Z;let H=cy9({lastMessage:W?structuredClone(W):void 0,messageId:$!=null?$:""}),z=async(N)=>{await N({state:H,write:()=>{}})},V=!1,F=async()=>{if(V||!G)return;V=!0;let N=H.message.id===(W==null?void 0:W.id);await G({isAborted:K,isContinuation:N,responseMessage:H.message,messages:[...N?Y.slice(0,-1):Y,H.message],finishReason:H.finishReason})},L=async()=>{if(!X)return;let N=H.message.id===(W==null?void 0:W.id);try{await X({isContinuation:N,responseMessage:structuredClone(H.message),messages:[...N?Y.slice(0,-1):Y,structuredClone(H.message)]})}catch(D){J(D)}};return ly9({stream:Z,runUpdateMessageJob:z,onError:J}).pipeThrough(new TransformStream({async transform(N,D){if(N.type==="finish-step")await L();D.enqueue(N)},async cancel(){await F()},async flush(){await F()}}))}function iy9({response:$,status:Y,statusText:X,headers:G,stream:J,consumeSseStream:Q}){let W=J.pipeThrough(new bS4);if(Q){let[K,Z]=W.tee();W=K,Q({stream:Z})}yS4({response:$,status:Y,statusText:X,headers:Object.fromEntries(FG0(G,hS4).entries()),stream:W.pipeThrough(new TextEncoderStream)})}function hd($){let Y=$.pipeThrough(new TransformStream);return Y[Symbol.asyncIterator]=function(){let X=this.getReader(),G=!1;async function J(Q){var W;if(G)return;G=!0;try{if(Q)await((W=X.cancel)==null?void 0:W.call(X))}finally{try{X.releaseLock()}catch(K){}}}return{async next(){if(G)return{done:!0,value:void 0};let{done:Q,value:W}=await X.read();if(Q)return await J(!0),{done:!0,value:void 0};return{done:!1,value:W}},async return(){return await J(!0),{done:!0,value:void 0}},async throw(Q){throw await J(!0),Q}}},Y}async function ny9({stream:$,onError:Y}){let X=$.getReader();try{while(!0){let{done:G}=await X.read();if(G)break}}catch(G){Y==null||Y(G)}finally{X.releaseLock()}}function AC4(){let $,Y;return{promise:new Promise((G,J)=>{$=G,Y=J}),resolve:$,reject:Y}}function ry9(){let $=[],Y=null,X=!1,G=AC4(),J=()=>{X=!0,G.resolve(),$.forEach((W)=>W.cancel()),$=[],Y==null||Y.close()},Q=async()=>{if(X&&$.length===0){Y==null||Y.close();return}if($.length===0)return G=AC4(),await G.promise,Q();try{let{value:W,done:K}=await $[0].read();if(K)if($.shift(),$.length===0&&X)Y==null||Y.close();else await Q();else Y==null||Y.enqueue(W)}catch(W){Y==null||Y.error(W),$.shift(),J()}};return{stream:new ReadableStream({start(W){Y=W},pull:Q,async cancel(){for(let W of $)await W.cancel();$=[],X=!0}}),addStream:(W)=>{if(X)throw Error("Cannot add inner stream: outer stream is closed");$.push(W.getReader()),G.resolve()},close:()=>{if(X=!0,G.resolve(),$.length===0)Y==null||Y.close()},terminate:J}}function ay9({tools:$,generatorStream:Y,tracer:X,telemetry:G,system:J,messages:Q,abortSignal:W,repairToolCall:K,experimental_context:Z,generateId:H,stepNumber:z,model:V,onToolCallStart:F,onToolCallFinish:L}){let N=null,D=new ReadableStream({start(_){N=_}}),A=new Set,B=new Map,O=new Map,E=!1,M=void 0;function R(){if(E&&A.size===0){if(M!=null)N.enqueue(M);N.close()}}let q=new TransformStream({async transform(_,P){let w=_.type;switch(w){case"stream-start":case"text-start":case"text-delta":case"text-end":case"reasoning-start":case"reasoning-delta":case"reasoning-end":case"tool-input-start":case"tool-input-delta":case"tool-input-end":case"source":case"response-metadata":case"error":case"raw":{P.enqueue(_);break}case"file":{P.enqueue({type:"file",file:new Cy9({data:_.data,mediaType:_.mediaType}),..._.providerMetadata!=null?{providerMetadata:_.providerMetadata}:{}});break}case"finish":{M={type:"finish",finishReason:_.finishReason.unified,rawFinishReason:_.finishReason.raw,usage:li0(_.usage),providerMetadata:_.providerMetadata};break}case"tool-approval-request":{let j=O.get(_.toolCallId);if(j==null){N.enqueue({type:"error",error:new si0({toolCallId:_.toolCallId,approvalId:_.approvalId})});break}P.enqueue({type:"tool-approval-request",approvalId:_.approvalId,toolCall:j});break}case"tool-call":{try{let j=await IS4({toolCall:_,tools:$,repairToolCall:K,system:J,messages:Q});if(O.set(j.toolCallId,j),P.enqueue(j),j.invalid){N.enqueue({type:"tool-error",toolCallId:j.toolCallId,toolName:j.toolName,input:j.input,error:uD(j.error),dynamic:!0,title:j.title,...j.toolMetadata!=null?{toolMetadata:j.toolMetadata}:{}});break}let C=$==null?void 0:$[j.toolName];if(C==null)break;if(C.onInputAvailable!=null)await C.onInputAvailable({input:j.input,toolCallId:j.toolCallId,messages:Q,abortSignal:W,experimental_context:Z});if(await TS4({tool:C,toolCall:j,messages:Q,experimental_context:Z})){N.enqueue({type:"tool-approval-request",approvalId:H(),toolCall:j});break}if(B.set(j.toolCallId,j.input),C.execute!=null&&j.providerExecuted!==!0){let k=H();A.add(k),$n0({toolCall:j,tools:$,tracer:X,telemetry:G,messages:Q,abortSignal:W,experimental_context:Z,stepNumber:z,model:V,onToolCallStart:F,onToolCallFinish:L,onPreliminaryToolResult:(S)=>{N.enqueue(S)}}).then((S)=>{N.enqueue(S)}).catch((S)=>{N.enqueue({type:"error",error:S})}).finally(()=>{A.delete(k),R()})}}catch(j){N.enqueue({type:"error",error:j})}break}case"tool-result":{let j=_.toolName,C=O.get(_.toolCallId);if(_.isError)N.enqueue({type:"tool-error",toolCallId:_.toolCallId,toolName:j,input:B.get(_.toolCallId),providerExecuted:!0,error:_.result,dynamic:_.dynamic,..._.providerMetadata!=null?{providerMetadata:_.providerMetadata}:{},...(C==null?void 0:C.toolMetadata)!=null?{toolMetadata:C.toolMetadata}:{}});else P.enqueue({type:"tool-result",toolCallId:_.toolCallId,toolName:j,input:B.get(_.toolCallId),output:_.result,providerExecuted:!0,dynamic:_.dynamic,..._.providerMetadata!=null?{providerMetadata:_.providerMetadata}:{},...(C==null?void 0:C.toolMetadata)!=null?{toolMetadata:C.toolMetadata}:{}});break}default:throw Error(`Unhandled chunk type: ${w}`)}},flush(){E=!0,R()}});return new ReadableStream({async start(_){return Promise.all([Y.pipeThrough(q).pipeTo(new WritableStream({write(P){_.enqueue(P)},close(){}})),D.pipeTo(new WritableStream({write(P){_.enqueue(P)},close(){_.close()}}))])}})}var sy9=YH({prefix:"aitxt",size:24});function Yn0({model:$,tools:Y,toolChoice:X,system:G,prompt:J,messages:Q,allowSystemInMessages:W,maxRetries:K,abortSignal:Z,timeout:H,headers:z,stopWhen:V=kS4(1),experimental_output:F,output:L=F,experimental_telemetry:N,prepareStep:D,providerOptions:A,experimental_activeTools:B,activeTools:O=B,experimental_repairToolCall:E,experimental_transform:M,experimental_download:R,includeRawChunks:q=!1,onChunk:_,onError:P=({error:g})=>{console.error(g)},onFinish:w,onAbort:j,onStepFinish:C,experimental_onStart:k,experimental_onStepStart:S,experimental_onToolCallStart:I,experimental_onToolCallFinish:v,experimental_context:x,experimental_include:y,_internal:{now:d=UG0,generateId:u=sy9}={},...b}){let g=ti0(H),p=WS4(H),h=Gy9(H),n=p!=null?new AbortController:void 0,t=h!=null?new AbortController:void 0;return new ty9({model:HG0($),telemetry:N,headers:z,settings:b,maxRetries:K,abortSignal:xS4(Z,g!=null?AbortSignal.timeout(g):void 0,n==null?void 0:n.signal,t==null?void 0:t.signal),stepTimeoutMs:p,stepAbortController:n,chunkTimeoutMs:h,chunkAbortController:t,system:G,prompt:J,messages:Q,allowSystemInMessages:W,tools:Y,toolChoice:X,transforms:eM(M),activeTools:O,repairToolCall:E,stopConditions:eM(V),output:L,providerOptions:A,prepareStep:D,includeRawChunks:q,timeout:H,stopWhen:V,originalAbortSignal:Z,onChunk:_,onError:P,onFinish:w,onAbort:j,onStepFinish:C,onStart:k,onStepStart:S,onToolCallStart:I,onToolCallFinish:v,now:d,generateId:u,experimental_context:x,download:R,include:y})}function oy9($){let Y=void 0,X="",G="",J=void 0,Q="";function W({controller:K,partialOutput:Z=void 0}){K.enqueue({part:{type:"text-delta",id:Y,text:G,providerMetadata:J},partialOutput:Z}),G=""}return new TransformStream({async transform(K,Z){var H;if(K.type==="finish-step"&&G.length>0)W({controller:Z});if(K.type!=="text-delta"&&K.type!=="text-start"&&K.type!=="text-end"){Z.enqueue({part:K,partialOutput:void 0});return}if(Y==null)Y=K.id;else if(K.id!==Y){Z.enqueue({part:K,partialOutput:void 0});return}if(K.type==="text-start"){Z.enqueue({part:K,partialOutput:void 0});return}if(K.type==="text-end"){if(G.length>0)W({controller:Z});Z.enqueue({part:K,partialOutput:void 0});return}X+=K.text,G+=K.text,J=(H=K.providerMetadata)!=null?H:J;let z=await $.parsePartialOutput({text:X});if(z!==void 0){let V=typeof z.partial==="string"?z.partial:JSON.stringify(z.partial);if(V!==Q)W({controller:Z,partialOutput:z.partial}),Q=V}}})}var ty9=class{constructor({model:$,telemetry:Y,headers:X,settings:G,maxRetries:J,abortSignal:Q,stepTimeoutMs:W,stepAbortController:K,chunkTimeoutMs:Z,chunkAbortController:H,system:z,prompt:V,messages:F,allowSystemInMessages:L,tools:N,toolChoice:D,transforms:A,activeTools:B,repairToolCall:O,stopConditions:E,output:M,providerOptions:R,prepareStep:q,includeRawChunks:_,now:P,generateId:w,timeout:j,stopWhen:C,originalAbortSignal:k,onChunk:S,onError:I,onFinish:v,onAbort:x,onStepFinish:y,onStart:d,onStepStart:u,onToolCallStart:b,onToolCallFinish:g,experimental_context:p,download:h,include:n}){this._totalUsage=new HM,this._finishReason=new HM,this._rawFinishReason=new HM,this._steps=new HM,this.outputSpecification=M,this.includeRawChunks=_,this.tools=N;let s=RS4()(Y==null?void 0:Y.integrations),K0,X0=[],a=[],Q0=void 0,e=void 0,m=void 0,$0={},Y0=[],Z0=[],F0=new Map,D0,O0={},R0={},P0=new TransformStream({async transform(C4,c4){var r4,T6,p6,n6;c4.enqueue(C4);let{part:Z1}=C4;if(Z1.type==="text-delta"||Z1.type==="reasoning-delta"||Z1.type==="source"||Z1.type==="tool-call"||Z1.type==="tool-result"||Z1.type==="tool-input-start"||Z1.type==="tool-input-delta"||Z1.type==="raw")await(S==null?void 0:S({chunk:Z1}));if(Z1.type==="error")await I({error:NS4(Z1.error)});if(Z1.type==="text-start")O0[Z1.id]={type:"text",text:"",providerMetadata:Z1.providerMetadata},X0.push(O0[Z1.id]);if(Z1.type==="text-delta"){let J4=O0[Z1.id];if(J4==null){c4.enqueue({part:{type:"error",error:`text part ${Z1.id} not found`},partialOutput:void 0});return}J4.text+=Z1.text,J4.providerMetadata=(r4=Z1.providerMetadata)!=null?r4:J4.providerMetadata}if(Z1.type==="text-end"){let J4=O0[Z1.id];if(J4==null){c4.enqueue({part:{type:"error",error:`text part ${Z1.id} not found`},partialOutput:void 0});return}J4.providerMetadata=(T6=Z1.providerMetadata)!=null?T6:J4.providerMetadata,delete O0[Z1.id]}if(Z1.type==="reasoning-start")R0[Z1.id]={type:"reasoning",text:"",providerMetadata:Z1.providerMetadata},X0.push(R0[Z1.id]);if(Z1.type==="reasoning-delta"){let J4=R0[Z1.id];if(J4==null){c4.enqueue({part:{type:"error",error:`reasoning part ${Z1.id} not found`},partialOutput:void 0});return}J4.text+=Z1.text,J4.providerMetadata=(p6=Z1.providerMetadata)!=null?p6:J4.providerMetadata}if(Z1.type==="reasoning-end"){let J4=R0[Z1.id];if(J4==null){c4.enqueue({part:{type:"error",error:`reasoning part ${Z1.id} not found`},partialOutput:void 0});return}J4.providerMetadata=(n6=Z1.providerMetadata)!=null?n6:J4.providerMetadata,delete R0[Z1.id]}if(Z1.type==="file")X0.push({type:"file",file:Z1.file,...Z1.providerMetadata!=null?{providerMetadata:Z1.providerMetadata}:{}});if(Z1.type==="source")X0.push(Z1);if(Z1.type==="tool-call")X0.push(Z1);if(Z1.type==="tool-result"&&!Z1.preliminary)X0.push(Z1);if(Z1.type==="tool-approval-request")X0.push(Z1);if(Z1.type==="tool-error")X0.push(Z1);if(Z1.type==="start-step")X0=[],R0={},O0={},$0=Z1.request,Y0=Z1.warnings;if(Z1.type==="finish-step"){let J4=await ii0({content:X0,tools:N}),I6=new SS4({stepNumber:Z0.length,model:Y1,...c1,experimental_context:p,content:X0,finishReason:Z1.finishReason,rawFinishReason:Z1.rawFinishReason,usage:Z1.usage,warnings:Y0,request:$0,response:{...Z1.response,messages:[...a,...J4]},providerMetadata:Z1.providerMetadata});await PU({event:I6,callbacks:[y,s.onStepFinish]}),oi0({warnings:Y0,provider:Y1.provider,model:Y1.modelId}),Z0.push(I6),a.push(...J4),K0.resolve()}if(Z1.type==="finish")m=Z1.totalUsage,Q0=Z1.finishReason,e=Z1.rawFinishReason},async flush(C4){var c4,r4,T6,p6,n6,Z1,J4;try{if(Z0.length===0){let F1=(Q==null?void 0:Q.aborted)?Q.reason:new gC4({message:"No output generated. Check the stream for errors."});B0._finishReason.reject(F1),B0._rawFinishReason.reject(F1),B0._totalUsage.reject(F1),B0._steps.reject(F1);return}let I6=Q0!=null?Q0:"other",t4=m!=null?m:hi0();B0._finishReason.resolve(I6),B0._rawFinishReason.resolve(e),B0._totalUsage.resolve(t4),B0._steps.resolve(Z0);let a1=Z0[Z0.length-1];await PU({event:{stepNumber:a1.stepNumber,model:a1.model,functionId:a1.functionId,metadata:a1.metadata,experimental_context:a1.experimental_context,finishReason:a1.finishReason,rawFinishReason:a1.rawFinishReason,totalUsage:t4,usage:a1.usage,content:a1.content,text:a1.text,reasoningText:a1.reasoningText,reasoning:a1.reasoning,files:a1.files,sources:a1.sources,toolCalls:a1.toolCalls,staticToolCalls:a1.staticToolCalls,dynamicToolCalls:a1.dynamicToolCalls,toolResults:a1.toolResults,staticToolResults:a1.staticToolResults,dynamicToolResults:a1.dynamicToolResults,request:a1.request,response:a1.response,warnings:a1.warnings,providerMetadata:a1.providerMetadata,steps:Z0},callbacks:[v,s.onFinish]}),D0.setAttributes(await FK({telemetry:Y,attributes:{"ai.response.finishReason":I6,"ai.response.text":{output:()=>a1.text},"ai.response.reasoning":{output:()=>a1.reasoningText},"ai.response.toolCalls":{output:()=>{var F1;return((F1=a1.toolCalls)==null?void 0:F1.length)?JSON.stringify(a1.toolCalls):void 0}},"ai.response.providerMetadata":JSON.stringify(a1.providerMetadata),"ai.usage.inputTokens":t4.inputTokens,"ai.usage.inputTokenDetails.noCacheTokens":(c4=t4.inputTokenDetails)==null?void 0:c4.noCacheTokens,"ai.usage.inputTokenDetails.cacheReadTokens":(r4=t4.inputTokenDetails)==null?void 0:r4.cacheReadTokens,"ai.usage.inputTokenDetails.cacheWriteTokens":(T6=t4.inputTokenDetails)==null?void 0:T6.cacheWriteTokens,"ai.usage.outputTokens":t4.outputTokens,"ai.usage.outputTokenDetails.textTokens":(p6=t4.outputTokenDetails)==null?void 0:p6.textTokens,"ai.usage.outputTokenDetails.reasoningTokens":(n6=t4.outputTokenDetails)==null?void 0:n6.reasoningTokens,"ai.usage.totalTokens":t4.totalTokens,"ai.usage.reasoningTokens":(Z1=t4.outputTokenDetails)==null?void 0:Z1.reasoningTokens,"ai.usage.cachedInputTokens":(J4=t4.inputTokenDetails)==null?void 0:J4.cacheReadTokens}}))}catch(I6){C4.error(I6)}finally{D0.end()}}}),f0=ry9();this.addStream=f0.addStream,this.closeStream=f0.close;let p0=f0.stream.getReader(),U4=new ReadableStream({async start(C4){C4.enqueue({type:"start"})},async pull(C4){function c4(){x==null||x({steps:Z0}),C4.enqueue({type:"abort",...(Q==null?void 0:Q.reason)!==void 0?{reason:KU(Q.reason)}:{}}),C4.close()}try{let{done:r4,value:T6}=await p0.read();if(r4){C4.close();return}if(Q==null?void 0:Q.aborted){c4();return}C4.enqueue(T6)}catch(r4){if(AV(r4)&&(Q==null?void 0:Q.aborted))c4();else C4.error(r4)}},cancel(C4){return f0.stream.cancel(C4)}});for(let C4 of A)U4=U4.pipeThrough(C4({tools:N,stopStream(){f0.terminate()}}));this.baseStream=U4.pipeThrough(oy9(M!=null?M:zG0())).pipeThrough(P0);let{maxRetries:P1,retry:d1}=wS4({maxRetries:J,abortSignal:Q}),C0=OS4(Y),n0=ci0(G),J0=AS4({model:$,telemetry:Y,headers:X,settings:{...n0,maxRetries:P1}}),B0=this,Y1={provider:$.provider,modelId:$.modelId},c1={functionId:Y==null?void 0:Y.functionId,metadata:Y==null?void 0:Y.metadata};gd({name:"ai.streamText",attributes:FK({telemetry:Y,attributes:{...fd({operationId:"ai.streamText",telemetry:Y}),...J0,"ai.prompt":{input:()=>JSON.stringify({system:z,prompt:V,messages:F})}}}),tracer:C0,endWhenDone:!1,fn:async(C4)=>{D0=C4;let c4=await DS4({system:z,prompt:V,messages:F,allowSystemInMessages:L});await PU({event:{model:Y1,system:z,prompt:V,messages:F,tools:N,toolChoice:D,activeTools:B,maxOutputTokens:n0.maxOutputTokens,temperature:n0.temperature,topP:n0.topP,topK:n0.topK,presencePenalty:n0.presencePenalty,frequencyPenalty:n0.frequencyPenalty,stopSequences:n0.stopSequences,seed:n0.seed,maxRetries:P1,timeout:j,headers:X,providerOptions:R,stopWhen:C,output:M,abortSignal:k,include:n,...c1,experimental_context:p},callbacks:[d,s.onStart]});let r4=c4.messages,T6=[],{approvedToolApprovals:p6,deniedToolApprovals:n6}=_S4({messages:r4});if(n6.length>0||p6.length>0){let J4=p6.filter((I1)=>!I1.toolCall.providerExecuted),I6=n6.filter((I1)=>!I1.toolCall.providerExecuted),t4=n6.filter((I1)=>I1.toolCall.providerExecuted),a1,F1=new ReadableStream({start(I1){a1=I1}});B0.addStream(F1);try{for(let M4 of[...I6,...t4])a1==null||a1.enqueue({type:"tool-output-denied",toolCallId:M4.toolCall.toolCallId,toolName:M4.toolCall.toolName});let I1=[];if(await Promise.all(J4.map(async(M4)=>{let w4=await $n0({toolCall:M4.toolCall,tools:N,tracer:C0,telemetry:Y,messages:r4,abortSignal:Q,experimental_context:p,stepNumber:Z0.length,model:Y1,onToolCallStart:[b,s.onToolCallStart],onToolCallFinish:[g,s.onToolCallFinish],onPreliminaryToolResult:(z6)=>{a1==null||a1.enqueue(z6)}});if(w4!=null)a1==null||a1.enqueue(w4),I1.push(w4)})),I1.length>0||I6.length>0){let M4=[];for(let w4 of I1)M4.push({type:"tool-result",toolCallId:w4.toolCallId,toolName:w4.toolName,output:await tM({toolCallId:w4.toolCallId,input:w4.input,tool:N==null?void 0:N[w4.toolName],output:w4.type==="tool-result"?w4.output:w4.error,errorMode:w4.type==="tool-error"?"text":"none"})});for(let w4 of I6)M4.push({type:"tool-result",toolCallId:w4.toolCall.toolCallId,toolName:w4.toolCall.toolName,output:{type:"execution-denied",reason:w4.approvalResponse.reason}});T6.push({role:"tool",content:M4})}}finally{a1==null||a1.close()}}a.push(...T6);async function Z1({currentStep:J4,responseMessages:I6,usage:t4}){var a1,F1,I1,M4,w4,z6,K4,b4,N0;let h0=B0.includeRawChunks,a0=W!=null?setTimeout(()=>K.abort(),W):void 0,c0=void 0;function L1(){if(Z!=null){if(c0!=null)clearTimeout(c0);c0=setTimeout(()=>H.abort(),Z)}}function E1(){if(c0!=null)clearTimeout(c0),c0=void 0}function l4(){if(a0!=null)clearTimeout(a0)}try{K0=new HM;let Q1=[...r4,...I6],C1=await(q==null?void 0:q({model:$,steps:Z0,stepNumber:Z0.length,messages:Q1,experimental_context:p})),f4=HG0((a1=C1==null?void 0:C1.model)!=null?a1:$),A6={provider:f4.provider,modelId:f4.modelId},J9=await HS4({prompt:{system:(F1=C1==null?void 0:C1.system)!=null?F1:c4.system,messages:(I1=C1==null?void 0:C1.messages)!=null?I1:Q1},supportedUrls:await f4.supportedUrls,download:h}),o7=(M4=C1==null?void 0:C1.activeTools)!=null?M4:B,{toolChoice:$4,tools:i4}=await zS4({tools:N,toolChoice:(w4=C1==null?void 0:C1.toolChoice)!=null?w4:D,activeTools:o7});p=(z6=C1==null?void 0:C1.experimental_context)!=null?z6:p;let C9=(K4=C1==null?void 0:C1.messages)!=null?K4:Q1,R6=(b4=C1==null?void 0:C1.system)!=null?b4:c4.system,R4=VG0(R,C1==null?void 0:C1.providerOptions);await PU({event:{stepNumber:Z0.length,model:A6,system:R6,messages:C9,tools:N,toolChoice:$4,activeTools:o7,steps:[...Z0],providerOptions:R4,timeout:j,headers:X,stopWhen:C,output:M,abortSignal:k,include:n,...c1,experimental_context:p},callbacks:[u,s.onStepStart]});let{result:{stream:y8,response:A5,request:X$},doStreamSpan:u$,startTimestampMs:t6}=await d1(()=>gd({name:"ai.streamText.doStream",attributes:FK({telemetry:Y,attributes:{...fd({operationId:"ai.streamText.doStream",telemetry:Y}),...J0,"ai.model.provider":f4.provider,"ai.model.id":f4.modelId,"ai.prompt.messages":{input:()=>MS4(J9)},"ai.prompt.tools":{input:()=>i4==null?void 0:i4.map((p4)=>JSON.stringify(p4))},"ai.prompt.toolChoice":{input:()=>$4!=null?JSON.stringify($4):void 0},"gen_ai.system":f4.provider,"gen_ai.request.model":f4.modelId,"gen_ai.request.frequency_penalty":n0.frequencyPenalty,"gen_ai.request.max_tokens":n0.maxOutputTokens,"gen_ai.request.presence_penalty":n0.presencePenalty,"gen_ai.request.stop_sequences":n0.stopSequences,"gen_ai.request.temperature":n0.temperature,"gen_ai.request.top_k":n0.topK,"gen_ai.request.top_p":n0.topP}}),tracer:C0,endWhenDone:!1,fn:async(p4)=>({startTimestampMs:P(),doStreamSpan:p4,result:await f4.doStream({...n0,tools:i4,toolChoice:$4,responseFormat:await(M==null?void 0:M.responseFormat),prompt:J9,providerOptions:R4,abortSignal:Q,headers:X,includeRawChunks:h0})})})),bX=ay9({tools:N,generatorStream:y8,tracer:C0,telemetry:Y,system:z,messages:Q1,repairToolCall:O,abortSignal:Q,experimental_context:p,generateId:w,stepNumber:Z0.length,model:A6,onToolCallStart:[b,s.onToolCallStart],onToolCallFinish:[g,s.onToolCallFinish]}),GR=((N0=n==null?void 0:n.requestBody)!=null?N0:!0)?X$!=null?X$:{}:{...X$,body:void 0},LK=[],DK=[],O9,tW={},_U="other",IV=void 0,MY=hi0(),ad,lC=!0,cQ={id:w(),timestamp:new Date,modelId:Y1.modelId},qG0="";B0.addStream(bX.pipeThrough(new TransformStream({async transform(p4,k7){var CV,DN,NK,jU,SV;if(L1(),p4.type==="stream-start"){O9=p4.warnings;return}if(lC){let Q5=P()-t6;lC=!1,u$.addEvent("ai.stream.firstChunk",{"ai.response.msToFirstChunk":Q5}),u$.setAttributes({"ai.response.msToFirstChunk":Q5}),k7.enqueue({type:"start-step",request:GR,warnings:O9!=null?O9:[]})}let AK=p4.type;switch(AK){case"tool-approval-request":case"text-start":case"text-end":{k7.enqueue(p4);break}case"text-delta":{if(p4.delta.length>0)k7.enqueue({type:"text-delta",id:p4.id,text:p4.delta,providerMetadata:p4.providerMetadata}),qG0+=p4.delta;break}case"reasoning-start":case"reasoning-end":{k7.enqueue(p4);break}case"reasoning-delta":{k7.enqueue({type:"reasoning-delta",id:p4.id,text:p4.delta,providerMetadata:p4.providerMetadata});break}case"tool-call":{k7.enqueue(p4),LK.push(p4);break}case"tool-result":{if(k7.enqueue(p4),!p4.preliminary)DK.push(p4);break}case"tool-error":{k7.enqueue(p4),DK.push(p4);break}case"response-metadata":{cQ={id:(CV=p4.id)!=null?CV:cQ.id,timestamp:(DN=p4.timestamp)!=null?DN:cQ.timestamp,modelId:(NK=p4.modelId)!=null?NK:cQ.modelId};break}case"finish":{MY=p4.usage,_U=p4.finishReason,IV=p4.rawFinishReason,ad=p4.providerMetadata;let Q5=P()-t6;u$.addEvent("ai.stream.finish"),u$.setAttributes({"ai.response.msToFinish":Q5,"ai.response.avgOutputTokensPerSecond":1000*((jU=MY.outputTokens)!=null?jU:0)/Q5});break}case"file":{k7.enqueue(p4);break}case"source":{k7.enqueue(p4);break}case"tool-input-start":{tW[p4.id]=p4.toolName;let Q5=N==null?void 0:N[p4.toolName];if((Q5==null?void 0:Q5.onInputStart)!=null)await Q5.onInputStart({toolCallId:p4.id,messages:Q1,abortSignal:Q,experimental_context:p});k7.enqueue({...p4,dynamic:(SV=p4.dynamic)!=null?SV:(Q5==null?void 0:Q5.type)==="dynamic",title:Q5==null?void 0:Q5.title});break}case"tool-input-end":{delete tW[p4.id],k7.enqueue(p4);break}case"tool-input-delta":{let Q5=tW[p4.id],kV=N==null?void 0:N[Q5];if((kV==null?void 0:kV.onInputDelta)!=null)await kV.onInputDelta({inputTextDelta:p4.delta,toolCallId:p4.id,messages:Q1,abortSignal:Q,experimental_context:p});k7.enqueue(p4);break}case"error":{k7.enqueue(p4),_U="error";break}case"raw":{if(h0)k7.enqueue(p4);break}default:throw Error(`Unknown chunk type: ${AK}`)}},async flush(p4){var k7,CV,DN,NK,jU,SV,AK;let Q5=LK.length>0?JSON.stringify(LK):void 0;try{u$.setAttributes(await FK({telemetry:Y,attributes:{"ai.response.finishReason":_U,"ai.response.toolCalls":{output:()=>Q5},"ai.response.id":cQ.id,"ai.response.model":cQ.modelId,"ai.response.timestamp":cQ.timestamp.toISOString(),"ai.usage.inputTokens":MY.inputTokens,"ai.usage.inputTokenDetails.noCacheTokens":(k7=MY.inputTokenDetails)==null?void 0:k7.noCacheTokens,"ai.usage.inputTokenDetails.cacheReadTokens":(CV=MY.inputTokenDetails)==null?void 0:CV.cacheReadTokens,"ai.usage.inputTokenDetails.cacheWriteTokens":(DN=MY.inputTokenDetails)==null?void 0:DN.cacheWriteTokens,"ai.usage.outputTokens":MY.outputTokens,"ai.usage.outputTokenDetails.textTokens":(NK=MY.outputTokenDetails)==null?void 0:NK.textTokens,"ai.usage.outputTokenDetails.reasoningTokens":(jU=MY.outputTokenDetails)==null?void 0:jU.reasoningTokens,"ai.usage.totalTokens":MY.totalTokens,"ai.usage.reasoningTokens":(SV=MY.outputTokenDetails)==null?void 0:SV.reasoningTokens,"ai.usage.cachedInputTokens":(AK=MY.inputTokenDetails)==null?void 0:AK.cacheReadTokens,"gen_ai.response.finish_reasons":[_U],"gen_ai.response.id":cQ.id,"gen_ai.response.model":cQ.modelId,"gen_ai.usage.input_tokens":MY.inputTokens,"gen_ai.usage.output_tokens":MY.outputTokens}}))}catch(t7){}p4.enqueue({type:"finish-step",finishReason:_U,rawFinishReason:IV,usage:MY,providerMetadata:ad,response:{...cQ,headers:A5==null?void 0:A5.headers}});let kV=qS4(t4,MY);await K0.promise;let iC=Z0[Z0.length-1];try{u$.setAttributes(await FK({telemetry:Y,attributes:{"ai.response.text":{output:()=>iC.text},"ai.response.reasoning":{output:()=>iC.reasoningText},"ai.response.providerMetadata":JSON.stringify(iC.providerMetadata)}}))}catch(t7){}finally{u$.end()}let sd=LK.filter((t7)=>t7.providerExecuted!==!0),PG0=DK.filter((t7)=>t7.providerExecuted!==!0);for(let t7 of LK){if(t7.providerExecuted!==!0)continue;let nC=N==null?void 0:N[t7.toolName];if((nC==null?void 0:nC.type)==="provider"&&nC.supportsDeferredResults){if(!DK.some((rC)=>(rC.type==="tool-result"||rC.type==="tool-error")&&rC.toolCallId===t7.toolCallId))F0.set(t7.toolCallId,{toolName:t7.toolName})}}for(let t7 of DK)if(t7.type==="tool-result"||t7.type==="tool-error")F0.delete(t7.toolCallId);if(l4(),E1(),(sd.length>0&&PG0.length===sd.length||F0.size>0)&&!await vS4({stopConditions:E,steps:Z0})){I6.push(...await ii0({content:Z0[Z0.length-1].content,tools:N}));try{await Z1({currentStep:J4+1,responseMessages:I6,usage:kV})}catch(t7){p4.enqueue({type:"error",error:t7}),B0.closeStream()}}else p4.enqueue({type:"finish",finishReason:_U,rawFinishReason:IV,totalUsage:kV}),B0.closeStream()}})))}finally{l4(),E1()}}await Z1({currentStep:0,responseMessages:T6,usage:hi0()})}}).catch((C4)=>{B0.addStream(new ReadableStream({start(c4){c4.enqueue({type:"error",error:C4}),c4.close()}})),B0.closeStream()})}get steps(){return this.consumeStream(),this._steps.promise}get finalStep(){return this.steps.then(($)=>$[$.length-1])}get content(){return this.finalStep.then(($)=>$.content)}get warnings(){return this.finalStep.then(($)=>$.warnings)}get providerMetadata(){return this.finalStep.then(($)=>$.providerMetadata)}get text(){return this.finalStep.then(($)=>$.text)}get reasoningText(){return this.finalStep.then(($)=>$.reasoningText)}get reasoning(){return this.finalStep.then(($)=>$.reasoning)}get sources(){return this.finalStep.then(($)=>$.sources)}get files(){return this.finalStep.then(($)=>$.files)}get toolCalls(){return this.finalStep.then(($)=>$.toolCalls)}get staticToolCalls(){return this.finalStep.then(($)=>$.staticToolCalls)}get dynamicToolCalls(){return this.finalStep.then(($)=>$.dynamicToolCalls)}get toolResults(){return this.finalStep.then(($)=>$.toolResults)}get staticToolResults(){return this.finalStep.then(($)=>$.staticToolResults)}get dynamicToolResults(){return this.finalStep.then(($)=>$.dynamicToolResults)}get usage(){return this.finalStep.then(($)=>$.usage)}get request(){return this.finalStep.then(($)=>$.request)}get response(){return this.finalStep.then(($)=>$.response)}get totalUsage(){return this.consumeStream(),this._totalUsage.promise}get finishReason(){return this.consumeStream(),this._finishReason.promise}get rawFinishReason(){return this.consumeStream(),this._rawFinishReason.promise}teeStream(){let[$,Y]=this.baseStream.tee();return this.baseStream=Y,$}get textStream(){return hd(this.teeStream().pipeThrough(new TransformStream({transform({part:$},Y){if($.type==="text-delta")Y.enqueue($.text)}})))}get fullStream(){return hd(this.teeStream().pipeThrough(new TransformStream({transform({part:$},Y){Y.enqueue($)}})))}async consumeStream($){var Y;try{await ny9({stream:this.fullStream,onError:$==null?void 0:$.onError})}catch(X){(Y=$==null?void 0:$.onError)==null||Y.call($,X)}}get experimental_partialOutputStream(){return this.partialOutputStream}get partialOutputStream(){return hd(this.teeStream().pipeThrough(new TransformStream({transform({partialOutput:$},Y){if($!=null)Y.enqueue($)}})))}get elementStream(){var $,Y,X;let G=($=this.outputSpecification)==null?void 0:$.createElementStreamTransform();if(G==null)throw new c5({functionality:`element streams in ${(X=(Y=this.outputSpecification)==null?void 0:Y.name)!=null?X:"text"} mode`});return hd(this.teeStream().pipeThrough(G))}get output(){return this.finalStep.then(($)=>{var Y;return((Y=this.outputSpecification)!=null?Y:zG0()).parseCompleteOutput({text:$.text},{response:$.response,usage:$.usage,finishReason:$.finishReason})})}toUIMessageStream({originalMessages:$,generateMessageId:Y,onFinish:X,messageMetadata:G,sendReasoning:J=!0,sendSources:Q=!1,sendStart:W=!0,sendFinish:K=!0,onError:Z=KU}={}){let H=Y!=null?py9({originalMessages:$,responseMessageId:Y}):void 0,z=(F)=>{var L;let N=(L=this.tools)==null?void 0:L[F.toolName];if(N==null)return F.dynamic;return(N==null?void 0:N.type)==="dynamic"?!0:void 0},V=this.fullStream.pipeThrough(new TransformStream({transform:async(F,L)=>{let N=G==null?void 0:G({part:F}),D=F.type;switch(D){case"text-start":{L.enqueue({type:"text-start",id:F.id,...F.providerMetadata!=null?{providerMetadata:F.providerMetadata}:{}});break}case"text-delta":{L.enqueue({type:"text-delta",id:F.id,delta:F.text,...F.providerMetadata!=null?{providerMetadata:F.providerMetadata}:{}});break}case"text-end":{L.enqueue({type:"text-end",id:F.id,...F.providerMetadata!=null?{providerMetadata:F.providerMetadata}:{}});break}case"reasoning-start":case"reasoning-end":{if(J)L.enqueue({type:D,id:F.id,...F.providerMetadata!=null?{providerMetadata:F.providerMetadata}:{}});break}case"reasoning-delta":{if(J)L.enqueue({type:"reasoning-delta",id:F.id,delta:F.text,...F.providerMetadata!=null?{providerMetadata:F.providerMetadata}:{}});break}case"file":{L.enqueue({type:"file",mediaType:F.file.mediaType,url:`data:${F.file.mediaType};base64,${F.file.base64}`,...F.providerMetadata!=null?{providerMetadata:F.providerMetadata}:{}});break}case"source":{if(Q&&F.sourceType==="url")L.enqueue({type:"source-url",sourceId:F.id,url:F.url,title:F.title,...F.providerMetadata!=null?{providerMetadata:F.providerMetadata}:{}});if(Q&&F.sourceType==="document")L.enqueue({type:"source-document",sourceId:F.id,mediaType:F.mediaType,title:F.title,filename:F.filename,...F.providerMetadata!=null?{providerMetadata:F.providerMetadata}:{}});break}case"tool-input-start":{let A=z(F);L.enqueue({type:"tool-input-start",toolCallId:F.id,toolName:F.toolName,...F.providerExecuted!=null?{providerExecuted:F.providerExecuted}:{},...F.providerMetadata!=null?{providerMetadata:F.providerMetadata}:{},...F.toolMetadata!=null?{toolMetadata:F.toolMetadata}:{},...A!=null?{dynamic:A}:{},...F.title!=null?{title:F.title}:{}});break}case"tool-input-delta":{L.enqueue({type:"tool-input-delta",toolCallId:F.id,inputTextDelta:F.delta});break}case"tool-call":{let A=z(F);if(F.invalid)L.enqueue({type:"tool-input-error",toolCallId:F.toolCallId,toolName:F.toolName,input:F.input,...F.providerExecuted!=null?{providerExecuted:F.providerExecuted}:{},...F.providerMetadata!=null?{providerMetadata:F.providerMetadata}:{},...F.toolMetadata!=null?{toolMetadata:F.toolMetadata}:{},...A!=null?{dynamic:A}:{},errorText:Z(F.error),...F.title!=null?{title:F.title}:{}});else L.enqueue({type:"tool-input-available",toolCallId:F.toolCallId,toolName:F.toolName,input:F.input,...F.providerExecuted!=null?{providerExecuted:F.providerExecuted}:{},...F.providerMetadata!=null?{providerMetadata:F.providerMetadata}:{},...F.toolMetadata!=null?{toolMetadata:F.toolMetadata}:{},...A!=null?{dynamic:A}:{},...F.title!=null?{title:F.title}:{}});break}case"tool-approval-request":{L.enqueue({type:"tool-approval-request",approvalId:F.approvalId,toolCallId:F.toolCall.toolCallId});break}case"tool-result":{let A=z(F);L.enqueue({type:"tool-output-available",toolCallId:F.toolCallId,output:F.output,...F.providerExecuted!=null?{providerExecuted:F.providerExecuted}:{},...F.providerMetadata!=null?{providerMetadata:F.providerMetadata}:{},...F.toolMetadata!=null?{toolMetadata:F.toolMetadata}:{},...F.preliminary!=null?{preliminary:F.preliminary}:{},...A!=null?{dynamic:A}:{}});break}case"tool-error":{let A=z(F);L.enqueue({type:"tool-output-error",toolCallId:F.toolCallId,errorText:F.providerExecuted?typeof F.error==="string"?F.error:JSON.stringify(F.error):Z(F.error),...F.providerExecuted!=null?{providerExecuted:F.providerExecuted}:{},...F.providerMetadata!=null?{providerMetadata:F.providerMetadata}:{},...F.toolMetadata!=null?{toolMetadata:F.toolMetadata}:{},...A!=null?{dynamic:A}:{}});break}case"tool-output-denied":{L.enqueue({type:"tool-output-denied",toolCallId:F.toolCallId});break}case"error":{L.enqueue({type:"error",errorText:Z(F.error)});break}case"start-step":{L.enqueue({type:"start-step"});break}case"finish-step":{L.enqueue({type:"finish-step"});break}case"start":{if(W)L.enqueue({type:"start",...N!=null?{messageMetadata:N}:{},...H!=null?{messageId:H}:{}});break}case"finish":{if(K)L.enqueue({type:"finish",finishReason:F.finishReason,...N!=null?{messageMetadata:N}:{}});break}case"abort":{L.enqueue(F);break}case"tool-input-end":break;case"raw":break;default:throw Error(`Unknown chunk type: ${D}`)}if(N!=null&&D!=="start"&&D!=="finish")L.enqueue({type:"message-metadata",messageMetadata:N})}}));return hd(gS4({stream:V,messageId:H!=null?H:Y==null?void 0:Y(),originalMessages:$,onFinish:X,onError:Z}))}pipeUIMessageStreamToResponse($,{originalMessages:Y,generateMessageId:X,onFinish:G,messageMetadata:J,sendReasoning:Q,sendSources:W,sendFinish:K,sendStart:Z,onError:H,...z}={}){iy9({response:$,stream:this.toUIMessageStream({originalMessages:Y,generateMessageId:X,onFinish:G,messageMetadata:J,sendReasoning:Q,sendSources:W,sendFinish:K,sendStart:Z,onError:H}),...z})}pipeTextStreamToResponse($,Y){uy9({response:$,textStream:this.textStream,...Y})}toUIMessageStreamResponse({originalMessages:$,generateMessageId:Y,onFinish:X,messageMetadata:G,sendReasoning:J,sendSources:Q,sendFinish:W,sendStart:K,onError:Z,...H}={}){return LG0({stream:this.toUIMessageStream({originalMessages:$,generateMessageId:Y,onFinish:X,messageMetadata:G,sendReasoning:J,sendSources:Q,sendFinish:W,sendStart:K,onError:Z}),...H})}toTextStreamResponse($){return my9({textStream:this.textStream,...$})}};function Xn0({execute:$,onError:Y=uD,originalMessages:X,onStepFinish:G,onFinish:J,generateId:Q=$$}){let W,K=[],Z=new ReadableStream({start(V){W=V}});function H(V){try{W.enqueue(V)}catch(F){}}try{let V=$({writer:{write(F){H(F)},merge(F){K.push((async()=>{let L=F.getReader();while(!0){let{done:N,value:D}=await L.read();if(N)break;H(D)}})().catch((L)=>{H({type:"error",errorText:Y(L)})}))},onError:Y}});if(V)K.push(V.catch((F)=>{H({type:"error",errorText:Y(F)})}))}catch(V){H({type:"error",errorText:Y(V)})}return new Promise(async(V)=>{while(K.length>0)await K.shift();V()}).finally(()=>{try{W.close()}catch(V){}}),gS4({stream:Z,messageId:Q(),originalMessages:X,onStepFinish:G,onFinish:J,onError:Y})}async function mS4($,Y){let X=[];if(Y==null?void 0:Y.ignoreIncompleteToolCalls)$=$.map((G)=>({...G,parts:G.parts.filter((J)=>!mC(J)||J.state!=="input-streaming"&&J.state!=="input-available")}));for(let G of $)switch(G.role){case"system":{let J=G.parts.filter((W)=>W.type==="text"),Q=J.reduce((W,K)=>{if(K.providerMetadata!=null)return{...W,...K.providerMetadata};return W},{});X.push({role:"system",content:J.map((W)=>W.text).join(""),...Object.keys(Q).length>0?{providerOptions:Q}:{}});break}case"user":{X.push({role:"user",content:G.parts.map((J)=>{var Q;if(gi0(J))return{type:"text",text:J.text,...J.providerMetadata!=null?{providerOptions:J.providerMetadata}:{}};if(mi0(J))return{type:"file",mediaType:J.mediaType,filename:J.filename,data:J.url,...J.providerMetadata!=null?{providerOptions:J.providerMetadata}:{}};if(fi0(J))return(Q=Y==null?void 0:Y.convertDataPart)==null?void 0:Q.call(Y,J)}).filter(pu)});break}case"assistant":{if(G.parts!=null){let J=[];async function Q(){var W,K,Z,H,z,V,F;if(J.length===0)return;let L=[];for(let D of J)if(gi0(D))L.push({type:"text",text:D.text,...D.providerMetadata!=null?{providerOptions:D.providerMetadata}:{}});else if(mi0(D))L.push({type:"file",mediaType:D.mediaType,filename:D.filename,data:D.url,...D.providerMetadata!=null?{providerOptions:D.providerMetadata}:{}});else if(NC4(D))L.push({type:"reasoning",text:D.text,providerOptions:D.providerMetadata});else if(mC(D)){let A=ui0(D);if(D.state!=="input-streaming"){if(L.push({type:"tool-call",toolCallId:D.toolCallId,toolName:A,input:D.state==="output-error"?(W=D.input)!=null?W:("rawInput"in D)?D.rawInput:void 0:D.input,providerExecuted:D.providerExecuted,...D.callProviderMetadata!=null?{providerOptions:D.callProviderMetadata}:{}}),D.approval!=null)L.push({type:"tool-approval-request",approvalId:D.approval.id,toolCallId:D.toolCallId});if(D.providerExecuted===!0&&D.state!=="approval-responded"&&(D.state==="output-available"||D.state==="output-error")){let B=(K=D.resultProviderMetadata)!=null?K:D.callProviderMetadata;L.push({type:"tool-result",toolCallId:D.toolCallId,toolName:A,output:await tM({toolCallId:D.toolCallId,input:D.input,output:D.state==="output-error"?D.errorText:D.output,tool:(Z=Y==null?void 0:Y.tools)==null?void 0:Z[A],errorMode:D.state==="output-error"?"json":"none"}),...B!=null?{providerOptions:B}:{}})}}}else if(fi0(D)){let A=(H=Y==null?void 0:Y.convertDataPart)==null?void 0:H.call(Y,D);if(A!=null)L.push(A)}else throw Error(`Unsupported part: ${D}`);X.push({role:"assistant",content:L});let N=J.filter((D)=>{var A;return mC(D)&&(D.providerExecuted!==!0||((A=D.approval)==null?void 0:A.approved)!=null)});if(N.length>0){let D=[];for(let A of N){if(((z=A.approval)==null?void 0:z.approved)!=null)D.push({type:"tool-approval-response",approvalId:A.approval.id,approved:A.approval.approved,reason:A.approval.reason,providerExecuted:A.providerExecuted});if(A.providerExecuted===!0)continue;switch(A.state){case"output-denied":{D.push({type:"tool-result",toolCallId:A.toolCallId,toolName:ui0(A),output:{type:"error-text",value:(V=A.approval.reason)!=null?V:"Tool execution denied."},...A.callProviderMetadata!=null?{providerOptions:A.callProviderMetadata}:{}});break}case"output-error":case"output-available":{let B=ui0(A);D.push({type:"tool-result",toolCallId:A.toolCallId,toolName:B,output:await tM({toolCallId:A.toolCallId,input:A.input,output:A.state==="output-error"?A.errorText:A.output,tool:(F=Y==null?void 0:Y.tools)==null?void 0:F[B],errorMode:A.state==="output-error"?"text":"none"}),...A.callProviderMetadata!=null?{providerOptions:A.callProviderMetadata}:{}});break}}}if(D.length>0)X.push({role:"tool",content:D})}J=[]}for(let W of G.parts)if(gi0(W)||NC4(W)||mi0(W)||mC(W)||fi0(W))J.push(W);else if(W.type==="step-start")await Q();await Q();break}break}default:{let J=G.role;throw new ax9({originalMessage:G,message:`Unsupported role: ${J}`})}}return X}var pQ=U.record(U.string(),$R.optional()),Fj$=N1(()=>z1(U.array(U.object({id:U.string(),role:U.enum(["system","user","assistant"]),metadata:U.unknown().optional(),parts:U.array(U.union([U.object({type:U.literal("text"),text:U.string(),state:U.enum(["streaming","done"]).optional(),providerMetadata:k4.optional()}),U.object({type:U.literal("reasoning"),text:U.string(),state:U.enum(["streaming","done"]).optional(),providerMetadata:k4.optional()}),U.object({type:U.literal("source-url"),sourceId:U.string(),url:U.string(),title:U.string().optional(),providerMetadata:k4.optional()}),U.object({type:U.literal("source-document"),sourceId:U.string(),mediaType:U.string(),title:U.string(),filename:U.string().optional(),providerMetadata:k4.optional()}),U.object({type:U.literal("file"),mediaType:U.string(),filename:U.string().optional(),url:U.string(),providerMetadata:k4.optional()}),U.object({type:U.literal("step-start")}),U.object({type:U.string().startsWith("data-"),id:U.string().optional(),data:U.unknown()}),U.object({type:U.literal("dynamic-tool"),toolName:U.string(),toolCallId:U.string(),toolMetadata:pQ.optional(),state:U.literal("input-streaming"),input:U.unknown().optional(),providerExecuted:U.boolean().optional(),callProviderMetadata:k4.optional(),output:U.never().optional(),errorText:U.never().optional(),approval:U.never().optional()}),U.object({type:U.literal("dynamic-tool"),toolName:U.string(),toolCallId:U.string(),toolMetadata:pQ.optional(),state:U.literal("input-available"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:k4.optional(),approval:U.never().optional()}),U.object({type:U.literal("dynamic-tool"),toolName:U.string(),toolCallId:U.string(),toolMetadata:pQ.optional(),state:U.literal("approval-requested"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:k4.optional(),approval:U.object({id:U.string(),approved:U.never().optional(),reason:U.never().optional()})}),U.object({type:U.literal("dynamic-tool"),toolName:U.string(),toolCallId:U.string(),toolMetadata:pQ.optional(),state:U.literal("approval-responded"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:k4.optional(),approval:U.object({id:U.string(),approved:U.boolean(),reason:U.string().optional()})}),U.object({type:U.literal("dynamic-tool"),toolName:U.string(),toolCallId:U.string(),toolMetadata:pQ.optional(),state:U.literal("output-available"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.unknown(),errorText:U.never().optional(),callProviderMetadata:k4.optional(),resultProviderMetadata:k4.optional(),preliminary:U.boolean().optional(),approval:U.object({id:U.string(),approved:U.literal(!0),reason:U.string().optional()}).optional()}),U.object({type:U.literal("dynamic-tool"),toolName:U.string(),toolCallId:U.string(),toolMetadata:pQ.optional(),state:U.literal("output-error"),input:U.unknown().optional(),rawInput:U.unknown().optional(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.string(),callProviderMetadata:k4.optional(),resultProviderMetadata:k4.optional(),approval:U.object({id:U.string(),approved:U.literal(!0),reason:U.string().optional()}).optional()}),U.object({type:U.literal("dynamic-tool"),toolName:U.string(),toolCallId:U.string(),toolMetadata:pQ.optional(),state:U.literal("output-denied"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:k4.optional(),approval:U.object({id:U.string(),approved:U.literal(!1),reason:U.string().optional()})}),U.object({type:U.string().startsWith("tool-"),toolCallId:U.string(),toolMetadata:pQ.optional(),state:U.literal("input-streaming"),providerExecuted:U.boolean().optional(),callProviderMetadata:k4.optional(),input:U.unknown().optional(),output:U.never().optional(),errorText:U.never().optional(),approval:U.never().optional()}),U.object({type:U.string().startsWith("tool-"),toolCallId:U.string(),toolMetadata:pQ.optional(),state:U.literal("input-available"),providerExecuted:U.boolean().optional(),input:U.unknown(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:k4.optional(),approval:U.never().optional()}),U.object({type:U.string().startsWith("tool-"),toolCallId:U.string(),toolMetadata:pQ.optional(),state:U.literal("approval-requested"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:k4.optional(),approval:U.object({id:U.string(),approved:U.never().optional(),reason:U.never().optional()})}),U.object({type:U.string().startsWith("tool-"),toolCallId:U.string(),toolMetadata:pQ.optional(),state:U.literal("approval-responded"),input:U.unknown(),providerExecuted:U.boolean().optional(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:k4.optional(),approval:U.object({id:U.string(),approved:U.boolean(),reason:U.string().optional()})}),U.object({type:U.string().startsWith("tool-"),toolCallId:U.string(),toolMetadata:pQ.optional(),state:U.literal("output-available"),providerExecuted:U.boolean().optional(),input:U.unknown(),output:U.unknown(),errorText:U.never().optional(),callProviderMetadata:k4.optional(),resultProviderMetadata:k4.optional(),preliminary:U.boolean().optional(),approval:U.object({id:U.string(),approved:U.literal(!0),reason:U.string().optional()}).optional()}),U.object({type:U.string().startsWith("tool-"),toolCallId:U.string(),toolMetadata:pQ.optional(),state:U.literal("output-error"),providerExecuted:U.boolean().optional(),input:U.unknown().optional(),rawInput:U.unknown().optional(),output:U.never().optional(),errorText:U.string(),callProviderMetadata:k4.optional(),resultProviderMetadata:k4.optional(),approval:U.object({id:U.string(),approved:U.literal(!0),reason:U.string().optional()}).optional()}),U.object({type:U.string().startsWith("tool-"),toolCallId:U.string(),toolMetadata:pQ.optional(),state:U.literal("output-denied"),providerExecuted:U.boolean().optional(),input:U.unknown(),output:U.never().optional(),errorText:U.never().optional(),callProviderMetadata:k4.optional(),approval:U.object({id:U.string(),approved:U.literal(!1),reason:U.string().optional()})})])).nonempty("Message must contain at least one part")})).nonempty("Messages array must not be empty")));var Dj$=YH({prefix:"aiobj",size:24});function uS4($){return({url:Y,abortSignal:X})=>ZS4({url:Y,maxBytes:$==null?void 0:$.maxBytes,abortSignal:X})}var Aj$=YH({prefix:"aiobj",size:24});var Bj$=uS4();var ey9="AI_NoSuchProviderError",$b9=`vercel.ai.error.${ey9}`,Yb9=Symbol.for($b9),Xb9;Xb9=Yb9;var Oj$=uS4();ON();ZY();var DG0=U6(cF(),1),Gk4=U6(xN(),1);import Qb9 from"os";var wU=B6("sys_agentmanager",{id:g0("id"),name:g0("name"),code:g0("code"),parames:g0("parames"),model:g0("model"),userPrompt:g0("userPrompt"),systemPrompt:g0("systemPrompt"),tools:g0("tools"),type:g0("type"),status:m1("status"),remark:g0("remark"),createdAt:m1("createdAt"),updatedAt:m1("updatedAt"),latest_visitAt:m1("latest_visitAt"),createBy:g0("createBy"),updateBy:g0("updateBy"),env_id:g0("env_id")});async function pS4($){return await e0.select().from(wU).where(_1(wU.code,$))}function dS4($){let Y=r.raw("1 = 1");if($.searchVal&&$.searchVal.length>0)Y.append(r.raw(` and (name like '%${$.searchVal}%' or remark like '%${$.searchVal}%')`));if($.code&&$.code.length>0)Y.append(r.raw(` and code like '%${$.code}%'`));if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));return Y}async function cS4($){return await e0.select().from(wU).where(dS4($)).limit(Number($.limit)).offset(Number($.offset))}async function lS4($){return await e0.$count(wU,dS4($))}async function iS4($){let Y=await e0.$count(wU,_1(wU.code,$.code));if(Y&&Y>0)Gb9($);else{let X=Date.now();$.id=C6(),$.code=C6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,$.status=1,$.type="1",await e0.insert(wU).values($)}}async function Gb9($){let Y=Date.now();$.updateBy="admin",$.updatedAt=Y,$.latest_visitAt=Y,await e0.update(wU).set($).where(_1(wU.code,$.code))}async function nS4($){await e0.delete(wU).where(_1(wU.code,$))}var dQ=B6("sys_llmconfig",{id:g0("id"),name:g0("name"),apiKey:g0("apiKey"),baseURL:g0("baseURL"),status:m1("status"),llamacpp:m1("llamacpp"),remark:g0("remark"),createdAt:m1("createdAt"),updatedAt:m1("updatedAt"),latest_visitAt:m1("latest_visitAt"),createBy:g0("createBy"),updateBy:g0("updateBy"),env_id:g0("env_id")});async function aS4($){return await e0.select().from(dQ).where(_1(dQ.id,$))}async function sS4($){return await e0.select().from(dQ).where(_1(dQ.name,$))}function Gn0($){let Y=r.raw("1 = 1");if($.name&&$.name.length>0)Y.append(r.raw(` and name like '%${$.name}%'`));if($.remark&&$.remark.length>0)Y.append(r.raw(` and remark like '%${$.remark}%'`));if($.status&&$.status>0)Y.append(r.raw(` and status = ${$.status} `));return Y}async function LN($){return await e0.select().from(dQ).where(Gn0($))}async function oS4($){return await e0.select().from(dQ).where(Gn0($)).limit(Number($.limit)).offset(Number($.offset))}async function tS4($){return await e0.$count(dQ,Gn0($))}async function eS4($){let Y=await e0.$count(dQ,_1(dQ.id,$.id));if(Y&&Y>0)Jb9($);else{let X=Date.now();$.id=C6(),$.env_id="default",$.createBy="admin",$.createdAt=X,$.updateBy="admin",$.updatedAt=X,await e0.insert(dQ).values($)}}async function Jb9($){let Y=Date.now();$.updateBy="admin",$.updatedAt=Y,$.latest_visitAt=Y,await e0.update(dQ).set($).where(_1(dQ.id,$.id))}async function $k4($){await e0.delete(dQ).where(_1(dQ.id,$))}function Wb9(){let $=Qb9.networkInterfaces();for(let Y of Object.keys($))for(let X of $[Y])if(X.family==="IPv4"&&!X.internal)return X.address;return"No External IP found"}var Kb9=Wb9();async function Jk4(){return await new qz4({id:"localhost",servers:{myServer:{url:new URL(`http://${Kb9}:${Bun.env.PORT||3000}/mcp`)}}}).listTools()}var Zb9={max:500,maxSize:1000,sizeCalculation:($,Y)=>{return 1},dispose:($,Y)=>{},ttl:3600000,allowStale:!1,updateAgeOnGet:!1,updateAgeOnHas:!1,fetchMethod:async($,Y,{options:X,signal:G,context:J})=>{}},Xk4=new eW(Zb9),NT$=new Gk4.default({length:10}),SJ=new _4;var NG0;async function Jn0($=!1){if(NG0&&!$)return!0;let Y=await LN({limit:1e4,offset:0,status:1});if(!Y||!Y[0])return!1;let X=zU({name:Y[0].name??"",apiKey:Y[0].apiKey??"",baseURL:Y[0].baseURL??"",includeUsage:!0}),G=new uw4({storage:new RD4({id:"mastra-storage",url:"file:./memory.db"})});return NG0=new YJ({id:"chat-agent",name:"assistant",instructions:"You are a helpful assistant.",model:X(Y[0].name??""),memory:G,tools:async()=>{return await Jk4()}}),!0}SJ.post("/demo",async($)=>{let Y=await $.req.json();if(!await Jn0())throw new v0(500,{message:"\u8FDE\u63A5\u5931\u8D25"});let G=await NG0.stream(Y.prompt);return J70($,async(J)=>{for await(let Q of G.textStream)await J.write(Q)})});var AT$={weather:cu({description:"Get weather information",inputSchema:U.object({location:U.string().describe("The location to get the weather for")}),execute:async({location:$})=>{let Y=Math.round(Math.random()*58+32);return{}}})};SJ.post("/chat",async($)=>{let{messages:Y}=await $.req.json(),X=zU({name:"deepseek-v3",apiKey:"sk-xxxxxxxxxx",baseURL:"https://api.lkeap.cloud.tencent.com/v1",includeUsage:!0});return Yn0({model:X("deepseek-v3"),messages:await mS4(Y)}).toUIMessageStreamResponse()});SJ.post("/agentChat",async($)=>{let{messages:Y}=await $.req.json(),G=Y.slice(-1)[0].parts[0].text,J=await LN({limit:1e4,offset:0,status:1});if(!J||!J[0])throw new v0(500,{message:"\u8FDE\u63A5\u5931\u8D25"});if(J[0].llamacpp==1?0:1){if(!await Jn0())throw new v0(500,{message:"\u8FDE\u63A5\u5931\u8D25"});let K=await NG0.stream(G),Z=Xn0({execute:async({writer:H})=>{H.write({type:"start"});for await(let z of K.textStream)H.write({type:"data-custom",data:z});H.write({type:"finish"})}});return LG0({stream:Z})}else{let K=FU({baseURL:J[0].baseURL??"",apiKey:J[0].apiKey??"",headers:{"header-name":"header-value"}}).completion(J[0].name??""),{textStream:Z}=Yn0({model:K,prompt:[{role:"system",content:"You are a helpful assistant."},{role:"user",content:G}]}),H=Xn0({execute:async({writer:z})=>{z.write({type:"start"});for await(let V of Z)z.write({type:"data-custom",data:V});z.write({type:"finish"})}});return LG0({stream:H})}});SJ.post("/refresh",async($)=>{try{let Y=await $.req.json();if(!await Jn0(!0))throw new v0(500,{message:"\u8FDE\u63A5\u5931\u8D25"});let G=$1();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5237\u65B0\u5931\u8D25"})}});SJ.post("/sqlGeneration",async($)=>{try{let Y=await $.req.json(),X=Y.tableNames,G=n1(JSON.stringify(X),/[\[\]]/g,""),J=Y.textInput;if(!J||J.length==0)throw new v0(500,{message:"\u5F85\u5904\u7406\u6587\u672C\u4E3A\u7A7A"});let Q=Y.poolCode;if(!Q||Q.length==0)throw new v0(500,{message:"poolCode\u4E0D\u80FD\u4E3A\u7A7A"});let W=await wF(Q),K=`
    SELECT
	    table_name,
      table_schema
    FROM
	    information_schema.TABLES
    WHERE
	    table_schema = '${W[0]?.databaseName}'
      AND table_name IN (${G})
    `,Z=`
    SELECT
	    t.table_schema,
	    t.table_name,
	    c.column_name,
	    c.data_type,
      c.COLUMN_COMMENT
    FROM
	    information_schema.TABLES t
	      JOIN information_schema.COLUMNS c ON t.table_name = c.table_name
	        AND t.table_schema = c.table_schema
    WHERE
	    t.table_schema = '${W[0]?.databaseName}'
      AND t.table_name IN ( ${G} )
    ORDER BY
	    t.table_schema,
	    t.table_name,
	    c.ordinal_position
    `,H=await uX(Q),z=await H.execute(r.raw(K)),V=await H.execute(r.raw(Z)),F=Ub9({tables:z[0],columns:V[0]}),N=`Generate a SQL query for this question: "${J}"

Please provide:
1. The SQL query only,no chinese.`,D=`You are an expert MySql query generator. Your task is to convert natural language questions into accurate SQL queries.

DATABASE SCHEMA:
${F}

RULES:
1. Only generate SELECT queries for data retrieval
2. Use proper MySql syntax
3. Always qualify column names with table names when joining tables
4. Use appropriate JOINs when data from multiple tables is needed
5. Be case-insensitive for text searches using ILIKE
6. Use proper data types for comparisons
7. Format queries with proper indentation and line breaks
8. Include appropriate WHERE clauses to filter results
9. Use LIMIT when appropriate to prevent overly large result sets
10. Consider performance implications of the query

QUERY ANALYSIS:
- Analyze the user's question carefully
- Identify which tables and columns are needed
- Determine if joins are required
- Consider aggregation functions if needed
- Think about appropriate filtering conditions
- Consider ordering and limiting results

Provide a high-confidence SQL query that accurately answers the user's question.`,A=await LN({limit:1e4,offset:0,status:1});if(!A||!A[0])throw new v0(500,{message:"\u6CA1\u6709\u914D\u7F6E\u6709\u6548\u7684\u5927\u6A21\u578B"});let B=A[0].llamacpp==1?0:1,O=zU({name:A[0].name??"",apiKey:A[0].apiKey??"",baseURL:A[0].baseURL??"",includeUsage:!0}),M=FU({baseURL:A[0].baseURL??"",apiKey:A[0].apiKey??"",headers:{"header-name":"header-value"}}).completion(A[0].name??""),R=await jV({model:B?O(A[0].name??""):M,temperature:0.1,system:D,prompt:N}),q=$1();return q.data={success:!0,sql:D4(R.content[0],"text")},$.json(q)}catch(Y){throw console.error(Y),new v0(500,{message:"\u751F\u6210\u5931\u8D25"})}});function Ub9($){let Y="",X=new Map;return $.columns.forEach((G)=>{let J=`${G.table_schema}.${G.table_name}`;if(!X.has(J))X.set(J,[]);X.get(J)?.push(G)}),$.tables.forEach((G)=>{let J=`${G.table_schema}.${G.table_name}`,Q=X.get(J)||[];Y+=`
Table: ${G.table_schema}.${G.table_name}`,Y+=`
Columns:
`,Q.forEach((W)=>{Y+=`  - ${W.column_name}: ${W.data_type}`,Y+=`
`})}),Y}SJ.post("/sqlPgGeneration",async($)=>{try{let Y=await $.req.json(),X=Y.tableNames,G=n1(n1(JSON.stringify(X),/[\[\]]/g,""),/[\"]/g,"'"),J=Y.textInput;if(!J||J.length==0)throw new v0(500,{message:"\u5F85\u5904\u7406\u6587\u672C\u4E3A\u7A7A"});let Q=Y.poolCode;if(!Q||Q.length==0)throw new v0(500,{message:"poolCode\u4E0D\u80FD\u4E3A\u7A7A"});let W=`
    SELECT
	    schemaname AS table_schema,
	    tablename AS "table_name" 
    FROM
	    pg_tables 
    WHERE
	    schemaname NOT IN ( 'information_schema', 'pg_catalog' ) 
	    AND tablename IN ( ${G} ) 
    ORDER BY
	    schemaname,
	    tablename
    `,K=`
        SELECT 
	        T.table_schema AS table_schema,
	        T.TABLE_NAME AS "table_name" ,
	        C.COLUMN_NAME,
	        C.data_type,
          C.character_maximum_length,
	        C.numeric_precision,
	        C.numeric_scale,
	        C.is_nullable,
	        C.column_default
        FROM
	        information_schema.tables T 
          JOIN information_schema.COLUMNS C ON T.TABLE_NAME = C.TABLE_NAME 
	          AND T.table_schema = C.table_schema 
        WHERE
	        T.table_schema NOT IN ( 'information_schema', 'pg_catalog' ) 
	        AND T.TABLE_NAME IN ( ${G} ) 
        ORDER BY
	        T.table_schema,
	        T.TABLE_NAME,
	        C.ordinal_position
      `,Z=await pX(Q),H=await Z.execute(r.raw(W)),z=await Z.execute(r.raw(K)),V=Hb9({tables:H.rows,columns:z.rows}),L=`Generate a SQL query for this question: "${J}"

Please provide:
1. The SQL query , no chinese.`,N=`You are an expert PostgreSQL query generator. Your task is to convert natural language questions into accurate SQL queries.

DATABASE SCHEMA:
${V}

RULES:
1. Only generate SELECT queries for data retrieval
2. Use proper PostgreSQL syntax
3. Always qualify column names with table names when joining tables
4. Use appropriate JOINs when data from multiple tables is needed
5. Be case-insensitive for text searches using ILIKE
6. Use proper data types for comparisons
7. Format queries with proper indentation and line breaks
8. Include appropriate WHERE clauses to filter results
9. Use LIMIT when appropriate to prevent overly large result sets
10. Consider performance implications of the query

QUERY ANALYSIS:
- Analyze the user's question carefully
- Identify which tables and columns are needed
- Determine if joins are required
- Consider aggregation functions if needed
- Think about appropriate filtering conditions
- Consider ordering and limiting results

Provide a high-confidence SQL query that accurately answers the user's question.`,D=await LN({limit:1e4,offset:0,status:1});if(!D||!D[0])throw new v0(500,{message:"\u6CA1\u6709\u914D\u7F6E\u6709\u6548\u7684\u5927\u6A21\u578B"});let A=D[0].llamacpp==1?0:1,B=zU({name:D[0].name??"",apiKey:D[0].apiKey??"",baseURL:D[0].baseURL??"",includeUsage:!0}),E=FU({baseURL:D[0].baseURL??"",apiKey:D[0].apiKey??"",headers:{"header-name":"header-value"}}).completion(D[0].name??""),M=await jV({model:A?B(D[0].name??""):E,temperature:0.1,system:N,prompt:L}),R=$1();return R.data={success:!0,sql:D4(M.content[0],"text")},$.json(R)}catch(Y){throw console.error(Y),new v0(500,{message:"\u751F\u6210\u5931\u8D25"})}});function Hb9($){let Y="",X=new Map;return $.columns.forEach((G)=>{let J=`${G.table_schema}.${G.table_name}`;if(!X.has(J))X.set(J,[]);X.get(J)?.push(G)}),$.tables.forEach((G)=>{let J=`${G.table_schema}.${G.table_name}`,Q=X.get(J)||[];Y+=`
Table: ${G.table_schema}.${G.table_name}`,Y+=`
Columns:
`,Q.forEach((W)=>{if(Y+=`  - ${W.column_name}: ${W.data_type}`,W.character_maximum_length)Y+=`(${W.character_maximum_length})`;if(W.is_nullable==="NO")Y+=" [NOT NULL]";if(W.column_default)Y+=` [DEFAULT: ${W.column_default}]`;Y+=`
`})}),Y}SJ.post("/sqlSqliteGeneration",async($)=>{try{let Y=await $.req.json(),X=Y.tableNames,G=n1(n1(JSON.stringify(X),/[\[\]]/g,""),/[\"]/g,"'"),J=Y.textInput;if(!J||J.length==0)throw new v0(500,{message:"\u5F85\u5904\u7406\u6587\u672C\u4E3A\u7A7A"});let Q=Y.poolCode;if(!Q||Q.length==0)throw new v0(500,{message:"poolCode\u4E0D\u80FD\u4E3A\u7A7A"});let W=`
    SELECT
	    name AS table_name 
    FROM
	    sqlite_master 
    WHERE
	    type = 'table' 
	    AND name IN ( ${G} )`,K=await WX(Q),Z=K.all(r.raw(W)),H=[];Z.forEach((R)=>{let q=`PRAGMA table_info(${R.table_name})`;K.all(r.raw(q)).forEach((P)=>{H.push({table_name:R.table_name,column_name:P.name,data_type:P.type})})});let z=zb9({tables:Z,columns:H}),F=`Generate a SQL query for this question: "${J}"

Please provide:
1. The SQL query , no chinese.`,L=`You are an expert sqlite query generator. Your task is to convert natural language questions into accurate SQL queries.

DATABASE SCHEMA:
${z}

RULES:
1. Only generate SELECT queries for data retrieval
2. Use proper sqlite syntax
3. Always qualify column names with table names when joining tables
4. Use appropriate JOINs when data from multiple tables is needed
5. Be case-insensitive for text searches using ILIKE
6. Use proper data types for comparisons
7. Format queries with proper indentation and line breaks
8. Include appropriate WHERE clauses to filter results
9. Use LIMIT when appropriate to prevent overly large result sets
10. Consider performance implications of the query

QUERY ANALYSIS:
- Analyze the user's question carefully
- Identify which tables and columns are needed
- Determine if joins are required
- Consider aggregation functions if needed
- Think about appropriate filtering conditions
- Consider ordering and limiting results

Provide a high-confidence SQL query that accurately answers the user's question.`,N=await LN({limit:1e4,offset:0,status:1});if(!N||!N[0])throw new v0(500,{message:"\u6CA1\u6709\u914D\u7F6E\u6709\u6548\u7684\u5927\u6A21\u578B"});let D=N[0].llamacpp==1?0:1,A=zU({name:N[0].name??"",apiKey:N[0].apiKey??"",baseURL:N[0].baseURL??"",includeUsage:!0}),O=FU({baseURL:N[0].baseURL??"",apiKey:N[0].apiKey??"",headers:{"header-name":"header-value"}}).completion(N[0].name??""),E=await jV({model:D?A(N[0].name??""):O,temperature:0.1,system:L,prompt:F}),M=$1();return M.data={success:!0,sql:D4(E.content[0],"text")},$.json(M)}catch(Y){throw console.error(Y),new v0(500,{message:"\u751F\u6210\u5931\u8D25"})}});function zb9($){let Y="",X=new Map;return $.columns.forEach((G)=>{let J=`${G.table_name}`;if(!X.has(J))X.set(J,[]);X.get(J)?.push(G)}),$.tables.forEach((G)=>{let J=`${G.table_name}`,Q=X.get(J)||[];Y+=`
Table: ${G.table_name}`,Y+=`
Columns:
`,Q.forEach((W)=>{Y+=`  - ${W.column_name}: ${W.data_type}`,Y+=`
`})}),Y}SJ.post("/sqlOracleGeneration",async($)=>{try{let Y=await $.req.json(),X=Y.tableNames,G=n1(n1(JSON.stringify(X),/[\[\]]/g,""),/[\"]/g,"'"),J=Y.textInput;if(!J||J.length==0)throw new v0(500,{message:"\u5F85\u5904\u7406\u6587\u672C\u4E3A\u7A7A"});let Q=Y.poolCode;if(!Q||Q.length==0)throw new v0(500,{message:"poolCode\u4E0D\u80FD\u4E3A\u7A7A"});let W=`
    SELECT
	    TABLESPACE_NAME AS table_schema,
	    TABLE_NAME AS table_name 
    FROM
	    all_tables 
    WHERE
	    TABLE_NAME IN ( ${G} ) 
    ORDER BY
	    TABLE_NAME`,K=`
    SELECT
	    t.TABLESPACE_NAME AS table_schema,
	    t.TABLE_NAME AS table_name,
	    c.column_name AS Field,
	    c.data_type AS TYPE,
	    c.data_length AS LENGTH,
	    c.nullable AS NULLABLE 
    FROM
	    all_tables t
	    LEFT JOIN all_tab_columns c ON t.TABLE_NAME = c.TABLE_NAME 
    WHERE
	    t.TABLE_NAME IN ( ${G} ) 
    ORDER BY
	    t.TABLE_NAME
      `,Z=await lX(Q),H=await Z.execute(`${W}`,[],{outFormat:DG0.default.OUT_FORMAT_OBJECT}),z=await Z.execute(`${K}`,[],{outFormat:DG0.default.OUT_FORMAT_OBJECT}),V=Vb9({tables:H.rows,columns:z.rows}),L=`Generate a SQL query for this question: "${J}"

Please provide:
1. The SQL query , no chinese , no semicolon.`,N=`You are an expert Oracle query generator. Your task is to convert natural language questions into accurate SQL queries.

DATABASE SCHEMA:
${V}

RULES:
1. Only generate SELECT queries for data retrieval
2. Use proper PostgreSQL syntax
3. Always qualify column names with table names when joining tables
4. Use appropriate JOINs when data from multiple tables is needed
5. Be case-insensitive for text searches using ILIKE
6. Use proper data types for comparisons
7. Format queries with proper indentation and line breaks
8. Include appropriate WHERE clauses to filter results
9. Use FETCH NEXT :pageSize ROWS ONLY when appropriate to prevent overly large result sets
10. Consider performance implications of the query

QUERY ANALYSIS:
- Analyze the user's question carefully
- Identify which tables and columns are needed
- Determine if joins are required
- Consider aggregation functions if needed
- Think about appropriate filtering conditions
- Consider ordering and limiting results

Provide a high-confidence SQL query that accurately answers the user's question.`,D=await LN({limit:1e4,offset:0,status:1});if(!D||!D[0])throw new v0(500,{message:"\u6CA1\u6709\u914D\u7F6E\u6709\u6548\u7684\u5927\u6A21\u578B"});let A=D[0].llamacpp==1?0:1,B=zU({name:D[0].name??"",apiKey:D[0].apiKey??"",baseURL:D[0].baseURL??"",includeUsage:!0}),E=FU({baseURL:D[0].baseURL??"",apiKey:D[0].apiKey??"",headers:{"header-name":"header-value"}}).completion(D[0].name??""),M=await jV({model:A?B(D[0].name??""):E,temperature:0.1,system:N,prompt:L}),R=$1();return R.data={success:!0,sql:D4(M.content[0],"text")},$.json(R)}catch(Y){throw console.error(Y),new v0(500,{message:"\u751F\u6210\u5931\u8D25"})}});function Vb9($){let Y="",X=new Map;return $.columns.forEach((G)=>{let J=`${G.TABLE_SCHEMA}.${G.TABLE_NAME}`;if(!X.has(J))X.set(J,[]);X.get(J)?.push(G)}),$.tables.forEach((G)=>{let J=`${G.TABLE_SCHEMA}.${G.TABLE_NAME}`,Q=X.get(J)||[];Y+=`
Table: ${G.TABLE_NAME}`,Y+=`
Columns:
`,Q.forEach((W)=>{if(Y+=`  - ${W.FIELD}: ${W.TYPE}`,W.LENGTH)Y+=`(${W.LENGTH})`;if(W.NULLABLE==="N")Y+=" [NOT NULL]";Y+=`
`})}),Y}SJ.get("/queryTableSchema",async($)=>{try{let X=$.req.query().poolCode;if(!X||X.length==0)throw new v0(500,{message:"poolCode\u4E0D\u80FD\u4E3A\u7A7A"});let G=await wF(X);if(!G[0])throw new v0(500,{message:"poolCode\u5BF9\u5E94\u914D\u7F6E\u4E0D\u5B58\u5728"});let J=`
    SELECT
	    table_name,
      table_schema
    FROM
	    information_schema.TABLES
    WHERE
	    table_schema = '${G[0]?.databaseName}'
    `,W=await(await uX(X)).execute(r.raw(J)),K=$1();return K.data=W[0],$.json(K)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});SJ.get("/queryPgTableSchema",async($)=>{try{let X=$.req.query().poolCode;if(!X||X.length==0)throw new v0(500,{message:"poolCode\u4E0D\u80FD\u4E3A\u7A7A"});if(!(await uA(X))[0])throw new v0(500,{message:"poolCode\u5BF9\u5E94\u914D\u7F6E\u4E0D\u5B58\u5728"});let J=`
    SELECT
	    schemaname AS table_schema,
	    tablename AS table_name
    FROM
	    pg_tables 
    WHERE
	    schemaname NOT IN ( 'information_schema', 'pg_catalog' ) 
    ORDER BY
	    schemaname,
	    tablename
    `,W=await(await pX(X)).execute(r.raw(J)),K=$1();return K.data=W.rows,$.json(K)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});SJ.get("/queryOracleTableSchema",async($)=>{try{let X=$.req.query().poolCode;if(!X||X.length==0)throw new v0(500,{message:"poolCode\u4E0D\u80FD\u4E3A\u7A7A"});if(!(await W3(X))[0])throw new v0(500,{message:"poolCode\u5BF9\u5E94\u914D\u7F6E\u4E0D\u5B58\u5728"});let J=`
    SELECT
	    TABLE_NAME,
	    TABLESPACE_NAME 
    FROM
	    all_tables 
    WHERE
	    TABLESPACE_NAME != 'SYSTEM' 
	    AND TABLESPACE_NAME != 'SYSAUX'
	    ORDER BY TABLE_NAME
    `,Q=await lX(X),W=await Q.execute(J,[],{outFormat:DG0.default.OUT_FORMAT_OBJECT});Q.close();let K=$1();return K.data=W.rows,$.json(K)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});SJ.get("/querySqliteTableSchema",async($)=>{try{let X=$.req.query().poolCode;if(!X||X.length==0)throw new v0(500,{message:"poolCode\u4E0D\u80FD\u4E3A\u7A7A"});let G="SELECT name AS table_name FROM sqlite_master WHERE type='table'",Q=(await WX(X)).all(G),W=$1();return W.data=Q,$.json(W)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});SJ.post("/transText",async($)=>{try{let X=(await $.req.json()).textInput;if(!X||X.length==0)throw new v0(500,{message:"\u5F85\u5904\u7406\u6587\u672C\u4E3A\u7A7A"});let G=`\u7FFB\u8BD1\u4E0B\u9762\u5185\u5BB9\u4E3A\u82F1\u6587\uFF1A"${X}"\u3002`,J="\u4F60\u662F\u4E00\u4E2A\u667A\u80FD\u52A9\u624B",Q=await LN({limit:1e4,offset:0,status:1});if(!Q||!Q[0])throw new v0(500,{message:"\u6CA1\u6709\u914D\u7F6E\u6709\u6548\u7684\u5927\u6A21\u578B"});let W=Q[0].llamacpp==1?0:1,K=zU({name:Q[0].name??"",apiKey:Q[0].apiKey??"",baseURL:Q[0].baseURL??"",includeUsage:!0}),H=FU({baseURL:Q[0].baseURL??"",apiKey:Q[0].apiKey??"",headers:{"header-name":"header-value"}}).completion(Q[0].name??""),z=await jV({model:W?K(Q[0].name??""):H,temperature:0.1,system:J,prompt:G}),V=$1();return V.data={success:!0,res:D4(z.content[0],"text")},$.json(V)}catch(Y){throw console.error(Y),new v0(500,{message:"\u751F\u6210\u5931\u8D25"})}});SJ.post("run/:code",async($)=>{try{let Y=$.req.param("code");U.string().parse(Y);let J=(await $.req.json()).prompt,Q=Xk4.get(Y),W=$1(),K=await pS4(Y);if(K&&K[0]){let Z=K[0].name,H=K[0].model,z=J?J:K[0].userPrompt,V=K[0].systemPrompt,F=K[0].tools;if(!Q){let N=await sS4(H??"");if(!N||!N[0])throw new v0(500,{message:"\u8FD0\u884C\u5931\u8D25\uFF1A\u65E0\u6548\u7684\u5927\u6A21\u578B\u914D\u7F6E"});let D=N[0].llamacpp==1?0:1,A=zU({name:N[0].name??"",apiKey:N[0].apiKey??"",baseURL:N[0].baseURL??"",includeUsage:!0}),O=FU({baseURL:N[0].baseURL??"",apiKey:N[0].apiKey??"",headers:{"header-name":"header-value"}}).completion(N[0].name??"");Q=new YJ({id:"run-agent",name:Z??"",instructions:V??"",model:D?A(N[0].name??""):O,tools:async()=>{return await Jk4()}})}let L=await Q.generate(z??"");W.data={success:!0,res:L.text},Xk4.set(Y,Q)}return $.json(W)}catch(Y){throw console.error(Y),new v0(500,{message:"\u8FD0\u884C\u5931\u8D25"})}});var Qk4=SJ;var ud=new _4;ud.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};q6(Y,$.req.query());let X=await oS4(Y),G=await tS4(Y),J=$1();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});ud.post("/save",async($)=>{try{let Y=await $.req.json(),X={};q6(X,Y),await eS4(X);let G=$1();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});ud.post("/delete",async($)=>{try{let Y=await $.req.json();await $k4(Y.id);let X=$1();return $.json(X)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5220\u9664\u5931\u8D25"})}});ud.get("/test",async($)=>{try{let Y=$.req.query("id"),X=await aS4(Y?Y:"");if(!X||!X[0])throw new v0(500,{message:"\u8FDE\u63A5\u5931\u8D25"});let G=$1();if(X[0].llamacpp==1?0:1){let Q=zU({name:X[0].name??"",apiKey:X[0].apiKey??"",baseURL:X[0].baseURL??"",includeUsage:!0}),{text:W}=await jV({model:Q(X[0].name??""),system:"\u4F60\u662F\u4E00\u4E2A\u667A\u80FD\u52A9\u624B",prompt:"\u4F60\u662F\u8C01\uFF1F"});G.data=W}else{let W=FU({baseURL:X[0].baseURL??"",apiKey:X[0].apiKey??""}).completion(X[0].name??""),{text:K}=await jV({model:W,system:"\u4F60\u662F\u4E00\u4E2A\u667A\u80FD\u52A9\u624B",prompt:"\u4F60\u662F\u8C01\uFF1F"});G.data=K}return $.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u8FDE\u63A5\u5931\u8D25"})}});var Wk4=ud;var AG0=new _4;AG0.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};q6(Y,$.req.query());let X=await cS4(Y),G=await lS4(Y),J=$1();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});AG0.post("/save",async($)=>{try{let Y=await $.req.json(),X={};q6(X,Y),await iS4(X);let G=$1();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});AG0.post("/delete",async($)=>{try{let Y=await $.req.json();await nS4(Y.code);let X=$1();return $.json(X)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var Kk4=AG0;var BG0=new _4;BG0.get("/queryPage",async($)=>{try{let Y={limit:10,offset:0};q6(Y,$.req.query());let X=await uG1(Y),G=await pG1(Y),J=$1();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});BG0.post("/save",async($)=>{try{let Y=await $.req.json(),X={};q6(X,Y),await Xr(X);let G=$1();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});BG0.post("/delete",async($)=>{try{let Y=await $.req.json(),X=await gG1(Y.id);if(X&&X[0]&&X[0].path&&X[0].path.includes("static/upload"))await Bun.file(X[0].path).delete();await dG1(Y.id);let G=$1();return $.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var Zk4=BG0;var pC=new _4;pC.get("/queryPage",async($)=>{try{let Y={limit:6,offset:0};q6(Y,$.req.query());let X=await jB1(Y);if(a8(X))X.forEach(async(Q)=>{let W=await aN(Q.path1);Q.details=W});let G=await TB1(Y),J=$1();return J.data=X,J.total=G,$.json(J)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});pC.get("/queryAll",async($)=>{try{let Y=await wB1(),X=$1();return X.data=Y,$.json(X)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});pC.post("/save",async($)=>{try{let Y=await $.req.json(),X={};q6(X,Y),await PP(X);let G=$1();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});pC.post("/delete",async($)=>{try{let Y=await $.req.json();await IB1(Y.code);let X=$1();return $.json(X)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5220\u9664\u5931\u8D25"})}});pC.post("/deleteAll",async($)=>{try{let Y=await $.req.json();await CB1(Y.path1),await _61(Y.path1);let X=$1();return $.json(X)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var Uk4=pC;var OG0=new _4;OG0.get("/queryAll",async($)=>{try{let{path1:Y}=$.req.query(),X=await aN(Y??""),G=$1();return G.data=X,$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});OG0.post("/save",async($)=>{try{let Y=await $.req.json(),X={};q6(X,Y),await yH(X);let G=$1();return G.data={success:!0},$.json(G)}catch(Y){throw console.error(Y),new v0(500,{message:"\u4FDD\u5B58\u5931\u8D25"})}});OG0.post("/delete",async($)=>{try{let Y=await $.req.json();await w61(Y.id);let X=$1();return $.json(X)}catch(Y){throw console.error(Y),new v0(500,{message:"\u5220\u9664\u5931\u8D25"})}});var Hk4=OG0;var Qn0=new _4;Qn0.get("/queryCurrent12Month",async($)=>{try{let Y=await V71(),X=$1();return X.data=Y,$.json(X)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});Qn0.get("/queryCurrentTop",async($)=>{try{let Y=await F71(),X=$1();return X.data=Y,$.json(X)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});var zk4=Qn0;function AH($,Y){var X={};for(var G in $)if(Object.prototype.hasOwnProperty.call($,G)&&Y.indexOf(G)<0)X[G]=$[G];if($!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var J=0,G=Object.getOwnPropertySymbols($);J<G.length;J++)if(Y.indexOf(G[J])<0&&Object.prototype.propertyIsEnumerable.call($,G[J]))X[G[J]]=$[G[J]]}return X}var Fb9={ZodAny:"any",ZodArray:"array",ZodBigInt:"bigint",ZodBoolean:"boolean",ZodDefault:"default",ZodPrefault:"prefault",ZodTransform:"transform",ZodEnum:"enum",ZodIntersection:"intersection",ZodLazy:"lazy",ZodLiteral:"literal",ZodNever:"never",ZodNull:"null",ZodNullable:"nullable",ZodNumber:"number",ZodNonOptional:"nonoptional",ZodObject:"object",ZodOptional:"optional",ZodPipe:"pipe",ZodReadonly:"readonly",ZodRecord:"record",ZodString:"string",ZodTuple:"tuple",ZodType:"type",ZodUnion:"union",ZodDiscriminatedUnion:"union",ZodUnknown:"unknown",ZodVoid:"void",ZodDate:"date",ZodTemplateLiteral:"template_literal"};function M6($,Y){return(Array.isArray(Y)?Y:[Y]).some((G)=>{var J;let Q=((J=$===null||$===void 0?void 0:$.def)===null||J===void 0?void 0:J.type)===Fb9[G];if(G==="ZodDiscriminatedUnion")return Q&&"discriminator"in $.def;return Q})}function kJ($){return $&&"def"in $}function pd($){return $.safeParse(null).success}function Dk4($){return $.safeParse(void 0).success}class Nk4{constructor(){this._map=new Map,this._idmap=new Map}add($,...Y){let X=Y[0];if(this._map.set($,X),X&&typeof X==="object"&&"id"in X){if(this._idmap.has(X.id))throw Error(`ID ${X.id} already exists in the registry`);this._idmap.set(X.id,$)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove($){let Y=this._map.get($);if(Y&&typeof Y==="object"&&"id"in Y)this._idmap.delete(Y.id);return this._map.delete($),this}get($){let Y=$._zod.parent;if(Y){let X={...this.get(Y)??{}};return delete X.id,{...X,...this._map.get($)}}return this._map.get($)}has($){return this._map.has($)}}function Lb9(){return new Nk4}function EG0($,Y){if($===null||$===void 0||Y===null||Y===void 0)return $===Y;if($===Y||$.valueOf()===Y.valueOf())return!0;if(Array.isArray($)){if(!Array.isArray(Y))return!1;if($.length!==Y.length)return!1}if(!($ instanceof Object)||!(Y instanceof Object))return!1;let X=Object.keys($);return Object.keys(Y).every((G)=>X.indexOf(G)!==-1)&&X.every((G)=>EG0($[G],Y[G]))}class Ak4{constructor(){this.buckets=new Map}put($){let Y=this.hashCodeOf($),X=this.buckets.get(Y);if(!X){this.buckets.set(Y,[$]);return}if(!X.some((J)=>EG0(J,$)))X.push($)}contains($){let Y=this.hashCodeOf($),X=this.buckets.get(Y);if(!X)return!1;return X.some((G)=>EG0(G,$))}values(){return[...this.buckets.values()].flat()}stats(){let $=0,Y=0,X=0;for(let J of this.buckets.values())if($+=1,Y+=J.length,J.length>1)X+=1;let G=$/Y;return{totalBuckets:$,collisions:X,totalValues:Y,hashEffectiveness:G}}hashCodeOf($){let Y=0;if(Array.isArray($)){for(let X=0;X<$.length;X++)Y^=this.hashCodeOf($[X])*X;return Y}if(typeof $==="string"){for(let X=0;X<$.length;X++)Y^=$.charCodeAt(X)*X;return Y}if(typeof $==="number")return $;if(typeof $==="object")for(let[X,G]of Object.entries($))Y^=this.hashCodeOf(X)+this.hashCodeOf(G!==null&&G!==void 0?G:"");return Y}}function cC($){return $===void 0}function cd($,Y){let X={};return Object.entries($).forEach(([G,J])=>{X[G]=Y(J)}),X}function Db9($,Y){let X={};return Object.entries($).forEach(([G,J])=>{if(!Y.some((Q)=>Q===G))X[G]=J}),X}function YR($,Y){let X={};return Object.entries($).forEach(([G,J])=>{if(!Y(J,G))X[G]=J}),X}function Vk4($){return $.filter((Y)=>!cC(Y))}var ld=EG0;function Bk4($){let Y=new Ak4;return $.forEach((X)=>Y.put(X)),[...Y.values()]}function Ok4($){return typeof $==="string"}function Fk4($){return Object.fromEntries(Object.entries($).sort(([Y],[X])=>Y.localeCompare(X)))}var Lk4=Lb9();class Q8{static collectMetadata($,Y){let X=this.getMetadataFromRegistry($),G=Object.assign(Object.assign({},X===null||X===void 0?void 0:X._internal),Y===null||Y===void 0?void 0:Y._internal),J=Object.assign(Object.assign({},X===null||X===void 0?void 0:X.param),Y===null||Y===void 0?void 0:Y.param),Q=Object.assign(Object.assign(Object.assign(Object.assign({},Object.keys(G).length>0?{_internal:G}:{}),X),Y),Object.keys(J).length>0?{param:J}:{});if(M6($,["ZodOptional","ZodNullable","ZodDefault","ZodPrefault","ZodReadonly","ZodNonOptional"])&&kJ($._zod.def.innerType))return this.collectMetadata($._zod.def.innerType,Q);if(M6($,"ZodPipe")){let W=$._zod.def.in,K=$._zod.def.out;if(M6(W,"ZodTransform")&&kJ(K))return this.collectMetadata(K,Q);if(kJ(W))return this.collectMetadata(W,Q)}return Q}static getMetadata($){return this.collectMetadata($)}static getOpenApiMetadata($){let Y=this.collectMetadata($),X=Y!==null&&Y!==void 0?Y:{},{_internal:G}=X;return AH(X,["_internal"])}static getInternalMetadata($){var Y;return(Y=this.collectMetadata($))===null||Y===void 0?void 0:Y._internal}static getParamMetadata($){let Y=this.collectMetadata($);return Object.assign(Object.assign({},Y),{param:Object.assign(Object.assign({},(Y===null||Y===void 0?void 0:Y.description)?{description:Y.description}:{}),Y===null||Y===void 0?void 0:Y.param)})}static buildSchemaMetadata($){return YR(Db9($,["param","_internal"]),cC)}static buildParameterMetadata($){return YR($,cC)}static applySchemaMetadata($,Y){return YR(Object.assign(Object.assign({},$),this.buildSchemaMetadata(Y)),cC)}static getRefId($){var Y;return(Y=this.getInternalMetadata($))===null||Y===void 0?void 0:Y.refId}static unwrapChained($){return this.unwrapUntil($)}static getDefaultValue($){var Y;let X=(Y=this.unwrapUntil($,"ZodDefault"))!==null&&Y!==void 0?Y:this.unwrapUntil($,"ZodPrefault");return X===null||X===void 0?void 0:X._zod.def.defaultValue}static unwrapUntil($,Y){if(Y&&M6($,Y))return $;if(M6($,["ZodOptional","ZodNullable","ZodDefault","ZodPrefault","ZodReadonly","ZodNonOptional"])&&kJ($._zod.def.innerType))return this.unwrapUntil($._zod.def.innerType,Y);if(M6($,"ZodPipe")){let X=$._zod.def.in,G=$._zod.def.out;if(M6(X,"ZodTransform")&&kJ(G))return this.unwrapUntil(G,Y);if(kJ(X))return this.unwrapUntil(X,Y)}return Y?void 0:$}static getMetadataFromInternalRegistry($){return Lk4.get($)}static getMetadataFromRegistry($){let Y=this.getMetadataFromInternalRegistry($),X=$.meta();if(!Y)return X;let{_internal:G}=Y,J=AH(Y,["_internal"]),Q=X!==null&&X!==void 0?X:{},{id:W,title:K}=Q,Z=AH(Q,["id","title"]);return Object.assign(Object.assign(Object.assign({_internal:Object.assign(Object.assign({},W?{refId:W}:{}),G)},J),K?{description:K}:{}),Z)}static setMetadataInRegistry($,Y){Lk4.add($,Y)}}function TV($,Y){let X=$[Y];if(typeof X!=="function")return;$[Y]=function(...G){let J=X.apply(this,G),Q=Q8.getMetadataFromRegistry(this);if(Q)Q8.setMetadataInRegistry(J,Q);return J}}function Ek4($){if(typeof $.ZodType.prototype.openapi<"u")return;$.ZodType.prototype.openapi=function(...Y){let{refId:X,metadata:G,options:J}=Nb9(...Y),Q=G!==null&&G!==void 0?G:{},{param:W}=Q,K=AH(Q,["param"]),Z=Q8.getMetadataFromRegistry(this),H=Z!==null&&Z!==void 0?Z:{},{_internal:z}=H,V=AH(H,["_internal"]),F=Object.assign(Object.assign(Object.assign({},z),J),X?{refId:X}:void 0),L=Object.assign(Object.assign(Object.assign({},V),K),(V===null||V===void 0?void 0:V.param)||W?{param:Object.assign(Object.assign({},V===null||V===void 0?void 0:V.param),W)}:void 0),N=new this.constructor(this._def);function D(B){Q8.setMetadataInRegistry(B,Object.assign(Object.assign({},Object.keys(F).length>0?{_internal:F}:void 0),L))}if(D(N),M6(N,"ZodLazy"))D(this);if(M6(N,"ZodObject")){let B=Q8.getMetadataFromRegistry(N),O=N.extend;N.extend=function(...E){let M=O.apply(N,E),R=B!==null&&B!==void 0?B:{},{_internal:q}=R,_=AH(R,["_internal"]);return Q8.setMetadataInRegistry(M,{_internal:{extendedFrom:(q===null||q===void 0?void 0:q.refId)?{refId:q.refId,schema:N}:q===null||q===void 0?void 0:q.extendedFrom}}),M.openapi(_)},TV(N,"catchall")}TV(N,"optional"),TV(N,"nullable"),TV(N,"default"),TV(N,"transform"),TV(N,"refine"),TV(N,"length"),TV(N,"min"),TV(N,"max");let A=N.meta;return N.meta=function(...B){let O=A.apply(this,B);if(B[0]){let E=Q8.getMetadataFromInternalRegistry(this);if(E)Q8.setMetadataInRegistry(O,Object.assign(Object.assign({},E),B[0]))}return O},N}}function Nb9($,Y,X){if(typeof $==="string")return{refId:$,metadata:Y,options:X};return{refId:void 0,metadata:$,options:Y}}function Wn0($){var Y;return YR((Y=Q8.getOpenApiMetadata($))!==null&&Y!==void 0?Y:{},cC)}class Kn0{constructor($){this.parents=$,this._definitions=[]}get definitions(){var $,Y;return[...(Y=($=this.parents)===null||$===void 0?void 0:$.flatMap((G)=>G._definitions))!==null&&Y!==void 0?Y:[],...this._definitions]}register($,Y){let X=this.schemaWithRefId($,Y);return this._definitions.push({type:"schema",schema:X}),X}registerParameter($,Y){var X,G,J;let Q=this.schemaWithRefId($,Y),W=(X=Q8.getOpenApiMetadata(Q))!==null&&X!==void 0?X:{},K=Q.openapi(Object.assign(Object.assign({},W),{param:Object.assign(Object.assign({},W===null||W===void 0?void 0:W.param),{name:(J=(G=W===null||W===void 0?void 0:W.param)===null||G===void 0?void 0:G.name)!==null&&J!==void 0?J:$})}));return this._definitions.push({type:"parameter",schema:K}),K}registerPath($){this._definitions.push({type:"route",route:$})}registerWebhook($){this._definitions.push({type:"webhook",webhook:$})}registerComponent($,Y,X){return this._definitions.push({type:"component",componentType:$,name:Y,component:X}),{name:Y,ref:{$ref:`#/components/${$}/${Y}`}}}schemaWithRefId($,Y){return Y.openapi($)}}class nd{constructor($){this.message=$}}class dC extends nd{constructor($,Y){super($);this.data=Y}}class id extends nd{constructor($){super(`Missing parameter data, please specify \`${$.missingField}\` and other OpenAPI parameter props using the \`param\` field of \`schema.openapi\``);this.data=$}}function dd($,Y){try{return $()}catch(X){if(X instanceof id)throw new id(Object.assign(Object.assign({},X.data),Y));throw X}}class Mk4 extends nd{constructor($){super("Unknown zod object type, please specify `type` and other OpenAPI props using `schema.openapi`.");this.data=$}}class Rk4{transform($,Y,X){var G,J,Q,W;let K=$.def.element,Z=(J=(G=$.def.checks)===null||G===void 0?void 0:G.find((z)=>z._zod.def.check==="min_length"))===null||J===void 0?void 0:J._zod.def.minimum,H=(W=(Q=$.def.checks)===null||Q===void 0?void 0:Q.find((z)=>z._zod.def.check==="max_length"))===null||W===void 0?void 0:W._zod.def.maximum;return Object.assign(Object.assign({},Y("array")),{items:kJ(K)?X(K):{},minItems:Z,maxItems:H})}}class Zn0{transform($){return Object.assign(Object.assign({},$("string")),{pattern:"^d+$"})}}class qk4{transform($,Y,X,G,J){let Q=[...$.def.options],W=Q.map(G);if(Y)return{oneOf:X(W,Y)};let K=$._zod.def.discriminator;if(!K)return console.error("No discriminator found for discriminated union",$),{oneOf:W};return{oneOf:W,discriminator:this.mapDiscriminator(Q,K,J)}}mapDiscriminator($,Y,X){if($.some((J)=>Q8.getRefId(J)===void 0))return;let G={};return $.forEach((J)=>{var Q;let W=Q8.getRefId(J),K=(Q=J.def.shape)===null||Q===void 0?void 0:Q[Y];if(M6(K,"ZodEnum")){Object.values(K._zod.def.entries).filter(Ok4).forEach((z)=>{G[z]=X(W)});return}let Z=K===null||K===void 0?void 0:K.def.values[0];G[Z]=X(W)}),{propertyName:Y,mapping:G}}}function Pk4($){let X=Object.keys($).filter((Q)=>typeof $[$[Q]]!=="number").map((Q)=>$[Q]),G=X.filter((Q)=>typeof Q==="number").length,J=G===0?"string":G===X.length?"numeric":"mixed";return{values:X,type:J}}class wk4{transform($,Y,X){let{type:G,values:J}=Pk4($._zod.def.entries);if(G==="mixed")throw new nd("Enum has mixed string and number values, please specify the OpenAPI type manually");return Object.assign(Object.assign({},X(G==="numeric"?"integer":"string")),{enum:Y?[...J,null]:J})}}class _k4{transform($,Y,X,G){let Q={allOf:this.flattenIntersectionTypes($).map(G)};if(Y)return{anyOf:X([Q],Y)};return Q}flattenIntersectionTypes($){if(!M6($,"ZodIntersection"))return[$];let Y=kJ($._zod.def.left)?this.flattenIntersectionTypes($._zod.def.left):[],X=kJ($._zod.def.right)?this.flattenIntersectionTypes($._zod.def.right):[];return[...Y,...X]}}class jk4{constructor(){this.bigIntTransformer=new Zn0}transform($,Y){let X=typeof $.def.values[0];if(X==="boolean"||X==="number"||X==="string"||X==="object")return Object.assign(Object.assign({},Y(X)),{enum:[$.def.values[0]]});if(X==="bigint")return this.bigIntTransformer.transform(Y);return Y("null")}}class Tk4{transform($,Y,X){var G;return Object.assign(Object.assign(Object.assign({},Y("number")),Y($.format==="safeint"?"integer":"number")),X((G=$.def.checks)!==null&&G!==void 0?G:[]))}}class Ik4{transform($,Y,X,G){var J;let Q=(J=Q8.getInternalMetadata($))===null||J===void 0?void 0:J.extendedFrom,W=this.requiredKeysOf($),K=cd($.def.shape,G);if(!Q)return Object.assign(Object.assign(Object.assign(Object.assign({},X("object")),{properties:K,default:Y}),W.length>0?{required:W}:{}),this.generateAdditionalProperties($,G));let Z=Q.schema;G(Z);let H=this.requiredKeysOf(Z),z=cd(Z===null||Z===void 0?void 0:Z.def.shape,G),V=Object.fromEntries(Object.entries(K).filter(([N,D])=>{return!ld(z[N],D)})),F=W.filter((N)=>!H.includes(N)),L=Object.assign(Object.assign(Object.assign(Object.assign({},X("object")),{default:Y,properties:V}),F.length>0?{required:F}:{}),this.generateAdditionalProperties($,G));return{allOf:[{$ref:`#/components/schemas/${Q.refId}`},L]}}generateAdditionalProperties($,Y){let X=$.def.catchall;if(!X)return{};if(M6(X,"ZodNever"))return{additionalProperties:!1};if(kJ(X))return{additionalProperties:Y(X)};return{}}requiredKeysOf($){return Object.entries($.def.shape).filter(([Y,X])=>!Dk4(X)).map(([Y,X])=>Y)}}class Ck4{transform($,Y,X){let{valueType:G,keyType:J}=$,Q=kJ(G)?X(G):{};if(M6(J,"ZodEnum")){let K=Object.values(J._zod.def.entries).filter(Ok4).reduce((Z,H)=>Object.assign(Object.assign({},Z),{[H]:Q}),{});return Object.assign(Object.assign({},Y("object")),{properties:K})}return Object.assign(Object.assign({},Y("object")),{additionalProperties:Q})}}function Ab9($){return $._zod.def.check==="length_equals"}function Bb9($){return $._zod.def.check==="string_format"&&$._zod.def.format==="regex"}class Sk4{transform($,Y){var X,G,J,Q;let W=(X=$.def.checks)===null||X===void 0?void 0:X.find(Bb9),K=W===null||W===void 0?void 0:W._zod.def.pattern.toString().replace(/^\/|\/$/g,""),Z=(G=$.def.checks)===null||G===void 0?void 0:G.find(Ab9),H=Z===null||Z===void 0?void 0:Z._zod.def.length,z=Number.isFinite($.minLength)?(J=$.minLength)!==null&&J!==void 0?J:void 0:void 0,V=Number.isFinite($.maxLength)?(Q=$.maxLength)!==null&&Q!==void 0?Q:void 0:void 0;return Object.assign(Object.assign({},Y("string")),{minLength:H!==null&&H!==void 0?H:z,maxLength:H!==null&&H!==void 0?H:V,format:this.mapStringFormat($),pattern:K})}mapStringFormat($){if($.format==="uuid")return"uuid";if($.format==="email")return"email";if($.format==="url")return"uri";if($.format==="date")return"date";if($.format==="datetime")return"date-time";if($.format==="cuid")return"cuid";if($.format==="cuid2")return"cuid2";if($.format==="ulid")return"ulid";if($.format==="ipv4")return"ip";if($.format==="ipv6")return"ip";if($.format==="emoji")return"emoji";return}}class kk4{constructor($){this.versionSpecifics=$}transform($,Y,X){let J=$._zod.def.items.map((Q)=>kJ(Q)?X(Q):{});return Object.assign(Object.assign({},Y("array")),this.versionSpecifics.mapTupleItems(J))}}class vk4{constructor($){this.options=$}transform($,Y,X){var G,J,Q;let W=Q8.getInternalMetadata($),K=(Q=(G=W===null||W===void 0?void 0:W.unionPreferredType)!==null&&G!==void 0?G:(J=this.options)===null||J===void 0?void 0:J.unionPreferredType)!==null&&Q!==void 0?Q:"anyOf",H=this.flattenUnionTypes($).map((z)=>{let V=this.unwrapNullable(z);return X(V)});return{[K]:Y(H)}}flattenUnionTypes($){if(!M6($,"ZodUnion"))return[$];return $.def.options.flatMap((X)=>kJ(X)?this.flattenUnionTypes(X):[])}unwrapNullable($){if(M6($,"ZodNullable")){let Y=$.unwrap();if(kJ(Y))return this.unwrapNullable(Y)}return $}}class xk4{transform($){return Object.assign(Object.assign({},$("string")),{format:"date-time"})}}class MG0{transform($,Y,X,G){let J=Y($._zod.def.getter());return MG0.mapRecursive(J,X,G)}static mapRecursive($,Y,X){if("$ref"in $)return X($);if($.type)return Object.assign(Object.assign({},$),Y($.type));return $}}class yk4{transform($,Y){let G=$.def.parts.map((J)=>this.generatePattern(J)).join("");return Object.assign(Object.assign({},Y("string")),{pattern:`^${G}$`})}generatePattern($){if(typeof $==="string"||typeof $==="number"||typeof $==="boolean"||typeof $==="bigint"||$===null||$===void 0)return this.escapeRegex(String($));if(M6($,"ZodLiteral")){let Y=$.def.values[0];return this.escapeRegex(String(Y))}if(M6($,"ZodNumber"))return"[+-]?\\d+(\\.\\d+)?";if(M6($,"ZodBoolean"))return"(true|false)";if(M6($,"ZodEnum")){let{values:Y}=Pk4($.def.entries);return`(${Y.map((X)=>this.escapeRegex(String(X))).join("|")})`}return".*"}escapeRegex($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}class bk4{constructor($,Y){this.versionSpecifics=$,this.objectTransformer=new Ik4,this.stringTransformer=new Sk4,this.numberTransformer=new Tk4,this.bigIntTransformer=new Zn0,this.dateTransformer=new xk4,this.lazyTransformer=new MG0,this.literalTransformer=new jk4,this.templateLiteralTransformer=new yk4,this.enumTransformer=new wk4,this.arrayTransformer=new Rk4,this.discriminatedUnionTransformer=new qk4,this.intersectionTransformer=new _k4,this.recordTransformer=new Ck4,this.tupleTransformer=new kk4($),this.unionTransformer=new vk4(Y)}transform($,Y,X,G,J){if(M6($,"ZodNull"))return this.versionSpecifics.nullType;if(M6($,"ZodUnknown")||M6($,"ZodAny"))return this.versionSpecifics.mapNullableType(void 0,Y);if(M6($,"ZodObject"))return this.objectTransformer.transform($,J,(W)=>this.versionSpecifics.mapNullableType(W,Y),X);let Q=this.transformSchemaWithoutDefault($,Y,X,G);return Object.assign(Object.assign({},Q),{default:J})}transformSchemaWithoutDefault($,Y,X,G){if(M6($,"ZodUnknown")||M6($,"ZodAny"))return this.versionSpecifics.mapNullableType(void 0,Y);if(M6($,"ZodString"))return this.stringTransformer.transform($,(Q)=>this.versionSpecifics.mapNullableType(Q,Y));if(M6($,"ZodNumber"))return this.numberTransformer.transform($,(Q)=>this.versionSpecifics.mapNullableType(Q,Y),(Q)=>this.versionSpecifics.getNumberChecks(Q));if(M6($,"ZodBigInt"))return this.bigIntTransformer.transform((Q)=>this.versionSpecifics.mapNullableType(Q,Y));if(M6($,"ZodBoolean"))return this.versionSpecifics.mapNullableType("boolean",Y);if(M6($,"ZodLazy"))return this.lazyTransformer.transform($,X,(Q)=>this.versionSpecifics.mapNullableType(Q,Y),(Q)=>this.versionSpecifics.mapNullableOfRef(Q,Y));if(M6($,"ZodLiteral"))return this.literalTransformer.transform($,(Q)=>this.versionSpecifics.mapNullableType(Q,Y));if(M6($,"ZodTemplateLiteral"))return this.templateLiteralTransformer.transform($,(Q)=>this.versionSpecifics.mapNullableType(Q,Y));if(M6($,"ZodEnum"))return this.enumTransformer.transform($,Y,(Q)=>this.versionSpecifics.mapNullableType(Q,Y));if(M6($,"ZodArray"))return this.arrayTransformer.transform($,(Q)=>this.versionSpecifics.mapNullableType(Q,Y),X);if(M6($,"ZodTuple"))return this.tupleTransformer.transform($,(Q)=>this.versionSpecifics.mapNullableType(Q,Y),X);if(M6($,"ZodDiscriminatedUnion"))return this.discriminatedUnionTransformer.transform($,Y,(Q)=>this.versionSpecifics.mapNullableOfArray(Q,Y),X,G);if(M6($,"ZodUnion"))return this.unionTransformer.transform($,(Q)=>this.versionSpecifics.mapNullableOfArray(Q,Y),X);if(M6($,"ZodIntersection"))return this.intersectionTransformer.transform($,Y,(Q)=>this.versionSpecifics.mapNullableOfArray(Q,Y),X);if(M6($,"ZodRecord"))return this.recordTransformer.transform($,(Q)=>this.versionSpecifics.mapNullableType(Q,Y),X);if(M6($,"ZodDate"))return this.dateTransformer.transform((Q)=>this.versionSpecifics.mapNullableType(Q,Y));let J=Q8.getRefId($);throw new Mk4({currentSchema:$.def,schemaName:J})}}class Un0{constructor($,Y,X){this.definitions=$,this.versionSpecifics=Y,this.options=X,this.schemaRefs={},this.paramRefs={},this.pathRefs={},this.rawComponents=[],this.openApiTransformer=new bk4(Y,X),this.sortDefinitions()}generateDocumentData(){return this.definitions.forEach(($)=>this.generateSingle($)),{components:this.buildComponents(),paths:this.pathRefs}}generateComponents(){return this.definitions.forEach(($)=>this.generateSingle($)),{components:this.buildComponents()}}buildComponents(){var $,Y,X,G;let J={};this.rawComponents.forEach(({componentType:H,name:z,component:V})=>{var F;(F=J[H])!==null&&F!==void 0||(J[H]={}),J[H][z]=V});let Q=Object.assign(Object.assign({},($=J.schemas)!==null&&$!==void 0?$:{}),this.filteredSchemaRefs),W=((Y=this.options)===null||Y===void 0?void 0:Y.sortComponents)==="alphabetically"?Fk4(Q):Q,K=Object.assign(Object.assign({},(X=J.parameters)!==null&&X!==void 0?X:{}),this.paramRefs),Z=((G=this.options)===null||G===void 0?void 0:G.sortComponents)==="alphabetically"?Fk4(K):K;return Object.assign(Object.assign({},J),{schemas:W,parameters:Z})}isNotPendingRefEntry($){return $[1]!=="pending"}get filteredSchemaRefs(){let $=Object.entries(this.schemaRefs).filter(this.isNotPendingRefEntry);return Object.fromEntries($)}sortDefinitions(){let $=["schema","parameter","component","route"];this.definitions.sort((Y,X)=>{if(!("type"in Y)){if(!("type"in X))return 0;return-1}if(!("type"in X))return 1;let G=$.findIndex((Q)=>Q===Y.type),J=$.findIndex((Q)=>Q===X.type);return G-J})}generateSingle($){if(!("type"in $)){this.generateSchemaWithRef($);return}switch($.type){case"parameter":this.generateParameterDefinition($.schema);return;case"schema":this.generateSchemaWithRef($.schema);return;case"route":this.generateSingleRoute($.route);return;case"component":this.rawComponents.push($);return}}generateParameterDefinition($){let Y=Q8.getRefId($),X=this.generateParameter($);if(Y)this.paramRefs[Y]=X;return X}getParameterRef($,Y){let X=Q8.getOpenApiMetadata($),G=Q8.getInternalMetadata($),J=X===null||X===void 0?void 0:X.param,Q=(G===null||G===void 0?void 0:G.refId)?this.paramRefs[G.refId]:void 0;if(!(G===null||G===void 0?void 0:G.refId)||!Q)return;if(J&&Q.in!==J.in||(Y===null||Y===void 0?void 0:Y.in)&&Q.in!==Y.in)throw new dC(`Conflicting location for parameter ${Q.name}`,{key:"in",values:Vk4([Q.in,Y===null||Y===void 0?void 0:Y.in,J===null||J===void 0?void 0:J.in])});if(J&&Q.name!==J.name||(Y===null||Y===void 0?void 0:Y.name)&&Q.name!==(Y===null||Y===void 0?void 0:Y.name))throw new dC("Conflicting names for parameter",{key:"name",values:Vk4([Q.name,Y===null||Y===void 0?void 0:Y.name,J===null||J===void 0?void 0:J.name])});return{$ref:`#/components/parameters/${G.refId}`}}generateInlineParameters($,Y){let X=Q8.getOpenApiMetadata($),G=X===null||X===void 0?void 0:X.param,J=this.getParameterRef($,{in:Y});if(J)return[J];if(M6($,"ZodObject")){let Q=$.def.shape;return Object.entries(Q).map(([K,Z])=>{var H;let z=Q8.getOpenApiMetadata(Z),V=this.getParameterRef(Z,{in:Y,name:K});if(V)return V;let F=z===null||z===void 0?void 0:z.param;if((F===null||F===void 0?void 0:F.name)&&F.name!==K)throw new dC("Conflicting names for parameter",{key:"name",values:[K,F.name]});if((F===null||F===void 0?void 0:F.in)&&F.in!==Y)throw new dC(`Conflicting location for parameter ${(H=F.name)!==null&&H!==void 0?H:K}`,{key:"in",values:[Y,F.in]});return this.generateParameter(Z,{name:K,in:Y})})}if((G===null||G===void 0?void 0:G.in)&&G.in!==Y)throw new dC(`Conflicting location for parameter ${G.name}`,{key:"in",values:[Y,G.in]});return[this.generateParameter($,{in:Y})]}generateSimpleParameter($,Y){let X=Q8.getParamMetadata($),G=X===null||X===void 0?void 0:X.param,J=Object.assign(Object.assign({},G),Y),Q=!Dk4($)&&!pd($),W=this.generateSchemaWithRef($);return Object.assign({schema:W,required:Q},Object.keys(J).length>0?Q8.buildParameterMetadata(J):{})}generateParameter($,Y){var X,G;let J=Q8.getOpenApiMetadata($),Q=J===null||J===void 0?void 0:J.param,W=(X=Y===null||Y===void 0?void 0:Y.name)!==null&&X!==void 0?X:Q===null||Q===void 0?void 0:Q.name,K=(G=Y===null||Y===void 0?void 0:Y.in)!==null&&G!==void 0?G:Q===null||Q===void 0?void 0:Q.in;if(!W)throw new id({missingField:"name"});if(!K)throw new id({missingField:"in",paramName:W});let Z=this.generateSimpleParameter($,Y);return Object.assign(Object.assign({},Z),{in:K,name:W})}generateSchemaWithMetadata($){let Y=Q8.unwrapChained($),X=Q8.getOpenApiMetadata($),G=Q8.getDefaultValue($),J=Q8.getRefId($);if(J&&typeof this.schemaRefs[J]==="object")return this.schemaRefs[J];if(J&&this.schemaRefs[J]==="pending"){let W={$ref:this.generateSchemaRef(J)};return this.versionSpecifics.mapNullableOfRef(W,pd($))}if(J&&!this.schemaRefs[J])this.schemaRefs[J]="pending";let Q=(X===null||X===void 0?void 0:X.type)?{type:X.type}:this.toOpenAPISchema(Y,pd($),G);return X?Q8.applySchemaMetadata(Q,X):YR(Q,cC)}constructReferencedOpenAPISchema($){let Y=Q8.getOpenApiMetadata($),X=Q8.unwrapChained($),G=Q8.getDefaultValue($),J=pd($);if(Y===null||Y===void 0?void 0:Y.type)return this.versionSpecifics.mapNullableType(Y.type,J);let Q=Q8.getRefId($);if(Q&&typeof this.schemaRefs[Q]==="object")return MG0.mapRecursive(this.schemaRefs[Q],(W)=>this.versionSpecifics.mapNullableType(W,J),(W)=>this.versionSpecifics.mapNullableOfRef(W,J));if(Q&&this.schemaRefs[Q]==="pending"){let W={$ref:this.generateSchemaRef(Q)};return this.versionSpecifics.mapNullableOfRef(W,J)}if(Q&&!this.schemaRefs[Q])this.schemaRefs[Q]="pending";return this.toOpenAPISchema(X,J,G)}generateSimpleSchema($){let Y=Q8.getOpenApiMetadata($),X=Q8.getRefId($);if(!X||!this.schemaRefs[X])return this.generateSchemaWithMetadata($);let G=this.schemaRefs[X],J={$ref:this.generateSchemaRef(X)};if(this.schemaRefs[X]==="pending")return this.versionSpecifics.mapNullableOfRef(J,pd($));let Q=YR(Q8.buildSchemaMetadata(Y!==null&&Y!==void 0?Y:{}),(Z,H)=>Z===void 0||ld(Z,G[H]));if(Q.type)return{allOf:[J,Q]};let W=YR(this.constructReferencedOpenAPISchema($),(Z,H)=>Z===void 0||ld(Z,G[H])),K=Q8.applySchemaMetadata(W,Q);if(Object.keys(K).length>0)return{allOf:[J,K]};return J}generateSchemaWithRef($){let Y=Q8.getRefId($);if(Y&&!this.schemaRefs[Y])return this.schemaRefs[Y]=this.generateSimpleSchema($),{$ref:this.generateSchemaRef(Y)};return this.generateSimpleSchema($)}generateSchemaRef($){return`#/components/schemas/${$}`}getRequestBody($){if(!$)return;let{content:Y}=$,X=AH($,["content"]),G=this.getBodyContent(Y);return Object.assign(Object.assign({},X),{content:G})}getParameters($){if(!$)return[];let{headers:Y}=$,X=this.cleanParameter($.query),G=this.cleanParameter($.params),J=this.cleanParameter($.cookies),Q=dd(()=>X?this.generateInlineParameters(X,"query"):[],{location:"query"}),W=dd(()=>G?this.generateInlineParameters(G,"path"):[],{location:"path"}),K=dd(()=>J?this.generateInlineParameters(J,"cookie"):[],{location:"cookie"}),Z=dd(()=>{if(Array.isArray(Y))return Y.flatMap((z)=>this.generateInlineParameters(z,"header"));let H=this.cleanParameter(Y);return H?this.generateInlineParameters(H,"header"):[]},{location:"header"});return[...W,...Q,...Z,...K]}cleanParameter($){if(!$)return;if(M6($,"ZodPipe")){let Y=$._zod.def.in,X=$._zod.def.out;if(M6(Y,"ZodObject"))return this.cleanParameter(Y);if(M6(X,"ZodObject"))return this.cleanParameter(X);return}return $}generatePath($){let{method:Y,path:X,request:G,responses:J}=$,Q=AH($,["method","path","request","responses"]),W=cd(J,(z)=>{return this.getResponse(z)}),K=dd(()=>this.getParameters(G),{route:`${Y} ${X}`}),Z=this.getRequestBody(G===null||G===void 0?void 0:G.body);return{[Y]:Object.assign(Object.assign(Object.assign(Object.assign({},Q),K.length>0?{parameters:[...Q.parameters||[],...K]}:{}),Z?{requestBody:Z}:{}),{responses:W})}}generateSingleRoute($){let Y=this.generatePath($);return this.pathRefs[$.path]=Object.assign(Object.assign({},this.pathRefs[$.path]),Y),Y}getResponse($){if(this.isReferenceObject($))return $;let{content:Y,headers:X}=$,G=AH($,["content","headers"]),J=Y?{content:this.getBodyContent(Y)}:{};if(!X)return Object.assign(Object.assign({},G),J);let Q=M6(X,"ZodObject")?this.getResponseHeaders(X):X;return Object.assign(Object.assign(Object.assign({},G),{headers:Q}),J)}isReferenceObject($){return"$ref"in $}getResponseHeaders($){let Y=$.def.shape;return cd(Y,(G)=>this.generateSimpleParameter(G))}getBodyContent($){return cd($,(Y)=>{if(!Y||!kJ(Y.schema))return Y;let{schema:X}=Y,G=AH(Y,["schema"]),J=this.generateSchemaWithRef(X);return Object.assign({schema:J},G)})}toOpenAPISchema($,Y,X){return this.openApiTransformer.transform($,Y,(J)=>this.generateSchemaWithRef(J),(J)=>this.generateSchemaRef(J),X)}}class hk4{get nullType(){return{nullable:!0}}mapNullableOfArray($,Y){if(Y&&!$.some((X)=>ld(X,this.nullType)))return[...$,this.nullType];return $}mapNullableType($,Y){return Object.assign(Object.assign({},$?{type:$}:void 0),Y?this.nullType:void 0)}mapNullableOfRef($,Y){if(Y)return{allOf:[$,this.nullType]};return $}mapTupleItems($){let Y=Bk4($);return{items:Y.length===1?Y[0]:{anyOf:Y},minItems:$.length,maxItems:$.length}}getNumberChecks($){return Object.assign({},...$.map((Y)=>{switch(Y._zod.def.check){case"greater_than":{let X=Y;return X._zod.def.inclusive?{minimum:Number(X._zod.def.value)}:{minimum:Number(X._zod.def.value),exclusiveMinimum:!0}}case"less_than":{let X=Y;return X._zod.def.inclusive?{maximum:Number(X._zod.def.value)}:{maximum:Number(X._zod.def.value),exclusiveMaximum:!X._zod.def.inclusive}}default:return{}}}))}}class Hn0{constructor($,Y){let X=new hk4;this.generator=new Un0($,X,Y)}generateDocument($){let Y=this.generator.generateDocumentData();return Object.assign(Object.assign({},$),Y)}generateComponents(){return this.generator.generateComponents()}}class fk4{get nullType(){return{type:"null"}}mapNullableOfArray($,Y){if(Y&&!$.some((X)=>ld(X,this.nullType)))return[...$,this.nullType];return $}mapNullableType($,Y){if(!$)return{};if(Y){let X=Array.isArray($)?$:[$];return{type:Bk4([...X,"null"])}}return{type:$}}mapNullableOfRef($,Y){if(Y)return{oneOf:[$,this.nullType]};return $}mapTupleItems($){return{prefixItems:$}}getNumberChecks($){return Object.assign({},...$.map((Y)=>{switch(Y._zod.def.check){case"greater_than":{let X=Y;return X._zod.def.inclusive?{minimum:Number(X._zod.def.value)}:{exclusiveMinimum:Number(X._zod.def.value)}}case"less_than":{let X=Y;return X._zod.def.inclusive?{maximum:Number(X._zod.def.value)}:{exclusiveMaximum:Number(X._zod.def.value)}}default:return{}}}))}}function Ob9($){return"type"in $&&$.type==="webhook"}class zn0{constructor($,Y){this.definitions=$,this.webhookRefs={};let X=new fk4;this.generator=new Un0(this.definitions,X,Y)}generateDocument($){let Y=this.generator.generateDocumentData();return this.definitions.filter(Ob9).forEach((X)=>this.generateSingleWebhook(X.webhook)),Object.assign(Object.assign(Object.assign({},$),Y),{webhooks:this.webhookRefs})}generateComponents(){return this.generator.generateComponents()}generateSingleWebhook($){let Y=this.generator.generatePath($);return this.webhookRefs[$.path]=Object.assign(Object.assign({},this.webhookRefs[$.path]),Y),Y}}var Eb9=/^[\w!#$%&'*.^`|~+-]+$/,Mb9=/^[ !#-:<-[\]-~]*$/,gk4=($)=>{let Y=0,X=$.length;while(Y<X){let G=$.charCodeAt(Y);if(G!==32&&G!==9)break;Y++}while(X>Y){let G=$.charCodeAt(X-1);if(G!==32&&G!==9)break;X--}return Y===0&&X===$.length?$:$.slice(Y,X)},Vn0=($,Y)=>{if(Y&&$.indexOf(Y)===-1)return{};let X=$.split(";"),G={};for(let J of X){let Q=J.indexOf("=");if(Q===-1)continue;let W=gk4(J.substring(0,Q));if(Y&&Y!==W||!Eb9.test(W))continue;let K=gk4(J.substring(Q+1));if(K.startsWith('"')&&K.endsWith('"'))K=K.slice(1,-1);if(Mb9.test(K)){if(G[W]=K.indexOf("%")!==-1?UR(K,tC):K,Y)break}}return G};var mk4=($,Y,X)=>{let G=$.req.raw.headers.get("Cookie");if(typeof Y==="string"){if(!G)return;let Q=Y;if(X==="secure")Q="__Secure-"+Y;else if(X==="host")Q="__Host-"+Y;return Vn0(G,Q)[Q]}if(!G)return{};return Vn0(G)};var Rb9=/^application\/([a-z-\.]+\+)?json(;\s*[a-zA-Z0-9\-]+\=([^;]+))*$/,qb9=/^multipart\/form-data(;\s?boundary=[a-zA-Z0-9'"()+_,\-./:=?]+)?$/,Pb9=/^application\/x-www-form-urlencoded(;\s*[a-zA-Z0-9\-]+\=([^;]+))*$/,Fn0=($,Y)=>{return async(X,G)=>{let J={},Q=X.req.header("Content-Type");switch($){case"json":if(!Q||!Rb9.test(Q))break;try{J=await X.req.json()}catch{throw new v0(400,{message:"Malformed JSON in request body"})}break;case"form":{if(!Q||!(qb9.test(Q)||Pb9.test(Q)))break;let K;if(X.req.bodyCache.formData)K=await X.req.bodyCache.formData;else try{let H=await X.req.arrayBuffer();K=await CZ4(H,Q),X.req.bodyCache.formData=K}catch(H){let z="Malformed FormData request.";throw z+=H instanceof Error?` ${H.message}`:` ${String(H)}`,new v0(400,{message:z})}let Z=Object.create(null);K.forEach((H,z)=>{if(z.endsWith("[]"))(Z[z]??=[]).push(H);else if(Array.isArray(Z[z]))Z[z].push(H);else if(Object.hasOwn(Z,z))Z[z]=[Z[z],H];else Z[z]=H}),J=Z;break}case"query":J=Object.fromEntries(Object.entries(X.req.queries()).map(([K,Z])=>{return Z.length===1?[K,Z[0]]:[K,Z]}));break;case"param":J=X.req.param();break;case"header":J=X.req.header();break;case"cookie":J=mk4(X);break}let W=await Y(J,X);if(W instanceof Response)return W;return X.req.addValidatedData($,W),await G()}};function wb9($,Y,X,G){return Fn0($,async(J,Q)=>{let W=J;if($==="header"&&"_def"in Y||$==="header"&&"_zod"in Y){let Z=Object.keys("in"in Y?Y.in.shape:Y.shape),H=Object.fromEntries(Z.map((z)=>[z.toLowerCase(),z]));W=Object.fromEntries(Object.entries(J).map(([z,V])=>[H[z]||z,V]))}let K=G&&G.validationFunction?await G.validationFunction(Y,W):await Y.safeParseAsync(W);if(X){let Z=await X({data:W,...K,target:$},Q);if(Z){if(Z instanceof Response)return Z;if("response"in Z)return Z.response}}if(!K.success)return Q.json(K,400);return K.data})}var XR=wb9;ZY();function _b9($){return typeof $==="object"&&$!==null}function jb9($){if(!$)return!1;if(!_b9($))return!1;return typeof $.parse==="function"&&typeof $.safeParse==="function"&&typeof $.parseAsync==="function"&&typeof $.safeParseAsync==="function"}var ck4=class $ extends _4{openAPIRegistry;defaultHook;constructor(Y){super(Y);this.openAPIRegistry=new Kn0,this.defaultHook=Y===null||Y===void 0?void 0:Y.defaultHook}openapi=({middleware:Y,hide:X,...G},J,Q=this.defaultHook)=>{var W,K,Z,H,z;if(!X)this.openAPIRegistry.registerPath(G);let V=[];if((W=G.request)===null||W===void 0?void 0:W.query){let A=XR("query",G.request.query,Q);V.push(A)}if((K=G.request)===null||K===void 0?void 0:K.params){let A=XR("param",G.request.params,Q);V.push(A)}if((Z=G.request)===null||Z===void 0?void 0:Z.headers){let A=XR("header",G.request.headers,Q);V.push(A)}if((H=G.request)===null||H===void 0?void 0:H.cookies){let A=XR("cookie",G.request.cookies,Q);V.push(A)}let F=(z=G.request)===null||z===void 0||(z=z.body)===null||z===void 0?void 0:z.content;if(F)for(let A of Object.keys(F)){if(!F[A])continue;let B=F[A].schema;if(!jb9(B))continue;if(pk4(A)){var L;let O=XR("json",B,Q);if((L=G.request)===null||L===void 0||(L=L.body)===null||L===void 0?void 0:L.required)V.push(O);else{let E=async(M,R)=>{if(M.req.header("content-type")){if(pk4(M.req.header("content-type")))return await O(M,R)}M.req.addValidatedData("json",{}),await R()};V.push(E)}}if(dk4(A)){var N;let O=XR("form",B,Q);if((N=G.request)===null||N===void 0||(N=N.body)===null||N===void 0?void 0:N.required)V.push(O);else{let E=async(M,R)=>{if(M.req.header("content-type")){if(dk4(M.req.header("content-type")))return await O(M,R)}M.req.addValidatedData("form",{}),await R()};V.push(E)}}}let D=Y?Array.isArray(Y)?Y:[Y]:[];return this.on([G.method],[G.path.replaceAll(/\/{(.+?)}/g,"/:$1")],...D,...V,J),this};openapiRoutes=(Y)=>{return Y.filter(({addRoute:X})=>X!==!1).forEach(({route:X,handler:G,hook:J})=>{this.openapi(X,G,J)}),this};getOpenAPIDocument=(Y,X)=>{let G=new Hn0(this.openAPIRegistry.definitions,X).generateDocument(Y);return this._basePath?uk4(G,this._basePath):G};getOpenAPI31Document=(Y,X)=>{let G=new zn0(this.openAPIRegistry.definitions,X).generateDocument(Y);return this._basePath?uk4(G,this._basePath):G};doc=(Y,X,G)=>{return this.get(Y,(J)=>{let Q=typeof X==="function"?X(J):X,W=typeof G==="function"?G(J):G;try{let K=this.getOpenAPIDocument(Q,W);return J.json(K)}catch(K){return J.json(K,500)}})};doc31=(Y,X,G)=>{return this.get(Y,(J)=>{let Q=typeof X==="function"?X(J):X,W=typeof G==="function"?G(J):G;try{let K=this.getOpenAPI31Document(Q,W);return J.json(K)}catch(K){return J.json(K,500)}})};route(Y,X){let G=Y.replaceAll(/:([^\/]+)/g,"{$1}");if(super.route(Y,X),!(X instanceof $))return this;return X.openAPIRegistry.definitions.forEach((J)=>{switch(J.type){case"component":return this.openAPIRegistry.registerComponent(J.componentType,J.name,J.component);case"route":this.openAPIRegistry.registerPath({...J.route,path:OK(G,X._basePath.replaceAll(/:([^\/]+)/g,"{$1}"),J.route.path)});return;case"webhook":this.openAPIRegistry.registerWebhook({...J.webhook,path:OK(G,X._basePath.replaceAll(/:([^\/]+)/g,"{$1}"),J.webhook.path)});return;case"schema":var Q;return this.openAPIRegistry.register((Q=Wn0(J.schema)._internal)===null||Q===void 0?void 0:Q.refId,J.schema);case"parameter":var W;return this.openAPIRegistry.registerParameter((W=Wn0(J.schema)._internal)===null||W===void 0?void 0:W.refId,J.schema);default:throw Error(`Unknown registry type: ${J}`)}}),this}basePath(Y){return new $({...super.basePath(Y),defaultHook:this.defaultHook})}},Ln0=($)=>{let Y={...$,getRoutingPath(){return $.path.replaceAll(/\/{(.+?)}/g,"/:$1")}};return Object.defineProperty(Y,"getRoutingPath",{enumerable:!1})};Ek4(U);function uk4($,Y){let X={};return Object.keys($.paths).forEach((G)=>{X[OK(Y.replaceAll(/:([^\/]+)/g,"{$1}"),G)]=$.paths[G]}),{...$,paths:X}}function pk4($){return/^application\/([a-z-\.]+\+)?json/.test($)}function dk4($){return $.startsWith("multipart/form-data")||$.startsWith("application/x-www-form-urlencoded")}import Tb9 from"os";function lk4($,Y,X){let J=($.servers?.[0]?.url||"").replace(/\/$/,""),Q="# "+$.info.title+`

> `+($.info.description||"")+`

**Version:** `+$.info.version+`

**Base URL:** `+J+`

**appId:** `+Y+`

**appSecret:** `+X+`

---
`;for(let[W,K]of Object.entries($.paths))for(let[Z,H]of Object.entries(K)){if(Z==="parameters")continue;let z=H;if(Q+="## "+Z.toUpperCase()+" "+W+`

`,Q+="**URL:** `"+J+W+`\`

`,z.summary)Q+="**Description:** "+z.summary+`

`;let V=z.parameters||[];if(V.length>0){Q+=`### Example Parameters

`,Q+=`| Name | In | Required | Example |
`,Q+=`|------|-----|----------|-------|
`;for(let L of V){let N=L.name||"",D=L.schema?.example||"";Q+="| `"+N+"` | "+L.in+" | "+(L.required?"Yes":"No")+" | `"+D+"` |\n"}Q+=`
`}let F=z.requestBody?.content?.["application/json"]?.example||z.requestBody?.content?.body?.schema?.example;if(F)Q+="### Example Request Body\n\n```json\n"+JSON.stringify(F,null,2)+"\n```\n\n";for(let[L,N]of Object.entries(z.responses||{})){let D=N.content?.["application/json"]?.schema?.example||N.content?.["application/json"]?.example;if(D)Q+="### Example Response "+L+`

`,Q+=(N.description||"")+`

`,Q+="```json\n"+JSON.stringify(D,null,2)+"\n```\n\n"}Q+=`---

`}return Q}var BH=new ck4,nk4="",rk4="";function Ib9(){let $=Tb9.networkInterfaces();for(let Y of Object.keys($))for(let X of $[Y])if(X.family==="IPv4"&&!X.internal)return X.address;return"No External IP found"}var ik4=Ib9();BH.openAPIRegistry.registerComponent("securitySchemes","Bearer",{type:"http",scheme:"bearer",bearerFormat:"JWT"});async function Cb9($,Y,X){let G=Ln0({method:"get",path:"/getAccessToken",security:[{Bearer:[]}],request:{query:U.object({appId:U.string().openapi({param:{name:"appId",in:"query"},example:"CInM3"}),appSecret:U.string().openapi({param:{name:"appSecret",in:"query"},example:"Itvm4lA0S2"})})},responses:{200:{content:{"application/json":{schema:U.object().openapi({example:{data:{success:!0,msg:"",token:"eyJhbGciOiJSUzI1NiJ9.eyJ0YmNsb3VkLm1lOmNsYWltIjp0cnVlLCJpYXQiOjE3NzYwNDY2OTgsImlzcyI6InRiY2xvdWQubWU6aXNzdWVyIiwiYXVkIjoidGJjbG91ZC5tZTphdWRpZW5jZSIsImV4cCI6MTc3NjIxOTQ5OCwic3ViIjoiMjAyNi0wNC0xNSJ9.FWFLMzRxvyqJBWiajGR8yylDREfhFrgNIr18zcb27pGK0cXi76GGMeAN6u40tJSCM0LWV6aP7GAjeNWPjCLMsUm5wV_W52_PKdacRbltE5fCsujHtMqcUDD-75IU1RLhLk-5edBtxnZ_593B7GiCz9664MSnrhUNKUrz_SFMJQ_At6SC2a-dLyAly66Nj-asHuaAv8R-KWI-h9xRz4OVNcZrWXosDfTMzUvhD3aQqfaJdYJg82vOEalHvb_uGW-vVGQAbU73Lvcs7_ItiqEMyKtaQx251a7K-qxii6s6Sb3OCzDTCEkhPzq8YZBnyIbfaVDM6NLD4DDGc6x02Thc6g"},requestId:"eofw3k0qnolj5ewozfc0fzhh",timestamp:"2026-4-13 10:18:18",code:"0000"}})}},description:"Retrieve the token"}}});BH.openapi(G,(W)=>{return W.json({},200)}),nk4=(await GB(X))[0]?.name??"";let Q=await aN(X);if(Q&&a8(Q))Q.forEach((W)=>{if(W.parames&&W.resp&&W.parames.length>0&&W.resp.length>0){let K=Ln0({method:"post",path:`/api/proxy/${W.path1}/${W.path2}`,security:[{Bearer:[]}],request:{headers:U.object({authorization:U.string().openapi({example:"Bearer token"}),"content-type":U.string().openapi({example:"application/json"})}),body:{content:{body:{schema:U.object().openapi({example:JSON.parse(W.parames)})}},required:!0}},responses:{200:{content:{"application/json":{schema:U.object().openapi({example:JSON.parse(W.resp)})}},description:W.name}}});BH.openapi(K,(Z)=>{return Z.json({},200)})}});BH.basePath($)}BH.post("/generate",async($)=>{let{base:Y,port:X,path1:G}=await $.req.json();rk4=Y,await Cb9(Y,X,G);let J=$1();return J.data={success:!0},$.json(J)});BH.doc31("/doc",()=>{return{openapi:"3.1.0",info:{title:"api doc",version:"1.0.0",description:nk4},servers:[{url:rk4,description:"\u6D4B\u8BD5\u73AF\u5883"}],components:{securitySchemes:{Bearer:{type:"http",scheme:"bearer",bearerFormat:"JWT"}}},security:[{Bearer:[]}]}});BH.post("/downloadOpenAPI31-demo",async($)=>{try{let{base:Y,port:X,path1:G,toSelectAppId:J}=await $.req.json(),Q=J.split("-")[0],W=J.split("-")[1];await gE(`http://${ik4}:${Bun.env.PORT||3000}/api/openapi/generate`,"POST","",{base:Y,port:X,path1:G});let K=await gE(`http://${ik4}:${Bun.env.PORT||3000}/api/openapi/doc`,"GET"),Z=lk4(K,Q,W);return $.newResponse(Z,200,{"Content-Type":"text/plain; charset=utf-8","Content-Disposition":'attachment; filename="example.md"',"Content-Length":Z.length.toString()})}catch(Y){throw console.error(Y),new v0(500,{message:"\u5BFC\u51FA\u5931\u8D25"})}});BH.post("/exportMarkDown",async($)=>{try{let{base:Y,port:X,path1:G,toSelectAppId:J}=await $.req.json(),Q=J.split("-")[0],W=J.split("-")[1],K=await GB(G),Z=await aN(G),H="# "+"\u63A5\u53E3\u6587\u6863"+`

> `+(K[0]?.name||"")+`

**Version:** 1.0.0

**Base URL:** `+Y+`

**appId:** `+Q+`

**appSecret:** `+W+`

---
`;if(H+=`## GET /getAccessToken

`,H+="**URL:** `"+Y+`/getAccessToken\`

`,H+="\u83B7\u53D6token\u63A5\u53E3"+`

`,H+=`### Example Parameters

`,H+=`| Name | In | Required | Example |
`,H+=`|------|-----|----------|-------|
`,H+="| `appId` | query | Yes | `"+Q+"` |\n",H+="| `appSecret` | query | Yes | `"+W+"` |\n",H+=`
`,H+=`### Example Response 

`,H+="```json\n"+JSON.stringify({data:{success:!0,msg:"",token:"eyJhbGciOiJSUzI1NiJ9.eyJ0YmNsb3VkLm1lOmNsYWltIjp0cnVlLCJpYXQiOjE3NzYwNDY2OTgsImlzcyI6InRiY2xvdWQubWU6aXNzdWVyIiwiYXVkIjoidGJjbG91ZC5tZTphdWRpZW5jZSIsImV4cCI6MTc3NjIxOTQ5OCwic3ViIjoiMjAyNi0wNC0xNSJ9.FWFLMzRxvyqJBWiajGR8yylDREfhFrgNIr18zcb27pGK0cXi76GGMeAN6u40tJSCM0LWV6aP7GAjeNWPjCLMsUm5wV_W52_PKdacRbltE5fCsujHtMqcUDD-75IU1RLhLk-5edBtxnZ_593B7GiCz9664MSnrhUNKUrz_SFMJQ_At6SC2a-dLyAly66Nj-asHuaAv8R-KWI-h9xRz4OVNcZrWXosDfTMzUvhD3aQqfaJdYJg82vOEalHvb_uGW-vVGQAbU73Lvcs7_ItiqEMyKtaQx251a7K-qxii6s6Sb3OCzDTCEkhPzq8YZBnyIbfaVDM6NLD4DDGc6x02Thc6g"},requestId:"eofw3k0qnolj5ewozfc0fzhh",timestamp:"2026-4-13 10:18:18",code:"0000"},null,2)+"\n```\n\n",H+=`---

`,Z&&a8(Z))Z.forEach((z)=>{if(z.parames&&z.resp&&z.parames.length>0&&z.resp.length>0)H+=`## POST /api/proxy/${z.path1}/${z.path2}

`,H+="**URL:** `"+Y+`/api/proxy/${z.path1}/${z.path2}\`

`,H+=z.name+`

`,H+=`### Example Parameters

`,H+=`| Name | In | Required | Example |
`,H+=`|------|-----|----------|-------|
`,H+="| `authorization` | header | Yes | `Bearer token` |\n",H+="| `content-type` | header | Yes | `application/json` |\n",H+=`
`,H+="### Example Request Body\n\n```json\n"+JSON.stringify(JSON.parse(z.parames),null,2)+"\n```\n\n",H+=`### Example Response 

`,H+="```json\n"+JSON.stringify(JSON.parse(z.resp),null,2)+"\n```\n\n",H+=`---

`});return $.newResponse(H,200,{"Content-Type":"text/plain; charset=utf-8","Content-Disposition":'attachment; filename="example.md"',"Content-Length":H.length.toString()})}catch(Y){throw console.error(Y),new v0(500,{message:"\u5BFC\u51FA\u5931\u8D25"})}});BH.post("/exportSqliteMarkDown",async($)=>{try{let{name:Y,poolCode:X,base:G,path:J,toSelectAppId:Q}=await $.req.json(),W=Q.split("-")[0],K=Q.split("-")[1],Z="# "+"\u63A5\u53E3\u6587\u6863"+`

> `+(Y||"")+`

**Version:** 1.0.0

**Base URL:** `+G+`

**appId:** `+W+`

**appSecret:** `+K+`

---
`;Z+=`## GET /getAccessToken

`,Z+="**URL:** `"+G+`/getAccessToken\`

`,Z+="\u83B7\u53D6token\u63A5\u53E3"+`

`,Z+=`### Example Parameters

`,Z+=`| Name | In | Required | Example |
`,Z+=`|------|-----|----------|-------|
`,Z+="| `appId` | query | Yes | `"+W+"` |\n",Z+="| `appSecret` | query | Yes | `"+K+"` |\n",Z+=`
`,Z+=`### Example Response 

`,Z+="```json\n"+JSON.stringify({data:{success:!0,msg:"",token:"eyJhbGciOiJSUzI1NiJ9.eyJ0YmNsb3VkLm1lOmNsYWltIjp0cnVlLCJpYXQiOjE3NzYwNDY2OTgsImlzcyI6InRiY2xvdWQubWU6aXNzdWVyIiwiYXVkIjoidGJjbG91ZC5tZTphdWRpZW5jZSIsImV4cCI6MTc3NjIxOTQ5OCwic3ViIjoiMjAyNi0wNC0xNSJ9.FWFLMzRxvyqJBWiajGR8yylDREfhFrgNIr18zcb27pGK0cXi76GGMeAN6u40tJSCM0LWV6aP7GAjeNWPjCLMsUm5wV_W52_PKdacRbltE5fCsujHtMqcUDD-75IU1RLhLk-5edBtxnZ_593B7GiCz9664MSnrhUNKUrz_SFMJQ_At6SC2a-dLyAly66Nj-asHuaAv8R-KWI-h9xRz4OVNcZrWXosDfTMzUvhD3aQqfaJdYJg82vOEalHvb_uGW-vVGQAbU73Lvcs7_ItiqEMyKtaQx251a7K-qxii6s6Sb3OCzDTCEkhPzq8YZBnyIbfaVDM6NLD4DDGc6x02Thc6g"},requestId:"eofw3k0qnolj5ewozfc0fzhh",timestamp:"2026-4-13 10:18:18",code:"0000"},null,2)+"\n```\n\n";let H=`
          SELECT
            name AS table_name 
          FROM
            sqlite_master 
          WHERE
            type = 'table'`,z=await WX(X),V=z.all(r.raw(H)),F=[];V.forEach((N)=>{let D=`PRAGMA table_info(${N.table_name})`;z.all(r.raw(D)).forEach((B)=>{F.push({table_name:N.table_name,column_name:B.name,data_type:B.type})})});let L=Sb9({tables:V,columns:F});return Z+=`# DATABASE SCHEMA
`,Z+=L,Z+=`---
`,Z+=`# Database API Reference
`,Z+=`PostgREST-style database operations via REST API
`,Z+=`## Overview
`,Z+=`The Database API provides CRUD operations for your database tables. All requests require authentication headers.
`,Z+=`## Headers
`,Z+=`Authorization: Bearer your-token
`,Z+=`Content-Type: application/json
`,Z+=`## Query Records
`,Z+=`Retrieve records from a table with filtering, sorting, and pagination.
`,Z+="```\n",Z+=`GET ${G}${J}{table}
`,Z+="```\n",Z+=`### Query Parameters
`,Z+=`| Parameter | Type    | Description                                      |
`,Z+=`| --------- | ------- | ------------------------------------------------ |
`,Z+="| `pageNum` | integer | current page index for pagination (default: 1)   |\n",Z+="| `pageSize`| integer | Records return count for pagination (default: 10)|\n",Z+="| `order`   | string  | Sort order (e.g., `createdAt.desc`, `name.asc`)  |\n",Z+="| `{field}` | string  | filter (e.g., `status=eq.active`)                |\n",Z+=`### Filter Operators
`,Z+=`| Operator | Description                      | Example                      |
`,Z+=`| -------- | -------------------------------- | ---------------------------- |
`,Z+="| `eq`     | Equal                            | `status=eq.active`           |\n",Z+="| `neq`    | Not equal                        | `status=neq.deleted`         |\n",Z+="| `gt`     | Greater than                     | `age=gt.18`                  |\n",Z+="| `gte`    | Greater than or equal            | `price=gte.100`              |\n",Z+="| `lt`     | Less than                        | `quantity=lt.10`             |\n",Z+="| `lte`    | Less than or equal               | `score=lte.50`               |\n",Z+="| `like`   | Pattern match (case-sensitive)   | `name=like.*john*`           |\n",Z+="| `in`     | In list                          | `status=in.(active,pending)` |\n",Z+="| `is`     | Is null/true/false               | `deleted_at=is.null`         |\n",Z+=`### Example for request
`,Z+="```\n",Z+=`${G}${J}employee?pageNum=1&pageSize=10&order=create_time.asc&age=eq.18
`,Z+="```\n",Z+=`### Example for response body
`,Z+="```json\n",Z+=JSON.stringify({data:{records:[{id:"kbnpry2ro4tjnezy4mtrctai",create_time:"2026-07-14 16:11:35",update_time:"2026-07-15 11:38:24",name:"liujn11",age:18,salary:231231,birth:"2026-10"}],total:1},requestId:"ao2435qkybvynlecoctzt44s",timestamp:"2026-7-25 9:21:22",code:"0000"})+`
`,Z+="```\n",Z+=`## Create Records
`,Z+=`Create one or more records in a table.
`,Z+="```\n",Z+=`POST ${G}${J}{table}
`,Z+="```\n",Z+=`### Example for request body
`,Z+="```json\n",Z+=JSON.stringify([{name:"liu11",age:22,salary:231231,birth:"2026-10"},{name:"liu33",age:22,salary:231231,birth:"2026-10"}])+`
`,Z+="```\n",Z+=`### Example for response body
`,Z+="```json\n",Z+=JSON.stringify({data:null,requestId:"bcqe8puqn0qr6k0ub5br7ntb",timestamp:"2026-7-25 9:29:37",code:"0000"})+`
`,Z+="```\n",Z+=`## Update Records
`,Z+=`Update records by id.
`,Z+="```\n",Z+=`PATCH ${G}${J}{table}
`,Z+="```\n",Z+=`### Example for request body
`,Z+="```json\n",Z+=JSON.stringify([{id:"u5lzilt2bzwezlzyln80cfk0",name:"liu11",age:33,salary:231231,birth:"2026-10"}])+`
`,Z+="```\n",Z+=`### Example for response body
`,Z+="```json\n",Z+=JSON.stringify({data:null,requestId:"dt02idnchf51rrv4d079190k",timestamp:"2026-7-25 9:33:6",code:"0000"})+`
`,Z+="```\n",Z+=`## Delete Records
`,Z+=`Delete records by id.
`,Z+="```\n",Z+=`DELETE ${G}${J}{table}?id={id}
`,Z+="```\n",Z+=`### Example for request
`,Z+="```\n",Z+=`http://172.17.6.35:3000/api/sqlite/test/employee?id=u5lzilt2bzwezlzyln80cfk0
`,Z+="```\n",Z+=`### Example for response body
`,Z+="```json\n",Z+=JSON.stringify({data:null,requestId:"dt02idnchf51rrv4d079190k",timestamp:"2026-7-25 9:33:6",code:"0000"})+`
`,Z+="```\n",$.newResponse(Z,200,{"Content-Type":"text/plain; charset=utf-8","Content-Disposition":'attachment; filename="example.md"',"Content-Length":Z.length.toString()})}catch(Y){throw console.error(Y),new v0(500,{message:"\u5BFC\u51FA\u5931\u8D25"})}});function Sb9($){let Y="",X=new Map;return $.columns.forEach((G)=>{let J=`${G.table_name}`;if(!X.has(J))X.set(J,[]);X.get(J)?.push(G)}),$.tables.forEach((G)=>{let J=`${G.table_name}`,Q=X.get(J)||[];Y+=`Table: ${G.table_name}
`,Y+=`Columns:
`,Q.forEach((W)=>{Y+=`  - ${W.column_name}: ${W.data_type}`,Y+=`
`}),Y+=`
`}),Y}var ak4=BH;function sk4($){return[...new Set($)]}function rd($,Y){return sk4($.concat(Y))}var ok4=new _4;ok4.get("/queryAllSource",async($)=>{try{let Y=await PX1({limit:1000,offset:0}),X=await Aa({limit:1000,offset:0}),G=await ws({limit:1000,offset:0}),J=await sr({limit:1000,offset:0}),Q=rd(rd(rd(Y,X),G),J),W=$1();return W.data=Q,$.json(W)}catch(Y){throw console.error(Y),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}});var tk4=ok4;import fb9 from"os";var kb9=new ek4.default({length:10}),Z4=new _4;Z4.onError(($,Y)=>{let X=$1();return X.data=$.message,Y.json(X)});Z4.use(wr0());Z4.use("/api/execution/*",async($,Y)=>{let X=kb9.randomUUID();$.set("traceId",X),kK.info(`\u8BF7\u6C42\u7684traceId --> ${X}`),console.log(`\u8BF7\u6C42\u7684traceId --> ${X}`),await Y()});Z4.use("*",YJ0());Z4.use("*",XJ0());Z4.use(jr0());Z4.use("*",Ir0(60000));Z4.use(async($,Y)=>{let X=performance.now();await Y();let G=performance.now();$.res.headers.set("X-Response-Time",`${G-X}`)});Z4.use(Ar0({windowMs:900000,limit:5000,keyGenerator:($)=>$.req.header("x-forwarded-for")??"",message:{error:"\u5F53\u524DIP\u8BF7\u6C42\u8FC7\u591A\uFF0C\u8BF715\u5206\u949F\u540E\u518D\u6B21\u5C1D\u8BD5\u3002",retryAfter:"15 minutes"},standardHeaders:"draft-6",skip:($)=>$.req.path.startsWith("/health"),skipFailedRequests:!0}));var vb9=["system/activate","system/initConfig","system/generate","system/queryActivate","system/queryConfig","login","getAccessToken","openai/chat","openai/agentChat","mcp","sys-mcp","openapi/exportMarkDown","openapi/exportSqliteMarkDown"],xb9=_r0(async($,Y)=>{let G=($.req.path||"/api/nopath").split("/api/")[1].split("?");if(!vb9.includes(G[0])){let J=$.req.header("Authorization");if(J&&J.length>0){let Q=!1;if(J.includes("Bearer"))Q=await rk(J.split(" ")[1]?.toString()||"");else Q=await rk(J);if(!Q)throw new v0(401,{message:"\u8BBF\u95EE\u51ED\u8BC1\u65E0\u6548"})}else throw new v0(401,{message:"\u7528\u6237\u672A\u8BA4\u8BC1"})}await Y()});Z4.use("/api/*",xb9);Z4.get("/getAccessToken",async($)=>{let Y=$.req.query("appId"),X=$.req.query("appSecret"),G=$1();if(!Y||!X)throw new v0(401,{message:"appId\u7F3A\u5C11"});let J=await Ii(Y?Y:"",X?X:"");if(J.length==0)throw new v0(401,{message:"appId\u65E0\u6548"});let Q=await cH(J[0].day);return G.data={success:!0,msg:"",token:Q},$.json(G)});Z4.post("/login",async($)=>{let Y=await $.req.json(),X=Y.userName,G=Y.password,J=$1(),Q=await Sk("admin_account");if(Q){let W=JSON.parse(Q);if(W.username==X&&W.password==G){J.businessCode=1e4,J.businessMsg="\u767B\u5F55\u6210\u529F";let Z=await cH(1);J.data={token:Z}}else J.businessCode=10002,J.businessMsg="\u8D26\u53F7\u5BC6\u7801\u6709\u8BEF",J.code="0001",J.msg="\u8D26\u53F7\u5BC6\u7801\u6709\u8BEF"}else J.businessCode=10002,J.businessMsg="\u8D26\u53F7\u5BC6\u7801\u6709\u8BEF",J.code="0001",J.msg="\u8D26\u53F7\u5BC6\u7801\u6709\u8BEF";return $.json(J)});Z4.all("/",($)=>{return $.text("welcome :)")});Z4.notFound(($)=>{return $.text("404 :)",404)});Z4.options("/*",($)=>$.text("success :)"));Z4.route("/api/upload",nG1);Z4.route("/api/demo",aG1);Z4.route("/api/source",f31);Z4.route("/api/pgSource",CV1);Z4.route("/api/oracleSource",FB1);Z4.route("/api/sqliteSource",LB1);Z4.route("/api/appmanager",DB1);Z4.route("/api/apimanager",kB1);Z4.route("/api/system",xB1);Z4.route("/api/dataplug",mB1);Z4.route("/api/mysqlCustomService",iB1);Z4.route("/api/pgCustomService",tB1);Z4.route("/api/oracleCustomService",ab1);Z4.route("/api/sqliteCustomService",ob1);Z4.route("/api/execution",LZ4);Z4.route("/api/getAccessToken",NZ4);Z4.route("/api/mcpmanager",qZ4);Z4.route("/mcp",V34);Z4.route("/sys-mcp",Tz4);Z4.route("/api/openai",Qk4);Z4.route("/api/llmconfig",Wk4);Z4.route("/api/agentmanager",Kk4);Z4.route("/api/fileUpload",Zk4);Z4.route("/api/apiProxymanager",Uk4);Z4.route("/api/apiProxyDetail",Hk4);Z4.route("/api/apiProxyStatistics",zk4);Z4.route("/api/openapi",ak4);Z4.route("/api/commonService",tk4);Z4.use("/static/*",z7({root:"./"}));Z4.use("/static/home",z7({path:"./static/index.html"}));Z4.use("/static/home/*",z7({path:"./static/index.html"}));Z4.use("/static/login",z7({path:"./static/index.html"}));Z4.use("/static/login/*",z7({path:"./static/index.html"}));Z4.use("/static/mysql",z7({path:"./static/index.html"}));Z4.use("/static/mysqlcustom",z7({path:"./static/index.html"}));Z4.use("/static/flow",z7({path:"./static/index.html"}));Z4.use("/static/apimanager",z7({path:"./static/index.html"}));Z4.use("/static/mcp",z7({path:"./static/index.html"}));Z4.use("/static/agent",z7({path:"./static/index.html"}));Z4.use("/static/fileupload",z7({path:"./static/index.html"}));Z4.use("/static/system",z7({path:"./static/index.html"}));Z4.use("/static/flowedit",z7({path:"./static/index.html"}));Z4.use("/static/dataspace",z7({path:"./static/index.html"}));Z4.use("/static1/home",z7({path:"./static/llama/index.html"}));Z4.use("/static1/home/*",z7({path:"./static/llama/index.html"}));Z4.use("/static1/bundle.css",z7({path:"./static/llama/bundle.css"}));Z4.use("/static1/bundle.js",z7({path:"./static/llama/bundle.js"}));var yb9=Number(Bun.env.PORT)+1,RG0=Bun.env.LLAMAHOST;Z4.all("/static1/tools",async($,Y)=>{return zR(`${RG0}/tools`,{...$.req,headers:{...$.req.header(),"X-Forwarded-For":"127.0.0.1","X-Forwarded-Host":$.req.header("host")}})});Z4.all("/static1/props",async($,Y)=>{return zR(`${RG0}/props`,{...$.req,headers:{...$.req.header(),"X-Forwarded-For":"127.0.0.1","X-Forwarded-Host":$.req.header("host")}})});Z4.all("/static1/v1/models",async($,Y)=>{return zR(`${RG0}/v1/models`,{...$.req,headers:{...$.req.header(),"X-Forwarded-For":"127.0.0.1","X-Forwarded-Host":$.req.header("host")}})});Z4.all("/static1/v1/chat/completions",async($,Y)=>{return zR(`${RG0}/v1/chat/completions`,{...$.req,headers:{...$.req.header(),"X-Forwarded-For":"127.0.0.1","X-Forwarded-Host":$.req.header("host")}})});var bb9=new dV("statistics",{embedded:!0}),Uv$=new cV("statistics",async($)=>{return z71($.data),{sent:!0}},{embedded:!0});Z4.all("/api/proxy/:path1/:path2",async($,Y)=>{let X=$.req.param("path1")??"",G=$.req.param("path2")??"",Q=(await P61(X,G))[0]?.target,W=Dn0.get("local-ip");if(!W)W=$v4(),Dn0.set("local-ip",W);let K=await Gr0($.req),Z=K.url,H=K.method,z=await K.text();return kK.info(`\u6536\u5230\u8BF7\u6C42:${Z} \r
 \u8BF7\u6C42\u7C7B\u578B:${H} \r
 \u8BF7\u6C42\u4F53:${z}`),console.log(`\u6536\u5230\u8BF7\u6C42:${Z} \r
 \u8BF7\u6C42\u7C7B\u578B:${H} \r
 \u8BF7\u6C42\u4F53:${z}`),bb9.add("statistics",{path1:X,path2:G,month:Ti()}),zR(`http://${W}:${Bun.env.PORT||3000}/api/execution/${Q}`,{...$.req,headers:{...$.req.header(),"X-Forwarded-For":"127.0.0.1","X-Forwarded-Host":$.req.header("host")}})});Z4.all("/api/sqlite/:filename/:tableName",async($,Y)=>{let X=$.req.param("filename")??"",G=$.req.param("tableName")??"";if(X.length==0)throw new v0(500,{message:"\u65E0\u6548\u7684filename"});if(G.length==0)throw new v0(500,{message:"\u65E0\u6548\u7684tableName"});let J=$.req.method,Q=$1();try{if(J=="GET"){let W=$.req.query(),{result:K,count:Z}=await fX1(X,G,W);Q.data={records:K,total:Z}}else if(J=="POST"){let W=await $.req.json();if(a8(W))await gX1(X,G,W);else throw new v0(500,{message:"\u8BF7\u6C42\u4F53\u7C7B\u578B\u9519\u8BEF"})}else if(J=="PATCH"){let W=await $.req.json();if(a8(W))await mX1(X,G,W);else throw new v0(500,{message:"\u8BF7\u6C42\u4F53\u7C7B\u578B\u9519\u8BEF"})}else if(J=="DELETE"){let W=$.req.query();await uX1(X,G,W)}else throw new v0(500,{message:"\u8BF7\u6C42\u7C7B\u578B\u9519\u8BEF"})}catch(W){throw console.error(W),new v0(500,{message:"\u67E5\u8BE2\u5931\u8D25"})}return $.json(Q)});var hb9={max:500,maxSize:1000,sizeCalculation:($,Y)=>{return 1},dispose:($,Y)=>{},ttl:86400000,allowStale:!1,updateAgeOnGet:!1,updateAgeOnHas:!1,fetchMethod:async($,Y,{options:X,signal:G,context:J})=>{}},Dn0=new eW(hb9);Dn0.set("license:activate",!0);function $v4(){let $=fb9.networkInterfaces();for(let Y of Object.keys($))for(let X of $[Y])if(X.family==="IPv4"&&!X.internal)return X.address;return"No External IP found"}async function gb9(){console.log("\u4E3B\u7EBF\u7A0B\u542F\u52A8..."),await Bun.sleep(3000);let $=$v4();console.log(`\u767B\u9646\u8BF7\u8BBF\u95EE:
http://${$}:${Bun.env.PORT||3000}/static/home`)}if(Bun.isMainThread){if(kK.info("\u4E3B\u7EBF\u7A0B\u542F\u52A8..."),$61(),Number(Bun.env.LLAMASERVER))mb9();gb9()}async function mb9(){Bun.spawn(["./llama-server","-m","MiniCPM-V-4_6-Q4_K_M.gguf","--ctx-size","8192","--port",`${yb9}`,"--temp","0.7","--top-p","0.8","--top-k","100","--repeat-penalty","1.05","--reasoning","off","--no-webui","-ngl","0","-np","2"],{cwd:"./llama-server",async onExit($,Y,X,G){$.kill()}})}var zv$={port:Bun.env.PORT||3000,fetch:Z4.fetch,development:!1,maxRequestBodySize:52428800,error($){return new Response(`<pre>${$}
${$.stack}</pre>`,{headers:{"Content-Type":"text/html"}})}};export{zv$ as default};
